componentes-exagono 0.2.11 → 0.2.13
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 +216 -213
- package/dist/index.umd.js +13 -13
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -113,7 +113,7 @@ function ug() {
|
|
|
113
113
|
function G(E) {
|
|
114
114
|
return E.displayName || "Context";
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function z(E) {
|
|
117
117
|
if (E == null)
|
|
118
118
|
return null;
|
|
119
119
|
if (typeof E.tag == "number" && x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof E == "function")
|
|
@@ -146,11 +146,11 @@ function ug() {
|
|
|
146
146
|
return W(E, E.render, "ForwardRef");
|
|
147
147
|
case f:
|
|
148
148
|
var Re = E.displayName || null;
|
|
149
|
-
return Re !== null ? Re :
|
|
149
|
+
return Re !== null ? Re : z(E.type) || "Memo";
|
|
150
150
|
case h: {
|
|
151
151
|
var Ze = E, st = Ze._payload, Le = Ze._init;
|
|
152
152
|
try {
|
|
153
|
-
return
|
|
153
|
+
return z(Le(st));
|
|
154
154
|
} catch {
|
|
155
155
|
return null;
|
|
156
156
|
}
|
|
@@ -402,7 +402,7 @@ function ug() {
|
|
|
402
402
|
ref: !0,
|
|
403
403
|
__self: !0,
|
|
404
404
|
__source: !0
|
|
405
|
-
}, T,
|
|
405
|
+
}, T, L;
|
|
406
406
|
function te(E) {
|
|
407
407
|
if (Pe.call(E, "ref")) {
|
|
408
408
|
var re = Object.getOwnPropertyDescriptor(E, "ref").get;
|
|
@@ -436,7 +436,7 @@ function ug() {
|
|
|
436
436
|
function De(E, re) {
|
|
437
437
|
{
|
|
438
438
|
var we = function() {
|
|
439
|
-
|
|
439
|
+
L || (L = !0, x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", re));
|
|
440
440
|
};
|
|
441
441
|
we.isReactWarning = !0, Object.defineProperty(E, "ref", {
|
|
442
442
|
get: we,
|
|
@@ -507,7 +507,7 @@ function ug() {
|
|
|
507
507
|
function vn() {
|
|
508
508
|
{
|
|
509
509
|
if (zt.current) {
|
|
510
|
-
var E =
|
|
510
|
+
var E = z(zt.current.type);
|
|
511
511
|
if (E)
|
|
512
512
|
return `
|
|
513
513
|
|
|
@@ -542,7 +542,7 @@ Check the top-level render call using <` + we + ">.");
|
|
|
542
542
|
return;
|
|
543
543
|
Fn[we] = !0;
|
|
544
544
|
var Re = "";
|
|
545
|
-
E && E._owner && E._owner !== zt.current && (Re = " It was passed a child from " +
|
|
545
|
+
E && E._owner && E._owner !== zt.current && (Re = " It was passed a child from " + z(E._owner.type) + "."), Kt(E), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', we, Re), Kt(null);
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
548
|
function ai(E, re) {
|
|
@@ -579,11 +579,11 @@ Check the top-level render call using <` + we + ">.");
|
|
|
579
579
|
else
|
|
580
580
|
return;
|
|
581
581
|
if (we) {
|
|
582
|
-
var Re =
|
|
582
|
+
var Re = z(re);
|
|
583
583
|
C(we, E.props, "prop", Re, E);
|
|
584
584
|
} else if (re.PropTypes !== void 0 && !_r) {
|
|
585
585
|
_r = !0;
|
|
586
|
-
var Ze =
|
|
586
|
+
var Ze = z(re);
|
|
587
587
|
x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", Ze || "Unknown");
|
|
588
588
|
}
|
|
589
589
|
typeof re.getDefaultProps == "function" && !re.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
@@ -611,7 +611,7 @@ Check the top-level render call using <` + we + ">.");
|
|
|
611
611
|
var Ht = xr();
|
|
612
612
|
Ht ? je += Ht : je += vn();
|
|
613
613
|
var M;
|
|
614
|
-
E === null ? M = "null" : $(E) ? M = "array" : E !== void 0 && E.$$typeof === t ? (M = "<" + (
|
|
614
|
+
E === null ? M = "null" : $(E) ? M = "array" : E !== void 0 && E.$$typeof === t ? (M = "<" + (z(E.type) || "Unknown") + " />", je = " Did you accidentally export a JSX literal instead of a component?") : M = typeof E, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", M, je);
|
|
615
615
|
}
|
|
616
616
|
var K = Ue(E, re, we, Ze, st);
|
|
617
617
|
if (K == null)
|
|
@@ -630,7 +630,7 @@ Check the top-level render call using <` + we + ">.");
|
|
|
630
630
|
ai(xe, E);
|
|
631
631
|
}
|
|
632
632
|
if (Pe.call(re, "key")) {
|
|
633
|
-
var ht =
|
|
633
|
+
var ht = z(E), Ve = Object.keys(re).filter(function(en) {
|
|
634
634
|
return en !== "key";
|
|
635
635
|
}), fr = Ve.length > 0 ? "{key: someKey, " + Ve.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
636
636
|
if (!Fo[ht + fr]) {
|
|
@@ -847,7 +847,7 @@ function Cg() {
|
|
|
847
847
|
}
|
|
848
848
|
}
|
|
849
849
|
}
|
|
850
|
-
var y = c, B = l, S = a, k = i, R = t, D = d, W = n, G = m,
|
|
850
|
+
var y = c, B = l, S = a, k = i, R = t, D = d, W = n, G = m, z = g, Y = r, de = s, H = o, N = f, ie = !1;
|
|
851
851
|
function le(O) {
|
|
852
852
|
return ie || (ie = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), j(O) || _(O) === c;
|
|
853
853
|
}
|
|
@@ -887,7 +887,7 @@ function Cg() {
|
|
|
887
887
|
function Ae(O) {
|
|
888
888
|
return _(O) === f;
|
|
889
889
|
}
|
|
890
|
-
Je.AsyncMode = y, Je.ConcurrentMode = B, Je.ContextConsumer = S, Je.ContextProvider = k, Je.Element = R, Je.ForwardRef = D, Je.Fragment = W, Je.Lazy = G, Je.Memo =
|
|
890
|
+
Je.AsyncMode = y, Je.ConcurrentMode = B, Je.ContextConsumer = S, Je.ContextProvider = k, Je.Element = R, Je.ForwardRef = D, Je.Fragment = W, Je.Lazy = G, Je.Memo = z, Je.Portal = Y, Je.Profiler = de, Je.StrictMode = H, Je.Suspense = N, Je.isAsyncMode = le, Je.isConcurrentMode = j, Je.isContextConsumer = J, Je.isContextProvider = ke, Je.isElement = ee, Je.isForwardRef = he, Je.isFragment = fe, Je.isLazy = ce, Je.isMemo = ye, Je.isPortal = _e, Je.isProfiler = pe, Je.isStrictMode = ge, Je.isSuspense = Ae, Je.isValidElementType = w, Je.typeOf = _;
|
|
891
891
|
})()), Je;
|
|
892
892
|
}
|
|
893
893
|
var Nu;
|
|
@@ -1048,7 +1048,7 @@ function Dg() {
|
|
|
1048
1048
|
oneOf: S,
|
|
1049
1049
|
oneOfType: R,
|
|
1050
1050
|
shape: G,
|
|
1051
|
-
exact:
|
|
1051
|
+
exact: z
|
|
1052
1052
|
};
|
|
1053
1053
|
function m(j, J) {
|
|
1054
1054
|
return j === J ? j !== 0 || 1 / j === 1 / J : j !== j && J !== J;
|
|
@@ -1231,7 +1231,7 @@ function Dg() {
|
|
|
1231
1231
|
}
|
|
1232
1232
|
return v(J);
|
|
1233
1233
|
}
|
|
1234
|
-
function
|
|
1234
|
+
function z(j) {
|
|
1235
1235
|
function J(ke, ee, he, fe, ce) {
|
|
1236
1236
|
var ye = ke[ee], _e = H(ye);
|
|
1237
1237
|
if (_e !== "object")
|
|
@@ -2692,7 +2692,7 @@ function Yv() {
|
|
|
2692
2692
|
}
|
|
2693
2693
|
}
|
|
2694
2694
|
}
|
|
2695
|
-
var y = c, B = l, S = a, k = i, R = t, D = d, W = n, G = m,
|
|
2695
|
+
var y = c, B = l, S = a, k = i, R = t, D = d, W = n, G = m, z = g, Y = r, de = s, H = o, N = f, ie = !1;
|
|
2696
2696
|
function le(O) {
|
|
2697
2697
|
return ie || (ie = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), j(O) || _(O) === c;
|
|
2698
2698
|
}
|
|
@@ -2732,7 +2732,7 @@ function Yv() {
|
|
|
2732
2732
|
function Ae(O) {
|
|
2733
2733
|
return _(O) === f;
|
|
2734
2734
|
}
|
|
2735
|
-
tt.AsyncMode = y, tt.ConcurrentMode = B, tt.ContextConsumer = S, tt.ContextProvider = k, tt.Element = R, tt.ForwardRef = D, tt.Fragment = W, tt.Lazy = G, tt.Memo =
|
|
2735
|
+
tt.AsyncMode = y, tt.ConcurrentMode = B, tt.ContextConsumer = S, tt.ContextProvider = k, tt.Element = R, tt.ForwardRef = D, tt.Fragment = W, tt.Lazy = G, tt.Memo = z, tt.Portal = Y, tt.Profiler = de, tt.StrictMode = H, tt.Suspense = N, tt.isAsyncMode = le, tt.isConcurrentMode = j, tt.isContextConsumer = J, tt.isContextProvider = ke, tt.isElement = ee, tt.isForwardRef = he, tt.isFragment = fe, tt.isLazy = ce, tt.isMemo = ye, tt.isPortal = _e, tt.isProfiler = pe, tt.isStrictMode = ge, tt.isSuspense = Ae, tt.isValidElementType = w, tt.typeOf = _;
|
|
2736
2736
|
})()), tt;
|
|
2737
2737
|
}
|
|
2738
2738
|
var sd;
|
|
@@ -4282,9 +4282,9 @@ function C2() {
|
|
|
4282
4282
|
var D = h(R);
|
|
4283
4283
|
if (D && D.has(k)) return D.get(k);
|
|
4284
4284
|
var W = { __proto__: null }, G = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
4285
|
-
for (var
|
|
4286
|
-
var Y = G ? Object.getOwnPropertyDescriptor(k,
|
|
4287
|
-
Y && (Y.get || Y.set) ? Object.defineProperty(W,
|
|
4285
|
+
for (var z in k) if (z !== "default" && Object.prototype.hasOwnProperty.call(k, z)) {
|
|
4286
|
+
var Y = G ? Object.getOwnPropertyDescriptor(k, z) : null;
|
|
4287
|
+
Y && (Y.get || Y.set) ? Object.defineProperty(W, z, Y) : W[z] = k[z];
|
|
4288
4288
|
}
|
|
4289
4289
|
return W.default = k, D && D.set(k, W), W;
|
|
4290
4290
|
}
|
|
@@ -4318,18 +4318,18 @@ function C2() {
|
|
|
4318
4318
|
let {
|
|
4319
4319
|
ownerState: W
|
|
4320
4320
|
} = R, G = (0, r.default)(R, l);
|
|
4321
|
-
const
|
|
4321
|
+
const z = typeof k == "function" ? k((0, t.default)({
|
|
4322
4322
|
ownerState: W
|
|
4323
4323
|
}, G)) : k;
|
|
4324
|
-
if (Array.isArray(
|
|
4325
|
-
return
|
|
4324
|
+
if (Array.isArray(z))
|
|
4325
|
+
return z.flatMap((Y) => B(Y, (0, t.default)({
|
|
4326
4326
|
ownerState: W
|
|
4327
4327
|
}, G), D));
|
|
4328
|
-
if (
|
|
4328
|
+
if (z && typeof z == "object" && Array.isArray(z.variants)) {
|
|
4329
4329
|
const {
|
|
4330
4330
|
variants: Y = []
|
|
4331
|
-
} =
|
|
4332
|
-
let H = (0, r.default)(
|
|
4331
|
+
} = z;
|
|
4332
|
+
let H = (0, r.default)(z, d);
|
|
4333
4333
|
return Y.forEach((N) => {
|
|
4334
4334
|
let ie = !0;
|
|
4335
4335
|
if (typeof N.props == "function" ? ie = N.props((0, t.default)({
|
|
@@ -4345,7 +4345,7 @@ function C2() {
|
|
|
4345
4345
|
}
|
|
4346
4346
|
}), H;
|
|
4347
4347
|
}
|
|
4348
|
-
return D ? b((0, n.internal_serializeStyles)(
|
|
4348
|
+
return D ? b((0, n.internal_serializeStyles)(z), D) : z;
|
|
4349
4349
|
}
|
|
4350
4350
|
function S(k = {}) {
|
|
4351
4351
|
const {
|
|
@@ -4353,13 +4353,13 @@ function C2() {
|
|
|
4353
4353
|
defaultTheme: D = x,
|
|
4354
4354
|
rootShouldForwardProp: W = v,
|
|
4355
4355
|
slotShouldForwardProp: G = v
|
|
4356
|
-
} = k,
|
|
4356
|
+
} = k, z = (Y) => (0, c.default)((0, t.default)({}, Y, {
|
|
4357
4357
|
theme: _((0, t.default)({}, Y, {
|
|
4358
4358
|
defaultTheme: D,
|
|
4359
4359
|
themeId: R
|
|
4360
4360
|
}))
|
|
4361
4361
|
}));
|
|
4362
|
-
return
|
|
4362
|
+
return z.__mui_systemSx = !0, (Y, de = {}) => {
|
|
4363
4363
|
(0, n.internal_processStyles)(Y, (ge) => ge.filter((Ae) => !(Ae != null && Ae.__mui_systemSx)));
|
|
4364
4364
|
const {
|
|
4365
4365
|
name: H,
|
|
@@ -4417,7 +4417,7 @@ function C2() {
|
|
|
4417
4417
|
}, (0, t.default)({}, Pe, {
|
|
4418
4418
|
theme: pt
|
|
4419
4419
|
}), pt.modularCssLayers ? "theme" : void 0);
|
|
4420
|
-
}), he || Ye.push(
|
|
4420
|
+
}), he || Ye.push(z);
|
|
4421
4421
|
const Xe = Ye.length - Ae.length;
|
|
4422
4422
|
if (Array.isArray(ge) && Xe > 0) {
|
|
4423
4423
|
const Pe = new Array(Xe).fill("");
|
|
@@ -4533,9 +4533,9 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
4533
4533
|
S = i(S);
|
|
4534
4534
|
const {
|
|
4535
4535
|
values: k
|
|
4536
|
-
} = S, R = k[0], D = k[1] / 100, W = k[2] / 100, G = D * Math.min(W, 1 - W),
|
|
4536
|
+
} = S, R = k[0], D = k[1] / 100, W = k[2] / 100, G = D * Math.min(W, 1 - W), z = (H, N = (H + R / 30) % 12) => W - G * Math.max(Math.min(N - 3, 9 - N, 1), -1);
|
|
4537
4537
|
let Y = "rgb";
|
|
4538
|
-
const de = [Math.round(
|
|
4538
|
+
const de = [Math.round(z(0) * 255), Math.round(z(8) * 255), Math.round(z(4) * 255)];
|
|
4539
4539
|
return S.type === "hsla" && (Y += "a", de.push(k[3])), l({
|
|
4540
4540
|
type: Y,
|
|
4541
4541
|
values: de
|
|
@@ -4604,7 +4604,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
|
|
|
4604
4604
|
}
|
|
4605
4605
|
}
|
|
4606
4606
|
function B(S, k, R, D = 1) {
|
|
4607
|
-
const W = (de, H) => Math.round((de ** (1 / D) * (1 - R) + H ** (1 / D) * R) ** D), G = i(S),
|
|
4607
|
+
const W = (de, H) => Math.round((de ** (1 / D) * (1 - R) + H ** (1 / D) * R) ** D), G = i(S), z = i(k), Y = [W(G.values[0], z.values[0]), W(G.values[1], z.values[1]), W(G.values[2], z.values[2])];
|
|
4608
4608
|
return l({
|
|
4609
4609
|
type: "rgb",
|
|
4610
4610
|
values: Y
|
|
@@ -5804,7 +5804,7 @@ const s1 = (e) => ({
|
|
|
5804
5804
|
}, g = Wl(o), m = Vl(g), p = await i.getDimensions(l), v = g === "y", b = v ? "top" : "left", x = v ? "bottom" : "right", w = v ? "clientHeight" : "clientWidth", _ = s.reference[m] + s.reference[g] - h[g] - s.floating[m], y = h[g] - s.reference[g], B = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l));
|
|
5805
5805
|
let S = B ? B[w] : 0;
|
|
5806
5806
|
(!S || !await (i.isElement == null ? void 0 : i.isElement(B))) && (S = a.floating[w] || s.floating[m]);
|
|
5807
|
-
const k = _ / 2 - y / 2, R = S / 2 - p[m] / 2 - 1, D = ko(f[b], R), W = ko(f[x], R), G = D,
|
|
5807
|
+
const k = _ / 2 - y / 2, R = S / 2 - p[m] / 2 - 1, D = ko(f[b], R), W = ko(f[x], R), G = D, z = S - p[m] - W, Y = S / 2 - p[m] / 2 + k, de = Bb(G, Y, z), H = !c.arrow && Qs(o) != null && Y !== de && s.reference[m] / 2 - (Y < G ? D : W) - p[m] / 2 < 0, N = H ? Y < G ? Y - G : Y - z : 0;
|
|
5808
5808
|
return {
|
|
5809
5809
|
[g]: h[g] + N,
|
|
5810
5810
|
data: {
|
|
@@ -5871,8 +5871,8 @@ const s1 = (e) => ({
|
|
|
5871
5871
|
if (!H)
|
|
5872
5872
|
switch (g) {
|
|
5873
5873
|
case "bestFit": {
|
|
5874
|
-
var
|
|
5875
|
-
const N = (
|
|
5874
|
+
var z;
|
|
5875
|
+
const N = (z = D.filter((ie) => {
|
|
5876
5876
|
if (B) {
|
|
5877
5877
|
const le = Un(ie.placement);
|
|
5878
5878
|
return le === x || // Create a bias to the `y` side axis due to horizontal
|
|
@@ -5880,7 +5880,7 @@ const s1 = (e) => ({
|
|
|
5880
5880
|
le === "y";
|
|
5881
5881
|
}
|
|
5882
5882
|
return !0;
|
|
5883
|
-
}).map((ie) => [ie.placement, ie.overflows.filter((le) => le > 0).reduce((le, j) => le + j, 0)]).sort((ie, le) => ie[1] - le[1])[0]) == null ? void 0 :
|
|
5883
|
+
}).map((ie) => [ie.placement, ie.overflows.filter((le) => le > 0).reduce((le, j) => le + j, 0)]).sort((ie, le) => ie[1] - le[1])[0]) == null ? void 0 : z[0];
|
|
5884
5884
|
N && (H = N);
|
|
5885
5885
|
break;
|
|
5886
5886
|
}
|
|
@@ -6407,7 +6407,7 @@ function P1(e) {
|
|
|
6407
6407
|
ie !== B.current && (B.current = ie, p(ie));
|
|
6408
6408
|
}, []), w = Q.useCallback((ie) => {
|
|
6409
6409
|
ie !== S.current && (S.current = ie, b(ie));
|
|
6410
|
-
}, []), _ = s || m, y = i || v, B = Q.useRef(null), S = Q.useRef(null), k = Q.useRef(d), R = c != null, D = Ec(c), W = Ec(o), G = Ec(l),
|
|
6410
|
+
}, []), _ = s || m, y = i || v, B = Q.useRef(null), S = Q.useRef(null), k = Q.useRef(d), R = c != null, D = Ec(c), W = Ec(o), G = Ec(l), z = Q.useCallback(() => {
|
|
6411
6411
|
if (!B.current || !S.current)
|
|
6412
6412
|
return;
|
|
6413
6413
|
const ie = {
|
|
@@ -6441,10 +6441,10 @@ function P1(e) {
|
|
|
6441
6441
|
}), []), Fi(() => {
|
|
6442
6442
|
if (_ && (B.current = _), y && (S.current = y), _ && y) {
|
|
6443
6443
|
if (D.current)
|
|
6444
|
-
return D.current(_, y,
|
|
6445
|
-
|
|
6444
|
+
return D.current(_, y, z);
|
|
6445
|
+
z();
|
|
6446
6446
|
}
|
|
6447
|
-
}, [_, y,
|
|
6447
|
+
}, [_, y, z, D, R]);
|
|
6448
6448
|
const de = Q.useMemo(() => ({
|
|
6449
6449
|
reference: B,
|
|
6450
6450
|
floating: S,
|
|
@@ -6476,11 +6476,11 @@ function P1(e) {
|
|
|
6476
6476
|
}, [r, a, H.floating, d.x, d.y]);
|
|
6477
6477
|
return Q.useMemo(() => ({
|
|
6478
6478
|
...d,
|
|
6479
|
-
update:
|
|
6479
|
+
update: z,
|
|
6480
6480
|
refs: de,
|
|
6481
6481
|
elements: H,
|
|
6482
6482
|
floatingStyles: N
|
|
6483
|
-
}), [d,
|
|
6483
|
+
}), [d, z, de, H, N]);
|
|
6484
6484
|
}
|
|
6485
6485
|
const O1 = (e) => {
|
|
6486
6486
|
function t(r) {
|
|
@@ -6585,7 +6585,7 @@ const V1 = /* @__PURE__ */ Q.forwardRef(function(t, r) {
|
|
|
6585
6585
|
const [_, y] = n.split("-"), B = _ === "top" || _ === "bottom";
|
|
6586
6586
|
let S = f;
|
|
6587
6587
|
(B && i != null && i.x || !B && i != null && i.y) && (S = null);
|
|
6588
|
-
const k = d * 2, R = k / 2, D = a / 2 * (l / -8 + 1), W = c / 2 * l / 4, G = !!g,
|
|
6588
|
+
const k = d * 2, R = k / 2, D = a / 2 * (l / -8 + 1), W = c / 2 * l / 4, G = !!g, z = S && y === "end" ? "bottom" : "top";
|
|
6589
6589
|
let Y = S && y === "end" ? "right" : "left";
|
|
6590
6590
|
S && x && (Y = y === "end" ? "left" : "right");
|
|
6591
6591
|
const de = s?.x != null ? S || s.x : "", H = s?.y != null ? S || s.y : "", N = g || "M0,0" + (" H" + a) + (" L" + (a - D) + "," + (c - W)) + (" Q" + a / 2 + "," + c + " " + D + "," + (c - W)) + " Z", ie = {
|
|
@@ -6605,7 +6605,7 @@ const V1 = /* @__PURE__ */ Q.forwardRef(function(t, r) {
|
|
|
6605
6605
|
position: "absolute",
|
|
6606
6606
|
pointerEvents: "none",
|
|
6607
6607
|
[Y]: de,
|
|
6608
|
-
[
|
|
6608
|
+
[z]: H,
|
|
6609
6609
|
[_]: B || G ? "100%" : "calc(100% - " + k / 2 + "px)",
|
|
6610
6610
|
transform: [ie, m].filter((le) => !!le).join(" "),
|
|
6611
6611
|
...p
|
|
@@ -7700,25 +7700,25 @@ var C_ = (
|
|
|
7700
7700
|
var i, a = r.props, c = a.selected, l = a.preSelection, d = a.setPreSelection, f = a.minDate, h = a.maxDate, g = a.showFourColumnMonthYearPicker, m = a.showTwoColumnMonthYearPicker;
|
|
7701
7701
|
if (l) {
|
|
7702
7702
|
var p = ef(g, m), v = r.getVerticalOffset(p), b = (i = Ic[p]) === null || i === void 0 ? void 0 : i.grid, x = function(S, k, R) {
|
|
7703
|
-
var D, W, G = k,
|
|
7703
|
+
var D, W, G = k, z = R;
|
|
7704
7704
|
switch (S) {
|
|
7705
7705
|
case be.ArrowRight:
|
|
7706
|
-
G = An(k, wi),
|
|
7706
|
+
G = An(k, wi), z = R === 11 ? 0 : R + wi;
|
|
7707
7707
|
break;
|
|
7708
7708
|
case be.ArrowLeft:
|
|
7709
|
-
G = Yn(k, wi),
|
|
7709
|
+
G = Yn(k, wi), z = R === 0 ? 11 : R - wi;
|
|
7710
7710
|
break;
|
|
7711
7711
|
case be.ArrowUp:
|
|
7712
|
-
G = Yn(k, v),
|
|
7712
|
+
G = Yn(k, v), z = !((D = b?.[0]) === null || D === void 0) && D.includes(R) ? R + 12 - v : R - v;
|
|
7713
7713
|
break;
|
|
7714
7714
|
case be.ArrowDown:
|
|
7715
|
-
G = An(k, v),
|
|
7715
|
+
G = An(k, v), z = !((W = b?.[b.length - 1]) === null || W === void 0) && W.includes(R) ? R - 12 + v : R + v;
|
|
7716
7716
|
break;
|
|
7717
7717
|
}
|
|
7718
|
-
return { newCalculatedDate: G, newCalculatedMonth:
|
|
7718
|
+
return { newCalculatedDate: G, newCalculatedMonth: z };
|
|
7719
7719
|
}, w = function(S, k, R) {
|
|
7720
|
-
for (var D = 40, W = S, G = !1,
|
|
7721
|
-
if (
|
|
7720
|
+
for (var D = 40, W = S, G = !1, z = 0, Y = x(W, k, R), de = Y.newCalculatedDate, H = Y.newCalculatedMonth; !G; ) {
|
|
7721
|
+
if (z >= D) {
|
|
7722
7722
|
de = k, H = R;
|
|
7723
7723
|
break;
|
|
7724
7724
|
}
|
|
@@ -7737,7 +7737,7 @@ var C_ = (
|
|
|
7737
7737
|
de = N.newCalculatedDate, H = N.newCalculatedMonth;
|
|
7738
7738
|
} else
|
|
7739
7739
|
G = !0;
|
|
7740
|
-
|
|
7740
|
+
z++;
|
|
7741
7741
|
}
|
|
7742
7742
|
return { newCalculatedDate: de, newCalculatedMonth: H };
|
|
7743
7743
|
};
|
|
@@ -9110,8 +9110,8 @@ var Rc = "Date input not valid.", H_ = (
|
|
|
9110
9110
|
});
|
|
9111
9111
|
var h = n.props, g = h.selectsRange, m = h.startDate, p = h.endDate, v = (o = n.props.dateFormat) !== null && o !== void 0 ? o : t.defaultProps.dateFormat, b = (s = n.props.strictParsing) !== null && s !== void 0 ? s : t.defaultProps.strictParsing, x = f?.target instanceof HTMLInputElement ? f.target.value : "";
|
|
9112
9112
|
if (g) {
|
|
9113
|
-
var w = n.props.rangeSeparator, _ = w.trim(), y = x.split(v.includes(_) ? w : _, 2).map(function(
|
|
9114
|
-
return
|
|
9113
|
+
var w = n.props.rangeSeparator, _ = w.trim(), y = x.split(v.includes(_) ? w : _, 2).map(function(z) {
|
|
9114
|
+
return z.trim();
|
|
9115
9115
|
}), B = y[0], S = y[1], k = kc(B ?? "", v, n.props.locale, b), R = k ? kc(S ?? "", v, n.props.locale, b) : null, D = m?.getTime() !== k?.getTime(), W = p?.getTime() !== R?.getTime();
|
|
9116
9116
|
if (!D && !W || k && Er(k, n.props) || R && Er(R, n.props))
|
|
9117
9117
|
return;
|
|
@@ -9299,8 +9299,8 @@ var Rc = "Date input not valid.", H_ = (
|
|
|
9299
9299
|
return;
|
|
9300
9300
|
}
|
|
9301
9301
|
if (o.preventDefault(), n.setState({ lastPreSelectChange: Ac }), w && n.setSelected(D), n.setPreSelection(D), _) {
|
|
9302
|
-
var W = Jt(S), G = Jt(D),
|
|
9303
|
-
W !== G ||
|
|
9302
|
+
var W = Jt(S), G = Jt(D), z = Fe(S), Y = Fe(D);
|
|
9303
|
+
W !== G || z !== Y ? n.setState({ shouldFocusDayInline: !0 }) : n.setState({ shouldFocusDayInline: !1 });
|
|
9304
9304
|
}
|
|
9305
9305
|
}
|
|
9306
9306
|
}, n.onPopperKeyDown = function(o) {
|
|
@@ -14076,22 +14076,22 @@ function GC(e, ...t) {
|
|
|
14076
14076
|
);
|
|
14077
14077
|
return t.map(r);
|
|
14078
14078
|
}
|
|
14079
|
-
const XC = ({ invitation: e, onAccept: t
|
|
14080
|
-
const { mensaje:
|
|
14079
|
+
const XC = ({ invitation: e, onAccept: t }) => {
|
|
14080
|
+
const { mensaje: r, evento: n, notificacionID: o, tipo: s, iconoColor: i } = e;
|
|
14081
14081
|
console.log("invitation", e.leida);
|
|
14082
|
-
const
|
|
14082
|
+
const a = n?.fechaInicio ? new Date(n.fechaInicio) : /* @__PURE__ */ new Date();
|
|
14083
14083
|
return /* @__PURE__ */ u.jsxs(U, { sx: { p: 2, mb: 1, bgcolor: "white", width: "100%", border: "solid", borderColor: "#ccc", borderWidth: "0.1px" }, children: [
|
|
14084
|
-
/* @__PURE__ */ u.jsx(U, { sx: { display: "flex", alignItems: "flex-start", mb: 1 }, children: /* @__PURE__ */ u.jsx(Ce, { sx: { lineHeight: 1.3, color: "#333", fontSize: "14px" }, children:
|
|
14084
|
+
/* @__PURE__ */ u.jsx(U, { sx: { display: "flex", alignItems: "flex-start", mb: 1 }, children: /* @__PURE__ */ u.jsx(Ce, { sx: { lineHeight: 1.3, color: "#333", fontSize: "14px" }, children: r }) }),
|
|
14085
14085
|
/* @__PURE__ */ u.jsx(Rn, { sx: { my: 1.5, ml: 1 } }),
|
|
14086
14086
|
/* @__PURE__ */ u.jsxs(U, { sx: { ml: 1 }, children: [
|
|
14087
14087
|
/* @__PURE__ */ u.jsxs(sn, { container: !0, spacing: 1, sx: { mb: 0 }, children: [
|
|
14088
14088
|
/* @__PURE__ */ u.jsxs(sn, { item: !0, xs: 12, sx: { display: "flex", alignItems: "start" }, children: [
|
|
14089
14089
|
/* @__PURE__ */ u.jsx(BC, { sx: { fontSize: 18, color: "#555", mr: 1 } }),
|
|
14090
|
-
/* @__PURE__ */ u.jsx(Ce, { variant: "body2", color: "textSecondary", children: gt(
|
|
14090
|
+
/* @__PURE__ */ u.jsx(Ce, { variant: "body2", color: "textSecondary", children: gt(a, "EEEE, dd 'de' MMMM") })
|
|
14091
14091
|
] }),
|
|
14092
14092
|
/* @__PURE__ */ u.jsxs(sn, { item: !0, xs: 12, sx: { display: "flex", alignItems: "center" }, children: [
|
|
14093
14093
|
/* @__PURE__ */ u.jsx(WC, { sx: { fontSize: 18, color: "#555", mr: 1 } }),
|
|
14094
|
-
/* @__PURE__ */ u.jsx(Ce, { variant: "body2", color: "textSecondary", children: gt(
|
|
14094
|
+
/* @__PURE__ */ u.jsx(Ce, { variant: "body2", color: "textSecondary", children: gt(a, "h:mm a") })
|
|
14095
14095
|
] })
|
|
14096
14096
|
] }),
|
|
14097
14097
|
/* @__PURE__ */ u.jsx("br", {}),
|
|
@@ -14102,7 +14102,7 @@ const XC = ({ invitation: e, onAccept: t, onReject: r }) => {
|
|
|
14102
14102
|
variant: "outlined",
|
|
14103
14103
|
size: "small",
|
|
14104
14104
|
startIcon: /* @__PURE__ */ u.jsx(qC, {}),
|
|
14105
|
-
onClick: () => t?.(e.notificacionID),
|
|
14105
|
+
onClick: () => t?.(e.notificacionID, "CONFIRMADA"),
|
|
14106
14106
|
sx: {
|
|
14107
14107
|
flex: 1,
|
|
14108
14108
|
borderRadius: "8px",
|
|
@@ -14116,13 +14116,13 @@ const XC = ({ invitation: e, onAccept: t, onReject: r }) => {
|
|
|
14116
14116
|
children: "Asistiré"
|
|
14117
14117
|
}
|
|
14118
14118
|
),
|
|
14119
|
-
/* @__PURE__ */ u.
|
|
14119
|
+
/* @__PURE__ */ u.jsxs(
|
|
14120
14120
|
Pt,
|
|
14121
14121
|
{
|
|
14122
14122
|
variant: "outlined",
|
|
14123
14123
|
size: "small",
|
|
14124
14124
|
startIcon: /* @__PURE__ */ u.jsx(fn, {}),
|
|
14125
|
-
onClick: () =>
|
|
14125
|
+
onClick: () => t?.(e.notificacionID, "RECHAZADA"),
|
|
14126
14126
|
sx: {
|
|
14127
14127
|
flex: 1,
|
|
14128
14128
|
borderRadius: "8px",
|
|
@@ -14133,7 +14133,10 @@ const XC = ({ invitation: e, onAccept: t, onReject: r }) => {
|
|
|
14133
14133
|
py: 0.8,
|
|
14134
14134
|
"&:hover": { bgcolor: "rgba(211, 47, 47, 0.04)", borderColor: "#9a2121" }
|
|
14135
14135
|
},
|
|
14136
|
-
children:
|
|
14136
|
+
children: [
|
|
14137
|
+
" ",
|
|
14138
|
+
"Rechazar"
|
|
14139
|
+
]
|
|
14137
14140
|
}
|
|
14138
14141
|
)
|
|
14139
14142
|
] })
|
|
@@ -14227,7 +14230,7 @@ const XC = ({ invitation: e, onAccept: t, onReject: r }) => {
|
|
|
14227
14230
|
b("Error al sincronizar eventos con Outlook Calendar.", { variant: "error" });
|
|
14228
14231
|
} finally {
|
|
14229
14232
|
}
|
|
14230
|
-
}, [W, G] = ve("events"),
|
|
14233
|
+
}, [W, G] = ve("events"), z = (N) => {
|
|
14231
14234
|
G(N);
|
|
14232
14235
|
}, [Y, de] = ve(!0), H = () => {
|
|
14233
14236
|
de((N) => !N);
|
|
@@ -14259,8 +14262,8 @@ const XC = ({ invitation: e, onAccept: t, onReject: r }) => {
|
|
|
14259
14262
|
] }),
|
|
14260
14263
|
/* @__PURE__ */ u.jsxs("div", { className: Se.eventsSection, children: [
|
|
14261
14264
|
/* @__PURE__ */ u.jsxs("div", { className: Se.tabsContainer, children: [
|
|
14262
|
-
/* @__PURE__ */ u.jsx("button", { className: `${Se.tabButton} ${W === "events" ? Se.activeTab : ""}`, onClick: () =>
|
|
14263
|
-
/* @__PURE__ */ u.jsxs("button", { className: `${Se.tabButton} ${W === "alerts" ? Se.activeTab : ""}`, onClick: () =>
|
|
14265
|
+
/* @__PURE__ */ u.jsx("button", { className: `${Se.tabButton} ${W === "events" ? Se.activeTab : ""}`, onClick: () => z("events"), children: "Eventos" }),
|
|
14266
|
+
/* @__PURE__ */ u.jsxs("button", { className: `${Se.tabButton} ${W === "alerts" ? Se.activeTab : ""}`, onClick: () => z("alerts"), children: [
|
|
14264
14267
|
"Alertas",
|
|
14265
14268
|
g > 0 ? /* @__PURE__ */ u.jsx("span", { className: Se.alertBadge, children: g }) : /* @__PURE__ */ u.jsx("span", { className: Se.alertBadge, children: 0 })
|
|
14266
14269
|
] })
|
|
@@ -15174,8 +15177,8 @@ var lo = (e) => Ot(e) && !ma(e) ? e : {
|
|
|
15174
15177
|
return {};
|
|
15175
15178
|
const w = a ? a[0] : i, _ = (G) => {
|
|
15176
15179
|
o && w.reportValidity && (w.setCustomValidity(mr(G) ? "" : G || ""), w.reportValidity());
|
|
15177
|
-
}, y = {}, B = pu(i), S = si(i), k = B || S, R = (v || fu(i)) && At(i.value) && At(x) || pa(i) && i.value === "" || x === "" || Array.isArray(x) && !x.length, D = du.bind(null, p, n, y), W = (G,
|
|
15178
|
-
const N = G ?
|
|
15180
|
+
}, y = {}, B = pu(i), S = si(i), k = B || S, R = (v || fu(i)) && At(i.value) && At(x) || pa(i) && i.value === "" || x === "" || Array.isArray(x) && !x.length, D = du.bind(null, p, n, y), W = (G, z, Y, de = rn.maxLength, H = rn.minLength) => {
|
|
15181
|
+
const N = G ? z : Y;
|
|
15179
15182
|
y[p] = {
|
|
15180
15183
|
type: G ? de : H,
|
|
15181
15184
|
message: N,
|
|
@@ -15184,60 +15187,60 @@ var lo = (e) => Ot(e) && !ma(e) ? e : {
|
|
|
15184
15187
|
};
|
|
15185
15188
|
};
|
|
15186
15189
|
if (s ? !Array.isArray(x) || !x.length : c && (!k && (R || or(x)) || mr(x) && !x || S && !r0(a).isValid || B && !o0(a).isValid)) {
|
|
15187
|
-
const { value: G, message:
|
|
15190
|
+
const { value: G, message: z } = Wi(c) ? { value: !!c, message: c } : lo(c);
|
|
15188
15191
|
if (G && (y[p] = {
|
|
15189
15192
|
type: rn.required,
|
|
15190
|
-
message:
|
|
15193
|
+
message: z,
|
|
15191
15194
|
ref: w,
|
|
15192
|
-
...D(rn.required,
|
|
15195
|
+
...D(rn.required, z)
|
|
15193
15196
|
}, !n))
|
|
15194
|
-
return _(
|
|
15197
|
+
return _(z), y;
|
|
15195
15198
|
}
|
|
15196
15199
|
if (!R && (!or(f) || !or(h))) {
|
|
15197
|
-
let G,
|
|
15200
|
+
let G, z;
|
|
15198
15201
|
const Y = lo(h), de = lo(f);
|
|
15199
15202
|
if (!or(x) && !isNaN(x)) {
|
|
15200
15203
|
const H = i.valueAsNumber || x && +x;
|
|
15201
|
-
or(Y.value) || (G = H > Y.value), or(de.value) || (
|
|
15204
|
+
or(Y.value) || (G = H > Y.value), or(de.value) || (z = H < de.value);
|
|
15202
15205
|
} else {
|
|
15203
15206
|
const H = i.valueAsDate || new Date(x), N = (j) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + j), ie = i.type == "time", le = i.type == "week";
|
|
15204
|
-
qr(Y.value) && x && (G = ie ? N(x) > N(Y.value) : le ? x > Y.value : H > new Date(Y.value)), qr(de.value) && x && (
|
|
15207
|
+
qr(Y.value) && x && (G = ie ? N(x) > N(Y.value) : le ? x > Y.value : H > new Date(Y.value)), qr(de.value) && x && (z = ie ? N(x) < N(de.value) : le ? x < de.value : H < new Date(de.value));
|
|
15205
15208
|
}
|
|
15206
|
-
if ((G ||
|
|
15209
|
+
if ((G || z) && (W(!!G, Y.message, de.message, rn.max, rn.min), !n))
|
|
15207
15210
|
return _(y[p].message), y;
|
|
15208
15211
|
}
|
|
15209
15212
|
if ((l || d) && !R && (qr(x) || s && Array.isArray(x))) {
|
|
15210
|
-
const G = lo(l),
|
|
15211
|
-
if ((Y || de) && (W(Y, G.message,
|
|
15213
|
+
const G = lo(l), z = lo(d), Y = !or(G.value) && x.length > +G.value, de = !or(z.value) && x.length < +z.value;
|
|
15214
|
+
if ((Y || de) && (W(Y, G.message, z.message), !n))
|
|
15212
15215
|
return _(y[p].message), y;
|
|
15213
15216
|
}
|
|
15214
15217
|
if (g && !R && qr(x)) {
|
|
15215
|
-
const { value: G, message:
|
|
15218
|
+
const { value: G, message: z } = lo(g);
|
|
15216
15219
|
if (ma(G) && !x.match(G) && (y[p] = {
|
|
15217
15220
|
type: rn.pattern,
|
|
15218
|
-
message:
|
|
15221
|
+
message: z,
|
|
15219
15222
|
ref: i,
|
|
15220
|
-
...D(rn.pattern,
|
|
15223
|
+
...D(rn.pattern, z)
|
|
15221
15224
|
}, !n))
|
|
15222
|
-
return _(
|
|
15225
|
+
return _(z), y;
|
|
15223
15226
|
}
|
|
15224
15227
|
if (m) {
|
|
15225
15228
|
if (jr(m)) {
|
|
15226
|
-
const G = await m(x, r),
|
|
15227
|
-
if (
|
|
15228
|
-
...
|
|
15229
|
-
...D(rn.validate,
|
|
15229
|
+
const G = await m(x, r), z = Yf(G, w);
|
|
15230
|
+
if (z && (y[p] = {
|
|
15231
|
+
...z,
|
|
15232
|
+
...D(rn.validate, z.message)
|
|
15230
15233
|
}, !n))
|
|
15231
|
-
return _(
|
|
15234
|
+
return _(z.message), y;
|
|
15232
15235
|
} else if (Ot(m)) {
|
|
15233
15236
|
let G = {};
|
|
15234
|
-
for (const
|
|
15237
|
+
for (const z in m) {
|
|
15235
15238
|
if (!ir(G) && !n)
|
|
15236
15239
|
break;
|
|
15237
|
-
const Y = Yf(await m[
|
|
15240
|
+
const Y = Yf(await m[z](x, r), w, z);
|
|
15238
15241
|
Y && (G = {
|
|
15239
15242
|
...Y,
|
|
15240
|
-
...D(
|
|
15243
|
+
...D(z, Y.message)
|
|
15241
15244
|
}, _(Y.message), n && (y[p] = G));
|
|
15242
15245
|
}
|
|
15243
15246
|
if (!ir(G) && (y[p] = {
|
|
@@ -15426,7 +15429,7 @@ function ZE(e = {}) {
|
|
|
15426
15429
|
a.unMount = /* @__PURE__ */ new Set();
|
|
15427
15430
|
}, W = (C, A) => !t.disabled && (C && A && it(s, C, A), !nn(j(), o)), G = (C, A, $) => Xm(C, a, {
|
|
15428
15431
|
...i.mount ? s : At(A) ? o : qr(C) ? { [C]: A } : A
|
|
15429
|
-
}, $, A),
|
|
15432
|
+
}, $, A), z = (C) => iu(me(i.mount ? s : o, C, t.shouldUnregister ? me(o, C, []) : [])), Y = (C, A, $ = {}) => {
|
|
15430
15433
|
const ae = me(n, C);
|
|
15431
15434
|
let oe = A;
|
|
15432
15435
|
if (ae) {
|
|
@@ -15468,9 +15471,9 @@ function ZE(e = {}) {
|
|
|
15468
15471
|
}, ne = Uf(t.mode), Ee = Uf(t.reValidateMode);
|
|
15469
15472
|
if (oe) {
|
|
15470
15473
|
let V, T;
|
|
15471
|
-
const
|
|
15472
|
-
it(s, $,
|
|
15473
|
-
const se = y($,
|
|
15474
|
+
const L = A.type ? Bf(oe._f) : Zm(C), te = C.type === fa.BLUR || C.type === fa.FOCUS_OUT, Be = !BE(oe._f) && !t.resolver && !me(r.errors, $) && !oe._f.deps || WE(te, me(r.touchedFields, $), r.isSubmitted, Ee, ne), q = Wf($, a, te);
|
|
15475
|
+
it(s, $, L), te ? (!A || !A.readOnly) && (oe._f.onBlur && oe._f.onBlur(C), c && c(0)) : oe._f.onChange && oe._f.onChange(C);
|
|
15476
|
+
const se = y($, L, te), De = !ir(se) || q;
|
|
15474
15477
|
if (!te && h.state.next({
|
|
15475
15478
|
name: $,
|
|
15476
15479
|
type: C.type,
|
|
@@ -15479,12 +15482,12 @@ function ZE(e = {}) {
|
|
|
15479
15482
|
return (d.isValid || f.isValid) && (t.mode === "onBlur" ? te && p() : te || p()), De && h.state.next({ name: $, ...q ? {} : se });
|
|
15480
15483
|
if (!te && q && h.state.next({ ...r }), t.resolver) {
|
|
15481
15484
|
const { errors: ue } = await S([$]);
|
|
15482
|
-
if (P(
|
|
15485
|
+
if (P(L), ae) {
|
|
15483
15486
|
const Ue = Hf(r.errors, n, $), zt = Hf(ue, n, Ue.name || $);
|
|
15484
15487
|
V = zt.error, $ = zt.name, T = ir(ue);
|
|
15485
15488
|
}
|
|
15486
15489
|
} else
|
|
15487
|
-
v([$], !0), V = (await qf(oe, a.disabled, s, g, t.shouldUseNativeValidation))[$], v([$]), P(
|
|
15490
|
+
v([$], !0), V = (await qf(oe, a.disabled, s, g, t.shouldUseNativeValidation))[$], v([$]), P(L), ae && (V ? T = !1 : (d.isValid || f.isValid) && (T = await R(n, !0)));
|
|
15488
15491
|
ae && (oe._f.deps && le(oe._f.deps), B($, T, V, se));
|
|
15489
15492
|
}
|
|
15490
15493
|
}, ie = (C, A) => {
|
|
@@ -15734,7 +15737,7 @@ function ZE(e = {}) {
|
|
|
15734
15737
|
_setFieldArray: b,
|
|
15735
15738
|
_setDisabledField: _e,
|
|
15736
15739
|
_setErrors: w,
|
|
15737
|
-
_getFieldArray:
|
|
15740
|
+
_getFieldArray: z,
|
|
15738
15741
|
_reset: Xe,
|
|
15739
15742
|
_resetDefaultValues: () => jr(t.defaultValues) && t.defaultValues().then((C) => {
|
|
15740
15743
|
qe(C, t.resetOptions), h.state.next({
|
|
@@ -18842,7 +18845,7 @@ const QI = {
|
|
|
18842
18845
|
const a = parseInt(i[0], 10), c = parseInt(i[1], 10), l = new Date(s, o, n, a, c);
|
|
18843
18846
|
return isNaN(l.getTime()) || !Nr(l) ? null : l;
|
|
18844
18847
|
}, e5 = ({ isVisible: e, onClose: t, onSave: r, onDelete: n, selectedDate: o, initialEvent: s, userId: i, masNombreBD: a, disId: c }) => {
|
|
18845
|
-
const [l, d] = ve(!1), [f, h] = ve(!1), g = gt(/* @__PURE__ */ new Date(), "yyyy-MM-dd"), [m, p] = ve(""), [v, b] = ve([]), [x, w] = ve(!1), _ = Ym(), [y, B] = ve([]), [S, k] = ve(""), [R, D] = ve(Pp), [W, G] = ve(!1), [
|
|
18848
|
+
const [l, d] = ve(!1), [f, h] = ve(!1), g = gt(/* @__PURE__ */ new Date(), "yyyy-MM-dd"), [m, p] = ve(""), [v, b] = ve([]), [x, w] = ve(!1), _ = Ym(), [y, B] = ve([]), [S, k] = ve(""), [R, D] = ve(Pp), [W, G] = ve(!1), [z, Y] = ve(""), [de, H] = ve(!1), [N, ie] = ve([]), [le, j] = ve([]), J = XI(z, 300), ke = R.filter((q) => q.tieneConflicto).length, {
|
|
18846
18849
|
control: ee,
|
|
18847
18850
|
handleSubmit: he,
|
|
18848
18851
|
reset: fe,
|
|
@@ -19040,7 +19043,7 @@ const QI = {
|
|
|
19040
19043
|
D((se) => se.filter((De) => De.nombre !== q));
|
|
19041
19044
|
}, T = () => {
|
|
19042
19045
|
G(!1);
|
|
19043
|
-
},
|
|
19046
|
+
}, L = (q) => {
|
|
19044
19047
|
const ue = (q.usrNombre ?? "").split(" ").map((Ue) => Ue.charAt(0)).join("").toUpperCase().substring(0, 2);
|
|
19045
19048
|
return {
|
|
19046
19049
|
nombre: q.usrNombre ?? "",
|
|
@@ -19054,7 +19057,7 @@ const QI = {
|
|
|
19054
19057
|
};
|
|
19055
19058
|
vt(() => {
|
|
19056
19059
|
J.length > 2 && c ? (async () => {
|
|
19057
|
-
const De = (await _.getUsuariosInvitados(c, J)).map(
|
|
19060
|
+
const De = (await _.getUsuariosInvitados(c, J)).map(L).filter((ue) => ue.usrID !== i && !R.some((Ue) => Ue.correo === ue.correo));
|
|
19058
19061
|
j(De), console.log("sugerencias", De);
|
|
19059
19062
|
})() : j([]);
|
|
19060
19063
|
}, [J, R]);
|
|
@@ -19670,7 +19673,7 @@ const g5 = (e, t, r) => {
|
|
|
19670
19673
|
isOutlookEvent: !0
|
|
19671
19674
|
};
|
|
19672
19675
|
}, tA = ({ userId: e, leads30Days: t, leads90Days: r, disId: n, masNombreBD: o }) => {
|
|
19673
|
-
const [s, i] = ve(/* @__PURE__ */ new Date()), [a, c] = ve([]), [l, d] = ve(!1), [f, h] = ve(null), [g, m] = ve(!1), [p, v] = ve(null), [b, x] = ve([]), { enqueueSnackbar: w } = Tl(), _ = Ym(), y = eu(), B = tu(), [S, k] = ve(!1), [R, D] = ve([]), [W, G] = ve(null), { session:
|
|
19676
|
+
const [s, i] = ve(/* @__PURE__ */ new Date()), [a, c] = ve([]), [l, d] = ve(!1), [f, h] = ve(null), [g, m] = ve(!1), [p, v] = ve(null), [b, x] = ve([]), { enqueueSnackbar: w } = Tl(), _ = Ym(), y = eu(), B = tu(), [S, k] = ve(!1), [R, D] = ve([]), [W, G] = ve(null), { session: z, sessionoutlook: Y } = pm(), { googleEvents: de, setGoogleEvents: H, outlookEvents: N, setOutlookEvents: ie } = f5(), [le, j] = ve([]), [J, ke] = ve([]), [ee, he] = ve([]), [fe, ce] = ve(!1), [ye, _e] = ve([]), pe = (V, T) => {
|
|
19674
19677
|
D(V), G(T), k(!0);
|
|
19675
19678
|
}, ge = async () => {
|
|
19676
19679
|
if (e === void 0) return;
|
|
@@ -19678,7 +19681,7 @@ const g5 = (e, t, r) => {
|
|
|
19678
19681
|
console.log("userId", V), _e(V);
|
|
19679
19682
|
};
|
|
19680
19683
|
vt(() => {
|
|
19681
|
-
const T = Ao(/* @__PURE__ */ new Date()),
|
|
19684
|
+
const T = Ao(/* @__PURE__ */ new Date()), L = Hs(un(T, 6)), te = { start: T, end: L }, Be = a.filter((q) => {
|
|
19682
19685
|
const se = { start: q.fechaInicio, end: q.fechaFin };
|
|
19683
19686
|
return lm(se, te);
|
|
19684
19687
|
}).sort((q, se) => q.fechaInicio.getTime() - se.fechaInicio.getTime());
|
|
@@ -19687,11 +19690,11 @@ const g5 = (e, t, r) => {
|
|
|
19687
19690
|
const V = async () => {
|
|
19688
19691
|
try {
|
|
19689
19692
|
if (e) {
|
|
19690
|
-
const
|
|
19691
|
-
ge(), c(
|
|
19693
|
+
const L = await _.getEventsByUser(e);
|
|
19694
|
+
ge(), c(L);
|
|
19692
19695
|
}
|
|
19693
|
-
} catch (
|
|
19694
|
-
console.log("Error al cargar eventos locales:",
|
|
19696
|
+
} catch (L) {
|
|
19697
|
+
console.log("Error al cargar eventos locales:", L);
|
|
19695
19698
|
}
|
|
19696
19699
|
};
|
|
19697
19700
|
V();
|
|
@@ -19700,16 +19703,16 @@ const g5 = (e, t, r) => {
|
|
|
19700
19703
|
}, [e]), vt(() => {
|
|
19701
19704
|
if (!n || !e) return;
|
|
19702
19705
|
const V = [...a];
|
|
19703
|
-
if (de.length > 0 &&
|
|
19704
|
-
const T = de.map((
|
|
19706
|
+
if (de.length > 0 && z?.userEmail) {
|
|
19707
|
+
const T = de.map((L) => p5(L, n, e));
|
|
19705
19708
|
V.push(...T);
|
|
19706
19709
|
}
|
|
19707
19710
|
if (N.length > 0 && Y?.userEmail) {
|
|
19708
|
-
const T = N.map((
|
|
19711
|
+
const T = N.map((L) => g5(L, n, e));
|
|
19709
19712
|
V.push(...T);
|
|
19710
19713
|
}
|
|
19711
19714
|
j(V);
|
|
19712
|
-
}, [a, de, N, n, e,
|
|
19715
|
+
}, [a, de, N, n, e, z?.userEmail, Y?.userEmail]);
|
|
19713
19716
|
const Ae = async (V) => {
|
|
19714
19717
|
try {
|
|
19715
19718
|
if (V?.isGoogleEvent || V.isOutlookEvent)
|
|
@@ -19724,9 +19727,9 @@ const g5 = (e, t, r) => {
|
|
|
19724
19727
|
}, O = () => {
|
|
19725
19728
|
d(!1), h(null);
|
|
19726
19729
|
}, Ye = async (V, T) => {
|
|
19727
|
-
let
|
|
19728
|
-
V.todoElDia ? (
|
|
19729
|
-
const Be = gt(
|
|
19730
|
+
let L, te;
|
|
19731
|
+
V.todoElDia ? (L = /* @__PURE__ */ new Date(`${V.fechaInicio}T${V.horaInicio}`), te = /* @__PURE__ */ new Date(`${V.fechaInicio}T${V.horaFin}`)) : (L = /* @__PURE__ */ new Date(`${V.fechaInicio}T${V.horaInicio}`), te = V.fechaFin && V.horaFin ? /* @__PURE__ */ new Date(`${V.fechaFin}T${V.horaFin}`) : /* @__PURE__ */ new Date(`${V.fechaInicio}T${V.horaFin}`));
|
|
19732
|
+
const Be = gt(L, "yyyy-MM-dd HH:mm:ss.SSS"), q = gt(te, "yyyy-MM-dd HH:mm:ss.SSS");
|
|
19730
19733
|
if (T) {
|
|
19731
19734
|
const De = {
|
|
19732
19735
|
...V,
|
|
@@ -19786,10 +19789,10 @@ const g5 = (e, t, r) => {
|
|
|
19786
19789
|
const De = await _.getEventsByUser(e);
|
|
19787
19790
|
c(De);
|
|
19788
19791
|
}
|
|
19789
|
-
}, Xe = async (V) => {
|
|
19792
|
+
}, Xe = async (V, T) => {
|
|
19790
19793
|
try {
|
|
19791
19794
|
if (console.log("onAceppInvitacion", V), !e) return;
|
|
19792
|
-
await _.UpdateStatusEvento(V, e,
|
|
19795
|
+
await _.UpdateStatusEvento(V, e, T) && (await _.MarcarLeido(V, e), w("Invitación aceptada con éxito", { variant: "success" }));
|
|
19793
19796
|
} catch {
|
|
19794
19797
|
w("Error al procesar la invitación", { variant: "error" });
|
|
19795
19798
|
}
|
|
@@ -19817,13 +19820,13 @@ const g5 = (e, t, r) => {
|
|
|
19817
19820
|
O(), m(!1);
|
|
19818
19821
|
}
|
|
19819
19822
|
}, $ = async () => {
|
|
19820
|
-
if (!(!
|
|
19823
|
+
if (!(!z?.userEmail || !n)) {
|
|
19821
19824
|
ce(!0);
|
|
19822
19825
|
try {
|
|
19823
|
-
const T = (await y.getGoogleCalendars(
|
|
19826
|
+
const T = (await y.getGoogleCalendars(z.userEmail, n)).map((te) => ({ ...te, selected: !0 }));
|
|
19824
19827
|
ke(T);
|
|
19825
|
-
const
|
|
19826
|
-
ne(
|
|
19828
|
+
const L = T.map((te) => te.id);
|
|
19829
|
+
ne(L);
|
|
19827
19830
|
} catch (V) {
|
|
19828
19831
|
console.error("Error Google Cals:", V);
|
|
19829
19832
|
} finally {
|
|
@@ -19833,16 +19836,16 @@ const g5 = (e, t, r) => {
|
|
|
19833
19836
|
}, ae = async (V) => {
|
|
19834
19837
|
const T = J.map((te) => te.id === V ? { ...te, selected: !te.selected } : te);
|
|
19835
19838
|
ke(T);
|
|
19836
|
-
const
|
|
19837
|
-
ne(
|
|
19839
|
+
const L = T.filter((te) => te.selected).map((te) => te.id);
|
|
19840
|
+
ne(L);
|
|
19838
19841
|
}, oe = async () => {
|
|
19839
19842
|
if (!(!Y?.userEmail || !n)) {
|
|
19840
19843
|
ce(!0);
|
|
19841
19844
|
try {
|
|
19842
19845
|
const T = (await B.getOutlookCalendars(Y.userEmail, n)).map((te) => ({ ...te, selected: !0 }));
|
|
19843
19846
|
he(T);
|
|
19844
|
-
const
|
|
19845
|
-
Ee(
|
|
19847
|
+
const L = T.map((te) => te.id);
|
|
19848
|
+
Ee(L);
|
|
19846
19849
|
} catch (V) {
|
|
19847
19850
|
console.error("Error Outlook Cals:", V);
|
|
19848
19851
|
} finally {
|
|
@@ -19852,43 +19855,43 @@ const g5 = (e, t, r) => {
|
|
|
19852
19855
|
}, P = async (V) => {
|
|
19853
19856
|
const T = ee.map((te) => te.id === V ? { ...te, selected: !te.selected } : te);
|
|
19854
19857
|
he(T);
|
|
19855
|
-
const
|
|
19856
|
-
Ee(
|
|
19858
|
+
const L = T.filter((te) => te.selected).map((te) => te.id);
|
|
19859
|
+
Ee(L);
|
|
19857
19860
|
};
|
|
19858
19861
|
vt(() => {
|
|
19859
19862
|
$();
|
|
19860
|
-
}, [
|
|
19863
|
+
}, [z?.userEmail, n]), vt(() => {
|
|
19861
19864
|
oe();
|
|
19862
19865
|
}, [Y?.userEmail, n]);
|
|
19863
19866
|
const ne = async (V) => {
|
|
19864
|
-
if (!
|
|
19865
|
-
const T = V || J.filter((
|
|
19867
|
+
if (!z?.userEmail || !n) return;
|
|
19868
|
+
const T = V || J.filter((L) => L.selected).map((L) => L.id);
|
|
19866
19869
|
try {
|
|
19867
|
-
const
|
|
19870
|
+
const L = {
|
|
19868
19871
|
disID: n,
|
|
19869
19872
|
year: s.getFullYear(),
|
|
19870
19873
|
month: s.getMonth() + 1,
|
|
19871
|
-
usrMail:
|
|
19874
|
+
usrMail: z.userEmail,
|
|
19872
19875
|
calendarIds: T
|
|
19873
|
-
}, te = await y.getGoogleEventsByMonth(
|
|
19876
|
+
}, te = await y.getGoogleEventsByMonth(L);
|
|
19874
19877
|
H(te);
|
|
19875
|
-
} catch (
|
|
19876
|
-
console.error("Error al obtener eventos de Google:",
|
|
19878
|
+
} catch (L) {
|
|
19879
|
+
console.error("Error al obtener eventos de Google:", L);
|
|
19877
19880
|
}
|
|
19878
19881
|
}, Ee = async (V) => {
|
|
19879
19882
|
if (!Y?.userEmail || !n) return;
|
|
19880
|
-
const T = V || ee.filter((
|
|
19883
|
+
const T = V || ee.filter((L) => L.selected).map((L) => L.id);
|
|
19881
19884
|
try {
|
|
19882
|
-
const
|
|
19885
|
+
const L = {
|
|
19883
19886
|
disID: n,
|
|
19884
19887
|
year: s.getFullYear(),
|
|
19885
19888
|
month: s.getMonth() + 1,
|
|
19886
19889
|
usrMail: Y.userEmail,
|
|
19887
19890
|
calendarIds: T
|
|
19888
|
-
}, te = await B.getOutlookEventsByMonth(
|
|
19891
|
+
}, te = await B.getOutlookEventsByMonth(L);
|
|
19889
19892
|
ie(te);
|
|
19890
|
-
} catch (
|
|
19891
|
-
console.error("Error al obtener eventos de Outlook:",
|
|
19893
|
+
} catch (L) {
|
|
19894
|
+
console.error("Error al obtener eventos de Outlook:", L);
|
|
19892
19895
|
}
|
|
19893
19896
|
};
|
|
19894
19897
|
return n === void 0 || e === void 0 ? /* @__PURE__ */ u.jsx("div", { children: "Cargando configuración de usuario..." }) : /* @__PURE__ */ u.jsxs("div", { id: "Agenda", style: { height: "100%", width: "100%" }, children: [
|
|
@@ -20483,7 +20486,7 @@ function nR({
|
|
|
20483
20486
|
idAdminSistemas: y
|
|
20484
20487
|
}) {
|
|
20485
20488
|
if (!r) return null;
|
|
20486
|
-
const B = 3, [S, k] = ve(null), R = !!S, [D, W] = ve(!1), [G,
|
|
20489
|
+
const B = 3, [S, k] = ve(null), R = !!S, [D, W] = ve(!1), [G, z] = ve(null), [Y, de] = ve(c ?? []), [H, N] = ve(null), ie = at(() => [...l].sort((M, K) => new Date(K.FechaAsignacion).getTime() - new Date(M.FechaAsignacion).getTime()), [l]);
|
|
20487
20490
|
vt(() => {
|
|
20488
20491
|
c && c.length && de(c);
|
|
20489
20492
|
}, [c]);
|
|
@@ -20501,7 +20504,7 @@ function nR({
|
|
|
20501
20504
|
const M = qe.trim();
|
|
20502
20505
|
return M ? (i ?? []).filter((K) => Xe(K, M)) : i ?? [];
|
|
20503
20506
|
}, [i, qe]);
|
|
20504
|
-
const ot = Sl(), C = Cl(ot.breakpoints.down("md")), [A, $] = I.useState(""), [ae, oe] = I.useState(!0), [P, ne] = I.useState(!1), Ee = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), V = new Date(Date.now() - 720 * 3600 * 1e3).toISOString().slice(0, 10), [T,
|
|
20507
|
+
const ot = Sl(), C = Cl(ot.breakpoints.down("md")), [A, $] = I.useState(""), [ae, oe] = I.useState(!0), [P, ne] = I.useState(!1), Ee = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), V = new Date(Date.now() - 720 * 3600 * 1e3).toISOString().slice(0, 10), [T, L] = I.useState(V), [te, Be] = I.useState(Ee), [q, se] = I.useState(null), De = !!q, [ue, Ue] = I.useState("En Proceso"), [zt, mn] = ve("Todos"), [Kt, _r] = ve("Todos"), gn = ["Algo interesado", "Interesado", "Muy interesado", "Venta definitiva", "No sé"], vn = [
|
|
20505
20508
|
"Selección y presentación de vehículos",
|
|
20506
20509
|
"Prueba de Manejo",
|
|
20507
20510
|
"Valoración del Auto a cuenta y/o enganche",
|
|
@@ -20510,7 +20513,7 @@ function nR({
|
|
|
20510
20513
|
"Entrega de vehículo",
|
|
20511
20514
|
"Negociación y Cierre"
|
|
20512
20515
|
], xr = () => {
|
|
20513
|
-
$(""), oe(!1), ne(!1),
|
|
20516
|
+
$(""), oe(!1), ne(!1), L(V), Be(Ee), Ue("Todos"), mn("Todos"), _r("Todos");
|
|
20514
20517
|
}, Fn = I.useMemo(() => (A ?? "").trim() !== "" || ue !== "Todos" || zt !== "Todos" || ae || P || Kt !== "Todos", [A, ue, zt, ae, P, Kt]);
|
|
20515
20518
|
function no(M) {
|
|
20516
20519
|
if (!M) return "";
|
|
@@ -20810,10 +20813,10 @@ function nR({
|
|
|
20810
20813
|
});
|
|
20811
20814
|
if (!b) {
|
|
20812
20815
|
const sr = fr ?? `https://qa2.crm.netcar.com.mx/netcar/${ht}/${xe}`;
|
|
20813
|
-
|
|
20816
|
+
z(xe), N(sr), W(!0);
|
|
20814
20817
|
}
|
|
20815
20818
|
}, st = () => {
|
|
20816
|
-
w?.(r),
|
|
20819
|
+
w?.(r), z(null), N(null), W(!1);
|
|
20817
20820
|
}, Le = I.useRef(!1), je = I.useRef(null), Ht = I.useCallback(() => {
|
|
20818
20821
|
if (!Le.current) {
|
|
20819
20822
|
Le.current = !0;
|
|
@@ -21269,7 +21272,7 @@ function nR({
|
|
|
21269
21272
|
)
|
|
21270
21273
|
] }),
|
|
21271
21274
|
/* @__PURE__ */ u.jsxs(Ir, { direction: "row", spacing: 1, children: [
|
|
21272
|
-
/* @__PURE__ */ u.jsx(Xt, { size: "small", type: "date", label: "Desde", InputLabelProps: { shrink: !0 }, value: T, onChange: (M) =>
|
|
21275
|
+
/* @__PURE__ */ u.jsx(Xt, { size: "small", type: "date", label: "Desde", InputLabelProps: { shrink: !0 }, value: T, onChange: (M) => L(M.target.value), disabled: !ae, sx: { width: 170 } }),
|
|
21273
21276
|
/* @__PURE__ */ u.jsx(Xt, { size: "small", type: "date", label: "Hasta", InputLabelProps: { shrink: !0 }, value: te, onChange: (M) => Be(M.target.value), disabled: !ae, sx: { width: 170 } })
|
|
21274
21277
|
] })
|
|
21275
21278
|
]
|
|
@@ -21550,7 +21553,7 @@ function Wp(e, t, r) {
|
|
|
21550
21553
|
key: "acciones",
|
|
21551
21554
|
header: "",
|
|
21552
21555
|
cell: i.acciones ?? ((D) => {
|
|
21553
|
-
const W = Bc(d.whatsapp, D, !0), G = Bc(d.email, D, !0),
|
|
21556
|
+
const W = Bc(d.whatsapp, D, !0), G = Bc(d.email, D, !0), z = Bc(d.view, D, !0), Y = h.phone?.(D), de = h.email?.(D), H = (le) => {
|
|
21554
21557
|
if (le.stopPropagation(), f.onWhatsApp)
|
|
21555
21558
|
return f.onWhatsApp(D);
|
|
21556
21559
|
if (!Y) return;
|
|
@@ -21586,7 +21589,7 @@ function Wp(e, t, r) {
|
|
|
21586
21589
|
children: /* @__PURE__ */ u.jsx("img", { src: y5, alt: "Email" })
|
|
21587
21590
|
}
|
|
21588
21591
|
),
|
|
21589
|
-
|
|
21592
|
+
z && /* @__PURE__ */ u.jsx(
|
|
21590
21593
|
"button",
|
|
21591
21594
|
{
|
|
21592
21595
|
type: "button",
|
|
@@ -21649,7 +21652,7 @@ function rA(e) {
|
|
|
21649
21652
|
reloadInfo: R,
|
|
21650
21653
|
idAdminSistemas: D = !1
|
|
21651
21654
|
//Por defecto
|
|
21652
|
-
} = e, [W, G] = ve(o ?? null), [
|
|
21655
|
+
} = e, [W, G] = ve(o ?? null), [z, Y] = ve({
|
|
21653
21656
|
open: !1,
|
|
21654
21657
|
customer: null
|
|
21655
21658
|
}), [de, H] = ve([]), N = (ee) => {
|
|
@@ -21680,12 +21683,12 @@ function rA(e) {
|
|
|
21680
21683
|
};
|
|
21681
21684
|
}, [c]);
|
|
21682
21685
|
return vt(() => {
|
|
21683
|
-
if (!
|
|
21684
|
-
const ee = ke(
|
|
21686
|
+
if (!z.open || !z.customer) return;
|
|
21687
|
+
const ee = ke(z.customer);
|
|
21685
21688
|
if (!ee) return;
|
|
21686
21689
|
const he = (t ?? []).find((fe) => ke(fe) === ee);
|
|
21687
|
-
he && he !==
|
|
21688
|
-
}, [t,
|
|
21690
|
+
he && he !== z.customer && Y((fe) => ({ ...fe, customer: he }));
|
|
21691
|
+
}, [t, z.open, z.customer, ke]), vt(() => {
|
|
21689
21692
|
g && N(g);
|
|
21690
21693
|
}, [g]), /* @__PURE__ */ u.jsxs("div", { children: [
|
|
21691
21694
|
/* @__PURE__ */ u.jsx(
|
|
@@ -21744,12 +21747,12 @@ function rA(e) {
|
|
|
21744
21747
|
] }) })
|
|
21745
21748
|
}
|
|
21746
21749
|
),
|
|
21747
|
-
|
|
21750
|
+
z.open && /* @__PURE__ */ u.jsx(
|
|
21748
21751
|
nR,
|
|
21749
21752
|
{
|
|
21750
|
-
open:
|
|
21753
|
+
open: z.open,
|
|
21751
21754
|
onClose: le,
|
|
21752
|
-
customer:
|
|
21755
|
+
customer: z.customer,
|
|
21753
21756
|
fields: c?.dynamicFields,
|
|
21754
21757
|
header: c?.header,
|
|
21755
21758
|
normalTable: l,
|
|
@@ -22265,7 +22268,7 @@ function nA(e) {
|
|
|
22265
22268
|
), W = at(() => {
|
|
22266
22269
|
const P = /* @__PURE__ */ new Map();
|
|
22267
22270
|
return (l ?? []).forEach((ne, Ee) => P.set(D(ne), Ee)), P;
|
|
22268
|
-
}, [l, D]), G = Cn(/* @__PURE__ */ new Set()),
|
|
22271
|
+
}, [l, D]), G = Cn(/* @__PURE__ */ new Set()), z = at(() => {
|
|
22269
22272
|
const P = /* @__PURE__ */ new Map();
|
|
22270
22273
|
return (l ?? []).forEach(
|
|
22271
22274
|
(ne) => P.set(f ? f(ne) : ne?.IdAuto, ne)
|
|
@@ -22286,8 +22289,8 @@ function nA(e) {
|
|
|
22286
22289
|
if (!ee) return ee;
|
|
22287
22290
|
const P = G.current, ne = [...ee];
|
|
22288
22291
|
return ne.sort((Ee, V) => {
|
|
22289
|
-
const T = P.has(D(Ee)) ? 0 : 1,
|
|
22290
|
-
if (T !==
|
|
22292
|
+
const T = P.has(D(Ee)) ? 0 : 1, L = P.has(D(V)) ? 0 : 1;
|
|
22293
|
+
if (T !== L) return T - L;
|
|
22291
22294
|
const te = W.get(D(Ee)) ?? 0, Be = W.get(D(V)) ?? 0;
|
|
22292
22295
|
return te - Be;
|
|
22293
22296
|
}), ne;
|
|
@@ -22309,7 +22312,7 @@ function nA(e) {
|
|
|
22309
22312
|
scrollTop: () => {
|
|
22310
22313
|
}
|
|
22311
22314
|
}), qe = (P) => {
|
|
22312
|
-
const ne =
|
|
22315
|
+
const ne = z.get(P) ?? null;
|
|
22313
22316
|
R([P]), p?.({
|
|
22314
22317
|
items: ne
|
|
22315
22318
|
});
|
|
@@ -22796,26 +22799,26 @@ function oA({
|
|
|
22796
22799
|
return () => clearTimeout(te);
|
|
22797
22800
|
}
|
|
22798
22801
|
}, [p]);
|
|
22799
|
-
const [x, w] = ve(""), [_, y] = ve(!1), [B, S] = ve(!1), [k, R] = ve(!1), [D, W] = ve(""), [G,
|
|
22800
|
-
|
|
22802
|
+
const [x, w] = ve(""), [_, y] = ve(!1), [B, S] = ve(!1), [k, R] = ve(!1), [D, W] = ve(""), [G, z] = ve([]), Y = k ? G : r.selectedIds, de = () => {
|
|
22803
|
+
z([...r.selectedIds]), W(""), R(!0);
|
|
22801
22804
|
}, H = () => {
|
|
22802
|
-
R(!1),
|
|
22805
|
+
R(!1), z([]);
|
|
22803
22806
|
}, N = () => {
|
|
22804
22807
|
const T = new Set(
|
|
22805
22808
|
pt.map(
|
|
22806
22809
|
(te, Be) => String(Ar(te, Be, h.id))
|
|
22807
22810
|
)
|
|
22808
|
-
),
|
|
22809
|
-
n({ ...r, selectedIds:
|
|
22810
|
-
}, ie = (T,
|
|
22811
|
-
function le(T,
|
|
22812
|
-
const se =
|
|
22811
|
+
), L = G.filter((te) => T.has(String(te)));
|
|
22812
|
+
n({ ...r, selectedIds: L }), R(!1);
|
|
22813
|
+
}, ie = (T, L) => Sn(T ?? "") === Sn(L ?? "");
|
|
22814
|
+
function le(T, L, te, Be, q) {
|
|
22815
|
+
const se = L ? T.some((ue) => ie(ue, L)) : !1, De = te.length > 0 ? te.some((ue) => T.some((Ue) => ie(Ue, ue))) : !1;
|
|
22813
22816
|
Be(se), q(De);
|
|
22814
22817
|
}
|
|
22815
22818
|
const j = (T) => {
|
|
22816
|
-
const
|
|
22817
|
-
n({ ...r, recipients:
|
|
22818
|
-
|
|
22819
|
+
const L = typeof T == "function" ? T(r.recipients) : T;
|
|
22820
|
+
n({ ...r, recipients: L }), le(
|
|
22821
|
+
L,
|
|
22819
22822
|
fe,
|
|
22820
22823
|
ye,
|
|
22821
22824
|
y,
|
|
@@ -22823,22 +22826,22 @@ function oA({
|
|
|
22823
22826
|
);
|
|
22824
22827
|
}, J = (T) => n({ ...r, message: T }), ke = (T) => n({ ...r, attachments: [...r.attachments, ...T] }), ee = (T) => n({
|
|
22825
22828
|
...r,
|
|
22826
|
-
attachments: r.attachments.filter((
|
|
22829
|
+
attachments: r.attachments.filter((L) => L.name !== T)
|
|
22827
22830
|
}), he = (T) => {
|
|
22828
22831
|
if (k)
|
|
22829
22832
|
if (l) {
|
|
22830
|
-
const
|
|
22831
|
-
|
|
22833
|
+
const L = new Set(G);
|
|
22834
|
+
L.has(T) ? L.delete(T) : L.add(T), z(Array.from(L));
|
|
22832
22835
|
} else {
|
|
22833
|
-
const
|
|
22834
|
-
L
|
|
22836
|
+
const L = G.includes(T);
|
|
22837
|
+
z(L ? [] : [T]);
|
|
22835
22838
|
}
|
|
22836
22839
|
else if (l) {
|
|
22837
|
-
const
|
|
22838
|
-
|
|
22840
|
+
const L = new Set(r.selectedIds);
|
|
22841
|
+
L.has(T) ? L.delete(T) : L.add(T), n({ ...r, selectedIds: Array.from(L) });
|
|
22839
22842
|
} else {
|
|
22840
|
-
const
|
|
22841
|
-
n({ ...r, selectedIds:
|
|
22843
|
+
const L = r.selectedIds.includes(T);
|
|
22844
|
+
n({ ...r, selectedIds: L ? [] : [T] });
|
|
22842
22845
|
}
|
|
22843
22846
|
}, fe = at(
|
|
22844
22847
|
() => (s?.Correo ?? "").trim(),
|
|
@@ -22853,7 +22856,7 @@ function oA({
|
|
|
22853
22856
|
vt(() => {
|
|
22854
22857
|
if (e && !_e.current) {
|
|
22855
22858
|
let T = [];
|
|
22856
|
-
_ && fe && (T = yn(T, [fe])), B && ye.length && (T = yn(T, ye)), j((
|
|
22859
|
+
_ && fe && (T = yn(T, [fe])), B && ye.length && (T = yn(T, ye)), j((L) => yn(L, T)), le(
|
|
22857
22860
|
r.recipients,
|
|
22858
22861
|
// o el array que uses tras el merge
|
|
22859
22862
|
fe,
|
|
@@ -22865,11 +22868,11 @@ function oA({
|
|
|
22865
22868
|
e || (_e.current = !1);
|
|
22866
22869
|
}, [e, _, B, fe, ye]);
|
|
22867
22870
|
const pe = (T) => {
|
|
22868
|
-
const
|
|
22869
|
-
if (
|
|
22870
|
-
if (
|
|
22871
|
-
return /* @__PURE__ */ u.jsx(Zr, { src:
|
|
22872
|
-
const te = (
|
|
22871
|
+
const L = ce.find((te) => Sn(te.EmailAsesor ?? "") === Sn(T));
|
|
22872
|
+
if (L) {
|
|
22873
|
+
if (L.ImgAsesor)
|
|
22874
|
+
return /* @__PURE__ */ u.jsx(Zr, { src: L.ImgAsesor, alt: L.NombreAsesor });
|
|
22875
|
+
const te = (L.NombreAsesor || "").trim(), Be = (L.ApellidosAsesor || "").trim();
|
|
22873
22876
|
return /* @__PURE__ */ u.jsx(Zr, { children: `${te[0] ?? ""}${Be[0] ?? ""}`.toUpperCase() });
|
|
22874
22877
|
}
|
|
22875
22878
|
return /* @__PURE__ */ u.jsx(Zr, { children: T[0]?.toUpperCase() });
|
|
@@ -22880,17 +22883,17 @@ function oA({
|
|
|
22880
22883
|
te.length > 0 && j((Be) => yn(Be, te)), w("");
|
|
22881
22884
|
}, Ae = (T) => {
|
|
22882
22885
|
y(T), j(
|
|
22883
|
-
(
|
|
22886
|
+
(L) => T && fe ? yn(L, [fe]) : Gp(L, fe)
|
|
22884
22887
|
);
|
|
22885
22888
|
}, O = (T) => {
|
|
22886
22889
|
S(T), j(
|
|
22887
|
-
(
|
|
22890
|
+
(L) => T ? yn(L, ye) : kR(L, ye)
|
|
22888
22891
|
);
|
|
22889
22892
|
}, Ye = (T) => {
|
|
22890
|
-
const
|
|
22891
|
-
ke(
|
|
22893
|
+
const L = Array.from(T.target.files || []);
|
|
22894
|
+
ke(L.map((te) => ({ name: te.name, size: te.size, file: te }))), T.target.value = "";
|
|
22892
22895
|
}, Xe = Y[0], qe = at(() => !i || Xe === void 0 ? void 0 : i.find(
|
|
22893
|
-
(
|
|
22896
|
+
(L, te) => String(Ar(L, te, h.id)) === String(Xe)
|
|
22894
22897
|
), [i, Xe, h.id]), Pe = at(() => {
|
|
22895
22898
|
if (!(!qe || !h.distributorId))
|
|
22896
22899
|
return Ar(qe, 0, h.distributorId);
|
|
@@ -22899,44 +22902,44 @@ function oA({
|
|
|
22899
22902
|
const ze = at(() => qe ? (h.distributorTitle ? Ar(qe, 0, h.distributorTitle) : void 0) ?? (Pe != null ? String(Pe) : void 0) : void 0, [qe, h.distributorTitle, Pe]), pt = at(() => {
|
|
22900
22903
|
const T = i ?? [];
|
|
22901
22904
|
return Pe == null || !h.distributorId ? T : T.filter(
|
|
22902
|
-
(
|
|
22905
|
+
(L, te) => Ar(L, te, h.distributorId) == Pe
|
|
22903
22906
|
);
|
|
22904
22907
|
}, [i, Pe, h.distributorId]), ot = at(() => {
|
|
22905
22908
|
if (!D.trim()) return pt;
|
|
22906
22909
|
const T = D.toLowerCase();
|
|
22907
22910
|
return pt.filter(
|
|
22908
|
-
(
|
|
22909
|
-
(te) => String(
|
|
22911
|
+
(L) => (c ?? []).some(
|
|
22912
|
+
(te) => String(L?.[te] ?? "").toLowerCase().includes(T)
|
|
22910
22913
|
)
|
|
22911
22914
|
);
|
|
22912
22915
|
}, [pt, D, c]), C = at(() => {
|
|
22913
22916
|
if (!i || !r.selectedIds.length) return [];
|
|
22914
22917
|
const T = /* @__PURE__ */ new Map();
|
|
22915
|
-
return i.forEach((
|
|
22916
|
-
T.set(String(Ar(
|
|
22917
|
-
}), r.selectedIds.map((
|
|
22918
|
+
return i.forEach((L, te) => {
|
|
22919
|
+
T.set(String(Ar(L, te, h.id)), L);
|
|
22920
|
+
}), r.selectedIds.map((L) => T.get(String(L))).filter(Boolean);
|
|
22918
22921
|
}, [i, r.selectedIds, h.id]), A = (T) => n({
|
|
22919
22922
|
...r,
|
|
22920
|
-
selectedIds: r.selectedIds.filter((
|
|
22923
|
+
selectedIds: r.selectedIds.filter((L) => String(L) !== String(T))
|
|
22921
22924
|
}), $ = () => {
|
|
22922
22925
|
let T = r.recipients;
|
|
22923
22926
|
if (x.trim()) {
|
|
22924
22927
|
const se = x.split(Ii).filter((De) => Wc.test(De));
|
|
22925
22928
|
T = yn(T, se), j(T), w("");
|
|
22926
22929
|
}
|
|
22927
|
-
const
|
|
22930
|
+
const L = _ ? fe : "", te = ce.find((se) => se?.Activo && se?.EmailAsesor)?.EmailAsesor?.trim() ?? "";
|
|
22928
22931
|
o?.({
|
|
22929
22932
|
recipients: T,
|
|
22930
22933
|
toClient: _,
|
|
22931
22934
|
toAdvisor: B,
|
|
22932
22935
|
tipoInt: _ && B ? 2 : 1,
|
|
22933
|
-
correoCliente:
|
|
22936
|
+
correoCliente: L,
|
|
22934
22937
|
correoAsesor: B ? te : "",
|
|
22935
22938
|
disIdLocked: Pe
|
|
22936
22939
|
}), t?.();
|
|
22937
22940
|
}, ae = at(() => {
|
|
22938
|
-
const
|
|
22939
|
-
return r.recipients.length > 0 ||
|
|
22941
|
+
const L = x.split(Ii).filter(Boolean).some((te) => Wc.test(te));
|
|
22942
|
+
return r.recipients.length > 0 || L;
|
|
22940
22943
|
}, [r.recipients, x]), oe = (r.selectedIds?.length ?? 0) > 0, P = r.message.trim().length > 0, ne = ae && oe && P, Ee = Sl(), V = Cl(Ee.breakpoints.down("sm"));
|
|
22941
22944
|
return /* @__PURE__ */ u.jsxs(
|
|
22942
22945
|
V0,
|
|
@@ -23058,7 +23061,7 @@ function oA({
|
|
|
23058
23061
|
{
|
|
23059
23062
|
avatar: pe(T),
|
|
23060
23063
|
label: T,
|
|
23061
|
-
onDelete: () => j((
|
|
23064
|
+
onDelete: () => j((L) => Gp(L, T)),
|
|
23062
23065
|
size: "small",
|
|
23063
23066
|
variant: "outlined",
|
|
23064
23067
|
sx: { borderRadius: 999, height: 28 }
|
|
@@ -23072,8 +23075,8 @@ function oA({
|
|
|
23072
23075
|
value: x,
|
|
23073
23076
|
onChange: (T) => w(T.target.value),
|
|
23074
23077
|
onKeyDown: (T) => {
|
|
23075
|
-
const
|
|
23076
|
-
|
|
23078
|
+
const L = T.key;
|
|
23079
|
+
L === "Enter" || L === "," || L === ";" || L === " " || L === "Tab" ? (T.preventDefault(), ge()) : L === "Backspace" && !x && r.recipients.length && j((Be) => Be.slice(0, -1));
|
|
23077
23080
|
},
|
|
23078
23081
|
onBlur: ge,
|
|
23079
23082
|
onPaste: (T) => {
|
|
@@ -23153,8 +23156,8 @@ function oA({
|
|
|
23153
23156
|
]
|
|
23154
23157
|
}
|
|
23155
23158
|
),
|
|
23156
|
-
C.length > 0 ? /* @__PURE__ */ u.jsx(U, { sx: { mt: 1.5, display: "flex", gap: 1, flexWrap: "wrap" }, children: C.map((T,
|
|
23157
|
-
const te = Ar(T,
|
|
23159
|
+
C.length > 0 ? /* @__PURE__ */ u.jsx(U, { sx: { mt: 1.5, display: "flex", gap: 1, flexWrap: "wrap" }, children: C.map((T, L) => {
|
|
23160
|
+
const te = Ar(T, L, h.id), Be = Ar(T, L, h.title) ?? "", q = Ar(T, L, h.image), se = DR(f, q);
|
|
23158
23161
|
return /* @__PURE__ */ u.jsx(
|
|
23159
23162
|
po,
|
|
23160
23163
|
{
|
|
@@ -23393,8 +23396,8 @@ function oA({
|
|
|
23393
23396
|
")"
|
|
23394
23397
|
] }),
|
|
23395
23398
|
/* @__PURE__ */ u.jsxs(Xn, { sx: { p: 0 }, children: [
|
|
23396
|
-
ot.map((T,
|
|
23397
|
-
const te = Ar(T,
|
|
23399
|
+
ot.map((T, L) => {
|
|
23400
|
+
const te = Ar(T, L, h.id), Be = Y.includes(String(te)) || Y.includes(te), q = Pe == null || Ar(T, L, h.distributorId) == Pe;
|
|
23398
23401
|
return /* @__PURE__ */ u.jsx(
|
|
23399
23402
|
xo,
|
|
23400
23403
|
{
|
|
@@ -23411,7 +23414,7 @@ function oA({
|
|
|
23411
23414
|
width: "100%",
|
|
23412
23415
|
borderBottom: "solid 1px #D3D4D5"
|
|
23413
23416
|
},
|
|
23414
|
-
children: a ? a(T,
|
|
23417
|
+
children: a ? a(T, L) : /* @__PURE__ */ u.jsx("pre", { style: { margin: 0 }, children: JSON.stringify(T, null, 2) })
|
|
23415
23418
|
}
|
|
23416
23419
|
)
|
|
23417
23420
|
},
|