@scbt-ecom/ui 0.79.1 → 0.79.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-Dm9oKv1l.js → index-DQTqhWTt.js} +2 -2
- package/dist/index-DQTqhWTt.js.map +1 -0
- package/dist/lib/shared/validation/base/phone.validators.d.ts +1 -1
- package/dist/validation.js +1 -1
- package/dist/widget.js +181 -180
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
- package/dist/index-Dm9oKv1l.js.map +0 -1
package/dist/widget.js
CHANGED
|
@@ -4,31 +4,31 @@ var He = (t) => {
|
|
|
4
4
|
};
|
|
5
5
|
var Et = (t, e, o) => e in t ? Ft(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
|
|
6
6
|
var ve = (t, e, o) => Et(t, typeof e != "symbol" ? e + "" : e, o), Ne = (t, e, o) => e.has(t) || He("Cannot " + o);
|
|
7
|
-
var
|
|
7
|
+
var x = (t, e, o) => (Ne(t, e, "read from private field"), o ? o.call(t) : e.get(t)), M = (t, e, o) => e.has(t) ? He("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, o), w = (t, e, o, n) => (Ne(t, e, "write to private field"), n ? n.call(t, o) : e.set(t, o), o), W = (t, e, o) => (Ne(t, e, "access private method"), o);
|
|
8
8
|
var ce = (t, e, o, n) => ({
|
|
9
9
|
set _(i) {
|
|
10
10
|
w(t, e, i, o);
|
|
11
11
|
},
|
|
12
12
|
get _() {
|
|
13
|
-
return
|
|
13
|
+
return x(t, e, n);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { S as ft, h as bt, Q as Bt, n as O, m as ze, R as Pt, c as Dt, a as Le, b as $, e as Rt, d as Ht, f as zt, g as Lt, o as Qe, r as Ve, i as Qt, j as $e, p as Ae, s as Vt, k as r, B as ge, l as E, q as F, P as gt, t as $t, H as
|
|
16
|
+
import { S as ft, h as bt, Q as Bt, n as O, m as ze, R as Pt, c as Dt, a as Le, b as $, e as Rt, d as Ht, f as zt, g as Lt, o as Qe, r as Ve, i as Qt, j as $e, p as Ae, s as Vt, k as r, B as ge, l as E, q as F, P as gt, t as $t, H as D, I as b, C as je, u as _e, L as At, v as Te, A as ae, w as jt, x as qt, y as Wt, U as ye, D as Ut, z as Se, E as Kt, M as Zt } from "./index-BatWr8jg.js";
|
|
17
17
|
import { c as l, T as S } from "./typeGuards-CSiImkUY.js";
|
|
18
18
|
import * as ue from "react";
|
|
19
19
|
import { lazy as B, useCallback as yt, useState as q, useMemo as se, createElement as Oe, useRef as Fe, useReducer as Xt, memo as Ee, forwardRef as Yt, useEffect as qe } from "react";
|
|
20
20
|
import { i as We } from "./isClient-C9aZtt2Q.js";
|
|
21
21
|
import { s as Jt, c as ke, a as Gt } from "./capitalize-B7CPmCdk.js";
|
|
22
22
|
import { u as ee, b as Be, a as er, f as we, F as tr } from "./useDebounce-maGDilFr.js";
|
|
23
|
-
import { z as st, Z as Pe } from "./index-
|
|
23
|
+
import { z as st, Z as Pe } from "./index-DQTqhWTt.js";
|
|
24
24
|
import { o as kt } from "./utils-Bu1Zg675.js";
|
|
25
25
|
import { a as rr, u as nr } from "./useFieldsProgress-egXj013a.js";
|
|
26
26
|
import { createPortal as wt } from "react-dom";
|
|
27
|
-
var
|
|
27
|
+
var z, ht, or = (ht = class extends ft {
|
|
28
28
|
constructor(e = {}) {
|
|
29
29
|
super();
|
|
30
|
-
M(this,
|
|
31
|
-
this.config = e, w(this,
|
|
30
|
+
M(this, z);
|
|
31
|
+
this.config = e, w(this, z, /* @__PURE__ */ new Map());
|
|
32
32
|
}
|
|
33
33
|
build(e, o, n) {
|
|
34
34
|
const i = o.queryKey, a = o.queryHash ?? bt(i, o);
|
|
@@ -43,14 +43,14 @@ var H, xt, or = (xt = class extends ft {
|
|
|
43
43
|
}), this.add(d)), d;
|
|
44
44
|
}
|
|
45
45
|
add(e) {
|
|
46
|
-
|
|
46
|
+
x(this, z).has(e.queryHash) || (x(this, z).set(e.queryHash, e), this.notify({
|
|
47
47
|
type: "added",
|
|
48
48
|
query: e
|
|
49
49
|
}));
|
|
50
50
|
}
|
|
51
51
|
remove(e) {
|
|
52
|
-
const o =
|
|
53
|
-
o && (e.destroy(), o === e &&
|
|
52
|
+
const o = x(this, z).get(e.queryHash);
|
|
53
|
+
o && (e.destroy(), o === e && x(this, z).delete(e.queryHash), this.notify({ type: "removed", query: e }));
|
|
54
54
|
}
|
|
55
55
|
clear() {
|
|
56
56
|
O.batch(() => {
|
|
@@ -60,10 +60,10 @@ var H, xt, or = (xt = class extends ft {
|
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
get(e) {
|
|
63
|
-
return
|
|
63
|
+
return x(this, z).get(e);
|
|
64
64
|
}
|
|
65
65
|
getAll() {
|
|
66
|
-
return [...
|
|
66
|
+
return [...x(this, z).values()];
|
|
67
67
|
}
|
|
68
68
|
find(e) {
|
|
69
69
|
const o = { exact: !0, ...e };
|
|
@@ -96,14 +96,14 @@ var H, xt, or = (xt = class extends ft {
|
|
|
96
96
|
});
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
|
-
},
|
|
99
|
+
}, z = new WeakMap(), ht), L, T, G, Q, U, xt, ir = (xt = class extends Pt {
|
|
100
100
|
constructor(e) {
|
|
101
101
|
super();
|
|
102
|
+
M(this, Q);
|
|
102
103
|
M(this, L);
|
|
103
|
-
M(this, z);
|
|
104
104
|
M(this, T);
|
|
105
105
|
M(this, G);
|
|
106
|
-
this.mutationId = e.mutationId, w(this, T, e.mutationCache), w(this,
|
|
106
|
+
this.mutationId = e.mutationId, w(this, T, e.mutationCache), w(this, L, []), this.state = e.state || ar(), this.setOptions(e.options), this.scheduleGc();
|
|
107
107
|
}
|
|
108
108
|
setOptions(e) {
|
|
109
109
|
this.options = e, this.updateGcTime(this.options.gcTime);
|
|
@@ -112,82 +112,82 @@ var H, xt, or = (xt = class extends ft {
|
|
|
112
112
|
return this.options.meta;
|
|
113
113
|
}
|
|
114
114
|
addObserver(e) {
|
|
115
|
-
|
|
115
|
+
x(this, L).includes(e) || (x(this, L).push(e), this.clearGcTimeout(), x(this, T).notify({
|
|
116
116
|
type: "observerAdded",
|
|
117
117
|
mutation: this,
|
|
118
118
|
observer: e
|
|
119
119
|
}));
|
|
120
120
|
}
|
|
121
121
|
removeObserver(e) {
|
|
122
|
-
w(this,
|
|
122
|
+
w(this, L, x(this, L).filter((o) => o !== e)), this.scheduleGc(), x(this, T).notify({
|
|
123
123
|
type: "observerRemoved",
|
|
124
124
|
mutation: this,
|
|
125
125
|
observer: e
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
optionalRemove() {
|
|
129
|
-
|
|
129
|
+
x(this, L).length || (this.state.status === "pending" ? this.scheduleGc() : x(this, T).remove(this));
|
|
130
130
|
}
|
|
131
131
|
continue() {
|
|
132
132
|
var e;
|
|
133
|
-
return ((e =
|
|
133
|
+
return ((e = x(this, G)) == null ? void 0 : e.continue()) ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
|
|
134
134
|
this.execute(this.state.variables);
|
|
135
135
|
}
|
|
136
136
|
async execute(e) {
|
|
137
|
-
var a, d, u, m,
|
|
137
|
+
var a, d, u, m, h, p, c, g, f, v, j, k, _, R, C, I, H, V, xe, le;
|
|
138
138
|
const o = () => {
|
|
139
|
-
W(this,
|
|
139
|
+
W(this, Q, U).call(this, { type: "continue" });
|
|
140
140
|
};
|
|
141
141
|
w(this, G, Dt({
|
|
142
142
|
fn: () => this.options.mutationFn ? this.options.mutationFn(e) : Promise.reject(new Error("No mutationFn found")),
|
|
143
143
|
onFail: (N, pe) => {
|
|
144
|
-
W(this,
|
|
144
|
+
W(this, Q, U).call(this, { type: "failed", failureCount: N, error: pe });
|
|
145
145
|
},
|
|
146
146
|
onPause: () => {
|
|
147
|
-
W(this,
|
|
147
|
+
W(this, Q, U).call(this, { type: "pause" });
|
|
148
148
|
},
|
|
149
149
|
onContinue: o,
|
|
150
150
|
retry: this.options.retry ?? 0,
|
|
151
151
|
retryDelay: this.options.retryDelay,
|
|
152
152
|
networkMode: this.options.networkMode,
|
|
153
|
-
canRun: () =>
|
|
153
|
+
canRun: () => x(this, T).canRun(this)
|
|
154
154
|
}));
|
|
155
|
-
const n = this.state.status === "pending", i = !
|
|
155
|
+
const n = this.state.status === "pending", i = !x(this, G).canStart();
|
|
156
156
|
try {
|
|
157
157
|
if (n)
|
|
158
158
|
o();
|
|
159
159
|
else {
|
|
160
|
-
W(this,
|
|
160
|
+
W(this, Q, U).call(this, { type: "pending", variables: e, isPaused: i }), await ((d = (a = x(this, T).config).onMutate) == null ? void 0 : d.call(
|
|
161
161
|
a,
|
|
162
162
|
e,
|
|
163
163
|
this
|
|
164
164
|
));
|
|
165
165
|
const pe = await ((m = (u = this.options).onMutate) == null ? void 0 : m.call(u, e));
|
|
166
|
-
pe !== this.state.context && W(this,
|
|
166
|
+
pe !== this.state.context && W(this, Q, U).call(this, {
|
|
167
167
|
type: "pending",
|
|
168
168
|
context: pe,
|
|
169
169
|
variables: e,
|
|
170
170
|
isPaused: i
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
|
-
const N = await
|
|
174
|
-
return await ((p = (
|
|
175
|
-
|
|
173
|
+
const N = await x(this, G).start();
|
|
174
|
+
return await ((p = (h = x(this, T).config).onSuccess) == null ? void 0 : p.call(
|
|
175
|
+
h,
|
|
176
176
|
N,
|
|
177
177
|
e,
|
|
178
178
|
this.state.context,
|
|
179
179
|
this
|
|
180
|
-
)), await ((g = (c = this.options).onSuccess) == null ? void 0 : g.call(c, N, e, this.state.context)), await ((v = (f =
|
|
180
|
+
)), await ((g = (c = this.options).onSuccess) == null ? void 0 : g.call(c, N, e, this.state.context)), await ((v = (f = x(this, T).config).onSettled) == null ? void 0 : v.call(
|
|
181
181
|
f,
|
|
182
182
|
N,
|
|
183
183
|
null,
|
|
184
184
|
this.state.variables,
|
|
185
185
|
this.state.context,
|
|
186
186
|
this
|
|
187
|
-
)), await ((k = (j = this.options).onSettled) == null ? void 0 : k.call(j, N, null, e, this.state.context)), W(this,
|
|
187
|
+
)), await ((k = (j = this.options).onSettled) == null ? void 0 : k.call(j, N, null, e, this.state.context)), W(this, Q, U).call(this, { type: "success", data: N }), N;
|
|
188
188
|
} catch (N) {
|
|
189
189
|
try {
|
|
190
|
-
throw await ((
|
|
190
|
+
throw await ((R = (_ = x(this, T).config).onError) == null ? void 0 : R.call(
|
|
191
191
|
_,
|
|
192
192
|
N,
|
|
193
193
|
e,
|
|
@@ -198,28 +198,28 @@ var H, xt, or = (xt = class extends ft {
|
|
|
198
198
|
N,
|
|
199
199
|
e,
|
|
200
200
|
this.state.context
|
|
201
|
-
)), await ((V = (
|
|
202
|
-
|
|
201
|
+
)), await ((V = (H = x(this, T).config).onSettled) == null ? void 0 : V.call(
|
|
202
|
+
H,
|
|
203
203
|
void 0,
|
|
204
204
|
N,
|
|
205
205
|
this.state.variables,
|
|
206
206
|
this.state.context,
|
|
207
207
|
this
|
|
208
|
-
)), await ((le = (
|
|
209
|
-
|
|
208
|
+
)), await ((le = (xe = this.options).onSettled) == null ? void 0 : le.call(
|
|
209
|
+
xe,
|
|
210
210
|
void 0,
|
|
211
211
|
N,
|
|
212
212
|
e,
|
|
213
213
|
this.state.context
|
|
214
214
|
)), N;
|
|
215
215
|
} finally {
|
|
216
|
-
W(this,
|
|
216
|
+
W(this, Q, U).call(this, { type: "error", error: N });
|
|
217
217
|
}
|
|
218
218
|
} finally {
|
|
219
|
-
|
|
219
|
+
x(this, T).runNext(this);
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
|
-
},
|
|
222
|
+
}, L = new WeakMap(), T = new WeakMap(), G = new WeakMap(), Q = new WeakSet(), U = function(e) {
|
|
223
223
|
const o = (n) => {
|
|
224
224
|
switch (e.type) {
|
|
225
225
|
case "failed":
|
|
@@ -274,15 +274,15 @@ var H, xt, or = (xt = class extends ft {
|
|
|
274
274
|
}
|
|
275
275
|
};
|
|
276
276
|
this.state = o(this.state), O.batch(() => {
|
|
277
|
-
|
|
277
|
+
x(this, L).forEach((n) => {
|
|
278
278
|
n.onMutationUpdate(e);
|
|
279
|
-
}),
|
|
279
|
+
}), x(this, T).notify({
|
|
280
280
|
mutation: this,
|
|
281
281
|
type: "updated",
|
|
282
282
|
action: e
|
|
283
283
|
});
|
|
284
284
|
});
|
|
285
|
-
},
|
|
285
|
+
}, xt);
|
|
286
286
|
function ar() {
|
|
287
287
|
return {
|
|
288
288
|
context: void 0,
|
|
@@ -296,42 +296,42 @@ function ar() {
|
|
|
296
296
|
submittedAt: 0
|
|
297
297
|
};
|
|
298
298
|
}
|
|
299
|
-
var A, P,
|
|
299
|
+
var A, P, he, pt, lr = (pt = class extends ft {
|
|
300
300
|
constructor(e = {}) {
|
|
301
301
|
super();
|
|
302
302
|
M(this, A);
|
|
303
303
|
M(this, P);
|
|
304
|
-
M(this,
|
|
305
|
-
this.config = e, w(this, A, /* @__PURE__ */ new Set()), w(this, P, /* @__PURE__ */ new Map()), w(this,
|
|
304
|
+
M(this, he);
|
|
305
|
+
this.config = e, w(this, A, /* @__PURE__ */ new Set()), w(this, P, /* @__PURE__ */ new Map()), w(this, he, 0);
|
|
306
306
|
}
|
|
307
307
|
build(e, o, n) {
|
|
308
308
|
const i = new ir({
|
|
309
309
|
mutationCache: this,
|
|
310
|
-
mutationId: ++ce(this,
|
|
310
|
+
mutationId: ++ce(this, he)._,
|
|
311
311
|
options: e.defaultMutationOptions(o),
|
|
312
312
|
state: n
|
|
313
313
|
});
|
|
314
314
|
return this.add(i), i;
|
|
315
315
|
}
|
|
316
316
|
add(e) {
|
|
317
|
-
|
|
317
|
+
x(this, A).add(e);
|
|
318
318
|
const o = fe(e);
|
|
319
319
|
if (typeof o == "string") {
|
|
320
|
-
const n =
|
|
321
|
-
n ? n.push(e) :
|
|
320
|
+
const n = x(this, P).get(o);
|
|
321
|
+
n ? n.push(e) : x(this, P).set(o, [e]);
|
|
322
322
|
}
|
|
323
323
|
this.notify({ type: "added", mutation: e });
|
|
324
324
|
}
|
|
325
325
|
remove(e) {
|
|
326
|
-
if (
|
|
326
|
+
if (x(this, A).delete(e)) {
|
|
327
327
|
const o = fe(e);
|
|
328
328
|
if (typeof o == "string") {
|
|
329
|
-
const n =
|
|
329
|
+
const n = x(this, P).get(o);
|
|
330
330
|
if (n)
|
|
331
331
|
if (n.length > 1) {
|
|
332
332
|
const i = n.indexOf(e);
|
|
333
333
|
i !== -1 && n.splice(i, 1);
|
|
334
|
-
} else n[0] === e &&
|
|
334
|
+
} else n[0] === e && x(this, P).delete(o);
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
337
|
this.notify({ type: "removed", mutation: e });
|
|
@@ -339,7 +339,7 @@ var A, P, xe, pt, lr = (pt = class extends ft {
|
|
|
339
339
|
canRun(e) {
|
|
340
340
|
const o = fe(e);
|
|
341
341
|
if (typeof o == "string") {
|
|
342
|
-
const n =
|
|
342
|
+
const n = x(this, P).get(o), i = n == null ? void 0 : n.find(
|
|
343
343
|
(a) => a.state.status === "pending"
|
|
344
344
|
);
|
|
345
345
|
return !i || i === e;
|
|
@@ -350,20 +350,20 @@ var A, P, xe, pt, lr = (pt = class extends ft {
|
|
|
350
350
|
var n;
|
|
351
351
|
const o = fe(e);
|
|
352
352
|
if (typeof o == "string") {
|
|
353
|
-
const i = (n =
|
|
353
|
+
const i = (n = x(this, P).get(o)) == null ? void 0 : n.find((a) => a !== e && a.state.isPaused);
|
|
354
354
|
return (i == null ? void 0 : i.continue()) ?? Promise.resolve();
|
|
355
355
|
} else
|
|
356
356
|
return Promise.resolve();
|
|
357
357
|
}
|
|
358
358
|
clear() {
|
|
359
359
|
O.batch(() => {
|
|
360
|
-
|
|
360
|
+
x(this, A).forEach((e) => {
|
|
361
361
|
this.notify({ type: "removed", mutation: e });
|
|
362
|
-
}),
|
|
362
|
+
}), x(this, A).clear(), x(this, P).clear();
|
|
363
363
|
});
|
|
364
364
|
}
|
|
365
365
|
getAll() {
|
|
366
|
-
return Array.from(
|
|
366
|
+
return Array.from(x(this, A));
|
|
367
367
|
}
|
|
368
368
|
find(e) {
|
|
369
369
|
const o = { exact: !0, ...e };
|
|
@@ -389,7 +389,7 @@ var A, P, xe, pt, lr = (pt = class extends ft {
|
|
|
389
389
|
)
|
|
390
390
|
);
|
|
391
391
|
}
|
|
392
|
-
}, A = new WeakMap(), P = new WeakMap(),
|
|
392
|
+
}, A = new WeakMap(), P = new WeakMap(), he = new WeakMap(), pt);
|
|
393
393
|
function fe(t) {
|
|
394
394
|
var e;
|
|
395
395
|
return (e = t.options.scope) == null ? void 0 : e.id;
|
|
@@ -400,7 +400,7 @@ function Ue(t) {
|
|
|
400
400
|
var p, c, g, f, v;
|
|
401
401
|
const n = e.options, i = (g = (c = (p = e.fetchOptions) == null ? void 0 : p.meta) == null ? void 0 : c.fetchMore) == null ? void 0 : g.direction, a = ((f = e.state.data) == null ? void 0 : f.pages) || [], d = ((v = e.state.data) == null ? void 0 : v.pageParams) || [];
|
|
402
402
|
let u = { pages: [], pageParams: [] }, m = 0;
|
|
403
|
-
const
|
|
403
|
+
const h = async () => {
|
|
404
404
|
let j = !1;
|
|
405
405
|
const k = (C) => {
|
|
406
406
|
Object.defineProperty(C, "signal", {
|
|
@@ -409,7 +409,7 @@ function Ue(t) {
|
|
|
409
409
|
j = !0;
|
|
410
410
|
}), e.signal)
|
|
411
411
|
});
|
|
412
|
-
}, _ = Rt(e.options, e.fetchOptions),
|
|
412
|
+
}, _ = Rt(e.options, e.fetchOptions), R = async (C, I, H) => {
|
|
413
413
|
if (j)
|
|
414
414
|
return Promise.reject();
|
|
415
415
|
if (I == null && C.pages.length)
|
|
@@ -418,31 +418,31 @@ function Ue(t) {
|
|
|
418
418
|
client: e.client,
|
|
419
419
|
queryKey: e.queryKey,
|
|
420
420
|
pageParam: I,
|
|
421
|
-
direction:
|
|
421
|
+
direction: H ? "backward" : "forward",
|
|
422
422
|
meta: e.options.meta
|
|
423
423
|
};
|
|
424
424
|
k(V);
|
|
425
|
-
const
|
|
425
|
+
const xe = await _(
|
|
426
426
|
V
|
|
427
|
-
), { maxPages: le } = e.options, N =
|
|
427
|
+
), { maxPages: le } = e.options, N = H ? Ht : zt;
|
|
428
428
|
return {
|
|
429
|
-
pages: N(C.pages,
|
|
429
|
+
pages: N(C.pages, xe, le),
|
|
430
430
|
pageParams: N(C.pageParams, I, le)
|
|
431
431
|
};
|
|
432
432
|
};
|
|
433
433
|
if (i && a.length) {
|
|
434
|
-
const C = i === "backward", I = C ? dr : Ke,
|
|
434
|
+
const C = i === "backward", I = C ? dr : Ke, H = {
|
|
435
435
|
pages: a,
|
|
436
436
|
pageParams: d
|
|
437
|
-
}, V = I(n,
|
|
438
|
-
u = await
|
|
437
|
+
}, V = I(n, H);
|
|
438
|
+
u = await R(H, V, C);
|
|
439
439
|
} else {
|
|
440
440
|
const C = t ?? a.length;
|
|
441
441
|
do {
|
|
442
442
|
const I = m === 0 ? d[0] ?? n.initialPageParam : Ke(n, u);
|
|
443
443
|
if (m > 0 && I == null)
|
|
444
444
|
break;
|
|
445
|
-
u = await
|
|
445
|
+
u = await R(u, I), m++;
|
|
446
446
|
} while (m < C);
|
|
447
447
|
}
|
|
448
448
|
return u;
|
|
@@ -451,7 +451,7 @@ function Ue(t) {
|
|
|
451
451
|
var j, k;
|
|
452
452
|
return (k = (j = e.options).persister) == null ? void 0 : k.call(
|
|
453
453
|
j,
|
|
454
|
-
|
|
454
|
+
h,
|
|
455
455
|
{
|
|
456
456
|
client: e.client,
|
|
457
457
|
queryKey: e.queryKey,
|
|
@@ -460,7 +460,7 @@ function Ue(t) {
|
|
|
460
460
|
},
|
|
461
461
|
o
|
|
462
462
|
);
|
|
463
|
-
} : e.fetchFn =
|
|
463
|
+
} : e.fetchFn = h;
|
|
464
464
|
}
|
|
465
465
|
};
|
|
466
466
|
}
|
|
@@ -490,21 +490,21 @@ var s, K, Z, te, re, X, ne, oe, ct, ur = (ct = class {
|
|
|
490
490
|
w(this, s, t.queryCache || new or()), w(this, K, t.mutationCache || new lr()), w(this, Z, t.defaultOptions || {}), w(this, te, /* @__PURE__ */ new Map()), w(this, re, /* @__PURE__ */ new Map()), w(this, X, 0);
|
|
491
491
|
}
|
|
492
492
|
mount() {
|
|
493
|
-
ce(this, X)._++,
|
|
494
|
-
t && (await this.resumePausedMutations(),
|
|
493
|
+
ce(this, X)._++, x(this, X) === 1 && (w(this, ne, Lt.subscribe(async (t) => {
|
|
494
|
+
t && (await this.resumePausedMutations(), x(this, s).onFocus());
|
|
495
495
|
})), w(this, oe, Qe.subscribe(async (t) => {
|
|
496
|
-
t && (await this.resumePausedMutations(),
|
|
496
|
+
t && (await this.resumePausedMutations(), x(this, s).onOnline());
|
|
497
497
|
})));
|
|
498
498
|
}
|
|
499
499
|
unmount() {
|
|
500
500
|
var t, e;
|
|
501
|
-
ce(this, X)._--,
|
|
501
|
+
ce(this, X)._--, x(this, X) === 0 && ((t = x(this, ne)) == null || t.call(this), w(this, ne, void 0), (e = x(this, oe)) == null || e.call(this), w(this, oe, void 0));
|
|
502
502
|
}
|
|
503
503
|
isFetching(t) {
|
|
504
|
-
return
|
|
504
|
+
return x(this, s).findAll({ ...t, fetchStatus: "fetching" }).length;
|
|
505
505
|
}
|
|
506
506
|
isMutating(t) {
|
|
507
|
-
return
|
|
507
|
+
return x(this, K).findAll({ ...t, status: "pending" }).length;
|
|
508
508
|
}
|
|
509
509
|
/**
|
|
510
510
|
* Imperative (non-reactive) way to retrieve data for a QueryKey.
|
|
@@ -516,28 +516,28 @@ var s, K, Z, te, re, X, ne, oe, ct, ur = (ct = class {
|
|
|
516
516
|
getQueryData(t) {
|
|
517
517
|
var o;
|
|
518
518
|
const e = this.defaultQueryOptions({ queryKey: t });
|
|
519
|
-
return (o =
|
|
519
|
+
return (o = x(this, s).get(e.queryHash)) == null ? void 0 : o.state.data;
|
|
520
520
|
}
|
|
521
521
|
ensureQueryData(t) {
|
|
522
|
-
const e = this.defaultQueryOptions(t), o =
|
|
522
|
+
const e = this.defaultQueryOptions(t), o = x(this, s).build(this, e), n = o.state.data;
|
|
523
523
|
return n === void 0 ? this.fetchQuery(t) : (t.revalidateIfStale && o.isStaleByTime(Ve(e.staleTime, o)) && this.prefetchQuery(e), Promise.resolve(n));
|
|
524
524
|
}
|
|
525
525
|
getQueriesData(t) {
|
|
526
|
-
return
|
|
526
|
+
return x(this, s).findAll(t).map(({ queryKey: e, state: o }) => {
|
|
527
527
|
const n = o.data;
|
|
528
528
|
return [e, n];
|
|
529
529
|
});
|
|
530
530
|
}
|
|
531
531
|
setQueryData(t, e, o) {
|
|
532
|
-
const n = this.defaultQueryOptions({ queryKey: t }), i =
|
|
532
|
+
const n = this.defaultQueryOptions({ queryKey: t }), i = x(this, s).get(
|
|
533
533
|
n.queryHash
|
|
534
534
|
), a = i == null ? void 0 : i.state.data, d = Qt(e, a);
|
|
535
535
|
if (d !== void 0)
|
|
536
|
-
return
|
|
536
|
+
return x(this, s).build(this, n).setData(d, { ...o, manual: !0 });
|
|
537
537
|
}
|
|
538
538
|
setQueriesData(t, e, o) {
|
|
539
539
|
return O.batch(
|
|
540
|
-
() =>
|
|
540
|
+
() => x(this, s).findAll(t).map(({ queryKey: n }) => [
|
|
541
541
|
n,
|
|
542
542
|
this.setQueryData(n, e, o)
|
|
543
543
|
])
|
|
@@ -546,12 +546,12 @@ var s, K, Z, te, re, X, ne, oe, ct, ur = (ct = class {
|
|
|
546
546
|
getQueryState(t) {
|
|
547
547
|
var o;
|
|
548
548
|
const e = this.defaultQueryOptions({ queryKey: t });
|
|
549
|
-
return (o =
|
|
549
|
+
return (o = x(this, s).get(
|
|
550
550
|
e.queryHash
|
|
551
551
|
)) == null ? void 0 : o.state;
|
|
552
552
|
}
|
|
553
553
|
removeQueries(t) {
|
|
554
|
-
const e =
|
|
554
|
+
const e = x(this, s);
|
|
555
555
|
O.batch(() => {
|
|
556
556
|
e.findAll(t).forEach((o) => {
|
|
557
557
|
e.remove(o);
|
|
@@ -559,7 +559,7 @@ var s, K, Z, te, re, X, ne, oe, ct, ur = (ct = class {
|
|
|
559
559
|
});
|
|
560
560
|
}
|
|
561
561
|
resetQueries(t, e) {
|
|
562
|
-
const o =
|
|
562
|
+
const o = x(this, s);
|
|
563
563
|
return O.batch(() => (o.findAll(t).forEach((n) => {
|
|
564
564
|
n.reset();
|
|
565
565
|
}), this.refetchQueries(
|
|
@@ -572,12 +572,12 @@ var s, K, Z, te, re, X, ne, oe, ct, ur = (ct = class {
|
|
|
572
572
|
}
|
|
573
573
|
cancelQueries(t, e = {}) {
|
|
574
574
|
const o = { revert: !0, ...e }, n = O.batch(
|
|
575
|
-
() =>
|
|
575
|
+
() => x(this, s).findAll(t).map((i) => i.cancel(o))
|
|
576
576
|
);
|
|
577
577
|
return Promise.all(n).then($).catch($);
|
|
578
578
|
}
|
|
579
579
|
invalidateQueries(t, e = {}) {
|
|
580
|
-
return O.batch(() => (
|
|
580
|
+
return O.batch(() => (x(this, s).findAll(t).forEach((o) => {
|
|
581
581
|
o.invalidate();
|
|
582
582
|
}), (t == null ? void 0 : t.refetchType) === "none" ? Promise.resolve() : this.refetchQueries(
|
|
583
583
|
{
|
|
@@ -592,7 +592,7 @@ var s, K, Z, te, re, X, ne, oe, ct, ur = (ct = class {
|
|
|
592
592
|
...e,
|
|
593
593
|
cancelRefetch: e.cancelRefetch ?? !0
|
|
594
594
|
}, n = O.batch(
|
|
595
|
-
() =>
|
|
595
|
+
() => x(this, s).findAll(t).filter((i) => !i.isDisabled() && !i.isStatic()).map((i) => {
|
|
596
596
|
let a = i.fetch(void 0, o);
|
|
597
597
|
return o.throwOnError || (a = a.catch($)), i.state.fetchStatus === "paused" ? Promise.resolve() : a;
|
|
598
598
|
})
|
|
@@ -602,7 +602,7 @@ var s, K, Z, te, re, X, ne, oe, ct, ur = (ct = class {
|
|
|
602
602
|
fetchQuery(t) {
|
|
603
603
|
const e = this.defaultQueryOptions(t);
|
|
604
604
|
e.retry === void 0 && (e.retry = !1);
|
|
605
|
-
const o =
|
|
605
|
+
const o = x(this, s).build(this, e);
|
|
606
606
|
return o.isStaleByTime(
|
|
607
607
|
Ve(e.staleTime, o)
|
|
608
608
|
) ? o.fetch(e) : Promise.resolve(o.state.data);
|
|
@@ -620,40 +620,40 @@ var s, K, Z, te, re, X, ne, oe, ct, ur = (ct = class {
|
|
|
620
620
|
return t.behavior = Ue(t.pages), this.ensureQueryData(t);
|
|
621
621
|
}
|
|
622
622
|
resumePausedMutations() {
|
|
623
|
-
return Qe.isOnline() ?
|
|
623
|
+
return Qe.isOnline() ? x(this, K).resumePausedMutations() : Promise.resolve();
|
|
624
624
|
}
|
|
625
625
|
getQueryCache() {
|
|
626
|
-
return
|
|
626
|
+
return x(this, s);
|
|
627
627
|
}
|
|
628
628
|
getMutationCache() {
|
|
629
|
-
return
|
|
629
|
+
return x(this, K);
|
|
630
630
|
}
|
|
631
631
|
getDefaultOptions() {
|
|
632
|
-
return
|
|
632
|
+
return x(this, Z);
|
|
633
633
|
}
|
|
634
634
|
setDefaultOptions(t) {
|
|
635
635
|
w(this, Z, t);
|
|
636
636
|
}
|
|
637
637
|
setQueryDefaults(t, e) {
|
|
638
|
-
|
|
638
|
+
x(this, te).set($e(t), {
|
|
639
639
|
queryKey: t,
|
|
640
640
|
defaultOptions: e
|
|
641
641
|
});
|
|
642
642
|
}
|
|
643
643
|
getQueryDefaults(t) {
|
|
644
|
-
const e = [...
|
|
644
|
+
const e = [...x(this, te).values()], o = {};
|
|
645
645
|
return e.forEach((n) => {
|
|
646
646
|
Ae(t, n.queryKey) && Object.assign(o, n.defaultOptions);
|
|
647
647
|
}), o;
|
|
648
648
|
}
|
|
649
649
|
setMutationDefaults(t, e) {
|
|
650
|
-
|
|
650
|
+
x(this, re).set($e(t), {
|
|
651
651
|
mutationKey: t,
|
|
652
652
|
defaultOptions: e
|
|
653
653
|
});
|
|
654
654
|
}
|
|
655
655
|
getMutationDefaults(t) {
|
|
656
|
-
const e = [...
|
|
656
|
+
const e = [...x(this, re).values()], o = {};
|
|
657
657
|
return e.forEach((n) => {
|
|
658
658
|
Ae(t, n.mutationKey) && Object.assign(o, n.defaultOptions);
|
|
659
659
|
}), o;
|
|
@@ -662,7 +662,7 @@ var s, K, Z, te, re, X, ne, oe, ct, ur = (ct = class {
|
|
|
662
662
|
if (t._defaulted)
|
|
663
663
|
return t;
|
|
664
664
|
const e = {
|
|
665
|
-
...
|
|
665
|
+
...x(this, Z).queries,
|
|
666
666
|
...this.getQueryDefaults(t.queryKey),
|
|
667
667
|
...t,
|
|
668
668
|
_defaulted: !0
|
|
@@ -674,22 +674,22 @@ var s, K, Z, te, re, X, ne, oe, ct, ur = (ct = class {
|
|
|
674
674
|
}
|
|
675
675
|
defaultMutationOptions(t) {
|
|
676
676
|
return t != null && t._defaulted ? t : {
|
|
677
|
-
...
|
|
677
|
+
...x(this, Z).mutations,
|
|
678
678
|
...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
|
|
679
679
|
...t,
|
|
680
680
|
_defaulted: !0
|
|
681
681
|
};
|
|
682
682
|
}
|
|
683
683
|
clear() {
|
|
684
|
-
|
|
684
|
+
x(this, s).clear(), x(this, K).clear();
|
|
685
685
|
}
|
|
686
686
|
}, s = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), te = new WeakMap(), re = new WeakMap(), X = new WeakMap(), ne = new WeakMap(), oe = new WeakMap(), ct);
|
|
687
|
-
const mr = B(() => Promise.resolve().then(() => Fr)),
|
|
687
|
+
const mr = B(() => Promise.resolve().then(() => Fr)), hr = B(() => Promise.resolve().then(() => yo)), xr = B(() => Promise.resolve().then(() => En)), pr = B(() => Promise.resolve().then(() => Pn)), cr = B(() => Promise.resolve().then(() => Lr)), fr = B(() => Promise.resolve().then(() => Sr)), br = B(() => Promise.resolve().then(() => tn)), gr = B(() => Promise.resolve().then(() => Zr)), jr = B(() => Promise.resolve().then(() => Gn)), yr = B(() => Promise.resolve().then(() => Vr)), sr = B(() => Promise.resolve().then(() => Nn)), kr = B(() => Promise.resolve().then(() => _r)), wr = {
|
|
688
688
|
header: fr,
|
|
689
689
|
seoHeader: jr,
|
|
690
690
|
banner: mr,
|
|
691
|
-
calculator:
|
|
692
|
-
form:
|
|
691
|
+
calculator: hr,
|
|
692
|
+
form: xr,
|
|
693
693
|
formDialog: pr,
|
|
694
694
|
stepper: yr,
|
|
695
695
|
benefit: kr,
|
|
@@ -747,7 +747,7 @@ const mr = B(() => Promise.resolve().then(() => Fr)), xr = B(() => Promise.resol
|
|
|
747
747
|
variant: u,
|
|
748
748
|
color: m
|
|
749
749
|
}) => {
|
|
750
|
-
const { isDesktop:
|
|
750
|
+
const { isDesktop: h } = ee();
|
|
751
751
|
return /* @__PURE__ */ r.jsxs(
|
|
752
752
|
"li",
|
|
753
753
|
{
|
|
@@ -765,9 +765,9 @@ const mr = B(() => Promise.resolve().then(() => Fr)), xr = B(() => Promise.resol
|
|
|
765
765
|
}
|
|
766
766
|
)
|
|
767
767
|
] }),
|
|
768
|
-
a &&
|
|
768
|
+
a && h && (d == null ? void 0 : d.handlerOptions) && /* @__PURE__ */ r.jsx(Y, { intent: "primary", className: l("desktop:w-[200px]", i == null ? void 0 : i.button), size: "lg", ...d })
|
|
769
769
|
] }),
|
|
770
|
-
(n ||
|
|
770
|
+
(n || h) && o && /* @__PURE__ */ r.jsx("div", { className: l("flex w-full justify-end", i == null ? void 0 : i.imgContainer), children: o && "url" in o && S.isObject(o) ? /* @__PURE__ */ r.jsx("img", { className: l("h-[246px] object-cover", i == null ? void 0 : i.img), src: o.url, alt: o.alt }) : o })
|
|
771
771
|
]
|
|
772
772
|
},
|
|
773
773
|
e
|
|
@@ -843,10 +843,10 @@ const mr = B(() => Promise.resolve().then(() => Fr)), xr = B(() => Promise.resol
|
|
|
843
843
|
imgDesktop: d,
|
|
844
844
|
imgAlt: u,
|
|
845
845
|
color: m,
|
|
846
|
-
renderImage:
|
|
846
|
+
renderImage: h
|
|
847
847
|
}) => {
|
|
848
848
|
var k;
|
|
849
|
-
const { isDesktop: p, isMobile: c } = ee(), { primary: g, secondary: f } = o || {}, v = (_) =>
|
|
849
|
+
const { isDesktop: p, isMobile: c } = ee(), { primary: g, secondary: f } = o || {}, v = (_) => h ? h(_) : /* @__PURE__ */ r.jsx("img", { ..._ }), j = /* @__PURE__ */ r.jsx(
|
|
850
850
|
"div",
|
|
851
851
|
{
|
|
852
852
|
className: l(
|
|
@@ -935,10 +935,10 @@ const mr = B(() => Promise.resolve().then(() => Fr)), xr = B(() => Promise.resol
|
|
|
935
935
|
imgDesktop: d,
|
|
936
936
|
imgAlt: u,
|
|
937
937
|
color: m,
|
|
938
|
-
renderImage:
|
|
938
|
+
renderImage: h
|
|
939
939
|
}) => {
|
|
940
940
|
var v, j;
|
|
941
|
-
const { isMobile: p } = ee(), { primary: c, secondary: g } = o || {}, f = (k) =>
|
|
941
|
+
const { isMobile: p } = ee(), { primary: c, secondary: g } = o || {}, f = (k) => h ? h(k) : /* @__PURE__ */ r.jsx("img", { ...k });
|
|
942
942
|
return /* @__PURE__ */ r.jsxs(
|
|
943
943
|
"section",
|
|
944
944
|
{
|
|
@@ -1065,7 +1065,7 @@ const mr = B(() => Promise.resolve().then(() => Fr)), xr = B(() => Promise.resol
|
|
|
1065
1065
|
e == null ? void 0 : e.item
|
|
1066
1066
|
),
|
|
1067
1067
|
children: [
|
|
1068
|
-
/* @__PURE__ */ r.jsx(
|
|
1068
|
+
/* @__PURE__ */ r.jsx(D, { as: "h4", className: l("text-color-dark", e == null ? void 0 : e.title), children: i }),
|
|
1069
1069
|
/* @__PURE__ */ r.jsx("p", { className: l("desk-body-regular-l text-color-secondary", e == null ? void 0 : e.description), children: a })
|
|
1070
1070
|
]
|
|
1071
1071
|
},
|
|
@@ -1269,7 +1269,7 @@ const mr = B(() => Promise.resolve().then(() => Fr)), xr = B(() => Promise.resol
|
|
|
1269
1269
|
}
|
|
1270
1270
|
);
|
|
1271
1271
|
}, et = ({ headline: t, details: e, variant: o, classes: n }) => /* @__PURE__ */ r.jsx("section", { id: y.stepper, "data-test-id": y.stepper, className: n == null ? void 0 : n.root, children: /* @__PURE__ */ r.jsx(F, { className: n == null ? void 0 : n.container, children: /* @__PURE__ */ r.jsxs("div", { className: l("flex flex-col gap-6 desktop:items-start desktop:gap-12", n == null ? void 0 : n.wrapper), children: [
|
|
1272
|
-
/* @__PURE__ */ r.jsx(
|
|
1272
|
+
/* @__PURE__ */ r.jsx(D, { as: "h2", className: l("text-color-dark", n == null ? void 0 : n.headline), children: t }),
|
|
1273
1273
|
/* @__PURE__ */ r.jsx(
|
|
1274
1274
|
"div",
|
|
1275
1275
|
{
|
|
@@ -1664,7 +1664,7 @@ const mr = B(() => Promise.resolve().then(() => Fr)), xr = B(() => Promise.resol
|
|
|
1664
1664
|
classes: a,
|
|
1665
1665
|
defaultOpen: d
|
|
1666
1666
|
}) => {
|
|
1667
|
-
var u, m,
|
|
1667
|
+
var u, m, h;
|
|
1668
1668
|
return /* @__PURE__ */ r.jsx(
|
|
1669
1669
|
"section",
|
|
1670
1670
|
{
|
|
@@ -1675,14 +1675,14 @@ const mr = B(() => Promise.resolve().then(() => Fr)), xr = B(() => Promise.resol
|
|
|
1675
1675
|
ae,
|
|
1676
1676
|
{
|
|
1677
1677
|
defaultOpen: d,
|
|
1678
|
-
label: /* @__PURE__ */ r.jsx(
|
|
1678
|
+
label: /* @__PURE__ */ r.jsx(D, { as: "h4", className: l("text-left", a == null ? void 0 : a.headline), children: o }),
|
|
1679
1679
|
...i,
|
|
1680
1680
|
classes: {
|
|
1681
1681
|
...i == null ? void 0 : i.classes,
|
|
1682
1682
|
header: {
|
|
1683
1683
|
trigger: l("bg-color-blue-grey-100", (m = (u = i == null ? void 0 : i.classes) == null ? void 0 : u.header) == null ? void 0 : m.trigger)
|
|
1684
1684
|
},
|
|
1685
|
-
content: l("max-w-full bg-color-blue-grey-100 relative", (
|
|
1685
|
+
content: l("max-w-full bg-color-blue-grey-100 relative", (h = i == null ? void 0 : i.classes) == null ? void 0 : h.content)
|
|
1686
1686
|
},
|
|
1687
1687
|
children: /* @__PURE__ */ r.jsx("div", { className: l(en({ variant: t }), a == null ? void 0 : a.columnsWrapper), children: e == null ? void 0 : e.map((p, c) => /* @__PURE__ */ r.jsx(Gr, { ...p, ...n, classes: a == null ? void 0 : a.column }, c)) })
|
|
1688
1688
|
}
|
|
@@ -1734,7 +1734,7 @@ const mr = B(() => Promise.resolve().then(() => Fr)), xr = B(() => Promise.resol
|
|
|
1734
1734
|
threeCols: "grid-cols-3 gap-12"
|
|
1735
1735
|
}
|
|
1736
1736
|
}
|
|
1737
|
-
}),
|
|
1737
|
+
}), hn = ({ headings: t, columnsVariant: e, classes: o }) => /* @__PURE__ */ r.jsx("div", { className: l(mn({ columnsVariant: e }), o == null ? void 0 : o.row), children: t == null ? void 0 : t.map((n) => /* @__PURE__ */ r.jsx("div", { className: l("text-color-secondary", o == null ? void 0 : o.cell), children: n == null ? void 0 : n.heading }, n == null ? void 0 : n.heading)) }), xn = E("desktop:grid mobile:hidden items-center", {
|
|
1738
1738
|
variants: {
|
|
1739
1739
|
columnsVariant: {
|
|
1740
1740
|
twoCols: "grid-cols-2 gap-16",
|
|
@@ -1745,7 +1745,7 @@ const mr = B(() => Promise.resolve().then(() => Fr)), xr = B(() => Promise.resol
|
|
|
1745
1745
|
separator: "px-4 py-4 border-t border-solid border-warm-grey-200"
|
|
1746
1746
|
}
|
|
1747
1747
|
}
|
|
1748
|
-
}), pn = ({ row: t, tableVariant: e, columnsVariant: o, rowIndex: n, classes: i }) => /* @__PURE__ */ r.jsx("div", { className: l(
|
|
1748
|
+
}), pn = ({ row: t, tableVariant: e, columnsVariant: o, rowIndex: n, classes: i }) => /* @__PURE__ */ r.jsx("div", { className: l(xn({ columnsVariant: o, tableVariant: e }), { "border-none": n === 0 }, i == null ? void 0 : i.row), children: t == null ? void 0 : t.map(({ cell: a }, d) => /* @__PURE__ */ r.jsx(
|
|
1749
1749
|
"div",
|
|
1750
1750
|
{
|
|
1751
1751
|
className: l("desk-body-regular-l text-color-dark", { "font-medium": d !== 0 }, i == null ? void 0 : i.cell),
|
|
@@ -1778,19 +1778,19 @@ const mr = B(() => Promise.resolve().then(() => Fr)), xr = B(() => Promise.resol
|
|
|
1778
1778
|
var u;
|
|
1779
1779
|
const a = ((u = dn(e, o)) == null ? void 0 : u.rows) ?? [], d = !!(o && o.length > 0);
|
|
1780
1780
|
return /* @__PURE__ */ r.jsxs("div", { className: l("flex flex-col", i == null ? void 0 : i.wrapper), children: [
|
|
1781
|
-
d && /* @__PURE__ */ r.jsx(
|
|
1782
|
-
e == null ? void 0 : e.map((m,
|
|
1781
|
+
d && /* @__PURE__ */ r.jsx(hn, { headings: o, columnsVariant: n, classes: i == null ? void 0 : i.desktopHeading }),
|
|
1782
|
+
e == null ? void 0 : e.map((m, h) => /* @__PURE__ */ r.jsx(
|
|
1783
1783
|
pn,
|
|
1784
1784
|
{
|
|
1785
|
-
rowIndex:
|
|
1785
|
+
rowIndex: h,
|
|
1786
1786
|
tableVariant: t,
|
|
1787
1787
|
columnsVariant: n,
|
|
1788
1788
|
classes: i == null ? void 0 : i.desktopRow,
|
|
1789
1789
|
...m
|
|
1790
1790
|
},
|
|
1791
|
-
|
|
1791
|
+
h
|
|
1792
1792
|
)),
|
|
1793
|
-
a == null ? void 0 : a.map((m,
|
|
1793
|
+
a == null ? void 0 : a.map((m, h) => /* @__PURE__ */ r.jsx(
|
|
1794
1794
|
fn,
|
|
1795
1795
|
{
|
|
1796
1796
|
headingsExist: d,
|
|
@@ -1799,7 +1799,7 @@ const mr = B(() => Promise.resolve().then(() => Fr)), xr = B(() => Promise.resol
|
|
|
1799
1799
|
classes: i == null ? void 0 : i.desktopRow,
|
|
1800
1800
|
...m
|
|
1801
1801
|
},
|
|
1802
|
-
|
|
1802
|
+
h
|
|
1803
1803
|
))
|
|
1804
1804
|
] });
|
|
1805
1805
|
}, gn = ({
|
|
@@ -1813,8 +1813,8 @@ const mr = B(() => Promise.resolve().then(() => Fr)), xr = B(() => Promise.resol
|
|
|
1813
1813
|
accordionConfig: u,
|
|
1814
1814
|
classes: m
|
|
1815
1815
|
}) => {
|
|
1816
|
-
const
|
|
1817
|
-
a && /* @__PURE__ */ r.jsx(
|
|
1816
|
+
const h = /* @__PURE__ */ r.jsxs("div", { className: l(un({ columnsVariant: o }), m == null ? void 0 : m.wrapper), children: [
|
|
1817
|
+
a && /* @__PURE__ */ r.jsx(D, { as: "h4", className: l("mb-4 desktop:mb-6", m == null ? void 0 : m.headline), children: a }),
|
|
1818
1818
|
/* @__PURE__ */ r.jsx(bn, { tableVariant: t, rows: i, headings: d, columnsVariant: o }),
|
|
1819
1819
|
e && /* @__PURE__ */ r.jsx(
|
|
1820
1820
|
"div",
|
|
@@ -1824,7 +1824,7 @@ const mr = B(() => Promise.resolve().then(() => Fr)), xr = B(() => Promise.resol
|
|
|
1824
1824
|
}
|
|
1825
1825
|
)
|
|
1826
1826
|
] });
|
|
1827
|
-
return /* @__PURE__ */ r.jsx(r.Fragment, { children: n && (n != null && n.isAccordion) && (n != null && n.accordionTitle) ? /* @__PURE__ */ r.jsx(ae, { label: n == null ? void 0 : n.accordionTitle, ...u, children: (u == null ? void 0 : u.children) ||
|
|
1827
|
+
return /* @__PURE__ */ r.jsx(r.Fragment, { children: n && (n != null && n.isAccordion) && (n != null && n.accordionTitle) ? /* @__PURE__ */ r.jsx(ae, { label: n == null ? void 0 : n.accordionTitle, ...u, children: (u == null ? void 0 : u.children) || h }) : h });
|
|
1828
1828
|
}, jn = {
|
|
1829
1829
|
documentFilled: "files/documentFilled",
|
|
1830
1830
|
documentOutline: "files/documentOutline"
|
|
@@ -1862,7 +1862,7 @@ const mr = B(() => Promise.resolve().then(() => Fr)), xr = B(() => Promise.resol
|
|
|
1862
1862
|
}
|
|
1863
1863
|
), kn = ({ docs: t, config: e, title: o, iconType: n, description: i, classes: a, accordionConfig: d }) => {
|
|
1864
1864
|
const u = /* @__PURE__ */ r.jsxs("div", { className: l("flex max-w-[680px] flex-col", a == null ? void 0 : a.wrapper), children: [
|
|
1865
|
-
o && /* @__PURE__ */ r.jsx(
|
|
1865
|
+
o && /* @__PURE__ */ r.jsx(D, { as: "h3", className: "mb-4", children: o }),
|
|
1866
1866
|
/* @__PURE__ */ r.jsx("div", { className: l("flex flex-col gap-4", a == null ? void 0 : a.documentsWrapper), children: t == null ? void 0 : t.map((m) => /* @__PURE__ */ r.jsx(sn, { iconType: n, ...m, classes: a == null ? void 0 : a.singleDocument }, m.label)) }),
|
|
1867
1867
|
i && /* @__PURE__ */ r.jsx("div", { className: l("mt-4", a == null ? void 0 : a.description), dangerouslySetInnerHTML: { __html: i ?? "" } })
|
|
1868
1868
|
] });
|
|
@@ -1906,11 +1906,11 @@ const mr = B(() => Promise.resolve().then(() => Fr)), xr = B(() => Promise.resol
|
|
|
1906
1906
|
}
|
|
1907
1907
|
}, vn = ({ entity: t, classes: e, accordionsConfig: o }) => /* @__PURE__ */ r.jsx("div", { className: l("flex flex-col gap-6", e == null ? void 0 : e.entityWrapper), children: wn({ entity: t, classes: e, accordionsConfig: o }) }), at = ({ headline: t, tabs: e, classes: o, accordionsConfig: n }) => {
|
|
1908
1908
|
var u, m;
|
|
1909
|
-
const [i, a] = q(0), d = se(() => e == null ? void 0 : e.map((
|
|
1909
|
+
const [i, a] = q(0), d = se(() => e == null ? void 0 : e.map((h) => h == null ? void 0 : h.tabName), [e]) ?? [];
|
|
1910
1910
|
return !e || (e == null ? void 0 : e.length) === 0 ? null : /* @__PURE__ */ r.jsx("section", { id: y.usefulInfo, "data-test-id": y.usefulInfo, className: l(o == null ? void 0 : o.root), children: /* @__PURE__ */ r.jsxs(F, { className: l(o == null ? void 0 : o.container), children: [
|
|
1911
|
-
/* @__PURE__ */ r.jsx(
|
|
1911
|
+
/* @__PURE__ */ r.jsx(D, { className: l(o == null ? void 0 : o.headline), as: "h2", children: t }),
|
|
1912
1912
|
/* @__PURE__ */ r.jsx("div", { className: l("mt-6 flex flex-col gap-2 desktop:mt-12", o == null ? void 0 : o.tabsWrapper), children: /* @__PURE__ */ r.jsx(rn, { tabsNames: d, activeTab: i, setActiveTab: a, classes: o == null ? void 0 : o.tabs }) }),
|
|
1913
|
-
/* @__PURE__ */ r.jsx("div", { className: l("mt-6 flex flex-col gap-6", o == null ? void 0 : o.contentWrapper), children: (m = (u = e == null ? void 0 : e[i]) == null ? void 0 : u.contents) == null ? void 0 : m.map((
|
|
1913
|
+
/* @__PURE__ */ r.jsx("div", { className: l("mt-6 flex flex-col gap-6", o == null ? void 0 : o.contentWrapper), children: (m = (u = e == null ? void 0 : e[i]) == null ? void 0 : u.contents) == null ? void 0 : m.map((h, p) => /* @__PURE__ */ r.jsx(vn, { accordionsConfig: n, ...h, classes: o == null ? void 0 : o.entityClasses }, p)) })
|
|
1914
1914
|
] }) });
|
|
1915
1915
|
}, Nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1916
1916
|
__proto__: null,
|
|
@@ -1947,12 +1947,12 @@ class Cn {
|
|
|
1947
1947
|
if (o === "node")
|
|
1948
1948
|
n.push(e);
|
|
1949
1949
|
else {
|
|
1950
|
-
const
|
|
1951
|
-
n.push(
|
|
1950
|
+
const h = u.outerHTML.trim();
|
|
1951
|
+
n.push(h);
|
|
1952
1952
|
}
|
|
1953
1953
|
if (a)
|
|
1954
|
-
for (const
|
|
1955
|
-
this.traverse(
|
|
1954
|
+
for (const h of e.childNodes)
|
|
1955
|
+
this.traverse(h, o, n);
|
|
1956
1956
|
break;
|
|
1957
1957
|
// если узел - текстовый и требуется его добавить, добавляем
|
|
1958
1958
|
case this.TEXT_NODE:
|
|
@@ -1961,8 +1961,8 @@ class Cn {
|
|
|
1961
1961
|
if (o === "node")
|
|
1962
1962
|
n.push(e);
|
|
1963
1963
|
else {
|
|
1964
|
-
const
|
|
1965
|
-
|
|
1964
|
+
const h = e.textContent;
|
|
1965
|
+
h && n.push(h);
|
|
1966
1966
|
}
|
|
1967
1967
|
break;
|
|
1968
1968
|
}
|
|
@@ -2049,13 +2049,13 @@ const ie = ({ html: t, as: e, ...o }) => {
|
|
|
2049
2049
|
classes: d,
|
|
2050
2050
|
buttonGroup: u
|
|
2051
2051
|
}) => {
|
|
2052
|
-
var
|
|
2053
|
-
const { submitCallback: m } = a || {}, [
|
|
2052
|
+
var R, C;
|
|
2053
|
+
const { submitCallback: m } = a || {}, [h, p] = q(!1), c = Re(t), g = Pe.getZodDefaults(c), { control: f, handleSubmit: v } = Be({
|
|
2054
2054
|
schema: c,
|
|
2055
2055
|
defaultValues: g,
|
|
2056
2056
|
mode: "onBlur"
|
|
2057
2057
|
}), j = In(o, t), k = rr({ control: f, fields: j || [], schema: c }), _ = (I) => {
|
|
2058
|
-
m && m({ ...I, agree:
|
|
2058
|
+
m && m({ ...I, agree: h });
|
|
2059
2059
|
};
|
|
2060
2060
|
return /* @__PURE__ */ r.jsx(Mt, { children: /* @__PURE__ */ r.jsx("section", { id: y.form, "data-test-id": y.form, className: l("w-full", d == null ? void 0 : d.root), children: /* @__PURE__ */ r.jsxs(
|
|
2061
2061
|
F,
|
|
@@ -2072,15 +2072,16 @@ const ie = ({ html: t, as: e, ...o }) => {
|
|
|
2072
2072
|
"desk-body-regular-l flex items-center gap-x-2 rounded-sm desktop:absolute",
|
|
2073
2073
|
"bg-color-blue-grey-100 px-2 py-1 text-color-tetriary",
|
|
2074
2074
|
"right-4 top-4 w-max",
|
|
2075
|
-
(
|
|
2075
|
+
(R = d == null ? void 0 : d.chips) == null ? void 0 : R.root
|
|
2076
2076
|
),
|
|
2077
2077
|
children: [
|
|
2078
|
-
i.image && /* @__PURE__ */ r.jsx(b, { name: i.image, className: l("size-
|
|
2078
|
+
i.image && /* @__PURE__ */ r.jsx(b, { name: i.image, className: l("size-6", (C = d == null ? void 0 : d.chips) == null ? void 0 : C.icon) }),
|
|
2079
2079
|
i.content
|
|
2080
2080
|
]
|
|
2081
2081
|
}
|
|
2082
2082
|
),
|
|
2083
|
-
/* @__PURE__ */ r.jsx(
|
|
2083
|
+
/* @__PURE__ */ r.jsx(D, { as: "h2", className: l("desktop:hidden", d == null ? void 0 : d.title), children: e }),
|
|
2084
|
+
/* @__PURE__ */ r.jsx(D, { as: "h3", className: l("mobile:hidden", d == null ? void 0 : d.title), children: e }),
|
|
2084
2085
|
/* @__PURE__ */ r.jsxs(
|
|
2085
2086
|
"form",
|
|
2086
2087
|
{
|
|
@@ -2099,14 +2100,14 @@ const ie = ({ html: t, as: e, ...o }) => {
|
|
|
2099
2100
|
),
|
|
2100
2101
|
/* @__PURE__ */ r.jsx(De, { control: f, fields: t }),
|
|
2101
2102
|
/* @__PURE__ */ r.jsxs("div", { className: "mob-body-regular-m flex flex-col items-start justify-center gap-4", children: [
|
|
2102
|
-
Fn(n,
|
|
2103
|
-
/* @__PURE__ */ r.jsx("div", { className: "flex w-full flex-col items-center justify-center gap-4 desktop:flex-row", children: u == null ? void 0 : u.map((I,
|
|
2104
|
-
const V = I.type === "submit" && n.type === "checkbox" ? !
|
|
2103
|
+
Fn(n, h, p, d == null ? void 0 : d.approvement),
|
|
2104
|
+
/* @__PURE__ */ r.jsx("div", { className: "flex w-full flex-col items-center justify-center gap-4 desktop:flex-row", children: u == null ? void 0 : u.map((I, H) => {
|
|
2105
|
+
const V = I.type === "submit" && n.type === "checkbox" ? !h : !1;
|
|
2105
2106
|
return /* @__PURE__ */ Oe(
|
|
2106
2107
|
ge,
|
|
2107
2108
|
{
|
|
2108
2109
|
...I,
|
|
2109
|
-
key:
|
|
2110
|
+
key: H,
|
|
2110
2111
|
disabled: V,
|
|
2111
2112
|
className: l(
|
|
2112
2113
|
"w-full whitespace-nowrap",
|
|
@@ -2152,24 +2153,24 @@ const ie = ({ html: t, as: e, ...o }) => {
|
|
|
2152
2153
|
buttonGroup: d,
|
|
2153
2154
|
...u
|
|
2154
2155
|
}) => {
|
|
2155
|
-
const { submitCallback: m } = n ?? {}, [
|
|
2156
|
+
const { submitCallback: m } = n ?? {}, [h, p] = q(!1), c = Re(t), g = Pe.getZodDefaults(c), { control: f, handleSubmit: v } = Be({
|
|
2156
2157
|
schema: c,
|
|
2157
2158
|
defaultValues: g,
|
|
2158
2159
|
mode: "onBlur"
|
|
2159
2160
|
}), j = (k) => {
|
|
2160
|
-
m && m({ ...k, agree:
|
|
2161
|
+
m && m({ ...k, agree: h });
|
|
2161
2162
|
};
|
|
2162
2163
|
return /* @__PURE__ */ r.jsx(Mt, { children: /* @__PURE__ */ r.jsx(Ut, { id: i, title: e, ...u, children: /* @__PURE__ */ r.jsxs("form", { onSubmit: v(j), className: "flex flex-col gap-6", children: [
|
|
2163
2164
|
/* @__PURE__ */ r.jsx(De, { control: f, fields: t }),
|
|
2164
|
-
Bn(o,
|
|
2165
|
+
Bn(o, h, p, a == null ? void 0 : a.approvement),
|
|
2165
2166
|
d == null ? void 0 : d.map((k, _) => {
|
|
2166
|
-
const
|
|
2167
|
+
const R = k.type === "submit" && o.type === "checkbox" ? !h : !1;
|
|
2167
2168
|
return /* @__PURE__ */ Oe(
|
|
2168
2169
|
ge,
|
|
2169
2170
|
{
|
|
2170
2171
|
...k,
|
|
2171
2172
|
key: _,
|
|
2172
|
-
disabled:
|
|
2173
|
+
disabled: R,
|
|
2173
2174
|
className: l(
|
|
2174
2175
|
"w-full whitespace-nowrap",
|
|
2175
2176
|
{
|
|
@@ -2258,7 +2259,7 @@ const ie = ({ html: t, as: e, ...o }) => {
|
|
|
2258
2259
|
}
|
|
2259
2260
|
),
|
|
2260
2261
|
/* @__PURE__ */ r.jsxs("div", { className: "flex flex-col items-center gap-2 text-center desktop:gap-6", children: [
|
|
2261
|
-
/* @__PURE__ */ r.jsx(
|
|
2262
|
+
/* @__PURE__ */ r.jsx(D, { as: "h2", children: de()[t].title }),
|
|
2262
2263
|
/* @__PURE__ */ r.jsx("p", { className: "desk-body-regular-l text-color-dark", children: de()[t].description })
|
|
2263
2264
|
] }),
|
|
2264
2265
|
/* @__PURE__ */ r.jsx(ge, { size: "lg", className: "w-full max-w-[328px] desktop:desk-body-regular-l desktop:w-[256px]", onClick: e, children: de()[t].button.text })
|
|
@@ -2293,7 +2294,7 @@ const ie = ({ html: t, as: e, ...o }) => {
|
|
|
2293
2294
|
}), Rn = ({ separator: t, ellipsis: e, classes: o, breadcrumbs: n = Dn }) => {
|
|
2294
2295
|
const [i, a] = q(!1), d = Fe(null);
|
|
2295
2296
|
er(d, () => a(!1));
|
|
2296
|
-
const { first: u, middle: m, last:
|
|
2297
|
+
const { first: u, middle: m, last: h } = se(() => {
|
|
2297
2298
|
let c = [], g = [], f = [];
|
|
2298
2299
|
return e && (c = n.slice(0, e), g = n.slice(e, n.length - e), f = n.slice(n.length - e)), { first: c, middle: g, last: f };
|
|
2299
2300
|
}, [n, e]), p = t ?? /* @__PURE__ */ r.jsx(b, { name: "arrows/arrowRight", className: l("size-4", o == null ? void 0 : o.separator) });
|
|
@@ -2345,7 +2346,7 @@ const ie = ({ html: t, as: e, ...o }) => {
|
|
|
2345
2346
|
] }),
|
|
2346
2347
|
p
|
|
2347
2348
|
] }),
|
|
2348
|
-
be(
|
|
2349
|
+
be(h, p, o == null ? void 0 : o.breadcrumb, h.length - 1)
|
|
2349
2350
|
] })
|
|
2350
2351
|
) : (
|
|
2351
2352
|
// otherwise render all breadcrumbs
|
|
@@ -2424,7 +2425,7 @@ const Hn = (t, e) => {
|
|
|
2424
2425
|
((n = (o = document.body.querySelector("#modal-preview")) == null ? void 0 : o.contentDocument) == null ? void 0 : n.body) ?? document.body
|
|
2425
2426
|
);
|
|
2426
2427
|
}, $n = Yt(({ category: t, active: e, onActiveTabChange: o }, n) => {
|
|
2427
|
-
var m,
|
|
2428
|
+
var m, h;
|
|
2428
2429
|
const i = n && "current" in n ? n : null, a = (m = i == null ? void 0 : i.current) == null ? void 0 : m.getBoundingClientRect(), d = e && !S.isArrayEmpty(t.children), u = S.isArrayEmpty(t.children) ? "a" : "span";
|
|
2429
2430
|
return /* @__PURE__ */ r.jsxs(
|
|
2430
2431
|
Se.div,
|
|
@@ -2443,7 +2444,7 @@ const Hn = (t, e) => {
|
|
|
2443
2444
|
onMouseLeave: () => o(null),
|
|
2444
2445
|
onFocus: () => o(t.title),
|
|
2445
2446
|
children: [
|
|
2446
|
-
/* @__PURE__ */ r.jsx(u, { href: u === "a" ? (
|
|
2447
|
+
/* @__PURE__ */ r.jsx(u, { href: u === "a" ? (h = t.link) == null ? void 0 : h.href : void 0, className: "desk-body-regular-m outline-none", children: t.title }),
|
|
2447
2448
|
d && /* @__PURE__ */ r.jsx(
|
|
2448
2449
|
Vn,
|
|
2449
2450
|
{
|
|
@@ -2617,11 +2618,11 @@ const Hn = (t, e) => {
|
|
|
2617
2618
|
value: e.title ?? "",
|
|
2618
2619
|
label: e.title ?? ""
|
|
2619
2620
|
})), Yn = ({ categories: t, helpers: e, phone: o, ...n }) => {
|
|
2620
|
-
const i = Xn(t), [a, d] = q(i[0]), u = (
|
|
2621
|
-
S.isUndefined(
|
|
2621
|
+
const i = Xn(t), [a, d] = q(i[0]), u = (h) => {
|
|
2622
|
+
S.isUndefined(h) || S.isArray(h) || d(h);
|
|
2622
2623
|
}, m = se(() => {
|
|
2623
|
-
var
|
|
2624
|
-
return S.isUndefined(a) || S.isArray(a) ? [] : ((
|
|
2624
|
+
var h;
|
|
2625
|
+
return S.isUndefined(a) || S.isArray(a) ? [] : ((h = t.find((p) => p.title === a.value)) == null ? void 0 : h.children) ?? [];
|
|
2625
2626
|
}, [a, t]);
|
|
2626
2627
|
return /* @__PURE__ */ r.jsxs(
|
|
2627
2628
|
Se.div,
|
|
@@ -2637,18 +2638,18 @@ const Hn = (t, e) => {
|
|
|
2637
2638
|
animate: { opacity: 1 },
|
|
2638
2639
|
children: [
|
|
2639
2640
|
/* @__PURE__ */ r.jsx(ye.SelectBase, { label: "Категория", options: i, value: a, onChange: u }),
|
|
2640
|
-
/* @__PURE__ */ r.jsx("div", { className: "flex w-full flex-col items-center justify-center gap-y-1", children: m.map((
|
|
2641
|
+
/* @__PURE__ */ r.jsx("div", { className: "flex w-full flex-col items-center justify-center gap-y-1", children: m.map((h) => {
|
|
2641
2642
|
var p;
|
|
2642
|
-
return S.isArrayEmpty(
|
|
2643
|
+
return S.isArrayEmpty(h.children) ? /* @__PURE__ */ r.jsx("div", { className: "w-full px-4 py-2.5", children: /* @__PURE__ */ r.jsx("a", { href: (p = h.link) == null ? void 0 : p.href, className: "desk-body-regular-m inline-block w-full", children: h.title }) }, h.title) : /* @__PURE__ */ r.jsx(Zn, { category: h }, h.title);
|
|
2643
2644
|
}) }),
|
|
2644
2645
|
/* @__PURE__ */ r.jsx("div", { className: "h-[1px] w-full bg-color-blue-grey-200" }),
|
|
2645
2646
|
/* @__PURE__ */ r.jsxs("div", { className: "flex w-full flex-col items-center justify-center gap-y-1", children: [
|
|
2646
|
-
e.map((
|
|
2647
|
+
e.map((h) => {
|
|
2647
2648
|
var p, c;
|
|
2648
|
-
return /* @__PURE__ */ r.jsx("div", { className: "w-full px-4 py-2.5", children: /* @__PURE__ */ r.jsxs("a", { href: (p =
|
|
2649
|
-
((c =
|
|
2650
|
-
|
|
2651
|
-
] }) },
|
|
2649
|
+
return /* @__PURE__ */ r.jsx("div", { className: "w-full px-4 py-2.5", children: /* @__PURE__ */ r.jsxs("a", { href: (p = h.link) == null ? void 0 : p.href, className: "flex w-full items-center gap-x-1", children: [
|
|
2650
|
+
((c = h.link) == null ? void 0 : c.icon) && /* @__PURE__ */ r.jsx(b, { name: h.link.icon, className: "size-4" }),
|
|
2651
|
+
h.title
|
|
2652
|
+
] }) }, h.title);
|
|
2652
2653
|
}),
|
|
2653
2654
|
/* @__PURE__ */ r.jsx("div", { className: "w-full px-4 py-2.5", children: /* @__PURE__ */ r.jsxs("a", { href: `tel:${o}`, className: "flex w-full items-center gap-x-1", children: [
|
|
2654
2655
|
/* @__PURE__ */ r.jsx(b, { name: "communication/phone", className: "size-4" }),
|
|
@@ -2659,7 +2660,7 @@ const Hn = (t, e) => {
|
|
|
2659
2660
|
}
|
|
2660
2661
|
);
|
|
2661
2662
|
}, Jn = ({ categories: t, helpers: e, phone: o }) => {
|
|
2662
|
-
var m,
|
|
2663
|
+
var m, h, p;
|
|
2663
2664
|
const n = Fe(null), i = (m = n.current) == null ? void 0 : m.getBoundingClientRect(), [a, d] = q(!1), u = () => d(!a);
|
|
2664
2665
|
return /* @__PURE__ */ r.jsxs(
|
|
2665
2666
|
"div",
|
|
@@ -2682,7 +2683,7 @@ const Hn = (t, e) => {
|
|
|
2682
2683
|
/**
|
|
2683
2684
|
* Нужно для preview, чтобы категории рендерились в iframe
|
|
2684
2685
|
*/
|
|
2685
|
-
((p = (
|
|
2686
|
+
((p = (h = document.body.querySelector("#modal-preview")) == null ? void 0 : h.contentDocument) == null ? void 0 : p.body) ?? document.body
|
|
2686
2687
|
)
|
|
2687
2688
|
]
|
|
2688
2689
|
}
|
|
@@ -2729,13 +2730,13 @@ const Hn = (t, e) => {
|
|
|
2729
2730
|
return Tt(t, Number(e));
|
|
2730
2731
|
}
|
|
2731
2732
|
}, to = (t) => Object.values(t).reduce((o, n) => o.merge(Re(n.fields)), kt({})), ro = (t, e) => (t.match(/[a-zA-Z_$][a-zA-Z0-9_$]*/g) || []).filter((i) => !(i in e)).length > 0 ? "" : t, St = (t, e) => {
|
|
2732
|
-
const o = Object.entries(e).map(([m,
|
|
2733
|
+
const o = Object.entries(e).map(([m, h]) => [m, S.isNil(h) ? "1" : h]), n = o.map(([m]) => m), i = o.map(([, m]) => m), a = ro(t, Object.fromEntries(o)), u = new Function(...n, `return ${a};`)(...i.map(Number));
|
|
2733
2734
|
return Number.isNaN(Number(u)) ? "0" : u.toString();
|
|
2734
2735
|
}, no = (t, e) => t.map((o) => ({
|
|
2735
2736
|
...o,
|
|
2736
2737
|
value: _t(o.value) ? St(o.value.formula, e) : o.value
|
|
2737
2738
|
})), oo = ({ subtitle: t, title: e }) => /* @__PURE__ */ r.jsx(r.Fragment, { children: (e || t) && /* @__PURE__ */ r.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
2738
|
-
e && /* @__PURE__ */ r.jsx(
|
|
2739
|
+
e && /* @__PURE__ */ r.jsx(D, { as: "h3", children: e }),
|
|
2739
2740
|
t && /* @__PURE__ */ r.jsx("div", { className: "desk-body-regular-l text-color-dark", children: t })
|
|
2740
2741
|
] }) }), io = ({ rootDescription: t, rootValue: e, suffix: o }) => /* @__PURE__ */ r.jsxs("div", { className: "mb-6 flex items-center justify-between gap-6", children: [
|
|
2741
2742
|
/* @__PURE__ */ r.jsx("p", { className: "desk-body-regular-l text-color-dark", children: t }),
|
|
@@ -2775,7 +2776,7 @@ const Hn = (t, e) => {
|
|
|
2775
2776
|
t && /* @__PURE__ */ r.jsx(uo, { ...t }),
|
|
2776
2777
|
/* @__PURE__ */ r.jsx("div", { className: l("flex items-center gap-4 mobile:flex-col"), children: e == null ? void 0 : e.map((n, i) => /* @__PURE__ */ r.jsx(Y, { className: "w-full", ...n }, i)) }),
|
|
2777
2778
|
o && /* @__PURE__ */ r.jsx("p", { className: "desk-body-regular-m mt-4 text-color-secondary", children: o })
|
|
2778
|
-
] }),
|
|
2779
|
+
] }), ho = ({
|
|
2779
2780
|
rootDescription: t,
|
|
2780
2781
|
bottomDescription: e,
|
|
2781
2782
|
rootValue: o,
|
|
@@ -2790,11 +2791,11 @@ const Hn = (t, e) => {
|
|
|
2790
2791
|
/* @__PURE__ */ r.jsx(oo, { title: n, subtitle: i }),
|
|
2791
2792
|
/* @__PURE__ */ r.jsx(lo, { infoList: d }),
|
|
2792
2793
|
/* @__PURE__ */ r.jsx(mo, { assistHint: m, buttonsConfig: a, bottomDescription: e })
|
|
2793
|
-
] }),
|
|
2794
|
+
] }), xo = 2e4, Ot = ({
|
|
2794
2795
|
slidersGroupConfig: t,
|
|
2795
2796
|
additionalSliderGroupConfig: e
|
|
2796
2797
|
}) => {
|
|
2797
|
-
const [o, n] = q(!1), { watch: i, setValue: a } = we(), d = t == null ? void 0 : t.fields.find(({ args: _ }) => _.name === "sum"), { args: u } = d || {}, { max: m, name:
|
|
2798
|
+
const [o, n] = q(!1), { watch: i, setValue: a } = we(), d = t == null ? void 0 : t.fields.find(({ args: _ }) => _.name === "sum"), { args: u } = d || {}, { max: m, name: h, defaultValue: p } = u || {}, c = i(h), { min: g, name: f } = (e == null ? void 0 : e.args) ?? {}, v = i(f), j = Number(m ?? 0) - (c ?? p);
|
|
2798
2799
|
return qe(() => {
|
|
2799
2800
|
v > j && a(f, j);
|
|
2800
2801
|
}, [j, v, a, c]), qe(() => {
|
|
@@ -2803,12 +2804,12 @@ const Hn = (t, e) => {
|
|
|
2803
2804
|
sliderVisible: o,
|
|
2804
2805
|
setSliderVisible: n,
|
|
2805
2806
|
sumMax: m,
|
|
2806
|
-
sumName:
|
|
2807
|
+
sumName: h,
|
|
2807
2808
|
sumDefaultValue: p,
|
|
2808
2809
|
sumValue: c,
|
|
2809
2810
|
additionalSliderMax: j,
|
|
2810
2811
|
onCheckedChange: () => {
|
|
2811
|
-
n((_) => !_), v <= 0 && a(f, g), Number(m) === c && (a(
|
|
2812
|
+
n((_) => !_), v <= 0 && a(f, g), Number(m) === c && (a(h ?? "", c - xo), a(f, g));
|
|
2812
2813
|
},
|
|
2813
2814
|
sliderSumExist: !S.isObjectEmpty(d == null ? void 0 : d.args),
|
|
2814
2815
|
sliderSumCorrectType: (d == null ? void 0 : d.args.componentType) === "algorithmic" || (d == null ? void 0 : d.args.componentType) === "step"
|
|
@@ -2907,13 +2908,13 @@ const Hn = (t, e) => {
|
|
|
2907
2908
|
}), i = n.watch(), { rootValue: a } = t, d = _t(a) ? St(a.formula, i) : a, u = { ...t, rootValue: d };
|
|
2908
2909
|
return /* @__PURE__ */ r.jsx(tr, { ...n, children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-start gap-16", children: [
|
|
2909
2910
|
/* @__PURE__ */ r.jsx(bo, { ...e }),
|
|
2910
|
-
/* @__PURE__ */ r.jsx(
|
|
2911
|
+
/* @__PURE__ */ r.jsx(ho, { ...u })
|
|
2911
2912
|
] }) });
|
|
2912
2913
|
}, mt = ({ calculators: t, headline: e }) => {
|
|
2913
2914
|
var m;
|
|
2914
|
-
const o = t.length > 1, [n, i] = q(o ? (m = t[0]) == null ? void 0 : m.name : ""), a = se(() => t == null ? void 0 : t.map(({ name:
|
|
2915
|
+
const o = t.length > 1, [n, i] = q(o ? (m = t[0]) == null ? void 0 : m.name : ""), a = se(() => t == null ? void 0 : t.map(({ name: h, label: p }) => ({ name: h, label: p })), [t]), d = o ? a == null ? void 0 : a.findIndex((h) => h.name === n) : 0, u = t[d];
|
|
2915
2916
|
return /* @__PURE__ */ r.jsx("section", { id: y.calculator, children: /* @__PURE__ */ r.jsx(F, { children: /* @__PURE__ */ r.jsxs("div", { className: "rounded-md bg-color-white px-10 py-12 shadow-md", children: [
|
|
2916
|
-
/* @__PURE__ */ r.jsx(
|
|
2917
|
+
/* @__PURE__ */ r.jsx(D, { className: "mb-12", as: "h2", children: e }),
|
|
2917
2918
|
o && /* @__PURE__ */ r.jsx(
|
|
2918
2919
|
go,
|
|
2919
2920
|
{
|