@web-site-utilities/feedback 0.0.1
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/LICENSE +551 -0
- package/README.md +3 -0
- package/dist/common/components/Button.d.ts +7 -0
- package/dist/common/components/Checkbox.d.ts +50 -0
- package/dist/common/components/ErrorMessage.d.ts +9 -0
- package/dist/common/components/Modal.d.ts +23 -0
- package/dist/common/components/QuestionMatrix.d.ts +40 -0
- package/dist/common/components/Radio.d.ts +51 -0
- package/dist/common/components/RangeSlide.d.ts +39 -0
- package/dist/common/components/Rating.d.ts +35 -0
- package/dist/common/components/Select.d.ts +39 -0
- package/dist/common/components/Step.d.ts +15 -0
- package/dist/common/components/StepsProgress.d.ts +17 -0
- package/dist/common/components/TextInput.d.ts +30 -0
- package/dist/common/components/Textarea.d.ts +27 -0
- package/dist/common/components/Typography.d.ts +13 -0
- package/dist/common/hooks/useForm.d.ts +21 -0
- package/dist/common/hooks/useStepper.d.ts +17 -0
- package/dist/common/theme/ThemeProvider.d.ts +114 -0
- package/dist/common/types/CommonFieldProps.d.ts +6 -0
- package/dist/common/types/FormConfig.d.ts +129 -0
- package/dist/common/types/FormError.d.ts +4 -0
- package/dist/common/types/Locale.d.ts +1 -0
- package/dist/common/types/Nullable.d.ts +1 -0
- package/dist/common/types/Option.d.ts +5 -0
- package/dist/common/types/ValidationPerStep.d.ts +6 -0
- package/dist/common/types/isNil.d.ts +2 -0
- package/dist/fields/Field/Field.d.ts +65 -0
- package/dist/form/App.d.ts +12 -0
- package/dist/form/api/baseApi.d.ts +8 -0
- package/dist/form/api/getFormConf.d.ts +8 -0
- package/dist/form/api/saveForm.d.ts +2 -0
- package/dist/form/api/useRequest.d.ts +7 -0
- package/dist/form/components/FeedbackInput/FeedbackInput.d.ts +12 -0
- package/dist/form/features/InPlaceForm/InPlaceForm.d.ts +31 -0
- package/dist/form/features/PopupForm/PopupForm.d.ts +10 -0
- package/dist/form/index.d.ts +10 -0
- package/dist/form/index.dev.d.ts +1 -0
- package/dist/form/types/InitiateFeedbackModuleOptions.d.ts +8 -0
- package/dist/index.cjs.js +148 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.es.js +3207 -0
- package/dist/index.iife.js +148 -0
- package/package.json +71 -0
- package/tsconfig.json +29 -0
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,3207 @@
|
|
|
1
|
+
import l, { useMemo as se, createElement as co, useContext as uo, useState as Ue, useEffect as We, useRef as br, useCallback as xe, Fragment as fo } from "react";
|
|
2
|
+
import mo from "react-dom";
|
|
3
|
+
var vt = {}, Hn;
|
|
4
|
+
function ho() {
|
|
5
|
+
if (Hn) return vt;
|
|
6
|
+
Hn = 1;
|
|
7
|
+
var e = mo;
|
|
8
|
+
return vt.createRoot = e.createRoot, vt.hydrateRoot = e.hydrateRoot, vt;
|
|
9
|
+
}
|
|
10
|
+
var po = ho(), V = function() {
|
|
11
|
+
return V = Object.assign || function(t) {
|
|
12
|
+
for (var n, r = 1, o = arguments.length; r < o; r++) {
|
|
13
|
+
n = arguments[r];
|
|
14
|
+
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
|
|
15
|
+
}
|
|
16
|
+
return t;
|
|
17
|
+
}, V.apply(this, arguments);
|
|
18
|
+
};
|
|
19
|
+
function Ot(e, t, n) {
|
|
20
|
+
if (n || arguments.length === 2) for (var r = 0, o = t.length, i; r < o; r++)
|
|
21
|
+
(i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
|
|
22
|
+
return e.concat(i || Array.prototype.slice.call(t));
|
|
23
|
+
}
|
|
24
|
+
var k = "-ms-", ut = "-moz-", C = "-webkit-", yr = "comm", Lt = "rule", En = "decl", go = "@import", vr = "@keyframes", bo = "@layer", Er = Math.abs, Sn = String.fromCharCode, dn = Object.assign;
|
|
25
|
+
function yo(e, t) {
|
|
26
|
+
return B(e, 0) ^ 45 ? (((t << 2 ^ B(e, 0)) << 2 ^ B(e, 1)) << 2 ^ B(e, 2)) << 2 ^ B(e, 3) : 0;
|
|
27
|
+
}
|
|
28
|
+
function Sr(e) {
|
|
29
|
+
return e.trim();
|
|
30
|
+
}
|
|
31
|
+
function me(e, t) {
|
|
32
|
+
return (e = t.exec(e)) ? e[0] : e;
|
|
33
|
+
}
|
|
34
|
+
function g(e, t, n) {
|
|
35
|
+
return e.replace(t, n);
|
|
36
|
+
}
|
|
37
|
+
function Ct(e, t, n) {
|
|
38
|
+
return e.indexOf(t, n);
|
|
39
|
+
}
|
|
40
|
+
function B(e, t) {
|
|
41
|
+
return e.charCodeAt(t) | 0;
|
|
42
|
+
}
|
|
43
|
+
function He(e, t, n) {
|
|
44
|
+
return e.slice(t, n);
|
|
45
|
+
}
|
|
46
|
+
function ie(e) {
|
|
47
|
+
return e.length;
|
|
48
|
+
}
|
|
49
|
+
function Tr(e) {
|
|
50
|
+
return e.length;
|
|
51
|
+
}
|
|
52
|
+
function lt(e, t) {
|
|
53
|
+
return t.push(e), e;
|
|
54
|
+
}
|
|
55
|
+
function vo(e, t) {
|
|
56
|
+
return e.map(t).join("");
|
|
57
|
+
}
|
|
58
|
+
function Vn(e, t) {
|
|
59
|
+
return e.filter(function(n) {
|
|
60
|
+
return !me(n, t);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
var Mt = 1, Ve = 1, wr = 0, Z = 0, F = 0, qe = "";
|
|
64
|
+
function Ft(e, t, n, r, o, i, s, d) {
|
|
65
|
+
return { value: e, root: t, parent: n, type: r, props: o, children: i, line: Mt, column: Ve, length: s, return: "", siblings: d };
|
|
66
|
+
}
|
|
67
|
+
function ye(e, t) {
|
|
68
|
+
return dn(Ft("", null, null, "", null, null, 0, e.siblings), e, { length: -e.length }, t);
|
|
69
|
+
}
|
|
70
|
+
function ze(e) {
|
|
71
|
+
for (; e.root; )
|
|
72
|
+
e = ye(e.root, { children: [e] });
|
|
73
|
+
lt(e, e.siblings);
|
|
74
|
+
}
|
|
75
|
+
function Eo() {
|
|
76
|
+
return F;
|
|
77
|
+
}
|
|
78
|
+
function So() {
|
|
79
|
+
return F = Z > 0 ? B(qe, --Z) : 0, Ve--, F === 10 && (Ve = 1, Mt--), F;
|
|
80
|
+
}
|
|
81
|
+
function oe() {
|
|
82
|
+
return F = Z < wr ? B(qe, Z++) : 0, Ve++, F === 10 && (Ve = 1, Mt++), F;
|
|
83
|
+
}
|
|
84
|
+
function Ce() {
|
|
85
|
+
return B(qe, Z);
|
|
86
|
+
}
|
|
87
|
+
function At() {
|
|
88
|
+
return Z;
|
|
89
|
+
}
|
|
90
|
+
function zt(e, t) {
|
|
91
|
+
return He(qe, e, t);
|
|
92
|
+
}
|
|
93
|
+
function fn(e) {
|
|
94
|
+
switch (e) {
|
|
95
|
+
// \0 \t \n \r \s whitespace token
|
|
96
|
+
case 0:
|
|
97
|
+
case 9:
|
|
98
|
+
case 10:
|
|
99
|
+
case 13:
|
|
100
|
+
case 32:
|
|
101
|
+
return 5;
|
|
102
|
+
// ! + , / > @ ~ isolate token
|
|
103
|
+
case 33:
|
|
104
|
+
case 43:
|
|
105
|
+
case 44:
|
|
106
|
+
case 47:
|
|
107
|
+
case 62:
|
|
108
|
+
case 64:
|
|
109
|
+
case 126:
|
|
110
|
+
// ; { } breakpoint token
|
|
111
|
+
case 59:
|
|
112
|
+
case 123:
|
|
113
|
+
case 125:
|
|
114
|
+
return 4;
|
|
115
|
+
// : accompanied token
|
|
116
|
+
case 58:
|
|
117
|
+
return 3;
|
|
118
|
+
// " ' ( [ opening delimit token
|
|
119
|
+
case 34:
|
|
120
|
+
case 39:
|
|
121
|
+
case 40:
|
|
122
|
+
case 91:
|
|
123
|
+
return 2;
|
|
124
|
+
// ) ] closing delimit token
|
|
125
|
+
case 41:
|
|
126
|
+
case 93:
|
|
127
|
+
return 1;
|
|
128
|
+
}
|
|
129
|
+
return 0;
|
|
130
|
+
}
|
|
131
|
+
function To(e) {
|
|
132
|
+
return Mt = Ve = 1, wr = ie(qe = e), Z = 0, [];
|
|
133
|
+
}
|
|
134
|
+
function wo(e) {
|
|
135
|
+
return qe = "", e;
|
|
136
|
+
}
|
|
137
|
+
function en(e) {
|
|
138
|
+
return Sr(zt(Z - 1, mn(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
|
|
139
|
+
}
|
|
140
|
+
function xo(e) {
|
|
141
|
+
for (; (F = Ce()) && F < 33; )
|
|
142
|
+
oe();
|
|
143
|
+
return fn(e) > 2 || fn(F) > 3 ? "" : " ";
|
|
144
|
+
}
|
|
145
|
+
function Co(e, t) {
|
|
146
|
+
for (; --t && oe() && !(F < 48 || F > 102 || F > 57 && F < 65 || F > 70 && F < 97); )
|
|
147
|
+
;
|
|
148
|
+
return zt(e, At() + (t < 6 && Ce() == 32 && oe() == 32));
|
|
149
|
+
}
|
|
150
|
+
function mn(e) {
|
|
151
|
+
for (; oe(); )
|
|
152
|
+
switch (F) {
|
|
153
|
+
// ] ) " '
|
|
154
|
+
case e:
|
|
155
|
+
return Z;
|
|
156
|
+
// " '
|
|
157
|
+
case 34:
|
|
158
|
+
case 39:
|
|
159
|
+
e !== 34 && e !== 39 && mn(F);
|
|
160
|
+
break;
|
|
161
|
+
// (
|
|
162
|
+
case 40:
|
|
163
|
+
e === 41 && mn(e);
|
|
164
|
+
break;
|
|
165
|
+
// \
|
|
166
|
+
case 92:
|
|
167
|
+
oe();
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
return Z;
|
|
171
|
+
}
|
|
172
|
+
function Ao(e, t) {
|
|
173
|
+
for (; oe() && e + F !== 57; )
|
|
174
|
+
if (e + F === 84 && Ce() === 47)
|
|
175
|
+
break;
|
|
176
|
+
return "/*" + zt(t, Z - 1) + "*" + Sn(e === 47 ? e : oe());
|
|
177
|
+
}
|
|
178
|
+
function _o(e) {
|
|
179
|
+
for (; !fn(Ce()); )
|
|
180
|
+
oe();
|
|
181
|
+
return zt(e, Z);
|
|
182
|
+
}
|
|
183
|
+
function Io(e) {
|
|
184
|
+
return wo(_t("", null, null, null, [""], e = To(e), 0, [0], e));
|
|
185
|
+
}
|
|
186
|
+
function _t(e, t, n, r, o, i, s, d, u) {
|
|
187
|
+
for (var m = 0, p = 0, T = s, w = 0, v = 0, A = 0, $ = 1, G = 1, D = 1, O = 0, _ = "", b = o, R = i, x = r, y = _; G; )
|
|
188
|
+
switch (A = O, O = oe()) {
|
|
189
|
+
// (
|
|
190
|
+
case 40:
|
|
191
|
+
if (A != 108 && B(y, T - 1) == 58) {
|
|
192
|
+
Ct(y += g(en(O), "&", "&\f"), "&\f", Er(m ? d[m - 1] : 0)) != -1 && (D = -1);
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
// " ' [
|
|
196
|
+
case 34:
|
|
197
|
+
case 39:
|
|
198
|
+
case 91:
|
|
199
|
+
y += en(O);
|
|
200
|
+
break;
|
|
201
|
+
// \t \n \r \s
|
|
202
|
+
case 9:
|
|
203
|
+
case 10:
|
|
204
|
+
case 13:
|
|
205
|
+
case 32:
|
|
206
|
+
y += xo(A);
|
|
207
|
+
break;
|
|
208
|
+
// \
|
|
209
|
+
case 92:
|
|
210
|
+
y += Co(At() - 1, 7);
|
|
211
|
+
continue;
|
|
212
|
+
// /
|
|
213
|
+
case 47:
|
|
214
|
+
switch (Ce()) {
|
|
215
|
+
case 42:
|
|
216
|
+
case 47:
|
|
217
|
+
lt(Ro(Ao(oe(), At()), t, n, u), u);
|
|
218
|
+
break;
|
|
219
|
+
default:
|
|
220
|
+
y += "/";
|
|
221
|
+
}
|
|
222
|
+
break;
|
|
223
|
+
// {
|
|
224
|
+
case 123 * $:
|
|
225
|
+
d[m++] = ie(y) * D;
|
|
226
|
+
// } ; \0
|
|
227
|
+
case 125 * $:
|
|
228
|
+
case 59:
|
|
229
|
+
case 0:
|
|
230
|
+
switch (O) {
|
|
231
|
+
// \0 }
|
|
232
|
+
case 0:
|
|
233
|
+
case 125:
|
|
234
|
+
G = 0;
|
|
235
|
+
// ;
|
|
236
|
+
case 59 + p:
|
|
237
|
+
D == -1 && (y = g(y, /\f/g, "")), v > 0 && ie(y) - T && lt(v > 32 ? jn(y + ";", r, n, T - 1, u) : jn(g(y, " ", "") + ";", r, n, T - 2, u), u);
|
|
238
|
+
break;
|
|
239
|
+
// @ ;
|
|
240
|
+
case 59:
|
|
241
|
+
y += ";";
|
|
242
|
+
// { rule/at-rule
|
|
243
|
+
default:
|
|
244
|
+
if (lt(x = Gn(y, t, n, m, p, o, d, _, b = [], R = [], T, i), i), O === 123)
|
|
245
|
+
if (p === 0)
|
|
246
|
+
_t(y, t, x, x, b, i, T, d, R);
|
|
247
|
+
else
|
|
248
|
+
switch (w === 99 && B(y, 3) === 110 ? 100 : w) {
|
|
249
|
+
// d l m s
|
|
250
|
+
case 100:
|
|
251
|
+
case 108:
|
|
252
|
+
case 109:
|
|
253
|
+
case 115:
|
|
254
|
+
_t(e, x, x, r && lt(Gn(e, x, x, 0, 0, o, d, _, o, b = [], T, R), R), o, R, T, d, r ? b : R);
|
|
255
|
+
break;
|
|
256
|
+
default:
|
|
257
|
+
_t(y, x, x, x, [""], R, 0, d, R);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
m = p = v = 0, $ = D = 1, _ = y = "", T = s;
|
|
261
|
+
break;
|
|
262
|
+
// :
|
|
263
|
+
case 58:
|
|
264
|
+
T = 1 + ie(y), v = A;
|
|
265
|
+
default:
|
|
266
|
+
if ($ < 1) {
|
|
267
|
+
if (O == 123)
|
|
268
|
+
--$;
|
|
269
|
+
else if (O == 125 && $++ == 0 && So() == 125)
|
|
270
|
+
continue;
|
|
271
|
+
}
|
|
272
|
+
switch (y += Sn(O), O * $) {
|
|
273
|
+
// &
|
|
274
|
+
case 38:
|
|
275
|
+
D = p > 0 ? 1 : (y += "\f", -1);
|
|
276
|
+
break;
|
|
277
|
+
// ,
|
|
278
|
+
case 44:
|
|
279
|
+
d[m++] = (ie(y) - 1) * D, D = 1;
|
|
280
|
+
break;
|
|
281
|
+
// @
|
|
282
|
+
case 64:
|
|
283
|
+
Ce() === 45 && (y += en(oe())), w = Ce(), p = T = ie(_ = y += _o(At())), O++;
|
|
284
|
+
break;
|
|
285
|
+
// -
|
|
286
|
+
case 45:
|
|
287
|
+
A === 45 && ie(y) == 2 && ($ = 0);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
return i;
|
|
291
|
+
}
|
|
292
|
+
function Gn(e, t, n, r, o, i, s, d, u, m, p, T) {
|
|
293
|
+
for (var w = o - 1, v = o === 0 ? i : [""], A = Tr(v), $ = 0, G = 0, D = 0; $ < r; ++$)
|
|
294
|
+
for (var O = 0, _ = He(e, w + 1, w = Er(G = s[$])), b = e; O < A; ++O)
|
|
295
|
+
(b = Sr(G > 0 ? v[O] + " " + _ : g(_, /&\f/g, v[O]))) && (u[D++] = b);
|
|
296
|
+
return Ft(e, t, n, o === 0 ? Lt : d, u, m, p, T);
|
|
297
|
+
}
|
|
298
|
+
function Ro(e, t, n, r) {
|
|
299
|
+
return Ft(e, t, n, yr, Sn(Eo()), He(e, 2, -2), 0, r);
|
|
300
|
+
}
|
|
301
|
+
function jn(e, t, n, r, o) {
|
|
302
|
+
return Ft(e, t, n, En, He(e, 0, r), He(e, r + 1, -1), r, o);
|
|
303
|
+
}
|
|
304
|
+
function xr(e, t, n) {
|
|
305
|
+
switch (yo(e, t)) {
|
|
306
|
+
// color-adjust
|
|
307
|
+
case 5103:
|
|
308
|
+
return C + "print-" + e + e;
|
|
309
|
+
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
|
|
310
|
+
case 5737:
|
|
311
|
+
case 4201:
|
|
312
|
+
case 3177:
|
|
313
|
+
case 3433:
|
|
314
|
+
case 1641:
|
|
315
|
+
case 4457:
|
|
316
|
+
case 2921:
|
|
317
|
+
// text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
|
|
318
|
+
case 5572:
|
|
319
|
+
case 6356:
|
|
320
|
+
case 5844:
|
|
321
|
+
case 3191:
|
|
322
|
+
case 6645:
|
|
323
|
+
case 3005:
|
|
324
|
+
// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
|
|
325
|
+
case 6391:
|
|
326
|
+
case 5879:
|
|
327
|
+
case 5623:
|
|
328
|
+
case 6135:
|
|
329
|
+
case 4599:
|
|
330
|
+
case 4855:
|
|
331
|
+
// background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
|
|
332
|
+
case 4215:
|
|
333
|
+
case 6389:
|
|
334
|
+
case 5109:
|
|
335
|
+
case 5365:
|
|
336
|
+
case 5621:
|
|
337
|
+
case 3829:
|
|
338
|
+
return C + e + e;
|
|
339
|
+
// tab-size
|
|
340
|
+
case 4789:
|
|
341
|
+
return ut + e + e;
|
|
342
|
+
// appearance, user-select, transform, hyphens, text-size-adjust
|
|
343
|
+
case 5349:
|
|
344
|
+
case 4246:
|
|
345
|
+
case 4810:
|
|
346
|
+
case 6968:
|
|
347
|
+
case 2756:
|
|
348
|
+
return C + e + ut + e + k + e + e;
|
|
349
|
+
// writing-mode
|
|
350
|
+
case 5936:
|
|
351
|
+
switch (B(e, t + 11)) {
|
|
352
|
+
// vertical-l(r)
|
|
353
|
+
case 114:
|
|
354
|
+
return C + e + k + g(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
|
|
355
|
+
// vertical-r(l)
|
|
356
|
+
case 108:
|
|
357
|
+
return C + e + k + g(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
|
|
358
|
+
// horizontal(-)tb
|
|
359
|
+
case 45:
|
|
360
|
+
return C + e + k + g(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
|
|
361
|
+
}
|
|
362
|
+
// flex, flex-direction, scroll-snap-type, writing-mode
|
|
363
|
+
case 6828:
|
|
364
|
+
case 4268:
|
|
365
|
+
case 2903:
|
|
366
|
+
return C + e + k + e + e;
|
|
367
|
+
// order
|
|
368
|
+
case 6165:
|
|
369
|
+
return C + e + k + "flex-" + e + e;
|
|
370
|
+
// align-items
|
|
371
|
+
case 5187:
|
|
372
|
+
return C + e + g(e, /(\w+).+(:[^]+)/, C + "box-$1$2" + k + "flex-$1$2") + e;
|
|
373
|
+
// align-self
|
|
374
|
+
case 5443:
|
|
375
|
+
return C + e + k + "flex-item-" + g(e, /flex-|-self/g, "") + (me(e, /flex-|baseline/) ? "" : k + "grid-row-" + g(e, /flex-|-self/g, "")) + e;
|
|
376
|
+
// align-content
|
|
377
|
+
case 4675:
|
|
378
|
+
return C + e + k + "flex-line-pack" + g(e, /align-content|flex-|-self/g, "") + e;
|
|
379
|
+
// flex-shrink
|
|
380
|
+
case 5548:
|
|
381
|
+
return C + e + k + g(e, "shrink", "negative") + e;
|
|
382
|
+
// flex-basis
|
|
383
|
+
case 5292:
|
|
384
|
+
return C + e + k + g(e, "basis", "preferred-size") + e;
|
|
385
|
+
// flex-grow
|
|
386
|
+
case 6060:
|
|
387
|
+
return C + "box-" + g(e, "-grow", "") + C + e + k + g(e, "grow", "positive") + e;
|
|
388
|
+
// transition
|
|
389
|
+
case 4554:
|
|
390
|
+
return C + g(e, /([^-])(transform)/g, "$1" + C + "$2") + e;
|
|
391
|
+
// cursor
|
|
392
|
+
case 6187:
|
|
393
|
+
return g(g(g(e, /(zoom-|grab)/, C + "$1"), /(image-set)/, C + "$1"), e, "") + e;
|
|
394
|
+
// background, background-image
|
|
395
|
+
case 5495:
|
|
396
|
+
case 3959:
|
|
397
|
+
return g(e, /(image-set\([^]*)/, C + "$1$`$1");
|
|
398
|
+
// justify-content
|
|
399
|
+
case 4968:
|
|
400
|
+
return g(g(e, /(.+:)(flex-)?(.*)/, C + "box-pack:$3" + k + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + C + e + e;
|
|
401
|
+
// justify-self
|
|
402
|
+
case 4200:
|
|
403
|
+
if (!me(e, /flex-|baseline/)) return k + "grid-column-align" + He(e, t) + e;
|
|
404
|
+
break;
|
|
405
|
+
// grid-template-(columns|rows)
|
|
406
|
+
case 2592:
|
|
407
|
+
case 3360:
|
|
408
|
+
return k + g(e, "template-", "") + e;
|
|
409
|
+
// grid-(row|column)-start
|
|
410
|
+
case 4384:
|
|
411
|
+
case 3616:
|
|
412
|
+
return n && n.some(function(r, o) {
|
|
413
|
+
return t = o, me(r.props, /grid-\w+-end/);
|
|
414
|
+
}) ? ~Ct(e + (n = n[t].value), "span", 0) ? e : k + g(e, "-start", "") + e + k + "grid-row-span:" + (~Ct(n, "span", 0) ? me(n, /\d+/) : +me(n, /\d+/) - +me(e, /\d+/)) + ";" : k + g(e, "-start", "") + e;
|
|
415
|
+
// grid-(row|column)-end
|
|
416
|
+
case 4896:
|
|
417
|
+
case 4128:
|
|
418
|
+
return n && n.some(function(r) {
|
|
419
|
+
return me(r.props, /grid-\w+-start/);
|
|
420
|
+
}) ? e : k + g(g(e, "-end", "-span"), "span ", "") + e;
|
|
421
|
+
// (margin|padding)-inline-(start|end)
|
|
422
|
+
case 4095:
|
|
423
|
+
case 3583:
|
|
424
|
+
case 4068:
|
|
425
|
+
case 2532:
|
|
426
|
+
return g(e, /(.+)-inline(.+)/, C + "$1$2") + e;
|
|
427
|
+
// (min|max)?(width|height|inline-size|block-size)
|
|
428
|
+
case 8116:
|
|
429
|
+
case 7059:
|
|
430
|
+
case 5753:
|
|
431
|
+
case 5535:
|
|
432
|
+
case 5445:
|
|
433
|
+
case 5701:
|
|
434
|
+
case 4933:
|
|
435
|
+
case 4677:
|
|
436
|
+
case 5533:
|
|
437
|
+
case 5789:
|
|
438
|
+
case 5021:
|
|
439
|
+
case 4765:
|
|
440
|
+
if (ie(e) - 1 - t > 6)
|
|
441
|
+
switch (B(e, t + 1)) {
|
|
442
|
+
// (m)ax-content, (m)in-content
|
|
443
|
+
case 109:
|
|
444
|
+
if (B(e, t + 4) !== 45)
|
|
445
|
+
break;
|
|
446
|
+
// (f)ill-available, (f)it-content
|
|
447
|
+
case 102:
|
|
448
|
+
return g(e, /(.+:)(.+)-([^]+)/, "$1" + C + "$2-$3$1" + ut + (B(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
|
|
449
|
+
// (s)tretch
|
|
450
|
+
case 115:
|
|
451
|
+
return ~Ct(e, "stretch", 0) ? xr(g(e, "stretch", "fill-available"), t, n) + e : e;
|
|
452
|
+
}
|
|
453
|
+
break;
|
|
454
|
+
// grid-(column|row)
|
|
455
|
+
case 5152:
|
|
456
|
+
case 5920:
|
|
457
|
+
return g(e, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(r, o, i, s, d, u, m) {
|
|
458
|
+
return k + o + ":" + i + m + (s ? k + o + "-span:" + (d ? u : +u - +i) + m : "") + e;
|
|
459
|
+
});
|
|
460
|
+
// position: sticky
|
|
461
|
+
case 4949:
|
|
462
|
+
if (B(e, t + 6) === 121)
|
|
463
|
+
return g(e, ":", ":" + C) + e;
|
|
464
|
+
break;
|
|
465
|
+
// display: (flex|inline-flex|grid|inline-grid)
|
|
466
|
+
case 6444:
|
|
467
|
+
switch (B(e, B(e, 14) === 45 ? 18 : 11)) {
|
|
468
|
+
// (inline-)?fle(x)
|
|
469
|
+
case 120:
|
|
470
|
+
return g(e, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + C + (B(e, 14) === 45 ? "inline-" : "") + "box$3$1" + C + "$2$3$1" + k + "$2box$3") + e;
|
|
471
|
+
// (inline-)?gri(d)
|
|
472
|
+
case 100:
|
|
473
|
+
return g(e, ":", ":" + k) + e;
|
|
474
|
+
}
|
|
475
|
+
break;
|
|
476
|
+
// scroll-margin, scroll-margin-(top|right|bottom|left)
|
|
477
|
+
case 5719:
|
|
478
|
+
case 2647:
|
|
479
|
+
case 2135:
|
|
480
|
+
case 3927:
|
|
481
|
+
case 2391:
|
|
482
|
+
return g(e, "scroll-", "scroll-snap-") + e;
|
|
483
|
+
}
|
|
484
|
+
return e;
|
|
485
|
+
}
|
|
486
|
+
function Pt(e, t) {
|
|
487
|
+
for (var n = "", r = 0; r < e.length; r++)
|
|
488
|
+
n += t(e[r], r, e, t) || "";
|
|
489
|
+
return n;
|
|
490
|
+
}
|
|
491
|
+
function ko(e, t, n, r) {
|
|
492
|
+
switch (e.type) {
|
|
493
|
+
case bo:
|
|
494
|
+
if (e.children.length) break;
|
|
495
|
+
case go:
|
|
496
|
+
case En:
|
|
497
|
+
return e.return = e.return || e.value;
|
|
498
|
+
case yr:
|
|
499
|
+
return "";
|
|
500
|
+
case vr:
|
|
501
|
+
return e.return = e.value + "{" + Pt(e.children, r) + "}";
|
|
502
|
+
case Lt:
|
|
503
|
+
if (!ie(e.value = e.props.join(","))) return "";
|
|
504
|
+
}
|
|
505
|
+
return ie(n = Pt(e.children, r)) ? e.return = e.value + "{" + n + "}" : "";
|
|
506
|
+
}
|
|
507
|
+
function Oo(e) {
|
|
508
|
+
var t = Tr(e);
|
|
509
|
+
return function(n, r, o, i) {
|
|
510
|
+
for (var s = "", d = 0; d < t; d++)
|
|
511
|
+
s += e[d](n, r, o, i) || "";
|
|
512
|
+
return s;
|
|
513
|
+
};
|
|
514
|
+
}
|
|
515
|
+
function Po(e) {
|
|
516
|
+
return function(t) {
|
|
517
|
+
t.root || (t = t.return) && e(t);
|
|
518
|
+
};
|
|
519
|
+
}
|
|
520
|
+
function No(e, t, n, r) {
|
|
521
|
+
if (e.length > -1 && !e.return)
|
|
522
|
+
switch (e.type) {
|
|
523
|
+
case En:
|
|
524
|
+
e.return = xr(e.value, e.length, n);
|
|
525
|
+
return;
|
|
526
|
+
case vr:
|
|
527
|
+
return Pt([ye(e, { value: g(e.value, "@", "@" + C) })], r);
|
|
528
|
+
case Lt:
|
|
529
|
+
if (e.length)
|
|
530
|
+
return vo(n = e.props, function(o) {
|
|
531
|
+
switch (me(o, r = /(::plac\w+|:read-\w+)/)) {
|
|
532
|
+
// :read-(only|write)
|
|
533
|
+
case ":read-only":
|
|
534
|
+
case ":read-write":
|
|
535
|
+
ze(ye(e, { props: [g(o, /:(read-\w+)/, ":" + ut + "$1")] })), ze(ye(e, { props: [o] })), dn(e, { props: Vn(n, r) });
|
|
536
|
+
break;
|
|
537
|
+
// :placeholder
|
|
538
|
+
case "::placeholder":
|
|
539
|
+
ze(ye(e, { props: [g(o, /:(plac\w+)/, ":" + C + "input-$1")] })), ze(ye(e, { props: [g(o, /:(plac\w+)/, ":" + ut + "$1")] })), ze(ye(e, { props: [g(o, /:(plac\w+)/, k + "input-$1")] })), ze(ye(e, { props: [o] })), dn(e, { props: Vn(n, r) });
|
|
540
|
+
break;
|
|
541
|
+
}
|
|
542
|
+
return "";
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
var $o = {
|
|
547
|
+
animationIterationCount: 1,
|
|
548
|
+
aspectRatio: 1,
|
|
549
|
+
borderImageOutset: 1,
|
|
550
|
+
borderImageSlice: 1,
|
|
551
|
+
borderImageWidth: 1,
|
|
552
|
+
boxFlex: 1,
|
|
553
|
+
boxFlexGroup: 1,
|
|
554
|
+
boxOrdinalGroup: 1,
|
|
555
|
+
columnCount: 1,
|
|
556
|
+
columns: 1,
|
|
557
|
+
flex: 1,
|
|
558
|
+
flexGrow: 1,
|
|
559
|
+
flexPositive: 1,
|
|
560
|
+
flexShrink: 1,
|
|
561
|
+
flexNegative: 1,
|
|
562
|
+
flexOrder: 1,
|
|
563
|
+
gridRow: 1,
|
|
564
|
+
gridRowEnd: 1,
|
|
565
|
+
gridRowSpan: 1,
|
|
566
|
+
gridRowStart: 1,
|
|
567
|
+
gridColumn: 1,
|
|
568
|
+
gridColumnEnd: 1,
|
|
569
|
+
gridColumnSpan: 1,
|
|
570
|
+
gridColumnStart: 1,
|
|
571
|
+
msGridRow: 1,
|
|
572
|
+
msGridRowSpan: 1,
|
|
573
|
+
msGridColumn: 1,
|
|
574
|
+
msGridColumnSpan: 1,
|
|
575
|
+
fontWeight: 1,
|
|
576
|
+
lineHeight: 1,
|
|
577
|
+
opacity: 1,
|
|
578
|
+
order: 1,
|
|
579
|
+
orphans: 1,
|
|
580
|
+
tabSize: 1,
|
|
581
|
+
widows: 1,
|
|
582
|
+
zIndex: 1,
|
|
583
|
+
zoom: 1,
|
|
584
|
+
WebkitLineClamp: 1,
|
|
585
|
+
// SVG-related properties
|
|
586
|
+
fillOpacity: 1,
|
|
587
|
+
floodOpacity: 1,
|
|
588
|
+
stopOpacity: 1,
|
|
589
|
+
strokeDasharray: 1,
|
|
590
|
+
strokeDashoffset: 1,
|
|
591
|
+
strokeMiterlimit: 1,
|
|
592
|
+
strokeOpacity: 1,
|
|
593
|
+
strokeWidth: 1
|
|
594
|
+
}, Ge = typeof process < "u" && process.env !== void 0 && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", Cr = "active", Ar = "data-styled-version", Bt = "6.1.19", Tn = `/*!sc*/
|
|
595
|
+
`, Nt = typeof window < "u" && typeof document < "u", Do = !!(typeof SC_DISABLE_SPEEDY == "boolean" ? SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== "" ? process.env.REACT_APP_SC_DISABLE_SPEEDY !== "false" && process.env.REACT_APP_SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.SC_DISABLE_SPEEDY !== void 0 && process.env.SC_DISABLE_SPEEDY !== "" && process.env.SC_DISABLE_SPEEDY !== "false" && process.env.SC_DISABLE_SPEEDY), Ut = Object.freeze([]), je = Object.freeze({});
|
|
596
|
+
function Lo(e, t, n) {
|
|
597
|
+
return n === void 0 && (n = je), e.theme !== n.theme && e.theme || t || n.theme;
|
|
598
|
+
}
|
|
599
|
+
var _r = /* @__PURE__ */ new Set(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"]), Mo = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, Fo = /(^-|-$)/g;
|
|
600
|
+
function Yn(e) {
|
|
601
|
+
return e.replace(Mo, "-").replace(Fo, "");
|
|
602
|
+
}
|
|
603
|
+
var zo = /(a)(d)/gi, Et = 52, qn = function(e) {
|
|
604
|
+
return String.fromCharCode(e + (e > 25 ? 39 : 97));
|
|
605
|
+
};
|
|
606
|
+
function hn(e) {
|
|
607
|
+
var t, n = "";
|
|
608
|
+
for (t = Math.abs(e); t > Et; t = t / Et | 0) n = qn(t % Et) + n;
|
|
609
|
+
return (qn(t % Et) + n).replace(zo, "$1-$2");
|
|
610
|
+
}
|
|
611
|
+
var tn, Ir = 5381, Be = function(e, t) {
|
|
612
|
+
for (var n = t.length; n; ) e = 33 * e ^ t.charCodeAt(--n);
|
|
613
|
+
return e;
|
|
614
|
+
}, Rr = function(e) {
|
|
615
|
+
return Be(Ir, e);
|
|
616
|
+
};
|
|
617
|
+
function Bo(e) {
|
|
618
|
+
return hn(Rr(e) >>> 0);
|
|
619
|
+
}
|
|
620
|
+
function Uo(e) {
|
|
621
|
+
return e.displayName || e.name || "Component";
|
|
622
|
+
}
|
|
623
|
+
function nn(e) {
|
|
624
|
+
return typeof e == "string" && !0;
|
|
625
|
+
}
|
|
626
|
+
var kr = typeof Symbol == "function" && Symbol.for, Or = kr ? Symbol.for("react.memo") : 60115, Wo = kr ? Symbol.for("react.forward_ref") : 60112, Ho = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, Vo = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, Pr = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, Go = ((tn = {})[Wo] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, tn[Or] = Pr, tn);
|
|
627
|
+
function Kn(e) {
|
|
628
|
+
return ("type" in (t = e) && t.type.$$typeof) === Or ? Pr : "$$typeof" in e ? Go[e.$$typeof] : Ho;
|
|
629
|
+
var t;
|
|
630
|
+
}
|
|
631
|
+
var jo = Object.defineProperty, Yo = Object.getOwnPropertyNames, Xn = Object.getOwnPropertySymbols, qo = Object.getOwnPropertyDescriptor, Ko = Object.getPrototypeOf, Zn = Object.prototype;
|
|
632
|
+
function Nr(e, t, n) {
|
|
633
|
+
if (typeof t != "string") {
|
|
634
|
+
if (Zn) {
|
|
635
|
+
var r = Ko(t);
|
|
636
|
+
r && r !== Zn && Nr(e, r, n);
|
|
637
|
+
}
|
|
638
|
+
var o = Yo(t);
|
|
639
|
+
Xn && (o = o.concat(Xn(t)));
|
|
640
|
+
for (var i = Kn(e), s = Kn(t), d = 0; d < o.length; ++d) {
|
|
641
|
+
var u = o[d];
|
|
642
|
+
if (!(u in Vo || n && n[u] || s && u in s || i && u in i)) {
|
|
643
|
+
var m = qo(t, u);
|
|
644
|
+
try {
|
|
645
|
+
jo(e, u, m);
|
|
646
|
+
} catch {
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
return e;
|
|
652
|
+
}
|
|
653
|
+
function Ie(e) {
|
|
654
|
+
return typeof e == "function";
|
|
655
|
+
}
|
|
656
|
+
function wn(e) {
|
|
657
|
+
return typeof e == "object" && "styledComponentId" in e;
|
|
658
|
+
}
|
|
659
|
+
function we(e, t) {
|
|
660
|
+
return e && t ? "".concat(e, " ").concat(t) : e || t || "";
|
|
661
|
+
}
|
|
662
|
+
function Qn(e, t) {
|
|
663
|
+
if (e.length === 0) return "";
|
|
664
|
+
for (var n = e[0], r = 1; r < e.length; r++) n += e[r];
|
|
665
|
+
return n;
|
|
666
|
+
}
|
|
667
|
+
function dt(e) {
|
|
668
|
+
return e !== null && typeof e == "object" && e.constructor.name === Object.name && !("props" in e && e.$$typeof);
|
|
669
|
+
}
|
|
670
|
+
function pn(e, t, n) {
|
|
671
|
+
if (n === void 0 && (n = !1), !n && !dt(e) && !Array.isArray(e)) return t;
|
|
672
|
+
if (Array.isArray(t)) for (var r = 0; r < t.length; r++) e[r] = pn(e[r], t[r]);
|
|
673
|
+
else if (dt(t)) for (var r in t) e[r] = pn(e[r], t[r]);
|
|
674
|
+
return e;
|
|
675
|
+
}
|
|
676
|
+
function xn(e, t) {
|
|
677
|
+
Object.defineProperty(e, "toString", { value: t });
|
|
678
|
+
}
|
|
679
|
+
function Re(e) {
|
|
680
|
+
for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
|
|
681
|
+
return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e, " for more information.").concat(t.length > 0 ? " Args: ".concat(t.join(", ")) : ""));
|
|
682
|
+
}
|
|
683
|
+
var Xo = (function() {
|
|
684
|
+
function e(t) {
|
|
685
|
+
this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = t;
|
|
686
|
+
}
|
|
687
|
+
return e.prototype.indexOfGroup = function(t) {
|
|
688
|
+
for (var n = 0, r = 0; r < t; r++) n += this.groupSizes[r];
|
|
689
|
+
return n;
|
|
690
|
+
}, e.prototype.insertRules = function(t, n) {
|
|
691
|
+
if (t >= this.groupSizes.length) {
|
|
692
|
+
for (var r = this.groupSizes, o = r.length, i = o; t >= i; ) if ((i <<= 1) < 0) throw Re(16, "".concat(t));
|
|
693
|
+
this.groupSizes = new Uint32Array(i), this.groupSizes.set(r), this.length = i;
|
|
694
|
+
for (var s = o; s < i; s++) this.groupSizes[s] = 0;
|
|
695
|
+
}
|
|
696
|
+
for (var d = this.indexOfGroup(t + 1), u = (s = 0, n.length); s < u; s++) this.tag.insertRule(d, n[s]) && (this.groupSizes[t]++, d++);
|
|
697
|
+
}, e.prototype.clearGroup = function(t) {
|
|
698
|
+
if (t < this.length) {
|
|
699
|
+
var n = this.groupSizes[t], r = this.indexOfGroup(t), o = r + n;
|
|
700
|
+
this.groupSizes[t] = 0;
|
|
701
|
+
for (var i = r; i < o; i++) this.tag.deleteRule(r);
|
|
702
|
+
}
|
|
703
|
+
}, e.prototype.getGroup = function(t) {
|
|
704
|
+
var n = "";
|
|
705
|
+
if (t >= this.length || this.groupSizes[t] === 0) return n;
|
|
706
|
+
for (var r = this.groupSizes[t], o = this.indexOfGroup(t), i = o + r, s = o; s < i; s++) n += "".concat(this.tag.getRule(s)).concat(Tn);
|
|
707
|
+
return n;
|
|
708
|
+
}, e;
|
|
709
|
+
})(), It = /* @__PURE__ */ new Map(), $t = /* @__PURE__ */ new Map(), Rt = 1, St = function(e) {
|
|
710
|
+
if (It.has(e)) return It.get(e);
|
|
711
|
+
for (; $t.has(Rt); ) Rt++;
|
|
712
|
+
var t = Rt++;
|
|
713
|
+
return It.set(e, t), $t.set(t, e), t;
|
|
714
|
+
}, Zo = function(e, t) {
|
|
715
|
+
Rt = t + 1, It.set(e, t), $t.set(t, e);
|
|
716
|
+
}, Qo = "style[".concat(Ge, "][").concat(Ar, '="').concat(Bt, '"]'), Jo = new RegExp("^".concat(Ge, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), ea = function(e, t, n) {
|
|
717
|
+
for (var r, o = n.split(","), i = 0, s = o.length; i < s; i++) (r = o[i]) && e.registerName(t, r);
|
|
718
|
+
}, ta = function(e, t) {
|
|
719
|
+
for (var n, r = ((n = t.textContent) !== null && n !== void 0 ? n : "").split(Tn), o = [], i = 0, s = r.length; i < s; i++) {
|
|
720
|
+
var d = r[i].trim();
|
|
721
|
+
if (d) {
|
|
722
|
+
var u = d.match(Jo);
|
|
723
|
+
if (u) {
|
|
724
|
+
var m = 0 | parseInt(u[1], 10), p = u[2];
|
|
725
|
+
m !== 0 && (Zo(p, m), ea(e, p, u[3]), e.getTag().insertRules(m, o)), o.length = 0;
|
|
726
|
+
} else o.push(d);
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
}, Jn = function(e) {
|
|
730
|
+
for (var t = document.querySelectorAll(Qo), n = 0, r = t.length; n < r; n++) {
|
|
731
|
+
var o = t[n];
|
|
732
|
+
o && o.getAttribute(Ge) !== Cr && (ta(e, o), o.parentNode && o.parentNode.removeChild(o));
|
|
733
|
+
}
|
|
734
|
+
};
|
|
735
|
+
function na() {
|
|
736
|
+
return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : null;
|
|
737
|
+
}
|
|
738
|
+
var $r = function(e) {
|
|
739
|
+
var t = document.head, n = e || t, r = document.createElement("style"), o = (function(d) {
|
|
740
|
+
var u = Array.from(d.querySelectorAll("style[".concat(Ge, "]")));
|
|
741
|
+
return u[u.length - 1];
|
|
742
|
+
})(n), i = o !== void 0 ? o.nextSibling : null;
|
|
743
|
+
r.setAttribute(Ge, Cr), r.setAttribute(Ar, Bt);
|
|
744
|
+
var s = na();
|
|
745
|
+
return s && r.setAttribute("nonce", s), n.insertBefore(r, i), r;
|
|
746
|
+
}, ra = (function() {
|
|
747
|
+
function e(t) {
|
|
748
|
+
this.element = $r(t), this.element.appendChild(document.createTextNode("")), this.sheet = (function(n) {
|
|
749
|
+
if (n.sheet) return n.sheet;
|
|
750
|
+
for (var r = document.styleSheets, o = 0, i = r.length; o < i; o++) {
|
|
751
|
+
var s = r[o];
|
|
752
|
+
if (s.ownerNode === n) return s;
|
|
753
|
+
}
|
|
754
|
+
throw Re(17);
|
|
755
|
+
})(this.element), this.length = 0;
|
|
756
|
+
}
|
|
757
|
+
return e.prototype.insertRule = function(t, n) {
|
|
758
|
+
try {
|
|
759
|
+
return this.sheet.insertRule(n, t), this.length++, !0;
|
|
760
|
+
} catch {
|
|
761
|
+
return !1;
|
|
762
|
+
}
|
|
763
|
+
}, e.prototype.deleteRule = function(t) {
|
|
764
|
+
this.sheet.deleteRule(t), this.length--;
|
|
765
|
+
}, e.prototype.getRule = function(t) {
|
|
766
|
+
var n = this.sheet.cssRules[t];
|
|
767
|
+
return n && n.cssText ? n.cssText : "";
|
|
768
|
+
}, e;
|
|
769
|
+
})(), oa = (function() {
|
|
770
|
+
function e(t) {
|
|
771
|
+
this.element = $r(t), this.nodes = this.element.childNodes, this.length = 0;
|
|
772
|
+
}
|
|
773
|
+
return e.prototype.insertRule = function(t, n) {
|
|
774
|
+
if (t <= this.length && t >= 0) {
|
|
775
|
+
var r = document.createTextNode(n);
|
|
776
|
+
return this.element.insertBefore(r, this.nodes[t] || null), this.length++, !0;
|
|
777
|
+
}
|
|
778
|
+
return !1;
|
|
779
|
+
}, e.prototype.deleteRule = function(t) {
|
|
780
|
+
this.element.removeChild(this.nodes[t]), this.length--;
|
|
781
|
+
}, e.prototype.getRule = function(t) {
|
|
782
|
+
return t < this.length ? this.nodes[t].textContent : "";
|
|
783
|
+
}, e;
|
|
784
|
+
})(), aa = (function() {
|
|
785
|
+
function e(t) {
|
|
786
|
+
this.rules = [], this.length = 0;
|
|
787
|
+
}
|
|
788
|
+
return e.prototype.insertRule = function(t, n) {
|
|
789
|
+
return t <= this.length && (this.rules.splice(t, 0, n), this.length++, !0);
|
|
790
|
+
}, e.prototype.deleteRule = function(t) {
|
|
791
|
+
this.rules.splice(t, 1), this.length--;
|
|
792
|
+
}, e.prototype.getRule = function(t) {
|
|
793
|
+
return t < this.length ? this.rules[t] : "";
|
|
794
|
+
}, e;
|
|
795
|
+
})(), er = Nt, ia = { isServer: !Nt, useCSSOMInjection: !Do }, Dr = (function() {
|
|
796
|
+
function e(t, n, r) {
|
|
797
|
+
t === void 0 && (t = je), n === void 0 && (n = {});
|
|
798
|
+
var o = this;
|
|
799
|
+
this.options = V(V({}, ia), t), this.gs = n, this.names = new Map(r), this.server = !!t.isServer, !this.server && Nt && er && (er = !1, Jn(this)), xn(this, function() {
|
|
800
|
+
return (function(i) {
|
|
801
|
+
for (var s = i.getTag(), d = s.length, u = "", m = function(T) {
|
|
802
|
+
var w = (function(D) {
|
|
803
|
+
return $t.get(D);
|
|
804
|
+
})(T);
|
|
805
|
+
if (w === void 0) return "continue";
|
|
806
|
+
var v = i.names.get(w), A = s.getGroup(T);
|
|
807
|
+
if (v === void 0 || !v.size || A.length === 0) return "continue";
|
|
808
|
+
var $ = "".concat(Ge, ".g").concat(T, '[id="').concat(w, '"]'), G = "";
|
|
809
|
+
v !== void 0 && v.forEach(function(D) {
|
|
810
|
+
D.length > 0 && (G += "".concat(D, ","));
|
|
811
|
+
}), u += "".concat(A).concat($, '{content:"').concat(G, '"}').concat(Tn);
|
|
812
|
+
}, p = 0; p < d; p++) m(p);
|
|
813
|
+
return u;
|
|
814
|
+
})(o);
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
return e.registerId = function(t) {
|
|
818
|
+
return St(t);
|
|
819
|
+
}, e.prototype.rehydrate = function() {
|
|
820
|
+
!this.server && Nt && Jn(this);
|
|
821
|
+
}, e.prototype.reconstructWithOptions = function(t, n) {
|
|
822
|
+
return n === void 0 && (n = !0), new e(V(V({}, this.options), t), this.gs, n && this.names || void 0);
|
|
823
|
+
}, e.prototype.allocateGSInstance = function(t) {
|
|
824
|
+
return this.gs[t] = (this.gs[t] || 0) + 1;
|
|
825
|
+
}, e.prototype.getTag = function() {
|
|
826
|
+
return this.tag || (this.tag = (t = (function(n) {
|
|
827
|
+
var r = n.useCSSOMInjection, o = n.target;
|
|
828
|
+
return n.isServer ? new aa(o) : r ? new ra(o) : new oa(o);
|
|
829
|
+
})(this.options), new Xo(t)));
|
|
830
|
+
var t;
|
|
831
|
+
}, e.prototype.hasNameForId = function(t, n) {
|
|
832
|
+
return this.names.has(t) && this.names.get(t).has(n);
|
|
833
|
+
}, e.prototype.registerName = function(t, n) {
|
|
834
|
+
if (St(t), this.names.has(t)) this.names.get(t).add(n);
|
|
835
|
+
else {
|
|
836
|
+
var r = /* @__PURE__ */ new Set();
|
|
837
|
+
r.add(n), this.names.set(t, r);
|
|
838
|
+
}
|
|
839
|
+
}, e.prototype.insertRules = function(t, n, r) {
|
|
840
|
+
this.registerName(t, n), this.getTag().insertRules(St(t), r);
|
|
841
|
+
}, e.prototype.clearNames = function(t) {
|
|
842
|
+
this.names.has(t) && this.names.get(t).clear();
|
|
843
|
+
}, e.prototype.clearRules = function(t) {
|
|
844
|
+
this.getTag().clearGroup(St(t)), this.clearNames(t);
|
|
845
|
+
}, e.prototype.clearTag = function() {
|
|
846
|
+
this.tag = void 0;
|
|
847
|
+
}, e;
|
|
848
|
+
})(), sa = /&/g, la = /^\s*\/\/.*$/gm;
|
|
849
|
+
function Lr(e, t) {
|
|
850
|
+
return e.map(function(n) {
|
|
851
|
+
return n.type === "rule" && (n.value = "".concat(t, " ").concat(n.value), n.value = n.value.replaceAll(",", ",".concat(t, " ")), n.props = n.props.map(function(r) {
|
|
852
|
+
return "".concat(t, " ").concat(r);
|
|
853
|
+
})), Array.isArray(n.children) && n.type !== "@keyframes" && (n.children = Lr(n.children, t)), n;
|
|
854
|
+
});
|
|
855
|
+
}
|
|
856
|
+
function ca(e) {
|
|
857
|
+
var t, n, r, o = je, i = o.options, s = i === void 0 ? je : i, d = o.plugins, u = d === void 0 ? Ut : d, m = function(w, v, A) {
|
|
858
|
+
return A.startsWith(n) && A.endsWith(n) && A.replaceAll(n, "").length > 0 ? ".".concat(t) : w;
|
|
859
|
+
}, p = u.slice();
|
|
860
|
+
p.push(function(w) {
|
|
861
|
+
w.type === Lt && w.value.includes("&") && (w.props[0] = w.props[0].replace(sa, n).replace(r, m));
|
|
862
|
+
}), s.prefix && p.push(No), p.push(ko);
|
|
863
|
+
var T = function(w, v, A, $) {
|
|
864
|
+
v === void 0 && (v = ""), A === void 0 && (A = ""), $ === void 0 && ($ = "&"), t = $, n = v, r = new RegExp("\\".concat(n, "\\b"), "g");
|
|
865
|
+
var G = w.replace(la, ""), D = Io(A || v ? "".concat(A, " ").concat(v, " { ").concat(G, " }") : G);
|
|
866
|
+
s.namespace && (D = Lr(D, s.namespace));
|
|
867
|
+
var O = [];
|
|
868
|
+
return Pt(D, Oo(p.concat(Po(function(_) {
|
|
869
|
+
return O.push(_);
|
|
870
|
+
})))), O;
|
|
871
|
+
};
|
|
872
|
+
return T.hash = u.length ? u.reduce(function(w, v) {
|
|
873
|
+
return v.name || Re(15), Be(w, v.name);
|
|
874
|
+
}, Ir).toString() : "", T;
|
|
875
|
+
}
|
|
876
|
+
var ua = new Dr(), gn = ca(), Mr = l.createContext({ shouldForwardProp: void 0, styleSheet: ua, stylis: gn });
|
|
877
|
+
Mr.Consumer;
|
|
878
|
+
l.createContext(void 0);
|
|
879
|
+
function tr() {
|
|
880
|
+
return uo(Mr);
|
|
881
|
+
}
|
|
882
|
+
var da = (function() {
|
|
883
|
+
function e(t, n) {
|
|
884
|
+
var r = this;
|
|
885
|
+
this.inject = function(o, i) {
|
|
886
|
+
i === void 0 && (i = gn);
|
|
887
|
+
var s = r.name + i.hash;
|
|
888
|
+
o.hasNameForId(r.id, s) || o.insertRules(r.id, s, i(r.rules, s, "@keyframes"));
|
|
889
|
+
}, this.name = t, this.id = "sc-keyframes-".concat(t), this.rules = n, xn(this, function() {
|
|
890
|
+
throw Re(12, String(r.name));
|
|
891
|
+
});
|
|
892
|
+
}
|
|
893
|
+
return e.prototype.getName = function(t) {
|
|
894
|
+
return t === void 0 && (t = gn), this.name + t.hash;
|
|
895
|
+
}, e;
|
|
896
|
+
})(), fa = function(e) {
|
|
897
|
+
return e >= "A" && e <= "Z";
|
|
898
|
+
};
|
|
899
|
+
function nr(e) {
|
|
900
|
+
for (var t = "", n = 0; n < e.length; n++) {
|
|
901
|
+
var r = e[n];
|
|
902
|
+
if (n === 1 && r === "-" && e[0] === "-") return e;
|
|
903
|
+
fa(r) ? t += "-" + r.toLowerCase() : t += r;
|
|
904
|
+
}
|
|
905
|
+
return t.startsWith("ms-") ? "-" + t : t;
|
|
906
|
+
}
|
|
907
|
+
var Fr = function(e) {
|
|
908
|
+
return e == null || e === !1 || e === "";
|
|
909
|
+
}, zr = function(e) {
|
|
910
|
+
var t, n, r = [];
|
|
911
|
+
for (var o in e) {
|
|
912
|
+
var i = e[o];
|
|
913
|
+
e.hasOwnProperty(o) && !Fr(i) && (Array.isArray(i) && i.isCss || Ie(i) ? r.push("".concat(nr(o), ":"), i, ";") : dt(i) ? r.push.apply(r, Ot(Ot(["".concat(o, " {")], zr(i), !1), ["}"], !1)) : r.push("".concat(nr(o), ": ").concat((t = o, (n = i) == null || typeof n == "boolean" || n === "" ? "" : typeof n != "number" || n === 0 || t in $o || t.startsWith("--") ? String(n).trim() : "".concat(n, "px")), ";")));
|
|
914
|
+
}
|
|
915
|
+
return r;
|
|
916
|
+
};
|
|
917
|
+
function Ae(e, t, n, r) {
|
|
918
|
+
if (Fr(e)) return [];
|
|
919
|
+
if (wn(e)) return [".".concat(e.styledComponentId)];
|
|
920
|
+
if (Ie(e)) {
|
|
921
|
+
if (!Ie(i = e) || i.prototype && i.prototype.isReactComponent || !t) return [e];
|
|
922
|
+
var o = e(t);
|
|
923
|
+
return Ae(o, t, n, r);
|
|
924
|
+
}
|
|
925
|
+
var i;
|
|
926
|
+
return e instanceof da ? n ? (e.inject(n, r), [e.getName(r)]) : [e] : dt(e) ? zr(e) : Array.isArray(e) ? Array.prototype.concat.apply(Ut, e.map(function(s) {
|
|
927
|
+
return Ae(s, t, n, r);
|
|
928
|
+
})) : [e.toString()];
|
|
929
|
+
}
|
|
930
|
+
function ma(e) {
|
|
931
|
+
for (var t = 0; t < e.length; t += 1) {
|
|
932
|
+
var n = e[t];
|
|
933
|
+
if (Ie(n) && !wn(n)) return !1;
|
|
934
|
+
}
|
|
935
|
+
return !0;
|
|
936
|
+
}
|
|
937
|
+
var ha = Rr(Bt), pa = (function() {
|
|
938
|
+
function e(t, n, r) {
|
|
939
|
+
this.rules = t, this.staticRulesId = "", this.isStatic = (r === void 0 || r.isStatic) && ma(t), this.componentId = n, this.baseHash = Be(ha, n), this.baseStyle = r, Dr.registerId(n);
|
|
940
|
+
}
|
|
941
|
+
return e.prototype.generateAndInjectStyles = function(t, n, r) {
|
|
942
|
+
var o = this.baseStyle ? this.baseStyle.generateAndInjectStyles(t, n, r) : "";
|
|
943
|
+
if (this.isStatic && !r.hash) if (this.staticRulesId && n.hasNameForId(this.componentId, this.staticRulesId)) o = we(o, this.staticRulesId);
|
|
944
|
+
else {
|
|
945
|
+
var i = Qn(Ae(this.rules, t, n, r)), s = hn(Be(this.baseHash, i) >>> 0);
|
|
946
|
+
if (!n.hasNameForId(this.componentId, s)) {
|
|
947
|
+
var d = r(i, ".".concat(s), void 0, this.componentId);
|
|
948
|
+
n.insertRules(this.componentId, s, d);
|
|
949
|
+
}
|
|
950
|
+
o = we(o, s), this.staticRulesId = s;
|
|
951
|
+
}
|
|
952
|
+
else {
|
|
953
|
+
for (var u = Be(this.baseHash, r.hash), m = "", p = 0; p < this.rules.length; p++) {
|
|
954
|
+
var T = this.rules[p];
|
|
955
|
+
if (typeof T == "string") m += T;
|
|
956
|
+
else if (T) {
|
|
957
|
+
var w = Qn(Ae(T, t, n, r));
|
|
958
|
+
u = Be(u, w + p), m += w;
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
if (m) {
|
|
962
|
+
var v = hn(u >>> 0);
|
|
963
|
+
n.hasNameForId(this.componentId, v) || n.insertRules(this.componentId, v, r(m, ".".concat(v), void 0, this.componentId)), o = we(o, v);
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
return o;
|
|
967
|
+
}, e;
|
|
968
|
+
})(), Dt = l.createContext(void 0);
|
|
969
|
+
Dt.Consumer;
|
|
970
|
+
function ga(e) {
|
|
971
|
+
var t = l.useContext(Dt), n = se(function() {
|
|
972
|
+
return (function(r, o) {
|
|
973
|
+
if (!r) throw Re(14);
|
|
974
|
+
if (Ie(r)) {
|
|
975
|
+
var i = r(o);
|
|
976
|
+
return i;
|
|
977
|
+
}
|
|
978
|
+
if (Array.isArray(r) || typeof r != "object") throw Re(8);
|
|
979
|
+
return o ? V(V({}, o), r) : r;
|
|
980
|
+
})(e.theme, t);
|
|
981
|
+
}, [e.theme, t]);
|
|
982
|
+
return e.children ? l.createElement(Dt.Provider, { value: n }, e.children) : null;
|
|
983
|
+
}
|
|
984
|
+
var rn = {};
|
|
985
|
+
function ba(e, t, n) {
|
|
986
|
+
var r = wn(e), o = e, i = !nn(e), s = t.attrs, d = s === void 0 ? Ut : s, u = t.componentId, m = u === void 0 ? (function(b, R) {
|
|
987
|
+
var x = typeof b != "string" ? "sc" : Yn(b);
|
|
988
|
+
rn[x] = (rn[x] || 0) + 1;
|
|
989
|
+
var y = "".concat(x, "-").concat(Bo(Bt + x + rn[x]));
|
|
990
|
+
return R ? "".concat(R, "-").concat(y) : y;
|
|
991
|
+
})(t.displayName, t.parentComponentId) : u, p = t.displayName, T = p === void 0 ? (function(b) {
|
|
992
|
+
return nn(b) ? "styled.".concat(b) : "Styled(".concat(Uo(b), ")");
|
|
993
|
+
})(e) : p, w = t.displayName && t.componentId ? "".concat(Yn(t.displayName), "-").concat(t.componentId) : t.componentId || m, v = r && o.attrs ? o.attrs.concat(d).filter(Boolean) : d, A = t.shouldForwardProp;
|
|
994
|
+
if (r && o.shouldForwardProp) {
|
|
995
|
+
var $ = o.shouldForwardProp;
|
|
996
|
+
if (t.shouldForwardProp) {
|
|
997
|
+
var G = t.shouldForwardProp;
|
|
998
|
+
A = function(b, R) {
|
|
999
|
+
return $(b, R) && G(b, R);
|
|
1000
|
+
};
|
|
1001
|
+
} else A = $;
|
|
1002
|
+
}
|
|
1003
|
+
var D = new pa(n, w, r ? o.componentStyle : void 0);
|
|
1004
|
+
function O(b, R) {
|
|
1005
|
+
return (function(x, y, pe) {
|
|
1006
|
+
var ke = x.attrs, Wt = x.componentStyle, U = x.defaultProps, Xe = x.foldedComponentIds, Ze = x.styledComponentId, Qe = x.target, Ht = l.useContext(Dt), Vt = tr(), Je = x.shouldForwardProp || Vt.shouldForwardProp, et = Lo(y, Ht, U) || je, J = (function(I, te, ge) {
|
|
1007
|
+
for (var be, ne = V(V({}, te), { className: void 0, theme: ge }), Pe = 0; Pe < I.length; Pe += 1) {
|
|
1008
|
+
var Ee = Ie(be = I[Pe]) ? be(ne) : be;
|
|
1009
|
+
for (var j in Ee) ne[j] = j === "className" ? we(ne[j], Ee[j]) : j === "style" ? V(V({}, ne[j]), Ee[j]) : Ee[j];
|
|
1010
|
+
}
|
|
1011
|
+
return te.className && (ne.className = we(ne.className, te.className)), ne;
|
|
1012
|
+
})(ke, y, et), ve = J.as || Qe, P = {};
|
|
1013
|
+
for (var ee in J) J[ee] === void 0 || ee[0] === "$" || ee === "as" || ee === "theme" && J.theme === et || (ee === "forwardedAs" ? P.as = J.forwardedAs : Je && !Je(ee, ve) || (P[ee] = J[ee]));
|
|
1014
|
+
var L = (function(I, te) {
|
|
1015
|
+
var ge = tr(), be = I.generateAndInjectStyles(te, ge.styleSheet, ge.stylis);
|
|
1016
|
+
return be;
|
|
1017
|
+
})(Wt, J), Oe = we(Xe, Ze);
|
|
1018
|
+
return L && (Oe += " " + L), J.className && (Oe += " " + J.className), P[nn(ve) && !_r.has(ve) ? "class" : "className"] = Oe, pe && (P.ref = pe), co(ve, P);
|
|
1019
|
+
})(_, b, R);
|
|
1020
|
+
}
|
|
1021
|
+
O.displayName = T;
|
|
1022
|
+
var _ = l.forwardRef(O);
|
|
1023
|
+
return _.attrs = v, _.componentStyle = D, _.displayName = T, _.shouldForwardProp = A, _.foldedComponentIds = r ? we(o.foldedComponentIds, o.styledComponentId) : "", _.styledComponentId = w, _.target = r ? o.target : e, Object.defineProperty(_, "defaultProps", { get: function() {
|
|
1024
|
+
return this._foldedDefaultProps;
|
|
1025
|
+
}, set: function(b) {
|
|
1026
|
+
this._foldedDefaultProps = r ? (function(R) {
|
|
1027
|
+
for (var x = [], y = 1; y < arguments.length; y++) x[y - 1] = arguments[y];
|
|
1028
|
+
for (var pe = 0, ke = x; pe < ke.length; pe++) pn(R, ke[pe], !0);
|
|
1029
|
+
return R;
|
|
1030
|
+
})({}, o.defaultProps, b) : b;
|
|
1031
|
+
} }), xn(_, function() {
|
|
1032
|
+
return ".".concat(_.styledComponentId);
|
|
1033
|
+
}), i && Nr(_, e, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), _;
|
|
1034
|
+
}
|
|
1035
|
+
function rr(e, t) {
|
|
1036
|
+
for (var n = [e[0]], r = 0, o = t.length; r < o; r += 1) n.push(t[r], e[r + 1]);
|
|
1037
|
+
return n;
|
|
1038
|
+
}
|
|
1039
|
+
var or = function(e) {
|
|
1040
|
+
return Object.assign(e, { isCss: !0 });
|
|
1041
|
+
};
|
|
1042
|
+
function ya(e) {
|
|
1043
|
+
for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
|
|
1044
|
+
if (Ie(e) || dt(e)) return or(Ae(rr(Ut, Ot([e], t, !0))));
|
|
1045
|
+
var r = e;
|
|
1046
|
+
return t.length === 0 && r.length === 1 && typeof r[0] == "string" ? Ae(r) : or(Ae(rr(r, t)));
|
|
1047
|
+
}
|
|
1048
|
+
function bn(e, t, n) {
|
|
1049
|
+
if (n === void 0 && (n = je), !t) throw Re(1, t);
|
|
1050
|
+
var r = function(o) {
|
|
1051
|
+
for (var i = [], s = 1; s < arguments.length; s++) i[s - 1] = arguments[s];
|
|
1052
|
+
return e(t, n, ya.apply(void 0, Ot([o], i, !1)));
|
|
1053
|
+
};
|
|
1054
|
+
return r.attrs = function(o) {
|
|
1055
|
+
return bn(e, t, V(V({}, n), { attrs: Array.prototype.concat(n.attrs, o).filter(Boolean) }));
|
|
1056
|
+
}, r.withConfig = function(o) {
|
|
1057
|
+
return bn(e, t, V(V({}, n), o));
|
|
1058
|
+
}, r;
|
|
1059
|
+
}
|
|
1060
|
+
var Br = function(e) {
|
|
1061
|
+
return bn(ba, e);
|
|
1062
|
+
}, S = Br;
|
|
1063
|
+
_r.forEach(function(e) {
|
|
1064
|
+
S[e] = Br(e);
|
|
1065
|
+
});
|
|
1066
|
+
const _e = {
|
|
1067
|
+
// Main colors usually to be modified by the user
|
|
1068
|
+
primary: "#422ad5",
|
|
1069
|
+
// Primary brand color, The main color of your brand
|
|
1070
|
+
primaryContent: "#e0e7ff",
|
|
1071
|
+
// --color-primary-content Foreground content color to use on primary color
|
|
1072
|
+
secondary: "#f43098",
|
|
1073
|
+
// --color-secondary Secondary brand color, The optional, secondary color of your brand
|
|
1074
|
+
secondaryContent: "#f9e4f0",
|
|
1075
|
+
// --color-secondary-content Foreground content color to use on secondary color
|
|
1076
|
+
accent: "#00d3bb",
|
|
1077
|
+
// --color-accent Accent brand color, The optional, accent color of your brand
|
|
1078
|
+
accentContent: "#084d49",
|
|
1079
|
+
// --color-accent-content Foreground content color to use on accent color
|
|
1080
|
+
neutral: "#09090b",
|
|
1081
|
+
// --color-neutral Neutral dark color, For not-saturated parts of UI
|
|
1082
|
+
neutralContent: "#e4e4e7",
|
|
1083
|
+
// --color-neutral-content Foreground content color to use on neutral color
|
|
1084
|
+
base100: "#ffffff",
|
|
1085
|
+
// --color-base-100 Base surface color of page, used for blank backgrounds
|
|
1086
|
+
base200: "#f8f8f8",
|
|
1087
|
+
// --color-base-200 Base color, darker shade, to create elevations
|
|
1088
|
+
base300: "#eeeeee",
|
|
1089
|
+
// --color-base-300 Base color, even more darker shade, to create elevations
|
|
1090
|
+
baseContent: "#18181b",
|
|
1091
|
+
// --color-base-content Foreground content color to use on base color
|
|
1092
|
+
info: "#00bafe",
|
|
1093
|
+
// --color-info Info color, For informative/helpful messages
|
|
1094
|
+
infoContent: "#042e49",
|
|
1095
|
+
// --color-info-content Foreground content color to use on info color
|
|
1096
|
+
success: "#00d390",
|
|
1097
|
+
// --color-success Success color, For success/safe messages
|
|
1098
|
+
successContent: "#004c39",
|
|
1099
|
+
// --color-success-content Foreground content color to use on success color
|
|
1100
|
+
warning: "#fcb700",
|
|
1101
|
+
// --color-warning Warning color, For warning/caution messages
|
|
1102
|
+
warningContent: "#793205",
|
|
1103
|
+
// --color-warning-content Foreground content color to use on warning color
|
|
1104
|
+
error: "#ff627d",
|
|
1105
|
+
// --color-error Error color, For error/danger/destructive messages
|
|
1106
|
+
errorContent: "#4d0218",
|
|
1107
|
+
// --color-error-content Foreground content color to use on error color
|
|
1108
|
+
radiusSelectors: "0.25rem",
|
|
1109
|
+
// checkbox, toggle, badge
|
|
1110
|
+
radiusField: "0.25rem",
|
|
1111
|
+
// button, input, select, tab
|
|
1112
|
+
radiusBox: "0.25rem",
|
|
1113
|
+
// card, modal, alert
|
|
1114
|
+
borderWidth: "1px",
|
|
1115
|
+
fontSize: "1rem",
|
|
1116
|
+
sizeField: ".3rem",
|
|
1117
|
+
sizeSelector: ".3rem",
|
|
1118
|
+
allFieldsSize: "20rem",
|
|
1119
|
+
// radio/checkbox item element width
|
|
1120
|
+
spacing: ".3rem",
|
|
1121
|
+
depth: 1
|
|
1122
|
+
}, va = {
|
|
1123
|
+
selectedVariant: "primary",
|
|
1124
|
+
getDefaultVariantOrSelected: () => "primary",
|
|
1125
|
+
..._e
|
|
1126
|
+
}, Ur = l.createContext({
|
|
1127
|
+
..._e,
|
|
1128
|
+
...va
|
|
1129
|
+
}), Ea = S.div`
|
|
1130
|
+
font-family:
|
|
1131
|
+
ui-sans-serif,
|
|
1132
|
+
system-ui,
|
|
1133
|
+
-apple-system,
|
|
1134
|
+
BlinkMacSystemFont,
|
|
1135
|
+
Segoe UI,
|
|
1136
|
+
Roboto,
|
|
1137
|
+
Helvetica Neue,
|
|
1138
|
+
Vazirmatn,
|
|
1139
|
+
Arial,
|
|
1140
|
+
Noto Sans,
|
|
1141
|
+
sans-serif,
|
|
1142
|
+
Apple Color Emoji,
|
|
1143
|
+
Segoe UI Emoji,
|
|
1144
|
+
Segoe UI Symbol,
|
|
1145
|
+
Noto Color Emoji;
|
|
1146
|
+
color-scheme: light;
|
|
1147
|
+
--color-base-100: ${(e) => e.$theme.base100};
|
|
1148
|
+
--color-base-200: ${(e) => e.$theme.base200};
|
|
1149
|
+
--color-base-300: ${(e) => e.$theme.base300};
|
|
1150
|
+
--color-base-content: ${(e) => e.$theme.baseContent};
|
|
1151
|
+
--color-primary: ${(e) => e.$theme.primary};
|
|
1152
|
+
--color-primary-content: ${(e) => e.$theme.primaryContent};
|
|
1153
|
+
--color-secondary: ${(e) => e.$theme.secondary};
|
|
1154
|
+
--color-secondary-content: ${(e) => e.$theme.secondaryContent};
|
|
1155
|
+
--color-accent: ${(e) => e.$theme.accent};
|
|
1156
|
+
--color-accent-content: ${(e) => e.$theme.accentContent};
|
|
1157
|
+
--color-neutral: ${(e) => e.$theme.neutral};
|
|
1158
|
+
--color-neutral-content: ${(e) => e.$theme.neutralContent};
|
|
1159
|
+
--color-info: ${(e) => e.$theme.info};
|
|
1160
|
+
--color-info-content: ${(e) => e.$theme.infoContent};
|
|
1161
|
+
--color-success: ${(e) => e.$theme.success};
|
|
1162
|
+
--color-success-content: ${(e) => e.$theme.successContent};
|
|
1163
|
+
--color-warning: ${(e) => e.$theme.warning};
|
|
1164
|
+
--color-warning-content: ${(e) => e.$theme.warningContent};
|
|
1165
|
+
--color-error: ${(e) => e.$theme.error};
|
|
1166
|
+
--color-error-content: ${(e) => e.$theme.errorContent};
|
|
1167
|
+
|
|
1168
|
+
--radius-selector: ${(e) => e.$theme.radiusSelectors};
|
|
1169
|
+
--radius-field: ${(e) => e.$theme.radiusField};
|
|
1170
|
+
--radius-box: ${(e) => e.$theme.radiusBox};
|
|
1171
|
+
|
|
1172
|
+
--border-width: ${(e) => e.$theme.borderWidth};
|
|
1173
|
+
|
|
1174
|
+
--font-size: ${(e) => e.$theme.fontSize};
|
|
1175
|
+
--size-field: ${(e) => e.$theme.sizeField};
|
|
1176
|
+
--size-selector: ${(e) => e.$theme.sizeSelector};
|
|
1177
|
+
--depth: ${(e) => e.$theme.depth};
|
|
1178
|
+
--spacing: ${(e) => e.$theme.spacing};
|
|
1179
|
+
--all-fields-size: ${(e) => e.$theme.allFieldsSize};
|
|
1180
|
+
`, Sa = (e) => {
|
|
1181
|
+
const t = e.selectedVariant ?? "primary";
|
|
1182
|
+
return l.createElement(ga, {
|
|
1183
|
+
theme: e.theme ?? _e,
|
|
1184
|
+
children: l.createElement(Ea, {
|
|
1185
|
+
$theme: e.theme ?? _e,
|
|
1186
|
+
children: l.createElement(Ur.Provider, {
|
|
1187
|
+
value: {
|
|
1188
|
+
selectedVariant: t,
|
|
1189
|
+
getDefaultVariantOrSelected: () => t,
|
|
1190
|
+
...e.theme ?? _e
|
|
1191
|
+
},
|
|
1192
|
+
children: e.children
|
|
1193
|
+
})
|
|
1194
|
+
})
|
|
1195
|
+
});
|
|
1196
|
+
}, Wr = () => l.useContext(Ur), he = (e) => {
|
|
1197
|
+
const { getDefaultVariantOrSelected: t } = Wr(), n = t();
|
|
1198
|
+
return _e[e ?? n];
|
|
1199
|
+
}, Hr = (e) => {
|
|
1200
|
+
const { getDefaultVariantOrSelected: t } = Wr(), n = t(), r = e ? `${e}Content` : `${n}Content`;
|
|
1201
|
+
return _e[r];
|
|
1202
|
+
}, Ta = () => {
|
|
1203
|
+
const e = "http://localhost:4000/external", t = async (n) => {
|
|
1204
|
+
const r = await n;
|
|
1205
|
+
if (!r.ok)
|
|
1206
|
+
switch (r.status) {
|
|
1207
|
+
case 404:
|
|
1208
|
+
throw new Error("Not found");
|
|
1209
|
+
case 400:
|
|
1210
|
+
throw new Error("Bad request");
|
|
1211
|
+
default:
|
|
1212
|
+
throw new Error("Unknown error");
|
|
1213
|
+
}
|
|
1214
|
+
return (await n).json();
|
|
1215
|
+
};
|
|
1216
|
+
return {
|
|
1217
|
+
post: async (n, r, o) => {
|
|
1218
|
+
var i;
|
|
1219
|
+
try {
|
|
1220
|
+
return t(
|
|
1221
|
+
fetch(`${e}${n}`, {
|
|
1222
|
+
method: "POST",
|
|
1223
|
+
body: JSON.stringify(r),
|
|
1224
|
+
signal: ((i = o == null ? void 0 : o.abortController) == null ? void 0 : i.signal) ?? null,
|
|
1225
|
+
headers: {
|
|
1226
|
+
"Content-Type": "application/json",
|
|
1227
|
+
...(o == null ? void 0 : o.headers) ?? {}
|
|
1228
|
+
}
|
|
1229
|
+
})
|
|
1230
|
+
);
|
|
1231
|
+
} catch (s) {
|
|
1232
|
+
throw console.log(s), s;
|
|
1233
|
+
}
|
|
1234
|
+
},
|
|
1235
|
+
get: async (n, r) => {
|
|
1236
|
+
var o;
|
|
1237
|
+
try {
|
|
1238
|
+
return t(
|
|
1239
|
+
fetch(`${e}${n}`, {
|
|
1240
|
+
method: "GET",
|
|
1241
|
+
signal: ((o = r == null ? void 0 : r.abortController) == null ? void 0 : o.signal) ?? null,
|
|
1242
|
+
headers: {
|
|
1243
|
+
"Content-Type": "application/json",
|
|
1244
|
+
...(r == null ? void 0 : r.headers) ?? {}
|
|
1245
|
+
}
|
|
1246
|
+
})
|
|
1247
|
+
);
|
|
1248
|
+
} catch (i) {
|
|
1249
|
+
throw console.log(i), i;
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
};
|
|
1253
|
+
}, ar = {
|
|
1254
|
+
meta: { name: "asd" },
|
|
1255
|
+
steps: [
|
|
1256
|
+
{
|
|
1257
|
+
title: "Overall altitude",
|
|
1258
|
+
meta: { name: "overall" },
|
|
1259
|
+
fields: [
|
|
1260
|
+
{
|
|
1261
|
+
type: "matrix",
|
|
1262
|
+
meta: { name: "asd", fieldKey: "recommendationChance" },
|
|
1263
|
+
validations: {
|
|
1264
|
+
required: !0
|
|
1265
|
+
},
|
|
1266
|
+
label: {
|
|
1267
|
+
default: "How likely are you to recommend this company to a friend or colleague?"
|
|
1268
|
+
},
|
|
1269
|
+
max: 10
|
|
1270
|
+
},
|
|
1271
|
+
{
|
|
1272
|
+
type: "radio-group",
|
|
1273
|
+
meta: { name: "asd", fieldKey: "satisfactionLevel" },
|
|
1274
|
+
label: {
|
|
1275
|
+
default: "Overall, how satisfied or dissatisfied are you with our company?"
|
|
1276
|
+
},
|
|
1277
|
+
validations: { required: !0 },
|
|
1278
|
+
options: [
|
|
1279
|
+
{ label: "Very satisfied", id: "1" },
|
|
1280
|
+
{ label: "Somewhat satisfied", id: "2" },
|
|
1281
|
+
{ label: "Neither satisfied nor dissatisfied", id: "3" },
|
|
1282
|
+
{ label: "Somewhat dissatisfied", id: "4" },
|
|
1283
|
+
{ label: "Very dissatisfied", id: "5" }
|
|
1284
|
+
]
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
type: "rating",
|
|
1288
|
+
icon: "star2",
|
|
1289
|
+
max: 5,
|
|
1290
|
+
meta: { name: "asd", fieldKey: "satisfactionRating" },
|
|
1291
|
+
label: { default: "What is your general satisfaction?" },
|
|
1292
|
+
validations: { required: !0 }
|
|
1293
|
+
}
|
|
1294
|
+
]
|
|
1295
|
+
},
|
|
1296
|
+
{
|
|
1297
|
+
meta: { name: "products" },
|
|
1298
|
+
title: "Product questions",
|
|
1299
|
+
fields: [
|
|
1300
|
+
{
|
|
1301
|
+
type: "checkbox-group",
|
|
1302
|
+
meta: { name: "asd", fieldKey: "productDescribeWords" },
|
|
1303
|
+
label: {
|
|
1304
|
+
default: "Which of the following words best describes your experience with our products?"
|
|
1305
|
+
},
|
|
1306
|
+
validations: { required: !0 },
|
|
1307
|
+
options: [
|
|
1308
|
+
{ label: "Reliable", id: "1" },
|
|
1309
|
+
{ label: "High quality", id: "2" },
|
|
1310
|
+
{ label: "Useful", id: "3" },
|
|
1311
|
+
{ label: "Unique", id: "4" },
|
|
1312
|
+
{ label: "Value for money", id: "5" },
|
|
1313
|
+
{ label: "Overpriced", id: "6" },
|
|
1314
|
+
{ label: "Ineffective", id: "7" },
|
|
1315
|
+
{ label: "Poor quality", id: "8" },
|
|
1316
|
+
{ label: "Unreliable", id: "9" }
|
|
1317
|
+
]
|
|
1318
|
+
},
|
|
1319
|
+
{
|
|
1320
|
+
type: "radio-group",
|
|
1321
|
+
meta: { name: "asd", fieldKey: "productExpectations" },
|
|
1322
|
+
label: {
|
|
1323
|
+
default: "How well products meet your expectations?"
|
|
1324
|
+
},
|
|
1325
|
+
validations: { required: !0 },
|
|
1326
|
+
options: [
|
|
1327
|
+
{ label: "Extremely well", id: "1" },
|
|
1328
|
+
{ label: "Well", id: "2" },
|
|
1329
|
+
{ label: "Somewhat well", id: "3" },
|
|
1330
|
+
{ label: "Not well", id: "4" },
|
|
1331
|
+
{ label: "Not at all well", id: "5" }
|
|
1332
|
+
]
|
|
1333
|
+
},
|
|
1334
|
+
{
|
|
1335
|
+
type: "matrix",
|
|
1336
|
+
meta: { name: "asd", fieldKey: "productQuality" },
|
|
1337
|
+
label: {
|
|
1338
|
+
default: "How would you rate the quality of our products?"
|
|
1339
|
+
},
|
|
1340
|
+
validations: { required: !0 },
|
|
1341
|
+
max: 10,
|
|
1342
|
+
minText: "Poor quality",
|
|
1343
|
+
maxText: "Good quality"
|
|
1344
|
+
}
|
|
1345
|
+
]
|
|
1346
|
+
},
|
|
1347
|
+
{
|
|
1348
|
+
meta: { name: "final-questions" },
|
|
1349
|
+
title: "Final questions",
|
|
1350
|
+
fields: [
|
|
1351
|
+
{
|
|
1352
|
+
type: "range-slide",
|
|
1353
|
+
defaultValue: 77,
|
|
1354
|
+
meta: { name: "asd", fieldKey: "productsImpressionLevel" },
|
|
1355
|
+
label: {
|
|
1356
|
+
default: "What is your overall impression level of our products?"
|
|
1357
|
+
}
|
|
1358
|
+
},
|
|
1359
|
+
{
|
|
1360
|
+
type: "rating",
|
|
1361
|
+
icon: "heart",
|
|
1362
|
+
max: 5,
|
|
1363
|
+
meta: { name: "asd", fieldKey: "productExpectations" },
|
|
1364
|
+
label: {
|
|
1365
|
+
default: "Do you like our service and products?"
|
|
1366
|
+
},
|
|
1367
|
+
validations: { required: !0 }
|
|
1368
|
+
},
|
|
1369
|
+
{
|
|
1370
|
+
type: "select",
|
|
1371
|
+
meta: { name: "asd", fieldKey: "fromWhereDidYouHearAboutUs" },
|
|
1372
|
+
label: {
|
|
1373
|
+
default: "From where did you hear about us?"
|
|
1374
|
+
},
|
|
1375
|
+
validations: { required: !0 },
|
|
1376
|
+
options: [
|
|
1377
|
+
{ label: "Facebook", id: "1" },
|
|
1378
|
+
{ label: "Instagram", id: "2" },
|
|
1379
|
+
{ label: "Google search", id: "3" },
|
|
1380
|
+
{ label: "AD", id: "4" },
|
|
1381
|
+
{ label: "Other", id: "5" }
|
|
1382
|
+
]
|
|
1383
|
+
},
|
|
1384
|
+
{
|
|
1385
|
+
type: "textarea",
|
|
1386
|
+
meta: { name: "asd", fieldKey: "lastComments" },
|
|
1387
|
+
validations: { required: !1 },
|
|
1388
|
+
label: {
|
|
1389
|
+
values: [
|
|
1390
|
+
{
|
|
1391
|
+
conditions: [
|
|
1392
|
+
{
|
|
1393
|
+
fieldName: "satisfactionRating",
|
|
1394
|
+
lessThan: 4
|
|
1395
|
+
}
|
|
1396
|
+
],
|
|
1397
|
+
value: "How can we improve our service? (optional)"
|
|
1398
|
+
}
|
|
1399
|
+
],
|
|
1400
|
+
default: "What you would like to tell us about your experience with this company? (optional)?"
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
]
|
|
1404
|
+
}
|
|
1405
|
+
]
|
|
1406
|
+
}, wa = (e, t) => new Promise((n) => {
|
|
1407
|
+
n({
|
|
1408
|
+
id: "",
|
|
1409
|
+
domainId: "",
|
|
1410
|
+
attributes: {
|
|
1411
|
+
theme: {},
|
|
1412
|
+
useSystemTheme: !0,
|
|
1413
|
+
variant: "primary"
|
|
1414
|
+
},
|
|
1415
|
+
popupForm: {
|
|
1416
|
+
meta: {
|
|
1417
|
+
name: "popupForm"
|
|
1418
|
+
},
|
|
1419
|
+
config: {
|
|
1420
|
+
canReturnToPreviousStep: !0,
|
|
1421
|
+
nextButtonText: "Next",
|
|
1422
|
+
previousButtonText: "Previous",
|
|
1423
|
+
submitButtonText: "Submit",
|
|
1424
|
+
formTitle: "We are looking forward to hear from you!",
|
|
1425
|
+
buttonText: "Feedback"
|
|
1426
|
+
},
|
|
1427
|
+
styles: {
|
|
1428
|
+
left: null,
|
|
1429
|
+
top: 0,
|
|
1430
|
+
bottom: -20,
|
|
1431
|
+
right: 0
|
|
1432
|
+
},
|
|
1433
|
+
form: ar
|
|
1434
|
+
},
|
|
1435
|
+
inlineForm: {
|
|
1436
|
+
meta: {
|
|
1437
|
+
name: "asd"
|
|
1438
|
+
},
|
|
1439
|
+
config: {
|
|
1440
|
+
canReturnToPreviousStep: !0,
|
|
1441
|
+
nextButtonText: "Next",
|
|
1442
|
+
previousButtonText: "Previous",
|
|
1443
|
+
submitButtonText: "Submit",
|
|
1444
|
+
formTitle: "We are looking forward to hear from you!"
|
|
1445
|
+
},
|
|
1446
|
+
form: ar
|
|
1447
|
+
}
|
|
1448
|
+
});
|
|
1449
|
+
}), xa = (e) => {
|
|
1450
|
+
const [t, n] = Ue(), [r, o] = Ue(!0), [i, s] = Ue(null);
|
|
1451
|
+
return We(() => {
|
|
1452
|
+
const d = new AbortController();
|
|
1453
|
+
return o(!0), e(d).then(n).catch(s).finally(() => o(!1)), () => {
|
|
1454
|
+
d.abort();
|
|
1455
|
+
};
|
|
1456
|
+
}, []), { data: t, loading: r, error: i };
|
|
1457
|
+
}, Ye = S.button((e) => {
|
|
1458
|
+
const t = he(), n = Hr(), o = !e.$outlined ? t : "#fff", i = e.$outlined ? t : n, s = e.$outlined ? i : o, d = `calc(${e.theme.sizeField} * 10)`;
|
|
1459
|
+
return {
|
|
1460
|
+
borderRadius: e.theme.radiusField,
|
|
1461
|
+
borderColor: e.disabled ? "#cfcfcf" : s,
|
|
1462
|
+
borderStyle: e.$dashed ? "dashed" : "solid",
|
|
1463
|
+
cursor: "pointer",
|
|
1464
|
+
boxShadow: "inset 0 0 20px 20px transparent",
|
|
1465
|
+
height: d,
|
|
1466
|
+
fontWeight: "600",
|
|
1467
|
+
opacity: e.disabled ? 0.5 : 1,
|
|
1468
|
+
paddingInline: "1.2rem",
|
|
1469
|
+
transition: "all 0.2s ease-in-out",
|
|
1470
|
+
background: e.disabled ? "#cfcfcf" : o,
|
|
1471
|
+
borderWidth: e.theme.borderWidth,
|
|
1472
|
+
userSelect: e.disabled ? "none" : void 0,
|
|
1473
|
+
color: e.disabled ? "#888888" : i,
|
|
1474
|
+
"&:active": {
|
|
1475
|
+
transform: e.disabled ? void 0 : "scale(0.97)"
|
|
1476
|
+
},
|
|
1477
|
+
"&:hover": {
|
|
1478
|
+
opacity: e.disabled ? void 0 : 0.8,
|
|
1479
|
+
cursor: e.disabled ? "auto" : "pointer",
|
|
1480
|
+
boxShadow: e.disabled ? void 0 : "inset 0 0 20px 20px #00000017"
|
|
1481
|
+
},
|
|
1482
|
+
"@media (max-width: 900px)": {
|
|
1483
|
+
paddingInline: "0.5rem"
|
|
1484
|
+
},
|
|
1485
|
+
"@media (max-width: 700px)": {
|
|
1486
|
+
paddingInline: "0.7rem"
|
|
1487
|
+
},
|
|
1488
|
+
"@media (max-width: 400px)": {
|
|
1489
|
+
paddingInline: "0.7rem"
|
|
1490
|
+
}
|
|
1491
|
+
};
|
|
1492
|
+
}), Ca = S.div`
|
|
1493
|
+
visibility: ${(e) => e.$isVisible && e.$height ? "visible" : "hidden"};
|
|
1494
|
+
opacity: ${(e) => e.$isVisible ? 1 : 0};
|
|
1495
|
+
display: flex;
|
|
1496
|
+
min-height: ${(e) => e.$height ? `${e.$height}px` : "auto"};
|
|
1497
|
+
gap: calc(var(--spacing) * 7);
|
|
1498
|
+
top: 0;
|
|
1499
|
+
left: 0;
|
|
1500
|
+
position: ${(e) => e.$isVisible ? "relative" : "absolute"};
|
|
1501
|
+
flex-direction: column;
|
|
1502
|
+
justify-content: flex-start;
|
|
1503
|
+
flex-wrap: wrap;
|
|
1504
|
+
align-content: flex-start;
|
|
1505
|
+
max-width: 100%;
|
|
1506
|
+
@media (max-width: 900px) {
|
|
1507
|
+
min-height: auto;
|
|
1508
|
+
height: ${(e) => e.$isVisible ? "auto" : "0"};
|
|
1509
|
+
width: ${(e) => e.$isVisible ? "auto" : "0"};
|
|
1510
|
+
}
|
|
1511
|
+
`, Vr = (e) => {
|
|
1512
|
+
const t = br(null);
|
|
1513
|
+
return We(() => {
|
|
1514
|
+
t.current && e.onSetMaxHeight(t.current.clientHeight);
|
|
1515
|
+
}, [t]), l.createElement(Ca, {
|
|
1516
|
+
ref: t,
|
|
1517
|
+
$height: e.height,
|
|
1518
|
+
$isVisible: e.isVisible,
|
|
1519
|
+
children: e.children
|
|
1520
|
+
});
|
|
1521
|
+
}, Aa = S.ul`
|
|
1522
|
+
counter-reset: step;
|
|
1523
|
+
grid-auto-columns: 1fr;
|
|
1524
|
+
grid-auto-flow: column;
|
|
1525
|
+
display: inline-grid;
|
|
1526
|
+
overflow: auto hidden;
|
|
1527
|
+
@media (max-width: 900px) {
|
|
1528
|
+
display: none;
|
|
1529
|
+
}
|
|
1530
|
+
`, _a = S.li((e) => {
|
|
1531
|
+
const t = he(e.colorVariant), n = Hr(e.colorVariant), r = e.shouldBeFilled ? t : "var(--color-base-300)", o = e.shouldBeFilled ? n : "var(--color-base-content)";
|
|
1532
|
+
return {
|
|
1533
|
+
textAlign: "center",
|
|
1534
|
+
"--step-bg": r,
|
|
1535
|
+
"--step-fg": o,
|
|
1536
|
+
gridTemplateRows: "40px 1fr",
|
|
1537
|
+
gridTemplateColumns: "auto",
|
|
1538
|
+
gap: ".5rem",
|
|
1539
|
+
placeItems: "center",
|
|
1540
|
+
minWidth: "4rem",
|
|
1541
|
+
display: "grid",
|
|
1542
|
+
"&:not(:first-of-type):before": {
|
|
1543
|
+
width: "100%",
|
|
1544
|
+
height: "0.5rem",
|
|
1545
|
+
color: "var(--step-bg)",
|
|
1546
|
+
backgroundColor: "var(--step-bg)",
|
|
1547
|
+
"--tw-content": "''",
|
|
1548
|
+
content: "var(--tw-content)",
|
|
1549
|
+
border: "1px solid",
|
|
1550
|
+
gridRowStart: "1",
|
|
1551
|
+
gridColumnStart: "1",
|
|
1552
|
+
marginInlineStart: "-100%"
|
|
1553
|
+
},
|
|
1554
|
+
"&:after": {
|
|
1555
|
+
content: "counter(step)",
|
|
1556
|
+
counterIncrement: "step",
|
|
1557
|
+
zIndex: "1",
|
|
1558
|
+
color: "var(--step-fg)",
|
|
1559
|
+
backgroundColor: "var(--step-bg)",
|
|
1560
|
+
border: "1px solid var(--step-bg)",
|
|
1561
|
+
borderRadius: "3.40282e38px",
|
|
1562
|
+
gridRowStart: "1",
|
|
1563
|
+
gridColumnStart: "1",
|
|
1564
|
+
placeSelf: "center",
|
|
1565
|
+
placeItems: "center",
|
|
1566
|
+
width: "2rem",
|
|
1567
|
+
height: "2rem",
|
|
1568
|
+
display: "grid",
|
|
1569
|
+
position: "relative"
|
|
1570
|
+
}
|
|
1571
|
+
};
|
|
1572
|
+
}), Gr = (e) => (console.log("props.currentStepIndex", e.currentStepIndex), l.createElement(Aa, {
|
|
1573
|
+
children: [
|
|
1574
|
+
e.steps.map(
|
|
1575
|
+
(t, n) => l.createElement(_a, {
|
|
1576
|
+
key: t.title,
|
|
1577
|
+
colorVariant: e.colorVariant,
|
|
1578
|
+
shouldBeFilled: e.currentStepIndex >= n,
|
|
1579
|
+
children: t.title
|
|
1580
|
+
})
|
|
1581
|
+
)
|
|
1582
|
+
]
|
|
1583
|
+
})), Ia = {
|
|
1584
|
+
title: {
|
|
1585
|
+
marginTop: "0",
|
|
1586
|
+
marginBottom: ".888889em",
|
|
1587
|
+
fontWeight: "700",
|
|
1588
|
+
fontSize: "2.25em",
|
|
1589
|
+
lineHeight: "1.11111"
|
|
1590
|
+
},
|
|
1591
|
+
subtitle: {
|
|
1592
|
+
marginTop: "2em",
|
|
1593
|
+
fontWeight: "700",
|
|
1594
|
+
marginBottom: "1em",
|
|
1595
|
+
fontSize: "1.5em",
|
|
1596
|
+
lineHeight: "1.33333"
|
|
1597
|
+
},
|
|
1598
|
+
section: {
|
|
1599
|
+
marginBottom: "1em",
|
|
1600
|
+
fontWeight: "600",
|
|
1601
|
+
fontSize: "1.25em",
|
|
1602
|
+
lineHeight: "1.6"
|
|
1603
|
+
},
|
|
1604
|
+
subsection: {
|
|
1605
|
+
marginTop: "1.5em",
|
|
1606
|
+
marginBottom: ".5em",
|
|
1607
|
+
fontWeight: "600",
|
|
1608
|
+
fontSize: "1rem"
|
|
1609
|
+
},
|
|
1610
|
+
paragraph: {
|
|
1611
|
+
marginTop: "0",
|
|
1612
|
+
marginBottom: "1.25em",
|
|
1613
|
+
fontSize: "1rem"
|
|
1614
|
+
}
|
|
1615
|
+
}, Ra = S.div((e) => ({
|
|
1616
|
+
...Ia[e.$variant ?? "paragraph"],
|
|
1617
|
+
color: e.theme.baseContent,
|
|
1618
|
+
...e.$linear ? { margin: "0" } : {}
|
|
1619
|
+
})), le = (e) => l.createElement(Ra, {
|
|
1620
|
+
$variant: e.variant,
|
|
1621
|
+
$linear: e.linear,
|
|
1622
|
+
children: e.children
|
|
1623
|
+
}), ka = (e) => {
|
|
1624
|
+
switch (e) {
|
|
1625
|
+
case "textarea":
|
|
1626
|
+
return "";
|
|
1627
|
+
case "select":
|
|
1628
|
+
return "";
|
|
1629
|
+
case "checkbox-group":
|
|
1630
|
+
return [];
|
|
1631
|
+
case "radio-group":
|
|
1632
|
+
return "";
|
|
1633
|
+
case "matrix":
|
|
1634
|
+
return null;
|
|
1635
|
+
case "range-slide":
|
|
1636
|
+
return null;
|
|
1637
|
+
case "rating":
|
|
1638
|
+
return null;
|
|
1639
|
+
default:
|
|
1640
|
+
return null;
|
|
1641
|
+
}
|
|
1642
|
+
}, jr = (e) => {
|
|
1643
|
+
const t = se(
|
|
1644
|
+
() => e.form.steps.reduce(
|
|
1645
|
+
(s, d, u) => (s.validationsPerStep[u] = {}, s.steps = [
|
|
1646
|
+
...s.steps,
|
|
1647
|
+
{
|
|
1648
|
+
...d,
|
|
1649
|
+
fields: d.fields.map((m) => {
|
|
1650
|
+
const p = m.meta.fieldKey;
|
|
1651
|
+
return p ? (s.validationsPerStep[u][p] = {
|
|
1652
|
+
fieldType: m.type,
|
|
1653
|
+
validations: m.validations
|
|
1654
|
+
}, s.state = {
|
|
1655
|
+
...s.state,
|
|
1656
|
+
[p]: ka(m.type)
|
|
1657
|
+
}, {
|
|
1658
|
+
dataField: p,
|
|
1659
|
+
...m
|
|
1660
|
+
}) : {
|
|
1661
|
+
...m,
|
|
1662
|
+
dataField: null
|
|
1663
|
+
};
|
|
1664
|
+
})
|
|
1665
|
+
}
|
|
1666
|
+
], s),
|
|
1667
|
+
{
|
|
1668
|
+
validationsPerStep: {},
|
|
1669
|
+
state: {},
|
|
1670
|
+
steps: []
|
|
1671
|
+
}
|
|
1672
|
+
),
|
|
1673
|
+
[e.form]
|
|
1674
|
+
), [n, r] = Ue(t.state), o = xe(
|
|
1675
|
+
(s, d) => {
|
|
1676
|
+
s !== null && r((u) => ({
|
|
1677
|
+
...u,
|
|
1678
|
+
[s]: d
|
|
1679
|
+
}));
|
|
1680
|
+
},
|
|
1681
|
+
[r]
|
|
1682
|
+
), i = xe(
|
|
1683
|
+
(s) => s ? n[s] : null,
|
|
1684
|
+
[n]
|
|
1685
|
+
);
|
|
1686
|
+
return {
|
|
1687
|
+
steps: t.steps,
|
|
1688
|
+
validationsPerStep: t.validationsPerStep,
|
|
1689
|
+
state: n,
|
|
1690
|
+
setStateByKey: o,
|
|
1691
|
+
getStateByKey: i
|
|
1692
|
+
};
|
|
1693
|
+
}, Oa = Ta(), Pa = (e, t) => Oa.post("/feedback-receiver", e, t);
|
|
1694
|
+
/*! @license DOMPurify 3.2.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.7/LICENSE */
|
|
1695
|
+
const {
|
|
1696
|
+
entries: Yr,
|
|
1697
|
+
setPrototypeOf: ir,
|
|
1698
|
+
isFrozen: Na,
|
|
1699
|
+
getPrototypeOf: $a,
|
|
1700
|
+
getOwnPropertyDescriptor: Da
|
|
1701
|
+
} = Object;
|
|
1702
|
+
let {
|
|
1703
|
+
freeze: q,
|
|
1704
|
+
seal: Q,
|
|
1705
|
+
create: qr
|
|
1706
|
+
} = Object, {
|
|
1707
|
+
apply: yn,
|
|
1708
|
+
construct: vn
|
|
1709
|
+
} = typeof Reflect < "u" && Reflect;
|
|
1710
|
+
q || (q = function(t) {
|
|
1711
|
+
return t;
|
|
1712
|
+
});
|
|
1713
|
+
Q || (Q = function(t) {
|
|
1714
|
+
return t;
|
|
1715
|
+
});
|
|
1716
|
+
yn || (yn = function(t, n) {
|
|
1717
|
+
for (var r = arguments.length, o = new Array(r > 2 ? r - 2 : 0), i = 2; i < r; i++)
|
|
1718
|
+
o[i - 2] = arguments[i];
|
|
1719
|
+
return t.apply(n, o);
|
|
1720
|
+
});
|
|
1721
|
+
vn || (vn = function(t) {
|
|
1722
|
+
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++)
|
|
1723
|
+
r[o - 1] = arguments[o];
|
|
1724
|
+
return new t(...r);
|
|
1725
|
+
});
|
|
1726
|
+
const Tt = K(Array.prototype.forEach), La = K(Array.prototype.lastIndexOf), sr = K(Array.prototype.pop), rt = K(Array.prototype.push), Ma = K(Array.prototype.splice), kt = K(String.prototype.toLowerCase), on = K(String.prototype.toString), an = K(String.prototype.match), ot = K(String.prototype.replace), Fa = K(String.prototype.indexOf), za = K(String.prototype.trim), re = K(Object.prototype.hasOwnProperty), Y = K(RegExp.prototype.test), at = Ba(TypeError);
|
|
1727
|
+
function K(e) {
|
|
1728
|
+
return function(t) {
|
|
1729
|
+
t instanceof RegExp && (t.lastIndex = 0);
|
|
1730
|
+
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++)
|
|
1731
|
+
r[o - 1] = arguments[o];
|
|
1732
|
+
return yn(e, t, r);
|
|
1733
|
+
};
|
|
1734
|
+
}
|
|
1735
|
+
function Ba(e) {
|
|
1736
|
+
return function() {
|
|
1737
|
+
for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
|
|
1738
|
+
n[r] = arguments[r];
|
|
1739
|
+
return vn(e, n);
|
|
1740
|
+
};
|
|
1741
|
+
}
|
|
1742
|
+
function E(e, t) {
|
|
1743
|
+
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : kt;
|
|
1744
|
+
ir && ir(e, null);
|
|
1745
|
+
let r = t.length;
|
|
1746
|
+
for (; r--; ) {
|
|
1747
|
+
let o = t[r];
|
|
1748
|
+
if (typeof o == "string") {
|
|
1749
|
+
const i = n(o);
|
|
1750
|
+
i !== o && (Na(t) || (t[r] = i), o = i);
|
|
1751
|
+
}
|
|
1752
|
+
e[o] = !0;
|
|
1753
|
+
}
|
|
1754
|
+
return e;
|
|
1755
|
+
}
|
|
1756
|
+
function Ua(e) {
|
|
1757
|
+
for (let t = 0; t < e.length; t++)
|
|
1758
|
+
re(e, t) || (e[t] = null);
|
|
1759
|
+
return e;
|
|
1760
|
+
}
|
|
1761
|
+
function fe(e) {
|
|
1762
|
+
const t = qr(null);
|
|
1763
|
+
for (const [n, r] of Yr(e))
|
|
1764
|
+
re(e, n) && (Array.isArray(r) ? t[n] = Ua(r) : r && typeof r == "object" && r.constructor === Object ? t[n] = fe(r) : t[n] = r);
|
|
1765
|
+
return t;
|
|
1766
|
+
}
|
|
1767
|
+
function it(e, t) {
|
|
1768
|
+
for (; e !== null; ) {
|
|
1769
|
+
const r = Da(e, t);
|
|
1770
|
+
if (r) {
|
|
1771
|
+
if (r.get)
|
|
1772
|
+
return K(r.get);
|
|
1773
|
+
if (typeof r.value == "function")
|
|
1774
|
+
return K(r.value);
|
|
1775
|
+
}
|
|
1776
|
+
e = $a(e);
|
|
1777
|
+
}
|
|
1778
|
+
function n() {
|
|
1779
|
+
return null;
|
|
1780
|
+
}
|
|
1781
|
+
return n;
|
|
1782
|
+
}
|
|
1783
|
+
const lr = q(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), sn = q(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "slot", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), ln = q(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Wa = q(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), cn = q(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Ha = q(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), cr = q(["#text"]), ur = q(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), un = q(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), dr = q(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), wt = q(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Va = Q(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Ga = Q(/<%[\w\W]*|[\w\W]*%>/gm), ja = Q(/\$\{[\w\W]*/gm), Ya = Q(/^data-[\-\w.\u00B7-\uFFFF]+$/), qa = Q(/^aria-[\-\w]+$/), Kr = Q(
|
|
1784
|
+
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
1785
|
+
// eslint-disable-line no-useless-escape
|
|
1786
|
+
), Ka = Q(/^(?:\w+script|data):/i), Xa = Q(
|
|
1787
|
+
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
1788
|
+
// eslint-disable-line no-control-regex
|
|
1789
|
+
), Xr = Q(/^html$/i), Za = Q(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
1790
|
+
var fr = /* @__PURE__ */ Object.freeze({
|
|
1791
|
+
__proto__: null,
|
|
1792
|
+
ARIA_ATTR: qa,
|
|
1793
|
+
ATTR_WHITESPACE: Xa,
|
|
1794
|
+
CUSTOM_ELEMENT: Za,
|
|
1795
|
+
DATA_ATTR: Ya,
|
|
1796
|
+
DOCTYPE_NAME: Xr,
|
|
1797
|
+
ERB_EXPR: Ga,
|
|
1798
|
+
IS_ALLOWED_URI: Kr,
|
|
1799
|
+
IS_SCRIPT_OR_DATA: Ka,
|
|
1800
|
+
MUSTACHE_EXPR: Va,
|
|
1801
|
+
TMPLIT_EXPR: ja
|
|
1802
|
+
});
|
|
1803
|
+
const st = {
|
|
1804
|
+
element: 1,
|
|
1805
|
+
text: 3,
|
|
1806
|
+
// Deprecated
|
|
1807
|
+
progressingInstruction: 7,
|
|
1808
|
+
comment: 8,
|
|
1809
|
+
document: 9
|
|
1810
|
+
}, Qa = function() {
|
|
1811
|
+
return typeof window > "u" ? null : window;
|
|
1812
|
+
}, Ja = function(t, n) {
|
|
1813
|
+
if (typeof t != "object" || typeof t.createPolicy != "function")
|
|
1814
|
+
return null;
|
|
1815
|
+
let r = null;
|
|
1816
|
+
const o = "data-tt-policy-suffix";
|
|
1817
|
+
n && n.hasAttribute(o) && (r = n.getAttribute(o));
|
|
1818
|
+
const i = "dompurify" + (r ? "#" + r : "");
|
|
1819
|
+
try {
|
|
1820
|
+
return t.createPolicy(i, {
|
|
1821
|
+
createHTML(s) {
|
|
1822
|
+
return s;
|
|
1823
|
+
},
|
|
1824
|
+
createScriptURL(s) {
|
|
1825
|
+
return s;
|
|
1826
|
+
}
|
|
1827
|
+
});
|
|
1828
|
+
} catch {
|
|
1829
|
+
return console.warn("TrustedTypes policy " + i + " could not be created."), null;
|
|
1830
|
+
}
|
|
1831
|
+
}, mr = function() {
|
|
1832
|
+
return {
|
|
1833
|
+
afterSanitizeAttributes: [],
|
|
1834
|
+
afterSanitizeElements: [],
|
|
1835
|
+
afterSanitizeShadowDOM: [],
|
|
1836
|
+
beforeSanitizeAttributes: [],
|
|
1837
|
+
beforeSanitizeElements: [],
|
|
1838
|
+
beforeSanitizeShadowDOM: [],
|
|
1839
|
+
uponSanitizeAttribute: [],
|
|
1840
|
+
uponSanitizeElement: [],
|
|
1841
|
+
uponSanitizeShadowNode: []
|
|
1842
|
+
};
|
|
1843
|
+
};
|
|
1844
|
+
function Zr() {
|
|
1845
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Qa();
|
|
1846
|
+
const t = (h) => Zr(h);
|
|
1847
|
+
if (t.version = "3.2.7", t.removed = [], !e || !e.document || e.document.nodeType !== st.document || !e.Element)
|
|
1848
|
+
return t.isSupported = !1, t;
|
|
1849
|
+
let {
|
|
1850
|
+
document: n
|
|
1851
|
+
} = e;
|
|
1852
|
+
const r = n, o = r.currentScript, {
|
|
1853
|
+
DocumentFragment: i,
|
|
1854
|
+
HTMLTemplateElement: s,
|
|
1855
|
+
Node: d,
|
|
1856
|
+
Element: u,
|
|
1857
|
+
NodeFilter: m,
|
|
1858
|
+
NamedNodeMap: p = e.NamedNodeMap || e.MozNamedAttrMap,
|
|
1859
|
+
HTMLFormElement: T,
|
|
1860
|
+
DOMParser: w,
|
|
1861
|
+
trustedTypes: v
|
|
1862
|
+
} = e, A = u.prototype, $ = it(A, "cloneNode"), G = it(A, "remove"), D = it(A, "nextSibling"), O = it(A, "childNodes"), _ = it(A, "parentNode");
|
|
1863
|
+
if (typeof s == "function") {
|
|
1864
|
+
const h = n.createElement("template");
|
|
1865
|
+
h.content && h.content.ownerDocument && (n = h.content.ownerDocument);
|
|
1866
|
+
}
|
|
1867
|
+
let b, R = "";
|
|
1868
|
+
const {
|
|
1869
|
+
implementation: x,
|
|
1870
|
+
createNodeIterator: y,
|
|
1871
|
+
createDocumentFragment: pe,
|
|
1872
|
+
getElementsByTagName: ke
|
|
1873
|
+
} = n, {
|
|
1874
|
+
importNode: Wt
|
|
1875
|
+
} = r;
|
|
1876
|
+
let U = mr();
|
|
1877
|
+
t.isSupported = typeof Yr == "function" && typeof _ == "function" && x && x.createHTMLDocument !== void 0;
|
|
1878
|
+
const {
|
|
1879
|
+
MUSTACHE_EXPR: Xe,
|
|
1880
|
+
ERB_EXPR: Ze,
|
|
1881
|
+
TMPLIT_EXPR: Qe,
|
|
1882
|
+
DATA_ATTR: Ht,
|
|
1883
|
+
ARIA_ATTR: Vt,
|
|
1884
|
+
IS_SCRIPT_OR_DATA: Je,
|
|
1885
|
+
ATTR_WHITESPACE: et,
|
|
1886
|
+
CUSTOM_ELEMENT: J
|
|
1887
|
+
} = fr;
|
|
1888
|
+
let {
|
|
1889
|
+
IS_ALLOWED_URI: ve
|
|
1890
|
+
} = fr, P = null;
|
|
1891
|
+
const ee = E({}, [...lr, ...sn, ...ln, ...cn, ...cr]);
|
|
1892
|
+
let L = null;
|
|
1893
|
+
const Oe = E({}, [...ur, ...un, ...dr, ...wt]);
|
|
1894
|
+
let I = Object.seal(qr(null, {
|
|
1895
|
+
tagNameCheck: {
|
|
1896
|
+
writable: !0,
|
|
1897
|
+
configurable: !1,
|
|
1898
|
+
enumerable: !0,
|
|
1899
|
+
value: null
|
|
1900
|
+
},
|
|
1901
|
+
attributeNameCheck: {
|
|
1902
|
+
writable: !0,
|
|
1903
|
+
configurable: !1,
|
|
1904
|
+
enumerable: !0,
|
|
1905
|
+
value: null
|
|
1906
|
+
},
|
|
1907
|
+
allowCustomizedBuiltInElements: {
|
|
1908
|
+
writable: !0,
|
|
1909
|
+
configurable: !1,
|
|
1910
|
+
enumerable: !0,
|
|
1911
|
+
value: !1
|
|
1912
|
+
}
|
|
1913
|
+
})), te = null, ge = null, be = !0, ne = !0, Pe = !1, Ee = !0, j = !1, ft = !0, Se = !1, Gt = !1, jt = !1, Ne = !1, mt = !1, ht = !1, Cn = !0, An = !1;
|
|
1914
|
+
const to = "user-content-";
|
|
1915
|
+
let Yt = !0, tt = !1, $e = {}, De = null;
|
|
1916
|
+
const _n = E({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
1917
|
+
let In = null;
|
|
1918
|
+
const Rn = E({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
1919
|
+
let qt = null;
|
|
1920
|
+
const kn = E({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), pt = "http://www.w3.org/1998/Math/MathML", gt = "http://www.w3.org/2000/svg", ce = "http://www.w3.org/1999/xhtml";
|
|
1921
|
+
let Le = ce, Kt = !1, Xt = null;
|
|
1922
|
+
const no = E({}, [pt, gt, ce], on);
|
|
1923
|
+
let bt = E({}, ["mi", "mo", "mn", "ms", "mtext"]), yt = E({}, ["annotation-xml"]);
|
|
1924
|
+
const ro = E({}, ["title", "style", "font", "a", "script"]);
|
|
1925
|
+
let nt = null;
|
|
1926
|
+
const oo = ["application/xhtml+xml", "text/html"], ao = "text/html";
|
|
1927
|
+
let z = null, Me = null;
|
|
1928
|
+
const io = n.createElement("form"), On = function(a) {
|
|
1929
|
+
return a instanceof RegExp || a instanceof Function;
|
|
1930
|
+
}, Zt = function() {
|
|
1931
|
+
let a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1932
|
+
if (!(Me && Me === a)) {
|
|
1933
|
+
if ((!a || typeof a != "object") && (a = {}), a = fe(a), nt = // eslint-disable-next-line unicorn/prefer-includes
|
|
1934
|
+
oo.indexOf(a.PARSER_MEDIA_TYPE) === -1 ? ao : a.PARSER_MEDIA_TYPE, z = nt === "application/xhtml+xml" ? on : kt, P = re(a, "ALLOWED_TAGS") ? E({}, a.ALLOWED_TAGS, z) : ee, L = re(a, "ALLOWED_ATTR") ? E({}, a.ALLOWED_ATTR, z) : Oe, Xt = re(a, "ALLOWED_NAMESPACES") ? E({}, a.ALLOWED_NAMESPACES, on) : no, qt = re(a, "ADD_URI_SAFE_ATTR") ? E(fe(kn), a.ADD_URI_SAFE_ATTR, z) : kn, In = re(a, "ADD_DATA_URI_TAGS") ? E(fe(Rn), a.ADD_DATA_URI_TAGS, z) : Rn, De = re(a, "FORBID_CONTENTS") ? E({}, a.FORBID_CONTENTS, z) : _n, te = re(a, "FORBID_TAGS") ? E({}, a.FORBID_TAGS, z) : fe({}), ge = re(a, "FORBID_ATTR") ? E({}, a.FORBID_ATTR, z) : fe({}), $e = re(a, "USE_PROFILES") ? a.USE_PROFILES : !1, be = a.ALLOW_ARIA_ATTR !== !1, ne = a.ALLOW_DATA_ATTR !== !1, Pe = a.ALLOW_UNKNOWN_PROTOCOLS || !1, Ee = a.ALLOW_SELF_CLOSE_IN_ATTR !== !1, j = a.SAFE_FOR_TEMPLATES || !1, ft = a.SAFE_FOR_XML !== !1, Se = a.WHOLE_DOCUMENT || !1, Ne = a.RETURN_DOM || !1, mt = a.RETURN_DOM_FRAGMENT || !1, ht = a.RETURN_TRUSTED_TYPE || !1, jt = a.FORCE_BODY || !1, Cn = a.SANITIZE_DOM !== !1, An = a.SANITIZE_NAMED_PROPS || !1, Yt = a.KEEP_CONTENT !== !1, tt = a.IN_PLACE || !1, ve = a.ALLOWED_URI_REGEXP || Kr, Le = a.NAMESPACE || ce, bt = a.MATHML_TEXT_INTEGRATION_POINTS || bt, yt = a.HTML_INTEGRATION_POINTS || yt, I = a.CUSTOM_ELEMENT_HANDLING || {}, a.CUSTOM_ELEMENT_HANDLING && On(a.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (I.tagNameCheck = a.CUSTOM_ELEMENT_HANDLING.tagNameCheck), a.CUSTOM_ELEMENT_HANDLING && On(a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (I.attributeNameCheck = a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), a.CUSTOM_ELEMENT_HANDLING && typeof a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (I.allowCustomizedBuiltInElements = a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), j && (ne = !1), mt && (Ne = !0), $e && (P = E({}, cr), L = [], $e.html === !0 && (E(P, lr), E(L, ur)), $e.svg === !0 && (E(P, sn), E(L, un), E(L, wt)), $e.svgFilters === !0 && (E(P, ln), E(L, un), E(L, wt)), $e.mathMl === !0 && (E(P, cn), E(L, dr), E(L, wt))), a.ADD_TAGS && (P === ee && (P = fe(P)), E(P, a.ADD_TAGS, z)), a.ADD_ATTR && (L === Oe && (L = fe(L)), E(L, a.ADD_ATTR, z)), a.ADD_URI_SAFE_ATTR && E(qt, a.ADD_URI_SAFE_ATTR, z), a.FORBID_CONTENTS && (De === _n && (De = fe(De)), E(De, a.FORBID_CONTENTS, z)), Yt && (P["#text"] = !0), Se && E(P, ["html", "head", "body"]), P.table && (E(P, ["tbody"]), delete te.tbody), a.TRUSTED_TYPES_POLICY) {
|
|
1935
|
+
if (typeof a.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
1936
|
+
throw at('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
1937
|
+
if (typeof a.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
1938
|
+
throw at('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
1939
|
+
b = a.TRUSTED_TYPES_POLICY, R = b.createHTML("");
|
|
1940
|
+
} else
|
|
1941
|
+
b === void 0 && (b = Ja(v, o)), b !== null && typeof R == "string" && (R = b.createHTML(""));
|
|
1942
|
+
q && q(a), Me = a;
|
|
1943
|
+
}
|
|
1944
|
+
}, Pn = E({}, [...sn, ...ln, ...Wa]), Nn = E({}, [...cn, ...Ha]), so = function(a) {
|
|
1945
|
+
let c = _(a);
|
|
1946
|
+
(!c || !c.tagName) && (c = {
|
|
1947
|
+
namespaceURI: Le,
|
|
1948
|
+
tagName: "template"
|
|
1949
|
+
});
|
|
1950
|
+
const f = kt(a.tagName), N = kt(c.tagName);
|
|
1951
|
+
return Xt[a.namespaceURI] ? a.namespaceURI === gt ? c.namespaceURI === ce ? f === "svg" : c.namespaceURI === pt ? f === "svg" && (N === "annotation-xml" || bt[N]) : !!Pn[f] : a.namespaceURI === pt ? c.namespaceURI === ce ? f === "math" : c.namespaceURI === gt ? f === "math" && yt[N] : !!Nn[f] : a.namespaceURI === ce ? c.namespaceURI === gt && !yt[N] || c.namespaceURI === pt && !bt[N] ? !1 : !Nn[f] && (ro[f] || !Pn[f]) : !!(nt === "application/xhtml+xml" && Xt[a.namespaceURI]) : !1;
|
|
1952
|
+
}, ae = function(a) {
|
|
1953
|
+
rt(t.removed, {
|
|
1954
|
+
element: a
|
|
1955
|
+
});
|
|
1956
|
+
try {
|
|
1957
|
+
_(a).removeChild(a);
|
|
1958
|
+
} catch {
|
|
1959
|
+
G(a);
|
|
1960
|
+
}
|
|
1961
|
+
}, Te = function(a, c) {
|
|
1962
|
+
try {
|
|
1963
|
+
rt(t.removed, {
|
|
1964
|
+
attribute: c.getAttributeNode(a),
|
|
1965
|
+
from: c
|
|
1966
|
+
});
|
|
1967
|
+
} catch {
|
|
1968
|
+
rt(t.removed, {
|
|
1969
|
+
attribute: null,
|
|
1970
|
+
from: c
|
|
1971
|
+
});
|
|
1972
|
+
}
|
|
1973
|
+
if (c.removeAttribute(a), a === "is")
|
|
1974
|
+
if (Ne || mt)
|
|
1975
|
+
try {
|
|
1976
|
+
ae(c);
|
|
1977
|
+
} catch {
|
|
1978
|
+
}
|
|
1979
|
+
else
|
|
1980
|
+
try {
|
|
1981
|
+
c.setAttribute(a, "");
|
|
1982
|
+
} catch {
|
|
1983
|
+
}
|
|
1984
|
+
}, $n = function(a) {
|
|
1985
|
+
let c = null, f = null;
|
|
1986
|
+
if (jt)
|
|
1987
|
+
a = "<remove></remove>" + a;
|
|
1988
|
+
else {
|
|
1989
|
+
const M = an(a, /^[\r\n\t ]+/);
|
|
1990
|
+
f = M && M[0];
|
|
1991
|
+
}
|
|
1992
|
+
nt === "application/xhtml+xml" && Le === ce && (a = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + a + "</body></html>");
|
|
1993
|
+
const N = b ? b.createHTML(a) : a;
|
|
1994
|
+
if (Le === ce)
|
|
1995
|
+
try {
|
|
1996
|
+
c = new w().parseFromString(N, nt);
|
|
1997
|
+
} catch {
|
|
1998
|
+
}
|
|
1999
|
+
if (!c || !c.documentElement) {
|
|
2000
|
+
c = x.createDocument(Le, "template", null);
|
|
2001
|
+
try {
|
|
2002
|
+
c.documentElement.innerHTML = Kt ? R : N;
|
|
2003
|
+
} catch {
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
const H = c.body || c.documentElement;
|
|
2007
|
+
return a && f && H.insertBefore(n.createTextNode(f), H.childNodes[0] || null), Le === ce ? ke.call(c, Se ? "html" : "body")[0] : Se ? c.documentElement : H;
|
|
2008
|
+
}, Dn = function(a) {
|
|
2009
|
+
return y.call(
|
|
2010
|
+
a.ownerDocument || a,
|
|
2011
|
+
a,
|
|
2012
|
+
// eslint-disable-next-line no-bitwise
|
|
2013
|
+
m.SHOW_ELEMENT | m.SHOW_COMMENT | m.SHOW_TEXT | m.SHOW_PROCESSING_INSTRUCTION | m.SHOW_CDATA_SECTION,
|
|
2014
|
+
null
|
|
2015
|
+
);
|
|
2016
|
+
}, Qt = function(a) {
|
|
2017
|
+
return a instanceof T && (typeof a.nodeName != "string" || typeof a.textContent != "string" || typeof a.removeChild != "function" || !(a.attributes instanceof p) || typeof a.removeAttribute != "function" || typeof a.setAttribute != "function" || typeof a.namespaceURI != "string" || typeof a.insertBefore != "function" || typeof a.hasChildNodes != "function");
|
|
2018
|
+
}, Ln = function(a) {
|
|
2019
|
+
return typeof d == "function" && a instanceof d;
|
|
2020
|
+
};
|
|
2021
|
+
function ue(h, a, c) {
|
|
2022
|
+
Tt(h, (f) => {
|
|
2023
|
+
f.call(t, a, c, Me);
|
|
2024
|
+
});
|
|
2025
|
+
}
|
|
2026
|
+
const Mn = function(a) {
|
|
2027
|
+
let c = null;
|
|
2028
|
+
if (ue(U.beforeSanitizeElements, a, null), Qt(a))
|
|
2029
|
+
return ae(a), !0;
|
|
2030
|
+
const f = z(a.nodeName);
|
|
2031
|
+
if (ue(U.uponSanitizeElement, a, {
|
|
2032
|
+
tagName: f,
|
|
2033
|
+
allowedTags: P
|
|
2034
|
+
}), ft && a.hasChildNodes() && !Ln(a.firstElementChild) && Y(/<[/\w!]/g, a.innerHTML) && Y(/<[/\w!]/g, a.textContent) || a.nodeType === st.progressingInstruction || ft && a.nodeType === st.comment && Y(/<[/\w]/g, a.data))
|
|
2035
|
+
return ae(a), !0;
|
|
2036
|
+
if (!P[f] || te[f]) {
|
|
2037
|
+
if (!te[f] && zn(f) && (I.tagNameCheck instanceof RegExp && Y(I.tagNameCheck, f) || I.tagNameCheck instanceof Function && I.tagNameCheck(f)))
|
|
2038
|
+
return !1;
|
|
2039
|
+
if (Yt && !De[f]) {
|
|
2040
|
+
const N = _(a) || a.parentNode, H = O(a) || a.childNodes;
|
|
2041
|
+
if (H && N) {
|
|
2042
|
+
const M = H.length;
|
|
2043
|
+
for (let X = M - 1; X >= 0; --X) {
|
|
2044
|
+
const de = $(H[X], !0);
|
|
2045
|
+
de.__removalCount = (a.__removalCount || 0) + 1, N.insertBefore(de, D(a));
|
|
2046
|
+
}
|
|
2047
|
+
}
|
|
2048
|
+
}
|
|
2049
|
+
return ae(a), !0;
|
|
2050
|
+
}
|
|
2051
|
+
return a instanceof u && !so(a) || (f === "noscript" || f === "noembed" || f === "noframes") && Y(/<\/no(script|embed|frames)/i, a.innerHTML) ? (ae(a), !0) : (j && a.nodeType === st.text && (c = a.textContent, Tt([Xe, Ze, Qe], (N) => {
|
|
2052
|
+
c = ot(c, N, " ");
|
|
2053
|
+
}), a.textContent !== c && (rt(t.removed, {
|
|
2054
|
+
element: a.cloneNode()
|
|
2055
|
+
}), a.textContent = c)), ue(U.afterSanitizeElements, a, null), !1);
|
|
2056
|
+
}, Fn = function(a, c, f) {
|
|
2057
|
+
if (Cn && (c === "id" || c === "name") && (f in n || f in io))
|
|
2058
|
+
return !1;
|
|
2059
|
+
if (!(ne && !ge[c] && Y(Ht, c))) {
|
|
2060
|
+
if (!(be && Y(Vt, c))) {
|
|
2061
|
+
if (!L[c] || ge[c]) {
|
|
2062
|
+
if (
|
|
2063
|
+
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
2064
|
+
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
2065
|
+
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
2066
|
+
!(zn(a) && (I.tagNameCheck instanceof RegExp && Y(I.tagNameCheck, a) || I.tagNameCheck instanceof Function && I.tagNameCheck(a)) && (I.attributeNameCheck instanceof RegExp && Y(I.attributeNameCheck, c) || I.attributeNameCheck instanceof Function && I.attributeNameCheck(c, a)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
2067
|
+
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
2068
|
+
c === "is" && I.allowCustomizedBuiltInElements && (I.tagNameCheck instanceof RegExp && Y(I.tagNameCheck, f) || I.tagNameCheck instanceof Function && I.tagNameCheck(f)))
|
|
2069
|
+
) return !1;
|
|
2070
|
+
} else if (!qt[c]) {
|
|
2071
|
+
if (!Y(ve, ot(f, et, ""))) {
|
|
2072
|
+
if (!((c === "src" || c === "xlink:href" || c === "href") && a !== "script" && Fa(f, "data:") === 0 && In[a])) {
|
|
2073
|
+
if (!(Pe && !Y(Je, ot(f, et, "")))) {
|
|
2074
|
+
if (f)
|
|
2075
|
+
return !1;
|
|
2076
|
+
}
|
|
2077
|
+
}
|
|
2078
|
+
}
|
|
2079
|
+
}
|
|
2080
|
+
}
|
|
2081
|
+
}
|
|
2082
|
+
return !0;
|
|
2083
|
+
}, zn = function(a) {
|
|
2084
|
+
return a !== "annotation-xml" && an(a, J);
|
|
2085
|
+
}, Bn = function(a) {
|
|
2086
|
+
ue(U.beforeSanitizeAttributes, a, null);
|
|
2087
|
+
const {
|
|
2088
|
+
attributes: c
|
|
2089
|
+
} = a;
|
|
2090
|
+
if (!c || Qt(a))
|
|
2091
|
+
return;
|
|
2092
|
+
const f = {
|
|
2093
|
+
attrName: "",
|
|
2094
|
+
attrValue: "",
|
|
2095
|
+
keepAttr: !0,
|
|
2096
|
+
allowedAttributes: L,
|
|
2097
|
+
forceKeepAttr: void 0
|
|
2098
|
+
};
|
|
2099
|
+
let N = c.length;
|
|
2100
|
+
for (; N--; ) {
|
|
2101
|
+
const H = c[N], {
|
|
2102
|
+
name: M,
|
|
2103
|
+
namespaceURI: X,
|
|
2104
|
+
value: de
|
|
2105
|
+
} = H, Fe = z(M), Jt = de;
|
|
2106
|
+
let W = M === "value" ? Jt : za(Jt);
|
|
2107
|
+
if (f.attrName = Fe, f.attrValue = W, f.keepAttr = !0, f.forceKeepAttr = void 0, ue(U.uponSanitizeAttribute, a, f), W = f.attrValue, An && (Fe === "id" || Fe === "name") && (Te(M, a), W = to + W), ft && Y(/((--!?|])>)|<\/(style|title|textarea)/i, W)) {
|
|
2108
|
+
Te(M, a);
|
|
2109
|
+
continue;
|
|
2110
|
+
}
|
|
2111
|
+
if (Fe === "attributename" && an(W, "href")) {
|
|
2112
|
+
Te(M, a);
|
|
2113
|
+
continue;
|
|
2114
|
+
}
|
|
2115
|
+
if (f.forceKeepAttr)
|
|
2116
|
+
continue;
|
|
2117
|
+
if (!f.keepAttr) {
|
|
2118
|
+
Te(M, a);
|
|
2119
|
+
continue;
|
|
2120
|
+
}
|
|
2121
|
+
if (!Ee && Y(/\/>/i, W)) {
|
|
2122
|
+
Te(M, a);
|
|
2123
|
+
continue;
|
|
2124
|
+
}
|
|
2125
|
+
j && Tt([Xe, Ze, Qe], (Wn) => {
|
|
2126
|
+
W = ot(W, Wn, " ");
|
|
2127
|
+
});
|
|
2128
|
+
const Un = z(a.nodeName);
|
|
2129
|
+
if (!Fn(Un, Fe, W)) {
|
|
2130
|
+
Te(M, a);
|
|
2131
|
+
continue;
|
|
2132
|
+
}
|
|
2133
|
+
if (b && typeof v == "object" && typeof v.getAttributeType == "function" && !X)
|
|
2134
|
+
switch (v.getAttributeType(Un, Fe)) {
|
|
2135
|
+
case "TrustedHTML": {
|
|
2136
|
+
W = b.createHTML(W);
|
|
2137
|
+
break;
|
|
2138
|
+
}
|
|
2139
|
+
case "TrustedScriptURL": {
|
|
2140
|
+
W = b.createScriptURL(W);
|
|
2141
|
+
break;
|
|
2142
|
+
}
|
|
2143
|
+
}
|
|
2144
|
+
if (W !== Jt)
|
|
2145
|
+
try {
|
|
2146
|
+
X ? a.setAttributeNS(X, M, W) : a.setAttribute(M, W), Qt(a) ? ae(a) : sr(t.removed);
|
|
2147
|
+
} catch {
|
|
2148
|
+
Te(M, a);
|
|
2149
|
+
}
|
|
2150
|
+
}
|
|
2151
|
+
ue(U.afterSanitizeAttributes, a, null);
|
|
2152
|
+
}, lo = function h(a) {
|
|
2153
|
+
let c = null;
|
|
2154
|
+
const f = Dn(a);
|
|
2155
|
+
for (ue(U.beforeSanitizeShadowDOM, a, null); c = f.nextNode(); )
|
|
2156
|
+
ue(U.uponSanitizeShadowNode, c, null), Mn(c), Bn(c), c.content instanceof i && h(c.content);
|
|
2157
|
+
ue(U.afterSanitizeShadowDOM, a, null);
|
|
2158
|
+
};
|
|
2159
|
+
return t.sanitize = function(h) {
|
|
2160
|
+
let a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, c = null, f = null, N = null, H = null;
|
|
2161
|
+
if (Kt = !h, Kt && (h = "<!-->"), typeof h != "string" && !Ln(h))
|
|
2162
|
+
if (typeof h.toString == "function") {
|
|
2163
|
+
if (h = h.toString(), typeof h != "string")
|
|
2164
|
+
throw at("dirty is not a string, aborting");
|
|
2165
|
+
} else
|
|
2166
|
+
throw at("toString is not a function");
|
|
2167
|
+
if (!t.isSupported)
|
|
2168
|
+
return h;
|
|
2169
|
+
if (Gt || Zt(a), t.removed = [], typeof h == "string" && (tt = !1), tt) {
|
|
2170
|
+
if (h.nodeName) {
|
|
2171
|
+
const de = z(h.nodeName);
|
|
2172
|
+
if (!P[de] || te[de])
|
|
2173
|
+
throw at("root node is forbidden and cannot be sanitized in-place");
|
|
2174
|
+
}
|
|
2175
|
+
} else if (h instanceof d)
|
|
2176
|
+
c = $n("<!---->"), f = c.ownerDocument.importNode(h, !0), f.nodeType === st.element && f.nodeName === "BODY" || f.nodeName === "HTML" ? c = f : c.appendChild(f);
|
|
2177
|
+
else {
|
|
2178
|
+
if (!Ne && !j && !Se && // eslint-disable-next-line unicorn/prefer-includes
|
|
2179
|
+
h.indexOf("<") === -1)
|
|
2180
|
+
return b && ht ? b.createHTML(h) : h;
|
|
2181
|
+
if (c = $n(h), !c)
|
|
2182
|
+
return Ne ? null : ht ? R : "";
|
|
2183
|
+
}
|
|
2184
|
+
c && jt && ae(c.firstChild);
|
|
2185
|
+
const M = Dn(tt ? h : c);
|
|
2186
|
+
for (; N = M.nextNode(); )
|
|
2187
|
+
Mn(N), Bn(N), N.content instanceof i && lo(N.content);
|
|
2188
|
+
if (tt)
|
|
2189
|
+
return h;
|
|
2190
|
+
if (Ne) {
|
|
2191
|
+
if (mt)
|
|
2192
|
+
for (H = pe.call(c.ownerDocument); c.firstChild; )
|
|
2193
|
+
H.appendChild(c.firstChild);
|
|
2194
|
+
else
|
|
2195
|
+
H = c;
|
|
2196
|
+
return (L.shadowroot || L.shadowrootmode) && (H = Wt.call(r, H, !0)), H;
|
|
2197
|
+
}
|
|
2198
|
+
let X = Se ? c.outerHTML : c.innerHTML;
|
|
2199
|
+
return Se && P["!doctype"] && c.ownerDocument && c.ownerDocument.doctype && c.ownerDocument.doctype.name && Y(Xr, c.ownerDocument.doctype.name) && (X = "<!DOCTYPE " + c.ownerDocument.doctype.name + `>
|
|
2200
|
+
` + X), j && Tt([Xe, Ze, Qe], (de) => {
|
|
2201
|
+
X = ot(X, de, " ");
|
|
2202
|
+
}), b && ht ? b.createHTML(X) : X;
|
|
2203
|
+
}, t.setConfig = function() {
|
|
2204
|
+
let h = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2205
|
+
Zt(h), Gt = !0;
|
|
2206
|
+
}, t.clearConfig = function() {
|
|
2207
|
+
Me = null, Gt = !1;
|
|
2208
|
+
}, t.isValidAttribute = function(h, a, c) {
|
|
2209
|
+
Me || Zt({});
|
|
2210
|
+
const f = z(h), N = z(a);
|
|
2211
|
+
return Fn(f, N, c);
|
|
2212
|
+
}, t.addHook = function(h, a) {
|
|
2213
|
+
typeof a == "function" && rt(U[h], a);
|
|
2214
|
+
}, t.removeHook = function(h, a) {
|
|
2215
|
+
if (a !== void 0) {
|
|
2216
|
+
const c = La(U[h], a);
|
|
2217
|
+
return c === -1 ? void 0 : Ma(U[h], c, 1)[0];
|
|
2218
|
+
}
|
|
2219
|
+
return sr(U[h]);
|
|
2220
|
+
}, t.removeHooks = function(h) {
|
|
2221
|
+
U[h] = [];
|
|
2222
|
+
}, t.removeAllHooks = function() {
|
|
2223
|
+
U = mr();
|
|
2224
|
+
}, t;
|
|
2225
|
+
}
|
|
2226
|
+
var ei = Zr();
|
|
2227
|
+
const ti = (e) => e == null, ct = (e) => !ti(e), ni = (e, t) => t ? t.required && (e == null || e === "") ? "Field is required" : t.basicEmailValidation && (e == null || e === "") ? "Field should be email" : null : null, hr = (e, t) => t ? Object.keys(t).map(
|
|
2228
|
+
(o) => {
|
|
2229
|
+
const i = ni(e[o], t[o].validations);
|
|
2230
|
+
return i ? {
|
|
2231
|
+
field: o,
|
|
2232
|
+
error: i
|
|
2233
|
+
} : null;
|
|
2234
|
+
},
|
|
2235
|
+
{}
|
|
2236
|
+
).filter(ct) : [], Qr = (e) => {
|
|
2237
|
+
const [t, n] = Ue(0), [r, o] = Ue([]), i = xe(async () => {
|
|
2238
|
+
try {
|
|
2239
|
+
await Pa({
|
|
2240
|
+
feedbackFormId: e.formId,
|
|
2241
|
+
link: window.location.pathname,
|
|
2242
|
+
rawHtml: ei.sanitize(document.getElementsByTagName("html")[0] ?? ""),
|
|
2243
|
+
domainId: e.domainId,
|
|
2244
|
+
data: e.state,
|
|
2245
|
+
formType: e.formType,
|
|
2246
|
+
viewport: {
|
|
2247
|
+
first: document.body.clientWidth,
|
|
2248
|
+
second: document.body.clientHeight
|
|
2249
|
+
},
|
|
2250
|
+
browser: {
|
|
2251
|
+
productSub: navigator.productSub,
|
|
2252
|
+
vendor: navigator.vendor,
|
|
2253
|
+
pdfViewerEnabled: navigator.pdfViewerEnabled,
|
|
2254
|
+
maxTouchPoints: navigator.maxTouchPoints,
|
|
2255
|
+
hardwareConcurrency: navigator.hardwareConcurrency,
|
|
2256
|
+
cookieEnabled: navigator.cookieEnabled,
|
|
2257
|
+
appVersion: navigator.appVersion,
|
|
2258
|
+
platform: navigator.platform,
|
|
2259
|
+
userAgent: navigator.userAgent,
|
|
2260
|
+
language: navigator.language,
|
|
2261
|
+
onLine: navigator.onLine,
|
|
2262
|
+
webdriver: navigator.webdriver,
|
|
2263
|
+
// @ts-ignore
|
|
2264
|
+
deviceMemory: navigator.deviceMemory
|
|
2265
|
+
}
|
|
2266
|
+
});
|
|
2267
|
+
} catch (u) {
|
|
2268
|
+
console.log(u);
|
|
2269
|
+
}
|
|
2270
|
+
}, [e.state, e.formType]), s = xe(() => {
|
|
2271
|
+
const u = hr(e.state, e.validationsPerStep[t]);
|
|
2272
|
+
o(u), u.length || (t < e.stepsCount - 1 ? n((m) => m + 1) : i());
|
|
2273
|
+
}, [e.state, e.validationsPerStep, t, i]), d = xe(() => {
|
|
2274
|
+
t !== 0 && (o([]), n((u) => u - 1));
|
|
2275
|
+
}, [t]);
|
|
2276
|
+
return We(() => {
|
|
2277
|
+
o((u) => {
|
|
2278
|
+
if (u.length) {
|
|
2279
|
+
const m = hr(e.state, e.validationsPerStep[t]);
|
|
2280
|
+
if (m.length !== u.length) return m;
|
|
2281
|
+
}
|
|
2282
|
+
return u;
|
|
2283
|
+
});
|
|
2284
|
+
}, [r, e.state, t]), {
|
|
2285
|
+
step: t,
|
|
2286
|
+
errors: r,
|
|
2287
|
+
onContinue: s,
|
|
2288
|
+
onBack: d
|
|
2289
|
+
};
|
|
2290
|
+
}, ri = S.div({
|
|
2291
|
+
marginTop: "1rem",
|
|
2292
|
+
color: "var(--color-error)",
|
|
2293
|
+
height: "20px"
|
|
2294
|
+
}), Ke = ({ errors: e }) => {
|
|
2295
|
+
var t;
|
|
2296
|
+
return l.createElement(ri, { children: ((t = (e || [])[0]) == null ? void 0 : t.error) ?? null });
|
|
2297
|
+
}, oi = S.input(
|
|
2298
|
+
({ theme: e, colorVariant: t, selected: n }) => {
|
|
2299
|
+
const r = `calc(${e.sizeSelector} * 6);`, o = he(t);
|
|
2300
|
+
return {
|
|
2301
|
+
cursor: "pointer",
|
|
2302
|
+
appearance: "none",
|
|
2303
|
+
borderRadius: "var(--radius-selector)",
|
|
2304
|
+
verticalAlign: "middle",
|
|
2305
|
+
color: "var(--color-base-content)",
|
|
2306
|
+
width: r,
|
|
2307
|
+
border: `1px solid ${o}`,
|
|
2308
|
+
height: r,
|
|
2309
|
+
flexShrink: "0",
|
|
2310
|
+
padding: ".25rem",
|
|
2311
|
+
transition: "background-color .2s,box-shadow .2s",
|
|
2312
|
+
display: "inline-block",
|
|
2313
|
+
position: "relative",
|
|
2314
|
+
"&::before": {
|
|
2315
|
+
content: '""',
|
|
2316
|
+
opacity: "0",
|
|
2317
|
+
clipPath: "polygon(20% 100%,20% 80%,50% 80%,50% 80%,70% 80%,70% 100%)",
|
|
2318
|
+
width: "100%",
|
|
2319
|
+
height: "100%",
|
|
2320
|
+
boxShadow: "0 3px oklch(100% 0 0/calc(var(--depth)*.1)) inset",
|
|
2321
|
+
backgroundColor: `${o}`,
|
|
2322
|
+
fontSize: "1rem",
|
|
2323
|
+
lineHeight: ".75",
|
|
2324
|
+
transition: "clip-path .3s .1s,opacity .1s .1s,rotate .3s .1s,translate .3s .1s",
|
|
2325
|
+
display: "block",
|
|
2326
|
+
rotate: "45deg",
|
|
2327
|
+
...n ? {
|
|
2328
|
+
clipPath: "polygon(20% 100%,20% 80%,50% 80%,50% 0%,70% 0%,70% 100%)",
|
|
2329
|
+
opacity: "1"
|
|
2330
|
+
} : {}
|
|
2331
|
+
}
|
|
2332
|
+
};
|
|
2333
|
+
}
|
|
2334
|
+
), ai = S.label((e) => ({
|
|
2335
|
+
display: "flex",
|
|
2336
|
+
fontWeight: e.selected ? "500" : "normal",
|
|
2337
|
+
transition: ".2s ease-in-out",
|
|
2338
|
+
alignItems: "center",
|
|
2339
|
+
cursor: "pointer",
|
|
2340
|
+
gap: "calc(var(--spacing) * 2)"
|
|
2341
|
+
})), ii = (e) => {
|
|
2342
|
+
const t = se(
|
|
2343
|
+
() => `${e.id}-${e.label.replace(/\s/g, "-").toLowerCase()}`,
|
|
2344
|
+
[]
|
|
2345
|
+
), n = (o) => {
|
|
2346
|
+
e.onSelect(
|
|
2347
|
+
e.value.includes(o) ? e.value.filter((i) => i !== o) : [...e.value, o]
|
|
2348
|
+
);
|
|
2349
|
+
}, r = e.value.includes(t);
|
|
2350
|
+
return l.createElement(ai, {
|
|
2351
|
+
selected: r,
|
|
2352
|
+
children: [
|
|
2353
|
+
l.createElement(oi, {
|
|
2354
|
+
id: t,
|
|
2355
|
+
type: "checkbox",
|
|
2356
|
+
selected: r,
|
|
2357
|
+
colorVariant: e.colorVariant,
|
|
2358
|
+
onChange: () => n(t),
|
|
2359
|
+
name: e.name
|
|
2360
|
+
}),
|
|
2361
|
+
l.createElement(le, {
|
|
2362
|
+
children: e.label,
|
|
2363
|
+
linear: !0
|
|
2364
|
+
})
|
|
2365
|
+
]
|
|
2366
|
+
});
|
|
2367
|
+
}, si = S.div`
|
|
2368
|
+
display: flex;
|
|
2369
|
+
flex-direction: column;
|
|
2370
|
+
width: var(--all-fields-size);
|
|
2371
|
+
gap: var(--spacing);
|
|
2372
|
+
@media (max-width: 900px) {
|
|
2373
|
+
width: 100%;
|
|
2374
|
+
}
|
|
2375
|
+
`, li = S.div`
|
|
2376
|
+
display: flex;
|
|
2377
|
+
gap: calc(var(--spacing) * 10);
|
|
2378
|
+
@media (max-width: 900px) {
|
|
2379
|
+
gap: var(--spacing);
|
|
2380
|
+
flex-direction: column;
|
|
2381
|
+
}
|
|
2382
|
+
`, ci = (e) => {
|
|
2383
|
+
const t = e.label.replace(/\s/g, "-").toLowerCase(), n = e.elementsPerCol || 4, r = se(() => e.options.reduce(
|
|
2384
|
+
(o, i, s) => {
|
|
2385
|
+
var u;
|
|
2386
|
+
return (s % n === 0 || s === 0) && o.push([]), (u = o[o.length - 1]) == null || u.push(i), o;
|
|
2387
|
+
},
|
|
2388
|
+
[]
|
|
2389
|
+
), [n, e.options]);
|
|
2390
|
+
return l.createElement("div", {
|
|
2391
|
+
children: [
|
|
2392
|
+
l.createElement(le, {
|
|
2393
|
+
children: e.label,
|
|
2394
|
+
variant: "section"
|
|
2395
|
+
}),
|
|
2396
|
+
l.createElement(li, {
|
|
2397
|
+
children: r.map(
|
|
2398
|
+
(o, i) => l.createElement(si, {
|
|
2399
|
+
key: i,
|
|
2400
|
+
children: o.map(
|
|
2401
|
+
(s) => l.createElement(ii, {
|
|
2402
|
+
onSelect: e.onChange,
|
|
2403
|
+
colorVariant: e.colorVariant,
|
|
2404
|
+
value: e.value,
|
|
2405
|
+
id: e.formClientId,
|
|
2406
|
+
name: t,
|
|
2407
|
+
label: s.label
|
|
2408
|
+
})
|
|
2409
|
+
)
|
|
2410
|
+
})
|
|
2411
|
+
)
|
|
2412
|
+
}),
|
|
2413
|
+
l.createElement(Ke, {
|
|
2414
|
+
errors: e.errors
|
|
2415
|
+
})
|
|
2416
|
+
]
|
|
2417
|
+
});
|
|
2418
|
+
}, ui = S(Ye)(() => ({
|
|
2419
|
+
"&:not(:last-of-type):not(:first-of-type)": {
|
|
2420
|
+
borderRadius: "0",
|
|
2421
|
+
marginRight: "-1px",
|
|
2422
|
+
marginLeft: "-1px"
|
|
2423
|
+
},
|
|
2424
|
+
"&:first-of-type": {
|
|
2425
|
+
borderTopRightRadius: "0",
|
|
2426
|
+
borderBottomRightRadius: "0"
|
|
2427
|
+
},
|
|
2428
|
+
"&:last-of-type": {
|
|
2429
|
+
borderTopLeftRadius: "0",
|
|
2430
|
+
borderBottomLeftRadius: "0"
|
|
2431
|
+
},
|
|
2432
|
+
"@media (max-width: 900px)": {
|
|
2433
|
+
// display: 'none',
|
|
2434
|
+
}
|
|
2435
|
+
})), di = (e) => l.createElement(ui, {
|
|
2436
|
+
onClick: e.onChange,
|
|
2437
|
+
$outlined: !e.selected,
|
|
2438
|
+
children: e.label
|
|
2439
|
+
}), pr = S("span")(({
|
|
2440
|
+
min: e,
|
|
2441
|
+
variant: t
|
|
2442
|
+
}) => {
|
|
2443
|
+
const n = t || he();
|
|
2444
|
+
return {
|
|
2445
|
+
position: "absolute",
|
|
2446
|
+
left: e ? "0" : void 0,
|
|
2447
|
+
right: e ? void 0 : "0",
|
|
2448
|
+
bottom: "-2px",
|
|
2449
|
+
opacity: "0.5",
|
|
2450
|
+
fontWeight: "300",
|
|
2451
|
+
transform: "translateY(100%)",
|
|
2452
|
+
textTransform: "uppercase",
|
|
2453
|
+
color: n
|
|
2454
|
+
};
|
|
2455
|
+
}), fi = S.div((e) => ({
|
|
2456
|
+
verticalAlign: "middle",
|
|
2457
|
+
display: "inline-flex",
|
|
2458
|
+
position: "relative",
|
|
2459
|
+
marginBottom: e.withText ? "calc(var(--spacing) * 6)" : "0"
|
|
2460
|
+
})), mi = (e) => l.createElement("div", {
|
|
2461
|
+
children: [
|
|
2462
|
+
l.createElement(le, {
|
|
2463
|
+
children: e.label,
|
|
2464
|
+
variant: "section"
|
|
2465
|
+
}),
|
|
2466
|
+
l.createElement(fi, {
|
|
2467
|
+
withText: e.maxText || e.minText,
|
|
2468
|
+
children: [
|
|
2469
|
+
e.maxText ? l.createElement(pr, {
|
|
2470
|
+
min: !1,
|
|
2471
|
+
children: e.maxText
|
|
2472
|
+
}) : null,
|
|
2473
|
+
e.minText ? l.createElement(pr, {
|
|
2474
|
+
min: !0,
|
|
2475
|
+
children: e.minText
|
|
2476
|
+
}) : null,
|
|
2477
|
+
Array(e.max).fill(1).map((t, n) => l.createElement(di, {
|
|
2478
|
+
onChange: () => e.onChange(n + 1),
|
|
2479
|
+
selected: n + 1 === e.value,
|
|
2480
|
+
key: `${n}`,
|
|
2481
|
+
label: `${n + 1}`
|
|
2482
|
+
}))
|
|
2483
|
+
]
|
|
2484
|
+
}),
|
|
2485
|
+
l.createElement(Ke, {
|
|
2486
|
+
errors: e.errors
|
|
2487
|
+
})
|
|
2488
|
+
]
|
|
2489
|
+
}), hi = S.input(({ theme: e, selected: t, colorVariant: n }) => {
|
|
2490
|
+
const r = `calc(${e.sizeSelector} * 6);`, o = he(n);
|
|
2491
|
+
return {
|
|
2492
|
+
width: r,
|
|
2493
|
+
height: r,
|
|
2494
|
+
color: e.neutral,
|
|
2495
|
+
margin: "0",
|
|
2496
|
+
cursor: "pointer",
|
|
2497
|
+
appearance: "none",
|
|
2498
|
+
verticalAlign: "middle",
|
|
2499
|
+
borderRadius: "3.40282e38px",
|
|
2500
|
+
border: `1px solid ${o}`,
|
|
2501
|
+
flexShrink: "0",
|
|
2502
|
+
padding: t ? ".25rem" : "0.4rem",
|
|
2503
|
+
transition: ".2s ease-in-out",
|
|
2504
|
+
display: "inline-block",
|
|
2505
|
+
position: "relative",
|
|
2506
|
+
boxSizing: "border-box",
|
|
2507
|
+
"&::before": {
|
|
2508
|
+
content: '""',
|
|
2509
|
+
borderRadius: "3.40282e38px",
|
|
2510
|
+
background: t ? o : "transparent",
|
|
2511
|
+
width: "100%",
|
|
2512
|
+
height: "100%",
|
|
2513
|
+
display: "block"
|
|
2514
|
+
}
|
|
2515
|
+
};
|
|
2516
|
+
}), pi = S.label((e) => ({
|
|
2517
|
+
display: "flex",
|
|
2518
|
+
fontWeight: e.selected ? "500" : "normal",
|
|
2519
|
+
transition: ".2s ease-in-out",
|
|
2520
|
+
alignItems: "center",
|
|
2521
|
+
cursor: "pointer",
|
|
2522
|
+
gap: "calc(var(--spacing) * 2)"
|
|
2523
|
+
})), gi = (e) => {
|
|
2524
|
+
const t = se(
|
|
2525
|
+
() => `${e.id}-${e.label.replace(/\s/g, "-").toLowerCase()}`,
|
|
2526
|
+
[e.id]
|
|
2527
|
+
), n = (o) => {
|
|
2528
|
+
e.onSelect(o);
|
|
2529
|
+
}, r = e.value === t;
|
|
2530
|
+
return l.createElement(pi, {
|
|
2531
|
+
selected: r,
|
|
2532
|
+
htmlFor: t,
|
|
2533
|
+
children: [
|
|
2534
|
+
l.createElement(hi, {
|
|
2535
|
+
id: t,
|
|
2536
|
+
type: "radio",
|
|
2537
|
+
variant: e.colorVariant,
|
|
2538
|
+
selected: r,
|
|
2539
|
+
onChange: () => n(t),
|
|
2540
|
+
name: e.name
|
|
2541
|
+
}),
|
|
2542
|
+
l.createElement(le, {
|
|
2543
|
+
children: e.label,
|
|
2544
|
+
linear: !0
|
|
2545
|
+
})
|
|
2546
|
+
]
|
|
2547
|
+
});
|
|
2548
|
+
}, bi = S.div`
|
|
2549
|
+
display: flex;
|
|
2550
|
+
flex-direction: column;
|
|
2551
|
+
width: var(--all-fields-size);
|
|
2552
|
+
gap: var(--spacing);
|
|
2553
|
+
@media (max-width: 900px) {
|
|
2554
|
+
width: 100%;
|
|
2555
|
+
}
|
|
2556
|
+
`, yi = S.div`
|
|
2557
|
+
display: flex;
|
|
2558
|
+
gap: calc(var(--spacing) * 10);
|
|
2559
|
+
@media (max-width: 900px) {
|
|
2560
|
+
gap: var(--spacing);
|
|
2561
|
+
flex-direction: column;
|
|
2562
|
+
}
|
|
2563
|
+
`, vi = (e) => {
|
|
2564
|
+
const t = e.elementsPerCol || 4, n = se(() => e.options.reduce(
|
|
2565
|
+
(r, o, i) => {
|
|
2566
|
+
var d;
|
|
2567
|
+
return (i % t === 0 || i === 0) && r.push([]), (d = r[r.length - 1]) == null || d.push(o), r;
|
|
2568
|
+
},
|
|
2569
|
+
[]
|
|
2570
|
+
), [t, e.options]);
|
|
2571
|
+
return l.createElement("div", {
|
|
2572
|
+
children: [
|
|
2573
|
+
l.createElement(le, {
|
|
2574
|
+
children: e.label,
|
|
2575
|
+
variant: "section"
|
|
2576
|
+
}),
|
|
2577
|
+
l.createElement(yi, {
|
|
2578
|
+
children: n.map(
|
|
2579
|
+
(r) => l.createElement(bi, {
|
|
2580
|
+
children: r.map(
|
|
2581
|
+
(o) => l.createElement(gi, {
|
|
2582
|
+
colorVariant: e.colorVariant,
|
|
2583
|
+
onSelect: e.onChange,
|
|
2584
|
+
value: e.value,
|
|
2585
|
+
id: e.formClientId,
|
|
2586
|
+
name: `${o.id}-${e.formClientId}`,
|
|
2587
|
+
label: o.label
|
|
2588
|
+
})
|
|
2589
|
+
)
|
|
2590
|
+
})
|
|
2591
|
+
)
|
|
2592
|
+
}),
|
|
2593
|
+
l.createElement(Ke, {
|
|
2594
|
+
errors: e.errors
|
|
2595
|
+
})
|
|
2596
|
+
]
|
|
2597
|
+
});
|
|
2598
|
+
}, Ei = S.input((e) => {
|
|
2599
|
+
const t = he(e.colorVariant);
|
|
2600
|
+
return {
|
|
2601
|
+
cursor: "text",
|
|
2602
|
+
border: `var(--border-width)solid ${t}`,
|
|
2603
|
+
appearance: "none",
|
|
2604
|
+
backgroundColor: "var(--color-base-100)",
|
|
2605
|
+
verticalAlign: "middle",
|
|
2606
|
+
whiteSpace: "nowrap",
|
|
2607
|
+
width: "clamp(3rem,30rem,100%)",
|
|
2608
|
+
height: "calc(var(--size-field, .25rem) * 10)",
|
|
2609
|
+
fontSize: "max(var(--font-size,.875rem),.875rem)",
|
|
2610
|
+
touchAction: "manipulation",
|
|
2611
|
+
borderColor: t,
|
|
2612
|
+
borderStartStartRadius: "var(--join-ss,var(--radius-field))",
|
|
2613
|
+
borderStartEndRadius: "var(--join-se,var(--radius-field))",
|
|
2614
|
+
borderEndEndRadius: "var(--join-ee,var(--radius-field))",
|
|
2615
|
+
borderEndStartRadius: "var(--join-es,var(--radius-field))",
|
|
2616
|
+
alignItems: "center",
|
|
2617
|
+
boxSizing: "border-box",
|
|
2618
|
+
paddingInline: ".75rem",
|
|
2619
|
+
"&:focus": {
|
|
2620
|
+
outline: `2px solid ${t}`,
|
|
2621
|
+
outlineOffset: "3px",
|
|
2622
|
+
isolation: "isolate"
|
|
2623
|
+
}
|
|
2624
|
+
};
|
|
2625
|
+
}), Si = S.input((e) => {
|
|
2626
|
+
const n = he(e.colorVariant);
|
|
2627
|
+
return {
|
|
2628
|
+
cursor: "pointer",
|
|
2629
|
+
flex: "1",
|
|
2630
|
+
verticalAlign: "middle",
|
|
2631
|
+
"--radius-selector-max": "calc(var(--radius-selector) + var(--radius-selector) + var(--radius-selector))",
|
|
2632
|
+
borderRadius: "calc(var(--radius-selector) + min(var(--range-p),var(--radius-selector-max)))",
|
|
2633
|
+
height: "var(--range-thumb-size)",
|
|
2634
|
+
backgroundColor: "#0000",
|
|
2635
|
+
border: "none",
|
|
2636
|
+
overflow: "hidden",
|
|
2637
|
+
appearance: "none",
|
|
2638
|
+
webkitAppearance: "none",
|
|
2639
|
+
margin: "0",
|
|
2640
|
+
"--range-thumb": "var(--color-base-100)",
|
|
2641
|
+
"--range-thumb-size": "calc(var(--size-selector,.25rem)*6)",
|
|
2642
|
+
"--range-progress": n,
|
|
2643
|
+
"--range-fill": "1",
|
|
2644
|
+
"--range-p": ".25rem",
|
|
2645
|
+
"--range-bg": n,
|
|
2646
|
+
font: "inherit",
|
|
2647
|
+
fontFeatureSettings: "inherit",
|
|
2648
|
+
fontVariationSettings: "inherit",
|
|
2649
|
+
letterSpacing: "inherit",
|
|
2650
|
+
color: "inherit",
|
|
2651
|
+
opacity: "1",
|
|
2652
|
+
"&::-webkit-slider-runnable-track": {
|
|
2653
|
+
backgroundColor: "var(--range-bg)",
|
|
2654
|
+
borderRadius: "var(--radius-selector)",
|
|
2655
|
+
width: "100%",
|
|
2656
|
+
height: "calc(var(--range-thumb-size)*.5)",
|
|
2657
|
+
"--range-bg": "color-mix(in oklab,currentColor 10%,#0000)"
|
|
2658
|
+
},
|
|
2659
|
+
"&::-webkit-slider-thumb": {
|
|
2660
|
+
boxSizing: "border-box",
|
|
2661
|
+
borderRadius: "calc(var(--radius-selector) + min(var(--range-p),var(--radius-selector-max)))",
|
|
2662
|
+
height: "var(--range-thumb-size)",
|
|
2663
|
+
width: "var(--range-thumb-size)",
|
|
2664
|
+
border: "var(--range-p)solid",
|
|
2665
|
+
appearance: "none",
|
|
2666
|
+
webkitAppearance: "none",
|
|
2667
|
+
color: "var(--range-progress)",
|
|
2668
|
+
boxShadow: "0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 0 1px 1px currentColor, 0 0 0 2rem var(--range-thumb) inset, calc((var(--range-dir, 1) * -100rem) - (var(--range-dir, 1) * var(--range-thumb-size) / 2)) 0 0 calc(100rem * var(--range-fill))",
|
|
2669
|
+
backgroundColor: n,
|
|
2670
|
+
position: "relative",
|
|
2671
|
+
top: "50%",
|
|
2672
|
+
transform: "translateY(-50%)"
|
|
2673
|
+
}
|
|
2674
|
+
};
|
|
2675
|
+
}), Ti = S.div`
|
|
2676
|
+
width: clamp(3rem, 30rem, 100%);
|
|
2677
|
+
`, wi = S(Ei)`
|
|
2678
|
+
width: calc(var(--size-field) * 15);
|
|
2679
|
+
`, xi = S.div`
|
|
2680
|
+
display: flex;
|
|
2681
|
+
align-items: center;
|
|
2682
|
+
gap: calc(var(--spacing) * 2);
|
|
2683
|
+
`, Ci = (e) => {
|
|
2684
|
+
var o;
|
|
2685
|
+
const t = e.min || 0, n = e.max || 100, r = (i) => {
|
|
2686
|
+
const s = Number.parseInt(i.target.value);
|
|
2687
|
+
Number.isNaN(s) ? console.error("RangeSlide must be a number") : e.onChange(s);
|
|
2688
|
+
};
|
|
2689
|
+
return We(() => {
|
|
2690
|
+
e.onChange(e.value || e.initialValue || 0);
|
|
2691
|
+
}, []), l.createElement(Ti, {
|
|
2692
|
+
children: [
|
|
2693
|
+
l.createElement(le, {
|
|
2694
|
+
children: e.label,
|
|
2695
|
+
variant: "section"
|
|
2696
|
+
}),
|
|
2697
|
+
l.createElement(xi, {
|
|
2698
|
+
children: [
|
|
2699
|
+
l.createElement(Si, {
|
|
2700
|
+
type: "range",
|
|
2701
|
+
min: t,
|
|
2702
|
+
max: n,
|
|
2703
|
+
useThemeColors: e.colorVariant,
|
|
2704
|
+
value: e.value,
|
|
2705
|
+
onChange: r
|
|
2706
|
+
}),
|
|
2707
|
+
l.createElement(wi, {
|
|
2708
|
+
type: "number",
|
|
2709
|
+
value: ((o = e.value) == null ? void 0 : o.toString()) ?? "",
|
|
2710
|
+
max: n,
|
|
2711
|
+
min: t,
|
|
2712
|
+
colorVariant: e.colorVariant,
|
|
2713
|
+
onChange: (i) => e.onChange(+i.target.value)
|
|
2714
|
+
})
|
|
2715
|
+
]
|
|
2716
|
+
}),
|
|
2717
|
+
l.createElement(Ke, {
|
|
2718
|
+
errors: e.errors
|
|
2719
|
+
})
|
|
2720
|
+
]
|
|
2721
|
+
});
|
|
2722
|
+
}, Ai = '<svg xmlns="http://www.w3.org/2000/svg" width="200" height="185"><path d="M100 184.606a15.384 15.384 0 0 1-8.653-2.678C53.565 156.28 37.205 138.695 28.182 127.7 8.952 104.264-.254 80.202.005 54.146.308 24.287 24.264 0 53.406 0c21.192 0 35.869 11.937 44.416 21.879a2.884 2.884 0 0 0 4.356 0C110.725 11.927 125.402 0 146.594 0c29.142 0 53.098 24.287 53.4 54.151.26 26.061-8.956 50.122-28.176 73.554-9.023 10.994-25.383 28.58-63.165 54.228a15.384 15.384 0 0 1-8.653 2.673Z" fill="black" fill-rule="nonzero"/></svg>', _i = '<svg xmlns="http://www.w3.org/2000/svg" width="192" height="180"><path fill="black" d="m96 137.263-58.779 42.024 22.163-68.389L.894 68.481l72.476-.243L96 0l22.63 68.238 72.476.243-58.49 42.417 22.163 68.389z" fill-rule="evenodd"/></svg>', Ii = '<svg xmlns="http://www.w3.org/2000/svg" width="192" height="180"><path fill="black" d="m96 153.044-58.779 26.243 7.02-63.513L.894 68.481l63.117-13.01L96 0l31.989 55.472 63.117 13.01-43.347 47.292 7.02 63.513z" fill-rule="evenodd"/></svg>', Ri = {
|
|
2723
|
+
heart: encodeURIComponent(Ai),
|
|
2724
|
+
star: encodeURIComponent(_i),
|
|
2725
|
+
star2: encodeURIComponent(Ii)
|
|
2726
|
+
}, gr = {
|
|
2727
|
+
small: "1rem",
|
|
2728
|
+
medium: "1.5rem",
|
|
2729
|
+
large: "2rem"
|
|
2730
|
+
}, ki = S.input((e) => {
|
|
2731
|
+
const t = Ri[e.icon ?? "star2"], n = he(e.colorVariant);
|
|
2732
|
+
return {
|
|
2733
|
+
maskImage: `url(data:image/svg+xml,${t})`,
|
|
2734
|
+
backgroundColor: n,
|
|
2735
|
+
appearance: "none",
|
|
2736
|
+
transform: e.selected ? "scale(1.1)" : "scale(1)",
|
|
2737
|
+
transition: "transform 0.3s",
|
|
2738
|
+
border: "none",
|
|
2739
|
+
opacity: e.selected ? "1" : 0.2,
|
|
2740
|
+
verticalAlign: "middle",
|
|
2741
|
+
display: "inline-block",
|
|
2742
|
+
WebkitMaskPosition: "50%",
|
|
2743
|
+
maskPosition: "50%",
|
|
2744
|
+
cursor: "pointer",
|
|
2745
|
+
WebkitMaskSize: "contain",
|
|
2746
|
+
maskSize: "contain",
|
|
2747
|
+
WebkitMaskRepeat: "no-repeat",
|
|
2748
|
+
maskRepeat: "no-repeat",
|
|
2749
|
+
borderRadius: "0",
|
|
2750
|
+
width: gr[e.size ?? "medium"],
|
|
2751
|
+
height: gr[e.size ?? "medium"]
|
|
2752
|
+
};
|
|
2753
|
+
}), Oi = S.div(() => ({
|
|
2754
|
+
verticalAlign: "middle",
|
|
2755
|
+
position: "relative"
|
|
2756
|
+
})), Pi = ({ value: e, max: t, errors: n, label: r, onChange: o }) => l.createElement(Oi, {
|
|
2757
|
+
value: 1,
|
|
2758
|
+
max: 5,
|
|
2759
|
+
children: [
|
|
2760
|
+
l.createElement(le, {
|
|
2761
|
+
variant: "section",
|
|
2762
|
+
children: r
|
|
2763
|
+
}),
|
|
2764
|
+
Array(t).fill(1).map(
|
|
2765
|
+
(i, s) => l.createElement(ki, {
|
|
2766
|
+
selected: s < e,
|
|
2767
|
+
name: `rating-${s + 1}`,
|
|
2768
|
+
key: `${s}`,
|
|
2769
|
+
onChange: () => {
|
|
2770
|
+
o(s + 1);
|
|
2771
|
+
},
|
|
2772
|
+
type: "radio"
|
|
2773
|
+
})
|
|
2774
|
+
),
|
|
2775
|
+
l.createElement(Ke, {
|
|
2776
|
+
errors: n
|
|
2777
|
+
})
|
|
2778
|
+
]
|
|
2779
|
+
}), Ni = S.div`
|
|
2780
|
+
width: 100%;
|
|
2781
|
+
`, $i = S.textarea((e) => {
|
|
2782
|
+
const t = he(e.colorVariant);
|
|
2783
|
+
return {
|
|
2784
|
+
border: "var(--border-width)solid #0000",
|
|
2785
|
+
appearance: "none",
|
|
2786
|
+
borderRadius: "var(--radius-field)",
|
|
2787
|
+
backgroundColor: "var(--color-base-100)",
|
|
2788
|
+
verticalAlign: "middle",
|
|
2789
|
+
width: "clamp(3rem,30rem,100%)",
|
|
2790
|
+
maxWidth: "100%",
|
|
2791
|
+
minWidth: "3rem",
|
|
2792
|
+
minHeight: "5rem",
|
|
2793
|
+
fontSize: "max(var(--font-size,.875rem),.875rem)",
|
|
2794
|
+
touchAction: "manipulation",
|
|
2795
|
+
borderColor: t,
|
|
2796
|
+
flexShrink: "1",
|
|
2797
|
+
paddingBlock: ".5rem",
|
|
2798
|
+
boxSizing: "border-box",
|
|
2799
|
+
paddingInline: ".75rem",
|
|
2800
|
+
"&:focus": {
|
|
2801
|
+
outline: `2px solid ${t}`,
|
|
2802
|
+
outlineOffset: "3px",
|
|
2803
|
+
isolation: "isolate"
|
|
2804
|
+
}
|
|
2805
|
+
};
|
|
2806
|
+
}), Di = (e) => {
|
|
2807
|
+
const t = (n) => e.onChange(n.target.value);
|
|
2808
|
+
return l.createElement(Ni, {
|
|
2809
|
+
children: [
|
|
2810
|
+
l.createElement(le, {
|
|
2811
|
+
variant: "section",
|
|
2812
|
+
children: e.label
|
|
2813
|
+
}),
|
|
2814
|
+
l.createElement($i, {
|
|
2815
|
+
value: e.value ?? "",
|
|
2816
|
+
useThemeColors: e.colorVariant,
|
|
2817
|
+
rows: e.rows ?? 3,
|
|
2818
|
+
onChange: t
|
|
2819
|
+
}),
|
|
2820
|
+
l.createElement(Ke, {
|
|
2821
|
+
errors: e.errors
|
|
2822
|
+
})
|
|
2823
|
+
]
|
|
2824
|
+
});
|
|
2825
|
+
}, Li = S.div`
|
|
2826
|
+
width: 100%;
|
|
2827
|
+
`, xt = (e) => e != null, Mi = (e, t) => ((r) => {
|
|
2828
|
+
if (!r) return e.default;
|
|
2829
|
+
const o = r.find((i) => i.conditions.every((s) => {
|
|
2830
|
+
const d = t(s.fieldName);
|
|
2831
|
+
if (!xt(d)) return !1;
|
|
2832
|
+
const u = [];
|
|
2833
|
+
return xt(s.eq) ? s.eq === d ? u.push(!0) : u.push(!1) : xt(s.lessThan) ? s.lessThan > d ? u.push(!0) : u.push(!1) : xt(s.moreThan) && (s.moreThan < d ? u.push(!0) : u.push(!1)), u.every(Boolean);
|
|
2834
|
+
}));
|
|
2835
|
+
return (o == null ? void 0 : o.value) ?? e.default;
|
|
2836
|
+
})(e.values), Jr = (e) => {
|
|
2837
|
+
const t = () => {
|
|
2838
|
+
const n = (i) => e.setStateByKey(e.dataField, i), r = Mi(e.fieldProps.label, e.getStateByKey), o = {
|
|
2839
|
+
formClientId: e.formClientId,
|
|
2840
|
+
label: r,
|
|
2841
|
+
errors: e.errors,
|
|
2842
|
+
onChange: n,
|
|
2843
|
+
value: e.getStateByKey(e.dataField),
|
|
2844
|
+
key: `${e.type}-${e.fieldProps.label}-${e.fieldProps.meta.name}`
|
|
2845
|
+
};
|
|
2846
|
+
switch (e.type) {
|
|
2847
|
+
case "matrix": {
|
|
2848
|
+
const i = e.fieldProps;
|
|
2849
|
+
return l.createElement(mi, {
|
|
2850
|
+
...i,
|
|
2851
|
+
...o,
|
|
2852
|
+
max: 10
|
|
2853
|
+
});
|
|
2854
|
+
}
|
|
2855
|
+
case "radio-group": {
|
|
2856
|
+
const i = e.fieldProps;
|
|
2857
|
+
return l.createElement(vi, {
|
|
2858
|
+
...i,
|
|
2859
|
+
...o
|
|
2860
|
+
});
|
|
2861
|
+
}
|
|
2862
|
+
case "checkbox-group": {
|
|
2863
|
+
const i = e.fieldProps;
|
|
2864
|
+
return l.createElement(ci, {
|
|
2865
|
+
...i,
|
|
2866
|
+
...o
|
|
2867
|
+
});
|
|
2868
|
+
}
|
|
2869
|
+
case "range-slide": {
|
|
2870
|
+
const i = e.fieldProps;
|
|
2871
|
+
return l.createElement(Ci, {
|
|
2872
|
+
...i,
|
|
2873
|
+
...o
|
|
2874
|
+
});
|
|
2875
|
+
}
|
|
2876
|
+
case "rating": {
|
|
2877
|
+
const i = e.fieldProps;
|
|
2878
|
+
return l.createElement(Pi, {
|
|
2879
|
+
...i,
|
|
2880
|
+
...o
|
|
2881
|
+
});
|
|
2882
|
+
}
|
|
2883
|
+
case "textarea": {
|
|
2884
|
+
const i = e.fieldProps;
|
|
2885
|
+
return l.createElement(Di, {
|
|
2886
|
+
...i,
|
|
2887
|
+
...o
|
|
2888
|
+
});
|
|
2889
|
+
}
|
|
2890
|
+
default:
|
|
2891
|
+
return null;
|
|
2892
|
+
}
|
|
2893
|
+
};
|
|
2894
|
+
return l.createElement(Li, {
|
|
2895
|
+
children: t()
|
|
2896
|
+
});
|
|
2897
|
+
}, Fi = S.div({
|
|
2898
|
+
position: "relative",
|
|
2899
|
+
fontSize: "var(--font-size)"
|
|
2900
|
+
}), zi = S.div`
|
|
2901
|
+
display: flex;
|
|
2902
|
+
align-items: center;
|
|
2903
|
+
justify-content: space-between;
|
|
2904
|
+
margin-top: calc(var(--spacing) * 10);
|
|
2905
|
+
`, Bi = (e) => {
|
|
2906
|
+
const t = se(
|
|
2907
|
+
() => Math.random().toString(36).substring(2, 10),
|
|
2908
|
+
[]
|
|
2909
|
+
), [n, r] = l.useState(null), o = (d) => {
|
|
2910
|
+
r((u) => !u || u < d ? d : u);
|
|
2911
|
+
}, i = jr({
|
|
2912
|
+
form: e.inlineForm.form,
|
|
2913
|
+
formId: e.formId,
|
|
2914
|
+
domainId: e.domainId
|
|
2915
|
+
}), s = Qr({
|
|
2916
|
+
domainId: e.domainId,
|
|
2917
|
+
formType: "inlineForm",
|
|
2918
|
+
stepsCount: i.steps.length,
|
|
2919
|
+
validationsPerStep: i.validationsPerStep,
|
|
2920
|
+
formId: e.formId,
|
|
2921
|
+
state: i.state
|
|
2922
|
+
});
|
|
2923
|
+
return l.createElement(Fi, {
|
|
2924
|
+
children: [
|
|
2925
|
+
e.inlineForm.config.formTitle && l.createElement(le, {
|
|
2926
|
+
variant: "title",
|
|
2927
|
+
children: e.inlineForm.config.formTitle
|
|
2928
|
+
}),
|
|
2929
|
+
i.steps.map(
|
|
2930
|
+
(d, u) => {
|
|
2931
|
+
var m;
|
|
2932
|
+
return l.createElement(Vr, {
|
|
2933
|
+
key: u + `${(m = d.meta) == null ? void 0 : m.name}`,
|
|
2934
|
+
height: n,
|
|
2935
|
+
onSetMaxHeight: o,
|
|
2936
|
+
isVisible: u === s.step,
|
|
2937
|
+
children: d.fields.map(
|
|
2938
|
+
(p) => l.createElement(Jr, {
|
|
2939
|
+
type: p.type,
|
|
2940
|
+
fieldProps: p,
|
|
2941
|
+
dataField: p.dataField,
|
|
2942
|
+
formClientId: t,
|
|
2943
|
+
onContinue: s.onContinue,
|
|
2944
|
+
errors: s.errors.filter((T) => T.field === p.dataField),
|
|
2945
|
+
getStateByKey: i.getStateByKey,
|
|
2946
|
+
setStateByKey: i.setStateByKey
|
|
2947
|
+
})
|
|
2948
|
+
)
|
|
2949
|
+
});
|
|
2950
|
+
}
|
|
2951
|
+
),
|
|
2952
|
+
l.createElement(zi, {
|
|
2953
|
+
children: [
|
|
2954
|
+
l.createElement(Ye, {
|
|
2955
|
+
children: "Back",
|
|
2956
|
+
disabled: s.step === 0,
|
|
2957
|
+
onClick: s.onBack
|
|
2958
|
+
}),
|
|
2959
|
+
l.createElement(Gr, {
|
|
2960
|
+
steps: i.steps,
|
|
2961
|
+
currentStepIndex: s.step
|
|
2962
|
+
}),
|
|
2963
|
+
l.createElement(Ye, {
|
|
2964
|
+
children: "Continue",
|
|
2965
|
+
onClick: s.onContinue
|
|
2966
|
+
})
|
|
2967
|
+
]
|
|
2968
|
+
})
|
|
2969
|
+
]
|
|
2970
|
+
});
|
|
2971
|
+
}, Ui = S.div((e) => ({
|
|
2972
|
+
backgroundColor: "var(--color-base-100)",
|
|
2973
|
+
borderTopLeftRadius: "var(--modal-tl,var(--radius-box))",
|
|
2974
|
+
borderTopRightRadius: "var(--modal-tr,var(--radius-box))",
|
|
2975
|
+
borderBottomLeftRadius: "var(--modal-bl,var(--radius-box))",
|
|
2976
|
+
borderBottomRightRadius: "var(--modal-br,var(--radius-box))",
|
|
2977
|
+
opacity: e.$visible ? "1" : "0",
|
|
2978
|
+
overscrollBehavior: "contain",
|
|
2979
|
+
gridRowStart: "1",
|
|
2980
|
+
gridColumnStart: "1",
|
|
2981
|
+
width: "91.6667%",
|
|
2982
|
+
maxWidth: "1080px",
|
|
2983
|
+
margin: "auto",
|
|
2984
|
+
maxHeight: "100vh",
|
|
2985
|
+
padding: "1.5rem",
|
|
2986
|
+
transition: "translate .3s ease-out,scale .3s ease-out,opacity .2s ease-out 50ms,box-shadow .3s ease-out",
|
|
2987
|
+
overflowY: "auto",
|
|
2988
|
+
scale: "95%",
|
|
2989
|
+
boxShadow: "0 25px 50px -12px #00000040",
|
|
2990
|
+
"@media (max-width: 900px)": {
|
|
2991
|
+
maxWidth: "initial",
|
|
2992
|
+
width: "auto"
|
|
2993
|
+
}
|
|
2994
|
+
})), Wi = S.div(() => ({})), Hi = S.dialog(({ $visible: e }) => ({
|
|
2995
|
+
pointerEvents: e ? "auto" : "none",
|
|
2996
|
+
visibility: e ? "visible" : "hidden",
|
|
2997
|
+
width: "100%",
|
|
2998
|
+
maxWidth: "none",
|
|
2999
|
+
height: "100%",
|
|
3000
|
+
maxHeight: "none",
|
|
3001
|
+
color: "inherit",
|
|
3002
|
+
transition: "visibility .3s allow-discrete,background-color .3s ease-out,opacity .1s ease-out",
|
|
3003
|
+
overscrollBehavior: "contain",
|
|
3004
|
+
zIndex: "99",
|
|
3005
|
+
scrollbarGutter: "auto",
|
|
3006
|
+
backgroundColor: e ? "#0006" : "#0000",
|
|
3007
|
+
placeItems: "center",
|
|
3008
|
+
margin: "0",
|
|
3009
|
+
padding: "0",
|
|
3010
|
+
display: "grid",
|
|
3011
|
+
position: "fixed",
|
|
3012
|
+
overflow: "clip",
|
|
3013
|
+
top: 0,
|
|
3014
|
+
border: 0,
|
|
3015
|
+
outline: 0
|
|
3016
|
+
})), Vi = (e) => {
|
|
3017
|
+
const t = br(null), n = Math.random().toString(36).substring(2, 16), r = xe(
|
|
3018
|
+
(i) => {
|
|
3019
|
+
i.target === t.current && e.onClose(), i.preventDefault(), i.stopPropagation();
|
|
3020
|
+
},
|
|
3021
|
+
[e]
|
|
3022
|
+
), o = xe((i) => {
|
|
3023
|
+
i.key === "Escape" && e.onClose(), i.preventDefault();
|
|
3024
|
+
}, []);
|
|
3025
|
+
return We(() => {
|
|
3026
|
+
t.current && e.isOpen ? t.current.show() : t.current && !e.isOpen && t.current.close();
|
|
3027
|
+
}, [t, e.isOpen]), We(() => (document.addEventListener("keyup", o), () => {
|
|
3028
|
+
document.removeEventListener("keyup", o);
|
|
3029
|
+
}), []), l.createElement(Hi, {
|
|
3030
|
+
$visible: e.isOpen,
|
|
3031
|
+
onClick: r,
|
|
3032
|
+
ref: t,
|
|
3033
|
+
id: n,
|
|
3034
|
+
children: l.createElement(Ui, {
|
|
3035
|
+
$visible: e.isOpen,
|
|
3036
|
+
children: [
|
|
3037
|
+
l.createElement(le, {
|
|
3038
|
+
children: e.heading,
|
|
3039
|
+
variant: "title"
|
|
3040
|
+
}),
|
|
3041
|
+
e.children,
|
|
3042
|
+
l.createElement(Wi, {
|
|
3043
|
+
children: e.footer
|
|
3044
|
+
})
|
|
3045
|
+
]
|
|
3046
|
+
})
|
|
3047
|
+
});
|
|
3048
|
+
}, Gi = S.div`
|
|
3049
|
+
display: flex;
|
|
3050
|
+
align-items: center;
|
|
3051
|
+
justify-content: space-between;
|
|
3052
|
+
margin-top: calc(var(--spacing) * 10);
|
|
3053
|
+
`, ji = S(Ye)`
|
|
3054
|
+
position: fixed;
|
|
3055
|
+
width: fit-content;
|
|
3056
|
+
height: fit-content;
|
|
3057
|
+
transform: rotate(-90deg) translateY(calc(100% - 15px));
|
|
3058
|
+
padding: 10px 20px 30px 20px;
|
|
3059
|
+
margin: auto;
|
|
3060
|
+
left: ${(e) => ct(e.$left) ? `${e.$left}px` : null};
|
|
3061
|
+
right: ${(e) => ct(e.$right) ? `${e.$right}px` : null};
|
|
3062
|
+
top: ${(e) => ct(e.$top) ? `${e.$top}px` : null};
|
|
3063
|
+
bottom: ${(e) => ct(e.$bottom) ? `${e.$bottom}px` : null};
|
|
3064
|
+
&:active {
|
|
3065
|
+
transform: rotate(-90deg) translateY(calc(100% - 18px));
|
|
3066
|
+
}
|
|
3067
|
+
`, Yi = (e) => {
|
|
3068
|
+
const [t, n] = l.useState(!1), [r, o] = l.useState(null), i = se(
|
|
3069
|
+
() => Math.random().toString(36).substring(2, 10),
|
|
3070
|
+
[]
|
|
3071
|
+
), s = (m) => {
|
|
3072
|
+
o((p) => !p || p < m ? m : p);
|
|
3073
|
+
}, d = jr({
|
|
3074
|
+
form: e.popupForm.form,
|
|
3075
|
+
formId: e.formId,
|
|
3076
|
+
domainId: e.domainId
|
|
3077
|
+
}), u = Qr({
|
|
3078
|
+
domainId: e.domainId,
|
|
3079
|
+
formType: "inlineForm",
|
|
3080
|
+
stepsCount: d.steps.length,
|
|
3081
|
+
validationsPerStep: d.validationsPerStep,
|
|
3082
|
+
formId: e.formId,
|
|
3083
|
+
state: d.state
|
|
3084
|
+
});
|
|
3085
|
+
return l.createElement(fo, {
|
|
3086
|
+
children: [
|
|
3087
|
+
l.createElement(ji, {
|
|
3088
|
+
children: e.popupForm.config.buttonText,
|
|
3089
|
+
onClick: () => n(!0),
|
|
3090
|
+
$left: e.popupForm.styles.left ?? null,
|
|
3091
|
+
$right: e.popupForm.styles.right ?? null,
|
|
3092
|
+
$top: e.popupForm.styles.top ?? null,
|
|
3093
|
+
$bottom: e.popupForm.styles.bottom ?? null
|
|
3094
|
+
}),
|
|
3095
|
+
l.createElement(Vi, {
|
|
3096
|
+
onClose: () => n(!1),
|
|
3097
|
+
heading: e.popupForm.config.formTitle,
|
|
3098
|
+
isOpen: t,
|
|
3099
|
+
footer: l.createElement(Gi, {
|
|
3100
|
+
children: [
|
|
3101
|
+
l.createElement(Ye, {
|
|
3102
|
+
children: "Back",
|
|
3103
|
+
disabled: u.step === 0,
|
|
3104
|
+
onClick: u.onBack
|
|
3105
|
+
}),
|
|
3106
|
+
l.createElement(Gr, {
|
|
3107
|
+
steps: d.steps,
|
|
3108
|
+
currentStepIndex: u.step
|
|
3109
|
+
}),
|
|
3110
|
+
l.createElement(Ye, {
|
|
3111
|
+
children: "Continue",
|
|
3112
|
+
onClick: u.onContinue
|
|
3113
|
+
})
|
|
3114
|
+
]
|
|
3115
|
+
}),
|
|
3116
|
+
children: d.steps.map(
|
|
3117
|
+
(m, p) => {
|
|
3118
|
+
var T;
|
|
3119
|
+
return l.createElement(Vr, {
|
|
3120
|
+
key: p + `${(T = m.meta) == null ? void 0 : T.name}`,
|
|
3121
|
+
height: r,
|
|
3122
|
+
onSetMaxHeight: s,
|
|
3123
|
+
isVisible: p === u.step,
|
|
3124
|
+
children: m.fields.map(
|
|
3125
|
+
(w) => l.createElement(Jr, {
|
|
3126
|
+
type: w.type,
|
|
3127
|
+
fieldProps: w,
|
|
3128
|
+
formClientId: i,
|
|
3129
|
+
dataField: w.dataField,
|
|
3130
|
+
onContinue: u.onContinue,
|
|
3131
|
+
errors: u.errors.filter((v) => v.field === w.dataField),
|
|
3132
|
+
getStateByKey: d.getStateByKey,
|
|
3133
|
+
setStateByKey: d.setStateByKey
|
|
3134
|
+
})
|
|
3135
|
+
)
|
|
3136
|
+
});
|
|
3137
|
+
}
|
|
3138
|
+
)
|
|
3139
|
+
})
|
|
3140
|
+
// populatedForm.steps.map((step, index) =>
|
|
3141
|
+
// React.createElement(Step, {
|
|
3142
|
+
// key: index + `${step.meta?.name}`,
|
|
3143
|
+
// isVisible: index === stepper.step,
|
|
3144
|
+
// children: [
|
|
3145
|
+
// // step.fields.map((field) =>
|
|
3146
|
+
// // React.createElement(Field, {
|
|
3147
|
+
// // type: field.type,
|
|
3148
|
+
// // dataField: field.dataField,
|
|
3149
|
+
// // onContinue: stepper.onContinue,
|
|
3150
|
+
// // errors: stepper.errors.filter((e) => e.field === field.dataField),
|
|
3151
|
+
// // getStateByKey: populatedForm.getStateByKey,
|
|
3152
|
+
// // setStateByKey: populatedForm.setStateByKey,
|
|
3153
|
+
// // })
|
|
3154
|
+
// // )
|
|
3155
|
+
// ],
|
|
3156
|
+
// })
|
|
3157
|
+
// ),
|
|
3158
|
+
]
|
|
3159
|
+
});
|
|
3160
|
+
}, eo = (e) => {
|
|
3161
|
+
e.locale;
|
|
3162
|
+
let { data: t, loading: n, error: r } = xa(
|
|
3163
|
+
() => wa({
|
|
3164
|
+
formId: e.formId
|
|
3165
|
+
})
|
|
3166
|
+
);
|
|
3167
|
+
const o = se(() => t != null && t.inlineForm ? l.createElement(Bi, {
|
|
3168
|
+
key: `inline-form-${e.formId}`,
|
|
3169
|
+
formId: e.formId,
|
|
3170
|
+
domainId: t.domainId,
|
|
3171
|
+
formTheme: t.attributes.theme,
|
|
3172
|
+
inlineForm: t.inlineForm
|
|
3173
|
+
}) : null, [t == null ? void 0 : t.attributes.theme, t == null ? void 0 : t.domainId, t == null ? void 0 : t.inlineForm, e.formId]), i = se(() => t != null && t.popupForm ? l.createElement(Yi, {
|
|
3174
|
+
key: `popup-form-${e.formId}`,
|
|
3175
|
+
formId: e.formId,
|
|
3176
|
+
domainId: t.domainId,
|
|
3177
|
+
formTheme: t.attributes.theme,
|
|
3178
|
+
popupForm: t.popupForm
|
|
3179
|
+
}) : null, [t == null ? void 0 : t.attributes.theme, t == null ? void 0 : t.domainId, t == null ? void 0 : t.inlineForm, e.formId]);
|
|
3180
|
+
return !t && n ? "Loading..." : !t || r ? r ? r.message : "Unknown error" : l.createElement(Sa, {
|
|
3181
|
+
theme: t.attributes.theme,
|
|
3182
|
+
selectedVariant: t.attributes.variant,
|
|
3183
|
+
children: [o, i]
|
|
3184
|
+
});
|
|
3185
|
+
}, Zi = (e) => {
|
|
3186
|
+
if (!e) {
|
|
3187
|
+
console.error("options must be provided. Feedback module deactivated");
|
|
3188
|
+
return;
|
|
3189
|
+
}
|
|
3190
|
+
if (!e.formId) {
|
|
3191
|
+
console.error("formId must be provided. Feedback module deactivated");
|
|
3192
|
+
return;
|
|
3193
|
+
}
|
|
3194
|
+
const t = po.createRoot(e.container || document);
|
|
3195
|
+
typeof window < "u" && t.render(
|
|
3196
|
+
l.createElement(eo, {
|
|
3197
|
+
formId: e.formId
|
|
3198
|
+
})
|
|
3199
|
+
);
|
|
3200
|
+
}, qi = (e) => e ? e.formId ? typeof window > "u" ? null : l.createElement(eo, {
|
|
3201
|
+
formId: e.formId
|
|
3202
|
+
}) : (console.error("formId must be provided. Feedback module deactivated"), null) : (console.error("options must be provided. Feedback module deactivated"), null), Qi = (e) => qi(e);
|
|
3203
|
+
export {
|
|
3204
|
+
Qi as FeedbackModule,
|
|
3205
|
+
Zi as initiateFeedbackModule,
|
|
3206
|
+
qi as renderFeedbackModule
|
|
3207
|
+
};
|