@arkyn/components 3.0.1-beta.37 → 3.0.1-beta.39
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/bundle.js +523 -523
- package/dist/bundle.umd.cjs +14 -14
- package/dist/components/input/index.d.ts.map +1 -1
- package/dist/components/input/index.js +4 -3
- package/dist/components/maskedInput/index.d.ts.map +1 -1
- package/dist/components/maskedInput/index.js +4 -3
- package/dist/services/iconRenderer.d.ts.map +1 -1
- package/dist/services/iconRenderer.js +1 -1
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { jsx as f, jsxs as k, Fragment as
|
2
|
-
import * as
|
3
|
-
import Tr, { createContext as Ne, useContext as
|
4
|
-
import { Info as ja, AlertTriangle as Ba, XCircle as za, CheckCircle2 as Ha, Pause as Ga, Play as Va, Loader2 as
|
1
|
+
import { jsx as f, jsxs as k, Fragment as ke } from "react/jsx-runtime";
|
2
|
+
import * as Q from "react";
|
3
|
+
import Tr, { createContext as Ne, useContext as Ae, useState as F, useRef as se, useEffect as Ce, cloneElement as Da, useId as Ie, useSyncExternalStore as $a, forwardRef as mn, Children as La, useCallback as tt } from "react";
|
4
|
+
import { Info as ja, AlertTriangle as Ba, XCircle as za, CheckCircle2 as Ha, Pause as Ga, Play as Va, Loader2 as Oe, RefreshCw as gn, Check as hn, X as pn, FileImage as Ua, FileAudio as qa, FileArchive as Wa, File as Ka, ChevronDown as Or, Search as Xa } from "lucide-react";
|
5
5
|
import { AnimatePresence as Pr, motion as dt } from "framer-motion";
|
6
6
|
import { InputMask as Ar } from "@react-input/mask";
|
7
7
|
function Ya(e) {
|
@@ -10,7 +10,7 @@ function Ya(e) {
|
|
10
10
|
}
|
11
11
|
const Ir = Ne({});
|
12
12
|
function Za() {
|
13
|
-
return
|
13
|
+
return Ae(Ir);
|
14
14
|
}
|
15
15
|
function yc(e) {
|
16
16
|
const { schema: t, children: n, className: r, ...a } = e, i = !((l) => {
|
@@ -70,7 +70,7 @@ function Qa(e) {
|
|
70
70
|
const x = l.current.getBoundingClientRect(), v = C.clientX - x.left, w = Math.min(Math.max(v / x.width * 100, 0), 100);
|
71
71
|
t(w);
|
72
72
|
};
|
73
|
-
|
73
|
+
Ce(() => (i ? (a && a(!0), document.addEventListener("mousemove", _), document.addEventListener("mouseup", d)) : (a && a(!1), document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", d)), () => {
|
74
74
|
document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", d);
|
75
75
|
}), [i]);
|
76
76
|
const y = `arkynSliderTrack ${i ? "isDragging" : "isNotDragging"} ${r ? "isDisabled" : "isEnabled"} ${s}`;
|
@@ -90,8 +90,8 @@ function Qa(e) {
|
|
90
90
|
);
|
91
91
|
}
|
92
92
|
function es(e) {
|
93
|
-
var
|
94
|
-
const { onPlayAudio: t, onPauseAudio: n, disabled: r, ...a } = e, [s, o] = Ja(0), [i, c] = F(!1), [l, u] = F(!1), d = se(null), _ = (
|
93
|
+
var L, S, z, A;
|
94
|
+
const { onPlayAudio: t, onPauseAudio: n, disabled: r, ...a } = e, [s, o] = Ja(0), [i, c] = F(!1), [l, u] = F(!1), d = se(null), _ = (L = d.current) == null ? void 0 : L.currentTime, h = (S = d.current) == null ? void 0 : S.duration, m = C(_), g = C(h), y = {
|
95
95
|
totalTime: h,
|
96
96
|
currentTime: _,
|
97
97
|
formattedCurrentTime: m,
|
@@ -99,8 +99,8 @@ function es(e) {
|
|
99
99
|
};
|
100
100
|
function C(b) {
|
101
101
|
if (!b) return "00:00";
|
102
|
-
const T = Math.floor(b / 60), D = Math.floor(b % 60),
|
103
|
-
return `${
|
102
|
+
const T = Math.floor(b / 60), D = Math.floor(b % 60), O = String(T).padStart(2, "0"), j = String(D).padStart(2, "0");
|
103
|
+
return `${O}:${j}`;
|
104
104
|
}
|
105
105
|
function x() {
|
106
106
|
const b = d.current;
|
@@ -113,18 +113,18 @@ function es(e) {
|
|
113
113
|
function w() {
|
114
114
|
i ? v() : x();
|
115
115
|
}
|
116
|
-
function
|
116
|
+
function G(b) {
|
117
117
|
const T = d.current;
|
118
118
|
if (!T) return;
|
119
|
-
const D = T.duration,
|
120
|
-
T.currentTime =
|
119
|
+
const D = T.duration, O = b / 100 * D;
|
120
|
+
T.currentTime = O;
|
121
121
|
}
|
122
|
-
return l || !i ? (
|
122
|
+
return l || !i ? (z = d.current) == null || z.pause() : i && ((A = d.current) == null || A.play()), Ce(() => {
|
123
123
|
const b = d.current;
|
124
124
|
if (!b) return;
|
125
125
|
const T = () => {
|
126
|
-
const D = b.duration,
|
127
|
-
o(
|
126
|
+
const D = b.duration, j = b.currentTime / D * 100;
|
127
|
+
o(j);
|
128
128
|
};
|
129
129
|
return b.addEventListener("timeupdate", T), () => {
|
130
130
|
b.removeEventListener("timeupdate", T);
|
@@ -148,7 +148,7 @@ function es(e) {
|
|
148
148
|
Qa,
|
149
149
|
{
|
150
150
|
value: s,
|
151
|
-
onChange:
|
151
|
+
onChange: G,
|
152
152
|
onDragging: u,
|
153
153
|
disabled: r
|
154
154
|
}
|
@@ -164,14 +164,14 @@ function bc(e) {
|
|
164
164
|
r && Da(r, r.props, t)
|
165
165
|
] });
|
166
166
|
}
|
167
|
-
function
|
168
|
-
return
|
167
|
+
function be() {
|
168
|
+
return Ae(Rr);
|
169
169
|
}
|
170
170
|
function Fe(e) {
|
171
171
|
const { children: t, className: n, ...r } = e, a = `arkynFieldError ${n}`;
|
172
|
-
return t ? /* @__PURE__ */ f("strong", { className: a.trim(), ...r, children: t }) : /* @__PURE__ */ f(
|
172
|
+
return t ? /* @__PURE__ */ f("strong", { className: a.trim(), ...r, children: t }) : /* @__PURE__ */ f(ke, {});
|
173
173
|
}
|
174
|
-
function
|
174
|
+
function me(e) {
|
175
175
|
const {
|
176
176
|
showAsterisk: t = !1,
|
177
177
|
className: n = "",
|
@@ -179,13 +179,13 @@ function de(e) {
|
|
179
179
|
} = e, s = `arkynFieldLabel ${t ? "asteriskTrue" : "asteriskFalse"} ${n}`;
|
180
180
|
return /* @__PURE__ */ f("label", { className: s.trim(), ...r });
|
181
181
|
}
|
182
|
-
function
|
182
|
+
function ve(e) {
|
183
183
|
const { children: t, className: n, ...r } = e, a = `arkynFieldWrapper ${n}`;
|
184
184
|
return /* @__PURE__ */ f("section", { className: a.trim(), ...r, children: t });
|
185
185
|
}
|
186
|
-
function
|
186
|
+
function K(e) {
|
187
187
|
const { iconSize: t, icon: n, className: r, show: a = !0 } = e;
|
188
|
-
return a ? n ? typeof n == "string" ? /* @__PURE__ */ f("p", { className: r, children: n }) : /* @__PURE__ */ f(
|
188
|
+
return a ? n ? typeof n == "string" ? /* @__PURE__ */ f("p", { className: r, children: n }) : /* @__PURE__ */ f("p", { className: r, children: /* @__PURE__ */ f(n, { size: t, strokeWidth: 2.5 }) }) : /* @__PURE__ */ f(ke, {}) : /* @__PURE__ */ f(ke, {});
|
189
189
|
}
|
190
190
|
function at(e) {
|
191
191
|
const {
|
@@ -203,13 +203,13 @@ function at(e) {
|
|
203
203
|
} = e, h = { xs: 12, sm: 16, md: 20, lg: 24 }[s], y = `arkynButton ${t ? "loadingTrue" : "loadingFalse"} ${r} ${n} ${s} ${a ? "loadingTextTrue" : "loadingTextFalse"} ${l}`;
|
204
204
|
return /* @__PURE__ */ k("button", { className: y, disabled: c || t, ...d, children: [
|
205
205
|
/* @__PURE__ */ k("div", { className: "arkynButtonSpinner", children: [
|
206
|
-
/* @__PURE__ */ f(
|
206
|
+
/* @__PURE__ */ f(Oe, { size: h, strokeWidth: 2.5 }),
|
207
207
|
a && a
|
208
208
|
] }),
|
209
209
|
/* @__PURE__ */ k("div", { className: "arkynButtonContent", children: [
|
210
|
-
/* @__PURE__ */ f(
|
210
|
+
/* @__PURE__ */ f(K, { iconSize: h, icon: o }),
|
211
211
|
u,
|
212
|
-
/* @__PURE__ */ f(
|
212
|
+
/* @__PURE__ */ f(K, { iconSize: h, icon: i })
|
213
213
|
] })
|
214
214
|
] });
|
215
215
|
}
|
@@ -239,7 +239,7 @@ function vn(e) {
|
|
239
239
|
className: d.trim(),
|
240
240
|
...c,
|
241
241
|
children: [
|
242
|
-
/* @__PURE__ */ f("div", { className: "arkynIconButtonSpinner", children: /* @__PURE__ */ f(
|
242
|
+
/* @__PURE__ */ f("div", { className: "arkynIconButtonSpinner", children: /* @__PURE__ */ f(Oe, { size: l[a], strokeWidth: 2.5 }) }),
|
243
243
|
/* @__PURE__ */ f("div", { className: "arkynIconButtonContent", children: /* @__PURE__ */ f(s, { size: l[a], strokeWidth: 2.5 }) })
|
244
244
|
]
|
245
245
|
}
|
@@ -253,8 +253,8 @@ function kn(e) {
|
|
253
253
|
orientation: a = "top",
|
254
254
|
className: s = "",
|
255
255
|
...o
|
256
|
-
} = e, i =
|
257
|
-
|
256
|
+
} = e, i = Ie(), c = se(null), [l, u] = F(a);
|
257
|
+
Ce(() => {
|
258
258
|
const _ = () => {
|
259
259
|
if (!c.current) return;
|
260
260
|
const g = document.getElementById(i);
|
@@ -393,30 +393,30 @@ function xc(e) {
|
|
393
393
|
defaultValue: _ = "",
|
394
394
|
showAsterisk: h = !1,
|
395
395
|
disabled: m = !1
|
396
|
-
} = e, { fieldErrors: g } =
|
397
|
-
async function T(
|
396
|
+
} = e, { fieldErrors: g } = be(), y = g == null ? void 0 : g[t], [C, x] = F(_), [v, w] = F(""), [G, L] = F(null), [S, z] = F(_), [A, b] = F(!1);
|
397
|
+
async function T(M) {
|
398
398
|
if (m) return;
|
399
|
-
b(!0),
|
400
|
-
const
|
401
|
-
|
399
|
+
b(!0), L(M), w("");
|
400
|
+
const ee = new FormData();
|
401
|
+
ee.append(r, M), await fetch(d, { method: a, body: ee }).then(async (E) => await E.json()).then((E) => {
|
402
402
|
E != null && E.error ? w(E.error) : x(E == null ? void 0 : E[o]), s && s(E == null ? void 0 : E[o]);
|
403
403
|
}).catch((E) => {
|
404
404
|
console.error(E), w("Erro ao enviar audio");
|
405
405
|
}).finally(() => b(!1));
|
406
406
|
}
|
407
|
-
function D(
|
407
|
+
function D(M) {
|
408
408
|
if (!m) {
|
409
|
-
if (
|
409
|
+
if (M.type.indexOf("audio") === -1) {
|
410
410
|
w("O arquivo selecionado não é um arquivo de áudio");
|
411
411
|
return;
|
412
412
|
}
|
413
|
-
|
413
|
+
z(URL.createObjectURL(M)), T(M);
|
414
414
|
}
|
415
415
|
}
|
416
|
-
const
|
417
|
-
return /* @__PURE__ */ k(
|
418
|
-
n && /* @__PURE__ */ f(
|
419
|
-
/* @__PURE__ */ k("div", { className: `arkynAudioUpload ${
|
416
|
+
const O = y || v;
|
417
|
+
return /* @__PURE__ */ k(ve, { children: [
|
418
|
+
n && /* @__PURE__ */ f(me, { showAsterisk: h, children: n }),
|
419
|
+
/* @__PURE__ */ k("div", { className: `arkynAudioUpload ${O ? "hasError" : "noHasError"} ${S ? "hasAudio" : "noHasAudio"}`, children: [
|
420
420
|
/* @__PURE__ */ f("input", { type: "hidden", name: t, value: C || "" }),
|
421
421
|
!S && /* @__PURE__ */ f(
|
422
422
|
ns,
|
@@ -438,11 +438,11 @@ function xc(e) {
|
|
438
438
|
disabled: m,
|
439
439
|
handleSelectFile: D,
|
440
440
|
isLoading: A,
|
441
|
-
reSendAudio:
|
441
|
+
reSendAudio: O && G ? () => T(G) : void 0
|
442
442
|
}
|
443
443
|
)
|
444
444
|
] }),
|
445
|
-
|
445
|
+
O && /* @__PURE__ */ f(Fe, { children: O })
|
446
446
|
] });
|
447
447
|
}
|
448
448
|
function Ec(e) {
|
@@ -457,14 +457,14 @@ function Ec(e) {
|
|
457
457
|
...c
|
458
458
|
} = e, u = { md: 12, lg: 14 }[r], d = `arkynBadge ${t} ${n} ${r} ${o}`;
|
459
459
|
return /* @__PURE__ */ k("div", { className: d.trim(), ...c, children: [
|
460
|
-
/* @__PURE__ */ f(
|
460
|
+
/* @__PURE__ */ f(K, { iconSize: u, icon: a }),
|
461
461
|
/* @__PURE__ */ f("p", { children: i }),
|
462
|
-
/* @__PURE__ */ f(
|
462
|
+
/* @__PURE__ */ f(K, { iconSize: u, icon: s })
|
463
463
|
] });
|
464
464
|
}
|
465
465
|
const Mr = Ne({});
|
466
466
|
function rs() {
|
467
|
-
return
|
467
|
+
return Ae(Mr);
|
468
468
|
}
|
469
469
|
function as(e) {
|
470
470
|
return /* @__PURE__ */ f(Mr.Provider, { value: e, children: e.children });
|
@@ -528,19 +528,19 @@ function Fc(e) {
|
|
528
528
|
onCheck: l,
|
529
529
|
value: u,
|
530
530
|
...d
|
531
|
-
} = e, { fieldErrors: _ } =
|
531
|
+
} = e, { fieldErrors: _ } = be(), h = se(null), m = t || Ie(), g = s || (_ == null ? void 0 : _[n]), y = !!g, [C, x] = F(o || !1), v = typeof c == "boolean" ? c : C, L = `arkynCheckbox ${a} ${y ? "errorTrue" : "errorFalse"} ${v ? "checkedTrue" : "checkedFalse"} ${r}`;
|
532
532
|
function S() {
|
533
|
-
const
|
534
|
-
x(!
|
533
|
+
const z = C;
|
534
|
+
x(!z), l && l(z ? "" : u || "checked");
|
535
535
|
}
|
536
|
-
return /* @__PURE__ */ k(
|
537
|
-
i && /* @__PURE__ */ f(
|
536
|
+
return /* @__PURE__ */ k(ve, { children: [
|
537
|
+
i && /* @__PURE__ */ f(me, { children: i }),
|
538
538
|
/* @__PURE__ */ k(
|
539
539
|
"button",
|
540
540
|
{
|
541
541
|
id: m,
|
542
542
|
type: "button",
|
543
|
-
className:
|
543
|
+
className: L,
|
544
544
|
onClick: S,
|
545
545
|
...d,
|
546
546
|
children: [
|
@@ -573,7 +573,7 @@ function os() {
|
|
573
573
|
}
|
574
574
|
function Sc(e) {
|
575
575
|
const { children: t, fallback: n = null } = e;
|
576
|
-
return os() ? /* @__PURE__ */ f(
|
576
|
+
return os() ? /* @__PURE__ */ f(ke, { children: t() }) : /* @__PURE__ */ f(ke, { children: n });
|
577
577
|
}
|
578
578
|
const en = (e) => e.replace(/[^0-9]/g, ""), nt = [
|
579
579
|
{
|
@@ -2594,39 +2594,39 @@ function Tc(e) {
|
|
2594
2594
|
onFocus: x,
|
2595
2595
|
onBlur: v,
|
2596
2596
|
errorMessage: w,
|
2597
|
-
showAsterisk:
|
2598
|
-
rightIcon:
|
2597
|
+
showAsterisk: G,
|
2598
|
+
rightIcon: L,
|
2599
2599
|
size: S = "md",
|
2600
|
-
id:
|
2600
|
+
id: z,
|
2601
2601
|
...A
|
2602
|
-
} = e, { fieldErrors: b } =
|
2602
|
+
} = e, { fieldErrors: b } = be(), [T, D] = F(!1), [O, j] = F("0"), $ = se(null), B = z || Ie(), M = w || (b == null ? void 0 : b[t]), ee = !!M, X = { md: 20, lg: 20 }[S], de = L ? "right" : "left", J = de === "left" && g, pe = de === "right" && g;
|
2603
2603
|
function ce() {
|
2604
|
-
n || !(
|
2604
|
+
n || !($ != null && $.current) || (D(!0), $.current.focus());
|
2605
2605
|
}
|
2606
|
-
function
|
2606
|
+
function te(le) {
|
2607
2607
|
D(!0), x && x(le);
|
2608
2608
|
}
|
2609
|
-
function
|
2609
|
+
function I(le) {
|
2610
2610
|
D(!1), v && v(le);
|
2611
2611
|
}
|
2612
|
-
const
|
2612
|
+
const re = (le) => {
|
2613
2613
|
const [Me, Ze] = Xt(
|
2614
2614
|
le,
|
2615
2615
|
d
|
2616
2616
|
);
|
2617
|
-
return !u || Me <= u ? (
|
2618
|
-
},
|
2617
|
+
return !u || Me <= u ? (j(Ze), [Me, Ze]) : Xt(le, d);
|
2618
|
+
}, _e = (le) => {
|
2619
2619
|
le.preventDefault();
|
2620
|
-
const [Me, Ze] =
|
2620
|
+
const [Me, Ze] = re(le.target.value);
|
2621
2621
|
_ && _(le, String(Me), String(Ze));
|
2622
2622
|
};
|
2623
|
-
|
2623
|
+
Ce(() => {
|
2624
2624
|
const le = c || +l || void 0, [, Me] = Xt(le, d);
|
2625
|
-
|
2625
|
+
j(Me);
|
2626
2626
|
}, [d, l, c]);
|
2627
|
-
const ot = `arkynCurrencyInput ${h ? "hasPrefix" : ""} ${m ? "hasSuffix" : ""} ${s} ${S} ${n || C || g ? "opacity" : ""} ${
|
2628
|
-
return /* @__PURE__ */ k(
|
2629
|
-
o && /* @__PURE__ */ f(
|
2627
|
+
const ot = `arkynCurrencyInput ${h ? "hasPrefix" : ""} ${m ? "hasSuffix" : ""} ${s} ${S} ${n || C || g ? "opacity" : ""} ${ee ? "errored" : ""} ${T ? "focused" : ""} ${i}`;
|
2628
|
+
return /* @__PURE__ */ k(ve, { children: [
|
2629
|
+
o && /* @__PURE__ */ f(me, { showAsterisk: G, htmlFor: B, children: o }),
|
2630
2630
|
/* @__PURE__ */ k(
|
2631
2631
|
"section",
|
2632
2632
|
{
|
@@ -2635,54 +2635,54 @@ function Tc(e) {
|
|
2635
2635
|
onClick: ce,
|
2636
2636
|
className: ot,
|
2637
2637
|
children: [
|
2638
|
-
/* @__PURE__ */ f(
|
2638
|
+
/* @__PURE__ */ f(K, { iconSize: X, icon: h, className: "prefix" }),
|
2639
2639
|
/* @__PURE__ */ f(
|
2640
|
-
|
2640
|
+
K,
|
2641
2641
|
{
|
2642
|
-
show:
|
2643
|
-
iconSize:
|
2642
|
+
show: J,
|
2643
|
+
iconSize: X,
|
2644
2644
|
className: "spinner",
|
2645
|
-
icon:
|
2645
|
+
icon: Oe
|
2646
2646
|
}
|
2647
2647
|
),
|
2648
|
-
/* @__PURE__ */ f(
|
2648
|
+
/* @__PURE__ */ f(K, { show: !g, icon: y, iconSize: X }),
|
2649
2649
|
/* @__PURE__ */ f(
|
2650
2650
|
"input",
|
2651
2651
|
{
|
2652
|
-
value:
|
2652
|
+
value: O,
|
2653
2653
|
disabled: n || g,
|
2654
2654
|
readOnly: C,
|
2655
|
-
ref:
|
2656
|
-
onFocus:
|
2657
|
-
onBlur:
|
2658
|
-
onChange:
|
2659
|
-
id:
|
2655
|
+
ref: $,
|
2656
|
+
onFocus: te,
|
2657
|
+
onBlur: I,
|
2658
|
+
onChange: _e,
|
2659
|
+
id: B,
|
2660
2660
|
name: t,
|
2661
2661
|
...A
|
2662
2662
|
}
|
2663
2663
|
),
|
2664
|
-
/* @__PURE__ */ f(
|
2664
|
+
/* @__PURE__ */ f(K, { show: !g, icon: L, iconSize: X }),
|
2665
2665
|
/* @__PURE__ */ f(
|
2666
|
-
|
2666
|
+
K,
|
2667
2667
|
{
|
2668
|
-
show:
|
2669
|
-
iconSize:
|
2668
|
+
show: pe,
|
2669
|
+
iconSize: X,
|
2670
2670
|
className: "spinner",
|
2671
|
-
icon:
|
2671
|
+
icon: Oe
|
2672
2672
|
}
|
2673
2673
|
),
|
2674
|
-
/* @__PURE__ */ f(
|
2674
|
+
/* @__PURE__ */ f(K, { iconSize: X, icon: m, className: "suffix" })
|
2675
2675
|
]
|
2676
2676
|
}
|
2677
2677
|
),
|
2678
|
-
|
2678
|
+
M && /* @__PURE__ */ f(Fe, { children: M })
|
2679
2679
|
] });
|
2680
2680
|
}
|
2681
2681
|
function us() {
|
2682
2682
|
return typeof window > "u" ? 0 : window.innerWidth - document.documentElement.clientWidth;
|
2683
2683
|
}
|
2684
2684
|
function yt(e) {
|
2685
|
-
|
2685
|
+
Ce(() => {
|
2686
2686
|
if (e) {
|
2687
2687
|
const t = document.body.style.overflow, n = document.body.style.paddingRight, r = us();
|
2688
2688
|
if (r > 0) {
|
@@ -2700,7 +2700,7 @@ function fs(e) {
|
|
2700
2700
|
return /* @__PURE__ */ f(Dr.Provider, { value: { makeInvisible: e.makeInvisible }, children: e.children });
|
2701
2701
|
}
|
2702
2702
|
function ds() {
|
2703
|
-
return
|
2703
|
+
return Ae(Dr);
|
2704
2704
|
}
|
2705
2705
|
function Oc(e) {
|
2706
2706
|
const {
|
@@ -2872,30 +2872,30 @@ function Ac(e) {
|
|
2872
2872
|
dropFileText: d = "Ou arraste e solte o arquivo aqui",
|
2873
2873
|
onChange: _,
|
2874
2874
|
disabled: h = !1
|
2875
|
-
} = e, { fieldErrors: m } =
|
2876
|
-
async function j
|
2875
|
+
} = e, { fieldErrors: m } = be(), g = m == null ? void 0 : m[t], [y, C] = F(""), [x, v] = F(""), [w, G] = F(null), [L, S] = F(!1);
|
2876
|
+
async function z(j) {
|
2877
2877
|
if (h) return;
|
2878
|
-
S(!0),
|
2879
|
-
const
|
2880
|
-
|
2881
|
-
|
2882
|
-
}).catch((
|
2883
|
-
console.error(
|
2878
|
+
S(!0), G(j), v("");
|
2879
|
+
const $ = new FormData();
|
2880
|
+
$.append(s, j), await fetch(a, { method: o, body: $ }).then(async (B) => await B.json()).then((B) => {
|
2881
|
+
B != null && B.error ? v(B.error) : C(B == null ? void 0 : B[c]), _ && _(B == null ? void 0 : B[c]);
|
2882
|
+
}).catch((B) => {
|
2883
|
+
console.error(B), v("Erro ao enviar o arquivo");
|
2884
2884
|
}).finally(() => S(!1));
|
2885
2885
|
}
|
2886
|
-
function A(
|
2887
|
-
h || j
|
2886
|
+
function A(j) {
|
2887
|
+
h || z(j);
|
2888
2888
|
}
|
2889
2889
|
const b = g || x;
|
2890
|
-
return /* @__PURE__ */ k(
|
2891
|
-
n && /* @__PURE__ */ f(
|
2890
|
+
return /* @__PURE__ */ k(ve, { children: [
|
2891
|
+
n && /* @__PURE__ */ f(me, { showAsterisk: r, children: n }),
|
2892
2892
|
/* @__PURE__ */ k("div", { className: `arkynFileUpload ${b ? "hasError" : "noHasError"} ${w ? "hasFile" : "noHasFile"}`, children: [
|
2893
2893
|
/* @__PURE__ */ f("input", { type: "hidden", name: t, value: y || "" }),
|
2894
2894
|
!w && /* @__PURE__ */ f(
|
2895
2895
|
ms,
|
2896
2896
|
{
|
2897
2897
|
disabled: h,
|
2898
|
-
isLoading:
|
2898
|
+
isLoading: L,
|
2899
2899
|
acceptFile: i,
|
2900
2900
|
dropFileText: d,
|
2901
2901
|
handleSelectFile: A,
|
@@ -2906,12 +2906,12 @@ function Ac(e) {
|
|
2906
2906
|
_s,
|
2907
2907
|
{
|
2908
2908
|
disabled: h,
|
2909
|
-
isLoading:
|
2909
|
+
isLoading: L,
|
2910
2910
|
acceptFile: i,
|
2911
2911
|
file: w,
|
2912
2912
|
handleSelectFile: A,
|
2913
2913
|
changeFileButtonText: l,
|
2914
|
-
reSendFile: b && w ? () =>
|
2914
|
+
reSendFile: b && w ? () => z(w) : void 0
|
2915
2915
|
}
|
2916
2916
|
)
|
2917
2917
|
] }),
|
@@ -3029,24 +3029,24 @@ function Ic(e) {
|
|
3029
3029
|
dropImageText: _ = "Ou arraste e solte a imagem aqui",
|
3030
3030
|
onChange: h,
|
3031
3031
|
disabled: m = !1
|
3032
|
-
} = e, { fieldErrors: g } =
|
3033
|
-
async function T(
|
3032
|
+
} = e, { fieldErrors: g } = be(), y = g == null ? void 0 : g[t], [C, x] = F(n), [v, w] = F(""), [G, L] = F(null), [S, z] = F(n), [A, b] = F(!1);
|
3033
|
+
async function T(M) {
|
3034
3034
|
if (m) return;
|
3035
|
-
b(!0),
|
3036
|
-
const
|
3037
|
-
|
3035
|
+
b(!0), L(M), w("");
|
3036
|
+
const ee = new FormData();
|
3037
|
+
ee.append(o, M), await fetch(s, { method: i, body: ee }).then(async (E) => await E.json()).then((E) => {
|
3038
3038
|
E != null && E.error ? w(E.error) : x(E == null ? void 0 : E[l]), h && h(E == null ? void 0 : E[l]);
|
3039
3039
|
}).catch((E) => {
|
3040
3040
|
console.error(E), w("Erro ao enviar imagem");
|
3041
3041
|
}).finally(() => b(!1));
|
3042
3042
|
}
|
3043
|
-
function D(
|
3044
|
-
m || (
|
3043
|
+
function D(M) {
|
3044
|
+
m || (z(URL.createObjectURL(M)), T(M));
|
3045
3045
|
}
|
3046
|
-
const
|
3047
|
-
return /* @__PURE__ */ k(
|
3048
|
-
r && /* @__PURE__ */ f(
|
3049
|
-
/* @__PURE__ */ k("div", { className: `arkynImageUpload ${
|
3046
|
+
const O = y || v;
|
3047
|
+
return /* @__PURE__ */ k(ve, { children: [
|
3048
|
+
r && /* @__PURE__ */ f(me, { showAsterisk: a, children: r }),
|
3049
|
+
/* @__PURE__ */ k("div", { className: `arkynImageUpload ${O ? "hasError" : "noHasError"} ${S ? "hasImage" : "noHasImage"}`, children: [
|
3050
3050
|
/* @__PURE__ */ f("input", { type: "hidden", name: t, value: C || "" }),
|
3051
3051
|
!S && /* @__PURE__ */ f(
|
3052
3052
|
hs,
|
@@ -3068,11 +3068,11 @@ function Ic(e) {
|
|
3068
3068
|
filePath: S,
|
3069
3069
|
handleSelectFile: D,
|
3070
3070
|
changeImageButtonText: u,
|
3071
|
-
reSendImage:
|
3071
|
+
reSendImage: O && G ? () => T(G) : void 0
|
3072
3072
|
}
|
3073
3073
|
)
|
3074
3074
|
] }),
|
3075
|
-
|
3075
|
+
O && /* @__PURE__ */ f(Fe, { children: O })
|
3076
3076
|
] });
|
3077
3077
|
}
|
3078
3078
|
function ps(e) {
|
@@ -3097,16 +3097,16 @@ function ps(e) {
|
|
3097
3097
|
type: x = "text",
|
3098
3098
|
size: v = "md",
|
3099
3099
|
id: w,
|
3100
|
-
...
|
3101
|
-
} = e, { fieldErrors:
|
3102
|
-
function
|
3103
|
-
|
3100
|
+
...G
|
3101
|
+
} = e, { fieldErrors: L } = be(), [S, z] = F(!1), A = se(null), b = w || Ie(), T = g || (L == null ? void 0 : L[t]), D = !!T, O = n || u, $ = { md: 20, lg: 20 }[v], B = C ? "right" : "left", M = B === "left" && u, ee = B === "right" && u;
|
3102
|
+
function E() {
|
3103
|
+
O || !(A != null && A.current) || (z(!0), A.current.focus());
|
3104
3104
|
}
|
3105
|
-
function
|
3106
|
-
|
3105
|
+
function X(_e) {
|
3106
|
+
z(!0), h && h(_e);
|
3107
3107
|
}
|
3108
|
-
function
|
3109
|
-
|
3108
|
+
function de(_e) {
|
3109
|
+
z(!1), m && m(_e);
|
3110
3110
|
}
|
3111
3111
|
if (x === "hidden")
|
3112
3112
|
return /* @__PURE__ */ f(
|
@@ -3116,56 +3116,56 @@ function ps(e) {
|
|
3116
3116
|
readOnly: !0,
|
3117
3117
|
type: "text",
|
3118
3118
|
ref: A,
|
3119
|
-
...
|
3119
|
+
...G
|
3120
3120
|
}
|
3121
3121
|
);
|
3122
|
-
const
|
3123
|
-
return /* @__PURE__ */ k(
|
3124
|
-
o && /* @__PURE__ */ f(
|
3122
|
+
const re = `arkynInput ${c ? "hasPrefix" : ""} ${l ? "hasSuffix" : ""} ${s} ${v} ${O || _ || u ? "opacity" : ""} ${D ? "errored" : ""} ${S ? "focused" : ""} ${i}`;
|
3123
|
+
return /* @__PURE__ */ k(ve, { children: [
|
3124
|
+
o && /* @__PURE__ */ f(me, { showAsterisk: y, htmlFor: b, children: o }),
|
3125
3125
|
/* @__PURE__ */ k(
|
3126
3126
|
"section",
|
3127
3127
|
{
|
3128
3128
|
title: r,
|
3129
3129
|
style: a,
|
3130
|
-
onClick:
|
3131
|
-
className:
|
3130
|
+
onClick: E,
|
3131
|
+
className: re,
|
3132
3132
|
children: [
|
3133
|
-
/* @__PURE__ */ f(
|
3133
|
+
/* @__PURE__ */ f(K, { iconSize: $, icon: c, className: "prefix" }),
|
3134
3134
|
/* @__PURE__ */ f(
|
3135
|
-
|
3135
|
+
K,
|
3136
3136
|
{
|
3137
|
-
show:
|
3138
|
-
iconSize:
|
3137
|
+
show: M,
|
3138
|
+
iconSize: $,
|
3139
3139
|
className: "spinner",
|
3140
|
-
icon:
|
3140
|
+
icon: Oe
|
3141
3141
|
}
|
3142
3142
|
),
|
3143
|
-
/* @__PURE__ */ f(
|
3143
|
+
/* @__PURE__ */ f(K, { show: !u, icon: d, iconSize: $ }),
|
3144
3144
|
/* @__PURE__ */ f(
|
3145
3145
|
"input",
|
3146
3146
|
{
|
3147
|
-
disabled:
|
3147
|
+
disabled: O,
|
3148
3148
|
readOnly: _,
|
3149
3149
|
ref: A,
|
3150
|
-
onFocus:
|
3151
|
-
onBlur:
|
3150
|
+
onFocus: X,
|
3151
|
+
onBlur: de,
|
3152
3152
|
type: x,
|
3153
3153
|
id: b,
|
3154
3154
|
name: t,
|
3155
|
-
...
|
3155
|
+
...G
|
3156
3156
|
}
|
3157
3157
|
),
|
3158
|
-
/* @__PURE__ */ f(
|
3158
|
+
/* @__PURE__ */ f(K, { show: !u, icon: C, iconSize: $ }),
|
3159
3159
|
/* @__PURE__ */ f(
|
3160
|
-
|
3160
|
+
K,
|
3161
3161
|
{
|
3162
|
-
show:
|
3163
|
-
iconSize:
|
3162
|
+
show: ee,
|
3163
|
+
iconSize: $,
|
3164
3164
|
className: "spinner",
|
3165
|
-
icon:
|
3165
|
+
icon: Oe
|
3166
3166
|
}
|
3167
3167
|
),
|
3168
|
-
/* @__PURE__ */ f(
|
3168
|
+
/* @__PURE__ */ f(K, { iconSize: $, icon: l, className: "suffix" })
|
3169
3169
|
]
|
3170
3170
|
}
|
3171
3171
|
),
|
@@ -3195,43 +3195,43 @@ function Rc(e) {
|
|
3195
3195
|
onBlur: x,
|
3196
3196
|
errorMessage: v,
|
3197
3197
|
defaultValue: w,
|
3198
|
-
showAsterisk:
|
3199
|
-
rightIcon:
|
3198
|
+
showAsterisk: G,
|
3199
|
+
rightIcon: L,
|
3200
3200
|
size: S = "md",
|
3201
|
-
id:
|
3201
|
+
id: z,
|
3202
3202
|
...A
|
3203
|
-
} = e, { fieldErrors: b } =
|
3204
|
-
function
|
3205
|
-
|
3203
|
+
} = e, { fieldErrors: b } = be(), [T, D] = F(!1), O = se(null), j = z || Ie(), $ = v || (b == null ? void 0 : b[t]), B = !!$, M = n || m, E = { md: 20, lg: 20 }[S], X = L ? "right" : "left", de = X === "left" && m, J = X === "right" && m;
|
3204
|
+
function pe() {
|
3205
|
+
M || !(O != null && O.current) || (D(!0), O.current.focus());
|
3206
3206
|
}
|
3207
|
-
function
|
3208
|
-
D(!0), C && C(
|
3207
|
+
function ce(H) {
|
3208
|
+
D(!0), C && C(H);
|
3209
3209
|
}
|
3210
|
-
function
|
3211
|
-
D(!1), x && x(
|
3210
|
+
function te(H) {
|
3211
|
+
D(!1), x && x(H);
|
3212
3212
|
}
|
3213
|
-
const
|
3214
|
-
return /* @__PURE__ */ k(
|
3215
|
-
u && /* @__PURE__ */ f(
|
3213
|
+
const Re = `arkynMaskedInput ${_ ? "hasPrefix" : ""} ${h ? "hasSuffix" : ""} ${s} ${S} ${M || y || m ? "opacity" : ""} ${B ? "errored" : ""} ${T ? "focused" : ""} ${d}`;
|
3214
|
+
return /* @__PURE__ */ k(ve, { children: [
|
3215
|
+
u && /* @__PURE__ */ f(me, { showAsterisk: G, htmlFor: j, children: u }),
|
3216
3216
|
/* @__PURE__ */ k(
|
3217
3217
|
"section",
|
3218
3218
|
{
|
3219
3219
|
title: r,
|
3220
3220
|
style: a,
|
3221
|
-
onClick:
|
3222
|
-
className:
|
3221
|
+
onClick: pe,
|
3222
|
+
className: Re,
|
3223
3223
|
children: [
|
3224
|
-
/* @__PURE__ */ f(
|
3224
|
+
/* @__PURE__ */ f(K, { iconSize: E, icon: _, className: "prefix" }),
|
3225
3225
|
/* @__PURE__ */ f(
|
3226
|
-
|
3226
|
+
K,
|
3227
3227
|
{
|
3228
|
-
show:
|
3229
|
-
iconSize:
|
3228
|
+
show: de,
|
3229
|
+
iconSize: E,
|
3230
3230
|
className: "spinner",
|
3231
|
-
icon:
|
3231
|
+
icon: Oe
|
3232
3232
|
}
|
3233
3233
|
),
|
3234
|
-
/* @__PURE__ */ f(
|
3234
|
+
/* @__PURE__ */ f(K, { show: !m, icon: g, iconSize: E }),
|
3235
3235
|
/* @__PURE__ */ f(
|
3236
3236
|
Ar,
|
3237
3237
|
{
|
@@ -3240,31 +3240,31 @@ function Rc(e) {
|
|
3240
3240
|
replacement: l,
|
3241
3241
|
separate: o,
|
3242
3242
|
showMask: c,
|
3243
|
-
ref:
|
3244
|
-
onFocus:
|
3245
|
-
onBlur:
|
3246
|
-
disabled:
|
3243
|
+
ref: O,
|
3244
|
+
onFocus: ce,
|
3245
|
+
onBlur: te,
|
3246
|
+
disabled: M,
|
3247
3247
|
readOnly: y,
|
3248
|
-
id:
|
3248
|
+
id: j,
|
3249
3249
|
name: t,
|
3250
3250
|
...A
|
3251
3251
|
}
|
3252
3252
|
),
|
3253
|
-
/* @__PURE__ */ f(
|
3253
|
+
/* @__PURE__ */ f(K, { show: !m, icon: L, iconSize: E }),
|
3254
3254
|
/* @__PURE__ */ f(
|
3255
|
-
|
3255
|
+
K,
|
3256
3256
|
{
|
3257
|
-
show:
|
3258
|
-
iconSize:
|
3257
|
+
show: J,
|
3258
|
+
iconSize: E,
|
3259
3259
|
className: "spinner",
|
3260
|
-
icon:
|
3260
|
+
icon: Oe
|
3261
3261
|
}
|
3262
3262
|
),
|
3263
|
-
/* @__PURE__ */ f(
|
3263
|
+
/* @__PURE__ */ f(K, { iconSize: E, icon: h, className: "suffix" })
|
3264
3264
|
]
|
3265
3265
|
}
|
3266
3266
|
),
|
3267
|
-
|
3267
|
+
$ && /* @__PURE__ */ f(Fe, { children: $ })
|
3268
3268
|
] });
|
3269
3269
|
}
|
3270
3270
|
const $r = Ne({});
|
@@ -3272,7 +3272,7 @@ function vs(e) {
|
|
3272
3272
|
return /* @__PURE__ */ f($r.Provider, { value: { makeInvisible: e.makeInvisible }, children: e.children });
|
3273
3273
|
}
|
3274
3274
|
function ks() {
|
3275
|
-
return
|
3275
|
+
return Ae($r);
|
3276
3276
|
}
|
3277
3277
|
function Mc(e) {
|
3278
3278
|
const {
|
@@ -3336,7 +3336,7 @@ function $c(e) {
|
|
3336
3336
|
}
|
3337
3337
|
function Cs(e) {
|
3338
3338
|
const { iconSize: t, isLoading: n, disabled: r, readOnly: a, isFocused: s } = e, c = `arkynMultiSelectChevron ${r || a ? "notAnimate" : ""} ${s ? "focused" : ""}`;
|
3339
|
-
return n ? /* @__PURE__ */ f(
|
3339
|
+
return n ? /* @__PURE__ */ f(ke, {}) : /* @__PURE__ */ f(Or, { className: c, size: t, strokeWidth: 2.5 });
|
3340
3340
|
}
|
3341
3341
|
function bs(e) {
|
3342
3342
|
const {
|
@@ -3394,7 +3394,7 @@ function ws(e) {
|
|
3394
3394
|
}
|
3395
3395
|
function Ns(e) {
|
3396
3396
|
const { children: t, isFocused: n, isSearchable: r, search: a, onSearch: s } = e, o = se(null), [i, c] = F("bottom");
|
3397
|
-
yt(n),
|
3397
|
+
yt(n), Ce(() => {
|
3398
3398
|
if (!n) return;
|
3399
3399
|
(() => {
|
3400
3400
|
if (!o.current) return;
|
@@ -3427,22 +3427,22 @@ function Ns(e) {
|
|
3427
3427
|
t
|
3428
3428
|
]
|
3429
3429
|
}
|
3430
|
-
) : /* @__PURE__ */ f(
|
3430
|
+
) : /* @__PURE__ */ f(ke, {});
|
3431
3431
|
}
|
3432
3432
|
function Fs(e) {
|
3433
3433
|
const { isFocused: t, handleBlur: n } = e;
|
3434
|
-
return t ? /* @__PURE__ */ f("aside", { className: "arkynMultiSelectOverlay", onClick: n }) : /* @__PURE__ */ f(
|
3434
|
+
return t ? /* @__PURE__ */ f("aside", { className: "arkynMultiSelectOverlay", onClick: n }) : /* @__PURE__ */ f(ke, {});
|
3435
3435
|
}
|
3436
3436
|
function Ss(e) {
|
3437
3437
|
const { iconSize: t, isLoading: n } = e;
|
3438
3438
|
return n ? /* @__PURE__ */ f(
|
3439
|
-
|
3439
|
+
Oe,
|
3440
3440
|
{
|
3441
3441
|
className: "arkynMultiSelectSpinner",
|
3442
3442
|
size: t,
|
3443
3443
|
strokeWidth: 2.5
|
3444
3444
|
}
|
3445
|
-
) : /* @__PURE__ */ f(
|
3445
|
+
) : /* @__PURE__ */ f(ke, {});
|
3446
3446
|
}
|
3447
3447
|
function Lc(e) {
|
3448
3448
|
const {
|
@@ -3466,47 +3466,47 @@ function Lc(e) {
|
|
3466
3466
|
onBlur: x,
|
3467
3467
|
notFoundText: v = "Sem opções disponíveis",
|
3468
3468
|
onFocus: w,
|
3469
|
-
disabled:
|
3470
|
-
prefix:
|
3469
|
+
disabled: G = !1,
|
3470
|
+
prefix: L,
|
3471
3471
|
size: S = "md",
|
3472
|
-
value:
|
3472
|
+
value: z,
|
3473
3473
|
variant: A = "solid"
|
3474
|
-
} = e, { fieldErrors: b } =
|
3475
|
-
function
|
3476
|
-
return ce.includes(
|
3474
|
+
} = e, { fieldErrors: b } = be(), T = se(null), D = d || Ie(), O = i || (b == null ? void 0 : b[t]), j = !!O, $ = G || c || l, M = { md: 20, lg: 20 }[S], [ee, E] = F(""), [X, de] = F(!1), [J, pe] = F(o), ce = z || J;
|
3475
|
+
function te(H) {
|
3476
|
+
return ce.includes(H);
|
3477
3477
|
}
|
3478
|
-
function
|
3479
|
-
const oe = n.find((ot) => ot.value ===
|
3478
|
+
function I(H) {
|
3479
|
+
const oe = n.find((ot) => ot.value === H);
|
3480
3480
|
return (oe == null ? void 0 : oe.label) || "";
|
3481
3481
|
}
|
3482
|
-
function
|
3483
|
-
|
3482
|
+
function re() {
|
3483
|
+
$ || !(T != null && T.current) || X || (de(!0), T.current.focus(), w && w());
|
3484
3484
|
}
|
3485
|
-
function
|
3486
|
-
|
3485
|
+
function _e() {
|
3486
|
+
de(!1), x && T.current && T.current.blur();
|
3487
3487
|
}
|
3488
|
-
function ze(
|
3489
|
-
E(
|
3488
|
+
function ze(H) {
|
3489
|
+
E(H), y && y(H);
|
3490
3490
|
}
|
3491
|
-
function
|
3492
|
-
|
3491
|
+
function Ye(H) {
|
3492
|
+
te(H) ? (pe(J.filter((oe) => oe !== H)), C && C(J.filter((oe) => oe !== H))) : (pe([...J, H]), C && C([...J, H])), s && _e();
|
3493
3493
|
}
|
3494
|
-
const
|
3495
|
-
return /* @__PURE__ */ k(
|
3496
|
-
_ && /* @__PURE__ */ f(
|
3494
|
+
const Re = n.filter((H) => !!(e.onSearch || !e.isSearchable || H.label.toLowerCase().includes(ee.toLowerCase())));
|
3495
|
+
return /* @__PURE__ */ k(ve, { children: [
|
3496
|
+
_ && /* @__PURE__ */ f(me, { showAsterisk: m, children: _ }),
|
3497
3497
|
/* @__PURE__ */ k(
|
3498
3498
|
bs,
|
3499
3499
|
{
|
3500
|
-
handleContainerFocus:
|
3501
|
-
disabled:
|
3502
|
-
isError:
|
3503
|
-
isFocused:
|
3500
|
+
handleContainerFocus: re,
|
3501
|
+
disabled: $,
|
3502
|
+
isError: j,
|
3503
|
+
isFocused: X,
|
3504
3504
|
isLoading: c,
|
3505
3505
|
readOnly: l,
|
3506
3506
|
size: S,
|
3507
3507
|
variant: A,
|
3508
3508
|
className: r,
|
3509
|
-
prefixExists:
|
3509
|
+
prefixExists: !!L,
|
3510
3510
|
id: D,
|
3511
3511
|
children: [
|
3512
3512
|
/* @__PURE__ */ f(
|
@@ -3518,60 +3518,60 @@ function Lc(e) {
|
|
3518
3518
|
type: "hidden"
|
3519
3519
|
}
|
3520
3520
|
),
|
3521
|
-
/* @__PURE__ */ f(
|
3522
|
-
g && /* @__PURE__ */ f(g, { size:
|
3521
|
+
/* @__PURE__ */ f(K, { iconSize: M, icon: L, className: "prefix" }),
|
3522
|
+
g && /* @__PURE__ */ f(g, { size: M, strokeWidth: 2.5 }),
|
3523
3523
|
/* @__PURE__ */ k(xs, { size: S, children: [
|
3524
|
-
ce.map((
|
3524
|
+
ce.map((H) => /* @__PURE__ */ f(
|
3525
3525
|
Es,
|
3526
3526
|
{
|
3527
|
-
label:
|
3528
|
-
value:
|
3529
|
-
handleChangeValue:
|
3530
|
-
disabled:
|
3527
|
+
label: I(H),
|
3528
|
+
value: H,
|
3529
|
+
handleChangeValue: Ye,
|
3530
|
+
disabled: $
|
3531
3531
|
},
|
3532
|
-
|
3532
|
+
H
|
3533
3533
|
)),
|
3534
3534
|
ce.length <= 0 && /* @__PURE__ */ f("p", { children: a })
|
3535
3535
|
] }),
|
3536
3536
|
/* @__PURE__ */ k(
|
3537
3537
|
Ns,
|
3538
3538
|
{
|
3539
|
-
isFocused:
|
3539
|
+
isFocused: X,
|
3540
3540
|
isSearchable: u,
|
3541
|
-
search:
|
3541
|
+
search: ee,
|
3542
3542
|
onSearch: ze,
|
3543
3543
|
children: [
|
3544
|
-
|
3544
|
+
Re.map(({ label: H, value: oe }) => /* @__PURE__ */ f(
|
3545
3545
|
ws,
|
3546
3546
|
{
|
3547
|
-
label:
|
3547
|
+
label: H,
|
3548
3548
|
value: oe,
|
3549
3549
|
size: S,
|
3550
|
-
handleChangeValue:
|
3551
|
-
optionHasSelected:
|
3550
|
+
handleChangeValue: Ye,
|
3551
|
+
optionHasSelected: te
|
3552
3552
|
},
|
3553
3553
|
oe
|
3554
3554
|
)),
|
3555
|
-
|
3555
|
+
Re.length <= 0 && /* @__PURE__ */ f("p", { children: v })
|
3556
3556
|
]
|
3557
3557
|
}
|
3558
3558
|
),
|
3559
3559
|
/* @__PURE__ */ f(
|
3560
3560
|
Cs,
|
3561
3561
|
{
|
3562
|
-
disabled:
|
3563
|
-
isFocused:
|
3562
|
+
disabled: $,
|
3563
|
+
isFocused: X,
|
3564
3564
|
readOnly: l,
|
3565
|
-
iconSize:
|
3565
|
+
iconSize: M,
|
3566
3566
|
isLoading: c
|
3567
3567
|
}
|
3568
3568
|
),
|
3569
|
-
/* @__PURE__ */ f(Ss, { iconSize:
|
3570
|
-
/* @__PURE__ */ f(Fs, { handleBlur:
|
3569
|
+
/* @__PURE__ */ f(Ss, { iconSize: M, isLoading: c }),
|
3570
|
+
/* @__PURE__ */ f(Fs, { handleBlur: _e, isFocused: X })
|
3571
3571
|
]
|
3572
3572
|
}
|
3573
3573
|
),
|
3574
|
-
|
3574
|
+
O && /* @__PURE__ */ f(Fe, { children: O })
|
3575
3575
|
] });
|
3576
3576
|
}
|
3577
3577
|
function Cn(e) {
|
@@ -3657,7 +3657,7 @@ function As(e) {
|
|
3657
3657
|
}
|
3658
3658
|
function Is(e) {
|
3659
3659
|
const { isOpen: t, onClick: n } = e;
|
3660
|
-
return t ? /* @__PURE__ */ f("aside", { className: "arkynPhoneInputCountriesOverlay", onClick: n }) : /* @__PURE__ */ f(
|
3660
|
+
return t ? /* @__PURE__ */ f("aside", { className: "arkynPhoneInputCountriesOverlay", onClick: n }) : /* @__PURE__ */ f(ke, {});
|
3661
3661
|
}
|
3662
3662
|
function Rs(e) {
|
3663
3663
|
const { country: t, isActive: n, handleChangeValue: r, size: a } = e, o = `arkynPhoneInputCountryOption ${a} ${n ? "active" : ""}`;
|
@@ -3674,7 +3674,7 @@ function Ms(e) {
|
|
3674
3674
|
function l(u) {
|
3675
3675
|
r(u.target.value);
|
3676
3676
|
}
|
3677
|
-
return yt(n),
|
3677
|
+
return yt(n), Ce(() => {
|
3678
3678
|
if (!n) return;
|
3679
3679
|
(() => {
|
3680
3680
|
if (!o.current) return;
|
@@ -3704,7 +3704,7 @@ function Ms(e) {
|
|
3704
3704
|
t
|
3705
3705
|
]
|
3706
3706
|
}
|
3707
|
-
) : /* @__PURE__ */ f(
|
3707
|
+
) : /* @__PURE__ */ f(ke, {});
|
3708
3708
|
}
|
3709
3709
|
function Ds(e) {
|
3710
3710
|
const { currentCountry: t, onClick: n } = e;
|
@@ -3724,7 +3724,7 @@ function Ds(e) {
|
|
3724
3724
|
const $s = mn((e, t) => /* @__PURE__ */ f("input", { ref: t, ...e })), Ls = mn(
|
3725
3725
|
(e, t) => {
|
3726
3726
|
const { onFocus: n, onBlur: r, size: a, onChange: s, value: o, currentCountry: i, disabled: c } = e, [l, u] = F(!1);
|
3727
|
-
|
3727
|
+
Ce(() => {
|
3728
3728
|
l ? s(i.mask) : u(!0);
|
3729
3729
|
}, [i]);
|
3730
3730
|
const d = `phoneInputMask ${a}`;
|
@@ -3780,51 +3780,51 @@ function jc(e) {
|
|
3780
3780
|
searchCountryPlaceholder: m = "Pesquisar país",
|
3781
3781
|
notFoundCountryText: g = "Nenhum país encontrado",
|
3782
3782
|
id: y
|
3783
|
-
} = e, C = Ps(l), [x, v] = F(!1), [w,
|
3783
|
+
} = e, C = Ps(l), [x, v] = F(!1), [w, G] = F(""), [L, S] = F(!1), [z, A] = F(C.formattedNumber || ""), [b, T] = F(() => {
|
3784
3784
|
if (C.country) return C.country;
|
3785
|
-
const
|
3786
|
-
return
|
3787
|
-
}), { fieldErrors: D } =
|
3788
|
-
function
|
3789
|
-
x ||
|
3785
|
+
const I = nt.find((re) => re.iso === t);
|
3786
|
+
return I || nt[30];
|
3787
|
+
}), { fieldErrors: D } = be(), O = se(null), j = y || Ie(), $ = s || (D == null ? void 0 : D[_]), B = !!$, M = se(null);
|
3788
|
+
function ee() {
|
3789
|
+
x || L || (v(!0), M.current && M.current.focus());
|
3790
3790
|
}
|
3791
3791
|
function E() {
|
3792
3792
|
S(!0), v(!0);
|
3793
3793
|
}
|
3794
|
-
function
|
3794
|
+
function X() {
|
3795
3795
|
S(!1), v(!1);
|
3796
3796
|
}
|
3797
|
-
function
|
3797
|
+
function de() {
|
3798
3798
|
v(!0);
|
3799
3799
|
}
|
3800
|
-
function
|
3800
|
+
function J() {
|
3801
3801
|
v(!1);
|
3802
3802
|
}
|
3803
|
-
function
|
3804
|
-
return
|
3803
|
+
function pe(I) {
|
3804
|
+
return I.name.toLowerCase().includes(w.toLowerCase());
|
3805
3805
|
}
|
3806
|
-
function ce(
|
3807
|
-
return b.prefix ?
|
3806
|
+
function ce(I) {
|
3807
|
+
return b.prefix ? I.replace(b.prefix, "").replaceAll(" ", "").replaceAll("-", "").replaceAll("(", "").replaceAll(")", "").trim() : I.replaceAll(" ", "").replaceAll("-", "").replaceAll("(", "").replaceAll(")", "").trim();
|
3808
3808
|
}
|
3809
|
-
function
|
3810
|
-
let
|
3811
|
-
return b.prefix && (
|
3809
|
+
function te(I) {
|
3810
|
+
let re = b.code;
|
3811
|
+
return b.prefix && (re += `-${b.prefix}`), re += " ", re += ce(I || z), re;
|
3812
3812
|
}
|
3813
|
-
return /* @__PURE__ */ k(
|
3814
|
-
n && /* @__PURE__ */ f(
|
3813
|
+
return /* @__PURE__ */ k(ve, { children: [
|
3814
|
+
n && /* @__PURE__ */ f(me, { showAsterisk: d, children: n }),
|
3815
3815
|
/* @__PURE__ */ k(
|
3816
3816
|
As,
|
3817
3817
|
{
|
3818
|
-
id:
|
3818
|
+
id: j,
|
3819
3819
|
disabled: a,
|
3820
|
-
isError:
|
3820
|
+
isError: B,
|
3821
3821
|
isLoading: o,
|
3822
3822
|
isFocused: x,
|
3823
3823
|
readOnly: i,
|
3824
3824
|
size: c,
|
3825
3825
|
variant: u,
|
3826
3826
|
className: r,
|
3827
|
-
onFocus:
|
3827
|
+
onFocus: ee,
|
3828
3828
|
children: [
|
3829
3829
|
/* @__PURE__ */ f(
|
3830
3830
|
Ds,
|
@@ -3837,62 +3837,62 @@ function jc(e) {
|
|
3837
3837
|
/* @__PURE__ */ k(
|
3838
3838
|
Ms,
|
3839
3839
|
{
|
3840
|
-
isOpen:
|
3840
|
+
isOpen: L,
|
3841
3841
|
search: w,
|
3842
3842
|
placeholder: m,
|
3843
|
-
onSearch:
|
3843
|
+
onSearch: G,
|
3844
3844
|
children: [
|
3845
|
-
nt.filter((
|
3845
|
+
nt.filter((I) => pe(I)).map((I) => /* @__PURE__ */ f(
|
3846
3846
|
Rs,
|
3847
3847
|
{
|
3848
|
-
country:
|
3848
|
+
country: I,
|
3849
3849
|
handleChangeValue: () => {
|
3850
|
-
T(
|
3850
|
+
T(I), S(!1), A(I.mask);
|
3851
3851
|
},
|
3852
|
-
isActive:
|
3852
|
+
isActive: I.iso === b.iso,
|
3853
3853
|
size: c
|
3854
3854
|
},
|
3855
|
-
|
3855
|
+
I.iso
|
3856
3856
|
)),
|
3857
|
-
nt.filter((
|
3857
|
+
nt.filter((I) => pe(I)).length === 0 && /* @__PURE__ */ f("p", { children: g })
|
3858
3858
|
]
|
3859
3859
|
}
|
3860
3860
|
),
|
3861
3861
|
/* @__PURE__ */ f(
|
3862
3862
|
Is,
|
3863
3863
|
{
|
3864
|
-
isOpen:
|
3865
|
-
onClick:
|
3864
|
+
isOpen: L,
|
3865
|
+
onClick: X
|
3866
3866
|
}
|
3867
3867
|
),
|
3868
3868
|
/* @__PURE__ */ f(
|
3869
3869
|
Ls,
|
3870
3870
|
{
|
3871
|
-
ref:
|
3871
|
+
ref: M,
|
3872
3872
|
currentCountry: b,
|
3873
|
-
value:
|
3874
|
-
onChange: (
|
3875
|
-
A(
|
3873
|
+
value: z,
|
3874
|
+
onChange: (I) => {
|
3875
|
+
A(I), h && h(te(I));
|
3876
3876
|
},
|
3877
3877
|
disabled: a,
|
3878
|
-
onBlur:
|
3879
|
-
onFocus:
|
3878
|
+
onBlur: J,
|
3879
|
+
onFocus: de,
|
3880
3880
|
size: c
|
3881
3881
|
}
|
3882
3882
|
),
|
3883
3883
|
/* @__PURE__ */ f(
|
3884
3884
|
"input",
|
3885
3885
|
{
|
3886
|
-
ref:
|
3886
|
+
ref: O,
|
3887
3887
|
type: "hidden",
|
3888
3888
|
name: _,
|
3889
|
-
value:
|
3889
|
+
value: te()
|
3890
3890
|
}
|
3891
3891
|
)
|
3892
3892
|
]
|
3893
3893
|
}
|
3894
3894
|
),
|
3895
|
-
|
3895
|
+
$ && /* @__PURE__ */ f(Fe, { children: $ })
|
3896
3896
|
] });
|
3897
3897
|
}
|
3898
3898
|
function Bc(e) {
|
@@ -3930,7 +3930,7 @@ function js(e) {
|
|
3930
3930
|
return /* @__PURE__ */ f(zr.Provider, { value: { handleChange: a, value: s, size: n, isError: r }, children: t });
|
3931
3931
|
}
|
3932
3932
|
function Bs() {
|
3933
|
-
return
|
3933
|
+
return Ae(zr);
|
3934
3934
|
}
|
3935
3935
|
function zc(e) {
|
3936
3936
|
const {
|
@@ -3967,13 +3967,13 @@ function Hc(e) {
|
|
3967
3967
|
size: c = "md",
|
3968
3968
|
className: l = "",
|
3969
3969
|
...u
|
3970
|
-
} = e, [d, _] = F(t), { fieldErrors: h } =
|
3970
|
+
} = e, [d, _] = F(t), { fieldErrors: h } = be();
|
3971
3971
|
function m(x) {
|
3972
3972
|
_(x), i && i(x);
|
3973
3973
|
}
|
3974
3974
|
const g = s || (h == null ? void 0 : h[n]), y = !!g, C = `arkynRadioGroup ${c} ${l}`;
|
3975
|
-
return /* @__PURE__ */ k(
|
3976
|
-
r && /* @__PURE__ */ f(
|
3975
|
+
return /* @__PURE__ */ k(ve, { children: [
|
3976
|
+
r && /* @__PURE__ */ f(me, { showAsterisk: a, children: r }),
|
3977
3977
|
/* @__PURE__ */ k(
|
3978
3978
|
js,
|
3979
3979
|
{
|
@@ -4012,13 +4012,13 @@ function Gc(e) {
|
|
4012
4012
|
onCheck: l,
|
4013
4013
|
id: u,
|
4014
4014
|
...d
|
4015
|
-
} = e, _ = se(null), h = u ||
|
4015
|
+
} = e, _ = se(null), h = u || Ie(), [m, g] = F(r), y = typeof a == "boolean" ? a : m;
|
4016
4016
|
function C() {
|
4017
4017
|
g(!m), l && l(y ? o : s || "checked");
|
4018
4018
|
}
|
4019
4019
|
const v = `arkynSwitch ${y ? "checkedTrue" : "checkedFalse"} ${n} ${c}`;
|
4020
|
-
return /* @__PURE__ */ k(
|
4021
|
-
t && /* @__PURE__ */ f(
|
4020
|
+
return /* @__PURE__ */ k(ve, { children: [
|
4021
|
+
t && /* @__PURE__ */ f(me, { children: t }),
|
4022
4022
|
/* @__PURE__ */ f(
|
4023
4023
|
"button",
|
4024
4024
|
{
|
@@ -4043,7 +4043,7 @@ function Gc(e) {
|
|
4043
4043
|
}
|
4044
4044
|
const Hr = Ne({});
|
4045
4045
|
function zs() {
|
4046
|
-
return
|
4046
|
+
return Ae(Hr);
|
4047
4047
|
}
|
4048
4048
|
function Hs(e) {
|
4049
4049
|
return /* @__PURE__ */ f(Hr.Provider, { value: e, children: e.children });
|
@@ -4142,18 +4142,18 @@ function Zc(e) {
|
|
4142
4142
|
style: h,
|
4143
4143
|
id: m,
|
4144
4144
|
...g
|
4145
|
-
} = e, { fieldErrors: y } =
|
4145
|
+
} = e, { fieldErrors: y } = be(), [C, x] = F(!1), v = se(null), w = m || Ie(), G = a || (y == null ? void 0 : y[l]), b = `arkynTextarea ${t} ${n} ${s || o ? "opacityTrue" : "opacityFalse"} ${!!G ? "errorTrue" : "errorFalse"} ${C ? "focusedTrue" : "focusedFalse"} ${r}`;
|
4146
4146
|
function T() {
|
4147
4147
|
s || !(v != null && v.current) || (x(!0), v.current.focus());
|
4148
4148
|
}
|
4149
|
-
function D(
|
4150
|
-
x(!0), u && u(
|
4149
|
+
function D(j) {
|
4150
|
+
x(!0), u && u(j);
|
4151
4151
|
}
|
4152
|
-
function
|
4153
|
-
x(!1), d && d(
|
4152
|
+
function O(j) {
|
4153
|
+
x(!1), d && d(j);
|
4154
4154
|
}
|
4155
|
-
return /* @__PURE__ */ k(
|
4156
|
-
i && /* @__PURE__ */ f(
|
4155
|
+
return /* @__PURE__ */ k(ve, { children: [
|
4156
|
+
i && /* @__PURE__ */ f(me, { showAsterisk: c, children: i }),
|
4157
4157
|
/* @__PURE__ */ f(
|
4158
4158
|
"section",
|
4159
4159
|
{
|
@@ -4169,13 +4169,13 @@ function Zc(e) {
|
|
4169
4169
|
readOnly: o,
|
4170
4170
|
ref: v,
|
4171
4171
|
onFocus: D,
|
4172
|
-
onBlur:
|
4172
|
+
onBlur: O,
|
4173
4173
|
...g
|
4174
4174
|
}
|
4175
4175
|
)
|
4176
4176
|
}
|
4177
4177
|
),
|
4178
|
-
|
4178
|
+
G && /* @__PURE__ */ f(me, { children: G })
|
4179
4179
|
] });
|
4180
4180
|
}
|
4181
4181
|
const Gr = Ne({});
|
@@ -4204,7 +4204,7 @@ function Jc(e) {
|
|
4204
4204
|
);
|
4205
4205
|
}
|
4206
4206
|
function Qc(e) {
|
4207
|
-
const t =
|
4207
|
+
const t = Ae(Gr);
|
4208
4208
|
if (Object.entries(t).length === 0)
|
4209
4209
|
throw new Error("useDrawer must be used within a Provider");
|
4210
4210
|
if (e) {
|
@@ -4247,7 +4247,7 @@ function el(e) {
|
|
4247
4247
|
);
|
4248
4248
|
}
|
4249
4249
|
function tl(e) {
|
4250
|
-
const t =
|
4250
|
+
const t = Ae(Vr);
|
4251
4251
|
if (Object.entries(t).length === 0)
|
4252
4252
|
throw new Error("useModal must be used within a Provider");
|
4253
4253
|
if (e) {
|
@@ -4283,7 +4283,7 @@ let Gs = { data: "" }, Vs = (e) => typeof window == "object" ? ((e ? e.querySele
|
|
4283
4283
|
s[0] == "@" ? s[1] == "i" ? n = s + " " + o + ";" : r += s[1] == "f" ? $e(o, s) : s + "{" + $e(o, s[1] == "k" ? "" : t) + "}" : typeof o == "object" ? r += $e(o, t ? t.replace(/([^,])+/g, (i) => s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g, (c) => /&/.test(c) ? c.replace(/&/g, i) : i ? i + " " + c : c)) : s) : o != null && (s = /^--/.test(s) ? s : s.replace(/[A-Z]/g, "-$&").toLowerCase(), a += $e.p ? $e.p(s, o) : s + ":" + o + ";");
|
4284
4284
|
}
|
4285
4285
|
return n + (t && a ? t + "{" + a + "}" : a) + r;
|
4286
|
-
},
|
4286
|
+
}, Se = {}, Ur = (e) => {
|
4287
4287
|
if (typeof e == "object") {
|
4288
4288
|
let t = "";
|
4289
4289
|
for (let n in e) t += n + Ur(e[n]);
|
@@ -4291,23 +4291,23 @@ let Gs = { data: "" }, Vs = (e) => typeof window == "object" ? ((e ? e.querySele
|
|
4291
4291
|
}
|
4292
4292
|
return e;
|
4293
4293
|
}, Ws = (e, t, n, r, a) => {
|
4294
|
-
let s = Ur(e), o =
|
4294
|
+
let s = Ur(e), o = Se[s] || (Se[s] = ((c) => {
|
4295
4295
|
let l = 0, u = 11;
|
4296
4296
|
for (; l < c.length; ) u = 101 * u + c.charCodeAt(l++) >>> 0;
|
4297
4297
|
return "go" + u;
|
4298
4298
|
})(s));
|
4299
|
-
if (!
|
4299
|
+
if (!Se[o]) {
|
4300
4300
|
let c = s !== e ? e : ((l) => {
|
4301
4301
|
let u, d, _ = [{}];
|
4302
4302
|
for (; u = Us.exec(l.replace(qs, "")); ) u[4] ? _.shift() : u[3] ? (d = u[3].replace(Wn, " ").trim(), _.unshift(_[0][d] = _[0][d] || {})) : _[0][u[1]] = u[2].replace(Wn, " ").trim();
|
4303
4303
|
return _[0];
|
4304
4304
|
})(e);
|
4305
|
-
|
4305
|
+
Se[o] = $e(a ? { ["@keyframes " + o]: c } : c, n ? "" : "." + o);
|
4306
4306
|
}
|
4307
|
-
let i = n &&
|
4308
|
-
return n && (
|
4307
|
+
let i = n && Se.g ? Se.g : null;
|
4308
|
+
return n && (Se.g = Se[o]), ((c, l, u, d) => {
|
4309
4309
|
d ? l.data = l.data.replace(d, c) : l.data.indexOf(c) === -1 && (l.data = u ? c + l.data : l.data + c);
|
4310
|
-
})(
|
4310
|
+
})(Se[o], t, r, i), o;
|
4311
4311
|
}, Ks = (e, t, n) => e.reduce((r, a, s) => {
|
4312
4312
|
let o = t[s];
|
4313
4313
|
if (o && o.call) {
|
@@ -4322,7 +4322,7 @@ function It(e) {
|
|
4322
4322
|
}
|
4323
4323
|
let qr, tn, nn;
|
4324
4324
|
It.bind({ g: 1 });
|
4325
|
-
let
|
4325
|
+
let Pe = It.bind({ k: 1 });
|
4326
4326
|
function Xs(e, t, n, r) {
|
4327
4327
|
$e.p = t, qr = e, tn = n, nn = r;
|
4328
4328
|
}
|
@@ -4380,7 +4380,7 @@ var Ys = (e) => typeof e == "function", St = (e, t) => Ys(e) ? e(t) : e, Zs = /*
|
|
4380
4380
|
Yr(t, e);
|
4381
4381
|
}, eo = { blank: 4e3, error: 4e3, success: 2e3, loading: 1 / 0, custom: 4e3 }, to = (e = {}, t = xn) => {
|
4382
4382
|
let [n, r] = F(we[t] || Xr), a = se(we[t]);
|
4383
|
-
|
4383
|
+
Ce(() => (a.current !== we[t] && r(we[t]), Ft.push([t, r]), () => {
|
4384
4384
|
let o = Ft.findIndex(([i]) => i === t);
|
4385
4385
|
o > -1 && Ft.splice(o, 1);
|
4386
4386
|
}), [t]);
|
@@ -4392,29 +4392,29 @@ var Ys = (e) => typeof e == "function", St = (e, t) => Ys(e) ? e(t) : e, Zs = /*
|
|
4392
4392
|
}, no = (e, t = "blank", n) => ({ createdAt: Date.now(), visible: !0, dismissed: !1, type: t, ariaProps: { role: "status", "aria-live": "polite" }, message: e, pauseDuration: 0, ...n, id: (n == null ? void 0 : n.id) || Zs() }), vt = (e) => (t, n) => {
|
4393
4393
|
let r = no(t, e, n);
|
4394
4394
|
return Rt(r.toasterId || Qs(r.id))({ type: 2, toast: r }), r.id;
|
4395
|
-
},
|
4396
|
-
|
4397
|
-
|
4398
|
-
|
4399
|
-
|
4400
|
-
|
4395
|
+
}, Z = (e, t) => vt("blank")(e, t);
|
4396
|
+
Z.error = vt("error");
|
4397
|
+
Z.success = vt("success");
|
4398
|
+
Z.loading = vt("loading");
|
4399
|
+
Z.custom = vt("custom");
|
4400
|
+
Z.dismiss = (e, t) => {
|
4401
4401
|
let n = { type: 3, toastId: e };
|
4402
4402
|
t ? Rt(t)(n) : Zr(n);
|
4403
4403
|
};
|
4404
|
-
|
4405
|
-
|
4404
|
+
Z.dismissAll = (e) => Z.dismiss(void 0, e);
|
4405
|
+
Z.remove = (e, t) => {
|
4406
4406
|
let n = { type: 4, toastId: e };
|
4407
4407
|
t ? Rt(t)(n) : Zr(n);
|
4408
4408
|
};
|
4409
|
-
|
4410
|
-
|
4411
|
-
let r =
|
4409
|
+
Z.removeAll = (e) => Z.remove(void 0, e);
|
4410
|
+
Z.promise = (e, t, n) => {
|
4411
|
+
let r = Z.loading(t.loading, { ...n, ...n == null ? void 0 : n.loading });
|
4412
4412
|
return typeof e == "function" && (e = e()), e.then((a) => {
|
4413
4413
|
let s = t.success ? St(t.success, a) : void 0;
|
4414
|
-
return s ?
|
4414
|
+
return s ? Z.success(s, { id: r, ...n, ...n == null ? void 0 : n.success }) : Z.dismiss(r), a;
|
4415
4415
|
}).catch((a) => {
|
4416
4416
|
let s = t.error ? St(t.error, a) : void 0;
|
4417
|
-
s ?
|
4417
|
+
s ? Z.error(s, { id: r, ...n, ...n == null ? void 0 : n.error }) : Z.dismiss(r);
|
4418
4418
|
}), e;
|
4419
4419
|
};
|
4420
4420
|
var ro = 1e3, ao = (e, t = "default") => {
|
@@ -4425,16 +4425,16 @@ var ro = 1e3, ao = (e, t = "default") => {
|
|
4425
4425
|
}, _);
|
4426
4426
|
a.set(d, h);
|
4427
4427
|
}, []);
|
4428
|
-
|
4428
|
+
Ce(() => {
|
4429
4429
|
if (r) return;
|
4430
4430
|
let d = Date.now(), _ = n.map((h) => {
|
4431
4431
|
if (h.duration === 1 / 0) return;
|
4432
4432
|
let m = (h.duration || 0) + h.pauseDuration - (d - h.createdAt);
|
4433
4433
|
if (m < 0) {
|
4434
|
-
h.visible &&
|
4434
|
+
h.visible && Z.dismiss(h.id);
|
4435
4435
|
return;
|
4436
4436
|
}
|
4437
|
-
return setTimeout(() =>
|
4437
|
+
return setTimeout(() => Z.dismiss(h.id, t), m);
|
4438
4438
|
});
|
4439
4439
|
return () => {
|
4440
4440
|
_.forEach((h) => h && clearTimeout(h));
|
@@ -4450,7 +4450,7 @@ var ro = 1e3, ao = (e, t = "default") => {
|
|
4450
4450
|
let { reverseOrder: h = !1, gutter: m = 8, defaultPosition: g } = _ || {}, y = n.filter((v) => (v.position || g) === (d.position || g) && v.height), C = y.findIndex((v) => v.id === d.id), x = y.filter((v, w) => w < C && v.visible).length;
|
4451
4451
|
return y.filter((v) => v.visible).slice(...h ? [x + 1] : [0, x]).reduce((v, w) => v + (w.height || 0) + m, 0);
|
4452
4452
|
}, [n]);
|
4453
|
-
return
|
4453
|
+
return Ce(() => {
|
4454
4454
|
n.forEach((d) => {
|
4455
4455
|
if (d.dismissed) s(d.id, d.removeDelay);
|
4456
4456
|
else {
|
@@ -4459,7 +4459,7 @@ var ro = 1e3, ao = (e, t = "default") => {
|
|
4459
4459
|
}
|
4460
4460
|
});
|
4461
4461
|
}, [n, s]), { toasts: n, handlers: { updateHeight: c, startPause: i, endPause: l, calculateOffset: u } };
|
4462
|
-
}, so =
|
4462
|
+
}, so = Pe`
|
4463
4463
|
from {
|
4464
4464
|
transform: scale(0) rotate(45deg);
|
4465
4465
|
opacity: 0;
|
@@ -4467,7 +4467,7 @@ from {
|
|
4467
4467
|
to {
|
4468
4468
|
transform: scale(1) rotate(45deg);
|
4469
4469
|
opacity: 1;
|
4470
|
-
}`, oo =
|
4470
|
+
}`, oo = Pe`
|
4471
4471
|
from {
|
4472
4472
|
transform: scale(0);
|
4473
4473
|
opacity: 0;
|
@@ -4475,7 +4475,7 @@ from {
|
|
4475
4475
|
to {
|
4476
4476
|
transform: scale(1);
|
4477
4477
|
opacity: 1;
|
4478
|
-
}`, io =
|
4478
|
+
}`, io = Pe`
|
4479
4479
|
from {
|
4480
4480
|
transform: scale(0) rotate(90deg);
|
4481
4481
|
opacity: 0;
|
@@ -4516,7 +4516,7 @@ to {
|
|
4516
4516
|
animation-delay: 180ms;
|
4517
4517
|
transform: rotate(90deg);
|
4518
4518
|
}
|
4519
|
-
`, lo =
|
4519
|
+
`, lo = Pe`
|
4520
4520
|
from {
|
4521
4521
|
transform: rotate(0deg);
|
4522
4522
|
}
|
@@ -4532,7 +4532,7 @@ to {
|
|
4532
4532
|
border-color: ${(e) => e.secondary || "#e0e0e0"};
|
4533
4533
|
border-right-color: ${(e) => e.primary || "#616161"};
|
4534
4534
|
animation: ${lo} 1s linear infinite;
|
4535
|
-
`, fo =
|
4535
|
+
`, fo = Pe`
|
4536
4536
|
from {
|
4537
4537
|
transform: scale(0) rotate(45deg);
|
4538
4538
|
opacity: 0;
|
@@ -4540,7 +4540,7 @@ from {
|
|
4540
4540
|
to {
|
4541
4541
|
transform: scale(1) rotate(45deg);
|
4542
4542
|
opacity: 1;
|
4543
|
-
}`, _o =
|
4543
|
+
}`, _o = Pe`
|
4544
4544
|
0% {
|
4545
4545
|
height: 0;
|
4546
4546
|
width: 0;
|
@@ -4590,7 +4590,7 @@ to {
|
|
4590
4590
|
align-items: center;
|
4591
4591
|
min-width: 20px;
|
4592
4592
|
min-height: 20px;
|
4593
|
-
`, po =
|
4593
|
+
`, po = Pe`
|
4594
4594
|
from {
|
4595
4595
|
transform: scale(0.6);
|
4596
4596
|
opacity: 0.4;
|
@@ -4607,7 +4607,7 @@ to {
|
|
4607
4607
|
forwards;
|
4608
4608
|
`, vo = ({ toast: e }) => {
|
4609
4609
|
let { icon: t, type: n, iconTheme: r } = e;
|
4610
|
-
return t !== void 0 ? typeof t == "string" ?
|
4610
|
+
return t !== void 0 ? typeof t == "string" ? Q.createElement(yo, null, t) : t : n === "blank" ? null : Q.createElement(ho, null, Q.createElement(uo, { ...r }), n !== "loading" && Q.createElement(go, null, n === "error" ? Q.createElement(co, { ...r }) : Q.createElement(mo, { ...r })));
|
4611
4611
|
}, ko = (e) => `
|
4612
4612
|
0% {transform: translate3d(0,${e * -200}%,0) scale(.6); opacity:.5;}
|
4613
4613
|
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
@@ -4635,14 +4635,14 @@ to {
|
|
4635
4635
|
white-space: pre-line;
|
4636
4636
|
`, No = (e, t) => {
|
4637
4637
|
let n = e.includes("top") ? 1 : -1, [r, a] = Wr() ? [bo, xo] : [ko(n), Co(n)];
|
4638
|
-
return { animation: t ? `${
|
4639
|
-
}, Fo =
|
4640
|
-
let a = e.height ? No(e.position || t || "top-center", e.visible) : { opacity: 0 }, s =
|
4641
|
-
return
|
4638
|
+
return { animation: t ? `${Pe(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards` : `${Pe(a)} 0.4s forwards cubic-bezier(.06,.71,.55,1)` };
|
4639
|
+
}, Fo = Q.memo(({ toast: e, position: t, style: n, children: r }) => {
|
4640
|
+
let a = e.height ? No(e.position || t || "top-center", e.visible) : { opacity: 0 }, s = Q.createElement(vo, { toast: e }), o = Q.createElement(wo, { ...e.ariaProps }, St(e.message, e));
|
4641
|
+
return Q.createElement(Eo, { className: e.className, style: { ...a, ...n, ...e.style } }, typeof r == "function" ? r({ icon: s, message: o }) : Q.createElement(Q.Fragment, null, s, o));
|
4642
4642
|
});
|
4643
|
-
Xs(
|
4643
|
+
Xs(Q.createElement);
|
4644
4644
|
var So = ({ id: e, className: t, style: n, onHeightUpdate: r, children: a }) => {
|
4645
|
-
let s =
|
4645
|
+
let s = Q.useCallback((o) => {
|
4646
4646
|
if (o) {
|
4647
4647
|
let i = () => {
|
4648
4648
|
let c = o.getBoundingClientRect().height;
|
@@ -4651,7 +4651,7 @@ var So = ({ id: e, className: t, style: n, onHeightUpdate: r, children: a }) =>
|
|
4651
4651
|
i(), new MutationObserver(i).observe(o, { subtree: !0, childList: !0, characterData: !0 });
|
4652
4652
|
}
|
4653
4653
|
}, [e, r]);
|
4654
|
-
return
|
4654
|
+
return Q.createElement("div", { ref: s, className: t, style: n }, a);
|
4655
4655
|
}, To = (e, t) => {
|
4656
4656
|
let n = e.includes("top"), r = n ? { top: 0 } : { bottom: 0 }, a = e.includes("center") ? { justifyContent: "center" } : e.includes("right") ? { justifyContent: "flex-end" } : {};
|
4657
4657
|
return { left: 0, right: 0, display: "flex", position: "absolute", transition: Wr() ? void 0 : "all 230ms cubic-bezier(.21,1.02,.73,1)", transform: `translateY(${t * (n ? 1 : -1)}px)`, ...r, ...a };
|
@@ -4662,11 +4662,11 @@ var So = ({ id: e, className: t, style: n, onHeightUpdate: r, children: a }) =>
|
|
4662
4662
|
}
|
4663
4663
|
`, Ct = 16, Po = ({ reverseOrder: e, position: t = "top-center", toastOptions: n, gutter: r, children: a, toasterId: s, containerStyle: o, containerClassName: i }) => {
|
4664
4664
|
let { toasts: c, handlers: l } = ao(n, s);
|
4665
|
-
return
|
4665
|
+
return Q.createElement("div", { "data-rht-toaster": s || "", style: { position: "fixed", zIndex: 9999, top: Ct, left: Ct, right: Ct, bottom: Ct, pointerEvents: "none", ...o }, className: i, onMouseEnter: l.startPause, onMouseLeave: l.endPause }, c.map((u) => {
|
4666
4666
|
let d = u.position || t, _ = l.calculateOffset(u, { reverseOrder: e, gutter: r, defaultPosition: t }), h = To(d, _);
|
4667
|
-
return
|
4667
|
+
return Q.createElement(So, { id: u.id, key: u.id, onHeightUpdate: l.updateHeight, className: u.visible ? Oo : "", style: h }, u.type === "custom" ? St(u.message, u) : a ? a(u) : Q.createElement(Fo, { toast: u, position: d }));
|
4668
4668
|
}));
|
4669
|
-
}, Kn =
|
4669
|
+
}, Kn = Z;
|
4670
4670
|
const Ao = Ne({});
|
4671
4671
|
function rl({ children: e }) {
|
4672
4672
|
function t(n) {
|
@@ -4725,7 +4725,7 @@ function ae(e) {
|
|
4725
4725
|
var t, n;
|
4726
4726
|
return Xn(e) === !1 ? !1 : (t = e.constructor, t === void 0 ? !0 : (n = t.prototype, !(Xn(n) === !1 || n.hasOwnProperty("isPrototypeOf") === !1)));
|
4727
4727
|
}
|
4728
|
-
var Jr = Symbol.for("immer-nothing"), Yn = Symbol.for("immer-draftable"),
|
4728
|
+
var Jr = Symbol.for("immer-nothing"), Yn = Symbol.for("immer-draftable"), ge = Symbol.for("immer-state"), Io = process.env.NODE_ENV !== "production" ? [
|
4729
4729
|
// All error codes, starting by 0:
|
4730
4730
|
function(e) {
|
4731
4731
|
return `The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`;
|
@@ -4766,10 +4766,10 @@ function ue(e, ...t) {
|
|
4766
4766
|
);
|
4767
4767
|
}
|
4768
4768
|
var rt = Object.getPrototypeOf;
|
4769
|
-
function
|
4770
|
-
return !!e && !!e[
|
4769
|
+
function qe(e) {
|
4770
|
+
return !!e && !!e[ge];
|
4771
4771
|
}
|
4772
|
-
function
|
4772
|
+
function We(e) {
|
4773
4773
|
var t;
|
4774
4774
|
return e ? Qr(e) || Array.isArray(e) || !!e[Yn] || !!((t = e.constructor) != null && t[Yn]) || Dt(e) || $t(e) : !1;
|
4775
4775
|
}
|
@@ -4789,7 +4789,7 @@ function Tt(e, t) {
|
|
4789
4789
|
}) : e.forEach((n, r) => t(r, n, e));
|
4790
4790
|
}
|
4791
4791
|
function Mt(e) {
|
4792
|
-
const t = e[
|
4792
|
+
const t = e[ge];
|
4793
4793
|
return t ? t.type_ : Array.isArray(e) ? 1 : Dt(e) ? 2 : $t(e) ? 3 : 0;
|
4794
4794
|
}
|
4795
4795
|
function rn(e, t) {
|
@@ -4808,7 +4808,7 @@ function Dt(e) {
|
|
4808
4808
|
function $t(e) {
|
4809
4809
|
return e instanceof Set;
|
4810
4810
|
}
|
4811
|
-
function
|
4811
|
+
function Ve(e) {
|
4812
4812
|
return e.copy_ || e.base_;
|
4813
4813
|
}
|
4814
4814
|
function an(e, t) {
|
@@ -4821,7 +4821,7 @@ function an(e, t) {
|
|
4821
4821
|
const n = Qr(e);
|
4822
4822
|
if (t === !0 || t === "class_only" && !n) {
|
4823
4823
|
const r = Object.getOwnPropertyDescriptors(e);
|
4824
|
-
delete r[
|
4824
|
+
delete r[ge];
|
4825
4825
|
let a = Reflect.ownKeys(r);
|
4826
4826
|
for (let s = 0; s < a.length; s++) {
|
4827
4827
|
const o = a[s], i = r[o];
|
@@ -4843,7 +4843,7 @@ function an(e, t) {
|
|
4843
4843
|
}
|
4844
4844
|
}
|
4845
4845
|
function En(e, t = !1) {
|
4846
|
-
return Lt(e) ||
|
4846
|
+
return Lt(e) || qe(e) || !We(e) || (Mt(e) > 1 && (e.set = e.add = e.clear = e.delete = Do), Object.freeze(e), t && Object.entries(e).forEach(([n, r]) => En(r, !0))), e;
|
4847
4847
|
}
|
4848
4848
|
function Do() {
|
4849
4849
|
ue(2);
|
@@ -4852,7 +4852,7 @@ function Lt(e) {
|
|
4852
4852
|
return Object.isFrozen(e);
|
4853
4853
|
}
|
4854
4854
|
var $o = {};
|
4855
|
-
function
|
4855
|
+
function Ke(e) {
|
4856
4856
|
const t = $o[e];
|
4857
4857
|
return t || ue(0, e), t;
|
4858
4858
|
}
|
@@ -4872,7 +4872,7 @@ function Lo(e, t) {
|
|
4872
4872
|
};
|
4873
4873
|
}
|
4874
4874
|
function Zn(e, t) {
|
4875
|
-
t && (
|
4875
|
+
t && (Ke("Patches"), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = t);
|
4876
4876
|
}
|
4877
4877
|
function sn(e) {
|
4878
4878
|
on(e), e.drafts_.forEach(jo), e.drafts_ = null;
|
@@ -4884,14 +4884,14 @@ function Jn(e) {
|
|
4884
4884
|
return _t = Lo(_t, e);
|
4885
4885
|
}
|
4886
4886
|
function jo(e) {
|
4887
|
-
const t = e[
|
4887
|
+
const t = e[ge];
|
4888
4888
|
t.type_ === 0 || t.type_ === 1 ? t.revoke_() : t.revoked_ = !0;
|
4889
4889
|
}
|
4890
4890
|
function Qn(e, t) {
|
4891
4891
|
t.unfinalizedDrafts_ = t.drafts_.length;
|
4892
4892
|
const n = t.drafts_[0];
|
4893
|
-
return e !== void 0 && e !== n ? (n[
|
4894
|
-
n[
|
4893
|
+
return e !== void 0 && e !== n ? (n[ge].modified_ && (sn(t), ue(4)), We(e) && (e = Ot(t, e), t.parent_ || Pt(t, e)), t.patches_ && Ke("Patches").generateReplacementPatches_(
|
4894
|
+
n[ge].base_,
|
4895
4895
|
e,
|
4896
4896
|
t.patches_,
|
4897
4897
|
t.inversePatches_
|
@@ -4900,7 +4900,7 @@ function Qn(e, t) {
|
|
4900
4900
|
function Ot(e, t, n) {
|
4901
4901
|
if (Lt(t))
|
4902
4902
|
return t;
|
4903
|
-
const r = t[
|
4903
|
+
const r = t[ge];
|
4904
4904
|
if (!r)
|
4905
4905
|
return Tt(
|
4906
4906
|
t,
|
@@ -4917,7 +4917,7 @@ function Ot(e, t, n) {
|
|
4917
4917
|
r.type_ === 3 && (s = new Set(a), a.clear(), o = !0), Tt(
|
4918
4918
|
s,
|
4919
4919
|
(i, c) => er(e, r, a, i, c, n, o)
|
4920
|
-
), Pt(e, a, !1), n && e.patches_ &&
|
4920
|
+
), Pt(e, a, !1), n && e.patches_ && Ke("Patches").generatePatches_(
|
4921
4921
|
r,
|
4922
4922
|
n,
|
4923
4923
|
e.patches_,
|
@@ -4927,15 +4927,15 @@ function Ot(e, t, n) {
|
|
4927
4927
|
return r.copy_;
|
4928
4928
|
}
|
4929
4929
|
function er(e, t, n, r, a, s, o) {
|
4930
|
-
if (process.env.NODE_ENV !== "production" && a === n && ue(5),
|
4930
|
+
if (process.env.NODE_ENV !== "production" && a === n && ue(5), qe(a)) {
|
4931
4931
|
const i = s && t && t.type_ !== 3 && // Set objects are atomic since they have no keys.
|
4932
4932
|
!rn(t.assigned_, r) ? s.concat(r) : void 0, c = Ot(e, a, i);
|
4933
|
-
if (ea(n, r, c),
|
4933
|
+
if (ea(n, r, c), qe(c))
|
4934
4934
|
e.canAutoFreeze_ = !1;
|
4935
4935
|
else
|
4936
4936
|
return;
|
4937
4937
|
} else o && n.add(a);
|
4938
|
-
if (
|
4938
|
+
if (We(a) && !Lt(a)) {
|
4939
4939
|
if (!e.immer_.autoFreeze_ && e.unfinalizedDrafts_ < 1)
|
4940
4940
|
return;
|
4941
4941
|
Ot(e, a), (!t || !t.scope_.parent_) && typeof r != "symbol" && Object.prototype.propertyIsEnumerable.call(n, r) && Pt(e, a);
|
@@ -4975,26 +4975,26 @@ function Bo(e, t) {
|
|
4975
4975
|
}
|
4976
4976
|
var wn = {
|
4977
4977
|
get(e, t) {
|
4978
|
-
if (t ===
|
4978
|
+
if (t === ge)
|
4979
4979
|
return e;
|
4980
|
-
const n =
|
4980
|
+
const n = Ve(e);
|
4981
4981
|
if (!rn(n, t))
|
4982
4982
|
return zo(e, n, t);
|
4983
4983
|
const r = n[t];
|
4984
|
-
return e.finalized_ || !
|
4984
|
+
return e.finalized_ || !We(r) ? r : r === Yt(e.base_, t) ? (Zt(e), e.copy_[t] = ln(r, e)) : r;
|
4985
4985
|
},
|
4986
4986
|
has(e, t) {
|
4987
|
-
return t in
|
4987
|
+
return t in Ve(e);
|
4988
4988
|
},
|
4989
4989
|
ownKeys(e) {
|
4990
|
-
return Reflect.ownKeys(
|
4990
|
+
return Reflect.ownKeys(Ve(e));
|
4991
4991
|
},
|
4992
4992
|
set(e, t, n) {
|
4993
|
-
const r = na(
|
4993
|
+
const r = na(Ve(e), t);
|
4994
4994
|
if (r != null && r.set)
|
4995
4995
|
return r.set.call(e.draft_, n), !0;
|
4996
4996
|
if (!e.modified_) {
|
4997
|
-
const a = Yt(
|
4997
|
+
const a = Yt(Ve(e), t), s = a == null ? void 0 : a[ge];
|
4998
4998
|
if (s && s.base_ === n)
|
4999
4999
|
return e.copy_[t] = n, e.assigned_[t] = !1, !0;
|
5000
5000
|
if (Mo(n, a) && (n !== void 0 || rn(e.base_, t)))
|
@@ -5011,7 +5011,7 @@ var wn = {
|
|
5011
5011
|
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
5012
5012
|
// the same guarantee in ES5 mode.
|
5013
5013
|
getOwnPropertyDescriptor(e, t) {
|
5014
|
-
const n =
|
5014
|
+
const n = Ve(e), r = Reflect.getOwnPropertyDescriptor(n, t);
|
5015
5015
|
return r && {
|
5016
5016
|
writable: !0,
|
5017
5017
|
configurable: e.type_ !== 1 || t !== "length",
|
@@ -5041,8 +5041,8 @@ mt.set = function(e, t, n) {
|
|
5041
5041
|
return process.env.NODE_ENV !== "production" && t !== "length" && isNaN(parseInt(t)) && ue(14), wn.set.call(this, e[0], t, n, e[0]);
|
5042
5042
|
};
|
5043
5043
|
function Yt(e, t) {
|
5044
|
-
const n = e[
|
5045
|
-
return (n ?
|
5044
|
+
const n = e[ge];
|
5045
|
+
return (n ? Ve(n) : e)[t];
|
5046
5046
|
}
|
5047
5047
|
function zo(e, t, n) {
|
5048
5048
|
var a;
|
@@ -5086,7 +5086,7 @@ var Ho = class {
|
|
5086
5086
|
}
|
5087
5087
|
typeof n != "function" && ue(6), r !== void 0 && typeof r != "function" && ue(7);
|
5088
5088
|
let a;
|
5089
|
-
if (
|
5089
|
+
if (We(t)) {
|
5090
5090
|
const s = Jn(this), o = ln(t, void 0);
|
5091
5091
|
let i = !0;
|
5092
5092
|
try {
|
@@ -5098,7 +5098,7 @@ var Ho = class {
|
|
5098
5098
|
} else if (!t || typeof t != "object") {
|
5099
5099
|
if (a = n(t), a === void 0 && (a = t), a === Jr && (a = void 0), this.autoFreeze_ && En(a, !0), r) {
|
5100
5100
|
const s = [], o = [];
|
5101
|
-
|
5101
|
+
Ke("Patches").generateReplacementPatches_(t, a, s, o), r(s, o);
|
5102
5102
|
}
|
5103
5103
|
return a;
|
5104
5104
|
} else
|
@@ -5113,12 +5113,12 @@ var Ho = class {
|
|
5113
5113
|
}, typeof (e == null ? void 0 : e.autoFreeze) == "boolean" && this.setAutoFreeze(e.autoFreeze), typeof (e == null ? void 0 : e.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(e.useStrictShallowCopy);
|
5114
5114
|
}
|
5115
5115
|
createDraft(e) {
|
5116
|
-
|
5116
|
+
We(e) || ue(8), qe(e) && (e = Go(e));
|
5117
5117
|
const t = Jn(this), n = ln(e, void 0);
|
5118
|
-
return n[
|
5118
|
+
return n[ge].isManual_ = !0, on(t), n;
|
5119
5119
|
}
|
5120
5120
|
finishDraft(e, t) {
|
5121
|
-
const n = e && e[
|
5121
|
+
const n = e && e[ge];
|
5122
5122
|
(!n || !n.isManual_) && ue(9);
|
5123
5123
|
const { scope_: r } = n;
|
5124
5124
|
return Zn(r, t), Qn(void 0, r);
|
@@ -5149,24 +5149,24 @@ var Ho = class {
|
|
5149
5149
|
}
|
5150
5150
|
}
|
5151
5151
|
n > -1 && (t = t.slice(n + 1));
|
5152
|
-
const r =
|
5153
|
-
return
|
5152
|
+
const r = Ke("Patches").applyPatches_;
|
5153
|
+
return qe(e) ? r(e, t) : this.produce(
|
5154
5154
|
e,
|
5155
5155
|
(a) => r(a, t)
|
5156
5156
|
);
|
5157
5157
|
}
|
5158
5158
|
};
|
5159
5159
|
function ln(e, t) {
|
5160
|
-
const n = Dt(e) ?
|
5160
|
+
const n = Dt(e) ? Ke("MapSet").proxyMap_(e, t) : $t(e) ? Ke("MapSet").proxySet_(e, t) : Bo(e, t);
|
5161
5161
|
return (t ? t.scope_ : ta()).drafts_.push(n), n;
|
5162
5162
|
}
|
5163
5163
|
function Go(e) {
|
5164
|
-
return
|
5164
|
+
return qe(e) || ue(10, e), ra(e);
|
5165
5165
|
}
|
5166
5166
|
function ra(e) {
|
5167
|
-
if (!
|
5167
|
+
if (!We(e) || Lt(e))
|
5168
5168
|
return e;
|
5169
|
-
const t = e[
|
5169
|
+
const t = e[ge];
|
5170
5170
|
let n;
|
5171
5171
|
if (t) {
|
5172
5172
|
if (!t.modified_)
|
@@ -5178,14 +5178,14 @@ function ra(e) {
|
|
5178
5178
|
ea(n, r, ra(a));
|
5179
5179
|
}), t && (t.finalized_ = !1), n;
|
5180
5180
|
}
|
5181
|
-
var
|
5182
|
-
|
5183
|
-
|
5181
|
+
var he = new Ho(), Nn = he.produce;
|
5182
|
+
he.produceWithPatches.bind(
|
5183
|
+
he
|
5184
5184
|
);
|
5185
|
-
|
5186
|
-
|
5187
|
-
|
5188
|
-
var tr =
|
5185
|
+
he.setAutoFreeze.bind(he);
|
5186
|
+
he.setUseStrictShallowCopy.bind(he);
|
5187
|
+
he.applyPatches.bind(he);
|
5188
|
+
var tr = he.createDraft.bind(he), nr = he.finishDraft.bind(he), p = {
|
5189
5189
|
ancestors(e) {
|
5190
5190
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, {
|
5191
5191
|
reverse: n = !1
|
@@ -5423,7 +5423,7 @@ var qo = (e, t, n) => {
|
|
5423
5423
|
throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r, "] because the destination is past the end of the node."));
|
5424
5424
|
if (s.children.splice(o, 0, a), t)
|
5425
5425
|
for (var [i, c] of R.points(t))
|
5426
|
-
t[c] =
|
5426
|
+
t[c] = U.transform(i, n);
|
5427
5427
|
break;
|
5428
5428
|
}
|
5429
5429
|
case "insert_text": {
|
@@ -5436,22 +5436,22 @@ var qo = (e, t, n) => {
|
|
5436
5436
|
var _ = N.leaf(e, l), h = _.text.slice(0, u), m = _.text.slice(u);
|
5437
5437
|
if (_.text = h + d + m, t)
|
5438
5438
|
for (var [g, y] of R.points(t))
|
5439
|
-
t[y] =
|
5439
|
+
t[y] = U.transform(g, n);
|
5440
5440
|
break;
|
5441
5441
|
}
|
5442
5442
|
case "merge_node": {
|
5443
5443
|
var {
|
5444
5444
|
path: C
|
5445
|
-
} = n, x = N.get(e, C), v = p.previous(C), w = N.get(e, v),
|
5446
|
-
if (
|
5445
|
+
} = n, x = N.get(e, C), v = p.previous(C), w = N.get(e, v), G = N.parent(e, C), L = C[C.length - 1];
|
5446
|
+
if (W.isText(x) && W.isText(w))
|
5447
5447
|
w.text += x.text;
|
5448
|
-
else if (!
|
5448
|
+
else if (!W.isText(x) && !W.isText(w))
|
5449
5449
|
w.children.push(...x.children);
|
5450
5450
|
else
|
5451
5451
|
throw new Error('Cannot apply a "merge_node" operation at path ['.concat(C, "] to nodes of different interfaces: ").concat(Ee.stringify(x), " ").concat(Ee.stringify(w)));
|
5452
|
-
if (
|
5453
|
-
for (var [S,
|
5454
|
-
t[
|
5452
|
+
if (G.children.splice(L, 1), t)
|
5453
|
+
for (var [S, z] of R.points(t))
|
5454
|
+
t[z] = U.transform(S, n);
|
5455
5455
|
break;
|
5456
5456
|
}
|
5457
5457
|
case "move_node": {
|
@@ -5461,49 +5461,49 @@ var qo = (e, t, n) => {
|
|
5461
5461
|
} = n;
|
5462
5462
|
if (p.isAncestor(A, b))
|
5463
5463
|
throw new Error("Cannot move a path [".concat(A, "] to new path [").concat(b, "] because the destination is inside itself."));
|
5464
|
-
var T = N.get(e, A), D = N.parent(e, A),
|
5465
|
-
D.children.splice(
|
5466
|
-
var
|
5467
|
-
if (
|
5468
|
-
for (var [
|
5469
|
-
t[
|
5464
|
+
var T = N.get(e, A), D = N.parent(e, A), O = A[A.length - 1];
|
5465
|
+
D.children.splice(O, 1);
|
5466
|
+
var j = p.transform(A, n), $ = N.get(e, p.parent(j)), B = j[j.length - 1];
|
5467
|
+
if ($.children.splice(B, 0, T), t)
|
5468
|
+
for (var [M, ee] of R.points(t))
|
5469
|
+
t[ee] = U.transform(M, n);
|
5470
5470
|
break;
|
5471
5471
|
}
|
5472
5472
|
case "remove_node": {
|
5473
5473
|
var {
|
5474
5474
|
path: E
|
5475
|
-
} = n,
|
5476
|
-
if (
|
5477
|
-
for (var [
|
5478
|
-
var ce =
|
5475
|
+
} = n, X = E[E.length - 1], de = N.parent(e, E);
|
5476
|
+
if (de.children.splice(X, 1), t)
|
5477
|
+
for (var [J, pe] of R.points(t)) {
|
5478
|
+
var ce = U.transform(J, n);
|
5479
5479
|
if (t != null && ce != null)
|
5480
|
-
t[
|
5480
|
+
t[pe] = ce;
|
5481
5481
|
else {
|
5482
|
-
var
|
5483
|
-
for (var [
|
5484
|
-
if (p.compare(
|
5485
|
-
|
5482
|
+
var te = void 0, I = void 0;
|
5483
|
+
for (var [re, _e] of N.texts(e))
|
5484
|
+
if (p.compare(_e, E) === -1)
|
5485
|
+
te = [re, _e];
|
5486
5486
|
else {
|
5487
|
-
|
5487
|
+
I = [re, _e];
|
5488
5488
|
break;
|
5489
5489
|
}
|
5490
5490
|
var ze = !1;
|
5491
|
-
|
5491
|
+
te && I && (p.equals(I[1], E) ? ze = !p.hasPrevious(I[1]) : ze = p.common(te[1], E).length < p.common(I[1], E).length), te && !ze ? (J.path = te[1], J.offset = te[0].text.length) : I ? (J.path = I[1], J.offset = 0) : t = null;
|
5492
5492
|
}
|
5493
5493
|
}
|
5494
5494
|
break;
|
5495
5495
|
}
|
5496
5496
|
case "remove_text": {
|
5497
5497
|
var {
|
5498
|
-
path:
|
5499
|
-
offset:
|
5500
|
-
text:
|
5498
|
+
path: Ye,
|
5499
|
+
offset: Re,
|
5500
|
+
text: H
|
5501
5501
|
} = n;
|
5502
|
-
if (
|
5503
|
-
var oe = N.leaf(e,
|
5502
|
+
if (H.length === 0) break;
|
5503
|
+
var oe = N.leaf(e, Ye), ot = oe.text.slice(0, Re), le = oe.text.slice(Re + H.length);
|
5504
5504
|
if (oe.text = ot + le, t)
|
5505
5505
|
for (var [Me, Ze] of R.points(t))
|
5506
|
-
t[Ze] =
|
5506
|
+
t[Ze] = U.transform(Me, n);
|
5507
5507
|
break;
|
5508
5508
|
}
|
5509
5509
|
case "set_node": {
|
@@ -5527,18 +5527,18 @@ var qo = (e, t, n) => {
|
|
5527
5527
|
}
|
5528
5528
|
case "set_selection": {
|
5529
5529
|
var {
|
5530
|
-
newProperties:
|
5530
|
+
newProperties: He
|
5531
5531
|
} = n;
|
5532
|
-
if (
|
5533
|
-
t =
|
5532
|
+
if (He == null)
|
5533
|
+
t = He;
|
5534
5534
|
else {
|
5535
5535
|
if (t == null) {
|
5536
|
-
if (!R.isRange(
|
5537
|
-
throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Ee.stringify(
|
5538
|
-
t = it({},
|
5536
|
+
if (!R.isRange(He))
|
5537
|
+
throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Ee.stringify(He), " when there is no current selection."));
|
5538
|
+
t = it({}, He);
|
5539
5539
|
}
|
5540
|
-
for (var Qe in
|
5541
|
-
var Hn =
|
5540
|
+
for (var Qe in He) {
|
5541
|
+
var Hn = He[Qe];
|
5542
5542
|
if (Hn == null) {
|
5543
5543
|
if (Qe === "anchor" || Qe === "focus")
|
5544
5544
|
throw new Error('Cannot remove the "'.concat(Qe, '" selection property'));
|
@@ -5557,21 +5557,21 @@ var qo = (e, t, n) => {
|
|
5557
5557
|
} = n;
|
5558
5558
|
if (et.length === 0)
|
5559
5559
|
throw new Error('Cannot apply a "split_node" operation at path ['.concat(et, "] because the root node cannot be split."));
|
5560
|
-
var
|
5561
|
-
if (
|
5562
|
-
var Oa =
|
5563
|
-
|
5560
|
+
var Ge = N.get(e, et), Sa = N.parent(e, et), Ta = et[et.length - 1], Kt;
|
5561
|
+
if (W.isText(Ge)) {
|
5562
|
+
var Oa = Ge.text.slice(0, kt), Pa = Ge.text.slice(kt);
|
5563
|
+
Ge.text = Oa, Kt = it(it({}, Gn), {}, {
|
5564
5564
|
text: Pa
|
5565
5565
|
});
|
5566
5566
|
} else {
|
5567
|
-
var Aa =
|
5568
|
-
|
5567
|
+
var Aa = Ge.children.slice(0, kt), Ia = Ge.children.slice(kt);
|
5568
|
+
Ge.children = Aa, Kt = it(it({}, Gn), {}, {
|
5569
5569
|
children: Ia
|
5570
5570
|
});
|
5571
5571
|
}
|
5572
5572
|
if (Sa.children.splice(Ta + 1, 0, Kt), t)
|
5573
5573
|
for (var [Ra, Ma] of R.points(t))
|
5574
|
-
t[Ma] =
|
5574
|
+
t[Ma] = U.transform(Ra, n);
|
5575
5575
|
break;
|
5576
5576
|
}
|
5577
5577
|
}
|
@@ -5583,7 +5583,7 @@ var qo = (e, t, n) => {
|
|
5583
5583
|
try {
|
5584
5584
|
n = qo(e, n, t);
|
5585
5585
|
} finally {
|
5586
|
-
e.children = nr(e.children), n ? e.selection =
|
5586
|
+
e.children = nr(e.children), n ? e.selection = qe(n) ? nr(n) : n : e.selection = null;
|
5587
5587
|
}
|
5588
5588
|
}
|
5589
5589
|
}, Ko = {
|
@@ -5707,21 +5707,21 @@ var R = {
|
|
5707
5707
|
return t;
|
5708
5708
|
},
|
5709
5709
|
equals(e, t) {
|
5710
|
-
return
|
5710
|
+
return U.equals(e.anchor, t.anchor) && U.equals(e.focus, t.focus);
|
5711
5711
|
},
|
5712
5712
|
includes(e, t) {
|
5713
5713
|
if (R.isRange(t)) {
|
5714
5714
|
if (R.includes(e, t.anchor) || R.includes(e, t.focus))
|
5715
5715
|
return !0;
|
5716
5716
|
var [n, r] = R.edges(e), [a, s] = R.edges(t);
|
5717
|
-
return
|
5717
|
+
return U.isBefore(n, a) && U.isAfter(r, s);
|
5718
5718
|
}
|
5719
5719
|
var [o, i] = R.edges(e), c = !1, l = !1;
|
5720
|
-
return
|
5720
|
+
return U.isPoint(t) ? (c = U.compare(t, o) >= 0, l = U.compare(t, i) <= 0) : (c = p.compare(t, o.path) >= 0, l = p.compare(t, i.path) <= 0), c && l;
|
5721
5721
|
},
|
5722
5722
|
intersection(e, t) {
|
5723
|
-
var n = ht(e, Zo), [r, a] = R.edges(e), [s, o] = R.edges(t), i =
|
5724
|
-
return
|
5723
|
+
var n = ht(e, Zo), [r, a] = R.edges(e), [s, o] = R.edges(t), i = U.isBefore(r, s) ? s : r, c = U.isBefore(a, o) ? a : o;
|
5724
|
+
return U.isBefore(c, i) ? null : Jo({
|
5725
5725
|
anchor: i,
|
5726
5726
|
focus: c
|
5727
5727
|
}, n);
|
@@ -5731,14 +5731,14 @@ var R = {
|
|
5731
5731
|
anchor: t,
|
5732
5732
|
focus: n
|
5733
5733
|
} = e;
|
5734
|
-
return
|
5734
|
+
return U.isAfter(t, n);
|
5735
5735
|
},
|
5736
5736
|
isCollapsed(e) {
|
5737
5737
|
var {
|
5738
5738
|
anchor: t,
|
5739
5739
|
focus: n
|
5740
5740
|
} = e;
|
5741
|
-
return
|
5741
|
+
return U.equals(t, n);
|
5742
5742
|
},
|
5743
5743
|
isExpanded(e) {
|
5744
5744
|
return !R.isCollapsed(e);
|
@@ -5747,7 +5747,7 @@ var R = {
|
|
5747
5747
|
return !R.isBackward(e);
|
5748
5748
|
},
|
5749
5749
|
isRange(e) {
|
5750
|
-
return ae(e) &&
|
5750
|
+
return ae(e) && U.isPoint(e.anchor) && U.isPoint(e.focus);
|
5751
5751
|
},
|
5752
5752
|
*points(e) {
|
5753
5753
|
yield [e.anchor, "anchor"], yield [e.focus, "focus"];
|
@@ -5768,9 +5768,9 @@ var R = {
|
|
5768
5768
|
var i = R.isCollapsed(r);
|
5769
5769
|
R.isForward(r) ? (s = "forward", o = i ? s : "backward") : (s = "backward", o = i ? s : "forward");
|
5770
5770
|
} else a === "outward" ? R.isForward(r) ? (s = "backward", o = "forward") : (s = "forward", o = "backward") : (s = a, o = a);
|
5771
|
-
var c =
|
5771
|
+
var c = U.transform(r.anchor, t, {
|
5772
5772
|
affinity: s
|
5773
|
-
}), l =
|
5773
|
+
}), l = U.transform(r.focus, t, {
|
5774
5774
|
affinity: o
|
5775
5775
|
});
|
5776
5776
|
if (!c || !l)
|
@@ -5778,7 +5778,7 @@ var R = {
|
|
5778
5778
|
r.anchor = c, r.focus = l;
|
5779
5779
|
});
|
5780
5780
|
}
|
5781
|
-
}, sr = (e) => ae(e) && N.isNodeList(e.children) && !
|
5781
|
+
}, sr = (e) => ae(e) && N.isNodeList(e.children) && !ye.isEditor(e), De = {
|
5782
5782
|
isAncestor(e) {
|
5783
5783
|
return ae(e) && N.isNodeList(e.children);
|
5784
5784
|
},
|
@@ -5802,7 +5802,7 @@ var R = {
|
|
5802
5802
|
}, Qo = ["children"], ei = ["text"], or = /* @__PURE__ */ new WeakMap(), N = {
|
5803
5803
|
ancestor(e, t) {
|
5804
5804
|
var n = N.get(e, t);
|
5805
|
-
if (
|
5805
|
+
if (W.isText(n))
|
5806
5806
|
throw new Error("Cannot get the ancestor node at path [".concat(t, "] because it refers to a text node instead: ").concat(Ee.stringify(n)));
|
5807
5807
|
return n;
|
5808
5808
|
},
|
@@ -5816,7 +5816,7 @@ var R = {
|
|
5816
5816
|
}();
|
5817
5817
|
},
|
5818
5818
|
child(e, t) {
|
5819
|
-
if (
|
5819
|
+
if (W.isText(e))
|
5820
5820
|
throw new Error("Cannot get the child of a text node: ".concat(Ee.stringify(e)));
|
5821
5821
|
var n = e.children[t];
|
5822
5822
|
if (n == null)
|
@@ -5842,7 +5842,7 @@ var R = {
|
|
5842
5842
|
},
|
5843
5843
|
descendant(e, t) {
|
5844
5844
|
var n = N.get(e, t);
|
5845
|
-
if (
|
5845
|
+
if (ye.isEditor(n))
|
5846
5846
|
throw new Error("Cannot get the descendant node at path [".concat(t, "] because it refers to the root editor node instead: ").concat(Ee.stringify(n)));
|
5847
5847
|
return n;
|
5848
5848
|
},
|
@@ -5870,12 +5870,12 @@ var R = {
|
|
5870
5870
|
}
|
5871
5871
|
},
|
5872
5872
|
first(e, t) {
|
5873
|
-
for (var n = t.slice(), r = N.get(e, n); r && !(
|
5873
|
+
for (var n = t.slice(), r = N.get(e, n); r && !(W.isText(r) || r.children.length === 0); )
|
5874
5874
|
r = r.children[0], n.push(0);
|
5875
5875
|
return [r, n];
|
5876
5876
|
},
|
5877
5877
|
fragment(e, t) {
|
5878
|
-
if (
|
5878
|
+
if (W.isText(e))
|
5879
5879
|
throw new Error("Cannot get a fragment starting from a root text node: ".concat(Ee.stringify(e)));
|
5880
5880
|
var n = Nn({
|
5881
5881
|
children: e.children
|
@@ -5901,14 +5901,14 @@ var R = {
|
|
5901
5901
|
d.text = d.text.slice(a.offset);
|
5902
5902
|
}
|
5903
5903
|
}
|
5904
|
-
|
5904
|
+
ye.isEditor(r) && (r.selection = null);
|
5905
5905
|
});
|
5906
5906
|
return n.children;
|
5907
5907
|
},
|
5908
5908
|
get(e, t) {
|
5909
5909
|
for (var n = e, r = 0; r < t.length; r++) {
|
5910
5910
|
var a = t[r];
|
5911
|
-
if (
|
5911
|
+
if (W.isText(n) || !n.children[a])
|
5912
5912
|
throw new Error("Cannot find a descendant at path [".concat(t, "] in node: ").concat(Ee.stringify(e)));
|
5913
5913
|
n = n.children[a];
|
5914
5914
|
}
|
@@ -5917,14 +5917,14 @@ var R = {
|
|
5917
5917
|
has(e, t) {
|
5918
5918
|
for (var n = e, r = 0; r < t.length; r++) {
|
5919
5919
|
var a = t[r];
|
5920
|
-
if (
|
5920
|
+
if (W.isText(n) || !n.children[a])
|
5921
5921
|
return !1;
|
5922
5922
|
n = n.children[a];
|
5923
5923
|
}
|
5924
5924
|
return !0;
|
5925
5925
|
},
|
5926
5926
|
isNode(e) {
|
5927
|
-
return
|
5927
|
+
return W.isText(e) || De.isElement(e) || ye.isEditor(e);
|
5928
5928
|
},
|
5929
5929
|
isNodeList(e) {
|
5930
5930
|
if (!Array.isArray(e))
|
@@ -5936,7 +5936,7 @@ var R = {
|
|
5936
5936
|
return or.set(e, n), n;
|
5937
5937
|
},
|
5938
5938
|
last(e, t) {
|
5939
|
-
for (var n = t.slice(), r = N.get(e, n); r && !(
|
5939
|
+
for (var n = t.slice(), r = N.get(e, n); r && !(W.isText(r) || r.children.length === 0); ) {
|
5940
5940
|
var a = r.children.length - 1;
|
5941
5941
|
r = r.children[a], n.push(a);
|
5942
5942
|
}
|
@@ -5944,7 +5944,7 @@ var R = {
|
|
5944
5944
|
},
|
5945
5945
|
leaf(e, t) {
|
5946
5946
|
var n = N.get(e, t);
|
5947
|
-
if (!
|
5947
|
+
if (!W.isText(n))
|
5948
5948
|
throw new Error("Cannot get the leaf node at path [".concat(t, "] because it refers to a non-leaf node: ").concat(Ee.stringify(n)));
|
5949
5949
|
return n;
|
5950
5950
|
},
|
@@ -5958,7 +5958,7 @@ var R = {
|
|
5958
5958
|
}();
|
5959
5959
|
},
|
5960
5960
|
matches(e, t) {
|
5961
|
-
return De.isElement(e) && De.isElementProps(t) && De.matches(e, t) ||
|
5961
|
+
return De.isElement(e) && De.isElementProps(t) && De.matches(e, t) || W.isText(e) && W.isTextProps(t) && W.matches(e, t);
|
5962
5962
|
},
|
5963
5963
|
nodes(e) {
|
5964
5964
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
@@ -5970,7 +5970,7 @@ var R = {
|
|
5970
5970
|
from: a = [],
|
5971
5971
|
to: s
|
5972
5972
|
} = t, o = /* @__PURE__ */ new Set(), i = [], c = e; !(s && (r ? p.isBefore(i, s) : p.isAfter(i, s))); ) {
|
5973
|
-
if (o.has(c) || (yield [c, i]), !o.has(c) && !
|
5973
|
+
if (o.has(c) || (yield [c, i]), !o.has(c) && !W.isText(c) && c.children.length !== 0 && (n == null || n([c, i]) === !1)) {
|
5974
5974
|
o.add(c);
|
5975
5975
|
var l = r ? c.children.length - 1 : 0;
|
5976
5976
|
p.isAncestor(i, a) && (l = a[i.length]), i = i.concat(l), c = N.get(e, i);
|
@@ -5996,18 +5996,18 @@ var R = {
|
|
5996
5996
|
},
|
5997
5997
|
parent(e, t) {
|
5998
5998
|
var n = p.parent(t), r = N.get(e, n);
|
5999
|
-
if (
|
5999
|
+
if (W.isText(r))
|
6000
6000
|
throw new Error("Cannot get the parent of path [".concat(t, "] because it does not exist in the root."));
|
6001
6001
|
return r;
|
6002
6002
|
},
|
6003
6003
|
string(e) {
|
6004
|
-
return
|
6004
|
+
return W.isText(e) ? e.text : e.children.map(N.string).join("");
|
6005
6005
|
},
|
6006
6006
|
texts(e) {
|
6007
6007
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
6008
6008
|
return function* () {
|
6009
6009
|
for (var [n, r] of N.nodes(e, t))
|
6010
|
-
|
6010
|
+
W.isText(n) && (yield [n, r]);
|
6011
6011
|
}();
|
6012
6012
|
}
|
6013
6013
|
};
|
@@ -6153,7 +6153,7 @@ var ct = {
|
|
6153
6153
|
return !1;
|
6154
6154
|
var n = typeof e.addMark == "function" && typeof e.apply == "function" && typeof e.deleteFragment == "function" && typeof e.insertBreak == "function" && typeof e.insertSoftBreak == "function" && typeof e.insertFragment == "function" && typeof e.insertNode == "function" && typeof e.insertText == "function" && typeof e.isElementReadOnly == "function" && typeof e.isInline == "function" && typeof e.isSelectable == "function" && typeof e.isVoid == "function" && typeof e.normalizeNode == "function" && typeof e.onChange == "function" && typeof e.removeMark == "function" && typeof e.getDirtyPaths == "function" && (e.marks === null || ae(e.marks)) && (e.selection === null || R.isRange(e.selection)) && N.isNodeList(e.children) && ct.isOperationList(e.operations);
|
6155
6155
|
return cr.set(e, n), n;
|
6156
|
-
},
|
6156
|
+
}, ye = {
|
6157
6157
|
above(e, t) {
|
6158
6158
|
return e.above(t);
|
6159
6159
|
},
|
@@ -6361,16 +6361,16 @@ function ur(e) {
|
|
6361
6361
|
}
|
6362
6362
|
return e;
|
6363
6363
|
}
|
6364
|
-
var
|
6364
|
+
var U = {
|
6365
6365
|
compare(e, t) {
|
6366
6366
|
var n = p.compare(e.path, t.path);
|
6367
6367
|
return n === 0 ? e.offset < t.offset ? -1 : e.offset > t.offset ? 1 : 0 : n;
|
6368
6368
|
},
|
6369
6369
|
isAfter(e, t) {
|
6370
|
-
return
|
6370
|
+
return U.compare(e, t) === 1;
|
6371
6371
|
},
|
6372
6372
|
isBefore(e, t) {
|
6373
|
-
return
|
6373
|
+
return U.compare(e, t) === -1;
|
6374
6374
|
},
|
6375
6375
|
equals(e, t) {
|
6376
6376
|
return e.offset === t.offset && p.equals(e.path, t.path);
|
@@ -6445,7 +6445,7 @@ function dr(e, t) {
|
|
6445
6445
|
}
|
6446
6446
|
return n;
|
6447
6447
|
}
|
6448
|
-
function
|
6448
|
+
function Te(e) {
|
6449
6449
|
for (var t = 1; t < arguments.length; t++) {
|
6450
6450
|
var n = arguments[t] != null ? arguments[t] : {};
|
6451
6451
|
t % 2 ? dr(Object(n), !0).forEach(function(r) {
|
@@ -6456,7 +6456,7 @@ function Oe(e) {
|
|
6456
6456
|
}
|
6457
6457
|
return e;
|
6458
6458
|
}
|
6459
|
-
var
|
6459
|
+
var W = {
|
6460
6460
|
equals(e, t) {
|
6461
6461
|
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, {
|
6462
6462
|
loose: r = !1
|
@@ -6471,7 +6471,7 @@ var K = {
|
|
6471
6471
|
return ae(e) && typeof e.text == "string";
|
6472
6472
|
},
|
6473
6473
|
isTextList(e) {
|
6474
|
-
return Array.isArray(e) && e.every((t) =>
|
6474
|
+
return Array.isArray(e) && e.every((t) => W.isText(t));
|
6475
6475
|
},
|
6476
6476
|
isTextProps(e) {
|
6477
6477
|
return e.text !== void 0;
|
@@ -6483,7 +6483,7 @@ var K = {
|
|
6483
6483
|
return !0;
|
6484
6484
|
},
|
6485
6485
|
decorations(e, t) {
|
6486
|
-
var n = [
|
6486
|
+
var n = [Te({}, e)];
|
6487
6487
|
for (var r of t) {
|
6488
6488
|
var a = ht(r, ri), [s, o] = R.edges(r), i = [], c = 0, l = s.offset, u = o.offset;
|
6489
6489
|
for (var d of n) {
|
@@ -6501,17 +6501,17 @@ var K = {
|
|
6501
6501
|
var m = d, g = void 0, y = void 0;
|
6502
6502
|
if (u < c) {
|
6503
6503
|
var C = u - h;
|
6504
|
-
y =
|
6504
|
+
y = Te(Te({}, m), {}, {
|
6505
6505
|
text: m.text.slice(C)
|
6506
|
-
}), m =
|
6506
|
+
}), m = Te(Te({}, m), {}, {
|
6507
6507
|
text: m.text.slice(0, C)
|
6508
6508
|
});
|
6509
6509
|
}
|
6510
6510
|
if (l > h) {
|
6511
6511
|
var x = l - h;
|
6512
|
-
g =
|
6512
|
+
g = Te(Te({}, m), {}, {
|
6513
6513
|
text: m.text.slice(0, x)
|
6514
|
-
}), m =
|
6514
|
+
}), m = Te(Te({}, m), {}, {
|
6515
6515
|
text: m.text.slice(x)
|
6516
6516
|
});
|
6517
6517
|
}
|
@@ -6521,11 +6521,11 @@ var K = {
|
|
6521
6521
|
}
|
6522
6522
|
return n;
|
6523
6523
|
}
|
6524
|
-
}, ai = (e) => e.selection ? e.selection : e.children.length > 0 ?
|
6524
|
+
}, ai = (e) => e.selection ? e.selection : e.children.length > 0 ? ye.end(e, []) : [0], V;
|
6525
6525
|
(function(e) {
|
6526
6526
|
e[e.None = 0] = "None", e[e.Extend = 1] = "Extend", e[e.ZWJ = 2] = "ZWJ", e[e.RI = 4] = "RI", e[e.Prepend = 8] = "Prepend", e[e.SpacingMark = 16] = "SpacingMark", e[e.L = 32] = "L", e[e.V = 64] = "V", e[e.T = 128] = "T", e[e.LV = 256] = "LV", e[e.LVT = 512] = "LVT", e[e.ExtPict = 1024] = "ExtPict", e[e.Any = 2048] = "Any";
|
6527
|
-
})(
|
6528
|
-
|
6527
|
+
})(V || (V = {}));
|
6528
|
+
V.L, V.L | V.V | V.LV | V.LVT, V.LV | V.V, V.V | V.T, V.LVT | V.T, V.T, V.Any, V.Extend | V.ZWJ, V.Any, V.SpacingMark, V.Prepend, V.Any, V.ZWJ, V.ExtPict, V.RI, V.RI;
|
6529
6529
|
var si = {
|
6530
6530
|
delete(e, t) {
|
6531
6531
|
e.delete(t);
|
@@ -6535,22 +6535,22 @@ var si = {
|
|
6535
6535
|
},
|
6536
6536
|
insertText(e, t) {
|
6537
6537
|
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
6538
|
-
|
6538
|
+
ye.withoutNormalizing(e, () => {
|
6539
6539
|
var {
|
6540
6540
|
voids: r = !1
|
6541
6541
|
} = n, {
|
6542
6542
|
at: a = ai(e)
|
6543
6543
|
} = n;
|
6544
|
-
if (p.isPath(a) && (a =
|
6544
|
+
if (p.isPath(a) && (a = ye.range(e, a)), R.isRange(a))
|
6545
6545
|
if (R.isCollapsed(a))
|
6546
6546
|
a = a.anchor;
|
6547
6547
|
else {
|
6548
6548
|
var s = R.end(a);
|
6549
|
-
if (!r &&
|
6549
|
+
if (!r && ye.void(e, {
|
6550
6550
|
at: s
|
6551
6551
|
}))
|
6552
6552
|
return;
|
6553
|
-
var o = R.start(a), i =
|
6553
|
+
var o = R.start(a), i = ye.pointRef(e, o), c = ye.pointRef(e, s);
|
6554
6554
|
mr.delete(e, {
|
6555
6555
|
at: a,
|
6556
6556
|
voids: r
|
@@ -6561,9 +6561,9 @@ var si = {
|
|
6561
6561
|
focus: a
|
6562
6562
|
});
|
6563
6563
|
}
|
6564
|
-
if (!(!r &&
|
6564
|
+
if (!(!r && ye.void(e, {
|
6565
6565
|
at: a
|
6566
|
-
}) ||
|
6566
|
+
}) || ye.elementReadOnly(e, {
|
6567
6567
|
at: a
|
6568
6568
|
}))) {
|
6569
6569
|
var {
|
@@ -6603,7 +6603,7 @@ function bt(e) {
|
|
6603
6603
|
}
|
6604
6604
|
var mr = bt(bt(bt(bt({}, Wo), Ko), Xo), si);
|
6605
6605
|
function sa(e) {
|
6606
|
-
if (
|
6606
|
+
if (W.isText(e)) {
|
6607
6607
|
let t = e == null ? void 0 : e.text;
|
6608
6608
|
return e != null && e.bold && (t = `<strong>${t}</strong>`), e != null && e.code && (t = `<code>${t}</code>`), e != null && e.italic && (t = `<em>${t}</em>`), e != null && e.underline && (t = `<u>${t}</u>`), t;
|
6609
6609
|
}
|
@@ -6674,11 +6674,11 @@ function un(e) {
|
|
6674
6674
|
function al(e) {
|
6675
6675
|
return e.map((t) => sa(t)).join("");
|
6676
6676
|
}
|
6677
|
-
var
|
6677
|
+
var Y = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
6678
6678
|
function oi(e) {
|
6679
6679
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
6680
6680
|
}
|
6681
|
-
var oa = {}, Fn = {}, Sn = {},
|
6681
|
+
var oa = {}, Fn = {}, Sn = {}, Xe = {}, Tn = {}, On = {};
|
6682
6682
|
(function(e) {
|
6683
6683
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.Doctype = e.CDATA = e.Tag = e.Style = e.Script = e.Comment = e.Directive = e.Text = e.Root = e.isTag = e.ElementType = void 0;
|
6684
6684
|
var t;
|
@@ -6690,7 +6690,7 @@ var oa = {}, Fn = {}, Sn = {}, Ye = {}, Tn = {}, On = {};
|
|
6690
6690
|
}
|
6691
6691
|
e.isTag = n, e.Root = t.Root, e.Text = t.Text, e.Directive = t.Directive, e.Comment = t.Comment, e.Script = t.Script, e.Style = t.Style, e.Tag = t.Tag, e.CDATA = t.CDATA, e.Doctype = t.Doctype;
|
6692
6692
|
})(On);
|
6693
|
-
var P = {}, je =
|
6693
|
+
var P = {}, je = Y && Y.__extends || /* @__PURE__ */ function() {
|
6694
6694
|
var e = function(t, n) {
|
6695
6695
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, a) {
|
6696
6696
|
r.__proto__ = a;
|
@@ -6707,7 +6707,7 @@ var P = {}, je = Z && Z.__extends || /* @__PURE__ */ function() {
|
|
6707
6707
|
}
|
6708
6708
|
t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
|
6709
6709
|
};
|
6710
|
-
}(), ut =
|
6710
|
+
}(), ut = Y && Y.__assign || function() {
|
6711
6711
|
return ut = Object.assign || function(e) {
|
6712
6712
|
for (var t, n = 1, r = arguments.length; n < r; n++) {
|
6713
6713
|
t = arguments[n];
|
@@ -7040,7 +7040,7 @@ function Jt(e) {
|
|
7040
7040
|
return t;
|
7041
7041
|
}
|
7042
7042
|
(function(e) {
|
7043
|
-
var t =
|
7043
|
+
var t = Y && Y.__createBinding || (Object.create ? function(i, c, l, u) {
|
7044
7044
|
u === void 0 && (u = l);
|
7045
7045
|
var d = Object.getOwnPropertyDescriptor(c, l);
|
7046
7046
|
(!d || ("get" in d ? !c.__esModule : d.writable || d.configurable)) && (d = { enumerable: !0, get: function() {
|
@@ -7048,7 +7048,7 @@ function Jt(e) {
|
|
7048
7048
|
} }), Object.defineProperty(i, u, d);
|
7049
7049
|
} : function(i, c, l, u) {
|
7050
7050
|
u === void 0 && (u = l), i[u] = c[l];
|
7051
|
-
}), n =
|
7051
|
+
}), n = Y && Y.__exportStar || function(i, c) {
|
7052
7052
|
for (var l in i) l !== "default" && !Object.prototype.hasOwnProperty.call(c, l) && t(c, i, l);
|
7053
7053
|
};
|
7054
7054
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.DomHandler = void 0;
|
@@ -7155,11 +7155,11 @@ var va = {};
|
|
7155
7155
|
return t[n.toLowerCase()] = n, t;
|
7156
7156
|
}, {}), e.CARRIAGE_RETURN = "\r", e.CARRIAGE_RETURN_REGEX = new RegExp(e.CARRIAGE_RETURN, "g"), e.CARRIAGE_RETURN_PLACEHOLDER = "__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(), "__"), e.CARRIAGE_RETURN_PLACEHOLDER_REGEX = new RegExp(e.CARRIAGE_RETURN_PLACEHOLDER, "g");
|
7157
7157
|
})(va);
|
7158
|
-
Object.defineProperty(
|
7159
|
-
|
7160
|
-
|
7161
|
-
|
7162
|
-
|
7158
|
+
Object.defineProperty(Xe, "__esModule", { value: !0 });
|
7159
|
+
Xe.formatAttributes = ka;
|
7160
|
+
Xe.escapeSpecialCharacters = ui;
|
7161
|
+
Xe.revertEscapedCharacters = Ca;
|
7162
|
+
Xe.formatDOM = ba;
|
7163
7163
|
var xt = Tn, pt = va;
|
7164
7164
|
function ci(e) {
|
7165
7165
|
return pt.CASE_SENSITIVE_TAG_NAMES_MAP[e];
|
@@ -7212,7 +7212,7 @@ function ba(e, t, n) {
|
|
7212
7212
|
}
|
7213
7213
|
Object.defineProperty(Sn, "__esModule", { value: !0 });
|
7214
7214
|
Sn.default = gi;
|
7215
|
-
var fi =
|
7215
|
+
var fi = Xe, gr = "html", hr = "head", Et = "body", di = /<([a-zA-Z]+[0-9]?)/, pr = /<head[^]*>/i, yr = /<body[^]*>/i, At = function(e, t) {
|
7216
7216
|
throw new Error("This browser does not support `document.implementation.createHTMLDocument`");
|
7217
7217
|
}, fn = function(e, t) {
|
7218
7218
|
throw new Error("This browser does not support `DOMParser.prototype.parseFromString`");
|
@@ -7267,12 +7267,12 @@ function gi(e) {
|
|
7267
7267
|
}
|
7268
7268
|
}
|
7269
7269
|
}
|
7270
|
-
var hi =
|
7270
|
+
var hi = Y && Y.__importDefault || function(e) {
|
7271
7271
|
return e && e.__esModule ? e : { default: e };
|
7272
7272
|
};
|
7273
7273
|
Object.defineProperty(Fn, "__esModule", { value: !0 });
|
7274
7274
|
Fn.default = ki;
|
7275
|
-
var pi = hi(Sn), yi =
|
7275
|
+
var pi = hi(Sn), yi = Xe, vi = /<(![a-zA-Z\s]+)>/;
|
7276
7276
|
function ki(e) {
|
7277
7277
|
if (typeof e != "string")
|
7278
7278
|
throw new TypeError("First argument must be a string");
|
@@ -7281,7 +7281,7 @@ function ki(e) {
|
|
7281
7281
|
var t = e.match(vi), n = t ? t[1] : void 0;
|
7282
7282
|
return (0, yi.formatDOM)((0, pi.default)(e), null, n);
|
7283
7283
|
}
|
7284
|
-
var zt = {},
|
7284
|
+
var zt = {}, xe = {}, Ht = {}, Ci = 0;
|
7285
7285
|
Ht.SAME = Ci;
|
7286
7286
|
var bi = 1;
|
7287
7287
|
Ht.CAMELCASE = bi;
|
@@ -8194,18 +8194,18 @@ const {
|
|
8194
8194
|
const n = kr[t];
|
8195
8195
|
return n === Fi ? e[t] = t : n === Ni ? e[t.toLowerCase()] = t : e[t] = n, e;
|
8196
8196
|
}, {});
|
8197
|
-
|
8198
|
-
|
8199
|
-
|
8200
|
-
|
8201
|
-
|
8202
|
-
|
8203
|
-
|
8204
|
-
|
8205
|
-
|
8206
|
-
|
8197
|
+
xe.BOOLEAN = Vt;
|
8198
|
+
xe.BOOLEANISH_STRING = Gt;
|
8199
|
+
xe.NUMERIC = Ea;
|
8200
|
+
xe.OVERLOADED_BOOLEAN = In;
|
8201
|
+
xe.POSITIVE_NUMERIC = wa;
|
8202
|
+
xe.RESERVED = xa;
|
8203
|
+
xe.STRING = Be;
|
8204
|
+
xe.getPropertyInfo = xi;
|
8205
|
+
xe.isCustomAttribute = Oi;
|
8206
|
+
xe.possibleStandardNames = Pi;
|
8207
8207
|
var Dn = {}, $n = {}, Cr = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, Ai = /\n/g, Ii = /^\s*/, Ri = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, Mi = /^:\s*/, Di = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, $i = /^[;\s]*/, Li = /^\s+|\s+$/g, ji = `
|
8208
|
-
`, br = "/", xr = "*",
|
8208
|
+
`, br = "/", xr = "*", Ue = "", Bi = "comment", zi = "declaration", Hi = function(e, t) {
|
8209
8209
|
if (typeof e != "string")
|
8210
8210
|
throw new TypeError("First argument must be a string");
|
8211
8211
|
if (!e) return [];
|
@@ -8252,9 +8252,9 @@ var Dn = {}, $n = {}, Cr = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, Ai = /\n/g, Ii = /
|
|
8252
8252
|
function d() {
|
8253
8253
|
var m = s();
|
8254
8254
|
if (!(br != e.charAt(0) || xr != e.charAt(1))) {
|
8255
|
-
for (var g = 2;
|
8255
|
+
for (var g = 2; Ue != e.charAt(g) && (xr != e.charAt(g) || br != e.charAt(g + 1)); )
|
8256
8256
|
++g;
|
8257
|
-
if (g += 2,
|
8257
|
+
if (g += 2, Ue === e.charAt(g - 1))
|
8258
8258
|
return i("End of comment missing");
|
8259
8259
|
var y = e.slice(2, g - 2);
|
8260
8260
|
return r += 2, a(y), e = e.slice(g), r += 2, m({
|
@@ -8269,8 +8269,8 @@ var Dn = {}, $n = {}, Cr = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, Ai = /\n/g, Ii = /
|
|
8269
8269
|
if (d(), !c(Mi)) return i("property missing ':'");
|
8270
8270
|
var y = c(Di), C = m({
|
8271
8271
|
type: zi,
|
8272
|
-
property: Er(g[0].replace(Cr,
|
8273
|
-
value: y ? Er(y[0].replace(Cr,
|
8272
|
+
property: Er(g[0].replace(Cr, Ue)),
|
8273
|
+
value: y ? Er(y[0].replace(Cr, Ue)) : Ue
|
8274
8274
|
});
|
8275
8275
|
return c($i), C;
|
8276
8276
|
}
|
@@ -8285,9 +8285,9 @@ var Dn = {}, $n = {}, Cr = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, Ai = /\n/g, Ii = /
|
|
8285
8285
|
return l(), h();
|
8286
8286
|
};
|
8287
8287
|
function Er(e) {
|
8288
|
-
return e ? e.replace(Li,
|
8288
|
+
return e ? e.replace(Li, Ue) : Ue;
|
8289
8289
|
}
|
8290
|
-
var Gi =
|
8290
|
+
var Gi = Y && Y.__importDefault || function(e) {
|
8291
8291
|
return e && e.__esModule ? e : { default: e };
|
8292
8292
|
};
|
8293
8293
|
Object.defineProperty($n, "__esModule", { value: !0 });
|
@@ -8318,7 +8318,7 @@ var qi = /^--[a-zA-Z0-9_-]+$/, Wi = /-([a-z])/g, Ki = /^[^-]+$/, Xi = /^-(webkit
|
|
8318
8318
|
return t === void 0 && (t = {}), Zi(e) ? e : (e = e.toLowerCase(), t.reactCompat ? e = e.replace(Yi, wr) : e = e.replace(Xi, wr), e.replace(Wi, Ji));
|
8319
8319
|
};
|
8320
8320
|
Ut.camelCase = Qi;
|
8321
|
-
var ec =
|
8321
|
+
var ec = Y && Y.__importDefault || function(e) {
|
8322
8322
|
return e && e.__esModule ? e : { default: e };
|
8323
8323
|
}, tc = ec($n), nc = Ut;
|
8324
8324
|
function _n(e, t) {
|
@@ -8330,7 +8330,7 @@ function _n(e, t) {
|
|
8330
8330
|
_n.default = _n;
|
8331
8331
|
var rc = _n;
|
8332
8332
|
(function(e) {
|
8333
|
-
var t =
|
8333
|
+
var t = Y && Y.__importDefault || function(u) {
|
8334
8334
|
return u && u.__esModule ? u : { default: u };
|
8335
8335
|
};
|
8336
8336
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.returnFirstArg = e.canTextBeChildOfNode = e.ELEMENTS_WITH_NO_TEXT_CHILDREN = e.PRESERVE_CUSTOM_ATTRIBUTES = void 0, e.isCustomComponent = s, e.setStyleProp = i;
|
@@ -8385,7 +8385,7 @@ var rc = _n;
|
|
8385
8385
|
})(Dn);
|
8386
8386
|
Object.defineProperty(zt, "__esModule", { value: !0 });
|
8387
8387
|
zt.default = ic;
|
8388
|
-
var lt =
|
8388
|
+
var lt = xe, Nr = Dn, ac = ["checked", "value"], sc = ["input", "select", "textarea"], oc = {
|
8389
8389
|
reset: !0,
|
8390
8390
|
submit: !0
|
8391
8391
|
};
|
@@ -8418,7 +8418,7 @@ function ic(e, t) {
|
|
8418
8418
|
function Fr(e) {
|
8419
8419
|
return lt.possibleStandardNames[e];
|
8420
8420
|
}
|
8421
|
-
var Ln = {}, cc =
|
8421
|
+
var Ln = {}, cc = Y && Y.__importDefault || function(e) {
|
8422
8422
|
return e && e.__esModule ? e : { default: e };
|
8423
8423
|
};
|
8424
8424
|
Object.defineProperty(Ln, "__esModule", { value: !0 });
|
@@ -8472,7 +8472,7 @@ function fc(e) {
|
|
8472
8472
|
return ft.PRESERVE_CUSTOM_ATTRIBUTES && e.type === "tag" && (0, ft.isCustomComponent)(e.name, e.attribs);
|
8473
8473
|
}
|
8474
8474
|
(function(e) {
|
8475
|
-
var t =
|
8475
|
+
var t = Y && Y.__importDefault || function(c) {
|
8476
8476
|
return c && c.__esModule ? c : { default: c };
|
8477
8477
|
};
|
8478
8478
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.htmlToDOM = e.domToReact = e.attributesToProps = e.Text = e.ProcessingInstruction = e.Element = e.Comment = void 0, e.default = i;
|
@@ -8524,8 +8524,8 @@ export {
|
|
8524
8524
|
Pc as DrawerHeader,
|
8525
8525
|
Jc as DrawerProvider,
|
8526
8526
|
Fe as FieldError,
|
8527
|
-
|
8528
|
-
|
8527
|
+
me as FieldLabel,
|
8528
|
+
ve as FieldWrapper,
|
8529
8529
|
Ac as FileUpload,
|
8530
8530
|
bc as FormProvider,
|
8531
8531
|
vn as IconButton,
|
@@ -8556,7 +8556,7 @@ export {
|
|
8556
8556
|
al as toHtml,
|
8557
8557
|
sl as toRichTextValue,
|
8558
8558
|
Qc as useDrawer,
|
8559
|
-
|
8559
|
+
be as useForm,
|
8560
8560
|
os as useHydrated,
|
8561
8561
|
tl as useModal,
|
8562
8562
|
nl as useScopedParams,
|