componentes-exagono 0.2.7 → 0.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(Et,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("react"),require("@mui/material"),require("date-fns"),require("react-dom"),require("notistack")):typeof define=="function"&&define.amd?define(["exports","react","@mui/material","date-fns","react-dom","notistack"],v):(Et=typeof globalThis<"u"?globalThis:Et||self,v(Et.exagono={},Et.React,Et.MaterialUI,Et.dateFns,Et.ReactDOM,Et.notistack))})(this,(function(Et,v,g,_,il,hs){"use strict";function al(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 X=al(v),t0=al(il);function ot(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Lr(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){var o=!1;try{o=this instanceof n}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var ms={exports:{}},Kn={};/**
1
+ (function(Et,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react"),require("@mui/material"),require("date-fns"),require("react-dom"),require("notistack")):typeof define=="function"&&define.amd?define(["exports","react","@mui/material","date-fns","react-dom","notistack"],y):(Et=typeof globalThis<"u"?globalThis:Et||self,y(Et.exagono={},Et.React,Et.MaterialUI,Et.dateFns,Et.ReactDOM,Et.notistack))})(this,(function(Et,y,g,_,al,ms){"use strict";function cl(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 J=cl(y),n0=cl(al);function rt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Lr(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){var o=!1;try{o=this instanceof n}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var gs={exports:{}},Qn={};/**
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 cl;function r0(){if(cl)return Kn;cl=1;var e=v,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function i(a,c,l){var d,f={},p=null,y=null;l!==void 0&&(p=""+l),c.key!==void 0&&(p=""+c.key),c.ref!==void 0&&(y=c.ref);for(d in c)n.call(c,d)&&!s.hasOwnProperty(d)&&(f[d]=c[d]);if(a&&a.defaultProps)for(d in c=a.defaultProps,c)f[d]===void 0&&(f[d]=c[d]);return{$$typeof:t,type:a,key:p,ref:y,props:f,_owner:o.current}}return Kn.Fragment=r,Kn.jsx=i,Kn.jsxs=i,Kn}var Qn={};/**
9
+ */var ll;function o0(){if(ll)return Qn;ll=1;var e=y,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function i(a,c,l){var d,f={},p=null,m=null;l!==void 0&&(p=""+l),c.key!==void 0&&(p=""+c.key),c.ref!==void 0&&(m=c.ref);for(d in c)n.call(c,d)&&!s.hasOwnProperty(d)&&(f[d]=c[d]);if(a&&a.defaultProps)for(d in c=a.defaultProps,c)f[d]===void 0&&(f[d]=c[d]);return{$$typeof:t,type:a,key:p,ref:m,props:f,_owner:o.current}}return Qn.Fragment=r,Qn.jsx=i,Qn.jsxs=i,Qn}var Xn={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,39 +14,39 @@
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 ll;function n0(){return ll||(ll=1,process.env.NODE_ENV!=="production"&&(function(){var e=v,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),m=Symbol.iterator,h="@@iterator";function b(T){if(T===null||typeof T!="object")return null;var oe=m&&T[m]||T[h];return typeof oe=="function"?oe:null}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(T){{for(var oe=arguments.length,xe=new Array(oe>1?oe-1:0),Ie=1;Ie<oe;Ie++)xe[Ie-1]=arguments[Ie];D("error",T,xe)}}function D(T,oe,xe){{var Ie=S.ReactDebugCurrentFrame,We=Ie.getStackAddendum();We!==""&&(oe+="%s",xe=xe.concat([We]));var nt=xe.map(function($e){return String($e)});nt.unshift("Warning: "+oe),Function.prototype.apply.call(console[T],console,nt)}}var k=!1,w=!1,B=!1,E=!1,I=!1,P;P=Symbol.for("react.module.reference");function A(T){return!!(typeof T=="string"||typeof T=="function"||T===n||T===s||I||T===o||T===l||T===d||E||T===y||k||w||B||typeof T=="object"&&T!==null&&(T.$$typeof===p||T.$$typeof===f||T.$$typeof===i||T.$$typeof===a||T.$$typeof===c||T.$$typeof===P||T.getModuleId!==void 0))}function W(T,oe,xe){var Ie=T.displayName;if(Ie)return Ie;var We=oe.displayName||oe.name||"";return We!==""?xe+"("+We+")":xe}function q(T){return T.displayName||"Context"}function F(T){if(T==null)return null;if(typeof T.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof T=="function")return T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case n:return"Fragment";case r:return"Portal";case s:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case d:return"SuspenseList"}if(typeof T=="object")switch(T.$$typeof){case a:var oe=T;return q(oe)+".Consumer";case i:var xe=T;return q(xe._context)+".Provider";case c:return W(T,T.render,"ForwardRef");case f:var Ie=T.displayName||null;return Ie!==null?Ie:F(T.type)||"Memo";case p:{var We=T,nt=We._payload,$e=We._init;try{return F($e(nt))}catch{return null}}}return null}var Z=Object.assign,le=0,V,ee,ue,ye,L,te,J;function H(){}H.__reactDisabledLog=!0;function K(){{if(le===0){V=console.log,ee=console.info,ue=console.warn,ye=console.error,L=console.group,te=console.groupCollapsed,J=console.groupEnd;var T={configurable:!0,enumerable:!0,value:H,writable:!0};Object.defineProperties(console,{info:T,log:T,warn:T,error:T,group:T,groupCollapsed:T,groupEnd:T})}le++}}function ae(){{if(le--,le===0){var T={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Z({},T,{value:V}),info:Z({},T,{value:ee}),warn:Z({},T,{value:ue}),error:Z({},T,{value:ye}),group:Z({},T,{value:L}),groupCollapsed:Z({},T,{value:te}),groupEnd:Z({},T,{value:J})})}le<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ce=S.ReactCurrentDispatcher,me;function ge(T,oe,xe){{if(me===void 0)try{throw Error()}catch(We){var Ie=We.stack.trim().match(/\n( *(at )?)/);me=Ie&&Ie[1]||""}return`
18
- `+me+T}}var fe=!1,he;{var Pe=typeof WeakMap=="function"?WeakMap:Map;he=new Pe}function N(T,oe){if(!T||fe)return"";{var xe=he.get(T);if(xe!==void 0)return xe}var Ie;fe=!0;var We=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var nt;nt=ce.current,ce.current=null,K();try{if(oe){var $e=function(){throw Error()};if(Object.defineProperty($e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($e,[])}catch(Fe){Ie=Fe}Reflect.construct(T,[],$e)}else{try{$e.call()}catch(Fe){Ie=Fe}T.call($e.prototype)}}else{try{throw Error()}catch(Fe){Ie=Fe}T()}}catch(Fe){if(Fe&&Ie&&typeof Fe.stack=="string"){for(var Re=Fe.stack.split(`
17
+ */var ul;function s0(){return ul||(ul=1,process.env.NODE_ENV!=="production"&&(function(){var e=y,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),v=Symbol.iterator,h="@@iterator";function b(T){if(T===null||typeof T!="object")return null;var ne=v&&T[v]||T[h];return typeof ne=="function"?ne:null}var w=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(T){{for(var ne=arguments.length,Ce=new Array(ne>1?ne-1:0),Ie=1;Ie<ne;Ie++)Ce[Ie-1]=arguments[Ie];k("error",T,Ce)}}function k(T,ne,Ce){{var Ie=w.ReactDebugCurrentFrame,We=Ie.getStackAddendum();We!==""&&(ne+="%s",Ce=Ce.concat([We]));var it=Ce.map(function(ze){return String(ze)});it.unshift("Warning: "+ne),Function.prototype.apply.call(console[T],console,it)}}var C=!1,x=!1,H=!1,E=!1,I=!1,P;P=Symbol.for("react.module.reference");function A(T){return!!(typeof T=="string"||typeof T=="function"||T===n||T===s||I||T===o||T===l||T===d||E||T===m||C||x||H||typeof T=="object"&&T!==null&&(T.$$typeof===p||T.$$typeof===f||T.$$typeof===i||T.$$typeof===a||T.$$typeof===c||T.$$typeof===P||T.getModuleId!==void 0))}function Y(T,ne,Ce){var Ie=T.displayName;if(Ie)return Ie;var We=ne.displayName||ne.name||"";return We!==""?Ce+"("+We+")":Ce}function Z(T){return T.displayName||"Context"}function V(T){if(T==null)return null;if(typeof T.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof T=="function")return T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case n:return"Fragment";case r:return"Portal";case s:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case d:return"SuspenseList"}if(typeof T=="object")switch(T.$$typeof){case a:var ne=T;return Z(ne)+".Consumer";case i:var Ce=T;return Z(Ce._context)+".Provider";case c:return Y(T,T.render,"ForwardRef");case f:var Ie=T.displayName||null;return Ie!==null?Ie:V(T.type)||"Memo";case p:{var We=T,it=We._payload,ze=We._init;try{return V(ze(it))}catch{return null}}}return null}var W=Object.assign,le=0,R,X,re,ve,L,ee,Ee;function te(){}te.__reactDisabledLog=!0;function he(){{if(le===0){R=console.log,X=console.info,re=console.warn,ve=console.error,L=console.group,ee=console.groupCollapsed,Ee=console.groupEnd;var T={configurable:!0,enumerable:!0,value:te,writable:!0};Object.defineProperties(console,{info:T,log:T,warn:T,error:T,group:T,groupCollapsed:T,groupEnd:T})}le++}}function ue(){{if(le--,le===0){var T={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:W({},T,{value:R}),info:W({},T,{value:X}),warn:W({},T,{value:re}),error:W({},T,{value:ve}),group:W({},T,{value:L}),groupCollapsed:W({},T,{value:ee}),groupEnd:W({},T,{value:Ee})})}le<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ce=w.ReactCurrentDispatcher,be;function _e(T,ne,Ce){{if(be===void 0)try{throw Error()}catch(We){var Ie=We.stack.trim().match(/\n( *(at )?)/);be=Ie&&Ie[1]||""}return`
18
+ `+be+T}}var pe=!1,ge;{var Ae=typeof WeakMap=="function"?WeakMap:Map;ge=new Ae}function N(T,ne){if(!T||pe)return"";{var Ce=ge.get(T);if(Ce!==void 0)return Ce}var Ie;pe=!0;var We=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var it;it=ce.current,ce.current=null,he();try{if(ne){var ze=function(){throw Error()};if(Object.defineProperty(ze.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ze,[])}catch(Ve){Ie=Ve}Reflect.construct(T,[],ze)}else{try{ze.call()}catch(Ve){Ie=Ve}T.call(ze.prototype)}}else{try{throw Error()}catch(Ve){Ie=Ve}T()}}catch(Ve){if(Ve&&Ie&&typeof Ve.stack=="string"){for(var Re=Ve.stack.split(`
19
19
  `),Ft=Ie.stack.split(`
20
- `),$=Re.length-1,Y=Ft.length-1;$>=1&&Y>=0&&Re[$]!==Ft[Y];)Y--;for(;$>=1&&Y>=0;$--,Y--)if(Re[$]!==Ft[Y]){if($!==1||Y!==1)do if($--,Y--,Y<0||Re[$]!==Ft[Y]){var _e=`
21
- `+Re[$].replace(" at new "," at ");return T.displayName&&_e.includes("<anonymous>")&&(_e=_e.replace("<anonymous>",T.displayName)),typeof T=="function"&&he.set(T,_e),_e}while($>=1&&Y>=0);break}}}finally{fe=!1,ce.current=nt,ae(),Error.prepareStackTrace=We}var Me=T?T.displayName||T.name:"",ut=Me?ge(Me):"";return typeof T=="function"&&he.set(T,ut),ut}function Ve(T,oe,xe){return N(T,!1)}function et(T){var oe=T.prototype;return!!(oe&&oe.isReactComponent)}function Ue(T,oe,xe){if(T==null)return"";if(typeof T=="function")return N(T,et(T));if(typeof T=="string")return ge(T);switch(T){case l:return ge("Suspense");case d:return ge("SuspenseList")}if(typeof T=="object")switch(T.$$typeof){case c:return Ve(T.render);case f:return Ue(T.type,oe,xe);case p:{var Ie=T,We=Ie._payload,nt=Ie._init;try{return Ue(nt(We),oe,xe)}catch{}}}return""}var Ae=Object.prototype.hasOwnProperty,Be={},pt=S.ReactDebugCurrentFrame;function rt(T){if(T){var oe=T._owner,xe=Ue(T.type,T._source,oe?oe.type:null);pt.setExtraStackFrame(xe)}else pt.setExtraStackFrame(null)}function x(T,oe,xe,Ie,We){{var nt=Function.call.bind(Ae);for(var $e in T)if(nt(T,$e)){var Re=void 0;try{if(typeof T[$e]!="function"){var Ft=Error((Ie||"React class")+": "+xe+" type `"+$e+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof T[$e]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ft.name="Invariant Violation",Ft}Re=T[$e](oe,$e,Ie,xe,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch($){Re=$}Re&&!(Re instanceof Error)&&(rt(We),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Ie||"React class",xe,$e,typeof Re),rt(null)),Re instanceof Error&&!(Re.message in Be)&&(Be[Re.message]=!0,rt(We),C("Failed %s type: %s",xe,Re.message),rt(null))}}}var M=Array.isArray;function j(T){return M(T)}function re(T){{var oe=typeof Symbol=="function"&&Symbol.toStringTag,xe=oe&&T[Symbol.toStringTag]||T.constructor.name||"Object";return xe}}function se(T){try{return O(T),!1}catch{return!0}}function O(T){return""+T}function ne(T){if(se(T))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",re(T)),O(T)}var we=S.ReactCurrentOwner,De={key:!0,ref:!0,__self:!0,__source:!0},R,ie;function Se(T){if(Ae.call(T,"ref")){var oe=Object.getOwnPropertyDescriptor(T,"ref").get;if(oe&&oe.isReactWarning)return!1}return T.ref!==void 0}function qe(T){if(Ae.call(T,"key")){var oe=Object.getOwnPropertyDescriptor(T,"key").get;if(oe&&oe.isReactWarning)return!1}return T.key!==void 0}function Q(T,oe){typeof T.ref=="string"&&we.current}function de(T,oe){{var xe=function(){R||(R=!0,C("%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)",oe))};xe.isReactWarning=!0,Object.defineProperty(T,"key",{get:xe,configurable:!0})}}function ke(T,oe){{var xe=function(){ie||(ie=!0,C("%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)",oe))};xe.isReactWarning=!0,Object.defineProperty(T,"ref",{get:xe,configurable:!0})}}var Te=function(T,oe,xe,Ie,We,nt,$e){var Re={$$typeof:t,type:T,key:oe,ref:xe,props:$e,_owner:nt};return Re._store={},Object.defineProperty(Re._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Re,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Ie}),Object.defineProperty(Re,"_source",{configurable:!1,enumerable:!1,writable:!1,value:We}),Object.freeze&&(Object.freeze(Re.props),Object.freeze(Re)),Re};function lt(T,oe,xe,Ie,We){{var nt,$e={},Re=null,Ft=null;xe!==void 0&&(ne(xe),Re=""+xe),qe(oe)&&(ne(oe.key),Re=""+oe.key),Se(oe)&&(Ft=oe.ref,Q(oe,We));for(nt in oe)Ae.call(oe,nt)&&!De.hasOwnProperty(nt)&&($e[nt]=oe[nt]);if(T&&T.defaultProps){var $=T.defaultProps;for(nt in $)$e[nt]===void 0&&($e[nt]=$[nt])}if(Re||Ft){var Y=typeof T=="function"?T.displayName||T.name||"Unknown":T;Re&&de($e,Y),Ft&&ke($e,Y)}return Te(T,Re,Ft,We,Ie,we.current,$e)}}var Bt=S.ReactCurrentOwner,on=S.ReactDebugCurrentFrame;function Yt(T){if(T){var oe=T._owner,xe=Ue(T.type,T._source,oe?oe.type:null);on.setExtraStackFrame(xe)}else on.setExtraStackFrame(null)}var $r;$r=!1;function sn(T){return typeof T=="object"&&T!==null&&T.$$typeof===t}function cr(){{if(Bt.current){var T=F(Bt.current.type);if(T)return`
20
+ `),$=Re.length-1,G=Ft.length-1;$>=1&&G>=0&&Re[$]!==Ft[G];)G--;for(;$>=1&&G>=0;$--,G--)if(Re[$]!==Ft[G]){if($!==1||G!==1)do if($--,G--,G<0||Re[$]!==Ft[G]){var xe=`
21
+ `+Re[$].replace(" at new "," at ");return T.displayName&&xe.includes("<anonymous>")&&(xe=xe.replace("<anonymous>",T.displayName)),typeof T=="function"&&ge.set(T,xe),xe}while($>=1&&G>=0);break}}}finally{pe=!1,ce.current=it,ue(),Error.prepareStackTrace=We}var Pe=T?T.displayName||T.name:"",dt=Pe?_e(Pe):"";return typeof T=="function"&&ge.set(T,dt),dt}function Ue(T,ne,Ce){return N(T,!1)}function tt(T){var ne=T.prototype;return!!(ne&&ne.isReactComponent)}function He(T,ne,Ce){if(T==null)return"";if(typeof T=="function")return N(T,tt(T));if(typeof T=="string")return _e(T);switch(T){case l:return _e("Suspense");case d:return _e("SuspenseList")}if(typeof T=="object")switch(T.$$typeof){case c:return Ue(T.render);case f:return He(T.type,ne,Ce);case p:{var Ie=T,We=Ie._payload,it=Ie._init;try{return He(it(We),ne,Ce)}catch{}}}return""}var Me=Object.prototype.hasOwnProperty,Le={},pt=w.ReactDebugCurrentFrame;function st(T){if(T){var ne=T._owner,Ce=He(T.type,T._source,ne?ne.type:null);pt.setExtraStackFrame(Ce)}else pt.setExtraStackFrame(null)}function D(T,ne,Ce,Ie,We){{var it=Function.call.bind(Me);for(var ze in T)if(it(T,ze)){var Re=void 0;try{if(typeof T[ze]!="function"){var Ft=Error((Ie||"React class")+": "+Ce+" type `"+ze+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof T[ze]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ft.name="Invariant Violation",Ft}Re=T[ze](ne,ze,Ie,Ce,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch($){Re=$}Re&&!(Re instanceof Error)&&(st(We),S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Ie||"React class",Ce,ze,typeof Re),st(null)),Re instanceof Error&&!(Re.message in Le)&&(Le[Re.message]=!0,st(We),S("Failed %s type: %s",Ce,Re.message),st(null))}}}var O=Array.isArray;function z(T){return O(T)}function ae(T){{var ne=typeof Symbol=="function"&&Symbol.toStringTag,Ce=ne&&T[Symbol.toStringTag]||T.constructor.name||"Object";return Ce}}function se(T){try{return j(T),!1}catch{return!0}}function j(T){return""+T}function oe(T){if(se(T))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ae(T)),j(T)}var F=w.ReactCurrentOwner,fe={key:!0,ref:!0,__self:!0,__source:!0},M,U;function Se(T){if(Me.call(T,"ref")){var ne=Object.getOwnPropertyDescriptor(T,"ref").get;if(ne&&ne.isReactWarning)return!1}return T.ref!==void 0}function $e(T){if(Me.call(T,"key")){var ne=Object.getOwnPropertyDescriptor(T,"key").get;if(ne&&ne.isReactWarning)return!1}return T.key!==void 0}function K(T,ne){typeof T.ref=="string"&&F.current}function ie(T,ne){{var Ce=function(){M||(M=!0,S("%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)",ne))};Ce.isReactWarning=!0,Object.defineProperty(T,"key",{get:Ce,configurable:!0})}}function de(T,ne){{var Ce=function(){U||(U=!0,S("%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)",ne))};Ce.isReactWarning=!0,Object.defineProperty(T,"ref",{get:Ce,configurable:!0})}}var De=function(T,ne,Ce,Ie,We,it,ze){var Re={$$typeof:t,type:T,key:ne,ref:Ce,props:ze,_owner:it};return Re._store={},Object.defineProperty(Re._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Re,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Ie}),Object.defineProperty(Re,"_source",{configurable:!1,enumerable:!1,writable:!1,value:We}),Object.freeze&&(Object.freeze(Re.props),Object.freeze(Re)),Re};function Ze(T,ne,Ce,Ie,We){{var it,ze={},Re=null,Ft=null;Ce!==void 0&&(oe(Ce),Re=""+Ce),$e(ne)&&(oe(ne.key),Re=""+ne.key),Se(ne)&&(Ft=ne.ref,K(ne,We));for(it in ne)Me.call(ne,it)&&!fe.hasOwnProperty(it)&&(ze[it]=ne[it]);if(T&&T.defaultProps){var $=T.defaultProps;for(it in $)ze[it]===void 0&&(ze[it]=$[it])}if(Re||Ft){var G=typeof T=="function"?T.displayName||T.name||"Unknown":T;Re&&ie(ze,G),Ft&&de(ze,G)}return De(T,Re,Ft,We,Ie,F.current,ze)}}var $t=w.ReactCurrentOwner,on=w.ReactDebugCurrentFrame;function Yt(T){if(T){var ne=T._owner,Ce=He(T.type,T._source,ne?ne.type:null);on.setExtraStackFrame(Ce)}else on.setExtraStackFrame(null)}var vr;vr=!1;function sn(T){return typeof T=="object"&&T!==null&&T.$$typeof===t}function an(){{if($t.current){var T=V($t.current.type);if(T)return`
22
22
 
23
- Check the render method of \``+T+"`."}return""}}function tl(T){return""}var Sn={};function Gn(T){{var oe=cr();if(!oe){var xe=typeof T=="string"?T:T.displayName||T.name;xe&&(oe=`
23
+ Check the render method of \``+T+"`."}return""}}function yr(T){return""}var Cn={};function Kn(T){{var ne=an();if(!ne){var Ce=typeof T=="string"?T:T.displayName||T.name;Ce&&(ne=`
24
24
 
25
- Check the top-level render call using <`+xe+">.")}return oe}}function ds(T,oe){{if(!T._store||T._store.validated||T.key!=null)return;T._store.validated=!0;var xe=Gn(oe);if(Sn[xe])return;Sn[xe]=!0;var Ie="";T&&T._owner&&T._owner!==Bt.current&&(Ie=" It was passed a child from "+F(T._owner.type)+"."),Yt(T),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',xe,Ie),Yt(null)}}function Xi(T,oe){{if(typeof T!="object")return;if(j(T))for(var xe=0;xe<T.length;xe++){var Ie=T[xe];sn(Ie)&&ds(Ie,oe)}else if(sn(T))T._store&&(T._store.validated=!0);else if(T){var We=b(T);if(typeof We=="function"&&We!==T.entries)for(var nt=We.call(T),$e;!($e=nt.next()).done;)sn($e.value)&&ds($e.value,oe)}}}function Ji(T){{var oe=T.type;if(oe==null||typeof oe=="string")return;var xe;if(typeof oe=="function")xe=oe.propTypes;else if(typeof oe=="object"&&(oe.$$typeof===c||oe.$$typeof===f))xe=oe.propTypes;else return;if(xe){var Ie=F(oe);x(xe,T.props,"prop",Ie,T)}else if(oe.PropTypes!==void 0&&!$r){$r=!0;var We=F(oe);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",We||"Unknown")}typeof oe.getDefaultProps=="function"&&!oe.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ea(T){{for(var oe=Object.keys(T.props),xe=0;xe<oe.length;xe++){var Ie=oe[xe];if(Ie!=="children"&&Ie!=="key"){Yt(T),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Ie),Yt(null);break}}T.ref!==null&&(Yt(T),C("Invalid attribute `ref` supplied to `React.Fragment`."),Yt(null))}}var fs={};function ps(T,oe,xe,Ie,We,nt){{var $e=A(T);if(!$e){var Re="";(T===void 0||typeof T=="object"&&T!==null&&Object.keys(T).length===0)&&(Re+=" 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 Ft=tl();Ft?Re+=Ft:Re+=cr();var $;T===null?$="null":j(T)?$="array":T!==void 0&&T.$$typeof===t?($="<"+(F(T.type)||"Unknown")+" />",Re=" Did you accidentally export a JSX literal instead of a component?"):$=typeof T,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",$,Re)}var Y=lt(T,oe,xe,We,nt);if(Y==null)return Y;if($e){var _e=oe.children;if(_e!==void 0)if(Ie)if(j(_e)){for(var Me=0;Me<_e.length;Me++)Xi(_e[Me],T);Object.freeze&&Object.freeze(_e)}else C("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 Xi(_e,T)}if(Ae.call(oe,"key")){var ut=F(T),Fe=Object.keys(oe).filter(function(Yr){return Yr!=="key"}),lr=Fe.length>0?"{key: someKey, "+Fe.join(": ..., ")+": ...}":"{key: someKey}";if(!fs[ut+lr]){var er=Fe.length>0?"{"+Fe.join(": ..., ")+": ...}":"{}";C(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+Ce+">.")}return ne}}function fs(T,ne){{if(!T._store||T._store.validated||T.key!=null)return;T._store.validated=!0;var Ce=Kn(ne);if(Cn[Ce])return;Cn[Ce]=!0;var Ie="";T&&T._owner&&T._owner!==$t.current&&(Ie=" It was passed a child from "+V(T._owner.type)+"."),Yt(T),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Ce,Ie),Yt(null)}}function ea(T,ne){{if(typeof T!="object")return;if(z(T))for(var Ce=0;Ce<T.length;Ce++){var Ie=T[Ce];sn(Ie)&&fs(Ie,ne)}else if(sn(T))T._store&&(T._store.validated=!0);else if(T){var We=b(T);if(typeof We=="function"&&We!==T.entries)for(var it=We.call(T),ze;!(ze=it.next()).done;)sn(ze.value)&&fs(ze.value,ne)}}}function ta(T){{var ne=T.type;if(ne==null||typeof ne=="string")return;var Ce;if(typeof ne=="function")Ce=ne.propTypes;else if(typeof ne=="object"&&(ne.$$typeof===c||ne.$$typeof===f))Ce=ne.propTypes;else return;if(Ce){var Ie=V(ne);D(Ce,T.props,"prop",Ie,T)}else if(ne.PropTypes!==void 0&&!vr){vr=!0;var We=V(ne);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",We||"Unknown")}typeof ne.getDefaultProps=="function"&&!ne.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ra(T){{for(var ne=Object.keys(T.props),Ce=0;Ce<ne.length;Ce++){var Ie=ne[Ce];if(Ie!=="children"&&Ie!=="key"){Yt(T),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Ie),Yt(null);break}}T.ref!==null&&(Yt(T),S("Invalid attribute `ref` supplied to `React.Fragment`."),Yt(null))}}var ps={};function hs(T,ne,Ce,Ie,We,it){{var ze=A(T);if(!ze){var Re="";(T===void 0||typeof T=="object"&&T!==null&&Object.keys(T).length===0)&&(Re+=" 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 Ft=yr();Ft?Re+=Ft:Re+=an();var $;T===null?$="null":z(T)?$="array":T!==void 0&&T.$$typeof===t?($="<"+(V(T.type)||"Unknown")+" />",Re=" Did you accidentally export a JSX literal instead of a component?"):$=typeof T,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",$,Re)}var G=Ze(T,ne,Ce,We,it);if(G==null)return G;if(ze){var xe=ne.children;if(xe!==void 0)if(Ie)if(z(xe)){for(var Pe=0;Pe<xe.length;Pe++)ea(xe[Pe],T);Object.freeze&&Object.freeze(xe)}else S("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 ea(xe,T)}if(Me.call(ne,"key")){var dt=V(T),Ve=Object.keys(ne).filter(function(Yr){return Yr!=="key"}),lr=Ve.length>0?"{key: someKey, "+Ve.join(": ..., ")+": ...}":"{key: someKey}";if(!ps[dt+lr]){var tr=Ve.length>0?"{"+Ve.join(": ..., ")+": ...}":"{}";S(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,lr,ut,er,ut),fs[ut+lr]=!0}}return T===n?ea(Y):Ji(Y),Y}}function rl(T,oe,xe){return ps(T,oe,xe,!0)}function ta(T,oe,xe){return ps(T,oe,xe,!1)}var nl=ta,ol=rl;Qn.Fragment=n,Qn.jsx=nl,Qn.jsxs=ol})()),Qn}var ul;function ct(){return ul||(ul=1,process.env.NODE_ENV==="production"?ms.exports=r0():ms.exports=n0()),ms.exports}var u=ct();const vr={dashboardContainer:"_dashboardContainer_1aedh_1",sidebar:"_sidebar_1aedh_21",sidebarContent:"_sidebarContent_1aedh_41",header:"_header_1aedh_51",mainContent:"_mainContent_1aedh_75",sidebarCollapsed:"_sidebarCollapsed_1aedh_93",collapseButton:"_collapseButton_1aedh_111",menuButton:"_menuButton_1aedh_131",overlay:"_overlay_1aedh_133",headerContent:"_headerContent_1aedh_143",sidebarOpen:"_sidebarOpen_1aedh_195"};var Xn={},ra={exports:{}},dl;function st(){return dl||(dl=1,(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(ra)),ra.exports}var na={};function Ze(){return Ze=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ze.apply(null,arguments)}function qr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function fl(e){if(X.isValidElement(e)||!qr(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=fl(e[r])}),t}function kr(e,t,r={clone:!0}){const n=r.clone?Ze({},e):e;return qr(e)&&qr(t)&&Object.keys(t).forEach(o=>{X.isValidElement(t[o])?n[o]=t[o]:qr(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&qr(e[o])?n[o]=kr(e[o],t[o],r):r.clone?n[o]=qr(t[o])?fl(t[o]):t[o]:n[o]=t[o]}),n}const o0=Object.freeze(Object.defineProperty({__proto__:null,default:kr,isPlainObject:qr},Symbol.toStringTag,{value:"Module"}));var gs={exports:{}},vs={exports:{}},Ge={};/** @license React v16.13.1
30
+ <%s key={someKey} {...props} />`,lr,dt,tr,dt),ps[dt+lr]=!0}}return T===n?ra(G):ta(G),G}}function nl(T,ne,Ce){return hs(T,ne,Ce,!0)}function na(T,ne,Ce){return hs(T,ne,Ce,!1)}var ol=na,sl=nl;Xn.Fragment=n,Xn.jsx=ol,Xn.jsxs=sl})()),Xn}var dl;function at(){return dl||(dl=1,process.env.NODE_ENV==="production"?gs.exports=o0():gs.exports=s0()),gs.exports}var u=at();const br={dashboardContainer:"_dashboardContainer_1aedh_1",sidebar:"_sidebar_1aedh_21",sidebarContent:"_sidebarContent_1aedh_41",header:"_header_1aedh_51",mainContent:"_mainContent_1aedh_75",sidebarCollapsed:"_sidebarCollapsed_1aedh_93",collapseButton:"_collapseButton_1aedh_111",menuButton:"_menuButton_1aedh_131",overlay:"_overlay_1aedh_133",headerContent:"_headerContent_1aedh_143",sidebarOpen:"_sidebarOpen_1aedh_195"};var Jn={},oa={exports:{}},fl;function nt(){return fl||(fl=1,(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(oa)),oa.exports}var sa={};function Ge(){return Ge=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ge.apply(null,arguments)}function qr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function pl(e){if(J.isValidElement(e)||!qr(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=pl(e[r])}),t}function kr(e,t,r={clone:!0}){const n=r.clone?Ge({},e):e;return qr(e)&&qr(t)&&Object.keys(t).forEach(o=>{J.isValidElement(t[o])?n[o]=t[o]:qr(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&qr(e[o])?n[o]=kr(e[o],t[o],r):r.clone?n[o]=qr(t[o])?pl(t[o]):t[o]:n[o]=t[o]}),n}const i0=Object.freeze(Object.defineProperty({__proto__:null,default:kr,isPlainObject:qr},Symbol.toStringTag,{value:"Module"}));var vs={exports:{}},ys={exports:{}},Ke={};/** @license React v16.13.1
31
31
  * react-is.production.min.js
32
32
  *
33
33
  * Copyright (c) Facebook, Inc. and its affiliates.
34
34
  *
35
35
  * This source code is licensed under the MIT license found in the
36
36
  * LICENSE file in the root directory of this source tree.
37
- */var pl;function s0(){if(pl)return Ge;pl=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,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function D(w){if(typeof w=="object"&&w!==null){var B=w.$$typeof;switch(B){case t:switch(w=w.type,w){case c:case l:case n:case s:case o:case f:return w;default:switch(w=w&&w.$$typeof,w){case a:case d:case m:case y:case i:return w;default:return B}}case r:return B}}}function k(w){return D(w)===l}return Ge.AsyncMode=c,Ge.ConcurrentMode=l,Ge.ContextConsumer=a,Ge.ContextProvider=i,Ge.Element=t,Ge.ForwardRef=d,Ge.Fragment=n,Ge.Lazy=m,Ge.Memo=y,Ge.Portal=r,Ge.Profiler=s,Ge.StrictMode=o,Ge.Suspense=f,Ge.isAsyncMode=function(w){return k(w)||D(w)===c},Ge.isConcurrentMode=k,Ge.isContextConsumer=function(w){return D(w)===a},Ge.isContextProvider=function(w){return D(w)===i},Ge.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Ge.isForwardRef=function(w){return D(w)===d},Ge.isFragment=function(w){return D(w)===n},Ge.isLazy=function(w){return D(w)===m},Ge.isMemo=function(w){return D(w)===y},Ge.isPortal=function(w){return D(w)===r},Ge.isProfiler=function(w){return D(w)===s},Ge.isStrictMode=function(w){return D(w)===o},Ge.isSuspense=function(w){return D(w)===f},Ge.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===n||w===l||w===s||w===o||w===f||w===p||typeof w=="object"&&w!==null&&(w.$$typeof===m||w.$$typeof===y||w.$$typeof===i||w.$$typeof===a||w.$$typeof===d||w.$$typeof===b||w.$$typeof===S||w.$$typeof===C||w.$$typeof===h)},Ge.typeOf=D,Ge}var Ke={};/** @license React v16.13.1
37
+ */var hl;function a0(){if(hl)return Ke;hl=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,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function k(x){if(typeof x=="object"&&x!==null){var H=x.$$typeof;switch(H){case t:switch(x=x.type,x){case c:case l:case n:case s:case o:case f:return x;default:switch(x=x&&x.$$typeof,x){case a:case d:case v:case m:case i:return x;default:return H}}case r:return H}}}function C(x){return k(x)===l}return Ke.AsyncMode=c,Ke.ConcurrentMode=l,Ke.ContextConsumer=a,Ke.ContextProvider=i,Ke.Element=t,Ke.ForwardRef=d,Ke.Fragment=n,Ke.Lazy=v,Ke.Memo=m,Ke.Portal=r,Ke.Profiler=s,Ke.StrictMode=o,Ke.Suspense=f,Ke.isAsyncMode=function(x){return C(x)||k(x)===c},Ke.isConcurrentMode=C,Ke.isContextConsumer=function(x){return k(x)===a},Ke.isContextProvider=function(x){return k(x)===i},Ke.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===t},Ke.isForwardRef=function(x){return k(x)===d},Ke.isFragment=function(x){return k(x)===n},Ke.isLazy=function(x){return k(x)===v},Ke.isMemo=function(x){return k(x)===m},Ke.isPortal=function(x){return k(x)===r},Ke.isProfiler=function(x){return k(x)===s},Ke.isStrictMode=function(x){return k(x)===o},Ke.isSuspense=function(x){return k(x)===f},Ke.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===n||x===l||x===s||x===o||x===f||x===p||typeof x=="object"&&x!==null&&(x.$$typeof===v||x.$$typeof===m||x.$$typeof===i||x.$$typeof===a||x.$$typeof===d||x.$$typeof===b||x.$$typeof===w||x.$$typeof===S||x.$$typeof===h)},Ke.typeOf=k,Ke}var Qe={};/** @license React v16.13.1
38
38
  * react-is.development.js
39
39
  *
40
40
  * Copyright (c) Facebook, Inc. and its affiliates.
41
41
  *
42
42
  * This source code is licensed under the MIT license found in the
43
43
  * LICENSE file in the root directory of this source tree.
44
- */var hl;function i0(){return hl||(hl=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,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function D(N){return typeof N=="string"||typeof N=="function"||N===n||N===l||N===s||N===o||N===f||N===p||typeof N=="object"&&N!==null&&(N.$$typeof===m||N.$$typeof===y||N.$$typeof===i||N.$$typeof===a||N.$$typeof===d||N.$$typeof===b||N.$$typeof===S||N.$$typeof===C||N.$$typeof===h)}function k(N){if(typeof N=="object"&&N!==null){var Ve=N.$$typeof;switch(Ve){case t:var et=N.type;switch(et){case c:case l:case n:case s:case o:case f:return et;default:var Ue=et&&et.$$typeof;switch(Ue){case a:case d:case m:case y:case i:return Ue;default:return Ve}}case r:return Ve}}}var w=c,B=l,E=a,I=i,P=t,A=d,W=n,q=m,F=y,Z=r,le=s,V=o,ee=f,ue=!1;function ye(N){return ue||(ue=!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.")),L(N)||k(N)===c}function L(N){return k(N)===l}function te(N){return k(N)===a}function J(N){return k(N)===i}function H(N){return typeof N=="object"&&N!==null&&N.$$typeof===t}function K(N){return k(N)===d}function ae(N){return k(N)===n}function ce(N){return k(N)===m}function me(N){return k(N)===y}function ge(N){return k(N)===r}function fe(N){return k(N)===s}function he(N){return k(N)===o}function Pe(N){return k(N)===f}Ke.AsyncMode=w,Ke.ConcurrentMode=B,Ke.ContextConsumer=E,Ke.ContextProvider=I,Ke.Element=P,Ke.ForwardRef=A,Ke.Fragment=W,Ke.Lazy=q,Ke.Memo=F,Ke.Portal=Z,Ke.Profiler=le,Ke.StrictMode=V,Ke.Suspense=ee,Ke.isAsyncMode=ye,Ke.isConcurrentMode=L,Ke.isContextConsumer=te,Ke.isContextProvider=J,Ke.isElement=H,Ke.isForwardRef=K,Ke.isFragment=ae,Ke.isLazy=ce,Ke.isMemo=me,Ke.isPortal=ge,Ke.isProfiler=fe,Ke.isStrictMode=he,Ke.isSuspense=Pe,Ke.isValidElementType=D,Ke.typeOf=k})()),Ke}var ml;function gl(){return ml||(ml=1,process.env.NODE_ENV==="production"?vs.exports=s0():vs.exports=i0()),vs.exports}/*
44
+ */var ml;function c0(){return ml||(ml=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,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function k(N){return typeof N=="string"||typeof N=="function"||N===n||N===l||N===s||N===o||N===f||N===p||typeof N=="object"&&N!==null&&(N.$$typeof===v||N.$$typeof===m||N.$$typeof===i||N.$$typeof===a||N.$$typeof===d||N.$$typeof===b||N.$$typeof===w||N.$$typeof===S||N.$$typeof===h)}function C(N){if(typeof N=="object"&&N!==null){var Ue=N.$$typeof;switch(Ue){case t:var tt=N.type;switch(tt){case c:case l:case n:case s:case o:case f:return tt;default:var He=tt&&tt.$$typeof;switch(He){case a:case d:case v:case m:case i:return He;default:return Ue}}case r:return Ue}}}var x=c,H=l,E=a,I=i,P=t,A=d,Y=n,Z=v,V=m,W=r,le=s,R=o,X=f,re=!1;function ve(N){return re||(re=!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.")),L(N)||C(N)===c}function L(N){return C(N)===l}function ee(N){return C(N)===a}function Ee(N){return C(N)===i}function te(N){return typeof N=="object"&&N!==null&&N.$$typeof===t}function he(N){return C(N)===d}function ue(N){return C(N)===n}function ce(N){return C(N)===v}function be(N){return C(N)===m}function _e(N){return C(N)===r}function pe(N){return C(N)===s}function ge(N){return C(N)===o}function Ae(N){return C(N)===f}Qe.AsyncMode=x,Qe.ConcurrentMode=H,Qe.ContextConsumer=E,Qe.ContextProvider=I,Qe.Element=P,Qe.ForwardRef=A,Qe.Fragment=Y,Qe.Lazy=Z,Qe.Memo=V,Qe.Portal=W,Qe.Profiler=le,Qe.StrictMode=R,Qe.Suspense=X,Qe.isAsyncMode=ve,Qe.isConcurrentMode=L,Qe.isContextConsumer=ee,Qe.isContextProvider=Ee,Qe.isElement=te,Qe.isForwardRef=he,Qe.isFragment=ue,Qe.isLazy=ce,Qe.isMemo=be,Qe.isPortal=_e,Qe.isProfiler=pe,Qe.isStrictMode=ge,Qe.isSuspense=Ae,Qe.isValidElementType=k,Qe.typeOf=C})()),Qe}var gl;function vl(){return gl||(gl=1,process.env.NODE_ENV==="production"?ys.exports=a0():ys.exports=c0()),ys.exports}/*
45
45
  object-assign
46
46
  (c) Sindre Sorhus
47
47
  @license MIT
48
- */var oa,vl;function a0(){if(vl)return oa;vl=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(i).map(function(d){return i[d]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(d){l[d]=d}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return oa=o()?Object.assign:function(s,i){for(var a,c=n(s),l,d=1;d<arguments.length;d++){a=Object(arguments[d]);for(var f in a)t.call(a,f)&&(c[f]=a[f]);if(e){l=e(a);for(var p=0;p<l.length;p++)r.call(a,l[p])&&(c[l[p]]=a[l[p]])}}return c},oa}var sa,yl;function ia(){if(yl)return sa;yl=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return sa=e,sa}var aa,bl;function _l(){return bl||(bl=1,aa=Function.call.bind(Object.prototype.hasOwnProperty)),aa}var ca,xl;function c0(){if(xl)return ca;xl=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ia(),r={},n=_l();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,c,l){if(process.env.NODE_ENV!=="production"){for(var d in s)if(n(s,d)){var f;try{if(typeof s[d]!="function"){var p=Error((c||"React class")+": "+a+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=s[d](i,d,c,a,null,t)}catch(m){f=m}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+a+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in r)){r[f.message]=!0;var y=l?l():"";e("Failed "+a+" type: "+f.message+(y??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},ca=o,ca}var la,wl;function l0(){if(wl)return la;wl=1;var e=gl(),t=a0(),r=ia(),n=_l(),o=c0(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var c="Warning: "+a;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return la=function(a,c){var l=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(L){var te=L&&(l&&L[l]||L[d]);if(typeof te=="function")return te}var p="<<anonymous>>",y={array:S("array"),bigint:S("bigint"),bool:S("boolean"),func:S("function"),number:S("number"),object:S("object"),string:S("string"),symbol:S("symbol"),any:C(),arrayOf:D,element:k(),elementType:w(),instanceOf:B,node:A(),objectOf:I,oneOf:E,oneOfType:P,shape:q,exact:F};function m(L,te){return L===te?L!==0||1/L===1/te:L!==L&&te!==te}function h(L,te){this.message=L,this.data=te&&typeof te=="object"?te:{},this.stack=""}h.prototype=Error.prototype;function b(L){if(process.env.NODE_ENV!=="production")var te={},J=0;function H(ae,ce,me,ge,fe,he,Pe){if(ge=ge||p,he=he||me,Pe!==r){if(c){var N=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 N.name="Invariant Violation",N}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ve=ge+":"+me;!te[Ve]&&J<3&&(s("You are manually calling a React.PropTypes validation function for the `"+he+"` prop on `"+ge+"`. 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."),te[Ve]=!0,J++)}}return ce[me]==null?ae?ce[me]===null?new h("The "+fe+" `"+he+"` is marked as required "+("in `"+ge+"`, but its value is `null`.")):new h("The "+fe+" `"+he+"` is marked as required in "+("`"+ge+"`, but its value is `undefined`.")):null:L(ce,me,ge,fe,he)}var K=H.bind(null,!1);return K.isRequired=H.bind(null,!0),K}function S(L){function te(J,H,K,ae,ce,me){var ge=J[H],fe=V(ge);if(fe!==L){var he=ee(ge);return new h("Invalid "+ae+" `"+ce+"` of type "+("`"+he+"` supplied to `"+K+"`, expected ")+("`"+L+"`."),{expectedType:L})}return null}return b(te)}function C(){return b(i)}function D(L){function te(J,H,K,ae,ce){if(typeof L!="function")return new h("Property `"+ce+"` of component `"+K+"` has invalid PropType notation inside arrayOf.");var me=J[H];if(!Array.isArray(me)){var ge=V(me);return new h("Invalid "+ae+" `"+ce+"` of type "+("`"+ge+"` supplied to `"+K+"`, expected an array."))}for(var fe=0;fe<me.length;fe++){var he=L(me,fe,K,ae,ce+"["+fe+"]",r);if(he instanceof Error)return he}return null}return b(te)}function k(){function L(te,J,H,K,ae){var ce=te[J];if(!a(ce)){var me=V(ce);return new h("Invalid "+K+" `"+ae+"` of type "+("`"+me+"` supplied to `"+H+"`, expected a single ReactElement."))}return null}return b(L)}function w(){function L(te,J,H,K,ae){var ce=te[J];if(!e.isValidElementType(ce)){var me=V(ce);return new h("Invalid "+K+" `"+ae+"` of type "+("`"+me+"` supplied to `"+H+"`, expected a single ReactElement type."))}return null}return b(L)}function B(L){function te(J,H,K,ae,ce){if(!(J[H]instanceof L)){var me=L.name||p,ge=ye(J[H]);return new h("Invalid "+ae+" `"+ce+"` of type "+("`"+ge+"` supplied to `"+K+"`, expected ")+("instance of `"+me+"`."))}return null}return b(te)}function E(L){if(!Array.isArray(L))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("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])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function te(J,H,K,ae,ce){for(var me=J[H],ge=0;ge<L.length;ge++)if(m(me,L[ge]))return null;var fe=JSON.stringify(L,function(Pe,N){var Ve=ee(N);return Ve==="symbol"?String(N):N});return new h("Invalid "+ae+" `"+ce+"` of value `"+String(me)+"` "+("supplied to `"+K+"`, expected one of "+fe+"."))}return b(te)}function I(L){function te(J,H,K,ae,ce){if(typeof L!="function")return new h("Property `"+ce+"` of component `"+K+"` has invalid PropType notation inside objectOf.");var me=J[H],ge=V(me);if(ge!=="object")return new h("Invalid "+ae+" `"+ce+"` of type "+("`"+ge+"` supplied to `"+K+"`, expected an object."));for(var fe in me)if(n(me,fe)){var he=L(me,fe,K,ae,ce+"."+fe,r);if(he instanceof Error)return he}return null}return b(te)}function P(L){if(!Array.isArray(L))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var te=0;te<L.length;te++){var J=L[te];if(typeof J!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ue(J)+" at index "+te+"."),i}function H(K,ae,ce,me,ge){for(var fe=[],he=0;he<L.length;he++){var Pe=L[he],N=Pe(K,ae,ce,me,ge,r);if(N==null)return null;N.data&&n(N.data,"expectedType")&&fe.push(N.data.expectedType)}var Ve=fe.length>0?", expected one of type ["+fe.join(", ")+"]":"";return new h("Invalid "+me+" `"+ge+"` supplied to "+("`"+ce+"`"+Ve+"."))}return b(H)}function A(){function L(te,J,H,K,ae){return Z(te[J])?null:new h("Invalid "+K+" `"+ae+"` supplied to "+("`"+H+"`, expected a ReactNode."))}return b(L)}function W(L,te,J,H,K){return new h((L||"React class")+": "+te+" type `"+J+"."+H+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+K+"`.")}function q(L){function te(J,H,K,ae,ce){var me=J[H],ge=V(me);if(ge!=="object")return new h("Invalid "+ae+" `"+ce+"` of type `"+ge+"` "+("supplied to `"+K+"`, expected `object`."));for(var fe in L){var he=L[fe];if(typeof he!="function")return W(K,ae,ce,fe,ee(he));var Pe=he(me,fe,K,ae,ce+"."+fe,r);if(Pe)return Pe}return null}return b(te)}function F(L){function te(J,H,K,ae,ce){var me=J[H],ge=V(me);if(ge!=="object")return new h("Invalid "+ae+" `"+ce+"` of type `"+ge+"` "+("supplied to `"+K+"`, expected `object`."));var fe=t({},J[H],L);for(var he in fe){var Pe=L[he];if(n(L,he)&&typeof Pe!="function")return W(K,ae,ce,he,ee(Pe));if(!Pe)return new h("Invalid "+ae+" `"+ce+"` key `"+he+"` supplied to `"+K+"`.\nBad object: "+JSON.stringify(J[H],null," ")+`
49
- Valid keys: `+JSON.stringify(Object.keys(L),null," "));var N=Pe(me,he,K,ae,ce+"."+he,r);if(N)return N}return null}return b(te)}function Z(L){switch(typeof L){case"number":case"string":case"undefined":return!0;case"boolean":return!L;case"object":if(Array.isArray(L))return L.every(Z);if(L===null||a(L))return!0;var te=f(L);if(te){var J=te.call(L),H;if(te!==L.entries){for(;!(H=J.next()).done;)if(!Z(H.value))return!1}else for(;!(H=J.next()).done;){var K=H.value;if(K&&!Z(K[1]))return!1}}else return!1;return!0;default:return!1}}function le(L,te){return L==="symbol"?!0:te?te["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&te instanceof Symbol:!1}function V(L){var te=typeof L;return Array.isArray(L)?"array":L instanceof RegExp?"object":le(te,L)?"symbol":te}function ee(L){if(typeof L>"u"||L===null)return""+L;var te=V(L);if(te==="object"){if(L instanceof Date)return"date";if(L instanceof RegExp)return"regexp"}return te}function ue(L){var te=ee(L);switch(te){case"array":case"object":return"an "+te;case"boolean":case"date":case"regexp":return"a "+te;default:return te}}function ye(L){return!L.constructor||!L.constructor.name?p:L.constructor.name}return y.checkPropTypes=o,y.resetWarningCache=o.resetWarningCache,y.PropTypes=y,y},la}var ua,Sl;function u0(){if(Sl)return ua;Sl=1;var e=ia();function t(){}function r(){}return r.resetWarningCache=t,ua=function(){function n(i,a,c,l,d,f){if(f!==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 o(){return n}var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return s.PropTypes=s,s},ua}var Cl;function d0(){if(Cl)return gs.exports;if(Cl=1,process.env.NODE_ENV!=="production"){var e=gl(),t=!0;gs.exports=l0()(e.isElement,t)}else gs.exports=u0()();return gs.exports}var f0=d0();const Ne=ot(f0);function Jn(e){let t="https://mui.com/production-error/?code="+e;for(let r=1;r<arguments.length;r+=1)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}const p0=Object.freeze(Object.defineProperty({__proto__:null,default:Jn},Symbol.toStringTag,{value:"Module"}));var ys={exports:{}},it={};/**
48
+ */var ia,yl;function l0(){if(yl)return ia;yl=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(i).map(function(d){return i[d]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(d){l[d]=d}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ia=o()?Object.assign:function(s,i){for(var a,c=n(s),l,d=1;d<arguments.length;d++){a=Object(arguments[d]);for(var f in a)t.call(a,f)&&(c[f]=a[f]);if(e){l=e(a);for(var p=0;p<l.length;p++)r.call(a,l[p])&&(c[l[p]]=a[l[p]])}}return c},ia}var aa,bl;function ca(){if(bl)return aa;bl=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return aa=e,aa}var la,_l;function xl(){return _l||(_l=1,la=Function.call.bind(Object.prototype.hasOwnProperty)),la}var ua,wl;function u0(){if(wl)return ua;wl=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ca(),r={},n=xl();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,c,l){if(process.env.NODE_ENV!=="production"){for(var d in s)if(n(s,d)){var f;try{if(typeof s[d]!="function"){var p=Error((c||"React class")+": "+a+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=s[d](i,d,c,a,null,t)}catch(v){f=v}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+a+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in r)){r[f.message]=!0;var m=l?l():"";e("Failed "+a+" type: "+f.message+(m??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},ua=o,ua}var da,Sl;function d0(){if(Sl)return da;Sl=1;var e=vl(),t=l0(),r=ca(),n=xl(),o=u0(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var c="Warning: "+a;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return da=function(a,c){var l=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(L){var ee=L&&(l&&L[l]||L[d]);if(typeof ee=="function")return ee}var p="<<anonymous>>",m={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:S(),arrayOf:k,element:C(),elementType:x(),instanceOf:H,node:A(),objectOf:I,oneOf:E,oneOfType:P,shape:Z,exact:V};function v(L,ee){return L===ee?L!==0||1/L===1/ee:L!==L&&ee!==ee}function h(L,ee){this.message=L,this.data=ee&&typeof ee=="object"?ee:{},this.stack=""}h.prototype=Error.prototype;function b(L){if(process.env.NODE_ENV!=="production")var ee={},Ee=0;function te(ue,ce,be,_e,pe,ge,Ae){if(_e=_e||p,ge=ge||be,Ae!==r){if(c){var N=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 N.name="Invariant Violation",N}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ue=_e+":"+be;!ee[Ue]&&Ee<3&&(s("You are manually calling a React.PropTypes validation function for the `"+ge+"` prop on `"+_e+"`. 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."),ee[Ue]=!0,Ee++)}}return ce[be]==null?ue?ce[be]===null?new h("The "+pe+" `"+ge+"` is marked as required "+("in `"+_e+"`, but its value is `null`.")):new h("The "+pe+" `"+ge+"` is marked as required in "+("`"+_e+"`, but its value is `undefined`.")):null:L(ce,be,_e,pe,ge)}var he=te.bind(null,!1);return he.isRequired=te.bind(null,!0),he}function w(L){function ee(Ee,te,he,ue,ce,be){var _e=Ee[te],pe=R(_e);if(pe!==L){var ge=X(_e);return new h("Invalid "+ue+" `"+ce+"` of type "+("`"+ge+"` supplied to `"+he+"`, expected ")+("`"+L+"`."),{expectedType:L})}return null}return b(ee)}function S(){return b(i)}function k(L){function ee(Ee,te,he,ue,ce){if(typeof L!="function")return new h("Property `"+ce+"` of component `"+he+"` has invalid PropType notation inside arrayOf.");var be=Ee[te];if(!Array.isArray(be)){var _e=R(be);return new h("Invalid "+ue+" `"+ce+"` of type "+("`"+_e+"` supplied to `"+he+"`, expected an array."))}for(var pe=0;pe<be.length;pe++){var ge=L(be,pe,he,ue,ce+"["+pe+"]",r);if(ge instanceof Error)return ge}return null}return b(ee)}function C(){function L(ee,Ee,te,he,ue){var ce=ee[Ee];if(!a(ce)){var be=R(ce);return new h("Invalid "+he+" `"+ue+"` of type "+("`"+be+"` supplied to `"+te+"`, expected a single ReactElement."))}return null}return b(L)}function x(){function L(ee,Ee,te,he,ue){var ce=ee[Ee];if(!e.isValidElementType(ce)){var be=R(ce);return new h("Invalid "+he+" `"+ue+"` of type "+("`"+be+"` supplied to `"+te+"`, expected a single ReactElement type."))}return null}return b(L)}function H(L){function ee(Ee,te,he,ue,ce){if(!(Ee[te]instanceof L)){var be=L.name||p,_e=ve(Ee[te]);return new h("Invalid "+ue+" `"+ce+"` of type "+("`"+_e+"` supplied to `"+he+"`, expected ")+("instance of `"+be+"`."))}return null}return b(ee)}function E(L){if(!Array.isArray(L))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("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])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function ee(Ee,te,he,ue,ce){for(var be=Ee[te],_e=0;_e<L.length;_e++)if(v(be,L[_e]))return null;var pe=JSON.stringify(L,function(Ae,N){var Ue=X(N);return Ue==="symbol"?String(N):N});return new h("Invalid "+ue+" `"+ce+"` of value `"+String(be)+"` "+("supplied to `"+he+"`, expected one of "+pe+"."))}return b(ee)}function I(L){function ee(Ee,te,he,ue,ce){if(typeof L!="function")return new h("Property `"+ce+"` of component `"+he+"` has invalid PropType notation inside objectOf.");var be=Ee[te],_e=R(be);if(_e!=="object")return new h("Invalid "+ue+" `"+ce+"` of type "+("`"+_e+"` supplied to `"+he+"`, expected an object."));for(var pe in be)if(n(be,pe)){var ge=L(be,pe,he,ue,ce+"."+pe,r);if(ge instanceof Error)return ge}return null}return b(ee)}function P(L){if(!Array.isArray(L))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var ee=0;ee<L.length;ee++){var Ee=L[ee];if(typeof Ee!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+re(Ee)+" at index "+ee+"."),i}function te(he,ue,ce,be,_e){for(var pe=[],ge=0;ge<L.length;ge++){var Ae=L[ge],N=Ae(he,ue,ce,be,_e,r);if(N==null)return null;N.data&&n(N.data,"expectedType")&&pe.push(N.data.expectedType)}var Ue=pe.length>0?", expected one of type ["+pe.join(", ")+"]":"";return new h("Invalid "+be+" `"+_e+"` supplied to "+("`"+ce+"`"+Ue+"."))}return b(te)}function A(){function L(ee,Ee,te,he,ue){return W(ee[Ee])?null:new h("Invalid "+he+" `"+ue+"` supplied to "+("`"+te+"`, expected a ReactNode."))}return b(L)}function Y(L,ee,Ee,te,he){return new h((L||"React class")+": "+ee+" type `"+Ee+"."+te+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+he+"`.")}function Z(L){function ee(Ee,te,he,ue,ce){var be=Ee[te],_e=R(be);if(_e!=="object")return new h("Invalid "+ue+" `"+ce+"` of type `"+_e+"` "+("supplied to `"+he+"`, expected `object`."));for(var pe in L){var ge=L[pe];if(typeof ge!="function")return Y(he,ue,ce,pe,X(ge));var Ae=ge(be,pe,he,ue,ce+"."+pe,r);if(Ae)return Ae}return null}return b(ee)}function V(L){function ee(Ee,te,he,ue,ce){var be=Ee[te],_e=R(be);if(_e!=="object")return new h("Invalid "+ue+" `"+ce+"` of type `"+_e+"` "+("supplied to `"+he+"`, expected `object`."));var pe=t({},Ee[te],L);for(var ge in pe){var Ae=L[ge];if(n(L,ge)&&typeof Ae!="function")return Y(he,ue,ce,ge,X(Ae));if(!Ae)return new h("Invalid "+ue+" `"+ce+"` key `"+ge+"` supplied to `"+he+"`.\nBad object: "+JSON.stringify(Ee[te],null," ")+`
49
+ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var N=Ae(be,ge,he,ue,ce+"."+ge,r);if(N)return N}return null}return b(ee)}function W(L){switch(typeof L){case"number":case"string":case"undefined":return!0;case"boolean":return!L;case"object":if(Array.isArray(L))return L.every(W);if(L===null||a(L))return!0;var ee=f(L);if(ee){var Ee=ee.call(L),te;if(ee!==L.entries){for(;!(te=Ee.next()).done;)if(!W(te.value))return!1}else for(;!(te=Ee.next()).done;){var he=te.value;if(he&&!W(he[1]))return!1}}else return!1;return!0;default:return!1}}function le(L,ee){return L==="symbol"?!0:ee?ee["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&ee instanceof Symbol:!1}function R(L){var ee=typeof L;return Array.isArray(L)?"array":L instanceof RegExp?"object":le(ee,L)?"symbol":ee}function X(L){if(typeof L>"u"||L===null)return""+L;var ee=R(L);if(ee==="object"){if(L instanceof Date)return"date";if(L instanceof RegExp)return"regexp"}return ee}function re(L){var ee=X(L);switch(ee){case"array":case"object":return"an "+ee;case"boolean":case"date":case"regexp":return"a "+ee;default:return ee}}function ve(L){return!L.constructor||!L.constructor.name?p:L.constructor.name}return m.checkPropTypes=o,m.resetWarningCache=o.resetWarningCache,m.PropTypes=m,m},da}var fa,Cl;function f0(){if(Cl)return fa;Cl=1;var e=ca();function t(){}function r(){}return r.resetWarningCache=t,fa=function(){function n(i,a,c,l,d,f){if(f!==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 o(){return n}var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return s.PropTypes=s,s},fa}var El;function p0(){if(El)return vs.exports;if(El=1,process.env.NODE_ENV!=="production"){var e=vl(),t=!0;vs.exports=d0()(e.isElement,t)}else vs.exports=f0()();return vs.exports}var h0=p0();const Ne=rt(h0);function eo(e){let t="https://mui.com/production-error/?code="+e;for(let r=1;r<arguments.length;r+=1)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}const m0=Object.freeze(Object.defineProperty({__proto__:null,default:eo},Symbol.toStringTag,{value:"Module"}));var bs={exports:{}},ct={};/**
50
50
  * @license React
51
51
  * react-is.production.js
52
52
  *
@@ -54,7 +54,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var N=Pe(me,he,K,ae,ce+"
54
54
  *
55
55
  * This source code is licensed under the MIT license found in the
56
56
  * LICENSE file in the root directory of this source tree.
57
- */var El;function h0(){if(El)return it;El=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),y=Symbol.for("react.client.reference");function m(h){if(typeof h=="object"&&h!==null){var b=h.$$typeof;switch(b){case e:switch(h=h.type,h){case r:case o:case n:case c:case l:case p:return h;default:switch(h=h&&h.$$typeof,h){case i:case a:case f:case d:return h;case s:return h;default:return b}}case t:return b}}}return it.ContextConsumer=s,it.ContextProvider=i,it.Element=e,it.ForwardRef=a,it.Fragment=r,it.Lazy=f,it.Memo=d,it.Portal=t,it.Profiler=o,it.StrictMode=n,it.Suspense=c,it.SuspenseList=l,it.isContextConsumer=function(h){return m(h)===s},it.isContextProvider=function(h){return m(h)===i},it.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===e},it.isForwardRef=function(h){return m(h)===a},it.isFragment=function(h){return m(h)===r},it.isLazy=function(h){return m(h)===f},it.isMemo=function(h){return m(h)===d},it.isPortal=function(h){return m(h)===t},it.isProfiler=function(h){return m(h)===o},it.isStrictMode=function(h){return m(h)===n},it.isSuspense=function(h){return m(h)===c},it.isSuspenseList=function(h){return m(h)===l},it.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===r||h===o||h===n||h===c||h===l||typeof h=="object"&&h!==null&&(h.$$typeof===f||h.$$typeof===d||h.$$typeof===i||h.$$typeof===s||h.$$typeof===a||h.$$typeof===y||h.getModuleId!==void 0)},it.typeOf=m,it}var at={};/**
57
+ */var Dl;function g0(){if(Dl)return ct;Dl=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");function v(h){if(typeof h=="object"&&h!==null){var b=h.$$typeof;switch(b){case e:switch(h=h.type,h){case r:case o:case n:case c:case l:case p:return h;default:switch(h=h&&h.$$typeof,h){case i:case a:case f:case d:return h;case s:return h;default:return b}}case t:return b}}}return ct.ContextConsumer=s,ct.ContextProvider=i,ct.Element=e,ct.ForwardRef=a,ct.Fragment=r,ct.Lazy=f,ct.Memo=d,ct.Portal=t,ct.Profiler=o,ct.StrictMode=n,ct.Suspense=c,ct.SuspenseList=l,ct.isContextConsumer=function(h){return v(h)===s},ct.isContextProvider=function(h){return v(h)===i},ct.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===e},ct.isForwardRef=function(h){return v(h)===a},ct.isFragment=function(h){return v(h)===r},ct.isLazy=function(h){return v(h)===f},ct.isMemo=function(h){return v(h)===d},ct.isPortal=function(h){return v(h)===t},ct.isProfiler=function(h){return v(h)===o},ct.isStrictMode=function(h){return v(h)===n},ct.isSuspense=function(h){return v(h)===c},ct.isSuspenseList=function(h){return v(h)===l},ct.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===r||h===o||h===n||h===c||h===l||typeof h=="object"&&h!==null&&(h.$$typeof===f||h.$$typeof===d||h.$$typeof===i||h.$$typeof===s||h.$$typeof===a||h.$$typeof===m||h.getModuleId!==void 0)},ct.typeOf=v,ct}var lt={};/**
58
58
  * @license React
59
59
  * react-is.development.js
60
60
  *
@@ -62,37 +62,37 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var N=Pe(me,he,K,ae,ce+"
62
62
  *
63
63
  * This source code is licensed under the MIT license found in the
64
64
  * LICENSE file in the root directory of this source tree.
65
- */var kl;function m0(){return kl||(kl=1,process.env.NODE_ENV!=="production"&&(function(){function e(h){if(typeof h=="object"&&h!==null){var b=h.$$typeof;switch(b){case t:switch(h=h.type,h){case n:case s:case o:case l:case d:case y:return h;default:switch(h=h&&h.$$typeof,h){case a:case c:case p:case f:return h;case i:return h;default:return b}}case r:return b}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");at.ContextConsumer=i,at.ContextProvider=a,at.Element=t,at.ForwardRef=c,at.Fragment=n,at.Lazy=p,at.Memo=f,at.Portal=r,at.Profiler=s,at.StrictMode=o,at.Suspense=l,at.SuspenseList=d,at.isContextConsumer=function(h){return e(h)===i},at.isContextProvider=function(h){return e(h)===a},at.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===t},at.isForwardRef=function(h){return e(h)===c},at.isFragment=function(h){return e(h)===n},at.isLazy=function(h){return e(h)===p},at.isMemo=function(h){return e(h)===f},at.isPortal=function(h){return e(h)===r},at.isProfiler=function(h){return e(h)===s},at.isStrictMode=function(h){return e(h)===o},at.isSuspense=function(h){return e(h)===l},at.isSuspenseList=function(h){return e(h)===d},at.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===n||h===s||h===o||h===l||h===d||typeof h=="object"&&h!==null&&(h.$$typeof===p||h.$$typeof===f||h.$$typeof===a||h.$$typeof===i||h.$$typeof===c||h.$$typeof===m||h.getModuleId!==void 0)},at.typeOf=e})()),at}var Dl;function g0(){return Dl||(Dl=1,process.env.NODE_ENV==="production"?ys.exports=h0():ys.exports=m0()),ys.exports}var Tl=g0();const v0=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function Il(e){const t=`${e}`.match(v0);return t&&t[1]||""}function Al(e,t=""){return e.displayName||e.name||Il(e)||t}function Ml(e,t,r){const n=Al(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function y0(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Al(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Tl.ForwardRef:return Ml(e,e.render,"ForwardRef");case Tl.Memo:return Ml(e,e.type,"memo");default:return}}}const b0=Object.freeze(Object.defineProperty({__proto__:null,default:y0,getFunctionName:Il},Symbol.toStringTag,{value:"Module"}));function Zr(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Jn(7));return e.charAt(0).toUpperCase()+e.slice(1)}const _0=Object.freeze(Object.defineProperty({__proto__:null,default:Zr},Symbol.toStringTag,{value:"Module"}));function x0(...e){return e.reduce((t,r)=>r==null?t:function(...o){t.apply(this,o),r.apply(this,o)},()=>{})}function w0(e,t=166){let r;function n(...o){const s=()=>{e.apply(this,o)};clearTimeout(r),r=setTimeout(s,t)}return n.clear=()=>{clearTimeout(r)},n}function S0(e,t){return process.env.NODE_ENV==="production"?()=>null:(r,n,o,s,i)=>{const a=o||"<<anonymous>>",c=i||n;return typeof r[n]<"u"?new Error(`The ${s} \`${c}\` of \`${a}\` is deprecated. ${t}`):null}}function C0(e,t){var r,n;return X.isValidElement(e)&&t.indexOf((r=e.type.muiName)!=null?r:(n=e.type)==null||(n=n._payload)==null||(n=n.value)==null?void 0:n.muiName)!==-1}function Pl(e){return e&&e.ownerDocument||document}function E0(e){return Pl(e).defaultView||window}function k0(e,t){if(process.env.NODE_ENV==="production")return()=>null;const r=t?Ze({},t.propTypes):null;return o=>(s,i,a,c,l,...d)=>{const f=l||i,p=r?.[f];if(p){const y=p(s,i,a,c,l,...d);if(y)return y}return typeof s[i]<"u"&&!s[o]?new Error(`The prop \`${f}\` of \`${e}\` can only be used together with the \`${o}\` prop.`):null}}function Ol(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const jl=typeof window<"u"?X.useLayoutEffect:X.useEffect;let Rl=0;function D0(e){const[t,r]=X.useState(e),n=e||t;return X.useEffect(()=>{t==null&&(Rl+=1,r(`mui-${Rl}`))},[t]),n}const Nl=X.useId;function T0(e){if(Nl!==void 0){const t=Nl();return e??t}return D0(e)}function I0(e,t,r,n,o){if(process.env.NODE_ENV==="production")return null;const s=o||t;return typeof e[t]<"u"?new Error(`The prop \`${s}\` is not supported. Please remove it.`):null}function A0({controlled:e,default:t,name:r,state:n="value"}){const{current:o}=X.useRef(e!==void 0),[s,i]=X.useState(t),a=o?e:s;if(process.env.NODE_ENV!=="production"){X.useEffect(()=>{o!==(e!==void 0)&&console.error([`MUI: A component is changing the ${o?"":"un"}controlled ${n} state of ${r} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
66
- `))},[n,r,e]);const{current:l}=X.useRef(t);X.useEffect(()=>{!o&&!Object.is(l,t)&&console.error([`MUI: A component is changing the default ${n} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join(`
67
- `))},[JSON.stringify(t)])}const c=X.useCallback(l=>{o||i(l)},[]);return[a,c]}function M0(e){const t=X.useRef(e);return jl(()=>{t.current=e}),X.useRef((...r)=>(0,t.current)(...r)).current}function P0(...e){return X.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{Ol(r,t)})},e)}class da{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new da}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}}let bs=!0,fa=!1;const O0=new da,j0={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function R0(e){const{type:t,tagName:r}=e;return!!(r==="INPUT"&&j0[t]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function N0(e){e.metaKey||e.altKey||e.ctrlKey||(bs=!0)}function pa(){bs=!1}function $0(){this.visibilityState==="hidden"&&fa&&(bs=!0)}function L0(e){e.addEventListener("keydown",N0,!0),e.addEventListener("mousedown",pa,!0),e.addEventListener("pointerdown",pa,!0),e.addEventListener("touchstart",pa,!0),e.addEventListener("visibilitychange",$0,!0)}function z0(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return bs||R0(t)}function B0(){const e=X.useCallback(o=>{o!=null&&L0(o.ownerDocument)},[]),t=X.useRef(!1);function r(){return t.current?(fa=!0,O0.start(100,()=>{fa=!1}),t.current=!1,!0):!1}function n(o){return z0(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:n,onBlur:r,ref:e}}function ha(e,t){const r=Ze({},t);return Object.keys(e).forEach(n=>{if(n.toString().match(/^(components|slots)$/))r[n]=Ze({},e[n],r[n]);else if(n.toString().match(/^(componentsProps|slotProps)$/)){const o=e[n]||{},s=t[n];r[n]={},!s||!Object.keys(s)?r[n]=o:!o||!Object.keys(o)?r[n]=s:(r[n]=Ze({},s),Object.keys(o).forEach(i=>{r[n][i]=ha(o[i],s[i])}))}else r[n]===void 0&&(r[n]=e[n])}),r}function F0(e,t,r=void 0){const n={};return Object.keys(e).forEach(o=>{n[o]=e[o].reduce((s,i)=>{if(i){const a=t(i);a!==""&&s.push(a),r&&r[i]&&s.push(r[i])}return s},[]).join(" ")}),n}const $l=e=>e,Ll=(()=>{let e=$l;return{configure(t){e=t},generate(t){return e(t)},reset(){e=$l}}})(),V0={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function ma(e,t,r="Mui"){const n=V0[t];return n?`${r}-${n}`:`${Ll.generate(e)}-${t}`}function U0(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=ma(e,o,r)}),n}function W0(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}const H0=Object.freeze(Object.defineProperty({__proto__:null,default:W0},Symbol.toStringTag,{value:"Module"}));function Gr(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function zl(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=zl(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function $t(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=zl(e))&&(n&&(n+=" "),n+=t);return n}const Y0=X.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ne.node,Ne.object);function q0(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const o=t.components[r];return o.defaultProps?ha(o.defaultProps,n):!o.styleOverrides&&!o.variants?ha(o,n):n}function Z0({props:e,name:t}){const r=X.useContext(Y0);return q0({props:e,name:t,theme:{components:r}})}process.env.NODE_ENV!=="production"&&(Ne.node,Ne.object.isRequired);function G0(e){return Z0(e)}var an={},ga={exports:{}},Bl;function K0(){return Bl||(Bl=1,(function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(r){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var s in o)({}).hasOwnProperty.call(o,s)&&(r[s]=o[s])}return r},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(ga)),ga.exports}var va={exports:{}},Fl;function Q0(){return Fl||(Fl=1,(function(e){function t(r,n){if(r==null)return{};var o={};for(var s in r)if({}.hasOwnProperty.call(r,s)){if(n.indexOf(s)!==-1)continue;o[s]=r[s]}return o}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(va)),va.exports}function X0(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function J0(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var em=(function(){function e(r){var n=this;this._insertTag=function(o){var s;n.tags.length===0?n.insertionPoint?s=n.insertionPoint.nextSibling:n.prepend?s=n.container.firstChild:s=n.before:s=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(o,s),n.tags.push(o)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(J0(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=X0(o);try{s.insertRule(n,s.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var o;return(o=n.parentNode)==null?void 0:o.removeChild(n)}),this.tags=[],this.ctr=0},e})(),Vt="-ms-",_s="-moz-",He="-webkit-",Vl="comm",ya="rule",ba="decl",tm="@import",Ul="@keyframes",rm="@layer",nm=Math.abs,xs=String.fromCharCode,om=Object.assign;function sm(e,t){return Lt(e,0)^45?(((t<<2^Lt(e,0))<<2^Lt(e,1))<<2^Lt(e,2))<<2^Lt(e,3):0}function Wl(e){return e.trim()}function im(e,t){return(e=t.exec(e))?e[0]:e}function Ye(e,t,r){return e.replace(t,r)}function _a(e,t){return e.indexOf(t)}function Lt(e,t){return e.charCodeAt(t)|0}function eo(e,t,r){return e.slice(t,r)}function Dr(e){return e.length}function xa(e){return e.length}function ws(e,t){return t.push(e),e}function am(e,t){return e.map(t).join("")}var Ss=1,Cn=1,Hl=0,Gt=0,Mt=0,En="";function Cs(e,t,r,n,o,s,i){return{value:e,root:t,parent:r,type:n,props:o,children:s,line:Ss,column:Cn,length:i,return:""}}function to(e,t){return om(Cs("",null,null,"",null,null,0),e,{length:-e.length},t)}function cm(){return Mt}function lm(){return Mt=Gt>0?Lt(En,--Gt):0,Cn--,Mt===10&&(Cn=1,Ss--),Mt}function tr(){return Mt=Gt<Hl?Lt(En,Gt++):0,Cn++,Mt===10&&(Cn=1,Ss++),Mt}function Tr(){return Lt(En,Gt)}function Es(){return Gt}function ro(e,t){return eo(En,e,t)}function no(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Yl(e){return Ss=Cn=1,Hl=Dr(En=e),Gt=0,[]}function ql(e){return En="",e}function ks(e){return Wl(ro(Gt-1,wa(e===91?e+2:e===40?e+1:e)))}function um(e){for(;(Mt=Tr())&&Mt<33;)tr();return no(e)>2||no(Mt)>3?"":" "}function dm(e,t){for(;--t&&tr()&&!(Mt<48||Mt>102||Mt>57&&Mt<65||Mt>70&&Mt<97););return ro(e,Es()+(t<6&&Tr()==32&&tr()==32))}function wa(e){for(;tr();)switch(Mt){case e:return Gt;case 34:case 39:e!==34&&e!==39&&wa(Mt);break;case 40:e===41&&wa(e);break;case 92:tr();break}return Gt}function fm(e,t){for(;tr()&&e+Mt!==57;)if(e+Mt===84&&Tr()===47)break;return"/*"+ro(t,Gt-1)+"*"+xs(e===47?e:tr())}function pm(e){for(;!no(Tr());)tr();return ro(e,Gt)}function hm(e){return ql(Ds("",null,null,null,[""],e=Yl(e),0,[0],e))}function Ds(e,t,r,n,o,s,i,a,c){for(var l=0,d=0,f=i,p=0,y=0,m=0,h=1,b=1,S=1,C=0,D="",k=o,w=s,B=n,E=D;b;)switch(m=C,C=tr()){case 40:if(m!=108&&Lt(E,f-1)==58){_a(E+=Ye(ks(C),"&","&\f"),"&\f")!=-1&&(S=-1);break}case 34:case 39:case 91:E+=ks(C);break;case 9:case 10:case 13:case 32:E+=um(m);break;case 92:E+=dm(Es()-1,7);continue;case 47:switch(Tr()){case 42:case 47:ws(mm(fm(tr(),Es()),t,r),c);break;default:E+="/"}break;case 123*h:a[l++]=Dr(E)*S;case 125*h:case 59:case 0:switch(C){case 0:case 125:b=0;case 59+d:S==-1&&(E=Ye(E,/\f/g,"")),y>0&&Dr(E)-f&&ws(y>32?Gl(E+";",n,r,f-1):Gl(Ye(E," ","")+";",n,r,f-2),c);break;case 59:E+=";";default:if(ws(B=Zl(E,t,r,l,d,o,a,D,k=[],w=[],f),s),C===123)if(d===0)Ds(E,t,B,B,k,s,f,a,w);else switch(p===99&&Lt(E,3)===110?100:p){case 100:case 108:case 109:case 115:Ds(e,B,B,n&&ws(Zl(e,B,B,0,0,o,a,D,o,k=[],f),w),o,w,f,a,n?k:w);break;default:Ds(E,B,B,B,[""],w,0,a,w)}}l=d=y=0,h=S=1,D=E="",f=i;break;case 58:f=1+Dr(E),y=m;default:if(h<1){if(C==123)--h;else if(C==125&&h++==0&&lm()==125)continue}switch(E+=xs(C),C*h){case 38:S=d>0?1:(E+="\f",-1);break;case 44:a[l++]=(Dr(E)-1)*S,S=1;break;case 64:Tr()===45&&(E+=ks(tr())),p=Tr(),d=f=Dr(D=E+=pm(Es())),C++;break;case 45:m===45&&Dr(E)==2&&(h=0)}}return s}function Zl(e,t,r,n,o,s,i,a,c,l,d){for(var f=o-1,p=o===0?s:[""],y=xa(p),m=0,h=0,b=0;m<n;++m)for(var S=0,C=eo(e,f+1,f=nm(h=i[m])),D=e;S<y;++S)(D=Wl(h>0?p[S]+" "+C:Ye(C,/&\f/g,p[S])))&&(c[b++]=D);return Cs(e,t,r,o===0?ya:a,c,l,d)}function mm(e,t,r){return Cs(e,t,r,Vl,xs(cm()),eo(e,2,-2),0)}function Gl(e,t,r,n){return Cs(e,t,r,ba,eo(e,0,n),eo(e,n+1,-1),n)}function kn(e,t){for(var r="",n=xa(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function gm(e,t,r,n){switch(e.type){case rm:if(e.children.length)break;case tm:case ba:return e.return=e.return||e.value;case Vl:return"";case Ul:return e.return=e.value+"{"+kn(e.children,n)+"}";case ya:e.value=e.props.join(",")}return Dr(r=kn(e.children,n))?e.return=e.value+"{"+r+"}":""}function vm(e){var t=xa(e);return function(r,n,o,s){for(var i="",a=0;a<t;a++)i+=e[a](r,n,o,s)||"";return i}}function ym(e){return function(t){t.root||(t=t.return)&&e(t)}}function Kl(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var bm=function(t,r,n){for(var o=0,s=0;o=s,s=Tr(),o===38&&s===12&&(r[n]=1),!no(s);)tr();return ro(t,Gt)},_m=function(t,r){var n=-1,o=44;do switch(no(o)){case 0:o===38&&Tr()===12&&(r[n]=1),t[n]+=bm(Gt-1,r,n);break;case 2:t[n]+=ks(o);break;case 4:if(o===44){t[++n]=Tr()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=xs(o)}while(o=tr());return t},xm=function(t,r){return ql(_m(Yl(t),r))},Ql=new WeakMap,wm=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,o=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!Ql.get(n))&&!o){Ql.set(t,!0);for(var s=[],i=xm(r,s),a=n.props,c=0,l=0;c<i.length;c++)for(var d=0;d<a.length;d++,l++)t.props[l]=s[c]?i[c].replace(/&\f/g,a[d]):a[d]+" "+i[c]}}},Sm=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function Xl(e,t){switch(sm(e,t)){case 5103:return He+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return He+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return He+e+_s+e+Vt+e+e;case 6828:case 4268:return He+e+Vt+e+e;case 6165:return He+e+Vt+"flex-"+e+e;case 5187:return He+e+Ye(e,/(\w+).+(:[^]+)/,He+"box-$1$2"+Vt+"flex-$1$2")+e;case 5443:return He+e+Vt+"flex-item-"+Ye(e,/flex-|-self/,"")+e;case 4675:return He+e+Vt+"flex-line-pack"+Ye(e,/align-content|flex-|-self/,"")+e;case 5548:return He+e+Vt+Ye(e,"shrink","negative")+e;case 5292:return He+e+Vt+Ye(e,"basis","preferred-size")+e;case 6060:return He+"box-"+Ye(e,"-grow","")+He+e+Vt+Ye(e,"grow","positive")+e;case 4554:return He+Ye(e,/([^-])(transform)/g,"$1"+He+"$2")+e;case 6187:return Ye(Ye(Ye(e,/(zoom-|grab)/,He+"$1"),/(image-set)/,He+"$1"),e,"")+e;case 5495:case 3959:return Ye(e,/(image-set\([^]*)/,He+"$1$`$1");case 4968:return Ye(Ye(e,/(.+:)(flex-)?(.*)/,He+"box-pack:$3"+Vt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+He+e+e;case 4095:case 3583:case 4068:case 2532:return Ye(e,/(.+)-inline(.+)/,He+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Dr(e)-1-t>6)switch(Lt(e,t+1)){case 109:if(Lt(e,t+4)!==45)break;case 102:return Ye(e,/(.+:)(.+)-([^]+)/,"$1"+He+"$2-$3$1"+_s+(Lt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~_a(e,"stretch")?Xl(Ye(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Lt(e,t+1)!==115)break;case 6444:switch(Lt(e,Dr(e)-3-(~_a(e,"!important")&&10))){case 107:return Ye(e,":",":"+He)+e;case 101:return Ye(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+He+(Lt(e,14)===45?"inline-":"")+"box$3$1"+He+"$2$3$1"+Vt+"$2box$3")+e}break;case 5936:switch(Lt(e,t+11)){case 114:return He+e+Vt+Ye(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return He+e+Vt+Ye(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return He+e+Vt+Ye(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return He+e+Vt+e+e}return e}var Cm=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case ba:t.return=Xl(t.value,t.length);break;case Ul:return kn([to(t,{value:Ye(t.value,"@","@"+He)})],o);case ya:if(t.length)return am(t.props,function(s){switch(im(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return kn([to(t,{props:[Ye(s,/:(read-\w+)/,":"+_s+"$1")]})],o);case"::placeholder":return kn([to(t,{props:[Ye(s,/:(plac\w+)/,":"+He+"input-$1")]}),to(t,{props:[Ye(s,/:(plac\w+)/,":"+_s+"$1")]}),to(t,{props:[Ye(s,/:(plac\w+)/,Vt+"input-$1")]})],o)}return""})}},Em=[Cm],Jl=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(h){var b=h.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var o=t.stylisPlugins||Em,s={},i,a=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(h){for(var b=h.getAttribute("data-emotion").split(" "),S=1;S<b.length;S++)s[b[S]]=!0;a.push(h)});var c,l=[wm,Sm];{var d,f=[gm,ym(function(h){d.insert(h)})],p=vm(l.concat(o,f)),y=function(b){return kn(hm(b),p)};c=function(b,S,C,D){d=C,y(b?b+"{"+S.styles+"}":S.styles),D&&(m.inserted[S.name]=!0)}}var m={key:r,sheet:new em({key:r,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:c};return m.sheet.hydrate(a),m},Ts={exports:{}},Qe={};/** @license React v16.13.1
65
+ */var kl;function v0(){return kl||(kl=1,process.env.NODE_ENV!=="production"&&(function(){function e(h){if(typeof h=="object"&&h!==null){var b=h.$$typeof;switch(b){case t:switch(h=h.type,h){case n:case s:case o:case l:case d:case m:return h;default:switch(h=h&&h.$$typeof,h){case a:case c:case p:case f:return h;case i:return h;default:return b}}case r:return b}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),v=Symbol.for("react.client.reference");lt.ContextConsumer=i,lt.ContextProvider=a,lt.Element=t,lt.ForwardRef=c,lt.Fragment=n,lt.Lazy=p,lt.Memo=f,lt.Portal=r,lt.Profiler=s,lt.StrictMode=o,lt.Suspense=l,lt.SuspenseList=d,lt.isContextConsumer=function(h){return e(h)===i},lt.isContextProvider=function(h){return e(h)===a},lt.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===t},lt.isForwardRef=function(h){return e(h)===c},lt.isFragment=function(h){return e(h)===n},lt.isLazy=function(h){return e(h)===p},lt.isMemo=function(h){return e(h)===f},lt.isPortal=function(h){return e(h)===r},lt.isProfiler=function(h){return e(h)===s},lt.isStrictMode=function(h){return e(h)===o},lt.isSuspense=function(h){return e(h)===l},lt.isSuspenseList=function(h){return e(h)===d},lt.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===n||h===s||h===o||h===l||h===d||typeof h=="object"&&h!==null&&(h.$$typeof===p||h.$$typeof===f||h.$$typeof===a||h.$$typeof===i||h.$$typeof===c||h.$$typeof===v||h.getModuleId!==void 0)},lt.typeOf=e})()),lt}var Tl;function y0(){return Tl||(Tl=1,process.env.NODE_ENV==="production"?bs.exports=g0():bs.exports=v0()),bs.exports}var Il=y0();const b0=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function Al(e){const t=`${e}`.match(b0);return t&&t[1]||""}function Ml(e,t=""){return e.displayName||e.name||Al(e)||t}function Pl(e,t,r){const n=Ml(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function _0(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Ml(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Il.ForwardRef:return Pl(e,e.render,"ForwardRef");case Il.Memo:return Pl(e,e.type,"memo");default:return}}}const x0=Object.freeze(Object.defineProperty({__proto__:null,default:_0,getFunctionName:Al},Symbol.toStringTag,{value:"Module"}));function Zr(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":eo(7));return e.charAt(0).toUpperCase()+e.slice(1)}const w0=Object.freeze(Object.defineProperty({__proto__:null,default:Zr},Symbol.toStringTag,{value:"Module"}));function S0(...e){return e.reduce((t,r)=>r==null?t:function(...o){t.apply(this,o),r.apply(this,o)},()=>{})}function C0(e,t=166){let r;function n(...o){const s=()=>{e.apply(this,o)};clearTimeout(r),r=setTimeout(s,t)}return n.clear=()=>{clearTimeout(r)},n}function E0(e,t){return process.env.NODE_ENV==="production"?()=>null:(r,n,o,s,i)=>{const a=o||"<<anonymous>>",c=i||n;return typeof r[n]<"u"?new Error(`The ${s} \`${c}\` of \`${a}\` is deprecated. ${t}`):null}}function D0(e,t){var r,n;return J.isValidElement(e)&&t.indexOf((r=e.type.muiName)!=null?r:(n=e.type)==null||(n=n._payload)==null||(n=n.value)==null?void 0:n.muiName)!==-1}function Ol(e){return e&&e.ownerDocument||document}function k0(e){return Ol(e).defaultView||window}function T0(e,t){if(process.env.NODE_ENV==="production")return()=>null;const r=t?Ge({},t.propTypes):null;return o=>(s,i,a,c,l,...d)=>{const f=l||i,p=r?.[f];if(p){const m=p(s,i,a,c,l,...d);if(m)return m}return typeof s[i]<"u"&&!s[o]?new Error(`The prop \`${f}\` of \`${e}\` can only be used together with the \`${o}\` prop.`):null}}function jl(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const Rl=typeof window<"u"?J.useLayoutEffect:J.useEffect;let Nl=0;function I0(e){const[t,r]=J.useState(e),n=e||t;return J.useEffect(()=>{t==null&&(Nl+=1,r(`mui-${Nl}`))},[t]),n}const $l=J.useId;function A0(e){if($l!==void 0){const t=$l();return e??t}return I0(e)}function M0(e,t,r,n,o){if(process.env.NODE_ENV==="production")return null;const s=o||t;return typeof e[t]<"u"?new Error(`The prop \`${s}\` is not supported. Please remove it.`):null}function P0({controlled:e,default:t,name:r,state:n="value"}){const{current:o}=J.useRef(e!==void 0),[s,i]=J.useState(t),a=o?e:s;if(process.env.NODE_ENV!=="production"){J.useEffect(()=>{o!==(e!==void 0)&&console.error([`MUI: A component is changing the ${o?"":"un"}controlled ${n} state of ${r} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
66
+ `))},[n,r,e]);const{current:l}=J.useRef(t);J.useEffect(()=>{!o&&!Object.is(l,t)&&console.error([`MUI: A component is changing the default ${n} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join(`
67
+ `))},[JSON.stringify(t)])}const c=J.useCallback(l=>{o||i(l)},[]);return[a,c]}function O0(e){const t=J.useRef(e);return Rl(()=>{t.current=e}),J.useRef((...r)=>(0,t.current)(...r)).current}function j0(...e){return J.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{jl(r,t)})},e)}class pa{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new pa}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}}let _s=!0,ha=!1;const R0=new pa,N0={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function $0(e){const{type:t,tagName:r}=e;return!!(r==="INPUT"&&N0[t]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function L0(e){e.metaKey||e.altKey||e.ctrlKey||(_s=!0)}function ma(){_s=!1}function z0(){this.visibilityState==="hidden"&&ha&&(_s=!0)}function B0(e){e.addEventListener("keydown",L0,!0),e.addEventListener("mousedown",ma,!0),e.addEventListener("pointerdown",ma,!0),e.addEventListener("touchstart",ma,!0),e.addEventListener("visibilitychange",z0,!0)}function F0(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return _s||$0(t)}function V0(){const e=J.useCallback(o=>{o!=null&&B0(o.ownerDocument)},[]),t=J.useRef(!1);function r(){return t.current?(ha=!0,R0.start(100,()=>{ha=!1}),t.current=!1,!0):!1}function n(o){return F0(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:n,onBlur:r,ref:e}}function ga(e,t){const r=Ge({},t);return Object.keys(e).forEach(n=>{if(n.toString().match(/^(components|slots)$/))r[n]=Ge({},e[n],r[n]);else if(n.toString().match(/^(componentsProps|slotProps)$/)){const o=e[n]||{},s=t[n];r[n]={},!s||!Object.keys(s)?r[n]=o:!o||!Object.keys(o)?r[n]=s:(r[n]=Ge({},s),Object.keys(o).forEach(i=>{r[n][i]=ga(o[i],s[i])}))}else r[n]===void 0&&(r[n]=e[n])}),r}function U0(e,t,r=void 0){const n={};return Object.keys(e).forEach(o=>{n[o]=e[o].reduce((s,i)=>{if(i){const a=t(i);a!==""&&s.push(a),r&&r[i]&&s.push(r[i])}return s},[]).join(" ")}),n}const Ll=e=>e,zl=(()=>{let e=Ll;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Ll}}})(),H0={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function va(e,t,r="Mui"){const n=H0[t];return n?`${r}-${n}`:`${zl.generate(e)}-${t}`}function W0(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=va(e,o,r)}),n}function Y0(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}const q0=Object.freeze(Object.defineProperty({__proto__:null,default:Y0},Symbol.toStringTag,{value:"Module"}));function Gr(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Bl(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Bl(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Lt(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Bl(e))&&(n&&(n+=" "),n+=t);return n}const Z0=J.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ne.node,Ne.object);function G0(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const o=t.components[r];return o.defaultProps?ga(o.defaultProps,n):!o.styleOverrides&&!o.variants?ga(o,n):n}function K0({props:e,name:t}){const r=J.useContext(Z0);return G0({props:e,name:t,theme:{components:r}})}process.env.NODE_ENV!=="production"&&(Ne.node,Ne.object.isRequired);function Q0(e){return K0(e)}var cn={},ya={exports:{}},Fl;function X0(){return Fl||(Fl=1,(function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(r){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var s in o)({}).hasOwnProperty.call(o,s)&&(r[s]=o[s])}return r},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(ya)),ya.exports}var ba={exports:{}},Vl;function J0(){return Vl||(Vl=1,(function(e){function t(r,n){if(r==null)return{};var o={};for(var s in r)if({}.hasOwnProperty.call(r,s)){if(n.indexOf(s)!==-1)continue;o[s]=r[s]}return o}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(ba)),ba.exports}function em(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function tm(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var rm=(function(){function e(r){var n=this;this._insertTag=function(o){var s;n.tags.length===0?n.insertionPoint?s=n.insertionPoint.nextSibling:n.prepend?s=n.container.firstChild:s=n.before:s=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(o,s),n.tags.push(o)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(tm(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=em(o);try{s.insertRule(n,s.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var o;return(o=n.parentNode)==null?void 0:o.removeChild(n)}),this.tags=[],this.ctr=0},e})(),Vt="-ms-",xs="-moz-",Ye="-webkit-",Ul="comm",_a="rule",xa="decl",nm="@import",Hl="@keyframes",om="@layer",sm=Math.abs,ws=String.fromCharCode,im=Object.assign;function am(e,t){return zt(e,0)^45?(((t<<2^zt(e,0))<<2^zt(e,1))<<2^zt(e,2))<<2^zt(e,3):0}function Wl(e){return e.trim()}function cm(e,t){return(e=t.exec(e))?e[0]:e}function qe(e,t,r){return e.replace(t,r)}function wa(e,t){return e.indexOf(t)}function zt(e,t){return e.charCodeAt(t)|0}function to(e,t,r){return e.slice(t,r)}function Tr(e){return e.length}function Sa(e){return e.length}function Ss(e,t){return t.push(e),e}function lm(e,t){return e.map(t).join("")}var Cs=1,En=1,Yl=0,Kt=0,Pt=0,Dn="";function Es(e,t,r,n,o,s,i){return{value:e,root:t,parent:r,type:n,props:o,children:s,line:Cs,column:En,length:i,return:""}}function ro(e,t){return im(Es("",null,null,"",null,null,0),e,{length:-e.length},t)}function um(){return Pt}function dm(){return Pt=Kt>0?zt(Dn,--Kt):0,En--,Pt===10&&(En=1,Cs--),Pt}function rr(){return Pt=Kt<Yl?zt(Dn,Kt++):0,En++,Pt===10&&(En=1,Cs++),Pt}function Ir(){return zt(Dn,Kt)}function Ds(){return Kt}function no(e,t){return to(Dn,e,t)}function oo(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ql(e){return Cs=En=1,Yl=Tr(Dn=e),Kt=0,[]}function Zl(e){return Dn="",e}function ks(e){return Wl(no(Kt-1,Ca(e===91?e+2:e===40?e+1:e)))}function fm(e){for(;(Pt=Ir())&&Pt<33;)rr();return oo(e)>2||oo(Pt)>3?"":" "}function pm(e,t){for(;--t&&rr()&&!(Pt<48||Pt>102||Pt>57&&Pt<65||Pt>70&&Pt<97););return no(e,Ds()+(t<6&&Ir()==32&&rr()==32))}function Ca(e){for(;rr();)switch(Pt){case e:return Kt;case 34:case 39:e!==34&&e!==39&&Ca(Pt);break;case 40:e===41&&Ca(e);break;case 92:rr();break}return Kt}function hm(e,t){for(;rr()&&e+Pt!==57;)if(e+Pt===84&&Ir()===47)break;return"/*"+no(t,Kt-1)+"*"+ws(e===47?e:rr())}function mm(e){for(;!oo(Ir());)rr();return no(e,Kt)}function gm(e){return Zl(Ts("",null,null,null,[""],e=ql(e),0,[0],e))}function Ts(e,t,r,n,o,s,i,a,c){for(var l=0,d=0,f=i,p=0,m=0,v=0,h=1,b=1,w=1,S=0,k="",C=o,x=s,H=n,E=k;b;)switch(v=S,S=rr()){case 40:if(v!=108&&zt(E,f-1)==58){wa(E+=qe(ks(S),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:E+=ks(S);break;case 9:case 10:case 13:case 32:E+=fm(v);break;case 92:E+=pm(Ds()-1,7);continue;case 47:switch(Ir()){case 42:case 47:Ss(vm(hm(rr(),Ds()),t,r),c);break;default:E+="/"}break;case 123*h:a[l++]=Tr(E)*w;case 125*h:case 59:case 0:switch(S){case 0:case 125:b=0;case 59+d:w==-1&&(E=qe(E,/\f/g,"")),m>0&&Tr(E)-f&&Ss(m>32?Kl(E+";",n,r,f-1):Kl(qe(E," ","")+";",n,r,f-2),c);break;case 59:E+=";";default:if(Ss(H=Gl(E,t,r,l,d,o,a,k,C=[],x=[],f),s),S===123)if(d===0)Ts(E,t,H,H,C,s,f,a,x);else switch(p===99&&zt(E,3)===110?100:p){case 100:case 108:case 109:case 115:Ts(e,H,H,n&&Ss(Gl(e,H,H,0,0,o,a,k,o,C=[],f),x),o,x,f,a,n?C:x);break;default:Ts(E,H,H,H,[""],x,0,a,x)}}l=d=m=0,h=w=1,k=E="",f=i;break;case 58:f=1+Tr(E),m=v;default:if(h<1){if(S==123)--h;else if(S==125&&h++==0&&dm()==125)continue}switch(E+=ws(S),S*h){case 38:w=d>0?1:(E+="\f",-1);break;case 44:a[l++]=(Tr(E)-1)*w,w=1;break;case 64:Ir()===45&&(E+=ks(rr())),p=Ir(),d=f=Tr(k=E+=mm(Ds())),S++;break;case 45:v===45&&Tr(E)==2&&(h=0)}}return s}function Gl(e,t,r,n,o,s,i,a,c,l,d){for(var f=o-1,p=o===0?s:[""],m=Sa(p),v=0,h=0,b=0;v<n;++v)for(var w=0,S=to(e,f+1,f=sm(h=i[v])),k=e;w<m;++w)(k=Wl(h>0?p[w]+" "+S:qe(S,/&\f/g,p[w])))&&(c[b++]=k);return Es(e,t,r,o===0?_a:a,c,l,d)}function vm(e,t,r){return Es(e,t,r,Ul,ws(um()),to(e,2,-2),0)}function Kl(e,t,r,n){return Es(e,t,r,xa,to(e,0,n),to(e,n+1,-1),n)}function kn(e,t){for(var r="",n=Sa(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function ym(e,t,r,n){switch(e.type){case om:if(e.children.length)break;case nm:case xa:return e.return=e.return||e.value;case Ul:return"";case Hl:return e.return=e.value+"{"+kn(e.children,n)+"}";case _a:e.value=e.props.join(",")}return Tr(r=kn(e.children,n))?e.return=e.value+"{"+r+"}":""}function bm(e){var t=Sa(e);return function(r,n,o,s){for(var i="",a=0;a<t;a++)i+=e[a](r,n,o,s)||"";return i}}function _m(e){return function(t){t.root||(t=t.return)&&e(t)}}function Ql(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var xm=function(t,r,n){for(var o=0,s=0;o=s,s=Ir(),o===38&&s===12&&(r[n]=1),!oo(s);)rr();return no(t,Kt)},wm=function(t,r){var n=-1,o=44;do switch(oo(o)){case 0:o===38&&Ir()===12&&(r[n]=1),t[n]+=xm(Kt-1,r,n);break;case 2:t[n]+=ks(o);break;case 4:if(o===44){t[++n]=Ir()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=ws(o)}while(o=rr());return t},Sm=function(t,r){return Zl(wm(ql(t),r))},Xl=new WeakMap,Cm=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,o=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!Xl.get(n))&&!o){Xl.set(t,!0);for(var s=[],i=Sm(r,s),a=n.props,c=0,l=0;c<i.length;c++)for(var d=0;d<a.length;d++,l++)t.props[l]=s[c]?i[c].replace(/&\f/g,a[d]):a[d]+" "+i[c]}}},Em=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function Jl(e,t){switch(am(e,t)){case 5103:return Ye+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ye+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ye+e+xs+e+Vt+e+e;case 6828:case 4268:return Ye+e+Vt+e+e;case 6165:return Ye+e+Vt+"flex-"+e+e;case 5187:return Ye+e+qe(e,/(\w+).+(:[^]+)/,Ye+"box-$1$2"+Vt+"flex-$1$2")+e;case 5443:return Ye+e+Vt+"flex-item-"+qe(e,/flex-|-self/,"")+e;case 4675:return Ye+e+Vt+"flex-line-pack"+qe(e,/align-content|flex-|-self/,"")+e;case 5548:return Ye+e+Vt+qe(e,"shrink","negative")+e;case 5292:return Ye+e+Vt+qe(e,"basis","preferred-size")+e;case 6060:return Ye+"box-"+qe(e,"-grow","")+Ye+e+Vt+qe(e,"grow","positive")+e;case 4554:return Ye+qe(e,/([^-])(transform)/g,"$1"+Ye+"$2")+e;case 6187:return qe(qe(qe(e,/(zoom-|grab)/,Ye+"$1"),/(image-set)/,Ye+"$1"),e,"")+e;case 5495:case 3959:return qe(e,/(image-set\([^]*)/,Ye+"$1$`$1");case 4968:return qe(qe(e,/(.+:)(flex-)?(.*)/,Ye+"box-pack:$3"+Vt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ye+e+e;case 4095:case 3583:case 4068:case 2532:return qe(e,/(.+)-inline(.+)/,Ye+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Tr(e)-1-t>6)switch(zt(e,t+1)){case 109:if(zt(e,t+4)!==45)break;case 102:return qe(e,/(.+:)(.+)-([^]+)/,"$1"+Ye+"$2-$3$1"+xs+(zt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~wa(e,"stretch")?Jl(qe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(zt(e,t+1)!==115)break;case 6444:switch(zt(e,Tr(e)-3-(~wa(e,"!important")&&10))){case 107:return qe(e,":",":"+Ye)+e;case 101:return qe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ye+(zt(e,14)===45?"inline-":"")+"box$3$1"+Ye+"$2$3$1"+Vt+"$2box$3")+e}break;case 5936:switch(zt(e,t+11)){case 114:return Ye+e+Vt+qe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ye+e+Vt+qe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ye+e+Vt+qe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ye+e+Vt+e+e}return e}var Dm=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case xa:t.return=Jl(t.value,t.length);break;case Hl:return kn([ro(t,{value:qe(t.value,"@","@"+Ye)})],o);case _a:if(t.length)return lm(t.props,function(s){switch(cm(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return kn([ro(t,{props:[qe(s,/:(read-\w+)/,":"+xs+"$1")]})],o);case"::placeholder":return kn([ro(t,{props:[qe(s,/:(plac\w+)/,":"+Ye+"input-$1")]}),ro(t,{props:[qe(s,/:(plac\w+)/,":"+xs+"$1")]}),ro(t,{props:[qe(s,/:(plac\w+)/,Vt+"input-$1")]})],o)}return""})}},km=[Dm],eu=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(h){var b=h.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var o=t.stylisPlugins||km,s={},i,a=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(h){for(var b=h.getAttribute("data-emotion").split(" "),w=1;w<b.length;w++)s[b[w]]=!0;a.push(h)});var c,l=[Cm,Em];{var d,f=[ym,_m(function(h){d.insert(h)})],p=bm(l.concat(o,f)),m=function(b){return kn(gm(b),p)};c=function(b,w,S,k){d=S,m(b?b+"{"+w.styles+"}":w.styles),k&&(v.inserted[w.name]=!0)}}var v={key:r,sheet:new rm({key:r,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:c};return v.sheet.hydrate(a),v},Is={exports:{}},Xe={};/** @license React v16.13.1
68
68
  * react-is.production.min.js
69
69
  *
70
70
  * Copyright (c) Facebook, Inc. and its affiliates.
71
71
  *
72
72
  * This source code is licensed under the MIT license found in the
73
73
  * LICENSE file in the root directory of this source tree.
74
- */var eu;function km(){if(eu)return Qe;eu=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,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function D(w){if(typeof w=="object"&&w!==null){var B=w.$$typeof;switch(B){case t:switch(w=w.type,w){case c:case l:case n:case s:case o:case f:return w;default:switch(w=w&&w.$$typeof,w){case a:case d:case m:case y:case i:return w;default:return B}}case r:return B}}}function k(w){return D(w)===l}return Qe.AsyncMode=c,Qe.ConcurrentMode=l,Qe.ContextConsumer=a,Qe.ContextProvider=i,Qe.Element=t,Qe.ForwardRef=d,Qe.Fragment=n,Qe.Lazy=m,Qe.Memo=y,Qe.Portal=r,Qe.Profiler=s,Qe.StrictMode=o,Qe.Suspense=f,Qe.isAsyncMode=function(w){return k(w)||D(w)===c},Qe.isConcurrentMode=k,Qe.isContextConsumer=function(w){return D(w)===a},Qe.isContextProvider=function(w){return D(w)===i},Qe.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Qe.isForwardRef=function(w){return D(w)===d},Qe.isFragment=function(w){return D(w)===n},Qe.isLazy=function(w){return D(w)===m},Qe.isMemo=function(w){return D(w)===y},Qe.isPortal=function(w){return D(w)===r},Qe.isProfiler=function(w){return D(w)===s},Qe.isStrictMode=function(w){return D(w)===o},Qe.isSuspense=function(w){return D(w)===f},Qe.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===n||w===l||w===s||w===o||w===f||w===p||typeof w=="object"&&w!==null&&(w.$$typeof===m||w.$$typeof===y||w.$$typeof===i||w.$$typeof===a||w.$$typeof===d||w.$$typeof===b||w.$$typeof===S||w.$$typeof===C||w.$$typeof===h)},Qe.typeOf=D,Qe}var Xe={};/** @license React v16.13.1
74
+ */var tu;function Tm(){if(tu)return Xe;tu=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,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function k(x){if(typeof x=="object"&&x!==null){var H=x.$$typeof;switch(H){case t:switch(x=x.type,x){case c:case l:case n:case s:case o:case f:return x;default:switch(x=x&&x.$$typeof,x){case a:case d:case v:case m:case i:return x;default:return H}}case r:return H}}}function C(x){return k(x)===l}return Xe.AsyncMode=c,Xe.ConcurrentMode=l,Xe.ContextConsumer=a,Xe.ContextProvider=i,Xe.Element=t,Xe.ForwardRef=d,Xe.Fragment=n,Xe.Lazy=v,Xe.Memo=m,Xe.Portal=r,Xe.Profiler=s,Xe.StrictMode=o,Xe.Suspense=f,Xe.isAsyncMode=function(x){return C(x)||k(x)===c},Xe.isConcurrentMode=C,Xe.isContextConsumer=function(x){return k(x)===a},Xe.isContextProvider=function(x){return k(x)===i},Xe.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===t},Xe.isForwardRef=function(x){return k(x)===d},Xe.isFragment=function(x){return k(x)===n},Xe.isLazy=function(x){return k(x)===v},Xe.isMemo=function(x){return k(x)===m},Xe.isPortal=function(x){return k(x)===r},Xe.isProfiler=function(x){return k(x)===s},Xe.isStrictMode=function(x){return k(x)===o},Xe.isSuspense=function(x){return k(x)===f},Xe.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===n||x===l||x===s||x===o||x===f||x===p||typeof x=="object"&&x!==null&&(x.$$typeof===v||x.$$typeof===m||x.$$typeof===i||x.$$typeof===a||x.$$typeof===d||x.$$typeof===b||x.$$typeof===w||x.$$typeof===S||x.$$typeof===h)},Xe.typeOf=k,Xe}var Je={};/** @license React v16.13.1
75
75
  * react-is.development.js
76
76
  *
77
77
  * Copyright (c) Facebook, Inc. and its affiliates.
78
78
  *
79
79
  * This source code is licensed under the MIT license found in the
80
80
  * LICENSE file in the root directory of this source tree.
81
- */var tu;function Dm(){return tu||(tu=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,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function D(N){return typeof N=="string"||typeof N=="function"||N===n||N===l||N===s||N===o||N===f||N===p||typeof N=="object"&&N!==null&&(N.$$typeof===m||N.$$typeof===y||N.$$typeof===i||N.$$typeof===a||N.$$typeof===d||N.$$typeof===b||N.$$typeof===S||N.$$typeof===C||N.$$typeof===h)}function k(N){if(typeof N=="object"&&N!==null){var Ve=N.$$typeof;switch(Ve){case t:var et=N.type;switch(et){case c:case l:case n:case s:case o:case f:return et;default:var Ue=et&&et.$$typeof;switch(Ue){case a:case d:case m:case y:case i:return Ue;default:return Ve}}case r:return Ve}}}var w=c,B=l,E=a,I=i,P=t,A=d,W=n,q=m,F=y,Z=r,le=s,V=o,ee=f,ue=!1;function ye(N){return ue||(ue=!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.")),L(N)||k(N)===c}function L(N){return k(N)===l}function te(N){return k(N)===a}function J(N){return k(N)===i}function H(N){return typeof N=="object"&&N!==null&&N.$$typeof===t}function K(N){return k(N)===d}function ae(N){return k(N)===n}function ce(N){return k(N)===m}function me(N){return k(N)===y}function ge(N){return k(N)===r}function fe(N){return k(N)===s}function he(N){return k(N)===o}function Pe(N){return k(N)===f}Xe.AsyncMode=w,Xe.ConcurrentMode=B,Xe.ContextConsumer=E,Xe.ContextProvider=I,Xe.Element=P,Xe.ForwardRef=A,Xe.Fragment=W,Xe.Lazy=q,Xe.Memo=F,Xe.Portal=Z,Xe.Profiler=le,Xe.StrictMode=V,Xe.Suspense=ee,Xe.isAsyncMode=ye,Xe.isConcurrentMode=L,Xe.isContextConsumer=te,Xe.isContextProvider=J,Xe.isElement=H,Xe.isForwardRef=K,Xe.isFragment=ae,Xe.isLazy=ce,Xe.isMemo=me,Xe.isPortal=ge,Xe.isProfiler=fe,Xe.isStrictMode=he,Xe.isSuspense=Pe,Xe.isValidElementType=D,Xe.typeOf=k})()),Xe}var ru;function Tm(){return ru||(ru=1,process.env.NODE_ENV==="production"?Ts.exports=km():Ts.exports=Dm()),Ts.exports}var Sa,nu;function Im(){if(nu)return Sa;nu=1;var e=Tm(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[e.ForwardRef]=n,s[e.Memo]=o;function i(m){return e.isMemo(m)?o:s[m.$$typeof]||t}var a=Object.defineProperty,c=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;function y(m,h,b){if(typeof h!="string"){if(p){var S=f(h);S&&S!==p&&y(m,S,b)}var C=c(h);l&&(C=C.concat(l(h)));for(var D=i(m),k=i(h),w=0;w<C.length;++w){var B=C[w];if(!r[B]&&!(b&&b[B])&&!(k&&k[B])&&!(D&&D[B])){var E=d(h,B);try{a(m,B,E)}catch{}}}}return m}return Sa=y,Sa}Im();var Am=!0;function ou(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(n+=o+" ")}),n}var Ca=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||Am===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},Ea=function(t,r,n){Ca(t,r,n);var o=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var s=r;do t.insert(r===s?"."+o:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function Mm(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Pm={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Om=/[A-Z]|^ms/g,jm=/_EMO_([^_]+?)_([^]*?)_EMO_/g,su=function(t){return t.charCodeAt(1)===45},iu=function(t){return t!=null&&typeof t!="boolean"},ka=Kl(function(e){return su(e)?e:e.replace(Om,"-$&").toLowerCase()}),au=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(jm,function(n,o,s){return Ir={name:o,styles:s,next:Ir},o})}return Pm[t]!==1&&!su(t)&&typeof r=="number"&&r!==0?r+"px":r};function oo(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return Ir={name:o.name,styles:o.styles,next:Ir},o.name;var s=r;if(s.styles!==void 0){var i=s.next;if(i!==void 0)for(;i!==void 0;)Ir={name:i.name,styles:i.styles,next:Ir},i=i.next;var a=s.styles+";";return a}return Rm(e,t,r)}case"function":{if(e!==void 0){var c=Ir,l=r(e);return Ir=c,oo(e,t,l)}break}}var d=r;if(t==null)return d;var f=t[d];return f!==void 0?f:d}function Rm(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=oo(e,t,r[o])+";";else for(var s in r){var i=r[s];if(typeof i!="object"){var a=i;t!=null&&t[a]!==void 0?n+=s+"{"+t[a]+"}":iu(a)&&(n+=ka(s)+":"+au(s,a)+";")}else if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var c=0;c<i.length;c++)iu(i[c])&&(n+=ka(s)+":"+au(s,i[c])+";");else{var l=oo(e,t,i);switch(s){case"animation":case"animationName":{n+=ka(s)+":"+l+";";break}default:n+=s+"{"+l+"}"}}}return n}var cu=/label:\s*([^\s;{]+)\s*(;|$)/g,Ir;function so(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";Ir=void 0;var s=e[0];if(s==null||s.raw===void 0)n=!1,o+=oo(r,t,s);else{var i=s;o+=i[0]}for(var a=1;a<e.length;a++)if(o+=oo(r,t,e[a]),n){var c=s;o+=c[a]}cu.lastIndex=0;for(var l="",d;(d=cu.exec(o))!==null;)l+="-"+d[1];var f=Mm(o)+l;return{name:f,styles:o,next:Ir}}var Nm=function(t){return t()},lu=X.useInsertionEffect?X.useInsertionEffect:!1,uu=lu||Nm,du=lu||X.useLayoutEffect,fu=X.createContext(typeof HTMLElement<"u"?Jl({key:"css"}):null),$m=fu.Provider,Da=function(t){return v.forwardRef(function(r,n){var o=v.useContext(fu);return t(r,o,n)})},Is=X.createContext({}),Ta={}.hasOwnProperty,Ia="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Lm=function(t,r){var n={};for(var o in r)Ta.call(r,o)&&(n[o]=r[o]);return n[Ia]=t,n},zm=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return Ca(r,n,o),uu(function(){return Ea(r,n,o)}),null},Bm=Da(function(e,t,r){var n=e.css;typeof n=="string"&&t.registered[n]!==void 0&&(n=t.registered[n]);var o=e[Ia],s=[n],i="";typeof e.className=="string"?i=ou(t.registered,s,e.className):e.className!=null&&(i=e.className+" ");var a=so(s,void 0,X.useContext(Is));i+=t.key+"-"+a.name;var c={};for(var l in e)Ta.call(e,l)&&l!=="css"&&l!==Ia&&(c[l]=e[l]);return c.className=i,r&&(c.ref=r),X.createElement(X.Fragment,null,X.createElement(zm,{cache:t,serialized:a,isStringTag:typeof o=="string"}),X.createElement(o,c))}),Fm=Bm,pu=function(t,r){var n=arguments;if(r==null||!Ta.call(r,"css"))return X.createElement.apply(void 0,n);var o=n.length,s=new Array(o);s[0]=Fm,s[1]=Lm(t,r);for(var i=2;i<o;i++)s[i]=n[i];return X.createElement.apply(null,s)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(pu||(pu={}));var Vm=Da(function(e,t){var r=e.styles,n=so([r],void 0,X.useContext(Is)),o=X.useRef();return du(function(){var s=t.key+"-global",i=new t.sheet.constructor({key:s,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),a=!1,c=document.querySelector('style[data-emotion="'+s+" "+n.name+'"]');return t.sheet.tags.length&&(i.before=t.sheet.tags[0]),c!==null&&(a=!0,c.setAttribute("data-emotion",s),i.hydrate([c])),o.current=[i,a],function(){i.flush()}},[t]),du(function(){var s=o.current,i=s[0],a=s[1];if(a){s[1]=!1;return}if(n.next!==void 0&&Ea(t,n.next,!0),i.tags.length){var c=i.tags[i.tags.length-1].nextElementSibling;i.before=c,i.flush()}t.insert("",n,i,!1)},[t,n.name]),null});function hu(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return so(t)}function Um(){var e=hu.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var Wm=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Hm=Kl(function(e){return Wm.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Ym=Hm,qm=function(t){return t!=="theme"},mu=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Ym:qm},gu=function(t,r,n){var o;if(r){var s=r.shouldForwardProp;o=t.__emotion_forwardProp&&s?function(i){return t.__emotion_forwardProp(i)&&s(i)}:s}return typeof o!="function"&&n&&(o=t.__emotion_forwardProp),o},Zm=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return Ca(r,n,o),uu(function(){return Ea(r,n,o)}),null},Gm=function e(t,r){var n=t.__emotion_real===t,o=n&&t.__emotion_base||t,s,i;r!==void 0&&(s=r.label,i=r.target);var a=gu(t,r,n),c=a||mu(o),l=!c("as");return function(){var d=arguments,f=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(s!==void 0&&f.push("label:"+s+";"),d[0]==null||d[0].raw===void 0)f.push.apply(f,d);else{var p=d[0];f.push(p[0]);for(var y=d.length,m=1;m<y;m++)f.push(d[m],p[m])}var h=Da(function(b,S,C){var D=l&&b.as||o,k="",w=[],B=b;if(b.theme==null){B={};for(var E in b)B[E]=b[E];B.theme=X.useContext(Is)}typeof b.className=="string"?k=ou(S.registered,w,b.className):b.className!=null&&(k=b.className+" ");var I=so(f.concat(w),S.registered,B);k+=S.key+"-"+I.name,i!==void 0&&(k+=" "+i);var P=l&&a===void 0?mu(D):c,A={};for(var W in b)l&&W==="as"||P(W)&&(A[W]=b[W]);return A.className=k,C&&(A.ref=C),X.createElement(X.Fragment,null,X.createElement(Zm,{cache:S,serialized:I,isStringTag:typeof D=="string"}),X.createElement(D,A))});return h.displayName=s!==void 0?s:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=o,h.__emotion_styles=f,h.__emotion_forwardProp=a,Object.defineProperty(h,"toString",{value:function(){return"."+i}}),h.withComponent=function(b,S){var C=e(b,Ze({},r,S,{shouldForwardProp:gu(h,S,!0)}));return C.apply(void 0,f)},h}},Km=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Aa=Gm.bind(null);Km.forEach(function(e){Aa[e]=Aa(e)});function Qm(e,t){const r=Jl({key:"css",prepend:e});if(t){const n=r.insert;r.insert=(...o)=>(o[1].styles.match(/^@layer\s+[^{]*$/)||(o[1].styles=`@layer mui {${o[1].styles}}`),n(...o))}return r}const Ma=new Map;function vu(e){const{injectFirst:t,enableCssLayer:r,children:n}=e,o=X.useMemo(()=>{const s=`${t}-${r}`;if(typeof document=="object"&&Ma.has(s))return Ma.get(s);const i=Qm(t,r);return Ma.set(s,i),i},[t,r]);return t||r?u.jsx($m,{value:o,children:n}):n}process.env.NODE_ENV!=="production"&&(vu.propTypes={children:Ne.node,enableCssLayer:Ne.bool,injectFirst:Ne.bool});function Xm(e){return e==null||Object.keys(e).length===0}function yu(e){const{styles:t,defaultTheme:r={}}=e,n=typeof t=="function"?o=>t(Xm(o)?r:o):t;return u.jsx(Vm,{styles:n})}process.env.NODE_ENV!=="production"&&(yu.propTypes={defaultTheme:Ne.object,styles:Ne.oneOfType([Ne.array,Ne.string,Ne.object,Ne.func])});/**
81
+ */var ru;function Im(){return ru||(ru=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,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function k(N){return typeof N=="string"||typeof N=="function"||N===n||N===l||N===s||N===o||N===f||N===p||typeof N=="object"&&N!==null&&(N.$$typeof===v||N.$$typeof===m||N.$$typeof===i||N.$$typeof===a||N.$$typeof===d||N.$$typeof===b||N.$$typeof===w||N.$$typeof===S||N.$$typeof===h)}function C(N){if(typeof N=="object"&&N!==null){var Ue=N.$$typeof;switch(Ue){case t:var tt=N.type;switch(tt){case c:case l:case n:case s:case o:case f:return tt;default:var He=tt&&tt.$$typeof;switch(He){case a:case d:case v:case m:case i:return He;default:return Ue}}case r:return Ue}}}var x=c,H=l,E=a,I=i,P=t,A=d,Y=n,Z=v,V=m,W=r,le=s,R=o,X=f,re=!1;function ve(N){return re||(re=!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.")),L(N)||C(N)===c}function L(N){return C(N)===l}function ee(N){return C(N)===a}function Ee(N){return C(N)===i}function te(N){return typeof N=="object"&&N!==null&&N.$$typeof===t}function he(N){return C(N)===d}function ue(N){return C(N)===n}function ce(N){return C(N)===v}function be(N){return C(N)===m}function _e(N){return C(N)===r}function pe(N){return C(N)===s}function ge(N){return C(N)===o}function Ae(N){return C(N)===f}Je.AsyncMode=x,Je.ConcurrentMode=H,Je.ContextConsumer=E,Je.ContextProvider=I,Je.Element=P,Je.ForwardRef=A,Je.Fragment=Y,Je.Lazy=Z,Je.Memo=V,Je.Portal=W,Je.Profiler=le,Je.StrictMode=R,Je.Suspense=X,Je.isAsyncMode=ve,Je.isConcurrentMode=L,Je.isContextConsumer=ee,Je.isContextProvider=Ee,Je.isElement=te,Je.isForwardRef=he,Je.isFragment=ue,Je.isLazy=ce,Je.isMemo=be,Je.isPortal=_e,Je.isProfiler=pe,Je.isStrictMode=ge,Je.isSuspense=Ae,Je.isValidElementType=k,Je.typeOf=C})()),Je}var nu;function Am(){return nu||(nu=1,process.env.NODE_ENV==="production"?Is.exports=Tm():Is.exports=Im()),Is.exports}var Ea,ou;function Mm(){if(ou)return Ea;ou=1;var e=Am(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[e.ForwardRef]=n,s[e.Memo]=o;function i(v){return e.isMemo(v)?o:s[v.$$typeof]||t}var a=Object.defineProperty,c=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;function m(v,h,b){if(typeof h!="string"){if(p){var w=f(h);w&&w!==p&&m(v,w,b)}var S=c(h);l&&(S=S.concat(l(h)));for(var k=i(v),C=i(h),x=0;x<S.length;++x){var H=S[x];if(!r[H]&&!(b&&b[H])&&!(C&&C[H])&&!(k&&k[H])){var E=d(h,H);try{a(v,H,E)}catch{}}}}return v}return Ea=m,Ea}Mm();var Pm=!0;function su(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(n+=o+" ")}),n}var Da=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||Pm===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},ka=function(t,r,n){Da(t,r,n);var o=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var s=r;do t.insert(r===s?"."+o:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function Om(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var jm={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Rm=/[A-Z]|^ms/g,Nm=/_EMO_([^_]+?)_([^]*?)_EMO_/g,iu=function(t){return t.charCodeAt(1)===45},au=function(t){return t!=null&&typeof t!="boolean"},Ta=Ql(function(e){return iu(e)?e:e.replace(Rm,"-$&").toLowerCase()}),cu=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Nm,function(n,o,s){return Ar={name:o,styles:s,next:Ar},o})}return jm[t]!==1&&!iu(t)&&typeof r=="number"&&r!==0?r+"px":r};function so(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return Ar={name:o.name,styles:o.styles,next:Ar},o.name;var s=r;if(s.styles!==void 0){var i=s.next;if(i!==void 0)for(;i!==void 0;)Ar={name:i.name,styles:i.styles,next:Ar},i=i.next;var a=s.styles+";";return a}return $m(e,t,r)}case"function":{if(e!==void 0){var c=Ar,l=r(e);return Ar=c,so(e,t,l)}break}}var d=r;if(t==null)return d;var f=t[d];return f!==void 0?f:d}function $m(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=so(e,t,r[o])+";";else for(var s in r){var i=r[s];if(typeof i!="object"){var a=i;t!=null&&t[a]!==void 0?n+=s+"{"+t[a]+"}":au(a)&&(n+=Ta(s)+":"+cu(s,a)+";")}else if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var c=0;c<i.length;c++)au(i[c])&&(n+=Ta(s)+":"+cu(s,i[c])+";");else{var l=so(e,t,i);switch(s){case"animation":case"animationName":{n+=Ta(s)+":"+l+";";break}default:n+=s+"{"+l+"}"}}}return n}var lu=/label:\s*([^\s;{]+)\s*(;|$)/g,Ar;function io(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";Ar=void 0;var s=e[0];if(s==null||s.raw===void 0)n=!1,o+=so(r,t,s);else{var i=s;o+=i[0]}for(var a=1;a<e.length;a++)if(o+=so(r,t,e[a]),n){var c=s;o+=c[a]}lu.lastIndex=0;for(var l="",d;(d=lu.exec(o))!==null;)l+="-"+d[1];var f=Om(o)+l;return{name:f,styles:o,next:Ar}}var Lm=function(t){return t()},uu=J.useInsertionEffect?J.useInsertionEffect:!1,du=uu||Lm,fu=uu||J.useLayoutEffect,pu=J.createContext(typeof HTMLElement<"u"?eu({key:"css"}):null),zm=pu.Provider,Ia=function(t){return y.forwardRef(function(r,n){var o=y.useContext(pu);return t(r,o,n)})},As=J.createContext({}),Aa={}.hasOwnProperty,Ma="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Bm=function(t,r){var n={};for(var o in r)Aa.call(r,o)&&(n[o]=r[o]);return n[Ma]=t,n},Fm=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return Da(r,n,o),du(function(){return ka(r,n,o)}),null},Vm=Ia(function(e,t,r){var n=e.css;typeof n=="string"&&t.registered[n]!==void 0&&(n=t.registered[n]);var o=e[Ma],s=[n],i="";typeof e.className=="string"?i=su(t.registered,s,e.className):e.className!=null&&(i=e.className+" ");var a=io(s,void 0,J.useContext(As));i+=t.key+"-"+a.name;var c={};for(var l in e)Aa.call(e,l)&&l!=="css"&&l!==Ma&&(c[l]=e[l]);return c.className=i,r&&(c.ref=r),J.createElement(J.Fragment,null,J.createElement(Fm,{cache:t,serialized:a,isStringTag:typeof o=="string"}),J.createElement(o,c))}),Um=Vm,hu=function(t,r){var n=arguments;if(r==null||!Aa.call(r,"css"))return J.createElement.apply(void 0,n);var o=n.length,s=new Array(o);s[0]=Um,s[1]=Bm(t,r);for(var i=2;i<o;i++)s[i]=n[i];return J.createElement.apply(null,s)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(hu||(hu={}));var Hm=Ia(function(e,t){var r=e.styles,n=io([r],void 0,J.useContext(As)),o=J.useRef();return fu(function(){var s=t.key+"-global",i=new t.sheet.constructor({key:s,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),a=!1,c=document.querySelector('style[data-emotion="'+s+" "+n.name+'"]');return t.sheet.tags.length&&(i.before=t.sheet.tags[0]),c!==null&&(a=!0,c.setAttribute("data-emotion",s),i.hydrate([c])),o.current=[i,a],function(){i.flush()}},[t]),fu(function(){var s=o.current,i=s[0],a=s[1];if(a){s[1]=!1;return}if(n.next!==void 0&&ka(t,n.next,!0),i.tags.length){var c=i.tags[i.tags.length-1].nextElementSibling;i.before=c,i.flush()}t.insert("",n,i,!1)},[t,n.name]),null});function mu(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return io(t)}function Wm(){var e=mu.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var Ym=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,qm=Ql(function(e){return Ym.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Zm=qm,Gm=function(t){return t!=="theme"},gu=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Zm:Gm},vu=function(t,r,n){var o;if(r){var s=r.shouldForwardProp;o=t.__emotion_forwardProp&&s?function(i){return t.__emotion_forwardProp(i)&&s(i)}:s}return typeof o!="function"&&n&&(o=t.__emotion_forwardProp),o},Km=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return Da(r,n,o),du(function(){return ka(r,n,o)}),null},Qm=function e(t,r){var n=t.__emotion_real===t,o=n&&t.__emotion_base||t,s,i;r!==void 0&&(s=r.label,i=r.target);var a=vu(t,r,n),c=a||gu(o),l=!c("as");return function(){var d=arguments,f=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(s!==void 0&&f.push("label:"+s+";"),d[0]==null||d[0].raw===void 0)f.push.apply(f,d);else{var p=d[0];f.push(p[0]);for(var m=d.length,v=1;v<m;v++)f.push(d[v],p[v])}var h=Ia(function(b,w,S){var k=l&&b.as||o,C="",x=[],H=b;if(b.theme==null){H={};for(var E in b)H[E]=b[E];H.theme=J.useContext(As)}typeof b.className=="string"?C=su(w.registered,x,b.className):b.className!=null&&(C=b.className+" ");var I=io(f.concat(x),w.registered,H);C+=w.key+"-"+I.name,i!==void 0&&(C+=" "+i);var P=l&&a===void 0?gu(k):c,A={};for(var Y in b)l&&Y==="as"||P(Y)&&(A[Y]=b[Y]);return A.className=C,S&&(A.ref=S),J.createElement(J.Fragment,null,J.createElement(Km,{cache:w,serialized:I,isStringTag:typeof k=="string"}),J.createElement(k,A))});return h.displayName=s!==void 0?s:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=o,h.__emotion_styles=f,h.__emotion_forwardProp=a,Object.defineProperty(h,"toString",{value:function(){return"."+i}}),h.withComponent=function(b,w){var S=e(b,Ge({},r,w,{shouldForwardProp:vu(h,w,!0)}));return S.apply(void 0,f)},h}},Xm=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Pa=Qm.bind(null);Xm.forEach(function(e){Pa[e]=Pa(e)});function Jm(e,t){const r=eu({key:"css",prepend:e});if(t){const n=r.insert;r.insert=(...o)=>(o[1].styles.match(/^@layer\s+[^{]*$/)||(o[1].styles=`@layer mui {${o[1].styles}}`),n(...o))}return r}const Oa=new Map;function yu(e){const{injectFirst:t,enableCssLayer:r,children:n}=e,o=J.useMemo(()=>{const s=`${t}-${r}`;if(typeof document=="object"&&Oa.has(s))return Oa.get(s);const i=Jm(t,r);return Oa.set(s,i),i},[t,r]);return t||r?u.jsx(zm,{value:o,children:n}):n}process.env.NODE_ENV!=="production"&&(yu.propTypes={children:Ne.node,enableCssLayer:Ne.bool,injectFirst:Ne.bool});function eg(e){return e==null||Object.keys(e).length===0}function bu(e){const{styles:t,defaultTheme:r={}}=e,n=typeof t=="function"?o=>t(eg(o)?r:o):t;return u.jsx(Hm,{styles:n})}process.env.NODE_ENV!=="production"&&(bu.propTypes={defaultTheme:Ne.object,styles:Ne.oneOfType([Ne.array,Ne.string,Ne.object,Ne.func])});/**
82
82
  * @mui/styled-engine v5.18.0
83
83
  *
84
84
  * @license MIT
85
85
  * This source code is licensed under the MIT license found in the
86
86
  * LICENSE file in the root directory of this source tree.
87
- */function Jm(e,t){const r=Aa(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const o=typeof e=="string"?`"${e}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
88
- `)):n.some(s=>s===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),r(...n)}:r}const eg=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},bu=[];function tg(e){return bu[0]=e,so(bu)}const rg=Lr(Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:yu,StyledEngineProvider:vu,ThemeContext:Is,css:hu,default:Jm,internal_processStyles:eg,internal_serializeStyles:tg,keyframes:Um},Symbol.toStringTag,{value:"Module"}))),ng=Lr(o0),og=Lr(_0),sg=Lr(b0),ig=["values","unit","step"],ag=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>Ze({},r,{[n.key]:n.val}),{})};function _u(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,o=Gr(e,ig),s=ag(t),i=Object.keys(s);function a(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r})`}function c(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-n/100}${r})`}function l(p,y){const m=i.indexOf(y);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r}) and (max-width:${(m!==-1&&typeof t[i[m]]=="number"?t[i[m]]:y)-n/100}${r})`}function d(p){return i.indexOf(p)+1<i.length?l(p,i[i.indexOf(p)+1]):a(p)}function f(p){const y=i.indexOf(p);return y===0?a(i[1]):y===i.length-1?c(i[y]):l(p,i[i.indexOf(p)+1]).replace("@media","@media not all and")}return Ze({keys:i,values:s,up:a,down:c,between:l,only:d,not:f,unit:r},o)}const cg={borderRadius:4},Kr=process.env.NODE_ENV!=="production"?Ne.oneOfType([Ne.number,Ne.string,Ne.object,Ne.array]):{};function io(e,t){return t?kr(e,t,{clone:!1}):e}const Pa={xs:0,sm:600,md:900,lg:1200,xl:1536},xu={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Pa[e]}px)`};function zr(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const s=n.breakpoints||xu;return t.reduce((i,a,c)=>(i[s.up(s.keys[c])]=r(t[c]),i),{})}if(typeof t=="object"){const s=n.breakpoints||xu;return Object.keys(t).reduce((i,a)=>{if(Object.keys(s.values||Pa).indexOf(a)!==-1){const c=s.up(a);i[c]=r(t[a],a)}else{const c=a;i[c]=t[c]}return i},{})}return r(t)}function lg(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((n,o)=>{const s=e.up(o);return n[s]={},n},{}))||{}}function wu(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function As(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((o,s)=>o&&o[s]?o[s]:null,e);if(n!=null)return n}return t.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,e)}function Ms(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=As(e,r)||n,t&&(o=t(o,n,e)),o}function kt(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,s=i=>{if(i[t]==null)return null;const a=i[t],c=i.theme,l=As(c,n)||{};return zr(i,a,f=>{let p=Ms(l,o,f);return f===p&&typeof f=="string"&&(p=Ms(l,o,`${t}${f==="default"?"":Zr(f)}`,f)),r===!1?p:{[r]:p}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[t]:Kr}:{},s.filterProps=[t],s}function ug(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const dg={m:"margin",p:"padding"},fg={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Su={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},pg=ug(e=>{if(e.length>2)if(Su[e])e=Su[e];else return[e];const[t,r]=e.split(""),n=dg[t],o=fg[r]||"";return Array.isArray(o)?o.map(s=>n+s):[n+o]}),Ps=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Os=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],hg=[...Ps,...Os];function ao(e,t,r,n){var o;const s=(o=As(e,t,!1))!=null?o:r;return typeof s=="number"?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&typeof i!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${i}.`),s*i):Array.isArray(s)?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&(Number.isInteger(i)?i>s.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(s)}.`,`${i} > ${s.length-1}, you need to add the missing values.`].join(`
87
+ */function tg(e,t){const r=Pa(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const o=typeof e=="string"?`"${e}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
88
+ `)):n.some(s=>s===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),r(...n)}:r}const rg=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},_u=[];function ng(e){return _u[0]=e,io(_u)}const og=Lr(Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:bu,StyledEngineProvider:yu,ThemeContext:As,css:mu,default:tg,internal_processStyles:rg,internal_serializeStyles:ng,keyframes:Wm},Symbol.toStringTag,{value:"Module"}))),sg=Lr(i0),ig=Lr(w0),ag=Lr(x0),cg=["values","unit","step"],lg=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>Ge({},r,{[n.key]:n.val}),{})};function xu(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,o=Gr(e,cg),s=lg(t),i=Object.keys(s);function a(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r})`}function c(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-n/100}${r})`}function l(p,m){const v=i.indexOf(m);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r}) and (max-width:${(v!==-1&&typeof t[i[v]]=="number"?t[i[v]]:m)-n/100}${r})`}function d(p){return i.indexOf(p)+1<i.length?l(p,i[i.indexOf(p)+1]):a(p)}function f(p){const m=i.indexOf(p);return m===0?a(i[1]):m===i.length-1?c(i[m]):l(p,i[i.indexOf(p)+1]).replace("@media","@media not all and")}return Ge({keys:i,values:s,up:a,down:c,between:l,only:d,not:f,unit:r},o)}const ug={borderRadius:4},Kr=process.env.NODE_ENV!=="production"?Ne.oneOfType([Ne.number,Ne.string,Ne.object,Ne.array]):{};function ao(e,t){return t?kr(e,t,{clone:!1}):e}const ja={xs:0,sm:600,md:900,lg:1200,xl:1536},wu={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ja[e]}px)`};function zr(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const s=n.breakpoints||wu;return t.reduce((i,a,c)=>(i[s.up(s.keys[c])]=r(t[c]),i),{})}if(typeof t=="object"){const s=n.breakpoints||wu;return Object.keys(t).reduce((i,a)=>{if(Object.keys(s.values||ja).indexOf(a)!==-1){const c=s.up(a);i[c]=r(t[a],a)}else{const c=a;i[c]=t[c]}return i},{})}return r(t)}function dg(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((n,o)=>{const s=e.up(o);return n[s]={},n},{}))||{}}function Su(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function Ms(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((o,s)=>o&&o[s]?o[s]:null,e);if(n!=null)return n}return t.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,e)}function Ps(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=Ms(e,r)||n,t&&(o=t(o,n,e)),o}function Dt(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,s=i=>{if(i[t]==null)return null;const a=i[t],c=i.theme,l=Ms(c,n)||{};return zr(i,a,f=>{let p=Ps(l,o,f);return f===p&&typeof f=="string"&&(p=Ps(l,o,`${t}${f==="default"?"":Zr(f)}`,f)),r===!1?p:{[r]:p}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[t]:Kr}:{},s.filterProps=[t],s}function fg(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const pg={m:"margin",p:"padding"},hg={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Cu={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},mg=fg(e=>{if(e.length>2)if(Cu[e])e=Cu[e];else return[e];const[t,r]=e.split(""),n=pg[t],o=hg[r]||"";return Array.isArray(o)?o.map(s=>n+s):[n+o]}),Os=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],js=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],gg=[...Os,...js];function co(e,t,r,n){var o;const s=(o=Ms(e,t,!1))!=null?o:r;return typeof s=="number"?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&typeof i!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${i}.`),s*i):Array.isArray(s)?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&(Number.isInteger(i)?i>s.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(s)}.`,`${i} > ${s.length-1}, you need to add the missing values.`].join(`
89
89
  `)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
90
90
  `))),s[i]):typeof s=="function"?s:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${s}) is invalid.`,"It should be a number, an array or a function."].join(`
91
- `)),()=>{})}function Cu(e){return ao(e,"spacing",8,"spacing")}function co(e,t){if(typeof t=="string"||t==null)return t;const r=Math.abs(t),n=e(r);return t>=0?n:typeof n=="number"?-n:`-${n}`}function mg(e,t){return r=>e.reduce((n,o)=>(n[o]=co(t,r),n),{})}function gg(e,t,r,n){if(t.indexOf(r)===-1)return null;const o=pg(r),s=mg(o,n),i=e[r];return zr(e,i,s)}function Eu(e,t){const r=Cu(e.theme);return Object.keys(e).map(n=>gg(e,t,n,r)).reduce(io,{})}function wt(e){return Eu(e,Ps)}wt.propTypes=process.env.NODE_ENV!=="production"?Ps.reduce((e,t)=>(e[t]=Kr,e),{}):{},wt.filterProps=Ps;function St(e){return Eu(e,Os)}St.propTypes=process.env.NODE_ENV!=="production"?Os.reduce((e,t)=>(e[t]=Kr,e),{}):{},St.filterProps=Os,process.env.NODE_ENV!=="production"&&hg.reduce((e,t)=>(e[t]=Kr,e),{});function vg(e=8){if(e.mui)return e;const t=Cu({spacing:e}),r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(s=>{const i=t(s);return typeof i=="number"?`${i}px`:i}).join(" "));return r.mui=!0,r}function js(...e){const t=e.reduce((n,o)=>(o.filterProps.forEach(s=>{n[s]=o}),n),{}),r=n=>Object.keys(n).reduce((o,s)=>t[s]?io(o,t[s](n)):o,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,o)=>Object.assign(n,o.propTypes),{}):{},r.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),r}function ur(e){return typeof e!="number"?e:`${e}px solid`}function dr(e,t){return kt({prop:e,themeKey:"borders",transform:t})}const yg=dr("border",ur),bg=dr("borderTop",ur),_g=dr("borderRight",ur),xg=dr("borderBottom",ur),wg=dr("borderLeft",ur),Sg=dr("borderColor"),Cg=dr("borderTopColor"),Eg=dr("borderRightColor"),kg=dr("borderBottomColor"),Dg=dr("borderLeftColor"),Tg=dr("outline",ur),Ig=dr("outlineColor"),Rs=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=ao(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:co(t,n)});return zr(e,e.borderRadius,r)}return null};Rs.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Kr}:{},Rs.filterProps=["borderRadius"],js(yg,bg,_g,xg,wg,Sg,Cg,Eg,kg,Dg,Rs,Tg,Ig);const Ns=e=>{if(e.gap!==void 0&&e.gap!==null){const t=ao(e.theme,"spacing",8,"gap"),r=n=>({gap:co(t,n)});return zr(e,e.gap,r)}return null};Ns.propTypes=process.env.NODE_ENV!=="production"?{gap:Kr}:{},Ns.filterProps=["gap"];const $s=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=ao(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:co(t,n)});return zr(e,e.columnGap,r)}return null};$s.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Kr}:{},$s.filterProps=["columnGap"];const Ls=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=ao(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:co(t,n)});return zr(e,e.rowGap,r)}return null};Ls.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Kr}:{},Ls.filterProps=["rowGap"];const Ag=kt({prop:"gridColumn"}),Mg=kt({prop:"gridRow"}),Pg=kt({prop:"gridAutoFlow"}),Og=kt({prop:"gridAutoColumns"}),jg=kt({prop:"gridAutoRows"}),Rg=kt({prop:"gridTemplateColumns"}),Ng=kt({prop:"gridTemplateRows"}),$g=kt({prop:"gridTemplateAreas"}),Lg=kt({prop:"gridArea"});js(Ns,$s,Ls,Ag,Mg,Pg,Og,jg,Rg,Ng,$g,Lg);function Dn(e,t){return t==="grey"?t:e}const zg=kt({prop:"color",themeKey:"palette",transform:Dn}),Bg=kt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Dn}),Fg=kt({prop:"backgroundColor",themeKey:"palette",transform:Dn});js(zg,Bg,Fg);function rr(e){return e<=1&&e!==0?`${e*100}%`:e}const Vg=kt({prop:"width",transform:rr}),Oa=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var n,o;const s=((n=e.theme)==null||(n=n.breakpoints)==null||(n=n.values)==null?void 0:n[r])||Pa[r];return s?((o=e.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${s}${e.theme.breakpoints.unit}`}:{maxWidth:s}:{maxWidth:rr(r)}};return zr(e,e.maxWidth,t)}return null};Oa.filterProps=["maxWidth"];const Ug=kt({prop:"minWidth",transform:rr}),Wg=kt({prop:"height",transform:rr}),Hg=kt({prop:"maxHeight",transform:rr}),Yg=kt({prop:"minHeight",transform:rr});kt({prop:"size",cssProperty:"width",transform:rr}),kt({prop:"size",cssProperty:"height",transform:rr});const qg=kt({prop:"boxSizing"});js(Vg,Oa,Ug,Wg,Hg,Yg,qg);const lo={border:{themeKey:"borders",transform:ur},borderTop:{themeKey:"borders",transform:ur},borderRight:{themeKey:"borders",transform:ur},borderBottom:{themeKey:"borders",transform:ur},borderLeft:{themeKey:"borders",transform:ur},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:ur},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Rs},color:{themeKey:"palette",transform:Dn},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Dn},backgroundColor:{themeKey:"palette",transform:Dn},p:{style:St},pt:{style:St},pr:{style:St},pb:{style:St},pl:{style:St},px:{style:St},py:{style:St},padding:{style:St},paddingTop:{style:St},paddingRight:{style:St},paddingBottom:{style:St},paddingLeft:{style:St},paddingX:{style:St},paddingY:{style:St},paddingInline:{style:St},paddingInlineStart:{style:St},paddingInlineEnd:{style:St},paddingBlock:{style:St},paddingBlockStart:{style:St},paddingBlockEnd:{style:St},m:{style:wt},mt:{style:wt},mr:{style:wt},mb:{style:wt},ml:{style:wt},mx:{style:wt},my:{style:wt},margin:{style:wt},marginTop:{style:wt},marginRight:{style:wt},marginBottom:{style:wt},marginLeft:{style:wt},marginX:{style:wt},marginY:{style:wt},marginInline:{style:wt},marginInlineStart:{style:wt},marginInlineEnd:{style:wt},marginBlock:{style:wt},marginBlockStart:{style:wt},marginBlockEnd:{style:wt},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Ns},rowGap:{style:Ls},columnGap:{style:$s},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:rr},maxWidth:{style:Oa},minWidth:{transform:rr},height:{transform:rr},maxHeight:{transform:rr},minHeight:{transform:rr},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Zg(...e){const t=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function Gg(e,t){return typeof e=="function"?e(t):e}function ku(){function e(r,n,o,s){const i={[r]:n,theme:o},a=s[r];if(!a)return{[r]:n};const{cssProperty:c=r,themeKey:l,transform:d,style:f}=a;if(n==null)return null;if(l==="typography"&&n==="inherit")return{[r]:n};const p=As(o,l)||{};return f?f(i):zr(i,n,m=>{let h=Ms(p,d,m);return m===h&&typeof m=="string"&&(h=Ms(p,d,`${r}${m==="default"?"":Zr(m)}`,m)),c===!1?h:{[c]:h}})}function t(r){var n;const{sx:o,theme:s={},nested:i}=r||{};if(!o)return null;const a=(n=s.unstable_sxConfig)!=null?n:lo;function c(l){let d=l;if(typeof l=="function")d=l(s);else if(typeof l!="object")return l;if(!d)return null;const f=lg(s.breakpoints),p=Object.keys(f);let y=f;return Object.keys(d).forEach(m=>{const h=Gg(d[m],s);if(h!=null)if(typeof h=="object")if(a[m])y=io(y,e(m,h,s,a));else{const b=zr({theme:s},h,S=>({[m]:S}));Zg(b,h)?y[m]=t({sx:h,theme:s,nested:!0}):y=io(y,b)}else y=io(y,e(m,h,s,a))}),!i&&s.modularCssLayers?{"@layer sx":wu(p,y)}:wu(p,y)}return Array.isArray(o)?o.map(c):c(o)}return t}const zs=ku();zs.filterProps=["sx"];function Du(e,t){const r=this;return r.vars&&typeof r.getColorSchemeSelector=="function"?{[r.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:r.palette.mode===e?t:{}}const Kg=["breakpoints","palette","spacing","shape"];function Tu(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:s={}}=e,i=Gr(e,Kg),a=_u(r),c=vg(o);let l=kr({breakpoints:a,direction:"ltr",components:{},palette:Ze({mode:"light"},n),spacing:c,shape:Ze({},cg,s)},i);return l.applyStyles=Du,l=t.reduce((d,f)=>kr(d,f),l),l.unstable_sxConfig=Ze({},lo,i?.unstable_sxConfig),l.unstable_sx=function(f){return zs({sx:f,theme:this})},l}const Qg=Lr(Object.freeze(Object.defineProperty({__proto__:null,default:Tu,private_createBreakpoints:_u,unstable_applyStyles:Du},Symbol.toStringTag,{value:"Module"}))),Xg=["sx"],Jg=e=>{var t,r;const n={systemProps:{},otherProps:{}},o=(t=e==null||(r=e.theme)==null?void 0:r.unstable_sxConfig)!=null?t:lo;return Object.keys(e).forEach(s=>{o[s]?n.systemProps[s]=e[s]:n.otherProps[s]=e[s]}),n};function ev(e){const{sx:t}=e,r=Gr(e,Xg),{systemProps:n,otherProps:o}=Jg(r);let s;return Array.isArray(t)?s=[n,...t]:typeof t=="function"?s=(...i)=>{const a=t(...i);return qr(a)?Ze({},n,a):n}:s=Ze({},n,t),Ze({},o,{sx:s})}const tv=Lr(Object.freeze(Object.defineProperty({__proto__:null,default:zs,extendSxProp:ev,unstable_createStyleFunctionSx:ku,unstable_defaultSxConfig:lo},Symbol.toStringTag,{value:"Module"})));var Iu;function rv(){if(Iu)return an;Iu=1;var e=st();Object.defineProperty(an,"__esModule",{value:!0}),an.default=E,an.shouldForwardProp=b,an.systemDefaultTheme=void 0;var t=e(K0()),r=e(Q0()),n=y(rg),o=ng,s=e(og),i=e(sg),a=e(Qg),c=e(tv);const l=["ownerState"],d=["variants"],f=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function p(I){if(typeof WeakMap!="function")return null;var P=new WeakMap,A=new WeakMap;return(p=function(W){return W?A:P})(I)}function y(I,P){if(I&&I.__esModule)return I;if(I===null||typeof I!="object"&&typeof I!="function")return{default:I};var A=p(P);if(A&&A.has(I))return A.get(I);var W={__proto__:null},q=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var F in I)if(F!=="default"&&Object.prototype.hasOwnProperty.call(I,F)){var Z=q?Object.getOwnPropertyDescriptor(I,F):null;Z&&(Z.get||Z.set)?Object.defineProperty(W,F,Z):W[F]=I[F]}return W.default=I,A&&A.set(I,W),W}function m(I){return Object.keys(I).length===0}function h(I){return typeof I=="string"&&I.charCodeAt(0)>96}function b(I){return I!=="ownerState"&&I!=="theme"&&I!=="sx"&&I!=="as"}function S(I,P){return P&&I&&typeof I=="object"&&I.styles&&!I.styles.startsWith("@layer")&&(I.styles=`@layer ${P}{${String(I.styles)}}`),I}const C=an.systemDefaultTheme=(0,a.default)(),D=I=>I&&I.charAt(0).toLowerCase()+I.slice(1);function k({defaultTheme:I,theme:P,themeId:A}){return m(P)?I:P[A]||P}function w(I){return I?(P,A)=>A[I]:null}function B(I,P,A){let{ownerState:W}=P,q=(0,r.default)(P,l);const F=typeof I=="function"?I((0,t.default)({ownerState:W},q)):I;if(Array.isArray(F))return F.flatMap(Z=>B(Z,(0,t.default)({ownerState:W},q),A));if(F&&typeof F=="object"&&Array.isArray(F.variants)){const{variants:Z=[]}=F;let V=(0,r.default)(F,d);return Z.forEach(ee=>{let ue=!0;if(typeof ee.props=="function"?ue=ee.props((0,t.default)({ownerState:W},q,W)):Object.keys(ee.props).forEach(ye=>{W?.[ye]!==ee.props[ye]&&q[ye]!==ee.props[ye]&&(ue=!1)}),ue){Array.isArray(V)||(V=[V]);const ye=typeof ee.style=="function"?ee.style((0,t.default)({ownerState:W},q,W)):ee.style;V.push(A?S((0,n.internal_serializeStyles)(ye),A):ye)}}),V}return A?S((0,n.internal_serializeStyles)(F),A):F}function E(I={}){const{themeId:P,defaultTheme:A=C,rootShouldForwardProp:W=b,slotShouldForwardProp:q=b}=I,F=Z=>(0,c.default)((0,t.default)({},Z,{theme:k((0,t.default)({},Z,{defaultTheme:A,themeId:P}))}));return F.__mui_systemSx=!0,(Z,le={})=>{(0,n.internal_processStyles)(Z,he=>he.filter(Pe=>!(Pe!=null&&Pe.__mui_systemSx)));const{name:V,slot:ee,skipVariantsResolver:ue,skipSx:ye,overridesResolver:L=w(D(ee))}=le,te=(0,r.default)(le,f),J=V&&V.startsWith("Mui")||ee?"components":"custom",H=ue!==void 0?ue:ee&&ee!=="Root"&&ee!=="root"||!1,K=ye||!1;let ae;process.env.NODE_ENV!=="production"&&V&&(ae=`${V}-${D(ee||"Root")}`);let ce=b;ee==="Root"||ee==="root"?ce=W:ee?ce=q:h(Z)&&(ce=void 0);const me=(0,n.default)(Z,(0,t.default)({shouldForwardProp:ce,label:ae},te)),ge=he=>typeof he=="function"&&he.__emotion_real!==he||(0,o.isPlainObject)(he)?Pe=>{const N=k({theme:Pe.theme,defaultTheme:A,themeId:P});return B(he,(0,t.default)({},Pe,{theme:N}),N.modularCssLayers?J:void 0)}:he,fe=(he,...Pe)=>{let N=ge(he);const Ve=Pe?Pe.map(ge):[];V&&L&&Ve.push(Ae=>{const Be=k((0,t.default)({},Ae,{defaultTheme:A,themeId:P}));if(!Be.components||!Be.components[V]||!Be.components[V].styleOverrides)return null;const pt=Be.components[V].styleOverrides,rt={};return Object.entries(pt).forEach(([x,M])=>{rt[x]=B(M,(0,t.default)({},Ae,{theme:Be}),Be.modularCssLayers?"theme":void 0)}),L(Ae,rt)}),V&&!H&&Ve.push(Ae=>{var Be;const pt=k((0,t.default)({},Ae,{defaultTheme:A,themeId:P})),rt=pt==null||(Be=pt.components)==null||(Be=Be[V])==null?void 0:Be.variants;return B({variants:rt},(0,t.default)({},Ae,{theme:pt}),pt.modularCssLayers?"theme":void 0)}),K||Ve.push(F);const et=Ve.length-Pe.length;if(Array.isArray(he)&&et>0){const Ae=new Array(et).fill("");N=[...he,...Ae],N.raw=[...he.raw,...Ae]}const Ue=me(N,...Ve);if(process.env.NODE_ENV!=="production"){let Ae;V&&(Ae=`${V}${(0,s.default)(ee||"")}`),Ae===void 0&&(Ae=`Styled(${(0,i.default)(Z)})`),Ue.displayName=Ae}return Z.muiName&&(Ue.muiName=Z.muiName),Ue};return me.withConfig&&(fe.withConfig=me.withConfig),fe}}return an}var nv=rv();const ov=ot(nv);function sv(e,t){return Ze({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var bt={};const iv=Lr(p0),av=Lr(H0);var Au;function cv(){if(Au)return bt;Au=1;var e=st();Object.defineProperty(bt,"__esModule",{value:!0}),bt.alpha=m,bt.blend=B,bt.colorChannel=void 0,bt.darken=b,bt.decomposeColor=i,bt.emphasize=k,bt.getContrastRatio=y,bt.getLuminance=p,bt.hexToRgb=o,bt.hslToRgb=f,bt.lighten=C,bt.private_safeAlpha=h,bt.private_safeColorChannel=void 0,bt.private_safeDarken=S,bt.private_safeEmphasize=w,bt.private_safeLighten=D,bt.recomposeColor=l,bt.rgbToHex=d;var t=e(iv),r=e(av);function n(E,I=0,P=1){return process.env.NODE_ENV!=="production"&&(E<I||E>P)&&console.error(`MUI: The value provided ${E} is out of range [${I}, ${P}].`),(0,r.default)(E,I,P)}function o(E){E=E.slice(1);const I=new RegExp(`.{1,${E.length>=6?2:1}}`,"g");let P=E.match(I);return P&&P[0].length===1&&(P=P.map(A=>A+A)),P?`rgb${P.length===4?"a":""}(${P.map((A,W)=>W<3?parseInt(A,16):Math.round(parseInt(A,16)/255*1e3)/1e3).join(", ")})`:""}function s(E){const I=E.toString(16);return I.length===1?`0${I}`:I}function i(E){if(E.type)return E;if(E.charAt(0)==="#")return i(o(E));const I=E.indexOf("("),P=E.substring(0,I);if(["rgb","rgba","hsl","hsla","color"].indexOf(P)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${E}\` color.
92
- The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:(0,t.default)(9,E));let A=E.substring(I+1,E.length-1),W;if(P==="color"){if(A=A.split(" "),W=A.shift(),A.length===4&&A[3].charAt(0)==="/"&&(A[3]=A[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(W)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${W}\` color space.
93
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:(0,t.default)(10,W))}else A=A.split(",");return A=A.map(q=>parseFloat(q)),{type:P,values:A,colorSpace:W}}const a=E=>{const I=i(E);return I.values.slice(0,3).map((P,A)=>I.type.indexOf("hsl")!==-1&&A!==0?`${P}%`:P).join(" ")};bt.colorChannel=a;const c=(E,I)=>{try{return a(E)}catch{return I&&process.env.NODE_ENV!=="production"&&console.warn(I),E}};bt.private_safeColorChannel=c;function l(E){const{type:I,colorSpace:P}=E;let{values:A}=E;return I.indexOf("rgb")!==-1?A=A.map((W,q)=>q<3?parseInt(W,10):W):I.indexOf("hsl")!==-1&&(A[1]=`${A[1]}%`,A[2]=`${A[2]}%`),I.indexOf("color")!==-1?A=`${P} ${A.join(" ")}`:A=`${A.join(", ")}`,`${I}(${A})`}function d(E){if(E.indexOf("#")===0)return E;const{values:I}=i(E);return`#${I.map((P,A)=>s(A===3?Math.round(255*P):P)).join("")}`}function f(E){E=i(E);const{values:I}=E,P=I[0],A=I[1]/100,W=I[2]/100,q=A*Math.min(W,1-W),F=(V,ee=(V+P/30)%12)=>W-q*Math.max(Math.min(ee-3,9-ee,1),-1);let Z="rgb";const le=[Math.round(F(0)*255),Math.round(F(8)*255),Math.round(F(4)*255)];return E.type==="hsla"&&(Z+="a",le.push(I[3])),l({type:Z,values:le})}function p(E){E=i(E);let I=E.type==="hsl"||E.type==="hsla"?i(f(E)).values:E.values;return I=I.map(P=>(E.type!=="color"&&(P/=255),P<=.03928?P/12.92:((P+.055)/1.055)**2.4)),Number((.2126*I[0]+.7152*I[1]+.0722*I[2]).toFixed(3))}function y(E,I){const P=p(E),A=p(I);return(Math.max(P,A)+.05)/(Math.min(P,A)+.05)}function m(E,I){return E=i(E),I=n(I),(E.type==="rgb"||E.type==="hsl")&&(E.type+="a"),E.type==="color"?E.values[3]=`/${I}`:E.values[3]=I,l(E)}function h(E,I,P){try{return m(E,I)}catch{return P&&process.env.NODE_ENV!=="production"&&console.warn(P),E}}function b(E,I){if(E=i(E),I=n(I),E.type.indexOf("hsl")!==-1)E.values[2]*=1-I;else if(E.type.indexOf("rgb")!==-1||E.type.indexOf("color")!==-1)for(let P=0;P<3;P+=1)E.values[P]*=1-I;return l(E)}function S(E,I,P){try{return b(E,I)}catch{return P&&process.env.NODE_ENV!=="production"&&console.warn(P),E}}function C(E,I){if(E=i(E),I=n(I),E.type.indexOf("hsl")!==-1)E.values[2]+=(100-E.values[2])*I;else if(E.type.indexOf("rgb")!==-1)for(let P=0;P<3;P+=1)E.values[P]+=(255-E.values[P])*I;else if(E.type.indexOf("color")!==-1)for(let P=0;P<3;P+=1)E.values[P]+=(1-E.values[P])*I;return l(E)}function D(E,I,P){try{return C(E,I)}catch{return P&&process.env.NODE_ENV!=="production"&&console.warn(P),E}}function k(E,I=.15){return p(E)>.5?b(E,I):C(E,I)}function w(E,I,P){try{return k(E,I)}catch{return P&&process.env.NODE_ENV!=="production"&&console.warn(P),E}}function B(E,I,P,A=1){const W=(le,V)=>Math.round((le**(1/A)*(1-P)+V**(1/A)*P)**A),q=i(E),F=i(I),Z=[W(q.values[0],F.values[0]),W(q.values[1],F.values[1]),W(q.values[2],F.values[2])];return l({type:"rgb",values:Z})}return bt}var Bs=cv();const uo={black:"#000",white:"#fff"},lv={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Tn={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},In={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},fo={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},An={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Mn={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Pn={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},uv=["mode","contrastThreshold","tonalOffset"],Mu={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:uo.white,default:uo.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},ja={text:{primary:uo.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:uo.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Pu(e,t,r,n){const o=n.light||n,s=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=Bs.lighten(e.main,o):t==="dark"&&(e.dark=Bs.darken(e.main,s)))}function dv(e="light"){return e==="dark"?{main:An[200],light:An[50],dark:An[400]}:{main:An[700],light:An[400],dark:An[800]}}function fv(e="light"){return e==="dark"?{main:Tn[200],light:Tn[50],dark:Tn[400]}:{main:Tn[500],light:Tn[300],dark:Tn[700]}}function pv(e="light"){return e==="dark"?{main:In[500],light:In[300],dark:In[700]}:{main:In[700],light:In[400],dark:In[800]}}function hv(e="light"){return e==="dark"?{main:Mn[400],light:Mn[300],dark:Mn[700]}:{main:Mn[700],light:Mn[500],dark:Mn[900]}}function mv(e="light"){return e==="dark"?{main:Pn[400],light:Pn[300],dark:Pn[700]}:{main:Pn[800],light:Pn[500],dark:Pn[900]}}function gv(e="light"){return e==="dark"?{main:fo[400],light:fo[300],dark:fo[700]}:{main:"#ed6c02",light:fo[500],dark:fo[900]}}function vv(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2}=e,o=Gr(e,uv),s=e.primary||dv(t),i=e.secondary||fv(t),a=e.error||pv(t),c=e.info||hv(t),l=e.success||mv(t),d=e.warning||gv(t);function f(h){const b=Bs.getContrastRatio(h,ja.text.primary)>=r?ja.text.primary:Mu.text.primary;if(process.env.NODE_ENV!=="production"){const S=Bs.getContrastRatio(h,b);S<3&&console.error([`MUI: The contrast ratio of ${S}:1 for ${b} on ${h}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
94
- `))}return b}const p=({color:h,name:b,mainShade:S=500,lightShade:C=300,darkShade:D=700})=>{if(h=Ze({},h),!h.main&&h[S]&&(h.main=h[S]),!h.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
95
- The color object needs to have a \`main\` property or a \`${S}\` property.`:Jn(11,b?` (${b})`:"",S));if(typeof h.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
91
+ `)),()=>{})}function Eu(e){return co(e,"spacing",8,"spacing")}function lo(e,t){if(typeof t=="string"||t==null)return t;const r=Math.abs(t),n=e(r);return t>=0?n:typeof n=="number"?-n:`-${n}`}function vg(e,t){return r=>e.reduce((n,o)=>(n[o]=lo(t,r),n),{})}function yg(e,t,r,n){if(t.indexOf(r)===-1)return null;const o=mg(r),s=vg(o,n),i=e[r];return zr(e,i,s)}function Du(e,t){const r=Eu(e.theme);return Object.keys(e).map(n=>yg(e,t,n,r)).reduce(ao,{})}function wt(e){return Du(e,Os)}wt.propTypes=process.env.NODE_ENV!=="production"?Os.reduce((e,t)=>(e[t]=Kr,e),{}):{},wt.filterProps=Os;function St(e){return Du(e,js)}St.propTypes=process.env.NODE_ENV!=="production"?js.reduce((e,t)=>(e[t]=Kr,e),{}):{},St.filterProps=js,process.env.NODE_ENV!=="production"&&gg.reduce((e,t)=>(e[t]=Kr,e),{});function bg(e=8){if(e.mui)return e;const t=Eu({spacing:e}),r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(s=>{const i=t(s);return typeof i=="number"?`${i}px`:i}).join(" "));return r.mui=!0,r}function Rs(...e){const t=e.reduce((n,o)=>(o.filterProps.forEach(s=>{n[s]=o}),n),{}),r=n=>Object.keys(n).reduce((o,s)=>t[s]?ao(o,t[s](n)):o,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,o)=>Object.assign(n,o.propTypes),{}):{},r.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),r}function ur(e){return typeof e!="number"?e:`${e}px solid`}function dr(e,t){return Dt({prop:e,themeKey:"borders",transform:t})}const _g=dr("border",ur),xg=dr("borderTop",ur),wg=dr("borderRight",ur),Sg=dr("borderBottom",ur),Cg=dr("borderLeft",ur),Eg=dr("borderColor"),Dg=dr("borderTopColor"),kg=dr("borderRightColor"),Tg=dr("borderBottomColor"),Ig=dr("borderLeftColor"),Ag=dr("outline",ur),Mg=dr("outlineColor"),Ns=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=co(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:lo(t,n)});return zr(e,e.borderRadius,r)}return null};Ns.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Kr}:{},Ns.filterProps=["borderRadius"],Rs(_g,xg,wg,Sg,Cg,Eg,Dg,kg,Tg,Ig,Ns,Ag,Mg);const $s=e=>{if(e.gap!==void 0&&e.gap!==null){const t=co(e.theme,"spacing",8,"gap"),r=n=>({gap:lo(t,n)});return zr(e,e.gap,r)}return null};$s.propTypes=process.env.NODE_ENV!=="production"?{gap:Kr}:{},$s.filterProps=["gap"];const Ls=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=co(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:lo(t,n)});return zr(e,e.columnGap,r)}return null};Ls.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Kr}:{},Ls.filterProps=["columnGap"];const zs=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=co(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:lo(t,n)});return zr(e,e.rowGap,r)}return null};zs.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Kr}:{},zs.filterProps=["rowGap"];const Pg=Dt({prop:"gridColumn"}),Og=Dt({prop:"gridRow"}),jg=Dt({prop:"gridAutoFlow"}),Rg=Dt({prop:"gridAutoColumns"}),Ng=Dt({prop:"gridAutoRows"}),$g=Dt({prop:"gridTemplateColumns"}),Lg=Dt({prop:"gridTemplateRows"}),zg=Dt({prop:"gridTemplateAreas"}),Bg=Dt({prop:"gridArea"});Rs($s,Ls,zs,Pg,Og,jg,Rg,Ng,$g,Lg,zg,Bg);function Tn(e,t){return t==="grey"?t:e}const Fg=Dt({prop:"color",themeKey:"palette",transform:Tn}),Vg=Dt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Tn}),Ug=Dt({prop:"backgroundColor",themeKey:"palette",transform:Tn});Rs(Fg,Vg,Ug);function nr(e){return e<=1&&e!==0?`${e*100}%`:e}const Hg=Dt({prop:"width",transform:nr}),Ra=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var n,o;const s=((n=e.theme)==null||(n=n.breakpoints)==null||(n=n.values)==null?void 0:n[r])||ja[r];return s?((o=e.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${s}${e.theme.breakpoints.unit}`}:{maxWidth:s}:{maxWidth:nr(r)}};return zr(e,e.maxWidth,t)}return null};Ra.filterProps=["maxWidth"];const Wg=Dt({prop:"minWidth",transform:nr}),Yg=Dt({prop:"height",transform:nr}),qg=Dt({prop:"maxHeight",transform:nr}),Zg=Dt({prop:"minHeight",transform:nr});Dt({prop:"size",cssProperty:"width",transform:nr}),Dt({prop:"size",cssProperty:"height",transform:nr});const Gg=Dt({prop:"boxSizing"});Rs(Hg,Ra,Wg,Yg,qg,Zg,Gg);const uo={border:{themeKey:"borders",transform:ur},borderTop:{themeKey:"borders",transform:ur},borderRight:{themeKey:"borders",transform:ur},borderBottom:{themeKey:"borders",transform:ur},borderLeft:{themeKey:"borders",transform:ur},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:ur},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ns},color:{themeKey:"palette",transform:Tn},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Tn},backgroundColor:{themeKey:"palette",transform:Tn},p:{style:St},pt:{style:St},pr:{style:St},pb:{style:St},pl:{style:St},px:{style:St},py:{style:St},padding:{style:St},paddingTop:{style:St},paddingRight:{style:St},paddingBottom:{style:St},paddingLeft:{style:St},paddingX:{style:St},paddingY:{style:St},paddingInline:{style:St},paddingInlineStart:{style:St},paddingInlineEnd:{style:St},paddingBlock:{style:St},paddingBlockStart:{style:St},paddingBlockEnd:{style:St},m:{style:wt},mt:{style:wt},mr:{style:wt},mb:{style:wt},ml:{style:wt},mx:{style:wt},my:{style:wt},margin:{style:wt},marginTop:{style:wt},marginRight:{style:wt},marginBottom:{style:wt},marginLeft:{style:wt},marginX:{style:wt},marginY:{style:wt},marginInline:{style:wt},marginInlineStart:{style:wt},marginInlineEnd:{style:wt},marginBlock:{style:wt},marginBlockStart:{style:wt},marginBlockEnd:{style:wt},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:$s},rowGap:{style:zs},columnGap:{style:Ls},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:nr},maxWidth:{style:Ra},minWidth:{transform:nr},height:{transform:nr},maxHeight:{transform:nr},minHeight:{transform:nr},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Kg(...e){const t=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function Qg(e,t){return typeof e=="function"?e(t):e}function ku(){function e(r,n,o,s){const i={[r]:n,theme:o},a=s[r];if(!a)return{[r]:n};const{cssProperty:c=r,themeKey:l,transform:d,style:f}=a;if(n==null)return null;if(l==="typography"&&n==="inherit")return{[r]:n};const p=Ms(o,l)||{};return f?f(i):zr(i,n,v=>{let h=Ps(p,d,v);return v===h&&typeof v=="string"&&(h=Ps(p,d,`${r}${v==="default"?"":Zr(v)}`,v)),c===!1?h:{[c]:h}})}function t(r){var n;const{sx:o,theme:s={},nested:i}=r||{};if(!o)return null;const a=(n=s.unstable_sxConfig)!=null?n:uo;function c(l){let d=l;if(typeof l=="function")d=l(s);else if(typeof l!="object")return l;if(!d)return null;const f=dg(s.breakpoints),p=Object.keys(f);let m=f;return Object.keys(d).forEach(v=>{const h=Qg(d[v],s);if(h!=null)if(typeof h=="object")if(a[v])m=ao(m,e(v,h,s,a));else{const b=zr({theme:s},h,w=>({[v]:w}));Kg(b,h)?m[v]=t({sx:h,theme:s,nested:!0}):m=ao(m,b)}else m=ao(m,e(v,h,s,a))}),!i&&s.modularCssLayers?{"@layer sx":Su(p,m)}:Su(p,m)}return Array.isArray(o)?o.map(c):c(o)}return t}const Bs=ku();Bs.filterProps=["sx"];function Tu(e,t){const r=this;return r.vars&&typeof r.getColorSchemeSelector=="function"?{[r.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:r.palette.mode===e?t:{}}const Xg=["breakpoints","palette","spacing","shape"];function Iu(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:s={}}=e,i=Gr(e,Xg),a=xu(r),c=bg(o);let l=kr({breakpoints:a,direction:"ltr",components:{},palette:Ge({mode:"light"},n),spacing:c,shape:Ge({},ug,s)},i);return l.applyStyles=Tu,l=t.reduce((d,f)=>kr(d,f),l),l.unstable_sxConfig=Ge({},uo,i?.unstable_sxConfig),l.unstable_sx=function(f){return Bs({sx:f,theme:this})},l}const Jg=Lr(Object.freeze(Object.defineProperty({__proto__:null,default:Iu,private_createBreakpoints:xu,unstable_applyStyles:Tu},Symbol.toStringTag,{value:"Module"}))),ev=["sx"],tv=e=>{var t,r;const n={systemProps:{},otherProps:{}},o=(t=e==null||(r=e.theme)==null?void 0:r.unstable_sxConfig)!=null?t:uo;return Object.keys(e).forEach(s=>{o[s]?n.systemProps[s]=e[s]:n.otherProps[s]=e[s]}),n};function rv(e){const{sx:t}=e,r=Gr(e,ev),{systemProps:n,otherProps:o}=tv(r);let s;return Array.isArray(t)?s=[n,...t]:typeof t=="function"?s=(...i)=>{const a=t(...i);return qr(a)?Ge({},n,a):n}:s=Ge({},n,t),Ge({},o,{sx:s})}const nv=Lr(Object.freeze(Object.defineProperty({__proto__:null,default:Bs,extendSxProp:rv,unstable_createStyleFunctionSx:ku,unstable_defaultSxConfig:uo},Symbol.toStringTag,{value:"Module"})));var Au;function ov(){if(Au)return cn;Au=1;var e=nt();Object.defineProperty(cn,"__esModule",{value:!0}),cn.default=E,cn.shouldForwardProp=b,cn.systemDefaultTheme=void 0;var t=e(X0()),r=e(J0()),n=m(og),o=sg,s=e(ig),i=e(ag),a=e(Jg),c=e(nv);const l=["ownerState"],d=["variants"],f=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function p(I){if(typeof WeakMap!="function")return null;var P=new WeakMap,A=new WeakMap;return(p=function(Y){return Y?A:P})(I)}function m(I,P){if(I&&I.__esModule)return I;if(I===null||typeof I!="object"&&typeof I!="function")return{default:I};var A=p(P);if(A&&A.has(I))return A.get(I);var Y={__proto__:null},Z=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var V in I)if(V!=="default"&&Object.prototype.hasOwnProperty.call(I,V)){var W=Z?Object.getOwnPropertyDescriptor(I,V):null;W&&(W.get||W.set)?Object.defineProperty(Y,V,W):Y[V]=I[V]}return Y.default=I,A&&A.set(I,Y),Y}function v(I){return Object.keys(I).length===0}function h(I){return typeof I=="string"&&I.charCodeAt(0)>96}function b(I){return I!=="ownerState"&&I!=="theme"&&I!=="sx"&&I!=="as"}function w(I,P){return P&&I&&typeof I=="object"&&I.styles&&!I.styles.startsWith("@layer")&&(I.styles=`@layer ${P}{${String(I.styles)}}`),I}const S=cn.systemDefaultTheme=(0,a.default)(),k=I=>I&&I.charAt(0).toLowerCase()+I.slice(1);function C({defaultTheme:I,theme:P,themeId:A}){return v(P)?I:P[A]||P}function x(I){return I?(P,A)=>A[I]:null}function H(I,P,A){let{ownerState:Y}=P,Z=(0,r.default)(P,l);const V=typeof I=="function"?I((0,t.default)({ownerState:Y},Z)):I;if(Array.isArray(V))return V.flatMap(W=>H(W,(0,t.default)({ownerState:Y},Z),A));if(V&&typeof V=="object"&&Array.isArray(V.variants)){const{variants:W=[]}=V;let R=(0,r.default)(V,d);return W.forEach(X=>{let re=!0;if(typeof X.props=="function"?re=X.props((0,t.default)({ownerState:Y},Z,Y)):Object.keys(X.props).forEach(ve=>{Y?.[ve]!==X.props[ve]&&Z[ve]!==X.props[ve]&&(re=!1)}),re){Array.isArray(R)||(R=[R]);const ve=typeof X.style=="function"?X.style((0,t.default)({ownerState:Y},Z,Y)):X.style;R.push(A?w((0,n.internal_serializeStyles)(ve),A):ve)}}),R}return A?w((0,n.internal_serializeStyles)(V),A):V}function E(I={}){const{themeId:P,defaultTheme:A=S,rootShouldForwardProp:Y=b,slotShouldForwardProp:Z=b}=I,V=W=>(0,c.default)((0,t.default)({},W,{theme:C((0,t.default)({},W,{defaultTheme:A,themeId:P}))}));return V.__mui_systemSx=!0,(W,le={})=>{(0,n.internal_processStyles)(W,ge=>ge.filter(Ae=>!(Ae!=null&&Ae.__mui_systemSx)));const{name:R,slot:X,skipVariantsResolver:re,skipSx:ve,overridesResolver:L=x(k(X))}=le,ee=(0,r.default)(le,f),Ee=R&&R.startsWith("Mui")||X?"components":"custom",te=re!==void 0?re:X&&X!=="Root"&&X!=="root"||!1,he=ve||!1;let ue;process.env.NODE_ENV!=="production"&&R&&(ue=`${R}-${k(X||"Root")}`);let ce=b;X==="Root"||X==="root"?ce=Y:X?ce=Z:h(W)&&(ce=void 0);const be=(0,n.default)(W,(0,t.default)({shouldForwardProp:ce,label:ue},ee)),_e=ge=>typeof ge=="function"&&ge.__emotion_real!==ge||(0,o.isPlainObject)(ge)?Ae=>{const N=C({theme:Ae.theme,defaultTheme:A,themeId:P});return H(ge,(0,t.default)({},Ae,{theme:N}),N.modularCssLayers?Ee:void 0)}:ge,pe=(ge,...Ae)=>{let N=_e(ge);const Ue=Ae?Ae.map(_e):[];R&&L&&Ue.push(Me=>{const Le=C((0,t.default)({},Me,{defaultTheme:A,themeId:P}));if(!Le.components||!Le.components[R]||!Le.components[R].styleOverrides)return null;const pt=Le.components[R].styleOverrides,st={};return Object.entries(pt).forEach(([D,O])=>{st[D]=H(O,(0,t.default)({},Me,{theme:Le}),Le.modularCssLayers?"theme":void 0)}),L(Me,st)}),R&&!te&&Ue.push(Me=>{var Le;const pt=C((0,t.default)({},Me,{defaultTheme:A,themeId:P})),st=pt==null||(Le=pt.components)==null||(Le=Le[R])==null?void 0:Le.variants;return H({variants:st},(0,t.default)({},Me,{theme:pt}),pt.modularCssLayers?"theme":void 0)}),he||Ue.push(V);const tt=Ue.length-Ae.length;if(Array.isArray(ge)&&tt>0){const Me=new Array(tt).fill("");N=[...ge,...Me],N.raw=[...ge.raw,...Me]}const He=be(N,...Ue);if(process.env.NODE_ENV!=="production"){let Me;R&&(Me=`${R}${(0,s.default)(X||"")}`),Me===void 0&&(Me=`Styled(${(0,i.default)(W)})`),He.displayName=Me}return W.muiName&&(He.muiName=W.muiName),He};return be.withConfig&&(pe.withConfig=be.withConfig),pe}}return cn}var sv=ov();const iv=rt(sv);function av(e,t){return Ge({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var bt={};const cv=Lr(m0),lv=Lr(q0);var Mu;function uv(){if(Mu)return bt;Mu=1;var e=nt();Object.defineProperty(bt,"__esModule",{value:!0}),bt.alpha=v,bt.blend=H,bt.colorChannel=void 0,bt.darken=b,bt.decomposeColor=i,bt.emphasize=C,bt.getContrastRatio=m,bt.getLuminance=p,bt.hexToRgb=o,bt.hslToRgb=f,bt.lighten=S,bt.private_safeAlpha=h,bt.private_safeColorChannel=void 0,bt.private_safeDarken=w,bt.private_safeEmphasize=x,bt.private_safeLighten=k,bt.recomposeColor=l,bt.rgbToHex=d;var t=e(cv),r=e(lv);function n(E,I=0,P=1){return process.env.NODE_ENV!=="production"&&(E<I||E>P)&&console.error(`MUI: The value provided ${E} is out of range [${I}, ${P}].`),(0,r.default)(E,I,P)}function o(E){E=E.slice(1);const I=new RegExp(`.{1,${E.length>=6?2:1}}`,"g");let P=E.match(I);return P&&P[0].length===1&&(P=P.map(A=>A+A)),P?`rgb${P.length===4?"a":""}(${P.map((A,Y)=>Y<3?parseInt(A,16):Math.round(parseInt(A,16)/255*1e3)/1e3).join(", ")})`:""}function s(E){const I=E.toString(16);return I.length===1?`0${I}`:I}function i(E){if(E.type)return E;if(E.charAt(0)==="#")return i(o(E));const I=E.indexOf("("),P=E.substring(0,I);if(["rgb","rgba","hsl","hsla","color"].indexOf(P)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${E}\` color.
92
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:(0,t.default)(9,E));let A=E.substring(I+1,E.length-1),Y;if(P==="color"){if(A=A.split(" "),Y=A.shift(),A.length===4&&A[3].charAt(0)==="/"&&(A[3]=A[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(Y)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${Y}\` color space.
93
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:(0,t.default)(10,Y))}else A=A.split(",");return A=A.map(Z=>parseFloat(Z)),{type:P,values:A,colorSpace:Y}}const a=E=>{const I=i(E);return I.values.slice(0,3).map((P,A)=>I.type.indexOf("hsl")!==-1&&A!==0?`${P}%`:P).join(" ")};bt.colorChannel=a;const c=(E,I)=>{try{return a(E)}catch{return I&&process.env.NODE_ENV!=="production"&&console.warn(I),E}};bt.private_safeColorChannel=c;function l(E){const{type:I,colorSpace:P}=E;let{values:A}=E;return I.indexOf("rgb")!==-1?A=A.map((Y,Z)=>Z<3?parseInt(Y,10):Y):I.indexOf("hsl")!==-1&&(A[1]=`${A[1]}%`,A[2]=`${A[2]}%`),I.indexOf("color")!==-1?A=`${P} ${A.join(" ")}`:A=`${A.join(", ")}`,`${I}(${A})`}function d(E){if(E.indexOf("#")===0)return E;const{values:I}=i(E);return`#${I.map((P,A)=>s(A===3?Math.round(255*P):P)).join("")}`}function f(E){E=i(E);const{values:I}=E,P=I[0],A=I[1]/100,Y=I[2]/100,Z=A*Math.min(Y,1-Y),V=(R,X=(R+P/30)%12)=>Y-Z*Math.max(Math.min(X-3,9-X,1),-1);let W="rgb";const le=[Math.round(V(0)*255),Math.round(V(8)*255),Math.round(V(4)*255)];return E.type==="hsla"&&(W+="a",le.push(I[3])),l({type:W,values:le})}function p(E){E=i(E);let I=E.type==="hsl"||E.type==="hsla"?i(f(E)).values:E.values;return I=I.map(P=>(E.type!=="color"&&(P/=255),P<=.03928?P/12.92:((P+.055)/1.055)**2.4)),Number((.2126*I[0]+.7152*I[1]+.0722*I[2]).toFixed(3))}function m(E,I){const P=p(E),A=p(I);return(Math.max(P,A)+.05)/(Math.min(P,A)+.05)}function v(E,I){return E=i(E),I=n(I),(E.type==="rgb"||E.type==="hsl")&&(E.type+="a"),E.type==="color"?E.values[3]=`/${I}`:E.values[3]=I,l(E)}function h(E,I,P){try{return v(E,I)}catch{return P&&process.env.NODE_ENV!=="production"&&console.warn(P),E}}function b(E,I){if(E=i(E),I=n(I),E.type.indexOf("hsl")!==-1)E.values[2]*=1-I;else if(E.type.indexOf("rgb")!==-1||E.type.indexOf("color")!==-1)for(let P=0;P<3;P+=1)E.values[P]*=1-I;return l(E)}function w(E,I,P){try{return b(E,I)}catch{return P&&process.env.NODE_ENV!=="production"&&console.warn(P),E}}function S(E,I){if(E=i(E),I=n(I),E.type.indexOf("hsl")!==-1)E.values[2]+=(100-E.values[2])*I;else if(E.type.indexOf("rgb")!==-1)for(let P=0;P<3;P+=1)E.values[P]+=(255-E.values[P])*I;else if(E.type.indexOf("color")!==-1)for(let P=0;P<3;P+=1)E.values[P]+=(1-E.values[P])*I;return l(E)}function k(E,I,P){try{return S(E,I)}catch{return P&&process.env.NODE_ENV!=="production"&&console.warn(P),E}}function C(E,I=.15){return p(E)>.5?b(E,I):S(E,I)}function x(E,I,P){try{return C(E,I)}catch{return P&&process.env.NODE_ENV!=="production"&&console.warn(P),E}}function H(E,I,P,A=1){const Y=(le,R)=>Math.round((le**(1/A)*(1-P)+R**(1/A)*P)**A),Z=i(E),V=i(I),W=[Y(Z.values[0],V.values[0]),Y(Z.values[1],V.values[1]),Y(Z.values[2],V.values[2])];return l({type:"rgb",values:W})}return bt}var Fs=uv();const fo={black:"#000",white:"#fff"},dv={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},In={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},An={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},po={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Mn={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Pn={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},On={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},fv=["mode","contrastThreshold","tonalOffset"],Pu={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:fo.white,default:fo.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Na={text:{primary:fo.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:fo.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Ou(e,t,r,n){const o=n.light||n,s=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=Fs.lighten(e.main,o):t==="dark"&&(e.dark=Fs.darken(e.main,s)))}function pv(e="light"){return e==="dark"?{main:Mn[200],light:Mn[50],dark:Mn[400]}:{main:Mn[700],light:Mn[400],dark:Mn[800]}}function hv(e="light"){return e==="dark"?{main:In[200],light:In[50],dark:In[400]}:{main:In[500],light:In[300],dark:In[700]}}function mv(e="light"){return e==="dark"?{main:An[500],light:An[300],dark:An[700]}:{main:An[700],light:An[400],dark:An[800]}}function gv(e="light"){return e==="dark"?{main:Pn[400],light:Pn[300],dark:Pn[700]}:{main:Pn[700],light:Pn[500],dark:Pn[900]}}function vv(e="light"){return e==="dark"?{main:On[400],light:On[300],dark:On[700]}:{main:On[800],light:On[500],dark:On[900]}}function yv(e="light"){return e==="dark"?{main:po[400],light:po[300],dark:po[700]}:{main:"#ed6c02",light:po[500],dark:po[900]}}function bv(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2}=e,o=Gr(e,fv),s=e.primary||pv(t),i=e.secondary||hv(t),a=e.error||mv(t),c=e.info||gv(t),l=e.success||vv(t),d=e.warning||yv(t);function f(h){const b=Fs.getContrastRatio(h,Na.text.primary)>=r?Na.text.primary:Pu.text.primary;if(process.env.NODE_ENV!=="production"){const w=Fs.getContrastRatio(h,b);w<3&&console.error([`MUI: The contrast ratio of ${w}:1 for ${b} on ${h}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
94
+ `))}return b}const p=({color:h,name:b,mainShade:w=500,lightShade:S=300,darkShade:k=700})=>{if(h=Ge({},h),!h.main&&h[w]&&(h.main=h[w]),!h.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
95
+ The color object needs to have a \`main\` property or a \`${w}\` property.`:eo(11,b?` (${b})`:"",w));if(typeof h.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
96
96
  \`color.main\` should be a string, but \`${JSON.stringify(h.main)}\` was provided instead.
97
97
 
98
98
  Did you intend to use one of the following approaches?
@@ -105,76 +105,76 @@ const theme1 = createTheme({ palette: {
105
105
 
106
106
  const theme2 = createTheme({ palette: {
107
107
  primary: { main: green[500] },
108
- } });`:Jn(12,b?` (${b})`:"",JSON.stringify(h.main)));return Pu(h,"light",C,n),Pu(h,"dark",D,n),h.contrastText||(h.contrastText=f(h.main)),h},y={dark:ja,light:Mu};return process.env.NODE_ENV!=="production"&&(y[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),kr(Ze({common:Ze({},uo),mode:t,primary:p({color:s,name:"primary"}),secondary:p({color:i,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:a,name:"error"}),warning:p({color:d,name:"warning"}),info:p({color:c,name:"info"}),success:p({color:l,name:"success"}),grey:lv,contrastThreshold:r,getContrastText:f,augmentColor:p,tonalOffset:n},y[t]),o)}const yv=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function bv(e){return Math.round(e*1e5)/1e5}const Ou={textTransform:"uppercase"},ju='"Roboto", "Helvetica", "Arial", sans-serif';function _v(e,t){const r=typeof t=="function"?t(e):t,{fontFamily:n=ju,fontSize:o=14,fontWeightLight:s=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:c=700,htmlFontSize:l=16,allVariants:d,pxToRem:f}=r,p=Gr(r,yv);process.env.NODE_ENV!=="production"&&(typeof o!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof l!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const y=o/14,m=f||(S=>`${S/l*y}rem`),h=(S,C,D,k,w)=>Ze({fontFamily:n,fontWeight:S,fontSize:m(C),lineHeight:D},n===ju?{letterSpacing:`${bv(k/C)}em`}:{},w,d),b={h1:h(s,96,1.167,-1.5),h2:h(s,60,1.2,-.5),h3:h(i,48,1.167,0),h4:h(i,34,1.235,.25),h5:h(i,24,1.334,0),h6:h(a,20,1.6,.15),subtitle1:h(i,16,1.75,.15),subtitle2:h(a,14,1.57,.1),body1:h(i,16,1.5,.15),body2:h(i,14,1.43,.15),button:h(a,14,1.75,.4,Ou),caption:h(i,12,1.66,.4),overline:h(i,12,2.66,1,Ou),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return kr(Ze({htmlFontSize:l,pxToRem:m,fontFamily:n,fontSize:o,fontWeightLight:s,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:c},b),p,{clone:!1})}const xv=.2,wv=.14,Sv=.12;function gt(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${xv})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${wv})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Sv})`].join(",")}const Cv=["none",gt(0,2,1,-1,0,1,1,0,0,1,3,0),gt(0,3,1,-2,0,2,2,0,0,1,5,0),gt(0,3,3,-2,0,3,4,0,0,1,8,0),gt(0,2,4,-1,0,4,5,0,0,1,10,0),gt(0,3,5,-1,0,5,8,0,0,1,14,0),gt(0,3,5,-1,0,6,10,0,0,1,18,0),gt(0,4,5,-2,0,7,10,1,0,2,16,1),gt(0,5,5,-3,0,8,10,1,0,3,14,2),gt(0,5,6,-3,0,9,12,1,0,3,16,2),gt(0,6,6,-3,0,10,14,1,0,4,18,3),gt(0,6,7,-4,0,11,15,1,0,4,20,3),gt(0,7,8,-4,0,12,17,2,0,5,22,4),gt(0,7,8,-4,0,13,19,2,0,5,24,4),gt(0,7,9,-4,0,14,21,2,0,5,26,4),gt(0,8,9,-5,0,15,22,2,0,6,28,5),gt(0,8,10,-5,0,16,24,2,0,6,30,5),gt(0,8,11,-5,0,17,26,2,0,6,32,5),gt(0,9,11,-5,0,18,28,2,0,7,34,6),gt(0,9,12,-6,0,19,29,2,0,7,36,6),gt(0,10,13,-6,0,20,31,3,0,8,38,7),gt(0,10,13,-6,0,21,33,3,0,8,40,7),gt(0,10,14,-6,0,22,35,3,0,8,42,7),gt(0,11,14,-7,0,23,36,3,0,9,44,8),gt(0,11,15,-7,0,24,38,3,0,9,46,8)],Ev=["duration","easing","delay"],kv={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Dv={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Ru(e){return`${Math.round(e)}ms`}function Tv(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function Iv(e){const t=Ze({},kv,e.easing),r=Ze({},Dv,e.duration);return Ze({getAutoHeightDuration:Tv,create:(o=["all"],s={})=>{const{duration:i=r.standard,easing:a=t.easeInOut,delay:c=0}=s,l=Gr(s,Ev);if(process.env.NODE_ENV!=="production"){const d=p=>typeof p=="string",f=p=>!isNaN(parseFloat(p));!d(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!f(i)&&!d(i)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${i}.`),d(a)||console.error('MUI: Argument "easing" must be a string.'),!f(c)&&!d(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof s!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
109
- `)),Object.keys(l).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(l).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(d=>`${d} ${typeof i=="string"?i:Ru(i)} ${a} ${typeof c=="string"?c:Ru(c)}`).join(",")}},e,{easing:t,duration:r})}const Av={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Mv=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Pv(e={},...t){const{mixins:r={},palette:n={},transitions:o={},typography:s={}}=e,i=Gr(e,Mv);if(e.vars&&e.generateCssVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":Jn(18));const a=vv(n),c=Tu(e);let l=kr(c,{mixins:sv(c.breakpoints,r),palette:a,shadows:Cv.slice(),typography:_v(a,s),transitions:Iv(o),zIndex:Ze({},Av)});if(l=kr(l,i),l=t.reduce((d,f)=>kr(d,f),l),process.env.NODE_ENV!=="production"){const d=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],f=(p,y)=>{let m;for(m in p){const h=p[m];if(d.indexOf(m)!==-1&&Object.keys(h).length>0){if(process.env.NODE_ENV!=="production"){const b=ma("",m);console.error([`MUI: The \`${y}\` component increases the CSS specificity of the \`${m}\` internal state.`,"You can not override it like this: ",JSON.stringify(p,null,2),"",`Instead, you need to use the '&.${b}' syntax:`,JSON.stringify({root:{[`&.${b}`]:h}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
110
- `))}p[m]={}}}};Object.keys(l.components).forEach(p=>{const y=l.components[p].styleOverrides;y&&p.indexOf("Mui")===0&&f(y,p)})}return l.unstable_sxConfig=Ze({},lo,i?.unstable_sxConfig),l.unstable_sx=function(f){return zs({sx:f,theme:this})},l}const Ov=Pv(),jv="$$material";function Rv(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Nv=ov({themeId:jv,defaultTheme:Ov,rootShouldForwardProp:e=>Rv(e)&&e!=="classes"});function $v(e){return ma("MuiSvgIcon",e)}U0("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Lv=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],zv=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${Zr(t)}`,`fontSize${Zr(r)}`]};return F0(o,$v,n)},Bv=Nv("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${Zr(r.color)}`],t[`fontSize${Zr(r.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var r,n,o,s,i,a,c,l,d,f,p,y,m;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(r=e.transitions)==null||(n=r.create)==null?void 0:n.call(r,"fill",{duration:(o=e.transitions)==null||(o=o.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((s=e.typography)==null||(i=s.pxToRem)==null?void 0:i.call(s,20))||"1.25rem",medium:((a=e.typography)==null||(c=a.pxToRem)==null?void 0:c.call(a,24))||"1.5rem",large:((l=e.typography)==null||(d=l.pxToRem)==null?void 0:d.call(l,35))||"2.1875rem"}[t.fontSize],color:(f=(p=(e.vars||e).palette)==null||(p=p[t.color])==null?void 0:p.main)!=null?f:{action:(y=(e.vars||e).palette)==null||(y=y.action)==null?void 0:y.active,disabled:(m=(e.vars||e).palette)==null||(m=m.action)==null?void 0:m.disabled,inherit:void 0}[t.color]}}),Fs=X.forwardRef(function(t,r){const n=G0({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:i="inherit",component:a="svg",fontSize:c="medium",htmlColor:l,inheritViewBox:d=!1,titleAccess:f,viewBox:p="0 0 24 24"}=n,y=Gr(n,Lv),m=X.isValidElement(o)&&o.type==="svg",h=Ze({},n,{color:i,component:a,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:p,hasSvgAsChild:m}),b={};d||(b.viewBox=p);const S=zv(h);return u.jsxs(Bv,Ze({as:a,className:$t(S.root,s),focusable:"false",color:l,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:r},b,y,m&&o.props,{ownerState:h,children:[m?o.props.children:o,f?u.jsx("title",{children:f}):null]}))});process.env.NODE_ENV!=="production"&&(Fs.propTypes={children:Ne.node,classes:Ne.object,className:Ne.string,color:Ne.oneOfType([Ne.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),Ne.string]),component:Ne.elementType,fontSize:Ne.oneOfType([Ne.oneOf(["inherit","large","medium","small"]),Ne.string]),htmlColor:Ne.string,inheritViewBox:Ne.bool,shapeRendering:Ne.string,sx:Ne.oneOfType([Ne.arrayOf(Ne.oneOfType([Ne.func,Ne.object,Ne.bool])),Ne.func,Ne.object]),titleAccess:Ne.string,viewBox:Ne.string}),Fs.muiName="SvgIcon";function Fv(e,t){function r(n,o){return u.jsx(Fs,Ze({"data-testid":`${t}Icon`,ref:o},n,{children:e}))}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=Fs.muiName,X.memo(X.forwardRef(r))}const Vv=Lr(Object.freeze(Object.defineProperty({__proto__:null,capitalize:Zr,createChainedFunction:x0,createSvgIcon:Fv,debounce:w0,deprecatedPropType:S0,isMuiElement:C0,ownerDocument:Pl,ownerWindow:E0,requirePropFactory:k0,setRef:Ol,unstable_ClassNameGenerator:{configure:e=>{process.env.NODE_ENV!=="production"&&console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.","","You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead","","The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401","","The updated documentation: https://mui.com/guides/classname-generator/"].join(`
111
- `)),Ll.configure(e)}},unstable_useEnhancedEffect:jl,unstable_useId:T0,unsupportedProp:I0,useControlled:A0,useEventCallback:M0,useForkRef:P0,useIsFocusVisible:B0},Symbol.toStringTag,{value:"Module"})));var Nu;function dt(){return Nu||(Nu=1,(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=Vv})(na)),na}var $u;function Uv(){if($u)return Xn;$u=1;var e=st();Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.default=void 0;var t=e(dt()),r=ct();return Xn.default=(0,t.default)((0,r.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),Xn}var Wv=Uv();const Hv=ot(Wv);var po={},Lu;function Yv(){if(Lu)return po;Lu=1;var e=st();Object.defineProperty(po,"__esModule",{value:!0}),po.default=void 0;var t=e(dt()),r=ct();return po.default=(0,t.default)((0,r.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),po}var qv=Yv();const Zv=ot(qv);var ho={},zu;function Gv(){if(zu)return ho;zu=1;var e=st();Object.defineProperty(ho,"__esModule",{value:!0}),ho.default=void 0;var t=e(dt()),r=ct();return ho.default=(0,t.default)((0,r.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),ho}var Kv=Gv();const Qv=ot(Kv),Xv=({header:e,sidebar:t,mainContent:r})=>{const[n,o]=v.useState(!1),[s,i]=v.useState(!1),a=()=>{o(!n)},c=()=>{i(!s)};return u.jsxs("div",{className:`${vr.dashboardContainer} ${s?vr.sidebarCollapsed:""}`,children:[u.jsxs("header",{className:vr.header,children:[u.jsx(g.IconButton,{onClick:a,className:vr.menuButton,children:u.jsx(Hv,{})}),u.jsx("div",{className:vr.headerContent,children:e})]}),u.jsxs("aside",{className:`${vr.sidebar} ${n?vr.sidebarOpen:""}`,children:[u.jsx("div",{className:vr.sidebarContent,children:t}),u.jsx(g.IconButton,{onClick:c,className:vr.collapseButton,style:{display:"none"},children:s?u.jsx(Qv,{}):u.jsx(Zv,{})})]}),u.jsx("main",{className:vr.mainContent,children:r}),n&&u.jsx("div",{className:vr.overlay,onClick:a})]})},cn={headerContainer:"_headerContainer_if4sf_1",navAndDate:"_navAndDate_if4sf_17",navButton:"_navButton_if4sf_29",datePickerInput:"_datePickerInput_if4sf_61",datePickerButton:"_datePickerButton_if4sf_91",addEventButton:"_addEventButton_if4sf_135"};function Vs(){return typeof window<"u"}function On(e){return Bu(e)?(e.nodeName||"").toLowerCase():"#document"}function nr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ar(e){var t;return(t=(Bu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Bu(e){return Vs()?e instanceof Node||e instanceof nr(e).Node:!1}function Ut(e){return Vs()?e instanceof Element||e instanceof nr(e).Element:!1}function Mr(e){return Vs()?e instanceof HTMLElement||e instanceof nr(e).HTMLElement:!1}function Fu(e){return!Vs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof nr(e).ShadowRoot}const Jv=new Set(["inline","contents"]);function mo(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=fr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Jv.has(o)}const ey=new Set(["table","td","th"]);function ty(e){return ey.has(On(e))}const ry=[":popover-open",":modal"];function Us(e){return ry.some(t=>{try{return e.matches(t)}catch{return!1}})}const ny=["transform","translate","scale","rotate","perspective"],oy=["transform","translate","scale","rotate","perspective","filter"],sy=["paint","layout","strict","content"];function Ra(e){const t=Na(),r=Ut(e)?fr(e):e;return ny.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||oy.some(n=>(r.willChange||"").includes(n))||sy.some(n=>(r.contain||"").includes(n))}function iy(e){let t=Qr(e);for(;Mr(t)&&!jn(t);){if(Ra(t))return t;if(Us(t))return null;t=Qr(t)}return null}function Na(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ay=new Set(["html","body","#document"]);function jn(e){return ay.has(On(e))}function fr(e){return nr(e).getComputedStyle(e)}function Ws(e){return Ut(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qr(e){if(On(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Fu(e)&&e.host||Ar(e);return Fu(t)?t.host:t}function Vu(e){const t=Qr(e);return jn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Mr(t)&&mo(t)?t:Vu(t)}function go(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Vu(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),i=nr(o);if(s){const a=$a(i);return t.concat(i,i.visualViewport||[],mo(o)?o:[],a&&r?go(a):[])}return t.concat(o,go(o,[],r))}function $a(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Rn=Math.min,ln=Math.max,Hs=Math.round,Ys=Math.floor,Pr=e=>({x:e,y:e}),cy={left:"right",right:"left",bottom:"top",top:"bottom"},ly={start:"end",end:"start"};function uy(e,t,r){return ln(e,Rn(t,r))}function qs(e,t){return typeof e=="function"?e(t):e}function Nn(e){return e.split("-")[0]}function vo(e){return e.split("-")[1]}function dy(e){return e==="x"?"y":"x"}function La(e){return e==="y"?"height":"width"}const fy=new Set(["top","bottom"]);function un(e){return fy.has(Nn(e))?"y":"x"}function za(e){return dy(un(e))}function py(e,t,r){r===void 0&&(r=!1);const n=vo(e),o=za(e),s=La(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Zs(i)),[i,Zs(i)]}function hy(e){const t=Zs(e);return[Ba(e),t,Ba(t)]}function Ba(e){return e.replace(/start|end/g,t=>ly[t])}const Uu=["left","right"],Wu=["right","left"],my=["top","bottom"],gy=["bottom","top"];function vy(e,t,r){switch(e){case"top":case"bottom":return r?t?Wu:Uu:t?Uu:Wu;case"left":case"right":return t?my:gy;default:return[]}}function yy(e,t,r,n){const o=vo(e);let s=vy(Nn(e),r==="start",n);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Ba)))),s}function Zs(e){return e.replace(/left|right|bottom|top/g,t=>cy[t])}function by(e){return{top:0,right:0,bottom:0,left:0,...e}}function Hu(e){return typeof e!="number"?by(e):{top:e,right:e,bottom:e,left:e}}function Gs(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}var _y=typeof document<"u",xy=function(){},Ks=_y?v.useLayoutEffect:xy;const wy={...X}.useInsertionEffect||(e=>e());function Sy(e){const t=X.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return wy(()=>{t.current=e}),X.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}function Yu(e,t,r){let{reference:n,floating:o}=e;const s=un(t),i=za(t),a=La(i),c=Nn(t),l=s==="y",d=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,p=n[a]/2-o[a]/2;let y;switch(c){case"top":y={x:d,y:n.y-o.height};break;case"bottom":y={x:d,y:n.y+n.height};break;case"right":y={x:n.x+n.width,y:f};break;case"left":y={x:n.x-o.width,y:f};break;default:y={x:n.x,y:n.y}}switch(vo(t)){case"start":y[i]-=p*(r&&l?-1:1);break;case"end":y[i]+=p*(r&&l?-1:1);break}return y}const Cy=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:i}=r,a=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=Yu(l,n,c),p=n,y={},m=0;for(let h=0;h<a.length;h++){const{name:b,fn:S}=a[h],{x:C,y:D,data:k,reset:w}=await S({x:d,y:f,initialPlacement:n,placement:p,strategy:o,middlewareData:y,rects:l,platform:i,elements:{reference:e,floating:t}});d=C??d,f=D??f,y={...y,[b]:{...y[b],...k}},w&&m<=50&&(m++,typeof w=="object"&&(w.placement&&(p=w.placement),w.rects&&(l=w.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:d,y:f}=Yu(l,p,c)),h=-1)}return{x:d,y:f,placement:p,strategy:o,middlewareData:y}};async function Ey(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:y=0}=qs(t,e),m=Hu(y),b=a[p?f==="floating"?"reference":"floating":f],S=Gs(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(b)))==null||r?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:d,strategy:c})),C=f==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,D=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),k=await(s.isElement==null?void 0:s.isElement(D))?await(s.getScale==null?void 0:s.getScale(D))||{x:1,y:1}:{x:1,y:1},w=Gs(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:D,strategy:c}):C);return{top:(S.top-w.top+m.top)/k.y,bottom:(w.bottom-S.bottom+m.bottom)/k.y,left:(S.left-w.left+m.left)/k.x,right:(w.right-S.right+m.right)/k.x}}const ky=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:l,padding:d=0}=qs(e,t)||{};if(l==null)return{};const f=Hu(d),p={x:r,y:n},y=za(o),m=La(y),h=await i.getDimensions(l),b=y==="y",S=b?"top":"left",C=b?"bottom":"right",D=b?"clientHeight":"clientWidth",k=s.reference[m]+s.reference[y]-p[y]-s.floating[m],w=p[y]-s.reference[y],B=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let E=B?B[D]:0;(!E||!await(i.isElement==null?void 0:i.isElement(B)))&&(E=a.floating[D]||s.floating[m]);const I=k/2-w/2,P=E/2-h[m]/2-1,A=Rn(f[S],P),W=Rn(f[C],P),q=A,F=E-h[m]-W,Z=E/2-h[m]/2+I,le=uy(q,Z,F),V=!c.arrow&&vo(o)!=null&&Z!==le&&s.reference[m]/2-(Z<q?A:W)-h[m]/2<0,ee=V?Z<q?Z-q:Z-F:0;return{[y]:p[y]+ee,data:{[y]:le,centerOffset:Z-le-ee,...V&&{alignmentOffset:ee}},reset:V}}}),Dy=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...b}=qs(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const S=Nn(o),C=un(a),D=Nn(a)===a,k=await(c.isRTL==null?void 0:c.isRTL(l.floating)),w=p||(D||!h?[Zs(a)]:hy(a)),B=m!=="none";!p&&B&&w.push(...yy(a,h,m,k));const E=[a,...w],I=await Ey(t,b),P=[];let A=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&P.push(I[S]),f){const Z=py(o,i,k);P.push(I[Z[0]],I[Z[1]])}if(A=[...A,{placement:o,overflows:P}],!P.every(Z=>Z<=0)){var W,q;const Z=(((W=s.flip)==null?void 0:W.index)||0)+1,le=E[Z];if(le&&(!(f==="alignment"?C!==un(le):!1)||A.every(ue=>un(ue.placement)===C?ue.overflows[0]>0:!0)))return{data:{index:Z,overflows:A},reset:{placement:le}};let V=(q=A.filter(ee=>ee.overflows[0]<=0).sort((ee,ue)=>ee.overflows[1]-ue.overflows[1])[0])==null?void 0:q.placement;if(!V)switch(y){case"bestFit":{var F;const ee=(F=A.filter(ue=>{if(B){const ye=un(ue.placement);return ye===C||ye==="y"}return!0}).map(ue=>[ue.placement,ue.overflows.filter(ye=>ye>0).reduce((ye,L)=>ye+L,0)]).sort((ue,ye)=>ue[1]-ye[1])[0])==null?void 0:F[0];ee&&(V=ee);break}case"initialPlacement":V=a;break}if(o!==V)return{reset:{placement:V}}}return{}}}},Ty=new Set(["left","top"]);async function Iy(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=Nn(r),a=vo(r),c=un(r)==="y",l=Ty.has(i)?-1:1,d=s&&c?-1:1,f=qs(t,e);let{mainAxis:p,crossAxis:y,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof m=="number"&&(y=a==="end"?m*-1:m),c?{x:y*d,y:p*l}:{x:p*l,y:y*d}}const Ay=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await Iy(t,e);return i===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}};function qu(e){const t=fr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Mr(e),s=o?e.offsetWidth:r,i=o?e.offsetHeight:n,a=Hs(r)!==s||Hs(n)!==i;return a&&(r=s,n=i),{width:r,height:n,$:a}}function Fa(e){return Ut(e)?e:e.contextElement}function $n(e){const t=Fa(e);if(!Mr(t))return Pr(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=qu(t);let i=(s?Hs(r.width):r.width)/n,a=(s?Hs(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const My=Pr(0);function Zu(e){const t=nr(e);return!Na()||!t.visualViewport?My:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Py(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==nr(e)?!1:t}function dn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=Fa(e);let i=Pr(1);t&&(n?Ut(n)&&(i=$n(n)):i=$n(e));const a=Py(s,r,n)?Zu(s):Pr(0);let c=(o.left+a.x)/i.x,l=(o.top+a.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(s){const p=nr(s),y=n&&Ut(n)?nr(n):n;let m=p,h=$a(m);for(;h&&n&&y!==m;){const b=$n(h),S=h.getBoundingClientRect(),C=fr(h),D=S.left+(h.clientLeft+parseFloat(C.paddingLeft))*b.x,k=S.top+(h.clientTop+parseFloat(C.paddingTop))*b.y;c*=b.x,l*=b.y,d*=b.x,f*=b.y,c+=D,l+=k,m=nr(h),h=$a(m)}}return Gs({width:d,height:f,x:c,y:l})}function Qs(e,t){const r=Ws(e).scrollLeft;return t?t.left+r:dn(Ar(e)).left+r}function Gu(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Qs(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function Oy(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",i=Ar(n),a=t?Us(t.floating):!1;if(n===i||a&&s)return r;let c={scrollLeft:0,scrollTop:0},l=Pr(1);const d=Pr(0),f=Mr(n);if((f||!f&&!s)&&((On(n)!=="body"||mo(i))&&(c=Ws(n)),Mr(n))){const y=dn(n);l=$n(n),d.x=y.x+n.clientLeft,d.y=y.y+n.clientTop}const p=i&&!f&&!s?Gu(i,c):Pr(0);return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+d.x+p.x,y:r.y*l.y-c.scrollTop*l.y+d.y+p.y}}function jy(e){return Array.from(e.getClientRects())}function Ry(e){const t=Ar(e),r=Ws(e),n=e.ownerDocument.body,o=ln(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=ln(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+Qs(e);const a=-r.scrollTop;return fr(n).direction==="rtl"&&(i+=ln(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:i,y:a}}const Ku=25;function Ny(e,t){const r=nr(e),n=Ar(e),o=r.visualViewport;let s=n.clientWidth,i=n.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const d=Na();(!d||d&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}const l=Qs(n);if(l<=0){const d=n.ownerDocument,f=d.body,p=getComputedStyle(f),y=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(n.clientWidth-f.clientWidth-y);m<=Ku&&(s-=m)}else l<=Ku&&(s+=l);return{width:s,height:i,x:a,y:c}}const $y=new Set(["absolute","fixed"]);function Ly(e,t){const r=dn(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=Mr(e)?$n(e):Pr(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,l=n*s.y;return{width:i,height:a,x:c,y:l}}function Qu(e,t,r){let n;if(t==="viewport")n=Ny(e,r);else if(t==="document")n=Ry(Ar(e));else if(Ut(t))n=Ly(t,r);else{const o=Zu(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Gs(n)}function Xu(e,t){const r=Qr(e);return r===t||!Ut(r)||jn(r)?!1:fr(r).position==="fixed"||Xu(r,t)}function zy(e,t){const r=t.get(e);if(r)return r;let n=go(e,[],!1).filter(a=>Ut(a)&&On(a)!=="body"),o=null;const s=fr(e).position==="fixed";let i=s?Qr(e):e;for(;Ut(i)&&!jn(i);){const a=fr(i),c=Ra(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&$y.has(o.position)||mo(i)&&!c&&Xu(e,i))?n=n.filter(d=>d!==i):o=a,i=Qr(i)}return t.set(e,n),n}function By(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?Us(t)?[]:zy(t,this._c):[].concat(r),n],a=i[0],c=i.reduce((l,d)=>{const f=Qu(t,d,o);return l.top=ln(f.top,l.top),l.right=Rn(f.right,l.right),l.bottom=Rn(f.bottom,l.bottom),l.left=ln(f.left,l.left),l},Qu(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Fy(e){const{width:t,height:r}=qu(e);return{width:t,height:r}}function Vy(e,t,r){const n=Mr(t),o=Ar(t),s=r==="fixed",i=dn(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Pr(0);function l(){c.x=Qs(o)}if(n||!n&&!s)if((On(t)!=="body"||mo(o))&&(a=Ws(t)),n){const y=dn(t,!0,s,t);c.x=y.x+t.clientLeft,c.y=y.y+t.clientTop}else o&&l();s&&!n&&o&&l();const d=o&&!n&&!s?Gu(o,a):Pr(0),f=i.left+a.scrollLeft-c.x-d.x,p=i.top+a.scrollTop-c.y-d.y;return{x:f,y:p,width:i.width,height:i.height}}function Va(e){return fr(e).position==="static"}function Ju(e,t){if(!Mr(e)||fr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ar(e)===r&&(r=r.ownerDocument.body),r}function ed(e,t){const r=nr(e);if(Us(e))return r;if(!Mr(e)){let o=Qr(e);for(;o&&!jn(o);){if(Ut(o)&&!Va(o))return o;o=Qr(o)}return r}let n=Ju(e,t);for(;n&&ty(n)&&Va(n);)n=Ju(n,t);return n&&jn(n)&&Va(n)&&!Ra(n)?r:n||iy(e)||r}const Uy=async function(e){const t=this.getOffsetParent||ed,r=this.getDimensions,n=await r(e.floating);return{reference:Vy(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Wy(e){return fr(e).direction==="rtl"}const Hy={convertOffsetParentRelativeRectToViewportRelativeRect:Oy,getDocumentElement:Ar,getClippingRect:By,getOffsetParent:ed,getElementRects:Uy,getClientRects:jy,getDimensions:Fy,getScale:$n,isElement:Ut,isRTL:Wy};function td(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Yy(e,t){let r=null,n;const o=Ar(e);function s(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:d,top:f,width:p,height:y}=l;if(a||t(),!p||!y)return;const m=Ys(f),h=Ys(o.clientWidth-(d+p)),b=Ys(o.clientHeight-(f+y)),S=Ys(d),D={rootMargin:-m+"px "+-h+"px "+-b+"px "+-S+"px",threshold:ln(0,Rn(1,c))||1};let k=!0;function w(B){const E=B[0].intersectionRatio;if(E!==c){if(!k)return i();E?i(!1,E):n=setTimeout(()=>{i(!1,1e-7)},1e3)}E===1&&!td(l,e.getBoundingClientRect())&&i(),k=!1}try{r=new IntersectionObserver(w,{...D,root:o.ownerDocument})}catch{r=new IntersectionObserver(w,D)}r.observe(e)}return i(!0),s}function qy(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=Fa(e),d=o||s?[...l?go(l):[],...go(t)]:[];d.forEach(S=>{o&&S.addEventListener("scroll",r,{passive:!0}),s&&S.addEventListener("resize",r)});const f=l&&a?Yy(l,r):null;let p=-1,y=null;i&&(y=new ResizeObserver(S=>{let[C]=S;C&&C.target===l&&y&&(y.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var D;(D=y)==null||D.observe(t)})),r()}),l&&!c&&y.observe(l),y.observe(t));let m,h=c?dn(e):null;c&&b();function b(){const S=dn(e);h&&!td(h,S)&&r(),h=S,m=requestAnimationFrame(b)}return r(),()=>{var S;d.forEach(C=>{o&&C.removeEventListener("scroll",r),s&&C.removeEventListener("resize",r)}),f?.(),(S=y)==null||S.disconnect(),y=null,c&&cancelAnimationFrame(m)}}const Zy=Ay,Gy=Dy,rd=ky,Ky=(e,t,r)=>{const n=new Map,o={platform:Hy,...r},s={...o.platform,_c:n};return Cy(e,t,{...o,platform:s})};var Qy=typeof document<"u",Xy=function(){},Xs=Qy?v.useLayoutEffect:Xy;function Js(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Js(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!Js(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function nd(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function od(e,t){const r=nd(e);return Math.round(t*r)/r}function Ua(e){const t=X.useRef(e);return Xs(()=>{t.current=e}),t}function Jy(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[d,f]=X.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,y]=X.useState(n);Js(p,n)||y(n);const[m,h]=X.useState(null),[b,S]=X.useState(null),C=X.useCallback(ue=>{ue!==B.current&&(B.current=ue,h(ue))},[]),D=X.useCallback(ue=>{ue!==E.current&&(E.current=ue,S(ue))},[]),k=s||m,w=i||b,B=X.useRef(null),E=X.useRef(null),I=X.useRef(d),P=c!=null,A=Ua(c),W=Ua(o),q=Ua(l),F=X.useCallback(()=>{if(!B.current||!E.current)return;const ue={placement:t,strategy:r,middleware:p};W.current&&(ue.platform=W.current),Ky(B.current,E.current,ue).then(ye=>{const L={...ye,isPositioned:q.current!==!1};Z.current&&!Js(I.current,L)&&(I.current=L,t0.flushSync(()=>{f(L)}))})},[p,t,r,W,q]);Xs(()=>{l===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,f(ue=>({...ue,isPositioned:!1})))},[l]);const Z=X.useRef(!1);Xs(()=>(Z.current=!0,()=>{Z.current=!1}),[]),Xs(()=>{if(k&&(B.current=k),w&&(E.current=w),k&&w){if(A.current)return A.current(k,w,F);F()}},[k,w,F,A,P]);const le=X.useMemo(()=>({reference:B,floating:E,setReference:C,setFloating:D}),[C,D]),V=X.useMemo(()=>({reference:k,floating:w}),[k,w]),ee=X.useMemo(()=>{const ue={position:r,left:0,top:0};if(!V.floating)return ue;const ye=od(V.floating,d.x),L=od(V.floating,d.y);return a?{...ue,transform:"translate("+ye+"px, "+L+"px)",...nd(V.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:ye,top:L}},[r,a,V.floating,d.x,d.y]);return X.useMemo(()=>({...d,update:F,refs:le,elements:V,floatingStyles:ee}),[d,F,le,V,ee])}const eb=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?rd({element:n.current,padding:o}).fn(r):{}:n?rd({element:n,padding:o}).fn(r):{}}}},tb=(e,t)=>({...Zy(e),options:[e,t]}),rb=(e,t)=>({...Gy(e),options:[e,t]}),nb=(e,t)=>({...eb(e),options:[e,t]}),ob={...X};let sd=!1,sb=0;const id=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+sb++;function ib(){const[e,t]=X.useState(()=>sd?id():void 0);return Ks(()=>{e==null&&t(id())},[]),X.useEffect(()=>{sd=!0},[]),e}const ad=ob.useId||ib;let yo;process.env.NODE_ENV!=="production"&&(yo=new Set);function ab(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=yo)!=null&&e.has(o))){var s;(s=yo)==null||s.add(o),console.warn(o)}}function cb(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=yo)!=null&&e.has(o))){var s;(s=yo)==null||s.add(o),console.error(o)}}const lb=X.forwardRef(function(t,r){const{context:{placement:n,elements:{floating:o},middlewareData:{arrow:s,shift:i}},width:a=14,height:c=7,tipRadius:l=0,strokeWidth:d=0,staticOffset:f,stroke:p,d:y,style:{transform:m,...h}={},...b}=t;process.env.NODE_ENV!=="production"&&(r||ab("The `ref` prop is required for `FloatingArrow`."));const S=ad(),[C,D]=X.useState(!1);if(Ks(()=>{if(!o)return;fr(o).direction==="rtl"&&D(!0)},[o]),!o)return null;const[k,w]=n.split("-"),B=k==="top"||k==="bottom";let E=f;(B&&i!=null&&i.x||!B&&i!=null&&i.y)&&(E=null);const I=d*2,P=I/2,A=a/2*(l/-8+1),W=c/2*l/4,q=!!y,F=E&&w==="end"?"bottom":"top";let Z=E&&w==="end"?"right":"left";E&&C&&(Z=w==="end"?"left":"right");const le=s?.x!=null?E||s.x:"",V=s?.y!=null?E||s.y:"",ee=y||"M0,0"+(" H"+a)+(" L"+(a-A)+","+(c-W))+(" Q"+a/2+","+c+" "+A+","+(c-W))+" Z",ue={top:q?"rotate(180deg)":"",left:q?"rotate(90deg)":"rotate(-90deg)",bottom:q?"":"rotate(180deg)",right:q?"rotate(-90deg)":"rotate(90deg)"}[k];return u.jsxs("svg",{...b,"aria-hidden":!0,ref:r,width:q?a:a+I,height:a,viewBox:"0 0 "+a+" "+(c>a?c:a),style:{position:"absolute",pointerEvents:"none",[Z]:le,[F]:V,[k]:B||q?"100%":"calc(100% - "+I/2+"px)",transform:[ue,m].filter(ye=>!!ye).join(" "),...h},children:[I>0&&u.jsx("path",{clipPath:"url(#"+S+")",fill:"none",stroke:p,strokeWidth:I+(y?0:1),d:ee}),u.jsx("path",{stroke:I&&!y?b.fill:"none",d:ee}),u.jsx("clipPath",{id:S,children:u.jsx("rect",{x:-P,y:P*(q?-1:1),width:a+I,height:a})})]})});function ub(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.has(t)||e.set(t,new Set),e.get(t).add(r)},off(t,r){var n;(n=e.get(t))==null||n.delete(r)}}}const db=X.createContext(null),fb=X.createContext(null),pb=()=>{var e;return((e=X.useContext(db))==null?void 0:e.id)||null},hb=()=>X.useContext(fb);function mb(e){const{open:t=!1,onOpenChange:r,elements:n}=e,o=ad(),s=X.useRef({}),[i]=X.useState(()=>ub()),a=pb()!=null;if(process.env.NODE_ENV!=="production"){const y=n.reference;y&&!Ut(y)&&cb("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,l]=X.useState(n.reference),d=Sy((y,m,h)=>{s.current.openEvent=y?m:void 0,i.emit("openchange",{open:y,event:m,reason:h,nested:a}),r?.(y,m,h)}),f=X.useMemo(()=>({setPositionReference:l}),[]),p=X.useMemo(()=>({reference:c||n.reference||null,floating:n.floating||null,domReference:n.reference}),[c,n.reference,n.floating]);return X.useMemo(()=>({dataRef:s,open:t,onOpenChange:d,elements:p,events:i,floatingId:o,refs:f}),[t,d,p,i,o,f])}function gb(e){e===void 0&&(e={});const{nodeId:t}=e,r=mb({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,o=n.elements,[s,i]=X.useState(null),[a,c]=X.useState(null),d=o?.domReference||s,f=X.useRef(null),p=hb();Ks(()=>{d&&(f.current=d)},[d]);const y=Jy({...e,elements:{...o,...a&&{reference:a}}}),m=X.useCallback(D=>{const k=Ut(D)?{getBoundingClientRect:()=>D.getBoundingClientRect(),getClientRects:()=>D.getClientRects(),contextElement:D}:D;c(k),y.refs.setReference(k)},[y.refs]),h=X.useCallback(D=>{(Ut(D)||D===null)&&(f.current=D,i(D)),(Ut(y.refs.reference.current)||y.refs.reference.current===null||D!==null&&!Ut(D))&&y.refs.setReference(D)},[y.refs]),b=X.useMemo(()=>({...y.refs,setReference:h,setPositionReference:m,domReference:f}),[y.refs,h,m]),S=X.useMemo(()=>({...y.elements,domReference:d}),[y.elements,d]),C=X.useMemo(()=>({...y,...n,refs:b,elements:S,nodeId:t}),[y,b,S,t,n]);return Ks(()=>{n.dataRef.current.floatingContext=C;const D=p?.nodesRef.current.find(k=>k.id===t);D&&(D.context=C)}),X.useMemo(()=>({...y,context:C,refs:b,elements:S}),[y,b,S,C])}/*!
108
+ } });`:eo(12,b?` (${b})`:"",JSON.stringify(h.main)));return Ou(h,"light",S,n),Ou(h,"dark",k,n),h.contrastText||(h.contrastText=f(h.main)),h},m={dark:Na,light:Pu};return process.env.NODE_ENV!=="production"&&(m[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),kr(Ge({common:Ge({},fo),mode:t,primary:p({color:s,name:"primary"}),secondary:p({color:i,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:a,name:"error"}),warning:p({color:d,name:"warning"}),info:p({color:c,name:"info"}),success:p({color:l,name:"success"}),grey:dv,contrastThreshold:r,getContrastText:f,augmentColor:p,tonalOffset:n},m[t]),o)}const _v=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function xv(e){return Math.round(e*1e5)/1e5}const ju={textTransform:"uppercase"},Ru='"Roboto", "Helvetica", "Arial", sans-serif';function wv(e,t){const r=typeof t=="function"?t(e):t,{fontFamily:n=Ru,fontSize:o=14,fontWeightLight:s=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:c=700,htmlFontSize:l=16,allVariants:d,pxToRem:f}=r,p=Gr(r,_v);process.env.NODE_ENV!=="production"&&(typeof o!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof l!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const m=o/14,v=f||(w=>`${w/l*m}rem`),h=(w,S,k,C,x)=>Ge({fontFamily:n,fontWeight:w,fontSize:v(S),lineHeight:k},n===Ru?{letterSpacing:`${xv(C/S)}em`}:{},x,d),b={h1:h(s,96,1.167,-1.5),h2:h(s,60,1.2,-.5),h3:h(i,48,1.167,0),h4:h(i,34,1.235,.25),h5:h(i,24,1.334,0),h6:h(a,20,1.6,.15),subtitle1:h(i,16,1.75,.15),subtitle2:h(a,14,1.57,.1),body1:h(i,16,1.5,.15),body2:h(i,14,1.43,.15),button:h(a,14,1.75,.4,ju),caption:h(i,12,1.66,.4),overline:h(i,12,2.66,1,ju),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return kr(Ge({htmlFontSize:l,pxToRem:v,fontFamily:n,fontSize:o,fontWeightLight:s,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:c},b),p,{clone:!1})}const Sv=.2,Cv=.14,Ev=.12;function gt(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Sv})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Cv})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Ev})`].join(",")}const Dv=["none",gt(0,2,1,-1,0,1,1,0,0,1,3,0),gt(0,3,1,-2,0,2,2,0,0,1,5,0),gt(0,3,3,-2,0,3,4,0,0,1,8,0),gt(0,2,4,-1,0,4,5,0,0,1,10,0),gt(0,3,5,-1,0,5,8,0,0,1,14,0),gt(0,3,5,-1,0,6,10,0,0,1,18,0),gt(0,4,5,-2,0,7,10,1,0,2,16,1),gt(0,5,5,-3,0,8,10,1,0,3,14,2),gt(0,5,6,-3,0,9,12,1,0,3,16,2),gt(0,6,6,-3,0,10,14,1,0,4,18,3),gt(0,6,7,-4,0,11,15,1,0,4,20,3),gt(0,7,8,-4,0,12,17,2,0,5,22,4),gt(0,7,8,-4,0,13,19,2,0,5,24,4),gt(0,7,9,-4,0,14,21,2,0,5,26,4),gt(0,8,9,-5,0,15,22,2,0,6,28,5),gt(0,8,10,-5,0,16,24,2,0,6,30,5),gt(0,8,11,-5,0,17,26,2,0,6,32,5),gt(0,9,11,-5,0,18,28,2,0,7,34,6),gt(0,9,12,-6,0,19,29,2,0,7,36,6),gt(0,10,13,-6,0,20,31,3,0,8,38,7),gt(0,10,13,-6,0,21,33,3,0,8,40,7),gt(0,10,14,-6,0,22,35,3,0,8,42,7),gt(0,11,14,-7,0,23,36,3,0,9,44,8),gt(0,11,15,-7,0,24,38,3,0,9,46,8)],kv=["duration","easing","delay"],Tv={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Iv={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Nu(e){return`${Math.round(e)}ms`}function Av(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function Mv(e){const t=Ge({},Tv,e.easing),r=Ge({},Iv,e.duration);return Ge({getAutoHeightDuration:Av,create:(o=["all"],s={})=>{const{duration:i=r.standard,easing:a=t.easeInOut,delay:c=0}=s,l=Gr(s,kv);if(process.env.NODE_ENV!=="production"){const d=p=>typeof p=="string",f=p=>!isNaN(parseFloat(p));!d(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!f(i)&&!d(i)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${i}.`),d(a)||console.error('MUI: Argument "easing" must be a string.'),!f(c)&&!d(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof s!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
109
+ `)),Object.keys(l).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(l).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(d=>`${d} ${typeof i=="string"?i:Nu(i)} ${a} ${typeof c=="string"?c:Nu(c)}`).join(",")}},e,{easing:t,duration:r})}const Pv={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Ov=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function jv(e={},...t){const{mixins:r={},palette:n={},transitions:o={},typography:s={}}=e,i=Gr(e,Ov);if(e.vars&&e.generateCssVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":eo(18));const a=bv(n),c=Iu(e);let l=kr(c,{mixins:av(c.breakpoints,r),palette:a,shadows:Dv.slice(),typography:wv(a,s),transitions:Mv(o),zIndex:Ge({},Pv)});if(l=kr(l,i),l=t.reduce((d,f)=>kr(d,f),l),process.env.NODE_ENV!=="production"){const d=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],f=(p,m)=>{let v;for(v in p){const h=p[v];if(d.indexOf(v)!==-1&&Object.keys(h).length>0){if(process.env.NODE_ENV!=="production"){const b=va("",v);console.error([`MUI: The \`${m}\` component increases the CSS specificity of the \`${v}\` internal state.`,"You can not override it like this: ",JSON.stringify(p,null,2),"",`Instead, you need to use the '&.${b}' syntax:`,JSON.stringify({root:{[`&.${b}`]:h}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
110
+ `))}p[v]={}}}};Object.keys(l.components).forEach(p=>{const m=l.components[p].styleOverrides;m&&p.indexOf("Mui")===0&&f(m,p)})}return l.unstable_sxConfig=Ge({},uo,i?.unstable_sxConfig),l.unstable_sx=function(f){return Bs({sx:f,theme:this})},l}const Rv=jv(),Nv="$$material";function $v(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Lv=iv({themeId:Nv,defaultTheme:Rv,rootShouldForwardProp:e=>$v(e)&&e!=="classes"});function zv(e){return va("MuiSvgIcon",e)}W0("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Bv=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Fv=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${Zr(t)}`,`fontSize${Zr(r)}`]};return U0(o,zv,n)},Vv=Lv("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${Zr(r.color)}`],t[`fontSize${Zr(r.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var r,n,o,s,i,a,c,l,d,f,p,m,v;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(r=e.transitions)==null||(n=r.create)==null?void 0:n.call(r,"fill",{duration:(o=e.transitions)==null||(o=o.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((s=e.typography)==null||(i=s.pxToRem)==null?void 0:i.call(s,20))||"1.25rem",medium:((a=e.typography)==null||(c=a.pxToRem)==null?void 0:c.call(a,24))||"1.5rem",large:((l=e.typography)==null||(d=l.pxToRem)==null?void 0:d.call(l,35))||"2.1875rem"}[t.fontSize],color:(f=(p=(e.vars||e).palette)==null||(p=p[t.color])==null?void 0:p.main)!=null?f:{action:(m=(e.vars||e).palette)==null||(m=m.action)==null?void 0:m.active,disabled:(v=(e.vars||e).palette)==null||(v=v.action)==null?void 0:v.disabled,inherit:void 0}[t.color]}}),Vs=J.forwardRef(function(t,r){const n=Q0({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:i="inherit",component:a="svg",fontSize:c="medium",htmlColor:l,inheritViewBox:d=!1,titleAccess:f,viewBox:p="0 0 24 24"}=n,m=Gr(n,Bv),v=J.isValidElement(o)&&o.type==="svg",h=Ge({},n,{color:i,component:a,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:p,hasSvgAsChild:v}),b={};d||(b.viewBox=p);const w=Fv(h);return u.jsxs(Vv,Ge({as:a,className:Lt(w.root,s),focusable:"false",color:l,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:r},b,m,v&&o.props,{ownerState:h,children:[v?o.props.children:o,f?u.jsx("title",{children:f}):null]}))});process.env.NODE_ENV!=="production"&&(Vs.propTypes={children:Ne.node,classes:Ne.object,className:Ne.string,color:Ne.oneOfType([Ne.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),Ne.string]),component:Ne.elementType,fontSize:Ne.oneOfType([Ne.oneOf(["inherit","large","medium","small"]),Ne.string]),htmlColor:Ne.string,inheritViewBox:Ne.bool,shapeRendering:Ne.string,sx:Ne.oneOfType([Ne.arrayOf(Ne.oneOfType([Ne.func,Ne.object,Ne.bool])),Ne.func,Ne.object]),titleAccess:Ne.string,viewBox:Ne.string}),Vs.muiName="SvgIcon";function Uv(e,t){function r(n,o){return u.jsx(Vs,Ge({"data-testid":`${t}Icon`,ref:o},n,{children:e}))}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=Vs.muiName,J.memo(J.forwardRef(r))}const Hv=Lr(Object.freeze(Object.defineProperty({__proto__:null,capitalize:Zr,createChainedFunction:S0,createSvgIcon:Uv,debounce:C0,deprecatedPropType:E0,isMuiElement:D0,ownerDocument:Ol,ownerWindow:k0,requirePropFactory:T0,setRef:jl,unstable_ClassNameGenerator:{configure:e=>{process.env.NODE_ENV!=="production"&&console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.","","You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead","","The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401","","The updated documentation: https://mui.com/guides/classname-generator/"].join(`
111
+ `)),zl.configure(e)}},unstable_useEnhancedEffect:Rl,unstable_useId:A0,unsupportedProp:M0,useControlled:P0,useEventCallback:O0,useForkRef:j0,useIsFocusVisible:V0},Symbol.toStringTag,{value:"Module"})));var $u;function ut(){return $u||($u=1,(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=Hv})(sa)),sa}var Lu;function Wv(){if(Lu)return Jn;Lu=1;var e=nt();Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.default=void 0;var t=e(ut()),r=at();return Jn.default=(0,t.default)((0,r.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),Jn}var Yv=Wv();const qv=rt(Yv);var ho={},zu;function Zv(){if(zu)return ho;zu=1;var e=nt();Object.defineProperty(ho,"__esModule",{value:!0}),ho.default=void 0;var t=e(ut()),r=at();return ho.default=(0,t.default)((0,r.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),ho}var Gv=Zv();const Kv=rt(Gv);var mo={},Bu;function Qv(){if(Bu)return mo;Bu=1;var e=nt();Object.defineProperty(mo,"__esModule",{value:!0}),mo.default=void 0;var t=e(ut()),r=at();return mo.default=(0,t.default)((0,r.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),mo}var Xv=Qv();const Jv=rt(Xv),ey=({header:e,sidebar:t,mainContent:r})=>{const[n,o]=y.useState(!1),[s,i]=y.useState(!1),a=()=>{o(!n)},c=()=>{i(!s)};return u.jsxs("div",{className:`${br.dashboardContainer} ${s?br.sidebarCollapsed:""}`,children:[u.jsxs("header",{className:br.header,children:[u.jsx(g.IconButton,{onClick:a,className:br.menuButton,children:u.jsx(qv,{})}),u.jsx("div",{className:br.headerContent,children:e})]}),u.jsxs("aside",{className:`${br.sidebar} ${n?br.sidebarOpen:""}`,children:[u.jsx("div",{className:br.sidebarContent,children:t}),u.jsx(g.IconButton,{onClick:c,className:br.collapseButton,style:{display:"none"},children:s?u.jsx(Jv,{}):u.jsx(Kv,{})})]}),u.jsx("main",{className:br.mainContent,children:r}),n&&u.jsx("div",{className:br.overlay,onClick:a})]})},ln={headerContainer:"_headerContainer_if4sf_1",navAndDate:"_navAndDate_if4sf_17",navButton:"_navButton_if4sf_29",datePickerInput:"_datePickerInput_if4sf_61",datePickerButton:"_datePickerButton_if4sf_91",addEventButton:"_addEventButton_if4sf_135"};function Us(){return typeof window<"u"}function jn(e){return Fu(e)?(e.nodeName||"").toLowerCase():"#document"}function or(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mr(e){var t;return(t=(Fu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Fu(e){return Us()?e instanceof Node||e instanceof or(e).Node:!1}function Ut(e){return Us()?e instanceof Element||e instanceof or(e).Element:!1}function Pr(e){return Us()?e instanceof HTMLElement||e instanceof or(e).HTMLElement:!1}function Vu(e){return!Us()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof or(e).ShadowRoot}const ty=new Set(["inline","contents"]);function go(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=fr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!ty.has(o)}const ry=new Set(["table","td","th"]);function ny(e){return ry.has(jn(e))}const oy=[":popover-open",":modal"];function Hs(e){return oy.some(t=>{try{return e.matches(t)}catch{return!1}})}const sy=["transform","translate","scale","rotate","perspective"],iy=["transform","translate","scale","rotate","perspective","filter"],ay=["paint","layout","strict","content"];function $a(e){const t=La(),r=Ut(e)?fr(e):e;return sy.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||iy.some(n=>(r.willChange||"").includes(n))||ay.some(n=>(r.contain||"").includes(n))}function cy(e){let t=Qr(e);for(;Pr(t)&&!Rn(t);){if($a(t))return t;if(Hs(t))return null;t=Qr(t)}return null}function La(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ly=new Set(["html","body","#document"]);function Rn(e){return ly.has(jn(e))}function fr(e){return or(e).getComputedStyle(e)}function Ws(e){return Ut(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qr(e){if(jn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vu(e)&&e.host||Mr(e);return Vu(t)?t.host:t}function Uu(e){const t=Qr(e);return Rn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pr(t)&&go(t)?t:Uu(t)}function vo(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Uu(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),i=or(o);if(s){const a=za(i);return t.concat(i,i.visualViewport||[],go(o)?o:[],a&&r?vo(a):[])}return t.concat(o,vo(o,[],r))}function za(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Nn=Math.min,un=Math.max,Ys=Math.round,qs=Math.floor,Or=e=>({x:e,y:e}),uy={left:"right",right:"left",bottom:"top",top:"bottom"},dy={start:"end",end:"start"};function fy(e,t,r){return un(e,Nn(t,r))}function Zs(e,t){return typeof e=="function"?e(t):e}function $n(e){return e.split("-")[0]}function yo(e){return e.split("-")[1]}function py(e){return e==="x"?"y":"x"}function Ba(e){return e==="y"?"height":"width"}const hy=new Set(["top","bottom"]);function dn(e){return hy.has($n(e))?"y":"x"}function Fa(e){return py(dn(e))}function my(e,t,r){r===void 0&&(r=!1);const n=yo(e),o=Fa(e),s=Ba(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Gs(i)),[i,Gs(i)]}function gy(e){const t=Gs(e);return[Va(e),t,Va(t)]}function Va(e){return e.replace(/start|end/g,t=>dy[t])}const Hu=["left","right"],Wu=["right","left"],vy=["top","bottom"],yy=["bottom","top"];function by(e,t,r){switch(e){case"top":case"bottom":return r?t?Wu:Hu:t?Hu:Wu;case"left":case"right":return t?vy:yy;default:return[]}}function _y(e,t,r,n){const o=yo(e);let s=by($n(e),r==="start",n);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Va)))),s}function Gs(e){return e.replace(/left|right|bottom|top/g,t=>uy[t])}function xy(e){return{top:0,right:0,bottom:0,left:0,...e}}function Yu(e){return typeof e!="number"?xy(e):{top:e,right:e,bottom:e,left:e}}function Ks(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}var wy=typeof document<"u",Sy=function(){},Qs=wy?y.useLayoutEffect:Sy;const Cy={...J}.useInsertionEffect||(e=>e());function Ey(e){const t=J.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Cy(()=>{t.current=e}),J.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}function qu(e,t,r){let{reference:n,floating:o}=e;const s=dn(t),i=Fa(t),a=Ba(i),c=$n(t),l=s==="y",d=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,p=n[a]/2-o[a]/2;let m;switch(c){case"top":m={x:d,y:n.y-o.height};break;case"bottom":m={x:d,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:f};break;case"left":m={x:n.x-o.width,y:f};break;default:m={x:n.x,y:n.y}}switch(yo(t)){case"start":m[i]-=p*(r&&l?-1:1);break;case"end":m[i]+=p*(r&&l?-1:1);break}return m}const Dy=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:i}=r,a=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=qu(l,n,c),p=n,m={},v=0;for(let h=0;h<a.length;h++){const{name:b,fn:w}=a[h],{x:S,y:k,data:C,reset:x}=await w({x:d,y:f,initialPlacement:n,placement:p,strategy:o,middlewareData:m,rects:l,platform:i,elements:{reference:e,floating:t}});d=S??d,f=k??f,m={...m,[b]:{...m[b],...C}},x&&v<=50&&(v++,typeof x=="object"&&(x.placement&&(p=x.placement),x.rects&&(l=x.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:d,y:f}=qu(l,p,c)),h=-1)}return{x:d,y:f,placement:p,strategy:o,middlewareData:m}};async function ky(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=Zs(t,e),v=Yu(m),b=a[p?f==="floating"?"reference":"floating":f],w=Ks(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(b)))==null||r?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:d,strategy:c})),S=f==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),C=await(s.isElement==null?void 0:s.isElement(k))?await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1}:{x:1,y:1},x=Ks(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:S,offsetParent:k,strategy:c}):S);return{top:(w.top-x.top+v.top)/C.y,bottom:(x.bottom-w.bottom+v.bottom)/C.y,left:(w.left-x.left+v.left)/C.x,right:(x.right-w.right+v.right)/C.x}}const Ty=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:l,padding:d=0}=Zs(e,t)||{};if(l==null)return{};const f=Yu(d),p={x:r,y:n},m=Fa(o),v=Ba(m),h=await i.getDimensions(l),b=m==="y",w=b?"top":"left",S=b?"bottom":"right",k=b?"clientHeight":"clientWidth",C=s.reference[v]+s.reference[m]-p[m]-s.floating[v],x=p[m]-s.reference[m],H=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let E=H?H[k]:0;(!E||!await(i.isElement==null?void 0:i.isElement(H)))&&(E=a.floating[k]||s.floating[v]);const I=C/2-x/2,P=E/2-h[v]/2-1,A=Nn(f[w],P),Y=Nn(f[S],P),Z=A,V=E-h[v]-Y,W=E/2-h[v]/2+I,le=fy(Z,W,V),R=!c.arrow&&yo(o)!=null&&W!==le&&s.reference[v]/2-(W<Z?A:Y)-h[v]/2<0,X=R?W<Z?W-Z:W-V:0;return{[m]:p[m]+X,data:{[m]:le,centerOffset:W-le-X,...R&&{alignmentOffset:X}},reset:R}}}),Iy=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:h=!0,...b}=Zs(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const w=$n(o),S=dn(a),k=$n(a)===a,C=await(c.isRTL==null?void 0:c.isRTL(l.floating)),x=p||(k||!h?[Gs(a)]:gy(a)),H=v!=="none";!p&&H&&x.push(..._y(a,h,v,C));const E=[a,...x],I=await ky(t,b),P=[];let A=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&P.push(I[w]),f){const W=my(o,i,C);P.push(I[W[0]],I[W[1]])}if(A=[...A,{placement:o,overflows:P}],!P.every(W=>W<=0)){var Y,Z;const W=(((Y=s.flip)==null?void 0:Y.index)||0)+1,le=E[W];if(le&&(!(f==="alignment"?S!==dn(le):!1)||A.every(re=>dn(re.placement)===S?re.overflows[0]>0:!0)))return{data:{index:W,overflows:A},reset:{placement:le}};let R=(Z=A.filter(X=>X.overflows[0]<=0).sort((X,re)=>X.overflows[1]-re.overflows[1])[0])==null?void 0:Z.placement;if(!R)switch(m){case"bestFit":{var V;const X=(V=A.filter(re=>{if(H){const ve=dn(re.placement);return ve===S||ve==="y"}return!0}).map(re=>[re.placement,re.overflows.filter(ve=>ve>0).reduce((ve,L)=>ve+L,0)]).sort((re,ve)=>re[1]-ve[1])[0])==null?void 0:V[0];X&&(R=X);break}case"initialPlacement":R=a;break}if(o!==R)return{reset:{placement:R}}}return{}}}},Ay=new Set(["left","top"]);async function My(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=$n(r),a=yo(r),c=dn(r)==="y",l=Ay.has(i)?-1:1,d=s&&c?-1:1,f=Zs(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof v=="number"&&(m=a==="end"?v*-1:v),c?{x:m*d,y:p*l}:{x:p*l,y:m*d}}const Py=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await My(t,e);return i===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}};function Zu(e){const t=fr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Pr(e),s=o?e.offsetWidth:r,i=o?e.offsetHeight:n,a=Ys(r)!==s||Ys(n)!==i;return a&&(r=s,n=i),{width:r,height:n,$:a}}function Ua(e){return Ut(e)?e:e.contextElement}function Ln(e){const t=Ua(e);if(!Pr(t))return Or(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=Zu(t);let i=(s?Ys(r.width):r.width)/n,a=(s?Ys(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Oy=Or(0);function Gu(e){const t=or(e);return!La()||!t.visualViewport?Oy:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function jy(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==or(e)?!1:t}function fn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=Ua(e);let i=Or(1);t&&(n?Ut(n)&&(i=Ln(n)):i=Ln(e));const a=jy(s,r,n)?Gu(s):Or(0);let c=(o.left+a.x)/i.x,l=(o.top+a.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(s){const p=or(s),m=n&&Ut(n)?or(n):n;let v=p,h=za(v);for(;h&&n&&m!==v;){const b=Ln(h),w=h.getBoundingClientRect(),S=fr(h),k=w.left+(h.clientLeft+parseFloat(S.paddingLeft))*b.x,C=w.top+(h.clientTop+parseFloat(S.paddingTop))*b.y;c*=b.x,l*=b.y,d*=b.x,f*=b.y,c+=k,l+=C,v=or(h),h=za(v)}}return Ks({width:d,height:f,x:c,y:l})}function Xs(e,t){const r=Ws(e).scrollLeft;return t?t.left+r:fn(Mr(e)).left+r}function Ku(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Xs(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function Ry(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",i=Mr(n),a=t?Hs(t.floating):!1;if(n===i||a&&s)return r;let c={scrollLeft:0,scrollTop:0},l=Or(1);const d=Or(0),f=Pr(n);if((f||!f&&!s)&&((jn(n)!=="body"||go(i))&&(c=Ws(n)),Pr(n))){const m=fn(n);l=Ln(n),d.x=m.x+n.clientLeft,d.y=m.y+n.clientTop}const p=i&&!f&&!s?Ku(i,c):Or(0);return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+d.x+p.x,y:r.y*l.y-c.scrollTop*l.y+d.y+p.y}}function Ny(e){return Array.from(e.getClientRects())}function $y(e){const t=Mr(e),r=Ws(e),n=e.ownerDocument.body,o=un(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=un(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+Xs(e);const a=-r.scrollTop;return fr(n).direction==="rtl"&&(i+=un(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:i,y:a}}const Qu=25;function Ly(e,t){const r=or(e),n=Mr(e),o=r.visualViewport;let s=n.clientWidth,i=n.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const d=La();(!d||d&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}const l=Xs(n);if(l<=0){const d=n.ownerDocument,f=d.body,p=getComputedStyle(f),m=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,v=Math.abs(n.clientWidth-f.clientWidth-m);v<=Qu&&(s-=v)}else l<=Qu&&(s+=l);return{width:s,height:i,x:a,y:c}}const zy=new Set(["absolute","fixed"]);function By(e,t){const r=fn(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=Pr(e)?Ln(e):Or(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,l=n*s.y;return{width:i,height:a,x:c,y:l}}function Xu(e,t,r){let n;if(t==="viewport")n=Ly(e,r);else if(t==="document")n=$y(Mr(e));else if(Ut(t))n=By(t,r);else{const o=Gu(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ks(n)}function Ju(e,t){const r=Qr(e);return r===t||!Ut(r)||Rn(r)?!1:fr(r).position==="fixed"||Ju(r,t)}function Fy(e,t){const r=t.get(e);if(r)return r;let n=vo(e,[],!1).filter(a=>Ut(a)&&jn(a)!=="body"),o=null;const s=fr(e).position==="fixed";let i=s?Qr(e):e;for(;Ut(i)&&!Rn(i);){const a=fr(i),c=$a(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&zy.has(o.position)||go(i)&&!c&&Ju(e,i))?n=n.filter(d=>d!==i):o=a,i=Qr(i)}return t.set(e,n),n}function Vy(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?Hs(t)?[]:Fy(t,this._c):[].concat(r),n],a=i[0],c=i.reduce((l,d)=>{const f=Xu(t,d,o);return l.top=un(f.top,l.top),l.right=Nn(f.right,l.right),l.bottom=Nn(f.bottom,l.bottom),l.left=un(f.left,l.left),l},Xu(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Uy(e){const{width:t,height:r}=Zu(e);return{width:t,height:r}}function Hy(e,t,r){const n=Pr(t),o=Mr(t),s=r==="fixed",i=fn(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Or(0);function l(){c.x=Xs(o)}if(n||!n&&!s)if((jn(t)!=="body"||go(o))&&(a=Ws(t)),n){const m=fn(t,!0,s,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else o&&l();s&&!n&&o&&l();const d=o&&!n&&!s?Ku(o,a):Or(0),f=i.left+a.scrollLeft-c.x-d.x,p=i.top+a.scrollTop-c.y-d.y;return{x:f,y:p,width:i.width,height:i.height}}function Ha(e){return fr(e).position==="static"}function ed(e,t){if(!Pr(e)||fr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Mr(e)===r&&(r=r.ownerDocument.body),r}function td(e,t){const r=or(e);if(Hs(e))return r;if(!Pr(e)){let o=Qr(e);for(;o&&!Rn(o);){if(Ut(o)&&!Ha(o))return o;o=Qr(o)}return r}let n=ed(e,t);for(;n&&ny(n)&&Ha(n);)n=ed(n,t);return n&&Rn(n)&&Ha(n)&&!$a(n)?r:n||cy(e)||r}const Wy=async function(e){const t=this.getOffsetParent||td,r=this.getDimensions,n=await r(e.floating);return{reference:Hy(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Yy(e){return fr(e).direction==="rtl"}const qy={convertOffsetParentRelativeRectToViewportRelativeRect:Ry,getDocumentElement:Mr,getClippingRect:Vy,getOffsetParent:td,getElementRects:Wy,getClientRects:Ny,getDimensions:Uy,getScale:Ln,isElement:Ut,isRTL:Yy};function rd(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Zy(e,t){let r=null,n;const o=Mr(e);function s(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:d,top:f,width:p,height:m}=l;if(a||t(),!p||!m)return;const v=qs(f),h=qs(o.clientWidth-(d+p)),b=qs(o.clientHeight-(f+m)),w=qs(d),k={rootMargin:-v+"px "+-h+"px "+-b+"px "+-w+"px",threshold:un(0,Nn(1,c))||1};let C=!0;function x(H){const E=H[0].intersectionRatio;if(E!==c){if(!C)return i();E?i(!1,E):n=setTimeout(()=>{i(!1,1e-7)},1e3)}E===1&&!rd(l,e.getBoundingClientRect())&&i(),C=!1}try{r=new IntersectionObserver(x,{...k,root:o.ownerDocument})}catch{r=new IntersectionObserver(x,k)}r.observe(e)}return i(!0),s}function Gy(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=Ua(e),d=o||s?[...l?vo(l):[],...vo(t)]:[];d.forEach(w=>{o&&w.addEventListener("scroll",r,{passive:!0}),s&&w.addEventListener("resize",r)});const f=l&&a?Zy(l,r):null;let p=-1,m=null;i&&(m=new ResizeObserver(w=>{let[S]=w;S&&S.target===l&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var k;(k=m)==null||k.observe(t)})),r()}),l&&!c&&m.observe(l),m.observe(t));let v,h=c?fn(e):null;c&&b();function b(){const w=fn(e);h&&!rd(h,w)&&r(),h=w,v=requestAnimationFrame(b)}return r(),()=>{var w;d.forEach(S=>{o&&S.removeEventListener("scroll",r),s&&S.removeEventListener("resize",r)}),f?.(),(w=m)==null||w.disconnect(),m=null,c&&cancelAnimationFrame(v)}}const Ky=Py,Qy=Iy,nd=Ty,Xy=(e,t,r)=>{const n=new Map,o={platform:qy,...r},s={...o.platform,_c:n};return Dy(e,t,{...o,platform:s})};var Jy=typeof document<"u",eb=function(){},Js=Jy?y.useLayoutEffect:eb;function ei(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!ei(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!ei(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function od(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function sd(e,t){const r=od(e);return Math.round(t*r)/r}function Wa(e){const t=J.useRef(e);return Js(()=>{t.current=e}),t}function tb(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[d,f]=J.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=J.useState(n);ei(p,n)||m(n);const[v,h]=J.useState(null),[b,w]=J.useState(null),S=J.useCallback(re=>{re!==H.current&&(H.current=re,h(re))},[]),k=J.useCallback(re=>{re!==E.current&&(E.current=re,w(re))},[]),C=s||v,x=i||b,H=J.useRef(null),E=J.useRef(null),I=J.useRef(d),P=c!=null,A=Wa(c),Y=Wa(o),Z=Wa(l),V=J.useCallback(()=>{if(!H.current||!E.current)return;const re={placement:t,strategy:r,middleware:p};Y.current&&(re.platform=Y.current),Xy(H.current,E.current,re).then(ve=>{const L={...ve,isPositioned:Z.current!==!1};W.current&&!ei(I.current,L)&&(I.current=L,n0.flushSync(()=>{f(L)}))})},[p,t,r,Y,Z]);Js(()=>{l===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,f(re=>({...re,isPositioned:!1})))},[l]);const W=J.useRef(!1);Js(()=>(W.current=!0,()=>{W.current=!1}),[]),Js(()=>{if(C&&(H.current=C),x&&(E.current=x),C&&x){if(A.current)return A.current(C,x,V);V()}},[C,x,V,A,P]);const le=J.useMemo(()=>({reference:H,floating:E,setReference:S,setFloating:k}),[S,k]),R=J.useMemo(()=>({reference:C,floating:x}),[C,x]),X=J.useMemo(()=>{const re={position:r,left:0,top:0};if(!R.floating)return re;const ve=sd(R.floating,d.x),L=sd(R.floating,d.y);return a?{...re,transform:"translate("+ve+"px, "+L+"px)",...od(R.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:ve,top:L}},[r,a,R.floating,d.x,d.y]);return J.useMemo(()=>({...d,update:V,refs:le,elements:R,floatingStyles:X}),[d,V,le,R,X])}const rb=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?nd({element:n.current,padding:o}).fn(r):{}:n?nd({element:n,padding:o}).fn(r):{}}}},nb=(e,t)=>({...Ky(e),options:[e,t]}),ob=(e,t)=>({...Qy(e),options:[e,t]}),sb=(e,t)=>({...rb(e),options:[e,t]}),ib={...J};let id=!1,ab=0;const ad=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ab++;function cb(){const[e,t]=J.useState(()=>id?ad():void 0);return Qs(()=>{e==null&&t(ad())},[]),J.useEffect(()=>{id=!0},[]),e}const cd=ib.useId||cb;let bo;process.env.NODE_ENV!=="production"&&(bo=new Set);function lb(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=bo)!=null&&e.has(o))){var s;(s=bo)==null||s.add(o),console.warn(o)}}function ub(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=bo)!=null&&e.has(o))){var s;(s=bo)==null||s.add(o),console.error(o)}}const db=J.forwardRef(function(t,r){const{context:{placement:n,elements:{floating:o},middlewareData:{arrow:s,shift:i}},width:a=14,height:c=7,tipRadius:l=0,strokeWidth:d=0,staticOffset:f,stroke:p,d:m,style:{transform:v,...h}={},...b}=t;process.env.NODE_ENV!=="production"&&(r||lb("The `ref` prop is required for `FloatingArrow`."));const w=cd(),[S,k]=J.useState(!1);if(Qs(()=>{if(!o)return;fr(o).direction==="rtl"&&k(!0)},[o]),!o)return null;const[C,x]=n.split("-"),H=C==="top"||C==="bottom";let E=f;(H&&i!=null&&i.x||!H&&i!=null&&i.y)&&(E=null);const I=d*2,P=I/2,A=a/2*(l/-8+1),Y=c/2*l/4,Z=!!m,V=E&&x==="end"?"bottom":"top";let W=E&&x==="end"?"right":"left";E&&S&&(W=x==="end"?"left":"right");const le=s?.x!=null?E||s.x:"",R=s?.y!=null?E||s.y:"",X=m||"M0,0"+(" H"+a)+(" L"+(a-A)+","+(c-Y))+(" Q"+a/2+","+c+" "+A+","+(c-Y))+" Z",re={top:Z?"rotate(180deg)":"",left:Z?"rotate(90deg)":"rotate(-90deg)",bottom:Z?"":"rotate(180deg)",right:Z?"rotate(-90deg)":"rotate(90deg)"}[C];return u.jsxs("svg",{...b,"aria-hidden":!0,ref:r,width:Z?a:a+I,height:a,viewBox:"0 0 "+a+" "+(c>a?c:a),style:{position:"absolute",pointerEvents:"none",[W]:le,[V]:R,[C]:H||Z?"100%":"calc(100% - "+I/2+"px)",transform:[re,v].filter(ve=>!!ve).join(" "),...h},children:[I>0&&u.jsx("path",{clipPath:"url(#"+w+")",fill:"none",stroke:p,strokeWidth:I+(m?0:1),d:X}),u.jsx("path",{stroke:I&&!m?b.fill:"none",d:X}),u.jsx("clipPath",{id:w,children:u.jsx("rect",{x:-P,y:P*(Z?-1:1),width:a+I,height:a})})]})});function fb(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.has(t)||e.set(t,new Set),e.get(t).add(r)},off(t,r){var n;(n=e.get(t))==null||n.delete(r)}}}const pb=J.createContext(null),hb=J.createContext(null),mb=()=>{var e;return((e=J.useContext(pb))==null?void 0:e.id)||null},gb=()=>J.useContext(hb);function vb(e){const{open:t=!1,onOpenChange:r,elements:n}=e,o=cd(),s=J.useRef({}),[i]=J.useState(()=>fb()),a=mb()!=null;if(process.env.NODE_ENV!=="production"){const m=n.reference;m&&!Ut(m)&&ub("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,l]=J.useState(n.reference),d=Ey((m,v,h)=>{s.current.openEvent=m?v:void 0,i.emit("openchange",{open:m,event:v,reason:h,nested:a}),r?.(m,v,h)}),f=J.useMemo(()=>({setPositionReference:l}),[]),p=J.useMemo(()=>({reference:c||n.reference||null,floating:n.floating||null,domReference:n.reference}),[c,n.reference,n.floating]);return J.useMemo(()=>({dataRef:s,open:t,onOpenChange:d,elements:p,events:i,floatingId:o,refs:f}),[t,d,p,i,o,f])}function yb(e){e===void 0&&(e={});const{nodeId:t}=e,r=vb({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,o=n.elements,[s,i]=J.useState(null),[a,c]=J.useState(null),d=o?.domReference||s,f=J.useRef(null),p=gb();Qs(()=>{d&&(f.current=d)},[d]);const m=tb({...e,elements:{...o,...a&&{reference:a}}}),v=J.useCallback(k=>{const C=Ut(k)?{getBoundingClientRect:()=>k.getBoundingClientRect(),getClientRects:()=>k.getClientRects(),contextElement:k}:k;c(C),m.refs.setReference(C)},[m.refs]),h=J.useCallback(k=>{(Ut(k)||k===null)&&(f.current=k,i(k)),(Ut(m.refs.reference.current)||m.refs.reference.current===null||k!==null&&!Ut(k))&&m.refs.setReference(k)},[m.refs]),b=J.useMemo(()=>({...m.refs,setReference:h,setPositionReference:v,domReference:f}),[m.refs,h,v]),w=J.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),S=J.useMemo(()=>({...m,...n,refs:b,elements:w,nodeId:t}),[m,b,w,t,n]);return Qs(()=>{n.dataRef.current.floatingContext=S;const k=p?.nodesRef.current.find(C=>C.id===t);k&&(k.context=S)}),J.useMemo(()=>({...m,context:S,refs:b,elements:w}),[m,b,w,S])}/*!
112
112
  react-datepicker v8.7.0
113
113
  https://github.com/Hacker0x01/react-datepicker
114
114
  Released under the MIT License.
115
- */var Wa=function(t,r){return Wa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},Wa(t,r)};function zt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Wa(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Le=function(){return Le=Object.assign||function(r){for(var n,o=1,s=arguments.length;o<s;o++){n=arguments[o];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])}return r},Le.apply(this,arguments)};function Or(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var vb=function(e){var t=e.showTimeSelectOnly,r=t===void 0?!1:t,n=e.showTime,o=n===void 0?!1:n,s=e.className,i=e.children,a=r?"Choose Time":"Choose Date".concat(o?" and Time":"");return v.createElement("div",{className:s,role:"dialog","aria-label":a,"aria-modal":"true"},i)},yb=function(e,t){var r=v.useRef(null),n=v.useRef(e);n.current=e;var o=v.useCallback(function(s){var i,a=s.composed&&s.composedPath&&s.composedPath().find(function(c){return c instanceof Node})||s.target;r.current&&!r.current.contains(a)&&(t&&a instanceof HTMLElement&&a.classList.contains(t)||(i=n.current)===null||i===void 0||i.call(n,s))},[t]);return v.useEffect(function(){return document.addEventListener("mousedown",o),function(){document.removeEventListener("mousedown",o)}},[o]),r},ei=function(e){var t=e.children,r=e.onClickOutside,n=e.className,o=e.containerRef,s=e.style,i=e.ignoreClass,a=yb(r,i);return v.createElement("div",{className:n,style:s,ref:function(c){a.current=c,o&&(o.current=c)}},t)},ve;(function(e){e.ArrowUp="ArrowUp",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.PageUp="PageUp",e.PageDown="PageDown",e.Home="Home",e.End="End",e.Enter="Enter",e.Space=" ",e.Tab="Tab",e.Escape="Escape",e.Backspace="Backspace",e.X="x"})(ve||(ve={}));function cd(){var e=typeof window<"u"?window:globalThis;return e}var bo=12;function Je(e){if(e==null)return new Date;var t=typeof e=="string"?_.parseISO(e):_.toDate(e);return ti(t)?t:new Date}function Ha(e,t,r,n,o){o===void 0&&(o=Je());for(var s=Ln(r)||Ln(qa()),i=Array.isArray(t)?t:[t],a=0,c=i;a<c.length;a++){var l=c[a],d=_.parse(e,l,o,{locale:s,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});if(ti(d)&&(!n||e===ht(d,l,r)))return d}return null}function ti(e,t){return _.isValid(e)&&!_.isBefore(e,new Date("1/1/1800"))}function ht(e,t,r){if(r==="en")return _.format(e,t,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var n=r?Ln(r):void 0;return r&&!n&&console.warn('A locale object was not found for the provided string ["'.concat(r,'"].')),n=n||Ln(qa()),_.format(e,t,{locale:n,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function pr(e,t){var r=t.dateFormat,n=t.locale,o=Array.isArray(r)&&r.length>0?r[0]:r;return e&&ht(e,o,n)||""}var ld=" - ";function bb(e,t,r){if(!e&&!t)return"";var n=e?pr(e,r):"",o=t?pr(t,r):"",s=r.rangeSeparator||ld;return"".concat(n).concat(s).concat(o)}function _b(e,t){if(!e?.length)return"";var r=e[0]?pr(e[0],t):"";if(e.length===1)return r;if(e.length===2&&e[1]){var n=pr(e[1],t);return"".concat(r,", ").concat(n)}var o=e.length-1;return"".concat(r," (+").concat(o,")")}function Ya(e,t){var r=t.hour,n=r===void 0?0:r,o=t.minute,s=o===void 0?0:o,i=t.second,a=i===void 0?0:i;return _.setHours(_.setMinutes(_.setSeconds(e,a),s),n)}function xb(e){return _.getISOWeek(e)}function wb(e,t){return ht(e,"ddd",t)}function ri(e){return _.startOfDay(e)}function Xr(e,t,r){var n=Ln(t||qa());return _.startOfWeek(e,{locale:n,weekStartsOn:r})}function Br(e){return _.startOfMonth(e)}function _o(e){return _.startOfYear(e)}function ud(e){return _.startOfQuarter(e)}function dd(){return _.startOfDay(Je())}function fd(e){return _.endOfDay(e)}function Sb(e){return _.endOfWeek(e)}function Cb(e){return _.endOfMonth(e)}function jr(e,t){return e&&t?_.isSameYear(e,t):!e&&!t}function qt(e,t){return e&&t?_.isSameMonth(e,t):!e&&!t}function ni(e,t){return e&&t?_.isSameQuarter(e,t):!e&&!t}function ze(e,t){return e&&t?_.isSameDay(e,t):!e&&!t}function fn(e,t){return e&&t?_.isEqual(e,t):!e&&!t}function pn(e,t,r){var n,o=_.startOfDay(t),s=_.endOfDay(r);try{n=_.isWithinInterval(e,{start:o,end:s})}catch{n=!1}return n}function qa(){var e=cd();return e.__localeId__}function Ln(e){if(typeof e=="string"){var t=cd();return t.__localeData__?t.__localeData__[e]:void 0}else return e}function Eb(e,t,r){return t(ht(e,"EEEE",r))}function kb(e,t){return ht(e,"EEEEEE",t)}function Db(e,t){return ht(e,"EEE",t)}function Za(e,t){return ht(_.setMonth(Je(),e),"LLLL",t)}function pd(e,t){return ht(_.setMonth(Je(),e),"LLL",t)}function Tb(e,t){return ht(_.setQuarter(Je(),e),"QQQ",t)}function hr(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.excludeDateIntervals,a=r.includeDates,c=r.includeDateIntervals,l=r.filterDate;return xo(e,{minDate:n,maxDate:o})||s&&s.some(function(d){return d instanceof Date?ze(e,d):ze(e,d.date)})||i&&i.some(function(d){var f=d.start,p=d.end;return _.isWithinInterval(e,{start:f,end:p})})||a&&!a.some(function(d){return ze(e,d)})||c&&!c.some(function(d){var f=d.start,p=d.end;return _.isWithinInterval(e,{start:f,end:p})})||l&&!l(Je(e))||!1}function Ga(e,t){var r=t===void 0?{}:t,n=r.excludeDates,o=r.excludeDateIntervals;return o&&o.length>0?o.some(function(s){var i=s.start,a=s.end;return _.isWithinInterval(e,{start:i,end:a})}):n&&n.some(function(s){var i;return s instanceof Date?ze(e,s):ze(e,(i=s.date)!==null&&i!==void 0?i:new Date)})||!1}function hd(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.includeDates,a=r.filterDate;return xo(e,{minDate:n?_.startOfMonth(n):void 0,maxDate:o?_.endOfMonth(o):void 0})||s?.some(function(c){return qt(e,c instanceof Date?c:c.date)})||i&&!i.some(function(c){return qt(e,c)})||a&&!a(Je(e))||!1}function oi(e,t,r,n){var o=_.getYear(e),s=_.getMonth(e),i=_.getYear(t),a=_.getMonth(t),c=_.getYear(n);return o===i&&o===c?s<=r&&r<=a:o<i?c===o&&s<=r||c===i&&a>=r||c<i&&c>o:!1}function Ib(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.includeDates;return xo(e,{minDate:n,maxDate:o})||s&&s.some(function(a){return qt(a instanceof Date?a:a.date,e)})||i&&!i.some(function(a){return qt(a,e)})||!1}function si(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.includeDates,a=r.filterDate;return xo(e,{minDate:n,maxDate:o})||s?.some(function(c){return ni(e,c instanceof Date?c:c.date)})||i&&!i.some(function(c){return ni(e,c)})||a&&!a(Je(e))||!1}function ii(e,t,r){if(!t||!r||!_.isValid(t)||!_.isValid(r))return!1;var n=_.getYear(t),o=_.getYear(r);return n<=e&&o>=e}function ai(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.includeDates,a=r.filterDate,c=new Date(e,0,1);return xo(c,{minDate:n?_.startOfYear(n):void 0,maxDate:o?_.endOfYear(o):void 0})||s?.some(function(l){return jr(c,l instanceof Date?l:l.date)})||i&&!i.some(function(l){return jr(c,l)})||a&&!a(Je(c))||!1}function ci(e,t,r,n){var o=_.getYear(e),s=_.getQuarter(e),i=_.getYear(t),a=_.getQuarter(t),c=_.getYear(n);return o===i&&o===c?s<=r&&r<=a:o<i?c===o&&s<=r||c===i&&a>=r||c<i&&c>o:!1}function xo(e,t){var r,n=t===void 0?{}:t,o=n.minDate,s=n.maxDate;return(r=o&&_.differenceInCalendarDays(e,o)<0||s&&_.differenceInCalendarDays(e,s)>0)!==null&&r!==void 0?r:!1}function md(e,t){return t.some(function(r){return _.getHours(r)===_.getHours(e)&&_.getMinutes(r)===_.getMinutes(e)&&_.getSeconds(r)===_.getSeconds(e)})}function gd(e,t){var r=t===void 0?{}:t,n=r.excludeTimes,o=r.includeTimes,s=r.filterTime;return n&&md(e,n)||o&&!md(e,o)||s&&!s(e)||!1}function vd(e,t){var r=t.minTime,n=t.maxTime;if(!r||!n)throw new Error("Both minTime and maxTime props required");var o=Je();o=_.setHours(o,_.getHours(e)),o=_.setMinutes(o,_.getMinutes(e)),o=_.setSeconds(o,_.getSeconds(e));var s=Je();s=_.setHours(s,_.getHours(r)),s=_.setMinutes(s,_.getMinutes(r)),s=_.setSeconds(s,_.getSeconds(r));var i=Je();i=_.setHours(i,_.getHours(n)),i=_.setMinutes(i,_.getMinutes(n)),i=_.setSeconds(i,_.getSeconds(n));var a;try{a=!_.isWithinInterval(o,{start:s,end:i})}catch{a=!1}return a}function yd(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.includeDates,s=_.subMonths(e,1);return n&&_.differenceInCalendarMonths(n,s)>0||o&&o.every(function(i){return _.differenceInCalendarMonths(i,s)>0})||!1}function bd(e,t){var r=t===void 0?{}:t,n=r.maxDate,o=r.includeDates,s=_.addMonths(e,1);return n&&_.differenceInCalendarMonths(s,n)>0||o&&o.every(function(i){return _.differenceInCalendarMonths(s,i)>0})||!1}function Ab(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.includeDates,s=_.startOfYear(e),i=_.subQuarters(s,1);return n&&_.differenceInCalendarQuarters(n,i)>0||o&&o.every(function(a){return _.differenceInCalendarQuarters(a,i)>0})||!1}function Mb(e,t){var r=t===void 0?{}:t,n=r.maxDate,o=r.includeDates,s=_.endOfYear(e),i=_.addQuarters(s,1);return n&&_.differenceInCalendarQuarters(i,n)>0||o&&o.every(function(a){return _.differenceInCalendarQuarters(i,a)>0})||!1}function _d(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.includeDates,s=_.subYears(e,1);return n&&_.differenceInCalendarYears(n,s)>0||o&&o.every(function(i){return _.differenceInCalendarYears(i,s)>0})||!1}function Pb(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.yearItemNumber,s=o===void 0?bo:o,i=_o(_.subYears(e,s)),a=Fr(i,s).endPeriod,c=n&&_.getYear(n);return c&&c>a||!1}function xd(e,t){var r=t===void 0?{}:t,n=r.maxDate,o=r.includeDates,s=_.addYears(e,1);return n&&_.differenceInCalendarYears(s,n)>0||o&&o.every(function(i){return _.differenceInCalendarYears(s,i)>0})||!1}function Ob(e,t){var r=t===void 0?{}:t,n=r.maxDate,o=r.yearItemNumber,s=o===void 0?bo:o,i=_.addYears(e,s),a=Fr(i,s).startPeriod,c=n&&_.getYear(n);return c&&c<a||!1}function wd(e){var t=e.minDate,r=e.includeDates;if(r&&t){var n=r.filter(function(o){return _.differenceInCalendarDays(o,t)>=0});return _.min(n)}else return r?_.min(r):t}function Sd(e){var t=e.maxDate,r=e.includeDates;if(r&&t){var n=r.filter(function(o){return _.differenceInCalendarDays(o,t)<=0});return _.max(n)}else return r?_.max(r):t}function Cd(e,t){var r;e===void 0&&(e=[]),t===void 0&&(t="react-datepicker__day--highlighted");for(var n=new Map,o=0,s=e.length;o<s;o++){var i=e[o];if(_.isDate(i)){var a=ht(i,"MM.dd.yyyy"),c=n.get(a)||[];c.includes(t)||(c.push(t),n.set(a,c))}else if(typeof i=="object"){var l=Object.keys(i),d=(r=l[0])!==null&&r!==void 0?r:"",f=i[d];if(typeof d=="string"&&Array.isArray(f))for(var p=0,y=f.length;p<y;p++){var m=f[p];if(m){var a=ht(m,"MM.dd.yyyy"),c=n.get(a)||[];c.includes(d)||(c.push(d),n.set(a,c))}}}}return n}function jb(e,t){return e.length!==t.length?!1:e.every(function(r,n){return r===t[n]})}function Rb(e,t){e===void 0&&(e=[]),t===void 0&&(t="react-datepicker__day--holidays");var r=new Map;return e.forEach(function(n){var o=n.date,s=n.holidayName;if(_.isDate(o)){var i=ht(o,"MM.dd.yyyy"),a=r.get(i)||{className:"",holidayNames:[]};if(!("className"in a&&a.className===t&&jb(a.holidayNames,[s]))){a.className=t;var c=a.holidayNames;a.holidayNames=c?Or(Or([],c,!0),[s],!1):[s],r.set(i,a)}}}),r}function Nb(e,t,r,n,o){for(var s=o.length,i=[],a=0;a<s;a++){var c=e,l=o[a];l&&(c=_.addHours(c,_.getHours(l)),c=_.addMinutes(c,_.getMinutes(l)),c=_.addSeconds(c,_.getSeconds(l)));var d=_.addMinutes(e,(r+1)*n);_.isAfter(c,t)&&_.isBefore(c,d)&&l!=null&&i.push(l)}return i}function Ed(e){return e<10?"0".concat(e):"".concat(e)}function Fr(e,t){t===void 0&&(t=bo);var r=Math.ceil(_.getYear(e)/t)*t,n=r-(t-1);return{startPeriod:n,endPeriod:r}}function $b(e){var t=new Date(e.getFullYear(),e.getMonth(),e.getDate()),r=new Date(e.getFullYear(),e.getMonth(),e.getDate(),24);return Math.round((+r-+t)/36e5)}function kd(e){var t=e.getSeconds(),r=e.getMilliseconds();return _.toDate(e.getTime()-t*1e3-r)}function Lb(e,t){return kd(e).getTime()===kd(t).getTime()}function Dd(e){if(!_.isDate(e))throw new Error("Invalid date");var t=new Date(e);return t.setHours(0,0,0,0),t}function Ka(e,t){if(!_.isDate(e)||!_.isDate(t))throw new Error("Invalid date received");var r=Dd(e),n=Dd(t);return _.isBefore(r,n)}function Td(e){return e.key===ve.Space}var zb=(function(e){zt(t,e);function t(r){var n=e.call(this,r)||this;return n.inputRef=v.createRef(),n.onTimeChange=function(o){var s,i;n.setState({time:o});var a=n.props.date,c=a instanceof Date&&!isNaN(+a),l=c?a:new Date;if(o?.includes(":")){var d=o.split(":"),f=d[0],p=d[1];l.setHours(Number(f)),l.setMinutes(Number(p))}(i=(s=n.props).onChange)===null||i===void 0||i.call(s,l)},n.renderTimeInput=function(){var o=n.state.time,s=n.props,i=s.date,a=s.timeString,c=s.customTimeInput;return c?v.cloneElement(c,{date:i,value:o,onChange:n.onTimeChange}):v.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:n.inputRef,onClick:function(){var l;(l=n.inputRef.current)===null||l===void 0||l.focus()},required:!0,value:o,onChange:function(l){n.onTimeChange(l.target.value||a)}})},n.state={time:n.props.timeString},n}return t.getDerivedStateFromProps=function(r,n){return r.timeString!==n.time?{time:r.timeString}:null},t.prototype.render=function(){return v.createElement("div",{className:"react-datepicker__input-time-container"},v.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),v.createElement("div",{className:"react-datepicker-time__input-container"},v.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},t})(v.Component),Bb=(function(e){zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.dayEl=v.createRef(),r.handleClick=function(n){!r.isDisabled()&&r.props.onClick&&r.props.onClick(n)},r.handleMouseEnter=function(n){!r.isDisabled()&&r.props.onMouseEnter&&r.props.onMouseEnter(n)},r.handleOnKeyDown=function(n){var o,s,i=n.key;i===ve.Space&&(n.preventDefault(),n.key=ve.Enter),(s=(o=r.props).handleOnKeyDown)===null||s===void 0||s.call(o,n)},r.isSameDay=function(n){return ze(r.props.day,n)},r.isKeyboardSelected=function(){var n;if(r.props.disabledKeyboardNavigation)return!1;var o=r.props.selectsMultiple?(n=r.props.selectedDates)===null||n===void 0?void 0:n.some(function(i){return r.isSameDayOrWeek(i)}):r.isSameDayOrWeek(r.props.selected),s=r.props.preSelection&&r.isDisabled(r.props.preSelection);return!o&&r.isSameDayOrWeek(r.props.preSelection)&&!s},r.isDisabled=function(n){return n===void 0&&(n=r.props.day),hr(n,{minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals,includeDateIntervals:r.props.includeDateIntervals,includeDates:r.props.includeDates,filterDate:r.props.filterDate})},r.isExcluded=function(){return Ga(r.props.day,{excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals})},r.isStartOfWeek=function(){return ze(r.props.day,Xr(r.props.day,r.props.locale,r.props.calendarStartDay))},r.isSameWeek=function(n){return r.props.showWeekPicker&&ze(n,Xr(r.props.day,r.props.locale,r.props.calendarStartDay))},r.isSameDayOrWeek=function(n){return r.isSameDay(n)||r.isSameWeek(n)},r.getHighLightedClass=function(){var n=r.props,o=n.day,s=n.highlightDates;if(!s)return!1;var i=ht(o,"MM.dd.yyyy");return s.get(i)},r.getHolidaysClass=function(){var n,o=r.props,s=o.day,i=o.holidays;if(!i)return[void 0];var a=ht(s,"MM.dd.yyyy");return i.has(a)?[(n=i.get(a))===null||n===void 0?void 0:n.className]:[void 0]},r.isInRange=function(){var n=r.props,o=n.day,s=n.startDate,i=n.endDate;return!s||!i?!1:pn(o,s,i)},r.isInSelectingRange=function(){var n,o=r.props,s=o.day,i=o.selectsStart,a=o.selectsEnd,c=o.selectsRange,l=o.selectsDisabledDaysInRange,d=o.startDate,f=o.swapRange,p=o.endDate,y=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;if(!(i||a||c)||!y||!l&&r.isDisabled())return!1;if(i&&p&&(_.isBefore(y,p)||fn(y,p)))return pn(s,y,p);if(a&&d&&(_.isAfter(y,d)||fn(y,d)))return pn(s,d,y);if(c&&d&&!p){if(fn(y,d)||_.isAfter(y,d))return pn(s,d,y);if(f&&_.isBefore(y,d))return pn(s,y,d)}return!1},r.isSelectingRangeStart=function(){var n;if(!r.isInSelectingRange())return!1;var o=r.props,s=o.day,i=o.startDate,a=o.selectsStart,c=o.swapRange,l=o.selectsRange,d=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;return a?ze(s,d):l&&c&&i&&d?ze(s,_.isBefore(d,i)?d:i):ze(s,i)},r.isSelectingRangeEnd=function(){var n;if(!r.isInSelectingRange())return!1;var o=r.props,s=o.day,i=o.endDate,a=o.selectsEnd,c=o.selectsRange,l=o.swapRange,d=o.startDate,f=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;return a?ze(s,f):c&&l&&d&&f?ze(s,_.isBefore(f,d)?d:f):c?ze(s,f):ze(s,i)},r.isRangeStart=function(){var n=r.props,o=n.day,s=n.startDate,i=n.endDate;return!s||!i?!1:ze(s,o)},r.isRangeEnd=function(){var n=r.props,o=n.day,s=n.startDate,i=n.endDate;return!s||!i?!1:ze(i,o)},r.isWeekend=function(){var n=_.getDay(r.props.day);return n===0||n===6},r.isAfterMonth=function(){return r.props.month!==void 0&&(r.props.month+1)%12===_.getMonth(r.props.day)},r.isBeforeMonth=function(){return r.props.month!==void 0&&(_.getMonth(r.props.day)+1)%12===r.props.month},r.isCurrentDay=function(){return r.isSameDay(Je())},r.isSelected=function(){var n;return r.props.selectsMultiple?(n=r.props.selectedDates)===null||n===void 0?void 0:n.some(function(o){return r.isSameDayOrWeek(o)}):r.isSameDayOrWeek(r.props.selected)},r.getClassNames=function(n){var o=r.props.dayClassName?r.props.dayClassName(n):void 0;return $t("react-datepicker__day",o,"react-datepicker__day--"+wb(r.props.day),{"react-datepicker__day--disabled":r.isDisabled(),"react-datepicker__day--excluded":r.isExcluded(),"react-datepicker__day--selected":r.isSelected(),"react-datepicker__day--keyboard-selected":r.isKeyboardSelected(),"react-datepicker__day--range-start":r.isRangeStart(),"react-datepicker__day--range-end":r.isRangeEnd(),"react-datepicker__day--in-range":r.isInRange(),"react-datepicker__day--in-selecting-range":r.isInSelectingRange(),"react-datepicker__day--selecting-range-start":r.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":r.isSelectingRangeEnd(),"react-datepicker__day--today":r.isCurrentDay(),"react-datepicker__day--weekend":r.isWeekend(),"react-datepicker__day--outside-month":r.isAfterMonth()||r.isBeforeMonth()},r.getHighLightedClass(),r.getHolidaysClass())},r.getAriaLabel=function(){var n=r.props,o=n.day,s=n.ariaLabelPrefixWhenEnabled,i=s===void 0?"Choose":s,a=n.ariaLabelPrefixWhenDisabled,c=a===void 0?"Not available":a,l=r.isDisabled()||r.isExcluded()?c:i;return"".concat(l," ").concat(ht(o,"PPPP",r.props.locale))},r.getTitle=function(){var n=r.props,o=n.day,s=n.holidays,i=s===void 0?new Map:s,a=n.excludeDates,c=ht(o,"MM.dd.yyyy"),l=[];return i.has(c)&&l.push.apply(l,i.get(c).holidayNames),r.isExcluded()&&l.push(a?.filter(function(d){return d instanceof Date?ze(d,o):ze(d?.date,o)}).map(function(d){if(!(d instanceof Date))return d?.message})),l.join(", ")},r.getTabIndex=function(){var n=r.props.selected,o=r.props.preSelection,s=!(r.props.showWeekPicker&&(r.props.showWeekNumber||!r.isStartOfWeek()))&&(r.isKeyboardSelected()||r.isSameDay(n)&&ze(o,n))?0:-1;return s},r.handleFocusDay=function(){var n;r.shouldFocusDay()&&((n=r.dayEl.current)===null||n===void 0||n.focus({preventScroll:!0}))},r.renderDayContents=function(){return r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()||r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()?null:r.props.renderDayContents?r.props.renderDayContents(_.getDate(r.props.day),r.props.day):_.getDate(r.props.day)},r.render=function(){return v.createElement("div",{ref:r.dayEl,className:r.getClassNames(r.props.day),onKeyDown:r.handleOnKeyDown,onClick:r.handleClick,onMouseEnter:r.props.usePointerEvent?void 0:r.handleMouseEnter,onPointerEnter:r.props.usePointerEvent?r.handleMouseEnter:void 0,tabIndex:r.getTabIndex(),"aria-label":r.getAriaLabel(),role:"gridcell",title:r.getTitle(),"aria-disabled":r.isDisabled(),"aria-current":r.isCurrentDay()?"date":void 0,"aria-selected":r.isSelected()||r.isInRange()},r.renderDayContents(),r.getTitle()!==""&&v.createElement("span",{className:"overlay"},r.getTitle()))},r}return t.prototype.componentDidMount=function(){this.handleFocusDay()},t.prototype.componentDidUpdate=function(){this.handleFocusDay()},t.prototype.shouldFocusDay=function(){var r=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(r=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(r=!1),this.isDayActiveElement()&&(r=!0),this.isDuplicateDay()&&(r=!1)),r},t.prototype.isDayActiveElement=function(){var r,n,o;return((n=(r=this.props.containerRef)===null||r===void 0?void 0:r.current)===null||n===void 0?void 0:n.contains(document.activeElement))&&((o=document.activeElement)===null||o===void 0?void 0:o.classList.contains("react-datepicker__day"))},t.prototype.isDuplicateDay=function(){return this.props.monthShowsDuplicateDaysEnd&&this.isAfterMonth()||this.props.monthShowsDuplicateDaysStart&&this.isBeforeMonth()},t})(v.Component),Fb=(function(e){zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.weekNumberEl=v.createRef(),r.handleClick=function(n){r.props.onClick&&r.props.onClick(n)},r.handleOnKeyDown=function(n){var o,s,i=n.key;i===ve.Space&&(n.preventDefault(),n.key=ve.Enter),(s=(o=r.props).handleOnKeyDown)===null||s===void 0||s.call(o,n)},r.isKeyboardSelected=function(){return!r.props.disabledKeyboardNavigation&&!ze(r.props.date,r.props.selected)&&ze(r.props.date,r.props.preSelection)},r.getTabIndex=function(){return r.props.showWeekPicker&&r.props.showWeekNumber&&(r.isKeyboardSelected()||ze(r.props.date,r.props.selected)&&ze(r.props.preSelection,r.props.selected))?0:-1},r.handleFocusWeekNumber=function(n){var o=!1;r.getTabIndex()===0&&!n?.isInputFocused&&ze(r.props.date,r.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(o=!0),r.props.inline&&!r.props.shouldFocusDayInline&&(o=!1),r.props.containerRef&&r.props.containerRef.current&&r.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(o=!0)),o&&r.weekNumberEl.current&&r.weekNumberEl.current.focus({preventScroll:!0})},r}return Object.defineProperty(t,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},t.prototype.componentDidUpdate=function(r){this.handleFocusWeekNumber(r)},t.prototype.render=function(){var r=this.props,n=r.weekNumber,o=r.isWeekDisabled,s=r.ariaLabelPrefix,i=s===void 0?t.defaultProps.ariaLabelPrefix:s,a=r.onClick,c={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!a&&!o,"react-datepicker__week-number--selected":!!a&&ze(this.props.date,this.props.selected)};return v.createElement("div",{ref:this.weekNumberEl,className:$t(c),"aria-label":"".concat(i," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex(),role:"gridcell"},n)},t})(v.Component),Vb=(function(e){zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.isDisabled=function(n){return hr(n,{minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals,includeDateIntervals:r.props.includeDateIntervals,includeDates:r.props.includeDates,filterDate:r.props.filterDate})},r.handleDayClick=function(n,o){r.props.onDayClick&&r.props.onDayClick(n,o)},r.handleDayMouseEnter=function(n){r.props.onDayMouseEnter&&r.props.onDayMouseEnter(n)},r.handleWeekClick=function(n,o,s){for(var i,a,c,l=new Date(n),d=0;d<7;d++){var f=new Date(n);f.setDate(f.getDate()+d);var p=!r.isDisabled(f);if(p){l=f;break}}typeof r.props.onWeekSelect=="function"&&r.props.onWeekSelect(l,o,s),r.props.showWeekPicker&&r.handleDayClick(l,s),((i=r.props.shouldCloseOnSelect)!==null&&i!==void 0?i:t.defaultProps.shouldCloseOnSelect)&&((c=(a=r.props).setOpen)===null||c===void 0||c.call(a,!1))},r.formatWeekNumber=function(n){return r.props.formatWeekNumber?r.props.formatWeekNumber(n):xb(n)},r.isWeekDisabled=function(){for(var n=r.startOfWeek(),o=_.addDays(n,6),s=new Date(n);s<=o;){if(!r.isDisabled(s))return!1;s=_.addDays(s,1)}return!0},r.renderDays=function(){var n=r.startOfWeek(),o=[],s=r.formatWeekNumber(n);if(r.props.showWeekNumber){var i=r.props.onWeekSelect||r.props.showWeekPicker?r.handleWeekClick.bind(r,n,s):void 0;o.push(v.createElement(Fb,Le({key:"W"},t.defaultProps,r.props,{weekNumber:s,isWeekDisabled:r.isWeekDisabled(),date:n,onClick:i})))}return o.concat([0,1,2,3,4,5,6].map(function(a){var c=_.addDays(n,a);return v.createElement(Bb,Le({},t.defaultProps,r.props,{ariaLabelPrefixWhenEnabled:r.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:r.props.disabledDayAriaLabelPrefix,key:c.valueOf(),day:c,onClick:r.handleDayClick.bind(r,c),onMouseEnter:r.handleDayMouseEnter.bind(r,c)}))}))},r.startOfWeek=function(){return Xr(r.props.day,r.props.locale,r.props.calendarStartDay)},r.isKeyboardSelected=function(){return!r.props.disabledKeyboardNavigation&&!ze(r.startOfWeek(),r.props.selected)&&ze(r.startOfWeek(),r.props.preSelection)},r}return Object.defineProperty(t,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),t.prototype.render=function(){var r={"react-datepicker__week":!0,"react-datepicker__week--selected":ze(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()},n=this.props.weekClassName?this.props.weekClassName(this.startOfWeek()):void 0;return v.createElement("div",{className:$t(r,n),role:"row"},this.renderDays())},t})(v.Component),wo,Ub=6,zn={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},Qa=(wo={},wo[zn.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},wo[zn.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},wo[zn.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},wo),li=1;function Id(e,t){return e?zn.FOUR_COLUMNS:t?zn.TWO_COLUMNS:zn.THREE_COLUMNS}var Wb=(function(e){zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.MONTH_REFS=Or([],Array(12),!0).map(function(){return v.createRef()}),r.QUARTER_REFS=Or([],Array(4),!0).map(function(){return v.createRef()}),r.isDisabled=function(n){return hr(n,{minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals,includeDateIntervals:r.props.includeDateIntervals,includeDates:r.props.includeDates,filterDate:r.props.filterDate})},r.isExcluded=function(n){return Ga(n,{excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals})},r.handleDayClick=function(n,o){var s,i;(i=(s=r.props).onDayClick)===null||i===void 0||i.call(s,n,o,r.props.orderInDisplay)},r.handleDayMouseEnter=function(n){var o,s;(s=(o=r.props).onDayMouseEnter)===null||s===void 0||s.call(o,n)},r.handleMouseLeave=function(){var n,o;(o=(n=r.props).onMouseLeave)===null||o===void 0||o.call(n)},r.isRangeStartMonth=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate;return!i||!a?!1:qt(_.setMonth(s,n),i)},r.isRangeStartQuarter=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate;return!i||!a?!1:ni(_.setQuarter(s,n),i)},r.isRangeEndMonth=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate;return!i||!a?!1:qt(_.setMonth(s,n),a)},r.isRangeEndQuarter=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate;return!i||!a?!1:ni(_.setQuarter(s,n),a)},r.isInSelectingRangeMonth=function(n){var o,s=r.props,i=s.day,a=s.selectsStart,c=s.selectsEnd,l=s.selectsRange,d=s.startDate,f=s.endDate,p=(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection;return!(a||c||l)||!p?!1:a&&f?oi(p,f,n,i):c&&d||l&&d&&!f?oi(d,p,n,i):!1},r.isSelectingMonthRangeStart=function(n){var o;if(!r.isInSelectingRangeMonth(n))return!1;var s=r.props,i=s.day,a=s.startDate,c=s.selectsStart,l=_.setMonth(i,n),d=(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection;return c?qt(l,d):qt(l,a)},r.isSelectingMonthRangeEnd=function(n){var o;if(!r.isInSelectingRangeMonth(n))return!1;var s=r.props,i=s.day,a=s.endDate,c=s.selectsEnd,l=s.selectsRange,d=_.setMonth(i,n),f=(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection;return c||l?qt(d,f):qt(d,a)},r.isInSelectingRangeQuarter=function(n){var o,s=r.props,i=s.day,a=s.selectsStart,c=s.selectsEnd,l=s.selectsRange,d=s.startDate,f=s.endDate,p=(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection;return!(a||c||l)||!p?!1:a&&f?ci(p,f,n,i):c&&d||l&&d&&!f?ci(d,p,n,i):!1},r.isWeekInMonth=function(n){var o=r.props.day,s=_.addDays(n,6);return qt(n,o)||qt(s,o)},r.isCurrentMonth=function(n,o){return _.getYear(n)===_.getYear(Je())&&o===_.getMonth(Je())},r.isCurrentQuarter=function(n,o){return _.getYear(n)===_.getYear(Je())&&o===_.getQuarter(Je())},r.isSelectedMonth=function(n,o,s){return _.getMonth(s)===o&&_.getYear(n)===_.getYear(s)},r.isSelectMonthInList=function(n,o,s){return s.some(function(i){return r.isSelectedMonth(n,o,i)})},r.isSelectedQuarter=function(n,o,s){return _.getQuarter(n)===o&&_.getYear(n)===_.getYear(s)},r.isMonthSelected=function(){var n=r.props,o=n.day,s=n.selected,i=n.selectedDates,a=n.selectsMultiple,c=_.getMonth(o);return a?i?.some(function(l){return r.isSelectedMonth(o,c,l)}):!!s&&r.isSelectedMonth(o,c,s)},r.renderWeeks=function(){for(var n=[],o=r.props.fixedHeight,s=0,i=!1,a=Xr(Br(r.props.day),r.props.locale,r.props.calendarStartDay),c=function(m){return r.props.showWeekPicker?Xr(m,r.props.locale,r.props.calendarStartDay):r.props.preSelection},l=function(m){return r.props.showWeekPicker?Xr(m,r.props.locale,r.props.calendarStartDay):r.props.selected},d=r.props.selected?l(r.props.selected):void 0,f=r.props.preSelection?c(r.props.preSelection):void 0;n.push(v.createElement(Vb,Le({},r.props,{ariaLabelPrefix:r.props.weekAriaLabelPrefix,key:s,day:a,month:_.getMonth(r.props.day),onDayClick:r.handleDayClick,onDayMouseEnter:r.handleDayMouseEnter,selected:d,preSelection:f,showWeekNumber:r.props.showWeekNumbers}))),!i;){s++,a=_.addWeeks(a,1);var p=o&&s>=Ub,y=!o&&!r.isWeekInMonth(a);if(p||y)if(r.props.peekNextMonth)i=!0;else break}return n},r.onMonthClick=function(n,o){var s=r.isMonthDisabledForLabelDate(o),i=s.isDisabled,a=s.labelDate;i||r.handleDayClick(Br(a),n)},r.onMonthMouseEnter=function(n){var o=r.isMonthDisabledForLabelDate(n),s=o.isDisabled,i=o.labelDate;s||r.handleDayMouseEnter(Br(i))},r.handleMonthNavigation=function(n,o){var s,i,a,c;(i=(s=r.props).setPreSelection)===null||i===void 0||i.call(s,o),(c=(a=r.MONTH_REFS[n])===null||a===void 0?void 0:a.current)===null||c===void 0||c.focus()},r.handleKeyboardNavigation=function(n,o,s){var i,a=r.props,c=a.selected,l=a.preSelection,d=a.setPreSelection,f=a.minDate,p=a.maxDate,y=a.showFourColumnMonthYearPicker,m=a.showTwoColumnMonthYearPicker;if(l){var h=Id(y,m),b=r.getVerticalOffset(h),S=(i=Qa[h])===null||i===void 0?void 0:i.grid,C=function(E,I,P){var A,W,q=I,F=P;switch(E){case ve.ArrowRight:q=_.addMonths(I,li),F=P===11?0:P+li;break;case ve.ArrowLeft:q=_.subMonths(I,li),F=P===0?11:P-li;break;case ve.ArrowUp:q=_.subMonths(I,b),F=!((A=S?.[0])===null||A===void 0)&&A.includes(P)?P+12-b:P-b;break;case ve.ArrowDown:q=_.addMonths(I,b),F=!((W=S?.[S.length-1])===null||W===void 0)&&W.includes(P)?P-12+b:P+b;break}return{newCalculatedDate:q,newCalculatedMonth:F}},D=function(E,I,P){for(var A=40,W=E,q=!1,F=0,Z=C(W,I,P),le=Z.newCalculatedDate,V=Z.newCalculatedMonth;!q;){if(F>=A){le=I,V=P;break}if(f&&le<f){W=ve.ArrowRight;var ee=C(W,le,V);le=ee.newCalculatedDate,V=ee.newCalculatedMonth}if(p&&le>p){W=ve.ArrowLeft;var ee=C(W,le,V);le=ee.newCalculatedDate,V=ee.newCalculatedMonth}if(Ib(le,r.props)){var ee=C(W,le,V);le=ee.newCalculatedDate,V=ee.newCalculatedMonth}else q=!0;F++}return{newCalculatedDate:le,newCalculatedMonth:V}};if(o===ve.Enter){r.isMonthDisabled(s)||(r.onMonthClick(n,s),d?.(c));return}var k=D(o,l,s),w=k.newCalculatedDate,B=k.newCalculatedMonth;switch(o){case ve.ArrowRight:case ve.ArrowLeft:case ve.ArrowUp:case ve.ArrowDown:r.handleMonthNavigation(B,w);break}}},r.getVerticalOffset=function(n){var o,s;return(s=(o=Qa[n])===null||o===void 0?void 0:o.verticalNavigationOffset)!==null&&s!==void 0?s:0},r.onMonthKeyDown=function(n,o){var s=r.props,i=s.disabledKeyboardNavigation,a=s.handleOnMonthKeyDown,c=n.key;c!==ve.Tab&&n.preventDefault(),i||r.handleKeyboardNavigation(n,c,o),a&&a(n)},r.onQuarterClick=function(n,o){var s=_.setQuarter(r.props.day,o);si(s,r.props)||r.handleDayClick(ud(s),n)},r.onQuarterMouseEnter=function(n){var o=_.setQuarter(r.props.day,n);si(o,r.props)||r.handleDayMouseEnter(ud(o))},r.handleQuarterNavigation=function(n,o){var s,i,a,c;r.isDisabled(o)||r.isExcluded(o)||((i=(s=r.props).setPreSelection)===null||i===void 0||i.call(s,o),(c=(a=r.QUARTER_REFS[n-1])===null||a===void 0?void 0:a.current)===null||c===void 0||c.focus())},r.onQuarterKeyDown=function(n,o){var s,i,a=n.key;if(!r.props.disabledKeyboardNavigation)switch(a){case ve.Enter:r.onQuarterClick(n,o),(i=(s=r.props).setPreSelection)===null||i===void 0||i.call(s,r.props.selected);break;case ve.ArrowRight:if(!r.props.preSelection)break;r.handleQuarterNavigation(o===4?1:o+1,_.addQuarters(r.props.preSelection,1));break;case ve.ArrowLeft:if(!r.props.preSelection)break;r.handleQuarterNavigation(o===1?4:o-1,_.subQuarters(r.props.preSelection,1));break}},r.isMonthDisabledForLabelDate=function(n){var o,s=r.props,i=s.day,a=s.minDate,c=s.maxDate,l=s.excludeDates,d=s.includeDates,f=_.setMonth(i,n);return{isDisabled:(o=(a||c||l||d)&&hd(f,r.props))!==null&&o!==void 0?o:!1,labelDate:f}},r.isMonthDisabled=function(n){var o=r.isMonthDisabledForLabelDate(n).isDisabled;return o},r.getMonthClassNames=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate,c=o.preSelection,l=o.monthClassName,d=l?l(_.setMonth(s,n)):void 0,f=r.getSelection();return $t("react-datepicker__month-text","react-datepicker__month-".concat(n),d,{"react-datepicker__month-text--disabled":r.isMonthDisabled(n),"react-datepicker__month-text--selected":f?r.isSelectMonthInList(s,n,f):void 0,"react-datepicker__month-text--keyboard-selected":!r.props.disabledKeyboardNavigation&&c&&r.isSelectedMonth(s,n,c)&&!r.isMonthSelected()&&!r.isMonthDisabled(n),"react-datepicker__month-text--in-selecting-range":r.isInSelectingRangeMonth(n),"react-datepicker__month-text--in-range":i&&a?oi(i,a,n,s):void 0,"react-datepicker__month-text--range-start":r.isRangeStartMonth(n),"react-datepicker__month-text--range-end":r.isRangeEndMonth(n),"react-datepicker__month-text--selecting-range-start":r.isSelectingMonthRangeStart(n),"react-datepicker__month-text--selecting-range-end":r.isSelectingMonthRangeEnd(n),"react-datepicker__month-text--today":r.isCurrentMonth(s,n)})},r.getTabIndex=function(n){if(r.props.preSelection==null)return"-1";var o=_.getMonth(r.props.preSelection),s=r.isMonthDisabledForLabelDate(o).isDisabled,i=n===o&&!(s||r.props.disabledKeyboardNavigation)?"0":"-1";return i},r.getQuarterTabIndex=function(n){if(r.props.preSelection==null)return"-1";var o=_.getQuarter(r.props.preSelection),s=si(r.props.day,r.props),i=n===o&&!(s||r.props.disabledKeyboardNavigation)?"0":"-1";return i},r.getAriaLabel=function(n){var o=r.props,s=o.chooseDayAriaLabelPrefix,i=s===void 0?"Choose":s,a=o.disabledDayAriaLabelPrefix,c=a===void 0?"Not available":a,l=o.day,d=o.locale,f=_.setMonth(l,n),p=r.isDisabled(f)||r.isExcluded(f)?c:i;return"".concat(p," ").concat(ht(f,"MMMM yyyy",d))},r.getQuarterClassNames=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate,c=o.selected,l=o.minDate,d=o.maxDate,f=o.excludeDates,p=o.includeDates,y=o.filterDate,m=o.preSelection,h=o.disabledKeyboardNavigation,b=(l||d||f||p||y)&&si(_.setQuarter(s,n),r.props);return $t("react-datepicker__quarter-text","react-datepicker__quarter-".concat(n),{"react-datepicker__quarter-text--disabled":b,"react-datepicker__quarter-text--selected":c?r.isSelectedQuarter(s,n,c):void 0,"react-datepicker__quarter-text--keyboard-selected":!h&&m&&r.isSelectedQuarter(s,n,m)&&!b,"react-datepicker__quarter-text--in-selecting-range":r.isInSelectingRangeQuarter(n),"react-datepicker__quarter-text--in-range":i&&a?ci(i,a,n,s):void 0,"react-datepicker__quarter-text--range-start":r.isRangeStartQuarter(n),"react-datepicker__quarter-text--range-end":r.isRangeEndQuarter(n),"react-datepicker__quarter-text--today":r.isCurrentQuarter(s,n)})},r.getMonthContent=function(n){var o=r.props,s=o.showFullMonthYearPicker,i=o.renderMonthContent,a=o.locale,c=o.day,l=pd(n,a),d=Za(n,a);return i?i(n,l,d,c):s?d:l},r.getQuarterContent=function(n){var o,s=r.props,i=s.renderQuarterContent,a=s.locale,c=Tb(n,a);return(o=i?.(n,c))!==null&&o!==void 0?o:c},r.renderMonths=function(){var n,o=r.props,s=o.showTwoColumnMonthYearPicker,i=o.showFourColumnMonthYearPicker,a=o.day,c=o.selected,l=(n=Qa[Id(i,s)])===null||n===void 0?void 0:n.grid;return l?.map(function(d,f){return v.createElement("div",{className:"react-datepicker__month-wrapper",key:f},d.map(function(p,y){return v.createElement("div",{ref:r.MONTH_REFS[p],key:y,onClick:function(m){r.onMonthClick(m,p)},onKeyDown:function(m){Td(m)&&(m.preventDefault(),m.key=ve.Enter),r.onMonthKeyDown(m,p)},onMouseEnter:r.props.usePointerEvent?void 0:function(){return r.onMonthMouseEnter(p)},onPointerEnter:r.props.usePointerEvent?function(){return r.onMonthMouseEnter(p)}:void 0,tabIndex:Number(r.getTabIndex(p)),className:r.getMonthClassNames(p),"aria-disabled":r.isMonthDisabled(p),role:"option","aria-label":r.getAriaLabel(p),"aria-current":r.isCurrentMonth(a,p)?"date":void 0,"aria-selected":c?r.isSelectedMonth(a,p,c):void 0},r.getMonthContent(p))}))})},r.renderQuarters=function(){var n=r.props,o=n.day,s=n.selected,i=[1,2,3,4];return v.createElement("div",{className:"react-datepicker__quarter-wrapper"},i.map(function(a,c){return v.createElement("div",{key:c,ref:r.QUARTER_REFS[c],role:"option",onClick:function(l){r.onQuarterClick(l,a)},onKeyDown:function(l){r.onQuarterKeyDown(l,a)},onMouseEnter:r.props.usePointerEvent?void 0:function(){return r.onQuarterMouseEnter(a)},onPointerEnter:r.props.usePointerEvent?function(){return r.onQuarterMouseEnter(a)}:void 0,className:r.getQuarterClassNames(a),"aria-selected":s?r.isSelectedQuarter(o,a,s):void 0,tabIndex:Number(r.getQuarterTabIndex(a)),"aria-current":r.isCurrentQuarter(o,a)?"date":void 0},r.getQuarterContent(a))}))},r.getClassNames=function(){var n=r.props,o=n.selectingDate,s=n.selectsStart,i=n.selectsEnd,a=n.showMonthYearPicker,c=n.showQuarterYearPicker,l=n.showWeekPicker;return $t("react-datepicker__month",{"react-datepicker__month--selecting-range":o&&(s||i)},{"react-datepicker__monthPicker":a},{"react-datepicker__quarterPicker":c},{"react-datepicker__weekPicker":l})},r}return t.prototype.getSelection=function(){var r=this.props,n=r.selected,o=r.selectedDates,s=r.selectsMultiple;if(s)return o;if(n)return[n]},t.prototype.render=function(){var r=this.props,n=r.showMonthYearPicker,o=r.showQuarterYearPicker,s=r.day,i=r.ariaLabelPrefix,a=i===void 0?"Month ":i,c=a?a.trim()+" ":"",l=n||o;return l?v.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(c).concat(ht(s,"MMMM, yyyy",this.props.locale)),role:"listbox"},n?this.renderMonths():this.renderQuarters()):v.createElement("div",{role:"table"},this.props.dayNamesHeader&&v.createElement("div",{role:"rowgroup"},this.props.dayNamesHeader),v.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(c).concat(ht(s,"MMMM, yyyy",this.props.locale)),role:"rowgroup"},this.renderWeeks()))},t})(v.Component),Hb=(function(e){zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.monthOptionButtonsRef={},r.isSelectedMonth=function(n){return r.props.month===n},r.handleOptionKeyDown=function(n,o){var s;switch(o.key){case"Enter":o.preventDefault(),r.onChange(n);break;case"Escape":o.preventDefault(),r.props.onCancel();break;case"ArrowUp":case"ArrowDown":{o.preventDefault();var i=(n+(o.key==="ArrowUp"?-1:1)+r.props.monthNames.length)%r.props.monthNames.length;(s=r.monthOptionButtonsRef[i])===null||s===void 0||s.focus();break}}},r.renderOptions=function(){return r.monthOptionButtonsRef={},r.props.monthNames.map(function(n,o){return v.createElement("div",{ref:function(s){r.monthOptionButtonsRef[o]=s,r.isSelectedMonth(o)&&s?.focus()},role:"button",tabIndex:0,className:r.isSelectedMonth(o)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:n,onClick:r.onChange.bind(r,o),onKeyDown:r.handleOptionKeyDown.bind(r,o),"aria-selected":r.isSelectedMonth(o)?"true":void 0},r.isSelectedMonth(o)?v.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",n)})},r.onChange=function(n){return r.props.onChange(n)},r.handleClickOutside=function(){return r.props.onCancel()},r}return t.prototype.render=function(){return v.createElement(ei,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},t})(v.Component),Yb=(function(e){zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={dropdownVisible:!1},r.renderSelectOptions=function(n){return n.map(function(o,s){return v.createElement("option",{key:o,value:s},o)})},r.renderSelectMode=function(n){return v.createElement("select",{value:r.props.month,className:"react-datepicker__month-select",onChange:function(o){return r.onChange(parseInt(o.target.value))}},r.renderSelectOptions(n))},r.renderReadView=function(n,o){return v.createElement("button",{key:"read",type:"button",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:r.toggleDropdown},v.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),v.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},o[r.props.month]))},r.renderDropdown=function(n){return v.createElement(Hb,Le({key:"dropdown"},r.props,{monthNames:n,onChange:r.onChange,onCancel:r.toggleDropdown}))},r.renderScrollMode=function(n){var o=r.state.dropdownVisible,s=[r.renderReadView(!o,n)];return o&&s.unshift(r.renderDropdown(n)),s},r.onChange=function(n){r.toggleDropdown(),n!==r.props.month&&r.props.onChange(n)},r.toggleDropdown=function(){return r.setState({dropdownVisible:!r.state.dropdownVisible})},r}return t.prototype.render=function(){var r=this,n=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(s){return pd(s,r.props.locale)}:function(s){return Za(s,r.props.locale)}),o;switch(this.props.dropdownMode){case"scroll":o=this.renderScrollMode(n);break;case"select":o=this.renderSelectMode(n);break}return v.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},o)},t})(v.Component);function qb(e,t){for(var r=[],n=Br(e),o=Br(t);!_.isAfter(n,o);)r.push(Je(n)),n=_.addMonths(n,1);return r}var Zb=(function(e){zt(t,e);function t(r){var n=e.call(this,r)||this;return n.renderOptions=function(){return n.state.monthYearsList.map(function(o){var s=_.getTime(o),i=jr(n.props.date,o)&&qt(n.props.date,o);return v.createElement("div",{className:i?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:s,onClick:n.onChange.bind(n,s),"aria-selected":i?"true":void 0},i?v.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",ht(o,n.props.dateFormat,n.props.locale))})},n.onChange=function(o){return n.props.onChange(o)},n.handleClickOutside=function(){n.props.onCancel()},n.state={monthYearsList:qb(n.props.minDate,n.props.maxDate)},n}return t.prototype.render=function(){var r=$t({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return v.createElement(ei,{className:r,onClickOutside:this.handleClickOutside},this.renderOptions())},t})(v.Component),Gb=(function(e){zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={dropdownVisible:!1},r.renderSelectOptions=function(){for(var n=Br(r.props.minDate),o=Br(r.props.maxDate),s=[];!_.isAfter(n,o);){var i=_.getTime(n);s.push(v.createElement("option",{key:i,value:i},ht(n,r.props.dateFormat,r.props.locale))),n=_.addMonths(n,1)}return s},r.onSelectChange=function(n){r.onChange(parseInt(n.target.value))},r.renderSelectMode=function(){return v.createElement("select",{value:_.getTime(Br(r.props.date)),className:"react-datepicker__month-year-select",onChange:r.onSelectChange},r.renderSelectOptions())},r.renderReadView=function(n){var o=ht(r.props.date,r.props.dateFormat,r.props.locale);return v.createElement("div",{key:"read",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:r.toggleDropdown},v.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),v.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},o))},r.renderDropdown=function(){return v.createElement(Zb,Le({key:"dropdown"},r.props,{onChange:r.onChange,onCancel:r.toggleDropdown}))},r.renderScrollMode=function(){var n=r.state.dropdownVisible,o=[r.renderReadView(!n)];return n&&o.unshift(r.renderDropdown()),o},r.onChange=function(n){r.toggleDropdown();var o=Je(n);jr(r.props.date,o)&&qt(r.props.date,o)||r.props.onChange(o)},r.toggleDropdown=function(){return r.setState({dropdownVisible:!r.state.dropdownVisible})},r}return t.prototype.render=function(){var r;switch(this.props.dropdownMode){case"scroll":r=this.renderScrollMode();break;case"select":r=this.renderSelectMode();break}return v.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},r)},t})(v.Component),Kb=(function(e){zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={height:null},r.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var n,o,s;r.list&&(r.list.scrollTop=(s=r.centerLi&&t.calcCenterPosition(r.props.monthRef?r.props.monthRef.clientHeight-((o=(n=r.header)===null||n===void 0?void 0:n.clientHeight)!==null&&o!==void 0?o:0):r.list.clientHeight,r.centerLi))!==null&&s!==void 0?s:0)})},r.handleClick=function(n){var o,s;(r.props.minTime||r.props.maxTime)&&vd(n,r.props)||(r.props.excludeTimes||r.props.includeTimes||r.props.filterTime)&&gd(n,r.props)||(s=(o=r.props).onChange)===null||s===void 0||s.call(o,n)},r.isSelectedTime=function(n){return r.props.selected&&Lb(r.props.selected,n)},r.isDisabledTime=function(n){return(r.props.minTime||r.props.maxTime)&&vd(n,r.props)||(r.props.excludeTimes||r.props.includeTimes||r.props.filterTime)&&gd(n,r.props)},r.liClasses=function(n){var o,s=["react-datepicker__time-list-item",r.props.timeClassName?r.props.timeClassName(n):void 0];return r.isSelectedTime(n)&&s.push("react-datepicker__time-list-item--selected"),r.isDisabledTime(n)&&s.push("react-datepicker__time-list-item--disabled"),r.props.injectTimes&&(_.getHours(n)*3600+_.getMinutes(n)*60+_.getSeconds(n))%(((o=r.props.intervals)!==null&&o!==void 0?o:t.defaultProps.intervals)*60)!==0&&s.push("react-datepicker__time-list-item--injected"),s.join(" ")},r.handleOnKeyDown=function(n,o){var s,i;n.key===ve.Space&&(n.preventDefault(),n.key=ve.Enter),(n.key===ve.ArrowUp||n.key===ve.ArrowLeft)&&n.target instanceof HTMLElement&&n.target.previousSibling&&(n.preventDefault(),n.target.previousSibling instanceof HTMLElement&&n.target.previousSibling.focus()),(n.key===ve.ArrowDown||n.key===ve.ArrowRight)&&n.target instanceof HTMLElement&&n.target.nextSibling&&(n.preventDefault(),n.target.nextSibling instanceof HTMLElement&&n.target.nextSibling.focus()),n.key===ve.Enter&&r.handleClick(o),(i=(s=r.props).handleOnKeyDown)===null||i===void 0||i.call(s,n)},r.renderTimes=function(){for(var n,o=[],s=typeof r.props.format=="string"?r.props.format:"p",i=(n=r.props.intervals)!==null&&n!==void 0?n:t.defaultProps.intervals,a=r.props.selected||r.props.openToDate||Je(),c=ri(a),l=r.props.injectTimes&&r.props.injectTimes.sort(function(b,S){return b.getTime()-S.getTime()}),d=60*$b(a),f=d/i,p=0;p<f;p++){var y=_.addMinutes(c,p*i);if(o.push(y),l){var m=Nb(c,y,p,i,l);o=o.concat(m)}}var h=o.reduce(function(b,S){return S.getTime()<=a.getTime()?S:b},o[0]);return o.map(function(b){return v.createElement("li",{key:b.valueOf(),onClick:r.handleClick.bind(r,b),className:r.liClasses(b),ref:function(S){b===h&&(r.centerLi=S)},onKeyDown:function(S){r.handleOnKeyDown(S,b)},tabIndex:b===h?0:-1,role:"option","aria-selected":r.isSelectedTime(b)?"true":void 0,"aria-disabled":r.isDisabledTime(b)?"true":void 0},ht(b,s,r.props.locale))})},r.renderTimeCaption=function(){return r.props.showTimeCaption===!1?v.createElement(v.Fragment,null):v.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(r.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(n){r.header=n}},v.createElement("div",{className:"react-datepicker-time__header"},r.props.timeCaption))},r}return Object.defineProperty(t,"defaultProps",{get:function(){return{intervals:30,todayButton:null,timeCaption:"Time",showTimeCaption:!0}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.scrollToTheSelectedTime(),this.observeDatePickerHeightChanges()},t.prototype.componentWillUnmount=function(){var r;(r=this.resizeObserver)===null||r===void 0||r.disconnect()},t.prototype.observeDatePickerHeightChanges=function(){var r=this,n=this.props.monthRef;this.updateContainerHeight(),n&&(this.resizeObserver=new ResizeObserver(function(){r.updateContainerHeight()}),this.resizeObserver.observe(n))},t.prototype.updateContainerHeight=function(){this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})},t.prototype.render=function(){var r=this,n,o=this.state.height;return v.createElement("div",{className:"react-datepicker__time-container ".concat(((n=this.props.todayButton)!==null&&n!==void 0?n:t.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},this.renderTimeCaption(),v.createElement("div",{className:"react-datepicker__time"},v.createElement("div",{className:"react-datepicker__time-box"},v.createElement("ul",{className:"react-datepicker__time-list",ref:function(s){r.list=s},style:o?{height:o}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},t.calcCenterPosition=function(r,n){return n.offsetTop-(r/2-n.clientHeight/2)},t})(v.Component),Ad=3,Qb=(function(e){zt(t,e);function t(r){var n=e.call(this,r)||this;return n.YEAR_REFS=Or([],Array(n.props.yearItemNumber),!0).map(function(){return v.createRef()}),n.isDisabled=function(o){return hr(o,{minDate:n.props.minDate,maxDate:n.props.maxDate,excludeDates:n.props.excludeDates,includeDates:n.props.includeDates,filterDate:n.props.filterDate})},n.isExcluded=function(o){return Ga(o,{excludeDates:n.props.excludeDates})},n.selectingDate=function(){var o;return(o=n.props.selectingDate)!==null&&o!==void 0?o:n.props.preSelection},n.updateFocusOnPaginate=function(o){var s=function(){var i,a;(a=(i=n.YEAR_REFS[o])===null||i===void 0?void 0:i.current)===null||a===void 0||a.focus()};window.requestAnimationFrame(s)},n.handleYearClick=function(o,s){n.props.onDayClick&&n.props.onDayClick(o,s)},n.handleYearNavigation=function(o,s){var i,a,c,l,d=n.props,f=d.date,p=d.yearItemNumber;if(!(f===void 0||p===void 0)){var y=Fr(f,p).startPeriod;n.isDisabled(s)||n.isExcluded(s)||((a=(i=n.props).setPreSelection)===null||a===void 0||a.call(i,s),o-y<0?n.updateFocusOnPaginate(p-(y-o)):o-y>=p?n.updateFocusOnPaginate(Math.abs(p-(o-y))):(l=(c=n.YEAR_REFS[o-y])===null||c===void 0?void 0:c.current)===null||l===void 0||l.focus())}},n.isSameDay=function(o,s){return ze(o,s)},n.isCurrentYear=function(o){return o===_.getYear(Je())},n.isRangeStart=function(o){return n.props.startDate&&n.props.endDate&&jr(_.setYear(Je(),o),n.props.startDate)},n.isRangeEnd=function(o){return n.props.startDate&&n.props.endDate&&jr(_.setYear(Je(),o),n.props.endDate)},n.isInRange=function(o){return ii(o,n.props.startDate,n.props.endDate)},n.isInSelectingRange=function(o){var s=n.props,i=s.selectsStart,a=s.selectsEnd,c=s.selectsRange,l=s.startDate,d=s.endDate;return!(i||a||c)||!n.selectingDate()?!1:i&&d?ii(o,n.selectingDate(),d):a&&l||c&&l&&!d?ii(o,l,n.selectingDate()):!1},n.isSelectingRangeStart=function(o){var s;if(!n.isInSelectingRange(o))return!1;var i=n.props,a=i.startDate,c=i.selectsStart,l=_.setYear(Je(),o);return c?jr(l,(s=n.selectingDate())!==null&&s!==void 0?s:null):jr(l,a??null)},n.isSelectingRangeEnd=function(o){var s;if(!n.isInSelectingRange(o))return!1;var i=n.props,a=i.endDate,c=i.selectsEnd,l=i.selectsRange,d=_.setYear(Je(),o);return c||l?jr(d,(s=n.selectingDate())!==null&&s!==void 0?s:null):jr(d,a??null)},n.isKeyboardSelected=function(o){if(!(n.props.disabledKeyboardNavigation||n.props.date===void 0||n.props.preSelection==null)){var s=n.props,i=s.minDate,a=s.maxDate,c=s.excludeDates,l=s.includeDates,d=s.filterDate,f=s.selected,p=_o(_.setYear(n.props.date,o)),y=(i||a||c||l||d)&&ai(o,n.props),m=!!f&&ze(p,_o(f)),h=ze(p,_o(n.props.preSelection));return!n.props.inline&&!m&&h&&!y}},n.isSelectedYear=function(o){var s=n.props,i=s.selectsMultiple,a=s.selected,c=s.selectedDates;return i?c?.some(function(l){return o===_.getYear(l)}):!!a&&o===_.getYear(a)},n.onYearClick=function(o,s){var i=n.props.date;i!==void 0&&n.handleYearClick(_o(_.setYear(i,s)),o)},n.onYearKeyDown=function(o,s){var i,a,c=o.key,l=n.props,d=l.date,f=l.yearItemNumber,p=l.handleOnKeyDown;if(c!==ve.Tab&&o.preventDefault(),!n.props.disabledKeyboardNavigation)switch(c){case ve.Enter:if(n.props.selected==null)break;n.onYearClick(o,s),(a=(i=n.props).setPreSelection)===null||a===void 0||a.call(i,n.props.selected);break;case ve.ArrowRight:if(n.props.preSelection==null)break;n.handleYearNavigation(s+1,_.addYears(n.props.preSelection,1));break;case ve.ArrowLeft:if(n.props.preSelection==null)break;n.handleYearNavigation(s-1,_.subYears(n.props.preSelection,1));break;case ve.ArrowUp:{if(d===void 0||f===void 0||n.props.preSelection==null)break;var y=Fr(d,f).startPeriod,m=Ad,h=s-m;if(h<y){var b=f%m;s>=y&&s<y+b?m=b:m+=b,h=s-m}n.handleYearNavigation(h,_.subYears(n.props.preSelection,m));break}case ve.ArrowDown:{if(d===void 0||f===void 0||n.props.preSelection==null)break;var S=Fr(d,f).endPeriod,m=Ad,h=s+m;if(h>S){var b=f%m;s<=S&&s>S-b?m=b:m+=b,h=s+m}n.handleYearNavigation(h,_.addYears(n.props.preSelection,m));break}}p&&p(o)},n.getYearClassNames=function(o){var s=n.props,i=s.date,a=s.minDate,c=s.maxDate,l=s.excludeDates,d=s.includeDates,f=s.filterDate,p=s.yearClassName;return $t("react-datepicker__year-text","react-datepicker__year-".concat(o),i?p?.(_.setYear(i,o)):void 0,{"react-datepicker__year-text--selected":n.isSelectedYear(o),"react-datepicker__year-text--disabled":(a||c||l||d||f)&&ai(o,n.props),"react-datepicker__year-text--keyboard-selected":n.isKeyboardSelected(o),"react-datepicker__year-text--range-start":n.isRangeStart(o),"react-datepicker__year-text--range-end":n.isRangeEnd(o),"react-datepicker__year-text--in-range":n.isInRange(o),"react-datepicker__year-text--in-selecting-range":n.isInSelectingRange(o),"react-datepicker__year-text--selecting-range-start":n.isSelectingRangeStart(o),"react-datepicker__year-text--selecting-range-end":n.isSelectingRangeEnd(o),"react-datepicker__year-text--today":n.isCurrentYear(o)})},n.getYearTabIndex=function(o){if(n.props.disabledKeyboardNavigation||n.props.preSelection==null)return"-1";var s=_.getYear(n.props.preSelection),i=ai(o,n.props);return o===s&&!i?"0":"-1"},n.getYearContent=function(o){return n.props.renderYearContent?n.props.renderYearContent(o):o},n}return t.prototype.render=function(){var r=this,n=[],o=this.props,s=o.date,i=o.yearItemNumber,a=o.onYearMouseEnter,c=o.onYearMouseLeave;if(s===void 0)return null;for(var l=Fr(s,i),d=l.startPeriod,f=l.endPeriod,p=function(h){n.push(v.createElement("div",{ref:y.YEAR_REFS[h-d],onClick:function(b){r.onYearClick(b,h)},onKeyDown:function(b){Td(b)&&(b.preventDefault(),b.key=ve.Enter),r.onYearKeyDown(b,h)},tabIndex:Number(y.getYearTabIndex(h)),className:y.getYearClassNames(h),onMouseEnter:y.props.usePointerEvent?void 0:function(b){return a(b,h)},onPointerEnter:y.props.usePointerEvent?function(b){return a(b,h)}:void 0,onMouseLeave:y.props.usePointerEvent?void 0:function(b){return c(b,h)},onPointerLeave:y.props.usePointerEvent?function(b){return c(b,h)}:void 0,key:h,"aria-current":y.isCurrentYear(h)?"date":void 0},y.getYearContent(h)))},y=this,m=d;m<=f;m++)p(m);return v.createElement("div",{className:"react-datepicker__year"},v.createElement("div",{className:"react-datepicker__year-wrapper",onMouseLeave:this.props.usePointerEvent?void 0:this.props.clearSelectingDate,onPointerLeave:this.props.usePointerEvent?this.props.clearSelectingDate:void 0},n))},t})(v.Component);function Xb(e,t,r,n){for(var o=[],s=0;s<2*t+1;s++){var i=e+t-s,a=!0;r&&(a=_.getYear(r)<=i),n&&a&&(a=_.getYear(n)>=i),a&&o.push(i)}return o}var Jb=(function(e){zt(t,e);function t(r){var n=e.call(this,r)||this;n.yearOptionButtonsRef={},n.handleOptionKeyDown=function(a,c){var l;switch(c.key){case"Enter":c.preventDefault(),n.onChange(a);break;case"Escape":c.preventDefault(),n.props.onCancel();break;case"ArrowUp":case"ArrowDown":{c.preventDefault();var d=a+(c.key==="ArrowUp"?1:-1);n.yearOptionButtonsRef[d]&&((l=n.yearOptionButtonsRef[d])===null||l===void 0||l.focus());break}}},n.renderOptions=function(){n.yearOptionButtonsRef={};var a=n.props.year,c=n.state.yearsList.map(function(f){return v.createElement("div",{ref:function(p){n.yearOptionButtonsRef[f]=p,f===a&&p?.focus()},role:"button",tabIndex:0,className:a===f?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:f,onClick:n.onChange.bind(n,f),onKeyDown:n.handleOptionKeyDown.bind(n,f),"aria-selected":a===f?"true":void 0},a===f?v.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",f)}),l=n.props.minDate?_.getYear(n.props.minDate):null,d=n.props.maxDate?_.getYear(n.props.maxDate):null;return(!d||!n.state.yearsList.find(function(f){return f===d}))&&c.unshift(v.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:n.incrementYears},v.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!l||!n.state.yearsList.find(function(f){return f===l}))&&c.push(v.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:n.decrementYears},v.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),c},n.onChange=function(a){n.props.onChange(a)},n.handleClickOutside=function(){n.props.onCancel()},n.shiftYears=function(a){var c=n.state.yearsList.map(function(l){return l+a});n.setState({yearsList:c})},n.incrementYears=function(){return n.shiftYears(1)},n.decrementYears=function(){return n.shiftYears(-1)};var o=r.yearDropdownItemNumber,s=r.scrollableYearDropdown,i=o||(s?10:5);return n.state={yearsList:Xb(n.props.year,i,n.props.minDate,n.props.maxDate)},n.dropdownRef=v.createRef(),n}return t.prototype.componentDidMount=function(){var r=this.dropdownRef.current;if(r){var n=r.children?Array.from(r.children):null,o=n?n.find(function(s){return s.ariaSelected}):null;r.scrollTop=o&&o instanceof HTMLElement?o.offsetTop+(o.clientHeight-r.clientHeight)/2:(r.scrollHeight-r.clientHeight)/2}},t.prototype.render=function(){var r=$t({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return v.createElement(ei,{className:r,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},t})(v.Component),e2=(function(e){zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={dropdownVisible:!1},r.renderSelectOptions=function(){for(var n=r.props.minDate?_.getYear(r.props.minDate):1900,o=r.props.maxDate?_.getYear(r.props.maxDate):2100,s=[],i=n;i<=o;i++)s.push(v.createElement("option",{key:i,value:i},i));return s},r.onSelectChange=function(n){r.onChange(parseInt(n.target.value))},r.renderSelectMode=function(){return v.createElement("select",{value:r.props.year,className:"react-datepicker__year-select",onChange:r.onSelectChange},r.renderSelectOptions())},r.renderReadView=function(n){return v.createElement("button",{key:"read",type:"button",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:r.toggleDropdown},v.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),v.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},r.props.year))},r.renderDropdown=function(){return v.createElement(Jb,Le({key:"dropdown"},r.props,{onChange:r.onChange,onCancel:r.toggleDropdown}))},r.renderScrollMode=function(){var n=r.state.dropdownVisible,o=[r.renderReadView(!n)];return n&&o.unshift(r.renderDropdown()),o},r.onChange=function(n){r.toggleDropdown(),n!==r.props.year&&r.props.onChange(n)},r.toggleDropdown=function(n){r.setState({dropdownVisible:!r.state.dropdownVisible},function(){r.props.adjustDateOnChange&&r.handleYearChange(r.props.date,n)})},r.handleYearChange=function(n,o){var s;(s=r.onSelect)===null||s===void 0||s.call(r,n,o),r.setOpen()},r.onSelect=function(n,o){var s,i;(i=(s=r.props).onSelect)===null||i===void 0||i.call(s,n,o)},r.setOpen=function(){var n,o;(o=(n=r.props).setOpen)===null||o===void 0||o.call(n,!0)},r}return t.prototype.render=function(){var r;switch(this.props.dropdownMode){case"scroll":r=this.renderScrollMode();break;case"select":r=this.renderSelectMode();break}return v.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},r)},t})(v.Component),t2=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],Md="react-datepicker-ignore-onclickoutside",r2=function(e){var t=(e.className||"").split(/\s+/);return t2.some(function(r){return t.indexOf(r)>=0})},n2=(function(e){zt(t,e);function t(r){var n=e.call(this,r)||this;return n.monthContainer=void 0,n.handleClickOutside=function(o){n.props.onClickOutside(o)},n.setClickOutsideRef=function(){return n.containerRef.current},n.handleDropdownFocus=function(o){var s,i;r2(o.target)&&((i=(s=n.props).onDropdownFocus)===null||i===void 0||i.call(s,o))},n.getDateInView=function(){var o=n.props,s=o.preSelection,i=o.selected,a=o.openToDate,c=wd(n.props),l=Sd(n.props),d=Je(),f=a||i||s;return f||(c&&_.isBefore(d,c)?c:l&&_.isAfter(d,l)?l:d)},n.increaseMonth=function(){n.setState(function(o){var s=o.date;return{date:_.addMonths(s,1)}},function(){return n.handleMonthChange(n.state.date)})},n.decreaseMonth=function(){n.setState(function(o){var s=o.date;return{date:_.subMonths(s,1)}},function(){return n.handleMonthChange(n.state.date)})},n.handleDayClick=function(o,s,i){n.props.onSelect(o,s,i),n.props.setPreSelection&&n.props.setPreSelection(o)},n.handleDayMouseEnter=function(o){n.setState({selectingDate:o}),n.props.onDayMouseEnter&&n.props.onDayMouseEnter(o)},n.handleMonthMouseLeave=function(){n.setState({selectingDate:void 0}),n.props.onMonthMouseLeave&&n.props.onMonthMouseLeave()},n.handleYearMouseEnter=function(o,s){n.setState({selectingDate:_.setYear(Je(),s)}),n.props.onYearMouseEnter&&n.props.onYearMouseEnter(o,s)},n.handleYearMouseLeave=function(o,s){n.props.onYearMouseLeave&&n.props.onYearMouseLeave(o,s)},n.handleYearChange=function(o){var s,i,a,c;(i=(s=n.props).onYearChange)===null||i===void 0||i.call(s,o),n.setState({isRenderAriaLiveMessage:!0}),n.props.adjustDateOnChange&&(n.props.onSelect(o),(c=(a=n.props).setOpen)===null||c===void 0||c.call(a,!0)),n.props.setPreSelection&&n.props.setPreSelection(o)},n.getEnabledPreSelectionDateForMonth=function(o){if(!hr(o,n.props))return o;for(var s=Br(o),i=Cb(o),a=_.differenceInDays(i,s),c=null,l=0;l<=a;l++){var d=_.addDays(s,l);if(!hr(d,n.props)){c=d;break}}return c},n.handleMonthChange=function(o){var s,i,a,c=(s=n.getEnabledPreSelectionDateForMonth(o))!==null&&s!==void 0?s:o;n.handleCustomMonthChange(c),n.props.adjustDateOnChange&&(n.props.onSelect(c),(a=(i=n.props).setOpen)===null||a===void 0||a.call(i,!0)),n.props.setPreSelection&&n.props.setPreSelection(c)},n.handleCustomMonthChange=function(o){var s,i;(i=(s=n.props).onMonthChange)===null||i===void 0||i.call(s,o),n.setState({isRenderAriaLiveMessage:!0})},n.handleMonthYearChange=function(o){n.handleYearChange(o),n.handleMonthChange(o)},n.changeYear=function(o){n.setState(function(s){var i=s.date;return{date:_.setYear(i,Number(o))}},function(){return n.handleYearChange(n.state.date)})},n.changeMonth=function(o){n.setState(function(s){var i=s.date;return{date:_.setMonth(i,Number(o))}},function(){return n.handleMonthChange(n.state.date)})},n.changeMonthYear=function(o){n.setState(function(s){var i=s.date;return{date:_.setYear(_.setMonth(i,_.getMonth(o)),_.getYear(o))}},function(){return n.handleMonthYearChange(n.state.date)})},n.header=function(o){o===void 0&&(o=n.state.date);var s=Xr(o,n.props.locale,n.props.calendarStartDay),i=[];return n.props.showWeekNumbers&&i.push(v.createElement("div",{key:"W",className:"react-datepicker__day-name",role:"columnheader"},v.createElement("span",{className:"react-datepicker__sr-only"},"Week number"),v.createElement("span",{"aria-hidden":"true"},n.props.weekLabel||"#"))),i.concat([0,1,2,3,4,5,6].map(function(a){var c=_.addDays(s,a),l=n.formatWeekday(c,n.props.locale),d=n.props.weekDayClassName?n.props.weekDayClassName(c):void 0;return v.createElement("div",{key:a,role:"columnheader",className:$t("react-datepicker__day-name",d)},v.createElement("span",{className:"react-datepicker__sr-only"},ht(c,"EEEE",n.props.locale)),v.createElement("span",{"aria-hidden":"true"},l))}))},n.formatWeekday=function(o,s){return n.props.formatWeekDay?Eb(o,n.props.formatWeekDay,s):n.props.useWeekdaysShort?Db(o,s):kb(o,s)},n.decreaseYear=function(){n.setState(function(o){var s,i=o.date;return{date:_.subYears(i,n.props.showYearPicker?(s=n.props.yearItemNumber)!==null&&s!==void 0?s:t.defaultProps.yearItemNumber:1)}},function(){return n.handleYearChange(n.state.date)})},n.clearSelectingDate=function(){n.setState({selectingDate:void 0})},n.renderPreviousButton=function(){var o,s,i;if(!n.props.renderCustomHeader){var a=(o=n.props.monthsShown)!==null&&o!==void 0?o:t.defaultProps.monthsShown,c=n.props.showPreviousMonths?a-1:0,l=(s=n.props.monthSelectedIn)!==null&&s!==void 0?s:c,d=_.subMonths(n.state.date,l),f;switch(!0){case n.props.showMonthYearPicker:f=_d(n.state.date,n.props);break;case n.props.showYearPicker:f=Pb(n.state.date,n.props);break;case n.props.showQuarterYearPicker:f=Ab(n.state.date,n.props);break;default:f=yd(d,n.props);break}if(!(!((i=n.props.forceShowMonthNavigation)!==null&&i!==void 0?i:t.defaultProps.forceShowMonthNavigation)&&!n.props.showDisabledMonthNavigation&&f||n.props.showTimeSelectOnly)){var p=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],y=["react-datepicker__navigation","react-datepicker__navigation--previous"],m=n.decreaseMonth;(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker)&&(m=n.decreaseYear),f&&n.props.showDisabledMonthNavigation&&(y.push("react-datepicker__navigation--previous--disabled"),m=void 0);var h=n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker,b=n.props,S=b.previousMonthButtonLabel,C=S===void 0?t.defaultProps.previousMonthButtonLabel:S,D=b.previousYearButtonLabel,k=D===void 0?t.defaultProps.previousYearButtonLabel:D,w=n.props,B=w.previousMonthAriaLabel,E=B===void 0?typeof C=="string"?C:"Previous Month":B,I=w.previousYearAriaLabel,P=I===void 0?typeof k=="string"?k:"Previous Year":I;return v.createElement("button",{type:"button",className:y.join(" "),onClick:m,onKeyDown:n.props.handleOnKeyDown,"aria-label":h?P:E},v.createElement("span",{className:p.join(" ")},h?k:C))}}},n.increaseYear=function(){n.setState(function(o){var s,i=o.date;return{date:_.addYears(i,n.props.showYearPicker?(s=n.props.yearItemNumber)!==null&&s!==void 0?s:t.defaultProps.yearItemNumber:1)}},function(){return n.handleYearChange(n.state.date)})},n.renderNextButton=function(){var o;if(!n.props.renderCustomHeader){var s;switch(!0){case n.props.showMonthYearPicker:s=xd(n.state.date,n.props);break;case n.props.showYearPicker:s=Ob(n.state.date,n.props);break;case n.props.showQuarterYearPicker:s=Mb(n.state.date,n.props);break;default:s=bd(n.state.date,n.props);break}if(!(!((o=n.props.forceShowMonthNavigation)!==null&&o!==void 0?o:t.defaultProps.forceShowMonthNavigation)&&!n.props.showDisabledMonthNavigation&&s||n.props.showTimeSelectOnly)){var i=["react-datepicker__navigation","react-datepicker__navigation--next"],a=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];n.props.showTimeSelect&&i.push("react-datepicker__navigation--next--with-time"),n.props.todayButton&&i.push("react-datepicker__navigation--next--with-today-button");var c=n.increaseMonth;(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker)&&(c=n.increaseYear),s&&n.props.showDisabledMonthNavigation&&(i.push("react-datepicker__navigation--next--disabled"),c=void 0);var l=n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker,d=n.props,f=d.nextMonthButtonLabel,p=f===void 0?t.defaultProps.nextMonthButtonLabel:f,y=d.nextYearButtonLabel,m=y===void 0?t.defaultProps.nextYearButtonLabel:y,h=n.props,b=h.nextMonthAriaLabel,S=b===void 0?typeof p=="string"?p:"Next Month":b,C=h.nextYearAriaLabel,D=C===void 0?typeof m=="string"?m:"Next Year":C;return v.createElement("button",{type:"button",className:i.join(" "),onClick:c,onKeyDown:n.props.handleOnKeyDown,"aria-label":l?D:S},v.createElement("span",{className:a.join(" ")},l?m:p))}}},n.renderCurrentMonth=function(o){o===void 0&&(o=n.state.date);var s=["react-datepicker__current-month"];return n.props.showYearDropdown&&s.push("react-datepicker__current-month--hasYearDropdown"),n.props.showMonthDropdown&&s.push("react-datepicker__current-month--hasMonthDropdown"),n.props.showMonthYearDropdown&&s.push("react-datepicker__current-month--hasMonthYearDropdown"),v.createElement("h2",{className:s.join(" ")},ht(o,n.props.dateFormat,n.props.locale))},n.renderYearDropdown=function(o){if(o===void 0&&(o=!1),!(!n.props.showYearDropdown||o))return v.createElement(e2,Le({},t.defaultProps,n.props,{date:n.state.date,onChange:n.changeYear,year:_.getYear(n.state.date)}))},n.renderMonthDropdown=function(o){if(o===void 0&&(o=!1),!(!n.props.showMonthDropdown||o))return v.createElement(Yb,Le({},t.defaultProps,n.props,{month:_.getMonth(n.state.date),onChange:n.changeMonth}))},n.renderMonthYearDropdown=function(o){if(o===void 0&&(o=!1),!(!n.props.showMonthYearDropdown||o))return v.createElement(Gb,Le({},t.defaultProps,n.props,{date:n.state.date,onChange:n.changeMonthYear}))},n.handleTodayButtonClick=function(o){n.props.onSelect(dd(),o),n.props.setPreSelection&&n.props.setPreSelection(dd())},n.renderTodayButton=function(){if(!(!n.props.todayButton||n.props.showTimeSelectOnly))return v.createElement("div",{className:"react-datepicker__today-button",onClick:n.handleTodayButtonClick},n.props.todayButton)},n.renderDayNamesHeader=function(o){return v.createElement("div",{className:"react-datepicker__day-names",role:"row"},n.header(o))},n.renderDefaultHeader=function(o){var s=o.monthDate,i=o.i;return v.createElement("div",{className:"react-datepicker__header ".concat(n.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},n.renderCurrentMonth(s),v.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(n.props.dropdownMode),onFocus:n.handleDropdownFocus},n.renderMonthDropdown(i!==0),n.renderMonthYearDropdown(i!==0),n.renderYearDropdown(i!==0)))},n.renderCustomHeader=function(o){var s,i,a=o.monthDate,c=o.i;if(n.props.showTimeSelect&&!n.state.monthContainer||n.props.showTimeSelectOnly)return null;var l=n.props,d=l.showYearPicker,f=l.yearItemNumber,p;if(d){var y=Fr(a,f),m=y.startPeriod,h=y.endPeriod;p={startYear:m,endYear:h}}var b=yd(n.state.date,n.props),S=bd(n.state.date,n.props),C=_d(n.state.date,n.props),D=xd(n.state.date,n.props);return v.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:n.props.onDropdownFocus},(i=(s=n.props).renderCustomHeader)===null||i===void 0?void 0:i.call(s,Le(Le(Le({},n.state),d&&{visibleYearsRange:p}),{customHeaderCount:c,monthDate:a,changeMonth:n.changeMonth,changeYear:n.changeYear,decreaseMonth:n.decreaseMonth,increaseMonth:n.increaseMonth,decreaseYear:n.decreaseYear,increaseYear:n.increaseYear,prevMonthButtonDisabled:b,nextMonthButtonDisabled:S,prevYearButtonDisabled:C,nextYearButtonDisabled:D})))},n.renderYearHeader=function(o){var s=o.monthDate,i=n.props,a=i.showYearPicker,c=i.yearItemNumber,l=c===void 0?t.defaultProps.yearItemNumber:c,d=Fr(s,l),f=d.startPeriod,p=d.endPeriod;return v.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},a?"".concat(f," - ").concat(p):_.getYear(s))},n.renderHeader=function(o){var s=o.monthDate,i=o.i,a=i===void 0?0:i,c={monthDate:s,i:a};switch(!0){case n.props.renderCustomHeader!==void 0:return n.renderCustomHeader(c);case(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker):return n.renderYearHeader(c);default:return n.renderDefaultHeader(c)}},n.renderMonths=function(){var o,s;if(!(n.props.showTimeSelectOnly||n.props.showYearPicker)){for(var i=[],a=(o=n.props.monthsShown)!==null&&o!==void 0?o:t.defaultProps.monthsShown,c=n.props.showPreviousMonths?a-1:0,l=n.props.showMonthYearPicker||n.props.showQuarterYearPicker?_.addYears(n.state.date,c):_.subMonths(n.state.date,c),d=(s=n.props.monthSelectedIn)!==null&&s!==void 0?s:c,f=0;f<a;++f){var p=f-d+c,y=n.props.showMonthYearPicker||n.props.showQuarterYearPicker?_.addYears(l,p):_.addMonths(l,p),m="month-".concat(f),h=f<a-1,b=f>0;i.push(v.createElement("div",{key:m,ref:function(S){n.monthContainer=S??void 0},className:"react-datepicker__month-container"},n.renderHeader({monthDate:y,i:f}),v.createElement(Wb,Le({},t.defaultProps,n.props,{containerRef:n.containerRef,ariaLabelPrefix:n.props.monthAriaLabelPrefix,day:y,onDayClick:n.handleDayClick,handleOnKeyDown:n.props.handleOnDayKeyDown,handleOnMonthKeyDown:n.props.handleOnKeyDown,onDayMouseEnter:n.handleDayMouseEnter,onMouseLeave:n.handleMonthMouseLeave,orderInDisplay:f,selectingDate:n.state.selectingDate,monthShowsDuplicateDaysEnd:h,monthShowsDuplicateDaysStart:b,dayNamesHeader:n.renderDayNamesHeader(y)}))))}return i}},n.renderYears=function(){if(!n.props.showTimeSelectOnly&&n.props.showYearPicker)return v.createElement("div",{className:"react-datepicker__year--container"},n.renderHeader({monthDate:n.state.date}),v.createElement(Qb,Le({},t.defaultProps,n.props,{selectingDate:n.state.selectingDate,date:n.state.date,onDayClick:n.handleDayClick,clearSelectingDate:n.clearSelectingDate,onYearMouseEnter:n.handleYearMouseEnter,onYearMouseLeave:n.handleYearMouseLeave})))},n.renderTimeSection=function(){if(n.props.showTimeSelect&&(n.state.monthContainer||n.props.showTimeSelectOnly))return v.createElement(Kb,Le({},t.defaultProps,n.props,{onChange:n.props.onTimeChange,format:n.props.timeFormat,intervals:n.props.timeIntervals,monthRef:n.state.monthContainer}))},n.renderInputTimeSection=function(){var o=n.props.selected?new Date(n.props.selected):void 0,s=o&&ti(o)&&!!n.props.selected,i=s?"".concat(Ed(o.getHours()),":").concat(Ed(o.getMinutes())):"";if(n.props.showTimeInput)return v.createElement(zb,Le({},t.defaultProps,n.props,{date:o,timeString:i,onChange:n.props.onTimeChange}))},n.renderAriaLiveRegion=function(){var o,s=Fr(n.state.date,(o=n.props.yearItemNumber)!==null&&o!==void 0?o:t.defaultProps.yearItemNumber),i=s.startPeriod,a=s.endPeriod,c;return n.props.showYearPicker?c="".concat(i," - ").concat(a):n.props.showMonthYearPicker||n.props.showQuarterYearPicker?c=_.getYear(n.state.date):c="".concat(Za(_.getMonth(n.state.date),n.props.locale)," ").concat(_.getYear(n.state.date)),v.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},n.state.isRenderAriaLiveMessage&&c)},n.renderChildren=function(){if(n.props.children)return v.createElement("div",{className:"react-datepicker__children-container"},n.props.children)},n.containerRef=v.createRef(),n.state={date:n.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},n}return Object.defineProperty(t,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,outsideClickIgnoreClass:Md,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:bo}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var r=this;this.props.showTimeSelect&&(this.assignMonthContainer=(function(){r.setState({monthContainer:r.monthContainer})})())},t.prototype.componentDidUpdate=function(r){var n=this;if(this.props.preSelection&&(!ze(this.props.preSelection,r.preSelection)||this.props.monthSelectedIn!==r.monthSelectedIn)){var o=!qt(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return o&&n.handleCustomMonthChange(n.state.date)})}else this.props.openToDate&&!ze(this.props.openToDate,r.openToDate)&&this.setState({date:this.props.openToDate})},t.prototype.render=function(){var r=this.props.container||vb;return v.createElement(ei,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},v.createElement("div",{style:{display:"contents"},ref:this.containerRef},v.createElement(r,{className:$t("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showTime:this.props.showTimeSelect||this.props.showTimeInput,showTimeSelectOnly:this.props.showTimeSelectOnly},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren())))},t})(v.Component),o2=function(e){var t=e.icon,r=e.className,n=r===void 0?"":r,o=e.onClick,s="react-datepicker__calendar-icon";if(typeof t=="string")return v.createElement("i",{className:"".concat(s," ").concat(t," ").concat(n),"aria-hidden":"true",onClick:o});if(v.isValidElement(t)){var i=t;return v.cloneElement(i,{className:"".concat(i.props.className||""," ").concat(s," ").concat(n),onClick:function(a){typeof i.props.onClick=="function"&&i.props.onClick(a),typeof o=="function"&&o(a)}})}return v.createElement("svg",{className:"".concat(s," ").concat(n),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:o},v.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}))},Pd=(function(e){zt(t,e);function t(r){var n=e.call(this,r)||this;return n.portalRoot=null,n.el=document.createElement("div"),n}return t.prototype.componentDidMount=function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)},t.prototype.componentWillUnmount=function(){this.portalRoot&&this.portalRoot.removeChild(this.el)},t.prototype.render=function(){return il.createPortal(this.props.children,this.el)},t})(v.Component),s2="[tabindex], a, button, input, select, textarea",i2=function(e){return(e instanceof HTMLAnchorElement||!e.disabled)&&e.tabIndex!==-1},Od=(function(e){zt(t,e);function t(r){var n=e.call(this,r)||this;return n.getTabChildren=function(){var o;return Array.prototype.slice.call((o=n.tabLoopRef.current)===null||o===void 0?void 0:o.querySelectorAll(s2),1,-1).filter(i2)},n.handleFocusStart=function(){var o=n.getTabChildren();o&&o.length>1&&o[o.length-1].focus()},n.handleFocusEnd=function(){var o=n.getTabChildren();o&&o.length>1&&o[0].focus()},n.tabLoopRef=v.createRef(),n}return t.prototype.render=function(){var r;return((r=this.props.enableTabLoop)!==null&&r!==void 0?r:t.defaultProps.enableTabLoop)?v.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},v.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,v.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},t.defaultProps={enableTabLoop:!0},t})(v.Component);function a2(e){function t(r){var n,o=typeof r.hidePopper=="boolean"?r.hidePopper:!0,s=v.useRef(null),i=gb(Le({open:!o,whileElementsMounted:qy,placement:r.popperPlacement,middleware:Or([rb({padding:15}),tb(10),nb({element:s})],(n=r.popperModifiers)!==null&&n!==void 0?n:[],!0)},r.popperProps)),a=Le(Le({},r),{hidePopper:o,popperProps:Le(Le({},i),{arrowRef:s})});return v.createElement(e,Le({},a))}return t.displayName="withFloating(".concat(e.displayName||e.name||"Component",")"),t}var c2=function(e){var t=e.className,r=e.wrapperClassName,n=e.hidePopper,o=n===void 0?!0:n,s=e.popperComponent,i=e.targetComponent,a=e.enableTabLoop,c=e.popperOnKeyDown,l=e.portalId,d=e.portalHost,f=e.popperProps,p=e.showArrow,y=void 0;if(!o){var m=$t("react-datepicker-popper",t);y=v.createElement(Od,{enableTabLoop:a},v.createElement("div",{ref:f.refs.setFloating,style:f.floatingStyles,className:m,"data-placement":f.placement,onKeyDown:c},s,p&&v.createElement(lb,{ref:f.arrowRef,context:f.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}e.popperContainer&&(y=v.createElement(e.popperContainer,{},y)),l&&!o&&(y=v.createElement(Pd,{portalId:l,portalHost:d},y));var h=$t("react-datepicker-wrapper",r);return v.createElement(v.Fragment,null,v.createElement("div",{ref:f.refs.setReference,className:h},i),y)},l2=a2(c2);function u2(e,t){return e&&t?_.getMonth(e)!==_.getMonth(t)||_.getYear(e)!==_.getYear(t):e!==t}var Xa="Date input not valid.",d2=(function(e){zt(t,e);function t(r){var n=e.call(this,r)||this;return n.calendar=null,n.input=null,n.getPreSelection=function(){return n.props.openToDate?n.props.openToDate:n.props.selectsEnd&&n.props.startDate?n.props.startDate:n.props.selectsStart&&n.props.endDate?n.props.endDate:Je()},n.modifyHolidays=function(){var o;return(o=n.props.holidays)===null||o===void 0?void 0:o.reduce(function(s,i){var a=new Date(i.date);return ti(a)?Or(Or([],s,!0),[Le(Le({},i),{date:a})],!1):s},[])},n.calcInitialState=function(){var o,s=n.getPreSelection(),i=wd(n.props),a=Sd(n.props),c=i&&_.isBefore(s,ri(i))?i:a&&_.isAfter(s,fd(a))?a:s;return{open:n.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:(o=n.props.selectsRange?n.props.startDate:n.props.selected)!==null&&o!==void 0?o:c,highlightDates:Cd(n.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},n.getInputValue=function(){var o,s=n.props,i=s.locale,a=s.startDate,c=s.endDate,l=s.rangeSeparator,d=s.selected,f=s.selectedDates,p=s.selectsMultiple,y=s.selectsRange,m=s.value,h=(o=n.props.dateFormat)!==null&&o!==void 0?o:t.defaultProps.dateFormat,b=n.state.inputValue;return typeof m=="string"?m:typeof b=="string"?b:y?bb(a,c,{dateFormat:h,locale:i,rangeSeparator:l}):p?_b(f??[],{dateFormat:h,locale:i}):pr(d,{dateFormat:h,locale:i})},n.resetHiddenStatus=function(){n.setState(Le(Le({},n.state),{wasHidden:!1}))},n.setHiddenStatus=function(){n.setState(Le(Le({},n.state),{wasHidden:!0}))},n.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&n.setHiddenStatus()},n.clearPreventFocusTimeout=function(){n.preventFocusTimeout&&clearTimeout(n.preventFocusTimeout)},n.setFocus=function(){var o,s;(s=(o=n.input)===null||o===void 0?void 0:o.focus)===null||s===void 0||s.call(o,{preventScroll:!0})},n.setBlur=function(){var o,s;(s=(o=n.input)===null||o===void 0?void 0:o.blur)===null||s===void 0||s.call(o),n.cancelFocusInput()},n.deferBlur=function(){requestAnimationFrame(function(){n.setBlur()})},n.setOpen=function(o,s){s===void 0&&(s=!1),n.setState({open:o,preSelection:o&&n.state.open?n.state.preSelection:n.calcInitialState().preSelection,lastPreSelectChange:Ja},function(){o||n.setState(function(i){return{focused:s?i.focused:!1}},function(){!s&&n.deferBlur(),n.setState({inputValue:null})})})},n.inputOk=function(){return _.isDate(n.state.preSelection)},n.isCalendarOpen=function(){return n.props.open===void 0?n.state.open&&!n.props.disabled&&!n.props.readOnly:n.props.open},n.handleFocus=function(o){var s,i,a=n.state.wasHidden,c=a?n.state.open:!0;a&&n.resetHiddenStatus(),n.state.preventFocus||((i=(s=n.props).onFocus)===null||i===void 0||i.call(s,o),c&&!n.props.preventOpenOnFocus&&!n.props.readOnly&&n.setOpen(!0)),n.setState({focused:!0})},n.sendFocusBackToInput=function(){n.preventFocusTimeout&&n.clearPreventFocusTimeout(),n.setState({preventFocus:!0},function(){n.preventFocusTimeout=setTimeout(function(){n.setFocus(),n.setState({preventFocus:!1})})})},n.cancelFocusInput=function(){clearTimeout(n.inputFocusTimeout),n.inputFocusTimeout=void 0},n.deferFocusInput=function(){n.cancelFocusInput(),n.inputFocusTimeout=setTimeout(function(){return n.setFocus()},1)},n.handleDropdownFocus=function(){n.cancelFocusInput()},n.resetInputValue=function(){n.setState(Le(Le({},n.state),{inputValue:null}))},n.handleBlur=function(o){var s,i;(!n.state.open||n.props.withPortal||n.props.showTimeInput)&&((i=(s=n.props).onBlur)===null||i===void 0||i.call(s,o)),n.resetInputValue(),n.state.open&&n.props.open===!1&&n.setOpen(!1),n.setState({focused:!1})},n.handleCalendarClickOutside=function(o){var s,i;n.props.inline||n.setOpen(!1),(i=(s=n.props).onClickOutside)===null||i===void 0||i.call(s,o),n.props.withPortal&&o.preventDefault()},n.handleChange=function(){for(var o,s,i,a,c,l=[],d=0;d<arguments.length;d++)l[d]=arguments[d];var f=l[0];if(!(n.props.onChangeRaw&&(n.props.onChangeRaw.apply(n,l),!f||typeof f.isDefaultPrevented!="function"||f.isDefaultPrevented()))){n.setState({inputValue:f?.target instanceof HTMLInputElement?f.target.value:null,lastPreSelectChange:f2});var p=n.props,y=p.selectsRange,m=p.startDate,h=p.endDate,b=(o=n.props.dateFormat)!==null&&o!==void 0?o:t.defaultProps.dateFormat,S=(s=n.props.strictParsing)!==null&&s!==void 0?s:t.defaultProps.strictParsing,C=f?.target instanceof HTMLInputElement?f.target.value:"";if(y){var D=n.props.rangeSeparator,k=D.trim(),w=C.split(b.includes(k)?D:k,2).map(function(F){return F.trim()}),B=w[0],E=w[1],I=Ha(B??"",b,n.props.locale,S),P=I?Ha(E??"",b,n.props.locale,S):null,A=m?.getTime()!==I?.getTime(),W=h?.getTime()!==P?.getTime();if(!A&&!W||I&&hr(I,n.props)||P&&hr(P,n.props))return;(a=(i=n.props).onChange)===null||a===void 0||a.call(i,[I,P],f)}else{var q=Ha(C,b,n.props.locale,S,(c=n.props.selected)!==null&&c!==void 0?c:void 0);(q||!C)&&n.setSelected(q,f,!0)}}},n.handleSelect=function(o,s,i){if(!n.props.readOnly){var a=n.props,c=a.selectsRange,l=a.startDate,d=a.endDate,f=a.swapRange,p=!c||l&&!d&&(f||!Ka(o,l));n.props.shouldCloseOnSelect&&!n.props.showTimeSelect&&p&&n.sendFocusBackToInput(),n.props.onChangeRaw&&n.props.onChangeRaw(s),n.setSelected(o,s,!1,i),n.props.showDateSelect&&n.setState({isRenderAriaLiveMessage:!0}),!n.props.shouldCloseOnSelect||n.props.showTimeSelect?n.setPreSelection(o):p&&n.setOpen(!1)}},n.setSelected=function(o,s,i,a){var c,l,d=o;if(n.props.showYearPicker){if(d!==null&&ai(_.getYear(d),n.props))return}else if(n.props.showMonthYearPicker){if(d!==null&&hd(d,n.props))return}else if(d!==null&&hr(d,n.props))return;var f=n.props,p=f.onChange,y=f.selectsRange,m=f.startDate,h=f.endDate,b=f.selectsMultiple,S=f.selectedDates,C=f.minTime,D=f.swapRange;if(!fn(n.props.selected,d)||n.props.allowSameDay||y||b)if(d!==null&&(n.props.selected&&(!i||!n.props.showTimeSelect&&!n.props.showTimeSelectOnly&&!n.props.showTimeInput)&&(d=Ya(d,{hour:_.getHours(n.props.selected),minute:_.getMinutes(n.props.selected),second:_.getSeconds(n.props.selected)})),!i&&(n.props.showTimeSelect||n.props.showTimeSelectOnly)&&C&&(d=Ya(d,{hour:C.getHours(),minute:C.getMinutes(),second:C.getSeconds()})),n.props.inline||n.setState({preSelection:d}),n.props.focusSelectedMonth||n.setState({monthSelectedIn:a})),y){var k=!m&&!h,w=m&&!h,B=!m&&!!h,E=m&&h;k?p?.([d,null],s):w?d===null?p?.([null,null],s):Ka(d,m)?p?.(D?[d,m]:[d,null],s):p?.([m,d],s):B&&(d&&Ka(d,h)?p?.([d,h],s):p?.([d,null],s)),E&&p?.([d,null],s)}else if(b){if(d!==null)if(!S?.length)p?.([d],s);else{var I=S.some(function(A){return ze(A,d)});if(I){var P=S.filter(function(A){return!ze(A,d)});p?.(P,s)}else p?.(Or(Or([],S,!0),[d],!1),s)}}else p?.(d,s);i||((l=(c=n.props).onSelect)===null||l===void 0||l.call(c,d,s),n.setState({inputValue:null}))},n.setPreSelection=function(o){if(!n.props.readOnly){var s=_.isDate(n.props.minDate),i=_.isDate(n.props.maxDate),a=!0;if(o){var c=ri(o);if(s&&i)a=pn(o,n.props.minDate,n.props.maxDate);else if(s){var l=ri(n.props.minDate);a=_.isAfter(o,l)||fn(c,l)}else if(i){var d=fd(n.props.maxDate);a=_.isBefore(o,d)||fn(c,d)}}a&&n.setState({preSelection:o})}},n.toggleCalendar=function(){n.setOpen(!n.state.open)},n.handleTimeChange=function(o){var s,i;if(!(n.props.selectsRange||n.props.selectsMultiple)){var a=n.props.selected?n.props.selected:n.getPreSelection(),c=n.props.selected?o:Ya(a,{hour:_.getHours(o),minute:_.getMinutes(o)});n.setState({preSelection:c}),(i=(s=n.props).onChange)===null||i===void 0||i.call(s,c),n.props.shouldCloseOnSelect&&!n.props.showTimeInput&&(n.sendFocusBackToInput(),n.setOpen(!1)),n.props.showTimeInput&&n.setOpen(!0),(n.props.showTimeSelectOnly||n.props.showTimeSelect)&&n.setState({isRenderAriaLiveMessage:!0}),n.setState({inputValue:null})}},n.onInputClick=function(){var o,s;!n.props.disabled&&!n.props.readOnly&&n.setOpen(!0),(s=(o=n.props).onInputClick)===null||s===void 0||s.call(o)},n.onInputKeyDown=function(o){var s,i,a,c,l,d;(i=(s=n.props).onKeyDown)===null||i===void 0||i.call(s,o);var f=o.key;if(!n.state.open&&!n.props.inline&&!n.props.preventOpenOnFocus){(f===ve.ArrowDown||f===ve.ArrowUp||f===ve.Enter)&&((a=n.onInputClick)===null||a===void 0||a.call(n));return}if(n.state.open){if(f===ve.ArrowDown||f===ve.ArrowUp){o.preventDefault();var p=n.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":n.props.showWeekPicker&&n.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':n.props.showFullMonthYearPicker||n.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',y=((c=n.calendar)===null||c===void 0?void 0:c.containerRef.current)instanceof Element&&n.calendar.containerRef.current.querySelector(p);y instanceof HTMLElement&&y.focus({preventScroll:!0});return}var m=Je(n.state.preSelection);f===ve.Enter?(o.preventDefault(),o.target.blur(),n.inputOk()&&n.state.lastPreSelectChange===Ja?(n.handleSelect(m,o),!n.props.shouldCloseOnSelect&&n.setPreSelection(m)):n.setOpen(!1)):f===ve.Escape?(o.preventDefault(),o.target.blur(),n.sendFocusBackToInput(),n.setOpen(!1)):f===ve.Tab&&n.setOpen(!1),n.inputOk()||(d=(l=n.props).onInputError)===null||d===void 0||d.call(l,{code:1,msg:Xa})}},n.onPortalKeyDown=function(o){var s=o.key;s===ve.Escape&&(o.preventDefault(),n.setState({preventFocus:!0},function(){n.setOpen(!1),setTimeout(function(){n.setFocus(),n.setState({preventFocus:!1})})}))},n.onDayKeyDown=function(o){var s,i,a,c,l,d,f=n.props,p=f.minDate,y=f.maxDate,m=f.disabledKeyboardNavigation,h=f.showWeekPicker,b=f.shouldCloseOnSelect,S=f.locale,C=f.calendarStartDay,D=f.adjustDateOnChange,k=f.inline;if((i=(s=n.props).onKeyDown)===null||i===void 0||i.call(s,o),!m){var w=o.key,B=o.shiftKey,E=Je(n.state.preSelection),I=function(le,V){var ee=V;switch(le){case ve.ArrowRight:ee=h?_.addWeeks(V,1):_.addDays(V,1);break;case ve.ArrowLeft:ee=h?_.subWeeks(V,1):_.subDays(V,1);break;case ve.ArrowUp:ee=_.subWeeks(V,1);break;case ve.ArrowDown:ee=_.addWeeks(V,1);break;case ve.PageUp:ee=B?_.subYears(V,1):_.subMonths(V,1);break;case ve.PageDown:ee=B?_.addYears(V,1):_.addMonths(V,1);break;case ve.Home:ee=Xr(V,S,C);break;case ve.End:ee=Sb(V);break}return ee},P=function(le,V){for(var ee=40,ue=le,ye=!1,L=0,te=I(le,V);!ye;){if(L>=ee){te=V;break}p&&te<p&&(ue=ve.ArrowRight,te=hr(p,n.props)?I(ue,te):p),y&&te>y&&(ue=ve.ArrowLeft,te=hr(y,n.props)?I(ue,te):y),hr(te,n.props)?((ue===ve.PageUp||ue===ve.Home)&&(ue=ve.ArrowRight),(ue===ve.PageDown||ue===ve.End)&&(ue=ve.ArrowLeft),te=I(ue,te)):ye=!0,L++}return te};if(w===ve.Enter){o.preventDefault(),n.handleSelect(E,o),!b&&n.setPreSelection(E);return}else if(w===ve.Escape){o.preventDefault(),n.setOpen(!1),n.inputOk()||(c=(a=n.props).onInputError)===null||c===void 0||c.call(a,{code:1,msg:Xa});return}var A=null;switch(w){case ve.ArrowLeft:case ve.ArrowRight:case ve.ArrowUp:case ve.ArrowDown:case ve.PageUp:case ve.PageDown:case ve.Home:case ve.End:A=P(w,E);break}if(!A){(d=(l=n.props).onInputError)===null||d===void 0||d.call(l,{code:1,msg:Xa});return}if(o.preventDefault(),n.setState({lastPreSelectChange:Ja}),D&&n.setSelected(A),n.setPreSelection(A),k){var W=_.getMonth(E),q=_.getMonth(A),F=_.getYear(E),Z=_.getYear(A);W!==q||F!==Z?n.setState({shouldFocusDayInline:!0}):n.setState({shouldFocusDayInline:!1})}}},n.onPopperKeyDown=function(o){var s=o.key;s===ve.Escape&&(o.preventDefault(),n.sendFocusBackToInput(),n.setOpen(!1))},n.onClearClick=function(o){o&&o.preventDefault&&o.preventDefault(),n.sendFocusBackToInput();var s=n.props,i=s.selectsRange,a=s.onChange;a?.(i?[null,null]:null,o),n.setState({inputValue:null})},n.clear=function(){n.onClearClick()},n.onScroll=function(o){typeof n.props.closeOnScroll=="boolean"&&n.props.closeOnScroll?(o.target===document||o.target===document.documentElement||o.target===document.body)&&n.setOpen(!1):typeof n.props.closeOnScroll=="function"&&n.props.closeOnScroll(o)&&n.setOpen(!1)},n.renderCalendar=function(){var o,s;return!n.props.inline&&!n.isCalendarOpen()?null:v.createElement(n2,Le({showMonthYearDropdown:void 0,ref:function(i){n.calendar=i}},n.props,n.state,{setOpen:n.setOpen,dateFormat:(o=n.props.dateFormatCalendar)!==null&&o!==void 0?o:t.defaultProps.dateFormatCalendar,onSelect:n.handleSelect,onClickOutside:n.handleCalendarClickOutside,holidays:Rb(n.modifyHolidays()),outsideClickIgnoreClass:n.props.outsideClickIgnoreClass,onDropdownFocus:n.handleDropdownFocus,onTimeChange:n.handleTimeChange,className:n.props.calendarClassName,container:n.props.calendarContainer,handleOnKeyDown:n.props.onKeyDown,handleOnDayKeyDown:n.onDayKeyDown,setPreSelection:n.setPreSelection,dropdownMode:(s=n.props.dropdownMode)!==null&&s!==void 0?s:t.defaultProps.dropdownMode}),n.props.children)},n.renderAriaLiveRegion=function(){var o,s=n.props.locale,i=(o=n.props.dateFormat)!==null&&o!==void 0?o:t.defaultProps.dateFormat,a=n.props.showTimeInput||n.props.showTimeSelect,c=a?"PPPPp":"PPPP",l;return n.props.selectsRange?l="Selected start date: ".concat(pr(n.props.startDate,{dateFormat:c,locale:s}),". ").concat(n.props.endDate?"End date: "+pr(n.props.endDate,{dateFormat:c,locale:s}):""):n.props.showTimeSelectOnly?l="Selected time: ".concat(pr(n.props.selected,{dateFormat:i,locale:s})):n.props.showYearPicker?l="Selected year: ".concat(pr(n.props.selected,{dateFormat:"yyyy",locale:s})):n.props.showMonthYearPicker?l="Selected month: ".concat(pr(n.props.selected,{dateFormat:"MMMM yyyy",locale:s})):n.props.showQuarterYearPicker?l="Selected quarter: ".concat(pr(n.props.selected,{dateFormat:"yyyy, QQQ",locale:s})):l="Selected date: ".concat(pr(n.props.selected,{dateFormat:c,locale:s})),v.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},l)},n.renderDateInput=function(){var o,s,i=$t(n.props.className,(o={},o[n.props.outsideClickIgnoreClass||t.defaultProps.outsideClickIgnoreClass]=n.state.open,o)),a=n.props.customInput||v.createElement("input",{type:"text"}),c=n.props.customInputRef||"ref";return v.cloneElement(a,(s={},s[c]=function(l){n.input=l},s.value=n.getInputValue(),s.onBlur=n.handleBlur,s.onChange=n.handleChange,s.onClick=n.onInputClick,s.onFocus=n.handleFocus,s.onKeyDown=n.onInputKeyDown,s.id=n.props.id,s.name=n.props.name,s.form=n.props.form,s.autoFocus=n.props.autoFocus,s.placeholder=n.props.placeholderText,s.disabled=n.props.disabled,s.autoComplete=n.props.autoComplete,s.className=$t(a.props.className,i),s.title=n.props.title,s.readOnly=n.props.readOnly,s.required=n.props.required,s.tabIndex=n.props.tabIndex,s["aria-describedby"]=n.props.ariaDescribedBy,s["aria-invalid"]=n.props.ariaInvalid,s["aria-labelledby"]=n.props.ariaLabelledBy,s["aria-required"]=n.props.ariaRequired,s))},n.renderClearButton=function(){var o=n.props,s=o.isClearable,i=o.disabled,a=o.selected,c=o.startDate,l=o.endDate,d=o.clearButtonTitle,f=o.clearButtonClassName,p=f===void 0?"":f,y=o.ariaLabelClose,m=y===void 0?"Close":y,h=o.selectedDates,b=o.readOnly;return s&&!b&&(a!=null||c!=null||l!=null||h?.length)?v.createElement("button",{type:"button",className:$t("react-datepicker__close-icon",p,{"react-datepicker__close-icon--disabled":i}),disabled:i,"aria-label":m,onClick:n.onClearClick,title:d,tabIndex:-1}):null},n.state=n.calcInitialState(),n.preventFocusTimeout=void 0,n}return Object.defineProperty(t,"defaultProps",{get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",preventOpenOnFocus:!1,monthsShown:1,outsideClickIgnoreClass:Md,readOnly:!1,rangeSeparator:ld,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,showWeekPicker:!1,strictParsing:!1,swapRange:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:bo,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1,usePointerEvent:!1}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){window.addEventListener("scroll",this.onScroll,!0),document.addEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},t.prototype.componentDidUpdate=function(r,n){var o,s,i,a;r.inline&&u2(r.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&r.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),r.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:Cd(this.props.highlightDates)}),!n.focused&&!fn(r.selected,this.props.selected)&&this.setState({inputValue:null}),n.open!==this.state.open&&(n.open===!1&&this.state.open===!0&&((s=(o=this.props).onCalendarOpen)===null||s===void 0||s.call(o)),n.open===!0&&this.state.open===!1&&((a=(i=this.props).onCalendarClose)===null||a===void 0||a.call(i)))},t.prototype.componentWillUnmount=function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0),document.removeEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},t.prototype.renderInputContainer=function(){var r=this.props,n=r.showIcon,o=r.icon,s=r.calendarIconClassname,i=r.calendarIconClassName,a=r.toggleCalendarOnIconClick,c=this.state.open;return s&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),v.createElement("div",{className:"react-datepicker__input-container".concat(n?" react-datepicker__view-calendar-icon":"")},n&&v.createElement(o2,Le({icon:o,className:$t(i,!i&&s,c&&"react-datepicker-ignore-onclickoutside")},a?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())},t.prototype.render=function(){var r=this.renderCalendar();if(this.props.inline)return r;if(this.props.withPortal){var n=this.state.open?v.createElement(Od,{enableTabLoop:this.props.enableTabLoop},v.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},r)):null;return this.state.open&&this.props.portalId&&(n=v.createElement(Pd,Le({portalId:this.props.portalId},this.props),n)),v.createElement("div",null,this.renderInputContainer(),n)}return v.createElement(l2,Le({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:r,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},t})(v.Component),f2="input",Ja="navigate";const p2="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23333'%20d='M2.999%208.611a1.1%201.1%200%200%201%20.33-.786%201.135%201.135%200%200%201%201.591%200l7.079%206.993%207.079-6.993a1.135%201.135%200%200%201%201.837.36%201.1%201.1%200%200%201-.246%201.215l-7.87%207.775a1.135%201.135%200%200%201-1.591%200L3.328%209.4a1.1%201.1%200%200%201-.329-.789'/%3e%3c/svg%3e",h2="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23333'%20d='M15.39%2021a1.1%201.1%200%200%200%20.785-.33%201.135%201.135%200%200%200%200-1.591L9.182%2012l6.993-7.08a1.135%201.135%200%200%200-.36-1.835%201.1%201.1%200%200%200-1.21.244L6.824%2011.2a1.135%201.135%200%200%200%200%201.591L14.6%2020.67a1.1%201.1%200%200%200%20.79.33'/%3e%3c/svg%3e",m2="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23333'%20d='M8.61%203a1.1%201.1%200%200%200-.785.33%201.135%201.135%200%200%200%200%201.591L14.818%2012l-6.993%207.08a1.135%201.135%200%200%200%20.36%201.835%201.1%201.1%200%200%200%201.21-.244l7.78-7.871a1.135%201.135%200%200%200%200-1.591L9.4%203.33A1.1%201.1%200%200%200%208.61%203'/%3e%3c/svg%3e",jd="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cg%20fill='%23fff'%20clip-path='url(%23a)'%3e%3cpath%20d='M13.085%207.331a1.096%201.096%200%201%200-2.192%200v9.316a1.096%201.096%200%200%200%202.192%200z'/%3e%3cpath%20d='M16.647%2010.893H7.33a1.096%201.096%200%201%200%200%202.192h9.316a1.096%201.096%200%200%200%200-2.192'/%3e%3cpath%20d='M12%2024C5.38%2024%200%2018.608%200%2012S5.38%200%2012%200s12%205.38%2012%2012-5.38%2012-12%2012m0-21.808c-5.414%200-9.808%204.394-9.808%209.808S6.586%2021.808%2012%2021.808s9.808-4.394%209.808-9.808S17.403%202.192%2012%202.192'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='%23fff'%20d='M0%200h24v24H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",g2=v.forwardRef(({value:e,onClick:t},r)=>u.jsxs("button",{className:cn.datePickerButton,onClick:t,ref:r,children:[e,u.jsx("img",{src:p2,style:{marginLeft:10}})]})),v2=({currentDate:e,onPrevMonth:t,onNextMonth:r,onAddEvent:n,onDateChange:o})=>u.jsxs("div",{className:cn.headerContainer,children:[u.jsxs("div",{className:cn.navAndDate,children:[u.jsx("button",{className:cn.navButton,onClick:t,children:u.jsx("img",{src:h2,width:15})}),u.jsx("button",{className:cn.navButton,onClick:r,children:u.jsx("img",{src:m2,width:15})}),u.jsx(d2,{selected:e,onChange:s=>o(s),dateFormat:"MMMM yyyy",showMonthYearPicker:!0,className:cn.datePickerInput,locale:"es",customInput:u.jsx(g2,{})})]}),u.jsxs("button",{className:cn.addEventButton,onClick:n,children:[u.jsx("img",{src:jd}),"Agregar evento"]})]}),be={sidebarContainer:"_sidebarContainer_1sd0f_1",leadsSection:"_leadsSection_1sd0f_17",leadCard:"_leadCard_1sd0f_33",leadIcon:"_leadIcon_1sd0f_71",leadDays:"_leadDays_1sd0f_81",leadCount:"_leadCount_1sd0f_91",eventsSection:"_eventsSection_1sd0f_103",eventGroup:"_eventGroup_1sd0f_141",eventGroupDate:"_eventGroupDate_1sd0f_149",eventItem:"_eventItem_1sd0f_161",eventDetails:"_eventDetails_1sd0f_193",eventTitle:"_eventTitle_1sd0f_207",eventTime:"_eventTime_1sd0f_229",calendarsSection:"_calendarsSection_1sd0f_251",collapsibleHeader:"_collapsibleHeader_1sd0f_267",headerTitle:"_headerTitle_1sd0f_295",calendarCount:"_calendarCount_1sd0f_309",chevronIcon:"_chevronIcon_1sd0f_327",collapsed:"_collapsed_1sd0f_335",collapsibleContent:"_collapsibleContent_1sd0f_343",hidden:"_hidden_1sd0f_359",circularCheckbox:"_circularCheckbox_1sd0f_377",checkedIcon:"_checkedIcon_1sd0f_395",calendarIcon:"_calendarIcon_1sd0f_411",syncButton:"_syncButton_1sd0f_427",eventsContainer:"_eventsContainer_1sd0f_479",calendarsList:"_calendarsList_1sd0f_553",calendarItemText:"_calendarItemText_1sd0f_611",tabsContainer:"_tabsContainer_1sd0f_637",tabButton:"_tabButton_1sd0f_655",activeTab:"_activeTab_1sd0f_693",alertBadge:"_alertBadge_1sd0f_707",emptyStateContainer:"_emptyStateContainer_1sd0f_735",emptyStateImage:"_emptyStateImage_1sd0f_753",emptyStateTitle:"_emptyStateTitle_1sd0f_765",emptyStateText:"_emptyStateText_1sd0f_779",addEventButton:"_addEventButton_1sd0f_791",customCheckIcon:"_customCheckIcon_1sd0f_845",uncheckedCircle:"_uncheckedCircle_1sd0f_861",calendarSelectButton:"_calendarSelectButton_1sd0f_875",calendarSelected:"_calendarSelected_1sd0f_927",currentUserCalendarTitle:"_currentUserCalendarTitle_1sd0f_947"};/**
115
+ */var Ya=function(t,r){return Ya=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},Ya(t,r)};function Bt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ya(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Be=function(){return Be=Object.assign||function(r){for(var n,o=1,s=arguments.length;o<s;o++){n=arguments[o];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])}return r},Be.apply(this,arguments)};function jr(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var bb=function(e){var t=e.showTimeSelectOnly,r=t===void 0?!1:t,n=e.showTime,o=n===void 0?!1:n,s=e.className,i=e.children,a=r?"Choose Time":"Choose Date".concat(o?" and Time":"");return y.createElement("div",{className:s,role:"dialog","aria-label":a,"aria-modal":"true"},i)},_b=function(e,t){var r=y.useRef(null),n=y.useRef(e);n.current=e;var o=y.useCallback(function(s){var i,a=s.composed&&s.composedPath&&s.composedPath().find(function(c){return c instanceof Node})||s.target;r.current&&!r.current.contains(a)&&(t&&a instanceof HTMLElement&&a.classList.contains(t)||(i=n.current)===null||i===void 0||i.call(n,s))},[t]);return y.useEffect(function(){return document.addEventListener("mousedown",o),function(){document.removeEventListener("mousedown",o)}},[o]),r},ti=function(e){var t=e.children,r=e.onClickOutside,n=e.className,o=e.containerRef,s=e.style,i=e.ignoreClass,a=_b(r,i);return y.createElement("div",{className:n,style:s,ref:function(c){a.current=c,o&&(o.current=c)}},t)},ye;(function(e){e.ArrowUp="ArrowUp",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.PageUp="PageUp",e.PageDown="PageDown",e.Home="Home",e.End="End",e.Enter="Enter",e.Space=" ",e.Tab="Tab",e.Escape="Escape",e.Backspace="Backspace",e.X="x"})(ye||(ye={}));function ld(){var e=typeof window<"u"?window:globalThis;return e}var _o=12;function et(e){if(e==null)return new Date;var t=typeof e=="string"?_.parseISO(e):_.toDate(e);return ri(t)?t:new Date}function qa(e,t,r,n,o){o===void 0&&(o=et());for(var s=zn(r)||zn(Ga()),i=Array.isArray(t)?t:[t],a=0,c=i;a<c.length;a++){var l=c[a],d=_.parse(e,l,o,{locale:s,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});if(ri(d)&&(!n||e===ht(d,l,r)))return d}return null}function ri(e,t){return _.isValid(e)&&!_.isBefore(e,new Date("1/1/1800"))}function ht(e,t,r){if(r==="en")return _.format(e,t,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var n=r?zn(r):void 0;return r&&!n&&console.warn('A locale object was not found for the provided string ["'.concat(r,'"].')),n=n||zn(Ga()),_.format(e,t,{locale:n,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function pr(e,t){var r=t.dateFormat,n=t.locale,o=Array.isArray(r)&&r.length>0?r[0]:r;return e&&ht(e,o,n)||""}var ud=" - ";function xb(e,t,r){if(!e&&!t)return"";var n=e?pr(e,r):"",o=t?pr(t,r):"",s=r.rangeSeparator||ud;return"".concat(n).concat(s).concat(o)}function wb(e,t){if(!e?.length)return"";var r=e[0]?pr(e[0],t):"";if(e.length===1)return r;if(e.length===2&&e[1]){var n=pr(e[1],t);return"".concat(r,", ").concat(n)}var o=e.length-1;return"".concat(r," (+").concat(o,")")}function Za(e,t){var r=t.hour,n=r===void 0?0:r,o=t.minute,s=o===void 0?0:o,i=t.second,a=i===void 0?0:i;return _.setHours(_.setMinutes(_.setSeconds(e,a),s),n)}function Sb(e){return _.getISOWeek(e)}function Cb(e,t){return ht(e,"ddd",t)}function ni(e){return _.startOfDay(e)}function Xr(e,t,r){var n=zn(t||Ga());return _.startOfWeek(e,{locale:n,weekStartsOn:r})}function Br(e){return _.startOfMonth(e)}function xo(e){return _.startOfYear(e)}function dd(e){return _.startOfQuarter(e)}function fd(){return _.startOfDay(et())}function pd(e){return _.endOfDay(e)}function Eb(e){return _.endOfWeek(e)}function Db(e){return _.endOfMonth(e)}function Rr(e,t){return e&&t?_.isSameYear(e,t):!e&&!t}function qt(e,t){return e&&t?_.isSameMonth(e,t):!e&&!t}function oi(e,t){return e&&t?_.isSameQuarter(e,t):!e&&!t}function Fe(e,t){return e&&t?_.isSameDay(e,t):!e&&!t}function pn(e,t){return e&&t?_.isEqual(e,t):!e&&!t}function hn(e,t,r){var n,o=_.startOfDay(t),s=_.endOfDay(r);try{n=_.isWithinInterval(e,{start:o,end:s})}catch{n=!1}return n}function Ga(){var e=ld();return e.__localeId__}function zn(e){if(typeof e=="string"){var t=ld();return t.__localeData__?t.__localeData__[e]:void 0}else return e}function kb(e,t,r){return t(ht(e,"EEEE",r))}function Tb(e,t){return ht(e,"EEEEEE",t)}function Ib(e,t){return ht(e,"EEE",t)}function Ka(e,t){return ht(_.setMonth(et(),e),"LLLL",t)}function hd(e,t){return ht(_.setMonth(et(),e),"LLL",t)}function Ab(e,t){return ht(_.setQuarter(et(),e),"QQQ",t)}function hr(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.excludeDateIntervals,a=r.includeDates,c=r.includeDateIntervals,l=r.filterDate;return wo(e,{minDate:n,maxDate:o})||s&&s.some(function(d){return d instanceof Date?Fe(e,d):Fe(e,d.date)})||i&&i.some(function(d){var f=d.start,p=d.end;return _.isWithinInterval(e,{start:f,end:p})})||a&&!a.some(function(d){return Fe(e,d)})||c&&!c.some(function(d){var f=d.start,p=d.end;return _.isWithinInterval(e,{start:f,end:p})})||l&&!l(et(e))||!1}function Qa(e,t){var r=t===void 0?{}:t,n=r.excludeDates,o=r.excludeDateIntervals;return o&&o.length>0?o.some(function(s){var i=s.start,a=s.end;return _.isWithinInterval(e,{start:i,end:a})}):n&&n.some(function(s){var i;return s instanceof Date?Fe(e,s):Fe(e,(i=s.date)!==null&&i!==void 0?i:new Date)})||!1}function md(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.includeDates,a=r.filterDate;return wo(e,{minDate:n?_.startOfMonth(n):void 0,maxDate:o?_.endOfMonth(o):void 0})||s?.some(function(c){return qt(e,c instanceof Date?c:c.date)})||i&&!i.some(function(c){return qt(e,c)})||a&&!a(et(e))||!1}function si(e,t,r,n){var o=_.getYear(e),s=_.getMonth(e),i=_.getYear(t),a=_.getMonth(t),c=_.getYear(n);return o===i&&o===c?s<=r&&r<=a:o<i?c===o&&s<=r||c===i&&a>=r||c<i&&c>o:!1}function Mb(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.includeDates;return wo(e,{minDate:n,maxDate:o})||s&&s.some(function(a){return qt(a instanceof Date?a:a.date,e)})||i&&!i.some(function(a){return qt(a,e)})||!1}function ii(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.includeDates,a=r.filterDate;return wo(e,{minDate:n,maxDate:o})||s?.some(function(c){return oi(e,c instanceof Date?c:c.date)})||i&&!i.some(function(c){return oi(e,c)})||a&&!a(et(e))||!1}function ai(e,t,r){if(!t||!r||!_.isValid(t)||!_.isValid(r))return!1;var n=_.getYear(t),o=_.getYear(r);return n<=e&&o>=e}function ci(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.includeDates,a=r.filterDate,c=new Date(e,0,1);return wo(c,{minDate:n?_.startOfYear(n):void 0,maxDate:o?_.endOfYear(o):void 0})||s?.some(function(l){return Rr(c,l instanceof Date?l:l.date)})||i&&!i.some(function(l){return Rr(c,l)})||a&&!a(et(c))||!1}function li(e,t,r,n){var o=_.getYear(e),s=_.getQuarter(e),i=_.getYear(t),a=_.getQuarter(t),c=_.getYear(n);return o===i&&o===c?s<=r&&r<=a:o<i?c===o&&s<=r||c===i&&a>=r||c<i&&c>o:!1}function wo(e,t){var r,n=t===void 0?{}:t,o=n.minDate,s=n.maxDate;return(r=o&&_.differenceInCalendarDays(e,o)<0||s&&_.differenceInCalendarDays(e,s)>0)!==null&&r!==void 0?r:!1}function gd(e,t){return t.some(function(r){return _.getHours(r)===_.getHours(e)&&_.getMinutes(r)===_.getMinutes(e)&&_.getSeconds(r)===_.getSeconds(e)})}function vd(e,t){var r=t===void 0?{}:t,n=r.excludeTimes,o=r.includeTimes,s=r.filterTime;return n&&gd(e,n)||o&&!gd(e,o)||s&&!s(e)||!1}function yd(e,t){var r=t.minTime,n=t.maxTime;if(!r||!n)throw new Error("Both minTime and maxTime props required");var o=et();o=_.setHours(o,_.getHours(e)),o=_.setMinutes(o,_.getMinutes(e)),o=_.setSeconds(o,_.getSeconds(e));var s=et();s=_.setHours(s,_.getHours(r)),s=_.setMinutes(s,_.getMinutes(r)),s=_.setSeconds(s,_.getSeconds(r));var i=et();i=_.setHours(i,_.getHours(n)),i=_.setMinutes(i,_.getMinutes(n)),i=_.setSeconds(i,_.getSeconds(n));var a;try{a=!_.isWithinInterval(o,{start:s,end:i})}catch{a=!1}return a}function bd(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.includeDates,s=_.subMonths(e,1);return n&&_.differenceInCalendarMonths(n,s)>0||o&&o.every(function(i){return _.differenceInCalendarMonths(i,s)>0})||!1}function _d(e,t){var r=t===void 0?{}:t,n=r.maxDate,o=r.includeDates,s=_.addMonths(e,1);return n&&_.differenceInCalendarMonths(s,n)>0||o&&o.every(function(i){return _.differenceInCalendarMonths(s,i)>0})||!1}function Pb(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.includeDates,s=_.startOfYear(e),i=_.subQuarters(s,1);return n&&_.differenceInCalendarQuarters(n,i)>0||o&&o.every(function(a){return _.differenceInCalendarQuarters(a,i)>0})||!1}function Ob(e,t){var r=t===void 0?{}:t,n=r.maxDate,o=r.includeDates,s=_.endOfYear(e),i=_.addQuarters(s,1);return n&&_.differenceInCalendarQuarters(i,n)>0||o&&o.every(function(a){return _.differenceInCalendarQuarters(i,a)>0})||!1}function xd(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.includeDates,s=_.subYears(e,1);return n&&_.differenceInCalendarYears(n,s)>0||o&&o.every(function(i){return _.differenceInCalendarYears(i,s)>0})||!1}function jb(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.yearItemNumber,s=o===void 0?_o:o,i=xo(_.subYears(e,s)),a=Fr(i,s).endPeriod,c=n&&_.getYear(n);return c&&c>a||!1}function wd(e,t){var r=t===void 0?{}:t,n=r.maxDate,o=r.includeDates,s=_.addYears(e,1);return n&&_.differenceInCalendarYears(s,n)>0||o&&o.every(function(i){return _.differenceInCalendarYears(s,i)>0})||!1}function Rb(e,t){var r=t===void 0?{}:t,n=r.maxDate,o=r.yearItemNumber,s=o===void 0?_o:o,i=_.addYears(e,s),a=Fr(i,s).startPeriod,c=n&&_.getYear(n);return c&&c<a||!1}function Sd(e){var t=e.minDate,r=e.includeDates;if(r&&t){var n=r.filter(function(o){return _.differenceInCalendarDays(o,t)>=0});return _.min(n)}else return r?_.min(r):t}function Cd(e){var t=e.maxDate,r=e.includeDates;if(r&&t){var n=r.filter(function(o){return _.differenceInCalendarDays(o,t)<=0});return _.max(n)}else return r?_.max(r):t}function Ed(e,t){var r;e===void 0&&(e=[]),t===void 0&&(t="react-datepicker__day--highlighted");for(var n=new Map,o=0,s=e.length;o<s;o++){var i=e[o];if(_.isDate(i)){var a=ht(i,"MM.dd.yyyy"),c=n.get(a)||[];c.includes(t)||(c.push(t),n.set(a,c))}else if(typeof i=="object"){var l=Object.keys(i),d=(r=l[0])!==null&&r!==void 0?r:"",f=i[d];if(typeof d=="string"&&Array.isArray(f))for(var p=0,m=f.length;p<m;p++){var v=f[p];if(v){var a=ht(v,"MM.dd.yyyy"),c=n.get(a)||[];c.includes(d)||(c.push(d),n.set(a,c))}}}}return n}function Nb(e,t){return e.length!==t.length?!1:e.every(function(r,n){return r===t[n]})}function $b(e,t){e===void 0&&(e=[]),t===void 0&&(t="react-datepicker__day--holidays");var r=new Map;return e.forEach(function(n){var o=n.date,s=n.holidayName;if(_.isDate(o)){var i=ht(o,"MM.dd.yyyy"),a=r.get(i)||{className:"",holidayNames:[]};if(!("className"in a&&a.className===t&&Nb(a.holidayNames,[s]))){a.className=t;var c=a.holidayNames;a.holidayNames=c?jr(jr([],c,!0),[s],!1):[s],r.set(i,a)}}}),r}function Lb(e,t,r,n,o){for(var s=o.length,i=[],a=0;a<s;a++){var c=e,l=o[a];l&&(c=_.addHours(c,_.getHours(l)),c=_.addMinutes(c,_.getMinutes(l)),c=_.addSeconds(c,_.getSeconds(l)));var d=_.addMinutes(e,(r+1)*n);_.isAfter(c,t)&&_.isBefore(c,d)&&l!=null&&i.push(l)}return i}function Dd(e){return e<10?"0".concat(e):"".concat(e)}function Fr(e,t){t===void 0&&(t=_o);var r=Math.ceil(_.getYear(e)/t)*t,n=r-(t-1);return{startPeriod:n,endPeriod:r}}function zb(e){var t=new Date(e.getFullYear(),e.getMonth(),e.getDate()),r=new Date(e.getFullYear(),e.getMonth(),e.getDate(),24);return Math.round((+r-+t)/36e5)}function kd(e){var t=e.getSeconds(),r=e.getMilliseconds();return _.toDate(e.getTime()-t*1e3-r)}function Bb(e,t){return kd(e).getTime()===kd(t).getTime()}function Td(e){if(!_.isDate(e))throw new Error("Invalid date");var t=new Date(e);return t.setHours(0,0,0,0),t}function Xa(e,t){if(!_.isDate(e)||!_.isDate(t))throw new Error("Invalid date received");var r=Td(e),n=Td(t);return _.isBefore(r,n)}function Id(e){return e.key===ye.Space}var Fb=(function(e){Bt(t,e);function t(r){var n=e.call(this,r)||this;return n.inputRef=y.createRef(),n.onTimeChange=function(o){var s,i;n.setState({time:o});var a=n.props.date,c=a instanceof Date&&!isNaN(+a),l=c?a:new Date;if(o?.includes(":")){var d=o.split(":"),f=d[0],p=d[1];l.setHours(Number(f)),l.setMinutes(Number(p))}(i=(s=n.props).onChange)===null||i===void 0||i.call(s,l)},n.renderTimeInput=function(){var o=n.state.time,s=n.props,i=s.date,a=s.timeString,c=s.customTimeInput;return c?y.cloneElement(c,{date:i,value:o,onChange:n.onTimeChange}):y.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:n.inputRef,onClick:function(){var l;(l=n.inputRef.current)===null||l===void 0||l.focus()},required:!0,value:o,onChange:function(l){n.onTimeChange(l.target.value||a)}})},n.state={time:n.props.timeString},n}return t.getDerivedStateFromProps=function(r,n){return r.timeString!==n.time?{time:r.timeString}:null},t.prototype.render=function(){return y.createElement("div",{className:"react-datepicker__input-time-container"},y.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),y.createElement("div",{className:"react-datepicker-time__input-container"},y.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},t})(y.Component),Vb=(function(e){Bt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.dayEl=y.createRef(),r.handleClick=function(n){!r.isDisabled()&&r.props.onClick&&r.props.onClick(n)},r.handleMouseEnter=function(n){!r.isDisabled()&&r.props.onMouseEnter&&r.props.onMouseEnter(n)},r.handleOnKeyDown=function(n){var o,s,i=n.key;i===ye.Space&&(n.preventDefault(),n.key=ye.Enter),(s=(o=r.props).handleOnKeyDown)===null||s===void 0||s.call(o,n)},r.isSameDay=function(n){return Fe(r.props.day,n)},r.isKeyboardSelected=function(){var n;if(r.props.disabledKeyboardNavigation)return!1;var o=r.props.selectsMultiple?(n=r.props.selectedDates)===null||n===void 0?void 0:n.some(function(i){return r.isSameDayOrWeek(i)}):r.isSameDayOrWeek(r.props.selected),s=r.props.preSelection&&r.isDisabled(r.props.preSelection);return!o&&r.isSameDayOrWeek(r.props.preSelection)&&!s},r.isDisabled=function(n){return n===void 0&&(n=r.props.day),hr(n,{minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals,includeDateIntervals:r.props.includeDateIntervals,includeDates:r.props.includeDates,filterDate:r.props.filterDate})},r.isExcluded=function(){return Qa(r.props.day,{excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals})},r.isStartOfWeek=function(){return Fe(r.props.day,Xr(r.props.day,r.props.locale,r.props.calendarStartDay))},r.isSameWeek=function(n){return r.props.showWeekPicker&&Fe(n,Xr(r.props.day,r.props.locale,r.props.calendarStartDay))},r.isSameDayOrWeek=function(n){return r.isSameDay(n)||r.isSameWeek(n)},r.getHighLightedClass=function(){var n=r.props,o=n.day,s=n.highlightDates;if(!s)return!1;var i=ht(o,"MM.dd.yyyy");return s.get(i)},r.getHolidaysClass=function(){var n,o=r.props,s=o.day,i=o.holidays;if(!i)return[void 0];var a=ht(s,"MM.dd.yyyy");return i.has(a)?[(n=i.get(a))===null||n===void 0?void 0:n.className]:[void 0]},r.isInRange=function(){var n=r.props,o=n.day,s=n.startDate,i=n.endDate;return!s||!i?!1:hn(o,s,i)},r.isInSelectingRange=function(){var n,o=r.props,s=o.day,i=o.selectsStart,a=o.selectsEnd,c=o.selectsRange,l=o.selectsDisabledDaysInRange,d=o.startDate,f=o.swapRange,p=o.endDate,m=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;if(!(i||a||c)||!m||!l&&r.isDisabled())return!1;if(i&&p&&(_.isBefore(m,p)||pn(m,p)))return hn(s,m,p);if(a&&d&&(_.isAfter(m,d)||pn(m,d)))return hn(s,d,m);if(c&&d&&!p){if(pn(m,d)||_.isAfter(m,d))return hn(s,d,m);if(f&&_.isBefore(m,d))return hn(s,m,d)}return!1},r.isSelectingRangeStart=function(){var n;if(!r.isInSelectingRange())return!1;var o=r.props,s=o.day,i=o.startDate,a=o.selectsStart,c=o.swapRange,l=o.selectsRange,d=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;return a?Fe(s,d):l&&c&&i&&d?Fe(s,_.isBefore(d,i)?d:i):Fe(s,i)},r.isSelectingRangeEnd=function(){var n;if(!r.isInSelectingRange())return!1;var o=r.props,s=o.day,i=o.endDate,a=o.selectsEnd,c=o.selectsRange,l=o.swapRange,d=o.startDate,f=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;return a?Fe(s,f):c&&l&&d&&f?Fe(s,_.isBefore(f,d)?d:f):c?Fe(s,f):Fe(s,i)},r.isRangeStart=function(){var n=r.props,o=n.day,s=n.startDate,i=n.endDate;return!s||!i?!1:Fe(s,o)},r.isRangeEnd=function(){var n=r.props,o=n.day,s=n.startDate,i=n.endDate;return!s||!i?!1:Fe(i,o)},r.isWeekend=function(){var n=_.getDay(r.props.day);return n===0||n===6},r.isAfterMonth=function(){return r.props.month!==void 0&&(r.props.month+1)%12===_.getMonth(r.props.day)},r.isBeforeMonth=function(){return r.props.month!==void 0&&(_.getMonth(r.props.day)+1)%12===r.props.month},r.isCurrentDay=function(){return r.isSameDay(et())},r.isSelected=function(){var n;return r.props.selectsMultiple?(n=r.props.selectedDates)===null||n===void 0?void 0:n.some(function(o){return r.isSameDayOrWeek(o)}):r.isSameDayOrWeek(r.props.selected)},r.getClassNames=function(n){var o=r.props.dayClassName?r.props.dayClassName(n):void 0;return Lt("react-datepicker__day",o,"react-datepicker__day--"+Cb(r.props.day),{"react-datepicker__day--disabled":r.isDisabled(),"react-datepicker__day--excluded":r.isExcluded(),"react-datepicker__day--selected":r.isSelected(),"react-datepicker__day--keyboard-selected":r.isKeyboardSelected(),"react-datepicker__day--range-start":r.isRangeStart(),"react-datepicker__day--range-end":r.isRangeEnd(),"react-datepicker__day--in-range":r.isInRange(),"react-datepicker__day--in-selecting-range":r.isInSelectingRange(),"react-datepicker__day--selecting-range-start":r.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":r.isSelectingRangeEnd(),"react-datepicker__day--today":r.isCurrentDay(),"react-datepicker__day--weekend":r.isWeekend(),"react-datepicker__day--outside-month":r.isAfterMonth()||r.isBeforeMonth()},r.getHighLightedClass(),r.getHolidaysClass())},r.getAriaLabel=function(){var n=r.props,o=n.day,s=n.ariaLabelPrefixWhenEnabled,i=s===void 0?"Choose":s,a=n.ariaLabelPrefixWhenDisabled,c=a===void 0?"Not available":a,l=r.isDisabled()||r.isExcluded()?c:i;return"".concat(l," ").concat(ht(o,"PPPP",r.props.locale))},r.getTitle=function(){var n=r.props,o=n.day,s=n.holidays,i=s===void 0?new Map:s,a=n.excludeDates,c=ht(o,"MM.dd.yyyy"),l=[];return i.has(c)&&l.push.apply(l,i.get(c).holidayNames),r.isExcluded()&&l.push(a?.filter(function(d){return d instanceof Date?Fe(d,o):Fe(d?.date,o)}).map(function(d){if(!(d instanceof Date))return d?.message})),l.join(", ")},r.getTabIndex=function(){var n=r.props.selected,o=r.props.preSelection,s=!(r.props.showWeekPicker&&(r.props.showWeekNumber||!r.isStartOfWeek()))&&(r.isKeyboardSelected()||r.isSameDay(n)&&Fe(o,n))?0:-1;return s},r.handleFocusDay=function(){var n;r.shouldFocusDay()&&((n=r.dayEl.current)===null||n===void 0||n.focus({preventScroll:!0}))},r.renderDayContents=function(){return r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()||r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()?null:r.props.renderDayContents?r.props.renderDayContents(_.getDate(r.props.day),r.props.day):_.getDate(r.props.day)},r.render=function(){return y.createElement("div",{ref:r.dayEl,className:r.getClassNames(r.props.day),onKeyDown:r.handleOnKeyDown,onClick:r.handleClick,onMouseEnter:r.props.usePointerEvent?void 0:r.handleMouseEnter,onPointerEnter:r.props.usePointerEvent?r.handleMouseEnter:void 0,tabIndex:r.getTabIndex(),"aria-label":r.getAriaLabel(),role:"gridcell",title:r.getTitle(),"aria-disabled":r.isDisabled(),"aria-current":r.isCurrentDay()?"date":void 0,"aria-selected":r.isSelected()||r.isInRange()},r.renderDayContents(),r.getTitle()!==""&&y.createElement("span",{className:"overlay"},r.getTitle()))},r}return t.prototype.componentDidMount=function(){this.handleFocusDay()},t.prototype.componentDidUpdate=function(){this.handleFocusDay()},t.prototype.shouldFocusDay=function(){var r=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(r=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(r=!1),this.isDayActiveElement()&&(r=!0),this.isDuplicateDay()&&(r=!1)),r},t.prototype.isDayActiveElement=function(){var r,n,o;return((n=(r=this.props.containerRef)===null||r===void 0?void 0:r.current)===null||n===void 0?void 0:n.contains(document.activeElement))&&((o=document.activeElement)===null||o===void 0?void 0:o.classList.contains("react-datepicker__day"))},t.prototype.isDuplicateDay=function(){return this.props.monthShowsDuplicateDaysEnd&&this.isAfterMonth()||this.props.monthShowsDuplicateDaysStart&&this.isBeforeMonth()},t})(y.Component),Ub=(function(e){Bt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.weekNumberEl=y.createRef(),r.handleClick=function(n){r.props.onClick&&r.props.onClick(n)},r.handleOnKeyDown=function(n){var o,s,i=n.key;i===ye.Space&&(n.preventDefault(),n.key=ye.Enter),(s=(o=r.props).handleOnKeyDown)===null||s===void 0||s.call(o,n)},r.isKeyboardSelected=function(){return!r.props.disabledKeyboardNavigation&&!Fe(r.props.date,r.props.selected)&&Fe(r.props.date,r.props.preSelection)},r.getTabIndex=function(){return r.props.showWeekPicker&&r.props.showWeekNumber&&(r.isKeyboardSelected()||Fe(r.props.date,r.props.selected)&&Fe(r.props.preSelection,r.props.selected))?0:-1},r.handleFocusWeekNumber=function(n){var o=!1;r.getTabIndex()===0&&!n?.isInputFocused&&Fe(r.props.date,r.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(o=!0),r.props.inline&&!r.props.shouldFocusDayInline&&(o=!1),r.props.containerRef&&r.props.containerRef.current&&r.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(o=!0)),o&&r.weekNumberEl.current&&r.weekNumberEl.current.focus({preventScroll:!0})},r}return Object.defineProperty(t,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},t.prototype.componentDidUpdate=function(r){this.handleFocusWeekNumber(r)},t.prototype.render=function(){var r=this.props,n=r.weekNumber,o=r.isWeekDisabled,s=r.ariaLabelPrefix,i=s===void 0?t.defaultProps.ariaLabelPrefix:s,a=r.onClick,c={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!a&&!o,"react-datepicker__week-number--selected":!!a&&Fe(this.props.date,this.props.selected)};return y.createElement("div",{ref:this.weekNumberEl,className:Lt(c),"aria-label":"".concat(i," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex(),role:"gridcell"},n)},t})(y.Component),Hb=(function(e){Bt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.isDisabled=function(n){return hr(n,{minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals,includeDateIntervals:r.props.includeDateIntervals,includeDates:r.props.includeDates,filterDate:r.props.filterDate})},r.handleDayClick=function(n,o){r.props.onDayClick&&r.props.onDayClick(n,o)},r.handleDayMouseEnter=function(n){r.props.onDayMouseEnter&&r.props.onDayMouseEnter(n)},r.handleWeekClick=function(n,o,s){for(var i,a,c,l=new Date(n),d=0;d<7;d++){var f=new Date(n);f.setDate(f.getDate()+d);var p=!r.isDisabled(f);if(p){l=f;break}}typeof r.props.onWeekSelect=="function"&&r.props.onWeekSelect(l,o,s),r.props.showWeekPicker&&r.handleDayClick(l,s),((i=r.props.shouldCloseOnSelect)!==null&&i!==void 0?i:t.defaultProps.shouldCloseOnSelect)&&((c=(a=r.props).setOpen)===null||c===void 0||c.call(a,!1))},r.formatWeekNumber=function(n){return r.props.formatWeekNumber?r.props.formatWeekNumber(n):Sb(n)},r.isWeekDisabled=function(){for(var n=r.startOfWeek(),o=_.addDays(n,6),s=new Date(n);s<=o;){if(!r.isDisabled(s))return!1;s=_.addDays(s,1)}return!0},r.renderDays=function(){var n=r.startOfWeek(),o=[],s=r.formatWeekNumber(n);if(r.props.showWeekNumber){var i=r.props.onWeekSelect||r.props.showWeekPicker?r.handleWeekClick.bind(r,n,s):void 0;o.push(y.createElement(Ub,Be({key:"W"},t.defaultProps,r.props,{weekNumber:s,isWeekDisabled:r.isWeekDisabled(),date:n,onClick:i})))}return o.concat([0,1,2,3,4,5,6].map(function(a){var c=_.addDays(n,a);return y.createElement(Vb,Be({},t.defaultProps,r.props,{ariaLabelPrefixWhenEnabled:r.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:r.props.disabledDayAriaLabelPrefix,key:c.valueOf(),day:c,onClick:r.handleDayClick.bind(r,c),onMouseEnter:r.handleDayMouseEnter.bind(r,c)}))}))},r.startOfWeek=function(){return Xr(r.props.day,r.props.locale,r.props.calendarStartDay)},r.isKeyboardSelected=function(){return!r.props.disabledKeyboardNavigation&&!Fe(r.startOfWeek(),r.props.selected)&&Fe(r.startOfWeek(),r.props.preSelection)},r}return Object.defineProperty(t,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),t.prototype.render=function(){var r={"react-datepicker__week":!0,"react-datepicker__week--selected":Fe(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()},n=this.props.weekClassName?this.props.weekClassName(this.startOfWeek()):void 0;return y.createElement("div",{className:Lt(r,n),role:"row"},this.renderDays())},t})(y.Component),So,Wb=6,Bn={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},Ja=(So={},So[Bn.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},So[Bn.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},So[Bn.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},So),ui=1;function Ad(e,t){return e?Bn.FOUR_COLUMNS:t?Bn.TWO_COLUMNS:Bn.THREE_COLUMNS}var Yb=(function(e){Bt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.MONTH_REFS=jr([],Array(12),!0).map(function(){return y.createRef()}),r.QUARTER_REFS=jr([],Array(4),!0).map(function(){return y.createRef()}),r.isDisabled=function(n){return hr(n,{minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals,includeDateIntervals:r.props.includeDateIntervals,includeDates:r.props.includeDates,filterDate:r.props.filterDate})},r.isExcluded=function(n){return Qa(n,{excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals})},r.handleDayClick=function(n,o){var s,i;(i=(s=r.props).onDayClick)===null||i===void 0||i.call(s,n,o,r.props.orderInDisplay)},r.handleDayMouseEnter=function(n){var o,s;(s=(o=r.props).onDayMouseEnter)===null||s===void 0||s.call(o,n)},r.handleMouseLeave=function(){var n,o;(o=(n=r.props).onMouseLeave)===null||o===void 0||o.call(n)},r.isRangeStartMonth=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate;return!i||!a?!1:qt(_.setMonth(s,n),i)},r.isRangeStartQuarter=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate;return!i||!a?!1:oi(_.setQuarter(s,n),i)},r.isRangeEndMonth=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate;return!i||!a?!1:qt(_.setMonth(s,n),a)},r.isRangeEndQuarter=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate;return!i||!a?!1:oi(_.setQuarter(s,n),a)},r.isInSelectingRangeMonth=function(n){var o,s=r.props,i=s.day,a=s.selectsStart,c=s.selectsEnd,l=s.selectsRange,d=s.startDate,f=s.endDate,p=(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection;return!(a||c||l)||!p?!1:a&&f?si(p,f,n,i):c&&d||l&&d&&!f?si(d,p,n,i):!1},r.isSelectingMonthRangeStart=function(n){var o;if(!r.isInSelectingRangeMonth(n))return!1;var s=r.props,i=s.day,a=s.startDate,c=s.selectsStart,l=_.setMonth(i,n),d=(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection;return c?qt(l,d):qt(l,a)},r.isSelectingMonthRangeEnd=function(n){var o;if(!r.isInSelectingRangeMonth(n))return!1;var s=r.props,i=s.day,a=s.endDate,c=s.selectsEnd,l=s.selectsRange,d=_.setMonth(i,n),f=(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection;return c||l?qt(d,f):qt(d,a)},r.isInSelectingRangeQuarter=function(n){var o,s=r.props,i=s.day,a=s.selectsStart,c=s.selectsEnd,l=s.selectsRange,d=s.startDate,f=s.endDate,p=(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection;return!(a||c||l)||!p?!1:a&&f?li(p,f,n,i):c&&d||l&&d&&!f?li(d,p,n,i):!1},r.isWeekInMonth=function(n){var o=r.props.day,s=_.addDays(n,6);return qt(n,o)||qt(s,o)},r.isCurrentMonth=function(n,o){return _.getYear(n)===_.getYear(et())&&o===_.getMonth(et())},r.isCurrentQuarter=function(n,o){return _.getYear(n)===_.getYear(et())&&o===_.getQuarter(et())},r.isSelectedMonth=function(n,o,s){return _.getMonth(s)===o&&_.getYear(n)===_.getYear(s)},r.isSelectMonthInList=function(n,o,s){return s.some(function(i){return r.isSelectedMonth(n,o,i)})},r.isSelectedQuarter=function(n,o,s){return _.getQuarter(n)===o&&_.getYear(n)===_.getYear(s)},r.isMonthSelected=function(){var n=r.props,o=n.day,s=n.selected,i=n.selectedDates,a=n.selectsMultiple,c=_.getMonth(o);return a?i?.some(function(l){return r.isSelectedMonth(o,c,l)}):!!s&&r.isSelectedMonth(o,c,s)},r.renderWeeks=function(){for(var n=[],o=r.props.fixedHeight,s=0,i=!1,a=Xr(Br(r.props.day),r.props.locale,r.props.calendarStartDay),c=function(v){return r.props.showWeekPicker?Xr(v,r.props.locale,r.props.calendarStartDay):r.props.preSelection},l=function(v){return r.props.showWeekPicker?Xr(v,r.props.locale,r.props.calendarStartDay):r.props.selected},d=r.props.selected?l(r.props.selected):void 0,f=r.props.preSelection?c(r.props.preSelection):void 0;n.push(y.createElement(Hb,Be({},r.props,{ariaLabelPrefix:r.props.weekAriaLabelPrefix,key:s,day:a,month:_.getMonth(r.props.day),onDayClick:r.handleDayClick,onDayMouseEnter:r.handleDayMouseEnter,selected:d,preSelection:f,showWeekNumber:r.props.showWeekNumbers}))),!i;){s++,a=_.addWeeks(a,1);var p=o&&s>=Wb,m=!o&&!r.isWeekInMonth(a);if(p||m)if(r.props.peekNextMonth)i=!0;else break}return n},r.onMonthClick=function(n,o){var s=r.isMonthDisabledForLabelDate(o),i=s.isDisabled,a=s.labelDate;i||r.handleDayClick(Br(a),n)},r.onMonthMouseEnter=function(n){var o=r.isMonthDisabledForLabelDate(n),s=o.isDisabled,i=o.labelDate;s||r.handleDayMouseEnter(Br(i))},r.handleMonthNavigation=function(n,o){var s,i,a,c;(i=(s=r.props).setPreSelection)===null||i===void 0||i.call(s,o),(c=(a=r.MONTH_REFS[n])===null||a===void 0?void 0:a.current)===null||c===void 0||c.focus()},r.handleKeyboardNavigation=function(n,o,s){var i,a=r.props,c=a.selected,l=a.preSelection,d=a.setPreSelection,f=a.minDate,p=a.maxDate,m=a.showFourColumnMonthYearPicker,v=a.showTwoColumnMonthYearPicker;if(l){var h=Ad(m,v),b=r.getVerticalOffset(h),w=(i=Ja[h])===null||i===void 0?void 0:i.grid,S=function(E,I,P){var A,Y,Z=I,V=P;switch(E){case ye.ArrowRight:Z=_.addMonths(I,ui),V=P===11?0:P+ui;break;case ye.ArrowLeft:Z=_.subMonths(I,ui),V=P===0?11:P-ui;break;case ye.ArrowUp:Z=_.subMonths(I,b),V=!((A=w?.[0])===null||A===void 0)&&A.includes(P)?P+12-b:P-b;break;case ye.ArrowDown:Z=_.addMonths(I,b),V=!((Y=w?.[w.length-1])===null||Y===void 0)&&Y.includes(P)?P-12+b:P+b;break}return{newCalculatedDate:Z,newCalculatedMonth:V}},k=function(E,I,P){for(var A=40,Y=E,Z=!1,V=0,W=S(Y,I,P),le=W.newCalculatedDate,R=W.newCalculatedMonth;!Z;){if(V>=A){le=I,R=P;break}if(f&&le<f){Y=ye.ArrowRight;var X=S(Y,le,R);le=X.newCalculatedDate,R=X.newCalculatedMonth}if(p&&le>p){Y=ye.ArrowLeft;var X=S(Y,le,R);le=X.newCalculatedDate,R=X.newCalculatedMonth}if(Mb(le,r.props)){var X=S(Y,le,R);le=X.newCalculatedDate,R=X.newCalculatedMonth}else Z=!0;V++}return{newCalculatedDate:le,newCalculatedMonth:R}};if(o===ye.Enter){r.isMonthDisabled(s)||(r.onMonthClick(n,s),d?.(c));return}var C=k(o,l,s),x=C.newCalculatedDate,H=C.newCalculatedMonth;switch(o){case ye.ArrowRight:case ye.ArrowLeft:case ye.ArrowUp:case ye.ArrowDown:r.handleMonthNavigation(H,x);break}}},r.getVerticalOffset=function(n){var o,s;return(s=(o=Ja[n])===null||o===void 0?void 0:o.verticalNavigationOffset)!==null&&s!==void 0?s:0},r.onMonthKeyDown=function(n,o){var s=r.props,i=s.disabledKeyboardNavigation,a=s.handleOnMonthKeyDown,c=n.key;c!==ye.Tab&&n.preventDefault(),i||r.handleKeyboardNavigation(n,c,o),a&&a(n)},r.onQuarterClick=function(n,o){var s=_.setQuarter(r.props.day,o);ii(s,r.props)||r.handleDayClick(dd(s),n)},r.onQuarterMouseEnter=function(n){var o=_.setQuarter(r.props.day,n);ii(o,r.props)||r.handleDayMouseEnter(dd(o))},r.handleQuarterNavigation=function(n,o){var s,i,a,c;r.isDisabled(o)||r.isExcluded(o)||((i=(s=r.props).setPreSelection)===null||i===void 0||i.call(s,o),(c=(a=r.QUARTER_REFS[n-1])===null||a===void 0?void 0:a.current)===null||c===void 0||c.focus())},r.onQuarterKeyDown=function(n,o){var s,i,a=n.key;if(!r.props.disabledKeyboardNavigation)switch(a){case ye.Enter:r.onQuarterClick(n,o),(i=(s=r.props).setPreSelection)===null||i===void 0||i.call(s,r.props.selected);break;case ye.ArrowRight:if(!r.props.preSelection)break;r.handleQuarterNavigation(o===4?1:o+1,_.addQuarters(r.props.preSelection,1));break;case ye.ArrowLeft:if(!r.props.preSelection)break;r.handleQuarterNavigation(o===1?4:o-1,_.subQuarters(r.props.preSelection,1));break}},r.isMonthDisabledForLabelDate=function(n){var o,s=r.props,i=s.day,a=s.minDate,c=s.maxDate,l=s.excludeDates,d=s.includeDates,f=_.setMonth(i,n);return{isDisabled:(o=(a||c||l||d)&&md(f,r.props))!==null&&o!==void 0?o:!1,labelDate:f}},r.isMonthDisabled=function(n){var o=r.isMonthDisabledForLabelDate(n).isDisabled;return o},r.getMonthClassNames=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate,c=o.preSelection,l=o.monthClassName,d=l?l(_.setMonth(s,n)):void 0,f=r.getSelection();return Lt("react-datepicker__month-text","react-datepicker__month-".concat(n),d,{"react-datepicker__month-text--disabled":r.isMonthDisabled(n),"react-datepicker__month-text--selected":f?r.isSelectMonthInList(s,n,f):void 0,"react-datepicker__month-text--keyboard-selected":!r.props.disabledKeyboardNavigation&&c&&r.isSelectedMonth(s,n,c)&&!r.isMonthSelected()&&!r.isMonthDisabled(n),"react-datepicker__month-text--in-selecting-range":r.isInSelectingRangeMonth(n),"react-datepicker__month-text--in-range":i&&a?si(i,a,n,s):void 0,"react-datepicker__month-text--range-start":r.isRangeStartMonth(n),"react-datepicker__month-text--range-end":r.isRangeEndMonth(n),"react-datepicker__month-text--selecting-range-start":r.isSelectingMonthRangeStart(n),"react-datepicker__month-text--selecting-range-end":r.isSelectingMonthRangeEnd(n),"react-datepicker__month-text--today":r.isCurrentMonth(s,n)})},r.getTabIndex=function(n){if(r.props.preSelection==null)return"-1";var o=_.getMonth(r.props.preSelection),s=r.isMonthDisabledForLabelDate(o).isDisabled,i=n===o&&!(s||r.props.disabledKeyboardNavigation)?"0":"-1";return i},r.getQuarterTabIndex=function(n){if(r.props.preSelection==null)return"-1";var o=_.getQuarter(r.props.preSelection),s=ii(r.props.day,r.props),i=n===o&&!(s||r.props.disabledKeyboardNavigation)?"0":"-1";return i},r.getAriaLabel=function(n){var o=r.props,s=o.chooseDayAriaLabelPrefix,i=s===void 0?"Choose":s,a=o.disabledDayAriaLabelPrefix,c=a===void 0?"Not available":a,l=o.day,d=o.locale,f=_.setMonth(l,n),p=r.isDisabled(f)||r.isExcluded(f)?c:i;return"".concat(p," ").concat(ht(f,"MMMM yyyy",d))},r.getQuarterClassNames=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate,c=o.selected,l=o.minDate,d=o.maxDate,f=o.excludeDates,p=o.includeDates,m=o.filterDate,v=o.preSelection,h=o.disabledKeyboardNavigation,b=(l||d||f||p||m)&&ii(_.setQuarter(s,n),r.props);return Lt("react-datepicker__quarter-text","react-datepicker__quarter-".concat(n),{"react-datepicker__quarter-text--disabled":b,"react-datepicker__quarter-text--selected":c?r.isSelectedQuarter(s,n,c):void 0,"react-datepicker__quarter-text--keyboard-selected":!h&&v&&r.isSelectedQuarter(s,n,v)&&!b,"react-datepicker__quarter-text--in-selecting-range":r.isInSelectingRangeQuarter(n),"react-datepicker__quarter-text--in-range":i&&a?li(i,a,n,s):void 0,"react-datepicker__quarter-text--range-start":r.isRangeStartQuarter(n),"react-datepicker__quarter-text--range-end":r.isRangeEndQuarter(n),"react-datepicker__quarter-text--today":r.isCurrentQuarter(s,n)})},r.getMonthContent=function(n){var o=r.props,s=o.showFullMonthYearPicker,i=o.renderMonthContent,a=o.locale,c=o.day,l=hd(n,a),d=Ka(n,a);return i?i(n,l,d,c):s?d:l},r.getQuarterContent=function(n){var o,s=r.props,i=s.renderQuarterContent,a=s.locale,c=Ab(n,a);return(o=i?.(n,c))!==null&&o!==void 0?o:c},r.renderMonths=function(){var n,o=r.props,s=o.showTwoColumnMonthYearPicker,i=o.showFourColumnMonthYearPicker,a=o.day,c=o.selected,l=(n=Ja[Ad(i,s)])===null||n===void 0?void 0:n.grid;return l?.map(function(d,f){return y.createElement("div",{className:"react-datepicker__month-wrapper",key:f},d.map(function(p,m){return y.createElement("div",{ref:r.MONTH_REFS[p],key:m,onClick:function(v){r.onMonthClick(v,p)},onKeyDown:function(v){Id(v)&&(v.preventDefault(),v.key=ye.Enter),r.onMonthKeyDown(v,p)},onMouseEnter:r.props.usePointerEvent?void 0:function(){return r.onMonthMouseEnter(p)},onPointerEnter:r.props.usePointerEvent?function(){return r.onMonthMouseEnter(p)}:void 0,tabIndex:Number(r.getTabIndex(p)),className:r.getMonthClassNames(p),"aria-disabled":r.isMonthDisabled(p),role:"option","aria-label":r.getAriaLabel(p),"aria-current":r.isCurrentMonth(a,p)?"date":void 0,"aria-selected":c?r.isSelectedMonth(a,p,c):void 0},r.getMonthContent(p))}))})},r.renderQuarters=function(){var n=r.props,o=n.day,s=n.selected,i=[1,2,3,4];return y.createElement("div",{className:"react-datepicker__quarter-wrapper"},i.map(function(a,c){return y.createElement("div",{key:c,ref:r.QUARTER_REFS[c],role:"option",onClick:function(l){r.onQuarterClick(l,a)},onKeyDown:function(l){r.onQuarterKeyDown(l,a)},onMouseEnter:r.props.usePointerEvent?void 0:function(){return r.onQuarterMouseEnter(a)},onPointerEnter:r.props.usePointerEvent?function(){return r.onQuarterMouseEnter(a)}:void 0,className:r.getQuarterClassNames(a),"aria-selected":s?r.isSelectedQuarter(o,a,s):void 0,tabIndex:Number(r.getQuarterTabIndex(a)),"aria-current":r.isCurrentQuarter(o,a)?"date":void 0},r.getQuarterContent(a))}))},r.getClassNames=function(){var n=r.props,o=n.selectingDate,s=n.selectsStart,i=n.selectsEnd,a=n.showMonthYearPicker,c=n.showQuarterYearPicker,l=n.showWeekPicker;return Lt("react-datepicker__month",{"react-datepicker__month--selecting-range":o&&(s||i)},{"react-datepicker__monthPicker":a},{"react-datepicker__quarterPicker":c},{"react-datepicker__weekPicker":l})},r}return t.prototype.getSelection=function(){var r=this.props,n=r.selected,o=r.selectedDates,s=r.selectsMultiple;if(s)return o;if(n)return[n]},t.prototype.render=function(){var r=this.props,n=r.showMonthYearPicker,o=r.showQuarterYearPicker,s=r.day,i=r.ariaLabelPrefix,a=i===void 0?"Month ":i,c=a?a.trim()+" ":"",l=n||o;return l?y.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(c).concat(ht(s,"MMMM, yyyy",this.props.locale)),role:"listbox"},n?this.renderMonths():this.renderQuarters()):y.createElement("div",{role:"table"},this.props.dayNamesHeader&&y.createElement("div",{role:"rowgroup"},this.props.dayNamesHeader),y.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(c).concat(ht(s,"MMMM, yyyy",this.props.locale)),role:"rowgroup"},this.renderWeeks()))},t})(y.Component),qb=(function(e){Bt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.monthOptionButtonsRef={},r.isSelectedMonth=function(n){return r.props.month===n},r.handleOptionKeyDown=function(n,o){var s;switch(o.key){case"Enter":o.preventDefault(),r.onChange(n);break;case"Escape":o.preventDefault(),r.props.onCancel();break;case"ArrowUp":case"ArrowDown":{o.preventDefault();var i=(n+(o.key==="ArrowUp"?-1:1)+r.props.monthNames.length)%r.props.monthNames.length;(s=r.monthOptionButtonsRef[i])===null||s===void 0||s.focus();break}}},r.renderOptions=function(){return r.monthOptionButtonsRef={},r.props.monthNames.map(function(n,o){return y.createElement("div",{ref:function(s){r.monthOptionButtonsRef[o]=s,r.isSelectedMonth(o)&&s?.focus()},role:"button",tabIndex:0,className:r.isSelectedMonth(o)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:n,onClick:r.onChange.bind(r,o),onKeyDown:r.handleOptionKeyDown.bind(r,o),"aria-selected":r.isSelectedMonth(o)?"true":void 0},r.isSelectedMonth(o)?y.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",n)})},r.onChange=function(n){return r.props.onChange(n)},r.handleClickOutside=function(){return r.props.onCancel()},r}return t.prototype.render=function(){return y.createElement(ti,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},t})(y.Component),Zb=(function(e){Bt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={dropdownVisible:!1},r.renderSelectOptions=function(n){return n.map(function(o,s){return y.createElement("option",{key:o,value:s},o)})},r.renderSelectMode=function(n){return y.createElement("select",{value:r.props.month,className:"react-datepicker__month-select",onChange:function(o){return r.onChange(parseInt(o.target.value))}},r.renderSelectOptions(n))},r.renderReadView=function(n,o){return y.createElement("button",{key:"read",type:"button",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:r.toggleDropdown},y.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),y.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},o[r.props.month]))},r.renderDropdown=function(n){return y.createElement(qb,Be({key:"dropdown"},r.props,{monthNames:n,onChange:r.onChange,onCancel:r.toggleDropdown}))},r.renderScrollMode=function(n){var o=r.state.dropdownVisible,s=[r.renderReadView(!o,n)];return o&&s.unshift(r.renderDropdown(n)),s},r.onChange=function(n){r.toggleDropdown(),n!==r.props.month&&r.props.onChange(n)},r.toggleDropdown=function(){return r.setState({dropdownVisible:!r.state.dropdownVisible})},r}return t.prototype.render=function(){var r=this,n=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(s){return hd(s,r.props.locale)}:function(s){return Ka(s,r.props.locale)}),o;switch(this.props.dropdownMode){case"scroll":o=this.renderScrollMode(n);break;case"select":o=this.renderSelectMode(n);break}return y.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},o)},t})(y.Component);function Gb(e,t){for(var r=[],n=Br(e),o=Br(t);!_.isAfter(n,o);)r.push(et(n)),n=_.addMonths(n,1);return r}var Kb=(function(e){Bt(t,e);function t(r){var n=e.call(this,r)||this;return n.renderOptions=function(){return n.state.monthYearsList.map(function(o){var s=_.getTime(o),i=Rr(n.props.date,o)&&qt(n.props.date,o);return y.createElement("div",{className:i?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:s,onClick:n.onChange.bind(n,s),"aria-selected":i?"true":void 0},i?y.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",ht(o,n.props.dateFormat,n.props.locale))})},n.onChange=function(o){return n.props.onChange(o)},n.handleClickOutside=function(){n.props.onCancel()},n.state={monthYearsList:Gb(n.props.minDate,n.props.maxDate)},n}return t.prototype.render=function(){var r=Lt({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return y.createElement(ti,{className:r,onClickOutside:this.handleClickOutside},this.renderOptions())},t})(y.Component),Qb=(function(e){Bt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={dropdownVisible:!1},r.renderSelectOptions=function(){for(var n=Br(r.props.minDate),o=Br(r.props.maxDate),s=[];!_.isAfter(n,o);){var i=_.getTime(n);s.push(y.createElement("option",{key:i,value:i},ht(n,r.props.dateFormat,r.props.locale))),n=_.addMonths(n,1)}return s},r.onSelectChange=function(n){r.onChange(parseInt(n.target.value))},r.renderSelectMode=function(){return y.createElement("select",{value:_.getTime(Br(r.props.date)),className:"react-datepicker__month-year-select",onChange:r.onSelectChange},r.renderSelectOptions())},r.renderReadView=function(n){var o=ht(r.props.date,r.props.dateFormat,r.props.locale);return y.createElement("div",{key:"read",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:r.toggleDropdown},y.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),y.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},o))},r.renderDropdown=function(){return y.createElement(Kb,Be({key:"dropdown"},r.props,{onChange:r.onChange,onCancel:r.toggleDropdown}))},r.renderScrollMode=function(){var n=r.state.dropdownVisible,o=[r.renderReadView(!n)];return n&&o.unshift(r.renderDropdown()),o},r.onChange=function(n){r.toggleDropdown();var o=et(n);Rr(r.props.date,o)&&qt(r.props.date,o)||r.props.onChange(o)},r.toggleDropdown=function(){return r.setState({dropdownVisible:!r.state.dropdownVisible})},r}return t.prototype.render=function(){var r;switch(this.props.dropdownMode){case"scroll":r=this.renderScrollMode();break;case"select":r=this.renderSelectMode();break}return y.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},r)},t})(y.Component),Xb=(function(e){Bt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={height:null},r.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var n,o,s;r.list&&(r.list.scrollTop=(s=r.centerLi&&t.calcCenterPosition(r.props.monthRef?r.props.monthRef.clientHeight-((o=(n=r.header)===null||n===void 0?void 0:n.clientHeight)!==null&&o!==void 0?o:0):r.list.clientHeight,r.centerLi))!==null&&s!==void 0?s:0)})},r.handleClick=function(n){var o,s;(r.props.minTime||r.props.maxTime)&&yd(n,r.props)||(r.props.excludeTimes||r.props.includeTimes||r.props.filterTime)&&vd(n,r.props)||(s=(o=r.props).onChange)===null||s===void 0||s.call(o,n)},r.isSelectedTime=function(n){return r.props.selected&&Bb(r.props.selected,n)},r.isDisabledTime=function(n){return(r.props.minTime||r.props.maxTime)&&yd(n,r.props)||(r.props.excludeTimes||r.props.includeTimes||r.props.filterTime)&&vd(n,r.props)},r.liClasses=function(n){var o,s=["react-datepicker__time-list-item",r.props.timeClassName?r.props.timeClassName(n):void 0];return r.isSelectedTime(n)&&s.push("react-datepicker__time-list-item--selected"),r.isDisabledTime(n)&&s.push("react-datepicker__time-list-item--disabled"),r.props.injectTimes&&(_.getHours(n)*3600+_.getMinutes(n)*60+_.getSeconds(n))%(((o=r.props.intervals)!==null&&o!==void 0?o:t.defaultProps.intervals)*60)!==0&&s.push("react-datepicker__time-list-item--injected"),s.join(" ")},r.handleOnKeyDown=function(n,o){var s,i;n.key===ye.Space&&(n.preventDefault(),n.key=ye.Enter),(n.key===ye.ArrowUp||n.key===ye.ArrowLeft)&&n.target instanceof HTMLElement&&n.target.previousSibling&&(n.preventDefault(),n.target.previousSibling instanceof HTMLElement&&n.target.previousSibling.focus()),(n.key===ye.ArrowDown||n.key===ye.ArrowRight)&&n.target instanceof HTMLElement&&n.target.nextSibling&&(n.preventDefault(),n.target.nextSibling instanceof HTMLElement&&n.target.nextSibling.focus()),n.key===ye.Enter&&r.handleClick(o),(i=(s=r.props).handleOnKeyDown)===null||i===void 0||i.call(s,n)},r.renderTimes=function(){for(var n,o=[],s=typeof r.props.format=="string"?r.props.format:"p",i=(n=r.props.intervals)!==null&&n!==void 0?n:t.defaultProps.intervals,a=r.props.selected||r.props.openToDate||et(),c=ni(a),l=r.props.injectTimes&&r.props.injectTimes.sort(function(b,w){return b.getTime()-w.getTime()}),d=60*zb(a),f=d/i,p=0;p<f;p++){var m=_.addMinutes(c,p*i);if(o.push(m),l){var v=Lb(c,m,p,i,l);o=o.concat(v)}}var h=o.reduce(function(b,w){return w.getTime()<=a.getTime()?w:b},o[0]);return o.map(function(b){return y.createElement("li",{key:b.valueOf(),onClick:r.handleClick.bind(r,b),className:r.liClasses(b),ref:function(w){b===h&&(r.centerLi=w)},onKeyDown:function(w){r.handleOnKeyDown(w,b)},tabIndex:b===h?0:-1,role:"option","aria-selected":r.isSelectedTime(b)?"true":void 0,"aria-disabled":r.isDisabledTime(b)?"true":void 0},ht(b,s,r.props.locale))})},r.renderTimeCaption=function(){return r.props.showTimeCaption===!1?y.createElement(y.Fragment,null):y.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(r.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(n){r.header=n}},y.createElement("div",{className:"react-datepicker-time__header"},r.props.timeCaption))},r}return Object.defineProperty(t,"defaultProps",{get:function(){return{intervals:30,todayButton:null,timeCaption:"Time",showTimeCaption:!0}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.scrollToTheSelectedTime(),this.observeDatePickerHeightChanges()},t.prototype.componentWillUnmount=function(){var r;(r=this.resizeObserver)===null||r===void 0||r.disconnect()},t.prototype.observeDatePickerHeightChanges=function(){var r=this,n=this.props.monthRef;this.updateContainerHeight(),n&&(this.resizeObserver=new ResizeObserver(function(){r.updateContainerHeight()}),this.resizeObserver.observe(n))},t.prototype.updateContainerHeight=function(){this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})},t.prototype.render=function(){var r=this,n,o=this.state.height;return y.createElement("div",{className:"react-datepicker__time-container ".concat(((n=this.props.todayButton)!==null&&n!==void 0?n:t.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},this.renderTimeCaption(),y.createElement("div",{className:"react-datepicker__time"},y.createElement("div",{className:"react-datepicker__time-box"},y.createElement("ul",{className:"react-datepicker__time-list",ref:function(s){r.list=s},style:o?{height:o}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},t.calcCenterPosition=function(r,n){return n.offsetTop-(r/2-n.clientHeight/2)},t})(y.Component),Md=3,Jb=(function(e){Bt(t,e);function t(r){var n=e.call(this,r)||this;return n.YEAR_REFS=jr([],Array(n.props.yearItemNumber),!0).map(function(){return y.createRef()}),n.isDisabled=function(o){return hr(o,{minDate:n.props.minDate,maxDate:n.props.maxDate,excludeDates:n.props.excludeDates,includeDates:n.props.includeDates,filterDate:n.props.filterDate})},n.isExcluded=function(o){return Qa(o,{excludeDates:n.props.excludeDates})},n.selectingDate=function(){var o;return(o=n.props.selectingDate)!==null&&o!==void 0?o:n.props.preSelection},n.updateFocusOnPaginate=function(o){var s=function(){var i,a;(a=(i=n.YEAR_REFS[o])===null||i===void 0?void 0:i.current)===null||a===void 0||a.focus()};window.requestAnimationFrame(s)},n.handleYearClick=function(o,s){n.props.onDayClick&&n.props.onDayClick(o,s)},n.handleYearNavigation=function(o,s){var i,a,c,l,d=n.props,f=d.date,p=d.yearItemNumber;if(!(f===void 0||p===void 0)){var m=Fr(f,p).startPeriod;n.isDisabled(s)||n.isExcluded(s)||((a=(i=n.props).setPreSelection)===null||a===void 0||a.call(i,s),o-m<0?n.updateFocusOnPaginate(p-(m-o)):o-m>=p?n.updateFocusOnPaginate(Math.abs(p-(o-m))):(l=(c=n.YEAR_REFS[o-m])===null||c===void 0?void 0:c.current)===null||l===void 0||l.focus())}},n.isSameDay=function(o,s){return Fe(o,s)},n.isCurrentYear=function(o){return o===_.getYear(et())},n.isRangeStart=function(o){return n.props.startDate&&n.props.endDate&&Rr(_.setYear(et(),o),n.props.startDate)},n.isRangeEnd=function(o){return n.props.startDate&&n.props.endDate&&Rr(_.setYear(et(),o),n.props.endDate)},n.isInRange=function(o){return ai(o,n.props.startDate,n.props.endDate)},n.isInSelectingRange=function(o){var s=n.props,i=s.selectsStart,a=s.selectsEnd,c=s.selectsRange,l=s.startDate,d=s.endDate;return!(i||a||c)||!n.selectingDate()?!1:i&&d?ai(o,n.selectingDate(),d):a&&l||c&&l&&!d?ai(o,l,n.selectingDate()):!1},n.isSelectingRangeStart=function(o){var s;if(!n.isInSelectingRange(o))return!1;var i=n.props,a=i.startDate,c=i.selectsStart,l=_.setYear(et(),o);return c?Rr(l,(s=n.selectingDate())!==null&&s!==void 0?s:null):Rr(l,a??null)},n.isSelectingRangeEnd=function(o){var s;if(!n.isInSelectingRange(o))return!1;var i=n.props,a=i.endDate,c=i.selectsEnd,l=i.selectsRange,d=_.setYear(et(),o);return c||l?Rr(d,(s=n.selectingDate())!==null&&s!==void 0?s:null):Rr(d,a??null)},n.isKeyboardSelected=function(o){if(!(n.props.disabledKeyboardNavigation||n.props.date===void 0||n.props.preSelection==null)){var s=n.props,i=s.minDate,a=s.maxDate,c=s.excludeDates,l=s.includeDates,d=s.filterDate,f=s.selected,p=xo(_.setYear(n.props.date,o)),m=(i||a||c||l||d)&&ci(o,n.props),v=!!f&&Fe(p,xo(f)),h=Fe(p,xo(n.props.preSelection));return!n.props.inline&&!v&&h&&!m}},n.isSelectedYear=function(o){var s=n.props,i=s.selectsMultiple,a=s.selected,c=s.selectedDates;return i?c?.some(function(l){return o===_.getYear(l)}):!!a&&o===_.getYear(a)},n.onYearClick=function(o,s){var i=n.props.date;i!==void 0&&n.handleYearClick(xo(_.setYear(i,s)),o)},n.onYearKeyDown=function(o,s){var i,a,c=o.key,l=n.props,d=l.date,f=l.yearItemNumber,p=l.handleOnKeyDown;if(c!==ye.Tab&&o.preventDefault(),!n.props.disabledKeyboardNavigation)switch(c){case ye.Enter:if(n.props.selected==null)break;n.onYearClick(o,s),(a=(i=n.props).setPreSelection)===null||a===void 0||a.call(i,n.props.selected);break;case ye.ArrowRight:if(n.props.preSelection==null)break;n.handleYearNavigation(s+1,_.addYears(n.props.preSelection,1));break;case ye.ArrowLeft:if(n.props.preSelection==null)break;n.handleYearNavigation(s-1,_.subYears(n.props.preSelection,1));break;case ye.ArrowUp:{if(d===void 0||f===void 0||n.props.preSelection==null)break;var m=Fr(d,f).startPeriod,v=Md,h=s-v;if(h<m){var b=f%v;s>=m&&s<m+b?v=b:v+=b,h=s-v}n.handleYearNavigation(h,_.subYears(n.props.preSelection,v));break}case ye.ArrowDown:{if(d===void 0||f===void 0||n.props.preSelection==null)break;var w=Fr(d,f).endPeriod,v=Md,h=s+v;if(h>w){var b=f%v;s<=w&&s>w-b?v=b:v+=b,h=s+v}n.handleYearNavigation(h,_.addYears(n.props.preSelection,v));break}}p&&p(o)},n.getYearClassNames=function(o){var s=n.props,i=s.date,a=s.minDate,c=s.maxDate,l=s.excludeDates,d=s.includeDates,f=s.filterDate,p=s.yearClassName;return Lt("react-datepicker__year-text","react-datepicker__year-".concat(o),i?p?.(_.setYear(i,o)):void 0,{"react-datepicker__year-text--selected":n.isSelectedYear(o),"react-datepicker__year-text--disabled":(a||c||l||d||f)&&ci(o,n.props),"react-datepicker__year-text--keyboard-selected":n.isKeyboardSelected(o),"react-datepicker__year-text--range-start":n.isRangeStart(o),"react-datepicker__year-text--range-end":n.isRangeEnd(o),"react-datepicker__year-text--in-range":n.isInRange(o),"react-datepicker__year-text--in-selecting-range":n.isInSelectingRange(o),"react-datepicker__year-text--selecting-range-start":n.isSelectingRangeStart(o),"react-datepicker__year-text--selecting-range-end":n.isSelectingRangeEnd(o),"react-datepicker__year-text--today":n.isCurrentYear(o)})},n.getYearTabIndex=function(o){if(n.props.disabledKeyboardNavigation||n.props.preSelection==null)return"-1";var s=_.getYear(n.props.preSelection),i=ci(o,n.props);return o===s&&!i?"0":"-1"},n.getYearContent=function(o){return n.props.renderYearContent?n.props.renderYearContent(o):o},n}return t.prototype.render=function(){var r=this,n=[],o=this.props,s=o.date,i=o.yearItemNumber,a=o.onYearMouseEnter,c=o.onYearMouseLeave;if(s===void 0)return null;for(var l=Fr(s,i),d=l.startPeriod,f=l.endPeriod,p=function(h){n.push(y.createElement("div",{ref:m.YEAR_REFS[h-d],onClick:function(b){r.onYearClick(b,h)},onKeyDown:function(b){Id(b)&&(b.preventDefault(),b.key=ye.Enter),r.onYearKeyDown(b,h)},tabIndex:Number(m.getYearTabIndex(h)),className:m.getYearClassNames(h),onMouseEnter:m.props.usePointerEvent?void 0:function(b){return a(b,h)},onPointerEnter:m.props.usePointerEvent?function(b){return a(b,h)}:void 0,onMouseLeave:m.props.usePointerEvent?void 0:function(b){return c(b,h)},onPointerLeave:m.props.usePointerEvent?function(b){return c(b,h)}:void 0,key:h,"aria-current":m.isCurrentYear(h)?"date":void 0},m.getYearContent(h)))},m=this,v=d;v<=f;v++)p(v);return y.createElement("div",{className:"react-datepicker__year"},y.createElement("div",{className:"react-datepicker__year-wrapper",onMouseLeave:this.props.usePointerEvent?void 0:this.props.clearSelectingDate,onPointerLeave:this.props.usePointerEvent?this.props.clearSelectingDate:void 0},n))},t})(y.Component);function e2(e,t,r,n){for(var o=[],s=0;s<2*t+1;s++){var i=e+t-s,a=!0;r&&(a=_.getYear(r)<=i),n&&a&&(a=_.getYear(n)>=i),a&&o.push(i)}return o}var t2=(function(e){Bt(t,e);function t(r){var n=e.call(this,r)||this;n.yearOptionButtonsRef={},n.handleOptionKeyDown=function(a,c){var l;switch(c.key){case"Enter":c.preventDefault(),n.onChange(a);break;case"Escape":c.preventDefault(),n.props.onCancel();break;case"ArrowUp":case"ArrowDown":{c.preventDefault();var d=a+(c.key==="ArrowUp"?1:-1);n.yearOptionButtonsRef[d]&&((l=n.yearOptionButtonsRef[d])===null||l===void 0||l.focus());break}}},n.renderOptions=function(){n.yearOptionButtonsRef={};var a=n.props.year,c=n.state.yearsList.map(function(f){return y.createElement("div",{ref:function(p){n.yearOptionButtonsRef[f]=p,f===a&&p?.focus()},role:"button",tabIndex:0,className:a===f?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:f,onClick:n.onChange.bind(n,f),onKeyDown:n.handleOptionKeyDown.bind(n,f),"aria-selected":a===f?"true":void 0},a===f?y.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",f)}),l=n.props.minDate?_.getYear(n.props.minDate):null,d=n.props.maxDate?_.getYear(n.props.maxDate):null;return(!d||!n.state.yearsList.find(function(f){return f===d}))&&c.unshift(y.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:n.incrementYears},y.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!l||!n.state.yearsList.find(function(f){return f===l}))&&c.push(y.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:n.decrementYears},y.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),c},n.onChange=function(a){n.props.onChange(a)},n.handleClickOutside=function(){n.props.onCancel()},n.shiftYears=function(a){var c=n.state.yearsList.map(function(l){return l+a});n.setState({yearsList:c})},n.incrementYears=function(){return n.shiftYears(1)},n.decrementYears=function(){return n.shiftYears(-1)};var o=r.yearDropdownItemNumber,s=r.scrollableYearDropdown,i=o||(s?10:5);return n.state={yearsList:e2(n.props.year,i,n.props.minDate,n.props.maxDate)},n.dropdownRef=y.createRef(),n}return t.prototype.componentDidMount=function(){var r=this.dropdownRef.current;if(r){var n=r.children?Array.from(r.children):null,o=n?n.find(function(s){return s.ariaSelected}):null;r.scrollTop=o&&o instanceof HTMLElement?o.offsetTop+(o.clientHeight-r.clientHeight)/2:(r.scrollHeight-r.clientHeight)/2}},t.prototype.render=function(){var r=Lt({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return y.createElement(ti,{className:r,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},t})(y.Component),r2=(function(e){Bt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={dropdownVisible:!1},r.renderSelectOptions=function(){for(var n=r.props.minDate?_.getYear(r.props.minDate):1900,o=r.props.maxDate?_.getYear(r.props.maxDate):2100,s=[],i=n;i<=o;i++)s.push(y.createElement("option",{key:i,value:i},i));return s},r.onSelectChange=function(n){r.onChange(parseInt(n.target.value))},r.renderSelectMode=function(){return y.createElement("select",{value:r.props.year,className:"react-datepicker__year-select",onChange:r.onSelectChange},r.renderSelectOptions())},r.renderReadView=function(n){return y.createElement("button",{key:"read",type:"button",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:r.toggleDropdown},y.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),y.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},r.props.year))},r.renderDropdown=function(){return y.createElement(t2,Be({key:"dropdown"},r.props,{onChange:r.onChange,onCancel:r.toggleDropdown}))},r.renderScrollMode=function(){var n=r.state.dropdownVisible,o=[r.renderReadView(!n)];return n&&o.unshift(r.renderDropdown()),o},r.onChange=function(n){r.toggleDropdown(),n!==r.props.year&&r.props.onChange(n)},r.toggleDropdown=function(n){r.setState({dropdownVisible:!r.state.dropdownVisible},function(){r.props.adjustDateOnChange&&r.handleYearChange(r.props.date,n)})},r.handleYearChange=function(n,o){var s;(s=r.onSelect)===null||s===void 0||s.call(r,n,o),r.setOpen()},r.onSelect=function(n,o){var s,i;(i=(s=r.props).onSelect)===null||i===void 0||i.call(s,n,o)},r.setOpen=function(){var n,o;(o=(n=r.props).setOpen)===null||o===void 0||o.call(n,!0)},r}return t.prototype.render=function(){var r;switch(this.props.dropdownMode){case"scroll":r=this.renderScrollMode();break;case"select":r=this.renderSelectMode();break}return y.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},r)},t})(y.Component),n2=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],Pd="react-datepicker-ignore-onclickoutside",o2=function(e){var t=(e.className||"").split(/\s+/);return n2.some(function(r){return t.indexOf(r)>=0})},s2=(function(e){Bt(t,e);function t(r){var n=e.call(this,r)||this;return n.monthContainer=void 0,n.handleClickOutside=function(o){n.props.onClickOutside(o)},n.setClickOutsideRef=function(){return n.containerRef.current},n.handleDropdownFocus=function(o){var s,i;o2(o.target)&&((i=(s=n.props).onDropdownFocus)===null||i===void 0||i.call(s,o))},n.getDateInView=function(){var o=n.props,s=o.preSelection,i=o.selected,a=o.openToDate,c=Sd(n.props),l=Cd(n.props),d=et(),f=a||i||s;return f||(c&&_.isBefore(d,c)?c:l&&_.isAfter(d,l)?l:d)},n.increaseMonth=function(){n.setState(function(o){var s=o.date;return{date:_.addMonths(s,1)}},function(){return n.handleMonthChange(n.state.date)})},n.decreaseMonth=function(){n.setState(function(o){var s=o.date;return{date:_.subMonths(s,1)}},function(){return n.handleMonthChange(n.state.date)})},n.handleDayClick=function(o,s,i){n.props.onSelect(o,s,i),n.props.setPreSelection&&n.props.setPreSelection(o)},n.handleDayMouseEnter=function(o){n.setState({selectingDate:o}),n.props.onDayMouseEnter&&n.props.onDayMouseEnter(o)},n.handleMonthMouseLeave=function(){n.setState({selectingDate:void 0}),n.props.onMonthMouseLeave&&n.props.onMonthMouseLeave()},n.handleYearMouseEnter=function(o,s){n.setState({selectingDate:_.setYear(et(),s)}),n.props.onYearMouseEnter&&n.props.onYearMouseEnter(o,s)},n.handleYearMouseLeave=function(o,s){n.props.onYearMouseLeave&&n.props.onYearMouseLeave(o,s)},n.handleYearChange=function(o){var s,i,a,c;(i=(s=n.props).onYearChange)===null||i===void 0||i.call(s,o),n.setState({isRenderAriaLiveMessage:!0}),n.props.adjustDateOnChange&&(n.props.onSelect(o),(c=(a=n.props).setOpen)===null||c===void 0||c.call(a,!0)),n.props.setPreSelection&&n.props.setPreSelection(o)},n.getEnabledPreSelectionDateForMonth=function(o){if(!hr(o,n.props))return o;for(var s=Br(o),i=Db(o),a=_.differenceInDays(i,s),c=null,l=0;l<=a;l++){var d=_.addDays(s,l);if(!hr(d,n.props)){c=d;break}}return c},n.handleMonthChange=function(o){var s,i,a,c=(s=n.getEnabledPreSelectionDateForMonth(o))!==null&&s!==void 0?s:o;n.handleCustomMonthChange(c),n.props.adjustDateOnChange&&(n.props.onSelect(c),(a=(i=n.props).setOpen)===null||a===void 0||a.call(i,!0)),n.props.setPreSelection&&n.props.setPreSelection(c)},n.handleCustomMonthChange=function(o){var s,i;(i=(s=n.props).onMonthChange)===null||i===void 0||i.call(s,o),n.setState({isRenderAriaLiveMessage:!0})},n.handleMonthYearChange=function(o){n.handleYearChange(o),n.handleMonthChange(o)},n.changeYear=function(o){n.setState(function(s){var i=s.date;return{date:_.setYear(i,Number(o))}},function(){return n.handleYearChange(n.state.date)})},n.changeMonth=function(o){n.setState(function(s){var i=s.date;return{date:_.setMonth(i,Number(o))}},function(){return n.handleMonthChange(n.state.date)})},n.changeMonthYear=function(o){n.setState(function(s){var i=s.date;return{date:_.setYear(_.setMonth(i,_.getMonth(o)),_.getYear(o))}},function(){return n.handleMonthYearChange(n.state.date)})},n.header=function(o){o===void 0&&(o=n.state.date);var s=Xr(o,n.props.locale,n.props.calendarStartDay),i=[];return n.props.showWeekNumbers&&i.push(y.createElement("div",{key:"W",className:"react-datepicker__day-name",role:"columnheader"},y.createElement("span",{className:"react-datepicker__sr-only"},"Week number"),y.createElement("span",{"aria-hidden":"true"},n.props.weekLabel||"#"))),i.concat([0,1,2,3,4,5,6].map(function(a){var c=_.addDays(s,a),l=n.formatWeekday(c,n.props.locale),d=n.props.weekDayClassName?n.props.weekDayClassName(c):void 0;return y.createElement("div",{key:a,role:"columnheader",className:Lt("react-datepicker__day-name",d)},y.createElement("span",{className:"react-datepicker__sr-only"},ht(c,"EEEE",n.props.locale)),y.createElement("span",{"aria-hidden":"true"},l))}))},n.formatWeekday=function(o,s){return n.props.formatWeekDay?kb(o,n.props.formatWeekDay,s):n.props.useWeekdaysShort?Ib(o,s):Tb(o,s)},n.decreaseYear=function(){n.setState(function(o){var s,i=o.date;return{date:_.subYears(i,n.props.showYearPicker?(s=n.props.yearItemNumber)!==null&&s!==void 0?s:t.defaultProps.yearItemNumber:1)}},function(){return n.handleYearChange(n.state.date)})},n.clearSelectingDate=function(){n.setState({selectingDate:void 0})},n.renderPreviousButton=function(){var o,s,i;if(!n.props.renderCustomHeader){var a=(o=n.props.monthsShown)!==null&&o!==void 0?o:t.defaultProps.monthsShown,c=n.props.showPreviousMonths?a-1:0,l=(s=n.props.monthSelectedIn)!==null&&s!==void 0?s:c,d=_.subMonths(n.state.date,l),f;switch(!0){case n.props.showMonthYearPicker:f=xd(n.state.date,n.props);break;case n.props.showYearPicker:f=jb(n.state.date,n.props);break;case n.props.showQuarterYearPicker:f=Pb(n.state.date,n.props);break;default:f=bd(d,n.props);break}if(!(!((i=n.props.forceShowMonthNavigation)!==null&&i!==void 0?i:t.defaultProps.forceShowMonthNavigation)&&!n.props.showDisabledMonthNavigation&&f||n.props.showTimeSelectOnly)){var p=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],m=["react-datepicker__navigation","react-datepicker__navigation--previous"],v=n.decreaseMonth;(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker)&&(v=n.decreaseYear),f&&n.props.showDisabledMonthNavigation&&(m.push("react-datepicker__navigation--previous--disabled"),v=void 0);var h=n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker,b=n.props,w=b.previousMonthButtonLabel,S=w===void 0?t.defaultProps.previousMonthButtonLabel:w,k=b.previousYearButtonLabel,C=k===void 0?t.defaultProps.previousYearButtonLabel:k,x=n.props,H=x.previousMonthAriaLabel,E=H===void 0?typeof S=="string"?S:"Previous Month":H,I=x.previousYearAriaLabel,P=I===void 0?typeof C=="string"?C:"Previous Year":I;return y.createElement("button",{type:"button",className:m.join(" "),onClick:v,onKeyDown:n.props.handleOnKeyDown,"aria-label":h?P:E},y.createElement("span",{className:p.join(" ")},h?C:S))}}},n.increaseYear=function(){n.setState(function(o){var s,i=o.date;return{date:_.addYears(i,n.props.showYearPicker?(s=n.props.yearItemNumber)!==null&&s!==void 0?s:t.defaultProps.yearItemNumber:1)}},function(){return n.handleYearChange(n.state.date)})},n.renderNextButton=function(){var o;if(!n.props.renderCustomHeader){var s;switch(!0){case n.props.showMonthYearPicker:s=wd(n.state.date,n.props);break;case n.props.showYearPicker:s=Rb(n.state.date,n.props);break;case n.props.showQuarterYearPicker:s=Ob(n.state.date,n.props);break;default:s=_d(n.state.date,n.props);break}if(!(!((o=n.props.forceShowMonthNavigation)!==null&&o!==void 0?o:t.defaultProps.forceShowMonthNavigation)&&!n.props.showDisabledMonthNavigation&&s||n.props.showTimeSelectOnly)){var i=["react-datepicker__navigation","react-datepicker__navigation--next"],a=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];n.props.showTimeSelect&&i.push("react-datepicker__navigation--next--with-time"),n.props.todayButton&&i.push("react-datepicker__navigation--next--with-today-button");var c=n.increaseMonth;(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker)&&(c=n.increaseYear),s&&n.props.showDisabledMonthNavigation&&(i.push("react-datepicker__navigation--next--disabled"),c=void 0);var l=n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker,d=n.props,f=d.nextMonthButtonLabel,p=f===void 0?t.defaultProps.nextMonthButtonLabel:f,m=d.nextYearButtonLabel,v=m===void 0?t.defaultProps.nextYearButtonLabel:m,h=n.props,b=h.nextMonthAriaLabel,w=b===void 0?typeof p=="string"?p:"Next Month":b,S=h.nextYearAriaLabel,k=S===void 0?typeof v=="string"?v:"Next Year":S;return y.createElement("button",{type:"button",className:i.join(" "),onClick:c,onKeyDown:n.props.handleOnKeyDown,"aria-label":l?k:w},y.createElement("span",{className:a.join(" ")},l?v:p))}}},n.renderCurrentMonth=function(o){o===void 0&&(o=n.state.date);var s=["react-datepicker__current-month"];return n.props.showYearDropdown&&s.push("react-datepicker__current-month--hasYearDropdown"),n.props.showMonthDropdown&&s.push("react-datepicker__current-month--hasMonthDropdown"),n.props.showMonthYearDropdown&&s.push("react-datepicker__current-month--hasMonthYearDropdown"),y.createElement("h2",{className:s.join(" ")},ht(o,n.props.dateFormat,n.props.locale))},n.renderYearDropdown=function(o){if(o===void 0&&(o=!1),!(!n.props.showYearDropdown||o))return y.createElement(r2,Be({},t.defaultProps,n.props,{date:n.state.date,onChange:n.changeYear,year:_.getYear(n.state.date)}))},n.renderMonthDropdown=function(o){if(o===void 0&&(o=!1),!(!n.props.showMonthDropdown||o))return y.createElement(Zb,Be({},t.defaultProps,n.props,{month:_.getMonth(n.state.date),onChange:n.changeMonth}))},n.renderMonthYearDropdown=function(o){if(o===void 0&&(o=!1),!(!n.props.showMonthYearDropdown||o))return y.createElement(Qb,Be({},t.defaultProps,n.props,{date:n.state.date,onChange:n.changeMonthYear}))},n.handleTodayButtonClick=function(o){n.props.onSelect(fd(),o),n.props.setPreSelection&&n.props.setPreSelection(fd())},n.renderTodayButton=function(){if(!(!n.props.todayButton||n.props.showTimeSelectOnly))return y.createElement("div",{className:"react-datepicker__today-button",onClick:n.handleTodayButtonClick},n.props.todayButton)},n.renderDayNamesHeader=function(o){return y.createElement("div",{className:"react-datepicker__day-names",role:"row"},n.header(o))},n.renderDefaultHeader=function(o){var s=o.monthDate,i=o.i;return y.createElement("div",{className:"react-datepicker__header ".concat(n.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},n.renderCurrentMonth(s),y.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(n.props.dropdownMode),onFocus:n.handleDropdownFocus},n.renderMonthDropdown(i!==0),n.renderMonthYearDropdown(i!==0),n.renderYearDropdown(i!==0)))},n.renderCustomHeader=function(o){var s,i,a=o.monthDate,c=o.i;if(n.props.showTimeSelect&&!n.state.monthContainer||n.props.showTimeSelectOnly)return null;var l=n.props,d=l.showYearPicker,f=l.yearItemNumber,p;if(d){var m=Fr(a,f),v=m.startPeriod,h=m.endPeriod;p={startYear:v,endYear:h}}var b=bd(n.state.date,n.props),w=_d(n.state.date,n.props),S=xd(n.state.date,n.props),k=wd(n.state.date,n.props);return y.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:n.props.onDropdownFocus},(i=(s=n.props).renderCustomHeader)===null||i===void 0?void 0:i.call(s,Be(Be(Be({},n.state),d&&{visibleYearsRange:p}),{customHeaderCount:c,monthDate:a,changeMonth:n.changeMonth,changeYear:n.changeYear,decreaseMonth:n.decreaseMonth,increaseMonth:n.increaseMonth,decreaseYear:n.decreaseYear,increaseYear:n.increaseYear,prevMonthButtonDisabled:b,nextMonthButtonDisabled:w,prevYearButtonDisabled:S,nextYearButtonDisabled:k})))},n.renderYearHeader=function(o){var s=o.monthDate,i=n.props,a=i.showYearPicker,c=i.yearItemNumber,l=c===void 0?t.defaultProps.yearItemNumber:c,d=Fr(s,l),f=d.startPeriod,p=d.endPeriod;return y.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},a?"".concat(f," - ").concat(p):_.getYear(s))},n.renderHeader=function(o){var s=o.monthDate,i=o.i,a=i===void 0?0:i,c={monthDate:s,i:a};switch(!0){case n.props.renderCustomHeader!==void 0:return n.renderCustomHeader(c);case(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker):return n.renderYearHeader(c);default:return n.renderDefaultHeader(c)}},n.renderMonths=function(){var o,s;if(!(n.props.showTimeSelectOnly||n.props.showYearPicker)){for(var i=[],a=(o=n.props.monthsShown)!==null&&o!==void 0?o:t.defaultProps.monthsShown,c=n.props.showPreviousMonths?a-1:0,l=n.props.showMonthYearPicker||n.props.showQuarterYearPicker?_.addYears(n.state.date,c):_.subMonths(n.state.date,c),d=(s=n.props.monthSelectedIn)!==null&&s!==void 0?s:c,f=0;f<a;++f){var p=f-d+c,m=n.props.showMonthYearPicker||n.props.showQuarterYearPicker?_.addYears(l,p):_.addMonths(l,p),v="month-".concat(f),h=f<a-1,b=f>0;i.push(y.createElement("div",{key:v,ref:function(w){n.monthContainer=w??void 0},className:"react-datepicker__month-container"},n.renderHeader({monthDate:m,i:f}),y.createElement(Yb,Be({},t.defaultProps,n.props,{containerRef:n.containerRef,ariaLabelPrefix:n.props.monthAriaLabelPrefix,day:m,onDayClick:n.handleDayClick,handleOnKeyDown:n.props.handleOnDayKeyDown,handleOnMonthKeyDown:n.props.handleOnKeyDown,onDayMouseEnter:n.handleDayMouseEnter,onMouseLeave:n.handleMonthMouseLeave,orderInDisplay:f,selectingDate:n.state.selectingDate,monthShowsDuplicateDaysEnd:h,monthShowsDuplicateDaysStart:b,dayNamesHeader:n.renderDayNamesHeader(m)}))))}return i}},n.renderYears=function(){if(!n.props.showTimeSelectOnly&&n.props.showYearPicker)return y.createElement("div",{className:"react-datepicker__year--container"},n.renderHeader({monthDate:n.state.date}),y.createElement(Jb,Be({},t.defaultProps,n.props,{selectingDate:n.state.selectingDate,date:n.state.date,onDayClick:n.handleDayClick,clearSelectingDate:n.clearSelectingDate,onYearMouseEnter:n.handleYearMouseEnter,onYearMouseLeave:n.handleYearMouseLeave})))},n.renderTimeSection=function(){if(n.props.showTimeSelect&&(n.state.monthContainer||n.props.showTimeSelectOnly))return y.createElement(Xb,Be({},t.defaultProps,n.props,{onChange:n.props.onTimeChange,format:n.props.timeFormat,intervals:n.props.timeIntervals,monthRef:n.state.monthContainer}))},n.renderInputTimeSection=function(){var o=n.props.selected?new Date(n.props.selected):void 0,s=o&&ri(o)&&!!n.props.selected,i=s?"".concat(Dd(o.getHours()),":").concat(Dd(o.getMinutes())):"";if(n.props.showTimeInput)return y.createElement(Fb,Be({},t.defaultProps,n.props,{date:o,timeString:i,onChange:n.props.onTimeChange}))},n.renderAriaLiveRegion=function(){var o,s=Fr(n.state.date,(o=n.props.yearItemNumber)!==null&&o!==void 0?o:t.defaultProps.yearItemNumber),i=s.startPeriod,a=s.endPeriod,c;return n.props.showYearPicker?c="".concat(i," - ").concat(a):n.props.showMonthYearPicker||n.props.showQuarterYearPicker?c=_.getYear(n.state.date):c="".concat(Ka(_.getMonth(n.state.date),n.props.locale)," ").concat(_.getYear(n.state.date)),y.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},n.state.isRenderAriaLiveMessage&&c)},n.renderChildren=function(){if(n.props.children)return y.createElement("div",{className:"react-datepicker__children-container"},n.props.children)},n.containerRef=y.createRef(),n.state={date:n.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},n}return Object.defineProperty(t,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,outsideClickIgnoreClass:Pd,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:_o}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var r=this;this.props.showTimeSelect&&(this.assignMonthContainer=(function(){r.setState({monthContainer:r.monthContainer})})())},t.prototype.componentDidUpdate=function(r){var n=this;if(this.props.preSelection&&(!Fe(this.props.preSelection,r.preSelection)||this.props.monthSelectedIn!==r.monthSelectedIn)){var o=!qt(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return o&&n.handleCustomMonthChange(n.state.date)})}else this.props.openToDate&&!Fe(this.props.openToDate,r.openToDate)&&this.setState({date:this.props.openToDate})},t.prototype.render=function(){var r=this.props.container||bb;return y.createElement(ti,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},y.createElement("div",{style:{display:"contents"},ref:this.containerRef},y.createElement(r,{className:Lt("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showTime:this.props.showTimeSelect||this.props.showTimeInput,showTimeSelectOnly:this.props.showTimeSelectOnly},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren())))},t})(y.Component),i2=function(e){var t=e.icon,r=e.className,n=r===void 0?"":r,o=e.onClick,s="react-datepicker__calendar-icon";if(typeof t=="string")return y.createElement("i",{className:"".concat(s," ").concat(t," ").concat(n),"aria-hidden":"true",onClick:o});if(y.isValidElement(t)){var i=t;return y.cloneElement(i,{className:"".concat(i.props.className||""," ").concat(s," ").concat(n),onClick:function(a){typeof i.props.onClick=="function"&&i.props.onClick(a),typeof o=="function"&&o(a)}})}return y.createElement("svg",{className:"".concat(s," ").concat(n),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:o},y.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}))},Od=(function(e){Bt(t,e);function t(r){var n=e.call(this,r)||this;return n.portalRoot=null,n.el=document.createElement("div"),n}return t.prototype.componentDidMount=function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)},t.prototype.componentWillUnmount=function(){this.portalRoot&&this.portalRoot.removeChild(this.el)},t.prototype.render=function(){return al.createPortal(this.props.children,this.el)},t})(y.Component),a2="[tabindex], a, button, input, select, textarea",c2=function(e){return(e instanceof HTMLAnchorElement||!e.disabled)&&e.tabIndex!==-1},jd=(function(e){Bt(t,e);function t(r){var n=e.call(this,r)||this;return n.getTabChildren=function(){var o;return Array.prototype.slice.call((o=n.tabLoopRef.current)===null||o===void 0?void 0:o.querySelectorAll(a2),1,-1).filter(c2)},n.handleFocusStart=function(){var o=n.getTabChildren();o&&o.length>1&&o[o.length-1].focus()},n.handleFocusEnd=function(){var o=n.getTabChildren();o&&o.length>1&&o[0].focus()},n.tabLoopRef=y.createRef(),n}return t.prototype.render=function(){var r;return((r=this.props.enableTabLoop)!==null&&r!==void 0?r:t.defaultProps.enableTabLoop)?y.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},y.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,y.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},t.defaultProps={enableTabLoop:!0},t})(y.Component);function l2(e){function t(r){var n,o=typeof r.hidePopper=="boolean"?r.hidePopper:!0,s=y.useRef(null),i=yb(Be({open:!o,whileElementsMounted:Gy,placement:r.popperPlacement,middleware:jr([ob({padding:15}),nb(10),sb({element:s})],(n=r.popperModifiers)!==null&&n!==void 0?n:[],!0)},r.popperProps)),a=Be(Be({},r),{hidePopper:o,popperProps:Be(Be({},i),{arrowRef:s})});return y.createElement(e,Be({},a))}return t.displayName="withFloating(".concat(e.displayName||e.name||"Component",")"),t}var u2=function(e){var t=e.className,r=e.wrapperClassName,n=e.hidePopper,o=n===void 0?!0:n,s=e.popperComponent,i=e.targetComponent,a=e.enableTabLoop,c=e.popperOnKeyDown,l=e.portalId,d=e.portalHost,f=e.popperProps,p=e.showArrow,m=void 0;if(!o){var v=Lt("react-datepicker-popper",t);m=y.createElement(jd,{enableTabLoop:a},y.createElement("div",{ref:f.refs.setFloating,style:f.floatingStyles,className:v,"data-placement":f.placement,onKeyDown:c},s,p&&y.createElement(db,{ref:f.arrowRef,context:f.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}e.popperContainer&&(m=y.createElement(e.popperContainer,{},m)),l&&!o&&(m=y.createElement(Od,{portalId:l,portalHost:d},m));var h=Lt("react-datepicker-wrapper",r);return y.createElement(y.Fragment,null,y.createElement("div",{ref:f.refs.setReference,className:h},i),m)},d2=l2(u2);function f2(e,t){return e&&t?_.getMonth(e)!==_.getMonth(t)||_.getYear(e)!==_.getYear(t):e!==t}var ec="Date input not valid.",p2=(function(e){Bt(t,e);function t(r){var n=e.call(this,r)||this;return n.calendar=null,n.input=null,n.getPreSelection=function(){return n.props.openToDate?n.props.openToDate:n.props.selectsEnd&&n.props.startDate?n.props.startDate:n.props.selectsStart&&n.props.endDate?n.props.endDate:et()},n.modifyHolidays=function(){var o;return(o=n.props.holidays)===null||o===void 0?void 0:o.reduce(function(s,i){var a=new Date(i.date);return ri(a)?jr(jr([],s,!0),[Be(Be({},i),{date:a})],!1):s},[])},n.calcInitialState=function(){var o,s=n.getPreSelection(),i=Sd(n.props),a=Cd(n.props),c=i&&_.isBefore(s,ni(i))?i:a&&_.isAfter(s,pd(a))?a:s;return{open:n.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:(o=n.props.selectsRange?n.props.startDate:n.props.selected)!==null&&o!==void 0?o:c,highlightDates:Ed(n.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},n.getInputValue=function(){var o,s=n.props,i=s.locale,a=s.startDate,c=s.endDate,l=s.rangeSeparator,d=s.selected,f=s.selectedDates,p=s.selectsMultiple,m=s.selectsRange,v=s.value,h=(o=n.props.dateFormat)!==null&&o!==void 0?o:t.defaultProps.dateFormat,b=n.state.inputValue;return typeof v=="string"?v:typeof b=="string"?b:m?xb(a,c,{dateFormat:h,locale:i,rangeSeparator:l}):p?wb(f??[],{dateFormat:h,locale:i}):pr(d,{dateFormat:h,locale:i})},n.resetHiddenStatus=function(){n.setState(Be(Be({},n.state),{wasHidden:!1}))},n.setHiddenStatus=function(){n.setState(Be(Be({},n.state),{wasHidden:!0}))},n.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&n.setHiddenStatus()},n.clearPreventFocusTimeout=function(){n.preventFocusTimeout&&clearTimeout(n.preventFocusTimeout)},n.setFocus=function(){var o,s;(s=(o=n.input)===null||o===void 0?void 0:o.focus)===null||s===void 0||s.call(o,{preventScroll:!0})},n.setBlur=function(){var o,s;(s=(o=n.input)===null||o===void 0?void 0:o.blur)===null||s===void 0||s.call(o),n.cancelFocusInput()},n.deferBlur=function(){requestAnimationFrame(function(){n.setBlur()})},n.setOpen=function(o,s){s===void 0&&(s=!1),n.setState({open:o,preSelection:o&&n.state.open?n.state.preSelection:n.calcInitialState().preSelection,lastPreSelectChange:tc},function(){o||n.setState(function(i){return{focused:s?i.focused:!1}},function(){!s&&n.deferBlur(),n.setState({inputValue:null})})})},n.inputOk=function(){return _.isDate(n.state.preSelection)},n.isCalendarOpen=function(){return n.props.open===void 0?n.state.open&&!n.props.disabled&&!n.props.readOnly:n.props.open},n.handleFocus=function(o){var s,i,a=n.state.wasHidden,c=a?n.state.open:!0;a&&n.resetHiddenStatus(),n.state.preventFocus||((i=(s=n.props).onFocus)===null||i===void 0||i.call(s,o),c&&!n.props.preventOpenOnFocus&&!n.props.readOnly&&n.setOpen(!0)),n.setState({focused:!0})},n.sendFocusBackToInput=function(){n.preventFocusTimeout&&n.clearPreventFocusTimeout(),n.setState({preventFocus:!0},function(){n.preventFocusTimeout=setTimeout(function(){n.setFocus(),n.setState({preventFocus:!1})})})},n.cancelFocusInput=function(){clearTimeout(n.inputFocusTimeout),n.inputFocusTimeout=void 0},n.deferFocusInput=function(){n.cancelFocusInput(),n.inputFocusTimeout=setTimeout(function(){return n.setFocus()},1)},n.handleDropdownFocus=function(){n.cancelFocusInput()},n.resetInputValue=function(){n.setState(Be(Be({},n.state),{inputValue:null}))},n.handleBlur=function(o){var s,i;(!n.state.open||n.props.withPortal||n.props.showTimeInput)&&((i=(s=n.props).onBlur)===null||i===void 0||i.call(s,o)),n.resetInputValue(),n.state.open&&n.props.open===!1&&n.setOpen(!1),n.setState({focused:!1})},n.handleCalendarClickOutside=function(o){var s,i;n.props.inline||n.setOpen(!1),(i=(s=n.props).onClickOutside)===null||i===void 0||i.call(s,o),n.props.withPortal&&o.preventDefault()},n.handleChange=function(){for(var o,s,i,a,c,l=[],d=0;d<arguments.length;d++)l[d]=arguments[d];var f=l[0];if(!(n.props.onChangeRaw&&(n.props.onChangeRaw.apply(n,l),!f||typeof f.isDefaultPrevented!="function"||f.isDefaultPrevented()))){n.setState({inputValue:f?.target instanceof HTMLInputElement?f.target.value:null,lastPreSelectChange:h2});var p=n.props,m=p.selectsRange,v=p.startDate,h=p.endDate,b=(o=n.props.dateFormat)!==null&&o!==void 0?o:t.defaultProps.dateFormat,w=(s=n.props.strictParsing)!==null&&s!==void 0?s:t.defaultProps.strictParsing,S=f?.target instanceof HTMLInputElement?f.target.value:"";if(m){var k=n.props.rangeSeparator,C=k.trim(),x=S.split(b.includes(C)?k:C,2).map(function(V){return V.trim()}),H=x[0],E=x[1],I=qa(H??"",b,n.props.locale,w),P=I?qa(E??"",b,n.props.locale,w):null,A=v?.getTime()!==I?.getTime(),Y=h?.getTime()!==P?.getTime();if(!A&&!Y||I&&hr(I,n.props)||P&&hr(P,n.props))return;(a=(i=n.props).onChange)===null||a===void 0||a.call(i,[I,P],f)}else{var Z=qa(S,b,n.props.locale,w,(c=n.props.selected)!==null&&c!==void 0?c:void 0);(Z||!S)&&n.setSelected(Z,f,!0)}}},n.handleSelect=function(o,s,i){if(!n.props.readOnly){var a=n.props,c=a.selectsRange,l=a.startDate,d=a.endDate,f=a.swapRange,p=!c||l&&!d&&(f||!Xa(o,l));n.props.shouldCloseOnSelect&&!n.props.showTimeSelect&&p&&n.sendFocusBackToInput(),n.props.onChangeRaw&&n.props.onChangeRaw(s),n.setSelected(o,s,!1,i),n.props.showDateSelect&&n.setState({isRenderAriaLiveMessage:!0}),!n.props.shouldCloseOnSelect||n.props.showTimeSelect?n.setPreSelection(o):p&&n.setOpen(!1)}},n.setSelected=function(o,s,i,a){var c,l,d=o;if(n.props.showYearPicker){if(d!==null&&ci(_.getYear(d),n.props))return}else if(n.props.showMonthYearPicker){if(d!==null&&md(d,n.props))return}else if(d!==null&&hr(d,n.props))return;var f=n.props,p=f.onChange,m=f.selectsRange,v=f.startDate,h=f.endDate,b=f.selectsMultiple,w=f.selectedDates,S=f.minTime,k=f.swapRange;if(!pn(n.props.selected,d)||n.props.allowSameDay||m||b)if(d!==null&&(n.props.selected&&(!i||!n.props.showTimeSelect&&!n.props.showTimeSelectOnly&&!n.props.showTimeInput)&&(d=Za(d,{hour:_.getHours(n.props.selected),minute:_.getMinutes(n.props.selected),second:_.getSeconds(n.props.selected)})),!i&&(n.props.showTimeSelect||n.props.showTimeSelectOnly)&&S&&(d=Za(d,{hour:S.getHours(),minute:S.getMinutes(),second:S.getSeconds()})),n.props.inline||n.setState({preSelection:d}),n.props.focusSelectedMonth||n.setState({monthSelectedIn:a})),m){var C=!v&&!h,x=v&&!h,H=!v&&!!h,E=v&&h;C?p?.([d,null],s):x?d===null?p?.([null,null],s):Xa(d,v)?p?.(k?[d,v]:[d,null],s):p?.([v,d],s):H&&(d&&Xa(d,h)?p?.([d,h],s):p?.([d,null],s)),E&&p?.([d,null],s)}else if(b){if(d!==null)if(!w?.length)p?.([d],s);else{var I=w.some(function(A){return Fe(A,d)});if(I){var P=w.filter(function(A){return!Fe(A,d)});p?.(P,s)}else p?.(jr(jr([],w,!0),[d],!1),s)}}else p?.(d,s);i||((l=(c=n.props).onSelect)===null||l===void 0||l.call(c,d,s),n.setState({inputValue:null}))},n.setPreSelection=function(o){if(!n.props.readOnly){var s=_.isDate(n.props.minDate),i=_.isDate(n.props.maxDate),a=!0;if(o){var c=ni(o);if(s&&i)a=hn(o,n.props.minDate,n.props.maxDate);else if(s){var l=ni(n.props.minDate);a=_.isAfter(o,l)||pn(c,l)}else if(i){var d=pd(n.props.maxDate);a=_.isBefore(o,d)||pn(c,d)}}a&&n.setState({preSelection:o})}},n.toggleCalendar=function(){n.setOpen(!n.state.open)},n.handleTimeChange=function(o){var s,i;if(!(n.props.selectsRange||n.props.selectsMultiple)){var a=n.props.selected?n.props.selected:n.getPreSelection(),c=n.props.selected?o:Za(a,{hour:_.getHours(o),minute:_.getMinutes(o)});n.setState({preSelection:c}),(i=(s=n.props).onChange)===null||i===void 0||i.call(s,c),n.props.shouldCloseOnSelect&&!n.props.showTimeInput&&(n.sendFocusBackToInput(),n.setOpen(!1)),n.props.showTimeInput&&n.setOpen(!0),(n.props.showTimeSelectOnly||n.props.showTimeSelect)&&n.setState({isRenderAriaLiveMessage:!0}),n.setState({inputValue:null})}},n.onInputClick=function(){var o,s;!n.props.disabled&&!n.props.readOnly&&n.setOpen(!0),(s=(o=n.props).onInputClick)===null||s===void 0||s.call(o)},n.onInputKeyDown=function(o){var s,i,a,c,l,d;(i=(s=n.props).onKeyDown)===null||i===void 0||i.call(s,o);var f=o.key;if(!n.state.open&&!n.props.inline&&!n.props.preventOpenOnFocus){(f===ye.ArrowDown||f===ye.ArrowUp||f===ye.Enter)&&((a=n.onInputClick)===null||a===void 0||a.call(n));return}if(n.state.open){if(f===ye.ArrowDown||f===ye.ArrowUp){o.preventDefault();var p=n.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":n.props.showWeekPicker&&n.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':n.props.showFullMonthYearPicker||n.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',m=((c=n.calendar)===null||c===void 0?void 0:c.containerRef.current)instanceof Element&&n.calendar.containerRef.current.querySelector(p);m instanceof HTMLElement&&m.focus({preventScroll:!0});return}var v=et(n.state.preSelection);f===ye.Enter?(o.preventDefault(),o.target.blur(),n.inputOk()&&n.state.lastPreSelectChange===tc?(n.handleSelect(v,o),!n.props.shouldCloseOnSelect&&n.setPreSelection(v)):n.setOpen(!1)):f===ye.Escape?(o.preventDefault(),o.target.blur(),n.sendFocusBackToInput(),n.setOpen(!1)):f===ye.Tab&&n.setOpen(!1),n.inputOk()||(d=(l=n.props).onInputError)===null||d===void 0||d.call(l,{code:1,msg:ec})}},n.onPortalKeyDown=function(o){var s=o.key;s===ye.Escape&&(o.preventDefault(),n.setState({preventFocus:!0},function(){n.setOpen(!1),setTimeout(function(){n.setFocus(),n.setState({preventFocus:!1})})}))},n.onDayKeyDown=function(o){var s,i,a,c,l,d,f=n.props,p=f.minDate,m=f.maxDate,v=f.disabledKeyboardNavigation,h=f.showWeekPicker,b=f.shouldCloseOnSelect,w=f.locale,S=f.calendarStartDay,k=f.adjustDateOnChange,C=f.inline;if((i=(s=n.props).onKeyDown)===null||i===void 0||i.call(s,o),!v){var x=o.key,H=o.shiftKey,E=et(n.state.preSelection),I=function(le,R){var X=R;switch(le){case ye.ArrowRight:X=h?_.addWeeks(R,1):_.addDays(R,1);break;case ye.ArrowLeft:X=h?_.subWeeks(R,1):_.subDays(R,1);break;case ye.ArrowUp:X=_.subWeeks(R,1);break;case ye.ArrowDown:X=_.addWeeks(R,1);break;case ye.PageUp:X=H?_.subYears(R,1):_.subMonths(R,1);break;case ye.PageDown:X=H?_.addYears(R,1):_.addMonths(R,1);break;case ye.Home:X=Xr(R,w,S);break;case ye.End:X=Eb(R);break}return X},P=function(le,R){for(var X=40,re=le,ve=!1,L=0,ee=I(le,R);!ve;){if(L>=X){ee=R;break}p&&ee<p&&(re=ye.ArrowRight,ee=hr(p,n.props)?I(re,ee):p),m&&ee>m&&(re=ye.ArrowLeft,ee=hr(m,n.props)?I(re,ee):m),hr(ee,n.props)?((re===ye.PageUp||re===ye.Home)&&(re=ye.ArrowRight),(re===ye.PageDown||re===ye.End)&&(re=ye.ArrowLeft),ee=I(re,ee)):ve=!0,L++}return ee};if(x===ye.Enter){o.preventDefault(),n.handleSelect(E,o),!b&&n.setPreSelection(E);return}else if(x===ye.Escape){o.preventDefault(),n.setOpen(!1),n.inputOk()||(c=(a=n.props).onInputError)===null||c===void 0||c.call(a,{code:1,msg:ec});return}var A=null;switch(x){case ye.ArrowLeft:case ye.ArrowRight:case ye.ArrowUp:case ye.ArrowDown:case ye.PageUp:case ye.PageDown:case ye.Home:case ye.End:A=P(x,E);break}if(!A){(d=(l=n.props).onInputError)===null||d===void 0||d.call(l,{code:1,msg:ec});return}if(o.preventDefault(),n.setState({lastPreSelectChange:tc}),k&&n.setSelected(A),n.setPreSelection(A),C){var Y=_.getMonth(E),Z=_.getMonth(A),V=_.getYear(E),W=_.getYear(A);Y!==Z||V!==W?n.setState({shouldFocusDayInline:!0}):n.setState({shouldFocusDayInline:!1})}}},n.onPopperKeyDown=function(o){var s=o.key;s===ye.Escape&&(o.preventDefault(),n.sendFocusBackToInput(),n.setOpen(!1))},n.onClearClick=function(o){o&&o.preventDefault&&o.preventDefault(),n.sendFocusBackToInput();var s=n.props,i=s.selectsRange,a=s.onChange;a?.(i?[null,null]:null,o),n.setState({inputValue:null})},n.clear=function(){n.onClearClick()},n.onScroll=function(o){typeof n.props.closeOnScroll=="boolean"&&n.props.closeOnScroll?(o.target===document||o.target===document.documentElement||o.target===document.body)&&n.setOpen(!1):typeof n.props.closeOnScroll=="function"&&n.props.closeOnScroll(o)&&n.setOpen(!1)},n.renderCalendar=function(){var o,s;return!n.props.inline&&!n.isCalendarOpen()?null:y.createElement(s2,Be({showMonthYearDropdown:void 0,ref:function(i){n.calendar=i}},n.props,n.state,{setOpen:n.setOpen,dateFormat:(o=n.props.dateFormatCalendar)!==null&&o!==void 0?o:t.defaultProps.dateFormatCalendar,onSelect:n.handleSelect,onClickOutside:n.handleCalendarClickOutside,holidays:$b(n.modifyHolidays()),outsideClickIgnoreClass:n.props.outsideClickIgnoreClass,onDropdownFocus:n.handleDropdownFocus,onTimeChange:n.handleTimeChange,className:n.props.calendarClassName,container:n.props.calendarContainer,handleOnKeyDown:n.props.onKeyDown,handleOnDayKeyDown:n.onDayKeyDown,setPreSelection:n.setPreSelection,dropdownMode:(s=n.props.dropdownMode)!==null&&s!==void 0?s:t.defaultProps.dropdownMode}),n.props.children)},n.renderAriaLiveRegion=function(){var o,s=n.props.locale,i=(o=n.props.dateFormat)!==null&&o!==void 0?o:t.defaultProps.dateFormat,a=n.props.showTimeInput||n.props.showTimeSelect,c=a?"PPPPp":"PPPP",l;return n.props.selectsRange?l="Selected start date: ".concat(pr(n.props.startDate,{dateFormat:c,locale:s}),". ").concat(n.props.endDate?"End date: "+pr(n.props.endDate,{dateFormat:c,locale:s}):""):n.props.showTimeSelectOnly?l="Selected time: ".concat(pr(n.props.selected,{dateFormat:i,locale:s})):n.props.showYearPicker?l="Selected year: ".concat(pr(n.props.selected,{dateFormat:"yyyy",locale:s})):n.props.showMonthYearPicker?l="Selected month: ".concat(pr(n.props.selected,{dateFormat:"MMMM yyyy",locale:s})):n.props.showQuarterYearPicker?l="Selected quarter: ".concat(pr(n.props.selected,{dateFormat:"yyyy, QQQ",locale:s})):l="Selected date: ".concat(pr(n.props.selected,{dateFormat:c,locale:s})),y.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},l)},n.renderDateInput=function(){var o,s,i=Lt(n.props.className,(o={},o[n.props.outsideClickIgnoreClass||t.defaultProps.outsideClickIgnoreClass]=n.state.open,o)),a=n.props.customInput||y.createElement("input",{type:"text"}),c=n.props.customInputRef||"ref";return y.cloneElement(a,(s={},s[c]=function(l){n.input=l},s.value=n.getInputValue(),s.onBlur=n.handleBlur,s.onChange=n.handleChange,s.onClick=n.onInputClick,s.onFocus=n.handleFocus,s.onKeyDown=n.onInputKeyDown,s.id=n.props.id,s.name=n.props.name,s.form=n.props.form,s.autoFocus=n.props.autoFocus,s.placeholder=n.props.placeholderText,s.disabled=n.props.disabled,s.autoComplete=n.props.autoComplete,s.className=Lt(a.props.className,i),s.title=n.props.title,s.readOnly=n.props.readOnly,s.required=n.props.required,s.tabIndex=n.props.tabIndex,s["aria-describedby"]=n.props.ariaDescribedBy,s["aria-invalid"]=n.props.ariaInvalid,s["aria-labelledby"]=n.props.ariaLabelledBy,s["aria-required"]=n.props.ariaRequired,s))},n.renderClearButton=function(){var o=n.props,s=o.isClearable,i=o.disabled,a=o.selected,c=o.startDate,l=o.endDate,d=o.clearButtonTitle,f=o.clearButtonClassName,p=f===void 0?"":f,m=o.ariaLabelClose,v=m===void 0?"Close":m,h=o.selectedDates,b=o.readOnly;return s&&!b&&(a!=null||c!=null||l!=null||h?.length)?y.createElement("button",{type:"button",className:Lt("react-datepicker__close-icon",p,{"react-datepicker__close-icon--disabled":i}),disabled:i,"aria-label":v,onClick:n.onClearClick,title:d,tabIndex:-1}):null},n.state=n.calcInitialState(),n.preventFocusTimeout=void 0,n}return Object.defineProperty(t,"defaultProps",{get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",preventOpenOnFocus:!1,monthsShown:1,outsideClickIgnoreClass:Pd,readOnly:!1,rangeSeparator:ud,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,showWeekPicker:!1,strictParsing:!1,swapRange:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:_o,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1,usePointerEvent:!1}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){window.addEventListener("scroll",this.onScroll,!0),document.addEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},t.prototype.componentDidUpdate=function(r,n){var o,s,i,a;r.inline&&f2(r.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&r.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),r.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:Ed(this.props.highlightDates)}),!n.focused&&!pn(r.selected,this.props.selected)&&this.setState({inputValue:null}),n.open!==this.state.open&&(n.open===!1&&this.state.open===!0&&((s=(o=this.props).onCalendarOpen)===null||s===void 0||s.call(o)),n.open===!0&&this.state.open===!1&&((a=(i=this.props).onCalendarClose)===null||a===void 0||a.call(i)))},t.prototype.componentWillUnmount=function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0),document.removeEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},t.prototype.renderInputContainer=function(){var r=this.props,n=r.showIcon,o=r.icon,s=r.calendarIconClassname,i=r.calendarIconClassName,a=r.toggleCalendarOnIconClick,c=this.state.open;return s&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),y.createElement("div",{className:"react-datepicker__input-container".concat(n?" react-datepicker__view-calendar-icon":"")},n&&y.createElement(i2,Be({icon:o,className:Lt(i,!i&&s,c&&"react-datepicker-ignore-onclickoutside")},a?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())},t.prototype.render=function(){var r=this.renderCalendar();if(this.props.inline)return r;if(this.props.withPortal){var n=this.state.open?y.createElement(jd,{enableTabLoop:this.props.enableTabLoop},y.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},r)):null;return this.state.open&&this.props.portalId&&(n=y.createElement(Od,Be({portalId:this.props.portalId},this.props),n)),y.createElement("div",null,this.renderInputContainer(),n)}return y.createElement(d2,Be({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:r,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},t})(y.Component),h2="input",tc="navigate";const m2="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23333'%20d='M2.999%208.611a1.1%201.1%200%200%201%20.33-.786%201.135%201.135%200%200%201%201.591%200l7.079%206.993%207.079-6.993a1.135%201.135%200%200%201%201.837.36%201.1%201.1%200%200%201-.246%201.215l-7.87%207.775a1.135%201.135%200%200%201-1.591%200L3.328%209.4a1.1%201.1%200%200%201-.329-.789'/%3e%3c/svg%3e",g2="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23333'%20d='M15.39%2021a1.1%201.1%200%200%200%20.785-.33%201.135%201.135%200%200%200%200-1.591L9.182%2012l6.993-7.08a1.135%201.135%200%200%200-.36-1.835%201.1%201.1%200%200%200-1.21.244L6.824%2011.2a1.135%201.135%200%200%200%200%201.591L14.6%2020.67a1.1%201.1%200%200%200%20.79.33'/%3e%3c/svg%3e",v2="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23333'%20d='M8.61%203a1.1%201.1%200%200%200-.785.33%201.135%201.135%200%200%200%200%201.591L14.818%2012l-6.993%207.08a1.135%201.135%200%200%200%20.36%201.835%201.1%201.1%200%200%200%201.21-.244l7.78-7.871a1.135%201.135%200%200%200%200-1.591L9.4%203.33A1.1%201.1%200%200%200%208.61%203'/%3e%3c/svg%3e",Rd="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cg%20fill='%23fff'%20clip-path='url(%23a)'%3e%3cpath%20d='M13.085%207.331a1.096%201.096%200%201%200-2.192%200v9.316a1.096%201.096%200%200%200%202.192%200z'/%3e%3cpath%20d='M16.647%2010.893H7.33a1.096%201.096%200%201%200%200%202.192h9.316a1.096%201.096%200%200%200%200-2.192'/%3e%3cpath%20d='M12%2024C5.38%2024%200%2018.608%200%2012S5.38%200%2012%200s12%205.38%2012%2012-5.38%2012-12%2012m0-21.808c-5.414%200-9.808%204.394-9.808%209.808S6.586%2021.808%2012%2021.808s9.808-4.394%209.808-9.808S17.403%202.192%2012%202.192'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='%23fff'%20d='M0%200h24v24H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",y2=y.forwardRef(({value:e,onClick:t},r)=>u.jsxs("button",{className:ln.datePickerButton,onClick:t,ref:r,children:[e,u.jsx("img",{src:m2,style:{marginLeft:10}})]})),b2=({currentDate:e,onPrevMonth:t,onNextMonth:r,onAddEvent:n,onDateChange:o})=>u.jsxs("div",{className:ln.headerContainer,children:[u.jsxs("div",{className:ln.navAndDate,children:[u.jsx("button",{className:ln.navButton,onClick:t,children:u.jsx("img",{src:g2,width:15})}),u.jsx("button",{className:ln.navButton,onClick:r,children:u.jsx("img",{src:v2,width:15})}),u.jsx(p2,{selected:e,onChange:s=>o(s),dateFormat:"MMMM yyyy",showMonthYearPicker:!0,className:ln.datePickerInput,locale:"es",customInput:u.jsx(y2,{})})]}),u.jsxs("button",{className:ln.addEventButton,onClick:n,children:[u.jsx("img",{src:Rd}),"Agregar evento"]})]}),we={sidebarContainer:"_sidebarContainer_17hsh_1",leadsSection:"_leadsSection_17hsh_17",leadCard:"_leadCard_17hsh_33",leadIcon:"_leadIcon_17hsh_71",leadDays:"_leadDays_17hsh_81",leadCount:"_leadCount_17hsh_91",eventsSection:"_eventsSection_17hsh_103",eventGroup:"_eventGroup_17hsh_143",eventGroupDate:"_eventGroupDate_17hsh_151",eventItem:"_eventItem_17hsh_163",eventDetails:"_eventDetails_17hsh_195",eventTitle:"_eventTitle_17hsh_209",eventTime:"_eventTime_17hsh_231",calendarsSection:"_calendarsSection_17hsh_253",collapsibleHeader:"_collapsibleHeader_17hsh_269",headerTitle:"_headerTitle_17hsh_297",calendarCount:"_calendarCount_17hsh_311",chevronIcon:"_chevronIcon_17hsh_329",collapsed:"_collapsed_17hsh_337",collapsibleContent:"_collapsibleContent_17hsh_345",hidden:"_hidden_17hsh_361",circularCheckbox:"_circularCheckbox_17hsh_379",checkedIcon:"_checkedIcon_17hsh_397",calendarIcon:"_calendarIcon_17hsh_413",syncButton:"_syncButton_17hsh_429",eventsContainer:"_eventsContainer_17hsh_481",calendarsList:"_calendarsList_17hsh_555",calendarItemText:"_calendarItemText_17hsh_613",tabsContainer:"_tabsContainer_17hsh_639",tabButton:"_tabButton_17hsh_657",activeTab:"_activeTab_17hsh_695",alertBadge:"_alertBadge_17hsh_709",emptyStateContainer:"_emptyStateContainer_17hsh_737",emptyStateImage:"_emptyStateImage_17hsh_755",emptyStateTitle:"_emptyStateTitle_17hsh_767",emptyStateText:"_emptyStateText_17hsh_781",addEventButton:"_addEventButton_17hsh_793",customCheckIcon:"_customCheckIcon_17hsh_847",uncheckedCircle:"_uncheckedCircle_17hsh_863",calendarSelectButton:"_calendarSelectButton_17hsh_877",calendarSelected:"_calendarSelected_17hsh_929",currentUserCalendarTitle:"_currentUserCalendarTitle_17hsh_949"};/**
116
116
  * @license lucide-react v0.540.0 - ISC
117
117
  *
118
118
  * This source code is licensed under the ISC license.
119
119
  * See the LICENSE file in the root directory of this source tree.
120
- */const y2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),b2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),Rd=e=>{const t=b2(e);return t.charAt(0).toUpperCase()+t.slice(1)},Nd=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),_2=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
120
+ */const _2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),x2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),Nd=e=>{const t=x2(e);return t.charAt(0).toUpperCase()+t.slice(1)},$d=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),w2=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
121
121
  * @license lucide-react v0.540.0 - ISC
122
122
  *
123
123
  * This source code is licensed under the ISC license.
124
124
  * See the LICENSE file in the root directory of this source tree.
125
- */var x2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
125
+ */var S2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
126
126
  * @license lucide-react v0.540.0 - ISC
127
127
  *
128
128
  * This source code is licensed under the ISC license.
129
129
  * See the LICENSE file in the root directory of this source tree.
130
- */const w2=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:s,iconNode:i,...a},c)=>v.createElement("svg",{ref:c,...x2,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Nd("lucide",o),...!s&&!_2(a)&&{"aria-hidden":"true"},...a},[...i.map(([l,d])=>v.createElement(l,d)),...Array.isArray(s)?s:[s]]));/**
130
+ */const C2=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:s,iconNode:i,...a},c)=>y.createElement("svg",{ref:c,...S2,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:$d("lucide",o),...!s&&!w2(a)&&{"aria-hidden":"true"},...a},[...i.map(([l,d])=>y.createElement(l,d)),...Array.isArray(s)?s:[s]]));/**
131
131
  * @license lucide-react v0.540.0 - ISC
132
132
  *
133
133
  * This source code is licensed under the ISC license.
134
134
  * See the LICENSE file in the root directory of this source tree.
135
- */const ui=(e,t)=>{const r=v.forwardRef(({className:n,...o},s)=>v.createElement(w2,{ref:s,iconNode:t,className:Nd(`lucide-${y2(Rd(e))}`,`lucide-${e}`,n),...o}));return r.displayName=Rd(e),r};/**
135
+ */const di=(e,t)=>{const r=y.forwardRef(({className:n,...o},s)=>y.createElement(C2,{ref:s,iconNode:t,className:$d(`lucide-${_2(Nd(e))}`,`lucide-${e}`,n),...o}));return r.displayName=Nd(e),r};/**
136
136
  * @license lucide-react v0.540.0 - ISC
137
137
  *
138
138
  * This source code is licensed under the ISC license.
139
139
  * See the LICENSE file in the root directory of this source tree.
140
- */const S2=ui("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
140
+ */const E2=di("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
141
141
  * @license lucide-react v0.540.0 - ISC
142
142
  *
143
143
  * This source code is licensed under the ISC license.
144
144
  * See the LICENSE file in the root directory of this source tree.
145
- */const C2=ui("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
145
+ */const D2=di("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
146
146
  * @license lucide-react v0.540.0 - ISC
147
147
  *
148
148
  * This source code is licensed under the ISC license.
149
149
  * See the LICENSE file in the root directory of this source tree.
150
- */const ec=ui("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
150
+ */const rc=di("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
151
151
  * @license lucide-react v0.540.0 - ISC
152
152
  *
153
153
  * This source code is licensed under the ISC license.
154
154
  * See the LICENSE file in the root directory of this source tree.
155
- */const E2=ui("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),$d=Symbol.for("constructDateFrom");function tc(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&$d in e?e[$d](t):e instanceof Date?new e.constructor(t):new Date(t)}function Jr(e,t){return tc(t||e,e)}function Ld(e,t,r){const[n,o]=[+Jr(e.start,r?.in),+Jr(e.end,r?.in)].sort((a,c)=>a-c),[s,i]=[+Jr(t.start,r?.in),+Jr(t.end,r?.in)].sort((a,c)=>a-c);return n<i&&s<o}function di(e){"@babel/helpers - typeof";return di=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},di(e)}var k2=/^\s+/,D2=/\s+$/;function Ce(e,t){if(e=e||"",t=t||{},e instanceof Ce)return e;if(!(this instanceof Ce))return new Ce(e,t);var r=T2(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}Ce.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),r,n,o,s,i,a;return r=t.r/255,n=t.g/255,o=t.b/255,r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),n<=.03928?i=n/12.92:i=Math.pow((n+.055)/1.055,2.4),o<=.03928?a=o/12.92:a=Math.pow((o+.055)/1.055,2.4),.2126*s+.7152*i+.0722*a},setAlpha:function(t){return this._a=Wd(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=Bd(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=Bd(this._r,this._g,this._b),r=Math.round(t.h*360),n=Math.round(t.s*100),o=Math.round(t.v*100);return this._a==1?"hsv("+r+", "+n+"%, "+o+"%)":"hsva("+r+", "+n+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var t=zd(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=zd(this._r,this._g,this._b),r=Math.round(t.h*360),n=Math.round(t.s*100),o=Math.round(t.l*100);return this._a==1?"hsl("+r+", "+n+"%, "+o+"%)":"hsla("+r+", "+n+"%, "+o+"%, "+this._roundA+")"},toHex:function(t){return Fd(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return P2(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(vt(this._r,255)*100)+"%",g:Math.round(vt(this._g,255)*100)+"%",b:Math.round(vt(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(vt(this._r,255)*100)+"%, "+Math.round(vt(this._g,255)*100)+"%, "+Math.round(vt(this._b,255)*100)+"%)":"rgba("+Math.round(vt(this._r,255)*100)+"%, "+Math.round(vt(this._g,255)*100)+"%, "+Math.round(vt(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:W2[Fd(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var r="#"+Vd(this._r,this._g,this._b,this._a),n=r,o=this._gradientType?"GradientType = 1, ":"";if(t){var s=Ce(t);n="#"+Vd(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+r+",endColorstr="+n+")"},toString:function(t){var r=!!t;t=t||this._format;var n=!1,o=this._a<1&&this._a>=0,s=!r&&o&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return s?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return Ce(this.toString())},_applyModification:function(t,r){var n=t.apply(null,[this].concat([].slice.call(r)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(N2,arguments)},brighten:function(){return this._applyModification($2,arguments)},darken:function(){return this._applyModification(L2,arguments)},desaturate:function(){return this._applyModification(O2,arguments)},saturate:function(){return this._applyModification(j2,arguments)},greyscale:function(){return this._applyModification(R2,arguments)},spin:function(){return this._applyModification(z2,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(V2,arguments)},complement:function(){return this._applyCombination(B2,arguments)},monochromatic:function(){return this._applyCombination(U2,arguments)},splitcomplement:function(){return this._applyCombination(F2,arguments)},triad:function(){return this._applyCombination(Ud,[3])},tetrad:function(){return this._applyCombination(Ud,[4])}},Ce.fromRatio=function(e,t){if(di(e)=="object"){var r={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?r[n]=e[n]:r[n]=So(e[n]));e=r}return Ce(e,t)};function T2(e){var t={r:0,g:0,b:0},r=1,n=null,o=null,s=null,i=!1,a=!1;return typeof e=="string"&&(e=Z2(e)),di(e)=="object"&&(Vr(e.r)&&Vr(e.g)&&Vr(e.b)?(t=I2(e.r,e.g,e.b),i=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Vr(e.h)&&Vr(e.s)&&Vr(e.v)?(n=So(e.s),o=So(e.v),t=M2(e.h,n,o),i=!0,a="hsv"):Vr(e.h)&&Vr(e.s)&&Vr(e.l)&&(n=So(e.s),s=So(e.l),t=A2(e.h,n,s),i=!0,a="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=Wd(r),{ok:i,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function I2(e,t,r){return{r:vt(e,255)*255,g:vt(t,255)*255,b:vt(r,255)*255}}function zd(e,t,r){e=vt(e,255),t=vt(t,255),r=vt(r,255);var n=Math.max(e,t,r),o=Math.min(e,t,r),s,i,a=(n+o)/2;if(n==o)s=i=0;else{var c=n-o;switch(i=a>.5?c/(2-n-o):c/(n+o),n){case e:s=(t-r)/c+(t<r?6:0);break;case t:s=(r-e)/c+2;break;case r:s=(e-t)/c+4;break}s/=6}return{h:s,s:i,l:a}}function A2(e,t,r){var n,o,s;e=vt(e,360),t=vt(t,100),r=vt(r,100);function i(l,d,f){return f<0&&(f+=1),f>1&&(f-=1),f<1/6?l+(d-l)*6*f:f<1/2?d:f<2/3?l+(d-l)*(2/3-f)*6:l}if(t===0)n=o=s=r;else{var a=r<.5?r*(1+t):r+t-r*t,c=2*r-a;n=i(c,a,e+1/3),o=i(c,a,e),s=i(c,a,e-1/3)}return{r:n*255,g:o*255,b:s*255}}function Bd(e,t,r){e=vt(e,255),t=vt(t,255),r=vt(r,255);var n=Math.max(e,t,r),o=Math.min(e,t,r),s,i,a=n,c=n-o;if(i=n===0?0:c/n,n==o)s=0;else{switch(n){case e:s=(t-r)/c+(t<r?6:0);break;case t:s=(r-e)/c+2;break;case r:s=(e-t)/c+4;break}s/=6}return{h:s,s:i,v:a}}function M2(e,t,r){e=vt(e,360)*6,t=vt(t,100),r=vt(r,100);var n=Math.floor(e),o=e-n,s=r*(1-t),i=r*(1-o*t),a=r*(1-(1-o)*t),c=n%6,l=[r,i,s,s,a,r][c],d=[a,r,r,i,s,s][c],f=[s,s,a,r,r,i][c];return{r:l*255,g:d*255,b:f*255}}function Fd(e,t,r,n){var o=[yr(Math.round(e).toString(16)),yr(Math.round(t).toString(16)),yr(Math.round(r).toString(16))];return n&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function P2(e,t,r,n,o){var s=[yr(Math.round(e).toString(16)),yr(Math.round(t).toString(16)),yr(Math.round(r).toString(16)),yr(Hd(n))];return o&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function Vd(e,t,r,n){var o=[yr(Hd(n)),yr(Math.round(e).toString(16)),yr(Math.round(t).toString(16)),yr(Math.round(r).toString(16))];return o.join("")}Ce.equals=function(e,t){return!e||!t?!1:Ce(e).toRgbString()==Ce(t).toRgbString()},Ce.random=function(){return Ce.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function O2(e,t){t=t===0?0:t||10;var r=Ce(e).toHsl();return r.s-=t/100,r.s=fi(r.s),Ce(r)}function j2(e,t){t=t===0?0:t||10;var r=Ce(e).toHsl();return r.s+=t/100,r.s=fi(r.s),Ce(r)}function R2(e){return Ce(e).desaturate(100)}function N2(e,t){t=t===0?0:t||10;var r=Ce(e).toHsl();return r.l+=t/100,r.l=fi(r.l),Ce(r)}function $2(e,t){t=t===0?0:t||10;var r=Ce(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),Ce(r)}function L2(e,t){t=t===0?0:t||10;var r=Ce(e).toHsl();return r.l-=t/100,r.l=fi(r.l),Ce(r)}function z2(e,t){var r=Ce(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,Ce(r)}function B2(e){var t=Ce(e).toHsl();return t.h=(t.h+180)%360,Ce(t)}function Ud(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=Ce(e).toHsl(),n=[Ce(e)],o=360/t,s=1;s<t;s++)n.push(Ce({h:(r.h+s*o)%360,s:r.s,l:r.l}));return n}function F2(e){var t=Ce(e).toHsl(),r=t.h;return[Ce(e),Ce({h:(r+72)%360,s:t.s,l:t.l}),Ce({h:(r+216)%360,s:t.s,l:t.l})]}function V2(e,t,r){t=t||6,r=r||30;var n=Ce(e).toHsl(),o=360/r,s=[Ce(e)];for(n.h=(n.h-(o*t>>1)+720)%360;--t;)n.h=(n.h+o)%360,s.push(Ce(n));return s}function U2(e,t){t=t||6;for(var r=Ce(e).toHsv(),n=r.h,o=r.s,s=r.v,i=[],a=1/t;t--;)i.push(Ce({h:n,s:o,v:s})),s=(s+a)%1;return i}Ce.mix=function(e,t,r){r=r===0?0:r||50;var n=Ce(e).toRgb(),o=Ce(t).toRgb(),s=r/100,i={r:(o.r-n.r)*s+n.r,g:(o.g-n.g)*s+n.g,b:(o.b-n.b)*s+n.b,a:(o.a-n.a)*s+n.a};return Ce(i)},Ce.readability=function(e,t){var r=Ce(e),n=Ce(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},Ce.isReadable=function(e,t,r){var n=Ce.readability(e,t),o,s;switch(s=!1,o=G2(r),o.level+o.size){case"AAsmall":case"AAAlarge":s=n>=4.5;break;case"AAlarge":s=n>=3;break;case"AAAsmall":s=n>=7;break}return s},Ce.mostReadable=function(e,t,r){var n=null,o=0,s,i,a,c;r=r||{},i=r.includeFallbackColors,a=r.level,c=r.size;for(var l=0;l<t.length;l++)s=Ce.readability(e,t[l]),s>o&&(o=s,n=Ce(t[l]));return Ce.isReadable(e,n,{level:a,size:c})||!i?n:(r.includeFallbackColors=!1,Ce.mostReadable(e,["#fff","#000"],r))};var rc=Ce.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},W2=Ce.hexNames=H2(rc);function H2(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function Wd(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function vt(e,t){Y2(e)&&(e="100%");var r=q2(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function fi(e){return Math.min(1,Math.max(0,e))}function or(e){return parseInt(e,16)}function Y2(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function q2(e){return typeof e=="string"&&e.indexOf("%")!=-1}function yr(e){return e.length==1?"0"+e:""+e}function So(e){return e<=1&&(e=e*100+"%"),e}function Hd(e){return Math.round(parseFloat(e)*255).toString(16)}function Yd(e){return or(e)/255}var br=(function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",r="(?:"+t+")|(?:"+e+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",o="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function Vr(e){return!!br.CSS_UNIT.exec(e)}function Z2(e){e=e.replace(k2,"").replace(D2,"").toLowerCase();var t=!1;if(rc[e])e=rc[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=br.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=br.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=br.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=br.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=br.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=br.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=br.hex8.exec(e))?{r:or(r[1]),g:or(r[2]),b:or(r[3]),a:Yd(r[4]),format:t?"name":"hex8"}:(r=br.hex6.exec(e))?{r:or(r[1]),g:or(r[2]),b:or(r[3]),format:t?"name":"hex"}:(r=br.hex4.exec(e))?{r:or(r[1]+""+r[1]),g:or(r[2]+""+r[2]),b:or(r[3]+""+r[3]),a:Yd(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=br.hex3.exec(e))?{r:or(r[1]+""+r[1]),g:or(r[2]+""+r[2]),b:or(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function G2(e){var t,r;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:t,size:r}}const qd="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20fill='none'%3e%3cpath%20fill='%23C4D9F5'%20d='M36.667%2020c0%209.205-7.462%2016.667-16.667%2016.667S3.333%2029.205%203.333%2020%2010.795%203.333%2020%203.333%2036.667%2010.795%2036.667%2020'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M20%2012.083c.69%200%201.25.56%201.25%201.25v6.15l3.8%203.8a1.25%201.25%200%201%201-1.767%201.767l-4.167-4.166A1.25%201.25%200%200%201%2018.75%2020v-6.667c0-.69.56-1.25%201.25-1.25'%20clip-rule='evenodd'/%3e%3c/svg%3e",K2="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='23'%20height='24'%20fill='none'%3e%3cpath%20fill='%23333'%20d='M17.614%202.64h-.5v-.622c0-.566-.443-1.018-.998-1.018s-.998.452-.998%201.018v.622H7.893v-.622C7.894%201.452%207.45%201%206.895%201s-.999.452-.999%201.018v.622h-.5C2.946%202.64.959%204.665.959%207.165v11.31c0%202.5%201.987%204.525%204.439%204.525h12.206c2.452%200%204.439-2.025%204.439-4.524V7.165c0-2.5-1.987-4.525-4.439-4.525zm0%2018.098H5.408c-1.22%200-2.22-1.018-2.22-2.262V10.41h16.646v8.065c0%201.244-1%202.262-2.22%202.262'/%3e%3c/svg%3e",Q2="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23404756'%20d='M12.667%204.667a3%203%200%200%201%203%203v8.667a3%203%200%200%201-3%203H4a3%203%200%200%201-3-3V7.667a3%203%200%200%201%203-3zM21.36%206.237a1%201%200%200%201%201.64.77V17a1%201%200%200%201-1.64.768L17%2014.135V9.867z'/%3e%3c/svg%3e",Zd=v.createContext(void 0),X2=({children:e})=>{const[t,r]=v.useState(()=>({userEmail:localStorage.getItem("user_email")||null})),[n,o]=v.useState(()=>({userEmail:localStorage.getItem("user_outlook")||null})),s=v.useCallback(l=>{localStorage.setItem("user_email",l),r({userEmail:l})},[]),i=v.useCallback(l=>{localStorage.setItem("user_outlook",l),o({userEmail:l})},[]),a=v.useCallback(()=>{localStorage.removeItem("user_email"),r({userEmail:null})},[]),c=!!t.userEmail;return u.jsx(Zd.Provider,{value:{session:t,sessionoutlook:n,login:s,loginOutlook:i,logout:a,isAuthenticated:c},children:e})},nc=()=>{const e=v.useContext(Zd);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e};function Gd(e,t){return function(){return e.apply(t,arguments)}}const{toString:J2}=Object.prototype,{getPrototypeOf:oc}=Object,{iterator:pi,toStringTag:Kd}=Symbol,hi=(e=>t=>{const r=J2.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),_r=e=>(e=e.toLowerCase(),t=>hi(t)===e),mi=e=>t=>typeof t===e,{isArray:Bn}=Array,Co=mi("undefined");function Eo(e){return e!==null&&!Co(e)&&e.constructor!==null&&!Co(e.constructor)&&Kt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Qd=_r("ArrayBuffer");function e1(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Qd(e.buffer),t}const t1=mi("string"),Kt=mi("function"),Xd=mi("number"),ko=e=>e!==null&&typeof e=="object",r1=e=>e===!0||e===!1,gi=e=>{if(hi(e)!=="object")return!1;const t=oc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Kd in e)&&!(pi in e)},n1=e=>{if(!ko(e)||Eo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},o1=_r("Date"),s1=_r("File"),i1=_r("Blob"),a1=_r("FileList"),c1=e=>ko(e)&&Kt(e.pipe),l1=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Kt(e.append)&&((t=hi(e))==="formdata"||t==="object"&&Kt(e.toString)&&e.toString()==="[object FormData]"))},u1=_r("URLSearchParams"),[d1,f1,p1,h1]=["ReadableStream","Request","Response","Headers"].map(_r),m1=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Do(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),Bn(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(Eo(e))return;const s=r?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let a;for(n=0;n<i;n++)a=s[n],t.call(null,e[a],a,e)}}function Jd(e,t){if(Eo(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const hn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ef=e=>!Co(e)&&e!==hn;function sc(){const{caseless:e}=ef(this)&&this||{},t={},r=(n,o)=>{const s=e&&Jd(t,o)||o;gi(t[s])&&gi(n)?t[s]=sc(t[s],n):gi(n)?t[s]=sc({},n):Bn(n)?t[s]=n.slice():t[s]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&Do(arguments[n],r);return t}const g1=(e,t,r,{allOwnKeys:n}={})=>(Do(t,(o,s)=>{r&&Kt(o)?e[s]=Gd(o,r):e[s]=o},{allOwnKeys:n}),e),v1=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),y1=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},b1=(e,t,r,n)=>{let o,s,i;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!n||n(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=r!==!1&&oc(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},_1=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},x1=e=>{if(!e)return null;if(Bn(e))return e;let t=e.length;if(!Xd(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},w1=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&oc(Uint8Array)),S1=(e,t)=>{const n=(e&&e[pi]).call(e);let o;for(;(o=n.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},C1=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},E1=_r("HTMLFormElement"),k1=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),tf=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),D1=_r("RegExp"),rf=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Do(r,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(n[s]=i||o)}),Object.defineProperties(e,n)},T1=e=>{rf(e,(t,r)=>{if(Kt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(Kt(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},I1=(e,t)=>{const r={},n=o=>{o.forEach(s=>{r[s]=!0})};return Bn(e)?n(e):n(String(e).split(t)),r},A1=()=>{},M1=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function P1(e){return!!(e&&Kt(e.append)&&e[Kd]==="FormData"&&e[pi])}const O1=e=>{const t=new Array(10),r=(n,o)=>{if(ko(n)){if(t.indexOf(n)>=0)return;if(Eo(n))return n;if(!("toJSON"in n)){t[o]=n;const s=Bn(n)?[]:{};return Do(n,(i,a)=>{const c=r(i,o+1);!Co(c)&&(s[a]=c)}),t[o]=void 0,s}}return n};return r(e,0)},j1=_r("AsyncFunction"),R1=e=>e&&(ko(e)||Kt(e))&&Kt(e.then)&&Kt(e.catch),nf=((e,t)=>e?setImmediate:t?((r,n)=>(hn.addEventListener("message",({source:o,data:s})=>{o===hn&&s===r&&n.length&&n.shift()()},!1),o=>{n.push(o),hn.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Kt(hn.postMessage)),N1=typeof queueMicrotask<"u"?queueMicrotask.bind(hn):typeof process<"u"&&process.nextTick||nf,z={isArray:Bn,isArrayBuffer:Qd,isBuffer:Eo,isFormData:l1,isArrayBufferView:e1,isString:t1,isNumber:Xd,isBoolean:r1,isObject:ko,isPlainObject:gi,isEmptyObject:n1,isReadableStream:d1,isRequest:f1,isResponse:p1,isHeaders:h1,isUndefined:Co,isDate:o1,isFile:s1,isBlob:i1,isRegExp:D1,isFunction:Kt,isStream:c1,isURLSearchParams:u1,isTypedArray:w1,isFileList:a1,forEach:Do,merge:sc,extend:g1,trim:m1,stripBOM:v1,inherits:y1,toFlatObject:b1,kindOf:hi,kindOfTest:_r,endsWith:_1,toArray:x1,forEachEntry:S1,matchAll:C1,isHTMLForm:E1,hasOwnProperty:tf,hasOwnProp:tf,reduceDescriptors:rf,freezeMethods:T1,toObjectSet:I1,toCamelCase:k1,noop:A1,toFiniteNumber:M1,findKey:Jd,global:hn,isContextDefined:ef,isSpecCompliantForm:P1,toJSONObject:O1,isAsyncFn:j1,isThenable:R1,setImmediate:nf,asap:N1,isIterable:e=>e!=null&&Kt(e[pi])};function je(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}z.inherits(je,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:z.toJSONObject(this.config),code:this.code,status:this.status}}});const of=je.prototype,sf={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{sf[e]={value:e}}),Object.defineProperties(je,sf),Object.defineProperty(of,"isAxiosError",{value:!0}),je.from=(e,t,r,n,o,s)=>{const i=Object.create(of);return z.toFlatObject(e,i,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),je.call(i,e.message,t,r,n,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const $1=null;function ic(e){return z.isPlainObject(e)||z.isArray(e)}function af(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function cf(e,t,r){return e?e.concat(t).map(function(o,s){return o=af(o),!r&&s?"["+o+"]":o}).join(r?".":""):t}function L1(e){return z.isArray(e)&&!e.some(ic)}const z1=z.toFlatObject(z,{},null,function(t){return/^is[A-Z]/.test(t)});function vi(e,t,r){if(!z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=z.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,b){return!z.isUndefined(b[h])});const n=r.metaTokens,o=r.visitor||d,s=r.dots,i=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&z.isSpecCompliantForm(t);if(!z.isFunction(o))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(z.isDate(m))return m.toISOString();if(z.isBoolean(m))return m.toString();if(!c&&z.isBlob(m))throw new je("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(m)||z.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function d(m,h,b){let S=m;if(m&&!b&&typeof m=="object"){if(z.endsWith(h,"{}"))h=n?h:h.slice(0,-2),m=JSON.stringify(m);else if(z.isArray(m)&&L1(m)||(z.isFileList(m)||z.endsWith(h,"[]"))&&(S=z.toArray(m)))return h=af(h),S.forEach(function(D,k){!(z.isUndefined(D)||D===null)&&t.append(i===!0?cf([h],k,s):i===null?h:h+"[]",l(D))}),!1}return ic(m)?!0:(t.append(cf(b,h,s),l(m)),!1)}const f=[],p=Object.assign(z1,{defaultVisitor:d,convertValue:l,isVisitable:ic});function y(m,h){if(!z.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+h.join("."));f.push(m),z.forEach(m,function(S,C){(!(z.isUndefined(S)||S===null)&&o.call(t,S,z.isString(C)?C.trim():C,h,p))===!0&&y(S,h?h.concat(C):[C])}),f.pop()}}if(!z.isObject(e))throw new TypeError("data must be an object");return y(e),t}function lf(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function ac(e,t){this._pairs=[],e&&vi(e,this,t)}const uf=ac.prototype;uf.append=function(t,r){this._pairs.push([t,r])},uf.toString=function(t){const r=t?function(n){return t.call(this,n,lf)}:lf;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function B1(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function df(e,t,r){if(!t)return e;const n=r&&r.encode||B1;z.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let s;if(o?s=o(t,r):s=z.isURLSearchParams(t)?t.toString():new ac(t,r).toString(n),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class ff{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){z.forEach(this.handlers,function(n){n!==null&&t(n)})}}const pf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},F1={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:ac,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},cc=typeof window<"u"&&typeof document<"u",lc=typeof navigator=="object"&&navigator||void 0,V1=cc&&(!lc||["ReactNative","NativeScript","NS"].indexOf(lc.product)<0),U1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",W1=cc&&window.location.href||"http://localhost",Wt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:cc,hasStandardBrowserEnv:V1,hasStandardBrowserWebWorkerEnv:U1,navigator:lc,origin:W1},Symbol.toStringTag,{value:"Module"})),...F1};function H1(e,t){return vi(e,new Wt.classes.URLSearchParams,{visitor:function(r,n,o,s){return Wt.isNode&&z.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function Y1(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function q1(e){const t={},r=Object.keys(e);let n;const o=r.length;let s;for(n=0;n<o;n++)s=r[n],t[s]=e[s];return t}function hf(e){function t(r,n,o,s){let i=r[s++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),c=s>=r.length;return i=!i&&z.isArray(o)?o.length:i,c?(z.hasOwnProp(o,i)?o[i]=[o[i],n]:o[i]=n,!a):((!o[i]||!z.isObject(o[i]))&&(o[i]=[]),t(r,n,o[i],s)&&z.isArray(o[i])&&(o[i]=q1(o[i])),!a)}if(z.isFormData(e)&&z.isFunction(e.entries)){const r={};return z.forEachEntry(e,(n,o)=>{t(Y1(n),o,r,0)}),r}return null}function Z1(e,t,r){if(z.isString(e))try{return(t||JSON.parse)(e),z.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const To={transitional:pf,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,s=z.isObject(t);if(s&&z.isHTMLForm(t)&&(t=new FormData(t)),z.isFormData(t))return o?JSON.stringify(hf(t)):t;if(z.isArrayBuffer(t)||z.isBuffer(t)||z.isStream(t)||z.isFile(t)||z.isBlob(t)||z.isReadableStream(t))return t;if(z.isArrayBufferView(t))return t.buffer;if(z.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return H1(t,this.formSerializer).toString();if((a=z.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return vi(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||o?(r.setContentType("application/json",!1),Z1(t)):t}],transformResponse:[function(t){const r=this.transitional||To.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(z.isResponse(t)||z.isReadableStream(t))return t;if(t&&z.isString(t)&&(n&&!this.responseType||o)){const i=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(i)throw a.name==="SyntaxError"?je.from(a,je.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Wt.classes.FormData,Blob:Wt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};z.forEach(["delete","get","head","post","put","patch"],e=>{To.headers[e]={}});const G1=z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),K1=e=>{const t={};let r,n,o;return e&&e.split(`
156
- `).forEach(function(i){o=i.indexOf(":"),r=i.substring(0,o).trim().toLowerCase(),n=i.substring(o+1).trim(),!(!r||t[r]&&G1[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},mf=Symbol("internals");function Io(e){return e&&String(e).trim().toLowerCase()}function yi(e){return e===!1||e==null?e:z.isArray(e)?e.map(yi):String(e)}function Q1(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const X1=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function uc(e,t,r,n,o){if(z.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!z.isString(t)){if(z.isString(n))return t.indexOf(n)!==-1;if(z.isRegExp(n))return n.test(t)}}function J1(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function e_(e,t){const r=z.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,s,i){return this[n].call(this,t,o,s,i)},configurable:!0})})}let Qt=class{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function s(a,c,l){const d=Io(c);if(!d)throw new Error("header name must be a non-empty string");const f=z.findKey(o,d);(!f||o[f]===void 0||l===!0||l===void 0&&o[f]!==!1)&&(o[f||c]=yi(a))}const i=(a,c)=>z.forEach(a,(l,d)=>s(l,d,c));if(z.isPlainObject(t)||t instanceof this.constructor)i(t,r);else if(z.isString(t)&&(t=t.trim())&&!X1(t))i(K1(t),r);else if(z.isObject(t)&&z.isIterable(t)){let a={},c,l;for(const d of t){if(!z.isArray(d))throw TypeError("Object iterator must return a key-value pair");a[l=d[0]]=(c=a[l])?z.isArray(c)?[...c,d[1]]:[c,d[1]]:d[1]}i(a,r)}else t!=null&&s(r,t,n);return this}get(t,r){if(t=Io(t),t){const n=z.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return Q1(o);if(z.isFunction(r))return r.call(this,o,n);if(z.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Io(t),t){const n=z.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||uc(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function s(i){if(i=Io(i),i){const a=z.findKey(n,i);a&&(!r||uc(n,n[a],a,r))&&(delete n[a],o=!0)}}return z.isArray(t)?t.forEach(s):s(t),o}clear(t){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const s=r[n];(!t||uc(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const r=this,n={};return z.forEach(this,(o,s)=>{const i=z.findKey(n,s);if(i){r[i]=yi(o),delete r[s];return}const a=t?J1(s):String(s).trim();a!==s&&delete r[s],r[a]=yi(o),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return z.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&z.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
157
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[mf]=this[mf]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=Io(i);n[a]||(e_(o,i),n[a]=!0)}return z.isArray(t)?t.forEach(s):s(t),this}};Qt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),z.reduceDescriptors(Qt.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),z.freezeMethods(Qt);function dc(e,t){const r=this||To,n=t||r,o=Qt.from(n.headers);let s=n.data;return z.forEach(e,function(a){s=a.call(r,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function gf(e){return!!(e&&e.__CANCEL__)}function Fn(e,t,r){je.call(this,e??"canceled",je.ERR_CANCELED,t,r),this.name="CanceledError"}z.inherits(Fn,je,{__CANCEL__:!0});function vf(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new je("Request failed with status code "+r.status,[je.ERR_BAD_REQUEST,je.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function t_(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function r_(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,s=0,i;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),d=n[s];i||(i=l),r[o]=c,n[o]=l;let f=s,p=0;for(;f!==o;)p+=r[f++],f=f%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-i<t)return;const y=d&&l-d;return y?Math.round(p*1e3/y):void 0}}function n_(e,t){let r=0,n=1e3/t,o,s;const i=(l,d=Date.now())=>{r=d,o=null,s&&(clearTimeout(s),s=null),e(...l)};return[(...l)=>{const d=Date.now(),f=d-r;f>=n?i(l,d):(o=l,s||(s=setTimeout(()=>{s=null,i(o)},n-f)))},()=>o&&i(o)]}const bi=(e,t,r=3)=>{let n=0;const o=r_(50,250);return n_(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,c=i-n,l=o(c),d=i<=a;n=i;const f={loaded:i,total:a,progress:a?i/a:void 0,bytes:c,rate:l||void 0,estimated:l&&a&&d?(a-i)/l:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(f)},r)},yf=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},bf=e=>(...t)=>z.asap(()=>e(...t)),o_=Wt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Wt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Wt.origin),Wt.navigator&&/(msie|trident)/i.test(Wt.navigator.userAgent)):()=>!0,s_=Wt.hasStandardBrowserEnv?{write(e,t,r,n,o,s){const i=[e+"="+encodeURIComponent(t)];z.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),z.isString(n)&&i.push("path="+n),z.isString(o)&&i.push("domain="+o),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function i_(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function a_(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function _f(e,t,r){let n=!i_(t);return e&&(n||r==!1)?a_(e,t):t}const xf=e=>e instanceof Qt?{...e}:e;function mn(e,t){t=t||{};const r={};function n(l,d,f,p){return z.isPlainObject(l)&&z.isPlainObject(d)?z.merge.call({caseless:p},l,d):z.isPlainObject(d)?z.merge({},d):z.isArray(d)?d.slice():d}function o(l,d,f,p){if(z.isUndefined(d)){if(!z.isUndefined(l))return n(void 0,l,f,p)}else return n(l,d,f,p)}function s(l,d){if(!z.isUndefined(d))return n(void 0,d)}function i(l,d){if(z.isUndefined(d)){if(!z.isUndefined(l))return n(void 0,l)}else return n(void 0,d)}function a(l,d,f){if(f in t)return n(l,d);if(f in e)return n(void 0,l)}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(l,d,f)=>o(xf(l),xf(d),f,!0)};return z.forEach(Object.keys({...e,...t}),function(d){const f=c[d]||o,p=f(e[d],t[d],d);z.isUndefined(p)&&f!==a||(r[d]=p)}),r}const wf=e=>{const t=mn({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=Qt.from(i),t.url=df(_f(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(z.isFormData(r)){if(Wt.hasStandardBrowserEnv||Wt.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((c=i.getContentType())!==!1){const[l,...d]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];i.setContentType([l||"multipart/form-data",...d].join("; "))}}if(Wt.hasStandardBrowserEnv&&(n&&z.isFunction(n)&&(n=n(t)),n||n!==!1&&o_(t.url))){const l=o&&s&&s_.read(s);l&&i.set(o,l)}return t},c_=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const o=wf(e);let s=o.data;const i=Qt.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:l}=o,d,f,p,y,m;function h(){y&&y(),m&&m(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let b=new XMLHttpRequest;b.open(o.method.toUpperCase(),o.url,!0),b.timeout=o.timeout;function S(){if(!b)return;const D=Qt.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),w={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:D,config:e,request:b};vf(function(E){r(E),h()},function(E){n(E),h()},w),b=null}"onloadend"in b?b.onloadend=S:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(S)},b.onabort=function(){b&&(n(new je("Request aborted",je.ECONNABORTED,e,b)),b=null)},b.onerror=function(){n(new je("Network Error",je.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let k=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const w=o.transitional||pf;o.timeoutErrorMessage&&(k=o.timeoutErrorMessage),n(new je(k,w.clarifyTimeoutError?je.ETIMEDOUT:je.ECONNABORTED,e,b)),b=null},s===void 0&&i.setContentType(null),"setRequestHeader"in b&&z.forEach(i.toJSON(),function(k,w){b.setRequestHeader(w,k)}),z.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),a&&a!=="json"&&(b.responseType=o.responseType),l&&([p,m]=bi(l,!0),b.addEventListener("progress",p)),c&&b.upload&&([f,y]=bi(c),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(d=D=>{b&&(n(!D||D.type?new Fn(null,e,b):D),b.abort(),b=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const C=t_(o.url);if(C&&Wt.protocols.indexOf(C)===-1){n(new je("Unsupported protocol "+C+":",je.ERR_BAD_REQUEST,e));return}b.send(s||null)})},l_=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const s=function(l){if(!o){o=!0,a();const d=l instanceof Error?l:this.reason;n.abort(d instanceof je?d:new Fn(d instanceof Error?d.message:d))}};let i=t&&setTimeout(()=>{i=null,s(new je(`timeout ${t} of ms exceeded`,je.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s));const{signal:c}=n;return c.unsubscribe=()=>z.asap(a),c}},u_=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},d_=async function*(e,t){for await(const r of f_(e))yield*u_(r,t)},f_=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Sf=(e,t,r,n)=>{const o=d_(e,t);let s=0,i,a=c=>{i||(i=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:l,value:d}=await o.next();if(l){a(),c.close();return}let f=d.byteLength;if(r){let p=s+=f;r(p)}c.enqueue(new Uint8Array(d))}catch(l){throw a(l),l}},cancel(c){return a(c),o.return()}},{highWaterMark:2})},_i=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Cf=_i&&typeof ReadableStream=="function",p_=_i&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Ef=(e,...t)=>{try{return!!e(...t)}catch{return!1}},h_=Cf&&Ef(()=>{let e=!1;const t=new Request(Wt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),kf=64*1024,fc=Cf&&Ef(()=>z.isReadableStream(new Response("").body)),xi={stream:fc&&(e=>e.body)};_i&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!xi[t]&&(xi[t]=z.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new je(`Response type '${t}' is not supported`,je.ERR_NOT_SUPPORT,n)})})})(new Response);const m_=async e=>{if(e==null)return 0;if(z.isBlob(e))return e.size;if(z.isSpecCompliantForm(e))return(await new Request(Wt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(z.isArrayBufferView(e)||z.isArrayBuffer(e))return e.byteLength;if(z.isURLSearchParams(e)&&(e=e+""),z.isString(e))return(await p_(e)).byteLength},g_=async(e,t)=>{const r=z.toFiniteNumber(e.getContentLength());return r??m_(t)},pc={http:$1,xhr:c_,fetch:_i&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:d,withCredentials:f="same-origin",fetchOptions:p}=wf(e);l=l?(l+"").toLowerCase():"text";let y=l_([o,s&&s.toAbortSignal()],i),m;const h=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let b;try{if(c&&h_&&r!=="get"&&r!=="head"&&(b=await g_(d,n))!==0){let w=new Request(t,{method:"POST",body:n,duplex:"half"}),B;if(z.isFormData(n)&&(B=w.headers.get("content-type"))&&d.setContentType(B),w.body){const[E,I]=yf(b,bi(bf(c)));n=Sf(w.body,kf,E,I)}}z.isString(f)||(f=f?"include":"omit");const S="credentials"in Request.prototype;m=new Request(t,{...p,signal:y,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",credentials:S?f:void 0});let C=await fetch(m,p);const D=fc&&(l==="stream"||l==="response");if(fc&&(a||D&&h)){const w={};["status","statusText","headers"].forEach(P=>{w[P]=C[P]});const B=z.toFiniteNumber(C.headers.get("content-length")),[E,I]=a&&yf(B,bi(bf(a),!0))||[];C=new Response(Sf(C.body,kf,E,()=>{I&&I(),h&&h()}),w)}l=l||"text";let k=await xi[z.findKey(xi,l)||"text"](C,e);return!D&&h&&h(),await new Promise((w,B)=>{vf(w,B,{data:k,headers:Qt.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:m})})}catch(S){throw h&&h(),S&&S.name==="TypeError"&&/Load failed|fetch/i.test(S.message)?Object.assign(new je("Network Error",je.ERR_NETWORK,e,m),{cause:S.cause||S}):je.from(S,S&&S.code,e,m)}})};z.forEach(pc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Df=e=>`- ${e}`,v_=e=>z.isFunction(e)||e===null||e===!1,Tf={getAdapter:e=>{e=z.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let s=0;s<t;s++){r=e[s];let i;if(n=r,!v_(r)&&(n=pc[(i=String(r)).toLowerCase()],n===void 0))throw new je(`Unknown adapter '${i}'`);if(n)break;o[i||"#"+s]=n}if(!n){const s=Object.entries(o).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
158
- `+s.map(Df).join(`
159
- `):" "+Df(s[0]):"as no adapter specified";throw new je("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n},adapters:pc};function hc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Fn(null,e)}function If(e){return hc(e),e.headers=Qt.from(e.headers),e.data=dc.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Tf.getAdapter(e.adapter||To.adapter)(e).then(function(n){return hc(e),n.data=dc.call(e,e.transformResponse,n),n.headers=Qt.from(n.headers),n},function(n){return gf(n)||(hc(e),n&&n.response&&(n.response.data=dc.call(e,e.transformResponse,n.response),n.response.headers=Qt.from(n.response.headers))),Promise.reject(n)})}const Af="1.11.0",wi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{wi[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Mf={};wi.transitional=function(t,r,n){function o(s,i){return"[Axios v"+Af+"] Transitional option '"+s+"'"+i+(n?". "+n:"")}return(s,i,a)=>{if(t===!1)throw new je(o(i," has been removed"+(r?" in "+r:"")),je.ERR_DEPRECATED);return r&&!Mf[i]&&(Mf[i]=!0,console.warn(o(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,i,a):!0}},wi.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function y_(e,t,r){if(typeof e!="object")throw new je("options must be an object",je.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const s=n[o],i=t[s];if(i){const a=e[s],c=a===void 0||i(a,s,e);if(c!==!0)throw new je("option "+s+" must be "+c,je.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new je("Unknown option "+s,je.ERR_BAD_OPTION)}}const Si={assertOptions:y_,validators:wi},Rr=Si.validators;let gn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ff,response:new ff}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
160
- `+s):n.stack=s}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=mn(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&Si.assertOptions(n,{silentJSONParsing:Rr.transitional(Rr.boolean),forcedJSONParsing:Rr.transitional(Rr.boolean),clarifyTimeoutError:Rr.transitional(Rr.boolean)},!1),o!=null&&(z.isFunction(o)?r.paramsSerializer={serialize:o}:Si.assertOptions(o,{encode:Rr.function,serialize:Rr.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Si.assertOptions(r,{baseUrl:Rr.spelling("baseURL"),withXsrfToken:Rr.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=s&&z.merge(s.common,s[r.method]);s&&z.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),r.headers=Qt.concat(i,s);const a=[];let c=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(r)===!1||(c=c&&h.synchronous,a.unshift(h.fulfilled,h.rejected))});const l=[];this.interceptors.response.forEach(function(h){l.push(h.fulfilled,h.rejected)});let d,f=0,p;if(!c){const m=[If.bind(this),void 0];for(m.unshift(...a),m.push(...l),p=m.length,d=Promise.resolve(r);f<p;)d=d.then(m[f++],m[f++]);return d}p=a.length;let y=r;for(f=0;f<p;){const m=a[f++],h=a[f++];try{y=m(y)}catch(b){h.call(this,b);break}}try{d=If.call(this,y)}catch(m){return Promise.reject(m)}for(f=0,p=l.length;f<p;)d=d.then(l[f++],l[f++]);return d}getUri(t){t=mn(this.defaults,t);const r=_f(t.baseURL,t.url,t.allowAbsoluteUrls);return df(r,t.params,t.paramsSerializer)}};z.forEach(["delete","get","head","options"],function(t){gn.prototype[t]=function(r,n){return this.request(mn(n||{},{method:t,url:r,data:(n||{}).data}))}}),z.forEach(["post","put","patch"],function(t){function r(n){return function(s,i,a){return this.request(mn(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}gn.prototype[t]=r(),gn.prototype[t+"Form"]=r(!0)});let b_=class e0{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(o=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](o);n._listeners=null}),this.promise.then=o=>{let s;const i=new Promise(a=>{n.subscribe(a),s=a}).then(o);return i.cancel=function(){n.unsubscribe(s)},i},t(function(s,i,a){n.reason||(n.reason=new Fn(s,i,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new e0(function(o){t=o}),cancel:t}}};function __(e){return function(r){return e.apply(null,r)}}function x_(e){return z.isObject(e)&&e.isAxiosError===!0}const mc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(mc).forEach(([e,t])=>{mc[t]=e});function Pf(e){const t=new gn(e),r=Gd(gn.prototype.request,t);return z.extend(r,gn.prototype,t,{allOwnKeys:!0}),z.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return Pf(mn(e,o))},r}const Dt=Pf(To);Dt.Axios=gn,Dt.CanceledError=Fn,Dt.CancelToken=b_,Dt.isCancel=gf,Dt.VERSION=Af,Dt.toFormData=vi,Dt.AxiosError=je,Dt.Cancel=Dt.CanceledError,Dt.all=function(t){return Promise.all(t)},Dt.spread=__,Dt.isAxiosError=x_,Dt.mergeConfig=mn,Dt.AxiosHeaders=Qt,Dt.formToJSON=e=>hf(z.isHTMLForm(e)?new FormData(e):e),Dt.getAdapter=Tf.getAdapter,Dt.HttpStatusCode=mc,Dt.default=Dt;const{Axios:oI,AxiosError:sI,CanceledError:iI,isCancel:aI,CancelToken:cI,VERSION:lI,all:uI,Cancel:dI,isAxiosError:fI,spread:pI,toFormData:hI,AxiosHeaders:mI,HttpStatusCode:gI,formToJSON:vI,getAdapter:yI,mergeConfig:bI}=Dt,Of={token:null},w_=e=>{Of.token=e},Pt=Dt.create({headers:{"Content-Type":"application/json"}});Pt.interceptors.request.use(e=>{const t=Of.token;return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));const jf=v.createContext(void 0),S_=({config:e,children:t})=>(v.useEffect(()=>{e.getToken&&w_(e.getToken)},[e.getToken]),u.jsx(jf.Provider,{value:e,children:t})),gc=()=>{const e=v.useContext(jf);if(!e)throw new Error("useApiConfig debe ser usado dentro de un ApiProvider");return e},Ci=()=>{const{calendarApiUrl:e}=gc();return{getGoogleAuthUrl:async()=>{try{const i=`${e}/api/Calendario/v1/auth-url-Google`;return(await Pt.get(i)).data}catch(i){throw console.error("Error al obtener la URL de Google Auth:",i),i}},saveGoogleCredentials:async i=>{try{const a=new URLSearchParams({code:i.code,disID:String(i.disID),usrID:String(i.usrID)}).toString(),c=`${e}/api/Calendario/v1/google-auth/SaveCredential?${a}`;return(await Pt.post(c,{})).data}catch(a){throw console.error("Error al guardar credenciales de Google:",a),a}},getGoogleCalendars:async(i,a)=>{try{return(await Pt.get(`${e}/api/Calendario/v1/google/ObtenerTiposCalendariosGoogleAsync?usrMail=${encodeURIComponent(i)}&disID=${a}`)).data}catch(c){throw console.error("Error al obtener los calendarios de Google:",c),c}},syncGoogleEvents:async(i,a,c)=>{try{return(await Pt.post(`${e}/api/Calendario/v1/google/SincronizarEnviarEventosAsync?usrMail=${encodeURIComponent(i)}&disID=${a}&UsuarioID=${c}`)).data}catch(l){throw console.error("Error al sincronizar eventos con Google Calendar:",l),l}},getGoogleEventsByMonth:async i=>{try{const a=await Pt.post(`${e}/api/Calendario/v1/google/ObtenerEventosGoogleAsyncXMes`,i);return console.log("eventos desde gmail",a),a.data}catch(a){throw console.error("Error al obtener eventos de Google Calendar por mes:",a),a}}}},Rf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAASFBMVEVChfRHcExDhOAWaNUZfjjkTDf////6/P7b6fu61fj7wCj7vASZv/VuoPBQjvVCr19GifE0qFM4gerrRjMubcQQaucZZ9MYgTpc4mWWAAAABnRSTlP/AFtbW/eMEQaPAAAAfUlEQVR42q3Pyw4CIQyFYVDbigKOl6Pv/6a2ZBYN08TEzL9gcb6waDqkubd1TEsEWkp7Q3e9RuvOrsvV+g0Fi+jaZIKC0sECzMDCDK51C9zR9A2gPhCC6HgOoIFL/KMD1cMfl39GNxc9NVrh7jKgHAPlCGwPgSgbnDYw9vwFKv0VRfpGYZ8AAAAASUVORK5CYII=",C_=({disID:e,usrID:t})=>{const[r,n]=v.useState(null),o=Ci(),s=async()=>{localStorage.setItem("temp_auth_disID",String(e)),localStorage.setItem("temp_auth_usrID",String(t)),n(null);try{const{url:i}=await o.getGoogleAuthUrl();console.log("googleAuthUrl",i),window.location.href=i}catch(i){n(i.message||"Fallo al iniciar sesión con Google."),localStorage.removeItem("temp_auth_disID"),localStorage.removeItem("temp_auth_usrID")}finally{}};return u.jsxs("div",{className:"flex",children:[u.jsxs("div",{className:be.syncButton,onClick:s,children:[u.jsx("div",{className:be.customCheckIcon,children:u.jsx("div",{className:be.uncheckedCircle})}),u.jsx("img",{src:Rf,width:18}),u.jsx("span",{children:"Google Calendar"})]}),r&&u.jsx("p",{className:"text-red-500 mt-2",children:r})]})},vc=()=>{const{calendarApiUrl:e}=gc();return{getOutlookAuthUrl:async()=>{try{const i=`${e}/api/Calendario/v1/auth-url-Outlook`,a=await Pt.get(i);return console.log("api",a),a.data}catch(i){throw console.error("Error al obtener la URL de Outlook Auth:",i),i}},saveOutlookCredentials:async i=>{try{const a=new URLSearchParams({code:i.code,disID:String(i.disID),usrID:String(i.usrID)}).toString(),c=`${e}/api/Calendario/v1/outlook-auth/SaveCredential?${a}`;return(await Pt.post(c,{})).data}catch(a){throw console.error("Error al guardar credenciales Outlook:",a),a}},syncOutlookEvents:async(i,a,c)=>{try{return(await Pt.post(`${e}/api/Calendario/v1/outlook/SincronizarEnviarEventosAsync?usrMail=${encodeURIComponent(i)}&disID=${a}&UsuarioID=${c}`)).data}catch(l){throw console.error("Error al sincronizar eventos con outlook Calendar:",l),l}},getOutlookCalendars:async(i,a)=>{try{return(await Pt.get(`${e}/api/Calendario/v1/outlook/ObtenerTiposCalendariosOutlookAsync?usrMail=${encodeURIComponent(i)}&disID=${a}`)).data}catch(c){throw console.error("Error al obtener los calendarios de Google:",c),c}},getOutlookEventsByMonth:async i=>{try{const a=await Pt.post(`${e}/api/Calendario/v1/outlook/ObtenerEventosoutlookAsyncXMes`,i);return console.log(a),a.data}catch(a){throw console.error("Error al obtener eventos de Outlook Calendar por mes:",a),a}}}},Nf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAYCAMAAAA8nnbJAAAAflBMVEUAAAAAV34AMFoAID0ATmsAL1oATXcAZZAAIUgANmQArPAAfd0BedoAacQAZbsAkuMActcAa9QAsfMAjfMAUJL///8Ame8Aht4A6v8A2v8Atvguid0AfMIAo+wAWrYA3/+q0/MAQ38ASIjB4PeHwe4AU7JlsekAdcMAXqgApf4WoQK+AAAACnRSTlMATjUWISlCbAuE1QOT9gAAAP1JREFUKM9t0GF7QzAQwPG2xiw5JGlICWVsrX3/L7i7Gyae/l944efinpzW4ktQfPrvorIgiHaW5UHZ29Hu3Dd235uTUkJnMHGj2NKISvh/TmBdX9c1W/pz5SQOOtsFFl0lBfx8YeCH6aHJhEG89X2/2aOchnLSIC1IACWwZjFdfmnwpSeDg/kSJH0AsLPLZgBoam9jsp2p8EylLK2rjDAmb89kALzLoLUaMyx3bs6rajHlh8FnZHzN+VwVxWKI+F5jFgdnW2BsaSUxUBRYYUdXrYaDMfbxydmuEU+32tJ7+5fB7QvUwBrDCcq4Z2AirJX7udCaziUMVHI+hPQLqRAg85aAu30AAAAASUVORK5CYII=",E_=({disID:e,usrID:t})=>{const[r,n]=v.useState(null),o=vc(),s=async()=>{localStorage.setItem("temp_auth_disID",String(e)),localStorage.setItem("temp_auth_usrID",String(t)),n(null);try{const i=await o.getOutlookAuthUrl();window.location.href=i?.authUrl}catch(i){n(i.message||"Fallo al iniciar sesión con Google."),localStorage.removeItem("temp_auth_disID"),localStorage.removeItem("temp_auth_usrID")}finally{}};return u.jsxs("div",{className:"flex",children:[u.jsxs("div",{className:be.syncButton,onClick:s,children:[u.jsx("div",{className:be.customCheckIcon,children:u.jsx("div",{className:be.uncheckedCircle})}),u.jsx("img",{src:Nf,width:20}),u.jsx("span",{children:"Outlook"})]}),r&&u.jsx("p",{className:"text-red-500 mt-2",children:r})]})},$f="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='88'%20height='67'%20fill='none'%3e%3cg%20filter='url(%23a)'%20opacity='.7'%3e%3cellipse%20cx='69.302'%20cy='60.952'%20fill='%23D9D9D9'%20rx='12.698'%20ry='2.032'/%3e%3c/g%3e%3cpath%20fill='%23D6D6D6'%20fill-rule='evenodd'%20d='M60.034%2011.99c.71.001%201.37.374%201.737.982l-1.74%201.05a270%20270%200%200%201%201.74-1.048l.002.002.002.004.007.011.02.034.063.11q.08.139.21.385c.171.327.403.795.657%201.38a24.6%2024.6%200%200%201%201.527%204.811c.817%203.964.847%209.339-2.499%2014.552a2.033%202.033%200%200%201-3.242.236l1.533-1.333-1.535%201.332v-.003l-.005-.004-.01-.012-.028-.033-.082-.1a10%2010%200%200%201-.26-.34%2014%2014%200%200%201-.798-1.221%2017.3%2017.3%200%200%201-1.828-4.469c-.986-3.873-.934-9.225%202.79-15.35l.072-.11c.38-.542%201-.867%201.667-.866m1.867%2017.26q-.02.064-.042.126.091-.276.172-.552zm-1.626-14.786.004.008z'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23C2C3CC'%20d='M59.728%2035.515s-1.736-7.32%206.371-12.183c0%200%20.497%208.29-6.371%2012.183'/%3e%3cpath%20fill='%23D6D6D6'%20fill-rule='evenodd'%20d='M79.915%2011.99c.71.001%201.37.374%201.737.982l-1.74%201.05a281%20281%200%200%201%201.74-1.048l.002.002.002.004.007.011.02.034.063.11q.08.139.21.385c.171.327.402.795.657%201.38a24.6%2024.6%200%200%201%201.527%204.811c.817%203.964.847%209.339-2.5%2014.552a2.033%202.033%200%200%201-3.241.236l1.532-1.333-1.534%201.332-.001-.003-.004-.004-.011-.012-.027-.033-.082-.1a10%2010%200%200%201-.26-.34c-.211-.287-.492-.698-.799-1.221a17.3%2017.3%200%200%201-1.827-4.469c-.986-3.873-.934-9.225%202.79-15.35l.072-.11c.38-.542%201-.867%201.667-.866m2.476%209.544q.013.113.027.228-.058-.477-.135-.934z'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23C2C3CC'%20fill-rule='evenodd'%20d='M72.733%2022.085c.313-.165.691-.154.996.028l-.522.871c.522-.87.521-.871.522-.87l.004.001.007.004.021.013q.027.016.072.046.091.057.25.165c.212.145.507.357.856.635.697.556%201.62%201.383%202.52%202.474%201.803%202.183%203.562%205.475%203.201%209.764a1.016%201.016%200%200%201-1.376.863h-.002l-.004-.002-.008-.002-.023-.01-.079-.033a9.79%209.79%200%200%201-1.139-.603%2012%2012%200%200%201-2.566-2.14c-1.853-2.044-3.57-5.345-3.271-10.365l.017-.131c.057-.3.249-.563.524-.708M78.04%2034.22l.11.075a11%2011%200%200%201-.394-.282zm-4.516-11.027.334.237q0%200%20.003.002a13%2013%200%200%200-.337-.24'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23C2C3CC'%20fill-rule='evenodd'%20d='M85.456%2022.461a1.017%201.017%200%200%201%201.536.81l-1.014.061%201.014-.06v.002l.001.003v.008l.001.024.004.085q.004.108.004.301c0%20.257-.007.62-.04%201.067-.064.89-.227%202.12-.618%203.482-.781%202.723-2.5%206.038-6.237%208.156a1.018%201.018%200%200%201-1.489-.65l-.002-.006-.002-.009-.005-.025a5%205%200%200%201-.065-.367%2010%2010%200%200%201-.096-.999c-.04-.837%200-2.002.316-3.331.639-2.686%202.388-5.97%206.692-8.552'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23D6D6D6'%20fill-rule='evenodd'%20d='M70.232%205.343c.71.002%201.37.374%201.737.982l-1.74%201.05c1.739-1.05%201.74-1.048%201.74-1.048l.002.002q0%20.003.003.004l.008.014.023.04.082.142q.102.18.274.505c.227.432.535%201.053.875%201.834a33%2033%200%200%201%202.036%206.417c1.09%205.284%201.122%2012.4-3.305%2019.3a2.034%202.034%200%200%201-3.242.236l1.532-1.334a223%20223%200%200%201-1.534%201.332l-.002-.002-.004-.005-.012-.013-.033-.04-.102-.124a13%2013%200%200%201-.335-.438%2019%2019%200%200%201-1.048-1.603%2023%2023%200%200%201-2.413-5.902c-1.3-5.104-1.25-12.198%203.719-20.373l.072-.11c.38-.541%201-.867%201.667-.866m1.563%2026.818v-.002l-.003-.002v-.002z'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23AAABAD'%20fill-rule='evenodd'%20d='M60.61%2018.704c.315-.166.693-.155.998.027l-.523.871c.489-.815.52-.868.523-.87l.004.001.009.005.027.017a8%208%200%200%201%20.425.279c.282.192.676.476%201.145.85a23%2023%200%200%201%203.383%203.32c2.419%202.929%204.765%207.325%204.284%2013.05a1.017%201.017%200%200%201-1.376.864l.363-.948-.364.947h-.002l-.003-.002q-.005%200-.01-.003l-.03-.012-.1-.041a9%209%200%200%201-.341-.157c-.288-.139-.69-.35-1.164-.642a16%2016%200%200%201-3.42-2.852c-2.465-2.719-4.768-7.125-4.367-13.866l.017-.131c.058-.3.248-.562.523-.708m.436%201.974q.003-.237.011-.477v-.003a24%2024%200%200%200-.01.48'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23AAABAD'%20fill-rule='evenodd'%20d='M78.103%2019.143a1.016%201.016%200%200%201%201.419.871l-1.014.06%201.014-.06.001.002v.013l.002.032.004.11q.005.142.006.399c0%20.341-.01.83-.054%201.428a23.2%2023.2%200%200%201-.829%204.675c-1.05%203.655-3.348%208.076-8.335%2010.904a1.016%201.016%200%200%201-1.49-.65l.989-.233-.988.232-.001-.001-.001-.004-.002-.01-.007-.032q-.01-.038-.022-.104a9%209%200%200%201-.064-.372c-.047-.317-.1-.768-.127-1.326a16%2016%200%200%201%20.423-4.441c.85-3.574%203.18-7.967%208.96-11.433zm-8.499%2015.032c-.007.617.024%201.143.066%201.552q.032.308.065.524c.043.286.08.443.08.443-.003-.017-.23-.99-.21-2.52m.05-1.027q-.023.282-.036.546l.032-.511q.001-.018.004-.035'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23D6D6D6'%20d='M55.804%2031.519h28.238c.815%200%201.476.663%201.476%201.481v15.847c0%206.204-5.019%2011.241-11.2%2011.241h-8.79c-6.182%200-11.2-5.037-11.2-11.24V33c0-.818.66-1.481%201.476-1.481'/%3e%3cpath%20fill='%23E6E8ED'%20d='M68.15%2032.344v17.159c0%205.103%203.6%209.364%208.39%2010.361%205.122-1.034%208.978-5.574%208.978-11.018V33c0-.818-.66-1.481-1.476-1.481h-15.07a.823.823%200%200%200-.822.824z'/%3e%3cg%20filter='url(%23b)'%20opacity='.7'%3e%3cellipse%20cx='33.238'%20cy='60.952'%20fill='%23D9D9D9'%20rx='28.444'%20ry='3.048'/%3e%3c/g%3e%3cpath%20fill='%233856EC'%20d='M6.095%2017.27h54.857V53.84a6.095%206.095%200%200%201-6.095%206.095H12.19a6.095%206.095%200%200%201-6.095-6.095z'/%3e%3cpath%20fill='%23E2EDFB'%20d='M6.195%2050.145a8.127%208.127%200%200%200%208.127%208.127H37.9a6.1%206.1%200%200%200%204.309-1.785l16.98-16.973a6.1%206.1%200%200%200%201.785-4.31V9.586a6.095%206.095%200%200%200-6.095-6.095H12.29a6.095%206.095%200%200%200-6.095%206.095z'/%3e%3cpath%20fill='%233856EC'%20fill-rule='evenodd'%20d='M60.952%209.009a6.014%206.014%200%200%200-6.014-6.014H12.11a6.014%206.014%200%200%200-6.014%206.014v8.284h54.857zM17.77%2012.772a2.794%202.794%200%201%201%20.002-5.589%202.794%202.794%200%200%201-.002%205.59m15.965%200a2.794%202.794%200%201%201%20.001-5.588%202.794%202.794%200%200%201%200%205.588m16.763%200a2.794%202.794%200%201%201%20.001-5.588%202.794%202.794%200%200%201-.001%205.588'%20clip-rule='evenodd'/%3e%3crect%20width='7.982'%20height='7.982'%20x='11.783'%20y='22.351'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='23.756'%20y='22.351'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='34.931'%20y='22.351'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='46.904'%20y='22.351'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='11.783'%20y='33.526'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='23.756'%20y='33.526'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='34.931'%20y='33.526'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='46.904'%20y='33.526'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='11.783'%20y='44.702'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='23.756'%20y='44.702'%20fill='%23fff'%20rx='2.032'/%3e%3cpath%20fill='%23597EF7'%20d='M40.52%2057.687a6%206%200%200%200%201.665-1.174l17.027-17.021a6%206%200%200%200%201.313-1.973H48.646a8.127%208.127%200%200%200-8.127%208.127z'/%3e%3crect%20width='3.991'%20height='11.974'%20x='15.773'%20fill='%23D9D9D9'%20rx='1.996'/%3e%3crect%20width='3.991'%20height='11.974'%20x='31.738'%20fill='%23D9D9D9'%20rx='1.996'/%3e%3crect%20width='3.991'%20height='11.974'%20x='48.501'%20fill='%23D9D9D9'%20rx='1.996'/%3e%3cdefs%3e%3cfilter%20id='a'%20width='29.46'%20height='8.127'%20x='54.572'%20y='56.889'%20color-interpolation-filters='sRGB'%20filterUnits='userSpaceOnUse'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeBlend%20in='SourceGraphic'%20in2='BackgroundImageFix'%20result='shape'/%3e%3cfeGaussianBlur%20result='effect1_foregroundBlur_529_4322'%20stdDeviation='1.016'/%3e%3c/filter%3e%3cfilter%20id='b'%20width='60.952'%20height='10.159'%20x='2.762'%20y='55.873'%20color-interpolation-filters='sRGB'%20filterUnits='userSpaceOnUse'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeBlend%20in='SourceGraphic'%20in2='BackgroundImageFix'%20result='shape'/%3e%3cfeGaussianBlur%20result='effect1_foregroundBlur_529_4322'%20stdDeviation='1.016'/%3e%3c/filter%3e%3c/defs%3e%3c/svg%3e";class vn extends Error{constructor(t,r){const n=new.target.prototype;super(`${t}: Status code '${r}'`),this.statusCode=r,this.__proto__=n}}class yc extends Error{constructor(t="A timeout occurred."){const r=new.target.prototype;super(t),this.__proto__=r}}class xr extends Error{constructor(t="An abort occurred."){const r=new.target.prototype;super(t),this.__proto__=r}}class k_ extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="UnsupportedTransportError",this.__proto__=n}}class D_ extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="DisabledTransportError",this.__proto__=n}}class T_ extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="FailedToStartTransportError",this.__proto__=n}}class Lf extends Error{constructor(t){const r=new.target.prototype;super(t),this.errorType="FailedToNegotiateWithServerError",this.__proto__=r}}class I_ extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.innerErrors=r,this.__proto__=n}}class zf{constructor(t,r,n){this.statusCode=t,this.statusText=r,this.content=n}}class Ei{get(t,r){return this.send({...r,method:"GET",url:t})}post(t,r){return this.send({...r,method:"POST",url:t})}delete(t,r){return this.send({...r,method:"DELETE",url:t})}getCookieString(t){return""}}var U;(function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"})(U||(U={}));class Ao{constructor(){}log(t,r){}}Ao.instance=new Ao;const A_="10.0.0";class Ot{static isRequired(t,r){if(t==null)throw new Error(`The '${r}' argument is required.`)}static isNotEmpty(t,r){if(!t||t.match(/^\s*$/))throw new Error(`The '${r}' argument should not be empty.`)}static isIn(t,r,n){if(!(t in r))throw new Error(`Unknown ${n} value: ${t}.`)}}class _t{static get isBrowser(){return!_t.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!_t.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!_t.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}}function Mo(e,t){let r="";return yn(e)?(r=`Binary data of length ${e.byteLength}`,t&&(r+=`. Content: '${M_(e)}'`)):typeof e=="string"&&(r=`String data of length ${e.length}`,t&&(r+=`. Content: '${e}'`)),r}function M_(e){const t=new Uint8Array(e);let r="";return t.forEach(n=>{const o=n<16?"0":"";r+=`0x${o}${n.toString(16)} `}),r.substring(0,r.length-1)}function yn(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||e.constructor&&e.constructor.name==="ArrayBuffer")}async function Bf(e,t,r,n,o,s){const i={},[a,c]=Vn();i[a]=c,e.log(U.Trace,`(${t} transport) sending data. ${Mo(o,s.logMessageContent)}.`);const l=yn(o)?"arraybuffer":"text",d=await r.post(n,{content:o,headers:{...i,...s.headers},responseType:l,timeout:s.timeout,withCredentials:s.withCredentials});e.log(U.Trace,`(${t} transport) request complete. Response status: ${d.statusCode}.`)}function P_(e){return e===void 0?new ki(U.Information):e===null?Ao.instance:e.log!==void 0?e:new ki(e)}class O_{constructor(t,r){this._subject=t,this._observer=r}dispose(){const t=this._subject.observers.indexOf(this._observer);t>-1&&this._subject.observers.splice(t,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(r=>{})}}class ki{constructor(t){this._minLevel=t,this.out=console}log(t,r){if(t>=this._minLevel){const n=`[${new Date().toISOString()}] ${U[t]}: ${r}`;switch(t){case U.Critical:case U.Error:this.out.error(n);break;case U.Warning:this.out.warn(n);break;case U.Information:this.out.info(n);break;default:this.out.log(n);break}}}}function Vn(){let e="X-SignalR-User-Agent";return _t.isNode&&(e="User-Agent"),[e,j_(A_,R_(),$_(),N_())]}function j_(e,t,r,n){let o="Microsoft SignalR/";const s=e.split(".");return o+=`${s[0]}.${s[1]}`,o+=` (${e}; `,t&&t!==""?o+=`${t}; `:o+="Unknown OS; ",o+=`${r}`,n?o+=`; ${n}`:o+="; Unknown Runtime Version",o+=")",o}function R_(){if(_t.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function N_(){if(_t.isNode)return process.versions.node}function $_(){return _t.isNode?"NodeJS":"Browser"}function bc(e){return e.stack?e.stack:e.message?e.message:`${e}`}function L_(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}class z_ extends Ei{constructor(t){if(super(),this._logger=t,typeof fetch>"u"||_t.isNode){const r=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(r("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=r("node-fetch"):this._fetchType=fetch,this._fetchType=r("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(L_());if(typeof AbortController>"u"){const r=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=r("abort-controller")}else this._abortControllerType=AbortController}async send(t){if(t.abortSignal&&t.abortSignal.aborted)throw new xr;if(!t.method)throw new Error("No method defined.");if(!t.url)throw new Error("No url defined.");const r=new this._abortControllerType;let n;t.abortSignal&&(t.abortSignal.onabort=()=>{r.abort(),n=new xr});let o=null;if(t.timeout){const c=t.timeout;o=setTimeout(()=>{r.abort(),this._logger.log(U.Warning,"Timeout from HTTP request."),n=new yc},c)}t.content===""&&(t.content=void 0),t.content&&(t.headers=t.headers||{},yn(t.content)?t.headers["Content-Type"]="application/octet-stream":t.headers["Content-Type"]="text/plain;charset=UTF-8");let s;try{s=await this._fetchType(t.url,{body:t.content,cache:"no-cache",credentials:t.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...t.headers},method:t.method,mode:"cors",redirect:"follow",signal:r.signal})}catch(c){throw n||(this._logger.log(U.Warning,`Error from HTTP request. ${c}.`),c)}finally{o&&clearTimeout(o),t.abortSignal&&(t.abortSignal.onabort=null)}if(!s.ok){const c=await Ff(s,"text");throw new vn(c||s.statusText,s.status)}const a=await Ff(s,t.responseType);return new zf(s.status,s.statusText,a)}getCookieString(t){let r="";return _t.isNode&&this._jar&&this._jar.getCookies(t,(n,o)=>r=o.join("; ")),r}}function Ff(e,t){let r;switch(t){case"arraybuffer":r=e.arrayBuffer();break;case"text":r=e.text();break;case"blob":case"document":case"json":throw new Error(`${t} is not supported.`);default:r=e.text();break}return r}class B_ extends Ei{constructor(t){super(),this._logger=t}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new xr):t.method?t.url?new Promise((r,n)=>{const o=new XMLHttpRequest;o.open(t.method,t.url,!0),o.withCredentials=t.withCredentials===void 0?!0:t.withCredentials,o.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.content===""&&(t.content=void 0),t.content&&(yn(t.content)?o.setRequestHeader("Content-Type","application/octet-stream"):o.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const s=t.headers;s&&Object.keys(s).forEach(i=>{o.setRequestHeader(i,s[i])}),t.responseType&&(o.responseType=t.responseType),t.abortSignal&&(t.abortSignal.onabort=()=>{o.abort(),n(new xr)}),t.timeout&&(o.timeout=t.timeout),o.onload=()=>{t.abortSignal&&(t.abortSignal.onabort=null),o.status>=200&&o.status<300?r(new zf(o.status,o.statusText,o.response||o.responseText)):n(new vn(o.response||o.responseText||o.statusText,o.status))},o.onerror=()=>{this._logger.log(U.Warning,`Error from HTTP request. ${o.status}: ${o.statusText}.`),n(new vn(o.statusText,o.status))},o.ontimeout=()=>{this._logger.log(U.Warning,"Timeout from HTTP request."),n(new yc)},o.send(t.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class F_ extends Ei{constructor(t){if(super(),typeof fetch<"u"||_t.isNode)this._httpClient=new z_(t);else if(typeof XMLHttpRequest<"u")this._httpClient=new B_(t);else throw new Error("No usable HttpClient found.")}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new xr):t.method?t.url?this._httpClient.send(t):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(t){return this._httpClient.getCookieString(t)}}class sr{static write(t){return`${t}${sr.RecordSeparator}`}static parse(t){if(t[t.length-1]!==sr.RecordSeparator)throw new Error("Message is incomplete.");const r=t.split(sr.RecordSeparator);return r.pop(),r}}sr.RecordSeparatorCode=30,sr.RecordSeparator=String.fromCharCode(sr.RecordSeparatorCode);class V_{writeHandshakeRequest(t){return sr.write(JSON.stringify(t))}parseHandshakeResponse(t){let r,n;if(yn(t)){const a=new Uint8Array(t),c=a.indexOf(sr.RecordSeparatorCode);if(c===-1)throw new Error("Message is incomplete.");const l=c+1;r=String.fromCharCode.apply(null,Array.prototype.slice.call(a.slice(0,l))),n=a.byteLength>l?a.slice(l).buffer:null}else{const a=t,c=a.indexOf(sr.RecordSeparator);if(c===-1)throw new Error("Message is incomplete.");const l=c+1;r=a.substring(0,l),n=a.length>l?a.substring(l):null}const o=sr.parse(r),s=JSON.parse(o[0]);if(s.type)throw new Error("Expected a handshake response from the server.");return[n,s]}}var Oe;(function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close",e[e.Ack=8]="Ack",e[e.Sequence=9]="Sequence"})(Oe||(Oe={}));class U_{constructor(){this.observers=[]}next(t){for(const r of this.observers)r.next(t)}error(t){for(const r of this.observers)r.error&&r.error(t)}complete(){for(const t of this.observers)t.complete&&t.complete()}subscribe(t){return this.observers.push(t),new O_(this,t)}}class W_{constructor(t,r,n){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=t,this._connection=r,this._bufferSize=n}async _send(t){const r=this._protocol.writeMessage(t);let n=Promise.resolve();if(this._isInvocationMessage(t)){this._totalMessageCount++;let o=()=>{},s=()=>{};yn(r)?this._bufferedByteCount+=r.byteLength:this._bufferedByteCount+=r.length,this._bufferedByteCount>=this._bufferSize&&(n=new Promise((i,a)=>{o=i,s=a})),this._messages.push(new H_(r,this._totalMessageCount,o,s))}try{this._reconnectInProgress||await this._connection.send(r)}catch{this._disconnected()}await n}_ack(t){let r=-1;for(let n=0;n<this._messages.length;n++){const o=this._messages[n];if(o._id<=t.sequenceId)r=n,yn(o._message)?this._bufferedByteCount-=o._message.byteLength:this._bufferedByteCount-=o._message.length,o._resolver();else if(this._bufferedByteCount<this._bufferSize)o._resolver();else break}r!==-1&&(this._messages=this._messages.slice(r+1))}_shouldProcessMessage(t){if(this._waitForSequenceMessage)return t.type!==Oe.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(t))return!0;const r=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,r<=this._latestReceivedSequenceId?(r===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=r,this._ackTimer(),!0)}_resetSequence(t){if(t.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=t.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}async _resend(){const t=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;await this._connection.send(this._protocol.writeMessage({type:Oe.Sequence,sequenceId:t}));const r=this._messages;for(const n of r)await this._connection.send(n._message);this._reconnectInProgress=!1}_dispose(t){t??(t=new Error("Unable to reconnect to server."));for(const r of this._messages)r._rejector(t)}_isInvocationMessage(t){switch(t.type){case Oe.Invocation:case Oe.StreamItem:case Oe.Completion:case Oe.StreamInvocation:case Oe.CancelInvocation:return!0;case Oe.Close:case Oe.Sequence:case Oe.Ping:case Oe.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:Oe.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0},1e3))}}class H_{constructor(t,r,n,o){this._message=t,this._id=r,this._resolver=n,this._rejector=o}}const Y_=30*1e3,q_=15*1e3,Z_=1e5;var mt;(function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"})(mt||(mt={}));class _c{static create(t,r,n,o,s,i,a){return new _c(t,r,n,o,s,i,a)}constructor(t,r,n,o,s,i,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(U.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},Ot.isRequired(t,"connection"),Ot.isRequired(r,"logger"),Ot.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=s??Y_,this.keepAliveIntervalInMilliseconds=i??q_,this._statefulReconnectBufferSize=a??Z_,this._logger=r,this._protocol=n,this.connection=t,this._reconnectPolicy=o,this._handshakeProtocol=new V_,this.connection.onreceive=c=>this._processIncomingData(c),this.connection.onclose=c=>this._connectionClosed(c),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=mt.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:Oe.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(t){if(this._connectionState!==mt.Disconnected&&this._connectionState!==mt.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!t)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=t}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==mt.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=mt.Connecting,this._logger.log(U.Debug,"Starting HubConnection.");try{await this._startInternal(),_t.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=mt.Connected,this._connectionStarted=!0,this._logger.log(U.Debug,"HubConnection connected successfully.")}catch(t){return this._connectionState=mt.Disconnected,this._logger.log(U.Debug,`HubConnection failed to start successfully because of error '${t}'.`),Promise.reject(t)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const t=new Promise((r,n)=>{this._handshakeResolver=r,this._handshakeRejecter=n});await this.connection.start(this._protocol.transferFormat);try{let r=this._protocol.version;this.connection.features.reconnect||(r=1);const n={protocol:this._protocol.name,version:r};if(this._logger.log(U.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(n)),this._logger.log(U.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await t,this._stopDuringStartError)throw this._stopDuringStartError;(this.connection.features.reconnect||!1)&&(this._messageBuffer=new W_(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(r){throw this._logger.log(U.Debug,`Hub handshake failed with error '${r}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(r),r}}async stop(){const t=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),await this._stopPromise;try{await t}catch{}}_stopInternal(t){if(this._connectionState===mt.Disconnected)return this._logger.log(U.Debug,`Call to HubConnection.stop(${t}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===mt.Disconnecting)return this._logger.log(U.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;const r=this._connectionState;return this._connectionState=mt.Disconnecting,this._logger.log(U.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(U.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(r===mt.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=t||new xr("The connection was stopped before the hub handshake could complete."),this.connection.stop(t))}async _sendCloseMessage(){try{await this._sendWithProtocol(this._createCloseMessage())}catch{}}stream(t,...r){const[n,o]=this._replaceStreamingParams(r),s=this._createStreamInvocation(t,r,o);let i;const a=new U_;return a.cancelCallback=()=>{const c=this._createCancelInvocation(s.invocationId);return delete this._callbacks[s.invocationId],i.then(()=>this._sendWithProtocol(c))},this._callbacks[s.invocationId]=(c,l)=>{if(l){a.error(l);return}else c&&(c.type===Oe.Completion?c.error?a.error(new Error(c.error)):a.complete():a.next(c.item))},i=this._sendWithProtocol(s).catch(c=>{a.error(c),delete this._callbacks[s.invocationId]}),this._launchStreams(n,i),a}_sendMessage(t){return this._resetKeepAliveInterval(),this.connection.send(t)}_sendWithProtocol(t){return this._messageBuffer?this._messageBuffer._send(t):this._sendMessage(this._protocol.writeMessage(t))}send(t,...r){const[n,o]=this._replaceStreamingParams(r),s=this._sendWithProtocol(this._createInvocation(t,r,!0,o));return this._launchStreams(n,s),s}invoke(t,...r){const[n,o]=this._replaceStreamingParams(r),s=this._createInvocation(t,r,!1,o);return new Promise((a,c)=>{this._callbacks[s.invocationId]=(d,f)=>{if(f){c(f);return}else d&&(d.type===Oe.Completion?d.error?c(new Error(d.error)):a(d.result):c(new Error(`Unexpected message type: ${d.type}`)))};const l=this._sendWithProtocol(s).catch(d=>{c(d),delete this._callbacks[s.invocationId]});this._launchStreams(n,l)})}on(t,r){!t||!r||(t=t.toLowerCase(),this._methods[t]||(this._methods[t]=[]),this._methods[t].indexOf(r)===-1&&this._methods[t].push(r))}off(t,r){if(!t)return;t=t.toLowerCase();const n=this._methods[t];if(n)if(r){const o=n.indexOf(r);o!==-1&&(n.splice(o,1),n.length===0&&delete this._methods[t])}else delete this._methods[t]}onclose(t){t&&this._closedCallbacks.push(t)}onreconnecting(t){t&&this._reconnectingCallbacks.push(t)}onreconnected(t){t&&this._reconnectedCallbacks.push(t)}_processIncomingData(t){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(t=this._processHandshakeResponse(t),this._receivedHandshakeResponse=!0),t){const r=this._protocol.parseMessages(t,this._logger);for(const n of r)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(n)))switch(n.type){case Oe.Invocation:this._invokeClientMethod(n).catch(o=>{this._logger.log(U.Error,`Invoke client method threw error: ${bc(o)}`)});break;case Oe.StreamItem:case Oe.Completion:{const o=this._callbacks[n.invocationId];if(o){n.type===Oe.Completion&&delete this._callbacks[n.invocationId];try{o(n)}catch(s){this._logger.log(U.Error,`Stream callback threw error: ${bc(s)}`)}}break}case Oe.Ping:break;case Oe.Close:{this._logger.log(U.Information,"Close message received from server.");const o=n.error?new Error("Server returned an error on close: "+n.error):void 0;n.allowReconnect===!0?this.connection.stop(o):this._stopPromise=this._stopInternal(o);break}case Oe.Ack:this._messageBuffer&&this._messageBuffer._ack(n);break;case Oe.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(n);break;default:this._logger.log(U.Warning,`Invalid message type: ${n.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(t){let r,n;try{[n,r]=this._handshakeProtocol.parseHandshakeResponse(t)}catch(o){const s="Error parsing handshake response: "+o;this._logger.log(U.Error,s);const i=new Error(s);throw this._handshakeRejecter(i),i}if(r.error){const o="Server returned handshake error: "+r.error;this._logger.log(U.Error,o);const s=new Error(o);throw this._handshakeRejecter(s),s}else this._logger.log(U.Debug,"Server handshake complete.");return this._handshakeResolver(),n}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if(!this.connection.features||!this.connection.features.inherentKeepAlive){this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds);let t=this._nextKeepAlive-new Date().getTime();if(t<0){this._connectionState===mt.Connected&&this._trySendPingMessage();return}this._pingServerHandle===void 0&&(t<0&&(t=0),this._pingServerHandle=setTimeout(async()=>{this._connectionState===mt.Connected&&await this._trySendPingMessage()},t))}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(t){const r=t.target.toLowerCase(),n=this._methods[r];if(!n){this._logger.log(U.Warning,`No client method with the name '${r}' found.`),t.invocationId&&(this._logger.log(U.Warning,`No result given for '${r}' method and invocation ID '${t.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)));return}const o=n.slice(),s=!!t.invocationId;let i,a,c;for(const l of o)try{const d=i;i=await l.apply(this,t.arguments),s&&i&&d&&(this._logger.log(U.Error,`Multiple results provided for '${r}'. Sending error to server.`),c=this._createCompletionMessage(t.invocationId,"Client provided multiple results.",null)),a=void 0}catch(d){a=d,this._logger.log(U.Error,`A callback for the method '${r}' threw error '${d}'.`)}c?await this._sendWithProtocol(c):s?(a?c=this._createCompletionMessage(t.invocationId,`${a}`,null):i!==void 0?c=this._createCompletionMessage(t.invocationId,null,i):(this._logger.log(U.Warning,`No result given for '${r}' method and invocation ID '${t.invocationId}'.`),c=this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(c)):i&&this._logger.log(U.Error,`Result given for '${r}' method but server is not expecting a result.`)}_connectionClosed(t){this._logger.log(U.Debug,`HubConnection.connectionClosed(${t}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||t||new xr("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(t||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===mt.Disconnecting?this._completeClose(t):this._connectionState===mt.Connected&&this._reconnectPolicy?this._reconnect(t):this._connectionState===mt.Connected&&this._completeClose(t)}_completeClose(t){if(this._connectionStarted){this._connectionState=mt.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(t??new Error("Connection closed.")),this._messageBuffer=void 0),_t.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(r=>r.apply(this,[t]))}catch(r){this._logger.log(U.Error,`An onclose callback called with error '${t}' threw error '${r}'.`)}}}async _reconnect(t){const r=Date.now();let n=0,o=t!==void 0?t:new Error("Attempting to reconnect due to a unknown error."),s=this._getNextRetryDelay(n,0,o);if(s===null){this._logger.log(U.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(t);return}if(this._connectionState=mt.Reconnecting,t?this._logger.log(U.Information,`Connection reconnecting because of error '${t}'.`):this._logger.log(U.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(i=>i.apply(this,[t]))}catch(i){this._logger.log(U.Error,`An onreconnecting callback called with error '${t}' threw error '${i}'.`)}if(this._connectionState!==mt.Reconnecting){this._logger.log(U.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;s!==null;){if(this._logger.log(U.Information,`Reconnect attempt number ${n+1} will start in ${s} ms.`),await new Promise(i=>{this._reconnectDelayHandle=setTimeout(i,s)}),this._reconnectDelayHandle=void 0,this._connectionState!==mt.Reconnecting){this._logger.log(U.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=mt.Connected,this._logger.log(U.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(i=>i.apply(this,[this.connection.connectionId]))}catch(i){this._logger.log(U.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${i}'.`)}return}catch(i){if(this._logger.log(U.Information,`Reconnect attempt failed because of error '${i}'.`),this._connectionState!==mt.Reconnecting){this._logger.log(U.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===mt.Disconnecting&&this._completeClose();return}n++,o=i instanceof Error?i:new Error(i.toString()),s=this._getNextRetryDelay(n,Date.now()-r,o)}}this._logger.log(U.Information,`Reconnect retries have been exhausted after ${Date.now()-r} ms and ${n} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(t,r,n){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:r,previousRetryCount:t,retryReason:n})}catch(o){return this._logger.log(U.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${t}, ${r}) threw error '${o}'.`),null}}_cancelCallbacksWithError(t){const r=this._callbacks;this._callbacks={},Object.keys(r).forEach(n=>{const o=r[n];try{o(null,t)}catch(s){this._logger.log(U.Error,`Stream 'error' callback called with '${t}' threw error: ${bc(s)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(t,r,n,o){if(n)return o.length!==0?{target:t,arguments:r,streamIds:o,type:Oe.Invocation}:{target:t,arguments:r,type:Oe.Invocation};{const s=this._invocationId;return this._invocationId++,o.length!==0?{target:t,arguments:r,invocationId:s.toString(),streamIds:o,type:Oe.Invocation}:{target:t,arguments:r,invocationId:s.toString(),type:Oe.Invocation}}}_launchStreams(t,r){if(t.length!==0){r||(r=Promise.resolve());for(const n in t)t[n].subscribe({complete:()=>{r=r.then(()=>this._sendWithProtocol(this._createCompletionMessage(n)))},error:o=>{let s;o instanceof Error?s=o.message:o&&o.toString?s=o.toString():s="Unknown error",r=r.then(()=>this._sendWithProtocol(this._createCompletionMessage(n,s)))},next:o=>{r=r.then(()=>this._sendWithProtocol(this._createStreamItemMessage(n,o)))}})}}_replaceStreamingParams(t){const r=[],n=[];for(let o=0;o<t.length;o++){const s=t[o];if(this._isObservable(s)){const i=this._invocationId;this._invocationId++,r[i]=s,n.push(i.toString()),t.splice(o,1)}}return[r,n]}_isObservable(t){return t&&t.subscribe&&typeof t.subscribe=="function"}_createStreamInvocation(t,r,n){const o=this._invocationId;return this._invocationId++,n.length!==0?{target:t,arguments:r,invocationId:o.toString(),streamIds:n,type:Oe.StreamInvocation}:{target:t,arguments:r,invocationId:o.toString(),type:Oe.StreamInvocation}}_createCancelInvocation(t){return{invocationId:t,type:Oe.CancelInvocation}}_createStreamItemMessage(t,r){return{invocationId:t,item:r,type:Oe.StreamItem}}_createCompletionMessage(t,r,n){return r?{error:r,invocationId:t,type:Oe.Completion}:{invocationId:t,result:n,type:Oe.Completion}}_createCloseMessage(){return{type:Oe.Close}}async _trySendPingMessage(){try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}}const G_=[0,2e3,1e4,3e4,null];class Vf{constructor(t){this._retryDelays=t!==void 0?[...t,null]:G_}nextRetryDelayInMilliseconds(t){return this._retryDelays[t.previousRetryCount]}}class bn{}bn.Authorization="Authorization",bn.Cookie="Cookie";class K_ extends Ei{constructor(t,r){super(),this._innerClient=t,this._accessTokenFactory=r}async send(t){let r=!0;this._accessTokenFactory&&(!this._accessToken||t.url&&t.url.indexOf("/negotiate?")>0)&&(r=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(t);const n=await this._innerClient.send(t);return r&&n.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(t),await this._innerClient.send(t)):n}_setAuthorizationHeader(t){t.headers||(t.headers={}),this._accessToken?t.headers[bn.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&t.headers[bn.Authorization]&&delete t.headers[bn.Authorization]}getCookieString(t){return this._innerClient.getCookieString(t)}}var Rt;(function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"})(Rt||(Rt={}));var Ht;(function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"})(Ht||(Ht={}));let Q_=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};class Uf{get pollAborted(){return this._pollAbort.aborted}constructor(t,r,n){this._httpClient=t,this._logger=r,this._pollAbort=new Q_,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}async connect(t,r){if(Ot.isRequired(t,"url"),Ot.isRequired(r,"transferFormat"),Ot.isIn(r,Ht,"transferFormat"),this._url=t,this._logger.log(U.Trace,"(LongPolling transport) Connecting."),r===Ht.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[n,o]=Vn(),s={[n]:o,...this._options.headers},i={abortSignal:this._pollAbort.signal,headers:s,timeout:1e5,withCredentials:this._options.withCredentials};r===Ht.Binary&&(i.responseType="arraybuffer");const a=`${t}&_=${Date.now()}`;this._logger.log(U.Trace,`(LongPolling transport) polling: ${a}.`);const c=await this._httpClient.get(a,i);c.statusCode!==200?(this._logger.log(U.Error,`(LongPolling transport) Unexpected response code: ${c.statusCode}.`),this._closeError=new vn(c.statusText||"",c.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,i)}async _poll(t,r){try{for(;this._running;)try{const n=`${t}&_=${Date.now()}`;this._logger.log(U.Trace,`(LongPolling transport) polling: ${n}.`);const o=await this._httpClient.get(n,r);o.statusCode===204?(this._logger.log(U.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):o.statusCode!==200?(this._logger.log(U.Error,`(LongPolling transport) Unexpected response code: ${o.statusCode}.`),this._closeError=new vn(o.statusText||"",o.statusCode),this._running=!1):o.content?(this._logger.log(U.Trace,`(LongPolling transport) data received. ${Mo(o.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(o.content)):this._logger.log(U.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(n){this._running?n instanceof yc?this._logger.log(U.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=n,this._running=!1):this._logger.log(U.Trace,`(LongPolling transport) Poll errored after shutdown: ${n.message}`)}}finally{this._logger.log(U.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(t){return this._running?Bf(this._logger,"LongPolling",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(U.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(U.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const t={},[r,n]=Vn();t[r]=n;const o={headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};let s;try{await this._httpClient.delete(this._url,o)}catch(i){s=i}s?s instanceof vn&&(s.statusCode===404?this._logger.log(U.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(U.Trace,`(LongPolling transport) Error sending a DELETE request: ${s}`)):this._logger.log(U.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(U.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let t="(LongPolling transport) Firing onclose event.";this._closeError&&(t+=" Error: "+this._closeError),this._logger.log(U.Trace,t),this.onclose(this._closeError)}}}class X_{constructor(t,r,n,o){this._httpClient=t,this._accessToken=r,this._logger=n,this._options=o,this.onreceive=null,this.onclose=null}async connect(t,r){return Ot.isRequired(t,"url"),Ot.isRequired(r,"transferFormat"),Ot.isIn(r,Ht,"transferFormat"),this._logger.log(U.Trace,"(SSE transport) Connecting."),this._url=t,this._accessToken&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((n,o)=>{let s=!1;if(r!==Ht.Text){o(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let i;if(_t.isBrowser||_t.isWebWorker)i=new this._options.EventSource(t,{withCredentials:this._options.withCredentials});else{const a=this._httpClient.getCookieString(t),c={};c.Cookie=a;const[l,d]=Vn();c[l]=d,i=new this._options.EventSource(t,{withCredentials:this._options.withCredentials,headers:{...c,...this._options.headers}})}try{i.onmessage=a=>{if(this.onreceive)try{this._logger.log(U.Trace,`(SSE transport) data received. ${Mo(a.data,this._options.logMessageContent)}.`),this.onreceive(a.data)}catch(c){this._close(c);return}},i.onerror=a=>{s?this._close():o(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},i.onopen=()=>{this._logger.log(U.Information,`SSE connected to ${this._url}`),this._eventSource=i,s=!0,n()}}catch(a){o(a);return}})}async send(t){return this._eventSource?Bf(this._logger,"SSE",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(t){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(t))}}class J_{constructor(t,r,n,o,s,i){this._logger=n,this._accessTokenFactory=r,this._logMessageContent=o,this._webSocketConstructor=s,this._httpClient=t,this.onreceive=null,this.onclose=null,this._headers=i}async connect(t,r){Ot.isRequired(t,"url"),Ot.isRequired(r,"transferFormat"),Ot.isIn(r,Ht,"transferFormat"),this._logger.log(U.Trace,"(WebSockets transport) Connecting.");let n;return this._accessTokenFactory&&(n=await this._accessTokenFactory()),new Promise((o,s)=>{t=t.replace(/^http/,"ws");let i;const a=this._httpClient.getCookieString(t);let c=!1;if(_t.isNode||_t.isReactNative){const l={},[d,f]=Vn();l[d]=f,n&&(l[bn.Authorization]=`Bearer ${n}`),a&&(l[bn.Cookie]=a),i=new this._webSocketConstructor(t,void 0,{headers:{...l,...this._headers}})}else n&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n)}`);i||(i=new this._webSocketConstructor(t)),r===Ht.Binary&&(i.binaryType="arraybuffer"),i.onopen=l=>{this._logger.log(U.Information,`WebSocket connected to ${t}.`),this._webSocket=i,c=!0,o()},i.onerror=l=>{let d=null;typeof ErrorEvent<"u"&&l instanceof ErrorEvent?d=l.error:d="There was an error with the transport",this._logger.log(U.Information,`(WebSockets transport) ${d}.`)},i.onmessage=l=>{if(this._logger.log(U.Trace,`(WebSockets transport) data received. ${Mo(l.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(l.data)}catch(d){this._close(d);return}},i.onclose=l=>{if(c)this._close(l);else{let d=null;typeof ErrorEvent<"u"&&l instanceof ErrorEvent?d=l.error:d="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",s(new Error(d))}}})}send(t){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(U.Trace,`(WebSockets transport) sending data. ${Mo(t,this._logMessageContent)}.`),this._webSocket.send(t),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(t){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(U.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(t)&&(t.wasClean===!1||t.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${t.code} (${t.reason||"no reason given"}).`)):t instanceof Error?this.onclose(t):this.onclose())}_isCloseEvent(t){return t&&typeof t.wasClean=="boolean"&&typeof t.code=="number"}}const Wf=100;class ex{constructor(t,r={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,Ot.isRequired(t,"url"),this._logger=P_(r.logger),this.baseUrl=this._resolveUrl(t),r=r||{},r.logMessageContent=r.logMessageContent===void 0?!1:r.logMessageContent,typeof r.withCredentials=="boolean"||r.withCredentials===void 0)r.withCredentials=r.withCredentials===void 0?!0:r.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");r.timeout=r.timeout===void 0?100*1e3:r.timeout;let n=null,o=null;if(_t.isNode&&typeof require<"u"){const s=typeof __webpack_require__=="function"?__non_webpack_require__:require;n=s("ws"),o=s("eventsource")}!_t.isNode&&typeof WebSocket<"u"&&!r.WebSocket?r.WebSocket=WebSocket:_t.isNode&&!r.WebSocket&&n&&(r.WebSocket=n),!_t.isNode&&typeof EventSource<"u"&&!r.EventSource?r.EventSource=EventSource:_t.isNode&&!r.EventSource&&typeof o<"u"&&(r.EventSource=o),this._httpClient=new K_(r.httpClient||new F_(this._logger),r.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=r,this.onreceive=null,this.onclose=null}async start(t){if(t=t||Ht.Binary,Ot.isIn(t,Ht,"transferFormat"),this._logger.log(U.Debug,`Starting connection with transfer format '${Ht[t]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(t),await this._startInternalPromise,this._connectionState==="Disconnecting"){const r="Failed to start the HttpConnection before stop() was called.";return this._logger.log(U.Error,r),await this._stopPromise,Promise.reject(new xr(r))}else if(this._connectionState!=="Connected"){const r="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(U.Error,r),Promise.reject(new xr(r))}this._connectionStarted=!0}send(t){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new xc(this.transport)),this._sendQueue.send(t))}async stop(t){if(this._connectionState==="Disconnected")return this._logger.log(U.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(U.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(r=>{this._stopPromiseResolver=r}),await this._stopInternal(t),await this._stopPromise}async _stopInternal(t){this._stopError=t;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(r){this._logger.log(U.Error,`HttpConnection.transport.stop() threw error '${r}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(U.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(t){let r=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===Rt.WebSockets)this.transport=this._constructTransport(Rt.WebSockets),await this._startTransport(r,t);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let n=null,o=0;do{if(n=await this._getNegotiationResponse(r),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new xr("The connection was stopped during negotiation.");if(n.error)throw new Error(n.error);if(n.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(n.url&&(r=n.url),n.accessToken){const s=n.accessToken;this._accessTokenFactory=()=>s,this._httpClient._accessToken=s,this._httpClient._accessTokenFactory=void 0}o++}while(n.url&&o<Wf);if(o===Wf&&n.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(r,this._options.transport,n,t)}this.transport instanceof Uf&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(U.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(n){return this._logger.log(U.Error,"Failed to start the connection: "+n),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(n)}}async _getNegotiationResponse(t){const r={},[n,o]=Vn();r[n]=o;const s=this._resolveNegotiateUrl(t);this._logger.log(U.Debug,`Sending negotiation request: ${s}.`);try{const i=await this._httpClient.post(s,{content:"",headers:{...r,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(i.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${i.statusCode}'`));const a=JSON.parse(i.content);return(!a.negotiateVersion||a.negotiateVersion<1)&&(a.connectionToken=a.connectionId),a.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new Lf("Client didn't negotiate Stateful Reconnect but the server did.")):a}catch(i){let a="Failed to complete negotiation with the server: "+i;return i instanceof vn&&i.statusCode===404&&(a=a+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(U.Error,a),Promise.reject(new Lf(a))}}_createConnectUrl(t,r){return r?t+(t.indexOf("?")===-1?"?":"&")+`id=${r}`:t}async _createTransport(t,r,n,o){let s=this._createConnectUrl(t,n.connectionToken);if(this._isITransport(r)){this._logger.log(U.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=r,await this._startTransport(s,o),this.connectionId=n.connectionId;return}const i=[],a=n.availableTransports||[];let c=n;for(const l of a){const d=this._resolveTransportOrError(l,r,o,c?.useStatefulReconnect===!0);if(d instanceof Error)i.push(`${l.transport} failed:`),i.push(d);else if(this._isITransport(d)){if(this.transport=d,!c){try{c=await this._getNegotiationResponse(t)}catch(f){return Promise.reject(f)}s=this._createConnectUrl(t,c.connectionToken)}try{await this._startTransport(s,o),this.connectionId=c.connectionId;return}catch(f){if(this._logger.log(U.Error,`Failed to start the transport '${l.transport}': ${f}`),c=void 0,i.push(new T_(`${l.transport} failed: ${f}`,Rt[l.transport])),this._connectionState!=="Connecting"){const p="Failed to select transport before stop() was called.";return this._logger.log(U.Debug,p),Promise.reject(new xr(p))}}}}return i.length>0?Promise.reject(new I_(`Unable to connect to the server with any of the available transports. ${i.join(" ")}`,i)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(t){switch(t){case Rt.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new J_(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case Rt.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new X_(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case Rt.LongPolling:return new Uf(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${t}.`)}}_startTransport(t,r){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=async n=>{let o=!1;if(this.features.reconnect)try{this.features.disconnected(),await this.transport.connect(t,r),await this.features.resend()}catch{o=!0}else{this._stopConnection(n);return}o&&this._stopConnection(n)}:this.transport.onclose=n=>this._stopConnection(n),this.transport.connect(t,r)}_resolveTransportOrError(t,r,n,o){const s=Rt[t.transport];if(s==null)return this._logger.log(U.Debug,`Skipping transport '${t.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${t.transport}' because it is not supported by this client.`);if(tx(r,s))if(t.transferFormats.map(a=>Ht[a]).indexOf(n)>=0){if(s===Rt.WebSockets&&!this._options.WebSocket||s===Rt.ServerSentEvents&&!this._options.EventSource)return this._logger.log(U.Debug,`Skipping transport '${Rt[s]}' because it is not supported in your environment.'`),new k_(`'${Rt[s]}' is not supported in your environment.`,s);this._logger.log(U.Debug,`Selecting transport '${Rt[s]}'.`);try{return this.features.reconnect=s===Rt.WebSockets?o:void 0,this._constructTransport(s)}catch(a){return a}}else return this._logger.log(U.Debug,`Skipping transport '${Rt[s]}' because it does not support the requested transfer format '${Ht[n]}'.`),new Error(`'${Rt[s]}' does not support ${Ht[n]}.`);else return this._logger.log(U.Debug,`Skipping transport '${Rt[s]}' because it was disabled by the client.`),new D_(`'${Rt[s]}' is disabled by the client.`,s)}_isITransport(t){return t&&typeof t=="object"&&"connect"in t}_stopConnection(t){if(this._logger.log(U.Debug,`HttpConnection.stopConnection(${t}) called while in state ${this._connectionState}.`),this.transport=void 0,t=this._stopError||t,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(U.Debug,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(U.Warning,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${t}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),t?this._logger.log(U.Error,`Connection disconnected with error '${t}'.`):this._logger.log(U.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(r=>{this._logger.log(U.Error,`TransportSendQueue.stop() threw error '${r}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(t)}catch(r){this._logger.log(U.Error,`HttpConnection.onclose(${t}) threw error '${r}'.`)}}}_resolveUrl(t){if(t.lastIndexOf("https://",0)===0||t.lastIndexOf("http://",0)===0)return t;if(!_t.isBrowser)throw new Error(`Cannot resolve '${t}'.`);const r=window.document.createElement("a");return r.href=t,this._logger.log(U.Information,`Normalizing '${t}' to '${r.href}'.`),r.href}_resolveNegotiateUrl(t){const r=new URL(t);r.pathname.endsWith("/")?r.pathname+="negotiate":r.pathname+="/negotiate";const n=new URLSearchParams(r.searchParams);return n.has("negotiateVersion")||n.append("negotiateVersion",this._negotiateVersion.toString()),n.has("useStatefulReconnect")?n.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&n.append("useStatefulReconnect","true"),r.search=n.toString(),r.toString()}}function tx(e,t){return!e||(t&e)!==0}class xc{constructor(t){this._transport=t,this._buffer=[],this._executing=!0,this._sendBufferedData=new Di,this._transportResult=new Di,this._sendLoopPromise=this._sendLoop()}send(t){return this._bufferData(t),this._transportResult||(this._transportResult=new Di),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(t){if(this._buffer.length&&typeof this._buffer[0]!=typeof t)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof t}`);this._buffer.push(t),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new Di;const t=this._transportResult;this._transportResult=void 0;const r=typeof this._buffer[0]=="string"?this._buffer.join(""):xc._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(r),t.resolve()}catch(n){t.reject(n)}}}static _concatBuffers(t){const r=t.map(s=>s.byteLength).reduce((s,i)=>s+i),n=new Uint8Array(r);let o=0;for(const s of t)n.set(new Uint8Array(s),o),o+=s.byteLength;return n.buffer}}class Di{constructor(){this.promise=new Promise((t,r)=>[this._resolver,this._rejecter]=[t,r])}resolve(){this._resolver()}reject(t){this._rejecter(t)}}const rx="json";class nx{constructor(){this.name=rx,this.version=2,this.transferFormat=Ht.Text}parseMessages(t,r){if(typeof t!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!t)return[];r===null&&(r=Ao.instance);const n=sr.parse(t),o=[];for(const s of n){const i=JSON.parse(s);if(typeof i.type!="number")throw new Error("Invalid payload.");switch(i.type){case Oe.Invocation:this._isInvocationMessage(i);break;case Oe.StreamItem:this._isStreamItemMessage(i);break;case Oe.Completion:this._isCompletionMessage(i);break;case Oe.Ping:break;case Oe.Close:break;case Oe.Ack:this._isAckMessage(i);break;case Oe.Sequence:this._isSequenceMessage(i);break;default:r.log(U.Information,"Unknown message type '"+i.type+"' ignored.");continue}o.push(i)}return o}writeMessage(t){return sr.write(JSON.stringify(t))}_isInvocationMessage(t){this._assertNotEmptyString(t.target,"Invalid payload for Invocation message."),t.invocationId!==void 0&&this._assertNotEmptyString(t.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(t){if(this._assertNotEmptyString(t.invocationId,"Invalid payload for StreamItem message."),t.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(t){if(t.result&&t.error)throw new Error("Invalid payload for Completion message.");!t.result&&t.error&&this._assertNotEmptyString(t.error,"Invalid payload for Completion message."),this._assertNotEmptyString(t.invocationId,"Invalid payload for Completion message.")}_isAckMessage(t){if(typeof t.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(t){if(typeof t.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(t,r){if(typeof t!="string"||t==="")throw new Error(r)}}const ox={trace:U.Trace,debug:U.Debug,info:U.Information,information:U.Information,warn:U.Warning,warning:U.Warning,error:U.Error,critical:U.Critical,none:U.None};function sx(e){const t=ox[e.toLowerCase()];if(typeof t<"u")return t;throw new Error(`Unknown log level: ${e}`)}class ix{configureLogging(t){if(Ot.isRequired(t,"logging"),ax(t))this.logger=t;else if(typeof t=="string"){const r=sx(t);this.logger=new ki(r)}else this.logger=new ki(t);return this}withUrl(t,r){return Ot.isRequired(t,"url"),Ot.isNotEmpty(t,"url"),this.url=t,typeof r=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...r}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:r},this}withHubProtocol(t){return Ot.isRequired(t,"protocol"),this.protocol=t,this}withAutomaticReconnect(t){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return t?Array.isArray(t)?this.reconnectPolicy=new Vf(t):this.reconnectPolicy=t:this.reconnectPolicy=new Vf,this}withServerTimeout(t){return Ot.isRequired(t,"milliseconds"),this._serverTimeoutInMilliseconds=t,this}withKeepAliveInterval(t){return Ot.isRequired(t,"milliseconds"),this._keepAliveIntervalInMilliseconds=t,this}withStatefulReconnect(t){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=t?.bufferSize,this}build(){const t=this.httpConnectionOptions||{};if(t.logger===void 0&&(t.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const r=new ex(this.url,t);return _c.create(r,this.logger||Ao.instance,this.protocol||new nx,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}function ax(e){return e.log!==void 0}var Po={},Hf;function cx(){if(Hf)return Po;Hf=1;var e=st();Object.defineProperty(Po,"__esModule",{value:!0}),Po.default=void 0;var t=e(dt()),r=ct();return Po.default=(0,t.default)((0,r.jsx)("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday"),Po}var lx=cx();const ux=ot(lx);var Oo={},Yf;function dx(){if(Yf)return Oo;Yf=1;var e=st();Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.default=void 0;var t=e(dt()),r=ct();return Oo.default=(0,t.default)([(0,r.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,r.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime"),Oo}var fx=dx();const jo=ot(fx);var Ro={},qf;function px(){if(qf)return Ro;qf=1;var e=st();Object.defineProperty(Ro,"__esModule",{value:!0}),Ro.default=void 0;var t=e(dt()),r=ct();return Ro.default=(0,t.default)((0,r.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),Ro}var hx=px();const mx=ot(hx);var No={},Zf;function gx(){if(Zf)return No;Zf=1;var e=st();Object.defineProperty(No,"__esModule",{value:!0}),No.default=void 0;var t=e(dt()),r=ct();return No.default=(0,t.default)((0,r.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),No}var vx=gx();const Ur=ot(vx),yx=({invitation:e})=>{const{EventoID:t,Titulo:r,Descripcion:n,FechaInicio:o,FechaFin:s}=e;return u.jsxs(g.Box,{sx:{p:2,mb:1.5,border:"1px solid #e0e0e0",borderRadius:2,bgcolor:"background.paper",boxShadow:1,width:"100%"},children:[u.jsx(g.Typography,{variant:"subtitle1",sx:{fontWeight:"bold",mb:1.5},children:r}),u.jsx(g.Typography,{variant:"subtitle1",sx:{mb:1.5},children:n}),u.jsx(g.Divider,{sx:{my:1}}),u.jsxs(g.Grid,{container:!0,spacing:1,sx:{mb:2},children:[u.jsxs(g.Grid,{item:!0,xs:12,sx:{display:"flex",alignItems:"center"},children:[u.jsx(ux,{fontSize:"small",sx:{color:"text.secondary",mr:1.5}}),u.jsx(g.Typography,{variant:"body2",color:"text.secondary",children:o})]}),u.jsxs(g.Grid,{item:!0,xs:12,sx:{display:"flex",alignItems:"center"},children:[u.jsx(jo,{fontSize:"small",sx:{color:"text.secondary",mr:1.5}}),u.jsx(g.Typography,{variant:"body2",color:"text.secondary",children:o})]})]}),u.jsxs(g.Box,{sx:{display:"flex",gap:1},children:[u.jsx(g.Button,{variant:"contained",color:"primary",startIcon:u.jsx(mx,{}),sx:{flexGrow:1,textTransform:"none",py:1,bgcolor:"#1976D2","&:hover":{bgcolor:"#1565C0"}},children:"Asistiré"}),u.jsx(g.Button,{variant:"outlined",color:"error",startIcon:u.jsx(Ur,{}),sx:{flexGrow:1,textTransform:"none",py:1,color:"#D32F2F",borderColor:"#D32F2F","&:hover":{borderColor:"#D32F2F",bgcolor:"rgba(211, 47, 47, 0.04)"}},children:"Rechazar"})]})]})},bx="https://localhost:7171/hubs/invitaciones",_x=({userId:e})=>{const[t,r]=v.useState([]),[n,o]=v.useState(null),[s,i]=v.useState(!0),[a,c]=v.useState(null),l=v.useCallback(f=>{r(p=>[f,...p]),console.log("Alerta de evento recibida por SignalR:",f)},[]),d=async()=>{await new Promise(f=>setTimeout(f,1e3)),i(!1)};return v.useEffect(()=>{if(!e){i(!1);return}d();const f=new ix().withUrl(bx+`?userId=${e}`).withAutomaticReconnect().configureLogging(U.Information).build();return o(f),f.start().then(()=>{console.log("Conectado a SignalR"),f.on("NotificarInvitacionAEvento",l)}).catch(p=>{console.error("Error SignalR:",p)}),()=>{f.off("NotificarInvitacionAEvento"),f.stop()}},[e,l]),s?u.jsx(g.Box,{p:2,display:"flex",justifyContent:"center",children:u.jsx(g.CircularProgress,{size:24})}):a?u.jsx(g.Box,{p:2,children:u.jsx(g.Alert,{severity:"error",children:a})}):u.jsx(g.Box,{sx:{width:"100%",maxHeight:"600px",overflowY:"auto"},children:u.jsx(g.List,{disablePadding:!0,children:t.length===0?u.jsxs("div",{className:be.emptyStateContainer,children:[u.jsx("img",{src:$f,alt:"Todo en orden",className:be.emptyStateImage})," ",u.jsx("h4",{className:be.emptyStateTitle,children:"Todo en orden aquí"}),u.jsx("p",{className:be.emptyStateText,children:"Por el momento no tienes invitaciones pendientes."})]}):t.map(f=>u.jsx(yx,{invitation:f},f.EventoID))})})},xx=({onEventClick:e,upcomingEvents:t,onSyncOutlook:r,leads30Days:n,leads90Days:o,disID:s,usrID:i,onGoogleEvents:a,onOutlookEvents:c,onAddEvent:l})=>{const{session:d,sessionoutlook:f}=nc(),{enqueueSnackbar:p}=hs.useSnackbar(),y=J=>{const H=new Date,K={start:_.startOfDay(H),end:_.endOfDay(H)},ae={start:J.fechaInicio,end:J.fechaFin};return Ld(K,ae)?"Hoy":_.isTomorrow(J.fechaInicio)?"Mañana":new Intl.DateTimeFormat("es-ES",{day:"numeric",month:"long"}).format(J.fechaInicio)},m={};t.forEach(J=>{const H=y(J);m[H]||(m[H]=[]),m[H].push(J)});const[h,b]=v.useState(!1),S=()=>{b(!h)},[C,D]=v.useState([]),[k,w]=v.useState([]),[B,E]=v.useState(!1),I=Ci(),P=vc(),A=async()=>{E(!0);try{if(d?.userEmail){const J=await I.getGoogleCalendars(d?.userEmail,s);D(J.map((H,K)=>({...H,selected:K===0})))}}catch{console.error("No se pudieron cargar los calendarios de Google desde el backend.")}finally{E(!1)}},W=async()=>{E(!0);try{if(f?.userEmail){const J=await P.getOutlookCalendars(f?.userEmail,s);w(J.map((H,K)=>({...H,selected:K===0})))}}catch{console.error("No se pudieron cargar los calendarios de Google desde el backend.")}finally{E(!1)}},q=J=>{D(H=>H.map(K=>K.id===J?{...K,selected:!K.selected}:K)),a(J)},F=J=>{w(H=>H.map(K=>K.id===J?{...K,selected:!K.selected}:K)),c(J)};v.useEffect(()=>{d?.userEmail&&s?A():D([])},[d?.userEmail,s]),v.useEffect(()=>{f?.userEmail&&s?W():w([])},[f?.userEmail,s]);const Z=async()=>{if(!d?.userEmail||!s||!i){console.error("Faltan datos (email, disID o usrID) para sincronizar eventos.");return}try{await I.syncGoogleEvents(d?.userEmail,s,i),p("Eventos sincronizados con Google Calendar con éxito.",{variant:"success"})}catch{p("Error al sincronizar eventos con Google Calendar.",{variant:"error"})}finally{}},le=async()=>{if(!f?.userEmail||!s||!i){console.error("Faltan datos (email, disID o usrID) para sincronizar eventos.");return}try{await P.syncOutlookEvents(f?.userEmail,s,i),p("Eventos sincronizados con Outlook Calendar con éxito.",{variant:"success"})}catch{p("Error al sincronizar eventos con Outlook Calendar.",{variant:"error"})}finally{}},[V,ee]=v.useState("events"),ue=J=>{ee(J)},[ye,L]=v.useState(!0),te=()=>{L(J=>!J)};return u.jsxs("div",{className:be.sidebarContainer,children:[u.jsxs("div",{className:be.leadsSection,children:[u.jsxs("div",{className:be.leadCard,children:[u.jsx("div",{className:be.leadIcon,children:u.jsx("img",{src:qd})}),u.jsxs("div",{className:be.leadText,children:[u.jsx("div",{className:be.leadDays,children:"+30 días sin atender"}),u.jsxs("div",{className:be.leadCount,children:[n," ",u.jsx("span",{style:{fontSize:10,fontWeight:"normal"},children:"leads"})]})]})]}),u.jsxs("div",{className:be.leadCard,children:[u.jsx("div",{className:be.leadIcon,children:u.jsx("img",{src:qd})}),u.jsxs("div",{className:be.leadText,children:[u.jsx("div",{className:be.leadDays,children:"+90 días sin atender"}),u.jsxs("div",{className:be.leadCount,children:[o," ",u.jsx("span",{style:{fontSize:10,fontWeight:"normal"},children:"leads"})]})]})]})]}),u.jsxs("div",{className:be.eventsSection,children:[u.jsxs("div",{className:be.tabsContainer,children:[u.jsx("button",{className:`${be.tabButton} ${V==="events"?be.activeTab:""}`,onClick:()=>ue("events"),children:"Eventos"}),u.jsxs("button",{className:`${be.tabButton} ${V==="alerts"?be.activeTab:""}`,onClick:()=>ue("alerts"),children:["Alertas",u.jsx("span",{className:be.alertBadge,children:"12"})]})]}),u.jsxs("div",{className:be.eventsContainer,children:[V==="events"&&u.jsx(u.Fragment,{children:u.jsx("div",{className:be.eventsContainer,children:Object.keys(m).length>0?Object.entries(m).map(([J,H])=>u.jsxs("div",{className:`${be.eventGroup}`,children:[u.jsxs("div",{className:be.eventGroupDate,children:[u.jsx("img",{src:K2,width:15})," ",J]}),H.map(K=>{const ae=Ce(K.color||"#ffcc00"),ce=ae.toString(),me=ae.clone().darken(15).toString();return u.jsxs("div",{className:be.eventItem,style:{backgroundColor:ce,borderLeftColor:me},onClick:()=>e(K),children:[u.jsxs("div",{className:be.eventDetails,children:[u.jsx("div",{className:be.eventTitle,children:K.titulo.length>32?`${K.titulo.substring(0,32)}...`:K.titulo}),u.jsx("div",{className:be.eventGroupDate,children:K?.client?K?.client?.length>50?`${K.client.substring(0,50)}...`:K.client:""}),u.jsx("div",{className:be.eventTime,children:`${new Intl.DateTimeFormat("es-ES",{hour:"2-digit",minute:"numeric"}).format(K.fechaInicio)} - ${new Intl.DateTimeFormat("es-ES",{hour:"2-digit",minute:"numeric"}).format(K.fechaFin)}`})]}),K.link&&u.jsx("a",{onClick:ge=>{ge.stopPropagation()},href:K?.link,target:"_blank",style:{textDecoration:"none"},children:u.jsx("img",{src:Q2,width:15,style:{marginLeft:"3px"}})})]},K.eventoID)})]},J)):u.jsxs("div",{className:be.emptyStateContainer,children:[u.jsx("img",{src:$f,alt:"Todo en orden",className:be.emptyStateImage}),u.jsx("h4",{className:be.emptyStateTitle,children:"Tu agenda está despejada"}),u.jsx("p",{className:be.emptyStateText,children:"Parece que no tienes ningún evento en tu calendario. ¿Te gustaría añadir uno? "}),u.jsxs("button",{className:be.addEventButton,onClick:l,children:[u.jsx("img",{src:jd}),"Agregar evento"]})]})})}),V==="alerts"&&u.jsx(g.Box,{children:u.jsx(_x,{userId:i})})]})]}),u.jsxs("div",{className:be.calendarsSection,children:[u.jsxs("button",{onClick:S,className:be.collapsibleHeader,children:[u.jsxs("div",{className:be.headerTitle,children:[u.jsx("span",{style:{fontSize:"14px"},children:"Calendarios"}),u.jsx("span",{className:be.calendarCount,children:"1"})]}),u.jsx(C2,{className:`${be.chevronIcon} ${h?be.collapsed:""}`})]}),u.jsxs("div",{className:`${be.collapsibleContent} ${h?be.hidden:""}`,children:[u.jsxs("button",{className:`${be.calendarSelectButton} ${ye?be.calendarSelected:""}`,onClick:te,style:{"--calendar-color":"#1976D2"},children:[u.jsx("div",{className:be.customCheckIcon,children:ye?u.jsx("div",{className:be.circularCheckbox,children:u.jsx(ec,{size:16,className:be.checkedIcon})}):u.jsx("div",{className:be.uncheckedCircle})}),u.jsx(S2,{size:16,className:be.calendarIcon}),u.jsx("span",{className:be.calendarItemText,children:"Mi calendario"})]}),f.userEmail?u.jsxs("div",{className:be.syncButton,onClick:le,children:[u.jsx("div",{className:be.circularCheckbox,children:u.jsx(ec,{size:16,className:be.checkedIcon})}),u.jsx("img",{src:Nf,width:20}),u.jsx("span",{style:{fontSize:"14px"},children:"Sincronizar Outlook"})]}):u.jsx(E_,{disID:s,usrID:i}),d?.userEmail?u.jsxs("div",{className:be.syncButton,onClick:Z,children:[u.jsx("div",{className:be.circularCheckbox,children:u.jsx(ec,{size:16,className:be.checkedIcon})}),u.jsx("img",{src:Rf,width:18}),u.jsx("span",{style:{fontSize:"14px"},children:"Sincronizar Google"})]}):u.jsx(C_,{disID:s,usrID:i}),f?.userEmail&&u.jsxs(u.Fragment,{children:[u.jsx("br",{}),u.jsx("span",{className:be.currentUserCalendarTitle,children:f?.userEmail}),B?u.jsx(g.CircularProgress,{size:24}):k.length>0?u.jsx(g.List,{dense:!0,className:be.calendarsList,children:k.map(J=>u.jsx(g.ListItem,{secondaryAction:u.jsx(g.Checkbox,{edge:"end",onChange:()=>F(J.id),checked:J.selected||!1,sx:{color:J.backgroundColor,"&.Mui-checked":{color:J.backgroundColor}}}),disablePadding:!0,children:u.jsx(g.ListItemText,{primary:J.summary.length>25?`${J.summary.substring(0,25)}...`:J.summary,className:be.calendarItemText})},J.id))}):u.jsx("p",{style:{fontSize:"12px"},children:"No se encontraron calendarios."})]}),d?.userEmail&&u.jsxs(u.Fragment,{children:[u.jsxs("span",{className:be.currentUserCalendarTitle,children:[" ",d?.userEmail]}),B?u.jsx(g.CircularProgress,{size:24}):C.length>0?u.jsx(g.List,{dense:!0,className:be.calendarsList,children:C.map(J=>u.jsx(g.ListItem,{secondaryAction:u.jsx(g.Checkbox,{edge:"end",onChange:()=>q(J.id),checked:J.selected||!1,sx:{color:J.backgroundColor,"&.Mui-checked":{color:J.backgroundColor}}}),disablePadding:!0,children:u.jsx(g.ListItemText,{primary:J.summary.length>25?`${J.summary.substring(0,25)}...`:J.summary,className:be.calendarItemText})},J.id))}):u.jsx("p",{style:{fontSize:"12px"},children:"No se encontraron calendarios."})]})]})]})]})},wr={dayCell:"_dayCell_ph891_1",dayCellContainer:"_dayCellContainer_ph891_23",dayNumber:"_dayNumber_ph891_55",dayNumberToday:"_dayNumberToday_ph891_69",notCurrentMonth:"_notCurrentMonth_ph891_91",CurrentDay:"_CurrentDay_ph891_129",eventsList:"_eventsList_ph891_137",eventItem:"_eventItem_ph891_155",eventTitle:"_eventTitle_ph891_187",eventTime:"_eventTime_ph891_217",seeMoreLink:"_seeMoreLink_ph891_245"},Gf=25,wx=22,Sx=({dayNumber:e,date:t,events:r,isToday:n,isCurrentMonth:o,onDayClick:s,onEventClick:i,onSeeMoreClick:a})=>{const c=[wr.dayCell,o?"":wr.notCurrentMonth,wr.CurrentDay].join(" ").trim(),l=v.useRef(null),[d,f]=v.useState(r.length),p=()=>{s?.(t)};v.useLayoutEffect(()=>{const h=()=>{if(l.current){const b=l.current.clientHeight;let S=Math.floor(b/Gf);if(S<r.length){const C=Math.floor((b-wx)/Gf);S=Math.max(0,C)}f(S)}};return h(),window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)},[r.length]);const y=r.slice(0,d==0?1:d),m=r.length-(d==0?1:d);return u.jsxs("div",{className:`${c} ${wr.dayCellContainer}`,onClick:p,children:[u.jsx("div",{className:n?wr.dayNumber:wr.dayNumberToday,children:e}),u.jsxs("div",{className:wr.eventsList,ref:l,children:[y.map(h=>u.jsxs("div",{className:wr.eventItem,style:{backgroundColor:h.color||"#007bff"},onClick:b=>{b.stopPropagation(),i?.(h)},children:[u.jsx("span",{className:wr.eventTitle,children:h.titulo}),u.jsx("span",{className:wr.eventTime,children:`${new Intl.DateTimeFormat("es-ES",{hour:"2-digit",minute:"numeric"}).format(h.fechaInicio)} - ${new Intl.DateTimeFormat("es-ES",{hour:"2-digit",minute:"numeric"}).format(h.fechaFin)}`})]},h.eventoID)),m>0&&u.jsxs("div",{className:wr.seeMoreLink,onClick:h=>{h.stopPropagation(),a(r,t)},children:[m," más..."]})]})]})},Kf={weekDaysContainer:"_weekDaysContainer_5h5ol_1",weekDay:"_weekDay_5h5ol_1"},Cx=()=>{const e=["Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"];return u.jsx("div",{className:Kf.weekDaysContainer,children:e.map(t=>u.jsx("div",{className:Kf.weekDay,children:t},t))})},Ti={calendarGridContainer:"_calendarGridContainer_1expw_1",daysContainer:"_daysContainer_1expw_23",rows5:"_rows5_1expw_37",rows6:"_rows6_1expw_45"};function Ex(e,...t){const r=tc.bind(null,t.find(n=>typeof n=="object"));return t.map(r)}function kx(e,t){const[r,n]=Ex(e,t.start,t.end);return{start:r,end:n}}function Dx(e,t){const{start:r,end:n}=kx(t?.in,e);let o=+r>+n;const s=o?+r:+n,i=o?n:r;i.setHours(0,0,0,0);let a=1;const c=[];for(;+i<=s;)c.push(tc(r,i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?c.reverse():c}function Tx(e,t){const r=t?.weekStartsOn,n=Jr(e,t?.in),o=n.getDay(),s=(o<r?-7:0)+6-(o-r);return n.setDate(n.getDate()+s),n.setHours(23,59,59,999),n}function Ix(e,t,r){const n=+Jr(e,r?.in),[o,s]=[+Jr(t.start,r?.in),+Jr(t.end,r?.in)].sort((i,a)=>i-a);return n>=o&&n<=s}const Ax=({currentDate:e,events:t,onDayClick:r,onEventClick:n,onSeeMoreClick:o})=>{const s=_.startOfMonth(e),i=_.endOfMonth(e),a=_.startOfWeek(s,{weekStartsOn:1}),c=Tx(i,{weekStartsOn:1}),l=Dx({start:a,end:c}),d={},f=l.length/7,p=`${Ti.daysContainer} ${f===5?Ti.rows5:Ti.rows6}`;return t.forEach(y=>{const m=_.format(y.fechaInicio,"yyyy-MM-dd");d[m]||(d[m]=[]),d[m].push(y)}),u.jsxs("div",{className:Ti.calendarGridContainer,children:[u.jsx(Cx,{}),u.jsx("div",{className:p,children:l.map(y=>{const m=t.filter(h=>Ix(y,{start:_.startOfDay(h.fechaInicio),end:_.endOfDay(h.fechaFin)}));return u.jsx(Sx,{dayNumber:y.getDate(),date:y,events:m,isToday:_.isToday(y),isCurrentMonth:_.isSameMonth(y,e),onDayClick:r,onEventClick:n,onSeeMoreClick:o},y.toISOString())})})]})},wc=()=>{const{calendarApiUrl:e}=gc(),t=async d=>{try{const f=await Pt.get(`${e}/api/Calendario/v1/local/ListarEventosXUsuario/${d}`);return console.log("eventos",f),f.data.map(p=>{const y=new Date(p.fechaInicio),m=new Date(p.fechaFin),h=p.solicitudRelacionada?.[0]?.nombreCliente??null;return{...p,fechaInicio:y,fechaFin:m,client:h}})}catch(f){return console.error("Error events:",f),[]}},r=async(d,f)=>{try{const p=await Pt.post(`${e}/api/Calendario/v1/local/InsertarEvento/${f}`,d);return{...p.data,fechaInicio:new Date(p.data.fechaInicio),fechaFin:new Date(p.data.fechaFin)}}catch(p){throw console.log("Error creating event:",p),p}},n=async d=>{try{const f=await Pt.post(`${e}/api/Calendario/v1/local/ActualizarEvento/${d.eventoID}`,d);return{eventoID:f.data.eventoID,titulo:f.data.titulo,descripcion:f.data.descripcion,fechaInicio:new Date(f.data.fechaInicio),fechaFin:new Date(f.data.fechaFin),todoElDia:f.data.todoElDia,color:f.data.color,repetir:f.data.repetir,link:f.data.link,solID:f.data.solID,disID:f.data.disID,client:f.data.client}}catch(f){throw console.log("Error updating event:",f),f}},o=async d=>{try{const f=await Pt.get(`${e}/api/Calendario/v1/local/ObtenerEvento/${d}`),p=f.data.solicitudRelacionada?.[0]?.nombreCliente||null;return console.log("response",f.data[0]),{...f.data[0],fechaInicio:f.data[0].fechaInicio,fechaFin:f.data[0].fechaFin,client:p}}catch(f){throw console.error(`Error fetching event with ID ${d}:`,f),f}},s=async d=>{try{await Pt.post(`${e}/api/Calendario/v1/local/EliminarEvento/${d}`)}catch(f){throw console.log(`Error ID ${d}:`,f),f}},i=v.useCallback(async(d,f,p,y)=>{try{const m={masNombreBD:p,usrID:y,disID:f,nombreCliente:d},b=(await Pt.post(`${e}/api/Calendario/v1/local/ConsultaClientesXUsuariologgeado/`,m)).data?.data;return Array.isArray(b)?b.map(S=>({clienteID:S.clienteID,solID:S.solID,marca:S?.marca,modelo:S?.modelo,nombreCliente:S?.nombreCliente})):[]}catch(m){return console.error("Error clientes:",m),[]}},[e]),a=v.useCallback(async(d,f)=>{try{const p={disID:d,usrMail:f},m=(await Pt.post(`${e}/api/Calendario/v1/Consulta_UsuariosInvitados/`,p)).data?.data;return Array.isArray(m)?m.map(h=>({usrID:h.usrID,usrNombre:h.usrNombre,usrMail:h?.usrMail,disID:h?.disID})):[]}catch(p){return console.error("Error usuarios:",p),[]}},[e]),c=async(d,f,p,y,m)=>{const h={TieneConflicto:!1,usrMail:""};try{const b={disID:d,usrMail:f,startDate:p,horaInicio:y,horaFin:m},C=(await Pt.post(`${e}/api/Calendario/v1/local/ConsultaConflictoInvitados`,b)).data?.data;return console.log("conflictos",C),C}catch(b){return console.error("Error al verificar conflicto:",b),h}},l=v.useCallback(async(d,f,p,y)=>{try{const m={disID:d,usrMail:f,startDate:p,DuracionEvento:y},b=(await Pt.post(`${e}/api/Calendario/v1/local/ConsultaDisponibilidadUsuario`,m)).data?.data;return Array.isArray(b)?b.map(S=>({Fecha:S.fecha,HoraInicio:S.horaInicio,HoraFin:S.horaFin})):[]}catch(m){return console.error("Error usuarios:",m),[]}},[e]);return{getEventsByUser:t,createEvent:r,updateEvent:n,getEventById:o,deleteEvent:s,getClients:i,getUsuariosInvitados:a,VerificarConflicto:c,getDisponibilidadUsuario:l}};var $o=e=>e.type==="checkbox",_n=e=>e instanceof Date,Zt=e=>e==null;const Qf=e=>typeof e=="object";var Tt=e=>!Zt(e)&&!Array.isArray(e)&&Qf(e)&&!_n(e),Xf=e=>Tt(e)&&e.target?$o(e.target)?e.target.checked:e.target.value:e,Mx=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Jf=(e,t)=>e.has(Mx(t)),Px=e=>{const t=e.constructor&&e.constructor.prototype;return Tt(t)&&t.hasOwnProperty("isPrototypeOf")},Sc=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Nt(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(Sc&&(e instanceof Blob||n))&&(r||Tt(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!Px(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=Nt(e[o]));else return e;return t}var Ii=e=>/^\w*$/.test(e),It=e=>e===void 0,Cc=e=>Array.isArray(e)?e.filter(Boolean):[],Ec=e=>Cc(e.replace(/["|']|\]/g,"").split(/\.|\[/)),pe=(e,t,r)=>{if(!t||!Tt(e))return r;const n=(Ii(t)?[t]:Ec(t)).reduce((o,s)=>Zt(o)?o:o[s],e);return It(n)||n===e?It(e[t])?r:e[t]:n},ir=e=>typeof e=="boolean",tt=(e,t,r)=>{let n=-1;const o=Ii(t)?[t]:Ec(t),s=o.length,i=s-1;for(;++n<s;){const a=o[n];let c=r;if(n!==i){const l=e[a];c=Tt(l)||Array.isArray(l)?l:isNaN(+o[n+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=c,e=e[a]}};const Ai={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Sr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Wr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},kc=v.createContext(null);kc.displayName="HookFormContext";const Dc=()=>v.useContext(kc),Ox=e=>{const{children:t,...r}=e;return v.createElement(kc.Provider,{value:r},t)};var ep=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(o,s,{get:()=>{const i=s;return t._proxyFormState[i]!==Sr.all&&(t._proxyFormState[i]=!n||Sr.all),r&&(r[i]=!0),e[i]}});return o};const Tc=typeof window<"u"?v.useLayoutEffect:v.useEffect;function jx(e){const t=Dc(),{control:r=t.control,disabled:n,name:o,exact:s}=e||{},[i,a]=v.useState(r._formState),c=v.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Tc(()=>r._subscribe({name:o,formState:c.current,exact:s,callback:l=>{!n&&a({...r._formState,...l})}}),[o,n,s]),v.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),v.useMemo(()=>ep(i,r,c.current,!1),[i,r])}var Nr=e=>typeof e=="string",tp=(e,t,r,n,o)=>Nr(e)?(n&&t.watch.add(e),pe(r,e,o)):Array.isArray(e)?e.map(s=>(n&&t.watch.add(s),pe(r,s))):(n&&(t.watchAll=!0),r),Ic=e=>Zt(e)||!Qf(e);function Hr(e,t,r=new WeakSet){if(Ic(e)||Ic(t))return e===t;if(_n(e)&&_n(t))return e.getTime()===t.getTime();const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const s of n){const i=e[s];if(!o.includes(s))return!1;if(s!=="ref"){const a=t[s];if(_n(i)&&_n(a)||Tt(i)&&Tt(a)||Array.isArray(i)&&Array.isArray(a)?!Hr(i,a,r):i!==a)return!1}}return!0}function rp(e){const t=Dc(),{control:r=t.control,name:n,defaultValue:o,disabled:s,exact:i,compute:a}=e||{},c=v.useRef(o),l=v.useRef(a),d=v.useRef(void 0);l.current=a;const f=v.useMemo(()=>r._getWatch(n,c.current),[r,n]),[p,y]=v.useState(l.current?l.current(f):f);return Tc(()=>r._subscribe({name:n,formState:{values:!0},exact:i,callback:m=>{if(!s){const h=tp(n,r._names,m.values||r._formValues,!1,c.current);if(l.current){const b=l.current(h);Hr(b,d.current)||(y(b),d.current=b)}else y(h)}}}),[r,s,n,i]),v.useEffect(()=>r._removeUnmounted()),p}function Rx(e){const t=Dc(),{name:r,disabled:n,control:o=t.control,shouldUnregister:s,defaultValue:i}=e,a=Jf(o._names.array,r),c=v.useMemo(()=>pe(o._formValues,r,pe(o._defaultValues,r,i)),[o,r,i]),l=rp({control:o,name:r,defaultValue:c,exact:!0}),d=jx({control:o,name:r,exact:!0}),f=v.useRef(e),p=v.useRef(o.register(r,{...e.rules,value:l,...ir(e.disabled)?{disabled:e.disabled}:{}}));f.current=e;const y=v.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!pe(d.errors,r)},isDirty:{enumerable:!0,get:()=>!!pe(d.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!pe(d.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!pe(d.validatingFields,r)},error:{enumerable:!0,get:()=>pe(d.errors,r)}}),[d,r]),m=v.useCallback(C=>p.current.onChange({target:{value:Xf(C),name:r},type:Ai.CHANGE}),[r]),h=v.useCallback(()=>p.current.onBlur({target:{value:pe(o._formValues,r),name:r},type:Ai.BLUR}),[r,o._formValues]),b=v.useCallback(C=>{const D=pe(o._fields,r);D&&C&&(D._f.ref={focus:()=>C.focus&&C.focus(),select:()=>C.select&&C.select(),setCustomValidity:k=>C.setCustomValidity(k),reportValidity:()=>C.reportValidity()})},[o._fields,r]),S=v.useMemo(()=>({name:r,value:l,...ir(n)||d.disabled?{disabled:d.disabled||n}:{},onChange:m,onBlur:h,ref:b}),[r,n,d.disabled,m,h,b,l]);return v.useEffect(()=>{const C=o._options.shouldUnregister||s;o.register(r,{...f.current.rules,...ir(f.current.disabled)?{disabled:f.current.disabled}:{}});const D=(k,w)=>{const B=pe(o._fields,k);B&&B._f&&(B._f.mount=w)};if(D(r,!0),C){const k=Nt(pe(o._options.defaultValues,r));tt(o._defaultValues,r,k),It(pe(o._formValues,r))&&tt(o._formValues,r,k)}return!a&&o.register(r),()=>{(a?C&&!o._state.action:C)?o.unregister(r):D(r,!1)}},[r,o,a,s]),v.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),v.useMemo(()=>({field:S,formState:d,fieldState:y}),[S,d,y])}const ar=e=>e.render(Rx(e));var Ac=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},Lo=e=>Array.isArray(e)?e:[e],np=()=>{let e=[];return{get observers(){return e},next:o=>{for(const s of e)s.next&&s.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(s=>s!==o)}}),unsubscribe:()=>{e=[]}}},Xt=e=>Tt(e)&&!Object.keys(e).length,Mc=e=>e.type==="file",Cr=e=>typeof e=="function",Mi=e=>{if(!Sc)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},op=e=>e.type==="select-multiple",Pc=e=>e.type==="radio",Nx=e=>Pc(e)||$o(e),Oc=e=>Mi(e)&&e.isConnected;function $x(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=It(e)?n++:e[t[n++]];return e}function Lx(e){for(const t in e)if(e.hasOwnProperty(t)&&!It(e[t]))return!1;return!0}function jt(e,t){const r=Array.isArray(t)?t:Ii(t)?[t]:Ec(t),n=r.length===1?e:$x(e,r),o=r.length-1,s=r[o];return n&&delete n[s],o!==0&&(Tt(n)&&Xt(n)||Array.isArray(n)&&Lx(n))&&jt(e,r.slice(0,-1)),e}var sp=e=>{for(const t in e)if(Cr(e[t]))return!0;return!1};function Pi(e,t={}){const r=Array.isArray(e);if(Tt(e)||r)for(const n in e)Array.isArray(e[n])||Tt(e[n])&&!sp(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Pi(e[n],t[n])):Zt(e[n])||(t[n]=!0);return t}function ip(e,t,r){const n=Array.isArray(e);if(Tt(e)||n)for(const o in e)Array.isArray(e[o])||Tt(e[o])&&!sp(e[o])?It(t)||Ic(r[o])?r[o]=Array.isArray(e[o])?Pi(e[o],[]):{...Pi(e[o])}:ip(e[o],Zt(t)?{}:t[o],r[o]):r[o]=!Hr(e[o],t[o]);return r}var zo=(e,t)=>ip(e,t,Pi(t));const ap={value:!1,isValid:!1},cp={value:!0,isValid:!0};var lp=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!It(e[0].attributes.value)?It(e[0].value)||e[0].value===""?cp:{value:e[0].value,isValid:!0}:cp:ap}return ap},up=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>It(e)?e:t?e===""?NaN:e&&+e:r&&Nr(e)?new Date(e):n?n(e):e;const dp={isValid:!1,value:null};var fp=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,dp):dp;function pp(e){const t=e.ref;return Mc(t)?t.files:Pc(t)?fp(e.refs).value:op(t)?[...t.selectedOptions].map(({value:r})=>r):$o(t)?lp(e.refs).value:up(It(t.value)?e.ref.value:t.value,e)}var zx=(e,t,r,n)=>{const o={};for(const s of e){const i=pe(t,s);i&&tt(o,s,i._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},Oi=e=>e instanceof RegExp,Bo=e=>It(e)?e:Oi(e)?e.source:Tt(e)?Oi(e.value)?e.value.source:e.value:e,hp=e=>({isOnSubmit:!e||e===Sr.onSubmit,isOnBlur:e===Sr.onBlur,isOnChange:e===Sr.onChange,isOnAll:e===Sr.all,isOnTouch:e===Sr.onTouched});const mp="AsyncFunction";var Bx=e=>!!e&&!!e.validate&&!!(Cr(e.validate)&&e.validate.constructor.name===mp||Tt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===mp)),Fx=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),gp=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Fo=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const s=pe(e,o);if(s){const{_f:i,...a}=s;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],o)&&!n)return!0;if(i.ref&&t(i.ref,i.name)&&!n)return!0;if(Fo(a,t))break}else if(Tt(a)&&Fo(a,t))break}}};function vp(e,t,r){const n=pe(e,r);if(n||Ii(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const s=o.join("."),i=pe(t,s),a=pe(e,s);if(i&&!Array.isArray(i)&&r!==s)return{name:r};if(a&&a.type)return{name:s,error:a};if(a&&a.root&&a.root.type)return{name:`${s}.root`,error:a.root};o.pop()}return{name:r}}var Vx=(e,t,r,n)=>{r(e);const{name:o,...s}=e;return Xt(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(i=>t[i]===(!n||Sr.all))},Ux=(e,t,r)=>!e||!t||e===t||Lo(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),Wx=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,Hx=(e,t)=>!Cc(pe(e,t)).length&&jt(e,t),Yx=(e,t,r)=>{const n=Lo(pe(e,r));return tt(n,"root",t[r]),tt(e,r,n),e},ji=e=>Nr(e);function yp(e,t,r="validate"){if(ji(e)||Array.isArray(e)&&e.every(ji)||ir(e)&&!e)return{type:r,message:ji(e)?e:"",ref:t}}var Un=e=>Tt(e)&&!Oi(e)?e:{value:e,message:""},bp=async(e,t,r,n,o,s)=>{const{ref:i,refs:a,required:c,maxLength:l,minLength:d,min:f,max:p,pattern:y,validate:m,name:h,valueAsNumber:b,mount:S}=e._f,C=pe(r,h);if(!S||t.has(h))return{};const D=a?a[0]:i,k=q=>{o&&D.reportValidity&&(D.setCustomValidity(ir(q)?"":q||""),D.reportValidity())},w={},B=Pc(i),E=$o(i),I=B||E,P=(b||Mc(i))&&It(i.value)&&It(C)||Mi(i)&&i.value===""||C===""||Array.isArray(C)&&!C.length,A=Ac.bind(null,h,n,w),W=(q,F,Z,le=Wr.maxLength,V=Wr.minLength)=>{const ee=q?F:Z;w[h]={type:q?le:V,message:ee,ref:i,...A(q?le:V,ee)}};if(s?!Array.isArray(C)||!C.length:c&&(!I&&(P||Zt(C))||ir(C)&&!C||E&&!lp(a).isValid||B&&!fp(a).isValid)){const{value:q,message:F}=ji(c)?{value:!!c,message:c}:Un(c);if(q&&(w[h]={type:Wr.required,message:F,ref:D,...A(Wr.required,F)},!n))return k(F),w}if(!P&&(!Zt(f)||!Zt(p))){let q,F;const Z=Un(p),le=Un(f);if(!Zt(C)&&!isNaN(C)){const V=i.valueAsNumber||C&&+C;Zt(Z.value)||(q=V>Z.value),Zt(le.value)||(F=V<le.value)}else{const V=i.valueAsDate||new Date(C),ee=L=>new Date(new Date().toDateString()+" "+L),ue=i.type=="time",ye=i.type=="week";Nr(Z.value)&&C&&(q=ue?ee(C)>ee(Z.value):ye?C>Z.value:V>new Date(Z.value)),Nr(le.value)&&C&&(F=ue?ee(C)<ee(le.value):ye?C<le.value:V<new Date(le.value))}if((q||F)&&(W(!!q,Z.message,le.message,Wr.max,Wr.min),!n))return k(w[h].message),w}if((l||d)&&!P&&(Nr(C)||s&&Array.isArray(C))){const q=Un(l),F=Un(d),Z=!Zt(q.value)&&C.length>+q.value,le=!Zt(F.value)&&C.length<+F.value;if((Z||le)&&(W(Z,q.message,F.message),!n))return k(w[h].message),w}if(y&&!P&&Nr(C)){const{value:q,message:F}=Un(y);if(Oi(q)&&!C.match(q)&&(w[h]={type:Wr.pattern,message:F,ref:i,...A(Wr.pattern,F)},!n))return k(F),w}if(m){if(Cr(m)){const q=await m(C,r),F=yp(q,D);if(F&&(w[h]={...F,...A(Wr.validate,F.message)},!n))return k(F.message),w}else if(Tt(m)){let q={};for(const F in m){if(!Xt(q)&&!n)break;const Z=yp(await m[F](C,r),D,F);Z&&(q={...Z,...A(F,Z.message)},k(Z.message),n&&(w[h]=q))}if(!Xt(q)&&(w[h]={ref:D,...q},!n))return w}}return k(!0),w};const qx={mode:Sr.onSubmit,reValidateMode:Sr.onChange,shouldFocusError:!0};function Zx(e={}){let t={...qx,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Cr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},o=Tt(t.defaultValues)||Tt(t.values)?Nt(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:Nt(o),i={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,l=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let f={...d};const p={array:np(),state:np()},y=t.criteriaMode===Sr.all,m=x=>M=>{clearTimeout(l),l=setTimeout(x,M)},h=async x=>{if(!t.disabled&&(d.isValid||f.isValid||x)){const M=t.resolver?Xt((await E()).errors):await P(n,!0);M!==r.isValid&&p.state.next({isValid:M})}},b=(x,M)=>{!t.disabled&&(d.isValidating||d.validatingFields||f.isValidating||f.validatingFields)&&((x||Array.from(a.mount)).forEach(j=>{j&&(M?tt(r.validatingFields,j,M):jt(r.validatingFields,j))}),p.state.next({validatingFields:r.validatingFields,isValidating:!Xt(r.validatingFields)}))},S=(x,M=[],j,re,se=!0,O=!0)=>{if(re&&j&&!t.disabled){if(i.action=!0,O&&Array.isArray(pe(n,x))){const ne=j(pe(n,x),re.argA,re.argB);se&&tt(n,x,ne)}if(O&&Array.isArray(pe(r.errors,x))){const ne=j(pe(r.errors,x),re.argA,re.argB);se&&tt(r.errors,x,ne),Hx(r.errors,x)}if((d.touchedFields||f.touchedFields)&&O&&Array.isArray(pe(r.touchedFields,x))){const ne=j(pe(r.touchedFields,x),re.argA,re.argB);se&&tt(r.touchedFields,x,ne)}(d.dirtyFields||f.dirtyFields)&&(r.dirtyFields=zo(o,s)),p.state.next({name:x,isDirty:W(x,M),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else tt(s,x,M)},C=(x,M)=>{tt(r.errors,x,M),p.state.next({errors:r.errors})},D=x=>{r.errors=x,p.state.next({errors:r.errors,isValid:!1})},k=(x,M,j,re)=>{const se=pe(n,x);if(se){const O=pe(s,x,It(j)?pe(o,x):j);It(O)||re&&re.defaultChecked||M?tt(s,x,M?O:pp(se._f)):Z(x,O),i.mount&&h()}},w=(x,M,j,re,se)=>{let O=!1,ne=!1;const we={name:x};if(!t.disabled){if(!j||re){(d.isDirty||f.isDirty)&&(ne=r.isDirty,r.isDirty=we.isDirty=W(),O=ne!==we.isDirty);const De=Hr(pe(o,x),M);ne=!!pe(r.dirtyFields,x),De?jt(r.dirtyFields,x):tt(r.dirtyFields,x,!0),we.dirtyFields=r.dirtyFields,O=O||(d.dirtyFields||f.dirtyFields)&&ne!==!De}if(j){const De=pe(r.touchedFields,x);De||(tt(r.touchedFields,x,j),we.touchedFields=r.touchedFields,O=O||(d.touchedFields||f.touchedFields)&&De!==j)}O&&se&&p.state.next(we)}return O?we:{}},B=(x,M,j,re)=>{const se=pe(r.errors,x),O=(d.isValid||f.isValid)&&ir(M)&&r.isValid!==M;if(t.delayError&&j?(c=m(()=>C(x,j)),c(t.delayError)):(clearTimeout(l),c=null,j?tt(r.errors,x,j):jt(r.errors,x)),(j?!Hr(se,j):se)||!Xt(re)||O){const ne={...re,...O&&ir(M)?{isValid:M}:{},errors:r.errors,name:x};r={...r,...ne},p.state.next(ne)}},E=async x=>{b(x,!0);const M=await t.resolver(s,t.context,zx(x||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return b(x),M},I=async x=>{const{errors:M}=await E(x);if(x)for(const j of x){const re=pe(M,j);re?tt(r.errors,j,re):jt(r.errors,j)}else r.errors=M;return M},P=async(x,M,j={valid:!0})=>{for(const re in x){const se=x[re];if(se){const{_f:O,...ne}=se;if(O){const we=a.array.has(O.name),De=se._f&&Bx(se._f);De&&d.validatingFields&&b([re],!0);const R=await bp(se,a.disabled,s,y,t.shouldUseNativeValidation&&!M,we);if(De&&d.validatingFields&&b([re]),R[O.name]&&(j.valid=!1,M))break;!M&&(pe(R,O.name)?we?Yx(r.errors,R,O.name):tt(r.errors,O.name,R[O.name]):jt(r.errors,O.name))}!Xt(ne)&&await P(ne,M,j)}}return j.valid},A=()=>{for(const x of a.unMount){const M=pe(n,x);M&&(M._f.refs?M._f.refs.every(j=>!Oc(j)):!Oc(M._f.ref))&&me(x)}a.unMount=new Set},W=(x,M)=>!t.disabled&&(x&&M&&tt(s,x,M),!Hr(L(),o)),q=(x,M,j)=>tp(x,a,{...i.mount?s:It(M)?o:Nr(x)?{[x]:M}:M},j,M),F=x=>Cc(pe(i.mount?s:o,x,t.shouldUnregister?pe(o,x,[]):[])),Z=(x,M,j={})=>{const re=pe(n,x);let se=M;if(re){const O=re._f;O&&(!O.disabled&&tt(s,x,up(M,O)),se=Mi(O.ref)&&Zt(M)?"":M,op(O.ref)?[...O.ref.options].forEach(ne=>ne.selected=se.includes(ne.value)):O.refs?$o(O.ref)?O.refs.forEach(ne=>{(!ne.defaultChecked||!ne.disabled)&&(Array.isArray(se)?ne.checked=!!se.find(we=>we===ne.value):ne.checked=se===ne.value||!!se)}):O.refs.forEach(ne=>ne.checked=ne.value===se):Mc(O.ref)?O.ref.value="":(O.ref.value=se,O.ref.type||p.state.next({name:x,values:Nt(s)})))}(j.shouldDirty||j.shouldTouch)&&w(x,se,j.shouldTouch,j.shouldDirty,!0),j.shouldValidate&&ye(x)},le=(x,M,j)=>{for(const re in M){if(!M.hasOwnProperty(re))return;const se=M[re],O=x+"."+re,ne=pe(n,O);(a.array.has(x)||Tt(se)||ne&&!ne._f)&&!_n(se)?le(O,se,j):Z(O,se,j)}},V=(x,M,j={})=>{const re=pe(n,x),se=a.array.has(x),O=Nt(M);tt(s,x,O),se?(p.array.next({name:x,values:Nt(s)}),(d.isDirty||d.dirtyFields||f.isDirty||f.dirtyFields)&&j.shouldDirty&&p.state.next({name:x,dirtyFields:zo(o,s),isDirty:W(x,O)})):re&&!re._f&&!Zt(O)?le(x,O,j):Z(x,O,j),gp(x,a)&&p.state.next({...r,name:x}),p.state.next({name:i.mount?x:void 0,values:Nt(s)})},ee=async x=>{i.mount=!0;const M=x.target;let j=M.name,re=!0;const se=pe(n,j),O=De=>{re=Number.isNaN(De)||_n(De)&&isNaN(De.getTime())||Hr(De,pe(s,j,De))},ne=hp(t.mode),we=hp(t.reValidateMode);if(se){let De,R;const ie=M.type?pp(se._f):Xf(x),Se=x.type===Ai.BLUR||x.type===Ai.FOCUS_OUT,qe=!Fx(se._f)&&!t.resolver&&!pe(r.errors,j)&&!se._f.deps||Wx(Se,pe(r.touchedFields,j),r.isSubmitted,we,ne),Q=gp(j,a,Se);tt(s,j,ie),Se?(!M||!M.readOnly)&&(se._f.onBlur&&se._f.onBlur(x),c&&c(0)):se._f.onChange&&se._f.onChange(x);const de=w(j,ie,Se),ke=!Xt(de)||Q;if(!Se&&p.state.next({name:j,type:x.type,values:Nt(s)}),qe)return(d.isValid||f.isValid)&&(t.mode==="onBlur"?Se&&h():Se||h()),ke&&p.state.next({name:j,...Q?{}:de});if(!Se&&Q&&p.state.next({...r}),t.resolver){const{errors:Te}=await E([j]);if(O(ie),re){const lt=vp(r.errors,n,j),Bt=vp(Te,n,lt.name||j);De=Bt.error,j=Bt.name,R=Xt(Te)}}else b([j],!0),De=(await bp(se,a.disabled,s,y,t.shouldUseNativeValidation))[j],b([j]),O(ie),re&&(De?R=!1:(d.isValid||f.isValid)&&(R=await P(n,!0)));re&&(se._f.deps&&ye(se._f.deps),B(j,R,De,de))}},ue=(x,M)=>{if(pe(r.errors,M)&&x.focus)return x.focus(),1},ye=async(x,M={})=>{let j,re;const se=Lo(x);if(t.resolver){const O=await I(It(x)?x:se);j=Xt(O),re=x?!se.some(ne=>pe(O,ne)):j}else x?(re=(await Promise.all(se.map(async O=>{const ne=pe(n,O);return await P(ne&&ne._f?{[O]:ne}:ne)}))).every(Boolean),!(!re&&!r.isValid)&&h()):re=j=await P(n);return p.state.next({...!Nr(x)||(d.isValid||f.isValid)&&j!==r.isValid?{}:{name:x},...t.resolver||!x?{isValid:j}:{},errors:r.errors}),M.shouldFocus&&!re&&Fo(n,ue,x?se:a.mount),re},L=x=>{const M={...i.mount?s:o};return It(x)?M:Nr(x)?pe(M,x):x.map(j=>pe(M,j))},te=(x,M)=>({invalid:!!pe((M||r).errors,x),isDirty:!!pe((M||r).dirtyFields,x),error:pe((M||r).errors,x),isValidating:!!pe(r.validatingFields,x),isTouched:!!pe((M||r).touchedFields,x)}),J=x=>{x&&Lo(x).forEach(M=>jt(r.errors,M)),p.state.next({errors:x?r.errors:{}})},H=(x,M,j)=>{const re=(pe(n,x,{_f:{}})._f||{}).ref,se=pe(r.errors,x)||{},{ref:O,message:ne,type:we,...De}=se;tt(r.errors,x,{...De,...M,ref:re}),p.state.next({name:x,errors:r.errors,isValid:!1}),j&&j.shouldFocus&&re&&re.focus&&re.focus()},K=(x,M)=>Cr(x)?p.state.subscribe({next:j=>"values"in j&&x(q(void 0,M),j)}):q(x,M,!0),ae=x=>p.state.subscribe({next:M=>{Ux(x.name,M.name,x.exact)&&Vx(M,x.formState||d,Be,x.reRenderRoot)&&x.callback({values:{...s},...r,...M,defaultValues:o})}}).unsubscribe,ce=x=>(i.mount=!0,f={...f,...x.formState},ae({...x,formState:f})),me=(x,M={})=>{for(const j of x?Lo(x):a.mount)a.mount.delete(j),a.array.delete(j),M.keepValue||(jt(n,j),jt(s,j)),!M.keepError&&jt(r.errors,j),!M.keepDirty&&jt(r.dirtyFields,j),!M.keepTouched&&jt(r.touchedFields,j),!M.keepIsValidating&&jt(r.validatingFields,j),!t.shouldUnregister&&!M.keepDefaultValue&&jt(o,j);p.state.next({values:Nt(s)}),p.state.next({...r,...M.keepDirty?{isDirty:W()}:{}}),!M.keepIsValid&&h()},ge=({disabled:x,name:M})=>{(ir(x)&&i.mount||x||a.disabled.has(M))&&(x?a.disabled.add(M):a.disabled.delete(M))},fe=(x,M={})=>{let j=pe(n,x);const re=ir(M.disabled)||ir(t.disabled);return tt(n,x,{...j||{},_f:{...j&&j._f?j._f:{ref:{name:x}},name:x,mount:!0,...M}}),a.mount.add(x),j?ge({disabled:ir(M.disabled)?M.disabled:t.disabled,name:x}):k(x,!0,M.value),{...re?{disabled:M.disabled||t.disabled}:{},...t.progressive?{required:!!M.required,min:Bo(M.min),max:Bo(M.max),minLength:Bo(M.minLength),maxLength:Bo(M.maxLength),pattern:Bo(M.pattern)}:{},name:x,onChange:ee,onBlur:ee,ref:se=>{if(se){fe(x,M),j=pe(n,x);const O=It(se.value)&&se.querySelectorAll&&se.querySelectorAll("input,select,textarea")[0]||se,ne=Nx(O),we=j._f.refs||[];if(ne?we.find(De=>De===O):O===j._f.ref)return;tt(n,x,{_f:{...j._f,...ne?{refs:[...we.filter(Oc),O,...Array.isArray(pe(o,x))?[{}]:[]],ref:{type:O.type,name:x}}:{ref:O}}}),k(x,!1,void 0,O)}else j=pe(n,x,{}),j._f&&(j._f.mount=!1),(t.shouldUnregister||M.shouldUnregister)&&!(Jf(a.array,x)&&i.action)&&a.unMount.add(x)}}},he=()=>t.shouldFocusError&&Fo(n,ue,a.mount),Pe=x=>{ir(x)&&(p.state.next({disabled:x}),Fo(n,(M,j)=>{const re=pe(n,j);re&&(M.disabled=re._f.disabled||x,Array.isArray(re._f.refs)&&re._f.refs.forEach(se=>{se.disabled=re._f.disabled||x}))},0,!1))},N=(x,M)=>async j=>{let re;j&&(j.preventDefault&&j.preventDefault(),j.persist&&j.persist());let se=Nt(s);if(p.state.next({isSubmitting:!0}),t.resolver){const{errors:O,values:ne}=await E();r.errors=O,se=Nt(ne)}else await P(n);if(a.disabled.size)for(const O of a.disabled)jt(se,O);if(jt(r.errors,"root"),Xt(r.errors)){p.state.next({errors:{}});try{await x(se,j)}catch(O){re=O}}else M&&await M({...r.errors},j),he(),setTimeout(he);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Xt(r.errors)&&!re,submitCount:r.submitCount+1,errors:r.errors}),re)throw re},Ve=(x,M={})=>{pe(n,x)&&(It(M.defaultValue)?V(x,Nt(pe(o,x))):(V(x,M.defaultValue),tt(o,x,Nt(M.defaultValue))),M.keepTouched||jt(r.touchedFields,x),M.keepDirty||(jt(r.dirtyFields,x),r.isDirty=M.defaultValue?W(x,Nt(pe(o,x))):W()),M.keepError||(jt(r.errors,x),d.isValid&&h()),p.state.next({...r}))},et=(x,M={})=>{const j=x?Nt(x):o,re=Nt(j),se=Xt(x),O=se?o:re;if(M.keepDefaultValues||(o=j),!M.keepValues){if(M.keepDirtyValues){const ne=new Set([...a.mount,...Object.keys(zo(o,s))]);for(const we of Array.from(ne))pe(r.dirtyFields,we)?tt(O,we,pe(s,we)):V(we,pe(O,we))}else{if(Sc&&It(x))for(const ne of a.mount){const we=pe(n,ne);if(we&&we._f){const De=Array.isArray(we._f.refs)?we._f.refs[0]:we._f.ref;if(Mi(De)){const R=De.closest("form");if(R){R.reset();break}}}}if(M.keepFieldsRef)for(const ne of a.mount)V(ne,pe(O,ne));else n={}}s=t.shouldUnregister?M.keepDefaultValues?Nt(o):{}:Nt(O),p.array.next({values:{...O}}),p.state.next({values:{...O}})}a={mount:M.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!d.isValid||!!M.keepIsValid||!!M.keepDirtyValues,i.watch=!!t.shouldUnregister,p.state.next({submitCount:M.keepSubmitCount?r.submitCount:0,isDirty:se?!1:M.keepDirty?r.isDirty:!!(M.keepDefaultValues&&!Hr(x,o)),isSubmitted:M.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:se?{}:M.keepDirtyValues?M.keepDefaultValues&&s?zo(o,s):r.dirtyFields:M.keepDefaultValues&&x?zo(o,x):M.keepDirty?r.dirtyFields:{},touchedFields:M.keepTouched?r.touchedFields:{},errors:M.keepErrors?r.errors:{},isSubmitSuccessful:M.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Ue=(x,M)=>et(Cr(x)?x(s):x,M),Ae=(x,M={})=>{const j=pe(n,x),re=j&&j._f;if(re){const se=re.refs?re.refs[0]:re.ref;se.focus&&(se.focus(),M.shouldSelect&&Cr(se.select)&&se.select())}},Be=x=>{r={...r,...x}},rt={control:{register:fe,unregister:me,getFieldState:te,handleSubmit:N,setError:H,_subscribe:ae,_runSchema:E,_focusError:he,_getWatch:q,_getDirty:W,_setValid:h,_setFieldArray:S,_setDisabledField:ge,_setErrors:D,_getFieldArray:F,_reset:et,_resetDefaultValues:()=>Cr(t.defaultValues)&&t.defaultValues().then(x=>{Ue(x,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:A,_disableForm:Pe,_subjects:p,_proxyFormState:d,get _fields(){return n},get _formValues(){return s},get _state(){return i},set _state(x){i=x},get _defaultValues(){return o},get _names(){return a},set _names(x){a=x},get _formState(){return r},get _options(){return t},set _options(x){t={...t,...x}}},subscribe:ce,trigger:ye,register:fe,handleSubmit:N,watch:K,setValue:V,getValues:L,reset:Ue,resetField:Ve,clearErrors:J,unregister:me,setError:H,setFocus:Ae,getFieldState:te};return{...rt,formControl:rt}}function _p(e={}){const t=v.useRef(void 0),r=v.useRef(void 0),[n,o]=v.useState({isDirty:!1,isValidating:!1,isLoading:Cr(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Cr(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!Cr(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:i,...a}=Zx(e);t.current={...a,formState:n}}const s=t.current.control;return s._options=e,Tc(()=>{const i=s._subscribe({formState:s._proxyFormState,callback:()=>o({...s._formState}),reRenderRoot:!0});return o(a=>({...a,isReady:!0})),s._formState.isReady=!0,i},[s]),v.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),v.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),v.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),v.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),v.useEffect(()=>{if(s._proxyFormState.isDirty){const i=s._getDirty();i!==n.isDirty&&s._subjects.state.next({isDirty:i})}},[s,n.isDirty]),v.useEffect(()=>{e.values&&!Hr(e.values,r.current)?(s._reset(e.values,{keepFieldsRef:!0,...s._options.resetOptions}),r.current=e.values,o(i=>({...i}))):s._resetDefaultValues()},[s,e.values]),v.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=ep(n,s),t.current}const xp=(e,t,r)=>{if(e&&"reportValidity"in e){const n=pe(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},jc=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?xp(n.ref,r,e):n&&n.refs&&n.refs.forEach(o=>xp(o,r,e))}},wp=(e,t)=>{t.shouldUseNativeValidation&&jc(e,t);const r={};for(const n in e){const o=pe(t.fields,n),s=Object.assign(e[n]||{},{ref:o&&o.ref});if(Gx(t.names||Object.keys(e),n)){const i=Object.assign({},pe(r,n));tt(i,"root",s),tt(r,n,i)}else tt(r,n,s)}return r},Gx=(e,t)=>{const r=Sp(t);return e.some(n=>Sp(n).match(`^${r}\\.\\d+`))};function Sp(e){return e.replace(/\]|\[/g,"")}function G(e,t,r){function n(a,c){var l;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(l=a._zod).traits??(l.traits=new Set),a._zod.traits.add(e),t(a,c);for(const d in i.prototype)d in a||Object.defineProperty(a,d,{value:i.prototype[d].bind(a)});a._zod.constr=i,a._zod.def=c}const o=r?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function i(a){var c;const l=r?.Parent?new s:this;n(l,a),(c=l._zod).deferred??(c.deferred=[]);for(const d of l._zod.deferred)d();return l}return Object.defineProperty(i,"init",{value:n}),Object.defineProperty(i,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class Wn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Cp extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Ep={};function xn(e){return Ep}function Kx(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function Rc(e,t){return typeof t=="bigint"?t.toString():t}function Nc(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function $c(e){return e==null}function Lc(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Qx(e,t){const r=(e.toString().split(".")[1]||"").length,n=t.toString();let o=(n.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(n)){const c=n.match(/\d?e-(\d?)/);c?.[1]&&(o=Number.parseInt(c[1]))}const s=r>o?r:o,i=Number.parseInt(e.toFixed(s).replace(".","")),a=Number.parseInt(t.toFixed(s).replace(".",""));return i%a/10**s}const kp=Symbol("evaluating");function ft(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==kp)return n===void 0&&(n=kp,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Xx(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function en(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Hn(...e){const t={};for(const r of e){const n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function Dp(e){return JSON.stringify(e)}const Tp="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ri(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Jx=Nc(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Vo(e){if(Ri(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(Ri(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Ip(e){return Vo(e)?{...e}:e}const ew=new Set(["string","number","symbol"]);function Yn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tn(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function Ee(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function tw(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const rw={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function nw(e,t){const r=e._zod.def,n=Hn(e._zod.def,{get shape(){const o={};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(o[s]=r.shape[s])}return en(this,"shape",o),o},checks:[]});return tn(e,n)}function ow(e,t){const r=e._zod.def,n=Hn(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete o[s]}return en(this,"shape",o),o},checks:[]});return tn(e,n)}function sw(e,t){if(!Vo(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const o=Hn(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return en(this,"shape",s),s},checks:[]});return tn(e,o)}function iw(e,t){if(!Vo(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return en(this,"shape",n),n},checks:e._zod.def.checks};return tn(e,r)}function aw(e,t){const r=Hn(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return en(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return tn(e,r)}function cw(e,t,r){const n=Hn(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(r)for(const i in r){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(s[i]=e?new e({type:"optional",innerType:o[i]}):o[i])}else for(const i in o)s[i]=e?new e({type:"optional",innerType:o[i]}):o[i];return en(this,"shape",s),s},checks:[]});return tn(t,n)}function lw(e,t,r){const n=Hn(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(r)for(const i in r){if(!(i in s))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(s[i]=new e({type:"nonoptional",innerType:o[i]}))}else for(const i in o)s[i]=new e({type:"nonoptional",innerType:o[i]});return en(this,"shape",s),s},checks:[]});return tn(t,n)}function qn(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Ap(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Ni(e){return typeof e=="string"?e:e?.message}function wn(e,t,r){const n={...e,path:e.path??[]};if(!e.message){const o=Ni(e.inst?._zod.def?.error?.(e))??Ni(t?.error?.(e))??Ni(r.customError?.(e))??Ni(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function zc(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Uo(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}const Mp=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Rc,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Bc=G("$ZodError",Mp),$i=G("$ZodError",Mp,{Parent:Error});function uw(e,t=r=>r.message){const r={},n=[];for(const o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}function dw(e,t){const r=t||function(s){return s.message},n={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>o({issues:a}));else if(i.code==="invalid_key")o({issues:i.issues});else if(i.code==="invalid_element")o({issues:i.issues});else if(i.path.length===0)n._errors.push(r(i));else{let a=n,c=0;for(;c<i.path.length;){const l=i.path[c];c===i.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(r(i))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return o(e),n}const Li=e=>(t,r,n,o)=>{const s=n?Object.assign(n,{async:!1}):{async:!1},i=t._zod.run({value:r,issues:[]},s);if(i instanceof Promise)throw new Wn;if(i.issues.length){const a=new(o?.Err??e)(i.issues.map(c=>wn(c,s,xn())));throw Tp(a,o?.callee),a}return i.value},fw=Li($i),zi=e=>async(t,r,n,o)=>{const s=n?Object.assign(n,{async:!0}):{async:!0};let i=t._zod.run({value:r,issues:[]},s);if(i instanceof Promise&&(i=await i),i.issues.length){const a=new(o?.Err??e)(i.issues.map(c=>wn(c,s,xn())));throw Tp(a,o?.callee),a}return i.value},pw=zi($i),Bi=e=>(t,r,n)=>{const o=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Wn;return s.issues.length?{success:!1,error:new(e??Bc)(s.issues.map(i=>wn(i,o,xn())))}:{success:!0,data:s.value}},hw=Bi($i),Fi=e=>async(t,r,n)=>{const o=n?Object.assign(n,{async:!0}):{async:!0};let s=t._zod.run({value:r,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(i=>wn(i,o,xn())))}:{success:!0,data:s.value}},mw=Fi($i),gw=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Li(e)(t,r,o)},vw=e=>(t,r,n)=>Li(e)(t,r,n),yw=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return zi(e)(t,r,o)},bw=e=>async(t,r,n)=>zi(e)(t,r,n),_w=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Bi(e)(t,r,o)},xw=e=>(t,r,n)=>Bi(e)(t,r,n),ww=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Fi(e)(t,r,o)},Sw=e=>async(t,r,n)=>Fi(e)(t,r,n),Cw=/^[cC][^\s-]{8,}$/,Ew=/^[0-9a-z]+$/,kw=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Dw=/^[0-9a-vA-V]{20}$/,Tw=/^[A-Za-z0-9]{27}$/,Iw=/^[a-zA-Z0-9_-]{21}$/,Aw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Mw=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Pp=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Pw=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ow="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function jw(){return new RegExp(Ow,"u")}const Rw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Nw=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,$w=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Lw=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,zw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Op=/^[A-Za-z0-9_-]*$/,Bw=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Fw=/^\+(?:[0-9]){6,14}[0-9]$/,jp="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Vw=new RegExp(`^${jp}$`);function Rp(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Uw(e){return new RegExp(`^${Rp(e)}$`)}function Ww(e){const t=Rp({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${jp}T(?:${n})$`)}const Hw=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Yw=/^\d+$/,qw=/^-?\d+(?:\.\d+)?/i,Zw=/true|false/i,Gw=/^[^A-Z]*$/,Kw=/^[^a-z]*$/,Jt=G("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Np={number:"number",bigint:"bigint",object:"date"},$p=G("$ZodCheckLessThan",(e,t)=>{Jt.init(e,t);const r=Np[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Lp=G("$ZodCheckGreaterThan",(e,t)=>{Jt.init(e,t);const r=Np[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Qw=G("$ZodCheckMultipleOf",(e,t)=>{Jt.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Qx(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Xw=G("$ZodCheckNumberFormat",(e,t)=>{Jt.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[o,s]=rw[t.format];e._zod.onattach.push(i=>{const a=i._zod.bag;a.format=t.format,a.minimum=o,a.maximum=s,r&&(a.pattern=Yw)}),e._zod.check=i=>{const a=i.value;if(r){if(!Number.isInteger(a)){i.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?i.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort}):i.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort});return}}a<o&&i.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>s&&i.issues.push({origin:"number",input:a,code:"too_big",maximum:s,inst:e})}}),Jw=G("$ZodCheckMaxLength",(e,t)=>{var r;Jt.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!$c(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const o=n.value;if(o.length<=t.maximum)return;const i=zc(o);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),eS=G("$ZodCheckMinLength",(e,t)=>{var r;Jt.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!$c(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const o=n.value;if(o.length>=t.minimum)return;const i=zc(o);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),tS=G("$ZodCheckLengthEquals",(e,t)=>{var r;Jt.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!$c(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=n=>{const o=n.value,s=o.length;if(s===t.length)return;const i=zc(o),a=s>t.length;n.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Vi=G("$ZodCheckStringFormat",(e,t)=>{var r,n;Jt.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),rS=G("$ZodCheckRegex",(e,t)=>{Vi.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),nS=G("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Gw),Vi.init(e,t)}),oS=G("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Kw),Vi.init(e,t)}),sS=G("$ZodCheckIncludes",(e,t)=>{Jt.init(e,t);const r=Yn(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),iS=G("$ZodCheckStartsWith",(e,t)=>{Jt.init(e,t);const r=new RegExp(`^${Yn(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),aS=G("$ZodCheckEndsWith",(e,t)=>{Jt.init(e,t);const r=new RegExp(`.*${Yn(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),cS=G("$ZodCheckOverwrite",(e,t)=>{Jt.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class lS{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(`
155
+ */const k2=di("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),Ld=Symbol.for("constructDateFrom");function nc(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Ld in e?e[Ld](t):e instanceof Date?new e.constructor(t):new Date(t)}function Jr(e,t){return nc(t||e,e)}function zd(e,t,r){const[n,o]=[+Jr(e.start,r?.in),+Jr(e.end,r?.in)].sort((a,c)=>a-c),[s,i]=[+Jr(t.start,r?.in),+Jr(t.end,r?.in)].sort((a,c)=>a-c);return n<i&&s<o}function fi(e){"@babel/helpers - typeof";return fi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fi(e)}var T2=/^\s+/,I2=/\s+$/;function ke(e,t){if(e=e||"",t=t||{},e instanceof ke)return e;if(!(this instanceof ke))return new ke(e,t);var r=A2(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}ke.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),r,n,o,s,i,a;return r=t.r/255,n=t.g/255,o=t.b/255,r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),n<=.03928?i=n/12.92:i=Math.pow((n+.055)/1.055,2.4),o<=.03928?a=o/12.92:a=Math.pow((o+.055)/1.055,2.4),.2126*s+.7152*i+.0722*a},setAlpha:function(t){return this._a=Wd(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=Fd(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=Fd(this._r,this._g,this._b),r=Math.round(t.h*360),n=Math.round(t.s*100),o=Math.round(t.v*100);return this._a==1?"hsv("+r+", "+n+"%, "+o+"%)":"hsva("+r+", "+n+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var t=Bd(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=Bd(this._r,this._g,this._b),r=Math.round(t.h*360),n=Math.round(t.s*100),o=Math.round(t.l*100);return this._a==1?"hsl("+r+", "+n+"%, "+o+"%)":"hsla("+r+", "+n+"%, "+o+"%, "+this._roundA+")"},toHex:function(t){return Vd(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return j2(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(vt(this._r,255)*100)+"%",g:Math.round(vt(this._g,255)*100)+"%",b:Math.round(vt(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(vt(this._r,255)*100)+"%, "+Math.round(vt(this._g,255)*100)+"%, "+Math.round(vt(this._b,255)*100)+"%)":"rgba("+Math.round(vt(this._r,255)*100)+"%, "+Math.round(vt(this._g,255)*100)+"%, "+Math.round(vt(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Y2[Vd(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var r="#"+Ud(this._r,this._g,this._b,this._a),n=r,o=this._gradientType?"GradientType = 1, ":"";if(t){var s=ke(t);n="#"+Ud(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+r+",endColorstr="+n+")"},toString:function(t){var r=!!t;t=t||this._format;var n=!1,o=this._a<1&&this._a>=0,s=!r&&o&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return s?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return ke(this.toString())},_applyModification:function(t,r){var n=t.apply(null,[this].concat([].slice.call(r)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(L2,arguments)},brighten:function(){return this._applyModification(z2,arguments)},darken:function(){return this._applyModification(B2,arguments)},desaturate:function(){return this._applyModification(R2,arguments)},saturate:function(){return this._applyModification(N2,arguments)},greyscale:function(){return this._applyModification($2,arguments)},spin:function(){return this._applyModification(F2,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(H2,arguments)},complement:function(){return this._applyCombination(V2,arguments)},monochromatic:function(){return this._applyCombination(W2,arguments)},splitcomplement:function(){return this._applyCombination(U2,arguments)},triad:function(){return this._applyCombination(Hd,[3])},tetrad:function(){return this._applyCombination(Hd,[4])}},ke.fromRatio=function(e,t){if(fi(e)=="object"){var r={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?r[n]=e[n]:r[n]=Co(e[n]));e=r}return ke(e,t)};function A2(e){var t={r:0,g:0,b:0},r=1,n=null,o=null,s=null,i=!1,a=!1;return typeof e=="string"&&(e=K2(e)),fi(e)=="object"&&(Vr(e.r)&&Vr(e.g)&&Vr(e.b)?(t=M2(e.r,e.g,e.b),i=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Vr(e.h)&&Vr(e.s)&&Vr(e.v)?(n=Co(e.s),o=Co(e.v),t=O2(e.h,n,o),i=!0,a="hsv"):Vr(e.h)&&Vr(e.s)&&Vr(e.l)&&(n=Co(e.s),s=Co(e.l),t=P2(e.h,n,s),i=!0,a="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=Wd(r),{ok:i,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function M2(e,t,r){return{r:vt(e,255)*255,g:vt(t,255)*255,b:vt(r,255)*255}}function Bd(e,t,r){e=vt(e,255),t=vt(t,255),r=vt(r,255);var n=Math.max(e,t,r),o=Math.min(e,t,r),s,i,a=(n+o)/2;if(n==o)s=i=0;else{var c=n-o;switch(i=a>.5?c/(2-n-o):c/(n+o),n){case e:s=(t-r)/c+(t<r?6:0);break;case t:s=(r-e)/c+2;break;case r:s=(e-t)/c+4;break}s/=6}return{h:s,s:i,l:a}}function P2(e,t,r){var n,o,s;e=vt(e,360),t=vt(t,100),r=vt(r,100);function i(l,d,f){return f<0&&(f+=1),f>1&&(f-=1),f<1/6?l+(d-l)*6*f:f<1/2?d:f<2/3?l+(d-l)*(2/3-f)*6:l}if(t===0)n=o=s=r;else{var a=r<.5?r*(1+t):r+t-r*t,c=2*r-a;n=i(c,a,e+1/3),o=i(c,a,e),s=i(c,a,e-1/3)}return{r:n*255,g:o*255,b:s*255}}function Fd(e,t,r){e=vt(e,255),t=vt(t,255),r=vt(r,255);var n=Math.max(e,t,r),o=Math.min(e,t,r),s,i,a=n,c=n-o;if(i=n===0?0:c/n,n==o)s=0;else{switch(n){case e:s=(t-r)/c+(t<r?6:0);break;case t:s=(r-e)/c+2;break;case r:s=(e-t)/c+4;break}s/=6}return{h:s,s:i,v:a}}function O2(e,t,r){e=vt(e,360)*6,t=vt(t,100),r=vt(r,100);var n=Math.floor(e),o=e-n,s=r*(1-t),i=r*(1-o*t),a=r*(1-(1-o)*t),c=n%6,l=[r,i,s,s,a,r][c],d=[a,r,r,i,s,s][c],f=[s,s,a,r,r,i][c];return{r:l*255,g:d*255,b:f*255}}function Vd(e,t,r,n){var o=[_r(Math.round(e).toString(16)),_r(Math.round(t).toString(16)),_r(Math.round(r).toString(16))];return n&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function j2(e,t,r,n,o){var s=[_r(Math.round(e).toString(16)),_r(Math.round(t).toString(16)),_r(Math.round(r).toString(16)),_r(Yd(n))];return o&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function Ud(e,t,r,n){var o=[_r(Yd(n)),_r(Math.round(e).toString(16)),_r(Math.round(t).toString(16)),_r(Math.round(r).toString(16))];return o.join("")}ke.equals=function(e,t){return!e||!t?!1:ke(e).toRgbString()==ke(t).toRgbString()},ke.random=function(){return ke.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function R2(e,t){t=t===0?0:t||10;var r=ke(e).toHsl();return r.s-=t/100,r.s=pi(r.s),ke(r)}function N2(e,t){t=t===0?0:t||10;var r=ke(e).toHsl();return r.s+=t/100,r.s=pi(r.s),ke(r)}function $2(e){return ke(e).desaturate(100)}function L2(e,t){t=t===0?0:t||10;var r=ke(e).toHsl();return r.l+=t/100,r.l=pi(r.l),ke(r)}function z2(e,t){t=t===0?0:t||10;var r=ke(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),ke(r)}function B2(e,t){t=t===0?0:t||10;var r=ke(e).toHsl();return r.l-=t/100,r.l=pi(r.l),ke(r)}function F2(e,t){var r=ke(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,ke(r)}function V2(e){var t=ke(e).toHsl();return t.h=(t.h+180)%360,ke(t)}function Hd(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=ke(e).toHsl(),n=[ke(e)],o=360/t,s=1;s<t;s++)n.push(ke({h:(r.h+s*o)%360,s:r.s,l:r.l}));return n}function U2(e){var t=ke(e).toHsl(),r=t.h;return[ke(e),ke({h:(r+72)%360,s:t.s,l:t.l}),ke({h:(r+216)%360,s:t.s,l:t.l})]}function H2(e,t,r){t=t||6,r=r||30;var n=ke(e).toHsl(),o=360/r,s=[ke(e)];for(n.h=(n.h-(o*t>>1)+720)%360;--t;)n.h=(n.h+o)%360,s.push(ke(n));return s}function W2(e,t){t=t||6;for(var r=ke(e).toHsv(),n=r.h,o=r.s,s=r.v,i=[],a=1/t;t--;)i.push(ke({h:n,s:o,v:s})),s=(s+a)%1;return i}ke.mix=function(e,t,r){r=r===0?0:r||50;var n=ke(e).toRgb(),o=ke(t).toRgb(),s=r/100,i={r:(o.r-n.r)*s+n.r,g:(o.g-n.g)*s+n.g,b:(o.b-n.b)*s+n.b,a:(o.a-n.a)*s+n.a};return ke(i)},ke.readability=function(e,t){var r=ke(e),n=ke(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},ke.isReadable=function(e,t,r){var n=ke.readability(e,t),o,s;switch(s=!1,o=Q2(r),o.level+o.size){case"AAsmall":case"AAAlarge":s=n>=4.5;break;case"AAlarge":s=n>=3;break;case"AAAsmall":s=n>=7;break}return s},ke.mostReadable=function(e,t,r){var n=null,o=0,s,i,a,c;r=r||{},i=r.includeFallbackColors,a=r.level,c=r.size;for(var l=0;l<t.length;l++)s=ke.readability(e,t[l]),s>o&&(o=s,n=ke(t[l]));return ke.isReadable(e,n,{level:a,size:c})||!i?n:(r.includeFallbackColors=!1,ke.mostReadable(e,["#fff","#000"],r))};var oc=ke.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Y2=ke.hexNames=q2(oc);function q2(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function Wd(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function vt(e,t){Z2(e)&&(e="100%");var r=G2(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function pi(e){return Math.min(1,Math.max(0,e))}function sr(e){return parseInt(e,16)}function Z2(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function G2(e){return typeof e=="string"&&e.indexOf("%")!=-1}function _r(e){return e.length==1?"0"+e:""+e}function Co(e){return e<=1&&(e=e*100+"%"),e}function Yd(e){return Math.round(parseFloat(e)*255).toString(16)}function qd(e){return sr(e)/255}var xr=(function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",r="(?:"+t+")|(?:"+e+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",o="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function Vr(e){return!!xr.CSS_UNIT.exec(e)}function K2(e){e=e.replace(T2,"").replace(I2,"").toLowerCase();var t=!1;if(oc[e])e=oc[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=xr.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=xr.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=xr.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=xr.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=xr.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=xr.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=xr.hex8.exec(e))?{r:sr(r[1]),g:sr(r[2]),b:sr(r[3]),a:qd(r[4]),format:t?"name":"hex8"}:(r=xr.hex6.exec(e))?{r:sr(r[1]),g:sr(r[2]),b:sr(r[3]),format:t?"name":"hex"}:(r=xr.hex4.exec(e))?{r:sr(r[1]+""+r[1]),g:sr(r[2]+""+r[2]),b:sr(r[3]+""+r[3]),a:qd(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=xr.hex3.exec(e))?{r:sr(r[1]+""+r[1]),g:sr(r[2]+""+r[2]),b:sr(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function Q2(e){var t,r;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:t,size:r}}const Zd="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20fill='none'%3e%3cpath%20fill='%23C4D9F5'%20d='M36.667%2020c0%209.205-7.462%2016.667-16.667%2016.667S3.333%2029.205%203.333%2020%2010.795%203.333%2020%203.333%2036.667%2010.795%2036.667%2020'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M20%2012.083c.69%200%201.25.56%201.25%201.25v6.15l3.8%203.8a1.25%201.25%200%201%201-1.767%201.767l-4.167-4.166A1.25%201.25%200%200%201%2018.75%2020v-6.667c0-.69.56-1.25%201.25-1.25'%20clip-rule='evenodd'/%3e%3c/svg%3e",X2="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='23'%20height='24'%20fill='none'%3e%3cpath%20fill='%23333'%20d='M17.614%202.64h-.5v-.622c0-.566-.443-1.018-.998-1.018s-.998.452-.998%201.018v.622H7.893v-.622C7.894%201.452%207.45%201%206.895%201s-.999.452-.999%201.018v.622h-.5C2.946%202.64.959%204.665.959%207.165v11.31c0%202.5%201.987%204.525%204.439%204.525h12.206c2.452%200%204.439-2.025%204.439-4.524V7.165c0-2.5-1.987-4.525-4.439-4.525zm0%2018.098H5.408c-1.22%200-2.22-1.018-2.22-2.262V10.41h16.646v8.065c0%201.244-1%202.262-2.22%202.262'/%3e%3c/svg%3e",J2="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23404756'%20d='M12.667%204.667a3%203%200%200%201%203%203v8.667a3%203%200%200%201-3%203H4a3%203%200%200%201-3-3V7.667a3%203%200%200%201%203-3zM21.36%206.237a1%201%200%200%201%201.64.77V17a1%201%200%200%201-1.64.768L17%2014.135V9.867z'/%3e%3c/svg%3e",Gd=y.createContext(void 0),e1=({children:e})=>{const[t,r]=y.useState(()=>({userEmail:localStorage.getItem("user_email")||null})),[n,o]=y.useState(()=>({userEmail:localStorage.getItem("user_outlook")||null})),s=y.useCallback(l=>{localStorage.setItem("user_email",l),r({userEmail:l})},[]),i=y.useCallback(l=>{localStorage.setItem("user_outlook",l),o({userEmail:l})},[]),a=y.useCallback(()=>{localStorage.removeItem("user_email"),r({userEmail:null})},[]),c=!!t.userEmail;return u.jsx(Gd.Provider,{value:{session:t,sessionoutlook:n,login:s,loginOutlook:i,logout:a,isAuthenticated:c},children:e})},sc=()=>{const e=y.useContext(Gd);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e};function Kd(e,t){return function(){return e.apply(t,arguments)}}const{toString:t1}=Object.prototype,{getPrototypeOf:ic}=Object,{iterator:hi,toStringTag:Qd}=Symbol,mi=(e=>t=>{const r=t1.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),wr=e=>(e=e.toLowerCase(),t=>mi(t)===e),gi=e=>t=>typeof t===e,{isArray:Fn}=Array,Eo=gi("undefined");function Do(e){return e!==null&&!Eo(e)&&e.constructor!==null&&!Eo(e.constructor)&&Qt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Xd=wr("ArrayBuffer");function r1(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Xd(e.buffer),t}const n1=gi("string"),Qt=gi("function"),Jd=gi("number"),ko=e=>e!==null&&typeof e=="object",o1=e=>e===!0||e===!1,vi=e=>{if(mi(e)!=="object")return!1;const t=ic(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Qd in e)&&!(hi in e)},s1=e=>{if(!ko(e)||Do(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},i1=wr("Date"),a1=wr("File"),c1=wr("Blob"),l1=wr("FileList"),u1=e=>ko(e)&&Qt(e.pipe),d1=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Qt(e.append)&&((t=mi(e))==="formdata"||t==="object"&&Qt(e.toString)&&e.toString()==="[object FormData]"))},f1=wr("URLSearchParams"),[p1,h1,m1,g1]=["ReadableStream","Request","Response","Headers"].map(wr),v1=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function To(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),Fn(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(Do(e))return;const s=r?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let a;for(n=0;n<i;n++)a=s[n],t.call(null,e[a],a,e)}}function ef(e,t){if(Do(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const mn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,tf=e=>!Eo(e)&&e!==mn;function ac(){const{caseless:e}=tf(this)&&this||{},t={},r=(n,o)=>{const s=e&&ef(t,o)||o;vi(t[s])&&vi(n)?t[s]=ac(t[s],n):vi(n)?t[s]=ac({},n):Fn(n)?t[s]=n.slice():t[s]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&To(arguments[n],r);return t}const y1=(e,t,r,{allOwnKeys:n}={})=>(To(t,(o,s)=>{r&&Qt(o)?e[s]=Kd(o,r):e[s]=o},{allOwnKeys:n}),e),b1=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),_1=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},x1=(e,t,r,n)=>{let o,s,i;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!n||n(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=r!==!1&&ic(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},w1=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},S1=e=>{if(!e)return null;if(Fn(e))return e;let t=e.length;if(!Jd(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},C1=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ic(Uint8Array)),E1=(e,t)=>{const n=(e&&e[hi]).call(e);let o;for(;(o=n.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},D1=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},k1=wr("HTMLFormElement"),T1=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),rf=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),I1=wr("RegExp"),nf=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};To(r,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(n[s]=i||o)}),Object.defineProperties(e,n)},A1=e=>{nf(e,(t,r)=>{if(Qt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(Qt(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},M1=(e,t)=>{const r={},n=o=>{o.forEach(s=>{r[s]=!0})};return Fn(e)?n(e):n(String(e).split(t)),r},P1=()=>{},O1=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function j1(e){return!!(e&&Qt(e.append)&&e[Qd]==="FormData"&&e[hi])}const R1=e=>{const t=new Array(10),r=(n,o)=>{if(ko(n)){if(t.indexOf(n)>=0)return;if(Do(n))return n;if(!("toJSON"in n)){t[o]=n;const s=Fn(n)?[]:{};return To(n,(i,a)=>{const c=r(i,o+1);!Eo(c)&&(s[a]=c)}),t[o]=void 0,s}}return n};return r(e,0)},N1=wr("AsyncFunction"),$1=e=>e&&(ko(e)||Qt(e))&&Qt(e.then)&&Qt(e.catch),of=((e,t)=>e?setImmediate:t?((r,n)=>(mn.addEventListener("message",({source:o,data:s})=>{o===mn&&s===r&&n.length&&n.shift()()},!1),o=>{n.push(o),mn.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Qt(mn.postMessage)),L1=typeof queueMicrotask<"u"?queueMicrotask.bind(mn):typeof process<"u"&&process.nextTick||of,B={isArray:Fn,isArrayBuffer:Xd,isBuffer:Do,isFormData:d1,isArrayBufferView:r1,isString:n1,isNumber:Jd,isBoolean:o1,isObject:ko,isPlainObject:vi,isEmptyObject:s1,isReadableStream:p1,isRequest:h1,isResponse:m1,isHeaders:g1,isUndefined:Eo,isDate:i1,isFile:a1,isBlob:c1,isRegExp:I1,isFunction:Qt,isStream:u1,isURLSearchParams:f1,isTypedArray:C1,isFileList:l1,forEach:To,merge:ac,extend:y1,trim:v1,stripBOM:b1,inherits:_1,toFlatObject:x1,kindOf:mi,kindOfTest:wr,endsWith:w1,toArray:S1,forEachEntry:E1,matchAll:D1,isHTMLForm:k1,hasOwnProperty:rf,hasOwnProp:rf,reduceDescriptors:nf,freezeMethods:A1,toObjectSet:M1,toCamelCase:T1,noop:P1,toFiniteNumber:O1,findKey:ef,global:mn,isContextDefined:tf,isSpecCompliantForm:j1,toJSONObject:R1,isAsyncFn:N1,isThenable:$1,setImmediate:of,asap:L1,isIterable:e=>e!=null&&Qt(e[hi])};function je(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}B.inherits(je,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:B.toJSONObject(this.config),code:this.code,status:this.status}}});const sf=je.prototype,af={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{af[e]={value:e}}),Object.defineProperties(je,af),Object.defineProperty(sf,"isAxiosError",{value:!0}),je.from=(e,t,r,n,o,s)=>{const i=Object.create(sf);return B.toFlatObject(e,i,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),je.call(i,e.message,t,r,n,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const z1=null;function cc(e){return B.isPlainObject(e)||B.isArray(e)}function cf(e){return B.endsWith(e,"[]")?e.slice(0,-2):e}function lf(e,t,r){return e?e.concat(t).map(function(o,s){return o=cf(o),!r&&s?"["+o+"]":o}).join(r?".":""):t}function B1(e){return B.isArray(e)&&!e.some(cc)}const F1=B.toFlatObject(B,{},null,function(t){return/^is[A-Z]/.test(t)});function yi(e,t,r){if(!B.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=B.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,b){return!B.isUndefined(b[h])});const n=r.metaTokens,o=r.visitor||d,s=r.dots,i=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&B.isSpecCompliantForm(t);if(!B.isFunction(o))throw new TypeError("visitor must be a function");function l(v){if(v===null)return"";if(B.isDate(v))return v.toISOString();if(B.isBoolean(v))return v.toString();if(!c&&B.isBlob(v))throw new je("Blob is not supported. Use a Buffer instead.");return B.isArrayBuffer(v)||B.isTypedArray(v)?c&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function d(v,h,b){let w=v;if(v&&!b&&typeof v=="object"){if(B.endsWith(h,"{}"))h=n?h:h.slice(0,-2),v=JSON.stringify(v);else if(B.isArray(v)&&B1(v)||(B.isFileList(v)||B.endsWith(h,"[]"))&&(w=B.toArray(v)))return h=cf(h),w.forEach(function(k,C){!(B.isUndefined(k)||k===null)&&t.append(i===!0?lf([h],C,s):i===null?h:h+"[]",l(k))}),!1}return cc(v)?!0:(t.append(lf(b,h,s),l(v)),!1)}const f=[],p=Object.assign(F1,{defaultVisitor:d,convertValue:l,isVisitable:cc});function m(v,h){if(!B.isUndefined(v)){if(f.indexOf(v)!==-1)throw Error("Circular reference detected in "+h.join("."));f.push(v),B.forEach(v,function(w,S){(!(B.isUndefined(w)||w===null)&&o.call(t,w,B.isString(S)?S.trim():S,h,p))===!0&&m(w,h?h.concat(S):[S])}),f.pop()}}if(!B.isObject(e))throw new TypeError("data must be an object");return m(e),t}function uf(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function lc(e,t){this._pairs=[],e&&yi(e,this,t)}const df=lc.prototype;df.append=function(t,r){this._pairs.push([t,r])},df.toString=function(t){const r=t?function(n){return t.call(this,n,uf)}:uf;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function V1(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ff(e,t,r){if(!t)return e;const n=r&&r.encode||V1;B.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let s;if(o?s=o(t,r):s=B.isURLSearchParams(t)?t.toString():new lc(t,r).toString(n),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class pf{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){B.forEach(this.handlers,function(n){n!==null&&t(n)})}}const hf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},U1={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:lc,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},uc=typeof window<"u"&&typeof document<"u",dc=typeof navigator=="object"&&navigator||void 0,H1=uc&&(!dc||["ReactNative","NativeScript","NS"].indexOf(dc.product)<0),W1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Y1=uc&&window.location.href||"http://localhost",Ht={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:uc,hasStandardBrowserEnv:H1,hasStandardBrowserWebWorkerEnv:W1,navigator:dc,origin:Y1},Symbol.toStringTag,{value:"Module"})),...U1};function q1(e,t){return yi(e,new Ht.classes.URLSearchParams,{visitor:function(r,n,o,s){return Ht.isNode&&B.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function Z1(e){return B.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function G1(e){const t={},r=Object.keys(e);let n;const o=r.length;let s;for(n=0;n<o;n++)s=r[n],t[s]=e[s];return t}function mf(e){function t(r,n,o,s){let i=r[s++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),c=s>=r.length;return i=!i&&B.isArray(o)?o.length:i,c?(B.hasOwnProp(o,i)?o[i]=[o[i],n]:o[i]=n,!a):((!o[i]||!B.isObject(o[i]))&&(o[i]=[]),t(r,n,o[i],s)&&B.isArray(o[i])&&(o[i]=G1(o[i])),!a)}if(B.isFormData(e)&&B.isFunction(e.entries)){const r={};return B.forEachEntry(e,(n,o)=>{t(Z1(n),o,r,0)}),r}return null}function K1(e,t,r){if(B.isString(e))try{return(t||JSON.parse)(e),B.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Io={transitional:hf,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,s=B.isObject(t);if(s&&B.isHTMLForm(t)&&(t=new FormData(t)),B.isFormData(t))return o?JSON.stringify(mf(t)):t;if(B.isArrayBuffer(t)||B.isBuffer(t)||B.isStream(t)||B.isFile(t)||B.isBlob(t)||B.isReadableStream(t))return t;if(B.isArrayBufferView(t))return t.buffer;if(B.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return q1(t,this.formSerializer).toString();if((a=B.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return yi(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||o?(r.setContentType("application/json",!1),K1(t)):t}],transformResponse:[function(t){const r=this.transitional||Io.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(B.isResponse(t)||B.isReadableStream(t))return t;if(t&&B.isString(t)&&(n&&!this.responseType||o)){const i=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(i)throw a.name==="SyntaxError"?je.from(a,je.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ht.classes.FormData,Blob:Ht.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};B.forEach(["delete","get","head","post","put","patch"],e=>{Io.headers[e]={}});const Q1=B.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),X1=e=>{const t={};let r,n,o;return e&&e.split(`
156
+ `).forEach(function(i){o=i.indexOf(":"),r=i.substring(0,o).trim().toLowerCase(),n=i.substring(o+1).trim(),!(!r||t[r]&&Q1[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},gf=Symbol("internals");function Ao(e){return e&&String(e).trim().toLowerCase()}function bi(e){return e===!1||e==null?e:B.isArray(e)?e.map(bi):String(e)}function J1(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const e_=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function fc(e,t,r,n,o){if(B.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!B.isString(t)){if(B.isString(n))return t.indexOf(n)!==-1;if(B.isRegExp(n))return n.test(t)}}function t_(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function r_(e,t){const r=B.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,s,i){return this[n].call(this,t,o,s,i)},configurable:!0})})}let Xt=class{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function s(a,c,l){const d=Ao(c);if(!d)throw new Error("header name must be a non-empty string");const f=B.findKey(o,d);(!f||o[f]===void 0||l===!0||l===void 0&&o[f]!==!1)&&(o[f||c]=bi(a))}const i=(a,c)=>B.forEach(a,(l,d)=>s(l,d,c));if(B.isPlainObject(t)||t instanceof this.constructor)i(t,r);else if(B.isString(t)&&(t=t.trim())&&!e_(t))i(X1(t),r);else if(B.isObject(t)&&B.isIterable(t)){let a={},c,l;for(const d of t){if(!B.isArray(d))throw TypeError("Object iterator must return a key-value pair");a[l=d[0]]=(c=a[l])?B.isArray(c)?[...c,d[1]]:[c,d[1]]:d[1]}i(a,r)}else t!=null&&s(r,t,n);return this}get(t,r){if(t=Ao(t),t){const n=B.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return J1(o);if(B.isFunction(r))return r.call(this,o,n);if(B.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Ao(t),t){const n=B.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||fc(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function s(i){if(i=Ao(i),i){const a=B.findKey(n,i);a&&(!r||fc(n,n[a],a,r))&&(delete n[a],o=!0)}}return B.isArray(t)?t.forEach(s):s(t),o}clear(t){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const s=r[n];(!t||fc(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const r=this,n={};return B.forEach(this,(o,s)=>{const i=B.findKey(n,s);if(i){r[i]=bi(o),delete r[s];return}const a=t?t_(s):String(s).trim();a!==s&&delete r[s],r[a]=bi(o),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return B.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&B.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
157
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[gf]=this[gf]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=Ao(i);n[a]||(r_(o,i),n[a]=!0)}return B.isArray(t)?t.forEach(s):s(t),this}};Xt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),B.reduceDescriptors(Xt.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),B.freezeMethods(Xt);function pc(e,t){const r=this||Io,n=t||r,o=Xt.from(n.headers);let s=n.data;return B.forEach(e,function(a){s=a.call(r,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function vf(e){return!!(e&&e.__CANCEL__)}function Vn(e,t,r){je.call(this,e??"canceled",je.ERR_CANCELED,t,r),this.name="CanceledError"}B.inherits(Vn,je,{__CANCEL__:!0});function yf(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new je("Request failed with status code "+r.status,[je.ERR_BAD_REQUEST,je.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function n_(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function o_(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,s=0,i;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),d=n[s];i||(i=l),r[o]=c,n[o]=l;let f=s,p=0;for(;f!==o;)p+=r[f++],f=f%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-i<t)return;const m=d&&l-d;return m?Math.round(p*1e3/m):void 0}}function s_(e,t){let r=0,n=1e3/t,o,s;const i=(l,d=Date.now())=>{r=d,o=null,s&&(clearTimeout(s),s=null),e(...l)};return[(...l)=>{const d=Date.now(),f=d-r;f>=n?i(l,d):(o=l,s||(s=setTimeout(()=>{s=null,i(o)},n-f)))},()=>o&&i(o)]}const _i=(e,t,r=3)=>{let n=0;const o=o_(50,250);return s_(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,c=i-n,l=o(c),d=i<=a;n=i;const f={loaded:i,total:a,progress:a?i/a:void 0,bytes:c,rate:l||void 0,estimated:l&&a&&d?(a-i)/l:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(f)},r)},bf=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},_f=e=>(...t)=>B.asap(()=>e(...t)),i_=Ht.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Ht.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Ht.origin),Ht.navigator&&/(msie|trident)/i.test(Ht.navigator.userAgent)):()=>!0,a_=Ht.hasStandardBrowserEnv?{write(e,t,r,n,o,s){const i=[e+"="+encodeURIComponent(t)];B.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),B.isString(n)&&i.push("path="+n),B.isString(o)&&i.push("domain="+o),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function c_(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function l_(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function xf(e,t,r){let n=!c_(t);return e&&(n||r==!1)?l_(e,t):t}const wf=e=>e instanceof Xt?{...e}:e;function gn(e,t){t=t||{};const r={};function n(l,d,f,p){return B.isPlainObject(l)&&B.isPlainObject(d)?B.merge.call({caseless:p},l,d):B.isPlainObject(d)?B.merge({},d):B.isArray(d)?d.slice():d}function o(l,d,f,p){if(B.isUndefined(d)){if(!B.isUndefined(l))return n(void 0,l,f,p)}else return n(l,d,f,p)}function s(l,d){if(!B.isUndefined(d))return n(void 0,d)}function i(l,d){if(B.isUndefined(d)){if(!B.isUndefined(l))return n(void 0,l)}else return n(void 0,d)}function a(l,d,f){if(f in t)return n(l,d);if(f in e)return n(void 0,l)}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(l,d,f)=>o(wf(l),wf(d),f,!0)};return B.forEach(Object.keys({...e,...t}),function(d){const f=c[d]||o,p=f(e[d],t[d],d);B.isUndefined(p)&&f!==a||(r[d]=p)}),r}const Sf=e=>{const t=gn({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=Xt.from(i),t.url=ff(xf(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(B.isFormData(r)){if(Ht.hasStandardBrowserEnv||Ht.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((c=i.getContentType())!==!1){const[l,...d]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];i.setContentType([l||"multipart/form-data",...d].join("; "))}}if(Ht.hasStandardBrowserEnv&&(n&&B.isFunction(n)&&(n=n(t)),n||n!==!1&&i_(t.url))){const l=o&&s&&a_.read(s);l&&i.set(o,l)}return t},u_=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const o=Sf(e);let s=o.data;const i=Xt.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:l}=o,d,f,p,m,v;function h(){m&&m(),v&&v(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let b=new XMLHttpRequest;b.open(o.method.toUpperCase(),o.url,!0),b.timeout=o.timeout;function w(){if(!b)return;const k=Xt.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),x={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:k,config:e,request:b};yf(function(E){r(E),h()},function(E){n(E),h()},x),b=null}"onloadend"in b?b.onloadend=w:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(w)},b.onabort=function(){b&&(n(new je("Request aborted",je.ECONNABORTED,e,b)),b=null)},b.onerror=function(){n(new je("Network Error",je.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let C=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const x=o.transitional||hf;o.timeoutErrorMessage&&(C=o.timeoutErrorMessage),n(new je(C,x.clarifyTimeoutError?je.ETIMEDOUT:je.ECONNABORTED,e,b)),b=null},s===void 0&&i.setContentType(null),"setRequestHeader"in b&&B.forEach(i.toJSON(),function(C,x){b.setRequestHeader(x,C)}),B.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),a&&a!=="json"&&(b.responseType=o.responseType),l&&([p,v]=_i(l,!0),b.addEventListener("progress",p)),c&&b.upload&&([f,m]=_i(c),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(d=k=>{b&&(n(!k||k.type?new Vn(null,e,b):k),b.abort(),b=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const S=n_(o.url);if(S&&Ht.protocols.indexOf(S)===-1){n(new je("Unsupported protocol "+S+":",je.ERR_BAD_REQUEST,e));return}b.send(s||null)})},d_=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const s=function(l){if(!o){o=!0,a();const d=l instanceof Error?l:this.reason;n.abort(d instanceof je?d:new Vn(d instanceof Error?d.message:d))}};let i=t&&setTimeout(()=>{i=null,s(new je(`timeout ${t} of ms exceeded`,je.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s));const{signal:c}=n;return c.unsubscribe=()=>B.asap(a),c}},f_=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},p_=async function*(e,t){for await(const r of h_(e))yield*f_(r,t)},h_=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Cf=(e,t,r,n)=>{const o=p_(e,t);let s=0,i,a=c=>{i||(i=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:l,value:d}=await o.next();if(l){a(),c.close();return}let f=d.byteLength;if(r){let p=s+=f;r(p)}c.enqueue(new Uint8Array(d))}catch(l){throw a(l),l}},cancel(c){return a(c),o.return()}},{highWaterMark:2})},xi=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ef=xi&&typeof ReadableStream=="function",m_=xi&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Df=(e,...t)=>{try{return!!e(...t)}catch{return!1}},g_=Ef&&Df(()=>{let e=!1;const t=new Request(Ht.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),kf=64*1024,hc=Ef&&Df(()=>B.isReadableStream(new Response("").body)),wi={stream:hc&&(e=>e.body)};xi&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!wi[t]&&(wi[t]=B.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new je(`Response type '${t}' is not supported`,je.ERR_NOT_SUPPORT,n)})})})(new Response);const v_=async e=>{if(e==null)return 0;if(B.isBlob(e))return e.size;if(B.isSpecCompliantForm(e))return(await new Request(Ht.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(B.isArrayBufferView(e)||B.isArrayBuffer(e))return e.byteLength;if(B.isURLSearchParams(e)&&(e=e+""),B.isString(e))return(await m_(e)).byteLength},y_=async(e,t)=>{const r=B.toFiniteNumber(e.getContentLength());return r??v_(t)},mc={http:z1,xhr:u_,fetch:xi&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:d,withCredentials:f="same-origin",fetchOptions:p}=Sf(e);l=l?(l+"").toLowerCase():"text";let m=d_([o,s&&s.toAbortSignal()],i),v;const h=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let b;try{if(c&&g_&&r!=="get"&&r!=="head"&&(b=await y_(d,n))!==0){let x=new Request(t,{method:"POST",body:n,duplex:"half"}),H;if(B.isFormData(n)&&(H=x.headers.get("content-type"))&&d.setContentType(H),x.body){const[E,I]=bf(b,_i(_f(c)));n=Cf(x.body,kf,E,I)}}B.isString(f)||(f=f?"include":"omit");const w="credentials"in Request.prototype;v=new Request(t,{...p,signal:m,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",credentials:w?f:void 0});let S=await fetch(v,p);const k=hc&&(l==="stream"||l==="response");if(hc&&(a||k&&h)){const x={};["status","statusText","headers"].forEach(P=>{x[P]=S[P]});const H=B.toFiniteNumber(S.headers.get("content-length")),[E,I]=a&&bf(H,_i(_f(a),!0))||[];S=new Response(Cf(S.body,kf,E,()=>{I&&I(),h&&h()}),x)}l=l||"text";let C=await wi[B.findKey(wi,l)||"text"](S,e);return!k&&h&&h(),await new Promise((x,H)=>{yf(x,H,{data:C,headers:Xt.from(S.headers),status:S.status,statusText:S.statusText,config:e,request:v})})}catch(w){throw h&&h(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new je("Network Error",je.ERR_NETWORK,e,v),{cause:w.cause||w}):je.from(w,w&&w.code,e,v)}})};B.forEach(mc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Tf=e=>`- ${e}`,b_=e=>B.isFunction(e)||e===null||e===!1,If={getAdapter:e=>{e=B.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let s=0;s<t;s++){r=e[s];let i;if(n=r,!b_(r)&&(n=mc[(i=String(r)).toLowerCase()],n===void 0))throw new je(`Unknown adapter '${i}'`);if(n)break;o[i||"#"+s]=n}if(!n){const s=Object.entries(o).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
158
+ `+s.map(Tf).join(`
159
+ `):" "+Tf(s[0]):"as no adapter specified";throw new je("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n},adapters:mc};function gc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Vn(null,e)}function Af(e){return gc(e),e.headers=Xt.from(e.headers),e.data=pc.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),If.getAdapter(e.adapter||Io.adapter)(e).then(function(n){return gc(e),n.data=pc.call(e,e.transformResponse,n),n.headers=Xt.from(n.headers),n},function(n){return vf(n)||(gc(e),n&&n.response&&(n.response.data=pc.call(e,e.transformResponse,n.response),n.response.headers=Xt.from(n.response.headers))),Promise.reject(n)})}const Mf="1.11.0",Si={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Si[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Pf={};Si.transitional=function(t,r,n){function o(s,i){return"[Axios v"+Mf+"] Transitional option '"+s+"'"+i+(n?". "+n:"")}return(s,i,a)=>{if(t===!1)throw new je(o(i," has been removed"+(r?" in "+r:"")),je.ERR_DEPRECATED);return r&&!Pf[i]&&(Pf[i]=!0,console.warn(o(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,i,a):!0}},Si.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function __(e,t,r){if(typeof e!="object")throw new je("options must be an object",je.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const s=n[o],i=t[s];if(i){const a=e[s],c=a===void 0||i(a,s,e);if(c!==!0)throw new je("option "+s+" must be "+c,je.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new je("Unknown option "+s,je.ERR_BAD_OPTION)}}const Ci={assertOptions:__,validators:Si},Nr=Ci.validators;let vn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new pf,response:new pf}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
160
+ `+s):n.stack=s}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=gn(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&Ci.assertOptions(n,{silentJSONParsing:Nr.transitional(Nr.boolean),forcedJSONParsing:Nr.transitional(Nr.boolean),clarifyTimeoutError:Nr.transitional(Nr.boolean)},!1),o!=null&&(B.isFunction(o)?r.paramsSerializer={serialize:o}:Ci.assertOptions(o,{encode:Nr.function,serialize:Nr.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Ci.assertOptions(r,{baseUrl:Nr.spelling("baseURL"),withXsrfToken:Nr.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=s&&B.merge(s.common,s[r.method]);s&&B.forEach(["delete","get","head","post","put","patch","common"],v=>{delete s[v]}),r.headers=Xt.concat(i,s);const a=[];let c=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(r)===!1||(c=c&&h.synchronous,a.unshift(h.fulfilled,h.rejected))});const l=[];this.interceptors.response.forEach(function(h){l.push(h.fulfilled,h.rejected)});let d,f=0,p;if(!c){const v=[Af.bind(this),void 0];for(v.unshift(...a),v.push(...l),p=v.length,d=Promise.resolve(r);f<p;)d=d.then(v[f++],v[f++]);return d}p=a.length;let m=r;for(f=0;f<p;){const v=a[f++],h=a[f++];try{m=v(m)}catch(b){h.call(this,b);break}}try{d=Af.call(this,m)}catch(v){return Promise.reject(v)}for(f=0,p=l.length;f<p;)d=d.then(l[f++],l[f++]);return d}getUri(t){t=gn(this.defaults,t);const r=xf(t.baseURL,t.url,t.allowAbsoluteUrls);return ff(r,t.params,t.paramsSerializer)}};B.forEach(["delete","get","head","options"],function(t){vn.prototype[t]=function(r,n){return this.request(gn(n||{},{method:t,url:r,data:(n||{}).data}))}}),B.forEach(["post","put","patch"],function(t){function r(n){return function(s,i,a){return this.request(gn(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}vn.prototype[t]=r(),vn.prototype[t+"Form"]=r(!0)});let x_=class r0{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(o=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](o);n._listeners=null}),this.promise.then=o=>{let s;const i=new Promise(a=>{n.subscribe(a),s=a}).then(o);return i.cancel=function(){n.unsubscribe(s)},i},t(function(s,i,a){n.reason||(n.reason=new Vn(s,i,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new r0(function(o){t=o}),cancel:t}}};function w_(e){return function(r){return e.apply(null,r)}}function S_(e){return B.isObject(e)&&e.isAxiosError===!0}const vc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(vc).forEach(([e,t])=>{vc[t]=e});function Of(e){const t=new vn(e),r=Kd(vn.prototype.request,t);return B.extend(r,vn.prototype,t,{allOwnKeys:!0}),B.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return Of(gn(e,o))},r}const kt=Of(Io);kt.Axios=vn,kt.CanceledError=Vn,kt.CancelToken=x_,kt.isCancel=vf,kt.VERSION=Mf,kt.toFormData=yi,kt.AxiosError=je,kt.Cancel=kt.CanceledError,kt.all=function(t){return Promise.all(t)},kt.spread=w_,kt.isAxiosError=S_,kt.mergeConfig=gn,kt.AxiosHeaders=Xt,kt.formToJSON=e=>mf(B.isHTMLForm(e)?new FormData(e):e),kt.getAdapter=If.getAdapter,kt.HttpStatusCode=vc,kt.default=kt;const{Axios:lI,AxiosError:uI,CanceledError:dI,isCancel:fI,CancelToken:pI,VERSION:hI,all:mI,Cancel:gI,isAxiosError:vI,spread:yI,toFormData:bI,AxiosHeaders:_I,HttpStatusCode:xI,formToJSON:wI,getAdapter:SI,mergeConfig:CI}=kt,jf={token:null},C_=e=>{jf.token=e},Tt=kt.create({headers:{"Content-Type":"application/json"}});Tt.interceptors.request.use(e=>{const t=jf.token;return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));const Rf=y.createContext(void 0),E_=({config:e,children:t})=>(y.useEffect(()=>{e.getToken&&C_(e.getToken)},[e.getToken]),u.jsx(Rf.Provider,{value:e,children:t})),yc=()=>{const e=y.useContext(Rf);if(!e)throw new Error("useApiConfig debe ser usado dentro de un ApiProvider");return e},Ei=()=>{const{calendarApiUrl:e}=yc();return{getGoogleAuthUrl:async()=>{try{const i=`${e}/api/Calendario/v1/auth-url-Google`;return(await Tt.get(i)).data}catch(i){throw console.error("Error al obtener la URL de Google Auth:",i),i}},saveGoogleCredentials:async i=>{try{const a=new URLSearchParams({code:i.code,disID:String(i.disID),usrID:String(i.usrID)}).toString(),c=`${e}/api/Calendario/v1/google-auth/SaveCredential?${a}`;return(await Tt.post(c,{})).data}catch(a){throw console.error("Error al guardar credenciales de Google:",a),a}},getGoogleCalendars:async(i,a)=>{try{return(await Tt.get(`${e}/api/Calendario/v1/google/ObtenerTiposCalendariosGoogleAsync?usrMail=${encodeURIComponent(i)}&disID=${a}`)).data}catch(c){throw console.error("Error al obtener los calendarios de Google:",c),c}},syncGoogleEvents:async(i,a,c)=>{try{return(await Tt.post(`${e}/api/Calendario/v1/google/SincronizarEnviarEventosAsync?usrMail=${encodeURIComponent(i)}&disID=${a}&UsuarioID=${c}`)).data}catch(l){throw console.error("Error al sincronizar eventos con Google Calendar:",l),l}},getGoogleEventsByMonth:async i=>{try{const a=await Tt.post(`${e}/api/Calendario/v1/google/ObtenerEventosGoogleAsyncXMes`,i);return console.log("eventos desde gmail",a),a.data}catch(a){throw console.error("Error al obtener eventos de Google Calendar por mes:",a),a}}}},Nf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAASFBMVEVChfRHcExDhOAWaNUZfjjkTDf////6/P7b6fu61fj7wCj7vASZv/VuoPBQjvVCr19GifE0qFM4gerrRjMubcQQaucZZ9MYgTpc4mWWAAAABnRSTlP/AFtbW/eMEQaPAAAAfUlEQVR42q3Pyw4CIQyFYVDbigKOl6Pv/6a2ZBYN08TEzL9gcb6waDqkubd1TEsEWkp7Q3e9RuvOrsvV+g0Fi+jaZIKC0sECzMDCDK51C9zR9A2gPhCC6HgOoIFL/KMD1cMfl39GNxc9NVrh7jKgHAPlCGwPgSgbnDYw9vwFKv0VRfpGYZ8AAAAASUVORK5CYII=",D_=({disID:e,usrID:t})=>{const[r,n]=y.useState(null),o=Ei(),s=async()=>{localStorage.setItem("temp_auth_disID",String(e)),localStorage.setItem("temp_auth_usrID",String(t)),n(null);try{const{url:i}=await o.getGoogleAuthUrl();console.log("googleAuthUrl",i),window.location.href=i}catch(i){n(i.message||"Fallo al iniciar sesión con Google."),localStorage.removeItem("temp_auth_disID"),localStorage.removeItem("temp_auth_usrID")}finally{}};return u.jsxs("div",{className:"flex",children:[u.jsxs("div",{className:we.syncButton,onClick:s,children:[u.jsx("div",{className:we.customCheckIcon,children:u.jsx("div",{className:we.uncheckedCircle})}),u.jsx("img",{src:Nf,width:18}),u.jsx("span",{children:"Google Calendar"})]}),r&&u.jsx("p",{className:"text-red-500 mt-2",children:r})]})},bc=()=>{const{calendarApiUrl:e}=yc();return{getOutlookAuthUrl:async()=>{try{const i=`${e}/api/Calendario/v1/auth-url-Outlook`,a=await Tt.get(i);return console.log("api",a),a.data}catch(i){throw console.error("Error al obtener la URL de Outlook Auth:",i),i}},saveOutlookCredentials:async i=>{try{const a=new URLSearchParams({code:i.code,disID:String(i.disID),usrID:String(i.usrID)}).toString(),c=`${e}/api/Calendario/v1/outlook-auth/SaveCredential?${a}`;return(await Tt.post(c,{})).data}catch(a){throw console.error("Error al guardar credenciales Outlook:",a),a}},syncOutlookEvents:async(i,a,c)=>{try{return(await Tt.post(`${e}/api/Calendario/v1/outlook/SincronizarEnviarEventosAsync?usrMail=${encodeURIComponent(i)}&disID=${a}&UsuarioID=${c}`)).data}catch(l){throw console.error("Error al sincronizar eventos con outlook Calendar:",l),l}},getOutlookCalendars:async(i,a)=>{try{return(await Tt.get(`${e}/api/Calendario/v1/outlook/ObtenerTiposCalendariosOutlookAsync?usrMail=${encodeURIComponent(i)}&disID=${a}`)).data}catch(c){throw console.error("Error al obtener los calendarios de Google:",c),c}},getOutlookEventsByMonth:async i=>{try{const a=await Tt.post(`${e}/api/Calendario/v1/outlook/ObtenerEventosoutlookAsyncXMes`,i);return console.log("EVENTOS OUTLOOK",a),a.data}catch(a){throw console.error("Error al obtener eventos de Outlook Calendar por mes:",a),a}}}},$f="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAYCAMAAAA8nnbJAAAAflBMVEUAAAAAV34AMFoAID0ATmsAL1oATXcAZZAAIUgANmQArPAAfd0BedoAacQAZbsAkuMActcAa9QAsfMAjfMAUJL///8Ame8Aht4A6v8A2v8Atvguid0AfMIAo+wAWrYA3/+q0/MAQ38ASIjB4PeHwe4AU7JlsekAdcMAXqgApf4WoQK+AAAACnRSTlMATjUWISlCbAuE1QOT9gAAAP1JREFUKM9t0GF7QzAQwPG2xiw5JGlICWVsrX3/L7i7Gyae/l944efinpzW4ktQfPrvorIgiHaW5UHZ29Hu3Dd235uTUkJnMHGj2NKISvh/TmBdX9c1W/pz5SQOOtsFFl0lBfx8YeCH6aHJhEG89X2/2aOchnLSIC1IACWwZjFdfmnwpSeDg/kSJH0AsLPLZgBoam9jsp2p8EylLK2rjDAmb89kALzLoLUaMyx3bs6rajHlh8FnZHzN+VwVxWKI+F5jFgdnW2BsaSUxUBRYYUdXrYaDMfbxydmuEU+32tJ7+5fB7QvUwBrDCcq4Z2AirJX7udCaziUMVHI+hPQLqRAg85aAu30AAAAASUVORK5CYII=",k_=({disID:e,usrID:t})=>{const[r,n]=y.useState(null),o=bc(),s=async()=>{localStorage.setItem("temp_auth_disID",String(e)),localStorage.setItem("temp_auth_usrID",String(t)),n(null);try{const i=await o.getOutlookAuthUrl();window.location.href=i?.authUrl}catch(i){n(i.message||"Fallo al iniciar sesión con Google."),localStorage.removeItem("temp_auth_disID"),localStorage.removeItem("temp_auth_usrID")}finally{}};return u.jsxs("div",{className:"flex",children:[u.jsxs("div",{className:we.syncButton,onClick:s,children:[u.jsx("div",{className:we.customCheckIcon,children:u.jsx("div",{className:we.uncheckedCircle})}),u.jsx("img",{src:$f,width:20}),u.jsx("span",{children:"Outlook"})]}),r&&u.jsx("p",{className:"text-red-500 mt-2",children:r})]})},Lf="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='88'%20height='67'%20fill='none'%3e%3cg%20filter='url(%23a)'%20opacity='.7'%3e%3cellipse%20cx='69.302'%20cy='60.952'%20fill='%23D9D9D9'%20rx='12.698'%20ry='2.032'/%3e%3c/g%3e%3cpath%20fill='%23D6D6D6'%20fill-rule='evenodd'%20d='M60.034%2011.99c.71.001%201.37.374%201.737.982l-1.74%201.05a270%20270%200%200%201%201.74-1.048l.002.002.002.004.007.011.02.034.063.11q.08.139.21.385c.171.327.403.795.657%201.38a24.6%2024.6%200%200%201%201.527%204.811c.817%203.964.847%209.339-2.499%2014.552a2.033%202.033%200%200%201-3.242.236l1.533-1.333-1.535%201.332v-.003l-.005-.004-.01-.012-.028-.033-.082-.1a10%2010%200%200%201-.26-.34%2014%2014%200%200%201-.798-1.221%2017.3%2017.3%200%200%201-1.828-4.469c-.986-3.873-.934-9.225%202.79-15.35l.072-.11c.38-.542%201-.867%201.667-.866m1.867%2017.26q-.02.064-.042.126.091-.276.172-.552zm-1.626-14.786.004.008z'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23C2C3CC'%20d='M59.728%2035.515s-1.736-7.32%206.371-12.183c0%200%20.497%208.29-6.371%2012.183'/%3e%3cpath%20fill='%23D6D6D6'%20fill-rule='evenodd'%20d='M79.915%2011.99c.71.001%201.37.374%201.737.982l-1.74%201.05a281%20281%200%200%201%201.74-1.048l.002.002.002.004.007.011.02.034.063.11q.08.139.21.385c.171.327.402.795.657%201.38a24.6%2024.6%200%200%201%201.527%204.811c.817%203.964.847%209.339-2.5%2014.552a2.033%202.033%200%200%201-3.241.236l1.532-1.333-1.534%201.332-.001-.003-.004-.004-.011-.012-.027-.033-.082-.1a10%2010%200%200%201-.26-.34c-.211-.287-.492-.698-.799-1.221a17.3%2017.3%200%200%201-1.827-4.469c-.986-3.873-.934-9.225%202.79-15.35l.072-.11c.38-.542%201-.867%201.667-.866m2.476%209.544q.013.113.027.228-.058-.477-.135-.934z'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23C2C3CC'%20fill-rule='evenodd'%20d='M72.733%2022.085c.313-.165.691-.154.996.028l-.522.871c.522-.87.521-.871.522-.87l.004.001.007.004.021.013q.027.016.072.046.091.057.25.165c.212.145.507.357.856.635.697.556%201.62%201.383%202.52%202.474%201.803%202.183%203.562%205.475%203.201%209.764a1.016%201.016%200%200%201-1.376.863h-.002l-.004-.002-.008-.002-.023-.01-.079-.033a9.79%209.79%200%200%201-1.139-.603%2012%2012%200%200%201-2.566-2.14c-1.853-2.044-3.57-5.345-3.271-10.365l.017-.131c.057-.3.249-.563.524-.708M78.04%2034.22l.11.075a11%2011%200%200%201-.394-.282zm-4.516-11.027.334.237q0%200%20.003.002a13%2013%200%200%200-.337-.24'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23C2C3CC'%20fill-rule='evenodd'%20d='M85.456%2022.461a1.017%201.017%200%200%201%201.536.81l-1.014.061%201.014-.06v.002l.001.003v.008l.001.024.004.085q.004.108.004.301c0%20.257-.007.62-.04%201.067-.064.89-.227%202.12-.618%203.482-.781%202.723-2.5%206.038-6.237%208.156a1.018%201.018%200%200%201-1.489-.65l-.002-.006-.002-.009-.005-.025a5%205%200%200%201-.065-.367%2010%2010%200%200%201-.096-.999c-.04-.837%200-2.002.316-3.331.639-2.686%202.388-5.97%206.692-8.552'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23D6D6D6'%20fill-rule='evenodd'%20d='M70.232%205.343c.71.002%201.37.374%201.737.982l-1.74%201.05c1.739-1.05%201.74-1.048%201.74-1.048l.002.002q0%20.003.003.004l.008.014.023.04.082.142q.102.18.274.505c.227.432.535%201.053.875%201.834a33%2033%200%200%201%202.036%206.417c1.09%205.284%201.122%2012.4-3.305%2019.3a2.034%202.034%200%200%201-3.242.236l1.532-1.334a223%20223%200%200%201-1.534%201.332l-.002-.002-.004-.005-.012-.013-.033-.04-.102-.124a13%2013%200%200%201-.335-.438%2019%2019%200%200%201-1.048-1.603%2023%2023%200%200%201-2.413-5.902c-1.3-5.104-1.25-12.198%203.719-20.373l.072-.11c.38-.541%201-.867%201.667-.866m1.563%2026.818v-.002l-.003-.002v-.002z'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23AAABAD'%20fill-rule='evenodd'%20d='M60.61%2018.704c.315-.166.693-.155.998.027l-.523.871c.489-.815.52-.868.523-.87l.004.001.009.005.027.017a8%208%200%200%201%20.425.279c.282.192.676.476%201.145.85a23%2023%200%200%201%203.383%203.32c2.419%202.929%204.765%207.325%204.284%2013.05a1.017%201.017%200%200%201-1.376.864l.363-.948-.364.947h-.002l-.003-.002q-.005%200-.01-.003l-.03-.012-.1-.041a9%209%200%200%201-.341-.157c-.288-.139-.69-.35-1.164-.642a16%2016%200%200%201-3.42-2.852c-2.465-2.719-4.768-7.125-4.367-13.866l.017-.131c.058-.3.248-.562.523-.708m.436%201.974q.003-.237.011-.477v-.003a24%2024%200%200%200-.01.48'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23AAABAD'%20fill-rule='evenodd'%20d='M78.103%2019.143a1.016%201.016%200%200%201%201.419.871l-1.014.06%201.014-.06.001.002v.013l.002.032.004.11q.005.142.006.399c0%20.341-.01.83-.054%201.428a23.2%2023.2%200%200%201-.829%204.675c-1.05%203.655-3.348%208.076-8.335%2010.904a1.016%201.016%200%200%201-1.49-.65l.989-.233-.988.232-.001-.001-.001-.004-.002-.01-.007-.032q-.01-.038-.022-.104a9%209%200%200%201-.064-.372c-.047-.317-.1-.768-.127-1.326a16%2016%200%200%201%20.423-4.441c.85-3.574%203.18-7.967%208.96-11.433zm-8.499%2015.032c-.007.617.024%201.143.066%201.552q.032.308.065.524c.043.286.08.443.08.443-.003-.017-.23-.99-.21-2.52m.05-1.027q-.023.282-.036.546l.032-.511q.001-.018.004-.035'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23D6D6D6'%20d='M55.804%2031.519h28.238c.815%200%201.476.663%201.476%201.481v15.847c0%206.204-5.019%2011.241-11.2%2011.241h-8.79c-6.182%200-11.2-5.037-11.2-11.24V33c0-.818.66-1.481%201.476-1.481'/%3e%3cpath%20fill='%23E6E8ED'%20d='M68.15%2032.344v17.159c0%205.103%203.6%209.364%208.39%2010.361%205.122-1.034%208.978-5.574%208.978-11.018V33c0-.818-.66-1.481-1.476-1.481h-15.07a.823.823%200%200%200-.822.824z'/%3e%3cg%20filter='url(%23b)'%20opacity='.7'%3e%3cellipse%20cx='33.238'%20cy='60.952'%20fill='%23D9D9D9'%20rx='28.444'%20ry='3.048'/%3e%3c/g%3e%3cpath%20fill='%233856EC'%20d='M6.095%2017.27h54.857V53.84a6.095%206.095%200%200%201-6.095%206.095H12.19a6.095%206.095%200%200%201-6.095-6.095z'/%3e%3cpath%20fill='%23E2EDFB'%20d='M6.195%2050.145a8.127%208.127%200%200%200%208.127%208.127H37.9a6.1%206.1%200%200%200%204.309-1.785l16.98-16.973a6.1%206.1%200%200%200%201.785-4.31V9.586a6.095%206.095%200%200%200-6.095-6.095H12.29a6.095%206.095%200%200%200-6.095%206.095z'/%3e%3cpath%20fill='%233856EC'%20fill-rule='evenodd'%20d='M60.952%209.009a6.014%206.014%200%200%200-6.014-6.014H12.11a6.014%206.014%200%200%200-6.014%206.014v8.284h54.857zM17.77%2012.772a2.794%202.794%200%201%201%20.002-5.589%202.794%202.794%200%200%201-.002%205.59m15.965%200a2.794%202.794%200%201%201%20.001-5.588%202.794%202.794%200%200%201%200%205.588m16.763%200a2.794%202.794%200%201%201%20.001-5.588%202.794%202.794%200%200%201-.001%205.588'%20clip-rule='evenodd'/%3e%3crect%20width='7.982'%20height='7.982'%20x='11.783'%20y='22.351'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='23.756'%20y='22.351'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='34.931'%20y='22.351'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='46.904'%20y='22.351'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='11.783'%20y='33.526'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='23.756'%20y='33.526'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='34.931'%20y='33.526'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='46.904'%20y='33.526'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='11.783'%20y='44.702'%20fill='%23fff'%20rx='2.032'/%3e%3crect%20width='7.982'%20height='7.982'%20x='23.756'%20y='44.702'%20fill='%23fff'%20rx='2.032'/%3e%3cpath%20fill='%23597EF7'%20d='M40.52%2057.687a6%206%200%200%200%201.665-1.174l17.027-17.021a6%206%200%200%200%201.313-1.973H48.646a8.127%208.127%200%200%200-8.127%208.127z'/%3e%3crect%20width='3.991'%20height='11.974'%20x='15.773'%20fill='%23D9D9D9'%20rx='1.996'/%3e%3crect%20width='3.991'%20height='11.974'%20x='31.738'%20fill='%23D9D9D9'%20rx='1.996'/%3e%3crect%20width='3.991'%20height='11.974'%20x='48.501'%20fill='%23D9D9D9'%20rx='1.996'/%3e%3cdefs%3e%3cfilter%20id='a'%20width='29.46'%20height='8.127'%20x='54.572'%20y='56.889'%20color-interpolation-filters='sRGB'%20filterUnits='userSpaceOnUse'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeBlend%20in='SourceGraphic'%20in2='BackgroundImageFix'%20result='shape'/%3e%3cfeGaussianBlur%20result='effect1_foregroundBlur_529_4322'%20stdDeviation='1.016'/%3e%3c/filter%3e%3cfilter%20id='b'%20width='60.952'%20height='10.159'%20x='2.762'%20y='55.873'%20color-interpolation-filters='sRGB'%20filterUnits='userSpaceOnUse'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeBlend%20in='SourceGraphic'%20in2='BackgroundImageFix'%20result='shape'/%3e%3cfeGaussianBlur%20result='effect1_foregroundBlur_529_4322'%20stdDeviation='1.016'/%3e%3c/filter%3e%3c/defs%3e%3c/svg%3e";class yn extends Error{constructor(t,r){const n=new.target.prototype;super(`${t}: Status code '${r}'`),this.statusCode=r,this.__proto__=n}}class _c extends Error{constructor(t="A timeout occurred."){const r=new.target.prototype;super(t),this.__proto__=r}}class Sr extends Error{constructor(t="An abort occurred."){const r=new.target.prototype;super(t),this.__proto__=r}}class T_ extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="UnsupportedTransportError",this.__proto__=n}}class I_ extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="DisabledTransportError",this.__proto__=n}}class A_ extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="FailedToStartTransportError",this.__proto__=n}}class zf extends Error{constructor(t){const r=new.target.prototype;super(t),this.errorType="FailedToNegotiateWithServerError",this.__proto__=r}}class M_ extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.innerErrors=r,this.__proto__=n}}class Bf{constructor(t,r,n){this.statusCode=t,this.statusText=r,this.content=n}}class Di{get(t,r){return this.send({...r,method:"GET",url:t})}post(t,r){return this.send({...r,method:"POST",url:t})}delete(t,r){return this.send({...r,method:"DELETE",url:t})}getCookieString(t){return""}}var q;(function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"})(q||(q={}));class Mo{constructor(){}log(t,r){}}Mo.instance=new Mo;const P_="10.0.0";class Ot{static isRequired(t,r){if(t==null)throw new Error(`The '${r}' argument is required.`)}static isNotEmpty(t,r){if(!t||t.match(/^\s*$/))throw new Error(`The '${r}' argument should not be empty.`)}static isIn(t,r,n){if(!(t in r))throw new Error(`Unknown ${n} value: ${t}.`)}}class _t{static get isBrowser(){return!_t.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!_t.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!_t.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}}function Po(e,t){let r="";return bn(e)?(r=`Binary data of length ${e.byteLength}`,t&&(r+=`. Content: '${O_(e)}'`)):typeof e=="string"&&(r=`String data of length ${e.length}`,t&&(r+=`. Content: '${e}'`)),r}function O_(e){const t=new Uint8Array(e);let r="";return t.forEach(n=>{const o=n<16?"0":"";r+=`0x${o}${n.toString(16)} `}),r.substring(0,r.length-1)}function bn(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||e.constructor&&e.constructor.name==="ArrayBuffer")}async function Ff(e,t,r,n,o,s){const i={},[a,c]=Un();i[a]=c,e.log(q.Trace,`(${t} transport) sending data. ${Po(o,s.logMessageContent)}.`);const l=bn(o)?"arraybuffer":"text",d=await r.post(n,{content:o,headers:{...i,...s.headers},responseType:l,timeout:s.timeout,withCredentials:s.withCredentials});e.log(q.Trace,`(${t} transport) request complete. Response status: ${d.statusCode}.`)}function j_(e){return e===void 0?new ki(q.Information):e===null?Mo.instance:e.log!==void 0?e:new ki(e)}class R_{constructor(t,r){this._subject=t,this._observer=r}dispose(){const t=this._subject.observers.indexOf(this._observer);t>-1&&this._subject.observers.splice(t,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(r=>{})}}class ki{constructor(t){this._minLevel=t,this.out=console}log(t,r){if(t>=this._minLevel){const n=`[${new Date().toISOString()}] ${q[t]}: ${r}`;switch(t){case q.Critical:case q.Error:this.out.error(n);break;case q.Warning:this.out.warn(n);break;case q.Information:this.out.info(n);break;default:this.out.log(n);break}}}}function Un(){let e="X-SignalR-User-Agent";return _t.isNode&&(e="User-Agent"),[e,N_(P_,$_(),z_(),L_())]}function N_(e,t,r,n){let o="Microsoft SignalR/";const s=e.split(".");return o+=`${s[0]}.${s[1]}`,o+=` (${e}; `,t&&t!==""?o+=`${t}; `:o+="Unknown OS; ",o+=`${r}`,n?o+=`; ${n}`:o+="; Unknown Runtime Version",o+=")",o}function $_(){if(_t.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function L_(){if(_t.isNode)return process.versions.node}function z_(){return _t.isNode?"NodeJS":"Browser"}function xc(e){return e.stack?e.stack:e.message?e.message:`${e}`}function B_(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}class F_ extends Di{constructor(t){if(super(),this._logger=t,typeof fetch>"u"||_t.isNode){const r=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(r("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=r("node-fetch"):this._fetchType=fetch,this._fetchType=r("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(B_());if(typeof AbortController>"u"){const r=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=r("abort-controller")}else this._abortControllerType=AbortController}async send(t){if(t.abortSignal&&t.abortSignal.aborted)throw new Sr;if(!t.method)throw new Error("No method defined.");if(!t.url)throw new Error("No url defined.");const r=new this._abortControllerType;let n;t.abortSignal&&(t.abortSignal.onabort=()=>{r.abort(),n=new Sr});let o=null;if(t.timeout){const c=t.timeout;o=setTimeout(()=>{r.abort(),this._logger.log(q.Warning,"Timeout from HTTP request."),n=new _c},c)}t.content===""&&(t.content=void 0),t.content&&(t.headers=t.headers||{},bn(t.content)?t.headers["Content-Type"]="application/octet-stream":t.headers["Content-Type"]="text/plain;charset=UTF-8");let s;try{s=await this._fetchType(t.url,{body:t.content,cache:"no-cache",credentials:t.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...t.headers},method:t.method,mode:"cors",redirect:"follow",signal:r.signal})}catch(c){throw n||(this._logger.log(q.Warning,`Error from HTTP request. ${c}.`),c)}finally{o&&clearTimeout(o),t.abortSignal&&(t.abortSignal.onabort=null)}if(!s.ok){const c=await Vf(s,"text");throw new yn(c||s.statusText,s.status)}const a=await Vf(s,t.responseType);return new Bf(s.status,s.statusText,a)}getCookieString(t){let r="";return _t.isNode&&this._jar&&this._jar.getCookies(t,(n,o)=>r=o.join("; ")),r}}function Vf(e,t){let r;switch(t){case"arraybuffer":r=e.arrayBuffer();break;case"text":r=e.text();break;case"blob":case"document":case"json":throw new Error(`${t} is not supported.`);default:r=e.text();break}return r}class V_ extends Di{constructor(t){super(),this._logger=t}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new Sr):t.method?t.url?new Promise((r,n)=>{const o=new XMLHttpRequest;o.open(t.method,t.url,!0),o.withCredentials=t.withCredentials===void 0?!0:t.withCredentials,o.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.content===""&&(t.content=void 0),t.content&&(bn(t.content)?o.setRequestHeader("Content-Type","application/octet-stream"):o.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const s=t.headers;s&&Object.keys(s).forEach(i=>{o.setRequestHeader(i,s[i])}),t.responseType&&(o.responseType=t.responseType),t.abortSignal&&(t.abortSignal.onabort=()=>{o.abort(),n(new Sr)}),t.timeout&&(o.timeout=t.timeout),o.onload=()=>{t.abortSignal&&(t.abortSignal.onabort=null),o.status>=200&&o.status<300?r(new Bf(o.status,o.statusText,o.response||o.responseText)):n(new yn(o.response||o.responseText||o.statusText,o.status))},o.onerror=()=>{this._logger.log(q.Warning,`Error from HTTP request. ${o.status}: ${o.statusText}.`),n(new yn(o.statusText,o.status))},o.ontimeout=()=>{this._logger.log(q.Warning,"Timeout from HTTP request."),n(new _c)},o.send(t.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class U_ extends Di{constructor(t){if(super(),typeof fetch<"u"||_t.isNode)this._httpClient=new F_(t);else if(typeof XMLHttpRequest<"u")this._httpClient=new V_(t);else throw new Error("No usable HttpClient found.")}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new Sr):t.method?t.url?this._httpClient.send(t):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(t){return this._httpClient.getCookieString(t)}}class ir{static write(t){return`${t}${ir.RecordSeparator}`}static parse(t){if(t[t.length-1]!==ir.RecordSeparator)throw new Error("Message is incomplete.");const r=t.split(ir.RecordSeparator);return r.pop(),r}}ir.RecordSeparatorCode=30,ir.RecordSeparator=String.fromCharCode(ir.RecordSeparatorCode);class H_{writeHandshakeRequest(t){return ir.write(JSON.stringify(t))}parseHandshakeResponse(t){let r,n;if(bn(t)){const a=new Uint8Array(t),c=a.indexOf(ir.RecordSeparatorCode);if(c===-1)throw new Error("Message is incomplete.");const l=c+1;r=String.fromCharCode.apply(null,Array.prototype.slice.call(a.slice(0,l))),n=a.byteLength>l?a.slice(l).buffer:null}else{const a=t,c=a.indexOf(ir.RecordSeparator);if(c===-1)throw new Error("Message is incomplete.");const l=c+1;r=a.substring(0,l),n=a.length>l?a.substring(l):null}const o=ir.parse(r),s=JSON.parse(o[0]);if(s.type)throw new Error("Expected a handshake response from the server.");return[n,s]}}var Oe;(function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close",e[e.Ack=8]="Ack",e[e.Sequence=9]="Sequence"})(Oe||(Oe={}));class W_{constructor(){this.observers=[]}next(t){for(const r of this.observers)r.next(t)}error(t){for(const r of this.observers)r.error&&r.error(t)}complete(){for(const t of this.observers)t.complete&&t.complete()}subscribe(t){return this.observers.push(t),new R_(this,t)}}class Y_{constructor(t,r,n){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=t,this._connection=r,this._bufferSize=n}async _send(t){const r=this._protocol.writeMessage(t);let n=Promise.resolve();if(this._isInvocationMessage(t)){this._totalMessageCount++;let o=()=>{},s=()=>{};bn(r)?this._bufferedByteCount+=r.byteLength:this._bufferedByteCount+=r.length,this._bufferedByteCount>=this._bufferSize&&(n=new Promise((i,a)=>{o=i,s=a})),this._messages.push(new q_(r,this._totalMessageCount,o,s))}try{this._reconnectInProgress||await this._connection.send(r)}catch{this._disconnected()}await n}_ack(t){let r=-1;for(let n=0;n<this._messages.length;n++){const o=this._messages[n];if(o._id<=t.sequenceId)r=n,bn(o._message)?this._bufferedByteCount-=o._message.byteLength:this._bufferedByteCount-=o._message.length,o._resolver();else if(this._bufferedByteCount<this._bufferSize)o._resolver();else break}r!==-1&&(this._messages=this._messages.slice(r+1))}_shouldProcessMessage(t){if(this._waitForSequenceMessage)return t.type!==Oe.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(t))return!0;const r=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,r<=this._latestReceivedSequenceId?(r===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=r,this._ackTimer(),!0)}_resetSequence(t){if(t.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=t.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}async _resend(){const t=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;await this._connection.send(this._protocol.writeMessage({type:Oe.Sequence,sequenceId:t}));const r=this._messages;for(const n of r)await this._connection.send(n._message);this._reconnectInProgress=!1}_dispose(t){t??(t=new Error("Unable to reconnect to server."));for(const r of this._messages)r._rejector(t)}_isInvocationMessage(t){switch(t.type){case Oe.Invocation:case Oe.StreamItem:case Oe.Completion:case Oe.StreamInvocation:case Oe.CancelInvocation:return!0;case Oe.Close:case Oe.Sequence:case Oe.Ping:case Oe.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:Oe.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0},1e3))}}class q_{constructor(t,r,n,o){this._message=t,this._id=r,this._resolver=n,this._rejector=o}}const Z_=30*1e3,G_=15*1e3,K_=1e5;var mt;(function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"})(mt||(mt={}));class wc{static create(t,r,n,o,s,i,a){return new wc(t,r,n,o,s,i,a)}constructor(t,r,n,o,s,i,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(q.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},Ot.isRequired(t,"connection"),Ot.isRequired(r,"logger"),Ot.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=s??Z_,this.keepAliveIntervalInMilliseconds=i??G_,this._statefulReconnectBufferSize=a??K_,this._logger=r,this._protocol=n,this.connection=t,this._reconnectPolicy=o,this._handshakeProtocol=new H_,this.connection.onreceive=c=>this._processIncomingData(c),this.connection.onclose=c=>this._connectionClosed(c),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=mt.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:Oe.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(t){if(this._connectionState!==mt.Disconnected&&this._connectionState!==mt.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!t)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=t}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==mt.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=mt.Connecting,this._logger.log(q.Debug,"Starting HubConnection.");try{await this._startInternal(),_t.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=mt.Connected,this._connectionStarted=!0,this._logger.log(q.Debug,"HubConnection connected successfully.")}catch(t){return this._connectionState=mt.Disconnected,this._logger.log(q.Debug,`HubConnection failed to start successfully because of error '${t}'.`),Promise.reject(t)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const t=new Promise((r,n)=>{this._handshakeResolver=r,this._handshakeRejecter=n});await this.connection.start(this._protocol.transferFormat);try{let r=this._protocol.version;this.connection.features.reconnect||(r=1);const n={protocol:this._protocol.name,version:r};if(this._logger.log(q.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(n)),this._logger.log(q.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await t,this._stopDuringStartError)throw this._stopDuringStartError;(this.connection.features.reconnect||!1)&&(this._messageBuffer=new Y_(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(r){throw this._logger.log(q.Debug,`Hub handshake failed with error '${r}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(r),r}}async stop(){const t=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),await this._stopPromise;try{await t}catch{}}_stopInternal(t){if(this._connectionState===mt.Disconnected)return this._logger.log(q.Debug,`Call to HubConnection.stop(${t}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===mt.Disconnecting)return this._logger.log(q.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;const r=this._connectionState;return this._connectionState=mt.Disconnecting,this._logger.log(q.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(q.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(r===mt.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=t||new Sr("The connection was stopped before the hub handshake could complete."),this.connection.stop(t))}async _sendCloseMessage(){try{await this._sendWithProtocol(this._createCloseMessage())}catch{}}stream(t,...r){const[n,o]=this._replaceStreamingParams(r),s=this._createStreamInvocation(t,r,o);let i;const a=new W_;return a.cancelCallback=()=>{const c=this._createCancelInvocation(s.invocationId);return delete this._callbacks[s.invocationId],i.then(()=>this._sendWithProtocol(c))},this._callbacks[s.invocationId]=(c,l)=>{if(l){a.error(l);return}else c&&(c.type===Oe.Completion?c.error?a.error(new Error(c.error)):a.complete():a.next(c.item))},i=this._sendWithProtocol(s).catch(c=>{a.error(c),delete this._callbacks[s.invocationId]}),this._launchStreams(n,i),a}_sendMessage(t){return this._resetKeepAliveInterval(),this.connection.send(t)}_sendWithProtocol(t){return this._messageBuffer?this._messageBuffer._send(t):this._sendMessage(this._protocol.writeMessage(t))}send(t,...r){const[n,o]=this._replaceStreamingParams(r),s=this._sendWithProtocol(this._createInvocation(t,r,!0,o));return this._launchStreams(n,s),s}invoke(t,...r){const[n,o]=this._replaceStreamingParams(r),s=this._createInvocation(t,r,!1,o);return new Promise((a,c)=>{this._callbacks[s.invocationId]=(d,f)=>{if(f){c(f);return}else d&&(d.type===Oe.Completion?d.error?c(new Error(d.error)):a(d.result):c(new Error(`Unexpected message type: ${d.type}`)))};const l=this._sendWithProtocol(s).catch(d=>{c(d),delete this._callbacks[s.invocationId]});this._launchStreams(n,l)})}on(t,r){!t||!r||(t=t.toLowerCase(),this._methods[t]||(this._methods[t]=[]),this._methods[t].indexOf(r)===-1&&this._methods[t].push(r))}off(t,r){if(!t)return;t=t.toLowerCase();const n=this._methods[t];if(n)if(r){const o=n.indexOf(r);o!==-1&&(n.splice(o,1),n.length===0&&delete this._methods[t])}else delete this._methods[t]}onclose(t){t&&this._closedCallbacks.push(t)}onreconnecting(t){t&&this._reconnectingCallbacks.push(t)}onreconnected(t){t&&this._reconnectedCallbacks.push(t)}_processIncomingData(t){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(t=this._processHandshakeResponse(t),this._receivedHandshakeResponse=!0),t){const r=this._protocol.parseMessages(t,this._logger);for(const n of r)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(n)))switch(n.type){case Oe.Invocation:this._invokeClientMethod(n).catch(o=>{this._logger.log(q.Error,`Invoke client method threw error: ${xc(o)}`)});break;case Oe.StreamItem:case Oe.Completion:{const o=this._callbacks[n.invocationId];if(o){n.type===Oe.Completion&&delete this._callbacks[n.invocationId];try{o(n)}catch(s){this._logger.log(q.Error,`Stream callback threw error: ${xc(s)}`)}}break}case Oe.Ping:break;case Oe.Close:{this._logger.log(q.Information,"Close message received from server.");const o=n.error?new Error("Server returned an error on close: "+n.error):void 0;n.allowReconnect===!0?this.connection.stop(o):this._stopPromise=this._stopInternal(o);break}case Oe.Ack:this._messageBuffer&&this._messageBuffer._ack(n);break;case Oe.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(n);break;default:this._logger.log(q.Warning,`Invalid message type: ${n.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(t){let r,n;try{[n,r]=this._handshakeProtocol.parseHandshakeResponse(t)}catch(o){const s="Error parsing handshake response: "+o;this._logger.log(q.Error,s);const i=new Error(s);throw this._handshakeRejecter(i),i}if(r.error){const o="Server returned handshake error: "+r.error;this._logger.log(q.Error,o);const s=new Error(o);throw this._handshakeRejecter(s),s}else this._logger.log(q.Debug,"Server handshake complete.");return this._handshakeResolver(),n}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if(!this.connection.features||!this.connection.features.inherentKeepAlive){this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds);let t=this._nextKeepAlive-new Date().getTime();if(t<0){this._connectionState===mt.Connected&&this._trySendPingMessage();return}this._pingServerHandle===void 0&&(t<0&&(t=0),this._pingServerHandle=setTimeout(async()=>{this._connectionState===mt.Connected&&await this._trySendPingMessage()},t))}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(t){const r=t.target.toLowerCase(),n=this._methods[r];if(!n){this._logger.log(q.Warning,`No client method with the name '${r}' found.`),t.invocationId&&(this._logger.log(q.Warning,`No result given for '${r}' method and invocation ID '${t.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)));return}const o=n.slice(),s=!!t.invocationId;let i,a,c;for(const l of o)try{const d=i;i=await l.apply(this,t.arguments),s&&i&&d&&(this._logger.log(q.Error,`Multiple results provided for '${r}'. Sending error to server.`),c=this._createCompletionMessage(t.invocationId,"Client provided multiple results.",null)),a=void 0}catch(d){a=d,this._logger.log(q.Error,`A callback for the method '${r}' threw error '${d}'.`)}c?await this._sendWithProtocol(c):s?(a?c=this._createCompletionMessage(t.invocationId,`${a}`,null):i!==void 0?c=this._createCompletionMessage(t.invocationId,null,i):(this._logger.log(q.Warning,`No result given for '${r}' method and invocation ID '${t.invocationId}'.`),c=this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(c)):i&&this._logger.log(q.Error,`Result given for '${r}' method but server is not expecting a result.`)}_connectionClosed(t){this._logger.log(q.Debug,`HubConnection.connectionClosed(${t}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||t||new Sr("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(t||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===mt.Disconnecting?this._completeClose(t):this._connectionState===mt.Connected&&this._reconnectPolicy?this._reconnect(t):this._connectionState===mt.Connected&&this._completeClose(t)}_completeClose(t){if(this._connectionStarted){this._connectionState=mt.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(t??new Error("Connection closed.")),this._messageBuffer=void 0),_t.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(r=>r.apply(this,[t]))}catch(r){this._logger.log(q.Error,`An onclose callback called with error '${t}' threw error '${r}'.`)}}}async _reconnect(t){const r=Date.now();let n=0,o=t!==void 0?t:new Error("Attempting to reconnect due to a unknown error."),s=this._getNextRetryDelay(n,0,o);if(s===null){this._logger.log(q.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(t);return}if(this._connectionState=mt.Reconnecting,t?this._logger.log(q.Information,`Connection reconnecting because of error '${t}'.`):this._logger.log(q.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(i=>i.apply(this,[t]))}catch(i){this._logger.log(q.Error,`An onreconnecting callback called with error '${t}' threw error '${i}'.`)}if(this._connectionState!==mt.Reconnecting){this._logger.log(q.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;s!==null;){if(this._logger.log(q.Information,`Reconnect attempt number ${n+1} will start in ${s} ms.`),await new Promise(i=>{this._reconnectDelayHandle=setTimeout(i,s)}),this._reconnectDelayHandle=void 0,this._connectionState!==mt.Reconnecting){this._logger.log(q.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=mt.Connected,this._logger.log(q.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(i=>i.apply(this,[this.connection.connectionId]))}catch(i){this._logger.log(q.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${i}'.`)}return}catch(i){if(this._logger.log(q.Information,`Reconnect attempt failed because of error '${i}'.`),this._connectionState!==mt.Reconnecting){this._logger.log(q.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===mt.Disconnecting&&this._completeClose();return}n++,o=i instanceof Error?i:new Error(i.toString()),s=this._getNextRetryDelay(n,Date.now()-r,o)}}this._logger.log(q.Information,`Reconnect retries have been exhausted after ${Date.now()-r} ms and ${n} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(t,r,n){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:r,previousRetryCount:t,retryReason:n})}catch(o){return this._logger.log(q.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${t}, ${r}) threw error '${o}'.`),null}}_cancelCallbacksWithError(t){const r=this._callbacks;this._callbacks={},Object.keys(r).forEach(n=>{const o=r[n];try{o(null,t)}catch(s){this._logger.log(q.Error,`Stream 'error' callback called with '${t}' threw error: ${xc(s)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(t,r,n,o){if(n)return o.length!==0?{target:t,arguments:r,streamIds:o,type:Oe.Invocation}:{target:t,arguments:r,type:Oe.Invocation};{const s=this._invocationId;return this._invocationId++,o.length!==0?{target:t,arguments:r,invocationId:s.toString(),streamIds:o,type:Oe.Invocation}:{target:t,arguments:r,invocationId:s.toString(),type:Oe.Invocation}}}_launchStreams(t,r){if(t.length!==0){r||(r=Promise.resolve());for(const n in t)t[n].subscribe({complete:()=>{r=r.then(()=>this._sendWithProtocol(this._createCompletionMessage(n)))},error:o=>{let s;o instanceof Error?s=o.message:o&&o.toString?s=o.toString():s="Unknown error",r=r.then(()=>this._sendWithProtocol(this._createCompletionMessage(n,s)))},next:o=>{r=r.then(()=>this._sendWithProtocol(this._createStreamItemMessage(n,o)))}})}}_replaceStreamingParams(t){const r=[],n=[];for(let o=0;o<t.length;o++){const s=t[o];if(this._isObservable(s)){const i=this._invocationId;this._invocationId++,r[i]=s,n.push(i.toString()),t.splice(o,1)}}return[r,n]}_isObservable(t){return t&&t.subscribe&&typeof t.subscribe=="function"}_createStreamInvocation(t,r,n){const o=this._invocationId;return this._invocationId++,n.length!==0?{target:t,arguments:r,invocationId:o.toString(),streamIds:n,type:Oe.StreamInvocation}:{target:t,arguments:r,invocationId:o.toString(),type:Oe.StreamInvocation}}_createCancelInvocation(t){return{invocationId:t,type:Oe.CancelInvocation}}_createStreamItemMessage(t,r){return{invocationId:t,item:r,type:Oe.StreamItem}}_createCompletionMessage(t,r,n){return r?{error:r,invocationId:t,type:Oe.Completion}:{invocationId:t,result:n,type:Oe.Completion}}_createCloseMessage(){return{type:Oe.Close}}async _trySendPingMessage(){try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}}const Q_=[0,2e3,1e4,3e4,null];class Uf{constructor(t){this._retryDelays=t!==void 0?[...t,null]:Q_}nextRetryDelayInMilliseconds(t){return this._retryDelays[t.previousRetryCount]}}class _n{}_n.Authorization="Authorization",_n.Cookie="Cookie";class X_ extends Di{constructor(t,r){super(),this._innerClient=t,this._accessTokenFactory=r}async send(t){let r=!0;this._accessTokenFactory&&(!this._accessToken||t.url&&t.url.indexOf("/negotiate?")>0)&&(r=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(t);const n=await this._innerClient.send(t);return r&&n.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(t),await this._innerClient.send(t)):n}_setAuthorizationHeader(t){t.headers||(t.headers={}),this._accessToken?t.headers[_n.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&t.headers[_n.Authorization]&&delete t.headers[_n.Authorization]}getCookieString(t){return this._innerClient.getCookieString(t)}}var Rt;(function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"})(Rt||(Rt={}));var Wt;(function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"})(Wt||(Wt={}));let J_=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};class Hf{get pollAborted(){return this._pollAbort.aborted}constructor(t,r,n){this._httpClient=t,this._logger=r,this._pollAbort=new J_,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}async connect(t,r){if(Ot.isRequired(t,"url"),Ot.isRequired(r,"transferFormat"),Ot.isIn(r,Wt,"transferFormat"),this._url=t,this._logger.log(q.Trace,"(LongPolling transport) Connecting."),r===Wt.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[n,o]=Un(),s={[n]:o,...this._options.headers},i={abortSignal:this._pollAbort.signal,headers:s,timeout:1e5,withCredentials:this._options.withCredentials};r===Wt.Binary&&(i.responseType="arraybuffer");const a=`${t}&_=${Date.now()}`;this._logger.log(q.Trace,`(LongPolling transport) polling: ${a}.`);const c=await this._httpClient.get(a,i);c.statusCode!==200?(this._logger.log(q.Error,`(LongPolling transport) Unexpected response code: ${c.statusCode}.`),this._closeError=new yn(c.statusText||"",c.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,i)}async _poll(t,r){try{for(;this._running;)try{const n=`${t}&_=${Date.now()}`;this._logger.log(q.Trace,`(LongPolling transport) polling: ${n}.`);const o=await this._httpClient.get(n,r);o.statusCode===204?(this._logger.log(q.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):o.statusCode!==200?(this._logger.log(q.Error,`(LongPolling transport) Unexpected response code: ${o.statusCode}.`),this._closeError=new yn(o.statusText||"",o.statusCode),this._running=!1):o.content?(this._logger.log(q.Trace,`(LongPolling transport) data received. ${Po(o.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(o.content)):this._logger.log(q.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(n){this._running?n instanceof _c?this._logger.log(q.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=n,this._running=!1):this._logger.log(q.Trace,`(LongPolling transport) Poll errored after shutdown: ${n.message}`)}}finally{this._logger.log(q.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(t){return this._running?Ff(this._logger,"LongPolling",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(q.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(q.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const t={},[r,n]=Un();t[r]=n;const o={headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};let s;try{await this._httpClient.delete(this._url,o)}catch(i){s=i}s?s instanceof yn&&(s.statusCode===404?this._logger.log(q.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(q.Trace,`(LongPolling transport) Error sending a DELETE request: ${s}`)):this._logger.log(q.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(q.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let t="(LongPolling transport) Firing onclose event.";this._closeError&&(t+=" Error: "+this._closeError),this._logger.log(q.Trace,t),this.onclose(this._closeError)}}}class ex{constructor(t,r,n,o){this._httpClient=t,this._accessToken=r,this._logger=n,this._options=o,this.onreceive=null,this.onclose=null}async connect(t,r){return Ot.isRequired(t,"url"),Ot.isRequired(r,"transferFormat"),Ot.isIn(r,Wt,"transferFormat"),this._logger.log(q.Trace,"(SSE transport) Connecting."),this._url=t,this._accessToken&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((n,o)=>{let s=!1;if(r!==Wt.Text){o(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let i;if(_t.isBrowser||_t.isWebWorker)i=new this._options.EventSource(t,{withCredentials:this._options.withCredentials});else{const a=this._httpClient.getCookieString(t),c={};c.Cookie=a;const[l,d]=Un();c[l]=d,i=new this._options.EventSource(t,{withCredentials:this._options.withCredentials,headers:{...c,...this._options.headers}})}try{i.onmessage=a=>{if(this.onreceive)try{this._logger.log(q.Trace,`(SSE transport) data received. ${Po(a.data,this._options.logMessageContent)}.`),this.onreceive(a.data)}catch(c){this._close(c);return}},i.onerror=a=>{s?this._close():o(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},i.onopen=()=>{this._logger.log(q.Information,`SSE connected to ${this._url}`),this._eventSource=i,s=!0,n()}}catch(a){o(a);return}})}async send(t){return this._eventSource?Ff(this._logger,"SSE",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(t){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(t))}}class tx{constructor(t,r,n,o,s,i){this._logger=n,this._accessTokenFactory=r,this._logMessageContent=o,this._webSocketConstructor=s,this._httpClient=t,this.onreceive=null,this.onclose=null,this._headers=i}async connect(t,r){Ot.isRequired(t,"url"),Ot.isRequired(r,"transferFormat"),Ot.isIn(r,Wt,"transferFormat"),this._logger.log(q.Trace,"(WebSockets transport) Connecting.");let n;return this._accessTokenFactory&&(n=await this._accessTokenFactory()),new Promise((o,s)=>{t=t.replace(/^http/,"ws");let i;const a=this._httpClient.getCookieString(t);let c=!1;if(_t.isNode||_t.isReactNative){const l={},[d,f]=Un();l[d]=f,n&&(l[_n.Authorization]=`Bearer ${n}`),a&&(l[_n.Cookie]=a),i=new this._webSocketConstructor(t,void 0,{headers:{...l,...this._headers}})}else n&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n)}`);i||(i=new this._webSocketConstructor(t)),r===Wt.Binary&&(i.binaryType="arraybuffer"),i.onopen=l=>{this._logger.log(q.Information,`WebSocket connected to ${t}.`),this._webSocket=i,c=!0,o()},i.onerror=l=>{let d=null;typeof ErrorEvent<"u"&&l instanceof ErrorEvent?d=l.error:d="There was an error with the transport",this._logger.log(q.Information,`(WebSockets transport) ${d}.`)},i.onmessage=l=>{if(this._logger.log(q.Trace,`(WebSockets transport) data received. ${Po(l.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(l.data)}catch(d){this._close(d);return}},i.onclose=l=>{if(c)this._close(l);else{let d=null;typeof ErrorEvent<"u"&&l instanceof ErrorEvent?d=l.error:d="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",s(new Error(d))}}})}send(t){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(q.Trace,`(WebSockets transport) sending data. ${Po(t,this._logMessageContent)}.`),this._webSocket.send(t),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(t){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(q.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(t)&&(t.wasClean===!1||t.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${t.code} (${t.reason||"no reason given"}).`)):t instanceof Error?this.onclose(t):this.onclose())}_isCloseEvent(t){return t&&typeof t.wasClean=="boolean"&&typeof t.code=="number"}}const Wf=100;class rx{constructor(t,r={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,Ot.isRequired(t,"url"),this._logger=j_(r.logger),this.baseUrl=this._resolveUrl(t),r=r||{},r.logMessageContent=r.logMessageContent===void 0?!1:r.logMessageContent,typeof r.withCredentials=="boolean"||r.withCredentials===void 0)r.withCredentials=r.withCredentials===void 0?!0:r.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");r.timeout=r.timeout===void 0?100*1e3:r.timeout;let n=null,o=null;if(_t.isNode&&typeof require<"u"){const s=typeof __webpack_require__=="function"?__non_webpack_require__:require;n=s("ws"),o=s("eventsource")}!_t.isNode&&typeof WebSocket<"u"&&!r.WebSocket?r.WebSocket=WebSocket:_t.isNode&&!r.WebSocket&&n&&(r.WebSocket=n),!_t.isNode&&typeof EventSource<"u"&&!r.EventSource?r.EventSource=EventSource:_t.isNode&&!r.EventSource&&typeof o<"u"&&(r.EventSource=o),this._httpClient=new X_(r.httpClient||new U_(this._logger),r.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=r,this.onreceive=null,this.onclose=null}async start(t){if(t=t||Wt.Binary,Ot.isIn(t,Wt,"transferFormat"),this._logger.log(q.Debug,`Starting connection with transfer format '${Wt[t]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(t),await this._startInternalPromise,this._connectionState==="Disconnecting"){const r="Failed to start the HttpConnection before stop() was called.";return this._logger.log(q.Error,r),await this._stopPromise,Promise.reject(new Sr(r))}else if(this._connectionState!=="Connected"){const r="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(q.Error,r),Promise.reject(new Sr(r))}this._connectionStarted=!0}send(t){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new Sc(this.transport)),this._sendQueue.send(t))}async stop(t){if(this._connectionState==="Disconnected")return this._logger.log(q.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(q.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(r=>{this._stopPromiseResolver=r}),await this._stopInternal(t),await this._stopPromise}async _stopInternal(t){this._stopError=t;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(r){this._logger.log(q.Error,`HttpConnection.transport.stop() threw error '${r}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(q.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(t){let r=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===Rt.WebSockets)this.transport=this._constructTransport(Rt.WebSockets),await this._startTransport(r,t);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let n=null,o=0;do{if(n=await this._getNegotiationResponse(r),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new Sr("The connection was stopped during negotiation.");if(n.error)throw new Error(n.error);if(n.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(n.url&&(r=n.url),n.accessToken){const s=n.accessToken;this._accessTokenFactory=()=>s,this._httpClient._accessToken=s,this._httpClient._accessTokenFactory=void 0}o++}while(n.url&&o<Wf);if(o===Wf&&n.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(r,this._options.transport,n,t)}this.transport instanceof Hf&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(q.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(n){return this._logger.log(q.Error,"Failed to start the connection: "+n),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(n)}}async _getNegotiationResponse(t){const r={},[n,o]=Un();r[n]=o;const s=this._resolveNegotiateUrl(t);this._logger.log(q.Debug,`Sending negotiation request: ${s}.`);try{const i=await this._httpClient.post(s,{content:"",headers:{...r,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(i.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${i.statusCode}'`));const a=JSON.parse(i.content);return(!a.negotiateVersion||a.negotiateVersion<1)&&(a.connectionToken=a.connectionId),a.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new zf("Client didn't negotiate Stateful Reconnect but the server did.")):a}catch(i){let a="Failed to complete negotiation with the server: "+i;return i instanceof yn&&i.statusCode===404&&(a=a+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(q.Error,a),Promise.reject(new zf(a))}}_createConnectUrl(t,r){return r?t+(t.indexOf("?")===-1?"?":"&")+`id=${r}`:t}async _createTransport(t,r,n,o){let s=this._createConnectUrl(t,n.connectionToken);if(this._isITransport(r)){this._logger.log(q.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=r,await this._startTransport(s,o),this.connectionId=n.connectionId;return}const i=[],a=n.availableTransports||[];let c=n;for(const l of a){const d=this._resolveTransportOrError(l,r,o,c?.useStatefulReconnect===!0);if(d instanceof Error)i.push(`${l.transport} failed:`),i.push(d);else if(this._isITransport(d)){if(this.transport=d,!c){try{c=await this._getNegotiationResponse(t)}catch(f){return Promise.reject(f)}s=this._createConnectUrl(t,c.connectionToken)}try{await this._startTransport(s,o),this.connectionId=c.connectionId;return}catch(f){if(this._logger.log(q.Error,`Failed to start the transport '${l.transport}': ${f}`),c=void 0,i.push(new A_(`${l.transport} failed: ${f}`,Rt[l.transport])),this._connectionState!=="Connecting"){const p="Failed to select transport before stop() was called.";return this._logger.log(q.Debug,p),Promise.reject(new Sr(p))}}}}return i.length>0?Promise.reject(new M_(`Unable to connect to the server with any of the available transports. ${i.join(" ")}`,i)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(t){switch(t){case Rt.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new tx(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case Rt.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new ex(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case Rt.LongPolling:return new Hf(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${t}.`)}}_startTransport(t,r){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=async n=>{let o=!1;if(this.features.reconnect)try{this.features.disconnected(),await this.transport.connect(t,r),await this.features.resend()}catch{o=!0}else{this._stopConnection(n);return}o&&this._stopConnection(n)}:this.transport.onclose=n=>this._stopConnection(n),this.transport.connect(t,r)}_resolveTransportOrError(t,r,n,o){const s=Rt[t.transport];if(s==null)return this._logger.log(q.Debug,`Skipping transport '${t.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${t.transport}' because it is not supported by this client.`);if(nx(r,s))if(t.transferFormats.map(a=>Wt[a]).indexOf(n)>=0){if(s===Rt.WebSockets&&!this._options.WebSocket||s===Rt.ServerSentEvents&&!this._options.EventSource)return this._logger.log(q.Debug,`Skipping transport '${Rt[s]}' because it is not supported in your environment.'`),new T_(`'${Rt[s]}' is not supported in your environment.`,s);this._logger.log(q.Debug,`Selecting transport '${Rt[s]}'.`);try{return this.features.reconnect=s===Rt.WebSockets?o:void 0,this._constructTransport(s)}catch(a){return a}}else return this._logger.log(q.Debug,`Skipping transport '${Rt[s]}' because it does not support the requested transfer format '${Wt[n]}'.`),new Error(`'${Rt[s]}' does not support ${Wt[n]}.`);else return this._logger.log(q.Debug,`Skipping transport '${Rt[s]}' because it was disabled by the client.`),new I_(`'${Rt[s]}' is disabled by the client.`,s)}_isITransport(t){return t&&typeof t=="object"&&"connect"in t}_stopConnection(t){if(this._logger.log(q.Debug,`HttpConnection.stopConnection(${t}) called while in state ${this._connectionState}.`),this.transport=void 0,t=this._stopError||t,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(q.Debug,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(q.Warning,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${t}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),t?this._logger.log(q.Error,`Connection disconnected with error '${t}'.`):this._logger.log(q.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(r=>{this._logger.log(q.Error,`TransportSendQueue.stop() threw error '${r}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(t)}catch(r){this._logger.log(q.Error,`HttpConnection.onclose(${t}) threw error '${r}'.`)}}}_resolveUrl(t){if(t.lastIndexOf("https://",0)===0||t.lastIndexOf("http://",0)===0)return t;if(!_t.isBrowser)throw new Error(`Cannot resolve '${t}'.`);const r=window.document.createElement("a");return r.href=t,this._logger.log(q.Information,`Normalizing '${t}' to '${r.href}'.`),r.href}_resolveNegotiateUrl(t){const r=new URL(t);r.pathname.endsWith("/")?r.pathname+="negotiate":r.pathname+="/negotiate";const n=new URLSearchParams(r.searchParams);return n.has("negotiateVersion")||n.append("negotiateVersion",this._negotiateVersion.toString()),n.has("useStatefulReconnect")?n.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&n.append("useStatefulReconnect","true"),r.search=n.toString(),r.toString()}}function nx(e,t){return!e||(t&e)!==0}class Sc{constructor(t){this._transport=t,this._buffer=[],this._executing=!0,this._sendBufferedData=new Ti,this._transportResult=new Ti,this._sendLoopPromise=this._sendLoop()}send(t){return this._bufferData(t),this._transportResult||(this._transportResult=new Ti),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(t){if(this._buffer.length&&typeof this._buffer[0]!=typeof t)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof t}`);this._buffer.push(t),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new Ti;const t=this._transportResult;this._transportResult=void 0;const r=typeof this._buffer[0]=="string"?this._buffer.join(""):Sc._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(r),t.resolve()}catch(n){t.reject(n)}}}static _concatBuffers(t){const r=t.map(s=>s.byteLength).reduce((s,i)=>s+i),n=new Uint8Array(r);let o=0;for(const s of t)n.set(new Uint8Array(s),o),o+=s.byteLength;return n.buffer}}class Ti{constructor(){this.promise=new Promise((t,r)=>[this._resolver,this._rejecter]=[t,r])}resolve(){this._resolver()}reject(t){this._rejecter(t)}}const ox="json";class sx{constructor(){this.name=ox,this.version=2,this.transferFormat=Wt.Text}parseMessages(t,r){if(typeof t!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!t)return[];r===null&&(r=Mo.instance);const n=ir.parse(t),o=[];for(const s of n){const i=JSON.parse(s);if(typeof i.type!="number")throw new Error("Invalid payload.");switch(i.type){case Oe.Invocation:this._isInvocationMessage(i);break;case Oe.StreamItem:this._isStreamItemMessage(i);break;case Oe.Completion:this._isCompletionMessage(i);break;case Oe.Ping:break;case Oe.Close:break;case Oe.Ack:this._isAckMessage(i);break;case Oe.Sequence:this._isSequenceMessage(i);break;default:r.log(q.Information,"Unknown message type '"+i.type+"' ignored.");continue}o.push(i)}return o}writeMessage(t){return ir.write(JSON.stringify(t))}_isInvocationMessage(t){this._assertNotEmptyString(t.target,"Invalid payload for Invocation message."),t.invocationId!==void 0&&this._assertNotEmptyString(t.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(t){if(this._assertNotEmptyString(t.invocationId,"Invalid payload for StreamItem message."),t.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(t){if(t.result&&t.error)throw new Error("Invalid payload for Completion message.");!t.result&&t.error&&this._assertNotEmptyString(t.error,"Invalid payload for Completion message."),this._assertNotEmptyString(t.invocationId,"Invalid payload for Completion message.")}_isAckMessage(t){if(typeof t.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(t){if(typeof t.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(t,r){if(typeof t!="string"||t==="")throw new Error(r)}}const ix={trace:q.Trace,debug:q.Debug,info:q.Information,information:q.Information,warn:q.Warning,warning:q.Warning,error:q.Error,critical:q.Critical,none:q.None};function ax(e){const t=ix[e.toLowerCase()];if(typeof t<"u")return t;throw new Error(`Unknown log level: ${e}`)}class cx{configureLogging(t){if(Ot.isRequired(t,"logging"),lx(t))this.logger=t;else if(typeof t=="string"){const r=ax(t);this.logger=new ki(r)}else this.logger=new ki(t);return this}withUrl(t,r){return Ot.isRequired(t,"url"),Ot.isNotEmpty(t,"url"),this.url=t,typeof r=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...r}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:r},this}withHubProtocol(t){return Ot.isRequired(t,"protocol"),this.protocol=t,this}withAutomaticReconnect(t){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return t?Array.isArray(t)?this.reconnectPolicy=new Uf(t):this.reconnectPolicy=t:this.reconnectPolicy=new Uf,this}withServerTimeout(t){return Ot.isRequired(t,"milliseconds"),this._serverTimeoutInMilliseconds=t,this}withKeepAliveInterval(t){return Ot.isRequired(t,"milliseconds"),this._keepAliveIntervalInMilliseconds=t,this}withStatefulReconnect(t){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=t?.bufferSize,this}build(){const t=this.httpConnectionOptions||{};if(t.logger===void 0&&(t.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const r=new rx(this.url,t);return wc.create(r,this.logger||Mo.instance,this.protocol||new sx,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}function lx(e){return e.log!==void 0}var Oo={},Yf;function ux(){if(Yf)return Oo;Yf=1;var e=nt();Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.default=void 0;var t=e(ut()),r=at();return Oo.default=(0,t.default)((0,r.jsx)("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V10h16zm0-13H4V5h16z"}),"CalendarTodayOutlined"),Oo}var dx=ux();const fx=rt(dx);var jo={},qf;function px(){if(qf)return jo;qf=1;var e=nt();Object.defineProperty(jo,"__esModule",{value:!0}),jo.default=void 0;var t=e(ut()),r=at();return jo.default=(0,t.default)((0,r.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8m.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"}),"AccessTimeOutlined"),jo}var hx=px();const mx=rt(hx);var Ro={},Zf;function gx(){if(Zf)return Ro;Zf=1;var e=nt();Object.defineProperty(Ro,"__esModule",{value:!0}),Ro.default=void 0;var t=e(ut()),r=at();return Ro.default=(0,t.default)((0,r.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),Ro}var vx=gx();const yx=rt(vx);var No={},Gf;function bx(){if(Gf)return No;Gf=1;var e=nt();Object.defineProperty(No,"__esModule",{value:!0}),No.default=void 0;var t=e(ut()),r=at();return No.default=(0,t.default)((0,r.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),No}var _x=bx();const Ur=rt(_x);function xx(e,...t){const r=nc.bind(null,t.find(n=>typeof n=="object"));return t.map(r)}const wx=({invitation:e,onAccept:t,onReject:r})=>{const{mensaje:n,evento:o,notificacionID:s,tipo:i,iconoColor:a}=e,c=i==="EventoCreado";console.log("invitation",e);const l=o?.fechaInicio?new Date(o.fechaInicio):new Date;return u.jsxs(g.Box,{sx:{p:2,mb:1,bgcolor:"white",width:"100%",border:"solid",borderColor:"#ccc",borderWidth:"0.1px"},children:[u.jsx(g.Box,{sx:{display:"flex",alignItems:"flex-start",mb:1},children:u.jsx(g.Typography,{sx:{lineHeight:1.3,color:"#333",fontSize:"14px"},children:n})}),u.jsx(g.Divider,{sx:{my:1.5,ml:1}}),u.jsxs(g.Box,{sx:{ml:1},children:[u.jsxs(g.Grid,{container:!0,spacing:1,sx:{mb:0},children:[u.jsxs(g.Grid,{item:!0,xs:12,sx:{display:"flex",alignItems:"start"},children:[u.jsx(fx,{sx:{fontSize:18,color:"#555",mr:1}}),u.jsx(g.Typography,{variant:"body2",color:"textSecondary",children:_.format(l,"EEEE, dd 'de' MMMM")})]}),u.jsxs(g.Grid,{item:!0,xs:12,sx:{display:"flex",alignItems:"center"},children:[u.jsx(mx,{sx:{fontSize:18,color:"#555",mr:1}}),u.jsx(g.Typography,{variant:"body2",color:"textSecondary",children:_.format(l,"h:mm a")})]})]}),u.jsx("br",{}),c&&u.jsxs(g.Box,{sx:{display:"flex",gap:1.5},children:[u.jsx(g.Button,{variant:"outlined",size:"small",startIcon:u.jsx(yx,{}),onClick:()=>t?.(o.eventoID,s),sx:{flex:1,borderRadius:"8px",textTransform:"none",fontWeight:"bold",color:"#1976D2",borderColor:"#1976D2",py:.8,"&:hover":{bgcolor:"rgba(25, 118, 210, 0.04)",borderColor:"#115293"}},children:"Asistiré"}),u.jsx(g.Button,{variant:"outlined",size:"small",startIcon:u.jsx(Ur,{}),onClick:()=>r?.(o.eventoID,s),sx:{flex:1,borderRadius:"8px",textTransform:"none",fontWeight:"bold",color:"#D32F2F",borderColor:"#D32F2F",py:.8,"&:hover":{bgcolor:"rgba(211, 47, 47, 0.04)",borderColor:"#9a2121"}},children:"Rechazar"})]})]})]})},Sx="https://localhost:7171/hubs/invitaciones",Cx=({userId:e,notifications:t})=>{const[r,n]=y.useState(t),[o,s]=y.useState(null),[i,a]=y.useState(!1);y.useEffect(()=>{n(t)},[t]);const c=y.useCallback(l=>{const d={notificacionID:Math.random(),titulo:"Nueva invitación a evento",mensaje:l.Descripcion,tipo:"EventoCreado",leida:!1,fechaCreacion:new Date().toISOString(),tiempoTranscurrido:"Ahora",url:`/eventos/${l.EventoID}`,iconoColor:"#E1D6FB",evento:{eventoID:l.EventoID,titulo:l.Titulo,fechaInicio:l.FechaInicio,ubicacion:""}};n(f=>[d,...f])},[]);return y.useEffect(()=>{if(!e)return;const l=new cx().withUrl(Sx+`?userId=${e}`).withAutomaticReconnect().build();return l.start().then(()=>{l.on("NotificarInvitacionAEvento",c)}).catch(d=>console.error("Error SignalR:",d)),()=>{l.off("NotificarInvitacionAEvento"),l.stop()}},[e,c]),u.jsx(g.Box,{sx:{width:"100%",maxHeight:"600px",overflowY:"auto"},children:u.jsx(g.List,{disablePadding:!0,children:r.length===0?u.jsxs("div",{className:we.emptyStateContainer,children:[u.jsx("img",{src:Lf,alt:"Todo en orden",className:we.emptyStateImage}),u.jsx("h4",{className:we.emptyStateTitle,children:"Todo en orden aquí"}),u.jsx("p",{className:we.emptyStateText,children:"Por el momento no tienes invitaciones pendientes."})]}):r.map((l,d)=>u.jsx(wx,{invitation:l},l.notificacionID||d))})})},Ex=({onEventClick:e,upcomingEvents:t,leads30Days:r,leads90Days:n,disID:o,usrID:s,onAddEvent:i,googleCalendars:a,outlookCalendars:c,isLoadingCalendars:l,onToggleGoogle:d,onToggleOutlook:f,notifications:p,unreadCount:m})=>{const{session:v,sessionoutlook:h}=sc(),{enqueueSnackbar:b}=ms.useSnackbar(),w=R=>{const X=new Date,re={start:_.startOfDay(X),end:_.endOfDay(X)},ve={start:R.fechaInicio,end:R.fechaFin};return zd(re,ve)?"Hoy":_.isTomorrow(R.fechaInicio)?"Mañana":new Intl.DateTimeFormat("es-ES",{day:"numeric",month:"long"}).format(R.fechaInicio)},S={};t.forEach(R=>{const X=w(R);S[X]||(S[X]=[]),S[X].push(R)});const[k,C]=y.useState(!1),x=()=>{C(!k)},H=Ei(),E=bc(),I=async()=>{if(!v?.userEmail||!o||!s){console.error("Faltan datos (email, disID o usrID) para sincronizar eventos.");return}try{await H.syncGoogleEvents(v?.userEmail,o,s),b("Eventos sincronizados con Google Calendar con éxito.",{variant:"success"})}catch{b("Error al sincronizar eventos con Google Calendar.",{variant:"error"})}finally{}},P=async()=>{if(!h?.userEmail||!o||!s){console.error("Faltan datos (email, disID o usrID) para sincronizar eventos.");return}try{await E.syncOutlookEvents(h?.userEmail,o,s),b("Eventos sincronizados con Outlook Calendar con éxito.",{variant:"success"})}catch{b("Error al sincronizar eventos con Outlook Calendar.",{variant:"error"})}finally{}},[A,Y]=y.useState("events"),Z=R=>{Y(R)},[V,W]=y.useState(!0),le=()=>{W(R=>!R)};return u.jsxs("div",{className:we.sidebarContainer,children:[u.jsxs("div",{className:we.leadsSection,children:[u.jsxs("div",{className:we.leadCard,children:[u.jsx("div",{className:we.leadIcon,children:u.jsx("img",{src:Zd})}),u.jsxs("div",{className:we.leadText,children:[u.jsx("div",{className:we.leadDays,children:"+30 días sin atender"}),u.jsxs("div",{className:we.leadCount,children:[r," ",u.jsx("span",{style:{fontSize:10,fontWeight:"normal"},children:"leads"})]})]})]}),u.jsxs("div",{className:we.leadCard,children:[u.jsx("div",{className:we.leadIcon,children:u.jsx("img",{src:Zd})}),u.jsxs("div",{className:we.leadText,children:[u.jsx("div",{className:we.leadDays,children:"+90 días sin atender"}),u.jsxs("div",{className:we.leadCount,children:[n," ",u.jsx("span",{style:{fontSize:10,fontWeight:"normal"},children:"leads"})]})]})]})]}),u.jsxs("div",{className:we.eventsSection,children:[u.jsxs("div",{className:we.tabsContainer,children:[u.jsx("button",{className:`${we.tabButton} ${A==="events"?we.activeTab:""}`,onClick:()=>Z("events"),children:"Eventos"}),u.jsxs("button",{className:`${we.tabButton} ${A==="alerts"?we.activeTab:""}`,onClick:()=>Z("alerts"),children:["Alertas",m>0?u.jsx("span",{className:we.alertBadge,children:m}):u.jsx("span",{className:we.alertBadge,children:0})]})]}),u.jsxs("div",{className:we.eventsContainer,children:[A==="events"&&u.jsx(u.Fragment,{children:Object.keys(S).length>0?Object.entries(S).map(([R,X])=>u.jsxs("div",{className:`${we.eventGroup}`,children:[u.jsxs("div",{className:we.eventGroupDate,children:[u.jsx("img",{src:X2,width:15})," ",R]}),X.map(re=>{const ve=ke(re.color||"#ffcc00"),L=ve.toString(),ee=ve.clone().darken(15).toString();return u.jsxs("div",{className:we.eventItem,style:{backgroundColor:L,borderLeftColor:ee},onClick:()=>e(re),children:[u.jsxs("div",{className:we.eventDetails,children:[u.jsx("div",{className:we.eventTitle,children:re.titulo.length>32?`${re.titulo.substring(0,32)}...`:re.titulo}),u.jsx("div",{className:we.eventGroupDate,children:re?.client?re?.client?.length>50?`${re.client.substring(0,50)}...`:re.client:""}),u.jsx("div",{className:we.eventTime,children:`${new Intl.DateTimeFormat("es-ES",{hour:"2-digit",minute:"numeric"}).format(re.fechaInicio)} - ${new Intl.DateTimeFormat("es-ES",{hour:"2-digit",minute:"numeric"}).format(re.fechaFin)}`})]}),re.link&&u.jsx("a",{onClick:Ee=>{Ee.stopPropagation()},href:re?.link,target:"_blank",style:{textDecoration:"none"},children:u.jsx("img",{src:J2,width:15,style:{marginLeft:"3px"}})})]},re.eventoID)})]},R)):u.jsxs("div",{className:we.emptyStateContainer,children:[u.jsx("img",{src:Lf,alt:"Todo en orden",className:we.emptyStateImage}),u.jsx("h4",{className:we.emptyStateTitle,children:"Tu agenda está despejada"}),u.jsx("p",{className:we.emptyStateText,children:"Parece que no tienes ningún evento en tu calendario. ¿Te gustaría añadir uno? "}),u.jsxs("button",{className:we.addEventButton,onClick:i,children:[u.jsx("img",{src:Rd}),"Agregar evento"]})]})}),A==="alerts"&&u.jsx(g.Box,{children:u.jsx(Cx,{userId:s,notifications:p})})]})]}),u.jsxs("div",{className:we.calendarsSection,children:[u.jsxs("button",{onClick:x,className:we.collapsibleHeader,children:[u.jsxs("div",{className:we.headerTitle,children:[u.jsx("span",{style:{fontSize:"14px"},children:"Calendarios"}),u.jsx("span",{className:we.calendarCount,children:"1"})]}),u.jsx(D2,{className:`${we.chevronIcon} ${k?we.collapsed:""}`})]}),u.jsxs("div",{className:`${we.collapsibleContent} ${k?we.hidden:""}`,children:[u.jsxs("button",{className:`${we.calendarSelectButton} ${V?we.calendarSelected:""}`,onClick:le,style:{"--calendar-color":"#1976D2"},children:[u.jsx("div",{className:we.customCheckIcon,children:u.jsx("div",{className:we.circularCheckbox,children:u.jsx(rc,{size:16,className:we.checkedIcon})})}),u.jsx(E2,{size:16,className:we.calendarIcon}),u.jsx("span",{className:we.calendarItemText,children:"Mi calendario"})]}),h.userEmail?u.jsxs("div",{className:we.syncButton,onClick:P,children:[u.jsx("div",{className:we.circularCheckbox,children:u.jsx(rc,{size:16,className:we.checkedIcon})}),u.jsx("img",{src:$f,width:20}),u.jsx("span",{style:{fontSize:"14px"},children:"Sincronizar Outlook"})]}):u.jsx(k_,{disID:o,usrID:s}),v?.userEmail?u.jsxs("div",{className:we.syncButton,onClick:I,children:[u.jsx("div",{className:we.circularCheckbox,children:u.jsx(rc,{size:16,className:we.checkedIcon})}),u.jsx("img",{src:Nf,width:18}),u.jsx("span",{style:{fontSize:"14px"},children:"Sincronizar Google"})]}):u.jsx(D_,{disID:o,usrID:s}),h?.userEmail&&u.jsxs(u.Fragment,{children:[u.jsx("span",{className:we.currentUserCalendarTitle,style:{marginTop:"10px"},children:h?.userEmail}),l?u.jsx(g.CircularProgress,{size:24}):c.length>0?u.jsx(g.List,{dense:!0,className:we.calendarsList,children:c.map(R=>u.jsx(g.ListItem,{secondaryAction:u.jsx(g.Checkbox,{edge:"end",onChange:()=>f(R.id),checked:R.selected||!1,sx:{color:R.backgroundColor,"&.Mui-checked":{color:R.backgroundColor}}}),disablePadding:!0,children:u.jsx(g.ListItemText,{primary:R.summary.length>25?`${R.summary.substring(0,25)}...`:R.summary,className:we.calendarItemText})},R.id))}):u.jsx("p",{style:{fontSize:"12px"},children:"No se encontraron calendarios."})]}),v?.userEmail&&u.jsxs(u.Fragment,{children:[u.jsx("span",{className:we.currentUserCalendarTitle,style:{marginTop:"10px"},children:v?.userEmail}),l?u.jsx(g.CircularProgress,{size:24}):a.length>0?u.jsx(g.List,{dense:!0,className:we.calendarsList,children:a.map(R=>u.jsx(g.ListItem,{secondaryAction:u.jsx(g.Checkbox,{edge:"end",onChange:()=>d(R.id),checked:R.selected||!1,sx:{color:R.backgroundColor,"&.Mui-checked":{color:R.backgroundColor}}}),disablePadding:!0,children:u.jsx(g.ListItemText,{primary:R.summary.length>25?`${R.summary.substring(0,25)}...`:R.summary,className:we.calendarItemText})},R.id))}):u.jsx("p",{style:{fontSize:"12px"},children:"No se encontraron calendarios."})]})]})]})]})},Zt={dayCell:"_dayCell_xweup_1",dayCellContainer:"_dayCellContainer_xweup_23",dayNumber:"_dayNumber_xweup_55",dayNumberToday:"_dayNumberToday_xweup_69",notCurrentMonth:"_notCurrentMonth_xweup_91",CurrentDay:"_CurrentDay_xweup_129",eventsList:"_eventsList_xweup_137",eventItem:"_eventItem_xweup_155",eventTitle:"_eventTitle_xweup_187",eventTime:"_eventTime_xweup_217",seeMoreLink:"_seeMoreLink_xweup_245",googleEvent:"_googleEvent_xweup_269",outlookEvent:"_outlookEvent_xweup_281",providerIcon:"_providerIcon_xweup_305"},Kf=25,Dx=22,kx=({dayNumber:e,date:t,events:r,isToday:n,isCurrentMonth:o,onDayClick:s,onEventClick:i,onSeeMoreClick:a})=>{const c=[Zt.dayCell,o?"":Zt.notCurrentMonth,Zt.CurrentDay].join(" ").trim(),l=y.useRef(null),[d,f]=y.useState(r.length),p=()=>{s?.(t)};y.useLayoutEffect(()=>{const h=()=>{if(l.current){const b=l.current.clientHeight;let w=Math.floor(b/Kf);if(w<r.length){const S=Math.floor((b-Dx)/Kf);w=Math.max(0,S)}f(w)}};return h(),window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)},[r.length]);const m=r.slice(0,d==0?1:d),v=r.length-(d==0?1:d);return u.jsxs("div",{className:`${c} ${Zt.dayCellContainer}`,onClick:p,children:[u.jsx("div",{className:n?Zt.dayNumber:Zt.dayNumberToday,children:e}),u.jsxs("div",{className:Zt.eventsList,ref:l,children:[m.map(h=>u.jsxs("div",{className:`${Zt.eventItem} ${h.isGoogleEvent?Zt.googleEvent:""} ${h.isOutlookEvent?Zt.outlookEvent:""}`,style:{backgroundColor:h.color||"#007bff"},onClick:b=>{b.stopPropagation(),i?.(h)},children:[h.isGoogleEvent&&u.jsx("span",{className:Zt.providerIcon,children:"G"}),h.isOutlookEvent&&u.jsx("span",{className:Zt.providerIcon,children:"O"}),u.jsx("span",{className:Zt.eventTitle,children:h.titulo}),u.jsx("span",{className:Zt.eventTime,children:`${new Intl.DateTimeFormat("es-ES",{hour:"2-digit",minute:"numeric"}).format(h.fechaInicio)} - ${new Intl.DateTimeFormat("es-ES",{hour:"2-digit",minute:"numeric"}).format(h.fechaFin)}`})]},h.eventoID)),v>0&&u.jsxs("div",{className:Zt.seeMoreLink,onClick:h=>{h.stopPropagation(),a(r,t)},children:[v," más..."]})]})]})},Qf={weekDaysContainer:"_weekDaysContainer_5h5ol_1",weekDay:"_weekDay_5h5ol_1"},Tx=()=>{const e=["Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"];return u.jsx("div",{className:Qf.weekDaysContainer,children:e.map(t=>u.jsx("div",{className:Qf.weekDay,children:t},t))})},Ii={calendarGridContainer:"_calendarGridContainer_1expw_1",daysContainer:"_daysContainer_1expw_23",rows5:"_rows5_1expw_37",rows6:"_rows6_1expw_45"};function Ix(e,t){const[r,n]=xx(e,t.start,t.end);return{start:r,end:n}}function Ax(e,t){const{start:r,end:n}=Ix(t?.in,e);let o=+r>+n;const s=o?+r:+n,i=o?n:r;i.setHours(0,0,0,0);let a=1;const c=[];for(;+i<=s;)c.push(nc(r,i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?c.reverse():c}function Mx(e,t){const r=t?.weekStartsOn,n=Jr(e,t?.in),o=n.getDay(),s=(o<r?-7:0)+6-(o-r);return n.setDate(n.getDate()+s),n.setHours(23,59,59,999),n}function Px(e,t,r){const n=+Jr(e,r?.in),[o,s]=[+Jr(t.start,r?.in),+Jr(t.end,r?.in)].sort((i,a)=>i-a);return n>=o&&n<=s}const Ox=({currentDate:e,events:t,onDayClick:r,onEventClick:n,onSeeMoreClick:o})=>{const s=_.startOfMonth(e),i=_.endOfMonth(e),a=_.startOfWeek(s,{weekStartsOn:1}),c=Mx(i,{weekStartsOn:1}),l=Ax({start:a,end:c}),d={},f=l.length/7,p=`${Ii.daysContainer} ${f===5?Ii.rows5:Ii.rows6}`;return t.forEach(m=>{const v=_.format(m.fechaInicio,"yyyy-MM-dd");d[v]||(d[v]=[]),d[v].push(m)}),u.jsxs("div",{className:Ii.calendarGridContainer,children:[u.jsx(Tx,{}),u.jsx("div",{className:p,children:l.map(m=>{const v=t.filter(h=>Px(m,{start:_.startOfDay(h.fechaInicio),end:_.endOfDay(h.fechaFin)}));return u.jsx(kx,{dayNumber:m.getDate(),date:m,events:v,isToday:_.isToday(m),isCurrentMonth:_.isSameMonth(m,e),onDayClick:r,onEventClick:n,onSeeMoreClick:o},m.toISOString())})})]})},Cc=()=>{const{calendarApiUrl:e}=yc(),t=async f=>{try{return(await Tt.get(`${e}/api/Calendario/v1/local/ListarEventosXUsuario/${f}`)).data.map(m=>{const v=new Date(m.fechaInicio),h=new Date(m.fechaFin),b=m.solicitudRelacionada?.[0]?.nombreCliente??null;return{...m,fechaInicio:v,fechaFin:h,client:b}})}catch(p){return console.error("Error events:",p),[]}},r=async(f,p)=>{try{const m=await Tt.post(`${e}/api/Calendario/v1/local/InsertarEvento/${p}`,f);return{...m.data,fechaInicio:new Date(m.data.fechaInicio),fechaFin:new Date(m.data.fechaFin)}}catch(m){throw console.log("Error creating event:",m),m}},n=async f=>{try{const p=await Tt.post(`${e}/api/Calendario/v1/local/ActualizarEvento/${f.eventoID}`,f);return{eventoID:p.data.eventoID,titulo:p.data.titulo,descripcion:p.data.descripcion,fechaInicio:new Date(p.data.fechaInicio),fechaFin:new Date(p.data.fechaFin),todoElDia:p.data.todoElDia,color:p.data.color,repetir:p.data.repetir,link:p.data.link,solID:p.data.solID,disID:p.data.disID,client:p.data.client}}catch(p){throw console.log("Error updating event:",p),p}},o=async f=>{try{const p=await Tt.get(`${e}/api/Calendario/v1/local/ObtenerEvento/${f}`),m=p.data.solicitudRelacionada?.[0]?.nombreCliente||null;return{...p.data[0],fechaInicio:p.data[0].fechaInicio,fechaFin:p.data[0].fechaFin,client:m}}catch(p){throw console.error(`Error fetching event with ID ${f}:`,p),p}},s=async f=>{try{await Tt.post(`${e}/api/Calendario/v1/local/EliminarEvento/${f}`)}catch(p){throw console.log(`Error ID ${f}:`,p),p}},i=y.useCallback(async(f,p,m,v)=>{try{const h={masNombreBD:m,usrID:v,disID:p,nombreCliente:f},w=(await Tt.post(`${e}/api/Calendario/v1/local/ConsultaClientesXUsuariologgeado/`,h)).data?.data;return Array.isArray(w)?w.map(S=>({clienteID:S.clienteID,solID:S.solID,marca:S?.marca,modelo:S?.modelo,nombreCliente:S?.nombreCliente})):[]}catch(h){return console.error("Error clientes:",h),[]}},[e]),a=y.useCallback(async(f,p)=>{try{const m={disID:f,usrMail:p},h=(await Tt.post(`${e}/api/Calendario/v1/Consulta_UsuariosInvitados/`,m)).data?.data;return console.log("usuarioslll",h),Array.isArray(h)?h.map(b=>({usrID:b.usrID,usrNombre:b.usrNombre,usrMail:b?.usrMail,disID:b?.disID})):[]}catch(m){return console.error("Error usuarios:",m),[]}},[e]),c=async(f,p,m,v,h)=>{const b={tieneConflicto:!1,usrMail:""};try{const w={disID:f,usrMail:p,startDate:m,horaInicio:v,horaFin:h};return console.log("requestBody",w),(await Tt.post(`${e}/api/Calendario/v1/local/ConsultaConflictoInvitados`,w)).data?.data}catch(w){return console.error("Error al verificar conflicto:",w),b}},l=y.useCallback(async(f,p,m,v)=>{try{const h={disID:f,usrMail:p,startDate:m,DuracionEvento:v},w=(await Tt.post(`${e}/api/Calendario/v1/local/ConsultaDisponibilidadUsuario`,h)).data?.data;return Array.isArray(w)?w.map(S=>({Fecha:S.fecha,HoraInicio:S.horaInicio,HoraFin:S.horaFin})):[]}catch(h){return console.error("Error usuarios:",h),[]}},[e]),d=y.useCallback(async(f,p=!1)=>{try{const m=await Tt.post(`${e}/api/Notificaciones/v1/local/ObtenerNotificacionesPorUsuarioAsync/${f}?soloNoLeidas=${p}`);return console.log("getNotificacionesXUsuario",m.data),m.data}catch(m){return console.error("Error usuarios:",m),[]}},[e]);return{getEventsByUser:t,createEvent:r,updateEvent:n,getEventById:o,deleteEvent:s,getClients:i,getUsuariosInvitados:a,VerificarConflicto:c,getDisponibilidadUsuario:l,getNotificacionesXUsuario:d}};var $o={},Xf;function jx(){if(Xf)return $o;Xf=1;var e=nt();Object.defineProperty($o,"__esModule",{value:!0}),$o.default=void 0;var t=e(ut()),r=at();return $o.default=(0,t.default)([(0,r.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,r.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime"),$o}var Rx=jx();const Ai=rt(Rx);var Lo=e=>e.type==="checkbox",xn=e=>e instanceof Date,Gt=e=>e==null;const Jf=e=>typeof e=="object";var It=e=>!Gt(e)&&!Array.isArray(e)&&Jf(e)&&!xn(e),ep=e=>It(e)&&e.target?Lo(e.target)?e.target.checked:e.target.value:e,Nx=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,tp=(e,t)=>e.has(Nx(t)),$x=e=>{const t=e.constructor&&e.constructor.prototype;return It(t)&&t.hasOwnProperty("isPrototypeOf")},Ec=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Nt(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(Ec&&(e instanceof Blob||n))&&(r||It(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!$x(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=Nt(e[o]));else return e;return t}var Mi=e=>/^\w*$/.test(e),At=e=>e===void 0,Dc=e=>Array.isArray(e)?e.filter(Boolean):[],kc=e=>Dc(e.replace(/["|']|\]/g,"").split(/\.|\[/)),me=(e,t,r)=>{if(!t||!It(e))return r;const n=(Mi(t)?[t]:kc(t)).reduce((o,s)=>Gt(o)?o:o[s],e);return At(n)||n===e?At(e[t])?r:e[t]:n},ar=e=>typeof e=="boolean",ot=(e,t,r)=>{let n=-1;const o=Mi(t)?[t]:kc(t),s=o.length,i=s-1;for(;++n<s;){const a=o[n];let c=r;if(n!==i){const l=e[a];c=It(l)||Array.isArray(l)?l:isNaN(+o[n+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=c,e=e[a]}};const Pi={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Cr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Hr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Tc=y.createContext(null);Tc.displayName="HookFormContext";const Ic=()=>y.useContext(Tc),Lx=e=>{const{children:t,...r}=e;return y.createElement(Tc.Provider,{value:r},t)};var rp=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(o,s,{get:()=>{const i=s;return t._proxyFormState[i]!==Cr.all&&(t._proxyFormState[i]=!n||Cr.all),r&&(r[i]=!0),e[i]}});return o};const Ac=typeof window<"u"?y.useLayoutEffect:y.useEffect;function zx(e){const t=Ic(),{control:r=t.control,disabled:n,name:o,exact:s}=e||{},[i,a]=y.useState(r._formState),c=y.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Ac(()=>r._subscribe({name:o,formState:c.current,exact:s,callback:l=>{!n&&a({...r._formState,...l})}}),[o,n,s]),y.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),y.useMemo(()=>rp(i,r,c.current,!1),[i,r])}var $r=e=>typeof e=="string",np=(e,t,r,n,o)=>$r(e)?(n&&t.watch.add(e),me(r,e,o)):Array.isArray(e)?e.map(s=>(n&&t.watch.add(s),me(r,s))):(n&&(t.watchAll=!0),r),Mc=e=>Gt(e)||!Jf(e);function Wr(e,t,r=new WeakSet){if(Mc(e)||Mc(t))return e===t;if(xn(e)&&xn(t))return e.getTime()===t.getTime();const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const s of n){const i=e[s];if(!o.includes(s))return!1;if(s!=="ref"){const a=t[s];if(xn(i)&&xn(a)||It(i)&&It(a)||Array.isArray(i)&&Array.isArray(a)?!Wr(i,a,r):i!==a)return!1}}return!0}function op(e){const t=Ic(),{control:r=t.control,name:n,defaultValue:o,disabled:s,exact:i,compute:a}=e||{},c=y.useRef(o),l=y.useRef(a),d=y.useRef(void 0);l.current=a;const f=y.useMemo(()=>r._getWatch(n,c.current),[r,n]),[p,m]=y.useState(l.current?l.current(f):f);return Ac(()=>r._subscribe({name:n,formState:{values:!0},exact:i,callback:v=>{if(!s){const h=np(n,r._names,v.values||r._formValues,!1,c.current);if(l.current){const b=l.current(h);Wr(b,d.current)||(m(b),d.current=b)}else m(h)}}}),[r,s,n,i]),y.useEffect(()=>r._removeUnmounted()),p}function Bx(e){const t=Ic(),{name:r,disabled:n,control:o=t.control,shouldUnregister:s,defaultValue:i}=e,a=tp(o._names.array,r),c=y.useMemo(()=>me(o._formValues,r,me(o._defaultValues,r,i)),[o,r,i]),l=op({control:o,name:r,defaultValue:c,exact:!0}),d=zx({control:o,name:r,exact:!0}),f=y.useRef(e),p=y.useRef(o.register(r,{...e.rules,value:l,...ar(e.disabled)?{disabled:e.disabled}:{}}));f.current=e;const m=y.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!me(d.errors,r)},isDirty:{enumerable:!0,get:()=>!!me(d.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!me(d.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!me(d.validatingFields,r)},error:{enumerable:!0,get:()=>me(d.errors,r)}}),[d,r]),v=y.useCallback(S=>p.current.onChange({target:{value:ep(S),name:r},type:Pi.CHANGE}),[r]),h=y.useCallback(()=>p.current.onBlur({target:{value:me(o._formValues,r),name:r},type:Pi.BLUR}),[r,o._formValues]),b=y.useCallback(S=>{const k=me(o._fields,r);k&&S&&(k._f.ref={focus:()=>S.focus&&S.focus(),select:()=>S.select&&S.select(),setCustomValidity:C=>S.setCustomValidity(C),reportValidity:()=>S.reportValidity()})},[o._fields,r]),w=y.useMemo(()=>({name:r,value:l,...ar(n)||d.disabled?{disabled:d.disabled||n}:{},onChange:v,onBlur:h,ref:b}),[r,n,d.disabled,v,h,b,l]);return y.useEffect(()=>{const S=o._options.shouldUnregister||s;o.register(r,{...f.current.rules,...ar(f.current.disabled)?{disabled:f.current.disabled}:{}});const k=(C,x)=>{const H=me(o._fields,C);H&&H._f&&(H._f.mount=x)};if(k(r,!0),S){const C=Nt(me(o._options.defaultValues,r));ot(o._defaultValues,r,C),At(me(o._formValues,r))&&ot(o._formValues,r,C)}return!a&&o.register(r),()=>{(a?S&&!o._state.action:S)?o.unregister(r):k(r,!1)}},[r,o,a,s]),y.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),y.useMemo(()=>({field:w,formState:d,fieldState:m}),[w,d,m])}const cr=e=>e.render(Bx(e));var Pc=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},zo=e=>Array.isArray(e)?e:[e],sp=()=>{let e=[];return{get observers(){return e},next:o=>{for(const s of e)s.next&&s.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(s=>s!==o)}}),unsubscribe:()=>{e=[]}}},Jt=e=>It(e)&&!Object.keys(e).length,Oc=e=>e.type==="file",Er=e=>typeof e=="function",Oi=e=>{if(!Ec)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ip=e=>e.type==="select-multiple",jc=e=>e.type==="radio",Fx=e=>jc(e)||Lo(e),Rc=e=>Oi(e)&&e.isConnected;function Vx(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=At(e)?n++:e[t[n++]];return e}function Ux(e){for(const t in e)if(e.hasOwnProperty(t)&&!At(e[t]))return!1;return!0}function jt(e,t){const r=Array.isArray(t)?t:Mi(t)?[t]:kc(t),n=r.length===1?e:Vx(e,r),o=r.length-1,s=r[o];return n&&delete n[s],o!==0&&(It(n)&&Jt(n)||Array.isArray(n)&&Ux(n))&&jt(e,r.slice(0,-1)),e}var ap=e=>{for(const t in e)if(Er(e[t]))return!0;return!1};function ji(e,t={}){const r=Array.isArray(e);if(It(e)||r)for(const n in e)Array.isArray(e[n])||It(e[n])&&!ap(e[n])?(t[n]=Array.isArray(e[n])?[]:{},ji(e[n],t[n])):Gt(e[n])||(t[n]=!0);return t}function cp(e,t,r){const n=Array.isArray(e);if(It(e)||n)for(const o in e)Array.isArray(e[o])||It(e[o])&&!ap(e[o])?At(t)||Mc(r[o])?r[o]=Array.isArray(e[o])?ji(e[o],[]):{...ji(e[o])}:cp(e[o],Gt(t)?{}:t[o],r[o]):r[o]=!Wr(e[o],t[o]);return r}var Bo=(e,t)=>cp(e,t,ji(t));const lp={value:!1,isValid:!1},up={value:!0,isValid:!0};var dp=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!At(e[0].attributes.value)?At(e[0].value)||e[0].value===""?up:{value:e[0].value,isValid:!0}:up:lp}return lp},fp=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>At(e)?e:t?e===""?NaN:e&&+e:r&&$r(e)?new Date(e):n?n(e):e;const pp={isValid:!1,value:null};var hp=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,pp):pp;function mp(e){const t=e.ref;return Oc(t)?t.files:jc(t)?hp(e.refs).value:ip(t)?[...t.selectedOptions].map(({value:r})=>r):Lo(t)?dp(e.refs).value:fp(At(t.value)?e.ref.value:t.value,e)}var Hx=(e,t,r,n)=>{const o={};for(const s of e){const i=me(t,s);i&&ot(o,s,i._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},Ri=e=>e instanceof RegExp,Fo=e=>At(e)?e:Ri(e)?e.source:It(e)?Ri(e.value)?e.value.source:e.value:e,gp=e=>({isOnSubmit:!e||e===Cr.onSubmit,isOnBlur:e===Cr.onBlur,isOnChange:e===Cr.onChange,isOnAll:e===Cr.all,isOnTouch:e===Cr.onTouched});const vp="AsyncFunction";var Wx=e=>!!e&&!!e.validate&&!!(Er(e.validate)&&e.validate.constructor.name===vp||It(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===vp)),Yx=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),yp=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Vo=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const s=me(e,o);if(s){const{_f:i,...a}=s;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],o)&&!n)return!0;if(i.ref&&t(i.ref,i.name)&&!n)return!0;if(Vo(a,t))break}else if(It(a)&&Vo(a,t))break}}};function bp(e,t,r){const n=me(e,r);if(n||Mi(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const s=o.join("."),i=me(t,s),a=me(e,s);if(i&&!Array.isArray(i)&&r!==s)return{name:r};if(a&&a.type)return{name:s,error:a};if(a&&a.root&&a.root.type)return{name:`${s}.root`,error:a.root};o.pop()}return{name:r}}var qx=(e,t,r,n)=>{r(e);const{name:o,...s}=e;return Jt(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(i=>t[i]===(!n||Cr.all))},Zx=(e,t,r)=>!e||!t||e===t||zo(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),Gx=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,Kx=(e,t)=>!Dc(me(e,t)).length&&jt(e,t),Qx=(e,t,r)=>{const n=zo(me(e,r));return ot(n,"root",t[r]),ot(e,r,n),e},Ni=e=>$r(e);function _p(e,t,r="validate"){if(Ni(e)||Array.isArray(e)&&e.every(Ni)||ar(e)&&!e)return{type:r,message:Ni(e)?e:"",ref:t}}var Hn=e=>It(e)&&!Ri(e)?e:{value:e,message:""},xp=async(e,t,r,n,o,s)=>{const{ref:i,refs:a,required:c,maxLength:l,minLength:d,min:f,max:p,pattern:m,validate:v,name:h,valueAsNumber:b,mount:w}=e._f,S=me(r,h);if(!w||t.has(h))return{};const k=a?a[0]:i,C=Z=>{o&&k.reportValidity&&(k.setCustomValidity(ar(Z)?"":Z||""),k.reportValidity())},x={},H=jc(i),E=Lo(i),I=H||E,P=(b||Oc(i))&&At(i.value)&&At(S)||Oi(i)&&i.value===""||S===""||Array.isArray(S)&&!S.length,A=Pc.bind(null,h,n,x),Y=(Z,V,W,le=Hr.maxLength,R=Hr.minLength)=>{const X=Z?V:W;x[h]={type:Z?le:R,message:X,ref:i,...A(Z?le:R,X)}};if(s?!Array.isArray(S)||!S.length:c&&(!I&&(P||Gt(S))||ar(S)&&!S||E&&!dp(a).isValid||H&&!hp(a).isValid)){const{value:Z,message:V}=Ni(c)?{value:!!c,message:c}:Hn(c);if(Z&&(x[h]={type:Hr.required,message:V,ref:k,...A(Hr.required,V)},!n))return C(V),x}if(!P&&(!Gt(f)||!Gt(p))){let Z,V;const W=Hn(p),le=Hn(f);if(!Gt(S)&&!isNaN(S)){const R=i.valueAsNumber||S&&+S;Gt(W.value)||(Z=R>W.value),Gt(le.value)||(V=R<le.value)}else{const R=i.valueAsDate||new Date(S),X=L=>new Date(new Date().toDateString()+" "+L),re=i.type=="time",ve=i.type=="week";$r(W.value)&&S&&(Z=re?X(S)>X(W.value):ve?S>W.value:R>new Date(W.value)),$r(le.value)&&S&&(V=re?X(S)<X(le.value):ve?S<le.value:R<new Date(le.value))}if((Z||V)&&(Y(!!Z,W.message,le.message,Hr.max,Hr.min),!n))return C(x[h].message),x}if((l||d)&&!P&&($r(S)||s&&Array.isArray(S))){const Z=Hn(l),V=Hn(d),W=!Gt(Z.value)&&S.length>+Z.value,le=!Gt(V.value)&&S.length<+V.value;if((W||le)&&(Y(W,Z.message,V.message),!n))return C(x[h].message),x}if(m&&!P&&$r(S)){const{value:Z,message:V}=Hn(m);if(Ri(Z)&&!S.match(Z)&&(x[h]={type:Hr.pattern,message:V,ref:i,...A(Hr.pattern,V)},!n))return C(V),x}if(v){if(Er(v)){const Z=await v(S,r),V=_p(Z,k);if(V&&(x[h]={...V,...A(Hr.validate,V.message)},!n))return C(V.message),x}else if(It(v)){let Z={};for(const V in v){if(!Jt(Z)&&!n)break;const W=_p(await v[V](S,r),k,V);W&&(Z={...W,...A(V,W.message)},C(W.message),n&&(x[h]=Z))}if(!Jt(Z)&&(x[h]={ref:k,...Z},!n))return x}}return C(!0),x};const Xx={mode:Cr.onSubmit,reValidateMode:Cr.onChange,shouldFocusError:!0};function Jx(e={}){let t={...Xx,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Er(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},o=It(t.defaultValues)||It(t.values)?Nt(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:Nt(o),i={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,l=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let f={...d};const p={array:sp(),state:sp()},m=t.criteriaMode===Cr.all,v=D=>O=>{clearTimeout(l),l=setTimeout(D,O)},h=async D=>{if(!t.disabled&&(d.isValid||f.isValid||D)){const O=t.resolver?Jt((await E()).errors):await P(n,!0);O!==r.isValid&&p.state.next({isValid:O})}},b=(D,O)=>{!t.disabled&&(d.isValidating||d.validatingFields||f.isValidating||f.validatingFields)&&((D||Array.from(a.mount)).forEach(z=>{z&&(O?ot(r.validatingFields,z,O):jt(r.validatingFields,z))}),p.state.next({validatingFields:r.validatingFields,isValidating:!Jt(r.validatingFields)}))},w=(D,O=[],z,ae,se=!0,j=!0)=>{if(ae&&z&&!t.disabled){if(i.action=!0,j&&Array.isArray(me(n,D))){const oe=z(me(n,D),ae.argA,ae.argB);se&&ot(n,D,oe)}if(j&&Array.isArray(me(r.errors,D))){const oe=z(me(r.errors,D),ae.argA,ae.argB);se&&ot(r.errors,D,oe),Kx(r.errors,D)}if((d.touchedFields||f.touchedFields)&&j&&Array.isArray(me(r.touchedFields,D))){const oe=z(me(r.touchedFields,D),ae.argA,ae.argB);se&&ot(r.touchedFields,D,oe)}(d.dirtyFields||f.dirtyFields)&&(r.dirtyFields=Bo(o,s)),p.state.next({name:D,isDirty:Y(D,O),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ot(s,D,O)},S=(D,O)=>{ot(r.errors,D,O),p.state.next({errors:r.errors})},k=D=>{r.errors=D,p.state.next({errors:r.errors,isValid:!1})},C=(D,O,z,ae)=>{const se=me(n,D);if(se){const j=me(s,D,At(z)?me(o,D):z);At(j)||ae&&ae.defaultChecked||O?ot(s,D,O?j:mp(se._f)):W(D,j),i.mount&&h()}},x=(D,O,z,ae,se)=>{let j=!1,oe=!1;const F={name:D};if(!t.disabled){if(!z||ae){(d.isDirty||f.isDirty)&&(oe=r.isDirty,r.isDirty=F.isDirty=Y(),j=oe!==F.isDirty);const fe=Wr(me(o,D),O);oe=!!me(r.dirtyFields,D),fe?jt(r.dirtyFields,D):ot(r.dirtyFields,D,!0),F.dirtyFields=r.dirtyFields,j=j||(d.dirtyFields||f.dirtyFields)&&oe!==!fe}if(z){const fe=me(r.touchedFields,D);fe||(ot(r.touchedFields,D,z),F.touchedFields=r.touchedFields,j=j||(d.touchedFields||f.touchedFields)&&fe!==z)}j&&se&&p.state.next(F)}return j?F:{}},H=(D,O,z,ae)=>{const se=me(r.errors,D),j=(d.isValid||f.isValid)&&ar(O)&&r.isValid!==O;if(t.delayError&&z?(c=v(()=>S(D,z)),c(t.delayError)):(clearTimeout(l),c=null,z?ot(r.errors,D,z):jt(r.errors,D)),(z?!Wr(se,z):se)||!Jt(ae)||j){const oe={...ae,...j&&ar(O)?{isValid:O}:{},errors:r.errors,name:D};r={...r,...oe},p.state.next(oe)}},E=async D=>{b(D,!0);const O=await t.resolver(s,t.context,Hx(D||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return b(D),O},I=async D=>{const{errors:O}=await E(D);if(D)for(const z of D){const ae=me(O,z);ae?ot(r.errors,z,ae):jt(r.errors,z)}else r.errors=O;return O},P=async(D,O,z={valid:!0})=>{for(const ae in D){const se=D[ae];if(se){const{_f:j,...oe}=se;if(j){const F=a.array.has(j.name),fe=se._f&&Wx(se._f);fe&&d.validatingFields&&b([ae],!0);const M=await xp(se,a.disabled,s,m,t.shouldUseNativeValidation&&!O,F);if(fe&&d.validatingFields&&b([ae]),M[j.name]&&(z.valid=!1,O))break;!O&&(me(M,j.name)?F?Qx(r.errors,M,j.name):ot(r.errors,j.name,M[j.name]):jt(r.errors,j.name))}!Jt(oe)&&await P(oe,O,z)}}return z.valid},A=()=>{for(const D of a.unMount){const O=me(n,D);O&&(O._f.refs?O._f.refs.every(z=>!Rc(z)):!Rc(O._f.ref))&&be(D)}a.unMount=new Set},Y=(D,O)=>!t.disabled&&(D&&O&&ot(s,D,O),!Wr(L(),o)),Z=(D,O,z)=>np(D,a,{...i.mount?s:At(O)?o:$r(D)?{[D]:O}:O},z,O),V=D=>Dc(me(i.mount?s:o,D,t.shouldUnregister?me(o,D,[]):[])),W=(D,O,z={})=>{const ae=me(n,D);let se=O;if(ae){const j=ae._f;j&&(!j.disabled&&ot(s,D,fp(O,j)),se=Oi(j.ref)&&Gt(O)?"":O,ip(j.ref)?[...j.ref.options].forEach(oe=>oe.selected=se.includes(oe.value)):j.refs?Lo(j.ref)?j.refs.forEach(oe=>{(!oe.defaultChecked||!oe.disabled)&&(Array.isArray(se)?oe.checked=!!se.find(F=>F===oe.value):oe.checked=se===oe.value||!!se)}):j.refs.forEach(oe=>oe.checked=oe.value===se):Oc(j.ref)?j.ref.value="":(j.ref.value=se,j.ref.type||p.state.next({name:D,values:Nt(s)})))}(z.shouldDirty||z.shouldTouch)&&x(D,se,z.shouldTouch,z.shouldDirty,!0),z.shouldValidate&&ve(D)},le=(D,O,z)=>{for(const ae in O){if(!O.hasOwnProperty(ae))return;const se=O[ae],j=D+"."+ae,oe=me(n,j);(a.array.has(D)||It(se)||oe&&!oe._f)&&!xn(se)?le(j,se,z):W(j,se,z)}},R=(D,O,z={})=>{const ae=me(n,D),se=a.array.has(D),j=Nt(O);ot(s,D,j),se?(p.array.next({name:D,values:Nt(s)}),(d.isDirty||d.dirtyFields||f.isDirty||f.dirtyFields)&&z.shouldDirty&&p.state.next({name:D,dirtyFields:Bo(o,s),isDirty:Y(D,j)})):ae&&!ae._f&&!Gt(j)?le(D,j,z):W(D,j,z),yp(D,a)&&p.state.next({...r,name:D}),p.state.next({name:i.mount?D:void 0,values:Nt(s)})},X=async D=>{i.mount=!0;const O=D.target;let z=O.name,ae=!0;const se=me(n,z),j=fe=>{ae=Number.isNaN(fe)||xn(fe)&&isNaN(fe.getTime())||Wr(fe,me(s,z,fe))},oe=gp(t.mode),F=gp(t.reValidateMode);if(se){let fe,M;const U=O.type?mp(se._f):ep(D),Se=D.type===Pi.BLUR||D.type===Pi.FOCUS_OUT,$e=!Yx(se._f)&&!t.resolver&&!me(r.errors,z)&&!se._f.deps||Gx(Se,me(r.touchedFields,z),r.isSubmitted,F,oe),K=yp(z,a,Se);ot(s,z,U),Se?(!O||!O.readOnly)&&(se._f.onBlur&&se._f.onBlur(D),c&&c(0)):se._f.onChange&&se._f.onChange(D);const ie=x(z,U,Se),de=!Jt(ie)||K;if(!Se&&p.state.next({name:z,type:D.type,values:Nt(s)}),$e)return(d.isValid||f.isValid)&&(t.mode==="onBlur"?Se&&h():Se||h()),de&&p.state.next({name:z,...K?{}:ie});if(!Se&&K&&p.state.next({...r}),t.resolver){const{errors:De}=await E([z]);if(j(U),ae){const Ze=bp(r.errors,n,z),$t=bp(De,n,Ze.name||z);fe=$t.error,z=$t.name,M=Jt(De)}}else b([z],!0),fe=(await xp(se,a.disabled,s,m,t.shouldUseNativeValidation))[z],b([z]),j(U),ae&&(fe?M=!1:(d.isValid||f.isValid)&&(M=await P(n,!0)));ae&&(se._f.deps&&ve(se._f.deps),H(z,M,fe,ie))}},re=(D,O)=>{if(me(r.errors,O)&&D.focus)return D.focus(),1},ve=async(D,O={})=>{let z,ae;const se=zo(D);if(t.resolver){const j=await I(At(D)?D:se);z=Jt(j),ae=D?!se.some(oe=>me(j,oe)):z}else D?(ae=(await Promise.all(se.map(async j=>{const oe=me(n,j);return await P(oe&&oe._f?{[j]:oe}:oe)}))).every(Boolean),!(!ae&&!r.isValid)&&h()):ae=z=await P(n);return p.state.next({...!$r(D)||(d.isValid||f.isValid)&&z!==r.isValid?{}:{name:D},...t.resolver||!D?{isValid:z}:{},errors:r.errors}),O.shouldFocus&&!ae&&Vo(n,re,D?se:a.mount),ae},L=D=>{const O={...i.mount?s:o};return At(D)?O:$r(D)?me(O,D):D.map(z=>me(O,z))},ee=(D,O)=>({invalid:!!me((O||r).errors,D),isDirty:!!me((O||r).dirtyFields,D),error:me((O||r).errors,D),isValidating:!!me(r.validatingFields,D),isTouched:!!me((O||r).touchedFields,D)}),Ee=D=>{D&&zo(D).forEach(O=>jt(r.errors,O)),p.state.next({errors:D?r.errors:{}})},te=(D,O,z)=>{const ae=(me(n,D,{_f:{}})._f||{}).ref,se=me(r.errors,D)||{},{ref:j,message:oe,type:F,...fe}=se;ot(r.errors,D,{...fe,...O,ref:ae}),p.state.next({name:D,errors:r.errors,isValid:!1}),z&&z.shouldFocus&&ae&&ae.focus&&ae.focus()},he=(D,O)=>Er(D)?p.state.subscribe({next:z=>"values"in z&&D(Z(void 0,O),z)}):Z(D,O,!0),ue=D=>p.state.subscribe({next:O=>{Zx(D.name,O.name,D.exact)&&qx(O,D.formState||d,Le,D.reRenderRoot)&&D.callback({values:{...s},...r,...O,defaultValues:o})}}).unsubscribe,ce=D=>(i.mount=!0,f={...f,...D.formState},ue({...D,formState:f})),be=(D,O={})=>{for(const z of D?zo(D):a.mount)a.mount.delete(z),a.array.delete(z),O.keepValue||(jt(n,z),jt(s,z)),!O.keepError&&jt(r.errors,z),!O.keepDirty&&jt(r.dirtyFields,z),!O.keepTouched&&jt(r.touchedFields,z),!O.keepIsValidating&&jt(r.validatingFields,z),!t.shouldUnregister&&!O.keepDefaultValue&&jt(o,z);p.state.next({values:Nt(s)}),p.state.next({...r,...O.keepDirty?{isDirty:Y()}:{}}),!O.keepIsValid&&h()},_e=({disabled:D,name:O})=>{(ar(D)&&i.mount||D||a.disabled.has(O))&&(D?a.disabled.add(O):a.disabled.delete(O))},pe=(D,O={})=>{let z=me(n,D);const ae=ar(O.disabled)||ar(t.disabled);return ot(n,D,{...z||{},_f:{...z&&z._f?z._f:{ref:{name:D}},name:D,mount:!0,...O}}),a.mount.add(D),z?_e({disabled:ar(O.disabled)?O.disabled:t.disabled,name:D}):C(D,!0,O.value),{...ae?{disabled:O.disabled||t.disabled}:{},...t.progressive?{required:!!O.required,min:Fo(O.min),max:Fo(O.max),minLength:Fo(O.minLength),maxLength:Fo(O.maxLength),pattern:Fo(O.pattern)}:{},name:D,onChange:X,onBlur:X,ref:se=>{if(se){pe(D,O),z=me(n,D);const j=At(se.value)&&se.querySelectorAll&&se.querySelectorAll("input,select,textarea")[0]||se,oe=Fx(j),F=z._f.refs||[];if(oe?F.find(fe=>fe===j):j===z._f.ref)return;ot(n,D,{_f:{...z._f,...oe?{refs:[...F.filter(Rc),j,...Array.isArray(me(o,D))?[{}]:[]],ref:{type:j.type,name:D}}:{ref:j}}}),C(D,!1,void 0,j)}else z=me(n,D,{}),z._f&&(z._f.mount=!1),(t.shouldUnregister||O.shouldUnregister)&&!(tp(a.array,D)&&i.action)&&a.unMount.add(D)}}},ge=()=>t.shouldFocusError&&Vo(n,re,a.mount),Ae=D=>{ar(D)&&(p.state.next({disabled:D}),Vo(n,(O,z)=>{const ae=me(n,z);ae&&(O.disabled=ae._f.disabled||D,Array.isArray(ae._f.refs)&&ae._f.refs.forEach(se=>{se.disabled=ae._f.disabled||D}))},0,!1))},N=(D,O)=>async z=>{let ae;z&&(z.preventDefault&&z.preventDefault(),z.persist&&z.persist());let se=Nt(s);if(p.state.next({isSubmitting:!0}),t.resolver){const{errors:j,values:oe}=await E();r.errors=j,se=Nt(oe)}else await P(n);if(a.disabled.size)for(const j of a.disabled)jt(se,j);if(jt(r.errors,"root"),Jt(r.errors)){p.state.next({errors:{}});try{await D(se,z)}catch(j){ae=j}}else O&&await O({...r.errors},z),ge(),setTimeout(ge);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Jt(r.errors)&&!ae,submitCount:r.submitCount+1,errors:r.errors}),ae)throw ae},Ue=(D,O={})=>{me(n,D)&&(At(O.defaultValue)?R(D,Nt(me(o,D))):(R(D,O.defaultValue),ot(o,D,Nt(O.defaultValue))),O.keepTouched||jt(r.touchedFields,D),O.keepDirty||(jt(r.dirtyFields,D),r.isDirty=O.defaultValue?Y(D,Nt(me(o,D))):Y()),O.keepError||(jt(r.errors,D),d.isValid&&h()),p.state.next({...r}))},tt=(D,O={})=>{const z=D?Nt(D):o,ae=Nt(z),se=Jt(D),j=se?o:ae;if(O.keepDefaultValues||(o=z),!O.keepValues){if(O.keepDirtyValues){const oe=new Set([...a.mount,...Object.keys(Bo(o,s))]);for(const F of Array.from(oe))me(r.dirtyFields,F)?ot(j,F,me(s,F)):R(F,me(j,F))}else{if(Ec&&At(D))for(const oe of a.mount){const F=me(n,oe);if(F&&F._f){const fe=Array.isArray(F._f.refs)?F._f.refs[0]:F._f.ref;if(Oi(fe)){const M=fe.closest("form");if(M){M.reset();break}}}}if(O.keepFieldsRef)for(const oe of a.mount)R(oe,me(j,oe));else n={}}s=t.shouldUnregister?O.keepDefaultValues?Nt(o):{}:Nt(j),p.array.next({values:{...j}}),p.state.next({values:{...j}})}a={mount:O.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!d.isValid||!!O.keepIsValid||!!O.keepDirtyValues,i.watch=!!t.shouldUnregister,p.state.next({submitCount:O.keepSubmitCount?r.submitCount:0,isDirty:se?!1:O.keepDirty?r.isDirty:!!(O.keepDefaultValues&&!Wr(D,o)),isSubmitted:O.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:se?{}:O.keepDirtyValues?O.keepDefaultValues&&s?Bo(o,s):r.dirtyFields:O.keepDefaultValues&&D?Bo(o,D):O.keepDirty?r.dirtyFields:{},touchedFields:O.keepTouched?r.touchedFields:{},errors:O.keepErrors?r.errors:{},isSubmitSuccessful:O.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},He=(D,O)=>tt(Er(D)?D(s):D,O),Me=(D,O={})=>{const z=me(n,D),ae=z&&z._f;if(ae){const se=ae.refs?ae.refs[0]:ae.ref;se.focus&&(se.focus(),O.shouldSelect&&Er(se.select)&&se.select())}},Le=D=>{r={...r,...D}},st={control:{register:pe,unregister:be,getFieldState:ee,handleSubmit:N,setError:te,_subscribe:ue,_runSchema:E,_focusError:ge,_getWatch:Z,_getDirty:Y,_setValid:h,_setFieldArray:w,_setDisabledField:_e,_setErrors:k,_getFieldArray:V,_reset:tt,_resetDefaultValues:()=>Er(t.defaultValues)&&t.defaultValues().then(D=>{He(D,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:A,_disableForm:Ae,_subjects:p,_proxyFormState:d,get _fields(){return n},get _formValues(){return s},get _state(){return i},set _state(D){i=D},get _defaultValues(){return o},get _names(){return a},set _names(D){a=D},get _formState(){return r},get _options(){return t},set _options(D){t={...t,...D}}},subscribe:ce,trigger:ve,register:pe,handleSubmit:N,watch:he,setValue:R,getValues:L,reset:He,resetField:Ue,clearErrors:Ee,unregister:be,setError:te,setFocus:Me,getFieldState:ee};return{...st,formControl:st}}function wp(e={}){const t=y.useRef(void 0),r=y.useRef(void 0),[n,o]=y.useState({isDirty:!1,isValidating:!1,isLoading:Er(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Er(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!Er(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:i,...a}=Jx(e);t.current={...a,formState:n}}const s=t.current.control;return s._options=e,Ac(()=>{const i=s._subscribe({formState:s._proxyFormState,callback:()=>o({...s._formState}),reRenderRoot:!0});return o(a=>({...a,isReady:!0})),s._formState.isReady=!0,i},[s]),y.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),y.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),y.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),y.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),y.useEffect(()=>{if(s._proxyFormState.isDirty){const i=s._getDirty();i!==n.isDirty&&s._subjects.state.next({isDirty:i})}},[s,n.isDirty]),y.useEffect(()=>{e.values&&!Wr(e.values,r.current)?(s._reset(e.values,{keepFieldsRef:!0,...s._options.resetOptions}),r.current=e.values,o(i=>({...i}))):s._resetDefaultValues()},[s,e.values]),y.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=rp(n,s),t.current}const Sp=(e,t,r)=>{if(e&&"reportValidity"in e){const n=me(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Nc=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Sp(n.ref,r,e):n&&n.refs&&n.refs.forEach(o=>Sp(o,r,e))}},Cp=(e,t)=>{t.shouldUseNativeValidation&&Nc(e,t);const r={};for(const n in e){const o=me(t.fields,n),s=Object.assign(e[n]||{},{ref:o&&o.ref});if(ew(t.names||Object.keys(e),n)){const i=Object.assign({},me(r,n));ot(i,"root",s),ot(r,n,i)}else ot(r,n,s)}return r},ew=(e,t)=>{const r=Ep(t);return e.some(n=>Ep(n).match(`^${r}\\.\\d+`))};function Ep(e){return e.replace(/\]|\[/g,"")}function Q(e,t,r){function n(a,c){var l;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(l=a._zod).traits??(l.traits=new Set),a._zod.traits.add(e),t(a,c);for(const d in i.prototype)d in a||Object.defineProperty(a,d,{value:i.prototype[d].bind(a)});a._zod.constr=i,a._zod.def=c}const o=r?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function i(a){var c;const l=r?.Parent?new s:this;n(l,a),(c=l._zod).deferred??(c.deferred=[]);for(const d of l._zod.deferred)d();return l}return Object.defineProperty(i,"init",{value:n}),Object.defineProperty(i,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class Wn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Dp extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const kp={};function wn(e){return kp}function tw(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function $c(e,t){return typeof t=="bigint"?t.toString():t}function Lc(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function zc(e){return e==null}function Bc(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function rw(e,t){const r=(e.toString().split(".")[1]||"").length,n=t.toString();let o=(n.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(n)){const c=n.match(/\d?e-(\d?)/);c?.[1]&&(o=Number.parseInt(c[1]))}const s=r>o?r:o,i=Number.parseInt(e.toFixed(s).replace(".","")),a=Number.parseInt(t.toFixed(s).replace(".",""));return i%a/10**s}const Tp=Symbol("evaluating");function ft(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Tp)return n===void 0&&(n=Tp,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function nw(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function en(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Yn(...e){const t={};for(const r of e){const n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function Ip(e){return JSON.stringify(e)}const Ap="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function $i(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const ow=Lc(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Uo(e){if($i(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!($i(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Mp(e){return Uo(e)?{...e}:e}const sw=new Set(["string","number","symbol"]);function qn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tn(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function Te(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function iw(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const aw={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function cw(e,t){const r=e._zod.def,n=Yn(e._zod.def,{get shape(){const o={};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(o[s]=r.shape[s])}return en(this,"shape",o),o},checks:[]});return tn(e,n)}function lw(e,t){const r=e._zod.def,n=Yn(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete o[s]}return en(this,"shape",o),o},checks:[]});return tn(e,n)}function uw(e,t){if(!Uo(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const o=Yn(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return en(this,"shape",s),s},checks:[]});return tn(e,o)}function dw(e,t){if(!Uo(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return en(this,"shape",n),n},checks:e._zod.def.checks};return tn(e,r)}function fw(e,t){const r=Yn(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return en(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return tn(e,r)}function pw(e,t,r){const n=Yn(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(r)for(const i in r){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(s[i]=e?new e({type:"optional",innerType:o[i]}):o[i])}else for(const i in o)s[i]=e?new e({type:"optional",innerType:o[i]}):o[i];return en(this,"shape",s),s},checks:[]});return tn(t,n)}function hw(e,t,r){const n=Yn(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(r)for(const i in r){if(!(i in s))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(s[i]=new e({type:"nonoptional",innerType:o[i]}))}else for(const i in o)s[i]=new e({type:"nonoptional",innerType:o[i]});return en(this,"shape",s),s},checks:[]});return tn(t,n)}function Zn(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Pp(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Li(e){return typeof e=="string"?e:e?.message}function Sn(e,t,r){const n={...e,path:e.path??[]};if(!e.message){const o=Li(e.inst?._zod.def?.error?.(e))??Li(t?.error?.(e))??Li(r.customError?.(e))??Li(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function Fc(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ho(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}const Op=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,$c,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Vc=Q("$ZodError",Op),zi=Q("$ZodError",Op,{Parent:Error});function mw(e,t=r=>r.message){const r={},n=[];for(const o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}function gw(e,t){const r=t||function(s){return s.message},n={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>o({issues:a}));else if(i.code==="invalid_key")o({issues:i.issues});else if(i.code==="invalid_element")o({issues:i.issues});else if(i.path.length===0)n._errors.push(r(i));else{let a=n,c=0;for(;c<i.path.length;){const l=i.path[c];c===i.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(r(i))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return o(e),n}const Bi=e=>(t,r,n,o)=>{const s=n?Object.assign(n,{async:!1}):{async:!1},i=t._zod.run({value:r,issues:[]},s);if(i instanceof Promise)throw new Wn;if(i.issues.length){const a=new(o?.Err??e)(i.issues.map(c=>Sn(c,s,wn())));throw Ap(a,o?.callee),a}return i.value},vw=Bi(zi),Fi=e=>async(t,r,n,o)=>{const s=n?Object.assign(n,{async:!0}):{async:!0};let i=t._zod.run({value:r,issues:[]},s);if(i instanceof Promise&&(i=await i),i.issues.length){const a=new(o?.Err??e)(i.issues.map(c=>Sn(c,s,wn())));throw Ap(a,o?.callee),a}return i.value},yw=Fi(zi),Vi=e=>(t,r,n)=>{const o=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Wn;return s.issues.length?{success:!1,error:new(e??Vc)(s.issues.map(i=>Sn(i,o,wn())))}:{success:!0,data:s.value}},bw=Vi(zi),Ui=e=>async(t,r,n)=>{const o=n?Object.assign(n,{async:!0}):{async:!0};let s=t._zod.run({value:r,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(i=>Sn(i,o,wn())))}:{success:!0,data:s.value}},_w=Ui(zi),xw=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Bi(e)(t,r,o)},ww=e=>(t,r,n)=>Bi(e)(t,r,n),Sw=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Fi(e)(t,r,o)},Cw=e=>async(t,r,n)=>Fi(e)(t,r,n),Ew=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Vi(e)(t,r,o)},Dw=e=>(t,r,n)=>Vi(e)(t,r,n),kw=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Ui(e)(t,r,o)},Tw=e=>async(t,r,n)=>Ui(e)(t,r,n),Iw=/^[cC][^\s-]{8,}$/,Aw=/^[0-9a-z]+$/,Mw=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Pw=/^[0-9a-vA-V]{20}$/,Ow=/^[A-Za-z0-9]{27}$/,jw=/^[a-zA-Z0-9_-]{21}$/,Rw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Nw=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,jp=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,$w=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Lw="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function zw(){return new RegExp(Lw,"u")}const Bw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Fw=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,Vw=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Uw=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Hw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Rp=/^[A-Za-z0-9_-]*$/,Ww=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Yw=/^\+(?:[0-9]){6,14}[0-9]$/,Np="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",qw=new RegExp(`^${Np}$`);function $p(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Zw(e){return new RegExp(`^${$p(e)}$`)}function Gw(e){const t=$p({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${Np}T(?:${n})$`)}const Kw=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Qw=/^\d+$/,Xw=/^-?\d+(?:\.\d+)?/i,Jw=/true|false/i,eS=/^[^A-Z]*$/,tS=/^[^a-z]*$/,er=Q("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Lp={number:"number",bigint:"bigint",object:"date"},zp=Q("$ZodCheckLessThan",(e,t)=>{er.init(e,t);const r=Lp[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Bp=Q("$ZodCheckGreaterThan",(e,t)=>{er.init(e,t);const r=Lp[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),rS=Q("$ZodCheckMultipleOf",(e,t)=>{er.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):rw(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),nS=Q("$ZodCheckNumberFormat",(e,t)=>{er.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[o,s]=aw[t.format];e._zod.onattach.push(i=>{const a=i._zod.bag;a.format=t.format,a.minimum=o,a.maximum=s,r&&(a.pattern=Qw)}),e._zod.check=i=>{const a=i.value;if(r){if(!Number.isInteger(a)){i.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?i.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort}):i.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort});return}}a<o&&i.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>s&&i.issues.push({origin:"number",input:a,code:"too_big",maximum:s,inst:e})}}),oS=Q("$ZodCheckMaxLength",(e,t)=>{var r;er.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!zc(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const o=n.value;if(o.length<=t.maximum)return;const i=Fc(o);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),sS=Q("$ZodCheckMinLength",(e,t)=>{var r;er.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!zc(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const o=n.value;if(o.length>=t.minimum)return;const i=Fc(o);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),iS=Q("$ZodCheckLengthEquals",(e,t)=>{var r;er.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!zc(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=n=>{const o=n.value,s=o.length;if(s===t.length)return;const i=Fc(o),a=s>t.length;n.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Hi=Q("$ZodCheckStringFormat",(e,t)=>{var r,n;er.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),aS=Q("$ZodCheckRegex",(e,t)=>{Hi.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),cS=Q("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=eS),Hi.init(e,t)}),lS=Q("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=tS),Hi.init(e,t)}),uS=Q("$ZodCheckIncludes",(e,t)=>{er.init(e,t);const r=qn(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),dS=Q("$ZodCheckStartsWith",(e,t)=>{er.init(e,t);const r=new RegExp(`^${qn(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),fS=Q("$ZodCheckEndsWith",(e,t)=>{er.init(e,t);const r=new RegExp(`.*${qn(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),pS=Q("$ZodCheckOverwrite",(e,t)=>{er.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class hS{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(`
161
161
  `).filter(i=>i),o=Math.min(...n.map(i=>i.length-i.trimStart().length)),s=n.map(i=>i.slice(o)).map(i=>" ".repeat(this.indent*2)+i);for(const i of s)this.content.push(i)}compile(){const t=Function,r=this?.args,o=[...(this?.content??[""]).map(s=>` ${s}`)];return new t(...r,o.join(`
162
- `))}}const uS={major:4,minor:1,patch:5},Ct=G("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=uS;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const o of n)for(const s of o._zod.onattach)s(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(i,a,c)=>{let l=qn(i),d;for(const f of a){if(f._zod.def.when){if(!f._zod.def.when(i))continue}else if(l)continue;const p=i.issues.length,y=f._zod.check(i);if(y instanceof Promise&&c?.async===!1)throw new Wn;if(d||y instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await y,i.issues.length!==p&&(l||(l=qn(i,p)))});else{if(i.issues.length===p)continue;l||(l=qn(i,p))}}return d?d.then(()=>i):i},s=(i,a,c)=>{if(qn(i))return i.aborted=!0,i;const l=o(a,n,c);if(l instanceof Promise){if(c.async===!1)throw new Wn;return l.then(d=>e._zod.parse(d,c))}return e._zod.parse(l,c)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction==="backward"){const l=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return l instanceof Promise?l.then(d=>s(d,i,a)):s(l,i,a)}const c=e._zod.parse(i,a);if(c instanceof Promise){if(a.async===!1)throw new Wn;return c.then(l=>o(l,n,a))}return o(c,n,a)}}e["~standard"]={validate:o=>{try{const s=hw(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return mw(e,o).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}}),Fc=G("$ZodString",(e,t)=>{Ct.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Hw(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),yt=G("$ZodStringFormat",(e,t)=>{Vi.init(e,t),Fc.init(e,t)}),dS=G("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Mw),yt.init(e,t)}),fS=G("$ZodUUID",(e,t)=>{if(t.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Pp(n))}else t.pattern??(t.pattern=Pp());yt.init(e,t)}),pS=G("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Pw),yt.init(e,t)}),hS=G("$ZodURL",(e,t)=>{yt.init(e,t),e._zod.check=r=>{try{const n=r.value.trim(),o=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Bw.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),mS=G("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=jw()),yt.init(e,t)}),gS=G("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Iw),yt.init(e,t)}),vS=G("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Cw),yt.init(e,t)}),yS=G("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ew),yt.init(e,t)}),bS=G("$ZodULID",(e,t)=>{t.pattern??(t.pattern=kw),yt.init(e,t)}),_S=G("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Dw),yt.init(e,t)}),xS=G("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Tw),yt.init(e,t)}),wS=G("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Ww(t)),yt.init(e,t)}),SS=G("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Vw),yt.init(e,t)}),CS=G("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Uw(t)),yt.init(e,t)}),ES=G("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Aw),yt.init(e,t)}),kS=G("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Rw),yt.init(e,t),e._zod.onattach.push(r=>{const n=r._zod.bag;n.format="ipv4"})}),DS=G("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Nw),yt.init(e,t),e._zod.onattach.push(r=>{const n=r._zod.bag;n.format="ipv6"}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),TS=G("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=$w),yt.init(e,t)}),IS=G("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Lw),yt.init(e,t),e._zod.check=r=>{const[n,o]=r.value.split("/");try{if(!o)throw new Error;const s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function zp(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const AS=G("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=zw),yt.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{zp(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function MS(e){if(!Op.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return zp(r)}const PS=G("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Op),yt.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{MS(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),OS=G("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Fw),yt.init(e,t)});function jS(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const RS=G("$ZodJWT",(e,t)=>{yt.init(e,t),e._zod.check=r=>{jS(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Bp=G("$ZodNumber",(e,t)=>{Ct.init(e,t),e._zod.pattern=e._zod.bag.pattern??qw,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;const s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...s?{received:s}:{}}),r}}),NS=G("$ZodNumber",(e,t)=>{Xw.init(e,t),Bp.init(e,t)}),$S=G("$ZodBoolean",(e,t)=>{Ct.init(e,t),e._zod.pattern=Zw,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}const o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),LS=G("$ZodUnknown",(e,t)=>{Ct.init(e,t),e._zod.parse=r=>r}),zS=G("$ZodNever",(e,t)=>{Ct.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function Fp(e,t,r){e.issues.length&&t.issues.push(...Ap(r,e.issues)),t.value[r]=e.value}const BS=G("$ZodArray",(e,t)=>{Ct.init(e,t),e._zod.parse=(r,n)=>{const o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);const s=[];for(let i=0;i<o.length;i++){const a=o[i],c=t.element._zod.run({value:a,issues:[]},n);c instanceof Promise?s.push(c.then(l=>Fp(l,r,i))):Fp(c,r,i)}return s.length?Promise.all(s).then(()=>r):r}});function Ui(e,t,r,n){e.issues.length&&t.issues.push(...Ap(r,e.issues)),e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function Vp(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape[n]._zod.traits.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const r=tw(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Up(e,t,r,n,o,s){const i=[],a=o.keySet,c=o.catchall._zod,l=c.def.type;for(const d of Object.keys(t)){if(a.has(d))continue;if(l==="never"){i.push(d);continue}const f=c.run({value:t[d],issues:[]},n);f instanceof Promise?e.push(f.then(p=>Ui(p,r,d,t))):Ui(f,r,d,t)}return i.length&&r.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}const FS=G("$ZodObject",(e,t)=>{Ct.init(e,t);const r=Nc(()=>Vp(t));ft(e._zod,"propValues",()=>{const i=t.shape,a={};for(const c in i){const l=i[c]._zod;if(l.values){a[c]??(a[c]=new Set);for(const d of l.values)a[c].add(d)}}return a});const n=Ri,o=t.catchall;let s;e._zod.parse=(i,a)=>{s??(s=r.value);const c=i.value;if(!n(c))return i.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),i;i.value={};const l=[],d=s.shape;for(const f of s.keys){const y=d[f]._zod.run({value:c[f],issues:[]},a);y instanceof Promise?l.push(y.then(m=>Ui(m,i,f,c))):Ui(y,i,f,c)}return o?Up(l,c,i,a,r.value,e):l.length?Promise.all(l).then(()=>i):i}}),VS=G("$ZodObjectJIT",(e,t)=>{FS.init(e,t);const r=e._zod.parse,n=Nc(()=>Vp(t)),o=p=>{const y=new lS(["shape","payload","ctx"]),m=n.value,h=D=>{const k=Dp(D);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};y.write("const input = payload.value;");const b=Object.create(null);let S=0;for(const D of m.keys)b[D]=`key_${S++}`;y.write("const newResult = {}");for(const D of m.keys){const k=b[D],w=Dp(D);y.write(`const ${k} = ${h(D)};`),y.write(`
163
- if (${k}.issues.length) {
164
- payload.issues = payload.issues.concat(${k}.issues.map(iss => ({
162
+ `))}}const mS={major:4,minor:1,patch:5},Ct=Q("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=mS;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const o of n)for(const s of o._zod.onattach)s(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(i,a,c)=>{let l=Zn(i),d;for(const f of a){if(f._zod.def.when){if(!f._zod.def.when(i))continue}else if(l)continue;const p=i.issues.length,m=f._zod.check(i);if(m instanceof Promise&&c?.async===!1)throw new Wn;if(d||m instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await m,i.issues.length!==p&&(l||(l=Zn(i,p)))});else{if(i.issues.length===p)continue;l||(l=Zn(i,p))}}return d?d.then(()=>i):i},s=(i,a,c)=>{if(Zn(i))return i.aborted=!0,i;const l=o(a,n,c);if(l instanceof Promise){if(c.async===!1)throw new Wn;return l.then(d=>e._zod.parse(d,c))}return e._zod.parse(l,c)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction==="backward"){const l=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return l instanceof Promise?l.then(d=>s(d,i,a)):s(l,i,a)}const c=e._zod.parse(i,a);if(c instanceof Promise){if(a.async===!1)throw new Wn;return c.then(l=>o(l,n,a))}return o(c,n,a)}}e["~standard"]={validate:o=>{try{const s=bw(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return _w(e,o).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}}),Uc=Q("$ZodString",(e,t)=>{Ct.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Kw(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),yt=Q("$ZodStringFormat",(e,t)=>{Hi.init(e,t),Uc.init(e,t)}),gS=Q("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Nw),yt.init(e,t)}),vS=Q("$ZodUUID",(e,t)=>{if(t.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=jp(n))}else t.pattern??(t.pattern=jp());yt.init(e,t)}),yS=Q("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=$w),yt.init(e,t)}),bS=Q("$ZodURL",(e,t)=>{yt.init(e,t),e._zod.check=r=>{try{const n=r.value.trim(),o=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Ww.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),_S=Q("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=zw()),yt.init(e,t)}),xS=Q("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=jw),yt.init(e,t)}),wS=Q("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Iw),yt.init(e,t)}),SS=Q("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Aw),yt.init(e,t)}),CS=Q("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Mw),yt.init(e,t)}),ES=Q("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Pw),yt.init(e,t)}),DS=Q("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Ow),yt.init(e,t)}),kS=Q("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Gw(t)),yt.init(e,t)}),TS=Q("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=qw),yt.init(e,t)}),IS=Q("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Zw(t)),yt.init(e,t)}),AS=Q("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Rw),yt.init(e,t)}),MS=Q("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Bw),yt.init(e,t),e._zod.onattach.push(r=>{const n=r._zod.bag;n.format="ipv4"})}),PS=Q("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Fw),yt.init(e,t),e._zod.onattach.push(r=>{const n=r._zod.bag;n.format="ipv6"}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),OS=Q("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Vw),yt.init(e,t)}),jS=Q("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Uw),yt.init(e,t),e._zod.check=r=>{const[n,o]=r.value.split("/");try{if(!o)throw new Error;const s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Fp(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const RS=Q("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Hw),yt.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{Fp(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function NS(e){if(!Rp.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Fp(r)}const $S=Q("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Rp),yt.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{NS(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),LS=Q("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Yw),yt.init(e,t)});function zS(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const BS=Q("$ZodJWT",(e,t)=>{yt.init(e,t),e._zod.check=r=>{zS(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Vp=Q("$ZodNumber",(e,t)=>{Ct.init(e,t),e._zod.pattern=e._zod.bag.pattern??Xw,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;const s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...s?{received:s}:{}}),r}}),FS=Q("$ZodNumber",(e,t)=>{nS.init(e,t),Vp.init(e,t)}),VS=Q("$ZodBoolean",(e,t)=>{Ct.init(e,t),e._zod.pattern=Jw,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}const o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),US=Q("$ZodUnknown",(e,t)=>{Ct.init(e,t),e._zod.parse=r=>r}),HS=Q("$ZodNever",(e,t)=>{Ct.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function Up(e,t,r){e.issues.length&&t.issues.push(...Pp(r,e.issues)),t.value[r]=e.value}const WS=Q("$ZodArray",(e,t)=>{Ct.init(e,t),e._zod.parse=(r,n)=>{const o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);const s=[];for(let i=0;i<o.length;i++){const a=o[i],c=t.element._zod.run({value:a,issues:[]},n);c instanceof Promise?s.push(c.then(l=>Up(l,r,i))):Up(c,r,i)}return s.length?Promise.all(s).then(()=>r):r}});function Wi(e,t,r,n){e.issues.length&&t.issues.push(...Pp(r,e.issues)),e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function Hp(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape[n]._zod.traits.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const r=iw(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Wp(e,t,r,n,o,s){const i=[],a=o.keySet,c=o.catchall._zod,l=c.def.type;for(const d of Object.keys(t)){if(a.has(d))continue;if(l==="never"){i.push(d);continue}const f=c.run({value:t[d],issues:[]},n);f instanceof Promise?e.push(f.then(p=>Wi(p,r,d,t))):Wi(f,r,d,t)}return i.length&&r.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}const YS=Q("$ZodObject",(e,t)=>{Ct.init(e,t);const r=Lc(()=>Hp(t));ft(e._zod,"propValues",()=>{const i=t.shape,a={};for(const c in i){const l=i[c]._zod;if(l.values){a[c]??(a[c]=new Set);for(const d of l.values)a[c].add(d)}}return a});const n=$i,o=t.catchall;let s;e._zod.parse=(i,a)=>{s??(s=r.value);const c=i.value;if(!n(c))return i.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),i;i.value={};const l=[],d=s.shape;for(const f of s.keys){const m=d[f]._zod.run({value:c[f],issues:[]},a);m instanceof Promise?l.push(m.then(v=>Wi(v,i,f,c))):Wi(m,i,f,c)}return o?Wp(l,c,i,a,r.value,e):l.length?Promise.all(l).then(()=>i):i}}),qS=Q("$ZodObjectJIT",(e,t)=>{YS.init(e,t);const r=e._zod.parse,n=Lc(()=>Hp(t)),o=p=>{const m=new hS(["shape","payload","ctx"]),v=n.value,h=k=>{const C=Ip(k);return`shape[${C}]._zod.run({ value: input[${C}], issues: [] }, ctx)`};m.write("const input = payload.value;");const b=Object.create(null);let w=0;for(const k of v.keys)b[k]=`key_${w++}`;m.write("const newResult = {}");for(const k of v.keys){const C=b[k],x=Ip(k);m.write(`const ${C} = ${h(k)};`),m.write(`
163
+ if (${C}.issues.length) {
164
+ payload.issues = payload.issues.concat(${C}.issues.map(iss => ({
165
165
  ...iss,
166
- path: iss.path ? [${w}, ...iss.path] : [${w}]
166
+ path: iss.path ? [${x}, ...iss.path] : [${x}]
167
167
  })));
168
168
  }
169
169
 
170
- if (${k}.value === undefined) {
171
- if (${w} in input) {
172
- newResult[${w}] = undefined;
170
+ if (${C}.value === undefined) {
171
+ if (${x} in input) {
172
+ newResult[${x}] = undefined;
173
173
  }
174
174
  } else {
175
- newResult[${w}] = ${k}.value;
175
+ newResult[${x}] = ${C}.value;
176
176
  }
177
- `)}y.write("payload.value = newResult;"),y.write("return payload;");const C=y.compile();return(D,k)=>C(p,D,k)};let s;const i=Ri,a=!Ep.jitless,l=a&&Jx.value,d=t.catchall;let f;e._zod.parse=(p,y)=>{f??(f=n.value);const m=p.value;return i(m)?a&&l&&y?.async===!1&&y.jitless!==!0?(s||(s=o(t.shape)),p=s(p,y),d?Up([],m,p,y,f,e):p):r(p,y):(p.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),p)}});function Wp(e,t,r,n){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const o=e.filter(s=>!qn(s));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(s=>s.issues.map(i=>wn(i,n,xn())))}),t)}const US=G("$ZodUnion",(e,t)=>{Ct.init(e,t),ft(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),ft(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ft(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),ft(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>Lc(s.source)).join("|")})$`)}});const r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,s)=>{if(r)return n(o,s);let i=!1;const a=[];for(const c of t.options){const l=c._zod.run({value:o.value,issues:[]},s);if(l instanceof Promise)a.push(l),i=!0;else{if(l.issues.length===0)return l;a.push(l)}}return i?Promise.all(a).then(c=>Wp(c,o,e,s)):Wp(a,o,e,s)}}),WS=G("$ZodIntersection",(e,t)=>{Ct.init(e,t),e._zod.parse=(r,n)=>{const o=r.value,s=t.left._zod.run({value:o,issues:[]},n),i=t.right._zod.run({value:o,issues:[]},n);return s instanceof Promise||i instanceof Promise?Promise.all([s,i]).then(([c,l])=>Hp(r,c,l)):Hp(r,s,i)}});function Vc(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Vo(e)&&Vo(t)){const r=Object.keys(t),n=Object.keys(e).filter(s=>r.indexOf(s)!==-1),o={...e,...t};for(const s of n){const i=Vc(e[s],t[s]);if(!i.valid)return{valid:!1,mergeErrorPath:[s,...i.mergeErrorPath]};o[s]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const o=e[n],s=t[n],i=Vc(o,s);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};r.push(i.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Hp(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),qn(e))return e;const n=Vc(t.value,r.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}const HS=G("$ZodEnum",(e,t)=>{Ct.init(e,t);const r=Kx(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>ew.has(typeof o)).map(o=>typeof o=="string"?Yn(o):o.toString()).join("|")})$`),e._zod.parse=(o,s)=>{const i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:r,input:i,inst:e}),o}}),YS=G("$ZodLiteral",(e,t)=>{if(Ct.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?Yn(r):r?Yn(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,n)=>{const o=r.value;return e._zod.values.has(o)||r.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),r}}),qS=G("$ZodTransform",(e,t)=>{Ct.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Cp(e.constructor.name);const o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(i=>(r.value=i,r));if(o instanceof Promise)throw new Wn;return r.value=o,r}});function Yp(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const ZS=G("$ZodOptional",(e,t)=>{Ct.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ft(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ft(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Lc(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>Yp(s,r.value)):Yp(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),GS=G("$ZodNullable",(e,t)=>{Ct.init(e,t),ft(e._zod,"optin",()=>t.innerType._zod.optin),ft(e._zod,"optout",()=>t.innerType._zod.optout),ft(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Lc(r.source)}|null)$`):void 0}),ft(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),KS=G("$ZodDefault",(e,t)=>{Ct.init(e,t),e._zod.optin="optional",ft(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>qp(s,t)):qp(o,t)}});function qp(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const QS=G("$ZodPrefault",(e,t)=>{Ct.init(e,t),e._zod.optin="optional",ft(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),XS=G("$ZodNonOptional",(e,t)=>{Ct.init(e,t),ft(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>Zp(s,e)):Zp(o,e)}});function Zp(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const JS=G("$ZodCatch",(e,t)=>{Ct.init(e,t),ft(e._zod,"optin",()=>t.innerType._zod.optin),ft(e._zod,"optout",()=>t.innerType._zod.optout),ft(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(i=>wn(i,n,xn()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(s=>wn(s,n,xn()))},input:r.value}),r.issues=[]),r)}}),eC=G("$ZodPipe",(e,t)=>{Ct.init(e,t),ft(e._zod,"values",()=>t.in._zod.values),ft(e._zod,"optin",()=>t.in._zod.optin),ft(e._zod,"optout",()=>t.out._zod.optout),ft(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const s=t.out._zod.run(r,n);return s instanceof Promise?s.then(i=>Wi(i,t.in,n)):Wi(s,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(s=>Wi(s,t.out,n)):Wi(o,t.out,n)}});function Wi(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const tC=G("$ZodReadonly",(e,t)=>{Ct.init(e,t),ft(e._zod,"propValues",()=>t.innerType._zod.propValues),ft(e._zod,"values",()=>t.innerType._zod.values),ft(e._zod,"optin",()=>t.innerType._zod.optin),ft(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(Gp):Gp(o)}});function Gp(e){return e.value=Object.freeze(e.value),e}const rC=G("$ZodCustom",(e,t)=>{Jt.init(e,t),Ct.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(s=>Kp(s,r,n,e));Kp(o,r,n,e)}});function Kp(e,t,r,n){if(!e){const o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(Uo(o))}}class nC{constructor(){this._map=new Map,this._idmap=new Map}add(t,...r){const n=r[0];if(this._map.set(t,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,t)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function oC(){return new nC}const Hi=oC();function sC(e,t){return new e({type:"string",...Ee(t)})}function iC(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ee(t)})}function Qp(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ee(t)})}function aC(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ee(t)})}function cC(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ee(t)})}function lC(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ee(t)})}function uC(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ee(t)})}function dC(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ee(t)})}function fC(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ee(t)})}function pC(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ee(t)})}function hC(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ee(t)})}function mC(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ee(t)})}function gC(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ee(t)})}function vC(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ee(t)})}function yC(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ee(t)})}function bC(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ee(t)})}function _C(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ee(t)})}function xC(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ee(t)})}function wC(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ee(t)})}function SC(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ee(t)})}function CC(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ee(t)})}function EC(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ee(t)})}function kC(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ee(t)})}function DC(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ee(t)})}function TC(e,t){return new e({type:"string",format:"date",check:"string_format",...Ee(t)})}function IC(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ee(t)})}function AC(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ee(t)})}function MC(e,t){return new e({type:"number",checks:[],...Ee(t)})}function PC(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Ee(t)})}function OC(e,t){return new e({type:"boolean",...Ee(t)})}function jC(e){return new e({type:"unknown"})}function RC(e,t){return new e({type:"never",...Ee(t)})}function Xp(e,t){return new $p({check:"less_than",...Ee(t),value:e,inclusive:!1})}function Uc(e,t){return new $p({check:"less_than",...Ee(t),value:e,inclusive:!0})}function Jp(e,t){return new Lp({check:"greater_than",...Ee(t),value:e,inclusive:!1})}function Wc(e,t){return new Lp({check:"greater_than",...Ee(t),value:e,inclusive:!0})}function eh(e,t){return new Qw({check:"multiple_of",...Ee(t),value:e})}function th(e,t){return new Jw({check:"max_length",...Ee(t),maximum:e})}function Yi(e,t){return new eS({check:"min_length",...Ee(t),minimum:e})}function rh(e,t){return new tS({check:"length_equals",...Ee(t),length:e})}function NC(e,t){return new rS({check:"string_format",format:"regex",...Ee(t),pattern:e})}function $C(e){return new nS({check:"string_format",format:"lowercase",...Ee(e)})}function LC(e){return new oS({check:"string_format",format:"uppercase",...Ee(e)})}function zC(e,t){return new sS({check:"string_format",format:"includes",...Ee(t),includes:e})}function BC(e,t){return new iS({check:"string_format",format:"starts_with",...Ee(t),prefix:e})}function FC(e,t){return new aS({check:"string_format",format:"ends_with",...Ee(t),suffix:e})}function Wo(e){return new cS({check:"overwrite",tx:e})}function VC(e){return Wo(t=>t.normalize(e))}function UC(){return Wo(e=>e.trim())}function WC(){return Wo(e=>e.toLowerCase())}function HC(){return Wo(e=>e.toUpperCase())}function YC(e,t,r){return new e({type:"array",element:t,...Ee(r)})}function qC(e,t,r){return new e({type:"custom",check:"custom",fn:t,...Ee(r)})}function ZC(e){const t=GC(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Uo(n,r.value,t._zod.def));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),r.issues.push(Uo(o))}},e(r.value,r)));return t}function GC(e,t){const r=new Jt({check:"custom",...Ee(t)});return r._zod.check=e,r}function nh(e,t){try{var r=e()}catch(n){return t(n)}return r&&r.then?r.then(void 0,t):r}function KC(e,t){for(var r={};e.length;){var n=e[0],o=n.code,s=n.message,i=n.path.join(".");if(!r[i])if("unionErrors"in n){var a=n.unionErrors[0].errors[0];r[i]={message:a.message,type:a.code}}else r[i]={message:s,type:o};if("unionErrors"in n&&n.unionErrors.forEach(function(d){return d.errors.forEach(function(f){return e.push(f)})}),t){var c=r[i].types,l=c&&c[n.code];r[i]=Ac(i,t,r,o,l?[].concat(l,n.message):n.message)}e.shift()}return r}function QC(e,t){for(var r={};e.length;){var n=e[0],o=n.code,s=n.message,i=n.path.join(".");if(!r[i])if(n.code==="invalid_union"&&n.errors.length>0){var a=n.errors[0][0];r[i]={message:a.message,type:a.code}}else r[i]={message:s,type:o};if(n.code==="invalid_union"&&n.errors.forEach(function(d){return d.forEach(function(f){return e.push(f)})}),t){var c=r[i].types,l=c&&c[n.code];r[i]=Ac(i,t,r,o,l?[].concat(l,n.message):n.message)}e.shift()}return r}function XC(e,t,r){if(r===void 0&&(r={}),(function(n){return"_def"in n&&typeof n._def=="object"&&"typeName"in n._def})(e))return function(n,o,s){try{return Promise.resolve(nh(function(){return Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(i){return s.shouldUseNativeValidation&&jc({},s),{errors:{},values:r.raw?Object.assign({},n):i}})},function(i){if((function(a){return Array.isArray(a?.issues)})(i))return{values:{},errors:wp(KC(i.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};if((function(n){return"_zod"in n&&typeof n._zod=="object"})(e))return function(n,o,s){try{return Promise.resolve(nh(function(){return Promise.resolve((r.mode==="sync"?fw:pw)(e,n,t)).then(function(i){return s.shouldUseNativeValidation&&jc({},s),{errors:{},values:r.raw?Object.assign({},n):i}})},function(i){if((function(a){return a instanceof Bc})(i))return{values:{},errors:wp(QC(i.issues,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};throw new Error("Invalid input: not a Zod schema")}const JC=G("ZodISODateTime",(e,t)=>{wS.init(e,t),xt.init(e,t)});function eE(e){return DC(JC,e)}const tE=G("ZodISODate",(e,t)=>{SS.init(e,t),xt.init(e,t)});function rE(e){return TC(tE,e)}const nE=G("ZodISOTime",(e,t)=>{CS.init(e,t),xt.init(e,t)});function oE(e){return IC(nE,e)}const sE=G("ZodISODuration",(e,t)=>{ES.init(e,t),xt.init(e,t)});function iE(e){return AC(sE,e)}const mr=G("ZodError",(e,t)=>{Bc.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>dw(e,r)},flatten:{value:r=>uw(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Rc,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Rc,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),aE=Li(mr),cE=zi(mr),lE=Bi(mr),uE=Fi(mr),dE=gw(mr),fE=vw(mr),pE=yw(mr),hE=bw(mr),mE=_w(mr),gE=xw(mr),vE=ww(mr),yE=Sw(mr),At=G("ZodType",(e,t)=>(Ct.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),e.clone=(r,n)=>tn(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>aE(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>lE(e,r,n),e.parseAsync=async(r,n)=>cE(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>uE(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>dE(e,r,n),e.decode=(r,n)=>fE(e,r,n),e.encodeAsync=async(r,n)=>pE(e,r,n),e.decodeAsync=async(r,n)=>hE(e,r,n),e.safeEncode=(r,n)=>mE(e,r,n),e.safeDecode=(r,n)=>gE(e,r,n),e.safeEncodeAsync=async(r,n)=>vE(e,r,n),e.safeDecodeAsync=async(r,n)=>yE(e,r,n),e.refine=(r,n)=>e.check(uk(r,n)),e.superRefine=r=>e.check(dk(r)),e.overwrite=r=>e.check(Wo(r)),e.optional=()=>ph(e),e.nullable=()=>hh(e),e.nullish=()=>ph(hh(e)),e.nonoptional=r=>nk(e,r),e.array=()=>lh(e),e.or=r=>HE([e,r]),e.and=r=>qE(e,r),e.transform=r=>gh(e,QE(r)),e.default=r=>ek(e,r),e.prefault=r=>rk(e,r),e.catch=r=>sk(e,r),e.pipe=r=>gh(e,r),e.readonly=()=>ck(e),e.describe=r=>{const n=e.clone();return Hi.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return Hi.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Hi.get(e);const n=e.clone();return Hi.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),oh=G("_ZodString",(e,t)=>{Fc.init(e,t),At.init(e,t);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(NC(...n)),e.includes=(...n)=>e.check(zC(...n)),e.startsWith=(...n)=>e.check(BC(...n)),e.endsWith=(...n)=>e.check(FC(...n)),e.min=(...n)=>e.check(Yi(...n)),e.max=(...n)=>e.check(th(...n)),e.length=(...n)=>e.check(rh(...n)),e.nonempty=(...n)=>e.check(Yi(1,...n)),e.lowercase=n=>e.check($C(n)),e.uppercase=n=>e.check(LC(n)),e.trim=()=>e.check(UC()),e.normalize=(...n)=>e.check(VC(...n)),e.toLowerCase=()=>e.check(WC()),e.toUpperCase=()=>e.check(HC())}),bE=G("ZodString",(e,t)=>{Fc.init(e,t),oh.init(e,t),e.email=r=>e.check(iC(_E,r)),e.url=r=>e.check(dC(xE,r)),e.jwt=r=>e.check(kC(NE,r)),e.emoji=r=>e.check(fC(wE,r)),e.guid=r=>e.check(Qp(sh,r)),e.uuid=r=>e.check(aC(qi,r)),e.uuidv4=r=>e.check(cC(qi,r)),e.uuidv6=r=>e.check(lC(qi,r)),e.uuidv7=r=>e.check(uC(qi,r)),e.nanoid=r=>e.check(pC(SE,r)),e.guid=r=>e.check(Qp(sh,r)),e.cuid=r=>e.check(hC(CE,r)),e.cuid2=r=>e.check(mC(EE,r)),e.ulid=r=>e.check(gC(kE,r)),e.base64=r=>e.check(SC(OE,r)),e.base64url=r=>e.check(CC(jE,r)),e.xid=r=>e.check(vC(DE,r)),e.ksuid=r=>e.check(yC(TE,r)),e.ipv4=r=>e.check(bC(IE,r)),e.ipv6=r=>e.check(_C(AE,r)),e.cidrv4=r=>e.check(xC(ME,r)),e.cidrv6=r=>e.check(wC(PE,r)),e.e164=r=>e.check(EC(RE,r)),e.datetime=r=>e.check(eE(r)),e.date=r=>e.check(rE(r)),e.time=r=>e.check(oE(r)),e.duration=r=>e.check(iE(r))});function gr(e){return sC(bE,e)}const xt=G("ZodStringFormat",(e,t)=>{yt.init(e,t),oh.init(e,t)}),_E=G("ZodEmail",(e,t)=>{pS.init(e,t),xt.init(e,t)}),sh=G("ZodGUID",(e,t)=>{dS.init(e,t),xt.init(e,t)}),qi=G("ZodUUID",(e,t)=>{fS.init(e,t),xt.init(e,t)}),xE=G("ZodURL",(e,t)=>{hS.init(e,t),xt.init(e,t)}),wE=G("ZodEmoji",(e,t)=>{mS.init(e,t),xt.init(e,t)}),SE=G("ZodNanoID",(e,t)=>{gS.init(e,t),xt.init(e,t)}),CE=G("ZodCUID",(e,t)=>{vS.init(e,t),xt.init(e,t)}),EE=G("ZodCUID2",(e,t)=>{yS.init(e,t),xt.init(e,t)}),kE=G("ZodULID",(e,t)=>{bS.init(e,t),xt.init(e,t)}),DE=G("ZodXID",(e,t)=>{_S.init(e,t),xt.init(e,t)}),TE=G("ZodKSUID",(e,t)=>{xS.init(e,t),xt.init(e,t)}),IE=G("ZodIPv4",(e,t)=>{kS.init(e,t),xt.init(e,t)}),AE=G("ZodIPv6",(e,t)=>{DS.init(e,t),xt.init(e,t)}),ME=G("ZodCIDRv4",(e,t)=>{TS.init(e,t),xt.init(e,t)}),PE=G("ZodCIDRv6",(e,t)=>{IS.init(e,t),xt.init(e,t)}),OE=G("ZodBase64",(e,t)=>{AS.init(e,t),xt.init(e,t)}),jE=G("ZodBase64URL",(e,t)=>{PS.init(e,t),xt.init(e,t)}),RE=G("ZodE164",(e,t)=>{OS.init(e,t),xt.init(e,t)}),NE=G("ZodJWT",(e,t)=>{RS.init(e,t),xt.init(e,t)}),ih=G("ZodNumber",(e,t)=>{Bp.init(e,t),At.init(e,t),e.gt=(n,o)=>e.check(Jp(n,o)),e.gte=(n,o)=>e.check(Wc(n,o)),e.min=(n,o)=>e.check(Wc(n,o)),e.lt=(n,o)=>e.check(Xp(n,o)),e.lte=(n,o)=>e.check(Uc(n,o)),e.max=(n,o)=>e.check(Uc(n,o)),e.int=n=>e.check(ah(n)),e.safe=n=>e.check(ah(n)),e.positive=n=>e.check(Jp(0,n)),e.nonnegative=n=>e.check(Wc(0,n)),e.negative=n=>e.check(Xp(0,n)),e.nonpositive=n=>e.check(Uc(0,n)),e.multipleOf=(n,o)=>e.check(eh(n,o)),e.step=(n,o)=>e.check(eh(n,o)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Zi(e){return MC(ih,e)}const $E=G("ZodNumberFormat",(e,t)=>{NS.init(e,t),ih.init(e,t)});function ah(e){return PC($E,e)}const LE=G("ZodBoolean",(e,t)=>{$S.init(e,t),At.init(e,t)});function Gi(e){return OC(LE,e)}const zE=G("ZodUnknown",(e,t)=>{LS.init(e,t),At.init(e,t)});function ch(){return jC(zE)}const BE=G("ZodNever",(e,t)=>{zS.init(e,t),At.init(e,t)});function FE(e){return RC(BE,e)}const VE=G("ZodArray",(e,t)=>{BS.init(e,t),At.init(e,t),e.element=t.element,e.min=(r,n)=>e.check(Yi(r,n)),e.nonempty=r=>e.check(Yi(1,r)),e.max=(r,n)=>e.check(th(r,n)),e.length=(r,n)=>e.check(rh(r,n)),e.unwrap=()=>e.element});function lh(e,t){return YC(VE,e,t)}const UE=G("ZodObject",(e,t)=>{VS.init(e,t),At.init(e,t),ft(e,"shape",()=>t.shape),e.keyof=()=>dh(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ch()}),e.loose=()=>e.clone({...e._zod.def,catchall:ch()}),e.strict=()=>e.clone({...e._zod.def,catchall:FE()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>sw(e,r),e.safeExtend=r=>iw(e,r),e.merge=r=>aw(e,r),e.pick=r=>nw(e,r),e.omit=r=>ow(e,r),e.partial=(...r)=>cw(fh,e,r[0]),e.required=(...r)=>lw(mh,e,r[0])});function uh(e,t){const r={type:"object",get shape(){return en(this,"shape",e?Xx(e):{}),this.shape},...Ee(t)};return new UE(r)}const WE=G("ZodUnion",(e,t)=>{US.init(e,t),At.init(e,t),e.options=t.options});function HE(e,t){return new WE({type:"union",options:e,...Ee(t)})}const YE=G("ZodIntersection",(e,t)=>{WS.init(e,t),At.init(e,t)});function qE(e,t){return new YE({type:"intersection",left:e,right:t})}const Hc=G("ZodEnum",(e,t)=>{HS.init(e,t),At.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{const s={};for(const i of n)if(r.has(i))s[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new Hc({...t,checks:[],...Ee(o),entries:s})},e.exclude=(n,o)=>{const s={...t.entries};for(const i of n)if(r.has(i))delete s[i];else throw new Error(`Key ${i} not found in enum`);return new Hc({...t,checks:[],...Ee(o),entries:s})}});function dh(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Hc({type:"enum",entries:r,...Ee(t)})}const ZE=G("ZodLiteral",(e,t)=>{YS.init(e,t),At.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function GE(e,t){return new ZE({type:"literal",values:Array.isArray(e)?e:[e],...Ee(t)})}const KE=G("ZodTransform",(e,t)=>{qS.init(e,t),At.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Cp(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Uo(s,r.value,t));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),r.issues.push(Uo(i))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(s=>(r.value=s,r)):(r.value=o,r)}});function QE(e){return new KE({type:"transform",transform:e})}const fh=G("ZodOptional",(e,t)=>{ZS.init(e,t),At.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ph(e){return new fh({type:"optional",innerType:e})}const XE=G("ZodNullable",(e,t)=>{GS.init(e,t),At.init(e,t),e.unwrap=()=>e._zod.def.innerType});function hh(e){return new XE({type:"nullable",innerType:e})}const JE=G("ZodDefault",(e,t)=>{KS.init(e,t),At.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function ek(e,t){return new JE({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ip(t)}})}const tk=G("ZodPrefault",(e,t)=>{QS.init(e,t),At.init(e,t),e.unwrap=()=>e._zod.def.innerType});function rk(e,t){return new tk({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ip(t)}})}const mh=G("ZodNonOptional",(e,t)=>{XS.init(e,t),At.init(e,t),e.unwrap=()=>e._zod.def.innerType});function nk(e,t){return new mh({type:"nonoptional",innerType:e,...Ee(t)})}const ok=G("ZodCatch",(e,t)=>{JS.init(e,t),At.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function sk(e,t){return new ok({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const ik=G("ZodPipe",(e,t)=>{eC.init(e,t),At.init(e,t),e.in=t.in,e.out=t.out});function gh(e,t){return new ik({type:"pipe",in:e,out:t})}const ak=G("ZodReadonly",(e,t)=>{tC.init(e,t),At.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ck(e){return new ak({type:"readonly",innerType:e})}const lk=G("ZodCustom",(e,t)=>{rC.init(e,t),At.init(e,t)});function uk(e,t={}){return qC(lk,e,t)}function dk(e){return ZC(e)}const vh=/^([01][0-9]|2[0-3]):[0-5][0-9]$/,yh=(e,t)=>{if(!e||!t)return null;const r=e.split("-");if(r.length!==3)return null;const n=parseInt(r[0],10),o=parseInt(r[1],10)-1,s=parseInt(r[2],10),i=t.split(":");if(i.length!==2)return null;const a=parseInt(i[0],10),c=parseInt(i[1],10),l=new Date(n,o,s,a,c);return isNaN(l.getTime())||!_.isValid(l)?null:l},fk=uh({UsuarioID:Zi().nullable().optional(),disID:Zi().nullable().optional(),EsOrganizador:Gi().default(!1),Correo:gr().email("Formato de correo inválido"),StatusInvitacion:dh(["PENDIENTE","CONFIRMADO","DECLINADO"]).default("PENDIENTE")}),pk=uh({titulo:gr().min(1,"El campo Título es requerido.").refine(e=>!e.startsWith(" "),{message:"El título no puede empezar con un espacio en blanco"}),fechaInicio:gr().min(1,"El campo fecha inicio es requerido."),horaInicio:gr().min(1,"La hora de inicio es requerida.").regex(vh,{message:"Formato inválido"}),horaFin:gr().min(1,"La hora fin es requerida.").regex(vh,{message:"Formato inválido"}),todoElDia:Gi(),fechaFin:gr().optional(),showEndDate:Gi().optional(),horaInicio2:gr().optional(),TodoElDia2:Gi().optional(),client:gr().nullable().optional(),repetir:gr().optional(),link:gr().trim().url("Debe ser una URL válida. Ejemplo https://meet.google.com/").or(GE("")).optional().refine(e=>e===void 0?!0:!/\s/.test(e),{message:"El enlace no puede contener espacios en blanco"}),descripcion:gr().optional(),invitados:lh(fk).optional().default([]),color:gr().optional(),solID:Zi().nullable().optional(),disID:Zi().nullable().optional()}).refine(e=>e.showEndDate?e.fechaFin&&e.fechaFin.length>0:!0,{message:"La fecha de fin es requerida.",path:["fechaFin"]}).refine(e=>e.fechaFin!==void 0?!!e.fechaFin&&!!e.horaInicio2:!0,{message:"La hora de fin son requeridas.",path:["horaInicio2"]}).refine(e=>{if(e.todoElDia||!e.fechaInicio||!e.horaInicio||!e.fechaFin||!e.horaInicio2)return!0;const t=yh(e.fechaInicio,e.horaInicio),r=yh(e.fechaFin,e.horaFin);return!t||!r||!_.isValid(t)||!_.isValid(r)?!0:!(_.isBefore(r,t)&&!_.isSameDay(r,t)||_.isSameDay(t,r)&&_.isBefore(r,t))},{message:"",path:["horaFin"]}),bh=e=>X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},X.createElement("path",{fill:"#333",d:"M12 24C5.38 24 0 18.608 0 12S5.38 0 12 0s12 5.38 12 12-5.38 12-12 12"}),X.createElement("path",{fill:"#fff",d:"M16.703 7.275c.52.52.541 1.345.046 1.84l-2.874 2.874 2.874 2.873c.495.496.475 1.32-.046 1.841-.52.52-1.344.54-1.84.045l-2.873-2.873-2.874 2.873c-.496.496-1.32.475-1.84-.045-.521-.521-.541-1.345-.046-1.84l2.874-2.874L7.23 9.116c-.495-.496-.475-1.32.045-1.84.521-.521 1.345-.542 1.841-.046l2.874 2.873 2.873-2.873c.496-.496 1.32-.476 1.84.045"})),hk="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cg%20fill='%23404756'%20clip-path='url(%23a)'%3e%3cpath%20d='M7.288%2022.986h-.147a6.2%206.2%200%200%201-4.28-1.85c-2.404-2.404-2.478-6.24-.16-8.557L4.28%2011a1.228%201.228%200%201%201%201.739%201.739L4.44%2014.317c-1.356%201.357-1.282%203.626.16%205.068a3.82%203.82%200%200%200%202.602%201.135c.95%200%201.825-.32%202.479-.974l1.578-1.579a1.23%201.23%200%200%201%201.739%200c.48.481.48%201.258%200%201.739l-1.579%201.578c-1.097%201.098-2.552%201.69-4.13%201.69zM17.98%2012.998a1.23%201.23%200%200%201%200-1.739l1.578-1.578c.654-.654.986-1.53.974-2.466a3.78%203.78%200%200%200-1.134-2.602c-1.443-1.443-3.712-1.517-5.068-.16L12.75%206.03c-.48.48-1.258.48-1.739%200a1.23%201.23%200%200%201%200-1.739l1.579-1.578c2.318-2.319%206.153-2.245%208.558.16a6.23%206.23%200%200%201%201.85%204.279%205.84%205.84%200%200%201-1.69%204.279l-1.578%201.578c-.481.481-1.258.481-1.74%200z'/%3e%3cpath%20d='M14.172%208.11%208.07%2014.214a1.233%201.233%200%200%200%201.743%201.744l6.104-6.104a1.233%201.233%200%201%200-1.744-1.744'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='%23fff'%20d='M0%200h24v24H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",mk=e=>X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},X.createElement("g",{clipPath:"url(#a)"},X.createElement("path",{fill:"#404756",d:"M21.24 5.72a2.98 2.98 0 0 0-2.97-2.96l-5.19-.06c-1.06-.03-2.12.41-2.87 1.17l-7.49 7.49c-.66.66-1.03 1.54-1.03 2.47s.36 1.81 1.03 2.47l4.97 4.97a3.5 3.5 0 0 0 2.47 1.02c.89 0 1.79-.34 2.47-1.02l7.49-7.49c.76-.76 1.18-1.81 1.17-2.88l-.06-5.19zm-4.2 4.43c-.44.44-1.02.66-1.6.66a2.256 2.256 0 1 1 0-4.51 2.256 2.256 0 0 1 1.6 3.85"})),X.createElement("defs",null,X.createElement("clipPath",{id:"a"},X.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),gk="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23404756'%20d='M13.17%2013.68c2.06%200%204%20.8%205.46%202.27a7.7%207.7%200%200%201%202.26%205.47c0%20.79-.64%201.43-1.43%201.43l.01-.01H4.53c-.79%200-1.43-.64-1.43-1.43%200-4.27%203.46-7.73%207.72-7.73zM12%201.9c2.82%200%205.11%202.29%205.11%205.11s-2.29%205.11-5.11%205.11v-.01c-2.82%200-5.11-2.29-5.11-5.11S9.18%201.9%2012%201.9'/%3e%3c/svg%3e",vk=e=>X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},X.createElement("g",{fill:"#2571D6",clipPath:"url(#a)"},X.createElement("path",{d:"M13.085 7.331a1.096 1.096 0 1 0-2.192 0v9.316a1.096 1.096 0 0 0 2.192 0z"}),X.createElement("path",{d:"M16.647 10.893H7.33a1.096 1.096 0 1 0 0 2.192h9.316a1.096 1.096 0 0 0 0-2.192"}),X.createElement("path",{d:"M12 24C5.38 24 0 18.608 0 12S5.38 0 12 0s12 5.38 12 12-5.38 12-12 12m0-21.808c-5.414 0-9.808 4.394-9.808 9.808S6.586 21.808 12 21.808s9.808-4.394 9.808-9.808S17.403 2.192 12 2.192"})),X.createElement("defs",null,X.createElement("clipPath",{id:"a"},X.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),yk="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cg%20fill='%23404756'%20clip-path='url(%23a)'%3e%3cpath%20d='M13.789%2017H3.21C2.542%2017%202%2017.56%202%2018.25s.542%201.25%201.211%201.25H13.79c.669%200%201.211-.56%201.211-1.25S14.458%2017%2013.789%2017M20.718%204H3.282C2.574%204%202%204.56%202%205.25S2.574%206.5%203.282%206.5h17.436C21.426%206.5%2022%205.94%2022%205.25S21.426%204%2020.718%204M20.718%2010.5H3.282C2.574%2010.5%202%2011.06%202%2011.75S2.574%2013%203.282%2013h17.436c.708%200%201.282-.56%201.282-1.25s-.574-1.25-1.282-1.25'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='%23fff'%20d='M0%200h24v24H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",bk=e=>X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},X.createElement("path",{fill:"#2571D6",fillRule:"evenodd",d:"M17.333 11a6.34 6.34 0 0 1 6.334 6.333 6.34 6.34 0 0 1-6.334 6.334c-3.493 0-6.333-2.846-6.333-6.334A6.343 6.343 0 0 1 17.333 11m-.005 2.37c-.437 0-.79.338-.79.754v2.412h-2.414c-.416 0-.754.355-.754.792s.338.792.754.792h2.413v2.412c0 .416.354.754.791.754s.792-.338.792-.754V18.12h2.413c.416 0 .754-.355.754-.792s-.338-.792-.754-.792H18.12v-2.412c0-.416-.355-.754-.792-.754",clipRule:"evenodd"}),X.createElement("path",{fill:"#2571D6",d:"M11.12 12.297a7.97 7.97 0 0 0-1.787 5.036c0 1.763.571 3.392 1.537 4.714H3.044c-.84 0-1.523-.682-1.523-1.523 0-4.544 3.683-8.227 8.217-8.227zM10.995.139c2.925 0 5.3 2.376 5.3 5.3s-2.376 5.3-5.3 5.3v-.01a5.303 5.303 0 0 1-5.3-5.3 5.295 5.295 0 0 1 5.3-5.29"}));var Ho={},_h;function _k(){if(_h)return Ho;_h=1;var e=st();Object.defineProperty(Ho,"__esModule",{value:!0}),Ho.default=void 0;var t=e(dt()),r=ct();return Ho.default=(0,t.default)((0,r.jsx)("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward"),Ho}var xk=_k();const xh=ot(xk);var Yo={},wh;function wk(){if(wh)return Yo;wh=1;var e=st();Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.default=void 0;var t=e(dt()),r=ct();return Yo.default=(0,t.default)((0,r.jsx)("path",{d:"M16.53 11.06 15.47 10l-4.88 4.88-2.12-2.12-1.06 1.06L10.59 17zM19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V8h14z"}),"EventAvailable"),Yo}var Sk=wk();const Ck=ot(Sk);var qo={},Sh;function Ek(){if(Sh)return qo;Sh=1;var e=st();Object.defineProperty(qo,"__esModule",{value:!0}),qo.default=void 0;var t=e(dt()),r=ct();return qo.default=(0,t.default)((0,r.jsx)("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z"}),"KeyboardArrowRight"),qo}var kk=Ek();const Dk=ot(kk);var Zo={},Ch;function Tk(){if(Ch)return Zo;Ch=1;var e=st();Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.default=void 0;var t=e(dt()),r=ct();return Zo.default=(0,t.default)((0,r.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack"),Zo}var Ik=Tk();const Yc=ot(Ik);var Go={},Eh;function Ak(){if(Eh)return Go;Eh=1;var e=st();Object.defineProperty(Go,"__esModule",{value:!0}),Go.default=void 0;var t=e(dt()),r=ct();return Go.default=(0,t.default)((0,r.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle"),Go}var Mk=Ak();const Ki=ot(Mk),Pk=e=>{const t=["brown","purple","orange","blue","green","yellow","red","grey"],r=e.charCodeAt(0)%t.length;return t[r]},Ok=(e,t)=>{const r="#1976D2";if(t)return u.jsxs(u.Fragment,{children:[u.jsx(Ki,{fontSize:"small",sx:{mr:.5,color:r}}),u.jsx(g.Typography,{variant:"body2",sx:{color:r,fontWeight:"bold"},children:"Anfitrión"})]});switch(e){case"pending":return u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",color:"grey.700"},children:[u.jsx(jo,{fontSize:"small",sx:{mr:.5}}),u.jsx(g.Typography,{variant:"body2",children:"Pendiente"})]});case"confirmed":return u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",color:"success.main"},children:[u.jsx(Ki,{fontSize:"small",sx:{mr:.5}}),u.jsx(g.Typography,{variant:"body2",children:"Asistiré"})]});default:return u.jsx(g.Typography,{variant:"body2",children:"No respondió"})}};function jk({open:e,handleClose:t,guests:r}){const n=r.filter(i=>i.status==="confirmed"||i.isHost),o=r.filter(i=>i.status==="pending"&&!i.isHost),s=i=>u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",py:1.5},children:[u.jsx(g.Avatar,{sx:{bgcolor:Pk(i.initials),mr:2},children:i.initials}),u.jsx(g.Box,{sx:{flexGrow:1},children:u.jsx(g.Typography,{variant:"body1",children:i.name})}),Ok(i.status,i.isHost)]},i.name);return u.jsxs(g.Dialog,{open:e,onClose:t,fullWidth:!0,maxWidth:"xs",children:[u.jsxs(g.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",p:2},children:[u.jsx(g.IconButton,{onClick:t,children:u.jsx(Yc,{})}),u.jsx(g.Typography,{variant:"h6",children:"Lista de invitados"}),u.jsx(g.IconButton,{onClick:t,children:u.jsx(Ur,{})})]}),u.jsx(g.Divider,{}),u.jsxs(g.DialogContent,{dividers:!0,children:[o.length>0&&u.jsxs(g.Box,{sx:{mb:2},children:[u.jsxs(g.Typography,{variant:"subtitle2",sx:{fontWeight:"bold"},children:["Pendiente (",o.length,")"]}),o.map(i=>s(i))]}),n.length>0&&u.jsxs(g.Box,{children:[u.jsxs(g.Typography,{variant:"subtitle2",sx:{fontWeight:"bold",mb:1},children:["Confirmados (",n.length,")"]}),n.map(i=>s(i))]})]})]})}const Rk=e=>{const t=["brown","purple","orange","blue","green","yellow","red","grey"],r=e.charCodeAt(0)%t.length;return t[r]};function Nk({guests:e}){const[t,r]=v.useState(!1),n=()=>r(!0),o=()=>r(!1);return console.log(e),u.jsxs(u.Fragment,{children:[u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",py:1,borderBottom:"1px solid #eee"},children:[u.jsx(g.AvatarGroup,{max:6,sx:{"& .MuiAvatar-root":{width:32,height:32,fontSize:14}},children:e.map((s,i)=>u.jsx(g.Tooltip,{title:s.name,arrow:!0,placement:"right",children:u.jsxs(g.Avatar,{sx:{bgcolor:Rk(s.initials),position:"relative"},children:[s.initials,s.status==="pending"&&u.jsx(g.Box,{sx:{position:"absolute",bottom:-1,right:1,bgcolor:"gray",borderRadius:"50%",p:.2},children:u.jsx(jo,{sx:{fontSize:14,color:"white"}})})]})},i))}),u.jsx(g.Box,{sx:{flexGrow:1}}),u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",cursor:"pointer",color:"primary.main"},onClick:n,children:[u.jsx(g.Typography,{variant:"body2",sx:{fontWeight:"bold"},children:"Ver invitados"}),u.jsx(Dk,{fontSize:"small"})]})]}),u.jsx(jk,{open:t,handleClose:o,guests:e})]})}const $k=e=>new Date(e+"T00:00:00").toLocaleDateString("es-ES",{day:"numeric",month:"short"}).replace(".",""),kh=e=>{const[t,r]=e.split(":"),n=parseInt(t),o=n>=12?"pm":"am";return`${n%12||12}:${r} ${o}`},Lk=({slot:e,onClick:t})=>u.jsxs(g.Box,{onClick:t,sx:{cursor:"pointer",borderRadius:"12px",overflow:"hidden",border:"1px solid #e0e0e0",textAlign:"center",transition:"0.2s","&:hover":{transform:"translateY(-3px)",boxShadow:2}},children:[u.jsx(g.Box,{sx:{bgcolor:"#333",color:"white",py:.2},children:u.jsx(g.Typography,{variant:"body2",sx:{fontWeight:"bold",textTransform:"capitalize"},children:$k(e.Fecha)})}),u.jsxs(g.Box,{sx:{bgcolor:"white",color:"black",py:1},children:[u.jsx(g.Typography,{variant:"body2",children:kh(e.HoraInicio)}),u.jsxs(g.Typography,{variant:"body2",color:"text.secondary",children:["a ",kh(e.HoraFin)]})]})]});function zk({open:e,handleClose:t,suggestions:r,onSelectSlot:n}){const o=r.reduce((i,a)=>{const c=a.Fecha;return i[c]||(i[c]=[]),i[c].push(a),i},{}),s=Object.keys(o);return u.jsxs(g.Dialog,{open:e,onClose:t,fullWidth:!0,maxWidth:"sm",children:[u.jsxs(g.Box,{sx:{p:2},children:[u.jsx(g.Typography,{variant:"subtitle1",sx:{fontWeight:"bold"},children:"Selecciona un nuevo horario"}),u.jsx(g.Button,{startIcon:u.jsx(Yc,{}),onClick:t,sx:{textTransform:"none",color:"text.secondary",p:0},children:"Volver al evento"})]}),u.jsx(g.Divider,{}),u.jsx(g.DialogContent,{sx:{px:3,py:2},children:s.map((i,a)=>u.jsxs(g.Box,{sx:{mb:4},children:[u.jsxs(g.Typography,{variant:"subtitle2",sx:{fontWeight:"bold",mb:2,display:"flex",alignItems:"center",color:a===0?"#1976d2":"text.primary"},children:[a===0?"Mismo día":"Próximas fechas",a===0&&u.jsx(Ki,{sx:{ml:1,fontSize:18}})]}),u.jsx(g.Grid,{container:!0,spacing:2,children:o[i].map((c,l)=>u.jsx(g.Grid,{item:!0,xs:6,sm:4,children:u.jsx(Lk,{slot:c,onClick:()=>n(c)})},`${i}-${l}`))})]},i))})]})}var Ko={},Dh;function Bk(){if(Dh)return Ko;Dh=1;var e=st();Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.default=void 0;var t=e(dt()),r=ct();return Ko.default=(0,t.default)((0,r.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group"),Ko}var Fk=Bk();const Vk=ot(Fk),Uk=e=>{const t=["brown","purple","orange","blue","green","yellow","red","grey"],r=e.charCodeAt(0)%t.length;return t[r]};function Wk({onSelectGuest:e,availableSuggestions:t,onInputTextChange:r}){const[n,o]=v.useState(null),[s,i]=v.useState(""),a=(l,d)=>{d?(e(d),o(null),i("")):(o(null),i(""))},c=(l,d)=>{i(d),r(d)};return u.jsx(g.Autocomplete,{options:t,value:n,inputValue:s,getOptionLabel:l=>l.email,onChange:a,onInputChange:c,isOptionEqualToValue:(l,d)=>l.email===d.email,disablePortal:!0,noOptionsText:"Sin resultados",renderInput:l=>u.jsx(g.TextField,{...l,placeholder:"Agregar invitados...",variant:"outlined",size:"small",InputProps:{...l.InputProps,startAdornment:u.jsx(g.Box,{sx:{ml:1,display:"flex",alignItems:"center"},children:u.jsx(Vk,{color:"action"})}),disableUnderline:!0}}),renderOption:(l,d)=>v.createElement(g.Box,{component:"li",...l,key:d.email,sx:{py:1,"& > img":{mr:2,flexShrink:0}}},u.jsx(g.Avatar,{sx:{bgcolor:Uk(d.initials),mr:2,width:32,height:32,fontSize:14},children:d.initials}),u.jsx(g.Typography,{children:d.name}))},"guest-autocomplete-field")}var Qo={},Th;function Hk(){if(Th)return Qo;Th=1;var e=st();Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.default=void 0;var t=e(dt()),r=ct();return Qo.default=(0,t.default)((0,r.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),Qo}var Yk=Hk();const qc=ot(Yk),qk=e=>e.hasConflict?{icon:u.jsx(qc,{sx:{fontSize:20}}),fillColor:"#F0A290",iconColor:"#D9981E",textColor:"#000000",variant:"filled"}:{icon:u.jsx(Ki,{sx:{fontSize:20,margin:"0px"}}),fillColor:"#F0ECEB",iconColor:"#D9981E",textColor:"#000000",variant:"filled"},Zk=e=>{const t=["brown","purple","orange","blue","green","yellow","red","grey"],r=e.charCodeAt(0)%t.length;return t[r]};function Gk({guests:e,conflictCount:t,onViewSuggestions:r,onDeleteGuest:n}){const o=i=>()=>{n(i)};console.log("listaChio",e);const s=i=>i?i.trim().split(/\s+/).slice(0,2).join(" "):"";return u.jsxs(g.Box,{sx:{p:1},children:[u.jsx(g.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:e.map((i,a)=>{const c=qk(i),l=Zk(i.initials);return u.jsx(g.Chip,{label:u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center"},children:[u.jsx(g.Typography,{variant:"body2",component:"span",sx:{color:c.textColor,margin:"5px",fontSize:"13px"},children:s(i?.name)}),u.jsx(g.Box,{className:"status-icon-wrapper",sx:{display:"flex",alignItems:"flex-end",ml:.5},children:c.icon})]}),avatar:u.jsx(g.Avatar,{sx:{bgcolor:l},children:i.initials}),sx:{backgroundColor:c.fillColor,borderStyle:"none",paddingRight:"0px",paddingLeft:"0px","& .MuiChip-deleteIcon":{visibility:"hidden",color:c.textColor},"&:hover .MuiChip-deleteIcon":{visibility:"visible"},"& .MuiChip-avatar":{color:"white"},"& .MuiChip-label":{display:"flex",paddingLeft:"5px",paddingRight:"0px",alignItems:"center",width:"100%"},"&:hover .status-icon-wrapper":{visibility:"hidden"}},variant:c.variant,onClick:()=>console.log(`Clic en ${i.name}`),onDelete:o(i.name)},a)})}),t>0&&u.jsxs(g.Box,{sx:{mt:2,p:1},children:[u.jsxs(g.Typography,{color:"error",sx:{display:"flex",alignItems:"center",fontSize:"14px"},children:[u.jsx(qc,{sx:{mr:1}}),"Se detectó un conflicto de agenda con ",t," invitado",t!==1?"s":""]}),u.jsx(g.Link,{component:"button",variant:"body2",onClick:r,sx:{mt:.5,textDecoration:"none"},children:"Ver sugerencias de horario"})]})]})}function Kk(e,t){const[r,n]=v.useState(e);return v.useEffect(()=>{const o=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(o)}},[e,t]),r}const Qk={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:{xs:"90%",sm:450,md:500},bgcolor:"background.paper",boxShadow:24,p:{xs:2,sm:3},borderRadius:2,maxHeight:"90vh",overflowY:"auto"},Ih=["#dbe3fe","#fcebc7","#d9f1d2","#fdf5d1","#ebe3d7","#e1d6fb","#f7c7cc","#f9e7fb","#eaedf2","#d5d8dd"],Xk=()=>{const e=[];for(let t=0;t<24;t++)for(let r=0;r<60;r+=15){const n=t.toString().padStart(2,"0"),o=r.toString().padStart(2,"0");e.push(`${n}:${o}`)}return e},Ah=[],Zn=Xk(),Xo=(e,t)=>{if(!e||!t)return null;const r=e.split("-");if(r.length!==3)return null;const n=parseInt(r[0],10),o=parseInt(r[1],10)-1,s=parseInt(r[2],10),i=t.split(":");if(i.length!==2)return null;const a=parseInt(i[0],10),c=parseInt(i[1],10),l=new Date(s,o,n,a,c);return isNaN(l.getTime())||!_.isValid(l)?null:l},Jk=({isVisible:e,onClose:t,onSave:r,onDelete:n,selectedDate:o,initialEvent:s,userId:i,masNombreBD:a,disId:c})=>{const[l,d]=v.useState(!1),[f,p]=v.useState(!1),y=_.format(new Date,"yyyy-MM-dd"),[m,h]=v.useState(""),[b,S]=v.useState([]),[C,D]=v.useState(!1),k=wc(),[w,B]=v.useState([]),[E,I]=v.useState(""),[P,A]=v.useState(Ah),[W,q]=v.useState(!1),[F,Z]=v.useState(""),[le,V]=v.useState(!1),[ee,ue]=v.useState([]),[ye,L]=v.useState([]),te=Kk(F,300),J=P.filter(Q=>Q.hasConflict).length,{control:H,handleSubmit:K,reset:ae,formState:{errors:ce,isValid:me},watch:ge,setValue:fe}=_p({resolver:XC(pk),defaultValues:{titulo:s?.titulo||"",fechaInicio:_.format(new Date,"yyyy-MM-dd"),horaInicio:_.format(new Date,"HH:mm"),horaFin:_.format(_.addHours(new Date,1),"HH:mm"),todoElDia:!1,client:s?.client||null,repetir:"No repetir",link:s?.link||"",descripcion:s?.descripcion||"",solID:s?.solID??null,invitados:[]},mode:"onChange"}),he=ge("fechaInicio"),Pe=ge("fechaFin"),N=ge("todoElDia");v.useEffect(()=>{if(m.trim()===""||!i||!c||!a){S([]),B([]),fe("solID",null),D(!1),I("");return}D(!0);const Q=setTimeout(()=>{k.getClients(m,c,a,i).then(de=>{if(D(!1),de){const Te=de.map(lt=>lt.solID);B([...new Set(Te)])}else B([]);const ke=Array.from(new Map(de.map(Te=>[Te.nombreCliente,Te])).values());if(ke.length>0)S(ke),I("");else if(s?.client&&s.solID!==null){const Te=[{solID:s.solID,nombreCliente:s.client}];S(Te),I("Sin resultados")}else S([]),I("Sin resultados")}).catch(de=>{console.error("Error al buscar clientes:",de),D(!1)})},500);return()=>clearTimeout(Q)},[m,i,c,a]),v.useEffect(()=>{if(he&&Pe){const Q=new Date(he),de=new Date(Pe);(Q===de||Q>de)&&fe("fechaFin",he)}},[he,Pe,fe]),v.useEffect(()=>{he&&fe("fechaFin",he)},[he]),v.useEffect(()=>{fe("showEndDate",l)},[l,fe]),v.useEffect(()=>{if(s){const Q=_.format(s.fechaInicio,"yyyy-MM-dd")===_.format(s.fechaFin,"yyyy-MM-dd");if(d(!Q),fe("titulo",s?.titulo),fe("fechaInicio",_.format(s.fechaInicio,"yyyy-MM-dd")),fe("fechaFin",_.format(s.fechaFin,"yyyy-MM-dd")),fe("horaInicio",_.format(s.fechaInicio,"HH:mm")),fe("horaFin",_.format(s.fechaFin,"HH:mm")),fe("horaInicio2",_.format(s.fechaFin,"HH:mm")),fe("descripcion",s.descripcion),fe("link",s.link),fe("repetir","false"),fe("color",s.color),fe("todoElDia",s.todoElDia),fe("solID",s.solID),fe("client",s.client),console.log("initialEvent.invitados",s.invitados),s.invitados&&s.invitados.length>0){const de=s.invitados.map(ke=>({name:ke.usrNombre,email:ke.correo,initials:ke.correo.charAt(0).toUpperCase().substring(0,2),usrID:ke.usuarioID??null,isHost:ke.esOrganizador,status:ke.statusInvitacion==="CONFIRMADO"?"confirmed":"pending",hasConflict:!1,disID:ke.disID}));A(de)}else A(Ah);s.solID?p(!0):p(!1)}else{const Q=o||new Date,de=new Date,ke=new Date(Q.getFullYear(),Q.getMonth(),Q.getDate(),de.getHours(),de.getMinutes()),Te=_.addHours(ke,1);ae({titulo:"",fechaInicio:_.format(ke,"yyyy-MM-dd"),horaInicio:_.format(ke,"HH:mm"),fechaFin:_.format(Te,"yyyy-MM-dd"),horaFin:_.format(Te,"HH:mm"),horaInicio2:_.format(Te,"HH:mm"),todoElDia:!1,client:"",repetir:"No repetir",link:"",descripcion:"",color:Ih[0],solID:null}),d(!1),p(!1)}},[s,e,o]);const Ve=Q=>({UsuarioID:Q.usrID??null,Correo:Q.email,EsOrganizador:Q.usrID==i,StatusInvitacion:"PENDIENTE",disID:c??null}),et=K(Q=>{const de=P.map(Te=>Ve(Te)),ke={...Q,invitados:de};r(ke,s?.eventoID),t(),ae(),d(!1)},Q=>{console.log("Errores de validación:",Q)});v.useEffect(()=>{N&&(fe("horaInicio","00:00"),fe("horaFin","23:59"))},[N,fe,ge]);const Ue=()=>{const Q=ge("fechaInicio");if(Q){const de=new Date(`${Q}T00:00:00`),ke=_.addDays(de,1);fe("fechaFin",_.format(ke,"yyyy-MM-dd"))}d(!0)},Ae=ge("fechaInicio"),Be=ge("horaInicio"),pt=ge("fechaFin"),rt=ge("horaFin"),[x,M]=v.useState(null),[j,re]=v.useState(null);v.useEffect(()=>{(x===null||x!==Be)&&M(Be)},[Be,x]),v.useEffect(()=>{(j===null||j!==rt)&&re(rt??"")},[rt,j]);const se=ge("todoElDia");v.useEffect(()=>{if(se||!Be||!rt||!Ae||!pt)return;const Q=Xo(Ae,Be),de=Xo(pt,rt);if(!Q||!de||!_.isValid(Q)||!_.isValid(de))return;const ke=_.isSameDay(Q,de),Te=ke&&(_.isAfter(Q,de)||Q.getTime()===de.getTime()),lt=_.isBefore(de,Q)&&!ke;(Te||lt)&&(fe("horaFin",""),re(""))},[Be,Ae]);const O=v.useMemo(()=>{if(!Be||!Ae)return Zn;const Q=Xo(Ae,Be),de=Xo(pt,"00:00");return!Q||!de||!_.isValid(Q)||!_.isValid(de)||_.isBefore(de,Q)&&!_.isSameDay(de,Q)?Zn:_.isSameDay(Q,de)?Zn.filter(ke=>{const Te=Xo(pt,ke);return Te&&_.isAfter(Te,Q)}):(_.isAfter(de,Q),Zn)},[Be,Ae,pt]),ne=v.useMemo(()=>Zn,[]),we=async Q=>{const de=P.some(cr=>cr.email===Q.email);if(V(!0),de)return;const ke=c,Te=Q.email,lt=Q.usrID,Bt=Ae,on=Be,Yt=rt;if(!ke||!Te||!Bt||!on||!Yt){A(cr=>[...cr,{...Q,status:"pending",isHost:!1,hasConflict:!1,usrID:lt,name:Q.name}]);return}let $r;try{$r=await k.VerificarConflicto(ke,Te,Bt,on+":00",Yt+":00")}catch{$r={TieneConflicto:!1,usrMail:Q.email}}const sn={...Q,status:"pending",isHost:!1,hasConflict:String($r.TieneConflicto).toLowerCase()!=="False"};if(sn.hasConflict){const cr=await k.getDisponibilidadUsuario(c,Te,Bt,"60");ue(cr)}A(cr=>[...cr,sn])},De=Q=>{A(de=>de.filter(ke=>ke.name!==Q)),console.log(`Invitado eliminado: ${Q}`)},R=()=>{q(!1)},ie=Q=>{const Te=(Q.usrNombre??"").split(" ").map(lt=>lt.charAt(0)).join("").toUpperCase().substring(0,2);return{name:Q.usrNombre??"",email:Q.usrMail??"",initials:Te,usrID:Q.usrID??0,status:"pending",hasConflict:!1,isHost:!1}};v.useEffect(()=>{te.length>2&&c?(async()=>{const ke=(await k.getUsuariosInvitados(c,te)).map(ie).filter(Te=>!P.some(lt=>lt.email===Te.email));console.log("sugerencias",ke),L(ke)})():L([])},[te,P]);const Se=Q=>{Z(Q)},qe=async Q=>{try{const{Fecha:de,HoraInicio:ke,HoraFin:Te}=Q;console.log("Actualizando evento con:",{nuevaFecha:de,nuevaHoraInicio:ke,nuevaHoraFin:Te}),R()}catch(de){console.error("Error al reprogramar el evento:",de)}};return u.jsx(u.Fragment,{children:u.jsx(g.Modal,{open:e,onClose:t,children:u.jsx("form",{onSubmit:et,children:u.jsxs(g.Box,{sx:Qk,children:[u.jsx(g.IconButton,{"aria-label":"close",onClick:t,sx:{position:"absolute",right:8,top:12},children:u.jsx(Ur,{})}),u.jsx(g.Typography,{variant:"h6",mb:2,children:s?.isGoogleEvent||s?.isOutlookEvent?u.jsxs(u.Fragment,{children:[u.jsx(Ck,{sx:{mr:1}}),s.titulo||"Evento de Google"]}):s?"Editar evento":"Agregar evento"}),u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsx(ar,{name:"titulo",control:H,render:({field:Q})=>u.jsx(g.TextField,{...Q,label:"Título",fullWidth:!0,variant:"outlined",size:"small",error:!!ce.titulo,helperText:ce.titulo?.message,inputProps:{maxLength:100},sx:{"& .MuiInputLabel-root.Mui-focused":{color:"black"},"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"black"},"& .MuiInputLabel-root":{backgroundColor:"transparent !important",padding:"0 !important"}}})})})}),u.jsxs("div",{className:`row g-2 ${l?"mb-1":"mb-2"}`,children:[u.jsx("div",{className:"col-12 col-md-4",children:u.jsx(ar,{name:"fechaInicio",control:H,render:({field:Q})=>u.jsx(g.TextField,{fullWidth:!0,...Q,type:"date",placeholder:"Fecha de inicio",size:"small",InputLabelProps:{shrink:!0},error:!!ce.fechaInicio,helperText:ce.fechaInicio?.message})})}),l?u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"col-md-3 d-none d-md-block"}),u.jsx("div",{className:"col-10 col-md-4",children:u.jsx(ar,{name:"fechaFin",control:H,render:({field:Q})=>u.jsx(g.TextField,{...Q,type:"date",placeholder:"Fecha de fin",fullWidth:!0,size:"small",InputLabelProps:{shrink:!0},inputProps:{min:he||y},error:!!ce.fechaFin,helperText:ce.fechaFin?.message})})}),!s&&u.jsx("div",{className:"col-2 col-md-1 d-flex align-items-start",children:u.jsx(g.IconButton,{onClick:()=>d(!1),sx:{fontSize:18},children:u.jsx(bh,{})})})]}):u.jsx("div",{className:"col-md-8"})]}),l&&u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12 d-flex justify-content-center",children:u.jsx(xh,{sx:{color:"#757575",my:1}})})}),u.jsxs("div",{className:"row g-2 mb-2",children:[u.jsx("div",{className:"col-12 col-md-4",children:u.jsx(ar,{name:"horaInicio",control:H,render:({field:{onChange:Q,value:de,...ke}})=>u.jsx(g.Autocomplete,{freeSolo:!0,options:ne,value:de||"",onChange:(Te,lt)=>Q(lt||""),onInputChange:(Te,lt)=>Q(lt),renderInput:Te=>u.jsx(g.TextField,{...Te,...ke,size:"small",error:!!ce.horaInicio,helperText:ce.horaInicio?.message,InputProps:{...Te.InputProps,endAdornment:u.jsx(g.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:u.jsx(jo,{})})}}),disabled:se})})}),!l&&u.jsx("div",{className:"col-1 d-flex align-items-center justify-content-center",style:{marginTop:ce.horaInicio?"5px":"0px"},children:u.jsx(xh,{sx:{color:"#757575"}})}),l&&u.jsx("div",{className:"col-md-3 d-none d-md-block"}),u.jsx("div",{className:"col-12 col-md-4",children:u.jsx(ar,{name:"horaFin",control:H,render:({field:{onChange:Q,value:de,...ke}})=>u.jsx(g.Autocomplete,{freeSolo:!0,options:O,value:de||"",onChange:(Te,lt)=>Q(lt||""),onInputChange:(Te,lt)=>Q(lt),renderInput:Te=>u.jsx(g.TextField,{...Te,...ke,size:"small",error:!!ce.horaFin,helperText:ce.horaFin?.message,InputProps:{...Te.InputProps,endAdornment:u.jsx(g.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:u.jsx(jo,{})})}}),disabled:se})})}),!l&&u.jsx("div",{className:"col-12 col-md-2 d-flex align-items-center",children:u.jsx(ar,{name:"todoElDia",control:H,render:({field:Q})=>u.jsx(g.FormControlLabel,{control:u.jsx(g.Checkbox,{checked:Q.value,onChange:de=>Q.onChange(de.target.checked)}),label:u.jsx("label",{style:{fontSize:"0.7rem",fontWeight:"normal"},children:"Todo el día"}),sx:{whiteSpace:"nowrap"}})})})]}),(!s?.isGoogleEvent||s?.isOutlookEvent)&&!l&&u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsxs(g.Button,{onClick:Ue,size:"small",sx:{textTransform:"none",fontSize:16},children:[u.jsx(vk,{}),"  Agregar fecha final"]})})}),(!s?.isGoogleEvent||s?.isOutlookEvent)&&u.jsx("div",{className:"row mb-2",children:u.jsxs("div",{className:"col-12",children:[!f&&u.jsxs(g.Button,{onClick:()=>p(!0),size:"small",sx:{textTransform:"none",fontSize:16},children:[u.jsx(bk,{}),"  Vincular cliente"]}),f&&u.jsxs("div",{className:"row g-2",children:[u.jsx("div",{className:"col-10 col-md-5",children:u.jsx(ar,{name:"client",control:H,render:({field:Q})=>u.jsx(g.Autocomplete,{options:b,loading:C,loadingText:"Buscando coincidencias...",getOptionLabel:de=>de.nombreCliente?.trim()||"",value:b.find(de=>de.nombreCliente===Q.value)||(Q.value&&typeof Q.value=="string"?{solID:-1,nombreCliente:Q.value}:null),noOptionsText:E,onInputChange:(de,ke)=>{h(ke)},onChange:(de,ke)=>{Q.onChange(ke?ke.nombreCliente:"")},renderInput:de=>u.jsx(g.TextField,{...de,placeholder:"Buscar cliente...",size:"small",InputProps:{...de.InputProps,startAdornment:u.jsx("img",{src:gk,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"5px"}}),endAdornment:u.jsxs(u.Fragment,{children:[C?u.jsx(g.CircularProgress,{color:"inherit",size:20}):null,de.InputProps.endAdornment]})}})})})}),u.jsx("div",{className:"col-10 col-md-5",children:u.jsx(ar,{name:"solID",control:H,render:({field:Q})=>u.jsx(g.Autocomplete,{options:w,noOptionsText:"Sin resultados",getOptionLabel:de=>de.toString(),value:Q.value??null,onChange:(de,ke)=>Q.onChange(ke),renderInput:de=>u.jsx(g.TextField,{...de,label:"#Registro",variant:"outlined",size:"small",sx:{"& .MuiInputLabel-root":{backgroundColor:"transparent !important",padding:"0 !important"}}}),disabled:!b.length})})}),u.jsx("div",{className:"col-2 d-flex align-items-center",children:u.jsx(g.IconButton,{onClick:()=>p(!1),sx:{fontSize:18},children:u.jsx(bh,{})})})]})]})}),u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsx(ar,{name:"link",control:H,render:({field:Q})=>u.jsx(g.TextField,{...Q,placeholder:" Agregar enlace de reunión",fullWidth:!0,variant:"outlined",size:"small",error:!!ce.link,helperText:ce.link?.message,InputProps:{startAdornment:u.jsx("img",{src:hk,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"8px"}})}})})})}),u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsx(ar,{name:"descripcion",control:H,render:({field:Q})=>u.jsx(g.TextField,{...Q,placeholder:" Agregar descripción aquí...",fullWidth:!0,multiline:!0,rows:3,inputProps:{maxLength:500},variant:"outlined",size:"small",InputProps:{startAdornment:u.jsx("img",{src:yk,width:20,style:{alignSelf:"flex-start",marginRight:"8px"}})}})})})}),u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsx(Wk,{onSelectGuest:we,availableSuggestions:ye,onInputTextChange:Se})})}),le&&u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsx(Gk,{guests:P,conflictCount:J,onViewSuggestions:()=>q(!0),onDeleteGuest:De})})}),s?.invitados&&u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsx(g.Box,{children:u.jsx(Nk,{guests:P})})})}),u.jsx(zk,{open:W,handleClose:R,suggestions:ee,onSelectSlot:qe}),u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexWrap:"wrap"},children:[u.jsx(mk,{}),Ih.map(Q=>u.jsx(ar,{name:"color",control:H,render:({field:de})=>u.jsx(g.IconButton,{onClick:()=>de.onChange(Q),sx:{width:24,height:24,borderRadius:"50%",bgcolor:Q,border:de.value===Q?"2px solid":"none",borderColor:de.value===Q?"primary.main":"transparent"}})},Q))]})})}),u.jsx("div",{className:"row",children:u.jsxs("div",{className:"col-12 d-flex justify-content-end gap-2",children:[s&&!s?.isGoogleEvent&&!s?.isOutlookEvent&&u.jsx(g.Button,{onClick:n,variant:"outlined",color:"error",sx:{textTransform:"none"},children:"Eliminar"}),u.jsx(g.Button,{onClick:t,variant:"outlined",sx:{textTransform:"none"},children:"Cancelar"}),u.jsx(g.Button,{onClick:et,variant:"contained",sx:{textTransform:"none"},disabled:!me,children:"Guardar"})]})})]})})})})},eD="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='48'%20height='49'%20fill='none'%3e%3cpath%20fill='%23E40B1C'%20d='M34.559%2048.077c-7.413%200-13.44-6.039-13.44-13.44s6.027-13.44%2013.44-13.44%2013.44%206.027%2013.44%2013.44c0%207.414-6.027%2013.44-13.44%2013.44'/%3e%3cpath%20fill='%23fff'%20d='M39.827%2029.346c.583.583.605%201.505.05%202.06l-3.218%203.219%203.219%203.218c.555.556.532%201.48-.051%202.062-.584.583-1.506.605-2.062.05l-3.218-3.218-3.218%203.218c-.556.555-1.478.533-2.061-.05s-.606-1.506-.05-2.062l3.217-3.218-3.218-3.218c-.555-.555-.533-1.478.05-2.061.583-.584%201.507-.606%202.063-.05l3.217%203.217%203.218-3.218c.556-.555%201.478-.533%202.062.05'/%3e%3cpath%20fill='%23404756'%20d='M30.367.078c1.112%200%202.001.868%202.001%201.954v1.195h.979c4.913%200%208.892%203.887%208.892%208.686v9.237a15.4%2015.4%200%200%200-4.424-1.691v-1.312H4.468V33.63c0%202.389%202%204.343%204.446%204.343H19.4a15.4%2015.4%200%200%200%201.676%204.343H8.892C3.979%2042.317%200%2038.43%200%2033.631V11.913c0-4.8%203.979-8.686%208.892-8.686h1V2.032c0-1.086.89-1.954%202.002-1.954s2%20.868%202%201.954v1.195h14.473V2.032c0-1.085.889-1.954%202-1.954'/%3e%3c/svg%3e",tD={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:400,bgcolor:"background.paper",boxShadow:24,p:4,borderRadius:2,textAlign:"center"},rD=({isOpen:e,onClose:t,onConfirm:r,title:n,message:o})=>u.jsx(g.Modal,{open:e,onClose:t,children:u.jsxs(g.Box,{sx:tD,children:[u.jsx("img",{src:eD}),u.jsx(g.Typography,{variant:"h6",component:"h2",sx:{mt:1},children:n}),u.jsx(g.Typography,{sx:{mt:2},children:o}),u.jsxs(g.Box,{sx:{mt:4,display:"flex",justifyContent:"center",gap:2},children:[u.jsx(g.Button,{variant:"outlined",onClick:t,sx:{textTransform:"none"},children:"Regresar"}),u.jsxs(g.Button,{variant:"contained",color:"error",onClick:r,sx:{textTransform:"none"},children:[u.jsx("span",{className:"icon-eliminar",children:"  "})," Eliminar"]})]})]})}),nD={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:450,bgcolor:"background.paper",boxShadow:24,p:2,borderRadius:2},oD=({isOpen:e,onClose:t,events:r,date:n,onEventClick:o})=>{if(!n)return null;const s=i=>{o(i),t()};return u.jsx(g.Modal,{open:e,onClose:t,children:u.jsxs(g.Box,{sx:nD,children:[u.jsxs(g.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1},children:[u.jsxs(g.Typography,{sx:{fontSize:"20px"},component:"h2",children:["Eventos del"," ",n.toLocaleDateString("es-ES",{weekday:"long",day:"numeric",month:"long"})]}),u.jsx(g.IconButton,{onClick:t,children:u.jsx(Ur,{})})]}),u.jsx(g.Divider,{}),u.jsx(g.List,{children:r.map(i=>u.jsx(g.ListItem,{disablePadding:!0,children:u.jsxs(g.ListItemButton,{onClick:()=>s(i),sx:{py:.5},children:[u.jsx(g.Box,{sx:{width:"15px",height:"15px",borderRadius:"50%",backgroundColor:i.color||"#ccc",mr:2,flexShrink:0,minWidth:"10px"}}),u.jsx(g.ListItemText,{primary:i.titulo,secondary:`${_.format(i.fechaInicio,"HH:mm")} - ${_.format(i.fechaFin,"HH:mm")}`,sx:{my:0,"& .MuiListItemText-primary":{display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"},"& .MuiListItemText-secondary":{display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",fontSize:"12px"}}})]})},i.eventoID))})]})})};var Jo={},Mh;function sD(){if(Mh)return Jo;Mh=1;var e=st();Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.default=void 0;var t=e(dt()),r=ct();return Jo.default=(0,t.default)((0,r.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),Jo}var iD=sD();const aD=ot(iD),cD="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23E40B1C'%20d='M20.36%204.14H16c0-1.65-1.35-3-3-3h-2c-1.65%200-3%201.35-3%203H3.64c-.55%200-1%20.45-1%201s.45%201%201%201h1.04l.84%2013.91a3%203%200%200%200%202.99%202.82h6.98c1.58%200%202.9-1.24%203-2.82l.84-13.91h1.04c.55%200%201-.45%201-1s-.45-1-1-1zm-9.36-1h2c.55%200%201%20.45%201%201h-4c0-.55.45-1%201-1m-.39%2014.9c0%20.55-.45%201-1%201s-1-.45-1-1V9.99c0-.55.45-1%201-1s1%20.45%201%201zm4.78%200c0%20.55-.45%201-1%201s-1-.45-1-1V9.99c0-.55.45-1%201-1s1%20.45%201%201z'/%3e%3c/svg%3e",lD="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23fff'%20d='M19.378%204.405a1.813%201.813%200%201%201%202.565%202.565L9.571%2019.342a1.813%201.813%200%200%201-2.565%200l-4.949-4.949a1.814%201.814%200%200%201%202.428-2.69l.137.126%203.666%203.666z'/%3e%3c/svg%3e",Ph=v.forwardRef(({id:e,message:t,variant:r},n)=>{const{closeSnackbar:o}=hs.useSnackbar(),s={success:{color:"#fff",icon:u.jsx("img",{width:25,src:lD,style:{borderRadius:"50%",backgroundColor:"#4caf50",color:"white",fontSize:"12px",padding:3}})},error:{color:"#f44336",icon:u.jsx(qc,{sx:{color:"#f44336"}})},info:{color:"#2196f3",icon:u.jsx(aD,{sx:{color:"#2196f3"}})},delete:{color:"#fff",icon:u.jsx("img",{src:cD,width:25,style:{borderRadius:"50%",backgroundColor:"#ffdfd4",color:"red",fontSize:"16px",padding:3}})}},i=s[r]||s.info;return u.jsx(hs.SnackbarContent,{ref:n,children:u.jsxs(g.Box,{sx:{backgroundColor:"white",color:"#333",padding:"8px 16px",borderRadius:"8px",boxShadow:"0 3px 10px rgba(0,0,0,0.2)",display:"flex",alignItems:"center",width:{xs:"90%",sm:"auto"},minWidth:"300px",borderLeft:`5px solid ${i.color}`},children:[u.jsx(g.Box,{sx:{mr:1.5},children:i.icon}),u.jsx(g.Typography,{variant:"body2",sx:{flexGrow:1},children:t}),u.jsx(g.IconButton,{size:"small",onClick:()=>o(e),children:u.jsx(Ur,{fontSize:"small"})})]})})}),Oh=v.createContext(void 0),uD=({children:e})=>{const[t,r]=v.useState([]),[n,o]=v.useState([]),[s,i]=v.useState(!1);return u.jsx(Oh.Provider,{value:{googleEvents:t,setGoogleEvents:r,outlookEvents:n,setOutlookEvents:o,isLoadingGoogleEvents:s,setIsLoadingGoogleEvents:i},children:e})},dD=()=>{const e=v.useContext(Oh);if(e===void 0)throw new Error("useEvents must be used within an EventsProvider");return e},fD=(e,t,r)=>{const n=e.start.dateTime?new Date(e.start.dateTime):e.start.date?new Date(e.start.date):new Date;let o=e.end.dateTime?new Date(e.end.dateTime):e.end.date?new Date(e.end.date):new Date;return e.end.date&&!e.end.dateTime&&o.setDate(o.getDate()-1),{eventoID:Math.abs(pD(e.id)),titulo:e.summary||"(Sin título)",descripcion:e.description,fechaInicio:n,fechaFin:o,todoElDia:!!(e.start.date&&!e.start.dateTime),color:"#4285F4",hasVideoCall:!!e.conferenceData,link:e.htmlLink,repetir:void 0,solID:null,disID:t,client:null,usrID:r,solicitudRelacionada:[],isGoogleEvent:!0}};function pD(e){let t=0;for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);t=(t<<5)-t+n,t|=0}return t}function hD(e){let t=0;for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);t=(t<<5)-t+n,t|=0}return t}const mD=(e,t,r)=>{const n=new Date(e.start.dateTime);let o=new Date(e.end.dateTime);e.isAllDay&&o.setDate(o.getDate()-1);let s="#0078D4";return console.log("outlookEvent",e),{eventoID:Math.abs(hD(e.id)),titulo:e?.summary||"(Sin título)",descripcion:e.body?.content||"",fechaInicio:n,fechaFin:o,todoElDia:e.isAllDay,color:s,hasVideoCall:!!e.onlineMeetingUrl,link:e.webLink,repetir:void 0,solID:null,disID:t,client:null,usrID:r,solicitudRelacionada:[],isGoogleEvent:!1,isOutlookEvent:!0}},gD=({userId:e,leads30Days:t,leads90Days:r,disId:n,masNombreBD:o})=>{const[s,i]=v.useState(new Date),[a,c]=v.useState([]),[l,d]=v.useState(!1),[f,p]=v.useState(null),[y,m]=v.useState(!1),[h,b]=v.useState(null),[S,C]=v.useState([]),{enqueueSnackbar:D}=hs.useSnackbar(),k=wc(),w=Ci(),B=vc(),[E,I]=v.useState(!1),[P,A]=v.useState([]),[W,q]=v.useState(null),{session:F,sessionoutlook:Z}=nc(),{googleEvents:le,setGoogleEvents:V,outlookEvents:ee,setOutlookEvents:ue}=dD(),[ye,L]=v.useState([]),te=(x,M)=>{A(x),q(M),I(!0)},J=v.useRef(null);v.useEffect(()=>{const x=async()=>{try{if(e){const M=await k.getEventsByUser(e);c(M)}}catch{console.log("No se pudieron cargar los eventos. Revisa la consola para más detalles.")}};return x(),J.current&&clearTimeout(J.current),J.current=setTimeout(()=>{x()},4e3),()=>{J.current&&clearTimeout(J.current)}},[s,e,le,ee]),v.useEffect(()=>{const x=new Date,M=_.startOfDay(x),j=_.endOfDay(_.addDays(M,6)),re={start:M,end:j},se=a.filter(O=>{const ne={start:O.fechaInicio,end:O.fechaFin};return Ld(ne,re)}).sort((O,ne)=>O.fechaInicio.getTime()-ne.fechaInicio.getTime());C(se)},[a]);const H=async x=>{console.log("verifica event",x);try{if(console.log("validacion id",x),x?.isGoogleEvent||x.isOutlookEvent)p(x),d(!0);else{const M=await k.getEventById(x.eventoID);p(M),d(!0)}}catch(M){console.error(M)}},K=()=>{d(!1),p(null)},ae=async(x,M)=>{let j,re;x.todoElDia?(j=new Date(`${x.fechaInicio}T${x.horaInicio}`),re=new Date(`${x.fechaInicio}T${x.horaFin}`)):(j=new Date(`${x.fechaInicio}T${x.horaInicio}`),re=x.fechaFin&&x.horaFin?new Date(`${x.fechaFin}T${x.horaFin}`):new Date(`${x.fechaInicio}T${x.horaFin}`));const se=_.format(j,"yyyy-MM-dd HH:mm:ss.SSS"),O=_.format(re,"yyyy-MM-dd HH:mm:ss.SSS");if(M){const we={...x,eventoID:M,fechaInicio:se,fechaFin:O,solID:x.solID??null,disID:n??null,client:x.client};try{const De=await k.updateEvent(we);var ne=a.map(R=>R.eventoID===De.eventoID?De:R);c(ne),D("El evento se ha actualizado correctamente.",{variant:"success"}),K()}catch{D("Error al actualizar Evento",{variant:"error"})}}else{console.log("formData",x);const we={...x,fechaInicio:se,fechaFin:O,todoElDia:x.todoElDia,solID:x.solID??null,disID:n??null,client:x.client};try{const De=await k.createEvent(we,e);c(R=>[...R,De]),D("El evento se ha creado con éxito",{variant:"success"}),K()}catch{D("Error al guardar Evento",{variant:"error"})}}if(e){const we=await k.getEventsByUser(e);c(we)}},ce=()=>{i(x=>new Date(x.getFullYear(),x.getMonth()-1,1))},me=()=>{i(x=>new Date(x.getFullYear(),x.getMonth()+1,1))},ge=()=>{m(!0)},fe=()=>{b(new Date),d(!0)},he=()=>alert("Sincronizar con Outlook Calendar"),Pe=x=>{x&&i(x)},N=x=>{b(x),d(!0),p(null)},Ve=async()=>{if(f)try{await k.deleteEvent(f.eventoID),c(a.filter(x=>x.eventoID!==f.eventoID)),D("El evento se ha eliminado de tu calendario",{content:(x,M)=>u.jsx(Ph,{id:x,message:String(M),variant:"delete"})})}catch{D("Error al eliminar Evento",{variant:"error"})}finally{K(),m(!1)}};v.useEffect(()=>{const x=[...a];if(le.length>0&&F.userEmail&&n&&e){const M=le.map(j=>fD(j,n,e));x.push(...M)}L(x)},[a,le]),v.useEffect(()=>{const x=[...a];if(ee.length>0&&Z.userEmail&&n&&e){const M=ee.map(j=>mD(j,n,e));x.push(...M)}L(x)},[a,ee]);const[et,Ue]=v.useState([]),[Ae,Be]=v.useState([]),pt=async x=>{if(F?.userEmail===null){console.warn("Faltan datos o calendarios para cargar eventos de Google."),V([]);return}const M=et.filter(j=>j.selected).map(j=>j.id);try{const j={disID:n,year:s.getFullYear(),month:s.getMonth()+1,usrMail:F?.userEmail,calendarIds:M};if(n){const re=await w.getGoogleEventsByMonth(j);console.log("eventstosGmail",re),V(re)}}catch(j){console.error("Error al obtener eventos de Google Calendar:",j),V([])}},rt=async x=>{if(Z?.userEmail===null){console.warn("Faltan datos o calendarios para cargar eventos de Outlook."),V([]);return}console.log("calendarId",x);const M=Ae.filter(j=>j.selected).map(j=>j.id);try{const j={disID:n,year:s.getFullYear(),month:s.getMonth()+1,usrMail:Z?.userEmail,calendarIds:M};if(n){const re=await B.getOutlookEventsByMonth(j);console.log("eventstosGmail",re),ue(re)}}catch(j){console.error("Error al obtener eventos de Google Calendar:",j),ue([])}};return n===void 0||e===void 0?u.jsx("div",{children:"Cargando configuración de usuario..."}):u.jsxs("div",{id:"Agenda",style:{height:"100%",width:"100%"},children:[u.jsx(Xv,{header:u.jsx(v2,{currentDate:s,onPrevMonth:ce,onNextMonth:me,onAddEvent:fe,onDateChange:Pe}),sidebar:u.jsx(xx,{onEventClick:H,upcomingEvents:S,onSyncOutlook:he,leads30Days:t,leads90Days:r,disID:n,usrID:e,onGoogleEvents:pt,onOutlookEvents:rt,onAddEvent:fe}),mainContent:u.jsx(Ax,{onSeeMoreClick:te,currentDate:s,events:ye,onDayClick:N,onEventClick:H})}),l&&u.jsx(Jk,{isVisible:l,onClose:K,onSave:ae,onDelete:ge,selectedDate:h,initialEvent:f,userId:e,masNombreBD:o,disId:n}),u.jsx(rD,{isOpen:y,onClose:()=>m(!1),onConfirm:Ve,title:"Eliminar evento",message:"¿De verdad deseas eliminar este evento? Esta acción no se puede deshacer."}),u.jsx(oD,{isOpen:E,onClose:()=>I(!1),events:P,date:W,onEventClick:H})]})},vD="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='22'%20height='22'%3e%3cpath%20fill='%23070c10'%20d='M18.575%203.172A10.829%2010.829%200%200%200%201.564%2016.284l-.028-.051L0%2021.843l5.739-1.506a10.7%2010.7%200%200%200%205.173%201.318%2010.83%2010.83%200%200%200%207.663-18.483m-7.658%2016.655a8.94%208.94%200%200%201-4.62-1.277l.041.023-.329-.194-3.405.894.908-3.321-.214-.34a8.9%208.9%200%200%201-1.376-4.782%209%209%200%201%201%209%209Zm4.935-6.736c-.27-.135-1.6-.789-1.848-.88s-.429-.135-.61.136-.7.879-.856%201.06-.316.2-.586.068a7.5%207.5%200%200%201-2.183-1.349l.007.007a8.2%208.2%200%200%201-1.483-1.842l-.02-.038c-.157-.27-.017-.417.118-.551s.271-.316.406-.473a1.9%201.9%200%200%200%20.267-.44v-.012a.5.5%200%200%200%20.05-.216.5.5%200%200%200-.074-.26c-.068-.135-.609-1.467-.834-2.009s-.444-.455-.609-.464-.338-.009-.519-.009a.99.99%200%200%200-.72.337%203.03%203.03%200%200%200-.947%202.2v.058a5.27%205.27%200%200%200%201.114%202.815v-.011a12.16%2012.16%200%200%200%204.553%204.053l.068.031a14%2014%200%200%200%201.434.539l.109.03a3.6%203.6%200%200%200%201.077.161%203.7%203.7%200%200%200%20.648-.057h-.023a2.8%202.8%200%200%200%201.819-1.274l.007-.012a2.2%202.2%200%200%200%20.19-.9%202.3%202.3%200%200%200-.034-.395v.014c-.067-.113-.248-.18-.519-.316Z'/%3e%3c/svg%3e",yD="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='25.085'%20height='18.5'%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='none'%20d='M0%200h25.085v18.5H0z'%20data-name='Rectángulo%204598'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23a)'%20data-name='Grupo%207946'%3e%3cpath%20d='M23.12%205.809V3.226a3.2%203.2%200%200%200-.068-.656l-3.141%202.21a7.8%207.8%200%200%201%203.209%201.032'%20data-name='Trazado%2013329'/%3e%3cpath%20d='M11.847%209.791c-.1.009-.2.023-.308.023a3.78%203.78%200%200%201-2.18-.688L.067%202.58A3.2%203.2%200%200%200%200%203.227V13.98a3.23%203.23%200%200%200%203.226%203.226h9.611a7.86%207.86%200%200%201-.99-7.414'%20data-name='Trazado%2013330'/%3e%3cpath%20d='M12.478%207.369%2021.92.737A3.2%203.2%200%200%200%2019.894%200H3.226a3.2%203.2%200%200%200-2.031.74l9.4%206.628a1.64%201.64%200%200%200%201.881%200'%20data-name='Trazado%2013331'/%3e%3cpath%20d='M23.356%208.407a5.914%205.914%200%201%200%200%208.364%205.92%205.92%200%200%200%200-8.364m-1.833%204.842a.54.54%200%200%201-1.081%200v-1.164l-2.513%202.516a.54.54%200%200%201-.765-.763l2.515-2.515h-1.167a.54.54%200%201%201%200-1.081h2.471a.54.54%200%200%201%20.54.54Z'%20data-name='Trazado%2013332'/%3e%3c/g%3e%3c/svg%3e";function Zc(e,t,r){return e.accessor?e.accessor(t,r):e.field?t?.[e.field]:t?.[e?.key||""]}function bD(e,t){const r=e??"",n=t??"";return r instanceof Date&&n instanceof Date?r.getTime()-n.getTime():typeof r=="number"&&typeof n=="number"?r-n:typeof r=="boolean"&&typeof n=="boolean"?Number(r)-Number(n):String(r).localeCompare(String(n),void 0,{numeric:!0,sensitivity:"base"})}function Gc(e,t,r=!0){return typeof e=="function"?e(t):e??r}function _D(e){return e.replace(/[^\d]/g,"")}function xD(e,t){return t}var es={},jh;function wD(){if(jh)return es;jh=1;var e=st();Object.defineProperty(es,"__esModule",{value:!0}),es.default=void 0;var t=e(dt()),r=ct();return es.default=(0,t.default)((0,r.jsx)("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61"}),"FilterAlt"),es}var SD=wD();const CD=ot(SD);var ts={},Rh;function ED(){if(Rh)return ts;Rh=1;var e=st();Object.defineProperty(ts,"__esModule",{value:!0}),ts.default=void 0;var t=e(dt()),r=ct();return ts.default=(0,t.default)((0,r.jsx)("path",{d:"M15.5 14h-.79l-.28-.27c1.2-1.4 1.82-3.31 1.48-5.34-.47-2.78-2.79-5-5.59-5.34-4.23-.52-7.79 3.04-7.27 7.27.34 2.8 2.56 5.12 5.34 5.59 2.03.34 3.94-.28 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"SearchRounded"),ts}var kD=ED();const DD=ot(kD);var rs={},Nh;function TD(){if(Nh)return rs;Nh=1;var e=st();Object.defineProperty(rs,"__esModule",{value:!0}),rs.default=void 0;var t=e(dt()),r=ct();return rs.default=(0,t.default)((0,r.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),rs}var ID=TD();const AD=ot(ID);var ns={},$h;function MD(){if($h)return ns;$h=1;var e=st();Object.defineProperty(ns,"__esModule",{value:!0}),ns.default=void 0;var t=e(dt()),r=ct();return ns.default=(0,t.default)((0,r.jsx)("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp"),ns}var PD=MD();const OD=ot(PD);function Lh(e){return e==="right"?"end":e==="center"?"center":"start"}function zh(e){const t=e.filter(r=>!r.width).length||1;return e.map(r=>typeof r.width=="number"?`${r.width}px`:typeof r.width=="string"?r.width:`minmax(0, ${1/t}fr)`).join(" ")}const jD=1060,Kc=(e,t)=>e.metrics.find(r=>String(r.label).toLowerCase()===t.toLowerCase())?.value??"";function RD({sections:e,detailColumns:t,summaryWidths:r=["1fr",120,120,150],minWidth:n=jD,getDetailColumns:o,onRowClick:s}){function c(d){if(typeof d=="number")return d;if(!d)return 0;const f=/^(\d+)\s*px$/.exec(d.trim());return f?Number(f[1]):/fr$/i.test(d)?160:0}function l(d){const f=d.reduce((m,h)=>m+c(h.width),0),p=Math.max(d.length-1,0)*16;return f+p+32}return u.jsx(g.Box,{sx:{border:"1px solid rgba(0,0,0,0.15)",overflow:"hidden",bgcolor:"background.paper",width:"100%"},children:u.jsxs(g.Box,{children:[u.jsx(g.Box,{sx:{display:"grid",gridTemplateColumns:r.map(d=>typeof d=="number"?`${d}px`:d).join(" "),columnGap:"16px",alignItems:"center",px:"16px",py:1,bgcolor:"#1E5BCE",color:"#fff",boxSizing:"border-box"},children:["Tipo","En Proceso","Finalizadas","Último seg."].map(d=>u.jsx(g.Typography,{sx:{fontSize:13,fontWeight:800},children:d},d))}),e.map((d,f)=>{const[p,y]=X.useState(!!d.initiallyOpen),m=f%2===1,h=o?o(d):t,b=Math.max(n,l(h));return u.jsxs(g.Box,{children:[u.jsxs(g.Box,{sx:{display:"grid",gridTemplateColumns:r.map(S=>typeof S=="number"?`${S}px`:S).join(" "),columnGap:"16px",alignItems:"center",px:"16px",py:1,bgcolor:m?"rgba(30,91,206,0.06)":"background.paper",borderTop:"1px solid rgba(0,0,0,0.08)","&:hover":{bgcolor:"rgba(30,91,206,0.12)"},boxSizing:"border-box",cursor:"pointer"},onClick:()=>y(S=>!S),children:[u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[u.jsx(g.IconButton,{size:"small",disableRipple:!0,children:p?u.jsx(OD,{}):u.jsx(AD,{})}),u.jsx(g.Typography,{sx:{fontWeight:700,fontSize:14,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:String(d.title),children:d.title})]}),u.jsx(g.Typography,{sx:{fontSize:13.5,fontWeight:800},children:Kc(d,"En Proceso")}),u.jsx(g.Typography,{sx:{fontSize:13.5,fontWeight:800},children:Kc(d,"Finalizadas")}),u.jsx(g.Typography,{sx:{fontSize:13.5,fontWeight:800},children:Kc(d,"Último seg.")})]}),u.jsx(g.Collapse,{in:p,unmountOnExit:!0,children:u.jsxs(g.Box,{sx:{overflowX:"auto","&::-webkit-scrollbar":{height:"5px"}},children:[u.jsx(g.Box,{sx:{minWidth:b,display:"grid",gridTemplateColumns:zh(h),columnGap:"16px",alignItems:"center",px:"16px",py:1,bgcolor:"rgba(30,91,206,0.18)",color:"#1a1a1a",borderTop:"1px solid rgba(0,0,0,0.12)",boxSizing:"border-box"},children:h.map(S=>u.jsx(g.Typography,{sx:{justifySelf:Lh(S.align),textAlign:S.align??"left",fontSize:12.5,fontWeight:800,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:S.header},S.key))}),(d.rows??[]).map((S,C)=>u.jsx(g.Box,{sx:{minWidth:b,display:"grid",gridTemplateColumns:zh(h),columnGap:"16px",alignItems:"center",px:"16px",py:1,bgcolor:C%2===0?"background.paper":"rgba(30,91,206,0.06)",borderTop:"1px solid rgba(0,0,0,0.06)","&:hover":{bgcolor:"rgba(30,91,206,0.12)"},boxSizing:"border-box",cursor:"pointer"},onClick:()=>s?.(S,d),children:h.map((D,k)=>{const w=D.accessor?D.accessor(S,C):D.field?S[D.field]:null;return u.jsx(g.Box,{sx:{justifySelf:Lh(D.align),textAlign:D.align??"left",minWidth:0},children:typeof w=="string"||typeof w=="number"?u.jsx(g.Typography,{sx:{fontSize:13,fontWeight:/^(estatus|seg|avance|nivel|asesor|fecha)$/i.test(D.key)?700:500,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:String(w),children:w}):w},D.key??k)})},S.id??C))]})})]},d.id)})]})})}var os={},Bh;function ND(){if(Bh)return os;Bh=1;var e=st();Object.defineProperty(os,"__esModule",{value:!0}),os.default=void 0;var t=e(dt()),r=ct();return os.default=(0,t.default)((0,r.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2m3.3 14.71L11 12.41V7h2v4.59l3.71 3.71z"}),"AccessTimeFilled"),os}var $D=ND();const LD=ot($D),zD=e=>e?new Date(e).toLocaleDateString("es-MX",{day:"2-digit",month:"short",year:"numeric"}).replace(".",""):"",BD=e=>{const t=`${e?.Nombre??""} ${e?.Apellido??""}`.trim();return t||(e?.IdAsesor?e?.Correo??"Usuario":"Sin asesor asignado")},FD=e=>{const t=(e||"").split(" ").filter(Boolean);return t.length>=2?(t[0][0]+t[1][0]).toUpperCase():(e?.[0]??"?").toUpperCase()};var ss={},Fh;function VD(){if(Fh)return ss;Fh=1;var e=st();Object.defineProperty(ss,"__esModule",{value:!0}),ss.default=void 0;var t=e(dt()),r=ct();return ss.default=(0,t.default)((0,r.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Create"),ss}var UD=VD();const WD=ot(UD),Qc=({current:e,total:t,color:r="#4caf50"})=>u.jsx("div",{style:{display:"flex",gap:"1px",width:"100%",height:"100%",justifyContent:"center"},children:Array.from({length:t}).map((n,o)=>u.jsx("div",{style:{width:"7px",height:"7px",borderRadius:"2px",backgroundColor:o<e?r:"#e0e0e0",display:"flex"}},o))});var is={},Vh;function HD(){if(Vh)return is;Vh=1;var e=st();Object.defineProperty(is,"__esModule",{value:!0}),is.default=void 0;var t=e(dt()),r=ct();return is.default=(0,t.default)((0,r.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),is}var YD=HD();const Uh=ot(YD),qD=e=>{const t=String(e??"").toLowerCase().trim();return t==="muy interesado"?{bg:"#E53935",color:"#FFFFFF"}:t==="interesado"?{bg:"#FB8C00",color:"#FFFFFF"}:t==="venta definitiva"?{bg:"#2E7D32",color:"#FFFFFF"}:t==="no sé"||t==="no se"?{bg:"#9E9E9E",color:"#FFFFFF"}:t==="algo interesado"?{bg:"#FFEB3B",color:"#000000"}:{bg:"transparent",color:"#2c2c2c"}},ZD=e=>{switch(parseInt(String(e??""),10)){case 1:return"Por Asignar";case 2:return"Solicitud Asignada";case 3:return"Solicitud asignada en proceso";case 4:return"Finalizadas sin Venta";case 5:return"Finalizadas con Venta";case 6:return"Rechazadas";case 7:return"Finalizada por sistema";case 8:return"";case 9:return"";case 10:return"Prospección";case 11:return"Interés Real";case 12:return"Proceso de Compra";case 13:return"";case 14:return"En espera de Unidad";case 15:return"Auto Facturado";case 16:return"";case 17:return"";case 18:return"Compró otra Marca";case 19:return"No comprará";default:return null}},GD=e=>{switch(parseInt(String(e??""),10)){case 1:return"Por asignar";case 2:return"Solicitud Asignada";case 3:return"En seguimiento";case 6:return"Rechazada";case 7:return"Finalizada sin enviar a Ventas";case 8:return"Finalizada enviado a Ventas";default:return null}},KD=e=>{switch(parseInt(String(e??""),10)){case 0:return"Sin asignar";case 1:return"Confirmado";case 2:return"Solicitud Asignada";case 3:return"En seguimiento";case 4:return"Confirmado";case 5:return"Finalizada";case 6:return"Rechazada";case 10:return"Reagendado";case 20:return"Seguimiento [Cita Finalizada]";case 30:return"Reenvio";case 40:return"Seguimiento [Mecanico]";case 50:return"Seguimiento";default:return null}};function QD(e){const t=new Date(e),r=t.toLocaleDateString("es-MX",{day:"2-digit",month:"short",year:"numeric"}),n=t.toLocaleTimeString("es-MX",{hour:"2-digit",minute:"2-digit"});return`${r.replace(".","")} • ${n}`}function XD(e){return e.replace(/<br\s*\/?>/gi,`
177
+ `)}m.write("payload.value = newResult;"),m.write("return payload;");const S=m.compile();return(k,C)=>S(p,k,C)};let s;const i=$i,a=!kp.jitless,l=a&&ow.value,d=t.catchall;let f;e._zod.parse=(p,m)=>{f??(f=n.value);const v=p.value;return i(v)?a&&l&&m?.async===!1&&m.jitless!==!0?(s||(s=o(t.shape)),p=s(p,m),d?Wp([],v,p,m,f,e):p):r(p,m):(p.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),p)}});function Yp(e,t,r,n){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const o=e.filter(s=>!Zn(s));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(s=>s.issues.map(i=>Sn(i,n,wn())))}),t)}const ZS=Q("$ZodUnion",(e,t)=>{Ct.init(e,t),ft(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),ft(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ft(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),ft(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>Bc(s.source)).join("|")})$`)}});const r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,s)=>{if(r)return n(o,s);let i=!1;const a=[];for(const c of t.options){const l=c._zod.run({value:o.value,issues:[]},s);if(l instanceof Promise)a.push(l),i=!0;else{if(l.issues.length===0)return l;a.push(l)}}return i?Promise.all(a).then(c=>Yp(c,o,e,s)):Yp(a,o,e,s)}}),GS=Q("$ZodIntersection",(e,t)=>{Ct.init(e,t),e._zod.parse=(r,n)=>{const o=r.value,s=t.left._zod.run({value:o,issues:[]},n),i=t.right._zod.run({value:o,issues:[]},n);return s instanceof Promise||i instanceof Promise?Promise.all([s,i]).then(([c,l])=>qp(r,c,l)):qp(r,s,i)}});function Hc(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Uo(e)&&Uo(t)){const r=Object.keys(t),n=Object.keys(e).filter(s=>r.indexOf(s)!==-1),o={...e,...t};for(const s of n){const i=Hc(e[s],t[s]);if(!i.valid)return{valid:!1,mergeErrorPath:[s,...i.mergeErrorPath]};o[s]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const o=e[n],s=t[n],i=Hc(o,s);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};r.push(i.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function qp(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),Zn(e))return e;const n=Hc(t.value,r.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}const KS=Q("$ZodEnum",(e,t)=>{Ct.init(e,t);const r=tw(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>sw.has(typeof o)).map(o=>typeof o=="string"?qn(o):o.toString()).join("|")})$`),e._zod.parse=(o,s)=>{const i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:r,input:i,inst:e}),o}}),QS=Q("$ZodLiteral",(e,t)=>{if(Ct.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?qn(r):r?qn(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,n)=>{const o=r.value;return e._zod.values.has(o)||r.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),r}}),XS=Q("$ZodTransform",(e,t)=>{Ct.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Dp(e.constructor.name);const o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(i=>(r.value=i,r));if(o instanceof Promise)throw new Wn;return r.value=o,r}});function Zp(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const JS=Q("$ZodOptional",(e,t)=>{Ct.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ft(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ft(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Bc(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>Zp(s,r.value)):Zp(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),eC=Q("$ZodNullable",(e,t)=>{Ct.init(e,t),ft(e._zod,"optin",()=>t.innerType._zod.optin),ft(e._zod,"optout",()=>t.innerType._zod.optout),ft(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Bc(r.source)}|null)$`):void 0}),ft(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),tC=Q("$ZodDefault",(e,t)=>{Ct.init(e,t),e._zod.optin="optional",ft(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>Gp(s,t)):Gp(o,t)}});function Gp(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const rC=Q("$ZodPrefault",(e,t)=>{Ct.init(e,t),e._zod.optin="optional",ft(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),nC=Q("$ZodNonOptional",(e,t)=>{Ct.init(e,t),ft(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>Kp(s,e)):Kp(o,e)}});function Kp(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const oC=Q("$ZodCatch",(e,t)=>{Ct.init(e,t),ft(e._zod,"optin",()=>t.innerType._zod.optin),ft(e._zod,"optout",()=>t.innerType._zod.optout),ft(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(i=>Sn(i,n,wn()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(s=>Sn(s,n,wn()))},input:r.value}),r.issues=[]),r)}}),sC=Q("$ZodPipe",(e,t)=>{Ct.init(e,t),ft(e._zod,"values",()=>t.in._zod.values),ft(e._zod,"optin",()=>t.in._zod.optin),ft(e._zod,"optout",()=>t.out._zod.optout),ft(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const s=t.out._zod.run(r,n);return s instanceof Promise?s.then(i=>Yi(i,t.in,n)):Yi(s,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(s=>Yi(s,t.out,n)):Yi(o,t.out,n)}});function Yi(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const iC=Q("$ZodReadonly",(e,t)=>{Ct.init(e,t),ft(e._zod,"propValues",()=>t.innerType._zod.propValues),ft(e._zod,"values",()=>t.innerType._zod.values),ft(e._zod,"optin",()=>t.innerType._zod.optin),ft(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(Qp):Qp(o)}});function Qp(e){return e.value=Object.freeze(e.value),e}const aC=Q("$ZodCustom",(e,t)=>{er.init(e,t),Ct.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(s=>Xp(s,r,n,e));Xp(o,r,n,e)}});function Xp(e,t,r,n){if(!e){const o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(Ho(o))}}class cC{constructor(){this._map=new Map,this._idmap=new Map}add(t,...r){const n=r[0];if(this._map.set(t,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,t)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function lC(){return new cC}const qi=lC();function uC(e,t){return new e({type:"string",...Te(t)})}function dC(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Te(t)})}function Jp(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Te(t)})}function fC(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Te(t)})}function pC(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Te(t)})}function hC(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Te(t)})}function mC(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Te(t)})}function gC(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Te(t)})}function vC(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Te(t)})}function yC(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Te(t)})}function bC(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Te(t)})}function _C(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Te(t)})}function xC(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Te(t)})}function wC(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Te(t)})}function SC(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Te(t)})}function CC(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Te(t)})}function EC(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Te(t)})}function DC(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Te(t)})}function kC(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Te(t)})}function TC(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Te(t)})}function IC(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Te(t)})}function AC(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Te(t)})}function MC(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Te(t)})}function PC(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Te(t)})}function OC(e,t){return new e({type:"string",format:"date",check:"string_format",...Te(t)})}function jC(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Te(t)})}function RC(e,t){return new e({type:"string",format:"duration",check:"string_format",...Te(t)})}function NC(e,t){return new e({type:"number",checks:[],...Te(t)})}function $C(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Te(t)})}function LC(e,t){return new e({type:"boolean",...Te(t)})}function zC(e){return new e({type:"unknown"})}function BC(e,t){return new e({type:"never",...Te(t)})}function eh(e,t){return new zp({check:"less_than",...Te(t),value:e,inclusive:!1})}function Wc(e,t){return new zp({check:"less_than",...Te(t),value:e,inclusive:!0})}function th(e,t){return new Bp({check:"greater_than",...Te(t),value:e,inclusive:!1})}function Yc(e,t){return new Bp({check:"greater_than",...Te(t),value:e,inclusive:!0})}function rh(e,t){return new rS({check:"multiple_of",...Te(t),value:e})}function nh(e,t){return new oS({check:"max_length",...Te(t),maximum:e})}function Zi(e,t){return new sS({check:"min_length",...Te(t),minimum:e})}function oh(e,t){return new iS({check:"length_equals",...Te(t),length:e})}function FC(e,t){return new aS({check:"string_format",format:"regex",...Te(t),pattern:e})}function VC(e){return new cS({check:"string_format",format:"lowercase",...Te(e)})}function UC(e){return new lS({check:"string_format",format:"uppercase",...Te(e)})}function HC(e,t){return new uS({check:"string_format",format:"includes",...Te(t),includes:e})}function WC(e,t){return new dS({check:"string_format",format:"starts_with",...Te(t),prefix:e})}function YC(e,t){return new fS({check:"string_format",format:"ends_with",...Te(t),suffix:e})}function Wo(e){return new pS({check:"overwrite",tx:e})}function qC(e){return Wo(t=>t.normalize(e))}function ZC(){return Wo(e=>e.trim())}function GC(){return Wo(e=>e.toLowerCase())}function KC(){return Wo(e=>e.toUpperCase())}function QC(e,t,r){return new e({type:"array",element:t,...Te(r)})}function XC(e,t,r){return new e({type:"custom",check:"custom",fn:t,...Te(r)})}function JC(e){const t=eE(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Ho(n,r.value,t._zod.def));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),r.issues.push(Ho(o))}},e(r.value,r)));return t}function eE(e,t){const r=new er({check:"custom",...Te(t)});return r._zod.check=e,r}function sh(e,t){try{var r=e()}catch(n){return t(n)}return r&&r.then?r.then(void 0,t):r}function tE(e,t){for(var r={};e.length;){var n=e[0],o=n.code,s=n.message,i=n.path.join(".");if(!r[i])if("unionErrors"in n){var a=n.unionErrors[0].errors[0];r[i]={message:a.message,type:a.code}}else r[i]={message:s,type:o};if("unionErrors"in n&&n.unionErrors.forEach(function(d){return d.errors.forEach(function(f){return e.push(f)})}),t){var c=r[i].types,l=c&&c[n.code];r[i]=Pc(i,t,r,o,l?[].concat(l,n.message):n.message)}e.shift()}return r}function rE(e,t){for(var r={};e.length;){var n=e[0],o=n.code,s=n.message,i=n.path.join(".");if(!r[i])if(n.code==="invalid_union"&&n.errors.length>0){var a=n.errors[0][0];r[i]={message:a.message,type:a.code}}else r[i]={message:s,type:o};if(n.code==="invalid_union"&&n.errors.forEach(function(d){return d.forEach(function(f){return e.push(f)})}),t){var c=r[i].types,l=c&&c[n.code];r[i]=Pc(i,t,r,o,l?[].concat(l,n.message):n.message)}e.shift()}return r}function nE(e,t,r){if(r===void 0&&(r={}),(function(n){return"_def"in n&&typeof n._def=="object"&&"typeName"in n._def})(e))return function(n,o,s){try{return Promise.resolve(sh(function(){return Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(i){return s.shouldUseNativeValidation&&Nc({},s),{errors:{},values:r.raw?Object.assign({},n):i}})},function(i){if((function(a){return Array.isArray(a?.issues)})(i))return{values:{},errors:Cp(tE(i.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};if((function(n){return"_zod"in n&&typeof n._zod=="object"})(e))return function(n,o,s){try{return Promise.resolve(sh(function(){return Promise.resolve((r.mode==="sync"?vw:yw)(e,n,t)).then(function(i){return s.shouldUseNativeValidation&&Nc({},s),{errors:{},values:r.raw?Object.assign({},n):i}})},function(i){if((function(a){return a instanceof Vc})(i))return{values:{},errors:Cp(rE(i.issues,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};throw new Error("Invalid input: not a Zod schema")}const oE=Q("ZodISODateTime",(e,t)=>{kS.init(e,t),xt.init(e,t)});function sE(e){return PC(oE,e)}const iE=Q("ZodISODate",(e,t)=>{TS.init(e,t),xt.init(e,t)});function aE(e){return OC(iE,e)}const cE=Q("ZodISOTime",(e,t)=>{IS.init(e,t),xt.init(e,t)});function lE(e){return jC(cE,e)}const uE=Q("ZodISODuration",(e,t)=>{AS.init(e,t),xt.init(e,t)});function dE(e){return RC(uE,e)}const mr=Q("ZodError",(e,t)=>{Vc.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>gw(e,r)},flatten:{value:r=>mw(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,$c,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,$c,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),fE=Bi(mr),pE=Fi(mr),hE=Vi(mr),mE=Ui(mr),gE=xw(mr),vE=ww(mr),yE=Sw(mr),bE=Cw(mr),_E=Ew(mr),xE=Dw(mr),wE=kw(mr),SE=Tw(mr),Mt=Q("ZodType",(e,t)=>(Ct.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),e.clone=(r,n)=>tn(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>fE(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>hE(e,r,n),e.parseAsync=async(r,n)=>pE(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>mE(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>gE(e,r,n),e.decode=(r,n)=>vE(e,r,n),e.encodeAsync=async(r,n)=>yE(e,r,n),e.decodeAsync=async(r,n)=>bE(e,r,n),e.safeEncode=(r,n)=>_E(e,r,n),e.safeDecode=(r,n)=>xE(e,r,n),e.safeEncodeAsync=async(r,n)=>wE(e,r,n),e.safeDecodeAsync=async(r,n)=>SE(e,r,n),e.refine=(r,n)=>e.check(mD(r,n)),e.superRefine=r=>e.check(gD(r)),e.overwrite=r=>e.check(Wo(r)),e.optional=()=>mh(e),e.nullable=()=>gh(e),e.nullish=()=>mh(gh(e)),e.nonoptional=r=>cD(e,r),e.array=()=>dh(e),e.or=r=>KE([e,r]),e.and=r=>XE(e,r),e.transform=r=>yh(e,rD(r)),e.default=r=>sD(e,r),e.prefault=r=>aD(e,r),e.catch=r=>uD(e,r),e.pipe=r=>yh(e,r),e.readonly=()=>pD(e),e.describe=r=>{const n=e.clone();return qi.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return qi.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return qi.get(e);const n=e.clone();return qi.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),ih=Q("_ZodString",(e,t)=>{Uc.init(e,t),Mt.init(e,t);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(FC(...n)),e.includes=(...n)=>e.check(HC(...n)),e.startsWith=(...n)=>e.check(WC(...n)),e.endsWith=(...n)=>e.check(YC(...n)),e.min=(...n)=>e.check(Zi(...n)),e.max=(...n)=>e.check(nh(...n)),e.length=(...n)=>e.check(oh(...n)),e.nonempty=(...n)=>e.check(Zi(1,...n)),e.lowercase=n=>e.check(VC(n)),e.uppercase=n=>e.check(UC(n)),e.trim=()=>e.check(ZC()),e.normalize=(...n)=>e.check(qC(...n)),e.toLowerCase=()=>e.check(GC()),e.toUpperCase=()=>e.check(KC())}),CE=Q("ZodString",(e,t)=>{Uc.init(e,t),ih.init(e,t),e.email=r=>e.check(dC(EE,r)),e.url=r=>e.check(gC(DE,r)),e.jwt=r=>e.check(MC(FE,r)),e.emoji=r=>e.check(vC(kE,r)),e.guid=r=>e.check(Jp(ah,r)),e.uuid=r=>e.check(fC(Gi,r)),e.uuidv4=r=>e.check(pC(Gi,r)),e.uuidv6=r=>e.check(hC(Gi,r)),e.uuidv7=r=>e.check(mC(Gi,r)),e.nanoid=r=>e.check(yC(TE,r)),e.guid=r=>e.check(Jp(ah,r)),e.cuid=r=>e.check(bC(IE,r)),e.cuid2=r=>e.check(_C(AE,r)),e.ulid=r=>e.check(xC(ME,r)),e.base64=r=>e.check(TC(LE,r)),e.base64url=r=>e.check(IC(zE,r)),e.xid=r=>e.check(wC(PE,r)),e.ksuid=r=>e.check(SC(OE,r)),e.ipv4=r=>e.check(CC(jE,r)),e.ipv6=r=>e.check(EC(RE,r)),e.cidrv4=r=>e.check(DC(NE,r)),e.cidrv6=r=>e.check(kC($E,r)),e.e164=r=>e.check(AC(BE,r)),e.datetime=r=>e.check(sE(r)),e.date=r=>e.check(aE(r)),e.time=r=>e.check(lE(r)),e.duration=r=>e.check(dE(r))});function gr(e){return uC(CE,e)}const xt=Q("ZodStringFormat",(e,t)=>{yt.init(e,t),ih.init(e,t)}),EE=Q("ZodEmail",(e,t)=>{yS.init(e,t),xt.init(e,t)}),ah=Q("ZodGUID",(e,t)=>{gS.init(e,t),xt.init(e,t)}),Gi=Q("ZodUUID",(e,t)=>{vS.init(e,t),xt.init(e,t)}),DE=Q("ZodURL",(e,t)=>{bS.init(e,t),xt.init(e,t)}),kE=Q("ZodEmoji",(e,t)=>{_S.init(e,t),xt.init(e,t)}),TE=Q("ZodNanoID",(e,t)=>{xS.init(e,t),xt.init(e,t)}),IE=Q("ZodCUID",(e,t)=>{wS.init(e,t),xt.init(e,t)}),AE=Q("ZodCUID2",(e,t)=>{SS.init(e,t),xt.init(e,t)}),ME=Q("ZodULID",(e,t)=>{CS.init(e,t),xt.init(e,t)}),PE=Q("ZodXID",(e,t)=>{ES.init(e,t),xt.init(e,t)}),OE=Q("ZodKSUID",(e,t)=>{DS.init(e,t),xt.init(e,t)}),jE=Q("ZodIPv4",(e,t)=>{MS.init(e,t),xt.init(e,t)}),RE=Q("ZodIPv6",(e,t)=>{PS.init(e,t),xt.init(e,t)}),NE=Q("ZodCIDRv4",(e,t)=>{OS.init(e,t),xt.init(e,t)}),$E=Q("ZodCIDRv6",(e,t)=>{jS.init(e,t),xt.init(e,t)}),LE=Q("ZodBase64",(e,t)=>{RS.init(e,t),xt.init(e,t)}),zE=Q("ZodBase64URL",(e,t)=>{$S.init(e,t),xt.init(e,t)}),BE=Q("ZodE164",(e,t)=>{LS.init(e,t),xt.init(e,t)}),FE=Q("ZodJWT",(e,t)=>{BS.init(e,t),xt.init(e,t)}),ch=Q("ZodNumber",(e,t)=>{Vp.init(e,t),Mt.init(e,t),e.gt=(n,o)=>e.check(th(n,o)),e.gte=(n,o)=>e.check(Yc(n,o)),e.min=(n,o)=>e.check(Yc(n,o)),e.lt=(n,o)=>e.check(eh(n,o)),e.lte=(n,o)=>e.check(Wc(n,o)),e.max=(n,o)=>e.check(Wc(n,o)),e.int=n=>e.check(lh(n)),e.safe=n=>e.check(lh(n)),e.positive=n=>e.check(th(0,n)),e.nonnegative=n=>e.check(Yc(0,n)),e.negative=n=>e.check(eh(0,n)),e.nonpositive=n=>e.check(Wc(0,n)),e.multipleOf=(n,o)=>e.check(rh(n,o)),e.step=(n,o)=>e.check(rh(n,o)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Ki(e){return NC(ch,e)}const VE=Q("ZodNumberFormat",(e,t)=>{FS.init(e,t),ch.init(e,t)});function lh(e){return $C(VE,e)}const UE=Q("ZodBoolean",(e,t)=>{VS.init(e,t),Mt.init(e,t)});function Qi(e){return LC(UE,e)}const HE=Q("ZodUnknown",(e,t)=>{US.init(e,t),Mt.init(e,t)});function uh(){return zC(HE)}const WE=Q("ZodNever",(e,t)=>{HS.init(e,t),Mt.init(e,t)});function YE(e){return BC(WE,e)}const qE=Q("ZodArray",(e,t)=>{WS.init(e,t),Mt.init(e,t),e.element=t.element,e.min=(r,n)=>e.check(Zi(r,n)),e.nonempty=r=>e.check(Zi(1,r)),e.max=(r,n)=>e.check(nh(r,n)),e.length=(r,n)=>e.check(oh(r,n)),e.unwrap=()=>e.element});function dh(e,t){return QC(qE,e,t)}const ZE=Q("ZodObject",(e,t)=>{qS.init(e,t),Mt.init(e,t),ft(e,"shape",()=>t.shape),e.keyof=()=>ph(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:uh()}),e.loose=()=>e.clone({...e._zod.def,catchall:uh()}),e.strict=()=>e.clone({...e._zod.def,catchall:YE()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>uw(e,r),e.safeExtend=r=>dw(e,r),e.merge=r=>fw(e,r),e.pick=r=>cw(e,r),e.omit=r=>lw(e,r),e.partial=(...r)=>pw(hh,e,r[0]),e.required=(...r)=>hw(vh,e,r[0])});function fh(e,t){const r={type:"object",get shape(){return en(this,"shape",e?nw(e):{}),this.shape},...Te(t)};return new ZE(r)}const GE=Q("ZodUnion",(e,t)=>{ZS.init(e,t),Mt.init(e,t),e.options=t.options});function KE(e,t){return new GE({type:"union",options:e,...Te(t)})}const QE=Q("ZodIntersection",(e,t)=>{GS.init(e,t),Mt.init(e,t)});function XE(e,t){return new QE({type:"intersection",left:e,right:t})}const qc=Q("ZodEnum",(e,t)=>{KS.init(e,t),Mt.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{const s={};for(const i of n)if(r.has(i))s[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new qc({...t,checks:[],...Te(o),entries:s})},e.exclude=(n,o)=>{const s={...t.entries};for(const i of n)if(r.has(i))delete s[i];else throw new Error(`Key ${i} not found in enum`);return new qc({...t,checks:[],...Te(o),entries:s})}});function ph(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new qc({type:"enum",entries:r,...Te(t)})}const JE=Q("ZodLiteral",(e,t)=>{QS.init(e,t),Mt.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function eD(e,t){return new JE({type:"literal",values:Array.isArray(e)?e:[e],...Te(t)})}const tD=Q("ZodTransform",(e,t)=>{XS.init(e,t),Mt.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Dp(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Ho(s,r.value,t));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),r.issues.push(Ho(i))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(s=>(r.value=s,r)):(r.value=o,r)}});function rD(e){return new tD({type:"transform",transform:e})}const hh=Q("ZodOptional",(e,t)=>{JS.init(e,t),Mt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function mh(e){return new hh({type:"optional",innerType:e})}const nD=Q("ZodNullable",(e,t)=>{eC.init(e,t),Mt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function gh(e){return new nD({type:"nullable",innerType:e})}const oD=Q("ZodDefault",(e,t)=>{tC.init(e,t),Mt.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function sD(e,t){return new oD({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Mp(t)}})}const iD=Q("ZodPrefault",(e,t)=>{rC.init(e,t),Mt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function aD(e,t){return new iD({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Mp(t)}})}const vh=Q("ZodNonOptional",(e,t)=>{nC.init(e,t),Mt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function cD(e,t){return new vh({type:"nonoptional",innerType:e,...Te(t)})}const lD=Q("ZodCatch",(e,t)=>{oC.init(e,t),Mt.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function uD(e,t){return new lD({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const dD=Q("ZodPipe",(e,t)=>{sC.init(e,t),Mt.init(e,t),e.in=t.in,e.out=t.out});function yh(e,t){return new dD({type:"pipe",in:e,out:t})}const fD=Q("ZodReadonly",(e,t)=>{iC.init(e,t),Mt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function pD(e){return new fD({type:"readonly",innerType:e})}const hD=Q("ZodCustom",(e,t)=>{aC.init(e,t),Mt.init(e,t)});function mD(e,t={}){return XC(hD,e,t)}function gD(e){return JC(e)}const bh=/^([01][0-9]|2[0-3]):[0-5][0-9]$/,_h=(e,t)=>{if(!e||!t)return null;const r=e.split("-");if(r.length!==3)return null;const n=parseInt(r[0],10),o=parseInt(r[1],10)-1,s=parseInt(r[2],10),i=t.split(":");if(i.length!==2)return null;const a=parseInt(i[0],10),c=parseInt(i[1],10),l=new Date(n,o,s,a,c);return isNaN(l.getTime())||!_.isValid(l)?null:l},vD=fh({UsuarioID:Ki().nullable().optional(),disID:Ki().nullable().optional(),EsOrganizador:Qi().default(!1),Correo:gr().email("Formato de correo inválido"),StatusInvitacion:ph(["PENDIENTE","CONFIRMADO","DECLINADO"]).default("PENDIENTE")}),yD=fh({titulo:gr().min(1,"El campo Título es requerido.").refine(e=>!e.startsWith(" "),{message:"El título no puede empezar con un espacio en blanco"}),fechaInicio:gr().min(1,"El campo fecha inicio es requerido."),horaInicio:gr().min(1,"La hora de inicio es requerida.").regex(bh,{message:"Formato inválido"}),horaFin:gr().min(1,"La hora fin es requerida.").regex(bh,{message:"Formato inválido"}),todoElDia:Qi(),fechaFin:gr().optional(),showEndDate:Qi().optional(),horaInicio2:gr().optional(),TodoElDia2:Qi().optional(),client:gr().nullable().optional(),repetir:gr().optional(),link:gr().trim().url("Debe ser una URL válida. Ejemplo https://meet.google.com/").or(eD("")).optional().refine(e=>e===void 0?!0:!/\s/.test(e),{message:"El enlace no puede contener espacios en blanco"}),descripcion:gr().optional(),invitados:dh(vD).optional().default([]),color:gr().optional(),solID:Ki().nullable().optional(),disID:Ki().nullable().optional()}).refine(e=>e.showEndDate?e.fechaFin&&e.fechaFin.length>0:!0,{message:"La fecha de fin es requerida.",path:["fechaFin"]}).refine(e=>e.fechaFin!==void 0?!!e.fechaFin&&!!e.horaInicio2:!0,{message:"La hora de fin son requeridas.",path:["horaInicio2"]}).refine(e=>{if(e.todoElDia||!e.fechaInicio||!e.horaInicio||!e.fechaFin||!e.horaInicio2)return!0;const t=_h(e.fechaInicio,e.horaInicio),r=_h(e.fechaFin,e.horaFin);return!t||!r||!_.isValid(t)||!_.isValid(r)?!0:!(_.isBefore(r,t)&&!_.isSameDay(r,t)||_.isSameDay(t,r)&&_.isBefore(r,t))},{message:"",path:["horaFin"]}),xh=e=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},J.createElement("path",{fill:"#333",d:"M12 24C5.38 24 0 18.608 0 12S5.38 0 12 0s12 5.38 12 12-5.38 12-12 12"}),J.createElement("path",{fill:"#fff",d:"M16.703 7.275c.52.52.541 1.345.046 1.84l-2.874 2.874 2.874 2.873c.495.496.475 1.32-.046 1.841-.52.52-1.344.54-1.84.045l-2.873-2.873-2.874 2.873c-.496.496-1.32.475-1.84-.045-.521-.521-.541-1.345-.046-1.84l2.874-2.874L7.23 9.116c-.495-.496-.475-1.32.045-1.84.521-.521 1.345-.542 1.841-.046l2.874 2.873 2.873-2.873c.496-.496 1.32-.476 1.84.045"})),bD="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cg%20fill='%23404756'%20clip-path='url(%23a)'%3e%3cpath%20d='M7.288%2022.986h-.147a6.2%206.2%200%200%201-4.28-1.85c-2.404-2.404-2.478-6.24-.16-8.557L4.28%2011a1.228%201.228%200%201%201%201.739%201.739L4.44%2014.317c-1.356%201.357-1.282%203.626.16%205.068a3.82%203.82%200%200%200%202.602%201.135c.95%200%201.825-.32%202.479-.974l1.578-1.579a1.23%201.23%200%200%201%201.739%200c.48.481.48%201.258%200%201.739l-1.579%201.578c-1.097%201.098-2.552%201.69-4.13%201.69zM17.98%2012.998a1.23%201.23%200%200%201%200-1.739l1.578-1.578c.654-.654.986-1.53.974-2.466a3.78%203.78%200%200%200-1.134-2.602c-1.443-1.443-3.712-1.517-5.068-.16L12.75%206.03c-.48.48-1.258.48-1.739%200a1.23%201.23%200%200%201%200-1.739l1.579-1.578c2.318-2.319%206.153-2.245%208.558.16a6.23%206.23%200%200%201%201.85%204.279%205.84%205.84%200%200%201-1.69%204.279l-1.578%201.578c-.481.481-1.258.481-1.74%200z'/%3e%3cpath%20d='M14.172%208.11%208.07%2014.214a1.233%201.233%200%200%200%201.743%201.744l6.104-6.104a1.233%201.233%200%201%200-1.744-1.744'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='%23fff'%20d='M0%200h24v24H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",_D=e=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},J.createElement("g",{clipPath:"url(#a)"},J.createElement("path",{fill:"#404756",d:"M21.24 5.72a2.98 2.98 0 0 0-2.97-2.96l-5.19-.06c-1.06-.03-2.12.41-2.87 1.17l-7.49 7.49c-.66.66-1.03 1.54-1.03 2.47s.36 1.81 1.03 2.47l4.97 4.97a3.5 3.5 0 0 0 2.47 1.02c.89 0 1.79-.34 2.47-1.02l7.49-7.49c.76-.76 1.18-1.81 1.17-2.88l-.06-5.19zm-4.2 4.43c-.44.44-1.02.66-1.6.66a2.256 2.256 0 1 1 0-4.51 2.256 2.256 0 0 1 1.6 3.85"})),J.createElement("defs",null,J.createElement("clipPath",{id:"a"},J.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),xD="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23404756'%20d='M13.17%2013.68c2.06%200%204%20.8%205.46%202.27a7.7%207.7%200%200%201%202.26%205.47c0%20.79-.64%201.43-1.43%201.43l.01-.01H4.53c-.79%200-1.43-.64-1.43-1.43%200-4.27%203.46-7.73%207.72-7.73zM12%201.9c2.82%200%205.11%202.29%205.11%205.11s-2.29%205.11-5.11%205.11v-.01c-2.82%200-5.11-2.29-5.11-5.11S9.18%201.9%2012%201.9'/%3e%3c/svg%3e",wD=e=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},J.createElement("g",{fill:"#2571D6",clipPath:"url(#a)"},J.createElement("path",{d:"M13.085 7.331a1.096 1.096 0 1 0-2.192 0v9.316a1.096 1.096 0 0 0 2.192 0z"}),J.createElement("path",{d:"M16.647 10.893H7.33a1.096 1.096 0 1 0 0 2.192h9.316a1.096 1.096 0 0 0 0-2.192"}),J.createElement("path",{d:"M12 24C5.38 24 0 18.608 0 12S5.38 0 12 0s12 5.38 12 12-5.38 12-12 12m0-21.808c-5.414 0-9.808 4.394-9.808 9.808S6.586 21.808 12 21.808s9.808-4.394 9.808-9.808S17.403 2.192 12 2.192"})),J.createElement("defs",null,J.createElement("clipPath",{id:"a"},J.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),SD="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cg%20fill='%23404756'%20clip-path='url(%23a)'%3e%3cpath%20d='M13.789%2017H3.21C2.542%2017%202%2017.56%202%2018.25s.542%201.25%201.211%201.25H13.79c.669%200%201.211-.56%201.211-1.25S14.458%2017%2013.789%2017M20.718%204H3.282C2.574%204%202%204.56%202%205.25S2.574%206.5%203.282%206.5h17.436C21.426%206.5%2022%205.94%2022%205.25S21.426%204%2020.718%204M20.718%2010.5H3.282C2.574%2010.5%202%2011.06%202%2011.75S2.574%2013%203.282%2013h17.436c.708%200%201.282-.56%201.282-1.25s-.574-1.25-1.282-1.25'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='%23fff'%20d='M0%200h24v24H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",CD=e=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},J.createElement("path",{fill:"#2571D6",fillRule:"evenodd",d:"M17.333 11a6.34 6.34 0 0 1 6.334 6.333 6.34 6.34 0 0 1-6.334 6.334c-3.493 0-6.333-2.846-6.333-6.334A6.343 6.343 0 0 1 17.333 11m-.005 2.37c-.437 0-.79.338-.79.754v2.412h-2.414c-.416 0-.754.355-.754.792s.338.792.754.792h2.413v2.412c0 .416.354.754.791.754s.792-.338.792-.754V18.12h2.413c.416 0 .754-.355.754-.792s-.338-.792-.754-.792H18.12v-2.412c0-.416-.355-.754-.792-.754",clipRule:"evenodd"}),J.createElement("path",{fill:"#2571D6",d:"M11.12 12.297a7.97 7.97 0 0 0-1.787 5.036c0 1.763.571 3.392 1.537 4.714H3.044c-.84 0-1.523-.682-1.523-1.523 0-4.544 3.683-8.227 8.217-8.227zM10.995.139c2.925 0 5.3 2.376 5.3 5.3s-2.376 5.3-5.3 5.3v-.01a5.303 5.303 0 0 1-5.3-5.3 5.295 5.295 0 0 1 5.3-5.29"}));var Yo={},wh;function ED(){if(wh)return Yo;wh=1;var e=nt();Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.default=void 0;var t=e(ut()),r=at();return Yo.default=(0,t.default)((0,r.jsx)("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward"),Yo}var DD=ED();const Sh=rt(DD);var qo={},Ch;function kD(){if(Ch)return qo;Ch=1;var e=nt();Object.defineProperty(qo,"__esModule",{value:!0}),qo.default=void 0;var t=e(ut()),r=at();return qo.default=(0,t.default)((0,r.jsx)("path",{d:"M16.53 11.06 15.47 10l-4.88 4.88-2.12-2.12-1.06 1.06L10.59 17zM19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V8h14z"}),"EventAvailable"),qo}var TD=kD();const ID=rt(TD);var Zo={},Eh;function AD(){if(Eh)return Zo;Eh=1;var e=nt();Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.default=void 0;var t=e(ut()),r=at();return Zo.default=(0,t.default)((0,r.jsx)("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z"}),"KeyboardArrowRight"),Zo}var MD=AD();const PD=rt(MD);var Go={},Dh;function OD(){if(Dh)return Go;Dh=1;var e=nt();Object.defineProperty(Go,"__esModule",{value:!0}),Go.default=void 0;var t=e(ut()),r=at();return Go.default=(0,t.default)((0,r.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack"),Go}var jD=OD();const Zc=rt(jD);var Ko={},kh;function RD(){if(kh)return Ko;kh=1;var e=nt();Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.default=void 0;var t=e(ut()),r=at();return Ko.default=(0,t.default)((0,r.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle"),Ko}var ND=RD();const Xi=rt(ND),$D=e=>{const t=["brown","purple","orange","blue","green","yellow","red","grey"],r=e.charCodeAt(0)%t.length;return t[r]},LD=(e,t)=>{const r="#1976D2";if(t)return u.jsxs(u.Fragment,{children:[u.jsx(Xi,{fontSize:"small",sx:{mr:.5,color:r}}),u.jsx(g.Typography,{variant:"body2",sx:{color:r,fontWeight:"bold"},children:"Anfitrión"})]});switch(e){case"PENDIENTE":return u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",color:"grey.700"},children:[u.jsx(Ai,{fontSize:"small",sx:{mr:.5}}),u.jsx(g.Typography,{variant:"body2",children:"Pendiente"})]});case"CONFIRMADO":return u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",color:"success.main"},children:[u.jsx(Xi,{fontSize:"small",sx:{mr:.5}}),u.jsx(g.Typography,{variant:"body2",children:"Asistiré"})]});default:return u.jsx(g.Typography,{variant:"body2",children:"No respondió"})}};function zD({open:e,handleClose:t,guests:r}){const n=r.filter(i=>i.estatus==="CONFIRMADO"||i.isHost),o=r.filter(i=>i.estatus==="PENDIENTE"&&!i.isHost),s=i=>u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",py:1.5},children:[u.jsx(g.Avatar,{sx:{bgcolor:$D(i.iniciales),mr:2},children:i.iniciales}),u.jsx(g.Box,{sx:{flexGrow:1},children:u.jsx(g.Typography,{variant:"body1",children:i.nombre})}),LD(i.estatus,i.isHost)]},i.nombre);return u.jsxs(g.Dialog,{open:e,onClose:t,fullWidth:!0,maxWidth:"xs",children:[u.jsxs(g.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",p:2},children:[u.jsx(g.IconButton,{onClick:t,children:u.jsx(Zc,{})}),u.jsx(g.Typography,{variant:"h6",children:"Lista de invitados"}),u.jsx(g.IconButton,{onClick:t,children:u.jsx(Ur,{})})]}),u.jsx(g.Divider,{}),u.jsxs(g.DialogContent,{dividers:!0,children:[o.length>0&&u.jsxs(g.Box,{sx:{mb:2},children:[u.jsxs(g.Typography,{variant:"subtitle2",sx:{fontWeight:"bold"},children:["Pendiente (",o.length,")"]}),o.map(i=>s(i))]}),n.length>0&&u.jsxs(g.Box,{children:[u.jsxs(g.Typography,{variant:"subtitle2",sx:{fontWeight:"bold",mb:1},children:["Confirmados (",n.length,")"]}),n.map(i=>s(i))]})]})]})}const BD=e=>{const t=["brown","purple","orange","blue","green","yellow","red","grey"],r=e.charCodeAt(0)%t.length;return t[r]};function FD({guests:e}){const[t,r]=y.useState(!1),n=()=>r(!0),o=()=>r(!1);return u.jsxs(u.Fragment,{children:[u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",py:1,borderBottom:"1px solid #eee"},children:[u.jsx(g.AvatarGroup,{max:6,sx:{"& .MuiAvatar-root":{width:32,height:32,fontSize:14}},children:e.map((s,i)=>u.jsx(g.Tooltip,{title:s.nombre,arrow:!0,placement:"right",children:u.jsxs(g.Avatar,{sx:{bgcolor:BD(s.iniciales),position:"relative"},children:[s.iniciales,s.estatus==="PENDIENTE"&&u.jsx(g.Box,{sx:{position:"absolute",bottom:-1,right:1,bgcolor:"gray",borderRadius:"50%",p:.2},children:u.jsx(Ai,{sx:{fontSize:14,color:"white"}})})]})},i))}),u.jsx(g.Box,{sx:{flexGrow:1}}),u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",cursor:"pointer",color:"primary.main"},onClick:n,children:[u.jsx(g.Typography,{variant:"body2",sx:{fontWeight:"bold"},children:"Ver invitados"}),u.jsx(PD,{fontSize:"small"})]})]}),u.jsx(zD,{open:t,handleClose:o,guests:e})]})}const VD=e=>new Date(e+"T00:00:00").toLocaleDateString("es-ES",{day:"numeric",month:"short"}).replace(".",""),Th=e=>{const[t,r]=e.split(":"),n=parseInt(t),o=n>=12?"pm":"am";return`${n%12||12}:${r} ${o}`},UD=({slot:e,onClick:t})=>u.jsxs(g.Box,{onClick:t,sx:{cursor:"pointer",borderRadius:"12px",overflow:"hidden",border:"1px solid #e0e0e0",textAlign:"center",transition:"0.2s","&:hover":{transform:"translateY(-3px)",boxShadow:2}},children:[u.jsx(g.Box,{sx:{bgcolor:"#333",color:"white",py:.2},children:u.jsx(g.Typography,{variant:"body2",sx:{fontWeight:"bold",textTransform:"capitalize"},children:VD(e.Fecha)})}),u.jsxs(g.Box,{sx:{bgcolor:"white",color:"black",py:1},children:[u.jsx(g.Typography,{variant:"body2",children:Th(e.HoraInicio)}),u.jsxs(g.Typography,{variant:"body2",color:"text.secondary",children:["a ",Th(e.HoraFin)]})]})]});function HD({open:e,handleClose:t,suggestions:r,onSelectSlot:n}){const o=r.reduce((i,a)=>{const c=a.Fecha;return i[c]||(i[c]=[]),i[c].push(a),i},{}),s=Object.keys(o);return u.jsxs(g.Dialog,{open:e,onClose:t,fullWidth:!0,maxWidth:"sm",children:[u.jsxs(g.Box,{sx:{p:2},children:[u.jsx(g.Typography,{variant:"subtitle1",sx:{fontWeight:"bold"},children:"Selecciona un nuevo horario"}),u.jsx(g.Button,{startIcon:u.jsx(Zc,{}),onClick:t,sx:{textTransform:"none",color:"text.secondary",p:0},children:"Volver al evento"})]}),u.jsx(g.Divider,{}),u.jsx(g.DialogContent,{sx:{px:3,py:2},children:s.map((i,a)=>u.jsxs(g.Box,{sx:{mb:4},children:[u.jsxs(g.Typography,{variant:"subtitle2",sx:{fontWeight:"bold",mb:2,display:"flex",alignItems:"center",color:a===0?"#1976d2":"text.primary"},children:[a===0?"Mismo día":"Próximas fechas",a===0&&u.jsx(Xi,{sx:{ml:1,fontSize:18}})]}),u.jsx(g.Grid,{container:!0,spacing:2,children:o[i].map((c,l)=>u.jsx(g.Grid,{item:!0,xs:6,sm:4,children:u.jsx(UD,{slot:c,onClick:()=>n(c)})},`${i}-${l}`))})]},i))})]})}var Qo={},Ih;function WD(){if(Ih)return Qo;Ih=1;var e=nt();Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.default=void 0;var t=e(ut()),r=at();return Qo.default=(0,t.default)((0,r.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group"),Qo}var YD=WD();const qD=rt(YD),ZD=e=>{const t=["brown","purple","orange","blue","green","yellow","red","grey"],r=e.charCodeAt(0)%t.length;return t[r]};function GD({onSelectGuest:e,availableSuggestions:t,onInputTextChange:r}){const[n,o]=y.useState(null),[s,i]=y.useState("");console.log("availableSuggestions",t);const a=(l,d)=>{d?(e(d),o(null),i("")):(o(null),i(""))},c=(l,d)=>{i(d),r(d)};return u.jsx(g.Autocomplete,{options:t,value:n,inputValue:s,getOptionLabel:l=>l.correo,onChange:a,onInputChange:c,isOptionEqualToValue:(l,d)=>l.correo===d.correo,disablePortal:!0,noOptionsText:"Sin resultados",renderInput:l=>u.jsx(g.TextField,{...l,placeholder:"Agregar invitados...",variant:"outlined",size:"small",InputProps:{...l.InputProps,startAdornment:u.jsx(g.Box,{sx:{ml:1,display:"flex",alignItems:"center"},children:u.jsx(qD,{color:"action"})}),disableUnderline:!0}}),renderOption:(l,d)=>y.createElement(g.Box,{component:"li",...l,key:d.correo,sx:{py:1,"& > img":{mr:2,flexShrink:0}}},u.jsx(g.Avatar,{sx:{bgcolor:ZD(d.iniciales),mr:2,width:32,height:32,fontSize:14},children:d.iniciales}),u.jsx(g.Typography,{children:d.nombre}))},"guest-autocomplete-field")}var Xo={},Ah;function KD(){if(Ah)return Xo;Ah=1;var e=nt();Object.defineProperty(Xo,"__esModule",{value:!0}),Xo.default=void 0;var t=e(ut()),r=at();return Xo.default=(0,t.default)((0,r.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),Xo}var QD=KD();const Gc=rt(QD),XD=e=>e.tieneConflicto?{icon:u.jsx(Gc,{sx:{fontSize:20}}),fillColor:"#F0A290",iconColor:"#D9981E",textColor:"#000000",variant:"filled"}:{icon:u.jsx(Xi,{sx:{fontSize:20,margin:"0px"}}),fillColor:"#F0ECEB",iconColor:"#D9981E",textColor:"#000000",variant:"filled"},JD=e=>{const t=["brown","purple","orange","blue","green","yellow","red","grey"],r=e.charCodeAt(0)%t.length;return t[r]};function ek({guests:e,conflictCount:t,onViewSuggestions:r,onDeleteGuest:n}){const o=i=>()=>{n(i)},s=i=>i?i.trim().split(/\s+/).slice(0,2).join(" "):"";return u.jsxs(g.Box,{sx:{p:1},children:[u.jsx(g.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:e.map((i,a)=>{const c=XD(i),l=JD(i.iniciales);return u.jsx(g.Chip,{label:u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center"},children:[u.jsx(g.Typography,{variant:"body2",component:"span",sx:{color:c.textColor,margin:"5px",fontSize:"13px"},children:s(i?.nombre)}),u.jsx(g.Box,{className:"status-icon-wrapper",sx:{display:"flex",alignItems:"flex-end",ml:.5},children:c.icon})]}),avatar:u.jsx(g.Avatar,{sx:{bgcolor:l},children:i.iniciales}),sx:{backgroundColor:c.fillColor,borderStyle:"none",paddingRight:"0px",paddingLeft:"0px","& .MuiChip-deleteIcon":{visibility:"hidden",color:c.textColor},"&:hover .MuiChip-deleteIcon":{visibility:"visible"},"& .MuiChip-avatar":{color:"white"},"& .MuiChip-label":{display:"flex",paddingLeft:"5px",paddingRight:"0px",alignItems:"center",width:"100%"},"&:hover .status-icon-wrapper":{visibility:"hidden"}},variant:c.variant,onClick:()=>console.log(`Clic en ${i.nombre}`),onDelete:o(i.nombre)},a)})}),t>0&&u.jsxs(g.Box,{sx:{mt:2,p:1},children:[u.jsxs(g.Typography,{color:"error",sx:{display:"flex",alignItems:"center",fontSize:"14px"},children:[u.jsx(Gc,{sx:{mr:1}}),"Se detectó un conflicto de agenda con ",t," invitado",t!==1?"s":""]}),u.jsx(g.Link,{component:"button",variant:"body2",onClick:r,sx:{mt:.5,textDecoration:"none"},children:"Ver sugerencias de horario"})]})]})}function tk(e,t){const[r,n]=y.useState(e);return y.useEffect(()=>{const o=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(o)}},[e,t]),r}const rk={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:{xs:"90%",sm:450,md:500},bgcolor:"background.paper",boxShadow:24,p:{xs:2,sm:3},borderRadius:2,maxHeight:"90vh",overflowY:"auto"},Mh=["#dbe3fe","#fcebc7","#d9f1d2","#fdf5d1","#ebe3d7","#e1d6fb","#f7c7cc","#f9e7fb","#eaedf2","#d5d8dd"],nk=()=>{const e=[];for(let t=0;t<24;t++)for(let r=0;r<60;r+=15){const n=t.toString().padStart(2,"0"),o=r.toString().padStart(2,"0");e.push(`${n}:${o}`)}return e},Ph=[],Gn=nk(),Jo=(e,t)=>{if(!e||!t)return null;const r=e.split("-");if(r.length!==3)return null;const n=parseInt(r[0],10),o=parseInt(r[1],10)-1,s=parseInt(r[2],10),i=t.split(":");if(i.length!==2)return null;const a=parseInt(i[0],10),c=parseInt(i[1],10),l=new Date(s,o,n,a,c);return isNaN(l.getTime())||!_.isValid(l)?null:l},ok=({isVisible:e,onClose:t,onSave:r,onDelete:n,selectedDate:o,initialEvent:s,userId:i,masNombreBD:a,disId:c})=>{const[l,d]=y.useState(!1),[f,p]=y.useState(!1),m=_.format(new Date,"yyyy-MM-dd"),[v,h]=y.useState(""),[b,w]=y.useState([]),[S,k]=y.useState(!1),C=Cc(),[x,H]=y.useState([]),[E,I]=y.useState(""),[P,A]=y.useState(Ph),[Y,Z]=y.useState(!1),[V,W]=y.useState(""),[le,R]=y.useState(!1),[X,re]=y.useState([]),[ve,L]=y.useState([]),ee=tk(V,300),Ee=P.filter(K=>K.tieneConflicto).length,{control:te,handleSubmit:he,reset:ue,formState:{errors:ce,isValid:be},watch:_e,setValue:pe}=wp({resolver:nE(yD),defaultValues:{titulo:s?.titulo||"",fechaInicio:_.format(new Date,"yyyy-MM-dd"),horaInicio:_.format(new Date,"HH:mm"),horaFin:_.format(_.addHours(new Date,1),"HH:mm"),todoElDia:!1,client:s?.client||null,repetir:"No repetir",link:s?.link||"",descripcion:s?.descripcion||"",solID:s?.solID??null,invitados:[]},mode:"onChange"}),ge=_e("fechaInicio"),Ae=_e("fechaFin"),N=_e("todoElDia");y.useEffect(()=>{if(v.trim()===""||!i||!c||!a){w([]),H([]),pe("solID",null),k(!1),I("");return}k(!0);const K=setTimeout(()=>{C.getClients(v,c,a,i).then(ie=>{if(k(!1),ie){const De=ie.map(Ze=>Ze.solID);H([...new Set(De)])}else H([]);const de=Array.from(new Map(ie.map(De=>[De.nombreCliente,De])).values());if(de.length>0)w(de),I("");else if(s?.client&&s.solID!==null){const De=[{solID:s.solID,nombreCliente:s.client}];w(De),I("Sin resultados")}else w([]),I("Sin resultados")}).catch(ie=>{console.error("Error al buscar clientes:",ie),k(!1)})},500);return()=>clearTimeout(K)},[v,i,c,a]),y.useEffect(()=>{if(ge&&Ae){const K=new Date(ge),ie=new Date(Ae);(K===ie||K>ie)&&pe("fechaFin",ge)}},[ge,Ae,pe]),y.useEffect(()=>{ge&&pe("fechaFin",ge)},[ge]),y.useEffect(()=>{pe("showEndDate",l)},[l,pe]),y.useEffect(()=>{if(s){const K=_.format(s.fechaInicio,"yyyy-MM-dd")===_.format(s.fechaFin,"yyyy-MM-dd");if(d(!K),pe("titulo",s?.titulo),pe("fechaInicio",_.format(s.fechaInicio,"yyyy-MM-dd")),pe("fechaFin",_.format(s.fechaFin,"yyyy-MM-dd")),pe("horaInicio",_.format(s.fechaInicio,"HH:mm")),pe("horaFin",_.format(s.fechaFin,"HH:mm")),pe("horaInicio2",_.format(s.fechaFin,"HH:mm")),pe("descripcion",s.descripcion),pe("link",s.link),pe("repetir","false"),pe("color",s.color),pe("todoElDia",s.todoElDia),pe("solID",s.solID),pe("client",s.client),s.invitados&&s.invitados.length>0){const ie=(s?.invitados||[]).map(de=>{const De=de.usrNombre?.trim()||"",Ze=De.split(/\s+/),$t=Ze.length>1?(Ze[0][0]+Ze[1][0]).toUpperCase():De.substring(0,2).toUpperCase();return{nombre:de.usrNombre||"Sin nombre",correo:de.correo||"",iniciales:$t||"--",usrID:de.usuarioID??null,isHost:de.isHost||!1,estatus:de.estatus==="PENDIENTE"?"CONFIRMADO":"PENDIENTE",tieneConflicto:!1,disID:de.disID}});console.log("mappedGuests",ie),A(ie)}else A(Ph);s.solID?p(!0):p(!1)}else{const K=o||new Date,ie=new Date,de=new Date(K.getFullYear(),K.getMonth(),K.getDate(),ie.getHours(),ie.getMinutes()),De=_.addHours(de,1);ue({titulo:"",fechaInicio:_.format(de,"yyyy-MM-dd"),horaInicio:_.format(de,"HH:mm"),fechaFin:_.format(De,"yyyy-MM-dd"),horaFin:_.format(De,"HH:mm"),horaInicio2:_.format(De,"HH:mm"),todoElDia:!1,client:"",repetir:"No repetir",link:"",descripcion:"",color:Mh[0],solID:null}),d(!1),p(!1)}},[s,e,o]);const Ue=K=>({UsuarioID:K.usrID??null,Correo:K.correo,EsOrganizador:K.usrID==i,StatusInvitacion:"PENDIENTE",disID:c??null}),tt=he(K=>{const ie=P.map(De=>Ue(De)),de={...K,invitados:ie};r(de,s?.eventoID),t(),ue(),d(!1)},K=>{console.log("Errores de validación:",K)});y.useEffect(()=>{N&&(pe("horaInicio","00:00"),pe("horaFin","23:59"))},[N,pe,_e]);const He=()=>{const K=_e("fechaInicio");if(K){const ie=new Date(`${K}T00:00:00`),de=_.addDays(ie,1);pe("fechaFin",_.format(de,"yyyy-MM-dd"))}d(!0)},Me=_e("fechaInicio"),Le=_e("horaInicio"),pt=_e("fechaFin"),st=_e("horaFin"),[D,O]=y.useState(null),[z,ae]=y.useState(null);y.useEffect(()=>{(D===null||D!==Le)&&O(Le)},[Le,D]),y.useEffect(()=>{(z===null||z!==st)&&ae(st??"")},[st,z]);const se=_e("todoElDia");y.useEffect(()=>{if(se||!Le||!st||!Me||!pt)return;const K=Jo(Me,Le),ie=Jo(pt,st);if(!K||!ie||!_.isValid(K)||!_.isValid(ie))return;const de=_.isSameDay(K,ie),De=de&&(_.isAfter(K,ie)||K.getTime()===ie.getTime()),Ze=_.isBefore(ie,K)&&!de;(De||Ze)&&(pe("horaFin",""),ae(""))},[Le,Me]);const j=y.useMemo(()=>{if(!Le||!Me)return Gn;const K=Jo(Me,Le),ie=Jo(pt,"00:00");return!K||!ie||!_.isValid(K)||!_.isValid(ie)||_.isBefore(ie,K)&&!_.isSameDay(ie,K)?Gn:_.isSameDay(K,ie)?Gn.filter(de=>{const De=Jo(pt,de);return De&&_.isAfter(De,K)}):(_.isAfter(ie,K),Gn)},[Le,Me,pt]),oe=y.useMemo(()=>Gn,[]),F=async K=>{const ie=P.some(yr=>yr.correo===K.correo);if(R(!0),ie)return;const de=c,De=K.correo,Ze=K.usrID,$t=Me,on=Le,Yt=st;if(!de||!De||!$t||!on||!Yt){A(yr=>[...yr,{...K,status:"pending",isHost:!1,hasConflict:!1,usrID:Ze,name:K.nombre}]);return}let vr;try{vr=await C.VerificarConflicto(de,De,$t,on+":00",Yt+":00")}catch{vr={tieneConflicto:!1,usrMail:K.correo}}const sn=Array.isArray(vr)?vr[0]:vr;console.log("primerConflicto",sn);const an={...K,estatus:"PENDIENTE",isHost:!1,tieneConflicto:String(sn.tieneConflicto).toLowerCase()==="true"};if(console.log("conflictResult",an),an.tieneConflicto){const yr=await C.getDisponibilidadUsuario(c,De,$t,"60");re(yr)}A(yr=>[...yr,an])},fe=K=>{A(ie=>ie.filter(de=>de.nombre!==K))},M=()=>{Z(!1)},U=K=>{const De=(K.usrNombre??"").split(" ").map(Ze=>Ze.charAt(0)).join("").toUpperCase().substring(0,2);return{nombre:K.usrNombre??"",correo:K.usrMail??"",iniciales:De,usrID:K.usrID??0,estatus:"PENDIENTE",tieneConflicto:!1,isHost:!1}};y.useEffect(()=>{ee.length>2&&c?(async()=>{const de=(await C.getUsuariosInvitados(c,ee)).map(U).filter(De=>De.usrID!==i&&!P.some(Ze=>Ze.correo===De.correo));L(de),console.log("sugerencias",de)})():L([])},[ee,P]);const Se=K=>{W(K)},$e=async K=>{try{const{Fecha:ie,HoraInicio:de,HoraFin:De}=K,Ze={nuevaFecha:ie,nuevaHoraInicio:de,nuevaHoraFin:De};M()}catch(ie){console.error("Error al reprogramar el evento:",ie)}};return u.jsx(u.Fragment,{children:u.jsx(g.Modal,{open:e,onClose:t,children:u.jsx("form",{onSubmit:tt,children:u.jsxs(g.Box,{sx:rk,children:[u.jsx(g.IconButton,{"aria-label":"close",onClick:t,sx:{position:"absolute",right:8,top:12},children:u.jsx(Ur,{})}),u.jsx(g.Typography,{variant:"h6",mb:2,children:s?.isGoogleEvent||s?.isOutlookEvent?u.jsxs(u.Fragment,{children:[u.jsx(ID,{sx:{mr:1}}),s.titulo||"Evento de Google"]}):s?"Editar evento":"Agregar evento"}),u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsx(cr,{name:"titulo",control:te,render:({field:K})=>u.jsx(g.TextField,{...K,label:"Título",fullWidth:!0,variant:"outlined",size:"small",error:!!ce.titulo,helperText:ce.titulo?.message,inputProps:{maxLength:100},sx:{"& .MuiInputLabel-root.Mui-focused":{color:"black"},"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"black"},"& .MuiInputLabel-root":{backgroundColor:"transparent !important",padding:"0 !important"}}})})})}),u.jsxs("div",{className:`row g-2 ${l?"mb-1":"mb-2"}`,children:[u.jsx("div",{className:"col-12 col-md-4",children:u.jsx(cr,{name:"fechaInicio",control:te,render:({field:K})=>u.jsx(g.TextField,{fullWidth:!0,...K,type:"date",placeholder:"Fecha de inicio",size:"small",InputLabelProps:{shrink:!0},error:!!ce.fechaInicio,helperText:ce.fechaInicio?.message})})}),l?u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"col-md-3 d-none d-md-block"}),u.jsx("div",{className:"col-10 col-md-4",children:u.jsx(cr,{name:"fechaFin",control:te,render:({field:K})=>u.jsx(g.TextField,{...K,type:"date",placeholder:"Fecha de fin",fullWidth:!0,size:"small",InputLabelProps:{shrink:!0},inputProps:{min:ge||m},error:!!ce.fechaFin,helperText:ce.fechaFin?.message})})}),!s&&u.jsx("div",{className:"col-2 col-md-1 d-flex align-items-start",children:u.jsx(g.IconButton,{onClick:()=>d(!1),sx:{fontSize:18},children:u.jsx(xh,{})})})]}):u.jsx("div",{className:"col-md-8"})]}),l&&u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12 d-flex justify-content-center",children:u.jsx(Sh,{sx:{color:"#757575",my:1}})})}),u.jsxs("div",{className:"row g-2 mb-2",children:[u.jsx("div",{className:"col-12 col-md-4",children:u.jsx(cr,{name:"horaInicio",control:te,render:({field:{onChange:K,value:ie,...de}})=>u.jsx(g.Autocomplete,{freeSolo:!0,options:oe,value:ie||"",onChange:(De,Ze)=>K(Ze||""),onInputChange:(De,Ze)=>K(Ze),renderInput:De=>u.jsx(g.TextField,{...De,...de,size:"small",error:!!ce.horaInicio,helperText:ce.horaInicio?.message,InputProps:{...De.InputProps,endAdornment:u.jsx(g.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:u.jsx(Ai,{})})}}),disabled:se})})}),!l&&u.jsx("div",{className:"col-1 d-flex align-items-center justify-content-center",style:{marginTop:ce.horaInicio?"5px":"0px"},children:u.jsx(Sh,{sx:{color:"#757575"}})}),l&&u.jsx("div",{className:"col-md-3 d-none d-md-block"}),u.jsx("div",{className:"col-12 col-md-4",children:u.jsx(cr,{name:"horaFin",control:te,render:({field:{onChange:K,value:ie,...de}})=>u.jsx(g.Autocomplete,{freeSolo:!0,options:j,value:ie||"",onChange:(De,Ze)=>K(Ze||""),onInputChange:(De,Ze)=>K(Ze),renderInput:De=>u.jsx(g.TextField,{...De,...de,size:"small",error:!!ce.horaFin,helperText:ce.horaFin?.message,InputProps:{...De.InputProps,endAdornment:u.jsx(g.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:u.jsx(Ai,{})})}}),disabled:se})})}),!l&&u.jsx("div",{className:"col-12 col-md-2 d-flex align-items-center",children:u.jsx(cr,{name:"todoElDia",control:te,render:({field:K})=>u.jsx(g.FormControlLabel,{control:u.jsx(g.Checkbox,{checked:K.value,onChange:ie=>K.onChange(ie.target.checked)}),label:u.jsx("label",{style:{fontSize:"0.7rem",fontWeight:"normal"},children:"Todo el día"}),sx:{whiteSpace:"nowrap"}})})})]}),(!s?.isGoogleEvent||s?.isOutlookEvent)&&!l&&u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsxs(g.Button,{onClick:He,size:"small",sx:{textTransform:"none",fontSize:16},children:[u.jsx(wD,{}),"  Agregar fecha final"]})})}),(!s?.isGoogleEvent||s?.isOutlookEvent)&&u.jsx("div",{className:"row mb-2",children:u.jsxs("div",{className:"col-12",children:[!f&&u.jsxs(g.Button,{onClick:()=>p(!0),size:"small",sx:{textTransform:"none",fontSize:16},children:[u.jsx(CD,{}),"  Vincular cliente"]}),f&&u.jsxs("div",{className:"row g-2",children:[u.jsx("div",{className:"col-10 col-md-5",children:u.jsx(cr,{name:"client",control:te,render:({field:K})=>u.jsx(g.Autocomplete,{options:b,loading:S,loadingText:"Buscando coincidencias...",getOptionLabel:ie=>ie.nombreCliente?.trim()||"",value:b.find(ie=>ie.nombreCliente===K.value)||(K.value&&typeof K.value=="string"?{solID:-1,nombreCliente:K.value}:null),noOptionsText:E,onInputChange:(ie,de)=>{h(de)},onChange:(ie,de)=>{K.onChange(de?de.nombreCliente:"")},renderInput:ie=>u.jsx(g.TextField,{...ie,placeholder:"Buscar cliente...",size:"small",InputProps:{...ie.InputProps,startAdornment:u.jsx("img",{src:xD,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"5px"}}),endAdornment:u.jsxs(u.Fragment,{children:[S?u.jsx(g.CircularProgress,{color:"inherit",size:20}):null,ie.InputProps.endAdornment]})}})})})}),u.jsx("div",{className:"col-10 col-md-5",children:u.jsx(cr,{name:"solID",control:te,render:({field:K})=>u.jsx(g.Autocomplete,{options:x,noOptionsText:"Sin resultados",getOptionLabel:ie=>ie.toString(),value:K.value??null,onChange:(ie,de)=>K.onChange(de),renderInput:ie=>u.jsx(g.TextField,{...ie,label:"#Registro",variant:"outlined",size:"small",sx:{"& .MuiInputLabel-root":{backgroundColor:"transparent !important",padding:"0 !important"}}}),disabled:!b.length})})}),u.jsx("div",{className:"col-2 d-flex align-items-center",children:u.jsx(g.IconButton,{onClick:()=>p(!1),sx:{fontSize:18},children:u.jsx(xh,{})})})]})]})}),u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsx(cr,{name:"link",control:te,render:({field:K})=>u.jsx(g.TextField,{...K,placeholder:" Agregar enlace de reunión",fullWidth:!0,variant:"outlined",size:"small",error:!!ce.link,helperText:ce.link?.message,InputProps:{startAdornment:u.jsx("img",{src:bD,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"8px"}})}})})})}),u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsx(cr,{name:"descripcion",control:te,render:({field:K})=>u.jsx(g.TextField,{...K,placeholder:" Agregar descripción aquí...",fullWidth:!0,multiline:!0,rows:3,inputProps:{maxLength:500},variant:"outlined",size:"small",InputProps:{startAdornment:u.jsx("img",{src:SD,width:20,style:{alignSelf:"flex-start",marginRight:"8px"}})}})})})}),u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsx(GD,{onSelectGuest:F,availableSuggestions:ve,onInputTextChange:Se})})}),le&&u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsx(ek,{guests:P,conflictCount:Ee,onViewSuggestions:()=>Z(!0),onDeleteGuest:fe})})}),s?.invitados&&s?.invitados?.length>0&&u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsx(g.Box,{children:u.jsx(FD,{guests:P})})})}),u.jsx(HD,{open:Y,handleClose:M,suggestions:X,onSelectSlot:$e}),u.jsx("div",{className:"row mb-2",children:u.jsx("div",{className:"col-12",children:u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexWrap:"wrap"},children:[u.jsx(_D,{}),Mh.map(K=>u.jsx(cr,{name:"color",control:te,render:({field:ie})=>u.jsx(g.IconButton,{onClick:()=>ie.onChange(K),sx:{width:24,height:24,borderRadius:"50%",bgcolor:K,border:ie.value===K?"2px solid":"none",borderColor:ie.value===K?"primary.main":"transparent"}})},K))]})})}),u.jsx("div",{className:"row",children:u.jsxs("div",{className:"col-12 d-flex justify-content-end gap-2",children:[s&&!s?.isGoogleEvent&&!s?.isOutlookEvent&&u.jsx(g.Button,{onClick:n,variant:"outlined",color:"error",sx:{textTransform:"none"},children:"Eliminar"}),u.jsx(g.Button,{onClick:t,variant:"outlined",sx:{textTransform:"none"},children:"Cancelar"}),u.jsx(g.Button,{onClick:tt,variant:"contained",sx:{textTransform:"none"},disabled:!be,children:"Guardar"})]})})]})})})})},sk="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='48'%20height='49'%20fill='none'%3e%3cpath%20fill='%23E40B1C'%20d='M34.559%2048.077c-7.413%200-13.44-6.039-13.44-13.44s6.027-13.44%2013.44-13.44%2013.44%206.027%2013.44%2013.44c0%207.414-6.027%2013.44-13.44%2013.44'/%3e%3cpath%20fill='%23fff'%20d='M39.827%2029.346c.583.583.605%201.505.05%202.06l-3.218%203.219%203.219%203.218c.555.556.532%201.48-.051%202.062-.584.583-1.506.605-2.062.05l-3.218-3.218-3.218%203.218c-.556.555-1.478.533-2.061-.05s-.606-1.506-.05-2.062l3.217-3.218-3.218-3.218c-.555-.555-.533-1.478.05-2.061.583-.584%201.507-.606%202.063-.05l3.217%203.217%203.218-3.218c.556-.555%201.478-.533%202.062.05'/%3e%3cpath%20fill='%23404756'%20d='M30.367.078c1.112%200%202.001.868%202.001%201.954v1.195h.979c4.913%200%208.892%203.887%208.892%208.686v9.237a15.4%2015.4%200%200%200-4.424-1.691v-1.312H4.468V33.63c0%202.389%202%204.343%204.446%204.343H19.4a15.4%2015.4%200%200%200%201.676%204.343H8.892C3.979%2042.317%200%2038.43%200%2033.631V11.913c0-4.8%203.979-8.686%208.892-8.686h1V2.032c0-1.086.89-1.954%202.002-1.954s2%20.868%202%201.954v1.195h14.473V2.032c0-1.085.889-1.954%202-1.954'/%3e%3c/svg%3e",ik={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:400,bgcolor:"background.paper",boxShadow:24,p:4,borderRadius:2,textAlign:"center"},ak=({isOpen:e,onClose:t,onConfirm:r,title:n,message:o})=>u.jsx(g.Modal,{open:e,onClose:t,children:u.jsxs(g.Box,{sx:ik,children:[u.jsx("img",{src:sk}),u.jsx(g.Typography,{variant:"h6",component:"h2",sx:{mt:1},children:n}),u.jsx(g.Typography,{sx:{mt:2},children:o}),u.jsxs(g.Box,{sx:{mt:4,display:"flex",justifyContent:"center",gap:2},children:[u.jsx(g.Button,{variant:"outlined",onClick:t,sx:{textTransform:"none"},children:"Regresar"}),u.jsxs(g.Button,{variant:"contained",color:"error",onClick:r,sx:{textTransform:"none"},children:[u.jsx("span",{className:"icon-eliminar",children:"  "})," Eliminar"]})]})]})}),ck={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:450,bgcolor:"background.paper",boxShadow:24,p:2,borderRadius:2,maxHeight:"80vh",overflowY:"auto"},lk=({isOpen:e,onClose:t,events:r,date:n,onEventClick:o})=>{if(!n)return null;const s=a=>{o(a),t()},i=a=>a.isGoogleEvent?{label:"G",borderColor:"#4285F4"}:a.isOutlookEvent?{label:"O",borderColor:"#0078d9"}:{label:"-",borderColor:"#CCC"};return u.jsx(g.Modal,{open:e,onClose:t,children:u.jsxs(g.Box,{sx:ck,children:[u.jsxs(g.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1},children:[u.jsxs(g.Typography,{sx:{fontSize:"18px",fontWeight:"bold"},component:"h2",children:["Eventos del"," ",n.toLocaleDateString("es-ES",{weekday:"long",day:"numeric",month:"long"})]}),u.jsx(g.IconButton,{onClick:t,size:"small",children:u.jsx(Ur,{})})]}),u.jsx(g.Divider,{}),u.jsx(g.List,{sx:{mt:1},children:r.map(a=>{const c=i(a);return u.jsx(g.ListItem,{disablePadding:!0,sx:{mb:1},children:u.jsx(g.ListItemButton,{onClick:()=>s(a),sx:{py:1,borderRadius:"4px",backgroundColor:"rgba(0,0,0,0.02)",borderLeft:`5px solid ${c?.borderColor}`,"&:hover":{backgroundColor:"rgba(0,0,0,0.04)"}},children:u.jsxs(g.Box,{sx:{flexGrow:1},children:[u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1,mb:.5},children:[u.jsx(g.Typography,{sx:{fontSize:"10px",fontWeight:"bold",px:.5,borderRadius:"3px",backgroundColor:c?.borderColor,color:"white",textTransform:"uppercase"},children:c?.label}),u.jsx(g.Typography,{sx:{fontSize:"14px",fontWeight:600,lineHeight:1.2,color:"#333"},children:a.titulo})]}),u.jsx(g.Typography,{sx:{fontSize:"12px",color:"#666"},children:a.todoElDia?"Todo el día":`${_.format(a.fechaInicio,"HH:mm")} - ${_.format(a.fechaFin,"HH:mm")}`})]})})},a.eventoID)})})]})})};var es={},Oh;function uk(){if(Oh)return es;Oh=1;var e=nt();Object.defineProperty(es,"__esModule",{value:!0}),es.default=void 0;var t=e(ut()),r=at();return es.default=(0,t.default)((0,r.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),es}var dk=uk();const fk=rt(dk),pk="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23E40B1C'%20d='M20.36%204.14H16c0-1.65-1.35-3-3-3h-2c-1.65%200-3%201.35-3%203H3.64c-.55%200-1%20.45-1%201s.45%201%201%201h1.04l.84%2013.91a3%203%200%200%200%202.99%202.82h6.98c1.58%200%202.9-1.24%203-2.82l.84-13.91h1.04c.55%200%201-.45%201-1s-.45-1-1-1zm-9.36-1h2c.55%200%201%20.45%201%201h-4c0-.55.45-1%201-1m-.39%2014.9c0%20.55-.45%201-1%201s-1-.45-1-1V9.99c0-.55.45-1%201-1s1%20.45%201%201zm4.78%200c0%20.55-.45%201-1%201s-1-.45-1-1V9.99c0-.55.45-1%201-1s1%20.45%201%201z'/%3e%3c/svg%3e",hk="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23fff'%20d='M19.378%204.405a1.813%201.813%200%201%201%202.565%202.565L9.571%2019.342a1.813%201.813%200%200%201-2.565%200l-4.949-4.949a1.814%201.814%200%200%201%202.428-2.69l.137.126%203.666%203.666z'/%3e%3c/svg%3e",jh=y.forwardRef(({id:e,message:t,variant:r},n)=>{const{closeSnackbar:o}=ms.useSnackbar(),s={success:{color:"#fff",icon:u.jsx("img",{width:25,src:hk,style:{borderRadius:"50%",backgroundColor:"#4caf50",color:"white",fontSize:"12px",padding:3}})},error:{color:"#f44336",icon:u.jsx(Gc,{sx:{color:"#f44336"}})},info:{color:"#2196f3",icon:u.jsx(fk,{sx:{color:"#2196f3"}})},delete:{color:"#fff",icon:u.jsx("img",{src:pk,width:25,style:{borderRadius:"50%",backgroundColor:"#ffdfd4",color:"red",fontSize:"16px",padding:3}})}},i=s[r]||s.info;return u.jsx(ms.SnackbarContent,{ref:n,children:u.jsxs(g.Box,{sx:{backgroundColor:"white",color:"#333",padding:"8px 16px",borderRadius:"8px",boxShadow:"0 3px 10px rgba(0,0,0,0.2)",display:"flex",alignItems:"center",width:{xs:"90%",sm:"auto"},minWidth:"300px",borderLeft:`5px solid ${i.color}`},children:[u.jsx(g.Box,{sx:{mr:1.5},children:i.icon}),u.jsx(g.Typography,{variant:"body2",sx:{flexGrow:1},children:t}),u.jsx(g.IconButton,{size:"small",onClick:()=>o(e),children:u.jsx(Ur,{fontSize:"small"})})]})})}),Rh=y.createContext(void 0),mk=({children:e})=>{const[t,r]=y.useState([]),[n,o]=y.useState([]),[s,i]=y.useState(!1);return u.jsx(Rh.Provider,{value:{googleEvents:t,setGoogleEvents:r,outlookEvents:n,setOutlookEvents:o,isLoadingGoogleEvents:s,setIsLoadingGoogleEvents:i},children:e})},gk=()=>{const e=y.useContext(Rh);if(e===void 0)throw new Error("useEvents must be used within an EventsProvider");return e},vk=(e,t,r)=>{const n=(i,a)=>a?new Date(a):i?new Date(i.replace(/-/g,"/")):new Date,o=n(e.start.date,e.start.dateTime);let s=n(e.end.date,e.end.dateTime);return e.end.date&&!e.end.dateTime&&s.setDate(s.getDate()-1),{eventoID:Math.abs(yk(e.id)),titulo:e.summary||"(Sin título)",descripcion:e.description,fechaInicio:o,fechaFin:s,todoElDia:!!(e.start.date&&!e.start.dateTime),color:"#4285F4C",hasVideoCall:!!e.conferenceData,link:e.htmlLink,repetir:void 0,solID:null,disID:t,client:null,usrID:r,solicitudRelacionada:[],isGoogleEvent:!0}};function yk(e){let t=0;for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);t=(t<<5)-t+n,t|=0}return t}function bk(e){let t=0;for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);t=(t<<5)-t+n,t|=0}return t}const _k=(e,t,r)=>{const n=new Date(e.start.dateTime);let o=new Date(e.end.dateTime);e.isAllDay&&o.setDate(o.getDate()-1);let s="#0078D4";return console.log("outlookEvent",e),{eventoID:Math.abs(bk(e.id)),titulo:e?.summary||"(Sin título)",descripcion:e.body?.content||"",fechaInicio:n,fechaFin:o,todoElDia:e.isAllDay,color:s,hasVideoCall:!!e.onlineMeetingUrl,link:e.webLink,repetir:void 0,solID:null,disID:t,client:null,usrID:r,solicitudRelacionada:[],isGoogleEvent:!1,isOutlookEvent:!0}},xk=({userId:e,leads30Days:t,leads90Days:r,disId:n,masNombreBD:o})=>{const[s,i]=y.useState(new Date),[a,c]=y.useState([]),[l,d]=y.useState(!1),[f,p]=y.useState(null),[m,v]=y.useState(!1),[h,b]=y.useState(null),[w,S]=y.useState([]),{enqueueSnackbar:k}=ms.useSnackbar(),C=Cc(),x=Ei(),H=bc(),[E,I]=y.useState(!1),[P,A]=y.useState([]),[Y,Z]=y.useState(null),{session:V,sessionoutlook:W}=sc(),{googleEvents:le,setGoogleEvents:R,outlookEvents:X,setOutlookEvents:re}=gk(),[ve,L]=y.useState([]),[ee,Ee]=y.useState([]),[te,he]=y.useState([]),[ue,ce]=y.useState(!1),[be,_e]=y.useState([]),pe=(F,fe)=>{A(F),Z(fe),I(!0)},ge=async()=>{if(e===void 0)return;const F=await C.getNotificacionesXUsuario(e,!1);console.log("userId",F),_e(F)};y.useEffect(()=>{const F=new Date,fe=_.startOfDay(F),M=_.endOfDay(_.addDays(fe,6)),U={start:fe,end:M},Se=a.filter($e=>{const K={start:$e.fechaInicio,end:$e.fechaFin};return zd(K,U)}).sort(($e,K)=>$e.fechaInicio.getTime()-K.fechaInicio.getTime());S(Se)},[a]),y.useEffect(()=>{const F=async()=>{try{if(e){const M=await C.getEventsByUser(e);ge(),c(M)}}catch(M){console.log("Error al cargar eventos locales:",M)}};F();const fe=setInterval(F,4e3);return()=>clearInterval(fe)},[e]),y.useEffect(()=>{if(!n||!e)return;const F=[...a];if(le.length>0&&V?.userEmail){const fe=le.map(M=>vk(M,n,e));F.push(...fe)}if(X.length>0&&W?.userEmail){const fe=X.map(M=>_k(M,n,e));F.push(...fe)}L(F)},[a,le,X,n,e,V?.userEmail,W?.userEmail]);const Ae=async F=>{try{if(F?.isGoogleEvent||F.isOutlookEvent)p(F),d(!0);else{const fe=await C.getEventById(F.eventoID);p(fe),d(!0)}}catch(fe){console.error(fe)}},N=()=>{d(!1),p(null)},Ue=async(F,fe)=>{let M,U;F.todoElDia?(M=new Date(`${F.fechaInicio}T${F.horaInicio}`),U=new Date(`${F.fechaInicio}T${F.horaFin}`)):(M=new Date(`${F.fechaInicio}T${F.horaInicio}`),U=F.fechaFin&&F.horaFin?new Date(`${F.fechaFin}T${F.horaFin}`):new Date(`${F.fechaInicio}T${F.horaFin}`));const Se=_.format(M,"yyyy-MM-dd HH:mm:ss.SSS"),$e=_.format(U,"yyyy-MM-dd HH:mm:ss.SSS");if(fe){const ie={...F,eventoID:fe,fechaInicio:Se,fechaFin:$e,solID:F.solID??null,disID:n??null,client:F.client,invitados:F.invitados.map(de=>({usrNombre:de.nombre||de.usrNombre,Correo:de.correo||de.Correo,EsOrganizador:de.isHost||de.EsOrganizador,StatusInvitacion:de.StatusInvitacion,UsuarioID:de.usrID||de.UsuarioID,disID:de.disID||n}))};try{const de=await C.updateEvent(ie);var K=a.map(De=>De.eventoID===de.eventoID?de:De);c(K),k("El evento se ha actualizado correctamente.",{variant:"success"}),N()}catch{k("Error al actualizar Evento",{variant:"error"})}}else{console.log("formData",F);const ie={...F,fechaInicio:Se,fechaFin:$e,todoElDia:F.todoElDia,solID:F.solID??null,disID:n??null,client:F.client,invitados:F.invitados.map(de=>({usrNombre:de.nombre||de.usrNombre,Correo:de.correo||de.Correo,EsOrganizador:de.isHost||de.EsOrganizador,StatusInvitacion:de.StatusInvitacion,UsuarioID:de.usrID||de.UsuarioID,disID:de.disID||n}))};try{const de=await C.createEvent(ie,e);c(De=>[...De,de]),k("El evento se ha creado con éxito",{variant:"success"}),N()}catch{k("Error al guardar Evento",{variant:"error"})}}if(e){const ie=await C.getEventsByUser(e);c(ie)}},tt=()=>{i(F=>new Date(F.getFullYear(),F.getMonth()-1,1))},He=()=>{i(F=>new Date(F.getFullYear(),F.getMonth()+1,1))},Me=()=>{v(!0)},Le=()=>{b(new Date),d(!0)},pt=F=>{F&&i(F)},st=F=>{b(F),d(!0),p(null)},D=async()=>{if(f)try{await C.deleteEvent(f.eventoID),c(a.filter(F=>F.eventoID!==f.eventoID)),k("El evento se ha eliminado de tu calendario",{content:(F,fe)=>u.jsx(jh,{id:F,message:String(fe),variant:"delete"})})}catch{k("Error al eliminar Evento",{variant:"error"})}finally{N(),v(!1)}},O=async()=>{if(!(!V?.userEmail||!n)){ce(!0);try{const fe=(await x.getGoogleCalendars(V.userEmail,n)).map(U=>({...U,selected:!0}));Ee(fe);const M=fe.map(U=>U.id);j(M)}catch(F){console.error("Error Google Cals:",F)}finally{ce(!1)}}},z=async F=>{const fe=ee.map(U=>U.id===F?{...U,selected:!U.selected}:U);Ee(fe);const M=fe.filter(U=>U.selected).map(U=>U.id);j(M)},ae=async()=>{if(!(!W?.userEmail||!n)){ce(!0);try{const fe=(await H.getOutlookCalendars(W.userEmail,n)).map(U=>({...U,selected:!0}));he(fe);const M=fe.map(U=>U.id);oe(M)}catch(F){console.error("Error Outlook Cals:",F)}finally{ce(!1)}}},se=async F=>{const fe=te.map(U=>U.id===F?{...U,selected:!U.selected}:U);he(fe);const M=fe.filter(U=>U.selected).map(U=>U.id);oe(M)};y.useEffect(()=>{O()},[V?.userEmail,n]),y.useEffect(()=>{ae()},[W?.userEmail,n]);const j=async F=>{if(!V?.userEmail||!n)return;const fe=F||ee.filter(M=>M.selected).map(M=>M.id);try{const M={disID:n,year:s.getFullYear(),month:s.getMonth()+1,usrMail:V.userEmail,calendarIds:fe},U=await x.getGoogleEventsByMonth(M);R(U)}catch(M){console.error("Error al obtener eventos de Google:",M)}},oe=async F=>{if(!W?.userEmail||!n)return;const fe=F||te.filter(M=>M.selected).map(M=>M.id);try{const M={disID:n,year:s.getFullYear(),month:s.getMonth()+1,usrMail:W.userEmail,calendarIds:fe},U=await H.getOutlookEventsByMonth(M);re(U)}catch(M){console.error("Error al obtener eventos de Outlook:",M)}};return n===void 0||e===void 0?u.jsx("div",{children:"Cargando configuración de usuario..."}):u.jsxs("div",{id:"Agenda",style:{height:"100%",width:"100%"},children:[u.jsx(ey,{header:u.jsx(b2,{currentDate:s,onPrevMonth:tt,onNextMonth:He,onAddEvent:Le,onDateChange:pt}),sidebar:u.jsx(Ex,{onEventClick:Ae,upcomingEvents:w,leads30Days:t,leads90Days:r,disID:n,usrID:e,onAddEvent:Le,googleCalendars:ee,outlookCalendars:te,isLoadingCalendars:ue,onToggleGoogle:z,onToggleOutlook:se,notifications:be,unreadCount:be?.filter(F=>!F.leida).length}),mainContent:u.jsx(Ox,{onSeeMoreClick:pe,currentDate:s,events:ve,onDayClick:st,onEventClick:Ae})}),l&&u.jsx(ok,{isVisible:l,onClose:N,onSave:Ue,onDelete:Me,selectedDate:h,initialEvent:f,userId:e,masNombreBD:o,disId:n}),u.jsx(ak,{isOpen:m,onClose:()=>v(!1),onConfirm:D,title:"Eliminar evento",message:"¿De verdad deseas eliminar este evento? Esta acción no se puede deshacer."}),u.jsx(lk,{isOpen:E,onClose:()=>I(!1),events:P,date:Y,onEventClick:Ae})]})},wk="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='22'%20height='22'%3e%3cpath%20fill='%23070c10'%20d='M18.575%203.172A10.829%2010.829%200%200%200%201.564%2016.284l-.028-.051L0%2021.843l5.739-1.506a10.7%2010.7%200%200%200%205.173%201.318%2010.83%2010.83%200%200%200%207.663-18.483m-7.658%2016.655a8.94%208.94%200%200%201-4.62-1.277l.041.023-.329-.194-3.405.894.908-3.321-.214-.34a8.9%208.9%200%200%201-1.376-4.782%209%209%200%201%201%209%209Zm4.935-6.736c-.27-.135-1.6-.789-1.848-.88s-.429-.135-.61.136-.7.879-.856%201.06-.316.2-.586.068a7.5%207.5%200%200%201-2.183-1.349l.007.007a8.2%208.2%200%200%201-1.483-1.842l-.02-.038c-.157-.27-.017-.417.118-.551s.271-.316.406-.473a1.9%201.9%200%200%200%20.267-.44v-.012a.5.5%200%200%200%20.05-.216.5.5%200%200%200-.074-.26c-.068-.135-.609-1.467-.834-2.009s-.444-.455-.609-.464-.338-.009-.519-.009a.99.99%200%200%200-.72.337%203.03%203.03%200%200%200-.947%202.2v.058a5.27%205.27%200%200%200%201.114%202.815v-.011a12.16%2012.16%200%200%200%204.553%204.053l.068.031a14%2014%200%200%200%201.434.539l.109.03a3.6%203.6%200%200%200%201.077.161%203.7%203.7%200%200%200%20.648-.057h-.023a2.8%202.8%200%200%200%201.819-1.274l.007-.012a2.2%202.2%200%200%200%20.19-.9%202.3%202.3%200%200%200-.034-.395v.014c-.067-.113-.248-.18-.519-.316Z'/%3e%3c/svg%3e",Sk="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='25.085'%20height='18.5'%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='none'%20d='M0%200h25.085v18.5H0z'%20data-name='Rectángulo%204598'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23a)'%20data-name='Grupo%207946'%3e%3cpath%20d='M23.12%205.809V3.226a3.2%203.2%200%200%200-.068-.656l-3.141%202.21a7.8%207.8%200%200%201%203.209%201.032'%20data-name='Trazado%2013329'/%3e%3cpath%20d='M11.847%209.791c-.1.009-.2.023-.308.023a3.78%203.78%200%200%201-2.18-.688L.067%202.58A3.2%203.2%200%200%200%200%203.227V13.98a3.23%203.23%200%200%200%203.226%203.226h9.611a7.86%207.86%200%200%201-.99-7.414'%20data-name='Trazado%2013330'/%3e%3cpath%20d='M12.478%207.369%2021.92.737A3.2%203.2%200%200%200%2019.894%200H3.226a3.2%203.2%200%200%200-2.031.74l9.4%206.628a1.64%201.64%200%200%200%201.881%200'%20data-name='Trazado%2013331'/%3e%3cpath%20d='M23.356%208.407a5.914%205.914%200%201%200%200%208.364%205.92%205.92%200%200%200%200-8.364m-1.833%204.842a.54.54%200%200%201-1.081%200v-1.164l-2.513%202.516a.54.54%200%200%201-.765-.763l2.515-2.515h-1.167a.54.54%200%201%201%200-1.081h2.471a.54.54%200%200%201%20.54.54Z'%20data-name='Trazado%2013332'/%3e%3c/g%3e%3c/svg%3e";function Kc(e,t,r){return e.accessor?e.accessor(t,r):e.field?t?.[e.field]:t?.[e?.key||""]}function Ck(e,t){const r=e??"",n=t??"";return r instanceof Date&&n instanceof Date?r.getTime()-n.getTime():typeof r=="number"&&typeof n=="number"?r-n:typeof r=="boolean"&&typeof n=="boolean"?Number(r)-Number(n):String(r).localeCompare(String(n),void 0,{numeric:!0,sensitivity:"base"})}function Qc(e,t,r=!0){return typeof e=="function"?e(t):e??r}function Ek(e){return e.replace(/[^\d]/g,"")}function Dk(e,t){return t}var ts={},Nh;function kk(){if(Nh)return ts;Nh=1;var e=nt();Object.defineProperty(ts,"__esModule",{value:!0}),ts.default=void 0;var t=e(ut()),r=at();return ts.default=(0,t.default)((0,r.jsx)("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61"}),"FilterAlt"),ts}var Tk=kk();const Ik=rt(Tk);var rs={},$h;function Ak(){if($h)return rs;$h=1;var e=nt();Object.defineProperty(rs,"__esModule",{value:!0}),rs.default=void 0;var t=e(ut()),r=at();return rs.default=(0,t.default)((0,r.jsx)("path",{d:"M15.5 14h-.79l-.28-.27c1.2-1.4 1.82-3.31 1.48-5.34-.47-2.78-2.79-5-5.59-5.34-4.23-.52-7.79 3.04-7.27 7.27.34 2.8 2.56 5.12 5.34 5.59 2.03.34 3.94-.28 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"SearchRounded"),rs}var Mk=Ak();const Pk=rt(Mk);var ns={},Lh;function Ok(){if(Lh)return ns;Lh=1;var e=nt();Object.defineProperty(ns,"__esModule",{value:!0}),ns.default=void 0;var t=e(ut()),r=at();return ns.default=(0,t.default)((0,r.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),ns}var jk=Ok();const Rk=rt(jk);var os={},zh;function Nk(){if(zh)return os;zh=1;var e=nt();Object.defineProperty(os,"__esModule",{value:!0}),os.default=void 0;var t=e(ut()),r=at();return os.default=(0,t.default)((0,r.jsx)("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp"),os}var $k=Nk();const Lk=rt($k);function Bh(e){return e==="right"?"end":e==="center"?"center":"start"}function Fh(e){const t=e.filter(r=>!r.width).length||1;return e.map(r=>typeof r.width=="number"?`${r.width}px`:typeof r.width=="string"?r.width:`minmax(0, ${1/t}fr)`).join(" ")}const zk=1060,Xc=(e,t)=>e.metrics.find(r=>String(r.label).toLowerCase()===t.toLowerCase())?.value??"";function Bk({sections:e,detailColumns:t,summaryWidths:r=["1fr",120,120,150],minWidth:n=zk,getDetailColumns:o,onRowClick:s}){function c(d){if(typeof d=="number")return d;if(!d)return 0;const f=/^(\d+)\s*px$/.exec(d.trim());return f?Number(f[1]):/fr$/i.test(d)?160:0}function l(d){const f=d.reduce((v,h)=>v+c(h.width),0),p=Math.max(d.length-1,0)*16;return f+p+32}return u.jsx(g.Box,{sx:{border:"1px solid rgba(0,0,0,0.15)",overflow:"hidden",bgcolor:"background.paper",width:"100%"},children:u.jsxs(g.Box,{children:[u.jsx(g.Box,{sx:{display:"grid",gridTemplateColumns:r.map(d=>typeof d=="number"?`${d}px`:d).join(" "),columnGap:"16px",alignItems:"center",px:"16px",py:1,bgcolor:"#1E5BCE",color:"#fff",boxSizing:"border-box"},children:["Tipo","En Proceso","Finalizadas","Último seg."].map(d=>u.jsx(g.Typography,{sx:{fontSize:13,fontWeight:800},children:d},d))}),e.map((d,f)=>{const[p,m]=J.useState(!!d.initiallyOpen),v=f%2===1,h=o?o(d):t,b=Math.max(n,l(h));return u.jsxs(g.Box,{children:[u.jsxs(g.Box,{sx:{display:"grid",gridTemplateColumns:r.map(w=>typeof w=="number"?`${w}px`:w).join(" "),columnGap:"16px",alignItems:"center",px:"16px",py:1,bgcolor:v?"rgba(30,91,206,0.06)":"background.paper",borderTop:"1px solid rgba(0,0,0,0.08)","&:hover":{bgcolor:"rgba(30,91,206,0.12)"},boxSizing:"border-box",cursor:"pointer"},onClick:()=>m(w=>!w),children:[u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[u.jsx(g.IconButton,{size:"small",disableRipple:!0,children:p?u.jsx(Lk,{}):u.jsx(Rk,{})}),u.jsx(g.Typography,{sx:{fontWeight:700,fontSize:14,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:String(d.title),children:d.title})]}),u.jsx(g.Typography,{sx:{fontSize:13.5,fontWeight:800},children:Xc(d,"En Proceso")}),u.jsx(g.Typography,{sx:{fontSize:13.5,fontWeight:800},children:Xc(d,"Finalizadas")}),u.jsx(g.Typography,{sx:{fontSize:13.5,fontWeight:800},children:Xc(d,"Último seg.")})]}),u.jsx(g.Collapse,{in:p,unmountOnExit:!0,children:u.jsxs(g.Box,{sx:{overflowX:"auto","&::-webkit-scrollbar":{height:"5px"}},children:[u.jsx(g.Box,{sx:{minWidth:b,display:"grid",gridTemplateColumns:Fh(h),columnGap:"16px",alignItems:"center",px:"16px",py:1,bgcolor:"rgba(30,91,206,0.18)",color:"#1a1a1a",borderTop:"1px solid rgba(0,0,0,0.12)",boxSizing:"border-box"},children:h.map(w=>u.jsx(g.Typography,{sx:{justifySelf:Bh(w.align),textAlign:w.align??"left",fontSize:12.5,fontWeight:800,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:w.header},w.key))}),(d.rows??[]).map((w,S)=>u.jsx(g.Box,{sx:{minWidth:b,display:"grid",gridTemplateColumns:Fh(h),columnGap:"16px",alignItems:"center",px:"16px",py:1,bgcolor:S%2===0?"background.paper":"rgba(30,91,206,0.06)",borderTop:"1px solid rgba(0,0,0,0.06)","&:hover":{bgcolor:"rgba(30,91,206,0.12)"},boxSizing:"border-box",cursor:"pointer"},onClick:()=>s?.(w,d),children:h.map((k,C)=>{const x=k.accessor?k.accessor(w,S):k.field?w[k.field]:null;return u.jsx(g.Box,{sx:{justifySelf:Bh(k.align),textAlign:k.align??"left",minWidth:0},children:typeof x=="string"||typeof x=="number"?u.jsx(g.Typography,{sx:{fontSize:13,fontWeight:/^(estatus|seg|avance|nivel|asesor|fecha)$/i.test(k.key)?700:500,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:String(x),children:x}):x},k.key??C)})},w.id??S))]})})]},d.id)})]})})}var ss={},Vh;function Fk(){if(Vh)return ss;Vh=1;var e=nt();Object.defineProperty(ss,"__esModule",{value:!0}),ss.default=void 0;var t=e(ut()),r=at();return ss.default=(0,t.default)((0,r.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2m3.3 14.71L11 12.41V7h2v4.59l3.71 3.71z"}),"AccessTimeFilled"),ss}var Vk=Fk();const Uk=rt(Vk),Hk=e=>e?new Date(e).toLocaleDateString("es-MX",{day:"2-digit",month:"short",year:"numeric"}).replace(".",""):"",Wk=e=>{const t=`${e?.Nombre??""} ${e?.Apellido??""}`.trim();return t||(e?.IdAsesor?e?.Correo??"Usuario":"Sin asesor asignado")},Yk=e=>{const t=(e||"").split(" ").filter(Boolean);return t.length>=2?(t[0][0]+t[1][0]).toUpperCase():(e?.[0]??"?").toUpperCase()};var is={},Uh;function qk(){if(Uh)return is;Uh=1;var e=nt();Object.defineProperty(is,"__esModule",{value:!0}),is.default=void 0;var t=e(ut()),r=at();return is.default=(0,t.default)((0,r.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Create"),is}var Zk=qk();const Gk=rt(Zk),Jc=({current:e,total:t,color:r="#4caf50"})=>u.jsx("div",{style:{display:"flex",gap:"1px",width:"100%",height:"100%",justifyContent:"center"},children:Array.from({length:t}).map((n,o)=>u.jsx("div",{style:{width:"7px",height:"7px",borderRadius:"2px",backgroundColor:o<e?r:"#e0e0e0",display:"flex"}},o))});var as={},Hh;function Kk(){if(Hh)return as;Hh=1;var e=nt();Object.defineProperty(as,"__esModule",{value:!0}),as.default=void 0;var t=e(ut()),r=at();return as.default=(0,t.default)((0,r.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),as}var Qk=Kk();const Wh=rt(Qk),Xk=e=>{const t=String(e??"").toLowerCase().trim();return t==="muy interesado"?{bg:"#E53935",color:"#FFFFFF"}:t==="interesado"?{bg:"#FB8C00",color:"#FFFFFF"}:t==="venta definitiva"?{bg:"#2E7D32",color:"#FFFFFF"}:t==="no sé"||t==="no se"?{bg:"#9E9E9E",color:"#FFFFFF"}:t==="algo interesado"?{bg:"#FFEB3B",color:"#000000"}:{bg:"transparent",color:"#2c2c2c"}},Jk=e=>{switch(parseInt(String(e??""),10)){case 1:return"Por Asignar";case 2:return"Solicitud Asignada";case 3:return"Solicitud asignada en proceso";case 4:return"Finalizadas sin Venta";case 5:return"Finalizadas con Venta";case 6:return"Rechazadas";case 7:return"Finalizada por sistema";case 8:return"";case 9:return"";case 10:return"Prospección";case 11:return"Interés Real";case 12:return"Proceso de Compra";case 13:return"";case 14:return"En espera de Unidad";case 15:return"Auto Facturado";case 16:return"";case 17:return"";case 18:return"Compró otra Marca";case 19:return"No comprará";default:return null}},e3=e=>{switch(parseInt(String(e??""),10)){case 1:return"Por asignar";case 2:return"Solicitud Asignada";case 3:return"En seguimiento";case 6:return"Rechazada";case 7:return"Finalizada sin enviar a Ventas";case 8:return"Finalizada enviado a Ventas";default:return null}},t3=e=>{switch(parseInt(String(e??""),10)){case 0:return"Sin asignar";case 1:return"Confirmado";case 2:return"Solicitud Asignada";case 3:return"En seguimiento";case 4:return"Confirmado";case 5:return"Finalizada";case 6:return"Rechazada";case 10:return"Reagendado";case 20:return"Seguimiento [Cita Finalizada]";case 30:return"Reenvio";case 40:return"Seguimiento [Mecanico]";case 50:return"Seguimiento";default:return null}};function r3(e){const t=new Date(e),r=t.toLocaleDateString("es-MX",{day:"2-digit",month:"short",year:"numeric"}),n=t.toLocaleTimeString("es-MX",{hour:"2-digit",minute:"2-digit"});return`${r.replace(".","")} • ${n}`}function n3(e){return e.replace(/<br\s*\/?>/gi,`
178
178
  `).replace(/\r\n/g,`
179
179
  `).replace(/\r/g,`
180
- `)}const JD={Todos:[],"Sin Asignar":["Sin Asignar"],"En prospección":["Prospección"],"Proceso de Compra":["Proceso de Compra"],"En espera de Unidad":["En Espera de Unidad"],"Auto Facturado":["Auto Facturado"],Rechazadas:["Rechazada","Rechazadas"],"Finalizadas sin Venta":["Sin Venta"],"Finalizadas con Venta":["Con Venta"],"En Proceso":["Asignada","Prospección","Sin Asignar","Proceso de Compra","En Espera de Unidad","Auto Facturado","Sin Atender"]},e3={Todos:[],"Selección y presentación de vehículos":["Selección y presentación de vehículos"],"Prueba de Manejo":["Prueba de Manejo"],"Valoración del Auto a cuenta y/o enganche":["Valoración del Auto a cuenta y/o enganche"],"Entrega de vehículo":["Entrega de vehículo"],"Negociación y Cierre":["Negociación y Cierre"]},t3={Todos:[],"Algo interesado":["Algo interesado"],Interesado:["Interesado"],"Muy interesado":["Muy interesado"],"Venta definitiva":["Venta definitiva"],"No sé":["No sé"]};function r3(e,t){switch(e){case"pruebas":return GD(t)??"—";case"servicio":return KD(t)??"—";case"nuevos":case"seminuevos":default:return ZD(t)??"—"}}function n3({open:e,onClose:t,customer:r,fields:n=[],header:o,extraSections:s,normalTable:i,normalTableColumns:a=[],history:c=[],advisorHistory:l=[],onRequestEdit:d,searchFilter:f,solicitudesNuevos:p=[],solicitudesPrueba:y=[],solicitudesServicio:m=[],solicitudesSeminuevos:h=[],onCreateSolicitud:b,isCrmMode:S=!1,onSolicitudBaseUrl:C,onIframeClose:D,reloadInfo:k,idAdminSistemas:w}){if(!r)return null;const B=3,[E,I]=v.useState(null),P=!!E,[A,W]=v.useState(!1),[q,F]=v.useState(null),[Z,le]=v.useState(c??[]),[V,ee]=v.useState(null),ue=v.useMemo(()=>[...l].sort(($,Y)=>new Date(Y.FechaAsignacion).getTime()-new Date($.FechaAsignacion).getTime()),[l]);v.useEffect(()=>{c&&c.length&&le(c)},[c]);const ye=c?.length?c:Z,L=o?.title??($=>$?.Nombre||$?.name||"Sin título"),te=o?.infoItems??[],J=$=>$.nombreAsesor?.trim()||($.Email?$.Email:"Sistema"),H=$=>{const Y=$||"",_e=Y.split(" ").filter(Boolean);return _e.length>=2?(_e[0][0]+_e[1][0]).toUpperCase():(Y[0]||"?").toUpperCase()},K=$=>$?.SolID??$?.solID??$?.SolId??$?.SOLID??null,ae=v.useMemo(()=>!V||q==null?ye??[]:(ye??[]).filter($=>{const Y=K($);return Y!=null&&String(Y)===String(q)}),[ye,V,q]),ce=v.useMemo(()=>[...ae].sort(($,Y)=>new Date(Y.fecAlta).getTime()-new Date($.fecAlta).getTime()),[ae]),[me,ge]=v.useState(!1),fe=v.useMemo(()=>me?ce:ce.slice(0,B),[me,ce]),he=Math.max(ce.length-B,0),Pe=$=>String($??"").normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase().trim(),N=($,Y)=>Pe(JSON.stringify($)).includes(Pe(Y)),Ve=($,Y)=>f?f($,Y):N($,Y),et=($,Y)=>{const _e=Pe(Y).split(/\s+/).filter(Boolean);return _e.length?_e.every(Me=>Ve($,Me)):!0},[Ue,Ae]=v.useState(""),[Be,pt]=v.useState([]);v.useMemo(()=>i??[],[i]),v.useMemo(()=>{const $=Ue.trim();return $?(i??[]).filter(Y=>et(Y,$)):i??[]},[i,Ue]);const rt=g.useTheme(),x=g.useMediaQuery(rt.breakpoints.down("md")),[M,j]=v.useState(""),[re,se]=v.useState(!0),[O,ne]=v.useState(!1),we=new Date().toISOString().slice(0,10),De=new Date(Date.now()-720*3600*1e3).toISOString().slice(0,10),[R,ie]=v.useState(De),[Se,qe]=v.useState(we),[Q,de]=v.useState(null),ke=!!Q,[Te,lt]=v.useState("En Proceso"),[Bt,on]=v.useState("Todos"),[Yt,$r]=v.useState("Todos"),sn=["Algo interesado","Interesado","Muy interesado","Venta definitiva","No sé"],cr=["Selección y presentación de vehículos","Prueba de Manejo","Valoración del Auto a cuenta y/o enganche","Entrega de vehículo","Negociación y Cierre"],tl=()=>{j(""),se(!1),ne(!1),ie(De),qe(we),lt("Todos"),on("Todos"),$r("Todos")},Sn=v.useMemo(()=>(M??"").trim()!==""||Te!=="Todos"||Bt!=="Todos"||re||O||Yt!=="Todos",[M,Te,Bt,re,O,Yt]);function Gn($){if(!$)return"";const Y=new Date($);if(isNaN(Y.getTime()))return"";const _e=String(Y.getDate()).padStart(2,"0"),Me=String(Y.getMonth()+1).padStart(2,"0"),ut=String(Y.getFullYear()).slice(-2);return`${_e}/${Me}/${ut}`}function ds($){const Y=$?new Date($):null;return Y&&!isNaN(Y.getTime())?Y:null}function Xi($,Y){let _e=null;for(const Me of $){const ut=ds(Y(Me));if(ut){const Fe=ut.getTime();(_e===null||Fe>_e)&&(_e=Fe)}}return _e?new Date(_e):null}function Ji($){const Y=Xi($,_e=>_e.UltimoSeguimiento||_e.FechaCita);return Y?Gn(Y.toISOString()):"—"}function ea($){const Y=($??"").toLowerCase().trim();return Y==="sin venta"||Y==="con venta"||Y==="rechazada"||Y==="rechazadas"}function fs($){return $.filter(Y=>ea(Y.EstatusDescripcion)).length}function ps($){return $.filter(Y=>!ea(Y.EstatusDescripcion)).length}const rl=({progress:$,color:Y})=>{if(!$)return u.jsx(Qc,{current:0,total:0,color:Y});const _e=$.split("/").map(Number);if(_e.length!==2||_e.some(Fe=>Number.isNaN(Fe)))return u.jsx(Qc,{current:0,total:0,color:Y});const[Me,ut]=_e;return u.jsx(Qc,{current:Me,total:ut,color:Y})};function ta($){return[{key:"fecha",header:"Fecha",accessor:Y=>Gn(Y.Fecha),width:110},{key:"vehiculo",header:"Vehículo",accessor:Y=>u.jsx(g.Tooltip,{title:Y.Vehiculo??"",placement:"top",arrow:!0,children:u.jsx(g.Typography,{component:"span",sx:{fontSize:13,fontWeight:500,display:"block",maxWidth:260,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",lineHeight:1.3,cursor:"default"},children:Y.Vehiculo??"—"})}),width:260},{key:"estatus",header:"Estatus",accessor:Y=>u.jsx(g.Typography,{sx:{fontWeight:800,fontSize:13},children:r3($,Y.IdEstatus)}),width:170},{key:"nivel",header:"Nivel de Interés",accessor:Y=>{const{bg:_e,color:Me}=qD(Y.NivelInteres);return u.jsx(g.Box,{sx:{display:"inline-block",px:1,py:.25,borderRadius:9999,bgcolor:_e,color:Me,fontSize:12,fontWeight:Y.NivelInteres?800:500},children:Y.NivelInteres??"—"})},width:150},{key:"asesor",header:"Asesor",accessor:Y=>{const _e=(Y.Asesor??"").trim(),Me=sl=>{if(!sl)return"";const A3=sl[0]?.toUpperCase()??"",M3=sl[1]?.toLowerCase()??"";return`${A3}${M3}`};if(!_e)return u.jsx(g.Tooltip,{title:"",placement:"top",children:u.jsx(g.Typography,{sx:{fontWeight:700,fontSize:13,textAlign:"center"},children:"—"})});const ut=_e.split(/\s+/),Fe=ut[0]??"",lr=ut[1]??"",er=Me(Fe),Yr=Me(lr),I3=`${er}${Yr}`||"—";return u.jsx(g.Tooltip,{title:_e,placement:"top",children:u.jsx(g.Typography,{sx:{fontWeight:700,fontSize:13,textAlign:"center"},children:I3})})},width:120,align:"center"},{key:"origen",header:"Origen",accessor:Y=>Y.Origen??"—",width:120,align:"center"},{key:"actividad",header:"Actividad",accessor:Y=>u.jsx(g.Tooltip,{title:Y.Actividad??"",placement:"top",arrow:!0,children:u.jsxs(g.Box,{sx:{maxWidth:160,overflow:"hidden",display:"flex",gap:.5,alignItems:"center"},children:[Y.Icon&&u.jsx("span",{style:{color:"#fff",backgroundColor:Y.Color,borderRadius:100,alignItems:"center",justifyContent:"center",display:"flex",padding:3},children:u.jsx("i",{className:Y.Icon})}),u.jsx(g.Typography,{component:"span",noWrap:!0,sx:{fontSize:13,fontWeight:500,display:"block",overflow:"hidden",textOverflow:"ellipsis",lineHeight:1.3,cursor:(Y.Actividad??"").length?"default":"inherit"},children:Y.Actividad??"—"})]})}),width:180},{key:"avance",header:"Avance",accessor:Y=>u.jsx(rl,{progress:Y.Avance,color:Y.Color}),width:"100px",align:"left"}]}function nl($){const _e=ta($).slice(1);return[{key:"fecha",header:"Fecha",accessor:Me=>Gn(Me.Fecha),width:110},{key:"fechaCita",header:"Fecha Cita",accessor:Me=>Gn(Me.FechaCita),width:120},{key:"horaCita",header:"Hora Cita",accessor:Me=>Me.HoraCita??"—",width:110},..._e]}function ol($){const Y=$.kind;switch(Y){case"pruebas":case"servicio":return nl(Y);case"nuevos":case"seminuevos":default:return ta(Y)}}function T($,Y,_e,Me){return{id:$,kind:_e,title:Y,metrics:[{label:"En Proceso",value:ps(Me)},{label:"Finalizadas",value:fs(Me)},{label:"Último seg.",value:Ji(Me)}],rows:Me,initiallyOpen:!1}}const oe=[T("n-1","Cotización de nuevos","nuevos",p),T("p-1","Prueba de Manejo","pruebas",y),T("s-1","Cita de Servicio","servicio",m),T("sn-1","Cotización para Seminuevos","seminuevos",h)],xe=v.useMemo(()=>{const $=(M??"").trim().toLowerCase(),Y=(_e,Me)=>{if($&&!(_e.Vehiculo??"").toLowerCase().includes($))return!1;const ut=O?_e.FechaCita:_e.Fecha;if(re&&ut){const Fe=ds(ut??"");if(!Fe)return!1;const lr=R?new Date(`${R}T00:00:00`):null,er=Se?new Date(`${Se}T00:00:00`):null;if(er&&er.setDate(er.getDate()+1),lr&&Fe<lr||er&&Fe>=er)return!1}if(Te!=="Todos"){const Fe=(_e.EstatusDescripcion??"").toLowerCase();if(!(JD[Te]??[]).some(Yr=>Fe===Yr.toLowerCase()))return!1}if(Bt!=="Todos"){const Fe=(_e.Actividad??"").toLowerCase();if(!(e3[Bt]??[]).some(Yr=>Fe===Yr.toLowerCase()))return!1}if(Yt!=="Todos"){const Fe=(_e.NivelInteres??"").toLowerCase();if(!(t3[Yt]??[]).some(Yr=>Fe===Yr.toLowerCase()))return!1}return!0};return oe.map(_e=>{const Me=(_e.rows??[]).filter(Fe=>Y(Fe,_e.kind)),ut=[{label:"En Proceso",value:ps(Me)},{label:"Finalizadas",value:fs(Me)},{label:"Último seg.",value:Ji(Me)}];return{..._e,rows:Me,metrics:ut}})},[oe,M,re,R,Se,O,Te,Bt,Yt]),Ie={nuevos:"cotizaciones",pruebas:"pruebademanejo",servicio:"citasservicio",seminuevos:"seminuevos"},We=($,Y)=>{const _e=$.SolID;if(!_e)return;const Me=Y.kind,ut=Ie[Me]??"cotizaciones",Fe=`https://qa2.crm.netcar.com.mx/netcar/${ut}/${_e}`,lr=C?.({row:$,section:Y,slug:ut,solId:_e,baseUrl:Fe});if(!S){const er=lr??`https://qa2.crm.netcar.com.mx/netcar/${ut}/${_e}`;F(_e),ee(er),W(!0)}},nt=()=>{D?.(r),F(null),ee(null),W(!1)},$e=v.useRef(!1),Re=v.useRef(null),Ft=v.useCallback(()=>{if(!$e.current){$e.current=!0;return}Re.current&&window.clearTimeout(Re.current),Re.current=window.setTimeout(()=>{k?.(r)},500)},[k,r]);return v.useEffect(()=>{$e.current=!1,Re.current&&window.clearTimeout(Re.current)},[V,q]),u.jsx(g.Dialog,{open:e,onClose:t,fullWidth:!0,fullScreen:x,PaperProps:{sx:{height:{xs:"100dvh",md:"90vh"},maxWidth:{xs:"100vw",md:"92vw"},overflow:"hidden",display:"flex",flexDirection:"column",borderRadius:{xs:0,md:3}}},children:u.jsxs(g.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},height:"100%",minHeight:0,overflow:"auto",position:"relative"},children:[u.jsxs(g.Box,{sx:{width:{xs:"100%",md:405},maxWidth:{xs:"100%",md:405},bgcolor:{xs:"transparent",md:"#40404024"},display:"flex",flexDirection:"column",height:{xs:"auto",md:"100%"},borderRight:{xs:"none",md:"1px solid #EBEEF0"}},children:[u.jsxs(g.Box,{children:[u.jsx(g.Stack,{direction:"row",spacing:2,alignItems:"center",mb:1,sx:{px:2.5,pt:2.5},children:u.jsxs(g.Box,{display:"flex",flexDirection:"column",gap:1,width:"100%",children:[u.jsx(g.Box,{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%",alignItems:"center",children:u.jsx(g.Box,{sx:{flex:1,minWidth:0,pr:1},children:u.jsxs(g.Typography,{component:"span",fontWeight:700,sx:{display:"inline",lineHeight:1.2,wordBreak:"break-word",pr:.5},children:[L(r)," ",u.jsx(g.IconButton,{component:"span",size:"small",disableRipple:!0,onClick:()=>{t?.(),r&&d?.(r)},sx:{p:0,ml:.5,verticalAlign:"text-bottom",color:"#336BE1","&:hover":{bgcolor:"transparent"},"&:focus-visible":{outline:"none"}},"aria-label":"Editar nombre",children:u.jsx(WD,{sx:{fontSize:"1em"}})})]})})}),te.map(($,Y)=>u.jsxs(g.Box,{sx:{display:"flex",gap:1.2,alignItems:"center",cursor:$.onClick?"pointer":"default"},onClick:()=>{$.onClick&&$.onClick(r)},children:[$.icon,u.jsx(g.Typography,{variant:"body2",sx:{color:$.inLink?"#336BE1":"#070C10"},style:{},children:$.value(r)})]},Y))]})}),u.jsx(g.Stack,{mb:2,sx:{px:2.5,pt:0,gap:2},children:n.map(($,Y)=>{const _e=$.label?.toLowerCase().startsWith("asesor");return u.jsxs(g.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[u.jsx(g.Box,{sx:{width:"50%"},children:u.jsx(g.Typography,{variant:"body2",color:"text.secondary",sx:{color:"#5C6372"},children:$.label})}),u.jsxs(g.Box,{sx:{width:"50%",display:"flex",alignItems:"center",gap:1},children:[u.jsx("div",{children:$?.avatar?$.avatar(r):null}),u.jsx(g.Typography,{variant:"body2",color:"textPrimary",children:$?.value(r)}),_e&&!w&&u.jsx(g.Tooltip,{title:"Historial asesores",placement:"top",arrow:!0,children:u.jsx(g.IconButton,{size:"small",onClick:Me=>I(Me.currentTarget),sx:{ml:.5},disableRipple:!0,children:u.jsx(LD,{fontSize:"small",sx:{color:"#5C6372"}})})})]})]},Y)})}),u.jsx(g.Divider,{sx:{my:2}})]}),u.jsx(g.Box,{px:2.5,pb:.5,children:u.jsxs(g.Typography,{children:[u.jsx("span",{style:{fontWeight:800},children:"Última actividad"}),!V&&" por solicitud",":"]})}),u.jsxs(g.Box,{sx:{px:2.5,pt:0,gap:2,flex:1,overflowY:"auto",display:"flex",flexDirection:"column",pb:6,maxHeight:{xs:"140px",md:"100%"}},children:[fe.length===0&&u.jsx(g.Typography,{variant:"body2",color:"text.secondary",children:"Sin actividad registrada."}),u.jsxs(g.Box,{children:[fe?.map(($,Y)=>{const _e=J($),Me=XD($.comentario||"");return u.jsxs(g.Box,{sx:{pb:1.5},children:[u.jsxs(g.Stack,{direction:"row",spacing:1,alignItems:"center",justifyContent:"space-between",sx:{mb:.75},children:[u.jsx(g.Typography,{variant:"subtitle2",sx:{color:"#5C6372"},children:$.tipo||"Evento"}),u.jsx(g.Chip,{size:"small",label:$.auto!=null?`${$.auto}`:"—",sx:{bgcolor:"#336be1",color:"#fff",height:20}})]}),Me?u.jsx(g.Typography,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.5,mb:.75},children:Me}):null,u.jsxs(g.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[$?.ImgAsesor!=null?u.jsx(g.Avatar,{sx:{width:28,height:28,bgcolor:"#EAEBF2",color:"#5C6372",fontSize:14},alt:H(_e),src:$?.ImgAsesor}):u.jsx(g.Avatar,{sx:{width:28,height:28,bgcolor:"#EAEBF2",color:"#5C6372",fontSize:14},children:H(_e)}),u.jsxs(g.Stack,{spacing:0,children:[u.jsx(g.Typography,{variant:"body2",fontWeight:600,children:_e}),u.jsx(g.Typography,{variant:"caption",color:"text.secondary",children:QD($.fecAlta)})]})]}),Y<fe.length-1&&u.jsx(g.Divider,{sx:{mt:1.25}})]},$.SegID??Y)}),ce.length>B&&u.jsx(g.Box,{sx:{mt:1},children:u.jsx(g.Button,{onClick:()=>ge($=>!$),size:"small",sx:{textTransform:"none",px:0,color:"#336BE1","&:hover":{background:"transparent",textDecoration:"underline"}},children:me?"Ver menos":`Ver más (${he})`})})]})]}),u.jsx(g.Menu,{anchorEl:E,open:P,onClose:()=>I(null),TransitionComponent:g.Fade,MenuListProps:{disablePadding:!0},PaperProps:{sx:{width:320,p:0,overflow:"hidden"}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:u.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[u.jsx(g.Box,{sx:{position:"sticky",top:0,zIndex:1,px:1.5,py:1,fontWeight:700,bgcolor:"background.paper",borderBottom:"1px solid",borderColor:"divider"},children:"Historial asesores"}),u.jsxs(g.Box,{sx:{overflowY:"auto",py:.5,maxHeight:200},children:[ue.length===0&&u.jsx(g.Box,{sx:{px:1.5,py:1},children:u.jsx(g.Typography,{variant:"body2",color:"text.secondary",children:"Sin registros"})}),ue.map(($,Y)=>{const _e=BD($),Me=zD($.FechaBaja??$.FechaAsignacion);return u.jsx(g.Box,{sx:{px:1,py:.75},children:u.jsxs(g.Stack,{direction:"row",alignItems:"center",spacing:1,children:[u.jsx(g.Avatar,{sx:{width:28,height:28,bgcolor:"#EAEBF2",color:"#5C6372",fontSize:14},src:$?.ImgAsesor??void 0,children:FD(_e)}),u.jsx(g.Box,{sx:{flex:1,minWidth:0},children:u.jsx(g.Typography,{variant:"body2",noWrap:!0,children:_e})}),u.jsx(g.Typography,{variant:"caption",color:"text.secondary",sx:{whiteSpace:"nowrap"},children:Me})]})},Y)})]})]})})]}),A?u.jsxs(g.Box,{sx:{flex:1,minWidth:0,overflow:"hidden",position:"relative"},children:[u.jsx(g.Box,{sx:{position:"absolute",top:18,left:24,zIndex:10,pointerEvents:"auto"},children:u.jsx(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:u.jsx(g.Button,{onClick:nt,sx:{backgroundColor:"#2571d6",minWidth:36,minHeight:36,p:.5,borderRadius:"8px",color:"#fff",boxShadow:3,"&:hover":{backgroundColor:"#2074e3"}},children:u.jsx(Yc,{fontSize:"medium"})})})}),V&&u.jsx("iframe",{src:V,width:"100%",height:"100%",onLoad:Ft,style:{border:0}})]}):u.jsxs(g.Box,{sx:{width:"100%",minHeight:0,overflowY:"auto"},children:[u.jsx(g.Box,{sx:{mt:{xs:1.5,md:3}},children:u.jsxs(g.Box,{sx:{mt:3,display:"flex",flexDirection:"column",gap:4,padding:"0 20px 0 20px"},children:[u.jsx(g.Typography,{variant:"h4",sx:{fontWeight:800,textAlign:"center",mb:1,letterSpacing:.2},children:"Solicitudes"}),u.jsxs(g.Stack,{direction:{xs:"column",md:"column"},spacing:1.5,alignItems:{xs:"stretch",md:"center"},justifyContent:"space-between",sx:{mb:1.5},children:[u.jsxs(g.Stack,{direction:"row",spacing:1.5,alignItems:"flex-start",sx:{flexWrap:"wrap"},children:[u.jsx(g.TextField,{size:"small",placeholder:"Buscar por vehículo",value:M,onChange:$=>j($.target.value),InputProps:{endAdornment:u.jsx(DD,{fontSize:"small",sx:{color:"#b6afaf"}})},sx:{minWidth:220}}),u.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",gap:.5,position:"relative"},children:[u.jsxs(g.Stack,{direction:"row",spacing:1.1,position:"absolute",bottom:48,left:0,alignItems:"center",children:[u.jsx(g.FormControlLabel,{label:u.jsx(g.Typography,{sx:{fontSize:15,fontWeight:600,marginLeft:0},children:"Por fecha"}),labelPlacement:"start",control:u.jsx(g.Checkbox,{checked:re,onChange:$=>se($.target.checked),size:"small",sx:{p:.3,"& .MuiSvgIcon-root":{fontSize:19},color:"#bab4b4"}}),sx:{ml:0,"& .MuiFormControlLabel-label":{marginRight:0}}}),u.jsx(g.Typography,{sx:{fontSize:15,paddingLeft:.4},children:"De cita"})]}),u.jsxs(g.Stack,{direction:"row",spacing:1,children:[u.jsx(g.TextField,{size:"small",type:"date",label:"Desde",InputLabelProps:{shrink:!0},value:R,onChange:$=>ie($.target.value),disabled:!re,sx:{width:170}}),u.jsx(g.TextField,{size:"small",type:"date",label:"Hasta",InputLabelProps:{shrink:!0},value:Se,onChange:$=>qe($.target.value),disabled:!re,sx:{width:170}})]})]}),u.jsx(g.IconButton,{onClick:$=>de($.currentTarget),disableRipple:!0,sx:{border:"1px solid #d4d7de",borderRadius:2,width:40,height:40,mt:2},children:u.jsx(CD,{})}),Sn&&u.jsx(g.Button,{variant:"outlined",onClick:tl,disableRipple:!0,sx:{height:40,textTransform:"none",borderColor:"#d4d7de",color:"#333",mt:2},children:"Limpiar filtros"}),u.jsx(g.Tooltip,{title:Sn&&"Crear Solicitud",arrow:!0,placement:"top",disableHoverListener:!Sn,children:u.jsx("span",{children:u.jsxs(g.Button,{variant:"outlined",sx:{height:40,textTransform:"none",borderColor:"none",color:"#fff",backgroundColor:"#1e5bce","&:hover":{backgroundColor:"#1e5bce",boxShadow:"none"}},onClick:()=>{b?.(r)},disableRipple:!0,children:[u.jsx(Uh,{sx:{color:"#fff",fontSize:24,paddingRight:.6}}),!Sn&&"Crear Solicitud"]})})})]}),u.jsx(RD,{sections:xe,detailColumns:[],getDetailColumns:ol,onRowClick:We})]})]})}),u.jsx(g.Menu,{anchorEl:Q,open:ke,onClose:()=>de(null),TransitionComponent:g.Fade,PaperProps:{sx:{p:1.5,width:260,borderRadius:2,boxShadow:3}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:u.jsxs(g.Stack,{spacing:1.5,paddingX:1.5,paddingY:1,children:[u.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:700,color:"#070C10"},children:"Filtro"}),u.jsxs(g.Box,{children:[u.jsx(g.Typography,{variant:"body2",sx:{fontWeight:700,mb:.5,color:"#5C6372"},children:"Estatus"}),u.jsx(g.RadioGroup,{value:Te,onChange:$=>lt($.target.value),sx:{"& .MuiFormControlLabel-root":{m:0,py:.3},"& .MuiFormControlLabel-label":{fontSize:14,fontWeight:400,ml:0}},children:["Todos","Sin Asignar","En prospección","Proceso de Compra","En espera de Unidad","Auto Facturado","Rechazadas","Finalizadas sin Venta","Finalizadas con Venta","En Proceso"].map($=>u.jsx(g.FormControlLabel,{value:$,control:u.jsx(g.Radio,{size:"small",sx:{p:.2,"& .MuiSvgIcon-root":{fontSize:18}}}),label:$},$))})]}),u.jsxs(g.Box,{children:[u.jsx(g.Typography,{variant:"body2",sx:{fontWeight:700,mb:.5,color:"#5C6372"},children:"Actividades"}),u.jsx(g.RadioGroup,{value:Bt,onChange:($,Y)=>on(Y),sx:{"& .MuiFormControlLabel-root":{m:0,py:.3},"& .MuiFormControlLabel-label":{fontSize:14,fontWeight:400,ml:0}},children:["Todos",...cr].map($=>u.jsx(g.FormControlLabel,{value:$,sx:{alignItems:"start"},control:u.jsx(g.Radio,{size:"small",sx:{p:.2,"& .MuiSvgIcon-root":{fontSize:18}}}),label:$},$))})]}),u.jsxs(g.Box,{children:[u.jsx(g.Typography,{variant:"body2",sx:{fontWeight:700,mb:.5,color:"#5C6372"},children:"Nivel de interés"}),u.jsx(g.RadioGroup,{value:Yt,onChange:($,Y)=>$r(Y),sx:{"& .MuiFormControlLabel-root":{m:0,py:.3},"& .MuiFormControlLabel-label":{fontSize:14,fontWeight:400,ml:0}},children:["Todos",...sn].map($=>u.jsx(g.FormControlLabel,{value:$,control:u.jsx(g.Radio,{size:"small",sx:{p:.2,"& .MuiSvgIcon-root":{fontSize:18}}}),label:$},$))})]})]})})]})]})})}const Wh={tableClientes:"_tableClientes_acwe7_1",tableResponsive:"_tableResponsive_acwe7_1"};function Hh(e,t,r){const{fields:n,order:o=["nombreCliente","email","acciones"],header:s={},cells:i={},hide:a={},actions:c}=t,l=c??{},d=l.show??{},f=l.handlers??{},p=l.accessors??{},y=l.icons??{},m=l.className??"d-flex flex-row gap-2 align-items-center ",h=l.tooltip??{},b=y.view??u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",style:{fill:"#070c10"},children:[u.jsx("path",{d:"M18.6,6.3c-3.9-3-9.3-3-13.2,0-1.9,1.5-3.2,3.5-3.9,5.7.7,2.3,2,4.3,3.9,5.7,1.9,1.5,4.2,2.3,6.6,2.3,2.4,0,4.7-.8,6.6-2.3,1.9-1.5,3.2-3.5,3.9-5.7-.7-2.3-2-4.3-3.9-5.7ZM17.2,12.1c0,2.9-2.5,5.3-5.4,5.2-2.9,0-5.3-2.5-5.2-5.4,0-2.9,2.5-5.3,5.4-5.2,2.9,0,5.3,2.4,5.2,5.3,0,0,0,0,0,0Z"}),u.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),S={nombreCliente:{key:"nombreCliente",header:s.nombreCliente??"Cliente",accessor:A=>A[n.nombreCliente],cell:i.nombreCliente,width:190},email:{key:"email",header:s.email??"Correo",accessor:A=>A[n.email],cell:i.email??(A=>{const W=String(A[n.email]??"");return W?u.jsx("a",{href:`mailto:${W}`,children:W}):u.jsx("span",{className:"text-muted",children:"—"})}),width:230},acciones:a.acciones?void 0:{key:"acciones",header:"",cell:i.acciones??(A=>{const W=Gc(d.whatsapp,A,!0),q=Gc(d.email,A,!0),F=Gc(d.view,A,!0),Z=p.phone?.(A),le=p.email?.(A),V=ye=>{if(ye.stopPropagation(),f.onWhatsApp)return f.onWhatsApp(A);if(!Z)return;const L=p.countryCode??"52",te=_D(String(Z));typeof window<"u"&&window.open(`https://wa.me/${L}${te}`,"_blank")},ee=ye=>{if(ye.stopPropagation(),f.onEmail)return f.onEmail(A);le&&typeof window<"u"&&(window.location.href=`mailto:${le}`)},ue=ye=>{ye.stopPropagation(),f.onView&&f.onView(A)};return u.jsxs("div",{className:m,children:[W&&u.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:h.whatsapp??"WhatsApp",onClick:V,style:{width:24,height:24},children:u.jsx("img",{src:vD,alt:"WhatsApp"})}),q&&u.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:h.email??"Email",onClick:ee,style:{width:24,height:24},children:u.jsx("img",{src:yD,alt:"Email"})}),F&&u.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:h.view??"Ver detalle",onClick:ue,style:{width:24,height:24},children:b})]})}),width:120}},C=Object.values(S).filter(A=>!!A),D=(e??[]).filter(A=>!!A?.key),k=new Map;for(const A of C)k.set(String(A.key),A);for(const A of D)k.set(String(A.key),A);const w=[...C.map(A=>String(A.key)),...D.map(A=>String(A.key))],B=Array.from(new Set(o.map(A=>String(A)).filter(A=>k.has(A)))),E=w.filter(A=>!B.includes(A)),I=[...B,...E],P="acciones";if(k.has(P)){const A=I.filter(W=>W!==P);I.splice(0,I.length,...A,P)}return I.map(A=>k.get(A))}function o3(e){const{rows:t,columns:r,clientSort:n=!0,defaultSort:o,minWidth:s=1100,rowKey:i=xD,defaults:a,detailConfig:c,normalTable:l,onRowClick:d,activityHistory:f,advisorHistory:p,forceOpenDetailFor:y,closeDetailFor:m,onRequestEdit:h,searchFilter:b,solicitudesNuevos:S,solicitudesPrueba:C,solicitudesServicio:D,solicitudesSeminuevos:k,onCreateSolicitud:w,isCrmMode:B,onSolicitudBaseUrl:E,onIframeClose:I,reloadInfo:P,idAdminSistemas:A=!1}=e,[W,q]=v.useState(o??null),[F,Z]=v.useState({open:!1,customer:null}),[le,V]=v.useState([]),ee=H=>{Z({open:!0,customer:H})},ue=H=>{d?.(H),Z({open:!0,customer:H})},ye=()=>{Z({open:!1,customer:null}),m?.()},L=v.useMemo(()=>a?Hh(r??[],a):Hh(r??[],{fields:{},order:[]}),[r,a]),te=v.useMemo(()=>{if(!n||!W)return t;const H=L.find(ae=>ae.key===W.key);if(!H)return t;const K=[...t];return K.sort((ae,ce)=>{const me=Zc(H,ae,0),ge=Zc(H,ce,0),fe=bD(me,ge);return W.direction==="asc"?fe:-fe}),K},[t,L,W,n]),J=v.useMemo(()=>{const H=c?.getCustomerId;return K=>{const ae=H?.(K)??K?.Id_cliente??K?.CliID??K?.id??K?.ID??K?.Id??"";return String(ae)}},[c]);return v.useEffect(()=>{if(!F.open||!F.customer)return;const H=J(F.customer);if(!H)return;const K=(t??[]).find(ae=>J(ae)===H);K&&K!==F.customer&&Z(ae=>({...ae,customer:K}))},[t,F.open,F.customer,J]),v.useEffect(()=>{y&&ee(y)},[y]),u.jsxs("div",{children:[u.jsx("div",{className:`${Wh.tableClientes} back-white rounded-3 shadow-main mt-4 mb-4`,children:u.jsx("div",{className:`${Wh.tableResponsive} table-responsive`,children:u.jsxs("table",{className:"table table-hover align-middle mb-0",children:[u.jsx("thead",{children:u.jsx("tr",{children:L.map(H=>u.jsx("th",{style:{fontWeight:600,width:H.width,paddingTop:"20px",paddingBottom:"20px",textAlign:H.align??"left"},children:H.header},H.key))})}),u.jsx("tbody",{children:te.map((H,K)=>u.jsx("tr",{onClick:()=>ue?.(H),role:"button",tabIndex:0,onKeyDown:ae=>{(ae.key==="Enter"||ae.key===" ")&&ue?.(H)},style:{cursor:"pointer"},children:L.map((ae,ce)=>{const me=ae.Component?u.jsx(ae.Component,{row:H,index:K}):ae.cell?ae.cell(H,K):(()=>{const ge=Zc(ae,H,K);return ge==null||ge===""?"":String(ge)})();return u.jsx("td",{style:{paddingTop:"20px",paddingBottom:"20px",textAlign:ae.align??"left"},children:me},`${String(ae.key)}-${ce}`)})},i(H,K)))})]})})}),F.open&&u.jsx(n3,{open:F.open,onClose:ye,customer:F.customer,fields:c?.dynamicFields,header:c?.header,normalTable:l,history:f,advisorHistory:p,onRequestEdit:H=>{ye(),h?.(H)},searchFilter:b,solicitudesNuevos:S,solicitudesPrueba:C,solicitudesServicio:D,solicitudesSeminuevos:k,onCreateSolicitud:w,isCrmMode:B,onSolicitudBaseUrl:E,onIframeClose:I,reloadInfo:P,idAdminSistemas:A})]})}const Yh=X.forwardRef(({sx:e,...t},r)=>u.jsx(g.InputBase,{inputRef:r,...t,sx:{height:48,px:1.5,width:"100%",maxWidth:"none",bgcolor:"#EBEEF0",borderRadius:2,border:"1px solid transparent","&:hover":{borderColor:"transparent"},"& .MuiInputBase-input::placeholder":{opacity:.7},...e}}));Yh.displayName="SoftInput";var as={},qh;function s3(){if(qh)return as;qh=1;var e=st();Object.defineProperty(as,"__esModule",{value:!0}),as.default=void 0;var t=e(dt()),r=ct();return as.default=(0,t.default)((0,r.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline"),as}var i3=s3();const a3=ot(i3);function c3({message:e}){return e?u.jsxs(g.Box,{role:"alert",sx:{mt:1,display:"flex",alignItems:"center",gap:1,bgcolor:"#fdeaea",border:"1px solid rgb(253, 237, 237)",color:"#842029",borderRadius:1,px:2,py:1.25},children:[u.jsx(a3,{fontSize:"small",sx:{color:"rgb(211, 47, 47)"}}),u.jsx("span",{style:{color:"rgb(95, 33, 32)",fontSize:14,fontWeight:"500"},children:e})]}):null}function l3(e){if(e.required)return e.required===!0?"El campo es obligatorio.":e.required}function Xc(e,t){const r=l3(e);return r?t?.isArray?{required:r,validate:n=>Array.isArray(n)&&n.length>0||r}:{required:r,validate:n=>n!==""&&n!==null&&n!==void 0||r}:{}}const Zh={"& .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiOutlinedInput-root.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},width:"100%"},u3={mb:1,fontWeight:600,color:"#1C1C1D","&.Mui-focused":{color:"#1C1C1D !important"},"&.Mui-error":{color:"#1C1C1D !important"}};function Jc({label:e,errorMsg:t,helperText:r,children:n,sx:o}){return u.jsxs(g.FormControl,{fullWidth:!0,error:!!t,sx:o,className:"1- FieldWrapper",children:[u.jsx(g.FormLabel,{sx:u3,children:e}),n,u.jsx(c3,{message:t||r})]})}function d3(e,t){const{register:r,formState:{errors:n}}=t,o={...Xc(e)};e.minLength&&(o.minLength={value:e.minLength,message:`El campo espera minimo ${e.minLength} caracteres`}),e.maxLength&&(o.maxLength={value:e.maxLength,message:`El campo espera maximo ${e.maxLength} caracteres`}),e.pattern&&(o.pattern={value:e.pattern,message:"Formato inválido"});const s=e.type==="email";s&&!o.pattern&&(o.pattern={value:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,message:"Correo electrónico inválido"});const i=/[A-Za-zÁÉÍÓÚÜÑáéíóúüñ\s'.-]/g,a=/[0-9]/g,c=new Set(["Backspace","Delete","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Tab","Home","End","Escape","Enter"]),l=k=>e.onlyNumbers?(k.match(a)??[]).join(""):e.onlyLetters?(k.match(i)??[]).join(""):k,d=(k,w)=>c.has(k)||w?!0:e.onlyNumbers?/^[0-9]$/.test(k):e.onlyLetters?/^[A-Za-zÁÉÍÓÚÜÑáéíóúüñ\s'.-]$/.test(k):!0,f=n[e.name]?.message,p=r(e.name,o),y=(e.inputProps&&typeof e.inputProps.maxLength=="number"?e.inputProps.maxLength:void 0)??e.maxLength,m=k=>{d(k.key,k.ctrlKey||k.metaKey)||k.preventDefault()},h=k=>{const w=k.data??null;w!=null&&(e.onlyNumbers&&/[^0-9]/.test(w)&&k.preventDefault(),e.onlyLetters&&/[^A-Za-zÁÉÍÓÚÜÑáéíóúüñ ]/.test(w)&&k.preventDefault())},b=k=>{const w=k.clipboardData.getData("text"),B=l(w);if(B!==w){k.preventDefault();const E=k.target,I=E.selectionStart??E.value.length,P=E.selectionEnd??E.value.length;E.setRangeText(B,I,P,"end"),E.dispatchEvent(new Event("input",{bubbles:!0}))}},S=k=>{const w=l(k.target.value);w!==k.target.value&&(k.target.value=w),y&&k.target.value.length>y&&(k.target.value=k.target.value.slice(0,y)),p.onChange(k)},C={...e.inputProps,...s?{inputMode:"email",autoComplete:"email"}:{},maxLength:y,onKeyDown:m,onBeforeInput:h,onPaste:b,onInvalid:k=>k.preventDefault()},D=e.onlyNumbers||s?"text":e.type??"text";return u.jsx(Jc,{label:e.label,errorMsg:f,helperText:e.helperText,sx:Zh,children:u.jsx(Yh,{placeholder:e.placeholder,type:D,inputProps:C,...p,onChange:S,sx:{width:"100%",maxWidth:"none"},className:"SoftInputData"})})}function f3(e,t){const{control:r}=t,n=!!e.multiple;return u.jsx(ar,{name:e.name,control:r,rules:Xc(e,{isArray:n}),render:({field:o,fieldState:s})=>u.jsx(Jc,{label:e.label,errorMsg:s.error?.message,helperText:e.helperText,sx:Zh,children:u.jsxs(g.Select,{...o,multiple:n,displayEmpty:!0,sx:{height:48,backgroundColor:"#EBEEF0","& .MuiSelect-select":{display:"flex",alignItems:"center",py:0}},className:"2-SoftInputData",children:[!n&&u.jsx(g.MenuItem,{value:"",disabled:!0,children:"Selecciona…"}),e.options.map(i=>u.jsx(g.MenuItem,{value:i.value,children:i.label},String(i.value)))]})})})}function p3(e,t){return u.jsx(ar,{name:e.name,control:t.control,rules:Xc(e),render:({field:r,fieldState:n})=>u.jsx(Jc,{label:e.label,errorMsg:n.error?.message,helperText:e.helperText,children:u.jsx(g.RadioGroup,{row:!0,...r,className:"3-RadioFieldRender",children:e.options.map(o=>u.jsx(g.FormControlLabel,{value:o.value,control:u.jsx(g.Radio,{}),label:o.label},String(o.value)))})})})}function Gh(e,t){if(e.render)return e.render(t);switch(e.kind){case"text":return d3(e,t);case"select":return f3(e,t);case"radio":return p3(e,t);default:return null}}function h3(e,{initialPerPage:t=25,perPageOptions:r=[10,25,50,100,"Todos"],onPageChange:n,onPerPageChange:o,scrollTop:s,deps:i=[]}={}){const a=Array.isArray(e)?e:[],[c,l]=v.useState(1),[d,f]=v.useState(t),{currentItems:p,totalPages:y,showingFrom:m,showingTo:h,totalItems:b}=v.useMemo(()=>{const D=a.length,k=d==="Todos"?1/0:Number(d),w=k===1/0?1:Math.max(1,Math.ceil(D/k)),B=Math.min(c,w),E=k===1/0?D:B*k,I=k===1/0?0:E-k;return{currentItems:k===1/0?a:a.slice(I,E),totalPages:w,showingFrom:D===0?0:I+1,showingTo:k===1/0?D:Math.min(E,D),totalItems:D}},[a,c,d]),S=D=>{const k=Math.max(1,Math.min(D,y||1));l(k),n?.(k),s?.()};return{currentItems:p,totalPages:y,showingFrom:m,showingTo:h,totalItems:b,currentPage:c,itemsPerPage:d,perPageOptions:r,goTo:S,next:()=>S(c+1),prev:()=>S(c-1),setItemsPerPage:D=>{f(D),o?.(D),l(1),s?.()},setCurrentPage:S}}var cs={},Kh;function m3(){if(Kh)return cs;Kh=1;var e=st();Object.defineProperty(cs,"__esModule",{value:!0}),cs.default=void 0;var t=e(dt()),r=ct();return cs.default=(0,t.default)((0,r.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore"),cs}var g3=m3();const v3=ot(g3);var ls={},Qh;function y3(){if(Qh)return ls;Qh=1;var e=st();Object.defineProperty(ls,"__esModule",{value:!0}),ls.default=void 0;var t=e(dt()),r=ct();return ls.default=(0,t.default)((0,r.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),ls}var b3=y3();const _3=ot(b3),x3=({currentPage:e,totalPages:t,onPageChange:r,itemsPerPage:n,onItemsPerPageChange:o,itemsPerPageOptions:s,showingFrom:i,showingTo:a,totalItems:c})=>{const l=g.useTheme(),d=g.useMediaQuery(l.breakpoints.down("sm")),f=()=>{if(t<=1)return[1];const m=d?0:2,h=[],b=1,S=t,C=Math.max(b+1,e-m),D=Math.min(S-1,e+m);h.push(b),C>b+1&&h.push("...");for(let k=C;k<=D;k++)k>=b+1&&k<=S-1&&h.push(k);return D<S-1&&h.push("..."),h.push(S),h},p=m=>{const h=m.target.value;o(h)},y=Math.max(1,t);return u.jsxs(g.Box,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},alignItems:"center",justifyContent:{xs:"center",sm:"space-between"},gap:2,my:0,py:2,borderTop:"#D3D4D5 1px solid",px:3},children:[u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",justifyContent:"center"},children:[u.jsx(g.IconButton,{onClick:()=>r(e-1),disabled:e<=1,size:"medium",sx:{"&:hover":{backgroundColor:"action.hover"}},"aria-label":"Página anterior",children:u.jsx(v3,{fontSize:"large"})}),f().map((m,h)=>m==="..."?u.jsx(g.Box,{sx:{px:1,display:"flex",alignItems:"center",fontSize:"1.1rem"},children:". . ."},`dots-${h}`):u.jsx(g.Button,{onClick:()=>r(m),size:"small",sx:{minWidth:36,height:36,fontSize:"1.05rem",p:1,borderRadius:"10px",backgroundColor:e===m?"primary.main":"transparent",fontWeight:e===m?700:400,color:e===m?"#fff":"#5C6372","&:hover":{backgroundColor:e===m?"primary.dark":"action.hover"},boxShadow:"none",border:"none",mx:.5},children:m},`p-${m}`)),u.jsx(g.IconButton,{onClick:()=>r(e+1),disabled:e>=y,size:"medium",sx:{"&:hover":{backgroundColor:"action.hover"}},"aria-label":"Página siguiente",children:u.jsx(_3,{fontSize:"large"})})]}),u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1.25,justifyContent:{xs:"center",sm:"flex-start"},mt:{xs:1,sm:0}},children:[u.jsx(g.Typography,{variant:"body2",children:"Mostrar"}),u.jsx(g.FormControl,{size:"small",sx:{minWidth:72},children:u.jsx(g.Select,{value:n,onChange:p,renderValue:m=>m==="Todos"?"Todos":String(m),children:s.map(m=>u.jsx(g.MenuItem,{value:m,children:m==="Todos"?"Todos":m},String(m)))})}),u.jsx(g.Typography,{variant:"body2",children:"por página"})]})]})};function w3(e){const{open:t,dataAdd:r,fields:n,onSubmit:o,onCancel:s,defaultValues:i,txtBtnGuardar:a,haveId:c=!1,itemsTable:l,filter:d,getId:f,renderRow:p,selectedIds:y,onSelectedChange:m,onSubmitAddData:h,initialSelectedIds:b=[],showAutosPanel:S}=e,C=_p({mode:"onSubmit",reValidateMode:"onChange",criteriaMode:"all",shouldUnregister:!1,defaultValues:i});v.useEffect(()=>{i&&C.reset(i)},[i,C]);const[D,k]=v.useState(""),[w,B]=v.useState(b),E=Array.isArray(y)&&!!m,I=E?y:w,P=O=>{const ne=typeof O=="function"?O(I):O;E?m(ne):B(ne)},A=v.useCallback(O=>f?f(O):O?.IdAuto,[f]),W=v.useMemo(()=>{const O=new Map;return(l??[]).forEach((ne,we)=>O.set(A(ne),we)),O},[l,A]),q=v.useRef(new Set),F=v.useMemo(()=>{const O=new Map;return(l??[]).forEach(ne=>O.set(f?f(ne):ne?.IdAuto,ne)),O},[l,f]),Z=v.useMemo(()=>(n??[]).filter(O=>!!O.required).map(O=>O.name),[n]),le=rp({control:C.control,name:Z}),V=O=>O==null?!1:typeof O=="string"?O.trim().length>0:Array.isArray(O)?O.length>0:typeof O=="number"?!Number.isNaN(O):typeof O=="object"?Object.keys(O).length>0:!0,ee=v.useMemo(()=>Z.length?le?.every(V)??!1:!0,[le,Z]),{handleSubmit:ue,formState:{isSubmitting:ye,isDirty:L,isValid:te}}=C,J=d??((O,ne)=>JSON.stringify(O).toLowerCase().includes(ne.toLowerCase())),H=v.useMemo(()=>D.trim()?l?.filter(O=>J(O,D)):l,[l,D,J]),K=v.useMemo(()=>{if(!H)return H;const O=q.current,ne=[...H];return ne.sort((we,De)=>{const R=O.has(A(we))?0:1,ie=O.has(A(De))?0:1;if(R!==ie)return R-ie;const Se=W.get(A(we))??0,qe=W.get(A(De))??0;return Se-qe}),ne},[H,W,A]),{currentItems:ae,totalPages:ce,showingFrom:me,showingTo:ge,totalItems:fe,currentPage:he,itemsPerPage:Pe,perPageOptions:N,goTo:Ve,setItemsPerPage:et}=h3(K,{initialPerPage:25,perPageOptions:[10,25,50,100,"Todos"],deps:[D],scrollTop:()=>{}}),Ue=O=>{const ne=F.get(O)??null;P([O]),h?.({items:ne})},Ae=O=>I.includes(O),Be=async O=>{try{await o?.(O),C.reset(C.getValues())}catch(ne){console.error("Error al enviar AddCliente:",ne)}},pt=v.useMemo(()=>{const O=new Map;return(n??[]).forEach(ne=>O.set(String(ne.name),ne)),O},[n]),rt=(O,ne)=>{const we=pt.get(String(O));if(!we)return null;const De={xs:12,...we.grid,...ne||{}};return u.jsx(g.Grid,{item:!0,...De,children:we.render?we.render(C):Gh(we,C)},`fld-${String(O)}`)},x=S??(e.haveId?"edit":"new"),M=x!=="onlyCars",j=x==="new"||x==="onlyCars",re=I?.length>0,se=x==="onlyCars"?re:e.haveId?ee&&L||re:ee&&re;return u.jsx(g.Dialog,{open:t,onClose:s,maxWidth:"lg",fullWidth:!0,PaperProps:{sx:{height:{xs:"100dvh",md:j?"90vw":"auto"},maxWidth:{xs:"100vw",md:j?"98vw":"50%"},overflow:"hidden",display:"flex",flexDirection:"column",borderRadius:{xs:0,md:3}}},children:u.jsx(Ox,{...C,children:u.jsxs(g.Box,{component:"form",noValidate:!0,onSubmit:ue(Be),display:"flex",flexDirection:{xs:"column",md:"row"},width:"100%",height:"100%",minHeight:0,overflow:"hidden",position:"relative",children:[M&&u.jsxs(g.Box,{sx:{width:{xs:"100%",md:c?"100%":394},maxWidth:{xs:"100%",md:c?"100%":394},boxShadow:{xs:"none",md:c?"none":"2px 0px 8px #40404024"},borderRight:{xs:"none",md:c?"none":"1px solid #EBEEF0"},bgcolor:"background.paper",paddingBottom:3,mx:{xs:0,md:c?"auto":0},position:"relative"},children:[u.jsxs(g.Box,{p:{xs:2,md:2},height:"100%",width:"100%",children:[u.jsx(g.Typography,{fontWeight:700,fontSize:20,children:r.title}),u.jsxs(g.Box,{sx:{flex:1,height:"100%",overflowY:"auto",paddingBottom:10},children:[u.jsx(g.Typography,{fontSize:"18px",mt:2.5,fontWeight:500,children:r.subTitle}),u.jsx(g.Box,{mt:2,display:"flex",flexDirection:"column",width:"100%",gap:2,children:Array.isArray(e.formLayout)&&c?e.formLayout.map((O,ne)=>u.jsx(g.Grid,{container:!0,spacing:2,alignItems:"flex-start",wrap:"wrap",width:"100%",children:O.map((we,De)=>{const R=typeof we=="string"?{name:we}:we;return R.hidden?.(C)?null:rt(R.name,R.grid)})},`row-${ne}`)):u.jsx(g.Grid,{container:!0,spacing:2,width:"100%",children:n?.map((O,ne)=>{const we=O.grid??{xs:12,md:12};return u.jsx(g.Grid,{item:!0,...we,children:O.render?O.render(C):Gh(O,C)},`${String(O.name)}-${ne}`)})})})]})]}),u.jsx(g.Box,{sx:{position:"absolute",zIndex:O=>O.zIndex.modal+1,bottom:0,width:"100%",borderRadius:2,boxShadow:{xs:"0",md:"0 -8px 8px -6px #0003"},p:1,backgroundColor:"#fff"},children:u.jsx(g.Box,{display:"flex",alignItems:"center",children:u.jsx(g.Box,{display:"flex",gap:1.5,width:"100%",justifyContent:c?"flex-end":"center",children:u.jsx(g.Button,{type:"submit",variant:"contained",disabled:ye||!se,sx:{backgroundColor:"#336BE1",color:"#fff",borderColor:"transparent",height:48,fontSize:15,textTransform:"none",fontWeight:"400",paddingX:5,width:c?"160px":"100%"},children:a})})})})]}),j&&u.jsx(g.Box,{flex:1,display:"flex",flexDirection:"column",minWidth:0,sx:{height:"100%"},children:u.jsx(g.Box,{mt:1,sx:{flex:1,display:"flex",flexDirection:"column",height:"100%"},children:u.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[u.jsxs(g.Box,{p:3,sx:{borderBottom:1,borderBottomColor:"#D3D4D5",position:"sticky",top:0,zIndex:1,bgcolor:"#fff",flexDirection:{sm:"row",xs:"column"}},display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingTop:4,children:[u.jsx(g.TextField,{value:D,onChange:O=>k(O.target.value),placeholder:"Buscar marca, modelo, vin...",InputProps:{endAdornment:u.jsx(g.InputAdornment,{position:"start",children:u.jsx(E2,{})}),disableUnderline:!0},variant:"standard",sx:{maxWidth:360,width:"100%",backgroundColor:"#EBEEF0",paddingX:"16px",paddingY:"10px"}}),u.jsx(g.Box,{display:"flex",gap:2,alignItems:"center",sx:{marginTop:{sm:0,xs:2}},children:u.jsx(g.Box,{onClick:s,sx:{cursor:"pointer",position:"absolute",top:0,right:10},display:{xs:"none",md:"block"},children:u.jsx(Ur,{sx:{color:"#070C10",fontSize:24}})})}),S=="onlyCars"&&u.jsx(g.Box,{display:"flex",alignItems:"center",justifyContent:"center",children:u.jsx(g.Box,{display:"flex",gap:1.5,width:"100%",children:u.jsxs(g.Button,{type:"submit",variant:"contained",disabled:ye||!se,sx:{backgroundColor:"#336BE1",color:"#fff",borderColor:"transparent",height:48,fontSize:15,textTransform:"none",fontWeight:"400",paddingX:5,width:"100%"},children:[u.jsx(Uh,{sx:{color:ye||!se?"gray":"#fff",fontSize:26,paddingRight:.6}}),"Crear Solicitud"]})})})]}),u.jsx(g.Box,{sx:{flex:1,minHeight:0,overflowY:"auto",overflowX:"auto",padding:0,height:"100%","&::-webkit-scrollbar:horizontal":{display:"none"},"&::-webkit-scrollbar:vertical":{width:8}},children:u.jsx(g.Box,{sx:{minWidth:1150,width:"max(1150px, 100%)",paddingBottom:10},children:u.jsxs(g.List,{disablePadding:!0,sx:{borderColor:"transparent",padding:0},children:[ae?.map((O,ne)=>{const we=f?f(O):ne,De=Ae(we);return u.jsx(g.Box,{sx:{borderBottom:"1px solid #D3D4D5",padding:0},children:u.jsx(g.ListItem,{disableGutters:!0,sx:{paddingTop:0,padding:0,m:0},children:u.jsx(g.ListItemButton,{onClick:()=>Ue(we),disableRipple:!0,sx:{padding:0},children:u.jsx(g.ListItemText,{disableTypography:!0,primary:p?p({item:O,selected:De,toggle:()=>Ue(we),index:ne}):null})})})},`${String(we)}`)}),!ae?.length&&u.jsx(g.Box,{p:3,children:u.jsxs(g.Typography,{fontSize:14,color:"#5C6372",children:["Sin resultados para “",D,"”."]})})]})})}),u.jsx(g.Box,{sx:{position:"sticky",bottom:0,bgcolor:"#fff"},children:u.jsx(x3,{currentPage:he,totalPages:ce,onPageChange:Ve,itemsPerPage:Pe,onItemsPerPageChange:et,itemsPerPageOptions:N,showingFrom:me,showingTo:ge,totalItems:fe})})]})})})]})})})}var us={},Xh;function S3(){if(Xh)return us;Xh=1;var e=st();Object.defineProperty(us,"__esModule",{value:!0}),us.default=void 0;var t=e(dt()),r=ct();return us.default=(0,t.default)((0,r.jsx)("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6z"}),"AttachFile"),us}var C3=S3();const E3=ot(C3),el=/^[^\s@]+@[^\s@]+\.[^\s@]+$/i,Qi=/[,\s;]+/g,rn=e=>e.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase(),nn=(e,t)=>Array.from(new Set([...e,...t.map(r=>r.trim()).filter(Boolean)])),Jh=(e,t)=>t?e.filter(r=>rn(r)!==rn(t)):e,k3=(e,t)=>e.filter(r=>!t.some(n=>rn(n)===rn(r)));function Er(e,t,r){if(r)return typeof r=="function"?r(e,t):e[r]}function D3(e,t){if(t)return!e||/^https?:\/\//i.test(t)?t:e+t}function T3({open:e,onClose:t,value:r,onChange:n,onRequestSend:o,customer:s,itemsSelects:i,renderItem:a,filterFields:c=[],multiSelectAutos:l=!0,imgCorreoSrc:d,baseURLImages:f,itemProps:p,defaultItemImageSrc:y}){const m=v.useRef(null),[h,b]=v.useState("idle"),S=v.useRef(e);v.useEffect(()=>{const R=S.current;e&&!R&&b("entering"),!e&&R&&b("exiting"),S.current=e},[e]),v.useEffect(()=>{if(h==="entering"){const Se=setTimeout(()=>b("idle"),320);return()=>clearTimeout(Se)}if(h==="exiting"){const Se=setTimeout(()=>b("idle"),220);return()=>clearTimeout(Se)}},[h]);const[C,D]=v.useState(""),[k,w]=v.useState(!1),[B,E]=v.useState(!1),[I,P]=v.useState(!1),[A,W]=v.useState(""),[q,F]=v.useState([]),Z=I?q:r.selectedIds,le=()=>{F([...r.selectedIds]),W(""),P(!0)},V=()=>{P(!1),F([])},ee=()=>{const R=new Set(pt.map((Se,qe)=>String(Er(Se,qe,p.id)))),ie=q.filter(Se=>R.has(String(Se)));n({...r,selectedIds:ie}),P(!1)},ue=(R,ie)=>rn(R??"")===rn(ie??"");function ye(R,ie,Se,qe,Q){const de=ie?R.some(Te=>ue(Te,ie)):!1,ke=Se.length>0?Se.some(Te=>R.some(lt=>ue(lt,Te))):!1;qe(de),Q(ke)}const L=R=>{const ie=typeof R=="function"?R(r.recipients):R;n({...r,recipients:ie}),ye(ie,ae,me,w,E)},te=R=>n({...r,message:R}),J=R=>n({...r,attachments:[...r.attachments,...R]}),H=R=>n({...r,attachments:r.attachments.filter(ie=>ie.name!==R)}),K=R=>{if(I)if(l){const ie=new Set(q);ie.has(R)?ie.delete(R):ie.add(R),F(Array.from(ie))}else{const ie=q.includes(R);F(ie?[]:[R])}else if(l){const ie=new Set(r.selectedIds);ie.has(R)?ie.delete(R):ie.add(R),n({...r,selectedIds:Array.from(ie)})}else{const ie=r.selectedIds.includes(R);n({...r,selectedIds:ie?[]:[R]})}},ae=v.useMemo(()=>(s?.Correo??"").trim(),[s]),ce=v.useMemo(()=>Array.isArray(s?.Asesores)?s.Asesores.filter(R=>R?.EmailAsesor&&R?.Activo):[],[s]),me=v.useMemo(()=>ce.map(R=>(R.EmailAsesor??"").trim()).filter(Boolean),[ce]),ge=v.useRef(!1);v.useEffect(()=>{if(e&&!ge.current){let R=[];k&&ae&&(R=nn(R,[ae])),B&&me.length&&(R=nn(R,me)),L(ie=>nn(ie,R)),ye(r.recipients,ae,me,w,E),D(""),ge.current=!0}e||(ge.current=!1)},[e,k,B,ae,me]);const fe=R=>{const ie=ce.find(Se=>rn(Se.EmailAsesor??"")===rn(R));if(ie){if(ie.ImgAsesor)return u.jsx(g.Avatar,{src:ie.ImgAsesor,alt:ie.NombreAsesor});const Se=(ie.NombreAsesor||"").trim(),qe=(ie.ApellidosAsesor||"").trim();return u.jsx(g.Avatar,{children:`${Se[0]??""}${qe[0]??""}`.toUpperCase()})}return u.jsx(g.Avatar,{children:R[0]?.toUpperCase()})},he=()=>{const R=C.trim();if(!R)return;const Se=R.split(Qi).filter(Boolean).filter(qe=>el.test(qe));Se.length>0&&L(qe=>nn(qe,Se)),D("")},Pe=R=>{w(R),L(ie=>R&&ae?nn(ie,[ae]):Jh(ie,ae))},N=R=>{E(R),L(ie=>R?nn(ie,me):k3(ie,me))},Ve=R=>{const ie=Array.from(R.target.files||[]);J(ie.map(Se=>({name:Se.name,size:Se.size,file:Se}))),R.target.value=""},et=Z[0],Ue=v.useMemo(()=>!i||et===void 0?void 0:i.find((ie,Se)=>String(Er(ie,Se,p.id))===String(et)),[i,et,p.id]),Ae=v.useMemo(()=>{if(!(!Ue||!p.distributorId))return Er(Ue,0,p.distributorId)},[Ue,p.distributorId]);console.log("lockedDisId",Ae);const Be=v.useMemo(()=>Ue?(p.distributorTitle?Er(Ue,0,p.distributorTitle):void 0)??(Ae!=null?String(Ae):void 0):void 0,[Ue,p.distributorTitle,Ae]),pt=v.useMemo(()=>{const R=i??[];return Ae==null||!p.distributorId?R:R.filter((ie,Se)=>Er(ie,Se,p.distributorId)==Ae)},[i,Ae,p.distributorId]),rt=v.useMemo(()=>{if(!A.trim())return pt;const R=A.toLowerCase();return pt.filter(ie=>(c??[]).some(Se=>String(ie?.[Se]??"").toLowerCase().includes(R)))},[pt,A,c]),x=v.useMemo(()=>{if(!i||!r.selectedIds.length)return[];const R=new Map;return i.forEach((ie,Se)=>{R.set(String(Er(ie,Se,p.id)),ie)}),r.selectedIds.map(ie=>R.get(String(ie))).filter(Boolean)},[i,r.selectedIds,p.id]),M=R=>n({...r,selectedIds:r.selectedIds.filter(ie=>String(ie)!==String(R))}),j=()=>{let R=r.recipients;if(C.trim()){const de=C.split(Qi).filter(ke=>el.test(ke));R=nn(R,de),L(R),D("")}const ie=k?ae:"",Se=ce.find(de=>de?.Activo&&de?.EmailAsesor)?.EmailAsesor?.trim()??"";o?.({recipients:R,toClient:k,toAdvisor:B,tipoInt:k&&B?2:1,correoCliente:ie,correoAsesor:B?Se:"",disIdLocked:Ae}),t?.()},re=v.useMemo(()=>{const ie=C.split(Qi).filter(Boolean).some(Se=>el.test(Se));return r.recipients.length>0||ie},[r.recipients,C]),se=(r.selectedIds?.length??0)>0,O=r.message.trim().length>0,ne=re&&se&&O,we=g.useTheme(),De=g.useMediaQuery(we.breakpoints.down("sm"));return u.jsxs(g.Drawer,{anchor:De?"bottom":"right",open:e,onClose:t,ModalProps:{keepMounted:!0,BackdropProps:{invisible:!De}},transitionDuration:{enter:320,exit:220},SlideProps:{direction:De?"up":"left",timeout:{enter:320,exit:220},easing:{enter:"cubic-bezier(0.22, 1, 0.36, 1)",exit:"cubic-bezier(0.4, 0, 1, 1)"}},PaperProps:{sx:{width:{xs:"100vw",sm:420},height:{xs:"85vh",sm:"auto"},maxHeight:{xs:"85vh",sm:"calc(100vh - 32px)"},left:{xs:0,sm:"auto"},right:{xs:0,sm:16},bottom:{xs:0,sm:16},top:{xs:"auto",sm:"auto"},borderRadius:{xs:"12px 12px 0 0",sm:2},boxShadow:6,overflow:"hidden"}},children:[u.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",height:{xs:"100%",sm:"auto"},position:"relative",overflow:"auto"},children:[u.jsxs(g.Box,{sx:{p:2,pb:1,position:"sticky",top:0,zIndex:1,bgcolor:"#fff",borderBottom:"1px solid #E5E7EB"},children:[u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1},children:[u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:2},children:[d?u.jsx("img",{src:d,alt:"Correo",style:{width:24,height:18}}):null,u.jsxs(g.Typography,{fontWeight:700,children:["Mensaje a"," ",s?`${s.Nombre??""} ${s.ApellidoP??""} ${s.ApellidoM??""}`.trim():"—"]})]}),u.jsx(g.IconButton,{onClick:t,size:"small",children:u.jsx(Ur,{})})]}),u.jsx("div",{children:u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"10px 10px",backgroundColor:"#EBEEF0",border:"1px solid #E5E7EB",borderRadius:8,flexWrap:"wrap"},children:[u.jsx("label",{style:{fontSize:14,fontWeight:600,marginRight:4},children:"Para:"}),u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap",flex:1},children:[r.recipients.map(R=>u.jsx(g.Chip,{avatar:fe(R),label:R,onDelete:()=>L(ie=>Jh(ie,R)),size:"small",variant:"outlined",sx:{borderRadius:999,height:28}},R)),u.jsx("input",{type:"text",value:C,onChange:R=>D(R.target.value),onKeyDown:R=>{const ie=R.key;ie==="Enter"||ie===","||ie===";"||ie===" "||ie==="Tab"?(R.preventDefault(),he()):ie==="Backspace"&&!C&&r.recipients.length&&L(qe=>qe.slice(0,-1))},onBlur:he,onPaste:R=>{const Se=R.clipboardData.getData("text").split(Qi).filter(Boolean);Se.length>1&&(R.preventDefault(),L(qe=>nn(qe,Se)),D(""))},placeholder:r.recipients.length?"":"correo@ejemplo.com",style:{flex:1,minWidth:140,border:"none",outline:"none",background:"transparent",fontSize:14,color:"#111827",padding:"4px 0"}})]})]})}),u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:2,mb:1.5},children:[u.jsx(g.FormControlLabel,{control:u.jsx(g.Checkbox,{checked:k,onChange:R=>Pe(R.target.checked),size:"small"}),label:"Cliente"}),ce.length!==0&&u.jsx(g.FormControlLabel,{control:u.jsx(g.Checkbox,{checked:B,onChange:R=>N(R.target.checked),size:"small"}),label:`Asesor${ce.length>1?"es":""}`})]})]}),u.jsx(g.Divider,{}),u.jsxs(g.Box,{p:2,children:[u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},onClick:le,children:[u.jsx(g.Typography,{fontSize:12,fontWeight:600,sx:{textDecorationLine:"underline",cursor:"pointer"},children:"Selecciona el auto de seguimiento"}),Be!=null&&u.jsx(g.Chip,{size:"small",label:`Distribuidora: ${Be}`})]}),x.length>0?u.jsx(g.Box,{sx:{mt:1.5,display:"flex",gap:1,flexWrap:"wrap"},children:x.map((R,ie)=>{const Se=Er(R,ie,p.id),qe=Er(R,ie,p.title)??"",Q=Er(R,ie,p.image),de=D3(f,Q);return u.jsx(g.Chip,{onDelete:()=>M(Se),label:u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[u.jsx(g.Box,{sx:{width:28,height:20,borderRadius:.8,bgcolor:"#e5e6e8",overflow:"hidden",flex:"0 0 auto"},children:de?u.jsx("img",{src:de,alt:qe,style:{width:"100%",height:"100%",objectFit:"cover"}}):u.jsx("img",{src:y,alt:qe,style:{width:"100%",height:"100%",objectFit:"cover"}})}),u.jsx("span",{style:{fontSize:12},children:u.jsx("b",{children:qe})})]}),sx:{pl:.5,pr:.3,py:.2,borderRadius:2,".MuiChip-deleteIcon":{fontSize:18}},variant:"outlined"},String(Se))})}):u.jsx(g.Typography,{fontSize:13,color:"#5C6372",sx:{mt:.5},children:"Aún no has seleccionado autos."})]}),u.jsx(g.Divider,{}),u.jsxs(g.Box,{sx:{p:2},children:[u.jsx(g.TextField,{placeholder:"Escribe aquí tu mensaje...",value:r.message,onChange:R=>te(R.target.value),multiline:!0,minRows:6,fullWidth:!0,sx:{mb:1.5}}),r.attachments.length>0&&u.jsx(g.List,{dense:!0,sx:{display:"flex",flexDirection:"column",gap:2,border:"none"},children:r.attachments.map(R=>u.jsxs(g.ListItem,{sx:{px:0,background:"#EAEBF2",borderRadius:2,paddingX:1},children:[u.jsx(g.ListItemText,{style:{gap:10,fontSize:15,color:"#5285F7",display:"flex",flexWrap:"wrap",flex:"none"},primary:R.name,secondary:R.size<1024?`${R.size} b`:R.size<1024*1024?`${(R.size/1024).toFixed(0)} kb`:`${(R.size/(1024*1024)).toFixed(1)} MB`,secondaryTypographyProps:{sx:{fontSize:12,color:"#64748B",fontWeight:500,mt:.25}},primaryTypographyProps:{noWrap:!0,width:"auto"}}),u.jsx(g.Tooltip,{title:"Quitar",children:u.jsx(g.IconButton,{edge:"end",onClick:()=>H(R.name),size:"small",children:u.jsx(Ur,{fontSize:"small"})})})]},R.name))})]}),u.jsxs(g.Box,{sx:{position:{xs:"sticky",sm:"sticky"},bottom:0,bgcolor:"#fff",borderTop:"1px solid #E5E7EB",p:2,display:"flex",alignItems:"center",gap:2},children:[u.jsx("input",{ref:m,hidden:!0,type:"file",multiple:!0,accept:".jpg,.jpeg,.png,.mp4,.pdf,.xlsx,.csv,.docx,.pptx,.txt",onChange:Ve}),u.jsx(g.Button,{startIcon:u.jsx(E3,{}),variant:"text",onClick:()=>m.current?.click(),sx:{color:"#5C6372"},children:"Adjuntar archivo"}),u.jsx(g.Box,{sx:{flex:1}}),u.jsx(g.Button,{variant:"contained",onClick:j,disabled:!ne,sx:{maxWidth:146,width:"100%",height:53,backgroundColor:"#336BE1"},children:"Enviar"})]})]}),u.jsxs(g.Dialog,{fullWidth:!0,maxWidth:"sm",fullScreen:De,open:I,onClose:V,children:[u.jsxs(g.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:1},children:["Selecciona tu auto de seguimiento",u.jsx(g.IconButton,{onClick:V,size:"small",children:u.jsx(Ur,{})})]}),u.jsxs(g.DialogContent,{children:[u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[u.jsx(g.TextField,{placeholder:"Buscar...",fullWidth:!0,size:"small",value:A,onChange:R=>W(R.target.value),sx:{mb:2}}),Be!=null&&u.jsx(g.Chip,{size:"small",label:`Distribuidora: ${Be}`})]}),u.jsxs(g.Typography,{variant:"caption",fontWeight:600,children:["RESULTADOS (",rt.length,")"]}),u.jsxs(g.List,{sx:{p:0},children:[rt.map((R,ie)=>{const Se=Er(R,ie,p.id),qe=Z.includes(String(Se))||Z.includes(Se),Q=Ae==null||Er(R,ie,p.distributorId)==Ae;return u.jsx(g.ListItem,{disableGutters:!0,sx:{p:0,opacity:Q?1:.5},children:u.jsx(g.Box,{onClick:()=>Q&&K(Se),sx:{cursor:Q?"pointer":"not-allowed",p:.5,backgroundColor:qe?"#e5f0ff":"transparent",width:"100%",borderBottom:"solid 1px #D3D4D5"},children:a?a(R,ie):u.jsx("pre",{style:{margin:0},children:JSON.stringify(R,null,2)})})},String(Se))}),rt.length===0&&u.jsx(g.Box,{p:2,children:u.jsx(g.Typography,{children:"Tu búsqueda no generó resultados"})})]})]}),u.jsxs(g.DialogActions,{sx:{px:3,pb:2},children:[u.jsx(g.Button,{variant:"text",onClick:V,sx:{color:"#5C6372"},children:"Cancelar"}),u.jsx(g.Button,{variant:"contained",onClick:ee,sx:{backgroundColor:"#336BE1"},children:"Guardar selección"})]})]})]})}Et.AddCliente=w3,Et.ApiProvider=S_,Et.AuthProvider=X2,Et.Clientes=o3,Et.CustomSnackbar=Ph,Et.EventsProvider=uD,Et.ModalCorreo=T3,Et.MyCalendar=gD,Et.useAuth=nc,Et.useAuthRepository=Ci,Et.useEventRepository=wc,Object.defineProperty(Et,Symbol.toStringTag,{value:"Module"})}));
180
+ `)}const o3={Todos:[],"Sin Asignar":["Sin Asignar"],"En prospección":["Prospección"],"Proceso de Compra":["Proceso de Compra"],"En espera de Unidad":["En Espera de Unidad"],"Auto Facturado":["Auto Facturado"],Rechazadas:["Rechazada","Rechazadas"],"Finalizadas sin Venta":["Sin Venta"],"Finalizadas con Venta":["Con Venta"],"En Proceso":["Asignada","Prospección","Sin Asignar","Proceso de Compra","En Espera de Unidad","Auto Facturado","Sin Atender"]},s3={Todos:[],"Selección y presentación de vehículos":["Selección y presentación de vehículos"],"Prueba de Manejo":["Prueba de Manejo"],"Valoración del Auto a cuenta y/o enganche":["Valoración del Auto a cuenta y/o enganche"],"Entrega de vehículo":["Entrega de vehículo"],"Negociación y Cierre":["Negociación y Cierre"]},i3={Todos:[],"Algo interesado":["Algo interesado"],Interesado:["Interesado"],"Muy interesado":["Muy interesado"],"Venta definitiva":["Venta definitiva"],"No sé":["No sé"]};function a3(e,t){switch(e){case"pruebas":return e3(t)??"—";case"servicio":return t3(t)??"—";case"nuevos":case"seminuevos":default:return Jk(t)??"—"}}function c3({open:e,onClose:t,customer:r,fields:n=[],header:o,extraSections:s,normalTable:i,normalTableColumns:a=[],history:c=[],advisorHistory:l=[],onRequestEdit:d,searchFilter:f,solicitudesNuevos:p=[],solicitudesPrueba:m=[],solicitudesServicio:v=[],solicitudesSeminuevos:h=[],onCreateSolicitud:b,isCrmMode:w=!1,onSolicitudBaseUrl:S,onIframeClose:k,reloadInfo:C,idAdminSistemas:x}){if(!r)return null;const H=3,[E,I]=y.useState(null),P=!!E,[A,Y]=y.useState(!1),[Z,V]=y.useState(null),[W,le]=y.useState(c??[]),[R,X]=y.useState(null),re=y.useMemo(()=>[...l].sort(($,G)=>new Date(G.FechaAsignacion).getTime()-new Date($.FechaAsignacion).getTime()),[l]);y.useEffect(()=>{c&&c.length&&le(c)},[c]);const ve=c?.length?c:W,L=o?.title??($=>$?.Nombre||$?.name||"Sin título"),ee=o?.infoItems??[],Ee=$=>$.nombreAsesor?.trim()||($.Email?$.Email:"Sistema"),te=$=>{const G=$||"",xe=G.split(" ").filter(Boolean);return xe.length>=2?(xe[0][0]+xe[1][0]).toUpperCase():(G[0]||"?").toUpperCase()},he=$=>$?.SolID??$?.solID??$?.SolId??$?.SOLID??null,ue=y.useMemo(()=>!R||Z==null?ve??[]:(ve??[]).filter($=>{const G=he($);return G!=null&&String(G)===String(Z)}),[ve,R,Z]),ce=y.useMemo(()=>[...ue].sort(($,G)=>new Date(G.fecAlta).getTime()-new Date($.fecAlta).getTime()),[ue]),[be,_e]=y.useState(!1),pe=y.useMemo(()=>be?ce:ce.slice(0,H),[be,ce]),ge=Math.max(ce.length-H,0),Ae=$=>String($??"").normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase().trim(),N=($,G)=>Ae(JSON.stringify($)).includes(Ae(G)),Ue=($,G)=>f?f($,G):N($,G),tt=($,G)=>{const xe=Ae(G).split(/\s+/).filter(Boolean);return xe.length?xe.every(Pe=>Ue($,Pe)):!0},[He,Me]=y.useState(""),[Le,pt]=y.useState([]);y.useMemo(()=>i??[],[i]),y.useMemo(()=>{const $=He.trim();return $?(i??[]).filter(G=>tt(G,$)):i??[]},[i,He]);const st=g.useTheme(),D=g.useMediaQuery(st.breakpoints.down("md")),[O,z]=y.useState(""),[ae,se]=y.useState(!0),[j,oe]=y.useState(!1),F=new Date().toISOString().slice(0,10),fe=new Date(Date.now()-720*3600*1e3).toISOString().slice(0,10),[M,U]=y.useState(fe),[Se,$e]=y.useState(F),[K,ie]=y.useState(null),de=!!K,[De,Ze]=y.useState("En Proceso"),[$t,on]=y.useState("Todos"),[Yt,vr]=y.useState("Todos"),sn=["Algo interesado","Interesado","Muy interesado","Venta definitiva","No sé"],an=["Selección y presentación de vehículos","Prueba de Manejo","Valoración del Auto a cuenta y/o enganche","Entrega de vehículo","Negociación y Cierre"],yr=()=>{z(""),se(!1),oe(!1),U(fe),$e(F),Ze("Todos"),on("Todos"),vr("Todos")},Cn=y.useMemo(()=>(O??"").trim()!==""||De!=="Todos"||$t!=="Todos"||ae||j||Yt!=="Todos",[O,De,$t,ae,j,Yt]);function Kn($){if(!$)return"";const G=new Date($);if(isNaN(G.getTime()))return"";const xe=String(G.getDate()).padStart(2,"0"),Pe=String(G.getMonth()+1).padStart(2,"0"),dt=String(G.getFullYear()).slice(-2);return`${xe}/${Pe}/${dt}`}function fs($){const G=$?new Date($):null;return G&&!isNaN(G.getTime())?G:null}function ea($,G){let xe=null;for(const Pe of $){const dt=fs(G(Pe));if(dt){const Ve=dt.getTime();(xe===null||Ve>xe)&&(xe=Ve)}}return xe?new Date(xe):null}function ta($){const G=ea($,xe=>xe.UltimoSeguimiento||xe.FechaCita);return G?Kn(G.toISOString()):"—"}function ra($){const G=($??"").toLowerCase().trim();return G==="sin venta"||G==="con venta"||G==="rechazada"||G==="rechazadas"}function ps($){return $.filter(G=>ra(G.EstatusDescripcion)).length}function hs($){return $.filter(G=>!ra(G.EstatusDescripcion)).length}const nl=({progress:$,color:G})=>{if(!$)return u.jsx(Jc,{current:0,total:0,color:G});const xe=$.split("/").map(Number);if(xe.length!==2||xe.some(Ve=>Number.isNaN(Ve)))return u.jsx(Jc,{current:0,total:0,color:G});const[Pe,dt]=xe;return u.jsx(Jc,{current:Pe,total:dt,color:G})};function na($){return[{key:"fecha",header:"Fecha",accessor:G=>Kn(G.Fecha),width:110},{key:"vehiculo",header:"Vehículo",accessor:G=>u.jsx(g.Tooltip,{title:G.Vehiculo??"",placement:"top",arrow:!0,children:u.jsx(g.Typography,{component:"span",sx:{fontSize:13,fontWeight:500,display:"block",maxWidth:260,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",lineHeight:1.3,cursor:"default"},children:G.Vehiculo??"—"})}),width:260},{key:"estatus",header:"Estatus",accessor:G=>u.jsx(g.Typography,{sx:{fontWeight:800,fontSize:13},children:a3($,G.IdEstatus)}),width:170},{key:"nivel",header:"Nivel de Interés",accessor:G=>{const{bg:xe,color:Pe}=Xk(G.NivelInteres);return u.jsx(g.Box,{sx:{display:"inline-block",px:1,py:.25,borderRadius:9999,bgcolor:xe,color:Pe,fontSize:12,fontWeight:G.NivelInteres?800:500},children:G.NivelInteres??"—"})},width:150},{key:"asesor",header:"Asesor",accessor:G=>{const xe=(G.Asesor??"").trim(),Pe=il=>{if(!il)return"";const R3=il[0]?.toUpperCase()??"",N3=il[1]?.toLowerCase()??"";return`${R3}${N3}`};if(!xe)return u.jsx(g.Tooltip,{title:"",placement:"top",children:u.jsx(g.Typography,{sx:{fontWeight:700,fontSize:13,textAlign:"center"},children:"—"})});const dt=xe.split(/\s+/),Ve=dt[0]??"",lr=dt[1]??"",tr=Pe(Ve),Yr=Pe(lr),j3=`${tr}${Yr}`||"—";return u.jsx(g.Tooltip,{title:xe,placement:"top",children:u.jsx(g.Typography,{sx:{fontWeight:700,fontSize:13,textAlign:"center"},children:j3})})},width:120,align:"center"},{key:"origen",header:"Origen",accessor:G=>G.Origen??"—",width:120,align:"center"},{key:"actividad",header:"Actividad",accessor:G=>u.jsx(g.Tooltip,{title:G.Actividad??"",placement:"top",arrow:!0,children:u.jsxs(g.Box,{sx:{maxWidth:160,overflow:"hidden",display:"flex",gap:.5,alignItems:"center"},children:[G.Icon&&u.jsx("span",{style:{color:"#fff",backgroundColor:G.Color,borderRadius:100,alignItems:"center",justifyContent:"center",display:"flex",padding:3},children:u.jsx("i",{className:G.Icon})}),u.jsx(g.Typography,{component:"span",noWrap:!0,sx:{fontSize:13,fontWeight:500,display:"block",overflow:"hidden",textOverflow:"ellipsis",lineHeight:1.3,cursor:(G.Actividad??"").length?"default":"inherit"},children:G.Actividad??"—"})]})}),width:180},{key:"avance",header:"Avance",accessor:G=>u.jsx(nl,{progress:G.Avance,color:G.Color}),width:"100px",align:"left"}]}function ol($){const xe=na($).slice(1);return[{key:"fecha",header:"Fecha",accessor:Pe=>Kn(Pe.Fecha),width:110},{key:"fechaCita",header:"Fecha Cita",accessor:Pe=>Kn(Pe.FechaCita),width:120},{key:"horaCita",header:"Hora Cita",accessor:Pe=>Pe.HoraCita??"—",width:110},...xe]}function sl($){const G=$.kind;switch(G){case"pruebas":case"servicio":return ol(G);case"nuevos":case"seminuevos":default:return na(G)}}function T($,G,xe,Pe){return{id:$,kind:xe,title:G,metrics:[{label:"En Proceso",value:hs(Pe)},{label:"Finalizadas",value:ps(Pe)},{label:"Último seg.",value:ta(Pe)}],rows:Pe,initiallyOpen:!1}}const ne=[T("n-1","Cotización de nuevos","nuevos",p),T("p-1","Prueba de Manejo","pruebas",m),T("s-1","Cita de Servicio","servicio",v),T("sn-1","Cotización para Seminuevos","seminuevos",h)],Ce=y.useMemo(()=>{const $=(O??"").trim().toLowerCase(),G=(xe,Pe)=>{if($&&!(xe.Vehiculo??"").toLowerCase().includes($))return!1;const dt=j?xe.FechaCita:xe.Fecha;if(ae&&dt){const Ve=fs(dt??"");if(!Ve)return!1;const lr=M?new Date(`${M}T00:00:00`):null,tr=Se?new Date(`${Se}T00:00:00`):null;if(tr&&tr.setDate(tr.getDate()+1),lr&&Ve<lr||tr&&Ve>=tr)return!1}if(De!=="Todos"){const Ve=(xe.EstatusDescripcion??"").toLowerCase();if(!(o3[De]??[]).some(Yr=>Ve===Yr.toLowerCase()))return!1}if($t!=="Todos"){const Ve=(xe.Actividad??"").toLowerCase();if(!(s3[$t]??[]).some(Yr=>Ve===Yr.toLowerCase()))return!1}if(Yt!=="Todos"){const Ve=(xe.NivelInteres??"").toLowerCase();if(!(i3[Yt]??[]).some(Yr=>Ve===Yr.toLowerCase()))return!1}return!0};return ne.map(xe=>{const Pe=(xe.rows??[]).filter(Ve=>G(Ve,xe.kind)),dt=[{label:"En Proceso",value:hs(Pe)},{label:"Finalizadas",value:ps(Pe)},{label:"Último seg.",value:ta(Pe)}];return{...xe,rows:Pe,metrics:dt}})},[ne,O,ae,M,Se,j,De,$t,Yt]),Ie={nuevos:"cotizaciones",pruebas:"pruebademanejo",servicio:"citasservicio",seminuevos:"seminuevos"},We=($,G)=>{const xe=$.SolID;if(!xe)return;const Pe=G.kind,dt=Ie[Pe]??"cotizaciones",Ve=`https://qa2.crm.netcar.com.mx/netcar/${dt}/${xe}`,lr=S?.({row:$,section:G,slug:dt,solId:xe,baseUrl:Ve});if(!w){const tr=lr??`https://qa2.crm.netcar.com.mx/netcar/${dt}/${xe}`;V(xe),X(tr),Y(!0)}},it=()=>{k?.(r),V(null),X(null),Y(!1)},ze=y.useRef(!1),Re=y.useRef(null),Ft=y.useCallback(()=>{if(!ze.current){ze.current=!0;return}Re.current&&window.clearTimeout(Re.current),Re.current=window.setTimeout(()=>{C?.(r)},500)},[C,r]);return y.useEffect(()=>{ze.current=!1,Re.current&&window.clearTimeout(Re.current)},[R,Z]),u.jsx(g.Dialog,{open:e,onClose:t,fullWidth:!0,fullScreen:D,PaperProps:{sx:{height:{xs:"100dvh",md:"90vh"},maxWidth:{xs:"100vw",md:"92vw"},overflow:"hidden",display:"flex",flexDirection:"column",borderRadius:{xs:0,md:3}}},children:u.jsxs(g.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},height:"100%",minHeight:0,overflow:"auto",position:"relative"},children:[u.jsxs(g.Box,{sx:{width:{xs:"100%",md:405},maxWidth:{xs:"100%",md:405},bgcolor:{xs:"transparent",md:"#40404024"},display:"flex",flexDirection:"column",height:{xs:"auto",md:"100%"},borderRight:{xs:"none",md:"1px solid #EBEEF0"}},children:[u.jsxs(g.Box,{children:[u.jsx(g.Stack,{direction:"row",spacing:2,alignItems:"center",mb:1,sx:{px:2.5,pt:2.5},children:u.jsxs(g.Box,{display:"flex",flexDirection:"column",gap:1,width:"100%",children:[u.jsx(g.Box,{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%",alignItems:"center",children:u.jsx(g.Box,{sx:{flex:1,minWidth:0,pr:1},children:u.jsxs(g.Typography,{component:"span",fontWeight:700,sx:{display:"inline",lineHeight:1.2,wordBreak:"break-word",pr:.5},children:[L(r)," ",u.jsx(g.IconButton,{component:"span",size:"small",disableRipple:!0,onClick:()=>{t?.(),r&&d?.(r)},sx:{p:0,ml:.5,verticalAlign:"text-bottom",color:"#336BE1","&:hover":{bgcolor:"transparent"},"&:focus-visible":{outline:"none"}},"aria-label":"Editar nombre",children:u.jsx(Gk,{sx:{fontSize:"1em"}})})]})})}),ee.map(($,G)=>u.jsxs(g.Box,{sx:{display:"flex",gap:1.2,alignItems:"center",cursor:$.onClick?"pointer":"default"},onClick:()=>{$.onClick&&$.onClick(r)},children:[$.icon,u.jsx(g.Typography,{variant:"body2",sx:{color:$.inLink?"#336BE1":"#070C10"},style:{},children:$.value(r)})]},G))]})}),u.jsx(g.Stack,{mb:2,sx:{px:2.5,pt:0,gap:2},children:n.map(($,G)=>{const xe=$.label?.toLowerCase().startsWith("asesor");return u.jsxs(g.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[u.jsx(g.Box,{sx:{width:"50%"},children:u.jsx(g.Typography,{variant:"body2",color:"text.secondary",sx:{color:"#5C6372"},children:$.label})}),u.jsxs(g.Box,{sx:{width:"50%",display:"flex",alignItems:"center",gap:1},children:[u.jsx("div",{children:$?.avatar?$.avatar(r):null}),u.jsx(g.Typography,{variant:"body2",color:"textPrimary",children:$?.value(r)}),xe&&!x&&u.jsx(g.Tooltip,{title:"Historial asesores",placement:"top",arrow:!0,children:u.jsx(g.IconButton,{size:"small",onClick:Pe=>I(Pe.currentTarget),sx:{ml:.5},disableRipple:!0,children:u.jsx(Uk,{fontSize:"small",sx:{color:"#5C6372"}})})})]})]},G)})}),u.jsx(g.Divider,{sx:{my:2}})]}),u.jsx(g.Box,{px:2.5,pb:.5,children:u.jsxs(g.Typography,{children:[u.jsx("span",{style:{fontWeight:800},children:"Última actividad"}),!R&&" por solicitud",":"]})}),u.jsxs(g.Box,{sx:{px:2.5,pt:0,gap:2,flex:1,overflowY:"auto",display:"flex",flexDirection:"column",pb:6,maxHeight:{xs:"140px",md:"100%"}},children:[pe.length===0&&u.jsx(g.Typography,{variant:"body2",color:"text.secondary",children:"Sin actividad registrada."}),u.jsxs(g.Box,{children:[pe?.map(($,G)=>{const xe=Ee($),Pe=n3($.comentario||"");return u.jsxs(g.Box,{sx:{pb:1.5},children:[u.jsxs(g.Stack,{direction:"row",spacing:1,alignItems:"center",justifyContent:"space-between",sx:{mb:.75},children:[u.jsx(g.Typography,{variant:"subtitle2",sx:{color:"#5C6372"},children:$.tipo||"Evento"}),u.jsx(g.Chip,{size:"small",label:$.auto!=null?`${$.auto}`:"—",sx:{bgcolor:"#336be1",color:"#fff",height:20}})]}),Pe?u.jsx(g.Typography,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.5,mb:.75},children:Pe}):null,u.jsxs(g.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[$?.ImgAsesor!=null?u.jsx(g.Avatar,{sx:{width:28,height:28,bgcolor:"#EAEBF2",color:"#5C6372",fontSize:14},alt:te(xe),src:$?.ImgAsesor}):u.jsx(g.Avatar,{sx:{width:28,height:28,bgcolor:"#EAEBF2",color:"#5C6372",fontSize:14},children:te(xe)}),u.jsxs(g.Stack,{spacing:0,children:[u.jsx(g.Typography,{variant:"body2",fontWeight:600,children:xe}),u.jsx(g.Typography,{variant:"caption",color:"text.secondary",children:r3($.fecAlta)})]})]}),G<pe.length-1&&u.jsx(g.Divider,{sx:{mt:1.25}})]},$.SegID??G)}),ce.length>H&&u.jsx(g.Box,{sx:{mt:1},children:u.jsx(g.Button,{onClick:()=>_e($=>!$),size:"small",sx:{textTransform:"none",px:0,color:"#336BE1","&:hover":{background:"transparent",textDecoration:"underline"}},children:be?"Ver menos":`Ver más (${ge})`})})]})]}),u.jsx(g.Menu,{anchorEl:E,open:P,onClose:()=>I(null),TransitionComponent:g.Fade,MenuListProps:{disablePadding:!0},PaperProps:{sx:{width:320,p:0,overflow:"hidden"}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:u.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[u.jsx(g.Box,{sx:{position:"sticky",top:0,zIndex:1,px:1.5,py:1,fontWeight:700,bgcolor:"background.paper",borderBottom:"1px solid",borderColor:"divider"},children:"Historial asesores"}),u.jsxs(g.Box,{sx:{overflowY:"auto",py:.5,maxHeight:200},children:[re.length===0&&u.jsx(g.Box,{sx:{px:1.5,py:1},children:u.jsx(g.Typography,{variant:"body2",color:"text.secondary",children:"Sin registros"})}),re.map(($,G)=>{const xe=Wk($),Pe=Hk($.FechaBaja??$.FechaAsignacion);return u.jsx(g.Box,{sx:{px:1,py:.75},children:u.jsxs(g.Stack,{direction:"row",alignItems:"center",spacing:1,children:[u.jsx(g.Avatar,{sx:{width:28,height:28,bgcolor:"#EAEBF2",color:"#5C6372",fontSize:14},src:$?.ImgAsesor??void 0,children:Yk(xe)}),u.jsx(g.Box,{sx:{flex:1,minWidth:0},children:u.jsx(g.Typography,{variant:"body2",noWrap:!0,children:xe})}),u.jsx(g.Typography,{variant:"caption",color:"text.secondary",sx:{whiteSpace:"nowrap"},children:Pe})]})},G)})]})]})})]}),A?u.jsxs(g.Box,{sx:{flex:1,minWidth:0,overflow:"hidden",position:"relative"},children:[u.jsx(g.Box,{sx:{position:"absolute",top:18,left:24,zIndex:10,pointerEvents:"auto"},children:u.jsx(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:u.jsx(g.Button,{onClick:it,sx:{backgroundColor:"#2571d6",minWidth:36,minHeight:36,p:.5,borderRadius:"8px",color:"#fff",boxShadow:3,"&:hover":{backgroundColor:"#2074e3"}},children:u.jsx(Zc,{fontSize:"medium"})})})}),R&&u.jsx("iframe",{src:R,width:"100%",height:"100%",onLoad:Ft,style:{border:0}})]}):u.jsxs(g.Box,{sx:{width:"100%",minHeight:0,overflowY:"auto"},children:[u.jsx(g.Box,{sx:{mt:{xs:1.5,md:3}},children:u.jsxs(g.Box,{sx:{mt:3,display:"flex",flexDirection:"column",gap:4,padding:"0 20px 0 20px"},children:[u.jsx(g.Typography,{variant:"h4",sx:{fontWeight:800,textAlign:"center",mb:1,letterSpacing:.2},children:"Solicitudes"}),u.jsxs(g.Stack,{direction:{xs:"column",md:"column"},spacing:1.5,alignItems:{xs:"stretch",md:"center"},justifyContent:"space-between",sx:{mb:1.5},children:[u.jsxs(g.Stack,{direction:"row",spacing:1.5,alignItems:"flex-start",sx:{flexWrap:"wrap"},children:[u.jsx(g.TextField,{size:"small",placeholder:"Buscar por vehículo",value:O,onChange:$=>z($.target.value),InputProps:{endAdornment:u.jsx(Pk,{fontSize:"small",sx:{color:"#b6afaf"}})},sx:{minWidth:220}}),u.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",gap:.5,position:"relative"},children:[u.jsxs(g.Stack,{direction:"row",spacing:1.1,position:"absolute",bottom:48,left:0,alignItems:"center",children:[u.jsx(g.FormControlLabel,{label:u.jsx(g.Typography,{sx:{fontSize:15,fontWeight:600,marginLeft:0},children:"Por fecha"}),labelPlacement:"start",control:u.jsx(g.Checkbox,{checked:ae,onChange:$=>se($.target.checked),size:"small",sx:{p:.3,"& .MuiSvgIcon-root":{fontSize:19},color:"#bab4b4"}}),sx:{ml:0,"& .MuiFormControlLabel-label":{marginRight:0}}}),u.jsx(g.Typography,{sx:{fontSize:15,paddingLeft:.4},children:"De cita"})]}),u.jsxs(g.Stack,{direction:"row",spacing:1,children:[u.jsx(g.TextField,{size:"small",type:"date",label:"Desde",InputLabelProps:{shrink:!0},value:M,onChange:$=>U($.target.value),disabled:!ae,sx:{width:170}}),u.jsx(g.TextField,{size:"small",type:"date",label:"Hasta",InputLabelProps:{shrink:!0},value:Se,onChange:$=>$e($.target.value),disabled:!ae,sx:{width:170}})]})]}),u.jsx(g.IconButton,{onClick:$=>ie($.currentTarget),disableRipple:!0,sx:{border:"1px solid #d4d7de",borderRadius:2,width:40,height:40,mt:2},children:u.jsx(Ik,{})}),Cn&&u.jsx(g.Button,{variant:"outlined",onClick:yr,disableRipple:!0,sx:{height:40,textTransform:"none",borderColor:"#d4d7de",color:"#333",mt:2},children:"Limpiar filtros"}),u.jsx(g.Tooltip,{title:Cn&&"Crear Solicitud",arrow:!0,placement:"top",disableHoverListener:!Cn,children:u.jsx("span",{children:u.jsxs(g.Button,{variant:"outlined",sx:{height:40,textTransform:"none",borderColor:"none",color:"#fff",backgroundColor:"#1e5bce","&:hover":{backgroundColor:"#1e5bce",boxShadow:"none"}},onClick:()=>{b?.(r)},disableRipple:!0,children:[u.jsx(Wh,{sx:{color:"#fff",fontSize:24,paddingRight:.6}}),!Cn&&"Crear Solicitud"]})})})]}),u.jsx(Bk,{sections:Ce,detailColumns:[],getDetailColumns:sl,onRowClick:We})]})]})}),u.jsx(g.Menu,{anchorEl:K,open:de,onClose:()=>ie(null),TransitionComponent:g.Fade,PaperProps:{sx:{p:1.5,width:260,borderRadius:2,boxShadow:3}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:u.jsxs(g.Stack,{spacing:1.5,paddingX:1.5,paddingY:1,children:[u.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:700,color:"#070C10"},children:"Filtro"}),u.jsxs(g.Box,{children:[u.jsx(g.Typography,{variant:"body2",sx:{fontWeight:700,mb:.5,color:"#5C6372"},children:"Estatus"}),u.jsx(g.RadioGroup,{value:De,onChange:$=>Ze($.target.value),sx:{"& .MuiFormControlLabel-root":{m:0,py:.3},"& .MuiFormControlLabel-label":{fontSize:14,fontWeight:400,ml:0}},children:["Todos","Sin Asignar","En prospección","Proceso de Compra","En espera de Unidad","Auto Facturado","Rechazadas","Finalizadas sin Venta","Finalizadas con Venta","En Proceso"].map($=>u.jsx(g.FormControlLabel,{value:$,control:u.jsx(g.Radio,{size:"small",sx:{p:.2,"& .MuiSvgIcon-root":{fontSize:18}}}),label:$},$))})]}),u.jsxs(g.Box,{children:[u.jsx(g.Typography,{variant:"body2",sx:{fontWeight:700,mb:.5,color:"#5C6372"},children:"Actividades"}),u.jsx(g.RadioGroup,{value:$t,onChange:($,G)=>on(G),sx:{"& .MuiFormControlLabel-root":{m:0,py:.3},"& .MuiFormControlLabel-label":{fontSize:14,fontWeight:400,ml:0}},children:["Todos",...an].map($=>u.jsx(g.FormControlLabel,{value:$,sx:{alignItems:"start"},control:u.jsx(g.Radio,{size:"small",sx:{p:.2,"& .MuiSvgIcon-root":{fontSize:18}}}),label:$},$))})]}),u.jsxs(g.Box,{children:[u.jsx(g.Typography,{variant:"body2",sx:{fontWeight:700,mb:.5,color:"#5C6372"},children:"Nivel de interés"}),u.jsx(g.RadioGroup,{value:Yt,onChange:($,G)=>vr(G),sx:{"& .MuiFormControlLabel-root":{m:0,py:.3},"& .MuiFormControlLabel-label":{fontSize:14,fontWeight:400,ml:0}},children:["Todos",...sn].map($=>u.jsx(g.FormControlLabel,{value:$,control:u.jsx(g.Radio,{size:"small",sx:{p:.2,"& .MuiSvgIcon-root":{fontSize:18}}}),label:$},$))})]})]})})]})]})})}const Yh={tableClientes:"_tableClientes_acwe7_1",tableResponsive:"_tableResponsive_acwe7_1"};function qh(e,t,r){const{fields:n,order:o=["nombreCliente","email","acciones"],header:s={},cells:i={},hide:a={},actions:c}=t,l=c??{},d=l.show??{},f=l.handlers??{},p=l.accessors??{},m=l.icons??{},v=l.className??"d-flex flex-row gap-2 align-items-center ",h=l.tooltip??{},b=m.view??u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",style:{fill:"#070c10"},children:[u.jsx("path",{d:"M18.6,6.3c-3.9-3-9.3-3-13.2,0-1.9,1.5-3.2,3.5-3.9,5.7.7,2.3,2,4.3,3.9,5.7,1.9,1.5,4.2,2.3,6.6,2.3,2.4,0,4.7-.8,6.6-2.3,1.9-1.5,3.2-3.5,3.9-5.7-.7-2.3-2-4.3-3.9-5.7ZM17.2,12.1c0,2.9-2.5,5.3-5.4,5.2-2.9,0-5.3-2.5-5.2-5.4,0-2.9,2.5-5.3,5.4-5.2,2.9,0,5.3,2.4,5.2,5.3,0,0,0,0,0,0Z"}),u.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),w={nombreCliente:{key:"nombreCliente",header:s.nombreCliente??"Cliente",accessor:A=>A[n.nombreCliente],cell:i.nombreCliente,width:190},email:{key:"email",header:s.email??"Correo",accessor:A=>A[n.email],cell:i.email??(A=>{const Y=String(A[n.email]??"");return Y?u.jsx("a",{href:`mailto:${Y}`,children:Y}):u.jsx("span",{className:"text-muted",children:"—"})}),width:230},acciones:a.acciones?void 0:{key:"acciones",header:"",cell:i.acciones??(A=>{const Y=Qc(d.whatsapp,A,!0),Z=Qc(d.email,A,!0),V=Qc(d.view,A,!0),W=p.phone?.(A),le=p.email?.(A),R=ve=>{if(ve.stopPropagation(),f.onWhatsApp)return f.onWhatsApp(A);if(!W)return;const L=p.countryCode??"52",ee=Ek(String(W));typeof window<"u"&&window.open(`https://wa.me/${L}${ee}`,"_blank")},X=ve=>{if(ve.stopPropagation(),f.onEmail)return f.onEmail(A);le&&typeof window<"u"&&(window.location.href=`mailto:${le}`)},re=ve=>{ve.stopPropagation(),f.onView&&f.onView(A)};return u.jsxs("div",{className:v,children:[Y&&u.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:h.whatsapp??"WhatsApp",onClick:R,style:{width:24,height:24},children:u.jsx("img",{src:wk,alt:"WhatsApp"})}),Z&&u.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:h.email??"Email",onClick:X,style:{width:24,height:24},children:u.jsx("img",{src:Sk,alt:"Email"})}),V&&u.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:h.view??"Ver detalle",onClick:re,style:{width:24,height:24},children:b})]})}),width:120}},S=Object.values(w).filter(A=>!!A),k=(e??[]).filter(A=>!!A?.key),C=new Map;for(const A of S)C.set(String(A.key),A);for(const A of k)C.set(String(A.key),A);const x=[...S.map(A=>String(A.key)),...k.map(A=>String(A.key))],H=Array.from(new Set(o.map(A=>String(A)).filter(A=>C.has(A)))),E=x.filter(A=>!H.includes(A)),I=[...H,...E],P="acciones";if(C.has(P)){const A=I.filter(Y=>Y!==P);I.splice(0,I.length,...A,P)}return I.map(A=>C.get(A))}function l3(e){const{rows:t,columns:r,clientSort:n=!0,defaultSort:o,minWidth:s=1100,rowKey:i=Dk,defaults:a,detailConfig:c,normalTable:l,onRowClick:d,activityHistory:f,advisorHistory:p,forceOpenDetailFor:m,closeDetailFor:v,onRequestEdit:h,searchFilter:b,solicitudesNuevos:w,solicitudesPrueba:S,solicitudesServicio:k,solicitudesSeminuevos:C,onCreateSolicitud:x,isCrmMode:H,onSolicitudBaseUrl:E,onIframeClose:I,reloadInfo:P,idAdminSistemas:A=!1}=e,[Y,Z]=y.useState(o??null),[V,W]=y.useState({open:!1,customer:null}),[le,R]=y.useState([]),X=te=>{W({open:!0,customer:te})},re=te=>{d?.(te),W({open:!0,customer:te})},ve=()=>{W({open:!1,customer:null}),v?.()},L=y.useMemo(()=>a?qh(r??[],a):qh(r??[],{fields:{},order:[]}),[r,a]),ee=y.useMemo(()=>{if(!n||!Y)return t;const te=L.find(ue=>ue.key===Y.key);if(!te)return t;const he=[...t];return he.sort((ue,ce)=>{const be=Kc(te,ue,0),_e=Kc(te,ce,0),pe=Ck(be,_e);return Y.direction==="asc"?pe:-pe}),he},[t,L,Y,n]),Ee=y.useMemo(()=>{const te=c?.getCustomerId;return he=>{const ue=te?.(he)??he?.Id_cliente??he?.CliID??he?.id??he?.ID??he?.Id??"";return String(ue)}},[c]);return y.useEffect(()=>{if(!V.open||!V.customer)return;const te=Ee(V.customer);if(!te)return;const he=(t??[]).find(ue=>Ee(ue)===te);he&&he!==V.customer&&W(ue=>({...ue,customer:he}))},[t,V.open,V.customer,Ee]),y.useEffect(()=>{m&&X(m)},[m]),u.jsxs("div",{children:[u.jsx("div",{className:`${Yh.tableClientes} back-white rounded-3 shadow-main mt-4 mb-4`,children:u.jsx("div",{className:`${Yh.tableResponsive} table-responsive`,children:u.jsxs("table",{className:"table table-hover align-middle mb-0",children:[u.jsx("thead",{children:u.jsx("tr",{children:L.map(te=>u.jsx("th",{style:{fontWeight:600,width:te.width,paddingTop:"20px",paddingBottom:"20px",textAlign:te.align??"left"},children:te.header},te.key))})}),u.jsx("tbody",{children:ee.map((te,he)=>u.jsx("tr",{onClick:()=>re?.(te),role:"button",tabIndex:0,onKeyDown:ue=>{(ue.key==="Enter"||ue.key===" ")&&re?.(te)},style:{cursor:"pointer"},children:L.map((ue,ce)=>{const be=ue.Component?u.jsx(ue.Component,{row:te,index:he}):ue.cell?ue.cell(te,he):(()=>{const _e=Kc(ue,te,he);return _e==null||_e===""?"":String(_e)})();return u.jsx("td",{style:{paddingTop:"20px",paddingBottom:"20px",textAlign:ue.align??"left"},children:be},`${String(ue.key)}-${ce}`)})},i(te,he)))})]})})}),V.open&&u.jsx(c3,{open:V.open,onClose:ve,customer:V.customer,fields:c?.dynamicFields,header:c?.header,normalTable:l,history:f,advisorHistory:p,onRequestEdit:te=>{ve(),h?.(te)},searchFilter:b,solicitudesNuevos:w,solicitudesPrueba:S,solicitudesServicio:k,solicitudesSeminuevos:C,onCreateSolicitud:x,isCrmMode:H,onSolicitudBaseUrl:E,onIframeClose:I,reloadInfo:P,idAdminSistemas:A})]})}const Zh=J.forwardRef(({sx:e,...t},r)=>u.jsx(g.InputBase,{inputRef:r,...t,sx:{height:48,px:1.5,width:"100%",maxWidth:"none",bgcolor:"#EBEEF0",borderRadius:2,border:"1px solid transparent","&:hover":{borderColor:"transparent"},"& .MuiInputBase-input::placeholder":{opacity:.7},...e}}));Zh.displayName="SoftInput";var cs={},Gh;function u3(){if(Gh)return cs;Gh=1;var e=nt();Object.defineProperty(cs,"__esModule",{value:!0}),cs.default=void 0;var t=e(ut()),r=at();return cs.default=(0,t.default)((0,r.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline"),cs}var d3=u3();const f3=rt(d3);function p3({message:e}){return e?u.jsxs(g.Box,{role:"alert",sx:{mt:1,display:"flex",alignItems:"center",gap:1,bgcolor:"#fdeaea",border:"1px solid rgb(253, 237, 237)",color:"#842029",borderRadius:1,px:2,py:1.25},children:[u.jsx(f3,{fontSize:"small",sx:{color:"rgb(211, 47, 47)"}}),u.jsx("span",{style:{color:"rgb(95, 33, 32)",fontSize:14,fontWeight:"500"},children:e})]}):null}function h3(e){if(e.required)return e.required===!0?"El campo es obligatorio.":e.required}function el(e,t){const r=h3(e);return r?t?.isArray?{required:r,validate:n=>Array.isArray(n)&&n.length>0||r}:{required:r,validate:n=>n!==""&&n!==null&&n!==void 0||r}:{}}const Kh={"& .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiOutlinedInput-root.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},width:"100%"},m3={mb:1,fontWeight:600,color:"#1C1C1D","&.Mui-focused":{color:"#1C1C1D !important"},"&.Mui-error":{color:"#1C1C1D !important"}};function tl({label:e,errorMsg:t,helperText:r,children:n,sx:o}){return u.jsxs(g.FormControl,{fullWidth:!0,error:!!t,sx:o,className:"1- FieldWrapper",children:[u.jsx(g.FormLabel,{sx:m3,children:e}),n,u.jsx(p3,{message:t||r})]})}function g3(e,t){const{register:r,formState:{errors:n}}=t,o={...el(e)};e.minLength&&(o.minLength={value:e.minLength,message:`El campo espera minimo ${e.minLength} caracteres`}),e.maxLength&&(o.maxLength={value:e.maxLength,message:`El campo espera maximo ${e.maxLength} caracteres`}),e.pattern&&(o.pattern={value:e.pattern,message:"Formato inválido"});const s=e.type==="email";s&&!o.pattern&&(o.pattern={value:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,message:"Correo electrónico inválido"});const i=/[A-Za-zÁÉÍÓÚÜÑáéíóúüñ\s'.-]/g,a=/[0-9]/g,c=new Set(["Backspace","Delete","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Tab","Home","End","Escape","Enter"]),l=C=>e.onlyNumbers?(C.match(a)??[]).join(""):e.onlyLetters?(C.match(i)??[]).join(""):C,d=(C,x)=>c.has(C)||x?!0:e.onlyNumbers?/^[0-9]$/.test(C):e.onlyLetters?/^[A-Za-zÁÉÍÓÚÜÑáéíóúüñ\s'.-]$/.test(C):!0,f=n[e.name]?.message,p=r(e.name,o),m=(e.inputProps&&typeof e.inputProps.maxLength=="number"?e.inputProps.maxLength:void 0)??e.maxLength,v=C=>{d(C.key,C.ctrlKey||C.metaKey)||C.preventDefault()},h=C=>{const x=C.data??null;x!=null&&(e.onlyNumbers&&/[^0-9]/.test(x)&&C.preventDefault(),e.onlyLetters&&/[^A-Za-zÁÉÍÓÚÜÑáéíóúüñ ]/.test(x)&&C.preventDefault())},b=C=>{const x=C.clipboardData.getData("text"),H=l(x);if(H!==x){C.preventDefault();const E=C.target,I=E.selectionStart??E.value.length,P=E.selectionEnd??E.value.length;E.setRangeText(H,I,P,"end"),E.dispatchEvent(new Event("input",{bubbles:!0}))}},w=C=>{const x=l(C.target.value);x!==C.target.value&&(C.target.value=x),m&&C.target.value.length>m&&(C.target.value=C.target.value.slice(0,m)),p.onChange(C)},S={...e.inputProps,...s?{inputMode:"email",autoComplete:"email"}:{},maxLength:m,onKeyDown:v,onBeforeInput:h,onPaste:b,onInvalid:C=>C.preventDefault()},k=e.onlyNumbers||s?"text":e.type??"text";return u.jsx(tl,{label:e.label,errorMsg:f,helperText:e.helperText,sx:Kh,children:u.jsx(Zh,{placeholder:e.placeholder,type:k,inputProps:S,...p,onChange:w,sx:{width:"100%",maxWidth:"none"},className:"SoftInputData"})})}function v3(e,t){const{control:r}=t,n=!!e.multiple;return u.jsx(cr,{name:e.name,control:r,rules:el(e,{isArray:n}),render:({field:o,fieldState:s})=>u.jsx(tl,{label:e.label,errorMsg:s.error?.message,helperText:e.helperText,sx:Kh,children:u.jsxs(g.Select,{...o,multiple:n,displayEmpty:!0,sx:{height:48,backgroundColor:"#EBEEF0","& .MuiSelect-select":{display:"flex",alignItems:"center",py:0}},className:"2-SoftInputData",children:[!n&&u.jsx(g.MenuItem,{value:"",disabled:!0,children:"Selecciona…"}),e.options.map(i=>u.jsx(g.MenuItem,{value:i.value,children:i.label},String(i.value)))]})})})}function y3(e,t){return u.jsx(cr,{name:e.name,control:t.control,rules:el(e),render:({field:r,fieldState:n})=>u.jsx(tl,{label:e.label,errorMsg:n.error?.message,helperText:e.helperText,children:u.jsx(g.RadioGroup,{row:!0,...r,className:"3-RadioFieldRender",children:e.options.map(o=>u.jsx(g.FormControlLabel,{value:o.value,control:u.jsx(g.Radio,{}),label:o.label},String(o.value)))})})})}function Qh(e,t){if(e.render)return e.render(t);switch(e.kind){case"text":return g3(e,t);case"select":return v3(e,t);case"radio":return y3(e,t);default:return null}}function b3(e,{initialPerPage:t=25,perPageOptions:r=[10,25,50,100,"Todos"],onPageChange:n,onPerPageChange:o,scrollTop:s,deps:i=[]}={}){const a=Array.isArray(e)?e:[],[c,l]=y.useState(1),[d,f]=y.useState(t),{currentItems:p,totalPages:m,showingFrom:v,showingTo:h,totalItems:b}=y.useMemo(()=>{const k=a.length,C=d==="Todos"?1/0:Number(d),x=C===1/0?1:Math.max(1,Math.ceil(k/C)),H=Math.min(c,x),E=C===1/0?k:H*C,I=C===1/0?0:E-C;return{currentItems:C===1/0?a:a.slice(I,E),totalPages:x,showingFrom:k===0?0:I+1,showingTo:C===1/0?k:Math.min(E,k),totalItems:k}},[a,c,d]),w=k=>{const C=Math.max(1,Math.min(k,m||1));l(C),n?.(C),s?.()};return{currentItems:p,totalPages:m,showingFrom:v,showingTo:h,totalItems:b,currentPage:c,itemsPerPage:d,perPageOptions:r,goTo:w,next:()=>w(c+1),prev:()=>w(c-1),setItemsPerPage:k=>{f(k),o?.(k),l(1),s?.()},setCurrentPage:w}}var ls={},Xh;function _3(){if(Xh)return ls;Xh=1;var e=nt();Object.defineProperty(ls,"__esModule",{value:!0}),ls.default=void 0;var t=e(ut()),r=at();return ls.default=(0,t.default)((0,r.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore"),ls}var x3=_3();const w3=rt(x3);var us={},Jh;function S3(){if(Jh)return us;Jh=1;var e=nt();Object.defineProperty(us,"__esModule",{value:!0}),us.default=void 0;var t=e(ut()),r=at();return us.default=(0,t.default)((0,r.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),us}var C3=S3();const E3=rt(C3),D3=({currentPage:e,totalPages:t,onPageChange:r,itemsPerPage:n,onItemsPerPageChange:o,itemsPerPageOptions:s,showingFrom:i,showingTo:a,totalItems:c})=>{const l=g.useTheme(),d=g.useMediaQuery(l.breakpoints.down("sm")),f=()=>{if(t<=1)return[1];const v=d?0:2,h=[],b=1,w=t,S=Math.max(b+1,e-v),k=Math.min(w-1,e+v);h.push(b),S>b+1&&h.push("...");for(let C=S;C<=k;C++)C>=b+1&&C<=w-1&&h.push(C);return k<w-1&&h.push("..."),h.push(w),h},p=v=>{const h=v.target.value;o(h)},m=Math.max(1,t);return u.jsxs(g.Box,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},alignItems:"center",justifyContent:{xs:"center",sm:"space-between"},gap:2,my:0,py:2,borderTop:"#D3D4D5 1px solid",px:3},children:[u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",justifyContent:"center"},children:[u.jsx(g.IconButton,{onClick:()=>r(e-1),disabled:e<=1,size:"medium",sx:{"&:hover":{backgroundColor:"action.hover"}},"aria-label":"Página anterior",children:u.jsx(w3,{fontSize:"large"})}),f().map((v,h)=>v==="..."?u.jsx(g.Box,{sx:{px:1,display:"flex",alignItems:"center",fontSize:"1.1rem"},children:". . ."},`dots-${h}`):u.jsx(g.Button,{onClick:()=>r(v),size:"small",sx:{minWidth:36,height:36,fontSize:"1.05rem",p:1,borderRadius:"10px",backgroundColor:e===v?"primary.main":"transparent",fontWeight:e===v?700:400,color:e===v?"#fff":"#5C6372","&:hover":{backgroundColor:e===v?"primary.dark":"action.hover"},boxShadow:"none",border:"none",mx:.5},children:v},`p-${v}`)),u.jsx(g.IconButton,{onClick:()=>r(e+1),disabled:e>=m,size:"medium",sx:{"&:hover":{backgroundColor:"action.hover"}},"aria-label":"Página siguiente",children:u.jsx(E3,{fontSize:"large"})})]}),u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1.25,justifyContent:{xs:"center",sm:"flex-start"},mt:{xs:1,sm:0}},children:[u.jsx(g.Typography,{variant:"body2",children:"Mostrar"}),u.jsx(g.FormControl,{size:"small",sx:{minWidth:72},children:u.jsx(g.Select,{value:n,onChange:p,renderValue:v=>v==="Todos"?"Todos":String(v),children:s.map(v=>u.jsx(g.MenuItem,{value:v,children:v==="Todos"?"Todos":v},String(v)))})}),u.jsx(g.Typography,{variant:"body2",children:"por página"})]})]})};function k3(e){const{open:t,dataAdd:r,fields:n,onSubmit:o,onCancel:s,defaultValues:i,txtBtnGuardar:a,haveId:c=!1,itemsTable:l,filter:d,getId:f,renderRow:p,selectedIds:m,onSelectedChange:v,onSubmitAddData:h,initialSelectedIds:b=[],showAutosPanel:w}=e,S=wp({mode:"onSubmit",reValidateMode:"onChange",criteriaMode:"all",shouldUnregister:!1,defaultValues:i});y.useEffect(()=>{i&&S.reset(i)},[i,S]);const[k,C]=y.useState(""),[x,H]=y.useState(b),E=Array.isArray(m)&&!!v,I=E?m:x,P=j=>{const oe=typeof j=="function"?j(I):j;E?v(oe):H(oe)},A=y.useCallback(j=>f?f(j):j?.IdAuto,[f]),Y=y.useMemo(()=>{const j=new Map;return(l??[]).forEach((oe,F)=>j.set(A(oe),F)),j},[l,A]),Z=y.useRef(new Set),V=y.useMemo(()=>{const j=new Map;return(l??[]).forEach(oe=>j.set(f?f(oe):oe?.IdAuto,oe)),j},[l,f]),W=y.useMemo(()=>(n??[]).filter(j=>!!j.required).map(j=>j.name),[n]),le=op({control:S.control,name:W}),R=j=>j==null?!1:typeof j=="string"?j.trim().length>0:Array.isArray(j)?j.length>0:typeof j=="number"?!Number.isNaN(j):typeof j=="object"?Object.keys(j).length>0:!0,X=y.useMemo(()=>W.length?le?.every(R)??!1:!0,[le,W]),{handleSubmit:re,formState:{isSubmitting:ve,isDirty:L,isValid:ee}}=S,Ee=d??((j,oe)=>JSON.stringify(j).toLowerCase().includes(oe.toLowerCase())),te=y.useMemo(()=>k.trim()?l?.filter(j=>Ee(j,k)):l,[l,k,Ee]),he=y.useMemo(()=>{if(!te)return te;const j=Z.current,oe=[...te];return oe.sort((F,fe)=>{const M=j.has(A(F))?0:1,U=j.has(A(fe))?0:1;if(M!==U)return M-U;const Se=Y.get(A(F))??0,$e=Y.get(A(fe))??0;return Se-$e}),oe},[te,Y,A]),{currentItems:ue,totalPages:ce,showingFrom:be,showingTo:_e,totalItems:pe,currentPage:ge,itemsPerPage:Ae,perPageOptions:N,goTo:Ue,setItemsPerPage:tt}=b3(he,{initialPerPage:25,perPageOptions:[10,25,50,100,"Todos"],deps:[k],scrollTop:()=>{}}),He=j=>{const oe=V.get(j)??null;P([j]),h?.({items:oe})},Me=j=>I.includes(j),Le=async j=>{try{await o?.(j),S.reset(S.getValues())}catch(oe){console.error("Error al enviar AddCliente:",oe)}},pt=y.useMemo(()=>{const j=new Map;return(n??[]).forEach(oe=>j.set(String(oe.name),oe)),j},[n]),st=(j,oe)=>{const F=pt.get(String(j));if(!F)return null;const fe={xs:12,...F.grid,...oe||{}};return u.jsx(g.Grid,{item:!0,...fe,children:F.render?F.render(S):Qh(F,S)},`fld-${String(j)}`)},D=w??(e.haveId?"edit":"new"),O=D!=="onlyCars",z=D==="new"||D==="onlyCars",ae=I?.length>0,se=D==="onlyCars"?ae:e.haveId?X&&L||ae:X&&ae;return u.jsx(g.Dialog,{open:t,onClose:s,maxWidth:"lg",fullWidth:!0,PaperProps:{sx:{height:{xs:"100dvh",md:z?"90vw":"auto"},maxWidth:{xs:"100vw",md:z?"98vw":"50%"},overflow:"hidden",display:"flex",flexDirection:"column",borderRadius:{xs:0,md:3}}},children:u.jsx(Lx,{...S,children:u.jsxs(g.Box,{component:"form",noValidate:!0,onSubmit:re(Le),display:"flex",flexDirection:{xs:"column",md:"row"},width:"100%",height:"100%",minHeight:0,overflow:"hidden",position:"relative",children:[O&&u.jsxs(g.Box,{sx:{width:{xs:"100%",md:c?"100%":394},maxWidth:{xs:"100%",md:c?"100%":394},boxShadow:{xs:"none",md:c?"none":"2px 0px 8px #40404024"},borderRight:{xs:"none",md:c?"none":"1px solid #EBEEF0"},bgcolor:"background.paper",paddingBottom:3,mx:{xs:0,md:c?"auto":0},position:"relative"},children:[u.jsxs(g.Box,{p:{xs:2,md:2},height:"100%",width:"100%",children:[u.jsx(g.Typography,{fontWeight:700,fontSize:20,children:r.title}),u.jsxs(g.Box,{sx:{flex:1,height:"100%",overflowY:"auto",paddingBottom:10},children:[u.jsx(g.Typography,{fontSize:"18px",mt:2.5,fontWeight:500,children:r.subTitle}),u.jsx(g.Box,{mt:2,display:"flex",flexDirection:"column",width:"100%",gap:2,children:Array.isArray(e.formLayout)&&c?e.formLayout.map((j,oe)=>u.jsx(g.Grid,{container:!0,spacing:2,alignItems:"flex-start",wrap:"wrap",width:"100%",children:j.map((F,fe)=>{const M=typeof F=="string"?{name:F}:F;return M.hidden?.(S)?null:st(M.name,M.grid)})},`row-${oe}`)):u.jsx(g.Grid,{container:!0,spacing:2,width:"100%",children:n?.map((j,oe)=>{const F=j.grid??{xs:12,md:12};return u.jsx(g.Grid,{item:!0,...F,children:j.render?j.render(S):Qh(j,S)},`${String(j.name)}-${oe}`)})})})]})]}),u.jsx(g.Box,{sx:{position:"absolute",zIndex:j=>j.zIndex.modal+1,bottom:0,width:"100%",borderRadius:2,boxShadow:{xs:"0",md:"0 -8px 8px -6px #0003"},p:1,backgroundColor:"#fff"},children:u.jsx(g.Box,{display:"flex",alignItems:"center",children:u.jsx(g.Box,{display:"flex",gap:1.5,width:"100%",justifyContent:c?"flex-end":"center",children:u.jsx(g.Button,{type:"submit",variant:"contained",disabled:ve||!se,sx:{backgroundColor:"#336BE1",color:"#fff",borderColor:"transparent",height:48,fontSize:15,textTransform:"none",fontWeight:"400",paddingX:5,width:c?"160px":"100%"},children:a})})})})]}),z&&u.jsx(g.Box,{flex:1,display:"flex",flexDirection:"column",minWidth:0,sx:{height:"100%"},children:u.jsx(g.Box,{mt:1,sx:{flex:1,display:"flex",flexDirection:"column",height:"100%"},children:u.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[u.jsxs(g.Box,{p:3,sx:{borderBottom:1,borderBottomColor:"#D3D4D5",position:"sticky",top:0,zIndex:1,bgcolor:"#fff",flexDirection:{sm:"row",xs:"column"}},display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingTop:4,children:[u.jsx(g.TextField,{value:k,onChange:j=>C(j.target.value),placeholder:"Buscar marca, modelo, vin...",InputProps:{endAdornment:u.jsx(g.InputAdornment,{position:"start",children:u.jsx(k2,{})}),disableUnderline:!0},variant:"standard",sx:{maxWidth:360,width:"100%",backgroundColor:"#EBEEF0",paddingX:"16px",paddingY:"10px"}}),u.jsx(g.Box,{display:"flex",gap:2,alignItems:"center",sx:{marginTop:{sm:0,xs:2}},children:u.jsx(g.Box,{onClick:s,sx:{cursor:"pointer",position:"absolute",top:0,right:10},display:{xs:"none",md:"block"},children:u.jsx(Ur,{sx:{color:"#070C10",fontSize:24}})})}),w=="onlyCars"&&u.jsx(g.Box,{display:"flex",alignItems:"center",justifyContent:"center",children:u.jsx(g.Box,{display:"flex",gap:1.5,width:"100%",children:u.jsxs(g.Button,{type:"submit",variant:"contained",disabled:ve||!se,sx:{backgroundColor:"#336BE1",color:"#fff",borderColor:"transparent",height:48,fontSize:15,textTransform:"none",fontWeight:"400",paddingX:5,width:"100%"},children:[u.jsx(Wh,{sx:{color:ve||!se?"gray":"#fff",fontSize:26,paddingRight:.6}}),"Crear Solicitud"]})})})]}),u.jsx(g.Box,{sx:{flex:1,minHeight:0,overflowY:"auto",overflowX:"auto",padding:0,height:"100%","&::-webkit-scrollbar:horizontal":{display:"none"},"&::-webkit-scrollbar:vertical":{width:8}},children:u.jsx(g.Box,{sx:{minWidth:1150,width:"max(1150px, 100%)",paddingBottom:10},children:u.jsxs(g.List,{disablePadding:!0,sx:{borderColor:"transparent",padding:0},children:[ue?.map((j,oe)=>{const F=f?f(j):oe,fe=Me(F);return u.jsx(g.Box,{sx:{borderBottom:"1px solid #D3D4D5",padding:0},children:u.jsx(g.ListItem,{disableGutters:!0,sx:{paddingTop:0,padding:0,m:0},children:u.jsx(g.ListItemButton,{onClick:()=>He(F),disableRipple:!0,sx:{padding:0},children:u.jsx(g.ListItemText,{disableTypography:!0,primary:p?p({item:j,selected:fe,toggle:()=>He(F),index:oe}):null})})})},`${String(F)}`)}),!ue?.length&&u.jsx(g.Box,{p:3,children:u.jsxs(g.Typography,{fontSize:14,color:"#5C6372",children:["Sin resultados para “",k,"”."]})})]})})}),u.jsx(g.Box,{sx:{position:"sticky",bottom:0,bgcolor:"#fff"},children:u.jsx(D3,{currentPage:ge,totalPages:ce,onPageChange:Ue,itemsPerPage:Ae,onItemsPerPageChange:tt,itemsPerPageOptions:N,showingFrom:be,showingTo:_e,totalItems:pe})})]})})})]})})})}var ds={},e0;function T3(){if(e0)return ds;e0=1;var e=nt();Object.defineProperty(ds,"__esModule",{value:!0}),ds.default=void 0;var t=e(ut()),r=at();return ds.default=(0,t.default)((0,r.jsx)("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6z"}),"AttachFile"),ds}var I3=T3();const A3=rt(I3),rl=/^[^\s@]+@[^\s@]+\.[^\s@]+$/i,Ji=/[,\s;]+/g,rn=e=>e.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase(),nn=(e,t)=>Array.from(new Set([...e,...t.map(r=>r.trim()).filter(Boolean)])),t0=(e,t)=>t?e.filter(r=>rn(r)!==rn(t)):e,M3=(e,t)=>e.filter(r=>!t.some(n=>rn(n)===rn(r)));function Dr(e,t,r){if(r)return typeof r=="function"?r(e,t):e[r]}function P3(e,t){if(t)return!e||/^https?:\/\//i.test(t)?t:e+t}function O3({open:e,onClose:t,value:r,onChange:n,onRequestSend:o,customer:s,itemsSelects:i,renderItem:a,filterFields:c=[],multiSelectAutos:l=!0,imgCorreoSrc:d,baseURLImages:f,itemProps:p,defaultItemImageSrc:m}){const v=y.useRef(null),[h,b]=y.useState("idle"),w=y.useRef(e);y.useEffect(()=>{const M=w.current;e&&!M&&b("entering"),!e&&M&&b("exiting"),w.current=e},[e]),y.useEffect(()=>{if(h==="entering"){const Se=setTimeout(()=>b("idle"),320);return()=>clearTimeout(Se)}if(h==="exiting"){const Se=setTimeout(()=>b("idle"),220);return()=>clearTimeout(Se)}},[h]);const[S,k]=y.useState(""),[C,x]=y.useState(!1),[H,E]=y.useState(!1),[I,P]=y.useState(!1),[A,Y]=y.useState(""),[Z,V]=y.useState([]),W=I?Z:r.selectedIds,le=()=>{V([...r.selectedIds]),Y(""),P(!0)},R=()=>{P(!1),V([])},X=()=>{const M=new Set(pt.map((Se,$e)=>String(Dr(Se,$e,p.id)))),U=Z.filter(Se=>M.has(String(Se)));n({...r,selectedIds:U}),P(!1)},re=(M,U)=>rn(M??"")===rn(U??"");function ve(M,U,Se,$e,K){const ie=U?M.some(De=>re(De,U)):!1,de=Se.length>0?Se.some(De=>M.some(Ze=>re(Ze,De))):!1;$e(ie),K(de)}const L=M=>{const U=typeof M=="function"?M(r.recipients):M;n({...r,recipients:U}),ve(U,ue,be,x,E)},ee=M=>n({...r,message:M}),Ee=M=>n({...r,attachments:[...r.attachments,...M]}),te=M=>n({...r,attachments:r.attachments.filter(U=>U.name!==M)}),he=M=>{if(I)if(l){const U=new Set(Z);U.has(M)?U.delete(M):U.add(M),V(Array.from(U))}else{const U=Z.includes(M);V(U?[]:[M])}else if(l){const U=new Set(r.selectedIds);U.has(M)?U.delete(M):U.add(M),n({...r,selectedIds:Array.from(U)})}else{const U=r.selectedIds.includes(M);n({...r,selectedIds:U?[]:[M]})}},ue=y.useMemo(()=>(s?.Correo??"").trim(),[s]),ce=y.useMemo(()=>Array.isArray(s?.Asesores)?s.Asesores.filter(M=>M?.EmailAsesor&&M?.Activo):[],[s]),be=y.useMemo(()=>ce.map(M=>(M.EmailAsesor??"").trim()).filter(Boolean),[ce]),_e=y.useRef(!1);y.useEffect(()=>{if(e&&!_e.current){let M=[];C&&ue&&(M=nn(M,[ue])),H&&be.length&&(M=nn(M,be)),L(U=>nn(U,M)),ve(r.recipients,ue,be,x,E),k(""),_e.current=!0}e||(_e.current=!1)},[e,C,H,ue,be]);const pe=M=>{const U=ce.find(Se=>rn(Se.EmailAsesor??"")===rn(M));if(U){if(U.ImgAsesor)return u.jsx(g.Avatar,{src:U.ImgAsesor,alt:U.NombreAsesor});const Se=(U.NombreAsesor||"").trim(),$e=(U.ApellidosAsesor||"").trim();return u.jsx(g.Avatar,{children:`${Se[0]??""}${$e[0]??""}`.toUpperCase()})}return u.jsx(g.Avatar,{children:M[0]?.toUpperCase()})},ge=()=>{const M=S.trim();if(!M)return;const Se=M.split(Ji).filter(Boolean).filter($e=>rl.test($e));Se.length>0&&L($e=>nn($e,Se)),k("")},Ae=M=>{x(M),L(U=>M&&ue?nn(U,[ue]):t0(U,ue))},N=M=>{E(M),L(U=>M?nn(U,be):M3(U,be))},Ue=M=>{const U=Array.from(M.target.files||[]);Ee(U.map(Se=>({name:Se.name,size:Se.size,file:Se}))),M.target.value=""},tt=W[0],He=y.useMemo(()=>!i||tt===void 0?void 0:i.find((U,Se)=>String(Dr(U,Se,p.id))===String(tt)),[i,tt,p.id]),Me=y.useMemo(()=>{if(!(!He||!p.distributorId))return Dr(He,0,p.distributorId)},[He,p.distributorId]);console.log("lockedDisId",Me);const Le=y.useMemo(()=>He?(p.distributorTitle?Dr(He,0,p.distributorTitle):void 0)??(Me!=null?String(Me):void 0):void 0,[He,p.distributorTitle,Me]),pt=y.useMemo(()=>{const M=i??[];return Me==null||!p.distributorId?M:M.filter((U,Se)=>Dr(U,Se,p.distributorId)==Me)},[i,Me,p.distributorId]),st=y.useMemo(()=>{if(!A.trim())return pt;const M=A.toLowerCase();return pt.filter(U=>(c??[]).some(Se=>String(U?.[Se]??"").toLowerCase().includes(M)))},[pt,A,c]),D=y.useMemo(()=>{if(!i||!r.selectedIds.length)return[];const M=new Map;return i.forEach((U,Se)=>{M.set(String(Dr(U,Se,p.id)),U)}),r.selectedIds.map(U=>M.get(String(U))).filter(Boolean)},[i,r.selectedIds,p.id]),O=M=>n({...r,selectedIds:r.selectedIds.filter(U=>String(U)!==String(M))}),z=()=>{let M=r.recipients;if(S.trim()){const ie=S.split(Ji).filter(de=>rl.test(de));M=nn(M,ie),L(M),k("")}const U=C?ue:"",Se=ce.find(ie=>ie?.Activo&&ie?.EmailAsesor)?.EmailAsesor?.trim()??"";o?.({recipients:M,toClient:C,toAdvisor:H,tipoInt:C&&H?2:1,correoCliente:U,correoAsesor:H?Se:"",disIdLocked:Me}),t?.()},ae=y.useMemo(()=>{const U=S.split(Ji).filter(Boolean).some(Se=>rl.test(Se));return r.recipients.length>0||U},[r.recipients,S]),se=(r.selectedIds?.length??0)>0,j=r.message.trim().length>0,oe=ae&&se&&j,F=g.useTheme(),fe=g.useMediaQuery(F.breakpoints.down("sm"));return u.jsxs(g.Drawer,{anchor:fe?"bottom":"right",open:e,onClose:t,ModalProps:{keepMounted:!0,BackdropProps:{invisible:!fe}},transitionDuration:{enter:320,exit:220},SlideProps:{direction:fe?"up":"left",timeout:{enter:320,exit:220},easing:{enter:"cubic-bezier(0.22, 1, 0.36, 1)",exit:"cubic-bezier(0.4, 0, 1, 1)"}},PaperProps:{sx:{width:{xs:"100vw",sm:420},height:{xs:"85vh",sm:"auto"},maxHeight:{xs:"85vh",sm:"calc(100vh - 32px)"},left:{xs:0,sm:"auto"},right:{xs:0,sm:16},bottom:{xs:0,sm:16},top:{xs:"auto",sm:"auto"},borderRadius:{xs:"12px 12px 0 0",sm:2},boxShadow:6,overflow:"hidden"}},children:[u.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",height:{xs:"100%",sm:"auto"},position:"relative",overflow:"auto"},children:[u.jsxs(g.Box,{sx:{p:2,pb:1,position:"sticky",top:0,zIndex:1,bgcolor:"#fff",borderBottom:"1px solid #E5E7EB"},children:[u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1},children:[u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:2},children:[d?u.jsx("img",{src:d,alt:"Correo",style:{width:24,height:18}}):null,u.jsxs(g.Typography,{fontWeight:700,children:["Mensaje a"," ",s?`${s.Nombre??""} ${s.ApellidoP??""} ${s.ApellidoM??""}`.trim():"—"]})]}),u.jsx(g.IconButton,{onClick:t,size:"small",children:u.jsx(Ur,{})})]}),u.jsx("div",{children:u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"10px 10px",backgroundColor:"#EBEEF0",border:"1px solid #E5E7EB",borderRadius:8,flexWrap:"wrap"},children:[u.jsx("label",{style:{fontSize:14,fontWeight:600,marginRight:4},children:"Para:"}),u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap",flex:1},children:[r.recipients.map(M=>u.jsx(g.Chip,{avatar:pe(M),label:M,onDelete:()=>L(U=>t0(U,M)),size:"small",variant:"outlined",sx:{borderRadius:999,height:28}},M)),u.jsx("input",{type:"text",value:S,onChange:M=>k(M.target.value),onKeyDown:M=>{const U=M.key;U==="Enter"||U===","||U===";"||U===" "||U==="Tab"?(M.preventDefault(),ge()):U==="Backspace"&&!S&&r.recipients.length&&L($e=>$e.slice(0,-1))},onBlur:ge,onPaste:M=>{const Se=M.clipboardData.getData("text").split(Ji).filter(Boolean);Se.length>1&&(M.preventDefault(),L($e=>nn($e,Se)),k(""))},placeholder:r.recipients.length?"":"correo@ejemplo.com",style:{flex:1,minWidth:140,border:"none",outline:"none",background:"transparent",fontSize:14,color:"#111827",padding:"4px 0"}})]})]})}),u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:2,mb:1.5},children:[u.jsx(g.FormControlLabel,{control:u.jsx(g.Checkbox,{checked:C,onChange:M=>Ae(M.target.checked),size:"small"}),label:"Cliente"}),ce.length!==0&&u.jsx(g.FormControlLabel,{control:u.jsx(g.Checkbox,{checked:H,onChange:M=>N(M.target.checked),size:"small"}),label:`Asesor${ce.length>1?"es":""}`})]})]}),u.jsx(g.Divider,{}),u.jsxs(g.Box,{p:2,children:[u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},onClick:le,children:[u.jsx(g.Typography,{fontSize:12,fontWeight:600,sx:{textDecorationLine:"underline",cursor:"pointer"},children:"Selecciona el auto de seguimiento"}),Le!=null&&u.jsx(g.Chip,{size:"small",label:`Distribuidora: ${Le}`})]}),D.length>0?u.jsx(g.Box,{sx:{mt:1.5,display:"flex",gap:1,flexWrap:"wrap"},children:D.map((M,U)=>{const Se=Dr(M,U,p.id),$e=Dr(M,U,p.title)??"",K=Dr(M,U,p.image),ie=P3(f,K);return u.jsx(g.Chip,{onDelete:()=>O(Se),label:u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[u.jsx(g.Box,{sx:{width:28,height:20,borderRadius:.8,bgcolor:"#e5e6e8",overflow:"hidden",flex:"0 0 auto"},children:ie?u.jsx("img",{src:ie,alt:$e,style:{width:"100%",height:"100%",objectFit:"cover"}}):u.jsx("img",{src:m,alt:$e,style:{width:"100%",height:"100%",objectFit:"cover"}})}),u.jsx("span",{style:{fontSize:12},children:u.jsx("b",{children:$e})})]}),sx:{pl:.5,pr:.3,py:.2,borderRadius:2,".MuiChip-deleteIcon":{fontSize:18}},variant:"outlined"},String(Se))})}):u.jsx(g.Typography,{fontSize:13,color:"#5C6372",sx:{mt:.5},children:"Aún no has seleccionado autos."})]}),u.jsx(g.Divider,{}),u.jsxs(g.Box,{sx:{p:2},children:[u.jsx(g.TextField,{placeholder:"Escribe aquí tu mensaje...",value:r.message,onChange:M=>ee(M.target.value),multiline:!0,minRows:6,fullWidth:!0,sx:{mb:1.5}}),r.attachments.length>0&&u.jsx(g.List,{dense:!0,sx:{display:"flex",flexDirection:"column",gap:2,border:"none"},children:r.attachments.map(M=>u.jsxs(g.ListItem,{sx:{px:0,background:"#EAEBF2",borderRadius:2,paddingX:1},children:[u.jsx(g.ListItemText,{style:{gap:10,fontSize:15,color:"#5285F7",display:"flex",flexWrap:"wrap",flex:"none"},primary:M.name,secondary:M.size<1024?`${M.size} b`:M.size<1024*1024?`${(M.size/1024).toFixed(0)} kb`:`${(M.size/(1024*1024)).toFixed(1)} MB`,secondaryTypographyProps:{sx:{fontSize:12,color:"#64748B",fontWeight:500,mt:.25}},primaryTypographyProps:{noWrap:!0,width:"auto"}}),u.jsx(g.Tooltip,{title:"Quitar",children:u.jsx(g.IconButton,{edge:"end",onClick:()=>te(M.name),size:"small",children:u.jsx(Ur,{fontSize:"small"})})})]},M.name))})]}),u.jsxs(g.Box,{sx:{position:{xs:"sticky",sm:"sticky"},bottom:0,bgcolor:"#fff",borderTop:"1px solid #E5E7EB",p:2,display:"flex",alignItems:"center",gap:2},children:[u.jsx("input",{ref:v,hidden:!0,type:"file",multiple:!0,accept:".jpg,.jpeg,.png,.mp4,.pdf,.xlsx,.csv,.docx,.pptx,.txt",onChange:Ue}),u.jsx(g.Button,{startIcon:u.jsx(A3,{}),variant:"text",onClick:()=>v.current?.click(),sx:{color:"#5C6372"},children:"Adjuntar archivo"}),u.jsx(g.Box,{sx:{flex:1}}),u.jsx(g.Button,{variant:"contained",onClick:z,disabled:!oe,sx:{maxWidth:146,width:"100%",height:53,backgroundColor:"#336BE1"},children:"Enviar"})]})]}),u.jsxs(g.Dialog,{fullWidth:!0,maxWidth:"sm",fullScreen:fe,open:I,onClose:R,children:[u.jsxs(g.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:1},children:["Selecciona tu auto de seguimiento",u.jsx(g.IconButton,{onClick:R,size:"small",children:u.jsx(Ur,{})})]}),u.jsxs(g.DialogContent,{children:[u.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[u.jsx(g.TextField,{placeholder:"Buscar...",fullWidth:!0,size:"small",value:A,onChange:M=>Y(M.target.value),sx:{mb:2}}),Le!=null&&u.jsx(g.Chip,{size:"small",label:`Distribuidora: ${Le}`})]}),u.jsxs(g.Typography,{variant:"caption",fontWeight:600,children:["RESULTADOS (",st.length,")"]}),u.jsxs(g.List,{sx:{p:0},children:[st.map((M,U)=>{const Se=Dr(M,U,p.id),$e=W.includes(String(Se))||W.includes(Se),K=Me==null||Dr(M,U,p.distributorId)==Me;return u.jsx(g.ListItem,{disableGutters:!0,sx:{p:0,opacity:K?1:.5},children:u.jsx(g.Box,{onClick:()=>K&&he(Se),sx:{cursor:K?"pointer":"not-allowed",p:.5,backgroundColor:$e?"#e5f0ff":"transparent",width:"100%",borderBottom:"solid 1px #D3D4D5"},children:a?a(M,U):u.jsx("pre",{style:{margin:0},children:JSON.stringify(M,null,2)})})},String(Se))}),st.length===0&&u.jsx(g.Box,{p:2,children:u.jsx(g.Typography,{children:"Tu búsqueda no generó resultados"})})]})]}),u.jsxs(g.DialogActions,{sx:{px:3,pb:2},children:[u.jsx(g.Button,{variant:"text",onClick:R,sx:{color:"#5C6372"},children:"Cancelar"}),u.jsx(g.Button,{variant:"contained",onClick:X,sx:{backgroundColor:"#336BE1"},children:"Guardar selección"})]})]})]})}Et.AddCliente=k3,Et.ApiProvider=E_,Et.AuthProvider=e1,Et.Clientes=l3,Et.CustomSnackbar=jh,Et.EventsProvider=mk,Et.ModalCorreo=O3,Et.MyCalendar=xk,Et.useAuth=sc,Et.useAuthRepository=Ei,Et.useEventRepository=Cc,Object.defineProperty(Et,Symbol.toStringTag,{value:"Module"})}));