tempest-react-sdk 0.1.6 → 0.2.0
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/README.md +21 -16
- package/dist/index.d.ts +131 -17
- package/dist/styles.css +1 -1
- package/dist/tempest-react-sdk.cjs +3 -3
- package/dist/tempest-react-sdk.cjs.map +1 -1
- package/dist/tempest-react-sdk.js +1561 -1413
- package/dist/tempest-react-sdk.js.map +1 -1
- package/package.json +5 -23
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as y, jsx as l, Fragment as
|
|
2
|
-
import { useState as v, useMemo as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { QueryClient as
|
|
5
|
-
import { create as
|
|
6
|
-
import { persist as
|
|
7
|
-
import
|
|
8
|
-
import { useForm as
|
|
1
|
+
import { jsxs as y, jsx as l, Fragment as Ce } from "react/jsx-runtime";
|
|
2
|
+
import { useState as v, useMemo as q, Fragment as Ue, forwardRef as j, useRef as S, useEffect as k, useId as ue, useContext as se, createContext as oe, cloneElement as at, useCallback as T, lazy as ct, Component as lt, useSyncExternalStore as qe } from "react";
|
|
3
|
+
import { createPortal as Le } from "react-dom";
|
|
4
|
+
import { QueryClient as ut, QueryClientProvider as dt } from "@tanstack/react-query";
|
|
5
|
+
import { create as pt } from "zustand";
|
|
6
|
+
import { persist as ft, createJSONStorage as mt } from "zustand/middleware";
|
|
7
|
+
import ht from "dexie";
|
|
8
|
+
import { useForm as _t } from "react-hook-form";
|
|
9
9
|
function g(...e) {
|
|
10
10
|
const t = [];
|
|
11
11
|
for (const n of e)
|
|
@@ -21,22 +21,22 @@ function g(...e) {
|
|
|
21
21
|
}
|
|
22
22
|
return t.join(" ");
|
|
23
23
|
}
|
|
24
|
-
const
|
|
25
|
-
alert:
|
|
26
|
-
content:
|
|
27
|
-
title:
|
|
28
|
-
description:
|
|
29
|
-
icon:
|
|
30
|
-
close:
|
|
31
|
-
neutral:
|
|
32
|
-
solid:
|
|
33
|
-
outline:
|
|
34
|
-
info:
|
|
35
|
-
success:
|
|
36
|
-
warning:
|
|
37
|
-
danger:
|
|
24
|
+
const gt = "tempest_alert_7cYyI", yt = "tempest_content_UXnmZ", bt = "tempest_title_abGgF", wt = "tempest_description_pXPvw", vt = "tempest_icon_Zg6SB", $t = "tempest_close_narep", kt = "tempest_neutral_J7MH1", Nt = "tempest_solid_s-oW5", xt = "tempest_outline_v7w9b", Tt = "tempest_info_9r3r1", St = "tempest_success_1bzoB", Et = "tempest_warning_q-j1Q", Ct = "tempest_danger_CiZkW", G = {
|
|
25
|
+
alert: gt,
|
|
26
|
+
content: yt,
|
|
27
|
+
title: bt,
|
|
28
|
+
description: wt,
|
|
29
|
+
icon: vt,
|
|
30
|
+
close: $t,
|
|
31
|
+
neutral: kt,
|
|
32
|
+
solid: Nt,
|
|
33
|
+
outline: xt,
|
|
34
|
+
info: Tt,
|
|
35
|
+
success: St,
|
|
36
|
+
warning: Et,
|
|
37
|
+
danger: Ct
|
|
38
38
|
};
|
|
39
|
-
function
|
|
39
|
+
function Ic({
|
|
40
40
|
variant: e = "info",
|
|
41
41
|
appearance: t = "soft",
|
|
42
42
|
title: n,
|
|
@@ -44,8 +44,8 @@ function tc({
|
|
|
44
44
|
icon: s,
|
|
45
45
|
onClose: o,
|
|
46
46
|
closeLabel: i = "Dismiss",
|
|
47
|
-
className:
|
|
48
|
-
children:
|
|
47
|
+
className: a,
|
|
48
|
+
children: c,
|
|
49
49
|
...u
|
|
50
50
|
}) {
|
|
51
51
|
return /* @__PURE__ */ y(
|
|
@@ -53,35 +53,35 @@ function tc({
|
|
|
53
53
|
{
|
|
54
54
|
role: "alert",
|
|
55
55
|
className: g(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
t === "solid" &&
|
|
59
|
-
t === "outline" &&
|
|
60
|
-
|
|
56
|
+
G.alert,
|
|
57
|
+
G[e],
|
|
58
|
+
t === "solid" && G.solid,
|
|
59
|
+
t === "outline" && G.outline,
|
|
60
|
+
a
|
|
61
61
|
),
|
|
62
62
|
...u,
|
|
63
63
|
children: [
|
|
64
|
-
s && /* @__PURE__ */ l("span", { className:
|
|
65
|
-
/* @__PURE__ */ y("div", { className:
|
|
66
|
-
n && /* @__PURE__ */ l("p", { className:
|
|
67
|
-
r && /* @__PURE__ */ l("p", { className:
|
|
68
|
-
|
|
64
|
+
s && /* @__PURE__ */ l("span", { className: G.icon, children: s }),
|
|
65
|
+
/* @__PURE__ */ y("div", { className: G.content, children: [
|
|
66
|
+
n && /* @__PURE__ */ l("p", { className: G.title, children: n }),
|
|
67
|
+
r && /* @__PURE__ */ l("p", { className: G.description, children: r }),
|
|
68
|
+
c
|
|
69
69
|
] }),
|
|
70
70
|
o && /* @__PURE__ */ l(
|
|
71
71
|
"button",
|
|
72
72
|
{
|
|
73
73
|
type: "button",
|
|
74
|
-
className:
|
|
74
|
+
className: G.close,
|
|
75
75
|
onClick: o,
|
|
76
76
|
"aria-label": i,
|
|
77
|
-
children: /* @__PURE__ */ l(
|
|
77
|
+
children: /* @__PURE__ */ l(Lt, {})
|
|
78
78
|
}
|
|
79
79
|
)
|
|
80
80
|
]
|
|
81
81
|
}
|
|
82
82
|
);
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function Lt() {
|
|
85
85
|
return /* @__PURE__ */ l("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", "aria-hidden": !0, children: /* @__PURE__ */ l(
|
|
86
86
|
"path",
|
|
87
87
|
{
|
|
@@ -92,25 +92,25 @@ function Nt() {
|
|
|
92
92
|
}
|
|
93
93
|
) });
|
|
94
94
|
}
|
|
95
|
-
const
|
|
96
|
-
avatar:
|
|
97
|
-
image:
|
|
98
|
-
xs:
|
|
99
|
-
sm:
|
|
100
|
-
md:
|
|
101
|
-
lg:
|
|
102
|
-
xl:
|
|
103
|
-
status:
|
|
104
|
-
dot:
|
|
105
|
-
online:
|
|
106
|
-
offline:
|
|
107
|
-
busy:
|
|
95
|
+
const It = "tempest_avatar_3xMuZ", Dt = "tempest_image_ieqGp", Mt = "tempest_xs_oSaLL", Rt = "tempest_sm_sZ2bk", Pt = "tempest_md_Fdkbz", At = "tempest_lg_pTTUA", Bt = "tempest_xl_mW58F", Ft = "tempest_status_ISBnL", Ot = "tempest_dot_Wgfo-", Wt = "tempest_online_-aWoW", zt = "tempest_offline_-StX3", jt = "tempest_busy_TbwuF", te = {
|
|
96
|
+
avatar: It,
|
|
97
|
+
image: Dt,
|
|
98
|
+
xs: Mt,
|
|
99
|
+
sm: Rt,
|
|
100
|
+
md: Pt,
|
|
101
|
+
lg: At,
|
|
102
|
+
xl: Bt,
|
|
103
|
+
status: Ft,
|
|
104
|
+
dot: Ot,
|
|
105
|
+
online: Wt,
|
|
106
|
+
offline: zt,
|
|
107
|
+
busy: jt
|
|
108
108
|
};
|
|
109
|
-
function
|
|
109
|
+
function Ut(e) {
|
|
110
110
|
const t = e.trim().split(/\s+/).filter(Boolean);
|
|
111
111
|
return t.length === 0 ? "?" : t.length === 1 ? t[0].slice(0, 2) : `${t[0].charAt(0)}${t[t.length - 1].charAt(0)}`;
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function Dc({
|
|
114
114
|
src: e,
|
|
115
115
|
alt: t,
|
|
116
116
|
name: n = "",
|
|
@@ -119,16 +119,16 @@ function nc({
|
|
|
119
119
|
className: o,
|
|
120
120
|
onClick: i
|
|
121
121
|
}) {
|
|
122
|
-
const [
|
|
122
|
+
const [a, c] = v(!1), u = q(() => Ut(n), [n]), d = e && !a, p = i ? "button" : void 0, f = i ? 0 : void 0;
|
|
123
123
|
return /* @__PURE__ */ y(
|
|
124
124
|
"span",
|
|
125
125
|
{
|
|
126
|
-
className: g(
|
|
126
|
+
className: g(te.avatar, te[r], s && te.status, o),
|
|
127
127
|
role: p,
|
|
128
128
|
tabIndex: f,
|
|
129
129
|
onClick: i,
|
|
130
|
-
onKeyDown: i ? (
|
|
131
|
-
(
|
|
130
|
+
onKeyDown: i ? (m) => {
|
|
131
|
+
(m.key === "Enter" || m.key === " ") && (m.preventDefault(), i());
|
|
132
132
|
} : void 0,
|
|
133
133
|
children: [
|
|
134
134
|
d ? /* @__PURE__ */ l(
|
|
@@ -136,32 +136,32 @@ function nc({
|
|
|
136
136
|
{
|
|
137
137
|
src: e,
|
|
138
138
|
alt: t ?? n,
|
|
139
|
-
className:
|
|
140
|
-
onError: () =>
|
|
139
|
+
className: te.image,
|
|
140
|
+
onError: () => c(!0)
|
|
141
141
|
}
|
|
142
142
|
) : /* @__PURE__ */ l("span", { "aria-label": t ?? n, children: u }),
|
|
143
|
-
s && /* @__PURE__ */ l("span", { className: g(
|
|
143
|
+
s && /* @__PURE__ */ l("span", { className: g(te.dot, te[s]), "aria-hidden": !0 })
|
|
144
144
|
]
|
|
145
145
|
}
|
|
146
146
|
);
|
|
147
147
|
}
|
|
148
|
-
const
|
|
149
|
-
badge:
|
|
150
|
-
sm:
|
|
151
|
-
md:
|
|
152
|
-
lg:
|
|
153
|
-
square:
|
|
154
|
-
neutral:
|
|
155
|
-
solid:
|
|
156
|
-
outline:
|
|
157
|
-
success:
|
|
158
|
-
warning:
|
|
159
|
-
danger:
|
|
160
|
-
info:
|
|
161
|
-
primary:
|
|
162
|
-
dot:
|
|
148
|
+
const qt = "tempest_badge_RsuMz", Gt = "tempest_sm_LYsCn", Jt = "tempest_md_4Or8q", Ht = "tempest_lg_Bseje", Kt = "tempest_square_l63D-", Vt = "tempest_neutral_lulSm", Qt = "tempest_solid_0Leug", Xt = "tempest_outline_x06HL", Zt = "tempest_success_u9JiS", Yt = "tempest_warning_nsGp-", en = "tempest_danger_PD2hz", tn = "tempest_info_na6DQ", nn = "tempest_primary_S0WCS", rn = "tempest_dot_i0c-G", Z = {
|
|
149
|
+
badge: qt,
|
|
150
|
+
sm: Gt,
|
|
151
|
+
md: Jt,
|
|
152
|
+
lg: Ht,
|
|
153
|
+
square: Kt,
|
|
154
|
+
neutral: Vt,
|
|
155
|
+
solid: Qt,
|
|
156
|
+
outline: Xt,
|
|
157
|
+
success: Zt,
|
|
158
|
+
warning: Yt,
|
|
159
|
+
danger: en,
|
|
160
|
+
info: tn,
|
|
161
|
+
primary: nn,
|
|
162
|
+
dot: rn
|
|
163
163
|
};
|
|
164
|
-
function
|
|
164
|
+
function Mc({
|
|
165
165
|
variant: e = "neutral",
|
|
166
166
|
appearance: t = "soft",
|
|
167
167
|
size: n = "md",
|
|
@@ -169,7 +169,7 @@ function rc({
|
|
|
169
169
|
dot: s = !1,
|
|
170
170
|
className: o,
|
|
171
171
|
children: i,
|
|
172
|
-
...
|
|
172
|
+
...a
|
|
173
173
|
}) {
|
|
174
174
|
return /* @__PURE__ */ y(
|
|
175
175
|
"span",
|
|
@@ -183,7 +183,7 @@ function rc({
|
|
|
183
183
|
r === "square" && Z.square,
|
|
184
184
|
o
|
|
185
185
|
),
|
|
186
|
-
...
|
|
186
|
+
...a,
|
|
187
187
|
children: [
|
|
188
188
|
s && /* @__PURE__ */ l("span", { className: Z.dot, "aria-hidden": !0 }),
|
|
189
189
|
i
|
|
@@ -191,23 +191,23 @@ function rc({
|
|
|
191
191
|
}
|
|
192
192
|
);
|
|
193
193
|
}
|
|
194
|
-
const
|
|
195
|
-
nav:
|
|
196
|
-
item:
|
|
197
|
-
link:
|
|
198
|
-
current:
|
|
199
|
-
separator:
|
|
194
|
+
const sn = "tempest_nav_H4g6P", on = "tempest_item_O4g3P", an = "tempest_link_7WM67", cn = "tempest_current_JdlcS", ln = "tempest_separator_zGWyJ", ie = {
|
|
195
|
+
nav: sn,
|
|
196
|
+
item: on,
|
|
197
|
+
link: an,
|
|
198
|
+
current: cn,
|
|
199
|
+
separator: ln
|
|
200
200
|
};
|
|
201
|
-
function
|
|
201
|
+
function Rc({ items: e, separator: t = "/", className: n }) {
|
|
202
202
|
return /* @__PURE__ */ l("nav", { "aria-label": "breadcrumb", className: g(ie.nav, n), children: e.map((r, s) => {
|
|
203
203
|
const o = s === e.length - 1, i = !o && (r.href || r.onClick);
|
|
204
|
-
return /* @__PURE__ */ y(
|
|
204
|
+
return /* @__PURE__ */ y(Ue, { children: [
|
|
205
205
|
/* @__PURE__ */ l("span", { className: ie.item, children: i ? /* @__PURE__ */ l(
|
|
206
206
|
"a",
|
|
207
207
|
{
|
|
208
208
|
href: r.href,
|
|
209
|
-
onClick: (
|
|
210
|
-
r.onClick && (
|
|
209
|
+
onClick: (a) => {
|
|
210
|
+
r.onClick && (a.preventDefault(), r.onClick());
|
|
211
211
|
},
|
|
212
212
|
className: ie.link,
|
|
213
213
|
children: r.label
|
|
@@ -224,30 +224,30 @@ function sc({ items: e, separator: t = "/", className: n }) {
|
|
|
224
224
|
] }, s);
|
|
225
225
|
}) });
|
|
226
226
|
}
|
|
227
|
-
const
|
|
228
|
-
button:
|
|
229
|
-
primary:
|
|
230
|
-
secondary:
|
|
231
|
-
danger:
|
|
232
|
-
success:
|
|
233
|
-
ghost:
|
|
234
|
-
soft:
|
|
235
|
-
outline:
|
|
236
|
-
link:
|
|
237
|
-
xs:
|
|
238
|
-
sm:
|
|
239
|
-
md:
|
|
240
|
-
lg:
|
|
241
|
-
xl:
|
|
242
|
-
iconOnly:
|
|
243
|
-
pill:
|
|
244
|
-
fullWidth:
|
|
245
|
-
loading:
|
|
246
|
-
hiddenText:
|
|
247
|
-
spinner:
|
|
248
|
-
tempestSpin:
|
|
227
|
+
const un = "tempest_button_2ZuB7", dn = "tempest_primary_s1sM6", pn = "tempest_secondary_R0waJ", fn = "tempest_danger_V4fX8", mn = "tempest_success_w6qB6", hn = "tempest_ghost_1KINV", _n = "tempest_soft_c3kzm", gn = "tempest_outline_F5jq-", yn = "tempest_link_Zt5hw", bn = "tempest_xs_cF6m0", wn = "tempest_sm_NhG0g", vn = "tempest_md_hH4h3", $n = "tempest_lg_2plQf", kn = "tempest_xl_nx4V0", Nn = "tempest_iconOnly_WCpTS", xn = "tempest_pill_lx8lt", Tn = "tempest_fullWidth_36oJT", Sn = "tempest_loading_EQAt2", En = "tempest_hiddenText_hIiJ2", Cn = "tempest_spinner_ZExvW", Ln = "tempest_tempest-spin_UOSVC", J = {
|
|
228
|
+
button: un,
|
|
229
|
+
primary: dn,
|
|
230
|
+
secondary: pn,
|
|
231
|
+
danger: fn,
|
|
232
|
+
success: mn,
|
|
233
|
+
ghost: hn,
|
|
234
|
+
soft: _n,
|
|
235
|
+
outline: gn,
|
|
236
|
+
link: yn,
|
|
237
|
+
xs: bn,
|
|
238
|
+
sm: wn,
|
|
239
|
+
md: vn,
|
|
240
|
+
lg: $n,
|
|
241
|
+
xl: kn,
|
|
242
|
+
iconOnly: Nn,
|
|
243
|
+
pill: xn,
|
|
244
|
+
fullWidth: Tn,
|
|
245
|
+
loading: Sn,
|
|
246
|
+
hiddenText: En,
|
|
247
|
+
spinner: Cn,
|
|
248
|
+
tempestSpin: Ln
|
|
249
249
|
};
|
|
250
|
-
function
|
|
250
|
+
function Te({
|
|
251
251
|
variant: e = "primary",
|
|
252
252
|
size: t = "md",
|
|
253
253
|
loading: n = !1,
|
|
@@ -255,8 +255,8 @@ function ke({
|
|
|
255
255
|
iconOnly: s = !1,
|
|
256
256
|
pill: o = !1,
|
|
257
257
|
leftIcon: i,
|
|
258
|
-
rightIcon:
|
|
259
|
-
disabled:
|
|
258
|
+
rightIcon: a,
|
|
259
|
+
disabled: c,
|
|
260
260
|
className: u,
|
|
261
261
|
children: d,
|
|
262
262
|
...p
|
|
@@ -265,29 +265,29 @@ function ke({
|
|
|
265
265
|
"button",
|
|
266
266
|
{
|
|
267
267
|
className: g(
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
s &&
|
|
272
|
-
o &&
|
|
273
|
-
n &&
|
|
274
|
-
r &&
|
|
268
|
+
J.button,
|
|
269
|
+
J[e],
|
|
270
|
+
J[t],
|
|
271
|
+
s && J.iconOnly,
|
|
272
|
+
o && J.pill,
|
|
273
|
+
n && J.loading,
|
|
274
|
+
r && J.fullWidth,
|
|
275
275
|
u
|
|
276
276
|
),
|
|
277
|
-
disabled:
|
|
277
|
+
disabled: c || n,
|
|
278
278
|
...p,
|
|
279
279
|
children: [
|
|
280
|
-
n && /* @__PURE__ */ l("span", { className:
|
|
281
|
-
/* @__PURE__ */ y("span", { className: g(n &&
|
|
280
|
+
n && /* @__PURE__ */ l("span", { className: J.spinner, "aria-hidden": !0, children: /* @__PURE__ */ l(In, {}) }),
|
|
281
|
+
/* @__PURE__ */ y("span", { className: g(n && J.hiddenText), children: [
|
|
282
282
|
i,
|
|
283
283
|
d,
|
|
284
|
-
|
|
284
|
+
a
|
|
285
285
|
] })
|
|
286
286
|
]
|
|
287
287
|
}
|
|
288
288
|
);
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function In() {
|
|
291
291
|
return /* @__PURE__ */ l(
|
|
292
292
|
"svg",
|
|
293
293
|
{
|
|
@@ -308,20 +308,20 @@ function kn() {
|
|
|
308
308
|
}
|
|
309
309
|
);
|
|
310
310
|
}
|
|
311
|
-
const
|
|
312
|
-
card:
|
|
313
|
-
flat:
|
|
314
|
-
raised:
|
|
315
|
-
elevated:
|
|
316
|
-
interactive:
|
|
317
|
-
padded:
|
|
318
|
-
flush:
|
|
319
|
-
header:
|
|
320
|
-
title:
|
|
321
|
-
body:
|
|
322
|
-
footer:
|
|
311
|
+
const Dn = "tempest_card_Cb1o4", Mn = "tempest_flat_LRpce", Rn = "tempest_raised_WmIqk", Pn = "tempest_elevated_5VEDw", An = "tempest_interactive_B8Tah", Bn = "tempest_padded_oOxwN", Fn = "tempest_flush_aiDZi", On = "tempest_header_PTXf2", Wn = "tempest_title_mSgoo", zn = "tempest_body_W441Z", jn = "tempest_footer_Mu-JC", W = {
|
|
312
|
+
card: Dn,
|
|
313
|
+
flat: Mn,
|
|
314
|
+
raised: Rn,
|
|
315
|
+
elevated: Pn,
|
|
316
|
+
interactive: An,
|
|
317
|
+
padded: Bn,
|
|
318
|
+
flush: Fn,
|
|
319
|
+
header: On,
|
|
320
|
+
title: Wn,
|
|
321
|
+
body: zn,
|
|
322
|
+
footer: jn
|
|
323
323
|
};
|
|
324
|
-
function
|
|
324
|
+
function Pc({
|
|
325
325
|
title: e,
|
|
326
326
|
actions: t,
|
|
327
327
|
footer: n,
|
|
@@ -329,51 +329,51 @@ function oc({
|
|
|
329
329
|
interactive: s = !1,
|
|
330
330
|
elevation: o = "default",
|
|
331
331
|
className: i,
|
|
332
|
-
children:
|
|
333
|
-
...
|
|
332
|
+
children: a,
|
|
333
|
+
...c
|
|
334
334
|
}) {
|
|
335
335
|
const u = !!(e || t);
|
|
336
336
|
return /* @__PURE__ */ y(
|
|
337
337
|
"div",
|
|
338
338
|
{
|
|
339
339
|
className: g(
|
|
340
|
-
|
|
341
|
-
o === "flat" &&
|
|
342
|
-
o === "raised" &&
|
|
343
|
-
o === "elevated" &&
|
|
344
|
-
s &&
|
|
345
|
-
!u && !r &&
|
|
346
|
-
r &&
|
|
340
|
+
W.card,
|
|
341
|
+
o === "flat" && W.flat,
|
|
342
|
+
o === "raised" && W.raised,
|
|
343
|
+
o === "elevated" && W.elevated,
|
|
344
|
+
s && W.interactive,
|
|
345
|
+
!u && !r && W.padded,
|
|
346
|
+
r && W.flush,
|
|
347
347
|
i
|
|
348
348
|
),
|
|
349
|
-
tabIndex: s ?
|
|
350
|
-
...
|
|
349
|
+
tabIndex: s ? c.tabIndex ?? 0 : c.tabIndex,
|
|
350
|
+
...c,
|
|
351
351
|
children: [
|
|
352
|
-
u && /* @__PURE__ */ y("header", { className:
|
|
353
|
-
typeof e == "string" ? /* @__PURE__ */ l("h3", { className:
|
|
352
|
+
u && /* @__PURE__ */ y("header", { className: W.header, children: [
|
|
353
|
+
typeof e == "string" ? /* @__PURE__ */ l("h3", { className: W.title, children: e }) : e,
|
|
354
354
|
t
|
|
355
355
|
] }),
|
|
356
|
-
u ? /* @__PURE__ */ l("div", { className:
|
|
357
|
-
n && /* @__PURE__ */ l("footer", { className:
|
|
356
|
+
u ? /* @__PURE__ */ l("div", { className: W.body, children: a }) : a,
|
|
357
|
+
n && /* @__PURE__ */ l("footer", { className: W.footer, children: n })
|
|
358
358
|
]
|
|
359
359
|
}
|
|
360
360
|
);
|
|
361
361
|
}
|
|
362
|
-
const
|
|
363
|
-
wrapper:
|
|
364
|
-
disabled:
|
|
365
|
-
input:
|
|
366
|
-
box:
|
|
367
|
-
labelWrap:
|
|
368
|
-
label:
|
|
369
|
-
description:
|
|
370
|
-
},
|
|
371
|
-
const u =
|
|
362
|
+
const Un = "tempest_wrapper_rpthW", qn = "tempest_disabled_x7-eg", Gn = "tempest_input_2kt-h", Jn = "tempest_box_OCPee", Hn = "tempest_labelWrap_Ktbp0", Kn = "tempest_label_cwRtI", Vn = "tempest_description_rMhG1", Y = {
|
|
363
|
+
wrapper: Un,
|
|
364
|
+
disabled: qn,
|
|
365
|
+
input: Gn,
|
|
366
|
+
box: Jn,
|
|
367
|
+
labelWrap: Hn,
|
|
368
|
+
label: Kn,
|
|
369
|
+
description: Vn
|
|
370
|
+
}, Ac = j(function({ label: t, description: n, indeterminate: r, disabled: s, wrapperClassName: o, className: i, ...a }, c) {
|
|
371
|
+
const u = S(null);
|
|
372
372
|
k(() => {
|
|
373
373
|
u.current && (u.current.indeterminate = !!r);
|
|
374
374
|
}, [r]);
|
|
375
375
|
function d(p) {
|
|
376
|
-
u.current = p, typeof
|
|
376
|
+
u.current = p, typeof c == "function" ? c(p) : c && (c.current = p);
|
|
377
377
|
}
|
|
378
378
|
return /* @__PURE__ */ y("label", { className: g(Y.wrapper, s && Y.disabled, o), children: [
|
|
379
379
|
/* @__PURE__ */ l(
|
|
@@ -383,17 +383,17 @@ const Fn = "tempest_wrapper_rpthW", Rn = "tempest_disabled_x7-eg", On = "tempest
|
|
|
383
383
|
type: "checkbox",
|
|
384
384
|
disabled: s,
|
|
385
385
|
className: g(Y.input, i),
|
|
386
|
-
...
|
|
386
|
+
...a
|
|
387
387
|
}
|
|
388
388
|
),
|
|
389
|
-
/* @__PURE__ */ l("span", { className: Y.box, "aria-hidden": !0, children: r ? /* @__PURE__ */ l(
|
|
389
|
+
/* @__PURE__ */ l("span", { className: Y.box, "aria-hidden": !0, children: r ? /* @__PURE__ */ l(Xn, {}) : /* @__PURE__ */ l(Qn, {}) }),
|
|
390
390
|
(t || n) && /* @__PURE__ */ y("span", { className: Y.labelWrap, children: [
|
|
391
391
|
t && /* @__PURE__ */ l("span", { className: Y.label, children: t }),
|
|
392
392
|
n && /* @__PURE__ */ l("span", { className: Y.description, children: n })
|
|
393
393
|
] })
|
|
394
394
|
] });
|
|
395
395
|
});
|
|
396
|
-
function
|
|
396
|
+
function Qn() {
|
|
397
397
|
return /* @__PURE__ */ l("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ l(
|
|
398
398
|
"path",
|
|
399
399
|
{
|
|
@@ -405,21 +405,21 @@ function Un() {
|
|
|
405
405
|
}
|
|
406
406
|
) });
|
|
407
407
|
}
|
|
408
|
-
function
|
|
408
|
+
function Xn() {
|
|
409
409
|
return /* @__PURE__ */ l("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ l("path", { d: "M5 12h14", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round" }) });
|
|
410
410
|
}
|
|
411
|
-
const
|
|
412
|
-
wrapper:
|
|
413
|
-
label:
|
|
414
|
-
field:
|
|
415
|
-
error:
|
|
416
|
-
chip:
|
|
417
|
-
remove:
|
|
418
|
-
input:
|
|
419
|
-
helper:
|
|
420
|
-
errorText:
|
|
411
|
+
const Zn = "tempest_wrapper_KR4-F", Yn = "tempest_label_Mz-wX", er = "tempest_field_iIBJw", tr = "tempest_error_O9n-9", nr = "tempest_chip_GEwrc", rr = "tempest_remove_JYDIq", sr = "tempest_input_frJmk", or = "tempest_helper_Yts53", ir = "tempest_errorText_llJGq", H = {
|
|
412
|
+
wrapper: Zn,
|
|
413
|
+
label: Yn,
|
|
414
|
+
field: er,
|
|
415
|
+
error: tr,
|
|
416
|
+
chip: nr,
|
|
417
|
+
remove: rr,
|
|
418
|
+
input: sr,
|
|
419
|
+
helper: or,
|
|
420
|
+
errorText: ir
|
|
421
421
|
};
|
|
422
|
-
function
|
|
422
|
+
function Bc({
|
|
423
423
|
value: e,
|
|
424
424
|
onChange: t,
|
|
425
425
|
label: n,
|
|
@@ -427,79 +427,83 @@ function ac({
|
|
|
427
427
|
helperText: s,
|
|
428
428
|
error: o,
|
|
429
429
|
commitKeys: i = ["Enter", ",", "Tab"],
|
|
430
|
-
normalize:
|
|
431
|
-
className:
|
|
430
|
+
normalize: a = !0,
|
|
431
|
+
className: c
|
|
432
432
|
}) {
|
|
433
|
-
const [u, d] = v(""), p =
|
|
433
|
+
const [u, d] = v(""), p = S(null);
|
|
434
434
|
function f() {
|
|
435
|
-
const
|
|
436
|
-
if (
|
|
437
|
-
if (e.includes(
|
|
435
|
+
const h = a ? u.trim().toLowerCase() : u.trim();
|
|
436
|
+
if (h) {
|
|
437
|
+
if (e.includes(h)) {
|
|
438
438
|
d("");
|
|
439
439
|
return;
|
|
440
440
|
}
|
|
441
|
-
t([...e,
|
|
441
|
+
t([...e, h]), d("");
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
|
-
function h
|
|
445
|
-
if (i.includes(
|
|
446
|
-
|
|
444
|
+
function m(h) {
|
|
445
|
+
if (i.includes(h.key)) {
|
|
446
|
+
h.preventDefault(), f();
|
|
447
447
|
return;
|
|
448
448
|
}
|
|
449
|
-
|
|
449
|
+
h.key === "Backspace" && !u && e.length > 0 && t(e.slice(0, -1));
|
|
450
450
|
}
|
|
451
|
-
function _(
|
|
451
|
+
function _(h) {
|
|
452
452
|
const w = e.slice();
|
|
453
|
-
w.splice(
|
|
453
|
+
w.splice(h, 1), t(w);
|
|
454
454
|
}
|
|
455
|
-
return /* @__PURE__ */ y("div", { className: g(
|
|
456
|
-
n && /* @__PURE__ */ l("label", { className:
|
|
457
|
-
/* @__PURE__ */ y("div", { className:
|
|
458
|
-
e.map((
|
|
459
|
-
|
|
455
|
+
return /* @__PURE__ */ y("div", { className: g(H.wrapper, o && H.error, c), children: [
|
|
456
|
+
n && /* @__PURE__ */ l("label", { className: H.label, children: n }),
|
|
457
|
+
/* @__PURE__ */ y("div", { className: H.field, onClick: () => p.current?.focus(), children: [
|
|
458
|
+
e.map((h, w) => /* @__PURE__ */ y("span", { className: H.chip, children: [
|
|
459
|
+
h,
|
|
460
460
|
/* @__PURE__ */ l(
|
|
461
461
|
"button",
|
|
462
462
|
{
|
|
463
463
|
type: "button",
|
|
464
|
-
className:
|
|
465
|
-
"aria-label": `Remover ${
|
|
464
|
+
className: H.remove,
|
|
465
|
+
"aria-label": `Remover ${h}`,
|
|
466
466
|
onClick: () => _(w),
|
|
467
467
|
children: "×"
|
|
468
468
|
}
|
|
469
469
|
)
|
|
470
|
-
] }, `${
|
|
470
|
+
] }, `${h}-${w}`)),
|
|
471
471
|
/* @__PURE__ */ l(
|
|
472
472
|
"input",
|
|
473
473
|
{
|
|
474
474
|
ref: p,
|
|
475
|
-
className:
|
|
475
|
+
className: H.input,
|
|
476
476
|
value: u,
|
|
477
477
|
placeholder: e.length === 0 ? r : "",
|
|
478
|
-
onChange: (
|
|
479
|
-
onKeyDown:
|
|
478
|
+
onChange: (h) => d(h.target.value),
|
|
479
|
+
onKeyDown: m,
|
|
480
480
|
onBlur: f
|
|
481
481
|
}
|
|
482
482
|
)
|
|
483
483
|
] }),
|
|
484
|
-
o ? /* @__PURE__ */ l("span", { className:
|
|
484
|
+
o ? /* @__PURE__ */ l("span", { className: H.errorText, children: o }) : s ? /* @__PURE__ */ l("span", { className: H.helper, children: s }) : null
|
|
485
485
|
] });
|
|
486
486
|
}
|
|
487
|
-
const
|
|
488
|
-
overlay:
|
|
489
|
-
tempestFadeIn:
|
|
490
|
-
dialog:
|
|
491
|
-
tempestModalIn:
|
|
492
|
-
sm:
|
|
493
|
-
md:
|
|
494
|
-
lg:
|
|
495
|
-
xl:
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
487
|
+
const ar = "tempest_overlay_dd9h1", cr = "tempest_tempest-fade-in_DvgSp", lr = "tempest_dialog_ptM-K", ur = "tempest_tempest-modal-in_UoxQC", dr = "tempest_sm_K5k3W", pr = "tempest_md_gvyR7", fr = "tempest_lg_BgB1a", mr = "tempest_xl_MR-68", hr = "tempest_size2xl_-PH9e", _r = "tempest_size3xl_iqDwN", gr = "tempest_fullscreen_o84Xi", yr = "tempest_fullscreenOnMobile_0bDwe", br = "tempest_body_lVhql", wr = "tempest_header_ILG9i", vr = "tempest_footer_rro2w", $r = "tempest_title_A5OeE", kr = "tempest_close_-ER1C", B = {
|
|
488
|
+
overlay: ar,
|
|
489
|
+
tempestFadeIn: cr,
|
|
490
|
+
dialog: lr,
|
|
491
|
+
tempestModalIn: ur,
|
|
492
|
+
sm: dr,
|
|
493
|
+
md: pr,
|
|
494
|
+
lg: fr,
|
|
495
|
+
xl: mr,
|
|
496
|
+
size2Xl: hr,
|
|
497
|
+
size3Xl: _r,
|
|
498
|
+
fullscreen: gr,
|
|
499
|
+
fullscreenOnMobile: yr,
|
|
500
|
+
body: br,
|
|
501
|
+
header: wr,
|
|
502
|
+
footer: vr,
|
|
503
|
+
title: $r,
|
|
504
|
+
close: kr
|
|
501
505
|
};
|
|
502
|
-
function
|
|
506
|
+
function Nr({
|
|
503
507
|
open: e,
|
|
504
508
|
onClose: t,
|
|
505
509
|
title: n,
|
|
@@ -507,25 +511,27 @@ function fr({
|
|
|
507
511
|
footer: s,
|
|
508
512
|
size: o = "md",
|
|
509
513
|
closeOnBackdrop: i = !0,
|
|
510
|
-
closeOnEsc:
|
|
511
|
-
className:
|
|
512
|
-
hideCloseButton: u = !1
|
|
514
|
+
closeOnEsc: a = !0,
|
|
515
|
+
className: c,
|
|
516
|
+
hideCloseButton: u = !1,
|
|
517
|
+
fullscreen: d = !1,
|
|
518
|
+
fullscreenOnMobile: p = !1
|
|
513
519
|
}) {
|
|
514
520
|
return k(() => {
|
|
515
521
|
if (!e) return;
|
|
516
|
-
const
|
|
522
|
+
const f = document.body.style.overflow;
|
|
517
523
|
document.body.style.overflow = "hidden";
|
|
518
|
-
const
|
|
519
|
-
|
|
524
|
+
const m = (_) => {
|
|
525
|
+
a && _.key === "Escape" && t();
|
|
520
526
|
};
|
|
521
|
-
return window.addEventListener("keydown",
|
|
522
|
-
document.body.style.overflow =
|
|
527
|
+
return window.addEventListener("keydown", m), () => {
|
|
528
|
+
document.body.style.overflow = f, window.removeEventListener("keydown", m);
|
|
523
529
|
};
|
|
524
|
-
}, [e,
|
|
530
|
+
}, [e, a, t]), !e || typeof document > "u" ? null : Le(
|
|
525
531
|
/* @__PURE__ */ l(
|
|
526
532
|
"div",
|
|
527
533
|
{
|
|
528
|
-
className:
|
|
534
|
+
className: B.overlay,
|
|
529
535
|
role: "presentation",
|
|
530
536
|
onClick: () => {
|
|
531
537
|
i && t();
|
|
@@ -535,24 +541,30 @@ function fr({
|
|
|
535
541
|
{
|
|
536
542
|
role: "dialog",
|
|
537
543
|
"aria-modal": "true",
|
|
538
|
-
className: g(
|
|
539
|
-
|
|
544
|
+
className: g(
|
|
545
|
+
B.dialog,
|
|
546
|
+
xr(o),
|
|
547
|
+
d && B.fullscreen,
|
|
548
|
+
p && B.fullscreenOnMobile,
|
|
549
|
+
c
|
|
550
|
+
),
|
|
551
|
+
onClick: (f) => f.stopPropagation(),
|
|
540
552
|
children: [
|
|
541
|
-
(n || !u) && /* @__PURE__ */ y("header", { className:
|
|
542
|
-
/* @__PURE__ */ l("h3", { className:
|
|
553
|
+
(n || !u) && /* @__PURE__ */ y("header", { className: B.header, children: [
|
|
554
|
+
/* @__PURE__ */ l("h3", { className: B.title, children: n }),
|
|
543
555
|
!u && /* @__PURE__ */ l(
|
|
544
556
|
"button",
|
|
545
557
|
{
|
|
546
558
|
type: "button",
|
|
547
|
-
className:
|
|
559
|
+
className: B.close,
|
|
548
560
|
"aria-label": "Fechar",
|
|
549
561
|
onClick: t,
|
|
550
|
-
children: /* @__PURE__ */ l(
|
|
562
|
+
children: /* @__PURE__ */ l(Tr, {})
|
|
551
563
|
}
|
|
552
564
|
)
|
|
553
565
|
] }),
|
|
554
|
-
/* @__PURE__ */ l("div", { className:
|
|
555
|
-
s && /* @__PURE__ */ l("footer", { className:
|
|
566
|
+
/* @__PURE__ */ l("div", { className: B.body, children: r }),
|
|
567
|
+
s && /* @__PURE__ */ l("footer", { className: B.footer, children: s })
|
|
556
568
|
]
|
|
557
569
|
}
|
|
558
570
|
)
|
|
@@ -561,7 +573,10 @@ function fr({
|
|
|
561
573
|
document.body
|
|
562
574
|
);
|
|
563
575
|
}
|
|
564
|
-
function
|
|
576
|
+
function xr(e) {
|
|
577
|
+
return e === "2xl" ? B.size2xl : e === "3xl" ? B.size3xl : B[e];
|
|
578
|
+
}
|
|
579
|
+
function Tr() {
|
|
565
580
|
return /* @__PURE__ */ l("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ l(
|
|
566
581
|
"path",
|
|
567
582
|
{
|
|
@@ -572,7 +587,7 @@ function mr() {
|
|
|
572
587
|
}
|
|
573
588
|
) });
|
|
574
589
|
}
|
|
575
|
-
function
|
|
590
|
+
function Fc({
|
|
576
591
|
open: e,
|
|
577
592
|
title: t,
|
|
578
593
|
description: n,
|
|
@@ -580,88 +595,88 @@ function cc({
|
|
|
580
595
|
cancelLabel: s = "Cancelar",
|
|
581
596
|
variant: o = "primary",
|
|
582
597
|
loading: i = !1,
|
|
583
|
-
onConfirm:
|
|
584
|
-
onCancel:
|
|
598
|
+
onConfirm: a,
|
|
599
|
+
onCancel: c
|
|
585
600
|
}) {
|
|
586
601
|
return /* @__PURE__ */ l(
|
|
587
|
-
|
|
602
|
+
Nr,
|
|
588
603
|
{
|
|
589
604
|
open: e,
|
|
590
|
-
onClose:
|
|
605
|
+
onClose: c,
|
|
591
606
|
title: t,
|
|
592
607
|
size: "sm",
|
|
593
|
-
footer: /* @__PURE__ */ y(
|
|
594
|
-
/* @__PURE__ */ l(
|
|
595
|
-
/* @__PURE__ */ l(
|
|
596
|
-
|
|
608
|
+
footer: /* @__PURE__ */ y(Ce, { children: [
|
|
609
|
+
/* @__PURE__ */ l(Te, { variant: "secondary", onClick: c, disabled: i, children: s }),
|
|
610
|
+
/* @__PURE__ */ l(Te, { variant: o, loading: i, onClick: () => {
|
|
611
|
+
a();
|
|
597
612
|
}, children: r })
|
|
598
613
|
] }),
|
|
599
614
|
children: n
|
|
600
615
|
}
|
|
601
616
|
);
|
|
602
617
|
}
|
|
603
|
-
const
|
|
604
|
-
wrapper:
|
|
605
|
-
label:
|
|
606
|
-
required:
|
|
607
|
-
field:
|
|
608
|
-
input:
|
|
609
|
-
sizeSm:
|
|
610
|
-
sizeMd:
|
|
611
|
-
sizeLg:
|
|
612
|
-
hasLeftIcon:
|
|
613
|
-
hasRightIcon:
|
|
614
|
-
iconLeft:
|
|
615
|
-
iconRight:
|
|
616
|
-
error:
|
|
617
|
-
helper:
|
|
618
|
-
errorText:
|
|
619
|
-
},
|
|
618
|
+
const Sr = "tempest_wrapper_iHNUs", Er = "tempest_label_-OEBL", Cr = "tempest_required_CTss-", Lr = "tempest_field_65yGJ", Ir = "tempest_input_WjT81", Dr = "tempest_sizeSm_cgds6", Mr = "tempest_sizeMd_EPFGy", Rr = "tempest_sizeLg_5Cq8k", Pr = "tempest_hasLeftIcon_xYO-v", Ar = "tempest_hasRightIcon_C7uyr", Br = "tempest_iconLeft_KrUhI", Fr = "tempest_iconRight_Ssr47", Or = "tempest_error_VLISa", Wr = "tempest_helper_7Vc-s", zr = "tempest_errorText_xz4xS", L = {
|
|
619
|
+
wrapper: Sr,
|
|
620
|
+
label: Er,
|
|
621
|
+
required: Cr,
|
|
622
|
+
field: Lr,
|
|
623
|
+
input: Ir,
|
|
624
|
+
sizeSm: Dr,
|
|
625
|
+
sizeMd: Mr,
|
|
626
|
+
sizeLg: Rr,
|
|
627
|
+
hasLeftIcon: Pr,
|
|
628
|
+
hasRightIcon: Ar,
|
|
629
|
+
iconLeft: Br,
|
|
630
|
+
iconRight: Fr,
|
|
631
|
+
error: Or,
|
|
632
|
+
helper: Wr,
|
|
633
|
+
errorText: zr
|
|
634
|
+
}, Ie = j(function({
|
|
620
635
|
label: t,
|
|
621
636
|
helperText: n,
|
|
622
637
|
error: r,
|
|
623
638
|
leftIcon: s,
|
|
624
639
|
rightIcon: o,
|
|
625
640
|
wrapperClassName: i,
|
|
626
|
-
className:
|
|
627
|
-
id:
|
|
641
|
+
className: a,
|
|
642
|
+
id: c,
|
|
628
643
|
required: u,
|
|
629
644
|
size: d = "md",
|
|
630
645
|
...p
|
|
631
646
|
}, f) {
|
|
632
|
-
const
|
|
633
|
-
return /* @__PURE__ */ y("div", { className: g(
|
|
634
|
-
t && /* @__PURE__ */ y("label", { htmlFor: _, className:
|
|
647
|
+
const m = ue(), _ = c ?? m, h = r ? `${_}-error` : n ? `${_}-helper` : void 0, w = d === "sm" ? L.sizeSm : d === "lg" ? L.sizeLg : L.sizeMd;
|
|
648
|
+
return /* @__PURE__ */ y("div", { className: g(L.wrapper, r && L.error, i), children: [
|
|
649
|
+
t && /* @__PURE__ */ y("label", { htmlFor: _, className: L.label, children: [
|
|
635
650
|
t,
|
|
636
|
-
u && /* @__PURE__ */ l("span", { className:
|
|
651
|
+
u && /* @__PURE__ */ l("span", { className: L.required, children: "*" })
|
|
637
652
|
] }),
|
|
638
|
-
/* @__PURE__ */ y("div", { className:
|
|
639
|
-
s && /* @__PURE__ */ l("span", { className:
|
|
653
|
+
/* @__PURE__ */ y("div", { className: L.field, children: [
|
|
654
|
+
s && /* @__PURE__ */ l("span", { className: L.iconLeft, children: s }),
|
|
640
655
|
/* @__PURE__ */ l(
|
|
641
656
|
"input",
|
|
642
657
|
{
|
|
643
658
|
ref: f,
|
|
644
659
|
id: _,
|
|
645
660
|
"aria-invalid": !!r,
|
|
646
|
-
"aria-describedby":
|
|
661
|
+
"aria-describedby": h,
|
|
647
662
|
required: u,
|
|
648
663
|
className: g(
|
|
649
|
-
|
|
664
|
+
L.input,
|
|
650
665
|
w,
|
|
651
|
-
s &&
|
|
652
|
-
o &&
|
|
653
|
-
|
|
666
|
+
s && L.hasLeftIcon,
|
|
667
|
+
o && L.hasRightIcon,
|
|
668
|
+
a
|
|
654
669
|
),
|
|
655
670
|
...p
|
|
656
671
|
}
|
|
657
672
|
),
|
|
658
|
-
o && /* @__PURE__ */ l("span", { className:
|
|
673
|
+
o && /* @__PURE__ */ l("span", { className: L.iconRight, children: o })
|
|
659
674
|
] }),
|
|
660
|
-
r ? /* @__PURE__ */ l("span", { id: `${_}-error`, className:
|
|
675
|
+
r ? /* @__PURE__ */ l("span", { id: `${_}-error`, className: L.errorText, children: r }) : n ? /* @__PURE__ */ l("span", { id: `${_}-helper`, className: L.helper, children: n }) : null
|
|
661
676
|
] });
|
|
662
|
-
}),
|
|
677
|
+
}), Oc = j(function({ value: t, onChange: n, mode: r = "date", ...s }, o) {
|
|
663
678
|
return /* @__PURE__ */ l(
|
|
664
|
-
|
|
679
|
+
Ie,
|
|
665
680
|
{
|
|
666
681
|
...s,
|
|
667
682
|
ref: o,
|
|
@@ -670,16 +685,16 @@ const hr = "tempest_wrapper_iHNUs", _r = "tempest_label_-OEBL", gr = "tempest_re
|
|
|
670
685
|
onChange: (i) => n(i.target.value)
|
|
671
686
|
}
|
|
672
687
|
);
|
|
673
|
-
}),
|
|
674
|
-
divider:
|
|
675
|
-
horizontal:
|
|
676
|
-
bare:
|
|
677
|
-
vertical:
|
|
678
|
-
dashed:
|
|
679
|
-
alignStart:
|
|
680
|
-
alignEnd:
|
|
688
|
+
}), jr = "tempest_divider_KSGsi", Ur = "tempest_horizontal_pZ05Y", qr = "tempest_bare_elDbS", Gr = "tempest_vertical_p-jD4", Jr = "tempest_dashed_JWxCU", Hr = "tempest_alignStart_QAIi1", Kr = "tempest_alignEnd_eZDwa", A = {
|
|
689
|
+
divider: jr,
|
|
690
|
+
horizontal: Ur,
|
|
691
|
+
bare: qr,
|
|
692
|
+
vertical: Gr,
|
|
693
|
+
dashed: Jr,
|
|
694
|
+
alignStart: Hr,
|
|
695
|
+
alignEnd: Kr
|
|
681
696
|
};
|
|
682
|
-
function
|
|
697
|
+
function Wc({
|
|
683
698
|
orientation: e = "horizontal",
|
|
684
699
|
variant: t = "solid",
|
|
685
700
|
label: n,
|
|
@@ -729,25 +744,61 @@ function uc({
|
|
|
729
744
|
}
|
|
730
745
|
);
|
|
731
746
|
}
|
|
732
|
-
const
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
747
|
+
const Se = {
|
|
748
|
+
xs: 480,
|
|
749
|
+
sm: 640,
|
|
750
|
+
md: 768,
|
|
751
|
+
lg: 1024,
|
|
752
|
+
xl: 1280,
|
|
753
|
+
"2xl": 1536
|
|
754
|
+
}, Vr = ["xs", "sm", "md", "lg", "xl", "2xl"];
|
|
755
|
+
function Qr(e) {
|
|
756
|
+
let t = "xs";
|
|
757
|
+
for (const n of Vr)
|
|
758
|
+
e >= Se[n] && (t = n);
|
|
759
|
+
return t;
|
|
760
|
+
}
|
|
761
|
+
function de() {
|
|
762
|
+
const [e, t] = v(
|
|
763
|
+
() => typeof window > "u" ? 0 : window.innerWidth
|
|
764
|
+
);
|
|
765
|
+
k(() => {
|
|
766
|
+
if (typeof window > "u") return;
|
|
767
|
+
const o = () => t(window.innerWidth);
|
|
768
|
+
return o(), window.addEventListener("resize", o, { passive: !0 }), () => window.removeEventListener("resize", o);
|
|
769
|
+
}, []);
|
|
770
|
+
const n = Qr(e), r = (o) => e >= Se[o], s = (o) => e < Se[o];
|
|
771
|
+
return {
|
|
772
|
+
current: n,
|
|
773
|
+
width: e,
|
|
774
|
+
above: r,
|
|
775
|
+
below: s,
|
|
776
|
+
isMobile: s("md"),
|
|
777
|
+
isTablet: r("md") && s("lg"),
|
|
778
|
+
isDesktop: r("lg")
|
|
779
|
+
};
|
|
780
|
+
}
|
|
781
|
+
const Xr = "tempest_overlay_hcG1G", Zr = "tempest_tempest-drawer-overlay_XFbxY", Yr = "tempest_panel_wUX0N", es = "tempest_right_-oX-6", ts = "tempest_tempest-drawer-in-right_pWYHv", ns = "tempest_left_xi3nD", rs = "tempest_tempest-drawer-in-left_o7JSb", ss = "tempest_top_7rGCn", os = "tempest_tempest-drawer-in-top_kn6AF", is = "tempest_bottom_zd-25", as = "tempest_tempest-drawer-in-bottom_0x3u7", cs = "tempest_handle_5B-TB", ls = "tempest_handleTop_7aMf-", us = "tempest_header_sYoP1", ds = "tempest_title_LqUOu", ps = "tempest_close_tYPhU", fs = "tempest_body_aV9FG", ms = "tempest_footer_AuvUP", U = {
|
|
782
|
+
overlay: Xr,
|
|
783
|
+
tempestDrawerOverlay: Zr,
|
|
784
|
+
panel: Yr,
|
|
785
|
+
right: es,
|
|
786
|
+
tempestDrawerInRight: ts,
|
|
787
|
+
left: ns,
|
|
788
|
+
tempestDrawerInLeft: rs,
|
|
789
|
+
top: ss,
|
|
790
|
+
tempestDrawerInTop: os,
|
|
791
|
+
bottom: is,
|
|
792
|
+
tempestDrawerInBottom: as,
|
|
793
|
+
handle: cs,
|
|
794
|
+
handleTop: ls,
|
|
795
|
+
header: us,
|
|
796
|
+
title: ds,
|
|
797
|
+
close: ps,
|
|
798
|
+
body: fs,
|
|
799
|
+
footer: ms
|
|
749
800
|
};
|
|
750
|
-
function
|
|
801
|
+
function zc({
|
|
751
802
|
open: e,
|
|
752
803
|
onClose: t,
|
|
753
804
|
placement: n = "right",
|
|
@@ -755,26 +806,29 @@ function dc({
|
|
|
755
806
|
children: s,
|
|
756
807
|
footer: o,
|
|
757
808
|
closeOnBackdrop: i = !0,
|
|
758
|
-
closeOnEsc:
|
|
759
|
-
hideCloseButton:
|
|
760
|
-
className: u
|
|
809
|
+
closeOnEsc: a = !0,
|
|
810
|
+
hideCloseButton: c = !1,
|
|
811
|
+
className: u,
|
|
812
|
+
mobilePlacement: d,
|
|
813
|
+
showHandle: p = !1
|
|
761
814
|
}) {
|
|
815
|
+
const { isMobile: f } = de(), m = f && d ? d : n;
|
|
762
816
|
return k(() => {
|
|
763
817
|
if (!e) return;
|
|
764
|
-
const
|
|
818
|
+
const _ = document.body.style.overflow;
|
|
765
819
|
document.body.style.overflow = "hidden";
|
|
766
|
-
const
|
|
767
|
-
|
|
820
|
+
const h = (w) => {
|
|
821
|
+
a && w.key === "Escape" && t();
|
|
768
822
|
};
|
|
769
|
-
return window.addEventListener("keydown",
|
|
770
|
-
document.body.style.overflow =
|
|
823
|
+
return window.addEventListener("keydown", h), () => {
|
|
824
|
+
document.body.style.overflow = _, window.removeEventListener("keydown", h);
|
|
771
825
|
};
|
|
772
|
-
}, [e,
|
|
773
|
-
/* @__PURE__ */ y(
|
|
826
|
+
}, [e, a, t]), !e || typeof document > "u" ? null : Le(
|
|
827
|
+
/* @__PURE__ */ y(Ce, { children: [
|
|
774
828
|
/* @__PURE__ */ l(
|
|
775
829
|
"div",
|
|
776
830
|
{
|
|
777
|
-
className:
|
|
831
|
+
className: U.overlay,
|
|
778
832
|
onClick: () => {
|
|
779
833
|
i && t();
|
|
780
834
|
}
|
|
@@ -785,23 +839,33 @@ function dc({
|
|
|
785
839
|
{
|
|
786
840
|
role: "dialog",
|
|
787
841
|
"aria-modal": "true",
|
|
788
|
-
className: g(
|
|
842
|
+
className: g(U.panel, U[m], u),
|
|
789
843
|
children: [
|
|
790
|
-
(
|
|
791
|
-
|
|
792
|
-
|
|
844
|
+
p && (m === "bottom" || m === "top") && /* @__PURE__ */ l(
|
|
845
|
+
"div",
|
|
846
|
+
{
|
|
847
|
+
className: g(
|
|
848
|
+
U.handle,
|
|
849
|
+
m === "top" && U.handleTop
|
|
850
|
+
),
|
|
851
|
+
"aria-hidden": !0
|
|
852
|
+
}
|
|
853
|
+
),
|
|
854
|
+
(r || !c) && /* @__PURE__ */ y("header", { className: U.header, children: [
|
|
855
|
+
/* @__PURE__ */ l("h3", { className: U.title, children: r }),
|
|
856
|
+
!c && /* @__PURE__ */ l(
|
|
793
857
|
"button",
|
|
794
858
|
{
|
|
795
859
|
type: "button",
|
|
796
860
|
"aria-label": "Fechar",
|
|
797
|
-
className:
|
|
861
|
+
className: U.close,
|
|
798
862
|
onClick: t,
|
|
799
|
-
children: /* @__PURE__ */ l(
|
|
863
|
+
children: /* @__PURE__ */ l(hs, {})
|
|
800
864
|
}
|
|
801
865
|
)
|
|
802
866
|
] }),
|
|
803
|
-
/* @__PURE__ */ l("div", { className:
|
|
804
|
-
o && /* @__PURE__ */ l("footer", { className:
|
|
867
|
+
/* @__PURE__ */ l("div", { className: U.body, children: s }),
|
|
868
|
+
o && /* @__PURE__ */ l("footer", { className: U.footer, children: o })
|
|
805
869
|
]
|
|
806
870
|
}
|
|
807
871
|
)
|
|
@@ -809,7 +873,7 @@ function dc({
|
|
|
809
873
|
document.body
|
|
810
874
|
);
|
|
811
875
|
}
|
|
812
|
-
function
|
|
876
|
+
function hs() {
|
|
813
877
|
return /* @__PURE__ */ l("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ l(
|
|
814
878
|
"path",
|
|
815
879
|
{
|
|
@@ -820,14 +884,14 @@ function Xr() {
|
|
|
820
884
|
}
|
|
821
885
|
) });
|
|
822
886
|
}
|
|
823
|
-
const
|
|
824
|
-
wrapper:
|
|
825
|
-
icon:
|
|
826
|
-
title:
|
|
827
|
-
description:
|
|
828
|
-
action:
|
|
887
|
+
const _s = "tempest_wrapper_gzyTd", gs = "tempest_icon_qVCyh", ys = "tempest_title_xPfUf", bs = "tempest_description_oWwH1", ws = "tempest_action_dqxw1", ae = {
|
|
888
|
+
wrapper: _s,
|
|
889
|
+
icon: gs,
|
|
890
|
+
title: ys,
|
|
891
|
+
description: bs,
|
|
892
|
+
action: ws
|
|
829
893
|
};
|
|
830
|
-
function
|
|
894
|
+
function jc({ icon: e, title: t, description: n, action: r, className: s }) {
|
|
831
895
|
return /* @__PURE__ */ y("div", { className: g(ae.wrapper, s), children: [
|
|
832
896
|
e && /* @__PURE__ */ l("div", { className: ae.icon, children: e }),
|
|
833
897
|
/* @__PURE__ */ l("h4", { className: ae.title, children: t }),
|
|
@@ -835,14 +899,14 @@ function pc({ icon: e, title: t, description: n, action: r, className: s }) {
|
|
|
835
899
|
r && /* @__PURE__ */ l("div", { className: ae.action, children: r })
|
|
836
900
|
] });
|
|
837
901
|
}
|
|
838
|
-
const
|
|
839
|
-
wrapper:
|
|
840
|
-
icon:
|
|
841
|
-
title:
|
|
842
|
-
description:
|
|
843
|
-
action:
|
|
902
|
+
const vs = "tempest_wrapper_luRyF", $s = "tempest_icon_dEdBl", ks = "tempest_title_StutD", Ns = "tempest_description_A2XCb", xs = "tempest_action_vm1LC", ce = {
|
|
903
|
+
wrapper: vs,
|
|
904
|
+
icon: $s,
|
|
905
|
+
title: ks,
|
|
906
|
+
description: Ns,
|
|
907
|
+
action: xs
|
|
844
908
|
};
|
|
845
|
-
function
|
|
909
|
+
function Uc({
|
|
846
910
|
title: e = "Algo deu errado",
|
|
847
911
|
description: t = "Não foi possível carregar essas informações.",
|
|
848
912
|
onRetry: n,
|
|
@@ -851,13 +915,13 @@ function fc({
|
|
|
851
915
|
className: o
|
|
852
916
|
}) {
|
|
853
917
|
return /* @__PURE__ */ y("div", { className: g(ce.wrapper, o), children: [
|
|
854
|
-
/* @__PURE__ */ l("div", { className: ce.icon, children: s ?? /* @__PURE__ */ l(
|
|
918
|
+
/* @__PURE__ */ l("div", { className: ce.icon, children: s ?? /* @__PURE__ */ l(Ts, {}) }),
|
|
855
919
|
/* @__PURE__ */ l("h4", { className: ce.title, children: e }),
|
|
856
920
|
t && /* @__PURE__ */ l("p", { className: ce.description, children: t }),
|
|
857
|
-
n && /* @__PURE__ */ l("div", { className: ce.action, children: /* @__PURE__ */ l(
|
|
921
|
+
n && /* @__PURE__ */ l("div", { className: ce.action, children: /* @__PURE__ */ l(Te, { variant: "secondary", onClick: n, children: r }) })
|
|
858
922
|
] });
|
|
859
923
|
}
|
|
860
|
-
function
|
|
924
|
+
function Ts() {
|
|
861
925
|
return /* @__PURE__ */ l("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ l(
|
|
862
926
|
"path",
|
|
863
927
|
{
|
|
@@ -869,30 +933,30 @@ function us() {
|
|
|
869
933
|
}
|
|
870
934
|
) });
|
|
871
935
|
}
|
|
872
|
-
const
|
|
873
|
-
wrapper:
|
|
874
|
-
label:
|
|
875
|
-
dropzone:
|
|
876
|
-
active:
|
|
877
|
-
disabled:
|
|
878
|
-
icon:
|
|
879
|
-
title:
|
|
880
|
-
subtitle:
|
|
881
|
-
files:
|
|
882
|
-
file:
|
|
883
|
-
fileMeta:
|
|
884
|
-
remove:
|
|
885
|
-
hidden:
|
|
936
|
+
const Ss = "tempest_wrapper_E0qHs", Es = "tempest_label_lbMkx", Cs = "tempest_dropzone_jqua0", Ls = "tempest_active_CG9Uk", Is = "tempest_disabled_WNUUl", Ds = "tempest_icon_i9fGH", Ms = "tempest_title_bTVFl", Rs = "tempest_subtitle_S54OV", Ps = "tempest_files_WljYm", As = "tempest_file_Lp-dR", Bs = "tempest_fileMeta_LTnN2", Fs = "tempest_remove_jskra", Os = "tempest_hidden_ReEq6", R = {
|
|
937
|
+
wrapper: Ss,
|
|
938
|
+
label: Es,
|
|
939
|
+
dropzone: Cs,
|
|
940
|
+
active: Ls,
|
|
941
|
+
disabled: Is,
|
|
942
|
+
icon: Ds,
|
|
943
|
+
title: Ms,
|
|
944
|
+
subtitle: Rs,
|
|
945
|
+
files: Ps,
|
|
946
|
+
file: As,
|
|
947
|
+
fileMeta: Bs,
|
|
948
|
+
remove: Fs,
|
|
949
|
+
hidden: Os
|
|
886
950
|
};
|
|
887
|
-
function
|
|
951
|
+
function Ws(e) {
|
|
888
952
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / 1024 / 1024).toFixed(1)} MB`;
|
|
889
953
|
}
|
|
890
|
-
function
|
|
954
|
+
function zs(e, t) {
|
|
891
955
|
if (!t) return !0;
|
|
892
956
|
const n = t.split(",").map((o) => o.trim().toLowerCase()), r = e.name.toLowerCase(), s = e.type.toLowerCase();
|
|
893
957
|
return n.some((o) => o.startsWith(".") ? r.endsWith(o) : o.endsWith("/*") ? s.startsWith(o.replace("/*", "/")) : s === o);
|
|
894
958
|
}
|
|
895
|
-
function
|
|
959
|
+
function qc({
|
|
896
960
|
value: e,
|
|
897
961
|
onChange: t,
|
|
898
962
|
label: n,
|
|
@@ -900,71 +964,71 @@ function mc({
|
|
|
900
964
|
multiple: s = !1,
|
|
901
965
|
maxSize: o,
|
|
902
966
|
onReject: i,
|
|
903
|
-
disabled:
|
|
904
|
-
title:
|
|
967
|
+
disabled: a,
|
|
968
|
+
title: c = "Arraste arquivos aqui ou clique para selecionar",
|
|
905
969
|
subtitle: u,
|
|
906
970
|
className: d
|
|
907
971
|
}) {
|
|
908
|
-
const [p, f] = v(!1),
|
|
972
|
+
const [p, f] = v(!1), m = S(null);
|
|
909
973
|
function _(b) {
|
|
910
974
|
const $ = [], N = [];
|
|
911
|
-
for (const
|
|
912
|
-
if (!
|
|
913
|
-
N.push({ file:
|
|
975
|
+
for (const M of Array.from(b)) {
|
|
976
|
+
if (!zs(M, r)) {
|
|
977
|
+
N.push({ file: M, reason: "type" });
|
|
914
978
|
continue;
|
|
915
979
|
}
|
|
916
|
-
if (o &&
|
|
917
|
-
N.push({ file:
|
|
980
|
+
if (o && M.size > o) {
|
|
981
|
+
N.push({ file: M, reason: "size" });
|
|
918
982
|
continue;
|
|
919
983
|
}
|
|
920
|
-
$.push(
|
|
984
|
+
$.push(M);
|
|
921
985
|
}
|
|
922
986
|
if (N.length > 0 && i?.(N), $.length === 0) return;
|
|
923
|
-
const
|
|
924
|
-
t(
|
|
987
|
+
const I = s ? [...e, ...$] : $.slice(0, 1);
|
|
988
|
+
t(I);
|
|
925
989
|
}
|
|
926
|
-
function
|
|
927
|
-
b.preventDefault(), f(!1), !
|
|
990
|
+
function h(b) {
|
|
991
|
+
b.preventDefault(), f(!1), !a && b.dataTransfer?.files && _(b.dataTransfer.files);
|
|
928
992
|
}
|
|
929
993
|
function w(b) {
|
|
930
994
|
const $ = e.slice();
|
|
931
995
|
$.splice(b, 1), t($);
|
|
932
996
|
}
|
|
933
|
-
return /* @__PURE__ */ y("div", { className: g(
|
|
934
|
-
n && /* @__PURE__ */ l("label", { className:
|
|
997
|
+
return /* @__PURE__ */ y("div", { className: g(R.wrapper, d), children: [
|
|
998
|
+
n && /* @__PURE__ */ l("label", { className: R.label, children: n }),
|
|
935
999
|
/* @__PURE__ */ y(
|
|
936
1000
|
"div",
|
|
937
1001
|
{
|
|
938
1002
|
className: g(
|
|
939
|
-
|
|
940
|
-
p &&
|
|
941
|
-
|
|
1003
|
+
R.dropzone,
|
|
1004
|
+
p && R.active,
|
|
1005
|
+
a && R.disabled
|
|
942
1006
|
),
|
|
943
1007
|
role: "button",
|
|
944
|
-
tabIndex:
|
|
945
|
-
onClick: () => !
|
|
1008
|
+
tabIndex: a ? -1 : 0,
|
|
1009
|
+
onClick: () => !a && m.current?.click(),
|
|
946
1010
|
onKeyDown: (b) => {
|
|
947
|
-
(b.key === "Enter" || b.key === " ") && (b.preventDefault(),
|
|
1011
|
+
(b.key === "Enter" || b.key === " ") && (b.preventDefault(), m.current?.click());
|
|
948
1012
|
},
|
|
949
1013
|
onDragEnter: (b) => {
|
|
950
|
-
b.preventDefault(),
|
|
1014
|
+
b.preventDefault(), a || f(!0);
|
|
951
1015
|
},
|
|
952
1016
|
onDragOver: (b) => b.preventDefault(),
|
|
953
1017
|
onDragLeave: () => f(!1),
|
|
954
|
-
onDrop:
|
|
1018
|
+
onDrop: h,
|
|
955
1019
|
children: [
|
|
956
|
-
/* @__PURE__ */ l("div", { className:
|
|
957
|
-
/* @__PURE__ */ l("p", { className:
|
|
958
|
-
u && /* @__PURE__ */ l("p", { className:
|
|
1020
|
+
/* @__PURE__ */ l("div", { className: R.icon, "aria-hidden": !0, children: /* @__PURE__ */ l(js, {}) }),
|
|
1021
|
+
/* @__PURE__ */ l("p", { className: R.title, children: c }),
|
|
1022
|
+
u && /* @__PURE__ */ l("p", { className: R.subtitle, children: u }),
|
|
959
1023
|
/* @__PURE__ */ l(
|
|
960
1024
|
"input",
|
|
961
1025
|
{
|
|
962
|
-
ref:
|
|
1026
|
+
ref: m,
|
|
963
1027
|
type: "file",
|
|
964
1028
|
accept: r,
|
|
965
1029
|
multiple: s,
|
|
966
|
-
disabled:
|
|
967
|
-
className:
|
|
1030
|
+
disabled: a,
|
|
1031
|
+
className: R.hidden,
|
|
968
1032
|
onChange: (b) => {
|
|
969
1033
|
b.target.files && _(b.target.files), b.target.value = "";
|
|
970
1034
|
}
|
|
@@ -973,17 +1037,17 @@ function mc({
|
|
|
973
1037
|
]
|
|
974
1038
|
}
|
|
975
1039
|
),
|
|
976
|
-
e.length > 0 && /* @__PURE__ */ l("ul", { className:
|
|
1040
|
+
e.length > 0 && /* @__PURE__ */ l("ul", { className: R.files, children: e.map((b, $) => /* @__PURE__ */ y("li", { className: R.file, children: [
|
|
977
1041
|
/* @__PURE__ */ y("div", { children: [
|
|
978
1042
|
/* @__PURE__ */ l("div", { children: b.name }),
|
|
979
|
-
/* @__PURE__ */ l("div", { className:
|
|
1043
|
+
/* @__PURE__ */ l("div", { className: R.fileMeta, children: Ws(b.size) })
|
|
980
1044
|
] }),
|
|
981
1045
|
/* @__PURE__ */ l(
|
|
982
1046
|
"button",
|
|
983
1047
|
{
|
|
984
1048
|
type: "button",
|
|
985
1049
|
"aria-label": `Remover ${b.name}`,
|
|
986
|
-
className:
|
|
1050
|
+
className: R.remove,
|
|
987
1051
|
onClick: () => w($),
|
|
988
1052
|
children: "×"
|
|
989
1053
|
}
|
|
@@ -991,7 +1055,7 @@ function mc({
|
|
|
991
1055
|
] }, `${b.name}-${$}`)) })
|
|
992
1056
|
] });
|
|
993
1057
|
}
|
|
994
|
-
function
|
|
1058
|
+
function js() {
|
|
995
1059
|
return /* @__PURE__ */ l("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ l(
|
|
996
1060
|
"path",
|
|
997
1061
|
{
|
|
@@ -1003,47 +1067,47 @@ function Ss() {
|
|
|
1003
1067
|
}
|
|
1004
1068
|
) });
|
|
1005
1069
|
}
|
|
1006
|
-
const
|
|
1007
|
-
form:
|
|
1008
|
-
stack:
|
|
1009
|
-
inline:
|
|
1010
|
-
grid:
|
|
1011
|
-
section:
|
|
1012
|
-
sectionHeader:
|
|
1013
|
-
sectionTitle:
|
|
1014
|
-
sectionDescription:
|
|
1015
|
-
sectionBody:
|
|
1016
|
-
row:
|
|
1017
|
-
actions:
|
|
1018
|
-
start:
|
|
1019
|
-
center:
|
|
1020
|
-
end:
|
|
1021
|
-
between:
|
|
1070
|
+
const Us = "tempest_form_jNBDR", qs = "tempest_stack_O1Hl-", Gs = "tempest_inline_LBQAv", Js = "tempest_grid_-B86T", Hs = "tempest_section_HGqw3", Ks = "tempest_sectionHeader_ji9hQ", Vs = "tempest_sectionTitle_GTPwe", Qs = "tempest_sectionDescription_KjW7k", Xs = "tempest_sectionBody_Vp2wz", Zs = "tempest_row_1EkVR", Ys = "tempest_actions_hK95I", eo = "tempest_start_gXnm3", to = "tempest_center_mKkz4", no = "tempest_end_O3yDQ", ro = "tempest_between_tte2z", z = {
|
|
1071
|
+
form: Us,
|
|
1072
|
+
stack: qs,
|
|
1073
|
+
inline: Gs,
|
|
1074
|
+
grid: Js,
|
|
1075
|
+
section: Hs,
|
|
1076
|
+
sectionHeader: Ks,
|
|
1077
|
+
sectionTitle: Vs,
|
|
1078
|
+
sectionDescription: Qs,
|
|
1079
|
+
sectionBody: Xs,
|
|
1080
|
+
row: Zs,
|
|
1081
|
+
actions: Ys,
|
|
1082
|
+
start: eo,
|
|
1083
|
+
center: to,
|
|
1084
|
+
end: no,
|
|
1085
|
+
between: ro
|
|
1022
1086
|
};
|
|
1023
|
-
function
|
|
1087
|
+
function _e(e, t) {
|
|
1024
1088
|
return e === void 0 ? `${t * 4}px` : typeof e == "number" ? `${e * 4}px` : e;
|
|
1025
1089
|
}
|
|
1026
|
-
function
|
|
1090
|
+
function Ge(e) {
|
|
1027
1091
|
return e === void 0 ? "repeat(2, minmax(0, 1fr))" : typeof e == "number" ? `repeat(${e}, minmax(0, 1fr))` : e;
|
|
1028
1092
|
}
|
|
1029
|
-
const
|
|
1093
|
+
const Gc = j(function({ layout: t = "stack", columns: n, gap: r, className: s, style: o, children: i, ...a }, c) {
|
|
1030
1094
|
const u = {
|
|
1031
|
-
gap:
|
|
1032
|
-
...t === "grid" ? { gridTemplateColumns:
|
|
1095
|
+
gap: _e(r, 4),
|
|
1096
|
+
...t === "grid" ? { gridTemplateColumns: Ge(n) } : null,
|
|
1033
1097
|
...o
|
|
1034
1098
|
};
|
|
1035
1099
|
return /* @__PURE__ */ l(
|
|
1036
1100
|
"form",
|
|
1037
1101
|
{
|
|
1038
|
-
ref:
|
|
1039
|
-
className: g(
|
|
1102
|
+
ref: c,
|
|
1103
|
+
className: g(z.form, z[t], s),
|
|
1040
1104
|
style: u,
|
|
1041
|
-
...
|
|
1105
|
+
...a,
|
|
1042
1106
|
children: i
|
|
1043
1107
|
}
|
|
1044
1108
|
);
|
|
1045
1109
|
});
|
|
1046
|
-
function
|
|
1110
|
+
function Jc({
|
|
1047
1111
|
title: e,
|
|
1048
1112
|
description: t,
|
|
1049
1113
|
layout: n = "stack",
|
|
@@ -1051,26 +1115,26 @@ function _c({
|
|
|
1051
1115
|
gap: s,
|
|
1052
1116
|
className: o,
|
|
1053
1117
|
style: i,
|
|
1054
|
-
children:
|
|
1055
|
-
...
|
|
1118
|
+
children: a,
|
|
1119
|
+
...c
|
|
1056
1120
|
}) {
|
|
1057
1121
|
const u = {
|
|
1058
|
-
gap:
|
|
1059
|
-
...n === "grid" ? { gridTemplateColumns:
|
|
1122
|
+
gap: _e(s, 4),
|
|
1123
|
+
...n === "grid" ? { gridTemplateColumns: Ge(r) } : null
|
|
1060
1124
|
};
|
|
1061
|
-
return /* @__PURE__ */ y("section", { className: g(
|
|
1062
|
-
(e || t) && /* @__PURE__ */ y("header", { className:
|
|
1063
|
-
e && /* @__PURE__ */ l("h3", { className:
|
|
1064
|
-
t && /* @__PURE__ */ l("p", { className:
|
|
1125
|
+
return /* @__PURE__ */ y("section", { className: g(z.section, o), style: i, ...c, children: [
|
|
1126
|
+
(e || t) && /* @__PURE__ */ y("header", { className: z.sectionHeader, children: [
|
|
1127
|
+
e && /* @__PURE__ */ l("h3", { className: z.sectionTitle, children: e }),
|
|
1128
|
+
t && /* @__PURE__ */ l("p", { className: z.sectionDescription, children: t })
|
|
1065
1129
|
] }),
|
|
1066
|
-
/* @__PURE__ */ l("div", { className: g(
|
|
1130
|
+
/* @__PURE__ */ l("div", { className: g(z.sectionBody, z[n]), style: u, children: a })
|
|
1067
1131
|
] });
|
|
1068
1132
|
}
|
|
1069
|
-
function
|
|
1070
|
-
const o = { gap:
|
|
1071
|
-
return /* @__PURE__ */ l("div", { className: g(
|
|
1133
|
+
function Hc({ gap: e, className: t, style: n, children: r, ...s }) {
|
|
1134
|
+
const o = { gap: _e(e, 3), ...n };
|
|
1135
|
+
return /* @__PURE__ */ l("div", { className: g(z.row, t), style: o, ...s, children: r });
|
|
1072
1136
|
}
|
|
1073
|
-
function
|
|
1137
|
+
function Kc({
|
|
1074
1138
|
align: e = "end",
|
|
1075
1139
|
gap: t,
|
|
1076
1140
|
className: n,
|
|
@@ -1078,34 +1142,48 @@ function yc({
|
|
|
1078
1142
|
children: s,
|
|
1079
1143
|
...o
|
|
1080
1144
|
}) {
|
|
1081
|
-
const i = { gap:
|
|
1082
|
-
return /* @__PURE__ */ l("div", { className: g(
|
|
1083
|
-
}
|
|
1084
|
-
const
|
|
1085
|
-
container:
|
|
1086
|
-
sm:
|
|
1087
|
-
md:
|
|
1088
|
-
lg:
|
|
1089
|
-
xl:
|
|
1090
|
-
full:
|
|
1091
|
-
stack:
|
|
1092
|
-
vertical:
|
|
1093
|
-
horizontal:
|
|
1094
|
-
center:
|
|
1095
|
-
start:
|
|
1096
|
-
end:
|
|
1097
|
-
stretch:
|
|
1098
|
-
justifyStart:
|
|
1099
|
-
justifyCenter:
|
|
1100
|
-
justifyEnd:
|
|
1101
|
-
justifyBetween:
|
|
1102
|
-
wrap:
|
|
1103
|
-
grid:
|
|
1145
|
+
const i = { gap: _e(t, 2), ...r };
|
|
1146
|
+
return /* @__PURE__ */ l("div", { className: g(z.actions, z[e], n), style: i, ...o, children: s });
|
|
1147
|
+
}
|
|
1148
|
+
const so = "tempest_container_fJfOt", oo = "tempest_sm_k8D4-", io = "tempest_md_EnpYy", ao = "tempest_lg_UU-Ig", co = "tempest_xl_2TEWj", lo = "tempest_full_l8bvG", uo = "tempest_stack_sxR8u", po = "tempest_vertical_2TMf5", fo = "tempest_horizontal_r7-c-", mo = "tempest_center_EDSAh", ho = "tempest_start_ucQ-K", _o = "tempest_end_pnKlF", go = "tempest_stretch_pX6l7", yo = "tempest_justifyStart_lHYsS", bo = "tempest_justifyCenter_JH2m6", wo = "tempest_justifyEnd_EBisT", vo = "tempest_justifyBetween_mAJwT", $o = "tempest_wrap_-xxOh", ko = "tempest_grid_o-JIX", F = {
|
|
1149
|
+
container: so,
|
|
1150
|
+
sm: oo,
|
|
1151
|
+
md: io,
|
|
1152
|
+
lg: ao,
|
|
1153
|
+
xl: co,
|
|
1154
|
+
full: lo,
|
|
1155
|
+
stack: uo,
|
|
1156
|
+
vertical: po,
|
|
1157
|
+
horizontal: fo,
|
|
1158
|
+
center: mo,
|
|
1159
|
+
start: ho,
|
|
1160
|
+
end: _o,
|
|
1161
|
+
stretch: go,
|
|
1162
|
+
justifyStart: yo,
|
|
1163
|
+
justifyCenter: bo,
|
|
1164
|
+
justifyEnd: wo,
|
|
1165
|
+
justifyBetween: vo,
|
|
1166
|
+
wrap: $o,
|
|
1167
|
+
grid: ko
|
|
1104
1168
|
};
|
|
1105
|
-
function
|
|
1169
|
+
function Vc({ size: e = "lg", className: t, children: n, ...r }) {
|
|
1106
1170
|
return /* @__PURE__ */ l("div", { className: g(F.container, F[e], t), ...r, children: n });
|
|
1107
1171
|
}
|
|
1108
|
-
function
|
|
1172
|
+
function No(e) {
|
|
1173
|
+
return typeof e == "object" && e !== null && ("mobile" in e || "tablet" in e || "desktop" in e);
|
|
1174
|
+
}
|
|
1175
|
+
function he(e, t) {
|
|
1176
|
+
if (e !== void 0)
|
|
1177
|
+
return No(e) ? t === "desktop" ? e.desktop ?? e.tablet ?? e.mobile : t === "tablet" ? e.tablet ?? e.mobile ?? e.desktop : e.mobile ?? e.tablet ?? e.desktop : e;
|
|
1178
|
+
}
|
|
1179
|
+
function Je(e) {
|
|
1180
|
+
if (e !== void 0)
|
|
1181
|
+
return typeof e == "number" ? `${e * 4}px` : e;
|
|
1182
|
+
}
|
|
1183
|
+
function He(e, t) {
|
|
1184
|
+
return e ? "mobile" : t ? "tablet" : "desktop";
|
|
1185
|
+
}
|
|
1186
|
+
function Qc({
|
|
1109
1187
|
direction: e = "vertical",
|
|
1110
1188
|
gap: t = 2,
|
|
1111
1189
|
align: n,
|
|
@@ -1113,66 +1191,70 @@ function wc({
|
|
|
1113
1191
|
wrap: s = !1,
|
|
1114
1192
|
className: o,
|
|
1115
1193
|
style: i,
|
|
1116
|
-
children:
|
|
1117
|
-
...
|
|
1194
|
+
children: a,
|
|
1195
|
+
...c
|
|
1118
1196
|
}) {
|
|
1119
|
-
const d =
|
|
1197
|
+
const { isMobile: u, isTablet: d } = de(), p = He(u, d), f = he(e, p) ?? "vertical", _ = { gap: Je(he(t, p)), ...i }, h = r === "between" ? F.justifyBetween : r === "center" ? F.justifyCenter : r === "end" ? F.justifyEnd : r === "start" ? F.justifyStart : void 0;
|
|
1120
1198
|
return /* @__PURE__ */ l(
|
|
1121
1199
|
"div",
|
|
1122
1200
|
{
|
|
1123
1201
|
className: g(
|
|
1124
1202
|
F.stack,
|
|
1125
|
-
|
|
1203
|
+
f === "vertical" ? F.vertical : F.horizontal,
|
|
1126
1204
|
n && F[n],
|
|
1127
|
-
|
|
1205
|
+
h,
|
|
1128
1206
|
s && F.wrap,
|
|
1129
1207
|
o
|
|
1130
1208
|
),
|
|
1131
|
-
style:
|
|
1132
|
-
...
|
|
1133
|
-
children:
|
|
1209
|
+
style: _,
|
|
1210
|
+
...c,
|
|
1211
|
+
children: a
|
|
1134
1212
|
}
|
|
1135
1213
|
);
|
|
1136
1214
|
}
|
|
1137
|
-
function
|
|
1138
|
-
|
|
1215
|
+
function xo(e) {
|
|
1216
|
+
if (e !== void 0)
|
|
1217
|
+
return typeof e == "number" ? `repeat(${e}, minmax(0, 1fr))` : e;
|
|
1218
|
+
}
|
|
1219
|
+
function Xc({ columns: e = 2, gap: t = 4, className: n, style: r, children: s, ...o }) {
|
|
1220
|
+
const { isMobile: i, isTablet: a } = de(), c = He(i, a), u = xo(he(e, c)), d = Je(he(t, c));
|
|
1139
1221
|
return /* @__PURE__ */ l(
|
|
1140
1222
|
"div",
|
|
1141
1223
|
{
|
|
1142
1224
|
className: g(F.grid, n),
|
|
1143
|
-
style: { gridTemplateColumns:
|
|
1225
|
+
style: { gridTemplateColumns: u, gap: d, ...r },
|
|
1144
1226
|
...o,
|
|
1145
1227
|
children: s
|
|
1146
1228
|
}
|
|
1147
1229
|
);
|
|
1148
1230
|
}
|
|
1149
|
-
const
|
|
1150
|
-
kbd:
|
|
1151
|
-
sm:
|
|
1152
|
-
md:
|
|
1153
|
-
lg:
|
|
1231
|
+
const To = "tempest_kbd_jgbYx", So = "tempest_sm_9WPWA", Eo = "tempest_md_BePC0", Co = "tempest_lg_cBKum", Me = {
|
|
1232
|
+
kbd: To,
|
|
1233
|
+
sm: So,
|
|
1234
|
+
md: Eo,
|
|
1235
|
+
lg: Co
|
|
1154
1236
|
};
|
|
1155
|
-
function
|
|
1156
|
-
return /* @__PURE__ */ l("kbd", { className: g(
|
|
1157
|
-
}
|
|
1158
|
-
const
|
|
1159
|
-
wrapper:
|
|
1160
|
-
controls:
|
|
1161
|
-
page:
|
|
1162
|
-
active:
|
|
1163
|
-
ellipsis:
|
|
1164
|
-
sizeSelect:
|
|
1237
|
+
function Zc({ size: e = "md", className: t, children: n, ...r }) {
|
|
1238
|
+
return /* @__PURE__ */ l("kbd", { className: g(Me.kbd, Me[e], t), ...r, children: n });
|
|
1239
|
+
}
|
|
1240
|
+
const Lo = "tempest_wrapper_cRGQm", Io = "tempest_controls_fdL-y", Do = "tempest_page_WjG0l", Mo = "tempest_active_1kqsJ", Ro = "tempest_ellipsis_V294k", Po = "tempest_sizeSelect_ZayTo", X = {
|
|
1241
|
+
wrapper: Lo,
|
|
1242
|
+
controls: Io,
|
|
1243
|
+
page: Do,
|
|
1244
|
+
active: Mo,
|
|
1245
|
+
ellipsis: Ro,
|
|
1246
|
+
sizeSelect: Po
|
|
1165
1247
|
};
|
|
1166
|
-
function
|
|
1248
|
+
function Ao(e, t, n) {
|
|
1167
1249
|
const r = n + 4;
|
|
1168
1250
|
if (t <= r)
|
|
1169
|
-
return Array.from({ length: t }, (
|
|
1251
|
+
return Array.from({ length: t }, (a, c) => c + 1);
|
|
1170
1252
|
const s = Math.max(2, e - Math.floor(n / 2)), o = Math.min(t - 1, s + n - 1), i = [1];
|
|
1171
1253
|
s > 2 && i.push("...");
|
|
1172
|
-
for (let
|
|
1254
|
+
for (let a = s; a <= o; a++) i.push(a);
|
|
1173
1255
|
return o < t - 1 && i.push("..."), i.push(t), i;
|
|
1174
1256
|
}
|
|
1175
|
-
function
|
|
1257
|
+
function Yc({
|
|
1176
1258
|
page: e,
|
|
1177
1259
|
totalPages: t,
|
|
1178
1260
|
onPageChange: n,
|
|
@@ -1180,21 +1262,21 @@ function Nc({
|
|
|
1180
1262
|
onPageSizeChange: s,
|
|
1181
1263
|
pageSizeOptions: o = [10, 25, 50, 100],
|
|
1182
1264
|
totalItems: i,
|
|
1183
|
-
siblingCount:
|
|
1184
|
-
className:
|
|
1265
|
+
siblingCount: a = 3,
|
|
1266
|
+
className: c
|
|
1185
1267
|
}) {
|
|
1186
|
-
const u =
|
|
1187
|
-
() =>
|
|
1188
|
-
[e, t,
|
|
1268
|
+
const u = q(
|
|
1269
|
+
() => Ao(e, t, a),
|
|
1270
|
+
[e, t, a]
|
|
1189
1271
|
);
|
|
1190
|
-
return t <= 1 && !s ? null : /* @__PURE__ */ y("div", { className: g(
|
|
1272
|
+
return t <= 1 && !s ? null : /* @__PURE__ */ y("div", { className: g(X.wrapper, c), children: [
|
|
1191
1273
|
/* @__PURE__ */ l("div", { children: typeof i == "number" ? `${i} resultado${i === 1 ? "" : "s"}` : null }),
|
|
1192
|
-
/* @__PURE__ */ y("div", { className:
|
|
1274
|
+
/* @__PURE__ */ y("div", { className: X.controls, children: [
|
|
1193
1275
|
/* @__PURE__ */ l(
|
|
1194
1276
|
"button",
|
|
1195
1277
|
{
|
|
1196
1278
|
type: "button",
|
|
1197
|
-
className:
|
|
1279
|
+
className: X.page,
|
|
1198
1280
|
onClick: () => n(Math.max(1, e - 1)),
|
|
1199
1281
|
disabled: e <= 1,
|
|
1200
1282
|
"aria-label": "Página anterior",
|
|
@@ -1202,11 +1284,11 @@ function Nc({
|
|
|
1202
1284
|
}
|
|
1203
1285
|
),
|
|
1204
1286
|
u.map(
|
|
1205
|
-
(d, p) => d === "..." ? /* @__PURE__ */ l("span", { className:
|
|
1287
|
+
(d, p) => d === "..." ? /* @__PURE__ */ l("span", { className: X.ellipsis, children: "…" }, `ellipsis-${p}`) : /* @__PURE__ */ l(
|
|
1206
1288
|
"button",
|
|
1207
1289
|
{
|
|
1208
1290
|
type: "button",
|
|
1209
|
-
className: g(
|
|
1291
|
+
className: g(X.page, d === e && X.active),
|
|
1210
1292
|
onClick: () => n(d),
|
|
1211
1293
|
"aria-current": d === e ? "page" : void 0,
|
|
1212
1294
|
children: d
|
|
@@ -1218,7 +1300,7 @@ function Nc({
|
|
|
1218
1300
|
"button",
|
|
1219
1301
|
{
|
|
1220
1302
|
type: "button",
|
|
1221
|
-
className:
|
|
1303
|
+
className: X.page,
|
|
1222
1304
|
onClick: () => n(Math.min(t, e + 1)),
|
|
1223
1305
|
disabled: e >= t,
|
|
1224
1306
|
"aria-label": "Próxima página",
|
|
@@ -1228,7 +1310,7 @@ function Nc({
|
|
|
1228
1310
|
s && /* @__PURE__ */ l(
|
|
1229
1311
|
"select",
|
|
1230
1312
|
{
|
|
1231
|
-
className:
|
|
1313
|
+
className: X.sizeSelect,
|
|
1232
1314
|
value: r,
|
|
1233
1315
|
onChange: (d) => s(Number(d.target.value)),
|
|
1234
1316
|
"aria-label": "Itens por página",
|
|
@@ -1241,18 +1323,18 @@ function Nc({
|
|
|
1241
1323
|
] })
|
|
1242
1324
|
] });
|
|
1243
1325
|
}
|
|
1244
|
-
const
|
|
1245
|
-
wrapper:
|
|
1246
|
-
bar:
|
|
1247
|
-
fill:
|
|
1248
|
-
success:
|
|
1249
|
-
warning:
|
|
1250
|
-
danger:
|
|
1251
|
-
indeterminate:
|
|
1252
|
-
tempestProgressLoop:
|
|
1253
|
-
label:
|
|
1326
|
+
const Bo = "tempest_wrapper_BQek1", Fo = "tempest_bar_uC-0x", Oo = "tempest_fill_vmg7x", Wo = "tempest_success_gWJ8U", zo = "tempest_warning_DGkPO", jo = "tempest_danger_gfwHh", Uo = "tempest_indeterminate_HojUj", qo = "tempest_tempest-progress-loop_0nEdF", Go = "tempest_label_qqHJM", ne = {
|
|
1327
|
+
wrapper: Bo,
|
|
1328
|
+
bar: Fo,
|
|
1329
|
+
fill: Oo,
|
|
1330
|
+
success: Wo,
|
|
1331
|
+
warning: zo,
|
|
1332
|
+
danger: jo,
|
|
1333
|
+
indeterminate: Uo,
|
|
1334
|
+
tempestProgressLoop: qo,
|
|
1335
|
+
label: Go
|
|
1254
1336
|
};
|
|
1255
|
-
function
|
|
1337
|
+
function el({
|
|
1256
1338
|
value: e = 0,
|
|
1257
1339
|
max: t = 100,
|
|
1258
1340
|
variant: n = "primary",
|
|
@@ -1261,12 +1343,12 @@ function kc({
|
|
|
1261
1343
|
label: o,
|
|
1262
1344
|
className: i
|
|
1263
1345
|
}) {
|
|
1264
|
-
const
|
|
1265
|
-
return /* @__PURE__ */ y("div", { className: g(
|
|
1266
|
-
(s || o) && /* @__PURE__ */ y("div", { className:
|
|
1346
|
+
const a = r ? 0 : Math.max(0, Math.min(100, e / t * 100));
|
|
1347
|
+
return /* @__PURE__ */ y("div", { className: g(ne.wrapper, i), children: [
|
|
1348
|
+
(s || o) && /* @__PURE__ */ y("div", { className: ne.label, children: [
|
|
1267
1349
|
o && /* @__PURE__ */ l("span", { children: o }),
|
|
1268
1350
|
s && !r && /* @__PURE__ */ y("span", { children: [
|
|
1269
|
-
Math.round(
|
|
1351
|
+
Math.round(a),
|
|
1270
1352
|
"%"
|
|
1271
1353
|
] })
|
|
1272
1354
|
] }),
|
|
@@ -1277,73 +1359,73 @@ function kc({
|
|
|
1277
1359
|
"aria-valuemin": 0,
|
|
1278
1360
|
"aria-valuemax": t,
|
|
1279
1361
|
"aria-valuenow": r ? void 0 : e,
|
|
1280
|
-
className: g(
|
|
1362
|
+
className: g(ne.bar, r && ne.indeterminate),
|
|
1281
1363
|
children: /* @__PURE__ */ l(
|
|
1282
1364
|
"div",
|
|
1283
1365
|
{
|
|
1284
|
-
className: g(
|
|
1285
|
-
style: { width: r ? void 0 : `${
|
|
1366
|
+
className: g(ne.fill, n !== "primary" && ne[n]),
|
|
1367
|
+
style: { width: r ? void 0 : `${a}%` }
|
|
1286
1368
|
}
|
|
1287
1369
|
)
|
|
1288
1370
|
}
|
|
1289
1371
|
)
|
|
1290
1372
|
] });
|
|
1291
1373
|
}
|
|
1292
|
-
const
|
|
1293
|
-
wrapper:
|
|
1294
|
-
disabled:
|
|
1295
|
-
input:
|
|
1296
|
-
dot:
|
|
1297
|
-
labelWrap:
|
|
1298
|
-
label:
|
|
1299
|
-
description:
|
|
1300
|
-
group:
|
|
1301
|
-
horizontal:
|
|
1302
|
-
},
|
|
1374
|
+
const Jo = "tempest_wrapper_P-gFm", Ho = "tempest_disabled_0-cna", Ko = "tempest_input_7R8ZN", Vo = "tempest_dot_P7ejP", Qo = "tempest_labelWrap_iQ1HR", Xo = "tempest_label_vAFIP", Zo = "tempest_description_bEB8u", Yo = "tempest_group_oi329", ei = "tempest_horizontal_1Ovgu", Q = {
|
|
1375
|
+
wrapper: Jo,
|
|
1376
|
+
disabled: Ho,
|
|
1377
|
+
input: Ko,
|
|
1378
|
+
dot: Vo,
|
|
1379
|
+
labelWrap: Qo,
|
|
1380
|
+
label: Xo,
|
|
1381
|
+
description: Zo,
|
|
1382
|
+
group: Yo,
|
|
1383
|
+
horizontal: ei
|
|
1384
|
+
}, Ke = oe(null), tl = j(function({
|
|
1303
1385
|
label: t,
|
|
1304
1386
|
description: n,
|
|
1305
1387
|
value: r,
|
|
1306
1388
|
disabled: s,
|
|
1307
1389
|
name: o,
|
|
1308
1390
|
checked: i,
|
|
1309
|
-
onChange:
|
|
1310
|
-
wrapperClassName:
|
|
1391
|
+
onChange: a,
|
|
1392
|
+
wrapperClassName: c,
|
|
1311
1393
|
className: u,
|
|
1312
1394
|
...d
|
|
1313
1395
|
}, p) {
|
|
1314
|
-
const f = se(
|
|
1396
|
+
const f = se(Ke), m = f?.name ?? o, _ = f?.disabled ?? s, h = f ? f.value === r : i;
|
|
1315
1397
|
function w(b) {
|
|
1316
|
-
f && f.onChange?.(r),
|
|
1398
|
+
f && f.onChange?.(r), a?.(b);
|
|
1317
1399
|
}
|
|
1318
1400
|
return /* @__PURE__ */ y(
|
|
1319
1401
|
"label",
|
|
1320
1402
|
{
|
|
1321
|
-
className: g(
|
|
1403
|
+
className: g(Q.wrapper, _ && Q.disabled, c),
|
|
1322
1404
|
children: [
|
|
1323
1405
|
/* @__PURE__ */ l(
|
|
1324
1406
|
"input",
|
|
1325
1407
|
{
|
|
1326
1408
|
ref: p,
|
|
1327
1409
|
type: "radio",
|
|
1328
|
-
name:
|
|
1410
|
+
name: m,
|
|
1329
1411
|
value: r,
|
|
1330
|
-
checked:
|
|
1412
|
+
checked: h,
|
|
1331
1413
|
disabled: _,
|
|
1332
1414
|
onChange: w,
|
|
1333
|
-
className: g(
|
|
1415
|
+
className: g(Q.input, u),
|
|
1334
1416
|
...d
|
|
1335
1417
|
}
|
|
1336
1418
|
),
|
|
1337
|
-
/* @__PURE__ */ l("span", { className:
|
|
1338
|
-
(t || n) && /* @__PURE__ */ y("span", { className:
|
|
1339
|
-
t && /* @__PURE__ */ l("span", { className:
|
|
1340
|
-
n && /* @__PURE__ */ l("span", { className:
|
|
1419
|
+
/* @__PURE__ */ l("span", { className: Q.dot, "aria-hidden": !0 }),
|
|
1420
|
+
(t || n) && /* @__PURE__ */ y("span", { className: Q.labelWrap, children: [
|
|
1421
|
+
t && /* @__PURE__ */ l("span", { className: Q.label, children: t }),
|
|
1422
|
+
n && /* @__PURE__ */ l("span", { className: Q.description, children: n })
|
|
1341
1423
|
] })
|
|
1342
1424
|
]
|
|
1343
1425
|
}
|
|
1344
1426
|
);
|
|
1345
1427
|
});
|
|
1346
|
-
function
|
|
1428
|
+
function nl({
|
|
1347
1429
|
value: e,
|
|
1348
1430
|
defaultValue: t,
|
|
1349
1431
|
onChange: n,
|
|
@@ -1351,69 +1433,80 @@ function Sc({
|
|
|
1351
1433
|
disabled: s,
|
|
1352
1434
|
horizontal: o = !1,
|
|
1353
1435
|
className: i,
|
|
1354
|
-
children:
|
|
1436
|
+
children: a
|
|
1355
1437
|
}) {
|
|
1356
|
-
const
|
|
1357
|
-
function _(
|
|
1358
|
-
f || p(
|
|
1438
|
+
const c = ue(), u = r ?? c, [d, p] = v(t), f = e !== void 0, m = f ? e : d;
|
|
1439
|
+
function _(h) {
|
|
1440
|
+
f || p(h), n?.(h);
|
|
1359
1441
|
}
|
|
1360
1442
|
return /* @__PURE__ */ l(
|
|
1361
|
-
|
|
1443
|
+
Ke.Provider,
|
|
1362
1444
|
{
|
|
1363
|
-
value: { name: u, value:
|
|
1445
|
+
value: { name: u, value: m, onChange: _, disabled: s },
|
|
1364
1446
|
children: /* @__PURE__ */ l(
|
|
1365
1447
|
"div",
|
|
1366
1448
|
{
|
|
1367
1449
|
role: "radiogroup",
|
|
1368
|
-
className: g(
|
|
1369
|
-
children:
|
|
1450
|
+
className: g(Q.group, o && Q.horizontal, i),
|
|
1451
|
+
children: a
|
|
1370
1452
|
}
|
|
1371
1453
|
)
|
|
1372
1454
|
}
|
|
1373
1455
|
);
|
|
1374
1456
|
}
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1457
|
+
function Ve(e, t, n, r, s) {
|
|
1458
|
+
return r ? (Array.isArray(r) ? r : [r]).includes(e) : !(t && !s.above(t) || n && !s.below(n));
|
|
1459
|
+
}
|
|
1460
|
+
function rl({ above: e, below: t, only: n, children: r }) {
|
|
1461
|
+
const s = de();
|
|
1462
|
+
return Ve(s.current, e, t, n, s) ? r : null;
|
|
1463
|
+
}
|
|
1464
|
+
function sl({ above: e, below: t, only: n, children: r }) {
|
|
1465
|
+
const s = de();
|
|
1466
|
+
return Ve(s.current, e, t, n, s) ? null : r;
|
|
1467
|
+
}
|
|
1468
|
+
const ti = "tempest_wrapper_dKXJJ", ni = "tempest_input_m0lPc", ri = "tempest_iconLeft_030-U", si = "tempest_clear_nb6lG", fe = {
|
|
1469
|
+
wrapper: ti,
|
|
1470
|
+
input: ni,
|
|
1471
|
+
iconLeft: ri,
|
|
1472
|
+
clear: si
|
|
1473
|
+
}, ol = j(function({ value: t, onChange: n, onClear: r, wrapperClassName: s, placeholder: o = "Buscar...", className: i, ...a }, c) {
|
|
1381
1474
|
function u() {
|
|
1382
1475
|
n(""), r?.();
|
|
1383
1476
|
}
|
|
1384
|
-
return /* @__PURE__ */ y("div", { className: g(
|
|
1385
|
-
/* @__PURE__ */ l("span", { className:
|
|
1477
|
+
return /* @__PURE__ */ y("div", { className: g(fe.wrapper, s), children: [
|
|
1478
|
+
/* @__PURE__ */ l("span", { className: fe.iconLeft, "aria-hidden": !0, children: /* @__PURE__ */ l(oi, {}) }),
|
|
1386
1479
|
/* @__PURE__ */ l(
|
|
1387
1480
|
"input",
|
|
1388
1481
|
{
|
|
1389
|
-
ref:
|
|
1482
|
+
ref: c,
|
|
1390
1483
|
type: "search",
|
|
1391
1484
|
value: t,
|
|
1392
1485
|
onChange: (d) => n(d.target.value),
|
|
1393
1486
|
placeholder: o,
|
|
1394
|
-
className: g(
|
|
1395
|
-
...
|
|
1487
|
+
className: g(fe.input, i),
|
|
1488
|
+
...a
|
|
1396
1489
|
}
|
|
1397
1490
|
),
|
|
1398
1491
|
t && /* @__PURE__ */ l(
|
|
1399
1492
|
"button",
|
|
1400
1493
|
{
|
|
1401
1494
|
type: "button",
|
|
1402
|
-
className:
|
|
1495
|
+
className: fe.clear,
|
|
1403
1496
|
"aria-label": "Limpar busca",
|
|
1404
1497
|
onClick: u,
|
|
1405
|
-
children: /* @__PURE__ */ l(
|
|
1498
|
+
children: /* @__PURE__ */ l(ii, {})
|
|
1406
1499
|
}
|
|
1407
1500
|
)
|
|
1408
1501
|
] });
|
|
1409
1502
|
});
|
|
1410
|
-
function
|
|
1503
|
+
function oi() {
|
|
1411
1504
|
return /* @__PURE__ */ y("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", children: [
|
|
1412
1505
|
/* @__PURE__ */ l("circle", { cx: "11", cy: "11", r: "7", stroke: "currentColor", strokeWidth: "2" }),
|
|
1413
1506
|
/* @__PURE__ */ l("path", { d: "M20 20l-3.5-3.5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
|
|
1414
1507
|
] });
|
|
1415
1508
|
}
|
|
1416
|
-
function
|
|
1509
|
+
function ii() {
|
|
1417
1510
|
return /* @__PURE__ */ l("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ l(
|
|
1418
1511
|
"path",
|
|
1419
1512
|
{
|
|
@@ -1424,36 +1517,36 @@ function jo() {
|
|
|
1424
1517
|
}
|
|
1425
1518
|
) });
|
|
1426
1519
|
}
|
|
1427
|
-
const
|
|
1428
|
-
wrapper:
|
|
1429
|
-
label:
|
|
1430
|
-
required:
|
|
1431
|
-
field:
|
|
1432
|
-
select:
|
|
1433
|
-
caret:
|
|
1434
|
-
error:
|
|
1435
|
-
helper:
|
|
1436
|
-
errorText:
|
|
1437
|
-
},
|
|
1520
|
+
const ai = "tempest_wrapper_KS2K3", ci = "tempest_label_Lmgos", li = "tempest_required_PvDVJ", ui = "tempest_field_h-wBy", di = "tempest_select_cjdcr", pi = "tempest_caret_MdCao", fi = "tempest_error_sw9MU", mi = "tempest_helper_frosK", hi = "tempest_errorText_-zd6i", K = {
|
|
1521
|
+
wrapper: ai,
|
|
1522
|
+
label: ci,
|
|
1523
|
+
required: li,
|
|
1524
|
+
field: ui,
|
|
1525
|
+
select: di,
|
|
1526
|
+
caret: pi,
|
|
1527
|
+
error: fi,
|
|
1528
|
+
helper: mi,
|
|
1529
|
+
errorText: hi
|
|
1530
|
+
}, il = j(function({
|
|
1438
1531
|
label: t,
|
|
1439
1532
|
helperText: n,
|
|
1440
1533
|
error: r,
|
|
1441
1534
|
options: s,
|
|
1442
1535
|
placeholder: o,
|
|
1443
1536
|
wrapperClassName: i,
|
|
1444
|
-
className:
|
|
1445
|
-
children:
|
|
1537
|
+
className: a,
|
|
1538
|
+
children: c,
|
|
1446
1539
|
id: u,
|
|
1447
1540
|
required: d,
|
|
1448
1541
|
...p
|
|
1449
1542
|
}, f) {
|
|
1450
|
-
const
|
|
1451
|
-
return /* @__PURE__ */ y("div", { className: g(
|
|
1452
|
-
t && /* @__PURE__ */ y("label", { htmlFor: _, className:
|
|
1543
|
+
const m = ue(), _ = u ?? m;
|
|
1544
|
+
return /* @__PURE__ */ y("div", { className: g(K.wrapper, r && K.error, i), children: [
|
|
1545
|
+
t && /* @__PURE__ */ y("label", { htmlFor: _, className: K.label, children: [
|
|
1453
1546
|
t,
|
|
1454
|
-
d && /* @__PURE__ */ l("span", { className:
|
|
1547
|
+
d && /* @__PURE__ */ l("span", { className: K.required, children: "*" })
|
|
1455
1548
|
] }),
|
|
1456
|
-
/* @__PURE__ */ y("div", { className:
|
|
1549
|
+
/* @__PURE__ */ y("div", { className: K.field, children: [
|
|
1457
1550
|
/* @__PURE__ */ y(
|
|
1458
1551
|
"select",
|
|
1459
1552
|
{
|
|
@@ -1461,21 +1554,21 @@ const Uo = "tempest_wrapper_KS2K3", qo = "tempest_label_Lmgos", Jo = "tempest_re
|
|
|
1461
1554
|
id: _,
|
|
1462
1555
|
"aria-invalid": !!r,
|
|
1463
1556
|
required: d,
|
|
1464
|
-
className: g(
|
|
1557
|
+
className: g(K.select, a),
|
|
1465
1558
|
...p,
|
|
1466
1559
|
children: [
|
|
1467
1560
|
o && /* @__PURE__ */ l("option", { value: "", disabled: !0, hidden: !0, children: o }),
|
|
1468
|
-
s?.map((
|
|
1469
|
-
|
|
1561
|
+
s?.map((h) => /* @__PURE__ */ l("option", { value: h.value, disabled: h.disabled, children: h.label }, h.value)),
|
|
1562
|
+
c
|
|
1470
1563
|
]
|
|
1471
1564
|
}
|
|
1472
1565
|
),
|
|
1473
|
-
/* @__PURE__ */ l("span", { className:
|
|
1566
|
+
/* @__PURE__ */ l("span", { className: K.caret, "aria-hidden": !0, children: /* @__PURE__ */ l(_i, {}) })
|
|
1474
1567
|
] }),
|
|
1475
|
-
r ? /* @__PURE__ */ l("span", { className:
|
|
1568
|
+
r ? /* @__PURE__ */ l("span", { className: K.errorText, children: r }) : n ? /* @__PURE__ */ l("span", { className: K.helper, children: n }) : null
|
|
1476
1569
|
] });
|
|
1477
1570
|
});
|
|
1478
|
-
function
|
|
1571
|
+
function _i() {
|
|
1479
1572
|
return /* @__PURE__ */ l("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ l(
|
|
1480
1573
|
"path",
|
|
1481
1574
|
{
|
|
@@ -1487,82 +1580,82 @@ function Yo() {
|
|
|
1487
1580
|
}
|
|
1488
1581
|
) });
|
|
1489
1582
|
}
|
|
1490
|
-
const
|
|
1491
|
-
skeleton:
|
|
1492
|
-
text:
|
|
1493
|
-
circle:
|
|
1583
|
+
const gi = "tempest_skeleton_CB4uF", yi = "tempest_text_-A8IF", bi = "tempest_circle_DYcl8", ve = {
|
|
1584
|
+
skeleton: gi,
|
|
1585
|
+
text: yi,
|
|
1586
|
+
circle: bi
|
|
1494
1587
|
};
|
|
1495
|
-
function
|
|
1588
|
+
function al({ variant: e = "rect", width: t, height: n, className: r, style: s }) {
|
|
1496
1589
|
return /* @__PURE__ */ l(
|
|
1497
1590
|
"span",
|
|
1498
1591
|
{
|
|
1499
1592
|
"aria-hidden": !0,
|
|
1500
1593
|
className: g(
|
|
1501
|
-
|
|
1502
|
-
e === "text" &&
|
|
1503
|
-
e === "circle" &&
|
|
1594
|
+
ve.skeleton,
|
|
1595
|
+
e === "text" && ve.text,
|
|
1596
|
+
e === "circle" && ve.circle,
|
|
1504
1597
|
r
|
|
1505
1598
|
),
|
|
1506
1599
|
style: { width: t, height: n, ...s }
|
|
1507
1600
|
}
|
|
1508
1601
|
);
|
|
1509
1602
|
}
|
|
1510
|
-
const
|
|
1511
|
-
spinner:
|
|
1512
|
-
tempestSpinner:
|
|
1513
|
-
xs:
|
|
1514
|
-
sm:
|
|
1515
|
-
md:
|
|
1516
|
-
lg:
|
|
1517
|
-
xl:
|
|
1603
|
+
const wi = "tempest_spinner_GpFZS", vi = "tempest_tempest-spinner_wKVCY", $i = "tempest_xs_p8BFI", ki = "tempest_sm_3sIoD", Ni = "tempest_md_M2sPj", xi = "tempest_lg_IxTw2", Ti = "tempest_xl_cgwqq", Re = {
|
|
1604
|
+
spinner: wi,
|
|
1605
|
+
tempestSpinner: vi,
|
|
1606
|
+
xs: $i,
|
|
1607
|
+
sm: ki,
|
|
1608
|
+
md: Ni,
|
|
1609
|
+
lg: xi,
|
|
1610
|
+
xl: Ti
|
|
1518
1611
|
};
|
|
1519
|
-
function
|
|
1612
|
+
function cl({ size: e = "md", className: t, label: n = "Carregando" }) {
|
|
1520
1613
|
return /* @__PURE__ */ l(
|
|
1521
1614
|
"span",
|
|
1522
1615
|
{
|
|
1523
1616
|
role: "status",
|
|
1524
1617
|
"aria-label": n,
|
|
1525
|
-
className: g(
|
|
1618
|
+
className: g(Re.spinner, Re[e], t)
|
|
1526
1619
|
}
|
|
1527
1620
|
);
|
|
1528
1621
|
}
|
|
1529
|
-
const
|
|
1530
|
-
stepper:
|
|
1531
|
-
vertical:
|
|
1532
|
-
step:
|
|
1533
|
-
dot:
|
|
1534
|
-
completed:
|
|
1535
|
-
active:
|
|
1536
|
-
label:
|
|
1537
|
-
connector:
|
|
1622
|
+
const Si = "tempest_stepper_w3qjQ", Ei = "tempest_vertical_d4mOs", Ci = "tempest_step_s2nqL", Li = "tempest_dot_d1bSL", Ii = "tempest_completed_gcFHM", Di = "tempest_active_kL-CH", Mi = "tempest_label_8irAI", Ri = "tempest_connector_lyeWp", V = {
|
|
1623
|
+
stepper: Si,
|
|
1624
|
+
vertical: Ei,
|
|
1625
|
+
step: Ci,
|
|
1626
|
+
dot: Li,
|
|
1627
|
+
completed: Ii,
|
|
1628
|
+
active: Di,
|
|
1629
|
+
label: Mi,
|
|
1630
|
+
connector: Ri
|
|
1538
1631
|
};
|
|
1539
|
-
function
|
|
1632
|
+
function ll({ steps: e, current: t, orientation: n = "horizontal", className: r }) {
|
|
1540
1633
|
return /* @__PURE__ */ l(
|
|
1541
1634
|
"ol",
|
|
1542
1635
|
{
|
|
1543
|
-
className: g(
|
|
1636
|
+
className: g(V.stepper, n === "vertical" && V.vertical, r),
|
|
1544
1637
|
children: e.map((s, o) => {
|
|
1545
|
-
const i = o < t,
|
|
1546
|
-
return /* @__PURE__ */ y(
|
|
1638
|
+
const i = o < t, a = o === t;
|
|
1639
|
+
return /* @__PURE__ */ y(Ue, { children: [
|
|
1547
1640
|
/* @__PURE__ */ y(
|
|
1548
1641
|
"li",
|
|
1549
1642
|
{
|
|
1550
1643
|
className: g(
|
|
1551
|
-
|
|
1552
|
-
i &&
|
|
1553
|
-
|
|
1644
|
+
V.step,
|
|
1645
|
+
i && V.completed,
|
|
1646
|
+
a && V.active
|
|
1554
1647
|
),
|
|
1555
|
-
"aria-current":
|
|
1648
|
+
"aria-current": a ? "step" : void 0,
|
|
1556
1649
|
children: [
|
|
1557
|
-
/* @__PURE__ */ l("span", { className:
|
|
1558
|
-
/* @__PURE__ */ l("span", { className:
|
|
1650
|
+
/* @__PURE__ */ l("span", { className: V.dot, children: i ? "✓" : o + 1 }),
|
|
1651
|
+
/* @__PURE__ */ l("span", { className: V.label, children: s.label })
|
|
1559
1652
|
]
|
|
1560
1653
|
}
|
|
1561
1654
|
),
|
|
1562
1655
|
o < e.length - 1 && /* @__PURE__ */ l(
|
|
1563
1656
|
"span",
|
|
1564
1657
|
{
|
|
1565
|
-
className: g(
|
|
1658
|
+
className: g(V.connector, i && V.completed),
|
|
1566
1659
|
"aria-hidden": !0
|
|
1567
1660
|
}
|
|
1568
1661
|
)
|
|
@@ -1571,15 +1664,15 @@ function Ic({ steps: e, current: t, orientation: n = "horizontal", className: r
|
|
|
1571
1664
|
}
|
|
1572
1665
|
);
|
|
1573
1666
|
}
|
|
1574
|
-
const
|
|
1575
|
-
wrapper:
|
|
1576
|
-
disabled:
|
|
1577
|
-
input:
|
|
1578
|
-
track:
|
|
1579
|
-
thumb:
|
|
1580
|
-
label:
|
|
1581
|
-
},
|
|
1582
|
-
return /* @__PURE__ */ y("label", { className: g(
|
|
1667
|
+
const Pi = "tempest_wrapper_kudO9", Ai = "tempest_disabled_2aZ0V", Bi = "tempest_input_5BPNu", Fi = "tempest_track_7ObdZ", Oi = "tempest_thumb_-FTeK", Wi = "tempest_label_LrH7V", re = {
|
|
1668
|
+
wrapper: Pi,
|
|
1669
|
+
disabled: Ai,
|
|
1670
|
+
input: Bi,
|
|
1671
|
+
track: Fi,
|
|
1672
|
+
thumb: Oi,
|
|
1673
|
+
label: Wi
|
|
1674
|
+
}, ul = j(function({ label: t, disabled: n, wrapperClassName: r, className: s, ...o }, i) {
|
|
1675
|
+
return /* @__PURE__ */ y("label", { className: g(re.wrapper, n && re.disabled, r), children: [
|
|
1583
1676
|
/* @__PURE__ */ l(
|
|
1584
1677
|
"input",
|
|
1585
1678
|
{
|
|
@@ -1587,80 +1680,97 @@ const gi = "tempest_wrapper_kudO9", yi = "tempest_disabled_2aZ0V", bi = "tempest
|
|
|
1587
1680
|
type: "checkbox",
|
|
1588
1681
|
role: "switch",
|
|
1589
1682
|
disabled: n,
|
|
1590
|
-
className: g(
|
|
1683
|
+
className: g(re.input, s),
|
|
1591
1684
|
...o
|
|
1592
1685
|
}
|
|
1593
1686
|
),
|
|
1594
|
-
/* @__PURE__ */ l("span", { className:
|
|
1595
|
-
t && /* @__PURE__ */ l("span", { className:
|
|
1687
|
+
/* @__PURE__ */ l("span", { className: re.track, "aria-hidden": !0, children: /* @__PURE__ */ l("span", { className: re.thumb }) }),
|
|
1688
|
+
t && /* @__PURE__ */ l("span", { className: re.label, children: t })
|
|
1596
1689
|
] });
|
|
1597
|
-
}),
|
|
1598
|
-
scroll:
|
|
1599
|
-
table:
|
|
1600
|
-
th:
|
|
1601
|
-
td:
|
|
1602
|
-
tr:
|
|
1603
|
-
clickable:
|
|
1604
|
-
alignRight:
|
|
1605
|
-
alignCenter:
|
|
1606
|
-
emptyRow:
|
|
1690
|
+
}), zi = "tempest_scroll_unrJp", ji = "tempest_table_Dkosn", Ui = "tempest_th_PNuEx", qi = "tempest_td_jv9tA", Gi = "tempest_tr_7UG8J", Ji = "tempest_clickable_B6Si-", Hi = "tempest_alignRight_9hY0G", Ki = "tempest_alignCenter_YiUQy", Vi = "tempest_emptyRow_kdMiv", Qi = "tempest_priorityTablet_3alUt", Xi = "tempest_priorityDesktop_3f8Fq", Zi = "tempest_stackable_heix7", Yi = "tempest_stackableHead_mKGcA", ea = "tempest_stackableRow_qPNqc", E = {
|
|
1691
|
+
scroll: zi,
|
|
1692
|
+
table: ji,
|
|
1693
|
+
th: Ui,
|
|
1694
|
+
td: qi,
|
|
1695
|
+
tr: Gi,
|
|
1696
|
+
clickable: Ji,
|
|
1697
|
+
alignRight: Hi,
|
|
1698
|
+
alignCenter: Ki,
|
|
1699
|
+
emptyRow: Vi,
|
|
1700
|
+
priorityTablet: Qi,
|
|
1701
|
+
priorityDesktop: Xi,
|
|
1702
|
+
stackable: Zi,
|
|
1703
|
+
stackableHead: Yi,
|
|
1704
|
+
stackableRow: ea
|
|
1607
1705
|
};
|
|
1608
|
-
function
|
|
1706
|
+
function Pe(e) {
|
|
1707
|
+
if (e === "tablet") return E.priorityTablet;
|
|
1708
|
+
if (e === "desktop") return E.priorityDesktop;
|
|
1709
|
+
}
|
|
1710
|
+
function dl({
|
|
1609
1711
|
columns: e,
|
|
1610
1712
|
data: t,
|
|
1611
1713
|
rowKey: n,
|
|
1612
1714
|
onRowClick: r,
|
|
1613
1715
|
emptyMessage: s = "Nenhum registro encontrado.",
|
|
1614
|
-
className: o
|
|
1716
|
+
className: o,
|
|
1717
|
+
stackOnMobile: i = !1
|
|
1615
1718
|
}) {
|
|
1616
|
-
return /* @__PURE__ */ l("div", { className: g(
|
|
1617
|
-
/* @__PURE__ */ l("thead", { children: /* @__PURE__ */ l("tr", { children: e.map((
|
|
1719
|
+
return /* @__PURE__ */ l("div", { className: g(E.scroll, i && E.stackable, o), children: /* @__PURE__ */ y("table", { className: E.table, children: [
|
|
1720
|
+
/* @__PURE__ */ l("thead", { className: g(i && E.stackableHead), children: /* @__PURE__ */ l("tr", { children: e.map((a) => /* @__PURE__ */ l(
|
|
1618
1721
|
"th",
|
|
1619
1722
|
{
|
|
1620
1723
|
className: g(
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1724
|
+
E.th,
|
|
1725
|
+
a.align === "right" && E.alignRight,
|
|
1726
|
+
a.align === "center" && E.alignCenter,
|
|
1727
|
+
Pe(a.priority)
|
|
1624
1728
|
),
|
|
1625
|
-
style: { width:
|
|
1626
|
-
children:
|
|
1729
|
+
style: { width: a.width },
|
|
1730
|
+
children: a.header
|
|
1627
1731
|
},
|
|
1628
|
-
|
|
1732
|
+
a.key
|
|
1629
1733
|
)) }) }),
|
|
1630
|
-
/* @__PURE__ */ l("tbody", { children: t.length === 0 ? /* @__PURE__ */ l("tr", { children: /* @__PURE__ */ l("td", { className:
|
|
1734
|
+
/* @__PURE__ */ l("tbody", { children: t.length === 0 ? /* @__PURE__ */ l("tr", { children: /* @__PURE__ */ l("td", { className: E.emptyRow, colSpan: e.length, children: s }) }) : t.map((a, c) => /* @__PURE__ */ l(
|
|
1631
1735
|
"tr",
|
|
1632
1736
|
{
|
|
1633
|
-
className: g(
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1737
|
+
className: g(
|
|
1738
|
+
E.tr,
|
|
1739
|
+
r && E.clickable,
|
|
1740
|
+
i && E.stackableRow
|
|
1741
|
+
),
|
|
1742
|
+
onClick: r ? () => r(a) : void 0,
|
|
1743
|
+
children: e.map((u) => {
|
|
1744
|
+
const d = u.render ? u.render(a, c) : a[u.key];
|
|
1637
1745
|
return /* @__PURE__ */ l(
|
|
1638
1746
|
"td",
|
|
1639
1747
|
{
|
|
1640
1748
|
className: g(
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1749
|
+
E.td,
|
|
1750
|
+
u.align === "right" && E.alignRight,
|
|
1751
|
+
u.align === "center" && E.alignCenter,
|
|
1752
|
+
Pe(u.priority),
|
|
1753
|
+
u.className
|
|
1645
1754
|
),
|
|
1646
|
-
|
|
1755
|
+
"data-label": typeof u.header == "string" ? u.header : void 0,
|
|
1756
|
+
children: d
|
|
1647
1757
|
},
|
|
1648
|
-
|
|
1758
|
+
u.key
|
|
1649
1759
|
);
|
|
1650
1760
|
})
|
|
1651
1761
|
},
|
|
1652
|
-
n(
|
|
1762
|
+
n(a, c)
|
|
1653
1763
|
)) })
|
|
1654
1764
|
] }) });
|
|
1655
1765
|
}
|
|
1656
|
-
const
|
|
1657
|
-
tablist:
|
|
1658
|
-
tab:
|
|
1659
|
-
active:
|
|
1660
|
-
panel:
|
|
1661
|
-
pill:
|
|
1766
|
+
const ta = "tempest_tablist_WR6ag", na = "tempest_tab_IdDYc", ra = "tempest_active_PTNtG", sa = "tempest_panel_08i9c", oa = "tempest_pill_lGuqn", le = {
|
|
1767
|
+
tablist: ta,
|
|
1768
|
+
tab: na,
|
|
1769
|
+
active: ra,
|
|
1770
|
+
panel: sa,
|
|
1771
|
+
pill: oa
|
|
1662
1772
|
};
|
|
1663
|
-
function
|
|
1773
|
+
function pl({
|
|
1664
1774
|
items: e,
|
|
1665
1775
|
defaultId: t,
|
|
1666
1776
|
activeId: n,
|
|
@@ -1668,27 +1778,27 @@ function Pc({
|
|
|
1668
1778
|
variant: s = "underline",
|
|
1669
1779
|
className: o
|
|
1670
1780
|
}) {
|
|
1671
|
-
const i = e.find((
|
|
1672
|
-
function f(
|
|
1673
|
-
u ||
|
|
1781
|
+
const i = e.find((m) => !m.disabled), [a, c] = v(t ?? i?.id), u = n !== void 0, d = u ? n : a, p = e.find((m) => m.id === d) ?? i;
|
|
1782
|
+
function f(m) {
|
|
1783
|
+
u || c(m), r?.(m);
|
|
1674
1784
|
}
|
|
1675
1785
|
return /* @__PURE__ */ y("div", { className: o, children: [
|
|
1676
|
-
/* @__PURE__ */ l("div", { role: "tablist", className: g(le.tablist, s === "pill" && le.pill), children: e.map((
|
|
1677
|
-
const _ =
|
|
1786
|
+
/* @__PURE__ */ l("div", { role: "tablist", className: g(le.tablist, s === "pill" && le.pill), children: e.map((m) => {
|
|
1787
|
+
const _ = m.id === p?.id;
|
|
1678
1788
|
return /* @__PURE__ */ l(
|
|
1679
1789
|
"button",
|
|
1680
1790
|
{
|
|
1681
1791
|
type: "button",
|
|
1682
1792
|
role: "tab",
|
|
1683
1793
|
"aria-selected": _,
|
|
1684
|
-
"aria-controls": `panel-${
|
|
1685
|
-
id: `tab-${
|
|
1686
|
-
disabled:
|
|
1794
|
+
"aria-controls": `panel-${m.id}`,
|
|
1795
|
+
id: `tab-${m.id}`,
|
|
1796
|
+
disabled: m.disabled,
|
|
1687
1797
|
className: g(le.tab, _ && le.active),
|
|
1688
|
-
onClick: () => f(
|
|
1689
|
-
children:
|
|
1798
|
+
onClick: () => f(m.id),
|
|
1799
|
+
children: m.label
|
|
1690
1800
|
},
|
|
1691
|
-
|
|
1801
|
+
m.id
|
|
1692
1802
|
);
|
|
1693
1803
|
}) }),
|
|
1694
1804
|
p && /* @__PURE__ */ l(
|
|
@@ -1703,20 +1813,20 @@ function Pc({
|
|
|
1703
1813
|
)
|
|
1704
1814
|
] });
|
|
1705
1815
|
}
|
|
1706
|
-
const
|
|
1707
|
-
wrapper:
|
|
1708
|
-
label:
|
|
1709
|
-
required:
|
|
1710
|
-
textarea:
|
|
1711
|
-
error:
|
|
1712
|
-
helper:
|
|
1713
|
-
errorText:
|
|
1714
|
-
},
|
|
1816
|
+
const ia = "tempest_wrapper_C0gfg", aa = "tempest_label_cWLXP", ca = "tempest_required_rDZXE", la = "tempest_textarea_Z-y6g", ua = "tempest_error_NWC9f", da = "tempest_helper_gedut", pa = "tempest_errorText_ey07q", ee = {
|
|
1817
|
+
wrapper: ia,
|
|
1818
|
+
label: aa,
|
|
1819
|
+
required: ca,
|
|
1820
|
+
textarea: la,
|
|
1821
|
+
error: ua,
|
|
1822
|
+
helper: da,
|
|
1823
|
+
errorText: pa
|
|
1824
|
+
}, fl = j(function({ label: t, helperText: n, error: r, wrapperClassName: s, className: o, id: i, required: a, ...c }, u) {
|
|
1715
1825
|
const d = ue(), p = i ?? d;
|
|
1716
|
-
return /* @__PURE__ */ y("div", { className: g(
|
|
1717
|
-
t && /* @__PURE__ */ y("label", { htmlFor: p, className:
|
|
1826
|
+
return /* @__PURE__ */ y("div", { className: g(ee.wrapper, r && ee.error, s), children: [
|
|
1827
|
+
t && /* @__PURE__ */ y("label", { htmlFor: p, className: ee.label, children: [
|
|
1718
1828
|
t,
|
|
1719
|
-
|
|
1829
|
+
a && /* @__PURE__ */ l("span", { className: ee.required, children: "*" })
|
|
1720
1830
|
] }),
|
|
1721
1831
|
/* @__PURE__ */ l(
|
|
1722
1832
|
"textarea",
|
|
@@ -1724,134 +1834,168 @@ const Ri = "tempest_wrapper_C0gfg", Oi = "tempest_label_cWLXP", Wi = "tempest_re
|
|
|
1724
1834
|
ref: u,
|
|
1725
1835
|
id: p,
|
|
1726
1836
|
"aria-invalid": !!r,
|
|
1727
|
-
required:
|
|
1728
|
-
className: g(
|
|
1729
|
-
...
|
|
1837
|
+
required: a,
|
|
1838
|
+
className: g(ee.textarea, o),
|
|
1839
|
+
...c
|
|
1730
1840
|
}
|
|
1731
1841
|
),
|
|
1732
|
-
r ? /* @__PURE__ */ l("span", { className:
|
|
1842
|
+
r ? /* @__PURE__ */ l("span", { className: ee.errorText, children: r }) : n ? /* @__PURE__ */ l("span", { className: ee.helper, children: n }) : null
|
|
1733
1843
|
] });
|
|
1734
|
-
}),
|
|
1735
|
-
trigger:
|
|
1736
|
-
bubble:
|
|
1737
|
-
tempestTooltipIn:
|
|
1738
|
-
top:
|
|
1739
|
-
bottom:
|
|
1740
|
-
left:
|
|
1741
|
-
right:
|
|
1844
|
+
}), fa = "tempest_trigger_Dmc5E", ma = "tempest_bubble_TPGHB", ha = "tempest_tempest-tooltip-in_csYeZ", _a = "tempest_top_m2tnn", ga = "tempest_bottom_9Twz4", ya = "tempest_left_UPdrG", ba = "tempest_right_CV--T", $e = {
|
|
1845
|
+
trigger: fa,
|
|
1846
|
+
bubble: ma,
|
|
1847
|
+
tempestTooltipIn: ha,
|
|
1848
|
+
top: _a,
|
|
1849
|
+
bottom: ga,
|
|
1850
|
+
left: ya,
|
|
1851
|
+
right: ba
|
|
1742
1852
|
};
|
|
1743
|
-
function
|
|
1853
|
+
function ml({
|
|
1744
1854
|
content: e,
|
|
1745
1855
|
placement: t = "top",
|
|
1746
1856
|
children: n,
|
|
1747
1857
|
disabled: r = !1,
|
|
1748
1858
|
openDelay: s = 150
|
|
1749
1859
|
}) {
|
|
1750
|
-
const [o, i] = v(!1),
|
|
1751
|
-
let
|
|
1860
|
+
const [o, i] = v(!1), a = ue();
|
|
1861
|
+
let c = null;
|
|
1752
1862
|
function u() {
|
|
1753
|
-
r || (
|
|
1863
|
+
r || (c && clearTimeout(c), c = setTimeout(() => i(!0), s));
|
|
1754
1864
|
}
|
|
1755
1865
|
function d() {
|
|
1756
|
-
|
|
1866
|
+
c && (clearTimeout(c), c = null), i(!1);
|
|
1757
1867
|
}
|
|
1758
|
-
const p =
|
|
1868
|
+
const p = at(n, {
|
|
1759
1869
|
onMouseEnter: u,
|
|
1760
1870
|
onMouseLeave: d,
|
|
1761
1871
|
onFocus: u,
|
|
1762
1872
|
onBlur: d,
|
|
1763
|
-
"aria-describedby": o ?
|
|
1873
|
+
"aria-describedby": o ? a : void 0
|
|
1764
1874
|
});
|
|
1765
|
-
return /* @__PURE__ */ y("span", { className:
|
|
1875
|
+
return /* @__PURE__ */ y("span", { className: $e.trigger, children: [
|
|
1766
1876
|
p,
|
|
1767
1877
|
o && /* @__PURE__ */ l(
|
|
1768
1878
|
"span",
|
|
1769
1879
|
{
|
|
1770
|
-
id:
|
|
1880
|
+
id: a,
|
|
1771
1881
|
role: "tooltip",
|
|
1772
|
-
className: g(
|
|
1882
|
+
className: g($e.bubble, $e[t]),
|
|
1773
1883
|
children: e
|
|
1774
1884
|
}
|
|
1775
1885
|
)
|
|
1776
1886
|
] });
|
|
1777
1887
|
}
|
|
1778
|
-
const
|
|
1779
|
-
container:
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1888
|
+
const wa = "tempest_container_x4-Qm", va = "tempest_positionTopRight_gbUCQ", $a = "tempest_positionTopLeft_Z-tMJ", ka = "tempest_positionTopCenter_A4Ze4", Na = "tempest_positionBottomRight_MGo19", xa = "tempest_positionBottomLeft_DpiNe", Ta = "tempest_positionBottomCenter_XUdok", Sa = "tempest_toast_FLdHz", Ea = "tempest_tempest-toast-in_E2d-A", Ca = "tempest_success_Oy694", La = "tempest_warning_84GC8", Ia = "tempest_error_hrQAA", Da = "tempest_info_eq5bQ", Ma = "tempest_title_-H6R2", Ra = "tempest_description_-QwfC", Pa = "tempest_close_i10-s", O = {
|
|
1889
|
+
container: wa,
|
|
1890
|
+
positionTopRight: va,
|
|
1891
|
+
positionTopLeft: $a,
|
|
1892
|
+
positionTopCenter: ka,
|
|
1893
|
+
positionBottomRight: Na,
|
|
1894
|
+
positionBottomLeft: xa,
|
|
1895
|
+
positionBottomCenter: Ta,
|
|
1896
|
+
toast: Sa,
|
|
1897
|
+
tempestToastIn: Ea,
|
|
1898
|
+
success: Ca,
|
|
1899
|
+
warning: La,
|
|
1900
|
+
error: Ia,
|
|
1901
|
+
info: Da,
|
|
1902
|
+
title: Ma,
|
|
1903
|
+
description: Ra,
|
|
1904
|
+
close: Pa
|
|
1905
|
+
}, Qe = oe(null);
|
|
1906
|
+
function hl() {
|
|
1907
|
+
const e = se(Qe);
|
|
1792
1908
|
if (!e) throw new Error("useToast must be used inside a <ToastProvider>");
|
|
1793
1909
|
return e;
|
|
1794
1910
|
}
|
|
1795
|
-
function
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1911
|
+
function _l({
|
|
1912
|
+
children: e,
|
|
1913
|
+
defaultDuration: t = 4e3,
|
|
1914
|
+
position: n = "top-right"
|
|
1915
|
+
}) {
|
|
1916
|
+
const [r, s] = v([]), o = S(0), i = T((u) => {
|
|
1917
|
+
s((d) => d.filter((p) => p.id !== u));
|
|
1918
|
+
}, []), a = T(
|
|
1919
|
+
(u) => {
|
|
1920
|
+
const d = u.id ?? `toast-${++o.current}`, p = {
|
|
1921
|
+
id: d,
|
|
1922
|
+
title: u.title,
|
|
1923
|
+
description: u.description,
|
|
1924
|
+
variant: u.variant ?? "info",
|
|
1925
|
+
duration: u.duration ?? t
|
|
1806
1926
|
};
|
|
1807
|
-
return
|
|
1927
|
+
return s((f) => [...f, p]), d;
|
|
1808
1928
|
},
|
|
1809
1929
|
[t]
|
|
1810
|
-
), c =
|
|
1930
|
+
), c = q(
|
|
1811
1931
|
() => ({
|
|
1812
|
-
show:
|
|
1813
|
-
dismiss:
|
|
1814
|
-
success: (
|
|
1815
|
-
error: (
|
|
1816
|
-
warning: (
|
|
1817
|
-
info: (
|
|
1932
|
+
show: a,
|
|
1933
|
+
dismiss: i,
|
|
1934
|
+
success: (u, d) => a({ ...d, description: u, variant: "success" }),
|
|
1935
|
+
error: (u, d) => a({ ...d, description: u, variant: "error" }),
|
|
1936
|
+
warning: (u, d) => a({ ...d, description: u, variant: "warning" }),
|
|
1937
|
+
info: (u, d) => a({ ...d, description: u, variant: "info" })
|
|
1818
1938
|
}),
|
|
1819
|
-
[
|
|
1939
|
+
[a, i]
|
|
1820
1940
|
);
|
|
1821
|
-
return /* @__PURE__ */ y(
|
|
1941
|
+
return /* @__PURE__ */ y(Qe.Provider, { value: c, children: [
|
|
1822
1942
|
e,
|
|
1823
|
-
/* @__PURE__ */ l(
|
|
1943
|
+
/* @__PURE__ */ l(Ba, { toasts: r, onDismiss: i, position: n })
|
|
1824
1944
|
] });
|
|
1825
1945
|
}
|
|
1826
|
-
function
|
|
1827
|
-
|
|
1828
|
-
|
|
1946
|
+
function Aa(e) {
|
|
1947
|
+
switch (e) {
|
|
1948
|
+
case "top-left":
|
|
1949
|
+
return O.positionTopLeft;
|
|
1950
|
+
case "top-center":
|
|
1951
|
+
return O.positionTopCenter;
|
|
1952
|
+
case "bottom-right":
|
|
1953
|
+
return O.positionBottomRight;
|
|
1954
|
+
case "bottom-left":
|
|
1955
|
+
return O.positionBottomLeft;
|
|
1956
|
+
case "bottom-center":
|
|
1957
|
+
return O.positionBottomCenter;
|
|
1958
|
+
default:
|
|
1959
|
+
return O.positionTopRight;
|
|
1960
|
+
}
|
|
1961
|
+
}
|
|
1962
|
+
function Ba({ toasts: e, onDismiss: t, position: n }) {
|
|
1963
|
+
return typeof document > "u" ? null : Le(
|
|
1964
|
+
/* @__PURE__ */ l(
|
|
1965
|
+
"div",
|
|
1966
|
+
{
|
|
1967
|
+
className: g(O.container, Aa(n)),
|
|
1968
|
+
"aria-live": "polite",
|
|
1969
|
+
"aria-atomic": "true",
|
|
1970
|
+
children: e.map((r) => /* @__PURE__ */ l(Fa, { toast: r, onDismiss: t }, r.id))
|
|
1971
|
+
}
|
|
1972
|
+
),
|
|
1829
1973
|
document.body
|
|
1830
1974
|
);
|
|
1831
1975
|
}
|
|
1832
|
-
function
|
|
1976
|
+
function Fa({ toast: e, onDismiss: t }) {
|
|
1833
1977
|
return k(() => {
|
|
1834
1978
|
if (!e.duration) return;
|
|
1835
1979
|
const n = setTimeout(() => t(e.id), e.duration);
|
|
1836
1980
|
return () => clearTimeout(n);
|
|
1837
|
-
}, [e.id, e.duration, t]), /* @__PURE__ */ y("div", { className: g(
|
|
1981
|
+
}, [e.id, e.duration, t]), /* @__PURE__ */ y("div", { className: g(O.toast, O[e.variant]), role: "status", children: [
|
|
1838
1982
|
/* @__PURE__ */ y("div", { children: [
|
|
1839
|
-
e.title && /* @__PURE__ */ l("p", { className:
|
|
1840
|
-
e.description && /* @__PURE__ */ l("p", { className:
|
|
1983
|
+
e.title && /* @__PURE__ */ l("p", { className: O.title, children: e.title }),
|
|
1984
|
+
e.description && /* @__PURE__ */ l("p", { className: O.description, children: e.description })
|
|
1841
1985
|
] }),
|
|
1842
1986
|
/* @__PURE__ */ l(
|
|
1843
1987
|
"button",
|
|
1844
1988
|
{
|
|
1845
1989
|
type: "button",
|
|
1846
|
-
className:
|
|
1990
|
+
className: O.close,
|
|
1847
1991
|
"aria-label": "Fechar notificação",
|
|
1848
1992
|
onClick: () => t(e.id),
|
|
1849
|
-
children: /* @__PURE__ */ l(
|
|
1993
|
+
children: /* @__PURE__ */ l(Oa, {})
|
|
1850
1994
|
}
|
|
1851
1995
|
)
|
|
1852
1996
|
] });
|
|
1853
1997
|
}
|
|
1854
|
-
function
|
|
1998
|
+
function Oa() {
|
|
1855
1999
|
return /* @__PURE__ */ l("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ l(
|
|
1856
2000
|
"path",
|
|
1857
2001
|
{
|
|
@@ -1862,12 +2006,12 @@ function la() {
|
|
|
1862
2006
|
}
|
|
1863
2007
|
) });
|
|
1864
2008
|
}
|
|
1865
|
-
const
|
|
1866
|
-
scroll:
|
|
1867
|
-
spacer:
|
|
1868
|
-
row:
|
|
2009
|
+
const Wa = "tempest_scroll_8Giwl", za = "tempest_spacer_P3Pvl", ja = "tempest_row_Ff0VU", ke = {
|
|
2010
|
+
scroll: Wa,
|
|
2011
|
+
spacer: za,
|
|
2012
|
+
row: ja
|
|
1869
2013
|
};
|
|
1870
|
-
function
|
|
2014
|
+
function gl({
|
|
1871
2015
|
items: e,
|
|
1872
2016
|
itemHeight: t,
|
|
1873
2017
|
renderItem: n,
|
|
@@ -1875,53 +2019,53 @@ function Wc({
|
|
|
1875
2019
|
overscan: s = 4,
|
|
1876
2020
|
getKey: o,
|
|
1877
2021
|
className: i,
|
|
1878
|
-
style:
|
|
2022
|
+
style: a
|
|
1879
2023
|
}) {
|
|
1880
|
-
const
|
|
2024
|
+
const c = S(null), [u, d] = v(0), [p, f] = v(0);
|
|
1881
2025
|
k(() => {
|
|
1882
|
-
const b =
|
|
2026
|
+
const b = c.current;
|
|
1883
2027
|
if (!b || (f(b.clientHeight), typeof ResizeObserver > "u")) return;
|
|
1884
2028
|
const $ = new ResizeObserver(() => f(b.clientHeight));
|
|
1885
2029
|
return $.observe(b), () => $.disconnect();
|
|
1886
2030
|
}, []);
|
|
1887
|
-
const
|
|
2031
|
+
const m = e.length * t, _ = Math.max(0, Math.floor(u / t) - s), h = Math.ceil(p / t) + s * 2, w = Math.min(e.length, _ + h);
|
|
1888
2032
|
return /* @__PURE__ */ l(
|
|
1889
2033
|
"div",
|
|
1890
2034
|
{
|
|
1891
|
-
ref:
|
|
1892
|
-
className: g(
|
|
1893
|
-
style: { height: r, ...
|
|
2035
|
+
ref: c,
|
|
2036
|
+
className: g(ke.scroll, i),
|
|
2037
|
+
style: { height: r, ...a },
|
|
1894
2038
|
onScroll: (b) => d(b.target.scrollTop),
|
|
1895
2039
|
role: "list",
|
|
1896
|
-
children: /* @__PURE__ */ l("div", { className:
|
|
1897
|
-
const N = _ + $,
|
|
2040
|
+
children: /* @__PURE__ */ l("div", { className: ke.spacer, style: { height: m }, children: e.slice(_, w).map((b, $) => {
|
|
2041
|
+
const N = _ + $, I = o ? o(b, N) : N;
|
|
1898
2042
|
return /* @__PURE__ */ l(
|
|
1899
2043
|
"div",
|
|
1900
2044
|
{
|
|
1901
2045
|
role: "listitem",
|
|
1902
|
-
className:
|
|
2046
|
+
className: ke.row,
|
|
1903
2047
|
style: { top: N * t, height: t },
|
|
1904
2048
|
children: n(b, N)
|
|
1905
2049
|
},
|
|
1906
|
-
|
|
2050
|
+
I
|
|
1907
2051
|
);
|
|
1908
2052
|
}) })
|
|
1909
2053
|
}
|
|
1910
2054
|
);
|
|
1911
2055
|
}
|
|
1912
|
-
function
|
|
2056
|
+
function yl(e, t = 300) {
|
|
1913
2057
|
const [n, r] = v(e);
|
|
1914
2058
|
return k(() => {
|
|
1915
2059
|
const s = setTimeout(() => r(e), t);
|
|
1916
2060
|
return () => clearTimeout(s);
|
|
1917
2061
|
}, [e, t]), n;
|
|
1918
2062
|
}
|
|
1919
|
-
function
|
|
1920
|
-
const [n, r] = v(e), [s, o] = v(t), i =
|
|
2063
|
+
function bl(e = 1, t = 50) {
|
|
2064
|
+
const [n, r] = v(e), [s, o] = v(t), i = T(() => r(1), []);
|
|
1921
2065
|
return { page: n, size: s, setPage: r, setSize: o, reset: i };
|
|
1922
2066
|
}
|
|
1923
|
-
function
|
|
1924
|
-
return
|
|
2067
|
+
function wl(e, t, n) {
|
|
2068
|
+
return q(() => {
|
|
1925
2069
|
const r = t.trim().toLowerCase();
|
|
1926
2070
|
return r ? typeof n == "function" ? e.filter((s) => n(s, r)) : e.filter(
|
|
1927
2071
|
(s) => n.some((o) => {
|
|
@@ -1931,7 +2075,7 @@ function jc(e, t, n) {
|
|
|
1931
2075
|
) : e;
|
|
1932
2076
|
}, [e, t, n]);
|
|
1933
2077
|
}
|
|
1934
|
-
function
|
|
2078
|
+
function vl(e) {
|
|
1935
2079
|
const [t, n] = v(() => typeof window > "u" ? !1 : window.matchMedia(e).matches);
|
|
1936
2080
|
return k(() => {
|
|
1937
2081
|
if (typeof window > "u") return;
|
|
@@ -1939,7 +2083,7 @@ function Uc(e) {
|
|
|
1939
2083
|
return n(r.matches), r.addEventListener("change", s), () => r.removeEventListener("change", s);
|
|
1940
2084
|
}, [e]), t;
|
|
1941
2085
|
}
|
|
1942
|
-
function
|
|
2086
|
+
function $l() {
|
|
1943
2087
|
const [e, t] = v(
|
|
1944
2088
|
() => typeof navigator > "u" ? !0 : navigator.onLine
|
|
1945
2089
|
);
|
|
@@ -1951,7 +2095,7 @@ function qc() {
|
|
|
1951
2095
|
};
|
|
1952
2096
|
}, []), e;
|
|
1953
2097
|
}
|
|
1954
|
-
function
|
|
2098
|
+
function kl() {
|
|
1955
2099
|
const [e, t] = v(
|
|
1956
2100
|
() => typeof document > "u" ? "visible" : document.visibilityState
|
|
1957
2101
|
);
|
|
@@ -1961,21 +2105,21 @@ function Jc() {
|
|
|
1961
2105
|
return document.addEventListener("visibilitychange", n), () => document.removeEventListener("visibilitychange", n);
|
|
1962
2106
|
}, []), e;
|
|
1963
2107
|
}
|
|
1964
|
-
function
|
|
1965
|
-
const [n, r] = v(null), { once: s = !1, root: o, rootMargin: i, threshold:
|
|
2108
|
+
function Nl(e, t = {}) {
|
|
2109
|
+
const [n, r] = v(null), { once: s = !1, root: o, rootMargin: i, threshold: a } = t;
|
|
1966
2110
|
return k(() => {
|
|
1967
|
-
const
|
|
1968
|
-
if (!
|
|
2111
|
+
const c = e.current;
|
|
2112
|
+
if (!c || typeof IntersectionObserver > "u") return;
|
|
1969
2113
|
const u = new IntersectionObserver(
|
|
1970
2114
|
([d]) => {
|
|
1971
|
-
d && (r(d), s && d.isIntersecting && u.unobserve(
|
|
2115
|
+
d && (r(d), s && d.isIntersecting && u.unobserve(c));
|
|
1972
2116
|
},
|
|
1973
|
-
{ root: o, rootMargin: i, threshold:
|
|
2117
|
+
{ root: o, rootMargin: i, threshold: a }
|
|
1974
2118
|
);
|
|
1975
|
-
return u.observe(
|
|
1976
|
-
}, [e, s, o, i,
|
|
2119
|
+
return u.observe(c), () => u.disconnect();
|
|
2120
|
+
}, [e, s, o, i, a]), n;
|
|
1977
2121
|
}
|
|
1978
|
-
function
|
|
2122
|
+
function xl(e) {
|
|
1979
2123
|
const [t, n] = v(null);
|
|
1980
2124
|
return k(() => {
|
|
1981
2125
|
const r = e.current;
|
|
@@ -1983,25 +2127,25 @@ function Hc(e) {
|
|
|
1983
2127
|
const s = new ResizeObserver((o) => {
|
|
1984
2128
|
const i = o[0];
|
|
1985
2129
|
if (!i) return;
|
|
1986
|
-
const
|
|
1987
|
-
n({ width:
|
|
2130
|
+
const a = i.contentRect;
|
|
2131
|
+
n({ width: a.width, height: a.height });
|
|
1988
2132
|
});
|
|
1989
2133
|
return s.observe(r), () => s.disconnect();
|
|
1990
2134
|
}, [e]), t;
|
|
1991
2135
|
}
|
|
1992
|
-
function
|
|
1993
|
-
const { resetAfter: t = 1500 } = e, [n, r] = v(!1), s =
|
|
2136
|
+
function Tl(e = {}) {
|
|
2137
|
+
const { resetAfter: t = 1500 } = e, [n, r] = v(!1), s = S(null), o = T(() => {
|
|
1994
2138
|
s.current && (clearTimeout(s.current), s.current = null), r(!1);
|
|
1995
2139
|
}, []);
|
|
1996
2140
|
k(() => () => o(), [o]);
|
|
1997
|
-
const i =
|
|
1998
|
-
async (
|
|
2141
|
+
const i = T(
|
|
2142
|
+
async (a) => {
|
|
1999
2143
|
try {
|
|
2000
2144
|
if (typeof navigator < "u" && navigator.clipboard?.writeText)
|
|
2001
|
-
await navigator.clipboard.writeText(
|
|
2145
|
+
await navigator.clipboard.writeText(a);
|
|
2002
2146
|
else if (typeof document < "u") {
|
|
2003
|
-
const
|
|
2004
|
-
|
|
2147
|
+
const c = document.createElement("textarea");
|
|
2148
|
+
c.value = a, c.style.position = "fixed", c.style.opacity = "0", document.body.appendChild(c), c.select(), document.execCommand("copy"), document.body.removeChild(c);
|
|
2005
2149
|
} else
|
|
2006
2150
|
return !1;
|
|
2007
2151
|
return r(!0), s.current && clearTimeout(s.current), s.current = setTimeout(() => r(!1), t), !0;
|
|
@@ -2013,7 +2157,7 @@ function Kc(e = {}) {
|
|
|
2013
2157
|
);
|
|
2014
2158
|
return { copied: n, copy: i, reset: o };
|
|
2015
2159
|
}
|
|
2016
|
-
function
|
|
2160
|
+
function Ua(e, t) {
|
|
2017
2161
|
if (e.key.toLowerCase() !== t.key.toLowerCase()) return !1;
|
|
2018
2162
|
const n = !!t.ctrl, r = !!t.meta, s = !!t.shift, o = !!t.alt;
|
|
2019
2163
|
if (t.mod) {
|
|
@@ -2021,17 +2165,17 @@ function fa(e, t) {
|
|
|
2021
2165
|
} else if (e.ctrlKey !== n || e.metaKey !== r) return !1;
|
|
2022
2166
|
return !(e.shiftKey !== s || e.altKey !== o);
|
|
2023
2167
|
}
|
|
2024
|
-
function
|
|
2168
|
+
function qa(e) {
|
|
2025
2169
|
if (!(e instanceof HTMLElement)) return !1;
|
|
2026
2170
|
const t = e.tagName.toLowerCase();
|
|
2027
2171
|
return t === "input" || t === "textarea" || t === "select" ? !0 : e.isContentEditable;
|
|
2028
2172
|
}
|
|
2029
|
-
function
|
|
2173
|
+
function Sl(e, t, n = {}) {
|
|
2030
2174
|
const { disabled: r = !1, ignoreInput: s = !0 } = n;
|
|
2031
2175
|
k(() => {
|
|
2032
2176
|
if (r || typeof window > "u") return;
|
|
2033
2177
|
const o = (i) => {
|
|
2034
|
-
s &&
|
|
2178
|
+
s && qa(i.target) || Ua(i, e) && t(i);
|
|
2035
2179
|
};
|
|
2036
2180
|
return window.addEventListener("keydown", o), () => window.removeEventListener("keydown", o);
|
|
2037
2181
|
}, [
|
|
@@ -2046,12 +2190,12 @@ function Vc(e, t, n = {}) {
|
|
|
2046
2190
|
t
|
|
2047
2191
|
]);
|
|
2048
2192
|
}
|
|
2049
|
-
function
|
|
2193
|
+
function El() {
|
|
2050
2194
|
const [e, t] = v(null), [n, r] = v(!1);
|
|
2051
2195
|
k(() => {
|
|
2052
2196
|
if (typeof window > "u") return;
|
|
2053
|
-
const o = (
|
|
2054
|
-
|
|
2197
|
+
const o = (a) => {
|
|
2198
|
+
a.preventDefault(), t(a);
|
|
2055
2199
|
}, i = () => {
|
|
2056
2200
|
t(null), r(!0);
|
|
2057
2201
|
};
|
|
@@ -2059,7 +2203,7 @@ function Qc() {
|
|
|
2059
2203
|
window.removeEventListener("beforeinstallprompt", o), window.removeEventListener("appinstalled", i);
|
|
2060
2204
|
};
|
|
2061
2205
|
}, []);
|
|
2062
|
-
const s =
|
|
2206
|
+
const s = T(async () => {
|
|
2063
2207
|
if (!e) return "unsupported";
|
|
2064
2208
|
await e.prompt();
|
|
2065
2209
|
const o = await e.userChoice;
|
|
@@ -2071,7 +2215,7 @@ function Qc() {
|
|
|
2071
2215
|
prompt: s
|
|
2072
2216
|
};
|
|
2073
2217
|
}
|
|
2074
|
-
const
|
|
2218
|
+
const Ae = [
|
|
2075
2219
|
"mousemove",
|
|
2076
2220
|
"mousedown",
|
|
2077
2221
|
"keydown",
|
|
@@ -2079,7 +2223,7 @@ const De = [
|
|
|
2079
2223
|
"wheel",
|
|
2080
2224
|
"scroll"
|
|
2081
2225
|
];
|
|
2082
|
-
function
|
|
2226
|
+
function Cl(e = 6e4) {
|
|
2083
2227
|
const [t, n] = v(!1);
|
|
2084
2228
|
return k(() => {
|
|
2085
2229
|
if (typeof window > "u") return;
|
|
@@ -2087,16 +2231,16 @@ function Zc(e = 6e4) {
|
|
|
2087
2231
|
function s() {
|
|
2088
2232
|
n(!1), clearTimeout(r), r = setTimeout(() => n(!0), e);
|
|
2089
2233
|
}
|
|
2090
|
-
for (const o of
|
|
2234
|
+
for (const o of Ae)
|
|
2091
2235
|
window.addEventListener(o, s, { passive: !0 });
|
|
2092
2236
|
return () => {
|
|
2093
2237
|
clearTimeout(r);
|
|
2094
|
-
for (const o of
|
|
2238
|
+
for (const o of Ae)
|
|
2095
2239
|
window.removeEventListener(o, s);
|
|
2096
2240
|
};
|
|
2097
2241
|
}, [e]), t;
|
|
2098
2242
|
}
|
|
2099
|
-
function
|
|
2243
|
+
function Ll(e = {}) {
|
|
2100
2244
|
const { watch: t = !1, disabled: n = !1, ...r } = e, [s, o] = v({
|
|
2101
2245
|
loading: !n,
|
|
2102
2246
|
error: null,
|
|
@@ -2105,28 +2249,28 @@ function Yc(e = {}) {
|
|
|
2105
2249
|
});
|
|
2106
2250
|
return k(() => {
|
|
2107
2251
|
if (n || typeof navigator > "u" || !navigator.geolocation) {
|
|
2108
|
-
o((
|
|
2252
|
+
o((c) => ({ ...c, loading: !1 }));
|
|
2109
2253
|
return;
|
|
2110
2254
|
}
|
|
2111
|
-
const i = (
|
|
2255
|
+
const i = (c) => {
|
|
2112
2256
|
o({
|
|
2113
2257
|
loading: !1,
|
|
2114
2258
|
error: null,
|
|
2115
|
-
coords:
|
|
2116
|
-
timestamp:
|
|
2259
|
+
coords: c.coords,
|
|
2260
|
+
timestamp: c.timestamp
|
|
2117
2261
|
});
|
|
2118
|
-
},
|
|
2119
|
-
o((u) => ({ ...u, loading: !1, error:
|
|
2262
|
+
}, a = (c) => {
|
|
2263
|
+
o((u) => ({ ...u, loading: !1, error: c }));
|
|
2120
2264
|
};
|
|
2121
2265
|
if (t) {
|
|
2122
|
-
const
|
|
2266
|
+
const c = navigator.geolocation.watchPosition(
|
|
2123
2267
|
i,
|
|
2124
|
-
|
|
2268
|
+
a,
|
|
2125
2269
|
r
|
|
2126
2270
|
);
|
|
2127
|
-
return () => navigator.geolocation.clearWatch(
|
|
2271
|
+
return () => navigator.geolocation.clearWatch(c);
|
|
2128
2272
|
}
|
|
2129
|
-
navigator.geolocation.getCurrentPosition(i,
|
|
2273
|
+
navigator.geolocation.getCurrentPosition(i, a, r);
|
|
2130
2274
|
}, [
|
|
2131
2275
|
n,
|
|
2132
2276
|
t,
|
|
@@ -2135,7 +2279,7 @@ function Yc(e = {}) {
|
|
|
2135
2279
|
r.timeout
|
|
2136
2280
|
]), s;
|
|
2137
2281
|
}
|
|
2138
|
-
function
|
|
2282
|
+
function Il(e) {
|
|
2139
2283
|
k(() => {
|
|
2140
2284
|
if (!e || typeof document > "u") return;
|
|
2141
2285
|
const t = document.body, n = t.style.overflow;
|
|
@@ -2144,7 +2288,7 @@ function Xc(e) {
|
|
|
2144
2288
|
};
|
|
2145
2289
|
}, [e]);
|
|
2146
2290
|
}
|
|
2147
|
-
const
|
|
2291
|
+
const Ga = [
|
|
2148
2292
|
"a[href]",
|
|
2149
2293
|
"button:not([disabled])",
|
|
2150
2294
|
"textarea:not([disabled])",
|
|
@@ -2152,7 +2296,7 @@ const ha = [
|
|
|
2152
2296
|
"select:not([disabled])",
|
|
2153
2297
|
"[tabindex]:not([tabindex='-1'])"
|
|
2154
2298
|
].join(",");
|
|
2155
|
-
function
|
|
2299
|
+
function Dl(e, t) {
|
|
2156
2300
|
k(() => {
|
|
2157
2301
|
if (!t) return;
|
|
2158
2302
|
const n = e.current;
|
|
@@ -2160,57 +2304,57 @@ function el(e, t) {
|
|
|
2160
2304
|
const r = document.activeElement;
|
|
2161
2305
|
function s() {
|
|
2162
2306
|
return Array.from(
|
|
2163
|
-
n?.querySelectorAll(
|
|
2164
|
-
).filter((
|
|
2165
|
-
if (
|
|
2166
|
-
const
|
|
2167
|
-
return !(
|
|
2307
|
+
n?.querySelectorAll(Ga) ?? []
|
|
2308
|
+
).filter((a) => {
|
|
2309
|
+
if (a.hasAttribute("aria-hidden")) return !1;
|
|
2310
|
+
const c = typeof window < "u" ? window.getComputedStyle(a) : null;
|
|
2311
|
+
return !(c && (c.display === "none" || c.visibility === "hidden"));
|
|
2168
2312
|
});
|
|
2169
2313
|
}
|
|
2170
|
-
function o(
|
|
2171
|
-
if (
|
|
2172
|
-
const
|
|
2173
|
-
if (
|
|
2174
|
-
|
|
2314
|
+
function o(a) {
|
|
2315
|
+
if (a.key !== "Tab") return;
|
|
2316
|
+
const c = s();
|
|
2317
|
+
if (c.length === 0) {
|
|
2318
|
+
a.preventDefault();
|
|
2175
2319
|
return;
|
|
2176
2320
|
}
|
|
2177
|
-
const u =
|
|
2178
|
-
|
|
2321
|
+
const u = c[0], d = c[c.length - 1], p = document.activeElement;
|
|
2322
|
+
a.shiftKey ? (p === u || !p || !n?.contains(p)) && (a.preventDefault(), d.focus()) : p === d && (a.preventDefault(), u.focus());
|
|
2179
2323
|
}
|
|
2180
2324
|
return s()[0]?.focus(), document.addEventListener("keydown", o), () => {
|
|
2181
2325
|
document.removeEventListener("keydown", o), r?.focus?.();
|
|
2182
2326
|
};
|
|
2183
2327
|
}, [e, t]);
|
|
2184
2328
|
}
|
|
2185
|
-
function
|
|
2186
|
-
const t =
|
|
2187
|
-
return t.current = e,
|
|
2329
|
+
function Ml(e) {
|
|
2330
|
+
const t = S(e);
|
|
2331
|
+
return t.current = e, T((...n) => t.current(...n), []);
|
|
2188
2332
|
}
|
|
2189
|
-
function
|
|
2333
|
+
function Ee(e, t) {
|
|
2190
2334
|
if (Object.is(e, t)) return !0;
|
|
2191
2335
|
if (typeof e != "object" || typeof t != "object" || e === null || t === null || Array.isArray(e) !== Array.isArray(t)) return !1;
|
|
2192
2336
|
if (Array.isArray(e) && Array.isArray(t))
|
|
2193
|
-
return e.length !== t.length ? !1 : e.every((s, o) =>
|
|
2337
|
+
return e.length !== t.length ? !1 : e.every((s, o) => Ee(s, t[o]));
|
|
2194
2338
|
const n = Object.keys(e), r = Object.keys(t);
|
|
2195
2339
|
return n.length !== r.length ? !1 : n.every(
|
|
2196
|
-
(s) =>
|
|
2340
|
+
(s) => Ee(e[s], t[s])
|
|
2197
2341
|
);
|
|
2198
2342
|
}
|
|
2199
|
-
function
|
|
2200
|
-
const t =
|
|
2201
|
-
return
|
|
2343
|
+
function Rl(e) {
|
|
2344
|
+
const t = S(e);
|
|
2345
|
+
return Ee(t.current, e) || (t.current = e), t.current;
|
|
2202
2346
|
}
|
|
2203
|
-
function
|
|
2347
|
+
function Ja(e, t, n) {
|
|
2204
2348
|
const r = new URL(t, e.endsWith("/") ? e : `${e}/`);
|
|
2205
2349
|
if (n)
|
|
2206
2350
|
for (const [s, o] of Object.entries(n))
|
|
2207
2351
|
o != null && r.searchParams.set(s, String(o));
|
|
2208
2352
|
return r.toString();
|
|
2209
2353
|
}
|
|
2210
|
-
function
|
|
2354
|
+
function Ha(e) {
|
|
2211
2355
|
return typeof FormData < "u" && e instanceof FormData;
|
|
2212
2356
|
}
|
|
2213
|
-
async function
|
|
2357
|
+
async function Be(e) {
|
|
2214
2358
|
let t = null;
|
|
2215
2359
|
try {
|
|
2216
2360
|
t = await e.clone().json();
|
|
@@ -2228,55 +2372,55 @@ async function Me(e) {
|
|
|
2228
2372
|
body: t
|
|
2229
2373
|
};
|
|
2230
2374
|
}
|
|
2231
|
-
function
|
|
2375
|
+
function Pl(e) {
|
|
2232
2376
|
const t = e.fetcher ?? globalThis.fetch.bind(globalThis);
|
|
2233
2377
|
function n() {
|
|
2234
2378
|
const i = e.getToken?.();
|
|
2235
2379
|
return i ? { Authorization: `Bearer ${i}` } : {};
|
|
2236
2380
|
}
|
|
2237
|
-
async function r(i,
|
|
2238
|
-
const { body:
|
|
2381
|
+
async function r(i, a) {
|
|
2382
|
+
const { body: c, params: u, headers: d, ...p } = a, f = Ha(c), m = {
|
|
2239
2383
|
...f ? {} : { "Content-Type": "application/json" },
|
|
2240
2384
|
...e.headers,
|
|
2241
2385
|
...n(),
|
|
2242
2386
|
...d
|
|
2243
2387
|
}, _ = {
|
|
2244
2388
|
...p,
|
|
2245
|
-
headers:
|
|
2389
|
+
headers: m,
|
|
2246
2390
|
credentials: e.withCredentials ? "include" : p.credentials,
|
|
2247
|
-
body:
|
|
2391
|
+
body: c == null ? void 0 : f ? c : JSON.stringify(c)
|
|
2248
2392
|
};
|
|
2249
|
-
return t(
|
|
2393
|
+
return t(Ja(e.baseURL, i, u), _);
|
|
2250
2394
|
}
|
|
2251
|
-
async function s(i,
|
|
2252
|
-
let
|
|
2253
|
-
if (
|
|
2395
|
+
async function s(i, a = {}) {
|
|
2396
|
+
let c = await r(i, a);
|
|
2397
|
+
if (c.status === 401)
|
|
2254
2398
|
if (e.refresh)
|
|
2255
2399
|
try {
|
|
2256
|
-
await e.refresh(),
|
|
2400
|
+
await e.refresh(), c = await r(i, a);
|
|
2257
2401
|
} catch {
|
|
2258
|
-
throw await e.onUnauthorized?.(
|
|
2402
|
+
throw await e.onUnauthorized?.(c), await Be(c);
|
|
2259
2403
|
}
|
|
2260
2404
|
else
|
|
2261
|
-
await e.onUnauthorized?.(
|
|
2262
|
-
if (!
|
|
2263
|
-
throw await
|
|
2264
|
-
return
|
|
2405
|
+
await e.onUnauthorized?.(c);
|
|
2406
|
+
if (!c.ok)
|
|
2407
|
+
throw await Be(c);
|
|
2408
|
+
return c.status === 204 ? void 0 : (c.headers.get("content-type") ?? "").includes("application/json") ? await c.json() : await c.text();
|
|
2265
2409
|
}
|
|
2266
|
-
async function o(i,
|
|
2267
|
-
return s(i, { method:
|
|
2410
|
+
async function o(i, a, c = "POST") {
|
|
2411
|
+
return s(i, { method: c, body: a });
|
|
2268
2412
|
}
|
|
2269
2413
|
return {
|
|
2270
2414
|
request: s,
|
|
2271
|
-
get: (i,
|
|
2272
|
-
post: (i,
|
|
2273
|
-
put: (i,
|
|
2274
|
-
patch: (i,
|
|
2275
|
-
delete: (i,
|
|
2415
|
+
get: (i, a) => s(i, { ...a, method: "GET" }),
|
|
2416
|
+
post: (i, a) => s(i, { ...a, method: "POST" }),
|
|
2417
|
+
put: (i, a) => s(i, { ...a, method: "PUT" }),
|
|
2418
|
+
patch: (i, a) => s(i, { ...a, method: "PATCH" }),
|
|
2419
|
+
delete: (i, a) => s(i, { ...a, method: "DELETE" }),
|
|
2276
2420
|
upload: o
|
|
2277
2421
|
};
|
|
2278
2422
|
}
|
|
2279
|
-
function
|
|
2423
|
+
function Al(e, t, n) {
|
|
2280
2424
|
const r = e.safeParse(t);
|
|
2281
2425
|
if (r.success)
|
|
2282
2426
|
return r.data;
|
|
@@ -2292,7 +2436,7 @@ Raw payload: ${JSON.stringify(t, null, 2)}`
|
|
|
2292
2436
|
}
|
|
2293
2437
|
throw new Error(`Resposta inválida do servidor (${n}).`);
|
|
2294
2438
|
}
|
|
2295
|
-
function
|
|
2439
|
+
function Ka(e) {
|
|
2296
2440
|
if (!e) return null;
|
|
2297
2441
|
try {
|
|
2298
2442
|
return JSON.parse(e);
|
|
@@ -2300,7 +2444,7 @@ function ya(e) {
|
|
|
2300
2444
|
return e;
|
|
2301
2445
|
}
|
|
2302
2446
|
}
|
|
2303
|
-
function
|
|
2447
|
+
function Bl(e) {
|
|
2304
2448
|
const {
|
|
2305
2449
|
url: t,
|
|
2306
2450
|
body: n,
|
|
@@ -2308,42 +2452,42 @@ function ol(e) {
|
|
|
2308
2452
|
headers: s = {},
|
|
2309
2453
|
getToken: o,
|
|
2310
2454
|
withCredentials: i = !1,
|
|
2311
|
-
onProgress:
|
|
2312
|
-
signal:
|
|
2455
|
+
onProgress: a,
|
|
2456
|
+
signal: c,
|
|
2313
2457
|
parser: u = JSON.parse
|
|
2314
2458
|
} = e;
|
|
2315
2459
|
return new Promise((d, p) => {
|
|
2316
|
-
if (
|
|
2460
|
+
if (c?.aborted) {
|
|
2317
2461
|
p(new DOMException("Aborted", "AbortError"));
|
|
2318
2462
|
return;
|
|
2319
2463
|
}
|
|
2320
2464
|
const f = new XMLHttpRequest();
|
|
2321
2465
|
f.open(r, t), f.withCredentials = i;
|
|
2322
|
-
const
|
|
2323
|
-
|
|
2466
|
+
const m = o?.(), _ = { ...s };
|
|
2467
|
+
m && !("Authorization" in _) && (_.Authorization = `Bearer ${m}`);
|
|
2324
2468
|
for (const [w, b] of Object.entries(_))
|
|
2325
2469
|
f.setRequestHeader(w, b);
|
|
2326
|
-
|
|
2327
|
-
|
|
2470
|
+
a && (f.upload.onprogress = (w) => {
|
|
2471
|
+
a({
|
|
2328
2472
|
loaded: w.loaded,
|
|
2329
2473
|
total: w.total,
|
|
2330
2474
|
fraction: w.lengthComputable ? w.loaded / w.total : null,
|
|
2331
2475
|
lengthComputable: w.lengthComputable
|
|
2332
2476
|
});
|
|
2333
2477
|
});
|
|
2334
|
-
function
|
|
2478
|
+
function h() {
|
|
2335
2479
|
f.abort();
|
|
2336
2480
|
}
|
|
2337
|
-
|
|
2338
|
-
|
|
2481
|
+
c?.addEventListener("abort", h), f.onload = () => {
|
|
2482
|
+
c?.removeEventListener("abort", h);
|
|
2339
2483
|
const w = f.status >= 200 && f.status < 300, b = f.getResponseHeader("content-type") ?? "";
|
|
2340
2484
|
if (!w) {
|
|
2341
|
-
const $ =
|
|
2485
|
+
const $ = Ka(f.responseText), N = (typeof $ == "object" && $ !== null ? $.detail ?? $.message : void 0) ?? `Erro ${f.status}`, I = {
|
|
2342
2486
|
status: f.status,
|
|
2343
2487
|
detail: String(N),
|
|
2344
2488
|
body: $
|
|
2345
2489
|
};
|
|
2346
|
-
p(
|
|
2490
|
+
p(I);
|
|
2347
2491
|
return;
|
|
2348
2492
|
}
|
|
2349
2493
|
if (f.status === 204 || !f.responseText) {
|
|
@@ -2359,13 +2503,13 @@ function ol(e) {
|
|
|
2359
2503
|
else
|
|
2360
2504
|
d(f.responseText);
|
|
2361
2505
|
}, f.onerror = () => {
|
|
2362
|
-
|
|
2506
|
+
c?.removeEventListener("abort", h), p({ status: 0, detail: "Falha de rede no upload." });
|
|
2363
2507
|
}, f.onabort = () => {
|
|
2364
|
-
|
|
2508
|
+
c?.removeEventListener("abort", h), p(new DOMException("Aborted", "AbortError"));
|
|
2365
2509
|
}, f.send(n);
|
|
2366
2510
|
});
|
|
2367
2511
|
}
|
|
2368
|
-
function
|
|
2512
|
+
function Va(e, t) {
|
|
2369
2513
|
return new Promise((n, r) => {
|
|
2370
2514
|
if (t?.aborted) {
|
|
2371
2515
|
r(new DOMException("Aborted", "AbortError"));
|
|
@@ -2381,48 +2525,48 @@ function ba(e, t) {
|
|
|
2381
2525
|
);
|
|
2382
2526
|
});
|
|
2383
2527
|
}
|
|
2384
|
-
async function
|
|
2528
|
+
async function Fl(e, t = {}) {
|
|
2385
2529
|
const {
|
|
2386
2530
|
retries: n = 3,
|
|
2387
2531
|
initialDelay: r = 300,
|
|
2388
2532
|
maxDelay: s = 1e4,
|
|
2389
2533
|
shouldRetry: o = () => !0,
|
|
2390
2534
|
onRetry: i,
|
|
2391
|
-
signal:
|
|
2535
|
+
signal: a
|
|
2392
2536
|
} = t;
|
|
2393
|
-
let
|
|
2394
|
-
for (;
|
|
2395
|
-
if (
|
|
2537
|
+
let c = 0, u;
|
|
2538
|
+
for (; c < n; ) {
|
|
2539
|
+
if (a?.aborted) throw new DOMException("Aborted", "AbortError");
|
|
2396
2540
|
try {
|
|
2397
2541
|
return await e();
|
|
2398
2542
|
} catch (d) {
|
|
2399
|
-
if (u = d,
|
|
2543
|
+
if (u = d, c += 1, c >= n || !o(d, c))
|
|
2400
2544
|
throw d;
|
|
2401
|
-
const p = Math.min(r * 2 ** (
|
|
2402
|
-
i?.({ attempt:
|
|
2545
|
+
const p = Math.min(r * 2 ** (c - 1), s);
|
|
2546
|
+
i?.({ attempt: c, delay: p, error: d }), await Va(p, a);
|
|
2403
2547
|
}
|
|
2404
2548
|
}
|
|
2405
2549
|
throw u;
|
|
2406
2550
|
}
|
|
2407
|
-
function
|
|
2551
|
+
function Ol() {
|
|
2408
2552
|
return typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (e) => {
|
|
2409
2553
|
const t = Math.random() * 16;
|
|
2410
2554
|
return (e === "x" ? Math.floor(t) : Math.floor(t) & 3 | 8).toString(16);
|
|
2411
2555
|
});
|
|
2412
2556
|
}
|
|
2413
|
-
function
|
|
2414
|
-
const { interval: n, disabled: r = !1, stopWhen: s, onError: o } = t, [i,
|
|
2415
|
-
async function
|
|
2416
|
-
if (!(f.current ||
|
|
2417
|
-
|
|
2557
|
+
function Wl(e, t) {
|
|
2558
|
+
const { interval: n, disabled: r = !1, stopWhen: s, onError: o } = t, [i, a] = v(null), [c, u] = v(null), [d, p] = v(!r), f = S(r), m = S(!1), _ = S(null);
|
|
2559
|
+
async function h() {
|
|
2560
|
+
if (!(f.current || m.current)) {
|
|
2561
|
+
m.current = !0;
|
|
2418
2562
|
try {
|
|
2419
2563
|
const w = await e();
|
|
2420
2564
|
if (f.current) return;
|
|
2421
|
-
|
|
2565
|
+
a(w), u(null), s?.(w) && (f.current = !0);
|
|
2422
2566
|
} catch (w) {
|
|
2423
2567
|
f.current || (u(w), o?.(w));
|
|
2424
2568
|
} finally {
|
|
2425
|
-
|
|
2569
|
+
m.current = !1, p(!1), f.current || (_.current = setTimeout(h, n));
|
|
2426
2570
|
}
|
|
2427
2571
|
}
|
|
2428
2572
|
}
|
|
@@ -2431,25 +2575,25 @@ function cl(e, t) {
|
|
|
2431
2575
|
_.current && clearTimeout(_.current);
|
|
2432
2576
|
return;
|
|
2433
2577
|
}
|
|
2434
|
-
return p(!0),
|
|
2578
|
+
return p(!0), h(), () => {
|
|
2435
2579
|
f.current = !0, _.current && clearTimeout(_.current);
|
|
2436
2580
|
};
|
|
2437
2581
|
}, [n, r]), {
|
|
2438
2582
|
data: i,
|
|
2439
|
-
error:
|
|
2583
|
+
error: c,
|
|
2440
2584
|
loading: d,
|
|
2441
2585
|
stop: () => {
|
|
2442
2586
|
f.current = !0, _.current && clearTimeout(_.current);
|
|
2443
2587
|
},
|
|
2444
2588
|
start: () => {
|
|
2445
|
-
f.current && (f.current = !1,
|
|
2589
|
+
f.current && (f.current = !1, h());
|
|
2446
2590
|
}
|
|
2447
2591
|
};
|
|
2448
2592
|
}
|
|
2449
|
-
function
|
|
2593
|
+
function zl(e = {}) {
|
|
2450
2594
|
const t = e.name ?? "tempest-auth", n = e.storage === "session" ? () => sessionStorage : () => localStorage;
|
|
2451
|
-
return
|
|
2452
|
-
|
|
2595
|
+
return pt()(
|
|
2596
|
+
ft(
|
|
2453
2597
|
(r) => ({
|
|
2454
2598
|
user: e.initialUser ?? null,
|
|
2455
2599
|
token: e.initialToken ?? null,
|
|
@@ -2461,7 +2605,7 @@ function ll(e = {}) {
|
|
|
2461
2605
|
}),
|
|
2462
2606
|
{
|
|
2463
2607
|
name: t,
|
|
2464
|
-
storage:
|
|
2608
|
+
storage: mt(n),
|
|
2465
2609
|
partialize: (r) => ({ user: r.user, token: r.token }),
|
|
2466
2610
|
onRehydrateStorage: () => (r) => {
|
|
2467
2611
|
r && (r.isAuthenticated = !!r.token);
|
|
@@ -2470,30 +2614,30 @@ function ll(e = {}) {
|
|
|
2470
2614
|
)
|
|
2471
2615
|
);
|
|
2472
2616
|
}
|
|
2473
|
-
function
|
|
2474
|
-
return /* @__PURE__ */ l(
|
|
2617
|
+
function jl({ isAuthenticated: e, children: t, fallback: n }) {
|
|
2618
|
+
return /* @__PURE__ */ l(Ce, { children: e ? t : n });
|
|
2475
2619
|
}
|
|
2476
|
-
function
|
|
2620
|
+
function Fe(e) {
|
|
2477
2621
|
const t = e.replace(/-/g, "+").replace(/_/g, "/"), n = t.length % 4 === 0 ? "" : "=".repeat(4 - t.length % 4);
|
|
2478
2622
|
return typeof atob < "u" ? atob(t + n) : Buffer.from(t + n, "base64").toString("binary");
|
|
2479
2623
|
}
|
|
2480
|
-
function
|
|
2624
|
+
function Qa(e) {
|
|
2481
2625
|
const t = e.split(".");
|
|
2482
2626
|
if (t.length !== 3) throw new Error("Invalid JWT: must contain three segments.");
|
|
2483
2627
|
const [n, r, s] = t;
|
|
2484
2628
|
try {
|
|
2485
2629
|
return {
|
|
2486
|
-
header: JSON.parse(
|
|
2487
|
-
payload: JSON.parse(
|
|
2630
|
+
header: JSON.parse(Fe(n)),
|
|
2631
|
+
payload: JSON.parse(Fe(r)),
|
|
2488
2632
|
signature: s
|
|
2489
2633
|
};
|
|
2490
2634
|
} catch {
|
|
2491
2635
|
throw new Error("Invalid JWT: header or payload is not valid JSON.");
|
|
2492
2636
|
}
|
|
2493
2637
|
}
|
|
2494
|
-
function
|
|
2638
|
+
function Ul(e, t = 0) {
|
|
2495
2639
|
try {
|
|
2496
|
-
const { payload: n } =
|
|
2640
|
+
const { payload: n } = Qa(e);
|
|
2497
2641
|
if (typeof n.exp != "number") return !0;
|
|
2498
2642
|
const r = Math.floor(Date.now() / 1e3);
|
|
2499
2643
|
return n.exp <= r + t;
|
|
@@ -2501,20 +2645,20 @@ function dl(e, t = 0) {
|
|
|
2501
2645
|
return !0;
|
|
2502
2646
|
}
|
|
2503
2647
|
}
|
|
2504
|
-
function
|
|
2648
|
+
function ql(e, t = {}) {
|
|
2505
2649
|
const { retries: n = 3, initialDelay: r = 400, reloadOnFinalFailure: s = !0 } = t;
|
|
2506
2650
|
async function o(i = 1) {
|
|
2507
2651
|
try {
|
|
2508
2652
|
return await e();
|
|
2509
|
-
} catch (
|
|
2653
|
+
} catch (a) {
|
|
2510
2654
|
if (i >= n)
|
|
2511
|
-
throw s && typeof window < "u" && window.location.reload(),
|
|
2512
|
-
return await new Promise((
|
|
2655
|
+
throw s && typeof window < "u" && window.location.reload(), a;
|
|
2656
|
+
return await new Promise((c) => setTimeout(c, r * 2 ** (i - 1))), o(i + 1);
|
|
2513
2657
|
}
|
|
2514
2658
|
}
|
|
2515
|
-
return
|
|
2659
|
+
return ct(o);
|
|
2516
2660
|
}
|
|
2517
|
-
function
|
|
2661
|
+
function Gl(e) {
|
|
2518
2662
|
let t = null;
|
|
2519
2663
|
return () => t || (t = (async () => {
|
|
2520
2664
|
try {
|
|
@@ -2524,34 +2668,34 @@ function fl(e) {
|
|
|
2524
2668
|
}
|
|
2525
2669
|
})(), t);
|
|
2526
2670
|
}
|
|
2527
|
-
const
|
|
2671
|
+
const Xa = {
|
|
2528
2672
|
SHORT: 30 * 1e3,
|
|
2529
2673
|
DEFAULT: 300 * 1e3,
|
|
2530
2674
|
LONG: 1800 * 1e3,
|
|
2531
2675
|
INFINITE: 1 / 0
|
|
2532
|
-
},
|
|
2676
|
+
}, Za = {
|
|
2533
2677
|
SHORT: 300 * 1e3,
|
|
2534
2678
|
DEFAULT: 1800 * 1e3,
|
|
2535
2679
|
LONG: 3600 * 1e3
|
|
2536
|
-
},
|
|
2680
|
+
}, Jl = {
|
|
2537
2681
|
REALTIME: 5 * 1e3,
|
|
2538
2682
|
FAST: 30 * 1e3,
|
|
2539
2683
|
DEFAULT: 60 * 1e3,
|
|
2540
2684
|
SLOW: 300 * 1e3
|
|
2541
2685
|
};
|
|
2542
|
-
function
|
|
2686
|
+
function Hl(e, t) {
|
|
2543
2687
|
const n = { all: [e] };
|
|
2544
2688
|
for (const [r, s] of Object.entries(t))
|
|
2545
2689
|
typeof s == "function" ? n[r] = (...o) => [e, ...s(...o)] : n[r] = [e, ...s];
|
|
2546
2690
|
return n;
|
|
2547
2691
|
}
|
|
2548
|
-
function
|
|
2692
|
+
function Kl({ children: e, client: t, defaultOptions: n }) {
|
|
2549
2693
|
const [r] = v(
|
|
2550
|
-
() => t ?? new
|
|
2694
|
+
() => t ?? new ut({
|
|
2551
2695
|
defaultOptions: {
|
|
2552
2696
|
queries: {
|
|
2553
|
-
staleTime:
|
|
2554
|
-
gcTime:
|
|
2697
|
+
staleTime: Xa.DEFAULT,
|
|
2698
|
+
gcTime: Za.DEFAULT,
|
|
2555
2699
|
retry: 1,
|
|
2556
2700
|
refetchOnWindowFocus: !1,
|
|
2557
2701
|
...n?.queries ?? {}
|
|
@@ -2563,92 +2707,92 @@ function _l({ children: e, client: t, defaultOptions: n }) {
|
|
|
2563
2707
|
}
|
|
2564
2708
|
})
|
|
2565
2709
|
);
|
|
2566
|
-
return /* @__PURE__ */ l(
|
|
2710
|
+
return /* @__PURE__ */ l(dt, { client: r, children: e });
|
|
2567
2711
|
}
|
|
2568
|
-
function
|
|
2712
|
+
function Ya(e) {
|
|
2569
2713
|
try {
|
|
2570
2714
|
return JSON.parse(e);
|
|
2571
2715
|
} catch {
|
|
2572
2716
|
return e;
|
|
2573
2717
|
}
|
|
2574
2718
|
}
|
|
2575
|
-
function
|
|
2719
|
+
function ec(e, t = {}) {
|
|
2576
2720
|
const {
|
|
2577
2721
|
withCredentials: n = !1,
|
|
2578
2722
|
namedEvents: r = [],
|
|
2579
2723
|
heartbeatEvents: s = ["ping"],
|
|
2580
2724
|
maxRetries: o = 10,
|
|
2581
2725
|
initialBackoff: i = 1e3,
|
|
2582
|
-
maxBackoff:
|
|
2583
|
-
parser:
|
|
2726
|
+
maxBackoff: a = 3e4,
|
|
2727
|
+
parser: c = Ya,
|
|
2584
2728
|
onOpen: u,
|
|
2585
2729
|
onMessage: d,
|
|
2586
2730
|
onError: p,
|
|
2587
2731
|
onStatusChange: f
|
|
2588
2732
|
} = t;
|
|
2589
|
-
let
|
|
2733
|
+
let m = null, _ = null, h = 0, w = "idle", b = !1;
|
|
2590
2734
|
function $(x) {
|
|
2591
2735
|
w !== x && (w = x, f?.(x));
|
|
2592
2736
|
}
|
|
2593
|
-
function N(x,
|
|
2737
|
+
function N(x, D) {
|
|
2594
2738
|
s.includes(x) || d?.({
|
|
2595
2739
|
event: x,
|
|
2596
|
-
data:
|
|
2597
|
-
id:
|
|
2598
|
-
raw:
|
|
2740
|
+
data: c(D.data),
|
|
2741
|
+
id: D.lastEventId || void 0,
|
|
2742
|
+
raw: D
|
|
2599
2743
|
});
|
|
2600
2744
|
}
|
|
2601
|
-
function
|
|
2745
|
+
function I() {
|
|
2602
2746
|
if (b) return;
|
|
2603
|
-
if (
|
|
2747
|
+
if (h >= o) {
|
|
2604
2748
|
$("error");
|
|
2605
2749
|
return;
|
|
2606
2750
|
}
|
|
2607
|
-
const x = Math.min(i * 2 **
|
|
2608
|
-
|
|
2751
|
+
const x = Math.min(i * 2 ** h, a);
|
|
2752
|
+
h += 1, _ = setTimeout(M, x);
|
|
2609
2753
|
}
|
|
2610
|
-
function
|
|
2754
|
+
function M() {
|
|
2611
2755
|
if (b) return;
|
|
2612
|
-
|
|
2756
|
+
m && m.close(), $("connecting");
|
|
2613
2757
|
const x = new EventSource(e, { withCredentials: n });
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
}, x.onmessage = (
|
|
2617
|
-
for (const
|
|
2618
|
-
x.addEventListener(
|
|
2619
|
-
for (const
|
|
2620
|
-
x.addEventListener(
|
|
2758
|
+
m = x, x.onopen = () => {
|
|
2759
|
+
h = 0, $("open"), u?.();
|
|
2760
|
+
}, x.onmessage = (D) => N("message", D);
|
|
2761
|
+
for (const D of r)
|
|
2762
|
+
x.addEventListener(D, (we) => N(D, we));
|
|
2763
|
+
for (const D of s)
|
|
2764
|
+
x.addEventListener(D, () => {
|
|
2621
2765
|
});
|
|
2622
|
-
x.onerror = (
|
|
2623
|
-
p?.(
|
|
2766
|
+
x.onerror = (D) => {
|
|
2767
|
+
p?.(D), x.close(), m = null, $("closed"), I();
|
|
2624
2768
|
};
|
|
2625
2769
|
}
|
|
2626
|
-
function
|
|
2627
|
-
b = !0, _ && (clearTimeout(_), _ = null),
|
|
2770
|
+
function ye() {
|
|
2771
|
+
b = !0, _ && (clearTimeout(_), _ = null), h = 0, m && (m.close(), m = null), $("closed");
|
|
2628
2772
|
}
|
|
2629
|
-
function
|
|
2630
|
-
_ && (clearTimeout(_), _ = null),
|
|
2773
|
+
function be() {
|
|
2774
|
+
_ && (clearTimeout(_), _ = null), h = 0, b = !1, M();
|
|
2631
2775
|
}
|
|
2632
|
-
return
|
|
2633
|
-
close:
|
|
2634
|
-
reconnect:
|
|
2776
|
+
return M(), {
|
|
2777
|
+
close: ye,
|
|
2778
|
+
reconnect: be,
|
|
2635
2779
|
get status() {
|
|
2636
2780
|
return w;
|
|
2637
2781
|
}
|
|
2638
2782
|
};
|
|
2639
2783
|
}
|
|
2640
|
-
function
|
|
2641
|
-
const { enabled: n = !0, onMessage: r, ...s } = t, [o, i] = v("idle"), [
|
|
2784
|
+
function Vl(e, t = {}) {
|
|
2785
|
+
const { enabled: n = !0, onMessage: r, ...s } = t, [o, i] = v("idle"), [a, c] = v(null), u = S(null), d = S(r);
|
|
2642
2786
|
return d.current = r, k(() => {
|
|
2643
2787
|
if (!n || !e) {
|
|
2644
2788
|
i("idle");
|
|
2645
2789
|
return;
|
|
2646
2790
|
}
|
|
2647
|
-
const p =
|
|
2791
|
+
const p = ec(e, {
|
|
2648
2792
|
...s,
|
|
2649
2793
|
onStatusChange: i,
|
|
2650
2794
|
onMessage: (f) => {
|
|
2651
|
-
|
|
2795
|
+
c(f), d.current?.(f);
|
|
2652
2796
|
}
|
|
2653
2797
|
});
|
|
2654
2798
|
return u.current = p.reconnect, () => {
|
|
@@ -2656,40 +2800,40 @@ function gl(e, t = {}) {
|
|
|
2656
2800
|
};
|
|
2657
2801
|
}, [e, n]), {
|
|
2658
2802
|
status: o,
|
|
2659
|
-
lastMessage:
|
|
2803
|
+
lastMessage: a,
|
|
2660
2804
|
reconnect: () => u.current?.()
|
|
2661
2805
|
};
|
|
2662
2806
|
}
|
|
2663
|
-
function
|
|
2807
|
+
function tc(e) {
|
|
2664
2808
|
const t = "=".repeat((4 - e.length % 4) % 4), n = (e + t).replace(/-/g, "+").replace(/_/g, "/"), r = window.atob(n), s = new ArrayBuffer(r.length), o = new Uint8Array(s);
|
|
2665
2809
|
for (let i = 0; i < r.length; i++)
|
|
2666
2810
|
o[i] = r.charCodeAt(i);
|
|
2667
2811
|
return o;
|
|
2668
2812
|
}
|
|
2669
|
-
function
|
|
2813
|
+
function me() {
|
|
2670
2814
|
return typeof window < "u" && "serviceWorker" in navigator && "PushManager" in window && "Notification" in window;
|
|
2671
2815
|
}
|
|
2672
|
-
class
|
|
2816
|
+
class Oe extends Error {
|
|
2673
2817
|
constructor() {
|
|
2674
2818
|
super("Web Push não suportado neste navegador."), this.name = "WebPushUnsupportedError";
|
|
2675
2819
|
}
|
|
2676
2820
|
}
|
|
2677
|
-
class
|
|
2821
|
+
class nc extends Error {
|
|
2678
2822
|
constructor() {
|
|
2679
2823
|
super("Permissão de notificação negada pelo usuário."), this.name = "WebPushPermissionDeniedError";
|
|
2680
2824
|
}
|
|
2681
2825
|
}
|
|
2682
|
-
class
|
|
2826
|
+
class rc {
|
|
2683
2827
|
config;
|
|
2684
2828
|
constructor(t) {
|
|
2685
2829
|
this.config = t;
|
|
2686
2830
|
}
|
|
2687
2831
|
/** Whether the runtime supports the Push API. */
|
|
2688
2832
|
static isSupported() {
|
|
2689
|
-
return
|
|
2833
|
+
return me();
|
|
2690
2834
|
}
|
|
2691
2835
|
async registration() {
|
|
2692
|
-
if (!
|
|
2836
|
+
if (!me()) throw new Oe();
|
|
2693
2837
|
return this.config.getRegistration ? await this.config.getRegistration() : await navigator.serviceWorker.ready;
|
|
2694
2838
|
}
|
|
2695
2839
|
/** Current `Notification.permission` value, or `"unsupported"`. */
|
|
@@ -2703,7 +2847,7 @@ class Ea {
|
|
|
2703
2847
|
* @returns The resulting `NotificationPermission` value.
|
|
2704
2848
|
*/
|
|
2705
2849
|
async requestPermission() {
|
|
2706
|
-
if (typeof Notification > "u") throw new
|
|
2850
|
+
if (typeof Notification > "u") throw new Oe();
|
|
2707
2851
|
return Notification.requestPermission();
|
|
2708
2852
|
}
|
|
2709
2853
|
/** Return the active push subscription, if any. */
|
|
@@ -2712,7 +2856,7 @@ class Ea {
|
|
|
2712
2856
|
}
|
|
2713
2857
|
/** True when a subscription already exists for this browser. */
|
|
2714
2858
|
async isSubscribed() {
|
|
2715
|
-
return
|
|
2859
|
+
return me() ? await this.getSubscription() !== null : !1;
|
|
2716
2860
|
}
|
|
2717
2861
|
/**
|
|
2718
2862
|
* Subscribe the current device. Requests permission, creates a push
|
|
@@ -2724,13 +2868,13 @@ class Ea {
|
|
|
2724
2868
|
* @throws {WebPushPermissionDeniedError} If the user denies the prompt.
|
|
2725
2869
|
*/
|
|
2726
2870
|
async subscribe() {
|
|
2727
|
-
if (await this.requestPermission() !== "granted") throw new
|
|
2871
|
+
if (await this.requestPermission() !== "granted") throw new nc();
|
|
2728
2872
|
const n = await this.registration(), r = await n.pushManager.getSubscription();
|
|
2729
2873
|
if (r)
|
|
2730
2874
|
return await this.config.onSubscribe(r.toJSON()), r;
|
|
2731
2875
|
const s = await n.pushManager.subscribe({
|
|
2732
2876
|
userVisibleOnly: !0,
|
|
2733
|
-
applicationServerKey:
|
|
2877
|
+
applicationServerKey: tc(this.config.vapidPublicKey)
|
|
2734
2878
|
});
|
|
2735
2879
|
return await this.config.onSubscribe(s.toJSON()), s;
|
|
2736
2880
|
}
|
|
@@ -2745,51 +2889,51 @@ class Ea {
|
|
|
2745
2889
|
return t ? (this.config.onUnsubscribe && await this.config.onUnsubscribe(t.toJSON()), t.unsubscribe()) : !1;
|
|
2746
2890
|
}
|
|
2747
2891
|
}
|
|
2748
|
-
function
|
|
2749
|
-
const t =
|
|
2892
|
+
function Ql(e) {
|
|
2893
|
+
const t = S(e);
|
|
2750
2894
|
t.current = e;
|
|
2751
|
-
const n =
|
|
2752
|
-
() => new
|
|
2895
|
+
const n = q(
|
|
2896
|
+
() => new rc({
|
|
2753
2897
|
vapidPublicKey: e.vapidPublicKey,
|
|
2754
|
-
onSubscribe: (
|
|
2755
|
-
onUnsubscribe: (
|
|
2898
|
+
onSubscribe: (h) => t.current.onSubscribe(h),
|
|
2899
|
+
onUnsubscribe: (h) => t.current.onUnsubscribe?.(h),
|
|
2756
2900
|
getRegistration: e.getRegistration
|
|
2757
2901
|
}),
|
|
2758
2902
|
[e.vapidPublicKey, e.getRegistration]
|
|
2759
|
-
), [r] = v(() =>
|
|
2903
|
+
), [r] = v(() => me()), [s, o] = v(
|
|
2760
2904
|
() => n.permission()
|
|
2761
|
-
), [i,
|
|
2905
|
+
), [i, a] = v(!1), [c, u] = v(!1), [d, p] = v(null), f = T(async () => {
|
|
2762
2906
|
if (r) {
|
|
2763
2907
|
o(n.permission());
|
|
2764
2908
|
try {
|
|
2765
|
-
const
|
|
2766
|
-
|
|
2767
|
-
} catch (
|
|
2768
|
-
p(
|
|
2909
|
+
const h = await n.isSubscribed();
|
|
2910
|
+
a(h);
|
|
2911
|
+
} catch (h) {
|
|
2912
|
+
p(h instanceof Error ? h : new Error(String(h)));
|
|
2769
2913
|
}
|
|
2770
2914
|
}
|
|
2771
2915
|
}, [n, r]);
|
|
2772
2916
|
k(() => {
|
|
2773
2917
|
f();
|
|
2774
2918
|
}, [f]);
|
|
2775
|
-
const
|
|
2919
|
+
const m = T(async () => {
|
|
2776
2920
|
if (r) {
|
|
2777
2921
|
u(!0), p(null);
|
|
2778
2922
|
try {
|
|
2779
|
-
await n.subscribe(),
|
|
2780
|
-
} catch (
|
|
2781
|
-
throw p(
|
|
2923
|
+
await n.subscribe(), a(!0), o(n.permission());
|
|
2924
|
+
} catch (h) {
|
|
2925
|
+
throw p(h instanceof Error ? h : new Error(String(h))), h;
|
|
2782
2926
|
} finally {
|
|
2783
2927
|
u(!1);
|
|
2784
2928
|
}
|
|
2785
2929
|
}
|
|
2786
|
-
}, [n, r]), _ =
|
|
2930
|
+
}, [n, r]), _ = T(async () => {
|
|
2787
2931
|
if (r) {
|
|
2788
2932
|
u(!0), p(null);
|
|
2789
2933
|
try {
|
|
2790
|
-
await n.unsubscribe(),
|
|
2791
|
-
} catch (
|
|
2792
|
-
throw p(
|
|
2934
|
+
await n.unsubscribe(), a(!1);
|
|
2935
|
+
} catch (h) {
|
|
2936
|
+
throw p(h instanceof Error ? h : new Error(String(h))), h;
|
|
2793
2937
|
} finally {
|
|
2794
2938
|
u(!1);
|
|
2795
2939
|
}
|
|
@@ -2799,14 +2943,14 @@ function yl(e) {
|
|
|
2799
2943
|
supported: r,
|
|
2800
2944
|
permission: s,
|
|
2801
2945
|
subscribed: i,
|
|
2802
|
-
loading:
|
|
2946
|
+
loading: c,
|
|
2803
2947
|
error: d,
|
|
2804
|
-
subscribe:
|
|
2948
|
+
subscribe: m,
|
|
2805
2949
|
unsubscribe: _,
|
|
2806
2950
|
refresh: f
|
|
2807
2951
|
};
|
|
2808
2952
|
}
|
|
2809
|
-
async function
|
|
2953
|
+
async function Xl(e) {
|
|
2810
2954
|
if (typeof navigator > "u" || !("serviceWorker" in navigator))
|
|
2811
2955
|
return null;
|
|
2812
2956
|
try {
|
|
@@ -2823,10 +2967,10 @@ async function bl(e) {
|
|
|
2823
2967
|
return e.onError?.(t), null;
|
|
2824
2968
|
}
|
|
2825
2969
|
}
|
|
2826
|
-
function
|
|
2970
|
+
function Zl(e) {
|
|
2827
2971
|
e.postMessage({ type: "SKIP_WAITING" });
|
|
2828
2972
|
}
|
|
2829
|
-
async function
|
|
2973
|
+
async function Yl() {
|
|
2830
2974
|
if (typeof navigator > "u" || !("serviceWorker" in navigator)) return 0;
|
|
2831
2975
|
const e = await navigator.serviceWorker.getRegistrations();
|
|
2832
2976
|
let t = 0;
|
|
@@ -2834,34 +2978,34 @@ async function vl() {
|
|
|
2834
2978
|
await n.unregister() && (t += 1);
|
|
2835
2979
|
return t;
|
|
2836
2980
|
}
|
|
2837
|
-
function
|
|
2981
|
+
function De() {
|
|
2838
2982
|
return globalThis;
|
|
2839
2983
|
}
|
|
2840
|
-
function
|
|
2841
|
-
const t =
|
|
2984
|
+
function eu(e = {}) {
|
|
2985
|
+
const t = De(), { defaultTitle: n = "Notificação", defaultIcon: r, defaultBadge: s, transform: o } = e;
|
|
2842
2986
|
t.addEventListener("push", (i) => {
|
|
2843
2987
|
if (!i.data) return;
|
|
2844
|
-
let
|
|
2988
|
+
let a;
|
|
2845
2989
|
try {
|
|
2846
|
-
|
|
2990
|
+
a = i.data.json();
|
|
2847
2991
|
} catch {
|
|
2848
|
-
|
|
2849
|
-
}
|
|
2850
|
-
const
|
|
2851
|
-
if (!
|
|
2852
|
-
const u =
|
|
2853
|
-
body:
|
|
2854
|
-
icon:
|
|
2855
|
-
badge:
|
|
2856
|
-
image:
|
|
2857
|
-
tag:
|
|
2858
|
-
data: { url:
|
|
2992
|
+
a = { title: n, body: i.data.text() };
|
|
2993
|
+
}
|
|
2994
|
+
const c = o ? o(a) : a;
|
|
2995
|
+
if (!c) return;
|
|
2996
|
+
const u = c.title ?? n, d = {
|
|
2997
|
+
body: c.body,
|
|
2998
|
+
icon: c.icon ?? r,
|
|
2999
|
+
badge: c.badge ?? s,
|
|
3000
|
+
image: c.image,
|
|
3001
|
+
tag: c.tag,
|
|
3002
|
+
data: { url: c.url ?? "/", ...c.data ?? {} }
|
|
2859
3003
|
};
|
|
2860
3004
|
i.waitUntil(t.registration.showNotification(u, d));
|
|
2861
3005
|
});
|
|
2862
3006
|
}
|
|
2863
|
-
function
|
|
2864
|
-
const t =
|
|
3007
|
+
function tu(e = {}) {
|
|
3008
|
+
const t = De(), n = e.resolveUrl ?? ((r) => {
|
|
2865
3009
|
if (typeof r == "string") return r;
|
|
2866
3010
|
if (r && typeof r == "object" && "url" in r) {
|
|
2867
3011
|
const s = r.url;
|
|
@@ -2886,26 +3030,26 @@ function Nl(e = {}) {
|
|
|
2886
3030
|
);
|
|
2887
3031
|
});
|
|
2888
3032
|
}
|
|
2889
|
-
function
|
|
2890
|
-
const e =
|
|
3033
|
+
function nu() {
|
|
3034
|
+
const e = De();
|
|
2891
3035
|
e.addEventListener("message", (t) => {
|
|
2892
3036
|
t.data?.type === "SKIP_WAITING" && e.skipWaiting();
|
|
2893
3037
|
});
|
|
2894
3038
|
}
|
|
2895
|
-
function
|
|
3039
|
+
function Xe() {
|
|
2896
3040
|
let e = null;
|
|
2897
3041
|
async function t(r, {
|
|
2898
3042
|
volume: s = 1,
|
|
2899
3043
|
loop: o = !1,
|
|
2900
3044
|
autoplay: i = !0,
|
|
2901
|
-
stopPrevious:
|
|
2902
|
-
onEnded:
|
|
3045
|
+
stopPrevious: a = !1,
|
|
3046
|
+
onEnded: c,
|
|
2903
3047
|
onError: u
|
|
2904
3048
|
} = {}) {
|
|
2905
3049
|
try {
|
|
2906
|
-
|
|
3050
|
+
a && e && (e.pause(), e.currentTime = 0);
|
|
2907
3051
|
const d = new Audio(r);
|
|
2908
|
-
return d.volume = Math.max(0, Math.min(1, s)), d.loop = o, d.preload = "auto",
|
|
3052
|
+
return d.volume = Math.max(0, Math.min(1, s)), d.loop = o, d.preload = "auto", c && (d.onended = c), u && (d.onerror = (p) => u(p)), e = d, i && await d.play(), d;
|
|
2909
3053
|
} catch (d) {
|
|
2910
3054
|
return u?.(d), null;
|
|
2911
3055
|
}
|
|
@@ -2915,76 +3059,76 @@ function qe() {
|
|
|
2915
3059
|
}
|
|
2916
3060
|
return { play: t, stop: n, current: () => e };
|
|
2917
3061
|
}
|
|
2918
|
-
let
|
|
2919
|
-
function
|
|
2920
|
-
return
|
|
3062
|
+
let Ne = null;
|
|
3063
|
+
function Ze() {
|
|
3064
|
+
return Ne || (Ne = Xe()), Ne;
|
|
2921
3065
|
}
|
|
2922
|
-
async function
|
|
2923
|
-
return
|
|
3066
|
+
async function ru(e, t) {
|
|
3067
|
+
return Ze().play(e, t);
|
|
2924
3068
|
}
|
|
2925
|
-
function
|
|
2926
|
-
|
|
3069
|
+
function su() {
|
|
3070
|
+
Ze().stop();
|
|
2927
3071
|
}
|
|
2928
|
-
function
|
|
2929
|
-
const e =
|
|
2930
|
-
e.current || (e.current =
|
|
3072
|
+
function ou() {
|
|
3073
|
+
const e = S(null), [t, n] = v(!1);
|
|
3074
|
+
e.current || (e.current = Xe()), k(() => () => {
|
|
2931
3075
|
e.current?.stop();
|
|
2932
3076
|
}, []);
|
|
2933
|
-
const r =
|
|
3077
|
+
const r = T(async (o, i) => {
|
|
2934
3078
|
await e.current.play(o, i) && n(!0);
|
|
2935
|
-
}, []), s =
|
|
3079
|
+
}, []), s = T(() => {
|
|
2936
3080
|
e.current?.stop();
|
|
2937
3081
|
}, []);
|
|
2938
3082
|
return { play: r, stop: s, unlocked: t };
|
|
2939
3083
|
}
|
|
2940
|
-
class
|
|
3084
|
+
class sc extends ht {
|
|
2941
3085
|
store;
|
|
2942
3086
|
constructor(t, n, r, s) {
|
|
2943
3087
|
super(t), this.version(n).stores({ [r]: s }), this.store = this.table(r);
|
|
2944
3088
|
}
|
|
2945
3089
|
}
|
|
2946
|
-
function
|
|
2947
|
-
const { databaseName: t, version: n, tableName: r, indexes: s, keyPath: o = "id", ownerField: i } = e,
|
|
3090
|
+
function iu(e) {
|
|
3091
|
+
const { databaseName: t, version: n, tableName: r, indexes: s, keyPath: o = "id", ownerField: i } = e, a = new sc(t, n, r, s), c = a.store;
|
|
2948
3092
|
function u(p, f) {
|
|
2949
3093
|
return !i || !f ? p : { ...p, [i]: f };
|
|
2950
3094
|
}
|
|
2951
3095
|
async function d(p, f = {}) {
|
|
2952
|
-
const { orderBy:
|
|
2953
|
-
let $ = i && p ?
|
|
3096
|
+
const { orderBy: m = o, reverse: _ = !1, limit: h, offset: w, filter: b } = f;
|
|
3097
|
+
let $ = i && p ? c.where(i).equals(p) : c.toCollection();
|
|
2954
3098
|
b && ($ = $.filter(b));
|
|
2955
|
-
let N =
|
|
2956
|
-
return _ && (N = N.reverse()), w && (N = N.slice(w)), typeof
|
|
3099
|
+
let N = m === o ? await $.toArray() : await $.sortBy(m);
|
|
3100
|
+
return _ && (N = N.reverse()), w && (N = N.slice(w)), typeof h == "number" && (N = N.slice(0, h)), N;
|
|
2957
3101
|
}
|
|
2958
3102
|
return {
|
|
2959
|
-
put: (p, f) =>
|
|
2960
|
-
bulkPut: (p, f) =>
|
|
2961
|
-
get: (p) =>
|
|
3103
|
+
put: (p, f) => c.put(u(p, f)),
|
|
3104
|
+
bulkPut: (p, f) => c.bulkPut(p.map((m) => u(m, f))),
|
|
3105
|
+
get: (p) => c.get(p),
|
|
2962
3106
|
list: d,
|
|
2963
|
-
update: (p, f) =>
|
|
3107
|
+
update: (p, f) => c.update(p, f),
|
|
2964
3108
|
updateMany: async (p, f) => {
|
|
2965
|
-
const
|
|
2966
|
-
return i && p ?
|
|
3109
|
+
const m = f;
|
|
3110
|
+
return i && p ? c.where(i).equals(p).modify(m) : c.toCollection().modify(m);
|
|
2967
3111
|
},
|
|
2968
|
-
delete: (p) =>
|
|
3112
|
+
delete: (p) => c.delete(p),
|
|
2969
3113
|
clear: async (p) => {
|
|
2970
3114
|
if (i && p) {
|
|
2971
|
-
await
|
|
3115
|
+
await c.where(i).equals(p).delete();
|
|
2972
3116
|
return;
|
|
2973
3117
|
}
|
|
2974
|
-
await
|
|
3118
|
+
await c.clear();
|
|
2975
3119
|
},
|
|
2976
|
-
count: (p) => i && p ?
|
|
2977
|
-
raw:
|
|
2978
|
-
db:
|
|
3120
|
+
count: (p) => i && p ? c.where(i).equals(p).count() : c.count(),
|
|
3121
|
+
raw: c,
|
|
3122
|
+
db: a
|
|
2979
3123
|
};
|
|
2980
3124
|
}
|
|
2981
|
-
function
|
|
3125
|
+
function oc(e = [], t = []) {
|
|
2982
3126
|
if (e.length !== t.length) return !0;
|
|
2983
3127
|
for (let n = 0; n < e.length; n++)
|
|
2984
3128
|
if (!Object.is(e[n], t[n])) return !0;
|
|
2985
3129
|
return !1;
|
|
2986
3130
|
}
|
|
2987
|
-
class
|
|
3131
|
+
class au extends lt {
|
|
2988
3132
|
state = { error: null };
|
|
2989
3133
|
static getDerivedStateFromError(t) {
|
|
2990
3134
|
return { error: t };
|
|
@@ -2993,7 +3137,7 @@ class Cl extends nt {
|
|
|
2993
3137
|
this.props.onError?.(t, n);
|
|
2994
3138
|
}
|
|
2995
3139
|
componentDidUpdate(t) {
|
|
2996
|
-
this.state.error &&
|
|
3140
|
+
this.state.error && oc(t.resetKeys, this.props.resetKeys) && this.reset();
|
|
2997
3141
|
}
|
|
2998
3142
|
reset = () => {
|
|
2999
3143
|
this.setState({ error: null });
|
|
@@ -3005,15 +3149,15 @@ class Cl extends nt {
|
|
|
3005
3149
|
return typeof n == "function" ? n({ error: t, reset: this.reset }) : n;
|
|
3006
3150
|
}
|
|
3007
3151
|
}
|
|
3008
|
-
function
|
|
3152
|
+
function cu() {
|
|
3009
3153
|
const [, e] = v(null);
|
|
3010
|
-
return
|
|
3154
|
+
return T((t) => {
|
|
3011
3155
|
e(() => {
|
|
3012
3156
|
throw t instanceof Error ? t : new Error(String(t));
|
|
3013
3157
|
});
|
|
3014
3158
|
}, []);
|
|
3015
3159
|
}
|
|
3016
|
-
function
|
|
3160
|
+
function lu(e, t) {
|
|
3017
3161
|
const n = e.safeParse(t);
|
|
3018
3162
|
if (n.success)
|
|
3019
3163
|
return { success: !0, data: n.data, errors: {} };
|
|
@@ -3024,30 +3168,30 @@ function Il(e, t) {
|
|
|
3024
3168
|
}
|
|
3025
3169
|
return { success: !1, errors: r };
|
|
3026
3170
|
}
|
|
3027
|
-
function
|
|
3171
|
+
function ic(e) {
|
|
3028
3172
|
return async (t, n, r) => {
|
|
3029
3173
|
const s = e.safeParse(t);
|
|
3030
3174
|
if (s.success)
|
|
3031
3175
|
return { values: s.data, errors: {} };
|
|
3032
3176
|
const o = {}, i = r.criteriaMode ?? "firstError";
|
|
3033
|
-
for (const
|
|
3034
|
-
const
|
|
3035
|
-
i === "firstError" && o[
|
|
3177
|
+
for (const a of s.error.issues) {
|
|
3178
|
+
const c = a.path.length === 0 ? "_root" : a.path.join(".");
|
|
3179
|
+
i === "firstError" && o[c] || (o[c] = { type: a.code, message: a.message });
|
|
3036
3180
|
}
|
|
3037
3181
|
return { values: {}, errors: o };
|
|
3038
3182
|
};
|
|
3039
3183
|
}
|
|
3040
|
-
function
|
|
3041
|
-
return
|
|
3184
|
+
function uu(e, t = {}) {
|
|
3185
|
+
return _t({
|
|
3042
3186
|
...t,
|
|
3043
|
-
resolver:
|
|
3187
|
+
resolver: ic(e)
|
|
3044
3188
|
});
|
|
3045
3189
|
}
|
|
3046
|
-
function
|
|
3190
|
+
function pe(e) {
|
|
3047
3191
|
return e.replace(/\D/g, "");
|
|
3048
3192
|
}
|
|
3049
|
-
function
|
|
3050
|
-
const t =
|
|
3193
|
+
function du(e) {
|
|
3194
|
+
const t = pe(e);
|
|
3051
3195
|
if (t.length !== 11 || /^(\d)\1+$/.test(t)) return !1;
|
|
3052
3196
|
const n = t.split("").map(Number);
|
|
3053
3197
|
let r = 0;
|
|
@@ -3058,96 +3202,96 @@ function Ml(e) {
|
|
|
3058
3202
|
for (let o = 0; o < 10; o++) r += n[o] * (11 - o);
|
|
3059
3203
|
return s = r * 10 % 11, s === 10 && (s = 0), s === n[10];
|
|
3060
3204
|
}
|
|
3061
|
-
function
|
|
3062
|
-
const t =
|
|
3205
|
+
function pu(e) {
|
|
3206
|
+
const t = pe(e);
|
|
3063
3207
|
if (t.length !== 14 || /^(\d)\1+$/.test(t)) return !1;
|
|
3064
3208
|
const n = t.split("").map(Number), r = [5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2], s = [6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2];
|
|
3065
3209
|
let o = 0;
|
|
3066
|
-
for (let
|
|
3210
|
+
for (let a = 0; a < 12; a++) o += n[a] * r[a];
|
|
3067
3211
|
let i = o % 11;
|
|
3068
3212
|
if (i = i < 2 ? 0 : 11 - i, i !== n[12]) return !1;
|
|
3069
3213
|
o = 0;
|
|
3070
|
-
for (let
|
|
3214
|
+
for (let a = 0; a < 13; a++) o += n[a] * s[a];
|
|
3071
3215
|
return i = o % 11, i = i < 2 ? 0 : 11 - i, i === n[13];
|
|
3072
3216
|
}
|
|
3073
|
-
function
|
|
3074
|
-
return
|
|
3217
|
+
function ac(e) {
|
|
3218
|
+
return pe(e).slice(0, 8).replace(/(\d{5})(\d)/, "$1-$2");
|
|
3075
3219
|
}
|
|
3076
|
-
function
|
|
3077
|
-
return
|
|
3220
|
+
function cc(e) {
|
|
3221
|
+
return pe(e).slice(0, 14).replace(/(\d{2})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1/$2").replace(/(\d{4})(\d)/, "$1-$2");
|
|
3078
3222
|
}
|
|
3079
|
-
function
|
|
3080
|
-
return
|
|
3223
|
+
function fu(e) {
|
|
3224
|
+
return pe(e);
|
|
3081
3225
|
}
|
|
3082
|
-
function
|
|
3226
|
+
function mu(e) {
|
|
3083
3227
|
return new Intl.NumberFormat("pt-BR", {
|
|
3084
3228
|
style: "currency",
|
|
3085
3229
|
currency: "BRL"
|
|
3086
3230
|
}).format(e);
|
|
3087
3231
|
}
|
|
3088
|
-
function
|
|
3232
|
+
function hu(e) {
|
|
3089
3233
|
const t = typeof e == "string" ? new Date(e) : e;
|
|
3090
3234
|
return Number.isNaN(t.getTime()) ? "" : new Intl.DateTimeFormat("pt-BR").format(t);
|
|
3091
3235
|
}
|
|
3092
|
-
function
|
|
3236
|
+
function _u(e) {
|
|
3093
3237
|
const t = typeof e == "string" ? new Date(e) : e;
|
|
3094
3238
|
return Number.isNaN(t.getTime()) ? "" : new Intl.DateTimeFormat("pt-BR", {
|
|
3095
3239
|
dateStyle: "short",
|
|
3096
3240
|
timeStyle: "short"
|
|
3097
3241
|
}).format(t);
|
|
3098
3242
|
}
|
|
3099
|
-
function
|
|
3243
|
+
function lc(e) {
|
|
3100
3244
|
const t = e.replace(/\D/g, "").slice(0, 11);
|
|
3101
3245
|
return t.length <= 10 ? t.replace(/(\d{2})(\d)/, "($1) $2").replace(/(\d{4})(\d)/, "$1-$2") : t.replace(/(\d{2})(\d)/, "($1) $2").replace(/(\d{5})(\d)/, "$1-$2");
|
|
3102
3246
|
}
|
|
3103
|
-
function
|
|
3247
|
+
function uc(e) {
|
|
3104
3248
|
return e.replace(/\D/g, "").slice(0, 11).replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d{1,2})$/, "$1-$2");
|
|
3105
3249
|
}
|
|
3106
|
-
function
|
|
3250
|
+
function gu(e) {
|
|
3107
3251
|
return new Intl.NumberFormat("pt-BR", {
|
|
3108
3252
|
style: "percent",
|
|
3109
3253
|
minimumFractionDigits: 1,
|
|
3110
3254
|
maximumFractionDigits: 1
|
|
3111
3255
|
}).format(e);
|
|
3112
3256
|
}
|
|
3113
|
-
function
|
|
3114
|
-
return
|
|
3257
|
+
function ge(e, t = "numeric") {
|
|
3258
|
+
return j(function({ value: r, onChange: s, ...o }, i) {
|
|
3115
3259
|
return /* @__PURE__ */ l(
|
|
3116
|
-
|
|
3260
|
+
Ie,
|
|
3117
3261
|
{
|
|
3118
3262
|
...o,
|
|
3119
3263
|
ref: i,
|
|
3120
3264
|
value: e(r ?? ""),
|
|
3121
3265
|
inputMode: t,
|
|
3122
|
-
onChange: (
|
|
3266
|
+
onChange: (a) => s(e(a.target.value))
|
|
3123
3267
|
}
|
|
3124
3268
|
);
|
|
3125
3269
|
});
|
|
3126
3270
|
}
|
|
3127
|
-
const
|
|
3128
|
-
function
|
|
3271
|
+
const yu = ge(uc), bu = ge(cc), wu = ge(lc, "tel"), vu = ge(ac);
|
|
3272
|
+
function dc(e, t, n) {
|
|
3129
3273
|
return new Intl.NumberFormat(t, { style: "currency", currency: n }).format(e / 100);
|
|
3130
3274
|
}
|
|
3131
|
-
function
|
|
3275
|
+
function pc(e) {
|
|
3132
3276
|
const t = e.replace(/\D/g, "");
|
|
3133
3277
|
return t ? Number.parseInt(t, 10) : 0;
|
|
3134
3278
|
}
|
|
3135
|
-
const
|
|
3279
|
+
const $u = j(function({ value: t, onChange: n, currency: r = "BRL", locale: s = "pt-BR", ...o }, i) {
|
|
3136
3280
|
return /* @__PURE__ */ l(
|
|
3137
|
-
|
|
3281
|
+
Ie,
|
|
3138
3282
|
{
|
|
3139
3283
|
...o,
|
|
3140
3284
|
ref: i,
|
|
3141
3285
|
type: "text",
|
|
3142
3286
|
inputMode: "numeric",
|
|
3143
|
-
value:
|
|
3144
|
-
onChange: (
|
|
3287
|
+
value: dc(t || 0, s, r),
|
|
3288
|
+
onChange: (a) => n(pc(a.target.value))
|
|
3145
3289
|
}
|
|
3146
3290
|
);
|
|
3147
3291
|
});
|
|
3148
|
-
function
|
|
3149
|
-
const [e, t] = v(!1), [n, r] = v(null), [s, o] = v(null), i =
|
|
3150
|
-
const u =
|
|
3292
|
+
function ku() {
|
|
3293
|
+
const [e, t] = v(!1), [n, r] = v(null), [s, o] = v(null), i = T(async (c) => {
|
|
3294
|
+
const u = c.replace(/\D/g, "");
|
|
3151
3295
|
if (u.length !== 8)
|
|
3152
3296
|
return r("CEP inválido."), null;
|
|
3153
3297
|
t(!0), r(null);
|
|
@@ -3159,121 +3303,121 @@ function Jl() {
|
|
|
3159
3303
|
} finally {
|
|
3160
3304
|
t(!1);
|
|
3161
3305
|
}
|
|
3162
|
-
}, []),
|
|
3306
|
+
}, []), a = T(() => {
|
|
3163
3307
|
t(!1), r(null), o(null);
|
|
3164
3308
|
}, []);
|
|
3165
|
-
return { loading: e, error: n, data: s, lookup: i, reset:
|
|
3309
|
+
return { loading: e, error: n, data: s, lookup: i, reset: a };
|
|
3166
3310
|
}
|
|
3167
|
-
function
|
|
3311
|
+
function fc(e) {
|
|
3168
3312
|
try {
|
|
3169
3313
|
return JSON.parse(e);
|
|
3170
3314
|
} catch {
|
|
3171
3315
|
return e;
|
|
3172
3316
|
}
|
|
3173
3317
|
}
|
|
3174
|
-
function
|
|
3318
|
+
function mc(e, t = {}) {
|
|
3175
3319
|
const {
|
|
3176
3320
|
protocols: n,
|
|
3177
3321
|
maxRetries: r = 10,
|
|
3178
3322
|
initialBackoff: s = 1e3,
|
|
3179
3323
|
maxBackoff: o = 3e4,
|
|
3180
3324
|
pingInterval: i = 0,
|
|
3181
|
-
pingPayload:
|
|
3182
|
-
parser:
|
|
3325
|
+
pingPayload: a = JSON.stringify({ type: "ping" }),
|
|
3326
|
+
parser: c = fc,
|
|
3183
3327
|
onOpen: u,
|
|
3184
3328
|
onMessage: d,
|
|
3185
3329
|
onClose: p,
|
|
3186
3330
|
onError: f,
|
|
3187
|
-
onStatusChange:
|
|
3331
|
+
onStatusChange: m
|
|
3188
3332
|
} = t;
|
|
3189
|
-
let _ = null,
|
|
3190
|
-
function
|
|
3191
|
-
$ !==
|
|
3333
|
+
let _ = null, h = null, w = null, b = 0, $ = "idle", N = !1;
|
|
3334
|
+
function I(C) {
|
|
3335
|
+
$ !== C && ($ = C, m?.(C));
|
|
3192
3336
|
}
|
|
3193
|
-
function
|
|
3337
|
+
function M() {
|
|
3194
3338
|
w && (clearInterval(w), w = null);
|
|
3195
3339
|
}
|
|
3196
|
-
function
|
|
3197
|
-
!i || i <= 0 || (
|
|
3198
|
-
_?.readyState === WebSocket.OPEN && _.send(
|
|
3340
|
+
function ye() {
|
|
3341
|
+
!i || i <= 0 || (M(), w = setInterval(() => {
|
|
3342
|
+
_?.readyState === WebSocket.OPEN && _.send(a);
|
|
3199
3343
|
}, i));
|
|
3200
3344
|
}
|
|
3201
|
-
function
|
|
3345
|
+
function be() {
|
|
3202
3346
|
if (N) return;
|
|
3203
3347
|
if (b >= r) {
|
|
3204
|
-
|
|
3348
|
+
I("error");
|
|
3205
3349
|
return;
|
|
3206
3350
|
}
|
|
3207
|
-
const
|
|
3208
|
-
b += 1,
|
|
3351
|
+
const C = Math.min(s * 2 ** b, o);
|
|
3352
|
+
b += 1, h = setTimeout(x, C);
|
|
3209
3353
|
}
|
|
3210
3354
|
function x() {
|
|
3211
3355
|
if (N) return;
|
|
3212
|
-
_ && (_.onopen = null, _.onmessage = null, _.onclose = null, _.onerror = null, _.close()),
|
|
3213
|
-
const
|
|
3214
|
-
_ =
|
|
3215
|
-
b = 0,
|
|
3216
|
-
},
|
|
3217
|
-
const
|
|
3356
|
+
_ && (_.onopen = null, _.onmessage = null, _.onclose = null, _.onerror = null, _.close()), I("connecting");
|
|
3357
|
+
const C = new WebSocket(e, n);
|
|
3358
|
+
_ = C, C.onopen = (P) => {
|
|
3359
|
+
b = 0, I("open"), ye(), u?.(P);
|
|
3360
|
+
}, C.onmessage = (P) => {
|
|
3361
|
+
const it = typeof P.data == "string" ? P.data : "";
|
|
3218
3362
|
d?.({
|
|
3219
|
-
data:
|
|
3363
|
+
data: c(it),
|
|
3220
3364
|
raw: P
|
|
3221
3365
|
});
|
|
3222
|
-
},
|
|
3366
|
+
}, C.onerror = (P) => {
|
|
3223
3367
|
f?.(P);
|
|
3224
|
-
},
|
|
3225
|
-
|
|
3368
|
+
}, C.onclose = (P) => {
|
|
3369
|
+
M(), p?.(P), _ = null, I("closed"), !N && !P.wasClean && be();
|
|
3226
3370
|
};
|
|
3227
3371
|
}
|
|
3228
|
-
function
|
|
3229
|
-
return _?.readyState !== WebSocket.OPEN ? !1 : (_.send(
|
|
3372
|
+
function D(C) {
|
|
3373
|
+
return _?.readyState !== WebSocket.OPEN ? !1 : (_.send(C), !0);
|
|
3230
3374
|
}
|
|
3231
|
-
function
|
|
3232
|
-
N = !0,
|
|
3375
|
+
function we(C, P) {
|
|
3376
|
+
N = !0, h && (clearTimeout(h), h = null), M(), b = 0, _ && (I("closing"), _.close(C, P), _ = null), I("closed");
|
|
3233
3377
|
}
|
|
3234
|
-
function
|
|
3235
|
-
|
|
3378
|
+
function ot() {
|
|
3379
|
+
h && (clearTimeout(h), h = null), b = 0, N = !1, x();
|
|
3236
3380
|
}
|
|
3237
3381
|
return x(), {
|
|
3238
|
-
send:
|
|
3239
|
-
close:
|
|
3240
|
-
reconnect:
|
|
3382
|
+
send: D,
|
|
3383
|
+
close: we,
|
|
3384
|
+
reconnect: ot,
|
|
3241
3385
|
get status() {
|
|
3242
3386
|
return $;
|
|
3243
3387
|
}
|
|
3244
3388
|
};
|
|
3245
3389
|
}
|
|
3246
|
-
function
|
|
3247
|
-
const { enabled: n = !0, onMessage: r, ...s } = t, [o, i] = v("idle"), [
|
|
3390
|
+
function Nu(e, t = {}) {
|
|
3391
|
+
const { enabled: n = !0, onMessage: r, ...s } = t, [o, i] = v("idle"), [a, c] = v(null), u = S(null), d = S(r);
|
|
3248
3392
|
d.current = r, k(() => {
|
|
3249
3393
|
if (!n || !e) {
|
|
3250
3394
|
i("idle");
|
|
3251
3395
|
return;
|
|
3252
3396
|
}
|
|
3253
|
-
const
|
|
3397
|
+
const m = mc(e, {
|
|
3254
3398
|
...s,
|
|
3255
3399
|
onStatusChange: i,
|
|
3256
3400
|
onMessage: (_) => {
|
|
3257
|
-
|
|
3401
|
+
c(_), d.current?.(_);
|
|
3258
3402
|
}
|
|
3259
3403
|
});
|
|
3260
|
-
return u.current =
|
|
3261
|
-
|
|
3404
|
+
return u.current = m, () => {
|
|
3405
|
+
m.close(), u.current = null;
|
|
3262
3406
|
};
|
|
3263
3407
|
}, [e, n]);
|
|
3264
|
-
const p =
|
|
3265
|
-
(
|
|
3408
|
+
const p = T(
|
|
3409
|
+
(m) => u.current?.send(m) ?? !1,
|
|
3266
3410
|
[]
|
|
3267
|
-
), f =
|
|
3411
|
+
), f = T(() => {
|
|
3268
3412
|
u.current?.reconnect();
|
|
3269
3413
|
}, []);
|
|
3270
|
-
return { status: o, lastMessage:
|
|
3414
|
+
return { status: o, lastMessage: a, send: p, reconnect: f };
|
|
3271
3415
|
}
|
|
3272
|
-
const
|
|
3273
|
-
function
|
|
3416
|
+
const Ye = oe(null);
|
|
3417
|
+
function We(e) {
|
|
3274
3418
|
return e === "dark" || e === "light" ? e : typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
3275
3419
|
}
|
|
3276
|
-
function
|
|
3420
|
+
function hc(e) {
|
|
3277
3421
|
if (!e || typeof window > "u") return null;
|
|
3278
3422
|
try {
|
|
3279
3423
|
const t = window.localStorage.getItem(e);
|
|
@@ -3282,7 +3426,7 @@ function Wa(e) {
|
|
|
3282
3426
|
return null;
|
|
3283
3427
|
}
|
|
3284
3428
|
}
|
|
3285
|
-
function
|
|
3429
|
+
function xu({
|
|
3286
3430
|
children: e,
|
|
3287
3431
|
defaultTheme: t = "system",
|
|
3288
3432
|
storageKey: n = "tempest-theme",
|
|
@@ -3290,44 +3434,44 @@ function Hl({
|
|
|
3290
3434
|
attribute: s = "data-tempest-theme"
|
|
3291
3435
|
}) {
|
|
3292
3436
|
const [o, i] = v(
|
|
3293
|
-
() =>
|
|
3294
|
-
), [
|
|
3437
|
+
() => hc(n) ?? t
|
|
3438
|
+
), [a, c] = v(() => We(o)), u = S(r);
|
|
3295
3439
|
u.current = r, k(() => {
|
|
3296
|
-
const
|
|
3297
|
-
if (!
|
|
3298
|
-
const _ =
|
|
3299
|
-
|
|
3440
|
+
const m = u.current?.() ?? document.documentElement;
|
|
3441
|
+
if (!m) return;
|
|
3442
|
+
const _ = We(o);
|
|
3443
|
+
m.setAttribute(s, _), c(_);
|
|
3300
3444
|
}, [o, s]), k(() => {
|
|
3301
3445
|
if (o !== "system" || typeof window > "u") return;
|
|
3302
|
-
const
|
|
3303
|
-
const
|
|
3304
|
-
|
|
3446
|
+
const m = window.matchMedia("(prefers-color-scheme: dark)"), _ = () => {
|
|
3447
|
+
const h = u.current?.() ?? document.documentElement, w = m.matches ? "dark" : "light";
|
|
3448
|
+
h?.setAttribute(s, w), c(w);
|
|
3305
3449
|
};
|
|
3306
|
-
return
|
|
3450
|
+
return m.addEventListener("change", _), () => m.removeEventListener("change", _);
|
|
3307
3451
|
}, [o, s]);
|
|
3308
|
-
const d =
|
|
3309
|
-
(
|
|
3310
|
-
if (i(
|
|
3452
|
+
const d = T(
|
|
3453
|
+
(m) => {
|
|
3454
|
+
if (i(m), n && typeof window < "u")
|
|
3311
3455
|
try {
|
|
3312
|
-
window.localStorage.setItem(n,
|
|
3456
|
+
window.localStorage.setItem(n, m);
|
|
3313
3457
|
} catch {
|
|
3314
3458
|
}
|
|
3315
3459
|
},
|
|
3316
3460
|
[n]
|
|
3317
|
-
), p =
|
|
3318
|
-
d(
|
|
3319
|
-
}, [
|
|
3320
|
-
() => ({ theme: o, resolvedTheme:
|
|
3321
|
-
[o,
|
|
3461
|
+
), p = T(() => {
|
|
3462
|
+
d(a === "dark" ? "light" : "dark");
|
|
3463
|
+
}, [a, d]), f = q(
|
|
3464
|
+
() => ({ theme: o, resolvedTheme: a, setTheme: d, toggle: p }),
|
|
3465
|
+
[o, a, d, p]
|
|
3322
3466
|
);
|
|
3323
|
-
return /* @__PURE__ */ l(
|
|
3467
|
+
return /* @__PURE__ */ l(Ye.Provider, { value: f, children: e });
|
|
3324
3468
|
}
|
|
3325
|
-
function
|
|
3326
|
-
const e = se(
|
|
3469
|
+
function Tu() {
|
|
3470
|
+
const e = se(Ye);
|
|
3327
3471
|
if (!e) throw new Error("useTheme must be used inside a <ThemeProvider>");
|
|
3328
3472
|
return e;
|
|
3329
3473
|
}
|
|
3330
|
-
function
|
|
3474
|
+
function Su(e = {}) {
|
|
3331
3475
|
const { storageKey: t = "tempest-theme", defaultTheme: n = "system" } = e;
|
|
3332
3476
|
if (typeof window > "u")
|
|
3333
3477
|
return n === "dark" ? "dark" : "light";
|
|
@@ -3340,7 +3484,7 @@ function Vl(e = {}) {
|
|
|
3340
3484
|
const s = r ?? n;
|
|
3341
3485
|
return s === "dark" || s === "light" ? s : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
3342
3486
|
}
|
|
3343
|
-
function
|
|
3487
|
+
function Eu(e = {}) {
|
|
3344
3488
|
const t = e.storageKey ?? "tempest-theme", n = e.defaultTheme ?? "system";
|
|
3345
3489
|
return `
|
|
3346
3490
|
(function(){try{
|
|
@@ -3353,13 +3497,13 @@ function Ql(e = {}) {
|
|
|
3353
3497
|
}catch(e){}})();
|
|
3354
3498
|
`.trim();
|
|
3355
3499
|
}
|
|
3356
|
-
function
|
|
3500
|
+
function ze(e, t) {
|
|
3357
3501
|
return t ? e.replace(/\{(\w+)\}/g, (n, r) => {
|
|
3358
3502
|
const s = t[r];
|
|
3359
3503
|
return s === void 0 ? `{${r}}` : String(s);
|
|
3360
3504
|
}) : e;
|
|
3361
3505
|
}
|
|
3362
|
-
function
|
|
3506
|
+
function xe(e, t, n, r) {
|
|
3363
3507
|
const s = e[t]?.[r];
|
|
3364
3508
|
if (s !== void 0) return s;
|
|
3365
3509
|
if (n) {
|
|
@@ -3368,21 +3512,21 @@ function Ne(e, t, n, r) {
|
|
|
3368
3512
|
}
|
|
3369
3513
|
return null;
|
|
3370
3514
|
}
|
|
3371
|
-
function
|
|
3515
|
+
function et(e) {
|
|
3372
3516
|
const { locale: t, fallbackLocale: n = null, messages: r } = e;
|
|
3373
|
-
function s(
|
|
3374
|
-
const d =
|
|
3375
|
-
return d === null ?
|
|
3517
|
+
function s(c, u) {
|
|
3518
|
+
const d = xe(r, t, n, c);
|
|
3519
|
+
return d === null ? c : ze(d, u);
|
|
3376
3520
|
}
|
|
3377
|
-
function o(
|
|
3378
|
-
const f =
|
|
3379
|
-
return f === null ?
|
|
3521
|
+
function o(c, u, d) {
|
|
3522
|
+
const f = xe(r, t, n, `${c}${u === 1 ? "_one" : "_other"}`) ?? xe(r, t, n, c);
|
|
3523
|
+
return f === null ? c : ze(f, { count: u, ...d ?? {} });
|
|
3380
3524
|
}
|
|
3381
|
-
function i(
|
|
3382
|
-
return new Intl.NumberFormat(t, u).format(
|
|
3525
|
+
function i(c, u) {
|
|
3526
|
+
return new Intl.NumberFormat(t, u).format(c);
|
|
3383
3527
|
}
|
|
3384
|
-
function c
|
|
3385
|
-
const d = typeof
|
|
3528
|
+
function a(c, u) {
|
|
3529
|
+
const d = typeof c == "string" ? new Date(c) : c;
|
|
3386
3530
|
return Number.isNaN(d.getTime()) ? "" : new Intl.DateTimeFormat(t, u).format(d);
|
|
3387
3531
|
}
|
|
3388
3532
|
return {
|
|
@@ -3391,16 +3535,16 @@ function He(e) {
|
|
|
3391
3535
|
t: s,
|
|
3392
3536
|
plural: o,
|
|
3393
3537
|
formatNumber: i,
|
|
3394
|
-
formatDate:
|
|
3395
|
-
withLocale: (
|
|
3396
|
-
locale:
|
|
3538
|
+
formatDate: a,
|
|
3539
|
+
withLocale: (c) => et({
|
|
3540
|
+
locale: c,
|
|
3397
3541
|
fallbackLocale: n ?? void 0,
|
|
3398
3542
|
messages: r
|
|
3399
3543
|
})
|
|
3400
3544
|
};
|
|
3401
3545
|
}
|
|
3402
|
-
const
|
|
3403
|
-
function
|
|
3546
|
+
const tt = oe(null);
|
|
3547
|
+
function _c(e, t) {
|
|
3404
3548
|
if (!e || typeof window > "u") return null;
|
|
3405
3549
|
try {
|
|
3406
3550
|
const n = window.localStorage.getItem(e);
|
|
@@ -3409,60 +3553,60 @@ function Ba(e, t) {
|
|
|
3409
3553
|
return null;
|
|
3410
3554
|
}
|
|
3411
3555
|
}
|
|
3412
|
-
function
|
|
3556
|
+
function Cu({
|
|
3413
3557
|
children: e,
|
|
3414
3558
|
locale: t,
|
|
3415
3559
|
fallbackLocale: n,
|
|
3416
3560
|
messages: r,
|
|
3417
3561
|
storageKey: s = "tempest-locale"
|
|
3418
3562
|
}) {
|
|
3419
|
-
const o =
|
|
3420
|
-
() =>
|
|
3563
|
+
const o = q(() => Object.keys(r), [r]), [i, a] = v(
|
|
3564
|
+
() => _c(s, o) ?? t
|
|
3421
3565
|
);
|
|
3422
3566
|
k(() => {
|
|
3423
3567
|
typeof document < "u" && document.documentElement.setAttribute("lang", i);
|
|
3424
3568
|
}, [i]);
|
|
3425
|
-
const
|
|
3569
|
+
const c = T(
|
|
3426
3570
|
(d) => {
|
|
3427
|
-
if (
|
|
3571
|
+
if (a(d), s && typeof window < "u")
|
|
3428
3572
|
try {
|
|
3429
3573
|
window.localStorage.setItem(s, d);
|
|
3430
3574
|
} catch {
|
|
3431
3575
|
}
|
|
3432
3576
|
},
|
|
3433
3577
|
[s]
|
|
3434
|
-
), u =
|
|
3435
|
-
return /* @__PURE__ */ l(
|
|
3578
|
+
), u = q(() => ({ ...et({ locale: i, fallbackLocale: n, messages: r }), setLocale: c, availableLocales: o }), [i, n, r, c, o]);
|
|
3579
|
+
return /* @__PURE__ */ l(tt.Provider, { value: u, children: e });
|
|
3436
3580
|
}
|
|
3437
|
-
function
|
|
3438
|
-
const e = se(
|
|
3581
|
+
function gc() {
|
|
3582
|
+
const e = se(tt);
|
|
3439
3583
|
if (!e) throw new Error("useI18n must be used inside an <I18nProvider>");
|
|
3440
3584
|
return e;
|
|
3441
3585
|
}
|
|
3442
|
-
function
|
|
3443
|
-
return
|
|
3586
|
+
function Lu() {
|
|
3587
|
+
return gc().t;
|
|
3444
3588
|
}
|
|
3445
|
-
const
|
|
3446
|
-
function
|
|
3447
|
-
return
|
|
3589
|
+
const je = ["debug", "info", "warn", "error"];
|
|
3590
|
+
function yc(e, t) {
|
|
3591
|
+
return je.indexOf(t) >= je.indexOf(e);
|
|
3448
3592
|
}
|
|
3449
|
-
const
|
|
3593
|
+
const bc = ({ level: e, message: t, context: n }) => {
|
|
3450
3594
|
const r = e === "debug" ? "log" : e;
|
|
3451
3595
|
n ? console[r](t, n) : console[r](t);
|
|
3452
3596
|
};
|
|
3453
|
-
function
|
|
3454
|
-
const t = e.level ?? "info", n = e.sinks ?? [
|
|
3455
|
-
function s(o, i,
|
|
3456
|
-
if (!
|
|
3457
|
-
const
|
|
3597
|
+
function wc(e = {}) {
|
|
3598
|
+
const t = e.level ?? "info", n = e.sinks ?? [bc], r = e.namespace ?? "";
|
|
3599
|
+
function s(o, i, a) {
|
|
3600
|
+
if (!yc(t, o)) return;
|
|
3601
|
+
const c = {
|
|
3458
3602
|
level: o,
|
|
3459
3603
|
message: r ? `[${r}] ${i}` : i,
|
|
3460
|
-
context:
|
|
3604
|
+
context: a,
|
|
3461
3605
|
timestamp: Date.now()
|
|
3462
3606
|
};
|
|
3463
3607
|
for (const u of n)
|
|
3464
3608
|
try {
|
|
3465
|
-
u(
|
|
3609
|
+
u(c);
|
|
3466
3610
|
} catch {
|
|
3467
3611
|
}
|
|
3468
3612
|
}
|
|
@@ -3471,25 +3615,25 @@ function qa(e = {}) {
|
|
|
3471
3615
|
info: (o, i) => s("info", o, i),
|
|
3472
3616
|
warn: (o, i) => s("warn", o, i),
|
|
3473
3617
|
error: (o, i) => s("error", o, i),
|
|
3474
|
-
child: (o) =>
|
|
3618
|
+
child: (o) => wc({
|
|
3475
3619
|
level: t,
|
|
3476
3620
|
sinks: n,
|
|
3477
3621
|
namespace: r ? `${r}:${o}` : o
|
|
3478
3622
|
})
|
|
3479
3623
|
};
|
|
3480
3624
|
}
|
|
3481
|
-
const
|
|
3482
|
-
function
|
|
3625
|
+
const nt = oe(null);
|
|
3626
|
+
function Iu({ adapter: e, children: t }) {
|
|
3483
3627
|
k(() => (e.init?.(), () => {
|
|
3484
3628
|
e.flush?.();
|
|
3485
3629
|
}), [e]);
|
|
3486
|
-
const n =
|
|
3487
|
-
return /* @__PURE__ */ l(
|
|
3630
|
+
const n = q(() => e, [e]);
|
|
3631
|
+
return /* @__PURE__ */ l(nt.Provider, { value: n, children: t });
|
|
3488
3632
|
}
|
|
3489
|
-
function
|
|
3490
|
-
return se(
|
|
3633
|
+
function Du() {
|
|
3634
|
+
return se(nt);
|
|
3491
3635
|
}
|
|
3492
|
-
const
|
|
3636
|
+
const Mu = {
|
|
3493
3637
|
identify(e) {
|
|
3494
3638
|
console.info("[telemetry] identify", e);
|
|
3495
3639
|
},
|
|
@@ -3500,7 +3644,7 @@ const tu = {
|
|
|
3500
3644
|
console.error("[telemetry] exception", e, t);
|
|
3501
3645
|
}
|
|
3502
3646
|
};
|
|
3503
|
-
function
|
|
3647
|
+
function vc(e) {
|
|
3504
3648
|
if (e === null) return null;
|
|
3505
3649
|
const { id: t, email: n, name: r, traits: s } = e;
|
|
3506
3650
|
return {
|
|
@@ -3510,14 +3654,14 @@ function Ja(e) {
|
|
|
3510
3654
|
...s ?? null
|
|
3511
3655
|
};
|
|
3512
3656
|
}
|
|
3513
|
-
function
|
|
3657
|
+
function Ru(e) {
|
|
3514
3658
|
const { sentry: t, initOptions: n, flushTimeout: r = 2e3, breadcrumbCategory: s = "app" } = e;
|
|
3515
3659
|
return {
|
|
3516
3660
|
init() {
|
|
3517
3661
|
n && t.init && t.init(n);
|
|
3518
3662
|
},
|
|
3519
3663
|
identify(o) {
|
|
3520
|
-
t.setUser(
|
|
3664
|
+
t.setUser(vc(o));
|
|
3521
3665
|
},
|
|
3522
3666
|
track(o) {
|
|
3523
3667
|
t.addBreadcrumb({
|
|
@@ -3535,7 +3679,7 @@ function nu(e) {
|
|
|
3535
3679
|
}
|
|
3536
3680
|
};
|
|
3537
3681
|
}
|
|
3538
|
-
function
|
|
3682
|
+
function $c(e) {
|
|
3539
3683
|
const { email: t, name: n, traits: r } = e;
|
|
3540
3684
|
return {
|
|
3541
3685
|
...t !== void 0 ? { email: t } : null,
|
|
@@ -3543,7 +3687,7 @@ function Ga(e) {
|
|
|
3543
3687
|
...r ?? null
|
|
3544
3688
|
};
|
|
3545
3689
|
}
|
|
3546
|
-
function
|
|
3690
|
+
function Pu(e) {
|
|
3547
3691
|
const { posthog: t, init: n } = e;
|
|
3548
3692
|
return {
|
|
3549
3693
|
init() {
|
|
@@ -3554,7 +3698,7 @@ function ru(e) {
|
|
|
3554
3698
|
t.reset?.();
|
|
3555
3699
|
return;
|
|
3556
3700
|
}
|
|
3557
|
-
r.id !== void 0 && t.identify(r.id,
|
|
3701
|
+
r.id !== void 0 && t.identify(r.id, $c(r));
|
|
3558
3702
|
},
|
|
3559
3703
|
track(r) {
|
|
3560
3704
|
t.capture(r.name, r.properties);
|
|
@@ -3574,28 +3718,28 @@ function ru(e) {
|
|
|
3574
3718
|
}
|
|
3575
3719
|
};
|
|
3576
3720
|
}
|
|
3577
|
-
const
|
|
3578
|
-
function
|
|
3579
|
-
const n =
|
|
3721
|
+
const rt = oe(null);
|
|
3722
|
+
function Au({ adapter: e, children: t }) {
|
|
3723
|
+
const n = q(() => e, [e]);
|
|
3580
3724
|
return k(() => {
|
|
3581
|
-
}, [n]), /* @__PURE__ */ l(
|
|
3725
|
+
}, [n]), /* @__PURE__ */ l(rt.Provider, { value: n, children: t });
|
|
3582
3726
|
}
|
|
3583
|
-
function
|
|
3584
|
-
const e = se(
|
|
3727
|
+
function st() {
|
|
3728
|
+
const e = se(rt);
|
|
3585
3729
|
if (!e) throw new Error("useFeatureFlag requires <FeatureFlagsProvider>");
|
|
3586
3730
|
return e;
|
|
3587
3731
|
}
|
|
3588
|
-
function
|
|
3589
|
-
const n =
|
|
3732
|
+
function Bu(e, t = !1) {
|
|
3733
|
+
const n = st(), r = (o) => n.onChange ? n.onChange(o) : () => {
|
|
3590
3734
|
}, s = () => n.isEnabled(e, t);
|
|
3591
|
-
return
|
|
3735
|
+
return qe(r, s, s);
|
|
3592
3736
|
}
|
|
3593
|
-
function
|
|
3594
|
-
const n =
|
|
3737
|
+
function Fu(e, t) {
|
|
3738
|
+
const n = st(), r = (o) => n.onChange ? n.onChange(o) : () => {
|
|
3595
3739
|
}, s = () => n.get(e, t);
|
|
3596
|
-
return
|
|
3740
|
+
return qe(r, s, s);
|
|
3597
3741
|
}
|
|
3598
|
-
function
|
|
3742
|
+
function Ou(e = {}) {
|
|
3599
3743
|
const t = { ...e.initial ?? {} }, n = /* @__PURE__ */ new Set();
|
|
3600
3744
|
function r() {
|
|
3601
3745
|
for (const s of n) s();
|
|
@@ -3615,7 +3759,7 @@ function au(e = {}) {
|
|
|
3615
3759
|
}
|
|
3616
3760
|
};
|
|
3617
3761
|
}
|
|
3618
|
-
function
|
|
3762
|
+
function Wu(e) {
|
|
3619
3763
|
const { growthbook: t } = e, n = /* @__PURE__ */ new Set();
|
|
3620
3764
|
let r = !1;
|
|
3621
3765
|
function s() {
|
|
@@ -3625,8 +3769,8 @@ function cu(e) {
|
|
|
3625
3769
|
}
|
|
3626
3770
|
return {
|
|
3627
3771
|
isEnabled(o, i = !1) {
|
|
3628
|
-
const
|
|
3629
|
-
return typeof
|
|
3772
|
+
const a = t.isOn(o);
|
|
3773
|
+
return typeof a == "boolean" ? a : i;
|
|
3630
3774
|
},
|
|
3631
3775
|
get(o, i) {
|
|
3632
3776
|
return t.getFeatureValue(o, i);
|
|
@@ -3638,7 +3782,7 @@ function cu(e) {
|
|
|
3638
3782
|
}
|
|
3639
3783
|
};
|
|
3640
3784
|
}
|
|
3641
|
-
function
|
|
3785
|
+
function zu(e) {
|
|
3642
3786
|
const { client: t } = e;
|
|
3643
3787
|
return {
|
|
3644
3788
|
isEnabled(n, r = !1) {
|
|
@@ -3655,7 +3799,7 @@ function lu(e) {
|
|
|
3655
3799
|
}
|
|
3656
3800
|
};
|
|
3657
3801
|
}
|
|
3658
|
-
async function
|
|
3802
|
+
async function ju(e) {
|
|
3659
3803
|
if (typeof navigator > "u" || !("share" in navigator))
|
|
3660
3804
|
return { shared: !1, unsupported: !0, cancelled: !1 };
|
|
3661
3805
|
if (e.files && !navigator.canShare?.({ files: e.files }))
|
|
@@ -3666,10 +3810,10 @@ async function uu(e) {
|
|
|
3666
3810
|
return t instanceof DOMException && t.name === "AbortError" ? { shared: !1, unsupported: !1, cancelled: !0 } : { shared: !1, unsupported: !1, cancelled: !1, error: t };
|
|
3667
3811
|
}
|
|
3668
3812
|
}
|
|
3669
|
-
function
|
|
3813
|
+
function Uu() {
|
|
3670
3814
|
return typeof navigator < "u" && "share" in navigator;
|
|
3671
3815
|
}
|
|
3672
|
-
const
|
|
3816
|
+
const qu = {
|
|
3673
3817
|
get(e, t) {
|
|
3674
3818
|
if (typeof window > "u") return t;
|
|
3675
3819
|
try {
|
|
@@ -3695,149 +3839,153 @@ const pu = {
|
|
|
3695
3839
|
}
|
|
3696
3840
|
};
|
|
3697
3841
|
export {
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3842
|
+
Ic as Alert,
|
|
3843
|
+
jl as AuthGuard,
|
|
3844
|
+
Dc as Avatar,
|
|
3845
|
+
Se as BREAKPOINTS,
|
|
3846
|
+
Mc as Badge,
|
|
3847
|
+
Rc as Breadcrumbs,
|
|
3848
|
+
Te as Button,
|
|
3849
|
+
Za as CACHE_TIME,
|
|
3850
|
+
vu as CEPInput,
|
|
3851
|
+
bu as CNPJInput,
|
|
3852
|
+
yu as CPFInput,
|
|
3853
|
+
Pc as Card,
|
|
3854
|
+
Ac as Checkbox,
|
|
3855
|
+
Bc as ChipInput,
|
|
3856
|
+
Fc as ConfirmDialog,
|
|
3857
|
+
Vc as Container,
|
|
3858
|
+
Oc as DatePicker,
|
|
3859
|
+
Wc as Divider,
|
|
3860
|
+
zc as Drawer,
|
|
3861
|
+
jc as EmptyState,
|
|
3862
|
+
au as ErrorBoundary,
|
|
3863
|
+
Uc as ErrorState,
|
|
3864
|
+
Au as FeatureFlagsProvider,
|
|
3865
|
+
qc as FileUpload,
|
|
3866
|
+
Gc as Form,
|
|
3867
|
+
Kc as FormActions,
|
|
3868
|
+
Hc as FormRow,
|
|
3869
|
+
Jc as FormSection,
|
|
3870
|
+
Xc as Grid,
|
|
3871
|
+
sl as Hide,
|
|
3872
|
+
Cu as I18nProvider,
|
|
3873
|
+
Ie as Input,
|
|
3874
|
+
Zc as Kbd,
|
|
3875
|
+
Nr as Modal,
|
|
3876
|
+
$u as MoneyInput,
|
|
3877
|
+
Yc as Pagination,
|
|
3878
|
+
wu as PhoneInput,
|
|
3879
|
+
el as Progress,
|
|
3880
|
+
Kl as QueryProvider,
|
|
3881
|
+
Jl as REFETCH_TIME,
|
|
3882
|
+
tl as Radio,
|
|
3883
|
+
nl as RadioGroup,
|
|
3884
|
+
Xa as STALE_TIME,
|
|
3885
|
+
ol as SearchBar,
|
|
3886
|
+
il as Select,
|
|
3887
|
+
rl as Show,
|
|
3888
|
+
al as Skeleton,
|
|
3889
|
+
cl as Spinner,
|
|
3890
|
+
Qc as Stack,
|
|
3891
|
+
ll as Stepper,
|
|
3892
|
+
ul as Switch,
|
|
3893
|
+
dl as Table,
|
|
3894
|
+
pl as Tabs,
|
|
3895
|
+
Iu as TelemetryProvider,
|
|
3896
|
+
fl as Textarea,
|
|
3897
|
+
xu as ThemeProvider,
|
|
3898
|
+
_l as ToastProvider,
|
|
3899
|
+
ml as Tooltip,
|
|
3900
|
+
gl as VirtualList,
|
|
3901
|
+
rc as WebPushClient,
|
|
3902
|
+
nc as WebPushPermissionDeniedError,
|
|
3903
|
+
Oe as WebPushUnsupportedError,
|
|
3757
3904
|
g as cn,
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3905
|
+
bc as consoleSink,
|
|
3906
|
+
Mu as consoleTelemetryAdapter,
|
|
3907
|
+
Pl as createApiClient,
|
|
3908
|
+
Xe as createAudioPlayer,
|
|
3909
|
+
zl as createAuthStore,
|
|
3910
|
+
ec as createEventStream,
|
|
3911
|
+
Wu as createGrowthBookFeatureFlagsAdapter,
|
|
3912
|
+
et as createI18n,
|
|
3913
|
+
Ou as createInMemoryFlags,
|
|
3914
|
+
zu as createLaunchDarklyFeatureFlagsAdapter,
|
|
3915
|
+
wc as createLogger,
|
|
3916
|
+
iu as createOfflineStore,
|
|
3917
|
+
Pu as createPostHogTelemetryAdapter,
|
|
3918
|
+
Hl as createQueryKeys,
|
|
3919
|
+
Gl as createRefreshQueue,
|
|
3920
|
+
Ru as createSentryTelemetryAdapter,
|
|
3921
|
+
mc as createWebSocket,
|
|
3922
|
+
Qa as decodeJWT,
|
|
3923
|
+
ac as formatCEP,
|
|
3924
|
+
cc as formatCNPJ,
|
|
3925
|
+
uc as formatCPF,
|
|
3926
|
+
mu as formatCurrency,
|
|
3927
|
+
hu as formatDate,
|
|
3928
|
+
_u as formatDateTime,
|
|
3929
|
+
gu as formatPercent,
|
|
3930
|
+
lc as formatPhone,
|
|
3931
|
+
Ol as generateIdempotencyKey,
|
|
3932
|
+
Su as getInitialTheme,
|
|
3933
|
+
tu as installNotificationClickHandler,
|
|
3934
|
+
eu as installPushHandler,
|
|
3935
|
+
nu as installSkipWaitingListener,
|
|
3936
|
+
Ul as isJWTExpired,
|
|
3937
|
+
me as isPushSupported,
|
|
3938
|
+
Uu as isShareSupported,
|
|
3939
|
+
ql as lazyWithRetry,
|
|
3940
|
+
Al as parseResponse,
|
|
3941
|
+
ru as playAudio,
|
|
3942
|
+
Xl as registerServiceWorker,
|
|
3943
|
+
Fl as retry,
|
|
3944
|
+
ju as share,
|
|
3945
|
+
Zl as skipWaiting,
|
|
3946
|
+
su as stopAudio,
|
|
3947
|
+
qu as storage,
|
|
3948
|
+
Eu as themeInitScript,
|
|
3949
|
+
fu as unmask,
|
|
3950
|
+
Yl as unregisterAllServiceWorkers,
|
|
3951
|
+
Bl as uploadWithProgress,
|
|
3952
|
+
tc as urlBase64ToUint8Array,
|
|
3953
|
+
ou as useAudio,
|
|
3954
|
+
El as useBeforeInstallPrompt,
|
|
3955
|
+
de as useBreakpoint,
|
|
3956
|
+
wl as useClientFilter,
|
|
3957
|
+
Tl as useClipboard,
|
|
3958
|
+
yl as useDebounce,
|
|
3959
|
+
Rl as useDeepMemo,
|
|
3960
|
+
kl as useDocumentVisibility,
|
|
3961
|
+
cu as useErrorHandler,
|
|
3962
|
+
Vl as useEventStream,
|
|
3963
|
+
Bu as useFeatureFlag,
|
|
3964
|
+
Fu as useFlagValue,
|
|
3965
|
+
Dl as useFocusTrap,
|
|
3966
|
+
Ll as useGeolocation,
|
|
3967
|
+
gc as useI18n,
|
|
3968
|
+
Cl as useIdle,
|
|
3969
|
+
Nl as useIntersectionObserver,
|
|
3970
|
+
Sl as useKeyboardShortcut,
|
|
3971
|
+
vl as useMediaQuery,
|
|
3972
|
+
$l as useOnline,
|
|
3973
|
+
bl as usePagination,
|
|
3974
|
+
Wl as usePoll,
|
|
3975
|
+
Ql as usePushSubscription,
|
|
3976
|
+
xl as useResizeObserver,
|
|
3977
|
+
Il as useScrollLock,
|
|
3978
|
+
Ml as useStableCallback,
|
|
3979
|
+
Du as useTelemetry,
|
|
3980
|
+
Tu as useTheme,
|
|
3981
|
+
hl as useToast,
|
|
3982
|
+
Lu as useTranslate,
|
|
3983
|
+
ku as useViaCEP,
|
|
3984
|
+
Nu as useWebSocket,
|
|
3985
|
+
uu as useZodForm,
|
|
3986
|
+
pu as validateCNPJ,
|
|
3987
|
+
du as validateCPF,
|
|
3988
|
+
lu as validateForm,
|
|
3989
|
+
ic as zodResolver
|
|
3842
3990
|
};
|
|
3843
3991
|
//# sourceMappingURL=tempest-react-sdk.js.map
|