@revenuecat/purchases-ui-js 2.0.3 → 2.0.5
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/components/button/ButtonNode.stories.svelte +1 -1
- package/dist/components/button/ButtonNode.svelte +27 -3
- package/dist/components/carousel/Carousel.stories.svelte +1039 -0
- package/dist/components/carousel/Carousel.stories.svelte.d.ts +19 -0
- package/dist/components/carousel/Carousel.svelte +298 -0
- package/dist/components/carousel/Carousel.svelte.d.ts +4 -0
- package/dist/components/carousel/CarouselPage.svelte +39 -0
- package/dist/components/carousel/CarouselPage.svelte.d.ts +11 -0
- package/dist/components/carousel/PageControl.svelte +93 -0
- package/dist/components/carousel/PageControl.svelte.d.ts +4 -0
- package/dist/components/carousel/carousel-utils.d.ts +4 -0
- package/dist/components/carousel/carousel-utils.js +21 -0
- package/dist/components/package/Package.svelte +3 -1
- package/dist/components/paywall/Node.svelte +12 -24
- package/dist/components/paywall/Node.svelte.d.ts +1 -6
- package/dist/components/paywall/Paywall.stories.svelte +155 -0
- package/dist/components/paywall/Paywall.svelte +50 -59
- package/dist/components/paywall/Paywall.svelte.d.ts +2 -1
- package/dist/components/paywall/Sheet.svelte +126 -0
- package/dist/components/paywall/Sheet.svelte.d.ts +4 -0
- package/dist/components/paywall/fixtures/background-paywall.d.ts +3 -0
- package/dist/components/paywall/fixtures/background-paywall.js +62 -0
- package/dist/components/paywall/fixtures/override-paywall.d.ts +1 -1
- package/dist/components/paywall/fixtures/sheet-paywall.d.ts +2 -0
- package/dist/components/paywall/fixtures/sheet-paywall.js +325 -0
- package/dist/components/paywall/fixtures/stack-paywall.d.ts +1 -1
- package/dist/components/stack/Stack.svelte +6 -1
- package/dist/components/stack/Stack.svelte.d.ts +2 -0
- package/dist/components/tabs/TabControl.svelte +11 -0
- package/dist/components/tabs/TabControl.svelte.d.ts +4 -0
- package/dist/components/tabs/TabControlButton.svelte +19 -0
- package/dist/components/tabs/TabControlButton.svelte.d.ts +4 -0
- package/dist/components/tabs/Tabs.stories.svelte +929 -0
- package/dist/components/tabs/Tabs.stories.svelte.d.ts +19 -0
- package/dist/components/tabs/Tabs.svelte +69 -0
- package/dist/components/tabs/Tabs.svelte.d.ts +4 -0
- package/dist/components/tabs/tabs-context.d.ts +11 -0
- package/dist/components/tabs/tabs-context.js +12 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/stores/paywall.d.ts +1 -1
- package/dist/stores/selected.d.ts +1 -1
- package/dist/stores/selected.js +3 -5
- package/dist/stories/fixtures.d.ts +2 -1
- package/dist/stories/viewport-wrapper.svelte +7 -5
- package/dist/types/component.d.ts +5 -3
- package/dist/types/components/button.d.ts +4 -1
- package/dist/types/components/carousel.d.ts +51 -0
- package/dist/types/components/sheet.d.ts +16 -0
- package/dist/types/components/sheet.js +1 -0
- package/dist/types/components/tabs.d.ts +46 -0
- package/dist/types/components/tabs.js +1 -0
- package/dist/types/paywall.d.ts +26 -0
- package/dist/types/paywall.js +1 -0
- package/dist/types/ui-config.d.ts +20 -0
- package/dist/types/ui-config.js +1 -0
- package/dist/types.d.ts +6 -2
- package/dist/utils/base-utils.d.ts +1 -1
- package/dist/utils/base-utils.js +2 -17
- package/dist/utils/font-utils.d.ts +1 -1
- package/dist/utils/style-utils.d.ts +2 -9
- package/dist/utils/style-utils.js +7 -24
- package/dist/web-components/index.js +969 -942
- package/package.json +20 -20
- package/dist/components/paywall/paywall-utils.d.ts +0 -8
- package/dist/components/paywall/paywall-utils.js +0 -24
- package/dist/data/entities.d.ts +0 -46
- /package/dist/{data/entities.js → types/components/carousel.js} +0 -0
|
@@ -1,133 +1,133 @@
|
|
|
1
1
|
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add("5");
|
|
2
|
-
const
|
|
3
|
-
var
|
|
4
|
-
const
|
|
2
|
+
const en = 1, tn = 2, nn = 4, rn = 8, an = 16, y = Symbol(), sn = "http://www.w3.org/1999/xhtml", pt = !1;
|
|
3
|
+
var ln = Array.isArray, on = Array.prototype.indexOf, tt = Object.defineProperty, Ee = Object.getOwnPropertyDescriptor, vt = Object.getOwnPropertyDescriptors, fn = Object.prototype, un = Array.prototype, We = Object.getPrototypeOf;
|
|
4
|
+
const Oe = () => {
|
|
5
5
|
};
|
|
6
|
-
function
|
|
7
|
-
for (var
|
|
8
|
-
t
|
|
6
|
+
function cn(e) {
|
|
7
|
+
for (var t = 0; t < e.length; t++)
|
|
8
|
+
e[t]();
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
var
|
|
12
|
-
|
|
10
|
+
function gt() {
|
|
11
|
+
var e, t, n = new Promise((r, i) => {
|
|
12
|
+
e = r, t = i;
|
|
13
13
|
});
|
|
14
|
-
return { promise: n, resolve:
|
|
14
|
+
return { promise: n, resolve: e, reject: t };
|
|
15
15
|
}
|
|
16
|
-
const
|
|
16
|
+
const T = 2, ht = 4, bt = 8, ne = 16, G = 32, ue = 64, mt = 128, R = 256, xe = 512, E = 1024, I = 2048, K = 4096, X = 8192, re = 16384, yt = 32768, Le = 65536, nt = 1 << 17, dn = 1 << 18, De = 1 << 19, _n = 1 << 20, Be = 1 << 21, Ne = 1 << 22, Q = 1 << 23, le = Symbol("$state"), pn = Symbol("legacy props"), vn = Symbol(""), pe = new class extends Error {
|
|
17
17
|
name = "StaleReactionError";
|
|
18
18
|
message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
|
|
19
19
|
}();
|
|
20
|
-
function
|
|
20
|
+
function gn() {
|
|
21
21
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
22
22
|
}
|
|
23
23
|
function hn() {
|
|
24
24
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function bn(e) {
|
|
27
27
|
throw new Error("https://svelte.dev/e/props_invalid_value");
|
|
28
28
|
}
|
|
29
29
|
function mn() {
|
|
30
30
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function yn() {
|
|
33
33
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function Sn() {
|
|
36
36
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
return
|
|
38
|
+
function St(e) {
|
|
39
|
+
return e === this.v;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
return
|
|
41
|
+
function wn(e, t) {
|
|
42
|
+
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
return !
|
|
44
|
+
function En(e) {
|
|
45
|
+
return !wn(e, this.v);
|
|
46
46
|
}
|
|
47
|
-
let
|
|
48
|
-
function
|
|
49
|
-
|
|
47
|
+
let Re = !1, xn = !1;
|
|
48
|
+
function kn() {
|
|
49
|
+
Re = !0;
|
|
50
50
|
}
|
|
51
|
-
let
|
|
52
|
-
function
|
|
53
|
-
|
|
51
|
+
let C = null;
|
|
52
|
+
function ke(e) {
|
|
53
|
+
C = e;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
|
|
57
|
-
p:
|
|
55
|
+
function Tn(e, t = !1, n) {
|
|
56
|
+
C = {
|
|
57
|
+
p: C,
|
|
58
58
|
c: null,
|
|
59
59
|
e: null,
|
|
60
|
-
s:
|
|
60
|
+
s: e,
|
|
61
61
|
x: null,
|
|
62
|
-
l:
|
|
62
|
+
l: Re && !t ? { s: null, u: null, $: [] } : null
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
var
|
|
65
|
+
function An(e) {
|
|
66
|
+
var t = (
|
|
67
67
|
/** @type {ComponentContext} */
|
|
68
|
-
|
|
69
|
-
), n =
|
|
68
|
+
C
|
|
69
|
+
), n = t.e;
|
|
70
70
|
if (n !== null) {
|
|
71
|
-
|
|
71
|
+
t.e = null;
|
|
72
72
|
for (var r of n)
|
|
73
|
-
|
|
73
|
+
Vn(r);
|
|
74
74
|
}
|
|
75
|
-
return
|
|
75
|
+
return C = t.p, /** @type {T} */
|
|
76
76
|
{};
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
return !
|
|
78
|
+
function me() {
|
|
79
|
+
return !Re || C !== null && C.l === null;
|
|
80
80
|
}
|
|
81
|
-
let
|
|
82
|
-
function
|
|
83
|
-
var
|
|
84
|
-
|
|
81
|
+
let ae = [];
|
|
82
|
+
function Fn() {
|
|
83
|
+
var e = ae;
|
|
84
|
+
ae = [], cn(e);
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
if (
|
|
88
|
-
var
|
|
86
|
+
function In(e) {
|
|
87
|
+
if (ae.length === 0) {
|
|
88
|
+
var t = ae;
|
|
89
89
|
queueMicrotask(() => {
|
|
90
|
-
|
|
90
|
+
t === ae && Fn();
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
const
|
|
96
|
-
function
|
|
97
|
-
var
|
|
98
|
-
if (
|
|
99
|
-
return
|
|
100
|
-
if ((
|
|
101
|
-
if ((
|
|
102
|
-
throw !
|
|
103
|
-
|
|
93
|
+
ae.push(e);
|
|
94
|
+
}
|
|
95
|
+
const On = /* @__PURE__ */ new WeakMap();
|
|
96
|
+
function Ln(e) {
|
|
97
|
+
var t = g;
|
|
98
|
+
if (t === null)
|
|
99
|
+
return v.f |= Q, e;
|
|
100
|
+
if ((t.f & yt) === 0) {
|
|
101
|
+
if ((t.f & mt) === 0)
|
|
102
|
+
throw !t.parent && e instanceof Error && wt(e), e;
|
|
103
|
+
t.b.error(e);
|
|
104
104
|
} else
|
|
105
|
-
|
|
105
|
+
Te(e, t);
|
|
106
106
|
}
|
|
107
|
-
function
|
|
108
|
-
for (;
|
|
109
|
-
if ((
|
|
107
|
+
function Te(e, t) {
|
|
108
|
+
for (; t !== null; ) {
|
|
109
|
+
if ((t.f & mt) !== 0)
|
|
110
110
|
try {
|
|
111
|
-
|
|
111
|
+
t.b.error(e);
|
|
112
112
|
return;
|
|
113
113
|
} catch (n) {
|
|
114
|
-
|
|
114
|
+
e = n;
|
|
115
115
|
}
|
|
116
|
-
|
|
116
|
+
t = t.parent;
|
|
117
117
|
}
|
|
118
|
-
throw
|
|
118
|
+
throw e instanceof Error && wt(e), e;
|
|
119
119
|
}
|
|
120
|
-
function
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
value:
|
|
124
|
-
}),
|
|
125
|
-
value:
|
|
120
|
+
function wt(e) {
|
|
121
|
+
const t = On.get(e);
|
|
122
|
+
t && (tt(e, "message", {
|
|
123
|
+
value: t.message
|
|
124
|
+
}), tt(e, "stack", {
|
|
125
|
+
value: t.stack
|
|
126
126
|
}));
|
|
127
127
|
}
|
|
128
|
-
const
|
|
129
|
-
let
|
|
130
|
-
class
|
|
128
|
+
const Se = /* @__PURE__ */ new Set();
|
|
129
|
+
let S = null, rt = /* @__PURE__ */ new Set(), V = [], qe = null, ze = !1;
|
|
130
|
+
class J {
|
|
131
131
|
/**
|
|
132
132
|
* The current values of any sources that are updated in this batch
|
|
133
133
|
* They keys of this map are identical to `this.#previous`
|
|
@@ -139,52 +139,40 @@ class vt {
|
|
|
139
139
|
* They keys of this map are identical to `this.#current`
|
|
140
140
|
* @type {Map<Source, any>}
|
|
141
141
|
*/
|
|
142
|
-
#
|
|
142
|
+
#n = /* @__PURE__ */ new Map();
|
|
143
143
|
/**
|
|
144
144
|
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
145
145
|
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
146
146
|
* @type {Set<() => void>}
|
|
147
147
|
*/
|
|
148
|
-
#
|
|
148
|
+
#r = /* @__PURE__ */ new Set();
|
|
149
149
|
/**
|
|
150
150
|
* The number of async effects that are currently in flight
|
|
151
151
|
*/
|
|
152
|
-
#
|
|
152
|
+
#e = 0;
|
|
153
153
|
/**
|
|
154
154
|
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
155
155
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
156
156
|
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
157
157
|
*/
|
|
158
|
-
#
|
|
159
|
-
/**
|
|
160
|
-
* True if an async effect inside this batch resolved and
|
|
161
|
-
* its parent branch was already deleted
|
|
162
|
-
*/
|
|
163
|
-
#u = !1;
|
|
164
|
-
/**
|
|
165
|
-
* Async effects (created inside `async_derived`) encountered during processing.
|
|
166
|
-
* These run after the rest of the batch has updated, since they should
|
|
167
|
-
* always have the latest values
|
|
168
|
-
* @type {Effect[]}
|
|
169
|
-
*/
|
|
170
|
-
#n = [];
|
|
158
|
+
#o = null;
|
|
171
159
|
/**
|
|
172
|
-
*
|
|
173
|
-
*
|
|
160
|
+
* Async effects inside a newly-created `<svelte:boundary>`
|
|
161
|
+
* — these do not prevent the batch from committing
|
|
174
162
|
* @type {Effect[]}
|
|
175
163
|
*/
|
|
176
|
-
#
|
|
164
|
+
#i = [];
|
|
177
165
|
/**
|
|
178
166
|
* Template effects and `$effect.pre` effects, which run when
|
|
179
167
|
* a batch is committed
|
|
180
168
|
* @type {Effect[]}
|
|
181
169
|
*/
|
|
182
|
-
#
|
|
170
|
+
#a = [];
|
|
183
171
|
/**
|
|
184
172
|
* The same as `#render_effects`, but for `$effect` (which runs after)
|
|
185
173
|
* @type {Effect[]}
|
|
186
174
|
*/
|
|
187
|
-
#
|
|
175
|
+
#t = [];
|
|
188
176
|
/**
|
|
189
177
|
* Block effects, which may need to re-run on subsequent flushes
|
|
190
178
|
* in order to update internal sources (e.g. each block items)
|
|
@@ -195,12 +183,12 @@ class vt {
|
|
|
195
183
|
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
196
184
|
* @type {Effect[]}
|
|
197
185
|
*/
|
|
198
|
-
#
|
|
186
|
+
#f = [];
|
|
199
187
|
/**
|
|
200
188
|
* Deferred effects that are MAYBE_DIRTY
|
|
201
189
|
* @type {Effect[]}
|
|
202
190
|
*/
|
|
203
|
-
#
|
|
191
|
+
#u = [];
|
|
204
192
|
/**
|
|
205
193
|
* A set of branches that still exist, but will be destroyed when this batch
|
|
206
194
|
* is committed — we skip over these during `process`
|
|
@@ -211,59 +199,51 @@ class vt {
|
|
|
211
199
|
*
|
|
212
200
|
* @param {Effect[]} root_effects
|
|
213
201
|
*/
|
|
214
|
-
process(
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
202
|
+
process(t) {
|
|
203
|
+
V = [];
|
|
204
|
+
var n = J.apply(this);
|
|
205
|
+
for (const a of t)
|
|
206
|
+
this.#c(a);
|
|
207
|
+
if (this.#e === 0) {
|
|
219
208
|
this.#d();
|
|
220
|
-
var
|
|
221
|
-
this.#
|
|
209
|
+
var r = this.#a, i = this.#t;
|
|
210
|
+
this.#a = [], this.#t = [], this.#s = [], S = null, it(r), it(i), this.#o?.resolve();
|
|
222
211
|
} else
|
|
223
|
-
this.#l(this.#
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
this.#n = [], this.#a = [];
|
|
212
|
+
this.#l(this.#a), this.#l(this.#t), this.#l(this.#s);
|
|
213
|
+
n();
|
|
214
|
+
for (const a of this.#i)
|
|
215
|
+
he(a);
|
|
216
|
+
this.#i = [];
|
|
229
217
|
}
|
|
230
218
|
/**
|
|
231
219
|
* Traverse the effect tree, executing effects or stashing
|
|
232
220
|
* them for later execution as appropriate
|
|
233
221
|
* @param {Effect} root
|
|
234
222
|
*/
|
|
235
|
-
#
|
|
236
|
-
|
|
237
|
-
for (var n =
|
|
238
|
-
var r = n.f, i = (r & (
|
|
223
|
+
#c(t) {
|
|
224
|
+
t.f ^= E;
|
|
225
|
+
for (var n = t.first; n !== null; ) {
|
|
226
|
+
var r = n.f, i = (r & (G | ue)) !== 0, a = i && (r & E) !== 0, s = a || (r & X) !== 0 || this.skipped_effects.has(n);
|
|
239
227
|
if (!s && n.fn !== null) {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
else if ((r & x) === 0)
|
|
245
|
-
if ((r & Vt) !== 0) {
|
|
246
|
-
var o = n.b?.is_pending() ? this.#a : this.#n;
|
|
247
|
-
o.push(n);
|
|
248
|
-
} else Dt(n) && ((n.f & ot) !== 0 && this.#s.push(n), at(n));
|
|
249
|
-
var l = n.first;
|
|
250
|
-
if (l !== null) {
|
|
251
|
-
n = l;
|
|
228
|
+
i ? n.f ^= E : (r & ht) !== 0 ? this.#t.push(n) : (r & E) === 0 && ((r & Ne) !== 0 && n.b?.is_pending() ? this.#i.push(n) : Pe(n) && ((n.f & ne) !== 0 && this.#s.push(n), he(n)));
|
|
229
|
+
var o = n.first;
|
|
230
|
+
if (o !== null) {
|
|
231
|
+
n = o;
|
|
252
232
|
continue;
|
|
253
233
|
}
|
|
254
234
|
}
|
|
255
|
-
var
|
|
256
|
-
for (n = n.next; n === null &&
|
|
257
|
-
n =
|
|
235
|
+
var l = n.parent;
|
|
236
|
+
for (n = n.next; n === null && l !== null; )
|
|
237
|
+
n = l.next, l = l.parent;
|
|
258
238
|
}
|
|
259
239
|
}
|
|
260
240
|
/**
|
|
261
241
|
* @param {Effect[]} effects
|
|
262
242
|
*/
|
|
263
|
-
#l(
|
|
264
|
-
for (const n of
|
|
265
|
-
((n.f &
|
|
266
|
-
|
|
243
|
+
#l(t) {
|
|
244
|
+
for (const n of t)
|
|
245
|
+
((n.f & I) !== 0 ? this.#f : this.#u).push(n), k(n, E);
|
|
246
|
+
t.length = 0;
|
|
267
247
|
}
|
|
268
248
|
/**
|
|
269
249
|
* Associate a change to a given source with the current
|
|
@@ -271,164 +251,209 @@ class vt {
|
|
|
271
251
|
* @param {Source} source
|
|
272
252
|
* @param {any} value
|
|
273
253
|
*/
|
|
274
|
-
capture(
|
|
275
|
-
this.#
|
|
254
|
+
capture(t, n) {
|
|
255
|
+
this.#n.has(t) || this.#n.set(t, n), this.current.set(t, t.v);
|
|
276
256
|
}
|
|
277
257
|
activate() {
|
|
278
|
-
|
|
258
|
+
S = this;
|
|
279
259
|
}
|
|
280
260
|
deactivate() {
|
|
281
|
-
|
|
282
|
-
for (const
|
|
283
|
-
if (
|
|
261
|
+
S = null;
|
|
262
|
+
for (const t of rt)
|
|
263
|
+
if (rt.delete(t), t(), S !== null)
|
|
284
264
|
break;
|
|
285
265
|
}
|
|
286
|
-
neuter() {
|
|
287
|
-
this.#u = !0;
|
|
288
|
-
}
|
|
289
266
|
flush() {
|
|
290
|
-
|
|
267
|
+
if (V.length > 0) {
|
|
268
|
+
if (this.activate(), Dn(), S !== null && S !== this)
|
|
269
|
+
return;
|
|
270
|
+
} else this.#e === 0 && this.#d();
|
|
271
|
+
this.deactivate();
|
|
291
272
|
}
|
|
292
273
|
/**
|
|
293
274
|
* Append and remove branches to/from the DOM
|
|
294
275
|
*/
|
|
295
276
|
#d() {
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
277
|
+
for (const t of this.#r)
|
|
278
|
+
t();
|
|
279
|
+
if (this.#r.clear(), Se.size > 1) {
|
|
280
|
+
this.#n.clear();
|
|
281
|
+
let t = !0;
|
|
282
|
+
for (const n of Se) {
|
|
283
|
+
if (n === this) {
|
|
284
|
+
t = !1;
|
|
285
|
+
continue;
|
|
286
|
+
}
|
|
287
|
+
for (const [r, i] of this.current) {
|
|
288
|
+
if (n.current.has(r))
|
|
289
|
+
if (t)
|
|
290
|
+
n.current.set(r, i);
|
|
291
|
+
else
|
|
292
|
+
continue;
|
|
293
|
+
Et(r);
|
|
294
|
+
}
|
|
295
|
+
if (V.length > 0) {
|
|
296
|
+
S = n;
|
|
297
|
+
const r = J.apply(n);
|
|
298
|
+
for (const i of V)
|
|
299
|
+
n.#c(i);
|
|
300
|
+
V = [], r();
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
S = null;
|
|
304
|
+
}
|
|
305
|
+
Se.delete(this);
|
|
300
306
|
}
|
|
301
307
|
increment() {
|
|
302
|
-
this.#
|
|
308
|
+
this.#e += 1;
|
|
303
309
|
}
|
|
304
310
|
decrement() {
|
|
305
|
-
if (this.#
|
|
306
|
-
for (const
|
|
307
|
-
|
|
308
|
-
for (const
|
|
309
|
-
|
|
310
|
-
this
|
|
311
|
+
if (this.#e -= 1, this.#e === 0) {
|
|
312
|
+
for (const t of this.#f)
|
|
313
|
+
k(t, I), te(t);
|
|
314
|
+
for (const t of this.#u)
|
|
315
|
+
k(t, K), te(t);
|
|
316
|
+
this.flush();
|
|
311
317
|
} else
|
|
312
318
|
this.deactivate();
|
|
313
319
|
}
|
|
314
320
|
/** @param {() => void} fn */
|
|
315
|
-
add_callback(
|
|
316
|
-
this.#
|
|
321
|
+
add_callback(t) {
|
|
322
|
+
this.#r.add(t);
|
|
317
323
|
}
|
|
318
324
|
settled() {
|
|
319
|
-
return (this.#
|
|
325
|
+
return (this.#o ??= gt()).promise;
|
|
320
326
|
}
|
|
321
327
|
static ensure() {
|
|
322
|
-
if (
|
|
323
|
-
const
|
|
324
|
-
|
|
325
|
-
|
|
328
|
+
if (S === null) {
|
|
329
|
+
const t = S = new J();
|
|
330
|
+
Se.add(S), J.enqueue(() => {
|
|
331
|
+
S === t && t.flush();
|
|
326
332
|
});
|
|
327
333
|
}
|
|
328
|
-
return
|
|
334
|
+
return S;
|
|
329
335
|
}
|
|
330
336
|
/** @param {() => void} task */
|
|
331
|
-
static enqueue(
|
|
332
|
-
|
|
337
|
+
static enqueue(t) {
|
|
338
|
+
In(t);
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* @param {Batch} current_batch
|
|
342
|
+
*/
|
|
343
|
+
static apply(t) {
|
|
344
|
+
return Oe;
|
|
333
345
|
}
|
|
334
346
|
}
|
|
335
|
-
function
|
|
336
|
-
var
|
|
337
|
-
|
|
347
|
+
function Dn() {
|
|
348
|
+
var e = oe;
|
|
349
|
+
ze = !0;
|
|
338
350
|
try {
|
|
339
|
-
var
|
|
340
|
-
for (
|
|
341
|
-
var n =
|
|
342
|
-
if (
|
|
351
|
+
var t = 0;
|
|
352
|
+
for (at(!0); V.length > 0; ) {
|
|
353
|
+
var n = J.ensure();
|
|
354
|
+
if (t++ > 1e3) {
|
|
343
355
|
var r, i;
|
|
344
|
-
|
|
356
|
+
Nn();
|
|
345
357
|
}
|
|
346
|
-
n.process(
|
|
358
|
+
n.process(V), q.clear();
|
|
347
359
|
}
|
|
348
360
|
} finally {
|
|
349
|
-
|
|
361
|
+
ze = !1, at(e), qe = null;
|
|
350
362
|
}
|
|
351
363
|
}
|
|
352
|
-
function
|
|
364
|
+
function Nn() {
|
|
353
365
|
try {
|
|
354
366
|
hn();
|
|
355
|
-
} catch (
|
|
356
|
-
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
let
|
|
360
|
-
function
|
|
361
|
-
var
|
|
362
|
-
if (
|
|
363
|
-
for (var n = 0; n <
|
|
364
|
-
var r =
|
|
365
|
-
if ((r.f & (
|
|
366
|
-
|
|
367
|
-
for (const i of
|
|
368
|
-
|
|
369
|
-
|
|
367
|
+
} catch (e) {
|
|
368
|
+
Te(e, qe);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
let Z = null;
|
|
372
|
+
function it(e) {
|
|
373
|
+
var t = e.length;
|
|
374
|
+
if (t !== 0) {
|
|
375
|
+
for (var n = 0; n < t; ) {
|
|
376
|
+
var r = e[n++];
|
|
377
|
+
if ((r.f & (re | X)) === 0 && Pe(r) && (Z = [], he(r), r.deps === null && r.first === null && r.nodes_start === null && (r.teardown === null && r.ac === null ? Mt(r) : r.fn = null), Z?.length > 0)) {
|
|
378
|
+
q.clear();
|
|
379
|
+
for (const i of Z)
|
|
380
|
+
he(i);
|
|
381
|
+
Z = [];
|
|
370
382
|
}
|
|
371
383
|
}
|
|
372
|
-
|
|
384
|
+
Z = null;
|
|
373
385
|
}
|
|
374
386
|
}
|
|
375
|
-
function
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
387
|
+
function Et(e) {
|
|
388
|
+
if (e.reactions !== null)
|
|
389
|
+
for (const t of e.reactions) {
|
|
390
|
+
const n = t.f;
|
|
391
|
+
(n & T) !== 0 ? Et(
|
|
392
|
+
/** @type {Derived} */
|
|
393
|
+
t
|
|
394
|
+
) : (n & (Ne | ne)) !== 0 && (k(t, I), te(
|
|
395
|
+
/** @type {Effect} */
|
|
396
|
+
t
|
|
397
|
+
));
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
function te(e) {
|
|
401
|
+
for (var t = qe = e; t.parent !== null; ) {
|
|
402
|
+
t = t.parent;
|
|
403
|
+
var n = t.f;
|
|
404
|
+
if (ze && t === g && (n & ne) !== 0)
|
|
380
405
|
return;
|
|
381
|
-
if ((n & (
|
|
382
|
-
if ((n &
|
|
383
|
-
|
|
406
|
+
if ((n & (ue | G)) !== 0) {
|
|
407
|
+
if ((n & E) === 0) return;
|
|
408
|
+
t.f ^= E;
|
|
384
409
|
}
|
|
385
410
|
}
|
|
386
|
-
|
|
411
|
+
V.push(t);
|
|
387
412
|
}
|
|
388
|
-
function
|
|
389
|
-
const r =
|
|
390
|
-
if (
|
|
391
|
-
n(
|
|
413
|
+
function Rn(e, t, n) {
|
|
414
|
+
const r = me() ? Ce : kt;
|
|
415
|
+
if (t.length === 0) {
|
|
416
|
+
n(e.map(r));
|
|
392
417
|
return;
|
|
393
418
|
}
|
|
394
|
-
var i =
|
|
419
|
+
var i = S, a = (
|
|
395
420
|
/** @type {Effect} */
|
|
396
|
-
|
|
397
|
-
), s =
|
|
398
|
-
Promise.all(
|
|
421
|
+
g
|
|
422
|
+
), s = Cn();
|
|
423
|
+
Promise.all(t.map((o) => /* @__PURE__ */ Pn(o))).then((o) => {
|
|
399
424
|
i?.activate(), s();
|
|
400
425
|
try {
|
|
401
|
-
n([...
|
|
426
|
+
n([...e.map(r), ...o]);
|
|
402
427
|
} catch (l) {
|
|
403
|
-
(a.f &
|
|
428
|
+
(a.f & re) === 0 && Te(l, a);
|
|
404
429
|
}
|
|
405
|
-
i?.deactivate(),
|
|
430
|
+
i?.deactivate(), xt();
|
|
406
431
|
}).catch((o) => {
|
|
407
|
-
|
|
432
|
+
Te(o, a);
|
|
408
433
|
});
|
|
409
434
|
}
|
|
410
|
-
function
|
|
411
|
-
var
|
|
435
|
+
function Cn() {
|
|
436
|
+
var e = g, t = v, n = C, r = S;
|
|
412
437
|
return function() {
|
|
413
|
-
|
|
438
|
+
fe(e), Y(t), ke(n), r?.activate();
|
|
414
439
|
};
|
|
415
440
|
}
|
|
416
|
-
function
|
|
417
|
-
|
|
441
|
+
function xt() {
|
|
442
|
+
fe(null), Y(null), ke(null);
|
|
418
443
|
}
|
|
419
444
|
// @__NO_SIDE_EFFECTS__
|
|
420
|
-
function
|
|
421
|
-
var
|
|
445
|
+
function Ce(e) {
|
|
446
|
+
var t = T | I, n = v !== null && (v.f & T) !== 0 ? (
|
|
422
447
|
/** @type {Derived} */
|
|
423
|
-
|
|
448
|
+
v
|
|
424
449
|
) : null;
|
|
425
|
-
return
|
|
426
|
-
ctx:
|
|
450
|
+
return g === null || n !== null && (n.f & R) !== 0 ? t |= R : g.f |= De, {
|
|
451
|
+
ctx: C,
|
|
427
452
|
deps: null,
|
|
428
453
|
effects: null,
|
|
429
|
-
equals:
|
|
430
|
-
f:
|
|
431
|
-
fn:
|
|
454
|
+
equals: St,
|
|
455
|
+
f: t,
|
|
456
|
+
fn: e,
|
|
432
457
|
reactions: null,
|
|
433
458
|
rv: 0,
|
|
434
459
|
v: (
|
|
@@ -436,17 +461,17 @@ function Lt(t) {
|
|
|
436
461
|
y
|
|
437
462
|
),
|
|
438
463
|
wv: 0,
|
|
439
|
-
parent: n ??
|
|
464
|
+
parent: n ?? g,
|
|
440
465
|
ac: null
|
|
441
466
|
};
|
|
442
467
|
}
|
|
443
468
|
// @__NO_SIDE_EFFECTS__
|
|
444
|
-
function Pn(
|
|
469
|
+
function Pn(e, t) {
|
|
445
470
|
let n = (
|
|
446
471
|
/** @type {Effect | null} */
|
|
447
|
-
|
|
472
|
+
g
|
|
448
473
|
);
|
|
449
|
-
n === null &&
|
|
474
|
+
n === null && gn();
|
|
450
475
|
var r = (
|
|
451
476
|
/** @type {Boundary} */
|
|
452
477
|
n.b
|
|
@@ -454,32 +479,30 @@ function Pn(t, e) {
|
|
|
454
479
|
/** @type {Promise<V>} */
|
|
455
480
|
/** @type {unknown} */
|
|
456
481
|
void 0
|
|
457
|
-
), a =
|
|
482
|
+
), a = Ft(
|
|
458
483
|
/** @type {V} */
|
|
459
484
|
y
|
|
460
|
-
), s =
|
|
461
|
-
return
|
|
485
|
+
), s = !v, o = /* @__PURE__ */ new Map();
|
|
486
|
+
return Wn(() => {
|
|
487
|
+
var l = gt();
|
|
488
|
+
i = l.promise;
|
|
462
489
|
try {
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
} catch (d) {
|
|
467
|
-
l = Promise.reject(d);
|
|
490
|
+
Promise.resolve(e()).then(l.resolve, l.reject);
|
|
491
|
+
} catch (p) {
|
|
492
|
+
l.reject(p);
|
|
468
493
|
}
|
|
469
|
-
var f = (
|
|
470
|
-
i = s?.then(f, f) ?? Promise.resolve(l), s = i;
|
|
471
|
-
var u = (
|
|
494
|
+
var f = (
|
|
472
495
|
/** @type {Batch} */
|
|
473
|
-
|
|
474
|
-
),
|
|
475
|
-
|
|
476
|
-
const
|
|
477
|
-
|
|
496
|
+
S
|
|
497
|
+
), u = r.is_pending();
|
|
498
|
+
s && (r.update_pending_count(1), u || (f.increment(), o.get(f)?.reject(pe), o.set(f, l)));
|
|
499
|
+
const c = (p, _ = void 0) => {
|
|
500
|
+
u || f.activate(), _ ? _ !== pe && (a.f |= Q, $e(a, _)) : ((a.f & Q) !== 0 && (a.f ^= Q), $e(a, p)), s && (r.update_pending_count(-1), u || f.decrement()), xt();
|
|
478
501
|
};
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
502
|
+
l.promise.then(c, (p) => c(null, p || "unknown"));
|
|
503
|
+
}), Un(() => {
|
|
504
|
+
for (const l of o.values())
|
|
505
|
+
l.reject(pe);
|
|
483
506
|
}), new Promise((l) => {
|
|
484
507
|
function f(u) {
|
|
485
508
|
function c() {
|
|
@@ -491,135 +514,135 @@ function Pn(t, e) {
|
|
|
491
514
|
});
|
|
492
515
|
}
|
|
493
516
|
// @__NO_SIDE_EFFECTS__
|
|
494
|
-
function
|
|
495
|
-
const
|
|
496
|
-
return
|
|
517
|
+
function ie(e) {
|
|
518
|
+
const t = /* @__PURE__ */ Ce(e);
|
|
519
|
+
return zt(t), t;
|
|
497
520
|
}
|
|
498
521
|
// @__NO_SIDE_EFFECTS__
|
|
499
|
-
function
|
|
500
|
-
const
|
|
501
|
-
return
|
|
502
|
-
}
|
|
503
|
-
function
|
|
504
|
-
var
|
|
505
|
-
if (
|
|
506
|
-
|
|
507
|
-
for (var n = 0; n <
|
|
508
|
-
|
|
522
|
+
function kt(e) {
|
|
523
|
+
const t = /* @__PURE__ */ Ce(e);
|
|
524
|
+
return t.equals = En, t;
|
|
525
|
+
}
|
|
526
|
+
function Tt(e) {
|
|
527
|
+
var t = e.effects;
|
|
528
|
+
if (t !== null) {
|
|
529
|
+
e.effects = null;
|
|
530
|
+
for (var n = 0; n < t.length; n += 1)
|
|
531
|
+
de(
|
|
509
532
|
/** @type {Effect} */
|
|
510
|
-
|
|
533
|
+
t[n]
|
|
511
534
|
);
|
|
512
535
|
}
|
|
513
536
|
}
|
|
514
|
-
function
|
|
515
|
-
for (var
|
|
516
|
-
if ((
|
|
537
|
+
function Mn(e) {
|
|
538
|
+
for (var t = e.parent; t !== null; ) {
|
|
539
|
+
if ((t.f & T) === 0)
|
|
517
540
|
return (
|
|
518
541
|
/** @type {Effect} */
|
|
519
|
-
|
|
542
|
+
t
|
|
520
543
|
);
|
|
521
|
-
|
|
544
|
+
t = t.parent;
|
|
522
545
|
}
|
|
523
546
|
return null;
|
|
524
547
|
}
|
|
525
|
-
function
|
|
526
|
-
var
|
|
527
|
-
|
|
548
|
+
function Xe(e) {
|
|
549
|
+
var t, n = g;
|
|
550
|
+
fe(Mn(e));
|
|
528
551
|
try {
|
|
529
|
-
|
|
552
|
+
Tt(e), t = Vt(e);
|
|
530
553
|
} finally {
|
|
531
|
-
|
|
554
|
+
fe(n);
|
|
532
555
|
}
|
|
533
|
-
return
|
|
556
|
+
return t;
|
|
534
557
|
}
|
|
535
|
-
function
|
|
536
|
-
var
|
|
537
|
-
if (
|
|
538
|
-
var n = (
|
|
539
|
-
|
|
558
|
+
function At(e) {
|
|
559
|
+
var t = Xe(e);
|
|
560
|
+
if (e.equals(t) || (e.v = t, e.wv = Ht()), !_e) {
|
|
561
|
+
var n = (W || (e.f & R) !== 0) && e.deps !== null ? K : E;
|
|
562
|
+
k(e, n);
|
|
540
563
|
}
|
|
541
564
|
}
|
|
542
|
-
const
|
|
543
|
-
function
|
|
565
|
+
const q = /* @__PURE__ */ new Map();
|
|
566
|
+
function Ft(e, t) {
|
|
544
567
|
var n = {
|
|
545
568
|
f: 0,
|
|
546
569
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
547
|
-
v:
|
|
570
|
+
v: e,
|
|
548
571
|
reactions: null,
|
|
549
|
-
equals:
|
|
572
|
+
equals: St,
|
|
550
573
|
rv: 0,
|
|
551
574
|
wv: 0
|
|
552
575
|
};
|
|
553
576
|
return n;
|
|
554
577
|
}
|
|
555
578
|
// @__NO_SIDE_EFFECTS__
|
|
556
|
-
function H(
|
|
557
|
-
const n =
|
|
558
|
-
return
|
|
579
|
+
function H(e, t) {
|
|
580
|
+
const n = Ft(e);
|
|
581
|
+
return zt(n), n;
|
|
559
582
|
}
|
|
560
|
-
function U(
|
|
561
|
-
|
|
583
|
+
function U(e, t, n = !1) {
|
|
584
|
+
v !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
562
585
|
// to ensure we error if state is set inside an inspect effect
|
|
563
|
-
(!z || (
|
|
564
|
-
let r = n ?
|
|
565
|
-
return
|
|
566
|
-
}
|
|
567
|
-
function
|
|
568
|
-
if (!
|
|
569
|
-
var n =
|
|
570
|
-
|
|
571
|
-
var r =
|
|
572
|
-
r.capture(
|
|
586
|
+
(!z || (v.f & nt) !== 0) && me() && (v.f & (T | ne | Ne | nt)) !== 0 && !$?.includes(e) && Sn();
|
|
587
|
+
let r = n ? se(t) : t;
|
|
588
|
+
return $e(e, r);
|
|
589
|
+
}
|
|
590
|
+
function $e(e, t) {
|
|
591
|
+
if (!e.equals(t)) {
|
|
592
|
+
var n = e.v;
|
|
593
|
+
_e ? q.set(e, t) : q.set(e, n), e.v = t;
|
|
594
|
+
var r = J.ensure();
|
|
595
|
+
r.capture(e, n), (e.f & T) !== 0 && ((e.f & I) !== 0 && Xe(
|
|
573
596
|
/** @type {Derived} */
|
|
574
|
-
|
|
575
|
-
),
|
|
597
|
+
e
|
|
598
|
+
), k(e, (e.f & R) === 0 ? E : K)), e.wv = Ht(), It(e, I), me() && g !== null && (g.f & E) !== 0 && (g.f & (G | ue)) === 0 && (L === null ? Zn([e]) : L.push(e));
|
|
576
599
|
}
|
|
577
|
-
return
|
|
600
|
+
return t;
|
|
578
601
|
}
|
|
579
|
-
function
|
|
580
|
-
U(
|
|
602
|
+
function Me(e) {
|
|
603
|
+
U(e, e.v + 1);
|
|
581
604
|
}
|
|
582
|
-
function
|
|
583
|
-
var n =
|
|
605
|
+
function It(e, t) {
|
|
606
|
+
var n = e.reactions;
|
|
584
607
|
if (n !== null)
|
|
585
|
-
for (var r =
|
|
608
|
+
for (var r = me(), i = n.length, a = 0; a < i; a++) {
|
|
586
609
|
var s = n[a], o = s.f;
|
|
587
|
-
if (!(!r && s ===
|
|
588
|
-
var l = (o &
|
|
589
|
-
l &&
|
|
610
|
+
if (!(!r && s === g)) {
|
|
611
|
+
var l = (o & I) === 0;
|
|
612
|
+
l && k(s, t), (o & T) !== 0 ? It(
|
|
590
613
|
/** @type {Derived} */
|
|
591
614
|
s,
|
|
592
|
-
|
|
593
|
-
) : l && ((o &
|
|
615
|
+
K
|
|
616
|
+
) : l && ((o & ne) !== 0 && Z !== null && Z.push(
|
|
594
617
|
/** @type {Effect} */
|
|
595
618
|
s
|
|
596
|
-
),
|
|
619
|
+
), te(
|
|
597
620
|
/** @type {Effect} */
|
|
598
621
|
s
|
|
599
622
|
));
|
|
600
623
|
}
|
|
601
624
|
}
|
|
602
625
|
}
|
|
603
|
-
function
|
|
604
|
-
if (typeof
|
|
605
|
-
return
|
|
606
|
-
const
|
|
607
|
-
if (
|
|
608
|
-
return
|
|
609
|
-
var n = /* @__PURE__ */ new Map(), r =
|
|
610
|
-
if (
|
|
626
|
+
function se(e) {
|
|
627
|
+
if (typeof e != "object" || e === null || le in e)
|
|
628
|
+
return e;
|
|
629
|
+
const t = We(e);
|
|
630
|
+
if (t !== fn && t !== un)
|
|
631
|
+
return e;
|
|
632
|
+
var n = /* @__PURE__ */ new Map(), r = ln(e), i = /* @__PURE__ */ H(0), a = ee, s = (o) => {
|
|
633
|
+
if (ee === a)
|
|
611
634
|
return o();
|
|
612
|
-
var l =
|
|
613
|
-
|
|
635
|
+
var l = v, f = ee;
|
|
636
|
+
Y(null), lt(a);
|
|
614
637
|
var u = o();
|
|
615
|
-
return
|
|
638
|
+
return Y(l), lt(f), u;
|
|
616
639
|
};
|
|
617
640
|
return r && n.set("length", /* @__PURE__ */ H(
|
|
618
641
|
/** @type {any[]} */
|
|
619
|
-
|
|
642
|
+
e.length
|
|
620
643
|
)), new Proxy(
|
|
621
644
|
/** @type {any} */
|
|
622
|
-
|
|
645
|
+
e,
|
|
623
646
|
{
|
|
624
647
|
defineProperty(o, l, f) {
|
|
625
648
|
(!("value" in f) || f.configurable === !1 || f.enumerable === !1 || f.writable === !1) && mn();
|
|
@@ -634,22 +657,22 @@ function nt(t) {
|
|
|
634
657
|
if (f === void 0) {
|
|
635
658
|
if (l in o) {
|
|
636
659
|
const u = s(() => /* @__PURE__ */ H(y));
|
|
637
|
-
n.set(l, u),
|
|
660
|
+
n.set(l, u), Me(i);
|
|
638
661
|
}
|
|
639
662
|
} else
|
|
640
|
-
U(f, y),
|
|
663
|
+
U(f, y), Me(i);
|
|
641
664
|
return !0;
|
|
642
665
|
},
|
|
643
666
|
get(o, l, f) {
|
|
644
|
-
if (l ===
|
|
645
|
-
return
|
|
667
|
+
if (l === le)
|
|
668
|
+
return e;
|
|
646
669
|
var u = n.get(l), c = l in o;
|
|
647
|
-
if (u === void 0 && (!c ||
|
|
648
|
-
var
|
|
649
|
-
return
|
|
670
|
+
if (u === void 0 && (!c || Ee(o, l)?.writable) && (u = s(() => {
|
|
671
|
+
var _ = se(c ? o[l] : y), d = /* @__PURE__ */ H(_);
|
|
672
|
+
return d;
|
|
650
673
|
}), n.set(l, u)), u !== void 0) {
|
|
651
|
-
var
|
|
652
|
-
return
|
|
674
|
+
var p = w(u);
|
|
675
|
+
return p === y ? void 0 : p;
|
|
653
676
|
}
|
|
654
677
|
return Reflect.get(o, l, f);
|
|
655
678
|
},
|
|
@@ -657,132 +680,132 @@ function nt(t) {
|
|
|
657
680
|
var f = Reflect.getOwnPropertyDescriptor(o, l);
|
|
658
681
|
if (f && "value" in f) {
|
|
659
682
|
var u = n.get(l);
|
|
660
|
-
u && (f.value =
|
|
683
|
+
u && (f.value = w(u));
|
|
661
684
|
} else if (f === void 0) {
|
|
662
|
-
var c = n.get(l),
|
|
663
|
-
if (c !== void 0 &&
|
|
685
|
+
var c = n.get(l), p = c?.v;
|
|
686
|
+
if (c !== void 0 && p !== y)
|
|
664
687
|
return {
|
|
665
688
|
enumerable: !0,
|
|
666
689
|
configurable: !0,
|
|
667
|
-
value:
|
|
690
|
+
value: p,
|
|
668
691
|
writable: !0
|
|
669
692
|
};
|
|
670
693
|
}
|
|
671
694
|
return f;
|
|
672
695
|
},
|
|
673
696
|
has(o, l) {
|
|
674
|
-
if (l ===
|
|
697
|
+
if (l === le)
|
|
675
698
|
return !0;
|
|
676
699
|
var f = n.get(l), u = f !== void 0 && f.v !== y || Reflect.has(o, l);
|
|
677
|
-
if (f !== void 0 ||
|
|
700
|
+
if (f !== void 0 || g !== null && (!u || Ee(o, l)?.writable)) {
|
|
678
701
|
f === void 0 && (f = s(() => {
|
|
679
|
-
var
|
|
680
|
-
return
|
|
702
|
+
var p = u ? se(o[l]) : y, _ = /* @__PURE__ */ H(p);
|
|
703
|
+
return _;
|
|
681
704
|
}), n.set(l, f));
|
|
682
|
-
var c =
|
|
705
|
+
var c = w(f);
|
|
683
706
|
if (c === y)
|
|
684
707
|
return !1;
|
|
685
708
|
}
|
|
686
709
|
return u;
|
|
687
710
|
},
|
|
688
711
|
set(o, l, f, u) {
|
|
689
|
-
var c = n.get(l),
|
|
712
|
+
var c = n.get(l), p = l in o;
|
|
690
713
|
if (r && l === "length")
|
|
691
|
-
for (var
|
|
692
|
-
c.v;
|
|
693
|
-
var
|
|
694
|
-
|
|
714
|
+
for (var _ = f; _ < /** @type {Source<number>} */
|
|
715
|
+
c.v; _ += 1) {
|
|
716
|
+
var d = n.get(_ + "");
|
|
717
|
+
d !== void 0 ? U(d, y) : _ in o && (d = s(() => /* @__PURE__ */ H(y)), n.set(_ + "", d));
|
|
695
718
|
}
|
|
696
719
|
if (c === void 0)
|
|
697
|
-
(!
|
|
720
|
+
(!p || Ee(o, l)?.writable) && (c = s(() => /* @__PURE__ */ H(void 0)), U(c, se(f)), n.set(l, c));
|
|
698
721
|
else {
|
|
699
|
-
|
|
700
|
-
var
|
|
701
|
-
U(c,
|
|
722
|
+
p = c.v !== y;
|
|
723
|
+
var m = s(() => se(f));
|
|
724
|
+
U(c, m);
|
|
702
725
|
}
|
|
703
|
-
var
|
|
704
|
-
if (
|
|
726
|
+
var O = Reflect.getOwnPropertyDescriptor(o, l);
|
|
727
|
+
if (O?.set && O.set.call(u, f), !p) {
|
|
705
728
|
if (r && typeof l == "string") {
|
|
706
|
-
var
|
|
729
|
+
var A = (
|
|
707
730
|
/** @type {Source<number>} */
|
|
708
731
|
n.get("length")
|
|
709
732
|
), N = Number(l);
|
|
710
|
-
Number.isInteger(N) && N >=
|
|
733
|
+
Number.isInteger(N) && N >= A.v && U(A, N + 1);
|
|
711
734
|
}
|
|
712
|
-
|
|
735
|
+
Me(i);
|
|
713
736
|
}
|
|
714
737
|
return !0;
|
|
715
738
|
},
|
|
716
739
|
ownKeys(o) {
|
|
717
|
-
|
|
740
|
+
w(i);
|
|
718
741
|
var l = Reflect.ownKeys(o).filter((c) => {
|
|
719
|
-
var
|
|
720
|
-
return
|
|
742
|
+
var p = n.get(c);
|
|
743
|
+
return p === void 0 || p.v !== y;
|
|
721
744
|
});
|
|
722
745
|
for (var [f, u] of n)
|
|
723
746
|
u.v !== y && !(f in o) && l.push(f);
|
|
724
747
|
return l;
|
|
725
748
|
},
|
|
726
749
|
setPrototypeOf() {
|
|
727
|
-
|
|
750
|
+
yn();
|
|
728
751
|
}
|
|
729
752
|
}
|
|
730
753
|
);
|
|
731
754
|
}
|
|
732
|
-
var
|
|
733
|
-
function
|
|
734
|
-
return document.createTextNode(
|
|
755
|
+
var jn, Bn;
|
|
756
|
+
function Ot(e = "") {
|
|
757
|
+
return document.createTextNode(e);
|
|
735
758
|
}
|
|
736
759
|
// @__NO_SIDE_EFFECTS__
|
|
737
|
-
function
|
|
738
|
-
return
|
|
760
|
+
function Ye(e) {
|
|
761
|
+
return jn.call(e);
|
|
739
762
|
}
|
|
740
763
|
// @__NO_SIDE_EFFECTS__
|
|
741
|
-
function
|
|
742
|
-
return Bn.call(
|
|
764
|
+
function Lt(e) {
|
|
765
|
+
return Bn.call(e);
|
|
743
766
|
}
|
|
744
|
-
function
|
|
745
|
-
return /* @__PURE__ */
|
|
767
|
+
function Dt(e, t) {
|
|
768
|
+
return /* @__PURE__ */ Ye(e);
|
|
746
769
|
}
|
|
747
|
-
function
|
|
770
|
+
function zn(e, t = !1) {
|
|
748
771
|
{
|
|
749
772
|
var n = (
|
|
750
773
|
/** @type {DocumentFragment} */
|
|
751
|
-
/* @__PURE__ */
|
|
774
|
+
/* @__PURE__ */ Ye(
|
|
752
775
|
/** @type {Node} */
|
|
753
|
-
|
|
776
|
+
e
|
|
754
777
|
)
|
|
755
778
|
);
|
|
756
|
-
return n instanceof Comment && n.data === "" ? /* @__PURE__ */
|
|
779
|
+
return n instanceof Comment && n.data === "" ? /* @__PURE__ */ Lt(n) : n;
|
|
757
780
|
}
|
|
758
781
|
}
|
|
759
|
-
function
|
|
782
|
+
function $n() {
|
|
760
783
|
return !1;
|
|
761
784
|
}
|
|
762
|
-
function
|
|
763
|
-
var
|
|
764
|
-
|
|
785
|
+
function Nt(e) {
|
|
786
|
+
var t = v, n = g;
|
|
787
|
+
Y(null), fe(null);
|
|
765
788
|
try {
|
|
766
|
-
return
|
|
789
|
+
return e();
|
|
767
790
|
} finally {
|
|
768
|
-
|
|
791
|
+
Y(t), fe(n);
|
|
769
792
|
}
|
|
770
793
|
}
|
|
771
|
-
function
|
|
772
|
-
var n =
|
|
773
|
-
n === null ?
|
|
794
|
+
function Hn(e, t) {
|
|
795
|
+
var n = t.last;
|
|
796
|
+
n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
|
|
774
797
|
}
|
|
775
|
-
function
|
|
776
|
-
var i =
|
|
777
|
-
i !== null && (i.f &
|
|
798
|
+
function ce(e, t, n, r = !0) {
|
|
799
|
+
var i = g;
|
|
800
|
+
i !== null && (i.f & X) !== 0 && (e |= X);
|
|
778
801
|
var a = {
|
|
779
|
-
ctx:
|
|
802
|
+
ctx: C,
|
|
780
803
|
deps: null,
|
|
781
804
|
nodes_start: null,
|
|
782
805
|
nodes_end: null,
|
|
783
|
-
f:
|
|
806
|
+
f: e | I,
|
|
784
807
|
first: null,
|
|
785
|
-
fn:
|
|
808
|
+
fn: t,
|
|
786
809
|
last: null,
|
|
787
810
|
next: null,
|
|
788
811
|
parent: i,
|
|
@@ -795,544 +818,548 @@ function mt(t, e, n, r = !0) {
|
|
|
795
818
|
};
|
|
796
819
|
if (n)
|
|
797
820
|
try {
|
|
798
|
-
|
|
821
|
+
he(a), a.f |= yt;
|
|
799
822
|
} catch (l) {
|
|
800
|
-
throw
|
|
823
|
+
throw de(a), l;
|
|
801
824
|
}
|
|
802
|
-
else
|
|
825
|
+
else t !== null && te(a);
|
|
803
826
|
if (r) {
|
|
804
827
|
var s = a;
|
|
805
828
|
if (n && s.deps === null && s.teardown === null && s.nodes_start === null && s.first === s.last && // either `null`, or a singular child
|
|
806
|
-
(s.f &
|
|
829
|
+
(s.f & De) === 0 && (s = s.first), s !== null && (s.parent = i, i !== null && Hn(s, i), v !== null && (v.f & T) !== 0 && (e & ue) === 0)) {
|
|
807
830
|
var o = (
|
|
808
831
|
/** @type {Derived} */
|
|
809
|
-
|
|
832
|
+
v
|
|
810
833
|
);
|
|
811
834
|
(o.effects ??= []).push(s);
|
|
812
835
|
}
|
|
813
836
|
}
|
|
814
837
|
return a;
|
|
815
838
|
}
|
|
816
|
-
function
|
|
817
|
-
|
|
839
|
+
function Un(e) {
|
|
840
|
+
const t = ce(bt, null, !1);
|
|
841
|
+
return k(t, E), t.teardown = e, t;
|
|
842
|
+
}
|
|
843
|
+
function Vn(e) {
|
|
844
|
+
return ce(ht | _n, e, !1);
|
|
818
845
|
}
|
|
819
|
-
function
|
|
820
|
-
return
|
|
846
|
+
function Wn(e) {
|
|
847
|
+
return ce(Ne | De, e, !0);
|
|
821
848
|
}
|
|
822
|
-
function
|
|
823
|
-
|
|
824
|
-
|
|
849
|
+
function Ge(e, t = [], n = []) {
|
|
850
|
+
Rn(t, n, (r) => {
|
|
851
|
+
ce(bt, () => e(...r.map(w)), !0);
|
|
825
852
|
});
|
|
826
853
|
}
|
|
827
|
-
function
|
|
828
|
-
var n =
|
|
854
|
+
function Rt(e, t = 0) {
|
|
855
|
+
var n = ce(ne | t, e, !0);
|
|
829
856
|
return n;
|
|
830
857
|
}
|
|
831
|
-
function
|
|
832
|
-
return
|
|
858
|
+
function He(e, t = !0) {
|
|
859
|
+
return ce(G | De, e, !0, t);
|
|
833
860
|
}
|
|
834
|
-
function
|
|
835
|
-
var
|
|
836
|
-
if (
|
|
837
|
-
const n =
|
|
838
|
-
|
|
861
|
+
function Ct(e) {
|
|
862
|
+
var t = e.teardown;
|
|
863
|
+
if (t !== null) {
|
|
864
|
+
const n = _e, r = v;
|
|
865
|
+
st(!0), Y(null);
|
|
839
866
|
try {
|
|
840
|
-
|
|
867
|
+
t.call(null);
|
|
841
868
|
} finally {
|
|
842
|
-
|
|
869
|
+
st(n), Y(r);
|
|
843
870
|
}
|
|
844
871
|
}
|
|
845
872
|
}
|
|
846
|
-
function
|
|
847
|
-
var n =
|
|
848
|
-
for (
|
|
873
|
+
function Pt(e, t = !1) {
|
|
874
|
+
var n = e.first;
|
|
875
|
+
for (e.first = e.last = null; n !== null; ) {
|
|
849
876
|
const i = n.ac;
|
|
850
|
-
i !== null &&
|
|
851
|
-
i.abort(
|
|
877
|
+
i !== null && Nt(() => {
|
|
878
|
+
i.abort(pe);
|
|
852
879
|
});
|
|
853
880
|
var r = n.next;
|
|
854
|
-
(n.f &
|
|
881
|
+
(n.f & ue) !== 0 ? n.parent = null : de(n, t), n = r;
|
|
855
882
|
}
|
|
856
883
|
}
|
|
857
|
-
function
|
|
858
|
-
for (var
|
|
859
|
-
var n =
|
|
860
|
-
(
|
|
884
|
+
function qn(e) {
|
|
885
|
+
for (var t = e.first; t !== null; ) {
|
|
886
|
+
var n = t.next;
|
|
887
|
+
(t.f & G) === 0 && de(t), t = n;
|
|
861
888
|
}
|
|
862
889
|
}
|
|
863
|
-
function
|
|
890
|
+
function de(e, t = !0) {
|
|
864
891
|
var n = !1;
|
|
865
|
-
(
|
|
866
|
-
|
|
892
|
+
(t || (e.f & dn) !== 0) && e.nodes_start !== null && e.nodes_end !== null && (Xn(
|
|
893
|
+
e.nodes_start,
|
|
867
894
|
/** @type {TemplateNode} */
|
|
868
|
-
|
|
869
|
-
), n = !0),
|
|
870
|
-
var r =
|
|
895
|
+
e.nodes_end
|
|
896
|
+
), n = !0), Pt(e, t && !n), Ae(e, 0), k(e, re);
|
|
897
|
+
var r = e.transitions;
|
|
871
898
|
if (r !== null)
|
|
872
899
|
for (const a of r)
|
|
873
900
|
a.stop();
|
|
874
|
-
|
|
875
|
-
var i =
|
|
876
|
-
i !== null && i.first !== null &&
|
|
901
|
+
Ct(e);
|
|
902
|
+
var i = e.parent;
|
|
903
|
+
i !== null && i.first !== null && Mt(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes_start = e.nodes_end = e.ac = null;
|
|
877
904
|
}
|
|
878
|
-
function
|
|
879
|
-
for (;
|
|
880
|
-
var n =
|
|
905
|
+
function Xn(e, t) {
|
|
906
|
+
for (; e !== null; ) {
|
|
907
|
+
var n = e === t ? null : (
|
|
881
908
|
/** @type {TemplateNode} */
|
|
882
|
-
/* @__PURE__ */
|
|
909
|
+
/* @__PURE__ */ Lt(e)
|
|
883
910
|
);
|
|
884
|
-
|
|
911
|
+
e.remove(), e = n;
|
|
885
912
|
}
|
|
886
913
|
}
|
|
887
|
-
function
|
|
888
|
-
var
|
|
889
|
-
n !== null && (n.next = r), r !== null && (r.prev = n),
|
|
914
|
+
function Mt(e) {
|
|
915
|
+
var t = e.parent, n = e.prev, r = e.next;
|
|
916
|
+
n !== null && (n.next = r), r !== null && (r.prev = n), t !== null && (t.first === e && (t.first = r), t.last === e && (t.last = n));
|
|
890
917
|
}
|
|
891
|
-
function
|
|
918
|
+
function Yn(e, t) {
|
|
892
919
|
var n = [];
|
|
893
|
-
|
|
894
|
-
|
|
920
|
+
jt(e, n, !0), Gn(n, () => {
|
|
921
|
+
de(e), t && t();
|
|
895
922
|
});
|
|
896
923
|
}
|
|
897
|
-
function
|
|
898
|
-
var n =
|
|
924
|
+
function Gn(e, t) {
|
|
925
|
+
var n = e.length;
|
|
899
926
|
if (n > 0) {
|
|
900
|
-
var r = () => --n ||
|
|
901
|
-
for (var i of
|
|
927
|
+
var r = () => --n || t();
|
|
928
|
+
for (var i of e)
|
|
902
929
|
i.out(r);
|
|
903
930
|
} else
|
|
904
|
-
|
|
905
|
-
}
|
|
906
|
-
function
|
|
907
|
-
if ((
|
|
908
|
-
if (
|
|
909
|
-
for (const s of
|
|
910
|
-
(s.is_global || n) &&
|
|
911
|
-
for (var r =
|
|
912
|
-
var i = r.next, a = (r.f &
|
|
913
|
-
|
|
931
|
+
t();
|
|
932
|
+
}
|
|
933
|
+
function jt(e, t, n) {
|
|
934
|
+
if ((e.f & X) === 0) {
|
|
935
|
+
if (e.f ^= X, e.transitions !== null)
|
|
936
|
+
for (const s of e.transitions)
|
|
937
|
+
(s.is_global || n) && t.push(s);
|
|
938
|
+
for (var r = e.first; r !== null; ) {
|
|
939
|
+
var i = r.next, a = (r.f & Le) !== 0 || (r.f & G) !== 0;
|
|
940
|
+
jt(r, t, a ? n : !1), r = i;
|
|
914
941
|
}
|
|
915
942
|
}
|
|
916
943
|
}
|
|
917
|
-
function
|
|
918
|
-
|
|
944
|
+
function Kn(e) {
|
|
945
|
+
Bt(e, !0);
|
|
919
946
|
}
|
|
920
|
-
function
|
|
921
|
-
if ((
|
|
922
|
-
|
|
923
|
-
for (var n =
|
|
924
|
-
var r = n.next, i = (n.f &
|
|
925
|
-
|
|
947
|
+
function Bt(e, t) {
|
|
948
|
+
if ((e.f & X) !== 0) {
|
|
949
|
+
e.f ^= X, (e.f & E) === 0 && (k(e, I), te(e));
|
|
950
|
+
for (var n = e.first; n !== null; ) {
|
|
951
|
+
var r = n.next, i = (n.f & Le) !== 0 || (n.f & G) !== 0;
|
|
952
|
+
Bt(n, i ? t : !1), n = r;
|
|
926
953
|
}
|
|
927
|
-
if (
|
|
928
|
-
for (const a of
|
|
929
|
-
(a.is_global ||
|
|
954
|
+
if (e.transitions !== null)
|
|
955
|
+
for (const a of e.transitions)
|
|
956
|
+
(a.is_global || t) && a.in();
|
|
930
957
|
}
|
|
931
958
|
}
|
|
932
|
-
let
|
|
933
|
-
function
|
|
934
|
-
|
|
959
|
+
let oe = !1;
|
|
960
|
+
function at(e) {
|
|
961
|
+
oe = e;
|
|
935
962
|
}
|
|
936
|
-
let
|
|
937
|
-
function
|
|
938
|
-
|
|
963
|
+
let _e = !1;
|
|
964
|
+
function st(e) {
|
|
965
|
+
_e = e;
|
|
939
966
|
}
|
|
940
|
-
let
|
|
941
|
-
function
|
|
942
|
-
|
|
967
|
+
let v = null, z = !1;
|
|
968
|
+
function Y(e) {
|
|
969
|
+
v = e;
|
|
943
970
|
}
|
|
944
|
-
let
|
|
945
|
-
function
|
|
946
|
-
|
|
971
|
+
let g = null;
|
|
972
|
+
function fe(e) {
|
|
973
|
+
g = e;
|
|
947
974
|
}
|
|
948
975
|
let $ = null;
|
|
949
|
-
function
|
|
950
|
-
|
|
976
|
+
function zt(e) {
|
|
977
|
+
v !== null && ($ === null ? $ = [e] : $.push(e));
|
|
951
978
|
}
|
|
952
|
-
let
|
|
953
|
-
function
|
|
954
|
-
|
|
979
|
+
let x = null, F = 0, L = null;
|
|
980
|
+
function Zn(e) {
|
|
981
|
+
L = e;
|
|
955
982
|
}
|
|
956
|
-
let
|
|
957
|
-
function
|
|
958
|
-
|
|
983
|
+
let $t = 1, ge = 0, ee = ge;
|
|
984
|
+
function lt(e) {
|
|
985
|
+
ee = e;
|
|
959
986
|
}
|
|
960
|
-
let
|
|
961
|
-
function
|
|
962
|
-
return
|
|
987
|
+
let W = !1;
|
|
988
|
+
function Ht() {
|
|
989
|
+
return ++$t;
|
|
963
990
|
}
|
|
964
|
-
function
|
|
965
|
-
var
|
|
966
|
-
if ((
|
|
991
|
+
function Pe(e) {
|
|
992
|
+
var t = e.f;
|
|
993
|
+
if ((t & I) !== 0)
|
|
967
994
|
return !0;
|
|
968
|
-
if ((
|
|
969
|
-
var n =
|
|
995
|
+
if ((t & K) !== 0) {
|
|
996
|
+
var n = e.deps, r = (t & R) !== 0;
|
|
970
997
|
if (n !== null) {
|
|
971
|
-
var i, a, s = (
|
|
972
|
-
if ((s || o) && (
|
|
998
|
+
var i, a, s = (t & xe) !== 0, o = r && g !== null && !W, l = n.length;
|
|
999
|
+
if ((s || o) && (g === null || (g.f & re) === 0)) {
|
|
973
1000
|
var f = (
|
|
974
1001
|
/** @type {Derived} */
|
|
975
|
-
|
|
1002
|
+
e
|
|
976
1003
|
), u = f.parent;
|
|
977
1004
|
for (i = 0; i < l; i++)
|
|
978
1005
|
a = n[i], (s || !a?.reactions?.includes(f)) && (a.reactions ??= []).push(f);
|
|
979
|
-
s && (f.f ^=
|
|
1006
|
+
s && (f.f ^= xe), o && u !== null && (u.f & R) === 0 && (f.f ^= R);
|
|
980
1007
|
}
|
|
981
1008
|
for (i = 0; i < l; i++)
|
|
982
|
-
if (a = n[i],
|
|
1009
|
+
if (a = n[i], Pe(
|
|
983
1010
|
/** @type {Derived} */
|
|
984
1011
|
a
|
|
985
|
-
) &&
|
|
1012
|
+
) && At(
|
|
986
1013
|
/** @type {Derived} */
|
|
987
1014
|
a
|
|
988
|
-
), a.wv >
|
|
1015
|
+
), a.wv > e.wv)
|
|
989
1016
|
return !0;
|
|
990
1017
|
}
|
|
991
|
-
(!r ||
|
|
1018
|
+
(!r || g !== null && !W) && k(e, E);
|
|
992
1019
|
}
|
|
993
1020
|
return !1;
|
|
994
1021
|
}
|
|
995
|
-
function
|
|
996
|
-
var r =
|
|
997
|
-
if (r !== null && !$?.includes(
|
|
1022
|
+
function Ut(e, t, n = !0) {
|
|
1023
|
+
var r = e.reactions;
|
|
1024
|
+
if (r !== null && !$?.includes(e))
|
|
998
1025
|
for (var i = 0; i < r.length; i++) {
|
|
999
1026
|
var a = r[i];
|
|
1000
|
-
(a.f &
|
|
1027
|
+
(a.f & T) !== 0 ? Ut(
|
|
1001
1028
|
/** @type {Derived} */
|
|
1002
1029
|
a,
|
|
1003
|
-
|
|
1030
|
+
t,
|
|
1004
1031
|
!1
|
|
1005
|
-
) :
|
|
1032
|
+
) : t === a && (n ? k(a, I) : (a.f & E) !== 0 && k(a, K), te(
|
|
1006
1033
|
/** @type {Effect} */
|
|
1007
1034
|
a
|
|
1008
1035
|
));
|
|
1009
1036
|
}
|
|
1010
1037
|
}
|
|
1011
|
-
function
|
|
1012
|
-
var
|
|
1013
|
-
|
|
1014
|
-
null,
|
|
1015
|
-
|
|
1016
|
-
}),
|
|
1038
|
+
function Vt(e) {
|
|
1039
|
+
var t = x, n = F, r = L, i = v, a = W, s = $, o = C, l = z, f = ee, u = e.f;
|
|
1040
|
+
x = /** @type {null | Value[]} */
|
|
1041
|
+
null, F = 0, L = null, W = (u & R) !== 0 && (z || !oe || v === null), v = (u & (G | ue)) === 0 ? e : null, $ = null, ke(e.ctx), z = !1, ee = ++ge, e.ac !== null && (Nt(() => {
|
|
1042
|
+
e.ac.abort(pe);
|
|
1043
|
+
}), e.ac = null);
|
|
1017
1044
|
try {
|
|
1018
|
-
|
|
1045
|
+
e.f |= Be;
|
|
1019
1046
|
var c = (
|
|
1020
1047
|
/** @type {Function} */
|
|
1021
|
-
|
|
1022
|
-
),
|
|
1023
|
-
if (
|
|
1024
|
-
var
|
|
1025
|
-
if (
|
|
1026
|
-
for (
|
|
1027
|
-
|
|
1048
|
+
e.fn
|
|
1049
|
+
), p = c(), _ = e.deps;
|
|
1050
|
+
if (x !== null) {
|
|
1051
|
+
var d;
|
|
1052
|
+
if (Ae(e, F), _ !== null && F > 0)
|
|
1053
|
+
for (_.length = F + x.length, d = 0; d < x.length; d++)
|
|
1054
|
+
_[F + d] = x[d];
|
|
1028
1055
|
else
|
|
1029
|
-
|
|
1030
|
-
if (!
|
|
1031
|
-
(u &
|
|
1032
|
-
|
|
1033
|
-
for (
|
|
1034
|
-
(d
|
|
1035
|
-
} else
|
|
1036
|
-
if (
|
|
1037
|
-
for (
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1056
|
+
e.deps = _ = x;
|
|
1057
|
+
if (!W || // Deriveds that already have reactions can cleanup, so we still add them as reactions
|
|
1058
|
+
(u & T) !== 0 && /** @type {import('#client').Derived} */
|
|
1059
|
+
e.reactions !== null)
|
|
1060
|
+
for (d = F; d < _.length; d++)
|
|
1061
|
+
(_[d].reactions ??= []).push(e);
|
|
1062
|
+
} else _ !== null && F < _.length && (Ae(e, F), _.length = F);
|
|
1063
|
+
if (me() && L !== null && !z && _ !== null && (e.f & (T | K | I)) === 0)
|
|
1064
|
+
for (d = 0; d < /** @type {Source[]} */
|
|
1065
|
+
L.length; d++)
|
|
1066
|
+
Ut(
|
|
1067
|
+
L[d],
|
|
1041
1068
|
/** @type {Effect} */
|
|
1042
|
-
|
|
1069
|
+
e
|
|
1043
1070
|
);
|
|
1044
|
-
return i !== null && i !==
|
|
1045
|
-
|
|
1046
|
-
} catch (
|
|
1047
|
-
return
|
|
1071
|
+
return i !== null && i !== e && (ge++, L !== null && (r === null ? r = L : r.push(.../** @type {Source[]} */
|
|
1072
|
+
L))), (e.f & Q) !== 0 && (e.f ^= Q), p;
|
|
1073
|
+
} catch (m) {
|
|
1074
|
+
return Ln(m);
|
|
1048
1075
|
} finally {
|
|
1049
|
-
|
|
1076
|
+
e.f ^= Be, x = t, F = n, L = r, v = i, W = a, $ = s, ke(o), z = l, ee = f;
|
|
1050
1077
|
}
|
|
1051
1078
|
}
|
|
1052
|
-
function
|
|
1053
|
-
let n =
|
|
1079
|
+
function Jn(e, t) {
|
|
1080
|
+
let n = t.reactions;
|
|
1054
1081
|
if (n !== null) {
|
|
1055
|
-
var r =
|
|
1082
|
+
var r = on.call(n, e);
|
|
1056
1083
|
if (r !== -1) {
|
|
1057
1084
|
var i = n.length - 1;
|
|
1058
|
-
i === 0 ? n =
|
|
1085
|
+
i === 0 ? n = t.reactions = null : (n[r] = n[i], n.pop());
|
|
1059
1086
|
}
|
|
1060
1087
|
}
|
|
1061
|
-
n === null && (
|
|
1088
|
+
n === null && (t.f & T) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1062
1089
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1063
1090
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1064
|
-
(
|
|
1091
|
+
(x === null || !x.includes(t)) && (k(t, K), (t.f & (R | xe)) === 0 && (t.f ^= xe), Tt(
|
|
1065
1092
|
/** @type {Derived} **/
|
|
1066
|
-
|
|
1067
|
-
),
|
|
1093
|
+
t
|
|
1094
|
+
), Ae(
|
|
1068
1095
|
/** @type {Derived} **/
|
|
1069
|
-
|
|
1096
|
+
t,
|
|
1070
1097
|
0
|
|
1071
1098
|
));
|
|
1072
1099
|
}
|
|
1073
|
-
function
|
|
1074
|
-
var n =
|
|
1100
|
+
function Ae(e, t) {
|
|
1101
|
+
var n = e.deps;
|
|
1075
1102
|
if (n !== null)
|
|
1076
|
-
for (var r =
|
|
1077
|
-
|
|
1078
|
-
}
|
|
1079
|
-
function
|
|
1080
|
-
var
|
|
1081
|
-
if ((
|
|
1082
|
-
|
|
1083
|
-
var n =
|
|
1084
|
-
|
|
1103
|
+
for (var r = t; r < n.length; r++)
|
|
1104
|
+
Jn(e, n[r]);
|
|
1105
|
+
}
|
|
1106
|
+
function he(e) {
|
|
1107
|
+
var t = e.f;
|
|
1108
|
+
if ((t & re) === 0) {
|
|
1109
|
+
k(e, E);
|
|
1110
|
+
var n = g, r = oe;
|
|
1111
|
+
g = e, oe = !0;
|
|
1085
1112
|
try {
|
|
1086
|
-
(
|
|
1087
|
-
var i =
|
|
1088
|
-
|
|
1113
|
+
(t & ne) !== 0 ? qn(e) : Pt(e), Ct(e);
|
|
1114
|
+
var i = Vt(e);
|
|
1115
|
+
e.teardown = typeof i == "function" ? i : null, e.wv = $t;
|
|
1089
1116
|
var a;
|
|
1090
|
-
|
|
1117
|
+
pt && xn && (e.f & I) !== 0 && e.deps;
|
|
1091
1118
|
} finally {
|
|
1092
|
-
|
|
1119
|
+
oe = r, g = n;
|
|
1093
1120
|
}
|
|
1094
1121
|
}
|
|
1095
1122
|
}
|
|
1096
|
-
function
|
|
1097
|
-
var
|
|
1098
|
-
if (
|
|
1099
|
-
var r =
|
|
1100
|
-
if (!r && !$?.includes(
|
|
1101
|
-
var i =
|
|
1102
|
-
if ((
|
|
1103
|
-
|
|
1123
|
+
function w(e) {
|
|
1124
|
+
var t = e.f, n = (t & T) !== 0;
|
|
1125
|
+
if (v !== null && !z) {
|
|
1126
|
+
var r = g !== null && (g.f & re) !== 0;
|
|
1127
|
+
if (!r && !$?.includes(e)) {
|
|
1128
|
+
var i = v.deps;
|
|
1129
|
+
if ((v.f & Be) !== 0)
|
|
1130
|
+
e.rv < ge && (e.rv = ge, x === null && i !== null && i[F] === e ? F++ : x === null ? x = [e] : (!W || !x.includes(e)) && x.push(e));
|
|
1104
1131
|
else {
|
|
1105
|
-
(
|
|
1106
|
-
var a =
|
|
1107
|
-
a === null ?
|
|
1132
|
+
(v.deps ??= []).push(e);
|
|
1133
|
+
var a = e.reactions;
|
|
1134
|
+
a === null ? e.reactions = [v] : a.includes(v) || a.push(v);
|
|
1108
1135
|
}
|
|
1109
1136
|
}
|
|
1110
1137
|
} else if (n && /** @type {Derived} */
|
|
1111
|
-
|
|
1112
|
-
|
|
1138
|
+
e.deps === null && /** @type {Derived} */
|
|
1139
|
+
e.effects === null) {
|
|
1113
1140
|
var s = (
|
|
1114
1141
|
/** @type {Derived} */
|
|
1115
|
-
|
|
1142
|
+
e
|
|
1116
1143
|
), o = s.parent;
|
|
1117
1144
|
o !== null && (o.f & R) === 0 && (s.f ^= R);
|
|
1118
1145
|
}
|
|
1119
|
-
if (
|
|
1120
|
-
if (
|
|
1121
|
-
return
|
|
1146
|
+
if (_e) {
|
|
1147
|
+
if (q.has(e))
|
|
1148
|
+
return q.get(e);
|
|
1122
1149
|
if (n) {
|
|
1123
1150
|
s = /** @type {Derived} */
|
|
1124
|
-
|
|
1151
|
+
e;
|
|
1125
1152
|
var l = s.v;
|
|
1126
|
-
return ((s.f &
|
|
1153
|
+
return ((s.f & E) === 0 && s.reactions !== null || Wt(s)) && (l = Xe(s)), q.set(s, l), l;
|
|
1127
1154
|
}
|
|
1128
1155
|
} else n && (s = /** @type {Derived} */
|
|
1129
|
-
|
|
1130
|
-
if ((
|
|
1131
|
-
throw
|
|
1132
|
-
return
|
|
1133
|
-
}
|
|
1134
|
-
function
|
|
1135
|
-
if (
|
|
1136
|
-
if (
|
|
1137
|
-
for (const
|
|
1138
|
-
if (
|
|
1156
|
+
e, Pe(s) && At(s));
|
|
1157
|
+
if ((e.f & Q) !== 0)
|
|
1158
|
+
throw e.v;
|
|
1159
|
+
return e.v;
|
|
1160
|
+
}
|
|
1161
|
+
function Wt(e) {
|
|
1162
|
+
if (e.v === y) return !0;
|
|
1163
|
+
if (e.deps === null) return !1;
|
|
1164
|
+
for (const t of e.deps)
|
|
1165
|
+
if (q.has(t) || (t.f & T) !== 0 && Wt(
|
|
1139
1166
|
/** @type {Derived} */
|
|
1140
|
-
|
|
1167
|
+
t
|
|
1141
1168
|
))
|
|
1142
1169
|
return !0;
|
|
1143
1170
|
return !1;
|
|
1144
1171
|
}
|
|
1145
|
-
function
|
|
1146
|
-
var
|
|
1172
|
+
function Ue(e) {
|
|
1173
|
+
var t = z;
|
|
1147
1174
|
try {
|
|
1148
|
-
return z = !0,
|
|
1175
|
+
return z = !0, e();
|
|
1149
1176
|
} finally {
|
|
1150
|
-
z =
|
|
1177
|
+
z = t;
|
|
1151
1178
|
}
|
|
1152
1179
|
}
|
|
1153
|
-
const
|
|
1154
|
-
function
|
|
1155
|
-
|
|
1180
|
+
const Qn = -7169;
|
|
1181
|
+
function k(e, t) {
|
|
1182
|
+
e.f = e.f & Qn | t;
|
|
1156
1183
|
}
|
|
1157
|
-
function
|
|
1158
|
-
if (!(typeof
|
|
1159
|
-
if (
|
|
1160
|
-
|
|
1161
|
-
else if (!Array.isArray(
|
|
1162
|
-
for (let
|
|
1163
|
-
const n = t
|
|
1164
|
-
typeof n == "object" && n &&
|
|
1184
|
+
function ot(e) {
|
|
1185
|
+
if (!(typeof e != "object" || !e || e instanceof EventTarget)) {
|
|
1186
|
+
if (le in e)
|
|
1187
|
+
Ve(e);
|
|
1188
|
+
else if (!Array.isArray(e))
|
|
1189
|
+
for (let t in e) {
|
|
1190
|
+
const n = e[t];
|
|
1191
|
+
typeof n == "object" && n && le in n && Ve(n);
|
|
1165
1192
|
}
|
|
1166
1193
|
}
|
|
1167
1194
|
}
|
|
1168
|
-
function
|
|
1169
|
-
if (typeof
|
|
1170
|
-
!(
|
|
1171
|
-
|
|
1172
|
-
for (let r in
|
|
1195
|
+
function Ve(e, t = /* @__PURE__ */ new Set()) {
|
|
1196
|
+
if (typeof e == "object" && e !== null && // We don't want to traverse DOM elements
|
|
1197
|
+
!(e instanceof EventTarget) && !t.has(e)) {
|
|
1198
|
+
t.add(e), e instanceof Date && e.getTime();
|
|
1199
|
+
for (let r in e)
|
|
1173
1200
|
try {
|
|
1174
|
-
|
|
1201
|
+
Ve(e[r], t);
|
|
1175
1202
|
} catch {
|
|
1176
1203
|
}
|
|
1177
|
-
const n =
|
|
1204
|
+
const n = We(e);
|
|
1178
1205
|
if (n !== Object.prototype && n !== Array.prototype && n !== Map.prototype && n !== Set.prototype && n !== Date.prototype) {
|
|
1179
|
-
const r =
|
|
1206
|
+
const r = vt(n);
|
|
1180
1207
|
for (let i in r) {
|
|
1181
1208
|
const a = r[i].get;
|
|
1182
1209
|
if (a)
|
|
1183
1210
|
try {
|
|
1184
|
-
a.call(
|
|
1211
|
+
a.call(e);
|
|
1185
1212
|
} catch {
|
|
1186
1213
|
}
|
|
1187
1214
|
}
|
|
1188
1215
|
}
|
|
1189
1216
|
}
|
|
1190
1217
|
}
|
|
1191
|
-
const
|
|
1192
|
-
function
|
|
1193
|
-
for (var
|
|
1194
|
-
|
|
1195
|
-
for (var n of
|
|
1196
|
-
n(
|
|
1218
|
+
const er = /* @__PURE__ */ new Set(), tr = /* @__PURE__ */ new Set();
|
|
1219
|
+
function nr(e) {
|
|
1220
|
+
for (var t = 0; t < e.length; t++)
|
|
1221
|
+
er.add(e[t]);
|
|
1222
|
+
for (var n of tr)
|
|
1223
|
+
n(e);
|
|
1197
1224
|
}
|
|
1198
|
-
function
|
|
1199
|
-
var
|
|
1200
|
-
return
|
|
1225
|
+
function rr(e) {
|
|
1226
|
+
var t = document.createElement("template");
|
|
1227
|
+
return t.innerHTML = e.replaceAll("<!>", "<!---->"), t.content;
|
|
1201
1228
|
}
|
|
1202
|
-
function
|
|
1229
|
+
function qt(e, t) {
|
|
1203
1230
|
var n = (
|
|
1204
1231
|
/** @type {Effect} */
|
|
1205
|
-
|
|
1232
|
+
g
|
|
1206
1233
|
);
|
|
1207
|
-
n.nodes_start === null && (n.nodes_start =
|
|
1234
|
+
n.nodes_start === null && (n.nodes_start = e, n.nodes_end = t);
|
|
1208
1235
|
}
|
|
1209
1236
|
// @__NO_SIDE_EFFECTS__
|
|
1210
|
-
function
|
|
1211
|
-
var n, r = !
|
|
1237
|
+
function Ke(e, t) {
|
|
1238
|
+
var n, r = !e.startsWith("<!>");
|
|
1212
1239
|
return () => {
|
|
1213
|
-
n === void 0 && (n =
|
|
1214
|
-
/* @__PURE__ */
|
|
1240
|
+
n === void 0 && (n = rr(r ? e : "<!>" + e), n = /** @type {Node} */
|
|
1241
|
+
/* @__PURE__ */ Ye(n));
|
|
1215
1242
|
var i = (
|
|
1216
1243
|
/** @type {TemplateNode} */
|
|
1217
1244
|
n.cloneNode(!0)
|
|
1218
1245
|
);
|
|
1219
|
-
return
|
|
1246
|
+
return qt(i, i), i;
|
|
1220
1247
|
};
|
|
1221
1248
|
}
|
|
1222
|
-
function
|
|
1223
|
-
var
|
|
1224
|
-
return
|
|
1249
|
+
function ir() {
|
|
1250
|
+
var e = document.createDocumentFragment(), t = document.createComment(""), n = Ot();
|
|
1251
|
+
return e.append(t, n), qt(t, n), e;
|
|
1225
1252
|
}
|
|
1226
|
-
function
|
|
1227
|
-
|
|
1253
|
+
function Fe(e, t) {
|
|
1254
|
+
e !== null && e.before(
|
|
1228
1255
|
/** @type {Node} */
|
|
1229
|
-
|
|
1256
|
+
t
|
|
1230
1257
|
);
|
|
1231
1258
|
}
|
|
1232
|
-
function
|
|
1233
|
-
var r =
|
|
1234
|
-
|
|
1235
|
-
i !== (i =
|
|
1259
|
+
function Xt(e, t, ...n) {
|
|
1260
|
+
var r = e, i = Oe, a;
|
|
1261
|
+
Rt(() => {
|
|
1262
|
+
i !== (i = t()) && (a && (de(a), a = null), a = He(() => (
|
|
1236
1263
|
/** @type {SnippetFn} */
|
|
1237
1264
|
i(r, ...n)
|
|
1238
1265
|
)));
|
|
1239
|
-
},
|
|
1266
|
+
}, Le);
|
|
1240
1267
|
}
|
|
1241
|
-
function
|
|
1242
|
-
var r =
|
|
1243
|
-
const f = (
|
|
1244
|
-
l = !0,
|
|
1268
|
+
function ar(e, t, n = !1) {
|
|
1269
|
+
var r = e, i = null, a = null, s = y, o = n ? Le : 0, l = !1;
|
|
1270
|
+
const f = (_, d = !0) => {
|
|
1271
|
+
l = !0, p(d, _);
|
|
1245
1272
|
};
|
|
1246
1273
|
var u = null;
|
|
1247
1274
|
function c() {
|
|
1248
1275
|
u !== null && (u.lastChild.remove(), r.before(u), u = null);
|
|
1249
|
-
var
|
|
1250
|
-
|
|
1276
|
+
var _ = s ? i : a, d = s ? a : i;
|
|
1277
|
+
_ && Kn(_), d && Yn(d, () => {
|
|
1251
1278
|
s ? a = null : i = null;
|
|
1252
1279
|
});
|
|
1253
1280
|
}
|
|
1254
|
-
const
|
|
1255
|
-
if (s !== (s =
|
|
1256
|
-
var
|
|
1257
|
-
if (
|
|
1258
|
-
var
|
|
1281
|
+
const p = (_, d) => {
|
|
1282
|
+
if (s !== (s = _)) {
|
|
1283
|
+
var m = $n(), O = r;
|
|
1284
|
+
if (m && (u = document.createDocumentFragment(), u.append(O = Ot())), s ? i ??= d && He(() => d(O)) : a ??= d && He(() => d(O)), m) {
|
|
1285
|
+
var A = (
|
|
1259
1286
|
/** @type {Batch} */
|
|
1260
|
-
|
|
1261
|
-
), N = s ? i : a,
|
|
1262
|
-
N &&
|
|
1287
|
+
S
|
|
1288
|
+
), N = s ? i : a, h = s ? a : i;
|
|
1289
|
+
N && A.skipped_effects.delete(N), h && A.skipped_effects.add(h), A.add_callback(c);
|
|
1263
1290
|
} else
|
|
1264
1291
|
c();
|
|
1265
1292
|
}
|
|
1266
1293
|
};
|
|
1267
|
-
|
|
1268
|
-
l = !1,
|
|
1294
|
+
Rt(() => {
|
|
1295
|
+
l = !1, t(f), l || p(null, null);
|
|
1269
1296
|
}, o);
|
|
1270
1297
|
}
|
|
1271
|
-
function
|
|
1272
|
-
var r =
|
|
1273
|
-
return
|
|
1298
|
+
function sr(e, t, n) {
|
|
1299
|
+
var r = e == null ? "" : "" + e;
|
|
1300
|
+
return t && (r = r ? r + " " + t : t), r === "" ? null : r;
|
|
1274
1301
|
}
|
|
1275
|
-
function
|
|
1276
|
-
return
|
|
1302
|
+
function lr(e, t) {
|
|
1303
|
+
return e == null ? null : String(e);
|
|
1277
1304
|
}
|
|
1278
|
-
function
|
|
1279
|
-
var s =
|
|
1305
|
+
function Yt(e, t, n, r, i, a) {
|
|
1306
|
+
var s = e.__className;
|
|
1280
1307
|
if (s !== n || s === void 0) {
|
|
1281
|
-
var o =
|
|
1282
|
-
o == null ?
|
|
1308
|
+
var o = sr(n, r);
|
|
1309
|
+
o == null ? e.removeAttribute("class") : e.className = o, e.__className = n;
|
|
1283
1310
|
}
|
|
1284
1311
|
return a;
|
|
1285
1312
|
}
|
|
1286
|
-
function
|
|
1287
|
-
var i =
|
|
1288
|
-
if (i !==
|
|
1289
|
-
var a =
|
|
1290
|
-
a == null ?
|
|
1313
|
+
function Gt(e, t, n, r) {
|
|
1314
|
+
var i = e.__style;
|
|
1315
|
+
if (i !== t) {
|
|
1316
|
+
var a = lr(t);
|
|
1317
|
+
a == null ? e.removeAttribute("style") : e.style.cssText = a, e.__style = t;
|
|
1291
1318
|
}
|
|
1292
1319
|
return r;
|
|
1293
1320
|
}
|
|
1294
|
-
const
|
|
1295
|
-
function
|
|
1296
|
-
var i =
|
|
1297
|
-
i[
|
|
1321
|
+
const or = Symbol("is custom element"), fr = Symbol("is html");
|
|
1322
|
+
function ft(e, t, n, r) {
|
|
1323
|
+
var i = ur(e);
|
|
1324
|
+
i[t] !== (i[t] = n) && (t === "loading" && (e[vn] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && cr(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
|
|
1298
1325
|
}
|
|
1299
|
-
function
|
|
1326
|
+
function ur(e) {
|
|
1300
1327
|
return (
|
|
1301
1328
|
/** @type {Record<string | symbol, unknown>} **/
|
|
1302
1329
|
// @ts-expect-error
|
|
1303
|
-
|
|
1304
|
-
[
|
|
1305
|
-
[
|
|
1330
|
+
e.__attributes ??= {
|
|
1331
|
+
[or]: e.nodeName.includes("-"),
|
|
1332
|
+
[fr]: e.namespaceURI === sn
|
|
1306
1333
|
}
|
|
1307
1334
|
);
|
|
1308
1335
|
}
|
|
1309
|
-
var
|
|
1310
|
-
function
|
|
1311
|
-
var
|
|
1336
|
+
var ut = /* @__PURE__ */ new Map();
|
|
1337
|
+
function cr(e) {
|
|
1338
|
+
var t = e.getAttribute("is") || e.nodeName, n = ut.get(t);
|
|
1312
1339
|
if (n) return n;
|
|
1313
|
-
|
|
1314
|
-
for (var r, i =
|
|
1315
|
-
r =
|
|
1340
|
+
ut.set(t, n = []);
|
|
1341
|
+
for (var r, i = e, a = Element.prototype; a !== i; ) {
|
|
1342
|
+
r = vt(i);
|
|
1316
1343
|
for (var s in r)
|
|
1317
1344
|
r[s].set && n.push(s);
|
|
1318
|
-
i =
|
|
1345
|
+
i = We(i);
|
|
1319
1346
|
}
|
|
1320
1347
|
return n;
|
|
1321
1348
|
}
|
|
1322
|
-
let
|
|
1323
|
-
function
|
|
1324
|
-
var
|
|
1349
|
+
let we = !1;
|
|
1350
|
+
function dr(e) {
|
|
1351
|
+
var t = we;
|
|
1325
1352
|
try {
|
|
1326
|
-
return
|
|
1353
|
+
return we = !1, [e(), we];
|
|
1327
1354
|
} finally {
|
|
1328
|
-
|
|
1355
|
+
we = t;
|
|
1329
1356
|
}
|
|
1330
1357
|
}
|
|
1331
|
-
function
|
|
1332
|
-
var i = !
|
|
1358
|
+
function ve(e, t, n, r) {
|
|
1359
|
+
var i = !Re || (n & tn) !== 0, a = (n & rn) !== 0, s = (n & an) !== 0, o = (
|
|
1333
1360
|
/** @type {V} */
|
|
1334
1361
|
r
|
|
1335
|
-
), l = !0, f = () => (l && (l = !1, o = s ?
|
|
1362
|
+
), l = !0, f = () => (l && (l = !1, o = s ? Ue(
|
|
1336
1363
|
/** @type {() => V} */
|
|
1337
1364
|
r
|
|
1338
1365
|
) : (
|
|
@@ -1340,64 +1367,64 @@ function _t(t, e, n, r) {
|
|
|
1340
1367
|
r
|
|
1341
1368
|
)), o), u;
|
|
1342
1369
|
if (a) {
|
|
1343
|
-
var c =
|
|
1344
|
-
u =
|
|
1370
|
+
var c = le in e || pn in e;
|
|
1371
|
+
u = Ee(e, t)?.set ?? (c && t in e ? (h) => e[t] = h : void 0);
|
|
1345
1372
|
}
|
|
1346
|
-
var
|
|
1347
|
-
a ? [
|
|
1373
|
+
var p, _ = !1;
|
|
1374
|
+
a ? [p, _] = dr(() => (
|
|
1348
1375
|
/** @type {V} */
|
|
1349
|
-
t
|
|
1350
|
-
)) :
|
|
1351
|
-
t
|
|
1352
|
-
var
|
|
1353
|
-
if (i ?
|
|
1354
|
-
var
|
|
1376
|
+
e[t]
|
|
1377
|
+
)) : p = /** @type {V} */
|
|
1378
|
+
e[t], p === void 0 && r !== void 0 && (p = f(), u && (i && bn(), u(p)));
|
|
1379
|
+
var d;
|
|
1380
|
+
if (i ? d = () => {
|
|
1381
|
+
var h = (
|
|
1355
1382
|
/** @type {V} */
|
|
1356
|
-
t
|
|
1383
|
+
e[t]
|
|
1357
1384
|
);
|
|
1358
|
-
return
|
|
1359
|
-
} :
|
|
1360
|
-
var
|
|
1385
|
+
return h === void 0 ? f() : (l = !0, h);
|
|
1386
|
+
} : d = () => {
|
|
1387
|
+
var h = (
|
|
1361
1388
|
/** @type {V} */
|
|
1362
|
-
t
|
|
1389
|
+
e[t]
|
|
1363
1390
|
);
|
|
1364
|
-
return
|
|
1365
|
-
void 0),
|
|
1366
|
-
}, i && (n &
|
|
1367
|
-
return
|
|
1391
|
+
return h !== void 0 && (o = /** @type {V} */
|
|
1392
|
+
void 0), h === void 0 ? o : h;
|
|
1393
|
+
}, i && (n & nn) === 0)
|
|
1394
|
+
return d;
|
|
1368
1395
|
if (u) {
|
|
1369
|
-
var
|
|
1396
|
+
var m = e.$$legacy;
|
|
1370
1397
|
return (
|
|
1371
1398
|
/** @type {() => V} */
|
|
1372
|
-
(function(
|
|
1373
|
-
return arguments.length > 0 ? ((!i || !
|
|
1399
|
+
(function(h, ye) {
|
|
1400
|
+
return arguments.length > 0 ? ((!i || !ye || m || _) && u(ye ? d() : h), h) : d();
|
|
1374
1401
|
})
|
|
1375
1402
|
);
|
|
1376
1403
|
}
|
|
1377
|
-
var
|
|
1378
|
-
a &&
|
|
1404
|
+
var O = !1, A = ((n & en) !== 0 ? Ce : kt)(() => (O = !1, d()));
|
|
1405
|
+
a && w(A);
|
|
1379
1406
|
var N = (
|
|
1380
1407
|
/** @type {Effect} */
|
|
1381
|
-
|
|
1408
|
+
g
|
|
1382
1409
|
);
|
|
1383
1410
|
return (
|
|
1384
1411
|
/** @type {() => V} */
|
|
1385
|
-
(function(
|
|
1412
|
+
(function(h, ye) {
|
|
1386
1413
|
if (arguments.length > 0) {
|
|
1387
|
-
const
|
|
1388
|
-
return U(
|
|
1414
|
+
const et = ye ? w(A) : i && a ? se(h) : h;
|
|
1415
|
+
return U(A, et), O = !0, o !== void 0 && (o = et), h;
|
|
1389
1416
|
}
|
|
1390
|
-
return
|
|
1417
|
+
return _e && O || (N.f & re) !== 0 ? A.v : w(A);
|
|
1391
1418
|
})
|
|
1392
1419
|
);
|
|
1393
1420
|
}
|
|
1394
|
-
var
|
|
1395
|
-
function
|
|
1396
|
-
const n =
|
|
1397
|
-
var r =
|
|
1398
|
-
|
|
1421
|
+
var _r = /* @__PURE__ */ Ke("<span><!></span>");
|
|
1422
|
+
function pr(e, t) {
|
|
1423
|
+
const n = ve(t, "size", 3, "body-base");
|
|
1424
|
+
var r = _r(), i = Dt(r);
|
|
1425
|
+
Xt(i, () => t.children ?? Oe), Ge(() => Yt(r, 1, `rcb-typography rcb-typography-${n() ?? ""}`, "svelte-jt3g5k")), Fe(e, r);
|
|
1399
1426
|
}
|
|
1400
|
-
const
|
|
1427
|
+
const vr = {
|
|
1401
1428
|
outerPadding: {
|
|
1402
1429
|
mobile: "clamp(1.3125rem, 5.6vw, 1.5rem)",
|
|
1403
1430
|
desktop: "clamp(1.5rem, 9.44vw, 5rem)"
|
|
@@ -1438,11 +1465,11 @@ const dr = {
|
|
|
1438
1465
|
mobile: "0.70rem",
|
|
1439
1466
|
desktop: "1rem"
|
|
1440
1467
|
}
|
|
1441
|
-
},
|
|
1468
|
+
}, ct = "-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif", P = {
|
|
1442
1469
|
regular: "400",
|
|
1443
1470
|
medium: "500",
|
|
1444
1471
|
semibold: "600"
|
|
1445
|
-
},
|
|
1472
|
+
}, D = {
|
|
1446
1473
|
12: "12px",
|
|
1447
1474
|
14: "14px",
|
|
1448
1475
|
16: "16px",
|
|
@@ -1455,147 +1482,147 @@ const dr = {
|
|
|
1455
1482
|
120: "120%",
|
|
1456
1483
|
130: "130%",
|
|
1457
1484
|
140: "140%"
|
|
1458
|
-
},
|
|
1485
|
+
}, j = {
|
|
1459
1486
|
tight: "0.20%",
|
|
1460
1487
|
regular: "0"
|
|
1461
|
-
},
|
|
1488
|
+
}, b = {
|
|
1462
1489
|
heading2xl: {
|
|
1463
|
-
fontSize:
|
|
1490
|
+
fontSize: D[28],
|
|
1464
1491
|
lineHeight: M[120],
|
|
1465
|
-
fontWeight:
|
|
1466
|
-
letterSpacing:
|
|
1492
|
+
fontWeight: P.semibold,
|
|
1493
|
+
letterSpacing: j.tight
|
|
1467
1494
|
},
|
|
1468
1495
|
headingXl: {
|
|
1469
|
-
fontSize:
|
|
1496
|
+
fontSize: D[24],
|
|
1470
1497
|
lineHeight: M[130],
|
|
1471
|
-
fontWeight:
|
|
1472
|
-
letterSpacing:
|
|
1498
|
+
fontWeight: P.semibold,
|
|
1499
|
+
letterSpacing: j.regular
|
|
1473
1500
|
},
|
|
1474
1501
|
headingLg: {
|
|
1475
1502
|
fontSize: "20px",
|
|
1476
1503
|
lineHeight: M[130],
|
|
1477
|
-
fontWeight:
|
|
1478
|
-
letterSpacing:
|
|
1504
|
+
fontWeight: P.semibold,
|
|
1505
|
+
letterSpacing: j.regular
|
|
1479
1506
|
},
|
|
1480
1507
|
headingMd: {
|
|
1481
1508
|
fontSize: "16px",
|
|
1482
1509
|
lineHeight: M[140],
|
|
1483
|
-
fontWeight:
|
|
1484
|
-
letterSpacing:
|
|
1510
|
+
fontWeight: P.medium,
|
|
1511
|
+
letterSpacing: j.regular
|
|
1485
1512
|
},
|
|
1486
1513
|
bodyBase: {
|
|
1487
|
-
fontSize:
|
|
1514
|
+
fontSize: D[16],
|
|
1488
1515
|
lineHeight: M[140],
|
|
1489
|
-
fontWeight:
|
|
1490
|
-
letterSpacing:
|
|
1516
|
+
fontWeight: P.regular,
|
|
1517
|
+
letterSpacing: j.regular
|
|
1491
1518
|
},
|
|
1492
1519
|
bodySmall: {
|
|
1493
|
-
fontSize:
|
|
1520
|
+
fontSize: D[14],
|
|
1494
1521
|
lineHeight: M[140],
|
|
1495
|
-
fontWeight:
|
|
1496
|
-
letterSpacing:
|
|
1522
|
+
fontWeight: P.regular,
|
|
1523
|
+
letterSpacing: j.regular
|
|
1497
1524
|
},
|
|
1498
1525
|
labelButton: {
|
|
1499
|
-
fontSize:
|
|
1526
|
+
fontSize: D[16],
|
|
1500
1527
|
lineHeight: M[140],
|
|
1501
|
-
fontWeight:
|
|
1502
|
-
letterSpacing:
|
|
1528
|
+
fontWeight: P.regular,
|
|
1529
|
+
letterSpacing: j.tight
|
|
1503
1530
|
},
|
|
1504
1531
|
labelDefault: {
|
|
1505
|
-
fontSize:
|
|
1532
|
+
fontSize: D[14],
|
|
1506
1533
|
lineHeight: M[140],
|
|
1507
|
-
fontWeight:
|
|
1508
|
-
letterSpacing:
|
|
1534
|
+
fontWeight: P.regular,
|
|
1535
|
+
letterSpacing: j.tight
|
|
1509
1536
|
},
|
|
1510
1537
|
captionDefault: {
|
|
1511
|
-
fontSize:
|
|
1538
|
+
fontSize: D[12],
|
|
1512
1539
|
lineHeight: M[140],
|
|
1513
|
-
fontWeight:
|
|
1514
|
-
letterSpacing:
|
|
1540
|
+
fontWeight: P.regular,
|
|
1541
|
+
letterSpacing: j.regular
|
|
1515
1542
|
},
|
|
1516
1543
|
captionLink: {
|
|
1517
|
-
fontSize:
|
|
1544
|
+
fontSize: D[12],
|
|
1518
1545
|
lineHeight: M[140],
|
|
1519
|
-
fontWeight:
|
|
1520
|
-
letterSpacing:
|
|
1546
|
+
fontWeight: P.regular,
|
|
1547
|
+
letterSpacing: j.regular
|
|
1521
1548
|
}
|
|
1522
|
-
},
|
|
1549
|
+
}, B = {
|
|
1523
1550
|
heading2xl: {
|
|
1524
|
-
...
|
|
1525
|
-
fontSize:
|
|
1551
|
+
...b.heading2xl,
|
|
1552
|
+
fontSize: D[36]
|
|
1526
1553
|
},
|
|
1527
1554
|
headingXl: {
|
|
1528
|
-
...
|
|
1529
|
-
fontSize:
|
|
1555
|
+
...b.headingXl,
|
|
1556
|
+
fontSize: D[32]
|
|
1530
1557
|
},
|
|
1531
1558
|
headingLg: {
|
|
1532
|
-
...
|
|
1533
|
-
fontSize:
|
|
1559
|
+
...b.headingLg,
|
|
1560
|
+
fontSize: D[24]
|
|
1534
1561
|
},
|
|
1535
1562
|
headingMd: {
|
|
1536
|
-
...
|
|
1537
|
-
fontSize:
|
|
1563
|
+
...b.headingMd,
|
|
1564
|
+
fontSize: D[18]
|
|
1538
1565
|
},
|
|
1539
1566
|
bodyBase: {
|
|
1540
|
-
...
|
|
1567
|
+
...b.bodyBase
|
|
1541
1568
|
},
|
|
1542
1569
|
bodySmall: {
|
|
1543
|
-
...
|
|
1570
|
+
...b.bodySmall
|
|
1544
1571
|
},
|
|
1545
1572
|
labelButton: {
|
|
1546
|
-
...
|
|
1573
|
+
...b.labelButton
|
|
1547
1574
|
},
|
|
1548
1575
|
labelDefault: {
|
|
1549
|
-
...
|
|
1576
|
+
...b.labelDefault
|
|
1550
1577
|
},
|
|
1551
1578
|
captionDefault: {
|
|
1552
|
-
...
|
|
1579
|
+
...b.captionDefault
|
|
1553
1580
|
},
|
|
1554
1581
|
captionLink: {
|
|
1555
|
-
...
|
|
1582
|
+
...b.captionLink
|
|
1556
1583
|
}
|
|
1557
|
-
},
|
|
1584
|
+
}, gr = {
|
|
1558
1585
|
heading2xl: {
|
|
1559
|
-
mobile:
|
|
1560
|
-
desktop:
|
|
1586
|
+
mobile: b.heading2xl,
|
|
1587
|
+
desktop: B.heading2xl
|
|
1561
1588
|
},
|
|
1562
1589
|
headingXl: {
|
|
1563
|
-
desktop:
|
|
1564
|
-
mobile:
|
|
1590
|
+
desktop: B.headingXl,
|
|
1591
|
+
mobile: b.headingXl
|
|
1565
1592
|
},
|
|
1566
1593
|
headingLg: {
|
|
1567
|
-
desktop:
|
|
1568
|
-
mobile:
|
|
1594
|
+
desktop: B.headingLg,
|
|
1595
|
+
mobile: b.headingLg
|
|
1569
1596
|
},
|
|
1570
1597
|
headingMd: {
|
|
1571
|
-
desktop:
|
|
1572
|
-
mobile:
|
|
1598
|
+
desktop: B.headingMd,
|
|
1599
|
+
mobile: b.headingMd
|
|
1573
1600
|
},
|
|
1574
1601
|
bodyBase: {
|
|
1575
|
-
desktop:
|
|
1576
|
-
mobile:
|
|
1602
|
+
desktop: B.bodyBase,
|
|
1603
|
+
mobile: b.bodyBase
|
|
1577
1604
|
},
|
|
1578
1605
|
bodySmall: {
|
|
1579
|
-
desktop:
|
|
1580
|
-
mobile:
|
|
1606
|
+
desktop: B.bodySmall,
|
|
1607
|
+
mobile: b.bodySmall
|
|
1581
1608
|
},
|
|
1582
1609
|
labelButton: {
|
|
1583
|
-
desktop:
|
|
1584
|
-
mobile:
|
|
1610
|
+
desktop: B.labelButton,
|
|
1611
|
+
mobile: b.labelButton
|
|
1585
1612
|
},
|
|
1586
1613
|
labelDefault: {
|
|
1587
|
-
desktop:
|
|
1588
|
-
mobile:
|
|
1614
|
+
desktop: B.labelDefault,
|
|
1615
|
+
mobile: b.labelDefault
|
|
1589
1616
|
},
|
|
1590
1617
|
captionDefault: {
|
|
1591
|
-
desktop:
|
|
1592
|
-
mobile:
|
|
1618
|
+
desktop: B.captionDefault,
|
|
1619
|
+
mobile: b.captionDefault
|
|
1593
1620
|
},
|
|
1594
1621
|
captionLink: {
|
|
1595
|
-
desktop:
|
|
1596
|
-
mobile:
|
|
1622
|
+
desktop: B.captionLink,
|
|
1623
|
+
mobile: b.captionLink
|
|
1597
1624
|
}
|
|
1598
|
-
},
|
|
1625
|
+
}, hr = {
|
|
1599
1626
|
error: "#B0171F",
|
|
1600
1627
|
warning: "#f4e971",
|
|
1601
1628
|
focus: "#1148B8",
|
|
@@ -1611,7 +1638,7 @@ const dr = {
|
|
|
1611
1638
|
"grey-ui-light": "rgba(0,0,0,0.1)",
|
|
1612
1639
|
"input-background": "white",
|
|
1613
1640
|
background: "white"
|
|
1614
|
-
},
|
|
1641
|
+
}, br = {
|
|
1615
1642
|
error: "#B0171F",
|
|
1616
1643
|
warning: "#f4e971",
|
|
1617
1644
|
focus: "#1148B8",
|
|
@@ -1627,46 +1654,46 @@ const dr = {
|
|
|
1627
1654
|
"grey-ui-light": "rgba(0,0,0,0.1)",
|
|
1628
1655
|
"input-background": "white",
|
|
1629
1656
|
background: "#EFF3FA"
|
|
1630
|
-
},
|
|
1657
|
+
}, Kt = {
|
|
1631
1658
|
error: "color_error",
|
|
1632
1659
|
focus: "color_accent",
|
|
1633
1660
|
accent: "color_accent",
|
|
1634
1661
|
primary: "color_buttons_primary"
|
|
1635
|
-
},
|
|
1636
|
-
...
|
|
1662
|
+
}, mr = {
|
|
1663
|
+
...Kt,
|
|
1637
1664
|
"input-background": "color_form_bg",
|
|
1638
1665
|
background: "color_form_bg"
|
|
1639
|
-
},
|
|
1640
|
-
...
|
|
1666
|
+
}, yr = {
|
|
1667
|
+
...Kt,
|
|
1641
1668
|
"input-background": "color_product_info_bg",
|
|
1642
1669
|
background: "color_product_info_bg"
|
|
1643
|
-
},
|
|
1670
|
+
}, Zt = {
|
|
1644
1671
|
"input-border-radius": "4px",
|
|
1645
1672
|
"input-button-border-radius": "8px"
|
|
1646
|
-
},
|
|
1673
|
+
}, Sr = {
|
|
1647
1674
|
"input-border-radius": "0px",
|
|
1648
1675
|
"input-button-border-radius": "0px"
|
|
1649
|
-
},
|
|
1676
|
+
}, wr = {
|
|
1650
1677
|
"input-border-radius": "12px",
|
|
1651
1678
|
"input-button-border-radius": "9999px"
|
|
1652
|
-
},
|
|
1653
|
-
r: parseInt(
|
|
1654
|
-
g: parseInt(
|
|
1655
|
-
b: parseInt(
|
|
1656
|
-
} :
|
|
1657
|
-
r: parseInt(
|
|
1658
|
-
g: parseInt(
|
|
1659
|
-
b: parseInt(
|
|
1660
|
-
} : null,
|
|
1661
|
-
r:
|
|
1662
|
-
g:
|
|
1679
|
+
}, dt = Zt, be = (e) => e.length == 7 ? {
|
|
1680
|
+
r: parseInt(e.slice(1, 3), 16),
|
|
1681
|
+
g: parseInt(e.slice(3, 5), 16),
|
|
1682
|
+
b: parseInt(e.slice(5, 7), 16)
|
|
1683
|
+
} : e.length == 4 ? {
|
|
1684
|
+
r: parseInt(e[1], 16),
|
|
1685
|
+
g: parseInt(e[2], 16),
|
|
1686
|
+
b: parseInt(e[3], 16)
|
|
1687
|
+
} : null, Ze = ({
|
|
1688
|
+
r: e,
|
|
1689
|
+
g: t,
|
|
1663
1690
|
b: n,
|
|
1664
1691
|
luminanceThreshold: r
|
|
1665
1692
|
}) => {
|
|
1666
1693
|
const i = (s) => (s = s / 255, s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4));
|
|
1667
|
-
return 0.2126 * i(
|
|
1668
|
-
},
|
|
1669
|
-
const n =
|
|
1694
|
+
return 0.2126 * i(e) + 0.7152 * i(t) + 0.0722 * i(n) > r;
|
|
1695
|
+
}, Je = 0.37, Er = (e, t = Je) => {
|
|
1696
|
+
const n = Ze({ ...e, luminanceThreshold: t }) ? "0,0,0" : "255,255,255";
|
|
1670
1697
|
return {
|
|
1671
1698
|
"grey-text-dark": `rgb(${n})`,
|
|
1672
1699
|
"grey-text-light": `rgba(${n},0.70)`,
|
|
@@ -1674,24 +1701,24 @@ const dr = {
|
|
|
1674
1701
|
"grey-ui-light": `rgba(${n},0.1)`
|
|
1675
1702
|
};
|
|
1676
1703
|
};
|
|
1677
|
-
function
|
|
1678
|
-
const r =
|
|
1679
|
-
return `#${
|
|
1704
|
+
function xr(e, t, n) {
|
|
1705
|
+
const r = be(e) || { r: 0, g: 0, b: 0 }, i = be(t) || { r: 255, g: 255, b: 255 }, a = Math.round(i.r * n + r.r * (1 - n)), s = Math.round(i.g * n + r.g * (1 - n)), o = Math.round(i.b * n + r.b * (1 - n));
|
|
1706
|
+
return `#${je(a)}${je(s)}${je(o)}`;
|
|
1680
1707
|
}
|
|
1681
|
-
function
|
|
1682
|
-
const n = { r: 255, g: 255, b: 255 }, r = Math.max(0, Math.min(1,
|
|
1683
|
-
let i =
|
|
1708
|
+
function _t(e, t) {
|
|
1709
|
+
const n = { r: 255, g: 255, b: 255 }, r = Math.max(0, Math.min(1, t));
|
|
1710
|
+
let i = e, a = be(e) || n;
|
|
1684
1711
|
(isNaN(a.r) || isNaN(a.g) || isNaN(a.b)) && (a = n, i = "#FFFFFF");
|
|
1685
|
-
const o =
|
|
1712
|
+
const o = Ze({
|
|
1686
1713
|
...a,
|
|
1687
|
-
luminanceThreshold:
|
|
1714
|
+
luminanceThreshold: Je
|
|
1688
1715
|
}) ? "#000000" : "#FFFFFF";
|
|
1689
|
-
return
|
|
1716
|
+
return xr(i, o, r);
|
|
1690
1717
|
}
|
|
1691
|
-
function
|
|
1692
|
-
return
|
|
1718
|
+
function je(e) {
|
|
1719
|
+
return e.toString(16).padStart(2, "0").toUpperCase();
|
|
1693
1720
|
}
|
|
1694
|
-
const
|
|
1721
|
+
const kr = (e, t, n, r = Je) => {
|
|
1695
1722
|
const i = {
|
|
1696
1723
|
"grey-text-dark": n["grey-text-dark"],
|
|
1697
1724
|
"grey-text-light": n["grey-text-light"],
|
|
@@ -1699,169 +1726,169 @@ const Er = (t, e, n, r = Jt) => {
|
|
|
1699
1726
|
"grey-ui-light": n["grey-ui-light"],
|
|
1700
1727
|
"primary-text": n["primary-text"]
|
|
1701
1728
|
};
|
|
1702
|
-
if (t?.startsWith("#")) {
|
|
1703
|
-
const a = ht(t);
|
|
1704
|
-
a !== null && Object.assign(i, Sr(a));
|
|
1705
|
-
}
|
|
1706
1729
|
if (e?.startsWith("#")) {
|
|
1707
|
-
const a =
|
|
1708
|
-
a !== null && (i
|
|
1730
|
+
const a = be(e);
|
|
1731
|
+
a !== null && Object.assign(i, Er(a));
|
|
1732
|
+
}
|
|
1733
|
+
if (t?.startsWith("#")) {
|
|
1734
|
+
const a = be(t);
|
|
1735
|
+
a !== null && (i["primary-text"] = Ze({ ...a, luminanceThreshold: r }) ? "black" : "white");
|
|
1709
1736
|
}
|
|
1710
1737
|
return i;
|
|
1711
|
-
},
|
|
1712
|
-
"primary-hover":
|
|
1713
|
-
"primary-pressed":
|
|
1714
|
-
}),
|
|
1715
|
-
const r = Object.entries(
|
|
1738
|
+
}, Tr = (e) => ({
|
|
1739
|
+
"primary-hover": _t(e, 0.1),
|
|
1740
|
+
"primary-pressed": _t(e, 0.15)
|
|
1741
|
+
}), Ar = (e, t) => e || t, Fr = (e, t, n) => {
|
|
1742
|
+
const r = Object.entries(e).map(([i, a]) => [
|
|
1716
1743
|
i,
|
|
1717
|
-
|
|
1744
|
+
Ar(
|
|
1718
1745
|
n ? n[a] : null,
|
|
1719
|
-
|
|
1746
|
+
t[i]
|
|
1720
1747
|
)
|
|
1721
1748
|
]);
|
|
1722
1749
|
return Object.fromEntries(r);
|
|
1723
|
-
},
|
|
1724
|
-
const r =
|
|
1725
|
-
t,
|
|
1750
|
+
}, Jt = (e, t, n) => {
|
|
1751
|
+
const r = Fr(
|
|
1726
1752
|
e,
|
|
1753
|
+
t,
|
|
1727
1754
|
n
|
|
1728
1755
|
);
|
|
1729
1756
|
return n ? {
|
|
1730
|
-
...
|
|
1757
|
+
...t,
|
|
1731
1758
|
...r,
|
|
1732
|
-
...
|
|
1759
|
+
...kr(
|
|
1733
1760
|
r.background,
|
|
1734
1761
|
r.primary,
|
|
1735
|
-
|
|
1762
|
+
t
|
|
1736
1763
|
),
|
|
1737
|
-
...
|
|
1738
|
-
} : { ...
|
|
1739
|
-
},
|
|
1764
|
+
...Tr(r.primary)
|
|
1765
|
+
} : { ...t };
|
|
1766
|
+
}, Ir = (e) => Jt(
|
|
1767
|
+
yr,
|
|
1768
|
+
br,
|
|
1769
|
+
e
|
|
1770
|
+
), Qt = (e) => Jt(
|
|
1740
1771
|
mr,
|
|
1741
1772
|
hr,
|
|
1742
|
-
|
|
1743
|
-
),
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
), Qt = (t) => {
|
|
1748
|
-
if (!t)
|
|
1749
|
-
return _e;
|
|
1750
|
-
switch (t.shapes) {
|
|
1773
|
+
e
|
|
1774
|
+
), Qe = (e) => {
|
|
1775
|
+
if (!e)
|
|
1776
|
+
return dt;
|
|
1777
|
+
switch (e.shapes) {
|
|
1751
1778
|
case "rounded":
|
|
1752
|
-
return
|
|
1779
|
+
return Zt;
|
|
1753
1780
|
case "rectangle":
|
|
1754
|
-
return
|
|
1781
|
+
return Sr;
|
|
1755
1782
|
case "pill":
|
|
1756
|
-
return
|
|
1783
|
+
return wr;
|
|
1757
1784
|
default:
|
|
1758
|
-
return
|
|
1785
|
+
return dt;
|
|
1759
1786
|
}
|
|
1760
|
-
},
|
|
1761
|
-
const
|
|
1787
|
+
}, Ie = (e = "", t) => t.map(([n, r]) => `--rc-${e}-${n}: ${r}`).join("; "), Or = (e) => {
|
|
1788
|
+
const t = Ie(
|
|
1762
1789
|
"color",
|
|
1763
|
-
Object.entries(
|
|
1764
|
-
), n =
|
|
1790
|
+
Object.entries(Ir(e))
|
|
1791
|
+
), n = Ie(
|
|
1765
1792
|
"shape",
|
|
1766
|
-
Object.entries(
|
|
1793
|
+
Object.entries(Qe(e))
|
|
1767
1794
|
);
|
|
1768
|
-
return [
|
|
1769
|
-
},
|
|
1770
|
-
const
|
|
1795
|
+
return [t, n].join("; ");
|
|
1796
|
+
}, Lr = (e) => {
|
|
1797
|
+
const t = Ie(
|
|
1771
1798
|
"color",
|
|
1772
|
-
Object.entries(
|
|
1773
|
-
), n =
|
|
1799
|
+
Object.entries(Qt(e))
|
|
1800
|
+
), n = Ie(
|
|
1774
1801
|
"shape",
|
|
1775
|
-
Object.entries(
|
|
1802
|
+
Object.entries(Qe(e))
|
|
1776
1803
|
);
|
|
1777
|
-
return [
|
|
1778
|
-
},
|
|
1779
|
-
`--rc-${
|
|
1780
|
-
`--rc-${
|
|
1781
|
-
`--rc-${
|
|
1782
|
-
`--rc-${
|
|
1783
|
-
]).join("; "),
|
|
1784
|
-
([n, { mobile: r, desktop: i }]) => `--rc-${
|
|
1804
|
+
return [t, n].join("; ");
|
|
1805
|
+
}, Dr = (e = "", t) => Object.entries(t).flatMap(([n, { desktop: r, mobile: i }]) => [
|
|
1806
|
+
`--rc-${e}-${n}-desktop: normal normal ${r.fontWeight} ${r.fontSize}/${r.lineHeight} ${ct}`,
|
|
1807
|
+
`--rc-${e}-${n}-mobile: normal normal ${i.fontWeight} ${i.fontSize}/${i.lineHeight} ${ct}`,
|
|
1808
|
+
`--rc-${e}-${n}-desktop-font-size: ${r.fontSize}`,
|
|
1809
|
+
`--rc-${e}-${n}-mobile-font-size: ${i.fontSize}`
|
|
1810
|
+
]).join("; "), Nr = (e = "", t) => Object.entries(t).map(
|
|
1811
|
+
([n, { mobile: r, desktop: i }]) => `--rc-${e}-${n}-mobile: ${r}; --rc-${e}-${n}-desktop: ${i};`
|
|
1785
1812
|
).join(" ");
|
|
1786
|
-
class
|
|
1813
|
+
class Rr {
|
|
1787
1814
|
brandingAppearance;
|
|
1788
|
-
constructor(
|
|
1789
|
-
|
|
1815
|
+
constructor(t) {
|
|
1816
|
+
t ? this.brandingAppearance = t : this.brandingAppearance = void 0;
|
|
1790
1817
|
}
|
|
1791
1818
|
get shape() {
|
|
1792
|
-
return
|
|
1819
|
+
return Qe(this.brandingAppearance);
|
|
1793
1820
|
}
|
|
1794
1821
|
get formColors() {
|
|
1795
|
-
return
|
|
1822
|
+
return Qt(this.brandingAppearance);
|
|
1796
1823
|
}
|
|
1797
1824
|
get formStyleVars() {
|
|
1798
|
-
return
|
|
1825
|
+
return Lr(this.brandingAppearance);
|
|
1799
1826
|
}
|
|
1800
1827
|
get productInfoStyleVars() {
|
|
1801
|
-
return
|
|
1828
|
+
return Or(this.brandingAppearance);
|
|
1802
1829
|
}
|
|
1803
1830
|
get spacing() {
|
|
1804
|
-
return
|
|
1831
|
+
return vr;
|
|
1805
1832
|
}
|
|
1806
1833
|
get textStyles() {
|
|
1807
|
-
return
|
|
1834
|
+
return gr;
|
|
1808
1835
|
}
|
|
1809
1836
|
get textStyleVars() {
|
|
1810
|
-
return
|
|
1837
|
+
return Dr("text", this.textStyles);
|
|
1811
1838
|
}
|
|
1812
1839
|
get spacingStyleVars() {
|
|
1813
|
-
return
|
|
1840
|
+
return Nr("spacing", this.spacing);
|
|
1814
1841
|
}
|
|
1815
1842
|
}
|
|
1816
|
-
|
|
1817
|
-
var
|
|
1818
|
-
function
|
|
1819
|
-
let n =
|
|
1843
|
+
kn();
|
|
1844
|
+
var Cr = /* @__PURE__ */ Ke('<div class="rcb-processing svelte-1i80tfc"></div>');
|
|
1845
|
+
function Pr(e, t) {
|
|
1846
|
+
let n = ve(t, "size", 8, "medium");
|
|
1820
1847
|
const r = {
|
|
1821
1848
|
small: { width: "8px", offset: "10px" },
|
|
1822
1849
|
medium: { width: "12px", offset: "20px" },
|
|
1823
1850
|
large: { width: "16px", offset: "30px" }
|
|
1824
1851
|
};
|
|
1825
|
-
var i =
|
|
1826
|
-
|
|
1827
|
-
}
|
|
1828
|
-
var
|
|
1829
|
-
function
|
|
1830
|
-
|
|
1831
|
-
const n =
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1852
|
+
var i = Cr();
|
|
1853
|
+
Ge(() => Gt(i, `--shadow-offset: ${ot(n()), Ue(() => r[n()].offset) ?? ""}; --width: ${ot(n()), Ue(() => r[n()].width) ?? ""};`)), Fe(e, i);
|
|
1854
|
+
}
|
|
1855
|
+
var Mr = /* @__PURE__ */ Ke("<button><!></button>");
|
|
1856
|
+
function Br(e, t) {
|
|
1857
|
+
Tn(t, !0);
|
|
1858
|
+
const n = ve(t, "intent", 3, "primary"), r = ve(t, "disabled", 3, !1), i = ve(t, "loading", 3, !1), a = /* @__PURE__ */ ie(() => new Rr(t.brandingAppearance)), s = /* @__PURE__ */ ie(() => w(a).textStyleVars), o = /* @__PURE__ */ ie(() => w(a).spacingStyleVars), l = /* @__PURE__ */ ie(() => w(a).productInfoStyleVars), f = /* @__PURE__ */ ie(() => w(a).formStyleVars), u = /* @__PURE__ */ ie(() => [
|
|
1859
|
+
t.styleOverrides,
|
|
1860
|
+
w(s),
|
|
1861
|
+
w(o),
|
|
1862
|
+
w(l),
|
|
1863
|
+
w(f)
|
|
1837
1864
|
].join("; "));
|
|
1838
|
-
var c =
|
|
1839
|
-
c.__click = function(...
|
|
1840
|
-
|
|
1865
|
+
var c = Mr();
|
|
1866
|
+
c.__click = function(...m) {
|
|
1867
|
+
t.onclick?.apply(this, m);
|
|
1841
1868
|
};
|
|
1842
|
-
var
|
|
1869
|
+
var p = Dt(c);
|
|
1843
1870
|
{
|
|
1844
|
-
var
|
|
1845
|
-
|
|
1846
|
-
},
|
|
1847
|
-
|
|
1871
|
+
var _ = (m) => {
|
|
1872
|
+
Pr(m, { size: "small" });
|
|
1873
|
+
}, d = (m) => {
|
|
1874
|
+
pr(m, {
|
|
1848
1875
|
size: "body-base",
|
|
1849
|
-
children: (
|
|
1850
|
-
var N =
|
|
1851
|
-
|
|
1876
|
+
children: (O, A) => {
|
|
1877
|
+
var N = ir(), h = zn(N);
|
|
1878
|
+
Xt(h, () => t.children ?? Oe), Fe(O, N);
|
|
1852
1879
|
},
|
|
1853
1880
|
$$slots: { default: !0 }
|
|
1854
1881
|
});
|
|
1855
1882
|
};
|
|
1856
|
-
|
|
1857
|
-
i() ?
|
|
1883
|
+
ar(p, (m) => {
|
|
1884
|
+
i() ? m(_) : m(d, !1);
|
|
1858
1885
|
});
|
|
1859
1886
|
}
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
}),
|
|
1887
|
+
Ge(() => {
|
|
1888
|
+
Yt(c, 1, `intent-${n()}`, "svelte-hnboq0"), c.disabled = r(), ft(c, "data-testid", t.testId), ft(c, "type", t.type), Gt(c, w(u));
|
|
1889
|
+
}), Fe(e, c), An();
|
|
1863
1890
|
}
|
|
1864
|
-
|
|
1891
|
+
nr(["click"]);
|
|
1865
1892
|
export {
|
|
1866
|
-
|
|
1893
|
+
Br as Button
|
|
1867
1894
|
};
|