componentes-exagono 0.1.36 → 0.1.37
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 +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -16964,7 +16964,7 @@ const vf = /^([01][0-9]|2[0-3]):[0-5][0-9]$/, yf = (e, r) => {
|
|
|
16964
16964
|
u(!1), f(null);
|
|
16965
16965
|
}, B = async (X, q) => {
|
|
16966
16966
|
let ie, ce;
|
|
16967
|
-
X.todoElDia ? (ie = /* @__PURE__ */ new Date(`${X.fechaInicio}T${X.horaInicio}`), ce = /* @__PURE__ */ new Date(`${X.fechaInicio}T${X.horaFin}`)) : (ie = /* @__PURE__ */ new Date(`${X.fechaInicio}T${X.horaInicio}`), ce = X.fechaFin && X.
|
|
16967
|
+
X.todoElDia ? (ie = /* @__PURE__ */ new Date(`${X.fechaInicio}T${X.horaInicio}`), ce = /* @__PURE__ */ new Date(`${X.fechaInicio}T${X.horaFin}`)) : (ie = /* @__PURE__ */ new Date(`${X.fechaInicio}T${X.horaInicio}`), ce = X.fechaFin && X.horaFin ? /* @__PURE__ */ new Date(`${X.fechaFin}T${X.horaFin}`) : /* @__PURE__ */ new Date(`${X.fechaInicio}T${X.horaFin}`));
|
|
16968
16968
|
const z = qe(ie, "yyyy-MM-dd HH:mm:ss.SSS"), Y = qe(ce, "yyyy-MM-dd HH:mm:ss.SSS");
|
|
16969
16969
|
if (q) {
|
|
16970
16970
|
const O = {
|
package/dist/index.umd.js
CHANGED
|
@@ -185,7 +185,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${r}Chann
|
|
|
185
185
|
} else {
|
|
186
186
|
newResult[${_}] = ${E}.value;
|
|
187
187
|
}
|
|
188
|
-
`)}m.write("payload.value = newResult;"),m.write("return payload;");const C=m.compile();return(k,E)=>C(f,k,E)};let i;const a=Ji,s=!Pf.jitless,l=s&&F2.value,u=r.catchall;let d;e._zod.parse=(f,m)=>{d??(d=n.value);const g=f.value;return a(g)?s&&l&&m?.async===!1&&m.jitless!==!0?(i||(i=o(r.shape)),f=i(f,m),u?Kf([],g,f,m,d,e):f):t(f,m):(f.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),f)}});function Gf(e,r,t,n){for(const i of e)if(i.issues.length===0)return r.value=i.value,r;const o=e.filter(i=>!An(i));return o.length===1?(r.value=o[0].value,o[0]):(r.issues.push({code:"invalid_union",input:r.value,inst:t,errors:e.map(i=>i.issues.map(a=>tn(a,n,en())))}),r)}const A_=Y("$ZodUnion",(e,r)=>{et.init(e,r),Ye(e._zod,"optin",()=>r.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Ye(e._zod,"optout",()=>r.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Ye(e._zod,"values",()=>{if(r.options.every(o=>o._zod.values))return new Set(r.options.flatMap(o=>Array.from(o._zod.values)))}),Ye(e._zod,"pattern",()=>{if(r.options.every(o=>o._zod.pattern)){const o=r.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>qs(i.source)).join("|")})$`)}});const t=r.options.length===1,n=r.options[0]._zod.run;e._zod.parse=(o,i)=>{if(t)return n(o,i);let a=!1;const s=[];for(const c of r.options){const l=c._zod.run({value:o.value,issues:[]},i);if(l instanceof Promise)s.push(l),a=!0;else{if(l.issues.length===0)return l;s.push(l)}}return a?Promise.all(s).then(c=>Gf(c,o,e,i)):Gf(s,o,e,i)}}),I_=Y("$ZodIntersection",(e,r)=>{et.init(e,r),e._zod.parse=(t,n)=>{const o=t.value,i=r.left._zod.run({value:o,issues:[]},n),a=r.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([c,l])=>Qf(t,c,l)):Qf(t,i,a)}});function Xs(e,r){if(e===r)return{valid:!0,data:e};if(e instanceof Date&&r instanceof Date&&+e==+r)return{valid:!0,data:e};if(So(e)&&So(r)){const t=Object.keys(r),n=Object.keys(e).filter(i=>t.indexOf(i)!==-1),o={...e,...r};for(const i of n){const a=Xs(e[i],r[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};o[i]=a.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return{valid:!1,mergeErrorPath:[]};const t=[];for(let n=0;n<e.length;n++){const o=e[n],i=r[n],a=Xs(o,i);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};t.push(a.data)}return{valid:!0,data:t}}return{valid:!1,mergeErrorPath:[]}}function Qf(e,r,t){if(r.issues.length&&e.issues.push(...r.issues),t.issues.length&&e.issues.push(...t.issues),An(e))return e;const n=Xs(r.value,t.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}const R_=Y("$ZodEnum",(e,r)=>{et.init(e,r);const t=z2(r.entries),n=new Set(t);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.filter(o=>Y2.has(typeof o)).map(o=>typeof o=="string"?Pn(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const a=o.value;return n.has(a)||o.issues.push({code:"invalid_value",values:t,input:a,inst:e}),o}}),N_=Y("$ZodLiteral",(e,r)=>{if(et.init(e,r),r.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(r.values),e._zod.pattern=new RegExp(`^(${r.values.map(t=>typeof t=="string"?Pn(t):t?Pn(t.toString()):String(t)).join("|")})$`),e._zod.parse=(t,n)=>{const o=t.value;return e._zod.values.has(o)||t.issues.push({code:"invalid_value",values:r.values,input:o,inst:e}),t}}),$_=Y("$ZodTransform",(e,r)=>{et.init(e,r),e._zod.parse=(t,n)=>{if(n.direction==="backward")throw new Mf(e.constructor.name);const o=r.transform(t.value,t);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(a=>(t.value=a,t));if(o instanceof Promise)throw new On;return t.value=o,t}});function Xf(e,r){return e.issues.length&&r===void 0?{issues:[],value:void 0}:e}const j_=Y("$ZodOptional",(e,r)=>{et.init(e,r),e._zod.optin="optional",e._zod.optout="optional",Ye(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),Ye(e._zod,"pattern",()=>{const t=r.innerType._zod.pattern;return t?new RegExp(`^(${qs(t.source)})?$`):void 0}),e._zod.parse=(t,n)=>{if(r.innerType._zod.optin==="optional"){const o=r.innerType._zod.run(t,n);return o instanceof Promise?o.then(i=>Xf(i,t.value)):Xf(o,t.value)}return t.value===void 0?t:r.innerType._zod.run(t,n)}}),L_=Y("$ZodNullable",(e,r)=>{et.init(e,r),Ye(e._zod,"optin",()=>r.innerType._zod.optin),Ye(e._zod,"optout",()=>r.innerType._zod.optout),Ye(e._zod,"pattern",()=>{const t=r.innerType._zod.pattern;return t?new RegExp(`^(${qs(t.source)}|null)$`):void 0}),Ye(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),e._zod.parse=(t,n)=>t.value===null?t:r.innerType._zod.run(t,n)}),z_=Y("$ZodDefault",(e,r)=>{et.init(e,r),e._zod.optin="optional",Ye(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(t,n)=>{if(n.direction==="backward")return r.innerType._zod.run(t,n);if(t.value===void 0)return t.value=r.defaultValue,t;const o=r.innerType._zod.run(t,n);return o instanceof Promise?o.then(i=>Jf(i,r)):Jf(o,r)}});function Jf(e,r){return e.value===void 0&&(e.value=r.defaultValue),e}const B_=Y("$ZodPrefault",(e,r)=>{et.init(e,r),e._zod.optin="optional",Ye(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(t,n)=>(n.direction==="backward"||t.value===void 0&&(t.value=r.defaultValue),r.innerType._zod.run(t,n))}),V_=Y("$ZodNonOptional",(e,r)=>{et.init(e,r),Ye(e._zod,"values",()=>{const t=r.innerType._zod.values;return t?new Set([...t].filter(n=>n!==void 0)):void 0}),e._zod.parse=(t,n)=>{const o=r.innerType._zod.run(t,n);return o instanceof Promise?o.then(i=>ep(i,e)):ep(o,e)}});function ep(e,r){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:r}),e}const F_=Y("$ZodCatch",(e,r)=>{et.init(e,r),Ye(e._zod,"optin",()=>r.innerType._zod.optin),Ye(e._zod,"optout",()=>r.innerType._zod.optout),Ye(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(t,n)=>{if(n.direction==="backward")return r.innerType._zod.run(t,n);const o=r.innerType._zod.run(t,n);return o instanceof Promise?o.then(i=>(t.value=i.value,i.issues.length&&(t.value=r.catchValue({...t,error:{issues:i.issues.map(a=>tn(a,n,en()))},input:t.value}),t.issues=[]),t)):(t.value=o.value,o.issues.length&&(t.value=r.catchValue({...t,error:{issues:o.issues.map(i=>tn(i,n,en()))},input:t.value}),t.issues=[]),t)}}),Y_=Y("$ZodPipe",(e,r)=>{et.init(e,r),Ye(e._zod,"values",()=>r.in._zod.values),Ye(e._zod,"optin",()=>r.in._zod.optin),Ye(e._zod,"optout",()=>r.out._zod.optout),Ye(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(t,n)=>{if(n.direction==="backward"){const i=r.out._zod.run(t,n);return i instanceof Promise?i.then(a=>ca(a,r.in,n)):ca(i,r.in,n)}const o=r.in._zod.run(t,n);return o instanceof Promise?o.then(i=>ca(i,r.out,n)):ca(o,r.out,n)}});function ca(e,r,t){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:e.value,issues:e.issues},t)}const U_=Y("$ZodReadonly",(e,r)=>{et.init(e,r),Ye(e._zod,"propValues",()=>r.innerType._zod.propValues),Ye(e._zod,"values",()=>r.innerType._zod.values),Ye(e._zod,"optin",()=>r.innerType._zod.optin),Ye(e._zod,"optout",()=>r.innerType._zod.optout),e._zod.parse=(t,n)=>{if(n.direction==="backward")return r.innerType._zod.run(t,n);const o=r.innerType._zod.run(t,n);return o instanceof Promise?o.then(tp):tp(o)}});function tp(e){return e.value=Object.freeze(e.value),e}const H_=Y("$ZodCustom",(e,r)=>{Ot.init(e,r),et.init(e,r),e._zod.parse=(t,n)=>t,e._zod.check=t=>{const n=t.value,o=r.fn(n);if(o instanceof Promise)return o.then(i=>rp(i,t,n,e));rp(o,t,n,e)}});function rp(e,r,t,n){if(!e){const o={code:"custom",input:t,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),r.issues.push(Co(o))}}class W_{constructor(){this._map=new Map,this._idmap=new Map}add(r,...t){const n=t[0];if(this._map.set(r,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,r)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(r){const t=this._map.get(r);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(r),this}get(r){const t=r._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const o={...n,...this._map.get(r)};return Object.keys(o).length?o:void 0}return this._map.get(r)}has(r){return this._map.has(r)}}function Z_(){return new W_}const la=Z_();function q_(e,r){return new e({type:"string",...me(r)})}function K_(e,r){return new e({type:"string",format:"email",check:"string_format",abort:!1,...me(r)})}function np(e,r){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...me(r)})}function G_(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...me(r)})}function Q_(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...me(r)})}function X_(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...me(r)})}function J_(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...me(r)})}function ex(e,r){return new e({type:"string",format:"url",check:"string_format",abort:!1,...me(r)})}function tx(e,r){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...me(r)})}function rx(e,r){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...me(r)})}function nx(e,r){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...me(r)})}function ox(e,r){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...me(r)})}function ix(e,r){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...me(r)})}function ax(e,r){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...me(r)})}function sx(e,r){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...me(r)})}function cx(e,r){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...me(r)})}function lx(e,r){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...me(r)})}function ux(e,r){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...me(r)})}function dx(e,r){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...me(r)})}function fx(e,r){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...me(r)})}function px(e,r){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...me(r)})}function hx(e,r){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...me(r)})}function mx(e,r){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...me(r)})}function gx(e,r){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...me(r)})}function vx(e,r){return new e({type:"string",format:"date",check:"string_format",...me(r)})}function yx(e,r){return new e({type:"string",format:"time",check:"string_format",precision:null,...me(r)})}function bx(e,r){return new e({type:"string",format:"duration",check:"string_format",...me(r)})}function wx(e,r){return new e({type:"number",checks:[],...me(r)})}function _x(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...me(r)})}function xx(e,r){return new e({type:"boolean",...me(r)})}function Sx(e){return new e({type:"unknown"})}function Cx(e,r){return new e({type:"never",...me(r)})}function op(e,r){return new Yf({check:"less_than",...me(r),value:e,inclusive:!1})}function Js(e,r){return new Yf({check:"less_than",...me(r),value:e,inclusive:!0})}function ip(e,r){return new Uf({check:"greater_than",...me(r),value:e,inclusive:!1})}function ec(e,r){return new Uf({check:"greater_than",...me(r),value:e,inclusive:!0})}function ap(e,r){return new Bw({check:"multiple_of",...me(r),value:e})}function sp(e,r){return new Fw({check:"max_length",...me(r),maximum:e})}function ua(e,r){return new Yw({check:"min_length",...me(r),minimum:e})}function cp(e,r){return new Uw({check:"length_equals",...me(r),length:e})}function Ex(e,r){return new Hw({check:"string_format",format:"regex",...me(r),pattern:e})}function kx(e){return new Ww({check:"string_format",format:"lowercase",...me(e)})}function Dx(e){return new Zw({check:"string_format",format:"uppercase",...me(e)})}function Tx(e,r){return new qw({check:"string_format",format:"includes",...me(r),includes:e})}function Ox(e,r){return new Kw({check:"string_format",format:"starts_with",...me(r),prefix:e})}function Mx(e,r){return new Gw({check:"string_format",format:"ends_with",...me(r),suffix:e})}function Eo(e){return new Qw({check:"overwrite",tx:e})}function Px(e){return Eo(r=>r.normalize(e))}function Ax(){return Eo(e=>e.trim())}function Ix(){return Eo(e=>e.toLowerCase())}function Rx(){return Eo(e=>e.toUpperCase())}function Nx(e,r,t){return new e({type:"array",element:r,...me(t)})}function $x(e,r,t){return new e({type:"custom",check:"custom",fn:r,...me(t)})}function jx(e){const r=Lx(t=>(t.addIssue=n=>{if(typeof n=="string")t.issues.push(Co(n,t.value,r._zod.def));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=t.value),o.inst??(o.inst=r),o.continue??(o.continue=!r._zod.def.abort),t.issues.push(Co(o))}},e(t.value,t)));return r}function Lx(e,r){const t=new Ot({check:"custom",...me(r)});return t._zod.check=e,t}function lp(e,r){try{var t=e()}catch(n){return r(n)}return t&&t.then?t.then(void 0,r):t}function zx(e,r){for(var t={};e.length;){var n=e[0],o=n.code,i=n.message,a=n.path.join(".");if(!t[a])if("unionErrors"in n){var s=n.unionErrors[0].errors[0];t[a]={message:s.message,type:s.code}}else t[a]={message:i,type:o};if("unionErrors"in n&&n.unionErrors.forEach(function(u){return u.errors.forEach(function(d){return e.push(d)})}),r){var c=t[a].types,l=c&&c[n.code];t[a]=Bs(a,r,t,o,l?[].concat(l,n.message):n.message)}e.shift()}return t}function Bx(e,r){for(var t={};e.length;){var n=e[0],o=n.code,i=n.message,a=n.path.join(".");if(!t[a])if(n.code==="invalid_union"&&n.errors.length>0){var s=n.errors[0][0];t[a]={message:s.message,type:s.code}}else t[a]={message:i,type:o};if(n.code==="invalid_union"&&n.errors.forEach(function(u){return u.forEach(function(d){return e.push(d)})}),r){var c=t[a].types,l=c&&c[n.code];t[a]=Bs(a,r,t,o,l?[].concat(l,n.message):n.message)}e.shift()}return t}function Vx(e,r,t){if(t===void 0&&(t={}),(function(n){return"_def"in n&&typeof n._def=="object"&&"typeName"in n._def})(e))return function(n,o,i){try{return Promise.resolve(lp(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](n,r)).then(function(a){return i.shouldUseNativeValidation&&Us({},i),{errors:{},values:t.raw?Object.assign({},n):a}})},function(a){if((function(s){return Array.isArray(s?.issues)})(a))return{values:{},errors:Tf(zx(a.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}};if((function(n){return"_zod"in n&&typeof n._zod=="object"})(e))return function(n,o,i){try{return Promise.resolve(lp(function(){return Promise.resolve((t.mode==="sync"?tw:rw)(e,n,r)).then(function(a){return i.shouldUseNativeValidation&&Us({},i),{errors:{},values:t.raw?Object.assign({},n):a}})},function(a){if((function(s){return s instanceof Gs})(a))return{values:{},errors:Tf(Bx(a.issues,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}};throw new Error("Invalid input: not a Zod schema")}const Fx=Y("ZodISODateTime",(e,r)=>{d_.init(e,r),Ge.init(e,r)});function Yx(e){return gx(Fx,e)}const Ux=Y("ZodISODate",(e,r)=>{f_.init(e,r),Ge.init(e,r)});function Hx(e){return vx(Ux,e)}const Wx=Y("ZodISOTime",(e,r)=>{p_.init(e,r),Ge.init(e,r)});function Zx(e){return yx(Wx,e)}const qx=Y("ZodISODuration",(e,r)=>{h_.init(e,r),Ge.init(e,r)});function Kx(e){return bx(qx,e)}const Ut=Y("ZodError",(e,r)=>{Gs.init(e,r),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>ew(e,t)},flatten:{value:t=>J2(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Hs,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Hs,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Gx=ra(Ut),Qx=na(Ut),Xx=oa(Ut),Jx=ia(Ut),eS=iw(Ut),tS=aw(Ut),rS=sw(Ut),nS=cw(Ut),oS=lw(Ut),iS=uw(Ut),aS=dw(Ut),sS=fw(Ut),it=Y("ZodType",(e,r)=>(et.init(e,r),e.def=r,e.type=r.type,Object.defineProperty(e,"_def",{value:r}),e.check=(...t)=>e.clone({...r,checks:[...r.checks??[],...t.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),e.clone=(t,n)=>jr(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>Gx(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Xx(e,t,n),e.parseAsync=async(t,n)=>Qx(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Jx(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>eS(e,t,n),e.decode=(t,n)=>tS(e,t,n),e.encodeAsync=async(t,n)=>rS(e,t,n),e.decodeAsync=async(t,n)=>nS(e,t,n),e.safeEncode=(t,n)=>oS(e,t,n),e.safeDecode=(t,n)=>iS(e,t,n),e.safeEncodeAsync=async(t,n)=>aS(e,t,n),e.safeDecodeAsync=async(t,n)=>sS(e,t,n),e.refine=(t,n)=>e.check(rC(t,n)),e.superRefine=t=>e.check(nC(t)),e.overwrite=t=>e.check(Eo(t)),e.optional=()=>vp(e),e.nullable=()=>yp(e),e.nullish=()=>vp(yp(e)),e.nonoptional=t=>KS(e,t),e.array=()=>AS(e),e.or=t=>$S([e,t]),e.and=t=>LS(e,t),e.transform=t=>wp(e,YS(t)),e.default=t=>WS(e,t),e.prefault=t=>qS(e,t),e.catch=t=>QS(e,t),e.pipe=t=>wp(e,t),e.readonly=()=>eC(e),e.describe=t=>{const n=e.clone();return la.add(n,{description:t}),n},Object.defineProperty(e,"description",{get(){return la.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return la.get(e);const n=e.clone();return la.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),up=Y("_ZodString",(e,r)=>{Qs.init(e,r),it.init(e,r);const t=e._zod.bag;e.format=t.format??null,e.minLength=t.minimum??null,e.maxLength=t.maximum??null,e.regex=(...n)=>e.check(Ex(...n)),e.includes=(...n)=>e.check(Tx(...n)),e.startsWith=(...n)=>e.check(Ox(...n)),e.endsWith=(...n)=>e.check(Mx(...n)),e.min=(...n)=>e.check(ua(...n)),e.max=(...n)=>e.check(sp(...n)),e.length=(...n)=>e.check(cp(...n)),e.nonempty=(...n)=>e.check(ua(1,...n)),e.lowercase=n=>e.check(kx(n)),e.uppercase=n=>e.check(Dx(n)),e.trim=()=>e.check(Ax()),e.normalize=(...n)=>e.check(Px(...n)),e.toLowerCase=()=>e.check(Ix()),e.toUpperCase=()=>e.check(Rx())}),cS=Y("ZodString",(e,r)=>{Qs.init(e,r),up.init(e,r),e.email=t=>e.check(K_(lS,t)),e.url=t=>e.check(ex(uS,t)),e.jwt=t=>e.check(mx(ES,t)),e.emoji=t=>e.check(tx(dS,t)),e.guid=t=>e.check(np(dp,t)),e.uuid=t=>e.check(G_(da,t)),e.uuidv4=t=>e.check(Q_(da,t)),e.uuidv6=t=>e.check(X_(da,t)),e.uuidv7=t=>e.check(J_(da,t)),e.nanoid=t=>e.check(rx(fS,t)),e.guid=t=>e.check(np(dp,t)),e.cuid=t=>e.check(nx(pS,t)),e.cuid2=t=>e.check(ox(hS,t)),e.ulid=t=>e.check(ix(mS,t)),e.base64=t=>e.check(fx(xS,t)),e.base64url=t=>e.check(px(SS,t)),e.xid=t=>e.check(ax(gS,t)),e.ksuid=t=>e.check(sx(vS,t)),e.ipv4=t=>e.check(cx(yS,t)),e.ipv6=t=>e.check(lx(bS,t)),e.cidrv4=t=>e.check(ux(wS,t)),e.cidrv6=t=>e.check(dx(_S,t)),e.e164=t=>e.check(hx(CS,t)),e.datetime=t=>e.check(Yx(t)),e.date=t=>e.check(Hx(t)),e.time=t=>e.check(Zx(t)),e.duration=t=>e.check(Kx(t))});function rr(e){return q_(cS,e)}const Ge=Y("ZodStringFormat",(e,r)=>{Ze.init(e,r),up.init(e,r)}),lS=Y("ZodEmail",(e,r)=>{r_.init(e,r),Ge.init(e,r)}),dp=Y("ZodGUID",(e,r)=>{e_.init(e,r),Ge.init(e,r)}),da=Y("ZodUUID",(e,r)=>{t_.init(e,r),Ge.init(e,r)}),uS=Y("ZodURL",(e,r)=>{n_.init(e,r),Ge.init(e,r)}),dS=Y("ZodEmoji",(e,r)=>{o_.init(e,r),Ge.init(e,r)}),fS=Y("ZodNanoID",(e,r)=>{i_.init(e,r),Ge.init(e,r)}),pS=Y("ZodCUID",(e,r)=>{a_.init(e,r),Ge.init(e,r)}),hS=Y("ZodCUID2",(e,r)=>{s_.init(e,r),Ge.init(e,r)}),mS=Y("ZodULID",(e,r)=>{c_.init(e,r),Ge.init(e,r)}),gS=Y("ZodXID",(e,r)=>{l_.init(e,r),Ge.init(e,r)}),vS=Y("ZodKSUID",(e,r)=>{u_.init(e,r),Ge.init(e,r)}),yS=Y("ZodIPv4",(e,r)=>{m_.init(e,r),Ge.init(e,r)}),bS=Y("ZodIPv6",(e,r)=>{g_.init(e,r),Ge.init(e,r)}),wS=Y("ZodCIDRv4",(e,r)=>{v_.init(e,r),Ge.init(e,r)}),_S=Y("ZodCIDRv6",(e,r)=>{y_.init(e,r),Ge.init(e,r)}),xS=Y("ZodBase64",(e,r)=>{b_.init(e,r),Ge.init(e,r)}),SS=Y("ZodBase64URL",(e,r)=>{__.init(e,r),Ge.init(e,r)}),CS=Y("ZodE164",(e,r)=>{x_.init(e,r),Ge.init(e,r)}),ES=Y("ZodJWT",(e,r)=>{C_.init(e,r),Ge.init(e,r)}),fp=Y("ZodNumber",(e,r)=>{Wf.init(e,r),it.init(e,r),e.gt=(n,o)=>e.check(ip(n,o)),e.gte=(n,o)=>e.check(ec(n,o)),e.min=(n,o)=>e.check(ec(n,o)),e.lt=(n,o)=>e.check(op(n,o)),e.lte=(n,o)=>e.check(Js(n,o)),e.max=(n,o)=>e.check(Js(n,o)),e.int=n=>e.check(hp(n)),e.safe=n=>e.check(hp(n)),e.positive=n=>e.check(ip(0,n)),e.nonnegative=n=>e.check(ec(0,n)),e.negative=n=>e.check(op(0,n)),e.nonpositive=n=>e.check(Js(0,n)),e.multipleOf=(n,o)=>e.check(ap(n,o)),e.step=(n,o)=>e.check(ap(n,o)),e.finite=()=>e;const t=e._zod.bag;e.minValue=Math.max(t.minimum??Number.NEGATIVE_INFINITY,t.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(t.maximum??Number.POSITIVE_INFINITY,t.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(t.format??"").includes("int")||Number.isSafeInteger(t.multipleOf??.5),e.isFinite=!0,e.format=t.format??null});function pp(e){return wx(fp,e)}const kS=Y("ZodNumberFormat",(e,r)=>{E_.init(e,r),fp.init(e,r)});function hp(e){return _x(kS,e)}const DS=Y("ZodBoolean",(e,r)=>{k_.init(e,r),it.init(e,r)});function tc(e){return xx(DS,e)}const TS=Y("ZodUnknown",(e,r)=>{D_.init(e,r),it.init(e,r)});function mp(){return Sx(TS)}const OS=Y("ZodNever",(e,r)=>{T_.init(e,r),it.init(e,r)});function MS(e){return Cx(OS,e)}const PS=Y("ZodArray",(e,r)=>{O_.init(e,r),it.init(e,r),e.element=r.element,e.min=(t,n)=>e.check(ua(t,n)),e.nonempty=t=>e.check(ua(1,t)),e.max=(t,n)=>e.check(sp(t,n)),e.length=(t,n)=>e.check(cp(t,n)),e.unwrap=()=>e.element});function AS(e,r){return Nx(PS,e,r)}const IS=Y("ZodObject",(e,r)=>{P_.init(e,r),it.init(e,r),Ye(e,"shape",()=>r.shape),e.keyof=()=>zS(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:mp()}),e.loose=()=>e.clone({...e._zod.def,catchall:mp()}),e.strict=()=>e.clone({...e._zod.def,catchall:MS()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>q2(e,t),e.safeExtend=t=>K2(e,t),e.merge=t=>G2(e,t),e.pick=t=>W2(e,t),e.omit=t=>Z2(e,t),e.partial=(...t)=>Q2(gp,e,t[0]),e.required=(...t)=>X2(bp,e,t[0])});function RS(e,r){const t={type:"object",get shape(){return $r(this,"shape",e?V2(e):{}),this.shape},...me(r)};return new IS(t)}const NS=Y("ZodUnion",(e,r)=>{A_.init(e,r),it.init(e,r),e.options=r.options});function $S(e,r){return new NS({type:"union",options:e,...me(r)})}const jS=Y("ZodIntersection",(e,r)=>{I_.init(e,r),it.init(e,r)});function LS(e,r){return new jS({type:"intersection",left:e,right:r})}const rc=Y("ZodEnum",(e,r)=>{R_.init(e,r),it.init(e,r),e.enum=r.entries,e.options=Object.values(r.entries);const t=new Set(Object.keys(r.entries));e.extract=(n,o)=>{const i={};for(const a of n)if(t.has(a))i[a]=r.entries[a];else throw new Error(`Key ${a} not found in enum`);return new rc({...r,checks:[],...me(o),entries:i})},e.exclude=(n,o)=>{const i={...r.entries};for(const a of n)if(t.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new rc({...r,checks:[],...me(o),entries:i})}});function zS(e,r){const t=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new rc({type:"enum",entries:t,...me(r)})}const BS=Y("ZodLiteral",(e,r)=>{N_.init(e,r),it.init(e,r),e.values=new Set(r.values),Object.defineProperty(e,"value",{get(){if(r.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function VS(e,r){return new BS({type:"literal",values:Array.isArray(e)?e:[e],...me(r)})}const FS=Y("ZodTransform",(e,r)=>{$_.init(e,r),it.init(e,r),e._zod.parse=(t,n)=>{if(n.direction==="backward")throw new Mf(e.constructor.name);t.addIssue=i=>{if(typeof i=="string")t.issues.push(Co(i,t.value,r));else{const a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=t.value),a.inst??(a.inst=e),t.issues.push(Co(a))}};const o=r.transform(t.value,t);return o instanceof Promise?o.then(i=>(t.value=i,t)):(t.value=o,t)}});function YS(e){return new FS({type:"transform",transform:e})}const gp=Y("ZodOptional",(e,r)=>{j_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType});function vp(e){return new gp({type:"optional",innerType:e})}const US=Y("ZodNullable",(e,r)=>{L_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType});function yp(e){return new US({type:"nullable",innerType:e})}const HS=Y("ZodDefault",(e,r)=>{z_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function WS(e,r){return new HS({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():Nf(r)}})}const ZS=Y("ZodPrefault",(e,r)=>{B_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType});function qS(e,r){return new ZS({type:"prefault",innerType:e,get defaultValue(){return typeof r=="function"?r():Nf(r)}})}const bp=Y("ZodNonOptional",(e,r)=>{V_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType});function KS(e,r){return new bp({type:"nonoptional",innerType:e,...me(r)})}const GS=Y("ZodCatch",(e,r)=>{F_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function QS(e,r){return new GS({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}const XS=Y("ZodPipe",(e,r)=>{Y_.init(e,r),it.init(e,r),e.in=r.in,e.out=r.out});function wp(e,r){return new XS({type:"pipe",in:e,out:r})}const JS=Y("ZodReadonly",(e,r)=>{U_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType});function eC(e){return new JS({type:"readonly",innerType:e})}const tC=Y("ZodCustom",(e,r)=>{H_.init(e,r),it.init(e,r)});function rC(e,r={}){return $x(tC,e,r)}function nC(e){return jx(e)}const _p=/^([01][0-9]|2[0-3]):[0-5][0-9]$/,xp=(e,r)=>{if(!e||!r)return null;const t=e.split("-");if(t.length!==3)return null;const n=parseInt(t[0],10),o=parseInt(t[1],10)-1,i=parseInt(t[2],10),a=r.split(":");if(a.length!==2)return null;const s=parseInt(a[0],10),c=parseInt(a[1],10),l=new Date(n,o,i,s,c);return isNaN(l.getTime())||!w.isValid(l)?null:l},oC=RS({titulo:rr().min(1,"El campo Título es requerido."),fechaInicio:rr().min(1,"El campo fecha inicio es requerido."),horaInicio:rr().min(1,"La hora de inicio es requerida.").regex(_p,{message:"Formato inválido"}),horaFin:rr().min(1,"La hora fin es requerida.").regex(_p,{message:"Formato inválido"}),todoElDia:tc(),fechaFin:rr().optional(),showEndDate:tc().optional(),horaInicio2:rr().optional(),TodoElDia2:tc().optional(),client:rr().optional().nullable(),repetir:rr().optional(),link:rr().url("Debe ser una URL válida ejemplo https://www.google.com.").or(VS("")).optional(),descripcion:rr().optional(),color:rr().optional(),solID:pp().optional().nullable(),disID:pp().optional().nullable()}).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 r=xp(e.fechaInicio,e.horaInicio),t=xp(e.fechaFin,e.horaFin);return!r||!t||!w.isValid(r)||!w.isValid(t)?!0:!(w.isBefore(t,r)&&!w.isSameDay(t,r)||w.isSameDay(r,t)&&w.isBefore(t,r))},{message:"",path:["horaFin"]}),Sp=e=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},j.createElement("path",{fill:"#333",d:"M12 24C5.38 24 0 18.608 0 12S5.38 0 12 0s12 5.38 12 12-5.38 12-12 12"}),j.createElement("path",{fill:"#fff",d:"M16.703 7.275c.52.52.541 1.345.046 1.84l-2.874 2.874 2.874 2.873c.495.496.475 1.32-.046 1.841-.52.52-1.344.54-1.84.045l-2.873-2.873-2.874 2.873c-.496.496-1.32.475-1.84-.045-.521-.521-.541-1.345-.046-1.84l2.874-2.874L7.23 9.116c-.495-.496-.475-1.32.045-1.84.521-.521 1.345-.542 1.841-.046l2.874 2.873 2.873-2.873c.496-.496 1.32-.476 1.84.045"})),iC="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",aC=e=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},j.createElement("g",{clipPath:"url(#a)"},j.createElement("path",{fill:"#404756",d:"M21.24 5.72a2.98 2.98 0 0 0-2.97-2.96l-5.19-.06c-1.06-.03-2.12.41-2.87 1.17l-7.49 7.49c-.66.66-1.03 1.54-1.03 2.47s.36 1.81 1.03 2.47l4.97 4.97a3.5 3.5 0 0 0 2.47 1.02c.89 0 1.79-.34 2.47-1.02l7.49-7.49c.76-.76 1.18-1.81 1.17-2.88l-.06-5.19zm-4.2 4.43c-.44.44-1.02.66-1.6.66a2.256 2.256 0 1 1 0-4.51 2.256 2.256 0 0 1 1.6 3.85"})),j.createElement("defs",null,j.createElement("clipPath",{id:"a"},j.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),sC="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",cC=e=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},j.createElement("g",{fill:"#2571D6",clipPath:"url(#a)"},j.createElement("path",{d:"M13.085 7.331a1.096 1.096 0 1 0-2.192 0v9.316a1.096 1.096 0 0 0 2.192 0z"}),j.createElement("path",{d:"M16.647 10.893H7.33a1.096 1.096 0 1 0 0 2.192h9.316a1.096 1.096 0 0 0 0-2.192"}),j.createElement("path",{d:"M12 24C5.38 24 0 18.608 0 12S5.38 0 12 0s12 5.38 12 12-5.38 12-12 12m0-21.808c-5.414 0-9.808 4.394-9.808 9.808S6.586 21.808 12 21.808s9.808-4.394 9.808-9.808S17.403 2.192 12 2.192"})),j.createElement("defs",null,j.createElement("clipPath",{id:"a"},j.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),lC="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",uC=e=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},j.createElement("path",{fill:"#2571D6",fillRule:"evenodd",d:"M17.333 11a6.34 6.34 0 0 1 6.334 6.333 6.34 6.34 0 0 1-6.334 6.334c-3.493 0-6.333-2.846-6.333-6.334A6.343 6.343 0 0 1 17.333 11m-.005 2.37c-.437 0-.79.338-.79.754v2.412h-2.414c-.416 0-.754.355-.754.792s.338.792.754.792h2.413v2.412c0 .416.354.754.791.754s.792-.338.792-.754V18.12h2.413c.416 0 .754-.355.754-.792s-.338-.792-.754-.792H18.12v-2.412c0-.416-.355-.754-.792-.754",clipRule:"evenodd"}),j.createElement("path",{fill:"#2571D6",d:"M11.12 12.297a7.97 7.97 0 0 0-1.787 5.036c0 1.763.571 3.392 1.537 4.714H3.044c-.84 0-1.523-.682-1.523-1.523 0-4.544 3.683-8.227 8.217-8.227zM10.995.139c2.925 0 5.3 2.376 5.3 5.3s-2.376 5.3-5.3 5.3v-.01a5.303 5.303 0 0 1-5.3-5.3 5.295 5.295 0 0 1 5.3-5.29"})),Cp=qt(h.jsx("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward"),nc=qt(h.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"),dC={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"},oc=["#dbe3fe","#fcebc7","#d9f1d2","#fdf5d1","#ebe3d7","#e1d6fb","#f7c7cc","#f9e7fb","#eaedf2","#d5d8dd"],In=(()=>{const e=[];for(let r=0;r<24;r++)for(let t=0;t<60;t+=15){const n=r.toString().padStart(2,"0"),o=t.toString().padStart(2,"0");e.push(`${n}:${o}`)}return e})(),ko=(e,r)=>{if(!e||!r)return null;const t=e.split("-");if(t.length!==3)return null;const n=parseInt(t[0],10),o=parseInt(t[1],10)-1,i=parseInt(t[2],10),a=r.split(":");if(a.length!==2)return null;const s=parseInt(a[0],10),c=parseInt(a[1],10),l=new Date(i,o,n,s,c);return isNaN(l.getTime())||!w.isValid(l)?null:l},fC=({isVisible:e,onClose:r,onSave:t,onDelete:n,selectedDate:o,initialEvent:i,userId:a,masNombreBD:s,disId:c})=>{const[l,u]=x.useState(!1),[d,f]=x.useState(!1),m=w.format(new Date,"yyyy-MM-dd"),[g,p]=x.useState(""),[y,S]=x.useState([]),[C,k]=x.useState(!1),E=Is(),[_,O]=x.useState([]),{control:N,handleSubmit:q,reset:Z,formState:{errors:L},watch:K,setValue:v}=j2({resolver:Vx(oC),defaultValues:{titulo:"",fechaInicio:w.format(new Date,"yyyy-MM-dd"),horaInicio:w.format(new Date,"HH:mm"),horaFin:w.format(w.addHours(new Date,1),"HH:mm"),todoElDia:!1,client:"",repetir:"No repetir",link:"",descripcion:"",color:oc[5],solID:null}}),I=K("fechaInicio"),A=K("fechaFin"),U=K("todoElDia");x.useEffect(()=>{if(g.trim()===""||!a||!c||!s){S([]);return}k(!0);const F=setTimeout(()=>{E.getClients(g,c,s,a).then(W=>{k(!1);const de=Array.from(new Map(W.map(P=>[P.nombreCliente,P])).values());if(de)S(de);else if(i?.client&&i.solID!==null){const P=[{solID:i.solID,nombreCliente:i.client}];S(P)}else S([])}).catch(W=>{console.error("Error al buscar clientes:",W),k(!1)})},500);return()=>clearTimeout(F)},[g,a,c,s]),x.useEffect(()=>{if(I&&A){const F=new Date(I),W=new Date(A);(F===W||F>W)&&v("fechaFin",I)}},[I,A,v]),x.useEffect(()=>{I&&v("fechaFin",I)},[I]),x.useEffect(()=>{v("showEndDate",l)},[l,v]),x.useEffect(()=>{if(i){const F=w.format(i.fechaInicio,"yyyy-MM-dd")===w.format(i.fechaFin,"yyyy-MM-dd");u(!F),v("titulo",i?.titulo),v("fechaInicio",w.format(i.fechaInicio,"yyyy-MM-dd")),v("fechaFin",w.format(i.fechaFin,"yyyy-MM-dd")),v("horaInicio",w.format(i.fechaInicio,"HH:mm")),v("horaFin",w.format(i.fechaFin,"HH:mm")),v("horaInicio2",w.format(i.fechaFin,"HH:mm")),v("descripcion",i.descripcion),v("link",i.link),v("repetir","false"),v("color",i.color),v("todoElDia",i.todoElDia),v("solID",i.solID),v("client",i.client),i.solID?f(!0):f(!1)}else{const F=o||new Date,W=new Date,de=new Date(F.getFullYear(),F.getMonth(),F.getDate(),W.getHours(),W.getMinutes()),P=w.addHours(de,1);Z({titulo:"",fechaInicio:w.format(de,"yyyy-MM-dd"),horaInicio:w.format(de,"HH:mm"),fechaFin:w.format(P,"yyyy-MM-dd"),horaFin:w.format(P,"HH:mm"),horaInicio2:w.format(P,"HH:mm"),todoElDia:!1,client:"",repetir:"No repetir",link:"",descripcion:"",color:oc[5],solID:null}),u(!1),f(!1)}},[i,e,o]);const H=q(F=>{t(F,i?.eventoID),r(),Z(),u(!1)},F=>{console.log("Errores de validación:",F)});x.useEffect(()=>{U&&(v("horaInicio","00:00"),v("horaFin","23:59"))},[U,v,K]);const ee=()=>{const F=K("fechaInicio");if(F){const W=new Date(`${F}T00:00:00`),de=w.addDays(W,1);v("fechaFin",w.format(de,"yyyy-MM-dd"))}u(!0)},re=K("fechaInicio"),se=K("horaInicio"),V=K("fechaFin"),G=K("horaFin"),[ge,ve]=x.useState(null),[he,J]=x.useState(null);x.useEffect(()=>{(ge===null||ge!==se)&&ve(se)},[se,ge]),x.useEffect(()=>{(he===null||he!==G)&&J(G??"")},[G,he]);const Q=K("todoElDia");x.useEffect(()=>{if(Q||!se||!G||!re||!V)return;const F=ko(re,se),W=ko(V,G);if(!F||!W||!w.isValid(F)||!w.isValid(W))return;const de=w.isSameDay(F,W),P=de&&(w.isAfter(F,W)||F.getTime()===W.getTime()),we=w.isBefore(W,F)&&!de;(P||we)&&(v("horaFin",""),J(""))},[se]);const ce=x.useMemo(()=>{if(!se||!re)return In;const F=ko(re,se),W=ko(V,"00:00");return!F||!W||!w.isValid(F)||!w.isValid(W)||w.isBefore(W,F)&&!w.isSameDay(W,F)?In:w.isSameDay(F,W)?In.filter(de=>{const P=ko(V,de);return P&&w.isAfter(P,F)}):(w.isAfter(W,F),In)},[se,re,V]),ue=x.useMemo(()=>In,[]);return h.jsx($.Modal,{open:e,onClose:r,children:h.jsxs($.Box,{sx:dC,children:[h.jsx($.IconButton,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:12},children:h.jsx(nc,{})}),h.jsx($.Typography,{variant:"h6",mb:2,children:i?"Editar evento":"Agregar evento"}),h.jsxs($.Grid,{container:!0,spacing:1,marginBottom:l?0:1,children:[h.jsx($.Grid,{size:{xs:12,md:12},children:h.jsx(er,{name:"titulo",control:N,render:({field:F})=>h.jsx($.TextField,{...F,label:"Título",fullWidth:!0,variant:"outlined",size:"small",error:!!L.titulo,helperText:L.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"}}})})}),h.jsx($.Grid,{size:{xs:12,md:12},children:h.jsx($.Divider,{})}),h.jsx($.Grid,{size:{xs:12,md:4},children:h.jsx(er,{name:"fechaInicio",control:N,render:({field:F})=>h.jsx($.TextField,{fullWidth:!0,...F,type:"date",placeholder:"Fecha de inicio",size:"small",InputLabelProps:{shrink:!0},error:!!L.fechaInicio,helperText:L.fechaInicio?.message})})}),l?h.jsxs(h.Fragment,{children:[h.jsx($.Grid,{size:{xs:1,md:3},sx:{display:{xs:"none",sm:"block"}}}),h.jsx($.Grid,{size:{xs:11,md:4},children:h.jsx(er,{name:"fechaFin",control:N,render:({field:F})=>h.jsx($.TextField,{...F,type:"date",placeholder:"Fecha de fin",fullWidth:!!l,size:"small",InputLabelProps:{shrink:!0},inputProps:{min:I||m},error:!!L.fechaFin,helperText:L.fechaFin?.message})})}),!i&&h.jsx($.Grid,{size:{xs:1,md:1},children:h.jsx($.IconButton,{onClick:()=>u(!1),sx:{fontSize:18},children:h.jsx(Sp,{})})})]}):h.jsx($.Grid,{size:{xs:12,md:7}})]}),l&&h.jsx(h.Fragment,{children:h.jsxs($.Grid,{container:!0,spacing:0,sx:{margin:0,padding:0,width:"100%"},children:[h.jsx($.Grid,{size:{xs:6,md:5}}),h.jsx($.Grid,{size:{xs:12,md:6},sx:{margin:0,padding:0,width:"100%",display:{xs:"none",sm:"block"}},children:h.jsx(Cp,{sx:{color:"#757575",margin:0,padding:0}})})]})}),h.jsxs($.Grid,{container:!0,spacing:1,marginBottom:1,marginTop:1,children:[h.jsx($.Grid,{size:{xs:12,md:4},children:h.jsx(er,{name:"horaInicio",control:N,render:({field:{onChange:F,value:W,...de}})=>h.jsx($.Autocomplete,{freeSolo:!0,options:ue,value:W||"",onChange:(P,we)=>F(we||""),onInputChange:(P,we)=>F(we),renderInput:P=>h.jsx($.TextField,{...P,...de,size:"small",error:!!L.horaInicio,helperText:L.horaInicio?.message,InputProps:{...P.InputProps,endAdornment:h.jsx($.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:h.jsx(rf,{})})}}),disabled:K("todoElDia")})})}),h.jsx($.Grid,{size:{xs:1,md:1},sx:{display:"flex",alignItems:L.horaInicio?"start":"center",marginTop:L.horaInicio?"5px":"0px"},children:!l&&h.jsx(Cp,{sx:{color:"#757575"}})}),l&&h.jsx($.Grid,{size:{xs:2,md:2}}),h.jsx($.Grid,{size:{xs:12,md:4},children:h.jsx(er,{name:"horaFin",control:N,render:({field:{onChange:F,value:W,...de}})=>h.jsx($.Autocomplete,{freeSolo:!0,options:ce,value:W||"",onChange:(P,we)=>F(we||""),onInputChange:(P,we)=>F(we),renderInput:P=>h.jsx($.TextField,{...P,...de,size:"small",error:!!L.horaFin,helperText:L.horaFin?.message,InputProps:{...P.InputProps,endAdornment:h.jsx($.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:h.jsx(rf,{})})}}),disabled:K("todoElDia")})})}),h.jsx($.Grid,{size:{xs:12,md:3},hidden:l,children:h.jsx(er,{name:"todoElDia",control:N,render:({field:F})=>h.jsx($.FormControlLabel,{control:h.jsx($.Checkbox,{checked:F.value,onChange:W=>F.onChange(W.target.checked)}),label:h.jsx("label",{style:{fontSize:"0.7rem",fontWeight:"normal"},children:"Todo el día"}),sx:{whiteSpace:"nowrap"}})})}),h.jsx($.Grid,{size:{xs:12,md:12},children:!l&&h.jsx(h.Fragment,{children:h.jsxs($.Button,{onClick:ee,size:"small",sx:{textTransform:"none",fontSize:16},children:[h.jsx(cC,{})," Agregar fecha final"]})})}),h.jsx($.Grid,{size:{xs:12,md:12},children:h.jsx($.Divider,{})}),h.jsx($.Grid,{size:{xs:12,md:12},children:!d&&h.jsxs($.Button,{onClick:()=>f(!0),size:"small",sx:{textTransform:"none",fontSize:16},children:[h.jsx(uC,{})," Vincular cliente"]})}),d&&h.jsxs(h.Fragment,{children:[h.jsx($.Grid,{size:{xs:12,md:7},children:h.jsx(er,{name:"client",control:N,render:({field:F})=>h.jsx($.Autocomplete,{options:y,loading:C,getOptionLabel:W=>W.nombreCliente?.trim()||"",value:y.find(W=>W.nombreCliente===F.value)||(F.value&&typeof F.value=="string"?{solID:-1,nombreCliente:F.value}:null),noOptionsText:"",onInputChange:(W,de)=>{p(de)},onChange:(W,de)=>{if(F.onChange(de?de.nombreCliente:""),v("solID",de?de.solID:null),de&&de.nombreCliente){const P=y.filter(we=>we.nombreCliente===de.nombreCliente&&we.solID).map(we=>we.solID);O([...new Set(P)])}else O([])},renderInput:W=>h.jsx($.TextField,{...W,placeholder:"Buscar cliente...",size:"small",InputProps:{...W.InputProps,startAdornment:h.jsx("img",{src:sC,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"5px"}}),endAdornment:h.jsxs(h.Fragment,{children:[C?h.jsx($.CircularProgress,{color:"inherit",size:20}):null,W.InputProps.endAdornment]})}})})})}),h.jsx($.Grid,{size:{xs:11,md:4},children:h.jsx(er,{name:"solID",control:N,render:({field:F})=>h.jsx($.Autocomplete,{options:_,getOptionLabel:W=>W.toString(),value:F.value??null,onChange:(W,de)=>F.onChange(de),renderInput:W=>h.jsx($.TextField,{...W,label:"#Registro",variant:"outlined",size:"small",sx:{"& .MuiInputLabel-root":{backgroundColor:"transparent !important",padding:"0 !important"}}}),disabled:!y})})}),h.jsx($.Grid,{size:{xs:1,md:1},children:h.jsx($.IconButton,{onClick:()=>f(!1),sx:{fontSize:18},children:h.jsx(Sp,{})})})]}),h.jsx($.Grid,{size:{xs:12,md:12},children:h.jsx($.Divider,{})}),h.jsx($.Grid,{size:{xs:12,md:12},children:h.jsx(er,{name:"link",control:N,render:({field:F})=>h.jsx($.TextField,{...F,placeholder:" Agregar enlace de reunión",fullWidth:!0,variant:"outlined",size:"small",error:!!L.link,helperText:L.link?.message,InputProps:{startAdornment:h.jsx("img",{src:iC,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"8px"}})}})})}),h.jsx($.Grid,{size:{xs:12,md:12},children:h.jsx(er,{name:"descripcion",control:N,render:({field:F})=>h.jsx($.TextField,{...F,placeholder:" Agregar descripción aquí...",fullWidth:!0,multiline:!0,rows:3,inputProps:{maxLength:500},variant:"outlined",size:"small",InputProps:{startAdornment:h.jsx("img",{src:lC,width:20,style:{alignSelf:"flex-start",marginRight:"8px"}})}})})}),h.jsx($.Grid,{size:{xs:12,md:12},children:h.jsxs($.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexWrap:"wrap"},children:[h.jsx(aC,{}),oc.map(F=>h.jsx(er,{name:"color",control:N,render:({field:W})=>h.jsx($.IconButton,{onClick:()=>W.onChange(F),sx:{width:24,height:24,borderRadius:"50%",bgcolor:F,border:W.value===F?"2px solid":"none",borderColor:W.value===F?"primary.main":"transparent"}})},F))]})})]}),h.jsxs($.Box,{sx:{display:"flex",justifyContent:"flex-end",mt:3,gap:2},children:[i&&h.jsx($.Button,{onClick:n,variant:"outlined",color:"error",children:"Eliminar"}),h.jsx($.Button,{onClick:r,variant:"outlined",sx:{textTransform:"none"},children:"Cancelar"}),h.jsx($.Button,{onClick:H,variant:"contained",sx:{textTransform:"none"},children:"Guardar"})]})]})})},pC="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",hC={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:400,bgcolor:"background.paper",boxShadow:24,p:4,borderRadius:2,textAlign:"center"},mC=({isOpen:e,onClose:r,onConfirm:t,title:n,message:o})=>h.jsx($.Modal,{open:e,onClose:r,children:h.jsxs($.Box,{sx:hC,children:[h.jsx("img",{src:pC}),h.jsx($.Typography,{variant:"h6",component:"h2",sx:{mt:1},children:n}),h.jsx($.Typography,{sx:{mt:2},children:o}),h.jsxs($.Box,{sx:{mt:4,display:"flex",justifyContent:"center",gap:2},children:[h.jsx($.Button,{variant:"outlined",onClick:r,sx:{textTransform:"none"},children:"Regresar"}),h.jsxs($.Button,{variant:"contained",color:"error",onClick:t,sx:{textTransform:"none"},children:[h.jsx("span",{className:"icon-eliminar",children:" "})," Eliminar"]})]})]})}),gC={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:450,bgcolor:"background.paper",boxShadow:24,p:2,borderRadius:2},vC=({isOpen:e,onClose:r,events:t,date:n,onEventClick:o})=>{if(!n)return null;const i=a=>{o(a),r()};return h.jsx($.Modal,{open:e,onClose:r,children:h.jsxs($.Box,{sx:gC,children:[h.jsxs($.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1},children:[h.jsxs($.Typography,{sx:{fontSize:"20px"},component:"h2",children:["Eventos del"," ",n.toLocaleDateString("es-ES",{weekday:"long",day:"numeric",month:"long"})]}),h.jsx($.IconButton,{onClick:r,children:h.jsx(nc,{})})]}),h.jsx($.Divider,{}),h.jsx($.List,{children:t.map(a=>h.jsx($.ListItem,{disablePadding:!0,children:h.jsxs($.ListItemButton,{onClick:()=>i(a),sx:{py:.5},children:[h.jsx($.Box,{sx:{width:"15px",height:"15px",borderRadius:"50%",backgroundColor:a.color||"#ccc",mr:2,flexShrink:0,minWidth:"10px"}}),h.jsx($.ListItemText,{primary:a.titulo,secondary:`${w.format(a.fechaInicio,"HH:mm")} - ${w.format(a.fechaFin,"HH:mm")}`,sx:{my:0,"& .MuiListItemText-primary":{display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"},"& .MuiListItemText-secondary":{display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",fontSize:"12px"}}})]})},a.eventoID))})]})})},yC=qt(h.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"),bC=qt(h.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"),wC="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",_C="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",Ep=x.forwardRef(({id:e,message:r,variant:t},n)=>{const{closeSnackbar:o}=ya.useSnackbar(),i={success:{color:"#fff",icon:h.jsx("img",{width:25,src:_C,style:{borderRadius:"50%",backgroundColor:"#4caf50",color:"white",fontSize:"12px",padding:3}})},error:{color:"#f44336",icon:h.jsx(yC,{sx:{color:"#f44336"}})},info:{color:"#2196f3",icon:h.jsx(bC,{sx:{color:"#2196f3"}})},delete:{color:"#fff",icon:h.jsx("img",{src:wC,width:25,style:{borderRadius:"50%",backgroundColor:"#ffdfd4",color:"red",fontSize:"16px",padding:3}})}},a=i[t]||i.info;return h.jsx(ya.SnackbarContent,{ref:n,children:h.jsxs($.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 ${a.color}`},children:[h.jsx($.Box,{sx:{mr:1.5},children:a.icon}),h.jsx($.Typography,{variant:"body2",sx:{flexGrow:1},children:r}),h.jsx($.IconButton,{size:"small",onClick:()=>o(e),children:h.jsx(nc,{fontSize:"small"})})]})})}),xC=({userId:e,leads30Days:r,leads90Days:t,disId:n,masNombreBD:o})=>{const[i,a]=x.useState(new Date),[s,c]=x.useState([]),[l,u]=x.useState(!1),[d,f]=x.useState(null),[m,g]=x.useState(!1),[p,y]=x.useState(null),[S,C]=x.useState([]),{enqueueSnackbar:k}=ya.useSnackbar(),E=Is(),[_,O]=x.useState(!1),[N,q]=x.useState([]),[Z,L]=x.useState(null),K=(J,Q)=>{q(J),L(Q),O(!0)},v=x.useRef(null);x.useEffect(()=>{const J=async()=>{try{if(e){const Q=await E.getEventsByUser(e);c(Q)}}catch{console.log("No se pudieron cargar los eventos. Revisa la consola para más detalles.")}finally{console.log("Eventos han sido cargados")}};return J(),v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{console.log("Iniciando recarga programada de eventos (2 segundos después del inicio)..."),J()},4e3),()=>{v.current&&clearTimeout(v.current)}},[i,e]),x.useEffect(()=>{const J=new Date,Q=w.startOfDay(J),ce=w.endOfDay(w.addDays(Q,6)),ue={start:Q,end:ce},F=s.filter(W=>{const de={start:W.fechaInicio,end:W.fechaFin};return id(de,ue)}).sort((W,de)=>W.fechaInicio.getTime()-de.fechaInicio.getTime());C(F)},[s]);const I=async J=>{try{const Q=await E.getEventById(J.eventoID);f(Q),u(!0)}catch(Q){console.error(Q)}},A=()=>{u(!1),f(null)},U=async(J,Q)=>{let ce,ue;J.todoElDia?(ce=new Date(`${J.fechaInicio}T${J.horaInicio}`),ue=new Date(`${J.fechaInicio}T${J.horaFin}`)):(ce=new Date(`${J.fechaInicio}T${J.horaInicio}`),ue=J.fechaFin&&J.horaInicio2?new Date(`${J.fechaFin}T${J.horaInicio2}`):new Date(`${J.fechaInicio}T${J.horaInicio2}`));const F=w.format(ce,"yyyy-MM-dd HH:mm:ss.SSS"),W=w.format(ue,"yyyy-MM-dd HH:mm:ss.SSS");if(Q){const P={...J,eventoID:Q,fechaInicio:F,fechaFin:W,solID:J.solID??null,disID:n??null,client:J.client};try{const we=await E.updateEvent(P);var de=s.map(Qe=>Qe.eventoID===we.eventoID?we:Qe);c(de),k("El evento se ha actualizado correctamente.",{variant:"success"}),A()}catch{k("Error al eliactualizar Evento",{variant:"error"})}}else{const P={...J,fechaInicio:F,fechaFin:W,todoElDia:J.todoElDia,solID:J.solID??null,disID:n??null,client:J.client};try{const we=await E.createEvent(P,e);c(Qe=>[...Qe,we]),k("El evento se ha creado con éxito",{variant:"success"}),A()}catch{k("Error al guardar Evento",{variant:"error"})}}if(e){const P=await E.getEventsByUser(e);c(P)}},H=()=>{a(J=>new Date(J.getFullYear(),J.getMonth()-1,1))},ee=()=>{a(J=>new Date(J.getFullYear(),J.getMonth()+1,1))},re=()=>{g(!0)},se=()=>{y(new Date),u(!0)},V=()=>alert("Sincronizar con Google Calendar"),G=()=>alert("Sincronizar con Outlook Calendar"),ge=J=>{J&&a(J)},ve=J=>{y(J),u(!0),f(null)},he=async()=>{if(d)try{await E.deleteEvent(d.eventoID),c(s.filter(J=>J.eventoID!==d.eventoID)),k("El evento se ha eliminado de tu calendario",{content:(J,Q)=>h.jsx(Ep,{id:J,message:String(Q),variant:"delete"})})}catch{k("Error al eliminar Evento",{variant:"error"})}finally{A(),g(!1)}};return h.jsxs("div",{id:"Agenda",style:{height:"100%",width:"100%"},children:[h.jsx(N0,{header:h.jsx(tb,{currentDate:i,onPrevMonth:H,onNextMonth:ee,onAddEvent:se,onDateChange:ge}),sidebar:h.jsx(jb,{onEventClick:I,upcomingEvents:S,onSyncGoogle:V,onSyncOutlook:G,leads30Days:r,leads90Days:t}),mainContent:h.jsx(Wb,{onSeeMoreClick:K,currentDate:i,events:s,onDayClick:ve,onEventClick:I})}),h.jsx(fC,{isVisible:l,onClose:A,onSave:U,onDelete:re,selectedDate:p,initialEvent:d,userId:e,masNombreBD:o,disId:n}),h.jsx(mC,{isOpen:m,onClose:()=>g(!1),onConfirm:he,title:"Eliminar evento",message:"¿De verdad deseas eliminar este evento? Esta acción no se puede deshacer."}),h.jsx(vC,{isOpen:_,onClose:()=>O(!1),events:N,date:Z,onEventClick:I})]})},SC="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",CC="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 ic(e,r,t){return e.accessor?e.accessor(r,t):e.field?r?.[e.field]:r?.[e?.key||""]}function EC(e,r){const t=e??"",n=r??"";return t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():typeof t=="number"&&typeof n=="number"?t-n:typeof t=="boolean"&&typeof n=="boolean"?Number(t)-Number(n):String(t).localeCompare(String(n),void 0,{numeric:!0,sensitivity:"base"})}function ac(e,r,t=!0){return typeof e=="function"?e(r):e??t}function kC(e){return e.replace(/[^\d]/g,"")}function DC(e,r){return r}const kp=qt(h.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"}),"AttachFileOutlined"),TC=qt(h.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),OC=qt(h.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp"),MC=Et("MuiBox",["root"]),PC=ou(),sc=Sg({themeId:Xa,defaultTheme:PC,defaultClassName:MC.root,generateClassName:Ic.generate});process.env.NODE_ENV!=="production"&&(sc.propTypes={children:b.node,component:b.elementType,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object])});function Dp(e,r){if(e==null)return{};var t={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(r.indexOf(n)!==-1)continue;t[n]=e[n]}return t}function cc(e,r){return cc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},cc(e,r)}function Tp(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,cc(e,r)}const Op={disabled:!1};var AC=process.env.NODE_ENV!=="production"?b.oneOfType([b.number,b.shape({enter:b.number,exit:b.number,appear:b.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&b.oneOfType([b.string,b.shape({enter:b.string,exit:b.string,active:b.string}),b.shape({enter:b.string,enterDone:b.string,enterActive:b.string,exit:b.string,exitDone:b.string,exitActive:b.string})]);const fa=x.createContext(null);var IC=function(r){return r.scrollTop},Do="unmounted",rn="exited",nn="entering",Rn="entered",lc="exiting",Cr=(function(e){Tp(r,e);function r(n,o){var i;i=e.call(this,n,o)||this;var a=o,s=a&&!a.isMounting?n.enter:n.appear,c;return i.appearStatus=null,n.in?s?(c=rn,i.appearStatus=nn):c=Rn:n.unmountOnExit||n.mountOnEnter?c=Do:c=rn,i.state={status:c},i.nextCallback=null,i}r.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===Do?{status:rn}:null};var t=r.prototype;return t.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},t.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==nn&&a!==Rn&&(i=nn):(a===nn||a===Rn)&&(i=lc)}this.updateStatus(!1,i)},t.componentWillUnmount=function(){this.cancelNextCallback()},t.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},t.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===nn){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:ln.findDOMNode(this);a&&IC(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===rn&&this.setState({status:Do})},t.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,c=this.props.nodeRef?[s]:[ln.findDOMNode(this),s],l=c[0],u=c[1],d=this.getTimeouts(),f=s?d.appear:d.enter;if(!o&&!a||Op.disabled){this.safeSetState({status:Rn},function(){i.props.onEntered(l)});return}this.props.onEnter(l,u),this.safeSetState({status:nn},function(){i.props.onEntering(l,u),i.onTransitionEnd(f,function(){i.safeSetState({status:Rn},function(){i.props.onEntered(l,u)})})})},t.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:ln.findDOMNode(this);if(!i||Op.disabled){this.safeSetState({status:rn},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:lc},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:rn},function(){o.props.onExited(s)})})})},t.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},t.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},t.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},t.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:ln.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],l=c[0],u=c[1];this.props.addEndListener(l,u)}o!=null&&setTimeout(this.nextCallback,o)},t.render=function(){var o=this.state.status;if(o===Do)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=Dp(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x.createElement(fa.Provider,{value:null},typeof a=="function"?a(o,s):x.cloneElement(x.Children.only(a),s))},r})(x.Component);Cr.contextType=fa,Cr.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:b.shape({current:typeof Element>"u"?b.any:function(e,r,t,n,o,i){var a=e[r];return b.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,r,t,n,o,i)}}),children:b.oneOfType([b.func.isRequired,b.element.isRequired]).isRequired,in:b.bool,mountOnEnter:b.bool,unmountOnExit:b.bool,appear:b.bool,enter:b.bool,exit:b.bool,timeout:function(r){var t=AC;r.addEndListener||(t=t.isRequired);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return t.apply(void 0,[r].concat(o))},addEndListener:b.func,onEnter:b.func,onEntering:b.func,onEntered:b.func,onExit:b.func,onExiting:b.func,onExited:b.func}:{};function Nn(){}Cr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Nn,onEntering:Nn,onEntered:Nn,onExit:Nn,onExiting:Nn,onExited:Nn},Cr.UNMOUNTED=Do,Cr.EXITED=rn,Cr.ENTERING=nn,Cr.ENTERED=Rn,Cr.EXITING=lc;function RC(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uc(e,r){var t=function(i){return r&&x.isValidElement(i)?r(i):i},n=Object.create(null);return e&&x.Children.map(e,function(o){return o}).forEach(function(o){n[o.key]=t(o)}),n}function NC(e,r){e=e||{},r=r||{};function t(u){return u in r?r[u]:e[u]}var n=Object.create(null),o=[];for(var i in e)i in r?o.length&&(n[i]=o,o=[]):o.push(i);var a,s={};for(var c in r){if(n[c])for(a=0;a<n[c].length;a++){var l=n[c][a];s[n[c][a]]=t(l)}s[c]=t(c)}for(a=0;a<o.length;a++)s[o[a]]=t(o[a]);return s}function on(e,r,t){return t[r]!=null?t[r]:e.props[r]}function $C(e,r){return uc(e.children,function(t){return x.cloneElement(t,{onExited:r.bind(null,t),in:!0,appear:on(t,"appear",e),enter:on(t,"enter",e),exit:on(t,"exit",e)})})}function jC(e,r,t){var n=uc(e.children),o=NC(r,n);return Object.keys(o).forEach(function(i){var a=o[i];if(x.isValidElement(a)){var s=i in r,c=i in n,l=r[i],u=x.isValidElement(l)&&!l.props.in;c&&(!s||u)?o[i]=x.cloneElement(a,{onExited:t.bind(null,a),in:!0,exit:on(a,"exit",e),enter:on(a,"enter",e)}):!c&&s&&!u?o[i]=x.cloneElement(a,{in:!1}):c&&s&&x.isValidElement(l)&&(o[i]=x.cloneElement(a,{onExited:t.bind(null,a),in:l.props.in,exit:on(a,"exit",e),enter:on(a,"enter",e)}))}}),o}var LC=Object.values||function(e){return Object.keys(e).map(function(r){return e[r]})},zC={component:"div",childFactory:function(r){return r}},dc=(function(e){Tp(r,e);function r(n,o){var i;i=e.call(this,n,o)||this;var a=i.handleExited.bind(RC(i));return i.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},i}var t=r.prototype;return t.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},t.componentWillUnmount=function(){this.mounted=!1},r.getDerivedStateFromProps=function(o,i){var a=i.children,s=i.handleExited,c=i.firstRender;return{children:c?$C(o,s):jC(o,a,s),firstRender:!1}},t.handleExited=function(o,i){var a=uc(this.props.children);o.key in a||(o.props.onExited&&o.props.onExited(i),this.mounted&&this.setState(function(s){var c=Wo({},s.children);return delete c[o.key],{children:c}}))},t.render=function(){var o=this.props,i=o.component,a=o.childFactory,s=Dp(o,["component","childFactory"]),c=this.state.contextValue,l=LC(this.state.children).map(a);return delete s.appear,delete s.enter,delete s.exit,i===null?x.createElement(fa.Provider,{value:c},l):x.createElement(fa.Provider,{value:c},x.createElement(i,s,l))},r})(x.Component);dc.propTypes=process.env.NODE_ENV!=="production"?{component:b.any,children:b.node,appear:b.bool,enter:b.bool,exit:b.bool,childFactory:b.func}:{},dc.defaultProps=zC;const Mp={};function Pp(e,r){const t=j.useRef(Mp);return t.current===Mp&&(t.current=e(r)),t}const BC=[];function VC(e){j.useEffect(e,BC)}class fc{static create(){return new fc}currentId=null;start(r,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},r)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function Ap(){const e=Pp(fc.create).current;return VC(e.disposeEffect),e}function pa(e,r){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||r(...n)}}function FC(e){const{prototype:r={}}=e;return!!r.isReactComponent}function YC(e,r,t,n,o){const i=e[r],a=o||r;if(i==null||typeof window>"u")return null;let s;return typeof i=="function"&&!FC(i)&&(s="Did you accidentally provide a plain function component instead?"),s!==void 0?new Error(`Invalid ${n} \`${a}\` supplied to \`${t}\`. Expected an element type that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Ip=pa(b.elementType,YC);function Rp(e,r){const{timeout:t,easing:n,style:o={}}=e;return{duration:o.transitionDuration??(typeof t=="number"?t:t[r.mode]||0),easing:o.transitionTimingFunction??(typeof n=="object"?n[r.mode]:n),delay:o.transitionDelay}}function UC(e){return Ct("MuiCollapse",e)}Et("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const HC=e=>{const{orientation:r,classes:t}=e,n={root:["root",`${r}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${r}`],wrapperInner:["wrapperInner",`${r}`]};return Lt(n,UC,t)},WC=ut("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.root,r[t.orientation],t.state==="entered"&&r.entered,t.state==="exited"&&!t.in&&t.collapsedSize==="0px"&&r.hidden]}})(cr(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:r})=>r.state==="exited"&&!r.in&&r.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),ZC=ut("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),qC=ut("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),ha=j.forwardRef(function(r,t){const n=Rt({props:r,name:"MuiCollapse"}),{addEndListener:o,children:i,className:a,collapsedSize:s="0px",component:c,easing:l,in:u,onEnter:d,onEntered:f,onEntering:m,onExit:g,onExited:p,onExiting:y,orientation:S="vertical",style:C,timeout:k=Ql.standard,TransitionComponent:E=Cr,..._}=n,O={...n,orientation:S,collapsedSize:s},N=HC(O),q=au(),Z=Ap(),L=j.useRef(null),K=j.useRef(),v=typeof s=="number"?`${s}px`:s,I=S==="horizontal",A=I?"width":"height",U=j.useRef(null),H=Ja(t,U),ee=Q=>ce=>{if(Q){const ue=U.current;ce===void 0?Q(ue):Q(ue,ce)}},re=()=>L.current?L.current[I?"clientWidth":"clientHeight"]:0,se=ee((Q,ce)=>{L.current&&I&&(L.current.style.position="absolute"),Q.style[A]=v,d&&d(Q,ce)}),V=ee((Q,ce)=>{const ue=re();L.current&&I&&(L.current.style.position="");const{duration:F,easing:W}=Rp({style:C,timeout:k,easing:l},{mode:"enter"});if(k==="auto"){const de=q.transitions.getAutoHeightDuration(ue);Q.style.transitionDuration=`${de}ms`,K.current=de}else Q.style.transitionDuration=typeof F=="string"?F:`${F}ms`;Q.style[A]=`${ue}px`,Q.style.transitionTimingFunction=W,m&&m(Q,ce)}),G=ee((Q,ce)=>{Q.style[A]="auto",f&&f(Q,ce)}),ge=ee(Q=>{Q.style[A]=`${re()}px`,g&&g(Q)}),ve=ee(p),he=ee(Q=>{const ce=re(),{duration:ue,easing:F}=Rp({style:C,timeout:k,easing:l},{mode:"exit"});if(k==="auto"){const W=q.transitions.getAutoHeightDuration(ce);Q.style.transitionDuration=`${W}ms`,K.current=W}else Q.style.transitionDuration=typeof ue=="string"?ue:`${ue}ms`;Q.style[A]=v,Q.style.transitionTimingFunction=F,y&&y(Q)}),J=Q=>{k==="auto"&&Z.start(K.current||0,Q),o&&o(U.current,Q)};return h.jsx(E,{in:u,onEnter:se,onEntered:G,onEntering:V,onExit:ge,onExited:ve,onExiting:he,addEndListener:J,nodeRef:U,timeout:k==="auto"?null:k,..._,children:(Q,{ownerState:ce,...ue})=>h.jsx(WC,{as:c,className:_e(N.root,a,{entered:N.entered,exited:!u&&v==="0px"&&N.hidden}[Q]),style:{[I?"minWidth":"minHeight"]:v,...C},ref:H,ownerState:{...O,state:Q},...ue,children:h.jsx(ZC,{ownerState:{...O,state:Q},className:N.wrapper,ref:L,children:h.jsx(qC,{ownerState:{...O,state:Q},className:N.wrapperInner,children:i})})})})});process.env.NODE_ENV!=="production"&&(ha.propTypes={addEndListener:b.func,children:b.node,classes:b.object,className:b.string,collapsedSize:b.oneOfType([b.number,b.string]),component:Ip,easing:b.oneOfType([b.shape({enter:b.string,exit:b.string}),b.string]),in:b.bool,onEnter:b.func,onEntered:b.func,onEntering:b.func,onExit:b.func,onExited:b.func,onExiting:b.func,orientation:b.oneOf(["horizontal","vertical"]),style:b.object,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),timeout:b.oneOfType([b.oneOf(["auto"]),b.number,b.shape({appear:b.number,enter:b.number,exit:b.number})])}),ha&&(ha.muiSupportAuto=!0);function KC(e){return typeof e.main=="string"}function GC(e,r=[]){if(!KC(e))return!1;for(const t of r)if(!e.hasOwnProperty(t)||typeof e[t]!="string")return!1;return!0}function pc(e=[]){return([,r])=>r&&GC(r,e)}const QC=b.oneOfType([b.func,b.object]);function Np(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
|
|
188
|
+
`)}m.write("payload.value = newResult;"),m.write("return payload;");const C=m.compile();return(k,E)=>C(f,k,E)};let i;const a=Ji,s=!Pf.jitless,l=s&&F2.value,u=r.catchall;let d;e._zod.parse=(f,m)=>{d??(d=n.value);const g=f.value;return a(g)?s&&l&&m?.async===!1&&m.jitless!==!0?(i||(i=o(r.shape)),f=i(f,m),u?Kf([],g,f,m,d,e):f):t(f,m):(f.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),f)}});function Gf(e,r,t,n){for(const i of e)if(i.issues.length===0)return r.value=i.value,r;const o=e.filter(i=>!An(i));return o.length===1?(r.value=o[0].value,o[0]):(r.issues.push({code:"invalid_union",input:r.value,inst:t,errors:e.map(i=>i.issues.map(a=>tn(a,n,en())))}),r)}const A_=Y("$ZodUnion",(e,r)=>{et.init(e,r),Ye(e._zod,"optin",()=>r.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Ye(e._zod,"optout",()=>r.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Ye(e._zod,"values",()=>{if(r.options.every(o=>o._zod.values))return new Set(r.options.flatMap(o=>Array.from(o._zod.values)))}),Ye(e._zod,"pattern",()=>{if(r.options.every(o=>o._zod.pattern)){const o=r.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>qs(i.source)).join("|")})$`)}});const t=r.options.length===1,n=r.options[0]._zod.run;e._zod.parse=(o,i)=>{if(t)return n(o,i);let a=!1;const s=[];for(const c of r.options){const l=c._zod.run({value:o.value,issues:[]},i);if(l instanceof Promise)s.push(l),a=!0;else{if(l.issues.length===0)return l;s.push(l)}}return a?Promise.all(s).then(c=>Gf(c,o,e,i)):Gf(s,o,e,i)}}),I_=Y("$ZodIntersection",(e,r)=>{et.init(e,r),e._zod.parse=(t,n)=>{const o=t.value,i=r.left._zod.run({value:o,issues:[]},n),a=r.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([c,l])=>Qf(t,c,l)):Qf(t,i,a)}});function Xs(e,r){if(e===r)return{valid:!0,data:e};if(e instanceof Date&&r instanceof Date&&+e==+r)return{valid:!0,data:e};if(So(e)&&So(r)){const t=Object.keys(r),n=Object.keys(e).filter(i=>t.indexOf(i)!==-1),o={...e,...r};for(const i of n){const a=Xs(e[i],r[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};o[i]=a.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return{valid:!1,mergeErrorPath:[]};const t=[];for(let n=0;n<e.length;n++){const o=e[n],i=r[n],a=Xs(o,i);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};t.push(a.data)}return{valid:!0,data:t}}return{valid:!1,mergeErrorPath:[]}}function Qf(e,r,t){if(r.issues.length&&e.issues.push(...r.issues),t.issues.length&&e.issues.push(...t.issues),An(e))return e;const n=Xs(r.value,t.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}const R_=Y("$ZodEnum",(e,r)=>{et.init(e,r);const t=z2(r.entries),n=new Set(t);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.filter(o=>Y2.has(typeof o)).map(o=>typeof o=="string"?Pn(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const a=o.value;return n.has(a)||o.issues.push({code:"invalid_value",values:t,input:a,inst:e}),o}}),N_=Y("$ZodLiteral",(e,r)=>{if(et.init(e,r),r.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(r.values),e._zod.pattern=new RegExp(`^(${r.values.map(t=>typeof t=="string"?Pn(t):t?Pn(t.toString()):String(t)).join("|")})$`),e._zod.parse=(t,n)=>{const o=t.value;return e._zod.values.has(o)||t.issues.push({code:"invalid_value",values:r.values,input:o,inst:e}),t}}),$_=Y("$ZodTransform",(e,r)=>{et.init(e,r),e._zod.parse=(t,n)=>{if(n.direction==="backward")throw new Mf(e.constructor.name);const o=r.transform(t.value,t);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(a=>(t.value=a,t));if(o instanceof Promise)throw new On;return t.value=o,t}});function Xf(e,r){return e.issues.length&&r===void 0?{issues:[],value:void 0}:e}const j_=Y("$ZodOptional",(e,r)=>{et.init(e,r),e._zod.optin="optional",e._zod.optout="optional",Ye(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),Ye(e._zod,"pattern",()=>{const t=r.innerType._zod.pattern;return t?new RegExp(`^(${qs(t.source)})?$`):void 0}),e._zod.parse=(t,n)=>{if(r.innerType._zod.optin==="optional"){const o=r.innerType._zod.run(t,n);return o instanceof Promise?o.then(i=>Xf(i,t.value)):Xf(o,t.value)}return t.value===void 0?t:r.innerType._zod.run(t,n)}}),L_=Y("$ZodNullable",(e,r)=>{et.init(e,r),Ye(e._zod,"optin",()=>r.innerType._zod.optin),Ye(e._zod,"optout",()=>r.innerType._zod.optout),Ye(e._zod,"pattern",()=>{const t=r.innerType._zod.pattern;return t?new RegExp(`^(${qs(t.source)}|null)$`):void 0}),Ye(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),e._zod.parse=(t,n)=>t.value===null?t:r.innerType._zod.run(t,n)}),z_=Y("$ZodDefault",(e,r)=>{et.init(e,r),e._zod.optin="optional",Ye(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(t,n)=>{if(n.direction==="backward")return r.innerType._zod.run(t,n);if(t.value===void 0)return t.value=r.defaultValue,t;const o=r.innerType._zod.run(t,n);return o instanceof Promise?o.then(i=>Jf(i,r)):Jf(o,r)}});function Jf(e,r){return e.value===void 0&&(e.value=r.defaultValue),e}const B_=Y("$ZodPrefault",(e,r)=>{et.init(e,r),e._zod.optin="optional",Ye(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(t,n)=>(n.direction==="backward"||t.value===void 0&&(t.value=r.defaultValue),r.innerType._zod.run(t,n))}),V_=Y("$ZodNonOptional",(e,r)=>{et.init(e,r),Ye(e._zod,"values",()=>{const t=r.innerType._zod.values;return t?new Set([...t].filter(n=>n!==void 0)):void 0}),e._zod.parse=(t,n)=>{const o=r.innerType._zod.run(t,n);return o instanceof Promise?o.then(i=>ep(i,e)):ep(o,e)}});function ep(e,r){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:r}),e}const F_=Y("$ZodCatch",(e,r)=>{et.init(e,r),Ye(e._zod,"optin",()=>r.innerType._zod.optin),Ye(e._zod,"optout",()=>r.innerType._zod.optout),Ye(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(t,n)=>{if(n.direction==="backward")return r.innerType._zod.run(t,n);const o=r.innerType._zod.run(t,n);return o instanceof Promise?o.then(i=>(t.value=i.value,i.issues.length&&(t.value=r.catchValue({...t,error:{issues:i.issues.map(a=>tn(a,n,en()))},input:t.value}),t.issues=[]),t)):(t.value=o.value,o.issues.length&&(t.value=r.catchValue({...t,error:{issues:o.issues.map(i=>tn(i,n,en()))},input:t.value}),t.issues=[]),t)}}),Y_=Y("$ZodPipe",(e,r)=>{et.init(e,r),Ye(e._zod,"values",()=>r.in._zod.values),Ye(e._zod,"optin",()=>r.in._zod.optin),Ye(e._zod,"optout",()=>r.out._zod.optout),Ye(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(t,n)=>{if(n.direction==="backward"){const i=r.out._zod.run(t,n);return i instanceof Promise?i.then(a=>ca(a,r.in,n)):ca(i,r.in,n)}const o=r.in._zod.run(t,n);return o instanceof Promise?o.then(i=>ca(i,r.out,n)):ca(o,r.out,n)}});function ca(e,r,t){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:e.value,issues:e.issues},t)}const U_=Y("$ZodReadonly",(e,r)=>{et.init(e,r),Ye(e._zod,"propValues",()=>r.innerType._zod.propValues),Ye(e._zod,"values",()=>r.innerType._zod.values),Ye(e._zod,"optin",()=>r.innerType._zod.optin),Ye(e._zod,"optout",()=>r.innerType._zod.optout),e._zod.parse=(t,n)=>{if(n.direction==="backward")return r.innerType._zod.run(t,n);const o=r.innerType._zod.run(t,n);return o instanceof Promise?o.then(tp):tp(o)}});function tp(e){return e.value=Object.freeze(e.value),e}const H_=Y("$ZodCustom",(e,r)=>{Ot.init(e,r),et.init(e,r),e._zod.parse=(t,n)=>t,e._zod.check=t=>{const n=t.value,o=r.fn(n);if(o instanceof Promise)return o.then(i=>rp(i,t,n,e));rp(o,t,n,e)}});function rp(e,r,t,n){if(!e){const o={code:"custom",input:t,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),r.issues.push(Co(o))}}class W_{constructor(){this._map=new Map,this._idmap=new Map}add(r,...t){const n=t[0];if(this._map.set(r,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,r)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(r){const t=this._map.get(r);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(r),this}get(r){const t=r._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const o={...n,...this._map.get(r)};return Object.keys(o).length?o:void 0}return this._map.get(r)}has(r){return this._map.has(r)}}function Z_(){return new W_}const la=Z_();function q_(e,r){return new e({type:"string",...me(r)})}function K_(e,r){return new e({type:"string",format:"email",check:"string_format",abort:!1,...me(r)})}function np(e,r){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...me(r)})}function G_(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...me(r)})}function Q_(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...me(r)})}function X_(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...me(r)})}function J_(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...me(r)})}function ex(e,r){return new e({type:"string",format:"url",check:"string_format",abort:!1,...me(r)})}function tx(e,r){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...me(r)})}function rx(e,r){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...me(r)})}function nx(e,r){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...me(r)})}function ox(e,r){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...me(r)})}function ix(e,r){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...me(r)})}function ax(e,r){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...me(r)})}function sx(e,r){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...me(r)})}function cx(e,r){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...me(r)})}function lx(e,r){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...me(r)})}function ux(e,r){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...me(r)})}function dx(e,r){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...me(r)})}function fx(e,r){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...me(r)})}function px(e,r){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...me(r)})}function hx(e,r){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...me(r)})}function mx(e,r){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...me(r)})}function gx(e,r){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...me(r)})}function vx(e,r){return new e({type:"string",format:"date",check:"string_format",...me(r)})}function yx(e,r){return new e({type:"string",format:"time",check:"string_format",precision:null,...me(r)})}function bx(e,r){return new e({type:"string",format:"duration",check:"string_format",...me(r)})}function wx(e,r){return new e({type:"number",checks:[],...me(r)})}function _x(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...me(r)})}function xx(e,r){return new e({type:"boolean",...me(r)})}function Sx(e){return new e({type:"unknown"})}function Cx(e,r){return new e({type:"never",...me(r)})}function op(e,r){return new Yf({check:"less_than",...me(r),value:e,inclusive:!1})}function Js(e,r){return new Yf({check:"less_than",...me(r),value:e,inclusive:!0})}function ip(e,r){return new Uf({check:"greater_than",...me(r),value:e,inclusive:!1})}function ec(e,r){return new Uf({check:"greater_than",...me(r),value:e,inclusive:!0})}function ap(e,r){return new Bw({check:"multiple_of",...me(r),value:e})}function sp(e,r){return new Fw({check:"max_length",...me(r),maximum:e})}function ua(e,r){return new Yw({check:"min_length",...me(r),minimum:e})}function cp(e,r){return new Uw({check:"length_equals",...me(r),length:e})}function Ex(e,r){return new Hw({check:"string_format",format:"regex",...me(r),pattern:e})}function kx(e){return new Ww({check:"string_format",format:"lowercase",...me(e)})}function Dx(e){return new Zw({check:"string_format",format:"uppercase",...me(e)})}function Tx(e,r){return new qw({check:"string_format",format:"includes",...me(r),includes:e})}function Ox(e,r){return new Kw({check:"string_format",format:"starts_with",...me(r),prefix:e})}function Mx(e,r){return new Gw({check:"string_format",format:"ends_with",...me(r),suffix:e})}function Eo(e){return new Qw({check:"overwrite",tx:e})}function Px(e){return Eo(r=>r.normalize(e))}function Ax(){return Eo(e=>e.trim())}function Ix(){return Eo(e=>e.toLowerCase())}function Rx(){return Eo(e=>e.toUpperCase())}function Nx(e,r,t){return new e({type:"array",element:r,...me(t)})}function $x(e,r,t){return new e({type:"custom",check:"custom",fn:r,...me(t)})}function jx(e){const r=Lx(t=>(t.addIssue=n=>{if(typeof n=="string")t.issues.push(Co(n,t.value,r._zod.def));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=t.value),o.inst??(o.inst=r),o.continue??(o.continue=!r._zod.def.abort),t.issues.push(Co(o))}},e(t.value,t)));return r}function Lx(e,r){const t=new Ot({check:"custom",...me(r)});return t._zod.check=e,t}function lp(e,r){try{var t=e()}catch(n){return r(n)}return t&&t.then?t.then(void 0,r):t}function zx(e,r){for(var t={};e.length;){var n=e[0],o=n.code,i=n.message,a=n.path.join(".");if(!t[a])if("unionErrors"in n){var s=n.unionErrors[0].errors[0];t[a]={message:s.message,type:s.code}}else t[a]={message:i,type:o};if("unionErrors"in n&&n.unionErrors.forEach(function(u){return u.errors.forEach(function(d){return e.push(d)})}),r){var c=t[a].types,l=c&&c[n.code];t[a]=Bs(a,r,t,o,l?[].concat(l,n.message):n.message)}e.shift()}return t}function Bx(e,r){for(var t={};e.length;){var n=e[0],o=n.code,i=n.message,a=n.path.join(".");if(!t[a])if(n.code==="invalid_union"&&n.errors.length>0){var s=n.errors[0][0];t[a]={message:s.message,type:s.code}}else t[a]={message:i,type:o};if(n.code==="invalid_union"&&n.errors.forEach(function(u){return u.forEach(function(d){return e.push(d)})}),r){var c=t[a].types,l=c&&c[n.code];t[a]=Bs(a,r,t,o,l?[].concat(l,n.message):n.message)}e.shift()}return t}function Vx(e,r,t){if(t===void 0&&(t={}),(function(n){return"_def"in n&&typeof n._def=="object"&&"typeName"in n._def})(e))return function(n,o,i){try{return Promise.resolve(lp(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](n,r)).then(function(a){return i.shouldUseNativeValidation&&Us({},i),{errors:{},values:t.raw?Object.assign({},n):a}})},function(a){if((function(s){return Array.isArray(s?.issues)})(a))return{values:{},errors:Tf(zx(a.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}};if((function(n){return"_zod"in n&&typeof n._zod=="object"})(e))return function(n,o,i){try{return Promise.resolve(lp(function(){return Promise.resolve((t.mode==="sync"?tw:rw)(e,n,r)).then(function(a){return i.shouldUseNativeValidation&&Us({},i),{errors:{},values:t.raw?Object.assign({},n):a}})},function(a){if((function(s){return s instanceof Gs})(a))return{values:{},errors:Tf(Bx(a.issues,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}};throw new Error("Invalid input: not a Zod schema")}const Fx=Y("ZodISODateTime",(e,r)=>{d_.init(e,r),Ge.init(e,r)});function Yx(e){return gx(Fx,e)}const Ux=Y("ZodISODate",(e,r)=>{f_.init(e,r),Ge.init(e,r)});function Hx(e){return vx(Ux,e)}const Wx=Y("ZodISOTime",(e,r)=>{p_.init(e,r),Ge.init(e,r)});function Zx(e){return yx(Wx,e)}const qx=Y("ZodISODuration",(e,r)=>{h_.init(e,r),Ge.init(e,r)});function Kx(e){return bx(qx,e)}const Ut=Y("ZodError",(e,r)=>{Gs.init(e,r),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>ew(e,t)},flatten:{value:t=>J2(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Hs,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Hs,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Gx=ra(Ut),Qx=na(Ut),Xx=oa(Ut),Jx=ia(Ut),eS=iw(Ut),tS=aw(Ut),rS=sw(Ut),nS=cw(Ut),oS=lw(Ut),iS=uw(Ut),aS=dw(Ut),sS=fw(Ut),it=Y("ZodType",(e,r)=>(et.init(e,r),e.def=r,e.type=r.type,Object.defineProperty(e,"_def",{value:r}),e.check=(...t)=>e.clone({...r,checks:[...r.checks??[],...t.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),e.clone=(t,n)=>jr(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>Gx(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Xx(e,t,n),e.parseAsync=async(t,n)=>Qx(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Jx(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>eS(e,t,n),e.decode=(t,n)=>tS(e,t,n),e.encodeAsync=async(t,n)=>rS(e,t,n),e.decodeAsync=async(t,n)=>nS(e,t,n),e.safeEncode=(t,n)=>oS(e,t,n),e.safeDecode=(t,n)=>iS(e,t,n),e.safeEncodeAsync=async(t,n)=>aS(e,t,n),e.safeDecodeAsync=async(t,n)=>sS(e,t,n),e.refine=(t,n)=>e.check(rC(t,n)),e.superRefine=t=>e.check(nC(t)),e.overwrite=t=>e.check(Eo(t)),e.optional=()=>vp(e),e.nullable=()=>yp(e),e.nullish=()=>vp(yp(e)),e.nonoptional=t=>KS(e,t),e.array=()=>AS(e),e.or=t=>$S([e,t]),e.and=t=>LS(e,t),e.transform=t=>wp(e,YS(t)),e.default=t=>WS(e,t),e.prefault=t=>qS(e,t),e.catch=t=>QS(e,t),e.pipe=t=>wp(e,t),e.readonly=()=>eC(e),e.describe=t=>{const n=e.clone();return la.add(n,{description:t}),n},Object.defineProperty(e,"description",{get(){return la.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return la.get(e);const n=e.clone();return la.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),up=Y("_ZodString",(e,r)=>{Qs.init(e,r),it.init(e,r);const t=e._zod.bag;e.format=t.format??null,e.minLength=t.minimum??null,e.maxLength=t.maximum??null,e.regex=(...n)=>e.check(Ex(...n)),e.includes=(...n)=>e.check(Tx(...n)),e.startsWith=(...n)=>e.check(Ox(...n)),e.endsWith=(...n)=>e.check(Mx(...n)),e.min=(...n)=>e.check(ua(...n)),e.max=(...n)=>e.check(sp(...n)),e.length=(...n)=>e.check(cp(...n)),e.nonempty=(...n)=>e.check(ua(1,...n)),e.lowercase=n=>e.check(kx(n)),e.uppercase=n=>e.check(Dx(n)),e.trim=()=>e.check(Ax()),e.normalize=(...n)=>e.check(Px(...n)),e.toLowerCase=()=>e.check(Ix()),e.toUpperCase=()=>e.check(Rx())}),cS=Y("ZodString",(e,r)=>{Qs.init(e,r),up.init(e,r),e.email=t=>e.check(K_(lS,t)),e.url=t=>e.check(ex(uS,t)),e.jwt=t=>e.check(mx(ES,t)),e.emoji=t=>e.check(tx(dS,t)),e.guid=t=>e.check(np(dp,t)),e.uuid=t=>e.check(G_(da,t)),e.uuidv4=t=>e.check(Q_(da,t)),e.uuidv6=t=>e.check(X_(da,t)),e.uuidv7=t=>e.check(J_(da,t)),e.nanoid=t=>e.check(rx(fS,t)),e.guid=t=>e.check(np(dp,t)),e.cuid=t=>e.check(nx(pS,t)),e.cuid2=t=>e.check(ox(hS,t)),e.ulid=t=>e.check(ix(mS,t)),e.base64=t=>e.check(fx(xS,t)),e.base64url=t=>e.check(px(SS,t)),e.xid=t=>e.check(ax(gS,t)),e.ksuid=t=>e.check(sx(vS,t)),e.ipv4=t=>e.check(cx(yS,t)),e.ipv6=t=>e.check(lx(bS,t)),e.cidrv4=t=>e.check(ux(wS,t)),e.cidrv6=t=>e.check(dx(_S,t)),e.e164=t=>e.check(hx(CS,t)),e.datetime=t=>e.check(Yx(t)),e.date=t=>e.check(Hx(t)),e.time=t=>e.check(Zx(t)),e.duration=t=>e.check(Kx(t))});function rr(e){return q_(cS,e)}const Ge=Y("ZodStringFormat",(e,r)=>{Ze.init(e,r),up.init(e,r)}),lS=Y("ZodEmail",(e,r)=>{r_.init(e,r),Ge.init(e,r)}),dp=Y("ZodGUID",(e,r)=>{e_.init(e,r),Ge.init(e,r)}),da=Y("ZodUUID",(e,r)=>{t_.init(e,r),Ge.init(e,r)}),uS=Y("ZodURL",(e,r)=>{n_.init(e,r),Ge.init(e,r)}),dS=Y("ZodEmoji",(e,r)=>{o_.init(e,r),Ge.init(e,r)}),fS=Y("ZodNanoID",(e,r)=>{i_.init(e,r),Ge.init(e,r)}),pS=Y("ZodCUID",(e,r)=>{a_.init(e,r),Ge.init(e,r)}),hS=Y("ZodCUID2",(e,r)=>{s_.init(e,r),Ge.init(e,r)}),mS=Y("ZodULID",(e,r)=>{c_.init(e,r),Ge.init(e,r)}),gS=Y("ZodXID",(e,r)=>{l_.init(e,r),Ge.init(e,r)}),vS=Y("ZodKSUID",(e,r)=>{u_.init(e,r),Ge.init(e,r)}),yS=Y("ZodIPv4",(e,r)=>{m_.init(e,r),Ge.init(e,r)}),bS=Y("ZodIPv6",(e,r)=>{g_.init(e,r),Ge.init(e,r)}),wS=Y("ZodCIDRv4",(e,r)=>{v_.init(e,r),Ge.init(e,r)}),_S=Y("ZodCIDRv6",(e,r)=>{y_.init(e,r),Ge.init(e,r)}),xS=Y("ZodBase64",(e,r)=>{b_.init(e,r),Ge.init(e,r)}),SS=Y("ZodBase64URL",(e,r)=>{__.init(e,r),Ge.init(e,r)}),CS=Y("ZodE164",(e,r)=>{x_.init(e,r),Ge.init(e,r)}),ES=Y("ZodJWT",(e,r)=>{C_.init(e,r),Ge.init(e,r)}),fp=Y("ZodNumber",(e,r)=>{Wf.init(e,r),it.init(e,r),e.gt=(n,o)=>e.check(ip(n,o)),e.gte=(n,o)=>e.check(ec(n,o)),e.min=(n,o)=>e.check(ec(n,o)),e.lt=(n,o)=>e.check(op(n,o)),e.lte=(n,o)=>e.check(Js(n,o)),e.max=(n,o)=>e.check(Js(n,o)),e.int=n=>e.check(hp(n)),e.safe=n=>e.check(hp(n)),e.positive=n=>e.check(ip(0,n)),e.nonnegative=n=>e.check(ec(0,n)),e.negative=n=>e.check(op(0,n)),e.nonpositive=n=>e.check(Js(0,n)),e.multipleOf=(n,o)=>e.check(ap(n,o)),e.step=(n,o)=>e.check(ap(n,o)),e.finite=()=>e;const t=e._zod.bag;e.minValue=Math.max(t.minimum??Number.NEGATIVE_INFINITY,t.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(t.maximum??Number.POSITIVE_INFINITY,t.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(t.format??"").includes("int")||Number.isSafeInteger(t.multipleOf??.5),e.isFinite=!0,e.format=t.format??null});function pp(e){return wx(fp,e)}const kS=Y("ZodNumberFormat",(e,r)=>{E_.init(e,r),fp.init(e,r)});function hp(e){return _x(kS,e)}const DS=Y("ZodBoolean",(e,r)=>{k_.init(e,r),it.init(e,r)});function tc(e){return xx(DS,e)}const TS=Y("ZodUnknown",(e,r)=>{D_.init(e,r),it.init(e,r)});function mp(){return Sx(TS)}const OS=Y("ZodNever",(e,r)=>{T_.init(e,r),it.init(e,r)});function MS(e){return Cx(OS,e)}const PS=Y("ZodArray",(e,r)=>{O_.init(e,r),it.init(e,r),e.element=r.element,e.min=(t,n)=>e.check(ua(t,n)),e.nonempty=t=>e.check(ua(1,t)),e.max=(t,n)=>e.check(sp(t,n)),e.length=(t,n)=>e.check(cp(t,n)),e.unwrap=()=>e.element});function AS(e,r){return Nx(PS,e,r)}const IS=Y("ZodObject",(e,r)=>{P_.init(e,r),it.init(e,r),Ye(e,"shape",()=>r.shape),e.keyof=()=>zS(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:mp()}),e.loose=()=>e.clone({...e._zod.def,catchall:mp()}),e.strict=()=>e.clone({...e._zod.def,catchall:MS()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>q2(e,t),e.safeExtend=t=>K2(e,t),e.merge=t=>G2(e,t),e.pick=t=>W2(e,t),e.omit=t=>Z2(e,t),e.partial=(...t)=>Q2(gp,e,t[0]),e.required=(...t)=>X2(bp,e,t[0])});function RS(e,r){const t={type:"object",get shape(){return $r(this,"shape",e?V2(e):{}),this.shape},...me(r)};return new IS(t)}const NS=Y("ZodUnion",(e,r)=>{A_.init(e,r),it.init(e,r),e.options=r.options});function $S(e,r){return new NS({type:"union",options:e,...me(r)})}const jS=Y("ZodIntersection",(e,r)=>{I_.init(e,r),it.init(e,r)});function LS(e,r){return new jS({type:"intersection",left:e,right:r})}const rc=Y("ZodEnum",(e,r)=>{R_.init(e,r),it.init(e,r),e.enum=r.entries,e.options=Object.values(r.entries);const t=new Set(Object.keys(r.entries));e.extract=(n,o)=>{const i={};for(const a of n)if(t.has(a))i[a]=r.entries[a];else throw new Error(`Key ${a} not found in enum`);return new rc({...r,checks:[],...me(o),entries:i})},e.exclude=(n,o)=>{const i={...r.entries};for(const a of n)if(t.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new rc({...r,checks:[],...me(o),entries:i})}});function zS(e,r){const t=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new rc({type:"enum",entries:t,...me(r)})}const BS=Y("ZodLiteral",(e,r)=>{N_.init(e,r),it.init(e,r),e.values=new Set(r.values),Object.defineProperty(e,"value",{get(){if(r.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function VS(e,r){return new BS({type:"literal",values:Array.isArray(e)?e:[e],...me(r)})}const FS=Y("ZodTransform",(e,r)=>{$_.init(e,r),it.init(e,r),e._zod.parse=(t,n)=>{if(n.direction==="backward")throw new Mf(e.constructor.name);t.addIssue=i=>{if(typeof i=="string")t.issues.push(Co(i,t.value,r));else{const a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=t.value),a.inst??(a.inst=e),t.issues.push(Co(a))}};const o=r.transform(t.value,t);return o instanceof Promise?o.then(i=>(t.value=i,t)):(t.value=o,t)}});function YS(e){return new FS({type:"transform",transform:e})}const gp=Y("ZodOptional",(e,r)=>{j_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType});function vp(e){return new gp({type:"optional",innerType:e})}const US=Y("ZodNullable",(e,r)=>{L_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType});function yp(e){return new US({type:"nullable",innerType:e})}const HS=Y("ZodDefault",(e,r)=>{z_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function WS(e,r){return new HS({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():Nf(r)}})}const ZS=Y("ZodPrefault",(e,r)=>{B_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType});function qS(e,r){return new ZS({type:"prefault",innerType:e,get defaultValue(){return typeof r=="function"?r():Nf(r)}})}const bp=Y("ZodNonOptional",(e,r)=>{V_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType});function KS(e,r){return new bp({type:"nonoptional",innerType:e,...me(r)})}const GS=Y("ZodCatch",(e,r)=>{F_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function QS(e,r){return new GS({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}const XS=Y("ZodPipe",(e,r)=>{Y_.init(e,r),it.init(e,r),e.in=r.in,e.out=r.out});function wp(e,r){return new XS({type:"pipe",in:e,out:r})}const JS=Y("ZodReadonly",(e,r)=>{U_.init(e,r),it.init(e,r),e.unwrap=()=>e._zod.def.innerType});function eC(e){return new JS({type:"readonly",innerType:e})}const tC=Y("ZodCustom",(e,r)=>{H_.init(e,r),it.init(e,r)});function rC(e,r={}){return $x(tC,e,r)}function nC(e){return jx(e)}const _p=/^([01][0-9]|2[0-3]):[0-5][0-9]$/,xp=(e,r)=>{if(!e||!r)return null;const t=e.split("-");if(t.length!==3)return null;const n=parseInt(t[0],10),o=parseInt(t[1],10)-1,i=parseInt(t[2],10),a=r.split(":");if(a.length!==2)return null;const s=parseInt(a[0],10),c=parseInt(a[1],10),l=new Date(n,o,i,s,c);return isNaN(l.getTime())||!w.isValid(l)?null:l},oC=RS({titulo:rr().min(1,"El campo Título es requerido."),fechaInicio:rr().min(1,"El campo fecha inicio es requerido."),horaInicio:rr().min(1,"La hora de inicio es requerida.").regex(_p,{message:"Formato inválido"}),horaFin:rr().min(1,"La hora fin es requerida.").regex(_p,{message:"Formato inválido"}),todoElDia:tc(),fechaFin:rr().optional(),showEndDate:tc().optional(),horaInicio2:rr().optional(),TodoElDia2:tc().optional(),client:rr().optional().nullable(),repetir:rr().optional(),link:rr().url("Debe ser una URL válida ejemplo https://www.google.com.").or(VS("")).optional(),descripcion:rr().optional(),color:rr().optional(),solID:pp().optional().nullable(),disID:pp().optional().nullable()}).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 r=xp(e.fechaInicio,e.horaInicio),t=xp(e.fechaFin,e.horaFin);return!r||!t||!w.isValid(r)||!w.isValid(t)?!0:!(w.isBefore(t,r)&&!w.isSameDay(t,r)||w.isSameDay(r,t)&&w.isBefore(t,r))},{message:"",path:["horaFin"]}),Sp=e=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},j.createElement("path",{fill:"#333",d:"M12 24C5.38 24 0 18.608 0 12S5.38 0 12 0s12 5.38 12 12-5.38 12-12 12"}),j.createElement("path",{fill:"#fff",d:"M16.703 7.275c.52.52.541 1.345.046 1.84l-2.874 2.874 2.874 2.873c.495.496.475 1.32-.046 1.841-.52.52-1.344.54-1.84.045l-2.873-2.873-2.874 2.873c-.496.496-1.32.475-1.84-.045-.521-.521-.541-1.345-.046-1.84l2.874-2.874L7.23 9.116c-.495-.496-.475-1.32.045-1.84.521-.521 1.345-.542 1.841-.046l2.874 2.873 2.873-2.873c.496-.496 1.32-.476 1.84.045"})),iC="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",aC=e=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},j.createElement("g",{clipPath:"url(#a)"},j.createElement("path",{fill:"#404756",d:"M21.24 5.72a2.98 2.98 0 0 0-2.97-2.96l-5.19-.06c-1.06-.03-2.12.41-2.87 1.17l-7.49 7.49c-.66.66-1.03 1.54-1.03 2.47s.36 1.81 1.03 2.47l4.97 4.97a3.5 3.5 0 0 0 2.47 1.02c.89 0 1.79-.34 2.47-1.02l7.49-7.49c.76-.76 1.18-1.81 1.17-2.88l-.06-5.19zm-4.2 4.43c-.44.44-1.02.66-1.6.66a2.256 2.256 0 1 1 0-4.51 2.256 2.256 0 0 1 1.6 3.85"})),j.createElement("defs",null,j.createElement("clipPath",{id:"a"},j.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),sC="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",cC=e=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},j.createElement("g",{fill:"#2571D6",clipPath:"url(#a)"},j.createElement("path",{d:"M13.085 7.331a1.096 1.096 0 1 0-2.192 0v9.316a1.096 1.096 0 0 0 2.192 0z"}),j.createElement("path",{d:"M16.647 10.893H7.33a1.096 1.096 0 1 0 0 2.192h9.316a1.096 1.096 0 0 0 0-2.192"}),j.createElement("path",{d:"M12 24C5.38 24 0 18.608 0 12S5.38 0 12 0s12 5.38 12 12-5.38 12-12 12m0-21.808c-5.414 0-9.808 4.394-9.808 9.808S6.586 21.808 12 21.808s9.808-4.394 9.808-9.808S17.403 2.192 12 2.192"})),j.createElement("defs",null,j.createElement("clipPath",{id:"a"},j.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))),lC="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",uC=e=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},j.createElement("path",{fill:"#2571D6",fillRule:"evenodd",d:"M17.333 11a6.34 6.34 0 0 1 6.334 6.333 6.34 6.34 0 0 1-6.334 6.334c-3.493 0-6.333-2.846-6.333-6.334A6.343 6.343 0 0 1 17.333 11m-.005 2.37c-.437 0-.79.338-.79.754v2.412h-2.414c-.416 0-.754.355-.754.792s.338.792.754.792h2.413v2.412c0 .416.354.754.791.754s.792-.338.792-.754V18.12h2.413c.416 0 .754-.355.754-.792s-.338-.792-.754-.792H18.12v-2.412c0-.416-.355-.754-.792-.754",clipRule:"evenodd"}),j.createElement("path",{fill:"#2571D6",d:"M11.12 12.297a7.97 7.97 0 0 0-1.787 5.036c0 1.763.571 3.392 1.537 4.714H3.044c-.84 0-1.523-.682-1.523-1.523 0-4.544 3.683-8.227 8.217-8.227zM10.995.139c2.925 0 5.3 2.376 5.3 5.3s-2.376 5.3-5.3 5.3v-.01a5.303 5.303 0 0 1-5.3-5.3 5.295 5.295 0 0 1 5.3-5.29"})),Cp=qt(h.jsx("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward"),nc=qt(h.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"),dC={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"},oc=["#dbe3fe","#fcebc7","#d9f1d2","#fdf5d1","#ebe3d7","#e1d6fb","#f7c7cc","#f9e7fb","#eaedf2","#d5d8dd"],In=(()=>{const e=[];for(let r=0;r<24;r++)for(let t=0;t<60;t+=15){const n=r.toString().padStart(2,"0"),o=t.toString().padStart(2,"0");e.push(`${n}:${o}`)}return e})(),ko=(e,r)=>{if(!e||!r)return null;const t=e.split("-");if(t.length!==3)return null;const n=parseInt(t[0],10),o=parseInt(t[1],10)-1,i=parseInt(t[2],10),a=r.split(":");if(a.length!==2)return null;const s=parseInt(a[0],10),c=parseInt(a[1],10),l=new Date(i,o,n,s,c);return isNaN(l.getTime())||!w.isValid(l)?null:l},fC=({isVisible:e,onClose:r,onSave:t,onDelete:n,selectedDate:o,initialEvent:i,userId:a,masNombreBD:s,disId:c})=>{const[l,u]=x.useState(!1),[d,f]=x.useState(!1),m=w.format(new Date,"yyyy-MM-dd"),[g,p]=x.useState(""),[y,S]=x.useState([]),[C,k]=x.useState(!1),E=Is(),[_,O]=x.useState([]),{control:N,handleSubmit:q,reset:Z,formState:{errors:L},watch:K,setValue:v}=j2({resolver:Vx(oC),defaultValues:{titulo:"",fechaInicio:w.format(new Date,"yyyy-MM-dd"),horaInicio:w.format(new Date,"HH:mm"),horaFin:w.format(w.addHours(new Date,1),"HH:mm"),todoElDia:!1,client:"",repetir:"No repetir",link:"",descripcion:"",color:oc[5],solID:null}}),I=K("fechaInicio"),A=K("fechaFin"),U=K("todoElDia");x.useEffect(()=>{if(g.trim()===""||!a||!c||!s){S([]);return}k(!0);const F=setTimeout(()=>{E.getClients(g,c,s,a).then(W=>{k(!1);const de=Array.from(new Map(W.map(P=>[P.nombreCliente,P])).values());if(de)S(de);else if(i?.client&&i.solID!==null){const P=[{solID:i.solID,nombreCliente:i.client}];S(P)}else S([])}).catch(W=>{console.error("Error al buscar clientes:",W),k(!1)})},500);return()=>clearTimeout(F)},[g,a,c,s]),x.useEffect(()=>{if(I&&A){const F=new Date(I),W=new Date(A);(F===W||F>W)&&v("fechaFin",I)}},[I,A,v]),x.useEffect(()=>{I&&v("fechaFin",I)},[I]),x.useEffect(()=>{v("showEndDate",l)},[l,v]),x.useEffect(()=>{if(i){const F=w.format(i.fechaInicio,"yyyy-MM-dd")===w.format(i.fechaFin,"yyyy-MM-dd");u(!F),v("titulo",i?.titulo),v("fechaInicio",w.format(i.fechaInicio,"yyyy-MM-dd")),v("fechaFin",w.format(i.fechaFin,"yyyy-MM-dd")),v("horaInicio",w.format(i.fechaInicio,"HH:mm")),v("horaFin",w.format(i.fechaFin,"HH:mm")),v("horaInicio2",w.format(i.fechaFin,"HH:mm")),v("descripcion",i.descripcion),v("link",i.link),v("repetir","false"),v("color",i.color),v("todoElDia",i.todoElDia),v("solID",i.solID),v("client",i.client),i.solID?f(!0):f(!1)}else{const F=o||new Date,W=new Date,de=new Date(F.getFullYear(),F.getMonth(),F.getDate(),W.getHours(),W.getMinutes()),P=w.addHours(de,1);Z({titulo:"",fechaInicio:w.format(de,"yyyy-MM-dd"),horaInicio:w.format(de,"HH:mm"),fechaFin:w.format(P,"yyyy-MM-dd"),horaFin:w.format(P,"HH:mm"),horaInicio2:w.format(P,"HH:mm"),todoElDia:!1,client:"",repetir:"No repetir",link:"",descripcion:"",color:oc[5],solID:null}),u(!1),f(!1)}},[i,e,o]);const H=q(F=>{t(F,i?.eventoID),r(),Z(),u(!1)},F=>{console.log("Errores de validación:",F)});x.useEffect(()=>{U&&(v("horaInicio","00:00"),v("horaFin","23:59"))},[U,v,K]);const ee=()=>{const F=K("fechaInicio");if(F){const W=new Date(`${F}T00:00:00`),de=w.addDays(W,1);v("fechaFin",w.format(de,"yyyy-MM-dd"))}u(!0)},re=K("fechaInicio"),se=K("horaInicio"),V=K("fechaFin"),G=K("horaFin"),[ge,ve]=x.useState(null),[he,J]=x.useState(null);x.useEffect(()=>{(ge===null||ge!==se)&&ve(se)},[se,ge]),x.useEffect(()=>{(he===null||he!==G)&&J(G??"")},[G,he]);const Q=K("todoElDia");x.useEffect(()=>{if(Q||!se||!G||!re||!V)return;const F=ko(re,se),W=ko(V,G);if(!F||!W||!w.isValid(F)||!w.isValid(W))return;const de=w.isSameDay(F,W),P=de&&(w.isAfter(F,W)||F.getTime()===W.getTime()),we=w.isBefore(W,F)&&!de;(P||we)&&(v("horaFin",""),J(""))},[se]);const ce=x.useMemo(()=>{if(!se||!re)return In;const F=ko(re,se),W=ko(V,"00:00");return!F||!W||!w.isValid(F)||!w.isValid(W)||w.isBefore(W,F)&&!w.isSameDay(W,F)?In:w.isSameDay(F,W)?In.filter(de=>{const P=ko(V,de);return P&&w.isAfter(P,F)}):(w.isAfter(W,F),In)},[se,re,V]),ue=x.useMemo(()=>In,[]);return h.jsx($.Modal,{open:e,onClose:r,children:h.jsxs($.Box,{sx:dC,children:[h.jsx($.IconButton,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:12},children:h.jsx(nc,{})}),h.jsx($.Typography,{variant:"h6",mb:2,children:i?"Editar evento":"Agregar evento"}),h.jsxs($.Grid,{container:!0,spacing:1,marginBottom:l?0:1,children:[h.jsx($.Grid,{size:{xs:12,md:12},children:h.jsx(er,{name:"titulo",control:N,render:({field:F})=>h.jsx($.TextField,{...F,label:"Título",fullWidth:!0,variant:"outlined",size:"small",error:!!L.titulo,helperText:L.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"}}})})}),h.jsx($.Grid,{size:{xs:12,md:12},children:h.jsx($.Divider,{})}),h.jsx($.Grid,{size:{xs:12,md:4},children:h.jsx(er,{name:"fechaInicio",control:N,render:({field:F})=>h.jsx($.TextField,{fullWidth:!0,...F,type:"date",placeholder:"Fecha de inicio",size:"small",InputLabelProps:{shrink:!0},error:!!L.fechaInicio,helperText:L.fechaInicio?.message})})}),l?h.jsxs(h.Fragment,{children:[h.jsx($.Grid,{size:{xs:1,md:3},sx:{display:{xs:"none",sm:"block"}}}),h.jsx($.Grid,{size:{xs:11,md:4},children:h.jsx(er,{name:"fechaFin",control:N,render:({field:F})=>h.jsx($.TextField,{...F,type:"date",placeholder:"Fecha de fin",fullWidth:!!l,size:"small",InputLabelProps:{shrink:!0},inputProps:{min:I||m},error:!!L.fechaFin,helperText:L.fechaFin?.message})})}),!i&&h.jsx($.Grid,{size:{xs:1,md:1},children:h.jsx($.IconButton,{onClick:()=>u(!1),sx:{fontSize:18},children:h.jsx(Sp,{})})})]}):h.jsx($.Grid,{size:{xs:12,md:7}})]}),l&&h.jsx(h.Fragment,{children:h.jsxs($.Grid,{container:!0,spacing:0,sx:{margin:0,padding:0,width:"100%"},children:[h.jsx($.Grid,{size:{xs:6,md:5}}),h.jsx($.Grid,{size:{xs:12,md:6},sx:{margin:0,padding:0,width:"100%",display:{xs:"none",sm:"block"}},children:h.jsx(Cp,{sx:{color:"#757575",margin:0,padding:0}})})]})}),h.jsxs($.Grid,{container:!0,spacing:1,marginBottom:1,marginTop:1,children:[h.jsx($.Grid,{size:{xs:12,md:4},children:h.jsx(er,{name:"horaInicio",control:N,render:({field:{onChange:F,value:W,...de}})=>h.jsx($.Autocomplete,{freeSolo:!0,options:ue,value:W||"",onChange:(P,we)=>F(we||""),onInputChange:(P,we)=>F(we),renderInput:P=>h.jsx($.TextField,{...P,...de,size:"small",error:!!L.horaInicio,helperText:L.horaInicio?.message,InputProps:{...P.InputProps,endAdornment:h.jsx($.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:h.jsx(rf,{})})}}),disabled:K("todoElDia")})})}),h.jsx($.Grid,{size:{xs:1,md:1},sx:{display:"flex",alignItems:L.horaInicio?"start":"center",marginTop:L.horaInicio?"5px":"0px"},children:!l&&h.jsx(Cp,{sx:{color:"#757575"}})}),l&&h.jsx($.Grid,{size:{xs:2,md:2}}),h.jsx($.Grid,{size:{xs:12,md:4},children:h.jsx(er,{name:"horaFin",control:N,render:({field:{onChange:F,value:W,...de}})=>h.jsx($.Autocomplete,{freeSolo:!0,options:ce,value:W||"",onChange:(P,we)=>F(we||""),onInputChange:(P,we)=>F(we),renderInput:P=>h.jsx($.TextField,{...P,...de,size:"small",error:!!L.horaFin,helperText:L.horaFin?.message,InputProps:{...P.InputProps,endAdornment:h.jsx($.InputAdornment,{position:"end",sx:{position:"absolute",right:"10px"},children:h.jsx(rf,{})})}}),disabled:K("todoElDia")})})}),h.jsx($.Grid,{size:{xs:12,md:3},hidden:l,children:h.jsx(er,{name:"todoElDia",control:N,render:({field:F})=>h.jsx($.FormControlLabel,{control:h.jsx($.Checkbox,{checked:F.value,onChange:W=>F.onChange(W.target.checked)}),label:h.jsx("label",{style:{fontSize:"0.7rem",fontWeight:"normal"},children:"Todo el día"}),sx:{whiteSpace:"nowrap"}})})}),h.jsx($.Grid,{size:{xs:12,md:12},children:!l&&h.jsx(h.Fragment,{children:h.jsxs($.Button,{onClick:ee,size:"small",sx:{textTransform:"none",fontSize:16},children:[h.jsx(cC,{})," Agregar fecha final"]})})}),h.jsx($.Grid,{size:{xs:12,md:12},children:h.jsx($.Divider,{})}),h.jsx($.Grid,{size:{xs:12,md:12},children:!d&&h.jsxs($.Button,{onClick:()=>f(!0),size:"small",sx:{textTransform:"none",fontSize:16},children:[h.jsx(uC,{})," Vincular cliente"]})}),d&&h.jsxs(h.Fragment,{children:[h.jsx($.Grid,{size:{xs:12,md:7},children:h.jsx(er,{name:"client",control:N,render:({field:F})=>h.jsx($.Autocomplete,{options:y,loading:C,getOptionLabel:W=>W.nombreCliente?.trim()||"",value:y.find(W=>W.nombreCliente===F.value)||(F.value&&typeof F.value=="string"?{solID:-1,nombreCliente:F.value}:null),noOptionsText:"",onInputChange:(W,de)=>{p(de)},onChange:(W,de)=>{if(F.onChange(de?de.nombreCliente:""),v("solID",de?de.solID:null),de&&de.nombreCliente){const P=y.filter(we=>we.nombreCliente===de.nombreCliente&&we.solID).map(we=>we.solID);O([...new Set(P)])}else O([])},renderInput:W=>h.jsx($.TextField,{...W,placeholder:"Buscar cliente...",size:"small",InputProps:{...W.InputProps,startAdornment:h.jsx("img",{src:sC,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"5px"}}),endAdornment:h.jsxs(h.Fragment,{children:[C?h.jsx($.CircularProgress,{color:"inherit",size:20}):null,W.InputProps.endAdornment]})}})})})}),h.jsx($.Grid,{size:{xs:11,md:4},children:h.jsx(er,{name:"solID",control:N,render:({field:F})=>h.jsx($.Autocomplete,{options:_,getOptionLabel:W=>W.toString(),value:F.value??null,onChange:(W,de)=>F.onChange(de),renderInput:W=>h.jsx($.TextField,{...W,label:"#Registro",variant:"outlined",size:"small",sx:{"& .MuiInputLabel-root":{backgroundColor:"transparent !important",padding:"0 !important"}}}),disabled:!y})})}),h.jsx($.Grid,{size:{xs:1,md:1},children:h.jsx($.IconButton,{onClick:()=>f(!1),sx:{fontSize:18},children:h.jsx(Sp,{})})})]}),h.jsx($.Grid,{size:{xs:12,md:12},children:h.jsx($.Divider,{})}),h.jsx($.Grid,{size:{xs:12,md:12},children:h.jsx(er,{name:"link",control:N,render:({field:F})=>h.jsx($.TextField,{...F,placeholder:" Agregar enlace de reunión",fullWidth:!0,variant:"outlined",size:"small",error:!!L.link,helperText:L.link?.message,InputProps:{startAdornment:h.jsx("img",{src:iC,width:20,style:{alignSelf:"flex-start",marginRight:"8px",marginTop:"8px"}})}})})}),h.jsx($.Grid,{size:{xs:12,md:12},children:h.jsx(er,{name:"descripcion",control:N,render:({field:F})=>h.jsx($.TextField,{...F,placeholder:" Agregar descripción aquí...",fullWidth:!0,multiline:!0,rows:3,inputProps:{maxLength:500},variant:"outlined",size:"small",InputProps:{startAdornment:h.jsx("img",{src:lC,width:20,style:{alignSelf:"flex-start",marginRight:"8px"}})}})})}),h.jsx($.Grid,{size:{xs:12,md:12},children:h.jsxs($.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexWrap:"wrap"},children:[h.jsx(aC,{}),oc.map(F=>h.jsx(er,{name:"color",control:N,render:({field:W})=>h.jsx($.IconButton,{onClick:()=>W.onChange(F),sx:{width:24,height:24,borderRadius:"50%",bgcolor:F,border:W.value===F?"2px solid":"none",borderColor:W.value===F?"primary.main":"transparent"}})},F))]})})]}),h.jsxs($.Box,{sx:{display:"flex",justifyContent:"flex-end",mt:3,gap:2},children:[i&&h.jsx($.Button,{onClick:n,variant:"outlined",color:"error",children:"Eliminar"}),h.jsx($.Button,{onClick:r,variant:"outlined",sx:{textTransform:"none"},children:"Cancelar"}),h.jsx($.Button,{onClick:H,variant:"contained",sx:{textTransform:"none"},children:"Guardar"})]})]})})},pC="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",hC={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:400,bgcolor:"background.paper",boxShadow:24,p:4,borderRadius:2,textAlign:"center"},mC=({isOpen:e,onClose:r,onConfirm:t,title:n,message:o})=>h.jsx($.Modal,{open:e,onClose:r,children:h.jsxs($.Box,{sx:hC,children:[h.jsx("img",{src:pC}),h.jsx($.Typography,{variant:"h6",component:"h2",sx:{mt:1},children:n}),h.jsx($.Typography,{sx:{mt:2},children:o}),h.jsxs($.Box,{sx:{mt:4,display:"flex",justifyContent:"center",gap:2},children:[h.jsx($.Button,{variant:"outlined",onClick:r,sx:{textTransform:"none"},children:"Regresar"}),h.jsxs($.Button,{variant:"contained",color:"error",onClick:t,sx:{textTransform:"none"},children:[h.jsx("span",{className:"icon-eliminar",children:" "})," Eliminar"]})]})]})}),gC={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:450,bgcolor:"background.paper",boxShadow:24,p:2,borderRadius:2},vC=({isOpen:e,onClose:r,events:t,date:n,onEventClick:o})=>{if(!n)return null;const i=a=>{o(a),r()};return h.jsx($.Modal,{open:e,onClose:r,children:h.jsxs($.Box,{sx:gC,children:[h.jsxs($.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1},children:[h.jsxs($.Typography,{sx:{fontSize:"20px"},component:"h2",children:["Eventos del"," ",n.toLocaleDateString("es-ES",{weekday:"long",day:"numeric",month:"long"})]}),h.jsx($.IconButton,{onClick:r,children:h.jsx(nc,{})})]}),h.jsx($.Divider,{}),h.jsx($.List,{children:t.map(a=>h.jsx($.ListItem,{disablePadding:!0,children:h.jsxs($.ListItemButton,{onClick:()=>i(a),sx:{py:.5},children:[h.jsx($.Box,{sx:{width:"15px",height:"15px",borderRadius:"50%",backgroundColor:a.color||"#ccc",mr:2,flexShrink:0,minWidth:"10px"}}),h.jsx($.ListItemText,{primary:a.titulo,secondary:`${w.format(a.fechaInicio,"HH:mm")} - ${w.format(a.fechaFin,"HH:mm")}`,sx:{my:0,"& .MuiListItemText-primary":{display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"},"& .MuiListItemText-secondary":{display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",fontSize:"12px"}}})]})},a.eventoID))})]})})},yC=qt(h.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"),bC=qt(h.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"),wC="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",_C="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",Ep=x.forwardRef(({id:e,message:r,variant:t},n)=>{const{closeSnackbar:o}=ya.useSnackbar(),i={success:{color:"#fff",icon:h.jsx("img",{width:25,src:_C,style:{borderRadius:"50%",backgroundColor:"#4caf50",color:"white",fontSize:"12px",padding:3}})},error:{color:"#f44336",icon:h.jsx(yC,{sx:{color:"#f44336"}})},info:{color:"#2196f3",icon:h.jsx(bC,{sx:{color:"#2196f3"}})},delete:{color:"#fff",icon:h.jsx("img",{src:wC,width:25,style:{borderRadius:"50%",backgroundColor:"#ffdfd4",color:"red",fontSize:"16px",padding:3}})}},a=i[t]||i.info;return h.jsx(ya.SnackbarContent,{ref:n,children:h.jsxs($.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 ${a.color}`},children:[h.jsx($.Box,{sx:{mr:1.5},children:a.icon}),h.jsx($.Typography,{variant:"body2",sx:{flexGrow:1},children:r}),h.jsx($.IconButton,{size:"small",onClick:()=>o(e),children:h.jsx(nc,{fontSize:"small"})})]})})}),xC=({userId:e,leads30Days:r,leads90Days:t,disId:n,masNombreBD:o})=>{const[i,a]=x.useState(new Date),[s,c]=x.useState([]),[l,u]=x.useState(!1),[d,f]=x.useState(null),[m,g]=x.useState(!1),[p,y]=x.useState(null),[S,C]=x.useState([]),{enqueueSnackbar:k}=ya.useSnackbar(),E=Is(),[_,O]=x.useState(!1),[N,q]=x.useState([]),[Z,L]=x.useState(null),K=(J,Q)=>{q(J),L(Q),O(!0)},v=x.useRef(null);x.useEffect(()=>{const J=async()=>{try{if(e){const Q=await E.getEventsByUser(e);c(Q)}}catch{console.log("No se pudieron cargar los eventos. Revisa la consola para más detalles.")}finally{console.log("Eventos han sido cargados")}};return J(),v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{console.log("Iniciando recarga programada de eventos (2 segundos después del inicio)..."),J()},4e3),()=>{v.current&&clearTimeout(v.current)}},[i,e]),x.useEffect(()=>{const J=new Date,Q=w.startOfDay(J),ce=w.endOfDay(w.addDays(Q,6)),ue={start:Q,end:ce},F=s.filter(W=>{const de={start:W.fechaInicio,end:W.fechaFin};return id(de,ue)}).sort((W,de)=>W.fechaInicio.getTime()-de.fechaInicio.getTime());C(F)},[s]);const I=async J=>{try{const Q=await E.getEventById(J.eventoID);f(Q),u(!0)}catch(Q){console.error(Q)}},A=()=>{u(!1),f(null)},U=async(J,Q)=>{let ce,ue;J.todoElDia?(ce=new Date(`${J.fechaInicio}T${J.horaInicio}`),ue=new Date(`${J.fechaInicio}T${J.horaFin}`)):(ce=new Date(`${J.fechaInicio}T${J.horaInicio}`),ue=J.fechaFin&&J.horaFin?new Date(`${J.fechaFin}T${J.horaFin}`):new Date(`${J.fechaInicio}T${J.horaFin}`));const F=w.format(ce,"yyyy-MM-dd HH:mm:ss.SSS"),W=w.format(ue,"yyyy-MM-dd HH:mm:ss.SSS");if(Q){const P={...J,eventoID:Q,fechaInicio:F,fechaFin:W,solID:J.solID??null,disID:n??null,client:J.client};try{const we=await E.updateEvent(P);var de=s.map(Qe=>Qe.eventoID===we.eventoID?we:Qe);c(de),k("El evento se ha actualizado correctamente.",{variant:"success"}),A()}catch{k("Error al eliactualizar Evento",{variant:"error"})}}else{const P={...J,fechaInicio:F,fechaFin:W,todoElDia:J.todoElDia,solID:J.solID??null,disID:n??null,client:J.client};try{const we=await E.createEvent(P,e);c(Qe=>[...Qe,we]),k("El evento se ha creado con éxito",{variant:"success"}),A()}catch{k("Error al guardar Evento",{variant:"error"})}}if(e){const P=await E.getEventsByUser(e);c(P)}},H=()=>{a(J=>new Date(J.getFullYear(),J.getMonth()-1,1))},ee=()=>{a(J=>new Date(J.getFullYear(),J.getMonth()+1,1))},re=()=>{g(!0)},se=()=>{y(new Date),u(!0)},V=()=>alert("Sincronizar con Google Calendar"),G=()=>alert("Sincronizar con Outlook Calendar"),ge=J=>{J&&a(J)},ve=J=>{y(J),u(!0),f(null)},he=async()=>{if(d)try{await E.deleteEvent(d.eventoID),c(s.filter(J=>J.eventoID!==d.eventoID)),k("El evento se ha eliminado de tu calendario",{content:(J,Q)=>h.jsx(Ep,{id:J,message:String(Q),variant:"delete"})})}catch{k("Error al eliminar Evento",{variant:"error"})}finally{A(),g(!1)}};return h.jsxs("div",{id:"Agenda",style:{height:"100%",width:"100%"},children:[h.jsx(N0,{header:h.jsx(tb,{currentDate:i,onPrevMonth:H,onNextMonth:ee,onAddEvent:se,onDateChange:ge}),sidebar:h.jsx(jb,{onEventClick:I,upcomingEvents:S,onSyncGoogle:V,onSyncOutlook:G,leads30Days:r,leads90Days:t}),mainContent:h.jsx(Wb,{onSeeMoreClick:K,currentDate:i,events:s,onDayClick:ve,onEventClick:I})}),h.jsx(fC,{isVisible:l,onClose:A,onSave:U,onDelete:re,selectedDate:p,initialEvent:d,userId:e,masNombreBD:o,disId:n}),h.jsx(mC,{isOpen:m,onClose:()=>g(!1),onConfirm:he,title:"Eliminar evento",message:"¿De verdad deseas eliminar este evento? Esta acción no se puede deshacer."}),h.jsx(vC,{isOpen:_,onClose:()=>O(!1),events:N,date:Z,onEventClick:I})]})},SC="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",CC="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 ic(e,r,t){return e.accessor?e.accessor(r,t):e.field?r?.[e.field]:r?.[e?.key||""]}function EC(e,r){const t=e??"",n=r??"";return t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():typeof t=="number"&&typeof n=="number"?t-n:typeof t=="boolean"&&typeof n=="boolean"?Number(t)-Number(n):String(t).localeCompare(String(n),void 0,{numeric:!0,sensitivity:"base"})}function ac(e,r,t=!0){return typeof e=="function"?e(r):e??t}function kC(e){return e.replace(/[^\d]/g,"")}function DC(e,r){return r}const kp=qt(h.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"}),"AttachFileOutlined"),TC=qt(h.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),OC=qt(h.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp"),MC=Et("MuiBox",["root"]),PC=ou(),sc=Sg({themeId:Xa,defaultTheme:PC,defaultClassName:MC.root,generateClassName:Ic.generate});process.env.NODE_ENV!=="production"&&(sc.propTypes={children:b.node,component:b.elementType,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object])});function Dp(e,r){if(e==null)return{};var t={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(r.indexOf(n)!==-1)continue;t[n]=e[n]}return t}function cc(e,r){return cc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},cc(e,r)}function Tp(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,cc(e,r)}const Op={disabled:!1};var AC=process.env.NODE_ENV!=="production"?b.oneOfType([b.number,b.shape({enter:b.number,exit:b.number,appear:b.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&b.oneOfType([b.string,b.shape({enter:b.string,exit:b.string,active:b.string}),b.shape({enter:b.string,enterDone:b.string,enterActive:b.string,exit:b.string,exitDone:b.string,exitActive:b.string})]);const fa=x.createContext(null);var IC=function(r){return r.scrollTop},Do="unmounted",rn="exited",nn="entering",Rn="entered",lc="exiting",Cr=(function(e){Tp(r,e);function r(n,o){var i;i=e.call(this,n,o)||this;var a=o,s=a&&!a.isMounting?n.enter:n.appear,c;return i.appearStatus=null,n.in?s?(c=rn,i.appearStatus=nn):c=Rn:n.unmountOnExit||n.mountOnEnter?c=Do:c=rn,i.state={status:c},i.nextCallback=null,i}r.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===Do?{status:rn}:null};var t=r.prototype;return t.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},t.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==nn&&a!==Rn&&(i=nn):(a===nn||a===Rn)&&(i=lc)}this.updateStatus(!1,i)},t.componentWillUnmount=function(){this.cancelNextCallback()},t.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},t.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===nn){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:ln.findDOMNode(this);a&&IC(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===rn&&this.setState({status:Do})},t.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,c=this.props.nodeRef?[s]:[ln.findDOMNode(this),s],l=c[0],u=c[1],d=this.getTimeouts(),f=s?d.appear:d.enter;if(!o&&!a||Op.disabled){this.safeSetState({status:Rn},function(){i.props.onEntered(l)});return}this.props.onEnter(l,u),this.safeSetState({status:nn},function(){i.props.onEntering(l,u),i.onTransitionEnd(f,function(){i.safeSetState({status:Rn},function(){i.props.onEntered(l,u)})})})},t.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:ln.findDOMNode(this);if(!i||Op.disabled){this.safeSetState({status:rn},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:lc},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:rn},function(){o.props.onExited(s)})})})},t.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},t.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},t.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},t.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:ln.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],l=c[0],u=c[1];this.props.addEndListener(l,u)}o!=null&&setTimeout(this.nextCallback,o)},t.render=function(){var o=this.state.status;if(o===Do)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=Dp(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x.createElement(fa.Provider,{value:null},typeof a=="function"?a(o,s):x.cloneElement(x.Children.only(a),s))},r})(x.Component);Cr.contextType=fa,Cr.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:b.shape({current:typeof Element>"u"?b.any:function(e,r,t,n,o,i){var a=e[r];return b.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,r,t,n,o,i)}}),children:b.oneOfType([b.func.isRequired,b.element.isRequired]).isRequired,in:b.bool,mountOnEnter:b.bool,unmountOnExit:b.bool,appear:b.bool,enter:b.bool,exit:b.bool,timeout:function(r){var t=AC;r.addEndListener||(t=t.isRequired);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return t.apply(void 0,[r].concat(o))},addEndListener:b.func,onEnter:b.func,onEntering:b.func,onEntered:b.func,onExit:b.func,onExiting:b.func,onExited:b.func}:{};function Nn(){}Cr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Nn,onEntering:Nn,onEntered:Nn,onExit:Nn,onExiting:Nn,onExited:Nn},Cr.UNMOUNTED=Do,Cr.EXITED=rn,Cr.ENTERING=nn,Cr.ENTERED=Rn,Cr.EXITING=lc;function RC(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uc(e,r){var t=function(i){return r&&x.isValidElement(i)?r(i):i},n=Object.create(null);return e&&x.Children.map(e,function(o){return o}).forEach(function(o){n[o.key]=t(o)}),n}function NC(e,r){e=e||{},r=r||{};function t(u){return u in r?r[u]:e[u]}var n=Object.create(null),o=[];for(var i in e)i in r?o.length&&(n[i]=o,o=[]):o.push(i);var a,s={};for(var c in r){if(n[c])for(a=0;a<n[c].length;a++){var l=n[c][a];s[n[c][a]]=t(l)}s[c]=t(c)}for(a=0;a<o.length;a++)s[o[a]]=t(o[a]);return s}function on(e,r,t){return t[r]!=null?t[r]:e.props[r]}function $C(e,r){return uc(e.children,function(t){return x.cloneElement(t,{onExited:r.bind(null,t),in:!0,appear:on(t,"appear",e),enter:on(t,"enter",e),exit:on(t,"exit",e)})})}function jC(e,r,t){var n=uc(e.children),o=NC(r,n);return Object.keys(o).forEach(function(i){var a=o[i];if(x.isValidElement(a)){var s=i in r,c=i in n,l=r[i],u=x.isValidElement(l)&&!l.props.in;c&&(!s||u)?o[i]=x.cloneElement(a,{onExited:t.bind(null,a),in:!0,exit:on(a,"exit",e),enter:on(a,"enter",e)}):!c&&s&&!u?o[i]=x.cloneElement(a,{in:!1}):c&&s&&x.isValidElement(l)&&(o[i]=x.cloneElement(a,{onExited:t.bind(null,a),in:l.props.in,exit:on(a,"exit",e),enter:on(a,"enter",e)}))}}),o}var LC=Object.values||function(e){return Object.keys(e).map(function(r){return e[r]})},zC={component:"div",childFactory:function(r){return r}},dc=(function(e){Tp(r,e);function r(n,o){var i;i=e.call(this,n,o)||this;var a=i.handleExited.bind(RC(i));return i.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},i}var t=r.prototype;return t.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},t.componentWillUnmount=function(){this.mounted=!1},r.getDerivedStateFromProps=function(o,i){var a=i.children,s=i.handleExited,c=i.firstRender;return{children:c?$C(o,s):jC(o,a,s),firstRender:!1}},t.handleExited=function(o,i){var a=uc(this.props.children);o.key in a||(o.props.onExited&&o.props.onExited(i),this.mounted&&this.setState(function(s){var c=Wo({},s.children);return delete c[o.key],{children:c}}))},t.render=function(){var o=this.props,i=o.component,a=o.childFactory,s=Dp(o,["component","childFactory"]),c=this.state.contextValue,l=LC(this.state.children).map(a);return delete s.appear,delete s.enter,delete s.exit,i===null?x.createElement(fa.Provider,{value:c},l):x.createElement(fa.Provider,{value:c},x.createElement(i,s,l))},r})(x.Component);dc.propTypes=process.env.NODE_ENV!=="production"?{component:b.any,children:b.node,appear:b.bool,enter:b.bool,exit:b.bool,childFactory:b.func}:{},dc.defaultProps=zC;const Mp={};function Pp(e,r){const t=j.useRef(Mp);return t.current===Mp&&(t.current=e(r)),t}const BC=[];function VC(e){j.useEffect(e,BC)}class fc{static create(){return new fc}currentId=null;start(r,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},r)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function Ap(){const e=Pp(fc.create).current;return VC(e.disposeEffect),e}function pa(e,r){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||r(...n)}}function FC(e){const{prototype:r={}}=e;return!!r.isReactComponent}function YC(e,r,t,n,o){const i=e[r],a=o||r;if(i==null||typeof window>"u")return null;let s;return typeof i=="function"&&!FC(i)&&(s="Did you accidentally provide a plain function component instead?"),s!==void 0?new Error(`Invalid ${n} \`${a}\` supplied to \`${t}\`. Expected an element type that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Ip=pa(b.elementType,YC);function Rp(e,r){const{timeout:t,easing:n,style:o={}}=e;return{duration:o.transitionDuration??(typeof t=="number"?t:t[r.mode]||0),easing:o.transitionTimingFunction??(typeof n=="object"?n[r.mode]:n),delay:o.transitionDelay}}function UC(e){return Ct("MuiCollapse",e)}Et("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const HC=e=>{const{orientation:r,classes:t}=e,n={root:["root",`${r}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${r}`],wrapperInner:["wrapperInner",`${r}`]};return Lt(n,UC,t)},WC=ut("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.root,r[t.orientation],t.state==="entered"&&r.entered,t.state==="exited"&&!t.in&&t.collapsedSize==="0px"&&r.hidden]}})(cr(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:r})=>r.state==="exited"&&!r.in&&r.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),ZC=ut("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),qC=ut("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),ha=j.forwardRef(function(r,t){const n=Rt({props:r,name:"MuiCollapse"}),{addEndListener:o,children:i,className:a,collapsedSize:s="0px",component:c,easing:l,in:u,onEnter:d,onEntered:f,onEntering:m,onExit:g,onExited:p,onExiting:y,orientation:S="vertical",style:C,timeout:k=Ql.standard,TransitionComponent:E=Cr,..._}=n,O={...n,orientation:S,collapsedSize:s},N=HC(O),q=au(),Z=Ap(),L=j.useRef(null),K=j.useRef(),v=typeof s=="number"?`${s}px`:s,I=S==="horizontal",A=I?"width":"height",U=j.useRef(null),H=Ja(t,U),ee=Q=>ce=>{if(Q){const ue=U.current;ce===void 0?Q(ue):Q(ue,ce)}},re=()=>L.current?L.current[I?"clientWidth":"clientHeight"]:0,se=ee((Q,ce)=>{L.current&&I&&(L.current.style.position="absolute"),Q.style[A]=v,d&&d(Q,ce)}),V=ee((Q,ce)=>{const ue=re();L.current&&I&&(L.current.style.position="");const{duration:F,easing:W}=Rp({style:C,timeout:k,easing:l},{mode:"enter"});if(k==="auto"){const de=q.transitions.getAutoHeightDuration(ue);Q.style.transitionDuration=`${de}ms`,K.current=de}else Q.style.transitionDuration=typeof F=="string"?F:`${F}ms`;Q.style[A]=`${ue}px`,Q.style.transitionTimingFunction=W,m&&m(Q,ce)}),G=ee((Q,ce)=>{Q.style[A]="auto",f&&f(Q,ce)}),ge=ee(Q=>{Q.style[A]=`${re()}px`,g&&g(Q)}),ve=ee(p),he=ee(Q=>{const ce=re(),{duration:ue,easing:F}=Rp({style:C,timeout:k,easing:l},{mode:"exit"});if(k==="auto"){const W=q.transitions.getAutoHeightDuration(ce);Q.style.transitionDuration=`${W}ms`,K.current=W}else Q.style.transitionDuration=typeof ue=="string"?ue:`${ue}ms`;Q.style[A]=v,Q.style.transitionTimingFunction=F,y&&y(Q)}),J=Q=>{k==="auto"&&Z.start(K.current||0,Q),o&&o(U.current,Q)};return h.jsx(E,{in:u,onEnter:se,onEntered:G,onEntering:V,onExit:ge,onExited:ve,onExiting:he,addEndListener:J,nodeRef:U,timeout:k==="auto"?null:k,..._,children:(Q,{ownerState:ce,...ue})=>h.jsx(WC,{as:c,className:_e(N.root,a,{entered:N.entered,exited:!u&&v==="0px"&&N.hidden}[Q]),style:{[I?"minWidth":"minHeight"]:v,...C},ref:H,ownerState:{...O,state:Q},...ue,children:h.jsx(ZC,{ownerState:{...O,state:Q},className:N.wrapper,ref:L,children:h.jsx(qC,{ownerState:{...O,state:Q},className:N.wrapperInner,children:i})})})})});process.env.NODE_ENV!=="production"&&(ha.propTypes={addEndListener:b.func,children:b.node,classes:b.object,className:b.string,collapsedSize:b.oneOfType([b.number,b.string]),component:Ip,easing:b.oneOfType([b.shape({enter:b.string,exit:b.string}),b.string]),in:b.bool,onEnter:b.func,onEntered:b.func,onEntering:b.func,onExit:b.func,onExited:b.func,onExiting:b.func,orientation:b.oneOf(["horizontal","vertical"]),style:b.object,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),timeout:b.oneOfType([b.oneOf(["auto"]),b.number,b.shape({appear:b.number,enter:b.number,exit:b.number})])}),ha&&(ha.muiSupportAuto=!0);function KC(e){return typeof e.main=="string"}function GC(e,r=[]){if(!KC(e))return!1;for(const t of r)if(!e.hasOwnProperty(t)||typeof e[t]!="string")return!1;return!0}function pc(e=[]){return([,r])=>r&&GC(r,e)}const QC=b.oneOfType([b.func,b.object]);function Np(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
|
|
189
189
|
`))}return!1}class ma{static create(){return new ma}static use(){const r=Pp(ma.create).current,[t,n]=j.useState(!1);return r.shouldMount=t,r.setShouldMount=n,j.useEffect(r.mountEffect,[t]),r}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=JC(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...r){this.mount().then(()=>this.ref.current?.start(...r))}stop(...r){this.mount().then(()=>this.ref.current?.stop(...r))}pulsate(...r){this.mount().then(()=>this.ref.current?.pulsate(...r))}}function XC(){return ma.use()}function JC(){let e,r;const t=new Promise((n,o)=>{e=n,r=o});return t.resolve=e,t.reject=r,t}function $p(e){const{className:r,classes:t,pulsate:n=!1,rippleX:o,rippleY:i,rippleSize:a,in:s,onExited:c,timeout:l}=e,[u,d]=j.useState(!1),f=_e(r,t.ripple,t.rippleVisible,n&&t.ripplePulsate),m={width:a,height:a,top:-(a/2)+i,left:-(a/2)+o},g=_e(t.child,u&&t.childLeaving,n&&t.childPulsate);return!s&&!u&&d(!0),j.useEffect(()=>{if(!s&&c!=null){const p=setTimeout(c,l);return()=>{clearTimeout(p)}}},[c,s,l]),h.jsx("span",{className:f,style:m,children:h.jsx("span",{className:g})})}process.env.NODE_ENV!=="production"&&($p.propTypes={classes:b.object.isRequired,className:b.string,in:b.bool,onExited:b.func,pulsate:b.bool,rippleSize:b.number,rippleX:b.number,rippleY:b.number,timeout:b.number.isRequired});const Ht=Et("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),hc=550,eE=80,tE=Gn`
|
|
190
190
|
0% {
|
|
191
191
|
transform: scale(0);
|