componentes-exagono 0.2.32 → 0.2.34
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.es.js +6667 -6605
- package/dist/index.umd.js +50 -50
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(jt,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):(jt=typeof globalThis<"u"?globalThis:jt||self,v(jt.exagono={},jt.React,jt.MaterialUI,jt.dateFns,jt.ReactDOM,jt.notistack))})(this,(function(jt,v,m,x,fl,_s){"use strict";function pl(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 K=pl(v),m0=pl(fl);function tt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Yr(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 ws={exports:{}},to={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var hl;function g0(){if(hl)return to;hl=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,u){var d,f={},h=null,y=null;u!==void 0&&(h=""+u),c.key!==void 0&&(h=""+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:h,ref:y,props:f,_owner:o.current}}return to.Fragment=r,to.jsx=i,to.jsxs=i,to}var ro={};/**
|
|
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
|
|
18
|
-
`+
|
|
19
|
-
`),
|
|
20
|
-
`),
|
|
21
|
-
`+
|
|
17
|
+
*/var ml;function v0(){return ml||(ml=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"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),g=Symbol.iterator,p="@@iterator";function b(A){if(A===null||typeof A!="object")return null;var ne=g&&A[g]||A[p];return typeof ne=="function"?ne:null}var w=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(A){{for(var ne=arguments.length,ve=new Array(ne>1?ne-1:0),je=1;je<ne;je++)ve[je-1]=arguments[je];E("error",A,ve)}}function E(A,ne,ve){{var je=w.ReactDebugCurrentFrame,Qe=je.getStackAddendum();Qe!==""&&(ne+="%s",ve=ve.concat([Qe]));var dt=ve.map(function(qe){return String(qe)});dt.unshift("Warning: "+ne),Function.prototype.apply.call(console[A],console,dt)}}var C=!1,_=!1,W=!1,D=!1,T=!1,M;M=Symbol.for("react.module.reference");function I(A){return!!(typeof A=="string"||typeof A=="function"||A===n||A===s||T||A===o||A===u||A===d||D||A===y||C||_||W||typeof A=="object"&&A!==null&&(A.$$typeof===h||A.$$typeof===f||A.$$typeof===i||A.$$typeof===a||A.$$typeof===c||A.$$typeof===M||A.getModuleId!==void 0))}function H(A,ne,ve){var je=A.displayName;if(je)return je;var Qe=ne.displayName||ne.name||"";return Qe!==""?ve+"("+Qe+")":ve}function G(A){return A.displayName||"Context"}function F(A){if(A==null)return null;if(typeof A.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof A=="function")return A.displayName||A.name||null;if(typeof A=="string")return A;switch(A){case n:return"Fragment";case r:return"Portal";case s:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case d:return"SuspenseList"}if(typeof A=="object")switch(A.$$typeof){case a:var ne=A;return G(ne)+".Consumer";case i:var ve=A;return G(ve._context)+".Provider";case c:return H(A,A.render,"ForwardRef");case f:var je=A.displayName||null;return je!==null?je:F(A.type)||"Memo";case h:{var Qe=A,dt=Qe._payload,qe=Qe._init;try{return F(qe(dt))}catch{return null}}}return null}var Y=Object.assign,se=0,U,N,le,de,$,Q,we;function _e(){}_e.__reactDisabledLog=!0;function he(){{if(se===0){U=console.log,N=console.info,le=console.warn,de=console.error,$=console.group,Q=console.groupCollapsed,we=console.groupEnd;var A={configurable:!0,enumerable:!0,value:_e,writable:!0};Object.defineProperties(console,{info:A,log:A,warn:A,error:A,group:A,groupCollapsed:A,groupEnd:A})}se++}}function ae(){{if(se--,se===0){var A={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Y({},A,{value:U}),info:Y({},A,{value:N}),warn:Y({},A,{value:le}),error:Y({},A,{value:de}),group:Y({},A,{value:$}),groupCollapsed:Y({},A,{value:Q}),groupEnd:Y({},A,{value:we})})}se<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ue=w.ReactCurrentDispatcher,J;function Se(A,ne,ve){{if(J===void 0)try{throw Error()}catch(Qe){var je=Qe.stack.trim().match(/\n( *(at )?)/);J=je&&je[1]||""}return`
|
|
18
|
+
`+J+A}}var me=!1,ee;{var Ie=typeof WeakMap=="function"?WeakMap:Map;ee=new Ie}function j(A,ne){if(!A||me)return"";{var ve=ee.get(A);if(ve!==void 0)return ve}var je;me=!0;var Qe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var dt;dt=ue.current,ue.current=null,he();try{if(ne){var qe=function(){throw Error()};if(Object.defineProperty(qe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(qe,[])}catch(Te){je=Te}Reflect.construct(A,[],qe)}else{try{qe.call()}catch(Te){je=Te}A.call(qe.prototype)}}else{try{throw Error()}catch(Te){je=Te}A()}}catch(Te){if(Te&&je&&typeof Te.stack=="string"){for(var We=Te.stack.split(`
|
|
19
|
+
`),Yt=je.stack.split(`
|
|
20
|
+
`),gt=We.length-1,Ot=Yt.length-1;gt>=1&&Ot>=0&&We[gt]!==Yt[Ot];)Ot--;for(;gt>=1&&Ot>=0;gt--,Ot--)if(We[gt]!==Yt[Ot]){if(gt!==1||Ot!==1)do if(gt--,Ot--,Ot<0||We[gt]!==Yt[Ot]){var L=`
|
|
21
|
+
`+We[gt].replace(" at new "," at ");return A.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",A.displayName)),typeof A=="function"&&ee.set(A,L),L}while(gt>=1&&Ot>=0);break}}}finally{me=!1,ue.current=dt,ae(),Error.prepareStackTrace=Qe}var X=A?A.displayName||A.name:"",ye=X?Se(X):"";return typeof A=="function"&&ee.set(A,ye),ye}function Fe(A,ne,ve){return j(A,!1)}function Ke(A){var ne=A.prototype;return!!(ne&&ne.isReactComponent)}function Ze(A,ne,ve){if(A==null)return"";if(typeof A=="function")return j(A,Ke(A));if(typeof A=="string")return Se(A);switch(A){case u:return Se("Suspense");case d:return Se("SuspenseList")}if(typeof A=="object")switch(A.$$typeof){case c:return Fe(A.render);case f:return Ze(A.type,ne,ve);case h:{var je=A,Qe=je._payload,dt=je._init;try{return Ze(dt(Qe),ne,ve)}catch{}}}return""}var Be=Object.prototype.hasOwnProperty,Ve={},et=w.ReactDebugCurrentFrame;function mt(A){if(A){var ne=A._owner,ve=Ze(A.type,A._source,ne?ne.type:null);et.setExtraStackFrame(ve)}else et.setExtraStackFrame(null)}function k(A,ne,ve,je,Qe){{var dt=Function.call.bind(Be);for(var qe in A)if(dt(A,qe)){var We=void 0;try{if(typeof A[qe]!="function"){var Yt=Error((je||"React class")+": "+ve+" type `"+qe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof A[qe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Yt.name="Invariant Violation",Yt}We=A[qe](ne,qe,je,ve,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(gt){We=gt}We&&!(We instanceof Error)&&(mt(Qe),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).",je||"React class",ve,qe,typeof We),mt(null)),We instanceof Error&&!(We.message in Ve)&&(Ve[We.message]=!0,mt(Qe),S("Failed %s type: %s",ve,We.message),mt(null))}}}var P=Array.isArray;function B(A){return P(A)}function ce(A){{var ne=typeof Symbol=="function"&&Symbol.toStringTag,ve=ne&&A[Symbol.toStringTag]||A.constructor.name||"Object";return ve}}function ie(A){try{return O(A),!1}catch{return!0}}function O(A){return""+A}function oe(A){if(ie(A))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ce(A)),O(A)}var Ce=w.ReactCurrentOwner,Re={key:!0,ref:!0,__self:!0,__source:!0},R,te;function xe(A){if(Be.call(A,"ref")){var ne=Object.getOwnPropertyDescriptor(A,"ref").get;if(ne&&ne.isReactWarning)return!1}return A.ref!==void 0}function Ge(A){if(Be.call(A,"key")){var ne=Object.getOwnPropertyDescriptor(A,"key").get;if(ne&&ne.isReactWarning)return!1}return A.key!==void 0}function At(A,ne){typeof A.ref=="string"&&Ce.current}function q(A,ne){{var ve=function(){R||(R=!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))};ve.isReactWarning=!0,Object.defineProperty(A,"key",{get:ve,configurable:!0})}}function fe(A,ne){{var ve=function(){te||(te=!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))};ve.isReactWarning=!0,Object.defineProperty(A,"ref",{get:ve,configurable:!0})}}var De=function(A,ne,ve,je,Qe,dt,qe){var We={$$typeof:t,type:A,key:ne,ref:ve,props:qe,_owner:dt};return We._store={},Object.defineProperty(We._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(We,"_self",{configurable:!1,enumerable:!1,writable:!1,value:je}),Object.defineProperty(We,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Qe}),Object.freeze&&(Object.freeze(We.props),Object.freeze(We)),We};function Me(A,ne,ve,je,Qe){{var dt,qe={},We=null,Yt=null;ve!==void 0&&(oe(ve),We=""+ve),Ge(ne)&&(oe(ne.key),We=""+ne.key),xe(ne)&&(Yt=ne.ref,At(ne,Qe));for(dt in ne)Be.call(ne,dt)&&!Re.hasOwnProperty(dt)&&(qe[dt]=ne[dt]);if(A&&A.defaultProps){var gt=A.defaultProps;for(dt in gt)qe[dt]===void 0&&(qe[dt]=gt[dt])}if(We||Yt){var Ot=typeof A=="function"?A.displayName||A.name||"Unknown":A;We&&q(qe,Ot),Yt&&fe(qe,Ot)}return De(A,We,Yt,Qe,je,Ce.current,qe)}}var Ne=w.ReactCurrentOwner,re=w.ReactDebugCurrentFrame;function Ee(A){if(A){var ne=A._owner,ve=Ze(A.type,A._source,ne?ne.type:null);re.setExtraStackFrame(ve)}else re.setExtraStackFrame(null)}var Oe;Oe=!1;function Pe(A){return typeof A=="object"&&A!==null&&A.$$typeof===t}function wr(){{if(Ne.current){var A=F(Ne.current.type);if(A)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+
|
|
23
|
+
Check the render method of \``+A+"`."}return""}}function ar(A){return""}var Vt={};function Jr(A){{var ne=wr();if(!ne){var ve=typeof A=="string"?A:A.displayName||A.name;ve&&(ne=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+
|
|
25
|
+
Check the top-level render call using <`+ve+">.")}return ne}}function Ye(A,ne){{if(!A._store||A._store.validated||A.key!=null)return;A._store.validated=!0;var ve=Jr(ne);if(Vt[ve])return;Vt[ve]=!0;var je="";A&&A._owner&&A._owner!==Ne.current&&(je=" It was passed a child from "+F(A._owner.type)+"."),Ee(A),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ve,je),Ee(null)}}function Sr(A,ne){{if(typeof A!="object")return;if(B(A))for(var ve=0;ve<A.length;ve++){var je=A[ve];Pe(je)&&Ye(je,ne)}else if(Pe(A))A._store&&(A._store.validated=!0);else if(A){var Qe=b(A);if(typeof Qe=="function"&&Qe!==A.entries)for(var dt=Qe.call(A),qe;!(qe=dt.next()).done;)Pe(qe.value)&&Ye(qe.value,ne)}}}function oa(A){{var ne=A.type;if(ne==null||typeof ne=="string")return;var ve;if(typeof ne=="function")ve=ne.propTypes;else if(typeof ne=="object"&&(ne.$$typeof===c||ne.$$typeof===f))ve=ne.propTypes;else return;if(ve){var je=F(ne);k(ve,A.props,"prop",je,A)}else if(ne.PropTypes!==void 0&&!Oe){Oe=!0;var Qe=F(ne);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Qe||"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 ll(A){{for(var ne=Object.keys(A.props),ve=0;ve<ne.length;ve++){var je=ne[ve];if(je!=="children"&&je!=="key"){Ee(A),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",je),Ee(null);break}}A.ref!==null&&(Ee(A),S("Invalid attribute `ref` supplied to `React.Fragment`."),Ee(null))}}var bs={};function xs(A,ne,ve,je,Qe,dt){{var qe=I(A);if(!qe){var We="";(A===void 0||typeof A=="object"&&A!==null&&Object.keys(A).length===0)&&(We+=" 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 Yt=ar();Yt?We+=Yt:We+=wr();var gt;A===null?gt="null":B(A)?gt="array":A!==void 0&&A.$$typeof===t?(gt="<"+(F(A.type)||"Unknown")+" />",We=" Did you accidentally export a JSX literal instead of a component?"):gt=typeof A,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",gt,We)}var Ot=Me(A,ne,ve,Qe,dt);if(Ot==null)return Ot;if(qe){var L=ne.children;if(L!==void 0)if(je)if(B(L)){for(var X=0;X<L.length;X++)Sr(L[X],A);Object.freeze&&Object.freeze(L)}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 Sr(L,A)}if(Be.call(ne,"key")){var ye=F(A),Te=Object.keys(ne).filter(function(Or){return Or!=="key"}),Tt=Te.length>0?"{key: someKey, "+Te.join(": ..., ")+": ...}":"{key: someKey}";if(!bs[ye+Tt]){var Ct=Te.length>0?"{"+Te.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} />`,
|
|
30
|
+
<%s key={someKey} {...props} />`,Tt,ye,Ct,ye),bs[ye+Tt]=!0}}return A===n?ll(Ot):oa(Ot),Ot}}function sa(A,ne,ve){return xs(A,ne,ve,!0)}function ia(A,ne,ve){return xs(A,ne,ve,!1)}var ul=ia,aa=sa;ro.Fragment=n,ro.jsx=ul,ro.jsxs=aa})()),ro}var gl;function lt(){return gl||(gl=1,process.env.NODE_ENV==="production"?ws.exports=g0():ws.exports=v0()),ws.exports}var l=lt();const Er={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 no={},ca={exports:{}},vl;function rt(){return vl||(vl=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})(ca)),ca.exports}var la={};function nt(){return nt=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},nt.apply(null,arguments)}function en(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 yl(e){if(K.isValidElement(e)||!en(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=yl(e[r])}),t}function jr(e,t,r={clone:!0}){const n=r.clone?nt({},e):e;return en(e)&&en(t)&&Object.keys(t).forEach(o=>{K.isValidElement(t[o])?n[o]=t[o]:en(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&en(e[o])?n[o]=jr(e[o],t[o],r):r.clone?n[o]=en(t[o])?yl(t[o]):t[o]:n[o]=t[o]}),n}const y0=Object.freeze(Object.defineProperty({__proto__:null,default:jr,isPlainObject:en},Symbol.toStringTag,{value:"Module"}));var Ss={exports:{}},Cs={exports:{}},ot={};/** @license React v16.13.1
|
|
31
31
|
* react-is.production.min.js
|
|
32
32
|
*
|
|
33
33
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the MIT license found in the
|
|
36
36
|
* LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/var
|
|
37
|
+
*/var bl;function b0(){if(bl)return ot;bl=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,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=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 E(_){if(typeof _=="object"&&_!==null){var W=_.$$typeof;switch(W){case t:switch(_=_.type,_){case c:case u:case n:case s:case o:case f:return _;default:switch(_=_&&_.$$typeof,_){case a:case d:case g:case y:case i:return _;default:return W}}case r:return W}}}function C(_){return E(_)===u}return ot.AsyncMode=c,ot.ConcurrentMode=u,ot.ContextConsumer=a,ot.ContextProvider=i,ot.Element=t,ot.ForwardRef=d,ot.Fragment=n,ot.Lazy=g,ot.Memo=y,ot.Portal=r,ot.Profiler=s,ot.StrictMode=o,ot.Suspense=f,ot.isAsyncMode=function(_){return C(_)||E(_)===c},ot.isConcurrentMode=C,ot.isContextConsumer=function(_){return E(_)===a},ot.isContextProvider=function(_){return E(_)===i},ot.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===t},ot.isForwardRef=function(_){return E(_)===d},ot.isFragment=function(_){return E(_)===n},ot.isLazy=function(_){return E(_)===g},ot.isMemo=function(_){return E(_)===y},ot.isPortal=function(_){return E(_)===r},ot.isProfiler=function(_){return E(_)===s},ot.isStrictMode=function(_){return E(_)===o},ot.isSuspense=function(_){return E(_)===f},ot.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===n||_===u||_===s||_===o||_===f||_===h||typeof _=="object"&&_!==null&&(_.$$typeof===g||_.$$typeof===y||_.$$typeof===i||_.$$typeof===a||_.$$typeof===d||_.$$typeof===b||_.$$typeof===w||_.$$typeof===S||_.$$typeof===p)},ot.typeOf=E,ot}var st={};/** @license React v16.13.1
|
|
38
38
|
* react-is.development.js
|
|
39
39
|
*
|
|
40
40
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
41
41
|
*
|
|
42
42
|
* This source code is licensed under the MIT license found in the
|
|
43
43
|
* LICENSE file in the root directory of this source tree.
|
|
44
|
-
*/var
|
|
44
|
+
*/var xl;function x0(){return xl||(xl=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,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=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 E(j){return typeof j=="string"||typeof j=="function"||j===n||j===u||j===s||j===o||j===f||j===h||typeof j=="object"&&j!==null&&(j.$$typeof===g||j.$$typeof===y||j.$$typeof===i||j.$$typeof===a||j.$$typeof===d||j.$$typeof===b||j.$$typeof===w||j.$$typeof===S||j.$$typeof===p)}function C(j){if(typeof j=="object"&&j!==null){var Fe=j.$$typeof;switch(Fe){case t:var Ke=j.type;switch(Ke){case c:case u:case n:case s:case o:case f:return Ke;default:var Ze=Ke&&Ke.$$typeof;switch(Ze){case a:case d:case g:case y:case i:return Ze;default:return Fe}}case r:return Fe}}}var _=c,W=u,D=a,T=i,M=t,I=d,H=n,G=g,F=y,Y=r,se=s,U=o,N=f,le=!1;function de(j){return le||(le=!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.")),$(j)||C(j)===c}function $(j){return C(j)===u}function Q(j){return C(j)===a}function we(j){return C(j)===i}function _e(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function he(j){return C(j)===d}function ae(j){return C(j)===n}function ue(j){return C(j)===g}function J(j){return C(j)===y}function Se(j){return C(j)===r}function me(j){return C(j)===s}function ee(j){return C(j)===o}function Ie(j){return C(j)===f}st.AsyncMode=_,st.ConcurrentMode=W,st.ContextConsumer=D,st.ContextProvider=T,st.Element=M,st.ForwardRef=I,st.Fragment=H,st.Lazy=G,st.Memo=F,st.Portal=Y,st.Profiler=se,st.StrictMode=U,st.Suspense=N,st.isAsyncMode=de,st.isConcurrentMode=$,st.isContextConsumer=Q,st.isContextProvider=we,st.isElement=_e,st.isForwardRef=he,st.isFragment=ae,st.isLazy=ue,st.isMemo=J,st.isPortal=Se,st.isProfiler=me,st.isStrictMode=ee,st.isSuspense=Ie,st.isValidElementType=E,st.typeOf=C})()),st}var _l;function wl(){return _l||(_l=1,process.env.NODE_ENV==="production"?Cs.exports=b0():Cs.exports=x0()),Cs.exports}/*
|
|
45
45
|
object-assign
|
|
46
46
|
(c) Sindre Sorhus
|
|
47
47
|
@license MIT
|
|
48
|
-
*/var
|
|
49
|
-
Valid keys: `+JSON.stringify(Object.keys($),null," "));var j=
|
|
48
|
+
*/var ua,Sl;function _0(){if(Sl)return ua;Sl=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 u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ua=o()?Object.assign:function(s,i){for(var a,c=n(s),u,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){u=e(a);for(var h=0;h<u.length;h++)r.call(a,u[h])&&(c[u[h]]=a[u[h]])}}return c},ua}var da,Cl;function fa(){if(Cl)return da;Cl=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return da=e,da}var pa,El;function Dl(){return El||(El=1,pa=Function.call.bind(Object.prototype.hasOwnProperty)),pa}var ha,kl;function w0(){if(kl)return ha;kl=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=fa(),r={},n=Dl();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,u){if(process.env.NODE_ENV!=="production"){for(var d in s)if(n(s,d)){var f;try{if(typeof s[d]!="function"){var h=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 h.name="Invariant Violation",h}f=s[d](i,d,c,a,null,t)}catch(g){f=g}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=u?u():"";e("Failed "+a+" type: "+f.message+(y??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},ha=o,ha}var ma,Al;function S0(){if(Al)return ma;Al=1;var e=wl(),t=_0(),r=fa(),n=Dl(),o=w0(),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 ma=function(a,c){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f($){var Q=$&&(u&&$[u]||$[d]);if(typeof Q=="function")return Q}var h="<<anonymous>>",y={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:E,element:C(),elementType:_(),instanceOf:W,node:I(),objectOf:T,oneOf:D,oneOfType:M,shape:G,exact:F};function g($,Q){return $===Q?$!==0||1/$===1/Q:$!==$&&Q!==Q}function p($,Q){this.message=$,this.data=Q&&typeof Q=="object"?Q:{},this.stack=""}p.prototype=Error.prototype;function b($){if(process.env.NODE_ENV!=="production")var Q={},we=0;function _e(ae,ue,J,Se,me,ee,Ie){if(Se=Se||h,ee=ee||J,Ie!==r){if(c){var j=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 j.name="Invariant Violation",j}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Fe=Se+":"+J;!Q[Fe]&&we<3&&(s("You are manually calling a React.PropTypes validation function for the `"+ee+"` prop on `"+Se+"`. 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."),Q[Fe]=!0,we++)}}return ue[J]==null?ae?ue[J]===null?new p("The "+me+" `"+ee+"` is marked as required "+("in `"+Se+"`, but its value is `null`.")):new p("The "+me+" `"+ee+"` is marked as required in "+("`"+Se+"`, but its value is `undefined`.")):null:$(ue,J,Se,me,ee)}var he=_e.bind(null,!1);return he.isRequired=_e.bind(null,!0),he}function w($){function Q(we,_e,he,ae,ue,J){var Se=we[_e],me=U(Se);if(me!==$){var ee=N(Se);return new p("Invalid "+ae+" `"+ue+"` of type "+("`"+ee+"` supplied to `"+he+"`, expected ")+("`"+$+"`."),{expectedType:$})}return null}return b(Q)}function S(){return b(i)}function E($){function Q(we,_e,he,ae,ue){if(typeof $!="function")return new p("Property `"+ue+"` of component `"+he+"` has invalid PropType notation inside arrayOf.");var J=we[_e];if(!Array.isArray(J)){var Se=U(J);return new p("Invalid "+ae+" `"+ue+"` of type "+("`"+Se+"` supplied to `"+he+"`, expected an array."))}for(var me=0;me<J.length;me++){var ee=$(J,me,he,ae,ue+"["+me+"]",r);if(ee instanceof Error)return ee}return null}return b(Q)}function C(){function $(Q,we,_e,he,ae){var ue=Q[we];if(!a(ue)){var J=U(ue);return new p("Invalid "+he+" `"+ae+"` of type "+("`"+J+"` supplied to `"+_e+"`, expected a single ReactElement."))}return null}return b($)}function _(){function $(Q,we,_e,he,ae){var ue=Q[we];if(!e.isValidElementType(ue)){var J=U(ue);return new p("Invalid "+he+" `"+ae+"` of type "+("`"+J+"` supplied to `"+_e+"`, expected a single ReactElement type."))}return null}return b($)}function W($){function Q(we,_e,he,ae,ue){if(!(we[_e]instanceof $)){var J=$.name||h,Se=de(we[_e]);return new p("Invalid "+ae+" `"+ue+"` of type "+("`"+Se+"` supplied to `"+he+"`, expected ")+("instance of `"+J+"`."))}return null}return b(Q)}function D($){if(!Array.isArray($))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 Q(we,_e,he,ae,ue){for(var J=we[_e],Se=0;Se<$.length;Se++)if(g(J,$[Se]))return null;var me=JSON.stringify($,function(Ie,j){var Fe=N(j);return Fe==="symbol"?String(j):j});return new p("Invalid "+ae+" `"+ue+"` of value `"+String(J)+"` "+("supplied to `"+he+"`, expected one of "+me+"."))}return b(Q)}function T($){function Q(we,_e,he,ae,ue){if(typeof $!="function")return new p("Property `"+ue+"` of component `"+he+"` has invalid PropType notation inside objectOf.");var J=we[_e],Se=U(J);if(Se!=="object")return new p("Invalid "+ae+" `"+ue+"` of type "+("`"+Se+"` supplied to `"+he+"`, expected an object."));for(var me in J)if(n(J,me)){var ee=$(J,me,he,ae,ue+"."+me,r);if(ee instanceof Error)return ee}return null}return b(Q)}function M($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var Q=0;Q<$.length;Q++){var we=$[Q];if(typeof we!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+le(we)+" at index "+Q+"."),i}function _e(he,ae,ue,J,Se){for(var me=[],ee=0;ee<$.length;ee++){var Ie=$[ee],j=Ie(he,ae,ue,J,Se,r);if(j==null)return null;j.data&&n(j.data,"expectedType")&&me.push(j.data.expectedType)}var Fe=me.length>0?", expected one of type ["+me.join(", ")+"]":"";return new p("Invalid "+J+" `"+Se+"` supplied to "+("`"+ue+"`"+Fe+"."))}return b(_e)}function I(){function $(Q,we,_e,he,ae){return Y(Q[we])?null:new p("Invalid "+he+" `"+ae+"` supplied to "+("`"+_e+"`, expected a ReactNode."))}return b($)}function H($,Q,we,_e,he){return new p(($||"React class")+": "+Q+" type `"+we+"."+_e+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+he+"`.")}function G($){function Q(we,_e,he,ae,ue){var J=we[_e],Se=U(J);if(Se!=="object")return new p("Invalid "+ae+" `"+ue+"` of type `"+Se+"` "+("supplied to `"+he+"`, expected `object`."));for(var me in $){var ee=$[me];if(typeof ee!="function")return H(he,ae,ue,me,N(ee));var Ie=ee(J,me,he,ae,ue+"."+me,r);if(Ie)return Ie}return null}return b(Q)}function F($){function Q(we,_e,he,ae,ue){var J=we[_e],Se=U(J);if(Se!=="object")return new p("Invalid "+ae+" `"+ue+"` of type `"+Se+"` "+("supplied to `"+he+"`, expected `object`."));var me=t({},we[_e],$);for(var ee in me){var Ie=$[ee];if(n($,ee)&&typeof Ie!="function")return H(he,ae,ue,ee,N(Ie));if(!Ie)return new p("Invalid "+ae+" `"+ue+"` key `"+ee+"` supplied to `"+he+"`.\nBad object: "+JSON.stringify(we[_e],null," ")+`
|
|
49
|
+
Valid keys: `+JSON.stringify(Object.keys($),null," "));var j=Ie(J,ee,he,ae,ue+"."+ee,r);if(j)return j}return null}return b(Q)}function Y($){switch(typeof $){case"number":case"string":case"undefined":return!0;case"boolean":return!$;case"object":if(Array.isArray($))return $.every(Y);if($===null||a($))return!0;var Q=f($);if(Q){var we=Q.call($),_e;if(Q!==$.entries){for(;!(_e=we.next()).done;)if(!Y(_e.value))return!1}else for(;!(_e=we.next()).done;){var he=_e.value;if(he&&!Y(he[1]))return!1}}else return!1;return!0;default:return!1}}function se($,Q){return $==="symbol"?!0:Q?Q["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Q instanceof Symbol:!1}function U($){var Q=typeof $;return Array.isArray($)?"array":$ instanceof RegExp?"object":se(Q,$)?"symbol":Q}function N($){if(typeof $>"u"||$===null)return""+$;var Q=U($);if(Q==="object"){if($ instanceof Date)return"date";if($ instanceof RegExp)return"regexp"}return Q}function le($){var Q=N($);switch(Q){case"array":case"object":return"an "+Q;case"boolean":case"date":case"regexp":return"a "+Q;default:return Q}}function de($){return!$.constructor||!$.constructor.name?h:$.constructor.name}return y.checkPropTypes=o,y.resetWarningCache=o.resetWarningCache,y.PropTypes=y,y},ma}var ga,Tl;function C0(){if(Tl)return ga;Tl=1;var e=fa();function t(){}function r(){}return r.resetWarningCache=t,ga=function(){function n(i,a,c,u,d,f){if(f!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}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},ga}var Il;function E0(){if(Il)return Ss.exports;if(Il=1,process.env.NODE_ENV!=="production"){var e=wl(),t=!0;Ss.exports=S0()(e.isElement,t)}else Ss.exports=C0()();return Ss.exports}var D0=E0();const ze=tt(D0);function oo(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 k0=Object.freeze(Object.defineProperty({__proto__:null,default:oo},Symbol.toStringTag,{value:"Module"}));var Es={exports:{}},ft={};/**
|
|
50
50
|
* @license React
|
|
51
51
|
* react-is.production.js
|
|
52
52
|
*
|
|
@@ -54,7 +54,7 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var j=Re(le,pe,we,ae,ee+
|
|
|
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
|
|
57
|
+
*/var Ml;function A0(){if(Ml)return ft;Ml=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"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),y=Symbol.for("react.client.reference");function g(p){if(typeof p=="object"&&p!==null){var b=p.$$typeof;switch(b){case e:switch(p=p.type,p){case r:case o:case n:case c:case u:case h:return p;default:switch(p=p&&p.$$typeof,p){case i:case a:case f:case d:return p;case s:return p;default:return b}}case t:return b}}}return ft.ContextConsumer=s,ft.ContextProvider=i,ft.Element=e,ft.ForwardRef=a,ft.Fragment=r,ft.Lazy=f,ft.Memo=d,ft.Portal=t,ft.Profiler=o,ft.StrictMode=n,ft.Suspense=c,ft.SuspenseList=u,ft.isContextConsumer=function(p){return g(p)===s},ft.isContextProvider=function(p){return g(p)===i},ft.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},ft.isForwardRef=function(p){return g(p)===a},ft.isFragment=function(p){return g(p)===r},ft.isLazy=function(p){return g(p)===f},ft.isMemo=function(p){return g(p)===d},ft.isPortal=function(p){return g(p)===t},ft.isProfiler=function(p){return g(p)===o},ft.isStrictMode=function(p){return g(p)===n},ft.isSuspense=function(p){return g(p)===c},ft.isSuspenseList=function(p){return g(p)===u},ft.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===r||p===o||p===n||p===c||p===u||typeof p=="object"&&p!==null&&(p.$$typeof===f||p.$$typeof===d||p.$$typeof===i||p.$$typeof===s||p.$$typeof===a||p.$$typeof===y||p.getModuleId!==void 0)},ft.typeOf=g,ft}var pt={};/**
|
|
58
58
|
* @license React
|
|
59
59
|
* react-is.development.js
|
|
60
60
|
*
|
|
@@ -62,36 +62,36 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var j=Re(le,pe,we,ae,ee+
|
|
|
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
|
|
65
|
+
*/var Pl;function T0(){return Pl||(Pl=1,process.env.NODE_ENV!=="production"&&(function(){function e(p){if(typeof p=="object"&&p!==null){var b=p.$$typeof;switch(b){case t:switch(p=p.type,p){case n:case s:case o:case u:case d:case y:return p;default:switch(p=p&&p.$$typeof,p){case a:case c:case h:case f:return p;case i:return p;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"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),y=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");pt.ContextConsumer=i,pt.ContextProvider=a,pt.Element=t,pt.ForwardRef=c,pt.Fragment=n,pt.Lazy=h,pt.Memo=f,pt.Portal=r,pt.Profiler=s,pt.StrictMode=o,pt.Suspense=u,pt.SuspenseList=d,pt.isContextConsumer=function(p){return e(p)===i},pt.isContextProvider=function(p){return e(p)===a},pt.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===t},pt.isForwardRef=function(p){return e(p)===c},pt.isFragment=function(p){return e(p)===n},pt.isLazy=function(p){return e(p)===h},pt.isMemo=function(p){return e(p)===f},pt.isPortal=function(p){return e(p)===r},pt.isProfiler=function(p){return e(p)===s},pt.isStrictMode=function(p){return e(p)===o},pt.isSuspense=function(p){return e(p)===u},pt.isSuspenseList=function(p){return e(p)===d},pt.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===n||p===s||p===o||p===u||p===d||typeof p=="object"&&p!==null&&(p.$$typeof===h||p.$$typeof===f||p.$$typeof===a||p.$$typeof===i||p.$$typeof===c||p.$$typeof===g||p.getModuleId!==void 0)},pt.typeOf=e})()),pt}var Ol;function I0(){return Ol||(Ol=1,process.env.NODE_ENV==="production"?Es.exports=A0():Es.exports=T0()),Es.exports}var jl=I0();const M0=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function Rl(e){const t=`${e}`.match(M0);return t&&t[1]||""}function Nl(e,t=""){return e.displayName||e.name||Rl(e)||t}function $l(e,t,r){const n=Nl(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function P0(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Nl(e,"Component");if(typeof e=="object")switch(e.$$typeof){case jl.ForwardRef:return $l(e,e.render,"ForwardRef");case jl.Memo:return $l(e,e.type,"memo");default:return}}}const O0=Object.freeze(Object.defineProperty({__proto__:null,default:P0,getFunctionName:Rl},Symbol.toStringTag,{value:"Module"}));function tn(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":oo(7));return e.charAt(0).toUpperCase()+e.slice(1)}const j0=Object.freeze(Object.defineProperty({__proto__:null,default:tn},Symbol.toStringTag,{value:"Module"}));function R0(...e){return e.reduce((t,r)=>r==null?t:function(...o){t.apply(this,o),r.apply(this,o)},()=>{})}function N0(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 $0(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 L0(e,t){var r,n;return K.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 Ll(e){return e&&e.ownerDocument||document}function z0(e){return Ll(e).defaultView||window}function B0(e,t){if(process.env.NODE_ENV==="production")return()=>null;const r=t?nt({},t.propTypes):null;return o=>(s,i,a,c,u,...d)=>{const f=u||i,h=r?.[f];if(h){const y=h(s,i,a,c,u,...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 zl(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const Bl=typeof window<"u"?K.useLayoutEffect:K.useEffect;let Fl=0;function F0(e){const[t,r]=K.useState(e),n=e||t;return K.useEffect(()=>{t==null&&(Fl+=1,r(`mui-${Fl}`))},[t]),n}const Wl=K.useId;function W0(e){if(Wl!==void 0){const t=Wl();return e??t}return F0(e)}function H0(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 U0({controlled:e,default:t,name:r,state:n="value"}){const{current:o}=K.useRef(e!==void 0),[s,i]=K.useState(t),a=o?e:s;if(process.env.NODE_ENV!=="production"){K.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
66
|
`))},[n,r,e]);const{current:u}=K.useRef(t);K.useEffect(()=>{!o&&!Object.is(u,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=K.useCallback(u=>{o||i(u)},[]);return[a,c]}function H0(e){const t=K.useRef(e);return zl(()=>{t.current=e}),K.useRef((...r)=>(0,t.current)(...r)).current}function V0(...e){return K.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{Ll(r,t)})},e)}class ga{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new ga}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}}let Es=!0,va=!1;const Y0=new ga,q0={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 Z0(e){const{type:t,tagName:r}=e;return!!(r==="INPUT"&&q0[t]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function G0(e){e.metaKey||e.altKey||e.ctrlKey||(Es=!0)}function ya(){Es=!1}function K0(){this.visibilityState==="hidden"&&va&&(Es=!0)}function Q0(e){e.addEventListener("keydown",G0,!0),e.addEventListener("mousedown",ya,!0),e.addEventListener("pointerdown",ya,!0),e.addEventListener("touchstart",ya,!0),e.addEventListener("visibilitychange",K0,!0)}function X0(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return Es||Z0(t)}function J0(){const e=K.useCallback(o=>{o!=null&&Q0(o.ownerDocument)},[]),t=K.useRef(!1);function r(){return t.current?(va=!0,Y0.start(100,()=>{va=!1}),t.current=!1,!0):!1}function n(o){return X0(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:n,onBlur:r,ref:e}}function ba(e,t){const r=et({},t);return Object.keys(e).forEach(n=>{if(n.toString().match(/^(components|slots)$/))r[n]=et({},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]=et({},s),Object.keys(o).forEach(i=>{r[n][i]=ba(o[i],s[i])}))}else r[n]===void 0&&(r[n]=e[n])}),r}function em(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 Wl=e=>e,Ul=(()=>{let e=Wl;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Wl}}})(),tm={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 xa(e,t,r="Mui"){const n=tm[t];return n?`${r}-${n}`:`${Ul.generate(e)}-${t}`}function rm(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=xa(e,o,r)}),n}function nm(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}const om=Object.freeze(Object.defineProperty({__proto__:null,default:nm},Symbol.toStringTag,{value:"Module"}));function tn(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 Hl(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=Hl(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Vt(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Hl(e))&&(n&&(n+=" "),n+=t);return n}const sm=K.createContext(void 0);process.env.NODE_ENV!=="production"&&(ze.node,ze.object);function im(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?ba(o.defaultProps,n):!o.styleOverrides&&!o.variants?ba(o,n):n}function am({props:e,name:t}){const r=K.useContext(sm);return im({props:e,name:t,theme:{components:r}})}process.env.NODE_ENV!=="production"&&(ze.node,ze.object.isRequired);function cm(e){return am(e)}var dn={},_a={exports:{}},Vl;function lm(){return Vl||(Vl=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})(_a)),_a.exports}var wa={exports:{}},Yl;function um(){return Yl||(Yl=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})(wa)),wa.exports}function dm(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 fm(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 pm=(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(fm(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=dm(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})(),Kt="-ms-",Ds="-moz-",Xe="-webkit-",ql="comm",Sa="rule",Ca="decl",hm="@import",Zl="@keyframes",mm="@layer",gm=Math.abs,ks=String.fromCharCode,vm=Object.assign;function ym(e,t){return qt(e,0)^45?(((t<<2^qt(e,0))<<2^qt(e,1))<<2^qt(e,2))<<2^qt(e,3):0}function Gl(e){return e.trim()}function bm(e,t){return(e=t.exec(e))?e[0]:e}function Je(e,t,r){return e.replace(t,r)}function Ea(e,t){return e.indexOf(t)}function qt(e,t){return e.charCodeAt(t)|0}function so(e,t,r){return e.slice(t,r)}function jr(e){return e.length}function Da(e){return e.length}function As(e,t){return t.push(e),e}function xm(e,t){return e.map(t).join("")}var Ts=1,In=1,Kl=0,nr=0,zt=0,Mn="";function Is(e,t,r,n,o,s,i){return{value:e,root:t,parent:r,type:n,props:o,children:s,line:Ts,column:In,length:i,return:""}}function io(e,t){return vm(Is("",null,null,"",null,null,0),e,{length:-e.length},t)}function _m(){return zt}function wm(){return zt=nr>0?qt(Mn,--nr):0,In--,zt===10&&(In=1,Ts--),zt}function cr(){return zt=nr<Kl?qt(Mn,nr++):0,In++,zt===10&&(In=1,Ts++),zt}function Rr(){return qt(Mn,nr)}function Ms(){return nr}function ao(e,t){return so(Mn,e,t)}function co(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 Ts=In=1,Kl=jr(Mn=e),nr=0,[]}function Xl(e){return Mn="",e}function Ps(e){return Gl(ao(nr-1,ka(e===91?e+2:e===40?e+1:e)))}function Sm(e){for(;(zt=Rr())&&zt<33;)cr();return co(e)>2||co(zt)>3?"":" "}function Cm(e,t){for(;--t&&cr()&&!(zt<48||zt>102||zt>57&&zt<65||zt>70&&zt<97););return ao(e,Ms()+(t<6&&Rr()==32&&cr()==32))}function ka(e){for(;cr();)switch(zt){case e:return nr;case 34:case 39:e!==34&&e!==39&&ka(zt);break;case 40:e===41&&ka(e);break;case 92:cr();break}return nr}function Em(e,t){for(;cr()&&e+zt!==57;)if(e+zt===84&&Rr()===47)break;return"/*"+ao(t,nr-1)+"*"+ks(e===47?e:cr())}function Dm(e){for(;!co(Rr());)cr();return ao(e,nr)}function km(e){return Xl(Os("",null,null,null,[""],e=Ql(e),0,[0],e))}function Os(e,t,r,n,o,s,i,a,c){for(var u=0,d=0,f=i,h=0,v=0,m=0,p=1,b=1,w=1,C=0,E="",S=o,_=s,W=n,D=E;b;)switch(m=C,C=cr()){case 40:if(m!=108&&qt(D,f-1)==58){Ea(D+=Je(Ps(C),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:D+=Ps(C);break;case 9:case 10:case 13:case 32:D+=Sm(m);break;case 92:D+=Cm(Ms()-1,7);continue;case 47:switch(Rr()){case 42:case 47:As(Am(Em(cr(),Ms()),t,r),c);break;default:D+="/"}break;case 123*p:a[u++]=jr(D)*w;case 125*p:case 59:case 0:switch(C){case 0:case 125:b=0;case 59+d:w==-1&&(D=Je(D,/\f/g,"")),v>0&&jr(D)-f&&As(v>32?eu(D+";",n,r,f-1):eu(Je(D," ","")+";",n,r,f-2),c);break;case 59:D+=";";default:if(As(W=Jl(D,t,r,u,d,o,a,E,S=[],_=[],f),s),C===123)if(d===0)Os(D,t,W,W,S,s,f,a,_);else switch(h===99&&qt(D,3)===110?100:h){case 100:case 108:case 109:case 115:Os(e,W,W,n&&As(Jl(e,W,W,0,0,o,a,E,o,S=[],f),_),o,_,f,a,n?S:_);break;default:Os(D,W,W,W,[""],_,0,a,_)}}u=d=v=0,p=w=1,E=D="",f=i;break;case 58:f=1+jr(D),v=m;default:if(p<1){if(C==123)--p;else if(C==125&&p++==0&&wm()==125)continue}switch(D+=ks(C),C*p){case 38:w=d>0?1:(D+="\f",-1);break;case 44:a[u++]=(jr(D)-1)*w,w=1;break;case 64:Rr()===45&&(D+=Ps(cr())),h=Rr(),d=f=jr(E=D+=Dm(Ms())),C++;break;case 45:m===45&&jr(D)==2&&(p=0)}}return s}function Jl(e,t,r,n,o,s,i,a,c,u,d){for(var f=o-1,h=o===0?s:[""],v=Da(h),m=0,p=0,b=0;m<n;++m)for(var w=0,C=so(e,f+1,f=gm(p=i[m])),E=e;w<v;++w)(E=Gl(p>0?h[w]+" "+C:Je(C,/&\f/g,h[w])))&&(c[b++]=E);return Is(e,t,r,o===0?Sa:a,c,u,d)}function Am(e,t,r){return Is(e,t,r,ql,ks(_m()),so(e,2,-2),0)}function eu(e,t,r,n){return Is(e,t,r,Ca,so(e,0,n),so(e,n+1,-1),n)}function Pn(e,t){for(var r="",n=Da(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function Tm(e,t,r,n){switch(e.type){case mm:if(e.children.length)break;case hm:case Ca:return e.return=e.return||e.value;case ql:return"";case Zl:return e.return=e.value+"{"+Pn(e.children,n)+"}";case Sa:e.value=e.props.join(",")}return jr(r=Pn(e.children,n))?e.return=e.value+"{"+r+"}":""}function Im(e){var t=Da(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 Mm(e){return function(t){t.root||(t=t.return)&&e(t)}}function tu(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Pm=function(t,r,n){for(var o=0,s=0;o=s,s=Rr(),o===38&&s===12&&(r[n]=1),!co(s);)cr();return ao(t,nr)},Om=function(t,r){var n=-1,o=44;do switch(co(o)){case 0:o===38&&Rr()===12&&(r[n]=1),t[n]+=Pm(nr-1,r,n);break;case 2:t[n]+=Ps(o);break;case 4:if(o===44){t[++n]=Rr()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=ks(o)}while(o=cr());return t},jm=function(t,r){return Xl(Om(Ql(t),r))},ru=new WeakMap,Rm=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&&!ru.get(n))&&!o){ru.set(t,!0);for(var s=[],i=jm(r,s),a=n.props,c=0,u=0;c<i.length;c++)for(var d=0;d<a.length;d++,u++)t.props[u]=s[c]?i[c].replace(/&\f/g,a[d]):a[d]+" "+i[c]}}},Nm=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function nu(e,t){switch(ym(e,t)){case 5103:return Xe+"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 Xe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Xe+e+Ds+e+Kt+e+e;case 6828:case 4268:return Xe+e+Kt+e+e;case 6165:return Xe+e+Kt+"flex-"+e+e;case 5187:return Xe+e+Je(e,/(\w+).+(:[^]+)/,Xe+"box-$1$2"+Kt+"flex-$1$2")+e;case 5443:return Xe+e+Kt+"flex-item-"+Je(e,/flex-|-self/,"")+e;case 4675:return Xe+e+Kt+"flex-line-pack"+Je(e,/align-content|flex-|-self/,"")+e;case 5548:return Xe+e+Kt+Je(e,"shrink","negative")+e;case 5292:return Xe+e+Kt+Je(e,"basis","preferred-size")+e;case 6060:return Xe+"box-"+Je(e,"-grow","")+Xe+e+Kt+Je(e,"grow","positive")+e;case 4554:return Xe+Je(e,/([^-])(transform)/g,"$1"+Xe+"$2")+e;case 6187:return Je(Je(Je(e,/(zoom-|grab)/,Xe+"$1"),/(image-set)/,Xe+"$1"),e,"")+e;case 5495:case 3959:return Je(e,/(image-set\([^]*)/,Xe+"$1$`$1");case 4968:return Je(Je(e,/(.+:)(flex-)?(.*)/,Xe+"box-pack:$3"+Kt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Xe+e+e;case 4095:case 3583:case 4068:case 2532:return Je(e,/(.+)-inline(.+)/,Xe+"$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(jr(e)-1-t>6)switch(qt(e,t+1)){case 109:if(qt(e,t+4)!==45)break;case 102:return Je(e,/(.+:)(.+)-([^]+)/,"$1"+Xe+"$2-$3$1"+Ds+(qt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ea(e,"stretch")?nu(Je(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(qt(e,t+1)!==115)break;case 6444:switch(qt(e,jr(e)-3-(~Ea(e,"!important")&&10))){case 107:return Je(e,":",":"+Xe)+e;case 101:return Je(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Xe+(qt(e,14)===45?"inline-":"")+"box$3$1"+Xe+"$2$3$1"+Kt+"$2box$3")+e}break;case 5936:switch(qt(e,t+11)){case 114:return Xe+e+Kt+Je(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Xe+e+Kt+Je(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Xe+e+Kt+Je(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Xe+e+Kt+e+e}return e}var $m=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case Ca:t.return=nu(t.value,t.length);break;case Zl:return Pn([io(t,{value:Je(t.value,"@","@"+Xe)})],o);case Sa:if(t.length)return xm(t.props,function(s){switch(bm(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Pn([io(t,{props:[Je(s,/:(read-\w+)/,":"+Ds+"$1")]})],o);case"::placeholder":return Pn([io(t,{props:[Je(s,/:(plac\w+)/,":"+Xe+"input-$1")]}),io(t,{props:[Je(s,/:(plac\w+)/,":"+Ds+"$1")]}),io(t,{props:[Je(s,/:(plac\w+)/,Kt+"input-$1")]})],o)}return""})}},Lm=[$m],ou=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(p){var b=p.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var o=t.stylisPlugins||Lm,s={},i,a=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(p){for(var b=p.getAttribute("data-emotion").split(" "),w=1;w<b.length;w++)s[b[w]]=!0;a.push(p)});var c,u=[Rm,Nm];{var d,f=[Tm,Mm(function(p){d.insert(p)})],h=Im(u.concat(o,f)),v=function(b){return Pn(km(b),h)};c=function(b,w,C,E){d=C,v(b?b+"{"+w.styles+"}":w.styles),E&&(m.inserted[w.name]=!0)}}var m={key:r,sheet:new pm({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},js={exports:{}},nt={};/** @license React v16.13.1
|
|
67
|
+
`))},[JSON.stringify(t)])}const c=K.useCallback(u=>{o||i(u)},[]);return[a,c]}function V0(e){const t=K.useRef(e);return Bl(()=>{t.current=e}),K.useRef((...r)=>(0,t.current)(...r)).current}function Y0(...e){return K.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{zl(r,t)})},e)}class va{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new va}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}}let Ds=!0,ya=!1;const q0=new va,Z0={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 G0(e){const{type:t,tagName:r}=e;return!!(r==="INPUT"&&Z0[t]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function K0(e){e.metaKey||e.altKey||e.ctrlKey||(Ds=!0)}function ba(){Ds=!1}function Q0(){this.visibilityState==="hidden"&&ya&&(Ds=!0)}function X0(e){e.addEventListener("keydown",K0,!0),e.addEventListener("mousedown",ba,!0),e.addEventListener("pointerdown",ba,!0),e.addEventListener("touchstart",ba,!0),e.addEventListener("visibilitychange",Q0,!0)}function J0(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return Ds||G0(t)}function em(){const e=K.useCallback(o=>{o!=null&&X0(o.ownerDocument)},[]),t=K.useRef(!1);function r(){return t.current?(ya=!0,q0.start(100,()=>{ya=!1}),t.current=!1,!0):!1}function n(o){return J0(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:n,onBlur:r,ref:e}}function xa(e,t){const r=nt({},t);return Object.keys(e).forEach(n=>{if(n.toString().match(/^(components|slots)$/))r[n]=nt({},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]=nt({},s),Object.keys(o).forEach(i=>{r[n][i]=xa(o[i],s[i])}))}else r[n]===void 0&&(r[n]=e[n])}),r}function tm(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 Hl=e=>e,Ul=(()=>{let e=Hl;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Hl}}})(),rm={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 _a(e,t,r="Mui"){const n=rm[t];return n?`${r}-${n}`:`${Ul.generate(e)}-${t}`}function nm(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=_a(e,o,r)}),n}function om(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}const sm=Object.freeze(Object.defineProperty({__proto__:null,default:om},Symbol.toStringTag,{value:"Module"}));function rn(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 Vl(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=Vl(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function qt(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Vl(e))&&(n&&(n+=" "),n+=t);return n}const im=K.createContext(void 0);process.env.NODE_ENV!=="production"&&(ze.node,ze.object);function am(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?xa(o.defaultProps,n):!o.styleOverrides&&!o.variants?xa(o,n):n}function cm({props:e,name:t}){const r=K.useContext(im);return am({props:e,name:t,theme:{components:r}})}process.env.NODE_ENV!=="production"&&(ze.node,ze.object.isRequired);function lm(e){return cm(e)}var fn={},wa={exports:{}},Yl;function um(){return Yl||(Yl=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})(wa)),wa.exports}var Sa={exports:{}},ql;function dm(){return ql||(ql=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})(Sa)),Sa.exports}function fm(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 pm(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 hm=(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(pm(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=fm(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})(),Kt="-ms-",ks="-moz-",Xe="-webkit-",Zl="comm",Ca="rule",Ea="decl",mm="@import",Gl="@keyframes",gm="@layer",vm=Math.abs,As=String.fromCharCode,ym=Object.assign;function bm(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 Kl(e){return e.trim()}function xm(e,t){return(e=t.exec(e))?e[0]:e}function Je(e,t,r){return e.replace(t,r)}function Da(e,t){return e.indexOf(t)}function Zt(e,t){return e.charCodeAt(t)|0}function so(e,t,r){return e.slice(t,r)}function Rr(e){return e.length}function ka(e){return e.length}function Ts(e,t){return t.push(e),e}function _m(e,t){return e.map(t).join("")}var Is=1,In=1,Ql=0,rr=0,Bt=0,Mn="";function Ms(e,t,r,n,o,s,i){return{value:e,root:t,parent:r,type:n,props:o,children:s,line:Is,column:In,length:i,return:""}}function io(e,t){return ym(Ms("",null,null,"",null,null,0),e,{length:-e.length},t)}function wm(){return Bt}function Sm(){return Bt=rr>0?Zt(Mn,--rr):0,In--,Bt===10&&(In=1,Is--),Bt}function cr(){return Bt=rr<Ql?Zt(Mn,rr++):0,In++,Bt===10&&(In=1,Is++),Bt}function Nr(){return Zt(Mn,rr)}function Ps(){return rr}function ao(e,t){return so(Mn,e,t)}function co(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 Xl(e){return Is=In=1,Ql=Rr(Mn=e),rr=0,[]}function Jl(e){return Mn="",e}function Os(e){return Kl(ao(rr-1,Aa(e===91?e+2:e===40?e+1:e)))}function Cm(e){for(;(Bt=Nr())&&Bt<33;)cr();return co(e)>2||co(Bt)>3?"":" "}function Em(e,t){for(;--t&&cr()&&!(Bt<48||Bt>102||Bt>57&&Bt<65||Bt>70&&Bt<97););return ao(e,Ps()+(t<6&&Nr()==32&&cr()==32))}function Aa(e){for(;cr();)switch(Bt){case e:return rr;case 34:case 39:e!==34&&e!==39&&Aa(Bt);break;case 40:e===41&&Aa(e);break;case 92:cr();break}return rr}function Dm(e,t){for(;cr()&&e+Bt!==57;)if(e+Bt===84&&Nr()===47)break;return"/*"+ao(t,rr-1)+"*"+As(e===47?e:cr())}function km(e){for(;!co(Nr());)cr();return ao(e,rr)}function Am(e){return Jl(js("",null,null,null,[""],e=Xl(e),0,[0],e))}function js(e,t,r,n,o,s,i,a,c){for(var u=0,d=0,f=i,h=0,y=0,g=0,p=1,b=1,w=1,S=0,E="",C=o,_=s,W=n,D=E;b;)switch(g=S,S=cr()){case 40:if(g!=108&&Zt(D,f-1)==58){Da(D+=Je(Os(S),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:D+=Os(S);break;case 9:case 10:case 13:case 32:D+=Cm(g);break;case 92:D+=Em(Ps()-1,7);continue;case 47:switch(Nr()){case 42:case 47:Ts(Tm(Dm(cr(),Ps()),t,r),c);break;default:D+="/"}break;case 123*p:a[u++]=Rr(D)*w;case 125*p:case 59:case 0:switch(S){case 0:case 125:b=0;case 59+d:w==-1&&(D=Je(D,/\f/g,"")),y>0&&Rr(D)-f&&Ts(y>32?tu(D+";",n,r,f-1):tu(Je(D," ","")+";",n,r,f-2),c);break;case 59:D+=";";default:if(Ts(W=eu(D,t,r,u,d,o,a,E,C=[],_=[],f),s),S===123)if(d===0)js(D,t,W,W,C,s,f,a,_);else switch(h===99&&Zt(D,3)===110?100:h){case 100:case 108:case 109:case 115:js(e,W,W,n&&Ts(eu(e,W,W,0,0,o,a,E,o,C=[],f),_),o,_,f,a,n?C:_);break;default:js(D,W,W,W,[""],_,0,a,_)}}u=d=y=0,p=w=1,E=D="",f=i;break;case 58:f=1+Rr(D),y=g;default:if(p<1){if(S==123)--p;else if(S==125&&p++==0&&Sm()==125)continue}switch(D+=As(S),S*p){case 38:w=d>0?1:(D+="\f",-1);break;case 44:a[u++]=(Rr(D)-1)*w,w=1;break;case 64:Nr()===45&&(D+=Os(cr())),h=Nr(),d=f=Rr(E=D+=km(Ps())),S++;break;case 45:g===45&&Rr(D)==2&&(p=0)}}return s}function eu(e,t,r,n,o,s,i,a,c,u,d){for(var f=o-1,h=o===0?s:[""],y=ka(h),g=0,p=0,b=0;g<n;++g)for(var w=0,S=so(e,f+1,f=vm(p=i[g])),E=e;w<y;++w)(E=Kl(p>0?h[w]+" "+S:Je(S,/&\f/g,h[w])))&&(c[b++]=E);return Ms(e,t,r,o===0?Ca:a,c,u,d)}function Tm(e,t,r){return Ms(e,t,r,Zl,As(wm()),so(e,2,-2),0)}function tu(e,t,r,n){return Ms(e,t,r,Ea,so(e,0,n),so(e,n+1,-1),n)}function Pn(e,t){for(var r="",n=ka(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function Im(e,t,r,n){switch(e.type){case gm:if(e.children.length)break;case mm:case Ea:return e.return=e.return||e.value;case Zl:return"";case Gl:return e.return=e.value+"{"+Pn(e.children,n)+"}";case Ca:e.value=e.props.join(",")}return Rr(r=Pn(e.children,n))?e.return=e.value+"{"+r+"}":""}function Mm(e){var t=ka(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 Pm(e){return function(t){t.root||(t=t.return)&&e(t)}}function ru(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Om=function(t,r,n){for(var o=0,s=0;o=s,s=Nr(),o===38&&s===12&&(r[n]=1),!co(s);)cr();return ao(t,rr)},jm=function(t,r){var n=-1,o=44;do switch(co(o)){case 0:o===38&&Nr()===12&&(r[n]=1),t[n]+=Om(rr-1,r,n);break;case 2:t[n]+=Os(o);break;case 4:if(o===44){t[++n]=Nr()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=As(o)}while(o=cr());return t},Rm=function(t,r){return Jl(jm(Xl(t),r))},nu=new WeakMap,Nm=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&&!nu.get(n))&&!o){nu.set(t,!0);for(var s=[],i=Rm(r,s),a=n.props,c=0,u=0;c<i.length;c++)for(var d=0;d<a.length;d++,u++)t.props[u]=s[c]?i[c].replace(/&\f/g,a[d]):a[d]+" "+i[c]}}},$m=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function ou(e,t){switch(bm(e,t)){case 5103:return Xe+"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 Xe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Xe+e+ks+e+Kt+e+e;case 6828:case 4268:return Xe+e+Kt+e+e;case 6165:return Xe+e+Kt+"flex-"+e+e;case 5187:return Xe+e+Je(e,/(\w+).+(:[^]+)/,Xe+"box-$1$2"+Kt+"flex-$1$2")+e;case 5443:return Xe+e+Kt+"flex-item-"+Je(e,/flex-|-self/,"")+e;case 4675:return Xe+e+Kt+"flex-line-pack"+Je(e,/align-content|flex-|-self/,"")+e;case 5548:return Xe+e+Kt+Je(e,"shrink","negative")+e;case 5292:return Xe+e+Kt+Je(e,"basis","preferred-size")+e;case 6060:return Xe+"box-"+Je(e,"-grow","")+Xe+e+Kt+Je(e,"grow","positive")+e;case 4554:return Xe+Je(e,/([^-])(transform)/g,"$1"+Xe+"$2")+e;case 6187:return Je(Je(Je(e,/(zoom-|grab)/,Xe+"$1"),/(image-set)/,Xe+"$1"),e,"")+e;case 5495:case 3959:return Je(e,/(image-set\([^]*)/,Xe+"$1$`$1");case 4968:return Je(Je(e,/(.+:)(flex-)?(.*)/,Xe+"box-pack:$3"+Kt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Xe+e+e;case 4095:case 3583:case 4068:case 2532:return Je(e,/(.+)-inline(.+)/,Xe+"$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(Rr(e)-1-t>6)switch(Zt(e,t+1)){case 109:if(Zt(e,t+4)!==45)break;case 102:return Je(e,/(.+:)(.+)-([^]+)/,"$1"+Xe+"$2-$3$1"+ks+(Zt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Da(e,"stretch")?ou(Je(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Zt(e,t+1)!==115)break;case 6444:switch(Zt(e,Rr(e)-3-(~Da(e,"!important")&&10))){case 107:return Je(e,":",":"+Xe)+e;case 101:return Je(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Xe+(Zt(e,14)===45?"inline-":"")+"box$3$1"+Xe+"$2$3$1"+Kt+"$2box$3")+e}break;case 5936:switch(Zt(e,t+11)){case 114:return Xe+e+Kt+Je(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Xe+e+Kt+Je(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Xe+e+Kt+Je(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Xe+e+Kt+e+e}return e}var Lm=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case Ea:t.return=ou(t.value,t.length);break;case Gl:return Pn([io(t,{value:Je(t.value,"@","@"+Xe)})],o);case Ca:if(t.length)return _m(t.props,function(s){switch(xm(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Pn([io(t,{props:[Je(s,/:(read-\w+)/,":"+ks+"$1")]})],o);case"::placeholder":return Pn([io(t,{props:[Je(s,/:(plac\w+)/,":"+Xe+"input-$1")]}),io(t,{props:[Je(s,/:(plac\w+)/,":"+ks+"$1")]}),io(t,{props:[Je(s,/:(plac\w+)/,Kt+"input-$1")]})],o)}return""})}},zm=[Lm],su=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(p){var b=p.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var o=t.stylisPlugins||zm,s={},i,a=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(p){for(var b=p.getAttribute("data-emotion").split(" "),w=1;w<b.length;w++)s[b[w]]=!0;a.push(p)});var c,u=[Nm,$m];{var d,f=[Im,Pm(function(p){d.insert(p)})],h=Mm(u.concat(o,f)),y=function(b){return Pn(Am(b),h)};c=function(b,w,S,E){d=S,y(b?b+"{"+w.styles+"}":w.styles),E&&(g.inserted[w.name]=!0)}}var g={key:r,sheet:new hm({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 g.sheet.hydrate(a),g},Rs={exports:{}},it={};/** @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
|
|
74
|
+
*/var iu;function Bm(){if(iu)return it;iu=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,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=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 E(_){if(typeof _=="object"&&_!==null){var W=_.$$typeof;switch(W){case t:switch(_=_.type,_){case c:case u:case n:case s:case o:case f:return _;default:switch(_=_&&_.$$typeof,_){case a:case d:case g:case y:case i:return _;default:return W}}case r:return W}}}function C(_){return E(_)===u}return it.AsyncMode=c,it.ConcurrentMode=u,it.ContextConsumer=a,it.ContextProvider=i,it.Element=t,it.ForwardRef=d,it.Fragment=n,it.Lazy=g,it.Memo=y,it.Portal=r,it.Profiler=s,it.StrictMode=o,it.Suspense=f,it.isAsyncMode=function(_){return C(_)||E(_)===c},it.isConcurrentMode=C,it.isContextConsumer=function(_){return E(_)===a},it.isContextProvider=function(_){return E(_)===i},it.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===t},it.isForwardRef=function(_){return E(_)===d},it.isFragment=function(_){return E(_)===n},it.isLazy=function(_){return E(_)===g},it.isMemo=function(_){return E(_)===y},it.isPortal=function(_){return E(_)===r},it.isProfiler=function(_){return E(_)===s},it.isStrictMode=function(_){return E(_)===o},it.isSuspense=function(_){return E(_)===f},it.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===n||_===u||_===s||_===o||_===f||_===h||typeof _=="object"&&_!==null&&(_.$$typeof===g||_.$$typeof===y||_.$$typeof===i||_.$$typeof===a||_.$$typeof===d||_.$$typeof===b||_.$$typeof===w||_.$$typeof===S||_.$$typeof===p)},it.typeOf=E,it}var at={};/** @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 iu;function Bm(){return iu||(iu=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,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function E(j){return typeof j=="string"||typeof j=="function"||j===n||j===u||j===s||j===o||j===f||j===h||typeof j=="object"&&j!==null&&(j.$$typeof===m||j.$$typeof===v||j.$$typeof===i||j.$$typeof===a||j.$$typeof===d||j.$$typeof===b||j.$$typeof===w||j.$$typeof===C||j.$$typeof===p)}function S(j){if(typeof j=="object"&&j!==null){var We=j.$$typeof;switch(We){case t:var qe=j.type;switch(qe){case c:case u:case n:case s:case o:case f:return qe;default:var Ze=qe&&qe.$$typeof;switch(Ze){case a:case d:case m:case v:case i:return Ze;default:return We}}case r:return We}}}var _=c,W=u,D=a,A=i,M=t,I=d,V=n,G=m,F=v,Y=r,oe=s,U=o,N=f,ce=!1;function fe(j){return ce||(ce=!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.")),$(j)||S(j)===c}function $(j){return S(j)===u}function Q(j){return S(j)===a}function Ce(j){return S(j)===i}function me(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function we(j){return S(j)===d}function ae(j){return S(j)===n}function ee(j){return S(j)===m}function le(j){return S(j)===v}function ge(j){return S(j)===r}function ie(j){return S(j)===s}function pe(j){return S(j)===o}function Re(j){return S(j)===f}ot.AsyncMode=_,ot.ConcurrentMode=W,ot.ContextConsumer=D,ot.ContextProvider=A,ot.Element=M,ot.ForwardRef=I,ot.Fragment=V,ot.Lazy=G,ot.Memo=F,ot.Portal=Y,ot.Profiler=oe,ot.StrictMode=U,ot.Suspense=N,ot.isAsyncMode=fe,ot.isConcurrentMode=$,ot.isContextConsumer=Q,ot.isContextProvider=Ce,ot.isElement=me,ot.isForwardRef=we,ot.isFragment=ae,ot.isLazy=ee,ot.isMemo=le,ot.isPortal=ge,ot.isProfiler=ie,ot.isStrictMode=pe,ot.isSuspense=Re,ot.isValidElementType=E,ot.typeOf=S})()),ot}var au;function Fm(){return au||(au=1,process.env.NODE_ENV==="production"?js.exports=zm():js.exports=Bm()),js.exports}var Aa,cu;function Wm(){if(cu)return Aa;cu=1;var e=Fm(),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,u=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;function v(m,p,b){if(typeof p!="string"){if(h){var w=f(p);w&&w!==h&&v(m,w,b)}var C=c(p);u&&(C=C.concat(u(p)));for(var E=i(m),S=i(p),_=0;_<C.length;++_){var W=C[_];if(!r[W]&&!(b&&b[W])&&!(S&&S[W])&&!(E&&E[W])){var D=d(p,W);try{a(m,W,D)}catch{}}}}return m}return Aa=v,Aa}Wm();var Um=!0;function lu(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(n+=o+" ")}),n}var Ta=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||Um===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},Ia=function(t,r,n){Ta(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 Hm(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 Vm={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},Ym=/[A-Z]|^ms/g,qm=/_EMO_([^_]+?)_([^]*?)_EMO_/g,uu=function(t){return t.charCodeAt(1)===45},du=function(t){return t!=null&&typeof t!="boolean"},Ma=tu(function(e){return uu(e)?e:e.replace(Ym,"-$&").toLowerCase()}),fu=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(qm,function(n,o,s){return Nr={name:o,styles:s,next:Nr},o})}return Vm[t]!==1&&!uu(t)&&typeof r=="number"&&r!==0?r+"px":r};function lo(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 Nr={name:o.name,styles:o.styles,next:Nr},o.name;var s=r;if(s.styles!==void 0){var i=s.next;if(i!==void 0)for(;i!==void 0;)Nr={name:i.name,styles:i.styles,next:Nr},i=i.next;var a=s.styles+";";return a}return Zm(e,t,r)}case"function":{if(e!==void 0){var c=Nr,u=r(e);return Nr=c,lo(e,t,u)}break}}var d=r;if(t==null)return d;var f=t[d];return f!==void 0?f:d}function Zm(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=lo(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]+"}":du(a)&&(n+=Ma(s)+":"+fu(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++)du(i[c])&&(n+=Ma(s)+":"+fu(s,i[c])+";");else{var u=lo(e,t,i);switch(s){case"animation":case"animationName":{n+=Ma(s)+":"+u+";";break}default:n+=s+"{"+u+"}"}}}return n}var pu=/label:\s*([^\s;{]+)\s*(;|$)/g,Nr;function uo(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="";Nr=void 0;var s=e[0];if(s==null||s.raw===void 0)n=!1,o+=lo(r,t,s);else{var i=s;o+=i[0]}for(var a=1;a<e.length;a++)if(o+=lo(r,t,e[a]),n){var c=s;o+=c[a]}pu.lastIndex=0;for(var u="",d;(d=pu.exec(o))!==null;)u+="-"+d[1];var f=Hm(o)+u;return{name:f,styles:o,next:Nr}}var Gm=function(t){return t()},hu=K.useInsertionEffect?K.useInsertionEffect:!1,mu=hu||Gm,gu=hu||K.useLayoutEffect,vu=K.createContext(typeof HTMLElement<"u"?ou({key:"css"}):null),Km=vu.Provider,Pa=function(t){return y.forwardRef(function(r,n){var o=y.useContext(vu);return t(r,o,n)})},Rs=K.createContext({}),Oa={}.hasOwnProperty,ja="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Qm=function(t,r){var n={};for(var o in r)Oa.call(r,o)&&(n[o]=r[o]);return n[ja]=t,n},Xm=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return Ta(r,n,o),mu(function(){return Ia(r,n,o)}),null},Jm=Pa(function(e,t,r){var n=e.css;typeof n=="string"&&t.registered[n]!==void 0&&(n=t.registered[n]);var o=e[ja],s=[n],i="";typeof e.className=="string"?i=lu(t.registered,s,e.className):e.className!=null&&(i=e.className+" ");var a=uo(s,void 0,K.useContext(Rs));i+=t.key+"-"+a.name;var c={};for(var u in e)Oa.call(e,u)&&u!=="css"&&u!==ja&&(c[u]=e[u]);return c.className=i,r&&(c.ref=r),K.createElement(K.Fragment,null,K.createElement(Xm,{cache:t,serialized:a,isStringTag:typeof o=="string"}),K.createElement(o,c))}),eg=Jm,yu=function(t,r){var n=arguments;if(r==null||!Oa.call(r,"css"))return K.createElement.apply(void 0,n);var o=n.length,s=new Array(o);s[0]=eg,s[1]=Qm(t,r);for(var i=2;i<o;i++)s[i]=n[i];return K.createElement.apply(null,s)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(yu||(yu={}));var tg=Pa(function(e,t){var r=e.styles,n=uo([r],void 0,K.useContext(Rs)),o=K.useRef();return gu(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]),gu(function(){var s=o.current,i=s[0],a=s[1];if(a){s[1]=!1;return}if(n.next!==void 0&&Ia(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 bu(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return uo(t)}function rg(){var e=bu.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 ng=/^((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)-.*))$/,og=tu(function(e){return ng.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),sg=og,ig=function(t){return t!=="theme"},xu=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?sg:ig},_u=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},ag=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return Ta(r,n,o),mu(function(){return Ia(r,n,o)}),null},cg=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=_u(t,r,n),c=a||xu(o),u=!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 h=d[0];f.push(h[0]);for(var v=d.length,m=1;m<v;m++)f.push(d[m],h[m])}var p=Pa(function(b,w,C){var E=u&&b.as||o,S="",_=[],W=b;if(b.theme==null){W={};for(var D in b)W[D]=b[D];W.theme=K.useContext(Rs)}typeof b.className=="string"?S=lu(w.registered,_,b.className):b.className!=null&&(S=b.className+" ");var A=uo(f.concat(_),w.registered,W);S+=w.key+"-"+A.name,i!==void 0&&(S+=" "+i);var M=u&&a===void 0?xu(E):c,I={};for(var V in b)u&&V==="as"||M(V)&&(I[V]=b[V]);return I.className=S,C&&(I.ref=C),K.createElement(K.Fragment,null,K.createElement(ag,{cache:w,serialized:A,isStringTag:typeof E=="string"}),K.createElement(E,I))});return p.displayName=s!==void 0?s:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",p.defaultProps=t.defaultProps,p.__emotion_real=p,p.__emotion_base=o,p.__emotion_styles=f,p.__emotion_forwardProp=a,Object.defineProperty(p,"toString",{value:function(){return"."+i}}),p.withComponent=function(b,w){var C=e(b,et({},r,w,{shouldForwardProp:_u(p,w,!0)}));return C.apply(void 0,f)},p}},lg=["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"],Ra=cg.bind(null);lg.forEach(function(e){Ra[e]=Ra(e)});function ug(e,t){const r=ou({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 Na=new Map;function wu(e){const{injectFirst:t,enableCssLayer:r,children:n}=e,o=K.useMemo(()=>{const s=`${t}-${r}`;if(typeof document=="object"&&Na.has(s))return Na.get(s);const i=ug(t,r);return Na.set(s,i),i},[t,r]);return t||r?l.jsx(Km,{value:o,children:n}):n}process.env.NODE_ENV!=="production"&&(wu.propTypes={children:ze.node,enableCssLayer:ze.bool,injectFirst:ze.bool});function dg(e){return e==null||Object.keys(e).length===0}function Su(e){const{styles:t,defaultTheme:r={}}=e,n=typeof t=="function"?o=>t(dg(o)?r:o):t;return l.jsx(tg,{styles:n})}process.env.NODE_ENV!=="production"&&(Su.propTypes={defaultTheme:ze.object,styles:ze.oneOfType([ze.array,ze.string,ze.object,ze.func])});/**
|
|
81
|
+
*/var au;function Fm(){return au||(au=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,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=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 E(j){return typeof j=="string"||typeof j=="function"||j===n||j===u||j===s||j===o||j===f||j===h||typeof j=="object"&&j!==null&&(j.$$typeof===g||j.$$typeof===y||j.$$typeof===i||j.$$typeof===a||j.$$typeof===d||j.$$typeof===b||j.$$typeof===w||j.$$typeof===S||j.$$typeof===p)}function C(j){if(typeof j=="object"&&j!==null){var Fe=j.$$typeof;switch(Fe){case t:var Ke=j.type;switch(Ke){case c:case u:case n:case s:case o:case f:return Ke;default:var Ze=Ke&&Ke.$$typeof;switch(Ze){case a:case d:case g:case y:case i:return Ze;default:return Fe}}case r:return Fe}}}var _=c,W=u,D=a,T=i,M=t,I=d,H=n,G=g,F=y,Y=r,se=s,U=o,N=f,le=!1;function de(j){return le||(le=!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.")),$(j)||C(j)===c}function $(j){return C(j)===u}function Q(j){return C(j)===a}function we(j){return C(j)===i}function _e(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function he(j){return C(j)===d}function ae(j){return C(j)===n}function ue(j){return C(j)===g}function J(j){return C(j)===y}function Se(j){return C(j)===r}function me(j){return C(j)===s}function ee(j){return C(j)===o}function Ie(j){return C(j)===f}at.AsyncMode=_,at.ConcurrentMode=W,at.ContextConsumer=D,at.ContextProvider=T,at.Element=M,at.ForwardRef=I,at.Fragment=H,at.Lazy=G,at.Memo=F,at.Portal=Y,at.Profiler=se,at.StrictMode=U,at.Suspense=N,at.isAsyncMode=de,at.isConcurrentMode=$,at.isContextConsumer=Q,at.isContextProvider=we,at.isElement=_e,at.isForwardRef=he,at.isFragment=ae,at.isLazy=ue,at.isMemo=J,at.isPortal=Se,at.isProfiler=me,at.isStrictMode=ee,at.isSuspense=Ie,at.isValidElementType=E,at.typeOf=C})()),at}var cu;function Wm(){return cu||(cu=1,process.env.NODE_ENV==="production"?Rs.exports=Bm():Rs.exports=Fm()),Rs.exports}var Ta,lu;function Hm(){if(lu)return Ta;lu=1;var e=Wm(),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(g){return e.isMemo(g)?o:s[g.$$typeof]||t}var a=Object.defineProperty,c=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;function y(g,p,b){if(typeof p!="string"){if(h){var w=f(p);w&&w!==h&&y(g,w,b)}var S=c(p);u&&(S=S.concat(u(p)));for(var E=i(g),C=i(p),_=0;_<S.length;++_){var W=S[_];if(!r[W]&&!(b&&b[W])&&!(C&&C[W])&&!(E&&E[W])){var D=d(p,W);try{a(g,W,D)}catch{}}}}return g}return Ta=y,Ta}Hm();var Um=!0;function uu(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(n+=o+" ")}),n}var Ia=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||Um===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},Ma=function(t,r,n){Ia(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 Vm(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 Ym={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},qm=/[A-Z]|^ms/g,Zm=/_EMO_([^_]+?)_([^]*?)_EMO_/g,du=function(t){return t.charCodeAt(1)===45},fu=function(t){return t!=null&&typeof t!="boolean"},Pa=ru(function(e){return du(e)?e:e.replace(qm,"-$&").toLowerCase()}),pu=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Zm,function(n,o,s){return $r={name:o,styles:s,next:$r},o})}return Ym[t]!==1&&!du(t)&&typeof r=="number"&&r!==0?r+"px":r};function lo(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 $r={name:o.name,styles:o.styles,next:$r},o.name;var s=r;if(s.styles!==void 0){var i=s.next;if(i!==void 0)for(;i!==void 0;)$r={name:i.name,styles:i.styles,next:$r},i=i.next;var a=s.styles+";";return a}return Gm(e,t,r)}case"function":{if(e!==void 0){var c=$r,u=r(e);return $r=c,lo(e,t,u)}break}}var d=r;if(t==null)return d;var f=t[d];return f!==void 0?f:d}function Gm(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=lo(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]+"}":fu(a)&&(n+=Pa(s)+":"+pu(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++)fu(i[c])&&(n+=Pa(s)+":"+pu(s,i[c])+";");else{var u=lo(e,t,i);switch(s){case"animation":case"animationName":{n+=Pa(s)+":"+u+";";break}default:n+=s+"{"+u+"}"}}}return n}var hu=/label:\s*([^\s;{]+)\s*(;|$)/g,$r;function uo(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="";$r=void 0;var s=e[0];if(s==null||s.raw===void 0)n=!1,o+=lo(r,t,s);else{var i=s;o+=i[0]}for(var a=1;a<e.length;a++)if(o+=lo(r,t,e[a]),n){var c=s;o+=c[a]}hu.lastIndex=0;for(var u="",d;(d=hu.exec(o))!==null;)u+="-"+d[1];var f=Vm(o)+u;return{name:f,styles:o,next:$r}}var Km=function(t){return t()},mu=K.useInsertionEffect?K.useInsertionEffect:!1,gu=mu||Km,vu=mu||K.useLayoutEffect,yu=K.createContext(typeof HTMLElement<"u"?su({key:"css"}):null),Qm=yu.Provider,Oa=function(t){return v.forwardRef(function(r,n){var o=v.useContext(yu);return t(r,o,n)})},Ns=K.createContext({}),ja={}.hasOwnProperty,Ra="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Xm=function(t,r){var n={};for(var o in r)ja.call(r,o)&&(n[o]=r[o]);return n[Ra]=t,n},Jm=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return Ia(r,n,o),gu(function(){return Ma(r,n,o)}),null},eg=Oa(function(e,t,r){var n=e.css;typeof n=="string"&&t.registered[n]!==void 0&&(n=t.registered[n]);var o=e[Ra],s=[n],i="";typeof e.className=="string"?i=uu(t.registered,s,e.className):e.className!=null&&(i=e.className+" ");var a=uo(s,void 0,K.useContext(Ns));i+=t.key+"-"+a.name;var c={};for(var u in e)ja.call(e,u)&&u!=="css"&&u!==Ra&&(c[u]=e[u]);return c.className=i,r&&(c.ref=r),K.createElement(K.Fragment,null,K.createElement(Jm,{cache:t,serialized:a,isStringTag:typeof o=="string"}),K.createElement(o,c))}),tg=eg,bu=function(t,r){var n=arguments;if(r==null||!ja.call(r,"css"))return K.createElement.apply(void 0,n);var o=n.length,s=new Array(o);s[0]=tg,s[1]=Xm(t,r);for(var i=2;i<o;i++)s[i]=n[i];return K.createElement.apply(null,s)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(bu||(bu={}));var rg=Oa(function(e,t){var r=e.styles,n=uo([r],void 0,K.useContext(Ns)),o=K.useRef();return vu(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]),vu(function(){var s=o.current,i=s[0],a=s[1];if(a){s[1]=!1;return}if(n.next!==void 0&&Ma(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 xu(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return uo(t)}function ng(){var e=xu.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 og=/^((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)-.*))$/,sg=ru(function(e){return og.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),ig=sg,ag=function(t){return t!=="theme"},_u=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?ig:ag},wu=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},cg=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return Ia(r,n,o),gu(function(){return Ma(r,n,o)}),null},lg=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=wu(t,r,n),c=a||_u(o),u=!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 h=d[0];f.push(h[0]);for(var y=d.length,g=1;g<y;g++)f.push(d[g],h[g])}var p=Oa(function(b,w,S){var E=u&&b.as||o,C="",_=[],W=b;if(b.theme==null){W={};for(var D in b)W[D]=b[D];W.theme=K.useContext(Ns)}typeof b.className=="string"?C=uu(w.registered,_,b.className):b.className!=null&&(C=b.className+" ");var T=uo(f.concat(_),w.registered,W);C+=w.key+"-"+T.name,i!==void 0&&(C+=" "+i);var M=u&&a===void 0?_u(E):c,I={};for(var H in b)u&&H==="as"||M(H)&&(I[H]=b[H]);return I.className=C,S&&(I.ref=S),K.createElement(K.Fragment,null,K.createElement(cg,{cache:w,serialized:T,isStringTag:typeof E=="string"}),K.createElement(E,I))});return p.displayName=s!==void 0?s:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",p.defaultProps=t.defaultProps,p.__emotion_real=p,p.__emotion_base=o,p.__emotion_styles=f,p.__emotion_forwardProp=a,Object.defineProperty(p,"toString",{value:function(){return"."+i}}),p.withComponent=function(b,w){var S=e(b,nt({},r,w,{shouldForwardProp:wu(p,w,!0)}));return S.apply(void 0,f)},p}},ug=["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"],Na=lg.bind(null);ug.forEach(function(e){Na[e]=Na(e)});function dg(e,t){const r=su({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 $a=new Map;function Su(e){const{injectFirst:t,enableCssLayer:r,children:n}=e,o=K.useMemo(()=>{const s=`${t}-${r}`;if(typeof document=="object"&&$a.has(s))return $a.get(s);const i=dg(t,r);return $a.set(s,i),i},[t,r]);return t||r?l.jsx(Qm,{value:o,children:n}):n}process.env.NODE_ENV!=="production"&&(Su.propTypes={children:ze.node,enableCssLayer:ze.bool,injectFirst:ze.bool});function fg(e){return e==null||Object.keys(e).length===0}function Cu(e){const{styles:t,defaultTheme:r={}}=e,n=typeof t=="function"?o=>t(fg(o)?r:o):t;return l.jsx(rg,{styles:n})}process.env.NODE_ENV!=="production"&&(Cu.propTypes={defaultTheme:ze.object,styles:ze.oneOfType([ze.array,ze.string,ze.object,ze.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
|
|
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
|
|
87
|
+
*/function pg(e,t){const r=Na(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 hg=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},Eu=[];function mg(e){return Eu[0]=e,uo(Eu)}const gg=Yr(Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:Cu,StyledEngineProvider:Su,ThemeContext:Ns,css:xu,default:pg,internal_processStyles:hg,internal_serializeStyles:mg,keyframes:ng},Symbol.toStringTag,{value:"Module"}))),vg=Yr(y0),yg=Yr(j0),bg=Yr(O0),xg=["values","unit","step"],_g=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)=>nt({},r,{[n.key]:n.val}),{})};function Du(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,o=rn(e,xg),s=_g(t),i=Object.keys(s);function a(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${r})`}function c(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-n/100}${r})`}function u(h,y){const g=i.indexOf(y);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${r}) and (max-width:${(g!==-1&&typeof t[i[g]]=="number"?t[i[g]]:y)-n/100}${r})`}function d(h){return i.indexOf(h)+1<i.length?u(h,i[i.indexOf(h)+1]):a(h)}function f(h){const y=i.indexOf(h);return y===0?a(i[1]):y===i.length-1?c(i[y]):u(h,i[i.indexOf(h)+1]).replace("@media","@media not all and")}return nt({keys:i,values:s,up:a,down:c,between:u,only:d,not:f,unit:r},o)}const wg={borderRadius:4},nn=process.env.NODE_ENV!=="production"?ze.oneOfType([ze.number,ze.string,ze.object,ze.array]):{};function fo(e,t){return t?jr(e,t,{clone:!1}):e}const La={xs:0,sm:600,md:900,lg:1200,xl:1536},ku={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${La[e]}px)`};function qr(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const s=n.breakpoints||ku;return t.reduce((i,a,c)=>(i[s.up(s.keys[c])]=r(t[c]),i),{})}if(typeof t=="object"){const s=n.breakpoints||ku;return Object.keys(t).reduce((i,a)=>{if(Object.keys(s.values||La).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 Sg(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((n,o)=>{const s=e.up(o);return n[s]={},n},{}))||{}}function Au(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function $s(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 Ls(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=$s(e,r)||n,t&&(o=t(o,n,e)),o}function Rt(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,u=$s(c,n)||{};return qr(i,a,f=>{let h=Ls(u,o,f);return f===h&&typeof f=="string"&&(h=Ls(u,o,`${t}${f==="default"?"":tn(f)}`,f)),r===!1?h:{[r]:h}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[t]:nn}:{},s.filterProps=[t],s}function Cg(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const Eg={m:"margin",p:"padding"},Dg={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Tu={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},kg=Cg(e=>{if(e.length>2)if(Tu[e])e=Tu[e];else return[e];const[t,r]=e.split(""),n=Eg[t],o=Dg[r]||"";return Array.isArray(o)?o.map(s=>n+s):[n+o]}),zs=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Bs=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Ag=[...zs,...Bs];function po(e,t,r,n){var o;const s=(o=$s(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 Tu(e){return po(e,"spacing",8,"spacing")}function ho(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 Ag(e,t){return r=>e.reduce((n,o)=>(n[o]=ho(t,r),n),{})}function Tg(e,t,r,n){if(t.indexOf(r)===-1)return null;const o=Dg(r),s=Ag(o,n),i=e[r];return qr(e,i,s)}function Iu(e,t){const r=Tu(e.theme);return Object.keys(e).map(n=>Tg(e,t,n,r)).reduce(fo,{})}function Tt(e){return Iu(e,Ls)}Tt.propTypes=process.env.NODE_ENV!=="production"?Ls.reduce((e,t)=>(e[t]=rn,e),{}):{},Tt.filterProps=Ls;function It(e){return Iu(e,zs)}It.propTypes=process.env.NODE_ENV!=="production"?zs.reduce((e,t)=>(e[t]=rn,e),{}):{},It.filterProps=zs,process.env.NODE_ENV!=="production"&&kg.reduce((e,t)=>(e[t]=rn,e),{});function Ig(e=8){if(e.mui)return e;const t=Tu({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 Bs(...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]?fo(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 mr(e){return typeof e!="number"?e:`${e}px solid`}function gr(e,t){return jt({prop:e,themeKey:"borders",transform:t})}const Mg=gr("border",mr),Pg=gr("borderTop",mr),Og=gr("borderRight",mr),jg=gr("borderBottom",mr),Rg=gr("borderLeft",mr),Ng=gr("borderColor"),$g=gr("borderTopColor"),Lg=gr("borderRightColor"),zg=gr("borderBottomColor"),Bg=gr("borderLeftColor"),Fg=gr("outline",mr),Wg=gr("outlineColor"),Fs=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=po(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:ho(t,n)});return qr(e,e.borderRadius,r)}return null};Fs.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:rn}:{},Fs.filterProps=["borderRadius"],Bs(Mg,Pg,Og,jg,Rg,Ng,$g,Lg,zg,Bg,Fs,Fg,Wg);const Ws=e=>{if(e.gap!==void 0&&e.gap!==null){const t=po(e.theme,"spacing",8,"gap"),r=n=>({gap:ho(t,n)});return qr(e,e.gap,r)}return null};Ws.propTypes=process.env.NODE_ENV!=="production"?{gap:rn}:{},Ws.filterProps=["gap"];const Us=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=po(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:ho(t,n)});return qr(e,e.columnGap,r)}return null};Us.propTypes=process.env.NODE_ENV!=="production"?{columnGap:rn}:{},Us.filterProps=["columnGap"];const Hs=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=po(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:ho(t,n)});return qr(e,e.rowGap,r)}return null};Hs.propTypes=process.env.NODE_ENV!=="production"?{rowGap:rn}:{},Hs.filterProps=["rowGap"];const Ug=jt({prop:"gridColumn"}),Hg=jt({prop:"gridRow"}),Vg=jt({prop:"gridAutoFlow"}),Yg=jt({prop:"gridAutoColumns"}),qg=jt({prop:"gridAutoRows"}),Zg=jt({prop:"gridTemplateColumns"}),Gg=jt({prop:"gridTemplateRows"}),Kg=jt({prop:"gridTemplateAreas"}),Qg=jt({prop:"gridArea"});Bs(Ws,Us,Hs,Ug,Hg,Vg,Yg,qg,Zg,Gg,Kg,Qg);function On(e,t){return t==="grey"?t:e}const Xg=jt({prop:"color",themeKey:"palette",transform:On}),Jg=jt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:On}),ev=jt({prop:"backgroundColor",themeKey:"palette",transform:On});Bs(Xg,Jg,ev);function lr(e){return e<=1&&e!==0?`${e*100}%`:e}const tv=jt({prop:"width",transform:lr}),La=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])||$a[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:lr(r)}};return qr(e,e.maxWidth,t)}return null};La.filterProps=["maxWidth"];const rv=jt({prop:"minWidth",transform:lr}),nv=jt({prop:"height",transform:lr}),ov=jt({prop:"maxHeight",transform:lr}),sv=jt({prop:"minHeight",transform:lr});jt({prop:"size",cssProperty:"width",transform:lr}),jt({prop:"size",cssProperty:"height",transform:lr});const iv=jt({prop:"boxSizing"});Bs(tv,La,rv,nv,ov,sv,iv);const mo={border:{themeKey:"borders",transform:mr},borderTop:{themeKey:"borders",transform:mr},borderRight:{themeKey:"borders",transform:mr},borderBottom:{themeKey:"borders",transform:mr},borderLeft:{themeKey:"borders",transform:mr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:mr},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Fs},color:{themeKey:"palette",transform:On},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:On},backgroundColor:{themeKey:"palette",transform:On},p:{style:It},pt:{style:It},pr:{style:It},pb:{style:It},pl:{style:It},px:{style:It},py:{style:It},padding:{style:It},paddingTop:{style:It},paddingRight:{style:It},paddingBottom:{style:It},paddingLeft:{style:It},paddingX:{style:It},paddingY:{style:It},paddingInline:{style:It},paddingInlineStart:{style:It},paddingInlineEnd:{style:It},paddingBlock:{style:It},paddingBlockStart:{style:It},paddingBlockEnd:{style:It},m:{style:Tt},mt:{style:Tt},mr:{style:Tt},mb:{style:Tt},ml:{style:Tt},mx:{style:Tt},my:{style:Tt},margin:{style:Tt},marginTop:{style:Tt},marginRight:{style:Tt},marginBottom:{style:Tt},marginLeft:{style:Tt},marginX:{style:Tt},marginY:{style:Tt},marginInline:{style:Tt},marginInlineStart:{style:Tt},marginInlineEnd:{style:Tt},marginBlock:{style:Tt},marginBlockStart:{style:Tt},marginBlockEnd:{style:Tt},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:Ws},rowGap:{style:Hs},columnGap:{style:Us},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:lr},maxWidth:{style:La},minWidth:{transform:lr},height:{transform:lr},maxHeight:{transform:lr},minHeight:{transform:lr},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function av(...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 cv(e,t){return typeof e=="function"?e(t):e}function Mu(){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:u,transform:d,style:f}=a;if(n==null)return null;if(u==="typography"&&n==="inherit")return{[r]:n};const h=Ns(o,u)||{};return f?f(i):qr(i,n,m=>{let p=$s(h,d,m);return m===p&&typeof m=="string"&&(p=$s(h,d,`${r}${m==="default"?"":en(m)}`,m)),c===!1?p:{[c]:p}})}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:mo;function c(u){let d=u;if(typeof u=="function")d=u(s);else if(typeof u!="object")return u;if(!d)return null;const f=wg(s.breakpoints),h=Object.keys(f);let v=f;return Object.keys(d).forEach(m=>{const p=cv(d[m],s);if(p!=null)if(typeof p=="object")if(a[m])v=fo(v,e(m,p,s,a));else{const b=qr({theme:s},p,w=>({[m]:w}));av(b,p)?v[m]=t({sx:p,theme:s,nested:!0}):v=fo(v,b)}else v=fo(v,e(m,p,s,a))}),!i&&s.modularCssLayers?{"@layer sx":ku(h,v)}:ku(h,v)}return Array.isArray(o)?o.map(c):c(o)}return t}const Vs=Mu();Vs.filterProps=["sx"];function Pu(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 lv=["breakpoints","palette","spacing","shape"];function Ou(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:s={}}=e,i=tn(e,lv),a=Eu(r),c=Ig(o);let u=Or({breakpoints:a,direction:"ltr",components:{},palette:et({mode:"light"},n),spacing:c,shape:et({},_g,s)},i);return u.applyStyles=Pu,u=t.reduce((d,f)=>Or(d,f),u),u.unstable_sxConfig=et({},mo,i?.unstable_sxConfig),u.unstable_sx=function(f){return Vs({sx:f,theme:this})},u}const uv=Yr(Object.freeze(Object.defineProperty({__proto__:null,default:Ou,private_createBreakpoints:Eu,unstable_applyStyles:Pu},Symbol.toStringTag,{value:"Module"}))),dv=["sx"],fv=e=>{var t,r;const n={systemProps:{},otherProps:{}},o=(t=e==null||(r=e.theme)==null?void 0:r.unstable_sxConfig)!=null?t:mo;return Object.keys(e).forEach(s=>{o[s]?n.systemProps[s]=e[s]:n.otherProps[s]=e[s]}),n};function pv(e){const{sx:t}=e,r=tn(e,dv),{systemProps:n,otherProps:o}=fv(r);let s;return Array.isArray(t)?s=[n,...t]:typeof t=="function"?s=(...i)=>{const a=t(...i);return Jr(a)?et({},n,a):n}:s=et({},n,t),et({},o,{sx:s})}const hv=Yr(Object.freeze(Object.defineProperty({__proto__:null,default:Vs,extendSxProp:pv,unstable_createStyleFunctionSx:Mu,unstable_defaultSxConfig:mo},Symbol.toStringTag,{value:"Module"})));var ju;function mv(){if(ju)return dn;ju=1;var e=at();Object.defineProperty(dn,"__esModule",{value:!0}),dn.default=D,dn.shouldForwardProp=b,dn.systemDefaultTheme=void 0;var t=e(lm()),r=e(um()),n=v(mg),o=gg,s=e(vg),i=e(yg),a=e(uv),c=e(hv);const u=["ownerState"],d=["variants"],f=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function h(A){if(typeof WeakMap!="function")return null;var M=new WeakMap,I=new WeakMap;return(h=function(V){return V?I:M})(A)}function v(A,M){if(A&&A.__esModule)return A;if(A===null||typeof A!="object"&&typeof A!="function")return{default:A};var I=h(M);if(I&&I.has(A))return I.get(A);var V={__proto__:null},G=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var F in A)if(F!=="default"&&Object.prototype.hasOwnProperty.call(A,F)){var Y=G?Object.getOwnPropertyDescriptor(A,F):null;Y&&(Y.get||Y.set)?Object.defineProperty(V,F,Y):V[F]=A[F]}return V.default=A,I&&I.set(A,V),V}function m(A){return Object.keys(A).length===0}function p(A){return typeof A=="string"&&A.charCodeAt(0)>96}function b(A){return A!=="ownerState"&&A!=="theme"&&A!=="sx"&&A!=="as"}function w(A,M){return M&&A&&typeof A=="object"&&A.styles&&!A.styles.startsWith("@layer")&&(A.styles=`@layer ${M}{${String(A.styles)}}`),A}const C=dn.systemDefaultTheme=(0,a.default)(),E=A=>A&&A.charAt(0).toLowerCase()+A.slice(1);function S({defaultTheme:A,theme:M,themeId:I}){return m(M)?A:M[I]||M}function _(A){return A?(M,I)=>I[A]:null}function W(A,M,I){let{ownerState:V}=M,G=(0,r.default)(M,u);const F=typeof A=="function"?A((0,t.default)({ownerState:V},G)):A;if(Array.isArray(F))return F.flatMap(Y=>W(Y,(0,t.default)({ownerState:V},G),I));if(F&&typeof F=="object"&&Array.isArray(F.variants)){const{variants:Y=[]}=F;let U=(0,r.default)(F,d);return Y.forEach(N=>{let ce=!0;if(typeof N.props=="function"?ce=N.props((0,t.default)({ownerState:V},G,V)):Object.keys(N.props).forEach(fe=>{V?.[fe]!==N.props[fe]&&G[fe]!==N.props[fe]&&(ce=!1)}),ce){Array.isArray(U)||(U=[U]);const fe=typeof N.style=="function"?N.style((0,t.default)({ownerState:V},G,V)):N.style;U.push(I?w((0,n.internal_serializeStyles)(fe),I):fe)}}),U}return I?w((0,n.internal_serializeStyles)(F),I):F}function D(A={}){const{themeId:M,defaultTheme:I=C,rootShouldForwardProp:V=b,slotShouldForwardProp:G=b}=A,F=Y=>(0,c.default)((0,t.default)({},Y,{theme:S((0,t.default)({},Y,{defaultTheme:I,themeId:M}))}));return F.__mui_systemSx=!0,(Y,oe={})=>{(0,n.internal_processStyles)(Y,pe=>pe.filter(Re=>!(Re!=null&&Re.__mui_systemSx)));const{name:U,slot:N,skipVariantsResolver:ce,skipSx:fe,overridesResolver:$=_(E(N))}=oe,Q=(0,r.default)(oe,f),Ce=U&&U.startsWith("Mui")||N?"components":"custom",me=ce!==void 0?ce:N&&N!=="Root"&&N!=="root"||!1,we=fe||!1;let ae;process.env.NODE_ENV!=="production"&&U&&(ae=`${U}-${E(N||"Root")}`);let ee=b;N==="Root"||N==="root"?ee=V:N?ee=G:p(Y)&&(ee=void 0);const le=(0,n.default)(Y,(0,t.default)({shouldForwardProp:ee,label:ae},Q)),ge=pe=>typeof pe=="function"&&pe.__emotion_real!==pe||(0,o.isPlainObject)(pe)?Re=>{const j=S({theme:Re.theme,defaultTheme:I,themeId:M});return W(pe,(0,t.default)({},Re,{theme:j}),j.modularCssLayers?Ce:void 0)}:pe,ie=(pe,...Re)=>{let j=ge(pe);const We=Re?Re.map(ge):[];U&&$&&We.push(Ne=>{const Be=S((0,t.default)({},Ne,{defaultTheme:I,themeId:M}));if(!Be.components||!Be.components[U]||!Be.components[U].styleOverrides)return null;const vt=Be.components[U].styleOverrides,pt={};return Object.entries(vt).forEach(([k,P])=>{pt[k]=W(P,(0,t.default)({},Ne,{theme:Be}),Be.modularCssLayers?"theme":void 0)}),$(Ne,pt)}),U&&!me&&We.push(Ne=>{var Be;const vt=S((0,t.default)({},Ne,{defaultTheme:I,themeId:M})),pt=vt==null||(Be=vt.components)==null||(Be=Be[U])==null?void 0:Be.variants;return W({variants:pt},(0,t.default)({},Ne,{theme:vt}),vt.modularCssLayers?"theme":void 0)}),we||We.push(F);const qe=We.length-Re.length;if(Array.isArray(pe)&&qe>0){const Ne=new Array(qe).fill("");j=[...pe,...Ne],j.raw=[...pe.raw,...Ne]}const Ze=le(j,...We);if(process.env.NODE_ENV!=="production"){let Ne;U&&(Ne=`${U}${(0,s.default)(N||"")}`),Ne===void 0&&(Ne=`Styled(${(0,i.default)(Y)})`),Ze.displayName=Ne}return Y.muiName&&(Ze.muiName=Y.muiName),Ze};return le.withConfig&&(ie.withConfig=le.withConfig),ie}}return dn}var gv=mv();const vv=it(gv);function yv(e,t){return et({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var Ct={};const bv=Yr(D0),xv=Yr(om);var Ru;function _v(){if(Ru)return Ct;Ru=1;var e=at();Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.alpha=m,Ct.blend=W,Ct.colorChannel=void 0,Ct.darken=b,Ct.decomposeColor=i,Ct.emphasize=S,Ct.getContrastRatio=v,Ct.getLuminance=h,Ct.hexToRgb=o,Ct.hslToRgb=f,Ct.lighten=C,Ct.private_safeAlpha=p,Ct.private_safeColorChannel=void 0,Ct.private_safeDarken=w,Ct.private_safeEmphasize=_,Ct.private_safeLighten=E,Ct.recomposeColor=u,Ct.rgbToHex=d;var t=e(bv),r=e(xv);function n(D,A=0,M=1){return process.env.NODE_ENV!=="production"&&(D<A||D>M)&&console.error(`MUI: The value provided ${D} is out of range [${A}, ${M}].`),(0,r.default)(D,A,M)}function o(D){D=D.slice(1);const A=new RegExp(`.{1,${D.length>=6?2:1}}`,"g");let M=D.match(A);return M&&M[0].length===1&&(M=M.map(I=>I+I)),M?`rgb${M.length===4?"a":""}(${M.map((I,V)=>V<3?parseInt(I,16):Math.round(parseInt(I,16)/255*1e3)/1e3).join(", ")})`:""}function s(D){const A=D.toString(16);return A.length===1?`0${A}`:A}function i(D){if(D.type)return D;if(D.charAt(0)==="#")return i(o(D));const A=D.indexOf("("),M=D.substring(0,A);if(["rgb","rgba","hsl","hsla","color"].indexOf(M)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${D}\` color.
|
|
92
|
-
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:(0,t.default)(9,D));let I=D.substring(
|
|
93
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:(0,t.default)(10,
|
|
94
|
-
`))}return b}const h=({color:p,name:b,mainShade:w=500,lightShade:
|
|
91
|
+
`)),()=>{})}function Iu(e){return po(e,"spacing",8,"spacing")}function ho(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 Tg(e,t){return r=>e.reduce((n,o)=>(n[o]=ho(t,r),n),{})}function Ig(e,t,r,n){if(t.indexOf(r)===-1)return null;const o=kg(r),s=Tg(o,n),i=e[r];return qr(e,i,s)}function Mu(e,t){const r=Iu(e.theme);return Object.keys(e).map(n=>Ig(e,t,n,r)).reduce(fo,{})}function It(e){return Mu(e,zs)}It.propTypes=process.env.NODE_ENV!=="production"?zs.reduce((e,t)=>(e[t]=nn,e),{}):{},It.filterProps=zs;function Mt(e){return Mu(e,Bs)}Mt.propTypes=process.env.NODE_ENV!=="production"?Bs.reduce((e,t)=>(e[t]=nn,e),{}):{},Mt.filterProps=Bs,process.env.NODE_ENV!=="production"&&Ag.reduce((e,t)=>(e[t]=nn,e),{});function Mg(e=8){if(e.mui)return e;const t=Iu({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 Fs(...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]?fo(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 mr(e){return typeof e!="number"?e:`${e}px solid`}function gr(e,t){return Rt({prop:e,themeKey:"borders",transform:t})}const Pg=gr("border",mr),Og=gr("borderTop",mr),jg=gr("borderRight",mr),Rg=gr("borderBottom",mr),Ng=gr("borderLeft",mr),$g=gr("borderColor"),Lg=gr("borderTopColor"),zg=gr("borderRightColor"),Bg=gr("borderBottomColor"),Fg=gr("borderLeftColor"),Wg=gr("outline",mr),Hg=gr("outlineColor"),Ws=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=po(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:ho(t,n)});return qr(e,e.borderRadius,r)}return null};Ws.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:nn}:{},Ws.filterProps=["borderRadius"],Fs(Pg,Og,jg,Rg,Ng,$g,Lg,zg,Bg,Fg,Ws,Wg,Hg);const Hs=e=>{if(e.gap!==void 0&&e.gap!==null){const t=po(e.theme,"spacing",8,"gap"),r=n=>({gap:ho(t,n)});return qr(e,e.gap,r)}return null};Hs.propTypes=process.env.NODE_ENV!=="production"?{gap:nn}:{},Hs.filterProps=["gap"];const Us=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=po(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:ho(t,n)});return qr(e,e.columnGap,r)}return null};Us.propTypes=process.env.NODE_ENV!=="production"?{columnGap:nn}:{},Us.filterProps=["columnGap"];const Vs=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=po(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:ho(t,n)});return qr(e,e.rowGap,r)}return null};Vs.propTypes=process.env.NODE_ENV!=="production"?{rowGap:nn}:{},Vs.filterProps=["rowGap"];const Ug=Rt({prop:"gridColumn"}),Vg=Rt({prop:"gridRow"}),Yg=Rt({prop:"gridAutoFlow"}),qg=Rt({prop:"gridAutoColumns"}),Zg=Rt({prop:"gridAutoRows"}),Gg=Rt({prop:"gridTemplateColumns"}),Kg=Rt({prop:"gridTemplateRows"}),Qg=Rt({prop:"gridTemplateAreas"}),Xg=Rt({prop:"gridArea"});Fs(Hs,Us,Vs,Ug,Vg,Yg,qg,Zg,Gg,Kg,Qg,Xg);function On(e,t){return t==="grey"?t:e}const Jg=Rt({prop:"color",themeKey:"palette",transform:On}),ev=Rt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:On}),tv=Rt({prop:"backgroundColor",themeKey:"palette",transform:On});Fs(Jg,ev,tv);function lr(e){return e<=1&&e!==0?`${e*100}%`:e}const rv=Rt({prop:"width",transform:lr}),za=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])||La[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:lr(r)}};return qr(e,e.maxWidth,t)}return null};za.filterProps=["maxWidth"];const nv=Rt({prop:"minWidth",transform:lr}),ov=Rt({prop:"height",transform:lr}),sv=Rt({prop:"maxHeight",transform:lr}),iv=Rt({prop:"minHeight",transform:lr});Rt({prop:"size",cssProperty:"width",transform:lr}),Rt({prop:"size",cssProperty:"height",transform:lr});const av=Rt({prop:"boxSizing"});Fs(rv,za,nv,ov,sv,iv,av);const mo={border:{themeKey:"borders",transform:mr},borderTop:{themeKey:"borders",transform:mr},borderRight:{themeKey:"borders",transform:mr},borderBottom:{themeKey:"borders",transform:mr},borderLeft:{themeKey:"borders",transform:mr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:mr},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ws},color:{themeKey:"palette",transform:On},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:On},backgroundColor:{themeKey:"palette",transform:On},p:{style:Mt},pt:{style:Mt},pr:{style:Mt},pb:{style:Mt},pl:{style:Mt},px:{style:Mt},py:{style:Mt},padding:{style:Mt},paddingTop:{style:Mt},paddingRight:{style:Mt},paddingBottom:{style:Mt},paddingLeft:{style:Mt},paddingX:{style:Mt},paddingY:{style:Mt},paddingInline:{style:Mt},paddingInlineStart:{style:Mt},paddingInlineEnd:{style:Mt},paddingBlock:{style:Mt},paddingBlockStart:{style:Mt},paddingBlockEnd:{style:Mt},m:{style:It},mt:{style:It},mr:{style:It},mb:{style:It},ml:{style:It},mx:{style:It},my:{style:It},margin:{style:It},marginTop:{style:It},marginRight:{style:It},marginBottom:{style:It},marginLeft:{style:It},marginX:{style:It},marginY:{style:It},marginInline:{style:It},marginInlineStart:{style:It},marginInlineEnd:{style:It},marginBlock:{style:It},marginBlockStart:{style:It},marginBlockEnd:{style:It},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:Hs},rowGap:{style:Vs},columnGap:{style:Us},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:lr},maxWidth:{style:za},minWidth:{transform:lr},height:{transform:lr},maxHeight:{transform:lr},minHeight:{transform:lr},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function cv(...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 lv(e,t){return typeof e=="function"?e(t):e}function Pu(){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:u,transform:d,style:f}=a;if(n==null)return null;if(u==="typography"&&n==="inherit")return{[r]:n};const h=$s(o,u)||{};return f?f(i):qr(i,n,g=>{let p=Ls(h,d,g);return g===p&&typeof g=="string"&&(p=Ls(h,d,`${r}${g==="default"?"":tn(g)}`,g)),c===!1?p:{[c]:p}})}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:mo;function c(u){let d=u;if(typeof u=="function")d=u(s);else if(typeof u!="object")return u;if(!d)return null;const f=Sg(s.breakpoints),h=Object.keys(f);let y=f;return Object.keys(d).forEach(g=>{const p=lv(d[g],s);if(p!=null)if(typeof p=="object")if(a[g])y=fo(y,e(g,p,s,a));else{const b=qr({theme:s},p,w=>({[g]:w}));cv(b,p)?y[g]=t({sx:p,theme:s,nested:!0}):y=fo(y,b)}else y=fo(y,e(g,p,s,a))}),!i&&s.modularCssLayers?{"@layer sx":Au(h,y)}:Au(h,y)}return Array.isArray(o)?o.map(c):c(o)}return t}const Ys=Pu();Ys.filterProps=["sx"];function Ou(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 uv=["breakpoints","palette","spacing","shape"];function ju(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:s={}}=e,i=rn(e,uv),a=Du(r),c=Mg(o);let u=jr({breakpoints:a,direction:"ltr",components:{},palette:nt({mode:"light"},n),spacing:c,shape:nt({},wg,s)},i);return u.applyStyles=Ou,u=t.reduce((d,f)=>jr(d,f),u),u.unstable_sxConfig=nt({},mo,i?.unstable_sxConfig),u.unstable_sx=function(f){return Ys({sx:f,theme:this})},u}const dv=Yr(Object.freeze(Object.defineProperty({__proto__:null,default:ju,private_createBreakpoints:Du,unstable_applyStyles:Ou},Symbol.toStringTag,{value:"Module"}))),fv=["sx"],pv=e=>{var t,r;const n={systemProps:{},otherProps:{}},o=(t=e==null||(r=e.theme)==null?void 0:r.unstable_sxConfig)!=null?t:mo;return Object.keys(e).forEach(s=>{o[s]?n.systemProps[s]=e[s]:n.otherProps[s]=e[s]}),n};function hv(e){const{sx:t}=e,r=rn(e,fv),{systemProps:n,otherProps:o}=pv(r);let s;return Array.isArray(t)?s=[n,...t]:typeof t=="function"?s=(...i)=>{const a=t(...i);return en(a)?nt({},n,a):n}:s=nt({},n,t),nt({},o,{sx:s})}const mv=Yr(Object.freeze(Object.defineProperty({__proto__:null,default:Ys,extendSxProp:hv,unstable_createStyleFunctionSx:Pu,unstable_defaultSxConfig:mo},Symbol.toStringTag,{value:"Module"})));var Ru;function gv(){if(Ru)return fn;Ru=1;var e=rt();Object.defineProperty(fn,"__esModule",{value:!0}),fn.default=D,fn.shouldForwardProp=b,fn.systemDefaultTheme=void 0;var t=e(um()),r=e(dm()),n=y(gg),o=vg,s=e(yg),i=e(bg),a=e(dv),c=e(mv);const u=["ownerState"],d=["variants"],f=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function h(T){if(typeof WeakMap!="function")return null;var M=new WeakMap,I=new WeakMap;return(h=function(H){return H?I:M})(T)}function y(T,M){if(T&&T.__esModule)return T;if(T===null||typeof T!="object"&&typeof T!="function")return{default:T};var I=h(M);if(I&&I.has(T))return I.get(T);var H={__proto__:null},G=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var F in T)if(F!=="default"&&Object.prototype.hasOwnProperty.call(T,F)){var Y=G?Object.getOwnPropertyDescriptor(T,F):null;Y&&(Y.get||Y.set)?Object.defineProperty(H,F,Y):H[F]=T[F]}return H.default=T,I&&I.set(T,H),H}function g(T){return Object.keys(T).length===0}function p(T){return typeof T=="string"&&T.charCodeAt(0)>96}function b(T){return T!=="ownerState"&&T!=="theme"&&T!=="sx"&&T!=="as"}function w(T,M){return M&&T&&typeof T=="object"&&T.styles&&!T.styles.startsWith("@layer")&&(T.styles=`@layer ${M}{${String(T.styles)}}`),T}const S=fn.systemDefaultTheme=(0,a.default)(),E=T=>T&&T.charAt(0).toLowerCase()+T.slice(1);function C({defaultTheme:T,theme:M,themeId:I}){return g(M)?T:M[I]||M}function _(T){return T?(M,I)=>I[T]:null}function W(T,M,I){let{ownerState:H}=M,G=(0,r.default)(M,u);const F=typeof T=="function"?T((0,t.default)({ownerState:H},G)):T;if(Array.isArray(F))return F.flatMap(Y=>W(Y,(0,t.default)({ownerState:H},G),I));if(F&&typeof F=="object"&&Array.isArray(F.variants)){const{variants:Y=[]}=F;let U=(0,r.default)(F,d);return Y.forEach(N=>{let le=!0;if(typeof N.props=="function"?le=N.props((0,t.default)({ownerState:H},G,H)):Object.keys(N.props).forEach(de=>{H?.[de]!==N.props[de]&&G[de]!==N.props[de]&&(le=!1)}),le){Array.isArray(U)||(U=[U]);const de=typeof N.style=="function"?N.style((0,t.default)({ownerState:H},G,H)):N.style;U.push(I?w((0,n.internal_serializeStyles)(de),I):de)}}),U}return I?w((0,n.internal_serializeStyles)(F),I):F}function D(T={}){const{themeId:M,defaultTheme:I=S,rootShouldForwardProp:H=b,slotShouldForwardProp:G=b}=T,F=Y=>(0,c.default)((0,t.default)({},Y,{theme:C((0,t.default)({},Y,{defaultTheme:I,themeId:M}))}));return F.__mui_systemSx=!0,(Y,se={})=>{(0,n.internal_processStyles)(Y,ee=>ee.filter(Ie=>!(Ie!=null&&Ie.__mui_systemSx)));const{name:U,slot:N,skipVariantsResolver:le,skipSx:de,overridesResolver:$=_(E(N))}=se,Q=(0,r.default)(se,f),we=U&&U.startsWith("Mui")||N?"components":"custom",_e=le!==void 0?le:N&&N!=="Root"&&N!=="root"||!1,he=de||!1;let ae;process.env.NODE_ENV!=="production"&&U&&(ae=`${U}-${E(N||"Root")}`);let ue=b;N==="Root"||N==="root"?ue=H:N?ue=G:p(Y)&&(ue=void 0);const J=(0,n.default)(Y,(0,t.default)({shouldForwardProp:ue,label:ae},Q)),Se=ee=>typeof ee=="function"&&ee.__emotion_real!==ee||(0,o.isPlainObject)(ee)?Ie=>{const j=C({theme:Ie.theme,defaultTheme:I,themeId:M});return W(ee,(0,t.default)({},Ie,{theme:j}),j.modularCssLayers?we:void 0)}:ee,me=(ee,...Ie)=>{let j=Se(ee);const Fe=Ie?Ie.map(Se):[];U&&$&&Fe.push(Be=>{const Ve=C((0,t.default)({},Be,{defaultTheme:I,themeId:M}));if(!Ve.components||!Ve.components[U]||!Ve.components[U].styleOverrides)return null;const et=Ve.components[U].styleOverrides,mt={};return Object.entries(et).forEach(([k,P])=>{mt[k]=W(P,(0,t.default)({},Be,{theme:Ve}),Ve.modularCssLayers?"theme":void 0)}),$(Be,mt)}),U&&!_e&&Fe.push(Be=>{var Ve;const et=C((0,t.default)({},Be,{defaultTheme:I,themeId:M})),mt=et==null||(Ve=et.components)==null||(Ve=Ve[U])==null?void 0:Ve.variants;return W({variants:mt},(0,t.default)({},Be,{theme:et}),et.modularCssLayers?"theme":void 0)}),he||Fe.push(F);const Ke=Fe.length-Ie.length;if(Array.isArray(ee)&&Ke>0){const Be=new Array(Ke).fill("");j=[...ee,...Be],j.raw=[...ee.raw,...Be]}const Ze=J(j,...Fe);if(process.env.NODE_ENV!=="production"){let Be;U&&(Be=`${U}${(0,s.default)(N||"")}`),Be===void 0&&(Be=`Styled(${(0,i.default)(Y)})`),Ze.displayName=Be}return Y.muiName&&(Ze.muiName=Y.muiName),Ze};return J.withConfig&&(me.withConfig=J.withConfig),me}}return fn}var vv=gv();const yv=tt(vv);function bv(e,t){return nt({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var Et={};const xv=Yr(k0),_v=Yr(sm);var Nu;function wv(){if(Nu)return Et;Nu=1;var e=rt();Object.defineProperty(Et,"__esModule",{value:!0}),Et.alpha=g,Et.blend=W,Et.colorChannel=void 0,Et.darken=b,Et.decomposeColor=i,Et.emphasize=C,Et.getContrastRatio=y,Et.getLuminance=h,Et.hexToRgb=o,Et.hslToRgb=f,Et.lighten=S,Et.private_safeAlpha=p,Et.private_safeColorChannel=void 0,Et.private_safeDarken=w,Et.private_safeEmphasize=_,Et.private_safeLighten=E,Et.recomposeColor=u,Et.rgbToHex=d;var t=e(xv),r=e(_v);function n(D,T=0,M=1){return process.env.NODE_ENV!=="production"&&(D<T||D>M)&&console.error(`MUI: The value provided ${D} is out of range [${T}, ${M}].`),(0,r.default)(D,T,M)}function o(D){D=D.slice(1);const T=new RegExp(`.{1,${D.length>=6?2:1}}`,"g");let M=D.match(T);return M&&M[0].length===1&&(M=M.map(I=>I+I)),M?`rgb${M.length===4?"a":""}(${M.map((I,H)=>H<3?parseInt(I,16):Math.round(parseInt(I,16)/255*1e3)/1e3).join(", ")})`:""}function s(D){const T=D.toString(16);return T.length===1?`0${T}`:T}function i(D){if(D.type)return D;if(D.charAt(0)==="#")return i(o(D));const T=D.indexOf("("),M=D.substring(0,T);if(["rgb","rgba","hsl","hsla","color"].indexOf(M)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${D}\` color.
|
|
92
|
+
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:(0,t.default)(9,D));let I=D.substring(T+1,D.length-1),H;if(M==="color"){if(I=I.split(" "),H=I.shift(),I.length===4&&I[3].charAt(0)==="/"&&(I[3]=I[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(H)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${H}\` color space.
|
|
93
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:(0,t.default)(10,H))}else I=I.split(",");return I=I.map(G=>parseFloat(G)),{type:M,values:I,colorSpace:H}}const a=D=>{const T=i(D);return T.values.slice(0,3).map((M,I)=>T.type.indexOf("hsl")!==-1&&I!==0?`${M}%`:M).join(" ")};Et.colorChannel=a;const c=(D,T)=>{try{return a(D)}catch{return T&&process.env.NODE_ENV!=="production"&&console.warn(T),D}};Et.private_safeColorChannel=c;function u(D){const{type:T,colorSpace:M}=D;let{values:I}=D;return T.indexOf("rgb")!==-1?I=I.map((H,G)=>G<3?parseInt(H,10):H):T.indexOf("hsl")!==-1&&(I[1]=`${I[1]}%`,I[2]=`${I[2]}%`),T.indexOf("color")!==-1?I=`${M} ${I.join(" ")}`:I=`${I.join(", ")}`,`${T}(${I})`}function d(D){if(D.indexOf("#")===0)return D;const{values:T}=i(D);return`#${T.map((M,I)=>s(I===3?Math.round(255*M):M)).join("")}`}function f(D){D=i(D);const{values:T}=D,M=T[0],I=T[1]/100,H=T[2]/100,G=I*Math.min(H,1-H),F=(U,N=(U+M/30)%12)=>H-G*Math.max(Math.min(N-3,9-N,1),-1);let Y="rgb";const se=[Math.round(F(0)*255),Math.round(F(8)*255),Math.round(F(4)*255)];return D.type==="hsla"&&(Y+="a",se.push(T[3])),u({type:Y,values:se})}function h(D){D=i(D);let T=D.type==="hsl"||D.type==="hsla"?i(f(D)).values:D.values;return T=T.map(M=>(D.type!=="color"&&(M/=255),M<=.03928?M/12.92:((M+.055)/1.055)**2.4)),Number((.2126*T[0]+.7152*T[1]+.0722*T[2]).toFixed(3))}function y(D,T){const M=h(D),I=h(T);return(Math.max(M,I)+.05)/(Math.min(M,I)+.05)}function g(D,T){return D=i(D),T=n(T),(D.type==="rgb"||D.type==="hsl")&&(D.type+="a"),D.type==="color"?D.values[3]=`/${T}`:D.values[3]=T,u(D)}function p(D,T,M){try{return g(D,T)}catch{return M&&process.env.NODE_ENV!=="production"&&console.warn(M),D}}function b(D,T){if(D=i(D),T=n(T),D.type.indexOf("hsl")!==-1)D.values[2]*=1-T;else if(D.type.indexOf("rgb")!==-1||D.type.indexOf("color")!==-1)for(let M=0;M<3;M+=1)D.values[M]*=1-T;return u(D)}function w(D,T,M){try{return b(D,T)}catch{return M&&process.env.NODE_ENV!=="production"&&console.warn(M),D}}function S(D,T){if(D=i(D),T=n(T),D.type.indexOf("hsl")!==-1)D.values[2]+=(100-D.values[2])*T;else if(D.type.indexOf("rgb")!==-1)for(let M=0;M<3;M+=1)D.values[M]+=(255-D.values[M])*T;else if(D.type.indexOf("color")!==-1)for(let M=0;M<3;M+=1)D.values[M]+=(1-D.values[M])*T;return u(D)}function E(D,T,M){try{return S(D,T)}catch{return M&&process.env.NODE_ENV!=="production"&&console.warn(M),D}}function C(D,T=.15){return h(D)>.5?b(D,T):S(D,T)}function _(D,T,M){try{return C(D,T)}catch{return M&&process.env.NODE_ENV!=="production"&&console.warn(M),D}}function W(D,T,M,I=1){const H=(se,U)=>Math.round((se**(1/I)*(1-M)+U**(1/I)*M)**I),G=i(D),F=i(T),Y=[H(G.values[0],F.values[0]),H(G.values[1],F.values[1]),H(G.values[2],F.values[2])];return u({type:"rgb",values:Y})}return Et}var qs=wv();const go={black:"#000",white:"#fff"},Sv={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"},jn={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Rn={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},vo={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Nn={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},$n={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Ln={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},Cv=["mode","contrastThreshold","tonalOffset"],$u={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:go.white,default:go.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}},Ba={text:{primary:go.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:go.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 Lu(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=qs.lighten(e.main,o):t==="dark"&&(e.dark=qs.darken(e.main,s)))}function Ev(e="light"){return e==="dark"?{main:Nn[200],light:Nn[50],dark:Nn[400]}:{main:Nn[700],light:Nn[400],dark:Nn[800]}}function Dv(e="light"){return e==="dark"?{main:jn[200],light:jn[50],dark:jn[400]}:{main:jn[500],light:jn[300],dark:jn[700]}}function kv(e="light"){return e==="dark"?{main:Rn[500],light:Rn[300],dark:Rn[700]}:{main:Rn[700],light:Rn[400],dark:Rn[800]}}function Av(e="light"){return e==="dark"?{main:$n[400],light:$n[300],dark:$n[700]}:{main:$n[700],light:$n[500],dark:$n[900]}}function Tv(e="light"){return e==="dark"?{main:Ln[400],light:Ln[300],dark:Ln[700]}:{main:Ln[800],light:Ln[500],dark:Ln[900]}}function Iv(e="light"){return e==="dark"?{main:vo[400],light:vo[300],dark:vo[700]}:{main:"#ed6c02",light:vo[500],dark:vo[900]}}function Mv(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2}=e,o=rn(e,Cv),s=e.primary||Ev(t),i=e.secondary||Dv(t),a=e.error||kv(t),c=e.info||Av(t),u=e.success||Tv(t),d=e.warning||Iv(t);function f(p){const b=qs.getContrastRatio(p,Ba.text.primary)>=r?Ba.text.primary:$u.text.primary;if(process.env.NODE_ENV!=="production"){const w=qs.getContrastRatio(p,b);w<3&&console.error([`MUI: The contrast ratio of ${w}:1 for ${b} on ${p}`,"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 h=({color:p,name:b,mainShade:w=500,lightShade:S=300,darkShade:E=700})=>{if(p=nt({},p),!p.main&&p[w]&&(p.main=p[w]),!p.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
|
|
95
95
|
The color object needs to have a \`main\` property or a \`${w}\` property.`:oo(11,b?` (${b})`:"",w));if(typeof p.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(p.main)}\` was provided instead.
|
|
97
97
|
|
|
@@ -105,76 +105,76 @@ const theme1 = createTheme({ palette: {
|
|
|
105
105
|
|
|
106
106
|
const theme2 = createTheme({ palette: {
|
|
107
107
|
primary: { main: green[500] },
|
|
108
|
-
} });`:oo(12,b?` (${b})`:"",JSON.stringify(p.main)));return
|
|
109
|
-
`)),Object.keys(u).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(u).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(d=>`${d} ${typeof i=="string"?i:
|
|
110
|
-
`))}h[
|
|
111
|
-
`)),Ul.configure(e)}},unstable_useEnhancedEffect:zl,unstable_useId:F0,unsupportedProp:W0,useControlled:U0,useEventCallback:H0,useForkRef:V0,useIsFocusVisible:J0},Symbol.toStringTag,{value:"Module"})));var Fu;function ht(){return Fu||(Fu=1,(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=ty})(ca)),ca}var Wu;function ry(){if(Wu)return no;Wu=1;var e=at();Object.defineProperty(no,"__esModule",{value:!0}),no.default=void 0;var t=e(ht()),r=ut();return no.default=(0,t.default)((0,r.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),no}var ny=ry();const oy=it(ny);var yo={},Uu;function sy(){if(Uu)return yo;Uu=1;var e=at();Object.defineProperty(yo,"__esModule",{value:!0}),yo.default=void 0;var t=e(ht()),r=ut();return yo.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"),yo}var iy=sy();const ay=it(iy);var bo={},Hu;function cy(){if(Hu)return bo;Hu=1;var e=at();Object.defineProperty(bo,"__esModule",{value:!0}),bo.default=void 0;var t=e(ht()),r=ut();return bo.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"),bo}var ly=cy();const uy=it(ly),dy=({header:e,sidebar:t,mainContent:r})=>{const[n,o]=y.useState(!1),[s,i]=y.useState(!1),a=()=>{o(!n)},c=()=>{i(!s)};return l.jsxs("div",{className:`${Cr.dashboardContainer} ${s?Cr.sidebarCollapsed:""}`,children:[l.jsxs("header",{className:Cr.header,children:[l.jsx(g.IconButton,{onClick:a,className:Cr.menuButton,children:l.jsx(oy,{})}),l.jsx("div",{className:Cr.headerContent,children:e})]}),l.jsxs("aside",{className:`${Cr.sidebar} ${n?Cr.sidebarOpen:""}`,children:[l.jsx("div",{className:Cr.sidebarContent,children:t}),l.jsx(g.IconButton,{onClick:c,className:Cr.collapseButton,style:{display:"none"},children:s?l.jsx(uy,{}):l.jsx(ay,{})})]}),l.jsx("main",{className:Cr.mainContent,children:r}),n&&l.jsx("div",{className:Cr.overlay,onClick:a})]})},fn={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 Zs(){return typeof window<"u"}function zn(e){return Vu(e)?(e.nodeName||"").toLowerCase():"#document"}function ur(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $r(e){var t;return(t=(Vu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Vu(e){return Zs()?e instanceof Node||e instanceof ur(e).Node:!1}function Qt(e){return Zs()?e instanceof Element||e instanceof ur(e).Element:!1}function Lr(e){return Zs()?e instanceof HTMLElement||e instanceof ur(e).HTMLElement:!1}function Yu(e){return!Zs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ur(e).ShadowRoot}const fy=new Set(["inline","contents"]);function xo(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=vr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!fy.has(o)}const py=new Set(["table","td","th"]);function hy(e){return py.has(zn(e))}const my=[":popover-open",":modal"];function Gs(e){return my.some(t=>{try{return e.matches(t)}catch{return!1}})}const gy=["transform","translate","scale","rotate","perspective"],vy=["transform","translate","scale","rotate","perspective","filter"],yy=["paint","layout","strict","content"];function Ba(e){const t=Fa(),r=Qt(e)?vr(e):e;return gy.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)||vy.some(n=>(r.willChange||"").includes(n))||yy.some(n=>(r.contain||"").includes(n))}function by(e){let t=nn(e);for(;Lr(t)&&!Bn(t);){if(Ba(t))return t;if(Gs(t))return null;t=nn(t)}return null}function Fa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const xy=new Set(["html","body","#document"]);function Bn(e){return xy.has(zn(e))}function vr(e){return ur(e).getComputedStyle(e)}function Ks(e){return Qt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function nn(e){if(zn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Yu(e)&&e.host||$r(e);return Yu(t)?t.host:t}function qu(e){const t=nn(e);return Bn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Lr(t)&&xo(t)?t:qu(t)}function _o(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=qu(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),i=ur(o);if(s){const a=Wa(i);return t.concat(i,i.visualViewport||[],xo(o)?o:[],a&&r?_o(a):[])}return t.concat(o,_o(o,[],r))}function Wa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Fn=Math.min,pn=Math.max,Qs=Math.round,Xs=Math.floor,zr=e=>({x:e,y:e}),_y={left:"right",right:"left",bottom:"top",top:"bottom"},wy={start:"end",end:"start"};function Sy(e,t,r){return pn(e,Fn(t,r))}function Js(e,t){return typeof e=="function"?e(t):e}function Wn(e){return e.split("-")[0]}function wo(e){return e.split("-")[1]}function Cy(e){return e==="x"?"y":"x"}function Ua(e){return e==="y"?"height":"width"}const Ey=new Set(["top","bottom"]);function hn(e){return Ey.has(Wn(e))?"y":"x"}function Ha(e){return Cy(hn(e))}function Dy(e,t,r){r===void 0&&(r=!1);const n=wo(e),o=Ha(e),s=Ua(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=ei(i)),[i,ei(i)]}function ky(e){const t=ei(e);return[Va(e),t,Va(t)]}function Va(e){return e.replace(/start|end/g,t=>wy[t])}const Zu=["left","right"],Gu=["right","left"],Ay=["top","bottom"],Ty=["bottom","top"];function Iy(e,t,r){switch(e){case"top":case"bottom":return r?t?Gu:Zu:t?Zu:Gu;case"left":case"right":return t?Ay:Ty;default:return[]}}function My(e,t,r,n){const o=wo(e);let s=Iy(Wn(e),r==="start",n);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Va)))),s}function ei(e){return e.replace(/left|right|bottom|top/g,t=>_y[t])}function Py(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ku(e){return typeof e!="number"?Py(e):{top:e,right:e,bottom:e,left:e}}function ti(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 Oy=typeof document<"u",jy=function(){},ri=Oy?y.useLayoutEffect:jy;const Ry={...K}.useInsertionEffect||(e=>e());function Ny(e){const t=K.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Ry(()=>{t.current=e}),K.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=hn(t),i=Ha(t),a=Ua(i),c=Wn(t),u=s==="y",d=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,h=n[a]/2-o[a]/2;let v;switch(c){case"top":v={x:d,y:n.y-o.height};break;case"bottom":v={x:d,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:f};break;case"left":v={x:n.x-o.width,y:f};break;default:v={x:n.x,y:n.y}}switch(wo(t)){case"start":v[i]-=h*(r&&u?-1:1);break;case"end":v[i]+=h*(r&&u?-1:1);break}return v}const $y=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 u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=Qu(u,n,c),h=n,v={},m=0;for(let p=0;p<a.length;p++){const{name:b,fn:w}=a[p],{x:C,y:E,data:S,reset:_}=await w({x:d,y:f,initialPlacement:n,placement:h,strategy:o,middlewareData:v,rects:u,platform:i,elements:{reference:e,floating:t}});d=C??d,f=E??f,v={...v,[b]:{...v[b],...S}},_&&m<=50&&(m++,typeof _=="object"&&(_.placement&&(h=_.placement),_.rects&&(u=_.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):_.rects),{x:d,y:f}=Qu(u,h,c)),p=-1)}return{x:d,y:f,placement:h,strategy:o,middlewareData:v}};async function Ly(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:v=0}=Js(t,e),m=Ku(v),b=a[h?f==="floating"?"reference":"floating":f],w=ti(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:u,rootBoundary:d,strategy:c})),C=f==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(E))?await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1}:{x:1,y:1},_=ti(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:E,strategy:c}):C);return{top:(w.top-_.top+m.top)/S.y,bottom:(_.bottom-w.bottom+m.bottom)/S.y,left:(w.left-_.left+m.left)/S.x,right:(_.right-w.right+m.right)/S.x}}const zy=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:u,padding:d=0}=Js(e,t)||{};if(u==null)return{};const f=Ku(d),h={x:r,y:n},v=Ha(o),m=Ua(v),p=await i.getDimensions(u),b=v==="y",w=b?"top":"left",C=b?"bottom":"right",E=b?"clientHeight":"clientWidth",S=s.reference[m]+s.reference[v]-h[v]-s.floating[m],_=h[v]-s.reference[v],W=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let D=W?W[E]:0;(!D||!await(i.isElement==null?void 0:i.isElement(W)))&&(D=a.floating[E]||s.floating[m]);const A=S/2-_/2,M=D/2-p[m]/2-1,I=Fn(f[w],M),V=Fn(f[C],M),G=I,F=D-p[m]-V,Y=D/2-p[m]/2+A,oe=Sy(G,Y,F),U=!c.arrow&&wo(o)!=null&&Y!==oe&&s.reference[m]/2-(Y<G?I:V)-p[m]/2<0,N=U?Y<G?Y-G:Y-F:0;return{[v]:h[v]+N,data:{[v]:oe,centerOffset:Y-oe-N,...U&&{alignmentOffset:N}},reset:U}}}),By=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:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...b}=Js(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const w=Wn(o),C=hn(a),E=Wn(a)===a,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),_=h||(E||!p?[ei(a)]:ky(a)),W=m!=="none";!h&&W&&_.push(...My(a,p,m,S));const D=[a,..._],A=await Ly(t,b),M=[];let I=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&M.push(A[w]),f){const Y=Dy(o,i,S);M.push(A[Y[0]],A[Y[1]])}if(I=[...I,{placement:o,overflows:M}],!M.every(Y=>Y<=0)){var V,G;const Y=(((V=s.flip)==null?void 0:V.index)||0)+1,oe=D[Y];if(oe&&(!(f==="alignment"?C!==hn(oe):!1)||I.every(ce=>hn(ce.placement)===C?ce.overflows[0]>0:!0)))return{data:{index:Y,overflows:I},reset:{placement:oe}};let U=(G=I.filter(N=>N.overflows[0]<=0).sort((N,ce)=>N.overflows[1]-ce.overflows[1])[0])==null?void 0:G.placement;if(!U)switch(v){case"bestFit":{var F;const N=(F=I.filter(ce=>{if(W){const fe=hn(ce.placement);return fe===C||fe==="y"}return!0}).map(ce=>[ce.placement,ce.overflows.filter(fe=>fe>0).reduce((fe,$)=>fe+$,0)]).sort((ce,fe)=>ce[1]-fe[1])[0])==null?void 0:F[0];N&&(U=N);break}case"initialPlacement":U=a;break}if(o!==U)return{reset:{placement:U}}}return{}}}},Fy=new Set(["left","top"]);async function Wy(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=Wn(r),a=wo(r),c=hn(r)==="y",u=Fy.has(i)?-1:1,d=s&&c?-1:1,f=Js(t,e);let{mainAxis:h,crossAxis:v,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"&&(v=a==="end"?m*-1:m),c?{x:v*d,y:h*u}:{x:h*u,y:v*d}}const Uy=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 Wy(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 Xu(e){const t=vr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Lr(e),s=o?e.offsetWidth:r,i=o?e.offsetHeight:n,a=Qs(r)!==s||Qs(n)!==i;return a&&(r=s,n=i),{width:r,height:n,$:a}}function Ya(e){return Qt(e)?e:e.contextElement}function Un(e){const t=Ya(e);if(!Lr(t))return zr(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=Xu(t);let i=(s?Qs(r.width):r.width)/n,a=(s?Qs(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Hy=zr(0);function Ju(e){const t=ur(e);return!Fa()||!t.visualViewport?Hy:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Vy(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ur(e)?!1:t}function mn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=Ya(e);let i=zr(1);t&&(n?Qt(n)&&(i=Un(n)):i=Un(e));const a=Vy(s,r,n)?Ju(s):zr(0);let c=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(s){const h=ur(s),v=n&&Qt(n)?ur(n):n;let m=h,p=Wa(m);for(;p&&n&&v!==m;){const b=Un(p),w=p.getBoundingClientRect(),C=vr(p),E=w.left+(p.clientLeft+parseFloat(C.paddingLeft))*b.x,S=w.top+(p.clientTop+parseFloat(C.paddingTop))*b.y;c*=b.x,u*=b.y,d*=b.x,f*=b.y,c+=E,u+=S,m=ur(p),p=Wa(m)}}return ti({width:d,height:f,x:c,y:u})}function ni(e,t){const r=Ks(e).scrollLeft;return t?t.left+r:mn($r(e)).left+r}function ed(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-ni(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function Yy(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",i=$r(n),a=t?Gs(t.floating):!1;if(n===i||a&&s)return r;let c={scrollLeft:0,scrollTop:0},u=zr(1);const d=zr(0),f=Lr(n);if((f||!f&&!s)&&((zn(n)!=="body"||xo(i))&&(c=Ks(n)),Lr(n))){const v=mn(n);u=Un(n),d.x=v.x+n.clientLeft,d.y=v.y+n.clientTop}const h=i&&!f&&!s?ed(i,c):zr(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+h.x,y:r.y*u.y-c.scrollTop*u.y+d.y+h.y}}function qy(e){return Array.from(e.getClientRects())}function Zy(e){const t=$r(e),r=Ks(e),n=e.ownerDocument.body,o=pn(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=pn(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+ni(e);const a=-r.scrollTop;return vr(n).direction==="rtl"&&(i+=pn(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:i,y:a}}const td=25;function Gy(e,t){const r=ur(e),n=$r(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=Fa();(!d||d&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}const u=ni(n);if(u<=0){const d=n.ownerDocument,f=d.body,h=getComputedStyle(f),v=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(n.clientWidth-f.clientWidth-v);m<=td&&(s-=m)}else u<=td&&(s+=u);return{width:s,height:i,x:a,y:c}}const Ky=new Set(["absolute","fixed"]);function Qy(e,t){const r=mn(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=Lr(e)?Un(e):zr(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,u=n*s.y;return{width:i,height:a,x:c,y:u}}function rd(e,t,r){let n;if(t==="viewport")n=Gy(e,r);else if(t==="document")n=Zy($r(e));else if(Qt(t))n=Qy(t,r);else{const o=Ju(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ti(n)}function nd(e,t){const r=nn(e);return r===t||!Qt(r)||Bn(r)?!1:vr(r).position==="fixed"||nd(r,t)}function Xy(e,t){const r=t.get(e);if(r)return r;let n=_o(e,[],!1).filter(a=>Qt(a)&&zn(a)!=="body"),o=null;const s=vr(e).position==="fixed";let i=s?nn(e):e;for(;Qt(i)&&!Bn(i);){const a=vr(i),c=Ba(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&Ky.has(o.position)||xo(i)&&!c&&nd(e,i))?n=n.filter(d=>d!==i):o=a,i=nn(i)}return t.set(e,n),n}function Jy(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?Gs(t)?[]:Xy(t,this._c):[].concat(r),n],a=i[0],c=i.reduce((u,d)=>{const f=rd(t,d,o);return u.top=pn(f.top,u.top),u.right=Fn(f.right,u.right),u.bottom=Fn(f.bottom,u.bottom),u.left=pn(f.left,u.left),u},rd(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function eb(e){const{width:t,height:r}=Xu(e);return{width:t,height:r}}function tb(e,t,r){const n=Lr(t),o=$r(t),s=r==="fixed",i=mn(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=zr(0);function u(){c.x=ni(o)}if(n||!n&&!s)if((zn(t)!=="body"||xo(o))&&(a=Ks(t)),n){const v=mn(t,!0,s,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else o&&u();s&&!n&&o&&u();const d=o&&!n&&!s?ed(o,a):zr(0),f=i.left+a.scrollLeft-c.x-d.x,h=i.top+a.scrollTop-c.y-d.y;return{x:f,y:h,width:i.width,height:i.height}}function qa(e){return vr(e).position==="static"}function od(e,t){if(!Lr(e)||vr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return $r(e)===r&&(r=r.ownerDocument.body),r}function sd(e,t){const r=ur(e);if(Gs(e))return r;if(!Lr(e)){let o=nn(e);for(;o&&!Bn(o);){if(Qt(o)&&!qa(o))return o;o=nn(o)}return r}let n=od(e,t);for(;n&&hy(n)&&qa(n);)n=od(n,t);return n&&Bn(n)&&qa(n)&&!Ba(n)?r:n||by(e)||r}const rb=async function(e){const t=this.getOffsetParent||sd,r=this.getDimensions,n=await r(e.floating);return{reference:tb(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function nb(e){return vr(e).direction==="rtl"}const ob={convertOffsetParentRelativeRectToViewportRelativeRect:Yy,getDocumentElement:$r,getClippingRect:Jy,getOffsetParent:sd,getElementRects:rb,getClientRects:qy,getDimensions:eb,getScale:Un,isElement:Qt,isRTL:nb};function id(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function sb(e,t){let r=null,n;const o=$r(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 u=e.getBoundingClientRect(),{left:d,top:f,width:h,height:v}=u;if(a||t(),!h||!v)return;const m=Xs(f),p=Xs(o.clientWidth-(d+h)),b=Xs(o.clientHeight-(f+v)),w=Xs(d),E={rootMargin:-m+"px "+-p+"px "+-b+"px "+-w+"px",threshold:pn(0,Fn(1,c))||1};let S=!0;function _(W){const D=W[0].intersectionRatio;if(D!==c){if(!S)return i();D?i(!1,D):n=setTimeout(()=>{i(!1,1e-7)},1e3)}D===1&&!id(u,e.getBoundingClientRect())&&i(),S=!1}try{r=new IntersectionObserver(_,{...E,root:o.ownerDocument})}catch{r=new IntersectionObserver(_,E)}r.observe(e)}return i(!0),s}function ib(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,u=Ya(e),d=o||s?[...u?_o(u):[],..._o(t)]:[];d.forEach(w=>{o&&w.addEventListener("scroll",r,{passive:!0}),s&&w.addEventListener("resize",r)});const f=u&&a?sb(u,r):null;let h=-1,v=null;i&&(v=new ResizeObserver(w=>{let[C]=w;C&&C.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var E;(E=v)==null||E.observe(t)})),r()}),u&&!c&&v.observe(u),v.observe(t));let m,p=c?mn(e):null;c&&b();function b(){const w=mn(e);p&&!id(p,w)&&r(),p=w,m=requestAnimationFrame(b)}return r(),()=>{var w;d.forEach(C=>{o&&C.removeEventListener("scroll",r),s&&C.removeEventListener("resize",r)}),f?.(),(w=v)==null||w.disconnect(),v=null,c&&cancelAnimationFrame(m)}}const ab=Uy,cb=By,ad=zy,lb=(e,t,r)=>{const n=new Map,o={platform:ob,...r},s={...o.platform,_c:n};return $y(e,t,{...o,platform:s})};var ub=typeof document<"u",db=function(){},oi=ub?y.useLayoutEffect:db;function si(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(!si(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)&&!si(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function cd(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ld(e,t){const r=cd(e);return Math.round(t*r)/r}function Za(e){const t=K.useRef(e);return oi(()=>{t.current=e}),t}function fb(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:u}=e,[d,f]=K.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=K.useState(n);si(h,n)||v(n);const[m,p]=K.useState(null),[b,w]=K.useState(null),C=K.useCallback(ce=>{ce!==W.current&&(W.current=ce,p(ce))},[]),E=K.useCallback(ce=>{ce!==D.current&&(D.current=ce,w(ce))},[]),S=s||m,_=i||b,W=K.useRef(null),D=K.useRef(null),A=K.useRef(d),M=c!=null,I=Za(c),V=Za(o),G=Za(u),F=K.useCallback(()=>{if(!W.current||!D.current)return;const ce={placement:t,strategy:r,middleware:h};V.current&&(ce.platform=V.current),lb(W.current,D.current,ce).then(fe=>{const $={...fe,isPositioned:G.current!==!1};Y.current&&!si(A.current,$)&&(A.current=$,h0.flushSync(()=>{f($)}))})},[h,t,r,V,G]);oi(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f(ce=>({...ce,isPositioned:!1})))},[u]);const Y=K.useRef(!1);oi(()=>(Y.current=!0,()=>{Y.current=!1}),[]),oi(()=>{if(S&&(W.current=S),_&&(D.current=_),S&&_){if(I.current)return I.current(S,_,F);F()}},[S,_,F,I,M]);const oe=K.useMemo(()=>({reference:W,floating:D,setReference:C,setFloating:E}),[C,E]),U=K.useMemo(()=>({reference:S,floating:_}),[S,_]),N=K.useMemo(()=>{const ce={position:r,left:0,top:0};if(!U.floating)return ce;const fe=ld(U.floating,d.x),$=ld(U.floating,d.y);return a?{...ce,transform:"translate("+fe+"px, "+$+"px)",...cd(U.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:fe,top:$}},[r,a,U.floating,d.x,d.y]);return K.useMemo(()=>({...d,update:F,refs:oe,elements:U,floatingStyles:N}),[d,F,oe,U,N])}const pb=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?ad({element:n.current,padding:o}).fn(r):{}:n?ad({element:n,padding:o}).fn(r):{}}}},hb=(e,t)=>({...ab(e),options:[e,t]}),mb=(e,t)=>({...cb(e),options:[e,t]}),gb=(e,t)=>({...pb(e),options:[e,t]}),vb={...K};let ud=!1,yb=0;const dd=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+yb++;function bb(){const[e,t]=K.useState(()=>ud?dd():void 0);return ri(()=>{e==null&&t(dd())},[]),K.useEffect(()=>{ud=!0},[]),e}const fd=vb.useId||bb;let So;process.env.NODE_ENV!=="production"&&(So=new Set);function xb(){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=So)!=null&&e.has(o))){var s;(s=So)==null||s.add(o),console.warn(o)}}function _b(){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=So)!=null&&e.has(o))){var s;(s=So)==null||s.add(o),console.error(o)}}const wb=K.forwardRef(function(t,r){const{context:{placement:n,elements:{floating:o},middlewareData:{arrow:s,shift:i}},width:a=14,height:c=7,tipRadius:u=0,strokeWidth:d=0,staticOffset:f,stroke:h,d:v,style:{transform:m,...p}={},...b}=t;process.env.NODE_ENV!=="production"&&(r||xb("The `ref` prop is required for `FloatingArrow`."));const w=fd(),[C,E]=K.useState(!1);if(ri(()=>{if(!o)return;vr(o).direction==="rtl"&&E(!0)},[o]),!o)return null;const[S,_]=n.split("-"),W=S==="top"||S==="bottom";let D=f;(W&&i!=null&&i.x||!W&&i!=null&&i.y)&&(D=null);const A=d*2,M=A/2,I=a/2*(u/-8+1),V=c/2*u/4,G=!!v,F=D&&_==="end"?"bottom":"top";let Y=D&&_==="end"?"right":"left";D&&C&&(Y=_==="end"?"left":"right");const oe=s?.x!=null?D||s.x:"",U=s?.y!=null?D||s.y:"",N=v||"M0,0"+(" H"+a)+(" L"+(a-I)+","+(c-V))+(" Q"+a/2+","+c+" "+I+","+(c-V))+" Z",ce={top:G?"rotate(180deg)":"",left:G?"rotate(90deg)":"rotate(-90deg)",bottom:G?"":"rotate(180deg)",right:G?"rotate(-90deg)":"rotate(90deg)"}[S];return l.jsxs("svg",{...b,"aria-hidden":!0,ref:r,width:G?a:a+A,height:a,viewBox:"0 0 "+a+" "+(c>a?c:a),style:{position:"absolute",pointerEvents:"none",[Y]:oe,[F]:U,[S]:W||G?"100%":"calc(100% - "+A/2+"px)",transform:[ce,m].filter(fe=>!!fe).join(" "),...p},children:[A>0&&l.jsx("path",{clipPath:"url(#"+w+")",fill:"none",stroke:h,strokeWidth:A+(v?0:1),d:N}),l.jsx("path",{stroke:A&&!v?b.fill:"none",d:N}),l.jsx("clipPath",{id:w,children:l.jsx("rect",{x:-M,y:M*(G?-1:1),width:a+A,height:a})})]})});function Sb(){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 Cb=K.createContext(null),Eb=K.createContext(null),Db=()=>{var e;return((e=K.useContext(Cb))==null?void 0:e.id)||null},kb=()=>K.useContext(Eb);function Ab(e){const{open:t=!1,onOpenChange:r,elements:n}=e,o=fd(),s=K.useRef({}),[i]=K.useState(()=>Sb()),a=Db()!=null;if(process.env.NODE_ENV!=="production"){const v=n.reference;v&&!Qt(v)&&_b("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,u]=K.useState(n.reference),d=Ny((v,m,p)=>{s.current.openEvent=v?m:void 0,i.emit("openchange",{open:v,event:m,reason:p,nested:a}),r?.(v,m,p)}),f=K.useMemo(()=>({setPositionReference:u}),[]),h=K.useMemo(()=>({reference:c||n.reference||null,floating:n.floating||null,domReference:n.reference}),[c,n.reference,n.floating]);return K.useMemo(()=>({dataRef:s,open:t,onOpenChange:d,elements:h,events:i,floatingId:o,refs:f}),[t,d,h,i,o,f])}function Tb(e){e===void 0&&(e={});const{nodeId:t}=e,r=Ab({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,o=n.elements,[s,i]=K.useState(null),[a,c]=K.useState(null),d=o?.domReference||s,f=K.useRef(null),h=kb();ri(()=>{d&&(f.current=d)},[d]);const v=fb({...e,elements:{...o,...a&&{reference:a}}}),m=K.useCallback(E=>{const S=Qt(E)?{getBoundingClientRect:()=>E.getBoundingClientRect(),getClientRects:()=>E.getClientRects(),contextElement:E}:E;c(S),v.refs.setReference(S)},[v.refs]),p=K.useCallback(E=>{(Qt(E)||E===null)&&(f.current=E,i(E)),(Qt(v.refs.reference.current)||v.refs.reference.current===null||E!==null&&!Qt(E))&&v.refs.setReference(E)},[v.refs]),b=K.useMemo(()=>({...v.refs,setReference:p,setPositionReference:m,domReference:f}),[v.refs,p,m]),w=K.useMemo(()=>({...v.elements,domReference:d}),[v.elements,d]),C=K.useMemo(()=>({...v,...n,refs:b,elements:w,nodeId:t}),[v,b,w,t,n]);return ri(()=>{n.dataRef.current.floatingContext=C;const E=h?.nodesRef.current.find(S=>S.id===t);E&&(E.context=C)}),K.useMemo(()=>({...v,context:C,refs:b,elements:w}),[v,b,w,C])}/*!
|
|
108
|
+
} });`:oo(12,b?` (${b})`:"",JSON.stringify(p.main)));return Lu(p,"light",S,n),Lu(p,"dark",E,n),p.contrastText||(p.contrastText=f(p.main)),p},y={dark:Ba,light:$u};return process.env.NODE_ENV!=="production"&&(y[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),jr(nt({common:nt({},go),mode:t,primary:h({color:s,name:"primary"}),secondary:h({color:i,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:a,name:"error"}),warning:h({color:d,name:"warning"}),info:h({color:c,name:"info"}),success:h({color:u,name:"success"}),grey:Sv,contrastThreshold:r,getContrastText:f,augmentColor:h,tonalOffset:n},y[t]),o)}const Pv=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Ov(e){return Math.round(e*1e5)/1e5}const zu={textTransform:"uppercase"},Bu='"Roboto", "Helvetica", "Arial", sans-serif';function jv(e,t){const r=typeof t=="function"?t(e):t,{fontFamily:n=Bu,fontSize:o=14,fontWeightLight:s=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:c=700,htmlFontSize:u=16,allVariants:d,pxToRem:f}=r,h=rn(r,Pv);process.env.NODE_ENV!=="production"&&(typeof o!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof u!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const y=o/14,g=f||(w=>`${w/u*y}rem`),p=(w,S,E,C,_)=>nt({fontFamily:n,fontWeight:w,fontSize:g(S),lineHeight:E},n===Bu?{letterSpacing:`${Ov(C/S)}em`}:{},_,d),b={h1:p(s,96,1.167,-1.5),h2:p(s,60,1.2,-.5),h3:p(i,48,1.167,0),h4:p(i,34,1.235,.25),h5:p(i,24,1.334,0),h6:p(a,20,1.6,.15),subtitle1:p(i,16,1.75,.15),subtitle2:p(a,14,1.57,.1),body1:p(i,16,1.5,.15),body2:p(i,14,1.43,.15),button:p(a,14,1.75,.4,zu),caption:p(i,12,1.66,.4),overline:p(i,12,2.66,1,zu),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return jr(nt({htmlFontSize:u,pxToRem:g,fontFamily:n,fontSize:o,fontWeightLight:s,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:c},b),h,{clone:!1})}const Rv=.2,Nv=.14,$v=.12;function xt(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Rv})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Nv})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${$v})`].join(",")}const Lv=["none",xt(0,2,1,-1,0,1,1,0,0,1,3,0),xt(0,3,1,-2,0,2,2,0,0,1,5,0),xt(0,3,3,-2,0,3,4,0,0,1,8,0),xt(0,2,4,-1,0,4,5,0,0,1,10,0),xt(0,3,5,-1,0,5,8,0,0,1,14,0),xt(0,3,5,-1,0,6,10,0,0,1,18,0),xt(0,4,5,-2,0,7,10,1,0,2,16,1),xt(0,5,5,-3,0,8,10,1,0,3,14,2),xt(0,5,6,-3,0,9,12,1,0,3,16,2),xt(0,6,6,-3,0,10,14,1,0,4,18,3),xt(0,6,7,-4,0,11,15,1,0,4,20,3),xt(0,7,8,-4,0,12,17,2,0,5,22,4),xt(0,7,8,-4,0,13,19,2,0,5,24,4),xt(0,7,9,-4,0,14,21,2,0,5,26,4),xt(0,8,9,-5,0,15,22,2,0,6,28,5),xt(0,8,10,-5,0,16,24,2,0,6,30,5),xt(0,8,11,-5,0,17,26,2,0,6,32,5),xt(0,9,11,-5,0,18,28,2,0,7,34,6),xt(0,9,12,-6,0,19,29,2,0,7,36,6),xt(0,10,13,-6,0,20,31,3,0,8,38,7),xt(0,10,13,-6,0,21,33,3,0,8,40,7),xt(0,10,14,-6,0,22,35,3,0,8,42,7),xt(0,11,14,-7,0,23,36,3,0,9,44,8),xt(0,11,15,-7,0,24,38,3,0,9,46,8)],zv=["duration","easing","delay"],Bv={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)"},Fv={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Fu(e){return`${Math.round(e)}ms`}function Wv(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function Hv(e){const t=nt({},Bv,e.easing),r=nt({},Fv,e.duration);return nt({getAutoHeightDuration:Wv,create:(o=["all"],s={})=>{const{duration:i=r.standard,easing:a=t.easeInOut,delay:c=0}=s,u=rn(s,zv);if(process.env.NODE_ENV!=="production"){const d=h=>typeof h=="string",f=h=>!isNaN(parseFloat(h));!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(u).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(u).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(d=>`${d} ${typeof i=="string"?i:Fu(i)} ${a} ${typeof c=="string"?c:Fu(c)}`).join(",")}},e,{easing:t,duration:r})}const Uv={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Vv=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Yv(e={},...t){const{mixins:r={},palette:n={},transitions:o={},typography:s={}}=e,i=rn(e,Vv);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.":oo(18));const a=Mv(n),c=ju(e);let u=jr(c,{mixins:bv(c.breakpoints,r),palette:a,shadows:Lv.slice(),typography:jv(a,s),transitions:Hv(o),zIndex:nt({},Uv)});if(u=jr(u,i),u=t.reduce((d,f)=>jr(d,f),u),process.env.NODE_ENV!=="production"){const d=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],f=(h,y)=>{let g;for(g in h){const p=h[g];if(d.indexOf(g)!==-1&&Object.keys(p).length>0){if(process.env.NODE_ENV!=="production"){const b=_a("",g);console.error([`MUI: The \`${y}\` component increases the CSS specificity of the \`${g}\` internal state.`,"You can not override it like this: ",JSON.stringify(h,null,2),"",`Instead, you need to use the '&.${b}' syntax:`,JSON.stringify({root:{[`&.${b}`]:p}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
110
|
+
`))}h[g]={}}}};Object.keys(u.components).forEach(h=>{const y=u.components[h].styleOverrides;y&&h.indexOf("Mui")===0&&f(y,h)})}return u.unstable_sxConfig=nt({},mo,i?.unstable_sxConfig),u.unstable_sx=function(f){return Ys({sx:f,theme:this})},u}const qv=Yv(),Zv="$$material";function Gv(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Kv=yv({themeId:Zv,defaultTheme:qv,rootShouldForwardProp:e=>Gv(e)&&e!=="classes"});function Qv(e){return _a("MuiSvgIcon",e)}nm("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Xv=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Jv=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${tn(t)}`,`fontSize${tn(r)}`]};return tm(o,Qv,n)},ey=Kv("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${tn(r.color)}`],t[`fontSize${tn(r.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var r,n,o,s,i,a,c,u,d,f,h,y,g;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:((u=e.typography)==null||(d=u.pxToRem)==null?void 0:d.call(u,35))||"2.1875rem"}[t.fontSize],color:(f=(h=(e.vars||e).palette)==null||(h=h[t.color])==null?void 0:h.main)!=null?f:{action:(y=(e.vars||e).palette)==null||(y=y.action)==null?void 0:y.active,disabled:(g=(e.vars||e).palette)==null||(g=g.action)==null?void 0:g.disabled,inherit:void 0}[t.color]}}),Zs=K.forwardRef(function(t,r){const n=lm({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:i="inherit",component:a="svg",fontSize:c="medium",htmlColor:u,inheritViewBox:d=!1,titleAccess:f,viewBox:h="0 0 24 24"}=n,y=rn(n,Xv),g=K.isValidElement(o)&&o.type==="svg",p=nt({},n,{color:i,component:a,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:g}),b={};d||(b.viewBox=h);const w=Jv(p);return l.jsxs(ey,nt({as:a,className:qt(w.root,s),focusable:"false",color:u,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:r},b,y,g&&o.props,{ownerState:p,children:[g?o.props.children:o,f?l.jsx("title",{children:f}):null]}))});process.env.NODE_ENV!=="production"&&(Zs.propTypes={children:ze.node,classes:ze.object,className:ze.string,color:ze.oneOfType([ze.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),ze.string]),component:ze.elementType,fontSize:ze.oneOfType([ze.oneOf(["inherit","large","medium","small"]),ze.string]),htmlColor:ze.string,inheritViewBox:ze.bool,shapeRendering:ze.string,sx:ze.oneOfType([ze.arrayOf(ze.oneOfType([ze.func,ze.object,ze.bool])),ze.func,ze.object]),titleAccess:ze.string,viewBox:ze.string}),Zs.muiName="SvgIcon";function ty(e,t){function r(n,o){return l.jsx(Zs,nt({"data-testid":`${t}Icon`,ref:o},n,{children:e}))}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=Zs.muiName,K.memo(K.forwardRef(r))}const ry=Yr(Object.freeze(Object.defineProperty({__proto__:null,capitalize:tn,createChainedFunction:R0,createSvgIcon:ty,debounce:N0,deprecatedPropType:$0,isMuiElement:L0,ownerDocument:Ll,ownerWindow:z0,requirePropFactory:B0,setRef:zl,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
|
+
`)),Ul.configure(e)}},unstable_useEnhancedEffect:Bl,unstable_useId:W0,unsupportedProp:H0,useControlled:U0,useEventCallback:V0,useForkRef:Y0,useIsFocusVisible:em},Symbol.toStringTag,{value:"Module"})));var Wu;function ht(){return Wu||(Wu=1,(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=ry})(la)),la}var Hu;function ny(){if(Hu)return no;Hu=1;var e=rt();Object.defineProperty(no,"__esModule",{value:!0}),no.default=void 0;var t=e(ht()),r=lt();return no.default=(0,t.default)((0,r.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),no}var oy=ny();const sy=tt(oy);var yo={},Uu;function iy(){if(Uu)return yo;Uu=1;var e=rt();Object.defineProperty(yo,"__esModule",{value:!0}),yo.default=void 0;var t=e(ht()),r=lt();return yo.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"),yo}var ay=iy();const cy=tt(ay);var bo={},Vu;function ly(){if(Vu)return bo;Vu=1;var e=rt();Object.defineProperty(bo,"__esModule",{value:!0}),bo.default=void 0;var t=e(ht()),r=lt();return bo.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"),bo}var uy=ly();const dy=tt(uy),fy=({header:e,sidebar:t,mainContent:r})=>{const[n,o]=v.useState(!1),[s,i]=v.useState(!1),a=()=>{o(!n)},c=()=>{i(!s)};return l.jsxs("div",{className:`${Er.dashboardContainer} ${s?Er.sidebarCollapsed:""}`,children:[l.jsxs("header",{className:Er.header,children:[l.jsx(m.IconButton,{onClick:a,className:Er.menuButton,children:l.jsx(sy,{})}),l.jsx("div",{className:Er.headerContent,children:e})]}),l.jsxs("aside",{className:`${Er.sidebar} ${n?Er.sidebarOpen:""}`,children:[l.jsx("div",{className:Er.sidebarContent,children:t}),l.jsx(m.IconButton,{onClick:c,className:Er.collapseButton,style:{display:"none"},children:s?l.jsx(dy,{}):l.jsx(cy,{})})]}),l.jsx("main",{className:Er.mainContent,children:r}),n&&l.jsx("div",{className:Er.overlay,onClick:a})]})},pn={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 Gs(){return typeof window<"u"}function zn(e){return Yu(e)?(e.nodeName||"").toLowerCase():"#document"}function ur(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Lr(e){var t;return(t=(Yu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Yu(e){return Gs()?e instanceof Node||e instanceof ur(e).Node:!1}function Qt(e){return Gs()?e instanceof Element||e instanceof ur(e).Element:!1}function zr(e){return Gs()?e instanceof HTMLElement||e instanceof ur(e).HTMLElement:!1}function qu(e){return!Gs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ur(e).ShadowRoot}const py=new Set(["inline","contents"]);function xo(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=vr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!py.has(o)}const hy=new Set(["table","td","th"]);function my(e){return hy.has(zn(e))}const gy=[":popover-open",":modal"];function Ks(e){return gy.some(t=>{try{return e.matches(t)}catch{return!1}})}const vy=["transform","translate","scale","rotate","perspective"],yy=["transform","translate","scale","rotate","perspective","filter"],by=["paint","layout","strict","content"];function Fa(e){const t=Wa(),r=Qt(e)?vr(e):e;return vy.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)||yy.some(n=>(r.willChange||"").includes(n))||by.some(n=>(r.contain||"").includes(n))}function xy(e){let t=on(e);for(;zr(t)&&!Bn(t);){if(Fa(t))return t;if(Ks(t))return null;t=on(t)}return null}function Wa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const _y=new Set(["html","body","#document"]);function Bn(e){return _y.has(zn(e))}function vr(e){return ur(e).getComputedStyle(e)}function Qs(e){return Qt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function on(e){if(zn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qu(e)&&e.host||Lr(e);return qu(t)?t.host:t}function Zu(e){const t=on(e);return Bn(t)?e.ownerDocument?e.ownerDocument.body:e.body:zr(t)&&xo(t)?t:Zu(t)}function _o(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Zu(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),i=ur(o);if(s){const a=Ha(i);return t.concat(i,i.visualViewport||[],xo(o)?o:[],a&&r?_o(a):[])}return t.concat(o,_o(o,[],r))}function Ha(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Fn=Math.min,hn=Math.max,Xs=Math.round,Js=Math.floor,Br=e=>({x:e,y:e}),wy={left:"right",right:"left",bottom:"top",top:"bottom"},Sy={start:"end",end:"start"};function Cy(e,t,r){return hn(e,Fn(t,r))}function ei(e,t){return typeof e=="function"?e(t):e}function Wn(e){return e.split("-")[0]}function wo(e){return e.split("-")[1]}function Ey(e){return e==="x"?"y":"x"}function Ua(e){return e==="y"?"height":"width"}const Dy=new Set(["top","bottom"]);function mn(e){return Dy.has(Wn(e))?"y":"x"}function Va(e){return Ey(mn(e))}function ky(e,t,r){r===void 0&&(r=!1);const n=wo(e),o=Va(e),s=Ua(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=ti(i)),[i,ti(i)]}function Ay(e){const t=ti(e);return[Ya(e),t,Ya(t)]}function Ya(e){return e.replace(/start|end/g,t=>Sy[t])}const Gu=["left","right"],Ku=["right","left"],Ty=["top","bottom"],Iy=["bottom","top"];function My(e,t,r){switch(e){case"top":case"bottom":return r?t?Ku:Gu:t?Gu:Ku;case"left":case"right":return t?Ty:Iy;default:return[]}}function Py(e,t,r,n){const o=wo(e);let s=My(Wn(e),r==="start",n);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Ya)))),s}function ti(e){return e.replace(/left|right|bottom|top/g,t=>wy[t])}function Oy(e){return{top:0,right:0,bottom:0,left:0,...e}}function Qu(e){return typeof e!="number"?Oy(e):{top:e,right:e,bottom:e,left:e}}function ri(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 jy=typeof document<"u",Ry=function(){},ni=jy?v.useLayoutEffect:Ry;const Ny={...K}.useInsertionEffect||(e=>e());function $y(e){const t=K.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Ny(()=>{t.current=e}),K.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 Xu(e,t,r){let{reference:n,floating:o}=e;const s=mn(t),i=Va(t),a=Ua(i),c=Wn(t),u=s==="y",d=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,h=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(wo(t)){case"start":y[i]-=h*(r&&u?-1:1);break;case"end":y[i]+=h*(r&&u?-1:1);break}return y}const Ly=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 u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=Xu(u,n,c),h=n,y={},g=0;for(let p=0;p<a.length;p++){const{name:b,fn:w}=a[p],{x:S,y:E,data:C,reset:_}=await w({x:d,y:f,initialPlacement:n,placement:h,strategy:o,middlewareData:y,rects:u,platform:i,elements:{reference:e,floating:t}});d=S??d,f=E??f,y={...y,[b]:{...y[b],...C}},_&&g<=50&&(g++,typeof _=="object"&&(_.placement&&(h=_.placement),_.rects&&(u=_.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):_.rects),{x:d,y:f}=Xu(u,h,c)),p=-1)}return{x:d,y:f,placement:h,strategy:o,middlewareData:y}};async function zy(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:y=0}=ei(t,e),g=Qu(y),b=a[h?f==="floating"?"reference":"floating":f],w=ri(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:u,rootBoundary:d,strategy:c})),S=f==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),C=await(s.isElement==null?void 0:s.isElement(E))?await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1}:{x:1,y:1},_=ri(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:S,offsetParent:E,strategy:c}):S);return{top:(w.top-_.top+g.top)/C.y,bottom:(_.bottom-w.bottom+g.bottom)/C.y,left:(w.left-_.left+g.left)/C.x,right:(_.right-w.right+g.right)/C.x}}const By=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:u,padding:d=0}=ei(e,t)||{};if(u==null)return{};const f=Qu(d),h={x:r,y:n},y=Va(o),g=Ua(y),p=await i.getDimensions(u),b=y==="y",w=b?"top":"left",S=b?"bottom":"right",E=b?"clientHeight":"clientWidth",C=s.reference[g]+s.reference[y]-h[y]-s.floating[g],_=h[y]-s.reference[y],W=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let D=W?W[E]:0;(!D||!await(i.isElement==null?void 0:i.isElement(W)))&&(D=a.floating[E]||s.floating[g]);const T=C/2-_/2,M=D/2-p[g]/2-1,I=Fn(f[w],M),H=Fn(f[S],M),G=I,F=D-p[g]-H,Y=D/2-p[g]/2+T,se=Cy(G,Y,F),U=!c.arrow&&wo(o)!=null&&Y!==se&&s.reference[g]/2-(Y<G?I:H)-p[g]/2<0,N=U?Y<G?Y-G:Y-F:0;return{[y]:h[y]+N,data:{[y]:se,centerOffset:Y-se-N,...U&&{alignmentOffset:N}},reset:U}}}),Fy=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:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...b}=ei(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const w=Wn(o),S=mn(a),E=Wn(a)===a,C=await(c.isRTL==null?void 0:c.isRTL(u.floating)),_=h||(E||!p?[ti(a)]:Ay(a)),W=g!=="none";!h&&W&&_.push(...Py(a,p,g,C));const D=[a,..._],T=await zy(t,b),M=[];let I=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&M.push(T[w]),f){const Y=ky(o,i,C);M.push(T[Y[0]],T[Y[1]])}if(I=[...I,{placement:o,overflows:M}],!M.every(Y=>Y<=0)){var H,G;const Y=(((H=s.flip)==null?void 0:H.index)||0)+1,se=D[Y];if(se&&(!(f==="alignment"?S!==mn(se):!1)||I.every(le=>mn(le.placement)===S?le.overflows[0]>0:!0)))return{data:{index:Y,overflows:I},reset:{placement:se}};let U=(G=I.filter(N=>N.overflows[0]<=0).sort((N,le)=>N.overflows[1]-le.overflows[1])[0])==null?void 0:G.placement;if(!U)switch(y){case"bestFit":{var F;const N=(F=I.filter(le=>{if(W){const de=mn(le.placement);return de===S||de==="y"}return!0}).map(le=>[le.placement,le.overflows.filter(de=>de>0).reduce((de,$)=>de+$,0)]).sort((le,de)=>le[1]-de[1])[0])==null?void 0:F[0];N&&(U=N);break}case"initialPlacement":U=a;break}if(o!==U)return{reset:{placement:U}}}return{}}}},Wy=new Set(["left","top"]);async function Hy(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=Wn(r),a=wo(r),c=mn(r)==="y",u=Wy.has(i)?-1:1,d=s&&c?-1:1,f=ei(t,e);let{mainAxis:h,crossAxis:y,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof g=="number"&&(y=a==="end"?g*-1:g),c?{x:y*d,y:h*u}:{x:h*u,y:y*d}}const Uy=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 Hy(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 Ju(e){const t=vr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=zr(e),s=o?e.offsetWidth:r,i=o?e.offsetHeight:n,a=Xs(r)!==s||Xs(n)!==i;return a&&(r=s,n=i),{width:r,height:n,$:a}}function qa(e){return Qt(e)?e:e.contextElement}function Hn(e){const t=qa(e);if(!zr(t))return Br(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=Ju(t);let i=(s?Xs(r.width):r.width)/n,a=(s?Xs(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Vy=Br(0);function ed(e){const t=ur(e);return!Wa()||!t.visualViewport?Vy:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Yy(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ur(e)?!1:t}function gn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=qa(e);let i=Br(1);t&&(n?Qt(n)&&(i=Hn(n)):i=Hn(e));const a=Yy(s,r,n)?ed(s):Br(0);let c=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(s){const h=ur(s),y=n&&Qt(n)?ur(n):n;let g=h,p=Ha(g);for(;p&&n&&y!==g;){const b=Hn(p),w=p.getBoundingClientRect(),S=vr(p),E=w.left+(p.clientLeft+parseFloat(S.paddingLeft))*b.x,C=w.top+(p.clientTop+parseFloat(S.paddingTop))*b.y;c*=b.x,u*=b.y,d*=b.x,f*=b.y,c+=E,u+=C,g=ur(p),p=Ha(g)}}return ri({width:d,height:f,x:c,y:u})}function oi(e,t){const r=Qs(e).scrollLeft;return t?t.left+r:gn(Lr(e)).left+r}function td(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-oi(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function qy(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",i=Lr(n),a=t?Ks(t.floating):!1;if(n===i||a&&s)return r;let c={scrollLeft:0,scrollTop:0},u=Br(1);const d=Br(0),f=zr(n);if((f||!f&&!s)&&((zn(n)!=="body"||xo(i))&&(c=Qs(n)),zr(n))){const y=gn(n);u=Hn(n),d.x=y.x+n.clientLeft,d.y=y.y+n.clientTop}const h=i&&!f&&!s?td(i,c):Br(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+h.x,y:r.y*u.y-c.scrollTop*u.y+d.y+h.y}}function Zy(e){return Array.from(e.getClientRects())}function Gy(e){const t=Lr(e),r=Qs(e),n=e.ownerDocument.body,o=hn(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=hn(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+oi(e);const a=-r.scrollTop;return vr(n).direction==="rtl"&&(i+=hn(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:i,y:a}}const rd=25;function Ky(e,t){const r=ur(e),n=Lr(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=Wa();(!d||d&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}const u=oi(n);if(u<=0){const d=n.ownerDocument,f=d.body,h=getComputedStyle(f),y=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(n.clientWidth-f.clientWidth-y);g<=rd&&(s-=g)}else u<=rd&&(s+=u);return{width:s,height:i,x:a,y:c}}const Qy=new Set(["absolute","fixed"]);function Xy(e,t){const r=gn(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=zr(e)?Hn(e):Br(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,u=n*s.y;return{width:i,height:a,x:c,y:u}}function nd(e,t,r){let n;if(t==="viewport")n=Ky(e,r);else if(t==="document")n=Gy(Lr(e));else if(Qt(t))n=Xy(t,r);else{const o=ed(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ri(n)}function od(e,t){const r=on(e);return r===t||!Qt(r)||Bn(r)?!1:vr(r).position==="fixed"||od(r,t)}function Jy(e,t){const r=t.get(e);if(r)return r;let n=_o(e,[],!1).filter(a=>Qt(a)&&zn(a)!=="body"),o=null;const s=vr(e).position==="fixed";let i=s?on(e):e;for(;Qt(i)&&!Bn(i);){const a=vr(i),c=Fa(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&Qy.has(o.position)||xo(i)&&!c&&od(e,i))?n=n.filter(d=>d!==i):o=a,i=on(i)}return t.set(e,n),n}function eb(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?Ks(t)?[]:Jy(t,this._c):[].concat(r),n],a=i[0],c=i.reduce((u,d)=>{const f=nd(t,d,o);return u.top=hn(f.top,u.top),u.right=Fn(f.right,u.right),u.bottom=Fn(f.bottom,u.bottom),u.left=hn(f.left,u.left),u},nd(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function tb(e){const{width:t,height:r}=Ju(e);return{width:t,height:r}}function rb(e,t,r){const n=zr(t),o=Lr(t),s=r==="fixed",i=gn(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Br(0);function u(){c.x=oi(o)}if(n||!n&&!s)if((zn(t)!=="body"||xo(o))&&(a=Qs(t)),n){const y=gn(t,!0,s,t);c.x=y.x+t.clientLeft,c.y=y.y+t.clientTop}else o&&u();s&&!n&&o&&u();const d=o&&!n&&!s?td(o,a):Br(0),f=i.left+a.scrollLeft-c.x-d.x,h=i.top+a.scrollTop-c.y-d.y;return{x:f,y:h,width:i.width,height:i.height}}function Za(e){return vr(e).position==="static"}function sd(e,t){if(!zr(e)||vr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Lr(e)===r&&(r=r.ownerDocument.body),r}function id(e,t){const r=ur(e);if(Ks(e))return r;if(!zr(e)){let o=on(e);for(;o&&!Bn(o);){if(Qt(o)&&!Za(o))return o;o=on(o)}return r}let n=sd(e,t);for(;n&&my(n)&&Za(n);)n=sd(n,t);return n&&Bn(n)&&Za(n)&&!Fa(n)?r:n||xy(e)||r}const nb=async function(e){const t=this.getOffsetParent||id,r=this.getDimensions,n=await r(e.floating);return{reference:rb(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function ob(e){return vr(e).direction==="rtl"}const sb={convertOffsetParentRelativeRectToViewportRelativeRect:qy,getDocumentElement:Lr,getClippingRect:eb,getOffsetParent:id,getElementRects:nb,getClientRects:Zy,getDimensions:tb,getScale:Hn,isElement:Qt,isRTL:ob};function ad(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ib(e,t){let r=null,n;const o=Lr(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 u=e.getBoundingClientRect(),{left:d,top:f,width:h,height:y}=u;if(a||t(),!h||!y)return;const g=Js(f),p=Js(o.clientWidth-(d+h)),b=Js(o.clientHeight-(f+y)),w=Js(d),E={rootMargin:-g+"px "+-p+"px "+-b+"px "+-w+"px",threshold:hn(0,Fn(1,c))||1};let C=!0;function _(W){const D=W[0].intersectionRatio;if(D!==c){if(!C)return i();D?i(!1,D):n=setTimeout(()=>{i(!1,1e-7)},1e3)}D===1&&!ad(u,e.getBoundingClientRect())&&i(),C=!1}try{r=new IntersectionObserver(_,{...E,root:o.ownerDocument})}catch{r=new IntersectionObserver(_,E)}r.observe(e)}return i(!0),s}function ab(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,u=qa(e),d=o||s?[...u?_o(u):[],..._o(t)]:[];d.forEach(w=>{o&&w.addEventListener("scroll",r,{passive:!0}),s&&w.addEventListener("resize",r)});const f=u&&a?ib(u,r):null;let h=-1,y=null;i&&(y=new ResizeObserver(w=>{let[S]=w;S&&S.target===u&&y&&(y.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var E;(E=y)==null||E.observe(t)})),r()}),u&&!c&&y.observe(u),y.observe(t));let g,p=c?gn(e):null;c&&b();function b(){const w=gn(e);p&&!ad(p,w)&&r(),p=w,g=requestAnimationFrame(b)}return r(),()=>{var w;d.forEach(S=>{o&&S.removeEventListener("scroll",r),s&&S.removeEventListener("resize",r)}),f?.(),(w=y)==null||w.disconnect(),y=null,c&&cancelAnimationFrame(g)}}const cb=Uy,lb=Fy,cd=By,ub=(e,t,r)=>{const n=new Map,o={platform:sb,...r},s={...o.platform,_c:n};return Ly(e,t,{...o,platform:s})};var db=typeof document<"u",fb=function(){},si=db?v.useLayoutEffect:fb;function ii(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(!ii(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)&&!ii(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ld(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ud(e,t){const r=ld(e);return Math.round(t*r)/r}function Ga(e){const t=K.useRef(e);return si(()=>{t.current=e}),t}function pb(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:u}=e,[d,f]=K.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,y]=K.useState(n);ii(h,n)||y(n);const[g,p]=K.useState(null),[b,w]=K.useState(null),S=K.useCallback(le=>{le!==W.current&&(W.current=le,p(le))},[]),E=K.useCallback(le=>{le!==D.current&&(D.current=le,w(le))},[]),C=s||g,_=i||b,W=K.useRef(null),D=K.useRef(null),T=K.useRef(d),M=c!=null,I=Ga(c),H=Ga(o),G=Ga(u),F=K.useCallback(()=>{if(!W.current||!D.current)return;const le={placement:t,strategy:r,middleware:h};H.current&&(le.platform=H.current),ub(W.current,D.current,le).then(de=>{const $={...de,isPositioned:G.current!==!1};Y.current&&!ii(T.current,$)&&(T.current=$,m0.flushSync(()=>{f($)}))})},[h,t,r,H,G]);si(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(le=>({...le,isPositioned:!1})))},[u]);const Y=K.useRef(!1);si(()=>(Y.current=!0,()=>{Y.current=!1}),[]),si(()=>{if(C&&(W.current=C),_&&(D.current=_),C&&_){if(I.current)return I.current(C,_,F);F()}},[C,_,F,I,M]);const se=K.useMemo(()=>({reference:W,floating:D,setReference:S,setFloating:E}),[S,E]),U=K.useMemo(()=>({reference:C,floating:_}),[C,_]),N=K.useMemo(()=>{const le={position:r,left:0,top:0};if(!U.floating)return le;const de=ud(U.floating,d.x),$=ud(U.floating,d.y);return a?{...le,transform:"translate("+de+"px, "+$+"px)",...ld(U.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:de,top:$}},[r,a,U.floating,d.x,d.y]);return K.useMemo(()=>({...d,update:F,refs:se,elements:U,floatingStyles:N}),[d,F,se,U,N])}const hb=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?cd({element:n.current,padding:o}).fn(r):{}:n?cd({element:n,padding:o}).fn(r):{}}}},mb=(e,t)=>({...cb(e),options:[e,t]}),gb=(e,t)=>({...lb(e),options:[e,t]}),vb=(e,t)=>({...hb(e),options:[e,t]}),yb={...K};let dd=!1,bb=0;const fd=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+bb++;function xb(){const[e,t]=K.useState(()=>dd?fd():void 0);return ni(()=>{e==null&&t(fd())},[]),K.useEffect(()=>{dd=!0},[]),e}const pd=yb.useId||xb;let So;process.env.NODE_ENV!=="production"&&(So=new Set);function _b(){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=So)!=null&&e.has(o))){var s;(s=So)==null||s.add(o),console.warn(o)}}function wb(){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=So)!=null&&e.has(o))){var s;(s=So)==null||s.add(o),console.error(o)}}const Sb=K.forwardRef(function(t,r){const{context:{placement:n,elements:{floating:o},middlewareData:{arrow:s,shift:i}},width:a=14,height:c=7,tipRadius:u=0,strokeWidth:d=0,staticOffset:f,stroke:h,d:y,style:{transform:g,...p}={},...b}=t;process.env.NODE_ENV!=="production"&&(r||_b("The `ref` prop is required for `FloatingArrow`."));const w=pd(),[S,E]=K.useState(!1);if(ni(()=>{if(!o)return;vr(o).direction==="rtl"&&E(!0)},[o]),!o)return null;const[C,_]=n.split("-"),W=C==="top"||C==="bottom";let D=f;(W&&i!=null&&i.x||!W&&i!=null&&i.y)&&(D=null);const T=d*2,M=T/2,I=a/2*(u/-8+1),H=c/2*u/4,G=!!y,F=D&&_==="end"?"bottom":"top";let Y=D&&_==="end"?"right":"left";D&&S&&(Y=_==="end"?"left":"right");const se=s?.x!=null?D||s.x:"",U=s?.y!=null?D||s.y:"",N=y||"M0,0"+(" H"+a)+(" L"+(a-I)+","+(c-H))+(" Q"+a/2+","+c+" "+I+","+(c-H))+" Z",le={top:G?"rotate(180deg)":"",left:G?"rotate(90deg)":"rotate(-90deg)",bottom:G?"":"rotate(180deg)",right:G?"rotate(-90deg)":"rotate(90deg)"}[C];return l.jsxs("svg",{...b,"aria-hidden":!0,ref:r,width:G?a:a+T,height:a,viewBox:"0 0 "+a+" "+(c>a?c:a),style:{position:"absolute",pointerEvents:"none",[Y]:se,[F]:U,[C]:W||G?"100%":"calc(100% - "+T/2+"px)",transform:[le,g].filter(de=>!!de).join(" "),...p},children:[T>0&&l.jsx("path",{clipPath:"url(#"+w+")",fill:"none",stroke:h,strokeWidth:T+(y?0:1),d:N}),l.jsx("path",{stroke:T&&!y?b.fill:"none",d:N}),l.jsx("clipPath",{id:w,children:l.jsx("rect",{x:-M,y:M*(G?-1:1),width:a+T,height:a})})]})});function Cb(){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 Eb=K.createContext(null),Db=K.createContext(null),kb=()=>{var e;return((e=K.useContext(Eb))==null?void 0:e.id)||null},Ab=()=>K.useContext(Db);function Tb(e){const{open:t=!1,onOpenChange:r,elements:n}=e,o=pd(),s=K.useRef({}),[i]=K.useState(()=>Cb()),a=kb()!=null;if(process.env.NODE_ENV!=="production"){const y=n.reference;y&&!Qt(y)&&wb("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,u]=K.useState(n.reference),d=$y((y,g,p)=>{s.current.openEvent=y?g:void 0,i.emit("openchange",{open:y,event:g,reason:p,nested:a}),r?.(y,g,p)}),f=K.useMemo(()=>({setPositionReference:u}),[]),h=K.useMemo(()=>({reference:c||n.reference||null,floating:n.floating||null,domReference:n.reference}),[c,n.reference,n.floating]);return K.useMemo(()=>({dataRef:s,open:t,onOpenChange:d,elements:h,events:i,floatingId:o,refs:f}),[t,d,h,i,o,f])}function Ib(e){e===void 0&&(e={});const{nodeId:t}=e,r=Tb({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,o=n.elements,[s,i]=K.useState(null),[a,c]=K.useState(null),d=o?.domReference||s,f=K.useRef(null),h=Ab();ni(()=>{d&&(f.current=d)},[d]);const y=pb({...e,elements:{...o,...a&&{reference:a}}}),g=K.useCallback(E=>{const C=Qt(E)?{getBoundingClientRect:()=>E.getBoundingClientRect(),getClientRects:()=>E.getClientRects(),contextElement:E}:E;c(C),y.refs.setReference(C)},[y.refs]),p=K.useCallback(E=>{(Qt(E)||E===null)&&(f.current=E,i(E)),(Qt(y.refs.reference.current)||y.refs.reference.current===null||E!==null&&!Qt(E))&&y.refs.setReference(E)},[y.refs]),b=K.useMemo(()=>({...y.refs,setReference:p,setPositionReference:g,domReference:f}),[y.refs,p,g]),w=K.useMemo(()=>({...y.elements,domReference:d}),[y.elements,d]),S=K.useMemo(()=>({...y,...n,refs:b,elements:w,nodeId:t}),[y,b,w,t,n]);return ni(()=>{n.dataRef.current.floatingContext=S;const E=h?.nodesRef.current.find(C=>C.id===t);E&&(E.context=S)}),K.useMemo(()=>({...y,context:S,refs:b,elements:w}),[y,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 Ga=function(t,r){return Ga=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])},Ga(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");Ga(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var He=function(){return He=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},He.apply(this,arguments)};function Br(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 Ib=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)},Mb=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},ii=function(e){var t=e.children,r=e.onClickOutside,n=e.className,o=e.containerRef,s=e.style,i=e.ignoreClass,a=Mb(r,i);return y.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 pd(){var e=typeof window<"u"?window:globalThis;return e}var Co=12;function st(e){if(e==null)return new Date;var t=typeof e=="string"?x.parseISO(e):x.toDate(e);return ai(t)?t:new Date}function Ka(e,t,r,n,o){o===void 0&&(o=st());for(var s=Hn(r)||Hn(Xa()),i=Array.isArray(t)?t:[t],a=0,c=i;a<c.length;a++){var u=c[a],d=x.parse(e,u,o,{locale:s,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});if(ai(d)&&(!n||e===yt(d,u,r)))return d}return null}function ai(e,t){return x.isValid(e)&&!x.isBefore(e,new Date("1/1/1800"))}function yt(e,t,r){if(r==="en")return x.format(e,t,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var n=r?Hn(r):void 0;return r&&!n&&console.warn('A locale object was not found for the provided string ["'.concat(r,'"].')),n=n||Hn(Xa()),x.format(e,t,{locale:n,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function yr(e,t){var r=t.dateFormat,n=t.locale,o=Array.isArray(r)&&r.length>0?r[0]:r;return e&&yt(e,o,n)||""}var hd=" - ";function Pb(e,t,r){if(!e&&!t)return"";var n=e?yr(e,r):"",o=t?yr(t,r):"",s=r.rangeSeparator||hd;return"".concat(n).concat(s).concat(o)}function Ob(e,t){if(!e?.length)return"";var r=e[0]?yr(e[0],t):"";if(e.length===1)return r;if(e.length===2&&e[1]){var n=yr(e[1],t);return"".concat(r,", ").concat(n)}var o=e.length-1;return"".concat(r," (+").concat(o,")")}function Qa(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 x.setHours(x.setMinutes(x.setSeconds(e,a),s),n)}function jb(e){return x.getISOWeek(e)}function Rb(e,t){return yt(e,"ddd",t)}function ci(e){return x.startOfDay(e)}function on(e,t,r){var n=Hn(t||Xa());return x.startOfWeek(e,{locale:n,weekStartsOn:r})}function Zr(e){return x.startOfMonth(e)}function Eo(e){return x.startOfYear(e)}function md(e){return x.startOfQuarter(e)}function gd(){return x.startOfDay(st())}function vd(e){return x.endOfDay(e)}function Nb(e){return x.endOfWeek(e)}function $b(e){return x.endOfMonth(e)}function Fr(e,t){return e&&t?x.isSameYear(e,t):!e&&!t}function tr(e,t){return e&&t?x.isSameMonth(e,t):!e&&!t}function li(e,t){return e&&t?x.isSameQuarter(e,t):!e&&!t}function Ve(e,t){return e&&t?x.isSameDay(e,t):!e&&!t}function gn(e,t){return e&&t?x.isEqual(e,t):!e&&!t}function vn(e,t,r){var n,o=x.startOfDay(t),s=x.endOfDay(r);try{n=x.isWithinInterval(e,{start:o,end:s})}catch{n=!1}return n}function Xa(){var e=pd();return e.__localeId__}function Hn(e){if(typeof e=="string"){var t=pd();return t.__localeData__?t.__localeData__[e]:void 0}else return e}function Lb(e,t,r){return t(yt(e,"EEEE",r))}function zb(e,t){return yt(e,"EEEEEE",t)}function Bb(e,t){return yt(e,"EEE",t)}function Ja(e,t){return yt(x.setMonth(st(),e),"LLLL",t)}function yd(e,t){return yt(x.setMonth(st(),e),"LLL",t)}function Fb(e,t){return yt(x.setQuarter(st(),e),"QQQ",t)}function br(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,u=r.filterDate;return Do(e,{minDate:n,maxDate:o})||s&&s.some(function(d){return d instanceof Date?Ve(e,d):Ve(e,d.date)})||i&&i.some(function(d){var f=d.start,h=d.end;return x.isWithinInterval(e,{start:f,end:h})})||a&&!a.some(function(d){return Ve(e,d)})||c&&!c.some(function(d){var f=d.start,h=d.end;return x.isWithinInterval(e,{start:f,end:h})})||u&&!u(st(e))||!1}function ec(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 x.isWithinInterval(e,{start:i,end:a})}):n&&n.some(function(s){var i;return s instanceof Date?Ve(e,s):Ve(e,(i=s.date)!==null&&i!==void 0?i:new Date)})||!1}function bd(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.includeDates,a=r.filterDate;return Do(e,{minDate:n?x.startOfMonth(n):void 0,maxDate:o?x.endOfMonth(o):void 0})||s?.some(function(c){return tr(e,c instanceof Date?c:c.date)})||i&&!i.some(function(c){return tr(e,c)})||a&&!a(st(e))||!1}function ui(e,t,r,n){var o=x.getYear(e),s=x.getMonth(e),i=x.getYear(t),a=x.getMonth(t),c=x.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 Wb(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.includeDates;return Do(e,{minDate:n,maxDate:o})||s&&s.some(function(a){return tr(a instanceof Date?a:a.date,e)})||i&&!i.some(function(a){return tr(a,e)})||!1}function di(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.includeDates,a=r.filterDate;return Do(e,{minDate:n,maxDate:o})||s?.some(function(c){return li(e,c instanceof Date?c:c.date)})||i&&!i.some(function(c){return li(e,c)})||a&&!a(st(e))||!1}function fi(e,t,r){if(!t||!r||!x.isValid(t)||!x.isValid(r))return!1;var n=x.getYear(t),o=x.getYear(r);return n<=e&&o>=e}function pi(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 Do(c,{minDate:n?x.startOfYear(n):void 0,maxDate:o?x.endOfYear(o):void 0})||s?.some(function(u){return Fr(c,u instanceof Date?u:u.date)})||i&&!i.some(function(u){return Fr(c,u)})||a&&!a(st(c))||!1}function hi(e,t,r,n){var o=x.getYear(e),s=x.getQuarter(e),i=x.getYear(t),a=x.getQuarter(t),c=x.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 Do(e,t){var r,n=t===void 0?{}:t,o=n.minDate,s=n.maxDate;return(r=o&&x.differenceInCalendarDays(e,o)<0||s&&x.differenceInCalendarDays(e,s)>0)!==null&&r!==void 0?r:!1}function xd(e,t){return t.some(function(r){return x.getHours(r)===x.getHours(e)&&x.getMinutes(r)===x.getMinutes(e)&&x.getSeconds(r)===x.getSeconds(e)})}function _d(e,t){var r=t===void 0?{}:t,n=r.excludeTimes,o=r.includeTimes,s=r.filterTime;return n&&xd(e,n)||o&&!xd(e,o)||s&&!s(e)||!1}function wd(e,t){var r=t.minTime,n=t.maxTime;if(!r||!n)throw new Error("Both minTime and maxTime props required");var o=st();o=x.setHours(o,x.getHours(e)),o=x.setMinutes(o,x.getMinutes(e)),o=x.setSeconds(o,x.getSeconds(e));var s=st();s=x.setHours(s,x.getHours(r)),s=x.setMinutes(s,x.getMinutes(r)),s=x.setSeconds(s,x.getSeconds(r));var i=st();i=x.setHours(i,x.getHours(n)),i=x.setMinutes(i,x.getMinutes(n)),i=x.setSeconds(i,x.getSeconds(n));var a;try{a=!x.isWithinInterval(o,{start:s,end:i})}catch{a=!1}return a}function Sd(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.includeDates,s=x.subMonths(e,1);return n&&x.differenceInCalendarMonths(n,s)>0||o&&o.every(function(i){return x.differenceInCalendarMonths(i,s)>0})||!1}function Cd(e,t){var r=t===void 0?{}:t,n=r.maxDate,o=r.includeDates,s=x.addMonths(e,1);return n&&x.differenceInCalendarMonths(s,n)>0||o&&o.every(function(i){return x.differenceInCalendarMonths(s,i)>0})||!1}function Ub(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.includeDates,s=x.startOfYear(e),i=x.subQuarters(s,1);return n&&x.differenceInCalendarQuarters(n,i)>0||o&&o.every(function(a){return x.differenceInCalendarQuarters(a,i)>0})||!1}function Hb(e,t){var r=t===void 0?{}:t,n=r.maxDate,o=r.includeDates,s=x.endOfYear(e),i=x.addQuarters(s,1);return n&&x.differenceInCalendarQuarters(i,n)>0||o&&o.every(function(a){return x.differenceInCalendarQuarters(i,a)>0})||!1}function Ed(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.includeDates,s=x.subYears(e,1);return n&&x.differenceInCalendarYears(n,s)>0||o&&o.every(function(i){return x.differenceInCalendarYears(i,s)>0})||!1}function Vb(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.yearItemNumber,s=o===void 0?Co:o,i=Eo(x.subYears(e,s)),a=Gr(i,s).endPeriod,c=n&&x.getYear(n);return c&&c>a||!1}function Dd(e,t){var r=t===void 0?{}:t,n=r.maxDate,o=r.includeDates,s=x.addYears(e,1);return n&&x.differenceInCalendarYears(s,n)>0||o&&o.every(function(i){return x.differenceInCalendarYears(s,i)>0})||!1}function Yb(e,t){var r=t===void 0?{}:t,n=r.maxDate,o=r.yearItemNumber,s=o===void 0?Co:o,i=x.addYears(e,s),a=Gr(i,s).startPeriod,c=n&&x.getYear(n);return c&&c<a||!1}function kd(e){var t=e.minDate,r=e.includeDates;if(r&&t){var n=r.filter(function(o){return x.differenceInCalendarDays(o,t)>=0});return x.min(n)}else return r?x.min(r):t}function Ad(e){var t=e.maxDate,r=e.includeDates;if(r&&t){var n=r.filter(function(o){return x.differenceInCalendarDays(o,t)<=0});return x.max(n)}else return r?x.max(r):t}function Td(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(x.isDate(i)){var a=yt(i,"MM.dd.yyyy"),c=n.get(a)||[];c.includes(t)||(c.push(t),n.set(a,c))}else if(typeof i=="object"){var u=Object.keys(i),d=(r=u[0])!==null&&r!==void 0?r:"",f=i[d];if(typeof d=="string"&&Array.isArray(f))for(var h=0,v=f.length;h<v;h++){var m=f[h];if(m){var a=yt(m,"MM.dd.yyyy"),c=n.get(a)||[];c.includes(d)||(c.push(d),n.set(a,c))}}}}return n}function qb(e,t){return e.length!==t.length?!1:e.every(function(r,n){return r===t[n]})}function Zb(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(x.isDate(o)){var i=yt(o,"MM.dd.yyyy"),a=r.get(i)||{className:"",holidayNames:[]};if(!("className"in a&&a.className===t&&qb(a.holidayNames,[s]))){a.className=t;var c=a.holidayNames;a.holidayNames=c?Br(Br([],c,!0),[s],!1):[s],r.set(i,a)}}}),r}function Gb(e,t,r,n,o){for(var s=o.length,i=[],a=0;a<s;a++){var c=e,u=o[a];u&&(c=x.addHours(c,x.getHours(u)),c=x.addMinutes(c,x.getMinutes(u)),c=x.addSeconds(c,x.getSeconds(u)));var d=x.addMinutes(e,(r+1)*n);x.isAfter(c,t)&&x.isBefore(c,d)&&u!=null&&i.push(u)}return i}function Id(e){return e<10?"0".concat(e):"".concat(e)}function Gr(e,t){t===void 0&&(t=Co);var r=Math.ceil(x.getYear(e)/t)*t,n=r-(t-1);return{startPeriod:n,endPeriod:r}}function Kb(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 Md(e){var t=e.getSeconds(),r=e.getMilliseconds();return x.toDate(e.getTime()-t*1e3-r)}function Qb(e,t){return Md(e).getTime()===Md(t).getTime()}function Pd(e){if(!x.isDate(e))throw new Error("Invalid date");var t=new Date(e);return t.setHours(0,0,0,0),t}function tc(e,t){if(!x.isDate(e)||!x.isDate(t))throw new Error("Invalid date received");var r=Pd(e),n=Pd(t);return x.isBefore(r,n)}function Od(e){return e.key===ve.Space}var Xb=(function(e){Zt(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),u=c?a:new Date;if(o?.includes(":")){var d=o.split(":"),f=d[0],h=d[1];u.setHours(Number(f)),u.setMinutes(Number(h))}(i=(s=n.props).onChange)===null||i===void 0||i.call(s,u)},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 u;(u=n.inputRef.current)===null||u===void 0||u.focus()},required:!0,value:o,onChange:function(u){n.onTimeChange(u.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),Jb=(function(e){Zt(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===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 Ve(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),br(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 ec(r.props.day,{excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals})},r.isStartOfWeek=function(){return Ve(r.props.day,on(r.props.day,r.props.locale,r.props.calendarStartDay))},r.isSameWeek=function(n){return r.props.showWeekPicker&&Ve(n,on(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=yt(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=yt(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:vn(o,s,i)},r.isInSelectingRange=function(){var n,o=r.props,s=o.day,i=o.selectsStart,a=o.selectsEnd,c=o.selectsRange,u=o.selectsDisabledDaysInRange,d=o.startDate,f=o.swapRange,h=o.endDate,v=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;if(!(i||a||c)||!v||!u&&r.isDisabled())return!1;if(i&&h&&(x.isBefore(v,h)||gn(v,h)))return vn(s,v,h);if(a&&d&&(x.isAfter(v,d)||gn(v,d)))return vn(s,d,v);if(c&&d&&!h){if(gn(v,d)||x.isAfter(v,d))return vn(s,d,v);if(f&&x.isBefore(v,d))return vn(s,v,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,u=o.selectsRange,d=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;return a?Ve(s,d):u&&c&&i&&d?Ve(s,x.isBefore(d,i)?d:i):Ve(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,u=o.swapRange,d=o.startDate,f=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;return a?Ve(s,f):c&&u&&d&&f?Ve(s,x.isBefore(f,d)?d:f):c?Ve(s,f):Ve(s,i)},r.isRangeStart=function(){var n=r.props,o=n.day,s=n.startDate,i=n.endDate;return!s||!i?!1:Ve(s,o)},r.isRangeEnd=function(){var n=r.props,o=n.day,s=n.startDate,i=n.endDate;return!s||!i?!1:Ve(i,o)},r.isWeekend=function(){var n=x.getDay(r.props.day);return n===0||n===6},r.isAfterMonth=function(){return r.props.month!==void 0&&(r.props.month+1)%12===x.getMonth(r.props.day)},r.isBeforeMonth=function(){return r.props.month!==void 0&&(x.getMonth(r.props.day)+1)%12===r.props.month},r.isCurrentDay=function(){return r.isSameDay(st())},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 Vt("react-datepicker__day",o,"react-datepicker__day--"+Rb(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,u=r.isDisabled()||r.isExcluded()?c:i;return"".concat(u," ").concat(yt(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=yt(o,"MM.dd.yyyy"),u=[];return i.has(c)&&u.push.apply(u,i.get(c).holidayNames),r.isExcluded()&&u.push(a?.filter(function(d){return d instanceof Date?Ve(d,o):Ve(d?.date,o)}).map(function(d){if(!(d instanceof Date))return d?.message})),u.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)&&Ve(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(x.getDate(r.props.day),r.props.day):x.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),e2=(function(e){Zt(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===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&&!Ve(r.props.date,r.props.selected)&&Ve(r.props.date,r.props.preSelection)},r.getTabIndex=function(){return r.props.showWeekPicker&&r.props.showWeekNumber&&(r.isKeyboardSelected()||Ve(r.props.date,r.props.selected)&&Ve(r.props.preSelection,r.props.selected))?0:-1},r.handleFocusWeekNumber=function(n){var o=!1;r.getTabIndex()===0&&!n?.isInputFocused&&Ve(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&&Ve(this.props.date,this.props.selected)};return y.createElement("div",{ref:this.weekNumberEl,className:Vt(c),"aria-label":"".concat(i," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex(),role:"gridcell"},n)},t})(y.Component),t2=(function(e){Zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.isDisabled=function(n){return br(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,u=new Date(n),d=0;d<7;d++){var f=new Date(n);f.setDate(f.getDate()+d);var h=!r.isDisabled(f);if(h){u=f;break}}typeof r.props.onWeekSelect=="function"&&r.props.onWeekSelect(u,o,s),r.props.showWeekPicker&&r.handleDayClick(u,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):jb(n)},r.isWeekDisabled=function(){for(var n=r.startOfWeek(),o=x.addDays(n,6),s=new Date(n);s<=o;){if(!r.isDisabled(s))return!1;s=x.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(e2,He({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=x.addDays(n,a);return y.createElement(Jb,He({},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 on(r.props.day,r.props.locale,r.props.calendarStartDay)},r.isKeyboardSelected=function(){return!r.props.disabledKeyboardNavigation&&!Ve(r.startOfWeek(),r.props.selected)&&Ve(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":Ve(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:Vt(r,n),role:"row"},this.renderDays())},t})(y.Component),ko,r2=6,Vn={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},rc=(ko={},ko[Vn.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},ko[Vn.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},ko[Vn.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},ko),mi=1;function jd(e,t){return e?Vn.FOUR_COLUMNS:t?Vn.TWO_COLUMNS:Vn.THREE_COLUMNS}var n2=(function(e){Zt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.MONTH_REFS=Br([],Array(12),!0).map(function(){return y.createRef()}),r.QUARTER_REFS=Br([],Array(4),!0).map(function(){return y.createRef()}),r.isDisabled=function(n){return br(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 ec(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:tr(x.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:li(x.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:tr(x.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:li(x.setQuarter(s,n),a)},r.isInSelectingRangeMonth=function(n){var o,s=r.props,i=s.day,a=s.selectsStart,c=s.selectsEnd,u=s.selectsRange,d=s.startDate,f=s.endDate,h=(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection;return!(a||c||u)||!h?!1:a&&f?ui(h,f,n,i):c&&d||u&&d&&!f?ui(d,h,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,u=x.setMonth(i,n),d=(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection;return c?tr(u,d):tr(u,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,u=s.selectsRange,d=x.setMonth(i,n),f=(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection;return c||u?tr(d,f):tr(d,a)},r.isInSelectingRangeQuarter=function(n){var o,s=r.props,i=s.day,a=s.selectsStart,c=s.selectsEnd,u=s.selectsRange,d=s.startDate,f=s.endDate,h=(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection;return!(a||c||u)||!h?!1:a&&f?hi(h,f,n,i):c&&d||u&&d&&!f?hi(d,h,n,i):!1},r.isWeekInMonth=function(n){var o=r.props.day,s=x.addDays(n,6);return tr(n,o)||tr(s,o)},r.isCurrentMonth=function(n,o){return x.getYear(n)===x.getYear(st())&&o===x.getMonth(st())},r.isCurrentQuarter=function(n,o){return x.getYear(n)===x.getYear(st())&&o===x.getQuarter(st())},r.isSelectedMonth=function(n,o,s){return x.getMonth(s)===o&&x.getYear(n)===x.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 x.getQuarter(n)===o&&x.getYear(n)===x.getYear(s)},r.isMonthSelected=function(){var n=r.props,o=n.day,s=n.selected,i=n.selectedDates,a=n.selectsMultiple,c=x.getMonth(o);return a?i?.some(function(u){return r.isSelectedMonth(o,c,u)}):!!s&&r.isSelectedMonth(o,c,s)},r.renderWeeks=function(){for(var n=[],o=r.props.fixedHeight,s=0,i=!1,a=on(Zr(r.props.day),r.props.locale,r.props.calendarStartDay),c=function(m){return r.props.showWeekPicker?on(m,r.props.locale,r.props.calendarStartDay):r.props.preSelection},u=function(m){return r.props.showWeekPicker?on(m,r.props.locale,r.props.calendarStartDay):r.props.selected},d=r.props.selected?u(r.props.selected):void 0,f=r.props.preSelection?c(r.props.preSelection):void 0;n.push(y.createElement(t2,He({},r.props,{ariaLabelPrefix:r.props.weekAriaLabelPrefix,key:s,day:a,month:x.getMonth(r.props.day),onDayClick:r.handleDayClick,onDayMouseEnter:r.handleDayMouseEnter,selected:d,preSelection:f,showWeekNumber:r.props.showWeekNumbers}))),!i;){s++,a=x.addWeeks(a,1);var h=o&&s>=r2,v=!o&&!r.isWeekInMonth(a);if(h||v)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(Zr(a),n)},r.onMonthMouseEnter=function(n){var o=r.isMonthDisabledForLabelDate(n),s=o.isDisabled,i=o.labelDate;s||r.handleDayMouseEnter(Zr(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,u=a.preSelection,d=a.setPreSelection,f=a.minDate,h=a.maxDate,v=a.showFourColumnMonthYearPicker,m=a.showTwoColumnMonthYearPicker;if(u){var p=jd(v,m),b=r.getVerticalOffset(p),w=(i=rc[p])===null||i===void 0?void 0:i.grid,C=function(D,A,M){var I,V,G=A,F=M;switch(D){case ve.ArrowRight:G=x.addMonths(A,mi),F=M===11?0:M+mi;break;case ve.ArrowLeft:G=x.subMonths(A,mi),F=M===0?11:M-mi;break;case ve.ArrowUp:G=x.subMonths(A,b),F=!((I=w?.[0])===null||I===void 0)&&I.includes(M)?M+12-b:M-b;break;case ve.ArrowDown:G=x.addMonths(A,b),F=!((V=w?.[w.length-1])===null||V===void 0)&&V.includes(M)?M-12+b:M+b;break}return{newCalculatedDate:G,newCalculatedMonth:F}},E=function(D,A,M){for(var I=40,V=D,G=!1,F=0,Y=C(V,A,M),oe=Y.newCalculatedDate,U=Y.newCalculatedMonth;!G;){if(F>=I){oe=A,U=M;break}if(f&&oe<f){V=ve.ArrowRight;var N=C(V,oe,U);oe=N.newCalculatedDate,U=N.newCalculatedMonth}if(h&&oe>h){V=ve.ArrowLeft;var N=C(V,oe,U);oe=N.newCalculatedDate,U=N.newCalculatedMonth}if(Wb(oe,r.props)){var N=C(V,oe,U);oe=N.newCalculatedDate,U=N.newCalculatedMonth}else G=!0;F++}return{newCalculatedDate:oe,newCalculatedMonth:U}};if(o===ve.Enter){r.isMonthDisabled(s)||(r.onMonthClick(n,s),d?.(c));return}var S=E(o,u,s),_=S.newCalculatedDate,W=S.newCalculatedMonth;switch(o){case ve.ArrowRight:case ve.ArrowLeft:case ve.ArrowUp:case ve.ArrowDown:r.handleMonthNavigation(W,_);break}}},r.getVerticalOffset=function(n){var o,s;return(s=(o=rc[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=x.setQuarter(r.props.day,o);di(s,r.props)||r.handleDayClick(md(s),n)},r.onQuarterMouseEnter=function(n){var o=x.setQuarter(r.props.day,n);di(o,r.props)||r.handleDayMouseEnter(md(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,x.addQuarters(r.props.preSelection,1));break;case ve.ArrowLeft:if(!r.props.preSelection)break;r.handleQuarterNavigation(o===1?4:o-1,x.subQuarters(r.props.preSelection,1));break}},r.isMonthDisabledForLabelDate=function(n){var o,s=r.props,i=s.day,a=s.minDate,c=s.maxDate,u=s.excludeDates,d=s.includeDates,f=x.setMonth(i,n);return{isDisabled:(o=(a||c||u||d)&&bd(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,u=o.monthClassName,d=u?u(x.setMonth(s,n)):void 0,f=r.getSelection();return Vt("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?ui(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=x.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=x.getQuarter(r.props.preSelection),s=di(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,u=o.day,d=o.locale,f=x.setMonth(u,n),h=r.isDisabled(f)||r.isExcluded(f)?c:i;return"".concat(h," ").concat(yt(f,"MMMM yyyy",d))},r.getQuarterClassNames=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate,c=o.selected,u=o.minDate,d=o.maxDate,f=o.excludeDates,h=o.includeDates,v=o.filterDate,m=o.preSelection,p=o.disabledKeyboardNavigation,b=(u||d||f||h||v)&&di(x.setQuarter(s,n),r.props);return Vt("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":!p&&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?hi(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,u=yd(n,a),d=Ja(n,a);return i?i(n,u,d,c):s?d:u},r.getQuarterContent=function(n){var o,s=r.props,i=s.renderQuarterContent,a=s.locale,c=Fb(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,u=(n=rc[jd(i,s)])===null||n===void 0?void 0:n.grid;return u?.map(function(d,f){return y.createElement("div",{className:"react-datepicker__month-wrapper",key:f},d.map(function(h,v){return y.createElement("div",{ref:r.MONTH_REFS[h],key:v,onClick:function(m){r.onMonthClick(m,h)},onKeyDown:function(m){Od(m)&&(m.preventDefault(),m.key=ve.Enter),r.onMonthKeyDown(m,h)},onMouseEnter:r.props.usePointerEvent?void 0:function(){return r.onMonthMouseEnter(h)},onPointerEnter:r.props.usePointerEvent?function(){return r.onMonthMouseEnter(h)}:void 0,tabIndex:Number(r.getTabIndex(h)),className:r.getMonthClassNames(h),"aria-disabled":r.isMonthDisabled(h),role:"option","aria-label":r.getAriaLabel(h),"aria-current":r.isCurrentMonth(a,h)?"date":void 0,"aria-selected":c?r.isSelectedMonth(a,h,c):void 0},r.getMonthContent(h))}))})},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(u){r.onQuarterClick(u,a)},onKeyDown:function(u){r.onQuarterKeyDown(u,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,u=n.showWeekPicker;return Vt("react-datepicker__month",{"react-datepicker__month--selecting-range":o&&(s||i)},{"react-datepicker__monthPicker":a},{"react-datepicker__quarterPicker":c},{"react-datepicker__weekPicker":u})},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()+" ":"",u=n||o;return u?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(yt(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(yt(s,"MMMM, yyyy",this.props.locale)),role:"rowgroup"},this.renderWeeks()))},t})(y.Component),o2=(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 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(ii,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},t})(y.Component),s2=(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 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(o2,He({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 yd(s,r.props.locale)}:function(s){return Ja(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 i2(e,t){for(var r=[],n=Zr(e),o=Zr(t);!x.isAfter(n,o);)r.push(st(n)),n=x.addMonths(n,1);return r}var a2=(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=x.getTime(o),i=Fr(n.props.date,o)&&tr(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"},"✓"):"",yt(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:i2(n.props.minDate,n.props.maxDate)},n}return t.prototype.render=function(){var r=Vt({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return y.createElement(ii,{className:r,onClickOutside:this.handleClickOutside},this.renderOptions())},t})(y.Component),c2=(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=Zr(r.props.minDate),o=Zr(r.props.maxDate),s=[];!x.isAfter(n,o);){var i=x.getTime(n);s.push(y.createElement("option",{key:i,value:i},yt(n,r.props.dateFormat,r.props.locale))),n=x.addMonths(n,1)}return s},r.onSelectChange=function(n){r.onChange(parseInt(n.target.value))},r.renderSelectMode=function(){return y.createElement("select",{value:x.getTime(Zr(r.props.date)),className:"react-datepicker__month-year-select",onChange:r.onSelectChange},r.renderSelectOptions())},r.renderReadView=function(n){var o=yt(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(a2,He({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=st(n);Fr(r.props.date,o)&&tr(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),l2=(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)&&wd(n,r.props)||(r.props.excludeTimes||r.props.includeTimes||r.props.filterTime)&&_d(n,r.props)||(s=(o=r.props).onChange)===null||s===void 0||s.call(o,n)},r.isSelectedTime=function(n){return r.props.selected&&Qb(r.props.selected,n)},r.isDisabledTime=function(n){return(r.props.minTime||r.props.maxTime)&&wd(n,r.props)||(r.props.excludeTimes||r.props.includeTimes||r.props.filterTime)&&_d(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&&(x.getHours(n)*3600+x.getMinutes(n)*60+x.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||st(),c=ci(a),u=r.props.injectTimes&&r.props.injectTimes.sort(function(b,w){return b.getTime()-w.getTime()}),d=60*Kb(a),f=d/i,h=0;h<f;h++){var v=x.addMinutes(c,h*i);if(o.push(v),u){var m=Gb(c,v,h,i,u);o=o.concat(m)}}var p=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===p&&(r.centerLi=w)},onKeyDown:function(w){r.handleOnKeyDown(w,b)},tabIndex:b===p?0:-1,role:"option","aria-selected":r.isSelectedTime(b)?"true":void 0,"aria-disabled":r.isDisabledTime(b)?"true":void 0},yt(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),Rd=3,u2=(function(e){Zt(t,e);function t(r){var n=e.call(this,r)||this;return n.YEAR_REFS=Br([],Array(n.props.yearItemNumber),!0).map(function(){return y.createRef()}),n.isDisabled=function(o){return br(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 ec(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,u,d=n.props,f=d.date,h=d.yearItemNumber;if(!(f===void 0||h===void 0)){var v=Gr(f,h).startPeriod;n.isDisabled(s)||n.isExcluded(s)||((a=(i=n.props).setPreSelection)===null||a===void 0||a.call(i,s),o-v<0?n.updateFocusOnPaginate(h-(v-o)):o-v>=h?n.updateFocusOnPaginate(Math.abs(h-(o-v))):(u=(c=n.YEAR_REFS[o-v])===null||c===void 0?void 0:c.current)===null||u===void 0||u.focus())}},n.isSameDay=function(o,s){return Ve(o,s)},n.isCurrentYear=function(o){return o===x.getYear(st())},n.isRangeStart=function(o){return n.props.startDate&&n.props.endDate&&Fr(x.setYear(st(),o),n.props.startDate)},n.isRangeEnd=function(o){return n.props.startDate&&n.props.endDate&&Fr(x.setYear(st(),o),n.props.endDate)},n.isInRange=function(o){return fi(o,n.props.startDate,n.props.endDate)},n.isInSelectingRange=function(o){var s=n.props,i=s.selectsStart,a=s.selectsEnd,c=s.selectsRange,u=s.startDate,d=s.endDate;return!(i||a||c)||!n.selectingDate()?!1:i&&d?fi(o,n.selectingDate(),d):a&&u||c&&u&&!d?fi(o,u,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,u=x.setYear(st(),o);return c?Fr(u,(s=n.selectingDate())!==null&&s!==void 0?s:null):Fr(u,a??null)},n.isSelectingRangeEnd=function(o){var s;if(!n.isInSelectingRange(o))return!1;var i=n.props,a=i.endDate,c=i.selectsEnd,u=i.selectsRange,d=x.setYear(st(),o);return c||u?Fr(d,(s=n.selectingDate())!==null&&s!==void 0?s:null):Fr(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,u=s.includeDates,d=s.filterDate,f=s.selected,h=Eo(x.setYear(n.props.date,o)),v=(i||a||c||u||d)&&pi(o,n.props),m=!!f&&Ve(h,Eo(f)),p=Ve(h,Eo(n.props.preSelection));return!n.props.inline&&!m&&p&&!v}},n.isSelectedYear=function(o){var s=n.props,i=s.selectsMultiple,a=s.selected,c=s.selectedDates;return i?c?.some(function(u){return o===x.getYear(u)}):!!a&&o===x.getYear(a)},n.onYearClick=function(o,s){var i=n.props.date;i!==void 0&&n.handleYearClick(Eo(x.setYear(i,s)),o)},n.onYearKeyDown=function(o,s){var i,a,c=o.key,u=n.props,d=u.date,f=u.yearItemNumber,h=u.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,x.addYears(n.props.preSelection,1));break;case ve.ArrowLeft:if(n.props.preSelection==null)break;n.handleYearNavigation(s-1,x.subYears(n.props.preSelection,1));break;case ve.ArrowUp:{if(d===void 0||f===void 0||n.props.preSelection==null)break;var v=Gr(d,f).startPeriod,m=Rd,p=s-m;if(p<v){var b=f%m;s>=v&&s<v+b?m=b:m+=b,p=s-m}n.handleYearNavigation(p,x.subYears(n.props.preSelection,m));break}case ve.ArrowDown:{if(d===void 0||f===void 0||n.props.preSelection==null)break;var w=Gr(d,f).endPeriod,m=Rd,p=s+m;if(p>w){var b=f%m;s<=w&&s>w-b?m=b:m+=b,p=s+m}n.handleYearNavigation(p,x.addYears(n.props.preSelection,m));break}}h&&h(o)},n.getYearClassNames=function(o){var s=n.props,i=s.date,a=s.minDate,c=s.maxDate,u=s.excludeDates,d=s.includeDates,f=s.filterDate,h=s.yearClassName;return Vt("react-datepicker__year-text","react-datepicker__year-".concat(o),i?h?.(x.setYear(i,o)):void 0,{"react-datepicker__year-text--selected":n.isSelectedYear(o),"react-datepicker__year-text--disabled":(a||c||u||d||f)&&pi(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=x.getYear(n.props.preSelection),i=pi(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 u=Gr(s,i),d=u.startPeriod,f=u.endPeriod,h=function(p){n.push(y.createElement("div",{ref:v.YEAR_REFS[p-d],onClick:function(b){r.onYearClick(b,p)},onKeyDown:function(b){Od(b)&&(b.preventDefault(),b.key=ve.Enter),r.onYearKeyDown(b,p)},tabIndex:Number(v.getYearTabIndex(p)),className:v.getYearClassNames(p),onMouseEnter:v.props.usePointerEvent?void 0:function(b){return a(b,p)},onPointerEnter:v.props.usePointerEvent?function(b){return a(b,p)}:void 0,onMouseLeave:v.props.usePointerEvent?void 0:function(b){return c(b,p)},onPointerLeave:v.props.usePointerEvent?function(b){return c(b,p)}:void 0,key:p,"aria-current":v.isCurrentYear(p)?"date":void 0},v.getYearContent(p)))},v=this,m=d;m<=f;m++)h(m);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 d2(e,t,r,n){for(var o=[],s=0;s<2*t+1;s++){var i=e+t-s,a=!0;r&&(a=x.getYear(r)<=i),n&&a&&(a=x.getYear(n)>=i),a&&o.push(i)}return o}var f2=(function(e){Zt(t,e);function t(r){var n=e.call(this,r)||this;n.yearOptionButtonsRef={},n.handleOptionKeyDown=function(a,c){var u;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]&&((u=n.yearOptionButtonsRef[d])===null||u===void 0||u.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(h){n.yearOptionButtonsRef[f]=h,f===a&&h?.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)}),u=n.props.minDate?x.getYear(n.props.minDate):null,d=n.props.maxDate?x.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"}))),(!u||!n.state.yearsList.find(function(f){return f===u}))&&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(u){return u+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:d2(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=Vt({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return y.createElement(ii,{className:r,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},t})(y.Component),p2=(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?x.getYear(r.props.minDate):1900,o=r.props.maxDate?x.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(f2,He({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),h2=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],Nd="react-datepicker-ignore-onclickoutside",m2=function(e){var t=(e.className||"").split(/\s+/);return h2.some(function(r){return t.indexOf(r)>=0})},g2=(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;m2(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=kd(n.props),u=Ad(n.props),d=st(),f=a||i||s;return f||(c&&x.isBefore(d,c)?c:u&&x.isAfter(d,u)?u:d)},n.increaseMonth=function(){n.setState(function(o){var s=o.date;return{date:x.addMonths(s,1)}},function(){return n.handleMonthChange(n.state.date)})},n.decreaseMonth=function(){n.setState(function(o){var s=o.date;return{date:x.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:x.setYear(st(),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(!br(o,n.props))return o;for(var s=Zr(o),i=$b(o),a=x.differenceInDays(i,s),c=null,u=0;u<=a;u++){var d=x.addDays(s,u);if(!br(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:x.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:x.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:x.setYear(x.setMonth(i,x.getMonth(o)),x.getYear(o))}},function(){return n.handleMonthYearChange(n.state.date)})},n.header=function(o){o===void 0&&(o=n.state.date);var s=on(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=x.addDays(s,a),u=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:Vt("react-datepicker__day-name",d)},y.createElement("span",{className:"react-datepicker__sr-only"},yt(c,"EEEE",n.props.locale)),y.createElement("span",{"aria-hidden":"true"},u))}))},n.formatWeekday=function(o,s){return n.props.formatWeekDay?Lb(o,n.props.formatWeekDay,s):n.props.useWeekdaysShort?Bb(o,s):zb(o,s)},n.decreaseYear=function(){n.setState(function(o){var s,i=o.date;return{date:x.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,u=(s=n.props.monthSelectedIn)!==null&&s!==void 0?s:c,d=x.subMonths(n.state.date,u),f;switch(!0){case n.props.showMonthYearPicker:f=Ed(n.state.date,n.props);break;case n.props.showYearPicker:f=Vb(n.state.date,n.props);break;case n.props.showQuarterYearPicker:f=Ub(n.state.date,n.props);break;default:f=Sd(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 h=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],v=["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&&(v.push("react-datepicker__navigation--previous--disabled"),m=void 0);var p=n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker,b=n.props,w=b.previousMonthButtonLabel,C=w===void 0?t.defaultProps.previousMonthButtonLabel:w,E=b.previousYearButtonLabel,S=E===void 0?t.defaultProps.previousYearButtonLabel:E,_=n.props,W=_.previousMonthAriaLabel,D=W===void 0?typeof C=="string"?C:"Previous Month":W,A=_.previousYearAriaLabel,M=A===void 0?typeof S=="string"?S:"Previous Year":A;return y.createElement("button",{type:"button",className:v.join(" "),onClick:m,onKeyDown:n.props.handleOnKeyDown,"aria-label":p?M:D},y.createElement("span",{className:h.join(" ")},p?S:C))}}},n.increaseYear=function(){n.setState(function(o){var s,i=o.date;return{date:x.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=Dd(n.state.date,n.props);break;case n.props.showYearPicker:s=Yb(n.state.date,n.props);break;case n.props.showQuarterYearPicker:s=Hb(n.state.date,n.props);break;default:s=Cd(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 u=n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker,d=n.props,f=d.nextMonthButtonLabel,h=f===void 0?t.defaultProps.nextMonthButtonLabel:f,v=d.nextYearButtonLabel,m=v===void 0?t.defaultProps.nextYearButtonLabel:v,p=n.props,b=p.nextMonthAriaLabel,w=b===void 0?typeof h=="string"?h:"Next Month":b,C=p.nextYearAriaLabel,E=C===void 0?typeof m=="string"?m:"Next Year":C;return y.createElement("button",{type:"button",className:i.join(" "),onClick:c,onKeyDown:n.props.handleOnKeyDown,"aria-label":u?E:w},y.createElement("span",{className:a.join(" ")},u?m:h))}}},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(" ")},yt(o,n.props.dateFormat,n.props.locale))},n.renderYearDropdown=function(o){if(o===void 0&&(o=!1),!(!n.props.showYearDropdown||o))return y.createElement(p2,He({},t.defaultProps,n.props,{date:n.state.date,onChange:n.changeYear,year:x.getYear(n.state.date)}))},n.renderMonthDropdown=function(o){if(o===void 0&&(o=!1),!(!n.props.showMonthDropdown||o))return y.createElement(s2,He({},t.defaultProps,n.props,{month:x.getMonth(n.state.date),onChange:n.changeMonth}))},n.renderMonthYearDropdown=function(o){if(o===void 0&&(o=!1),!(!n.props.showMonthYearDropdown||o))return y.createElement(c2,He({},t.defaultProps,n.props,{date:n.state.date,onChange:n.changeMonthYear}))},n.handleTodayButtonClick=function(o){n.props.onSelect(gd(),o),n.props.setPreSelection&&n.props.setPreSelection(gd())},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 u=n.props,d=u.showYearPicker,f=u.yearItemNumber,h;if(d){var v=Gr(a,f),m=v.startPeriod,p=v.endPeriod;h={startYear:m,endYear:p}}var b=Sd(n.state.date,n.props),w=Cd(n.state.date,n.props),C=Ed(n.state.date,n.props),E=Dd(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,He(He(He({},n.state),d&&{visibleYearsRange:h}),{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:C,nextYearButtonDisabled:E})))},n.renderYearHeader=function(o){var s=o.monthDate,i=n.props,a=i.showYearPicker,c=i.yearItemNumber,u=c===void 0?t.defaultProps.yearItemNumber:c,d=Gr(s,u),f=d.startPeriod,h=d.endPeriod;return y.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},a?"".concat(f," - ").concat(h):x.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,u=n.props.showMonthYearPicker||n.props.showQuarterYearPicker?x.addYears(n.state.date,c):x.subMonths(n.state.date,c),d=(s=n.props.monthSelectedIn)!==null&&s!==void 0?s:c,f=0;f<a;++f){var h=f-d+c,v=n.props.showMonthYearPicker||n.props.showQuarterYearPicker?x.addYears(u,h):x.addMonths(u,h),m="month-".concat(f),p=f<a-1,b=f>0;i.push(y.createElement("div",{key:m,ref:function(w){n.monthContainer=w??void 0},className:"react-datepicker__month-container"},n.renderHeader({monthDate:v,i:f}),y.createElement(n2,He({},t.defaultProps,n.props,{containerRef:n.containerRef,ariaLabelPrefix:n.props.monthAriaLabelPrefix,day:v,onDayClick:n.handleDayClick,handleOnKeyDown:n.props.handleOnDayKeyDown,handleOnMonthKeyDown:n.props.handleOnKeyDown,onDayMouseEnter:n.handleDayMouseEnter,onMouseLeave:n.handleMonthMouseLeave,orderInDisplay:f,selectingDate:n.state.selectingDate,monthShowsDuplicateDaysEnd:p,monthShowsDuplicateDaysStart:b,dayNamesHeader:n.renderDayNamesHeader(v)}))))}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(u2,He({},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(l2,He({},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&&ai(o)&&!!n.props.selected,i=s?"".concat(Id(o.getHours()),":").concat(Id(o.getMinutes())):"";if(n.props.showTimeInput)return y.createElement(Xb,He({},t.defaultProps,n.props,{date:o,timeString:i,onChange:n.props.onTimeChange}))},n.renderAriaLiveRegion=function(){var o,s=Gr(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=x.getYear(n.state.date):c="".concat(Ja(x.getMonth(n.state.date),n.props.locale)," ").concat(x.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:Nd,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:Co}},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&&(!Ve(this.props.preSelection,r.preSelection)||this.props.monthSelectedIn!==r.monthSelectedIn)){var o=!tr(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return o&&n.handleCustomMonthChange(n.state.date)})}else this.props.openToDate&&!Ve(this.props.openToDate,r.openToDate)&&this.setState({date:this.props.openToDate})},t.prototype.render=function(){var r=this.props.container||Ib;return y.createElement(ii,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},y.createElement("div",{style:{display:"contents"},ref:this.containerRef},y.createElement(r,{className:Vt("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),v2=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"}))},$d=(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 dl.createPortal(this.props.children,this.el)},t})(y.Component),y2="[tabindex], a, button, input, select, textarea",b2=function(e){return(e instanceof HTMLAnchorElement||!e.disabled)&&e.tabIndex!==-1},Ld=(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(y2),1,-1).filter(b2)},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 x2(e){function t(r){var n,o=typeof r.hidePopper=="boolean"?r.hidePopper:!0,s=y.useRef(null),i=Tb(He({open:!o,whileElementsMounted:ib,placement:r.popperPlacement,middleware:Br([mb({padding:15}),hb(10),gb({element:s})],(n=r.popperModifiers)!==null&&n!==void 0?n:[],!0)},r.popperProps)),a=He(He({},r),{hidePopper:o,popperProps:He(He({},i),{arrowRef:s})});return y.createElement(e,He({},a))}return t.displayName="withFloating(".concat(e.displayName||e.name||"Component",")"),t}var _2=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,u=e.portalId,d=e.portalHost,f=e.popperProps,h=e.showArrow,v=void 0;if(!o){var m=Vt("react-datepicker-popper",t);v=y.createElement(Ld,{enableTabLoop:a},y.createElement("div",{ref:f.refs.setFloating,style:f.floatingStyles,className:m,"data-placement":f.placement,onKeyDown:c},s,h&&y.createElement(wb,{ref:f.arrowRef,context:f.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}e.popperContainer&&(v=y.createElement(e.popperContainer,{},v)),u&&!o&&(v=y.createElement($d,{portalId:u,portalHost:d},v));var p=Vt("react-datepicker-wrapper",r);return y.createElement(y.Fragment,null,y.createElement("div",{ref:f.refs.setReference,className:p},i),v)},w2=x2(_2);function S2(e,t){return e&&t?x.getMonth(e)!==x.getMonth(t)||x.getYear(e)!==x.getYear(t):e!==t}var nc="Date input not valid.",C2=(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:st()},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 ai(a)?Br(Br([],s,!0),[He(He({},i),{date:a})],!1):s},[])},n.calcInitialState=function(){var o,s=n.getPreSelection(),i=kd(n.props),a=Ad(n.props),c=i&&x.isBefore(s,ci(i))?i:a&&x.isAfter(s,vd(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:Td(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,u=s.rangeSeparator,d=s.selected,f=s.selectedDates,h=s.selectsMultiple,v=s.selectsRange,m=s.value,p=(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:v?Pb(a,c,{dateFormat:p,locale:i,rangeSeparator:u}):h?Ob(f??[],{dateFormat:p,locale:i}):yr(d,{dateFormat:p,locale:i})},n.resetHiddenStatus=function(){n.setState(He(He({},n.state),{wasHidden:!1}))},n.setHiddenStatus=function(){n.setState(He(He({},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:oc},function(){o||n.setState(function(i){return{focused:s?i.focused:!1}},function(){!s&&n.deferBlur(),n.setState({inputValue:null})})})},n.inputOk=function(){return x.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(He(He({},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,u=[],d=0;d<arguments.length;d++)u[d]=arguments[d];var f=u[0];if(!(n.props.onChangeRaw&&(n.props.onChangeRaw.apply(n,u),!f||typeof f.isDefaultPrevented!="function"||f.isDefaultPrevented()))){n.setState({inputValue:f?.target instanceof HTMLInputElement?f.target.value:null,lastPreSelectChange:E2});var h=n.props,v=h.selectsRange,m=h.startDate,p=h.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,C=f?.target instanceof HTMLInputElement?f.target.value:"";if(v){var E=n.props.rangeSeparator,S=E.trim(),_=C.split(b.includes(S)?E:S,2).map(function(F){return F.trim()}),W=_[0],D=_[1],A=Ka(W??"",b,n.props.locale,w),M=A?Ka(D??"",b,n.props.locale,w):null,I=m?.getTime()!==A?.getTime(),V=p?.getTime()!==M?.getTime();if(!I&&!V||A&&br(A,n.props)||M&&br(M,n.props))return;(a=(i=n.props).onChange)===null||a===void 0||a.call(i,[A,M],f)}else{var G=Ka(C,b,n.props.locale,w,(c=n.props.selected)!==null&&c!==void 0?c:void 0);(G||!C)&&n.setSelected(G,f,!0)}}},n.handleSelect=function(o,s,i){if(!n.props.readOnly){var a=n.props,c=a.selectsRange,u=a.startDate,d=a.endDate,f=a.swapRange,h=!c||u&&!d&&(f||!tc(o,u));n.props.shouldCloseOnSelect&&!n.props.showTimeSelect&&h&&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):h&&n.setOpen(!1)}},n.setSelected=function(o,s,i,a){var c,u,d=o;if(n.props.showYearPicker){if(d!==null&&pi(x.getYear(d),n.props))return}else if(n.props.showMonthYearPicker){if(d!==null&&bd(d,n.props))return}else if(d!==null&&br(d,n.props))return;var f=n.props,h=f.onChange,v=f.selectsRange,m=f.startDate,p=f.endDate,b=f.selectsMultiple,w=f.selectedDates,C=f.minTime,E=f.swapRange;if(!gn(n.props.selected,d)||n.props.allowSameDay||v||b)if(d!==null&&(n.props.selected&&(!i||!n.props.showTimeSelect&&!n.props.showTimeSelectOnly&&!n.props.showTimeInput)&&(d=Qa(d,{hour:x.getHours(n.props.selected),minute:x.getMinutes(n.props.selected),second:x.getSeconds(n.props.selected)})),!i&&(n.props.showTimeSelect||n.props.showTimeSelectOnly)&&C&&(d=Qa(d,{hour:C.getHours(),minute:C.getMinutes(),second:C.getSeconds()})),n.props.inline||n.setState({preSelection:d}),n.props.focusSelectedMonth||n.setState({monthSelectedIn:a})),v){var S=!m&&!p,_=m&&!p,W=!m&&!!p,D=m&&p;S?h?.([d,null],s):_?d===null?h?.([null,null],s):tc(d,m)?h?.(E?[d,m]:[d,null],s):h?.([m,d],s):W&&(d&&tc(d,p)?h?.([d,p],s):h?.([d,null],s)),D&&h?.([d,null],s)}else if(b){if(d!==null)if(!w?.length)h?.([d],s);else{var A=w.some(function(I){return Ve(I,d)});if(A){var M=w.filter(function(I){return!Ve(I,d)});h?.(M,s)}else h?.(Br(Br([],w,!0),[d],!1),s)}}else h?.(d,s);i||((u=(c=n.props).onSelect)===null||u===void 0||u.call(c,d,s),n.setState({inputValue:null}))},n.setPreSelection=function(o){if(!n.props.readOnly){var s=x.isDate(n.props.minDate),i=x.isDate(n.props.maxDate),a=!0;if(o){var c=ci(o);if(s&&i)a=vn(o,n.props.minDate,n.props.maxDate);else if(s){var u=ci(n.props.minDate);a=x.isAfter(o,u)||gn(c,u)}else if(i){var d=vd(n.props.maxDate);a=x.isBefore(o,d)||gn(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:Qa(a,{hour:x.getHours(o),minute:x.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,u,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 h=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"]',v=((c=n.calendar)===null||c===void 0?void 0:c.containerRef.current)instanceof Element&&n.calendar.containerRef.current.querySelector(h);v instanceof HTMLElement&&v.focus({preventScroll:!0});return}var m=st(n.state.preSelection);f===ve.Enter?(o.preventDefault(),o.target.blur(),n.inputOk()&&n.state.lastPreSelectChange===oc?(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=(u=n.props).onInputError)===null||d===void 0||d.call(u,{code:1,msg:nc})}},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,u,d,f=n.props,h=f.minDate,v=f.maxDate,m=f.disabledKeyboardNavigation,p=f.showWeekPicker,b=f.shouldCloseOnSelect,w=f.locale,C=f.calendarStartDay,E=f.adjustDateOnChange,S=f.inline;if((i=(s=n.props).onKeyDown)===null||i===void 0||i.call(s,o),!m){var _=o.key,W=o.shiftKey,D=st(n.state.preSelection),A=function(oe,U){var N=U;switch(oe){case ve.ArrowRight:N=p?x.addWeeks(U,1):x.addDays(U,1);break;case ve.ArrowLeft:N=p?x.subWeeks(U,1):x.subDays(U,1);break;case ve.ArrowUp:N=x.subWeeks(U,1);break;case ve.ArrowDown:N=x.addWeeks(U,1);break;case ve.PageUp:N=W?x.subYears(U,1):x.subMonths(U,1);break;case ve.PageDown:N=W?x.addYears(U,1):x.addMonths(U,1);break;case ve.Home:N=on(U,w,C);break;case ve.End:N=Nb(U);break}return N},M=function(oe,U){for(var N=40,ce=oe,fe=!1,$=0,Q=A(oe,U);!fe;){if($>=N){Q=U;break}h&&Q<h&&(ce=ve.ArrowRight,Q=br(h,n.props)?A(ce,Q):h),v&&Q>v&&(ce=ve.ArrowLeft,Q=br(v,n.props)?A(ce,Q):v),br(Q,n.props)?((ce===ve.PageUp||ce===ve.Home)&&(ce=ve.ArrowRight),(ce===ve.PageDown||ce===ve.End)&&(ce=ve.ArrowLeft),Q=A(ce,Q)):fe=!0,$++}return Q};if(_===ve.Enter){o.preventDefault(),n.handleSelect(D,o),!b&&n.setPreSelection(D);return}else if(_===ve.Escape){o.preventDefault(),n.setOpen(!1),n.inputOk()||(c=(a=n.props).onInputError)===null||c===void 0||c.call(a,{code:1,msg:nc});return}var I=null;switch(_){case ve.ArrowLeft:case ve.ArrowRight:case ve.ArrowUp:case ve.ArrowDown:case ve.PageUp:case ve.PageDown:case ve.Home:case ve.End:I=M(_,D);break}if(!I){(d=(u=n.props).onInputError)===null||d===void 0||d.call(u,{code:1,msg:nc});return}if(o.preventDefault(),n.setState({lastPreSelectChange:oc}),E&&n.setSelected(I),n.setPreSelection(I),S){var V=x.getMonth(D),G=x.getMonth(I),F=x.getYear(D),Y=x.getYear(I);V!==G||F!==Y?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:y.createElement(g2,He({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:Zb(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",u;return n.props.selectsRange?u="Selected start date: ".concat(yr(n.props.startDate,{dateFormat:c,locale:s}),". ").concat(n.props.endDate?"End date: "+yr(n.props.endDate,{dateFormat:c,locale:s}):""):n.props.showTimeSelectOnly?u="Selected time: ".concat(yr(n.props.selected,{dateFormat:i,locale:s})):n.props.showYearPicker?u="Selected year: ".concat(yr(n.props.selected,{dateFormat:"yyyy",locale:s})):n.props.showMonthYearPicker?u="Selected month: ".concat(yr(n.props.selected,{dateFormat:"MMMM yyyy",locale:s})):n.props.showQuarterYearPicker?u="Selected quarter: ".concat(yr(n.props.selected,{dateFormat:"yyyy, QQQ",locale:s})):u="Selected date: ".concat(yr(n.props.selected,{dateFormat:c,locale:s})),y.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},u)},n.renderDateInput=function(){var o,s,i=Vt(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(u){n.input=u},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=Vt(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,u=o.endDate,d=o.clearButtonTitle,f=o.clearButtonClassName,h=f===void 0?"":f,v=o.ariaLabelClose,m=v===void 0?"Close":v,p=o.selectedDates,b=o.readOnly;return s&&!b&&(a!=null||c!=null||u!=null||p?.length)?y.createElement("button",{type:"button",className:Vt("react-datepicker__close-icon",h,{"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:Nd,readOnly:!1,rangeSeparator:hd,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:Co,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&&S2(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:Td(this.props.highlightDates)}),!n.focused&&!gn(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(v2,He({icon:o,className:Vt(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(Ld,{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($d,He({portalId:this.props.portalId},this.props),n)),y.createElement("div",null,this.renderInputContainer(),n)}return y.createElement(w2,He({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:r,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},t})(y.Component),E2="input",oc="navigate";const D2="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",k2="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",A2="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",zd="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",T2=y.forwardRef(({value:e,onClick:t},r)=>l.jsxs("button",{className:fn.datePickerButton,onClick:t,ref:r,children:[e,l.jsx("img",{src:D2,style:{marginLeft:10}})]})),I2=({currentDate:e,onPrevMonth:t,onNextMonth:r,onAddEvent:n,onDateChange:o})=>l.jsxs("div",{className:fn.headerContainer,children:[l.jsxs("div",{className:fn.navAndDate,children:[l.jsx("button",{className:fn.navButton,onClick:t,children:l.jsx("img",{src:k2,width:15})}),l.jsx("button",{className:fn.navButton,onClick:r,children:l.jsx("img",{src:A2,width:15})}),l.jsx(C2,{selected:e,onChange:s=>o(s),dateFormat:"MMMM yyyy",showMonthYearPicker:!0,className:fn.datePickerInput,locale:"es",customInput:l.jsx(T2,{})})]}),l.jsxs("button",{className:fn.addEventButton,onClick:n,children:[l.jsx("img",{src:zd}),"Agregar evento"]})]}),xe={sidebarContainer:"_sidebarContainer_1jdt4_1",leadsSection:"_leadsSection_1jdt4_17",leadCard:"_leadCard_1jdt4_33",leadIcon:"_leadIcon_1jdt4_71",leadDays:"_leadDays_1jdt4_81",leadCount:"_leadCount_1jdt4_91",eventsSection:"_eventsSection_1jdt4_103",eventGroup:"_eventGroup_1jdt4_143",eventGroupDate:"_eventGroupDate_1jdt4_151",eventItem:"_eventItem_1jdt4_163",eventDetails:"_eventDetails_1jdt4_195",eventTitle:"_eventTitle_1jdt4_209",eventTime:"_eventTime_1jdt4_231",calendarsSection:"_calendarsSection_1jdt4_253",collapsibleHeader:"_collapsibleHeader_1jdt4_269",headerTitle:"_headerTitle_1jdt4_297",calendarCount:"_calendarCount_1jdt4_311",chevronIcon:"_chevronIcon_1jdt4_329",collapsed:"_collapsed_1jdt4_337",collapsibleContent:"_collapsibleContent_1jdt4_345",hidden:"_hidden_1jdt4_361",circularCheckbox:"_circularCheckbox_1jdt4_379",checkedIcon:"_checkedIcon_1jdt4_397",calendarIcon:"_calendarIcon_1jdt4_413",syncButton:"_syncButton_1jdt4_429",eventsContainer:"_eventsContainer_1jdt4_481",calendarsList:"_calendarsList_1jdt4_555",calendarItemText:"_calendarItemText_1jdt4_613",addEventButton:"_addEventButton_1jdt4_639",customCheckIcon:"_customCheckIcon_1jdt4_693",uncheckedCircle:"_uncheckedCircle_1jdt4_709",calendarSelectButton:"_calendarSelectButton_1jdt4_723",calendarSelected:"_calendarSelected_1jdt4_775",currentUserCalendarTitle:"_currentUserCalendarTitle_1jdt4_795",tabsContainer:"_tabsContainer_1jdt4_831",tabButton:"_tabButton_1jdt4_851",activeTab:"_activeTab_1jdt4_887",alertBadge:"_alertBadge_1jdt4_901"};/**
|
|
115
|
+
*/var Ka=function(t,r){return Ka=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])},Ka(t,r)};function Gt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ka(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var He=function(){return He=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},He.apply(this,arguments)};function Fr(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 Mb=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)},Pb=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},ai=function(e){var t=e.children,r=e.onClickOutside,n=e.className,o=e.containerRef,s=e.style,i=e.ignoreClass,a=Pb(r,i);return v.createElement("div",{className:n,style:s,ref:function(c){a.current=c,o&&(o.current=c)}},t)},ge;(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"})(ge||(ge={}));function hd(){var e=typeof window<"u"?window:globalThis;return e}var Co=12;function ct(e){if(e==null)return new Date;var t=typeof e=="string"?x.parseISO(e):x.toDate(e);return ci(t)?t:new Date}function Qa(e,t,r,n,o){o===void 0&&(o=ct());for(var s=Un(r)||Un(Ja()),i=Array.isArray(t)?t:[t],a=0,c=i;a<c.length;a++){var u=c[a],d=x.parse(e,u,o,{locale:s,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});if(ci(d)&&(!n||e===yt(d,u,r)))return d}return null}function ci(e,t){return x.isValid(e)&&!x.isBefore(e,new Date("1/1/1800"))}function yt(e,t,r){if(r==="en")return x.format(e,t,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var n=r?Un(r):void 0;return r&&!n&&console.warn('A locale object was not found for the provided string ["'.concat(r,'"].')),n=n||Un(Ja()),x.format(e,t,{locale:n,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function yr(e,t){var r=t.dateFormat,n=t.locale,o=Array.isArray(r)&&r.length>0?r[0]:r;return e&&yt(e,o,n)||""}var md=" - ";function Ob(e,t,r){if(!e&&!t)return"";var n=e?yr(e,r):"",o=t?yr(t,r):"",s=r.rangeSeparator||md;return"".concat(n).concat(s).concat(o)}function jb(e,t){if(!e?.length)return"";var r=e[0]?yr(e[0],t):"";if(e.length===1)return r;if(e.length===2&&e[1]){var n=yr(e[1],t);return"".concat(r,", ").concat(n)}var o=e.length-1;return"".concat(r," (+").concat(o,")")}function Xa(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 x.setHours(x.setMinutes(x.setSeconds(e,a),s),n)}function Rb(e){return x.getISOWeek(e)}function Nb(e,t){return yt(e,"ddd",t)}function li(e){return x.startOfDay(e)}function sn(e,t,r){var n=Un(t||Ja());return x.startOfWeek(e,{locale:n,weekStartsOn:r})}function Zr(e){return x.startOfMonth(e)}function Eo(e){return x.startOfYear(e)}function gd(e){return x.startOfQuarter(e)}function vd(){return x.startOfDay(ct())}function yd(e){return x.endOfDay(e)}function $b(e){return x.endOfWeek(e)}function Lb(e){return x.endOfMonth(e)}function Wr(e,t){return e&&t?x.isSameYear(e,t):!e&&!t}function er(e,t){return e&&t?x.isSameMonth(e,t):!e&&!t}function ui(e,t){return e&&t?x.isSameQuarter(e,t):!e&&!t}function Ue(e,t){return e&&t?x.isSameDay(e,t):!e&&!t}function vn(e,t){return e&&t?x.isEqual(e,t):!e&&!t}function yn(e,t,r){var n,o=x.startOfDay(t),s=x.endOfDay(r);try{n=x.isWithinInterval(e,{start:o,end:s})}catch{n=!1}return n}function Ja(){var e=hd();return e.__localeId__}function Un(e){if(typeof e=="string"){var t=hd();return t.__localeData__?t.__localeData__[e]:void 0}else return e}function zb(e,t,r){return t(yt(e,"EEEE",r))}function Bb(e,t){return yt(e,"EEEEEE",t)}function Fb(e,t){return yt(e,"EEE",t)}function ec(e,t){return yt(x.setMonth(ct(),e),"LLLL",t)}function bd(e,t){return yt(x.setMonth(ct(),e),"LLL",t)}function Wb(e,t){return yt(x.setQuarter(ct(),e),"QQQ",t)}function br(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,u=r.filterDate;return Do(e,{minDate:n,maxDate:o})||s&&s.some(function(d){return d instanceof Date?Ue(e,d):Ue(e,d.date)})||i&&i.some(function(d){var f=d.start,h=d.end;return x.isWithinInterval(e,{start:f,end:h})})||a&&!a.some(function(d){return Ue(e,d)})||c&&!c.some(function(d){var f=d.start,h=d.end;return x.isWithinInterval(e,{start:f,end:h})})||u&&!u(ct(e))||!1}function tc(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 x.isWithinInterval(e,{start:i,end:a})}):n&&n.some(function(s){var i;return s instanceof Date?Ue(e,s):Ue(e,(i=s.date)!==null&&i!==void 0?i:new Date)})||!1}function xd(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.includeDates,a=r.filterDate;return Do(e,{minDate:n?x.startOfMonth(n):void 0,maxDate:o?x.endOfMonth(o):void 0})||s?.some(function(c){return er(e,c instanceof Date?c:c.date)})||i&&!i.some(function(c){return er(e,c)})||a&&!a(ct(e))||!1}function di(e,t,r,n){var o=x.getYear(e),s=x.getMonth(e),i=x.getYear(t),a=x.getMonth(t),c=x.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 Hb(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.includeDates;return Do(e,{minDate:n,maxDate:o})||s&&s.some(function(a){return er(a instanceof Date?a:a.date,e)})||i&&!i.some(function(a){return er(a,e)})||!1}function fi(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.maxDate,s=r.excludeDates,i=r.includeDates,a=r.filterDate;return Do(e,{minDate:n,maxDate:o})||s?.some(function(c){return ui(e,c instanceof Date?c:c.date)})||i&&!i.some(function(c){return ui(e,c)})||a&&!a(ct(e))||!1}function pi(e,t,r){if(!t||!r||!x.isValid(t)||!x.isValid(r))return!1;var n=x.getYear(t),o=x.getYear(r);return n<=e&&o>=e}function hi(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 Do(c,{minDate:n?x.startOfYear(n):void 0,maxDate:o?x.endOfYear(o):void 0})||s?.some(function(u){return Wr(c,u instanceof Date?u:u.date)})||i&&!i.some(function(u){return Wr(c,u)})||a&&!a(ct(c))||!1}function mi(e,t,r,n){var o=x.getYear(e),s=x.getQuarter(e),i=x.getYear(t),a=x.getQuarter(t),c=x.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 Do(e,t){var r,n=t===void 0?{}:t,o=n.minDate,s=n.maxDate;return(r=o&&x.differenceInCalendarDays(e,o)<0||s&&x.differenceInCalendarDays(e,s)>0)!==null&&r!==void 0?r:!1}function _d(e,t){return t.some(function(r){return x.getHours(r)===x.getHours(e)&&x.getMinutes(r)===x.getMinutes(e)&&x.getSeconds(r)===x.getSeconds(e)})}function wd(e,t){var r=t===void 0?{}:t,n=r.excludeTimes,o=r.includeTimes,s=r.filterTime;return n&&_d(e,n)||o&&!_d(e,o)||s&&!s(e)||!1}function Sd(e,t){var r=t.minTime,n=t.maxTime;if(!r||!n)throw new Error("Both minTime and maxTime props required");var o=ct();o=x.setHours(o,x.getHours(e)),o=x.setMinutes(o,x.getMinutes(e)),o=x.setSeconds(o,x.getSeconds(e));var s=ct();s=x.setHours(s,x.getHours(r)),s=x.setMinutes(s,x.getMinutes(r)),s=x.setSeconds(s,x.getSeconds(r));var i=ct();i=x.setHours(i,x.getHours(n)),i=x.setMinutes(i,x.getMinutes(n)),i=x.setSeconds(i,x.getSeconds(n));var a;try{a=!x.isWithinInterval(o,{start:s,end:i})}catch{a=!1}return a}function Cd(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.includeDates,s=x.subMonths(e,1);return n&&x.differenceInCalendarMonths(n,s)>0||o&&o.every(function(i){return x.differenceInCalendarMonths(i,s)>0})||!1}function Ed(e,t){var r=t===void 0?{}:t,n=r.maxDate,o=r.includeDates,s=x.addMonths(e,1);return n&&x.differenceInCalendarMonths(s,n)>0||o&&o.every(function(i){return x.differenceInCalendarMonths(s,i)>0})||!1}function Ub(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.includeDates,s=x.startOfYear(e),i=x.subQuarters(s,1);return n&&x.differenceInCalendarQuarters(n,i)>0||o&&o.every(function(a){return x.differenceInCalendarQuarters(a,i)>0})||!1}function Vb(e,t){var r=t===void 0?{}:t,n=r.maxDate,o=r.includeDates,s=x.endOfYear(e),i=x.addQuarters(s,1);return n&&x.differenceInCalendarQuarters(i,n)>0||o&&o.every(function(a){return x.differenceInCalendarQuarters(i,a)>0})||!1}function Dd(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.includeDates,s=x.subYears(e,1);return n&&x.differenceInCalendarYears(n,s)>0||o&&o.every(function(i){return x.differenceInCalendarYears(i,s)>0})||!1}function Yb(e,t){var r=t===void 0?{}:t,n=r.minDate,o=r.yearItemNumber,s=o===void 0?Co:o,i=Eo(x.subYears(e,s)),a=Gr(i,s).endPeriod,c=n&&x.getYear(n);return c&&c>a||!1}function kd(e,t){var r=t===void 0?{}:t,n=r.maxDate,o=r.includeDates,s=x.addYears(e,1);return n&&x.differenceInCalendarYears(s,n)>0||o&&o.every(function(i){return x.differenceInCalendarYears(s,i)>0})||!1}function qb(e,t){var r=t===void 0?{}:t,n=r.maxDate,o=r.yearItemNumber,s=o===void 0?Co:o,i=x.addYears(e,s),a=Gr(i,s).startPeriod,c=n&&x.getYear(n);return c&&c<a||!1}function Ad(e){var t=e.minDate,r=e.includeDates;if(r&&t){var n=r.filter(function(o){return x.differenceInCalendarDays(o,t)>=0});return x.min(n)}else return r?x.min(r):t}function Td(e){var t=e.maxDate,r=e.includeDates;if(r&&t){var n=r.filter(function(o){return x.differenceInCalendarDays(o,t)<=0});return x.max(n)}else return r?x.max(r):t}function Id(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(x.isDate(i)){var a=yt(i,"MM.dd.yyyy"),c=n.get(a)||[];c.includes(t)||(c.push(t),n.set(a,c))}else if(typeof i=="object"){var u=Object.keys(i),d=(r=u[0])!==null&&r!==void 0?r:"",f=i[d];if(typeof d=="string"&&Array.isArray(f))for(var h=0,y=f.length;h<y;h++){var g=f[h];if(g){var a=yt(g,"MM.dd.yyyy"),c=n.get(a)||[];c.includes(d)||(c.push(d),n.set(a,c))}}}}return n}function Zb(e,t){return e.length!==t.length?!1:e.every(function(r,n){return r===t[n]})}function Gb(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(x.isDate(o)){var i=yt(o,"MM.dd.yyyy"),a=r.get(i)||{className:"",holidayNames:[]};if(!("className"in a&&a.className===t&&Zb(a.holidayNames,[s]))){a.className=t;var c=a.holidayNames;a.holidayNames=c?Fr(Fr([],c,!0),[s],!1):[s],r.set(i,a)}}}),r}function Kb(e,t,r,n,o){for(var s=o.length,i=[],a=0;a<s;a++){var c=e,u=o[a];u&&(c=x.addHours(c,x.getHours(u)),c=x.addMinutes(c,x.getMinutes(u)),c=x.addSeconds(c,x.getSeconds(u)));var d=x.addMinutes(e,(r+1)*n);x.isAfter(c,t)&&x.isBefore(c,d)&&u!=null&&i.push(u)}return i}function Md(e){return e<10?"0".concat(e):"".concat(e)}function Gr(e,t){t===void 0&&(t=Co);var r=Math.ceil(x.getYear(e)/t)*t,n=r-(t-1);return{startPeriod:n,endPeriod:r}}function Qb(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 Pd(e){var t=e.getSeconds(),r=e.getMilliseconds();return x.toDate(e.getTime()-t*1e3-r)}function Xb(e,t){return Pd(e).getTime()===Pd(t).getTime()}function Od(e){if(!x.isDate(e))throw new Error("Invalid date");var t=new Date(e);return t.setHours(0,0,0,0),t}function rc(e,t){if(!x.isDate(e)||!x.isDate(t))throw new Error("Invalid date received");var r=Od(e),n=Od(t);return x.isBefore(r,n)}function jd(e){return e.key===ge.Space}var Jb=(function(e){Gt(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),u=c?a:new Date;if(o?.includes(":")){var d=o.split(":"),f=d[0],h=d[1];u.setHours(Number(f)),u.setMinutes(Number(h))}(i=(s=n.props).onChange)===null||i===void 0||i.call(s,u)},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 u;(u=n.inputRef.current)===null||u===void 0||u.focus()},required:!0,value:o,onChange:function(u){n.onTimeChange(u.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),e2=(function(e){Gt(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===ge.Space&&(n.preventDefault(),n.key=ge.Enter),(s=(o=r.props).handleOnKeyDown)===null||s===void 0||s.call(o,n)},r.isSameDay=function(n){return Ue(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),br(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 tc(r.props.day,{excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals})},r.isStartOfWeek=function(){return Ue(r.props.day,sn(r.props.day,r.props.locale,r.props.calendarStartDay))},r.isSameWeek=function(n){return r.props.showWeekPicker&&Ue(n,sn(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=yt(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=yt(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:yn(o,s,i)},r.isInSelectingRange=function(){var n,o=r.props,s=o.day,i=o.selectsStart,a=o.selectsEnd,c=o.selectsRange,u=o.selectsDisabledDaysInRange,d=o.startDate,f=o.swapRange,h=o.endDate,y=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;if(!(i||a||c)||!y||!u&&r.isDisabled())return!1;if(i&&h&&(x.isBefore(y,h)||vn(y,h)))return yn(s,y,h);if(a&&d&&(x.isAfter(y,d)||vn(y,d)))return yn(s,d,y);if(c&&d&&!h){if(vn(y,d)||x.isAfter(y,d))return yn(s,d,y);if(f&&x.isBefore(y,d))return yn(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,u=o.selectsRange,d=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;return a?Ue(s,d):u&&c&&i&&d?Ue(s,x.isBefore(d,i)?d:i):Ue(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,u=o.swapRange,d=o.startDate,f=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;return a?Ue(s,f):c&&u&&d&&f?Ue(s,x.isBefore(f,d)?d:f):c?Ue(s,f):Ue(s,i)},r.isRangeStart=function(){var n=r.props,o=n.day,s=n.startDate,i=n.endDate;return!s||!i?!1:Ue(s,o)},r.isRangeEnd=function(){var n=r.props,o=n.day,s=n.startDate,i=n.endDate;return!s||!i?!1:Ue(i,o)},r.isWeekend=function(){var n=x.getDay(r.props.day);return n===0||n===6},r.isAfterMonth=function(){return r.props.month!==void 0&&(r.props.month+1)%12===x.getMonth(r.props.day)},r.isBeforeMonth=function(){return r.props.month!==void 0&&(x.getMonth(r.props.day)+1)%12===r.props.month},r.isCurrentDay=function(){return r.isSameDay(ct())},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 qt("react-datepicker__day",o,"react-datepicker__day--"+Nb(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,u=r.isDisabled()||r.isExcluded()?c:i;return"".concat(u," ").concat(yt(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=yt(o,"MM.dd.yyyy"),u=[];return i.has(c)&&u.push.apply(u,i.get(c).holidayNames),r.isExcluded()&&u.push(a?.filter(function(d){return d instanceof Date?Ue(d,o):Ue(d?.date,o)}).map(function(d){if(!(d instanceof Date))return d?.message})),u.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)&&Ue(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(x.getDate(r.props.day),r.props.day):x.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),t2=(function(e){Gt(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===ge.Space&&(n.preventDefault(),n.key=ge.Enter),(s=(o=r.props).handleOnKeyDown)===null||s===void 0||s.call(o,n)},r.isKeyboardSelected=function(){return!r.props.disabledKeyboardNavigation&&!Ue(r.props.date,r.props.selected)&&Ue(r.props.date,r.props.preSelection)},r.getTabIndex=function(){return r.props.showWeekPicker&&r.props.showWeekNumber&&(r.isKeyboardSelected()||Ue(r.props.date,r.props.selected)&&Ue(r.props.preSelection,r.props.selected))?0:-1},r.handleFocusWeekNumber=function(n){var o=!1;r.getTabIndex()===0&&!n?.isInputFocused&&Ue(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&&Ue(this.props.date,this.props.selected)};return v.createElement("div",{ref:this.weekNumberEl,className:qt(c),"aria-label":"".concat(i," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex(),role:"gridcell"},n)},t})(v.Component),r2=(function(e){Gt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.isDisabled=function(n){return br(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,u=new Date(n),d=0;d<7;d++){var f=new Date(n);f.setDate(f.getDate()+d);var h=!r.isDisabled(f);if(h){u=f;break}}typeof r.props.onWeekSelect=="function"&&r.props.onWeekSelect(u,o,s),r.props.showWeekPicker&&r.handleDayClick(u,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):Rb(n)},r.isWeekDisabled=function(){for(var n=r.startOfWeek(),o=x.addDays(n,6),s=new Date(n);s<=o;){if(!r.isDisabled(s))return!1;s=x.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(t2,He({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=x.addDays(n,a);return v.createElement(e2,He({},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 sn(r.props.day,r.props.locale,r.props.calendarStartDay)},r.isKeyboardSelected=function(){return!r.props.disabledKeyboardNavigation&&!Ue(r.startOfWeek(),r.props.selected)&&Ue(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":Ue(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:qt(r,n),role:"row"},this.renderDays())},t})(v.Component),ko,n2=6,Vn={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},nc=(ko={},ko[Vn.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},ko[Vn.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},ko[Vn.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},ko),gi=1;function Rd(e,t){return e?Vn.FOUR_COLUMNS:t?Vn.TWO_COLUMNS:Vn.THREE_COLUMNS}var o2=(function(e){Gt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.MONTH_REFS=Fr([],Array(12),!0).map(function(){return v.createRef()}),r.QUARTER_REFS=Fr([],Array(4),!0).map(function(){return v.createRef()}),r.isDisabled=function(n){return br(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 tc(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:er(x.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:ui(x.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:er(x.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:ui(x.setQuarter(s,n),a)},r.isInSelectingRangeMonth=function(n){var o,s=r.props,i=s.day,a=s.selectsStart,c=s.selectsEnd,u=s.selectsRange,d=s.startDate,f=s.endDate,h=(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection;return!(a||c||u)||!h?!1:a&&f?di(h,f,n,i):c&&d||u&&d&&!f?di(d,h,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,u=x.setMonth(i,n),d=(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection;return c?er(u,d):er(u,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,u=s.selectsRange,d=x.setMonth(i,n),f=(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection;return c||u?er(d,f):er(d,a)},r.isInSelectingRangeQuarter=function(n){var o,s=r.props,i=s.day,a=s.selectsStart,c=s.selectsEnd,u=s.selectsRange,d=s.startDate,f=s.endDate,h=(o=r.props.selectingDate)!==null&&o!==void 0?o:r.props.preSelection;return!(a||c||u)||!h?!1:a&&f?mi(h,f,n,i):c&&d||u&&d&&!f?mi(d,h,n,i):!1},r.isWeekInMonth=function(n){var o=r.props.day,s=x.addDays(n,6);return er(n,o)||er(s,o)},r.isCurrentMonth=function(n,o){return x.getYear(n)===x.getYear(ct())&&o===x.getMonth(ct())},r.isCurrentQuarter=function(n,o){return x.getYear(n)===x.getYear(ct())&&o===x.getQuarter(ct())},r.isSelectedMonth=function(n,o,s){return x.getMonth(s)===o&&x.getYear(n)===x.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 x.getQuarter(n)===o&&x.getYear(n)===x.getYear(s)},r.isMonthSelected=function(){var n=r.props,o=n.day,s=n.selected,i=n.selectedDates,a=n.selectsMultiple,c=x.getMonth(o);return a?i?.some(function(u){return r.isSelectedMonth(o,c,u)}):!!s&&r.isSelectedMonth(o,c,s)},r.renderWeeks=function(){for(var n=[],o=r.props.fixedHeight,s=0,i=!1,a=sn(Zr(r.props.day),r.props.locale,r.props.calendarStartDay),c=function(g){return r.props.showWeekPicker?sn(g,r.props.locale,r.props.calendarStartDay):r.props.preSelection},u=function(g){return r.props.showWeekPicker?sn(g,r.props.locale,r.props.calendarStartDay):r.props.selected},d=r.props.selected?u(r.props.selected):void 0,f=r.props.preSelection?c(r.props.preSelection):void 0;n.push(v.createElement(r2,He({},r.props,{ariaLabelPrefix:r.props.weekAriaLabelPrefix,key:s,day:a,month:x.getMonth(r.props.day),onDayClick:r.handleDayClick,onDayMouseEnter:r.handleDayMouseEnter,selected:d,preSelection:f,showWeekNumber:r.props.showWeekNumbers}))),!i;){s++,a=x.addWeeks(a,1);var h=o&&s>=n2,y=!o&&!r.isWeekInMonth(a);if(h||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(Zr(a),n)},r.onMonthMouseEnter=function(n){var o=r.isMonthDisabledForLabelDate(n),s=o.isDisabled,i=o.labelDate;s||r.handleDayMouseEnter(Zr(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,u=a.preSelection,d=a.setPreSelection,f=a.minDate,h=a.maxDate,y=a.showFourColumnMonthYearPicker,g=a.showTwoColumnMonthYearPicker;if(u){var p=Rd(y,g),b=r.getVerticalOffset(p),w=(i=nc[p])===null||i===void 0?void 0:i.grid,S=function(D,T,M){var I,H,G=T,F=M;switch(D){case ge.ArrowRight:G=x.addMonths(T,gi),F=M===11?0:M+gi;break;case ge.ArrowLeft:G=x.subMonths(T,gi),F=M===0?11:M-gi;break;case ge.ArrowUp:G=x.subMonths(T,b),F=!((I=w?.[0])===null||I===void 0)&&I.includes(M)?M+12-b:M-b;break;case ge.ArrowDown:G=x.addMonths(T,b),F=!((H=w?.[w.length-1])===null||H===void 0)&&H.includes(M)?M-12+b:M+b;break}return{newCalculatedDate:G,newCalculatedMonth:F}},E=function(D,T,M){for(var I=40,H=D,G=!1,F=0,Y=S(H,T,M),se=Y.newCalculatedDate,U=Y.newCalculatedMonth;!G;){if(F>=I){se=T,U=M;break}if(f&&se<f){H=ge.ArrowRight;var N=S(H,se,U);se=N.newCalculatedDate,U=N.newCalculatedMonth}if(h&&se>h){H=ge.ArrowLeft;var N=S(H,se,U);se=N.newCalculatedDate,U=N.newCalculatedMonth}if(Hb(se,r.props)){var N=S(H,se,U);se=N.newCalculatedDate,U=N.newCalculatedMonth}else G=!0;F++}return{newCalculatedDate:se,newCalculatedMonth:U}};if(o===ge.Enter){r.isMonthDisabled(s)||(r.onMonthClick(n,s),d?.(c));return}var C=E(o,u,s),_=C.newCalculatedDate,W=C.newCalculatedMonth;switch(o){case ge.ArrowRight:case ge.ArrowLeft:case ge.ArrowUp:case ge.ArrowDown:r.handleMonthNavigation(W,_);break}}},r.getVerticalOffset=function(n){var o,s;return(s=(o=nc[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!==ge.Tab&&n.preventDefault(),i||r.handleKeyboardNavigation(n,c,o),a&&a(n)},r.onQuarterClick=function(n,o){var s=x.setQuarter(r.props.day,o);fi(s,r.props)||r.handleDayClick(gd(s),n)},r.onQuarterMouseEnter=function(n){var o=x.setQuarter(r.props.day,n);fi(o,r.props)||r.handleDayMouseEnter(gd(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 ge.Enter:r.onQuarterClick(n,o),(i=(s=r.props).setPreSelection)===null||i===void 0||i.call(s,r.props.selected);break;case ge.ArrowRight:if(!r.props.preSelection)break;r.handleQuarterNavigation(o===4?1:o+1,x.addQuarters(r.props.preSelection,1));break;case ge.ArrowLeft:if(!r.props.preSelection)break;r.handleQuarterNavigation(o===1?4:o-1,x.subQuarters(r.props.preSelection,1));break}},r.isMonthDisabledForLabelDate=function(n){var o,s=r.props,i=s.day,a=s.minDate,c=s.maxDate,u=s.excludeDates,d=s.includeDates,f=x.setMonth(i,n);return{isDisabled:(o=(a||c||u||d)&&xd(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,u=o.monthClassName,d=u?u(x.setMonth(s,n)):void 0,f=r.getSelection();return qt("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?di(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=x.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=x.getQuarter(r.props.preSelection),s=fi(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,u=o.day,d=o.locale,f=x.setMonth(u,n),h=r.isDisabled(f)||r.isExcluded(f)?c:i;return"".concat(h," ").concat(yt(f,"MMMM yyyy",d))},r.getQuarterClassNames=function(n){var o=r.props,s=o.day,i=o.startDate,a=o.endDate,c=o.selected,u=o.minDate,d=o.maxDate,f=o.excludeDates,h=o.includeDates,y=o.filterDate,g=o.preSelection,p=o.disabledKeyboardNavigation,b=(u||d||f||h||y)&&fi(x.setQuarter(s,n),r.props);return qt("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":!p&&g&&r.isSelectedQuarter(s,n,g)&&!b,"react-datepicker__quarter-text--in-selecting-range":r.isInSelectingRangeQuarter(n),"react-datepicker__quarter-text--in-range":i&&a?mi(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,u=bd(n,a),d=ec(n,a);return i?i(n,u,d,c):s?d:u},r.getQuarterContent=function(n){var o,s=r.props,i=s.renderQuarterContent,a=s.locale,c=Wb(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,u=(n=nc[Rd(i,s)])===null||n===void 0?void 0:n.grid;return u?.map(function(d,f){return v.createElement("div",{className:"react-datepicker__month-wrapper",key:f},d.map(function(h,y){return v.createElement("div",{ref:r.MONTH_REFS[h],key:y,onClick:function(g){r.onMonthClick(g,h)},onKeyDown:function(g){jd(g)&&(g.preventDefault(),g.key=ge.Enter),r.onMonthKeyDown(g,h)},onMouseEnter:r.props.usePointerEvent?void 0:function(){return r.onMonthMouseEnter(h)},onPointerEnter:r.props.usePointerEvent?function(){return r.onMonthMouseEnter(h)}:void 0,tabIndex:Number(r.getTabIndex(h)),className:r.getMonthClassNames(h),"aria-disabled":r.isMonthDisabled(h),role:"option","aria-label":r.getAriaLabel(h),"aria-current":r.isCurrentMonth(a,h)?"date":void 0,"aria-selected":c?r.isSelectedMonth(a,h,c):void 0},r.getMonthContent(h))}))})},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(u){r.onQuarterClick(u,a)},onKeyDown:function(u){r.onQuarterKeyDown(u,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,u=n.showWeekPicker;return qt("react-datepicker__month",{"react-datepicker__month--selecting-range":o&&(s||i)},{"react-datepicker__monthPicker":a},{"react-datepicker__quarterPicker":c},{"react-datepicker__weekPicker":u})},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()+" ":"",u=n||o;return u?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(yt(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(yt(s,"MMMM, yyyy",this.props.locale)),role:"rowgroup"},this.renderWeeks()))},t})(v.Component),s2=(function(e){Gt(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(ai,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},t})(v.Component),i2=(function(e){Gt(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(s2,He({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 bd(s,r.props.locale)}:function(s){return ec(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 a2(e,t){for(var r=[],n=Zr(e),o=Zr(t);!x.isAfter(n,o);)r.push(ct(n)),n=x.addMonths(n,1);return r}var c2=(function(e){Gt(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=x.getTime(o),i=Wr(n.props.date,o)&&er(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"},"✓"):"",yt(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:a2(n.props.minDate,n.props.maxDate)},n}return t.prototype.render=function(){var r=qt({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return v.createElement(ai,{className:r,onClickOutside:this.handleClickOutside},this.renderOptions())},t})(v.Component),l2=(function(e){Gt(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={dropdownVisible:!1},r.renderSelectOptions=function(){for(var n=Zr(r.props.minDate),o=Zr(r.props.maxDate),s=[];!x.isAfter(n,o);){var i=x.getTime(n);s.push(v.createElement("option",{key:i,value:i},yt(n,r.props.dateFormat,r.props.locale))),n=x.addMonths(n,1)}return s},r.onSelectChange=function(n){r.onChange(parseInt(n.target.value))},r.renderSelectMode=function(){return v.createElement("select",{value:x.getTime(Zr(r.props.date)),className:"react-datepicker__month-year-select",onChange:r.onSelectChange},r.renderSelectOptions())},r.renderReadView=function(n){var o=yt(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(c2,He({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=ct(n);Wr(r.props.date,o)&&er(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),u2=(function(e){Gt(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)&&Sd(n,r.props)||(r.props.excludeTimes||r.props.includeTimes||r.props.filterTime)&&wd(n,r.props)||(s=(o=r.props).onChange)===null||s===void 0||s.call(o,n)},r.isSelectedTime=function(n){return r.props.selected&&Xb(r.props.selected,n)},r.isDisabledTime=function(n){return(r.props.minTime||r.props.maxTime)&&Sd(n,r.props)||(r.props.excludeTimes||r.props.includeTimes||r.props.filterTime)&&wd(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&&(x.getHours(n)*3600+x.getMinutes(n)*60+x.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===ge.Space&&(n.preventDefault(),n.key=ge.Enter),(n.key===ge.ArrowUp||n.key===ge.ArrowLeft)&&n.target instanceof HTMLElement&&n.target.previousSibling&&(n.preventDefault(),n.target.previousSibling instanceof HTMLElement&&n.target.previousSibling.focus()),(n.key===ge.ArrowDown||n.key===ge.ArrowRight)&&n.target instanceof HTMLElement&&n.target.nextSibling&&(n.preventDefault(),n.target.nextSibling instanceof HTMLElement&&n.target.nextSibling.focus()),n.key===ge.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||ct(),c=li(a),u=r.props.injectTimes&&r.props.injectTimes.sort(function(b,w){return b.getTime()-w.getTime()}),d=60*Qb(a),f=d/i,h=0;h<f;h++){var y=x.addMinutes(c,h*i);if(o.push(y),u){var g=Kb(c,y,h,i,u);o=o.concat(g)}}var p=o.reduce(function(b,w){return w.getTime()<=a.getTime()?w: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(w){b===p&&(r.centerLi=w)},onKeyDown:function(w){r.handleOnKeyDown(w,b)},tabIndex:b===p?0:-1,role:"option","aria-selected":r.isSelectedTime(b)?"true":void 0,"aria-disabled":r.isDisabledTime(b)?"true":void 0},yt(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),Nd=3,d2=(function(e){Gt(t,e);function t(r){var n=e.call(this,r)||this;return n.YEAR_REFS=Fr([],Array(n.props.yearItemNumber),!0).map(function(){return v.createRef()}),n.isDisabled=function(o){return br(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 tc(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,u,d=n.props,f=d.date,h=d.yearItemNumber;if(!(f===void 0||h===void 0)){var y=Gr(f,h).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(h-(y-o)):o-y>=h?n.updateFocusOnPaginate(Math.abs(h-(o-y))):(u=(c=n.YEAR_REFS[o-y])===null||c===void 0?void 0:c.current)===null||u===void 0||u.focus())}},n.isSameDay=function(o,s){return Ue(o,s)},n.isCurrentYear=function(o){return o===x.getYear(ct())},n.isRangeStart=function(o){return n.props.startDate&&n.props.endDate&&Wr(x.setYear(ct(),o),n.props.startDate)},n.isRangeEnd=function(o){return n.props.startDate&&n.props.endDate&&Wr(x.setYear(ct(),o),n.props.endDate)},n.isInRange=function(o){return pi(o,n.props.startDate,n.props.endDate)},n.isInSelectingRange=function(o){var s=n.props,i=s.selectsStart,a=s.selectsEnd,c=s.selectsRange,u=s.startDate,d=s.endDate;return!(i||a||c)||!n.selectingDate()?!1:i&&d?pi(o,n.selectingDate(),d):a&&u||c&&u&&!d?pi(o,u,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,u=x.setYear(ct(),o);return c?Wr(u,(s=n.selectingDate())!==null&&s!==void 0?s:null):Wr(u,a??null)},n.isSelectingRangeEnd=function(o){var s;if(!n.isInSelectingRange(o))return!1;var i=n.props,a=i.endDate,c=i.selectsEnd,u=i.selectsRange,d=x.setYear(ct(),o);return c||u?Wr(d,(s=n.selectingDate())!==null&&s!==void 0?s:null):Wr(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,u=s.includeDates,d=s.filterDate,f=s.selected,h=Eo(x.setYear(n.props.date,o)),y=(i||a||c||u||d)&&hi(o,n.props),g=!!f&&Ue(h,Eo(f)),p=Ue(h,Eo(n.props.preSelection));return!n.props.inline&&!g&&p&&!y}},n.isSelectedYear=function(o){var s=n.props,i=s.selectsMultiple,a=s.selected,c=s.selectedDates;return i?c?.some(function(u){return o===x.getYear(u)}):!!a&&o===x.getYear(a)},n.onYearClick=function(o,s){var i=n.props.date;i!==void 0&&n.handleYearClick(Eo(x.setYear(i,s)),o)},n.onYearKeyDown=function(o,s){var i,a,c=o.key,u=n.props,d=u.date,f=u.yearItemNumber,h=u.handleOnKeyDown;if(c!==ge.Tab&&o.preventDefault(),!n.props.disabledKeyboardNavigation)switch(c){case ge.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 ge.ArrowRight:if(n.props.preSelection==null)break;n.handleYearNavigation(s+1,x.addYears(n.props.preSelection,1));break;case ge.ArrowLeft:if(n.props.preSelection==null)break;n.handleYearNavigation(s-1,x.subYears(n.props.preSelection,1));break;case ge.ArrowUp:{if(d===void 0||f===void 0||n.props.preSelection==null)break;var y=Gr(d,f).startPeriod,g=Nd,p=s-g;if(p<y){var b=f%g;s>=y&&s<y+b?g=b:g+=b,p=s-g}n.handleYearNavigation(p,x.subYears(n.props.preSelection,g));break}case ge.ArrowDown:{if(d===void 0||f===void 0||n.props.preSelection==null)break;var w=Gr(d,f).endPeriod,g=Nd,p=s+g;if(p>w){var b=f%g;s<=w&&s>w-b?g=b:g+=b,p=s+g}n.handleYearNavigation(p,x.addYears(n.props.preSelection,g));break}}h&&h(o)},n.getYearClassNames=function(o){var s=n.props,i=s.date,a=s.minDate,c=s.maxDate,u=s.excludeDates,d=s.includeDates,f=s.filterDate,h=s.yearClassName;return qt("react-datepicker__year-text","react-datepicker__year-".concat(o),i?h?.(x.setYear(i,o)):void 0,{"react-datepicker__year-text--selected":n.isSelectedYear(o),"react-datepicker__year-text--disabled":(a||c||u||d||f)&&hi(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=x.getYear(n.props.preSelection),i=hi(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 u=Gr(s,i),d=u.startPeriod,f=u.endPeriod,h=function(p){n.push(v.createElement("div",{ref:y.YEAR_REFS[p-d],onClick:function(b){r.onYearClick(b,p)},onKeyDown:function(b){jd(b)&&(b.preventDefault(),b.key=ge.Enter),r.onYearKeyDown(b,p)},tabIndex:Number(y.getYearTabIndex(p)),className:y.getYearClassNames(p),onMouseEnter:y.props.usePointerEvent?void 0:function(b){return a(b,p)},onPointerEnter:y.props.usePointerEvent?function(b){return a(b,p)}:void 0,onMouseLeave:y.props.usePointerEvent?void 0:function(b){return c(b,p)},onPointerLeave:y.props.usePointerEvent?function(b){return c(b,p)}:void 0,key:p,"aria-current":y.isCurrentYear(p)?"date":void 0},y.getYearContent(p)))},y=this,g=d;g<=f;g++)h(g);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 f2(e,t,r,n){for(var o=[],s=0;s<2*t+1;s++){var i=e+t-s,a=!0;r&&(a=x.getYear(r)<=i),n&&a&&(a=x.getYear(n)>=i),a&&o.push(i)}return o}var p2=(function(e){Gt(t,e);function t(r){var n=e.call(this,r)||this;n.yearOptionButtonsRef={},n.handleOptionKeyDown=function(a,c){var u;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]&&((u=n.yearOptionButtonsRef[d])===null||u===void 0||u.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(h){n.yearOptionButtonsRef[f]=h,f===a&&h?.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)}),u=n.props.minDate?x.getYear(n.props.minDate):null,d=n.props.maxDate?x.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"}))),(!u||!n.state.yearsList.find(function(f){return f===u}))&&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(u){return u+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:f2(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=qt({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return v.createElement(ai,{className:r,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},t})(v.Component),h2=(function(e){Gt(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?x.getYear(r.props.minDate):1900,o=r.props.maxDate?x.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(p2,He({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),m2=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],$d="react-datepicker-ignore-onclickoutside",g2=function(e){var t=(e.className||"").split(/\s+/);return m2.some(function(r){return t.indexOf(r)>=0})},v2=(function(e){Gt(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;g2(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=Ad(n.props),u=Td(n.props),d=ct(),f=a||i||s;return f||(c&&x.isBefore(d,c)?c:u&&x.isAfter(d,u)?u:d)},n.increaseMonth=function(){n.setState(function(o){var s=o.date;return{date:x.addMonths(s,1)}},function(){return n.handleMonthChange(n.state.date)})},n.decreaseMonth=function(){n.setState(function(o){var s=o.date;return{date:x.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:x.setYear(ct(),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(!br(o,n.props))return o;for(var s=Zr(o),i=Lb(o),a=x.differenceInDays(i,s),c=null,u=0;u<=a;u++){var d=x.addDays(s,u);if(!br(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:x.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:x.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:x.setYear(x.setMonth(i,x.getMonth(o)),x.getYear(o))}},function(){return n.handleMonthYearChange(n.state.date)})},n.header=function(o){o===void 0&&(o=n.state.date);var s=sn(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=x.addDays(s,a),u=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:qt("react-datepicker__day-name",d)},v.createElement("span",{className:"react-datepicker__sr-only"},yt(c,"EEEE",n.props.locale)),v.createElement("span",{"aria-hidden":"true"},u))}))},n.formatWeekday=function(o,s){return n.props.formatWeekDay?zb(o,n.props.formatWeekDay,s):n.props.useWeekdaysShort?Fb(o,s):Bb(o,s)},n.decreaseYear=function(){n.setState(function(o){var s,i=o.date;return{date:x.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,u=(s=n.props.monthSelectedIn)!==null&&s!==void 0?s:c,d=x.subMonths(n.state.date,u),f;switch(!0){case n.props.showMonthYearPicker:f=Dd(n.state.date,n.props);break;case n.props.showYearPicker:f=Yb(n.state.date,n.props);break;case n.props.showQuarterYearPicker:f=Ub(n.state.date,n.props);break;default:f=Cd(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 h=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],y=["react-datepicker__navigation","react-datepicker__navigation--previous"],g=n.decreaseMonth;(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker)&&(g=n.decreaseYear),f&&n.props.showDisabledMonthNavigation&&(y.push("react-datepicker__navigation--previous--disabled"),g=void 0);var p=n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker,b=n.props,w=b.previousMonthButtonLabel,S=w===void 0?t.defaultProps.previousMonthButtonLabel:w,E=b.previousYearButtonLabel,C=E===void 0?t.defaultProps.previousYearButtonLabel:E,_=n.props,W=_.previousMonthAriaLabel,D=W===void 0?typeof S=="string"?S:"Previous Month":W,T=_.previousYearAriaLabel,M=T===void 0?typeof C=="string"?C:"Previous Year":T;return v.createElement("button",{type:"button",className:y.join(" "),onClick:g,onKeyDown:n.props.handleOnKeyDown,"aria-label":p?M:D},v.createElement("span",{className:h.join(" ")},p?C:S))}}},n.increaseYear=function(){n.setState(function(o){var s,i=o.date;return{date:x.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=kd(n.state.date,n.props);break;case n.props.showYearPicker:s=qb(n.state.date,n.props);break;case n.props.showQuarterYearPicker:s=Vb(n.state.date,n.props);break;default:s=Ed(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 u=n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker,d=n.props,f=d.nextMonthButtonLabel,h=f===void 0?t.defaultProps.nextMonthButtonLabel:f,y=d.nextYearButtonLabel,g=y===void 0?t.defaultProps.nextYearButtonLabel:y,p=n.props,b=p.nextMonthAriaLabel,w=b===void 0?typeof h=="string"?h:"Next Month":b,S=p.nextYearAriaLabel,E=S===void 0?typeof g=="string"?g:"Next Year":S;return v.createElement("button",{type:"button",className:i.join(" "),onClick:c,onKeyDown:n.props.handleOnKeyDown,"aria-label":u?E:w},v.createElement("span",{className:a.join(" ")},u?g:h))}}},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(" ")},yt(o,n.props.dateFormat,n.props.locale))},n.renderYearDropdown=function(o){if(o===void 0&&(o=!1),!(!n.props.showYearDropdown||o))return v.createElement(h2,He({},t.defaultProps,n.props,{date:n.state.date,onChange:n.changeYear,year:x.getYear(n.state.date)}))},n.renderMonthDropdown=function(o){if(o===void 0&&(o=!1),!(!n.props.showMonthDropdown||o))return v.createElement(i2,He({},t.defaultProps,n.props,{month:x.getMonth(n.state.date),onChange:n.changeMonth}))},n.renderMonthYearDropdown=function(o){if(o===void 0&&(o=!1),!(!n.props.showMonthYearDropdown||o))return v.createElement(l2,He({},t.defaultProps,n.props,{date:n.state.date,onChange:n.changeMonthYear}))},n.handleTodayButtonClick=function(o){n.props.onSelect(vd(),o),n.props.setPreSelection&&n.props.setPreSelection(vd())},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 u=n.props,d=u.showYearPicker,f=u.yearItemNumber,h;if(d){var y=Gr(a,f),g=y.startPeriod,p=y.endPeriod;h={startYear:g,endYear:p}}var b=Cd(n.state.date,n.props),w=Ed(n.state.date,n.props),S=Dd(n.state.date,n.props),E=kd(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,He(He(He({},n.state),d&&{visibleYearsRange:h}),{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:E})))},n.renderYearHeader=function(o){var s=o.monthDate,i=n.props,a=i.showYearPicker,c=i.yearItemNumber,u=c===void 0?t.defaultProps.yearItemNumber:c,d=Gr(s,u),f=d.startPeriod,h=d.endPeriod;return v.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},a?"".concat(f," - ").concat(h):x.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,u=n.props.showMonthYearPicker||n.props.showQuarterYearPicker?x.addYears(n.state.date,c):x.subMonths(n.state.date,c),d=(s=n.props.monthSelectedIn)!==null&&s!==void 0?s:c,f=0;f<a;++f){var h=f-d+c,y=n.props.showMonthYearPicker||n.props.showQuarterYearPicker?x.addYears(u,h):x.addMonths(u,h),g="month-".concat(f),p=f<a-1,b=f>0;i.push(v.createElement("div",{key:g,ref:function(w){n.monthContainer=w??void 0},className:"react-datepicker__month-container"},n.renderHeader({monthDate:y,i:f}),v.createElement(o2,He({},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:p,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(d2,He({},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(u2,He({},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&&ci(o)&&!!n.props.selected,i=s?"".concat(Md(o.getHours()),":").concat(Md(o.getMinutes())):"";if(n.props.showTimeInput)return v.createElement(Jb,He({},t.defaultProps,n.props,{date:o,timeString:i,onChange:n.props.onTimeChange}))},n.renderAriaLiveRegion=function(){var o,s=Gr(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=x.getYear(n.state.date):c="".concat(ec(x.getMonth(n.state.date),n.props.locale)," ").concat(x.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:$d,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:Co}},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&&(!Ue(this.props.preSelection,r.preSelection)||this.props.monthSelectedIn!==r.monthSelectedIn)){var o=!er(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return o&&n.handleCustomMonthChange(n.state.date)})}else this.props.openToDate&&!Ue(this.props.openToDate,r.openToDate)&&this.setState({date:this.props.openToDate})},t.prototype.render=function(){var r=this.props.container||Mb;return v.createElement(ai,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},v.createElement("div",{style:{display:"contents"},ref:this.containerRef},v.createElement(r,{className:qt("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),y2=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"}))},Ld=(function(e){Gt(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 fl.createPortal(this.props.children,this.el)},t})(v.Component),b2="[tabindex], a, button, input, select, textarea",x2=function(e){return(e instanceof HTMLAnchorElement||!e.disabled)&&e.tabIndex!==-1},zd=(function(e){Gt(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(b2),1,-1).filter(x2)},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 _2(e){function t(r){var n,o=typeof r.hidePopper=="boolean"?r.hidePopper:!0,s=v.useRef(null),i=Ib(He({open:!o,whileElementsMounted:ab,placement:r.popperPlacement,middleware:Fr([gb({padding:15}),mb(10),vb({element:s})],(n=r.popperModifiers)!==null&&n!==void 0?n:[],!0)},r.popperProps)),a=He(He({},r),{hidePopper:o,popperProps:He(He({},i),{arrowRef:s})});return v.createElement(e,He({},a))}return t.displayName="withFloating(".concat(e.displayName||e.name||"Component",")"),t}var w2=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,u=e.portalId,d=e.portalHost,f=e.popperProps,h=e.showArrow,y=void 0;if(!o){var g=qt("react-datepicker-popper",t);y=v.createElement(zd,{enableTabLoop:a},v.createElement("div",{ref:f.refs.setFloating,style:f.floatingStyles,className:g,"data-placement":f.placement,onKeyDown:c},s,h&&v.createElement(Sb,{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)),u&&!o&&(y=v.createElement(Ld,{portalId:u,portalHost:d},y));var p=qt("react-datepicker-wrapper",r);return v.createElement(v.Fragment,null,v.createElement("div",{ref:f.refs.setReference,className:p},i),y)},S2=_2(w2);function C2(e,t){return e&&t?x.getMonth(e)!==x.getMonth(t)||x.getYear(e)!==x.getYear(t):e!==t}var oc="Date input not valid.",E2=(function(e){Gt(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:ct()},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 ci(a)?Fr(Fr([],s,!0),[He(He({},i),{date:a})],!1):s},[])},n.calcInitialState=function(){var o,s=n.getPreSelection(),i=Ad(n.props),a=Td(n.props),c=i&&x.isBefore(s,li(i))?i:a&&x.isAfter(s,yd(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:Id(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,u=s.rangeSeparator,d=s.selected,f=s.selectedDates,h=s.selectsMultiple,y=s.selectsRange,g=s.value,p=(o=n.props.dateFormat)!==null&&o!==void 0?o:t.defaultProps.dateFormat,b=n.state.inputValue;return typeof g=="string"?g:typeof b=="string"?b:y?Ob(a,c,{dateFormat:p,locale:i,rangeSeparator:u}):h?jb(f??[],{dateFormat:p,locale:i}):yr(d,{dateFormat:p,locale:i})},n.resetHiddenStatus=function(){n.setState(He(He({},n.state),{wasHidden:!1}))},n.setHiddenStatus=function(){n.setState(He(He({},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:sc},function(){o||n.setState(function(i){return{focused:s?i.focused:!1}},function(){!s&&n.deferBlur(),n.setState({inputValue:null})})})},n.inputOk=function(){return x.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(He(He({},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,u=[],d=0;d<arguments.length;d++)u[d]=arguments[d];var f=u[0];if(!(n.props.onChangeRaw&&(n.props.onChangeRaw.apply(n,u),!f||typeof f.isDefaultPrevented!="function"||f.isDefaultPrevented()))){n.setState({inputValue:f?.target instanceof HTMLInputElement?f.target.value:null,lastPreSelectChange:D2});var h=n.props,y=h.selectsRange,g=h.startDate,p=h.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(y){var E=n.props.rangeSeparator,C=E.trim(),_=S.split(b.includes(C)?E:C,2).map(function(F){return F.trim()}),W=_[0],D=_[1],T=Qa(W??"",b,n.props.locale,w),M=T?Qa(D??"",b,n.props.locale,w):null,I=g?.getTime()!==T?.getTime(),H=p?.getTime()!==M?.getTime();if(!I&&!H||T&&br(T,n.props)||M&&br(M,n.props))return;(a=(i=n.props).onChange)===null||a===void 0||a.call(i,[T,M],f)}else{var G=Qa(S,b,n.props.locale,w,(c=n.props.selected)!==null&&c!==void 0?c:void 0);(G||!S)&&n.setSelected(G,f,!0)}}},n.handleSelect=function(o,s,i){if(!n.props.readOnly){var a=n.props,c=a.selectsRange,u=a.startDate,d=a.endDate,f=a.swapRange,h=!c||u&&!d&&(f||!rc(o,u));n.props.shouldCloseOnSelect&&!n.props.showTimeSelect&&h&&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):h&&n.setOpen(!1)}},n.setSelected=function(o,s,i,a){var c,u,d=o;if(n.props.showYearPicker){if(d!==null&&hi(x.getYear(d),n.props))return}else if(n.props.showMonthYearPicker){if(d!==null&&xd(d,n.props))return}else if(d!==null&&br(d,n.props))return;var f=n.props,h=f.onChange,y=f.selectsRange,g=f.startDate,p=f.endDate,b=f.selectsMultiple,w=f.selectedDates,S=f.minTime,E=f.swapRange;if(!vn(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=Xa(d,{hour:x.getHours(n.props.selected),minute:x.getMinutes(n.props.selected),second:x.getSeconds(n.props.selected)})),!i&&(n.props.showTimeSelect||n.props.showTimeSelectOnly)&&S&&(d=Xa(d,{hour:S.getHours(),minute:S.getMinutes(),second:S.getSeconds()})),n.props.inline||n.setState({preSelection:d}),n.props.focusSelectedMonth||n.setState({monthSelectedIn:a})),y){var C=!g&&!p,_=g&&!p,W=!g&&!!p,D=g&&p;C?h?.([d,null],s):_?d===null?h?.([null,null],s):rc(d,g)?h?.(E?[d,g]:[d,null],s):h?.([g,d],s):W&&(d&&rc(d,p)?h?.([d,p],s):h?.([d,null],s)),D&&h?.([d,null],s)}else if(b){if(d!==null)if(!w?.length)h?.([d],s);else{var T=w.some(function(I){return Ue(I,d)});if(T){var M=w.filter(function(I){return!Ue(I,d)});h?.(M,s)}else h?.(Fr(Fr([],w,!0),[d],!1),s)}}else h?.(d,s);i||((u=(c=n.props).onSelect)===null||u===void 0||u.call(c,d,s),n.setState({inputValue:null}))},n.setPreSelection=function(o){if(!n.props.readOnly){var s=x.isDate(n.props.minDate),i=x.isDate(n.props.maxDate),a=!0;if(o){var c=li(o);if(s&&i)a=yn(o,n.props.minDate,n.props.maxDate);else if(s){var u=li(n.props.minDate);a=x.isAfter(o,u)||vn(c,u)}else if(i){var d=yd(n.props.maxDate);a=x.isBefore(o,d)||vn(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:Xa(a,{hour:x.getHours(o),minute:x.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,u,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===ge.ArrowDown||f===ge.ArrowUp||f===ge.Enter)&&((a=n.onInputClick)===null||a===void 0||a.call(n));return}if(n.state.open){if(f===ge.ArrowDown||f===ge.ArrowUp){o.preventDefault();var h=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(h);y instanceof HTMLElement&&y.focus({preventScroll:!0});return}var g=ct(n.state.preSelection);f===ge.Enter?(o.preventDefault(),o.target.blur(),n.inputOk()&&n.state.lastPreSelectChange===sc?(n.handleSelect(g,o),!n.props.shouldCloseOnSelect&&n.setPreSelection(g)):n.setOpen(!1)):f===ge.Escape?(o.preventDefault(),o.target.blur(),n.sendFocusBackToInput(),n.setOpen(!1)):f===ge.Tab&&n.setOpen(!1),n.inputOk()||(d=(u=n.props).onInputError)===null||d===void 0||d.call(u,{code:1,msg:oc})}},n.onPortalKeyDown=function(o){var s=o.key;s===ge.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,u,d,f=n.props,h=f.minDate,y=f.maxDate,g=f.disabledKeyboardNavigation,p=f.showWeekPicker,b=f.shouldCloseOnSelect,w=f.locale,S=f.calendarStartDay,E=f.adjustDateOnChange,C=f.inline;if((i=(s=n.props).onKeyDown)===null||i===void 0||i.call(s,o),!g){var _=o.key,W=o.shiftKey,D=ct(n.state.preSelection),T=function(se,U){var N=U;switch(se){case ge.ArrowRight:N=p?x.addWeeks(U,1):x.addDays(U,1);break;case ge.ArrowLeft:N=p?x.subWeeks(U,1):x.subDays(U,1);break;case ge.ArrowUp:N=x.subWeeks(U,1);break;case ge.ArrowDown:N=x.addWeeks(U,1);break;case ge.PageUp:N=W?x.subYears(U,1):x.subMonths(U,1);break;case ge.PageDown:N=W?x.addYears(U,1):x.addMonths(U,1);break;case ge.Home:N=sn(U,w,S);break;case ge.End:N=$b(U);break}return N},M=function(se,U){for(var N=40,le=se,de=!1,$=0,Q=T(se,U);!de;){if($>=N){Q=U;break}h&&Q<h&&(le=ge.ArrowRight,Q=br(h,n.props)?T(le,Q):h),y&&Q>y&&(le=ge.ArrowLeft,Q=br(y,n.props)?T(le,Q):y),br(Q,n.props)?((le===ge.PageUp||le===ge.Home)&&(le=ge.ArrowRight),(le===ge.PageDown||le===ge.End)&&(le=ge.ArrowLeft),Q=T(le,Q)):de=!0,$++}return Q};if(_===ge.Enter){o.preventDefault(),n.handleSelect(D,o),!b&&n.setPreSelection(D);return}else if(_===ge.Escape){o.preventDefault(),n.setOpen(!1),n.inputOk()||(c=(a=n.props).onInputError)===null||c===void 0||c.call(a,{code:1,msg:oc});return}var I=null;switch(_){case ge.ArrowLeft:case ge.ArrowRight:case ge.ArrowUp:case ge.ArrowDown:case ge.PageUp:case ge.PageDown:case ge.Home:case ge.End:I=M(_,D);break}if(!I){(d=(u=n.props).onInputError)===null||d===void 0||d.call(u,{code:1,msg:oc});return}if(o.preventDefault(),n.setState({lastPreSelectChange:sc}),E&&n.setSelected(I),n.setPreSelection(I),C){var H=x.getMonth(D),G=x.getMonth(I),F=x.getYear(D),Y=x.getYear(I);H!==G||F!==Y?n.setState({shouldFocusDayInline:!0}):n.setState({shouldFocusDayInline:!1})}}},n.onPopperKeyDown=function(o){var s=o.key;s===ge.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(v2,He({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:Gb(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",u;return n.props.selectsRange?u="Selected start date: ".concat(yr(n.props.startDate,{dateFormat:c,locale:s}),". ").concat(n.props.endDate?"End date: "+yr(n.props.endDate,{dateFormat:c,locale:s}):""):n.props.showTimeSelectOnly?u="Selected time: ".concat(yr(n.props.selected,{dateFormat:i,locale:s})):n.props.showYearPicker?u="Selected year: ".concat(yr(n.props.selected,{dateFormat:"yyyy",locale:s})):n.props.showMonthYearPicker?u="Selected month: ".concat(yr(n.props.selected,{dateFormat:"MMMM yyyy",locale:s})):n.props.showQuarterYearPicker?u="Selected quarter: ".concat(yr(n.props.selected,{dateFormat:"yyyy, QQQ",locale:s})):u="Selected date: ".concat(yr(n.props.selected,{dateFormat:c,locale:s})),v.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},u)},n.renderDateInput=function(){var o,s,i=qt(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(u){n.input=u},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=qt(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,u=o.endDate,d=o.clearButtonTitle,f=o.clearButtonClassName,h=f===void 0?"":f,y=o.ariaLabelClose,g=y===void 0?"Close":y,p=o.selectedDates,b=o.readOnly;return s&&!b&&(a!=null||c!=null||u!=null||p?.length)?v.createElement("button",{type:"button",className:qt("react-datepicker__close-icon",h,{"react-datepicker__close-icon--disabled":i}),disabled:i,"aria-label":g,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:$d,readOnly:!1,rangeSeparator:md,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:Co,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&&C2(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:Id(this.props.highlightDates)}),!n.focused&&!vn(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(y2,He({icon:o,className:qt(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(zd,{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(Ld,He({portalId:this.props.portalId},this.props),n)),v.createElement("div",null,this.renderInputContainer(),n)}return v.createElement(S2,He({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:r,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},t})(v.Component),D2="input",sc="navigate";const k2="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",A2="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",T2="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",Bd="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",I2=v.forwardRef(({value:e,onClick:t},r)=>l.jsxs("button",{className:pn.datePickerButton,onClick:t,ref:r,children:[e,l.jsx("img",{src:k2,style:{marginLeft:10}})]})),M2=({currentDate:e,onPrevMonth:t,onNextMonth:r,onAddEvent:n,onDateChange:o})=>l.jsxs("div",{className:pn.headerContainer,children:[l.jsxs("div",{className:pn.navAndDate,children:[l.jsx("button",{className:pn.navButton,onClick:t,children:l.jsx("img",{src:A2,width:15})}),l.jsx("button",{className:pn.navButton,onClick:r,children:l.jsx("img",{src:T2,width:15})}),l.jsx(E2,{selected:e,onChange:s=>o(s),dateFormat:"MMMM yyyy",showMonthYearPicker:!0,className:pn.datePickerInput,locale:"es",customInput:l.jsx(I2,{})})]}),l.jsxs("button",{className:pn.addEventButton,onClick:n,children:[l.jsx("img",{src:Bd}),"Agregar evento"]})]}),be={sidebarContainer:"_sidebarContainer_1jdt4_1",leadsSection:"_leadsSection_1jdt4_17",leadCard:"_leadCard_1jdt4_33",leadIcon:"_leadIcon_1jdt4_71",leadDays:"_leadDays_1jdt4_81",leadCount:"_leadCount_1jdt4_91",eventsSection:"_eventsSection_1jdt4_103",eventGroup:"_eventGroup_1jdt4_143",eventGroupDate:"_eventGroupDate_1jdt4_151",eventItem:"_eventItem_1jdt4_163",eventDetails:"_eventDetails_1jdt4_195",eventTitle:"_eventTitle_1jdt4_209",eventTime:"_eventTime_1jdt4_231",calendarsSection:"_calendarsSection_1jdt4_253",collapsibleHeader:"_collapsibleHeader_1jdt4_269",headerTitle:"_headerTitle_1jdt4_297",calendarCount:"_calendarCount_1jdt4_311",chevronIcon:"_chevronIcon_1jdt4_329",collapsed:"_collapsed_1jdt4_337",collapsibleContent:"_collapsibleContent_1jdt4_345",hidden:"_hidden_1jdt4_361",circularCheckbox:"_circularCheckbox_1jdt4_379",checkedIcon:"_checkedIcon_1jdt4_397",calendarIcon:"_calendarIcon_1jdt4_413",syncButton:"_syncButton_1jdt4_429",eventsContainer:"_eventsContainer_1jdt4_481",calendarsList:"_calendarsList_1jdt4_555",calendarItemText:"_calendarItemText_1jdt4_613",addEventButton:"_addEventButton_1jdt4_639",customCheckIcon:"_customCheckIcon_1jdt4_693",uncheckedCircle:"_uncheckedCircle_1jdt4_709",calendarSelectButton:"_calendarSelectButton_1jdt4_723",calendarSelected:"_calendarSelected_1jdt4_775",currentUserCalendarTitle:"_currentUserCalendarTitle_1jdt4_795",tabsContainer:"_tabsContainer_1jdt4_831",tabButton:"_tabButton_1jdt4_851",activeTab:"_activeTab_1jdt4_887",alertBadge:"_alertBadge_1jdt4_901"};/**
|
|
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
|
|
120
|
+
*/const P2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),O2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),Fd=e=>{const t=O2(e);return t.charAt(0).toUpperCase()+t.slice(1)},Wd=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),j2=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
|
|
125
|
+
*/var R2={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
|
|
130
|
+
*/const N2=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,...R2,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Wd("lucide",o),...!s&&!j2(a)&&{"aria-hidden":"true"},...a},[...i.map(([u,d])=>v.createElement(u,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
|
|
135
|
+
*/const vi=(e,t)=>{const r=v.forwardRef(({className:n,...o},s)=>v.createElement(N2,{ref:s,iconNode:t,className:Wd(`lucide-${P2(Fd(e))}`,`lucide-${e}`,n),...o}));return r.displayName=Fd(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
|
|
140
|
+
*/const $2=vi("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
|
|
145
|
+
*/const L2=vi("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
|
|
150
|
+
*/const ic=vi("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 L2=gi("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),Wd=Symbol.for("constructDateFrom");function ic(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Wd in e?e[Wd](t):e instanceof Date?new e.constructor(t):new Date(t)}function sn(e,t){return ic(t||e,e)}function Ud(e,t,r){const[n,o]=[+sn(e.start,r?.in),+sn(e.end,r?.in)].sort((a,c)=>a-c),[s,i]=[+sn(t.start,r?.in),+sn(t.end,r?.in)].sort((a,c)=>a-c);return n<i&&s<o}function vi(e){"@babel/helpers - typeof";return vi=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},vi(e)}var z2=/^\s+/,B2=/\s+$/;function De(e,t){if(e=e||"",t=t||{},e instanceof De)return e;if(!(this instanceof De))return new De(e,t);var r=F2(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}De.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=Gd(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=Vd(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=Vd(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=Hd(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=Hd(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 Yd(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return V2(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(_t(this._r,255)*100)+"%",g:Math.round(_t(this._g,255)*100)+"%",b:Math.round(_t(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(_t(this._r,255)*100)+"%, "+Math.round(_t(this._g,255)*100)+"%, "+Math.round(_t(this._b,255)*100)+"%)":"rgba("+Math.round(_t(this._r,255)*100)+"%, "+Math.round(_t(this._g,255)*100)+"%, "+Math.round(_t(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:n1[Yd(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var r="#"+qd(this._r,this._g,this._b,this._a),n=r,o=this._gradientType?"GradientType = 1, ":"";if(t){var s=De(t);n="#"+qd(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 De(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(G2,arguments)},brighten:function(){return this._applyModification(K2,arguments)},darken:function(){return this._applyModification(Q2,arguments)},desaturate:function(){return this._applyModification(Y2,arguments)},saturate:function(){return this._applyModification(q2,arguments)},greyscale:function(){return this._applyModification(Z2,arguments)},spin:function(){return this._applyModification(X2,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(t1,arguments)},complement:function(){return this._applyCombination(J2,arguments)},monochromatic:function(){return this._applyCombination(r1,arguments)},splitcomplement:function(){return this._applyCombination(e1,arguments)},triad:function(){return this._applyCombination(Zd,[3])},tetrad:function(){return this._applyCombination(Zd,[4])}},De.fromRatio=function(e,t){if(vi(e)=="object"){var r={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?r[n]=e[n]:r[n]=Ao(e[n]));e=r}return De(e,t)};function F2(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=a1(e)),vi(e)=="object"&&(Kr(e.r)&&Kr(e.g)&&Kr(e.b)?(t=W2(e.r,e.g,e.b),i=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Kr(e.h)&&Kr(e.s)&&Kr(e.v)?(n=Ao(e.s),o=Ao(e.v),t=H2(e.h,n,o),i=!0,a="hsv"):Kr(e.h)&&Kr(e.s)&&Kr(e.l)&&(n=Ao(e.s),s=Ao(e.l),t=U2(e.h,n,s),i=!0,a="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=Gd(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 W2(e,t,r){return{r:_t(e,255)*255,g:_t(t,255)*255,b:_t(r,255)*255}}function Hd(e,t,r){e=_t(e,255),t=_t(t,255),r=_t(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 U2(e,t,r){var n,o,s;e=_t(e,360),t=_t(t,100),r=_t(r,100);function i(u,d,f){return f<0&&(f+=1),f>1&&(f-=1),f<1/6?u+(d-u)*6*f:f<1/2?d:f<2/3?u+(d-u)*(2/3-f)*6:u}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 Vd(e,t,r){e=_t(e,255),t=_t(t,255),r=_t(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 H2(e,t,r){e=_t(e,360)*6,t=_t(t,100),r=_t(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,u=[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:u*255,g:d*255,b:f*255}}function Yd(e,t,r,n){var o=[Er(Math.round(e).toString(16)),Er(Math.round(t).toString(16)),Er(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 V2(e,t,r,n,o){var s=[Er(Math.round(e).toString(16)),Er(Math.round(t).toString(16)),Er(Math.round(r).toString(16)),Er(Kd(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 qd(e,t,r,n){var o=[Er(Kd(n)),Er(Math.round(e).toString(16)),Er(Math.round(t).toString(16)),Er(Math.round(r).toString(16))];return o.join("")}De.equals=function(e,t){return!e||!t?!1:De(e).toRgbString()==De(t).toRgbString()},De.random=function(){return De.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function Y2(e,t){t=t===0?0:t||10;var r=De(e).toHsl();return r.s-=t/100,r.s=yi(r.s),De(r)}function q2(e,t){t=t===0?0:t||10;var r=De(e).toHsl();return r.s+=t/100,r.s=yi(r.s),De(r)}function Z2(e){return De(e).desaturate(100)}function G2(e,t){t=t===0?0:t||10;var r=De(e).toHsl();return r.l+=t/100,r.l=yi(r.l),De(r)}function K2(e,t){t=t===0?0:t||10;var r=De(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)))),De(r)}function Q2(e,t){t=t===0?0:t||10;var r=De(e).toHsl();return r.l-=t/100,r.l=yi(r.l),De(r)}function X2(e,t){var r=De(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,De(r)}function J2(e){var t=De(e).toHsl();return t.h=(t.h+180)%360,De(t)}function Zd(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=De(e).toHsl(),n=[De(e)],o=360/t,s=1;s<t;s++)n.push(De({h:(r.h+s*o)%360,s:r.s,l:r.l}));return n}function e1(e){var t=De(e).toHsl(),r=t.h;return[De(e),De({h:(r+72)%360,s:t.s,l:t.l}),De({h:(r+216)%360,s:t.s,l:t.l})]}function t1(e,t,r){t=t||6,r=r||30;var n=De(e).toHsl(),o=360/r,s=[De(e)];for(n.h=(n.h-(o*t>>1)+720)%360;--t;)n.h=(n.h+o)%360,s.push(De(n));return s}function r1(e,t){t=t||6;for(var r=De(e).toHsv(),n=r.h,o=r.s,s=r.v,i=[],a=1/t;t--;)i.push(De({h:n,s:o,v:s})),s=(s+a)%1;return i}De.mix=function(e,t,r){r=r===0?0:r||50;var n=De(e).toRgb(),o=De(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 De(i)},De.readability=function(e,t){var r=De(e),n=De(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},De.isReadable=function(e,t,r){var n=De.readability(e,t),o,s;switch(s=!1,o=c1(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},De.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 u=0;u<t.length;u++)s=De.readability(e,t[u]),s>o&&(o=s,n=De(t[u]));return De.isReadable(e,n,{level:a,size:c})||!i?n:(r.includeFallbackColors=!1,De.mostReadable(e,["#fff","#000"],r))};var ac=De.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"},n1=De.hexNames=o1(ac);function o1(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function Gd(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function _t(e,t){s1(e)&&(e="100%");var r=i1(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 yi(e){return Math.min(1,Math.max(0,e))}function dr(e){return parseInt(e,16)}function s1(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function i1(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Er(e){return e.length==1?"0"+e:""+e}function Ao(e){return e<=1&&(e=e*100+"%"),e}function Kd(e){return Math.round(parseFloat(e)*255).toString(16)}function Qd(e){return dr(e)/255}var Dr=(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 Kr(e){return!!Dr.CSS_UNIT.exec(e)}function a1(e){e=e.replace(z2,"").replace(B2,"").toLowerCase();var t=!1;if(ac[e])e=ac[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=Dr.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=Dr.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Dr.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=Dr.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Dr.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=Dr.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Dr.hex8.exec(e))?{r:dr(r[1]),g:dr(r[2]),b:dr(r[3]),a:Qd(r[4]),format:t?"name":"hex8"}:(r=Dr.hex6.exec(e))?{r:dr(r[1]),g:dr(r[2]),b:dr(r[3]),format:t?"name":"hex"}:(r=Dr.hex4.exec(e))?{r:dr(r[1]+""+r[1]),g:dr(r[2]+""+r[2]),b:dr(r[3]+""+r[3]),a:Qd(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=Dr.hex3.exec(e))?{r:dr(r[1]+""+r[1]),g:dr(r[2]+""+r[2]),b:dr(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function c1(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 Xd="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",l1="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",u1="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",Jd="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",ef=y.createContext(void 0),d1=({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(u=>{localStorage.setItem("user_email",u),r({userEmail:u})},[]),i=y.useCallback(u=>{localStorage.setItem("user_outlook",u),o({userEmail:u})},[]),a=y.useCallback(()=>{localStorage.removeItem("user_email"),r({userEmail:null})},[]),c=!!t.userEmail;return l.jsx(ef.Provider,{value:{session:t,sessionoutlook:n,login:s,loginOutlook:i,logout:a,isAuthenticated:c},children:e})},cc=()=>{const e=y.useContext(ef);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e};function tf(e,t){return function(){return e.apply(t,arguments)}}const{toString:f1}=Object.prototype,{getPrototypeOf:lc}=Object,{iterator:bi,toStringTag:rf}=Symbol,xi=(e=>t=>{const r=f1.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),kr=e=>(e=e.toLowerCase(),t=>xi(t)===e),_i=e=>t=>typeof t===e,{isArray:Yn}=Array,To=_i("undefined");function Io(e){return e!==null&&!To(e)&&e.constructor!==null&&!To(e.constructor)&&or(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const nf=kr("ArrayBuffer");function p1(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&nf(e.buffer),t}const h1=_i("string"),or=_i("function"),of=_i("number"),Mo=e=>e!==null&&typeof e=="object",m1=e=>e===!0||e===!1,wi=e=>{if(xi(e)!=="object")return!1;const t=lc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(rf in e)&&!(bi in e)},g1=e=>{if(!Mo(e)||Io(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},v1=kr("Date"),y1=kr("File"),b1=kr("Blob"),x1=kr("FileList"),_1=e=>Mo(e)&&or(e.pipe),w1=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||or(e.append)&&((t=xi(e))==="formdata"||t==="object"&&or(e.toString)&&e.toString()==="[object FormData]"))},S1=kr("URLSearchParams"),[C1,E1,D1,k1]=["ReadableStream","Request","Response","Headers"].map(kr),A1=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Po(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),Yn(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(Io(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 sf(e,t){if(Io(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 yn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,af=e=>!To(e)&&e!==yn;function uc(){const{caseless:e}=af(this)&&this||{},t={},r=(n,o)=>{const s=e&&sf(t,o)||o;wi(t[s])&&wi(n)?t[s]=uc(t[s],n):wi(n)?t[s]=uc({},n):Yn(n)?t[s]=n.slice():t[s]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&Po(arguments[n],r);return t}const T1=(e,t,r,{allOwnKeys:n}={})=>(Po(t,(o,s)=>{r&&or(o)?e[s]=tf(o,r):e[s]=o},{allOwnKeys:n}),e),I1=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),M1=(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)},P1=(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&&lc(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},O1=(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},j1=e=>{if(!e)return null;if(Yn(e))return e;let t=e.length;if(!of(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},R1=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&lc(Uint8Array)),N1=(e,t)=>{const n=(e&&e[bi]).call(e);let o;for(;(o=n.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},$1=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},L1=kr("HTMLFormElement"),z1=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),cf=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),B1=kr("RegExp"),lf=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Po(r,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(n[s]=i||o)}),Object.defineProperties(e,n)},F1=e=>{lf(e,(t,r)=>{if(or(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(or(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+"'")})}})},W1=(e,t)=>{const r={},n=o=>{o.forEach(s=>{r[s]=!0})};return Yn(e)?n(e):n(String(e).split(t)),r},U1=()=>{},H1=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function V1(e){return!!(e&&or(e.append)&&e[rf]==="FormData"&&e[bi])}const Y1=e=>{const t=new Array(10),r=(n,o)=>{if(Mo(n)){if(t.indexOf(n)>=0)return;if(Io(n))return n;if(!("toJSON"in n)){t[o]=n;const s=Yn(n)?[]:{};return Po(n,(i,a)=>{const c=r(i,o+1);!To(c)&&(s[a]=c)}),t[o]=void 0,s}}return n};return r(e,0)},q1=kr("AsyncFunction"),Z1=e=>e&&(Mo(e)||or(e))&&or(e.then)&&or(e.catch),uf=((e,t)=>e?setImmediate:t?((r,n)=>(yn.addEventListener("message",({source:o,data:s})=>{o===yn&&s===r&&n.length&&n.shift()()},!1),o=>{n.push(o),yn.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",or(yn.postMessage)),G1=typeof queueMicrotask<"u"?queueMicrotask.bind(yn):typeof process<"u"&&process.nextTick||uf,z={isArray:Yn,isArrayBuffer:nf,isBuffer:Io,isFormData:w1,isArrayBufferView:p1,isString:h1,isNumber:of,isBoolean:m1,isObject:Mo,isPlainObject:wi,isEmptyObject:g1,isReadableStream:C1,isRequest:E1,isResponse:D1,isHeaders:k1,isUndefined:To,isDate:v1,isFile:y1,isBlob:b1,isRegExp:B1,isFunction:or,isStream:_1,isURLSearchParams:S1,isTypedArray:R1,isFileList:x1,forEach:Po,merge:uc,extend:T1,trim:A1,stripBOM:I1,inherits:M1,toFlatObject:P1,kindOf:xi,kindOfTest:kr,endsWith:O1,toArray:j1,forEachEntry:N1,matchAll:$1,isHTMLForm:L1,hasOwnProperty:cf,hasOwnProp:cf,reduceDescriptors:lf,freezeMethods:F1,toObjectSet:W1,toCamelCase:z1,noop:U1,toFiniteNumber:H1,findKey:sf,global:yn,isContextDefined:af,isSpecCompliantForm:V1,toJSONObject:Y1,isAsyncFn:q1,isThenable:Z1,setImmediate:uf,asap:G1,isIterable:e=>e!=null&&or(e[bi])};function Le(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(Le,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 df=Le.prototype,ff={};["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=>{ff[e]={value:e}}),Object.defineProperties(Le,ff),Object.defineProperty(df,"isAxiosError",{value:!0}),Le.from=(e,t,r,n,o,s)=>{const i=Object.create(df);return z.toFlatObject(e,i,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),Le.call(i,e.message,t,r,n,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const K1=null;function dc(e){return z.isPlainObject(e)||z.isArray(e)}function pf(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function hf(e,t,r){return e?e.concat(t).map(function(o,s){return o=pf(o),!r&&s?"["+o+"]":o}).join(r?".":""):t}function Q1(e){return z.isArray(e)&&!e.some(dc)}const X1=z.toFlatObject(z,{},null,function(t){return/^is[A-Z]/.test(t)});function Si(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(p,b){return!z.isUndefined(b[p])});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 u(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 Le("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,p,b){let w=m;if(m&&!b&&typeof m=="object"){if(z.endsWith(p,"{}"))p=n?p:p.slice(0,-2),m=JSON.stringify(m);else if(z.isArray(m)&&Q1(m)||(z.isFileList(m)||z.endsWith(p,"[]"))&&(w=z.toArray(m)))return p=pf(p),w.forEach(function(E,S){!(z.isUndefined(E)||E===null)&&t.append(i===!0?hf([p],S,s):i===null?p:p+"[]",u(E))}),!1}return dc(m)?!0:(t.append(hf(b,p,s),u(m)),!1)}const f=[],h=Object.assign(X1,{defaultVisitor:d,convertValue:u,isVisitable:dc});function v(m,p){if(!z.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+p.join("."));f.push(m),z.forEach(m,function(w,C){(!(z.isUndefined(w)||w===null)&&o.call(t,w,z.isString(C)?C.trim():C,p,h))===!0&&v(w,p?p.concat(C):[C])}),f.pop()}}if(!z.isObject(e))throw new TypeError("data must be an object");return v(e),t}function mf(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function fc(e,t){this._pairs=[],e&&Si(e,this,t)}const gf=fc.prototype;gf.append=function(t,r){this._pairs.push([t,r])},gf.toString=function(t){const r=t?function(n){return t.call(this,n,mf)}:mf;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function J1(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function vf(e,t,r){if(!t)return e;const n=r&&r.encode||J1;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 fc(t,r).toString(n),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class yf{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 bf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ex={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:fc,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},pc=typeof window<"u"&&typeof document<"u",hc=typeof navigator=="object"&&navigator||void 0,tx=pc&&(!hc||["ReactNative","NativeScript","NS"].indexOf(hc.product)<0),rx=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",nx=pc&&window.location.href||"http://localhost",Xt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pc,hasStandardBrowserEnv:tx,hasStandardBrowserWebWorkerEnv:rx,navigator:hc,origin:nx},Symbol.toStringTag,{value:"Module"})),...ex};function ox(e,t){return Si(e,new Xt.classes.URLSearchParams,{visitor:function(r,n,o,s){return Xt.isNode&&z.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function sx(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function ix(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 xf(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]=ix(o[i])),!a)}if(z.isFormData(e)&&z.isFunction(e.entries)){const r={};return z.forEachEntry(e,(n,o)=>{t(sx(n),o,r,0)}),r}return null}function ax(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 Oo={transitional:bf,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(xf(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 ox(t,this.formSerializer).toString();if((a=z.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Si(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||o?(r.setContentType("application/json",!1),ax(t)):t}],transformResponse:[function(t){const r=this.transitional||Oo.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"?Le.from(a,Le.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:Xt.classes.FormData,Blob:Xt.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=>{Oo.headers[e]={}});const cx=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"]),lx=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]&&
|
|
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[_f]=this[_f]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=jo(i);n[a]||(px(o,i),n[a]=!0)}return z.isArray(t)?t.forEach(s):s(t),this}};sr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),z.reduceDescriptors(sr.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),z.freezeMethods(sr);function gc(e,t){const r=this||Oo,n=t||r,o=sr.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 wf(e){return!!(e&&e.__CANCEL__)}function qn(e,t,r){Le.call(this,e??"canceled",Le.ERR_CANCELED,t,r),this.name="CanceledError"}z.inherits(qn,Le,{__CANCEL__:!0});function Sf(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Le("Request failed with status code "+r.status,[Le.ERR_BAD_REQUEST,Le.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function hx(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function mx(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 u=Date.now(),d=n[s];i||(i=u),r[o]=c,n[o]=u;let f=s,h=0;for(;f!==o;)h+=r[f++],f=f%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),u-i<t)return;const v=d&&u-d;return v?Math.round(h*1e3/v):void 0}}function gx(e,t){let r=0,n=1e3/t,o,s;const i=(u,d=Date.now())=>{r=d,o=null,s&&(clearTimeout(s),s=null),e(...u)};return[(...u)=>{const d=Date.now(),f=d-r;f>=n?i(u,d):(o=u,s||(s=setTimeout(()=>{s=null,i(o)},n-f)))},()=>o&&i(o)]}const Ei=(e,t,r=3)=>{let n=0;const o=mx(50,250);return gx(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,c=i-n,u=o(c),d=i<=a;n=i;const f={loaded:i,total:a,progress:a?i/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&d?(a-i)/u:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(f)},r)},Cf=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Ef=e=>(...t)=>z.asap(()=>e(...t)),vx=Xt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Xt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Xt.origin),Xt.navigator&&/(msie|trident)/i.test(Xt.navigator.userAgent)):()=>!0,yx=Xt.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 bx(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function xx(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Df(e,t,r){let n=!bx(t);return e&&(n||r==!1)?xx(e,t):t}const kf=e=>e instanceof sr?{...e}:e;function bn(e,t){t=t||{};const r={};function n(u,d,f,h){return z.isPlainObject(u)&&z.isPlainObject(d)?z.merge.call({caseless:h},u,d):z.isPlainObject(d)?z.merge({},d):z.isArray(d)?d.slice():d}function o(u,d,f,h){if(z.isUndefined(d)){if(!z.isUndefined(u))return n(void 0,u,f,h)}else return n(u,d,f,h)}function s(u,d){if(!z.isUndefined(d))return n(void 0,d)}function i(u,d){if(z.isUndefined(d)){if(!z.isUndefined(u))return n(void 0,u)}else return n(void 0,d)}function a(u,d,f){if(f in t)return n(u,d);if(f in e)return n(void 0,u)}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:(u,d,f)=>o(kf(u),kf(d),f,!0)};return z.forEach(Object.keys({...e,...t}),function(d){const f=c[d]||o,h=f(e[d],t[d],d);z.isUndefined(h)&&f!==a||(r[d]=h)}),r}const Af=e=>{const t=bn({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=sr.from(i),t.url=vf(Df(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(Xt.hasStandardBrowserEnv||Xt.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((c=i.getContentType())!==!1){const[u,...d]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...d].join("; "))}}if(Xt.hasStandardBrowserEnv&&(n&&z.isFunction(n)&&(n=n(t)),n||n!==!1&&vx(t.url))){const u=o&&s&&yx.read(s);u&&i.set(o,u)}return t},_x=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const o=Af(e);let s=o.data;const i=sr.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=o,d,f,h,v,m;function p(){v&&v(),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 w(){if(!b)return;const E=sr.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),_={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:E,config:e,request:b};Sf(function(D){r(D),p()},function(D){n(D),p()},_),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 Le("Request aborted",Le.ECONNABORTED,e,b)),b=null)},b.onerror=function(){n(new Le("Network Error",Le.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let S=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const _=o.transitional||bf;o.timeoutErrorMessage&&(S=o.timeoutErrorMessage),n(new Le(S,_.clarifyTimeoutError?Le.ETIMEDOUT:Le.ECONNABORTED,e,b)),b=null},s===void 0&&i.setContentType(null),"setRequestHeader"in b&&z.forEach(i.toJSON(),function(S,_){b.setRequestHeader(_,S)}),z.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),a&&a!=="json"&&(b.responseType=o.responseType),u&&([h,m]=Ei(u,!0),b.addEventListener("progress",h)),c&&b.upload&&([f,v]=Ei(c),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",v)),(o.cancelToken||o.signal)&&(d=E=>{b&&(n(!E||E.type?new qn(null,e,b):E),b.abort(),b=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const C=hx(o.url);if(C&&Xt.protocols.indexOf(C)===-1){n(new Le("Unsupported protocol "+C+":",Le.ERR_BAD_REQUEST,e));return}b.send(s||null)})},wx=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const s=function(u){if(!o){o=!0,a();const d=u instanceof Error?u:this.reason;n.abort(d instanceof Le?d:new qn(d instanceof Error?d.message:d))}};let i=t&&setTimeout(()=>{i=null,s(new Le(`timeout ${t} of ms exceeded`,Le.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:c}=n;return c.unsubscribe=()=>z.asap(a),c}},Sx=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},Cx=async function*(e,t){for await(const r of Ex(e))yield*Sx(r,t)},Ex=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()}},Tf=(e,t,r,n)=>{const o=Cx(e,t);let s=0,i,a=c=>{i||(i=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await o.next();if(u){a(),c.close();return}let f=d.byteLength;if(r){let h=s+=f;r(h)}c.enqueue(new Uint8Array(d))}catch(u){throw a(u),u}},cancel(c){return a(c),o.return()}},{highWaterMark:2})},Di=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",If=Di&&typeof ReadableStream=="function",Dx=Di&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Mf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},kx=If&&Mf(()=>{let e=!1;const t=new Request(Xt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Pf=64*1024,vc=If&&Mf(()=>z.isReadableStream(new Response("").body)),ki={stream:vc&&(e=>e.body)};Di&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ki[t]&&(ki[t]=z.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new Le(`Response type '${t}' is not supported`,Le.ERR_NOT_SUPPORT,n)})})})(new Response);const Ax=async e=>{if(e==null)return 0;if(z.isBlob(e))return e.size;if(z.isSpecCompliantForm(e))return(await new Request(Xt.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 Dx(e)).byteLength},Tx=async(e,t)=>{const r=z.toFiniteNumber(e.getContentLength());return r??Ax(t)},yc={http:K1,xhr:_x,fetch:Di&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:d,withCredentials:f="same-origin",fetchOptions:h}=Af(e);u=u?(u+"").toLowerCase():"text";let v=wx([o,s&&s.toAbortSignal()],i),m;const p=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let b;try{if(c&&kx&&r!=="get"&&r!=="head"&&(b=await Tx(d,n))!==0){let _=new Request(t,{method:"POST",body:n,duplex:"half"}),W;if(z.isFormData(n)&&(W=_.headers.get("content-type"))&&d.setContentType(W),_.body){const[D,A]=Cf(b,Ei(Ef(c)));n=Tf(_.body,Pf,D,A)}}z.isString(f)||(f=f?"include":"omit");const w="credentials"in Request.prototype;m=new Request(t,{...h,signal:v,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",credentials:w?f:void 0});let C=await fetch(m,h);const E=vc&&(u==="stream"||u==="response");if(vc&&(a||E&&p)){const _={};["status","statusText","headers"].forEach(M=>{_[M]=C[M]});const W=z.toFiniteNumber(C.headers.get("content-length")),[D,A]=a&&Cf(W,Ei(Ef(a),!0))||[];C=new Response(Tf(C.body,Pf,D,()=>{A&&A(),p&&p()}),_)}u=u||"text";let S=await ki[z.findKey(ki,u)||"text"](C,e);return!E&&p&&p(),await new Promise((_,W)=>{Sf(_,W,{data:S,headers:sr.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:m})})}catch(w){throw p&&p(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new Le("Network Error",Le.ERR_NETWORK,e,m),{cause:w.cause||w}):Le.from(w,w&&w.code,e,m)}})};z.forEach(yc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Of=e=>`- ${e}`,Ix=e=>z.isFunction(e)||e===null||e===!1,jf={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,!Ix(r)&&(n=yc[(i=String(r)).toLowerCase()],n===void 0))throw new Le(`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(
|
|
159
|
-
`):" "+
|
|
160
|
-
`+s):n.stack=s}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=bn(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&Ti.assertOptions(n,{silentJSONParsing:Wr.transitional(Wr.boolean),forcedJSONParsing:Wr.transitional(Wr.boolean),clarifyTimeoutError:Wr.transitional(Wr.boolean)},!1),o!=null&&(z.isFunction(o)?r.paramsSerializer={serialize:o}:Ti.assertOptions(o,{encode:Wr.function,serialize:Wr.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Ti.assertOptions(r,{baseUrl:Wr.spelling("baseURL"),withXsrfToken:Wr.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=sr.concat(i,s);const a=[];let c=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(r)===!1||(c=c&&p.synchronous,a.unshift(p.fulfilled,p.rejected))});const u=[];this.interceptors.response.forEach(function(p){u.push(p.fulfilled,p.rejected)});let d,f=0,h;if(!c){const m=[Rf.bind(this),void 0];for(m.unshift(...a),m.push(...u),h=m.length,d=Promise.resolve(r);f<h;)d=d.then(m[f++],m[f++]);return d}h=a.length;let v=r;for(f=0;f<h;){const m=a[f++],p=a[f++];try{v=m(v)}catch(b){p.call(this,b);break}}try{d=Rf.call(this,v)}catch(m){return Promise.reject(m)}for(f=0,h=u.length;f<h;)d=d.then(u[f++],u[f++]);return d}getUri(t){t=bn(this.defaults,t);const r=Df(t.baseURL,t.url,t.allowAbsoluteUrls);return vf(r,t.params,t.paramsSerializer)}};z.forEach(["delete","get","head","options"],function(t){xn.prototype[t]=function(r,n){return this.request(bn(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(bn(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}xn.prototype[t]=r(),xn.prototype[t+"Form"]=r(!0)});let Px=class p0{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 qn(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 p0(function(o){t=o}),cancel:t}}};function Ox(e){return function(r){return e.apply(null,r)}}function jx(e){return z.isObject(e)&&e.isAxiosError===!0}const xc={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(xc).forEach(([e,t])=>{xc[t]=e});function Lf(e){const t=new xn(e),r=tf(xn.prototype.request,t);return z.extend(r,xn.prototype,t,{allOwnKeys:!0}),z.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return Lf(bn(e,o))},r}const Rt=Lf(Oo);Rt.Axios=xn,Rt.CanceledError=qn,Rt.CancelToken=Px,Rt.isCancel=wf,Rt.VERSION=Nf,Rt.toFormData=Si,Rt.AxiosError=Le,Rt.Cancel=Rt.CanceledError,Rt.all=function(t){return Promise.all(t)},Rt.spread=Ox,Rt.isAxiosError=jx,Rt.mergeConfig=bn,Rt.AxiosHeaders=sr,Rt.formToJSON=e=>xf(z.isHTMLForm(e)?new FormData(e):e),Rt.getAdapter=jf.getAdapter,Rt.HttpStatusCode=xc,Rt.default=Rt;const{Axios:GT,AxiosError:KT,CanceledError:QT,isCancel:XT,CancelToken:JT,VERSION:e5,all:t5,Cancel:r5,isAxiosError:n5,spread:o5,toFormData:s5,AxiosHeaders:i5,HttpStatusCode:a5,formToJSON:c5,getAdapter:l5,mergeConfig:u5}=Rt,zf={token:null},Rx=e=>{zf.token=e},Et=Rt.create({headers:{"Content-Type":"application/json"}});Et.interceptors.request.use(e=>{const t=zf.token;return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));const Bf=y.createContext(void 0),Nx=({config:e,children:t})=>(y.useEffect(()=>{e.getToken&&Rx(e.getToken)},[e.getToken]),l.jsx(Bf.Provider,{value:e,children:t})),_c=()=>{const e=y.useContext(Bf);if(!e)throw new Error("useApiConfig debe ser usado dentro de un ApiProvider");return e},Ii=()=>{const{calendarApiUrl:e}=_c();return{getGoogleAuthUrl:async()=>{try{const i=`${e}/api/Calendario/v1/auth-url-Google`;return(await Et.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 Et.post(c,{})).data}catch(a){throw console.error("Error al guardar credenciales de Google:",a),a}},getGoogleCalendars:async(i,a)=>{try{return(await Et.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 Et.post(`${e}/api/Calendario/v1/google/SincronizarEnviarEventosAsync?usrMail=${encodeURIComponent(i)}&disID=${a}&UsuarioID=${c}`)).data}catch(u){throw console.error("Error al sincronizar eventos con Google Calendar:",u),u}},getGoogleEventsByMonth:async i=>{try{return(await Et.post(`${e}/api/Calendario/v1/google/ObtenerEventosGoogleAsyncXMes`,i)).data}catch(a){throw console.error("Error al obtener eventos de Google Calendar por mes:",a),a}}}},Ff="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAASFBMVEVChfRHcExDhOAWaNUZfjjkTDf////6/P7b6fu61fj7wCj7vASZv/VuoPBQjvVCr19GifE0qFM4gerrRjMubcQQaucZZ9MYgTpc4mWWAAAABnRSTlP/AFtbW/eMEQaPAAAAfUlEQVR42q3Pyw4CIQyFYVDbigKOl6Pv/6a2ZBYN08TEzL9gcb6waDqkubd1TEsEWkp7Q3e9RuvOrsvV+g0Fi+jaZIKC0sECzMDCDK51C9zR9A2gPhCC6HgOoIFL/KMD1cMfl39GNxc9NVrh7jKgHAPlCGwPgSgbnDYw9vwFKv0VRfpGYZ8AAAAASUVORK5CYII=",$x=({disID:e,usrID:t})=>{const[r,n]=y.useState(null),o=Ii(),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();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 l.jsxs("div",{className:"flex",children:[l.jsxs("div",{className:xe.syncButton,onClick:s,children:[l.jsx("div",{className:xe.customCheckIcon,children:l.jsx("div",{className:xe.uncheckedCircle})}),l.jsx("img",{src:Ff,width:18}),l.jsx("span",{children:"Google Calendar"})]}),r&&l.jsx("p",{className:"text-red-500 mt-2",children:r})]})},wc=()=>{const{calendarApiUrl:e}=_c();return{getOutlookAuthUrl:async()=>{try{const i=`${e}/api/Calendario/v1/auth-url-Outlook`,a=await Et.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 Et.post(c,{})).data}catch(a){throw console.error("Error al guardar credenciales Outlook:",a),a}},syncOutlookEvents:async(i,a,c)=>{try{return(await Et.post(`${e}/api/Calendario/v1/outlook/SincronizarEnviarEventosAsync?usrMail=${encodeURIComponent(i)}&disID=${a}&UsuarioID=${c}`)).data}catch(u){throw console.error("Error al sincronizar eventos con outlook Calendar:",u),u}},getOutlookCalendars:async(i,a)=>{try{return(await Et.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{return(await Et.post(`${e}/api/Calendario/v1/outlook/ObtenerEventosoutlookAsyncXMes`,i)).data}catch(a){throw console.error("Error al obtener eventos de Outlook Calendar por mes:",a),a}}}},Wf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAYCAMAAAA8nnbJAAAAflBMVEUAAAAAV34AMFoAID0ATmsAL1oATXcAZZAAIUgANmQArPAAfd0BedoAacQAZbsAkuMActcAa9QAsfMAjfMAUJL///8Ame8Aht4A6v8A2v8Atvguid0AfMIAo+wAWrYA3/+q0/MAQ38ASIjB4PeHwe4AU7JlsekAdcMAXqgApf4WoQK+AAAACnRSTlMATjUWISlCbAuE1QOT9gAAAP1JREFUKM9t0GF7QzAQwPG2xiw5JGlICWVsrX3/L7i7Gyae/l944efinpzW4ktQfPrvorIgiHaW5UHZ29Hu3Dd235uTUkJnMHGj2NKISvh/TmBdX9c1W/pz5SQOOtsFFl0lBfx8YeCH6aHJhEG89X2/2aOchnLSIC1IACWwZjFdfmnwpSeDg/kSJH0AsLPLZgBoam9jsp2p8EylLK2rjDAmb89kALzLoLUaMyx3bs6rajHlh8FnZHzN+VwVxWKI+F5jFgdnW2BsaSUxUBRYYUdXrYaDMfbxydmuEU+32tJ7+5fB7QvUwBrDCcq4Z2AirJX7udCaziUMVHI+hPQLqRAg85aAu30AAAAASUVORK5CYII=",Lx=({disID:e,usrID:t})=>{const[r,n]=y.useState(null),o=wc(),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 l.jsxs("div",{className:"flex",children:[l.jsxs("div",{className:xe.syncButton,onClick:s,children:[l.jsx("div",{className:xe.customCheckIcon,children:l.jsx("div",{className:xe.uncheckedCircle})}),l.jsx("img",{src:Wf,width:20}),l.jsx("span",{children:"Outlook"})]}),r&&l.jsx("p",{className:"text-red-500 mt-2",children:r})]})},Uf="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 _n extends Error{constructor(t,r){const n=new.target.prototype;super(`${t}: Status code '${r}'`),this.statusCode=r,this.__proto__=n}}class Sc extends Error{constructor(t="A timeout occurred."){const r=new.target.prototype;super(t),this.__proto__=r}}class Ar extends Error{constructor(t="An abort occurred."){const r=new.target.prototype;super(t),this.__proto__=r}}class zx extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="UnsupportedTransportError",this.__proto__=n}}class Bx extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="DisabledTransportError",this.__proto__=n}}class Fx extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="FailedToStartTransportError",this.__proto__=n}}class Hf extends Error{constructor(t){const r=new.target.prototype;super(t),this.errorType="FailedToNegotiateWithServerError",this.__proto__=r}}class Wx extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.innerErrors=r,this.__proto__=n}}class Vf{constructor(t,r,n){this.statusCode=t,this.statusText=r,this.content=n}}class Mi{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 H;(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"})(H||(H={}));class Ro{constructor(){}log(t,r){}}Ro.instance=new Ro;const Ux="10.0.0";class Bt{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 Dt{static get isBrowser(){return!Dt.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!Dt.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!Dt.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}}function No(e,t){let r="";return wn(e)?(r=`Binary data of length ${e.byteLength}`,t&&(r+=`. Content: '${Hx(e)}'`)):typeof e=="string"&&(r=`String data of length ${e.length}`,t&&(r+=`. Content: '${e}'`)),r}function Hx(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 wn(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||e.constructor&&e.constructor.name==="ArrayBuffer")}async function Yf(e,t,r,n,o,s){const i={},[a,c]=Zn();i[a]=c,e.log(H.Trace,`(${t} transport) sending data. ${No(o,s.logMessageContent)}.`);const u=wn(o)?"arraybuffer":"text",d=await r.post(n,{content:o,headers:{...i,...s.headers},responseType:u,timeout:s.timeout,withCredentials:s.withCredentials});e.log(H.Trace,`(${t} transport) request complete. Response status: ${d.statusCode}.`)}function Vx(e){return e===void 0?new Pi(H.Information):e===null?Ro.instance:e.log!==void 0?e:new Pi(e)}class Yx{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 Pi{constructor(t){this._minLevel=t,this.out=console}log(t,r){if(t>=this._minLevel){const n=`[${new Date().toISOString()}] ${H[t]}: ${r}`;switch(t){case H.Critical:case H.Error:this.out.error(n);break;case H.Warning:this.out.warn(n);break;case H.Information:this.out.info(n);break;default:this.out.log(n);break}}}}function Zn(){let e="X-SignalR-User-Agent";return Dt.isNode&&(e="User-Agent"),[e,qx(Ux,Zx(),Kx(),Gx())]}function qx(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 Zx(){if(Dt.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function Gx(){if(Dt.isNode)return process.versions.node}function Kx(){return Dt.isNode?"NodeJS":"Browser"}function Cc(e){return e.stack?e.stack:e.message?e.message:`${e}`}function Qx(){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 Xx extends Mi{constructor(t){if(super(),this._logger=t,typeof fetch>"u"||Dt.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(Qx());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 Ar;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 Ar});let o=null;if(t.timeout){const c=t.timeout;o=setTimeout(()=>{r.abort(),this._logger.log(H.Warning,"Timeout from HTTP request."),n=new Sc},c)}t.content===""&&(t.content=void 0),t.content&&(t.headers=t.headers||{},wn(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(H.Warning,`Error from HTTP request. ${c}.`),c)}finally{o&&clearTimeout(o),t.abortSignal&&(t.abortSignal.onabort=null)}if(!s.ok){const c=await qf(s,"text");throw new _n(c||s.statusText,s.status)}const a=await qf(s,t.responseType);return new Vf(s.status,s.statusText,a)}getCookieString(t){let r="";return Dt.isNode&&this._jar&&this._jar.getCookies(t,(n,o)=>r=o.join("; ")),r}}function qf(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 Jx extends Mi{constructor(t){super(),this._logger=t}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new Ar):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&&(wn(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 Ar)}),t.timeout&&(o.timeout=t.timeout),o.onload=()=>{t.abortSignal&&(t.abortSignal.onabort=null),o.status>=200&&o.status<300?r(new Vf(o.status,o.statusText,o.response||o.responseText)):n(new _n(o.response||o.responseText||o.statusText,o.status))},o.onerror=()=>{this._logger.log(H.Warning,`Error from HTTP request. ${o.status}: ${o.statusText}.`),n(new _n(o.statusText,o.status))},o.ontimeout=()=>{this._logger.log(H.Warning,"Timeout from HTTP request."),n(new Sc)},o.send(t.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class e_ extends Mi{constructor(t){if(super(),typeof fetch<"u"||Dt.isNode)this._httpClient=new Xx(t);else if(typeof XMLHttpRequest<"u")this._httpClient=new Jx(t);else throw new Error("No usable HttpClient found.")}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new Ar):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 fr{static write(t){return`${t}${fr.RecordSeparator}`}static parse(t){if(t[t.length-1]!==fr.RecordSeparator)throw new Error("Message is incomplete.");const r=t.split(fr.RecordSeparator);return r.pop(),r}}fr.RecordSeparatorCode=30,fr.RecordSeparator=String.fromCharCode(fr.RecordSeparatorCode);class t_{writeHandshakeRequest(t){return fr.write(JSON.stringify(t))}parseHandshakeResponse(t){let r,n;if(wn(t)){const a=new Uint8Array(t),c=a.indexOf(fr.RecordSeparatorCode);if(c===-1)throw new Error("Message is incomplete.");const u=c+1;r=String.fromCharCode.apply(null,Array.prototype.slice.call(a.slice(0,u))),n=a.byteLength>u?a.slice(u).buffer:null}else{const a=t,c=a.indexOf(fr.RecordSeparator);if(c===-1)throw new Error("Message is incomplete.");const u=c+1;r=a.substring(0,u),n=a.length>u?a.substring(u):null}const o=fr.parse(r),s=JSON.parse(o[0]);if(s.type)throw new Error("Expected a handshake response from the server.");return[n,s]}}var $e;(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"})($e||($e={}));class r_{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 Yx(this,t)}}class n_{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=()=>{};wn(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 o_(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,wn(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!==$e.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:$e.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 $e.Invocation:case $e.StreamItem:case $e.Completion:case $e.StreamInvocation:case $e.CancelInvocation:return!0;case $e.Close:case $e.Sequence:case $e.Ping:case $e.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:$e.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0},1e3))}}class o_{constructor(t,r,n,o){this._message=t,this._id=r,this._resolver=n,this._rejector=o}}const s_=30*1e3,i_=15*1e3,a_=1e5;var bt;(function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"})(bt||(bt={}));class Ec{static create(t,r,n,o,s,i,a){return new Ec(t,r,n,o,s,i,a)}constructor(t,r,n,o,s,i,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(H.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")},Bt.isRequired(t,"connection"),Bt.isRequired(r,"logger"),Bt.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=s??s_,this.keepAliveIntervalInMilliseconds=i??i_,this._statefulReconnectBufferSize=a??a_,this._logger=r,this._protocol=n,this.connection=t,this._reconnectPolicy=o,this._handshakeProtocol=new t_,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=bt.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:$e.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!==bt.Disconnected&&this._connectionState!==bt.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!==bt.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=bt.Connecting,this._logger.log(H.Debug,"Starting HubConnection.");try{await this._startInternal(),Dt.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=bt.Connected,this._connectionStarted=!0,this._logger.log(H.Debug,"HubConnection connected successfully.")}catch(t){return this._connectionState=bt.Disconnected,this._logger.log(H.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(H.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(n)),this._logger.log(H.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 n_(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(H.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===bt.Disconnected)return this._logger.log(H.Debug,`Call to HubConnection.stop(${t}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===bt.Disconnecting)return this._logger.log(H.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=bt.Disconnecting,this._logger.log(H.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(H.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(r===bt.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=t||new Ar("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 r_;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,u)=>{if(u){a.error(u);return}else c&&(c.type===$e.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===$e.Completion?d.error?c(new Error(d.error)):a(d.result):c(new Error(`Unexpected message type: ${d.type}`)))};const u=this._sendWithProtocol(s).catch(d=>{c(d),delete this._callbacks[s.invocationId]});this._launchStreams(n,u)})}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 $e.Invocation:this._invokeClientMethod(n).catch(o=>{this._logger.log(H.Error,`Invoke client method threw error: ${Cc(o)}`)});break;case $e.StreamItem:case $e.Completion:{const o=this._callbacks[n.invocationId];if(o){n.type===$e.Completion&&delete this._callbacks[n.invocationId];try{o(n)}catch(s){this._logger.log(H.Error,`Stream callback threw error: ${Cc(s)}`)}}break}case $e.Ping:break;case $e.Close:{this._logger.log(H.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 $e.Ack:this._messageBuffer&&this._messageBuffer._ack(n);break;case $e.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(n);break;default:this._logger.log(H.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(H.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(H.Error,o);const s=new Error(o);throw this._handshakeRejecter(s),s}else this._logger.log(H.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===bt.Connected&&this._trySendPingMessage();return}this._pingServerHandle===void 0&&(t<0&&(t=0),this._pingServerHandle=setTimeout(async()=>{this._connectionState===bt.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(H.Warning,`No client method with the name '${r}' found.`),t.invocationId&&(this._logger.log(H.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 u of o)try{const d=i;i=await u.apply(this,t.arguments),s&&i&&d&&(this._logger.log(H.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(H.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(H.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(H.Error,`Result given for '${r}' method but server is not expecting a result.`)}_connectionClosed(t){this._logger.log(H.Debug,`HubConnection.connectionClosed(${t}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||t||new Ar("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===bt.Disconnecting?this._completeClose(t):this._connectionState===bt.Connected&&this._reconnectPolicy?this._reconnect(t):this._connectionState===bt.Connected&&this._completeClose(t)}_completeClose(t){if(this._connectionStarted){this._connectionState=bt.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(t??new Error("Connection closed.")),this._messageBuffer=void 0),Dt.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(r=>r.apply(this,[t]))}catch(r){this._logger.log(H.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(H.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(t);return}if(this._connectionState=bt.Reconnecting,t?this._logger.log(H.Information,`Connection reconnecting because of error '${t}'.`):this._logger.log(H.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(i=>i.apply(this,[t]))}catch(i){this._logger.log(H.Error,`An onreconnecting callback called with error '${t}' threw error '${i}'.`)}if(this._connectionState!==bt.Reconnecting){this._logger.log(H.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;s!==null;){if(this._logger.log(H.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!==bt.Reconnecting){this._logger.log(H.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=bt.Connected,this._logger.log(H.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(i=>i.apply(this,[this.connection.connectionId]))}catch(i){this._logger.log(H.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${i}'.`)}return}catch(i){if(this._logger.log(H.Information,`Reconnect attempt failed because of error '${i}'.`),this._connectionState!==bt.Reconnecting){this._logger.log(H.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===bt.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(H.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(H.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(H.Error,`Stream 'error' callback called with '${t}' threw error: ${Cc(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:$e.Invocation}:{target:t,arguments:r,type:$e.Invocation};{const s=this._invocationId;return this._invocationId++,o.length!==0?{target:t,arguments:r,invocationId:s.toString(),streamIds:o,type:$e.Invocation}:{target:t,arguments:r,invocationId:s.toString(),type:$e.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:$e.StreamInvocation}:{target:t,arguments:r,invocationId:o.toString(),type:$e.StreamInvocation}}_createCancelInvocation(t){return{invocationId:t,type:$e.CancelInvocation}}_createStreamItemMessage(t,r){return{invocationId:t,item:r,type:$e.StreamItem}}_createCompletionMessage(t,r,n){return r?{error:r,invocationId:t,type:$e.Completion}:{invocationId:t,result:n,type:$e.Completion}}_createCloseMessage(){return{type:$e.Close}}async _trySendPingMessage(){try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}}const c_=[0,2e3,1e4,3e4,null];class Zf{constructor(t){this._retryDelays=t!==void 0?[...t,null]:c_}nextRetryDelayInMilliseconds(t){return this._retryDelays[t.previousRetryCount]}}class Sn{}Sn.Authorization="Authorization",Sn.Cookie="Cookie";class l_ extends Mi{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[Sn.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&t.headers[Sn.Authorization]&&delete t.headers[Sn.Authorization]}getCookieString(t){return this._innerClient.getCookieString(t)}}var Wt;(function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"})(Wt||(Wt={}));var Jt;(function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"})(Jt||(Jt={}));let u_=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 Gf{get pollAborted(){return this._pollAbort.aborted}constructor(t,r,n){this._httpClient=t,this._logger=r,this._pollAbort=new u_,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}async connect(t,r){if(Bt.isRequired(t,"url"),Bt.isRequired(r,"transferFormat"),Bt.isIn(r,Jt,"transferFormat"),this._url=t,this._logger.log(H.Trace,"(LongPolling transport) Connecting."),r===Jt.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]=Zn(),s={[n]:o,...this._options.headers},i={abortSignal:this._pollAbort.signal,headers:s,timeout:1e5,withCredentials:this._options.withCredentials};r===Jt.Binary&&(i.responseType="arraybuffer");const a=`${t}&_=${Date.now()}`;this._logger.log(H.Trace,`(LongPolling transport) polling: ${a}.`);const c=await this._httpClient.get(a,i);c.statusCode!==200?(this._logger.log(H.Error,`(LongPolling transport) Unexpected response code: ${c.statusCode}.`),this._closeError=new _n(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(H.Trace,`(LongPolling transport) polling: ${n}.`);const o=await this._httpClient.get(n,r);o.statusCode===204?(this._logger.log(H.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):o.statusCode!==200?(this._logger.log(H.Error,`(LongPolling transport) Unexpected response code: ${o.statusCode}.`),this._closeError=new _n(o.statusText||"",o.statusCode),this._running=!1):o.content?(this._logger.log(H.Trace,`(LongPolling transport) data received. ${No(o.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(o.content)):this._logger.log(H.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(n){this._running?n instanceof Sc?this._logger.log(H.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=n,this._running=!1):this._logger.log(H.Trace,`(LongPolling transport) Poll errored after shutdown: ${n.message}`)}}finally{this._logger.log(H.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(t){return this._running?Yf(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(H.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(H.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const t={},[r,n]=Zn();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 _n&&(s.statusCode===404?this._logger.log(H.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(H.Trace,`(LongPolling transport) Error sending a DELETE request: ${s}`)):this._logger.log(H.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(H.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(H.Trace,t),this.onclose(this._closeError)}}}class d_{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 Bt.isRequired(t,"url"),Bt.isRequired(r,"transferFormat"),Bt.isIn(r,Jt,"transferFormat"),this._logger.log(H.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!==Jt.Text){o(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let i;if(Dt.isBrowser||Dt.isWebWorker)i=new this._options.EventSource(t,{withCredentials:this._options.withCredentials});else{const a=this._httpClient.getCookieString(t),c={};c.Cookie=a;const[u,d]=Zn();c[u]=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(H.Trace,`(SSE transport) data received. ${No(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(H.Information,`SSE connected to ${this._url}`),this._eventSource=i,s=!0,n()}}catch(a){o(a);return}})}async send(t){return this._eventSource?Yf(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 f_{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){Bt.isRequired(t,"url"),Bt.isRequired(r,"transferFormat"),Bt.isIn(r,Jt,"transferFormat"),this._logger.log(H.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(Dt.isNode||Dt.isReactNative){const u={},[d,f]=Zn();u[d]=f,n&&(u[Sn.Authorization]=`Bearer ${n}`),a&&(u[Sn.Cookie]=a),i=new this._webSocketConstructor(t,void 0,{headers:{...u,...this._headers}})}else n&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n)}`);i||(i=new this._webSocketConstructor(t)),r===Jt.Binary&&(i.binaryType="arraybuffer"),i.onopen=u=>{this._logger.log(H.Information,`WebSocket connected to ${t}.`),this._webSocket=i,c=!0,o()},i.onerror=u=>{let d=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?d=u.error:d="There was an error with the transport",this._logger.log(H.Information,`(WebSockets transport) ${d}.`)},i.onmessage=u=>{if(this._logger.log(H.Trace,`(WebSockets transport) data received. ${No(u.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(u.data)}catch(d){this._close(d);return}},i.onclose=u=>{if(c)this._close(u);else{let d=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?d=u.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(H.Trace,`(WebSockets transport) sending data. ${No(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(H.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 Kf=100;class p_{constructor(t,r={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,Bt.isRequired(t,"url"),this._logger=Vx(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(Dt.isNode&&typeof require<"u"){const s=typeof __webpack_require__=="function"?__non_webpack_require__:require;n=s("ws"),o=s("eventsource")}!Dt.isNode&&typeof WebSocket<"u"&&!r.WebSocket?r.WebSocket=WebSocket:Dt.isNode&&!r.WebSocket&&n&&(r.WebSocket=n),!Dt.isNode&&typeof EventSource<"u"&&!r.EventSource?r.EventSource=EventSource:Dt.isNode&&!r.EventSource&&typeof o<"u"&&(r.EventSource=o),this._httpClient=new l_(r.httpClient||new e_(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||Jt.Binary,Bt.isIn(t,Jt,"transferFormat"),this._logger.log(H.Debug,`Starting connection with transfer format '${Jt[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(H.Error,r),await this._stopPromise,Promise.reject(new Ar(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(H.Error,r),Promise.reject(new Ar(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 Dc(this.transport)),this._sendQueue.send(t))}async stop(t){if(this._connectionState==="Disconnected")return this._logger.log(H.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(H.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(H.Error,`HttpConnection.transport.stop() threw error '${r}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(H.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===Wt.WebSockets)this.transport=this._constructTransport(Wt.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 Ar("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<Kf);if(o===Kf&&n.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(r,this._options.transport,n,t)}this.transport instanceof Gf&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(H.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(n){return this._logger.log(H.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]=Zn();r[n]=o;const s=this._resolveNegotiateUrl(t);this._logger.log(H.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 Hf("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 _n&&i.statusCode===404&&(a=a+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(H.Error,a),Promise.reject(new Hf(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(H.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 u of a){const d=this._resolveTransportOrError(u,r,o,c?.useStatefulReconnect===!0);if(d instanceof Error)i.push(`${u.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(H.Error,`Failed to start the transport '${u.transport}': ${f}`),c=void 0,i.push(new Fx(`${u.transport} failed: ${f}`,Wt[u.transport])),this._connectionState!=="Connecting"){const h="Failed to select transport before stop() was called.";return this._logger.log(H.Debug,h),Promise.reject(new Ar(h))}}}}return i.length>0?Promise.reject(new Wx(`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 Wt.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new f_(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case Wt.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new d_(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case Wt.LongPolling:return new Gf(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=Wt[t.transport];if(s==null)return this._logger.log(H.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(h_(r,s))if(t.transferFormats.map(a=>Jt[a]).indexOf(n)>=0){if(s===Wt.WebSockets&&!this._options.WebSocket||s===Wt.ServerSentEvents&&!this._options.EventSource)return this._logger.log(H.Debug,`Skipping transport '${Wt[s]}' because it is not supported in your environment.'`),new zx(`'${Wt[s]}' is not supported in your environment.`,s);this._logger.log(H.Debug,`Selecting transport '${Wt[s]}'.`);try{return this.features.reconnect=s===Wt.WebSockets?o:void 0,this._constructTransport(s)}catch(a){return a}}else return this._logger.log(H.Debug,`Skipping transport '${Wt[s]}' because it does not support the requested transfer format '${Jt[n]}'.`),new Error(`'${Wt[s]}' does not support ${Jt[n]}.`);else return this._logger.log(H.Debug,`Skipping transport '${Wt[s]}' because it was disabled by the client.`),new Bx(`'${Wt[s]}' is disabled by the client.`,s)}_isITransport(t){return t&&typeof t=="object"&&"connect"in t}_stopConnection(t){if(this._logger.log(H.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(H.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(H.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(H.Error,`Connection disconnected with error '${t}'.`):this._logger.log(H.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(r=>{this._logger.log(H.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(H.Error,`HttpConnection.onclose(${t}) threw error '${r}'.`)}}}_resolveUrl(t){if(t.lastIndexOf("https://",0)===0||t.lastIndexOf("http://",0)===0)return t;if(!Dt.isBrowser)throw new Error(`Cannot resolve '${t}'.`);const r=window.document.createElement("a");return r.href=t,this._logger.log(H.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 h_(e,t){return!e||(t&e)!==0}class Dc{constructor(t){this._transport=t,this._buffer=[],this._executing=!0,this._sendBufferedData=new Oi,this._transportResult=new Oi,this._sendLoopPromise=this._sendLoop()}send(t){return this._bufferData(t),this._transportResult||(this._transportResult=new Oi),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 Oi;const t=this._transportResult;this._transportResult=void 0;const r=typeof this._buffer[0]=="string"?this._buffer.join(""):Dc._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 Oi{constructor(){this.promise=new Promise((t,r)=>[this._resolver,this._rejecter]=[t,r])}resolve(){this._resolver()}reject(t){this._rejecter(t)}}const m_="json";class g_{constructor(){this.name=m_,this.version=2,this.transferFormat=Jt.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=Ro.instance);const n=fr.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 $e.Invocation:this._isInvocationMessage(i);break;case $e.StreamItem:this._isStreamItemMessage(i);break;case $e.Completion:this._isCompletionMessage(i);break;case $e.Ping:break;case $e.Close:break;case $e.Ack:this._isAckMessage(i);break;case $e.Sequence:this._isSequenceMessage(i);break;default:r.log(H.Information,"Unknown message type '"+i.type+"' ignored.");continue}o.push(i)}return o}writeMessage(t){return fr.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 v_={trace:H.Trace,debug:H.Debug,info:H.Information,information:H.Information,warn:H.Warning,warning:H.Warning,error:H.Error,critical:H.Critical,none:H.None};function y_(e){const t=v_[e.toLowerCase()];if(typeof t<"u")return t;throw new Error(`Unknown log level: ${e}`)}class b_{configureLogging(t){if(Bt.isRequired(t,"logging"),x_(t))this.logger=t;else if(typeof t=="string"){const r=y_(t);this.logger=new Pi(r)}else this.logger=new Pi(t);return this}withUrl(t,r){return Bt.isRequired(t,"url"),Bt.isNotEmpty(t,"url"),this.url=t,typeof r=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...r}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:r},this}withHubProtocol(t){return Bt.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 Zf(t):this.reconnectPolicy=t:this.reconnectPolicy=new Zf,this}withServerTimeout(t){return Bt.isRequired(t,"milliseconds"),this._serverTimeoutInMilliseconds=t,this}withKeepAliveInterval(t){return Bt.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 p_(this.url,t);return Ec.create(r,this.logger||Ro.instance,this.protocol||new g_,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}function x_(e){return e.log!==void 0}var $o={},Qf;function __(){if(Qf)return $o;Qf=1;var e=at();Object.defineProperty($o,"__esModule",{value:!0}),$o.default=void 0;var t=e(ht()),r=ut();return $o.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"),$o}var w_=__();const Xf=it(w_);var Lo={},Jf;function S_(){if(Jf)return Lo;Jf=1;var e=at();Object.defineProperty(Lo,"__esModule",{value:!0}),Lo.default=void 0;var t=e(ht()),r=ut();return Lo.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"),Lo}var C_=S_();const Ur=it(C_);function kc(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}function zo(e){return(t,r)=>{const n=r?.context?String(r.context):"standalone";let o;if(n==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=r?.width?String(r.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=r?.width?String(r.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}function Bo(e){return(t,r={})=>{const n=r.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(a)?D_(a,f=>f.test(i)):E_(a,f=>f.test(i));let u;u=e.valueCallback?e.valueCallback(c):c,u=r.valueCallback?r.valueCallback(u):u;const d=t.slice(i.length);return{value:u,rest:d}}}function E_(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function D_(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function k_(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const o=n[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=r.valueCallback?r.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}function A_(e,...t){const r=ic.bind(null,t.find(n=>typeof n=="object"));return t.map(r)}const T_={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 año",other:"alrededor de {{count}} años"},xYears:{one:"1 año",other:"{{count}} años"},overXYears:{one:"más de 1 año",other:"más de {{count}} años"},almostXYears:{one:"casi 1 año",other:"casi {{count}} años"}},I_=(e,t,r)=>{let n;const o=T_[e];return typeof o=="string"?n=o:t===1?n=o.one:n=o.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"en "+n:"hace "+n:n},M_={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},P_={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},O_={full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},j_={date:kc({formats:M_,defaultWidth:"full"}),time:kc({formats:P_,defaultWidth:"full"}),dateTime:kc({formats:O_,defaultWidth:"full"})},R_={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'mañana a la' p",nextWeek:"eeee 'a la' p",other:"P"},N_={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'mañana a las' p",nextWeek:"eeee 'a las' p",other:"P"},$_=(e,t,r,n)=>t.getHours()!==1?N_[e]:R_[e],L_={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},z_={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},B_={narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},F_={narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},W_={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},U_={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},H_={ordinalNumber:(e,t)=>Number(e)+"º",era:zo({values:L_,defaultWidth:"wide"}),quarter:zo({values:z_,defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:zo({values:B_,defaultWidth:"wide"}),day:zo({values:F_,defaultWidth:"wide"}),dayPeriod:zo({values:W_,defaultWidth:"wide",formattingValues:U_,defaultFormattingWidth:"wide"})},V_=/^(\d+)(º)?/i,Y_=/\d+/i,q_={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},Z_={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},G_={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},K_={any:[/1/i,/2/i,/3/i,/4/i]},Q_={narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},X_={narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},J_={narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},ew={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},tw={narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},rw={any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},nw={ordinalNumber:k_({matchPattern:V_,parsePattern:Y_,valueCallback:function(e){return parseInt(e,10)}}),era:Bo({matchPatterns:q_,defaultMatchWidth:"wide",parsePatterns:Z_,defaultParseWidth:"any"}),quarter:Bo({matchPatterns:G_,defaultMatchWidth:"wide",parsePatterns:K_,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Bo({matchPatterns:Q_,defaultMatchWidth:"wide",parsePatterns:X_,defaultParseWidth:"any"}),day:Bo({matchPatterns:J_,defaultMatchWidth:"wide",parsePatterns:ew,defaultParseWidth:"any"}),dayPeriod:Bo({matchPatterns:tw,defaultMatchWidth:"any",parsePatterns:rw,defaultParseWidth:"any"})},ow={code:"es",formatDistance:I_,formatLong:j_,formatRelative:$_,localize:H_,match:nw,options:{weekStartsOn:1,firstWeekContainsDate:1}},ep="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAACpQTFRFR3BMcHCAcHBwaGx4ZWp6aG14aG54Zm14aW15aG55aG15aW55aW56aW5591zvEAAAAA10Uk5TABAQIDBBYHCAnr7g7wYb6DAAAACqSURBVHjahZJLDgMhDEM9UL7Ju/91q8KgQhcdb5D8rFiJ0JNC6Qbeczzt6izV8PWjAbiNB4uH35IkpbaRYGBpT9mcVlemtnCTOiLA8BPk+/VPIkPTR/kGalAkdUgnSNAlOegEckwS2C8wOAEWN2D4BC8HH3Xge/naYJUXaJq6Wo+S2iy7HJKW1sbHSc6B0mU7SeOIf8++CJg5nHOvypLXoF0xdwfrJTx9mzdxpgqGKfcyxQAAAABJRU5ErkJggg==",sw="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAwCAMAAABZu7juAAAAPFBMVEUAAABobHhobnhpbnlobnhobXhpbnlpbnpobXhwcHNobHhlanlpbnlobnhobnpobXhmbXlocHhpbHZpbnlt0ET4AAAAE3RSTlMAIGDggL/f76AQQDDPsLCQcEBQZL6CzQAAALVJREFUSMft1MsOgyAQhWEGHQa82/P+71rDojhJ6dCNi9ZvZcivQUjGXWeTQHqFJvS1mgDMemkGQJV8AMB6iQHsb9K0RZ4ACCsCYOLoSccrDPH0AgWYAqm6vY9owuVAmgzq46aY84BGknM0S/nqm9Ef5tIZROXeGfyd3/lP5Kk9T+4gAGYrj68pxjiMn2sqI9iX6V0zhtOO8zO4r1k5B8F9NeBH9dsWr/ZmCLs+10VQ1S0Pd4UnLwhFRUE6UNsAAAAASUVORK5CYII=",iw=({notificacion:e,onAccept:t})=>{const{evento:r,tipo:n,leida:o}=e,s=n==="EventoCreado"||n==="EventoModificado",a={EventoCreado:{frase:"te ha invitado a:",colorTitulo:"#3c4043"},EventoModificado:{frase:"ha modificado el evento",colorTitulo:"#3c4043"},EventoCancelado:{frase:"ha cancelado el evento",colorTitulo:"#d32f2f"}}[n]||{frase:"te ha notificado sobre",colorTitulo:"#3c4043"},c=r?.fechaInicio?new Date(r.fechaInicio):new Date,u=r?.fechaFin?new Date(r.fechaFin):null,d=r?.nombreAnfitrion||"Usuario",f=e?.titulo||"Sin título",h=v=>v.split(" ").filter(m=>m).map(m=>m[0]).join("").toUpperCase().substring(0,2);return l.jsxs(g.Box,{sx:{p:2,mb:1,bgcolor:"white",borderRadius:"8px",border:"1px solid #e0e0e0",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",position:"relative",overflow:"hidden"},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",mb:1},children:[l.jsx(g.Avatar,{sx:{bgcolor:"#F5A623",width:34,height:34,fontSize:"14px",mr:1.5,fontWeight:"bold"},children:h(d)}),l.jsxs(g.Box,{children:[l.jsxs(g.Typography,{sx:{fontSize:"14px",color:"#5f6368",lineHeight:1.2},children:[d," ",a.frase]}),l.jsx(g.Typography,{sx:{fontSize:"15px",fontWeight:700,color:a.colorTitulo},children:f})]})]}),l.jsx(g.Divider,{sx:{mx:-2,my:1.5,backgroundColor:"#000"}}),l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",mb:0},children:[l.jsx("img",{src:sw,width:20,height:20,alt:"cal",style:{marginRight:15}}),l.jsx(g.Typography,{sx:{fontSize:"14px",color:"#3c4043",textTransform:"capitalize"},children:x.format(c,"EEEE, dd 'de' MMMM",{locale:ow})})]}),l.jsx(g.Divider,{sx:{mx:-2,my:1.5,backgroundColor:"#000"}}),l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",mb:s&&!o?2:0},children:[l.jsx("img",{src:ep,width:20,height:20,alt:"watch",style:{marginRight:15}}),l.jsxs(g.Typography,{sx:{fontSize:"14px",color:"#3c4043"},children:[x.format(c,"h:mm a").toLowerCase(),u?` - ${x.format(u,"h:mm a").toLowerCase()}`:""]})]}),s&&!o&&l.jsxs(g.Grid,{container:!0,spacing:1,sx:{mt:1},children:[l.jsx(g.Grid,{item:!0,xs:6,children:l.jsx(g.Button,{fullWidth:!0,variant:"outlined",size:"small",startIcon:l.jsx(Xf,{sx:{fontSize:"16px !important",mr:-.5}}),onClick:()=>t?.(e,"CONFIRMADA"),sx:{borderRadius:"8px",textTransform:"none",fontWeight:700,fontSize:"12px",color:"#1976D2",borderColor:"#1976D2",py:.8,px:1,whiteSpace:"nowrap"},children:"Asistiré"})}),l.jsx(g.Grid,{item:!0,xs:6,children:l.jsx(g.Button,{fullWidth:!0,variant:"outlined",size:"small",startIcon:l.jsx(Ur,{sx:{fontSize:"16px !important",mr:-.5}}),onClick:()=>t?.(e,"RECHAZADA"),sx:{borderRadius:"8px",textTransform:"none",fontWeight:700,fontSize:"12px",color:"#D32F2F",borderColor:"#D32F2F",py:.8,px:1,whiteSpace:"nowrap"},children:"Rechazar"})})]})]})},aw="https://qa2.crm.netcar.com.mx/hubs/invitaciones",cw=({userId:e,notifications:t,onAceppInvitacion:r})=>{const[n,o]=y.useState(t),[s,i]=y.useState(null);y.useEffect(()=>{o(t)},[t]);const a=y.useCallback(c=>{const u={notificacionID:Math.random(),titulo:"Nueva invitación a evento",mensaje:c.Descripcion,tipo:"EventoCreado",leida:!1,fechaCreacion:new Date().toISOString(),tiempoTranscurrido:"Ahora",url:`/eventos/${c.EventoID}`,iconoColor:"#E1D6FB",evento:{eventoID:c.EventoID,titulo:c.Titulo,fechaInicio:c.FechaInicio,ubicacion:"",nombreAnfitrion:""}};o(d=>[u,...d])},[]);return y.useEffect(()=>{if(!e)return;const c=new b_().withUrl(aw+`?userId=${e}`).withAutomaticReconnect().build();return c.start().then(()=>{c.on("NotificarInvitacionAEvento",a)}).catch(u=>console.error("Error SignalR:",u)),()=>{c.off("NotificarInvitacionAEvento"),c.stop()}},[e,a]),l.jsx(g.Box,{sx:{width:"100%",maxHeight:"600px",overflowY:"auto"},children:l.jsx(g.List,{disablePadding:!0,children:n.length===0?l.jsxs("div",{className:xe.emptyStateContainer,children:[l.jsx("img",{src:Uf,alt:"Todo en orden",className:xe.emptyStateImage}),l.jsx("h4",{className:xe.emptyStateTitle,children:"Todo en orden aquí"}),l.jsx("p",{className:xe.emptyStateText,children:"Por el momento no tienes invitaciones pendientes."})]}):n.map(c=>l.jsx(iw,{notificacion:c,onAccept:r}))})})},lw=({onEventClick:e,upcomingEvents:t,leads30Days:r,leads90Days:n,disID:o,usrID:s,onAddEvent:i,googleCalendars:a,outlookCalendars:c,isLoadingCalendars:u,onToggleGoogle:d,onToggleOutlook:f,notifications:h,unreadCount:v,onAceppInvitacion:m})=>{const{session:p,sessionoutlook:b}=cc(),{enqueueSnackbar:w}=xs.useSnackbar(),C=N=>{const ce=new Date,fe={start:x.startOfDay(ce),end:x.endOfDay(ce)},$={start:N.fechaInicio,end:N.fechaFin};return Ud(fe,$)?"Hoy":x.isTomorrow(N.fechaInicio)?"Mañana":new Intl.DateTimeFormat("es-ES",{day:"numeric",month:"long"}).format(N.fechaInicio)},E={};t.forEach(N=>{const ce=C(N);E[ce]||(E[ce]=[]),E[ce].push(N)});const[S,_]=y.useState(!1),W=()=>{_(!S)},D=Ii(),A=wc(),M=async()=>{if(!p?.userEmail||!o||!s){console.error("Faltan datos (email, disID o usrID) para sincronizar eventos.");return}try{await D.syncGoogleEvents(p?.userEmail,o,s),w("Eventos sincronizados con Google Calendar con éxito.",{variant:"success"})}catch{w("Error al sincronizar eventos con Google Calendar.",{variant:"error"})}finally{}},I=async()=>{if(!b?.userEmail||!o||!s){console.error("Faltan datos (email, disID o usrID) para sincronizar eventos.");return}try{await A.syncOutlookEvents(b?.userEmail,o,s),w("Eventos sincronizados con Outlook Calendar con éxito.",{variant:"success"})}catch{w("Error al sincronizar eventos con Outlook Calendar.",{variant:"error"})}finally{}},[V,G]=y.useState("events"),F=N=>{G(N)},[Y,oe]=y.useState(!0),U=()=>{oe(N=>!N)};return l.jsxs("div",{className:xe.sidebarContainer,children:[l.jsxs("div",{className:xe.leadsSection,children:[l.jsxs("div",{className:xe.leadCard,children:[l.jsx("div",{className:xe.leadIcon,children:l.jsx("img",{src:Xd})}),l.jsxs("div",{className:xe.leadText,children:[l.jsx("div",{className:xe.leadDays,children:"+30 días sin atender"}),l.jsxs("div",{className:xe.leadCount,children:[r," ",l.jsx("span",{style:{fontSize:10,fontWeight:"normal"},children:"leads"})]})]})]}),l.jsxs("div",{className:xe.leadCard,children:[l.jsx("div",{className:xe.leadIcon,children:l.jsx("img",{src:Xd})}),l.jsxs("div",{className:xe.leadText,children:[l.jsx("div",{className:xe.leadDays,children:"+90 días sin atender"}),l.jsxs("div",{className:xe.leadCount,children:[n," ",l.jsx("span",{style:{fontSize:10,fontWeight:"normal"},children:"leads"})]})]})]})]}),l.jsxs("div",{className:xe.eventsSection,children:[l.jsxs("div",{className:xe.tabsContainer,children:[l.jsx("button",{className:`${xe.tabButton} ${V==="events"?xe.activeTab:""}`,onClick:()=>F("events"),children:"Eventos"}),l.jsxs("button",{className:`${xe.tabButton} ${V==="alerts"?xe.activeTab:""}`,onClick:()=>F("alerts"),children:["Alertas",v>0&&l.jsx("span",{className:xe.alertBadge,children:v>99?"99+":v})]})]}),l.jsxs("div",{className:xe.eventsContainer,children:[V==="events"&&l.jsx(l.Fragment,{children:Object.keys(E).length>0?Object.entries(E).map(([N,ce])=>l.jsxs("div",{className:`${xe.eventGroup}`,children:[l.jsxs("div",{className:xe.eventGroupDate,children:[l.jsx("img",{src:l1,width:15})," ",N]}),ce.map(fe=>{const $=De(fe.color||"#ffcc00"),Q=$.toString(),Ce=$.clone().darken(15).toString(),me=new Intl.DateTimeFormat("es-ES",{hour:"numeric",minute:"2-digit",hour12:!0});return l.jsxs("div",{className:xe.eventItem,style:{backgroundColor:Q,borderLeft:`4px solid ${Ce}`,display:"flex",alignItems:"center",padding:"10px",marginBottom:"8px",borderRadius:"4px",cursor:"pointer"},onClick:()=>e(fe),children:[l.jsxs("div",{className:xe.eventDetails,style:{flex:1},children:[l.jsx("div",{className:xe.eventTitle,style:{fontWeight:"500",fontSize:"12px",color:"#333"},children:fe.titulo.length>32?`${fe.titulo.substring(0,32)}...`:fe.titulo}),fe.nombreAnfitrion&&l.jsxs("div",{style:{display:"flex",alignItems:"center",marginTop:"4px",color:"#555"},children:[l.jsx("img",{src:Jd,width:16,style:{marginRight:"6px",opacity:.7}}),l.jsx("span",{style:{fontSize:"13px"},children:fe.nombreAnfitrion})]}),l.jsx("div",{className:xe.eventTime,style:{fontSize:"12px",marginTop:"4px",opacity:.7},children:`${me.format(fe.fechaInicio).toLowerCase()} - ${me.format(fe.fechaFin).toLowerCase()}`})]}),fe.link&&l.jsx("a",{onClick:we=>we.stopPropagation(),href:fe.link,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center",padding:"4px"},children:l.jsx("img",{src:u1,alt:"Video",width:20,style:{opacity:.8}})})]},fe.eventoID)})]},N)):l.jsxs("div",{className:xe.emptyStateContainer,children:[l.jsx("img",{src:Uf,alt:"Todo en orden",className:xe.emptyStateImage}),l.jsx("h4",{className:xe.emptyStateTitle,children:"Tu agenda está despejada"}),l.jsx("p",{className:xe.emptyStateText,children:"Parece que no tienes ningún evento en tu calendario. ¿Te gustaría añadir uno? "}),l.jsxs("button",{className:xe.addEventButton,onClick:i,children:[l.jsx("img",{src:zd}),"Agregar evento"]})]})}),V==="alerts"&&l.jsx(g.Box,{children:l.jsx(cw,{userId:s,notifications:h,onAceppInvitacion:m})})]})]}),l.jsxs("div",{className:xe.calendarsSection,children:[l.jsxs("button",{onClick:W,className:xe.collapsibleHeader,children:[l.jsxs("div",{className:xe.headerTitle,children:[l.jsx("span",{style:{fontSize:"14px"},children:"Calendarios"}),l.jsx("span",{className:xe.calendarCount,children:"1"})]}),l.jsx($2,{className:`${xe.chevronIcon} ${S?xe.collapsed:""}`})]}),l.jsxs("div",{className:`${xe.collapsibleContent} ${S?xe.hidden:""}`,children:[l.jsxs("button",{className:`${xe.calendarSelectButton} ${Y?xe.calendarSelected:""}`,onClick:U,style:{"--calendar-color":"#1976D2"},children:[l.jsx("div",{className:xe.customCheckIcon,children:l.jsx("div",{className:xe.circularCheckbox,children:l.jsx(sc,{size:16,className:xe.checkedIcon})})}),l.jsx(N2,{size:16,className:xe.calendarIcon}),l.jsx("span",{className:xe.calendarItemText,children:"Mi calendario"})]}),b.userEmail?l.jsxs("div",{className:xe.syncButton,onClick:I,children:[l.jsx("div",{className:xe.circularCheckbox,children:l.jsx(sc,{size:16,className:xe.checkedIcon})}),l.jsx("img",{src:Wf,width:20}),l.jsx("span",{style:{fontSize:"14px"},children:"Sincronizar Outlook"})]}):l.jsx(Lx,{disID:o,usrID:s}),p?.userEmail?l.jsxs("div",{className:xe.syncButton,onClick:M,children:[l.jsx("div",{className:xe.circularCheckbox,children:l.jsx(sc,{size:16,className:xe.checkedIcon})}),l.jsx("img",{src:Ff,width:18}),l.jsx("span",{style:{fontSize:"14px"},children:"Sincronizar Google"})]}):l.jsx($x,{disID:o,usrID:s}),b?.userEmail&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:xe.currentUserCalendarTitle,style:{marginTop:"10px"},children:b?.userEmail}),u?l.jsx(g.CircularProgress,{size:24}):c.length>0?l.jsx(g.List,{dense:!0,className:xe.calendarsList,children:c.map(N=>l.jsx(g.ListItem,{secondaryAction:l.jsx(g.Checkbox,{edge:"end",onChange:()=>f(N.id),checked:N.selected||!1,sx:{color:N.backgroundColor,"&.Mui-checked":{color:N.backgroundColor}}}),disablePadding:!0,children:l.jsx(g.ListItemText,{primary:N.summary.length>25?`${N.summary.substring(0,25)}...`:N.summary,className:xe.calendarItemText})},N.id))}):l.jsx("p",{style:{fontSize:"12px"},children:"No se encontraron calendarios."})]}),p?.userEmail&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:xe.currentUserCalendarTitle,style:{marginTop:"10px"},children:p?.userEmail}),u?l.jsx(g.CircularProgress,{size:24}):a.length>0?l.jsx(g.List,{dense:!0,className:xe.calendarsList,children:a.map(N=>l.jsx(g.ListItem,{secondaryAction:l.jsx(g.Checkbox,{edge:"end",onChange:()=>d(N.id),checked:N.selected||!1,sx:{color:N.backgroundColor,"&.Mui-checked":{color:N.backgroundColor}}}),disablePadding:!0,children:l.jsx(g.ListItemText,{primary:N.summary.length>25?`${N.summary.substring(0,25)}...`:N.summary,className:xe.calendarItemText})},N.id))}):l.jsx("p",{style:{fontSize:"12px"},children:"No se encontraron calendarios."})]})]})]})]})},Cn={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"};var Fo={},tp;function uw(){if(tp)return Fo;tp=1;var e=at();Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.default=void 0,o(y);var t=e(ht()),r=ut();function n(s){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(n=function(c){return c?a:i})(s)}function o(s,i){if(s&&s.__esModule)return s;if(s===null||typeof s!="object"&&typeof s!="function")return{default:s};var a=n(i);if(a&&a.has(s))return a.get(s);var c={__proto__:null},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in s)if(d!=="default"&&Object.prototype.hasOwnProperty.call(s,d)){var f=u?Object.getOwnPropertyDescriptor(s,d):null;f&&(f.get||f.set)?Object.defineProperty(c,d,f):c[d]=s[d]}return c.default=s,a&&a.set(s,c),c}return Fo.default=(0,t.default)((0,r.jsx)("path",{d:"M12.545,10.239v3.821h5.445c-0.712,2.315-2.647,3.972-5.445,3.972c-3.332,0-6.033-2.701-6.033-6.032s2.701-6.032,6.033-6.032c1.498,0,2.866,0.549,3.921,1.453l2.814-2.814C17.503,2.988,15.139,2,12.545,2C7.021,2,2.543,6.477,2.543,12s4.478,10,10.002,10c8.396,0,10.249-7.85,9.426-11.748L12.545,10.239z"}),"Google"),Fo}var dw=uw();const fw=it(dw);var Wo={},rp;function pw(){if(rp)return Wo;rp=1;var e=at();Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.default=void 0;var t=e(ht()),r=ut();return Wo.default=(0,t.default)((0,r.jsx)("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 14H4V8l8 5 8-5zm-8-7L4 6h16z"}),"MailOutline"),Wo}var hw=pw();const mw=it(hw),np=46,gw=22,vw=({dayNumber:e,date:t,events:r,isToday:n,isCurrentMonth:o,onDayClick:s,onEventClick:i,onSeeMoreClick:a})=>{const c=[Cn.dayCell,o?"":Cn.notCurrentMonth,Cn.CurrentDay].join(" ").trim(),u=y.useRef(null),[d,f]=y.useState(r.length),h=new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});y.useLayoutEffect(()=>{const p=()=>{if(u.current){const b=u.current.clientHeight;let w=Math.floor(b/(np+4));if(w<r.length){const C=Math.floor((b-gw)/(np+4));w=Math.max(0,C)}f(w)}};return p(),window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[r.length]);const v=r.slice(0,d===0?1:d),m=r.length-(d===0?1:d);return l.jsxs("div",{className:`${c} ${Cn.dayCellContainer}`,onClick:()=>s?.(t),style:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden"},children:[l.jsx("div",{className:n?Cn.dayNumber:Cn.dayNumberToday,children:e}),l.jsxs("div",{className:Cn.eventsList,ref:u,style:{flex:1,display:"flex",flexDirection:"column",gap:"4px",padding:"0 4px 4px 4px",marginTop:"4px",overflow:"hidden"},children:[v.map(p=>{const b=p.color||"#D7EBFB",w=p.isGoogleEvent||p.isOutlookEvent;return l.jsxs(g.Box,{onClick:C=>{C.stopPropagation(),i?.(p)},sx:{backgroundColor:w?"#ffffff":p?.color,padding:"4px 8px",borderRadius:"6px",cursor:"pointer",display:"flex",flexDirection:"column",minHeight:"40px",maxHeight:"48px",position:"relative",overflow:"hidden",border:w?`1px solid ${De(b).setAlpha(.4).toRgbString()}`:"none","&:hover":{filter:"brightness(0.95)",boxShadow:"0px 2px 4px rgba(0,0,0,0.08)"}},children:[p.isGoogleEvent&&l.jsx(fw,{sx:{position:"absolute",top:4,right:4,fontSize:12,color:"#4285F4"}}),p.isOutlookEvent&&l.jsx(mw,{sx:{position:"absolute",top:4,right:4,fontSize:12,color:"#0078D4"}}),l.jsx(g.Typography,{sx:{fontSize:"10px",lineHeight:"1",color:"#3C4043",pr:w?2:0,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",wordBreak:"break-word"},children:p.titulo}),l.jsx(g.Typography,{sx:{fontSize:"9px",color:"#70757a",mt:"auto",fontWeight:400},children:`${h.format(p.fechaInicio).toLowerCase()} - ${h.format(p.fechaFin).toLowerCase()}`})]},p.eventoID)}),m>0&&l.jsxs(g.Typography,{sx:{fontSize:"10px",fontWeight:"bold",color:"#1976D2",textAlign:"left",ml:1,mt:.5,cursor:"pointer","&:hover":{textDecoration:"underline"}},onClick:p=>{p.stopPropagation(),a(r,t)},children:["+",m," más"]})]})]})},op={weekDaysContainer:"_weekDaysContainer_5h5ol_1",weekDay:"_weekDay_5h5ol_1"},yw=()=>{const e=["Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"];return l.jsx("div",{className:op.weekDaysContainer,children:e.map(t=>l.jsx("div",{className:op.weekDay,children:t},t))})},ji={calendarGridContainer:"_calendarGridContainer_1expw_1",daysContainer:"_daysContainer_1expw_23",rows5:"_rows5_1expw_37",rows6:"_rows6_1expw_45"};function bw(e,t){const[r,n]=A_(e,t.start,t.end);return{start:r,end:n}}function xw(e,t){const{start:r,end:n}=bw(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(ic(r,i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?c.reverse():c}function _w(e,t){const r=t?.weekStartsOn,n=sn(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 ww(e,t,r){const n=+sn(e,r?.in),[o,s]=[+sn(t.start,r?.in),+sn(t.end,r?.in)].sort((i,a)=>i-a);return n>=o&&n<=s}const Sw=({currentDate:e,events:t,onDayClick:r,onEventClick:n,onSeeMoreClick:o})=>{const s=x.startOfMonth(e),i=x.endOfMonth(e),a=x.startOfWeek(s,{weekStartsOn:1}),c=_w(i,{weekStartsOn:1}),u=xw({start:a,end:c}),d={},f=u.length/7,h=`${ji.daysContainer} ${f===5?ji.rows5:ji.rows6}`;return t.forEach(v=>{const m=x.format(v.fechaInicio,"yyyy-MM-dd");d[m]||(d[m]=[]),d[m].push(v)}),l.jsxs("div",{className:ji.calendarGridContainer,children:[l.jsx(yw,{}),l.jsx("div",{className:h,children:u.map(v=>{const m=t.filter(p=>ww(v,{start:x.startOfDay(p.fechaInicio),end:x.endOfDay(p.fechaFin)}));return l.jsx(vw,{dayNumber:v.getDate(),date:v,events:m,isToday:x.isToday(v),isCurrentMonth:x.isSameMonth(v,e),onDayClick:r,onEventClick:n,onSeeMoreClick:o},v.toISOString())})})]})},Ac=()=>{const{calendarApiUrl:e}=_c(),t=async v=>{try{return(await Et.get(`${e}/api/Calendario/v1/local/ListarEventosXUsuario/${v}`)).data.map(p=>{const b=new Date(p.fechaInicio),w=new Date(p.fechaFin),C=p.solicitudRelacionada?.[0]?.nombreCliente??null;return{...p,fechaInicio:b,fechaFin:w,client:C}})}catch(m){return console.error("Error events:",m),[]}},r=async(v,m)=>{try{const p=await Et.post(`${e}/api/Calendario/v1/local/InsertarEvento/${m}`,v);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 v=>{try{const m=await Et.post(`${e}/api/Calendario/v1/local/ActualizarEvento/${v.eventoID}`,v);return{eventoID:m.data.eventoID,titulo:m.data.titulo,descripcion:m.data.descripcion,fechaInicio:new Date(m.data.fechaInicio),fechaFin:new Date(m.data.fechaFin),todoElDia:m.data.todoElDia,color:m.data.color,repetir:m.data.repetir,link:m.data.link,solID:m.data.solID,disID:m.data.disID,client:m.data.client}}catch(m){throw console.log("Error updating event:",m),m}},o=async v=>{try{const m=await Et.get(`${e}/api/Calendario/v1/local/ObtenerEvento/${v}`),p=m.data[0].solicitudRelacionada?.[0]?.nombreCliente||null;return{...m.data[0],fechaInicio:m.data[0].fechaInicio,fechaFin:m.data[0].fechaFin,client:p}}catch(m){throw console.error(`Error fetching event with ID ${v}:`,m),m}},s=async v=>{try{await Et.post(`${e}/api/Calendario/v1/local/EliminarEvento/${v}`)}catch(m){throw console.log(`Error ID ${v}:`,m),m}},i=y.useCallback(async(v,m,p,b)=>{try{const w={masNombreBD:p,usrID:b,disID:m,nombreCliente:v},E=(await Et.post(`${e}/api/Calendario/v1/local/ConsultaClientesXUsuariologgeado/`,w)).data?.data;return Array.isArray(E)?E.map(S=>({clienteID:S.clienteID,solID:S.solID,marca:S?.marca,modelo:S?.modelo,nombreCliente:S?.nombreCliente})):[]}catch(w){return console.error("Error clientes:",w),[]}},[e]),a=y.useCallback(async(v,m)=>{try{const p={disID:v,usrMail:m},w=(await Et.post(`${e}/api/Calendario/v1/Consulta_UsuariosInvitados/`,p)).data?.data;return Array.isArray(w)?w.map(C=>({usrID:C.usrID,usrNombre:C.usrNombre,usrMail:C?.usrMail,disID:C?.disID})):[]}catch(p){return console.error("Error usuarios:",p),[]}},[e]),c=async(v,m,p,b,w)=>{const C={tieneConflicto:!1,usrMail:""};try{const E={disID:v,usrMail:m,startDate:p,horaInicio:b,horaFin:w};return(await Et.post(`${e}/api/Calendario/v1/local/ConsultaConflictoInvitados`,E)).data?.data}catch(E){return console.error("Error al verificar conflicto:",E),C}},u=y.useCallback(async(v,m,p,b)=>{try{const w={disID:v,usrMail:m,startDate:p,DuracionEvento:b},E=(await Et.post(`${e}/api/Calendario/v1/local/ConsultaDisponibilidadUsuario`,w)).data?.data;return Array.isArray(E)?E.map(S=>({Fecha:S.fecha,HoraInicio:S.horaInicio,HoraFin:S.horaFin})):[]}catch(w){return console.error("Error usuarios:",w),[]}},[e]),d=y.useCallback(async(v,m=!1)=>{try{const p=await Et.post(`${e}/api/Notificaciones/v1/local/ObtenerNotificacionesPorUsuarioAsync/${v}?soloNoLeidas=${m}`);return console.log("response.data",p.data),p.data}catch(p){return console.error("Error usuarios:",p),[]}},[e]);return{getEventsByUser:t,createEvent:r,updateEvent:n,getEventById:o,deleteEvent:s,getClients:i,getUsuariosInvitados:a,VerificarConflicto:c,getDisponibilidadUsuario:u,getNotificacionesXUsuario:d,UpdateStatusEvento:async(v,m,p)=>{try{const b={EventoID:v,UsuarioID:m,status:p};return(await Et.post(`${e}/api/Calendario/v1/local/ActualizarEstadoInvitacionAsync/`,b)).data}catch(b){return console.error("Error Actualizar estatus:",b),{}}},MarcarLeido:async(v,m)=>{try{return(await Et.post(`${e}/api/Notificaciones/v1/local/MarcarComoLeidaAsync/${v}?usuarioId=${m}&marcarComoLeida=true`)).data?.data}catch(p){return console.error("Error Actualizar estatus:",p),{}}}}};var Uo={},sp;function Cw(){if(sp)return Uo;sp=1;var e=at();Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.default=void 0;var t=e(ht()),r=ut();return Uo.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"),Uo}var Ew=Cw();const Tc=it(Ew);var Ho=e=>e.type==="checkbox",En=e=>e instanceof Date,rr=e=>e==null;const ip=e=>typeof e=="object";var Nt=e=>!rr(e)&&!Array.isArray(e)&&ip(e)&&!En(e),ap=e=>Nt(e)&&e.target?Ho(e.target)?e.target.checked:e.target.value:e,Dw=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,cp=(e,t)=>e.has(Dw(t)),kw=e=>{const t=e.constructor&&e.constructor.prototype;return Nt(t)&&t.hasOwnProperty("isPrototypeOf")},Ic=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ut(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(!(Ic&&(e instanceof Blob||n))&&(r||Nt(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!kw(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=Ut(e[o]));else return e;return t}var Ri=e=>/^\w*$/.test(e),$t=e=>e===void 0,Mc=e=>Array.isArray(e)?e.filter(Boolean):[],Pc=e=>Mc(e.replace(/["|']|\]/g,"").split(/\.|\[/)),he=(e,t,r)=>{if(!t||!Nt(e))return r;const n=(Ri(t)?[t]:Pc(t)).reduce((o,s)=>rr(o)?o:o[s],e);return $t(n)||n===e?$t(e[t])?r:e[t]:n},pr=e=>typeof e=="boolean",ct=(e,t,r)=>{let n=-1;const o=Ri(t)?[t]:Pc(t),s=o.length,i=s-1;for(;++n<s;){const a=o[n];let c=r;if(n!==i){const u=e[a];c=Nt(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=c,e=e[a]}};const Ni={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Tr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Qr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Oc=y.createContext(null);Oc.displayName="HookFormContext";const jc=()=>y.useContext(Oc),Aw=e=>{const{children:t,...r}=e;return y.createElement(Oc.Provider,{value:r},t)};var lp=(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]!==Tr.all&&(t._proxyFormState[i]=!n||Tr.all),r&&(r[i]=!0),e[i]}});return o};const Rc=typeof window<"u"?y.useLayoutEffect:y.useEffect;function Tw(e){const t=jc(),{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 Rc(()=>r._subscribe({name:o,formState:c.current,exact:s,callback:u=>{!n&&a({...r._formState,...u})}}),[o,n,s]),y.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),y.useMemo(()=>lp(i,r,c.current,!1),[i,r])}var Hr=e=>typeof e=="string",up=(e,t,r,n,o)=>Hr(e)?(n&&t.watch.add(e),he(r,e,o)):Array.isArray(e)?e.map(s=>(n&&t.watch.add(s),he(r,s))):(n&&(t.watchAll=!0),r),Nc=e=>rr(e)||!ip(e);function Xr(e,t,r=new WeakSet){if(Nc(e)||Nc(t))return e===t;if(En(e)&&En(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(En(i)&&En(a)||Nt(i)&&Nt(a)||Array.isArray(i)&&Array.isArray(a)?!Xr(i,a,r):i!==a)return!1}}return!0}function dp(e){const t=jc(),{control:r=t.control,name:n,defaultValue:o,disabled:s,exact:i,compute:a}=e||{},c=y.useRef(o),u=y.useRef(a),d=y.useRef(void 0);u.current=a;const f=y.useMemo(()=>r._getWatch(n,c.current),[r,n]),[h,v]=y.useState(u.current?u.current(f):f);return Rc(()=>r._subscribe({name:n,formState:{values:!0},exact:i,callback:m=>{if(!s){const p=up(n,r._names,m.values||r._formValues,!1,c.current);if(u.current){const b=u.current(p);Xr(b,d.current)||(v(b),d.current=b)}else v(p)}}}),[r,s,n,i]),y.useEffect(()=>r._removeUnmounted()),h}function Iw(e){const t=jc(),{name:r,disabled:n,control:o=t.control,shouldUnregister:s,defaultValue:i}=e,a=cp(o._names.array,r),c=y.useMemo(()=>he(o._formValues,r,he(o._defaultValues,r,i)),[o,r,i]),u=dp({control:o,name:r,defaultValue:c,exact:!0}),d=Tw({control:o,name:r,exact:!0}),f=y.useRef(e),h=y.useRef(o.register(r,{...e.rules,value:u,...pr(e.disabled)?{disabled:e.disabled}:{}}));f.current=e;const v=y.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!he(d.errors,r)},isDirty:{enumerable:!0,get:()=>!!he(d.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!he(d.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!he(d.validatingFields,r)},error:{enumerable:!0,get:()=>he(d.errors,r)}}),[d,r]),m=y.useCallback(C=>h.current.onChange({target:{value:ap(C),name:r},type:Ni.CHANGE}),[r]),p=y.useCallback(()=>h.current.onBlur({target:{value:he(o._formValues,r),name:r},type:Ni.BLUR}),[r,o._formValues]),b=y.useCallback(C=>{const E=he(o._fields,r);E&&C&&(E._f.ref={focus:()=>C.focus&&C.focus(),select:()=>C.select&&C.select(),setCustomValidity:S=>C.setCustomValidity(S),reportValidity:()=>C.reportValidity()})},[o._fields,r]),w=y.useMemo(()=>({name:r,value:u,...pr(n)||d.disabled?{disabled:d.disabled||n}:{},onChange:m,onBlur:p,ref:b}),[r,n,d.disabled,m,p,b,u]);return y.useEffect(()=>{const C=o._options.shouldUnregister||s;o.register(r,{...f.current.rules,...pr(f.current.disabled)?{disabled:f.current.disabled}:{}});const E=(S,_)=>{const W=he(o._fields,S);W&&W._f&&(W._f.mount=_)};if(E(r,!0),C){const S=Ut(he(o._options.defaultValues,r));ct(o._defaultValues,r,S),$t(he(o._formValues,r))&&ct(o._formValues,r,S)}return!a&&o.register(r),()=>{(a?C&&!o._state.action:C)?o.unregister(r):E(r,!1)}},[r,o,a,s]),y.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),y.useMemo(()=>({field:w,formState:d,fieldState:v}),[w,d,v])}const hr=e=>e.render(Iw(e));var $c=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},Vo=e=>Array.isArray(e)?e:[e],fp=()=>{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=[]}}},ir=e=>Nt(e)&&!Object.keys(e).length,Lc=e=>e.type==="file",Ir=e=>typeof e=="function",$i=e=>{if(!Ic)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},pp=e=>e.type==="select-multiple",zc=e=>e.type==="radio",Mw=e=>zc(e)||Ho(e),Bc=e=>$i(e)&&e.isConnected;function Pw(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=$t(e)?n++:e[t[n++]];return e}function Ow(e){for(const t in e)if(e.hasOwnProperty(t)&&!$t(e[t]))return!1;return!0}function Ft(e,t){const r=Array.isArray(t)?t:Ri(t)?[t]:Pc(t),n=r.length===1?e:Pw(e,r),o=r.length-1,s=r[o];return n&&delete n[s],o!==0&&(Nt(n)&&ir(n)||Array.isArray(n)&&Ow(n))&&Ft(e,r.slice(0,-1)),e}var hp=e=>{for(const t in e)if(Ir(e[t]))return!0;return!1};function Li(e,t={}){const r=Array.isArray(e);if(Nt(e)||r)for(const n in e)Array.isArray(e[n])||Nt(e[n])&&!hp(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Li(e[n],t[n])):rr(e[n])||(t[n]=!0);return t}function mp(e,t,r){const n=Array.isArray(e);if(Nt(e)||n)for(const o in e)Array.isArray(e[o])||Nt(e[o])&&!hp(e[o])?$t(t)||Nc(r[o])?r[o]=Array.isArray(e[o])?Li(e[o],[]):{...Li(e[o])}:mp(e[o],rr(t)?{}:t[o],r[o]):r[o]=!Xr(e[o],t[o]);return r}var Yo=(e,t)=>mp(e,t,Li(t));const gp={value:!1,isValid:!1},vp={value:!0,isValid:!0};var yp=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&&!$t(e[0].attributes.value)?$t(e[0].value)||e[0].value===""?vp:{value:e[0].value,isValid:!0}:vp:gp}return gp},bp=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>$t(e)?e:t?e===""?NaN:e&&+e:r&&Hr(e)?new Date(e):n?n(e):e;const xp={isValid:!1,value:null};var _p=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,xp):xp;function wp(e){const t=e.ref;return Lc(t)?t.files:zc(t)?_p(e.refs).value:pp(t)?[...t.selectedOptions].map(({value:r})=>r):Ho(t)?yp(e.refs).value:bp($t(t.value)?e.ref.value:t.value,e)}var jw=(e,t,r,n)=>{const o={};for(const s of e){const i=he(t,s);i&&ct(o,s,i._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},zi=e=>e instanceof RegExp,qo=e=>$t(e)?e:zi(e)?e.source:Nt(e)?zi(e.value)?e.value.source:e.value:e,Sp=e=>({isOnSubmit:!e||e===Tr.onSubmit,isOnBlur:e===Tr.onBlur,isOnChange:e===Tr.onChange,isOnAll:e===Tr.all,isOnTouch:e===Tr.onTouched});const Cp="AsyncFunction";var Rw=e=>!!e&&!!e.validate&&!!(Ir(e.validate)&&e.validate.constructor.name===Cp||Nt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Cp)),Nw=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Ep=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Zo=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const s=he(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(Zo(a,t))break}else if(Nt(a)&&Zo(a,t))break}}};function Dp(e,t,r){const n=he(e,r);if(n||Ri(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const s=o.join("."),i=he(t,s),a=he(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 $w=(e,t,r,n)=>{r(e);const{name:o,...s}=e;return ir(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(i=>t[i]===(!n||Tr.all))},Lw=(e,t,r)=>!e||!t||e===t||Vo(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),zw=(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,Bw=(e,t)=>!Mc(he(e,t)).length&&Ft(e,t),Fw=(e,t,r)=>{const n=Vo(he(e,r));return ct(n,"root",t[r]),ct(e,r,n),e},Bi=e=>Hr(e);function kp(e,t,r="validate"){if(Bi(e)||Array.isArray(e)&&e.every(Bi)||pr(e)&&!e)return{type:r,message:Bi(e)?e:"",ref:t}}var Gn=e=>Nt(e)&&!zi(e)?e:{value:e,message:""},Ap=async(e,t,r,n,o,s)=>{const{ref:i,refs:a,required:c,maxLength:u,minLength:d,min:f,max:h,pattern:v,validate:m,name:p,valueAsNumber:b,mount:w}=e._f,C=he(r,p);if(!w||t.has(p))return{};const E=a?a[0]:i,S=G=>{o&&E.reportValidity&&(E.setCustomValidity(pr(G)?"":G||""),E.reportValidity())},_={},W=zc(i),D=Ho(i),A=W||D,M=(b||Lc(i))&&$t(i.value)&&$t(C)||$i(i)&&i.value===""||C===""||Array.isArray(C)&&!C.length,I=$c.bind(null,p,n,_),V=(G,F,Y,oe=Qr.maxLength,U=Qr.minLength)=>{const N=G?F:Y;_[p]={type:G?oe:U,message:N,ref:i,...I(G?oe:U,N)}};if(s?!Array.isArray(C)||!C.length:c&&(!A&&(M||rr(C))||pr(C)&&!C||D&&!yp(a).isValid||W&&!_p(a).isValid)){const{value:G,message:F}=Bi(c)?{value:!!c,message:c}:Gn(c);if(G&&(_[p]={type:Qr.required,message:F,ref:E,...I(Qr.required,F)},!n))return S(F),_}if(!M&&(!rr(f)||!rr(h))){let G,F;const Y=Gn(h),oe=Gn(f);if(!rr(C)&&!isNaN(C)){const U=i.valueAsNumber||C&&+C;rr(Y.value)||(G=U>Y.value),rr(oe.value)||(F=U<oe.value)}else{const U=i.valueAsDate||new Date(C),N=$=>new Date(new Date().toDateString()+" "+$),ce=i.type=="time",fe=i.type=="week";Hr(Y.value)&&C&&(G=ce?N(C)>N(Y.value):fe?C>Y.value:U>new Date(Y.value)),Hr(oe.value)&&C&&(F=ce?N(C)<N(oe.value):fe?C<oe.value:U<new Date(oe.value))}if((G||F)&&(V(!!G,Y.message,oe.message,Qr.max,Qr.min),!n))return S(_[p].message),_}if((u||d)&&!M&&(Hr(C)||s&&Array.isArray(C))){const G=Gn(u),F=Gn(d),Y=!rr(G.value)&&C.length>+G.value,oe=!rr(F.value)&&C.length<+F.value;if((Y||oe)&&(V(Y,G.message,F.message),!n))return S(_[p].message),_}if(v&&!M&&Hr(C)){const{value:G,message:F}=Gn(v);if(zi(G)&&!C.match(G)&&(_[p]={type:Qr.pattern,message:F,ref:i,...I(Qr.pattern,F)},!n))return S(F),_}if(m){if(Ir(m)){const G=await m(C,r),F=kp(G,E);if(F&&(_[p]={...F,...I(Qr.validate,F.message)},!n))return S(F.message),_}else if(Nt(m)){let G={};for(const F in m){if(!ir(G)&&!n)break;const Y=kp(await m[F](C,r),E,F);Y&&(G={...Y,...I(F,Y.message)},S(Y.message),n&&(_[p]=G))}if(!ir(G)&&(_[p]={ref:E,...G},!n))return _}}return S(!0),_};const Ww={mode:Tr.onSubmit,reValidateMode:Tr.onChange,shouldFocusError:!0};function Uw(e={}){let t={...Ww,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ir(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},o=Nt(t.defaultValues)||Nt(t.values)?Ut(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:Ut(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,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let f={...d};const h={array:fp(),state:fp()},v=t.criteriaMode===Tr.all,m=k=>P=>{clearTimeout(u),u=setTimeout(k,P)},p=async k=>{if(!t.disabled&&(d.isValid||f.isValid||k)){const P=t.resolver?ir((await D()).errors):await M(n,!0);P!==r.isValid&&h.state.next({isValid:P})}},b=(k,P)=>{!t.disabled&&(d.isValidating||d.validatingFields||f.isValidating||f.validatingFields)&&((k||Array.from(a.mount)).forEach(B=>{B&&(P?ct(r.validatingFields,B,P):Ft(r.validatingFields,B))}),h.state.next({validatingFields:r.validatingFields,isValidating:!ir(r.validatingFields)}))},w=(k,P=[],B,ue,se=!0,O=!0)=>{if(ue&&B&&!t.disabled){if(i.action=!0,O&&Array.isArray(he(n,k))){const ne=B(he(n,k),ue.argA,ue.argB);se&&ct(n,k,ne)}if(O&&Array.isArray(he(r.errors,k))){const ne=B(he(r.errors,k),ue.argA,ue.argB);se&&ct(r.errors,k,ne),Bw(r.errors,k)}if((d.touchedFields||f.touchedFields)&&O&&Array.isArray(he(r.touchedFields,k))){const ne=B(he(r.touchedFields,k),ue.argA,ue.argB);se&&ct(r.touchedFields,k,ne)}(d.dirtyFields||f.dirtyFields)&&(r.dirtyFields=Yo(o,s)),h.state.next({name:k,isDirty:V(k,P),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ct(s,k,P)},C=(k,P)=>{ct(r.errors,k,P),h.state.next({errors:r.errors})},E=k=>{r.errors=k,h.state.next({errors:r.errors,isValid:!1})},S=(k,P,B,ue)=>{const se=he(n,k);if(se){const O=he(s,k,$t(B)?he(o,k):B);$t(O)||ue&&ue.defaultChecked||P?ct(s,k,P?O:wp(se._f)):Y(k,O),i.mount&&p()}},_=(k,P,B,ue,se)=>{let O=!1,ne=!1;const Se={name:k};if(!t.disabled){if(!B||ue){(d.isDirty||f.isDirty)&&(ne=r.isDirty,r.isDirty=Se.isDirty=V(),O=ne!==Se.isDirty);const Oe=Xr(he(o,k),P);ne=!!he(r.dirtyFields,k),Oe?Ft(r.dirtyFields,k):ct(r.dirtyFields,k,!0),Se.dirtyFields=r.dirtyFields,O=O||(d.dirtyFields||f.dirtyFields)&&ne!==!Oe}if(B){const Oe=he(r.touchedFields,k);Oe||(ct(r.touchedFields,k,B),Se.touchedFields=r.touchedFields,O=O||(d.touchedFields||f.touchedFields)&&Oe!==B)}O&&se&&h.state.next(Se)}return O?Se:{}},W=(k,P,B,ue)=>{const se=he(r.errors,k),O=(d.isValid||f.isValid)&&pr(P)&&r.isValid!==P;if(t.delayError&&B?(c=m(()=>C(k,B)),c(t.delayError)):(clearTimeout(u),c=null,B?ct(r.errors,k,B):Ft(r.errors,k)),(B?!Xr(se,B):se)||!ir(ue)||O){const ne={...ue,...O&&pr(P)?{isValid:P}:{},errors:r.errors,name:k};r={...r,...ne},h.state.next(ne)}},D=async k=>{b(k,!0);const P=await t.resolver(s,t.context,jw(k||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return b(k),P},A=async k=>{const{errors:P}=await D(k);if(k)for(const B of k){const ue=he(P,B);ue?ct(r.errors,B,ue):Ft(r.errors,B)}else r.errors=P;return P},M=async(k,P,B={valid:!0})=>{for(const ue in k){const se=k[ue];if(se){const{_f:O,...ne}=se;if(O){const Se=a.array.has(O.name),Oe=se._f&&Rw(se._f);Oe&&d.validatingFields&&b([ue],!0);const R=await Ap(se,a.disabled,s,v,t.shouldUseNativeValidation&&!P,Se);if(Oe&&d.validatingFields&&b([ue]),R[O.name]&&(B.valid=!1,P))break;!P&&(he(R,O.name)?Se?Fw(r.errors,R,O.name):ct(r.errors,O.name,R[O.name]):Ft(r.errors,O.name))}!ir(ne)&&await M(ne,P,B)}}return B.valid},I=()=>{for(const k of a.unMount){const P=he(n,k);P&&(P._f.refs?P._f.refs.every(B=>!Bc(B)):!Bc(P._f.ref))&&le(k)}a.unMount=new Set},V=(k,P)=>!t.disabled&&(k&&P&&ct(s,k,P),!Xr($(),o)),G=(k,P,B)=>up(k,a,{...i.mount?s:$t(P)?o:Hr(k)?{[k]:P}:P},B,P),F=k=>Mc(he(i.mount?s:o,k,t.shouldUnregister?he(o,k,[]):[])),Y=(k,P,B={})=>{const ue=he(n,k);let se=P;if(ue){const O=ue._f;O&&(!O.disabled&&ct(s,k,bp(P,O)),se=$i(O.ref)&&rr(P)?"":P,pp(O.ref)?[...O.ref.options].forEach(ne=>ne.selected=se.includes(ne.value)):O.refs?Ho(O.ref)?O.refs.forEach(ne=>{(!ne.defaultChecked||!ne.disabled)&&(Array.isArray(se)?ne.checked=!!se.find(Se=>Se===ne.value):ne.checked=se===ne.value||!!se)}):O.refs.forEach(ne=>ne.checked=ne.value===se):Lc(O.ref)?O.ref.value="":(O.ref.value=se,O.ref.type||h.state.next({name:k,values:Ut(s)})))}(B.shouldDirty||B.shouldTouch)&&_(k,se,B.shouldTouch,B.shouldDirty,!0),B.shouldValidate&&fe(k)},oe=(k,P,B)=>{for(const ue in P){if(!P.hasOwnProperty(ue))return;const se=P[ue],O=k+"."+ue,ne=he(n,O);(a.array.has(k)||Nt(se)||ne&&!ne._f)&&!En(se)?oe(O,se,B):Y(O,se,B)}},U=(k,P,B={})=>{const ue=he(n,k),se=a.array.has(k),O=Ut(P);ct(s,k,O),se?(h.array.next({name:k,values:Ut(s)}),(d.isDirty||d.dirtyFields||f.isDirty||f.dirtyFields)&&B.shouldDirty&&h.state.next({name:k,dirtyFields:Yo(o,s),isDirty:V(k,O)})):ue&&!ue._f&&!rr(O)?oe(k,O,B):Y(k,O,B),Ep(k,a)&&h.state.next({...r,name:k}),h.state.next({name:i.mount?k:void 0,values:Ut(s)})},N=async k=>{i.mount=!0;const P=k.target;let B=P.name,ue=!0;const se=he(n,B),O=Oe=>{ue=Number.isNaN(Oe)||En(Oe)&&isNaN(Oe.getTime())||Xr(Oe,he(s,B,Oe))},ne=Sp(t.mode),Se=Sp(t.reValidateMode);if(se){let Oe,R;const te=P.type?wp(se._f):ap(k),_e=k.type===Ni.BLUR||k.type===Ni.FOCUS_OUT,Ge=!Nw(se._f)&&!t.resolver&&!he(r.errors,B)&&!se._f.deps||zw(_e,he(r.touchedFields,B),r.isSubmitted,Se,ne),q=Ep(B,a,_e);ct(s,B,te),_e?(!P||!P.readOnly)&&(se._f.onBlur&&se._f.onBlur(k),c&&c(0)):se._f.onChange&&se._f.onChange(k);const de=_(B,te,_e),Ee=!ir(de)||q;if(!_e&&h.state.next({name:B,type:k.type,values:Ut(s)}),Ge)return(d.isValid||f.isValid)&&(t.mode==="onBlur"?_e&&p():_e||p()),Ee&&h.state.next({name:B,...q?{}:de});if(!_e&&q&&h.state.next({...r}),t.resolver){const{errors:Ae}=await D([B]);if(O(te),ue){const Fe=Dp(r.errors,n,B),X=Dp(Ae,n,Fe.name||B);Oe=X.error,B=X.name,R=ir(Ae)}}else b([B],!0),Oe=(await Ap(se,a.disabled,s,v,t.shouldUseNativeValidation))[B],b([B]),O(te),ue&&(Oe?R=!1:(d.isValid||f.isValid)&&(R=await M(n,!0)));ue&&(se._f.deps&&fe(se._f.deps),W(B,R,Oe,de))}},ce=(k,P)=>{if(he(r.errors,P)&&k.focus)return k.focus(),1},fe=async(k,P={})=>{let B,ue;const se=Vo(k);if(t.resolver){const O=await A($t(k)?k:se);B=ir(O),ue=k?!se.some(ne=>he(O,ne)):B}else k?(ue=(await Promise.all(se.map(async O=>{const ne=he(n,O);return await M(ne&&ne._f?{[O]:ne}:ne)}))).every(Boolean),!(!ue&&!r.isValid)&&p()):ue=B=await M(n);return h.state.next({...!Hr(k)||(d.isValid||f.isValid)&&B!==r.isValid?{}:{name:k},...t.resolver||!k?{isValid:B}:{},errors:r.errors}),P.shouldFocus&&!ue&&Zo(n,ce,k?se:a.mount),ue},$=k=>{const P={...i.mount?s:o};return $t(k)?P:Hr(k)?he(P,k):k.map(B=>he(P,B))},Q=(k,P)=>({invalid:!!he((P||r).errors,k),isDirty:!!he((P||r).dirtyFields,k),error:he((P||r).errors,k),isValidating:!!he(r.validatingFields,k),isTouched:!!he((P||r).touchedFields,k)}),Ce=k=>{k&&Vo(k).forEach(P=>Ft(r.errors,P)),h.state.next({errors:k?r.errors:{}})},me=(k,P,B)=>{const ue=(he(n,k,{_f:{}})._f||{}).ref,se=he(r.errors,k)||{},{ref:O,message:ne,type:Se,...Oe}=se;ct(r.errors,k,{...Oe,...P,ref:ue}),h.state.next({name:k,errors:r.errors,isValid:!1}),B&&B.shouldFocus&&ue&&ue.focus&&ue.focus()},we=(k,P)=>Ir(k)?h.state.subscribe({next:B=>"values"in B&&k(G(void 0,P),B)}):G(k,P,!0),ae=k=>h.state.subscribe({next:P=>{Lw(k.name,P.name,k.exact)&&$w(P,k.formState||d,Be,k.reRenderRoot)&&k.callback({values:{...s},...r,...P,defaultValues:o})}}).unsubscribe,ee=k=>(i.mount=!0,f={...f,...k.formState},ae({...k,formState:f})),le=(k,P={})=>{for(const B of k?Vo(k):a.mount)a.mount.delete(B),a.array.delete(B),P.keepValue||(Ft(n,B),Ft(s,B)),!P.keepError&&Ft(r.errors,B),!P.keepDirty&&Ft(r.dirtyFields,B),!P.keepTouched&&Ft(r.touchedFields,B),!P.keepIsValidating&&Ft(r.validatingFields,B),!t.shouldUnregister&&!P.keepDefaultValue&&Ft(o,B);h.state.next({values:Ut(s)}),h.state.next({...r,...P.keepDirty?{isDirty:V()}:{}}),!P.keepIsValid&&p()},ge=({disabled:k,name:P})=>{(pr(k)&&i.mount||k||a.disabled.has(P))&&(k?a.disabled.add(P):a.disabled.delete(P))},ie=(k,P={})=>{let B=he(n,k);const ue=pr(P.disabled)||pr(t.disabled);return ct(n,k,{...B||{},_f:{...B&&B._f?B._f:{ref:{name:k}},name:k,mount:!0,...P}}),a.mount.add(k),B?ge({disabled:pr(P.disabled)?P.disabled:t.disabled,name:k}):S(k,!0,P.value),{...ue?{disabled:P.disabled||t.disabled}:{},...t.progressive?{required:!!P.required,min:qo(P.min),max:qo(P.max),minLength:qo(P.minLength),maxLength:qo(P.maxLength),pattern:qo(P.pattern)}:{},name:k,onChange:N,onBlur:N,ref:se=>{if(se){ie(k,P),B=he(n,k);const O=$t(se.value)&&se.querySelectorAll&&se.querySelectorAll("input,select,textarea")[0]||se,ne=Mw(O),Se=B._f.refs||[];if(ne?Se.find(Oe=>Oe===O):O===B._f.ref)return;ct(n,k,{_f:{...B._f,...ne?{refs:[...Se.filter(Bc),O,...Array.isArray(he(o,k))?[{}]:[]],ref:{type:O.type,name:k}}:{ref:O}}}),S(k,!1,void 0,O)}else B=he(n,k,{}),B._f&&(B._f.mount=!1),(t.shouldUnregister||P.shouldUnregister)&&!(cp(a.array,k)&&i.action)&&a.unMount.add(k)}}},pe=()=>t.shouldFocusError&&Zo(n,ce,a.mount),Re=k=>{pr(k)&&(h.state.next({disabled:k}),Zo(n,(P,B)=>{const ue=he(n,B);ue&&(P.disabled=ue._f.disabled||k,Array.isArray(ue._f.refs)&&ue._f.refs.forEach(se=>{se.disabled=ue._f.disabled||k}))},0,!1))},j=(k,P)=>async B=>{let ue;B&&(B.preventDefault&&B.preventDefault(),B.persist&&B.persist());let se=Ut(s);if(h.state.next({isSubmitting:!0}),t.resolver){const{errors:O,values:ne}=await D();r.errors=O,se=Ut(ne)}else await M(n);if(a.disabled.size)for(const O of a.disabled)Ft(se,O);if(Ft(r.errors,"root"),ir(r.errors)){h.state.next({errors:{}});try{await k(se,B)}catch(O){ue=O}}else P&&await P({...r.errors},B),pe(),setTimeout(pe);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ir(r.errors)&&!ue,submitCount:r.submitCount+1,errors:r.errors}),ue)throw ue},We=(k,P={})=>{he(n,k)&&($t(P.defaultValue)?U(k,Ut(he(o,k))):(U(k,P.defaultValue),ct(o,k,Ut(P.defaultValue))),P.keepTouched||Ft(r.touchedFields,k),P.keepDirty||(Ft(r.dirtyFields,k),r.isDirty=P.defaultValue?V(k,Ut(he(o,k))):V()),P.keepError||(Ft(r.errors,k),d.isValid&&p()),h.state.next({...r}))},qe=(k,P={})=>{const B=k?Ut(k):o,ue=Ut(B),se=ir(k),O=se?o:ue;if(P.keepDefaultValues||(o=B),!P.keepValues){if(P.keepDirtyValues){const ne=new Set([...a.mount,...Object.keys(Yo(o,s))]);for(const Se of Array.from(ne))he(r.dirtyFields,Se)?ct(O,Se,he(s,Se)):U(Se,he(O,Se))}else{if(Ic&&$t(k))for(const ne of a.mount){const Se=he(n,ne);if(Se&&Se._f){const Oe=Array.isArray(Se._f.refs)?Se._f.refs[0]:Se._f.ref;if($i(Oe)){const R=Oe.closest("form");if(R){R.reset();break}}}}if(P.keepFieldsRef)for(const ne of a.mount)U(ne,he(O,ne));else n={}}s=t.shouldUnregister?P.keepDefaultValues?Ut(o):{}:Ut(O),h.array.next({values:{...O}}),h.state.next({values:{...O}})}a={mount:P.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!d.isValid||!!P.keepIsValid||!!P.keepDirtyValues,i.watch=!!t.shouldUnregister,h.state.next({submitCount:P.keepSubmitCount?r.submitCount:0,isDirty:se?!1:P.keepDirty?r.isDirty:!!(P.keepDefaultValues&&!Xr(k,o)),isSubmitted:P.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:se?{}:P.keepDirtyValues?P.keepDefaultValues&&s?Yo(o,s):r.dirtyFields:P.keepDefaultValues&&k?Yo(o,k):P.keepDirty?r.dirtyFields:{},touchedFields:P.keepTouched?r.touchedFields:{},errors:P.keepErrors?r.errors:{},isSubmitSuccessful:P.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Ze=(k,P)=>qe(Ir(k)?k(s):k,P),Ne=(k,P={})=>{const B=he(n,k),ue=B&&B._f;if(ue){const se=ue.refs?ue.refs[0]:ue.ref;se.focus&&(se.focus(),P.shouldSelect&&Ir(se.select)&&se.select())}},Be=k=>{r={...r,...k}},pt={control:{register:ie,unregister:le,getFieldState:Q,handleSubmit:j,setError:me,_subscribe:ae,_runSchema:D,_focusError:pe,_getWatch:G,_getDirty:V,_setValid:p,_setFieldArray:w,_setDisabledField:ge,_setErrors:E,_getFieldArray:F,_reset:qe,_resetDefaultValues:()=>Ir(t.defaultValues)&&t.defaultValues().then(k=>{Ze(k,t.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:I,_disableForm:Re,_subjects:h,_proxyFormState:d,get _fields(){return n},get _formValues(){return s},get _state(){return i},set _state(k){i=k},get _defaultValues(){return o},get _names(){return a},set _names(k){a=k},get _formState(){return r},get _options(){return t},set _options(k){t={...t,...k}}},subscribe:ee,trigger:fe,register:ie,handleSubmit:j,watch:we,setValue:U,getValues:$,reset:Ze,resetField:We,clearErrors:Ce,unregister:le,setError:me,setFocus:Ne,getFieldState:Q};return{...pt,formControl:pt}}function Tp(e={}){const t=y.useRef(void 0),r=y.useRef(void 0),[n,o]=y.useState({isDirty:!1,isValidating:!1,isLoading:Ir(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:Ir(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!Ir(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:i,...a}=Uw(e);t.current={...a,formState:n}}const s=t.current.control;return s._options=e,Rc(()=>{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&&!Xr(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=lp(n,s),t.current}const Ip=(e,t,r)=>{if(e&&"reportValidity"in e){const n=he(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Fc=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Ip(n.ref,r,e):n&&n.refs&&n.refs.forEach(o=>Ip(o,r,e))}},Mp=(e,t)=>{t.shouldUseNativeValidation&&Fc(e,t);const r={};for(const n in e){const o=he(t.fields,n),s=Object.assign(e[n]||{},{ref:o&&o.ref});if(Hw(t.names||Object.keys(e),n)){const i=Object.assign({},he(r,n));ct(i,"root",s),ct(r,n,i)}else ct(r,n,s)}return r},Hw=(e,t)=>{const r=Pp(t);return e.some(n=>Pp(n).match(`^${r}\\.\\d+`))};function Pp(e){return e.replace(/\]|\[/g,"")}function Z(e,t,r){function n(a,c){var u;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(u=a._zod).traits??(u.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 u=r?.Parent?new s:this;n(u,a),(c=u._zod).deferred??(c.deferred=[]);for(const d of u._zod.deferred)d();return u}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 Kn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Op extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const jp={};function Dn(e){return jp}function Vw(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 Wc(e,t){return typeof t=="bigint"?t.toString():t}function Uc(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Hc(e){return e==null}function Vc(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Yw(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 Rp=Symbol("evaluating");function gt(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Rp)return n===void 0&&(n=Rp,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function qw(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function an(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Qn(...e){const t={};for(const r of e){const n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function Np(e){return JSON.stringify(e)}const $p="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Fi(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Zw=Uc(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Go(e){if(Fi(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(Fi(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Lp(e){return Go(e)?{...e}:e}const Gw=new Set(["string","number","symbol"]);function Xn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function cn(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 Kw(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Qw={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 Xw(e,t){const r=e._zod.def,n=Qn(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 an(this,"shape",o),o},checks:[]});return cn(e,n)}function Jw(e,t){const r=e._zod.def,n=Qn(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 an(this,"shape",o),o},checks:[]});return cn(e,n)}function eS(e,t){if(!Go(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=Qn(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return an(this,"shape",s),s},checks:[]});return cn(e,o)}function tS(e,t){if(!Go(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 an(this,"shape",n),n},checks:e._zod.def.checks};return cn(e,r)}function rS(e,t){const r=Qn(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return an(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return cn(e,r)}function nS(e,t,r){const n=Qn(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 an(this,"shape",s),s},checks:[]});return cn(t,n)}function oS(e,t,r){const n=Qn(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 an(this,"shape",s),s},checks:[]});return cn(t,n)}function Jn(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 zp(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Wi(e){return typeof e=="string"?e:e?.message}function kn(e,t,r){const n={...e,path:e.path??[]};if(!e.message){const o=Wi(e.inst?._zod.def?.error?.(e))??Wi(t?.error?.(e))??Wi(r.customError?.(e))??Wi(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function Yc(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ko(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}const Bp=(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,Wc,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},qc=Z("$ZodError",Bp),Ui=Z("$ZodError",Bp,{Parent:Error});function sS(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 iS(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 u=i.path[c];c===i.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(i))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return o(e),n}const Hi=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 Kn;if(i.issues.length){const a=new(o?.Err??e)(i.issues.map(c=>kn(c,s,Dn())));throw $p(a,o?.callee),a}return i.value},aS=Hi(Ui),Vi=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=>kn(c,s,Dn())));throw $p(a,o?.callee),a}return i.value},cS=Vi(Ui),Yi=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 Kn;return s.issues.length?{success:!1,error:new(e??qc)(s.issues.map(i=>kn(i,o,Dn())))}:{success:!0,data:s.value}},lS=Yi(Ui),qi=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=>kn(i,o,Dn())))}:{success:!0,data:s.value}},uS=qi(Ui),dS=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Hi(e)(t,r,o)},fS=e=>(t,r,n)=>Hi(e)(t,r,n),pS=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Vi(e)(t,r,o)},hS=e=>async(t,r,n)=>Vi(e)(t,r,n),mS=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Yi(e)(t,r,o)},gS=e=>(t,r,n)=>Yi(e)(t,r,n),vS=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return qi(e)(t,r,o)},yS=e=>async(t,r,n)=>qi(e)(t,r,n),bS=/^[cC][^\s-]{8,}$/,xS=/^[0-9a-z]+$/,_S=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,wS=/^[0-9a-vA-V]{20}$/,SS=/^[A-Za-z0-9]{27}$/,CS=/^[a-zA-Z0-9_-]{21}$/,ES=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,DS=/^([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})$/,Fp=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)$/,kS=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,AS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function TS(){return new RegExp(AS,"u")}const IS=/^(?:(?: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])$/,MS=/^(([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})$/,PS=/^((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])$/,OS=/^(([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])$/,jS=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Wp=/^[A-Za-z0-9_-]*$/,RS=/^(?=.{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])?)*\.?$/,NS=/^\+(?:[0-9]){6,14}[0-9]$/,Up="(?:(?:\\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])))",$S=new RegExp(`^${Up}$`);function Hp(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 LS(e){return new RegExp(`^${Hp(e)}$`)}function zS(e){const t=Hp({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(`^${Up}T(?:${n})$`)}const BS=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},FS=/^\d+$/,WS=/^-?\d+(?:\.\d+)?/i,US=/true|false/i,HS=/^[^A-Z]*$/,VS=/^[^a-z]*$/,ar=Z("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Vp={number:"number",bigint:"bigint",object:"date"},Yp=Z("$ZodCheckLessThan",(e,t)=>{ar.init(e,t);const r=Vp[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})}}),qp=Z("$ZodCheckGreaterThan",(e,t)=>{ar.init(e,t);const r=Vp[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})}}),YS=Z("$ZodCheckMultipleOf",(e,t)=>{ar.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):Yw(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})}}),qS=Z("$ZodCheckNumberFormat",(e,t)=>{ar.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[o,s]=Qw[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=FS)}),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})}}),ZS=Z("$ZodCheckMaxLength",(e,t)=>{var r;ar.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Hc(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=Yc(o);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),GS=Z("$ZodCheckMinLength",(e,t)=>{var r;ar.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Hc(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=Yc(o);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),KS=Z("$ZodCheckLengthEquals",(e,t)=>{var r;ar.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Hc(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=Yc(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})}}),Zi=Z("$ZodCheckStringFormat",(e,t)=>{var r,n;ar.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=()=>{})}),QS=Z("$ZodCheckRegex",(e,t)=>{Zi.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})}}),XS=Z("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=HS),Zi.init(e,t)}),JS=Z("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=VS),Zi.init(e,t)}),eC=Z("$ZodCheckIncludes",(e,t)=>{ar.init(e,t);const r=Xn(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})}}),tC=Z("$ZodCheckStartsWith",(e,t)=>{ar.init(e,t);const r=new RegExp(`^${Xn(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})}}),rC=Z("$ZodCheckEndsWith",(e,t)=>{ar.init(e,t);const r=new RegExp(`.*${Xn(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})}}),nC=Z("$ZodCheckOverwrite",(e,t)=>{ar.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class oC{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 z2=vi("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),Hd=Symbol.for("constructDateFrom");function ac(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Hd in e?e[Hd](t):e instanceof Date?new e.constructor(t):new Date(t)}function an(e,t){return ac(t||e,e)}function Ud(e,t,r){const[n,o]=[+an(e.start,r?.in),+an(e.end,r?.in)].sort((a,c)=>a-c),[s,i]=[+an(t.start,r?.in),+an(t.end,r?.in)].sort((a,c)=>a-c);return n<i&&s<o}function yi(e){"@babel/helpers - typeof";return yi=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},yi(e)}var B2=/^\s+/,F2=/\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=W2(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=Kd(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=Yd(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=Yd(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=Vd(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=Vd(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 qd(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return Y2(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(_t(this._r,255)*100)+"%",g:Math.round(_t(this._g,255)*100)+"%",b:Math.round(_t(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(_t(this._r,255)*100)+"%, "+Math.round(_t(this._g,255)*100)+"%, "+Math.round(_t(this._b,255)*100)+"%)":"rgba("+Math.round(_t(this._r,255)*100)+"%, "+Math.round(_t(this._g,255)*100)+"%, "+Math.round(_t(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:o1[qd(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var r="#"+Zd(this._r,this._g,this._b,this._a),n=r,o=this._gradientType?"GradientType = 1, ":"";if(t){var s=ke(t);n="#"+Zd(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(K2,arguments)},brighten:function(){return this._applyModification(Q2,arguments)},darken:function(){return this._applyModification(X2,arguments)},desaturate:function(){return this._applyModification(q2,arguments)},saturate:function(){return this._applyModification(Z2,arguments)},greyscale:function(){return this._applyModification(G2,arguments)},spin:function(){return this._applyModification(J2,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(r1,arguments)},complement:function(){return this._applyCombination(e1,arguments)},monochromatic:function(){return this._applyCombination(n1,arguments)},splitcomplement:function(){return this._applyCombination(t1,arguments)},triad:function(){return this._applyCombination(Gd,[3])},tetrad:function(){return this._applyCombination(Gd,[4])}},ke.fromRatio=function(e,t){if(yi(e)=="object"){var r={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?r[n]=e[n]:r[n]=Ao(e[n]));e=r}return ke(e,t)};function W2(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=c1(e)),yi(e)=="object"&&(Kr(e.r)&&Kr(e.g)&&Kr(e.b)?(t=H2(e.r,e.g,e.b),i=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Kr(e.h)&&Kr(e.s)&&Kr(e.v)?(n=Ao(e.s),o=Ao(e.v),t=V2(e.h,n,o),i=!0,a="hsv"):Kr(e.h)&&Kr(e.s)&&Kr(e.l)&&(n=Ao(e.s),s=Ao(e.l),t=U2(e.h,n,s),i=!0,a="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=Kd(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 H2(e,t,r){return{r:_t(e,255)*255,g:_t(t,255)*255,b:_t(r,255)*255}}function Vd(e,t,r){e=_t(e,255),t=_t(t,255),r=_t(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 U2(e,t,r){var n,o,s;e=_t(e,360),t=_t(t,100),r=_t(r,100);function i(u,d,f){return f<0&&(f+=1),f>1&&(f-=1),f<1/6?u+(d-u)*6*f:f<1/2?d:f<2/3?u+(d-u)*(2/3-f)*6:u}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 Yd(e,t,r){e=_t(e,255),t=_t(t,255),r=_t(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 V2(e,t,r){e=_t(e,360)*6,t=_t(t,100),r=_t(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,u=[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:u*255,g:d*255,b:f*255}}function qd(e,t,r,n){var o=[Dr(Math.round(e).toString(16)),Dr(Math.round(t).toString(16)),Dr(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 Y2(e,t,r,n,o){var s=[Dr(Math.round(e).toString(16)),Dr(Math.round(t).toString(16)),Dr(Math.round(r).toString(16)),Dr(Qd(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 Zd(e,t,r,n){var o=[Dr(Qd(n)),Dr(Math.round(e).toString(16)),Dr(Math.round(t).toString(16)),Dr(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 q2(e,t){t=t===0?0:t||10;var r=ke(e).toHsl();return r.s-=t/100,r.s=bi(r.s),ke(r)}function Z2(e,t){t=t===0?0:t||10;var r=ke(e).toHsl();return r.s+=t/100,r.s=bi(r.s),ke(r)}function G2(e){return ke(e).desaturate(100)}function K2(e,t){t=t===0?0:t||10;var r=ke(e).toHsl();return r.l+=t/100,r.l=bi(r.l),ke(r)}function Q2(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 X2(e,t){t=t===0?0:t||10;var r=ke(e).toHsl();return r.l-=t/100,r.l=bi(r.l),ke(r)}function J2(e,t){var r=ke(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,ke(r)}function e1(e){var t=ke(e).toHsl();return t.h=(t.h+180)%360,ke(t)}function Gd(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 t1(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 r1(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 n1(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=l1(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 u=0;u<t.length;u++)s=ke.readability(e,t[u]),s>o&&(o=s,n=ke(t[u]));return ke.isReadable(e,n,{level:a,size:c})||!i?n:(r.includeFallbackColors=!1,ke.mostReadable(e,["#fff","#000"],r))};var cc=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"},o1=ke.hexNames=s1(cc);function s1(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function Kd(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function _t(e,t){i1(e)&&(e="100%");var r=a1(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 bi(e){return Math.min(1,Math.max(0,e))}function dr(e){return parseInt(e,16)}function i1(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function a1(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Dr(e){return e.length==1?"0"+e:""+e}function Ao(e){return e<=1&&(e=e*100+"%"),e}function Qd(e){return Math.round(parseFloat(e)*255).toString(16)}function Xd(e){return dr(e)/255}var kr=(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 Kr(e){return!!kr.CSS_UNIT.exec(e)}function c1(e){e=e.replace(B2,"").replace(F2,"").toLowerCase();var t=!1;if(cc[e])e=cc[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=kr.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=kr.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=kr.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=kr.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=kr.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=kr.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=kr.hex8.exec(e))?{r:dr(r[1]),g:dr(r[2]),b:dr(r[3]),a:Xd(r[4]),format:t?"name":"hex8"}:(r=kr.hex6.exec(e))?{r:dr(r[1]),g:dr(r[2]),b:dr(r[3]),format:t?"name":"hex"}:(r=kr.hex4.exec(e))?{r:dr(r[1]+""+r[1]),g:dr(r[2]+""+r[2]),b:dr(r[3]+""+r[3]),a:Xd(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=kr.hex3.exec(e))?{r:dr(r[1]+""+r[1]),g:dr(r[2]+""+r[2]),b:dr(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function l1(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 Jd="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",u1="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",d1="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",ef="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",tf=v.createContext(void 0),f1=({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(u=>{localStorage.setItem("user_email",u),r({userEmail:u})},[]),i=v.useCallback(u=>{localStorage.setItem("user_outlook",u),o({userEmail:u})},[]),a=v.useCallback(()=>{localStorage.removeItem("user_email"),r({userEmail:null})},[]),c=!!t.userEmail;return l.jsx(tf.Provider,{value:{session:t,sessionoutlook:n,login:s,loginOutlook:i,logout:a,isAuthenticated:c},children:e})},lc=()=>{const e=v.useContext(tf);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e};function rf(e,t){return function(){return e.apply(t,arguments)}}const{toString:p1}=Object.prototype,{getPrototypeOf:uc}=Object,{iterator:xi,toStringTag:nf}=Symbol,_i=(e=>t=>{const r=p1.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Ar=e=>(e=e.toLowerCase(),t=>_i(t)===e),wi=e=>t=>typeof t===e,{isArray:Yn}=Array,To=wi("undefined");function Io(e){return e!==null&&!To(e)&&e.constructor!==null&&!To(e.constructor)&&nr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const of=Ar("ArrayBuffer");function h1(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&of(e.buffer),t}const m1=wi("string"),nr=wi("function"),sf=wi("number"),Mo=e=>e!==null&&typeof e=="object",g1=e=>e===!0||e===!1,Si=e=>{if(_i(e)!=="object")return!1;const t=uc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(nf in e)&&!(xi in e)},v1=e=>{if(!Mo(e)||Io(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},y1=Ar("Date"),b1=Ar("File"),x1=Ar("Blob"),_1=Ar("FileList"),w1=e=>Mo(e)&&nr(e.pipe),S1=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||nr(e.append)&&((t=_i(e))==="formdata"||t==="object"&&nr(e.toString)&&e.toString()==="[object FormData]"))},C1=Ar("URLSearchParams"),[E1,D1,k1,A1]=["ReadableStream","Request","Response","Headers"].map(Ar),T1=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Po(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),Yn(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(Io(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 af(e,t){if(Io(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 bn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,cf=e=>!To(e)&&e!==bn;function dc(){const{caseless:e}=cf(this)&&this||{},t={},r=(n,o)=>{const s=e&&af(t,o)||o;Si(t[s])&&Si(n)?t[s]=dc(t[s],n):Si(n)?t[s]=dc({},n):Yn(n)?t[s]=n.slice():t[s]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&Po(arguments[n],r);return t}const I1=(e,t,r,{allOwnKeys:n}={})=>(Po(t,(o,s)=>{r&&nr(o)?e[s]=rf(o,r):e[s]=o},{allOwnKeys:n}),e),M1=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),P1=(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)},O1=(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&&uc(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},j1=(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},R1=e=>{if(!e)return null;if(Yn(e))return e;let t=e.length;if(!sf(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},N1=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&uc(Uint8Array)),$1=(e,t)=>{const n=(e&&e[xi]).call(e);let o;for(;(o=n.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},L1=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},z1=Ar("HTMLFormElement"),B1=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),lf=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),F1=Ar("RegExp"),uf=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Po(r,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(n[s]=i||o)}),Object.defineProperties(e,n)},W1=e=>{uf(e,(t,r)=>{if(nr(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(nr(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+"'")})}})},H1=(e,t)=>{const r={},n=o=>{o.forEach(s=>{r[s]=!0})};return Yn(e)?n(e):n(String(e).split(t)),r},U1=()=>{},V1=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Y1(e){return!!(e&&nr(e.append)&&e[nf]==="FormData"&&e[xi])}const q1=e=>{const t=new Array(10),r=(n,o)=>{if(Mo(n)){if(t.indexOf(n)>=0)return;if(Io(n))return n;if(!("toJSON"in n)){t[o]=n;const s=Yn(n)?[]:{};return Po(n,(i,a)=>{const c=r(i,o+1);!To(c)&&(s[a]=c)}),t[o]=void 0,s}}return n};return r(e,0)},Z1=Ar("AsyncFunction"),G1=e=>e&&(Mo(e)||nr(e))&&nr(e.then)&&nr(e.catch),df=((e,t)=>e?setImmediate:t?((r,n)=>(bn.addEventListener("message",({source:o,data:s})=>{o===bn&&s===r&&n.length&&n.shift()()},!1),o=>{n.push(o),bn.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",nr(bn.postMessage)),K1=typeof queueMicrotask<"u"?queueMicrotask.bind(bn):typeof process<"u"&&process.nextTick||df,z={isArray:Yn,isArrayBuffer:of,isBuffer:Io,isFormData:S1,isArrayBufferView:h1,isString:m1,isNumber:sf,isBoolean:g1,isObject:Mo,isPlainObject:Si,isEmptyObject:v1,isReadableStream:E1,isRequest:D1,isResponse:k1,isHeaders:A1,isUndefined:To,isDate:y1,isFile:b1,isBlob:x1,isRegExp:F1,isFunction:nr,isStream:w1,isURLSearchParams:C1,isTypedArray:N1,isFileList:_1,forEach:Po,merge:dc,extend:I1,trim:T1,stripBOM:M1,inherits:P1,toFlatObject:O1,kindOf:_i,kindOfTest:Ar,endsWith:j1,toArray:R1,forEachEntry:$1,matchAll:L1,isHTMLForm:z1,hasOwnProperty:lf,hasOwnProp:lf,reduceDescriptors:uf,freezeMethods:W1,toObjectSet:H1,toCamelCase:B1,noop:U1,toFiniteNumber:V1,findKey:af,global:bn,isContextDefined:cf,isSpecCompliantForm:Y1,toJSONObject:q1,isAsyncFn:Z1,isThenable:G1,setImmediate:df,asap:K1,isIterable:e=>e!=null&&nr(e[xi])};function Le(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(Le,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 ff=Le.prototype,pf={};["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=>{pf[e]={value:e}}),Object.defineProperties(Le,pf),Object.defineProperty(ff,"isAxiosError",{value:!0}),Le.from=(e,t,r,n,o,s)=>{const i=Object.create(ff);return z.toFlatObject(e,i,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),Le.call(i,e.message,t,r,n,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const Q1=null;function fc(e){return z.isPlainObject(e)||z.isArray(e)}function hf(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function mf(e,t,r){return e?e.concat(t).map(function(o,s){return o=hf(o),!r&&s?"["+o+"]":o}).join(r?".":""):t}function X1(e){return z.isArray(e)&&!e.some(fc)}const J1=z.toFlatObject(z,{},null,function(t){return/^is[A-Z]/.test(t)});function Ci(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(p,b){return!z.isUndefined(b[p])});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 u(g){if(g===null)return"";if(z.isDate(g))return g.toISOString();if(z.isBoolean(g))return g.toString();if(!c&&z.isBlob(g))throw new Le("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(g)||z.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function d(g,p,b){let w=g;if(g&&!b&&typeof g=="object"){if(z.endsWith(p,"{}"))p=n?p:p.slice(0,-2),g=JSON.stringify(g);else if(z.isArray(g)&&X1(g)||(z.isFileList(g)||z.endsWith(p,"[]"))&&(w=z.toArray(g)))return p=hf(p),w.forEach(function(E,C){!(z.isUndefined(E)||E===null)&&t.append(i===!0?mf([p],C,s):i===null?p:p+"[]",u(E))}),!1}return fc(g)?!0:(t.append(mf(b,p,s),u(g)),!1)}const f=[],h=Object.assign(J1,{defaultVisitor:d,convertValue:u,isVisitable:fc});function y(g,p){if(!z.isUndefined(g)){if(f.indexOf(g)!==-1)throw Error("Circular reference detected in "+p.join("."));f.push(g),z.forEach(g,function(w,S){(!(z.isUndefined(w)||w===null)&&o.call(t,w,z.isString(S)?S.trim():S,p,h))===!0&&y(w,p?p.concat(S):[S])}),f.pop()}}if(!z.isObject(e))throw new TypeError("data must be an object");return y(e),t}function gf(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function pc(e,t){this._pairs=[],e&&Ci(e,this,t)}const vf=pc.prototype;vf.append=function(t,r){this._pairs.push([t,r])},vf.toString=function(t){const r=t?function(n){return t.call(this,n,gf)}:gf;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function ex(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function yf(e,t,r){if(!t)return e;const n=r&&r.encode||ex;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 pc(t,r).toString(n),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class bf{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 xf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},tx={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:pc,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},hc=typeof window<"u"&&typeof document<"u",mc=typeof navigator=="object"&&navigator||void 0,rx=hc&&(!mc||["ReactNative","NativeScript","NS"].indexOf(mc.product)<0),nx=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ox=hc&&window.location.href||"http://localhost",Xt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:hc,hasStandardBrowserEnv:rx,hasStandardBrowserWebWorkerEnv:nx,navigator:mc,origin:ox},Symbol.toStringTag,{value:"Module"})),...tx};function sx(e,t){return Ci(e,new Xt.classes.URLSearchParams,{visitor:function(r,n,o,s){return Xt.isNode&&z.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function ix(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function ax(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 _f(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]=ax(o[i])),!a)}if(z.isFormData(e)&&z.isFunction(e.entries)){const r={};return z.forEachEntry(e,(n,o)=>{t(ix(n),o,r,0)}),r}return null}function cx(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 Oo={transitional:xf,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(_f(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 sx(t,this.formSerializer).toString();if((a=z.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ci(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||o?(r.setContentType("application/json",!1),cx(t)):t}],transformResponse:[function(t){const r=this.transitional||Oo.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"?Le.from(a,Le.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:Xt.classes.FormData,Blob:Xt.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=>{Oo.headers[e]={}});const lx=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"]),ux=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]&&lx[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},wf=Symbol("internals");function jo(e){return e&&String(e).trim().toLowerCase()}function Ei(e){return e===!1||e==null?e:z.isArray(e)?e.map(Ei):String(e)}function dx(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 fx=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function gc(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 px(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function hx(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 or=class{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function s(a,c,u){const d=jo(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||u===!0||u===void 0&&o[f]!==!1)&&(o[f||c]=Ei(a))}const i=(a,c)=>z.forEach(a,(u,d)=>s(u,d,c));if(z.isPlainObject(t)||t instanceof this.constructor)i(t,r);else if(z.isString(t)&&(t=t.trim())&&!fx(t))i(ux(t),r);else if(z.isObject(t)&&z.isIterable(t)){let a={},c,u;for(const d of t){if(!z.isArray(d))throw TypeError("Object iterator must return a key-value pair");a[u=d[0]]=(c=a[u])?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=jo(t),t){const n=z.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return dx(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=jo(t),t){const n=z.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||gc(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function s(i){if(i=jo(i),i){const a=z.findKey(n,i);a&&(!r||gc(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||gc(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]=Ei(o),delete r[s];return}const a=t?px(s):String(s).trim();a!==s&&delete r[s],r[a]=Ei(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[wf]=this[wf]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=jo(i);n[a]||(hx(o,i),n[a]=!0)}return z.isArray(t)?t.forEach(s):s(t),this}};or.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),z.reduceDescriptors(or.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),z.freezeMethods(or);function vc(e,t){const r=this||Oo,n=t||r,o=or.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 Sf(e){return!!(e&&e.__CANCEL__)}function qn(e,t,r){Le.call(this,e??"canceled",Le.ERR_CANCELED,t,r),this.name="CanceledError"}z.inherits(qn,Le,{__CANCEL__:!0});function Cf(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Le("Request failed with status code "+r.status,[Le.ERR_BAD_REQUEST,Le.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function mx(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function gx(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 u=Date.now(),d=n[s];i||(i=u),r[o]=c,n[o]=u;let f=s,h=0;for(;f!==o;)h+=r[f++],f=f%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),u-i<t)return;const y=d&&u-d;return y?Math.round(h*1e3/y):void 0}}function vx(e,t){let r=0,n=1e3/t,o,s;const i=(u,d=Date.now())=>{r=d,o=null,s&&(clearTimeout(s),s=null),e(...u)};return[(...u)=>{const d=Date.now(),f=d-r;f>=n?i(u,d):(o=u,s||(s=setTimeout(()=>{s=null,i(o)},n-f)))},()=>o&&i(o)]}const Di=(e,t,r=3)=>{let n=0;const o=gx(50,250);return vx(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,c=i-n,u=o(c),d=i<=a;n=i;const f={loaded:i,total:a,progress:a?i/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&d?(a-i)/u:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(f)},r)},Ef=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Df=e=>(...t)=>z.asap(()=>e(...t)),yx=Xt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Xt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Xt.origin),Xt.navigator&&/(msie|trident)/i.test(Xt.navigator.userAgent)):()=>!0,bx=Xt.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 xx(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function _x(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function kf(e,t,r){let n=!xx(t);return e&&(n||r==!1)?_x(e,t):t}const Af=e=>e instanceof or?{...e}:e;function xn(e,t){t=t||{};const r={};function n(u,d,f,h){return z.isPlainObject(u)&&z.isPlainObject(d)?z.merge.call({caseless:h},u,d):z.isPlainObject(d)?z.merge({},d):z.isArray(d)?d.slice():d}function o(u,d,f,h){if(z.isUndefined(d)){if(!z.isUndefined(u))return n(void 0,u,f,h)}else return n(u,d,f,h)}function s(u,d){if(!z.isUndefined(d))return n(void 0,d)}function i(u,d){if(z.isUndefined(d)){if(!z.isUndefined(u))return n(void 0,u)}else return n(void 0,d)}function a(u,d,f){if(f in t)return n(u,d);if(f in e)return n(void 0,u)}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:(u,d,f)=>o(Af(u),Af(d),f,!0)};return z.forEach(Object.keys({...e,...t}),function(d){const f=c[d]||o,h=f(e[d],t[d],d);z.isUndefined(h)&&f!==a||(r[d]=h)}),r}const Tf=e=>{const t=xn({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=or.from(i),t.url=yf(kf(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(Xt.hasStandardBrowserEnv||Xt.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((c=i.getContentType())!==!1){const[u,...d]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...d].join("; "))}}if(Xt.hasStandardBrowserEnv&&(n&&z.isFunction(n)&&(n=n(t)),n||n!==!1&&yx(t.url))){const u=o&&s&&bx.read(s);u&&i.set(o,u)}return t},wx=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const o=Tf(e);let s=o.data;const i=or.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=o,d,f,h,y,g;function p(){y&&y(),g&&g(),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 E=or.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),_={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:E,config:e,request:b};Cf(function(D){r(D),p()},function(D){n(D),p()},_),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 Le("Request aborted",Le.ECONNABORTED,e,b)),b=null)},b.onerror=function(){n(new Le("Network Error",Le.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let C=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const _=o.transitional||xf;o.timeoutErrorMessage&&(C=o.timeoutErrorMessage),n(new Le(C,_.clarifyTimeoutError?Le.ETIMEDOUT:Le.ECONNABORTED,e,b)),b=null},s===void 0&&i.setContentType(null),"setRequestHeader"in b&&z.forEach(i.toJSON(),function(C,_){b.setRequestHeader(_,C)}),z.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),a&&a!=="json"&&(b.responseType=o.responseType),u&&([h,g]=Di(u,!0),b.addEventListener("progress",h)),c&&b.upload&&([f,y]=Di(c),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(d=E=>{b&&(n(!E||E.type?new qn(null,e,b):E),b.abort(),b=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const S=mx(o.url);if(S&&Xt.protocols.indexOf(S)===-1){n(new Le("Unsupported protocol "+S+":",Le.ERR_BAD_REQUEST,e));return}b.send(s||null)})},Sx=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const s=function(u){if(!o){o=!0,a();const d=u instanceof Error?u:this.reason;n.abort(d instanceof Le?d:new qn(d instanceof Error?d.message:d))}};let i=t&&setTimeout(()=>{i=null,s(new Le(`timeout ${t} of ms exceeded`,Le.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:c}=n;return c.unsubscribe=()=>z.asap(a),c}},Cx=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},Ex=async function*(e,t){for await(const r of Dx(e))yield*Cx(r,t)},Dx=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()}},If=(e,t,r,n)=>{const o=Ex(e,t);let s=0,i,a=c=>{i||(i=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await o.next();if(u){a(),c.close();return}let f=d.byteLength;if(r){let h=s+=f;r(h)}c.enqueue(new Uint8Array(d))}catch(u){throw a(u),u}},cancel(c){return a(c),o.return()}},{highWaterMark:2})},ki=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Mf=ki&&typeof ReadableStream=="function",kx=ki&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Pf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Ax=Mf&&Pf(()=>{let e=!1;const t=new Request(Xt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Of=64*1024,yc=Mf&&Pf(()=>z.isReadableStream(new Response("").body)),Ai={stream:yc&&(e=>e.body)};ki&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ai[t]&&(Ai[t]=z.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new Le(`Response type '${t}' is not supported`,Le.ERR_NOT_SUPPORT,n)})})})(new Response);const Tx=async e=>{if(e==null)return 0;if(z.isBlob(e))return e.size;if(z.isSpecCompliantForm(e))return(await new Request(Xt.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 kx(e)).byteLength},Ix=async(e,t)=>{const r=z.toFiniteNumber(e.getContentLength());return r??Tx(t)},bc={http:Q1,xhr:wx,fetch:ki&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:d,withCredentials:f="same-origin",fetchOptions:h}=Tf(e);u=u?(u+"").toLowerCase():"text";let y=Sx([o,s&&s.toAbortSignal()],i),g;const p=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let b;try{if(c&&Ax&&r!=="get"&&r!=="head"&&(b=await Ix(d,n))!==0){let _=new Request(t,{method:"POST",body:n,duplex:"half"}),W;if(z.isFormData(n)&&(W=_.headers.get("content-type"))&&d.setContentType(W),_.body){const[D,T]=Ef(b,Di(Df(c)));n=If(_.body,Of,D,T)}}z.isString(f)||(f=f?"include":"omit");const w="credentials"in Request.prototype;g=new Request(t,{...h,signal:y,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",credentials:w?f:void 0});let S=await fetch(g,h);const E=yc&&(u==="stream"||u==="response");if(yc&&(a||E&&p)){const _={};["status","statusText","headers"].forEach(M=>{_[M]=S[M]});const W=z.toFiniteNumber(S.headers.get("content-length")),[D,T]=a&&Ef(W,Di(Df(a),!0))||[];S=new Response(If(S.body,Of,D,()=>{T&&T(),p&&p()}),_)}u=u||"text";let C=await Ai[z.findKey(Ai,u)||"text"](S,e);return!E&&p&&p(),await new Promise((_,W)=>{Cf(_,W,{data:C,headers:or.from(S.headers),status:S.status,statusText:S.statusText,config:e,request:g})})}catch(w){throw p&&p(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new Le("Network Error",Le.ERR_NETWORK,e,g),{cause:w.cause||w}):Le.from(w,w&&w.code,e,g)}})};z.forEach(bc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const jf=e=>`- ${e}`,Mx=e=>z.isFunction(e)||e===null||e===!1,Rf={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,!Mx(r)&&(n=bc[(i=String(r)).toLowerCase()],n===void 0))throw new Le(`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(jf).join(`
|
|
159
|
+
`):" "+jf(s[0]):"as no adapter specified";throw new Le("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n},adapters:bc};function xc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qn(null,e)}function Nf(e){return xc(e),e.headers=or.from(e.headers),e.data=vc.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Rf.getAdapter(e.adapter||Oo.adapter)(e).then(function(n){return xc(e),n.data=vc.call(e,e.transformResponse,n),n.headers=or.from(n.headers),n},function(n){return Sf(n)||(xc(e),n&&n.response&&(n.response.data=vc.call(e,e.transformResponse,n.response),n.response.headers=or.from(n.response.headers))),Promise.reject(n)})}const $f="1.11.0",Ti={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ti[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Lf={};Ti.transitional=function(t,r,n){function o(s,i){return"[Axios v"+$f+"] Transitional option '"+s+"'"+i+(n?". "+n:"")}return(s,i,a)=>{if(t===!1)throw new Le(o(i," has been removed"+(r?" in "+r:"")),Le.ERR_DEPRECATED);return r&&!Lf[i]&&(Lf[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}},Ti.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Px(e,t,r){if(typeof e!="object")throw new Le("options must be an object",Le.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 Le("option "+s+" must be "+c,Le.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Le("Unknown option "+s,Le.ERR_BAD_OPTION)}}const Ii={assertOptions:Px,validators:Ti},Hr=Ii.validators;let _n=class{constructor(t){this.defaults=t||{},this.interceptors={request:new bf,response:new bf}}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=xn(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&Ii.assertOptions(n,{silentJSONParsing:Hr.transitional(Hr.boolean),forcedJSONParsing:Hr.transitional(Hr.boolean),clarifyTimeoutError:Hr.transitional(Hr.boolean)},!1),o!=null&&(z.isFunction(o)?r.paramsSerializer={serialize:o}:Ii.assertOptions(o,{encode:Hr.function,serialize:Hr.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Ii.assertOptions(r,{baseUrl:Hr.spelling("baseURL"),withXsrfToken:Hr.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"],g=>{delete s[g]}),r.headers=or.concat(i,s);const a=[];let c=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(r)===!1||(c=c&&p.synchronous,a.unshift(p.fulfilled,p.rejected))});const u=[];this.interceptors.response.forEach(function(p){u.push(p.fulfilled,p.rejected)});let d,f=0,h;if(!c){const g=[Nf.bind(this),void 0];for(g.unshift(...a),g.push(...u),h=g.length,d=Promise.resolve(r);f<h;)d=d.then(g[f++],g[f++]);return d}h=a.length;let y=r;for(f=0;f<h;){const g=a[f++],p=a[f++];try{y=g(y)}catch(b){p.call(this,b);break}}try{d=Nf.call(this,y)}catch(g){return Promise.reject(g)}for(f=0,h=u.length;f<h;)d=d.then(u[f++],u[f++]);return d}getUri(t){t=xn(this.defaults,t);const r=kf(t.baseURL,t.url,t.allowAbsoluteUrls);return yf(r,t.params,t.paramsSerializer)}};z.forEach(["delete","get","head","options"],function(t){_n.prototype[t]=function(r,n){return this.request(xn(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(xn(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}_n.prototype[t]=r(),_n.prototype[t+"Form"]=r(!0)});let Ox=class h0{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 qn(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 h0(function(o){t=o}),cancel:t}}};function jx(e){return function(r){return e.apply(null,r)}}function Rx(e){return z.isObject(e)&&e.isAxiosError===!0}const _c={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(_c).forEach(([e,t])=>{_c[t]=e});function zf(e){const t=new _n(e),r=rf(_n.prototype.request,t);return z.extend(r,_n.prototype,t,{allOwnKeys:!0}),z.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return zf(xn(e,o))},r}const Nt=zf(Oo);Nt.Axios=_n,Nt.CanceledError=qn,Nt.CancelToken=Ox,Nt.isCancel=Sf,Nt.VERSION=$f,Nt.toFormData=Ci,Nt.AxiosError=Le,Nt.Cancel=Nt.CanceledError,Nt.all=function(t){return Promise.all(t)},Nt.spread=jx,Nt.isAxiosError=Rx,Nt.mergeConfig=xn,Nt.AxiosHeaders=or,Nt.formToJSON=e=>_f(z.isHTMLForm(e)?new FormData(e):e),Nt.getAdapter=Rf.getAdapter,Nt.HttpStatusCode=_c,Nt.default=Nt;const{Axios:t5,AxiosError:r5,CanceledError:n5,isCancel:o5,CancelToken:s5,VERSION:i5,all:a5,Cancel:c5,isAxiosError:l5,spread:u5,toFormData:d5,AxiosHeaders:f5,HttpStatusCode:p5,formToJSON:h5,getAdapter:m5,mergeConfig:g5}=Nt,Bf={token:null},Nx=e=>{Bf.token=e},wt=Nt.create({headers:{"Content-Type":"application/json"}});wt.interceptors.request.use(e=>{const t=Bf.token;return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));const Ff=v.createContext(void 0),$x=({config:e,children:t})=>(v.useEffect(()=>{e.getToken&&Nx(e.getToken)},[e.getToken]),l.jsx(Ff.Provider,{value:e,children:t})),wc=()=>{const e=v.useContext(Ff);if(!e)throw new Error("useApiConfig debe ser usado dentro de un ApiProvider");return e},Mi=()=>{const{calendarApiUrl:e}=wc();return{getGoogleAuthUrl:async()=>{try{const i=`${e}/api/Calendario/v1/auth-url-Google`;return(await wt.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 wt.post(c,{})).data}catch(a){throw console.error("Error al guardar credenciales de Google:",a),a}},getGoogleCalendars:async(i,a)=>{try{return(await wt.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 wt.post(`${e}/api/Calendario/v1/google/SincronizarEnviarEventosAsync?usrMail=${encodeURIComponent(i)}&disID=${a}&UsuarioID=${c}`)).data}catch(u){throw console.error("Error al sincronizar eventos con Google Calendar:",u),u}},getGoogleEventsByMonth:async i=>{try{return(await wt.post(`${e}/api/Calendario/v1/google/ObtenerEventosGoogleAsyncXMes`,i)).data}catch(a){throw console.error("Error al obtener eventos de Google Calendar por mes:",a),a}}}},Wf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAASFBMVEVChfRHcExDhOAWaNUZfjjkTDf////6/P7b6fu61fj7wCj7vASZv/VuoPBQjvVCr19GifE0qFM4gerrRjMubcQQaucZZ9MYgTpc4mWWAAAABnRSTlP/AFtbW/eMEQaPAAAAfUlEQVR42q3Pyw4CIQyFYVDbigKOl6Pv/6a2ZBYN08TEzL9gcb6waDqkubd1TEsEWkp7Q3e9RuvOrsvV+g0Fi+jaZIKC0sECzMDCDK51C9zR9A2gPhCC6HgOoIFL/KMD1cMfl39GNxc9NVrh7jKgHAPlCGwPgSgbnDYw9vwFKv0VRfpGYZ8AAAAASUVORK5CYII=",Lx=({disID:e,usrID:t})=>{const[r,n]=v.useState(null),o=Mi(),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();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 l.jsxs("div",{className:"flex",children:[l.jsxs("div",{className:be.syncButton,onClick:s,children:[l.jsx("div",{className:be.customCheckIcon,children:l.jsx("div",{className:be.uncheckedCircle})}),l.jsx("img",{src:Wf,width:18}),l.jsx("span",{children:"Google Calendar"})]}),r&&l.jsx("p",{className:"text-red-500 mt-2",children:r})]})},Sc=()=>{const{calendarApiUrl:e}=wc();return{getOutlookAuthUrl:async()=>{try{const i=`${e}/api/Calendario/v1/auth-url-Outlook`,a=await wt.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 wt.post(c,{})).data}catch(a){throw console.error("Error al guardar credenciales Outlook:",a),a}},syncOutlookEvents:async(i,a,c)=>{try{return(await wt.post(`${e}/api/Calendario/v1/outlook/SincronizarEnviarEventosAsync?usrMail=${encodeURIComponent(i)}&disID=${a}&UsuarioID=${c}`)).data}catch(u){throw console.error("Error al sincronizar eventos con outlook Calendar:",u),u}},getOutlookCalendars:async(i,a)=>{try{return(await wt.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{return(await wt.post(`${e}/api/Calendario/v1/outlook/ObtenerEventosoutlookAsyncXMes`,i)).data}catch(a){throw console.error("Error al obtener eventos de Outlook Calendar por mes:",a),a}}}},Hf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAYCAMAAAA8nnbJAAAAflBMVEUAAAAAV34AMFoAID0ATmsAL1oATXcAZZAAIUgANmQArPAAfd0BedoAacQAZbsAkuMActcAa9QAsfMAjfMAUJL///8Ame8Aht4A6v8A2v8Atvguid0AfMIAo+wAWrYA3/+q0/MAQ38ASIjB4PeHwe4AU7JlsekAdcMAXqgApf4WoQK+AAAACnRSTlMATjUWISlCbAuE1QOT9gAAAP1JREFUKM9t0GF7QzAQwPG2xiw5JGlICWVsrX3/L7i7Gyae/l944efinpzW4ktQfPrvorIgiHaW5UHZ29Hu3Dd235uTUkJnMHGj2NKISvh/TmBdX9c1W/pz5SQOOtsFFl0lBfx8YeCH6aHJhEG89X2/2aOchnLSIC1IACWwZjFdfmnwpSeDg/kSJH0AsLPLZgBoam9jsp2p8EylLK2rjDAmb89kALzLoLUaMyx3bs6rajHlh8FnZHzN+VwVxWKI+F5jFgdnW2BsaSUxUBRYYUdXrYaDMfbxydmuEU+32tJ7+5fB7QvUwBrDCcq4Z2AirJX7udCaziUMVHI+hPQLqRAg85aAu30AAAAASUVORK5CYII=",zx=({disID:e,usrID:t})=>{const[r,n]=v.useState(null),o=Sc(),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 l.jsxs("div",{className:"flex",children:[l.jsxs("div",{className:be.syncButton,onClick:s,children:[l.jsx("div",{className:be.customCheckIcon,children:l.jsx("div",{className:be.uncheckedCircle})}),l.jsx("img",{src:Hf,width:20}),l.jsx("span",{children:"Outlook"})]}),r&&l.jsx("p",{className:"text-red-500 mt-2",children:r})]})},Uf="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 wn extends Error{constructor(t,r){const n=new.target.prototype;super(`${t}: Status code '${r}'`),this.statusCode=r,this.__proto__=n}}class Cc extends Error{constructor(t="A timeout occurred."){const r=new.target.prototype;super(t),this.__proto__=r}}class Tr extends Error{constructor(t="An abort occurred."){const r=new.target.prototype;super(t),this.__proto__=r}}class Bx extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="UnsupportedTransportError",this.__proto__=n}}class Fx extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="DisabledTransportError",this.__proto__=n}}class Wx extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="FailedToStartTransportError",this.__proto__=n}}class Vf extends Error{constructor(t){const r=new.target.prototype;super(t),this.errorType="FailedToNegotiateWithServerError",this.__proto__=r}}class Hx extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.innerErrors=r,this.__proto__=n}}class Yf{constructor(t,r,n){this.statusCode=t,this.statusText=r,this.content=n}}class Pi{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 V;(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"})(V||(V={}));class Ro{constructor(){}log(t,r){}}Ro.instance=new Ro;const Ux="10.0.0";class Ft{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 Dt{static get isBrowser(){return!Dt.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!Dt.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!Dt.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}}function No(e,t){let r="";return Sn(e)?(r=`Binary data of length ${e.byteLength}`,t&&(r+=`. Content: '${Vx(e)}'`)):typeof e=="string"&&(r=`String data of length ${e.length}`,t&&(r+=`. Content: '${e}'`)),r}function Vx(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 Sn(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||e.constructor&&e.constructor.name==="ArrayBuffer")}async function qf(e,t,r,n,o,s){const i={},[a,c]=Zn();i[a]=c,e.log(V.Trace,`(${t} transport) sending data. ${No(o,s.logMessageContent)}.`);const u=Sn(o)?"arraybuffer":"text",d=await r.post(n,{content:o,headers:{...i,...s.headers},responseType:u,timeout:s.timeout,withCredentials:s.withCredentials});e.log(V.Trace,`(${t} transport) request complete. Response status: ${d.statusCode}.`)}function Yx(e){return e===void 0?new Oi(V.Information):e===null?Ro.instance:e.log!==void 0?e:new Oi(e)}class qx{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 Oi{constructor(t){this._minLevel=t,this.out=console}log(t,r){if(t>=this._minLevel){const n=`[${new Date().toISOString()}] ${V[t]}: ${r}`;switch(t){case V.Critical:case V.Error:this.out.error(n);break;case V.Warning:this.out.warn(n);break;case V.Information:this.out.info(n);break;default:this.out.log(n);break}}}}function Zn(){let e="X-SignalR-User-Agent";return Dt.isNode&&(e="User-Agent"),[e,Zx(Ux,Gx(),Qx(),Kx())]}function Zx(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 Gx(){if(Dt.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function Kx(){if(Dt.isNode)return process.versions.node}function Qx(){return Dt.isNode?"NodeJS":"Browser"}function Ec(e){return e.stack?e.stack:e.message?e.message:`${e}`}function Xx(){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 Jx extends Pi{constructor(t){if(super(),this._logger=t,typeof fetch>"u"||Dt.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(Xx());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 Tr;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 Tr});let o=null;if(t.timeout){const c=t.timeout;o=setTimeout(()=>{r.abort(),this._logger.log(V.Warning,"Timeout from HTTP request."),n=new Cc},c)}t.content===""&&(t.content=void 0),t.content&&(t.headers=t.headers||{},Sn(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(V.Warning,`Error from HTTP request. ${c}.`),c)}finally{o&&clearTimeout(o),t.abortSignal&&(t.abortSignal.onabort=null)}if(!s.ok){const c=await Zf(s,"text");throw new wn(c||s.statusText,s.status)}const a=await Zf(s,t.responseType);return new Yf(s.status,s.statusText,a)}getCookieString(t){let r="";return Dt.isNode&&this._jar&&this._jar.getCookies(t,(n,o)=>r=o.join("; ")),r}}function Zf(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 e_ extends Pi{constructor(t){super(),this._logger=t}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new Tr):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&&(Sn(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 Tr)}),t.timeout&&(o.timeout=t.timeout),o.onload=()=>{t.abortSignal&&(t.abortSignal.onabort=null),o.status>=200&&o.status<300?r(new Yf(o.status,o.statusText,o.response||o.responseText)):n(new wn(o.response||o.responseText||o.statusText,o.status))},o.onerror=()=>{this._logger.log(V.Warning,`Error from HTTP request. ${o.status}: ${o.statusText}.`),n(new wn(o.statusText,o.status))},o.ontimeout=()=>{this._logger.log(V.Warning,"Timeout from HTTP request."),n(new Cc)},o.send(t.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class t_ extends Pi{constructor(t){if(super(),typeof fetch<"u"||Dt.isNode)this._httpClient=new Jx(t);else if(typeof XMLHttpRequest<"u")this._httpClient=new e_(t);else throw new Error("No usable HttpClient found.")}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new Tr):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 fr{static write(t){return`${t}${fr.RecordSeparator}`}static parse(t){if(t[t.length-1]!==fr.RecordSeparator)throw new Error("Message is incomplete.");const r=t.split(fr.RecordSeparator);return r.pop(),r}}fr.RecordSeparatorCode=30,fr.RecordSeparator=String.fromCharCode(fr.RecordSeparatorCode);class r_{writeHandshakeRequest(t){return fr.write(JSON.stringify(t))}parseHandshakeResponse(t){let r,n;if(Sn(t)){const a=new Uint8Array(t),c=a.indexOf(fr.RecordSeparatorCode);if(c===-1)throw new Error("Message is incomplete.");const u=c+1;r=String.fromCharCode.apply(null,Array.prototype.slice.call(a.slice(0,u))),n=a.byteLength>u?a.slice(u).buffer:null}else{const a=t,c=a.indexOf(fr.RecordSeparator);if(c===-1)throw new Error("Message is incomplete.");const u=c+1;r=a.substring(0,u),n=a.length>u?a.substring(u):null}const o=fr.parse(r),s=JSON.parse(o[0]);if(s.type)throw new Error("Expected a handshake response from the server.");return[n,s]}}var $e;(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"})($e||($e={}));class n_{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 qx(this,t)}}class o_{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=()=>{};Sn(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 s_(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,Sn(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!==$e.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:$e.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 $e.Invocation:case $e.StreamItem:case $e.Completion:case $e.StreamInvocation:case $e.CancelInvocation:return!0;case $e.Close:case $e.Sequence:case $e.Ping:case $e.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:$e.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0},1e3))}}class s_{constructor(t,r,n,o){this._message=t,this._id=r,this._resolver=n,this._rejector=o}}const i_=30*1e3,a_=15*1e3,c_=1e5;var bt;(function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"})(bt||(bt={}));class Dc{static create(t,r,n,o,s,i,a){return new Dc(t,r,n,o,s,i,a)}constructor(t,r,n,o,s,i,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(V.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")},Ft.isRequired(t,"connection"),Ft.isRequired(r,"logger"),Ft.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=s??i_,this.keepAliveIntervalInMilliseconds=i??a_,this._statefulReconnectBufferSize=a??c_,this._logger=r,this._protocol=n,this.connection=t,this._reconnectPolicy=o,this._handshakeProtocol=new r_,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=bt.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:$e.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!==bt.Disconnected&&this._connectionState!==bt.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!==bt.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=bt.Connecting,this._logger.log(V.Debug,"Starting HubConnection.");try{await this._startInternal(),Dt.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=bt.Connected,this._connectionStarted=!0,this._logger.log(V.Debug,"HubConnection connected successfully.")}catch(t){return this._connectionState=bt.Disconnected,this._logger.log(V.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(V.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(n)),this._logger.log(V.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 o_(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(V.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===bt.Disconnected)return this._logger.log(V.Debug,`Call to HubConnection.stop(${t}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===bt.Disconnecting)return this._logger.log(V.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=bt.Disconnecting,this._logger.log(V.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(V.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(r===bt.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=t||new Tr("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 n_;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,u)=>{if(u){a.error(u);return}else c&&(c.type===$e.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===$e.Completion?d.error?c(new Error(d.error)):a(d.result):c(new Error(`Unexpected message type: ${d.type}`)))};const u=this._sendWithProtocol(s).catch(d=>{c(d),delete this._callbacks[s.invocationId]});this._launchStreams(n,u)})}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 $e.Invocation:this._invokeClientMethod(n).catch(o=>{this._logger.log(V.Error,`Invoke client method threw error: ${Ec(o)}`)});break;case $e.StreamItem:case $e.Completion:{const o=this._callbacks[n.invocationId];if(o){n.type===$e.Completion&&delete this._callbacks[n.invocationId];try{o(n)}catch(s){this._logger.log(V.Error,`Stream callback threw error: ${Ec(s)}`)}}break}case $e.Ping:break;case $e.Close:{this._logger.log(V.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 $e.Ack:this._messageBuffer&&this._messageBuffer._ack(n);break;case $e.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(n);break;default:this._logger.log(V.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(V.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(V.Error,o);const s=new Error(o);throw this._handshakeRejecter(s),s}else this._logger.log(V.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===bt.Connected&&this._trySendPingMessage();return}this._pingServerHandle===void 0&&(t<0&&(t=0),this._pingServerHandle=setTimeout(async()=>{this._connectionState===bt.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(V.Warning,`No client method with the name '${r}' found.`),t.invocationId&&(this._logger.log(V.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 u of o)try{const d=i;i=await u.apply(this,t.arguments),s&&i&&d&&(this._logger.log(V.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(V.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(V.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(V.Error,`Result given for '${r}' method but server is not expecting a result.`)}_connectionClosed(t){this._logger.log(V.Debug,`HubConnection.connectionClosed(${t}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||t||new Tr("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===bt.Disconnecting?this._completeClose(t):this._connectionState===bt.Connected&&this._reconnectPolicy?this._reconnect(t):this._connectionState===bt.Connected&&this._completeClose(t)}_completeClose(t){if(this._connectionStarted){this._connectionState=bt.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(t??new Error("Connection closed.")),this._messageBuffer=void 0),Dt.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(r=>r.apply(this,[t]))}catch(r){this._logger.log(V.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(V.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(t);return}if(this._connectionState=bt.Reconnecting,t?this._logger.log(V.Information,`Connection reconnecting because of error '${t}'.`):this._logger.log(V.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(i=>i.apply(this,[t]))}catch(i){this._logger.log(V.Error,`An onreconnecting callback called with error '${t}' threw error '${i}'.`)}if(this._connectionState!==bt.Reconnecting){this._logger.log(V.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;s!==null;){if(this._logger.log(V.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!==bt.Reconnecting){this._logger.log(V.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=bt.Connected,this._logger.log(V.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(i=>i.apply(this,[this.connection.connectionId]))}catch(i){this._logger.log(V.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${i}'.`)}return}catch(i){if(this._logger.log(V.Information,`Reconnect attempt failed because of error '${i}'.`),this._connectionState!==bt.Reconnecting){this._logger.log(V.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===bt.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(V.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(V.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(V.Error,`Stream 'error' callback called with '${t}' threw error: ${Ec(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:$e.Invocation}:{target:t,arguments:r,type:$e.Invocation};{const s=this._invocationId;return this._invocationId++,o.length!==0?{target:t,arguments:r,invocationId:s.toString(),streamIds:o,type:$e.Invocation}:{target:t,arguments:r,invocationId:s.toString(),type:$e.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:$e.StreamInvocation}:{target:t,arguments:r,invocationId:o.toString(),type:$e.StreamInvocation}}_createCancelInvocation(t){return{invocationId:t,type:$e.CancelInvocation}}_createStreamItemMessage(t,r){return{invocationId:t,item:r,type:$e.StreamItem}}_createCompletionMessage(t,r,n){return r?{error:r,invocationId:t,type:$e.Completion}:{invocationId:t,result:n,type:$e.Completion}}_createCloseMessage(){return{type:$e.Close}}async _trySendPingMessage(){try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}}const l_=[0,2e3,1e4,3e4,null];class Gf{constructor(t){this._retryDelays=t!==void 0?[...t,null]:l_}nextRetryDelayInMilliseconds(t){return this._retryDelays[t.previousRetryCount]}}class Cn{}Cn.Authorization="Authorization",Cn.Cookie="Cookie";class u_ extends Pi{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[Cn.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&t.headers[Cn.Authorization]&&delete t.headers[Cn.Authorization]}getCookieString(t){return this._innerClient.getCookieString(t)}}var Ht;(function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"})(Ht||(Ht={}));var Jt;(function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"})(Jt||(Jt={}));let d_=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 Kf{get pollAborted(){return this._pollAbort.aborted}constructor(t,r,n){this._httpClient=t,this._logger=r,this._pollAbort=new d_,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}async connect(t,r){if(Ft.isRequired(t,"url"),Ft.isRequired(r,"transferFormat"),Ft.isIn(r,Jt,"transferFormat"),this._url=t,this._logger.log(V.Trace,"(LongPolling transport) Connecting."),r===Jt.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]=Zn(),s={[n]:o,...this._options.headers},i={abortSignal:this._pollAbort.signal,headers:s,timeout:1e5,withCredentials:this._options.withCredentials};r===Jt.Binary&&(i.responseType="arraybuffer");const a=`${t}&_=${Date.now()}`;this._logger.log(V.Trace,`(LongPolling transport) polling: ${a}.`);const c=await this._httpClient.get(a,i);c.statusCode!==200?(this._logger.log(V.Error,`(LongPolling transport) Unexpected response code: ${c.statusCode}.`),this._closeError=new wn(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(V.Trace,`(LongPolling transport) polling: ${n}.`);const o=await this._httpClient.get(n,r);o.statusCode===204?(this._logger.log(V.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):o.statusCode!==200?(this._logger.log(V.Error,`(LongPolling transport) Unexpected response code: ${o.statusCode}.`),this._closeError=new wn(o.statusText||"",o.statusCode),this._running=!1):o.content?(this._logger.log(V.Trace,`(LongPolling transport) data received. ${No(o.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(o.content)):this._logger.log(V.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(n){this._running?n instanceof Cc?this._logger.log(V.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=n,this._running=!1):this._logger.log(V.Trace,`(LongPolling transport) Poll errored after shutdown: ${n.message}`)}}finally{this._logger.log(V.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(t){return this._running?qf(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(V.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(V.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const t={},[r,n]=Zn();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 wn&&(s.statusCode===404?this._logger.log(V.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(V.Trace,`(LongPolling transport) Error sending a DELETE request: ${s}`)):this._logger.log(V.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(V.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(V.Trace,t),this.onclose(this._closeError)}}}class f_{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 Ft.isRequired(t,"url"),Ft.isRequired(r,"transferFormat"),Ft.isIn(r,Jt,"transferFormat"),this._logger.log(V.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!==Jt.Text){o(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let i;if(Dt.isBrowser||Dt.isWebWorker)i=new this._options.EventSource(t,{withCredentials:this._options.withCredentials});else{const a=this._httpClient.getCookieString(t),c={};c.Cookie=a;const[u,d]=Zn();c[u]=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(V.Trace,`(SSE transport) data received. ${No(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(V.Information,`SSE connected to ${this._url}`),this._eventSource=i,s=!0,n()}}catch(a){o(a);return}})}async send(t){return this._eventSource?qf(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 p_{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){Ft.isRequired(t,"url"),Ft.isRequired(r,"transferFormat"),Ft.isIn(r,Jt,"transferFormat"),this._logger.log(V.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(Dt.isNode||Dt.isReactNative){const u={},[d,f]=Zn();u[d]=f,n&&(u[Cn.Authorization]=`Bearer ${n}`),a&&(u[Cn.Cookie]=a),i=new this._webSocketConstructor(t,void 0,{headers:{...u,...this._headers}})}else n&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n)}`);i||(i=new this._webSocketConstructor(t)),r===Jt.Binary&&(i.binaryType="arraybuffer"),i.onopen=u=>{this._logger.log(V.Information,`WebSocket connected to ${t}.`),this._webSocket=i,c=!0,o()},i.onerror=u=>{let d=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?d=u.error:d="There was an error with the transport",this._logger.log(V.Information,`(WebSockets transport) ${d}.`)},i.onmessage=u=>{if(this._logger.log(V.Trace,`(WebSockets transport) data received. ${No(u.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(u.data)}catch(d){this._close(d);return}},i.onclose=u=>{if(c)this._close(u);else{let d=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?d=u.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(V.Trace,`(WebSockets transport) sending data. ${No(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(V.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 Qf=100;class h_{constructor(t,r={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,Ft.isRequired(t,"url"),this._logger=Yx(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(Dt.isNode&&typeof require<"u"){const s=typeof __webpack_require__=="function"?__non_webpack_require__:require;n=s("ws"),o=s("eventsource")}!Dt.isNode&&typeof WebSocket<"u"&&!r.WebSocket?r.WebSocket=WebSocket:Dt.isNode&&!r.WebSocket&&n&&(r.WebSocket=n),!Dt.isNode&&typeof EventSource<"u"&&!r.EventSource?r.EventSource=EventSource:Dt.isNode&&!r.EventSource&&typeof o<"u"&&(r.EventSource=o),this._httpClient=new u_(r.httpClient||new t_(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||Jt.Binary,Ft.isIn(t,Jt,"transferFormat"),this._logger.log(V.Debug,`Starting connection with transfer format '${Jt[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(V.Error,r),await this._stopPromise,Promise.reject(new Tr(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(V.Error,r),Promise.reject(new Tr(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 kc(this.transport)),this._sendQueue.send(t))}async stop(t){if(this._connectionState==="Disconnected")return this._logger.log(V.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(V.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(V.Error,`HttpConnection.transport.stop() threw error '${r}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(V.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===Ht.WebSockets)this.transport=this._constructTransport(Ht.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 Tr("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<Qf);if(o===Qf&&n.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(r,this._options.transport,n,t)}this.transport instanceof Kf&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(V.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(n){return this._logger.log(V.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]=Zn();r[n]=o;const s=this._resolveNegotiateUrl(t);this._logger.log(V.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 Vf("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 wn&&i.statusCode===404&&(a=a+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(V.Error,a),Promise.reject(new Vf(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(V.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 u of a){const d=this._resolveTransportOrError(u,r,o,c?.useStatefulReconnect===!0);if(d instanceof Error)i.push(`${u.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(V.Error,`Failed to start the transport '${u.transport}': ${f}`),c=void 0,i.push(new Wx(`${u.transport} failed: ${f}`,Ht[u.transport])),this._connectionState!=="Connecting"){const h="Failed to select transport before stop() was called.";return this._logger.log(V.Debug,h),Promise.reject(new Tr(h))}}}}return i.length>0?Promise.reject(new Hx(`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 Ht.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new p_(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case Ht.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new f_(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case Ht.LongPolling:return new Kf(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=Ht[t.transport];if(s==null)return this._logger.log(V.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(m_(r,s))if(t.transferFormats.map(a=>Jt[a]).indexOf(n)>=0){if(s===Ht.WebSockets&&!this._options.WebSocket||s===Ht.ServerSentEvents&&!this._options.EventSource)return this._logger.log(V.Debug,`Skipping transport '${Ht[s]}' because it is not supported in your environment.'`),new Bx(`'${Ht[s]}' is not supported in your environment.`,s);this._logger.log(V.Debug,`Selecting transport '${Ht[s]}'.`);try{return this.features.reconnect=s===Ht.WebSockets?o:void 0,this._constructTransport(s)}catch(a){return a}}else return this._logger.log(V.Debug,`Skipping transport '${Ht[s]}' because it does not support the requested transfer format '${Jt[n]}'.`),new Error(`'${Ht[s]}' does not support ${Jt[n]}.`);else return this._logger.log(V.Debug,`Skipping transport '${Ht[s]}' because it was disabled by the client.`),new Fx(`'${Ht[s]}' is disabled by the client.`,s)}_isITransport(t){return t&&typeof t=="object"&&"connect"in t}_stopConnection(t){if(this._logger.log(V.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(V.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(V.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(V.Error,`Connection disconnected with error '${t}'.`):this._logger.log(V.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(r=>{this._logger.log(V.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(V.Error,`HttpConnection.onclose(${t}) threw error '${r}'.`)}}}_resolveUrl(t){if(t.lastIndexOf("https://",0)===0||t.lastIndexOf("http://",0)===0)return t;if(!Dt.isBrowser)throw new Error(`Cannot resolve '${t}'.`);const r=window.document.createElement("a");return r.href=t,this._logger.log(V.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 m_(e,t){return!e||(t&e)!==0}class kc{constructor(t){this._transport=t,this._buffer=[],this._executing=!0,this._sendBufferedData=new ji,this._transportResult=new ji,this._sendLoopPromise=this._sendLoop()}send(t){return this._bufferData(t),this._transportResult||(this._transportResult=new ji),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 ji;const t=this._transportResult;this._transportResult=void 0;const r=typeof this._buffer[0]=="string"?this._buffer.join(""):kc._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 ji{constructor(){this.promise=new Promise((t,r)=>[this._resolver,this._rejecter]=[t,r])}resolve(){this._resolver()}reject(t){this._rejecter(t)}}const g_="json";class v_{constructor(){this.name=g_,this.version=2,this.transferFormat=Jt.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=Ro.instance);const n=fr.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 $e.Invocation:this._isInvocationMessage(i);break;case $e.StreamItem:this._isStreamItemMessage(i);break;case $e.Completion:this._isCompletionMessage(i);break;case $e.Ping:break;case $e.Close:break;case $e.Ack:this._isAckMessage(i);break;case $e.Sequence:this._isSequenceMessage(i);break;default:r.log(V.Information,"Unknown message type '"+i.type+"' ignored.");continue}o.push(i)}return o}writeMessage(t){return fr.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 y_={trace:V.Trace,debug:V.Debug,info:V.Information,information:V.Information,warn:V.Warning,warning:V.Warning,error:V.Error,critical:V.Critical,none:V.None};function b_(e){const t=y_[e.toLowerCase()];if(typeof t<"u")return t;throw new Error(`Unknown log level: ${e}`)}class x_{configureLogging(t){if(Ft.isRequired(t,"logging"),__(t))this.logger=t;else if(typeof t=="string"){const r=b_(t);this.logger=new Oi(r)}else this.logger=new Oi(t);return this}withUrl(t,r){return Ft.isRequired(t,"url"),Ft.isNotEmpty(t,"url"),this.url=t,typeof r=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...r}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:r},this}withHubProtocol(t){return Ft.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 Gf(t):this.reconnectPolicy=t:this.reconnectPolicy=new Gf,this}withServerTimeout(t){return Ft.isRequired(t,"milliseconds"),this._serverTimeoutInMilliseconds=t,this}withKeepAliveInterval(t){return Ft.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 h_(this.url,t);return Dc.create(r,this.logger||Ro.instance,this.protocol||new v_,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}function __(e){return e.log!==void 0}var $o={},Xf;function w_(){if(Xf)return $o;Xf=1;var e=rt();Object.defineProperty($o,"__esModule",{value:!0}),$o.default=void 0;var t=e(ht()),r=lt();return $o.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"),$o}var S_=w_();const Jf=tt(S_);var Lo={},ep;function C_(){if(ep)return Lo;ep=1;var e=rt();Object.defineProperty(Lo,"__esModule",{value:!0}),Lo.default=void 0;var t=e(ht()),r=lt();return Lo.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"),Lo}var E_=C_();const Ur=tt(E_);function Ac(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}function zo(e){return(t,r)=>{const n=r?.context?String(r.context):"standalone";let o;if(n==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=r?.width?String(r.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=r?.width?String(r.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}function Bo(e){return(t,r={})=>{const n=r.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(a)?k_(a,f=>f.test(i)):D_(a,f=>f.test(i));let u;u=e.valueCallback?e.valueCallback(c):c,u=r.valueCallback?r.valueCallback(u):u;const d=t.slice(i.length);return{value:u,rest:d}}}function D_(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function k_(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function A_(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const o=n[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=r.valueCallback?r.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}function T_(e,...t){const r=ac.bind(null,t.find(n=>typeof n=="object"));return t.map(r)}const I_={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 año",other:"alrededor de {{count}} años"},xYears:{one:"1 año",other:"{{count}} años"},overXYears:{one:"más de 1 año",other:"más de {{count}} años"},almostXYears:{one:"casi 1 año",other:"casi {{count}} años"}},M_=(e,t,r)=>{let n;const o=I_[e];return typeof o=="string"?n=o:t===1?n=o.one:n=o.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"en "+n:"hace "+n:n},P_={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},O_={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},j_={full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},R_={date:Ac({formats:P_,defaultWidth:"full"}),time:Ac({formats:O_,defaultWidth:"full"}),dateTime:Ac({formats:j_,defaultWidth:"full"})},N_={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'mañana a la' p",nextWeek:"eeee 'a la' p",other:"P"},$_={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'mañana a las' p",nextWeek:"eeee 'a las' p",other:"P"},L_=(e,t,r,n)=>t.getHours()!==1?$_[e]:N_[e],z_={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},B_={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},F_={narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},W_={narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},H_={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},U_={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},V_={ordinalNumber:(e,t)=>Number(e)+"º",era:zo({values:z_,defaultWidth:"wide"}),quarter:zo({values:B_,defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:zo({values:F_,defaultWidth:"wide"}),day:zo({values:W_,defaultWidth:"wide"}),dayPeriod:zo({values:H_,defaultWidth:"wide",formattingValues:U_,defaultFormattingWidth:"wide"})},Y_=/^(\d+)(º)?/i,q_=/\d+/i,Z_={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},G_={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},K_={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},Q_={any:[/1/i,/2/i,/3/i,/4/i]},X_={narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},J_={narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},ew={narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},tw={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},rw={narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},nw={any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},ow={ordinalNumber:A_({matchPattern:Y_,parsePattern:q_,valueCallback:function(e){return parseInt(e,10)}}),era:Bo({matchPatterns:Z_,defaultMatchWidth:"wide",parsePatterns:G_,defaultParseWidth:"any"}),quarter:Bo({matchPatterns:K_,defaultMatchWidth:"wide",parsePatterns:Q_,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Bo({matchPatterns:X_,defaultMatchWidth:"wide",parsePatterns:J_,defaultParseWidth:"any"}),day:Bo({matchPatterns:ew,defaultMatchWidth:"wide",parsePatterns:tw,defaultParseWidth:"any"}),dayPeriod:Bo({matchPatterns:rw,defaultMatchWidth:"any",parsePatterns:nw,defaultParseWidth:"any"})},sw={code:"es",formatDistance:M_,formatLong:R_,formatRelative:L_,localize:V_,match:ow,options:{weekStartsOn:1,firstWeekContainsDate:1}},tp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAACpQTFRFR3BMcHCAcHBwaGx4ZWp6aG14aG54Zm14aW15aG55aG15aW55aW56aW5591zvEAAAAA10Uk5TABAQIDBBYHCAnr7g7wYb6DAAAACqSURBVHjahZJLDgMhDEM9UL7Ju/91q8KgQhcdb5D8rFiJ0JNC6Qbeczzt6izV8PWjAbiNB4uH35IkpbaRYGBpT9mcVlemtnCTOiLA8BPk+/VPIkPTR/kGalAkdUgnSNAlOegEckwS2C8wOAEWN2D4BC8HH3Xge/naYJUXaJq6Wo+S2iy7HJKW1sbHSc6B0mU7SeOIf8++CJg5nHOvypLXoF0xdwfrJTx9mzdxpgqGKfcyxQAAAABJRU5ErkJggg==",iw="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAwCAMAAABZu7juAAAAPFBMVEUAAABobHhobnhpbnlobnhobXhpbnlpbnpobXhwcHNobHhlanlpbnlobnhobnpobXhmbXlocHhpbHZpbnlt0ET4AAAAE3RSTlMAIGDggL/f76AQQDDPsLCQcEBQZL6CzQAAALVJREFUSMft1MsOgyAQhWEGHQa82/P+71rDojhJ6dCNi9ZvZcivQUjGXWeTQHqFJvS1mgDMemkGQJV8AMB6iQHsb9K0RZ4ACCsCYOLoSccrDPH0AgWYAqm6vY9owuVAmgzq46aY84BGknM0S/nqm9Ef5tIZROXeGfyd3/lP5Kk9T+4gAGYrj68pxjiMn2sqI9iX6V0zhtOO8zO4r1k5B8F9NeBH9dsWr/ZmCLs+10VQ1S0Pd4UnLwhFRUE6UNsAAAAASUVORK5CYII=",aw=({notificacion:e,onAccept:t})=>{const{evento:r,tipo:n,leida:o}=e,s=n==="EventoCreado"||n==="EventoModificado",a={EventoCreado:{frase:"te ha invitado a:",colorTitulo:"#3c4043"},EventoModificado:{frase:"ha modificado el evento",colorTitulo:"#3c4043"},EventoCancelado:{frase:"ha cancelado el evento",colorTitulo:"#d32f2f"}}[n]||{frase:"te ha notificado sobre",colorTitulo:"#3c4043"},c=r?.fechaInicio?new Date(r.fechaInicio):new Date,u=r?.fechaFin?new Date(r.fechaFin):null,d=r?.nombreAnfitrion||"Usuario",f=e?.titulo||"Sin título",h=y=>y.split(" ").filter(g=>g).map(g=>g[0]).join("").toUpperCase().substring(0,2);return l.jsxs(m.Box,{sx:{p:2,mb:1,bgcolor:"white",borderRadius:"8px",border:"1px solid #e0e0e0",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",position:"relative",overflow:"hidden"},children:[l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",mb:1},children:[l.jsx(m.Avatar,{sx:{bgcolor:"#F5A623",width:34,height:34,fontSize:"14px",mr:1.5,fontWeight:"bold"},children:h(d)}),l.jsxs(m.Box,{children:[l.jsxs(m.Typography,{sx:{fontSize:"14px",color:"#5f6368",lineHeight:1.2},children:[d," ",a.frase]}),l.jsx(m.Typography,{sx:{fontSize:"14px",fontWeight:700,color:a.colorTitulo},children:f})]})]}),l.jsx(m.Divider,{sx:{mx:-2,my:1.5,backgroundColor:"#000"}}),l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",mb:0},children:[l.jsx("img",{src:iw,width:20,alt:"cal",style:{marginRight:15,color:"black"}}),l.jsx(m.Typography,{sx:{fontSize:"14px",color:"#3c4043",textTransform:"capitalize"},children:x.format(c,"EEEE, dd 'de' MMMM",{locale:sw})})]}),l.jsx(m.Divider,{sx:{mx:-2,my:1.5,backgroundColor:"#000"}}),l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",mb:s&&!o?2:0},children:[l.jsx("img",{src:tp,width:20,alt:"watch",style:{marginRight:15}}),l.jsxs(m.Typography,{sx:{fontSize:"14px",color:"#3c4043"},children:[x.format(c,"h:mm a").toLowerCase(),u?` - ${x.format(u,"h:mm a").toLowerCase()}`:""]})]}),s&&!o&&l.jsxs(m.Grid,{container:!0,spacing:1,sx:{mt:1},children:[l.jsx(m.Grid,{item:!0,xs:6,children:l.jsx(m.Button,{fullWidth:!0,variant:"outlined",size:"small",startIcon:l.jsx(Jf,{sx:{fontSize:"16px !important",mr:-.5}}),onClick:()=>t?.(e,"CONFIRMADA"),sx:{borderRadius:"8px",textTransform:"none",fontWeight:700,fontSize:"12px",color:"#1976D2",borderColor:"#1976D2",py:.8,px:1,whiteSpace:"nowrap"},children:"Asistiré"})}),l.jsx(m.Grid,{item:!0,xs:6,children:l.jsx(m.Button,{fullWidth:!0,variant:"outlined",size:"small",startIcon:l.jsx(Ur,{sx:{fontSize:"16px !important",mr:-.5}}),onClick:()=>t?.(e,"RECHAZADA"),sx:{borderRadius:"8px",textTransform:"none",fontWeight:700,fontSize:"12px",color:"#D32F2F",borderColor:"#D32F2F",py:.8,px:1,whiteSpace:"nowrap"},children:"Rechazar"})})]})]})},cw="http://localhost:5173/hubs/invitaciones/",lw=({userId:e,notifications:t,onAceppInvitacion:r})=>{const[n,o]=v.useState(),[s,i]=v.useState(null);v.useEffect(()=>{o(t)},[t]);const a=v.useCallback(c=>{console.log("invitation",c);const u={notificacionID:Math.random(),titulo:"Nueva invitación a evento",mensaje:c.Descripcion,tipo:"EventoCreado",leida:!1,fechaCreacion:new Date().toISOString(),tiempoTranscurrido:"Ahora",url:`/eventos/${c.EventoID}`,iconoColor:"#E1D6FB",evento:{eventoID:c.EventoID,titulo:c.Titulo,fechaInicio:c.FechaInicio,ubicacion:"",nombreAnfitrion:"",fechaFin:c.FechaFin}};o(d=>[u])},[]);return v.useEffect(()=>{if(!e)return;const c=new x_().withUrl(cw+`?userId=${e}`).withAutomaticReconnect().build();return c.start().then(()=>{c.on("NotificarInvitacionAEvento",a)}).catch(u=>console.error("Error SignalR:",u)),()=>{c.off("NotificarInvitacionAEvento"),c.stop()}},[e,a]),l.jsx(m.Box,{sx:{width:"100%",maxHeight:"600px",overflowY:"auto"},children:l.jsx(m.List,{disablePadding:!0,children:n?.length===0?l.jsxs("div",{className:be.emptyStateContainer,children:[l.jsx("img",{src:Uf,alt:"Todo en orden",className:be.emptyStateImage}),l.jsx("h4",{className:be.emptyStateTitle,children:"Todo en orden aquí"}),l.jsx("p",{className:be.emptyStateText,children:"Por el momento no tienes invitaciones pendientes."})]}):n?.map(c=>l.jsx(aw,{notificacion:c,onAccept:r}))})})},uw=({onEventClick:e,upcomingEvents:t,leads30Days:r,leads90Days:n,disID:o,usrID:s,onAddEvent:i,googleCalendars:a,outlookCalendars:c,isLoadingCalendars:u,onToggleGoogle:d,onToggleOutlook:f,notifications:h,unreadCount:y,onAceppInvitacion:g})=>{const{session:p,sessionoutlook:b}=lc(),{enqueueSnackbar:w}=_s.useSnackbar(),S=N=>{const le=new Date,de={start:x.startOfDay(le),end:x.endOfDay(le)},$={start:N.fechaInicio,end:N.fechaFin};return Ud(de,$)?"Hoy":x.isTomorrow(N.fechaInicio)?"Mañana":new Intl.DateTimeFormat("es-ES",{day:"numeric",month:"long"}).format(N.fechaInicio)},E={};t.forEach(N=>{const le=S(N);E[le]||(E[le]=[]),E[le].push(N)});const[C,_]=v.useState(!1),W=()=>{_(!C)},D=Mi(),T=Sc(),M=async()=>{if(!p?.userEmail||!o||!s){console.error("Faltan datos (email, disID o usrID) para sincronizar eventos.");return}try{await D.syncGoogleEvents(p?.userEmail,o,s),w("Eventos sincronizados con Google Calendar con éxito.",{variant:"success"})}catch{w("Error al sincronizar eventos con Google Calendar.",{variant:"error"})}finally{}},I=async()=>{if(!b?.userEmail||!o||!s){console.error("Faltan datos (email, disID o usrID) para sincronizar eventos.");return}try{await T.syncOutlookEvents(b?.userEmail,o,s),w("Eventos sincronizados con Outlook Calendar con éxito.",{variant:"success"})}catch{w("Error al sincronizar eventos con Outlook Calendar.",{variant:"error"})}finally{}},[H,G]=v.useState("events"),F=N=>{G(N)},[Y,se]=v.useState(!0),U=()=>{se(N=>!N)};return l.jsxs("div",{className:be.sidebarContainer,children:[l.jsxs("div",{className:be.leadsSection,children:[l.jsxs("div",{className:be.leadCard,children:[l.jsx("div",{className:be.leadIcon,children:l.jsx("img",{src:Jd})}),l.jsxs("div",{className:be.leadText,children:[l.jsx("div",{className:be.leadDays,children:"+30 días sin atender"}),l.jsxs("div",{className:be.leadCount,children:[r," ",l.jsx("span",{style:{fontSize:10,fontWeight:"normal"},children:"leads"})]})]})]}),l.jsxs("div",{className:be.leadCard,children:[l.jsx("div",{className:be.leadIcon,children:l.jsx("img",{src:Jd})}),l.jsxs("div",{className:be.leadText,children:[l.jsx("div",{className:be.leadDays,children:"+90 días sin atender"}),l.jsxs("div",{className:be.leadCount,children:[n," ",l.jsx("span",{style:{fontSize:10,fontWeight:"normal"},children:"leads"})]})]})]})]}),l.jsxs("div",{className:be.eventsSection,children:[l.jsxs("div",{className:be.tabsContainer,children:[l.jsx("button",{className:`${be.tabButton} ${H==="events"?be.activeTab:""}`,onClick:()=>F("events"),children:"Eventos"}),l.jsxs("button",{className:`${be.tabButton} ${H==="alerts"?be.activeTab:""}`,onClick:()=>F("alerts"),children:["Alertas",y>0&&l.jsx("span",{className:be.alertBadge,children:y>99?"99+":y})]})]}),l.jsxs("div",{className:be.eventsContainer,children:[H==="events"&&l.jsx(l.Fragment,{children:Object.keys(E).length>0?Object.entries(E).map(([N,le])=>l.jsxs("div",{className:`${be.eventGroup}`,children:[l.jsxs("div",{className:be.eventGroupDate,children:[l.jsx("img",{src:u1,width:15})," ",N]}),le.map(de=>{const $=ke(de.color||"#ffcc00"),Q=$.toString(),we=$.clone().darken(15).toString(),_e=new Intl.DateTimeFormat("es-ES",{hour:"numeric",minute:"2-digit",hour12:!0});return l.jsxs("div",{className:be.eventItem,style:{backgroundColor:Q,borderLeft:`4px solid ${we}`,display:"flex",alignItems:"center",padding:"10px",marginBottom:"8px",borderRadius:"4px",cursor:"pointer"},onClick:()=>e(de),children:[l.jsxs("div",{className:be.eventDetails,style:{flex:1},children:[l.jsx("div",{className:be.eventTitle,style:{fontWeight:"500",fontSize:"12px",color:"#333"},children:de.titulo.length>32?`${de.titulo.substring(0,32)}...`:de.titulo}),de.nombreAnfitrion&&l.jsxs("div",{style:{display:"flex",alignItems:"center",marginTop:"4px",color:"#555"},children:[l.jsx("img",{src:ef,width:16,style:{marginRight:"6px",opacity:.7}}),l.jsx("span",{style:{fontSize:"13px"},children:de.nombreAnfitrion})]}),l.jsx("div",{className:be.eventTime,style:{fontSize:"12px",marginTop:"4px",opacity:.7},children:`${_e.format(de.fechaInicio).toLowerCase()} - ${_e.format(de.fechaFin).toLowerCase()}`})]}),de.link&&l.jsx("a",{onClick:he=>he.stopPropagation(),href:de.link,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center",padding:"4px"},children:l.jsx("img",{src:d1,alt:"Video",width:20,style:{opacity:.8}})})]},de.eventoID)})]},N)):l.jsxs("div",{className:be.emptyStateContainer,children:[l.jsx("img",{src:Uf,alt:"Todo en orden",className:be.emptyStateImage}),l.jsx("h4",{className:be.emptyStateTitle,children:"Tu agenda está despejada"}),l.jsx("p",{className:be.emptyStateText,children:"Parece que no tienes ningún evento en tu calendario. ¿Te gustaría añadir uno? "}),l.jsxs("button",{className:be.addEventButton,onClick:i,children:[l.jsx("img",{src:Bd}),"Agregar evento"]})]})}),H==="alerts"&&l.jsx(m.Box,{children:l.jsx(lw,{userId:s,notifications:h,onAceppInvitacion:g})})]})]}),l.jsxs("div",{className:be.calendarsSection,children:[l.jsxs("button",{onClick:W,className:be.collapsibleHeader,children:[l.jsxs("div",{className:be.headerTitle,children:[l.jsx("span",{style:{fontSize:"14px"},children:"Calendarios"}),l.jsx("span",{className:be.calendarCount,children:"1"})]}),l.jsx(L2,{className:`${be.chevronIcon} ${C?be.collapsed:""}`})]}),l.jsxs("div",{className:`${be.collapsibleContent} ${C?be.hidden:""}`,children:[l.jsxs("button",{className:`${be.calendarSelectButton} ${Y?be.calendarSelected:""}`,onClick:U,style:{"--calendar-color":"#1976D2"},children:[l.jsx("div",{className:be.customCheckIcon,children:l.jsx("div",{className:be.circularCheckbox,children:l.jsx(ic,{size:16,className:be.checkedIcon})})}),l.jsx($2,{size:16,className:be.calendarIcon}),l.jsx("span",{className:be.calendarItemText,children:"Mi calendario"})]}),b.userEmail?l.jsxs("div",{className:be.syncButton,onClick:I,children:[l.jsx("div",{className:be.circularCheckbox,children:l.jsx(ic,{size:16,className:be.checkedIcon})}),l.jsx("img",{src:Hf,width:20}),l.jsx("span",{style:{fontSize:"14px"},children:"Sincronizar Outlook"})]}):l.jsx(zx,{disID:o,usrID:s}),p?.userEmail?l.jsxs("div",{className:be.syncButton,onClick:M,children:[l.jsx("div",{className:be.circularCheckbox,children:l.jsx(ic,{size:16,className:be.checkedIcon})}),l.jsx("img",{src:Wf,width:18}),l.jsx("span",{style:{fontSize:"14px"},children:"Sincronizar Google"})]}):l.jsx(Lx,{disID:o,usrID:s}),b?.userEmail&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:be.currentUserCalendarTitle,style:{marginTop:"10px"},children:b?.userEmail}),u?l.jsx(m.CircularProgress,{size:24}):c.length>0?l.jsx(m.List,{dense:!0,className:be.calendarsList,children:c.map(N=>l.jsx(m.ListItem,{secondaryAction:l.jsx(m.Checkbox,{edge:"end",onChange:()=>f(N.id),checked:N.selected||!1,sx:{color:N.backgroundColor,"&.Mui-checked":{color:N.backgroundColor}}}),disablePadding:!0,children:l.jsx(m.ListItemText,{primary:N.summary.length>25?`${N.summary.substring(0,25)}...`:N.summary,className:be.calendarItemText})},N.id))}):l.jsx("p",{style:{fontSize:"12px"},children:"No se encontraron calendarios."})]}),p?.userEmail&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:be.currentUserCalendarTitle,style:{marginTop:"10px"},children:p?.userEmail}),u?l.jsx(m.CircularProgress,{size:24}):a.length>0?l.jsx(m.List,{dense:!0,className:be.calendarsList,children:a.map(N=>l.jsx(m.ListItem,{secondaryAction:l.jsx(m.Checkbox,{edge:"end",onChange:()=>d(N.id),checked:N.selected||!1,sx:{color:N.backgroundColor,"&.Mui-checked":{color:N.backgroundColor}}}),disablePadding:!0,children:l.jsx(m.ListItemText,{primary:N.summary.length>25?`${N.summary.substring(0,25)}...`:N.summary,className:be.calendarItemText})},N.id))}):l.jsx("p",{style:{fontSize:"12px"},children:"No se encontraron calendarios."})]})]})]})]})},En={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"};var Fo={},rp;function dw(){if(rp)return Fo;rp=1;var e=rt();Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.default=void 0,o(v);var t=e(ht()),r=lt();function n(s){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(n=function(c){return c?a:i})(s)}function o(s,i){if(s&&s.__esModule)return s;if(s===null||typeof s!="object"&&typeof s!="function")return{default:s};var a=n(i);if(a&&a.has(s))return a.get(s);var c={__proto__:null},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in s)if(d!=="default"&&Object.prototype.hasOwnProperty.call(s,d)){var f=u?Object.getOwnPropertyDescriptor(s,d):null;f&&(f.get||f.set)?Object.defineProperty(c,d,f):c[d]=s[d]}return c.default=s,a&&a.set(s,c),c}return Fo.default=(0,t.default)((0,r.jsx)("path",{d:"M12.545,10.239v3.821h5.445c-0.712,2.315-2.647,3.972-5.445,3.972c-3.332,0-6.033-2.701-6.033-6.032s2.701-6.032,6.033-6.032c1.498,0,2.866,0.549,3.921,1.453l2.814-2.814C17.503,2.988,15.139,2,12.545,2C7.021,2,2.543,6.477,2.543,12s4.478,10,10.002,10c8.396,0,10.249-7.85,9.426-11.748L12.545,10.239z"}),"Google"),Fo}var fw=dw();const pw=tt(fw);var Wo={},np;function hw(){if(np)return Wo;np=1;var e=rt();Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.default=void 0;var t=e(ht()),r=lt();return Wo.default=(0,t.default)((0,r.jsx)("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 14H4V8l8 5 8-5zm-8-7L4 6h16z"}),"MailOutline"),Wo}var mw=hw();const gw=tt(mw),op=46,vw=22,yw=({dayNumber:e,date:t,events:r,isToday:n,isCurrentMonth:o,onDayClick:s,onEventClick:i,onSeeMoreClick:a})=>{const c=[En.dayCell,o?"":En.notCurrentMonth,En.CurrentDay].join(" ").trim(),u=v.useRef(null),[d,f]=v.useState(r.length),h=new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});v.useLayoutEffect(()=>{const p=()=>{if(u.current){const b=u.current.clientHeight;let w=Math.floor(b/(op+4));if(w<r.length){const S=Math.floor((b-vw)/(op+4));w=Math.max(0,S)}f(w)}};return p(),window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[r.length]);const y=r.slice(0,d===0?1:d),g=r.length-(d===0?1:d);return l.jsxs("div",{className:`${c} ${En.dayCellContainer}`,onClick:()=>s?.(t),style:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden"},children:[l.jsx("div",{className:n?En.dayNumber:En.dayNumberToday,children:e}),l.jsxs("div",{className:En.eventsList,ref:u,style:{flex:1,display:"flex",flexDirection:"column",gap:"4px",padding:"0 4px 4px 4px",marginTop:"4px",overflow:"hidden"},children:[y.map(p=>{const b=p.color||"#D7EBFB",w=p.isGoogleEvent||p.isOutlookEvent;return l.jsxs(m.Box,{onClick:S=>{S.stopPropagation(),i?.(p)},sx:{backgroundColor:w?"#ffffff":p?.color,padding:"4px 8px",borderRadius:"6px",cursor:"pointer",display:"flex",flexDirection:"column",minHeight:"40px",maxHeight:"48px",position:"relative",overflow:"hidden",border:w?`1px solid ${ke(b).setAlpha(.4).toRgbString()}`:"none","&:hover":{filter:"brightness(0.95)",boxShadow:"0px 2px 4px rgba(0,0,0,0.08)"}},children:[p.isGoogleEvent&&l.jsx(pw,{sx:{position:"absolute",top:4,right:4,fontSize:12,color:"#4285F4"}}),p.isOutlookEvent&&l.jsx(gw,{sx:{position:"absolute",top:4,right:4,fontSize:12,color:"#0078D4"}}),l.jsx(m.Typography,{sx:{fontSize:"10px",lineHeight:"1",color:"#3C4043",pr:w?2:0,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",wordBreak:"break-word"},children:p.titulo}),l.jsx(m.Typography,{sx:{fontSize:"9px",color:"#70757a",mt:"auto",fontWeight:400},children:`${h.format(p.fechaInicio).toLowerCase()} - ${h.format(p.fechaFin).toLowerCase()}`})]},p.eventoID)}),g>0&&l.jsxs(m.Typography,{sx:{fontSize:"10px",fontWeight:"bold",color:"#1976D2",textAlign:"left",ml:1,mt:.5,cursor:"pointer","&:hover":{textDecoration:"underline"}},onClick:p=>{p.stopPropagation(),a(r,t)},children:["+",g," más"]})]})]})},sp={weekDaysContainer:"_weekDaysContainer_5h5ol_1",weekDay:"_weekDay_5h5ol_1"},bw=()=>{const e=["Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"];return l.jsx("div",{className:sp.weekDaysContainer,children:e.map(t=>l.jsx("div",{className:sp.weekDay,children:t},t))})},Ri={calendarGridContainer:"_calendarGridContainer_1expw_1",daysContainer:"_daysContainer_1expw_23",rows5:"_rows5_1expw_37",rows6:"_rows6_1expw_45"};function xw(e,t){const[r,n]=T_(e,t.start,t.end);return{start:r,end:n}}function _w(e,t){const{start:r,end:n}=xw(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(ac(r,i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?c.reverse():c}function ww(e,t){const r=t?.weekStartsOn,n=an(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 Sw(e,t,r){const n=+an(e,r?.in),[o,s]=[+an(t.start,r?.in),+an(t.end,r?.in)].sort((i,a)=>i-a);return n>=o&&n<=s}const Cw=({currentDate:e,events:t,onDayClick:r,onEventClick:n,onSeeMoreClick:o})=>{const s=x.startOfMonth(e),i=x.endOfMonth(e),a=x.startOfWeek(s,{weekStartsOn:1}),c=ww(i,{weekStartsOn:1}),u=_w({start:a,end:c}),d={},f=u.length/7,h=`${Ri.daysContainer} ${f===5?Ri.rows5:Ri.rows6}`;return t.forEach(y=>{const g=x.format(y.fechaInicio,"yyyy-MM-dd");d[g]||(d[g]=[]),d[g].push(y)}),l.jsxs("div",{className:Ri.calendarGridContainer,children:[l.jsx(bw,{}),l.jsx("div",{className:h,children:u.map(y=>{const g=t.filter(p=>Sw(y,{start:x.startOfDay(p.fechaInicio),end:x.endOfDay(p.fechaFin)}));return l.jsx(yw,{dayNumber:y.getDate(),date:y,events:g,isToday:x.isToday(y),isCurrentMonth:x.isSameMonth(y,e),onDayClick:r,onEventClick:n,onSeeMoreClick:o},y.toISOString())})})]})},Tc=()=>{const{calendarApiUrl:e}=wc(),t=async g=>{try{return(await wt.get(`${e}/api/Calendario/v1/local/ListarEventosXUsuario/${g}`)).data.map(b=>{const w=new Date(b.fechaInicio),S=new Date(b.fechaFin),E=b.solicitudRelacionada?.[0]?.nombreCliente??null;return{...b,fechaInicio:w,fechaFin:S,client:E}})}catch(p){return console.error("Error events:",p),[]}},r=async(g,p)=>{try{const b=await wt.post(`${e}/api/Calendario/v1/local/InsertarEvento/${p}`,g);return{...b.data,fechaInicio:new Date(b.data.fechaInicio),fechaFin:new Date(b.data.fechaFin)}}catch(b){throw console.log("Error creating event:",b),b}},n=async g=>{try{const p=await wt.post(`${e}/api/Calendario/v1/local/ActualizarEvento/${g.eventoID}`,g);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 g=>{try{const p=await wt.get(`${e}/api/Calendario/v1/local/ObtenerEvento/${g}`),b=p.data[0].solicitudRelacionada?.[0]?.nombreCliente||null;return{...p.data[0],fechaInicio:p.data[0].fechaInicio,fechaFin:p.data[0].fechaFin,client:b}}catch(p){throw console.error(`Error fetching event with ID ${g}:`,p),p}},s=async g=>{try{await wt.post(`${e}/api/Calendario/v1/local/EliminarEvento/${g}`)}catch(p){throw console.log(`Error ID ${g}:`,p),p}},i=v.useCallback(async(g,p,b,w)=>{try{const S={masNombreBD:b,usrID:w,disID:p,nombreCliente:g},C=(await wt.post(`${e}/api/Calendario/v1/local/ConsultaClientesXUsuariologgeado/`,S)).data?.data;return Array.isArray(C)?C.map(_=>({clienteID:_.clienteID,solID:_.solID,marca:_?.marca,modelo:_?.modelo,nombreCliente:_?.nombreCliente})):[]}catch(S){return console.error("Error clientes:",S),[]}},[e]),a=v.useCallback(async(g,p)=>{try{const b={disID:g,usrMail:p},S=(await wt.post(`${e}/api/Calendario/v1/Consulta_UsuariosInvitados/`,b)).data?.data;return Array.isArray(S)?S.map(E=>({usrID:E.usrID,usrNombre:E.usrNombre,usrMail:E?.usrMail,disID:E?.disID})):[]}catch(b){return console.error("Error usuarios:",b),[]}},[e]),c=async(g,p,b,w,S)=>{const E={tieneConflicto:!1,usrMail:""};try{const C={disID:g,usrMail:p,startDate:b,horaInicio:w,horaFin:S};return(await wt.post(`${e}/api/Calendario/v1/local/ConsultaConflictoInvitados`,C)).data?.data}catch(C){return console.error("Error al verificar conflicto:",C),E}},u=v.useCallback(async(g,p,b,w)=>{try{const S={disID:g,usrMail:p,startDate:b,DuracionEvento:w},C=(await wt.post(`${e}/api/Calendario/v1/local/ConsultaDisponibilidadUsuario`,S)).data?.data;return Array.isArray(C)?C.map(_=>({Fecha:_.fecha,HoraInicio:_.horaInicio,HoraFin:_.horaFin})):[]}catch(S){return console.error("Error usuarios:",S),[]}},[e]),d=v.useCallback(async(g,p=!1)=>{try{const b=await wt.post(`${e}/api/Notificaciones/v1/local/ObtenerNotificacionesPorUsuarioAsync/${g}?soloNoLeidas=${p}`);return console.log("response.data",b.data),b.data}catch(b){return console.error("Error usuarios:",b),[]}},[e]);return{getEventsByUser:t,createEvent:r,updateEvent:n,getEventById:o,deleteEvent:s,getClients:i,getUsuariosInvitados:a,VerificarConflicto:c,getDisponibilidadUsuario:u,getNotificacionesXUsuario:d,UpdateStatusEvento:async(g,p,b)=>{try{const w={EventoID:g,UsuarioID:p,status:b};return(await wt.post(`${e}/api/Calendario/v1/local/ActualizarEstadoInvitacionAsync/`,w)).data}catch(w){return console.error("Error Actualizar estatus:",w),{}}},MarcarLeido:async(g,p)=>{try{return(await wt.post(`${e}/api/Notificaciones/v1/local/MarcarComoLeidaAsync/${g}?usuarioId=${p}&marcarComoLeida=true`)).data?.data}catch(b){return console.error("Error Actualizar estatus:",b),{}}},ReenviarNotificacion:async(g,p)=>{try{const b=await wt.post(`${e}/api/Calendario/v1/local/ReenviarNotificacion/${p}/${g}`);return console.log("reenviar",b),b.data?.data}catch(b){return console.error("Error Actualizar estatus:",b),{}}}}};var Ho={},ip;function Ew(){if(ip)return Ho;ip=1;var e=rt();Object.defineProperty(Ho,"__esModule",{value:!0}),Ho.default=void 0;var t=e(ht()),r=lt();return Ho.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"),Ho}var Dw=Ew();const Ic=tt(Dw);var Uo=e=>e.type==="checkbox",Dn=e=>e instanceof Date,tr=e=>e==null;const ap=e=>typeof e=="object";var $t=e=>!tr(e)&&!Array.isArray(e)&&ap(e)&&!Dn(e),cp=e=>$t(e)&&e.target?Uo(e.target)?e.target.checked:e.target.value:e,kw=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,lp=(e,t)=>e.has(kw(t)),Aw=e=>{const t=e.constructor&&e.constructor.prototype;return $t(t)&&t.hasOwnProperty("isPrototypeOf")},Mc=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ut(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(!(Mc&&(e instanceof Blob||n))&&(r||$t(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!Aw(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=Ut(e[o]));else return e;return t}var Ni=e=>/^\w*$/.test(e),Lt=e=>e===void 0,Pc=e=>Array.isArray(e)?e.filter(Boolean):[],Oc=e=>Pc(e.replace(/["|']|\]/g,"").split(/\.|\[/)),pe=(e,t,r)=>{if(!t||!$t(e))return r;const n=(Ni(t)?[t]:Oc(t)).reduce((o,s)=>tr(o)?o:o[s],e);return Lt(n)||n===e?Lt(e[t])?r:e[t]:n},pr=e=>typeof e=="boolean",ut=(e,t,r)=>{let n=-1;const o=Ni(t)?[t]:Oc(t),s=o.length,i=s-1;for(;++n<s;){const a=o[n];let c=r;if(n!==i){const u=e[a];c=$t(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=c,e=e[a]}};const $i={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ir={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Qr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},jc=v.createContext(null);jc.displayName="HookFormContext";const Rc=()=>v.useContext(jc),Tw=e=>{const{children:t,...r}=e;return v.createElement(jc.Provider,{value:r},t)};var up=(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]!==Ir.all&&(t._proxyFormState[i]=!n||Ir.all),r&&(r[i]=!0),e[i]}});return o};const Nc=typeof window<"u"?v.useLayoutEffect:v.useEffect;function Iw(e){const t=Rc(),{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 Nc(()=>r._subscribe({name:o,formState:c.current,exact:s,callback:u=>{!n&&a({...r._formState,...u})}}),[o,n,s]),v.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),v.useMemo(()=>up(i,r,c.current,!1),[i,r])}var Vr=e=>typeof e=="string",dp=(e,t,r,n,o)=>Vr(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),$c=e=>tr(e)||!ap(e);function Xr(e,t,r=new WeakSet){if($c(e)||$c(t))return e===t;if(Dn(e)&&Dn(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(Dn(i)&&Dn(a)||$t(i)&&$t(a)||Array.isArray(i)&&Array.isArray(a)?!Xr(i,a,r):i!==a)return!1}}return!0}function fp(e){const t=Rc(),{control:r=t.control,name:n,defaultValue:o,disabled:s,exact:i,compute:a}=e||{},c=v.useRef(o),u=v.useRef(a),d=v.useRef(void 0);u.current=a;const f=v.useMemo(()=>r._getWatch(n,c.current),[r,n]),[h,y]=v.useState(u.current?u.current(f):f);return Nc(()=>r._subscribe({name:n,formState:{values:!0},exact:i,callback:g=>{if(!s){const p=dp(n,r._names,g.values||r._formValues,!1,c.current);if(u.current){const b=u.current(p);Xr(b,d.current)||(y(b),d.current=b)}else y(p)}}}),[r,s,n,i]),v.useEffect(()=>r._removeUnmounted()),h}function Mw(e){const t=Rc(),{name:r,disabled:n,control:o=t.control,shouldUnregister:s,defaultValue:i}=e,a=lp(o._names.array,r),c=v.useMemo(()=>pe(o._formValues,r,pe(o._defaultValues,r,i)),[o,r,i]),u=fp({control:o,name:r,defaultValue:c,exact:!0}),d=Iw({control:o,name:r,exact:!0}),f=v.useRef(e),h=v.useRef(o.register(r,{...e.rules,value:u,...pr(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]),g=v.useCallback(S=>h.current.onChange({target:{value:cp(S),name:r},type:$i.CHANGE}),[r]),p=v.useCallback(()=>h.current.onBlur({target:{value:pe(o._formValues,r),name:r},type:$i.BLUR}),[r,o._formValues]),b=v.useCallback(S=>{const E=pe(o._fields,r);E&&S&&(E._f.ref={focus:()=>S.focus&&S.focus(),select:()=>S.select&&S.select(),setCustomValidity:C=>S.setCustomValidity(C),reportValidity:()=>S.reportValidity()})},[o._fields,r]),w=v.useMemo(()=>({name:r,value:u,...pr(n)||d.disabled?{disabled:d.disabled||n}:{},onChange:g,onBlur:p,ref:b}),[r,n,d.disabled,g,p,b,u]);return v.useEffect(()=>{const S=o._options.shouldUnregister||s;o.register(r,{...f.current.rules,...pr(f.current.disabled)?{disabled:f.current.disabled}:{}});const E=(C,_)=>{const W=pe(o._fields,C);W&&W._f&&(W._f.mount=_)};if(E(r,!0),S){const C=Ut(pe(o._options.defaultValues,r));ut(o._defaultValues,r,C),Lt(pe(o._formValues,r))&&ut(o._formValues,r,C)}return!a&&o.register(r),()=>{(a?S&&!o._state.action:S)?o.unregister(r):E(r,!1)}},[r,o,a,s]),v.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),v.useMemo(()=>({field:w,formState:d,fieldState:y}),[w,d,y])}const hr=e=>e.render(Mw(e));var Lc=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},Vo=e=>Array.isArray(e)?e:[e],pp=()=>{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=[]}}},sr=e=>$t(e)&&!Object.keys(e).length,zc=e=>e.type==="file",Mr=e=>typeof e=="function",Li=e=>{if(!Mc)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},hp=e=>e.type==="select-multiple",Bc=e=>e.type==="radio",Pw=e=>Bc(e)||Uo(e),Fc=e=>Li(e)&&e.isConnected;function Ow(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Lt(e)?n++:e[t[n++]];return e}function jw(e){for(const t in e)if(e.hasOwnProperty(t)&&!Lt(e[t]))return!1;return!0}function Wt(e,t){const r=Array.isArray(t)?t:Ni(t)?[t]:Oc(t),n=r.length===1?e:Ow(e,r),o=r.length-1,s=r[o];return n&&delete n[s],o!==0&&($t(n)&&sr(n)||Array.isArray(n)&&jw(n))&&Wt(e,r.slice(0,-1)),e}var mp=e=>{for(const t in e)if(Mr(e[t]))return!0;return!1};function zi(e,t={}){const r=Array.isArray(e);if($t(e)||r)for(const n in e)Array.isArray(e[n])||$t(e[n])&&!mp(e[n])?(t[n]=Array.isArray(e[n])?[]:{},zi(e[n],t[n])):tr(e[n])||(t[n]=!0);return t}function gp(e,t,r){const n=Array.isArray(e);if($t(e)||n)for(const o in e)Array.isArray(e[o])||$t(e[o])&&!mp(e[o])?Lt(t)||$c(r[o])?r[o]=Array.isArray(e[o])?zi(e[o],[]):{...zi(e[o])}:gp(e[o],tr(t)?{}:t[o],r[o]):r[o]=!Xr(e[o],t[o]);return r}var Yo=(e,t)=>gp(e,t,zi(t));const vp={value:!1,isValid:!1},yp={value:!0,isValid:!0};var bp=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&&!Lt(e[0].attributes.value)?Lt(e[0].value)||e[0].value===""?yp:{value:e[0].value,isValid:!0}:yp:vp}return vp},xp=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Lt(e)?e:t?e===""?NaN:e&&+e:r&&Vr(e)?new Date(e):n?n(e):e;const _p={isValid:!1,value:null};var wp=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,_p):_p;function Sp(e){const t=e.ref;return zc(t)?t.files:Bc(t)?wp(e.refs).value:hp(t)?[...t.selectedOptions].map(({value:r})=>r):Uo(t)?bp(e.refs).value:xp(Lt(t.value)?e.ref.value:t.value,e)}var Rw=(e,t,r,n)=>{const o={};for(const s of e){const i=pe(t,s);i&&ut(o,s,i._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},Bi=e=>e instanceof RegExp,qo=e=>Lt(e)?e:Bi(e)?e.source:$t(e)?Bi(e.value)?e.value.source:e.value:e,Cp=e=>({isOnSubmit:!e||e===Ir.onSubmit,isOnBlur:e===Ir.onBlur,isOnChange:e===Ir.onChange,isOnAll:e===Ir.all,isOnTouch:e===Ir.onTouched});const Ep="AsyncFunction";var Nw=e=>!!e&&!!e.validate&&!!(Mr(e.validate)&&e.validate.constructor.name===Ep||$t(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Ep)),$w=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Dp=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Zo=(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(Zo(a,t))break}else if($t(a)&&Zo(a,t))break}}};function kp(e,t,r){const n=pe(e,r);if(n||Ni(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 Lw=(e,t,r,n)=>{r(e);const{name:o,...s}=e;return sr(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(i=>t[i]===(!n||Ir.all))},zw=(e,t,r)=>!e||!t||e===t||Vo(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),Bw=(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,Fw=(e,t)=>!Pc(pe(e,t)).length&&Wt(e,t),Ww=(e,t,r)=>{const n=Vo(pe(e,r));return ut(n,"root",t[r]),ut(e,r,n),e},Fi=e=>Vr(e);function Ap(e,t,r="validate"){if(Fi(e)||Array.isArray(e)&&e.every(Fi)||pr(e)&&!e)return{type:r,message:Fi(e)?e:"",ref:t}}var Gn=e=>$t(e)&&!Bi(e)?e:{value:e,message:""},Tp=async(e,t,r,n,o,s)=>{const{ref:i,refs:a,required:c,maxLength:u,minLength:d,min:f,max:h,pattern:y,validate:g,name:p,valueAsNumber:b,mount:w}=e._f,S=pe(r,p);if(!w||t.has(p))return{};const E=a?a[0]:i,C=G=>{o&&E.reportValidity&&(E.setCustomValidity(pr(G)?"":G||""),E.reportValidity())},_={},W=Bc(i),D=Uo(i),T=W||D,M=(b||zc(i))&&Lt(i.value)&&Lt(S)||Li(i)&&i.value===""||S===""||Array.isArray(S)&&!S.length,I=Lc.bind(null,p,n,_),H=(G,F,Y,se=Qr.maxLength,U=Qr.minLength)=>{const N=G?F:Y;_[p]={type:G?se:U,message:N,ref:i,...I(G?se:U,N)}};if(s?!Array.isArray(S)||!S.length:c&&(!T&&(M||tr(S))||pr(S)&&!S||D&&!bp(a).isValid||W&&!wp(a).isValid)){const{value:G,message:F}=Fi(c)?{value:!!c,message:c}:Gn(c);if(G&&(_[p]={type:Qr.required,message:F,ref:E,...I(Qr.required,F)},!n))return C(F),_}if(!M&&(!tr(f)||!tr(h))){let G,F;const Y=Gn(h),se=Gn(f);if(!tr(S)&&!isNaN(S)){const U=i.valueAsNumber||S&&+S;tr(Y.value)||(G=U>Y.value),tr(se.value)||(F=U<se.value)}else{const U=i.valueAsDate||new Date(S),N=$=>new Date(new Date().toDateString()+" "+$),le=i.type=="time",de=i.type=="week";Vr(Y.value)&&S&&(G=le?N(S)>N(Y.value):de?S>Y.value:U>new Date(Y.value)),Vr(se.value)&&S&&(F=le?N(S)<N(se.value):de?S<se.value:U<new Date(se.value))}if((G||F)&&(H(!!G,Y.message,se.message,Qr.max,Qr.min),!n))return C(_[p].message),_}if((u||d)&&!M&&(Vr(S)||s&&Array.isArray(S))){const G=Gn(u),F=Gn(d),Y=!tr(G.value)&&S.length>+G.value,se=!tr(F.value)&&S.length<+F.value;if((Y||se)&&(H(Y,G.message,F.message),!n))return C(_[p].message),_}if(y&&!M&&Vr(S)){const{value:G,message:F}=Gn(y);if(Bi(G)&&!S.match(G)&&(_[p]={type:Qr.pattern,message:F,ref:i,...I(Qr.pattern,F)},!n))return C(F),_}if(g){if(Mr(g)){const G=await g(S,r),F=Ap(G,E);if(F&&(_[p]={...F,...I(Qr.validate,F.message)},!n))return C(F.message),_}else if($t(g)){let G={};for(const F in g){if(!sr(G)&&!n)break;const Y=Ap(await g[F](S,r),E,F);Y&&(G={...Y,...I(F,Y.message)},C(Y.message),n&&(_[p]=G))}if(!sr(G)&&(_[p]={ref:E,...G},!n))return _}}return C(!0),_};const Hw={mode:Ir.onSubmit,reValidateMode:Ir.onChange,shouldFocusError:!0};function Uw(e={}){let t={...Hw,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Mr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},o=$t(t.defaultValues)||$t(t.values)?Ut(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:Ut(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,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let f={...d};const h={array:pp(),state:pp()},y=t.criteriaMode===Ir.all,g=k=>P=>{clearTimeout(u),u=setTimeout(k,P)},p=async k=>{if(!t.disabled&&(d.isValid||f.isValid||k)){const P=t.resolver?sr((await D()).errors):await M(n,!0);P!==r.isValid&&h.state.next({isValid:P})}},b=(k,P)=>{!t.disabled&&(d.isValidating||d.validatingFields||f.isValidating||f.validatingFields)&&((k||Array.from(a.mount)).forEach(B=>{B&&(P?ut(r.validatingFields,B,P):Wt(r.validatingFields,B))}),h.state.next({validatingFields:r.validatingFields,isValidating:!sr(r.validatingFields)}))},w=(k,P=[],B,ce,ie=!0,O=!0)=>{if(ce&&B&&!t.disabled){if(i.action=!0,O&&Array.isArray(pe(n,k))){const oe=B(pe(n,k),ce.argA,ce.argB);ie&&ut(n,k,oe)}if(O&&Array.isArray(pe(r.errors,k))){const oe=B(pe(r.errors,k),ce.argA,ce.argB);ie&&ut(r.errors,k,oe),Fw(r.errors,k)}if((d.touchedFields||f.touchedFields)&&O&&Array.isArray(pe(r.touchedFields,k))){const oe=B(pe(r.touchedFields,k),ce.argA,ce.argB);ie&&ut(r.touchedFields,k,oe)}(d.dirtyFields||f.dirtyFields)&&(r.dirtyFields=Yo(o,s)),h.state.next({name:k,isDirty:H(k,P),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ut(s,k,P)},S=(k,P)=>{ut(r.errors,k,P),h.state.next({errors:r.errors})},E=k=>{r.errors=k,h.state.next({errors:r.errors,isValid:!1})},C=(k,P,B,ce)=>{const ie=pe(n,k);if(ie){const O=pe(s,k,Lt(B)?pe(o,k):B);Lt(O)||ce&&ce.defaultChecked||P?ut(s,k,P?O:Sp(ie._f)):Y(k,O),i.mount&&p()}},_=(k,P,B,ce,ie)=>{let O=!1,oe=!1;const Ce={name:k};if(!t.disabled){if(!B||ce){(d.isDirty||f.isDirty)&&(oe=r.isDirty,r.isDirty=Ce.isDirty=H(),O=oe!==Ce.isDirty);const Re=Xr(pe(o,k),P);oe=!!pe(r.dirtyFields,k),Re?Wt(r.dirtyFields,k):ut(r.dirtyFields,k,!0),Ce.dirtyFields=r.dirtyFields,O=O||(d.dirtyFields||f.dirtyFields)&&oe!==!Re}if(B){const Re=pe(r.touchedFields,k);Re||(ut(r.touchedFields,k,B),Ce.touchedFields=r.touchedFields,O=O||(d.touchedFields||f.touchedFields)&&Re!==B)}O&&ie&&h.state.next(Ce)}return O?Ce:{}},W=(k,P,B,ce)=>{const ie=pe(r.errors,k),O=(d.isValid||f.isValid)&&pr(P)&&r.isValid!==P;if(t.delayError&&B?(c=g(()=>S(k,B)),c(t.delayError)):(clearTimeout(u),c=null,B?ut(r.errors,k,B):Wt(r.errors,k)),(B?!Xr(ie,B):ie)||!sr(ce)||O){const oe={...ce,...O&&pr(P)?{isValid:P}:{},errors:r.errors,name:k};r={...r,...oe},h.state.next(oe)}},D=async k=>{b(k,!0);const P=await t.resolver(s,t.context,Rw(k||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return b(k),P},T=async k=>{const{errors:P}=await D(k);if(k)for(const B of k){const ce=pe(P,B);ce?ut(r.errors,B,ce):Wt(r.errors,B)}else r.errors=P;return P},M=async(k,P,B={valid:!0})=>{for(const ce in k){const ie=k[ce];if(ie){const{_f:O,...oe}=ie;if(O){const Ce=a.array.has(O.name),Re=ie._f&&Nw(ie._f);Re&&d.validatingFields&&b([ce],!0);const R=await Tp(ie,a.disabled,s,y,t.shouldUseNativeValidation&&!P,Ce);if(Re&&d.validatingFields&&b([ce]),R[O.name]&&(B.valid=!1,P))break;!P&&(pe(R,O.name)?Ce?Ww(r.errors,R,O.name):ut(r.errors,O.name,R[O.name]):Wt(r.errors,O.name))}!sr(oe)&&await M(oe,P,B)}}return B.valid},I=()=>{for(const k of a.unMount){const P=pe(n,k);P&&(P._f.refs?P._f.refs.every(B=>!Fc(B)):!Fc(P._f.ref))&&J(k)}a.unMount=new Set},H=(k,P)=>!t.disabled&&(k&&P&&ut(s,k,P),!Xr($(),o)),G=(k,P,B)=>dp(k,a,{...i.mount?s:Lt(P)?o:Vr(k)?{[k]:P}:P},B,P),F=k=>Pc(pe(i.mount?s:o,k,t.shouldUnregister?pe(o,k,[]):[])),Y=(k,P,B={})=>{const ce=pe(n,k);let ie=P;if(ce){const O=ce._f;O&&(!O.disabled&&ut(s,k,xp(P,O)),ie=Li(O.ref)&&tr(P)?"":P,hp(O.ref)?[...O.ref.options].forEach(oe=>oe.selected=ie.includes(oe.value)):O.refs?Uo(O.ref)?O.refs.forEach(oe=>{(!oe.defaultChecked||!oe.disabled)&&(Array.isArray(ie)?oe.checked=!!ie.find(Ce=>Ce===oe.value):oe.checked=ie===oe.value||!!ie)}):O.refs.forEach(oe=>oe.checked=oe.value===ie):zc(O.ref)?O.ref.value="":(O.ref.value=ie,O.ref.type||h.state.next({name:k,values:Ut(s)})))}(B.shouldDirty||B.shouldTouch)&&_(k,ie,B.shouldTouch,B.shouldDirty,!0),B.shouldValidate&&de(k)},se=(k,P,B)=>{for(const ce in P){if(!P.hasOwnProperty(ce))return;const ie=P[ce],O=k+"."+ce,oe=pe(n,O);(a.array.has(k)||$t(ie)||oe&&!oe._f)&&!Dn(ie)?se(O,ie,B):Y(O,ie,B)}},U=(k,P,B={})=>{const ce=pe(n,k),ie=a.array.has(k),O=Ut(P);ut(s,k,O),ie?(h.array.next({name:k,values:Ut(s)}),(d.isDirty||d.dirtyFields||f.isDirty||f.dirtyFields)&&B.shouldDirty&&h.state.next({name:k,dirtyFields:Yo(o,s),isDirty:H(k,O)})):ce&&!ce._f&&!tr(O)?se(k,O,B):Y(k,O,B),Dp(k,a)&&h.state.next({...r,name:k}),h.state.next({name:i.mount?k:void 0,values:Ut(s)})},N=async k=>{i.mount=!0;const P=k.target;let B=P.name,ce=!0;const ie=pe(n,B),O=Re=>{ce=Number.isNaN(Re)||Dn(Re)&&isNaN(Re.getTime())||Xr(Re,pe(s,B,Re))},oe=Cp(t.mode),Ce=Cp(t.reValidateMode);if(ie){let Re,R;const te=P.type?Sp(ie._f):cp(k),xe=k.type===$i.BLUR||k.type===$i.FOCUS_OUT,Ge=!$w(ie._f)&&!t.resolver&&!pe(r.errors,B)&&!ie._f.deps||Bw(xe,pe(r.touchedFields,B),r.isSubmitted,Ce,oe),At=Dp(B,a,xe);ut(s,B,te),xe?(!P||!P.readOnly)&&(ie._f.onBlur&&ie._f.onBlur(k),c&&c(0)):ie._f.onChange&&ie._f.onChange(k);const q=_(B,te,xe),fe=!sr(q)||At;if(!xe&&h.state.next({name:B,type:k.type,values:Ut(s)}),Ge)return(d.isValid||f.isValid)&&(t.mode==="onBlur"?xe&&p():xe||p()),fe&&h.state.next({name:B,...At?{}:q});if(!xe&&At&&h.state.next({...r}),t.resolver){const{errors:De}=await D([B]);if(O(te),ce){const Me=kp(r.errors,n,B),Ne=kp(De,n,Me.name||B);Re=Ne.error,B=Ne.name,R=sr(De)}}else b([B],!0),Re=(await Tp(ie,a.disabled,s,y,t.shouldUseNativeValidation))[B],b([B]),O(te),ce&&(Re?R=!1:(d.isValid||f.isValid)&&(R=await M(n,!0)));ce&&(ie._f.deps&&de(ie._f.deps),W(B,R,Re,q))}},le=(k,P)=>{if(pe(r.errors,P)&&k.focus)return k.focus(),1},de=async(k,P={})=>{let B,ce;const ie=Vo(k);if(t.resolver){const O=await T(Lt(k)?k:ie);B=sr(O),ce=k?!ie.some(oe=>pe(O,oe)):B}else k?(ce=(await Promise.all(ie.map(async O=>{const oe=pe(n,O);return await M(oe&&oe._f?{[O]:oe}:oe)}))).every(Boolean),!(!ce&&!r.isValid)&&p()):ce=B=await M(n);return h.state.next({...!Vr(k)||(d.isValid||f.isValid)&&B!==r.isValid?{}:{name:k},...t.resolver||!k?{isValid:B}:{},errors:r.errors}),P.shouldFocus&&!ce&&Zo(n,le,k?ie:a.mount),ce},$=k=>{const P={...i.mount?s:o};return Lt(k)?P:Vr(k)?pe(P,k):k.map(B=>pe(P,B))},Q=(k,P)=>({invalid:!!pe((P||r).errors,k),isDirty:!!pe((P||r).dirtyFields,k),error:pe((P||r).errors,k),isValidating:!!pe(r.validatingFields,k),isTouched:!!pe((P||r).touchedFields,k)}),we=k=>{k&&Vo(k).forEach(P=>Wt(r.errors,P)),h.state.next({errors:k?r.errors:{}})},_e=(k,P,B)=>{const ce=(pe(n,k,{_f:{}})._f||{}).ref,ie=pe(r.errors,k)||{},{ref:O,message:oe,type:Ce,...Re}=ie;ut(r.errors,k,{...Re,...P,ref:ce}),h.state.next({name:k,errors:r.errors,isValid:!1}),B&&B.shouldFocus&&ce&&ce.focus&&ce.focus()},he=(k,P)=>Mr(k)?h.state.subscribe({next:B=>"values"in B&&k(G(void 0,P),B)}):G(k,P,!0),ae=k=>h.state.subscribe({next:P=>{zw(k.name,P.name,k.exact)&&Lw(P,k.formState||d,Ve,k.reRenderRoot)&&k.callback({values:{...s},...r,...P,defaultValues:o})}}).unsubscribe,ue=k=>(i.mount=!0,f={...f,...k.formState},ae({...k,formState:f})),J=(k,P={})=>{for(const B of k?Vo(k):a.mount)a.mount.delete(B),a.array.delete(B),P.keepValue||(Wt(n,B),Wt(s,B)),!P.keepError&&Wt(r.errors,B),!P.keepDirty&&Wt(r.dirtyFields,B),!P.keepTouched&&Wt(r.touchedFields,B),!P.keepIsValidating&&Wt(r.validatingFields,B),!t.shouldUnregister&&!P.keepDefaultValue&&Wt(o,B);h.state.next({values:Ut(s)}),h.state.next({...r,...P.keepDirty?{isDirty:H()}:{}}),!P.keepIsValid&&p()},Se=({disabled:k,name:P})=>{(pr(k)&&i.mount||k||a.disabled.has(P))&&(k?a.disabled.add(P):a.disabled.delete(P))},me=(k,P={})=>{let B=pe(n,k);const ce=pr(P.disabled)||pr(t.disabled);return ut(n,k,{...B||{},_f:{...B&&B._f?B._f:{ref:{name:k}},name:k,mount:!0,...P}}),a.mount.add(k),B?Se({disabled:pr(P.disabled)?P.disabled:t.disabled,name:k}):C(k,!0,P.value),{...ce?{disabled:P.disabled||t.disabled}:{},...t.progressive?{required:!!P.required,min:qo(P.min),max:qo(P.max),minLength:qo(P.minLength),maxLength:qo(P.maxLength),pattern:qo(P.pattern)}:{},name:k,onChange:N,onBlur:N,ref:ie=>{if(ie){me(k,P),B=pe(n,k);const O=Lt(ie.value)&&ie.querySelectorAll&&ie.querySelectorAll("input,select,textarea")[0]||ie,oe=Pw(O),Ce=B._f.refs||[];if(oe?Ce.find(Re=>Re===O):O===B._f.ref)return;ut(n,k,{_f:{...B._f,...oe?{refs:[...Ce.filter(Fc),O,...Array.isArray(pe(o,k))?[{}]:[]],ref:{type:O.type,name:k}}:{ref:O}}}),C(k,!1,void 0,O)}else B=pe(n,k,{}),B._f&&(B._f.mount=!1),(t.shouldUnregister||P.shouldUnregister)&&!(lp(a.array,k)&&i.action)&&a.unMount.add(k)}}},ee=()=>t.shouldFocusError&&Zo(n,le,a.mount),Ie=k=>{pr(k)&&(h.state.next({disabled:k}),Zo(n,(P,B)=>{const ce=pe(n,B);ce&&(P.disabled=ce._f.disabled||k,Array.isArray(ce._f.refs)&&ce._f.refs.forEach(ie=>{ie.disabled=ce._f.disabled||k}))},0,!1))},j=(k,P)=>async B=>{let ce;B&&(B.preventDefault&&B.preventDefault(),B.persist&&B.persist());let ie=Ut(s);if(h.state.next({isSubmitting:!0}),t.resolver){const{errors:O,values:oe}=await D();r.errors=O,ie=Ut(oe)}else await M(n);if(a.disabled.size)for(const O of a.disabled)Wt(ie,O);if(Wt(r.errors,"root"),sr(r.errors)){h.state.next({errors:{}});try{await k(ie,B)}catch(O){ce=O}}else P&&await P({...r.errors},B),ee(),setTimeout(ee);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:sr(r.errors)&&!ce,submitCount:r.submitCount+1,errors:r.errors}),ce)throw ce},Fe=(k,P={})=>{pe(n,k)&&(Lt(P.defaultValue)?U(k,Ut(pe(o,k))):(U(k,P.defaultValue),ut(o,k,Ut(P.defaultValue))),P.keepTouched||Wt(r.touchedFields,k),P.keepDirty||(Wt(r.dirtyFields,k),r.isDirty=P.defaultValue?H(k,Ut(pe(o,k))):H()),P.keepError||(Wt(r.errors,k),d.isValid&&p()),h.state.next({...r}))},Ke=(k,P={})=>{const B=k?Ut(k):o,ce=Ut(B),ie=sr(k),O=ie?o:ce;if(P.keepDefaultValues||(o=B),!P.keepValues){if(P.keepDirtyValues){const oe=new Set([...a.mount,...Object.keys(Yo(o,s))]);for(const Ce of Array.from(oe))pe(r.dirtyFields,Ce)?ut(O,Ce,pe(s,Ce)):U(Ce,pe(O,Ce))}else{if(Mc&&Lt(k))for(const oe of a.mount){const Ce=pe(n,oe);if(Ce&&Ce._f){const Re=Array.isArray(Ce._f.refs)?Ce._f.refs[0]:Ce._f.ref;if(Li(Re)){const R=Re.closest("form");if(R){R.reset();break}}}}if(P.keepFieldsRef)for(const oe of a.mount)U(oe,pe(O,oe));else n={}}s=t.shouldUnregister?P.keepDefaultValues?Ut(o):{}:Ut(O),h.array.next({values:{...O}}),h.state.next({values:{...O}})}a={mount:P.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!d.isValid||!!P.keepIsValid||!!P.keepDirtyValues,i.watch=!!t.shouldUnregister,h.state.next({submitCount:P.keepSubmitCount?r.submitCount:0,isDirty:ie?!1:P.keepDirty?r.isDirty:!!(P.keepDefaultValues&&!Xr(k,o)),isSubmitted:P.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:ie?{}:P.keepDirtyValues?P.keepDefaultValues&&s?Yo(o,s):r.dirtyFields:P.keepDefaultValues&&k?Yo(o,k):P.keepDirty?r.dirtyFields:{},touchedFields:P.keepTouched?r.touchedFields:{},errors:P.keepErrors?r.errors:{},isSubmitSuccessful:P.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Ze=(k,P)=>Ke(Mr(k)?k(s):k,P),Be=(k,P={})=>{const B=pe(n,k),ce=B&&B._f;if(ce){const ie=ce.refs?ce.refs[0]:ce.ref;ie.focus&&(ie.focus(),P.shouldSelect&&Mr(ie.select)&&ie.select())}},Ve=k=>{r={...r,...k}},mt={control:{register:me,unregister:J,getFieldState:Q,handleSubmit:j,setError:_e,_subscribe:ae,_runSchema:D,_focusError:ee,_getWatch:G,_getDirty:H,_setValid:p,_setFieldArray:w,_setDisabledField:Se,_setErrors:E,_getFieldArray:F,_reset:Ke,_resetDefaultValues:()=>Mr(t.defaultValues)&&t.defaultValues().then(k=>{Ze(k,t.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:I,_disableForm:Ie,_subjects:h,_proxyFormState:d,get _fields(){return n},get _formValues(){return s},get _state(){return i},set _state(k){i=k},get _defaultValues(){return o},get _names(){return a},set _names(k){a=k},get _formState(){return r},get _options(){return t},set _options(k){t={...t,...k}}},subscribe:ue,trigger:de,register:me,handleSubmit:j,watch:he,setValue:U,getValues:$,reset:Ze,resetField:Fe,clearErrors:we,unregister:J,setError:_e,setFocus:Be,getFieldState:Q};return{...mt,formControl:mt}}function Ip(e={}){const t=v.useRef(void 0),r=v.useRef(void 0),[n,o]=v.useState({isDirty:!1,isValidating:!1,isLoading:Mr(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:Mr(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!Mr(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:i,...a}=Uw(e);t.current={...a,formState:n}}const s=t.current.control;return s._options=e,Nc(()=>{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&&!Xr(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=up(n,s),t.current}const Mp=(e,t,r)=>{if(e&&"reportValidity"in e){const n=pe(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Wc=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Mp(n.ref,r,e):n&&n.refs&&n.refs.forEach(o=>Mp(o,r,e))}},Pp=(e,t)=>{t.shouldUseNativeValidation&&Wc(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(Vw(t.names||Object.keys(e),n)){const i=Object.assign({},pe(r,n));ut(i,"root",s),ut(r,n,i)}else ut(r,n,s)}return r},Vw=(e,t)=>{const r=Op(t);return e.some(n=>Op(n).match(`^${r}\\.\\d+`))};function Op(e){return e.replace(/\]|\[/g,"")}function Z(e,t,r){function n(a,c){var u;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(u=a._zod).traits??(u.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 u=r?.Parent?new s:this;n(u,a),(c=u._zod).deferred??(c.deferred=[]);for(const d of u._zod.deferred)d();return u}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 Kn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class jp extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Rp={};function kn(e){return Rp}function Yw(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 Hc(e,t){return typeof t=="bigint"?t.toString():t}function Uc(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Vc(e){return e==null}function Yc(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function qw(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 Np=Symbol("evaluating");function vt(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Np)return n===void 0&&(n=Np,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Zw(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function cn(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Qn(...e){const t={};for(const r of e){const n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function $p(e){return JSON.stringify(e)}const Lp="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Wi(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Gw=Uc(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Go(e){if(Wi(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(Wi(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function zp(e){return Go(e)?{...e}:e}const Kw=new Set(["string","number","symbol"]);function Xn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ln(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function Ae(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 Qw(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Xw={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 Jw(e,t){const r=e._zod.def,n=Qn(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 cn(this,"shape",o),o},checks:[]});return ln(e,n)}function eS(e,t){const r=e._zod.def,n=Qn(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 cn(this,"shape",o),o},checks:[]});return ln(e,n)}function tS(e,t){if(!Go(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=Qn(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return cn(this,"shape",s),s},checks:[]});return ln(e,o)}function rS(e,t){if(!Go(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 cn(this,"shape",n),n},checks:e._zod.def.checks};return ln(e,r)}function nS(e,t){const r=Qn(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return cn(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return ln(e,r)}function oS(e,t,r){const n=Qn(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 cn(this,"shape",s),s},checks:[]});return ln(t,n)}function sS(e,t,r){const n=Qn(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 cn(this,"shape",s),s},checks:[]});return ln(t,n)}function Jn(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 Bp(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Hi(e){return typeof e=="string"?e:e?.message}function An(e,t,r){const n={...e,path:e.path??[]};if(!e.message){const o=Hi(e.inst?._zod.def?.error?.(e))??Hi(t?.error?.(e))??Hi(r.customError?.(e))??Hi(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function qc(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ko(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}const Fp=(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,Hc,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Zc=Z("$ZodError",Fp),Ui=Z("$ZodError",Fp,{Parent:Error});function iS(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 aS(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 u=i.path[c];c===i.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(i))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return o(e),n}const Vi=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 Kn;if(i.issues.length){const a=new(o?.Err??e)(i.issues.map(c=>An(c,s,kn())));throw Lp(a,o?.callee),a}return i.value},cS=Vi(Ui),Yi=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=>An(c,s,kn())));throw Lp(a,o?.callee),a}return i.value},lS=Yi(Ui),qi=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 Kn;return s.issues.length?{success:!1,error:new(e??Zc)(s.issues.map(i=>An(i,o,kn())))}:{success:!0,data:s.value}},uS=qi(Ui),Zi=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=>An(i,o,kn())))}:{success:!0,data:s.value}},dS=Zi(Ui),fS=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Vi(e)(t,r,o)},pS=e=>(t,r,n)=>Vi(e)(t,r,n),hS=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Yi(e)(t,r,o)},mS=e=>async(t,r,n)=>Yi(e)(t,r,n),gS=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return qi(e)(t,r,o)},vS=e=>(t,r,n)=>qi(e)(t,r,n),yS=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Zi(e)(t,r,o)},bS=e=>async(t,r,n)=>Zi(e)(t,r,n),xS=/^[cC][^\s-]{8,}$/,_S=/^[0-9a-z]+$/,wS=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,SS=/^[0-9a-vA-V]{20}$/,CS=/^[A-Za-z0-9]{27}$/,ES=/^[a-zA-Z0-9_-]{21}$/,DS=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,kS=/^([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})$/,Wp=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)$/,AS=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,TS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function IS(){return new RegExp(TS,"u")}const MS=/^(?:(?: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])$/,PS=/^(([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})$/,OS=/^((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])$/,jS=/^(([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])$/,RS=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Hp=/^[A-Za-z0-9_-]*$/,NS=/^(?=.{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])?)*\.?$/,$S=/^\+(?:[0-9]){6,14}[0-9]$/,Up="(?:(?:\\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])))",LS=new RegExp(`^${Up}$`);function Vp(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 zS(e){return new RegExp(`^${Vp(e)}$`)}function BS(e){const t=Vp({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(`^${Up}T(?:${n})$`)}const FS=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},WS=/^\d+$/,HS=/^-?\d+(?:\.\d+)?/i,US=/true|false/i,VS=/^[^A-Z]*$/,YS=/^[^a-z]*$/,ir=Z("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Yp={number:"number",bigint:"bigint",object:"date"},qp=Z("$ZodCheckLessThan",(e,t)=>{ir.init(e,t);const r=Yp[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})}}),Zp=Z("$ZodCheckGreaterThan",(e,t)=>{ir.init(e,t);const r=Yp[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})}}),qS=Z("$ZodCheckMultipleOf",(e,t)=>{ir.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):qw(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})}}),ZS=Z("$ZodCheckNumberFormat",(e,t)=>{ir.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[o,s]=Xw[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=WS)}),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})}}),GS=Z("$ZodCheckMaxLength",(e,t)=>{var r;ir.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Vc(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=qc(o);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),KS=Z("$ZodCheckMinLength",(e,t)=>{var r;ir.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Vc(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=qc(o);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),QS=Z("$ZodCheckLengthEquals",(e,t)=>{var r;ir.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Vc(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=qc(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})}}),Gi=Z("$ZodCheckStringFormat",(e,t)=>{var r,n;ir.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=()=>{})}),XS=Z("$ZodCheckRegex",(e,t)=>{Gi.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})}}),JS=Z("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=VS),Gi.init(e,t)}),eC=Z("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=YS),Gi.init(e,t)}),tC=Z("$ZodCheckIncludes",(e,t)=>{ir.init(e,t);const r=Xn(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})}}),rC=Z("$ZodCheckStartsWith",(e,t)=>{ir.init(e,t);const r=new RegExp(`^${Xn(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})}}),nC=Z("$ZodCheckEndsWith",(e,t)=>{ir.init(e,t);const r=new RegExp(`.*${Xn(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})}}),oC=Z("$ZodCheckOverwrite",(e,t)=>{ir.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class sC{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
|
|
163
|
-
if (${
|
|
164
|
-
payload.issues = payload.issues.concat(${
|
|
162
|
+
`))}}const iC={major:4,minor:1,patch:5},Pt=Z("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=iC;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 u=Jn(i),d;for(const f of a){if(f._zod.def.when){if(!f._zod.def.when(i))continue}else if(u)continue;const h=i.issues.length,y=f._zod.check(i);if(y instanceof Promise&&c?.async===!1)throw new Kn;if(d||y instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await y,i.issues.length!==h&&(u||(u=Jn(i,h)))});else{if(i.issues.length===h)continue;u||(u=Jn(i,h))}}return d?d.then(()=>i):i},s=(i,a,c)=>{if(Jn(i))return i.aborted=!0,i;const u=o(a,n,c);if(u instanceof Promise){if(c.async===!1)throw new Kn;return u.then(d=>e._zod.parse(d,c))}return e._zod.parse(u,c)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction==="backward"){const u=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return u instanceof Promise?u.then(d=>s(d,i,a)):s(u,i,a)}const c=e._zod.parse(i,a);if(c instanceof Promise){if(a.async===!1)throw new Kn;return c.then(u=>o(u,n,a))}return o(c,n,a)}}e["~standard"]={validate:o=>{try{const s=uS(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return dS(e,o).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}}),Gc=Z("$ZodString",(e,t)=>{Pt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??FS(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}}),St=Z("$ZodStringFormat",(e,t)=>{Gi.init(e,t),Gc.init(e,t)}),aC=Z("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=kS),St.init(e,t)}),cC=Z("$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=Wp(n))}else t.pattern??(t.pattern=Wp());St.init(e,t)}),lC=Z("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=AS),St.init(e,t)}),uC=Z("$ZodURL",(e,t)=>{St.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:NS.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})}}}),dC=Z("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=IS()),St.init(e,t)}),fC=Z("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=ES),St.init(e,t)}),pC=Z("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=xS),St.init(e,t)}),hC=Z("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=_S),St.init(e,t)}),mC=Z("$ZodULID",(e,t)=>{t.pattern??(t.pattern=wS),St.init(e,t)}),gC=Z("$ZodXID",(e,t)=>{t.pattern??(t.pattern=SS),St.init(e,t)}),vC=Z("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=CS),St.init(e,t)}),yC=Z("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=BS(t)),St.init(e,t)}),bC=Z("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=LS),St.init(e,t)}),xC=Z("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=zS(t)),St.init(e,t)}),_C=Z("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=DS),St.init(e,t)}),wC=Z("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=MS),St.init(e,t),e._zod.onattach.push(r=>{const n=r._zod.bag;n.format="ipv4"})}),SC=Z("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=PS),St.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})}}}),CC=Z("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=OS),St.init(e,t)}),EC=Z("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=jS),St.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 Gp(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const DC=Z("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=RS),St.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{Gp(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function kC(e){if(!Hp.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Gp(r)}const AC=Z("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Hp),St.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{kC(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),TC=Z("$ZodE164",(e,t)=>{t.pattern??(t.pattern=$S),St.init(e,t)});function IC(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 MC=Z("$ZodJWT",(e,t)=>{St.init(e,t),e._zod.check=r=>{IC(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Kp=Z("$ZodNumber",(e,t)=>{Pt.init(e,t),e._zod.pattern=e._zod.bag.pattern??HS,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}}),PC=Z("$ZodNumber",(e,t)=>{ZS.init(e,t),Kp.init(e,t)}),OC=Z("$ZodBoolean",(e,t)=>{Pt.init(e,t),e._zod.pattern=US,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}}),jC=Z("$ZodUnknown",(e,t)=>{Pt.init(e,t),e._zod.parse=r=>r}),RC=Z("$ZodNever",(e,t)=>{Pt.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function Qp(e,t,r){e.issues.length&&t.issues.push(...Bp(r,e.issues)),t.value[r]=e.value}const NC=Z("$ZodArray",(e,t)=>{Pt.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(u=>Qp(u,r,i))):Qp(c,r,i)}return s.length?Promise.all(s).then(()=>r):r}});function Ki(e,t,r,n){e.issues.length&&t.issues.push(...Bp(r,e.issues)),e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function Xp(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=Qw(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Jp(e,t,r,n,o,s){const i=[],a=o.keySet,c=o.catchall._zod,u=c.def.type;for(const d of Object.keys(t)){if(a.has(d))continue;if(u==="never"){i.push(d);continue}const f=c.run({value:t[d],issues:[]},n);f instanceof Promise?e.push(f.then(h=>Ki(h,r,d,t))):Ki(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 $C=Z("$ZodObject",(e,t)=>{Pt.init(e,t);const r=Uc(()=>Xp(t));vt(e._zod,"propValues",()=>{const i=t.shape,a={};for(const c in i){const u=i[c]._zod;if(u.values){a[c]??(a[c]=new Set);for(const d of u.values)a[c].add(d)}}return a});const n=Wi,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 u=[],d=s.shape;for(const f of s.keys){const y=d[f]._zod.run({value:c[f],issues:[]},a);y instanceof Promise?u.push(y.then(g=>Ki(g,i,f,c))):Ki(y,i,f,c)}return o?Jp(u,c,i,a,r.value,e):u.length?Promise.all(u).then(()=>i):i}}),LC=Z("$ZodObjectJIT",(e,t)=>{$C.init(e,t);const r=e._zod.parse,n=Uc(()=>Xp(t)),o=h=>{const y=new sC(["shape","payload","ctx"]),g=n.value,p=E=>{const C=$p(E);return`shape[${C}]._zod.run({ value: input[${C}], issues: [] }, ctx)`};y.write("const input = payload.value;");const b=Object.create(null);let w=0;for(const E of g.keys)b[E]=`key_${w++}`;y.write("const newResult = {}");for(const E of g.keys){const C=b[E],_=$p(E);y.write(`const ${C} = ${p(E)};`),y.write(`
|
|
163
|
+
if (${C}.issues.length) {
|
|
164
|
+
payload.issues = payload.issues.concat(${C}.issues.map(iss => ({
|
|
165
165
|
...iss,
|
|
166
166
|
path: iss.path ? [${_}, ...iss.path] : [${_}]
|
|
167
167
|
})));
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
if (${
|
|
170
|
+
if (${C}.value === undefined) {
|
|
171
171
|
if (${_} in input) {
|
|
172
172
|
newResult[${_}] = undefined;
|
|
173
173
|
}
|
|
174
174
|
} else {
|
|
175
|
-
newResult[${_}] = ${
|
|
175
|
+
newResult[${_}] = ${C}.value;
|
|
176
176
|
}
|
|
177
|
-
`)}v.write("payload.value = newResult;"),v.write("return payload;");const C=v.compile();return(E,S)=>C(h,E,S)};let s;const i=Fi,a=!jp.jitless,u=a&&Zw.value,d=t.catchall;let f;e._zod.parse=(h,v)=>{f??(f=n.value);const m=h.value;return i(m)?a&&u&&v?.async===!1&&v.jitless!==!0?(s||(s=o(t.shape)),h=s(h,v),d?Xp([],m,h,v,f,e):h):r(h,v):(h.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),h)}});function Jp(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=>!Jn(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=>kn(i,n,Dn())))}),t)}const LC=Z("$ZodUnion",(e,t)=>{Mt.init(e,t),gt(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),gt(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),gt(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),gt(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=>Vc(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 u=c._zod.run({value:o.value,issues:[]},s);if(u instanceof Promise)a.push(u),i=!0;else{if(u.issues.length===0)return u;a.push(u)}}return i?Promise.all(a).then(c=>Jp(c,o,e,s)):Jp(a,o,e,s)}}),zC=Z("$ZodIntersection",(e,t)=>{Mt.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,u])=>eh(r,c,u)):eh(r,s,i)}});function Gc(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(Go(e)&&Go(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=Gc(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=Gc(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 eh(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),Jn(e))return e;const n=Gc(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 BC=Z("$ZodEnum",(e,t)=>{Mt.init(e,t);const r=Vw(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>Gw.has(typeof o)).map(o=>typeof o=="string"?Xn(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}}),FC=Z("$ZodLiteral",(e,t)=>{if(Mt.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"?Xn(r):r?Xn(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}}),WC=Z("$ZodTransform",(e,t)=>{Mt.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Op(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 Kn;return r.value=o,r}});function th(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const UC=Z("$ZodOptional",(e,t)=>{Mt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",gt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),gt(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Vc(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=>th(s,r.value)):th(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),HC=Z("$ZodNullable",(e,t)=>{Mt.init(e,t),gt(e._zod,"optin",()=>t.innerType._zod.optin),gt(e._zod,"optout",()=>t.innerType._zod.optout),gt(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Vc(r.source)}|null)$`):void 0}),gt(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)}),VC=Z("$ZodDefault",(e,t)=>{Mt.init(e,t),e._zod.optin="optional",gt(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=>rh(s,t)):rh(o,t)}});function rh(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const YC=Z("$ZodPrefault",(e,t)=>{Mt.init(e,t),e._zod.optin="optional",gt(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))}),qC=Z("$ZodNonOptional",(e,t)=>{Mt.init(e,t),gt(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=>nh(s,e)):nh(o,e)}});function nh(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 ZC=Z("$ZodCatch",(e,t)=>{Mt.init(e,t),gt(e._zod,"optin",()=>t.innerType._zod.optin),gt(e._zod,"optout",()=>t.innerType._zod.optout),gt(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=>kn(i,n,Dn()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(s=>kn(s,n,Dn()))},input:r.value}),r.issues=[]),r)}}),GC=Z("$ZodPipe",(e,t)=>{Mt.init(e,t),gt(e._zod,"values",()=>t.in._zod.values),gt(e._zod,"optin",()=>t.in._zod.optin),gt(e._zod,"optout",()=>t.out._zod.optout),gt(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=>Ki(i,t.in,n)):Ki(s,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(s=>Ki(s,t.out,n)):Ki(o,t.out,n)}});function Ki(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const KC=Z("$ZodReadonly",(e,t)=>{Mt.init(e,t),gt(e._zod,"propValues",()=>t.innerType._zod.propValues),gt(e._zod,"values",()=>t.innerType._zod.values),gt(e._zod,"optin",()=>t.innerType._zod.optin),gt(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(oh):oh(o)}});function oh(e){return e.value=Object.freeze(e.value),e}const QC=Z("$ZodCustom",(e,t)=>{ar.init(e,t),Mt.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=>sh(s,r,n,e));sh(o,r,n,e)}});function sh(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(Ko(o))}}class XC{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 JC(){return new XC}const Qi=JC();function eE(e,t){return new e({type:"string",...Te(t)})}function tE(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Te(t)})}function ih(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Te(t)})}function rE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Te(t)})}function nE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Te(t)})}function oE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Te(t)})}function sE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Te(t)})}function iE(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Te(t)})}function aE(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Te(t)})}function cE(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Te(t)})}function lE(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Te(t)})}function uE(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Te(t)})}function dE(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Te(t)})}function fE(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Te(t)})}function pE(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Te(t)})}function hE(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Te(t)})}function mE(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Te(t)})}function gE(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Te(t)})}function vE(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Te(t)})}function yE(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Te(t)})}function bE(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Te(t)})}function xE(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Te(t)})}function _E(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Te(t)})}function wE(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Te(t)})}function SE(e,t){return new e({type:"string",format:"date",check:"string_format",...Te(t)})}function CE(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Te(t)})}function EE(e,t){return new e({type:"string",format:"duration",check:"string_format",...Te(t)})}function DE(e,t){return new e({type:"number",checks:[],...Te(t)})}function kE(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Te(t)})}function AE(e,t){return new e({type:"boolean",...Te(t)})}function TE(e){return new e({type:"unknown"})}function IE(e,t){return new e({type:"never",...Te(t)})}function ah(e,t){return new Yp({check:"less_than",...Te(t),value:e,inclusive:!1})}function Kc(e,t){return new Yp({check:"less_than",...Te(t),value:e,inclusive:!0})}function ch(e,t){return new qp({check:"greater_than",...Te(t),value:e,inclusive:!1})}function Qc(e,t){return new qp({check:"greater_than",...Te(t),value:e,inclusive:!0})}function lh(e,t){return new YS({check:"multiple_of",...Te(t),value:e})}function uh(e,t){return new ZS({check:"max_length",...Te(t),maximum:e})}function Xi(e,t){return new GS({check:"min_length",...Te(t),minimum:e})}function dh(e,t){return new KS({check:"length_equals",...Te(t),length:e})}function ME(e,t){return new QS({check:"string_format",format:"regex",...Te(t),pattern:e})}function PE(e){return new XS({check:"string_format",format:"lowercase",...Te(e)})}function OE(e){return new JS({check:"string_format",format:"uppercase",...Te(e)})}function jE(e,t){return new eC({check:"string_format",format:"includes",...Te(t),includes:e})}function RE(e,t){return new tC({check:"string_format",format:"starts_with",...Te(t),prefix:e})}function NE(e,t){return new rC({check:"string_format",format:"ends_with",...Te(t),suffix:e})}function Qo(e){return new nC({check:"overwrite",tx:e})}function $E(e){return Qo(t=>t.normalize(e))}function LE(){return Qo(e=>e.trim())}function zE(){return Qo(e=>e.toLowerCase())}function BE(){return Qo(e=>e.toUpperCase())}function FE(e,t,r){return new e({type:"array",element:t,...Te(r)})}function WE(e,t,r){return new e({type:"custom",check:"custom",fn:t,...Te(r)})}function UE(e){const t=HE(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Ko(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(Ko(o))}},e(r.value,r)));return t}function HE(e,t){const r=new ar({check:"custom",...Te(t)});return r._zod.check=e,r}function fh(e,t){try{var r=e()}catch(n){return t(n)}return r&&r.then?r.then(void 0,t):r}function VE(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,u=c&&c[n.code];r[i]=$c(i,t,r,o,u?[].concat(u,n.message):n.message)}e.shift()}return r}function YE(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,u=c&&c[n.code];r[i]=$c(i,t,r,o,u?[].concat(u,n.message):n.message)}e.shift()}return r}function qE(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(fh(function(){return Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(i){return s.shouldUseNativeValidation&&Fc({},s),{errors:{},values:r.raw?Object.assign({},n):i}})},function(i){if((function(a){return Array.isArray(a?.issues)})(i))return{values:{},errors:Mp(VE(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(fh(function(){return Promise.resolve((r.mode==="sync"?aS:cS)(e,n,t)).then(function(i){return s.shouldUseNativeValidation&&Fc({},s),{errors:{},values:r.raw?Object.assign({},n):i}})},function(i){if((function(a){return a instanceof qc})(i))return{values:{},errors:Mp(YE(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 ZE=Z("ZodISODateTime",(e,t)=>{vC.init(e,t),kt.init(e,t)});function GE(e){return wE(ZE,e)}const KE=Z("ZodISODate",(e,t)=>{yC.init(e,t),kt.init(e,t)});function QE(e){return SE(KE,e)}const XE=Z("ZodISOTime",(e,t)=>{bC.init(e,t),kt.init(e,t)});function JE(e){return CE(XE,e)}const eD=Z("ZodISODuration",(e,t)=>{xC.init(e,t),kt.init(e,t)});function tD(e){return EE(eD,e)}const xr=Z("ZodError",(e,t)=>{qc.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>iS(e,r)},flatten:{value:r=>sS(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Wc,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Wc,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),rD=Hi(xr),nD=Vi(xr),oD=Yi(xr),sD=qi(xr),iD=dS(xr),aD=fS(xr),cD=pS(xr),lD=hS(xr),uD=mS(xr),dD=gS(xr),fD=vS(xr),pD=yS(xr),Lt=Z("ZodType",(e,t)=>(Mt.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)=>cn(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>rD(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>oD(e,r,n),e.parseAsync=async(r,n)=>nD(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>sD(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>iD(e,r,n),e.decode=(r,n)=>aD(e,r,n),e.encodeAsync=async(r,n)=>cD(e,r,n),e.decodeAsync=async(r,n)=>lD(e,r,n),e.safeEncode=(r,n)=>uD(e,r,n),e.safeDecode=(r,n)=>dD(e,r,n),e.safeEncodeAsync=async(r,n)=>fD(e,r,n),e.safeDecodeAsync=async(r,n)=>pD(e,r,n),e.refine=(r,n)=>e.check(sk(r,n)),e.superRefine=r=>e.check(ik(r)),e.overwrite=r=>e.check(Qo(r)),e.optional=()=>wh(e),e.nullable=()=>Sh(e),e.nullish=()=>wh(Sh(e)),e.nonoptional=r=>XD(e,r),e.array=()=>yh(e),e.or=r=>BD([e,r]),e.and=r=>WD(e,r),e.transform=r=>Eh(e,YD(r)),e.default=r=>GD(e,r),e.prefault=r=>QD(e,r),e.catch=r=>ek(e,r),e.pipe=r=>Eh(e,r),e.readonly=()=>nk(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)),ph=Z("_ZodString",(e,t)=>{Zc.init(e,t),Lt.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(ME(...n)),e.includes=(...n)=>e.check(jE(...n)),e.startsWith=(...n)=>e.check(RE(...n)),e.endsWith=(...n)=>e.check(NE(...n)),e.min=(...n)=>e.check(Xi(...n)),e.max=(...n)=>e.check(uh(...n)),e.length=(...n)=>e.check(dh(...n)),e.nonempty=(...n)=>e.check(Xi(1,...n)),e.lowercase=n=>e.check(PE(n)),e.uppercase=n=>e.check(OE(n)),e.trim=()=>e.check(LE()),e.normalize=(...n)=>e.check($E(...n)),e.toLowerCase=()=>e.check(zE()),e.toUpperCase=()=>e.check(BE())}),hD=Z("ZodString",(e,t)=>{Zc.init(e,t),ph.init(e,t),e.email=r=>e.check(tE(mD,r)),e.url=r=>e.check(iE(gD,r)),e.jwt=r=>e.check(_E(MD,r)),e.emoji=r=>e.check(aE(vD,r)),e.guid=r=>e.check(ih(hh,r)),e.uuid=r=>e.check(rE(Ji,r)),e.uuidv4=r=>e.check(nE(Ji,r)),e.uuidv6=r=>e.check(oE(Ji,r)),e.uuidv7=r=>e.check(sE(Ji,r)),e.nanoid=r=>e.check(cE(yD,r)),e.guid=r=>e.check(ih(hh,r)),e.cuid=r=>e.check(lE(bD,r)),e.cuid2=r=>e.check(uE(xD,r)),e.ulid=r=>e.check(dE(_D,r)),e.base64=r=>e.check(yE(AD,r)),e.base64url=r=>e.check(bE(TD,r)),e.xid=r=>e.check(fE(wD,r)),e.ksuid=r=>e.check(pE(SD,r)),e.ipv4=r=>e.check(hE(CD,r)),e.ipv6=r=>e.check(mE(ED,r)),e.cidrv4=r=>e.check(gE(DD,r)),e.cidrv6=r=>e.check(vE(kD,r)),e.e164=r=>e.check(xE(ID,r)),e.datetime=r=>e.check(GE(r)),e.date=r=>e.check(QE(r)),e.time=r=>e.check(JE(r)),e.duration=r=>e.check(tD(r))});function _r(e){return eE(hD,e)}const kt=Z("ZodStringFormat",(e,t)=>{wt.init(e,t),ph.init(e,t)}),mD=Z("ZodEmail",(e,t)=>{cC.init(e,t),kt.init(e,t)}),hh=Z("ZodGUID",(e,t)=>{iC.init(e,t),kt.init(e,t)}),Ji=Z("ZodUUID",(e,t)=>{aC.init(e,t),kt.init(e,t)}),gD=Z("ZodURL",(e,t)=>{lC.init(e,t),kt.init(e,t)}),vD=Z("ZodEmoji",(e,t)=>{uC.init(e,t),kt.init(e,t)}),yD=Z("ZodNanoID",(e,t)=>{dC.init(e,t),kt.init(e,t)}),bD=Z("ZodCUID",(e,t)=>{fC.init(e,t),kt.init(e,t)}),xD=Z("ZodCUID2",(e,t)=>{pC.init(e,t),kt.init(e,t)}),_D=Z("ZodULID",(e,t)=>{hC.init(e,t),kt.init(e,t)}),wD=Z("ZodXID",(e,t)=>{mC.init(e,t),kt.init(e,t)}),SD=Z("ZodKSUID",(e,t)=>{gC.init(e,t),kt.init(e,t)}),CD=Z("ZodIPv4",(e,t)=>{_C.init(e,t),kt.init(e,t)}),ED=Z("ZodIPv6",(e,t)=>{wC.init(e,t),kt.init(e,t)}),DD=Z("ZodCIDRv4",(e,t)=>{SC.init(e,t),kt.init(e,t)}),kD=Z("ZodCIDRv6",(e,t)=>{CC.init(e,t),kt.init(e,t)}),AD=Z("ZodBase64",(e,t)=>{EC.init(e,t),kt.init(e,t)}),TD=Z("ZodBase64URL",(e,t)=>{kC.init(e,t),kt.init(e,t)}),ID=Z("ZodE164",(e,t)=>{AC.init(e,t),kt.init(e,t)}),MD=Z("ZodJWT",(e,t)=>{IC.init(e,t),kt.init(e,t)}),mh=Z("ZodNumber",(e,t)=>{Gp.init(e,t),Lt.init(e,t),e.gt=(n,o)=>e.check(ch(n,o)),e.gte=(n,o)=>e.check(Qc(n,o)),e.min=(n,o)=>e.check(Qc(n,o)),e.lt=(n,o)=>e.check(ah(n,o)),e.lte=(n,o)=>e.check(Kc(n,o)),e.max=(n,o)=>e.check(Kc(n,o)),e.int=n=>e.check(gh(n)),e.safe=n=>e.check(gh(n)),e.positive=n=>e.check(ch(0,n)),e.nonnegative=n=>e.check(Qc(0,n)),e.negative=n=>e.check(ah(0,n)),e.nonpositive=n=>e.check(Kc(0,n)),e.multipleOf=(n,o)=>e.check(lh(n,o)),e.step=(n,o)=>e.check(lh(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 ea(e){return DE(mh,e)}const PD=Z("ZodNumberFormat",(e,t)=>{MC.init(e,t),mh.init(e,t)});function gh(e){return kE(PD,e)}const OD=Z("ZodBoolean",(e,t)=>{PC.init(e,t),Lt.init(e,t)});function ta(e){return AE(OD,e)}const jD=Z("ZodUnknown",(e,t)=>{OC.init(e,t),Lt.init(e,t)});function vh(){return TE(jD)}const RD=Z("ZodNever",(e,t)=>{jC.init(e,t),Lt.init(e,t)});function ND(e){return IE(RD,e)}const $D=Z("ZodArray",(e,t)=>{RC.init(e,t),Lt.init(e,t),e.element=t.element,e.min=(r,n)=>e.check(Xi(r,n)),e.nonempty=r=>e.check(Xi(1,r)),e.max=(r,n)=>e.check(uh(r,n)),e.length=(r,n)=>e.check(dh(r,n)),e.unwrap=()=>e.element});function yh(e,t){return FE($D,e,t)}const LD=Z("ZodObject",(e,t)=>{$C.init(e,t),Lt.init(e,t),gt(e,"shape",()=>t.shape),e.keyof=()=>xh(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:vh()}),e.loose=()=>e.clone({...e._zod.def,catchall:vh()}),e.strict=()=>e.clone({...e._zod.def,catchall:ND()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>eS(e,r),e.safeExtend=r=>tS(e,r),e.merge=r=>rS(e,r),e.pick=r=>Xw(e,r),e.omit=r=>Jw(e,r),e.partial=(...r)=>nS(_h,e,r[0]),e.required=(...r)=>oS(Ch,e,r[0])});function bh(e,t){const r={type:"object",get shape(){return an(this,"shape",e?qw(e):{}),this.shape},...Te(t)};return new LD(r)}const zD=Z("ZodUnion",(e,t)=>{LC.init(e,t),Lt.init(e,t),e.options=t.options});function BD(e,t){return new zD({type:"union",options:e,...Te(t)})}const FD=Z("ZodIntersection",(e,t)=>{zC.init(e,t),Lt.init(e,t)});function WD(e,t){return new FD({type:"intersection",left:e,right:t})}const Xc=Z("ZodEnum",(e,t)=>{BC.init(e,t),Lt.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 Xc({...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 Xc({...t,checks:[],...Te(o),entries:s})}});function xh(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Xc({type:"enum",entries:r,...Te(t)})}const UD=Z("ZodLiteral",(e,t)=>{FC.init(e,t),Lt.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 HD(e,t){return new UD({type:"literal",values:Array.isArray(e)?e:[e],...Te(t)})}const VD=Z("ZodTransform",(e,t)=>{WC.init(e,t),Lt.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Op(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Ko(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(Ko(i))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(s=>(r.value=s,r)):(r.value=o,r)}});function YD(e){return new VD({type:"transform",transform:e})}const _h=Z("ZodOptional",(e,t)=>{UC.init(e,t),Lt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function wh(e){return new _h({type:"optional",innerType:e})}const qD=Z("ZodNullable",(e,t)=>{HC.init(e,t),Lt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Sh(e){return new qD({type:"nullable",innerType:e})}const ZD=Z("ZodDefault",(e,t)=>{VC.init(e,t),Lt.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function GD(e,t){return new ZD({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Lp(t)}})}const KD=Z("ZodPrefault",(e,t)=>{YC.init(e,t),Lt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function QD(e,t){return new KD({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Lp(t)}})}const Ch=Z("ZodNonOptional",(e,t)=>{qC.init(e,t),Lt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function XD(e,t){return new Ch({type:"nonoptional",innerType:e,...Te(t)})}const JD=Z("ZodCatch",(e,t)=>{ZC.init(e,t),Lt.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ek(e,t){return new JD({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const tk=Z("ZodPipe",(e,t)=>{GC.init(e,t),Lt.init(e,t),e.in=t.in,e.out=t.out});function Eh(e,t){return new tk({type:"pipe",in:e,out:t})}const rk=Z("ZodReadonly",(e,t)=>{KC.init(e,t),Lt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function nk(e){return new rk({type:"readonly",innerType:e})}const ok=Z("ZodCustom",(e,t)=>{QC.init(e,t),Lt.init(e,t)});function sk(e,t={}){return WE(ok,e,t)}function ik(e){return UE(e)}const Dh=/^([01][0-9]|2[0-3]):[0-5][0-9]$/,kh=(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),u=new Date(n,o,s,a,c);return isNaN(u.getTime())||!x.isValid(u)?null:u},ak=bh({UsuarioID:ea().nullable().optional(),disID:ea().nullable().optional(),EsOrganizador:ta().default(!1),Correo:_r().email("Formato de correo inválido"),StatusInvitacion:xh(["PENDIENTE","CONFIRMADO","DECLINADO"]).default("PENDIENTE")}),ck=bh({titulo:_r().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:_r().min(1,"El campo fecha inicio es requerido."),horaInicio:_r().min(1,"La hora de inicio es requerida.").regex(Dh,{message:"Formato inválido"}),horaFin:_r().min(1,"La hora fin es requerida.").regex(Dh,{message:"Formato inválido"}),todoElDia:ta(),fechaFin:_r().optional(),showEndDate:ta().optional(),horaInicio2:_r().optional(),TodoElDia2:ta().optional(),client:_r().nullable().optional(),repetir:_r().optional(),link:_r().trim().url("Debe ser una URL válida. Ejemplo https://meet.google.com/").or(HD("")).optional().refine(e=>e===void 0?!0:!/\s/.test(e),{message:"El enlace no puede contener espacios en blanco"}),descripcion:_r().optional(),invitados:yh(ak).optional().default([]),color:_r().optional(),solID:ea().nullable().optional(),disID:ea().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=kh(e.fechaInicio,e.horaInicio),r=kh(e.fechaFin,e.horaFin);return!t||!r||!x.isValid(t)||!x.isValid(r)?!0:!(x.isBefore(r,t)&&!x.isSameDay(r,t)||x.isSameDay(t,r)&&x.isBefore(r,t))},{message:"",path:["horaFin"]}),Ah=e=>K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},K.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"}),K.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"})),lk="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",uk=e=>K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},K.createElement("g",{clipPath:"url(#a)"},K.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"})),K.createElement("defs",null,K.createElement("clipPath",{id:"a"},K.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),Th="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",dk=e=>K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},K.createElement("g",{fill:"#2571D6",clipPath:"url(#a)"},K.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"}),K.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"}),K.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"})),K.createElement("defs",null,K.createElement("clipPath",{id:"a"},K.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),fk="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",pk=e=>K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},K.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"}),K.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 Xo={},Ih;function hk(){if(Ih)return Xo;Ih=1;var e=at();Object.defineProperty(Xo,"__esModule",{value:!0}),Xo.default=void 0;var t=e(ht()),r=ut();return Xo.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"),Xo}var mk=hk();const Mh=it(mk);var Jo={},Ph;function gk(){if(Ph)return Jo;Ph=1;var e=at();Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.default=void 0;var t=e(ht()),r=ut();return Jo.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"),Jo}var vk=gk();const yk=it(vk);var es={},Oh;function bk(){if(Oh)return es;Oh=1;var e=at();Object.defineProperty(es,"__esModule",{value:!0}),es.default=void 0;var t=e(ht()),r=ut();return es.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"),es}var xk=bk();const _k=it(xk),wk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAElBMVEUAAABpbXlpbXlobXhpbnppbnkdzkEGAAAABXRSTlMAgJ5Y75poDcUAAAA3SURBVBjTYyANiBog2IyhSBzRQGQJASSJIGQJBSIkTBESCA5CGcIAoqUEGDAdiukFBhE4hzAAAK+MB7AghHQFAAAAAElFTkSuQmCC";var ts={},jh;function Sk(){if(jh)return ts;jh=1;var e=at();Object.defineProperty(ts,"__esModule",{value:!0}),ts.default=void 0;var t=e(ht()),r=ut();return ts.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"),ts}var Ck=Sk();const Rh=it(Ck),Ek=e=>{const t=["#A17B4B","#7B5BE4","#F9A825","#4A90E2","#5CC85C","#FDD835","#E53935","#B0BEC5"],r=e.charCodeAt(0)%t.length;return t[r]},Dk=(e,t)=>{if(t)return l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",color:"#1976D2"},children:[l.jsx(Rh,{sx:{fontSize:16,mr:.5}}),l.jsx(g.Typography,{variant:"caption",sx:{fontWeight:"bold"},children:"Anfitrión"})]});switch(e){case"PENDIENTE":return l.jsx(g.Typography,{variant:"caption",sx:{color:"#999",fontStyle:"italic",fontWeight:600},children:"Pendiente"});case"RECHAZADA":return l.jsx(g.Button,{variant:"outlined",size:"small",sx:{fontWeight:600,borderRadius:"8px",textTransform:"none",fontSize:"11px",px:1,py:0},children:"Reenviar"});case"CONFIRMADA":return l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",color:"#00A86B"},children:[l.jsx(Xf,{sx:{fontSize:16,mr:.5}}),l.jsx(g.Typography,{variant:"caption",sx:{fontWeight:600},children:"Asistiré"})]});default:return null}};function kk({open:e,handleClose:t,guests:r}){const n=r.filter(c=>c.estatus==="CONFIRMADA"||c.isHost),o=r.filter(c=>c.estatus==="PENDIENTE"&&!c.isHost),s=r.filter(c=>c.estatus==="RECHAZADA"&&!c.isHost),i=c=>l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",py:1},children:[l.jsxs(g.Box,{sx:{position:"relative",mr:2},children:[l.jsx(g.Avatar,{sx:{bgcolor:Ek(c.iniciales),width:32,height:32,fontSize:"12px",color:"#fff"},children:c.iniciales}),c.estatus==="PENDIENTE"&&l.jsx(g.Box,{sx:{position:"absolute",bottom:-2,right:-4,bgcolor:"#fff",borderRadius:"50%",display:"flex"},children:l.jsx(Tc,{sx:{fontSize:14,color:"#546E7A"}})})]}),l.jsx(g.Typography,{variant:"body2",sx:{flexGrow:1,fontWeight:500,color:"#333"},children:c.nombre}),Dk(c.estatus,c.isHost)]},c.nombre),a=({title:c,count:u,badgeColor:d})=>l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",mt:2,mb:1},children:[l.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:800,color:"#333",fontSize:"13px"},children:c}),d&&l.jsx(g.Box,{sx:{ml:1,bgcolor:d,color:"#fff",borderRadius:"50%",width:16,height:16,display:"flex",alignItems:"center",justifyContent:"center",fontSize:"10px"},children:u})]});return l.jsxs(g.Dialog,{open:e,onClose:t,fullWidth:!0,maxWidth:"xs",PaperProps:{sx:{border:"solid 0.1 px",height:"100%"}},children:[l.jsxs(g.Box,{sx:{p:"16px 8px"},children:[l.jsx(g.Typography,{variant:"subtitle1",sx:{fontWeight:800,ml:1},children:"Lista de invitados"}),l.jsx(g.Button,{onClick:t,startIcon:l.jsx("img",{src:wk,width:20}),sx:{textTransform:"none",color:"#666",fontSize:"16px",p:0,minWidth:0,ml:.5,"&:hover":{bgcolor:"transparent"}},children:"Volver al evento"}),l.jsx(g.IconButton,{onClick:t,sx:{position:"absolute",right:8,top:12},children:l.jsx(Ur,{})})]}),l.jsx(g.Divider,{}),l.jsxs(g.DialogContent,{sx:{p:2},children:[o.length>0&&l.jsxs(g.Box,{sx:{mb:3},children:[l.jsx(a,{title:"Invitados",count:o.length}),o.map(i)]}),n.length>0&&l.jsxs(l.Fragment,{children:[l.jsx(g.Divider,{sx:{my:1}}),l.jsxs(g.Box,{sx:{mb:3},children:[l.jsx(a,{title:"Confirmados",count:n.length,badgeColor:"#1976D2"}),n.map(i)]})]}),s.length>0&&l.jsxs(l.Fragment,{children:[l.jsx(g.Divider,{sx:{my:1}}),l.jsxs(g.Box,{children:[l.jsx(a,{title:"No asistirán",count:s.length,badgeColor:"#1976D2"}),s.map(i)]})]})]})]})}const Ak=e=>{const t=["#8D6E63","#9C27B0","#FF9800","#2196F3","#4CAF50","#FFEB3B","#F44336","#9E9E9E"],r=e.charCodeAt(0)%t.length;return t[r]};function Tk({guests:e}){const[t,r]=y.useState(!1),n=()=>r(!0),o=()=>r(!1);return l.jsxs(l.Fragment,{children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",py:1,borderBottom:"1px solid #eee",width:"100%"},children:[l.jsx(g.AvatarGroup,{max:6,sx:{"& .MuiAvatar-root":{width:32,height:32,fontSize:13,fontWeight:"bold",border:"2px solid #fff",marginLeft:"-8px !important"},"& .MuiBadge-root":{borderRadius:"50%"}},children:e.map((s,i)=>l.jsx(g.Tooltip,{title:s.nombre,arrow:!0,placement:"top",children:l.jsx(g.Box,{children:l.jsx(g.Badge,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},invisible:s.estatus!=="PENDIENTE",sx:{backgroundColor:"white"},badgeContent:l.jsx(g.Box,{sx:{bgcolor:"white",borderRadius:"50%",width:16,height:16,display:"flex",justifyContent:"center",border:"1px solid white",boxShadow:"none"},children:l.jsx("img",{src:ep})}),children:l.jsx(g.Avatar,{sx:{bgcolor:Ak(s.iniciales)},children:s.iniciales})})})},i))}),l.jsx(g.Box,{sx:{flexGrow:1}}),l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",cursor:"pointer",color:"#1976D2",transition:"opacity 0.2s","&:hover":{opacity:.7}},onClick:n,children:[l.jsx(g.Typography,{variant:"body2",sx:{fontWeight:"bold",fontSize:"14px"},children:"Ver invitados"}),l.jsx(_k,{sx:{fontSize:18,ml:.5}})]})]}),l.jsx(kk,{open:t,handleClose:o,guests:e})]})}var rs={},Nh;function Ik(){if(Nh)return rs;Nh=1;var e=at();Object.defineProperty(rs,"__esModule",{value:!0}),rs.default=void 0;var t=e(ht()),r=ut();return rs.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"),rs}var Mk=Ik();const $h=it(Mk),Pk=e=>new Date(e+"T00:00:00").toLocaleDateString("es-ES",{day:"numeric",month:"short"}).replace(".",""),Lh=e=>{const[t,r]=e.split(":"),n=parseInt(t),o=n>=12?"pm":"am";return`${n%12||12}:${r} ${o}`},zh=e=>e.split(":").slice(0,2).join(":"),Ok=({slot:e,onClick:t})=>l.jsxs(g.Box,{onClick:t,sx:{cursor:"pointer",borderRadius:"12px",overflow:"hidden",border:"1px solid #e0e0e0",textAlign:"center",transition:"0.2s",backgroundColor:"#fff","&:hover":{transform:"translateY(-3px)",boxShadow:"0px 4px 12px rgba(0,0,0,0.1)",borderColor:"#1976d2"}},children:[l.jsx(g.Box,{sx:{bgcolor:"#333",color:"white",py:.5},children:l.jsx(g.Typography,{variant:"caption",sx:{fontWeight:"bold",textTransform:"capitalize"},children:Pk(e.Fecha)})}),l.jsxs(g.Box,{sx:{py:1.5},children:[l.jsx(g.Typography,{sx:{fontSize:"14px",fontWeight:500},children:Lh(e.HoraInicio)}),l.jsxs(g.Typography,{sx:{fontSize:"12px",color:"text.secondary"},children:["a ",Lh(e.HoraFin)]})]})]});function jk({open:e,handleClose:t,suggestions:r,onSelectSlot:n}){const o=r.reduce((a,c)=>{const u=c.Fecha;return a[u]||(a[u]=[]),a[u].push(c),a},{}),s=Object.keys(o),i=a=>{const c={...a,HoraInicio:zh(a.HoraInicio),HoraFin:zh(a.HoraFin)};n(c),t()};return l.jsxs(g.Dialog,{open:e,onClose:t,fullWidth:!0,maxWidth:"sm",PaperProps:{sx:{borderRadius:"16px"}},children:[l.jsxs(g.Box,{sx:{p:2.5,display:"flex",flexDirection:"column",gap:.5},children:[l.jsx(g.Typography,{variant:"h6",sx:{fontWeight:800,fontSize:"1.1rem"},children:"Selecciona un nuevo horario"}),l.jsx(g.Box,{children:l.jsx(g.Button,{startIcon:l.jsx($h,{fontSize:"small"}),onClick:t,sx:{textTransform:"none",color:"text.secondary",p:0,fontSize:"0.85rem","&:hover":{backgroundColor:"transparent",color:"#000"}},children:"Volver al evento"})})]}),l.jsx(g.Divider,{}),l.jsx(g.DialogContent,{sx:{px:3,py:3,backgroundColor:"#f9f9f9"},children:s.length===0?l.jsx(g.Typography,{variant:"body2",color:"text.secondary",align:"center",children:"No hay horarios alternativos disponibles en este momento."}):s.map((a,c)=>l.jsxs(g.Box,{sx:{mb:3},children:[l.jsxs(g.Typography,{variant:"subtitle2",sx:{fontWeight:"bold",mb:2,display:"flex",alignItems:"center",color:c===0?"#1976d2":"text.primary",fontSize:"0.9rem"},children:[c===0?"Mismo día":"Próximas fechas",c===0&&l.jsx(Rh,{sx:{ml:1,fontSize:18}})]}),l.jsx(g.Grid,{container:!0,spacing:2,children:o[a].map((u,d)=>l.jsx(g.Grid,{item:!0,xs:6,sm:4,children:l.jsx(Ok,{slot:u,onClick:()=>i(u)})},`${a}-${d}`))})]},a))})]})}const Rk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAIVBMVEVHcExAR1ZAR1NARlVAR1VARlVAR1VARlVARlRARlRAR1ZiwDFVAAAACnRSTlMA5BvHaqI5kH9QLGWfKwAAAQlJREFUeNrd1luqwzAMBNDRw7I7+1/whd4mFa6tBPrX82uJGYMJwc+JLqQ1xU2dLx23NB5EgWjPtAe2Rp4Py8tLmuddeBK/KuRQMgusvDsAwkPRKgU4J14uBIwTw4K8G/GDFncQ6L0FrxYCn1TKhIU4D4UTwZIf8Z2ThjW1/9OoG2XqvTvmiI5LxsRwTRtPTbER3eTJHOcDN8fGkNxagfAxPLChxkyaohTCxEJRU2EeBxDe21NftsrzDuiQup+nwzivn41tQECNC5ZDHrmPCpdEVx+YluaLDONB0bnVcZAUwELgJQUYCzZXMihLOr0Lh7PkmBlLbbFQEsx44fsFY8kwU2PB9Ef+Lv4AL2kmcGZOH2MAAAAASUVORK5CYII=",Nk=e=>{const t=["brown","purple","orange","blue","green","yellow","red","grey"],r=e.charCodeAt(0)%t.length;return t[r]};function $k({onSelectGuest:e,availableSuggestions:t,onInputTextChange:r}){const[n,o]=y.useState(null),[s,i]=y.useState(""),a=(u,d)=>{d?(e(d),o(null),i("")):(o(null),i(""))},c=(u,d)=>{i(d),r(d)};return l.jsx(g.Autocomplete,{options:t,value:n,inputValue:s,getOptionLabel:u=>u.correo,onChange:a,onInputChange:c,isOptionEqualToValue:(u,d)=>u.correo===d.correo,disablePortal:!0,noOptionsText:"Sin resultados",renderInput:u=>l.jsx(g.TextField,{...u,placeholder:"Agregar invitados...",variant:"outlined",size:"small",InputProps:{...u.InputProps,startAdornment:l.jsx(g.Box,{sx:{ml:1,display:"flex",alignItems:"center"},children:l.jsx("img",{src:Rk,color:"action",width:20})}),disableUnderline:!0}}),renderOption:(u,d)=>y.createElement(g.Box,{component:"li",...u,key:d.correo,sx:{py:1,"& > img":{mr:2,flexShrink:0}}},l.jsx(g.Avatar,{sx:{bgcolor:Nk(d.iniciales),mr:2,width:32,height:32,fontSize:14},children:d.iniciales}),l.jsx(g.Typography,{children:d.nombre}))},"guest-autocomplete-field")}var ns={},Bh;function Lk(){if(Bh)return ns;Bh=1;var e=at();Object.defineProperty(ns,"__esModule",{value:!0}),ns.default=void 0;var t=e(ht()),r=ut();return ns.default=(0,t.default)((0,r.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline"),ns}var zk=Lk();const Bk=it(zk);var os={},Fh;function Fk(){if(Fh)return os;Fh=1;var e=at();Object.defineProperty(os,"__esModule",{value:!0}),os.default=void 0;var t=e(ht()),r=ut();return os.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"),os}var Wk=Fk();const Jc=it(Wk),Uk=e=>e.tieneConflicto?{icon:l.jsx(Jc,{sx:{fontSize:18,color:"#d32f2f"}}),fillColor:"#FFF5F5",iconColor:"#d32f2f",textColor:"#333333",variant:"filled"}:{icon:l.jsx(Bk,{sx:{fontSize:20,color:"#1a73e8"}}),fillColor:"#eaedf2",iconColor:"#1a73e8",textColor:"#000000",variant:"filled"},Hk=e=>{const t=["#8D6E63","#9C27B0","#FF9800","#2196F3","#4CAF50","#FDD835","#F44336","#9E9E9E"],r=e.charCodeAt(0)%t.length;return t[r]};function Vk({guests:e,conflictCount:t,onViewSuggestions:r,onDeleteGuest:n}){const o=i=>a=>{a.stopPropagation(),n(i)},s=i=>i?i.trim().split(/\s+/).slice(0,2).join(" "):"";return l.jsxs(g.Box,{sx:{p:1},children:[l.jsx(g.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:e.map((i,a)=>{const c=Uk(i),u=Hk(i.iniciales);return l.jsx(g.Chip,{label:l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",width:"100%"},children:[l.jsx(g.Typography,{variant:"body2",sx:{color:c.textColor,ml:.5,mr:1,fontSize:"13px",fontWeight:400},children:s(i?.nombre)}),l.jsx(g.Box,{className:"status-icon-wrapper",sx:{display:"flex",alignItems:"center",ml:"auto",margin:"5px"},children:c.icon})]}),avatar:l.jsx(g.Avatar,{sx:{bgcolor:u,width:24,height:24,fontSize:"10px",fontWeight:"bold",color:"#ffffff !important",ml:"4px !important"},children:i.iniciales}),sx:{backgroundColor:c.fillColor,height:"32px",borderRadius:"100px",border:"1px solid rgba(0,0,0,0.04)",transition:"all 0.2s ease-in-out",cursor:"pointer","&:hover":{backgroundColor:c.fillColor,filter:"brightness(0.97)","& .status-icon-wrapper":{display:"none"},"& .MuiChip-deleteIcon":{display:"inline-block"}},"& .MuiChip-label":{paddingLeft:"4px",paddingRight:"8px",width:"100%",display:"flex"},"& .MuiChip-deleteIcon":{display:"none",fontSize:"18px",color:"#000000",ml:"auto",mr:"4px","&:hover":{color:"#000000"}}},onClick:()=>console.log(`Ver perfil de ${i.nombre}`),onDelete:o(i.nombre)},a)})}),t>0&&l.jsxs(g.Box,{sx:{mt:2,display:"flex",flexDirection:"column",gap:.5},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",color:"#E53935"},children:[l.jsx(Jc,{sx:{mr:1,fontSize:22}}),l.jsxs(g.Typography,{sx:{fontSize:"15px",fontWeight:500,color:"#E53935"},children:["Se detectó un conflicto de agenda con ",l.jsxs("strong",{children:[t," invitado"]}),t!==1?"s":""]})]}),l.jsx(g.Link,{component:"button",type:"button",variant:"body2",onClick:i=>{i.preventDefault(),i.stopPropagation(),r()},sx:{ml:4,textAlign:"left",textDecoration:"underline",fontWeight:700,fontSize:"15px",color:"#1976D2",border:"none",background:"none",padding:0,cursor:"pointer","&:hover":{color:"#1565C0"}},children:"Ver sugerencias de horario"})]})]})}function Yk(e,t){const[r,n]=y.useState(e);return y.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"},Wh=["#dbe3fe","#fcebc7","#d9f1d2","#fdf5d1","#ebe3d7","#e1d6fb","#f7c7cc","#f9e7fb","#eaedf2","#d5d8dd"],Zk=()=>{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},Uh=[],eo=Zk(),ss=(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),u=new Date(s,o,n,a,c);return isNaN(u.getTime())||!x.isValid(u)?null:u},Gk=({isVisible:e,onClose:t,onSave:r,onDelete:n,selectedDate:o,initialEvent:s,userId:i,masNombreBD:a,disId:c})=>{const[u,d]=y.useState(!1),[f,h]=y.useState(!1),v=x.format(new Date,"yyyy-MM-dd"),[m,p]=y.useState(""),[b,w]=y.useState([]),[C,E]=y.useState(!1),S=Ac(),[_,W]=y.useState([]),[D,A]=y.useState(""),[M,I]=y.useState(Uh),[V,G]=y.useState(!1),[F,Y]=y.useState(""),[oe,U]=y.useState(!1),[N,ce]=y.useState([]),[fe,$]=y.useState([]),Q=Yk(F,300),Ce=M.filter(q=>q.tieneConflicto).length,{control:me,handleSubmit:we,reset:ae,formState:{errors:ee,isValid:le},watch:ge,setValue:ie}=Tp({resolver:qE(ck),defaultValues:{titulo:s?.titulo||"",fechaInicio:x.format(new Date,"yyyy-MM-dd"),horaInicio:x.format(new Date,"HH:mm"),horaFin:x.format(x.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"}),pe=ge("fechaInicio"),Re=ge("fechaFin"),j=ge("todoElDia");y.useEffect(()=>{if(m.trim()===""||!i||!c||!a){w([]),W([]),ie("solID",null),E(!1),A("");return}E(!0);const q=setTimeout(()=>{S.getClients(m,c,a,i).then(de=>{if(E(!1),de){const Ae=de.map(Fe=>Fe.solID);W([...new Set(Ae)])}else W([]);const Ee=Array.from(new Map(de.map(Ae=>[Ae.nombreCliente,Ae])).values());if(Ee.length>0)w(Ee),A("");else if(s?.client&&s.solID!==null){const Ae=[{solID:s.solID,nombreCliente:s.client}];w(Ae),A("Sin resultados")}else w([]),A("Sin resultados")}).catch(de=>{console.error("Error al buscar clientes:",de),E(!1)})},500);return()=>clearTimeout(q)},[m,i,c,a]),y.useEffect(()=>{if(pe&&Re){const q=new Date(pe),de=new Date(Re);(q===de||q>de)&&ie("fechaFin",pe)}},[pe,Re,ie]),y.useEffect(()=>{pe&&ie("fechaFin",pe)},[pe]),y.useEffect(()=>{ie("showEndDate",u)},[u,ie]),y.useEffect(()=>{if(s){const q=x.format(s.fechaInicio,"yyyy-MM-dd")===x.format(s.fechaFin,"yyyy-MM-dd");if(d(!q),ie("titulo",s?.titulo),ie("fechaInicio",x.format(s.fechaInicio,"yyyy-MM-dd")),ie("fechaFin",x.format(s.fechaFin,"yyyy-MM-dd")),ie("horaInicio",x.format(s.fechaInicio,"HH:mm")),ie("horaFin",x.format(s.fechaFin,"HH:mm")),ie("horaInicio2",x.format(s.fechaFin,"HH:mm")),ie("descripcion",s.descripcion),ie("link",s.link),ie("repetir","false"),ie("color",s.color),ie("todoElDia",s.todoElDia),ie("solID",s.solID),ie("client",s.client),s.invitados&&s.invitados.length>0){const de=(s?.invitados||[]).map(Ee=>{const Ae=Ee.usrNombre?.trim()||"",Fe=Ae.split(/\s+/),X=Fe.length>1?(Fe[0][0]+Fe[1][0]).toUpperCase():Ae.substring(0,2).toUpperCase();return{nombre:Ee.usrNombre||"Sin nombre",correo:Ee.correo||"",iniciales:X||"--",usrID:Ee.usuarioID??null,isHost:Ee.esOrganizador||!1,estatus:Ee.statusInvitacion,tieneConflicto:!1,disID:Ee.disID}});I(de)}else I(Uh);s.solID?h(!0):h(!1)}else{const q=o||new Date,de=new Date,Ee=new Date(q.getFullYear(),q.getMonth(),q.getDate(),de.getHours(),de.getMinutes()),Ae=x.addHours(Ee,1);ae({titulo:"",fechaInicio:x.format(Ee,"yyyy-MM-dd"),horaInicio:x.format(Ee,"HH:mm"),fechaFin:x.format(Ae,"yyyy-MM-dd"),horaFin:x.format(Ae,"HH:mm"),horaInicio2:x.format(Ae,"HH:mm"),todoElDia:!1,client:"",repetir:"No repetir",link:"",descripcion:"",color:Wh[0],solID:null}),d(!1),h(!1)}},[s,e,o]);const We=q=>({UsuarioID:q.usrID??null,Correo:q.correo,EsOrganizador:q.usrID==i,StatusInvitacion:"PENDIENTE",disID:c??null}),qe=we(q=>{const de=M.map(Ae=>We(Ae)),Ee={...q,invitados:de};r(Ee,s?.eventoID),t(),ae(),d(!1)},q=>{console.log("Errores de validación:",q)});y.useEffect(()=>{j&&(ie("horaInicio","00:00"),ie("horaFin","23:59"))},[j,ie,ge]);const Ze=()=>{const q=ge("fechaInicio");if(q){const de=new Date(`${q}T00:00:00`),Ee=x.addDays(de,1);ie("fechaFin",x.format(Ee,"yyyy-MM-dd"))}d(!0)},Ne=ge("fechaInicio"),Be=ge("horaInicio"),vt=ge("fechaFin"),pt=ge("horaFin"),[k,P]=y.useState(null),[B,ue]=y.useState(null);y.useEffect(()=>{(k===null||k!==Be)&&P(Be)},[Be,k]),y.useEffect(()=>{(B===null||B!==pt)&&ue(pt??"")},[pt,B]);const se=ge("todoElDia");y.useEffect(()=>{if(se||!Be||!pt||!Ne||!vt)return;const q=ss(Ne,Be),de=ss(vt,pt);if(!q||!de||!x.isValid(q)||!x.isValid(de))return;const Ee=x.isSameDay(q,de),Ae=Ee&&(x.isAfter(q,de)||q.getTime()===de.getTime()),Fe=x.isBefore(de,q)&&!Ee;(Ae||Fe)&&(ie("horaFin",""),ue(""))},[Be,Ne]);const O=y.useMemo(()=>{if(!Be||!Ne)return eo;const q=ss(Ne,Be),de=ss(vt,"00:00");return!q||!de||!x.isValid(q)||!x.isValid(de)||x.isBefore(de,q)&&!x.isSameDay(de,q)?eo:x.isSameDay(q,de)?eo.filter(Ee=>{const Ae=ss(vt,Ee);return Ae&&x.isAfter(Ae,q)}):(x.isAfter(de,q),eo)},[Be,Ne,vt]),ne=y.useMemo(()=>eo,[]),Se=async q=>{const de=M.some(Yt=>Yt.correo===q.correo);if(U(!0),de)return;const Ee=c,Ae=q.correo,Fe=q.usrID,X=Ne,Me=Be,ke=pt;if(!Ee||!Ae||!X||!Me||!ke){I(Yt=>[...Yt,{...q,status:"pending",isHost:!1,hasConflict:!1,usrID:Fe,name:q.nombre}]);return}let je;try{je=await S.VerificarConflicto(Ee,Ae,X,Me+":00",ke+":00")}catch{je={tieneConflicto:!1,usrMail:q.correo}}const Gt=Array.isArray(je)?je[0]:je,er={...q,estatus:"PENDIENTE",isHost:!1,tieneConflicto:String(Gt.tieneConflicto).toLowerCase()==="true"};if(er.tieneConflicto){const Yt=await S.getDisponibilidadUsuario(c,Ae,X,"60");ce(Yt)}I(Yt=>[...Yt,er])},Oe=q=>{I(de=>de.filter(Ee=>Ee.nombre!==q))},R=()=>{G(!1)},te=q=>{const Ae=(q.usrNombre??"").split(" ").map(Fe=>Fe.charAt(0)).join("").toUpperCase().substring(0,2);return{nombre:q.usrNombre??"",correo:q.usrMail??"",iniciales:Ae,usrID:q.usrID??0,estatus:"PENDIENTE",tieneConflicto:!1,isHost:!1}};y.useEffect(()=>{Q.length>2&&c?(async()=>{const Ee=(await S.getUsuariosInvitados(c,Q)).map(te).filter(Ae=>Ae.usrID!==i&&!M.some(Fe=>Fe.correo===Ae.correo));$(Ee)})():$([])},[Q,M]);const _e=q=>{Y(q)},Ge=q=>{const{Fecha:de,HoraInicio:Ee,HoraFin:Ae}=q,Fe=X=>X.split(":").slice(0,2).join(":");ie("fechaInicio",de),ie("fechaFin",de),ie("horaInicio",Fe(Ee)),ie("horaFin",Fe(Ae)),d(!1),R(),console.log("Formulario actualizado con sugerencia:",{Fecha:de,HoraInicio:Ee,HoraFin:Ae})};return l.jsx(l.Fragment,{children:l.jsx(g.Modal,{open:e,onClose:t,children:l.jsx("form",{onSubmit:qe,children:l.jsxs(g.Box,{sx:qk,children:[l.jsx(g.IconButton,{"aria-label":"close",onClick:t,sx:{position:"absolute",right:8,top:12},children:l.jsx(Ur,{})}),l.jsx(g.Typography,{variant:"h6",mb:2,children:s?.isGoogleEvent||s?.isOutlookEvent?l.jsxs(l.Fragment,{children:[l.jsx(yk,{sx:{mr:1}}),s.titulo||"Evento de Google"]}):s?"Editar evento":"Agregar evento"}),l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsx(hr,{name:"titulo",control:me,render:({field:q})=>l.jsx(g.TextField,{...q,label:"Título",fullWidth:!0,variant:"outlined",size:"small",error:!!ee.titulo,helperText:ee.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"}}})})})}),l.jsxs("div",{className:`row g-2 ${u?"mb-1":"mb-2"}`,children:[l.jsx("div",{className:"col-12 col-md-4",children:l.jsx(hr,{name:"fechaInicio",control:me,render:({field:q})=>l.jsx(g.TextField,{fullWidth:!0,...q,type:"date",placeholder:"Fecha de inicio",size:"small",InputLabelProps:{shrink:!0},error:!!ee.fechaInicio,helperText:ee.fechaInicio?.message})})}),u?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"col-md-3 d-none d-md-block"}),l.jsx("div",{className:"col-10 col-md-4",children:l.jsx(hr,{name:"fechaFin",control:me,render:({field:q})=>l.jsx(g.TextField,{...q,type:"date",placeholder:"Fecha de fin",fullWidth:!0,size:"small",InputLabelProps:{shrink:!0},inputProps:{min:pe||v},error:!!ee.fechaFin,helperText:ee.fechaFin?.message})})}),!s&&l.jsx("div",{className:"col-2 col-md-1 d-flex align-items-start",children:l.jsx(g.IconButton,{onClick:()=>d(!1),sx:{fontSize:18},children:l.jsx(Ah,{})})})]}):l.jsx("div",{className:"col-md-8"})]}),u&&l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12 d-flex justify-content-center",children:l.jsx(Mh,{sx:{color:"#757575",my:1}})})}),l.jsxs("div",{className:"row g-2 mb-2",children:[l.jsx("div",{className:"col-12 col-md-4",children:l.jsx(hr,{name:"horaInicio",control:me,render:({field:{onChange:q,value:de,...Ee}})=>l.jsx(g.Autocomplete,{freeSolo:!0,options:ne,value:de||"",onChange:(Ae,Fe)=>q(Fe||""),onInputChange:(Ae,Fe)=>q(Fe),renderInput:Ae=>l.jsx(g.TextField,{...Ae,...Ee,size:"small",error:!!ee.horaInicio,helperText:ee.horaInicio?.message,InputProps:{...Ae.InputProps,endAdornment:l.jsx(g.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:l.jsx(Tc,{})})}}),disabled:se})})}),!u&&l.jsx("div",{className:"col-1 d-flex align-items-center justify-content-center",style:{marginTop:ee.horaInicio?"5px":"0px"},children:l.jsx(Mh,{sx:{color:"#757575"}})}),u&&l.jsx("div",{className:"col-md-3 d-none d-md-block"}),l.jsx("div",{className:"col-12 col-md-4",children:l.jsx(hr,{name:"horaFin",control:me,render:({field:{onChange:q,value:de,...Ee}})=>l.jsx(g.Autocomplete,{freeSolo:!0,options:O,value:de||"",onChange:(Ae,Fe)=>q(Fe||""),onInputChange:(Ae,Fe)=>q(Fe),renderInput:Ae=>l.jsx(g.TextField,{...Ae,...Ee,size:"small",error:!!ee.horaFin,helperText:ee.horaFin?.message,InputProps:{...Ae.InputProps,endAdornment:l.jsx(g.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:l.jsx(Tc,{})})}}),disabled:se})})}),!u&&l.jsx("div",{className:"col-12 col-md-2 d-flex align-items-center",children:l.jsx(hr,{name:"todoElDia",control:me,render:({field:q})=>l.jsx(g.FormControlLabel,{control:l.jsx(g.Checkbox,{checked:q.value,onChange:de=>q.onChange(de.target.checked)}),label:l.jsx("label",{style:{fontSize:"0.7rem",fontWeight:"normal"},children:"Todo el día"}),sx:{whiteSpace:"nowrap"}})})})]}),(!s?.isGoogleEvent||s?.isOutlookEvent)&&!u&&l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsxs(g.Button,{onClick:Ze,size:"small",sx:{textTransform:"none",fontSize:16},children:[l.jsx(dk,{})," Agregar fecha final"]})})}),(!s?.isGoogleEvent||s?.isOutlookEvent)&&l.jsx("div",{className:"row mb-2",children:l.jsxs("div",{className:"col-12",children:[!f&&l.jsxs(g.Button,{onClick:()=>h(!0),size:"small",sx:{textTransform:"none",fontSize:16},children:[l.jsx(pk,{})," Vincular cliente"]}),f&&l.jsxs("div",{className:"row g-2",children:[l.jsx("div",{className:"col-10 col-md-5",children:l.jsx(hr,{name:"client",control:me,render:({field:q})=>l.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:D,onInputChange:(de,Ee)=>{p(Ee)},onChange:(de,Ee)=>{q.onChange(Ee?Ee.nombreCliente:"")},renderInput:de=>l.jsx(g.TextField,{...de,placeholder:"Buscar cliente...",size:"small",InputProps:{...de.InputProps,startAdornment:l.jsx("img",{src:Jd,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"5px"}}),endAdornment:l.jsxs(l.Fragment,{children:[C?l.jsx(g.CircularProgress,{color:"inherit",size:20}):null,de.InputProps.endAdornment]})}})})})}),l.jsx("div",{className:"col-10 col-md-5",children:l.jsx(hr,{name:"solID",control:me,render:({field:q})=>l.jsx(g.Autocomplete,{options:_,noOptionsText:"Sin resultados",getOptionLabel:de=>de.toString(),value:q.value??null,onChange:(de,Ee)=>q.onChange(Ee),renderInput:de=>l.jsx(g.TextField,{...de,label:"#Registro",variant:"outlined",size:"small",sx:{"& .MuiInputLabel-root":{backgroundColor:"transparent !important",padding:"0 !important"}}}),disabled:!b.length})})}),l.jsx("div",{className:"col-2 d-flex align-items-center",children:l.jsx(g.IconButton,{onClick:()=>h(!1),sx:{fontSize:18},children:l.jsx(Ah,{})})})]})]})}),l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsx(hr,{name:"link",control:me,render:({field:q})=>l.jsx(g.TextField,{...q,placeholder:" Agregar enlace de reunión",fullWidth:!0,variant:"outlined",size:"small",error:!!ee.link,helperText:ee.link?.message,InputProps:{startAdornment:l.jsx("img",{src:lk,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"8px"}})}})})})}),l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsx(hr,{name:"descripcion",control:me,render:({field:q})=>l.jsx(g.TextField,{...q,placeholder:" Agregar descripción aquí...",fullWidth:!0,multiline:!0,rows:3,inputProps:{maxLength:500},variant:"outlined",size:"small",InputProps:{startAdornment:l.jsx("img",{src:fk,width:20,style:{alignSelf:"flex-start",marginRight:"8px"}})}})})})}),l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsx($k,{onSelectGuest:Se,availableSuggestions:fe,onInputTextChange:_e})})}),oe&&l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsx(Vk,{guests:M,conflictCount:Ce,onViewSuggestions:()=>G(!0),onDeleteGuest:Oe})})}),s?.invitados&&s?.invitados?.length>0&&l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsx(g.Box,{children:l.jsx(Tk,{guests:M})})})}),l.jsx(jk,{open:V,handleClose:R,suggestions:N,onSelectSlot:Ge}),l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexWrap:"wrap"},children:[l.jsx(uk,{}),Wh.map(q=>l.jsx(hr,{name:"color",control:me,render:({field:de})=>l.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))]})})}),l.jsx("div",{className:"row",children:l.jsxs("div",{className:"col-12 d-flex gap-2",style:{width:"100%",marginTop:"20px"},children:[s&&!s?.isGoogleEvent&&!s?.isOutlookEvent&&l.jsx(g.Button,{onClick:n,variant:"outlined",startIcon:l.jsx("img",{src:Th,width:15}),sx:{flex:1,textTransform:"none",backgroundColor:"#FFF5F5",color:"#d32f2f",borderColor:"red",borderRadius:"8px",fontWeight:700,fontSize:"14px",padding:"8px 0","&:hover":{backgroundColor:"#FEE2E2",borderColor:"red"}},children:"Eliminar"}),l.jsx(g.Button,{onClick:t,variant:"outlined",sx:{flex:1,textTransform:"none",fontWeight:700,fontSize:"14px",borderRadius:"8px",color:"#1976D2",borderColor:"#1976D2","&:hover":{backgroundColor:"rgba(25, 118, 210, 0.04)",borderColor:"#115293"}},children:"Cancelar"}),l.jsx(g.Button,{onClick:qe,variant:"contained",disabled:!le,sx:{flex:1,textTransform:"none",fontWeight:700,fontSize:"14px",borderRadius:"8px",backgroundColor:"#1976D2",boxShadow:"none","&:hover":{backgroundColor:"#115293",boxShadow:"0px 2px 4px rgba(0,0,0,0.2)"}},children:"Guardar"})]})})]})})})})},Kk={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"},Qk=({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 l.jsx(g.Modal,{open:e,onClose:t,children:l.jsxs(g.Box,{sx:Kk,children:[l.jsxs(g.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1},children:[l.jsxs(g.Typography,{sx:{fontSize:"18px",fontWeight:"bold"},component:"h2",children:["Eventos del"," ",n.toLocaleDateString("es-ES",{weekday:"long",day:"numeric",month:"long"})]}),l.jsx(g.IconButton,{onClick:t,size:"small",children:l.jsx(Ur,{})})]}),l.jsx(g.Divider,{}),l.jsx(g.List,{sx:{mt:1},children:r.map(a=>{const c=i(a);return l.jsx(g.ListItem,{disablePadding:!0,sx:{mb:1},children:l.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:l.jsxs(g.Box,{sx:{flexGrow:1},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1,mb:.5},children:[l.jsx(g.Typography,{sx:{fontSize:"10px",fontWeight:"bold",px:.5,borderRadius:"3px",backgroundColor:c?.borderColor,color:"white",textTransform:"uppercase"},children:c?.label}),l.jsx(g.Typography,{sx:{fontSize:"14px",fontWeight:600,lineHeight:1.2,color:"#333"},children:a.titulo})]}),l.jsx(g.Typography,{sx:{fontSize:"12px",color:"#666"},children:a.todoElDia?"Todo el día":`${x.format(a.fechaInicio,"HH:mm")} - ${x.format(a.fechaFin,"HH:mm")}`})]})})},a.eventoID)})})]})})};var is={},Hh;function Xk(){if(Hh)return is;Hh=1;var e=at();Object.defineProperty(is,"__esModule",{value:!0}),is.default=void 0;var t=e(ht()),r=ut();return is.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"),is}var Jk=Xk();const e3=it(Jk);var as={},Vh;function t3(){if(Vh)return as;Vh=1;var e=at();Object.defineProperty(as,"__esModule",{value:!0}),as.default=void 0;var t=e(ht()),r=ut();return as.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"),as}var r3=t3();const n3=it(r3),o3="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",s3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAALVBMVEVHcEzfEBfjCxzkChvkChvkChzkCxvlChv////96uv60dT1o6ryho/mGyvkCxypwAsrAAAACHRSTlMAECtdiKDJ5DEbuTIAAAHoSURBVHjatdlbjsMgDAVQ87JJKHf/y51pf9CIp+vJ/SzSkUloAZc2cSEkFgEAYU7RO/o+zkdBF07hO9QnwSzJq4uLgmUkGDgzGTrORHrGcZLXlmcvMkKZaJxuH/YLTwB9ZCo6AUyivb4m7uuziwxDeLtezKsnwJiwfCH2x5hgDi8mbJ+0APaI6wo0Ju4KrIBqQNyqwFqufL3qYOD1O1DqqkQZeVd+567dwJ3fuUai0Cceg5Scm9h5v3lhED9fgzk3ceTlC4Ok+YxzLzbvk+lrCRjl6sTmzSuEn80Yr9yJzZs+Q6Tp72C9/4jdRwXDCJEDTsQzD3DkcSaeeQgUcSZuvAYmnIlnHhIxVqLWAxNjKSo9CAl0YsEGBFRiwSYEhdh5dvCuBrB5GlH3UvaikOw8ncjbha0UeffV04qJwplX7jMxUjjzUM9ET+7Mw6HoiOTIOxR5ehYunXe8SfndNlpwvo2G2XWidl4nYhQ3PYpczVMfRfxqoy9QHZbWx7nm9eK9OM5RnB84h8VPTqJA6G55toj5WtYX+K8lypMXH2KYkx64PD55vbVfwJ9pEZgfo70tYm/c2FtLds/eTHu23WdvSG7jk2a6zzV17aRER4oEUXDm1r0kT18lJB5o5n8sErN8JOEUtv9U/ACrTv/qOzhclQAAAABJRU5ErkJggg==",el=y.forwardRef(({id:e,message:t,variant:r},n)=>{const{closeSnackbar:o}=xs.useSnackbar(),s={success:{color:"#fff",icon:l.jsx("img",{width:25,src:o3,style:{borderRadius:"50%",backgroundColor:"#4caf50",color:"white",fontSize:"12px",padding:3}})},error:{color:"#f44336",icon:l.jsx(e3,{sx:{color:"#f44336"}})},info:{color:"#2196f3",icon:l.jsx(n3,{sx:{color:"#2196f3"}})},delete:{color:"#fff",icon:l.jsx("img",{src:Th,width:25,style:{borderRadius:"50%",backgroundColor:"#ffdfd4",color:"red",fontSize:"16px",padding:3}})},rechazar:{color:"#fff",icon:l.jsx("img",{src:s3,width:30,style:{borderRadius:"50%",color:"red",fontSize:"16px",padding:3}})}},i=s[r]||s.info;return l.jsx(xs.SnackbarContent,{ref:n,children:l.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:[l.jsx(g.Box,{sx:{mr:1.5},children:i.icon}),l.jsx(g.Typography,{variant:"body2",sx:{flexGrow:1},children:t}),l.jsx(g.IconButton,{size:"small",onClick:()=>o(e),children:l.jsx(Ur,{fontSize:"small"})})]})})}),Yh=y.createContext(void 0),i3=({children:e})=>{const[t,r]=y.useState([]),[n,o]=y.useState([]),[s,i]=y.useState(!1);return l.jsx(Yh.Provider,{value:{googleEvents:t,setGoogleEvents:r,outlookEvents:n,setOutlookEvents:o,isLoadingGoogleEvents:s,setIsLoadingGoogleEvents:i},children:e})},a3=()=>{const e=y.useContext(Yh);if(e===void 0)throw new Error("useEvents must be used within an EventsProvider");return e},c3=(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(l3(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 l3(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 u3(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 d3=(e,t,r)=>{const n=new Date(e.start.dateTime);let o=new Date(e.end.dateTime);return e.isAllDay&&o.setDate(o.getDate()-1),{eventoID:Math.abs(u3(e.id)),titulo:e?.summary||"(Sin título)",descripcion:e.body?.content||"",fechaInicio:n,fechaFin:o,todoElDia:e.isAllDay,color:"#0078D4",hasVideoCall:!!e.onlineMeetingUrl,link:e.webLink,repetir:void 0,solID:null,disID:t,client:null,usrID:r,solicitudRelacionada:[],isGoogleEvent:!1,isOutlookEvent:!0}},qh="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",f3="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23fff'%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",p3=({open:e,onClose:t,onConfirm:r,title:n,description:o,icon:s,confirmText:i,confirmColor:a="#d32f2f",loading:c=!1})=>l.jsxs(g.Dialog,{open:e,onClose:t,PaperProps:{sx:{borderRadius:"15px",p:1,maxWidth:"400px"}},children:[l.jsx(g.Box,{sx:{display:"flex",justifyContent:"flex-end"},children:l.jsx(g.IconButton,{onClick:t,size:"small",children:l.jsx(Ur,{fontSize:"small"})})}),l.jsxs(g.DialogContent,{sx:{textAlign:"center",pt:0},children:[l.jsx(g.Box,{sx:{mb:2,display:"flex",justifyContent:"center"},children:s}),l.jsx(g.Typography,{variant:"h6",sx:{fontWeight:"bold",mb:2},children:n}),l.jsx(g.Typography,{variant:"body2",sx:{color:"#555",mb:4,px:2},children:o}),l.jsxs(g.Box,{sx:{display:"flex",gap:2,justifyContent:"center",mb:2},children:[l.jsx(g.Button,{variant:"outlined",onClick:t,sx:{textTransform:"none",borderRadius:"8px",px:4,borderColor:"#1976D2",color:"#1976D2"},children:"Regresar"}),l.jsxs(g.Button,{variant:"contained",onClick:r,disabled:c,sx:{textTransform:"none",borderRadius:"8px",px:4,bgcolor:a,"&:hover":{bgcolor:"#b71c1c"}},children:[i=="Eliminar"&&l.jsx("img",{src:f3,width:15,style:{marginRight:6,marginBottom:2}}),c?"Procesando...":i]})]})]})]}),h3=({userId:e,leads30Days:t,leads90Days:r,disId:n,masNombreBD:o})=>{const[s,i]=y.useState(new Date),[a,c]=y.useState([]),[u,d]=y.useState(!1),[f,h]=y.useState(null),[v,m]=y.useState(!1),[p,b]=y.useState(null),[w,C]=y.useState([]),{enqueueSnackbar:E}=xs.useSnackbar(),S=Ac(),_=Ii(),W=wc(),[D,A]=y.useState(!1),[M,I]=y.useState([]),[V,G]=y.useState(null),{session:F,sessionoutlook:Y}=cc(),{googleEvents:oe,setGoogleEvents:U,outlookEvents:N,setOutlookEvents:ce}=a3(),[fe,$]=y.useState([]),[Q,Ce]=y.useState([]),[me,we]=y.useState([]),[ae,ee]=y.useState(!1),[le,ge]=y.useState([]),[ie,pe]=y.useState(),Re=(X,Me)=>{I(X),G(Me),A(!0)},j=async()=>{if(e===void 0)return;const X=await S.getNotificacionesXUsuario(e,!1);ge(X)};y.useEffect(()=>{const X=new Date,Me=x.startOfDay(X),ke=x.endOfDay(x.addDays(Me,6)),je={start:Me,end:ke},Gt=a.filter(er=>{const Yt={start:er.fechaInicio,end:er.fechaFin};return Ud(Yt,je)}).sort((er,Yt)=>er.fechaInicio.getTime()-Yt.fechaInicio.getTime());C(Gt)},[a]),y.useEffect(()=>{const X=async()=>{try{if(e){const ke=await S.getEventsByUser(e);j(),c(ke)}}catch(ke){console.log("Error al cargar eventos locales:",ke)}};X();const Me=setInterval(X,4e3);return()=>clearInterval(Me)},[e]),y.useEffect(()=>{if(!n||!e)return;const X=[...a];if(oe.length>0&&F?.userEmail){const Me=oe.map(ke=>c3(ke,n,e));X.push(...Me)}if(N.length>0&&Y?.userEmail){const Me=N.map(ke=>d3(ke,n,e));X.push(...Me)}$(X)},[a,oe,N,n,e,F?.userEmail,Y?.userEmail]);const We=async X=>{try{if(X?.isGoogleEvent||X.isOutlookEvent)h(X),d(!0);else{const Me=await S.getEventById(X.eventoID);h(Me),d(!0)}}catch(Me){console.error(Me)}},qe=()=>{d(!1),h(null)},Ze=async(X,Me)=>{let ke,je;X.todoElDia?(ke=new Date(`${X.fechaInicio}T${X.horaInicio}`),je=new Date(`${X.fechaInicio}T${X.horaFin}`)):(ke=new Date(`${X.fechaInicio}T${X.horaInicio}`),je=X.fechaFin&&X.horaFin?new Date(`${X.fechaFin}T${X.horaFin}`):new Date(`${X.fechaInicio}T${X.horaFin}`));const Gt=x.format(ke,"yyyy-MM-dd HH:mm:ss.SSS"),er=x.format(je,"yyyy-MM-dd HH:mm:ss.SSS");if(Me){const Vr={...X,eventoID:Me,fechaInicio:Gt,fechaFin:er,solID:X.solID??null,disID:n??null,client:X.client,invitados:X.invitados.map(Ke=>({usrNombre:Ke.nombre||Ke.usrNombre,Correo:Ke.correo||Ke.Correo,EsOrganizador:Ke.isHost||Ke.EsOrganizador,StatusInvitacion:Ke.StatusInvitacion,UsuarioID:Ke.usrID||Ke.UsuarioID,disID:Ke.disID||n}))};try{const Ke=await S.updateEvent(Vr);var Yt=a.map(wr=>wr.eventoID===Ke.eventoID?Ke:wr);c(Yt),E("El evento se ha actualizado correctamente.",{variant:"success"}),qe()}catch{E("Error al actualizar Evento",{variant:"error"})}}else{const Vr={...X,fechaInicio:Gt,fechaFin:er,todoElDia:X.todoElDia,solID:X.solID??null,disID:n??null,client:X.client,invitados:X.invitados.map(Ke=>({usrNombre:Ke.nombre||Ke.usrNombre,Correo:Ke.correo||Ke.Correo,EsOrganizador:Ke.isHost||Ke.EsOrganizador,StatusInvitacion:Ke.StatusInvitacion,UsuarioID:Ke.usrID||Ke.UsuarioID,disID:Ke.disID||n}))};try{const Ke=await S.createEvent(Vr,e);c(wr=>[...wr,Ke]),E("El evento se ha creado con éxito",{variant:"success"}),qe()}catch{E("Error al guardar Evento",{variant:"error"})}}if(e){const Vr=await S.getEventsByUser(e);c(Vr)}},Ne=()=>{i(X=>new Date(X.getFullYear(),X.getMonth()-1,1))},Be=()=>{i(X=>new Date(X.getFullYear(),X.getMonth()+1,1))},vt=()=>{de("ELIMINAR")},pt=()=>{de("RECHAZAR")},k=()=>{b(new Date),d(!0)},P=X=>{X&&i(X)},B=X=>{b(X),d(!0),h(null)},ue=async()=>{if(f)try{await S.deleteEvent(f.eventoID),c(a.filter(X=>X.eventoID!==f.eventoID)),E("El evento se ha eliminado de tu calendario",{content:(X,Me)=>l.jsx(el,{id:X,message:String(Me),variant:"delete"})})}catch{E("Error al eliminar Evento",{variant:"error"})}finally{qe(),Ee()}},se=async()=>{if(!(!F?.userEmail||!n)){ee(!0);try{const Me=(await _.getGoogleCalendars(F.userEmail,n)).map(je=>({...je,selected:!0}));Ce(Me);const ke=Me.map(je=>je.id);Oe(ke)}catch(X){console.error("Error Google Cals:",X)}finally{ee(!1)}}},O=async X=>{const Me=Q.map(je=>je.id===X?{...je,selected:!je.selected}:je);Ce(Me);const ke=Me.filter(je=>je.selected).map(je=>je.id);Oe(ke)},ne=async()=>{if(!(!Y?.userEmail||!n)){ee(!0);try{const Me=(await W.getOutlookCalendars(Y.userEmail,n)).map(je=>({...je,selected:!0}));we(Me);const ke=Me.map(je=>je.id);R(ke)}catch(X){console.error("Error Outlook Cals:",X)}finally{ee(!1)}}},Se=async X=>{const Me=me.map(je=>je.id===X?{...je,selected:!je.selected}:je);we(Me);const ke=Me.filter(je=>je.selected).map(je=>je.id);R(ke)};y.useEffect(()=>{se()},[F?.userEmail,n]),y.useEffect(()=>{ne()},[Y?.userEmail,n]);const Oe=async X=>{if(!F?.userEmail||!n)return;const Me=X||Q.filter(ke=>ke.selected).map(ke=>ke.id);try{const ke={disID:n,year:s.getFullYear(),month:s.getMonth()+1,usrMail:F.userEmail,calendarIds:Me},je=await _.getGoogleEventsByMonth(ke);U(je)}catch(ke){console.error("Error al obtener eventos de Google:",ke)}},R=async X=>{if(!Y?.userEmail||!n)return;const Me=X||me.filter(ke=>ke.selected).map(ke=>ke.id);try{const ke={disID:n,year:s.getFullYear(),month:s.getMonth()+1,usrMail:Y.userEmail,calendarIds:Me},je=await W.getOutlookEventsByMonth(ke);ce(je)}catch(ke){console.error("Error al obtener eventos de Outlook:",ke)}};if(n===void 0||e===void 0)return l.jsx("div",{children:"Cargando configuración de usuario..."});const te=async(X,Me)=>{await S.UpdateStatusEvento(X.evento.eventoID,e,Me)&&(await S.MarcarLeido(X.notificacionID,e),E(X?.evento?.titulo+" fue agregado a tu calendario",{variant:"success"}))},_e=async()=>{ie&&S.UpdateStatusEvento(ie.evento.eventoID,e,"RECHAZADA")&&(await S.MarcarLeido(ie.notificacionID,e),await S.MarcarLeido(ie.notificacionID,e),E("Haz rechazado la Invitación a "+ie?.evento?.titulo,{content:(Me,ke)=>l.jsx(el,{id:Me,message:String(ke),variant:"rechazar"})}),Ee())},Ge=async(X,Me)=>{try{if(!e)return;pe(X),Me=="RECHAZADA"?(pt(),console.log("noti",X)):te(X,Me)}catch{E("Error al procesar la invitación",{variant:"error"})}},[q,de]=y.useState(null),Ee=()=>de(null),Ae={RECHAZAR:{title:"Rechazar invitación",confirmText:"Rechazar evento",description:l.jsxs(l.Fragment,{children:["Estás a punto de declinar la invitación de ",l.jsx("strong",{children:ie?.evento?.nombreAnfitrion})," a ",l.jsx("strong",{children:ie?.evento?.titulo})]}),icon:l.jsx("img",{src:qh}),action:()=>ie&&_e()},ELIMINAR:{title:"Eliminar evento",confirmText:"Eliminar",description:"¿De verdad deseas eliminar este evento? Esta acción no se puede deshacer.",icon:l.jsx("img",{src:qh}),action:()=>ue()},DESVINCULAR:{title:"Desvincular Outlook",confirmText:"Desvincular",description:"Si desvinculas tu cuenta, perderás acceso a todos los eventos sincronizados.",icon:"",action:()=>ue}},Fe=q?Ae[q]:null;return l.jsxs("div",{id:"Agenda",style:{height:"100%",width:"100%"},children:[l.jsx(dy,{header:l.jsx(I2,{currentDate:s,onPrevMonth:Ne,onNextMonth:Be,onAddEvent:k,onDateChange:P}),sidebar:l.jsx(lw,{onEventClick:We,upcomingEvents:w,leads30Days:t,leads90Days:r,disID:n,usrID:e,onAddEvent:k,googleCalendars:Q,outlookCalendars:me,isLoadingCalendars:ae,onToggleGoogle:O,onToggleOutlook:Se,notifications:le,unreadCount:le?.filter(X=>!X.leida).length,onAceppInvitacion:Ge}),mainContent:l.jsx(Sw,{onSeeMoreClick:Re,currentDate:s,events:fe,onDayClick:B,onEventClick:We})}),u&&l.jsx(Gk,{isVisible:u,onClose:qe,onSave:Ze,onDelete:vt,selectedDate:p,initialEvent:f,userId:e,masNombreBD:o,disId:n}),l.jsx(Qk,{isOpen:D,onClose:()=>A(!1),events:M,date:V,onEventClick:We}),Fe&&l.jsx(p3,{open:!!q,onClose:Ee,onConfirm:()=>{Fe.action()},title:Fe.title,description:Fe.description,icon:Fe.icon,confirmText:Fe.confirmText})]})},m3="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",g3="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 tl(e,t,r){return e.accessor?e.accessor(t,r):e.field?t?.[e.field]:t?.[e?.key||""]}function v3(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 rl(e,t,r=!0){return typeof e=="function"?e(t):e??r}function y3(e){return e.replace(/[^\d]/g,"")}function b3(e,t){return t}var cs={},Zh;function x3(){if(Zh)return cs;Zh=1;var e=at();Object.defineProperty(cs,"__esModule",{value:!0}),cs.default=void 0;var t=e(ht()),r=ut();return cs.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"),cs}var _3=x3();const w3=it(_3);var ls={},Gh;function S3(){if(Gh)return ls;Gh=1;var e=at();Object.defineProperty(ls,"__esModule",{value:!0}),ls.default=void 0;var t=e(ht()),r=ut();return ls.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"),ls}var C3=S3();const E3=it(C3);var us={},Kh;function D3(){if(Kh)return us;Kh=1;var e=at();Object.defineProperty(us,"__esModule",{value:!0}),us.default=void 0;var t=e(ht()),r=ut();return us.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"),us}var k3=D3();const A3=it(k3);var ds={},Qh;function T3(){if(Qh)return ds;Qh=1;var e=at();Object.defineProperty(ds,"__esModule",{value:!0}),ds.default=void 0;var t=e(ht()),r=ut();return ds.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"),ds}var I3=T3();const M3=it(I3);function Xh(e){return e==="right"?"end":e==="center"?"center":"start"}function Jh(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 P3=1060,nl=(e,t)=>e.metrics.find(r=>String(r.label).toLowerCase()===t.toLowerCase())?.value??"";function O3({sections:e,detailColumns:t,summaryWidths:r=["1fr",120,120,150],minWidth:n=P3,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 u(d){const f=d.reduce((m,p)=>m+c(p.width),0),h=Math.max(d.length-1,0)*16;return f+h+32}return l.jsx(g.Box,{sx:{border:"1px solid rgba(0,0,0,0.15)",overflow:"hidden",bgcolor:"background.paper",width:"100%"},children:l.jsxs(g.Box,{children:[l.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=>l.jsx(g.Typography,{sx:{fontSize:13,fontWeight:800},children:d},d))}),e.map((d,f)=>{const[h,v]=K.useState(!!d.initiallyOpen),m=f%2===1,p=o?o(d):t,b=Math.max(n,u(p));return l.jsxs(g.Box,{children:[l.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: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:()=>v(w=>!w),children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[l.jsx(g.IconButton,{size:"small",disableRipple:!0,children:h?l.jsx(M3,{}):l.jsx(A3,{})}),l.jsx(g.Typography,{sx:{fontWeight:700,fontSize:14,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:String(d.title),children:d.title})]}),l.jsx(g.Typography,{sx:{fontSize:13.5,fontWeight:800},children:nl(d,"En Proceso")}),l.jsx(g.Typography,{sx:{fontSize:13.5,fontWeight:800},children:nl(d,"Finalizadas")}),l.jsx(g.Typography,{sx:{fontSize:13.5,fontWeight:800},children:nl(d,"Último seg.")})]}),l.jsx(g.Collapse,{in:h,unmountOnExit:!0,children:l.jsxs(g.Box,{sx:{overflowX:"auto","&::-webkit-scrollbar":{height:"5px"}},children:[l.jsx(g.Box,{sx:{minWidth:b,display:"grid",gridTemplateColumns:Jh(p),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:p.map(w=>l.jsx(g.Typography,{sx:{justifySelf:Xh(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,C)=>l.jsx(g.Box,{sx:{minWidth:b,display:"grid",gridTemplateColumns:Jh(p),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?.(w,d),children:p.map((E,S)=>{const _=E.accessor?E.accessor(w,C):E.field?w[E.field]:null;return l.jsx(g.Box,{sx:{justifySelf:Xh(E.align),textAlign:E.align??"left",minWidth:0,overflow:"hidden",maxWidth:"100%"},children:typeof _=="string"||typeof _=="number"?l.jsx(g.Typography,{sx:{fontSize:13,fontWeight:/^(estatus|seg|avance|nivel|asesor|fecha)$/i.test(E.key)?700:500,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:String(_),children:_}):_},E.key??S)})},w.id??C))]})})]},d.id)})]})})}var fs={},e0;function j3(){if(e0)return fs;e0=1;var e=at();Object.defineProperty(fs,"__esModule",{value:!0}),fs.default=void 0;var t=e(ht()),r=ut();return fs.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"),fs}var R3=j3();const N3=it(R3),$3=e=>e?new Date(e).toLocaleDateString("es-MX",{day:"2-digit",month:"short",year:"numeric"}).replace(".",""):"",L3=e=>{const t=`${e?.Nombre??""} ${e?.Apellido??""}`.trim();return t||(e?.IdAsesor?e?.Correo??"Usuario":"Sin asesor asignado")},z3=e=>{const t=(e||"").split(" ").filter(Boolean);return t.length>=2?(t[0][0]+t[1][0]).toUpperCase():(e?.[0]??"?").toUpperCase()};var ps={},t0;function B3(){if(t0)return ps;t0=1;var e=at();Object.defineProperty(ps,"__esModule",{value:!0}),ps.default=void 0;var t=e(ht()),r=ut();return ps.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"),ps}var F3=B3();const W3=it(F3),ol=({current:e=0,total:t=0,color:r="#4caf50"})=>l.jsx("div",{style:{display:"flex",gap:"1px",width:"100%",height:"100%",justifyContent:"center",overflow:"hidden",minWidth:0},children:Array.from({length:t}).map((n,o)=>l.jsx("div",{style:{width:"7px",height:"7px",borderRadius:"2px",backgroundColor:o<e?r:"#e0e0e0",display:"flex"}},o))});var hs={},r0;function U3(){if(r0)return hs;r0=1;var e=at();Object.defineProperty(hs,"__esModule",{value:!0}),hs.default=void 0;var t=e(ht()),r=ut();return hs.default=(0,t.default)((0,r.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),hs}var H3=U3();const n0=it(H3),V3=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"}},Y3=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}},q3=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}},Z3=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 G3(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 K3(e){return e.replace(/<br\s*\/?>/gi,`
|
|
177
|
+
`)}y.write("payload.value = newResult;"),y.write("return payload;");const S=y.compile();return(E,C)=>S(h,E,C)};let s;const i=Wi,a=!Rp.jitless,u=a&&Gw.value,d=t.catchall;let f;e._zod.parse=(h,y)=>{f??(f=n.value);const g=h.value;return i(g)?a&&u&&y?.async===!1&&y.jitless!==!0?(s||(s=o(t.shape)),h=s(h,y),d?Jp([],g,h,y,f,e):h):r(h,y):(h.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),h)}});function eh(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=>!Jn(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=>An(i,n,kn())))}),t)}const zC=Z("$ZodUnion",(e,t)=>{Pt.init(e,t),vt(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),vt(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),vt(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),vt(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=>Yc(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 u=c._zod.run({value:o.value,issues:[]},s);if(u instanceof Promise)a.push(u),i=!0;else{if(u.issues.length===0)return u;a.push(u)}}return i?Promise.all(a).then(c=>eh(c,o,e,s)):eh(a,o,e,s)}}),BC=Z("$ZodIntersection",(e,t)=>{Pt.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,u])=>th(r,c,u)):th(r,s,i)}});function Kc(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(Go(e)&&Go(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=Kc(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=Kc(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 th(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),Jn(e))return e;const n=Kc(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 FC=Z("$ZodEnum",(e,t)=>{Pt.init(e,t);const r=Yw(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>Kw.has(typeof o)).map(o=>typeof o=="string"?Xn(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}}),WC=Z("$ZodLiteral",(e,t)=>{if(Pt.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"?Xn(r):r?Xn(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}}),HC=Z("$ZodTransform",(e,t)=>{Pt.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new jp(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 Kn;return r.value=o,r}});function rh(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const UC=Z("$ZodOptional",(e,t)=>{Pt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",vt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),vt(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Yc(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=>rh(s,r.value)):rh(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),VC=Z("$ZodNullable",(e,t)=>{Pt.init(e,t),vt(e._zod,"optin",()=>t.innerType._zod.optin),vt(e._zod,"optout",()=>t.innerType._zod.optout),vt(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Yc(r.source)}|null)$`):void 0}),vt(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)}),YC=Z("$ZodDefault",(e,t)=>{Pt.init(e,t),e._zod.optin="optional",vt(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=>nh(s,t)):nh(o,t)}});function nh(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const qC=Z("$ZodPrefault",(e,t)=>{Pt.init(e,t),e._zod.optin="optional",vt(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))}),ZC=Z("$ZodNonOptional",(e,t)=>{Pt.init(e,t),vt(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=>oh(s,e)):oh(o,e)}});function oh(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 GC=Z("$ZodCatch",(e,t)=>{Pt.init(e,t),vt(e._zod,"optin",()=>t.innerType._zod.optin),vt(e._zod,"optout",()=>t.innerType._zod.optout),vt(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=>An(i,n,kn()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(s=>An(s,n,kn()))},input:r.value}),r.issues=[]),r)}}),KC=Z("$ZodPipe",(e,t)=>{Pt.init(e,t),vt(e._zod,"values",()=>t.in._zod.values),vt(e._zod,"optin",()=>t.in._zod.optin),vt(e._zod,"optout",()=>t.out._zod.optout),vt(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=>Qi(i,t.in,n)):Qi(s,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(s=>Qi(s,t.out,n)):Qi(o,t.out,n)}});function Qi(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const QC=Z("$ZodReadonly",(e,t)=>{Pt.init(e,t),vt(e._zod,"propValues",()=>t.innerType._zod.propValues),vt(e._zod,"values",()=>t.innerType._zod.values),vt(e._zod,"optin",()=>t.innerType._zod.optin),vt(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(sh):sh(o)}});function sh(e){return e.value=Object.freeze(e.value),e}const XC=Z("$ZodCustom",(e,t)=>{ir.init(e,t),Pt.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=>ih(s,r,n,e));ih(o,r,n,e)}});function ih(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(Ko(o))}}class JC{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 eE(){return new JC}const Xi=eE();function tE(e,t){return new e({type:"string",...Ae(t)})}function rE(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ae(t)})}function ah(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ae(t)})}function nE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ae(t)})}function oE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ae(t)})}function sE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ae(t)})}function iE(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ae(t)})}function aE(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ae(t)})}function cE(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ae(t)})}function lE(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ae(t)})}function uE(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ae(t)})}function dE(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ae(t)})}function fE(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ae(t)})}function pE(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ae(t)})}function hE(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ae(t)})}function mE(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ae(t)})}function gE(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ae(t)})}function vE(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ae(t)})}function yE(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ae(t)})}function bE(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ae(t)})}function xE(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ae(t)})}function _E(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ae(t)})}function wE(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ae(t)})}function SE(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ae(t)})}function CE(e,t){return new e({type:"string",format:"date",check:"string_format",...Ae(t)})}function EE(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ae(t)})}function DE(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ae(t)})}function kE(e,t){return new e({type:"number",checks:[],...Ae(t)})}function AE(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Ae(t)})}function TE(e,t){return new e({type:"boolean",...Ae(t)})}function IE(e){return new e({type:"unknown"})}function ME(e,t){return new e({type:"never",...Ae(t)})}function ch(e,t){return new qp({check:"less_than",...Ae(t),value:e,inclusive:!1})}function Qc(e,t){return new qp({check:"less_than",...Ae(t),value:e,inclusive:!0})}function lh(e,t){return new Zp({check:"greater_than",...Ae(t),value:e,inclusive:!1})}function Xc(e,t){return new Zp({check:"greater_than",...Ae(t),value:e,inclusive:!0})}function uh(e,t){return new qS({check:"multiple_of",...Ae(t),value:e})}function dh(e,t){return new GS({check:"max_length",...Ae(t),maximum:e})}function Ji(e,t){return new KS({check:"min_length",...Ae(t),minimum:e})}function fh(e,t){return new QS({check:"length_equals",...Ae(t),length:e})}function PE(e,t){return new XS({check:"string_format",format:"regex",...Ae(t),pattern:e})}function OE(e){return new JS({check:"string_format",format:"lowercase",...Ae(e)})}function jE(e){return new eC({check:"string_format",format:"uppercase",...Ae(e)})}function RE(e,t){return new tC({check:"string_format",format:"includes",...Ae(t),includes:e})}function NE(e,t){return new rC({check:"string_format",format:"starts_with",...Ae(t),prefix:e})}function $E(e,t){return new nC({check:"string_format",format:"ends_with",...Ae(t),suffix:e})}function Qo(e){return new oC({check:"overwrite",tx:e})}function LE(e){return Qo(t=>t.normalize(e))}function zE(){return Qo(e=>e.trim())}function BE(){return Qo(e=>e.toLowerCase())}function FE(){return Qo(e=>e.toUpperCase())}function WE(e,t,r){return new e({type:"array",element:t,...Ae(r)})}function HE(e,t,r){return new e({type:"custom",check:"custom",fn:t,...Ae(r)})}function UE(e){const t=VE(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Ko(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(Ko(o))}},e(r.value,r)));return t}function VE(e,t){const r=new ir({check:"custom",...Ae(t)});return r._zod.check=e,r}function ph(e,t){try{var r=e()}catch(n){return t(n)}return r&&r.then?r.then(void 0,t):r}function YE(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,u=c&&c[n.code];r[i]=Lc(i,t,r,o,u?[].concat(u,n.message):n.message)}e.shift()}return r}function qE(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,u=c&&c[n.code];r[i]=Lc(i,t,r,o,u?[].concat(u,n.message):n.message)}e.shift()}return r}function ZE(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(ph(function(){return Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(i){return s.shouldUseNativeValidation&&Wc({},s),{errors:{},values:r.raw?Object.assign({},n):i}})},function(i){if((function(a){return Array.isArray(a?.issues)})(i))return{values:{},errors:Pp(YE(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(ph(function(){return Promise.resolve((r.mode==="sync"?cS:lS)(e,n,t)).then(function(i){return s.shouldUseNativeValidation&&Wc({},s),{errors:{},values:r.raw?Object.assign({},n):i}})},function(i){if((function(a){return a instanceof Zc})(i))return{values:{},errors:Pp(qE(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 GE=Z("ZodISODateTime",(e,t)=>{yC.init(e,t),kt.init(e,t)});function KE(e){return SE(GE,e)}const QE=Z("ZodISODate",(e,t)=>{bC.init(e,t),kt.init(e,t)});function XE(e){return CE(QE,e)}const JE=Z("ZodISOTime",(e,t)=>{xC.init(e,t),kt.init(e,t)});function eD(e){return EE(JE,e)}const tD=Z("ZodISODuration",(e,t)=>{_C.init(e,t),kt.init(e,t)});function rD(e){return DE(tD,e)}const xr=Z("ZodError",(e,t)=>{Zc.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>aS(e,r)},flatten:{value:r=>iS(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Hc,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Hc,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),nD=Vi(xr),oD=Yi(xr),sD=qi(xr),iD=Zi(xr),aD=fS(xr),cD=pS(xr),lD=hS(xr),uD=mS(xr),dD=gS(xr),fD=vS(xr),pD=yS(xr),hD=bS(xr),zt=Z("ZodType",(e,t)=>(Pt.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)=>ln(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>nD(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>sD(e,r,n),e.parseAsync=async(r,n)=>oD(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>iD(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>aD(e,r,n),e.decode=(r,n)=>cD(e,r,n),e.encodeAsync=async(r,n)=>lD(e,r,n),e.decodeAsync=async(r,n)=>uD(e,r,n),e.safeEncode=(r,n)=>dD(e,r,n),e.safeDecode=(r,n)=>fD(e,r,n),e.safeEncodeAsync=async(r,n)=>pD(e,r,n),e.safeDecodeAsync=async(r,n)=>hD(e,r,n),e.refine=(r,n)=>e.check(ik(r,n)),e.superRefine=r=>e.check(ak(r)),e.overwrite=r=>e.check(Qo(r)),e.optional=()=>Sh(e),e.nullable=()=>Ch(e),e.nullish=()=>Sh(Ch(e)),e.nonoptional=r=>JD(e,r),e.array=()=>bh(e),e.or=r=>FD([e,r]),e.and=r=>HD(e,r),e.transform=r=>Dh(e,qD(r)),e.default=r=>KD(e,r),e.prefault=r=>XD(e,r),e.catch=r=>tk(e,r),e.pipe=r=>Dh(e,r),e.readonly=()=>ok(e),e.describe=r=>{const n=e.clone();return Xi.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return Xi.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Xi.get(e);const n=e.clone();return Xi.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),hh=Z("_ZodString",(e,t)=>{Gc.init(e,t),zt.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(PE(...n)),e.includes=(...n)=>e.check(RE(...n)),e.startsWith=(...n)=>e.check(NE(...n)),e.endsWith=(...n)=>e.check($E(...n)),e.min=(...n)=>e.check(Ji(...n)),e.max=(...n)=>e.check(dh(...n)),e.length=(...n)=>e.check(fh(...n)),e.nonempty=(...n)=>e.check(Ji(1,...n)),e.lowercase=n=>e.check(OE(n)),e.uppercase=n=>e.check(jE(n)),e.trim=()=>e.check(zE()),e.normalize=(...n)=>e.check(LE(...n)),e.toLowerCase=()=>e.check(BE()),e.toUpperCase=()=>e.check(FE())}),mD=Z("ZodString",(e,t)=>{Gc.init(e,t),hh.init(e,t),e.email=r=>e.check(rE(gD,r)),e.url=r=>e.check(aE(vD,r)),e.jwt=r=>e.check(wE(PD,r)),e.emoji=r=>e.check(cE(yD,r)),e.guid=r=>e.check(ah(mh,r)),e.uuid=r=>e.check(nE(ea,r)),e.uuidv4=r=>e.check(oE(ea,r)),e.uuidv6=r=>e.check(sE(ea,r)),e.uuidv7=r=>e.check(iE(ea,r)),e.nanoid=r=>e.check(lE(bD,r)),e.guid=r=>e.check(ah(mh,r)),e.cuid=r=>e.check(uE(xD,r)),e.cuid2=r=>e.check(dE(_D,r)),e.ulid=r=>e.check(fE(wD,r)),e.base64=r=>e.check(bE(TD,r)),e.base64url=r=>e.check(xE(ID,r)),e.xid=r=>e.check(pE(SD,r)),e.ksuid=r=>e.check(hE(CD,r)),e.ipv4=r=>e.check(mE(ED,r)),e.ipv6=r=>e.check(gE(DD,r)),e.cidrv4=r=>e.check(vE(kD,r)),e.cidrv6=r=>e.check(yE(AD,r)),e.e164=r=>e.check(_E(MD,r)),e.datetime=r=>e.check(KE(r)),e.date=r=>e.check(XE(r)),e.time=r=>e.check(eD(r)),e.duration=r=>e.check(rD(r))});function _r(e){return tE(mD,e)}const kt=Z("ZodStringFormat",(e,t)=>{St.init(e,t),hh.init(e,t)}),gD=Z("ZodEmail",(e,t)=>{lC.init(e,t),kt.init(e,t)}),mh=Z("ZodGUID",(e,t)=>{aC.init(e,t),kt.init(e,t)}),ea=Z("ZodUUID",(e,t)=>{cC.init(e,t),kt.init(e,t)}),vD=Z("ZodURL",(e,t)=>{uC.init(e,t),kt.init(e,t)}),yD=Z("ZodEmoji",(e,t)=>{dC.init(e,t),kt.init(e,t)}),bD=Z("ZodNanoID",(e,t)=>{fC.init(e,t),kt.init(e,t)}),xD=Z("ZodCUID",(e,t)=>{pC.init(e,t),kt.init(e,t)}),_D=Z("ZodCUID2",(e,t)=>{hC.init(e,t),kt.init(e,t)}),wD=Z("ZodULID",(e,t)=>{mC.init(e,t),kt.init(e,t)}),SD=Z("ZodXID",(e,t)=>{gC.init(e,t),kt.init(e,t)}),CD=Z("ZodKSUID",(e,t)=>{vC.init(e,t),kt.init(e,t)}),ED=Z("ZodIPv4",(e,t)=>{wC.init(e,t),kt.init(e,t)}),DD=Z("ZodIPv6",(e,t)=>{SC.init(e,t),kt.init(e,t)}),kD=Z("ZodCIDRv4",(e,t)=>{CC.init(e,t),kt.init(e,t)}),AD=Z("ZodCIDRv6",(e,t)=>{EC.init(e,t),kt.init(e,t)}),TD=Z("ZodBase64",(e,t)=>{DC.init(e,t),kt.init(e,t)}),ID=Z("ZodBase64URL",(e,t)=>{AC.init(e,t),kt.init(e,t)}),MD=Z("ZodE164",(e,t)=>{TC.init(e,t),kt.init(e,t)}),PD=Z("ZodJWT",(e,t)=>{MC.init(e,t),kt.init(e,t)}),gh=Z("ZodNumber",(e,t)=>{Kp.init(e,t),zt.init(e,t),e.gt=(n,o)=>e.check(lh(n,o)),e.gte=(n,o)=>e.check(Xc(n,o)),e.min=(n,o)=>e.check(Xc(n,o)),e.lt=(n,o)=>e.check(ch(n,o)),e.lte=(n,o)=>e.check(Qc(n,o)),e.max=(n,o)=>e.check(Qc(n,o)),e.int=n=>e.check(vh(n)),e.safe=n=>e.check(vh(n)),e.positive=n=>e.check(lh(0,n)),e.nonnegative=n=>e.check(Xc(0,n)),e.negative=n=>e.check(ch(0,n)),e.nonpositive=n=>e.check(Qc(0,n)),e.multipleOf=(n,o)=>e.check(uh(n,o)),e.step=(n,o)=>e.check(uh(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 ta(e){return kE(gh,e)}const OD=Z("ZodNumberFormat",(e,t)=>{PC.init(e,t),gh.init(e,t)});function vh(e){return AE(OD,e)}const jD=Z("ZodBoolean",(e,t)=>{OC.init(e,t),zt.init(e,t)});function ra(e){return TE(jD,e)}const RD=Z("ZodUnknown",(e,t)=>{jC.init(e,t),zt.init(e,t)});function yh(){return IE(RD)}const ND=Z("ZodNever",(e,t)=>{RC.init(e,t),zt.init(e,t)});function $D(e){return ME(ND,e)}const LD=Z("ZodArray",(e,t)=>{NC.init(e,t),zt.init(e,t),e.element=t.element,e.min=(r,n)=>e.check(Ji(r,n)),e.nonempty=r=>e.check(Ji(1,r)),e.max=(r,n)=>e.check(dh(r,n)),e.length=(r,n)=>e.check(fh(r,n)),e.unwrap=()=>e.element});function bh(e,t){return WE(LD,e,t)}const zD=Z("ZodObject",(e,t)=>{LC.init(e,t),zt.init(e,t),vt(e,"shape",()=>t.shape),e.keyof=()=>_h(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:yh()}),e.loose=()=>e.clone({...e._zod.def,catchall:yh()}),e.strict=()=>e.clone({...e._zod.def,catchall:$D()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>tS(e,r),e.safeExtend=r=>rS(e,r),e.merge=r=>nS(e,r),e.pick=r=>Jw(e,r),e.omit=r=>eS(e,r),e.partial=(...r)=>oS(wh,e,r[0]),e.required=(...r)=>sS(Eh,e,r[0])});function xh(e,t){const r={type:"object",get shape(){return cn(this,"shape",e?Zw(e):{}),this.shape},...Ae(t)};return new zD(r)}const BD=Z("ZodUnion",(e,t)=>{zC.init(e,t),zt.init(e,t),e.options=t.options});function FD(e,t){return new BD({type:"union",options:e,...Ae(t)})}const WD=Z("ZodIntersection",(e,t)=>{BC.init(e,t),zt.init(e,t)});function HD(e,t){return new WD({type:"intersection",left:e,right:t})}const Jc=Z("ZodEnum",(e,t)=>{FC.init(e,t),zt.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 Jc({...t,checks:[],...Ae(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 Jc({...t,checks:[],...Ae(o),entries:s})}});function _h(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Jc({type:"enum",entries:r,...Ae(t)})}const UD=Z("ZodLiteral",(e,t)=>{WC.init(e,t),zt.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 VD(e,t){return new UD({type:"literal",values:Array.isArray(e)?e:[e],...Ae(t)})}const YD=Z("ZodTransform",(e,t)=>{HC.init(e,t),zt.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new jp(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Ko(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(Ko(i))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(s=>(r.value=s,r)):(r.value=o,r)}});function qD(e){return new YD({type:"transform",transform:e})}const wh=Z("ZodOptional",(e,t)=>{UC.init(e,t),zt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Sh(e){return new wh({type:"optional",innerType:e})}const ZD=Z("ZodNullable",(e,t)=>{VC.init(e,t),zt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ch(e){return new ZD({type:"nullable",innerType:e})}const GD=Z("ZodDefault",(e,t)=>{YC.init(e,t),zt.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function KD(e,t){return new GD({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():zp(t)}})}const QD=Z("ZodPrefault",(e,t)=>{qC.init(e,t),zt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function XD(e,t){return new QD({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():zp(t)}})}const Eh=Z("ZodNonOptional",(e,t)=>{ZC.init(e,t),zt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function JD(e,t){return new Eh({type:"nonoptional",innerType:e,...Ae(t)})}const ek=Z("ZodCatch",(e,t)=>{GC.init(e,t),zt.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function tk(e,t){return new ek({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const rk=Z("ZodPipe",(e,t)=>{KC.init(e,t),zt.init(e,t),e.in=t.in,e.out=t.out});function Dh(e,t){return new rk({type:"pipe",in:e,out:t})}const nk=Z("ZodReadonly",(e,t)=>{QC.init(e,t),zt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ok(e){return new nk({type:"readonly",innerType:e})}const sk=Z("ZodCustom",(e,t)=>{XC.init(e,t),zt.init(e,t)});function ik(e,t={}){return HE(sk,e,t)}function ak(e){return UE(e)}const kh=/^([01][0-9]|2[0-3]):[0-5][0-9]$/,Ah=(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),u=new Date(n,o,s,a,c);return isNaN(u.getTime())||!x.isValid(u)?null:u},ck=xh({UsuarioID:ta().nullable().optional(),disID:ta().nullable().optional(),EsOrganizador:ra().default(!1),Correo:_r().email("Formato de correo inválido"),StatusInvitacion:_h(["PENDIENTE","CONFIRMADA","RECHAZADA"]).default("PENDIENTE")}),lk=xh({titulo:_r().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:_r().min(1,"El campo fecha inicio es requerido."),horaInicio:_r().min(1,"La hora de inicio es requerida.").regex(kh,{message:"Formato inválido"}),horaFin:_r().min(1,"La hora fin es requerida.").regex(kh,{message:"Formato inválido"}),todoElDia:ra(),fechaFin:_r().optional(),showEndDate:ra().optional(),horaInicio2:_r().optional(),TodoElDia2:ra().optional(),client:_r().nullable().optional(),repetir:_r().optional(),link:_r().trim().url("Debe ser una URL válida. Ejemplo https://meet.google.com/").or(VD("")).optional().refine(e=>e===void 0?!0:!/\s/.test(e),{message:"El enlace no puede contener espacios en blanco"}),descripcion:_r().optional(),invitados:bh(ck).optional().default([]),color:_r().optional(),solID:ta().nullable().optional(),disID:ta().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=Ah(e.fechaInicio,e.horaInicio),r=Ah(e.fechaFin,e.horaFin);return!t||!r||!x.isValid(t)||!x.isValid(r)?!0:!(x.isBefore(r,t)&&!x.isSameDay(r,t)||x.isSameDay(t,r)&&x.isBefore(r,t))},{message:"",path:["horaFin"]}),Th=e=>K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},K.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"}),K.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"})),uk="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",dk=e=>K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},K.createElement("g",{clipPath:"url(#a)"},K.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"})),K.createElement("defs",null,K.createElement("clipPath",{id:"a"},K.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),Ih="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",fk=e=>K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},K.createElement("g",{fill:"#2571D6",clipPath:"url(#a)"},K.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"}),K.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"}),K.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"})),K.createElement("defs",null,K.createElement("clipPath",{id:"a"},K.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),pk="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",hk=e=>K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},K.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"}),K.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 Xo={},Mh;function mk(){if(Mh)return Xo;Mh=1;var e=rt();Object.defineProperty(Xo,"__esModule",{value:!0}),Xo.default=void 0;var t=e(ht()),r=lt();return Xo.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"),Xo}var gk=mk();const Ph=tt(gk);var Jo={},Oh;function vk(){if(Oh)return Jo;Oh=1;var e=rt();Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.default=void 0;var t=e(ht()),r=lt();return Jo.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"),Jo}var yk=vk();const bk=tt(yk);var es={},jh;function xk(){if(jh)return es;jh=1;var e=rt();Object.defineProperty(es,"__esModule",{value:!0}),es.default=void 0;var t=e(ht()),r=lt();return es.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"),es}var _k=xk();const wk=tt(_k),Rh="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAElBMVEUAAABpbXlpbXlobXhpbnppbnkdzkEGAAAABXRSTlMAgJ5Y75poDcUAAAA3SURBVBjTYyANiBog2IyhSBzRQGQJASSJIGQJBSIkTBESCA5CGcIAoqUEGDAdiukFBhE4hzAAAK+MB7AghHQFAAAAAElFTkSuQmCC";var ts={},Nh;function Sk(){if(Nh)return ts;Nh=1;var e=rt();Object.defineProperty(ts,"__esModule",{value:!0}),ts.default=void 0;var t=e(ht()),r=lt();return ts.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"),ts}var Ck=Sk();const Ek=tt(Ck),Dk=e=>{const t=["#A17B4B","#7B5BE4","#F9A825","#4A90E2","#5CC85C","#FDD835","#E53935","#B0BEC5"],r=e.charCodeAt(0)%t.length;return t[r]},kk=(e,t,r,n)=>{if(t)return l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",color:"#1976D2"},children:[l.jsx(Ek,{sx:{fontSize:16,mr:.5}}),l.jsx(m.Typography,{variant:"caption",sx:{fontWeight:"bold"},children:"Anfitrión"})]});switch(e){case"PENDIENTE":return l.jsx(m.Typography,{variant:"caption",sx:{color:"#999",fontStyle:"italic",fontWeight:600},children:"Pendiente"});case"RECHAZADA":return l.jsx(m.Button,{onClick:()=>n(r),variant:"outlined",size:"small",sx:{fontWeight:600,borderRadius:"8px",textTransform:"none",fontSize:"11px",px:1,py:0},children:"Reenviar"});case"CONFIRMADA":return l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",color:"#00A86B"},children:[l.jsx(Jf,{sx:{fontSize:16,mr:.5}}),l.jsx(m.Typography,{variant:"caption",sx:{fontWeight:600},children:"Asistiré"})]});default:return null}};function Ak({open:e,handleClose:t,guests:r,onReenviar:n}){const o=r.filter(u=>u.estatus==="CONFIRMADA"||u.isHost),s=r.filter(u=>u.estatus==="PENDIENTE"&&!u.isHost),i=r.filter(u=>u.estatus==="RECHAZADA"&&!u.isHost),a=u=>l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",py:1},children:[l.jsxs(m.Box,{sx:{position:"relative",mr:2},children:[l.jsx(m.Avatar,{sx:{bgcolor:Dk(u.iniciales),width:32,height:32,fontSize:"12px",color:"#fff"},children:u.iniciales}),u.estatus==="PENDIENTE"&&l.jsx(m.Box,{sx:{position:"absolute",bottom:-2,right:-4,bgcolor:"#fff",borderRadius:"50%",display:"flex"},children:l.jsx(Ic,{sx:{fontSize:14,color:"#546E7A"}})})]}),l.jsx(m.Typography,{variant:"body2",sx:{flexGrow:1,fontWeight:500,color:"#333"},children:u.nombre}),kk(u.estatus,u.isHost,u.usrID,n)]},u.nombre),c=({title:u,count:d,badgeColor:f})=>l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",mt:2,mb:1},children:[l.jsx(m.Typography,{variant:"subtitle2",sx:{fontWeight:800,color:"#333",fontSize:"13px"},children:u}),f&&l.jsx(m.Box,{sx:{ml:1,bgcolor:f,color:"#fff",borderRadius:"50%",width:16,height:16,display:"flex",alignItems:"center",justifyContent:"center",fontSize:"10px"},children:d})]});return l.jsxs(m.Dialog,{open:e,onClose:t,fullWidth:!0,maxWidth:"xs",PaperProps:{sx:{border:"solid 0.1 px",height:"100%"}},children:[l.jsxs(m.Box,{sx:{p:"16px 8px"},children:[l.jsx(m.Typography,{variant:"subtitle1",sx:{fontWeight:800,ml:1,color:"#333333"},children:"Lista de invitados"}),l.jsx(m.Button,{onClick:t,startIcon:l.jsx("img",{src:Rh,width:20}),sx:{textTransform:"none",color:"#666",fontSize:"16px",p:0,minWidth:0,ml:.5,"&:hover":{bgcolor:"transparent"}},children:"Volver al evento"}),l.jsx(m.IconButton,{onClick:t,sx:{position:"absolute",right:8,top:12},children:l.jsx(Ur,{})})]}),l.jsx(m.Divider,{sx:{backgroundColor:"black"}}),l.jsxs(m.DialogContent,{sx:{p:2},children:[s.length>0&&l.jsxs(m.Box,{sx:{mb:3},children:[l.jsx(c,{title:"Invitados",count:s.length}),s.map(a)]}),o.length>0&&l.jsxs(l.Fragment,{children:[l.jsx(m.Divider,{sx:{my:1,backgroundColor:"black"}}),l.jsxs(m.Box,{sx:{mb:3},children:[l.jsx(c,{title:"Confirmados",count:o.length,badgeColor:"#1976D2"}),o.map(a)]})]}),i.length>0&&l.jsxs(l.Fragment,{children:[l.jsx(m.Divider,{sx:{my:1,backgroundColor:"black"}}),l.jsxs(m.Box,{children:[l.jsx(c,{title:"No asistirán",count:i.length,badgeColor:"#1976D2"}),i.map(a)]})]})]})]})}const Tk=e=>{const t=["#8D6E63","#9C27B0","#FF9800","#2196F3","#4CAF50","#FFEB3B","#F44336","#9E9E9E"],r=e.charCodeAt(0)%t.length;return t[r]};function Ik({guests:e,onReenviar:t}){const[r,n]=v.useState(!1),o=()=>n(!0),s=()=>n(!1);return l.jsxs(l.Fragment,{children:[l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",py:1,borderBottom:"1px solid #eee",width:"100%"},children:[l.jsx(m.AvatarGroup,{max:6,sx:{"& .MuiAvatar-root":{width:32,height:32,fontSize:13,fontWeight:"bold",border:"2px solid #fff",marginLeft:"-8px !important"},"& .MuiBadge-root":{borderRadius:"50%"}},children:e.map((i,a)=>l.jsx(m.Tooltip,{title:i.nombre,arrow:!0,placement:"top",children:l.jsx(m.Box,{children:l.jsx(m.Badge,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},invisible:i.estatus!=="PENDIENTE",sx:{backgroundColor:"white"},badgeContent:l.jsx(m.Box,{sx:{bgcolor:"white",borderRadius:"50%",width:16,height:16,display:"flex",justifyContent:"center",border:"1px solid white",boxShadow:"none"},children:l.jsx("img",{src:tp})}),children:l.jsx(m.Avatar,{sx:{bgcolor:Tk(i.iniciales)},children:i.iniciales})})})},a))}),l.jsx(m.Box,{sx:{flexGrow:1}}),l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",cursor:"pointer",color:"#1976D2",transition:"opacity 0.2s","&:hover":{opacity:.7}},onClick:o,children:[l.jsx(m.Typography,{variant:"body2",sx:{fontWeight:"bold",fontSize:"14px"},children:"Ver invitados"}),l.jsx(wk,{sx:{fontSize:18,ml:.5}})]})]}),l.jsx(Ak,{open:r,handleClose:s,guests:e,onReenviar:t})]})}var rs={},$h;function Mk(){if($h)return rs;$h=1;var e=rt();Object.defineProperty(rs,"__esModule",{value:!0}),rs.default=void 0;var t=e(ht()),r=lt();return rs.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"),rs}var Pk=Mk();const Ok=tt(Pk);var ns={},Lh;function jk(){if(Lh)return ns;Lh=1;var e=rt();Object.defineProperty(ns,"__esModule",{value:!0}),ns.default=void 0;var t=e(ht()),r=lt();return ns.default=(0,t.default)((0,r.jsx)("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"AddCircleOutline"),ns}var Rk=jk();const Nk=tt(Rk),$k="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAADlQTFRFR3BMIHDPJHDUJHDVJXHWJHDVJHHWJHDUI3DUJXHWJXDUJHHUJXHW////c6Tlr8vwiLLp1eT3Nn3ZZnh0KAAAAAx0Uk5TABBAgN+bxCBc7zBwfOSOGgAAAKJJREFUeNp1klsOxSAIREerohb72v9iryFXsSQ9P+BMwiQgJpQ4ZBjIOwrcySAHZetS4Y6UOK3Mb7ZhRGOkYSRjFAg+sSXlNcDGBH5xnI9UB6O3dkhDSEY/pQmAl+Y6n1XnDJA0rd2P6Boex4z7mnrHQ6evOu8oNneE7Dyci5VAQA5sKZF0iSt+rt1AH4cKWC9VNKFiQvX/GTbU6vCGIpddnz/knxPCFgg8/wAAAABJRU5ErkJggg==",Lk=e=>new Date(e+"T00:00:00").toLocaleDateString("es-ES",{day:"numeric",month:"short"}).replace(".",""),zh=e=>{const[t,r]=e.split(":"),n=parseInt(t),o=n>=12?"pm":"am";return`${n%12||12}:${r} ${o}`},Bh=e=>e.split(":").slice(0,2).join(":"),zk=({slot:e,onClick:t})=>l.jsxs(m.Box,{onClick:t,sx:{cursor:"pointer",borderRadius:"12px",overflow:"hidden",border:"1px solid #000000",textAlign:"center",transition:"0.2s",backgroundColor:"#fff","&:hover":{transform:"translateY(-3px)",boxShadow:"0px 4px 12px rgba(0,0,0,0.1)",borderColor:"#1976d2"}},children:[l.jsx(m.Box,{sx:{bgcolor:"#333",color:"white",py:.5},children:l.jsx(m.Typography,{variant:"caption",sx:{fontWeight:"bold",textTransform:"capitalize"},children:Lk(e.Fecha)})}),l.jsxs(m.Box,{sx:{py:1.5},children:[l.jsx(m.Typography,{sx:{fontSize:"12px"},children:zh(e.HoraInicio)}),l.jsxs(m.Typography,{sx:{fontSize:"12px"},children:["a ",zh(e.HoraFin)]})]})]});function Bk({open:e,handleClose:t,suggestions:r,onSelectSlot:n}){const[o,s]=v.useState(16),a=r.slice(0,o).reduce((d,f)=>{const h=f.Fecha;return d[h]||(d[h]=[]),d[h].push(f),d},{}),c=Object.keys(a),u=d=>{const f={...d,HoraInicio:Bh(d.HoraInicio),HoraFin:Bh(d.HoraFin)};n(f),t()};return l.jsxs(m.Dialog,{open:e,onClose:t,fullWidth:!0,maxWidth:"sm",PaperProps:{sx:{borderRadius:"16px"}},children:[l.jsxs(m.Box,{sx:{p:2.5,display:"flex",flexDirection:"column",gap:.5},children:[l.jsx(m.Typography,{variant:"h6",sx:{fontWeight:800,fontSize:"1.1rem"},children:"Selecciona un nuevo horario"}),l.jsx(m.Box,{children:l.jsx(m.Button,{startIcon:l.jsx("img",{src:Rh,width:20}),onClick:t,sx:{textTransform:"none",color:"text.secondary",p:0,fontSize:"1rem","&:hover":{backgroundColor:"transparent",color:"#000"}},children:"Volver al evento"})})]}),l.jsx(m.Divider,{}),l.jsx(m.DialogContent,{sx:{px:3,py:3,backgroundColor:"#f9f9f9"},children:c.length===0?l.jsx(m.Typography,{variant:"body2",color:"text.secondary",align:"center",children:"No hay horarios alternativos disponibles en este momento."}):l.jsxs(l.Fragment,{children:[c.map((d,f)=>l.jsxs(m.Box,{sx:{mb:3},children:[l.jsxs(m.Typography,{variant:"subtitle2",sx:{fontWeight:"bold",mb:2,display:"flex",alignItems:"center",color:f===0?"#1976d2":"text.primary",fontSize:"0.9rem"},children:[f===0?"Mismo día ":"Próximas fechas",f===0&&l.jsx("img",{src:$k,width:15,style:{marginLeft:5}})]}),l.jsx(m.Grid,{container:!0,spacing:2,children:a[d].map((h,y)=>l.jsx(m.Grid,{item:!0,xs:6,sm:3,children:l.jsx(zk,{slot:h,onClick:()=>u(h)})},`${d}-${y}`))})]},d)),r.length>o&&l.jsx(m.Box,{sx:{display:"flex",justifyContent:"center",mt:2},children:l.jsx(m.Button,{onClick:()=>s(d=>d+12),startIcon:l.jsx(Nk,{}),sx:{textTransform:"none",fontWeight:"bold",color:"#1976d2","&:hover":{backgroundColor:"transparent",textDecoration:"underline"}},children:"Mostrar más horarios disponibles"})})]})})]})}const Fk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAIVBMVEVHcExAR1ZAR1NARlVAR1VARlVAR1VARlVARlRARlRAR1ZiwDFVAAAACnRSTlMA5BvHaqI5kH9QLGWfKwAAAQlJREFUeNrd1luqwzAMBNDRw7I7+1/whd4mFa6tBPrX82uJGYMJwc+JLqQ1xU2dLx23NB5EgWjPtAe2Rp4Py8tLmuddeBK/KuRQMgusvDsAwkPRKgU4J14uBIwTw4K8G/GDFncQ6L0FrxYCn1TKhIU4D4UTwZIf8Z2ThjW1/9OoG2XqvTvmiI5LxsRwTRtPTbER3eTJHOcDN8fGkNxagfAxPLChxkyaohTCxEJRU2EeBxDe21NftsrzDuiQup+nwzivn41tQECNC5ZDHrmPCpdEVx+YluaLDONB0bnVcZAUwELgJQUYCzZXMihLOr0Lh7PkmBlLbbFQEsx44fsFY8kwU2PB9Ef+Lv4AL2kmcGZOH2MAAAAASUVORK5CYII=",Wk=e=>{const t=["brown","purple","orange","blue","green","yellow","red","grey"],r=e.charCodeAt(0)%t.length;return t[r]};function Hk({onSelectGuest:e,availableSuggestions:t,onInputTextChange:r}){const[n,o]=v.useState(null),[s,i]=v.useState(""),a=(u,d)=>{d?(e(d),o(null),i("")):(o(null),i(""))},c=(u,d)=>{i(d),r(d)};return l.jsx(m.Autocomplete,{options:t,value:n,inputValue:s,getOptionLabel:u=>u.correo,onChange:a,onInputChange:c,isOptionEqualToValue:(u,d)=>u.correo===d.correo,disablePortal:!0,noOptionsText:"Sin resultados",renderInput:u=>l.jsx(m.TextField,{...u,placeholder:"Agregar invitados...",variant:"outlined",size:"small",InputProps:{...u.InputProps,startAdornment:l.jsx(m.Box,{sx:{ml:1,display:"flex",alignItems:"center"},children:l.jsx("img",{src:Fk,color:"action",width:20})}),disableUnderline:!0}}),renderOption:(u,d)=>v.createElement(m.Box,{component:"li",...u,key:d.correo,sx:{py:1,"& > img":{mr:2,flexShrink:0}}},l.jsx(m.Avatar,{sx:{bgcolor:Wk(d.iniciales),mr:2,width:32,height:32,fontSize:14},children:d.iniciales}),l.jsx(m.Typography,{children:d.nombre}))},"guest-autocomplete-field")}var os={},Fh;function Uk(){if(Fh)return os;Fh=1;var e=rt();Object.defineProperty(os,"__esModule",{value:!0}),os.default=void 0;var t=e(ht()),r=lt();return os.default=(0,t.default)((0,r.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline"),os}var Vk=Uk();const Yk=tt(Vk);var ss={},Wh;function qk(){if(Wh)return ss;Wh=1;var e=rt();Object.defineProperty(ss,"__esModule",{value:!0}),ss.default=void 0;var t=e(ht()),r=lt();return ss.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"),ss}var Zk=qk();const el=tt(Zk),Gk=e=>e.tieneConflicto?{icon:l.jsx(el,{sx:{fontSize:18,color:"#d32f2f"}}),fillColor:"#FFF5F5",iconColor:"#d32f2f",textColor:"#333333",variant:"filled"}:{icon:l.jsx(Yk,{sx:{fontSize:20,color:"#1a73e8"}}),fillColor:"#eaedf2",iconColor:"#1a73e8",textColor:"#000000",variant:"filled"},Kk=e=>{const t=["#8D6E63","#9C27B0","#FF9800","#2196F3","#4CAF50","#FDD835","#F44336","#9E9E9E"],r=e.charCodeAt(0)%t.length;return t[r]};function Qk({guests:e,conflictCount:t,onViewSuggestions:r,onDeleteGuest:n}){const o=i=>a=>{a.stopPropagation(),n(i)},s=i=>i?i.trim().split(/\s+/).slice(0,2).join(" "):"";return l.jsxs(m.Box,{sx:{p:1},children:[l.jsx(m.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:e.map((i,a)=>{const c=Gk(i),u=Kk(i.iniciales);return l.jsx(m.Chip,{label:l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",width:"100%"},children:[l.jsx(m.Typography,{variant:"body2",sx:{color:c.textColor,ml:.5,mr:1,fontSize:"13px",fontWeight:400},children:s(i?.nombre)}),l.jsx(m.Box,{className:"status-icon-wrapper",sx:{display:"flex",alignItems:"center",ml:"auto",margin:"5px"},children:c.icon})]}),avatar:l.jsx(m.Avatar,{sx:{bgcolor:u,width:24,height:24,fontSize:"10px",fontWeight:"bold",color:"#ffffff !important",ml:"4px !important"},children:i.iniciales}),sx:{backgroundColor:c.fillColor,height:"32px",borderRadius:"100px",border:"1px solid rgba(0,0,0,0.04)",transition:"all 0.2s ease-in-out",cursor:"pointer","&:hover":{backgroundColor:c.fillColor,filter:"brightness(0.97)","& .status-icon-wrapper":{display:"none"},"& .MuiChip-deleteIcon":{display:"inline-block"}},"& .MuiChip-label":{paddingLeft:"4px",paddingRight:"8px",width:"100%",display:"flex"},"& .MuiChip-deleteIcon":{display:"none",fontSize:"18px",color:"#000000",ml:"auto",mr:"4px","&:hover":{color:"#000000"}}},onClick:()=>console.log(`Ver perfil de ${i.nombre}`),onDelete:o(i.nombre)},a)})}),t>0&&l.jsxs(m.Box,{sx:{mt:2,display:"flex",flexDirection:"column",gap:.5},children:[l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",color:"#E53935"},children:[l.jsx(el,{sx:{mr:1,fontSize:22}}),l.jsxs(m.Typography,{sx:{fontSize:"15px",fontWeight:500,color:"#E53935"},children:["Se detectó un conflicto de agenda con ",l.jsxs("strong",{children:[t," invitado"]}),t!==1?"s":""]})]}),l.jsx(m.Link,{component:"button",type:"button",variant:"body2",onClick:i=>{i.preventDefault(),i.stopPropagation(),r()},sx:{ml:4,textAlign:"left",textDecoration:"underline",fontWeight:700,fontSize:"15px",color:"#1976D2",border:"none",background:"none",padding:0,cursor:"pointer","&:hover":{color:"#1565C0"}},children:"Ver sugerencias de horario"})]})]})}function Xk(e,t){const[r,n]=v.useState(e);return v.useEffect(()=>{const o=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(o)}},[e,t]),r}const Jk={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"},Hh=["#dbe3fe","#fcebc7","#d9f1d2","#fdf5d1","#ebe3d7","#e1d6fb","#f7c7cc","#f9e7fb","#eaedf2","#d5d8dd"],e3=()=>{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},Uh=[],eo=e3(),is=(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),u=new Date(s,o,n,a,c);return isNaN(u.getTime())||!x.isValid(u)?null:u},t3=({isVisible:e,onClose:t,onSave:r,onDelete:n,selectedDate:o,initialEvent:s,userId:i,masNombreBD:a,disId:c,onReenviar:u})=>{const[d,f]=v.useState(!1),[h,y]=v.useState(!1),g=x.format(new Date,"yyyy-MM-dd"),[p,b]=v.useState(""),[w,S]=v.useState([]),[E,C]=v.useState(!1),_=Tc(),[W,D]=v.useState([]),[T,M]=v.useState(""),[I,H]=v.useState(Uh),[G,F]=v.useState(!1),[Y,se]=v.useState(""),[U,N]=v.useState(!1),[le,de]=v.useState([]),[$,Q]=v.useState([]),we=Xk(Y,300),_e=I.filter(q=>q.tieneConflicto).length,{control:he,handleSubmit:ae,reset:ue,formState:{errors:J,isValid:Se},watch:me,setValue:ee}=Ip({resolver:ZE(lk),defaultValues:{titulo:s?.titulo||"",fechaInicio:x.format(new Date,"yyyy-MM-dd"),horaInicio:x.format(new Date,"HH:mm"),horaFin:x.format(x.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"}),Ie=me("fechaInicio"),j=me("fechaFin"),Fe=me("todoElDia");v.useEffect(()=>{if(p.trim()===""||!i||!c||!a){S([]),D([]),ee("solID",null),C(!1),M("");return}C(!0);const q=setTimeout(()=>{_.getClients(p,c,a,i).then(fe=>{if(C(!1),fe){const Me=fe.map(Ne=>Ne.solID);D([...new Set(Me)])}else D([]);const De=Array.from(new Map(fe.map(Me=>[Me.nombreCliente,Me])).values());if(De.length>0)S(De),M("");else if(s?.client&&s.solID!==null){const Me=[{solID:s.solID,nombreCliente:s.client}];S(Me),M("Sin resultados")}else S([]),M("Sin resultados")}).catch(fe=>{console.error("Error al buscar clientes:",fe),C(!1)})},500);return()=>clearTimeout(q)},[p,i,c,a]),v.useEffect(()=>{if(Ie&&j){const q=new Date(Ie),fe=new Date(j);(q===fe||q>fe)&&ee("fechaFin",Ie)}},[Ie,j,ee]),v.useEffect(()=>{Ie&&ee("fechaFin",Ie)},[Ie]),v.useEffect(()=>{ee("showEndDate",d)},[d,ee]),v.useEffect(()=>{if(s){const q=x.format(s.fechaInicio,"yyyy-MM-dd")===x.format(s.fechaFin,"yyyy-MM-dd");if(f(!q),ee("titulo",s?.titulo),ee("fechaInicio",x.format(s.fechaInicio,"yyyy-MM-dd")),ee("fechaFin",x.format(s.fechaFin,"yyyy-MM-dd")),ee("horaInicio",x.format(s.fechaInicio,"HH:mm")),ee("horaFin",x.format(s.fechaFin,"HH:mm")),ee("horaInicio2",x.format(s.fechaFin,"HH:mm")),ee("descripcion",s.descripcion),ee("link",s.link),ee("repetir","false"),ee("color",s.color),ee("todoElDia",s.todoElDia),ee("solID",s.solID),ee("client",s.client),console.log("initialEvent",s),s.invitados&&s.invitados.length>0){const fe=(s?.invitados||[]).map(De=>{const Me=De.usrNombre?.trim()||"",Ne=Me.split(/\s+/),re=Ne.length>1?(Ne[0][0]+Ne[1][0]).toUpperCase():Me.substring(0,2).toUpperCase();return{nombre:De.usrNombre||"Sin nombre",correo:De.correo||"",iniciales:re||"--",usrID:De.usuarioID??null,isHost:De.esOrganizador||!1,estatus:De.statusInvitacion,tieneConflicto:!1,disID:De.disID}});H(fe)}else H(Uh);s.solID?y(!0):y(!1)}else{const q=o||new Date,fe=new Date,De=new Date(q.getFullYear(),q.getMonth(),q.getDate(),fe.getHours(),fe.getMinutes()),Me=x.addHours(De,1);ue({titulo:"",fechaInicio:x.format(De,"yyyy-MM-dd"),horaInicio:x.format(De,"HH:mm"),fechaFin:x.format(Me,"yyyy-MM-dd"),horaFin:x.format(Me,"HH:mm"),horaInicio2:x.format(Me,"HH:mm"),todoElDia:!1,client:"",repetir:"No repetir",link:"",descripcion:"",color:Hh[0],solID:null}),f(!1),y(!1)}},[s,e,o]);const Ke=q=>({UsuarioID:q.usrID??null,Correo:q.correo,EsOrganizador:q.usrID==i,StatusInvitacion:q.estatus,disID:c??null}),Ze=ae(q=>{const fe=I.map(Me=>Ke(Me)),De={...q,invitados:fe};r(De,s?.eventoID),t(),ue(),f(!1)},q=>{console.log("Errores de validación:",q)});v.useEffect(()=>{Fe&&(ee("horaInicio","00:00"),ee("horaFin","23:59"))},[Fe,ee,me]);const Be=()=>{const q=me("fechaInicio");if(q){const fe=new Date(`${q}T00:00:00`),De=x.addDays(fe,1);ee("fechaFin",x.format(De,"yyyy-MM-dd"))}f(!0)},Ve=me("fechaInicio"),et=me("horaInicio"),mt=me("fechaFin"),k=me("horaFin"),[P,B]=v.useState(null),[ce,ie]=v.useState(null);v.useEffect(()=>{(P===null||P!==et)&&B(et)},[et,P]),v.useEffect(()=>{(ce===null||ce!==k)&&ie(k??"")},[k,ce]);const O=me("todoElDia");v.useEffect(()=>{if(O||!et||!k||!Ve||!mt)return;const q=is(Ve,et),fe=is(mt,k);if(!q||!fe||!x.isValid(q)||!x.isValid(fe))return;const De=x.isSameDay(q,fe),Me=De&&(x.isAfter(q,fe)||q.getTime()===fe.getTime()),Ne=x.isBefore(fe,q)&&!De;(Me||Ne)&&(ee("horaFin",""),ie(""))},[et,Ve]);const oe=v.useMemo(()=>{if(!et||!Ve)return eo;const q=is(Ve,et),fe=is(mt,"00:00");return!q||!fe||!x.isValid(q)||!x.isValid(fe)||x.isBefore(fe,q)&&!x.isSameDay(fe,q)?eo:x.isSameDay(q,fe)?eo.filter(De=>{const Me=is(mt,De);return Me&&x.isAfter(Me,q)}):(x.isAfter(fe,q),eo)},[et,Ve,mt]),Ce=v.useMemo(()=>eo,[]),Re=async q=>{const fe=I.some(Vt=>Vt.correo===q.correo);if(N(!0),fe)return;const De=c,Me=q.correo,Ne=q.usrID,re=Ve,Ee=et,Oe=k;if(!De||!Me||!re||!Ee||!Oe){H(Vt=>[...Vt,{...q,status:"pending",isHost:!1,hasConflict:!1,usrID:Ne,name:q.nombre}]);return}let Pe;try{Pe=await _.VerificarConflicto(De,Me,re,Ee+":00",Oe+":00")}catch{Pe={tieneConflicto:!1,usrMail:q.correo}}const wr=Array.isArray(Pe)?Pe[0]:Pe,ar={...q,estatus:"PENDIENTE",isHost:!1,tieneConflicto:String(wr.tieneConflicto).toLowerCase()==="true"};if(ar.tieneConflicto){const Vt=await _.getDisponibilidadUsuario(c,Me,re,"60");de(Vt)}H(Vt=>[...Vt,ar])},R=q=>{H(fe=>fe.filter(De=>De.nombre!==q))},te=()=>{F(!1)},xe=q=>{const Me=(q.usrNombre??"").split(" ").map(Ne=>Ne.charAt(0)).join("").toUpperCase().substring(0,2);return{nombre:q.usrNombre??"",correo:q.usrMail??"",iniciales:Me,usrID:q.usrID??0,estatus:"PENDIENTE",tieneConflicto:!1,isHost:!1}};v.useEffect(()=>{we.length>2&&c?(async()=>{const De=(await _.getUsuariosInvitados(c,we)).map(xe).filter(Me=>Me.usrID!==i&&!I.some(Ne=>Ne.correo===Me.correo));Q(De)})():Q([])},[we,I]);const Ge=q=>{se(q)},At=q=>{const{Fecha:fe,HoraInicio:De,HoraFin:Me}=q,Ne=re=>re.split(":").slice(0,2).join(":");ee("fechaInicio",fe),ee("fechaFin",fe),ee("horaInicio",Ne(De)),ee("horaFin",Ne(Me)),f(!1),te(),console.log("Formulario actualizado con sugerencia:",{Fecha:fe,HoraInicio:De,HoraFin:Me})};return l.jsx(l.Fragment,{children:l.jsx(m.Modal,{open:e,onClose:t,children:l.jsx("form",{onSubmit:Ze,children:l.jsxs(m.Box,{sx:Jk,children:[l.jsx(m.IconButton,{"aria-label":"close",onClick:t,sx:{position:"absolute",right:8,top:12},children:l.jsx(Ur,{})}),l.jsx(m.Typography,{variant:"h6",mb:2,children:s?.isGoogleEvent||s?.isOutlookEvent?l.jsxs(l.Fragment,{children:[l.jsx(bk,{sx:{mr:1}}),s.titulo||"Evento de Google"]}):s?"Editar evento":"Agregar evento"}),l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsx(hr,{name:"titulo",control:he,render:({field:q})=>l.jsx(m.TextField,{...q,label:"Título",fullWidth:!0,variant:"outlined",size:"small",error:!!J.titulo,helperText:J.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"}}})})})}),l.jsxs("div",{className:`row g-2 ${d?"mb-1":"mb-2"}`,children:[l.jsx("div",{className:"col-12 col-md-4",children:l.jsx(hr,{name:"fechaInicio",control:he,render:({field:q})=>l.jsx(m.TextField,{fullWidth:!0,...q,type:"date",placeholder:"Fecha de inicio",size:"small",InputLabelProps:{shrink:!0},error:!!J.fechaInicio,helperText:J.fechaInicio?.message})})}),d?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"col-md-3 d-none d-md-block"}),l.jsx("div",{className:"col-10 col-md-4",children:l.jsx(hr,{name:"fechaFin",control:he,render:({field:q})=>l.jsx(m.TextField,{...q,type:"date",placeholder:"Fecha de fin",fullWidth:!0,size:"small",InputLabelProps:{shrink:!0},inputProps:{min:Ie||g},error:!!J.fechaFin,helperText:J.fechaFin?.message})})}),!s&&l.jsx("div",{className:"col-2 col-md-1 d-flex align-items-start",children:l.jsx(m.IconButton,{onClick:()=>f(!1),sx:{fontSize:18},children:l.jsx(Th,{})})})]}):l.jsx("div",{className:"col-md-8"})]}),d&&l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12 d-flex justify-content-center",children:l.jsx(Ph,{sx:{color:"#757575",my:1}})})}),l.jsxs("div",{className:"row g-2 mb-2",children:[l.jsx("div",{className:"col-12 col-md-4",children:l.jsx(hr,{name:"horaInicio",control:he,render:({field:{onChange:q,value:fe,...De}})=>l.jsx(m.Autocomplete,{freeSolo:!0,options:Ce,value:fe||"",onChange:(Me,Ne)=>q(Ne||""),onInputChange:(Me,Ne)=>q(Ne),renderInput:Me=>l.jsx(m.TextField,{...Me,...De,size:"small",error:!!J.horaInicio,helperText:J.horaInicio?.message,InputProps:{...Me.InputProps,endAdornment:l.jsx(m.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:l.jsx(Ic,{})})}}),disabled:O})})}),!d&&l.jsx("div",{className:"col-1 d-flex align-items-center justify-content-center",style:{marginTop:J.horaInicio?"5px":"0px"},children:l.jsx(Ph,{sx:{color:"#757575"}})}),d&&l.jsx("div",{className:"col-md-3 d-none d-md-block"}),l.jsx("div",{className:"col-12 col-md-4",children:l.jsx(hr,{name:"horaFin",control:he,render:({field:{onChange:q,value:fe,...De}})=>l.jsx(m.Autocomplete,{freeSolo:!0,options:oe,value:fe||"",onChange:(Me,Ne)=>q(Ne||""),onInputChange:(Me,Ne)=>q(Ne),renderInput:Me=>l.jsx(m.TextField,{...Me,...De,size:"small",error:!!J.horaFin,helperText:J.horaFin?.message,InputProps:{...Me.InputProps,endAdornment:l.jsx(m.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:l.jsx(Ic,{})})}}),disabled:O})})}),!d&&l.jsx("div",{className:"col-12 col-md-2 d-flex align-items-center",children:l.jsx(hr,{name:"todoElDia",control:he,render:({field:q})=>l.jsx(m.FormControlLabel,{control:l.jsx(m.Checkbox,{checked:q.value,onChange:fe=>q.onChange(fe.target.checked)}),label:l.jsx("label",{style:{fontSize:"0.7rem",fontWeight:"normal"},children:"Todo el día"}),sx:{whiteSpace:"nowrap"}})})})]}),(!s?.isGoogleEvent||s?.isOutlookEvent)&&!d&&l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsxs(m.Button,{onClick:Be,size:"small",sx:{textTransform:"none",fontSize:16},children:[l.jsx(fk,{})," Agregar fecha final"]})})}),(!s?.isGoogleEvent||s?.isOutlookEvent)&&l.jsx("div",{className:"row mb-2",children:l.jsxs("div",{className:"col-12",children:[!h&&l.jsxs(m.Button,{onClick:()=>y(!0),size:"small",sx:{textTransform:"none",fontSize:16},children:[l.jsx(hk,{})," Vincular cliente"]}),h&&l.jsxs("div",{className:"row g-2",children:[l.jsx("div",{className:"col-10 col-md-5",children:l.jsx(hr,{name:"client",control:he,render:({field:q})=>l.jsx(m.Autocomplete,{options:w,loading:E,loadingText:"Buscando coincidencias...",getOptionLabel:fe=>fe.nombreCliente?.trim()||"",value:w.find(fe=>fe.nombreCliente===q.value)||(q.value&&typeof q.value=="string"?{solID:-1,nombreCliente:q.value}:null),noOptionsText:T,onInputChange:(fe,De)=>{b(De)},onChange:(fe,De)=>{q.onChange(De?De.nombreCliente:"")},renderInput:fe=>l.jsx(m.TextField,{...fe,placeholder:"Buscar cliente...",size:"small",InputProps:{...fe.InputProps,startAdornment:l.jsx("img",{src:ef,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"5px"}}),endAdornment:l.jsxs(l.Fragment,{children:[E?l.jsx(m.CircularProgress,{color:"inherit",size:20}):null,fe.InputProps.endAdornment]})}})})})}),l.jsx("div",{className:"col-10 col-md-5",children:l.jsx(hr,{name:"solID",control:he,render:({field:q})=>l.jsx(m.Autocomplete,{options:W,noOptionsText:"Sin resultados",getOptionLabel:fe=>fe.toString(),value:q.value??null,onChange:(fe,De)=>q.onChange(De),renderInput:fe=>l.jsx(m.TextField,{...fe,label:"#Registro",variant:"outlined",size:"small",sx:{"& .MuiInputLabel-root":{backgroundColor:"transparent !important",padding:"0 !important"}}}),disabled:!w.length})})}),l.jsx("div",{className:"col-2 d-flex align-items-center",children:l.jsx(m.IconButton,{onClick:()=>y(!1),sx:{fontSize:18},children:l.jsx(Th,{})})})]})]})}),l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsx(hr,{name:"link",control:he,render:({field:q})=>l.jsx(m.TextField,{...q,placeholder:" Agregar enlace de reunión",fullWidth:!0,variant:"outlined",size:"small",error:!!J.link,helperText:J.link?.message,InputProps:{startAdornment:l.jsx("img",{src:uk,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"8px"}})}})})})}),l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsx(hr,{name:"descripcion",control:he,render:({field:q})=>l.jsx(m.TextField,{...q,placeholder:" Agregar descripción aquí...",fullWidth:!0,multiline:!0,rows:3,inputProps:{maxLength:500},variant:"outlined",size:"small",InputProps:{startAdornment:l.jsx("img",{src:pk,width:20,style:{alignSelf:"flex-start",marginRight:"8px"}})}})})})}),l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsx(Hk,{onSelectGuest:Re,availableSuggestions:$,onInputTextChange:Ge})})}),U&&l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsx(Qk,{guests:I,conflictCount:_e,onViewSuggestions:()=>F(!0),onDeleteGuest:R})})}),s?.invitados&&s?.invitados?.length>0&&l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsx(m.Box,{children:l.jsx(Ik,{guests:I,onReenviar:u})})})}),l.jsx(Bk,{open:G,handleClose:te,suggestions:le,onSelectSlot:At}),l.jsx("div",{className:"row mb-2",children:l.jsx("div",{className:"col-12",children:l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexWrap:"wrap"},children:[l.jsx(dk,{}),Hh.map(q=>l.jsx(hr,{name:"color",control:he,render:({field:fe})=>l.jsx(m.IconButton,{onClick:()=>fe.onChange(q),sx:{width:24,height:24,borderRadius:"50%",bgcolor:q,border:fe.value===q?"2px solid":"none",borderColor:fe.value===q?"primary.main":"transparent"}})},q))]})})}),l.jsx("div",{className:"row",children:l.jsxs("div",{className:"col-12 d-flex gap-2",style:{width:"100%",marginTop:"20px"},children:[s&&!s?.isGoogleEvent&&!s?.isOutlookEvent&&l.jsx(m.Button,{onClick:n,variant:"outlined",startIcon:l.jsx("img",{src:Ih,width:15}),sx:{flex:1,textTransform:"none",backgroundColor:"#FFF5F5",color:"#d32f2f",borderColor:"red",borderRadius:"8px",fontWeight:700,fontSize:"14px",padding:"8px 0","&:hover":{backgroundColor:"#FEE2E2",borderColor:"red"}},children:"Eliminar"}),l.jsx(m.Button,{onClick:t,variant:"outlined",sx:{flex:1,textTransform:"none",fontWeight:700,fontSize:"14px",borderRadius:"8px",color:"#1976D2",borderColor:"#1976D2","&:hover":{backgroundColor:"rgba(25, 118, 210, 0.04)",borderColor:"#115293"}},children:"Cancelar"}),l.jsx(m.Button,{onClick:Ze,variant:"contained",disabled:!Se,sx:{flex:1,textTransform:"none",fontWeight:700,fontSize:"14px",borderRadius:"8px",backgroundColor:"#1976D2",boxShadow:"none","&:hover":{backgroundColor:"#115293",boxShadow:"0px 2px 4px rgba(0,0,0,0.2)"}},children:"Guardar"})]})})]})})})})},r3={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"},n3=({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 l.jsx(m.Modal,{open:e,onClose:t,children:l.jsxs(m.Box,{sx:r3,children:[l.jsxs(m.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1},children:[l.jsxs(m.Typography,{sx:{fontSize:"18px",fontWeight:"bold"},component:"h2",children:["Eventos del"," ",n.toLocaleDateString("es-ES",{weekday:"long",day:"numeric",month:"long"})]}),l.jsx(m.IconButton,{onClick:t,size:"small",children:l.jsx(Ur,{})})]}),l.jsx(m.Divider,{}),l.jsx(m.List,{sx:{mt:1},children:r.map(a=>{const c=i(a);return l.jsx(m.ListItem,{disablePadding:!0,sx:{mb:1},children:l.jsx(m.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:l.jsxs(m.Box,{sx:{flexGrow:1},children:[l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",gap:1,mb:.5},children:[l.jsx(m.Typography,{sx:{fontSize:"10px",fontWeight:"bold",px:.5,borderRadius:"3px",backgroundColor:c?.borderColor,color:"white",textTransform:"uppercase"},children:c?.label}),l.jsx(m.Typography,{sx:{fontSize:"14px",fontWeight:600,lineHeight:1.2,color:"#333"},children:a.titulo})]}),l.jsx(m.Typography,{sx:{fontSize:"12px",color:"#666"},children:a.todoElDia?"Todo el día":`${x.format(a.fechaInicio,"HH:mm")} - ${x.format(a.fechaFin,"HH:mm")}`})]})})},a.eventoID)})})]})})};var as={},Vh;function o3(){if(Vh)return as;Vh=1;var e=rt();Object.defineProperty(as,"__esModule",{value:!0}),as.default=void 0;var t=e(ht()),r=lt();return as.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"),as}var s3=o3();const i3=tt(s3);var cs={},Yh;function a3(){if(Yh)return cs;Yh=1;var e=rt();Object.defineProperty(cs,"__esModule",{value:!0}),cs.default=void 0;var t=e(ht()),r=lt();return cs.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"),cs}var c3=a3();const l3=tt(c3),u3="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",d3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAALVBMVEVHcEzfEBfjCxzkChvkChvkChzkCxvlChv////96uv60dT1o6ryho/mGyvkCxypwAsrAAAACHRSTlMAECtdiKDJ5DEbuTIAAAHoSURBVHjatdlbjsMgDAVQ87JJKHf/y51pf9CIp+vJ/SzSkUloAZc2cSEkFgEAYU7RO/o+zkdBF07hO9QnwSzJq4uLgmUkGDgzGTrORHrGcZLXlmcvMkKZaJxuH/YLTwB9ZCo6AUyivb4m7uuziwxDeLtezKsnwJiwfCH2x5hgDi8mbJ+0APaI6wo0Ju4KrIBqQNyqwFqufL3qYOD1O1DqqkQZeVd+567dwJ3fuUai0Cceg5Scm9h5v3lhED9fgzk3ceTlC4Ok+YxzLzbvk+lrCRjl6sTmzSuEn80Yr9yJzZs+Q6Tp72C9/4jdRwXDCJEDTsQzD3DkcSaeeQgUcSZuvAYmnIlnHhIxVqLWAxNjKSo9CAl0YsEGBFRiwSYEhdh5dvCuBrB5GlH3UvaikOw8ncjbha0UeffV04qJwplX7jMxUjjzUM9ET+7Mw6HoiOTIOxR5ehYunXe8SfndNlpwvo2G2XWidl4nYhQ3PYpczVMfRfxqoy9QHZbWx7nm9eK9OM5RnB84h8VPTqJA6G55toj5WtYX+K8lypMXH2KYkx64PD55vbVfwJ9pEZgfo70tYm/c2FtLds/eTHu23WdvSG7jk2a6zzV17aRER4oEUXDm1r0kT18lJB5o5n8sErN8JOEUtv9U/ACrTv/qOzhclQAAAABJRU5ErkJggg==",tl=v.forwardRef(({id:e,message:t,variant:r},n)=>{const{closeSnackbar:o}=_s.useSnackbar(),s={success:{color:"#fff",icon:l.jsx("img",{width:25,src:u3,style:{borderRadius:"50%",backgroundColor:"#4caf50",color:"white",fontSize:"12px",padding:3}})},error:{color:"#f44336",icon:l.jsx(i3,{sx:{color:"#f44336"}})},info:{color:"#2196f3",icon:l.jsx(l3,{sx:{color:"#2196f3"}})},delete:{color:"#fff",icon:l.jsx("img",{src:Ih,width:25,style:{borderRadius:"50%",backgroundColor:"#ffdfd4",color:"red",fontSize:"16px",padding:3}})},rechazar:{color:"#fff",icon:l.jsx("img",{src:d3,width:30,style:{borderRadius:"50%",color:"red",fontSize:"16px",padding:3}})}},i=s[r]||s.info;return l.jsx(_s.SnackbarContent,{ref:n,children:l.jsxs(m.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:[l.jsx(m.Box,{sx:{mr:1.5},children:i.icon}),l.jsx(m.Typography,{variant:"body2",sx:{flexGrow:1},children:t}),l.jsx(m.IconButton,{size:"small",onClick:()=>o(e),children:l.jsx(Ur,{fontSize:"small"})})]})})}),qh=v.createContext(void 0),f3=({children:e})=>{const[t,r]=v.useState([]),[n,o]=v.useState([]),[s,i]=v.useState(!1);return l.jsx(qh.Provider,{value:{googleEvents:t,setGoogleEvents:r,outlookEvents:n,setOutlookEvents:o,isLoadingGoogleEvents:s,setIsLoadingGoogleEvents:i},children:e})},p3=()=>{const e=v.useContext(qh);if(e===void 0)throw new Error("useEvents must be used within an EventsProvider");return e},h3=(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(m3(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 m3(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 g3(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 v3=(e,t,r)=>{const n=new Date(e.start.dateTime);let o=new Date(e.end.dateTime);return e.isAllDay&&o.setDate(o.getDate()-1),{eventoID:Math.abs(g3(e.id)),titulo:e?.summary||"(Sin título)",descripcion:e.body?.content||"",fechaInicio:n,fechaFin:o,todoElDia:e.isAllDay,color:"#0078D4",hasVideoCall:!!e.onlineMeetingUrl,link:e.webLink,repetir:void 0,solID:null,disID:t,client:null,usrID:r,solicitudRelacionada:[],isGoogleEvent:!1,isOutlookEvent:!0}},Zh="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",y3="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='none'%3e%3cpath%20fill='%23fff'%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",b3=({open:e,onClose:t,onConfirm:r,title:n,description:o,icon:s,confirmText:i,confirmColor:a="#d32f2f",loading:c=!1})=>l.jsxs(m.Dialog,{open:e,onClose:t,PaperProps:{sx:{borderRadius:"15px",p:1,maxWidth:"400px"}},children:[l.jsx(m.Box,{sx:{display:"flex",justifyContent:"flex-end"},children:l.jsx(m.IconButton,{onClick:t,size:"small",children:l.jsx(Ur,{fontSize:"small"})})}),l.jsxs(m.DialogContent,{sx:{textAlign:"center",pt:0},children:[l.jsx(m.Box,{sx:{mb:2,display:"flex",justifyContent:"center"},children:s}),l.jsx(m.Typography,{variant:"h6",sx:{fontWeight:"bold",mb:2},children:n}),l.jsx(m.Typography,{variant:"body2",sx:{color:"#555",mb:4,px:2},children:o}),l.jsxs(m.Box,{sx:{display:"flex",gap:2,justifyContent:"center",mb:2},children:[l.jsx(m.Button,{variant:"outlined",onClick:t,sx:{textTransform:"none",borderRadius:"8px",px:4,borderColor:"#1976D2",color:"#1976D2"},children:"Regresar"}),l.jsxs(m.Button,{variant:"contained",onClick:r,disabled:c,sx:{textTransform:"none",borderRadius:"8px",px:4,bgcolor:a,"&:hover":{bgcolor:"#b71c1c"}},children:[i=="Eliminar"&&l.jsx("img",{src:y3,width:15,style:{marginRight:6,marginBottom:2}}),c?"Procesando...":i]})]})]})]}),x3=({userId:e,leads30Days:t,leads90Days:r,disId:n,masNombreBD:o})=>{const[s,i]=v.useState(new Date),[a,c]=v.useState([]),[u,d]=v.useState(!1),[f,h]=v.useState(null),[y,g]=v.useState(!1),[p,b]=v.useState(null),[w,S]=v.useState([]),{enqueueSnackbar:E}=_s.useSnackbar(),C=Tc(),_=Mi(),W=Sc(),[D,T]=v.useState(!1),[M,I]=v.useState([]),[H,G]=v.useState(null),{session:F,sessionoutlook:Y}=lc(),{googleEvents:se,setGoogleEvents:U,outlookEvents:N,setOutlookEvents:le}=p3(),[de,$]=v.useState([]),[Q,we]=v.useState([]),[_e,he]=v.useState([]),[ae,ue]=v.useState(!1),[J,Se]=v.useState([]),[me,ee]=v.useState(),Ie=(re,Ee)=>{I(re),G(Ee),T(!0)},j=async()=>{if(e===void 0)return;const re=await C.getNotificacionesXUsuario(e,!1);Se(re)};v.useEffect(()=>{const re=new Date,Ee=x.startOfDay(re),Oe=x.endOfDay(x.addDays(Ee,6)),Pe={start:Ee,end:Oe},wr=a.filter(ar=>{const Vt={start:ar.fechaInicio,end:ar.fechaFin};return Ud(Vt,Pe)}).sort((ar,Vt)=>ar.fechaInicio.getTime()-Vt.fechaInicio.getTime());S(wr)},[a]),v.useEffect(()=>{const re=async()=>{try{if(e){const Oe=await C.getEventsByUser(e);j(),c(Oe)}}catch(Oe){console.log("Error al cargar eventos locales:",Oe)}};re();const Ee=setInterval(re,4e3);return()=>clearInterval(Ee)},[e]),v.useEffect(()=>{if(!n||!e)return;const re=[...a];if(se.length>0&&F?.userEmail){const Ee=se.map(Oe=>h3(Oe,n,e));re.push(...Ee)}if(N.length>0&&Y?.userEmail){const Ee=N.map(Oe=>v3(Oe,n,e));re.push(...Ee)}$(re)},[a,se,N,n,e,F?.userEmail,Y?.userEmail]);const Fe=async re=>{try{if(re?.isGoogleEvent||re.isOutlookEvent)h(re),d(!0);else{const Ee=await C.getEventById(re.eventoID);h(Ee),d(!0)}}catch(Ee){console.error(Ee)}},Ke=()=>{d(!1),h(null)},Ze=async(re,Ee)=>{let Oe,Pe;re.todoElDia?(Oe=new Date(`${re.fechaInicio}T${re.horaInicio}`),Pe=new Date(`${re.fechaInicio}T${re.horaFin}`)):(Oe=new Date(`${re.fechaInicio}T${re.horaInicio}`),Pe=re.fechaFin&&re.horaFin?new Date(`${re.fechaFin}T${re.horaFin}`):new Date(`${re.fechaInicio}T${re.horaFin}`));const wr=x.format(Oe,"yyyy-MM-dd HH:mm:ss.SSS"),ar=x.format(Pe,"yyyy-MM-dd HH:mm:ss.SSS");if(Ee){const Jr={...re,eventoID:Ee,fechaInicio:wr,fechaFin:ar,solID:re.solID??null,disID:n??null,client:re.client,invitados:re.invitados.map(Ye=>({usrNombre:Ye.nombre||Ye.usrNombre,Correo:Ye.correo||Ye.Correo,EsOrganizador:Ye.isHost||Ye.EsOrganizador,StatusInvitacion:Ye.StatusInvitacion,UsuarioID:Ye.usrID||Ye.UsuarioID,disID:Ye.disID||n}))};try{const Ye=await C.updateEvent(Jr);var Vt=a.map(Sr=>Sr.eventoID===Ye.eventoID?Ye:Sr);c(Vt),E("El evento se ha actualizado correctamente.",{variant:"success"}),Ke()}catch{E("Error al actualizar Evento",{variant:"error"})}}else{const Jr={...re,fechaInicio:wr,fechaFin:ar,todoElDia:re.todoElDia,solID:re.solID??null,disID:n??null,client:re.client,invitados:re.invitados.map(Ye=>({usrNombre:Ye.nombre||Ye.usrNombre,Correo:Ye.correo||Ye.Correo,EsOrganizador:Ye.isHost||Ye.EsOrganizador,StatusInvitacion:Ye.StatusInvitacion,UsuarioID:Ye.usrID||Ye.UsuarioID,disID:Ye.disID||n}))};try{const Ye=await C.createEvent(Jr,e);c(Sr=>[...Sr,Ye]),E("El evento se ha creado con éxito",{variant:"success"}),Ke()}catch{E("Error al guardar Evento",{variant:"error"})}}if(e){const Jr=await C.getEventsByUser(e);c(Jr)}},Be=()=>{i(re=>new Date(re.getFullYear(),re.getMonth()-1,1))},Ve=()=>{i(re=>new Date(re.getFullYear(),re.getMonth()+1,1))},et=()=>{fe("ELIMINAR")},mt=()=>{fe("RECHAZAR")},k=()=>{b(new Date),d(!0)},P=re=>{re&&i(re)},B=re=>{b(re),d(!0),h(null)},ce=async()=>{if(f)try{await C.deleteEvent(f.eventoID),c(a.filter(re=>re.eventoID!==f.eventoID)),E("El evento se ha eliminado de tu calendario",{content:(re,Ee)=>l.jsx(tl,{id:re,message:String(Ee),variant:"delete"})})}catch{E("Error al eliminar Evento",{variant:"error"})}finally{Ke(),De()}},ie=async()=>{if(!(!F?.userEmail||!n)){ue(!0);try{const Ee=(await _.getGoogleCalendars(F.userEmail,n)).map(Pe=>({...Pe,selected:!0}));we(Ee);const Oe=Ee.map(Pe=>Pe.id);Re(Oe)}catch(re){console.error("Error Google Cals:",re)}finally{ue(!1)}}},O=async re=>{const Ee=Q.map(Pe=>Pe.id===re?{...Pe,selected:!Pe.selected}:Pe);we(Ee);const Oe=Ee.filter(Pe=>Pe.selected).map(Pe=>Pe.id);Re(Oe)},oe=async()=>{if(!(!Y?.userEmail||!n)){ue(!0);try{const Ee=(await W.getOutlookCalendars(Y.userEmail,n)).map(Pe=>({...Pe,selected:!0}));he(Ee);const Oe=Ee.map(Pe=>Pe.id);R(Oe)}catch(re){console.error("Error Outlook Cals:",re)}finally{ue(!1)}}},Ce=async re=>{const Ee=_e.map(Pe=>Pe.id===re?{...Pe,selected:!Pe.selected}:Pe);he(Ee);const Oe=Ee.filter(Pe=>Pe.selected).map(Pe=>Pe.id);R(Oe)};v.useEffect(()=>{ie()},[F?.userEmail,n]),v.useEffect(()=>{oe()},[Y?.userEmail,n]);const Re=async re=>{if(!F?.userEmail||!n)return;const Ee=re||Q.filter(Oe=>Oe.selected).map(Oe=>Oe.id);try{const Oe={disID:n,year:s.getFullYear(),month:s.getMonth()+1,usrMail:F.userEmail,calendarIds:Ee},Pe=await _.getGoogleEventsByMonth(Oe);U(Pe)}catch(Oe){console.error("Error al obtener eventos de Google:",Oe)}},R=async re=>{if(!Y?.userEmail||!n)return;const Ee=re||_e.filter(Oe=>Oe.selected).map(Oe=>Oe.id);try{const Oe={disID:n,year:s.getFullYear(),month:s.getMonth()+1,usrMail:Y.userEmail,calendarIds:Ee},Pe=await W.getOutlookEventsByMonth(Oe);le(Pe)}catch(Oe){console.error("Error al obtener eventos de Outlook:",Oe)}};if(n===void 0||e===void 0)return l.jsx("div",{children:"Cargando configuración de usuario..."});const te=async(re,Ee)=>{await C.UpdateStatusEvento(re.evento.eventoID,e,Ee)&&(await C.MarcarLeido(re.notificacionID,e),E(re?.evento?.titulo+" fue agregado a tu calendario",{variant:"success"}))},xe=async()=>{me&&C.UpdateStatusEvento(me.evento.eventoID,e,"RECHAZADA")&&(await C.MarcarLeido(me.notificacionID,e),await C.MarcarLeido(me.notificacionID,e),E("Haz rechazado la Invitación a "+me?.evento?.titulo,{content:(Ee,Oe)=>l.jsx(tl,{id:Ee,message:String(Oe),variant:"rechazar"})}),De())},Ge=async(re,Ee)=>{try{if(!e)return;ee(re),Ee=="RECHAZADA"?(mt(),console.log("noti",re)):te(re,Ee)}catch{E("Error al procesar la invitación",{variant:"error"})}},At=async re=>{try{if(!f)return;(await C.ReenviarNotificacion(f?.eventoID,re)).Message&&E("Invitacion enviada con exito",{variant:"success"})}catch(Ee){console.error("Error al conectar con la API",Ee)}},[q,fe]=v.useState(null),De=()=>fe(null),Me={RECHAZAR:{title:"Rechazar invitación",confirmText:"Rechazar evento",description:l.jsxs(l.Fragment,{children:["Estás a punto de declinar la invitación de ",l.jsx("strong",{children:me?.evento?.nombreAnfitrion})," a ",l.jsx("strong",{children:me?.evento?.titulo})]}),icon:l.jsx("img",{src:Zh}),action:()=>me&&xe()},ELIMINAR:{title:"Eliminar evento",confirmText:"Eliminar",description:"¿De verdad deseas eliminar este evento? Esta acción no se puede deshacer.",icon:l.jsx("img",{src:Zh}),action:()=>ce()},DESVINCULAR:{title:"Desvincular Outlook",confirmText:"Desvincular",description:"Si desvinculas tu cuenta, perderás acceso a todos los eventos sincronizados.",icon:"",action:()=>ce}},Ne=q?Me[q]:null;return l.jsxs("div",{id:"Agenda",style:{height:"100%",width:"100%"},children:[l.jsx(fy,{header:l.jsx(M2,{currentDate:s,onPrevMonth:Be,onNextMonth:Ve,onAddEvent:k,onDateChange:P}),sidebar:l.jsx(uw,{onEventClick:Fe,upcomingEvents:w,leads30Days:t,leads90Days:r,disID:n,usrID:e,onAddEvent:k,googleCalendars:Q,outlookCalendars:_e,isLoadingCalendars:ae,onToggleGoogle:O,onToggleOutlook:Ce,notifications:J,unreadCount:J?.filter(re=>!re.leida).length,onAceppInvitacion:Ge}),mainContent:l.jsx(Cw,{onSeeMoreClick:Ie,currentDate:s,events:de,onDayClick:B,onEventClick:Fe})}),u&&l.jsx(t3,{isVisible:u,onClose:Ke,onSave:Ze,onDelete:et,selectedDate:p,initialEvent:f,userId:e,masNombreBD:o,disId:n,onReenviar:At}),l.jsx(n3,{isOpen:D,onClose:()=>T(!1),events:M,date:H,onEventClick:Fe}),Ne&&l.jsx(b3,{open:!!q,onClose:De,onConfirm:()=>{Ne.action()},title:Ne.title,description:Ne.description,icon:Ne.icon,confirmText:Ne.confirmText})]})},_3="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",w3="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 rl(e,t,r){return e.accessor?e.accessor(t,r):e.field?t?.[e.field]:t?.[e?.key||""]}function S3(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 nl(e,t,r=!0){return typeof e=="function"?e(t):e??r}function C3(e){return e.replace(/[^\d]/g,"")}function E3(e,t){return t}var ls={},Gh;function D3(){if(Gh)return ls;Gh=1;var e=rt();Object.defineProperty(ls,"__esModule",{value:!0}),ls.default=void 0;var t=e(ht()),r=lt();return ls.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"),ls}var k3=D3();const A3=tt(k3);var us={},Kh;function T3(){if(Kh)return us;Kh=1;var e=rt();Object.defineProperty(us,"__esModule",{value:!0}),us.default=void 0;var t=e(ht()),r=lt();return us.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"),us}var I3=T3();const M3=tt(I3);var ds={},Qh;function P3(){if(Qh)return ds;Qh=1;var e=rt();Object.defineProperty(ds,"__esModule",{value:!0}),ds.default=void 0;var t=e(ht()),r=lt();return ds.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"),ds}var O3=P3();const j3=tt(O3);var fs={},Xh;function R3(){if(Xh)return fs;Xh=1;var e=rt();Object.defineProperty(fs,"__esModule",{value:!0}),fs.default=void 0;var t=e(ht()),r=lt();return fs.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"),fs}var N3=R3();const $3=tt(N3);function Jh(e){return e==="right"?"end":e==="center"?"center":"start"}function e0(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 L3=1060,ol=(e,t)=>e.metrics.find(r=>String(r.label).toLowerCase()===t.toLowerCase())?.value??"";function z3({sections:e,detailColumns:t,summaryWidths:r=["1fr",120,120,150],minWidth:n=L3,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 u(d){const f=d.reduce((g,p)=>g+c(p.width),0),h=Math.max(d.length-1,0)*16;return f+h+32}return l.jsx(m.Box,{sx:{border:"1px solid rgba(0,0,0,0.15)",overflow:"hidden",bgcolor:"background.paper",width:"100%"},children:l.jsxs(m.Box,{children:[l.jsx(m.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=>l.jsx(m.Typography,{sx:{fontSize:13,fontWeight:800},children:d},d))}),e.map((d,f)=>{const[h,y]=K.useState(!!d.initiallyOpen),g=f%2===1,p=o?o(d):t,b=Math.max(n,u(p));return l.jsxs(m.Box,{children:[l.jsxs(m.Box,{sx:{display:"grid",gridTemplateColumns:r.map(w=>typeof w=="number"?`${w}px`:w).join(" "),columnGap:"16px",alignItems:"center",px:"16px",py:1,bgcolor:g?"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(w=>!w),children:[l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[l.jsx(m.IconButton,{size:"small",disableRipple:!0,children:h?l.jsx($3,{}):l.jsx(j3,{})}),l.jsx(m.Typography,{sx:{fontWeight:700,fontSize:14,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:String(d.title),children:d.title})]}),l.jsx(m.Typography,{sx:{fontSize:13.5,fontWeight:800},children:ol(d,"En Proceso")}),l.jsx(m.Typography,{sx:{fontSize:13.5,fontWeight:800},children:ol(d,"Finalizadas")}),l.jsx(m.Typography,{sx:{fontSize:13.5,fontWeight:800},children:ol(d,"Último seg.")})]}),l.jsx(m.Collapse,{in:h,unmountOnExit:!0,children:l.jsxs(m.Box,{sx:{overflowX:"auto","&::-webkit-scrollbar":{height:"5px"}},children:[l.jsx(m.Box,{sx:{minWidth:b,display:"grid",gridTemplateColumns:e0(p),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:p.map(w=>l.jsx(m.Typography,{sx:{justifySelf:Jh(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)=>l.jsx(m.Box,{sx:{minWidth:b,display:"grid",gridTemplateColumns:e0(p),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:p.map((E,C)=>{const _=E.accessor?E.accessor(w,S):E.field?w[E.field]:null;return l.jsx(m.Box,{sx:{justifySelf:Jh(E.align),textAlign:E.align??"left",minWidth:0,overflow:"hidden",maxWidth:"100%"},children:typeof _=="string"||typeof _=="number"?l.jsx(m.Typography,{sx:{fontSize:13,fontWeight:/^(estatus|seg|avance|nivel|asesor|fecha)$/i.test(E.key)?700:500,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:String(_),children:_}):_},E.key??C)})},w.id??S))]})})]},d.id)})]})})}var ps={},t0;function B3(){if(t0)return ps;t0=1;var e=rt();Object.defineProperty(ps,"__esModule",{value:!0}),ps.default=void 0;var t=e(ht()),r=lt();return ps.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"),ps}var F3=B3();const W3=tt(F3),H3=e=>e?new Date(e).toLocaleDateString("es-MX",{day:"2-digit",month:"short",year:"numeric"}).replace(".",""):"",U3=e=>{const t=`${e?.Nombre??""} ${e?.Apellido??""}`.trim();return t||(e?.IdAsesor?e?.Correo??"Usuario":"Sin asesor asignado")},V3=e=>{const t=(e||"").split(" ").filter(Boolean);return t.length>=2?(t[0][0]+t[1][0]).toUpperCase():(e?.[0]??"?").toUpperCase()};var hs={},r0;function Y3(){if(r0)return hs;r0=1;var e=rt();Object.defineProperty(hs,"__esModule",{value:!0}),hs.default=void 0;var t=e(ht()),r=lt();return hs.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"),hs}var q3=Y3();const Z3=tt(q3),sl=({current:e=0,total:t=0,color:r="#4caf50"})=>l.jsx("div",{style:{display:"flex",gap:"1px",width:"100%",height:"100%",justifyContent:"center",overflow:"hidden",minWidth:0},children:Array.from({length:t}).map((n,o)=>l.jsx("div",{style:{width:"7px",height:"7px",borderRadius:"2px",backgroundColor:o<e?r:"#e0e0e0",display:"flex"}},o))});var ms={},n0;function G3(){if(n0)return ms;n0=1;var e=rt();Object.defineProperty(ms,"__esModule",{value:!0}),ms.default=void 0;var t=e(ht()),r=lt();return ms.default=(0,t.default)((0,r.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),ms}var K3=G3();const o0=tt(K3),Q3=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"}},X3=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}},J3=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}},eA=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 tA(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 rA(e){return e.replace(/<br\s*\/?>/gi,`
|
|
178
178
|
`).replace(/\r\n/g,`
|
|
179
179
|
`).replace(/\r/g,`
|
|
180
|
-
`)}const Q3={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"]},X3={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"]},J3={Todos:[],"Algo interesado":["Algo interesado"],Interesado:["Interesado"],"Muy interesado":["Muy interesado"],"Venta definitiva":["Venta definitiva"],"No sé":["No sé"]};function eA(e,t){switch(e){case"pruebas":return q3(t)??"—";case"servicio":return Z3(t)??"—";case"nuevos":case"seminuevos":default:return Y3(t)??"—"}}function tA({open:e,onClose:t,customer:r,fields:n=[],header:o,extraSections:s,normalTable:i,normalTableColumns:a=[],history:c=[],advisorHistory:u=[],onRequestEdit:d,searchFilter:f,urlsQA:h,solicitudesNuevos:v=[],solicitudesPrueba:m=[],solicitudesServicio:p=[],solicitudesSeminuevos:b=[],onCreateSolicitud:w,isCrmMode:C=!1,onSolicitudBaseUrl:E,onIframeClose:S,reloadInfo:_,idAdminSistemas:W}){if(!r)return null;const D=3,[A,M]=y.useState(null),I=!!A,[V,G]=y.useState(!1),[F,Y]=y.useState(null),[oe,U]=y.useState(c??[]),[N,ce]=y.useState(null),fe=y.useMemo(()=>[...u].sort((L,J)=>new Date(J.FechaAsignacion).getTime()-new Date(L.FechaAsignacion).getTime()),[u]);y.useEffect(()=>{c&&c.length&&U(c)},[c]);const $=c?.length?c:oe,Q=o?.title??(L=>L?.Nombre||L?.name||"Sin título"),Ce=o?.infoItems??[],me=L=>L.nombreAsesor?.trim()||(L.Email?L.Email:"Sistema"),we=L=>{const J=L||"",be=J.split(" ").filter(Boolean);return be.length>=2?(be[0][0]+be[1][0]).toUpperCase():(J[0]||"?").toUpperCase()},ae=L=>L?.SolID??L?.solID??L?.SolId??L?.SOLID??null,ee=y.useMemo(()=>{const L=$??[];return Array.isArray(L?.[0])?L.flat():L},[$]),le=y.useMemo(()=>{const L=ee;return!N||F==null?L:L.filter(J=>{const be=ae(J);return be!=null&&String(be)===String(F)})},[ee,N,F]),ge=y.useMemo(()=>[...le].sort((L,J)=>new Date(J.fecAlta).getTime()-new Date(L.fecAlta).getTime()),[le]),[ie,pe]=y.useState(!1),Re=y.useMemo(()=>ie?ge:ge.slice(0,D),[ie,ge]),j=Math.max(ge.length-D,0),We=L=>String(L??"").normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase().trim(),qe=(L,J)=>We(JSON.stringify(L)).includes(We(J)),Ze=(L,J)=>f?f(L,J):qe(L,J),Ne=(L,J)=>{const be=We(J).split(/\s+/).filter(Boolean);return be.length?be.every(Ie=>Ze(L,Ie)):!0},[Be,vt]=y.useState(""),[pt,k]=y.useState([]);y.useMemo(()=>i??[],[i]),y.useMemo(()=>{const L=Be.trim();return L?(i??[]).filter(J=>Ne(J,L)):i??[]},[i,Be]);const P=g.useTheme(),B=g.useMediaQuery(P.breakpoints.down("md")),[ue,se]=y.useState(""),[O,ne]=y.useState(!0),[Se,Oe]=y.useState(!1),R=new Date().toISOString().slice(0,10),te=new Date(Date.now()-720*3600*1e3).toISOString().slice(0,10),[_e,Ge]=y.useState(te),[q,de]=y.useState(R),[Ee,Ae]=y.useState(null),Fe=!!Ee,[X,Me]=y.useState("En Proceso"),[ke,je]=y.useState("Todos"),[Gt,er]=y.useState("Todos"),Yt=["Algo interesado","Interesado","Muy interesado","Venta definitiva","No sé"],Vr=["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"],Ke=()=>{se(""),ne(!1),Oe(!1),Ge(te),de(R),Me("Todos"),je("Todos"),er("Todos")},wr=y.useMemo(()=>(ue??"").trim()!==""||X!=="Todos"||ke!=="Todos"||O||Se||Gt!=="Todos",[ue,X,ke,O,Se,Gt]);function An(L){if(!L)return"";const J=new Date(L);if(isNaN(J.getTime()))return"";const be=String(J.getDate()).padStart(2,"0"),Ie=String(J.getMonth()+1).padStart(2,"0"),At=String(J.getFullYear()).slice(-2);return`${be}/${Ie}/${At}`}function na(L){const J=L?new Date(L):null;return J&&!isNaN(J.getTime())?J:null}function cl(L,J){let be=null;for(const Ie of L){const At=na(J(Ie));if(At){const St=At.getTime();(be===null||St>be)&&(be=St)}}return be?new Date(be):null}function ys(L){const J=cl(L,be=>be.UltimoSeguimiento||be.FechaCita);return J?An(J.toISOString()):"—"}function bs(L){const J=(L??"").toLowerCase().trim();return J==="sin venta"||J==="con venta"||J==="rechazada"||J==="rechazadas"}function oa(L){return L.filter(J=>bs(J.EstatusDescripcion)).length}function sa(L){return L.filter(J=>!bs(J.EstatusDescripcion)).length}const ll=({progress:L,color:J})=>{if(!L)return l.jsx(ol,{current:0,total:0,color:J});const be=L.split("/").map(Number);if(be.length!==2||be.some(St=>Number.isNaN(St)))return l.jsx(ol,{current:0,total:0,color:J});const[Ie,At]=be;return l.jsx(ol,{current:Ie,total:At,color:J})};function ia(L){return[{key:"fecha",header:"Fecha",accessor:J=>An(J.Fecha),width:110},{key:"vehiculo",header:"Vehículo",accessor:J=>l.jsx(g.Tooltip,{title:J.Vehiculo??"",placement:"top",arrow:!0,children:l.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:J.Vehiculo??"—"})}),width:260},{key:"estatus",header:"Estatus",accessor:J=>l.jsx(g.Typography,{sx:{fontWeight:800,fontSize:13},children:eA(L,J.IdEstatus)}),width:170},{key:"nivel",header:"Nivel de Interés",accessor:J=>{const{bg:be,color:Ie}=V3(J.NivelInteres);return l.jsx(g.Box,{sx:{display:"inline-block",px:1,py:.25,borderRadius:9999,bgcolor:be,color:Ie,fontSize:12,fontWeight:J.NivelInteres?800:500},children:J.NivelInteres??"—"})},width:150},{key:"asesor",header:"Asesor",accessor:J=>{const be=(J.Asesor??"").trim(),Ie=ul=>{if(!ul)return"";const EA=ul[0]?.toUpperCase()??"",DA=ul[1]?.toLowerCase()??"";return`${EA}${DA}`};if(!be)return l.jsx(g.Tooltip,{title:"",placement:"top",children:l.jsx(g.Typography,{sx:{fontWeight:700,fontSize:13,textAlign:"center"},children:"—"})});const At=be.split(/\s+/),St=At[0]??"",Pr=At[1]??"",Sr=Ie(St),Tn=Ie(Pr),CA=`${Sr}${Tn}`||"—";return l.jsx(g.Tooltip,{title:be,placement:"top",children:l.jsx(g.Typography,{sx:{fontWeight:700,fontSize:13,textAlign:"center"},children:CA})})},width:120,align:"center"},{key:"origen",header:"Origen",accessor:J=>J.Origen??"—",width:120,align:"center"},{key:"actividad",header:"Actividad",accessor:J=>l.jsx(g.Tooltip,{title:J.Actividad??"",placement:"top",arrow:!0,children:l.jsxs(g.Box,{sx:{maxWidth:160,overflow:"hidden",display:"flex",gap:.5,alignItems:"center"},children:[J.Icon&&l.jsx("span",{style:{color:"#fff",backgroundColor:J.Color,borderRadius:100,alignItems:"center",justifyContent:"center",display:"flex",padding:3},children:l.jsx("i",{className:J.Icon})}),l.jsx(g.Typography,{component:"span",noWrap:!0,sx:{fontSize:13,fontWeight:500,display:"block",overflow:"hidden",textOverflow:"ellipsis",lineHeight:1.3,cursor:(J.Actividad??"").length?"default":"inherit"},children:J.Actividad??"—"})]})}),width:180},{key:"avance",header:"Avance",accessor:J=>l.jsx(ll,{progress:J.Avance,color:J.Color}),width:200,align:"left"}]}function T(L){const be=ia(L).slice(1);return[{key:"fecha",header:"Fecha",accessor:Ie=>An(Ie.Fecha),width:110},{key:"fechaCita",header:"Fecha Cita",accessor:Ie=>An(Ie.FechaCita),width:120},{key:"horaCita",header:"Hora Cita",accessor:Ie=>Ie.HoraCita??"—",width:110},...be]}function re(L){const J=L.kind;switch(J){case"pruebas":case"servicio":return T(J);case"nuevos":case"seminuevos":default:return ia(J)}}function ye(L,J,be,Ie){return{id:L,kind:be,title:J,metrics:[{label:"En Proceso",value:sa(Ie)},{label:"Finalizadas",value:oa(Ie)},{label:"Último seg.",value:ys(Ie)}],rows:Ie,initiallyOpen:!1}}const Pe=[ye("n-1","Cotización de nuevos","nuevos",v),ye("p-1","Prueba de Manejo","pruebas",m),ye("s-1","Cita de Servicio","servicio",p),ye("sn-1","Cotización para Seminuevos","seminuevos",b)],Qe=y.useMemo(()=>{const L=(ue??"").trim().toLowerCase(),J=(be,Ie)=>{if(L&&!(be.Vehiculo??"").toLowerCase().includes(L))return!1;const At=Se?be.FechaCita:be.Fecha;if(O&&At){const St=na(At??"");if(!St)return!1;const Pr=_e?new Date(`${_e}T00:00:00`):null,Sr=q?new Date(`${q}T00:00:00`):null;if(Sr&&Sr.setDate(Sr.getDate()+1),Pr&&St<Pr||Sr&&St>=Sr)return!1}if(X!=="Todos"){const St=(be.EstatusDescripcion??"").toLowerCase();if(!(Q3[X]??[]).some(Tn=>St===Tn.toLowerCase()))return!1}if(ke!=="Todos"){const St=(be.Actividad??"").toLowerCase();if(!(X3[ke]??[]).some(Tn=>St===Tn.toLowerCase()))return!1}if(Gt!=="Todos"){const St=(be.NivelInteres??"").toLowerCase();if(!(J3[Gt]??[]).some(Tn=>St===Tn.toLowerCase()))return!1}return!0};return Pe.map(be=>{const Ie=(be.rows??[]).filter(St=>J(St,be.kind)),At=[{label:"En Proceso",value:sa(Ie)},{label:"Finalizadas",value:oa(Ie)},{label:"Último seg.",value:ys(Ie)}];return{...be,rows:Ie,metrics:At}})},[Pe,ue,O,_e,q,Se,X,ke,Gt]),lt={nuevos:"cotizaciones",pruebas:"pruebademanejo",servicio:"citasservicio",seminuevos:"seminuevos"},Ye=(L,J)=>{const be=L.SolID;if(!be)return;const Ie=J.kind,At=lt[Ie]??"cotizaciones",St=h?`https://qa2.crm.netcar.com.mx/netcar/${At}/${be}`:`https://crmxs.netcar.com.mx/netcar/${At}/${be}`,Pr=E?.({row:L,section:J,slug:At,solId:be,baseUrl:St});if(!C){const Sr=Pr??St;Y(be),ce(Sr),G(!0)}},Ue=()=>{S?.(r),Y(null),ce(null),G(!1)},Ht=y.useRef(!1),mt=y.useRef(null),Pt=y.useCallback(()=>{if(!Ht.current){Ht.current=!0;return}mt.current&&window.clearTimeout(mt.current),mt.current=window.setTimeout(()=>{_?.(r)},500)},[_,r]);return y.useEffect(()=>{Ht.current=!1,mt.current&&window.clearTimeout(mt.current)},[N,F]),l.jsx(g.Dialog,{open:e,onClose:t,fullWidth:!0,fullScreen:B,PaperProps:{sx:{height:{xs:"100dvh",md:"90vh"},maxWidth:{xs:"100vw",md:"92vw"},overflow:"hidden",display:"flex",flexDirection:"column",borderRadius:{xs:0,md:3}}},children:l.jsxs(g.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},height:"100%",minHeight:0,overflow:"auto",position:"relative"},children:[l.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:[l.jsxs(g.Box,{children:[l.jsx(g.Stack,{direction:"row",spacing:2,alignItems:"center",mb:1,sx:{px:2.5,pt:2.5},children:l.jsxs(g.Box,{display:"flex",flexDirection:"column",gap:1,width:"100%",children:[l.jsx(g.Box,{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%",alignItems:"center",children:l.jsx(g.Box,{sx:{flex:1,minWidth:0,pr:1},children:l.jsxs(g.Typography,{component:"span",fontWeight:700,sx:{display:"inline",lineHeight:1.2,wordBreak:"break-word",pr:.5},children:[Q(r)," ",l.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:l.jsx(W3,{sx:{fontSize:"1em"}})})]})})}),Ce.map((L,J)=>l.jsxs(g.Box,{sx:{display:"flex",gap:1.2,alignItems:"center",cursor:L.onClick?"pointer":"default"},onClick:()=>{L.onClick&&L.onClick(r)},children:[L.icon,l.jsx(g.Typography,{variant:"body2",sx:{color:L.inLink?"#336BE1":"#070C10"},style:{},children:L.value(r)})]},J))]})}),l.jsx(g.Stack,{mb:2,sx:{px:2.5,pt:0,gap:2},children:n.map((L,J)=>{const be=L.label?.toLowerCase().startsWith("asesor");return l.jsxs(g.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[l.jsx(g.Box,{sx:{width:"50%"},children:l.jsx(g.Typography,{variant:"body2",color:"text.secondary",sx:{color:"#5C6372"},children:L.label})}),l.jsxs(g.Box,{sx:{width:"50%",display:"flex",alignItems:"center",gap:1},children:[l.jsx("div",{children:L?.avatar?L.avatar(r):null}),l.jsx(g.Typography,{variant:"body2",color:"textPrimary",children:L?.value(r)}),be&&!W&&l.jsx(g.Tooltip,{title:"Historial asesores",placement:"top",arrow:!0,children:l.jsx(g.IconButton,{size:"small",onClick:Ie=>M(Ie.currentTarget),sx:{ml:.5},disableRipple:!0,children:l.jsx(N3,{fontSize:"small",sx:{color:"#5C6372"}})})})]})]},J)})}),l.jsx(g.Divider,{sx:{my:2}})]}),l.jsx(g.Box,{px:2.5,pb:.5,children:l.jsxs(g.Typography,{children:[l.jsx("span",{style:{fontWeight:800},children:"Última actividad"}),!N&&" por solicitud",":"]})}),l.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:[Re.length===0&&l.jsx(g.Typography,{variant:"body2",color:"text.secondary",children:"Sin actividad registrada."}),l.jsxs(g.Box,{children:[Re?.map((L,J)=>{const be=me(L),Ie=K3(L.comentario||"");return l.jsxs(g.Box,{sx:{pb:1.5},children:[l.jsxs(g.Stack,{direction:"row",spacing:1,alignItems:"center",justifyContent:"space-between",sx:{mb:.75},children:[l.jsx(g.Typography,{variant:"subtitle2",sx:{color:"#5C6372"},children:L.tipo||"Evento"}),l.jsx(g.Chip,{size:"small",label:L.auto!=null?`${L.auto}`:"—",sx:{bgcolor:"#336be1",color:"#fff",height:20}})]}),Ie?l.jsx(g.Typography,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.5,mb:.75},children:Ie}):null,l.jsxs(g.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[L?.ImgAsesor!=null?l.jsx(g.Avatar,{sx:{width:28,height:28,bgcolor:"#EAEBF2",color:"#5C6372",fontSize:14},alt:we(be),src:L?.ImgAsesor}):l.jsx(g.Avatar,{sx:{width:28,height:28,bgcolor:"#EAEBF2",color:"#5C6372",fontSize:14},children:we(be)}),l.jsxs(g.Stack,{spacing:0,children:[l.jsx(g.Typography,{variant:"body2",fontWeight:600,children:be}),l.jsx(g.Typography,{variant:"caption",color:"text.secondary",children:G3(L.fecAlta)})]})]}),J<Re.length-1&&l.jsx(g.Divider,{sx:{mt:1.25}})]},L.segID??J)}),ge.length>D&&l.jsx(g.Box,{sx:{mt:1},children:l.jsx(g.Button,{onClick:()=>pe(L=>!L),size:"small",sx:{textTransform:"none",px:0,color:"#336BE1","&:hover":{background:"transparent",textDecoration:"underline"}},children:ie?"Ver menos":`Ver más (${j})`})})]})]}),l.jsx(g.Menu,{anchorEl:A,open:I,onClose:()=>M(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:l.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[l.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"}),l.jsxs(g.Box,{sx:{overflowY:"auto",py:.5,maxHeight:200},children:[fe.length===0&&l.jsx(g.Box,{sx:{px:1.5,py:1},children:l.jsx(g.Typography,{variant:"body2",color:"text.secondary",children:"Sin registros"})}),fe.map((L,J)=>{const be=L3(L),Ie=$3(L.FechaBaja??L.FechaAsignacion);return l.jsx(g.Box,{sx:{px:1,py:.75},children:l.jsxs(g.Stack,{direction:"row",alignItems:"center",spacing:1,children:[l.jsx(g.Avatar,{sx:{width:28,height:28,bgcolor:"#EAEBF2",color:"#5C6372",fontSize:14},src:L?.ImgAsesor??void 0,children:z3(be)}),l.jsx(g.Box,{sx:{flex:1,minWidth:0},children:l.jsx(g.Typography,{variant:"body2",noWrap:!0,children:be})}),l.jsx(g.Typography,{variant:"caption",color:"text.secondary",sx:{whiteSpace:"nowrap"},children:Ie})]})},J)})]})]})})]}),V?l.jsxs(g.Box,{sx:{flex:1,minWidth:0,overflow:"hidden",position:"relative"},children:[l.jsx(g.Box,{sx:{position:"absolute",top:18,left:24,zIndex:10,pointerEvents:"auto"},children:l.jsx(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:l.jsx(g.Button,{onClick:Ue,sx:{backgroundColor:"#2571d6",minWidth:36,minHeight:36,p:.5,borderRadius:"8px",color:"#fff",boxShadow:3,"&:hover":{backgroundColor:"#2074e3"}},children:l.jsx($h,{fontSize:"medium"})})})}),N&&l.jsx("iframe",{src:N,width:"100%",height:"100%",onLoad:Pt,style:{border:0}})]}):l.jsxs(g.Box,{sx:{width:"100%",minHeight:0,overflowY:"auto"},children:[l.jsx(g.Box,{sx:{mt:{xs:1.5,md:3}},children:l.jsxs(g.Box,{sx:{mt:3,display:"flex",flexDirection:"column",gap:4,padding:"0 20px 0 20px"},children:[l.jsx(g.Typography,{variant:"h4",sx:{fontWeight:800,textAlign:"center",mb:1,letterSpacing:.2},children:"Solicitudes"}),l.jsxs(g.Stack,{direction:{xs:"column",md:"column"},spacing:1.5,alignItems:{xs:"stretch",md:"center"},justifyContent:"space-between",sx:{mb:1.5},children:[l.jsxs(g.Stack,{direction:"row",spacing:1.5,alignItems:"flex-start",sx:{flexWrap:"wrap"},children:[l.jsx(g.TextField,{size:"small",placeholder:"Buscar por vehículo",value:ue,onChange:L=>se(L.target.value),InputProps:{endAdornment:l.jsx(E3,{fontSize:"small",sx:{color:"#b6afaf"}})},sx:{minWidth:220}}),l.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",gap:.5,position:"relative"},children:[l.jsxs(g.Stack,{direction:"row",spacing:1.1,position:"absolute",bottom:48,left:0,alignItems:"center",children:[l.jsx(g.FormControlLabel,{label:l.jsx(g.Typography,{sx:{fontSize:15,fontWeight:600,marginLeft:0},children:"Por fecha"}),labelPlacement:"start",control:l.jsx(g.Checkbox,{checked:O,onChange:L=>ne(L.target.checked),size:"small",sx:{p:.3,"& .MuiSvgIcon-root":{fontSize:19},color:"#bab4b4"}}),sx:{ml:0,"& .MuiFormControlLabel-label":{marginRight:0}}}),l.jsx(g.Typography,{sx:{fontSize:15,paddingLeft:.4},children:"De cita"})]}),l.jsxs(g.Stack,{direction:"row",spacing:1,children:[l.jsx(g.TextField,{size:"small",type:"date",label:"Desde",InputLabelProps:{shrink:!0},value:_e,onChange:L=>Ge(L.target.value),disabled:!O,sx:{width:170}}),l.jsx(g.TextField,{size:"small",type:"date",label:"Hasta",InputLabelProps:{shrink:!0},value:q,onChange:L=>de(L.target.value),disabled:!O,sx:{width:170}})]})]}),l.jsx(g.IconButton,{onClick:L=>Ae(L.currentTarget),disableRipple:!0,sx:{border:"1px solid #d4d7de",borderRadius:2,width:40,height:40,mt:2},children:l.jsx(w3,{})}),wr&&l.jsx(g.Button,{variant:"outlined",onClick:Ke,disableRipple:!0,sx:{height:40,textTransform:"none",borderColor:"#d4d7de",color:"#333",mt:2},children:"Limpiar filtros"}),l.jsx(g.Tooltip,{title:wr&&"Crear Solicitud",arrow:!0,placement:"top",disableHoverListener:!wr,children:l.jsx("span",{children:l.jsxs(g.Button,{variant:"outlined",sx:{height:40,textTransform:"none",borderColor:"none",color:"#fff",backgroundColor:"#1e5bce","&:hover":{backgroundColor:"#1e5bce",boxShadow:"none"}},onClick:()=>{w?.(r)},disableRipple:!0,children:[l.jsx(n0,{sx:{color:"#fff",fontSize:24,paddingRight:.6}}),!wr&&"Crear Solicitud"]})})})]}),l.jsx(O3,{sections:Qe,detailColumns:[],getDetailColumns:re,onRowClick:Ye})]})]})}),l.jsx(g.Menu,{anchorEl:Ee,open:Fe,onClose:()=>Ae(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:l.jsxs(g.Stack,{spacing:1.5,paddingX:1.5,paddingY:1,children:[l.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:700,color:"#070C10"},children:"Filtro"}),l.jsxs(g.Box,{children:[l.jsx(g.Typography,{variant:"body2",sx:{fontWeight:700,mb:.5,color:"#5C6372"},children:"Estatus"}),l.jsx(g.RadioGroup,{value:X,onChange:L=>Me(L.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(L=>l.jsx(g.FormControlLabel,{value:L,control:l.jsx(g.Radio,{size:"small",sx:{p:.2,"& .MuiSvgIcon-root":{fontSize:18}}}),label:L},L))})]}),l.jsxs(g.Box,{children:[l.jsx(g.Typography,{variant:"body2",sx:{fontWeight:700,mb:.5,color:"#5C6372"},children:"Actividades"}),l.jsx(g.RadioGroup,{value:ke,onChange:(L,J)=>je(J),sx:{"& .MuiFormControlLabel-root":{m:0,py:.3},"& .MuiFormControlLabel-label":{fontSize:14,fontWeight:400,ml:0}},children:["Todos",...Vr].map(L=>l.jsx(g.FormControlLabel,{value:L,sx:{alignItems:"start"},control:l.jsx(g.Radio,{size:"small",sx:{p:.2,"& .MuiSvgIcon-root":{fontSize:18}}}),label:L},L))})]}),l.jsxs(g.Box,{children:[l.jsx(g.Typography,{variant:"body2",sx:{fontWeight:700,mb:.5,color:"#5C6372"},children:"Nivel de interés"}),l.jsx(g.RadioGroup,{value:Gt,onChange:(L,J)=>er(J),sx:{"& .MuiFormControlLabel-root":{m:0,py:.3},"& .MuiFormControlLabel-label":{fontSize:14,fontWeight:400,ml:0}},children:["Todos",...Yt].map(L=>l.jsx(g.FormControlLabel,{value:L,control:l.jsx(g.Radio,{size:"small",sx:{p:.2,"& .MuiSvgIcon-root":{fontSize:18}}}),label:L},L))})]})]})})]})]})})}const o0={tableClientes:"_tableClientes_acwe7_1",tableResponsive:"_tableResponsive_acwe7_1"};function s0(e,t,r){const{fields:n,order:o=["nombreCliente","email","acciones"],header:s={},cells:i={},hide:a={},actions:c}=t,u=c??{},d=u.show??{},f=u.handlers??{},h=u.accessors??{},v=u.icons??{},m=u.className??"d-flex flex-row gap-2 align-items-center ",p=u.tooltip??{},b=v.view??l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",style:{fill:"#070c10"},children:[l.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"}),l.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),w={nombreCliente:{key:"nombreCliente",header:s.nombreCliente??"Cliente",accessor:I=>I[n.nombreCliente],cell:i.nombreCliente,width:190},email:{key:"email",header:s.email??"Correo",accessor:I=>I[n.email],cell:i.email??(I=>{const V=String(I[n.email]??"");return V?l.jsx("a",{href:`mailto:${V}`,children:V}):l.jsx("span",{className:"text-muted",children:"—"})}),width:230},acciones:a.acciones?void 0:{key:"acciones",header:"",cell:i.acciones??(I=>{const V=rl(d.whatsapp,I,!0),G=rl(d.email,I,!0),F=rl(d.view,I,!0),Y=h.phone?.(I),oe=h.email?.(I),U=fe=>{if(fe.stopPropagation(),f.onWhatsApp)return f.onWhatsApp(I);if(!Y)return;const $=h.countryCode??"52",Q=y3(String(Y));typeof window<"u"&&window.open(`https://wa.me/${$}${Q}`,"_blank")},N=fe=>{if(fe.stopPropagation(),f.onEmail)return f.onEmail(I);oe&&typeof window<"u"&&(window.location.href=`mailto:${oe}`)},ce=fe=>{fe.stopPropagation(),f.onView&&f.onView(I)};return l.jsxs("div",{className:m,children:[V&&l.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:p.whatsapp??"WhatsApp",onClick:U,style:{width:24,height:24},children:l.jsx("img",{src:m3,alt:"WhatsApp"})}),G&&l.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:p.email??"Email",onClick:N,style:{width:24,height:24},children:l.jsx("img",{src:g3,alt:"Email"})}),F&&l.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:p.view??"Ver detalle",onClick:ce,style:{width:24,height:24},children:b})]})}),width:120}},C=Object.values(w).filter(I=>!!I),E=(e??[]).filter(I=>!!I?.key),S=new Map;for(const I of C)S.set(String(I.key),I);for(const I of E)S.set(String(I.key),I);const _=[...C.map(I=>String(I.key)),...E.map(I=>String(I.key))],W=Array.from(new Set(o.map(I=>String(I)).filter(I=>S.has(I)))),D=_.filter(I=>!W.includes(I)),A=[...W,...D],M="acciones";if(S.has(M)){const I=A.filter(V=>V!==M);A.splice(0,A.length,...I,M)}return A.map(I=>S.get(I))}function rA(e){const{rows:t,columns:r,clientSort:n=!0,urlsQA:o=!0,defaultSort:s,minWidth:i=1100,rowKey:a=b3,haveOpenDetailFor:c=!0,defaults:u,detailConfig:d,normalTable:f,onRowClick:h,activityHistory:v,advisorHistory:m,forceOpenDetailFor:p,closeDetailFor:b,onRequestEdit:w,searchFilter:C,solicitudesNuevos:E,solicitudesPrueba:S,solicitudesServicio:_,solicitudesSeminuevos:W,onCreateSolicitud:D,isCrmMode:A,onSolicitudBaseUrl:M,onIframeClose:I,reloadInfo:V,idAdminSistemas:G=!1}=e,[F,Y]=y.useState(s??null),[oe,U]=y.useState({open:!1,customer:null}),[N,ce]=y.useState([]),fe=ae=>{U({open:!0,customer:ae})},$=ae=>{c&&(h?.(ae),U({open:!0,customer:ae}))},Q=()=>{U({open:!1,customer:null}),b?.()},Ce=y.useMemo(()=>u?s0(r??[],u):s0(r??[],{fields:{},order:[]}),[r,u]),me=y.useMemo(()=>{if(!n||!F)return t;const ae=Ce.find(le=>le.key===F.key);if(!ae)return t;const ee=[...t];return ee.sort((le,ge)=>{const ie=tl(ae,le,0),pe=tl(ae,ge,0),Re=v3(ie,pe);return F.direction==="asc"?Re:-Re}),ee},[t,Ce,F,n]),we=y.useMemo(()=>{const ae=d?.getCustomerId;return ee=>{const le=ae?.(ee)??ee?.Id_cliente??ee?.CliID??ee?.id??ee?.ID??ee?.Id??"";return String(le)}},[d]);return y.useEffect(()=>{if(!oe.open||!oe.customer)return;const ae=we(oe.customer);if(!ae)return;const ee=(t??[]).find(le=>we(le)===ae);ee&&ee!==oe.customer&&U(le=>({...le,customer:ee}))},[t,oe.open,oe.customer,we]),y.useEffect(()=>{p&&fe(p)},[p]),l.jsxs("div",{children:[l.jsx("div",{className:`${o0.tableClientes} back-white rounded-3 shadow-main mt-4 mb-4`,children:l.jsx("div",{className:`${o0.tableResponsive} table-responsive`,children:l.jsxs("table",{className:"table table-hover align-middle mb-0",children:[l.jsx("thead",{children:l.jsx("tr",{children:Ce.map(ae=>l.jsx("th",{style:{fontWeight:600,width:ae.width,paddingTop:"20px",paddingBottom:"20px",textAlign:ae.align??"left"},children:ae.header},ae.key))})}),l.jsx("tbody",{children:me.map((ae,ee)=>l.jsx("tr",{onClick:()=>$?.(ae),role:"button",tabIndex:0,onKeyDown:le=>{(le.key==="Enter"||le.key===" ")&&$?.(ae)},style:{cursor:"pointer"},children:Ce.map((le,ge)=>{const ie=le.Component?l.jsx(le.Component,{row:ae,index:ee}):le.cell?le.cell(ae,ee):(()=>{const pe=tl(le,ae,ee);return pe==null||pe===""?"":String(pe)})();return l.jsx("td",{style:{paddingTop:"20px",paddingBottom:"20px",textAlign:le.align??"left"},children:ie},`${String(le.key)}-${ge}`)})},a(ae,ee)))})]})})}),oe.open&&l.jsx(tA,{open:oe.open,onClose:Q,customer:oe.customer,fields:d?.dynamicFields,header:d?.header,normalTable:f,history:v,advisorHistory:m,urlsQA:o,onRequestEdit:ae=>{Q(),w?.(ae)},searchFilter:C,solicitudesNuevos:E,solicitudesPrueba:S,solicitudesServicio:_,solicitudesSeminuevos:W,onCreateSolicitud:D,isCrmMode:A,onSolicitudBaseUrl:M,onIframeClose:I,reloadInfo:V,idAdminSistemas:G})]})}const i0=K.forwardRef(({sx:e,...t},r)=>l.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}}));i0.displayName="SoftInput";function nA({message:e}){return e?l.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:[l.jsx(Jc,{fontSize:"small",sx:{color:"rgb(211, 47, 47)"}}),l.jsx("span",{style:{color:"rgb(95, 33, 32)",fontSize:14,fontWeight:"500"},children:e})]}):null}function oA(e){if(e.required)return e.required===!0?"El campo es obligatorio.":e.required}function sl(e,t){const r=oA(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 a0={"& .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%"},sA={mb:1,fontWeight:600,color:"#1C1C1D","&.Mui-focused":{color:"#1C1C1D !important"},"&.Mui-error":{color:"#1C1C1D !important"}};function il({label:e,errorMsg:t,helperText:r,children:n,sx:o}){return l.jsxs(g.FormControl,{fullWidth:!0,error:!!t,sx:o,className:"1- FieldWrapper",children:[l.jsx(g.FormLabel,{sx:sA,children:e}),n,l.jsx(nA,{message:t||r})]})}function iA(e,t){const{register:r,formState:{errors:n}}=t,o={...sl(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"]),u=S=>e.onlyNumbers?(S.match(a)??[]).join(""):e.onlyLetters?(S.match(i)??[]).join(""):S,d=(S,_)=>c.has(S)||_?!0:e.onlyNumbers?/^[0-9]$/.test(S):e.onlyLetters?/^[A-Za-zÁÉÍÓÚÜÑáéíóúüñ\s'.-]$/.test(S):!0,f=n[e.name]?.message,h=r(e.name,o),v=(e.inputProps&&typeof e.inputProps.maxLength=="number"?e.inputProps.maxLength:void 0)??e.maxLength,m=S=>{d(S.key,S.ctrlKey||S.metaKey)||S.preventDefault()},p=S=>{const _=S.data??null;_!=null&&(e.onlyNumbers&&/[^0-9]/.test(_)&&S.preventDefault(),e.onlyLetters&&/[^A-Za-zÁÉÍÓÚÜÑáéíóúüñ ]/.test(_)&&S.preventDefault())},b=S=>{const _=S.clipboardData.getData("text"),W=u(_);if(W!==_){S.preventDefault();const D=S.target,A=D.selectionStart??D.value.length,M=D.selectionEnd??D.value.length;D.setRangeText(W,A,M,"end"),D.dispatchEvent(new Event("input",{bubbles:!0}))}},w=S=>{const _=u(S.target.value);_!==S.target.value&&(S.target.value=_),v&&S.target.value.length>v&&(S.target.value=S.target.value.slice(0,v)),h.onChange(S)},C={...e.inputProps,...s?{inputMode:"email",autoComplete:"email"}:{},maxLength:v,onKeyDown:m,onBeforeInput:p,onPaste:b,onInvalid:S=>S.preventDefault()},E=e.onlyNumbers||s?"text":e.type??"text";return l.jsx(il,{label:e.label,errorMsg:f,helperText:e.helperText,sx:a0,children:l.jsx(i0,{placeholder:e.placeholder,type:E,inputProps:C,...h,onChange:w,sx:{width:"100%",maxWidth:"none"},className:"SoftInputData"})})}function aA(e,t){const{control:r}=t,n=!!e.multiple;return l.jsx(hr,{name:e.name,control:r,rules:sl(e,{isArray:n}),render:({field:o,fieldState:s})=>l.jsx(il,{label:e.label,errorMsg:s.error?.message,helperText:e.helperText,sx:a0,children:l.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&&l.jsx(g.MenuItem,{value:"",disabled:!0,children:"Selecciona…"}),e.options.map(i=>l.jsx(g.MenuItem,{value:i.value,children:i.label},String(i.value)))]})})})}function cA(e,t){return l.jsx(hr,{name:e.name,control:t.control,rules:sl(e),render:({field:r,fieldState:n})=>l.jsx(il,{label:e.label,errorMsg:n.error?.message,helperText:e.helperText,children:l.jsx(g.RadioGroup,{row:!0,...r,className:"3-RadioFieldRender",children:e.options.map(o=>l.jsx(g.FormControlLabel,{value:o.value,control:l.jsx(g.Radio,{}),label:o.label},String(o.value)))})})})}function c0(e,t){if(e.render)return e.render(t);switch(e.kind){case"text":return iA(e,t);case"select":return aA(e,t);case"radio":return cA(e,t);default:return null}}function lA(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,u]=y.useState(1),[d,f]=y.useState(t),{currentItems:h,totalPages:v,showingFrom:m,showingTo:p,totalItems:b}=y.useMemo(()=>{const E=a.length,S=d==="Todos"?1/0:Number(d),_=S===1/0?1:Math.max(1,Math.ceil(E/S)),W=Math.min(c,_),D=S===1/0?E:W*S,A=S===1/0?0:D-S;return{currentItems:S===1/0?a:a.slice(A,D),totalPages:_,showingFrom:E===0?0:A+1,showingTo:S===1/0?E:Math.min(D,E),totalItems:E}},[a,c,d]),w=E=>{const S=Math.max(1,Math.min(E,v||1));u(S),n?.(S),s?.()};return{currentItems:h,totalPages:v,showingFrom:m,showingTo:p,totalItems:b,currentPage:c,itemsPerPage:d,perPageOptions:r,goTo:w,next:()=>w(c+1),prev:()=>w(c-1),setItemsPerPage:E=>{f(E),o?.(E),u(1),s?.()},setCurrentPage:w}}var ms={},l0;function uA(){if(l0)return ms;l0=1;var e=at();Object.defineProperty(ms,"__esModule",{value:!0}),ms.default=void 0;var t=e(ht()),r=ut();return ms.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"),ms}var dA=uA();const fA=it(dA);var gs={},u0;function pA(){if(u0)return gs;u0=1;var e=at();Object.defineProperty(gs,"__esModule",{value:!0}),gs.default=void 0;var t=e(ht()),r=ut();return gs.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"),gs}var hA=pA();const mA=it(hA),gA=({currentPage:e,totalPages:t,onPageChange:r,itemsPerPage:n,onItemsPerPageChange:o,itemsPerPageOptions:s,showingFrom:i,showingTo:a,totalItems:c})=>{const u=g.useTheme(),d=g.useMediaQuery(u.breakpoints.down("sm")),f=()=>{if(t<=1)return[1];const m=d?0:2,p=[],b=1,w=t,C=Math.max(b+1,e-m),E=Math.min(w-1,e+m);p.push(b),C>b+1&&p.push("...");for(let S=C;S<=E;S++)S>=b+1&&S<=w-1&&p.push(S);return E<w-1&&p.push("..."),p.push(w),p},h=m=>{const p=m.target.value;o(p)},v=Math.max(1,t);return l.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:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",justifyContent:"center"},children:[l.jsx(g.IconButton,{onClick:()=>r(e-1),disabled:e<=1,size:"medium",sx:{"&:hover":{backgroundColor:"action.hover"}},"aria-label":"Página anterior",children:l.jsx(fA,{fontSize:"large"})}),f().map((m,p)=>m==="..."?l.jsx(g.Box,{sx:{px:1,display:"flex",alignItems:"center",fontSize:"1.1rem"},children:". . ."},`dots-${p}`):l.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}`)),l.jsx(g.IconButton,{onClick:()=>r(e+1),disabled:e>=v,size:"medium",sx:{"&:hover":{backgroundColor:"action.hover"}},"aria-label":"Página siguiente",children:l.jsx(mA,{fontSize:"large"})})]}),l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1.25,justifyContent:{xs:"center",sm:"flex-start"},mt:{xs:1,sm:0}},children:[l.jsx(g.Typography,{variant:"body2",children:"Mostrar"}),l.jsx(g.FormControl,{size:"small",sx:{minWidth:72},children:l.jsx(g.Select,{value:n,onChange:h,renderValue:m=>m==="Todos"?"Todos":String(m),children:s.map(m=>l.jsx(g.MenuItem,{value:m,children:m==="Todos"?"Todos":m},String(m)))})}),l.jsx(g.Typography,{variant:"body2",children:"por página"})]})]})};function vA(e){const{open:t,dataAdd:r,fields:n,onSubmit:o,onCancel:s,defaultValues:i,txtBtnGuardar:a,haveId:c=!1,itemsTable:u,filter:d,getId:f,renderRow:h,selectedIds:v,onSelectedChange:m,onSubmitAddData:p,initialSelectedIds:b=[],showAutosPanel:w}=e,C=Tp({mode:"onSubmit",reValidateMode:"onChange",criteriaMode:"all",shouldUnregister:!1,defaultValues:i});y.useEffect(()=>{i&&C.reset(i)},[i,C]);const[E,S]=y.useState(""),[_,W]=y.useState(b),D=Array.isArray(v)&&!!m,A=D?v:_,M=O=>{const ne=typeof O=="function"?O(A):O;D?m(ne):W(ne)},I=y.useCallback(O=>f?f(O):O?.IdAuto,[f]),V=y.useMemo(()=>{const O=new Map;return(u??[]).forEach((ne,Se)=>O.set(I(ne),Se)),O},[u,I]),G=y.useRef(new Set),F=y.useMemo(()=>{const O=new Map;return(u??[]).forEach(ne=>O.set(f?f(ne):ne?.IdAuto,ne)),O},[u,f]),Y=y.useMemo(()=>(n??[]).filter(O=>!!O.required).map(O=>O.name),[n]),oe=dp({control:C.control,name:Y}),U=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,N=y.useMemo(()=>Y.length?oe?.every(U)??!1:!0,[oe,Y]),{handleSubmit:ce,formState:{isSubmitting:fe,isDirty:$,isValid:Q}}=C,Ce=d??((O,ne)=>JSON.stringify(O).toLowerCase().includes(ne.toLowerCase())),me=y.useMemo(()=>E.trim()?u?.filter(O=>Ce(O,E)):u,[u,E,Ce]),we=y.useMemo(()=>{if(!me)return me;const O=G.current,ne=[...me];return ne.sort((Se,Oe)=>{const R=O.has(I(Se))?0:1,te=O.has(I(Oe))?0:1;if(R!==te)return R-te;const _e=V.get(I(Se))??0,Ge=V.get(I(Oe))??0;return _e-Ge}),ne},[me,V,I]),{currentItems:ae,totalPages:ee,showingFrom:le,showingTo:ge,totalItems:ie,currentPage:pe,itemsPerPage:Re,perPageOptions:j,goTo:We,setItemsPerPage:qe}=lA(we,{initialPerPage:25,perPageOptions:[10,25,50,100,"Todos"],deps:[E],scrollTop:()=>{}}),Ze=O=>{const ne=F.get(O)??null;M([O]),p?.({items:ne})},Ne=O=>A.includes(O),Be=async O=>{try{await o?.(O),C.reset(C.getValues())}catch(ne){console.error("Error al enviar AddCliente:",ne)}},vt=y.useMemo(()=>{const O=new Map;return(n??[]).forEach(ne=>O.set(String(ne.name),ne)),O},[n]),pt=(O,ne)=>{const Se=vt.get(String(O));if(!Se)return null;const Oe={xs:12,...Se.grid,...ne||{}};return l.jsx(g.Grid,{item:!0,...Oe,children:Se.render?Se.render(C):c0(Se,C)},`fld-${String(O)}`)},k=w??(e.haveId?"edit":"new"),P=k!=="onlyCars",B=k==="new"||k==="onlyCars",ue=A?.length>0,se=k==="onlyCars"?ue:e.haveId?N&&$||ue:N&&ue;return l.jsx(g.Dialog,{open:t,onClose:s,maxWidth:"lg",fullWidth:!0,PaperProps:{sx:{height:{xs:"100dvh",md:B?"90vw":"auto"},maxWidth:{xs:"100vw",md:B?"98vw":"50%"},overflow:"hidden",display:"flex",flexDirection:"column",borderRadius:{xs:0,md:3}}},children:l.jsx(Aw,{...C,children:l.jsxs(g.Box,{component:"form",noValidate:!0,onSubmit:ce(Be),display:"flex",flexDirection:{xs:"column",md:"row"},width:"100%",height:"100%",minHeight:0,overflow:"hidden",position:"relative",children:[P&&l.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:[l.jsxs(g.Box,{p:{xs:2,md:2},height:"100%",width:"100%",children:[l.jsx(g.Typography,{fontWeight:700,fontSize:20,children:r.title}),l.jsxs(g.Box,{sx:{flex:1,height:"100%",overflowY:"auto",paddingBottom:10},children:[l.jsx(g.Typography,{fontSize:"18px",mt:2.5,fontWeight:500,children:r.subTitle}),l.jsx(g.Box,{mt:2,display:"flex",flexDirection:"column",width:"100%",gap:2,children:Array.isArray(e.formLayout)&&c?e.formLayout.map((O,ne)=>l.jsx(g.Grid,{container:!0,spacing:2,alignItems:"flex-start",wrap:"wrap",width:"100%",children:O.map((Se,Oe)=>{const R=typeof Se=="string"?{name:Se}:Se;return R.hidden?.(C)?null:pt(R.name,R.grid)})},`row-${ne}`)):l.jsx(g.Grid,{container:!0,spacing:2,width:"100%",children:n?.map((O,ne)=>{const Se=O.grid??{xs:12,md:12};return l.jsx(g.Grid,{item:!0,...Se,children:O.render?O.render(C):c0(O,C)},`${String(O.name)}-${ne}`)})})})]})]}),l.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:l.jsx(g.Box,{display:"flex",alignItems:"center",children:l.jsx(g.Box,{display:"flex",gap:1.5,width:"100%",justifyContent:c?"flex-end":"center",children:l.jsx(g.Button,{type:"submit",variant:"contained",disabled:fe||!se,sx:{backgroundColor:"#336BE1",color:"#fff",borderColor:"transparent",height:48,fontSize:15,textTransform:"none",fontWeight:"400",paddingX:5,width:c?"160px":"100%"},children:a})})})})]}),B&&l.jsx(g.Box,{flex:1,display:"flex",flexDirection:"column",minWidth:0,sx:{height:"100%"},children:l.jsx(g.Box,{mt:1,sx:{flex:1,display:"flex",flexDirection:"column",height:"100%"},children:l.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[l.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:[l.jsx(g.TextField,{value:E,onChange:O=>S(O.target.value),placeholder:"Buscar marca, modelo, vin...",InputProps:{endAdornment:l.jsx(g.InputAdornment,{position:"start",children:l.jsx(L2,{})}),disableUnderline:!0},variant:"standard",sx:{maxWidth:360,width:"100%",backgroundColor:"#EBEEF0",paddingX:"16px",paddingY:"10px"}}),l.jsx(g.Box,{display:"flex",gap:2,alignItems:"center",sx:{marginTop:{sm:0,xs:2}},children:l.jsx(g.Box,{onClick:s,sx:{cursor:"pointer",position:"absolute",top:0,right:10},display:{xs:"none",md:"block"},children:l.jsx(Ur,{sx:{color:"#070C10",fontSize:24}})})}),w=="onlyCars"&&l.jsx(g.Box,{display:"flex",alignItems:"center",justifyContent:"center",children:l.jsx(g.Box,{display:"flex",gap:1.5,width:"100%",children:l.jsxs(g.Button,{type:"submit",variant:"contained",disabled:fe||!se,sx:{backgroundColor:"#336BE1",color:"#fff",borderColor:"transparent",height:48,fontSize:15,textTransform:"none",fontWeight:"400",paddingX:5,width:"100%"},children:[l.jsx(n0,{sx:{color:fe||!se?"gray":"#fff",fontSize:26,paddingRight:.6}}),"Crear Solicitud"]})})})]}),l.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:l.jsx(g.Box,{sx:{minWidth:1150,width:"max(1150px, 100%)",paddingBottom:10},children:l.jsxs(g.List,{disablePadding:!0,sx:{borderColor:"transparent",padding:0},children:[ae?.map((O,ne)=>{const Se=f?f(O):ne,Oe=Ne(Se);return l.jsx(g.Box,{sx:{borderBottom:"1px solid #D3D4D5",padding:0},children:l.jsx(g.ListItem,{disableGutters:!0,sx:{paddingTop:0,padding:0,m:0},children:l.jsx(g.ListItemButton,{onClick:()=>Ze(Se),disableRipple:!0,sx:{padding:0},children:l.jsx(g.ListItemText,{disableTypography:!0,primary:h?h({item:O,selected:Oe,toggle:()=>Ze(Se),index:ne}):null})})})},`${String(Se)}`)}),!ae?.length&&l.jsx(g.Box,{p:3,children:l.jsxs(g.Typography,{fontSize:14,color:"#5C6372",children:["Sin resultados para “",E,"”."]})})]})})}),l.jsx(g.Box,{sx:{position:"sticky",bottom:0,bgcolor:"#fff"},children:l.jsx(gA,{currentPage:pe,totalPages:ee,onPageChange:We,itemsPerPage:Re,onItemsPerPageChange:qe,itemsPerPageOptions:j,showingFrom:le,showingTo:ge,totalItems:ie})})]})})})]})})})}var vs={},d0;function yA(){if(d0)return vs;d0=1;var e=at();Object.defineProperty(vs,"__esModule",{value:!0}),vs.default=void 0;var t=e(ht()),r=ut();return vs.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"),vs}var bA=yA();const xA=it(bA),al=/^[^\s@]+@[^\s@]+\.[^\s@]+$/i,ra=/[,\s;]+/g,ln=e=>e.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase(),un=(e,t)=>Array.from(new Set([...e,...t.map(r=>r.trim()).filter(Boolean)])),f0=(e,t)=>t?e.filter(r=>ln(r)!==ln(t)):e,_A=(e,t)=>e.filter(r=>!t.some(n=>ln(n)===ln(r)));function Mr(e,t,r){if(r)return typeof r=="function"?r(e,t):e[r]}function wA(e,t){if(t)return!e||/^https?:\/\//i.test(t)?t:e+t}function SA({open:e,onClose:t,value:r,onChange:n,onRequestSend:o,customer:s,itemsSelects:i,renderItem:a,filterFields:c=[],multiSelectAutos:u=!0,imgCorreoSrc:d,baseURLImages:f,itemProps:h,defaultItemImageSrc:v}){const m=y.useRef(null),[p,b]=y.useState("idle"),w=y.useRef(e);y.useEffect(()=>{const R=w.current;e&&!R&&b("entering"),!e&&R&&b("exiting"),w.current=e},[e]),y.useEffect(()=>{if(p==="entering"){const _e=setTimeout(()=>b("idle"),320);return()=>clearTimeout(_e)}if(p==="exiting"){const _e=setTimeout(()=>b("idle"),220);return()=>clearTimeout(_e)}},[p]);const[C,E]=y.useState(""),[S,_]=y.useState(!1),[W,D]=y.useState(!1),[A,M]=y.useState(!1),[I,V]=y.useState(""),[G,F]=y.useState([]),Y=A?G:r.selectedIds,oe=()=>{F([...r.selectedIds]),V(""),M(!0)},U=()=>{M(!1),F([])},N=()=>{const R=new Set(vt.map((_e,Ge)=>String(Mr(_e,Ge,h.id)))),te=G.filter(_e=>R.has(String(_e)));n({...r,selectedIds:te}),M(!1)},ce=(R,te)=>ln(R??"")===ln(te??"");function fe(R,te,_e,Ge,q){const de=te?R.some(Ae=>ce(Ae,te)):!1,Ee=_e.length>0?_e.some(Ae=>R.some(Fe=>ce(Fe,Ae))):!1;Ge(de),q(Ee)}const $=R=>{const te=typeof R=="function"?R(r.recipients):R;n({...r,recipients:te}),fe(te,ae,le,_,D)},Q=R=>n({...r,message:R}),Ce=R=>n({...r,attachments:[...r.attachments,...R]}),me=R=>n({...r,attachments:r.attachments.filter(te=>te.name!==R)}),we=R=>{if(A)if(u){const te=new Set(G);te.has(R)?te.delete(R):te.add(R),F(Array.from(te))}else{const te=G.includes(R);F(te?[]:[R])}else if(u){const te=new Set(r.selectedIds);te.has(R)?te.delete(R):te.add(R),n({...r,selectedIds:Array.from(te)})}else{const te=r.selectedIds.includes(R);n({...r,selectedIds:te?[]:[R]})}},ae=y.useMemo(()=>(s?.Correo??"").trim(),[s]),ee=y.useMemo(()=>Array.isArray(s?.Asesores)?s.Asesores.filter(R=>R?.EmailAsesor&&R?.Activo):[],[s]),le=y.useMemo(()=>ee.map(R=>(R.EmailAsesor??"").trim()).filter(Boolean),[ee]),ge=y.useRef(!1);y.useEffect(()=>{if(e&&!ge.current){let R=[];S&&ae&&(R=un(R,[ae])),W&&le.length&&(R=un(R,le)),$(te=>un(te,R)),fe(r.recipients,ae,le,_,D),E(""),ge.current=!0}e||(ge.current=!1)},[e,S,W,ae,le]);const ie=R=>{const te=ee.find(_e=>ln(_e.EmailAsesor??"")===ln(R));if(te){if(te.ImgAsesor)return l.jsx(g.Avatar,{src:te.ImgAsesor,alt:te.NombreAsesor});const _e=(te.NombreAsesor||"").trim(),Ge=(te.ApellidosAsesor||"").trim();return l.jsx(g.Avatar,{children:`${_e[0]??""}${Ge[0]??""}`.toUpperCase()})}return l.jsx(g.Avatar,{children:R[0]?.toUpperCase()})},pe=()=>{const R=C.trim();if(!R)return;const _e=R.split(ra).filter(Boolean).filter(Ge=>al.test(Ge));_e.length>0&&$(Ge=>un(Ge,_e)),E("")},Re=R=>{_(R),$(te=>R&&ae?un(te,[ae]):f0(te,ae))},j=R=>{D(R),$(te=>R?un(te,le):_A(te,le))},We=R=>{const te=Array.from(R.target.files||[]);Ce(te.map(_e=>({name:_e.name,size:_e.size,file:_e}))),R.target.value=""},qe=Y[0],Ze=y.useMemo(()=>!i||qe===void 0?void 0:i.find((te,_e)=>String(Mr(te,_e,h.id))===String(qe)),[i,qe,h.id]),Ne=y.useMemo(()=>{if(!(!Ze||!h.distributorId))return Mr(Ze,0,h.distributorId)},[Ze,h.distributorId]);console.log("lockedDisId",Ne);const Be=y.useMemo(()=>Ze?(h.distributorTitle?Mr(Ze,0,h.distributorTitle):void 0)??(Ne!=null?String(Ne):void 0):void 0,[Ze,h.distributorTitle,Ne]),vt=y.useMemo(()=>{const R=i??[];return Ne==null||!h.distributorId?R:R.filter((te,_e)=>Mr(te,_e,h.distributorId)==Ne)},[i,Ne,h.distributorId]),pt=y.useMemo(()=>{if(!I.trim())return vt;const R=I.toLowerCase();return vt.filter(te=>(c??[]).some(_e=>String(te?.[_e]??"").toLowerCase().includes(R)))},[vt,I,c]),k=y.useMemo(()=>{if(!i||!r.selectedIds.length)return[];const R=new Map;return i.forEach((te,_e)=>{R.set(String(Mr(te,_e,h.id)),te)}),r.selectedIds.map(te=>R.get(String(te))).filter(Boolean)},[i,r.selectedIds,h.id]),P=R=>n({...r,selectedIds:r.selectedIds.filter(te=>String(te)!==String(R))}),B=()=>{let R=r.recipients;if(C.trim()){const de=C.split(ra).filter(Ee=>al.test(Ee));R=un(R,de),$(R),E("")}const te=S?ae:"",_e=ee.find(de=>de?.Activo&&de?.EmailAsesor)?.EmailAsesor?.trim()??"";o?.({recipients:R,toClient:S,toAdvisor:W,tipoInt:S&&W?2:1,correoCliente:te,correoAsesor:W?_e:"",disIdLocked:Ne}),t?.()},ue=y.useMemo(()=>{const te=C.split(ra).filter(Boolean).some(_e=>al.test(_e));return r.recipients.length>0||te},[r.recipients,C]),se=(r.selectedIds?.length??0)>0,O=r.message.trim().length>0,ne=ue&&se&&O,Se=g.useTheme(),Oe=g.useMediaQuery(Se.breakpoints.down("sm"));return l.jsxs(g.Drawer,{anchor:Oe?"bottom":"right",open:e,onClose:t,ModalProps:{keepMounted:!0,BackdropProps:{invisible:!Oe}},transitionDuration:{enter:320,exit:220},SlideProps:{direction:Oe?"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:[l.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",height:{xs:"100%",sm:"auto"},position:"relative",overflow:"auto"},children:[l.jsxs(g.Box,{sx:{p:2,pb:1,position:"sticky",top:0,zIndex:1,bgcolor:"#fff",borderBottom:"1px solid #E5E7EB"},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:2},children:[d?l.jsx("img",{src:d,alt:"Correo",style:{width:24,height:18}}):null,l.jsxs(g.Typography,{fontWeight:700,children:["Mensaje a"," ",s?`${s.Nombre??""} ${s.ApellidoP??""} ${s.ApellidoM??""}`.trim():"—"]})]}),l.jsx(g.IconButton,{onClick:t,size:"small",children:l.jsx(Ur,{})})]}),l.jsx("div",{children:l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"10px 10px",backgroundColor:"#EBEEF0",border:"1px solid #E5E7EB",borderRadius:8,flexWrap:"wrap"},children:[l.jsx("label",{style:{fontSize:14,fontWeight:600,marginRight:4},children:"Para:"}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap",flex:1},children:[r.recipients.map(R=>l.jsx(g.Chip,{avatar:ie(R),label:R,onDelete:()=>$(te=>f0(te,R)),size:"small",variant:"outlined",sx:{borderRadius:999,height:28}},R)),l.jsx("input",{type:"text",value:C,onChange:R=>E(R.target.value),onKeyDown:R=>{const te=R.key;te==="Enter"||te===","||te===";"||te===" "||te==="Tab"?(R.preventDefault(),pe()):te==="Backspace"&&!C&&r.recipients.length&&$(Ge=>Ge.slice(0,-1))},onBlur:pe,onPaste:R=>{const _e=R.clipboardData.getData("text").split(ra).filter(Boolean);_e.length>1&&(R.preventDefault(),$(Ge=>un(Ge,_e)),E(""))},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"}})]})]})}),l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:2,mb:1.5},children:[l.jsx(g.FormControlLabel,{control:l.jsx(g.Checkbox,{checked:S,onChange:R=>Re(R.target.checked),size:"small"}),label:"Cliente"}),ee.length!==0&&l.jsx(g.FormControlLabel,{control:l.jsx(g.Checkbox,{checked:W,onChange:R=>j(R.target.checked),size:"small"}),label:`Asesor${ee.length>1?"es":""}`})]})]}),l.jsx(g.Divider,{}),l.jsxs(g.Box,{p:2,children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},onClick:oe,children:[l.jsx(g.Typography,{fontSize:12,fontWeight:600,sx:{textDecorationLine:"underline",cursor:"pointer"},children:"Selecciona el auto de seguimiento"}),Be!=null&&l.jsx(g.Chip,{size:"small",label:`Distribuidora: ${Be}`})]}),k.length>0?l.jsx(g.Box,{sx:{mt:1.5,display:"flex",gap:1,flexWrap:"wrap"},children:k.map((R,te)=>{const _e=Mr(R,te,h.id),Ge=Mr(R,te,h.title)??"",q=Mr(R,te,h.image),de=wA(f,q);return l.jsx(g.Chip,{onDelete:()=>P(_e),label:l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(g.Box,{sx:{width:28,height:20,borderRadius:.8,bgcolor:"#e5e6e8",overflow:"hidden",flex:"0 0 auto"},children:de?l.jsx("img",{src:de,alt:Ge,style:{width:"100%",height:"100%",objectFit:"cover"}}):l.jsx("img",{src:v,alt:Ge,style:{width:"100%",height:"100%",objectFit:"cover"}})}),l.jsx("span",{style:{fontSize:12},children:l.jsx("b",{children:Ge})})]}),sx:{pl:.5,pr:.3,py:.2,borderRadius:2,".MuiChip-deleteIcon":{fontSize:18}},variant:"outlined"},String(_e))})}):l.jsx(g.Typography,{fontSize:13,color:"#5C6372",sx:{mt:.5},children:"Aún no has seleccionado autos."})]}),l.jsx(g.Divider,{}),l.jsxs(g.Box,{sx:{p:2},children:[l.jsx(g.TextField,{placeholder:"Escribe aquí tu mensaje...",value:r.message,onChange:R=>Q(R.target.value),multiline:!0,minRows:6,fullWidth:!0,sx:{mb:1.5}}),r.attachments.length>0&&l.jsx(g.List,{dense:!0,sx:{display:"flex",flexDirection:"column",gap:2,border:"none"},children:r.attachments.map(R=>l.jsxs(g.ListItem,{sx:{px:0,background:"#EAEBF2",borderRadius:2,paddingX:1},children:[l.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"}}),l.jsx(g.Tooltip,{title:"Quitar",children:l.jsx(g.IconButton,{edge:"end",onClick:()=>me(R.name),size:"small",children:l.jsx(Ur,{fontSize:"small"})})})]},R.name))})]}),l.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:[l.jsx("input",{ref:m,hidden:!0,type:"file",multiple:!0,accept:".jpg,.jpeg,.png,.mp4,.pdf,.xlsx,.csv,.docx,.pptx,.txt",onChange:We}),l.jsx(g.Button,{startIcon:l.jsx(xA,{}),variant:"text",onClick:()=>m.current?.click(),sx:{color:"#5C6372"},children:"Adjuntar archivo"}),l.jsx(g.Box,{sx:{flex:1}}),l.jsx(g.Button,{variant:"contained",onClick:B,disabled:!ne,sx:{maxWidth:146,width:"100%",height:53,backgroundColor:"#336BE1"},children:"Enviar"})]})]}),l.jsxs(g.Dialog,{fullWidth:!0,maxWidth:"sm",fullScreen:Oe,open:A,onClose:U,children:[l.jsxs(g.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:1},children:["Selecciona tu auto de seguimiento",l.jsx(g.IconButton,{onClick:U,size:"small",children:l.jsx(Ur,{})})]}),l.jsxs(g.DialogContent,{children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(g.TextField,{placeholder:"Buscar...",fullWidth:!0,size:"small",value:I,onChange:R=>V(R.target.value),sx:{mb:2}}),Be!=null&&l.jsx(g.Chip,{size:"small",label:`Distribuidora: ${Be}`})]}),l.jsxs(g.Typography,{variant:"caption",fontWeight:600,children:["RESULTADOS (",pt.length,")"]}),l.jsxs(g.List,{sx:{p:0},children:[pt.map((R,te)=>{const _e=Mr(R,te,h.id),Ge=Y.includes(String(_e))||Y.includes(_e),q=Ne==null||Mr(R,te,h.distributorId)==Ne;return l.jsx(g.ListItem,{disableGutters:!0,sx:{p:0,opacity:q?1:.5},children:l.jsx(g.Box,{onClick:()=>q&&we(_e),sx:{cursor:q?"pointer":"not-allowed",p:.5,backgroundColor:Ge?"#e5f0ff":"transparent",width:"100%",borderBottom:"solid 1px #D3D4D5"},children:a?a(R,te):l.jsx("pre",{style:{margin:0},children:JSON.stringify(R,null,2)})})},String(_e))}),pt.length===0&&l.jsx(g.Box,{p:2,children:l.jsx(g.Typography,{children:"Tu búsqueda no generó resultados"})})]})]}),l.jsxs(g.DialogActions,{sx:{px:3,pb:2},children:[l.jsx(g.Button,{variant:"text",onClick:U,sx:{color:"#5C6372"},children:"Cancelar"}),l.jsx(g.Button,{variant:"contained",onClick:N,sx:{backgroundColor:"#336BE1"},children:"Guardar selección"})]})]})]})}Ot.AddCliente=vA,Ot.ApiProvider=Nx,Ot.AuthProvider=d1,Ot.Clientes=rA,Ot.CustomSnackbar=el,Ot.EventsProvider=i3,Ot.ModalCorreo=SA,Ot.MyCalendar=h3,Ot.useAuth=cc,Ot.useAuthRepository=Ii,Ot.useEventRepository=Ac,Object.defineProperty(Ot,Symbol.toStringTag,{value:"Module"})}));
|
|
180
|
+
`)}const nA={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"]},oA={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"]},sA={Todos:[],"Algo interesado":["Algo interesado"],Interesado:["Interesado"],"Muy interesado":["Muy interesado"],"Venta definitiva":["Venta definitiva"],"No sé":["No sé"]};function iA(e,t){switch(e){case"pruebas":return J3(t)??"—";case"servicio":return eA(t)??"—";case"nuevos":case"seminuevos":default:return X3(t)??"—"}}function aA({open:e,onClose:t,customer:r,fields:n=[],header:o,extraSections:s,normalTable:i,normalTableColumns:a=[],history:c=[],advisorHistory:u=[],onRequestEdit:d,searchFilter:f,urlsQA:h,solicitudesNuevos:y=[],solicitudesPrueba:g=[],solicitudesServicio:p=[],solicitudesSeminuevos:b=[],onCreateSolicitud:w,isCrmMode:S=!1,onSolicitudBaseUrl:E,onIframeClose:C,reloadInfo:_,idAdminSistemas:W}){if(!r)return null;const D=3,[T,M]=v.useState(null),I=!!T,[H,G]=v.useState(!1),[F,Y]=v.useState(null),[se,U]=v.useState(c??[]),[N,le]=v.useState(null),de=v.useMemo(()=>[...u].sort((L,X)=>new Date(X.FechaAsignacion).getTime()-new Date(L.FechaAsignacion).getTime()),[u]);v.useEffect(()=>{c&&c.length&&U(c)},[c]);const $=c?.length?c:se,Q=o?.title??(L=>L?.Nombre||L?.name||"Sin título"),we=o?.infoItems??[],_e=L=>L.nombreAsesor?.trim()||(L.Email?L.Email:"Sistema"),he=L=>{const X=L||"",ye=X.split(" ").filter(Boolean);return ye.length>=2?(ye[0][0]+ye[1][0]).toUpperCase():(X[0]||"?").toUpperCase()},ae=L=>L?.SolID??L?.solID??L?.SolId??L?.SOLID??null,ue=v.useMemo(()=>{const L=$??[];return Array.isArray(L?.[0])?L.flat():L},[$]),J=v.useMemo(()=>{const L=ue;return!N||F==null?L:L.filter(X=>{const ye=ae(X);return ye!=null&&String(ye)===String(F)})},[ue,N,F]),Se=v.useMemo(()=>[...J].sort((L,X)=>new Date(X.fecAlta).getTime()-new Date(L.fecAlta).getTime()),[J]),[me,ee]=v.useState(!1),Ie=v.useMemo(()=>me?Se:Se.slice(0,D),[me,Se]),j=Math.max(Se.length-D,0),Fe=L=>String(L??"").normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase().trim(),Ke=(L,X)=>Fe(JSON.stringify(L)).includes(Fe(X)),Ze=(L,X)=>f?f(L,X):Ke(L,X),Be=(L,X)=>{const ye=Fe(X).split(/\s+/).filter(Boolean);return ye.length?ye.every(Te=>Ze(L,Te)):!0},[Ve,et]=v.useState(""),[mt,k]=v.useState([]);v.useMemo(()=>i??[],[i]),v.useMemo(()=>{const L=Ve.trim();return L?(i??[]).filter(X=>Be(X,L)):i??[]},[i,Ve]);const P=m.useTheme(),B=m.useMediaQuery(P.breakpoints.down("md")),[ce,ie]=v.useState(""),[O,oe]=v.useState(!0),[Ce,Re]=v.useState(!1),R=new Date().toISOString().slice(0,10),te=new Date(Date.now()-720*3600*1e3).toISOString().slice(0,10),[xe,Ge]=v.useState(te),[At,q]=v.useState(R),[fe,De]=v.useState(null),Me=!!fe,[Ne,re]=v.useState("En Proceso"),[Ee,Oe]=v.useState("Todos"),[Pe,wr]=v.useState("Todos"),ar=["Algo interesado","Interesado","Muy interesado","Venta definitiva","No sé"],Vt=["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"],Jr=()=>{ie(""),oe(!1),Re(!1),Ge(te),q(R),re("Todos"),Oe("Todos"),wr("Todos")},Ye=v.useMemo(()=>(ce??"").trim()!==""||Ne!=="Todos"||Ee!=="Todos"||O||Ce||Pe!=="Todos",[ce,Ne,Ee,O,Ce,Pe]);function Sr(L){if(!L)return"";const X=new Date(L);if(isNaN(X.getTime()))return"";const ye=String(X.getDate()).padStart(2,"0"),Te=String(X.getMonth()+1).padStart(2,"0"),Tt=String(X.getFullYear()).slice(-2);return`${ye}/${Te}/${Tt}`}function oa(L){const X=L?new Date(L):null;return X&&!isNaN(X.getTime())?X:null}function ll(L,X){let ye=null;for(const Te of L){const Tt=oa(X(Te));if(Tt){const Ct=Tt.getTime();(ye===null||Ct>ye)&&(ye=Ct)}}return ye?new Date(ye):null}function bs(L){const X=ll(L,ye=>ye.UltimoSeguimiento||ye.FechaCita);return X?Sr(X.toISOString()):"—"}function xs(L){const X=(L??"").toLowerCase().trim();return X==="sin venta"||X==="con venta"||X==="rechazada"||X==="rechazadas"}function sa(L){return L.filter(X=>xs(X.EstatusDescripcion)).length}function ia(L){return L.filter(X=>!xs(X.EstatusDescripcion)).length}const ul=({progress:L,color:X})=>{if(!L)return l.jsx(sl,{current:0,total:0,color:X});const ye=L.split("/").map(Number);if(ye.length!==2||ye.some(Ct=>Number.isNaN(Ct)))return l.jsx(sl,{current:0,total:0,color:X});const[Te,Tt]=ye;return l.jsx(sl,{current:Te,total:Tt,color:X})};function aa(L){return[{key:"fecha",header:"Fecha",accessor:X=>Sr(X.Fecha),width:110},{key:"vehiculo",header:"Vehículo",accessor:X=>l.jsx(m.Tooltip,{title:X.Vehiculo??"",placement:"top",arrow:!0,children:l.jsx(m.Typography,{component:"span",sx:{fontSize:13,fontWeight:500,display:"block",maxWidth:260,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",lineHeight:1.3,cursor:"default"},children:X.Vehiculo??"—"})}),width:260},{key:"estatus",header:"Estatus",accessor:X=>l.jsx(m.Typography,{sx:{fontWeight:800,fontSize:13},children:iA(L,X.IdEstatus)}),width:170},{key:"nivel",header:"Nivel de Interés",accessor:X=>{const{bg:ye,color:Te}=Q3(X.NivelInteres);return l.jsx(m.Box,{sx:{display:"inline-block",px:1,py:.25,borderRadius:9999,bgcolor:ye,color:Te,fontSize:12,fontWeight:X.NivelInteres?800:500},children:X.NivelInteres??"—"})},width:150},{key:"asesor",header:"Asesor",accessor:X=>{const ye=(X.Asesor??"").trim(),Te=dl=>{if(!dl)return"";const MA=dl[0]?.toUpperCase()??"",PA=dl[1]?.toLowerCase()??"";return`${MA}${PA}`};if(!ye)return l.jsx(m.Tooltip,{title:"",placement:"top",children:l.jsx(m.Typography,{sx:{fontWeight:700,fontSize:13,textAlign:"center"},children:"—"})});const Tt=ye.split(/\s+/),Ct=Tt[0]??"",Or=Tt[1]??"",Cr=Te(Ct),Tn=Te(Or),IA=`${Cr}${Tn}`||"—";return l.jsx(m.Tooltip,{title:ye,placement:"top",children:l.jsx(m.Typography,{sx:{fontWeight:700,fontSize:13,textAlign:"center"},children:IA})})},width:120,align:"center"},{key:"origen",header:"Origen",accessor:X=>X.Origen??"—",width:120,align:"center"},{key:"actividad",header:"Actividad",accessor:X=>l.jsx(m.Tooltip,{title:X.Actividad??"",placement:"top",arrow:!0,children:l.jsxs(m.Box,{sx:{maxWidth:160,overflow:"hidden",display:"flex",gap:.5,alignItems:"center"},children:[X.Icon&&l.jsx("span",{style:{color:"#fff",backgroundColor:X.Color,borderRadius:100,alignItems:"center",justifyContent:"center",display:"flex",padding:3},children:l.jsx("i",{className:X.Icon})}),l.jsx(m.Typography,{component:"span",noWrap:!0,sx:{fontSize:13,fontWeight:500,display:"block",overflow:"hidden",textOverflow:"ellipsis",lineHeight:1.3,cursor:(X.Actividad??"").length?"default":"inherit"},children:X.Actividad??"—"})]})}),width:180},{key:"avance",header:"Avance",accessor:X=>l.jsx(ul,{progress:X.Avance,color:X.Color}),width:200,align:"left"}]}function A(L){const ye=aa(L).slice(1);return[{key:"fecha",header:"Fecha",accessor:Te=>Sr(Te.Fecha),width:110},{key:"fechaCita",header:"Fecha Cita",accessor:Te=>Sr(Te.FechaCita),width:120},{key:"horaCita",header:"Hora Cita",accessor:Te=>Te.HoraCita??"—",width:110},...ye]}function ne(L){const X=L.kind;switch(X){case"pruebas":case"servicio":return A(X);case"nuevos":case"seminuevos":default:return aa(X)}}function ve(L,X,ye,Te){return{id:L,kind:ye,title:X,metrics:[{label:"En Proceso",value:ia(Te)},{label:"Finalizadas",value:sa(Te)},{label:"Último seg.",value:bs(Te)}],rows:Te,initiallyOpen:!1}}const je=[ve("n-1","Cotización de nuevos","nuevos",y),ve("p-1","Prueba de Manejo","pruebas",g),ve("s-1","Cita de Servicio","servicio",p),ve("sn-1","Cotización para Seminuevos","seminuevos",b)],Qe=v.useMemo(()=>{const L=(ce??"").trim().toLowerCase(),X=(ye,Te)=>{if(L&&!(ye.Vehiculo??"").toLowerCase().includes(L))return!1;const Tt=Ce?ye.FechaCita:ye.Fecha;if(O&&Tt){const Ct=oa(Tt??"");if(!Ct)return!1;const Or=xe?new Date(`${xe}T00:00:00`):null,Cr=At?new Date(`${At}T00:00:00`):null;if(Cr&&Cr.setDate(Cr.getDate()+1),Or&&Ct<Or||Cr&&Ct>=Cr)return!1}if(Ne!=="Todos"){const Ct=(ye.EstatusDescripcion??"").toLowerCase();if(!(nA[Ne]??[]).some(Tn=>Ct===Tn.toLowerCase()))return!1}if(Ee!=="Todos"){const Ct=(ye.Actividad??"").toLowerCase();if(!(oA[Ee]??[]).some(Tn=>Ct===Tn.toLowerCase()))return!1}if(Pe!=="Todos"){const Ct=(ye.NivelInteres??"").toLowerCase();if(!(sA[Pe]??[]).some(Tn=>Ct===Tn.toLowerCase()))return!1}return!0};return je.map(ye=>{const Te=(ye.rows??[]).filter(Ct=>X(Ct,ye.kind)),Tt=[{label:"En Proceso",value:ia(Te)},{label:"Finalizadas",value:sa(Te)},{label:"Último seg.",value:bs(Te)}];return{...ye,rows:Te,metrics:Tt}})},[je,ce,O,xe,At,Ce,Ne,Ee,Pe]),dt={nuevos:"cotizaciones",pruebas:"pruebademanejo",servicio:"citasservicio",seminuevos:"seminuevos"},qe=(L,X)=>{const ye=L.SolID;if(!ye)return;const Te=X.kind,Tt=dt[Te]??"cotizaciones",Ct=h?`https://qa2.crm.netcar.com.mx/netcar/${Tt}/${ye}`:`https://crmxs.netcar.com.mx/netcar/${Tt}/${ye}`,Or=E?.({row:L,section:X,slug:Tt,solId:ye,baseUrl:Ct});if(!S){const Cr=Or??Ct;Y(ye),le(Cr),G(!0)}},We=()=>{C?.(r),Y(null),le(null),G(!1)},Yt=v.useRef(!1),gt=v.useRef(null),Ot=v.useCallback(()=>{if(!Yt.current){Yt.current=!0;return}gt.current&&window.clearTimeout(gt.current),gt.current=window.setTimeout(()=>{_?.(r)},500)},[_,r]);return v.useEffect(()=>{Yt.current=!1,gt.current&&window.clearTimeout(gt.current)},[N,F]),l.jsx(m.Dialog,{open:e,onClose:t,fullWidth:!0,fullScreen:B,PaperProps:{sx:{height:{xs:"100dvh",md:"90vh"},maxWidth:{xs:"100vw",md:"92vw"},overflow:"hidden",display:"flex",flexDirection:"column",borderRadius:{xs:0,md:3}}},children:l.jsxs(m.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},height:"100%",minHeight:0,overflow:"auto",position:"relative"},children:[l.jsxs(m.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:[l.jsxs(m.Box,{children:[l.jsx(m.Stack,{direction:"row",spacing:2,alignItems:"center",mb:1,sx:{px:2.5,pt:2.5},children:l.jsxs(m.Box,{display:"flex",flexDirection:"column",gap:1,width:"100%",children:[l.jsx(m.Box,{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%",alignItems:"center",children:l.jsx(m.Box,{sx:{flex:1,minWidth:0,pr:1},children:l.jsxs(m.Typography,{component:"span",fontWeight:700,sx:{display:"inline",lineHeight:1.2,wordBreak:"break-word",pr:.5},children:[Q(r)," ",l.jsx(m.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:l.jsx(Z3,{sx:{fontSize:"1em"}})})]})})}),we.map((L,X)=>l.jsxs(m.Box,{sx:{display:"flex",gap:1.2,alignItems:"center",cursor:L.onClick?"pointer":"default"},onClick:()=>{L.onClick&&L.onClick(r)},children:[L.icon,l.jsx(m.Typography,{variant:"body2",sx:{color:L.inLink?"#336BE1":"#070C10"},style:{},children:L.value(r)})]},X))]})}),l.jsx(m.Stack,{mb:2,sx:{px:2.5,pt:0,gap:2},children:n.map((L,X)=>{const ye=L.label?.toLowerCase().startsWith("asesor");return l.jsxs(m.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[l.jsx(m.Box,{sx:{width:"50%"},children:l.jsx(m.Typography,{variant:"body2",color:"text.secondary",sx:{color:"#5C6372"},children:L.label})}),l.jsxs(m.Box,{sx:{width:"50%",display:"flex",alignItems:"center",gap:1},children:[l.jsx("div",{children:L?.avatar?L.avatar(r):null}),l.jsx(m.Typography,{variant:"body2",color:"textPrimary",children:L?.value(r)}),ye&&!W&&l.jsx(m.Tooltip,{title:"Historial asesores",placement:"top",arrow:!0,children:l.jsx(m.IconButton,{size:"small",onClick:Te=>M(Te.currentTarget),sx:{ml:.5},disableRipple:!0,children:l.jsx(W3,{fontSize:"small",sx:{color:"#5C6372"}})})})]})]},X)})}),l.jsx(m.Divider,{sx:{my:2}})]}),l.jsx(m.Box,{px:2.5,pb:.5,children:l.jsxs(m.Typography,{children:[l.jsx("span",{style:{fontWeight:800},children:"Última actividad"}),!N&&" por solicitud",":"]})}),l.jsxs(m.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:[Ie.length===0&&l.jsx(m.Typography,{variant:"body2",color:"text.secondary",children:"Sin actividad registrada."}),l.jsxs(m.Box,{children:[Ie?.map((L,X)=>{const ye=_e(L),Te=rA(L.comentario||"");return l.jsxs(m.Box,{sx:{pb:1.5},children:[l.jsxs(m.Stack,{direction:"row",spacing:1,alignItems:"center",justifyContent:"space-between",sx:{mb:.75},children:[l.jsx(m.Typography,{variant:"subtitle2",sx:{color:"#5C6372"},children:L.tipo||"Evento"}),l.jsx(m.Chip,{size:"small",label:L.auto!=null?`${L.auto}`:"—",sx:{bgcolor:"#336be1",color:"#fff",height:20}})]}),Te?l.jsx(m.Typography,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.5,mb:.75},children:Te}):null,l.jsxs(m.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[L?.ImgAsesor!=null?l.jsx(m.Avatar,{sx:{width:28,height:28,bgcolor:"#EAEBF2",color:"#5C6372",fontSize:14},alt:he(ye),src:L?.ImgAsesor}):l.jsx(m.Avatar,{sx:{width:28,height:28,bgcolor:"#EAEBF2",color:"#5C6372",fontSize:14},children:he(ye)}),l.jsxs(m.Stack,{spacing:0,children:[l.jsx(m.Typography,{variant:"body2",fontWeight:600,children:ye}),l.jsx(m.Typography,{variant:"caption",color:"text.secondary",children:tA(L.fecAlta)})]})]}),X<Ie.length-1&&l.jsx(m.Divider,{sx:{mt:1.25}})]},L.segID??X)}),Se.length>D&&l.jsx(m.Box,{sx:{mt:1},children:l.jsx(m.Button,{onClick:()=>ee(L=>!L),size:"small",sx:{textTransform:"none",px:0,color:"#336BE1","&:hover":{background:"transparent",textDecoration:"underline"}},children:me?"Ver menos":`Ver más (${j})`})})]})]}),l.jsx(m.Menu,{anchorEl:T,open:I,onClose:()=>M(null),TransitionComponent:m.Fade,MenuListProps:{disablePadding:!0},PaperProps:{sx:{width:320,p:0,overflow:"hidden"}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:l.jsxs(m.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[l.jsx(m.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"}),l.jsxs(m.Box,{sx:{overflowY:"auto",py:.5,maxHeight:200},children:[de.length===0&&l.jsx(m.Box,{sx:{px:1.5,py:1},children:l.jsx(m.Typography,{variant:"body2",color:"text.secondary",children:"Sin registros"})}),de.map((L,X)=>{const ye=U3(L),Te=H3(L.FechaBaja??L.FechaAsignacion);return l.jsx(m.Box,{sx:{px:1,py:.75},children:l.jsxs(m.Stack,{direction:"row",alignItems:"center",spacing:1,children:[l.jsx(m.Avatar,{sx:{width:28,height:28,bgcolor:"#EAEBF2",color:"#5C6372",fontSize:14},src:L?.ImgAsesor??void 0,children:V3(ye)}),l.jsx(m.Box,{sx:{flex:1,minWidth:0},children:l.jsx(m.Typography,{variant:"body2",noWrap:!0,children:ye})}),l.jsx(m.Typography,{variant:"caption",color:"text.secondary",sx:{whiteSpace:"nowrap"},children:Te})]})},X)})]})]})})]}),H?l.jsxs(m.Box,{sx:{flex:1,minWidth:0,overflow:"hidden",position:"relative"},children:[l.jsx(m.Box,{sx:{position:"absolute",top:18,left:24,zIndex:10,pointerEvents:"auto"},children:l.jsx(m.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:l.jsx(m.Button,{onClick:We,sx:{backgroundColor:"#2571d6",minWidth:36,minHeight:36,p:.5,borderRadius:"8px",color:"#fff",boxShadow:3,"&:hover":{backgroundColor:"#2074e3"}},children:l.jsx(Ok,{fontSize:"medium"})})})}),N&&l.jsx("iframe",{src:N,width:"100%",height:"100%",onLoad:Ot,style:{border:0}})]}):l.jsxs(m.Box,{sx:{width:"100%",minHeight:0,overflowY:"auto"},children:[l.jsx(m.Box,{sx:{mt:{xs:1.5,md:3}},children:l.jsxs(m.Box,{sx:{mt:3,display:"flex",flexDirection:"column",gap:4,padding:"0 20px 0 20px"},children:[l.jsx(m.Typography,{variant:"h4",sx:{fontWeight:800,textAlign:"center",mb:1,letterSpacing:.2},children:"Solicitudes"}),l.jsxs(m.Stack,{direction:{xs:"column",md:"column"},spacing:1.5,alignItems:{xs:"stretch",md:"center"},justifyContent:"space-between",sx:{mb:1.5},children:[l.jsxs(m.Stack,{direction:"row",spacing:1.5,alignItems:"flex-start",sx:{flexWrap:"wrap"},children:[l.jsx(m.TextField,{size:"small",placeholder:"Buscar por vehículo",value:ce,onChange:L=>ie(L.target.value),InputProps:{endAdornment:l.jsx(M3,{fontSize:"small",sx:{color:"#b6afaf"}})},sx:{minWidth:220}}),l.jsxs(m.Box,{sx:{display:"flex",flexDirection:"column",gap:.5,position:"relative"},children:[l.jsxs(m.Stack,{direction:"row",spacing:1.1,position:"absolute",bottom:48,left:0,alignItems:"center",children:[l.jsx(m.FormControlLabel,{label:l.jsx(m.Typography,{sx:{fontSize:15,fontWeight:600,marginLeft:0},children:"Por fecha"}),labelPlacement:"start",control:l.jsx(m.Checkbox,{checked:O,onChange:L=>oe(L.target.checked),size:"small",sx:{p:.3,"& .MuiSvgIcon-root":{fontSize:19},color:"#bab4b4"}}),sx:{ml:0,"& .MuiFormControlLabel-label":{marginRight:0}}}),l.jsx(m.Typography,{sx:{fontSize:15,paddingLeft:.4},children:"De cita"})]}),l.jsxs(m.Stack,{direction:"row",spacing:1,children:[l.jsx(m.TextField,{size:"small",type:"date",label:"Desde",InputLabelProps:{shrink:!0},value:xe,onChange:L=>Ge(L.target.value),disabled:!O,sx:{width:170}}),l.jsx(m.TextField,{size:"small",type:"date",label:"Hasta",InputLabelProps:{shrink:!0},value:At,onChange:L=>q(L.target.value),disabled:!O,sx:{width:170}})]})]}),l.jsx(m.IconButton,{onClick:L=>De(L.currentTarget),disableRipple:!0,sx:{border:"1px solid #d4d7de",borderRadius:2,width:40,height:40,mt:2},children:l.jsx(A3,{})}),Ye&&l.jsx(m.Button,{variant:"outlined",onClick:Jr,disableRipple:!0,sx:{height:40,textTransform:"none",borderColor:"#d4d7de",color:"#333",mt:2},children:"Limpiar filtros"}),l.jsx(m.Tooltip,{title:Ye&&"Crear Solicitud",arrow:!0,placement:"top",disableHoverListener:!Ye,children:l.jsx("span",{children:l.jsxs(m.Button,{variant:"outlined",sx:{height:40,textTransform:"none",borderColor:"none",color:"#fff",backgroundColor:"#1e5bce","&:hover":{backgroundColor:"#1e5bce",boxShadow:"none"}},onClick:()=>{w?.(r)},disableRipple:!0,children:[l.jsx(o0,{sx:{color:"#fff",fontSize:24,paddingRight:.6}}),!Ye&&"Crear Solicitud"]})})})]}),l.jsx(z3,{sections:Qe,detailColumns:[],getDetailColumns:ne,onRowClick:qe})]})]})}),l.jsx(m.Menu,{anchorEl:fe,open:Me,onClose:()=>De(null),TransitionComponent:m.Fade,PaperProps:{sx:{p:1.5,width:260,borderRadius:2,boxShadow:3}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:l.jsxs(m.Stack,{spacing:1.5,paddingX:1.5,paddingY:1,children:[l.jsx(m.Typography,{variant:"subtitle2",sx:{fontWeight:700,color:"#070C10"},children:"Filtro"}),l.jsxs(m.Box,{children:[l.jsx(m.Typography,{variant:"body2",sx:{fontWeight:700,mb:.5,color:"#5C6372"},children:"Estatus"}),l.jsx(m.RadioGroup,{value:Ne,onChange:L=>re(L.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(L=>l.jsx(m.FormControlLabel,{value:L,control:l.jsx(m.Radio,{size:"small",sx:{p:.2,"& .MuiSvgIcon-root":{fontSize:18}}}),label:L},L))})]}),l.jsxs(m.Box,{children:[l.jsx(m.Typography,{variant:"body2",sx:{fontWeight:700,mb:.5,color:"#5C6372"},children:"Actividades"}),l.jsx(m.RadioGroup,{value:Ee,onChange:(L,X)=>Oe(X),sx:{"& .MuiFormControlLabel-root":{m:0,py:.3},"& .MuiFormControlLabel-label":{fontSize:14,fontWeight:400,ml:0}},children:["Todos",...Vt].map(L=>l.jsx(m.FormControlLabel,{value:L,sx:{alignItems:"start"},control:l.jsx(m.Radio,{size:"small",sx:{p:.2,"& .MuiSvgIcon-root":{fontSize:18}}}),label:L},L))})]}),l.jsxs(m.Box,{children:[l.jsx(m.Typography,{variant:"body2",sx:{fontWeight:700,mb:.5,color:"#5C6372"},children:"Nivel de interés"}),l.jsx(m.RadioGroup,{value:Pe,onChange:(L,X)=>wr(X),sx:{"& .MuiFormControlLabel-root":{m:0,py:.3},"& .MuiFormControlLabel-label":{fontSize:14,fontWeight:400,ml:0}},children:["Todos",...ar].map(L=>l.jsx(m.FormControlLabel,{value:L,control:l.jsx(m.Radio,{size:"small",sx:{p:.2,"& .MuiSvgIcon-root":{fontSize:18}}}),label:L},L))})]})]})})]})]})})}const s0={tableClientes:"_tableClientes_acwe7_1",tableResponsive:"_tableResponsive_acwe7_1"};function i0(e,t,r){const{fields:n,order:o=["nombreCliente","email","acciones"],header:s={},cells:i={},hide:a={},actions:c}=t,u=c??{},d=u.show??{},f=u.handlers??{},h=u.accessors??{},y=u.icons??{},g=u.className??"d-flex flex-row gap-2 align-items-center ",p=u.tooltip??{},b=y.view??l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",style:{fill:"#070c10"},children:[l.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"}),l.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),w={nombreCliente:{key:"nombreCliente",header:s.nombreCliente??"Cliente",accessor:I=>I[n.nombreCliente],cell:i.nombreCliente,width:190},email:{key:"email",header:s.email??"Correo",accessor:I=>I[n.email],cell:i.email??(I=>{const H=String(I[n.email]??"");return H?l.jsx("a",{href:`mailto:${H}`,children:H}):l.jsx("span",{className:"text-muted",children:"—"})}),width:230},acciones:a.acciones?void 0:{key:"acciones",header:"",cell:i.acciones??(I=>{const H=nl(d.whatsapp,I,!0),G=nl(d.email,I,!0),F=nl(d.view,I,!0),Y=h.phone?.(I),se=h.email?.(I),U=de=>{if(de.stopPropagation(),f.onWhatsApp)return f.onWhatsApp(I);if(!Y)return;const $=h.countryCode??"52",Q=C3(String(Y));typeof window<"u"&&window.open(`https://wa.me/${$}${Q}`,"_blank")},N=de=>{if(de.stopPropagation(),f.onEmail)return f.onEmail(I);se&&typeof window<"u"&&(window.location.href=`mailto:${se}`)},le=de=>{de.stopPropagation(),f.onView&&f.onView(I)};return l.jsxs("div",{className:g,children:[H&&l.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:p.whatsapp??"WhatsApp",onClick:U,style:{width:24,height:24},children:l.jsx("img",{src:_3,alt:"WhatsApp"})}),G&&l.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:p.email??"Email",onClick:N,style:{width:24,height:24},children:l.jsx("img",{src:w3,alt:"Email"})}),F&&l.jsx("button",{type:"button",className:"btn p-0 border-0 bg-transparent",title:p.view??"Ver detalle",onClick:le,style:{width:24,height:24},children:b})]})}),width:120}},S=Object.values(w).filter(I=>!!I),E=(e??[]).filter(I=>!!I?.key),C=new Map;for(const I of S)C.set(String(I.key),I);for(const I of E)C.set(String(I.key),I);const _=[...S.map(I=>String(I.key)),...E.map(I=>String(I.key))],W=Array.from(new Set(o.map(I=>String(I)).filter(I=>C.has(I)))),D=_.filter(I=>!W.includes(I)),T=[...W,...D],M="acciones";if(C.has(M)){const I=T.filter(H=>H!==M);T.splice(0,T.length,...I,M)}return T.map(I=>C.get(I))}function cA(e){const{rows:t,columns:r,clientSort:n=!0,urlsQA:o=!0,defaultSort:s,minWidth:i=1100,rowKey:a=E3,haveOpenDetailFor:c=!0,defaults:u,detailConfig:d,normalTable:f,onRowClick:h,activityHistory:y,advisorHistory:g,forceOpenDetailFor:p,closeDetailFor:b,onRequestEdit:w,searchFilter:S,solicitudesNuevos:E,solicitudesPrueba:C,solicitudesServicio:_,solicitudesSeminuevos:W,onCreateSolicitud:D,isCrmMode:T,onSolicitudBaseUrl:M,onIframeClose:I,reloadInfo:H,idAdminSistemas:G=!1}=e,[F,Y]=v.useState(s??null),[se,U]=v.useState({open:!1,customer:null}),[N,le]=v.useState([]),de=ae=>{U({open:!0,customer:ae})},$=ae=>{c&&(h?.(ae),U({open:!0,customer:ae}))},Q=()=>{U({open:!1,customer:null}),b?.()},we=v.useMemo(()=>u?i0(r??[],u):i0(r??[],{fields:{},order:[]}),[r,u]),_e=v.useMemo(()=>{if(!n||!F)return t;const ae=we.find(J=>J.key===F.key);if(!ae)return t;const ue=[...t];return ue.sort((J,Se)=>{const me=rl(ae,J,0),ee=rl(ae,Se,0),Ie=S3(me,ee);return F.direction==="asc"?Ie:-Ie}),ue},[t,we,F,n]),he=v.useMemo(()=>{const ae=d?.getCustomerId;return ue=>{const J=ae?.(ue)??ue?.Id_cliente??ue?.CliID??ue?.id??ue?.ID??ue?.Id??"";return String(J)}},[d]);return v.useEffect(()=>{if(!se.open||!se.customer)return;const ae=he(se.customer);if(!ae)return;const ue=(t??[]).find(J=>he(J)===ae);ue&&ue!==se.customer&&U(J=>({...J,customer:ue}))},[t,se.open,se.customer,he]),v.useEffect(()=>{p&&de(p)},[p]),l.jsxs("div",{children:[l.jsx("div",{className:`${s0.tableClientes} back-white rounded-3 shadow-main mt-4 mb-4`,children:l.jsx("div",{className:`${s0.tableResponsive} table-responsive`,children:l.jsxs("table",{className:"table table-hover align-middle mb-0",children:[l.jsx("thead",{children:l.jsx("tr",{children:we.map(ae=>l.jsx("th",{style:{fontWeight:600,width:ae.width,paddingTop:"20px",paddingBottom:"20px",textAlign:ae.align??"left"},children:ae.header},ae.key))})}),l.jsx("tbody",{children:_e.map((ae,ue)=>l.jsx("tr",{onClick:()=>$?.(ae),role:"button",tabIndex:0,onKeyDown:J=>{(J.key==="Enter"||J.key===" ")&&$?.(ae)},style:{cursor:"pointer"},children:we.map((J,Se)=>{const me=J.Component?l.jsx(J.Component,{row:ae,index:ue}):J.cell?J.cell(ae,ue):(()=>{const ee=rl(J,ae,ue);return ee==null||ee===""?"":String(ee)})();return l.jsx("td",{style:{paddingTop:"20px",paddingBottom:"20px",textAlign:J.align??"left"},children:me},`${String(J.key)}-${Se}`)})},a(ae,ue)))})]})})}),se.open&&l.jsx(aA,{open:se.open,onClose:Q,customer:se.customer,fields:d?.dynamicFields,header:d?.header,normalTable:f,history:y,advisorHistory:g,urlsQA:o,onRequestEdit:ae=>{Q(),w?.(ae)},searchFilter:S,solicitudesNuevos:E,solicitudesPrueba:C,solicitudesServicio:_,solicitudesSeminuevos:W,onCreateSolicitud:D,isCrmMode:T,onSolicitudBaseUrl:M,onIframeClose:I,reloadInfo:H,idAdminSistemas:G})]})}const a0=K.forwardRef(({sx:e,...t},r)=>l.jsx(m.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}}));a0.displayName="SoftInput";function lA({message:e}){return e?l.jsxs(m.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:[l.jsx(el,{fontSize:"small",sx:{color:"rgb(211, 47, 47)"}}),l.jsx("span",{style:{color:"rgb(95, 33, 32)",fontSize:14,fontWeight:"500"},children:e})]}):null}function uA(e){if(e.required)return e.required===!0?"El campo es obligatorio.":e.required}function il(e,t){const r=uA(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 c0={"& .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%"},dA={mb:1,fontWeight:600,color:"#1C1C1D","&.Mui-focused":{color:"#1C1C1D !important"},"&.Mui-error":{color:"#1C1C1D !important"}};function al({label:e,errorMsg:t,helperText:r,children:n,sx:o}){return l.jsxs(m.FormControl,{fullWidth:!0,error:!!t,sx:o,className:"1- FieldWrapper",children:[l.jsx(m.FormLabel,{sx:dA,children:e}),n,l.jsx(lA,{message:t||r})]})}function fA(e,t){const{register:r,formState:{errors:n}}=t,o={...il(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"]),u=C=>e.onlyNumbers?(C.match(a)??[]).join(""):e.onlyLetters?(C.match(i)??[]).join(""):C,d=(C,_)=>c.has(C)||_?!0:e.onlyNumbers?/^[0-9]$/.test(C):e.onlyLetters?/^[A-Za-zÁÉÍÓÚÜÑáéíóúüñ\s'.-]$/.test(C):!0,f=n[e.name]?.message,h=r(e.name,o),y=(e.inputProps&&typeof e.inputProps.maxLength=="number"?e.inputProps.maxLength:void 0)??e.maxLength,g=C=>{d(C.key,C.ctrlKey||C.metaKey)||C.preventDefault()},p=C=>{const _=C.data??null;_!=null&&(e.onlyNumbers&&/[^0-9]/.test(_)&&C.preventDefault(),e.onlyLetters&&/[^A-Za-zÁÉÍÓÚÜÑáéíóúüñ ]/.test(_)&&C.preventDefault())},b=C=>{const _=C.clipboardData.getData("text"),W=u(_);if(W!==_){C.preventDefault();const D=C.target,T=D.selectionStart??D.value.length,M=D.selectionEnd??D.value.length;D.setRangeText(W,T,M,"end"),D.dispatchEvent(new Event("input",{bubbles:!0}))}},w=C=>{const _=u(C.target.value);_!==C.target.value&&(C.target.value=_),y&&C.target.value.length>y&&(C.target.value=C.target.value.slice(0,y)),h.onChange(C)},S={...e.inputProps,...s?{inputMode:"email",autoComplete:"email"}:{},maxLength:y,onKeyDown:g,onBeforeInput:p,onPaste:b,onInvalid:C=>C.preventDefault()},E=e.onlyNumbers||s?"text":e.type??"text";return l.jsx(al,{label:e.label,errorMsg:f,helperText:e.helperText,sx:c0,children:l.jsx(a0,{placeholder:e.placeholder,type:E,inputProps:S,...h,onChange:w,sx:{width:"100%",maxWidth:"none"},className:"SoftInputData"})})}function pA(e,t){const{control:r}=t,n=!!e.multiple;return l.jsx(hr,{name:e.name,control:r,rules:il(e,{isArray:n}),render:({field:o,fieldState:s})=>l.jsx(al,{label:e.label,errorMsg:s.error?.message,helperText:e.helperText,sx:c0,children:l.jsxs(m.Select,{...o,multiple:n,displayEmpty:!0,sx:{height:48,backgroundColor:"#EBEEF0","& .MuiSelect-select":{display:"flex",alignItems:"center",py:0}},className:"2-SoftInputData",children:[!n&&l.jsx(m.MenuItem,{value:"",disabled:!0,children:"Selecciona…"}),e.options.map(i=>l.jsx(m.MenuItem,{value:i.value,children:i.label},String(i.value)))]})})})}function hA(e,t){return l.jsx(hr,{name:e.name,control:t.control,rules:il(e),render:({field:r,fieldState:n})=>l.jsx(al,{label:e.label,errorMsg:n.error?.message,helperText:e.helperText,children:l.jsx(m.RadioGroup,{row:!0,...r,className:"3-RadioFieldRender",children:e.options.map(o=>l.jsx(m.FormControlLabel,{value:o.value,control:l.jsx(m.Radio,{}),label:o.label},String(o.value)))})})})}function l0(e,t){if(e.render)return e.render(t);switch(e.kind){case"text":return fA(e,t);case"select":return pA(e,t);case"radio":return hA(e,t);default:return null}}function mA(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,u]=v.useState(1),[d,f]=v.useState(t),{currentItems:h,totalPages:y,showingFrom:g,showingTo:p,totalItems:b}=v.useMemo(()=>{const E=a.length,C=d==="Todos"?1/0:Number(d),_=C===1/0?1:Math.max(1,Math.ceil(E/C)),W=Math.min(c,_),D=C===1/0?E:W*C,T=C===1/0?0:D-C;return{currentItems:C===1/0?a:a.slice(T,D),totalPages:_,showingFrom:E===0?0:T+1,showingTo:C===1/0?E:Math.min(D,E),totalItems:E}},[a,c,d]),w=E=>{const C=Math.max(1,Math.min(E,y||1));u(C),n?.(C),s?.()};return{currentItems:h,totalPages:y,showingFrom:g,showingTo:p,totalItems:b,currentPage:c,itemsPerPage:d,perPageOptions:r,goTo:w,next:()=>w(c+1),prev:()=>w(c-1),setItemsPerPage:E=>{f(E),o?.(E),u(1),s?.()},setCurrentPage:w}}var gs={},u0;function gA(){if(u0)return gs;u0=1;var e=rt();Object.defineProperty(gs,"__esModule",{value:!0}),gs.default=void 0;var t=e(ht()),r=lt();return gs.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"),gs}var vA=gA();const yA=tt(vA);var vs={},d0;function bA(){if(d0)return vs;d0=1;var e=rt();Object.defineProperty(vs,"__esModule",{value:!0}),vs.default=void 0;var t=e(ht()),r=lt();return vs.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"),vs}var xA=bA();const _A=tt(xA),wA=({currentPage:e,totalPages:t,onPageChange:r,itemsPerPage:n,onItemsPerPageChange:o,itemsPerPageOptions:s,showingFrom:i,showingTo:a,totalItems:c})=>{const u=m.useTheme(),d=m.useMediaQuery(u.breakpoints.down("sm")),f=()=>{if(t<=1)return[1];const g=d?0:2,p=[],b=1,w=t,S=Math.max(b+1,e-g),E=Math.min(w-1,e+g);p.push(b),S>b+1&&p.push("...");for(let C=S;C<=E;C++)C>=b+1&&C<=w-1&&p.push(C);return E<w-1&&p.push("..."),p.push(w),p},h=g=>{const p=g.target.value;o(p)},y=Math.max(1,t);return l.jsxs(m.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:[l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",justifyContent:"center"},children:[l.jsx(m.IconButton,{onClick:()=>r(e-1),disabled:e<=1,size:"medium",sx:{"&:hover":{backgroundColor:"action.hover"}},"aria-label":"Página anterior",children:l.jsx(yA,{fontSize:"large"})}),f().map((g,p)=>g==="..."?l.jsx(m.Box,{sx:{px:1,display:"flex",alignItems:"center",fontSize:"1.1rem"},children:". . ."},`dots-${p}`):l.jsx(m.Button,{onClick:()=>r(g),size:"small",sx:{minWidth:36,height:36,fontSize:"1.05rem",p:1,borderRadius:"10px",backgroundColor:e===g?"primary.main":"transparent",fontWeight:e===g?700:400,color:e===g?"#fff":"#5C6372","&:hover":{backgroundColor:e===g?"primary.dark":"action.hover"},boxShadow:"none",border:"none",mx:.5},children:g},`p-${g}`)),l.jsx(m.IconButton,{onClick:()=>r(e+1),disabled:e>=y,size:"medium",sx:{"&:hover":{backgroundColor:"action.hover"}},"aria-label":"Página siguiente",children:l.jsx(_A,{fontSize:"large"})})]}),l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",gap:1.25,justifyContent:{xs:"center",sm:"flex-start"},mt:{xs:1,sm:0}},children:[l.jsx(m.Typography,{variant:"body2",children:"Mostrar"}),l.jsx(m.FormControl,{size:"small",sx:{minWidth:72},children:l.jsx(m.Select,{value:n,onChange:h,renderValue:g=>g==="Todos"?"Todos":String(g),children:s.map(g=>l.jsx(m.MenuItem,{value:g,children:g==="Todos"?"Todos":g},String(g)))})}),l.jsx(m.Typography,{variant:"body2",children:"por página"})]})]})};function SA(e){const{open:t,dataAdd:r,fields:n,onSubmit:o,onCancel:s,defaultValues:i,txtBtnGuardar:a,haveId:c=!1,itemsTable:u,filter:d,getId:f,renderRow:h,selectedIds:y,onSelectedChange:g,onSubmitAddData:p,initialSelectedIds:b=[],showAutosPanel:w}=e,S=Ip({mode:"onSubmit",reValidateMode:"onChange",criteriaMode:"all",shouldUnregister:!1,defaultValues:i});v.useEffect(()=>{i&&S.reset(i)},[i,S]);const[E,C]=v.useState(""),[_,W]=v.useState(b),D=Array.isArray(y)&&!!g,T=D?y:_,M=O=>{const oe=typeof O=="function"?O(T):O;D?g(oe):W(oe)},I=v.useCallback(O=>f?f(O):O?.IdAuto,[f]),H=v.useMemo(()=>{const O=new Map;return(u??[]).forEach((oe,Ce)=>O.set(I(oe),Ce)),O},[u,I]),G=v.useRef(new Set),F=v.useMemo(()=>{const O=new Map;return(u??[]).forEach(oe=>O.set(f?f(oe):oe?.IdAuto,oe)),O},[u,f]),Y=v.useMemo(()=>(n??[]).filter(O=>!!O.required).map(O=>O.name),[n]),se=fp({control:S.control,name:Y}),U=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,N=v.useMemo(()=>Y.length?se?.every(U)??!1:!0,[se,Y]),{handleSubmit:le,formState:{isSubmitting:de,isDirty:$,isValid:Q}}=S,we=d??((O,oe)=>JSON.stringify(O).toLowerCase().includes(oe.toLowerCase())),_e=v.useMemo(()=>E.trim()?u?.filter(O=>we(O,E)):u,[u,E,we]),he=v.useMemo(()=>{if(!_e)return _e;const O=G.current,oe=[..._e];return oe.sort((Ce,Re)=>{const R=O.has(I(Ce))?0:1,te=O.has(I(Re))?0:1;if(R!==te)return R-te;const xe=H.get(I(Ce))??0,Ge=H.get(I(Re))??0;return xe-Ge}),oe},[_e,H,I]),{currentItems:ae,totalPages:ue,showingFrom:J,showingTo:Se,totalItems:me,currentPage:ee,itemsPerPage:Ie,perPageOptions:j,goTo:Fe,setItemsPerPage:Ke}=mA(he,{initialPerPage:25,perPageOptions:[10,25,50,100,"Todos"],deps:[E],scrollTop:()=>{}}),Ze=O=>{const oe=F.get(O)??null;M([O]),p?.({items:oe})},Be=O=>T.includes(O),Ve=async O=>{try{await o?.(O),S.reset(S.getValues())}catch(oe){console.error("Error al enviar AddCliente:",oe)}},et=v.useMemo(()=>{const O=new Map;return(n??[]).forEach(oe=>O.set(String(oe.name),oe)),O},[n]),mt=(O,oe)=>{const Ce=et.get(String(O));if(!Ce)return null;const Re={xs:12,...Ce.grid,...oe||{}};return l.jsx(m.Grid,{item:!0,...Re,children:Ce.render?Ce.render(S):l0(Ce,S)},`fld-${String(O)}`)},k=w??(e.haveId?"edit":"new"),P=k!=="onlyCars",B=k==="new"||k==="onlyCars",ce=T?.length>0,ie=k==="onlyCars"?ce:e.haveId?N&&$||ce:N&&ce;return l.jsx(m.Dialog,{open:t,onClose:s,maxWidth:"lg",fullWidth:!0,PaperProps:{sx:{height:{xs:"100dvh",md:B?"90vw":"auto"},maxWidth:{xs:"100vw",md:B?"98vw":"50%"},overflow:"hidden",display:"flex",flexDirection:"column",borderRadius:{xs:0,md:3}}},children:l.jsx(Tw,{...S,children:l.jsxs(m.Box,{component:"form",noValidate:!0,onSubmit:le(Ve),display:"flex",flexDirection:{xs:"column",md:"row"},width:"100%",height:"100%",minHeight:0,overflow:"hidden",position:"relative",children:[P&&l.jsxs(m.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:[l.jsxs(m.Box,{p:{xs:2,md:2},height:"100%",width:"100%",children:[l.jsx(m.Typography,{fontWeight:700,fontSize:20,children:r.title}),l.jsxs(m.Box,{sx:{flex:1,height:"100%",overflowY:"auto",paddingBottom:10},children:[l.jsx(m.Typography,{fontSize:"18px",mt:2.5,fontWeight:500,children:r.subTitle}),l.jsx(m.Box,{mt:2,display:"flex",flexDirection:"column",width:"100%",gap:2,children:Array.isArray(e.formLayout)&&c?e.formLayout.map((O,oe)=>l.jsx(m.Grid,{container:!0,spacing:2,alignItems:"flex-start",wrap:"wrap",width:"100%",children:O.map((Ce,Re)=>{const R=typeof Ce=="string"?{name:Ce}:Ce;return R.hidden?.(S)?null:mt(R.name,R.grid)})},`row-${oe}`)):l.jsx(m.Grid,{container:!0,spacing:2,width:"100%",children:n?.map((O,oe)=>{const Ce=O.grid??{xs:12,md:12};return l.jsx(m.Grid,{item:!0,...Ce,children:O.render?O.render(S):l0(O,S)},`${String(O.name)}-${oe}`)})})})]})]}),l.jsx(m.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:l.jsx(m.Box,{display:"flex",alignItems:"center",children:l.jsx(m.Box,{display:"flex",gap:1.5,width:"100%",justifyContent:c?"flex-end":"center",children:l.jsx(m.Button,{type:"submit",variant:"contained",disabled:de||!ie,sx:{backgroundColor:"#336BE1",color:"#fff",borderColor:"transparent",height:48,fontSize:15,textTransform:"none",fontWeight:"400",paddingX:5,width:c?"160px":"100%"},children:a})})})})]}),B&&l.jsx(m.Box,{flex:1,display:"flex",flexDirection:"column",minWidth:0,sx:{height:"100%"},children:l.jsx(m.Box,{mt:1,sx:{flex:1,display:"flex",flexDirection:"column",height:"100%"},children:l.jsxs(m.Box,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[l.jsxs(m.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:[l.jsx(m.TextField,{value:E,onChange:O=>C(O.target.value),placeholder:"Buscar marca, modelo, vin...",InputProps:{endAdornment:l.jsx(m.InputAdornment,{position:"start",children:l.jsx(z2,{})}),disableUnderline:!0},variant:"standard",sx:{maxWidth:360,width:"100%",backgroundColor:"#EBEEF0",paddingX:"16px",paddingY:"10px"}}),l.jsx(m.Box,{display:"flex",gap:2,alignItems:"center",sx:{marginTop:{sm:0,xs:2}},children:l.jsx(m.Box,{onClick:s,sx:{cursor:"pointer",position:"absolute",top:0,right:10},display:{xs:"none",md:"block"},children:l.jsx(Ur,{sx:{color:"#070C10",fontSize:24}})})}),w=="onlyCars"&&l.jsx(m.Box,{display:"flex",alignItems:"center",justifyContent:"center",children:l.jsx(m.Box,{display:"flex",gap:1.5,width:"100%",children:l.jsxs(m.Button,{type:"submit",variant:"contained",disabled:de||!ie,sx:{backgroundColor:"#336BE1",color:"#fff",borderColor:"transparent",height:48,fontSize:15,textTransform:"none",fontWeight:"400",paddingX:5,width:"100%"},children:[l.jsx(o0,{sx:{color:de||!ie?"gray":"#fff",fontSize:26,paddingRight:.6}}),"Crear Solicitud"]})})})]}),l.jsx(m.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:l.jsx(m.Box,{sx:{minWidth:1150,width:"max(1150px, 100%)",paddingBottom:10},children:l.jsxs(m.List,{disablePadding:!0,sx:{borderColor:"transparent",padding:0},children:[ae?.map((O,oe)=>{const Ce=f?f(O):oe,Re=Be(Ce);return l.jsx(m.Box,{sx:{borderBottom:"1px solid #D3D4D5",padding:0},children:l.jsx(m.ListItem,{disableGutters:!0,sx:{paddingTop:0,padding:0,m:0},children:l.jsx(m.ListItemButton,{onClick:()=>Ze(Ce),disableRipple:!0,sx:{padding:0},children:l.jsx(m.ListItemText,{disableTypography:!0,primary:h?h({item:O,selected:Re,toggle:()=>Ze(Ce),index:oe}):null})})})},`${String(Ce)}`)}),!ae?.length&&l.jsx(m.Box,{p:3,children:l.jsxs(m.Typography,{fontSize:14,color:"#5C6372",children:["Sin resultados para “",E,"”."]})})]})})}),l.jsx(m.Box,{sx:{position:"sticky",bottom:0,bgcolor:"#fff"},children:l.jsx(wA,{currentPage:ee,totalPages:ue,onPageChange:Fe,itemsPerPage:Ie,onItemsPerPageChange:Ke,itemsPerPageOptions:j,showingFrom:J,showingTo:Se,totalItems:me})})]})})})]})})})}var ys={},f0;function CA(){if(f0)return ys;f0=1;var e=rt();Object.defineProperty(ys,"__esModule",{value:!0}),ys.default=void 0;var t=e(ht()),r=lt();return ys.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"),ys}var EA=CA();const DA=tt(EA),cl=/^[^\s@]+@[^\s@]+\.[^\s@]+$/i,na=/[,\s;]+/g,un=e=>e.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase(),dn=(e,t)=>Array.from(new Set([...e,...t.map(r=>r.trim()).filter(Boolean)])),p0=(e,t)=>t?e.filter(r=>un(r)!==un(t)):e,kA=(e,t)=>e.filter(r=>!t.some(n=>un(n)===un(r)));function Pr(e,t,r){if(r)return typeof r=="function"?r(e,t):e[r]}function AA(e,t){if(t)return!e||/^https?:\/\//i.test(t)?t:e+t}function TA({open:e,onClose:t,value:r,onChange:n,onRequestSend:o,customer:s,itemsSelects:i,renderItem:a,filterFields:c=[],multiSelectAutos:u=!0,imgCorreoSrc:d,baseURLImages:f,itemProps:h,defaultItemImageSrc:y}){const g=v.useRef(null),[p,b]=v.useState("idle"),w=v.useRef(e);v.useEffect(()=>{const R=w.current;e&&!R&&b("entering"),!e&&R&&b("exiting"),w.current=e},[e]),v.useEffect(()=>{if(p==="entering"){const xe=setTimeout(()=>b("idle"),320);return()=>clearTimeout(xe)}if(p==="exiting"){const xe=setTimeout(()=>b("idle"),220);return()=>clearTimeout(xe)}},[p]);const[S,E]=v.useState(""),[C,_]=v.useState(!1),[W,D]=v.useState(!1),[T,M]=v.useState(!1),[I,H]=v.useState(""),[G,F]=v.useState([]),Y=T?G:r.selectedIds,se=()=>{F([...r.selectedIds]),H(""),M(!0)},U=()=>{M(!1),F([])},N=()=>{const R=new Set(et.map((xe,Ge)=>String(Pr(xe,Ge,h.id)))),te=G.filter(xe=>R.has(String(xe)));n({...r,selectedIds:te}),M(!1)},le=(R,te)=>un(R??"")===un(te??"");function de(R,te,xe,Ge,At){const q=te?R.some(De=>le(De,te)):!1,fe=xe.length>0?xe.some(De=>R.some(Me=>le(Me,De))):!1;Ge(q),At(fe)}const $=R=>{const te=typeof R=="function"?R(r.recipients):R;n({...r,recipients:te}),de(te,ae,J,_,D)},Q=R=>n({...r,message:R}),we=R=>n({...r,attachments:[...r.attachments,...R]}),_e=R=>n({...r,attachments:r.attachments.filter(te=>te.name!==R)}),he=R=>{if(T)if(u){const te=new Set(G);te.has(R)?te.delete(R):te.add(R),F(Array.from(te))}else{const te=G.includes(R);F(te?[]:[R])}else if(u){const te=new Set(r.selectedIds);te.has(R)?te.delete(R):te.add(R),n({...r,selectedIds:Array.from(te)})}else{const te=r.selectedIds.includes(R);n({...r,selectedIds:te?[]:[R]})}},ae=v.useMemo(()=>(s?.Correo??"").trim(),[s]),ue=v.useMemo(()=>Array.isArray(s?.Asesores)?s.Asesores.filter(R=>R?.EmailAsesor&&R?.Activo):[],[s]),J=v.useMemo(()=>ue.map(R=>(R.EmailAsesor??"").trim()).filter(Boolean),[ue]),Se=v.useRef(!1);v.useEffect(()=>{if(e&&!Se.current){let R=[];C&&ae&&(R=dn(R,[ae])),W&&J.length&&(R=dn(R,J)),$(te=>dn(te,R)),de(r.recipients,ae,J,_,D),E(""),Se.current=!0}e||(Se.current=!1)},[e,C,W,ae,J]);const me=R=>{const te=ue.find(xe=>un(xe.EmailAsesor??"")===un(R));if(te){if(te.ImgAsesor)return l.jsx(m.Avatar,{src:te.ImgAsesor,alt:te.NombreAsesor});const xe=(te.NombreAsesor||"").trim(),Ge=(te.ApellidosAsesor||"").trim();return l.jsx(m.Avatar,{children:`${xe[0]??""}${Ge[0]??""}`.toUpperCase()})}return l.jsx(m.Avatar,{children:R[0]?.toUpperCase()})},ee=()=>{const R=S.trim();if(!R)return;const xe=R.split(na).filter(Boolean).filter(Ge=>cl.test(Ge));xe.length>0&&$(Ge=>dn(Ge,xe)),E("")},Ie=R=>{_(R),$(te=>R&&ae?dn(te,[ae]):p0(te,ae))},j=R=>{D(R),$(te=>R?dn(te,J):kA(te,J))},Fe=R=>{const te=Array.from(R.target.files||[]);we(te.map(xe=>({name:xe.name,size:xe.size,file:xe}))),R.target.value=""},Ke=Y[0],Ze=v.useMemo(()=>!i||Ke===void 0?void 0:i.find((te,xe)=>String(Pr(te,xe,h.id))===String(Ke)),[i,Ke,h.id]),Be=v.useMemo(()=>{if(!(!Ze||!h.distributorId))return Pr(Ze,0,h.distributorId)},[Ze,h.distributorId]);console.log("lockedDisId",Be);const Ve=v.useMemo(()=>Ze?(h.distributorTitle?Pr(Ze,0,h.distributorTitle):void 0)??(Be!=null?String(Be):void 0):void 0,[Ze,h.distributorTitle,Be]),et=v.useMemo(()=>{const R=i??[];return Be==null||!h.distributorId?R:R.filter((te,xe)=>Pr(te,xe,h.distributorId)==Be)},[i,Be,h.distributorId]),mt=v.useMemo(()=>{if(!I.trim())return et;const R=I.toLowerCase();return et.filter(te=>(c??[]).some(xe=>String(te?.[xe]??"").toLowerCase().includes(R)))},[et,I,c]),k=v.useMemo(()=>{if(!i||!r.selectedIds.length)return[];const R=new Map;return i.forEach((te,xe)=>{R.set(String(Pr(te,xe,h.id)),te)}),r.selectedIds.map(te=>R.get(String(te))).filter(Boolean)},[i,r.selectedIds,h.id]),P=R=>n({...r,selectedIds:r.selectedIds.filter(te=>String(te)!==String(R))}),B=()=>{let R=r.recipients;if(S.trim()){const q=S.split(na).filter(fe=>cl.test(fe));R=dn(R,q),$(R),E("")}const te=C?ae:"",xe=ue.find(q=>q?.Activo&&q?.EmailAsesor)?.EmailAsesor?.trim()??"";o?.({recipients:R,toClient:C,toAdvisor:W,tipoInt:C&&W?2:1,correoCliente:te,correoAsesor:W?xe:"",disIdLocked:Be}),t?.()},ce=v.useMemo(()=>{const te=S.split(na).filter(Boolean).some(xe=>cl.test(xe));return r.recipients.length>0||te},[r.recipients,S]),ie=(r.selectedIds?.length??0)>0,O=r.message.trim().length>0,oe=ce&&ie&&O,Ce=m.useTheme(),Re=m.useMediaQuery(Ce.breakpoints.down("sm"));return l.jsxs(m.Drawer,{anchor:Re?"bottom":"right",open:e,onClose:t,ModalProps:{keepMounted:!0,BackdropProps:{invisible:!Re}},transitionDuration:{enter:320,exit:220},SlideProps:{direction:Re?"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:[l.jsxs(m.Box,{sx:{display:"flex",flexDirection:"column",height:{xs:"100%",sm:"auto"},position:"relative",overflow:"auto"},children:[l.jsxs(m.Box,{sx:{p:2,pb:1,position:"sticky",top:0,zIndex:1,bgcolor:"#fff",borderBottom:"1px solid #E5E7EB"},children:[l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1},children:[l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",gap:2},children:[d?l.jsx("img",{src:d,alt:"Correo",style:{width:24,height:18}}):null,l.jsxs(m.Typography,{fontWeight:700,children:["Mensaje a"," ",s?`${s.Nombre??""} ${s.ApellidoP??""} ${s.ApellidoM??""}`.trim():"—"]})]}),l.jsx(m.IconButton,{onClick:t,size:"small",children:l.jsx(Ur,{})})]}),l.jsx("div",{children:l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"10px 10px",backgroundColor:"#EBEEF0",border:"1px solid #E5E7EB",borderRadius:8,flexWrap:"wrap"},children:[l.jsx("label",{style:{fontSize:14,fontWeight:600,marginRight:4},children:"Para:"}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap",flex:1},children:[r.recipients.map(R=>l.jsx(m.Chip,{avatar:me(R),label:R,onDelete:()=>$(te=>p0(te,R)),size:"small",variant:"outlined",sx:{borderRadius:999,height:28}},R)),l.jsx("input",{type:"text",value:S,onChange:R=>E(R.target.value),onKeyDown:R=>{const te=R.key;te==="Enter"||te===","||te===";"||te===" "||te==="Tab"?(R.preventDefault(),ee()):te==="Backspace"&&!S&&r.recipients.length&&$(Ge=>Ge.slice(0,-1))},onBlur:ee,onPaste:R=>{const xe=R.clipboardData.getData("text").split(na).filter(Boolean);xe.length>1&&(R.preventDefault(),$(Ge=>dn(Ge,xe)),E(""))},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"}})]})]})}),l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",gap:2,mb:1.5},children:[l.jsx(m.FormControlLabel,{control:l.jsx(m.Checkbox,{checked:C,onChange:R=>Ie(R.target.checked),size:"small"}),label:"Cliente"}),ue.length!==0&&l.jsx(m.FormControlLabel,{control:l.jsx(m.Checkbox,{checked:W,onChange:R=>j(R.target.checked),size:"small"}),label:`Asesor${ue.length>1?"es":""}`})]})]}),l.jsx(m.Divider,{}),l.jsxs(m.Box,{p:2,children:[l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",gap:1},onClick:se,children:[l.jsx(m.Typography,{fontSize:12,fontWeight:600,sx:{textDecorationLine:"underline",cursor:"pointer"},children:"Selecciona el auto de seguimiento"}),Ve!=null&&l.jsx(m.Chip,{size:"small",label:`Distribuidora: ${Ve}`})]}),k.length>0?l.jsx(m.Box,{sx:{mt:1.5,display:"flex",gap:1,flexWrap:"wrap"},children:k.map((R,te)=>{const xe=Pr(R,te,h.id),Ge=Pr(R,te,h.title)??"",At=Pr(R,te,h.image),q=AA(f,At);return l.jsx(m.Chip,{onDelete:()=>P(xe),label:l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(m.Box,{sx:{width:28,height:20,borderRadius:.8,bgcolor:"#e5e6e8",overflow:"hidden",flex:"0 0 auto"},children:q?l.jsx("img",{src:q,alt:Ge,style:{width:"100%",height:"100%",objectFit:"cover"}}):l.jsx("img",{src:y,alt:Ge,style:{width:"100%",height:"100%",objectFit:"cover"}})}),l.jsx("span",{style:{fontSize:12},children:l.jsx("b",{children:Ge})})]}),sx:{pl:.5,pr:.3,py:.2,borderRadius:2,".MuiChip-deleteIcon":{fontSize:18}},variant:"outlined"},String(xe))})}):l.jsx(m.Typography,{fontSize:13,color:"#5C6372",sx:{mt:.5},children:"Aún no has seleccionado autos."})]}),l.jsx(m.Divider,{}),l.jsxs(m.Box,{sx:{p:2},children:[l.jsx(m.TextField,{placeholder:"Escribe aquí tu mensaje...",value:r.message,onChange:R=>Q(R.target.value),multiline:!0,minRows:6,fullWidth:!0,sx:{mb:1.5}}),r.attachments.length>0&&l.jsx(m.List,{dense:!0,sx:{display:"flex",flexDirection:"column",gap:2,border:"none"},children:r.attachments.map(R=>l.jsxs(m.ListItem,{sx:{px:0,background:"#EAEBF2",borderRadius:2,paddingX:1},children:[l.jsx(m.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"}}),l.jsx(m.Tooltip,{title:"Quitar",children:l.jsx(m.IconButton,{edge:"end",onClick:()=>_e(R.name),size:"small",children:l.jsx(Ur,{fontSize:"small"})})})]},R.name))})]}),l.jsxs(m.Box,{sx:{position:{xs:"sticky",sm:"sticky"},bottom:0,bgcolor:"#fff",borderTop:"1px solid #E5E7EB",p:2,display:"flex",alignItems:"center",gap:2},children:[l.jsx("input",{ref:g,hidden:!0,type:"file",multiple:!0,accept:".jpg,.jpeg,.png,.mp4,.pdf,.xlsx,.csv,.docx,.pptx,.txt",onChange:Fe}),l.jsx(m.Button,{startIcon:l.jsx(DA,{}),variant:"text",onClick:()=>g.current?.click(),sx:{color:"#5C6372"},children:"Adjuntar archivo"}),l.jsx(m.Box,{sx:{flex:1}}),l.jsx(m.Button,{variant:"contained",onClick:B,disabled:!oe,sx:{maxWidth:146,width:"100%",height:53,backgroundColor:"#336BE1"},children:"Enviar"})]})]}),l.jsxs(m.Dialog,{fullWidth:!0,maxWidth:"sm",fullScreen:Re,open:T,onClose:U,children:[l.jsxs(m.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:1},children:["Selecciona tu auto de seguimiento",l.jsx(m.IconButton,{onClick:U,size:"small",children:l.jsx(Ur,{})})]}),l.jsxs(m.DialogContent,{children:[l.jsxs(m.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(m.TextField,{placeholder:"Buscar...",fullWidth:!0,size:"small",value:I,onChange:R=>H(R.target.value),sx:{mb:2}}),Ve!=null&&l.jsx(m.Chip,{size:"small",label:`Distribuidora: ${Ve}`})]}),l.jsxs(m.Typography,{variant:"caption",fontWeight:600,children:["RESULTADOS (",mt.length,")"]}),l.jsxs(m.List,{sx:{p:0},children:[mt.map((R,te)=>{const xe=Pr(R,te,h.id),Ge=Y.includes(String(xe))||Y.includes(xe),At=Be==null||Pr(R,te,h.distributorId)==Be;return l.jsx(m.ListItem,{disableGutters:!0,sx:{p:0,opacity:At?1:.5},children:l.jsx(m.Box,{onClick:()=>At&&he(xe),sx:{cursor:At?"pointer":"not-allowed",p:.5,backgroundColor:Ge?"#e5f0ff":"transparent",width:"100%",borderBottom:"solid 1px #D3D4D5"},children:a?a(R,te):l.jsx("pre",{style:{margin:0},children:JSON.stringify(R,null,2)})})},String(xe))}),mt.length===0&&l.jsx(m.Box,{p:2,children:l.jsx(m.Typography,{children:"Tu búsqueda no generó resultados"})})]})]}),l.jsxs(m.DialogActions,{sx:{px:3,pb:2},children:[l.jsx(m.Button,{variant:"text",onClick:U,sx:{color:"#5C6372"},children:"Cancelar"}),l.jsx(m.Button,{variant:"contained",onClick:N,sx:{backgroundColor:"#336BE1"},children:"Guardar selección"})]})]})]})}jt.AddCliente=SA,jt.ApiProvider=$x,jt.AuthProvider=f1,jt.Clientes=cA,jt.CustomSnackbar=tl,jt.EventsProvider=f3,jt.ModalCorreo=TA,jt.MyCalendar=x3,jt.useAuth=lc,jt.useAuthRepository=Mi,jt.useEventRepository=Tc,Object.defineProperty(jt,Symbol.toStringTag,{value:"Module"})}));
|