beesoft-components 0.10.0 → 0.10.1-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/beesoft-components.css +1 -0
- package/dist/beesoft-components.css.gz +0 -0
- package/dist/index.es.js +4260 -4391
- package/dist/index.es.js.gz +0 -0
- package/dist/index.umd.js +25 -27
- package/dist/index.umd.js.gz +0 -0
- package/package.json +41 -39
- package/types/index.d.ts +19 -19
- package/dist/style.css +0 -1
- package/dist/style.css.gz +0 -0
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(ne,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):(ne=typeof globalThis<"u"?globalThis:ne||self,p(ne.BeeSoftComponents={},ne.React,ne.ReactDOM))})(this,function(ne,p,Je){"use strict";var Lp=Object.defineProperty;var Ap=(ne,p,Je)=>p in ne?Lp(ne,p,{enumerable:!0,configurable:!0,writable:!0,value:Je}):ne[p]=Je;var T=(ne,p,Je)=>Ap(ne,typeof p!="symbol"?p+"":p,Je);function ki(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 or=ki(p);function rn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jr={exports:{}},ir={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var ss;function Ci(){if(ss)return ir;ss=1;var e=p,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function i(c,u,h){var f,v={},P=null,l=null;h!==void 0&&(P=""+h),u.key!==void 0&&(P=""+u.key),u.ref!==void 0&&(l=u.ref);for(f in u)n.call(u,f)&&!o.hasOwnProperty(f)&&(v[f]=u[f]);if(c&&c.defaultProps)for(f in u=c.defaultProps,u)v[f]===void 0&&(v[f]=u[f]);return{$$typeof:t,type:c,key:P,ref:l,props:v,_owner:s.current}}return ir.Fragment=r,ir.jsx=i,ir.jsxs=i,ir}var ar={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,26 +14,24 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+
|
|
19
|
-
`),
|
|
20
|
-
`),
|
|
21
|
-
`+
|
|
17
|
+
*/var os;function Di(){return os||(os=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"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),l=Symbol.for("react.offscreen"),d=Symbol.iterator,b="@@iterator";function x(a){if(a===null||typeof a!="object")return null;var m=d&&a[d]||a[b];return typeof m=="function"?m:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(a){{for(var m=arguments.length,w=new Array(m>1?m-1:0),j=1;j<m;j++)w[j-1]=arguments[j];V("error",a,w)}}function V(a,m,w){{var j=y.ReactDebugCurrentFrame,G=j.getStackAddendum();G!==""&&(m+="%s",w=w.concat([G]));var X=w.map(function(B){return String(B)});X.unshift("Warning: "+m),Function.prototype.apply.call(console[a],console,X)}}var R=!1,S=!1,$=!1,O=!1,q=!1,z;z=Symbol.for("react.module.reference");function se(a){return!!(typeof a=="string"||typeof a=="function"||a===n||a===o||q||a===s||a===h||a===f||O||a===l||R||S||$||typeof a=="object"&&a!==null&&(a.$$typeof===P||a.$$typeof===v||a.$$typeof===i||a.$$typeof===c||a.$$typeof===u||a.$$typeof===z||a.getModuleId!==void 0))}function ae(a,m,w){var j=a.displayName;if(j)return j;var G=m.displayName||m.name||"";return G!==""?w+"("+G+")":w}function re(a){return a.displayName||"Context"}function K(a){if(a==null)return null;if(typeof a.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case n:return"Fragment";case r:return"Portal";case o:return"Profiler";case s:return"StrictMode";case h:return"Suspense";case f:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case c:var m=a;return re(m)+".Consumer";case i:var w=a;return re(w._context)+".Provider";case u:return ae(a,a.render,"ForwardRef");case v:var j=a.displayName||null;return j!==null?j:K(a.type)||"Memo";case P:{var G=a,X=G._payload,B=G._init;try{return K(B(X))}catch{return null}}}return null}var L=Object.assign,F=0,C,Q,I,he,k,M,N;function _(){}_.__reactDisabledLog=!0;function W(){{if(F===0){C=console.log,Q=console.info,I=console.warn,he=console.error,k=console.group,M=console.groupCollapsed,N=console.groupEnd;var a={configurable:!0,enumerable:!0,value:_,writable:!0};Object.defineProperties(console,{info:a,log:a,warn:a,error:a,group:a,groupCollapsed:a,groupEnd:a})}F++}}function J(){{if(F--,F===0){var a={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},a,{value:C}),info:L({},a,{value:Q}),warn:L({},a,{value:I}),error:L({},a,{value:he}),group:L({},a,{value:k}),groupCollapsed:L({},a,{value:M}),groupEnd:L({},a,{value:N})})}F<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var H=y.ReactCurrentDispatcher,U;function Z(a,m,w){{if(U===void 0)try{throw Error()}catch(G){var j=G.stack.trim().match(/\n( *(at )?)/);U=j&&j[1]||""}return`
|
|
18
|
+
`+U+a}}var te=!1,D;{var ie=typeof WeakMap=="function"?WeakMap:Map;D=new ie}function A(a,m){if(!a||te)return"";{var w=D.get(a);if(w!==void 0)return w}var j;te=!0;var G=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var X;X=H.current,H.current=null,W();try{if(m){var B=function(){throw Error()};if(Object.defineProperty(B.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(B,[])}catch(ve){j=ve}Reflect.construct(a,[],B)}else{try{B.call()}catch(ve){j=ve}a.call(B.prototype)}}else{try{throw Error()}catch(ve){j=ve}a()}}catch(ve){if(ve&&j&&typeof ve.stack=="string"){for(var Y=ve.stack.split(`
|
|
19
|
+
`),ge=j.stack.split(`
|
|
20
|
+
`),oe=Y.length-1,ce=ge.length-1;oe>=1&&ce>=0&&Y[oe]!==ge[ce];)ce--;for(;oe>=1&&ce>=0;oe--,ce--)if(Y[oe]!==ge[ce]){if(oe!==1||ce!==1)do if(oe--,ce--,ce<0||Y[oe]!==ge[ce]){var _e=`
|
|
21
|
+
`+Y[oe].replace(" at new "," at ");return a.displayName&&_e.includes("<anonymous>")&&(_e=_e.replace("<anonymous>",a.displayName)),typeof a=="function"&&D.set(a,_e),_e}while(oe>=1&&ce>=0);break}}}finally{te=!1,H.current=X,J(),Error.prepareStackTrace=G}var ze=a?a.displayName||a.name:"",We=ze?Z(ze):"";return typeof a=="function"&&D.set(a,We),We}function Ne(a,m,w){return A(a,!1)}function qe(a){var m=a.prototype;return!!(m&&m.isReactComponent)}function Le(a,m,w){if(a==null)return"";if(typeof a=="function")return A(a,qe(a));if(typeof a=="string")return Z(a);switch(a){case h:return Z("Suspense");case f:return Z("SuspenseList")}if(typeof a=="object")switch(a.$$typeof){case u:return Ne(a.render);case v:return Le(a.type,m,w);case P:{var j=a,G=j._payload,X=j._init;try{return Le(X(G),m,w)}catch{}}}return""}var Ye=Object.prototype.hasOwnProperty,ot={},Ge=y.ReactDebugCurrentFrame;function Ve(a){if(a){var m=a._owner,w=Le(a.type,a._source,m?m.type:null);Ge.setExtraStackFrame(w)}else Ge.setExtraStackFrame(null)}function Kt(a,m,w,j,G){{var X=Function.call.bind(Ye);for(var B in a)if(X(a,B)){var Y=void 0;try{if(typeof a[B]!="function"){var ge=Error((j||"React class")+": "+w+" type `"+B+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[B]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ge.name="Invariant Violation",ge}Y=a[B](m,B,j,w,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(oe){Y=oe}Y&&!(Y instanceof Error)&&(Ve(G),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",j||"React class",w,B,typeof Y),Ve(null)),Y instanceof Error&&!(Y.message in ot)&&(ot[Y.message]=!0,Ve(G),E("Failed %s type: %s",w,Y.message),Ve(null))}}}var Zt=Array.isArray;function Qe(a){return Zt(a)}function Gt(a){{var m=typeof Symbol=="function"&&Symbol.toStringTag,w=m&&a[Symbol.toStringTag]||a.constructor.name||"Object";return w}}function Qt(a){try{return Ot(a),!1}catch{return!0}}function Ot(a){return""+a}function it(a){if(Qt(a))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Gt(a)),Ot(a)}var at=y.ReactCurrentOwner,Cr={key:!0,ref:!0,__self:!0,__source:!0},Xe,Nt;function en(a){if(Ye.call(a,"ref")){var m=Object.getOwnPropertyDescriptor(a,"ref").get;if(m&&m.isReactWarning)return!1}return a.ref!==void 0}function Dr(a){if(Ye.call(a,"key")){var m=Object.getOwnPropertyDescriptor(a,"key").get;if(m&&m.isReactWarning)return!1}return a.key!==void 0}function Xt(a,m){typeof a.ref=="string"&&at.current}function Jt(a,m){{var w=function(){Xe||(Xe=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",m))};w.isReactWarning=!0,Object.defineProperty(a,"key",{get:w,configurable:!0})}}function tn(a,m){{var w=function(){Nt||(Nt=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",m))};w.isReactWarning=!0,Object.defineProperty(a,"ref",{get:w,configurable:!0})}}var er=function(a,m,w,j,G,X,B){var Y={$$typeof:t,type:a,key:m,ref:w,props:B,_owner:X};return Y._store={},Object.defineProperty(Y._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Y,"_self",{configurable:!1,enumerable:!1,writable:!1,value:j}),Object.defineProperty(Y,"_source",{configurable:!1,enumerable:!1,writable:!1,value:G}),Object.freeze&&(Object.freeze(Y.props),Object.freeze(Y)),Y};function jt(a,m,w,j,G){{var X,B={},Y=null,ge=null;w!==void 0&&(it(w),Y=""+w),Dr(m)&&(it(m.key),Y=""+m.key),en(m)&&(ge=m.ref,Xt(m,G));for(X in m)Ye.call(m,X)&&!Cr.hasOwnProperty(X)&&(B[X]=m[X]);if(a&&a.defaultProps){var oe=a.defaultProps;for(X in oe)B[X]===void 0&&(B[X]=oe[X])}if(Y||ge){var ce=typeof a=="function"?a.displayName||a.name||"Unknown":a;Y&&Jt(B,ce),ge&&tn(B,ce)}return er(a,Y,ge,G,j,at.current,B)}}var ee=y.ReactCurrentOwner,fe=y.ReactDebugCurrentFrame;function Ee(a){if(a){var m=a._owner,w=Le(a.type,a._source,m?m.type:null);fe.setExtraStackFrame(w)}else fe.setExtraStackFrame(null)}var ct;ct=!1;function ut(a){return typeof a=="object"&&a!==null&&a.$$typeof===t}function xt(){{if(ee.current){var a=K(ee.current.type);if(a)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+
|
|
23
|
+
Check the render method of \``+a+"`."}return""}}function tr(a){return""}var wt={};function rr(a){{var m=xt();if(!m){var w=typeof a=="string"?a:a.displayName||a.name;w&&(m=`
|
|
24
24
|
|
|
25
|
-
Check
|
|
26
|
-
|
|
27
|
-
Check the top-level render call using <`+w+">.")}return m}}function St(c,m){{if(!c._store||c._store.validated||c.key!=null)return;c._store.validated=!0;var w=$t(m);if(Lt[w])return;Lt[w]=!0;var $="";c&&c._owner&&c._owner!==le.current&&($=" It was passed a child from "+M(c._owner.type)+"."),Qe(c),D('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',w,$),Qe(null)}}function Ft(c,m){{if(typeof c!="object")return;if(nt(c))for(var w=0;w<c.length;w++){var $=c[w];yt($)&&St($,m)}else if(yt(c))c._store&&(c._store.validated=!0);else if(c){var Z=j(c);if(typeof Z=="function"&&Z!==c.entries)for(var G=Z.call(c),W;!(W=G.next()).done;)yt(W.value)&&St(W.value,m)}}}function ur(c){{var m=c.type;if(m==null||typeof m=="string")return;var w;if(typeof m=="function")w=m.propTypes;else if(typeof m=="object"&&(m.$$typeof===u||m.$$typeof===g))w=m.propTypes;else return;if(w){var $=M(m);tr(w,c.props,"prop",$,c)}else if(m.PropTypes!==void 0&&!ht){ht=!0;var Z=M(m);D("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Z||"Unknown")}typeof m.getDefaultProps=="function"&&!m.getDefaultProps.isReactClassApproved&&D("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function fn(c){{for(var m=Object.keys(c.props),w=0;w<m.length;w++){var $=m[w];if($!=="children"&&$!=="key"){Qe(c),D("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",$),Qe(null);break}}c.ref!==null&&(Qe(c),D("Invalid attribute `ref` supplied to `React.Fragment`."),Qe(null))}}var Ar={};function dn(c,m,w,$,Z,G){{var W=oe(c);if(!W){var te="";(c===void 0||typeof c=="object"&&c!==null&&Object.keys(c).length===0)&&(te+=" 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 de=At(Z);de?te+=de:te+=Rt();var ae;c===null?ae="null":nt(c)?ae="array":c!==void 0&&c.$$typeof===t?(ae="<"+(M(c.type)||"Unknown")+" />",te=" Did you accidentally export a JSX literal instead of a component?"):ae=typeof c,D("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ae,te)}var me=ee(c,m,w,Z,G);if(me==null)return me;if(W){var Ae=m.children;if(Ae!==void 0)if($)if(nt(Ae)){for(var ze=0;ze<Ae.length;ze++)Ft(Ae[ze],c);Object.freeze&&Object.freeze(Ae)}else D("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ft(Ae,c)}if(Be.call(m,"key")){var Ne=M(c),Fe=Object.keys(m).filter(function(Wm){return Wm!=="key"}),Lr=Fe.length>0?"{key: someKey, "+Fe.join(": ..., ")+": ...}":"{key: someKey}";if(!Ar[Ne+Lr]){var bs=Fe.length>0?"{"+Fe.join(": ..., ")+": ...}":"{}";D(`A props object containing a "key" prop is being spread into JSX:
|
|
25
|
+
Check the top-level render call using <`+w+">.")}return m}}function Pt(a,m){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var w=rr(m);if(wt[w])return;wt[w]=!0;var j="";a&&a._owner&&a._owner!==ee.current&&(j=" It was passed a child from "+K(a._owner.type)+"."),Ee(a),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',w,j),Ee(null)}}function Tt(a,m){{if(typeof a!="object")return;if(Qe(a))for(var w=0;w<a.length;w++){var j=a[w];ut(j)&&Pt(j,m)}else if(ut(a))a._store&&(a._store.validated=!0);else if(a){var G=x(a);if(typeof G=="function"&&G!==a.entries)for(var X=G.call(a),B;!(B=X.next()).done;)ut(B.value)&&Pt(B.value,m)}}}function nr(a){{var m=a.type;if(m==null||typeof m=="string")return;var w;if(typeof m=="function")w=m.propTypes;else if(typeof m=="object"&&(m.$$typeof===u||m.$$typeof===v))w=m.propTypes;else return;if(w){var j=K(m);Kt(w,a.props,"prop",j,a)}else if(m.PropTypes!==void 0&&!ct){ct=!0;var G=K(m);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",G||"Unknown")}typeof m.getDefaultProps=="function"&&!m.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function sr(a){{for(var m=Object.keys(a.props),w=0;w<m.length;w++){var j=m[w];if(j!=="children"&&j!=="key"){Ee(a),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",j),Ee(null);break}}a.ref!==null&&(Ee(a),E("Invalid attribute `ref` supplied to `React.Fragment`."),Ee(null))}}var Or={};function Nr(a,m,w,j,G,X){{var B=se(a);if(!B){var Y="";(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(Y+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ge=tr();ge?Y+=ge:Y+=xt();var oe;a===null?oe="null":Qe(a)?oe="array":a!==void 0&&a.$$typeof===t?(oe="<"+(K(a.type)||"Unknown")+" />",Y=" Did you accidentally export a JSX literal instead of a component?"):oe=typeof a,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",oe,Y)}var ce=jt(a,m,w,G,X);if(ce==null)return ce;if(B){var _e=m.children;if(_e!==void 0)if(j)if(Qe(_e)){for(var ze=0;ze<_e.length;ze++)Tt(_e[ze],a);Object.freeze&&Object.freeze(_e)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Tt(_e,a)}if(Ye.call(m,"key")){var We=K(a),ve=Object.keys(m).filter(function(ns){return ns!=="key"}),It=ve.length>0?"{key: someKey, "+ve.join(": ..., ")+": ...}":"{key: someKey}";if(!Or[We+It]){var rs=ve.length>0?"{"+ve.join(": ..., ")+": ...}":"{}";E(`A props object containing a "key" prop is being spread into JSX:
|
|
28
26
|
let props = %s;
|
|
29
27
|
<%s {...props} />
|
|
30
28
|
React keys must be passed directly to JSX without using spread:
|
|
31
29
|
let props = %s;
|
|
32
|
-
<%s key={someKey} {...props} />`,
|
|
30
|
+
<%s key={someKey} {...props} />`,It,We,rs,We),Or[We+It]=!0}}return a===n?sr(ce):nr(ce),ce}}function Xn(a,m,w){return Nr(a,m,w,!0)}function Jn(a,m,w){return Nr(a,m,w,!1)}var es=Jn,ts=Xn;ar.Fragment=n,ar.jsx=es,ar.jsxs=ts}()),ar}var is;function Oi(){return is||(is=1,process.env.NODE_ENV==="production"?jr.exports=Ci():jr.exports=Di()),jr.exports}var g=Oi();const as=p.createContext(void 0),cs=()=>p.useContext(as),Ni=({overlayKeepOnScreen:e=!0,useAnimations:t=!0,mobileMediaQuery:r,tabletMediaQuery:n,desktopMediaQuery:s,isValidScrollableElement:o,children:i})=>{const c={overlayKeepOnScreen:e,useAnimations:t,mobileMediaQuery:r,tabletMediaQuery:n,desktopMediaQuery:s,isValidScrollableElement:o};return g.jsx(as.Provider,{value:c,children:i})};var $e=(e=>(e[e.Vertical=0]="Vertical",e[e.Horizontal=1]="Horizontal",e))($e||{}),Be=(e=>(e[e.Right=0]="Right",e[e.Left=1]="Left",e))(Be||{}),nn={exports:{}};/*!
|
|
33
31
|
Copyright (c) 2018 Jed Watson.
|
|
34
32
|
Licensed under the MIT License (MIT), see
|
|
35
33
|
http://jedwatson.github.io/classnames
|
|
36
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",i=0;i<arguments.length;i++){var
|
|
34
|
+
*/var us;function ji(){return us||(us=1,function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",i=0;i<arguments.length;i++){var c=arguments[i];c&&(o=s(o,n(c)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var c in o)t.call(o,c)&&o[c]&&(i=s(i,c));return i}function s(o,i){return i?o?o+" "+i:o+i:o}e.exports?(r.default=r,e.exports=r):window.classNames=r})()}(nn)),nn.exports}var Ii=ji();const de=rn(Ii);var cr=(e=>(e[e.Focus=0]="Focus",e[e.FocusWithin=1]="FocusWithin",e))(cr||{});const Ir=(e=1)=>p.useMemo(()=>de("bsc:dark:ring-mono-light-2 bsc:dark:ring-offset-mono-dark-1",{"bsc:focus-within:ring-3 bsc:focus-within:ring-primary-2 bsc:focus-within:ring-offset-2 focus-within:bsc-ring-opacity-50":e===1,"bsc:focus:ring-3 bsc:focus:ring-primary-2 bsc:focus:ring-offset-2 focus:bsc-ring-opacity-50":e===0}),[e]),Mi=(e,t)=>{const r=p.useRef(null),{buttonType:n,buttonStyle:s="flat",type:o="button",disabled:i=!1,form:c,fullWidth:u=!1,onClick:h,className:f,children:v}=e,P=()=>{h==null||h()},l=()=>{var x;(x=r.current)==null||x.click()};p.useImperativeHandle(t,()=>({click:l}));const d=Ir(cr.Focus),b=de("bc-button bsc:max-sm:p-4 bsc:md:p-2 bsc:dark:bg-mono-light-1 bsc:dark:hover:bg-mono-light-2 bsc:dark:text-mono-dark-1",d,{"bsc:w-full":u,"bc-disabled bsc:bg-gray-3 bsc:text-gray-2 bsc:pointer-events-none":i,"bsc:bg-primary-1 bsc:text-white bsc:hover:bg-primary-2 bsc:focus:ring-primary-1":n==="primary","bsc:bg-primary-2 bsc:text-white bsc:hover:bg-primary-3 bsc:focus:ring-primary-2":n==="secondary","bsc:bg-info bsc:text-white bsc:focus:ring-info":n==="info","bsc:bg-success bsc:text-white bsc:focus:ring-success":n==="success","bsc:bg-warning bsc:text-white bsc:focus:ring-warning":n==="warning","bsc:bg-error bsc:text-white bsc:focus:ring-error":n==="error","bsc:rounded-md":s==="curved","bsc:rounded-full bsc:px-4!":s==="round"},f);return g.jsx("button",{ref:r,type:o,onClick:P,disabled:i,form:c,className:b,children:v})},et=p.forwardRef(Mi);var sn={exports:{}},ur={};/**
|
|
37
35
|
* @license React
|
|
38
36
|
* react-jsx-runtime.production.min.js
|
|
39
37
|
*
|
|
@@ -41,7 +39,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
41
39
|
*
|
|
42
40
|
* This source code is licensed under the MIT license found in the
|
|
43
41
|
* LICENSE file in the root directory of this source tree.
|
|
44
|
-
*/var
|
|
42
|
+
*/var ls;function Ri(){if(ls)return ur;ls=1;var e=p,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function i(c,u,h){var f,v={},P=null,l=null;h!==void 0&&(P=""+h),u.key!==void 0&&(P=""+u.key),u.ref!==void 0&&(l=u.ref);for(f in u)n.call(u,f)&&!o.hasOwnProperty(f)&&(v[f]=u[f]);if(c&&c.defaultProps)for(f in u=c.defaultProps,u)v[f]===void 0&&(v[f]=u[f]);return{$$typeof:t,type:c,key:P,ref:l,props:v,_owner:s.current}}return ur.Fragment=r,ur.jsx=i,ur.jsxs=i,ur}var Mr={};/**
|
|
45
43
|
* @license React
|
|
46
44
|
* react-jsx-runtime.development.js
|
|
47
45
|
*
|
|
@@ -49,40 +47,40 @@ React keys must be passed directly to JSX without using spread:
|
|
|
49
47
|
*
|
|
50
48
|
* This source code is licensed under the MIT license found in the
|
|
51
49
|
* LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/var
|
|
53
|
-
`+
|
|
54
|
-
`),
|
|
55
|
-
`),
|
|
56
|
-
`+
|
|
50
|
+
*/var fs;function Li(){return fs||(fs=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"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),l=Symbol.for("react.offscreen"),d=Symbol.iterator,b="@@iterator";function x(a){if(a===null||typeof a!="object")return null;var m=d&&a[d]||a[b];return typeof m=="function"?m:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(a){{for(var m=arguments.length,w=new Array(m>1?m-1:0),j=1;j<m;j++)w[j-1]=arguments[j];V("error",a,w)}}function V(a,m,w){{var j=y.ReactDebugCurrentFrame,G=j.getStackAddendum();G!==""&&(m+="%s",w=w.concat([G]));var X=w.map(function(B){return String(B)});X.unshift("Warning: "+m),Function.prototype.apply.call(console[a],console,X)}}var R=!1,S=!1,$=!1,O=!1,q=!1,z;z=Symbol.for("react.module.reference");function se(a){return!!(typeof a=="string"||typeof a=="function"||a===n||a===o||q||a===s||a===h||a===f||O||a===l||R||S||$||typeof a=="object"&&a!==null&&(a.$$typeof===P||a.$$typeof===v||a.$$typeof===i||a.$$typeof===c||a.$$typeof===u||a.$$typeof===z||a.getModuleId!==void 0))}function ae(a,m,w){var j=a.displayName;if(j)return j;var G=m.displayName||m.name||"";return G!==""?w+"("+G+")":w}function re(a){return a.displayName||"Context"}function K(a){if(a==null)return null;if(typeof a.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case n:return"Fragment";case r:return"Portal";case o:return"Profiler";case s:return"StrictMode";case h:return"Suspense";case f:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case c:var m=a;return re(m)+".Consumer";case i:var w=a;return re(w._context)+".Provider";case u:return ae(a,a.render,"ForwardRef");case v:var j=a.displayName||null;return j!==null?j:K(a.type)||"Memo";case P:{var G=a,X=G._payload,B=G._init;try{return K(B(X))}catch{return null}}}return null}var L=Object.assign,F=0,C,Q,I,he,k,M,N;function _(){}_.__reactDisabledLog=!0;function W(){{if(F===0){C=console.log,Q=console.info,I=console.warn,he=console.error,k=console.group,M=console.groupCollapsed,N=console.groupEnd;var a={configurable:!0,enumerable:!0,value:_,writable:!0};Object.defineProperties(console,{info:a,log:a,warn:a,error:a,group:a,groupCollapsed:a,groupEnd:a})}F++}}function J(){{if(F--,F===0){var a={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},a,{value:C}),info:L({},a,{value:Q}),warn:L({},a,{value:I}),error:L({},a,{value:he}),group:L({},a,{value:k}),groupCollapsed:L({},a,{value:M}),groupEnd:L({},a,{value:N})})}F<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var H=y.ReactCurrentDispatcher,U;function Z(a,m,w){{if(U===void 0)try{throw Error()}catch(G){var j=G.stack.trim().match(/\n( *(at )?)/);U=j&&j[1]||""}return`
|
|
51
|
+
`+U+a}}var te=!1,D;{var ie=typeof WeakMap=="function"?WeakMap:Map;D=new ie}function A(a,m){if(!a||te)return"";{var w=D.get(a);if(w!==void 0)return w}var j;te=!0;var G=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var X;X=H.current,H.current=null,W();try{if(m){var B=function(){throw Error()};if(Object.defineProperty(B.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(B,[])}catch(ve){j=ve}Reflect.construct(a,[],B)}else{try{B.call()}catch(ve){j=ve}a.call(B.prototype)}}else{try{throw Error()}catch(ve){j=ve}a()}}catch(ve){if(ve&&j&&typeof ve.stack=="string"){for(var Y=ve.stack.split(`
|
|
52
|
+
`),ge=j.stack.split(`
|
|
53
|
+
`),oe=Y.length-1,ce=ge.length-1;oe>=1&&ce>=0&&Y[oe]!==ge[ce];)ce--;for(;oe>=1&&ce>=0;oe--,ce--)if(Y[oe]!==ge[ce]){if(oe!==1||ce!==1)do if(oe--,ce--,ce<0||Y[oe]!==ge[ce]){var _e=`
|
|
54
|
+
`+Y[oe].replace(" at new "," at ");return a.displayName&&_e.includes("<anonymous>")&&(_e=_e.replace("<anonymous>",a.displayName)),typeof a=="function"&&D.set(a,_e),_e}while(oe>=1&&ce>=0);break}}}finally{te=!1,H.current=X,J(),Error.prepareStackTrace=G}var ze=a?a.displayName||a.name:"",We=ze?Z(ze):"";return typeof a=="function"&&D.set(a,We),We}function Ne(a,m,w){return A(a,!1)}function qe(a){var m=a.prototype;return!!(m&&m.isReactComponent)}function Le(a,m,w){if(a==null)return"";if(typeof a=="function")return A(a,qe(a));if(typeof a=="string")return Z(a);switch(a){case h:return Z("Suspense");case f:return Z("SuspenseList")}if(typeof a=="object")switch(a.$$typeof){case u:return Ne(a.render);case v:return Le(a.type,m,w);case P:{var j=a,G=j._payload,X=j._init;try{return Le(X(G),m,w)}catch{}}}return""}var Ye=Object.prototype.hasOwnProperty,ot={},Ge=y.ReactDebugCurrentFrame;function Ve(a){if(a){var m=a._owner,w=Le(a.type,a._source,m?m.type:null);Ge.setExtraStackFrame(w)}else Ge.setExtraStackFrame(null)}function Kt(a,m,w,j,G){{var X=Function.call.bind(Ye);for(var B in a)if(X(a,B)){var Y=void 0;try{if(typeof a[B]!="function"){var ge=Error((j||"React class")+": "+w+" type `"+B+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[B]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ge.name="Invariant Violation",ge}Y=a[B](m,B,j,w,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(oe){Y=oe}Y&&!(Y instanceof Error)&&(Ve(G),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",j||"React class",w,B,typeof Y),Ve(null)),Y instanceof Error&&!(Y.message in ot)&&(ot[Y.message]=!0,Ve(G),E("Failed %s type: %s",w,Y.message),Ve(null))}}}var Zt=Array.isArray;function Qe(a){return Zt(a)}function Gt(a){{var m=typeof Symbol=="function"&&Symbol.toStringTag,w=m&&a[Symbol.toStringTag]||a.constructor.name||"Object";return w}}function Qt(a){try{return Ot(a),!1}catch{return!0}}function Ot(a){return""+a}function it(a){if(Qt(a))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Gt(a)),Ot(a)}var at=y.ReactCurrentOwner,Cr={key:!0,ref:!0,__self:!0,__source:!0},Xe,Nt;function en(a){if(Ye.call(a,"ref")){var m=Object.getOwnPropertyDescriptor(a,"ref").get;if(m&&m.isReactWarning)return!1}return a.ref!==void 0}function Dr(a){if(Ye.call(a,"key")){var m=Object.getOwnPropertyDescriptor(a,"key").get;if(m&&m.isReactWarning)return!1}return a.key!==void 0}function Xt(a,m){typeof a.ref=="string"&&at.current}function Jt(a,m){{var w=function(){Xe||(Xe=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",m))};w.isReactWarning=!0,Object.defineProperty(a,"key",{get:w,configurable:!0})}}function tn(a,m){{var w=function(){Nt||(Nt=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",m))};w.isReactWarning=!0,Object.defineProperty(a,"ref",{get:w,configurable:!0})}}var er=function(a,m,w,j,G,X,B){var Y={$$typeof:t,type:a,key:m,ref:w,props:B,_owner:X};return Y._store={},Object.defineProperty(Y._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Y,"_self",{configurable:!1,enumerable:!1,writable:!1,value:j}),Object.defineProperty(Y,"_source",{configurable:!1,enumerable:!1,writable:!1,value:G}),Object.freeze&&(Object.freeze(Y.props),Object.freeze(Y)),Y};function jt(a,m,w,j,G){{var X,B={},Y=null,ge=null;w!==void 0&&(it(w),Y=""+w),Dr(m)&&(it(m.key),Y=""+m.key),en(m)&&(ge=m.ref,Xt(m));for(X in m)Ye.call(m,X)&&!Cr.hasOwnProperty(X)&&(B[X]=m[X]);if(a&&a.defaultProps){var oe=a.defaultProps;for(X in oe)B[X]===void 0&&(B[X]=oe[X])}if(Y||ge){var ce=typeof a=="function"?a.displayName||a.name||"Unknown":a;Y&&Jt(B,ce),ge&&tn(B,ce)}return er(a,Y,ge,G,j,at.current,B)}}var ee=y.ReactCurrentOwner,fe=y.ReactDebugCurrentFrame;function Ee(a){if(a){var m=a._owner,w=Le(a.type,a._source,m?m.type:null);fe.setExtraStackFrame(w)}else fe.setExtraStackFrame(null)}var ct;ct=!1;function ut(a){return typeof a=="object"&&a!==null&&a.$$typeof===t}function xt(){{if(ee.current){var a=K(ee.current.type);if(a)return`
|
|
57
55
|
|
|
58
|
-
Check the render method of \``+
|
|
56
|
+
Check the render method of \``+a+"`."}return""}}function tr(a){return""}var wt={};function rr(a){{var m=xt();if(!m){var w=typeof a=="string"?a:a.displayName||a.name;w&&(m=`
|
|
59
57
|
|
|
60
|
-
Check the top-level render call using <`+
|
|
58
|
+
Check the top-level render call using <`+w+">.")}return m}}function Pt(a,m){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var w=rr(m);if(wt[w])return;wt[w]=!0;var j="";a&&a._owner&&a._owner!==ee.current&&(j=" It was passed a child from "+K(a._owner.type)+"."),Ee(a),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',w,j),Ee(null)}}function Tt(a,m){{if(typeof a!="object")return;if(Qe(a))for(var w=0;w<a.length;w++){var j=a[w];ut(j)&&Pt(j,m)}else if(ut(a))a._store&&(a._store.validated=!0);else if(a){var G=x(a);if(typeof G=="function"&&G!==a.entries)for(var X=G.call(a),B;!(B=X.next()).done;)ut(B.value)&&Pt(B.value,m)}}}function nr(a){{var m=a.type;if(m==null||typeof m=="string")return;var w;if(typeof m=="function")w=m.propTypes;else if(typeof m=="object"&&(m.$$typeof===u||m.$$typeof===v))w=m.propTypes;else return;if(w){var j=K(m);Kt(w,a.props,"prop",j,a)}else if(m.PropTypes!==void 0&&!ct){ct=!0;var G=K(m);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",G||"Unknown")}typeof m.getDefaultProps=="function"&&!m.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function sr(a){{for(var m=Object.keys(a.props),w=0;w<m.length;w++){var j=m[w];if(j!=="children"&&j!=="key"){Ee(a),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",j),Ee(null);break}}a.ref!==null&&(Ee(a),E("Invalid attribute `ref` supplied to `React.Fragment`."),Ee(null))}}var Or={};function Nr(a,m,w,j,G,X){{var B=se(a);if(!B){var Y="";(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(Y+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ge=tr();ge?Y+=ge:Y+=xt();var oe;a===null?oe="null":Qe(a)?oe="array":a!==void 0&&a.$$typeof===t?(oe="<"+(K(a.type)||"Unknown")+" />",Y=" Did you accidentally export a JSX literal instead of a component?"):oe=typeof a,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",oe,Y)}var ce=jt(a,m,w,G,X);if(ce==null)return ce;if(B){var _e=m.children;if(_e!==void 0)if(j)if(Qe(_e)){for(var ze=0;ze<_e.length;ze++)Tt(_e[ze],a);Object.freeze&&Object.freeze(_e)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Tt(_e,a)}if(Ye.call(m,"key")){var We=K(a),ve=Object.keys(m).filter(function(ns){return ns!=="key"}),It=ve.length>0?"{key: someKey, "+ve.join(": ..., ")+": ...}":"{key: someKey}";if(!Or[We+It]){var rs=ve.length>0?"{"+ve.join(": ..., ")+": ...}":"{}";E(`A props object containing a "key" prop is being spread into JSX:
|
|
61
59
|
let props = %s;
|
|
62
60
|
<%s {...props} />
|
|
63
61
|
React keys must be passed directly to JSX without using spread:
|
|
64
62
|
let props = %s;
|
|
65
|
-
<%s key={someKey} {...props} />`,Fe,ze,Lr,ze),fn[ze+Fe]=!0}}return l===n?ur(ae):Ft(ae),ae}}function dn(l,c,m){return Ar(l,c,m,!0)}function ps(l,c,m){return Ar(l,c,m,!1)}var ms=ps,gs=dn;Fr.Fragment=n,Fr.jsx=ms,Fr.jsxs=gs}()),Fr}var Es;function ia(){return Es||(Es=1,process.env.NODE_ENV==="production"?mn.exports=sa():mn.exports=oa()),mn.exports}var it=ia();const Hr=e=>e==null?!1:typeof e=="object",_s=e=>e instanceof Date,Cs=e=>typeof e=="function",ks=e=>{const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t==="bigint"},gn=e=>{if(!Hr(e))return e;const t={},r=Object.keys(e);for(let n=0,s=r.length;n<s;n++){const o=r[n],i=e[o];ks(i)||Cs(i)?t[o]=i:_s(i)?t[o]=new Date(i.getTime()):Array.isArray(i)?t[o]=bn(i):Hr(i)&&(t[o]=gn(i))}return t},bn=e=>{let t=e.length;const r=new Array(t);for(;t--!==0;){const n=e[t];ks(n)||Cs(n)?r[t]=n:_s(n)?r[t]=new Date(n.getTime()):Hr(n)&&!Array.isArray(n)?r[t]=gn(n):Array.isArray(n)?r[t]=bn(n):r[t]=n}return r},aa=e=>Hr(e)?Array.isArray(e)?bn(e):gn(e):e;function ca(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ua=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[s]))return!1;for(s=n;s--!==0;){var i=o[s];if(!e(t[i],r[i]))return!1}return!0}return t!==t&&r!==r};const Os=ca(ua);function la(e,t){for(let r=e.length;r--!==0;)if(!Os(e[r],t[r]))return!0;return!1}const fa=(e,t)=>{const r=d.useRef([]),n=r.current.length>0&&r.current[0]&&la(r.current[0],t);return(r.current.length===0||n)&&(r.current=[aa(t),e()]),r.current[1]},Ds=e=>{const t=d.useRef();let r=!1;t.current!==void 0&&(r=!Os(t.current,e));const n={changed:r,previousValue:t.current};return t.current=e,n},da=e=>typeof e=="function",ha=e=>{const[t,r]=d.useState({value:e,initial:!0}),n=d.useRef(e);return[t,s=>{if(!da(s))r({value:s,initial:!1});else{const o=s(n.current);n.current=o,r({value:o,initial:!1})}}]},pa=e=>{const[t,r]=ha(e),n=d.useRef({value:e,initial:!0});return n.current!==t&&(n.current=t),[t,r,n]};var mr,Ns;mr={__e:function(e,t,r,n){for(var s,o,i;t=t.__;)if((s=t.__c)&&!s.__)try{if((o=s.constructor)&&o.getDerivedStateFromError!=null&&(s.setState(o.getDerivedStateFromError(e)),i=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(e,n||{}),i=s.__d),i)return s.__E=s}catch(a){e=a}throw e}},Ns=function(e){return e!=null&&e.constructor==null},typeof Promise=="function"&&Promise.prototype.then.bind(Promise.resolve());var yn,Ke,vn,Is,js=0,Ms=[],Re=mr,Rs=Re.__b,As=Re.__r,Ls=Re.diffed,$s=Re.__c,Fs=Re.unmount,Hs=Re.__;function ma(e,t){Re.__h&&Re.__h(Ke,e,js||t),js=0;var r=Ke.__H||(Ke.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function Ys(e,t){var r=ma(yn++,7);return ya(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function ga(){for(var e;e=Ms.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Yr),e.__H.__h.forEach(xn),e.__H.__h=[]}catch(t){e.__H.__h=[],Re.__e(t,e.__v)}}Re.__b=function(e){Ke=null,Rs&&Rs(e)},Re.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Hs&&Hs(e,t)},Re.__r=function(e){As&&As(e),yn=0;var t=(Ke=e.__c).__H;t&&(vn===Ke?(t.__h=[],Ke.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.forEach(Yr),t.__h.forEach(xn),t.__h=[],yn=0)),vn=Ke},Re.diffed=function(e){Ls&&Ls(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ms.push(t)!==1&&Is===Re.requestAnimationFrame||((Is=Re.requestAnimationFrame)||ba)(ga)),t.__H.__.forEach(function(r){r.u&&(r.__H=r.u),r.u=void 0})),vn=Ke=null},Re.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Yr),r.__h=r.__h.filter(function(n){return!n.__||xn(n)})}catch(n){t.some(function(s){s.__h&&(s.__h=[])}),t=[],Re.__e(n,r.__v)}}),$s&&$s(e,t)},Re.unmount=function(e){Fs&&Fs(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Yr(n)}catch(s){t=s}}),r.__H=void 0,t&&Re.__e(t,r.__v))};var Vs=typeof requestAnimationFrame=="function";function ba(e){var t,r=function(){clearTimeout(n),Vs&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);Vs&&(t=requestAnimationFrame(r))}function Yr(e){var t=Ke,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),Ke=t}function xn(e){var t=Ke;e.__c=e.__(),Ke=t}function ya(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}var va=Symbol.for("preact-signals");function Vr(){if(vt>1)vt--;else{for(var e,t=!1;gr!==void 0;){var r=gr;for(gr=void 0,wn++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&Us(r))try{r.c()}catch(s){t||(e=s,t=!0)}r=n}}if(wn=0,vt--,t)throw e}}function xa(e){if(vt>0)return e();vt++;try{return e()}finally{Vr()}}var we=void 0,gr=void 0,vt=0,wn=0,Wr=0;function Ws(e){if(we!==void 0){var t=e.n;if(t===void 0||t.t!==we)return t={i:0,S:e,p:we.s,n:void 0,t:we,e:void 0,x:void 0,r:t},we.s!==void 0&&(we.s.n=t),we.s=t,e.n=t,32&we.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=we.s,t.n=void 0,we.s.n=t,we.s=t),t}}function He(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}He.prototype.brand=va,He.prototype.h=function(){return!0},He.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)},He.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}},He.prototype.subscribe=function(e){var t=this;return yr(function(){var r=t.value,n=we;we=void 0;try{e(r)}finally{we=n}})},He.prototype.valueOf=function(){return this.value},He.prototype.toString=function(){return this.value+""},He.prototype.toJSON=function(){return this.value},He.prototype.peek=function(){var e=we;we=void 0;try{return this.value}finally{we=e}},Object.defineProperty(He.prototype,"value",{get:function(){var e=Ws(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(wn>100)throw new Error("Cycle detected");this.v=e,this.i++,Wr++,vt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Vr()}}}});function Bs(e){return new He(e)}function Us(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function zs(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function qs(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function Ht(e){He.call(this,void 0),this.x=e,this.s=void 0,this.g=Wr-1,this.f=4}(Ht.prototype=new He).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Wr))return!0;if(this.g=Wr,this.f|=1,this.i>0&&!Us(this))return this.f&=-2,!0;var e=we;try{zs(this),we=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return we=e,qs(this),this.f&=-2,!0},Ht.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}He.prototype.S.call(this,e)},Ht.prototype.U=function(e){if(this.t!==void 0&&(He.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Ht.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Ht.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=Ws(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Ks(e){return new Ht(e)}function Gs(e){var t=e.u;if(e.u=void 0,typeof t=="function"){vt++;var r=we;we=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,Pn(e),n}finally{we=r,Vr()}}}function Pn(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Gs(e)}function wa(e){if(we!==this)throw new Error("Out-of-order effect");qs(this),we=e,this.f&=-2,8&this.f&&Pn(this),Vr()}function br(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}br.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},br.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Gs(this),zs(this),vt++;var e=we;return we=this,wa.bind(this,e)},br.prototype.N=function(){2&this.f||(this.f|=2,this.o=gr,gr=this)},br.prototype.d=function(){this.f|=8,1&this.f||Pn(this)};function yr(e){var t=new br(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var Zs,Sn,Qs=[];yr(function(){Zs=this.N})();function Yt(e,t){mr[e]=t.bind(null,mr[e]||function(){})}function Br(e){Sn&&Sn(),Sn=e&&e.S()}function Xs(e){var t=this,r=e.data,n=Sa(r);n.value=r;var s=Ys(function(){for(var a=t,u=t.__v;u=u.__;)if(u.__c){u.__c.__$f|=4;break}var f=Ks(function(){var v=n.value.value;return v===0?0:v===!0?"":v||""}),h=Ks(function(){return!Array.isArray(f.value)&&!Ns(f.value)}),g=yr(function(){if(this.N=Js,h.value){var v=f.value;a.__v&&a.__v.__e&&a.__v.__e.nodeType===3&&(a.__v.__e.data=v)}}),x=t.__$u.d;return t.__$u.d=function(){g(),x.call(this)},[h,f]},[]),o=s[0],i=s[1];return o.value?i.peek():i.value}Xs.displayName="_st",Object.defineProperties(He.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Xs},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Yt("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var s in n)if(s!=="children"){var o=n[s];o instanceof He&&(r||(t.__np=r={}),r[s]=o,n[s]=o.peek())}}e(t)}),Yt("__r",function(e,t){Br();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(s){var o;return yr(function(){o=this}),o.c=function(){n.__$f|=1,n.setState({})},o}())),Br(r),e(t)}),Yt("__e",function(e,t,r,n){Br(),e(t,r,n)}),Yt("diffed",function(e,t){Br();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,s=t.props;if(n){var o=r.U;if(o)for(var i in o){var a=o[i];a!==void 0&&!(i in n)&&(a.d(),o[i]=void 0)}else o={},r.U=o;for(var u in n){var f=o[u],h=n[u];f===void 0?(f=Pa(r,u,h,s),o[u]=f):f.o(h,s)}}}e(t)});function Pa(e,t,r,n){var s=t in e&&e.ownerSVGElement===void 0,o=Bs(r);return{o:function(i,a){o.value=i,n=a},d:yr(function(){this.N=Js;var i=o.value.value;n[t]!==i&&(n[t]=i,s?e[t]=i:i?e.setAttribute(t,i):e.removeAttribute(t))})}}Yt("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var s in n){var o=n[s];o&&o.d()}}}}else{var i=t.__c;if(i){var a=i.__$u;a&&(i.__$u=void 0,a.d())}}e(t)}),Yt("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)});function Sa(e){return Ys(function(){return Bs(e)},[])}var Ta=function(e){queueMicrotask(function(){queueMicrotask(e)})};function Ea(){xa(function(){for(var e;e=Qs.shift();)Zs.call(e)})}function Js(){Qs.push(this)===1&&(mr.requestAnimationFrame||Ta)(Ea)}const _a=d.createContext(void 0),Ca=()=>d.useContext(_a),ka=({id:e,name:t,value:r,type:n,checked:s,readOnly:o,className:i})=>it.jsx("input",{id:e,name:t,value:r,type:n,checked:s,onChange:()=>{},readOnly:o,disabled:o,className:i}),Oa=({type:e,props:t,renderProps:r,signalName:n,onSignalRetrieved:s,children:o,className:i})=>{const a=Ca(),{id:u,name:f}=fa(()=>{const h=t;return{id:h.id,name:h.name}},[t]);return d.useEffect(()=>{a&&n&&a[n]&&s&&s(a[n])},[a]),it.jsxs(it.Fragment,{children:[u&&f&&e&&it.jsx(ka,{id:u,name:f,type:e,className:i,...t}),o&&o(r)]})},eo=d.createContext(void 0),to=()=>d.useContext(eo),Da=(e,t)=>{const{name:r,value:n,checked:s=!1,partial:o=!1,onChange:i,children:a,labelStyles:u,className:f}=e,h=to(),g=d.useId(),[x,v,T]=pa({checked:!1,partial:!1}),I=Ds(s),j=Ds(o),E={id:(h==null?void 0:h.sharedId)||e.id||g,...e,...x.value};d.useEffect(()=>{if(x.initial)v({checked:o?!0:s,partial:o});else{const y=I.changed?s:x.value.checked,F=j.changed?o:x.value.partial;v({checked:F?!0:y,partial:F})}},[s,o]);const D=y=>{var F;const k=((F=T.current)==null?void 0:F.value.partial)===!0?!0:y.target.checked;v({checked:k,partial:!1}),i==null||i({originalEvent:y,name:r||y.target.name,value:n,checked:k})},Q=y=>{var F;const k={checked:y?!0:((F=T.current)==null?void 0:F.value.checked)||!1,partial:y};v(k)},U=y=>{v({checked:y,partial:!1})};return d.useImperativeHandle(t,()=>({setPartiallyChecked:Q,setChecked:U})),it.jsx("label",{className:u,onChange:y=>D(y),children:it.jsx(Oa,{id:g,name:r,type:"checkbox",props:E,renderProps:x.value,className:f,children:a})})},Na=d.memo(d.forwardRef(Da)),Ia=({children:e})=>{const t=d.useId(),r=d.useMemo(()=>({sharedId:t}),[t]);return it.jsx(eo.Provider,{value:r,children:e})},ja=({label:e,htmlFor:t,className:r})=>{const n=to(),s=d.useMemo(()=>(n==null?void 0:n.sharedId)||t,[n==null?void 0:n.sharedId,t]);return it.jsx("label",{htmlFor:s,className:r,children:e})};var ro={exports:{}};/*!
|
|
63
|
+
<%s key={someKey} {...props} />`,It,We,rs,We),Or[We+It]=!0}}return a===n?sr(ce):nr(ce),ce}}function Xn(a,m,w){return Nr(a,m,w,!0)}function Jn(a,m,w){return Nr(a,m,w,!1)}var es=Jn,ts=Xn;Mr.Fragment=n,Mr.jsx=es,Mr.jsxs=ts}()),Mr}var ds;function Ai(){return ds||(ds=1,process.env.NODE_ENV==="production"?sn.exports=Ri():sn.exports=Li()),sn.exports}var lt=Ai();function Fi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $i=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[s]))return!1;for(s=n;s--!==0;){var i=o[s];if(!e(t[i],r[i]))return!1}return!0}return t!==t&&r!==r};const Hi=Fi($i),hs=e=>{const t=p.useRef();let r=!1;t.current!==void 0&&(r=!Hi(t.current,e));const n={changed:r,previousValue:t.current};return t.current=e,n},Yi=e=>typeof e=="function",Wi=e=>{const[t,r]=p.useState({value:e,initial:!0}),n=p.useRef(e);return[t,s=>{if(!Yi(s))r({value:s,initial:!1});else{const o=s(n.current);n.current=o,r({value:o,initial:!1})}}]},Vi=e=>{const[t,r]=Wi(e),n=p.useRef({value:e,initial:!0});return n.current!==t&&(n.current=t),[t,r,n]},ps=p.createContext(void 0),ms=()=>p.useContext(ps),Bi=({id:e,name:t,value:r,type:n,checked:s,readOnly:o,onChange:i})=>lt.jsx("input",{id:e,name:t,value:r,type:n,checked:s,onChange:i,readOnly:o,disabled:o,className:"bsh:appearance-none! bsh:absolute! bsh:left-[-1000px]!"});function Ui(e){const t=Object.keys(e),r={};for(let n=0,s=t.length;n<s;n++){const o=t[n];if(o){const i=e[o],c=o.replace(/([A-Z])/g,u=>`-${u.toLowerCase()}`);typeof i=="boolean"?i&&(r[`data-${c}`]=!0):r[`data-${c}`]=e[o]}}return r}const on=({wrapperElement:e,renderProps:t,elementProps:r,innerWrapperElement:n,className:s,children:o})=>{if(typeof o=="function")return n?lt.jsxs(lt.Fragment,{children:[n,o(t)]}):o(t);{const i=n?lt.jsxs(lt.Fragment,{children:[n,o]}):o;return p.createElement(e,Object.assign({},t?Ui(t):{},r,{className:s}),i)}},qi=(e,t)=>{const{name:r,value:n,checked:s=!1,partial:o=!1,readOnly:i,onChange:c,children:u,className:h}=e,f=ms(),v=p.useId(),P=p.useMemo(()=>(f==null?void 0:f.sharedId)||e.id||v,[(f==null?void 0:f.sharedId)||e.id||v]),[l,d,b]=Vi({checked:!1,partial:!1}),x=hs(s),y=hs(o);p.useEffect(()=>{if(l.initial)d({checked:o?!1:s,partial:o});else{const $=x.changed?s:l.value.checked,O=y.changed?o:l.value.partial;d({checked:O?!1:$,partial:O})}},[s,o]);const E=$=>{var O;const q=((O=b.current)==null?void 0:O.value.partial)===!0?!0:$.target.checked;d({checked:q,partial:!1}),c==null||c({originalEvent:$,name:r||$.target.name,value:n,checked:q})},V=$=>{var O;const q={checked:$?!1:((O=b.current)==null?void 0:O.value.checked)??!1,partial:$};d(q)},R=$=>{d({checked:$,partial:!1})};p.useImperativeHandle(t,()=>({setPartiallyChecked:V,setChecked:R}));const S=lt.jsx(Bi,{id:P,name:r,type:"checkbox",checked:l.value.checked,readOnly:i,onChange:E});return on({wrapperElement:"label",renderProps:{...l.value,readOnly:i},elementProps:{htmlFor:P},className:h,innerWrapperElement:S,children:u})},zi=p.memo(p.forwardRef(qi)),Ki=({className:e,children:t})=>{const r=p.useId(),n=p.useMemo(()=>({sharedId:r}),[r]),s=lt.jsx(ps.Provider,{value:n,children:t});return on({wrapperElement:"div",className:e,children:s})},Zi=({htmlFor:e,className:t,children:r})=>{const n=ms(),s=p.useMemo(()=>(n==null?void 0:n.sharedId)||e,[n==null?void 0:n.sharedId,e]);return on({wrapperElement:"label",elementProps:{htmlFor:s},className:t,children:r})};var lr,gs;lr={__e:function(e,t,r,n){for(var s,o,i;t=t.__;)if((s=t.__c)&&!s.__)try{if((o=s.constructor)&&o.getDerivedStateFromError!=null&&(s.setState(o.getDerivedStateFromError(e)),i=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(e,n||{}),i=s.__d),i)return s.__E=s}catch(c){e=c}throw e}},gs=function(e){return e!=null&&e.constructor==null},typeof Promise=="function"&&Promise.prototype.then.bind(Promise.resolve());var an,Ue,cn,bs,ys=0,vs=[],Me=lr,xs=Me.__b,ws=Me.__r,Ps=Me.diffed,Ts=Me.__c,Ss=Me.unmount,Es=Me.__;function Gi(e,t){Me.__h&&Me.__h(Ue,e,ys||t),ys=0;var r=Ue.__H||(Ue.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function _s(e,t){var r=Gi(an++,7);return Ji(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function Qi(){for(var e;e=vs.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Rr),e.__H.__h.forEach(un),e.__H.__h=[]}catch(t){e.__H.__h=[],Me.__e(t,e.__v)}}Me.__b=function(e){Ue=null,xs&&xs(e)},Me.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Es&&Es(e,t)},Me.__r=function(e){ws&&ws(e),an=0;var t=(Ue=e.__c).__H;t&&(cn===Ue?(t.__h=[],Ue.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.forEach(Rr),t.__h.forEach(un),t.__h=[],an=0)),cn=Ue},Me.diffed=function(e){Ps&&Ps(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(vs.push(t)!==1&&bs===Me.requestAnimationFrame||((bs=Me.requestAnimationFrame)||Xi)(Qi)),t.__H.__.forEach(function(r){r.u&&(r.__H=r.u),r.u=void 0})),cn=Ue=null},Me.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Rr),r.__h=r.__h.filter(function(n){return!n.__||un(n)})}catch(n){t.some(function(s){s.__h&&(s.__h=[])}),t=[],Me.__e(n,r.__v)}}),Ts&&Ts(e,t)},Me.unmount=function(e){Ss&&Ss(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Rr(n)}catch(s){t=s}}),r.__H=void 0,t&&Me.__e(t,r.__v))};var ks=typeof requestAnimationFrame=="function";function Xi(e){var t,r=function(){clearTimeout(n),ks&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);ks&&(t=requestAnimationFrame(r))}function Rr(e){var t=Ue,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),Ue=t}function un(e){var t=Ue;e.__c=e.__(),Ue=t}function Ji(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}var ea=Symbol.for("preact-signals");function Lr(){if(mt>1)mt--;else{for(var e,t=!1;fr!==void 0;){var r=fr;for(fr=void 0,ln++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&Os(r))try{r.c()}catch(s){t||(e=s,t=!0)}r=n}}if(ln=0,mt--,t)throw e}}function ta(e){if(mt>0)return e();mt++;try{return e()}finally{Lr()}}var xe=void 0,fr=void 0,mt=0,ln=0,Ar=0;function Cs(e){if(xe!==void 0){var t=e.n;if(t===void 0||t.t!==xe)return t={i:0,S:e,p:xe.s,n:void 0,t:xe,e:void 0,x:void 0,r:t},xe.s!==void 0&&(xe.s.n=t),xe.s=t,e.n=t,32&xe.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=xe.s,t.n=void 0,xe.s.n=t,xe.s=t),t}}function Ae(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}Ae.prototype.brand=ea,Ae.prototype.h=function(){return!0},Ae.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)},Ae.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}},Ae.prototype.subscribe=function(e){var t=this;return hr(function(){var r=t.value,n=xe;xe=void 0;try{e(r)}finally{xe=n}})},Ae.prototype.valueOf=function(){return this.value},Ae.prototype.toString=function(){return this.value+""},Ae.prototype.toJSON=function(){return this.value},Ae.prototype.peek=function(){var e=xe;xe=void 0;try{return this.value}finally{xe=e}},Object.defineProperty(Ae.prototype,"value",{get:function(){var e=Cs(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(ln>100)throw new Error("Cycle detected");this.v=e,this.i++,Ar++,mt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Lr()}}}});function Ds(e){return new Ae(e)}function Os(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Ns(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function js(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function Mt(e){Ae.call(this,void 0),this.x=e,this.s=void 0,this.g=Ar-1,this.f=4}(Mt.prototype=new Ae).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Ar))return!0;if(this.g=Ar,this.f|=1,this.i>0&&!Os(this))return this.f&=-2,!0;var e=xe;try{Ns(this),xe=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return xe=e,js(this),this.f&=-2,!0},Mt.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}Ae.prototype.S.call(this,e)},Mt.prototype.U=function(e){if(this.t!==void 0&&(Ae.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Mt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Mt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=Cs(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Is(e){return new Mt(e)}function Ms(e){var t=e.u;if(e.u=void 0,typeof t=="function"){mt++;var r=xe;xe=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,fn(e),n}finally{xe=r,Lr()}}}function fn(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Ms(e)}function ra(e){if(xe!==this)throw new Error("Out-of-order effect");js(this),xe=e,this.f&=-2,8&this.f&&fn(this),Lr()}function dr(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}dr.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},dr.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Ms(this),Ns(this),mt++;var e=xe;return xe=this,ra.bind(this,e)},dr.prototype.N=function(){2&this.f||(this.f|=2,this.o=fr,fr=this)},dr.prototype.d=function(){this.f|=8,1&this.f||fn(this)};function hr(e){var t=new dr(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var Rs,dn,Ls=[];hr(function(){Rs=this.N})();function Rt(e,t){lr[e]=t.bind(null,lr[e]||function(){})}function Fr(e){dn&&dn(),dn=e&&e.S()}function As(e){var t=this,r=e.data,n=sa(r);n.value=r;var s=_s(function(){for(var c=t,u=t.__v;u=u.__;)if(u.__c){u.__c.__$f|=4;break}var h=Is(function(){var l=n.value.value;return l===0?0:l===!0?"":l||""}),f=Is(function(){return!Array.isArray(h.value)&&!gs(h.value)}),v=hr(function(){if(this.N=Fs,f.value){var l=h.value;c.__v&&c.__v.__e&&c.__v.__e.nodeType===3&&(c.__v.__e.data=l)}}),P=t.__$u.d;return t.__$u.d=function(){v(),P.call(this)},[f,h]},[]),o=s[0],i=s[1];return o.value?i.peek():i.value}As.displayName="_st",Object.defineProperties(Ae.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:As},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Rt("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var s in n)if(s!=="children"){var o=n[s];o instanceof Ae&&(r||(t.__np=r={}),r[s]=o,n[s]=o.peek())}}e(t)}),Rt("__r",function(e,t){Fr();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(s){var o;return hr(function(){o=this}),o.c=function(){n.__$f|=1,n.setState({})},o}())),Fr(r),e(t)}),Rt("__e",function(e,t,r,n){Fr(),e(t,r,n)}),Rt("diffed",function(e,t){Fr();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,s=t.props;if(n){var o=r.U;if(o)for(var i in o){var c=o[i];c!==void 0&&!(i in n)&&(c.d(),o[i]=void 0)}else o={},r.U=o;for(var u in n){var h=o[u],f=n[u];h===void 0?(h=na(r,u,f,s),o[u]=h):h.o(f,s)}}}e(t)});function na(e,t,r,n){var s=t in e&&e.ownerSVGElement===void 0,o=Ds(r);return{o:function(i,c){o.value=i,n=c},d:hr(function(){this.N=Fs;var i=o.value.value;n[t]!==i&&(n[t]=i,s?e[t]=i:i?e.setAttribute(t,i):e.removeAttribute(t))})}}Rt("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var s in n){var o=n[s];o&&o.d()}}}}else{var i=t.__c;if(i){var c=i.__$u;c&&(i.__$u=void 0,c.d())}}e(t)}),Rt("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)});function sa(e){return _s(function(){return Ds(e)},[])}var oa=function(e){queueMicrotask(function(){queueMicrotask(e)})};function ia(){ta(function(){for(var e;e=Ls.shift();)Rs.call(e)})}function Fs(){Ls.push(this)===1&&(lr.requestAnimationFrame||oa)(ia)}p.createContext(void 0);var $s={exports:{}};/*!
|
|
66
64
|
Copyright (c) 2018 Jed Watson.
|
|
67
65
|
Licensed under the MIT License (MIT), see
|
|
68
66
|
http://jedwatson.github.io/classnames
|
|
69
|
-
*/var no;function Ma(){return no||(no=1,function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(o=s(o,n(a)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var a in o)t.call(o,a)&&o[a]&&(i=s(i,a));return i}function s(o,i){return i?o?o+" "+i:o+i:o}e.exports?(r.default=r,e.exports=r):window.classNames=r})()}(ro)),ro.exports}Ma();const Ra=({intersectionObserver:e,resizeObserver:t,page:r,height:n,children:s})=>{const o=d.useRef();d.useEffect(()=>()=>{o.current&&(e==null||e.unobserve(o.current),t==null||t.unobserve(o.current))},[]),d.useEffect(()=>(o.current&&(e==null||e.observe(o.current)),()=>{o.current&&e&&e.unobserve(o.current)}),[e]);const i=u=>{o.current&&(e==null||e.unobserve(o.current),t==null||t.unobserve(o.current)),e==null||e.observe(u),t==null||t.observe(u),o.current=u},a=n?{height:`${n}px`}:{};return it.jsx("div",{"data-page":r,"data-name":"page",style:a,ref:u=>u&&i(u),children:s})};d.memo(Ra);const Aa=({intersectionObserver:e,page:t})=>{const r=d.useRef();d.useEffect(()=>()=>{r.current&&(e==null||e.unobserve(r.current))},[]);const n=s=>{r.current&&(e==null||e.unobserve(r.current)),e==null||e.observe(s),r.current=s};return it.jsx("div",{"data-page":t,"data-name":"marker",ref:s=>s&&n(s)})};d.memo(Aa);const Tn=e=>{const[t,r]=d.useState(!0),n=ws();return d.useEffect(()=>{e!==void 0?r(e):n&&n.useAnimations!==void 0&&r(n.useAnimations)},[n,e]),t},pt=({label:e,htmlFor:t,readOnly:r=!1,className:n})=>{const s=pe("bc-label",{"bsc-text-black dark:bsc-text-mono-light-1":!r,"bc-read-only bsc-text-gray-4 dark:bsc-text-mono-light-3 bsc-pointer-events-none":r},n);return p.jsx(ja,{label:e,htmlFor:t,className:s})},La=(e,t)=>{const{name:r,label:n,value:s,readOnly:o=!1,checked:i=!1,partial:a=!1,labelLocation:u=qe.Right,className:f,useAnimation:h,onChange:g}=e,x=Tn(h),v=pe("bc-checkbox-wrapper bsc-flex bsc-items-center",{"bc-read-only bsc-pointer-events-none bsc-text-gray-2 dark:bsc-text-mono-light-3":o},f),T=pe("bc-checkbox-label bsc-cursor-pointer",{"bsc-ml-2":u===qe.Right,"bsc-mr-2":u===qe.Left}),I=$r(hr.FocusWithin),j=pe("bc-checkbox-outer bsc-relative bsc-rounded *:bsc-block *:bsc-size-[21px]",{"bsc-checkbox-animate":!o&&x,"bc-read-only bsc-checkbox-no-animate":o||!o&&!x},I),E=pe("bc-checkbox-inner bsc-relative bsc-m-0 bsc-cursor-pointer bsc-appearance-none bsc-rounded bsc-border-none bsc-bg-mono-light-1 bsc-p-0 bsc-outline-none dark:bsc-bg-mono-dark-1 dark:checked:bsc-bg-mono-light-1",{"[transition:box-shadow_0.3s]":x,"bsc-checkbox":!o,"bc-read-only bsc-checkbox-read-only":o}),D=pe("bc-checkbox-svg bsc-pointer-events-none bsc-absolute bsc-left-0 bsc-top-0 bsc-stroke-mono-light-1 bsc-stroke-2 [stroke-linecap:round] [stroke-linejoin:round] [transform:scale(0)_translateZ(0)] dark:bsc-stroke-mono-dark-3",{"bsc-fill-primary-1 dark:bsc-fill-mono-light-1":!o,"bc-read-only bsc-fill-primary-4 dark:bsc-fill-mono-light-3":o});return p.jsx(Ia,{children:p.jsxs("div",{className:v,children:[n&&u===qe.Left&&p.jsx(pt,{label:n,readOnly:o,className:T}),p.jsx(Na,{ref:t,name:r,value:s,checked:i,partial:a,readOnly:o,className:E,labelStyles:j,onChange:g,children:({partial:Q})=>p.jsx("svg",{viewBox:"0 0 21 21",className:D,children:Q?p.jsx("polyline",{points:"6 10.5 16 10.5"}):p.jsx("polyline",{points:"5 10.75 8.5 14.25 16 6"})})}),n&&u===qe.Right&&p.jsx(pt,{label:n,readOnly:o,className:T})]})})},so=d.memo(d.forwardRef(La)),Ur=e=>e==null?!1:typeof e=="object",oo=e=>e instanceof Date,io=e=>typeof e=="function",ao=e=>{const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t==="bigint"},En=e=>{if(!Ur(e))return e;const t={},r=Object.keys(e);for(let n=0,s=r.length;n<s;n++){const o=r[n],i=e[o];ao(i)||io(i)?t[o]=i:oo(i)?t[o]=new Date(i.getTime()):Array.isArray(i)?t[o]=_n(i):Ur(i)&&(t[o]=En(i))}return t},_n=e=>{let t=e.length;const r=new Array(t);for(;t--!==0;){const n=e[t];ao(n)||io(n)?r[t]=n:oo(n)?r[t]=new Date(n.getTime()):Ur(n)&&!Array.isArray(n)?r[t]=En(n):Array.isArray(n)?r[t]=_n(n):r[t]=n}return r},$a=e=>Ur(e)?Array.isArray(e)?_n(e):En(e):e;function Fa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ha=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[s]))return!1;for(s=n;s--!==0;){var i=o[s];if(!e(t[i],r[i]))return!1}return!0}return t!==t&&r!==r};const Ya=Fa(Ha);function Va(e,t){for(let r=e.length;r--!==0;)if(!Ya(e[r],t[r]))return!0;return!1}const Cn=(e,t)=>{const r=d.useRef([]),n=r.current.length>0&&r.current[0]&&Va(r.current[0],t);return(r.current.length===0||n)&&(r.current=[$a(t),e()]),r.current[1]},Wa=e=>{const[t,r]=d.useState(e),n=d.useRef(e);return n.current!==t&&(n.current=t),[t,r,n]},Ba=({name:e,label:t,value:r,data:n,textField:s,valueField:o,readOnly:i=!1,orientation:a=Ve.Vertical,className:u,onChange:f})=>{const[h,g]=d.useState([]),x=Cn(()=>n,[n]);d.useEffect(()=>{g(r??[])},[r]);const v=D=>{const{value:Q,checked:U}=D;let y;U?y=[...h,Q]:y=h.filter(F=>F!==Q),g(y),f==null||f({name:e,value:y})},T=(D,Q)=>p.jsx(so,{name:e,label:D[s],value:D[o],checked:h.some(U=>U===D[o]),readOnly:i,onChange:U=>U&&v(U),className:"bsc-mr-3"},`${e}_checkbox_${Q}`),I=pe("bsc-flex bsc-flex-col bsc-gap-1",u),j=pe("bsc-flex bsc-gap-1",{"bsc-flex-col":a===Ve.Vertical}),E=D=>p.jsx("div",{className:j,children:D.map(T)});return p.jsxs("div",{className:I,children:[t&&p.jsx(pt,{label:t,readOnly:i}),x&&E(x)]})},Ua=d.memo(Ba);var za=typeof global=="object"&&global&&global.Object===Object&&global;const co=za;var qa=typeof self=="object"&&self&&self.Object===Object&&self,Ka=co||qa||Function("return this")();const et=Ka;var Ga=et.Symbol;const Vt=Ga;var uo=Object.prototype,Za=uo.hasOwnProperty,Qa=uo.toString,vr=Vt?Vt.toStringTag:void 0;function Xa(e){var t=Za.call(e,vr),r=e[vr];try{e[vr]=void 0;var n=!0}catch{}var s=Qa.call(e);return n&&(t?e[vr]=r:delete e[vr]),s}var Ja=Object.prototype,ec=Ja.toString;function tc(e){return ec.call(e)}var rc="[object Null]",nc="[object Undefined]",lo=Vt?Vt.toStringTag:void 0;function Wt(e){return e==null?e===void 0?nc:rc:lo&&lo in Object(e)?Xa(e):tc(e)}function Bt(e){return e!=null&&typeof e=="object"}var sc="[object Symbol]";function oc(e){return typeof e=="symbol"||Bt(e)&&Wt(e)==sc}var ic=Array.isArray;const kn=ic;var ac=/\s/;function cc(e){for(var t=e.length;t--&&ac.test(e.charAt(t)););return t}var uc=/^\s+/;function lc(e){return e&&e.slice(0,cc(e)+1).replace(uc,"")}function mt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var fo=0/0,fc=/^[-+]0x[0-9a-f]+$/i,dc=/^0b[01]+$/i,hc=/^0o[0-7]+$/i,pc=parseInt;function ho(e){if(typeof e=="number")return e;if(oc(e))return fo;if(mt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=mt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=lc(e);var r=dc.test(e);return r||hc.test(e)?pc(e.slice(2),r?2:8):fc.test(e)?fo:+e}var mc="[object AsyncFunction]",gc="[object Function]",bc="[object GeneratorFunction]",yc="[object Proxy]";function po(e){if(!mt(e))return!1;var t=Wt(e);return t==gc||t==bc||t==mc||t==yc}var vc=et["__core-js_shared__"];const On=vc;var mo=function(){var e=/[^.]+$/.exec(On&&On.keys&&On.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function xc(e){return!!mo&&mo in e}var wc=Function.prototype,Pc=wc.toString;function Tt(e){if(e!=null){try{return Pc.call(e)}catch{}try{return e+""}catch{}}return""}var Sc=/[\\^$.*+?()[\]{}|]/g,Tc=/^\[object .+?Constructor\]$/,Ec=Function.prototype,_c=Object.prototype,Cc=Ec.toString,kc=_c.hasOwnProperty,Oc=RegExp("^"+Cc.call(kc).replace(Sc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Dc(e){if(!mt(e)||xc(e))return!1;var t=po(e)?Oc:Tc;return t.test(Tt(e))}function Nc(e,t){return e==null?void 0:e[t]}function Et(e,t){var r=Nc(e,t);return Dc(r)?r:void 0}var Ic=Et(et,"WeakMap");const Dn=Ic;var go=Object.create,jc=function(){function e(){}return function(t){if(!mt(t))return{};if(go)return go(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();const Mc=jc;function Rc(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var Ac=function(){try{var e=Et(Object,"defineProperty");return e({},"",{}),e}catch{}}();const bo=Ac;function Lc(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var $c=9007199254740991,Fc=/^(?:0|[1-9]\d*)$/;function Hc(e,t){var r=typeof e;return t=t??$c,!!t&&(r=="number"||r!="symbol"&&Fc.test(e))&&e>-1&&e%1==0&&e<t}function yo(e,t,r){t=="__proto__"&&bo?bo(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function vo(e,t){return e===t||e!==e&&t!==t}var Yc=Object.prototype,Vc=Yc.hasOwnProperty;function xo(e,t,r){var n=e[t];(!(Vc.call(e,t)&&vo(n,r))||r===void 0&&!(t in e))&&yo(e,t,r)}function zr(e,t,r,n){var s=!r;r||(r={});for(var o=-1,i=t.length;++o<i;){var a=t[o],u=n?n(r[a],e[a],a,r,e):void 0;u===void 0&&(u=e[a]),s?yo(r,a,u):xo(r,a,u)}return r}var Wc=9007199254740991;function wo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Wc}function Po(e){return e!=null&&wo(e.length)&&!po(e)}var Bc=Object.prototype;function Nn(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Bc;return e===r}function Uc(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var zc="[object Arguments]";function So(e){return Bt(e)&&Wt(e)==zc}var To=Object.prototype,qc=To.hasOwnProperty,Kc=To.propertyIsEnumerable,Gc=So(function(){return arguments}())?So:function(e){return Bt(e)&&qc.call(e,"callee")&&!Kc.call(e,"callee")};const Zc=Gc;function Qc(){return!1}var Eo=typeof se=="object"&&se&&!se.nodeType&&se,_o=Eo&&typeof module=="object"&&module&&!module.nodeType&&module,Xc=_o&&_o.exports===Eo,Co=Xc?et.Buffer:void 0,Jc=Co?Co.isBuffer:void 0,eu=Jc||Qc;const ko=eu;var tu="[object Arguments]",ru="[object Array]",nu="[object Boolean]",su="[object Date]",ou="[object Error]",iu="[object Function]",au="[object Map]",cu="[object Number]",uu="[object Object]",lu="[object RegExp]",fu="[object Set]",du="[object String]",hu="[object WeakMap]",pu="[object ArrayBuffer]",mu="[object DataView]",gu="[object Float32Array]",bu="[object Float64Array]",yu="[object Int8Array]",vu="[object Int16Array]",xu="[object Int32Array]",wu="[object Uint8Array]",Pu="[object Uint8ClampedArray]",Su="[object Uint16Array]",Tu="[object Uint32Array]",Ee={};Ee[gu]=Ee[bu]=Ee[yu]=Ee[vu]=Ee[xu]=Ee[wu]=Ee[Pu]=Ee[Su]=Ee[Tu]=!0,Ee[tu]=Ee[ru]=Ee[pu]=Ee[nu]=Ee[mu]=Ee[su]=Ee[ou]=Ee[iu]=Ee[au]=Ee[cu]=Ee[uu]=Ee[lu]=Ee[fu]=Ee[du]=Ee[hu]=!1;function Eu(e){return Bt(e)&&wo(e.length)&&!!Ee[Wt(e)]}function In(e){return function(t){return e(t)}}var Oo=typeof se=="object"&&se&&!se.nodeType&&se,xr=Oo&&typeof module=="object"&&module&&!module.nodeType&&module,_u=xr&&xr.exports===Oo,jn=_u&&co.process,Cu=function(){try{var e=xr&&xr.require&&xr.require("util").types;return e||jn&&jn.binding&&jn.binding("util")}catch{}}();const Ut=Cu;var Do=Ut&&Ut.isTypedArray,ku=Do?In(Do):Eu;const Ou=ku;var Du=Object.prototype,Nu=Du.hasOwnProperty;function No(e,t){var r=kn(e),n=!r&&Zc(e),s=!r&&!n&&ko(e),o=!r&&!n&&!s&&Ou(e),i=r||n||s||o,a=i?Uc(e.length,String):[],u=a.length;for(var f in e)(t||Nu.call(e,f))&&!(i&&(f=="length"||s&&(f=="offset"||f=="parent")||o&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||Hc(f,u)))&&a.push(f);return a}function Io(e,t){return function(r){return e(t(r))}}var Iu=Io(Object.keys,Object);const ju=Iu;var Mu=Object.prototype,Ru=Mu.hasOwnProperty;function Au(e){if(!Nn(e))return ju(e);var t=[];for(var r in Object(e))Ru.call(e,r)&&r!="constructor"&&t.push(r);return t}function Mn(e){return Po(e)?No(e):Au(e)}function Lu(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var $u=Object.prototype,Fu=$u.hasOwnProperty;function Hu(e){if(!mt(e))return Lu(e);var t=Nn(e),r=[];for(var n in e)n=="constructor"&&(t||!Fu.call(e,n))||r.push(n);return r}function Rn(e){return Po(e)?No(e,!0):Hu(e)}var Yu=Et(Object,"create");const wr=Yu;function Vu(){this.__data__=wr?wr(null):{},this.size=0}function Wu(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Bu="__lodash_hash_undefined__",Uu=Object.prototype,zu=Uu.hasOwnProperty;function qu(e){var t=this.__data__;if(wr){var r=t[e];return r===Bu?void 0:r}return zu.call(t,e)?t[e]:void 0}var Ku=Object.prototype,Gu=Ku.hasOwnProperty;function Zu(e){var t=this.__data__;return wr?t[e]!==void 0:Gu.call(t,e)}var Qu="__lodash_hash_undefined__";function Xu(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=wr&&t===void 0?Qu:t,this}function _t(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])}}_t.prototype.clear=Vu,_t.prototype.delete=Wu,_t.prototype.get=qu,_t.prototype.has=Zu,_t.prototype.set=Xu;function Ju(){this.__data__=[],this.size=0}function qr(e,t){for(var r=e.length;r--;)if(vo(e[r][0],t))return r;return-1}var el=Array.prototype,tl=el.splice;function rl(e){var t=this.__data__,r=qr(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():tl.call(t,r,1),--this.size,!0}function nl(e){var t=this.__data__,r=qr(t,e);return r<0?void 0:t[r][1]}function sl(e){return qr(this.__data__,e)>-1}function ol(e,t){var r=this.__data__,n=qr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function gt(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])}}gt.prototype.clear=Ju,gt.prototype.delete=rl,gt.prototype.get=nl,gt.prototype.has=sl,gt.prototype.set=ol;var il=Et(et,"Map");const Pr=il;function al(){this.size=0,this.__data__={hash:new _t,map:new(Pr||gt),string:new _t}}function cl(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Kr(e,t){var r=e.__data__;return cl(t)?r[typeof t=="string"?"string":"hash"]:r.map}function ul(e){var t=Kr(this,e).delete(e);return this.size-=t?1:0,t}function ll(e){return Kr(this,e).get(e)}function fl(e){return Kr(this,e).has(e)}function dl(e,t){var r=Kr(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function zt(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])}}zt.prototype.clear=al,zt.prototype.delete=ul,zt.prototype.get=ll,zt.prototype.has=fl,zt.prototype.set=dl;function jo(e,t){for(var r=-1,n=t.length,s=e.length;++r<n;)e[s+r]=t[r];return e}var hl=Io(Object.getPrototypeOf,Object);const Mo=hl;function pl(){this.__data__=new gt,this.size=0}function ml(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function gl(e){return this.__data__.get(e)}function bl(e){return this.__data__.has(e)}var yl=200;function vl(e,t){var r=this.__data__;if(r instanceof gt){var n=r.__data__;if(!Pr||n.length<yl-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new zt(n)}return r.set(e,t),this.size=r.size,this}function qt(e){var t=this.__data__=new gt(e);this.size=t.size}qt.prototype.clear=pl,qt.prototype.delete=ml,qt.prototype.get=gl,qt.prototype.has=bl,qt.prototype.set=vl;function xl(e,t){return e&&zr(t,Mn(t),e)}function wl(e,t){return e&&zr(t,Rn(t),e)}var Ro=typeof se=="object"&&se&&!se.nodeType&&se,Ao=Ro&&typeof module=="object"&&module&&!module.nodeType&&module,Pl=Ao&&Ao.exports===Ro,Lo=Pl?et.Buffer:void 0,$o=Lo?Lo.allocUnsafe:void 0;function Sl(e,t){if(t)return e.slice();var r=e.length,n=$o?$o(r):new e.constructor(r);return e.copy(n),n}function Tl(e,t){for(var r=-1,n=e==null?0:e.length,s=0,o=[];++r<n;){var i=e[r];t(i,r,e)&&(o[s++]=i)}return o}function Fo(){return[]}var El=Object.prototype,_l=El.propertyIsEnumerable,Ho=Object.getOwnPropertySymbols,Cl=Ho?function(e){return e==null?[]:(e=Object(e),Tl(Ho(e),function(t){return _l.call(e,t)}))}:Fo;const An=Cl;function kl(e,t){return zr(e,An(e),t)}var Ol=Object.getOwnPropertySymbols,Dl=Ol?function(e){for(var t=[];e;)jo(t,An(e)),e=Mo(e);return t}:Fo;const Yo=Dl;function Nl(e,t){return zr(e,Yo(e),t)}function Vo(e,t,r){var n=t(e);return kn(e)?n:jo(n,r(e))}function Il(e){return Vo(e,Mn,An)}function jl(e){return Vo(e,Rn,Yo)}var Ml=Et(et,"DataView");const Ln=Ml;var Rl=Et(et,"Promise");const $n=Rl;var Al=Et(et,"Set");const Fn=Al;var Wo="[object Map]",Ll="[object Object]",Bo="[object Promise]",Uo="[object Set]",zo="[object WeakMap]",qo="[object DataView]",$l=Tt(Ln),Fl=Tt(Pr),Hl=Tt($n),Yl=Tt(Fn),Vl=Tt(Dn),Ct=Wt;(Ln&&Ct(new Ln(new ArrayBuffer(1)))!=qo||Pr&&Ct(new Pr)!=Wo||$n&&Ct($n.resolve())!=Bo||Fn&&Ct(new Fn)!=Uo||Dn&&Ct(new Dn)!=zo)&&(Ct=function(e){var t=Wt(e),r=t==Ll?e.constructor:void 0,n=r?Tt(r):"";if(n)switch(n){case $l:return qo;case Fl:return Wo;case Hl:return Bo;case Yl:return Uo;case Vl:return zo}return t});const Hn=Ct;var Wl=Object.prototype,Bl=Wl.hasOwnProperty;function Ul(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Bl.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var zl=et.Uint8Array;const Ko=zl;function Yn(e){var t=new e.constructor(e.byteLength);return new Ko(t).set(new Ko(e)),t}function ql(e,t){var r=t?Yn(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Kl=/\w*$/;function Gl(e){var t=new e.constructor(e.source,Kl.exec(e));return t.lastIndex=e.lastIndex,t}var Go=Vt?Vt.prototype:void 0,Zo=Go?Go.valueOf:void 0;function Zl(e){return Zo?Object(Zo.call(e)):{}}function Ql(e,t){var r=t?Yn(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Xl="[object Boolean]",Jl="[object Date]",ef="[object Map]",tf="[object Number]",rf="[object RegExp]",nf="[object Set]",sf="[object String]",of="[object Symbol]",af="[object ArrayBuffer]",cf="[object DataView]",uf="[object Float32Array]",lf="[object Float64Array]",ff="[object Int8Array]",df="[object Int16Array]",hf="[object Int32Array]",pf="[object Uint8Array]",mf="[object Uint8ClampedArray]",gf="[object Uint16Array]",bf="[object Uint32Array]";function yf(e,t,r){var n=e.constructor;switch(t){case af:return Yn(e);case Xl:case Jl:return new n(+e);case cf:return ql(e,r);case uf:case lf:case ff:case df:case hf:case pf:case mf:case gf:case bf:return Ql(e,r);case ef:return new n;case tf:case sf:return new n(e);case rf:return Gl(e);case nf:return new n;case of:return Zl(e)}}function vf(e){return typeof e.constructor=="function"&&!Nn(e)?Mc(Mo(e)):{}}var xf="[object Map]";function wf(e){return Bt(e)&&Hn(e)==xf}var Qo=Ut&&Ut.isMap,Pf=Qo?In(Qo):wf;const Sf=Pf;var Tf="[object Set]";function Ef(e){return Bt(e)&&Hn(e)==Tf}var Xo=Ut&&Ut.isSet,_f=Xo?In(Xo):Ef;const Cf=_f;var kf=1,Of=2,Df=4,Jo="[object Arguments]",Nf="[object Array]",If="[object Boolean]",jf="[object Date]",Mf="[object Error]",ei="[object Function]",Rf="[object GeneratorFunction]",Af="[object Map]",Lf="[object Number]",ti="[object Object]",$f="[object RegExp]",Ff="[object Set]",Hf="[object String]",Yf="[object Symbol]",Vf="[object WeakMap]",Wf="[object ArrayBuffer]",Bf="[object DataView]",Uf="[object Float32Array]",zf="[object Float64Array]",qf="[object Int8Array]",Kf="[object Int16Array]",Gf="[object Int32Array]",Zf="[object Uint8Array]",Qf="[object Uint8ClampedArray]",Xf="[object Uint16Array]",Jf="[object Uint32Array]",Se={};Se[Jo]=Se[Nf]=Se[Wf]=Se[Bf]=Se[If]=Se[jf]=Se[Uf]=Se[zf]=Se[qf]=Se[Kf]=Se[Gf]=Se[Af]=Se[Lf]=Se[ti]=Se[$f]=Se[Ff]=Se[Hf]=Se[Yf]=Se[Zf]=Se[Qf]=Se[Xf]=Se[Jf]=!0,Se[Mf]=Se[ei]=Se[Vf]=!1;function Gr(e,t,r,n,s,o){var i,a=t&kf,u=t&Of,f=t&Df;if(r&&(i=s?r(e,n,s,o):r(e)),i!==void 0)return i;if(!mt(e))return e;var h=kn(e);if(h){if(i=Ul(e),!a)return Rc(e,i)}else{var g=Hn(e),x=g==ei||g==Rf;if(ko(e))return Sl(e,a);if(g==ti||g==Jo||x&&!s){if(i=u||x?{}:vf(e),!a)return u?Nl(e,wl(i,e)):kl(e,xl(i,e))}else{if(!Se[g])return s?e:{};i=yf(e,g,a)}}o||(o=new qt);var v=o.get(e);if(v)return v;o.set(e,i),Cf(e)?e.forEach(function(j){i.add(Gr(j,t,r,j,e,o))}):Sf(e)&&e.forEach(function(j,E){i.set(E,Gr(j,t,r,E,e,o))});var T=f?u?jl:Il:u?Rn:Mn,I=h?void 0:T(e);return Lc(I||e,function(j,E){I&&(E=j,j=e[E]),xo(i,E,Gr(j,t,r,E,e,o))}),i}var ed=1,td=4;function rd(e){return Gr(e,ed|td)}var nd=function(){return et.Date.now()};const Vn=nd;var sd="Expected a function",od=Math.max,id=Math.min;function Sr(e,t,r){var n,s,o,i,a,u,f=0,h=!1,g=!1,x=!0;if(typeof e!="function")throw new TypeError(sd);t=ho(t)||0,mt(r)&&(h=!!r.leading,g="maxWait"in r,o=g?od(ho(r.maxWait)||0,t):o,x="trailing"in r?!!r.trailing:x);function v(F){var k=n,q=s;return n=s=void 0,f=F,i=e.apply(q,k),i}function T(F){return f=F,a=setTimeout(E,t),h?v(F):i}function I(F){var k=F-u,q=F-f,z=t-k;return g?id(z,o-q):z}function j(F){var k=F-u,q=F-f;return u===void 0||k>=t||k<0||g&&q>=o}function E(){var F=Vn();if(j(F))return D(F);a=setTimeout(E,I(F))}function D(F){return a=void 0,x&&n?v(F):(n=s=void 0,i)}function Q(){a!==void 0&&clearTimeout(a),f=0,n=u=s=a=void 0}function U(){return a===void 0?i:D(Vn())}function y(){var F=Vn(),k=j(F);if(n=arguments,s=this,u=F,k){if(a===void 0)return T(u);if(g)return clearTimeout(a),a=setTimeout(E,t),v(u)}return a===void 0&&(a=setTimeout(E,t)),i}return y.cancel=Q,y.flush=U,y}var ad="Expected a function";function cd(e,t,r){var n=!0,s=!0;if(typeof e!="function")throw new TypeError(ad);return mt(r)&&(n="leading"in r?!!r.leading:n,s="trailing"in r?!!r.trailing:s),Sr(e,t,{leading:n,maxWait:t,trailing:s})}const ud=(e,t)=>{const{value:r,readOnly:n=!1,debounceTime:s=800,fillContainer:o=!0,leftElement:i,rightElement:a,className:u,leftElementClassName:f,rightElementClassName:h,isSingleLine:g=!0,allowSingleLineScroll:x=!1,inputMode:v,placeholder:T,onFocus:I,onBlur:j,onInput:E,onInnerTextChange:D,onInnerHTMLChange:Q,onElementCreate:U,onLeftElementClick:y,onRightElementClick:F}=e,k=d.useRef("bsc-flex-grow focus:bsc-outline-none"),q=d.useRef("bsc-text-gray-4"),z=d.useRef(),oe=d.useCallback(P=>{const V=P.target,X=V.innerHTML;V.className=`${k.current}`,T&&X===T&&(V.innerHTML=""),I==null||I(P)},[T,I]),ce=d.useCallback(P=>{const V=P.target.innerHTML;if(T&&V===""){const X=P.target;X.innerHTML=T,X.className=`${k.current} ${q.current}`}j==null||j(P)},[T,j]),ne=d.useCallback(P=>{var V,X;(V=z.current)==null||V.removeEventListener("focus",oe),(X=z.current)==null||X.removeEventListener("blur",ce),T&&P&&P!==document.activeElement&&P.innerHTML===""&&(P.innerHTML=T,P.className=`${k.current} ${q.current}`),P.addEventListener("focus",oe),P.addEventListener("blur",ce),z.current=P},[T]),M=d.useCallback(P=>{U==null||U(P)},[U]),H=P=>{y==null||y(P)},L=P=>{F==null||F(P)},O=Sr(P=>{E==null||E(P),D==null||D(P.target.innerText),Q==null||Q(P.target.innerHTML)},s),J=d.useCallback(P=>{z.current&&(z.current.innerText=P)},[]),R=d.useCallback(P=>{z.current&&(z.current.innerHTML=P)},[]),ge=d.useCallback(()=>{var P;(P=z.current)==null||P.focus()},[]);d.useImperativeHandle(t,()=>({inputElement:z.current,setInnerText:J,setInnerHTML:R,focus:ge}));const S=pe({"bsc-w-full ":o},"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":g&&x,"bsc-overflow-hidden bsc-whitespace-pre":g&&!x},u),N=pe("bsc-flex-shrink",{"bsc-mr-2":i},f),C=pe("bsc-flex-shrink",{"bsc-ml-2":a},h);return p.jsxs("div",{className:S,ref:P=>P&&M(P),children:[i&&p.jsx("div",{className:N,onClick:H,children:i}),p.jsx("div",{ref:P=>P&&ne(P),className:k.current,contentEditable:!n,suppressContentEditableWarning:!0,inputMode:v,onInput:O,children:r}),a&&p.jsx("div",{className:C,onClick:L,children:a})]})},Zr=d.forwardRef(ud);function be(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Te(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Kt(e,t){const r=be(e);return isNaN(t)?Te(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function xt(e,t){const r=be(e);if(isNaN(t))return Te(e,NaN);if(!t)return r;const n=r.getDate(),s=Te(e,r.getTime());s.setMonth(r.getMonth()+t+1,0);const o=s.getDate();return n>=o?s:(r.setFullYear(s.getFullYear(),s.getMonth(),n),r)}const ri=6048e5,Wn=6e4,Bn=36e5,ld=1e3;let fd={};function Tr(){return fd}function wt(e,t){var a,u,f,h;const r=Tr(),n=(t==null?void 0:t.weekStartsOn)??((u=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:u.weekStartsOn)??r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,s=be(e),o=s.getDay(),i=(o<n?7:0)+o-n;return s.setDate(s.getDate()-i),s.setHours(0,0,0,0),s}function Gt(e){return wt(e,{weekStartsOn:1})}function dd(e){const t=be(e),r=t.getFullYear(),n=Te(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const s=Gt(n),o=Te(e,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const i=Gt(o);return t.getTime()>=s.getTime()?r+1:t.getTime()>=i.getTime()?r:r-1}function ni(e){const t=be(e);return t.setHours(0,0,0,0),t}function si(e){const t=be(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function hd(e){const t=dd(e),r=Te(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),Gt(r)}function Er(e,t){return xt(e,t*12)}function oi(e,t){const r=ni(e),n=ni(t);return+r==+n}function pd(e){const t=be(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function md(e,t){const r=be(e.start),n=be(e.end);let s=+r>+n;const o=s?+r:+n,i=s?n:r;i.setHours(0,0,0,0);let a=(t==null?void 0:t.step)??1;if(!a)return[];a<0&&(a=-a,s=!s);const u=[];for(;+i<=o;)u.push(be(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return s?u.reverse():u}function ii(e){const t=be(e);return t.setDate(1),t.setHours(0,0,0,0),t}function gd(e,t){const r=be(e.start),n=be(e.end);let s=+r>+n;const o=s?+r:+n,i=s?n:r;i.setHours(0,0,0,0),i.setMonth(0,1);let a=(t==null?void 0:t.step)??1;if(!a)return[];a<0&&(a=-a,s=!s);const u=[];for(;+i<=o;)u.push(be(i)),i.setFullYear(i.getFullYear()+a);return s?u.reverse():u}const bd={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"}},yd=(e,t,r)=>{let n;const s=bd[e];return typeof s=="string"?n=s:t===1?n=s.one:n=s.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function Un(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const vd={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},xd={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},wd={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Pd={date:Un({formats:vd,defaultWidth:"full"}),time:Un({formats:xd,defaultWidth:"full"}),dateTime:Un({formats:wd,defaultWidth:"full"})},Sd={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Td=(e,t,r,n)=>Sd[e];function _r(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let s;if(n==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=r!=null&&r.width?String(r.width):i;s=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=r!=null&&r.width?String(r.width):e.defaultWidth;s=e.values[a]||e.values[i]}const o=e.argumentCallback?e.argumentCallback(t):t;return s[o]}}const Ed={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},_d={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Cd={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"]},kd={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"]},Od={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"}},Dd={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"}},Nd={ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:_r({values:Ed,defaultWidth:"wide"}),quarter:_r({values:_d,defaultWidth:"wide",argumentCallback:e=>e-1}),month:_r({values:Cd,defaultWidth:"wide"}),day:_r({values:kd,defaultWidth:"wide"}),dayPeriod:_r({values:Od,defaultWidth:"wide",formattingValues:Dd,defaultFormattingWidth:"wide"})};function Cr(e){return(t,r={})=>{const n=r.width,s=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(s);if(!o)return null;const i=o[0],a=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(a)?jd(a,g=>g.test(i)):Id(a,g=>g.test(i));let f;f=e.valueCallback?e.valueCallback(u):u,f=r.valueCallback?r.valueCallback(f):f;const h=t.slice(i.length);return{value:f,rest:h}}}function Id(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function jd(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function Md(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const s=n[0],o=t.match(e.parsePattern);if(!o)return null;let i=e.valueCallback?e.valueCallback(o[0]):o[0];i=r.valueCallback?r.valueCallback(i):i;const a=t.slice(s.length);return{value:i,rest:a}}}const Rd=/^(\d+)(th|st|nd|rd)?/i,Ad=/\d+/i,Ld={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},$d={any:[/^b/i,/^(a|c)/i]},Fd={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Hd={any:[/1/i,/2/i,/3/i,/4/i]},Yd={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},Vd={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]},Wd={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},Bd={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]},Ud={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},zd={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}},qd={ordinalNumber:Md({matchPattern:Rd,parsePattern:Ad,valueCallback:e=>parseInt(e,10)}),era:Cr({matchPatterns:Ld,defaultMatchWidth:"wide",parsePatterns:$d,defaultParseWidth:"any"}),quarter:Cr({matchPatterns:Fd,defaultMatchWidth:"wide",parsePatterns:Hd,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Cr({matchPatterns:Yd,defaultMatchWidth:"wide",parsePatterns:Vd,defaultParseWidth:"any"}),day:Cr({matchPatterns:Wd,defaultMatchWidth:"wide",parsePatterns:Bd,defaultParseWidth:"any"}),dayPeriod:Cr({matchPatterns:Ud,defaultMatchWidth:"any",parsePatterns:zd,defaultParseWidth:"any"})},Kd={code:"en-US",formatDistance:yd,formatLong:Pd,formatRelative:Td,localize:Nd,match:qd,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Gd(e){const t=be(e),r=+Gt(t)-+hd(t);return Math.round(r/ri)+1}function ai(e,t){var h,g,x,v;const r=be(e),n=r.getFullYear(),s=Tr(),o=(t==null?void 0:t.firstWeekContainsDate)??((g=(h=t==null?void 0:t.locale)==null?void 0:h.options)==null?void 0:g.firstWeekContainsDate)??s.firstWeekContainsDate??((v=(x=s.locale)==null?void 0:x.options)==null?void 0:v.firstWeekContainsDate)??1,i=Te(e,0);i.setFullYear(n+1,0,o),i.setHours(0,0,0,0);const a=wt(i,t),u=Te(e,0);u.setFullYear(n,0,o),u.setHours(0,0,0,0);const f=wt(u,t);return r.getTime()>=a.getTime()?n+1:r.getTime()>=f.getTime()?n:n-1}function Zd(e,t){var a,u,f,h;const r=Tr(),n=(t==null?void 0:t.firstWeekContainsDate)??((u=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:u.firstWeekContainsDate)??r.firstWeekContainsDate??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,s=ai(e,t),o=Te(e,0);return o.setFullYear(s,0,n),o.setHours(0,0,0,0),wt(o,t)}function Qd(e,t){const r=be(e),n=+wt(r,t)-+Zd(r,t);return Math.round(n/ri)+1}const ci=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},ui=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},li={p:ui,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],s=r[2];if(!s)return ci(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",ci(n,t)).replace("{{time}}",ui(s,t))}},Xd=/^D+$/,Jd=/^Y+$/,eh=["D","DD","YY","YYYY"];function th(e){return Xd.test(e)}function rh(e){return Jd.test(e)}function fi(e,t,r){const n=nh(e,t,r);if(console.warn(n),eh.includes(e))throw new RangeError(n)}function nh(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function zn(e){return be(e).getDay()}function di(e){const t=be(e),r=t.getFullYear(),n=t.getMonth(),s=Te(e,0);return s.setFullYear(r,n+1,0),s.setHours(0,0,0,0),s.getDate()}function sh(){return Object.assign({},Tr())}function oh(e){let r=be(e).getDay();return r===0&&(r=7),r}function ih(e){const t=be(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(0,0,0,0),t}function ah(e,t){const r=be(e),n=be(t);return+r<+n}function ch(e,t){const r=t instanceof Date?Te(t,0):new t(0);return r.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),r.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),r}const uh=10;class hi{constructor(){b(this,"subPriority",0)}validate(t,r){return!0}}class lh extends hi{constructor(t,r,n,s,o){super(),this.value=t,this.validateValue=r,this.setValue=n,this.priority=s,o&&(this.subPriority=o)}validate(t,r){return this.validateValue(t,this.value,r)}set(t,r,n){return this.setValue(t,r,this.value,n)}}class fh extends hi{constructor(){super(...arguments);b(this,"priority",uh);b(this,"subPriority",-1)}set(r,n){return n.timestampIsSet?r:Te(r,ch(r,Date))}}class ye{run(t,r,n,s){const o=this.parse(t,r,n,s);return o?{setter:new lh(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(t,r,n){return!0}}class dh extends ye{constructor(){super(...arguments);b(this,"priority",140);b(this,"incompatibleTokens",["R","u","t","T"])}parse(r,n,s){switch(n){case"G":case"GG":case"GGG":return s.era(r,{width:"abbreviated"})||s.era(r,{width:"narrow"});case"GGGGG":return s.era(r,{width:"narrow"});case"GGGG":default:return s.era(r,{width:"wide"})||s.era(r,{width:"abbreviated"})||s.era(r,{width:"narrow"})}}set(r,n,s){return n.era=s,r.setFullYear(s,0,1),r.setHours(0,0,0,0),r}}const 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}/},at={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 je(e,t){return e&&{value:t(e.value),rest:e.rest}}function Ce(e,t){const r=t.match(e);return r?{value:parseInt(r[0],10),rest:t.slice(r[0].length)}:null}function ct(e,t){const r=t.match(e);if(!r)return null;if(r[0]==="Z")return{value:0,rest:t.slice(1)};const n=r[1]==="+"?1:-1,s=r[2]?parseInt(r[2],10):0,o=r[3]?parseInt(r[3],10):0,i=r[5]?parseInt(r[5],10):0;return{value:n*(s*Bn+o*Wn+i*ld),rest:t.slice(r[0].length)}}function pi(e){return Ce(Ie.anyDigitsSigned,e)}function ke(e,t){switch(e){case 1:return Ce(Ie.singleDigit,t);case 2:return Ce(Ie.twoDigits,t);case 3:return Ce(Ie.threeDigits,t);case 4:return Ce(Ie.fourDigits,t);default:return Ce(new RegExp("^\\d{1,"+e+"}"),t)}}function Qr(e,t){switch(e){case 1:return Ce(Ie.singleDigitSigned,t);case 2:return Ce(Ie.twoDigitsSigned,t);case 3:return Ce(Ie.threeDigitsSigned,t);case 4:return Ce(Ie.fourDigitsSigned,t);default:return Ce(new RegExp("^-?\\d{1,"+e+"}"),t)}}function qn(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 mi(e,t){const r=t>0,n=r?t:1-t;let s;if(n<=50)s=e||100;else{const o=n+50,i=Math.trunc(o/100)*100,a=e>=o%100;s=e+i-(a?100:0)}return r?s:1-s}function gi(e){return e%400===0||e%4===0&&e%100!==0}class hh extends ye{constructor(){super(...arguments);b(this,"priority",130);b(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(r,n,s){const o=i=>({year:i,isTwoDigitYear:n==="yy"});switch(n){case"y":return je(ke(4,r),o);case"yo":return je(s.ordinalNumber(r,{unit:"year"}),o);default:return je(ke(n.length,r),o)}}validate(r,n){return n.isTwoDigitYear||n.year>0}set(r,n,s){const o=r.getFullYear();if(s.isTwoDigitYear){const a=mi(s.year,o);return r.setFullYear(a,0,1),r.setHours(0,0,0,0),r}const i=!("era"in n)||n.era===1?s.year:1-s.year;return r.setFullYear(i,0,1),r.setHours(0,0,0,0),r}}class ph extends ye{constructor(){super(...arguments);b(this,"priority",130);b(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(r,n,s){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return je(ke(4,r),o);case"Yo":return je(s.ordinalNumber(r,{unit:"year"}),o);default:return je(ke(n.length,r),o)}}validate(r,n){return n.isTwoDigitYear||n.year>0}set(r,n,s,o){const i=ai(r,o);if(s.isTwoDigitYear){const u=mi(s.year,i);return r.setFullYear(u,0,o.firstWeekContainsDate),r.setHours(0,0,0,0),wt(r,o)}const a=!("era"in n)||n.era===1?s.year:1-s.year;return r.setFullYear(a,0,o.firstWeekContainsDate),r.setHours(0,0,0,0),wt(r,o)}}class mh extends ye{constructor(){super(...arguments);b(this,"priority",130);b(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(r,n){return Qr(n==="R"?4:n.length,r)}set(r,n,s){const o=Te(r,0);return o.setFullYear(s,0,4),o.setHours(0,0,0,0),Gt(o)}}class gh extends ye{constructor(){super(...arguments);b(this,"priority",130);b(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(r,n){return Qr(n==="u"?4:n.length,r)}set(r,n,s){return r.setFullYear(s,0,1),r.setHours(0,0,0,0),r}}class bh extends ye{constructor(){super(...arguments);b(this,"priority",120);b(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(r,n,s){switch(n){case"Q":case"QQ":return ke(n.length,r);case"Qo":return s.ordinalNumber(r,{unit:"quarter"});case"QQQ":return s.quarter(r,{width:"abbreviated",context:"formatting"})||s.quarter(r,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(r,{width:"wide",context:"formatting"})||s.quarter(r,{width:"abbreviated",context:"formatting"})||s.quarter(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=1&&n<=4}set(r,n,s){return r.setMonth((s-1)*3,1),r.setHours(0,0,0,0),r}}class yh extends ye{constructor(){super(...arguments);b(this,"priority",120);b(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(r,n,s){switch(n){case"q":case"qq":return ke(n.length,r);case"qo":return s.ordinalNumber(r,{unit:"quarter"});case"qqq":return s.quarter(r,{width:"abbreviated",context:"standalone"})||s.quarter(r,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(r,{width:"wide",context:"standalone"})||s.quarter(r,{width:"abbreviated",context:"standalone"})||s.quarter(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=1&&n<=4}set(r,n,s){return r.setMonth((s-1)*3,1),r.setHours(0,0,0,0),r}}class vh extends ye{constructor(){super(...arguments);b(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);b(this,"priority",110)}parse(r,n,s){const o=i=>i-1;switch(n){case"M":return je(Ce(Ie.month,r),o);case"MM":return je(ke(2,r),o);case"Mo":return je(s.ordinalNumber(r,{unit:"month"}),o);case"MMM":return s.month(r,{width:"abbreviated",context:"formatting"})||s.month(r,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(r,{width:"wide",context:"formatting"})||s.month(r,{width:"abbreviated",context:"formatting"})||s.month(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=11}set(r,n,s){return r.setMonth(s,1),r.setHours(0,0,0,0),r}}class xh extends ye{constructor(){super(...arguments);b(this,"priority",110);b(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(r,n,s){const o=i=>i-1;switch(n){case"L":return je(Ce(Ie.month,r),o);case"LL":return je(ke(2,r),o);case"Lo":return je(s.ordinalNumber(r,{unit:"month"}),o);case"LLL":return s.month(r,{width:"abbreviated",context:"standalone"})||s.month(r,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(r,{width:"wide",context:"standalone"})||s.month(r,{width:"abbreviated",context:"standalone"})||s.month(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=0&&n<=11}set(r,n,s){return r.setMonth(s,1),r.setHours(0,0,0,0),r}}function wh(e,t,r){const n=be(e),s=Qd(n,r)-t;return n.setDate(n.getDate()-s*7),n}class Ph extends ye{constructor(){super(...arguments);b(this,"priority",100);b(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(r,n,s){switch(n){case"w":return Ce(Ie.week,r);case"wo":return s.ordinalNumber(r,{unit:"week"});default:return ke(n.length,r)}}validate(r,n){return n>=1&&n<=53}set(r,n,s,o){return wt(wh(r,s,o),o)}}function Sh(e,t){const r=be(e),n=Gd(r)-t;return r.setDate(r.getDate()-n*7),r}class Th extends ye{constructor(){super(...arguments);b(this,"priority",100);b(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(r,n,s){switch(n){case"I":return Ce(Ie.week,r);case"Io":return s.ordinalNumber(r,{unit:"week"});default:return ke(n.length,r)}}validate(r,n){return n>=1&&n<=53}set(r,n,s){return Gt(Sh(r,s))}}const Eh=[31,28,31,30,31,30,31,31,30,31,30,31],_h=[31,29,31,30,31,30,31,31,30,31,30,31];class Ch extends ye{constructor(){super(...arguments);b(this,"priority",90);b(this,"subPriority",1);b(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(r,n,s){switch(n){case"d":return Ce(Ie.date,r);case"do":return s.ordinalNumber(r,{unit:"date"});default:return ke(n.length,r)}}validate(r,n){const s=r.getFullYear(),o=gi(s),i=r.getMonth();return o?n>=1&&n<=_h[i]:n>=1&&n<=Eh[i]}set(r,n,s){return r.setDate(s),r.setHours(0,0,0,0),r}}class kh extends ye{constructor(){super(...arguments);b(this,"priority",90);b(this,"subpriority",1);b(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(r,n,s){switch(n){case"D":case"DD":return Ce(Ie.dayOfYear,r);case"Do":return s.ordinalNumber(r,{unit:"date"});default:return ke(n.length,r)}}validate(r,n){const s=r.getFullYear();return gi(s)?n>=1&&n<=366:n>=1&&n<=365}set(r,n,s){return r.setMonth(0,s),r.setHours(0,0,0,0),r}}function Kn(e,t,r){var g,x,v,T;const n=Tr(),s=(r==null?void 0:r.weekStartsOn)??((x=(g=r==null?void 0:r.locale)==null?void 0:g.options)==null?void 0:x.weekStartsOn)??n.weekStartsOn??((T=(v=n.locale)==null?void 0:v.options)==null?void 0:T.weekStartsOn)??0,o=be(e),i=o.getDay(),u=(t%7+7)%7,f=7-s,h=t<0||t>6?t-(i+f)%7:(u+f)%7-(i+f)%7;return Kt(o,h)}class Oh extends ye{constructor(){super(...arguments);b(this,"priority",90);b(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(r,n,s){switch(n){case"E":case"EE":case"EEE":return s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"EEEE":default:return s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=6}set(r,n,s,o){return r=Kn(r,s,o),r.setHours(0,0,0,0),r}}class Dh extends ye{constructor(){super(...arguments);b(this,"priority",90);b(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(r,n,s,o){const i=a=>{const u=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+u};switch(n){case"e":case"ee":return je(ke(n.length,r),i);case"eo":return je(s.ordinalNumber(r,{unit:"day"}),i);case"eee":return s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"eeeee":return s.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"eeee":default:return s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=6}set(r,n,s,o){return r=Kn(r,s,o),r.setHours(0,0,0,0),r}}class Nh extends ye{constructor(){super(...arguments);b(this,"priority",90);b(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(r,n,s,o){const i=a=>{const u=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+u};switch(n){case"c":case"cc":return je(ke(n.length,r),i);case"co":return je(s.ordinalNumber(r,{unit:"day"}),i);case"ccc":return s.day(r,{width:"abbreviated",context:"standalone"})||s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"});case"ccccc":return s.day(r,{width:"narrow",context:"standalone"});case"cccccc":return s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"});case"cccc":default:return s.day(r,{width:"wide",context:"standalone"})||s.day(r,{width:"abbreviated",context:"standalone"})||s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=0&&n<=6}set(r,n,s,o){return r=Kn(r,s,o),r.setHours(0,0,0,0),r}}function Ih(e,t){const r=be(e),n=oh(r),s=t-n;return Kt(r,s)}class jh extends ye{constructor(){super(...arguments);b(this,"priority",90);b(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(r,n,s){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return ke(n.length,r);case"io":return s.ordinalNumber(r,{unit:"day"});case"iii":return je(s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o);case"iiiii":return je(s.day(r,{width:"narrow",context:"formatting"}),o);case"iiiiii":return je(s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o);case"iiii":default:return je(s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o)}}validate(r,n){return n>=1&&n<=7}set(r,n,s){return r=Ih(r,s),r.setHours(0,0,0,0),r}}class Mh extends ye{constructor(){super(...arguments);b(this,"priority",80);b(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(r,n,s){switch(n){case"a":case"aa":case"aaa":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,s){return r.setHours(qn(s),0,0,0),r}}class Rh extends ye{constructor(){super(...arguments);b(this,"priority",80);b(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(r,n,s){switch(n){case"b":case"bb":case"bbb":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,s){return r.setHours(qn(s),0,0,0),r}}class Ah extends ye{constructor(){super(...arguments);b(this,"priority",80);b(this,"incompatibleTokens",["a","b","t","T"])}parse(r,n,s){switch(n){case"B":case"BB":case"BBB":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,s){return r.setHours(qn(s),0,0,0),r}}class Lh extends ye{constructor(){super(...arguments);b(this,"priority",70);b(this,"incompatibleTokens",["H","K","k","t","T"])}parse(r,n,s){switch(n){case"h":return Ce(Ie.hour12h,r);case"ho":return s.ordinalNumber(r,{unit:"hour"});default:return ke(n.length,r)}}validate(r,n){return n>=1&&n<=12}set(r,n,s){const o=r.getHours()>=12;return o&&s<12?r.setHours(s+12,0,0,0):!o&&s===12?r.setHours(0,0,0,0):r.setHours(s,0,0,0),r}}class $h extends ye{constructor(){super(...arguments);b(this,"priority",70);b(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(r,n,s){switch(n){case"H":return Ce(Ie.hour23h,r);case"Ho":return s.ordinalNumber(r,{unit:"hour"});default:return ke(n.length,r)}}validate(r,n){return n>=0&&n<=23}set(r,n,s){return r.setHours(s,0,0,0),r}}class Fh extends ye{constructor(){super(...arguments);b(this,"priority",70);b(this,"incompatibleTokens",["h","H","k","t","T"])}parse(r,n,s){switch(n){case"K":return Ce(Ie.hour11h,r);case"Ko":return s.ordinalNumber(r,{unit:"hour"});default:return ke(n.length,r)}}validate(r,n){return n>=0&&n<=11}set(r,n,s){return r.getHours()>=12&&s<12?r.setHours(s+12,0,0,0):r.setHours(s,0,0,0),r}}class Hh extends ye{constructor(){super(...arguments);b(this,"priority",70);b(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(r,n,s){switch(n){case"k":return Ce(Ie.hour24h,r);case"ko":return s.ordinalNumber(r,{unit:"hour"});default:return ke(n.length,r)}}validate(r,n){return n>=1&&n<=24}set(r,n,s){const o=s<=24?s%24:s;return r.setHours(o,0,0,0),r}}class Yh extends ye{constructor(){super(...arguments);b(this,"priority",60);b(this,"incompatibleTokens",["t","T"])}parse(r,n,s){switch(n){case"m":return Ce(Ie.minute,r);case"mo":return s.ordinalNumber(r,{unit:"minute"});default:return ke(n.length,r)}}validate(r,n){return n>=0&&n<=59}set(r,n,s){return r.setMinutes(s,0,0),r}}class Vh extends ye{constructor(){super(...arguments);b(this,"priority",50);b(this,"incompatibleTokens",["t","T"])}parse(r,n,s){switch(n){case"s":return Ce(Ie.second,r);case"so":return s.ordinalNumber(r,{unit:"second"});default:return ke(n.length,r)}}validate(r,n){return n>=0&&n<=59}set(r,n,s){return r.setSeconds(s,0),r}}class Wh extends ye{constructor(){super(...arguments);b(this,"priority",30);b(this,"incompatibleTokens",["t","T"])}parse(r,n){const s=o=>Math.trunc(o*Math.pow(10,-n.length+3));return je(ke(n.length,r),s)}set(r,n,s){return r.setMilliseconds(s),r}}class Bh extends ye{constructor(){super(...arguments);b(this,"priority",10);b(this,"incompatibleTokens",["t","T","x"])}parse(r,n){switch(n){case"X":return ct(at.basicOptionalMinutes,r);case"XX":return ct(at.basic,r);case"XXXX":return ct(at.basicOptionalSeconds,r);case"XXXXX":return ct(at.extendedOptionalSeconds,r);case"XXX":default:return ct(at.extended,r)}}set(r,n,s){return n.timestampIsSet?r:Te(r,r.getTime()-si(r)-s)}}class Uh extends ye{constructor(){super(...arguments);b(this,"priority",10);b(this,"incompatibleTokens",["t","T","X"])}parse(r,n){switch(n){case"x":return ct(at.basicOptionalMinutes,r);case"xx":return ct(at.basic,r);case"xxxx":return ct(at.basicOptionalSeconds,r);case"xxxxx":return ct(at.extendedOptionalSeconds,r);case"xxx":default:return ct(at.extended,r)}}set(r,n,s){return n.timestampIsSet?r:Te(r,r.getTime()-si(r)-s)}}class zh extends ye{constructor(){super(...arguments);b(this,"priority",40);b(this,"incompatibleTokens","*")}parse(r){return pi(r)}set(r,n,s){return[Te(r,s*1e3),{timestampIsSet:!0}]}}class qh extends ye{constructor(){super(...arguments);b(this,"priority",20);b(this,"incompatibleTokens","*")}parse(r){return pi(r)}set(r,n,s){return[Te(r,s),{timestampIsSet:!0}]}}const Kh={G:new dh,y:new hh,Y:new ph,R:new mh,u:new gh,Q:new bh,q:new yh,M:new vh,L:new xh,w:new Ph,I:new Th,d:new Ch,D:new kh,E:new Oh,e:new Dh,c:new Nh,i:new jh,a:new Mh,b:new Rh,B:new Ah,h:new Lh,H:new $h,K:new Fh,k:new Hh,m:new Yh,s:new Vh,S:new Wh,X:new Bh,x:new Uh,t:new zh,T:new qh},Gh=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Zh=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Qh=/^'([^]*?)'?$/,Xh=/''/g,Jh=/\S/,ep=/[a-zA-Z]/;function ut(e,t,r,n){var I,j,E,D,Q,U,y,F;const s=sh(),o=(n==null?void 0:n.locale)??s.locale??Kd,i=(n==null?void 0:n.firstWeekContainsDate)??((j=(I=n==null?void 0:n.locale)==null?void 0:I.options)==null?void 0:j.firstWeekContainsDate)??s.firstWeekContainsDate??((D=(E=s.locale)==null?void 0:E.options)==null?void 0:D.firstWeekContainsDate)??1,a=(n==null?void 0:n.weekStartsOn)??((U=(Q=n==null?void 0:n.locale)==null?void 0:Q.options)==null?void 0:U.weekStartsOn)??s.weekStartsOn??((F=(y=s.locale)==null?void 0:y.options)==null?void 0:F.weekStartsOn)??0;if(t==="")return e===""?be(r):Te(r,NaN);const u={firstWeekContainsDate:i,weekStartsOn:a,locale:o},f=[new fh],h=t.match(Zh).map(k=>{const q=k[0];if(q in li){const z=li[q];return z(k,o.formatLong)}return k}).join("").match(Gh),g=[];for(let k of h){!(n!=null&&n.useAdditionalWeekYearTokens)&&rh(k)&&fi(k,t,e),!(n!=null&&n.useAdditionalDayOfYearTokens)&&th(k)&&fi(k,t,e);const q=k[0],z=Kh[q];if(z){const{incompatibleTokens:oe}=z;if(Array.isArray(oe)){const ne=g.find(M=>oe.includes(M.token)||M.token===q);if(ne)throw new RangeError(`The format string mustn't contain \`${ne.fullToken}\` and \`${k}\` at the same time`)}else if(z.incompatibleTokens==="*"&&g.length>0)throw new RangeError(`The format string mustn't contain \`${k}\` and any other token at the same time`);g.push({token:q,fullToken:k});const ce=z.run(e,k,o.match,u);if(!ce)return Te(r,NaN);f.push(ce.setter),e=ce.rest}else{if(q.match(ep))throw new RangeError("Format string contains an unescaped latin alphabet character `"+q+"`");if(k==="''"?k="'":q==="'"&&(k=tp(k)),e.indexOf(k)===0)e=e.slice(k.length);else return Te(r,NaN)}}if(e.length>0&&Jh.test(e))return Te(r,NaN);const x=f.map(k=>k.priority).sort((k,q)=>q-k).filter((k,q,z)=>z.indexOf(k)===q).map(k=>f.filter(q=>q.priority===k).sort((q,z)=>z.subPriority-q.subPriority)).map(k=>k[0]);let v=be(r);if(isNaN(v.getTime()))return Te(r,NaN);const T={};for(const k of x){if(!k.validate(v,u))return Te(r,NaN);const q=k.set(v,T,u);Array.isArray(q)?(v=q[0],Object.assign(T,q[1])):v=q}return Te(r,v)}function tp(e){return e.match(Qh)[1].replace(Xh,"'")}function rp(e){return oi(e,Date.now())}function np(e,t){return Kt(e,-t)}function sp(e,t){let r=t-zn(e);return r<=0&&(r+=7),Kt(e,r)}function op(e,t){const r=(t==null?void 0:t.additionalDigits)??2,n=up(e);let s;if(n.date){const u=lp(n.date,r);s=fp(u.restDateString,u.year)}if(!s||isNaN(s.getTime()))return new Date(NaN);const o=s.getTime();let i=0,a;if(n.time&&(i=dp(n.time),isNaN(i)))return new Date(NaN);if(n.timezone){if(a=hp(n.timezone),isNaN(a))return new Date(NaN)}else{const u=new Date(o+i),f=new Date(0);return f.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),f.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),f}return new Date(o+i+a)}const Xr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},ip=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,ap=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,cp=/^([+-])(\d{2})(?::?(\d{2}))?$/;function up(e){const t={},r=e.split(Xr.dateTimeDelimiter);let n;if(r.length>2)return t;if(/:/.test(r[0])?n=r[0]:(t.date=r[0],n=r[1],Xr.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Xr.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length))),n){const s=Xr.timezone.exec(n);s?(t.time=n.replace(s[1],""),t.timezone=s[1]):t.time=n}return t}function lp(e,t){const r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};const s=n[1]?parseInt(n[1]):null,o=n[2]?parseInt(n[2]):null;return{year:o===null?s:o*100,restDateString:e.slice((n[1]||n[2]).length)}}function fp(e,t){if(t===null)return new Date(NaN);const r=e.match(ip);if(!r)return new Date(NaN);const n=!!r[4],s=kr(r[1]),o=kr(r[2])-1,i=kr(r[3]),a=kr(r[4]),u=kr(r[5])-1;if(n)return yp(t,a,u)?pp(t,a,u):new Date(NaN);{const f=new Date(0);return!gp(t,o,i)||!bp(t,s)?new Date(NaN):(f.setUTCFullYear(t,o,Math.max(s,i)),f)}}function kr(e){return e?parseInt(e):1}function dp(e){const t=e.match(ap);if(!t)return NaN;const r=Gn(t[1]),n=Gn(t[2]),s=Gn(t[3]);return vp(r,n,s)?r*Bn+n*Wn+s*1e3:NaN}function Gn(e){return e&&parseFloat(e.replace(",","."))||0}function hp(e){if(e==="Z")return 0;const t=e.match(cp);if(!t)return 0;const r=t[1]==="+"?-1:1,n=parseInt(t[2]),s=t[3]&&parseInt(t[3])||0;return xp(n,s)?r*(n*Bn+s*Wn):NaN}function pp(e,t,r){const n=new Date(0);n.setUTCFullYear(e,0,4);const s=n.getUTCDay()||7,o=(t-1)*7+r+1-s;return n.setUTCDate(n.getUTCDate()+o),n}const mp=[31,null,31,30,31,30,31,31,30,31,30,31];function bi(e){return e%400===0||e%4===0&&e%100!==0}function gp(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(mp[t]||(bi(e)?29:28))}function bp(e,t){return t>=1&&t<=(bi(e)?366:365)}function yp(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function vp(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function xp(e,t){return t>=0&&t<=59}function wp(e,t){const r=be(e),n=r.getFullYear(),s=r.getDate(),o=Te(e,0);o.setFullYear(n,t,15),o.setHours(0,0,0,0);const i=di(o);return r.setMonth(t,Math.min(s,i)),r}function Pp(e,t){const r=be(e);return isNaN(+r)?Te(e,NaN):(r.setFullYear(t),r)}function Zn(e,t){return xt(e,-t)}function Qn(e,t){return Er(e,-t)}function yi(){return window.navigator.languages?window.navigator.languages[0]:window.navigator.language}function Sp(e,t,r){const n=[];for(let s=e;s<=t;s++)n.push(r?r(s):s);return n}function Tp(e,t){const r=e.target;return r?!t.isSameNode(r)&&!t.contains(r):!1}function Ep(e,t){return e.isSameNode(t)||e.contains(t)}function _p(e,t){const r=Object.entries(t),n=getComputedStyle(e);for(let s=0,o=r.length;s<o;s++){const[i,a]=r[s];if(typeof a=="string"&&a.indexOf(",")>-1){if(!a.split(",").map(f=>f.trim()).includes(n[i]))return!1}else if(n[i]!==a)return!1}return!0}function Cp(e,t){const r=Object.entries(t),n=getComputedStyle(e);for(let s=0,o=r.length;s<o;s++){const[i,a]=r[s];if(typeof a=="string"&&a.indexOf(",")>-1){if(a.split(",").map(f=>f.trim()).includes(n[i]))return!0}else if(n[i]===a)return!0}return!1}function vi(e,t,r=!1,n){if(r&&_p(e,t)){if(!n||(n==null?void 0:n(e))===!0)return e}else if(!r&&Cp(e,t)&&(!n||(n==null?void 0:n(e))===!0))return e;return e.parentElement?vi(e.parentElement,t,r,n):e}function xi(e,t){const r=Array.from(document.querySelectorAll("body *")),n=[];for(let s=0,o=r.length;s<o;s++){const i=getComputedStyle(r[s]);i[e]&&t(i[e])&&n.push(i[e])}return n}function Km(e){return e}function kp(e){const t=document.documentElement;Object.keys(e).forEach(r=>{t.style.setProperty(r,e[r])})}function Op(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||"#eee","--theme-bsc-black":e.black||"#000","--theme-bsc-white":e.white||"#fff","--theme-bsc-mono-dark-1":e.monoDark1||"#222","--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||"#eee","--theme-bsc-mono-light-3":e.monoLight3||"#ccc","--theme-bsc-info":e.info||"#2e7ff8","--theme-bsc-success":e.success||"#53ae0c","--theme-bsc-warning":e.warning||"#ff6914","--theme-bsc-error":e.error||"#f01616"}}var We=(e=>(e[e.Regular=24]="Regular",e[e.Small=20]="Small",e))(We||{});const wi=({className:e})=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12v-.008ZM12 15h.008v.008H12V15Zm0 2.25h.008v.008H12v-.008ZM9.75 15h.008v.008H9.75V15Zm0 2.25h.008v.008H9.75v-.008ZM7.5 15h.008v.008H7.5V15Zm0 2.25h.008v.008H7.5v-.008Zm6.75-4.5h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V15Zm0 2.25h.008v.008h-.008v-.008Zm2.25-4.5h.008v.008H16.5v-.008Zm0 2.25h.008v.008H16.5V15Z"})}),Dp=({className:e})=>{const t=pe("bsc-h-6 bsc-w-6",e);return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})})},Np=({className:e})=>{const t=pe("bsc-h-6 bsc-w-6",e);return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5 8.25 12l7.5-7.5"})})},Ip=({className:e})=>{const t=pe("bsc-h-6 bsc-w-6",e);return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})})},jp=({className:e})=>{const t=pe("bsc-h-6 bsc-w-6",e);return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"})})},Mp=({className:e})=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})}),Xe=({icon:e,size:t=We.Regular,onClick:r,className:n})=>{const s=d.useRef({calendar:wi,chevronDown:Dp,chevronLeft:Np,chevronRight:Ip,chevronUp:jp,close:Mp}),o=d.useMemo(()=>s.current[e]||wi,[e]),i=pe({"bsc-h-[24px] bsc-w-[24px]":t===We.Regular,"bsc-h-[20px] bsc-w-[20px]":t===We.Small},n);return p.jsx("div",{onClick:r,children:p.jsx(o,{className:i})})},kt=({template:e,props:t,children:r})=>e(t,r);function Rp(e,t){if(t===e)return!1;const r=Object.values(t),n=Object.values(e);if(r.length!==n.length||r.some((o,i)=>o!==n[i]))return!0;const s=Object.keys(e);return Object.keys(t).some((o,i)=>o!==s[i])}function Ap(e,t){return e.matches[t]=!1,e.mediaQueries[t]={},e}function Pi(e){const t=Object.keys(e);return typeof window>"u"?t.reduce(Ap,{mediaQueries:{},matches:{}}):t.reduce((r,n)=>{const s=window.matchMedia(e[n]);return r.mediaQueries[n]=s,r.matches[n]=s.matches,r},{mediaQueries:{},matches:{}})}function Lp(e,t){function r(n,s){return n[s]=e.mediaQueries[s].matches,n}switch(t.type){case"updateMatches":return{matches:Object.keys(e.mediaQueries).reduce(r,{}),mediaQueries:e.mediaQueries};case"setQueries":return Pi(t.queries)}}function $p(e){const t=lr.useRef(e),[r,n]=lr.useReducer(Lp,e,Pi);lr.useEffect(()=>{Rp(e,t.current)&&(n({type:"setQueries",queries:e}),t.current=e)},[e]);function s(){return n({type:"updateMatches"})}function o(u){const f=s;return typeof u.addListener<"u"?u.addListener(f):u.addEventListener("change",f),f}lr.useEffect(()=>{const u=Object.values(r.mediaQueries),f=u.map(o);function h(g,x){typeof g.addListener<"u"?g.removeListener(f[x]):g.removeEventListener("change",f[x])}return()=>{u.forEach(h)}},[r.mediaQueries]);const{matches:i}=r,a=lr.useMemo(()=>Object.values(i),[i]);return{matches:i,matchesAny:a.some(Boolean),matchesAll:a.length>0&&a.every(Boolean)}}function Jr(e){return $p(Fp(e)).matchesAll}const Xn={};function Fp(e){return Xn[e]===void 0&&(Xn[e]={default:e}),Xn[e]}const Jn=({mobileQuery:e="screen and (max-device-width: 40rem)",tabletQuery:t="screen and (min-device-width: 40.01rem) and (max-device-width: 63.9375rem)",desktopQuery:r="screen and (min-device-width: 64rem)",mobileMarkup:n,aboveMobileMarkup:s,tabletMarkup:o,desktopMarkup:i})=>{const a=Jr(e),u=Jr(t),f=Jr(r);return(()=>a&&n?n:!a&&s?s:u&&o?o:f&&i?i:(console.error("Invalid media settings"),null))()};function Si(e,t,r){const n=o=>{const i=o.target,a=e.style.display!=="hidden";e&&a&&!Ep(e,i)&&!s(r,i)&&t(!1),t(!0)},s=(o,i)=>{if(!o)return!1;for(let a=0,u=o.length;a<u;a++)if(o[a].isSameNode(i)||o[a].contains(i))return!0;return!1};return document.addEventListener("mousedown",n),n}function Ti(e){document.removeEventListener("mousedown",e)}function Hp(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,o;for(o=0;o<n.length;o++)s=n[o],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}function es(e,t){return es=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},es(e,t)}function Yp(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,es(e,t)}var ts={exports:{}},en={exports:{}},ve={};/** @license React v16.13.1
|
|
67
|
+
*/var Hs;function aa(){return Hs||(Hs=1,function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",i=0;i<arguments.length;i++){var c=arguments[i];c&&(o=s(o,n(c)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var c in o)t.call(o,c)&&o[c]&&(i=s(i,c));return i}function s(o,i){return i?o?o+" "+i:o+i:o}e.exports?(r.default=r,e.exports=r):window.classNames=r})()}($s)),$s.exports}aa();const ca=({intersectionObserver:e,resizeObserver:t,page:r,height:n,children:s})=>{const o=p.useRef();p.useEffect(()=>()=>{o.current&&(e==null||e.unobserve(o.current),t==null||t.unobserve(o.current))},[]),p.useEffect(()=>(o.current&&(e==null||e.observe(o.current)),()=>{o.current&&e&&e.unobserve(o.current)}),[e]);const i=u=>{o.current&&(e==null||e.unobserve(o.current),t==null||t.unobserve(o.current)),e==null||e.observe(u),t==null||t.observe(u),o.current=u},c=n?{height:`${n}px`}:{};return lt.jsx("div",{"data-page":r,"data-name":"page",style:c,ref:u=>u&&i(u),children:s})};p.memo(ca);const ua=({intersectionObserver:e,page:t})=>{const r=p.useRef();p.useEffect(()=>()=>{r.current&&(e==null||e.unobserve(r.current))},[]);const n=s=>{r.current&&(e==null||e.unobserve(r.current)),e==null||e.observe(s),r.current=s};return lt.jsx("div",{"data-page":t,"data-name":"marker",ref:s=>s&&n(s)})};p.memo(ua);const hn=e=>{const[t,r]=p.useState(!0),n=cs();return p.useEffect(()=>{n&&n.useAnimations!==void 0?r(n.useAnimations):e!==void 0&&r(e)},[n,e]),t},ft=({label:e,htmlFor:t,readOnly:r=!1,className:n})=>{const s=de("bc-label",{"bsc:text-black bsc:dark:text-mono-light-1":!r,"bc-read-only bsc:text-gray-4 bsc:dark:text-mono-light-3 bsc:pointer-events-none":r},n);return g.jsx(Zi,{htmlFor:t,className:s,children:e})},la=(e,t)=>{const{name:r,label:n,value:s,readOnly:o=!1,checked:i=!1,partial:c=!1,labelLocation:u=Be.Right,className:h,useAnimation:f,onChange:v}=e,P=hn(f),l=de("bc-checkbox-wrapper bsc:flex bsc:items-center bsc:group/wrapper bsc:*:cursor-pointer",{"bc-read-only bsc:pointer-events-none bsc:text-gray-2 bsc:dark:text-mono-light-3":o,"bc-checked":i},h),d=de("bc-checkbox-label",{"bsc:ml-2":u===Be.Right,"bsc:mr-2":u===Be.Left}),b=Ir(cr.FocusWithin),x=de("bc-checkbox-outer bsc:group/checkbox bsc:rounded bsc:*:block bsc:*:size-[21px]","bsc:inset-shadow-[0_0_0_1px] bsc:inset-shadow-gray-2 bsc:dark:inset-shadow-[0_0_0_1px] bsc:dark:inset-shadow-mono-light-2","bsc:group-hover/wrapper:not-data-checked:inset-shadow-[0_0_0_2px] bsc:group-hover/wrapper:not-data-checked:inset-shadow-gray-4","bsc:dark:group-hover/wrapper:not-data-checked:inset-shadow-[0_0_0_2px] bsc:[transition:box-shadow_0.3s]",b),y=de("bc-checkbox-svg bsc:rounded bsc:stroke-mono-light-1 bsc:stroke-2 bsc:[stroke-linecap:round]","bsc:[stroke-linejoin:round] bsc:dark:stroke-mono-dark-3 bsc:[transform:scale(0)]",{"bc-read-only bsc:group-data-checked/checkbox:bg-primary-4 bsc:group-data-checked/checkbox:fill-primary-4 bsc:group-data-partial/checkbox:bg-primary-4 bsc:group-data-partial/checkbox:fill-primary-4 bsc:dark:group-data-checked/checkbox:bg-mono-light-3 bsc:dark:group-data-checked/checkbox:fill-mono-light-3 bsc:dark:group-data-partial/checkbox:bg-mono-light-3 bsc:dark:group-data-partial/checkbox:fill-mono-light-3":o,"bsc:group-data-checked/checkbox:bg-primary-1 bsc:group-data-checked/checkbox:fill-primary-1 bsc:group-data-partial/checkbox:bg-primary-1 bsc:group-data-partial/checkbox:fill-primary-1 bsc:dark:group-data-checked/checkbox:bg-mono-light-1 bsc:dark:group-data-checked/checkbox:fill-mono-light-1 bsc:dark:group-data-partial/checkbox:bg-mono-light-1 bsc:dark:group-data-partial/checkbox:fill-mono-light-1":!o,"bsc:group-data-checked/checkbox:animate-bounce bsc:group-data-partial/checkbox:animate-bounce":!o&&P,"bsc:group-data-checked/checkbox:[transform:scale(1)] bsc:group-data-partial/checkbox:[transform:scale(1)]":o||!P});return g.jsxs(Ki,{className:l,children:[n&&u===Be.Left&&g.jsx(ft,{label:n,readOnly:o,className:d}),g.jsx(zi,{ref:t,name:r,value:s,checked:i,partial:c,readOnly:o,className:x,onChange:v,children:g.jsxs("svg",{viewBox:"0 0 21 21",className:y,children:[g.jsx("polyline",{className:"bsc:[visibility:hidden] bsc:group-data-checked/checkbox:visible",points:"5 10.75 8.5 14.25 16 6"}),g.jsx("polyline",{className:"bsc:[visibility:hidden] bsc:group-data-partial/checkbox:visible",points:"6 10.5 16 10.5"})]})}),n&&u===Be.Right&&g.jsx(ft,{label:n,readOnly:o,className:d})]})},Ys=p.memo(p.forwardRef(la)),$r=e=>e==null?!1:typeof e=="object",Ws=e=>e instanceof Date,Vs=e=>typeof e=="function",Bs=e=>{const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t==="bigint"},pn=e=>{if(!$r(e))return e;const t={},r=Object.keys(e);for(let n=0,s=r.length;n<s;n++){const o=r[n],i=e[o];Bs(i)||Vs(i)?t[o]=i:Ws(i)?t[o]=new Date(i.getTime()):Array.isArray(i)?t[o]=mn(i):$r(i)&&(t[o]=pn(i))}return t},mn=e=>{let t=e.length;const r=new Array(t);for(;t--!==0;){const n=e[t];Bs(n)||Vs(n)?r[t]=n:Ws(n)?r[t]=new Date(n.getTime()):$r(n)&&!Array.isArray(n)?r[t]=pn(n):Array.isArray(n)?r[t]=mn(n):r[t]=n}return r},fa=e=>$r(e)?Array.isArray(e)?mn(e):pn(e):e;function da(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ha=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[s]))return!1;for(s=n;s--!==0;){var i=o[s];if(!e(t[i],r[i]))return!1}return!0}return t!==t&&r!==r};const pa=da(ha);function ma(e,t){for(let r=e.length;r--!==0;)if(!pa(e[r],t[r]))return!0;return!1}const gn=(e,t)=>{const r=p.useRef([]),n=r.current.length>0&&r.current[0]&&ma(r.current[0],t);return(r.current.length===0||n)&&(r.current=[fa(t),e()]),r.current[1]},ga=e=>{const[t,r]=p.useState(e),n=p.useRef(e);return n.current!==t&&(n.current=t),[t,r,n]},ba=({name:e,label:t,value:r,data:n,textField:s,valueField:o,readOnly:i=!1,orientation:c=$e.Vertical,className:u,onChange:h})=>{const[f,v]=p.useState([]),P=gn(()=>n,[n]);p.useEffect(()=>{v(r??[])},[r]);const l=E=>{const{value:V,checked:R}=E;let S;R?S=[...f,V]:S=f.filter($=>$!==V),v(S),h==null||h({name:e,value:S})},d=(E,V)=>g.jsx(Ys,{name:e,label:E[s],value:E[o],checked:f.some(R=>R===E[o]),readOnly:i,onChange:R=>R&&l(R),className:"bsc:mr-3"},`${e}_checkbox_${V}`),b=de("bsc:flex bsc:flex-col bsc:gap-1",u),x=de("bsc:flex bsc:gap-1",{"bsc:flex-col":c===$e.Vertical}),y=E=>g.jsx("div",{className:x,children:E.map(d)});return g.jsxs("div",{className:b,children:[t&&g.jsx(ft,{label:t,readOnly:i}),P&&y(P)]})},ya=p.memo(ba);var Us=typeof global=="object"&&global&&global.Object===Object&&global,va=typeof self=="object"&&self&&self.Object===Object&&self,Ze=Us||va||Function("return this")(),Lt=Ze.Symbol,qs=Object.prototype,xa=qs.hasOwnProperty,wa=qs.toString,pr=Lt?Lt.toStringTag:void 0;function Pa(e){var t=xa.call(e,pr),r=e[pr];try{e[pr]=void 0;var n=!0}catch{}var s=wa.call(e);return n&&(t?e[pr]=r:delete e[pr]),s}var Ta=Object.prototype,Sa=Ta.toString;function Ea(e){return Sa.call(e)}var _a="[object Null]",ka="[object Undefined]",zs=Lt?Lt.toStringTag:void 0;function At(e){return e==null?e===void 0?ka:_a:zs&&zs in Object(e)?Pa(e):Ea(e)}function Ft(e){return e!=null&&typeof e=="object"}var Ca="[object Symbol]";function Da(e){return typeof e=="symbol"||Ft(e)&&At(e)==Ca}var bn=Array.isArray,Oa=/\s/;function Na(e){for(var t=e.length;t--&&Oa.test(e.charAt(t)););return t}var ja=/^\s+/;function Ia(e){return e&&e.slice(0,Na(e)+1).replace(ja,"")}function gt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ks=NaN,Ma=/^[-+]0x[0-9a-f]+$/i,Ra=/^0b[01]+$/i,La=/^0o[0-7]+$/i,Aa=parseInt;function Zs(e){if(typeof e=="number")return e;if(Da(e))return Ks;if(gt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=gt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ia(e);var r=Ra.test(e);return r||La.test(e)?Aa(e.slice(2),r?2:8):Ma.test(e)?Ks:+e}var Fa="[object AsyncFunction]",$a="[object Function]",Ha="[object GeneratorFunction]",Ya="[object Proxy]";function Gs(e){if(!gt(e))return!1;var t=At(e);return t==$a||t==Ha||t==Fa||t==Ya}var yn=Ze["__core-js_shared__"],Qs=function(){var e=/[^.]+$/.exec(yn&&yn.keys&&yn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Wa(e){return!!Qs&&Qs in e}var Va=Function.prototype,Ba=Va.toString;function St(e){if(e!=null){try{return Ba.call(e)}catch{}try{return e+""}catch{}}return""}var Ua=/[\\^$.*+?()[\]{}|]/g,qa=/^\[object .+?Constructor\]$/,za=Function.prototype,Ka=Object.prototype,Za=za.toString,Ga=Ka.hasOwnProperty,Qa=RegExp("^"+Za.call(Ga).replace(Ua,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Xa(e){if(!gt(e)||Wa(e))return!1;var t=Gs(e)?Qa:qa;return t.test(St(e))}function Ja(e,t){return e==null?void 0:e[t]}function Et(e,t){var r=Ja(e,t);return Xa(r)?r:void 0}var vn=Et(Ze,"WeakMap"),Xs=Object.create,ec=function(){function e(){}return function(t){if(!gt(t))return{};if(Xs)return Xs(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),Js=function(){try{var e=Et(Object,"defineProperty");return e({},"",{}),e}catch{}}();function tc(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var rc=9007199254740991,nc=/^(?:0|[1-9]\d*)$/;function sc(e,t){var r=typeof e;return t=t??rc,!!t&&(r=="number"||r!="symbol"&&nc.test(e))&&e>-1&&e%1==0&&e<t}function oc(e,t,r){t=="__proto__"&&Js?Js(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function eo(e,t){return e===t||e!==e&&t!==t}var ic=Object.prototype,ac=ic.hasOwnProperty;function cc(e,t,r){var n=e[t];(!(ac.call(e,t)&&eo(n,r))||r===void 0&&!(t in e))&&oc(e,t,r)}var uc=9007199254740991;function to(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=uc}function lc(e){return e!=null&&to(e.length)&&!Gs(e)}var fc=Object.prototype;function ro(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||fc;return e===r}function dc(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var hc="[object Arguments]";function no(e){return Ft(e)&&At(e)==hc}var so=Object.prototype,pc=so.hasOwnProperty,mc=so.propertyIsEnumerable,gc=no(function(){return arguments}())?no:function(e){return Ft(e)&&pc.call(e,"callee")&&!mc.call(e,"callee")};function bc(){return!1}var oo=typeof ne=="object"&&ne&&!ne.nodeType&&ne,io=oo&&typeof module=="object"&&module&&!module.nodeType&&module,yc=io&&io.exports===oo,ao=yc?Ze.Buffer:void 0,vc=ao?ao.isBuffer:void 0,co=vc||bc,xc="[object Arguments]",wc="[object Array]",Pc="[object Boolean]",Tc="[object Date]",Sc="[object Error]",Ec="[object Function]",_c="[object Map]",kc="[object Number]",Cc="[object Object]",Dc="[object RegExp]",Oc="[object Set]",Nc="[object String]",jc="[object WeakMap]",Ic="[object ArrayBuffer]",Mc="[object DataView]",Rc="[object Float32Array]",Lc="[object Float64Array]",Ac="[object Int8Array]",Fc="[object Int16Array]",$c="[object Int32Array]",Hc="[object Uint8Array]",Yc="[object Uint8ClampedArray]",Wc="[object Uint16Array]",Vc="[object Uint32Array]",Se={};Se[Rc]=Se[Lc]=Se[Ac]=Se[Fc]=Se[$c]=Se[Hc]=Se[Yc]=Se[Wc]=Se[Vc]=!0,Se[xc]=Se[wc]=Se[Ic]=Se[Pc]=Se[Mc]=Se[Tc]=Se[Sc]=Se[Ec]=Se[_c]=Se[kc]=Se[Cc]=Se[Dc]=Se[Oc]=Se[Nc]=Se[jc]=!1;function Bc(e){return Ft(e)&&to(e.length)&&!!Se[At(e)]}function xn(e){return function(t){return e(t)}}var uo=typeof ne=="object"&&ne&&!ne.nodeType&&ne,mr=uo&&typeof module=="object"&&module&&!module.nodeType&&module,Uc=mr&&mr.exports===uo,wn=Uc&&Us.process,$t=function(){try{var e=mr&&mr.require&&mr.require("util").types;return e||wn&&wn.binding&&wn.binding("util")}catch{}}(),lo=$t&&$t.isTypedArray,qc=lo?xn(lo):Bc,zc=Object.prototype,Kc=zc.hasOwnProperty;function Zc(e,t){var r=bn(e),n=!r&&gc(e),s=!r&&!n&&co(e),o=!r&&!n&&!s&&qc(e),i=r||n||s||o,c=i?dc(e.length,String):[],u=c.length;for(var h in e)Kc.call(e,h)&&!(i&&(h=="length"||s&&(h=="offset"||h=="parent")||o&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||sc(h,u)))&&c.push(h);return c}function fo(e,t){return function(r){return e(t(r))}}var Gc=fo(Object.keys,Object),Qc=Object.prototype,Xc=Qc.hasOwnProperty;function Jc(e){if(!ro(e))return Gc(e);var t=[];for(var r in Object(e))Xc.call(e,r)&&r!="constructor"&&t.push(r);return t}function eu(e){return lc(e)?Zc(e):Jc(e)}var gr=Et(Object,"create");function tu(){this.__data__=gr?gr(null):{},this.size=0}function ru(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var nu="__lodash_hash_undefined__",su=Object.prototype,ou=su.hasOwnProperty;function iu(e){var t=this.__data__;if(gr){var r=t[e];return r===nu?void 0:r}return ou.call(t,e)?t[e]:void 0}var au=Object.prototype,cu=au.hasOwnProperty;function uu(e){var t=this.__data__;return gr?t[e]!==void 0:cu.call(t,e)}var lu="__lodash_hash_undefined__";function fu(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=gr&&t===void 0?lu:t,this}function _t(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])}}_t.prototype.clear=tu,_t.prototype.delete=ru,_t.prototype.get=iu,_t.prototype.has=uu,_t.prototype.set=fu;function du(){this.__data__=[],this.size=0}function Hr(e,t){for(var r=e.length;r--;)if(eo(e[r][0],t))return r;return-1}var hu=Array.prototype,pu=hu.splice;function mu(e){var t=this.__data__,r=Hr(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():pu.call(t,r,1),--this.size,!0}function gu(e){var t=this.__data__,r=Hr(t,e);return r<0?void 0:t[r][1]}function bu(e){return Hr(this.__data__,e)>-1}function yu(e,t){var r=this.__data__,n=Hr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function dt(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])}}dt.prototype.clear=du,dt.prototype.delete=mu,dt.prototype.get=gu,dt.prototype.has=bu,dt.prototype.set=yu;var br=Et(Ze,"Map");function vu(){this.size=0,this.__data__={hash:new _t,map:new(br||dt),string:new _t}}function xu(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Yr(e,t){var r=e.__data__;return xu(t)?r[typeof t=="string"?"string":"hash"]:r.map}function wu(e){var t=Yr(this,e).delete(e);return this.size-=t?1:0,t}function Pu(e){return Yr(this,e).get(e)}function Tu(e){return Yr(this,e).has(e)}function Su(e,t){var r=Yr(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Ht(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])}}Ht.prototype.clear=vu,Ht.prototype.delete=wu,Ht.prototype.get=Pu,Ht.prototype.has=Tu,Ht.prototype.set=Su;function Eu(e,t){for(var r=-1,n=t.length,s=e.length;++r<n;)e[s+r]=t[r];return e}var _u=fo(Object.getPrototypeOf,Object);function ku(){this.__data__=new dt,this.size=0}function Cu(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Du(e){return this.__data__.get(e)}function Ou(e){return this.__data__.has(e)}var Nu=200;function ju(e,t){var r=this.__data__;if(r instanceof dt){var n=r.__data__;if(!br||n.length<Nu-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ht(n)}return r.set(e,t),this.size=r.size,this}function Yt(e){var t=this.__data__=new dt(e);this.size=t.size}Yt.prototype.clear=ku,Yt.prototype.delete=Cu,Yt.prototype.get=Du,Yt.prototype.has=Ou,Yt.prototype.set=ju;var ho=typeof ne=="object"&&ne&&!ne.nodeType&&ne,po=ho&&typeof module=="object"&&module&&!module.nodeType&&module,Iu=po&&po.exports===ho,mo=Iu?Ze.Buffer:void 0;mo&&mo.allocUnsafe;function Mu(e,t){return e.slice()}function Ru(e,t){for(var r=-1,n=e==null?0:e.length,s=0,o=[];++r<n;){var i=e[r];t(i,r,e)&&(o[s++]=i)}return o}function Lu(){return[]}var Au=Object.prototype,Fu=Au.propertyIsEnumerable,go=Object.getOwnPropertySymbols,$u=go?function(e){return e==null?[]:(e=Object(e),Ru(go(e),function(t){return Fu.call(e,t)}))}:Lu;function Hu(e,t,r){var n=t(e);return bn(e)?n:Eu(n,r(e))}function Yu(e){return Hu(e,eu,$u)}var Pn=Et(Ze,"DataView"),Tn=Et(Ze,"Promise"),Sn=Et(Ze,"Set"),bo="[object Map]",Wu="[object Object]",yo="[object Promise]",vo="[object Set]",xo="[object WeakMap]",wo="[object DataView]",Vu=St(Pn),Bu=St(br),Uu=St(Tn),qu=St(Sn),zu=St(vn),ht=At;(Pn&&ht(new Pn(new ArrayBuffer(1)))!=wo||br&&ht(new br)!=bo||Tn&&ht(Tn.resolve())!=yo||Sn&&ht(new Sn)!=vo||vn&&ht(new vn)!=xo)&&(ht=function(e){var t=At(e),r=t==Wu?e.constructor:void 0,n=r?St(r):"";if(n)switch(n){case Vu:return wo;case Bu:return bo;case Uu:return yo;case qu:return vo;case zu:return xo}return t});var Ku=Object.prototype,Zu=Ku.hasOwnProperty;function Gu(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Zu.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Po=Ze.Uint8Array;function En(e){var t=new e.constructor(e.byteLength);return new Po(t).set(new Po(e)),t}function Qu(e,t){var r=En(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var Xu=/\w*$/;function Ju(e){var t=new e.constructor(e.source,Xu.exec(e));return t.lastIndex=e.lastIndex,t}var To=Lt?Lt.prototype:void 0,So=To?To.valueOf:void 0;function el(e){return So?Object(So.call(e)):{}}function tl(e,t){var r=En(e.buffer);return new e.constructor(r,e.byteOffset,e.length)}var rl="[object Boolean]",nl="[object Date]",sl="[object Map]",ol="[object Number]",il="[object RegExp]",al="[object Set]",cl="[object String]",ul="[object Symbol]",ll="[object ArrayBuffer]",fl="[object DataView]",dl="[object Float32Array]",hl="[object Float64Array]",pl="[object Int8Array]",ml="[object Int16Array]",gl="[object Int32Array]",bl="[object Uint8Array]",yl="[object Uint8ClampedArray]",vl="[object Uint16Array]",xl="[object Uint32Array]";function wl(e,t,r){var n=e.constructor;switch(t){case ll:return En(e);case rl:case nl:return new n(+e);case fl:return Qu(e);case dl:case hl:case pl:case ml:case gl:case bl:case yl:case vl:case xl:return tl(e);case sl:return new n;case ol:case cl:return new n(e);case il:return Ju(e);case al:return new n;case ul:return el(e)}}function Pl(e){return typeof e.constructor=="function"&&!ro(e)?ec(_u(e)):{}}var Tl="[object Map]";function Sl(e){return Ft(e)&&ht(e)==Tl}var Eo=$t&&$t.isMap,El=Eo?xn(Eo):Sl,_l="[object Set]";function kl(e){return Ft(e)&&ht(e)==_l}var _o=$t&&$t.isSet,Cl=_o?xn(_o):kl,ko="[object Arguments]",Dl="[object Array]",Ol="[object Boolean]",Nl="[object Date]",jl="[object Error]",Co="[object Function]",Il="[object GeneratorFunction]",Ml="[object Map]",Rl="[object Number]",Do="[object Object]",Ll="[object RegExp]",Al="[object Set]",Fl="[object String]",$l="[object Symbol]",Hl="[object WeakMap]",Yl="[object ArrayBuffer]",Wl="[object DataView]",Vl="[object Float32Array]",Bl="[object Float64Array]",Ul="[object Int8Array]",ql="[object Int16Array]",zl="[object Int32Array]",Kl="[object Uint8Array]",Zl="[object Uint8ClampedArray]",Gl="[object Uint16Array]",Ql="[object Uint32Array]",Pe={};Pe[ko]=Pe[Dl]=Pe[Yl]=Pe[Wl]=Pe[Ol]=Pe[Nl]=Pe[Vl]=Pe[Bl]=Pe[Ul]=Pe[ql]=Pe[zl]=Pe[Ml]=Pe[Rl]=Pe[Do]=Pe[Ll]=Pe[Al]=Pe[Fl]=Pe[$l]=Pe[Kl]=Pe[Zl]=Pe[Gl]=Pe[Ql]=!0,Pe[jl]=Pe[Co]=Pe[Hl]=!1;function Wr(e,t,r,n,s,o){var i;if(i!==void 0)return i;if(!gt(e))return e;var c=bn(e);if(c)i=Gu(e);else{var u=ht(e),h=u==Co||u==Il;if(co(e))return Mu(e);if(u==Do||u==ko||h&&!s)i=h?{}:Pl(e);else{if(!Pe[u])return s?e:{};i=wl(e,u)}}o||(o=new Yt);var f=o.get(e);if(f)return f;o.set(e,i),Cl(e)?e.forEach(function(l){i.add(Wr(l,t,r,l,e,o))}):El(e)&&e.forEach(function(l,d){i.set(d,Wr(l,t,r,d,e,o))});var v=Yu,P=c?void 0:v(e);return tc(P||e,function(l,d){P&&(d=l,l=e[d]),cc(i,d,Wr(l,t,r,d,e,o))}),i}var Xl=1,Jl=4;function ef(e){return Wr(e,Xl|Jl)}var _n=function(){return Ze.Date.now()},tf="Expected a function",rf=Math.max,nf=Math.min;function yr(e,t,r){var n,s,o,i,c,u,h=0,f=!1,v=!1,P=!0;if(typeof e!="function")throw new TypeError(tf);t=Zs(t)||0,gt(r)&&(f=!!r.leading,v="maxWait"in r,o=v?rf(Zs(r.maxWait)||0,t):o,P="trailing"in r?!!r.trailing:P);function l($){var O=n,q=s;return n=s=void 0,h=$,i=e.apply(q,O),i}function d($){return h=$,c=setTimeout(y,t),f?l($):i}function b($){var O=$-u,q=$-h,z=t-O;return v?nf(z,o-q):z}function x($){var O=$-u,q=$-h;return u===void 0||O>=t||O<0||v&&q>=o}function y(){var $=_n();if(x($))return E($);c=setTimeout(y,b($))}function E($){return c=void 0,P&&n?l($):(n=s=void 0,i)}function V(){c!==void 0&&clearTimeout(c),h=0,n=u=s=c=void 0}function R(){return c===void 0?i:E(_n())}function S(){var $=_n(),O=x($);if(n=arguments,s=this,u=$,O){if(c===void 0)return d(u);if(v)return clearTimeout(c),c=setTimeout(y,t),l(u)}return c===void 0&&(c=setTimeout(y,t)),i}return S.cancel=V,S.flush=R,S}var sf="Expected a function";function of(e,t,r){var n=!0,s=!0;if(typeof e!="function")throw new TypeError(sf);return gt(r)&&(n="leading"in r?!0:n,s="trailing"in r?!!r.trailing:s),yr(e,t,{leading:n,maxWait:t,trailing:s})}const af=(e,t)=>{const{value:r,readOnly:n=!1,debounceTime:s=800,fillContainer:o=!0,leftElement:i,rightElement:c,className:u,leftElementClassName:h,rightElementClassName:f,isSingleLine:v=!0,allowSingleLineScroll:P=!1,inputMode:l,placeholder:d,onFocus:b,onBlur:x,onInput:y,onInnerTextChange:E,onInnerHTMLChange:V,onElementCreate:R,onLeftElementClick:S,onRightElementClick:$}=e,O=p.useRef("bsc:grow bsc:focus:outline-hidden"),q=p.useRef("bsc:text-gray-4"),z=p.useRef(),se=p.useCallback(_=>{const W=_.target,J=W.innerHTML;W.className=`${O.current}`,d&&J===d&&(W.innerHTML=""),b==null||b(_)},[d,b]),ae=p.useCallback(_=>{const W=_.target.innerHTML;if(d&&W===""){const J=_.target;J.innerHTML=d,J.className=`${O.current} ${q.current}`}x==null||x(_)},[d,x]),re=p.useCallback(_=>{var W,J;(W=z.current)==null||W.removeEventListener("focus",se),(J=z.current)==null||J.removeEventListener("blur",ae),d&&_&&_!==document.activeElement&&_.innerHTML===""&&(_.innerHTML=d,_.className=`${O.current} ${q.current}`),_.addEventListener("focus",se),_.addEventListener("blur",ae),z.current=_},[d]),K=p.useCallback(_=>{R==null||R(_)},[R]),L=_=>{S==null||S(_)},F=_=>{$==null||$(_)},C=yr(_=>{y==null||y(_),E==null||E(_.target.innerText),V==null||V(_.target.innerHTML)},s),Q=p.useCallback(_=>{z.current&&(z.current.innerText=_)},[]),I=p.useCallback(_=>{z.current&&(z.current.innerHTML=_)},[]),he=p.useCallback(()=>{var _;(_=z.current)==null||_.focus()},[]);p.useImperativeHandle(t,()=>({inputElement:z.current,setInnerText:Q,setInnerHTML:I,focus:he}));const k=de({"bsc:w-full ":o},"bsc:flex bsc:flex-row bsc:items-center bsc:shadow-sm bsc:border bsc:border-solid bsc:border-gray-3 bsc:dark:border-white bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1 bsc:rounded-md bsc:p-2",{"bsc:overflow-x-auto bsc:overflow-y-hidden bsc:whitespace-pre":v&&P,"bsc:overflow-hidden bsc:whitespace-pre":v&&!P},u),M=de("bsc:shrink",{"bsc:mr-2":i},h),N=de("bsc:shrink",{"bsc:ml-2":c},f);return g.jsxs("div",{className:k,ref:_=>_&&K(_),children:[i&&g.jsx("div",{className:M,onClick:L,children:i}),g.jsx("div",{ref:_=>_&&re(_),className:O.current,contentEditable:!n,suppressContentEditableWarning:!0,inputMode:l,onInput:C,children:r}),c&&g.jsx("div",{className:N,onClick:F,children:c})]})},Vr=p.forwardRef(af);function pe(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Te(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Wt(e,t){const r=pe(e);return isNaN(t)?Te(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function bt(e,t){const r=pe(e);if(isNaN(t))return Te(e,NaN);if(!t)return r;const n=r.getDate(),s=Te(e,r.getTime());s.setMonth(r.getMonth()+t+1,0);const o=s.getDate();return n>=o?s:(r.setFullYear(s.getFullYear(),s.getMonth(),n),r)}const Oo=6048e5,kn=6e4,Cn=36e5,cf=1e3;let uf={};function vr(){return uf}function yt(e,t){var c,u,h,f;const r=vr(),n=(t==null?void 0:t.weekStartsOn)??((u=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??r.weekStartsOn??((f=(h=r.locale)==null?void 0:h.options)==null?void 0:f.weekStartsOn)??0,s=pe(e),o=s.getDay(),i=(o<n?7:0)+o-n;return s.setDate(s.getDate()-i),s.setHours(0,0,0,0),s}function Vt(e){return yt(e,{weekStartsOn:1})}function lf(e){const t=pe(e),r=t.getFullYear(),n=Te(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const s=Vt(n),o=Te(e,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const i=Vt(o);return t.getTime()>=s.getTime()?r+1:t.getTime()>=i.getTime()?r:r-1}function No(e){const t=pe(e);return t.setHours(0,0,0,0),t}function jo(e){const t=pe(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function ff(e){const t=lf(e),r=Te(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),Vt(r)}function xr(e,t){return bt(e,t*12)}function Io(e,t){const r=No(e),n=No(t);return+r==+n}function df(e){const t=pe(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function hf(e,t){const r=pe(e.start),n=pe(e.end);let s=+r>+n;const o=s?+r:+n,i=s?n:r;i.setHours(0,0,0,0);let c=1;const u=[];for(;+i<=o;)u.push(pe(i)),i.setDate(i.getDate()+c),i.setHours(0,0,0,0);return s?u.reverse():u}function Mo(e){const t=pe(e);return t.setDate(1),t.setHours(0,0,0,0),t}function pf(e,t){const r=pe(e.start),n=pe(e.end);let s=+r>+n;const o=s?+r:+n,i=s?n:r;i.setHours(0,0,0,0),i.setMonth(0,1);let c=1;const u=[];for(;+i<=o;)u.push(pe(i)),i.setFullYear(i.getFullYear()+c);return s?u.reverse():u}const mf={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"}},gf=(e,t,r)=>{let n;const s=mf[e];return typeof s=="string"?n=s:t===1?n=s.one:n=s.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function Dn(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const bf={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},yf={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},vf={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},xf={date:Dn({formats:bf,defaultWidth:"full"}),time:Dn({formats:yf,defaultWidth:"full"}),dateTime:Dn({formats:vf,defaultWidth:"full"})},wf={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Pf=(e,t,r,n)=>wf[e];function wr(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let s;if(n==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,c=r!=null&&r.width?String(r.width):i;s=e.formattingValues[c]||e.formattingValues[i]}else{const i=e.defaultWidth,c=r!=null&&r.width?String(r.width):e.defaultWidth;s=e.values[c]||e.values[i]}const o=e.argumentCallback?e.argumentCallback(t):t;return s[o]}}const Tf={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Sf={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ef={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"]},_f={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"]},kf={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"}},Cf={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"}},Df={ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:wr({values:Tf,defaultWidth:"wide"}),quarter:wr({values:Sf,defaultWidth:"wide",argumentCallback:e=>e-1}),month:wr({values:Ef,defaultWidth:"wide"}),day:wr({values:_f,defaultWidth:"wide"}),dayPeriod:wr({values:kf,defaultWidth:"wide",formattingValues:Cf,defaultFormattingWidth:"wide"})};function Pr(e){return(t,r={})=>{const n=r.width,s=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(s);if(!o)return null;const i=o[0],c=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(c)?Nf(c,v=>v.test(i)):Of(c,v=>v.test(i));let h;h=e.valueCallback?e.valueCallback(u):u,h=r.valueCallback?r.valueCallback(h):h;const f=t.slice(i.length);return{value:h,rest:f}}}function Of(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function Nf(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function jf(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const s=n[0],o=t.match(e.parsePattern);if(!o)return null;let i=e.valueCallback?e.valueCallback(o[0]):o[0];i=r.valueCallback?r.valueCallback(i):i;const c=t.slice(s.length);return{value:i,rest:c}}}const If=/^(\d+)(th|st|nd|rd)?/i,Mf=/\d+/i,Rf={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},Lf={any:[/^b/i,/^(a|c)/i]},Af={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ff={any:[/1/i,/2/i,/3/i,/4/i]},$f={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},Hf={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]},Yf={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},Wf={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]},Vf={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},Bf={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}},Uf={ordinalNumber:jf({matchPattern:If,parsePattern:Mf,valueCallback:e=>parseInt(e,10)}),era:Pr({matchPatterns:Rf,defaultMatchWidth:"wide",parsePatterns:Lf,defaultParseWidth:"any"}),quarter:Pr({matchPatterns:Af,defaultMatchWidth:"wide",parsePatterns:Ff,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Pr({matchPatterns:$f,defaultMatchWidth:"wide",parsePatterns:Hf,defaultParseWidth:"any"}),day:Pr({matchPatterns:Yf,defaultMatchWidth:"wide",parsePatterns:Wf,defaultParseWidth:"any"}),dayPeriod:Pr({matchPatterns:Vf,defaultMatchWidth:"any",parsePatterns:Bf,defaultParseWidth:"any"})},qf={code:"en-US",formatDistance:gf,formatLong:xf,formatRelative:Pf,localize:Df,match:Uf,options:{weekStartsOn:0,firstWeekContainsDate:1}};function zf(e){const t=pe(e),r=+Vt(t)-+ff(t);return Math.round(r/Oo)+1}function Ro(e,t){var f,v,P,l;const r=pe(e),n=r.getFullYear(),s=vr(),o=(t==null?void 0:t.firstWeekContainsDate)??((v=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:v.firstWeekContainsDate)??s.firstWeekContainsDate??((l=(P=s.locale)==null?void 0:P.options)==null?void 0:l.firstWeekContainsDate)??1,i=Te(e,0);i.setFullYear(n+1,0,o),i.setHours(0,0,0,0);const c=yt(i,t),u=Te(e,0);u.setFullYear(n,0,o),u.setHours(0,0,0,0);const h=yt(u,t);return r.getTime()>=c.getTime()?n+1:r.getTime()>=h.getTime()?n:n-1}function Kf(e,t){var c,u,h,f;const r=vr(),n=(t==null?void 0:t.firstWeekContainsDate)??((u=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??r.firstWeekContainsDate??((f=(h=r.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,s=Ro(e,t),o=Te(e,0);return o.setFullYear(s,0,n),o.setHours(0,0,0,0),yt(o,t)}function Zf(e,t){const r=pe(e),n=+yt(r,t)-+Kf(r,t);return Math.round(n/Oo)+1}const Lo=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Ao=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Fo={p:Ao,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],s=r[2];if(!s)return Lo(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Lo(n,t)).replace("{{time}}",Ao(s,t))}},Gf=/^D+$/,Qf=/^Y+$/,Xf=["D","DD","YY","YYYY"];function Jf(e){return Gf.test(e)}function ed(e){return Qf.test(e)}function $o(e,t,r){const n=td(e,t,r);if(console.warn(n),Xf.includes(e))throw new RangeError(n)}function td(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function On(e){return pe(e).getDay()}function Ho(e){const t=pe(e),r=t.getFullYear(),n=t.getMonth(),s=Te(e,0);return s.setFullYear(r,n+1,0),s.setHours(0,0,0,0),s.getDate()}function rd(){return Object.assign({},vr())}function nd(e){let r=pe(e).getDay();return r===0&&(r=7),r}function sd(e){const t=pe(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(0,0,0,0),t}function od(e,t){const r=pe(e),n=pe(t);return+r<+n}function id(e,t){const r=t instanceof Date?Te(t,0):new t(0);return r.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),r.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),r}const ad=10;class Yo{constructor(){T(this,"subPriority",0)}validate(t,r){return!0}}class cd extends Yo{constructor(t,r,n,s,o){super(),this.value=t,this.validateValue=r,this.setValue=n,this.priority=s,o&&(this.subPriority=o)}validate(t,r){return this.validateValue(t,this.value,r)}set(t,r,n){return this.setValue(t,r,this.value,n)}}class ud extends Yo{constructor(){super(...arguments);T(this,"priority",ad);T(this,"subPriority",-1)}set(r,n){return n.timestampIsSet?r:Te(r,id(r,Date))}}class me{run(t,r,n,s){const o=this.parse(t,r,n,s);return o?{setter:new cd(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(t,r,n){return!0}}class ld extends me{constructor(){super(...arguments);T(this,"priority",140);T(this,"incompatibleTokens",["R","u","t","T"])}parse(r,n,s){switch(n){case"G":case"GG":case"GGG":return s.era(r,{width:"abbreviated"})||s.era(r,{width:"narrow"});case"GGGGG":return s.era(r,{width:"narrow"});case"GGGG":default:return s.era(r,{width:"wide"})||s.era(r,{width:"abbreviated"})||s.era(r,{width:"narrow"})}}set(r,n,s){return n.era=s,r.setFullYear(s,0,1),r.setHours(0,0,0,0),r}}const je={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},tt={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Ie(e,t){return e&&{value:t(e.value),rest:e.rest}}function Ce(e,t){const r=t.match(e);return r?{value:parseInt(r[0],10),rest:t.slice(r[0].length)}:null}function rt(e,t){const r=t.match(e);if(!r)return null;if(r[0]==="Z")return{value:0,rest:t.slice(1)};const n=r[1]==="+"?1:-1,s=r[2]?parseInt(r[2],10):0,o=r[3]?parseInt(r[3],10):0,i=r[5]?parseInt(r[5],10):0;return{value:n*(s*Cn+o*kn+i*cf),rest:t.slice(r[0].length)}}function Wo(e){return Ce(je.anyDigitsSigned,e)}function De(e,t){switch(e){case 1:return Ce(je.singleDigit,t);case 2:return Ce(je.twoDigits,t);case 3:return Ce(je.threeDigits,t);case 4:return Ce(je.fourDigits,t);default:return Ce(new RegExp("^\\d{1,"+e+"}"),t)}}function Br(e,t){switch(e){case 1:return Ce(je.singleDigitSigned,t);case 2:return Ce(je.twoDigitsSigned,t);case 3:return Ce(je.threeDigitsSigned,t);case 4:return Ce(je.fourDigitsSigned,t);default:return Ce(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Nn(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 Vo(e,t){const r=t>0,n=r?t:1-t;let s;if(n<=50)s=e||100;else{const o=n+50,i=Math.trunc(o/100)*100,c=e>=o%100;s=e+i-(c?100:0)}return r?s:1-s}function Bo(e){return e%400===0||e%4===0&&e%100!==0}class fd extends me{constructor(){super(...arguments);T(this,"priority",130);T(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(r,n,s){const o=i=>({year:i,isTwoDigitYear:n==="yy"});switch(n){case"y":return Ie(De(4,r),o);case"yo":return Ie(s.ordinalNumber(r,{unit:"year"}),o);default:return Ie(De(n.length,r),o)}}validate(r,n){return n.isTwoDigitYear||n.year>0}set(r,n,s){const o=r.getFullYear();if(s.isTwoDigitYear){const c=Vo(s.year,o);return r.setFullYear(c,0,1),r.setHours(0,0,0,0),r}const i=!("era"in n)||n.era===1?s.year:1-s.year;return r.setFullYear(i,0,1),r.setHours(0,0,0,0),r}}class dd extends me{constructor(){super(...arguments);T(this,"priority",130);T(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(r,n,s){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Ie(De(4,r),o);case"Yo":return Ie(s.ordinalNumber(r,{unit:"year"}),o);default:return Ie(De(n.length,r),o)}}validate(r,n){return n.isTwoDigitYear||n.year>0}set(r,n,s,o){const i=Ro(r,o);if(s.isTwoDigitYear){const u=Vo(s.year,i);return r.setFullYear(u,0,o.firstWeekContainsDate),r.setHours(0,0,0,0),yt(r,o)}const c=!("era"in n)||n.era===1?s.year:1-s.year;return r.setFullYear(c,0,o.firstWeekContainsDate),r.setHours(0,0,0,0),yt(r,o)}}class hd extends me{constructor(){super(...arguments);T(this,"priority",130);T(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(r,n){return Br(n==="R"?4:n.length,r)}set(r,n,s){const o=Te(r,0);return o.setFullYear(s,0,4),o.setHours(0,0,0,0),Vt(o)}}class pd extends me{constructor(){super(...arguments);T(this,"priority",130);T(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(r,n){return Br(n==="u"?4:n.length,r)}set(r,n,s){return r.setFullYear(s,0,1),r.setHours(0,0,0,0),r}}class md extends me{constructor(){super(...arguments);T(this,"priority",120);T(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(r,n,s){switch(n){case"Q":case"QQ":return De(n.length,r);case"Qo":return s.ordinalNumber(r,{unit:"quarter"});case"QQQ":return s.quarter(r,{width:"abbreviated",context:"formatting"})||s.quarter(r,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(r,{width:"wide",context:"formatting"})||s.quarter(r,{width:"abbreviated",context:"formatting"})||s.quarter(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=1&&n<=4}set(r,n,s){return r.setMonth((s-1)*3,1),r.setHours(0,0,0,0),r}}class gd extends me{constructor(){super(...arguments);T(this,"priority",120);T(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(r,n,s){switch(n){case"q":case"qq":return De(n.length,r);case"qo":return s.ordinalNumber(r,{unit:"quarter"});case"qqq":return s.quarter(r,{width:"abbreviated",context:"standalone"})||s.quarter(r,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(r,{width:"wide",context:"standalone"})||s.quarter(r,{width:"abbreviated",context:"standalone"})||s.quarter(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=1&&n<=4}set(r,n,s){return r.setMonth((s-1)*3,1),r.setHours(0,0,0,0),r}}class bd extends me{constructor(){super(...arguments);T(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);T(this,"priority",110)}parse(r,n,s){const o=i=>i-1;switch(n){case"M":return Ie(Ce(je.month,r),o);case"MM":return Ie(De(2,r),o);case"Mo":return Ie(s.ordinalNumber(r,{unit:"month"}),o);case"MMM":return s.month(r,{width:"abbreviated",context:"formatting"})||s.month(r,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(r,{width:"wide",context:"formatting"})||s.month(r,{width:"abbreviated",context:"formatting"})||s.month(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=11}set(r,n,s){return r.setMonth(s,1),r.setHours(0,0,0,0),r}}class yd extends me{constructor(){super(...arguments);T(this,"priority",110);T(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(r,n,s){const o=i=>i-1;switch(n){case"L":return Ie(Ce(je.month,r),o);case"LL":return Ie(De(2,r),o);case"Lo":return Ie(s.ordinalNumber(r,{unit:"month"}),o);case"LLL":return s.month(r,{width:"abbreviated",context:"standalone"})||s.month(r,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(r,{width:"wide",context:"standalone"})||s.month(r,{width:"abbreviated",context:"standalone"})||s.month(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=0&&n<=11}set(r,n,s){return r.setMonth(s,1),r.setHours(0,0,0,0),r}}function vd(e,t,r){const n=pe(e),s=Zf(n,r)-t;return n.setDate(n.getDate()-s*7),n}class xd extends me{constructor(){super(...arguments);T(this,"priority",100);T(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(r,n,s){switch(n){case"w":return Ce(je.week,r);case"wo":return s.ordinalNumber(r,{unit:"week"});default:return De(n.length,r)}}validate(r,n){return n>=1&&n<=53}set(r,n,s,o){return yt(vd(r,s,o),o)}}function wd(e,t){const r=pe(e),n=zf(r)-t;return r.setDate(r.getDate()-n*7),r}class Pd extends me{constructor(){super(...arguments);T(this,"priority",100);T(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(r,n,s){switch(n){case"I":return Ce(je.week,r);case"Io":return s.ordinalNumber(r,{unit:"week"});default:return De(n.length,r)}}validate(r,n){return n>=1&&n<=53}set(r,n,s){return Vt(wd(r,s))}}const Td=[31,28,31,30,31,30,31,31,30,31,30,31],Sd=[31,29,31,30,31,30,31,31,30,31,30,31];class Ed extends me{constructor(){super(...arguments);T(this,"priority",90);T(this,"subPriority",1);T(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(r,n,s){switch(n){case"d":return Ce(je.date,r);case"do":return s.ordinalNumber(r,{unit:"date"});default:return De(n.length,r)}}validate(r,n){const s=r.getFullYear(),o=Bo(s),i=r.getMonth();return o?n>=1&&n<=Sd[i]:n>=1&&n<=Td[i]}set(r,n,s){return r.setDate(s),r.setHours(0,0,0,0),r}}class _d extends me{constructor(){super(...arguments);T(this,"priority",90);T(this,"subpriority",1);T(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(r,n,s){switch(n){case"D":case"DD":return Ce(je.dayOfYear,r);case"Do":return s.ordinalNumber(r,{unit:"date"});default:return De(n.length,r)}}validate(r,n){const s=r.getFullYear();return Bo(s)?n>=1&&n<=366:n>=1&&n<=365}set(r,n,s){return r.setMonth(0,s),r.setHours(0,0,0,0),r}}function jn(e,t,r){var v,P,l,d;const n=vr(),s=(r==null?void 0:r.weekStartsOn)??((P=(v=r==null?void 0:r.locale)==null?void 0:v.options)==null?void 0:P.weekStartsOn)??n.weekStartsOn??((d=(l=n.locale)==null?void 0:l.options)==null?void 0:d.weekStartsOn)??0,o=pe(e),i=o.getDay(),u=(t%7+7)%7,h=7-s,f=t<0||t>6?t-(i+h)%7:(u+h)%7-(i+h)%7;return Wt(o,f)}class kd extends me{constructor(){super(...arguments);T(this,"priority",90);T(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(r,n,s){switch(n){case"E":case"EE":case"EEE":return s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"EEEE":default:return s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=6}set(r,n,s,o){return r=jn(r,s,o),r.setHours(0,0,0,0),r}}class Cd extends me{constructor(){super(...arguments);T(this,"priority",90);T(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(r,n,s,o){const i=c=>{const u=Math.floor((c-1)/7)*7;return(c+o.weekStartsOn+6)%7+u};switch(n){case"e":case"ee":return Ie(De(n.length,r),i);case"eo":return Ie(s.ordinalNumber(r,{unit:"day"}),i);case"eee":return s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"eeeee":return s.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"eeee":default:return s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=6}set(r,n,s,o){return r=jn(r,s,o),r.setHours(0,0,0,0),r}}class Dd extends me{constructor(){super(...arguments);T(this,"priority",90);T(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(r,n,s,o){const i=c=>{const u=Math.floor((c-1)/7)*7;return(c+o.weekStartsOn+6)%7+u};switch(n){case"c":case"cc":return Ie(De(n.length,r),i);case"co":return Ie(s.ordinalNumber(r,{unit:"day"}),i);case"ccc":return s.day(r,{width:"abbreviated",context:"standalone"})||s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"});case"ccccc":return s.day(r,{width:"narrow",context:"standalone"});case"cccccc":return s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"});case"cccc":default:return s.day(r,{width:"wide",context:"standalone"})||s.day(r,{width:"abbreviated",context:"standalone"})||s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=0&&n<=6}set(r,n,s,o){return r=jn(r,s,o),r.setHours(0,0,0,0),r}}function Od(e,t){const r=pe(e),n=nd(r),s=t-n;return Wt(r,s)}class Nd extends me{constructor(){super(...arguments);T(this,"priority",90);T(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(r,n,s){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return De(n.length,r);case"io":return s.ordinalNumber(r,{unit:"day"});case"iii":return Ie(s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o);case"iiiii":return Ie(s.day(r,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Ie(s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o);case"iiii":default:return Ie(s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o)}}validate(r,n){return n>=1&&n<=7}set(r,n,s){return r=Od(r,s),r.setHours(0,0,0,0),r}}class jd extends me{constructor(){super(...arguments);T(this,"priority",80);T(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(r,n,s){switch(n){case"a":case"aa":case"aaa":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,s){return r.setHours(Nn(s),0,0,0),r}}class Id extends me{constructor(){super(...arguments);T(this,"priority",80);T(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(r,n,s){switch(n){case"b":case"bb":case"bbb":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,s){return r.setHours(Nn(s),0,0,0),r}}class Md extends me{constructor(){super(...arguments);T(this,"priority",80);T(this,"incompatibleTokens",["a","b","t","T"])}parse(r,n,s){switch(n){case"B":case"BB":case"BBB":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,s){return r.setHours(Nn(s),0,0,0),r}}class Rd extends me{constructor(){super(...arguments);T(this,"priority",70);T(this,"incompatibleTokens",["H","K","k","t","T"])}parse(r,n,s){switch(n){case"h":return Ce(je.hour12h,r);case"ho":return s.ordinalNumber(r,{unit:"hour"});default:return De(n.length,r)}}validate(r,n){return n>=1&&n<=12}set(r,n,s){const o=r.getHours()>=12;return o&&s<12?r.setHours(s+12,0,0,0):!o&&s===12?r.setHours(0,0,0,0):r.setHours(s,0,0,0),r}}class Ld extends me{constructor(){super(...arguments);T(this,"priority",70);T(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(r,n,s){switch(n){case"H":return Ce(je.hour23h,r);case"Ho":return s.ordinalNumber(r,{unit:"hour"});default:return De(n.length,r)}}validate(r,n){return n>=0&&n<=23}set(r,n,s){return r.setHours(s,0,0,0),r}}class Ad extends me{constructor(){super(...arguments);T(this,"priority",70);T(this,"incompatibleTokens",["h","H","k","t","T"])}parse(r,n,s){switch(n){case"K":return Ce(je.hour11h,r);case"Ko":return s.ordinalNumber(r,{unit:"hour"});default:return De(n.length,r)}}validate(r,n){return n>=0&&n<=11}set(r,n,s){return r.getHours()>=12&&s<12?r.setHours(s+12,0,0,0):r.setHours(s,0,0,0),r}}class Fd extends me{constructor(){super(...arguments);T(this,"priority",70);T(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(r,n,s){switch(n){case"k":return Ce(je.hour24h,r);case"ko":return s.ordinalNumber(r,{unit:"hour"});default:return De(n.length,r)}}validate(r,n){return n>=1&&n<=24}set(r,n,s){const o=s<=24?s%24:s;return r.setHours(o,0,0,0),r}}class $d extends me{constructor(){super(...arguments);T(this,"priority",60);T(this,"incompatibleTokens",["t","T"])}parse(r,n,s){switch(n){case"m":return Ce(je.minute,r);case"mo":return s.ordinalNumber(r,{unit:"minute"});default:return De(n.length,r)}}validate(r,n){return n>=0&&n<=59}set(r,n,s){return r.setMinutes(s,0,0),r}}class Hd extends me{constructor(){super(...arguments);T(this,"priority",50);T(this,"incompatibleTokens",["t","T"])}parse(r,n,s){switch(n){case"s":return Ce(je.second,r);case"so":return s.ordinalNumber(r,{unit:"second"});default:return De(n.length,r)}}validate(r,n){return n>=0&&n<=59}set(r,n,s){return r.setSeconds(s,0),r}}class Yd extends me{constructor(){super(...arguments);T(this,"priority",30);T(this,"incompatibleTokens",["t","T"])}parse(r,n){const s=o=>Math.trunc(o*Math.pow(10,-n.length+3));return Ie(De(n.length,r),s)}set(r,n,s){return r.setMilliseconds(s),r}}class Wd extends me{constructor(){super(...arguments);T(this,"priority",10);T(this,"incompatibleTokens",["t","T","x"])}parse(r,n){switch(n){case"X":return rt(tt.basicOptionalMinutes,r);case"XX":return rt(tt.basic,r);case"XXXX":return rt(tt.basicOptionalSeconds,r);case"XXXXX":return rt(tt.extendedOptionalSeconds,r);case"XXX":default:return rt(tt.extended,r)}}set(r,n,s){return n.timestampIsSet?r:Te(r,r.getTime()-jo(r)-s)}}class Vd extends me{constructor(){super(...arguments);T(this,"priority",10);T(this,"incompatibleTokens",["t","T","X"])}parse(r,n){switch(n){case"x":return rt(tt.basicOptionalMinutes,r);case"xx":return rt(tt.basic,r);case"xxxx":return rt(tt.basicOptionalSeconds,r);case"xxxxx":return rt(tt.extendedOptionalSeconds,r);case"xxx":default:return rt(tt.extended,r)}}set(r,n,s){return n.timestampIsSet?r:Te(r,r.getTime()-jo(r)-s)}}class Bd extends me{constructor(){super(...arguments);T(this,"priority",40);T(this,"incompatibleTokens","*")}parse(r){return Wo(r)}set(r,n,s){return[Te(r,s*1e3),{timestampIsSet:!0}]}}class Ud extends me{constructor(){super(...arguments);T(this,"priority",20);T(this,"incompatibleTokens","*")}parse(r){return Wo(r)}set(r,n,s){return[Te(r,s),{timestampIsSet:!0}]}}const qd={G:new ld,y:new fd,Y:new dd,R:new hd,u:new pd,Q:new md,q:new gd,M:new bd,L:new yd,w:new xd,I:new Pd,d:new Ed,D:new _d,E:new kd,e:new Cd,c:new Dd,i:new Nd,a:new jd,b:new Id,B:new Md,h:new Rd,H:new Ld,K:new Ad,k:new Fd,m:new $d,s:new Hd,S:new Yd,X:new Wd,x:new Vd,t:new Bd,T:new Ud},zd=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Kd=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Zd=/^'([^]*?)'?$/,Gd=/''/g,Qd=/\S/,Xd=/[a-zA-Z]/;function nt(e,t,r,n){var b,x,y,E,V,R,S,$;const s=rd(),o=(n==null?void 0:n.locale)??s.locale??qf,i=(n==null?void 0:n.firstWeekContainsDate)??((x=(b=n==null?void 0:n.locale)==null?void 0:b.options)==null?void 0:x.firstWeekContainsDate)??s.firstWeekContainsDate??((E=(y=s.locale)==null?void 0:y.options)==null?void 0:E.firstWeekContainsDate)??1,c=(n==null?void 0:n.weekStartsOn)??((R=(V=n==null?void 0:n.locale)==null?void 0:V.options)==null?void 0:R.weekStartsOn)??s.weekStartsOn??(($=(S=s.locale)==null?void 0:S.options)==null?void 0:$.weekStartsOn)??0;if(t==="")return e===""?pe(r):Te(r,NaN);const u={firstWeekContainsDate:i,weekStartsOn:c,locale:o},h=[new ud],f=t.match(Kd).map(O=>{const q=O[0];if(q in Fo){const z=Fo[q];return z(O,o.formatLong)}return O}).join("").match(zd),v=[];for(let O of f){!(n!=null&&n.useAdditionalWeekYearTokens)&&ed(O)&&$o(O,t,e),!(n!=null&&n.useAdditionalDayOfYearTokens)&&Jf(O)&&$o(O,t,e);const q=O[0],z=qd[q];if(z){const{incompatibleTokens:se}=z;if(Array.isArray(se)){const re=v.find(K=>se.includes(K.token)||K.token===q);if(re)throw new RangeError(`The format string mustn't contain \`${re.fullToken}\` and \`${O}\` at the same time`)}else if(z.incompatibleTokens==="*"&&v.length>0)throw new RangeError(`The format string mustn't contain \`${O}\` and any other token at the same time`);v.push({token:q,fullToken:O});const ae=z.run(e,O,o.match,u);if(!ae)return Te(r,NaN);h.push(ae.setter),e=ae.rest}else{if(q.match(Xd))throw new RangeError("Format string contains an unescaped latin alphabet character `"+q+"`");if(O==="''"?O="'":q==="'"&&(O=Jd(O)),e.indexOf(O)===0)e=e.slice(O.length);else return Te(r,NaN)}}if(e.length>0&&Qd.test(e))return Te(r,NaN);const P=h.map(O=>O.priority).sort((O,q)=>q-O).filter((O,q,z)=>z.indexOf(O)===q).map(O=>h.filter(q=>q.priority===O).sort((q,z)=>z.subPriority-q.subPriority)).map(O=>O[0]);let l=pe(r);if(isNaN(l.getTime()))return Te(r,NaN);const d={};for(const O of P){if(!O.validate(l,u))return Te(r,NaN);const q=O.set(l,d,u);Array.isArray(q)?(l=q[0],Object.assign(d,q[1])):l=q}return Te(r,l)}function Jd(e){return e.match(Zd)[1].replace(Gd,"'")}function eh(e){return Io(e,Date.now())}function th(e,t){return Wt(e,-t)}function rh(e,t){let r=t-On(e);return r<=0&&(r+=7),Wt(e,r)}function nh(e,t){const n=ah(e);let s;if(n.date){const u=ch(n.date,2);s=uh(u.restDateString,u.year)}if(!s||isNaN(s.getTime()))return new Date(NaN);const o=s.getTime();let i=0,c;if(n.time&&(i=lh(n.time),isNaN(i)))return new Date(NaN);if(n.timezone){if(c=fh(n.timezone),isNaN(c))return new Date(NaN)}else{const u=new Date(o+i),h=new Date(0);return h.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),h.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),h}return new Date(o+i+c)}const Ur={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},sh=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,oh=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ih=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ah(e){const t={},r=e.split(Ur.dateTimeDelimiter);let n;if(r.length>2)return t;if(/:/.test(r[0])?n=r[0]:(t.date=r[0],n=r[1],Ur.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Ur.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length))),n){const s=Ur.timezone.exec(n);s?(t.time=n.replace(s[1],""),t.timezone=s[1]):t.time=n}return t}function ch(e,t){const r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};const s=n[1]?parseInt(n[1]):null,o=n[2]?parseInt(n[2]):null;return{year:o===null?s:o*100,restDateString:e.slice((n[1]||n[2]).length)}}function uh(e,t){if(t===null)return new Date(NaN);const r=e.match(sh);if(!r)return new Date(NaN);const n=!!r[4],s=Tr(r[1]),o=Tr(r[2])-1,i=Tr(r[3]),c=Tr(r[4]),u=Tr(r[5])-1;if(n)return gh(t,c,u)?dh(t,c,u):new Date(NaN);{const h=new Date(0);return!ph(t,o,i)||!mh(t,s)?new Date(NaN):(h.setUTCFullYear(t,o,Math.max(s,i)),h)}}function Tr(e){return e?parseInt(e):1}function lh(e){const t=e.match(oh);if(!t)return NaN;const r=In(t[1]),n=In(t[2]),s=In(t[3]);return bh(r,n,s)?r*Cn+n*kn+s*1e3:NaN}function In(e){return e&&parseFloat(e.replace(",","."))||0}function fh(e){if(e==="Z")return 0;const t=e.match(ih);if(!t)return 0;const r=t[1]==="+"?-1:1,n=parseInt(t[2]),s=t[3]&&parseInt(t[3])||0;return yh(n,s)?r*(n*Cn+s*kn):NaN}function dh(e,t,r){const n=new Date(0);n.setUTCFullYear(e,0,4);const s=n.getUTCDay()||7,o=(t-1)*7+r+1-s;return n.setUTCDate(n.getUTCDate()+o),n}const hh=[31,null,31,30,31,30,31,31,30,31,30,31];function Uo(e){return e%400===0||e%4===0&&e%100!==0}function ph(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(hh[t]||(Uo(e)?29:28))}function mh(e,t){return t>=1&&t<=(Uo(e)?366:365)}function gh(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function bh(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function yh(e,t){return t>=0&&t<=59}function vh(e,t){const r=pe(e),n=r.getFullYear(),s=r.getDate(),o=Te(e,0);o.setFullYear(n,t,15),o.setHours(0,0,0,0);const i=Ho(o);return r.setMonth(t,Math.min(s,i)),r}function xh(e,t){const r=pe(e);return isNaN(+r)?Te(e,NaN):(r.setFullYear(t),r)}function Mn(e,t){return bt(e,-t)}function Rn(e,t){return xr(e,-t)}function qo(){return window.navigator.languages?window.navigator.languages[0]:window.navigator.language}function wh(e,t,r){const n=[];for(let s=e;s<=t;s++)n.push(r?r(s):s);return n}function Ph(e,t){const r=e.target;return r?!t.isSameNode(r)&&!t.contains(r):!1}function Th(e,t){return e.isSameNode(t)||e.contains(t)}function Sh(e,t){const r=Object.entries(t),n=getComputedStyle(e);for(let s=0,o=r.length;s<o;s++){const[i,c]=r[s];if(typeof c=="string"&&c.indexOf(",")>-1){if(!c.split(",").map(h=>h.trim()).includes(n[i]))return!1}else if(n[i]!==c)return!1}return!0}function Eh(e,t){const r=Object.entries(t),n=getComputedStyle(e);for(let s=0,o=r.length;s<o;s++){const[i,c]=r[s];if(typeof c=="string"&&c.indexOf(",")>-1){if(c.split(",").map(h=>h.trim()).includes(n[i]))return!0}else if(n[i]===c)return!0}return!1}function zo(e,t,r=!1,n){if(r&&Sh(e,t)){if(!n||(n==null?void 0:n(e))===!0)return e}else if(!r&&Eh(e,t)&&(!n||(n==null?void 0:n(e))===!0))return e;return e.parentElement?zo(e.parentElement,t,r,n):e}function Ko(e,t){const r=Array.from(document.querySelectorAll("body *")),n=[];for(let s=0,o=r.length;s<o;s++){const i=getComputedStyle(r[s]);i[e]&&t(i[e])&&n.push(i[e])}return n}function Hp(e){return e}function _h(e){const t=document.documentElement;Object.keys(e).forEach(r=>{t.style.setProperty(r,e[r])})}function kh(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||"#eee","--theme-bsc-black":e.black||"#000","--theme-bsc-white":e.white||"#fff","--theme-bsc-mono-dark-1":e.monoDark1||"#222","--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||"#eee","--theme-bsc-mono-light-3":e.monoLight3||"#ccc","--theme-bsc-info":e.info||"#2e7ff8","--theme-bsc-success":e.success||"#53ae0c","--theme-bsc-warning":e.warning||"#ff6914","--theme-bsc-error":e.error||"#f01616"}}var He=(e=>(e[e.Regular=24]="Regular",e[e.Small=20]="Small",e))(He||{});const Zo=({className:e})=>g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12v-.008ZM12 15h.008v.008H12V15Zm0 2.25h.008v.008H12v-.008ZM9.75 15h.008v.008H9.75V15Zm0 2.25h.008v.008H9.75v-.008ZM7.5 15h.008v.008H7.5V15Zm0 2.25h.008v.008H7.5v-.008Zm6.75-4.5h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V15Zm0 2.25h.008v.008h-.008v-.008Zm2.25-4.5h.008v.008H16.5v-.008Zm0 2.25h.008v.008H16.5V15Z"})}),Ch=({className:e})=>{const t=de("bsc:h-6 bsc:w-6",e);return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})})},Dh=({className:e})=>{const t=de("bsc:h-6 bsc:w-6",e);return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5 8.25 12l7.5-7.5"})})},Oh=({className:e})=>{const t=de("bsc:h-6 bsc:w-6",e);return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})})},Nh=({className:e})=>{const t=de("bsc:h-6 bsc:w-6",e);return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"})})},jh=({className:e})=>g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})}),Ke=({icon:e,size:t=He.Regular,onClick:r,className:n})=>{const s=p.useRef({calendar:Zo,chevronDown:Ch,chevronLeft:Dh,chevronRight:Oh,chevronUp:Nh,close:jh}),o=p.useMemo(()=>s.current[e]||Zo,[e]),i=de({"bsc:h-[24px] bsc:w-[24px]":t===He.Regular,"bsc:h-[20px] bsc:w-[20px]":t===He.Small},n);return g.jsx("div",{onClick:r,children:g.jsx(o,{className:i})})},kt=({template:e,props:t,children:r})=>e(t,r);function Ih(e,t){if(t===e)return!1;const r=Object.values(t),n=Object.values(e);if(r.length!==n.length||r.some((o,i)=>o!==n[i]))return!0;const s=Object.keys(e);return Object.keys(t).some((o,i)=>o!==s[i])}function Mh(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(Mh,{mediaQueries:{},matches:{}}):t.reduce((r,n)=>{const s=window.matchMedia(e[n]);return r.mediaQueries[n]=s,r.matches[n]=s.matches,r},{mediaQueries:{},matches:{}})}function Rh(e,t){function r(n,s){return n[s]=e.mediaQueries[s].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 Lh(e){const t=or.useRef(e),[r,n]=or.useReducer(Rh,e,Go);or.useEffect(()=>{Ih(e,t.current)&&(n({type:"setQueries",queries:e}),t.current=e)},[e]);function s(){return n({type:"updateMatches"})}function o(u){const h=s;return typeof u.addListener<"u"?u.addListener(h):u.addEventListener("change",h),h}or.useEffect(()=>{const u=Object.values(r.mediaQueries),h=u.map(o);function f(v,P){typeof v.addListener<"u"?v.removeListener(h[P]):v.removeEventListener("change",h[P])}return()=>{u.forEach(f)}},[r.mediaQueries]);const{matches:i}=r,c=or.useMemo(()=>Object.values(i),[i]);return{matches:i,matchesAny:c.some(Boolean),matchesAll:c.length>0&&c.every(Boolean)}}function qr(e){return Lh(Ah(e)).matchesAll}const Ln={};function Ah(e){return Ln[e]===void 0&&(Ln[e]={default:e}),Ln[e]}const An=({mobileQuery:e="screen and (max-device-width: 40rem)",tabletQuery:t="screen and (min-device-width: 40.01rem) and (max-device-width: 63.9375rem)",desktopQuery:r="screen and (min-device-width: 64rem)",mobileMarkup:n,aboveMobileMarkup:s,tabletMarkup:o,desktopMarkup:i})=>{const c=qr(e),u=qr(t),h=qr(r);return c&&n?n:!c&&s?s:u&&o?o:h&&i?i:(console.error("Invalid media settings"),null)};function Qo(e,t,r){const n=o=>{const i=o.target,c=e.style.display!=="hidden";e&&c&&!Th(e,i)&&!s(r,i)&&t(!1),t(!0)},s=(o,i)=>{if(!o)return!1;for(let c=0,u=o.length;c<u;c++)if(o[c].isSameNode(i)||o[c].contains(i))return!0;return!1};return document.addEventListener("mousedown",n),n}function Xo(e){document.removeEventListener("mousedown",e)}function Fh(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,o;for(o=0;o<n.length;o++)s=n[o],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}function Fn(e,t){return Fn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},Fn(e,t)}function $h(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Fn(e,t)}var zr={exports:{}},Kr={exports:{}},be={};/** @license React v16.13.1
|
|
70
68
|
* react-is.production.min.js
|
|
71
69
|
*
|
|
72
70
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
73
71
|
*
|
|
74
72
|
* This source code is licensed under the MIT license found in the
|
|
75
73
|
* LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/var
|
|
74
|
+
*/var Jo;function Hh(){if(Jo)return be;Jo=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,s=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,h=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,v=e?Symbol.for("react.suspense"):60113,P=e?Symbol.for("react.suspense_list"):60120,l=e?Symbol.for("react.memo"):60115,d=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function V(S){if(typeof S=="object"&&S!==null){var $=S.$$typeof;switch($){case t:switch(S=S.type,S){case u:case h:case n:case o:case s:case v:return S;default:switch(S=S&&S.$$typeof,S){case c:case f:case d:case l:case i:return S;default:return $}}case r:return $}}}function R(S){return V(S)===h}return be.AsyncMode=u,be.ConcurrentMode=h,be.ContextConsumer=c,be.ContextProvider=i,be.Element=t,be.ForwardRef=f,be.Fragment=n,be.Lazy=d,be.Memo=l,be.Portal=r,be.Profiler=o,be.StrictMode=s,be.Suspense=v,be.isAsyncMode=function(S){return R(S)||V(S)===u},be.isConcurrentMode=R,be.isContextConsumer=function(S){return V(S)===c},be.isContextProvider=function(S){return V(S)===i},be.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},be.isForwardRef=function(S){return V(S)===f},be.isFragment=function(S){return V(S)===n},be.isLazy=function(S){return V(S)===d},be.isMemo=function(S){return V(S)===l},be.isPortal=function(S){return V(S)===r},be.isProfiler=function(S){return V(S)===o},be.isStrictMode=function(S){return V(S)===s},be.isSuspense=function(S){return V(S)===v},be.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===n||S===h||S===o||S===s||S===v||S===P||typeof S=="object"&&S!==null&&(S.$$typeof===d||S.$$typeof===l||S.$$typeof===i||S.$$typeof===c||S.$$typeof===f||S.$$typeof===x||S.$$typeof===y||S.$$typeof===E||S.$$typeof===b)},be.typeOf=V,be}var ye={};/** @license React v16.13.1
|
|
77
75
|
* react-is.development.js
|
|
78
76
|
*
|
|
79
77
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
80
78
|
*
|
|
81
79
|
* This source code is licensed under the MIT license found in the
|
|
82
80
|
* LICENSE file in the root directory of this source tree.
|
|
83
|
-
*/var
|
|
81
|
+
*/var ei;function Yh(){return ei||(ei=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,s=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,h=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,v=e?Symbol.for("react.suspense"):60113,P=e?Symbol.for("react.suspense_list"):60120,l=e?Symbol.for("react.memo"):60115,d=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function V(A){return typeof A=="string"||typeof A=="function"||A===n||A===h||A===o||A===s||A===v||A===P||typeof A=="object"&&A!==null&&(A.$$typeof===d||A.$$typeof===l||A.$$typeof===i||A.$$typeof===c||A.$$typeof===f||A.$$typeof===x||A.$$typeof===y||A.$$typeof===E||A.$$typeof===b)}function R(A){if(typeof A=="object"&&A!==null){var Ne=A.$$typeof;switch(Ne){case t:var qe=A.type;switch(qe){case u:case h:case n:case o:case s:case v:return qe;default:var Le=qe&&qe.$$typeof;switch(Le){case c:case f:case d:case l:case i:return Le;default:return Ne}}case r:return Ne}}}var S=u,$=h,O=c,q=i,z=t,se=f,ae=n,re=d,K=l,L=r,F=o,C=s,Q=v,I=!1;function he(A){return I||(I=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),k(A)||R(A)===u}function k(A){return R(A)===h}function M(A){return R(A)===c}function N(A){return R(A)===i}function _(A){return typeof A=="object"&&A!==null&&A.$$typeof===t}function W(A){return R(A)===f}function J(A){return R(A)===n}function H(A){return R(A)===d}function U(A){return R(A)===l}function Z(A){return R(A)===r}function te(A){return R(A)===o}function D(A){return R(A)===s}function ie(A){return R(A)===v}ye.AsyncMode=S,ye.ConcurrentMode=$,ye.ContextConsumer=O,ye.ContextProvider=q,ye.Element=z,ye.ForwardRef=se,ye.Fragment=ae,ye.Lazy=re,ye.Memo=K,ye.Portal=L,ye.Profiler=F,ye.StrictMode=C,ye.Suspense=Q,ye.isAsyncMode=he,ye.isConcurrentMode=k,ye.isContextConsumer=M,ye.isContextProvider=N,ye.isElement=_,ye.isForwardRef=W,ye.isFragment=J,ye.isLazy=H,ye.isMemo=U,ye.isPortal=Z,ye.isProfiler=te,ye.isStrictMode=D,ye.isSuspense=ie,ye.isValidElementType=V,ye.typeOf=R}()),ye}var ti;function ri(){return ti||(ti=1,process.env.NODE_ENV==="production"?Kr.exports=Hh():Kr.exports=Yh()),Kr.exports}/*
|
|
84
82
|
object-assign
|
|
85
83
|
(c) Sindre Sorhus
|
|
86
84
|
@license MIT
|
|
87
|
-
*/var
|
|
88
|
-
Valid keys: `+JSON.stringify(Object.keys(S),null," "));var A=ie(B,_,V,X,Y+"."+_,r);if(A)return A}return null}return j(N)}function H(S){switch(typeof S){case"number":case"string":case"undefined":return!0;case"boolean":return!S;case"object":if(Array.isArray(S))return S.every(H);if(S===null||a(S))return!0;var N=g(S);if(N){var C=N.call(S),P;if(N!==S.entries){for(;!(P=C.next()).done;)if(!H(P.value))return!1}else for(;!(P=C.next()).done;){var V=P.value;if(V&&!H(V[1]))return!1}}else return!1;return!0;default:return!1}}function L(S,N){return S==="symbol"?!0:N?N["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&N instanceof Symbol:!1}function O(S){var N=typeof S;return Array.isArray(S)?"array":S instanceof RegExp?"object":L(N,S)?"symbol":N}function J(S){if(typeof S>"u"||S===null)return""+S;var N=O(S);if(N==="object"){if(S instanceof Date)return"date";if(S instanceof RegExp)return"regexp"}return N}function R(S){var N=J(S);switch(N){case"array":case"object":return"an "+N;case"boolean":case"date":case"regexp":return"a "+N;default:return N}}function ge(S){return!S.constructor||!S.constructor.name?x:S.constructor.name}return v.checkPropTypes=s,v.resetWarningCache=s.resetWarningCache,v.PropTypes=v,v},as}var cs,Ri;function qp(){if(Ri)return cs;Ri=1;var e=ss();function t(){}function r(){}return r.resetWarningCache=t,cs=function(){function n(i,a,u,f,h,g){if(g!==e){var x=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 x.name="Invariant Violation",x}}n.isRequired=n;function s(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:s,element:n,elementType:n,instanceOf:s,node:n,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:r,resetWarningCache:t};return o.PropTypes=o,o},cs}if(process.env.NODE_ENV!=="production"){var Kp=ki(),Gp=!0;ts.exports=zp()(Kp.isElement,Gp)}else ts.exports=qp()();var Zp=ts.exports;const ue=hn(Zp),Ai={disabled:!1};var Qp=process.env.NODE_ENV!=="production"?ue.oneOfType([ue.number,ue.shape({enter:ue.number,exit:ue.number,appear:ue.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&ue.oneOfType([ue.string,ue.shape({enter:ue.string,exit:ue.string,active:ue.string}),ue.shape({enter:ue.string,enterDone:ue.string,enterActive:ue.string,exit:ue.string,exitDone:ue.string,exitActive:ue.string})]);const Li=d.createContext(null);var Xp=function(t){return t.scrollTop},Or="unmounted",Ot="exited",Dt="entering",Zt="entered",us="exiting",bt=function(e){Yp(t,e);function t(n,s){var o;o=e.call(this,n,s)||this;var i=s,a=i&&!i.isMounting?n.enter:n.appear,u;return o.appearStatus=null,n.in?a?(u=Ot,o.appearStatus=Dt):u=Zt:n.unmountOnExit||n.mountOnEnter?u=Or:u=Ot,o.state={status:u},o.nextCallback=null,o}t.getDerivedStateFromProps=function(s,o){var i=s.in;return i&&o.status===Or?{status:Ot}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(s){var o=null;if(s!==this.props){var i=this.state.status;this.props.in?i!==Dt&&i!==Zt&&(o=Dt):(i===Dt||i===Zt)&&(o=us)}this.updateStatus(!1,o)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var s=this.props.timeout,o,i,a;return o=i=a=s,s!=null&&typeof s!="number"&&(o=s.exit,i=s.enter,a=s.appear!==void 0?s.appear:i),{exit:o,enter:i,appear:a}},r.updateStatus=function(s,o){if(s===void 0&&(s=!1),o!==null)if(this.cancelNextCallback(),o===Dt){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:Je.findDOMNode(this);i&&Xp(i)}this.performEnter(s)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ot&&this.setState({status:Or})},r.performEnter=function(s){var o=this,i=this.props.enter,a=this.context?this.context.isMounting:s,u=this.props.nodeRef?[a]:[Je.findDOMNode(this),a],f=u[0],h=u[1],g=this.getTimeouts(),x=a?g.appear:g.enter;if(!s&&!i||Ai.disabled){this.safeSetState({status:Zt},function(){o.props.onEntered(f)});return}this.props.onEnter(f,h),this.safeSetState({status:Dt},function(){o.props.onEntering(f,h),o.onTransitionEnd(x,function(){o.safeSetState({status:Zt},function(){o.props.onEntered(f,h)})})})},r.performExit=function(){var s=this,o=this.props.exit,i=this.getTimeouts(),a=this.props.nodeRef?void 0:Je.findDOMNode(this);if(!o||Ai.disabled){this.safeSetState({status:Ot},function(){s.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:us},function(){s.props.onExiting(a),s.onTransitionEnd(i.exit,function(){s.safeSetState({status:Ot},function(){s.props.onExited(a)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(s,o){o=this.setNextCallback(o),this.setState(s,o)},r.setNextCallback=function(s){var o=this,i=!0;return this.nextCallback=function(a){i&&(i=!1,o.nextCallback=null,s(a))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},r.onTransitionEnd=function(s,o){this.setNextCallback(o);var i=this.props.nodeRef?this.props.nodeRef.current:Je.findDOMNode(this),a=s==null&&!this.props.addEndListener;if(!i||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],f=u[0],h=u[1];this.props.addEndListener(f,h)}s!=null&&setTimeout(this.nextCallback,s)},r.render=function(){var s=this.state.status;if(s===Or)return null;var o=this.props,i=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var a=Hp(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return d.createElement(Li.Provider,{value:null},typeof i=="function"?i(s,a):d.cloneElement(d.Children.only(i),a))},t}(d.Component);bt.contextType=Li,bt.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:ue.shape({current:typeof Element>"u"?ue.any:function(e,t,r,n,s,o){var i=e[t];return ue.instanceOf(i&&"ownerDocument"in i?i.ownerDocument.defaultView.Element:Element)(e,t,r,n,s,o)}}),children:ue.oneOfType([ue.func.isRequired,ue.element.isRequired]).isRequired,in:ue.bool,mountOnEnter:ue.bool,unmountOnExit:ue.bool,appear:ue.bool,enter:ue.bool,exit:ue.bool,timeout:function(t){var r=Qp;t.addEndListener||(r=r.isRequired);for(var n=arguments.length,s=new Array(n>1?n-1:0),o=1;o<n;o++)s[o-1]=arguments[o];return r.apply(void 0,[t].concat(s))},addEndListener:ue.func,onEnter:ue.func,onEntering:ue.func,onEntered:ue.func,onExit:ue.func,onExiting:ue.func,onExited:ue.func}:{};function Qt(){}bt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Qt,onEntering:Qt,onEntered:Qt,onExit:Qt,onExiting:Qt,onExited:Qt},bt.UNMOUNTED=Or,bt.EXITED=Ot,bt.ENTERING=Dt,bt.ENTERED=Zt,bt.EXITING=us;const Jp=bt,$i=({start:e,timeout:t=400,defaultStyle:r,transitionStyles:n,showTransitionOptions:s="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:o="linear",unmountOnExit:i=!1,onEntering:a,onEntered:u,onExit:f,onExited:h,children:g})=>{const x=r||{transition:`opacity ${t}ms ${s}`,opacity:0},v=n||{entering:{opacity:1},entered:{opacity:1},exiting:{transition:`opacity ${t}ms ${o}`,opacity:0},exited:{transition:`opacity ${t}ms ${o}`,opacity:0},unmounted:{}};return p.jsx(Jp,{in:e,timeout:t,onEntering:a,onEntered:u,onExit:f,onExited:h,unmountOnExit:i,children:T=>g({state:T,defaultStyle:x,transitionStyles:v})})};function Fi(e){return e.target?e.target:e}const Hi=({visible:e,target:t,appendTo:r=document.body,unmountWhenHidden:n=!1,transitionDuration:s=400,showTransitionOptions:o="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:i="linear",approveText:a="DONE",shown:u,hidden:f,isClickedWithin:h,children:g})=>{const[x,v]=d.useState(-1),[T,I]=d.useState(-1),[j,E]=d.useState(e),D=d.useRef(100),Q=d.useRef(101),U=d.useRef(),y=d.useRef(),F=d.useRef();d.useEffect(()=>{t&&(U.current=Fi(t));const M=xi("zIndex",H=>H==="auto"||H==="-1"?!1:parseInt(H)>100).map(H=>parseInt(H,10));M.length>0&&(D.current=Math.max(...M)+1,Q.current=Math.max(...M)+2),E(e)},[e,t]);const k=M=>{y.current=M},q=()=>{I(D.current),v(Q.current)},z=()=>{if(!y.current)return;u==null||u();let M;U.current&&(M=[U.current]);const H=L=>{L?h==null||h():E(!1)};F.current=Si(y.current,H,M)},oe=()=>{F.current&&Ti(F.current)},ce=()=>{I(-1),v(-1),f==null||f()},ne={entering:{opacity:.5},entered:{opacity:.5}};return Je.createPortal(p.jsx($i,{start:j,timeout:s,showTransitionOptions:o,hideTransitionOptions:i,onEntering:q,onEntered:z,onExit:oe,onExited:ce,unmountOnExit:n,children:({state:M,defaultStyle:H,transitionStyles:L})=>p.jsxs("div",{ref:O=>O&&k(O),children:[p.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,...L[M],...ne[M]}}),p.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:x,...H,...L[M]},children:[p.jsx("div",{className:"bsc-w-full",children:g}),p.jsx(p.Fragment,{children:p.jsx(ot,{buttonType:"primary",fullWidth:!0,onClick:()=>E(!1),className:"bsc-text-xs bsc-font-bold",children:a})})]})]})}),r)};var Yi=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(Yi||{}),Vi=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(Vi||{});class _e{static positionToTarget(t,r=2){const n=t.getBoundingClientRect();let s=0,o=0;const i=window.scrollY;switch(r){case 2:s=n.top+n.height+i,o=n.left;break;case 0:s=n.top+i,o=n.left;break;case 3:s=n.top+n.height+i,o=n.left+n.width;break;case 1:s=n.top+i,o=n.left+n.width}return{top:s,left:o}}static positionElementToTarget(t,r,n=0,s=2){let{left:o,top:i}=_e.positionToTarget(r,s);const a=t.getBoundingClientRect();switch(n){case 0:break;case 1:o=o-a.width;break;case 2:i=i-a.height;break;case 3:i=i-a.height,o=o-a.width;break}return{top:i,left:o}}static canPositionElementOnScreenWithTarget(t,r){const n=_e.getScreenDimensions(),s=t.getBoundingClientRect(),o=_e.positionElementToTarget(t,r,0,2);if(o.left+s.width<n.width&&o.top+s.height<n.height||_e.positionElementToTarget(t,r,1,3).left>=0&&o.top+s.height<n.height)return!0;const a=_e.positionElementToTarget(t,r,2,0);if(a.left+s.width<n.width&&a.top>=0)return!0;const u=_e.positionElementToTarget(t,r,3,1);return u.left>=0&&u.top>=0}static canPositionElementOnScreen(t){const r=_e.getScreenDimensions(),n=t.getBoundingClientRect();return n.width<=r.width&&n.height<=r.height}static positionElementToTargetOnScreen(t,r,n=0,s=2){const{left:o,top:i}=_e.positionElementToTarget(t,r,n,s),a=t.getBoundingClientRect(),u=_e.determineOffScreenLocation(a);if(u){if(n===0&&s===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&&s===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:i,left:o}}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 Wi=({visible:e,target:t,targetPosition:r=Yi.BottomLeft,elementAlignment:n=Vi.TopLeft,shouldTargetCloseOverlay:s=!0,shouldMatchTargetWidth:o=!1,shouldScrollCloseOverlay:i=!1,shouldCheckZIndex:a=!1,shouldRemainOnScreen:u=!1,unmountWhenHidden:f=!1,transitionDuration:h=400,showTransitionOptions:g="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:x="linear",shown:v,hidden:T,isClickedWithin:I,markupCreated:j,children:E})=>{const[D,Q]=d.useState(-1),[U,y]=d.useState(e),[F,k]=d.useState(!1),q=d.useRef(!1),z=d.useRef(100),oe=d.useRef({left:0,top:0,width:0}),ce=d.useRef(),ne=d.useRef(),M=d.useRef(),H=d.useRef(),L=d.useRef(),O=d.useRef(),J=ws();d.useEffect(()=>(u===!0&&(O.current=new ResizeObserver(R)),()=>{var Y,B;u===!0&&(ne.current&&((Y=O.current)==null||Y.unobserve(ne.current)),(B=O.current)==null||B.disconnect())}),[]),d.useEffect(()=>{if(t&&(ce.current=Fi(t),i)){const Y=J==null?void 0:J.isValidScrollableElement;M.current=vi(ce.current,{overflow:"scroll, auto",overflowX:"scroll, auto",overflowY:"scroll, auto"},!1,Y),M.current.tagName.toLowerCase()==="html"&&(M.current=document)}if(a){const Y=xi("zIndex",B=>parseInt(B)>=100).map(B=>parseInt(B));Y.length>0&&(z.current=Math.max(...Y)+1)}e!==void 0&&y(e)},[t,e,i,a]);const R=Y=>{if(ne.current){const B=_e.getScreenDimensions(),K=Y[Y.length-1].target,re=K.getBoundingClientRect(),_=_e.determineOffScreenLocation(re);if(_){if(ce.current&&_e.canPositionElementOnScreenWithTarget(K,ce.current)){const ie=_e.positionElementToTargetOnScreen(ne.current,ce.current,n,r);oe.current={...oe.current,...ie}}else _.right?oe.current.left=B.width-re.width:_.left&&(oe.current.left=0),_.bottom?oe.current.top=B.height-re.height:_.top&&(oe.current.top=0);ge()}}},ge=Sr(()=>{q.current=!q.current,k(q.current)},20),S=()=>{Q(z.current)},N=()=>{if(!ne.current)return;v==null||v();let Y;!s&&ce.current&&(Y=[ce.current]);const B=K=>{K?I==null||I():y(!1)};H.current=Si(ne.current,B,Y),i&&(L.current=cd(K=>ne.current&&Tp(K,ne.current)&&y(!1),100,{leading:!0}),M.current&&M.current.addEventListener("scroll",L.current))},C=()=>{M.current&&L.current&&(M.current.removeEventListener("scroll",L.current),L.current=void 0),H.current&&Ti(H.current)},P=()=>{Q(-1),T==null||T()},V=Y=>{var B,K;if(u===!0&&ne.current&&((B=O.current)==null||B.unobserve(ne.current)),ne.current=Y,j==null||j(Y),ce.current){const re=_e.positionElementToTarget(ne.current,ce.current,n,r);oe.current={...re,width:ce.current.offsetWidth},u===!0&&(_e.canPositionElementOnScreenWithTarget(ne.current,ce.current)||_e.canPositionElementOnScreen(ne.current))&&((K=O.current)==null||K.observe(ne.current))}},X=d.useMemo(()=>{const Y={top:`${oe.current.top}px`,left:`${oe.current.left}px`,zIndex:D};return o&&(Y.width=`${oe.current.width}px`),Y},[F,D,o]);return p.jsx($i,{start:U,timeout:h,showTransitionOptions:g,hideTransitionOptions:x,onEntering:S,onEntered:N,onExit:C,onExited:P,unmountOnExit:f,children:({state:Y,defaultStyle:B,transitionStyles:K})=>p.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:{...X,...B,...K[Y]},ref:re=>re&&V(re),children:E})})};let tn;const em=new Uint8Array(16);function tm(){if(!tn&&(tn=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!tn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return tn(em)}const Ye=[];for(let e=0;e<256;++e)Ye.push((e+256).toString(16).slice(1));function rm(e,t=0){return Ye[e[t+0]]+Ye[e[t+1]]+Ye[e[t+2]]+Ye[e[t+3]]+"-"+Ye[e[t+4]]+Ye[e[t+5]]+"-"+Ye[e[t+6]]+Ye[e[t+7]]+"-"+Ye[e[t+8]]+Ye[e[t+9]]+"-"+Ye[e[t+10]]+Ye[e[t+11]]+Ye[e[t+12]]+Ye[e[t+13]]+Ye[e[t+14]]+Ye[e[t+15]]}const Bi={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function nm(e,t,r){if(Bi.randomUUID&&!t&&!e)return Bi.randomUUID();e=e||{};const n=e.random||(e.rng||tm)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let s=0;s<16;++s)t[r+s]=n[s];return t}return rm(n)}class Dr{static create(t){const r=[];let n=0;for(let s=0,o=t.formatParts.length;s<o;s++){const i=t.formatParts[s],a=n,u=a+i.characterCount;r.push({startPosition:a,endPosition:u,...i}),n=u}return r}}class sm{constructor(t,r){b(this,"instanceCollection");b(this,"formatPartList");b(this,"inputSlotCollection");b(this,"currentPartIndex",0);b(this,"currentPartIndices",[]);b(this,"currentCursorPosition",0);b(this,"highlightCursorPosition",0);b(this,"currentCursorStartPosition",-1);b(this,"currentCursorEndPosition",-1);b(this,"inputElement");b(this,"inputSelection",null);b(this,"inputRange");b(this,"textNode");this.instanceCollection=Xt.getInstance(),this.formatPartList=Dr.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t)}get isSelection(){return this.inputRange!==void 0&&this.inputRange.startOffset!==this.inputRange.endOffset}get isAllSelected(){var r;const t=this.inputSlotCollection.getLastSlot();return this.isSelection&&((r=this.inputRange)==null?void 0:r.startOffset)===0&&this.inputRange.endOffset===t.endPosition}getCursorPosition(){return this.currentCursorPosition}getCursorStartPosition(){return this.currentCursorStartPosition}getCursorEndPosition(){return this.currentCursorEndPosition}getCurrentPartIndex(){return this.currentPartIndex}getCurrentPartIndices(){return this.currentPartIndices}setInputElement(t){this.inputElement=t}setCursorToCurrentPosition(){this.setCursorSelection(this.currentCursorPosition>-1?this.currentCursorPosition:this.highlightCursorPosition)}setCursorPosition(t){this.setCursorSelection(t)}setCursorSelection(t,r){if(this.createInputRangeSelection(),this.inputRange&&this.textNode){let n,s,o=!0;r===void 0?(n=t,s=t):t<r?(n=t,s=r):(o=!1,n=r,s=t),this.inputRange.setStart(this.textNode,n),this.inputRange.setEnd(this.textNode,s),this.currentPartIndices=[],n===s?(this.currentCursorPosition=s,this.highlightCursorPosition=s,this.currentCursorStartPosition=-1,this.currentCursorEndPosition=-1,this.setPartIndexByCursorPosition()):(o?this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1?this.highlightCursorPosition=s:this.currentCursorStartPosition!==n?this.highlightCursorPosition=n:this.currentCursorEndPosition!==s&&(this.highlightCursorPosition=s):this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1?this.highlightCursorPosition=n:this.currentCursorStartPosition!==s?this.highlightCursorPosition=s:this.currentCursorEndPosition!==n&&(this.highlightCursorPosition=n),this.currentCursorStartPosition=n,this.currentCursorEndPosition=s,this.currentCursorPosition=-1,this.setPartIndexByHighlightPosition(),this.setPartIndicesByCursorPositions())}}findCursorPosition(){var n;const t=window.getSelection(),r=t==null?void 0:t.getRangeAt(0);if(this.inputElement&&t&&r){const s=document.createTreeWalker(this.inputElement,NodeFilter.SHOW_TEXT,u=>{const f=document.createRange();return f.selectNodeContents(u),f.compareBoundaryPoints(Range.END_TO_END,r)<1?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});let o=0;for(;s.nextNode();)o+=((n=s.currentNode.textContent)==null?void 0:n.length)||0;r.startContainer.nodeType===Node.TEXT_NODE&&(o+=r.startOffset);const i=this.inputSlotCollection.getLastSlotWithData(),a=i.startPosition+i.partText.length;t.anchorOffset===t.focusOffset?this.setCursorSelection(o>a?a:o):this.setCursorSelection(t.anchorOffset,t.focusOffset)}}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.updateCursorPosition(),this.currentCursorPosition>0&&!this.isSelection){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--)if(r=this.formatPartList[n],t>=r.startPosition&&t<=r.endPosition){r.isSeparator?this.setCursorSelection(this.formatPartList[n-1].endPosition):this.setCursorSelection(t);break}}else this.isSelection?this.setCursorSelection(this.currentCursorPosition):this.moveHome()}moveCursorRight(){this.updateCursorPosition(!1);const t=this.inputSlotCollection.getLastSlotWithData(),r=t.startPosition+t.partText.length;if(this.currentCursorPosition<r&&!this.isSelection){const n=this.currentCursorPosition+1;let s=this.formatPartList[this.currentPartIndex];if(n>=s.startPosition&&n<=s.endPosition)this.setCursorSelection(n);else for(let o=this.currentPartIndex+1,i=this.formatPartList.length;o<i;o++)if(s=this.formatPartList[o],n>=s.startPosition&&n<=s.endPosition){s.isSeparator?this.setCursorSelection(this.formatPartList[o+1].startPosition):this.setCursorSelection(n);break}}else this.setCursorSelection(this.currentCursorPosition)}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))}}highlightAll(){const t=this.formatPartList[this.formatPartList.length-1].endPosition;this.setCursorSelection(0,t)}moveHighlightLeft(){this.updateHighlightPositions();const t=this.highlightCursorPosition>this.currentCursorStartPosition;if(this.currentCursorStartPosition>0||t){let r=t?this.currentCursorStartPosition:this.currentCursorStartPosition-1,n=t?this.highlightCursorPosition-1:this.currentCursorEndPosition,s=this.formatPartList[this.currentPartIndex];if(r>=s.startPosition&&r<=s.endPosition||t&&n>=s.startPosition&&n<=s.endPosition)this.setCursorSelection(r,n);else for(let o=this.currentPartIndex-1;o>=0;o--)if(s=this.formatPartList[o],r>=s.startPosition&&r<=s.endPosition||t&&n>=s.startPosition&&n<=s.endPosition){s.isSeparator?(t?n=this.formatPartList[o-1].endPosition:r=this.formatPartList[o-1].endPosition,this.setCursorSelection(r,n)):this.setCursorSelection(r,n);break}}}moveHighlightRight(){this.updateHighlightPositions();const t=this.inputSlotCollection.getLastSlotWithData(),r=t.startPosition+t.partText.length,n=this.highlightCursorPosition<this.currentCursorEndPosition;if(this.currentCursorEndPosition<r||n){let s=n?this.highlightCursorPosition+1:this.currentCursorStartPosition,o=n?this.currentCursorEndPosition:this.currentCursorEndPosition+1,i=this.formatPartList[this.currentPartIndex];if(o>=i.startPosition&&o<=i.endPosition||n&&s>=i.startPosition&&s<=i.endPosition)this.setCursorSelection(s,o);else for(let a=this.currentPartIndex+1,u=this.formatPartList.length;a<u;a++)if(i=this.formatPartList[a],o>=i.startPosition&&o<=i.endPosition||n&&s>=i.startPosition&&s<=i.endPosition){i.isSeparator?(n?s=this.formatPartList[a+1].startPosition:o=this.formatPartList[a+1].startPosition,this.setCursorSelection(s,o)):this.setCursorSelection(s,o);break}}}updateHighlightPositions(){this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1&&this.currentCursorPosition>-1&&(this.currentCursorStartPosition=this.currentCursorPosition,this.currentCursorEndPosition=this.currentCursorPosition,this.highlightCursorPosition=this.currentCursorPosition)}updateCursorPosition(t=!0){this.currentCursorPosition===-1&&this.currentCursorStartPosition>-1&&this.currentCursorEndPosition>-1&&(t?this.currentCursorPosition=this.currentCursorStartPosition:this.currentCursorPosition=this.currentCursorEndPosition)}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}}}setPartIndexByHighlightPosition(){for(let t=0;t<this.formatPartList.length;t++){const r=this.formatPartList[t];if(this.highlightCursorPosition>=r.startPosition&&this.highlightCursorPosition<=r.endPosition){if(r.isSeparator){this.highlightCursorPosition=this.formatPartList[t+1].startPosition,this.currentPartIndex=t+1;break}this.currentPartIndex=t;break}}}setPartIndicesByCursorPositions(){for(let t=0,r=this.formatPartList.length;t<r;t++){const n=this.formatPartList[t];n.isSeparator||(n.startPosition>=this.currentCursorStartPosition&&n.startPosition<=this.currentCursorEndPosition||n.endPosition>=this.currentCursorStartPosition&&n.endPosition<=this.currentCursorEndPosition||n.startPosition<this.currentCursorStartPosition&&n.endPosition>this.currentCursorEndPosition)&&this.currentPartIndices.push(t)}}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 om{static create(t){const r=[];for(let n=0,s=t.length;n<s;n++){const o=t[n];o.isSeparator||r.push({partIndex:n,partText:"",isComplete:!1,...o})}return r}}class im{constructor(t){b(this,"inputSlots");this.inputSlots=om.create(Dr.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)}getSlots(t){return this.inputSlots.filter(r=>t.includes(r.partIndex))}getSlotsFromCursorPosition(t){let r=-1;for(let n=0,s=this.inputSlots.length;n<s;n++){const o=this.inputSlots[n];if(t>=o.startPosition&&t<=o.endPosition){r=o.partIndex;break}}return r>-1?this.inputSlots.filter(n=>n.partIndex>=r):void 0}getFirstSlot(){return this.inputSlots[0]}getLastSlot(){return this.inputSlots[this.inputSlots.length-1]}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,s=this.inputSlots.length;n<s;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 Xt{static getInstance(){return this.instance||(this.instance=new am),this.instance}}b(Xt,"instance");class am{constructor(){b(this,"navigatorInstances");b(this,"inputSlotInstances");this.navigatorInstances={},this.inputSlotInstances={}}getNavigatorInstance(t,r){return this.navigatorInstances[t]||(this.navigatorInstances[t]=new sm(r,t)),this.navigatorInstances[t]}getInputSlotInstance(t,r){return this.inputSlotInstances[t]||(this.inputSlotInstances[t]=new im(r)),this.inputSlotInstances[t]}removeInstances(t){this.navigatorInstances[t]&&delete this.navigatorInstances[t],this.inputSlotInstances[t]&&delete this.inputSlotInstances[t]}}class ls{constructor(t,r){b(this,"instanceCollection");b(this,"formatPartList");b(this,"inputSlotCollection");b(this,"inputElement");this.instanceCollection=Xt.getInstance(),this.formatPartList=Dr.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t)}setInputElement(t){this.inputElement=t}render(){var r;let t="";for(let n=0,s=this.formatPartList.length;n<s;n++){const o=this.formatPartList[n];if(o.isSeparator)t+=o.inputText;else{const i=this.inputSlotCollection.getSlot(n);i&&(t+=i.partText+((r=i.inputText)==null?void 0:r.repeat(i.characterCount-i.partText.length)))}}this.inputElement&&(this.inputElement.innerHTML=t)}}var lt=(e=>(e[e.Text=0]="Text",e[e.Numeric=1]="Numeric",e))(lt||{});class Ui{constructor(){b(this,"numberKeys",["0","1","2","3","4","5","6","7","8","9"]);b(this,"movementKeys",["ArrowLeft","ArrowRight","Home","End","a"]);b(this,"editingKeys",["Backspace","Delete"]);b(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 cm{constructor(t){b(this,"_currentIndex",0);b(this,"index",0);b(this,"formatParts");this.formatParts=Dr.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 um{constructor(t){b(this,"formatParts");this.formatParts=Dr.create(t)}getUniqueSeparators(){const t=[],r=this.formatParts.filter(n=>n.isSeparator);for(let n=0,s=r.length;n<s;n++){const o=r[n];o.inputText&&!t.includes(o.inputText)&&t.push(o.inputText)}return t}}class zi{constructor(t,r){b(this,"instanceCollection");b(this,"inputSlotCollection");b(this,"formatNavigator");b(this,"keyTypeChecker");b(this,"formatRenderer");b(this,"formatPartList");b(this,"partEntryList");this.format=t,this.instanceCollection=Xt.getInstance(),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,t),this.keyTypeChecker=new Ui,this.formatRenderer=new ls(t,r),this.formatPartList=new cm(t),this.partEntryList=new um(t)}setInputElement(t){this.formatRenderer.setInputElement(t)}processKeyPress(t){if(this.keyTypeChecker.isEditingKey(t)){this.processEditRules(t);return}this.formatNavigator.isSelection?(this.processSelectionEditRules(),setTimeout(()=>this.processInputRules(t))):this.processInputRules(t)}processInputValue(t){var n;this.inputSlotCollection.clearAllSlots(),this.formatPartList.reset();let r=0;for(;this.formatPartList.hasNext();){const s=this.formatPartList.next();if(s&&!s.isSeparator)if(((n=this.formatPartList.peek())==null?void 0:n.isSeparator)===!0){const o=this.formatPartList.currentIndex,i=this.formatPartList.next();if(i&&i.inputText){const a=t.indexOf(i.inputText,r),u=this.inputSlotCollection.getSlot(o);if(u&&a>-1){const f=a-r>u.characterCount?r+u.characterCount:a;u.partText=t.substring(r,f),this.processSlotRules(u),r=a+i.characterCount}}}else{const o=this.inputSlotCollection.getSlot(this.formatPartList.currentIndex);o&&(o.partText=t.substring(r,r+o.characterCount),this.processSlotRules(o))}}}processPastedValue(t,r=!1){r&&this.processSelectionEditRules();const n=this.formatNavigator.getCursorPosition(),s=this.inputSlotCollection.getSlotsFromCursorPosition(n);if(s){const o=n-s[0].startPosition,i=s[0].partText.substring(0,o);let a=s[0].partText.substring(o);s[0].partText="";for(let g=1,x=s.length;g<x;g++)a+=s[g].partText,s[g].partText="";const u=this.removeSeparatorsFromValue(t),f=i+u+a;let h=0;for(let g=0,x=s.length;g<x;g++){const v=s[g];v.partText=f.substring(h,v.characterCount+h),h+=v.characterCount,this.processSlotRules(v)}}}removeSeparatorsFromValue(t){let r=t;const n=this.partEntryList.getUniqueSeparators();for(let s=0,o=n.length;s<o;s++){const i=n[s];r=r.replaceAll(i,"")}return r}processEditRules(t){this.formatNavigator.isSelection?this.processSelectionEditRules():this.processNonSelectionEditRules(t)}processNonSelectionEditRules(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!r)return;const n=this.formatNavigator.getCursorPosition(),s=n-r.startPosition,o=this.format.deleteShiftsFormatPart||!1;switch(t.key){case"Backspace":{if(!(r.startPosition===n))r.partText=r.partText.substring(0,s-1)+r.partText.substring(s),o&&this.shiftFormatParts(r),this.formatRenderer.render(),this.formatNavigator.moveCursorLeft(),this.processSlotRules(r,!0);else{this.processSlotRules(r,!0);const a=this.inputSlotCollection.getPreviousSlot(r.partIndex);a&&(a.partText=a.partText.substring(0,a.partText.length-1),o&&this.shiftFormatParts(a),this.formatRenderer.render(),this.formatNavigator.setCursorPosition(a.startPosition+a.partText.length),this.processSlotRules(a,!0))}break}case"Delete":r.partText=r.partText.substring(0,s)+r.partText.substring(s+1),o&&this.shiftFormatParts(r),this.formatRenderer.render(),this.formatNavigator.setCursorToCurrentPosition(),this.processSlotRules(r,!0);break}}processSelectionEditRules(){const t=this.inputSlotCollection.getSlots(this.formatNavigator.getCurrentPartIndices());if(t.length<=0)return;const r=this.formatNavigator.getCursorStartPosition(),n=this.formatNavigator.getCursorEndPosition();for(let s=0,o=t.length;s<o;s++){const i=t[s];i.startPosition>=r&&i.endPosition<=n?i.partText="":i.startPosition>=r&&i.endPosition>n?i.partText=i.partText.substring(n-i.startPosition):i.startPosition<r&&i.endPosition<=n?i.partText=i.partText.substring(0,r-i.startPosition):i.startPosition<r&&i.endPosition>n&&(i.partText=i.partText.substring(0,r-i.startPosition)+i.partText.substring(n-i.startPosition))}this.formatRenderer.render(),this.formatNavigator.setCursorPosition(r);for(let s=0,o=t.length;s<o;s++)this.processSlotRules(t[s])}shiftFormatParts(t){let r=t,n;for(;(n=this.inputSlotCollection.getNextSlot(r.partIndex))!==void 0;){const s=n.partText.substring(0,1);n.partText=n.partText.substring(1),r.partText=r.partText+s,r=n}}processInputRules(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!r)return;const{key:n}=t,s=r.characterCount,o=r.partText;if(r.valueType===lt.Numeric){if(!this.keyTypeChecker.isNumberKey(n))return;const i=r.maximumValue,a=r.exceedingMaximumValueCausesTab||!1,u=r.padWithZeros||!1,f=parseInt(this.createNewValue(r,n));if(i&&f>i)if(a){u&&(r.partText=r.partText.padStart(s,"0")),r.isComplete=!0;const h=this.inputSlotCollection.getNextSlot(r.partIndex);h&&!h.isComplete&&(h.partText=n),this.formatRenderer.render(),h&&this.formatNavigator.setCursorPosition(h.isComplete?h.startPosition:h.startPosition+1)}else return;else o.length+1===s?(this.addToInputSlot(n),r.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):o.length+1<s&&(this.addToInputSlot(n),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}else o.length+1===s?(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,s=this.formatNavigator.getCursorPosition();if(s>=t.startPosition+t.partText.length)return n+r;{const o=s-t.startPosition;return n.substring(0,o)+r+n.substring(o)}}processSlotRules(t,r=!1){const n=t.characterCount,s=t.allCharactersRequired||!1;if(t.valueType===lt.Numeric){const o=t.minimumValue,i=t.maximumValue;if(s)t.isComplete=t.partText.length===n;else if(o!==void 0&&i!==void 0){const a=t.padWithZeros||!1,u=parseInt(t.partText);t.isComplete=u>=o&&u<=i,t.isComplete&&a&&!r&&(t.partText=t.partText.padStart(n,"0"))}else t.isComplete=t.partText.length>0}else s?t.isComplete=t.partText.length===n:t.isComplete=t.partText.length>0}}class lm{constructor(t,r){b(this,"instanceCollection");b(this,"formatNavigator");b(this,"ruleProcessor");b(this,"keyTypeChecker");b(this,"formatRenderer");this.format=t,this.instanceCollection=Xt.getInstance(),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,t),this.ruleProcessor=new zi(t,r),this.keyTypeChecker=new Ui,this.formatRenderer=new ls(t,r)}setInputElement(t){this.ruleProcessor.setInputElement(t),this.formatRenderer.setInputElement(t)}processMovementKey(t){const{key:r,metaKey:n,ctrlKey:s,shiftKey:o}=t;switch(r){case"ArrowLeft":o?this.formatNavigator.moveHighlightLeft():n?this.formatNavigator.moveHome():this.formatNavigator.moveCursorLeft();break;case"ArrowRight":o?this.formatNavigator.moveHighlightRight():n?this.formatNavigator.moveEnd():this.formatNavigator.moveCursorRight();break;case"Home":this.formatNavigator.moveHome();break;case"End":this.formatNavigator.moveEnd();break;case"a":(n||s)&&this.formatNavigator.highlightAll();break}}processKeyPress(t){return this.keyTypeChecker.isIgnoreKey(t)?!1:this.keyTypeChecker.isMovementKey(t)?(this.processMovementKey(t),!1):(this.ruleProcessor.processKeyPress(t),!0)}}class fm{constructor(t,r=""){b(this,"instanceId");b(this,"instanceCollection");b(this,"keyProcessor");b(this,"formatNavigator");b(this,"formatRenderer");b(this,"inputSlotCollection");b(this,"inputRuleProcessor");b(this,"previousOutputValue","");b(this,"inputElementSet",!1);b(this,"isInputFocused",!1);b(this,"inputElement");b(this,"onFormatChange");this.inputValue=r,this.instanceId=nm(),this.instanceCollection=Xt.getInstance(),this.keyProcessor=new lm(t,this.instanceId),this.formatNavigator=this.instanceCollection.getNavigatorInstance(this.instanceId,t),this.formatRenderer=new ls(t,this.instanceId),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(this.instanceId,t),this.inputRuleProcessor=new zi(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),this.renderFormat())}pastedValue(t){t.length>0&&(this.formatNavigator.isSelection?this.formatNavigator.isAllSelected?this.inputValuePassed(t):this.inputRuleProcessor.processPastedValue(t,!0):this.inputValue.length===0?this.inputValuePassed(t):this.inputRuleProcessor.processPastedValue(t),this.renderFormat(!0))}registerFormatChangeEvent(t){this.onFormatChange=t}mouseUpHandler(){this.formatNavigator.findCursorPosition()}keyDownHandler(t){if(t.key!=="Tab"){if(!(t.key==="c"&&(t.ctrlKey||t.metaKey))&&!(t.key==="x"&&(t.ctrlKey||t.metaKey))&&!(t.key==="v"&&(t.ctrlKey||t.metaKey)))t.preventDefault(),t.stopPropagation();else return;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)}renderFormat(t=!1){setTimeout(()=>{var r,n;this.formatRenderer.render(),this.isInputFocused&&this.formatNavigator.setCursorToCurrentPosition(),this.inputValue.length>0&&(this.previousOutputValue=(r=this.inputElement)==null?void 0:r.innerHTML),t&&((n=this.inputElement)!=null&&n.innerHTML)&&this.onFormatChange&&this.onFormatChange(this.inputElement.innerHTML)})}}const dm=(e,t)=>{const{value:r="",format:n,readOnly:s=!1,debounceTime:o=800,fillContainer:i=!0,leftElement:a,rightElement:u,className:f,leftElementClassName:h,rightElementClassName:g,isSingleLine:x=!1,allowSingleLineScroll:v=!1,isInputValid:T,onChange:I,onFocus:j,onBlur:E,onElementCreate:D,onLeftElementClick:Q,onRightElementClick:U}=e,[y,F]=d.useState(!0),k=d.useRef(),q=d.useRef(),z=d.useRef(),oe=d.useRef(!1);d.useEffect(()=>(document.addEventListener("mouseup",O),()=>{var C;(C=z.current)==null||C.dispose(),document.removeEventListener("mouseup",O)}),[]),d.useEffect(()=>{var C;(C=z.current)==null||C.inputValuePassed(r)},[r]),d.useEffect(()=>{var C,P,V;(C=z.current)==null||C.dispose(),n&&(z.current=new fm(n,r),q.current&&((P=z.current)==null||P.inputElementCreated(q.current)),(V=z.current)==null||V.registerFormatChangeEvent(ce))},[n]);const ce=d.useCallback(C=>{T?T(C)?(F(!0),I==null||I(C)):F(!1):I==null||I(C)},[I]),ne=d.useCallback(C=>{var P;(P=z.current)==null||P.inputFocused(),j==null||j(C)},[j]),M=d.useCallback(C=>{var P;(P=z.current)==null||P.inputBlurred(),E==null||E(C)},[E]),H=d.useCallback(()=>{oe.current=!0},[]),L=d.useCallback(()=>{var C;if(oe.current)oe.current=!1,(C=z.current)==null||C.mouseUpHandler();else{const P=new MouseEvent("mouseup");document.dispatchEvent(P)}},[]),O=d.useCallback(()=>{var C;oe.current&&(oe.current=!1,(C=z.current)==null||C.mouseUpHandler())},[]),J=d.useCallback(C=>{var P;(P=z.current)==null||P.keyDownHandler(C)},[]),R=d.useCallback(C=>{var V,X;C.preventDefault(),C.stopPropagation();const P=(V=C.clipboardData)==null?void 0:V.getData("text/plain");P&&((X=z.current)==null||X.pastedValue(P))},[]),ge=d.useCallback(C=>{var P,V,X,Y,B,K,re,_,ie,A,De,Ge,$e,Be,ft,rt,Ue;(V=(P=k.current)==null?void 0:P.inputElement)==null||V.removeEventListener("keydown",J),(Y=(X=k.current)==null?void 0:X.inputElement)==null||Y.removeEventListener("mousedown",H),(K=(B=k.current)==null?void 0:B.inputElement)==null||K.removeEventListener("mouseup",L),(_=(re=k.current)==null?void 0:re.inputElement)==null||_.removeEventListener("paste",R),k.current=C,(A=(ie=k.current)==null?void 0:ie.inputElement)==null||A.addEventListener("keydown",J),(Ge=(De=k.current)==null?void 0:De.inputElement)==null||Ge.addEventListener("mousedown",H),(Be=($e=k.current)==null?void 0:$e.inputElement)==null||Be.addEventListener("mouseup",L),(rt=(ft=k.current)==null?void 0:ft.inputElement)==null||rt.addEventListener("paste",R),q.current=(Ue=k.current)==null?void 0:Ue.inputElement},[]),S=d.useCallback(()=>{var C;(C=k.current)==null||C.focus()},[]);d.useImperativeHandle(t,()=>({focus:S}));const N=pe(f,{"!bsc-border-error":!y});return p.jsx(Zr,{ref:C=>C&&ge(C),readOnly:s,debounceTime:o,fillContainer:i,leftElement:a,rightElement:u,className:N,leftElementClassName:h,rightElementClassName:g,isSingleLine:x,allowSingleLineScroll:v,onFocus:ne,onBlur:M,onElementCreate:D,onLeftElementClick:Q,onRightElementClick:U})},qi=d.forwardRef(dm),fs=d.createContext(void 0);function Ki(e,t,r=!0){var x,v;const n=di(e),s=ii(e),o=ih(e);let i=zn(s)-(((x=t.options)==null?void 0:x.weekStartsOn)||0);i=i===-1?6:i;const a=zn(o)-(((v=t.options)==null?void 0:v.weekStartsOn)||0),u=md({start:s,end:o}),f=n+i>35?6:5,h=Gi(f,7,{dayValue:null,isCurrent:!0});let g=1;for(let T=0,I=f;T<I;T++){for(let j=T>0?0:i;j<7;j++){const E=u[g-1];if(E.setHours(e.getHours(),e.getMinutes(),e.getSeconds()),h[T][j].dayValue=E,++g>n)break}if(g>n)break}if(i>0&&r)for(let T=0;T<i;T++)h[0][T].dayValue=np(s,i-T),h[0][T].isCurrent=!1;if(a>-1&&r)for(let T=6;T>a;T--)h[f-1][T].dayValue=Kt(o,T-a),h[f-1][T].isCurrent=!1;return h}function Gi(e,t,r){const n=[];for(let s=0,o=e;s<o;s++){const i=[];for(let a=0,u=t;a<u;a++){const f=hm(r)?r:{...r};i.push(f)}n.push(i)}return n}function hm(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"||e instanceof Date}function pm(e){var n;const t=sp(new Date,((n=e.options)==null?void 0:n.weekStartsOn)||0),r=[];for(let s=0;s<7;s++)r.push(Kt(t,s).toLocaleDateString(e.code,{weekday:"short"}));return r}function mm(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 s=0;s<3;s++)for(let o=0;o<4;o++)r[s][o]={monthNumber:n,monthName:xt(t,n++).toLocaleDateString(e.code,{month:"short"})};return r}function gm(e,t){const r=new Date(e.getTime()),n=Math.floor(r.getFullYear()/10)*10;r.setFullYear(n);const s=gd({start:r,end:Er(r,9)}),o=Gi(3,4,"");let i=0;for(let a=0;a<3;a++)for(let u=0;u<4&&(o[a][u]=s[i++].toLocaleDateString(t.code,{year:"numeric"}),i!==s.length);u++);return o}function bm(e){const t=new Date;return t.setHours(0,0,0,0),t.toLocaleTimeString(e.code)}function ym(e,t,r){return e.getTime()>=t.getTime()&&e.getTime()<=r.getTime()}async function Zi(e){return(await import(`/node_modules/date-fns/locale/${vm(e)}`)).default}function vm(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 Nr(e,t){const r=op(e);if(isNaN(r.valueOf())){let n=ut(e,"P pp",new Date,{locale:t});return!isNaN(n.valueOf())||(n=ut(e,"Pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=ut(e,"P HH:mm",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=ut(e,"P hh:mm a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=ut(e,"P HH:mm:ss",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=ut(e,"P hh:mm:ss a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=ut(e,"P",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=ut(e,"P p",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=ut(e,"pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=ut(e,"p",new Date,{locale:t}),!isNaN(n.valueOf()))?n:void 0}return r}function ds(e,t){const r=e.split("-");if(r.length!==2)return;const n=Nr(r[0].trim(),t);if(!n)return;const s=Nr(r[1].trim(),t);if(s)return[n,s]}var Pe=(e=>(e[e.DateTime=0]="DateTime",e[e.DateOnly=1]="DateOnly",e[e.TimeOnly=2]="TimeOnly",e[e.DateRange=3]="DateRange",e))(Pe||{}),Le=(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))(Le||{}),Jt=(e=>(e[e.Day=0]="Day",e[e.Month=1]="Month",e[e.Year=2]="Year",e[e.Range=3]="Range",e))(Jt||{}),Ir=(e=>(e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e))(Ir||{}),Oe=(e=>(e[e.TwelveHour=0]="TwelveHour",e[e.TwentyFourHour=1]="TwentyFourHour",e))(Oe||{}),Pt=(e=>(e[e.Normal=0]="Normal",e[e.Range=1]="Range",e))(Pt||{}),rn=(e=>(e[e.Right=0]="Right",e[e.Left=1]="Left",e[e.None=2]="None",e))(rn||{}),fe=(e=>(e[e.SetDateSelector=0]="SetDateSelector",e[e.SetViewDate=1]="SetViewDate",e[e.SetSelectedDate=2]="SetSelectedDate",e[e.SetSelectedDateRange=3]="SetSelectedDateRange",e[e.SetSelectedStartDate=4]="SetSelectedStartDate",e[e.SetSelectedEndDate=5]="SetSelectedEndDate",e[e.SetTimeFormat=6]="SetTimeFormat",e[e.ClearDates=7]="ClearDates",e[e.InitializeDates=8]="InitializeDates",e))(fe||{});const xm=(e,t)=>{switch(t.type){case 0:return t.dateSelector!==void 0?{...e,currentSelector:t.dateSelector,currentViewDate:t.viewDate||e.currentViewDate}:{...e};case 1:return{...e,currentViewDate:t.viewDate||new Date,dateInitialized:!0};case 2:return{...e,selectedDate:t.selectedDate||e.selectedDate,currentViewDate:t.viewDate||e.currentViewDate};case 3:return{...e,selectedStartDate:t.selectedStartDate||e.selectedStartDate,selectedEndDate:t.selectedEndDate||e.selectedEndDate};case 4:return{...e,selectedStartDate:t.selectedStartDate,selectedEndDate:void 0};case 5:return{...e,selectedEndDate:t.selectedEndDate};case 6:return{...e,timeFormat:t.timeFormat||e.timeFormat};case 7:return{currentSelector:e.currentSelector,currentViewDate:e.currentViewDate,timeFormat:e.timeFormat,dateInitialized:!0};case 8:{const r={...e,currentViewDate:wm(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:Le.DaySelector}}};function wm(e){return e?Array.isArray(e)?e[0]:e:new Date}const hs=(e,t,r)=>{const n=d.useCallback(u=>{r({type:fe.SetViewDate,viewDate:xt(t,u)})},[t]),s=d.useCallback(u=>{r({type:fe.SetViewDate,viewDate:Zn(t,u)})},[t]),o=d.useCallback(u=>{r({type:fe.SetViewDate,viewDate:Er(t,u)})},[t]),i=d.useCallback(u=>{r({type:fe.SetViewDate,viewDate:Qn(t,u)})},[t]),a=d.useCallback(u=>{r({type:fe.SetDateSelector,dateSelector:u})},[]);return{...e,incrementViewMonths:n,decrementViewMonths:s,incrementViewYears:o,decrementViewYears:i,setDateSelector:a}},nn=({viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:s=Pt.Normal,locale:o,onDateSelected:i,selectableDate:a,isValidDate:u,dispatcher:f})=>{var L;const[h,g]=d.useState(!1),[x,v]=d.useState(),[T,I]=d.useState(),[j,E]=d.useState(),[D,Q]=d.useState(),U=d.useRef(),y=d.useRef(),F=d.useContext(fs),k=d.useMemo(()=>F.calendarTemplate,[F.calendarTemplate]),q=async()=>o||await Zi(yi());d.useEffect(()=>{q().then(O=>{U.current=O,y.current=pm(U.current),g(!0)}).catch(O=>console.error(O))},[]),d.useEffect(()=>{e&&U.current&&E(Ki(e,U.current,s===Pt.Normal))},[e,h]),d.useEffect(()=>{Q(t?new Date(t.getFullYear(),t.getMonth(),t.getDate()):void 0)},[t]),d.useEffect(()=>{v(r?new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0).getTime():void 0),I(n?new Date(n.getFullYear(),n.getMonth(),n.getDate(),23,59,59).getTime():void 0)},[r,n]),d.useEffect(()=>{U.current&&o&&(U.current=o,E(Ki(e,U.current,s===Pt.Normal)))},[o]);const z=O=>{if(s===Pt.Normal)f==null||f({type:fe.SetSelectedDate,selectedDate:O,viewDate:O}),i==null||i(O);else{if(!i)throw new Error("Range selection mode requires onDateSelected to be set");!r||ah(O,r)?i(O):r&&!n?i(O,{setEndDate:!0}):r&&n&&i(O)}},oe=O=>(D==null?void 0:D.toLocaleDateString())===O.toLocaleDateString(),ce=O=>{if(x&&T){const J=O.getTime();return J>=x&&J<=T}return!1},ne=hs({viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:s,locale:o,weekDays:y.current,monthMatrix:j,selectableDate:a,isValidDate:u,onDateClicked:z,isSelectedDate:oe,isInSelectedDateRange:ce},e,f),H=k||((O,J)=>p.jsx("div",{className:"bc-dt-calendar bsc-w-full",children:J}));return p.jsx(kt,{props:ne,template:H,children:p.jsxs("div",{className:"bc-dt-day-row bsc-grid bsc-min-w-[329px] bsc-grid-cols-7 bsc-gap-3",children:[(L=y.current)==null?void 0:L.map((O,J)=>p.jsx("div",{className:"bc-dt-day-cell bsc-text-center bsc-font-bold",children:O},J)),j==null?void 0:j.map((O,J)=>O.map((R,ge)=>{var C,P;const S=R.dayValue!==null&&(a===void 0||a(R.dayValue)),N=pe("bsc-text-center bsc-py-1",{"bsc-text-gray-3":!R.isCurrent,"bsc-bg-primary-3 dark:bsc-bg-mono-light-1 dark:bsc-text-mono-dark-1":R&&R.dayValue&&(D&&oe(R.dayValue)||x&&!T&&oi(x,R.dayValue)||x&&T&&ce(R.dayValue)),"bsc-cursor-pointer":S,"bsc-text-error bsc-cursor-not-allowed":!S,"bsc-bg-primary-5 dark:bsc-bg-mono-light-3 dark:bsc-text-mono-dark-1":R.dayValue&&rp(R.dayValue)&&!(oe(R.dayValue)||ce(R.dayValue))},"bc-dt-date-cell");return p.jsx("div",{className:N,onClick:()=>R&&R.dayValue&&S&&(u===void 0||u(R.dayValue))&&z(R.dayValue),children:(P=R.dayValue)==null?void 0:P.getDate().toLocaleString((C=U.current)==null?void 0:C.code)},J.toString()+ge.toString())}))]})})},sn=({title:e,scrollerType:t,onTitleClicked:r,onMovePrevious:n,onMoveNext:s,viewDate:o,dispatcher:i})=>{const u=d.useContext(fs).dateScrollerTemplate,f=hs({title:e,scrollerType:t,onTitleClicked:r,onMovePrevious:n,onMoveNext:s},o,i),g=u||((x,v)=>p.jsx("div",{className:"bc-dt-scroller bsc-flex bsc-w-full bsc-flex-row bsc-items-center bsc-px-2 bsc-py-1",children:v}));return p.jsxs(kt,{props:f,template:g,children:[p.jsx("div",{className:"bc-dt-scroller-left bsc-flex-shrink bsc-cursor-pointer",children:p.jsx(ot,{className:"bsc-bg-transparent focus:bsc-outline-none",onClick:n,children:p.jsx(Xe,{icon:"chevronLeft",size:We.Regular})})}),p.jsx("div",{className:"bc-dt-scroller-title bsc-flex-grow bsc-cursor-pointer bsc-text-center",onClick:r,children:e}),p.jsx("div",{className:"bc-dt-scroller-right bsc-flex-shrink bsc-cursor-pointer",children:p.jsx(ot,{className:"bsc-bg-transparent focus:bsc-outline-none",onClick:s,children:p.jsx(Xe,{icon:"chevronRight",size:We.Regular})})})]})},Pm=({selectedDate:e,viewDate:t,locale:r,showTimeSelector:n,selectableDate:s,isValidDate:o,onChange:i,dispatcher:a})=>{const u=()=>{t&&a({type:fe.SetViewDate,viewDate:Zn(t,1)})},f=()=>{t&&a({type:fe.SetViewDate,viewDate:xt(t,1)})},h=()=>{a({type:fe.SetDateSelector,dateSelector:Le.MonthSelector})},g=()=>{a({type:fe.SetDateSelector,dateSelector:Le.TimeSelector})},x=()=>t?t.toLocaleDateString(r.code,{month:"long",year:"numeric"}):"";return p.jsxs("div",{className:"bc-dt-day-selector bsc-p-2",children:[p.jsx(sn,{title:x(),scrollerType:Jt.Day,onTitleClicked:h,onMovePrevious:u,onMoveNext:f,viewDate:t,dispatcher:a}),p.jsx(nn,{viewDate:t,selectedDate:e,locale:r,selectableDate:s,isValidDate:o,onDateSelected:i,dispatcher:a}),n&&p.jsx("div",{className:"bc-dt-time-value-wrapper bsc-flex bsc-w-full bsc-flex-row bsc-justify-center bsc-p-2",children:p.jsx("div",{className:"bc-dt-time-value bsc-cursor-pointer bsc-p-2 hover:bsc-bg-gray-4 dark:bsc-bg-mono-dark-1 dark:bsc-text-mono-light-1 dark:hover:bsc-bg-mono-light-2 dark:hover:bsc-text-mono-dark-2",onClick:g,children:(e==null?void 0:e.toLocaleTimeString(r.code))||bm(r)})})]})},Sm=({viewDate:e,locale:t,dateSelection:r=Pe.DateTime,dispatcher:n})=>{const s=d.useRef(mm(t)),o=()=>{const h=Qn(e,1);n({type:fe.SetViewDate,viewDate:h})},i=()=>{const h=Er(e,1);n({type:fe.SetViewDate,viewDate:h})},a=h=>{n({type:fe.SetDateSelector,dateSelector:r!==Pe.DateRange?Le.DaySelector:Le.DateRangeSelector,viewDate:wp(e,h)})},u=()=>e.toLocaleDateString(t.code,{year:"numeric"}),f=()=>{n({type:fe.SetDateSelector,dateSelector:Le.YearSelector})};return p.jsxs("div",{className:"bc-dt-month-selector bsc-p-2",style:{minWidth:"20rem"},children:[p.jsx(sn,{title:u(),scrollerType:Jt.Month,onTitleClicked:f,onMovePrevious:o,onMoveNext:i,viewDate:e,dispatcher:n}),p.jsx("div",{className:"bc-dt-month-grid bsc-grid bsc-w-full bsc-grid-cols-4 bsc-gap-4",children:s.current.map((h,g)=>h.map((x,v)=>p.jsx("div",{className:"bc-dt-month-cell bsc-cursor-pointer bsc-text-center",onClick:()=>a(x.monthNumber),children:x.monthName},g.toString()+v.toString())))})]})},Tm=({viewDate:e,selectedStartDate:t,selectedEndDate:r,locale:n,onChange:s,dispatcher:o})=>{const i=Jr("screen and (max-device-width: 40rem)"),a=xt(e,1),u=(v,T)=>{!T||!T.setEndDate?o({type:fe.SetSelectedStartDate,selectedStartDate:v}):(o({type:fe.SetSelectedEndDate,selectedEndDate:v}),t&&(s==null||s([t,v])))},f=()=>{o({type:fe.SetDateSelector,dateSelector:Le.MonthSelector})},h=()=>i?`${e.toLocaleDateString(n.code,{month:"long"})} ${e.toLocaleDateString(n.code,{year:"numeric"})}`:`${e.toLocaleDateString(n.code,{month:"long"})} ${e.toLocaleDateString(n.code,{year:"numeric"})} - ${a.toLocaleDateString(n.code,{month:"long"})} ${a.toLocaleDateString(n.code,{year:"numeric"})}`,g=()=>{e&&o({type:fe.SetViewDate,viewDate:Zn(e,1)})},x=()=>{e&&o({type:fe.SetViewDate,viewDate:xt(e,1)})};return p.jsxs("div",{className:"bc-dt-range-selector bsc-flex bsc-flex-col",children:[p.jsx("div",{className:"bc-dt-range-scroller-wrapper bsc-flex-shrink",children:p.jsx(sn,{title:h(),scrollerType:Jt.Range,onTitleClicked:f,onMovePrevious:g,onMoveNext:x,viewDate:e,dispatcher:o})}),p.jsx("div",{className:"bsc-flex-grow",children:p.jsx(Jn,{mobileMarkup:p.jsx("div",{className:"bc-dt-range-calendar bsc-px-2 bsc-py-1",children:p.jsx(nn,{viewDate:e,selectedStartDate:t,selectedEndDate:r,selectionMode:Pt.Range,onDateSelected:u,locale:n,dispatcher:o})}),aboveMobileMarkup:p.jsxs("div",{className:"bc-dt-range-wrapper bsc-flex bsc-flex-row bsc-px-2 bsc-py-1",children:[p.jsx("div",{className:"bc-dt-range-calendar-1 bsc-border-r bsc-border-solid bsc-border-gray-3 bsc-pr-4",children:p.jsx(nn,{viewDate:e,selectedStartDate:t,selectedEndDate:r,selectionMode:Pt.Range,onDateSelected:u,locale:n,dispatcher:o})}),p.jsx("div",{className:"bc-dt-range-calendar-2 bsc-pl-4",children:p.jsx(nn,{viewDate:a,selectedStartDate:t,selectedEndDate:r,selectionMode:Pt.Range,onDateSelected:u,locale:n,dispatcher:o})})]})})})]})},Em=({viewDate:e,showDateSelector:t,locale:r,timeFormat:n=Oe.TwelveHour,timeConstraints:s,onChange:o,dispatcher:i})=>{const a=d.useRef(n===Oe.TwelveHour?11:23),u=d.useRef(n===Oe.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"]),f=d.useRef(Sp(0,59,M=>M.toString().padStart(2,"0"))),h=d.useRef(["AM","PM"]),g=d.useRef(rd(e)),x=M=>M>11?M-12:M,[v,T]=d.useState(x(e.getHours())),[I,j]=d.useState(e.getMinutes()),[E,D]=d.useState(e.getHours()<=12?0:1),Q=d.useRef(e.toLocaleDateString(r.code));d.useEffect(()=>{const M=e.getHours(),H=e.getMinutes();if(M!==v&&T(n===Oe.TwelveHour?x(M):M),H!==I&&j(H),n===Oe.TwelveHour){const L=M<=11?0:1;L!==E&&D(L)}},[e]);const U=()=>{var L;const M=((L=s==null?void 0:s.hours)==null?void 0:L.step)||1,H=v<a.current?v+M:0;T(H),z(H,I,E)},y=()=>{var L;const M=((L=s==null?void 0:s.hours)==null?void 0:L.step)||1,H=v>0?v-M:a.current;T(H),z(H,I,E)},F=()=>{var L,O,J;const M=((L=s==null?void 0:s.minutes)==null?void 0:L.step)||1,H=I+M<(((O=s==null?void 0:s.minutes)==null?void 0:O.max)||59)?I+M:((J=s==null?void 0:s.minutes)==null?void 0:J.min)||0;j(H),z(v,H,E)},k=()=>{var L,O,J;const M=((L=s==null?void 0:s.minutes)==null?void 0:L.step)||1,H=I-M>=(((O=s==null?void 0:s.minutes)==null?void 0:O.min)||0)?I-M:(((J=s==null?void 0:s.minutes)==null?void 0:J.max)||60)-M;j(H),z(v,H,E)},q=()=>{const M=E===0?1:0;D(M),z(v,I,M)},z=(M,H,L)=>{const O=n===Oe.TwelveHour&&L===1?M+12:M;g.current.setHours(O,H),i({type:fe.SetSelectedDate,selectedDate:g.current,viewDate:g.current}),o==null||o(g.current)},oe=()=>{i({type:fe.SetDateSelector,dateSelector:Le.DaySelector})},ce=pe("bsc-w-full bsc-grid bsc-grid-rows-3 bsc-gap-4 bc-dt-time-grid",{"bsc-grid-cols-4":n===Oe.TwelveHour,"bsc-grid-cols-3":n===Oe.TwentyFourHour}),ne=pe("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===Oe.TwelveHour,"bsc-col-span-3":n===Oe.TwentyFourHour});return p.jsx("div",{className:"bc-dt-time-selector bsc-flex bsc-flex-row bsc-justify-center bsc-p-2",style:{minWidth:n===Oe.TwelveHour?"15rem":"11rem"},children:p.jsxs("div",{className:ce,children:[t&&p.jsx("div",{className:ne,onClick:oe,children:Q.current}),p.jsx("div",{className:"bc-dt-time-hour-increase bsc-cursor-pointer bsc-text-center",children:p.jsx(ot,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:U,children:p.jsx(Xe,{icon:"chevronUp",size:We.Regular})})}),p.jsx("div",{}),p.jsx("div",{className:"bc-dt-time-minute-increase bsc-cursor-pointer bsc-text-center",children:p.jsx(ot,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:F,children:p.jsx(Xe,{icon:"chevronUp",size:We.Regular})})}),n===Oe.TwelveHour&&p.jsx("div",{className:"bc-dt-time-meridian-increase bsc-cursor-pointer bsc-text-center",children:p.jsx(ot,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:q,children:p.jsx(Xe,{icon:"chevronUp",size:We.Regular})})}),p.jsx("div",{className:"bc-dt-time-hour-value bsc-text-center",children:u.current[v]}),p.jsx("div",{className:"bc-dt-time-separator bsc-text-center",children:":"}),p.jsx("div",{className:"bc-dt-time-minute-value bsc-text-center",children:f.current[I]}),n===Oe.TwelveHour&&p.jsx("div",{className:"bc-dt-time-meridian-value bsc-text-center",children:h.current[E]}),p.jsx("div",{className:"bc-dt-time-hour-decrease bsc-cursor-pointer bsc-text-center",children:p.jsx(ot,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:y,children:p.jsx(Xe,{icon:"chevronDown",size:We.Regular})})}),p.jsx("div",{}),p.jsx("div",{className:"bc-dt-time-minute-decrease bsc-cursor-pointer bsc-text-center",children:p.jsx(ot,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:k,children:p.jsx(Xe,{icon:"chevronDown",size:We.Regular})})}),n===Oe.TwelveHour&&p.jsx("div",{className:"bc-dt-time-meridian-decrease bsc-cursor-pointer bsc-text-center",children:p.jsx(ot,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:q,children:p.jsx(Xe,{icon:"chevronDown",size:We.Regular})})})]})})},_m=({viewDate:e,locale:t,dispatcher:r})=>{const n=gm(e,t),s=()=>{const u=Qn(e,10);r({type:fe.SetViewDate,viewDate:u})},o=()=>{const u=Er(e,10);r({type:fe.SetViewDate,viewDate:u})},i=u=>{const f=parseInt(u);r({type:fe.SetDateSelector,dateSelector:Le.MonthSelector,viewDate:Pp(e,f)})},a=()=>`${n[0][0].toString()} - ${n[2][1].toString()}`;return p.jsxs("div",{className:"bc-dt-year-selector",style:{minWidth:"20rem"},children:[p.jsx(sn,{title:a(),scrollerType:Jt.Year,onMovePrevious:s,onMoveNext:o,viewDate:e,dispatcher:r}),p.jsx("div",{className:"bc-dt-year-wrapper bsc-w-full",children:p.jsx("div",{className:"bc-dt-year-grid bsc-grid bsc-grid-cols-4 bsc-gap-4",children:n.map((u,f)=>u.map((h,g)=>h.length>0?p.jsx("div",{className:"bc-dt-year-cell bsc-cursor-pointer bsc-text-center",onClick:()=>i(h),children:h},f.toString()+g.toString()):p.jsx("div",{},f.toString()+g.toString())))})})]})};class Cm{constructor(t,r){b(this,"dateFormat");b(this,"timeFormat");b(this,"use24HourTime");b(this,"monthPart");b(this,"dayPart");b(this,"yearPart");b(this,"twelveHourPart");b(this,"twentyFourHourPart");b(this,"minutePart");b(this,"meridianPart");this.dateSelection=t;const n=2023,s=12,o=20,a=new Date(n,s-1,o).toLocaleDateString(r,{year:"numeric",month:"numeric",day:"numeric"});this.dateFormat=a.replace(`${n}`,"YYYY").replace(`${s}`,"MM").replace(`${o}`,"DD");const u=new Date,f=18,h=24,g=37,x=317;u.setHours(f,h,g,x);const v=u.toLocaleTimeString(r);this.use24HourTime=v.startsWith("18"),this.timeFormat=v.replace(`${this.use24HourTime?f:"6"}`,"HH").replace(`${h}`,"MM").replace(`${g}`,"SS").replace(`${x}`,"LLL"),this.createDateParts()}get is24HourTime(){return this.use24HourTime}createInputFormat(){const t={deleteShiftsFormatPart:!1,formatParts:[]};switch(this.dateSelection){case Pe.DateOnly:return this.createDateFormat(t);case Pe.TimeOnly:return this.createTimeFormat(t);case Pe.DateRange:return this.createDateRangeFormat(t);case Pe.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 s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("YYYY"),n=t.substring(0,r);const o={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.monthPart,s,this.dayPart,o,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 s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("YYYY"),n=t.substring(0,r);const o={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.dayPart,s,this.monthPart,o,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 s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("DD"),n=t.substring(0,r);const o={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.yearPart,s,this.monthPart,o,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),s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0},o={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return[this.twelveHourPart,s,this.minutePart,o,this.meridianPart]}return[]}createTwentyFourHourFormatParts(){if(this.twentyFourHourPart&&this.minutePart){const t=this.timeFormat.replace("HH",""),r=t.indexOf("MM"),n=t.substring(0,r),s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.twentyFourHourPart,s,this.minutePart]}return[]}createDateParts(){this.monthPart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:lt.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.dayPart={characterCount:2,placeholder:"D",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:lt.Numeric,minimumValue:1,maximumValue:31,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.yearPart={characterCount:4,placeholder:"Y",inputText:"_",isSeparator:!1,allCharactersRequired:!0,valueType:lt.Numeric},this.twelveHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:lt.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.twentyFourHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:lt.Numeric,minimumValue:0,maximumValue:23,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.minutePart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:lt.Numeric,minimumValue:0,maximumValue:59,exceedingMaximumValueCausesError:!0,padWithZeros:!0},this.meridianPart={characterCount:2,inputText:"_",isSeparator:!1,valueType:lt.Text,possibleValues:["AM","PM"]}}}const km=(e,t)=>{var o;const[r,n]=d.useState(),s=d.useRef();return d.useEffect(()=>{t&&!r&&(s.current=new Cm(e,t),n(s.current.createInputFormat()))},[t]),[r,(o=s.current)==null?void 0:o.is24HourTime]},Om=({value:e,readOnly:t=!1,label:r,useDefaultDateValue:n=!1,useFormattedInput:s=!1,allowClear:o=!1,closeSelector:i=!1,locale:a,className:u,dateSelection:f=Pe.DateTime,dateFormat:h,timeConstraints:g,icon:x,iconPosition:v=rn.Right,inputElement:T,selectableDate:I,isValidDate:j,onChange:E,calendarTemplate:D,dateScrollerTemplate:Q,inputTemplate:U,wrapperTemplate:y})=>{const[F,k]=d.useState(!1),[q,z]=d.useState(),[oe,ce]=d.useState(),[ne,M,H]=Wa(f),L=d.useRef(),O=d.useRef(!1),J=d.useRef(a||yi()),R=d.useRef(),ge=d.useRef(),S=d.useRef(),N=d.useRef(null),C=d.useRef(null),[P,V]=km(f,q),X=d.useRef({calendarTemplate:D,dateScrollerTemplate:Q});d.useEffect(()=>{J.current&&B(J.current)},[J]),d.useEffect(()=>{a&&B(a)},[a]),d.useEffect(()=>{if(e){const ee=K();ie({type:fe.InitializeDates,initialDate:ee})}else ie({type:fe.ClearDates})},[e,R.current]),d.useEffect(()=>{V&&ie({type:fe.SetTimeFormat,timeFormat:V?Oe.TwentyFourHour:Oe.TwelveHour})},[V]),d.useEffect(()=>{T&&(ge.current=T)},[T]),d.useEffect(()=>{ie({type:fe.SetDateSelector,dateSelector:Y()})},[ne]);const Y=d.useCallback(()=>H.current===Pe.TimeOnly?Le.TimeSelector:H.current===Pe.DateTime||H.current===Pe.DateOnly?Le.DaySelector:Le.DateRangeSelector,[]),B=ee=>{Zi(ee).then(le=>{z(le.code),R.current=le;const Me=K();ie(e||n?{type:fe.InitializeDates,initialDate:Array.isArray(Me)?Me[0]:Me}:{type:fe.SetViewDate,viewDate:Array.isArray(Me)?Me[0]:Me})}).catch(le=>console.error(le))},K=()=>{const ee=new Date;return ee.setHours(0,0,0,0),e?typeof e=="string"?H.current!==Pe.DateRange?Nr(e,R.current):ds(e,R.current):e:ee},re={currentSelector:Y(),currentViewDate:new Date,timeFormat:Oe.TwelveHour,dateInitialized:!1},[_,ie]=d.useReducer(xm,re),A=()=>{nr(),k(!0)},De=d.useMemo(()=>Sr(()=>{k(!1)},250),[]),Ge=d.useMemo(()=>Sr(()=>{De.cancel()},5),[De]),$e=ee=>{const le=ee.target.innerText;rt(le)},Be=ee=>{if(ee){const le=H.current!==Pe.DateRange?Nr(ee,R.current):ds(ee,R.current);return le?j?Array.isArray(le)?le.every(Me=>j(Me)):j(le):!0:!1}else return!0},ft=ee=>{rt(ee||"")},rt=ee=>{const le=H.current!==Pe.DateRange?Nr(ee,R.current):ds(ee,R.current);le?(Array.isArray(le)?(ym(le[0],ii(_.currentViewDate),pd(xt(_.currentViewDate,1)))||ie({type:fe.SetViewDate,viewDate:le[0]}),ie({type:fe.SetSelectedDateRange,selectedStartDate:le[0],selectedEndDate:le[1]})):ie({type:fe.SetSelectedDate,selectedDate:le,viewDate:le}),E==null||E(le)):ee===""&&(ie({type:fe.ClearDates}),E==null||E())},Ue=ee=>{H.current===Pe.DateOnly&&i===!0&&k(!1),E==null||E(ee)},tr=()=>{nr(),k(!F),C.current?C.current.focus():N.current&&N.current.focus()},rr=()=>{ie({type:fe.ClearDates}),k(!1),E==null||E()},nt=(ee,le)=>{(!ge.current||L.current!==le)&&(ge.current=ee,L.current=le,O.current=!0)},nr=()=>{(!S.current||O.current)&&ge.current&&(S.current=ge.current,ce(ge.current),O.current=!1)},sr=()=>{k(!1),ie({type:fe.SetDateSelector,dateSelector:Y()})},It=()=>{switch(h){case Ir.Short:return"short";case Ir.Medium:return"medium";case Ir.Long:return"long";default:return}},dt=()=>{var le,Me,Qe,ht,yt,Rt,At,Lt,$t,St,Ft,ur;const ee=It();switch(H.current){case Pe.DateTime:return _.selectedDate?ee?_.selectedDate.toLocaleString((le=R.current)==null?void 0:le.code,{dateStyle:ee,timeStyle:ee}):_.selectedDate.toLocaleString((Me=R.current)==null?void 0:Me.code):"";case Pe.DateOnly:return _.selectedDate?ee?_.selectedDate.toLocaleDateString((Qe=R.current)==null?void 0:Qe.code,{dateStyle:ee}):_.selectedDate.toLocaleDateString((ht=R.current)==null?void 0:ht.code):"";case Pe.TimeOnly:return _.selectedDate?ee?_.selectedDate.toLocaleTimeString((yt=R.current)==null?void 0:yt.code,{timeStyle:ee,hour12:_.timeFormat===Oe.TwelveHour,hourCycle:_.timeFormat===Oe.TwentyFourHour?"h23":void 0}):_.selectedDate.toLocaleTimeString((Rt=R.current)==null?void 0:Rt.code,{hour12:_.timeFormat===Oe.TwelveHour,hourCycle:_.timeFormat===Oe.TwentyFourHour?"h23":void 0}):"";case Pe.DateRange:return _.selectedStartDate&&_.selectedEndDate?ee?`${_.selectedStartDate.toLocaleDateString((At=R.current)==null?void 0:At.code,{dateStyle:ee})} - ${_.selectedEndDate.toLocaleDateString((Lt=R.current)==null?void 0:Lt.code,{dateStyle:ee})}`:`${_.selectedStartDate.toLocaleDateString(($t=R.current)==null?void 0:$t.code)} - ${_.selectedEndDate.toLocaleDateString((St=R.current)==null?void 0:St.code)}`:"";default:return _.selectedDate?ee?_.selectedDate.toLocaleString((Ft=R.current)==null?void 0:Ft.code,{dateStyle:ee,timeStyle:ee}):_.selectedDate.toLocaleString((ur=R.current)==null?void 0:ur.code):""}},Ze=ne===Pe.DateTime||ne===Pe.DateOnly||ne===Pe.DateRange,Mr=ne===Pe.DateTime||ne===Pe.TimeOnly,st=v===rn.None?{}:v===rn.Right?{rightElement:p.jsxs("div",{className:"bsc-flex bsc-text-black dark:bsc-text-mono-light-1",children:[o&&!t&&p.jsx("div",{children:p.jsx(Xe,{icon:"close",size:We.Small,className:"bsc-cursor-pointer bsc-text-sm",onClick:rr})}),p.jsx("div",{className:"bsc-ml-2",onClick:t?void 0:tr,children:x||p.jsx(Xe,{icon:"calendar",size:We.Small,className:t?void 0:"bsc-cursor-pointer"})})]}),rightElementClassName:"bsc-justify-center"}:{leftElement:p.jsxs("div",{className:"bsc-flex bsc-text-black dark:bsc-text-mono-light-1",children:[p.jsx("div",{className:"bsc-mr-2",onClick:t?void 0:tr,children:x||p.jsx(Xe,{icon:"calendar",size:We.Small,className:t?void 0:"bsc-cursor-pointer"})}),o&&!t&&p.jsx("div",{children:p.jsx(Xe,{icon:"close",size:We.Small,className:"bsc-cursor-pointer bsc-text-sm",onClick:rr})})]}),leftElementClassName:"bsc-justify-center"},jt={setDateSelector:ee=>M(ee)},Rr=y||((ee,le)=>p.jsx(p.Fragment,{children:le})),ir=()=>p.jsx(kt,{props:jt,template:Rr,children:p.jsxs(p.Fragment,{children:[_.currentSelector===Le.DaySelector&&Ze&&_.dateInitialized&&R.current&&p.jsx(Pm,{selectedDate:_.selectedDate,viewDate:_.currentViewDate,locale:R.current,showTimeSelector:H.current===Pe.DateTime,selectableDate:I,isValidDate:j,dispatcher:ie,onChange:Ue}),_.currentSelector===Le.MonthSelector&&Ze&&_.dateInitialized&&R.current&&p.jsx(Sm,{viewDate:_.currentViewDate,locale:R.current,dateSelection:H.current,dispatcher:ie}),_.currentSelector===Le.YearSelector&&Ze&&_.dateInitialized&&R.current&&p.jsx(_m,{viewDate:_.currentViewDate,locale:R.current,dispatcher:ie}),_.currentSelector===Le.TimeSelector&&Mr&&_.dateInitialized&&R.current&&p.jsx(Em,{viewDate:_.currentViewDate,showDateSelector:H.current===Pe.DateTime,locale:R.current,timeFormat:_.timeFormat,timeConstraints:g,onChange:E,dispatcher:ie}),_.currentSelector===Le.DateRangeSelector&&Ze&&_.dateInitialized&&R.current&&p.jsx(Tm,{viewDate:_.currentViewDate,selectedStartDate:_.selectedStartDate,selectedEndDate:_.selectedEndDate,locale:R.current,onChange:E,dispatcher:ie})]})}),ar=hs({label:r,readOnly:t,allowClear:o,getValue:dt,onFocus:A,onInput:$e,iconPosition:v,iconElement:st.rightElement||st.leftElement},_.currentViewDate,ie),cr=U||((ee,le)=>p.jsx(p.Fragment,{children:le})),Mt=pe("bsc-text-left",{"bc-read-only bsc-bg-gray-4 dark:bsc-bg-mono-dark-3":t,"bsc-bg-white dark:bsc-bg-mono-dark-1":!t},"bc-dt-input",u);return p.jsx(fs.Provider,{value:X.current,children:p.jsxs("div",{className:"bc-date-time",children:[r&&p.jsx(pt,{label:r,readOnly:t,className:"bc-dt-label"}),p.jsx(Jn,{mobileMarkup:p.jsxs(p.Fragment,{children:[p.jsx(kt,{props:ar,template:cr,children:p.jsx(Zr,{ref:N,value:dt(),readOnly:t,inputMode:"none",className:Mt,onFocus:A,onElementCreate:ee=>nt(ee,!1),...st})}),p.jsx(Hi,{visible:F,target:oe,hidden:sr,unmountWhenHidden:!0,children:ir()})]}),aboveMobileMarkup:p.jsxs(p.Fragment,{children:[p.jsx(kt,{props:ar,template:cr,children:s===!1?p.jsx(Zr,{ref:N,value:dt(),readOnly:t,className:Mt,onFocus:A,onBlur:De,onInput:$e,onElementCreate:ee=>nt(ee,!1),...st}):p.jsx(qi,{ref:C,value:dt(),readOnly:t,className:Mt,format:P,isInputValid:Be,onFocus:A,onBlur:De,onChange:ft,onElementCreate:ee=>nt(ee,!0),...st})}),p.jsx(Wi,{visible:F,target:oe,shouldTargetCloseOverlay:!1,shouldScrollCloseOverlay:!0,shouldCheckZIndex:!0,shouldRemainOnScreen:!0,hidden:sr,isClickedWithin:Ge,unmountWhenHidden:!0,children:ir()})]})})]})})};function Nt(e,t){var r,n;if(typeof t=="function")n=t(e),n!==void 0&&(e=n);else if(Array.isArray(t))for(r=0;r<t.length;r++)n=t[r](e),n!==void 0&&(e=n);return e}function Dm(e,t){return e[0]==="-"&&Array.isArray(t)&&/^-\d+$/.test(e)?t.length+parseInt(e,10):e}function Nm(e){return/^\d+$/.test(e)}function on(e){return Object.prototype.toString.call(e)==="[object Object]"}function jr(e){return Object(e)===e}function an(e){return Object.keys(e).length===0}var Im=["__proto__","prototype","constructor"],jm=function(e){return Im.indexOf(e)===-1};function cn(e,t){e.indexOf("[")>=0&&(e=e.replace(/\[/g,t).replace(/]/g,""));var r=e.split(t),n=r.filter(jm);if(n.length!==r.length)throw Error("Refusing to update blacklisted property "+e);return r}var Qi=Object.prototype.hasOwnProperty;function he(e,t,r,n){if(!(this instanceof he))return new he(e,t,r,n);typeof t>"u"&&(t=!1),typeof r>"u"&&(r=!0),typeof n>"u"&&(n=!0),this.separator=e||".",this.override=t,this.useArray=r,this.useBrackets=n,this.keepArray=!1,this.cleanup=[]}var er=new he(".",!1,!0,!0);function tt(e){return function(){return er[e].apply(er,arguments)}}he.prototype._fill=function(e,t,r,n){var s=e.shift();if(e.length>0){if(t[s]=t[s]||(this.useArray&&Nm(e[0])?[]:{}),!jr(t[s]))if(this.override)t[s]={};else{if(!(jr(r)&&an(r)))throw new Error("Trying to redefine `"+s+"` which is a "+typeof t[s]);return}this._fill(e,t[s],r,n)}else{if(!this.override&&jr(t[s])&&!an(t[s])){if(!(jr(r)&&an(r)))throw new Error("Trying to redefine non-empty obj['"+s+"']");return}t[s]=Nt(r,n)}},he.prototype.object=function(e,t){var r=this;return Object.keys(e).forEach(function(n){var s=t===void 0?null:t[n],o=cn(n,r.separator).join(r.separator);o.indexOf(r.separator)!==-1?(r._fill(o.split(r.separator),e,e[n],s),delete e[n]):e[n]=Nt(e[n],s)}),e},he.prototype.str=function(e,t,r,n){var s=cn(e,this.separator).join(this.separator);return e.indexOf(this.separator)!==-1?this._fill(s.split(this.separator),r,t,n):r[e]=Nt(t,n),r},he.prototype.pick=function(e,t,r,n){var s,o,i,a,u;for(o=cn(e,this.separator),s=0;s<o.length;s++)if(a=Dm(o[s],t),t&&typeof t=="object"&&a in t){if(s===o.length-1)return r?(i=t[a],n&&Array.isArray(t)?t.splice(a,1):delete t[a],Array.isArray(t)&&(u=o.slice(0,-1).join("."),this.cleanup.indexOf(u)===-1&&this.cleanup.push(u)),i):t[a];t=t[a]}else return;return r&&Array.isArray(t)&&(t=t.filter(function(f){return f!==void 0})),t},he.prototype.delete=function(e,t){return this.remove(e,t,!0)},he.prototype.remove=function(e,t,r){var n;if(this.cleanup=[],Array.isArray(e)){for(n=0;n<e.length;n++)this.pick(e[n],t,!0,r);return r||this._cleanup(t),t}else return this.pick(e,t,!0,r)},he.prototype._cleanup=function(e){var t,r,n,s;if(this.cleanup.length){for(r=0;r<this.cleanup.length;r++)n=this.cleanup[r].split("."),s=n.splice(0,-1).join("."),t=s?this.pick(s,e):e,t=t[n[0]].filter(function(o){return o!==void 0}),this.set(this.cleanup[r],t,e);this.cleanup=[]}},he.prototype.del=he.prototype.remove,he.prototype.move=function(e,t,r,n,s){return typeof n=="function"||Array.isArray(n)?this.set(t,Nt(this.pick(e,r,!0),n),r,s):(s=n,this.set(t,this.pick(e,r,!0),r,s)),r},he.prototype.transfer=function(e,t,r,n,s,o){return typeof s=="function"||Array.isArray(s)?this.set(t,Nt(this.pick(e,r,!0),s),n,o):(o=s,this.set(t,this.pick(e,r,!0),n,o)),n},he.prototype.copy=function(e,t,r,n,s,o){return typeof s=="function"||Array.isArray(s)?this.set(t,Nt(JSON.parse(JSON.stringify(this.pick(e,r,!1))),s),n,o):(o=s,this.set(t,this.pick(e,r,!1),n,o)),n},he.prototype.set=function(e,t,r,n){var s,o,i,a;if(typeof t>"u")return r;for(i=cn(e,this.separator),s=0;s<i.length;s++){if(a=i[s],s===i.length-1)if(n&&on(t)&&on(r[a]))for(o in t)Qi.call(t,o)&&(r[a][o]=t[o]);else if(n&&Array.isArray(r[a])&&Array.isArray(t))for(var u=0;u<t.length;u++)r[i[s]].push(t[u]);else r[a]=t;else(!Qi.call(r,a)||!on(r[a])&&!Array.isArray(r[a]))&&(/^\d+$/.test(i[s+1])?r[a]=[]:r[a]={});r=r[a]}return r},he.prototype.transform=function(e,t,r){return t=t||{},r=r||{},Object.keys(e).forEach((function(n){this.set(e[n],this.pick(n,t),r)}).bind(this)),r},he.prototype.dot=function(e,t,r){t=t||{},r=r||[];var n=Array.isArray(e);return Object.keys(e).forEach((function(s){var o=n&&this.useBrackets?"["+s+"]":s;if(jr(e[s])&&(on(e[s])&&!an(e[s])||Array.isArray(e[s])&&!this.keepArray&&e[s].length!==0))if(n&&this.useBrackets){var i=r[r.length-1]||"";return this.dot(e[s],t,r.slice(0,-1).concat(i+o))}else return this.dot(e[s],t,r.concat(o));else n&&this.useBrackets?t[r.join(this.separator).concat("["+s+"]")]=e[s]:t[r.concat(o).join(this.separator)]=e[s]}).bind(this)),t},he.pick=tt("pick"),he.move=tt("move"),he.transfer=tt("transfer"),he.transform=tt("transform"),he.copy=tt("copy"),he.object=tt("object"),he.str=tt("str"),he.set=tt("set"),he.delete=tt("delete"),he.del=he.remove=tt("remove"),he.dot=tt("dot"),["override","overwrite"].forEach(function(e){Object.defineProperty(he,e,{get:function(){return er.override},set:function(t){er.override=!!t}})}),["useArray","keepArray","useBrackets"].forEach(function(e){Object.defineProperty(he,e,{get:function(){return er[e]},set:function(t){er[e]=t}})}),he._process=Nt;var Mm=he;const un=hn(Mm),Rm=({name:e,label:t,value:r,data:n,textField:s,valueField:o,readOnly:i=!1,orientation:a=Ve.Horizontal,isMultiSelect:u=!1,className:f,onChange:h,itemTemplate:g})=>{const[x,v]=d.useState(),[T,I]=d.useState([]),j=Cn(()=>n,[n]),E=d.useId();d.useEffect(()=>{if(u){const L=Array.isArray(r)?r.map(O=>O.toString()):r?[String(r)]:void 0;I(L??[])}else r&&v(r.toString())},[r]);const D=L=>u?T.findIndex(O=>O===L)>-1:x===L,Q=L=>{const O=L.toString();if(u){const J=D(O);let R;J?R=T.filter(ge=>ge!=O):R=[...T,O],I(R),h==null||h({name:e,value:R})}else O!==x&&(v(O),h==null||h({name:e,value:O}))},U=L=>{const{value:O}=L.target;v(O),h==null||h({name:e,value:O})},y=L=>{const{value:O,checked:J}=L.target;let R;J?R=[...T,O]:R=T.filter(ge=>ge!=O),I(R),h==null||h({name:e,value:R})},F=(L,O,J,R)=>p.jsxs("label",{htmlFor:L,className:R,children:[p.jsx("input",{id:L,name:e,value:J,type:"checkbox",onChange:y,checked:D(J),className:"bsc-appearance-none"}),O]},L),k=(L,O,J,R)=>p.jsxs("label",{htmlFor:L,className:R,children:[p.jsx("input",{id:L,name:e,value:J,type:"radio",onChange:U,checked:D(J),className:"bsc-appearance-none"}),O]},L),q=$r(hr.FocusWithin),z=d.useCallback((L,O)=>p.jsx(p.Fragment,{children:O}),[]),oe=g||z,ce=(L,O,J)=>{const R=`element_${E}_${O}`,ge=un.pick(s,L),S=String(un.pick(o,L)),N=O===0,C=O===J.length-1,P=pe("bc-group-button-item bsc-cursor-pointer bsc-border-solid bsc-p-2 bsc-font-medium",{"has-[:checked]:bsc-bg-primary-1 has-[:checked]:dark:bsc-bg-mono-light-1 has-[:checked]:bsc-text-white has-[:checked]:dark:bsc-text-mono-dark-1 dark:bsc-text-mono-light-1 bsc-text-gray-2 bsc-border-gray-3 dark:bsc-border-mono-light-2":!i,"bc-read-only has-[:checked]:bsc-bg-primary-4 has-[:checked]:dark:bsc-bg-mono-light-3 has-[:checked]:bsc-text-gray-5 has-[:checked]:dark:bsc-text-mono-dark-3 dark:bsc-text-mono-light-3 bsc-text-gray-3 bsc-border-gray-4 dark:bsc-border-mono-light-3 bsc-pointer-events-none":i,"bsc-border-t bsc-border-l bsc-border-b bsc-rounded-l-md bsc-pl-2":N&&a===Ve.Horizontal,"bsc-border-t bsc-border-r bsc-border-l bsc-border-b bsc-rounded-r-md bsc-pr-2":C&&a===Ve.Horizontal,"bsc-border-t bsc-border-b":!N&&!C&&a===Ve.Horizontal,"bsc-border-l":!N&&a===Ve.Horizontal,"bsc-border-l bsc-border-r bsc-border-t bsc-rounded-t-md":N&&a===Ve.Vertical,"bsc-border bsc-rounded-b-md":C&&a===Ve.Vertical,"bsc-border-t bsc-border-l bsc-border-r":!N&&!C&&a===Ve.Vertical},q),V={itemId:R,selectedValue:u?T:x,itemText:ge,itemValue:S,itemData:L,itemStyles:P,isSelected:D(S),isFirstItem:N,isLastItem:C,onItemChanged:Q};return u?p.jsx(kt,{props:V,template:oe,children:F(R,ge,S,P)}):p.jsx(kt,{props:V,template:oe,children:k(R,ge,S,P)})},ne=pe("bsc-flex bsc-flex-col bsc-gap-2",f),M=pe("bsc-flex",{"bsc-flex-col [width:max-content]":a===Ve.Vertical}),H=L=>p.jsx("div",{className:M,children:L.map(ce)});return p.jsxs("div",{className:ne,children:[t&&p.jsx(pt,{label:t,readOnly:i}),j&&H(j)]})},Am=d.memo(Rm),Lm=({id:e,name:t,label:r,value:n,checked:s=!1,labelLocation:o=qe.Right,readOnly:i=!1,useAnimation:a,onChange:u})=>{const f=Tn(a),h=d.useCallback(v=>{u==null||u(v)},[u]),g=pe("bc-radio-item-wrapper bsc-flex bsc-items-center *:bsc-cursor-pointer",{"bc-read-only":i}),x=pe("bc-radio-item-outer bsc-relative *:bsc-size-[21px]",{"bsc-pl-1":o===qe.Left,"bsc-pr-1":o===qe.Right,"bsc-radio-item-animate":!i&&f,"bsc-radio-item":!i,"bc-read-only bsc-radio-item-read-only":i});return p.jsxs("div",{className:g,children:[o===qe.Left&&p.jsx(pt,{label:r,htmlFor:e,readOnly:i}),p.jsxs("label",{className:x,children:[p.jsx("input",{id:e,name:t,value:n,type:"radio",checked:s,onChange:h,className:"bc-radio-item-input-hidden bsc-hidden"}),p.jsxs("svg",{viewBox:"0 0 30 30",preserveAspectRatio:"xMidYMid meet",className:"bc-radio-item-svg",children:[p.jsx("circle",{cx:15,cy:15,r:13}),p.jsx("circle",{cx:"50%",cy:"50%",r:7})]})]}),o===qe.Right&&p.jsx(pt,{label:r,htmlFor:e,readOnly:i})]})},$m=d.memo(Lm),Fm=({name:e,label:t,value:r,data:n,textField:s,valueField:o,readOnly:i=!1,labelLocation:a=qe.Right,orientation:u=Ve.Vertical,className:f,useAnimation:h,onChange:g})=>{const[x,v]=d.useState(r),T=Cn(()=>n,[n]),I=d.useId(),j=d.useCallback(y=>{const F=y.target.value;v(F),g==null||g({name:e,value:F,originalEvent:y})},[e]),E=(y,F)=>{const k=`${I}_radio_${F}`,q=un.pick(o,y);return p.jsx($m,{id:k,name:e,label:un.pick(s,y),value:q,checked:q==x,labelLocation:a,readOnly:i,useAnimation:h,onChange:j},k)},D=pe("bc-radio-container bsc-flex bsc-flex-col bsc-gap-1",f),Q=pe("bc-radio-wrapper bsc-flex bsc-gap-1",{"bsc-flex-col":u===Ve.Vertical,"[&>*]:bsc-pr-2":u===Ve.Horizontal}),U=y=>p.jsx("div",{className:Q,children:y.map(E)});return p.jsxs("div",{className:D,children:[t&&p.jsx(pt,{label:t,readOnly:i}),T&&U(T)]})},Hm=d.memo(Fm),Ym=({name:e,label:t,value:r,checked:n=!1,readOnly:s=!1,useAnimation:o,className:i,onChange:a})=>{const[u,f]=d.useState(!1),h=d.useId(),g=Tn(o);d.useEffect(()=>{f(n)},[n]);const x=E=>{const{checked:D}=E.target;f(D),a==null||a({originalEvent:E,name:e||E.target.name,value:r||E.target.value,checked:D})},v=pe("bc-toggle-wrapper bsc-flex bsc-flex-col",i),T=$r(hr.FocusWithin),I=pe("bc-toggle-container bsc-toggle-switch bsc-flex bsc-mt-0.5 bsc-relative bsc-w-[70px] bsc-h-[30px] bsc-rounded-full [transition:background-color_1s]",{"bsc-cursor-pointer bsc-bg-gray-3 dark:bsc-bg-mono-dark-3 has-[:checked]:bsc-bg-primary-1 has-[:checked]:dark:bsc-bg-mono-light-2":!s,"bc-read-only bsc-pointer-events-none bsc-bg-gray-4 dark:bsc-bg-mono-dark-2 has-[:checked]:bsc-bg-primary-4 has-[:checked]:dark:bsc-bg-mono-light-3":s},T),j=pe("bc-toggle-switch bsc-absolute bsc-rounded-full dark:bsc-border dark:bsc-border-solid dark:bsc-border-mono-dark-1 bsc-w-[22px] bsc-h-[22px] bsc-top-[4px] bsc-left-[4px]",{"bsc-bg-white bsc-cursor-pointer":!s,"bc-read-only bsc-bg-gray-5 bsc-pointer-events-none":s,"[transition:0.3s]":!s&&g});return p.jsxs("div",{className:v,children:[t&&p.jsx(pt,{label:t,htmlFor:h,readOnly:s}),p.jsxs("label",{className:I,children:[p.jsx("input",{id:h,name:e,value:r,type:"checkbox",checked:u,onChange:x,className:"bsc-appearance-none"}),p.jsx("div",{id:"switch",className:j})]})]})},Vm=d.memo(Ym),Zm="";se.BeeSoftProvider=ta,se.Button=ot,se.Checkbox=so,se.CheckboxGroup=Ua,se.ContentEditableInput=Zr,se.DateFormatType=Ir,se.DateScrollerType=Jt,se.DateSelectionType=Pe,se.DateTime=Om,se.FormGroupItemOrientation=Ve,se.FormattedInput=qi,se.GroupButton=Am,se.MediaQuery=Jn,se.MobileOverlayPanel=Hi,se.OverlayPanel=Wi,se.RadioButton=Hm,se.SelectionLabelLocation=qe,se.Toggle=Vm,se.applyBeeSoftTheme=kp,se.createBeeSoftTheme=Op,Object.defineProperty(se,Symbol.toStringTag,{value:"Module"})});
|
|
85
|
+
*/var $n,ni;function Wh(){if(ni)return $n;ni=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function s(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var i={},c=0;c<10;c++)i["_"+String.fromCharCode(c)]=c;var u=Object.getOwnPropertyNames(i).map(function(f){return i[f]});if(u.join("")!=="0123456789")return!1;var h={};return"abcdefghijklmnopqrst".split("").forEach(function(f){h[f]=f}),Object.keys(Object.assign({},h)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return $n=s()?Object.assign:function(o,i){for(var c,u=n(o),h,f=1;f<arguments.length;f++){c=Object(arguments[f]);for(var v in c)t.call(c,v)&&(u[v]=c[v]);if(e){h=e(c);for(var P=0;P<h.length;P++)r.call(c,h[P])&&(u[h[P]]=c[h[P]])}}return u},$n}var Hn,si;function Yn(){if(si)return Hn;si=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Hn=e,Hn}var Wn,oi;function ii(){return oi||(oi=1,Wn=Function.call.bind(Object.prototype.hasOwnProperty)),Wn}var Vn,ai;function Vh(){if(ai)return Vn;ai=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Yn(),r={},n=ii();e=function(o){var i="Warning: "+o;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function s(o,i,c,u,h){if(process.env.NODE_ENV!=="production"){for(var f in o)if(n(o,f)){var v;try{if(typeof o[f]!="function"){var P=Error((u||"React class")+": "+c+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw P.name="Invariant Violation",P}v=o[f](i,f,u,c,null,t)}catch(d){v=d}if(v&&!(v instanceof Error)&&e((u||"React class")+": type specification of "+c+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof v+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),v instanceof Error&&!(v.message in r)){r[v.message]=!0;var l=h?h():"";e("Failed "+c+" type: "+v.message+(l??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Vn=s,Vn}var Bn,ci;function Bh(){if(ci)return Bn;ci=1;var e=ri(),t=Wh(),r=Yn(),n=ii(),s=Vh(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(c){var u="Warning: "+c;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function i(){return null}return Bn=function(c,u){var h=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function v(k){var M=k&&(h&&k[h]||k[f]);if(typeof M=="function")return M}var P="<<anonymous>>",l={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:E(),arrayOf:V,element:R(),elementType:S(),instanceOf:$,node:se(),objectOf:q,oneOf:O,oneOfType:z,shape:re,exact:K};function d(k,M){return k===M?k!==0||1/k===1/M:k!==k&&M!==M}function b(k,M){this.message=k,this.data=M&&typeof M=="object"?M:{},this.stack=""}b.prototype=Error.prototype;function x(k){if(process.env.NODE_ENV!=="production")var M={},N=0;function _(J,H,U,Z,te,D,ie){if(Z=Z||P,D=D||U,ie!==r){if(u){var A=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 A.name="Invariant Violation",A}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ne=Z+":"+U;!M[Ne]&&N<3&&(o("You are manually calling a React.PropTypes validation function for the `"+D+"` prop on `"+Z+"`. 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."),M[Ne]=!0,N++)}}return H[U]==null?J?H[U]===null?new b("The "+te+" `"+D+"` is marked as required "+("in `"+Z+"`, but its value is `null`.")):new b("The "+te+" `"+D+"` is marked as required in "+("`"+Z+"`, but its value is `undefined`.")):null:k(H,U,Z,te,D)}var W=_.bind(null,!1);return W.isRequired=_.bind(null,!0),W}function y(k){function M(N,_,W,J,H,U){var Z=N[_],te=C(Z);if(te!==k){var D=Q(Z);return new b("Invalid "+J+" `"+H+"` of type "+("`"+D+"` supplied to `"+W+"`, expected ")+("`"+k+"`."),{expectedType:k})}return null}return x(M)}function E(){return x(i)}function V(k){function M(N,_,W,J,H){if(typeof k!="function")return new b("Property `"+H+"` of component `"+W+"` has invalid PropType notation inside arrayOf.");var U=N[_];if(!Array.isArray(U)){var Z=C(U);return new b("Invalid "+J+" `"+H+"` of type "+("`"+Z+"` supplied to `"+W+"`, expected an array."))}for(var te=0;te<U.length;te++){var D=k(U,te,W,J,H+"["+te+"]",r);if(D instanceof Error)return D}return null}return x(M)}function R(){function k(M,N,_,W,J){var H=M[N];if(!c(H)){var U=C(H);return new b("Invalid "+W+" `"+J+"` of type "+("`"+U+"` supplied to `"+_+"`, expected a single ReactElement."))}return null}return x(k)}function S(){function k(M,N,_,W,J){var H=M[N];if(!e.isValidElementType(H)){var U=C(H);return new b("Invalid "+W+" `"+J+"` of type "+("`"+U+"` supplied to `"+_+"`, expected a single ReactElement type."))}return null}return x(k)}function $(k){function M(N,_,W,J,H){if(!(N[_]instanceof k)){var U=k.name||P,Z=he(N[_]);return new b("Invalid "+J+" `"+H+"` of type "+("`"+Z+"` supplied to `"+W+"`, expected ")+("instance of `"+U+"`."))}return null}return x(M)}function O(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("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])."):o("Invalid argument supplied to oneOf, expected an array.")),i;function M(N,_,W,J,H){for(var U=N[_],Z=0;Z<k.length;Z++)if(d(U,k[Z]))return null;var te=JSON.stringify(k,function(ie,A){var Ne=Q(A);return Ne==="symbol"?String(A):A});return new b("Invalid "+J+" `"+H+"` of value `"+String(U)+"` "+("supplied to `"+W+"`, expected one of "+te+"."))}return x(M)}function q(k){function M(N,_,W,J,H){if(typeof k!="function")return new b("Property `"+H+"` of component `"+W+"` has invalid PropType notation inside objectOf.");var U=N[_],Z=C(U);if(Z!=="object")return new b("Invalid "+J+" `"+H+"` of type "+("`"+Z+"` supplied to `"+W+"`, expected an object."));for(var te in U)if(n(U,te)){var D=k(U,te,W,J,H+"."+te,r);if(D instanceof Error)return D}return null}return x(M)}function z(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var M=0;M<k.length;M++){var N=k[M];if(typeof N!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+I(N)+" at index "+M+"."),i}function _(W,J,H,U,Z){for(var te=[],D=0;D<k.length;D++){var ie=k[D],A=ie(W,J,H,U,Z,r);if(A==null)return null;A.data&&n(A.data,"expectedType")&&te.push(A.data.expectedType)}var Ne=te.length>0?", expected one of type ["+te.join(", ")+"]":"";return new b("Invalid "+U+" `"+Z+"` supplied to "+("`"+H+"`"+Ne+"."))}return x(_)}function se(){function k(M,N,_,W,J){return L(M[N])?null:new b("Invalid "+W+" `"+J+"` supplied to "+("`"+_+"`, expected a ReactNode."))}return x(k)}function ae(k,M,N,_,W){return new b((k||"React class")+": "+M+" type `"+N+"."+_+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+W+"`.")}function re(k){function M(N,_,W,J,H){var U=N[_],Z=C(U);if(Z!=="object")return new b("Invalid "+J+" `"+H+"` of type `"+Z+"` "+("supplied to `"+W+"`, expected `object`."));for(var te in k){var D=k[te];if(typeof D!="function")return ae(W,J,H,te,Q(D));var ie=D(U,te,W,J,H+"."+te,r);if(ie)return ie}return null}return x(M)}function K(k){function M(N,_,W,J,H){var U=N[_],Z=C(U);if(Z!=="object")return new b("Invalid "+J+" `"+H+"` of type `"+Z+"` "+("supplied to `"+W+"`, expected `object`."));var te=t({},N[_],k);for(var D in te){var ie=k[D];if(n(k,D)&&typeof ie!="function")return ae(W,J,H,D,Q(ie));if(!ie)return new b("Invalid "+J+" `"+H+"` key `"+D+"` supplied to `"+W+"`.\nBad object: "+JSON.stringify(N[_],null," ")+`
|
|
86
|
+
Valid keys: `+JSON.stringify(Object.keys(k),null," "));var A=ie(U,D,W,J,H+"."+D,r);if(A)return A}return null}return x(M)}function L(k){switch(typeof k){case"number":case"string":case"undefined":return!0;case"boolean":return!k;case"object":if(Array.isArray(k))return k.every(L);if(k===null||c(k))return!0;var M=v(k);if(M){var N=M.call(k),_;if(M!==k.entries){for(;!(_=N.next()).done;)if(!L(_.value))return!1}else for(;!(_=N.next()).done;){var W=_.value;if(W&&!L(W[1]))return!1}}else return!1;return!0;default:return!1}}function F(k,M){return k==="symbol"?!0:M?M["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&M instanceof Symbol:!1}function C(k){var M=typeof k;return Array.isArray(k)?"array":k instanceof RegExp?"object":F(M,k)?"symbol":M}function Q(k){if(typeof k>"u"||k===null)return""+k;var M=C(k);if(M==="object"){if(k instanceof Date)return"date";if(k instanceof RegExp)return"regexp"}return M}function I(k){var M=Q(k);switch(M){case"array":case"object":return"an "+M;case"boolean":case"date":case"regexp":return"a "+M;default:return M}}function he(k){return!k.constructor||!k.constructor.name?P:k.constructor.name}return l.checkPropTypes=s,l.resetWarningCache=s.resetWarningCache,l.PropTypes=l,l},Bn}var Un,ui;function Uh(){if(ui)return Un;ui=1;var e=Yn();function t(){}function r(){}return r.resetWarningCache=t,Un=function(){function n(i,c,u,h,f,v){if(v!==e){var P=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw P.name="Invariant Violation",P}}n.isRequired=n;function s(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:s,element:n,elementType:n,instanceOf:s,node:n,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:r,resetWarningCache:t};return o.PropTypes=o,o},Un}var li;function qh(){if(li)return zr.exports;if(li=1,process.env.NODE_ENV!=="production"){var e=ri(),t=!0;zr.exports=Bh()(e.isElement,t)}else zr.exports=Uh()();return zr.exports}var zh=qh();const ue=rn(zh),fi={disabled:!1};var Kh=process.env.NODE_ENV!=="production"?ue.oneOfType([ue.number,ue.shape({enter:ue.number,exit:ue.number,appear:ue.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&ue.oneOfType([ue.string,ue.shape({enter:ue.string,exit:ue.string,active:ue.string}),ue.shape({enter:ue.string,enterDone:ue.string,enterActive:ue.string,exit:ue.string,exitDone:ue.string,exitActive:ue.string})]);const di=p.createContext(null);var Zh=function(t){return t.scrollTop},Sr="unmounted",Ct="exited",Dt="entering",Bt="entered",qn="exiting",pt=function(e){$h(t,e);function t(n,s){var o;o=e.call(this,n,s)||this;var i=s,c=i&&!i.isMounting?n.enter:n.appear,u;return o.appearStatus=null,n.in?c?(u=Ct,o.appearStatus=Dt):u=Bt:n.unmountOnExit||n.mountOnEnter?u=Sr:u=Ct,o.state={status:u},o.nextCallback=null,o}t.getDerivedStateFromProps=function(s,o){var i=s.in;return i&&o.status===Sr?{status:Ct}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(s){var o=null;if(s!==this.props){var i=this.state.status;this.props.in?i!==Dt&&i!==Bt&&(o=Dt):(i===Dt||i===Bt)&&(o=qn)}this.updateStatus(!1,o)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var s=this.props.timeout,o,i,c;return o=i=c=s,s!=null&&typeof s!="number"&&(o=s.exit,i=s.enter,c=s.appear!==void 0?s.appear:i),{exit:o,enter:i,appear:c}},r.updateStatus=function(s,o){if(s===void 0&&(s=!1),o!==null)if(this.cancelNextCallback(),o===Dt){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:Je.findDOMNode(this);i&&Zh(i)}this.performEnter(s)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ct&&this.setState({status:Sr})},r.performEnter=function(s){var o=this,i=this.props.enter,c=this.context?this.context.isMounting:s,u=this.props.nodeRef?[c]:[Je.findDOMNode(this),c],h=u[0],f=u[1],v=this.getTimeouts(),P=c?v.appear:v.enter;if(!s&&!i||fi.disabled){this.safeSetState({status:Bt},function(){o.props.onEntered(h)});return}this.props.onEnter(h,f),this.safeSetState({status:Dt},function(){o.props.onEntering(h,f),o.onTransitionEnd(P,function(){o.safeSetState({status:Bt},function(){o.props.onEntered(h,f)})})})},r.performExit=function(){var s=this,o=this.props.exit,i=this.getTimeouts(),c=this.props.nodeRef?void 0:Je.findDOMNode(this);if(!o||fi.disabled){this.safeSetState({status:Ct},function(){s.props.onExited(c)});return}this.props.onExit(c),this.safeSetState({status:qn},function(){s.props.onExiting(c),s.onTransitionEnd(i.exit,function(){s.safeSetState({status:Ct},function(){s.props.onExited(c)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(s,o){o=this.setNextCallback(o),this.setState(s,o)},r.setNextCallback=function(s){var o=this,i=!0;return this.nextCallback=function(c){i&&(i=!1,o.nextCallback=null,s(c))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},r.onTransitionEnd=function(s,o){this.setNextCallback(o);var i=this.props.nodeRef?this.props.nodeRef.current:Je.findDOMNode(this),c=s==null&&!this.props.addEndListener;if(!i||c){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],h=u[0],f=u[1];this.props.addEndListener(h,f)}s!=null&&setTimeout(this.nextCallback,s)},r.render=function(){var s=this.state.status;if(s===Sr)return null;var o=this.props,i=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var c=Fh(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return p.createElement(di.Provider,{value:null},typeof i=="function"?i(s,c):p.cloneElement(p.Children.only(i),c))},t}(p.Component);pt.contextType=di,pt.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:ue.shape({current:typeof Element>"u"?ue.any:function(e,t,r,n,s,o){var i=e[t];return ue.instanceOf(i&&"ownerDocument"in i?i.ownerDocument.defaultView.Element:Element)(e,t,r,n,s,o)}}),children:ue.oneOfType([ue.func.isRequired,ue.element.isRequired]).isRequired,in:ue.bool,mountOnEnter:ue.bool,unmountOnExit:ue.bool,appear:ue.bool,enter:ue.bool,exit:ue.bool,timeout:function(t){var r=Kh;t.addEndListener||(r=r.isRequired);for(var n=arguments.length,s=new Array(n>1?n-1:0),o=1;o<n;o++)s[o-1]=arguments[o];return r.apply(void 0,[t].concat(s))},addEndListener:ue.func,onEnter:ue.func,onEntering:ue.func,onEntered:ue.func,onExit:ue.func,onExiting:ue.func,onExited:ue.func}:{};function Ut(){}pt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ut,onEntering:Ut,onEntered:Ut,onExit:Ut,onExiting:Ut,onExited:Ut},pt.UNMOUNTED=Sr,pt.EXITED=Ct,pt.ENTERING=Dt,pt.ENTERED=Bt,pt.EXITING=qn;const hi=({start:e,timeout:t=400,defaultStyle:r,transitionStyles:n,showTransitionOptions:s="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:o="linear",unmountOnExit:i=!1,onEntering:c,onEntered:u,onExit:h,onExited:f,children:v})=>{const P=r||{transition:`opacity ${t}ms ${s}`,opacity:0},l=n||{entering:{opacity:1},entered:{opacity:1},exiting:{transition:`opacity ${t}ms ${o}`,opacity:0},exited:{transition:`opacity ${t}ms ${o}`,opacity:0},unmounted:{}};return g.jsx(pt,{in:e,timeout:t,onEntering:c,onEntered:u,onExit:h,onExited:f,unmountOnExit:i,children:d=>v({state:d,defaultStyle:P,transitionStyles:l})})};function pi(e){return e.target?e.target:e}const mi=({visible:e,target:t,appendTo:r=document.body,unmountWhenHidden:n=!1,transitionDuration:s=400,showTransitionOptions:o="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:i="linear",approveText:c="DONE",shown:u,hidden:h,isClickedWithin:f,children:v})=>{const[P,l]=p.useState(-1),[d,b]=p.useState(-1),[x,y]=p.useState(e),E=p.useRef(100),V=p.useRef(101),R=p.useRef(),S=p.useRef(),$=p.useRef();p.useEffect(()=>{t&&(R.current=pi(t));const K=Ko("zIndex",L=>L==="auto"||L==="-1"?!1:parseInt(L)>100).map(L=>parseInt(L,10));K.length>0&&(E.current=Math.max(...K)+1,V.current=Math.max(...K)+2),y(e)},[e,t]);const O=K=>{S.current=K},q=()=>{b(E.current),l(V.current)},z=()=>{if(!S.current)return;u==null||u();let K;R.current&&(K=[R.current]);const L=F=>{F?f==null||f():y(!1)};$.current=Qo(S.current,L,K)},se=()=>{$.current&&Xo($.current)},ae=()=>{b(-1),l(-1),h==null||h()},re={entering:{opacity:.5},entered:{opacity:.5}};return Je.createPortal(g.jsx(hi,{start:x,timeout:s,showTransitionOptions:o,hideTransitionOptions:i,onEntering:q,onEntered:z,onExit:se,onExited:ae,unmountOnExit:n,children:({state:K,defaultStyle:L,transitionStyles:F})=>g.jsxs("div",{ref:C=>C&&O(C),children:[g.jsx("div",{className:"bsc:fixed bsc:left-0 bsc:top-0 bsc:h-full bsc:w-full bsc:bg-mono-dark-1",style:{zIndex:d,...F[K],...re[K]}}),g.jsxs("div",{className:"dark:bsck-border-mono-light-1 bsc:fixed bsc:bottom-0 bsc:left-0 bsc:w-full bsc:bg-white bsc:dark:border-t bsc:dark:border-solid bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1",style:{zIndex:P,...L,...F[K]},children:[g.jsx("div",{className:"bsc:w-full",children:v}),g.jsx(g.Fragment,{children:g.jsx(et,{buttonType:"primary",fullWidth:!0,onClick:()=>y(!1),className:"bsc:text-xs bsc:font-bold",children:c})})]})]})}),r)};var gi=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(gi||{}),bi=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(bi||{});class ke{static positionToTarget(t,r=2){const n=t.getBoundingClientRect();let s=0,o=0;const i=window.scrollY;switch(r){case 2:s=n.top+n.height+i,o=n.left;break;case 0:s=n.top+i,o=n.left;break;case 3:s=n.top+n.height+i,o=n.left+n.width;break;case 1:s=n.top+i,o=n.left+n.width}return{top:s,left:o}}static positionElementToTarget(t,r,n=0,s=2){let{left:o,top:i}=ke.positionToTarget(r,s);const c=t.getBoundingClientRect();switch(n){case 0:break;case 1:o=o-c.width;break;case 2:i=i-c.height;break;case 3:i=i-c.height,o=o-c.width;break}return{top:i,left:o}}static canPositionElementOnScreenWithTarget(t,r){const n=ke.getScreenDimensions(),s=t.getBoundingClientRect(),o=ke.positionElementToTarget(t,r,0,2);if(o.left+s.width<n.width&&o.top+s.height<n.height||ke.positionElementToTarget(t,r,1,3).left>=0&&o.top+s.height<n.height)return!0;const c=ke.positionElementToTarget(t,r,2,0);if(c.left+s.width<n.width&&c.top>=0)return!0;const u=ke.positionElementToTarget(t,r,3,1);return u.left>=0&&u.top>=0}static canPositionElementOnScreen(t){const r=ke.getScreenDimensions(),n=t.getBoundingClientRect();return n.width<=r.width&&n.height<=r.height}static positionElementToTargetOnScreen(t,r,n=0,s=2){const{left:o,top:i}=ke.positionElementToTarget(t,r,n,s),c=t.getBoundingClientRect(),u=ke.determineOffScreenLocation(c);if(u){if(n===0&&s===2){if(u.right&&!u.bottom)return ke.positionElementToTarget(t,r,1,3);if(u.bottom&&!u.right)return ke.positionElementToTarget(t,r,2,0);if(u.right&&u.bottom)return ke.positionElementToTarget(t,r,3,1)}else if(n===1&&s===3){if(u.left&&!u.bottom)return ke.positionElementToTarget(t,r,0,2);if(u.bottom&&!u.left)return ke.positionElementToTarget(t,r,3,1);if(u.left&&u.bottom)return ke.positionElementToTarget(t,r,2,0)}}return{top:i,left:o}}static determineOffScreenLocation(t){const r=ke.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 yi=({visible:e,target:t,targetPosition:r=gi.BottomLeft,elementAlignment:n=bi.TopLeft,shouldTargetCloseOverlay:s=!0,shouldMatchTargetWidth:o=!1,shouldScrollCloseOverlay:i=!1,shouldCheckZIndex:c=!1,shouldRemainOnScreen:u=!1,unmountWhenHidden:h=!1,transitionDuration:f=400,showTransitionOptions:v="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:P="linear",shown:l,hidden:d,isClickedWithin:b,markupCreated:x,children:y})=>{const[E,V]=p.useState(-1),[R,S]=p.useState(e),[$,O]=p.useState(!1),q=p.useRef(!1),z=p.useRef(100),se=p.useRef({left:0,top:0,width:0}),ae=p.useRef(),re=p.useRef(),K=p.useRef(),L=p.useRef(),F=p.useRef(),C=p.useRef(),Q=cs();p.useEffect(()=>(u===!0&&(C.current=new ResizeObserver(I)),()=>{var H,U;u===!0&&(re.current&&((H=C.current)==null||H.unobserve(re.current)),(U=C.current)==null||U.disconnect())}),[]),p.useEffect(()=>{if(t&&(ae.current=pi(t),i)){const H=Q==null?void 0:Q.isValidScrollableElement;K.current=zo(ae.current,{overflow:"scroll, auto",overflowX:"scroll, auto",overflowY:"scroll, auto"},!1,H),K.current.tagName.toLowerCase()==="html"&&(K.current=document)}if(c){const H=Ko("zIndex",U=>parseInt(U)>=100).map(U=>parseInt(U));H.length>0&&(z.current=Math.max(...H)+1)}e!==void 0&&S(e)},[t,e,i,c]);const I=H=>{if(re.current){const U=ke.getScreenDimensions(),Z=H[H.length-1].target,te=Z.getBoundingClientRect(),D=ke.determineOffScreenLocation(te);if(D){if(ae.current&&ke.canPositionElementOnScreenWithTarget(Z,ae.current)){const ie=ke.positionElementToTargetOnScreen(re.current,ae.current,n,r);se.current={...se.current,...ie}}else D.right?se.current.left=U.width-te.width:D.left&&(se.current.left=0),D.bottom?se.current.top=U.height-te.height:D.top&&(se.current.top=0);he()}}},he=yr(()=>{q.current=!q.current,O(q.current)},20),k=()=>{V(z.current)},M=()=>{if(!re.current)return;l==null||l();let H;!s&&ae.current&&(H=[ae.current]);const U=Z=>{Z?b==null||b():S(!1)};L.current=Qo(re.current,U,H),i&&(F.current=of(Z=>re.current&&Ph(Z,re.current)&&S(!1),100,{leading:!0}),K.current&&K.current.addEventListener("scroll",F.current))},N=()=>{K.current&&F.current&&(K.current.removeEventListener("scroll",F.current),F.current=void 0),L.current&&Xo(L.current)},_=()=>{V(-1),d==null||d()},W=H=>{var U,Z;if(u===!0&&re.current&&((U=C.current)==null||U.unobserve(re.current)),re.current=H,x==null||x(H),ae.current){const te=ke.positionElementToTarget(re.current,ae.current,n,r);se.current={...te,width:ae.current.offsetWidth},u===!0&&(ke.canPositionElementOnScreenWithTarget(re.current,ae.current)||ke.canPositionElementOnScreen(re.current))&&((Z=C.current)==null||Z.observe(re.current))}},J=p.useMemo(()=>{const H={top:`${se.current.top}px`,left:`${se.current.left}px`,zIndex:E};return o&&(H.width=`${se.current.width}px`),H},[$,E,o]);return g.jsx(hi,{start:R,timeout:f,showTransitionOptions:v,hideTransitionOptions:P,onEntering:k,onEntered:M,onExit:N,onExited:_,unmountOnExit:h,children:({state:H,defaultStyle:U,transitionStyles:Z})=>g.jsx("div",{className:"bsc:fixed bsc:border bsc:border-solid bsc:bg-white bsc:shadow bsc:dark:border-mono-light-1 bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1",style:{...J,...U,...Z[H]},ref:te=>te&&W(te),children:y})})};let Zr;const Gh=new Uint8Array(16);function Qh(){if(!Zr&&(Zr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Zr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Zr(Gh)}const Fe=[];for(let e=0;e<256;++e)Fe.push((e+256).toString(16).slice(1));function Xh(e,t=0){return Fe[e[t+0]]+Fe[e[t+1]]+Fe[e[t+2]]+Fe[e[t+3]]+"-"+Fe[e[t+4]]+Fe[e[t+5]]+"-"+Fe[e[t+6]]+Fe[e[t+7]]+"-"+Fe[e[t+8]]+Fe[e[t+9]]+"-"+Fe[e[t+10]]+Fe[e[t+11]]+Fe[e[t+12]]+Fe[e[t+13]]+Fe[e[t+14]]+Fe[e[t+15]]}const vi={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Jh(e,t,r){if(vi.randomUUID&&!e)return vi.randomUUID();e=e||{};const n=e.random||(e.rng||Qh)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Xh(n)}class Er{static create(t){const r=[];let n=0;for(let s=0,o=t.formatParts.length;s<o;s++){const i=t.formatParts[s],c=n,u=c+i.characterCount;r.push({startPosition:c,endPosition:u,...i}),n=u}return r}}class ep{constructor(t,r){T(this,"instanceCollection");T(this,"formatPartList");T(this,"inputSlotCollection");T(this,"currentPartIndex",0);T(this,"currentPartIndices",[]);T(this,"currentCursorPosition",0);T(this,"highlightCursorPosition",0);T(this,"currentCursorStartPosition",-1);T(this,"currentCursorEndPosition",-1);T(this,"inputElement");T(this,"inputSelection",null);T(this,"inputRange");T(this,"textNode");this.instanceCollection=qt.getInstance(),this.formatPartList=Er.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t)}get isSelection(){return this.inputRange!==void 0&&this.inputRange.startOffset!==this.inputRange.endOffset}get isAllSelected(){var r;const t=this.inputSlotCollection.getLastSlot();return this.isSelection&&((r=this.inputRange)==null?void 0:r.startOffset)===0&&this.inputRange.endOffset===t.endPosition}getCursorPosition(){return this.currentCursorPosition}getCursorStartPosition(){return this.currentCursorStartPosition}getCursorEndPosition(){return this.currentCursorEndPosition}getCurrentPartIndex(){return this.currentPartIndex}getCurrentPartIndices(){return this.currentPartIndices}setInputElement(t){this.inputElement=t}setCursorToCurrentPosition(){this.setCursorSelection(this.currentCursorPosition>-1?this.currentCursorPosition:this.highlightCursorPosition)}setCursorPosition(t){this.setCursorSelection(t)}setCursorSelection(t,r){if(this.createInputRangeSelection(),this.inputRange&&this.textNode){let n,s,o=!0;r===void 0?(n=t,s=t):t<r?(n=t,s=r):(o=!1,n=r,s=t),this.inputRange.setStart(this.textNode,n),this.inputRange.setEnd(this.textNode,s),this.currentPartIndices=[],n===s?(this.currentCursorPosition=s,this.highlightCursorPosition=s,this.currentCursorStartPosition=-1,this.currentCursorEndPosition=-1,this.setPartIndexByCursorPosition()):(o?this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1?this.highlightCursorPosition=s:this.currentCursorStartPosition!==n?this.highlightCursorPosition=n:this.currentCursorEndPosition!==s&&(this.highlightCursorPosition=s):this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1?this.highlightCursorPosition=n:this.currentCursorStartPosition!==s?this.highlightCursorPosition=s:this.currentCursorEndPosition!==n&&(this.highlightCursorPosition=n),this.currentCursorStartPosition=n,this.currentCursorEndPosition=s,this.currentCursorPosition=-1,this.setPartIndexByHighlightPosition(),this.setPartIndicesByCursorPositions())}}findCursorPosition(){var n;const t=window.getSelection(),r=t==null?void 0:t.getRangeAt(0);if(this.inputElement&&t&&r){const s=document.createTreeWalker(this.inputElement,NodeFilter.SHOW_TEXT,u=>{const h=document.createRange();return h.selectNodeContents(u),h.compareBoundaryPoints(Range.END_TO_END,r)<1?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});let o=0;for(;s.nextNode();)o+=((n=s.currentNode.textContent)==null?void 0:n.length)||0;r.startContainer.nodeType===Node.TEXT_NODE&&(o+=r.startOffset);const i=this.inputSlotCollection.getLastSlotWithData(),c=i.startPosition+i.partText.length;t.anchorOffset===t.focusOffset?this.setCursorSelection(o>c?c:o):this.setCursorSelection(t.anchorOffset,t.focusOffset)}}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.updateCursorPosition(),this.currentCursorPosition>0&&!this.isSelection){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--)if(r=this.formatPartList[n],t>=r.startPosition&&t<=r.endPosition){r.isSeparator?this.setCursorSelection(this.formatPartList[n-1].endPosition):this.setCursorSelection(t);break}}else this.isSelection?this.setCursorSelection(this.currentCursorPosition):this.moveHome()}moveCursorRight(){this.updateCursorPosition(!1);const t=this.inputSlotCollection.getLastSlotWithData(),r=t.startPosition+t.partText.length;if(this.currentCursorPosition<r&&!this.isSelection){const n=this.currentCursorPosition+1;let s=this.formatPartList[this.currentPartIndex];if(n>=s.startPosition&&n<=s.endPosition)this.setCursorSelection(n);else for(let o=this.currentPartIndex+1,i=this.formatPartList.length;o<i;o++)if(s=this.formatPartList[o],n>=s.startPosition&&n<=s.endPosition){s.isSeparator?this.setCursorSelection(this.formatPartList[o+1].startPosition):this.setCursorSelection(n);break}}else this.setCursorSelection(this.currentCursorPosition)}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))}}highlightAll(){const t=this.formatPartList[this.formatPartList.length-1].endPosition;this.setCursorSelection(0,t)}moveHighlightLeft(){this.updateHighlightPositions();const t=this.highlightCursorPosition>this.currentCursorStartPosition;if(this.currentCursorStartPosition>0||t){let r=t?this.currentCursorStartPosition:this.currentCursorStartPosition-1,n=t?this.highlightCursorPosition-1:this.currentCursorEndPosition,s=this.formatPartList[this.currentPartIndex];if(r>=s.startPosition&&r<=s.endPosition||t&&n>=s.startPosition&&n<=s.endPosition)this.setCursorSelection(r,n);else for(let o=this.currentPartIndex-1;o>=0;o--)if(s=this.formatPartList[o],r>=s.startPosition&&r<=s.endPosition||t&&n>=s.startPosition&&n<=s.endPosition){s.isSeparator?(t?n=this.formatPartList[o-1].endPosition:r=this.formatPartList[o-1].endPosition,this.setCursorSelection(r,n)):this.setCursorSelection(r,n);break}}}moveHighlightRight(){this.updateHighlightPositions();const t=this.inputSlotCollection.getLastSlotWithData(),r=t.startPosition+t.partText.length,n=this.highlightCursorPosition<this.currentCursorEndPosition;if(this.currentCursorEndPosition<r||n){let s=n?this.highlightCursorPosition+1:this.currentCursorStartPosition,o=n?this.currentCursorEndPosition:this.currentCursorEndPosition+1,i=this.formatPartList[this.currentPartIndex];if(o>=i.startPosition&&o<=i.endPosition||n&&s>=i.startPosition&&s<=i.endPosition)this.setCursorSelection(s,o);else for(let c=this.currentPartIndex+1,u=this.formatPartList.length;c<u;c++)if(i=this.formatPartList[c],o>=i.startPosition&&o<=i.endPosition||n&&s>=i.startPosition&&s<=i.endPosition){i.isSeparator?(n?s=this.formatPartList[c+1].startPosition:o=this.formatPartList[c+1].startPosition,this.setCursorSelection(s,o)):this.setCursorSelection(s,o);break}}}updateHighlightPositions(){this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1&&this.currentCursorPosition>-1&&(this.currentCursorStartPosition=this.currentCursorPosition,this.currentCursorEndPosition=this.currentCursorPosition,this.highlightCursorPosition=this.currentCursorPosition)}updateCursorPosition(t=!0){this.currentCursorPosition===-1&&this.currentCursorStartPosition>-1&&this.currentCursorEndPosition>-1&&(t?this.currentCursorPosition=this.currentCursorStartPosition:this.currentCursorPosition=this.currentCursorEndPosition)}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}}}setPartIndexByHighlightPosition(){for(let t=0;t<this.formatPartList.length;t++){const r=this.formatPartList[t];if(this.highlightCursorPosition>=r.startPosition&&this.highlightCursorPosition<=r.endPosition){if(r.isSeparator){this.highlightCursorPosition=this.formatPartList[t+1].startPosition,this.currentPartIndex=t+1;break}this.currentPartIndex=t;break}}}setPartIndicesByCursorPositions(){for(let t=0,r=this.formatPartList.length;t<r;t++){const n=this.formatPartList[t];n.isSeparator||(n.startPosition>=this.currentCursorStartPosition&&n.startPosition<=this.currentCursorEndPosition||n.endPosition>=this.currentCursorStartPosition&&n.endPosition<=this.currentCursorEndPosition||n.startPosition<this.currentCursorStartPosition&&n.endPosition>this.currentCursorEndPosition)&&this.currentPartIndices.push(t)}}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 tp{static create(t){const r=[];for(let n=0,s=t.length;n<s;n++){const o=t[n];o.isSeparator||r.push({partIndex:n,partText:"",isComplete:!1,...o})}return r}}class rp{constructor(t){T(this,"inputSlots");this.inputSlots=tp.create(Er.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)}getSlots(t){return this.inputSlots.filter(r=>t.includes(r.partIndex))}getSlotsFromCursorPosition(t){let r=-1;for(let n=0,s=this.inputSlots.length;n<s;n++){const o=this.inputSlots[n];if(t>=o.startPosition&&t<=o.endPosition){r=o.partIndex;break}}return r>-1?this.inputSlots.filter(n=>n.partIndex>=r):void 0}getFirstSlot(){return this.inputSlots[0]}getLastSlot(){return this.inputSlots[this.inputSlots.length-1]}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,s=this.inputSlots.length;n<s;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 qt{static getInstance(){return this.instance||(this.instance=new np),this.instance}}T(qt,"instance");class np{constructor(){T(this,"navigatorInstances");T(this,"inputSlotInstances");this.navigatorInstances={},this.inputSlotInstances={}}getNavigatorInstance(t,r){return this.navigatorInstances[t]||(this.navigatorInstances[t]=new ep(r,t)),this.navigatorInstances[t]}getInputSlotInstance(t,r){return this.inputSlotInstances[t]||(this.inputSlotInstances[t]=new rp(r)),this.inputSlotInstances[t]}removeInstances(t){this.navigatorInstances[t]&&delete this.navigatorInstances[t],this.inputSlotInstances[t]&&delete this.inputSlotInstances[t]}}class zn{constructor(t,r){T(this,"instanceCollection");T(this,"formatPartList");T(this,"inputSlotCollection");T(this,"inputElement");this.instanceCollection=qt.getInstance(),this.formatPartList=Er.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t)}setInputElement(t){this.inputElement=t}render(){var r;let t="";for(let n=0,s=this.formatPartList.length;n<s;n++){const o=this.formatPartList[n];if(o.isSeparator)t+=o.inputText;else{const i=this.inputSlotCollection.getSlot(n);i&&(t+=i.partText+((r=i.inputText)==null?void 0:r.repeat(i.characterCount-i.partText.length)))}}this.inputElement&&(this.inputElement.innerHTML=t)}}var st=(e=>(e[e.Text=0]="Text",e[e.Numeric=1]="Numeric",e))(st||{});class xi{constructor(){T(this,"numberKeys",["0","1","2","3","4","5","6","7","8","9"]);T(this,"movementKeys",["ArrowLeft","ArrowRight","Home","End","a"]);T(this,"editingKeys",["Backspace","Delete"]);T(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 sp{constructor(t){T(this,"_currentIndex",0);T(this,"index",0);T(this,"formatParts");this.formatParts=Er.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 op{constructor(t){T(this,"formatParts");this.formatParts=Er.create(t)}getUniqueSeparators(){const t=[],r=this.formatParts.filter(n=>n.isSeparator);for(let n=0,s=r.length;n<s;n++){const o=r[n];o.inputText&&!t.includes(o.inputText)&&t.push(o.inputText)}return t}}class wi{constructor(t,r){T(this,"instanceCollection");T(this,"inputSlotCollection");T(this,"formatNavigator");T(this,"keyTypeChecker");T(this,"formatRenderer");T(this,"formatPartList");T(this,"partEntryList");this.format=t,this.instanceCollection=qt.getInstance(),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,t),this.keyTypeChecker=new xi,this.formatRenderer=new zn(t,r),this.formatPartList=new sp(t),this.partEntryList=new op(t)}setInputElement(t){this.formatRenderer.setInputElement(t)}processKeyPress(t){if(this.keyTypeChecker.isEditingKey(t)){this.processEditRules(t);return}this.formatNavigator.isSelection?(this.processSelectionEditRules(),setTimeout(()=>this.processInputRules(t))):this.processInputRules(t)}processInputValue(t){var n;this.inputSlotCollection.clearAllSlots(),this.formatPartList.reset();let r=0;for(;this.formatPartList.hasNext();){const s=this.formatPartList.next();if(s&&!s.isSeparator)if(((n=this.formatPartList.peek())==null?void 0:n.isSeparator)===!0){const o=this.formatPartList.currentIndex,i=this.formatPartList.next();if(i&&i.inputText){const c=t.indexOf(i.inputText,r),u=this.inputSlotCollection.getSlot(o);if(u&&c>-1){const h=c-r>u.characterCount?r+u.characterCount:c;u.partText=t.substring(r,h),this.processSlotRules(u),r=c+i.characterCount}}}else{const o=this.inputSlotCollection.getSlot(this.formatPartList.currentIndex);o&&(o.partText=t.substring(r,r+o.characterCount),this.processSlotRules(o))}}}processPastedValue(t,r=!1){r&&this.processSelectionEditRules();const n=this.formatNavigator.getCursorPosition(),s=this.inputSlotCollection.getSlotsFromCursorPosition(n);if(s){const o=n-s[0].startPosition,i=s[0].partText.substring(0,o);let c=s[0].partText.substring(o);s[0].partText="";for(let v=1,P=s.length;v<P;v++)c+=s[v].partText,s[v].partText="";const u=this.removeSeparatorsFromValue(t),h=i+u+c;let f=0;for(let v=0,P=s.length;v<P;v++){const l=s[v];l.partText=h.substring(f,l.characterCount+f),f+=l.characterCount,this.processSlotRules(l)}}}removeSeparatorsFromValue(t){let r=t;const n=this.partEntryList.getUniqueSeparators();for(let s=0,o=n.length;s<o;s++){const i=n[s];r=r.replaceAll(i,"")}return r}processEditRules(t){this.formatNavigator.isSelection?this.processSelectionEditRules():this.processNonSelectionEditRules(t)}processNonSelectionEditRules(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!r)return;const n=this.formatNavigator.getCursorPosition(),s=n-r.startPosition,o=this.format.deleteShiftsFormatPart||!1;switch(t.key){case"Backspace":{if(!(r.startPosition===n))r.partText=r.partText.substring(0,s-1)+r.partText.substring(s),o&&this.shiftFormatParts(r),this.formatRenderer.render(),this.formatNavigator.moveCursorLeft(),this.processSlotRules(r,!0);else{this.processSlotRules(r,!0);const c=this.inputSlotCollection.getPreviousSlot(r.partIndex);c&&(c.partText=c.partText.substring(0,c.partText.length-1),o&&this.shiftFormatParts(c),this.formatRenderer.render(),this.formatNavigator.setCursorPosition(c.startPosition+c.partText.length),this.processSlotRules(c,!0))}break}case"Delete":r.partText=r.partText.substring(0,s)+r.partText.substring(s+1),o&&this.shiftFormatParts(r),this.formatRenderer.render(),this.formatNavigator.setCursorToCurrentPosition(),this.processSlotRules(r,!0);break}}processSelectionEditRules(){const t=this.inputSlotCollection.getSlots(this.formatNavigator.getCurrentPartIndices());if(t.length<=0)return;const r=this.formatNavigator.getCursorStartPosition(),n=this.formatNavigator.getCursorEndPosition();for(let s=0,o=t.length;s<o;s++){const i=t[s];i.startPosition>=r&&i.endPosition<=n?i.partText="":i.startPosition>=r&&i.endPosition>n?i.partText=i.partText.substring(n-i.startPosition):i.startPosition<r&&i.endPosition<=n?i.partText=i.partText.substring(0,r-i.startPosition):i.startPosition<r&&i.endPosition>n&&(i.partText=i.partText.substring(0,r-i.startPosition)+i.partText.substring(n-i.startPosition))}this.formatRenderer.render(),this.formatNavigator.setCursorPosition(r);for(let s=0,o=t.length;s<o;s++)this.processSlotRules(t[s])}shiftFormatParts(t){let r=t,n;for(;(n=this.inputSlotCollection.getNextSlot(r.partIndex))!==void 0;){const s=n.partText.substring(0,1);n.partText=n.partText.substring(1),r.partText=r.partText+s,r=n}}processInputRules(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!r)return;const{key:n}=t,s=r.characterCount,o=r.partText;if(r.valueType===st.Numeric){if(!this.keyTypeChecker.isNumberKey(n))return;const i=r.maximumValue,c=r.exceedingMaximumValueCausesTab||!1,u=r.padWithZeros||!1,h=parseInt(this.createNewValue(r,n));if(i&&h>i)if(c){u&&(r.partText=r.partText.padStart(s,"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 o.length+1===s?(this.addToInputSlot(n),r.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):o.length+1<s&&(this.addToInputSlot(n),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}else o.length+1===s?(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,s=this.formatNavigator.getCursorPosition();if(s>=t.startPosition+t.partText.length)return n+r;{const o=s-t.startPosition;return n.substring(0,o)+r+n.substring(o)}}processSlotRules(t,r=!1){const n=t.characterCount,s=t.allCharactersRequired||!1;if(t.valueType===st.Numeric){const o=t.minimumValue,i=t.maximumValue;if(s)t.isComplete=t.partText.length===n;else if(o!==void 0&&i!==void 0){const c=t.padWithZeros||!1,u=parseInt(t.partText);t.isComplete=u>=o&&u<=i,t.isComplete&&c&&!r&&(t.partText=t.partText.padStart(n,"0"))}else t.isComplete=t.partText.length>0}else s?t.isComplete=t.partText.length===n:t.isComplete=t.partText.length>0}}class ip{constructor(t,r){T(this,"instanceCollection");T(this,"formatNavigator");T(this,"ruleProcessor");T(this,"keyTypeChecker");T(this,"formatRenderer");this.format=t,this.instanceCollection=qt.getInstance(),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,t),this.ruleProcessor=new wi(t,r),this.keyTypeChecker=new xi,this.formatRenderer=new zn(t,r)}setInputElement(t){this.ruleProcessor.setInputElement(t),this.formatRenderer.setInputElement(t)}processMovementKey(t){const{key:r,metaKey:n,ctrlKey:s,shiftKey:o}=t;switch(r){case"ArrowLeft":o?this.formatNavigator.moveHighlightLeft():n?this.formatNavigator.moveHome():this.formatNavigator.moveCursorLeft();break;case"ArrowRight":o?this.formatNavigator.moveHighlightRight():n?this.formatNavigator.moveEnd():this.formatNavigator.moveCursorRight();break;case"Home":this.formatNavigator.moveHome();break;case"End":this.formatNavigator.moveEnd();break;case"a":(n||s)&&this.formatNavigator.highlightAll();break}}processKeyPress(t){return this.keyTypeChecker.isIgnoreKey(t)?!1:this.keyTypeChecker.isMovementKey(t)?(this.processMovementKey(t),!1):(this.ruleProcessor.processKeyPress(t),!0)}}class ap{constructor(t,r=""){T(this,"instanceId");T(this,"instanceCollection");T(this,"keyProcessor");T(this,"formatNavigator");T(this,"formatRenderer");T(this,"inputSlotCollection");T(this,"inputRuleProcessor");T(this,"previousOutputValue","");T(this,"inputElementSet",!1);T(this,"isInputFocused",!1);T(this,"inputElement");T(this,"onFormatChange");this.inputValue=r,this.instanceId=Jh(),this.instanceCollection=qt.getInstance(),this.keyProcessor=new ip(t,this.instanceId),this.formatNavigator=this.instanceCollection.getNavigatorInstance(this.instanceId,t),this.formatRenderer=new zn(t,this.instanceId),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(this.instanceId,t),this.inputRuleProcessor=new wi(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),this.renderFormat())}pastedValue(t){t.length>0&&(this.formatNavigator.isSelection?this.formatNavigator.isAllSelected?this.inputValuePassed(t):this.inputRuleProcessor.processPastedValue(t,!0):this.inputValue.length===0?this.inputValuePassed(t):this.inputRuleProcessor.processPastedValue(t),this.renderFormat(!0))}registerFormatChangeEvent(t){this.onFormatChange=t}mouseUpHandler(){this.formatNavigator.findCursorPosition()}keyDownHandler(t){if(t.key!=="Tab"){if(!(t.key==="c"&&(t.ctrlKey||t.metaKey))&&!(t.key==="x"&&(t.ctrlKey||t.metaKey))&&!(t.key==="v"&&(t.ctrlKey||t.metaKey)))t.preventDefault(),t.stopPropagation();else return;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)}renderFormat(t=!1){setTimeout(()=>{var r,n;this.formatRenderer.render(),this.isInputFocused&&this.formatNavigator.setCursorToCurrentPosition(),this.inputValue.length>0&&(this.previousOutputValue=(r=this.inputElement)==null?void 0:r.innerHTML),t&&((n=this.inputElement)!=null&&n.innerHTML)&&this.onFormatChange&&this.onFormatChange(this.inputElement.innerHTML)})}}const cp=(e,t)=>{const{value:r="",format:n,readOnly:s=!1,debounceTime:o=800,fillContainer:i=!0,leftElement:c,rightElement:u,className:h,leftElementClassName:f,rightElementClassName:v,isSingleLine:P=!1,allowSingleLineScroll:l=!1,isInputValid:d,onChange:b,onFocus:x,onBlur:y,onElementCreate:E,onLeftElementClick:V,onRightElementClick:R}=e,[S,$]=p.useState(!0),O=p.useRef(),q=p.useRef(),z=p.useRef(),se=p.useRef(!1);p.useEffect(()=>(document.addEventListener("mouseup",C),()=>{var N;(N=z.current)==null||N.dispose(),document.removeEventListener("mouseup",C)}),[]),p.useEffect(()=>{var N;(N=z.current)==null||N.inputValuePassed(r)},[r]),p.useEffect(()=>{var N,_,W;(N=z.current)==null||N.dispose(),n&&(z.current=new ap(n,r),q.current&&((_=z.current)==null||_.inputElementCreated(q.current)),(W=z.current)==null||W.registerFormatChangeEvent(ae))},[n]);const ae=p.useCallback(N=>{d?d(N)?($(!0),b==null||b(N)):$(!1):b==null||b(N)},[b]),re=p.useCallback(N=>{var _;(_=z.current)==null||_.inputFocused(),x==null||x(N)},[x]),K=p.useCallback(N=>{var _;(_=z.current)==null||_.inputBlurred(),y==null||y(N)},[y]),L=p.useCallback(()=>{se.current=!0},[]),F=p.useCallback(()=>{var N;if(se.current)se.current=!1,(N=z.current)==null||N.mouseUpHandler();else{const _=new MouseEvent("mouseup");document.dispatchEvent(_)}},[]),C=p.useCallback(()=>{var N;se.current&&(se.current=!1,(N=z.current)==null||N.mouseUpHandler())},[]),Q=p.useCallback(N=>{var _;(_=z.current)==null||_.keyDownHandler(N)},[]),I=p.useCallback(N=>{var W,J;N.preventDefault(),N.stopPropagation();const _=(W=N.clipboardData)==null?void 0:W.getData("text/plain");_&&((J=z.current)==null||J.pastedValue(_))},[]),he=p.useCallback(N=>{var _,W,J,H,U,Z,te,D,ie,A,Ne,qe,Le,Ye,ot,Ge,Ve;(W=(_=O.current)==null?void 0:_.inputElement)==null||W.removeEventListener("keydown",Q),(H=(J=O.current)==null?void 0:J.inputElement)==null||H.removeEventListener("mousedown",L),(Z=(U=O.current)==null?void 0:U.inputElement)==null||Z.removeEventListener("mouseup",F),(D=(te=O.current)==null?void 0:te.inputElement)==null||D.removeEventListener("paste",I),O.current=N,(A=(ie=O.current)==null?void 0:ie.inputElement)==null||A.addEventListener("keydown",Q),(qe=(Ne=O.current)==null?void 0:Ne.inputElement)==null||qe.addEventListener("mousedown",L),(Ye=(Le=O.current)==null?void 0:Le.inputElement)==null||Ye.addEventListener("mouseup",F),(Ge=(ot=O.current)==null?void 0:ot.inputElement)==null||Ge.addEventListener("paste",I),q.current=(Ve=O.current)==null?void 0:Ve.inputElement},[]),k=p.useCallback(()=>{var N;(N=O.current)==null||N.focus()},[]);p.useImperativeHandle(t,()=>({focus:k}));const M=de(h,{"bsc:border-error!":!S});return g.jsx(Vr,{ref:N=>N&&he(N),readOnly:s,debounceTime:o,fillContainer:i,leftElement:c,rightElement:u,className:M,leftElementClassName:f,rightElementClassName:v,isSingleLine:P,allowSingleLineScroll:l,onFocus:re,onBlur:K,onElementCreate:E,onLeftElementClick:V,onRightElementClick:R})},Pi=p.forwardRef(cp),Kn=p.createContext(void 0);function Ti(e,t,r=!0){var P,l;const n=Ho(e),s=Mo(e),o=sd(e);let i=On(s)-(((P=t.options)==null?void 0:P.weekStartsOn)||0);i=i===-1?6:i;const c=On(o)-(((l=t.options)==null?void 0:l.weekStartsOn)||0),u=hf({start:s,end:o}),h=n+i>35?6:5,f=Si(h,7,{dayValue:null,isCurrent:!0});let v=1;for(let d=0,b=h;d<b;d++){for(let x=d>0?0:i;x<7;x++){const y=u[v-1];if(y.setHours(e.getHours(),e.getMinutes(),e.getSeconds()),f[d][x].dayValue=y,++v>n)break}if(v>n)break}if(i>0&&r)for(let d=0;d<i;d++)f[0][d].dayValue=th(s,i-d),f[0][d].isCurrent=!1;if(c>-1&&r)for(let d=6;d>c;d--)f[h-1][d].dayValue=Wt(o,d-c),f[h-1][d].isCurrent=!1;return f}function Si(e,t,r){const n=[];for(let s=0,o=e;s<o;s++){const i=[];for(let c=0,u=t;c<u;c++){const h=up(r)?r:{...r};i.push(h)}n.push(i)}return n}function up(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"||e instanceof Date}function lp(e){var n;const t=rh(new Date,((n=e.options)==null?void 0:n.weekStartsOn)||0),r=[];for(let s=0;s<7;s++)r.push(Wt(t,s).toLocaleDateString(e.code,{weekday:"short"}));return r}function fp(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 s=0;s<3;s++)for(let o=0;o<4;o++)r[s][o]={monthNumber:n,monthName:bt(t,n++).toLocaleDateString(e.code,{month:"short"})};return r}function dp(e,t){const r=new Date(e.getTime()),n=Math.floor(r.getFullYear()/10)*10;r.setFullYear(n);const s=pf({start:r,end:xr(r,9)}),o=Si(3,4,"");let i=0;for(let c=0;c<3;c++)for(let u=0;u<4&&(o[c][u]=s[i++].toLocaleDateString(t.code,{year:"numeric"}),i!==s.length);u++);return o}function hp(e){const t=new Date;return t.setHours(0,0,0,0),t.toLocaleTimeString(e.code)}function pp(e,t,r){return e.getTime()>=t.getTime()&&e.getTime()<=r.getTime()}async function Ei(e){return(await import(`/node_modules/date-fns/locale/${mp(e)}`)).default}function mp(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 _r(e,t){const r=nh(e);if(isNaN(r.valueOf())){let n=nt(e,"P pp",new Date,{locale:t});return!isNaN(n.valueOf())||(n=nt(e,"Pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"P HH:mm",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"P hh:mm a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"P HH:mm:ss",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"P hh:mm:ss a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"P",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"P p",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"p",new Date,{locale:t}),!isNaN(n.valueOf()))?n:void 0}return r}function Zn(e,t){const r=e.split("-");if(r.length!==2)return;const n=_r(r[0].trim(),t);if(!n)return;const s=_r(r[1].trim(),t);if(s)return[n,s]}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||{}),Re=(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))(Re||{}),zt=(e=>(e[e.Day=0]="Day",e[e.Month=1]="Month",e[e.Year=2]="Year",e[e.Range=3]="Range",e))(zt||{}),kr=(e=>(e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e))(kr||{}),Oe=(e=>(e[e.TwelveHour=0]="TwelveHour",e[e.TwentyFourHour=1]="TwentyFourHour",e))(Oe||{}),vt=(e=>(e[e.Normal=0]="Normal",e[e.Range=1]="Range",e))(vt||{}),Gr=(e=>(e[e.Right=0]="Right",e[e.Left=1]="Left",e[e.None=2]="None",e))(Gr||{}),le=(e=>(e[e.SetDateSelector=0]="SetDateSelector",e[e.SetViewDate=1]="SetViewDate",e[e.SetSelectedDate=2]="SetSelectedDate",e[e.SetSelectedDateRange=3]="SetSelectedDateRange",e[e.SetSelectedStartDate=4]="SetSelectedStartDate",e[e.SetSelectedEndDate=5]="SetSelectedEndDate",e[e.SetTimeFormat=6]="SetTimeFormat",e[e.ClearDates=7]="ClearDates",e[e.InitializeDates=8]="InitializeDates",e))(le||{});const gp=(e,t)=>{switch(t.type){case 0:return t.dateSelector!==void 0?{...e,currentSelector:t.dateSelector,currentViewDate:t.viewDate||e.currentViewDate}:{...e};case 1:return{...e,currentViewDate:t.viewDate||new Date,dateInitialized:!0};case 2:return{...e,selectedDate:t.selectedDate||e.selectedDate,currentViewDate:t.viewDate||e.currentViewDate};case 3:return{...e,selectedStartDate:t.selectedStartDate||e.selectedStartDate,selectedEndDate:t.selectedEndDate||e.selectedEndDate};case 4:return{...e,selectedStartDate:t.selectedStartDate,selectedEndDate:void 0};case 5:return{...e,selectedEndDate:t.selectedEndDate};case 6:return{...e,timeFormat:t.timeFormat||e.timeFormat};case 7:return{currentSelector:e.currentSelector,currentViewDate:e.currentViewDate,timeFormat:e.timeFormat,dateInitialized:!0};case 8:{const r={...e,currentViewDate:bp(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:Re.DaySelector}}};function bp(e){return e?Array.isArray(e)?e[0]:e:new Date}const Gn=(e,t,r)=>{const n=p.useCallback(u=>{r({type:le.SetViewDate,viewDate:bt(t,u)})},[t]),s=p.useCallback(u=>{r({type:le.SetViewDate,viewDate:Mn(t,u)})},[t]),o=p.useCallback(u=>{r({type:le.SetViewDate,viewDate:xr(t,u)})},[t]),i=p.useCallback(u=>{r({type:le.SetViewDate,viewDate:Rn(t,u)})},[t]),c=p.useCallback(u=>{r({type:le.SetDateSelector,dateSelector:u})},[]);return{...e,incrementViewMonths:n,decrementViewMonths:s,incrementViewYears:o,decrementViewYears:i,setDateSelector:c}},Qr=({viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:s=vt.Normal,locale:o,onDateSelected:i,selectableDate:c,isValidDate:u,dispatcher:h})=>{var F;const[f,v]=p.useState(!1),[P,l]=p.useState(),[d,b]=p.useState(),[x,y]=p.useState(),[E,V]=p.useState(),R=p.useRef(),S=p.useRef(),$=p.useContext(Kn),O=p.useMemo(()=>$.calendarTemplate,[$.calendarTemplate]),q=async()=>o||await Ei(qo());p.useEffect(()=>{q().then(C=>{R.current=C,S.current=lp(R.current),v(!0)}).catch(C=>console.error(C))},[]),p.useEffect(()=>{e&&R.current&&y(Ti(e,R.current,s===vt.Normal))},[e,f]),p.useEffect(()=>{V(t?new Date(t.getFullYear(),t.getMonth(),t.getDate()):void 0)},[t]),p.useEffect(()=>{l(r?new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0).getTime():void 0),b(n?new Date(n.getFullYear(),n.getMonth(),n.getDate(),23,59,59).getTime():void 0)},[r,n]),p.useEffect(()=>{R.current&&o&&(R.current=o,y(Ti(e,R.current,s===vt.Normal)))},[o]);const z=C=>{if(s===vt.Normal)h==null||h({type:le.SetSelectedDate,selectedDate:C,viewDate:C}),i==null||i(C);else{if(!i)throw new Error("Range selection mode requires onDateSelected to be set");!r||od(C,r)?i(C):r&&!n?i(C,{setEndDate:!0}):r&&n&&i(C)}},se=C=>(E==null?void 0:E.toLocaleDateString())===C.toLocaleDateString(),ae=C=>{if(P&&d){const Q=C.getTime();return Q>=P&&Q<=d}return!1},re=Gn({viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:s,locale:o,weekDays:S.current,monthMatrix:x,selectableDate:c,isValidDate:u,onDateClicked:z,isSelectedDate:se,isInSelectedDateRange:ae},e,h),L=O||((C,Q)=>g.jsx("div",{className:"bc-dt-calendar bsc:w-full",children:Q}));return g.jsx(kt,{props:re,template:L,children:g.jsxs("div",{className:"bc-dt-day-row bsc:grid bsc:min-w-[329px] bsc:grid-cols-7 bsc:gap-3",children:[(F=S.current)==null?void 0:F.map((C,Q)=>g.jsx("div",{className:"bc-dt-day-cell bsc:text-center bsc:font-bold",children:C},Q)),x==null?void 0:x.map((C,Q)=>C.map((I,he)=>{var N,_;const k=I.dayValue!==null&&(c===void 0||c(I.dayValue)),M=de("bsc:text-center bsc:py-1 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-1",{"bsc:text-gray-3":!I.isCurrent,"bsc:bg-primary-1 bsc:text-white bsc:dark:bg-mono-light-1 bsc:dark:text-mono-dark-1":I&&I.dayValue&&(E&&se(I.dayValue)||P&&!d&&Io(P,I.dayValue)||P&&d&&ae(I.dayValue)),"bsc:cursor-pointer":k,"bsc:text-error bsc:cursor-not-allowed":!k,"bsc:bg-primary-5 bsc:dark:bg-mono-light-3 bsc:dark:text-mono-dark-1":I.dayValue&&eh(I.dayValue)&&!(se(I.dayValue)||ae(I.dayValue))},"bc-dt-date-cell");return g.jsx("div",{className:M,onClick:()=>I&&I.dayValue&&k&&(u===void 0||u(I.dayValue))&&z(I.dayValue),children:(_=I.dayValue)==null?void 0:_.getDate().toLocaleString((N=R.current)==null?void 0:N.code)},Q.toString()+he.toString())}))]})})},Xr=({title:e,scrollerType:t,onTitleClicked:r,onMovePrevious:n,onMoveNext:s,viewDate:o,dispatcher:i})=>{const u=p.useContext(Kn).dateScrollerTemplate,h=Gn({title:e,scrollerType:t,onTitleClicked:r,onMovePrevious:n,onMoveNext:s},o,i),f="bsc:bg-transparent bsc:cursor-pointer bsc:focus:outline-hidden bsc:hover:bg-primary-1 bsc:hover:text-white bsc:dark:hover:bg-mono-light-1 bsc:dark:hover:text-mono-dark-1",P=u||((l,d)=>g.jsx("div",{className:"bc-dt-scroller bsc:flex bsc:w-full bsc:flex-row bsc:items-center bsc:px-2 bsc:py-1",children:d}));return g.jsxs(kt,{props:h,template:P,children:[g.jsx("div",{className:"bc-dt-scroller-left bsc:shrink bsc:cursor-pointer",children:g.jsx(et,{className:f,onClick:n,children:g.jsx(Ke,{icon:"chevronLeft",size:He.Regular})})}),g.jsx("div",{className:"bc-dt-scroller-title bsc:grow bsc:cursor-pointer bsc:text-center bsc:hover:text-primary-2 bsc:dark:hover-text-mono-light-2",onClick:r,children:e}),g.jsx("div",{className:"bc-dt-scroller-right bsc:shrink bsc:cursor-pointer",children:g.jsx(et,{className:f,onClick:s,children:g.jsx(Ke,{icon:"chevronRight",size:He.Regular})})})]})},yp=({selectedDate:e,viewDate:t,locale:r,showTimeSelector:n,selectableDate:s,isValidDate:o,onChange:i,dispatcher:c})=>{const u=()=>{t&&c({type:le.SetViewDate,viewDate:Mn(t,1)})},h=()=>{t&&c({type:le.SetViewDate,viewDate:bt(t,1)})},f=()=>{c({type:le.SetDateSelector,dateSelector:Re.MonthSelector})},v=()=>{c({type:le.SetDateSelector,dateSelector:Re.TimeSelector})},P=()=>t?t.toLocaleDateString(r.code,{month:"long",year:"numeric"}):"";return g.jsxs("div",{className:"bc-dt-day-selector bsc:p-2",children:[g.jsx(Xr,{title:P(),scrollerType:zt.Day,onTitleClicked:f,onMovePrevious:u,onMoveNext:h,viewDate:t,dispatcher:c}),g.jsx(Qr,{viewDate:t,selectedDate:e,locale:r,selectableDate:s,isValidDate:o,onDateSelected:i,dispatcher:c}),n&&g.jsx("div",{className:"bc-dt-time-value-wrapper bsc:flex bsc:w-full bsc:flex-row bsc:justify-center bsc:p-2",children:g.jsx("div",{className:"bc-dt-time-value bsc:cursor-pointer bsc:p-2 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1 bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-2",onClick:v,children:(e==null?void 0:e.toLocaleTimeString(r.code))||hp(r)})})]})},vp=({viewDate:e,locale:t,dateSelection:r=we.DateTime,dispatcher:n})=>{const s=p.useRef(fp(t)),o=()=>{const f=Rn(e,1);n({type:le.SetViewDate,viewDate:f})},i=()=>{const f=xr(e,1);n({type:le.SetViewDate,viewDate:f})},c=f=>{n({type:le.SetDateSelector,dateSelector:r!==we.DateRange?Re.DaySelector:Re.DateRangeSelector,viewDate:vh(e,f)})},u=()=>e.toLocaleDateString(t.code,{year:"numeric"}),h=()=>{n({type:le.SetDateSelector,dateSelector:Re.YearSelector})};return g.jsxs("div",{className:"bc-dt-month-selector bsc:p-2",style:{minWidth:"20rem"},children:[g.jsx(Xr,{title:u(),scrollerType:zt.Month,onTitleClicked:h,onMovePrevious:o,onMoveNext:i,viewDate:e,dispatcher:n}),g.jsx("div",{className:"bc-dt-month-grid bsc:grid bsc:w-full bsc:grid-cols-4 bsc:gap-4",children:s.current.map((f,v)=>f.map((P,l)=>g.jsx("div",{className:"bc-dt-month-cell bsc:cursor-pointer bsc:text-center",onClick:()=>c(P.monthNumber),children:P.monthName},v.toString()+l.toString())))})]})},xp=({viewDate:e,selectedStartDate:t,selectedEndDate:r,locale:n,onChange:s,dispatcher:o})=>{const i=qr("screen and (max-device-width: 40rem)"),c=bt(e,1),u=(l,d)=>{!d||!d.setEndDate?o({type:le.SetSelectedStartDate,selectedStartDate:l}):(o({type:le.SetSelectedEndDate,selectedEndDate:l}),t&&s&&s([t,l]))},h=()=>{o({type:le.SetDateSelector,dateSelector:Re.MonthSelector})},f=()=>i?`${e.toLocaleDateString(n.code,{month:"long"})} ${e.toLocaleDateString(n.code,{year:"numeric"})}`:`${e.toLocaleDateString(n.code,{month:"long"})} ${e.toLocaleDateString(n.code,{year:"numeric"})} - ${c.toLocaleDateString(n.code,{month:"long"})} ${c.toLocaleDateString(n.code,{year:"numeric"})}`,v=()=>{e&&o({type:le.SetViewDate,viewDate:Mn(e,1)})},P=()=>{e&&o({type:le.SetViewDate,viewDate:bt(e,1)})};return g.jsxs("div",{className:"bc-dt-range-selector bsc:flex bsc:flex-col",children:[g.jsx("div",{className:"bc-dt-range-scroller-wrapper bsc:shrink",children:g.jsx(Xr,{title:f(),scrollerType:zt.Range,onTitleClicked:h,onMovePrevious:v,onMoveNext:P,viewDate:e,dispatcher:o})}),g.jsx("div",{className:"bsc-flex-grow",children:g.jsx(An,{mobileMarkup:g.jsx("div",{className:"bc-dt-range-calendar bsc:px-2 bsc:py-1",children:g.jsx(Qr,{viewDate:e,selectedStartDate:t,selectedEndDate:r,selectionMode:vt.Range,onDateSelected:u,locale:n,dispatcher:o})}),aboveMobileMarkup:g.jsxs("div",{className:"bc-dt-range-wrapper bsc:flex bsc:flex-row bsc:px-2 bsc:py-1",children:[g.jsx("div",{className:"bc-dt-range-calendar-1 bsc:border-r bsc:border-solid bsc:border-gray-3 bsc:pr-4",children:g.jsx(Qr,{viewDate:e,selectedStartDate:t,selectedEndDate:r,selectionMode:vt.Range,onDateSelected:u,locale:n,dispatcher:o})}),g.jsx("div",{className:"bc-dt-range-calendar-2 bsc:pl-4",children:g.jsx(Qr,{viewDate:c,selectedStartDate:t,selectedEndDate:r,selectionMode:vt.Range,onDateSelected:u,locale:n,dispatcher:o})})]})})})]})},wp=({viewDate:e,showDateSelector:t,locale:r,timeFormat:n=Oe.TwelveHour,timeConstraints:s,onChange:o,dispatcher:i})=>{const c=p.useRef(n===Oe.TwelveHour?11:23),u=p.useRef(n===Oe.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"]),h=p.useRef(wh(0,59,L=>L.toString().padStart(2,"0"))),f=p.useRef(["AM","PM"]),v=p.useRef(ef(e)),P=L=>L>11?L-12:L,[l,d]=p.useState(P(e.getHours())),[b,x]=p.useState(e.getMinutes()),[y,E]=p.useState(e.getHours()<=12?0:1),V=p.useRef(e.toLocaleDateString(r.code));p.useEffect(()=>{const L=e.getHours(),F=e.getMinutes();if(L!==l&&d(n===Oe.TwelveHour?P(L):L),F!==b&&x(F),n===Oe.TwelveHour){const C=L<=11?0:1;C!==y&&E(C)}},[e]);const R=()=>{var C;const L=((C=s==null?void 0:s.hours)==null?void 0:C.step)||1,F=l<c.current?l+L:0;d(F),z(F,b,y)},S=()=>{var C;const L=((C=s==null?void 0:s.hours)==null?void 0:C.step)||1,F=l>0?l-L:c.current;d(F),z(F,b,y)},$=()=>{var C,Q,I;const L=((C=s==null?void 0:s.minutes)==null?void 0:C.step)||1,F=b+L<(((Q=s==null?void 0:s.minutes)==null?void 0:Q.max)||59)?b+L:((I=s==null?void 0:s.minutes)==null?void 0:I.min)||0;x(F),z(l,F,y)},O=()=>{var C,Q,I;const L=((C=s==null?void 0:s.minutes)==null?void 0:C.step)||1,F=b-L>=(((Q=s==null?void 0:s.minutes)==null?void 0:Q.min)||0)?b-L:(((I=s==null?void 0:s.minutes)==null?void 0:I.max)||60)-L;x(F),z(l,F,y)},q=()=>{const L=y===0?1:0;E(L),z(l,b,L)},z=(L,F,C)=>{const Q=n===Oe.TwelveHour&&C===1?L+12:L;v.current.setHours(Q,F),i({type:le.SetSelectedDate,selectedDate:v.current,viewDate:v.current}),o==null||o(v.current)},se=()=>{i({type:le.SetDateSelector,dateSelector:Re.DaySelector})},ae=de("bsc:w-full bsc:grid bsc:grid-rows-3 bsc:gap-4 bsc:items-center bc-dt-time-grid",{"bsc:grid-cols-4":n===Oe.TwelveHour,"bsc:grid-cols-3":n===Oe.TwentyFourHour}),re=de("bsc:text-center bsc:cursor-pointer bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:text-mono-light-1 bsc:dark:hover:bg-mono-light-1 bsc:dark:hover:text-mono-dark-1 bc-dt-time-date-value",{"bsc:col-span-4":n===Oe.TwelveHour,"bsc:col-span-3":n===Oe.TwentyFourHour}),K="bsc-bg-transparent bsc:p-2 bsc:cursor-pointer bsc:focus:outline-hidden bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-1 bsc:dark:hover:text-mono-dark-1";return g.jsx("div",{className:"bc-dt-time-selector bsc:flex bsc:flex-row bsc:justify-center bsc:p-2",style:{minWidth:n===Oe.TwelveHour?"15rem":"11rem"},children:g.jsxs("div",{className:ae,children:[t&&g.jsx("div",{className:re,onClick:se,children:V.current}),g.jsx("div",{className:"bc-dt-time-hour-increase bsc:cursor-pointer bsc:text-center",children:g.jsx(et,{className:K,onClick:R,children:g.jsx(Ke,{icon:"chevronUp",size:He.Regular})})}),g.jsx("div",{}),g.jsx("div",{className:"bc-dt-time-minute-increase bsc:cursor-pointer bsc:text-center",children:g.jsx(et,{className:K,onClick:$,children:g.jsx(Ke,{icon:"chevronUp",size:He.Regular})})}),n===Oe.TwelveHour&&g.jsx("div",{className:"bc-dt-time-meridian-increase bsc:cursor-pointer bsc:text-center",children:g.jsx(et,{className:K,onClick:q,children:g.jsx(Ke,{icon:"chevronUp",size:He.Regular})})}),g.jsx("div",{className:"bc-dt-time-hour-value bsc:text-center",children:u.current[l]}),g.jsx("div",{className:"bc-dt-time-separator bsc:text-center",children:":"}),g.jsx("div",{className:"bc-dt-time-minute-value bsc:text-center",children:h.current[b]}),n===Oe.TwelveHour&&g.jsx("div",{className:"bc-dt-time-meridian-value bsc:text-center",children:f.current[y]}),g.jsx("div",{className:"bc-dt-time-hour-decrease bsc:cursor-pointer bsc:text-center",children:g.jsx(et,{className:K,onClick:S,children:g.jsx(Ke,{icon:"chevronDown",size:He.Regular})})}),g.jsx("div",{}),g.jsx("div",{className:"bc-dt-time-minute-decrease bsc:cursor-pointer bsc:text-center",children:g.jsx(et,{className:K,onClick:O,children:g.jsx(Ke,{icon:"chevronDown",size:He.Regular})})}),n===Oe.TwelveHour&&g.jsx("div",{className:"bc-dt-time-meridian-decrease bsc:cursor-pointer bsc:text-center",children:g.jsx(et,{className:K,onClick:q,children:g.jsx(Ke,{icon:"chevronDown",size:He.Regular})})})]})})},Pp=({viewDate:e,locale:t,dispatcher:r})=>{const n=dp(e,t),s=()=>{const u=Rn(e,10);r({type:le.SetViewDate,viewDate:u})},o=()=>{const u=xr(e,10);r({type:le.SetViewDate,viewDate:u})},i=u=>{const h=parseInt(u);r({type:le.SetDateSelector,dateSelector:Re.MonthSelector,viewDate:xh(e,h)})},c=()=>`${n[0][0].toString()} - ${n[2][1].toString()}`;return g.jsxs("div",{className:"bc-dt-year-selector",style:{minWidth:"20rem"},children:[g.jsx(Xr,{title:c(),scrollerType:zt.Year,onMovePrevious:s,onMoveNext:o,viewDate:e,dispatcher:r}),g.jsx("div",{className:"bc-dt-year-wrapper bsc:w-full",children:g.jsx("div",{className:"bc-dt-year-grid bsc:grid bsc:grid-cols-4 bsc:gap-4",children:n.map((u,h)=>u.map((f,v)=>f.length>0?g.jsx("div",{className:"bc-dt-year-cell bsc:cursor-pointer bsc:text-center",onClick:()=>i(f),children:f},h.toString()+v.toString()):g.jsx("div",{},h.toString()+v.toString())))})})]})};class Tp{constructor(t,r){T(this,"dateFormat");T(this,"timeFormat");T(this,"use24HourTime");T(this,"monthPart");T(this,"dayPart");T(this,"yearPart");T(this,"twelveHourPart");T(this,"twentyFourHourPart");T(this,"minutePart");T(this,"meridianPart");this.dateSelection=t;const n=2023,s=12,o=20,c=new Date(n,s-1,o).toLocaleDateString(r,{year:"numeric",month:"numeric",day:"numeric"});this.dateFormat=c.replace(`${n}`,"YYYY").replace(`${s}`,"MM").replace(`${o}`,"DD");const u=new Date,h=18,f=24,v=37,P=317;u.setHours(h,f,v,P);const l=u.toLocaleTimeString(r);this.use24HourTime=l.startsWith("18"),this.timeFormat=l.replace(`${this.use24HourTime?h:"6"}`,"HH").replace(`${f}`,"MM").replace(`${v}`,"SS").replace(`${P}`,"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 s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("YYYY"),n=t.substring(0,r);const o={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.monthPart,s,this.dayPart,o,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 s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("YYYY"),n=t.substring(0,r);const o={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.dayPart,s,this.monthPart,o,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 s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("DD"),n=t.substring(0,r);const o={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.yearPart,s,this.monthPart,o,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),s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0},o={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return[this.twelveHourPart,s,this.minutePart,o,this.meridianPart]}return[]}createTwentyFourHourFormatParts(){if(this.twentyFourHourPart&&this.minutePart){const t=this.timeFormat.replace("HH",""),r=t.indexOf("MM"),n=t.substring(0,r),s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.twentyFourHourPart,s,this.minutePart]}return[]}createDateParts(){this.monthPart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:st.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.dayPart={characterCount:2,placeholder:"D",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:st.Numeric,minimumValue:1,maximumValue:31,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.yearPart={characterCount:4,placeholder:"Y",inputText:"_",isSeparator:!1,allCharactersRequired:!0,valueType:st.Numeric},this.twelveHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:st.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.twentyFourHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:st.Numeric,minimumValue:0,maximumValue:23,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.minutePart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:st.Numeric,minimumValue:0,maximumValue:59,exceedingMaximumValueCausesError:!0,padWithZeros:!0},this.meridianPart={characterCount:2,inputText:"_",isSeparator:!1,valueType:st.Text,possibleValues:["AM","PM"]}}}const Sp=(e,t)=>{var o;const[r,n]=p.useState(),s=p.useRef();return p.useEffect(()=>{t&&!r&&(s.current=new Tp(e,t),n(s.current.createInputFormat()))},[t]),[r,(o=s.current)==null?void 0:o.is24HourTime]},Ep=({value:e,readOnly:t=!1,label:r,useDefaultDateValue:n=!1,useFormattedInput:s=!1,allowClear:o=!1,closeSelector:i=!1,locale:c,className:u,dateSelection:h=we.DateTime,dateFormat:f,timeConstraints:v,icon:P,iconPosition:l=Gr.Right,inputElement:d,selectableDate:b,isValidDate:x,onChange:y,calendarTemplate:E,dateScrollerTemplate:V,inputTemplate:R,wrapperTemplate:S})=>{const[$,O]=p.useState(!1),[q,z]=p.useState(),[se,ae]=p.useState(),[re,K,L]=ga(h),F=p.useRef(),C=p.useRef(!1),Q=p.useRef(c||qo()),I=p.useRef(),he=p.useRef(),k=p.useRef(),M=p.useRef(null),N=p.useRef(null),[_,W]=Sp(h,q),J=p.useRef({calendarTemplate:E,dateScrollerTemplate:V});p.useEffect(()=>{Q.current&&U(Q.current)},[Q]),p.useEffect(()=>{c&&U(c)},[c]),p.useEffect(()=>{if(e){const ee=Z();ie({type:le.InitializeDates,initialDate:ee})}else ie({type:le.ClearDates})},[e,I.current]),p.useEffect(()=>{W&&ie({type:le.SetTimeFormat,timeFormat:W?Oe.TwentyFourHour:Oe.TwelveHour})},[W]),p.useEffect(()=>{d&&(he.current=d)},[d]),p.useEffect(()=>{ie({type:le.SetDateSelector,dateSelector:H()})},[re]);const H=p.useCallback(()=>L.current===we.TimeOnly?Re.TimeSelector:L.current===we.DateTime||L.current===we.DateOnly?Re.DaySelector:Re.DateRangeSelector,[]),U=ee=>{Ei(ee).then(fe=>{z(fe.code),I.current=fe;const Ee=Z();ie(e||n?{type:le.InitializeDates,initialDate:Array.isArray(Ee)?Ee[0]:Ee}:{type:le.SetViewDate,viewDate:Array.isArray(Ee)?Ee[0]:Ee})}).catch(fe=>console.error(fe))},Z=()=>{const ee=new Date;return ee.setHours(0,0,0,0),e?typeof e=="string"?L.current!==we.DateRange?_r(e,I.current):Zn(e,I.current):e:ee},te={currentSelector:H(),currentViewDate:new Date,timeFormat:Oe.TwelveHour,dateInitialized:!1},[D,ie]=p.useReducer(gp,te),A=()=>{Gt(),O(!0)},Ne=p.useMemo(()=>yr(()=>{O(!1)},250),[]),qe=p.useMemo(()=>yr(()=>{Ne.cancel()},5),[Ne]),Le=ee=>{const fe=ee.target.innerText;Ge(fe)},Ye=ee=>{if(ee){const fe=L.current!==we.DateRange?_r(ee,I.current):Zn(ee,I.current);return fe?x?Array.isArray(fe)?fe.every(Ee=>x(Ee)):x(fe):!0:!1}else return!0},ot=ee=>{Ge(ee||"")},Ge=ee=>{const fe=L.current!==we.DateRange?_r(ee,I.current):Zn(ee,I.current);fe?(Array.isArray(fe)?(pp(fe[0],Mo(D.currentViewDate),df(bt(D.currentViewDate,1)))||ie({type:le.SetViewDate,viewDate:fe[0]}),ie({type:le.SetSelectedDateRange,selectedStartDate:fe[0],selectedEndDate:fe[1]})):ie({type:le.SetSelectedDate,selectedDate:fe,viewDate:fe}),y==null||y(fe)):ee===""&&(ie({type:le.ClearDates}),y==null||y())},Ve=ee=>{L.current===we.DateOnly&&i===!0&&O(!1),y==null||y(ee)},Kt=()=>{Gt(),O(!$),N.current?N.current.focus():M.current&&M.current.focus()},Zt=()=>{ie({type:le.ClearDates}),O(!1),y==null||y()},Qe=(ee,fe)=>{(!he.current||F.current!==fe)&&(he.current=ee,F.current=fe,C.current=!0)},Gt=()=>{(!k.current||C.current)&&he.current&&(k.current=he.current,ae(he.current),C.current=!1)},Qt=()=>{O(!1),ie({type:le.SetDateSelector,dateSelector:H()})},Ot=()=>{switch(f){case kr.Short:return"short";case kr.Medium:return"medium";case kr.Long:return"long";default:return}},it=()=>{var fe,Ee,ct,ut,xt,tr,wt,rr,Pt,Tt,nr,sr;const ee=Ot();switch(L.current){case we.DateTime:return D.selectedDate?ee?D.selectedDate.toLocaleString((fe=I.current)==null?void 0:fe.code,{dateStyle:ee,timeStyle:ee}):D.selectedDate.toLocaleString((Ee=I.current)==null?void 0:Ee.code):"";case we.DateOnly:return D.selectedDate?ee?D.selectedDate.toLocaleDateString((ct=I.current)==null?void 0:ct.code,{dateStyle:ee}):D.selectedDate.toLocaleDateString((ut=I.current)==null?void 0:ut.code):"";case we.TimeOnly:return D.selectedDate?ee?D.selectedDate.toLocaleTimeString((xt=I.current)==null?void 0:xt.code,{timeStyle:ee,hour12:D.timeFormat===Oe.TwelveHour,hourCycle:D.timeFormat===Oe.TwentyFourHour?"h23":void 0}):D.selectedDate.toLocaleTimeString((tr=I.current)==null?void 0:tr.code,{hour12:D.timeFormat===Oe.TwelveHour,hourCycle:D.timeFormat===Oe.TwentyFourHour?"h23":void 0}):"";case we.DateRange:return D.selectedStartDate&&D.selectedEndDate?ee?`${D.selectedStartDate.toLocaleDateString((wt=I.current)==null?void 0:wt.code,{dateStyle:ee})} - ${D.selectedEndDate.toLocaleDateString((rr=I.current)==null?void 0:rr.code,{dateStyle:ee})}`:`${D.selectedStartDate.toLocaleDateString((Pt=I.current)==null?void 0:Pt.code)} - ${D.selectedEndDate.toLocaleDateString((Tt=I.current)==null?void 0:Tt.code)}`:"";default:return D.selectedDate?ee?D.selectedDate.toLocaleString((nr=I.current)==null?void 0:nr.code,{dateStyle:ee,timeStyle:ee}):D.selectedDate.toLocaleString((sr=I.current)==null?void 0:sr.code):""}},at=re===we.DateTime||re===we.DateOnly||re===we.DateRange,Cr=re===we.DateTime||re===we.TimeOnly,Xe=l===Gr.None?{}:l===Gr.Right?{rightElement:g.jsxs("div",{className:"bsc:flex bsc:text-black bsc:dark:text-mono-light-1",children:[o&&!t&&g.jsx("div",{children:g.jsx(Ke,{icon:"close",size:He.Small,className:"bsc:cursor-pointer bsc:text-sm",onClick:Zt})}),g.jsx("div",{className:"bsc:ml-2",onClick:t?void 0:Kt,children:P||g.jsx(Ke,{icon:"calendar",size:He.Small,className:t?void 0:"bsc:cursor-pointer"})})]}),rightElementClassName:"bsc:justify-center"}:{leftElement:g.jsxs("div",{className:"bsc:flex bsc:text-black bsc:dark:text-mono-light-1",children:[g.jsx("div",{className:"bsc:mr-2",onClick:t?void 0:Kt,children:P||g.jsx(Ke,{icon:"calendar",size:He.Small,className:t?void 0:"bsc:cursor-pointer"})}),o&&!t&&g.jsx("div",{children:g.jsx(Ke,{icon:"close",size:He.Small,className:"bsc:cursor-pointer bsc:text-sm",onClick:Zt})})]}),leftElementClassName:"bsc:justify-center"},Nt={setDateSelector:ee=>K(ee)},Dr=S||((ee,fe)=>g.jsx(g.Fragment,{children:fe})),Xt=()=>g.jsx(kt,{props:Nt,template:Dr,children:g.jsxs(g.Fragment,{children:[D.currentSelector===Re.DaySelector&&at&&D.dateInitialized&&I.current&&g.jsx(yp,{selectedDate:D.selectedDate,viewDate:D.currentViewDate,locale:I.current,showTimeSelector:L.current===we.DateTime,selectableDate:b,isValidDate:x,dispatcher:ie,onChange:Ve}),D.currentSelector===Re.MonthSelector&&at&&D.dateInitialized&&I.current&&g.jsx(vp,{viewDate:D.currentViewDate,locale:I.current,dateSelection:L.current,dispatcher:ie}),D.currentSelector===Re.YearSelector&&at&&D.dateInitialized&&I.current&&g.jsx(Pp,{viewDate:D.currentViewDate,locale:I.current,dispatcher:ie}),D.currentSelector===Re.TimeSelector&&Cr&&D.dateInitialized&&I.current&&g.jsx(wp,{viewDate:D.currentViewDate,showDateSelector:L.current===we.DateTime,locale:I.current,timeFormat:D.timeFormat,timeConstraints:v,onChange:y,dispatcher:ie}),D.currentSelector===Re.DateRangeSelector&&at&&D.dateInitialized&&I.current&&g.jsx(xp,{viewDate:D.currentViewDate,selectedStartDate:D.selectedStartDate,selectedEndDate:D.selectedEndDate,locale:I.current,onChange:y,dispatcher:ie})]})}),Jt=Gn({label:r,readOnly:t,allowClear:o,getValue:it,onFocus:A,onInput:Le,iconPosition:l,iconElement:Xe.rightElement||Xe.leftElement},D.currentViewDate,ie),er=R||((ee,fe)=>g.jsx(g.Fragment,{children:fe})),jt=de("bsc:text-left",{"bc-read-only bsc:bg-gray-4 bsc:dark:bg-mono-dark-3":t,"bsc:bg-white bsc:dark:bg-mono-dark-1":!t},"bc-dt-input",u);return g.jsx(Kn.Provider,{value:J.current,children:g.jsxs("div",{className:"bc-date-time",children:[r&&g.jsx(ft,{label:r,readOnly:t,className:"bc-dt-label"}),g.jsx(An,{mobileMarkup:g.jsxs(g.Fragment,{children:[g.jsx(kt,{props:Jt,template:er,children:g.jsx(Vr,{ref:M,value:it(),readOnly:t,inputMode:"none",className:jt,onFocus:A,onElementCreate:ee=>Qe(ee,!1),...Xe})}),g.jsx(mi,{visible:$,target:se,hidden:Qt,unmountWhenHidden:!0,children:Xt()})]}),aboveMobileMarkup:g.jsxs(g.Fragment,{children:[g.jsx(kt,{props:Jt,template:er,children:s===!1?g.jsx(Vr,{ref:M,value:it(),readOnly:t,className:jt,onFocus:A,onBlur:Ne,onInput:Le,onElementCreate:ee=>Qe(ee,!1),...Xe}):g.jsx(Pi,{ref:N,value:it(),readOnly:t,className:jt,format:_,isInputValid:Ye,onFocus:A,onBlur:Ne,onChange:ot,onElementCreate:ee=>Qe(ee,!0),...Xe})}),g.jsx(yi,{visible:$,target:se,shouldTargetCloseOverlay:!1,shouldScrollCloseOverlay:!0,shouldCheckZIndex:!0,shouldRemainOnScreen:!0,hidden:Qt,isClickedWithin:qe,unmountWhenHidden:!0,children:Xt()})]})})]})})};var Qn,_i;function _p(){if(_i)return Qn;_i=1;function e(l,d){var b,x;if(typeof d=="function")x=d(l),x!==void 0&&(l=x);else if(Array.isArray(d))for(b=0;b<d.length;b++)x=d[b](l),x!==void 0&&(l=x);return l}function t(l,d){return l[0]==="-"&&Array.isArray(d)&&/^-\d+$/.test(l)?d.length+parseInt(l,10):l}function r(l){return/^\d+$/.test(l)}function n(l){return Object.prototype.toString.call(l)==="[object Object]"}function s(l){return Object(l)===l}function o(l){return Object.keys(l).length===0}var i=["__proto__","prototype","constructor"],c=function(l){return i.indexOf(l)===-1};function u(l,d){l.indexOf("[")>=0&&(l=l.replace(/\[/g,d).replace(/]/g,""));var b=l.split(d),x=b.filter(c);if(x.length!==b.length)throw Error("Refusing to update blacklisted property "+l);return b}var h=Object.prototype.hasOwnProperty;function f(l,d,b,x){if(!(this instanceof f))return new f(l,d,b,x);typeof d>"u"&&(d=!1),typeof b>"u"&&(b=!0),typeof x>"u"&&(x=!0),this.separator=l||".",this.override=d,this.useArray=b,this.useBrackets=x,this.keepArray=!1,this.cleanup=[]}var v=new f(".",!1,!0,!0);function P(l){return function(){return v[l].apply(v,arguments)}}return f.prototype._fill=function(l,d,b,x){var y=l.shift();if(l.length>0){if(d[y]=d[y]||(this.useArray&&r(l[0])?[]:{}),!s(d[y]))if(this.override)d[y]={};else{if(!(s(b)&&o(b)))throw new Error("Trying to redefine `"+y+"` which is a "+typeof d[y]);return}this._fill(l,d[y],b,x)}else{if(!this.override&&s(d[y])&&!o(d[y])){if(!(s(b)&&o(b)))throw new Error("Trying to redefine non-empty obj['"+y+"']");return}d[y]=e(b,x)}},f.prototype.object=function(l,d){var b=this;return Object.keys(l).forEach(function(x){var y=d===void 0?null:d[x],E=u(x,b.separator).join(b.separator);E.indexOf(b.separator)!==-1?(b._fill(E.split(b.separator),l,l[x],y),delete l[x]):l[x]=e(l[x],y)}),l},f.prototype.str=function(l,d,b,x){var y=u(l,this.separator).join(this.separator);return l.indexOf(this.separator)!==-1?this._fill(y.split(this.separator),b,d,x):b[l]=e(d,x),b},f.prototype.pick=function(l,d,b,x){var y,E,V,R,S;for(E=u(l,this.separator),y=0;y<E.length;y++)if(R=t(E[y],d),d&&typeof d=="object"&&R in d){if(y===E.length-1)return b?(V=d[R],x&&Array.isArray(d)?d.splice(R,1):delete d[R],Array.isArray(d)&&(S=E.slice(0,-1).join("."),this.cleanup.indexOf(S)===-1&&this.cleanup.push(S)),V):d[R];d=d[R]}else return;return b&&Array.isArray(d)&&(d=d.filter(function($){return $!==void 0})),d},f.prototype.delete=function(l,d){return this.remove(l,d,!0)},f.prototype.remove=function(l,d,b){var x;if(this.cleanup=[],Array.isArray(l)){for(x=0;x<l.length;x++)this.pick(l[x],d,!0,b);return b||this._cleanup(d),d}else return this.pick(l,d,!0,b)},f.prototype._cleanup=function(l){var d,b,x,y;if(this.cleanup.length){for(b=0;b<this.cleanup.length;b++)x=this.cleanup[b].split("."),y=x.splice(0,-1).join("."),d=y?this.pick(y,l):l,d=d[x[0]].filter(function(E){return E!==void 0}),this.set(this.cleanup[b],d,l);this.cleanup=[]}},f.prototype.del=f.prototype.remove,f.prototype.move=function(l,d,b,x,y){return typeof x=="function"||Array.isArray(x)?this.set(d,e(this.pick(l,b,!0),x),b,y):(y=x,this.set(d,this.pick(l,b,!0),b,y)),b},f.prototype.transfer=function(l,d,b,x,y,E){return typeof y=="function"||Array.isArray(y)?this.set(d,e(this.pick(l,b,!0),y),x,E):(E=y,this.set(d,this.pick(l,b,!0),x,E)),x},f.prototype.copy=function(l,d,b,x,y,E){return typeof y=="function"||Array.isArray(y)?this.set(d,e(JSON.parse(JSON.stringify(this.pick(l,b,!1))),y),x,E):(E=y,this.set(d,this.pick(l,b,!1),x,E)),x},f.prototype.set=function(l,d,b,x){var y,E,V,R;if(typeof d>"u")return b;for(V=u(l,this.separator),y=0;y<V.length;y++){if(R=V[y],y===V.length-1)if(x&&n(d)&&n(b[R]))for(E in d)h.call(d,E)&&(b[R][E]=d[E]);else if(x&&Array.isArray(b[R])&&Array.isArray(d))for(var S=0;S<d.length;S++)b[V[y]].push(d[S]);else b[R]=d;else(!h.call(b,R)||!n(b[R])&&!Array.isArray(b[R]))&&(/^\d+$/.test(V[y+1])?b[R]=[]:b[R]={});b=b[R]}return b},f.prototype.transform=function(l,d,b){return d=d||{},b=b||{},Object.keys(l).forEach((function(x){this.set(l[x],this.pick(x,d),b)}).bind(this)),b},f.prototype.dot=function(l,d,b){d=d||{},b=b||[];var x=Array.isArray(l);return Object.keys(l).forEach((function(y){var E=x&&this.useBrackets?"["+y+"]":y;if(s(l[y])&&(n(l[y])&&!o(l[y])||Array.isArray(l[y])&&!this.keepArray&&l[y].length!==0))if(x&&this.useBrackets){var V=b[b.length-1]||"";return this.dot(l[y],d,b.slice(0,-1).concat(V+E))}else return this.dot(l[y],d,b.concat(E));else x&&this.useBrackets?d[b.join(this.separator).concat("["+y+"]")]=l[y]:d[b.concat(E).join(this.separator)]=l[y]}).bind(this)),d},f.pick=P("pick"),f.move=P("move"),f.transfer=P("transfer"),f.transform=P("transform"),f.copy=P("copy"),f.object=P("object"),f.str=P("str"),f.set=P("set"),f.delete=P("delete"),f.del=f.remove=P("remove"),f.dot=P("dot"),["override","overwrite"].forEach(function(l){Object.defineProperty(f,l,{get:function(){return v.override},set:function(d){v.override=!!d}})}),["useArray","keepArray","useBrackets"].forEach(function(l){Object.defineProperty(f,l,{get:function(){return v[l]},set:function(d){v[l]=d}})}),f._process=e,Qn=f,Qn}var kp=_p();const Jr=rn(kp),Cp=({name:e,label:t,value:r,data:n,textField:s,valueField:o,readOnly:i=!1,orientation:c=$e.Horizontal,isMultiSelect:u=!1,className:h,onChange:f,itemTemplate:v})=>{const[P,l]=p.useState(),[d,b]=p.useState([]),x=gn(()=>n,[n]),y=p.useId();p.useEffect(()=>{if(u){const F=Array.isArray(r)?r.map(C=>C.toString()):r?[String(r)]:void 0;b(F??[])}else r&&l(r.toString())},[r]);const E=F=>u?d.findIndex(C=>C===F)>-1:P===F,V=F=>{const C=F.toString();if(u){const Q=E(C);let I;Q?I=d.filter(he=>he!=C):I=[...d,C],b(I),f==null||f({name:e,value:I})}else C!==P&&(l(C),f==null||f({name:e,value:C}))},R=F=>{const{value:C}=F.target;l(C),f==null||f({name:e,value:C})},S=F=>{const{value:C,checked:Q}=F.target;let I;Q?I=[...d,C]:I=d.filter(he=>he!=C),b(I),f==null||f({name:e,value:I})},$=(F,C,Q,I)=>g.jsxs("label",{htmlFor:F,className:I,children:[g.jsx("input",{id:F,name:e,value:Q,type:"checkbox",onChange:S,checked:E(Q),className:"bsc:appearance-none"}),C]},F),O=(F,C,Q,I)=>g.jsxs("label",{htmlFor:F,className:I,children:[g.jsx("input",{id:F,name:e,value:Q,type:"radio",onChange:R,checked:E(Q),className:"bsc:appearance-none"}),C]},F),q=Ir(cr.FocusWithin),z=p.useCallback((F,C)=>g.jsx(g.Fragment,{children:C}),[]),se=v||z,ae=(F,C,Q)=>{const I=`element_${y}_${C}`,he=Jr.pick(s,F),k=String(Jr.pick(o,F)),M=C===0,N=C===Q.length-1,_=de("bc-group-button-item bsc:cursor-pointer bsc:border-solid bsc:p-2 bsc:font-medium",{"bsc:has-checked:bg-primary-1 bsc:dark:has-checked:bg-mono-light-1 bsc:has-checked:text-white bsc:dark:has-checked:text-mono-dark-1 bsc:dark:text-mono-light-1 bsc:text-gray-2 bsc:border-gray-3 bsc:dark:border-mono-light-2":!i,"bc-read-only bsc:has-checked:bg-primary-4 bsc:dark:has-checked:bg-mono-light-3 bsc:has-checked:text-gray-5 bsc:dark:has-checked:text-mono-dark-3 bsc:dark:text-mono-light-3 bsc:text-gray-3 bsc:border-gray-4 bsc:dark:border-mono-light-3 bsc:pointer-events-none":i,"bsc:border-t bsc:border-l bsc:border-b bsc:rounded-l-md bsc:pl-2":M&&c===$e.Horizontal,"bsc:border-t bsc:border-r bsc:border-l bsc:border-b bsc:rounded-r-md bsc:pr-2":N&&c===$e.Horizontal,"bsc:border-t bsc:border-b":!M&&!N&&c===$e.Horizontal,"bsc:border-l":!M&&c===$e.Horizontal,"bsc:border-l bsc:border-r bsc:border-t bsc:rounded-t-md":M&&c===$e.Vertical,"bsc:border bsc:rounded-b-md":N&&c===$e.Vertical,"bsc:border-t bsc:border-l bsc:border-r":!M&&!N&&c===$e.Vertical},q),W={itemId:I,selectedValue:u?d:P,itemText:he,itemValue:k,itemData:F,itemStyles:_,isSelected:E(k),isFirstItem:M,isLastItem:N,onItemChanged:V};return u?g.jsx(kt,{props:W,template:se,children:$(I,he,k,_)}):g.jsx(kt,{props:W,template:se,children:O(I,he,k,_)})},re=de("bsc:flex bsc:flex-col bsc:gap-2",h),K=de("bsc:flex",{"bsc:flex-col bsc:w-max":c===$e.Vertical}),L=F=>g.jsx("div",{className:K,children:F.map(ae)});return g.jsxs("div",{className:re,children:[t&&g.jsx(ft,{label:t,readOnly:i}),x&&L(x)]})},Dp=p.memo(Cp),Op=({id:e,name:t,label:r,value:n,checked:s=!1,labelLocation:o=Be.Right,readOnly:i=!1,useAnimation:c,onChange:u})=>{const h=hn(c),f=p.useCallback(l=>{u==null||u(l)},[u]),v=de("bc-radio-item-wrapper bsc:flex bsc:items-center bsc:*:cursor-pointer",{"bc-read-only":i}),P=de("bc-radio-item-outer bsc:relative bsc:*:size-[21px]",{"bsc:pl-1":o===Be.Left,"bsc:pr-1":o===Be.Right,"bsc-radio-item-animate":!i&&h,"bsc-radio-item":!i,"bc-read-only bsc-radio-item-read-only":i});return g.jsxs("div",{className:v,children:[o===Be.Left&&g.jsx(ft,{label:r,htmlFor:e,readOnly:i}),g.jsxs("label",{className:P,children:[g.jsx("input",{id:e,name:t,value:n,type:"radio",checked:s,onChange:f,className:"bc-radio-item-input-hidden bsc:hidden"}),g.jsxs("svg",{viewBox:"0 0 30 30",preserveAspectRatio:"xMidYMid meet",className:"bc-radio-item-svg",children:[g.jsx("circle",{cx:15,cy:15,r:13}),g.jsx("circle",{cx:"50%",cy:"50%",r:7})]})]}),o===Be.Right&&g.jsx(ft,{label:r,htmlFor:e,readOnly:i})]})},Np=p.memo(Op),jp=({name:e,label:t,value:r,data:n,textField:s,valueField:o,readOnly:i=!1,labelLocation:c=Be.Right,orientation:u=$e.Vertical,className:h,useAnimation:f,onChange:v})=>{const[P,l]=p.useState(r),d=gn(()=>n,[n]),b=p.useId(),x=p.useCallback(S=>{const $=S.target.value;l($),v==null||v({name:e,value:$,originalEvent:S})},[e]),y=(S,$)=>{const O=`${b}_radio_${$}`,q=Jr.pick(o,S);return g.jsx(Np,{id:O,name:e,label:Jr.pick(s,S),value:q,checked:q==P,labelLocation:c,readOnly:i,useAnimation:f,onChange:x},O)},E=de("bc-radio-container bsc:flex bsc:flex-col bsc:gap-1",h),V=de("bc-radio-wrapper bsc:flex bsc:gap-1",{"bsc:flex-col":u===$e.Vertical,"bsc:*:pr-2":u===$e.Horizontal}),R=S=>g.jsx("div",{className:V,children:S.map(y)});return g.jsxs("div",{className:E,children:[t&&g.jsx(ft,{label:t,readOnly:i}),d&&R(d)]})},Ip=p.memo(jp),Mp=({name:e,label:t,value:r,checked:n=!1,readOnly:s=!1,useAnimation:o,className:i,onChange:c})=>{const[u,h]=p.useState(!1),f=p.useId(),v=hn(o);p.useEffect(()=>{h(n)},[n]);const P=y=>{const{checked:E}=y.target;h(E),c==null||c({originalEvent:y,name:e||y.target.name,value:r||y.target.value,checked:E})},l=de("bc-toggle-wrapper bsc:flex bsc:flex-col",i),d=Ir(cr.FocusWithin),b=de("bc-toggle-container bsc-toggle-switch bsc:flex bsc:mt-0.5 bsc:relative bsc:w-[60px] bsc:h-[26px] bsc:rounded-full bsc:[transition:background-color_1s]",{"bsc:cursor-pointer bsc:bg-gray-3 bsc:dark:bg-mono-dark-3 bsc:has-checked:bg-primary-1 bsc:dark:has-checked:bg-mono-light-2":!s,"bc-read-only bsc:pointer-events-none bsc:bg-gray-4 bsc:dark:bg-mono-dark-2 bsc:has-checked:bg-primary-4 bsc:dark:has-checked:bg-mono-light-3":s},d),x=de("bc-toggle-switch bsc:absolute bsc:rounded-full bsc:dark:border bsc:dark:border-solid bsc:dark:border-mono-dark-1 bsc:w-[18px] bsc:h-[18px] bsc:top-[4px] bsc:left-[4px]",{"bsc:bg-white bsc:cursor-pointer":!s,"bc-read-only bsc:bg-gray-5 bsc:pointer-events-none":s,"bsc:[transition:0.3s]":!s&&v});return g.jsxs("div",{className:l,children:[t&&g.jsx(ft,{label:t,htmlFor:f,readOnly:s}),g.jsxs("label",{className:b,children:[g.jsx("input",{id:f,name:e,value:r,type:"checkbox",checked:u,onChange:P,className:"bsc:appearance-none"}),g.jsx("div",{id:"switch",className:x})]})]})},Rp=p.memo(Mp);ne.BeeSoftProvider=Ni,ne.Button=et,ne.Checkbox=Ys,ne.CheckboxGroup=ya,ne.ContentEditableInput=Vr,ne.DateFormatType=kr,ne.DateScrollerType=zt,ne.DateSelectionType=we,ne.DateTime=Ep,ne.FormGroupItemOrientation=$e,ne.FormattedInput=Pi,ne.GroupButton=Dp,ne.MediaQuery=An,ne.MobileOverlayPanel=mi,ne.OverlayPanel=yi,ne.RadioButton=Ip,ne.SelectionLabelLocation=Be,ne.Toggle=Rp,ne.applyBeeSoftTheme=_h,ne.createBeeSoftTheme=kh,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})});
|