@tanstack/query-devtools 5.101.3 → 5.102.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/build/Devtools-B8gBVih5.js +11463 -0
  2. package/build/Devtools-C2baIe1r.cjs +1248 -0
  3. package/build/Devtools-CFKbGy8Z.js +1249 -0
  4. package/build/Devtools-CFKbGy8Z.js.map +1 -0
  5. package/build/Devtools-QIchsTu4.cjs +11510 -0
  6. package/build/DevtoolsComponent-B932o_Kt.cjs +1 -0
  7. package/build/DevtoolsComponent-CFsAhafd.js +34 -0
  8. package/build/DevtoolsComponent-Cb-WvQCr.js +2 -0
  9. package/build/DevtoolsComponent-Cb-WvQCr.js.map +1 -0
  10. package/build/DevtoolsComponent-ChtbiwqS.cjs +34 -0
  11. package/build/DevtoolsPanelComponent-B9zkHqmD.js +41 -0
  12. package/build/DevtoolsPanelComponent-Be8narGM.js +2 -0
  13. package/build/DevtoolsPanelComponent-Be8narGM.js.map +1 -0
  14. package/build/DevtoolsPanelComponent-CHpU_w5-.cjs +41 -0
  15. package/build/DevtoolsPanelComponent-Dm3BbKKd.cjs +1 -0
  16. package/build/dev.cjs +241 -16792
  17. package/build/dev.js +236 -274
  18. package/build/index.cjs +1 -16791
  19. package/build/index.d.cts +55 -51
  20. package/build/index.d.cts.map +1 -0
  21. package/build/index.d.ts +55 -51
  22. package/build/index.d.ts.map +1 -0
  23. package/build/index.js +2 -279
  24. package/build/index.js.map +1 -0
  25. package/build/utils-BLwigsFG.cjs +2942 -0
  26. package/build/utils-BPMMmTje.js +2 -0
  27. package/build/utils-BPMMmTje.js.map +1 -0
  28. package/build/utils-CESniQp_.js +2613 -0
  29. package/build/utils-DzxoHwL2.cjs +1 -0
  30. package/package.json +6 -8
  31. package/build/DevtoolsComponent/SO26Z5QU.js +0 -38
  32. package/build/DevtoolsComponent/ZXV6FBN7.js +0 -38
  33. package/build/DevtoolsPanelComponent/MO2VZFYH.js +0 -47
  34. package/build/DevtoolsPanelComponent/MYKLHYJZ.js +0 -47
  35. package/build/chunk/M4GWWVAC.js +0 -2915
  36. package/build/chunk/OJ5GAW4I.js +0 -12753
  37. package/build/chunk/RQBHRHJL.js +0 -12751
  38. package/build/chunk/ZCXR2IAF.js +0 -2914
