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