@@ -1,2914 +0,0 @@
1
- // ../../node_modules/.pnpm/solid-js@1.9.12/node_modules/solid-js/dist/solid.js
2
- var sharedConfig = {
3
- context: void 0,
4
- registry: void 0,
5
- effects: void 0,
6
- done: false,
7
- getContextId() {
8
- return getContextId(this.context.count);
9
- },
10
- getNextContextId() {
11
- return getContextId(this.context.count++);
12
- }
13
- };
14
- function getContextId(count) {
15
- const num = String(count), len = num.length - 1;
16
- return sharedConfig.context.id + (len ? String.fromCharCode(96 + len) : "") + num;
17
- }
18
- function setHydrateContext(context) {
19
- sharedConfig.context = context;
20
- }
21
- function nextHydrateContext() {
22
- return {
23
- ...sharedConfig.context,
24
- id: sharedConfig.getNextContextId(),
25
- count: 0
26
- };
27
- }
28
- var IS_DEV = false;
29
- var equalFn = (a, b) => a === b;
30
- var $PROXY = /* @__PURE__ */ Symbol("solid-proxy");
31
- var SUPPORTS_PROXY = typeof Proxy === "function";
32
- var $TRACK = /* @__PURE__ */ Symbol("solid-track");
33
- var signalOptions = {
34
- equals: equalFn
35
- };
36
- var ERROR = null;
37
- var runEffects = runQueue;
38
- var STALE = 1;
39
- var PENDING = 2;
40
- var UNOWNED = {
41
- owned: null,
42
- cleanups: null,
43
- context: null,
44
- owner: null
45
- };
46
- var NO_INIT = {};
47
- var Owner = null;
48
- var Transition = null;
49
- var Scheduler = null;
50
- var ExternalSourceConfig = null;
51
- var Listener = null;
52
- var Updates = null;
53
- var Effects = null;
54
- var ExecCount = 0;
55
- function createRoot(fn, detachedOwner) {
56
- const listener = Listener, owner = Owner, unowned = fn.length === 0, current = detachedOwner === void 0 ? owner : detachedOwner, root = unowned ? UNOWNED : {
57
- owned: null,
58
- cleanups: null,
59
- context: current ? current.context : null,
60
- owner: current
61
- }, updateFn = unowned ? fn : () => fn(() => untrack(() => cleanNode(root)));
62
- Owner = root;
63
- Listener = null;
64
- try {
65
- return runUpdates(updateFn, true);
66
- } finally {
67
- Listener = listener;
68
- Owner = owner;
69
- }
70
- }
71
- function createSignal(value, options) {
72
- options = options ? Object.assign({}, signalOptions, options) : signalOptions;
73
- const s = {
74
- value,
75
- observers: null,
76
- observerSlots: null,
77
- comparator: options.equals || void 0
78
- };
79
- const setter = (value2) => {
80
- if (typeof value2 === "function") {
81
- if (Transition && Transition.running && Transition.sources.has(s)) value2 = value2(s.tValue);
82
- else value2 = value2(s.value);
83
- }
84
- return writeSignal(s, value2);
85
- };
86
- return [readSignal.bind(s), setter];
87
- }
88
- function createComputed(fn, value, options) {
89
- const c = createComputation(fn, value, true, STALE);
90
- if (Scheduler && Transition && Transition.running) Updates.push(c);
91
- else updateComputation(c);
92
- }
93
- function createRenderEffect(fn, value, options) {
94
- const c = createComputation(fn, value, false, STALE);
95
- if (Scheduler && Transition && Transition.running) Updates.push(c);
96
- else updateComputation(c);
97
- }
98
- function createEffect(fn, value, options) {
99
- runEffects = runUserEffects;
100
- const c = createComputation(fn, value, false, STALE), s = SuspenseContext && useContext(SuspenseContext);
101
- if (s) c.suspense = s;
102
- if (!options || !options.render) c.user = true;
103
- Effects ? Effects.push(c) : updateComputation(c);
104
- }
105
- function createMemo(fn, value, options) {
106
- options = options ? Object.assign({}, signalOptions, options) : signalOptions;
107
- const c = createComputation(fn, value, true, 0);
108
- c.observers = null;
109
- c.observerSlots = null;
110
- c.comparator = options.equals || void 0;
111
- if (Scheduler && Transition && Transition.running) {
112
- c.tState = STALE;
113
- Updates.push(c);
114
- } else updateComputation(c);
115
- return readSignal.bind(c);
116
- }
117
- function isPromise(v) {
118
- return v && typeof v === "object" && "then" in v;
119
- }
120
- function createResource(pSource, pFetcher, pOptions) {
121
- let source;
122
- let fetcher;
123
- let options;
124
- {
125
- source = true;
126
- fetcher = pSource;
127
- options = {};
128
- }
129
- let pr = null, initP = NO_INIT, id = null, loadedUnderTransition = false, scheduled = false, resolved = "initialValue" in options, dynamic = typeof source === "function" && createMemo(source);
130
- const contexts = /* @__PURE__ */ new Set(), [value, setValue] = (options.storage || createSignal)(options.initialValue), [error, setError] = createSignal(void 0), [track, trigger] = createSignal(void 0, {
131
- equals: false
132
- }), [state, setState] = createSignal(resolved ? "ready" : "unresolved");
133
- if (sharedConfig.context) {
134
- id = sharedConfig.getNextContextId();
135
- if (options.ssrLoadFrom === "initial") initP = options.initialValue;
136
- else if (sharedConfig.load && sharedConfig.has(id)) initP = sharedConfig.load(id);
137
- }
138
- function loadEnd(p, v, error2, key) {
139
- if (pr === p) {
140
- pr = null;
141
- key !== void 0 && (resolved = true);
142
- if ((p === initP || v === initP) && options.onHydrated) queueMicrotask(() => options.onHydrated(key, {
143
- value: v
144
- }));
145
- initP = NO_INIT;
146
- if (Transition && p && loadedUnderTransition) {
147
- Transition.promises.delete(p);
148
- loadedUnderTransition = false;
149
- runUpdates(() => {
150
- Transition.running = true;
151
- completeLoad(v, error2);
152
- }, false);
153
- } else completeLoad(v, error2);
154
- }
155
- return v;
156
- }
157
- function completeLoad(v, err) {
158
- runUpdates(() => {
159
- if (err === void 0) setValue(() => v);
160
- setState(err !== void 0 ? "errored" : resolved ? "ready" : "unresolved");
161
- setError(err);
162
- for (const c of contexts.keys()) c.decrement();
163
- contexts.clear();
164
- }, false);
165
- }
166
- function read() {
167
- const c = SuspenseContext && useContext(SuspenseContext), v = value(), err = error();
168
- if (err !== void 0 && !pr) throw err;
169
- if (Listener && !Listener.user && c) {
170
- createComputed(() => {
171
- track();
172
- if (pr) {
173
- if (c.resolved && Transition && loadedUnderTransition) Transition.promises.add(pr);
174
- else if (!contexts.has(c)) {
175
- c.increment();
176
- contexts.add(c);
177
- }
178
- }
179
- });
180
- }
181
- return v;
182
- }
183
- function load(refetching = true) {
184
- if (refetching !== false && scheduled) return;
185
- scheduled = false;
186
- const lookup = dynamic ? dynamic() : source;
187
- loadedUnderTransition = Transition && Transition.running;
188
- if (lookup == null || lookup === false) {
189
- loadEnd(pr, untrack(value));
190
- return;
191
- }
192
- if (Transition && pr) Transition.promises.delete(pr);
193
- let error2;
194
- const p = initP !== NO_INIT ? initP : untrack(() => {
195
- try {
196
- return fetcher(lookup, {
197
- value: value(),
198
- refetching
199
- });
200
- } catch (fetcherError) {
201
- error2 = fetcherError;
202
- }
203
- });
204
- if (error2 !== void 0) {
205
- loadEnd(pr, void 0, castError(error2), lookup);
206
- return;
207
- } else if (!isPromise(p)) {
208
- loadEnd(pr, p, void 0, lookup);
209
- return p;
210
- }
211
- pr = p;
212
- if ("v" in p) {
213
- if (p.s === 1) loadEnd(pr, p.v, void 0, lookup);
214
- else loadEnd(pr, void 0, castError(p.v), lookup);
215
- return p;
216
- }
217
- scheduled = true;
218
- queueMicrotask(() => scheduled = false);
219
- runUpdates(() => {
220
- setState(resolved ? "refreshing" : "pending");
221
- trigger();
222
- }, false);
223
- return p.then((v) => loadEnd(p, v, void 0, lookup), (e) => loadEnd(p, void 0, castError(e), lookup));
224
- }
225
- Object.defineProperties(read, {
226
- state: {
227
- get: () => state()
228
- },
229
- error: {
230
- get: () => error()
231
- },
232
- loading: {
233
- get() {
234
- const s = state();
235
- return s === "pending" || s === "refreshing";
236
- }
237
- },
238
- latest: {
239
- get() {
240
- if (!resolved) return read();
241
- const err = error();
242
- if (err && !pr) throw err;
243
- return value();
244
- }
245
- }
246
- });
247
- let owner = Owner;
248
- if (dynamic) createComputed(() => (owner = Owner, load(false)));
249
- else load(false);
250
- return [read, {
251
- refetch: (info) => runWithOwner(owner, () => load(info)),
252
- mutate: setValue
253
- }];
254
- }
255
- function batch(fn) {
256
- return runUpdates(fn, false);
257
- }
258
- function untrack(fn) {
259
- if (!ExternalSourceConfig && Listener === null) return fn();
260
- const listener = Listener;
261
- Listener = null;
262
- try {
263
- if (ExternalSourceConfig) return ExternalSourceConfig.untrack(fn);
264
- return fn();
265
- } finally {
266
- Listener = listener;
267
- }
268
- }
269
- function on(deps, fn, options) {
270
- const isArray3 = Array.isArray(deps);
271
- let prevInput;
272
- let defer = options && options.defer;
273
- return (prevValue) => {
274
- let input;
275
- if (isArray3) {
276
- input = Array(deps.length);
277
- for (let i = 0; i < deps.length; i++) input[i] = deps[i]();
278
- } else input = deps();
279
- if (defer) {
280
- defer = false;
281
- return prevValue;
282
- }
283
- const result = untrack(() => fn(input, prevInput, prevValue));
284
- prevInput = input;
285
- return result;
286
- };
287
- }
288
- function onMount(fn) {
289
- createEffect(() => untrack(fn));
290
- }
291
- function onCleanup(fn) {
292
- if (Owner === null) ;
293
- else if (Owner.cleanups === null) Owner.cleanups = [fn];
294
- else Owner.cleanups.push(fn);
295
- return fn;
296
- }
297
- function getOwner() {
298
- return Owner;
299
- }
300
- function runWithOwner(o, fn) {
301
- const prev = Owner;
302
- const prevListener = Listener;
303
- Owner = o;
304
- Listener = null;
305
- try {
306
- return runUpdates(fn, true);
307
- } catch (err) {
308
- handleError(err);
309
- } finally {
310
- Owner = prev;
311
- Listener = prevListener;
312
- }
313
- }
314
- function startTransition(fn) {
315
- if (Transition && Transition.running) {
316
- fn();
317
- return Transition.done;
318
- }
319
- const l = Listener;
320
- const o = Owner;
321
- return Promise.resolve().then(() => {
322
- Listener = l;
323
- Owner = o;
324
- let t;
325
- if (Scheduler || SuspenseContext) {
326
- t = Transition || (Transition = {
327
- sources: /* @__PURE__ */ new Set(),
328
- effects: [],
329
- promises: /* @__PURE__ */ new Set(),
330
- disposed: /* @__PURE__ */ new Set(),
331
- queue: /* @__PURE__ */ new Set(),
332
- running: true
333
- });
334
- t.done || (t.done = new Promise((res) => t.resolve = res));
335
- t.running = true;
336
- }
337
- runUpdates(fn, false);
338
- Listener = Owner = null;
339
- return t ? t.done : void 0;
340
- });
341
- }
342
- var [transPending, setTransPending] = /* @__PURE__ */ createSignal(false);
343
- function useTransition() {
344
- return [transPending, startTransition];
345
- }
346
- function createContext(defaultValue, options) {
347
- const id = /* @__PURE__ */ Symbol("context");
348
- return {
349
- id,
350
- Provider: createProvider(id),
351
- defaultValue
352
- };
353
- }
354
- function useContext(context) {
355
- let value;
356
- return Owner && Owner.context && (value = Owner.context[context.id]) !== void 0 ? value : context.defaultValue;
357
- }
358
- function children(fn) {
359
- const children2 = createMemo(fn);
360
- const memo2 = createMemo(() => resolveChildren(children2()));
361
- memo2.toArray = () => {
362
- const c = memo2();
363
- return Array.isArray(c) ? c : c != null ? [c] : [];
364
- };
365
- return memo2;
366
- }
367
- var SuspenseContext;
368
- function readSignal() {
369
- const runningTransition = Transition && Transition.running;
370
- if (this.sources && (runningTransition ? this.tState : this.state)) {
371
- if ((runningTransition ? this.tState : this.state) === STALE) updateComputation(this);
372
- else {
373
- const updates = Updates;
374
- Updates = null;
375
- runUpdates(() => lookUpstream(this), false);
376
- Updates = updates;
377
- }
378
- }
379
- if (Listener) {
380
- const sSlot = this.observers ? this.observers.length : 0;
381
- if (!Listener.sources) {
382
- Listener.sources = [this];
383
- Listener.sourceSlots = [sSlot];
384
- } else {
385
- Listener.sources.push(this);
386
- Listener.sourceSlots.push(sSlot);
387
- }
388
- if (!this.observers) {
389
- this.observers = [Listener];
390
- this.observerSlots = [Listener.sources.length - 1];
391
- } else {
392
- this.observers.push(Listener);
393
- this.observerSlots.push(Listener.sources.length - 1);
394
- }
395
- }
396
- if (runningTransition && Transition.sources.has(this)) return this.tValue;
397
- return this.value;
398
- }
399
- function writeSignal(node, value, isComp) {
400
- let current = Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value;
401
- if (!node.comparator || !node.comparator(current, value)) {
402
- if (Transition) {
403
- const TransitionRunning = Transition.running;
404
- if (TransitionRunning || !isComp && Transition.sources.has(node)) {
405
- Transition.sources.add(node);
406
- node.tValue = value;
407
- }
408
- if (!TransitionRunning) node.value = value;
409
- } else node.value = value;
410
- if (node.observers && node.observers.length) {
411
- runUpdates(() => {
412
- for (let i = 0; i < node.observers.length; i += 1) {
413
- const o = node.observers[i];
414
- const TransitionRunning = Transition && Transition.running;
415
- if (TransitionRunning && Transition.disposed.has(o)) continue;
416
- if (TransitionRunning ? !o.tState : !o.state) {
417
- if (o.pure) Updates.push(o);
418
- else Effects.push(o);
419
- if (o.observers) markDownstream(o);
420
- }
421
- if (!TransitionRunning) o.state = STALE;
422
- else o.tState = STALE;
423
- }
424
- if (Updates.length > 1e6) {
425
- Updates = [];
426
- if (IS_DEV) ;
427
- throw new Error();
428
- }
429
- }, false);
430
- }
431
- }
432
- return value;
433
- }
434
- function updateComputation(node) {
435
- if (!node.fn) return;
436
- cleanNode(node);
437
- const time = ExecCount;
438
- runComputation(node, Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value, time);
439
- if (Transition && !Transition.running && Transition.sources.has(node)) {
440
- queueMicrotask(() => {
441
- runUpdates(() => {
442
- Transition && (Transition.running = true);
443
- Listener = Owner = node;
444
- runComputation(node, node.tValue, time);
445
- Listener = Owner = null;
446
- }, false);
447
- });
448
- }
449
- }
450
- function runComputation(node, value, time) {
451
- let nextValue;
452
- const owner = Owner, listener = Listener;
453
- Listener = Owner = node;
454
- try {
455
- nextValue = node.fn(value);
456
- } catch (err) {
457
- if (node.pure) {
458
- if (Transition && Transition.running) {
459
- node.tState = STALE;
460
- node.tOwned && node.tOwned.forEach(cleanNode);
461
- node.tOwned = void 0;
462
- } else {
463
- node.state = STALE;
464
- node.owned && node.owned.forEach(cleanNode);
465
- node.owned = null;
466
- }
467
- }
468
- node.updatedAt = time + 1;
469
- return handleError(err);
470
- } finally {
471
- Listener = listener;
472
- Owner = owner;
473
- }
474
- if (!node.updatedAt || node.updatedAt <= time) {
475
- if (node.updatedAt != null && "observers" in node) {
476
- writeSignal(node, nextValue, true);
477
- } else if (Transition && Transition.running && node.pure) {
478
- if (!Transition.sources.has(node)) node.value = nextValue;
479
- Transition.sources.add(node);
480
- node.tValue = nextValue;
481
- } else node.value = nextValue;
482
- node.updatedAt = time;
483
- }
484
- }
485
- function createComputation(fn, init, pure, state = STALE, options) {
486
- const c = {
487
- fn,
488
- state,
489
- updatedAt: null,
490
- owned: null,
491
- sources: null,
492
- sourceSlots: null,
493
- cleanups: null,
494
- value: init,
495
- owner: Owner,
496
- context: Owner ? Owner.context : null,
497
- pure
498
- };
499
- if (Transition && Transition.running) {
500
- c.state = 0;
501
- c.tState = state;
502
- }
503
- if (Owner === null) ;
504
- else if (Owner !== UNOWNED) {
505
- if (Transition && Transition.running && Owner.pure) {
506
- if (!Owner.tOwned) Owner.tOwned = [c];
507
- else Owner.tOwned.push(c);
508
- } else {
509
- if (!Owner.owned) Owner.owned = [c];
510
- else Owner.owned.push(c);
511
- }
512
- }
513
- if (ExternalSourceConfig && c.fn) {
514
- const sourceFn = c.fn;
515
- const [track, trigger] = createSignal(void 0, {
516
- equals: false
517
- });
518
- const ordinary = ExternalSourceConfig.factory(sourceFn, trigger);
519
- onCleanup(() => ordinary.dispose());
520
- let inTransition;
521
- const triggerInTransition = () => startTransition(trigger).then(() => {
522
- if (inTransition) {
523
- inTransition.dispose();
524
- inTransition = void 0;
525
- }
526
- });
527
- c.fn = (x) => {
528
- track();
529
- if (Transition && Transition.running) {
530
- if (!inTransition) inTransition = ExternalSourceConfig.factory(sourceFn, triggerInTransition);
531
- return inTransition.track(x);
532
- }
533
- return ordinary.track(x);
534
- };
535
- }
536
- return c;
537
- }
538
- function runTop(node) {
539
- const runningTransition = Transition && Transition.running;
540
- if ((runningTransition ? node.tState : node.state) === 0) return;
541
- if ((runningTransition ? node.tState : node.state) === PENDING) return lookUpstream(node);
542
- if (node.suspense && untrack(node.suspense.inFallback)) return node.suspense.effects.push(node);
543
- const ancestors = [node];
544
- while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {
545
- if (runningTransition && Transition.disposed.has(node)) return;
546
- if (runningTransition ? node.tState : node.state) ancestors.push(node);
547
- }
548
- for (let i = ancestors.length - 1; i >= 0; i--) {
549
- node = ancestors[i];
550
- if (runningTransition) {
551
- let top = node, prev = ancestors[i + 1];
552
- while ((top = top.owner) && top !== prev) {
553
- if (Transition.disposed.has(top)) return;
554
- }
555
- }
556
- if ((runningTransition ? node.tState : node.state) === STALE) {
557
- updateComputation(node);
558
- } else if ((runningTransition ? node.tState : node.state) === PENDING) {
559
- const updates = Updates;
560
- Updates = null;
561
- runUpdates(() => lookUpstream(node, ancestors[0]), false);
562
- Updates = updates;
563
- }
564
- }
565
- }
566
- function runUpdates(fn, init) {
567
- if (Updates) return fn();
568
- let wait = false;
569
- if (!init) Updates = [];
570
- if (Effects) wait = true;
571
- else Effects = [];
572
- ExecCount++;
573
- try {
574
- const res = fn();
575
- completeUpdates(wait);
576
- return res;
577
- } catch (err) {
578
- if (!wait) Effects = null;
579
- Updates = null;
580
- handleError(err);
581
- }
582
- }
583
- function completeUpdates(wait) {
584
- if (Updates) {
585
- if (Scheduler && Transition && Transition.running) scheduleQueue(Updates);
586
- else runQueue(Updates);
587
- Updates = null;
588
- }
589
- if (wait) return;
590
- let res;
591
- if (Transition) {
592
- if (!Transition.promises.size && !Transition.queue.size) {
593
- const sources = Transition.sources;
594
- const disposed = Transition.disposed;
595
- Effects.push.apply(Effects, Transition.effects);
596
- res = Transition.resolve;
597
- for (const e2 of Effects) {
598
- "tState" in e2 && (e2.state = e2.tState);
599
- delete e2.tState;
600
- }
601
- Transition = null;
602
- runUpdates(() => {
603
- for (const d of disposed) cleanNode(d);
604
- for (const v of sources) {
605
- v.value = v.tValue;
606
- if (v.owned) {
607
- for (let i = 0, len = v.owned.length; i < len; i++) cleanNode(v.owned[i]);
608
- }
609
- if (v.tOwned) v.owned = v.tOwned;
610
- delete v.tValue;
611
- delete v.tOwned;
612
- v.tState = 0;
613
- }
614
- setTransPending(false);
615
- }, false);
616
- } else if (Transition.running) {
617
- Transition.running = false;
618
- Transition.effects.push.apply(Transition.effects, Effects);
619
- Effects = null;
620
- setTransPending(true);
621
- return;
622
- }
623
- }
624
- const e = Effects;
625
- Effects = null;
626
- if (e.length) runUpdates(() => runEffects(e), false);
627
- if (res) res();
628
- }
629
- function runQueue(queue) {
630
- for (let i = 0; i < queue.length; i++) runTop(queue[i]);
631
- }
632
- function scheduleQueue(queue) {
633
- for (let i = 0; i < queue.length; i++) {
634
- const item = queue[i];
635
- const tasks = Transition.queue;
636
- if (!tasks.has(item)) {
637
- tasks.add(item);
638
- Scheduler(() => {
639
- tasks.delete(item);
640
- runUpdates(() => {
641
- Transition.running = true;
642
- runTop(item);
643
- }, false);
644
- Transition && (Transition.running = false);
645
- });
646
- }
647
- }
648
- }
649
- function runUserEffects(queue) {
650
- let i, userLength = 0;
651
- for (i = 0; i < queue.length; i++) {
652
- const e = queue[i];
653
- if (!e.user) runTop(e);
654
- else queue[userLength++] = e;
655
- }
656
- if (sharedConfig.context) {
657
- if (sharedConfig.count) {
658
- sharedConfig.effects || (sharedConfig.effects = []);
659
- sharedConfig.effects.push(...queue.slice(0, userLength));
660
- return;
661
- }
662
- setHydrateContext();
663
- }
664
- if (sharedConfig.effects && (sharedConfig.done || !sharedConfig.count)) {
665
- queue = [...sharedConfig.effects, ...queue];
666
- userLength += sharedConfig.effects.length;
667
- delete sharedConfig.effects;
668
- }
669
- for (i = 0; i < userLength; i++) runTop(queue[i]);
670
- }
671
- function lookUpstream(node, ignore) {
672
- const runningTransition = Transition && Transition.running;
673
- if (runningTransition) node.tState = 0;
674
- else node.state = 0;
675
- for (let i = 0; i < node.sources.length; i += 1) {
676
- const source = node.sources[i];
677
- if (source.sources) {
678
- const state = runningTransition ? source.tState : source.state;
679
- if (state === STALE) {
680
- if (source !== ignore && (!source.updatedAt || source.updatedAt < ExecCount)) runTop(source);
681
- } else if (state === PENDING) lookUpstream(source, ignore);
682
- }
683
- }
684
- }
685
- function markDownstream(node) {
686
- const runningTransition = Transition && Transition.running;
687
- for (let i = 0; i < node.observers.length; i += 1) {
688
- const o = node.observers[i];
689
- if (runningTransition ? !o.tState : !o.state) {
690
- if (runningTransition) o.tState = PENDING;
691
- else o.state = PENDING;
692
- if (o.pure) Updates.push(o);
693
- else Effects.push(o);
694
- o.observers && markDownstream(o);
695
- }
696
- }
697
- }
698
- function cleanNode(node) {
699
- let i;
700
- if (node.sources) {
701
- while (node.sources.length) {
702
- const source = node.sources.pop(), index = node.sourceSlots.pop(), obs = source.observers;
703
- if (obs && obs.length) {
704
- const n = obs.pop(), s = source.observerSlots.pop();
705
- if (index < obs.length) {
706
- n.sourceSlots[s] = index;
707
- obs[index] = n;
708
- source.observerSlots[index] = s;
709
- }
710
- }
711
- }
712
- }
713
- if (node.tOwned) {
714
- for (i = node.tOwned.length - 1; i >= 0; i--) cleanNode(node.tOwned[i]);
715
- delete node.tOwned;
716
- }
717
- if (Transition && Transition.running && node.pure) {
718
- reset(node, true);
719
- } else if (node.owned) {
720
- for (i = node.owned.length - 1; i >= 0; i--) cleanNode(node.owned[i]);
721
- node.owned = null;
722
- }
723
- if (node.cleanups) {
724
- for (i = node.cleanups.length - 1; i >= 0; i--) node.cleanups[i]();
725
- node.cleanups = null;
726
- }
727
- if (Transition && Transition.running) node.tState = 0;
728
- else node.state = 0;
729
- }
730
- function reset(node, top) {
731
- if (!top) {
732
- node.tState = 0;
733
- Transition.disposed.add(node);
734
- }
735
- if (node.owned) {
736
- for (let i = 0; i < node.owned.length; i++) reset(node.owned[i]);
737
- }
738
- }
739
- function castError(err) {
740
- if (err instanceof Error) return err;
741
- return new Error(typeof err === "string" ? err : "Unknown error", {
742
- cause: err
743
- });
744
- }
745
- function runErrors(err, fns, owner) {
746
- try {
747
- for (const f of fns) f(err);
748
- } catch (e) {
749
- handleError(e, owner && owner.owner || null);
750
- }
751
- }
752
- function handleError(err, owner = Owner) {
753
- const fns = ERROR && owner && owner.context && owner.context[ERROR];
754
- const error = castError(err);
755
- if (!fns) throw error;
756
- if (Effects) Effects.push({
757
- fn() {
758
- runErrors(error, fns, owner);
759
- },
760
- state: STALE
761
- });
762
- else runErrors(error, fns, owner);
763
- }
764
- function resolveChildren(children2) {
765
- if (typeof children2 === "function" && !children2.length) return resolveChildren(children2());
766
- if (Array.isArray(children2)) {
767
- const results = [];
768
- for (let i = 0; i < children2.length; i++) {
769
- const result = resolveChildren(children2[i]);
770
- Array.isArray(result) ? results.push.apply(results, result) : results.push(result);
771
- }
772
- return results;
773
- }
774
- return children2;
775
- }
776
- function createProvider(id, options) {
777
- return function provider(props) {
778
- let res;
779
- createRenderEffect(() => res = untrack(() => {
780
- Owner.context = {
781
- ...Owner.context,
782
- [id]: props.value
783
- };
784
- return children(() => props.children);
785
- }), void 0);
786
- return res;
787
- };
788
- }
789
- var FALLBACK = /* @__PURE__ */ Symbol("fallback");
790
- function dispose(d) {
791
- for (let i = 0; i < d.length; i++) d[i]();
792
- }
793
- function mapArray(list, mapFn, options = {}) {
794
- let items = [], mapped = [], disposers = [], len = 0, indexes = mapFn.length > 1 ? [] : null;
795
- onCleanup(() => dispose(disposers));
796
- return () => {
797
- let newItems = list() || [], newLen = newItems.length, i, j;
798
- newItems[$TRACK];
799
- return untrack(() => {
800
- let newIndices, newIndicesNext, temp, tempdisposers, tempIndexes, start, end, newEnd, item;
801
- if (newLen === 0) {
802
- if (len !== 0) {
803
- dispose(disposers);
804
- disposers = [];
805
- items = [];
806
- mapped = [];
807
- len = 0;
808
- indexes && (indexes = []);
809
- }
810
- if (options.fallback) {
811
- items = [FALLBACK];
812
- mapped[0] = createRoot((disposer) => {
813
- disposers[0] = disposer;
814
- return options.fallback();
815
- });
816
- len = 1;
817
- }
818
- } else if (len === 0) {
819
- mapped = new Array(newLen);
820
- for (j = 0; j < newLen; j++) {
821
- items[j] = newItems[j];
822
- mapped[j] = createRoot(mapper);
823
- }
824
- len = newLen;
825
- } else {
826
- temp = new Array(newLen);
827
- tempdisposers = new Array(newLen);
828
- indexes && (tempIndexes = new Array(newLen));
829
- for (start = 0, end = Math.min(len, newLen); start < end && items[start] === newItems[start]; start++) ;
830
- for (end = len - 1, newEnd = newLen - 1; end >= start && newEnd >= start && items[end] === newItems[newEnd]; end--, newEnd--) {
831
- temp[newEnd] = mapped[end];
832
- tempdisposers[newEnd] = disposers[end];
833
- indexes && (tempIndexes[newEnd] = indexes[end]);
834
- }
835
- newIndices = /* @__PURE__ */ new Map();
836
- newIndicesNext = new Array(newEnd + 1);
837
- for (j = newEnd; j >= start; j--) {
838
- item = newItems[j];
839
- i = newIndices.get(item);
840
- newIndicesNext[j] = i === void 0 ? -1 : i;
841
- newIndices.set(item, j);
842
- }
843
- for (i = start; i <= end; i++) {
844
- item = items[i];
845
- j = newIndices.get(item);
846
- if (j !== void 0 && j !== -1) {
847
- temp[j] = mapped[i];
848
- tempdisposers[j] = disposers[i];
849
- indexes && (tempIndexes[j] = indexes[i]);
850
- j = newIndicesNext[j];
851
- newIndices.set(item, j);
852
- } else disposers[i]();
853
- }
854
- for (j = start; j < newLen; j++) {
855
- if (j in temp) {
856
- mapped[j] = temp[j];
857
- disposers[j] = tempdisposers[j];
858
- if (indexes) {
859
- indexes[j] = tempIndexes[j];
860
- indexes[j](j);
861
- }
862
- } else mapped[j] = createRoot(mapper);
863
- }
864
- mapped = mapped.slice(0, len = newLen);
865
- items = newItems.slice(0);
866
- }
867
- return mapped;
868
- });
869
- function mapper(disposer) {
870
- disposers[j] = disposer;
871
- if (indexes) {
872
- const [s, set] = createSignal(j);
873
- indexes[j] = set;
874
- return mapFn(newItems[j], s);
875
- }
876
- return mapFn(newItems[j]);
877
- }
878
- };
879
- }
880
- function indexArray(list, mapFn, options = {}) {
881
- let items = [], mapped = [], disposers = [], signals = [], len = 0, i;
882
- onCleanup(() => dispose(disposers));
883
- return () => {
884
- const newItems = list() || [], newLen = newItems.length;
885
- newItems[$TRACK];
886
- return untrack(() => {
887
- if (newLen === 0) {
888
- if (len !== 0) {
889
- dispose(disposers);
890
- disposers = [];
891
- items = [];
892
- mapped = [];
893
- len = 0;
894
- signals = [];
895
- }
896
- if (options.fallback) {
897
- items = [FALLBACK];
898
- mapped[0] = createRoot((disposer) => {
899
- disposers[0] = disposer;
900
- return options.fallback();
901
- });
902
- len = 1;
903
- }
904
- return mapped;
905
- }
906
- if (items[0] === FALLBACK) {
907
- disposers[0]();
908
- disposers = [];
909
- items = [];
910
- mapped = [];
911
- len = 0;
912
- }
913
- for (i = 0; i < newLen; i++) {
914
- if (i < items.length && items[i] !== newItems[i]) {
915
- signals[i](() => newItems[i]);
916
- } else if (i >= items.length) {
917
- mapped[i] = createRoot(mapper);
918
- }
919
- }
920
- for (; i < items.length; i++) {
921
- disposers[i]();
922
- }
923
- len = signals.length = disposers.length = newLen;
924
- items = newItems.slice(0);
925
- return mapped = mapped.slice(0, len);
926
- });
927
- function mapper(disposer) {
928
- disposers[i] = disposer;
929
- const [s, set] = createSignal(newItems[i]);
930
- signals[i] = set;
931
- return mapFn(s, i);
932
- }
933
- };
934
- }
935
- var hydrationEnabled = false;
936
- function createComponent(Comp, props) {
937
- if (hydrationEnabled) {
938
- if (sharedConfig.context) {
939
- const c = sharedConfig.context;
940
- setHydrateContext(nextHydrateContext());
941
- const r = untrack(() => Comp(props || {}));
942
- setHydrateContext(c);
943
- return r;
944
- }
945
- }
946
- return untrack(() => Comp(props || {}));
947
- }
948
- function trueFn() {
949
- return true;
950
- }
951
- var propTraps = {
952
- get(_, property, receiver) {
953
- if (property === $PROXY) return receiver;
954
- return _.get(property);
955
- },
956
- has(_, property) {
957
- if (property === $PROXY) return true;
958
- return _.has(property);
959
- },
960
- set: trueFn,
961
- deleteProperty: trueFn,
962
- getOwnPropertyDescriptor(_, property) {
963
- return {
964
- configurable: true,
965
- enumerable: true,
966
- get() {
967
- return _.get(property);
968
- },
969
- set: trueFn,
970
- deleteProperty: trueFn
971
- };
972
- },
973
- ownKeys(_) {
974
- return _.keys();
975
- }
976
- };
977
- function resolveSource(s) {
978
- return !(s = typeof s === "function" ? s() : s) ? {} : s;
979
- }
980
- function resolveSources() {
981
- for (let i = 0, length = this.length; i < length; ++i) {
982
- const v = this[i]();
983
- if (v !== void 0) return v;
984
- }
985
- }
986
- function mergeProps(...sources) {
987
- let proxy = false;
988
- for (let i = 0; i < sources.length; i++) {
989
- const s = sources[i];
990
- proxy = proxy || !!s && $PROXY in s;
991
- sources[i] = typeof s === "function" ? (proxy = true, createMemo(s)) : s;
992
- }
993
- if (SUPPORTS_PROXY && proxy) {
994
- return new Proxy({
995
- get(property) {
996
- for (let i = sources.length - 1; i >= 0; i--) {
997
- const v = resolveSource(sources[i])[property];
998
- if (v !== void 0) return v;
999
- }
1000
- },
1001
- has(property) {
1002
- for (let i = sources.length - 1; i >= 0; i--) {
1003
- if (property in resolveSource(sources[i])) return true;
1004
- }
1005
- return false;
1006
- },
1007
- keys() {
1008
- const keys = [];
1009
- for (let i = 0; i < sources.length; i++) keys.push(...Object.keys(resolveSource(sources[i])));
1010
- return [...new Set(keys)];
1011
- }
1012
- }, propTraps);
1013
- }
1014
- const sourcesMap = {};
1015
- const defined = /* @__PURE__ */ Object.create(null);
1016
- for (let i = sources.length - 1; i >= 0; i--) {
1017
- const source = sources[i];
1018
- if (!source) continue;
1019
- const sourceKeys = Object.getOwnPropertyNames(source);
1020
- for (let i2 = sourceKeys.length - 1; i2 >= 0; i2--) {
1021
- const key = sourceKeys[i2];
1022
- if (key === "__proto__" || key === "constructor") continue;
1023
- const desc = Object.getOwnPropertyDescriptor(source, key);
1024
- if (!defined[key]) {
1025
- defined[key] = desc.get ? {
1026
- enumerable: true,
1027
- configurable: true,
1028
- get: resolveSources.bind(sourcesMap[key] = [desc.get.bind(source)])
1029
- } : desc.value !== void 0 ? desc : void 0;
1030
- } else {
1031
- const sources2 = sourcesMap[key];
1032
- if (sources2) {
1033
- if (desc.get) sources2.push(desc.get.bind(source));
1034
- else if (desc.value !== void 0) sources2.push(() => desc.value);
1035
- }
1036
- }
1037
- }
1038
- }
1039
- const target = {};
1040
- const definedKeys = Object.keys(defined);
1041
- for (let i = definedKeys.length - 1; i >= 0; i--) {
1042
- const key = definedKeys[i], desc = defined[key];
1043
- if (desc && desc.get) Object.defineProperty(target, key, desc);
1044
- else target[key] = desc ? desc.value : void 0;
1045
- }
1046
- return target;
1047
- }
1048
- function splitProps(props, ...keys) {
1049
- const len = keys.length;
1050
- if (SUPPORTS_PROXY && $PROXY in props) {
1051
- const blocked = len > 1 ? keys.flat() : keys[0];
1052
- const res = keys.map((k) => {
1053
- return new Proxy({
1054
- get(property) {
1055
- return k.includes(property) ? props[property] : void 0;
1056
- },
1057
- has(property) {
1058
- return k.includes(property) && property in props;
1059
- },
1060
- keys() {
1061
- return k.filter((property) => property in props);
1062
- }
1063
- }, propTraps);
1064
- });
1065
- res.push(new Proxy({
1066
- get(property) {
1067
- return blocked.includes(property) ? void 0 : props[property];
1068
- },
1069
- has(property) {
1070
- return blocked.includes(property) ? false : property in props;
1071
- },
1072
- keys() {
1073
- return Object.keys(props).filter((k) => !blocked.includes(k));
1074
- }
1075
- }, propTraps));
1076
- return res;
1077
- }
1078
- const objects = [];
1079
- for (let i = 0; i <= len; i++) {
1080
- objects[i] = {};
1081
- }
1082
- for (const propName of Object.getOwnPropertyNames(props)) {
1083
- let keyIndex = len;
1084
- for (let i = 0; i < keys.length; i++) {
1085
- if (keys[i].includes(propName)) {
1086
- keyIndex = i;
1087
- break;
1088
- }
1089
- }
1090
- const desc = Object.getOwnPropertyDescriptor(props, propName);
1091
- const isDefaultDesc = !desc.get && !desc.set && desc.enumerable && desc.writable && desc.configurable;
1092
- isDefaultDesc ? objects[keyIndex][propName] = desc.value : Object.defineProperty(objects[keyIndex], propName, desc);
1093
- }
1094
- return objects;
1095
- }
1096
- function lazy(fn) {
1097
- let comp;
1098
- let p;
1099
- const wrap = (props) => {
1100
- const ctx = sharedConfig.context;
1101
- if (ctx) {
1102
- const [s, set] = createSignal();
1103
- sharedConfig.count || (sharedConfig.count = 0);
1104
- sharedConfig.count++;
1105
- (p || (p = fn())).then((mod) => {
1106
- !sharedConfig.done && setHydrateContext(ctx);
1107
- sharedConfig.count--;
1108
- set(() => mod.default);
1109
- setHydrateContext();
1110
- });
1111
- comp = s;
1112
- } else if (!comp) {
1113
- const [s] = createResource(() => (p || (p = fn())).then((mod) => mod.default));
1114
- comp = s;
1115
- }
1116
- let Comp;
1117
- return createMemo(() => (Comp = comp()) ? untrack(() => {
1118
- if (IS_DEV) ;
1119
- if (!ctx || sharedConfig.done) return Comp(props);
1120
- const c = sharedConfig.context;
1121
- setHydrateContext(ctx);
1122
- const r = Comp(props);
1123
- setHydrateContext(c);
1124
- return r;
1125
- }) : "");
1126
- };
1127
- wrap.preload = () => p || ((p = fn()).then((mod) => comp = () => mod.default), p);
1128
- return wrap;
1129
- }
1130
- var counter = 0;
1131
- function createUniqueId() {
1132
- const ctx = sharedConfig.context;
1133
- return ctx ? sharedConfig.getNextContextId() : `cl-${counter++}`;
1134
- }
1135
- var narrowedError = (name) => `Stale read from <${name}>.`;
1136
- function For(props) {
1137
- const fallback = "fallback" in props && {
1138
- fallback: () => props.fallback
1139
- };
1140
- return createMemo(mapArray(() => props.each, props.children, fallback || void 0));
1141
- }
1142
- function Index(props) {
1143
- const fallback = "fallback" in props && {
1144
- fallback: () => props.fallback
1145
- };
1146
- return createMemo(indexArray(() => props.each, props.children, fallback || void 0));
1147
- }
1148
- function Show(props) {
1149
- const keyed = props.keyed;
1150
- const conditionValue = createMemo(() => props.when, void 0, void 0);
1151
- const condition = keyed ? conditionValue : createMemo(conditionValue, void 0, {
1152
- equals: (a, b) => !a === !b
1153
- });
1154
- return createMemo(() => {
1155
- const c = condition();
1156
- if (c) {
1157
- const child = props.children;
1158
- const fn = typeof child === "function" && child.length > 0;
1159
- return fn ? untrack(() => child(keyed ? c : () => {
1160
- if (!untrack(condition)) throw narrowedError("Show");
1161
- return conditionValue();
1162
- })) : child;
1163
- }
1164
- return props.fallback;
1165
- }, void 0, void 0);
1166
- }
1167
- function Switch(props) {
1168
- const chs = children(() => props.children);
1169
- const switchFunc = createMemo(() => {
1170
- const ch = chs();
1171
- const mps = Array.isArray(ch) ? ch : [ch];
1172
- let func = () => void 0;
1173
- for (let i = 0; i < mps.length; i++) {
1174
- const index = i;
1175
- const mp = mps[i];
1176
- const prevFunc = func;
1177
- const conditionValue = createMemo(() => prevFunc() ? void 0 : mp.when, void 0, void 0);
1178
- const condition = mp.keyed ? conditionValue : createMemo(conditionValue, void 0, {
1179
- equals: (a, b) => !a === !b
1180
- });
1181
- func = () => prevFunc() || (condition() ? [index, conditionValue, mp] : void 0);
1182
- }
1183
- return func;
1184
- });
1185
- return createMemo(() => {
1186
- const sel = switchFunc()();
1187
- if (!sel) return props.fallback;
1188
- const [index, conditionValue, mp] = sel;
1189
- const child = mp.children;
1190
- const fn = typeof child === "function" && child.length > 0;
1191
- return fn ? untrack(() => child(mp.keyed ? conditionValue() : () => {
1192
- if (untrack(switchFunc)()?.[0] !== index) throw narrowedError("Match");
1193
- return conditionValue();
1194
- })) : child;
1195
- }, void 0, void 0);
1196
- }
1197
- function Match(props) {
1198
- return props;
1199
- }
1200
- var DEV = void 0;
1201
-
1202
- // ../../node_modules/.pnpm/solid-js@1.9.12/node_modules/solid-js/web/dist/web.js
1203
- var booleans = [
1204
- "allowfullscreen",
1205
- "async",
1206
- "alpha",
1207
- "autofocus",
1208
- "autoplay",
1209
- "checked",
1210
- "controls",
1211
- "default",
1212
- "disabled",
1213
- "formnovalidate",
1214
- "hidden",
1215
- "indeterminate",
1216
- "inert",
1217
- "ismap",
1218
- "loop",
1219
- "multiple",
1220
- "muted",
1221
- "nomodule",
1222
- "novalidate",
1223
- "open",
1224
- "playsinline",
1225
- "readonly",
1226
- "required",
1227
- "reversed",
1228
- "seamless",
1229
- "selected",
1230
- "adauctionheaders",
1231
- "browsingtopics",
1232
- "credentialless",
1233
- "defaultchecked",
1234
- "defaultmuted",
1235
- "defaultselected",
1236
- "defer",
1237
- "disablepictureinpicture",
1238
- "disableremoteplayback",
1239
- "preservespitch",
1240
- "shadowrootclonable",
1241
- "shadowrootcustomelementregistry",
1242
- "shadowrootdelegatesfocus",
1243
- "shadowrootserializable",
1244
- "sharedstoragewritable"
1245
- ];
1246
- var Properties = /* @__PURE__ */ new Set([
1247
- "className",
1248
- "value",
1249
- "readOnly",
1250
- "noValidate",
1251
- "formNoValidate",
1252
- "isMap",
1253
- "noModule",
1254
- "playsInline",
1255
- "adAuctionHeaders",
1256
- "allowFullscreen",
1257
- "browsingTopics",
1258
- "defaultChecked",
1259
- "defaultMuted",
1260
- "defaultSelected",
1261
- "disablePictureInPicture",
1262
- "disableRemotePlayback",
1263
- "preservesPitch",
1264
- "shadowRootClonable",
1265
- "shadowRootCustomElementRegistry",
1266
- "shadowRootDelegatesFocus",
1267
- "shadowRootSerializable",
1268
- "sharedStorageWritable",
1269
- ...booleans
1270
- ]);
1271
- var ChildProperties = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]);
1272
- var Aliases = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
1273
- className: "class",
1274
- htmlFor: "for"
1275
- });
1276
- var PropAliases = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
1277
- class: "className",
1278
- novalidate: {
1279
- $: "noValidate",
1280
- FORM: 1
1281
- },
1282
- formnovalidate: {
1283
- $: "formNoValidate",
1284
- BUTTON: 1,
1285
- INPUT: 1
1286
- },
1287
- ismap: {
1288
- $: "isMap",
1289
- IMG: 1
1290
- },
1291
- nomodule: {
1292
- $: "noModule",
1293
- SCRIPT: 1
1294
- },
1295
- playsinline: {
1296
- $: "playsInline",
1297
- VIDEO: 1
1298
- },
1299
- readonly: {
1300
- $: "readOnly",
1301
- INPUT: 1,
1302
- TEXTAREA: 1
1303
- },
1304
- adauctionheaders: {
1305
- $: "adAuctionHeaders",
1306
- IFRAME: 1
1307
- },
1308
- allowfullscreen: {
1309
- $: "allowFullscreen",
1310
- IFRAME: 1
1311
- },
1312
- browsingtopics: {
1313
- $: "browsingTopics",
1314
- IMG: 1
1315
- },
1316
- defaultchecked: {
1317
- $: "defaultChecked",
1318
- INPUT: 1
1319
- },
1320
- defaultmuted: {
1321
- $: "defaultMuted",
1322
- AUDIO: 1,
1323
- VIDEO: 1
1324
- },
1325
- defaultselected: {
1326
- $: "defaultSelected",
1327
- OPTION: 1
1328
- },
1329
- disablepictureinpicture: {
1330
- $: "disablePictureInPicture",
1331
- VIDEO: 1
1332
- },
1333
- disableremoteplayback: {
1334
- $: "disableRemotePlayback",
1335
- AUDIO: 1,
1336
- VIDEO: 1
1337
- },
1338
- preservespitch: {
1339
- $: "preservesPitch",
1340
- AUDIO: 1,
1341
- VIDEO: 1
1342
- },
1343
- shadowrootclonable: {
1344
- $: "shadowRootClonable",
1345
- TEMPLATE: 1
1346
- },
1347
- shadowrootdelegatesfocus: {
1348
- $: "shadowRootDelegatesFocus",
1349
- TEMPLATE: 1
1350
- },
1351
- shadowrootserializable: {
1352
- $: "shadowRootSerializable",
1353
- TEMPLATE: 1
1354
- },
1355
- sharedstoragewritable: {
1356
- $: "sharedStorageWritable",
1357
- IFRAME: 1,
1358
- IMG: 1
1359
- }
1360
- });
1361
- function getPropAlias(prop, tagName) {
1362
- const a = PropAliases[prop];
1363
- return typeof a === "object" ? a[tagName] ? a["$"] : void 0 : a;
1364
- }
1365
- var DelegatedEvents = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]);
1366
- var SVGElements = /* @__PURE__ */ new Set([
1367
- "altGlyph",
1368
- "altGlyphDef",
1369
- "altGlyphItem",
1370
- "animate",
1371
- "animateColor",
1372
- "animateMotion",
1373
- "animateTransform",
1374
- "circle",
1375
- "clipPath",
1376
- "color-profile",
1377
- "cursor",
1378
- "defs",
1379
- "desc",
1380
- "ellipse",
1381
- "feBlend",
1382
- "feColorMatrix",
1383
- "feComponentTransfer",
1384
- "feComposite",
1385
- "feConvolveMatrix",
1386
- "feDiffuseLighting",
1387
- "feDisplacementMap",
1388
- "feDistantLight",
1389
- "feDropShadow",
1390
- "feFlood",
1391
- "feFuncA",
1392
- "feFuncB",
1393
- "feFuncG",
1394
- "feFuncR",
1395
- "feGaussianBlur",
1396
- "feImage",
1397
- "feMerge",
1398
- "feMergeNode",
1399
- "feMorphology",
1400
- "feOffset",
1401
- "fePointLight",
1402
- "feSpecularLighting",
1403
- "feSpotLight",
1404
- "feTile",
1405
- "feTurbulence",
1406
- "filter",
1407
- "font",
1408
- "font-face",
1409
- "font-face-format",
1410
- "font-face-name",
1411
- "font-face-src",
1412
- "font-face-uri",
1413
- "foreignObject",
1414
- "g",
1415
- "glyph",
1416
- "glyphRef",
1417
- "hkern",
1418
- "image",
1419
- "line",
1420
- "linearGradient",
1421
- "marker",
1422
- "mask",
1423
- "metadata",
1424
- "missing-glyph",
1425
- "mpath",
1426
- "path",
1427
- "pattern",
1428
- "polygon",
1429
- "polyline",
1430
- "radialGradient",
1431
- "rect",
1432
- "set",
1433
- "stop",
1434
- "svg",
1435
- "switch",
1436
- "symbol",
1437
- "text",
1438
- "textPath",
1439
- "tref",
1440
- "tspan",
1441
- "use",
1442
- "view",
1443
- "vkern"
1444
- ]);
1445
- var SVGNamespace = {
1446
- xlink: "http://www.w3.org/1999/xlink",
1447
- xml: "http://www.w3.org/XML/1998/namespace"
1448
- };
1449
- var memo = (fn) => createMemo(() => fn());
1450
- function reconcileArrays(parentNode, a, b) {
1451
- let bLength = b.length, aEnd = a.length, bEnd = bLength, aStart = 0, bStart = 0, after = a[aEnd - 1].nextSibling, map = null;
1452
- while (aStart < aEnd || bStart < bEnd) {
1453
- if (a[aStart] === b[bStart]) {
1454
- aStart++;
1455
- bStart++;
1456
- continue;
1457
- }
1458
- while (a[aEnd - 1] === b[bEnd - 1]) {
1459
- aEnd--;
1460
- bEnd--;
1461
- }
1462
- if (aEnd === aStart) {
1463
- const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after;
1464
- while (bStart < bEnd) parentNode.insertBefore(b[bStart++], node);
1465
- } else if (bEnd === bStart) {
1466
- while (aStart < aEnd) {
1467
- if (!map || !map.has(a[aStart])) a[aStart].remove();
1468
- aStart++;
1469
- }
1470
- } else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) {
1471
- const node = a[--aEnd].nextSibling;
1472
- parentNode.insertBefore(b[bStart++], a[aStart++].nextSibling);
1473
- parentNode.insertBefore(b[--bEnd], node);
1474
- a[aEnd] = b[bEnd];
1475
- } else {
1476
- if (!map) {
1477
- map = /* @__PURE__ */ new Map();
1478
- let i = bStart;
1479
- while (i < bEnd) map.set(b[i], i++);
1480
- }
1481
- const index = map.get(a[aStart]);
1482
- if (index != null) {
1483
- if (bStart < index && index < bEnd) {
1484
- let i = aStart, sequence = 1, t;
1485
- while (++i < aEnd && i < bEnd) {
1486
- if ((t = map.get(a[i])) == null || t !== index + sequence) break;
1487
- sequence++;
1488
- }
1489
- if (sequence > index - bStart) {
1490
- const node = a[aStart];
1491
- while (bStart < index) parentNode.insertBefore(b[bStart++], node);
1492
- } else parentNode.replaceChild(b[bStart++], a[aStart++]);
1493
- } else aStart++;
1494
- } else a[aStart++].remove();
1495
- }
1496
- }
1497
- }
1498
- var $$EVENTS = "_$DX_DELEGATE";
1499
- function render(code, element, init, options = {}) {
1500
- let disposer;
1501
- createRoot((dispose2) => {
1502
- disposer = dispose2;
1503
- element === document ? code() : insert(element, code(), element.firstChild ? null : void 0, init);
1504
- }, options.owner);
1505
- return () => {
1506
- disposer();
1507
- element.textContent = "";
1508
- };
1509
- }
1510
- function template(html, isImportNode, isSVG, isMathML) {
1511
- let node;
1512
- const create = () => {
1513
- const t = isMathML ? document.createElementNS("http://www.w3.org/1998/Math/MathML", "template") : document.createElement("template");
1514
- t.innerHTML = html;
1515
- return isSVG ? t.content.firstChild.firstChild : isMathML ? t.firstChild : t.content.firstChild;
1516
- };
1517
- const fn = isImportNode ? () => untrack(() => document.importNode(node || (node = create()), true)) : () => (node || (node = create())).cloneNode(true);
1518
- fn.cloneNode = fn;
1519
- return fn;
1520
- }
1521
- function delegateEvents(eventNames, document2 = window.document) {
1522
- const e = document2[$$EVENTS] || (document2[$$EVENTS] = /* @__PURE__ */ new Set());
1523
- for (let i = 0, l = eventNames.length; i < l; i++) {
1524
- const name = eventNames[i];
1525
- if (!e.has(name)) {
1526
- e.add(name);
1527
- document2.addEventListener(name, eventHandler);
1528
- }
1529
- }
1530
- }
1531
- function clearDelegatedEvents(document2 = window.document) {
1532
- if (document2[$$EVENTS]) {
1533
- for (let name of document2[$$EVENTS].keys()) document2.removeEventListener(name, eventHandler);
1534
- delete document2[$$EVENTS];
1535
- }
1536
- }
1537
- function setAttribute(node, name, value) {
1538
- if (isHydrating(node)) return;
1539
- if (value == null) node.removeAttribute(name);
1540
- else node.setAttribute(name, value);
1541
- }
1542
- function setAttributeNS(node, namespace, name, value) {
1543
- if (isHydrating(node)) return;
1544
- if (value == null) node.removeAttributeNS(namespace, name);
1545
- else node.setAttributeNS(namespace, name, value);
1546
- }
1547
- function setBoolAttribute(node, name, value) {
1548
- if (isHydrating(node)) return;
1549
- value ? node.setAttribute(name, "") : node.removeAttribute(name);
1550
- }
1551
- function className(node, value) {
1552
- if (isHydrating(node)) return;
1553
- if (value == null) node.removeAttribute("class");
1554
- else node.className = value;
1555
- }
1556
- function addEventListener(node, name, handler, delegate) {
1557
- if (delegate) {
1558
- if (Array.isArray(handler)) {
1559
- node[`$$${name}`] = handler[0];
1560
- node[`$$${name}Data`] = handler[1];
1561
- } else node[`$$${name}`] = handler;
1562
- } else if (Array.isArray(handler)) {
1563
- const handlerFn = handler[0];
1564
- node.addEventListener(name, handler[0] = (e) => handlerFn.call(node, handler[1], e));
1565
- } else node.addEventListener(name, handler, typeof handler !== "function" && handler);
1566
- }
1567
- function classList(node, value, prev = {}) {
1568
- const classKeys = Object.keys(value || {}), prevKeys = Object.keys(prev);
1569
- let i, len;
1570
- for (i = 0, len = prevKeys.length; i < len; i++) {
1571
- const key = prevKeys[i];
1572
- if (!key || key === "undefined" || value[key]) continue;
1573
- toggleClassKey(node, key, false);
1574
- delete prev[key];
1575
- }
1576
- for (i = 0, len = classKeys.length; i < len; i++) {
1577
- const key = classKeys[i], classValue = !!value[key];
1578
- if (!key || key === "undefined" || prev[key] === classValue || !classValue) continue;
1579
- toggleClassKey(node, key, true);
1580
- prev[key] = classValue;
1581
- }
1582
- return prev;
1583
- }
1584
- function style(node, value, prev) {
1585
- if (!value) return prev ? setAttribute(node, "style") : value;
1586
- const nodeStyle = node.style;
1587
- if (typeof value === "string") return nodeStyle.cssText = value;
1588
- typeof prev === "string" && (nodeStyle.cssText = prev = void 0);
1589
- prev || (prev = {});
1590
- value || (value = {});
1591
- let v, s;
1592
- for (s in prev) {
1593
- value[s] == null && nodeStyle.removeProperty(s);
1594
- delete prev[s];
1595
- }
1596
- for (s in value) {
1597
- v = value[s];
1598
- if (v !== prev[s]) {
1599
- nodeStyle.setProperty(s, v);
1600
- prev[s] = v;
1601
- }
1602
- }
1603
- return prev;
1604
- }
1605
- function setStyleProperty(node, name, value) {
1606
- value != null ? node.style.setProperty(name, value) : node.style.removeProperty(name);
1607
- }
1608
- function spread(node, props = {}, isSVG, skipChildren) {
1609
- const prevProps = {};
1610
- if (!skipChildren) {
1611
- createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
1612
- }
1613
- createRenderEffect(() => typeof props.ref === "function" && use(props.ref, node));
1614
- createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
1615
- return prevProps;
1616
- }
1617
- function use(fn, element, arg) {
1618
- return untrack(() => fn(element, arg));
1619
- }
1620
- function insert(parent, accessor, marker, initial) {
1621
- if (marker !== void 0 && !initial) initial = [];
1622
- if (typeof accessor !== "function") return insertExpression(parent, accessor, initial, marker);
1623
- createRenderEffect((current) => insertExpression(parent, accessor(), current, marker), initial);
1624
- }
1625
- function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {
1626
- props || (props = {});
1627
- for (const prop in prevProps) {
1628
- if (!(prop in props)) {
1629
- if (prop === "children") continue;
1630
- prevProps[prop] = assignProp(node, prop, null, prevProps[prop], isSVG, skipRef, props);
1631
- }
1632
- }
1633
- for (const prop in props) {
1634
- if (prop === "children") {
1635
- continue;
1636
- }
1637
- const value = props[prop];
1638
- prevProps[prop] = assignProp(node, prop, value, prevProps[prop], isSVG, skipRef, props);
1639
- }
1640
- }
1641
- function getNextElement(template2) {
1642
- let node, key, hydrating = isHydrating();
1643
- if (!hydrating || !(node = sharedConfig.registry.get(key = getHydrationKey()))) {
1644
- return template2();
1645
- }
1646
- if (sharedConfig.completed) sharedConfig.completed.add(node);
1647
- sharedConfig.registry.delete(key);
1648
- return node;
1649
- }
1650
- function isHydrating(node) {
1651
- return !!sharedConfig.context && !sharedConfig.done && (!node || node.isConnected);
1652
- }
1653
- function toPropertyName(name) {
1654
- return name.toLowerCase().replace(/-([a-z])/g, (_, w) => w.toUpperCase());
1655
- }
1656
- function toggleClassKey(node, key, value) {
1657
- const classNames = key.trim().split(/\s+/);
1658
- for (let i = 0, nameLen = classNames.length; i < nameLen; i++) node.classList.toggle(classNames[i], value);
1659
- }
1660
- function assignProp(node, prop, value, prev, isSVG, skipRef, props) {
1661
- let isCE, isProp, isChildProp, propAlias, forceProp;
1662
- if (prop === "style") return style(node, value, prev);
1663
- if (prop === "classList") return classList(node, value, prev);
1664
- if (value === prev) return prev;
1665
- if (prop === "ref") {
1666
- if (!skipRef) value(node);
1667
- } else if (prop.slice(0, 3) === "on:") {
1668
- const e = prop.slice(3);
1669
- prev && node.removeEventListener(e, prev, typeof prev !== "function" && prev);
1670
- value && node.addEventListener(e, value, typeof value !== "function" && value);
1671
- } else if (prop.slice(0, 10) === "oncapture:") {
1672
- const e = prop.slice(10);
1673
- prev && node.removeEventListener(e, prev, true);
1674
- value && node.addEventListener(e, value, true);
1675
- } else if (prop.slice(0, 2) === "on") {
1676
- const name = prop.slice(2).toLowerCase();
1677
- const delegate = DelegatedEvents.has(name);
1678
- if (!delegate && prev) {
1679
- const h = Array.isArray(prev) ? prev[0] : prev;
1680
- node.removeEventListener(name, h);
1681
- }
1682
- if (delegate || value) {
1683
- addEventListener(node, name, value, delegate);
1684
- delegate && delegateEvents([name]);
1685
- }
1686
- } else if (prop.slice(0, 5) === "attr:") {
1687
- setAttribute(node, prop.slice(5), value);
1688
- } else if (prop.slice(0, 5) === "bool:") {
1689
- setBoolAttribute(node, prop.slice(5), value);
1690
- } else if ((forceProp = prop.slice(0, 5) === "prop:") || (isChildProp = ChildProperties.has(prop)) || !isSVG && ((propAlias = getPropAlias(prop, node.tagName)) || (isProp = Properties.has(prop))) || (isCE = node.nodeName.includes("-") || "is" in props)) {
1691
- if (forceProp) {
1692
- prop = prop.slice(5);
1693
- isProp = true;
1694
- } else if (isHydrating(node)) return value;
1695
- if (prop === "class" || prop === "className") className(node, value);
1696
- else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;
1697
- else node[propAlias || prop] = value;
1698
- } else {
1699
- const ns = isSVG && prop.indexOf(":") > -1 && SVGNamespace[prop.split(":")[0]];
1700
- if (ns) setAttributeNS(node, ns, prop, value);
1701
- else setAttribute(node, Aliases[prop] || prop, value);
1702
- }
1703
- return value;
1704
- }
1705
- function eventHandler(e) {
1706
- if (sharedConfig.registry && sharedConfig.events) {
1707
- if (sharedConfig.events.find(([el, ev]) => ev === e)) return;
1708
- }
1709
- let node = e.target;
1710
- const key = `$$${e.type}`;
1711
- const oriTarget = e.target;
1712
- const oriCurrentTarget = e.currentTarget;
1713
- const retarget = (value) => Object.defineProperty(e, "target", {
1714
- configurable: true,
1715
- value
1716
- });
1717
- const handleNode = () => {
1718
- const handler = node[key];
1719
- if (handler && !node.disabled) {
1720
- const data = node[`${key}Data`];
1721
- data !== void 0 ? handler.call(node, data, e) : handler.call(node, e);
1722
- if (e.cancelBubble) return;
1723
- }
1724
- node.host && typeof node.host !== "string" && !node.host._$host && node.contains(e.target) && retarget(node.host);
1725
- return true;
1726
- };
1727
- const walkUpTree = () => {
1728
- while (handleNode() && (node = node._$host || node.parentNode || node.host)) ;
1729
- };
1730
- Object.defineProperty(e, "currentTarget", {
1731
- configurable: true,
1732
- get() {
1733
- return node || document;
1734
- }
1735
- });
1736
- if (sharedConfig.registry && !sharedConfig.done) sharedConfig.done = _$HY.done = true;
1737
- if (e.composedPath) {
1738
- const path = e.composedPath();
1739
- retarget(path[0]);
1740
- for (let i = 0; i < path.length - 2; i++) {
1741
- node = path[i];
1742
- if (!handleNode()) break;
1743
- if (node._$host) {
1744
- node = node._$host;
1745
- walkUpTree();
1746
- break;
1747
- }
1748
- if (node.parentNode === oriCurrentTarget) {
1749
- break;
1750
- }
1751
- }
1752
- } else walkUpTree();
1753
- retarget(oriTarget);
1754
- }
1755
- function insertExpression(parent, value, current, marker, unwrapArray) {
1756
- const hydrating = isHydrating(parent);
1757
- if (hydrating) {
1758
- !current && (current = [...parent.childNodes]);
1759
- let cleaned = [];
1760
- for (let i = 0; i < current.length; i++) {
1761
- const node = current[i];
1762
- if (node.nodeType === 8 && node.data.slice(0, 2) === "!$") node.remove();
1763
- else cleaned.push(node);
1764
- }
1765
- current = cleaned;
1766
- }
1767
- while (typeof current === "function") current = current();
1768
- if (value === current) return current;
1769
- const t = typeof value, multi = marker !== void 0;
1770
- parent = multi && current[0] && current[0].parentNode || parent;
1771
- if (t === "string" || t === "number") {
1772
- if (hydrating) return current;
1773
- if (t === "number") {
1774
- value = value.toString();
1775
- if (value === current) return current;
1776
- }
1777
- if (multi) {
1778
- let node = current[0];
1779
- if (node && node.nodeType === 3) {
1780
- node.data !== value && (node.data = value);
1781
- } else node = document.createTextNode(value);
1782
- current = cleanChildren(parent, current, marker, node);
1783
- } else {
1784
- if (current !== "" && typeof current === "string") {
1785
- current = parent.firstChild.data = value;
1786
- } else current = parent.textContent = value;
1787
- }
1788
- } else if (value == null || t === "boolean") {
1789
- if (hydrating) return current;
1790
- current = cleanChildren(parent, current, marker);
1791
- } else if (t === "function") {
1792
- createRenderEffect(() => {
1793
- let v = value();
1794
- while (typeof v === "function") v = v();
1795
- current = insertExpression(parent, v, current, marker);
1796
- });
1797
- return () => current;
1798
- } else if (Array.isArray(value)) {
1799
- const array = [];
1800
- const currentArray = current && Array.isArray(current);
1801
- if (normalizeIncomingArray(array, value, current, unwrapArray)) {
1802
- createRenderEffect(() => current = insertExpression(parent, array, current, marker, true));
1803
- return () => current;
1804
- }
1805
- if (hydrating) {
1806
- if (!array.length) return current;
1807
- if (marker === void 0) return current = [...parent.childNodes];
1808
- let node = array[0];
1809
- if (node.parentNode !== parent) return current;
1810
- const nodes = [node];
1811
- while ((node = node.nextSibling) !== marker) nodes.push(node);
1812
- return current = nodes;
1813
- }
1814
- if (array.length === 0) {
1815
- current = cleanChildren(parent, current, marker);
1816
- if (multi) return current;
1817
- } else if (currentArray) {
1818
- if (current.length === 0) {
1819
- appendNodes(parent, array, marker);
1820
- } else reconcileArrays(parent, current, array);
1821
- } else {
1822
- current && cleanChildren(parent);
1823
- appendNodes(parent, array);
1824
- }
1825
- current = array;
1826
- } else if (value.nodeType) {
1827
- if (hydrating && value.parentNode) return current = multi ? [value] : value;
1828
- if (Array.isArray(current)) {
1829
- if (multi) return current = cleanChildren(parent, current, marker, value);
1830
- cleanChildren(parent, current, null, value);
1831
- } else if (current == null || current === "" || !parent.firstChild) {
1832
- parent.appendChild(value);
1833
- } else parent.replaceChild(value, parent.firstChild);
1834
- current = value;
1835
- } else ;
1836
- return current;
1837
- }
1838
- function normalizeIncomingArray(normalized, array, current, unwrap) {
1839
- let dynamic = false;
1840
- for (let i = 0, len = array.length; i < len; i++) {
1841
- let item = array[i], prev = current && current[normalized.length], t;
1842
- if (item == null || item === true || item === false) ;
1843
- else if ((t = typeof item) === "object" && item.nodeType) {
1844
- normalized.push(item);
1845
- } else if (Array.isArray(item)) {
1846
- dynamic = normalizeIncomingArray(normalized, item, prev) || dynamic;
1847
- } else if (t === "function") {
1848
- if (unwrap) {
1849
- while (typeof item === "function") item = item();
1850
- dynamic = normalizeIncomingArray(normalized, Array.isArray(item) ? item : [item], Array.isArray(prev) ? prev : [prev]) || dynamic;
1851
- } else {
1852
- normalized.push(item);
1853
- dynamic = true;
1854
- }
1855
- } else {
1856
- const value = String(item);
1857
- if (prev && prev.nodeType === 3 && prev.data === value) normalized.push(prev);
1858
- else normalized.push(document.createTextNode(value));
1859
- }
1860
- }
1861
- return dynamic;
1862
- }
1863
- function appendNodes(parent, array, marker = null) {
1864
- for (let i = 0, len = array.length; i < len; i++) parent.insertBefore(array[i], marker);
1865
- }
1866
- function cleanChildren(parent, current, marker, replacement) {
1867
- if (marker === void 0) return parent.textContent = "";
1868
- const node = replacement || document.createTextNode("");
1869
- if (current.length) {
1870
- let inserted = false;
1871
- for (let i = current.length - 1; i >= 0; i--) {
1872
- const el = current[i];
1873
- if (node !== el) {
1874
- const isParent = el.parentNode === parent;
1875
- if (!inserted && !i) isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);
1876
- else isParent && el.remove();
1877
- } else inserted = true;
1878
- }
1879
- } else parent.insertBefore(node, marker);
1880
- return [node];
1881
- }
1882
- function getHydrationKey() {
1883
- return sharedConfig.getNextContextId();
1884
- }
1885
- var isServer = false;
1886
- var SVG_NAMESPACE = "http://www.w3.org/2000/svg";
1887
- function createElement(tagName, isSVG = false, is = void 0) {
1888
- return isSVG ? document.createElementNS(SVG_NAMESPACE, tagName) : document.createElement(tagName, {
1889
- is
1890
- });
1891
- }
1892
- function Portal(props) {
1893
- const {
1894
- useShadow
1895
- } = props, marker = document.createTextNode(""), mount = () => props.mount || document.body, owner = getOwner();
1896
- let content;
1897
- let hydrating = !!sharedConfig.context;
1898
- createEffect(() => {
1899
- if (hydrating) getOwner().user = hydrating = false;
1900
- content || (content = runWithOwner(owner, () => createMemo(() => props.children)));
1901
- const el = mount();
1902
- if (el instanceof HTMLHeadElement) {
1903
- const [clean, setClean] = createSignal(false);
1904
- const cleanup = () => setClean(true);
1905
- createRoot((dispose2) => insert(el, () => !clean() ? content() : dispose2(), null));
1906
- onCleanup(cleanup);
1907
- } else {
1908
- const container = createElement(props.isSVG ? "g" : "div", props.isSVG), renderRoot = useShadow && container.attachShadow ? container.attachShadow({
1909
- mode: "open"
1910
- }) : container;
1911
- Object.defineProperty(container, "_$host", {
1912
- get() {
1913
- return marker.parentNode;
1914
- },
1915
- configurable: true
1916
- });
1917
- insert(renderRoot, content);
1918
- el.appendChild(container);
1919
- props.ref && props.ref(container);
1920
- onCleanup(() => el.removeChild(container));
1921
- }
1922
- }, void 0, {
1923
- render: !hydrating
1924
- });
1925
- return marker;
1926
- }
1927
- function createDynamic(component, props) {
1928
- const cached = createMemo(component);
1929
- return createMemo(() => {
1930
- const component2 = cached();
1931
- switch (typeof component2) {
1932
- case "function":
1933
- return untrack(() => component2(props));
1934
- case "string":
1935
- const isSvg = SVGElements.has(component2);
1936
- const el = sharedConfig.context ? getNextElement() : createElement(component2, isSvg, untrack(() => props.is));
1937
- spread(el, props, isSvg);
1938
- return el;
1939
- }
1940
- });
1941
- }
1942
- function Dynamic(props) {
1943
- const [, others] = splitProps(props, ["component"]);
1944
- return createDynamic(() => props.component, others);
1945
- }
1946
-
1947
- // ../../node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/double-indexed-kv.js
1948
- var DoubleIndexedKV = class {
1949
- constructor() {
1950
- this.keyToValue = /* @__PURE__ */ new Map();
1951
- this.valueToKey = /* @__PURE__ */ new Map();
1952
- }
1953
- set(key, value) {
1954
- this.keyToValue.set(key, value);
1955
- this.valueToKey.set(value, key);
1956
- }
1957
- getByKey(key) {
1958
- return this.keyToValue.get(key);
1959
- }
1960
- getByValue(value) {
1961
- return this.valueToKey.get(value);
1962
- }
1963
- clear() {
1964
- this.keyToValue.clear();
1965
- this.valueToKey.clear();
1966
- }
1967
- };
1968
-
1969
- // ../../node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/registry.js
1970
- var Registry = class {
1971
- constructor(generateIdentifier) {
1972
- this.generateIdentifier = generateIdentifier;
1973
- this.kv = new DoubleIndexedKV();
1974
- }
1975
- register(value, identifier) {
1976
- if (this.kv.getByValue(value)) {
1977
- return;
1978
- }
1979
- if (!identifier) {
1980
- identifier = this.generateIdentifier(value);
1981
- }
1982
- this.kv.set(identifier, value);
1983
- }
1984
- clear() {
1985
- this.kv.clear();
1986
- }
1987
- getIdentifier(value) {
1988
- return this.kv.getByValue(value);
1989
- }
1990
- getValue(identifier) {
1991
- return this.kv.getByKey(identifier);
1992
- }
1993
- };
1994
-
1995
- // ../../node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/class-registry.js
1996
- var ClassRegistry = class extends Registry {
1997
- constructor() {
1998
- super((c) => c.name);
1999
- this.classToAllowedProps = /* @__PURE__ */ new Map();
2000
- }
2001
- register(value, options) {
2002
- if (typeof options === "object") {
2003
- if (options.allowProps) {
2004
- this.classToAllowedProps.set(value, options.allowProps);
2005
- }
2006
- super.register(value, options.identifier);
2007
- } else {
2008
- super.register(value, options);
2009
- }
2010
- }
2011
- getAllowedProps(value) {
2012
- return this.classToAllowedProps.get(value);
2013
- }
2014
- };
2015
-
2016
- // ../../node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/util.js
2017
- function valuesOfObj(record) {
2018
- if ("values" in Object) {
2019
- return Object.values(record);
2020
- }
2021
- const values = [];
2022
- for (const key in record) {
2023
- if (record.hasOwnProperty(key)) {
2024
- values.push(record[key]);
2025
- }
2026
- }
2027
- return values;
2028
- }
2029
- function find(record, predicate) {
2030
- const values = valuesOfObj(record);
2031
- if ("find" in values) {
2032
- return values.find(predicate);
2033
- }
2034
- const valuesNotNever = values;
2035
- for (let i = 0; i < valuesNotNever.length; i++) {
2036
- const value = valuesNotNever[i];
2037
- if (predicate(value)) {
2038
- return value;
2039
- }
2040
- }
2041
- return void 0;
2042
- }
2043
- function forEach(record, run) {
2044
- Object.entries(record).forEach(([key, value]) => run(value, key));
2045
- }
2046
- function includes(arr, value) {
2047
- return arr.indexOf(value) !== -1;
2048
- }
2049
- function findArr(record, predicate) {
2050
- for (let i = 0; i < record.length; i++) {
2051
- const value = record[i];
2052
- if (predicate(value)) {
2053
- return value;
2054
- }
2055
- }
2056
- return void 0;
2057
- }
2058
-
2059
- // ../../node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/custom-transformer-registry.js
2060
- var CustomTransformerRegistry = class {
2061
- constructor() {
2062
- this.transfomers = {};
2063
- }
2064
- register(transformer) {
2065
- this.transfomers[transformer.name] = transformer;
2066
- }
2067
- findApplicable(v) {
2068
- return find(this.transfomers, (transformer) => transformer.isApplicable(v));
2069
- }
2070
- findByName(name) {
2071
- return this.transfomers[name];
2072
- }
2073
- };
2074
-
2075
- // ../../node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/is.js
2076
- var getType = (payload) => Object.prototype.toString.call(payload).slice(8, -1);
2077
- var isUndefined = (payload) => typeof payload === "undefined";
2078
- var isNull = (payload) => payload === null;
2079
- var isPlainObject = (payload) => {
2080
- if (typeof payload !== "object" || payload === null)
2081
- return false;
2082
- if (payload === Object.prototype)
2083
- return false;
2084
- if (Object.getPrototypeOf(payload) === null)
2085
- return true;
2086
- return Object.getPrototypeOf(payload) === Object.prototype;
2087
- };
2088
- var isEmptyObject = (payload) => isPlainObject(payload) && Object.keys(payload).length === 0;
2089
- var isArray = (payload) => Array.isArray(payload);
2090
- var isString = (payload) => typeof payload === "string";
2091
- var isNumber = (payload) => typeof payload === "number" && !isNaN(payload);
2092
- var isBoolean = (payload) => typeof payload === "boolean";
2093
- var isRegExp = (payload) => payload instanceof RegExp;
2094
- var isMap = (payload) => payload instanceof Map;
2095
- var isSet = (payload) => payload instanceof Set;
2096
- var isSymbol = (payload) => getType(payload) === "Symbol";
2097
- var isDate = (payload) => payload instanceof Date && !isNaN(payload.valueOf());
2098
- var isError = (payload) => payload instanceof Error;
2099
- var isNaNValue = (payload) => typeof payload === "number" && isNaN(payload);
2100
- var isPrimitive = (payload) => isBoolean(payload) || isNull(payload) || isUndefined(payload) || isNumber(payload) || isString(payload) || isSymbol(payload);
2101
- var isBigint = (payload) => typeof payload === "bigint";
2102
- var isInfinite = (payload) => payload === Infinity || payload === -Infinity;
2103
- var isTypedArray = (payload) => ArrayBuffer.isView(payload) && !(payload instanceof DataView);
2104
- var isURL = (payload) => payload instanceof URL;
2105
-
2106
- // ../../node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/pathstringifier.js
2107
- var escapeKey = (key) => key.replace(/\\/g, "\\\\").replace(/\./g, "\\.");
2108
- var stringifyPath = (path) => path.map(String).map(escapeKey).join(".");
2109
- var parsePath = (string, legacyPaths) => {
2110
- const result = [];
2111
- let segment = "";
2112
- for (let i = 0; i < string.length; i++) {
2113
- let char = string.charAt(i);
2114
- if (!legacyPaths && char === "\\") {
2115
- const escaped = string.charAt(i + 1);
2116
- if (escaped === "\\") {
2117
- segment += "\\";
2118
- i++;
2119
- continue;
2120
- } else if (escaped !== ".") {
2121
- throw Error("invalid path");
2122
- }
2123
- }
2124
- const isEscapedDot = char === "\\" && string.charAt(i + 1) === ".";
2125
- if (isEscapedDot) {
2126
- segment += ".";
2127
- i++;
2128
- continue;
2129
- }
2130
- const isEndOfSegment = char === ".";
2131
- if (isEndOfSegment) {
2132
- result.push(segment);
2133
- segment = "";
2134
- continue;
2135
- }
2136
- segment += char;
2137
- }
2138
- const lastSegment = segment;
2139
- result.push(lastSegment);
2140
- return result;
2141
- };
2142
-
2143
- // ../../node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/transformer.js
2144
- function simpleTransformation(isApplicable, annotation, transform, untransform) {
2145
- return {
2146
- isApplicable,
2147
- annotation,
2148
- transform,
2149
- untransform
2150
- };
2151
- }
2152
- var simpleRules = [
2153
- simpleTransformation(isUndefined, "undefined", () => null, () => void 0),
2154
- simpleTransformation(isBigint, "bigint", (v) => v.toString(), (v) => {
2155
- if (typeof BigInt !== "undefined") {
2156
- return BigInt(v);
2157
- }
2158
- return v;
2159
- }),
2160
- simpleTransformation(isDate, "Date", (v) => v.toISOString(), (v) => new Date(v)),
2161
- simpleTransformation(isError, "Error", (v, superJson) => {
2162
- const baseError = {
2163
- name: v.name,
2164
- message: v.message
2165
- };
2166
- if ("cause" in v) {
2167
- baseError.cause = v.cause;
2168
- }
2169
- superJson.allowedErrorProps.forEach((prop) => {
2170
- baseError[prop] = v[prop];
2171
- });
2172
- return baseError;
2173
- }, (v, superJson) => {
2174
- const e = new Error(v.message, { cause: v.cause });
2175
- e.name = v.name;
2176
- e.stack = v.stack;
2177
- superJson.allowedErrorProps.forEach((prop) => {
2178
- e[prop] = v[prop];
2179
- });
2180
- return e;
2181
- }),
2182
- simpleTransformation(isRegExp, "regexp", (v) => "" + v, (regex) => {
2183
- const body = regex.slice(1, regex.lastIndexOf("/"));
2184
- const flags = regex.slice(regex.lastIndexOf("/") + 1);
2185
- return new RegExp(body, flags);
2186
- }),
2187
- simpleTransformation(
2188
- isSet,
2189
- "set",
2190
- // (sets only exist in es6+)
2191
- // eslint-disable-next-line es5/no-es6-methods
2192
- (v) => [...v.values()],
2193
- (v) => new Set(v)
2194
- ),
2195
- simpleTransformation(isMap, "map", (v) => [...v.entries()], (v) => new Map(v)),
2196
- simpleTransformation((v) => isNaNValue(v) || isInfinite(v), "number", (v) => {
2197
- if (isNaNValue(v)) {
2198
- return "NaN";
2199
- }
2200
- if (v > 0) {
2201
- return "Infinity";
2202
- } else {
2203
- return "-Infinity";
2204
- }
2205
- }, Number),
2206
- simpleTransformation((v) => v === 0 && 1 / v === -Infinity, "number", () => {
2207
- return "-0";
2208
- }, Number),
2209
- simpleTransformation(isURL, "URL", (v) => v.toString(), (v) => new URL(v))
2210
- ];
2211
- function compositeTransformation(isApplicable, annotation, transform, untransform) {
2212
- return {
2213
- isApplicable,
2214
- annotation,
2215
- transform,
2216
- untransform
2217
- };
2218
- }
2219
- var symbolRule = compositeTransformation((s, superJson) => {
2220
- if (isSymbol(s)) {
2221
- const isRegistered = !!superJson.symbolRegistry.getIdentifier(s);
2222
- return isRegistered;
2223
- }
2224
- return false;
2225
- }, (s, superJson) => {
2226
- const identifier = superJson.symbolRegistry.getIdentifier(s);
2227
- return ["symbol", identifier];
2228
- }, (v) => v.description, (_, a, superJson) => {
2229
- const value = superJson.symbolRegistry.getValue(a[1]);
2230
- if (!value) {
2231
- throw new Error("Trying to deserialize unknown symbol");
2232
- }
2233
- return value;
2234
- });
2235
- var constructorToName = [
2236
- Int8Array,
2237
- Uint8Array,
2238
- Int16Array,
2239
- Uint16Array,
2240
- Int32Array,
2241
- Uint32Array,
2242
- Float32Array,
2243
- Float64Array,
2244
- Uint8ClampedArray
2245
- ].reduce((obj, ctor) => {
2246
- obj[ctor.name] = ctor;
2247
- return obj;
2248
- }, {});
2249
- var typedArrayRule = compositeTransformation(isTypedArray, (v) => ["typed-array", v.constructor.name], (v) => [...v], (v, a) => {
2250
- const ctor = constructorToName[a[1]];
2251
- if (!ctor) {
2252
- throw new Error("Trying to deserialize unknown typed array");
2253
- }
2254
- return new ctor(v);
2255
- });
2256
- function isInstanceOfRegisteredClass(potentialClass, superJson) {
2257
- if (potentialClass?.constructor) {
2258
- const isRegistered = !!superJson.classRegistry.getIdentifier(potentialClass.constructor);
2259
- return isRegistered;
2260
- }
2261
- return false;
2262
- }
2263
- var classRule = compositeTransformation(isInstanceOfRegisteredClass, (clazz, superJson) => {
2264
- const identifier = superJson.classRegistry.getIdentifier(clazz.constructor);
2265
- return ["class", identifier];
2266
- }, (clazz, superJson) => {
2267
- const allowedProps = superJson.classRegistry.getAllowedProps(clazz.constructor);
2268
- if (!allowedProps) {
2269
- return { ...clazz };
2270
- }
2271
- const result = {};
2272
- allowedProps.forEach((prop) => {
2273
- result[prop] = clazz[prop];
2274
- });
2275
- return result;
2276
- }, (v, a, superJson) => {
2277
- const clazz = superJson.classRegistry.getValue(a[1]);
2278
- if (!clazz) {
2279
- throw new Error(`Trying to deserialize unknown class '${a[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
2280
- }
2281
- return Object.assign(Object.create(clazz.prototype), v);
2282
- });
2283
- var customRule = compositeTransformation((value, superJson) => {
2284
- return !!superJson.customTransformerRegistry.findApplicable(value);
2285
- }, (value, superJson) => {
2286
- const transformer = superJson.customTransformerRegistry.findApplicable(value);
2287
- return ["custom", transformer.name];
2288
- }, (value, superJson) => {
2289
- const transformer = superJson.customTransformerRegistry.findApplicable(value);
2290
- return transformer.serialize(value);
2291
- }, (v, a, superJson) => {
2292
- const transformer = superJson.customTransformerRegistry.findByName(a[1]);
2293
- if (!transformer) {
2294
- throw new Error("Trying to deserialize unknown custom value");
2295
- }
2296
- return transformer.deserialize(v);
2297
- });
2298
- var compositeRules = [classRule, symbolRule, customRule, typedArrayRule];
2299
- var transformValue = (value, superJson) => {
2300
- const applicableCompositeRule = findArr(compositeRules, (rule) => rule.isApplicable(value, superJson));
2301
- if (applicableCompositeRule) {
2302
- return {
2303
- value: applicableCompositeRule.transform(value, superJson),
2304
- type: applicableCompositeRule.annotation(value, superJson)
2305
- };
2306
- }
2307
- const applicableSimpleRule = findArr(simpleRules, (rule) => rule.isApplicable(value, superJson));
2308
- if (applicableSimpleRule) {
2309
- return {
2310
- value: applicableSimpleRule.transform(value, superJson),
2311
- type: applicableSimpleRule.annotation
2312
- };
2313
- }
2314
- return void 0;
2315
- };
2316
- var simpleRulesByAnnotation = {};
2317
- simpleRules.forEach((rule) => {
2318
- simpleRulesByAnnotation[rule.annotation] = rule;
2319
- });
2320
- var untransformValue = (json, type, superJson) => {
2321
- if (isArray(type)) {
2322
- switch (type[0]) {
2323
- case "symbol":
2324
- return symbolRule.untransform(json, type, superJson);
2325
- case "class":
2326
- return classRule.untransform(json, type, superJson);
2327
- case "custom":
2328
- return customRule.untransform(json, type, superJson);
2329
- case "typed-array":
2330
- return typedArrayRule.untransform(json, type, superJson);
2331
- default:
2332
- throw new Error("Unknown transformation: " + type);
2333
- }
2334
- } else {
2335
- const transformation = simpleRulesByAnnotation[type];
2336
- if (!transformation) {
2337
- throw new Error("Unknown transformation: " + type);
2338
- }
2339
- return transformation.untransform(json, superJson);
2340
- }
2341
- };
2342
-
2343
- // ../../node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/accessDeep.js
2344
- var getNthKey = (value, n) => {
2345
- if (n > value.size)
2346
- throw new Error("index out of bounds");
2347
- const keys = value.keys();
2348
- while (n > 0) {
2349
- keys.next();
2350
- n--;
2351
- }
2352
- return keys.next().value;
2353
- };
2354
- function validatePath(path) {
2355
- if (includes(path, "__proto__")) {
2356
- throw new Error("__proto__ is not allowed as a property");
2357
- }
2358
- if (includes(path, "prototype")) {
2359
- throw new Error("prototype is not allowed as a property");
2360
- }
2361
- if (includes(path, "constructor")) {
2362
- throw new Error("constructor is not allowed as a property");
2363
- }
2364
- }
2365
- var getDeep = (object, path) => {
2366
- validatePath(path);
2367
- for (let i = 0; i < path.length; i++) {
2368
- const key = path[i];
2369
- if (isSet(object)) {
2370
- object = getNthKey(object, +key);
2371
- } else if (isMap(object)) {
2372
- const row = +key;
2373
- const type = +path[++i] === 0 ? "key" : "value";
2374
- const keyOfRow = getNthKey(object, row);
2375
- switch (type) {
2376
- case "key":
2377
- object = keyOfRow;
2378
- break;
2379
- case "value":
2380
- object = object.get(keyOfRow);
2381
- break;
2382
- }
2383
- } else {
2384
- object = object[key];
2385
- }
2386
- }
2387
- return object;
2388
- };
2389
- var setDeep = (object, path, mapper) => {
2390
- validatePath(path);
2391
- if (path.length === 0) {
2392
- return mapper(object);
2393
- }
2394
- let parent = object;
2395
- for (let i = 0; i < path.length - 1; i++) {
2396
- const key = path[i];
2397
- if (isArray(parent)) {
2398
- const index = +key;
2399
- parent = parent[index];
2400
- } else if (isPlainObject(parent)) {
2401
- parent = parent[key];
2402
- } else if (isSet(parent)) {
2403
- const row = +key;
2404
- parent = getNthKey(parent, row);
2405
- } else if (isMap(parent)) {
2406
- const isEnd = i === path.length - 2;
2407
- if (isEnd) {
2408
- break;
2409
- }
2410
- const row = +key;
2411
- const type = +path[++i] === 0 ? "key" : "value";
2412
- const keyOfRow = getNthKey(parent, row);
2413
- switch (type) {
2414
- case "key":
2415
- parent = keyOfRow;
2416
- break;
2417
- case "value":
2418
- parent = parent.get(keyOfRow);
2419
- break;
2420
- }
2421
- }
2422
- }
2423
- const lastKey = path[path.length - 1];
2424
- if (isArray(parent)) {
2425
- parent[+lastKey] = mapper(parent[+lastKey]);
2426
- } else if (isPlainObject(parent)) {
2427
- parent[lastKey] = mapper(parent[lastKey]);
2428
- }
2429
- if (isSet(parent)) {
2430
- const oldValue = getNthKey(parent, +lastKey);
2431
- const newValue = mapper(oldValue);
2432
- if (oldValue !== newValue) {
2433
- parent.delete(oldValue);
2434
- parent.add(newValue);
2435
- }
2436
- }
2437
- if (isMap(parent)) {
2438
- const row = +path[path.length - 2];
2439
- const keyToRow = getNthKey(parent, row);
2440
- const type = +lastKey === 0 ? "key" : "value";
2441
- switch (type) {
2442
- case "key": {
2443
- const newKey = mapper(keyToRow);
2444
- parent.set(newKey, parent.get(keyToRow));
2445
- if (newKey !== keyToRow) {
2446
- parent.delete(keyToRow);
2447
- }
2448
- break;
2449
- }
2450
- case "value": {
2451
- parent.set(keyToRow, mapper(parent.get(keyToRow)));
2452
- break;
2453
- }
2454
- }
2455
- }
2456
- return object;
2457
- };
2458
-
2459
- // ../../node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/plainer.js
2460
- var enableLegacyPaths = (version) => version < 1;
2461
- function traverse(tree, walker2, version, origin = []) {
2462
- if (!tree) {
2463
- return;
2464
- }
2465
- const legacyPaths = enableLegacyPaths(version);
2466
- if (!isArray(tree)) {
2467
- forEach(tree, (subtree, key) => traverse(subtree, walker2, version, [
2468
- ...origin,
2469
- ...parsePath(key, legacyPaths)
2470
- ]));
2471
- return;
2472
- }
2473
- const [nodeValue, children2] = tree;
2474
- if (children2) {
2475
- forEach(children2, (child, key) => {
2476
- traverse(child, walker2, version, [
2477
- ...origin,
2478
- ...parsePath(key, legacyPaths)
2479
- ]);
2480
- });
2481
- }
2482
- walker2(nodeValue, origin);
2483
- }
2484
- function applyValueAnnotations(plain, annotations, version, superJson) {
2485
- traverse(annotations, (type, path) => {
2486
- plain = setDeep(plain, path, (v) => untransformValue(v, type, superJson));
2487
- }, version);
2488
- return plain;
2489
- }
2490
- function applyReferentialEqualityAnnotations(plain, annotations, version) {
2491
- const legacyPaths = enableLegacyPaths(version);
2492
- function apply(identicalPaths, path) {
2493
- const object = getDeep(plain, parsePath(path, legacyPaths));
2494
- identicalPaths.map((path2) => parsePath(path2, legacyPaths)).forEach((identicalObjectPath) => {
2495
- plain = setDeep(plain, identicalObjectPath, () => object);
2496
- });
2497
- }
2498
- if (isArray(annotations)) {
2499
- const [root, other] = annotations;
2500
- root.forEach((identicalPath) => {
2501
- plain = setDeep(plain, parsePath(identicalPath, legacyPaths), () => plain);
2502
- });
2503
- if (other) {
2504
- forEach(other, apply);
2505
- }
2506
- } else {
2507
- forEach(annotations, apply);
2508
- }
2509
- return plain;
2510
- }
2511
- var isDeep = (object, superJson) => isPlainObject(object) || isArray(object) || isMap(object) || isSet(object) || isError(object) || isInstanceOfRegisteredClass(object, superJson);
2512
- function addIdentity(object, path, identities) {
2513
- const existingSet = identities.get(object);
2514
- if (existingSet) {
2515
- existingSet.push(path);
2516
- } else {
2517
- identities.set(object, [path]);
2518
- }
2519
- }
2520
- function generateReferentialEqualityAnnotations(identitites, dedupe) {
2521
- const result = {};
2522
- let rootEqualityPaths = void 0;
2523
- identitites.forEach((paths) => {
2524
- if (paths.length <= 1) {
2525
- return;
2526
- }
2527
- if (!dedupe) {
2528
- paths = paths.map((path) => path.map(String)).sort((a, b) => a.length - b.length);
2529
- }
2530
- const [representativePath, ...identicalPaths] = paths;
2531
- if (representativePath.length === 0) {
2532
- rootEqualityPaths = identicalPaths.map(stringifyPath);
2533
- } else {
2534
- result[stringifyPath(representativePath)] = identicalPaths.map(stringifyPath);
2535
- }
2536
- });
2537
- if (rootEqualityPaths) {
2538
- if (isEmptyObject(result)) {
2539
- return [rootEqualityPaths];
2540
- } else {
2541
- return [rootEqualityPaths, result];
2542
- }
2543
- } else {
2544
- return isEmptyObject(result) ? void 0 : result;
2545
- }
2546
- }
2547
- var walker = (object, identities, superJson, dedupe, path = [], objectsInThisPath = [], seenObjects = /* @__PURE__ */ new Map()) => {
2548
- const primitive = isPrimitive(object);
2549
- if (!primitive) {
2550
- addIdentity(object, path, identities);
2551
- const seen = seenObjects.get(object);
2552
- if (seen) {
2553
- return dedupe ? {
2554
- transformedValue: null
2555
- } : seen;
2556
- }
2557
- }
2558
- if (!isDeep(object, superJson)) {
2559
- const transformed2 = transformValue(object, superJson);
2560
- const result2 = transformed2 ? {
2561
- transformedValue: transformed2.value,
2562
- annotations: [transformed2.type]
2563
- } : {
2564
- transformedValue: object
2565
- };
2566
- if (!primitive) {
2567
- seenObjects.set(object, result2);
2568
- }
2569
- return result2;
2570
- }
2571
- if (includes(objectsInThisPath, object)) {
2572
- return {
2573
- transformedValue: null
2574
- };
2575
- }
2576
- const transformationResult = transformValue(object, superJson);
2577
- const transformed = transformationResult?.value ?? object;
2578
- const transformedValue = isArray(transformed) ? [] : {};
2579
- const innerAnnotations = {};
2580
- forEach(transformed, (value, index) => {
2581
- if (index === "__proto__" || index === "constructor" || index === "prototype") {
2582
- throw new Error(`Detected property ${index}. This is a prototype pollution risk, please remove it from your object.`);
2583
- }
2584
- const recursiveResult = walker(value, identities, superJson, dedupe, [...path, index], [...objectsInThisPath, object], seenObjects);
2585
- transformedValue[index] = recursiveResult.transformedValue;
2586
- if (isArray(recursiveResult.annotations)) {
2587
- innerAnnotations[escapeKey(index)] = recursiveResult.annotations;
2588
- } else if (isPlainObject(recursiveResult.annotations)) {
2589
- forEach(recursiveResult.annotations, (tree, key) => {
2590
- innerAnnotations[escapeKey(index) + "." + key] = tree;
2591
- });
2592
- }
2593
- });
2594
- const result = isEmptyObject(innerAnnotations) ? {
2595
- transformedValue,
2596
- annotations: !!transformationResult ? [transformationResult.type] : void 0
2597
- } : {
2598
- transformedValue,
2599
- annotations: !!transformationResult ? [transformationResult.type, innerAnnotations] : innerAnnotations
2600
- };
2601
- if (!primitive) {
2602
- seenObjects.set(object, result);
2603
- }
2604
- return result;
2605
- };
2606
-
2607
- // ../../node_modules/.pnpm/is-what@5.5.0/node_modules/is-what/dist/getType.js
2608
- function getType2(payload) {
2609
- return Object.prototype.toString.call(payload).slice(8, -1);
2610
- }
2611
-
2612
- // ../../node_modules/.pnpm/is-what@5.5.0/node_modules/is-what/dist/isArray.js
2613
- function isArray2(payload) {
2614
- return getType2(payload) === "Array";
2615
- }
2616
-
2617
- // ../../node_modules/.pnpm/is-what@5.5.0/node_modules/is-what/dist/isPlainObject.js
2618
- function isPlainObject2(payload) {
2619
- if (getType2(payload) !== "Object")
2620
- return false;
2621
- const prototype = Object.getPrototypeOf(payload);
2622
- return !!prototype && prototype.constructor === Object && prototype === Object.prototype;
2623
- }
2624
-
2625
- // ../../node_modules/.pnpm/copy-anything@4.0.5/node_modules/copy-anything/dist/index.js
2626
- function assignProp2(carry, key, newVal, originalObject, includeNonenumerable) {
2627
- const propType = {}.propertyIsEnumerable.call(originalObject, key) ? "enumerable" : "nonenumerable";
2628
- if (propType === "enumerable")
2629
- carry[key] = newVal;
2630
- if (includeNonenumerable && propType === "nonenumerable") {
2631
- Object.defineProperty(carry, key, {
2632
- value: newVal,
2633
- enumerable: false,
2634
- writable: true,
2635
- configurable: true
2636
- });
2637
- }
2638
- }
2639
- function copy(target, options = {}) {
2640
- if (isArray2(target)) {
2641
- return target.map((item) => copy(item, options));
2642
- }
2643
- if (!isPlainObject2(target)) {
2644
- return target;
2645
- }
2646
- const props = Object.getOwnPropertyNames(target);
2647
- const symbols = Object.getOwnPropertySymbols(target);
2648
- return [...props, ...symbols].reduce((carry, key) => {
2649
- if (key === "__proto__")
2650
- return carry;
2651
- if (isArray2(options.props) && !options.props.includes(key)) {
2652
- return carry;
2653
- }
2654
- const val = target[key];
2655
- const newVal = copy(val, options);
2656
- assignProp2(carry, key, newVal, target, options.nonenumerable);
2657
- return carry;
2658
- }, {});
2659
- }
2660
-
2661
- // ../../node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/index.js
2662
- var SuperJSON = class {
2663
- /**
2664
- * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
2665
- */
2666
- constructor({ dedupe = false } = {}) {
2667
- this.classRegistry = new ClassRegistry();
2668
- this.symbolRegistry = new Registry((s) => s.description ?? "");
2669
- this.customTransformerRegistry = new CustomTransformerRegistry();
2670
- this.allowedErrorProps = [];
2671
- this.dedupe = dedupe;
2672
- }
2673
- serialize(object) {
2674
- const identities = /* @__PURE__ */ new Map();
2675
- const output = walker(object, identities, this, this.dedupe);
2676
- const res = {
2677
- json: output.transformedValue
2678
- };
2679
- if (output.annotations) {
2680
- res.meta = {
2681
- ...res.meta,
2682
- values: output.annotations
2683
- };
2684
- }
2685
- const equalityAnnotations = generateReferentialEqualityAnnotations(identities, this.dedupe);
2686
- if (equalityAnnotations) {
2687
- res.meta = {
2688
- ...res.meta,
2689
- referentialEqualities: equalityAnnotations
2690
- };
2691
- }
2692
- if (res.meta)
2693
- res.meta.v = 1;
2694
- return res;
2695
- }
2696
- deserialize(payload, options) {
2697
- const { json, meta } = payload;
2698
- let result = options?.inPlace ? json : copy(json);
2699
- if (meta?.values) {
2700
- result = applyValueAnnotations(result, meta.values, meta.v ?? 0, this);
2701
- }
2702
- if (meta?.referentialEqualities) {
2703
- result = applyReferentialEqualityAnnotations(result, meta.referentialEqualities, meta.v ?? 0);
2704
- }
2705
- return result;
2706
- }
2707
- stringify(object) {
2708
- return JSON.stringify(this.serialize(object));
2709
- }
2710
- parse(string) {
2711
- return this.deserialize(JSON.parse(string), { inPlace: true });
2712
- }
2713
- registerClass(v, options) {
2714
- this.classRegistry.register(v, options);
2715
- }
2716
- registerSymbol(v, identifier) {
2717
- this.symbolRegistry.register(v, identifier);
2718
- }
2719
- registerCustom(transformer, name) {
2720
- this.customTransformerRegistry.register({
2721
- name,
2722
- ...transformer
2723
- });
2724
- }
2725
- allowErrorProps(...props) {
2726
- this.allowedErrorProps.push(...props);
2727
- }
2728
- };
2729
- SuperJSON.defaultInstance = new SuperJSON();
2730
- SuperJSON.serialize = SuperJSON.defaultInstance.serialize.bind(SuperJSON.defaultInstance);
2731
- SuperJSON.deserialize = SuperJSON.defaultInstance.deserialize.bind(SuperJSON.defaultInstance);
2732
- SuperJSON.stringify = SuperJSON.defaultInstance.stringify.bind(SuperJSON.defaultInstance);
2733
- SuperJSON.parse = SuperJSON.defaultInstance.parse.bind(SuperJSON.defaultInstance);
2734
- SuperJSON.registerClass = SuperJSON.defaultInstance.registerClass.bind(SuperJSON.defaultInstance);
2735
- SuperJSON.registerSymbol = SuperJSON.defaultInstance.registerSymbol.bind(SuperJSON.defaultInstance);
2736
- SuperJSON.registerCustom = SuperJSON.defaultInstance.registerCustom.bind(SuperJSON.defaultInstance);
2737
- SuperJSON.allowErrorProps = SuperJSON.defaultInstance.allowErrorProps.bind(SuperJSON.defaultInstance);
2738
- var serialize = SuperJSON.serialize;
2739
- SuperJSON.deserialize;
2740
- var stringify = SuperJSON.stringify;
2741
- SuperJSON.parse;
2742
- SuperJSON.registerClass;
2743
- SuperJSON.registerCustom;
2744
- SuperJSON.registerSymbol;
2745
- SuperJSON.allowErrorProps;
2746
-
2747
- // src/utils.tsx
2748
- function getQueryStatusLabel(query) {
2749
- return query.state.fetchStatus === "fetching" ? "fetching" : !query.getObserversCount() ? "inactive" : query.state.fetchStatus === "paused" ? "paused" : query.isStale() ? "stale" : "fresh";
2750
- }
2751
- function getSidedProp(prop, side) {
2752
- return `${prop}${side.charAt(0).toUpperCase() + side.slice(1)}`;
2753
- }
2754
- function getQueryStatusColor({
2755
- queryState,
2756
- observerCount,
2757
- isStale
2758
- }) {
2759
- return queryState?.fetchStatus === "fetching" ? "blue" : !observerCount ? "gray" : queryState?.fetchStatus === "paused" ? "purple" : isStale ? "yellow" : "green";
2760
- }
2761
- function getMutationStatusColor({
2762
- status,
2763
- isPaused
2764
- }) {
2765
- return isPaused ? "purple" : status === "error" ? "red" : status === "pending" ? "yellow" : status === "success" ? "green" : "gray";
2766
- }
2767
- function getQueryStatusColorByLabel(label) {
2768
- return label === "fresh" ? "green" : label === "stale" ? "yellow" : label === "paused" ? "purple" : label === "inactive" ? "gray" : "blue";
2769
- }
2770
- var displayValue = (value, beautify = false) => {
2771
- const {
2772
- json
2773
- } = serialize(value);
2774
- return JSON.stringify(json, null, beautify ? 2 : void 0);
2775
- };
2776
- var getStatusRank = (q) => q.state.fetchStatus !== "idle" ? 0 : !q.getObserversCount() ? 3 : q.isStale() ? 2 : 1;
2777
- var queryHashSort = (a, b) => a.queryHash.localeCompare(b.queryHash);
2778
- var dateSort = (a, b) => {
2779
- const diff = b.state.dataUpdatedAt - a.state.dataUpdatedAt;
2780
- return diff < 0 ? -1 : diff > 0 ? 1 : 0;
2781
- };
2782
- var statusAndDateSort = (a, b) => {
2783
- if (getStatusRank(a) === getStatusRank(b)) {
2784
- return dateSort(a, b);
2785
- }
2786
- return getStatusRank(a) > getStatusRank(b) ? 1 : -1;
2787
- };
2788
- var sortFns = {
2789
- status: statusAndDateSort,
2790
- "query hash": queryHashSort,
2791
- "last updated": dateSort
2792
- };
2793
- var getMutationStatusRank = (m) => m.state.isPaused ? 0 : m.state.status === "error" ? 2 : m.state.status === "pending" ? 1 : 3;
2794
- var mutationDateSort = (a, b) => a.state.submittedAt < b.state.submittedAt ? 1 : -1;
2795
- var mutationStatusSort = (a, b) => {
2796
- if (getMutationStatusRank(a) === getMutationStatusRank(b)) {
2797
- return mutationDateSort(a, b);
2798
- }
2799
- return getMutationStatusRank(a) > getMutationStatusRank(b) ? 1 : -1;
2800
- };
2801
- var mutationSortFns = {
2802
- status: mutationStatusSort,
2803
- "last updated": mutationDateSort
2804
- };
2805
- var convertRemToPixels = (rem) => {
2806
- return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
2807
- };
2808
- var getPreferredColorScheme = () => {
2809
- const [colorScheme, setColorScheme] = createSignal("dark");
2810
- onMount(() => {
2811
- const query = window.matchMedia("(prefers-color-scheme: dark)");
2812
- setColorScheme(query.matches ? "dark" : "light");
2813
- const listener = (e) => {
2814
- setColorScheme(e.matches ? "dark" : "light");
2815
- };
2816
- query.addEventListener("change", listener);
2817
- onCleanup(() => query.removeEventListener("change", listener));
2818
- });
2819
- return colorScheme;
2820
- };
2821
- var updateNestedDataByPath = (oldData, updatePath, value) => {
2822
- if (updatePath.length === 0) {
2823
- return value;
2824
- }
2825
- if (oldData instanceof Map) {
2826
- const newData = new Map(oldData);
2827
- if (updatePath.length === 1) {
2828
- newData.set(updatePath[0], value);
2829
- return newData;
2830
- }
2831
- const [head, ...tail] = updatePath;
2832
- newData.set(head, updateNestedDataByPath(newData.get(head), tail, value));
2833
- return newData;
2834
- }
2835
- if (oldData instanceof Set) {
2836
- const setAsArray = updateNestedDataByPath(Array.from(oldData), updatePath, value);
2837
- return new Set(setAsArray);
2838
- }
2839
- if (Array.isArray(oldData)) {
2840
- const newData = [...oldData];
2841
- if (updatePath.length === 1) {
2842
- newData[updatePath[0]] = value;
2843
- return newData;
2844
- }
2845
- const [head, ...tail] = updatePath;
2846
- newData[head] = updateNestedDataByPath(newData[head], tail, value);
2847
- return newData;
2848
- }
2849
- if (oldData instanceof Object) {
2850
- const newData = {
2851
- ...oldData
2852
- };
2853
- if (updatePath.length === 1) {
2854
- newData[updatePath[0]] = value;
2855
- return newData;
2856
- }
2857
- const [head, ...tail] = updatePath;
2858
- newData[head] = updateNestedDataByPath(newData[head], tail, value);
2859
- return newData;
2860
- }
2861
- return oldData;
2862
- };
2863
- var deleteNestedDataByPath = (oldData, deletePath) => {
2864
- if (oldData instanceof Map) {
2865
- const newData = new Map(oldData);
2866
- if (deletePath.length === 1) {
2867
- newData.delete(deletePath[0]);
2868
- return newData;
2869
- }
2870
- const [head, ...tail] = deletePath;
2871
- newData.set(head, deleteNestedDataByPath(newData.get(head), tail));
2872
- return newData;
2873
- }
2874
- if (oldData instanceof Set) {
2875
- const setAsArray = deleteNestedDataByPath(Array.from(oldData), deletePath);
2876
- return new Set(setAsArray);
2877
- }
2878
- if (Array.isArray(oldData)) {
2879
- const newData = [...oldData];
2880
- if (deletePath.length === 1) {
2881
- return newData.filter((_, idx) => idx.toString() !== deletePath[0]);
2882
- }
2883
- const [head, ...tail] = deletePath;
2884
- newData[head] = deleteNestedDataByPath(newData[head], tail);
2885
- return newData;
2886
- }
2887
- if (oldData instanceof Object) {
2888
- const newData = {
2889
- ...oldData
2890
- };
2891
- if (deletePath.length === 1) {
2892
- delete newData[deletePath[0]];
2893
- return newData;
2894
- }
2895
- const [head, ...tail] = deletePath;
2896
- newData[head] = deleteNestedDataByPath(newData[head], tail);
2897
- return newData;
2898
- }
2899
- return oldData;
2900
- };
2901
- var setupStyleSheet = (nonce, target) => {
2902
- if (!nonce) return;
2903
- window.__nonce__ = nonce;
2904
- const root = target ?? document.head;
2905
- if (root.querySelector("#_goober")) return;
2906
- const styleTag = document.createElement("style");
2907
- const textNode = document.createTextNode("");
2908
- styleTag.appendChild(textNode);
2909
- styleTag.id = "_goober";
2910
- styleTag.setAttribute("nonce", nonce);
2911
- root.appendChild(styleTag);
2912
- };
2913
-
2914
- export { $TRACK, DEV, Dynamic, For, Index, Match, Portal, Show, Switch, addEventListener, batch, className, clearDelegatedEvents, convertRemToPixels, createComponent, createComputed, createContext, createEffect, createMemo, createRenderEffect, createRoot, createSignal, createUniqueId, delegateEvents, deleteNestedDataByPath, displayValue, getMutationStatusColor, getOwner, getPreferredColorScheme, getQueryStatusColor, getQueryStatusColorByLabel, getQueryStatusLabel, getSidedProp, insert, isServer, lazy, memo, mergeProps, mutationSortFns, on, onCleanup, onMount, render, serialize, setAttribute, setStyleProperty, setupStyleSheet, sortFns, splitProps, spread, stringify, template, untrack, updateNestedDataByPath, use, useContext, useTransition };