@tanstack/query-devtools 5.0.0-alpha.86 → 5.0.0-alpha.88

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 (43) hide show
  1. package/build/Devtools/OYHFZDAP.jsx +6711 -0
  2. package/build/Devtools/QBS7PB6D.js +5885 -0
  3. package/build/Devtools/QPWQM7BG.js +6068 -0
  4. package/build/Devtools/RZF5MSB2.jsx +6637 -0
  5. package/build/chunk/DFC6JMPR.jsx +1280 -0
  6. package/build/chunk/LOJK4LQB.jsx +1280 -0
  7. package/{dist/esm/index-7b089165.js → build/chunk/MZOCHHZD.js} +648 -416
  8. package/{dist/cjs/index-94a2ab18.cjs → build/chunk/YHTPXJWR.js} +648 -446
  9. package/build/dev.cjs +8116 -0
  10. package/build/dev.js +99 -0
  11. package/build/dev.jsx +98 -0
  12. package/build/index.cjs +7940 -0
  13. package/build/index.d.cts +55 -0
  14. package/build/index.d.ts +55 -0
  15. package/build/index.js +99 -0
  16. package/build/index.jsx +98 -0
  17. package/package.json +27 -23
  18. package/dist/cjs/Devtools-5eee2153.cjs +0 -6764
  19. package/dist/cjs/Devtools-5eee2153.cjs.map +0 -1
  20. package/dist/cjs/index-94a2ab18.cjs.map +0 -1
  21. package/dist/cjs/index.cjs +0 -8
  22. package/dist/cjs/index.cjs.map +0 -1
  23. package/dist/esm/Devtools-74e35f67.js +0 -6756
  24. package/dist/esm/Devtools-74e35f67.js.map +0 -1
  25. package/dist/esm/index-7b089165.js.map +0 -1
  26. package/dist/esm/index.js +0 -2
  27. package/dist/esm/index.js.map +0 -1
  28. package/dist/source/Context.js +0 -10
  29. package/dist/source/Devtools.jsx +0 -1510
  30. package/dist/source/Explorer.jsx +0 -264
  31. package/dist/source/fonts.js +0 -7
  32. package/dist/source/icons/index.jsx +0 -344
  33. package/dist/source/index.jsx +0 -88
  34. package/dist/source/theme.js +0 -304
  35. package/dist/source/utils.jsx +0 -77
  36. package/dist/types/Context.d.ts +0 -28
  37. package/dist/types/Devtools.d.ts +0 -22
  38. package/dist/types/Explorer.d.ts +0 -21
  39. package/dist/types/fonts.d.ts +0 -1
  40. package/dist/types/icons/index.d.ts +0 -11
  41. package/dist/types/index.d.ts +0 -29
  42. package/dist/types/theme.d.ts +0 -296
  43. package/dist/types/utils.d.ts +0 -23
@@ -1,43 +1,48 @@
1
- 'use strict';
2
-
3
- const sharedConfig = {};
1
+ // ../../node_modules/.pnpm/solid-js@1.6.13/node_modules/solid-js/dist/solid.js
2
+ var sharedConfig = {};
4
3
  function setHydrateContext(context) {
5
4
  sharedConfig.context = context;
6
5
  }
7
- const equalFn = (a, b) => a === b;
8
- const $PROXY = Symbol("solid-proxy");
9
- const $TRACK = Symbol("solid-track");
10
- const signalOptions = {
6
+ function nextHydrateContext() {
7
+ return {
8
+ ...sharedConfig.context,
9
+ id: `${sharedConfig.context.id}${sharedConfig.context.count++}-`,
10
+ count: 0
11
+ };
12
+ }
13
+ var equalFn = (a, b) => a === b;
14
+ var $PROXY = Symbol("solid-proxy");
15
+ var $TRACK = Symbol("solid-track");
16
+ var signalOptions = {
11
17
  equals: equalFn
12
18
  };
13
- let runEffects = runQueue;
14
- const STALE = 1;
15
- const PENDING = 2;
16
- const UNOWNED = {
19
+ var ERROR = null;
20
+ var runEffects = runQueue;
21
+ var STALE = 1;
22
+ var PENDING = 2;
23
+ var UNOWNED = {
17
24
  owned: null,
18
25
  cleanups: null,
19
26
  context: null,
20
27
  owner: null
21
28
  };
22
- const NO_INIT = {};
29
+ var NO_INIT = {};
23
30
  var Owner = null;
24
- let Transition = null;
25
- let Listener = null;
26
- let Updates = null;
27
- let Effects = null;
28
- let ExecCount = 0;
29
- const [transPending, setTransPending] = /*@__PURE__*/createSignal(false);
31
+ var Transition = null;
32
+ var Scheduler = null;
33
+ var ExternalSourceFactory = null;
34
+ var Listener = null;
35
+ var Updates = null;
36
+ var Effects = null;
37
+ var ExecCount = 0;
38
+ var [transPending, setTransPending] = /* @__PURE__ */ createSignal(false);
30
39
  function createRoot(fn, detachedOwner) {
31
- const listener = Listener,
32
- owner = Owner,
33
- unowned = fn.length === 0,
34
- root = unowned ? UNOWNED : {
35
- owned: null,
36
- cleanups: null,
37
- context: null,
38
- owner: detachedOwner === undefined ? owner : detachedOwner
39
- },
40
- updateFn = unowned ? fn : () => fn(() => untrack(() => cleanNode(root)));
40
+ const listener = Listener, owner = Owner, unowned = fn.length === 0, root = unowned ? UNOWNED : {
41
+ owned: null,
42
+ cleanups: null,
43
+ context: null,
44
+ owner: detachedOwner === void 0 ? owner : detachedOwner
45
+ }, updateFn = unowned ? fn : () => fn(() => untrack(() => cleanNode(root)));
41
46
  Owner = root;
42
47
  Listener = null;
43
48
  try {
@@ -53,27 +58,38 @@ function createSignal(value, options) {
53
58
  value,
54
59
  observers: null,
55
60
  observerSlots: null,
56
- comparator: options.equals || undefined
61
+ comparator: options.equals || void 0
57
62
  };
58
- const setter = value => {
59
- if (typeof value === "function") {
60
- value = value(s.value);
63
+ const setter = (value2) => {
64
+ if (typeof value2 === "function") {
65
+ if (Transition && Transition.running && Transition.sources.has(s))
66
+ value2 = value2(s.tValue);
67
+ else
68
+ value2 = value2(s.value);
61
69
  }
62
- return writeSignal(s, value);
70
+ return writeSignal(s, value2);
63
71
  };
64
72
  return [readSignal.bind(s), setter];
65
73
  }
66
74
  function createComputed(fn, value, options) {
67
75
  const c = createComputation(fn, value, true, STALE);
68
- updateComputation(c);
76
+ if (Scheduler && Transition && Transition.running)
77
+ Updates.push(c);
78
+ else
79
+ updateComputation(c);
69
80
  }
70
81
  function createRenderEffect(fn, value, options) {
71
82
  const c = createComputation(fn, value, false, STALE);
72
- updateComputation(c);
83
+ if (Scheduler && Transition && Transition.running)
84
+ Updates.push(c);
85
+ else
86
+ updateComputation(c);
73
87
  }
74
88
  function createEffect(fn, value, options) {
75
89
  runEffects = runUserEffects;
76
- const c = createComputation(fn, value, false, STALE);
90
+ const c = createComputation(fn, value, false, STALE), s = SuspenseContext && lookup(Owner, SuspenseContext.id);
91
+ if (s)
92
+ c.suspense = s;
77
93
  c.user = true;
78
94
  Effects ? Effects.push(c) : updateComputation(c);
79
95
  }
@@ -82,8 +98,12 @@ function createMemo(fn, value, options) {
82
98
  const c = createComputation(fn, value, true, 0);
83
99
  c.observers = null;
84
100
  c.observerSlots = null;
85
- c.comparator = options.equals || undefined;
86
- updateComputation(c);
101
+ c.comparator = options.equals || void 0;
102
+ if (Scheduler && Transition && Transition.running) {
103
+ c.tState = STALE;
104
+ Updates.push(c);
105
+ } else
106
+ updateComputation(c);
87
107
  return readSignal.bind(c);
88
108
  }
89
109
  function createResource(pSource, pFetcher, pOptions) {
@@ -99,55 +119,61 @@ function createResource(pSource, pFetcher, pOptions) {
99
119
  fetcher = pFetcher;
100
120
  options = pOptions || {};
101
121
  }
102
- let pr = null,
103
- initP = NO_INIT,
104
- id = null,
105
- scheduled = false,
106
- resolved = ("initialValue" in options),
107
- dynamic = typeof source === "function" && createMemo(source);
108
- const contexts = new Set(),
109
- [value, setValue] = (options.storage || createSignal)(options.initialValue),
110
- [error, setError] = createSignal(undefined),
111
- [track, trigger] = createSignal(undefined, {
112
- equals: false
113
- }),
114
- [state, setState] = createSignal(resolved ? "ready" : "unresolved");
122
+ let pr = null, initP = NO_INIT, id = null, loadedUnderTransition = false, scheduled = false, resolved = "initialValue" in options, dynamic = typeof source === "function" && createMemo(source);
123
+ const contexts = /* @__PURE__ */ new Set(), [value, setValue] = (options.storage || createSignal)(options.initialValue), [error, setError] = createSignal(void 0), [track, trigger] = createSignal(void 0, {
124
+ equals: false
125
+ }), [state, setState] = createSignal(resolved ? "ready" : "unresolved");
115
126
  if (sharedConfig.context) {
116
127
  id = `${sharedConfig.context.id}${sharedConfig.context.count++}`;
117
128
  let v;
118
- if (options.ssrLoadFrom === "initial") initP = options.initialValue;else if (sharedConfig.load && (v = sharedConfig.load(id))) initP = v[0];
129
+ if (options.ssrLoadFrom === "initial")
130
+ initP = options.initialValue;
131
+ else if (sharedConfig.load && (v = sharedConfig.load(id)))
132
+ initP = v[0];
119
133
  }
120
- function loadEnd(p, v, error, key) {
134
+ function loadEnd(p, v, error2, key) {
121
135
  if (pr === p) {
122
136
  pr = null;
123
137
  resolved = true;
124
- if ((p === initP || v === initP) && options.onHydrated) queueMicrotask(() => options.onHydrated(key, {
125
- value: v
126
- }));
138
+ if ((p === initP || v === initP) && options.onHydrated)
139
+ queueMicrotask(() => options.onHydrated(key, {
140
+ value: v
141
+ }));
127
142
  initP = NO_INIT;
128
- completeLoad(v, error);
143
+ if (Transition && p && loadedUnderTransition) {
144
+ Transition.promises.delete(p);
145
+ loadedUnderTransition = false;
146
+ runUpdates(() => {
147
+ Transition.running = true;
148
+ completeLoad(v, error2);
149
+ }, false);
150
+ } else
151
+ completeLoad(v, error2);
129
152
  }
130
153
  return v;
131
154
  }
132
155
  function completeLoad(v, err) {
133
156
  runUpdates(() => {
134
- if (err === undefined) setValue(() => v);
135
- setState(err !== undefined ? "errored" : "ready");
157
+ if (err === void 0)
158
+ setValue(() => v);
159
+ setState(err !== void 0 ? "errored" : "ready");
136
160
  setError(err);
137
- for (const c of contexts.keys()) c.decrement();
161
+ for (const c of contexts.keys())
162
+ c.decrement();
138
163
  contexts.clear();
139
164
  }, false);
140
165
  }
141
166
  function read() {
142
- const c = SuspenseContext ,
143
- v = value(),
144
- err = error();
145
- if (err !== undefined && !pr) throw err;
167
+ const c = SuspenseContext && lookup(Owner, SuspenseContext.id), v = value(), err = error();
168
+ if (err !== void 0 && !pr)
169
+ throw err;
146
170
  if (Listener && !Listener.user && c) {
147
171
  createComputed(() => {
148
172
  track();
149
173
  if (pr) {
150
- if (c.resolved ) ;else if (!contexts.has(c)) {
174
+ if (c.resolved && Transition && loadedUnderTransition)
175
+ Transition.promises.add(pr);
176
+ else if (!contexts.has(c)) {
151
177
  c.increment();
152
178
  contexts.add(c);
153
179
  }
@@ -157,19 +183,23 @@ function createResource(pSource, pFetcher, pOptions) {
157
183
  return v;
158
184
  }
159
185
  function load(refetching = true) {
160
- if (refetching !== false && scheduled) return;
186
+ if (refetching !== false && scheduled)
187
+ return;
161
188
  scheduled = false;
162
- const lookup = dynamic ? dynamic() : source;
163
- if (lookup == null || lookup === false) {
189
+ const lookup2 = dynamic ? dynamic() : source;
190
+ loadedUnderTransition = Transition && Transition.running;
191
+ if (lookup2 == null || lookup2 === false) {
164
192
  loadEnd(pr, untrack(value));
165
193
  return;
166
194
  }
167
- const p = initP !== NO_INIT ? initP : untrack(() => fetcher(lookup, {
195
+ if (Transition && pr)
196
+ Transition.promises.delete(pr);
197
+ const p = initP !== NO_INIT ? initP : untrack(() => fetcher(lookup2, {
168
198
  value: value(),
169
199
  refetching
170
200
  }));
171
201
  if (typeof p !== "object" || !(p && "then" in p)) {
172
- loadEnd(pr, p, undefined, lookup);
202
+ loadEnd(pr, p, void 0, lookup2);
173
203
  return p;
174
204
  }
175
205
  pr = p;
@@ -179,7 +209,7 @@ function createResource(pSource, pFetcher, pOptions) {
179
209
  setState(resolved ? "refreshing" : "pending");
180
210
  trigger();
181
211
  }, false);
182
- return p.then(v => loadEnd(p, v, undefined, lookup), e => loadEnd(p, undefined, castError(e), lookup));
212
+ return p.then((v) => loadEnd(p, v, void 0, lookup2), (e) => loadEnd(p, void 0, castError(e), lookup2));
183
213
  }
184
214
  Object.defineProperties(read, {
185
215
  state: {
@@ -196,21 +226,27 @@ function createResource(pSource, pFetcher, pOptions) {
196
226
  },
197
227
  latest: {
198
228
  get() {
199
- if (!resolved) return read();
229
+ if (!resolved)
230
+ return read();
200
231
  const err = error();
201
- if (err && !pr) throw err;
232
+ if (err && !pr)
233
+ throw err;
202
234
  return value();
203
235
  }
204
236
  }
205
237
  });
206
- if (dynamic) createComputed(() => load(false));else load(false);
238
+ if (dynamic)
239
+ createComputed(() => load(false));
240
+ else
241
+ load(false);
207
242
  return [read, {
208
243
  refetch: load,
209
244
  mutate: setValue
210
245
  }];
211
246
  }
212
247
  function untrack(fn) {
213
- if (Listener === null) return fn();
248
+ if (Listener === null)
249
+ return fn();
214
250
  const listener = Listener;
215
251
  Listener = null;
216
252
  try {
@@ -223,15 +259,17 @@ function on(deps, fn, options) {
223
259
  const isArray = Array.isArray(deps);
224
260
  let prevInput;
225
261
  let defer = options && options.defer;
226
- return prevValue => {
262
+ return (prevValue) => {
227
263
  let input;
228
264
  if (isArray) {
229
265
  input = Array(deps.length);
230
- for (let i = 0; i < deps.length; i++) input[i] = deps[i]();
231
- } else input = deps();
266
+ for (let i = 0; i < deps.length; i++)
267
+ input[i] = deps[i]();
268
+ } else
269
+ input = deps();
232
270
  if (defer) {
233
271
  defer = false;
234
- return undefined;
272
+ return void 0;
235
273
  }
236
274
  const result = untrack(() => fn(input, prevInput, prevValue));
237
275
  prevInput = input;
@@ -242,19 +280,40 @@ function onMount(fn) {
242
280
  createEffect(() => untrack(fn));
243
281
  }
244
282
  function onCleanup(fn) {
245
- if (Owner === null) ;else if (Owner.cleanups === null) Owner.cleanups = [fn];else Owner.cleanups.push(fn);
283
+ if (Owner === null)
284
+ ;
285
+ else if (Owner.cleanups === null)
286
+ Owner.cleanups = [fn];
287
+ else
288
+ Owner.cleanups.push(fn);
246
289
  return fn;
247
290
  }
248
291
  function startTransition(fn) {
292
+ if (Transition && Transition.running) {
293
+ fn();
294
+ return Transition.done;
295
+ }
249
296
  const l = Listener;
250
297
  const o = Owner;
251
298
  return Promise.resolve().then(() => {
252
299
  Listener = l;
253
300
  Owner = o;
254
301
  let t;
302
+ if (Scheduler || SuspenseContext) {
303
+ t = Transition || (Transition = {
304
+ sources: /* @__PURE__ */ new Set(),
305
+ effects: [],
306
+ promises: /* @__PURE__ */ new Set(),
307
+ disposed: /* @__PURE__ */ new Set(),
308
+ queue: /* @__PURE__ */ new Set(),
309
+ running: true
310
+ });
311
+ t.done || (t.done = new Promise((res) => t.resolve = res));
312
+ t.running = true;
313
+ }
255
314
  runUpdates(fn, false);
256
315
  Listener = Owner = null;
257
- return t ? t.done : undefined;
316
+ return t ? t.done : void 0;
258
317
  });
259
318
  }
260
319
  function useTransition() {
@@ -270,22 +329,24 @@ function createContext(defaultValue, options) {
270
329
  }
271
330
  function useContext(context) {
272
331
  let ctx;
273
- return (ctx = lookup(Owner, context.id)) !== undefined ? ctx : context.defaultValue;
332
+ return (ctx = lookup(Owner, context.id)) !== void 0 ? ctx : context.defaultValue;
274
333
  }
275
334
  function children(fn) {
276
- const children = createMemo(fn);
277
- const memo = createMemo(() => resolveChildren(children()));
335
+ const children2 = createMemo(fn);
336
+ const memo = createMemo(() => resolveChildren(children2()));
278
337
  memo.toArray = () => {
279
338
  const c = memo();
280
339
  return Array.isArray(c) ? c : c != null ? [c] : [];
281
340
  };
282
341
  return memo;
283
342
  }
284
- let SuspenseContext;
343
+ var SuspenseContext;
285
344
  function readSignal() {
286
- const runningTransition = Transition ;
287
- if (this.sources && (this.state || runningTransition )) {
288
- if (this.state === STALE || runningTransition ) updateComputation(this);else {
345
+ const runningTransition = Transition && Transition.running;
346
+ if (this.sources && (!runningTransition && this.state || runningTransition && this.tState)) {
347
+ if (!runningTransition && this.state === STALE || runningTransition && this.tState === STALE)
348
+ updateComputation(this);
349
+ else {
289
350
  const updates = Updates;
290
351
  Updates = null;
291
352
  runUpdates(() => lookUpstream(this), false);
@@ -309,27 +370,47 @@ function readSignal() {
309
370
  this.observerSlots.push(Listener.sources.length - 1);
310
371
  }
311
372
  }
373
+ if (runningTransition && Transition.sources.has(this))
374
+ return this.tValue;
312
375
  return this.value;
313
376
  }
314
377
  function writeSignal(node, value, isComp) {
315
- let current = node.value;
378
+ let current = Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value;
316
379
  if (!node.comparator || !node.comparator(current, value)) {
317
- node.value = value;
380
+ if (Transition) {
381
+ const TransitionRunning = Transition.running;
382
+ if (TransitionRunning || !isComp && Transition.sources.has(node)) {
383
+ Transition.sources.add(node);
384
+ node.tValue = value;
385
+ }
386
+ if (!TransitionRunning)
387
+ node.value = value;
388
+ } else
389
+ node.value = value;
318
390
  if (node.observers && node.observers.length) {
319
391
  runUpdates(() => {
320
392
  for (let i = 0; i < node.observers.length; i += 1) {
321
393
  const o = node.observers[i];
322
394
  const TransitionRunning = Transition && Transition.running;
323
- if (TransitionRunning && Transition.disposed.has(o)) ;
395
+ if (TransitionRunning && Transition.disposed.has(o))
396
+ continue;
324
397
  if (TransitionRunning && !o.tState || !TransitionRunning && !o.state) {
325
- if (o.pure) Updates.push(o);else Effects.push(o);
326
- if (o.observers) markDownstream(o);
398
+ if (o.pure)
399
+ Updates.push(o);
400
+ else
401
+ Effects.push(o);
402
+ if (o.observers)
403
+ markDownstream(o);
327
404
  }
328
- if (TransitionRunning) ;else o.state = STALE;
405
+ if (TransitionRunning)
406
+ o.tState = STALE;
407
+ else
408
+ o.state = STALE;
329
409
  }
330
- if (Updates.length > 10e5) {
410
+ if (Updates.length > 1e6) {
331
411
  Updates = [];
332
- if (false) ;
412
+ if (false)
413
+ ;
333
414
  throw new Error();
334
415
  }
335
416
  }, false);
@@ -338,13 +419,22 @@ function writeSignal(node, value, isComp) {
338
419
  return value;
339
420
  }
340
421
  function updateComputation(node) {
341
- if (!node.fn) return;
422
+ if (!node.fn)
423
+ return;
342
424
  cleanNode(node);
343
- const owner = Owner,
344
- listener = Listener,
345
- time = ExecCount;
425
+ const owner = Owner, listener = Listener, time = ExecCount;
346
426
  Listener = Owner = node;
347
- runComputation(node, node.value, time);
427
+ runComputation(node, Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value, time);
428
+ if (Transition && !Transition.running && Transition.sources.has(node)) {
429
+ queueMicrotask(() => {
430
+ runUpdates(() => {
431
+ Transition && (Transition.running = true);
432
+ Listener = Owner = node;
433
+ runComputation(node, node.tValue, time);
434
+ Listener = Owner = null;
435
+ }, false);
436
+ });
437
+ }
348
438
  Listener = listener;
349
439
  Owner = owner;
350
440
  }
@@ -354,7 +444,11 @@ function runComputation(node, value, time) {
354
444
  nextValue = node.fn(value);
355
445
  } catch (err) {
356
446
  if (node.pure) {
357
- {
447
+ if (Transition && Transition.running) {
448
+ node.tState = STALE;
449
+ node.tOwned && node.tOwned.forEach(cleanNode);
450
+ node.tOwned = void 0;
451
+ } else {
358
452
  node.state = STALE;
359
453
  node.owned && node.owned.forEach(cleanNode);
360
454
  node.owned = null;
@@ -365,15 +459,19 @@ function runComputation(node, value, time) {
365
459
  }
366
460
  if (!node.updatedAt || node.updatedAt <= time) {
367
461
  if (node.updatedAt != null && "observers" in node) {
368
- writeSignal(node, nextValue);
369
- } else node.value = nextValue;
462
+ writeSignal(node, nextValue, true);
463
+ } else if (Transition && Transition.running && node.pure) {
464
+ Transition.sources.add(node);
465
+ node.tValue = nextValue;
466
+ } else
467
+ node.value = nextValue;
370
468
  node.updatedAt = time;
371
469
  }
372
470
  }
373
471
  function createComputation(fn, init, pure, state = STALE, options) {
374
472
  const c = {
375
473
  fn,
376
- state: state,
474
+ state,
377
475
  updatedAt: null,
378
476
  owned: null,
379
477
  sources: null,
@@ -384,27 +482,67 @@ function createComputation(fn, init, pure, state = STALE, options) {
384
482
  context: null,
385
483
  pure
386
484
  };
387
- if (Owner === null) ;else if (Owner !== UNOWNED) {
388
- {
389
- if (!Owner.owned) Owner.owned = [c];else Owner.owned.push(c);
485
+ if (Transition && Transition.running) {
486
+ c.state = 0;
487
+ c.tState = state;
488
+ }
489
+ if (Owner === null)
490
+ ;
491
+ else if (Owner !== UNOWNED) {
492
+ if (Transition && Transition.running && Owner.pure) {
493
+ if (!Owner.tOwned)
494
+ Owner.tOwned = [c];
495
+ else
496
+ Owner.tOwned.push(c);
497
+ } else {
498
+ if (!Owner.owned)
499
+ Owner.owned = [c];
500
+ else
501
+ Owner.owned.push(c);
390
502
  }
391
503
  }
504
+ if (ExternalSourceFactory) {
505
+ const [track, trigger] = createSignal(void 0, {
506
+ equals: false
507
+ });
508
+ const ordinary = ExternalSourceFactory(c.fn, trigger);
509
+ onCleanup(() => ordinary.dispose());
510
+ const triggerInTransition = () => startTransition(trigger).then(() => inTransition.dispose());
511
+ const inTransition = ExternalSourceFactory(c.fn, triggerInTransition);
512
+ c.fn = (x) => {
513
+ track();
514
+ return Transition && Transition.running ? inTransition.track(x) : ordinary.track(x);
515
+ };
516
+ }
392
517
  return c;
393
518
  }
394
519
  function runTop(node) {
395
- const runningTransition = Transition ;
396
- if (node.state === 0 || runningTransition ) return;
397
- if (node.state === PENDING || runningTransition ) return lookUpstream(node);
398
- if (node.suspense && untrack(node.suspense.inFallback)) return node.suspense.effects.push(node);
520
+ const runningTransition = Transition && Transition.running;
521
+ if (!runningTransition && node.state === 0 || runningTransition && node.tState === 0)
522
+ return;
523
+ if (!runningTransition && node.state === PENDING || runningTransition && node.tState === PENDING)
524
+ return lookUpstream(node);
525
+ if (node.suspense && untrack(node.suspense.inFallback))
526
+ return node.suspense.effects.push(node);
399
527
  const ancestors = [node];
400
528
  while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {
401
- if (node.state || runningTransition ) ancestors.push(node);
529
+ if (runningTransition && Transition.disposed.has(node))
530
+ return;
531
+ if (!runningTransition && node.state || runningTransition && node.tState)
532
+ ancestors.push(node);
402
533
  }
403
534
  for (let i = ancestors.length - 1; i >= 0; i--) {
404
535
  node = ancestors[i];
405
- if (node.state === STALE || runningTransition ) {
536
+ if (runningTransition) {
537
+ let top = node, prev = ancestors[i + 1];
538
+ while ((top = top.owner) && top !== prev) {
539
+ if (Transition.disposed.has(top))
540
+ return;
541
+ }
542
+ }
543
+ if (!runningTransition && node.state === STALE || runningTransition && node.tState === STALE) {
406
544
  updateComputation(node);
407
- } else if (node.state === PENDING || runningTransition ) {
545
+ } else if (!runningTransition && node.state === PENDING || runningTransition && node.tState === PENDING) {
408
546
  const updates = Updates;
409
547
  Updates = null;
410
548
  runUpdates(() => lookUpstream(node, ancestors[0]), false);
@@ -413,63 +551,146 @@ function runTop(node) {
413
551
  }
414
552
  }
415
553
  function runUpdates(fn, init) {
416
- if (Updates) return fn();
554
+ if (Updates)
555
+ return fn();
417
556
  let wait = false;
418
- if (!init) Updates = [];
419
- if (Effects) wait = true;else Effects = [];
557
+ if (!init)
558
+ Updates = [];
559
+ if (Effects)
560
+ wait = true;
561
+ else
562
+ Effects = [];
420
563
  ExecCount++;
421
564
  try {
422
565
  const res = fn();
423
566
  completeUpdates(wait);
424
567
  return res;
425
568
  } catch (err) {
426
- if (!wait) Effects = null;
569
+ if (!wait)
570
+ Effects = null;
427
571
  Updates = null;
428
572
  handleError(err);
429
573
  }
430
574
  }
431
575
  function completeUpdates(wait) {
432
576
  if (Updates) {
433
- runQueue(Updates);
577
+ if (Scheduler && Transition && Transition.running)
578
+ scheduleQueue(Updates);
579
+ else
580
+ runQueue(Updates);
434
581
  Updates = null;
435
582
  }
436
- if (wait) return;
583
+ if (wait)
584
+ return;
585
+ let res;
586
+ if (Transition) {
587
+ if (!Transition.promises.size && !Transition.queue.size) {
588
+ const sources = Transition.sources;
589
+ const disposed = Transition.disposed;
590
+ Effects.push.apply(Effects, Transition.effects);
591
+ res = Transition.resolve;
592
+ for (const e2 of Effects) {
593
+ "tState" in e2 && (e2.state = e2.tState);
594
+ delete e2.tState;
595
+ }
596
+ Transition = null;
597
+ runUpdates(() => {
598
+ for (const d of disposed)
599
+ cleanNode(d);
600
+ for (const v of sources) {
601
+ v.value = v.tValue;
602
+ if (v.owned) {
603
+ for (let i = 0, len = v.owned.length; i < len; i++)
604
+ cleanNode(v.owned[i]);
605
+ }
606
+ if (v.tOwned)
607
+ v.owned = v.tOwned;
608
+ delete v.tValue;
609
+ delete v.tOwned;
610
+ v.tState = 0;
611
+ }
612
+ setTransPending(false);
613
+ }, false);
614
+ } else if (Transition.running) {
615
+ Transition.running = false;
616
+ Transition.effects.push.apply(Transition.effects, Effects);
617
+ Effects = null;
618
+ setTransPending(true);
619
+ return;
620
+ }
621
+ }
437
622
  const e = Effects;
438
623
  Effects = null;
439
- if (e.length) runUpdates(() => runEffects(e), false);
624
+ if (e.length)
625
+ runUpdates(() => runEffects(e), false);
626
+ if (res)
627
+ res();
440
628
  }
441
629
  function runQueue(queue) {
442
- for (let i = 0; i < queue.length; i++) runTop(queue[i]);
630
+ for (let i = 0; i < queue.length; i++)
631
+ runTop(queue[i]);
632
+ }
633
+ function scheduleQueue(queue) {
634
+ for (let i = 0; i < queue.length; i++) {
635
+ const item = queue[i];
636
+ const tasks = Transition.queue;
637
+ if (!tasks.has(item)) {
638
+ tasks.add(item);
639
+ Scheduler(() => {
640
+ tasks.delete(item);
641
+ runUpdates(() => {
642
+ Transition.running = true;
643
+ runTop(item);
644
+ }, false);
645
+ Transition && (Transition.running = false);
646
+ });
647
+ }
648
+ }
443
649
  }
444
650
  function runUserEffects(queue) {
445
- let i,
446
- userLength = 0;
651
+ let i, userLength = 0;
447
652
  for (i = 0; i < queue.length; i++) {
448
653
  const e = queue[i];
449
- if (!e.user) runTop(e);else queue[userLength++] = e;
654
+ if (!e.user)
655
+ runTop(e);
656
+ else
657
+ queue[userLength++] = e;
450
658
  }
451
- if (sharedConfig.context) setHydrateContext();
452
- for (i = 0; i < userLength; i++) runTop(queue[i]);
659
+ if (sharedConfig.context)
660
+ setHydrateContext();
661
+ for (i = 0; i < userLength; i++)
662
+ runTop(queue[i]);
453
663
  }
454
664
  function lookUpstream(node, ignore) {
455
- const runningTransition = Transition ;
456
- node.state = 0;
665
+ const runningTransition = Transition && Transition.running;
666
+ if (runningTransition)
667
+ node.tState = 0;
668
+ else
669
+ node.state = 0;
457
670
  for (let i = 0; i < node.sources.length; i += 1) {
458
671
  const source = node.sources[i];
459
672
  if (source.sources) {
460
- if (source.state === STALE || runningTransition ) {
461
- if (source !== ignore && (!source.updatedAt || source.updatedAt < ExecCount)) runTop(source);
462
- } else if (source.state === PENDING || runningTransition ) lookUpstream(source, ignore);
673
+ if (!runningTransition && source.state === STALE || runningTransition && source.tState === STALE) {
674
+ if (source !== ignore && (!source.updatedAt || source.updatedAt < ExecCount))
675
+ runTop(source);
676
+ } else if (!runningTransition && source.state === PENDING || runningTransition && source.tState === PENDING)
677
+ lookUpstream(source, ignore);
463
678
  }
464
679
  }
465
680
  }
466
681
  function markDownstream(node) {
467
- const runningTransition = Transition ;
682
+ const runningTransition = Transition && Transition.running;
468
683
  for (let i = 0; i < node.observers.length; i += 1) {
469
684
  const o = node.observers[i];
470
- if (!o.state || runningTransition ) {
471
- o.state = PENDING;
472
- if (o.pure) Updates.push(o);else Effects.push(o);
685
+ if (!runningTransition && !o.state || runningTransition && !o.tState) {
686
+ if (runningTransition)
687
+ o.tState = PENDING;
688
+ else
689
+ o.state = PENDING;
690
+ if (o.pure)
691
+ Updates.push(o);
692
+ else
693
+ Effects.push(o);
473
694
  o.observers && markDownstream(o);
474
695
  }
475
696
  }
@@ -478,12 +699,9 @@ function cleanNode(node) {
478
699
  let i;
479
700
  if (node.sources) {
480
701
  while (node.sources.length) {
481
- const source = node.sources.pop(),
482
- index = node.sourceSlots.pop(),
483
- obs = source.observers;
702
+ const source = node.sources.pop(), index = node.sourceSlots.pop(), obs = source.observers;
484
703
  if (obs && obs.length) {
485
- const n = obs.pop(),
486
- s = source.observerSlots.pop();
704
+ const n = obs.pop(), s = source.observerSlots.pop();
487
705
  if (index < obs.length) {
488
706
  n.sourceSlots[s] = index;
489
707
  obs[index] = n;
@@ -492,39 +710,78 @@ function cleanNode(node) {
492
710
  }
493
711
  }
494
712
  }
495
- if (node.owned) {
496
- for (i = 0; i < node.owned.length; i++) cleanNode(node.owned[i]);
713
+ if (Transition && Transition.running && node.pure) {
714
+ if (node.tOwned) {
715
+ for (i = 0; i < node.tOwned.length; i++)
716
+ cleanNode(node.tOwned[i]);
717
+ delete node.tOwned;
718
+ }
719
+ reset(node, true);
720
+ } else if (node.owned) {
721
+ for (i = 0; i < node.owned.length; i++)
722
+ cleanNode(node.owned[i]);
497
723
  node.owned = null;
498
724
  }
499
725
  if (node.cleanups) {
500
- for (i = 0; i < node.cleanups.length; i++) node.cleanups[i]();
726
+ for (i = 0; i < node.cleanups.length; i++)
727
+ node.cleanups[i]();
501
728
  node.cleanups = null;
502
729
  }
503
- node.state = 0;
730
+ if (Transition && Transition.running)
731
+ node.tState = 0;
732
+ else
733
+ node.state = 0;
504
734
  node.context = null;
505
735
  }
736
+ function reset(node, top) {
737
+ if (!top) {
738
+ node.tState = 0;
739
+ Transition.disposed.add(node);
740
+ }
741
+ if (node.owned) {
742
+ for (let i = 0; i < node.owned.length; i++)
743
+ reset(node.owned[i]);
744
+ }
745
+ }
506
746
  function castError(err) {
507
- if (err instanceof Error || typeof err === "string") return err;
747
+ if (err instanceof Error || typeof err === "string")
748
+ return err;
508
749
  return new Error("Unknown error");
509
750
  }
751
+ function runErrors(fns, err) {
752
+ for (const f of fns)
753
+ f(err);
754
+ }
510
755
  function handleError(err) {
511
756
  err = castError(err);
512
- throw err;
757
+ const fns = ERROR && lookup(Owner, ERROR);
758
+ if (!fns)
759
+ throw err;
760
+ if (Effects)
761
+ Effects.push({
762
+ fn() {
763
+ runErrors(fns, err);
764
+ },
765
+ state: STALE
766
+ });
767
+ else
768
+ runErrors(fns, err);
513
769
  }
514
770
  function lookup(owner, key) {
515
- return owner ? owner.context && owner.context[key] !== undefined ? owner.context[key] : lookup(owner.owner, key) : undefined;
771
+ return owner ? owner.context && owner.context[key] !== void 0 ? owner.context[key] : lookup(owner.owner, key) : void 0;
516
772
  }
517
- function resolveChildren(children) {
518
- if (typeof children === "function" && !children.length) return resolveChildren(children());
519
- if (Array.isArray(children)) {
773
+ function resolveChildren(children2) {
774
+ if (typeof children2 === "function" && !children2.length)
775
+ return resolveChildren(children2());
776
+ if (Array.isArray(children2)) {
520
777
  const results = [];
521
- for (let i = 0; i < children.length; i++) {
522
- const result = resolveChildren(children[i]);
778
+ for (let i = 0; i < children2.length; i++) {
779
+ const result = resolveChildren(children2[i]);
523
780
  Array.isArray(result) ? results.push.apply(results, result) : results.push(result);
524
781
  }
525
782
  return results;
526
783
  }
527
- return children;
784
+ return children2;
528
785
  }
529
786
  function createProvider(id, options) {
530
787
  return function provider(props) {
@@ -534,37 +791,23 @@ function createProvider(id, options) {
534
791
  [id]: props.value
535
792
  };
536
793
  return children(() => props.children);
537
- }), undefined);
794
+ }), void 0);
538
795
  return res;
539
796
  };
540
797
  }
541
- const FALLBACK = Symbol("fallback");
798
+ var FALLBACK = Symbol("fallback");
542
799
  function dispose(d) {
543
- for (let i = 0; i < d.length; i++) d[i]();
800
+ for (let i = 0; i < d.length; i++)
801
+ d[i]();
544
802
  }
545
803
  function mapArray(list, mapFn, options = {}) {
546
- let items = [],
547
- mapped = [],
548
- disposers = [],
549
- len = 0,
550
- indexes = mapFn.length > 1 ? [] : null;
804
+ let items = [], mapped = [], disposers = [], len = 0, indexes = mapFn.length > 1 ? [] : null;
551
805
  onCleanup(() => dispose(disposers));
552
806
  return () => {
553
- let newItems = list() || [],
554
- i,
555
- j;
807
+ let newItems = list() || [], i, j;
556
808
  newItems[$TRACK];
557
809
  return untrack(() => {
558
- let newLen = newItems.length,
559
- newIndices,
560
- newIndicesNext,
561
- temp,
562
- tempdisposers,
563
- tempIndexes,
564
- start,
565
- end,
566
- newEnd,
567
- item;
810
+ let newLen = newItems.length, newIndices, newIndicesNext, temp, tempdisposers, tempIndexes, start, end, newEnd, item;
568
811
  if (newLen === 0) {
569
812
  if (len !== 0) {
570
813
  dispose(disposers);
@@ -576,7 +819,7 @@ function mapArray(list, mapFn, options = {}) {
576
819
  }
577
820
  if (options.fallback) {
578
821
  items = [FALLBACK];
579
- mapped[0] = createRoot(disposer => {
822
+ mapped[0] = createRoot((disposer) => {
580
823
  disposers[0] = disposer;
581
824
  return options.fallback();
582
825
  });
@@ -593,30 +836,32 @@ function mapArray(list, mapFn, options = {}) {
593
836
  temp = new Array(newLen);
594
837
  tempdisposers = new Array(newLen);
595
838
  indexes && (tempIndexes = new Array(newLen));
596
- for (start = 0, end = Math.min(len, newLen); start < end && items[start] === newItems[start]; start++);
839
+ for (start = 0, end = Math.min(len, newLen); start < end && items[start] === newItems[start]; start++)
840
+ ;
597
841
  for (end = len - 1, newEnd = newLen - 1; end >= start && newEnd >= start && items[end] === newItems[newEnd]; end--, newEnd--) {
598
842
  temp[newEnd] = mapped[end];
599
843
  tempdisposers[newEnd] = disposers[end];
600
844
  indexes && (tempIndexes[newEnd] = indexes[end]);
601
845
  }
602
- newIndices = new Map();
846
+ newIndices = /* @__PURE__ */ new Map();
603
847
  newIndicesNext = new Array(newEnd + 1);
604
848
  for (j = newEnd; j >= start; j--) {
605
849
  item = newItems[j];
606
850
  i = newIndices.get(item);
607
- newIndicesNext[j] = i === undefined ? -1 : i;
851
+ newIndicesNext[j] = i === void 0 ? -1 : i;
608
852
  newIndices.set(item, j);
609
853
  }
610
854
  for (i = start; i <= end; i++) {
611
855
  item = items[i];
612
856
  j = newIndices.get(item);
613
- if (j !== undefined && j !== -1) {
857
+ if (j !== void 0 && j !== -1) {
614
858
  temp[j] = mapped[i];
615
859
  tempdisposers[j] = disposers[i];
616
860
  indexes && (tempIndexes[j] = indexes[i]);
617
861
  j = newIndicesNext[j];
618
862
  newIndices.set(item, j);
619
- } else disposers[i]();
863
+ } else
864
+ disposers[i]();
620
865
  }
621
866
  for (j = start; j < newLen; j++) {
622
867
  if (j in temp) {
@@ -626,7 +871,8 @@ function mapArray(list, mapFn, options = {}) {
626
871
  indexes[j] = tempIndexes[j];
627
872
  indexes[j](j);
628
873
  }
629
- } else mapped[j] = createRoot(mapper);
874
+ } else
875
+ mapped[j] = createRoot(mapper);
630
876
  }
631
877
  mapped = mapped.slice(0, len = newLen);
632
878
  items = newItems.slice(0);
@@ -645,12 +891,7 @@ function mapArray(list, mapFn, options = {}) {
645
891
  };
646
892
  }
647
893
  function indexArray(list, mapFn, options = {}) {
648
- let items = [],
649
- mapped = [],
650
- disposers = [],
651
- signals = [],
652
- len = 0,
653
- i;
894
+ let items = [], mapped = [], disposers = [], signals = [], len = 0, i;
654
895
  onCleanup(() => dispose(disposers));
655
896
  return () => {
656
897
  const newItems = list() || [];
@@ -667,7 +908,7 @@ function indexArray(list, mapFn, options = {}) {
667
908
  }
668
909
  if (options.fallback) {
669
910
  items = [FALLBACK];
670
- mapped[0] = createRoot(disposer => {
911
+ mapped[0] = createRoot((disposer) => {
671
912
  disposers[0] = disposer;
672
913
  return options.fallback();
673
914
  });
@@ -704,19 +945,31 @@ function indexArray(list, mapFn, options = {}) {
704
945
  }
705
946
  };
706
947
  }
948
+ var hydrationEnabled = false;
707
949
  function createComponent(Comp, props) {
950
+ if (hydrationEnabled) {
951
+ if (sharedConfig.context) {
952
+ const c = sharedConfig.context;
953
+ setHydrateContext(nextHydrateContext());
954
+ const r = untrack(() => Comp(props || {}));
955
+ setHydrateContext(c);
956
+ return r;
957
+ }
958
+ }
708
959
  return untrack(() => Comp(props || {}));
709
960
  }
710
961
  function trueFn() {
711
962
  return true;
712
963
  }
713
- const propTraps = {
964
+ var propTraps = {
714
965
  get(_, property, receiver) {
715
- if (property === $PROXY) return receiver;
966
+ if (property === $PROXY)
967
+ return receiver;
716
968
  return _.get(property);
717
969
  },
718
970
  has(_, property) {
719
- if (property === $PROXY) return true;
971
+ if (property === $PROXY)
972
+ return true;
720
973
  return _.has(property);
721
974
  },
722
975
  set: trueFn,
@@ -751,18 +1004,21 @@ function mergeProps(...sources) {
751
1004
  get(property) {
752
1005
  for (let i = sources.length - 1; i >= 0; i--) {
753
1006
  const v = resolveSource(sources[i])[property];
754
- if (v !== undefined) return v;
1007
+ if (v !== void 0)
1008
+ return v;
755
1009
  }
756
1010
  },
757
1011
  has(property) {
758
1012
  for (let i = sources.length - 1; i >= 0; i--) {
759
- if (property in resolveSource(sources[i])) return true;
1013
+ if (property in resolveSource(sources[i]))
1014
+ return true;
760
1015
  }
761
1016
  return false;
762
1017
  },
763
1018
  keys() {
764
1019
  const keys = [];
765
- for (let i = 0; i < sources.length; i++) keys.push(...Object.keys(resolveSource(sources[i])));
1020
+ for (let i = 0; i < sources.length; i++)
1021
+ keys.push(...Object.keys(resolveSource(sources[i])));
766
1022
  return [...new Set(keys)];
767
1023
  }
768
1024
  }, propTraps);
@@ -772,13 +1028,15 @@ function mergeProps(...sources) {
772
1028
  if (sources[i]) {
773
1029
  const descriptors = Object.getOwnPropertyDescriptors(sources[i]);
774
1030
  for (const key in descriptors) {
775
- if (key in target) continue;
1031
+ if (key in target)
1032
+ continue;
776
1033
  Object.defineProperty(target, key, {
777
1034
  enumerable: true,
778
1035
  get() {
779
- for (let i = sources.length - 1; i >= 0; i--) {
780
- const v = (sources[i] || {})[key];
781
- if (v !== undefined) return v;
1036
+ for (let i2 = sources.length - 1; i2 >= 0; i2--) {
1037
+ const v = (sources[i2] || {})[key];
1038
+ if (v !== void 0)
1039
+ return v;
782
1040
  }
783
1041
  }
784
1042
  });
@@ -790,24 +1048,26 @@ function mergeProps(...sources) {
790
1048
  function lazy(fn) {
791
1049
  let comp;
792
1050
  let p;
793
- const wrap = props => {
1051
+ const wrap = (props) => {
794
1052
  const ctx = sharedConfig.context;
795
1053
  if (ctx) {
796
1054
  const [s, set] = createSignal();
797
- (p || (p = fn())).then(mod => {
1055
+ (p || (p = fn())).then((mod) => {
798
1056
  setHydrateContext(ctx);
799
1057
  set(() => mod.default);
800
1058
  setHydrateContext();
801
1059
  });
802
1060
  comp = s;
803
1061
  } else if (!comp) {
804
- const [s] = createResource(() => (p || (p = fn())).then(mod => mod.default));
1062
+ const [s] = createResource(() => (p || (p = fn())).then((mod) => mod.default));
805
1063
  comp = s;
806
1064
  }
807
1065
  let Comp;
808
1066
  return createMemo(() => (Comp = comp()) && untrack(() => {
809
- if (false) ;
810
- if (!ctx) return Comp(props);
1067
+ if (false)
1068
+ ;
1069
+ if (!ctx)
1070
+ return Comp(props);
811
1071
  const c = sharedConfig.context;
812
1072
  setHydrateContext(ctx);
813
1073
  const r = Comp(props);
@@ -815,25 +1075,25 @@ function lazy(fn) {
815
1075
  return r;
816
1076
  }));
817
1077
  };
818
- wrap.preload = () => p || ((p = fn()).then(mod => comp = () => mod.default), p);
1078
+ wrap.preload = () => p || ((p = fn()).then((mod) => comp = () => mod.default), p);
819
1079
  return wrap;
820
1080
  }
821
1081
  function For(props) {
822
1082
  const fallback = "fallback" in props && {
823
1083
  fallback: () => props.fallback
824
1084
  };
825
- return createMemo(mapArray(() => props.each, props.children, fallback || undefined));
1085
+ return createMemo(mapArray(() => props.each, props.children, fallback || void 0));
826
1086
  }
827
1087
  function Index(props) {
828
1088
  const fallback = "fallback" in props && {
829
1089
  fallback: () => props.fallback
830
1090
  };
831
- return createMemo(indexArray(() => props.each, props.children, fallback || undefined));
1091
+ return createMemo(indexArray(() => props.each, props.children, fallback || void 0));
832
1092
  }
833
1093
  function Show(props) {
834
1094
  let strictEqual = false;
835
1095
  const keyed = props.keyed;
836
- const condition = createMemo(() => props.when, undefined, {
1096
+ const condition = createMemo(() => props.when, void 0, {
837
1097
  equals: (a, b) => strictEqual ? a === b : !a === !b
838
1098
  });
839
1099
  return createMemo(() => {
@@ -845,48 +1105,50 @@ function Show(props) {
845
1105
  return fn ? untrack(() => child(c)) : child;
846
1106
  }
847
1107
  return props.fallback;
848
- }, undefined, undefined);
1108
+ }, void 0, void 0);
849
1109
  }
850
1110
  function Switch(props) {
851
1111
  let strictEqual = false;
852
1112
  let keyed = false;
853
1113
  const equals = (a, b) => a[0] === b[0] && (strictEqual ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2];
854
- const conditions = children(() => props.children),
855
- evalConditions = createMemo(() => {
856
- let conds = conditions();
857
- if (!Array.isArray(conds)) conds = [conds];
858
- for (let i = 0; i < conds.length; i++) {
859
- const c = conds[i].when;
860
- if (c) {
861
- keyed = !!conds[i].keyed;
862
- return [i, c, conds[i]];
863
- }
1114
+ const conditions = children(() => props.children), evalConditions = createMemo(() => {
1115
+ let conds = conditions();
1116
+ if (!Array.isArray(conds))
1117
+ conds = [conds];
1118
+ for (let i = 0; i < conds.length; i++) {
1119
+ const c = conds[i].when;
1120
+ if (c) {
1121
+ keyed = !!conds[i].keyed;
1122
+ return [i, c, conds[i]];
864
1123
  }
865
- return [-1];
866
- }, undefined, {
867
- equals
868
- });
1124
+ }
1125
+ return [-1];
1126
+ }, void 0, {
1127
+ equals
1128
+ });
869
1129
  return createMemo(() => {
870
1130
  const [index, when, cond] = evalConditions();
871
- if (index < 0) return props.fallback;
1131
+ if (index < 0)
1132
+ return props.fallback;
872
1133
  const c = cond.children;
873
1134
  const fn = typeof c === "function" && c.length > 0;
874
1135
  strictEqual = keyed || fn;
875
1136
  return fn ? untrack(() => c(when)) : c;
876
- }, undefined, undefined);
1137
+ }, void 0, void 0);
877
1138
  }
878
1139
  function Match(props) {
879
1140
  return props;
880
1141
  }
881
1142
 
882
- const booleans = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"];
883
- const Properties = /*#__PURE__*/new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans]);
884
- const ChildProperties = /*#__PURE__*/new Set(["innerHTML", "textContent", "innerText", "children"]);
885
- const Aliases = /*#__PURE__*/Object.assign(Object.create(null), {
1143
+ // ../../node_modules/.pnpm/solid-js@1.6.13/node_modules/solid-js/web/dist/web.js
1144
+ var booleans = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"];
1145
+ var Properties = /* @__PURE__ */ new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans]);
1146
+ var ChildProperties = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]);
1147
+ var Aliases = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
886
1148
  className: "class",
887
1149
  htmlFor: "for"
888
1150
  });
889
- const PropAliases = /*#__PURE__*/Object.assign(Object.create(null), {
1151
+ var PropAliases = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
890
1152
  class: "className",
891
1153
  formnovalidate: "formNoValidate",
892
1154
  ismap: "isMap",
@@ -894,19 +1156,13 @@ const PropAliases = /*#__PURE__*/Object.assign(Object.create(null), {
894
1156
  playsinline: "playsInline",
895
1157
  readonly: "readOnly"
896
1158
  });
897
- const 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"]);
898
- const SVGNamespace = {
1159
+ 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"]);
1160
+ var SVGNamespace = {
899
1161
  xlink: "http://www.w3.org/1999/xlink",
900
1162
  xml: "http://www.w3.org/XML/1998/namespace"
901
1163
  };
902
1164
  function reconcileArrays(parentNode, a, b) {
903
- let bLength = b.length,
904
- aEnd = a.length,
905
- bEnd = bLength,
906
- aStart = 0,
907
- bStart = 0,
908
- after = a[aEnd - 1].nextSibling,
909
- map = null;
1165
+ let bLength = b.length, aEnd = a.length, bEnd = bLength, aStart = 0, bStart = 0, after = a[aEnd - 1].nextSibling, map = null;
910
1166
  while (aStart < aEnd || bStart < bEnd) {
911
1167
  if (a[aStart] === b[bStart]) {
912
1168
  aStart++;
@@ -919,10 +1175,12 @@ function reconcileArrays(parentNode, a, b) {
919
1175
  }
920
1176
  if (aEnd === aStart) {
921
1177
  const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after;
922
- while (bStart < bEnd) parentNode.insertBefore(b[bStart++], node);
1178
+ while (bStart < bEnd)
1179
+ parentNode.insertBefore(b[bStart++], node);
923
1180
  } else if (bEnd === bStart) {
924
1181
  while (aStart < aEnd) {
925
- if (!map || !map.has(a[aStart])) a[aStart].remove();
1182
+ if (!map || !map.has(a[aStart]))
1183
+ a[aStart].remove();
926
1184
  aStart++;
927
1185
  }
928
1186
  } else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) {
@@ -932,35 +1190,39 @@ function reconcileArrays(parentNode, a, b) {
932
1190
  a[aEnd] = b[bEnd];
933
1191
  } else {
934
1192
  if (!map) {
935
- map = new Map();
1193
+ map = /* @__PURE__ */ new Map();
936
1194
  let i = bStart;
937
- while (i < bEnd) map.set(b[i], i++);
1195
+ while (i < bEnd)
1196
+ map.set(b[i], i++);
938
1197
  }
939
1198
  const index = map.get(a[aStart]);
940
1199
  if (index != null) {
941
1200
  if (bStart < index && index < bEnd) {
942
- let i = aStart,
943
- sequence = 1,
944
- t;
1201
+ let i = aStart, sequence = 1, t;
945
1202
  while (++i < aEnd && i < bEnd) {
946
- if ((t = map.get(a[i])) == null || t !== index + sequence) break;
1203
+ if ((t = map.get(a[i])) == null || t !== index + sequence)
1204
+ break;
947
1205
  sequence++;
948
1206
  }
949
1207
  if (sequence > index - bStart) {
950
1208
  const node = a[aStart];
951
- while (bStart < index) parentNode.insertBefore(b[bStart++], node);
952
- } else parentNode.replaceChild(b[bStart++], a[aStart++]);
953
- } else aStart++;
954
- } else a[aStart++].remove();
1209
+ while (bStart < index)
1210
+ parentNode.insertBefore(b[bStart++], node);
1211
+ } else
1212
+ parentNode.replaceChild(b[bStart++], a[aStart++]);
1213
+ } else
1214
+ aStart++;
1215
+ } else
1216
+ a[aStart++].remove();
955
1217
  }
956
1218
  }
957
1219
  }
958
- const $$EVENTS = "_$DX_DELEGATE";
1220
+ var $$EVENTS = "_$DX_DELEGATE";
959
1221
  function render(code, element, init, options = {}) {
960
1222
  let disposer;
961
- createRoot(dispose => {
962
- disposer = dispose;
963
- element === document ? code() : insert(element, code(), element.firstChild ? null : undefined, init);
1223
+ createRoot((dispose2) => {
1224
+ disposer = dispose2;
1225
+ element === document ? code() : insert(element, code(), element.firstChild ? null : void 0, init);
964
1226
  }, options.owner);
965
1227
  return () => {
966
1228
  disposer();
@@ -970,65 +1232,83 @@ function render(code, element, init, options = {}) {
970
1232
  function template(html, check, isSVG) {
971
1233
  const t = document.createElement("template");
972
1234
  t.innerHTML = html;
973
- if (check && t.innerHTML.split("<").length - 1 !== check) throw `The browser resolved template HTML does not match JSX input:\n${t.innerHTML}\n\n${html}. Is your HTML properly formed?`;
1235
+ if (check && t.innerHTML.split("<").length - 1 !== check)
1236
+ throw `The browser resolved template HTML does not match JSX input:
1237
+ ${t.innerHTML}
1238
+
1239
+ ${html}. Is your HTML properly formed?`;
974
1240
  let node = t.content.firstChild;
975
- if (isSVG) node = node.firstChild;
1241
+ if (isSVG)
1242
+ node = node.firstChild;
976
1243
  return node;
977
1244
  }
978
- function delegateEvents(eventNames, document = window.document) {
979
- const e = document[$$EVENTS] || (document[$$EVENTS] = new Set());
1245
+ function delegateEvents(eventNames, document2 = window.document) {
1246
+ const e = document2[$$EVENTS] || (document2[$$EVENTS] = /* @__PURE__ */ new Set());
980
1247
  for (let i = 0, l = eventNames.length; i < l; i++) {
981
1248
  const name = eventNames[i];
982
1249
  if (!e.has(name)) {
983
1250
  e.add(name);
984
- document.addEventListener(name, eventHandler);
1251
+ document2.addEventListener(name, eventHandler);
985
1252
  }
986
1253
  }
987
1254
  }
988
1255
  function setAttribute(node, name, value) {
989
- if (value == null) node.removeAttribute(name);else node.setAttribute(name, value);
1256
+ if (value == null)
1257
+ node.removeAttribute(name);
1258
+ else
1259
+ node.setAttribute(name, value);
990
1260
  }
991
1261
  function setAttributeNS(node, namespace, name, value) {
992
- if (value == null) node.removeAttributeNS(namespace, name);else node.setAttributeNS(namespace, name, value);
1262
+ if (value == null)
1263
+ node.removeAttributeNS(namespace, name);
1264
+ else
1265
+ node.setAttributeNS(namespace, name, value);
993
1266
  }
994
1267
  function className(node, value) {
995
- if (value == null) node.removeAttribute("class");else node.className = value;
1268
+ if (value == null)
1269
+ node.removeAttribute("class");
1270
+ else
1271
+ node.className = value;
996
1272
  }
997
1273
  function addEventListener(node, name, handler, delegate) {
998
1274
  if (delegate) {
999
1275
  if (Array.isArray(handler)) {
1000
1276
  node[`$$${name}`] = handler[0];
1001
1277
  node[`$$${name}Data`] = handler[1];
1002
- } else node[`$$${name}`] = handler;
1278
+ } else
1279
+ node[`$$${name}`] = handler;
1003
1280
  } else if (Array.isArray(handler)) {
1004
1281
  const handlerFn = handler[0];
1005
- node.addEventListener(name, handler[0] = e => handlerFn.call(node, handler[1], e));
1006
- } else node.addEventListener(name, handler);
1282
+ node.addEventListener(name, handler[0] = (e) => handlerFn.call(node, handler[1], e));
1283
+ } else
1284
+ node.addEventListener(name, handler);
1007
1285
  }
1008
1286
  function classList(node, value, prev = {}) {
1009
- const classKeys = Object.keys(value || {}),
1010
- prevKeys = Object.keys(prev);
1287
+ const classKeys = Object.keys(value || {}), prevKeys = Object.keys(prev);
1011
1288
  let i, len;
1012
1289
  for (i = 0, len = prevKeys.length; i < len; i++) {
1013
1290
  const key = prevKeys[i];
1014
- if (!key || key === "undefined" || value[key]) continue;
1291
+ if (!key || key === "undefined" || value[key])
1292
+ continue;
1015
1293
  toggleClassKey(node, key, false);
1016
1294
  delete prev[key];
1017
1295
  }
1018
1296
  for (i = 0, len = classKeys.length; i < len; i++) {
1019
- const key = classKeys[i],
1020
- classValue = !!value[key];
1021
- if (!key || key === "undefined" || prev[key] === classValue || !classValue) continue;
1297
+ const key = classKeys[i], classValue = !!value[key];
1298
+ if (!key || key === "undefined" || prev[key] === classValue || !classValue)
1299
+ continue;
1022
1300
  toggleClassKey(node, key, true);
1023
1301
  prev[key] = classValue;
1024
1302
  }
1025
1303
  return prev;
1026
1304
  }
1027
1305
  function style(node, value, prev) {
1028
- if (!value) return prev ? setAttribute(node, "style") : value;
1306
+ if (!value)
1307
+ return prev ? setAttribute(node, "style") : value;
1029
1308
  const nodeStyle = node.style;
1030
- if (typeof value === "string") return nodeStyle.cssText = value;
1031
- typeof prev === "string" && (nodeStyle.cssText = prev = undefined);
1309
+ if (typeof value === "string")
1310
+ return nodeStyle.cssText = value;
1311
+ typeof prev === "string" && (nodeStyle.cssText = prev = void 0);
1032
1312
  prev || (prev = {});
1033
1313
  value || (value = {});
1034
1314
  let v, s;
@@ -1058,21 +1338,25 @@ function use(fn, element, arg) {
1058
1338
  return untrack(() => fn(element, arg));
1059
1339
  }
1060
1340
  function insert(parent, accessor, marker, initial) {
1061
- if (marker !== undefined && !initial) initial = [];
1062
- if (typeof accessor !== "function") return insertExpression(parent, accessor, initial, marker);
1063
- createRenderEffect(current => insertExpression(parent, accessor(), current, marker), initial);
1341
+ if (marker !== void 0 && !initial)
1342
+ initial = [];
1343
+ if (typeof accessor !== "function")
1344
+ return insertExpression(parent, accessor, initial, marker);
1345
+ createRenderEffect((current) => insertExpression(parent, accessor(), current, marker), initial);
1064
1346
  }
1065
1347
  function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {
1066
1348
  props || (props = {});
1067
1349
  for (const prop in prevProps) {
1068
1350
  if (!(prop in props)) {
1069
- if (prop === "children") continue;
1351
+ if (prop === "children")
1352
+ continue;
1070
1353
  prevProps[prop] = assignProp(node, prop, null, prevProps[prop], isSVG, skipRef);
1071
1354
  }
1072
1355
  }
1073
1356
  for (const prop in props) {
1074
1357
  if (prop === "children") {
1075
- if (!skipChildren) insertExpression(node, props.children);
1358
+ if (!skipChildren)
1359
+ insertExpression(node, props.children);
1076
1360
  continue;
1077
1361
  }
1078
1362
  const value = props[prop];
@@ -1084,15 +1368,20 @@ function toPropertyName(name) {
1084
1368
  }
1085
1369
  function toggleClassKey(node, key, value) {
1086
1370
  const classNames = key.trim().split(/\s+/);
1087
- for (let i = 0, nameLen = classNames.length; i < nameLen; i++) node.classList.toggle(classNames[i], value);
1371
+ for (let i = 0, nameLen = classNames.length; i < nameLen; i++)
1372
+ node.classList.toggle(classNames[i], value);
1088
1373
  }
1089
1374
  function assignProp(node, prop, value, prev, isSVG, skipRef) {
1090
1375
  let isCE, isProp, isChildProp;
1091
- if (prop === "style") return style(node, value, prev);
1092
- if (prop === "classList") return classList(node, value, prev);
1093
- if (value === prev) return prev;
1376
+ if (prop === "style")
1377
+ return style(node, value, prev);
1378
+ if (prop === "classList")
1379
+ return classList(node, value, prev);
1380
+ if (value === prev)
1381
+ return prev;
1094
1382
  if (prop === "ref") {
1095
- if (!skipRef) value(node);
1383
+ if (!skipRef)
1384
+ value(node);
1096
1385
  } else if (prop.slice(0, 3) === "on:") {
1097
1386
  const e = prop.slice(3);
1098
1387
  prev && node.removeEventListener(e, prev);
@@ -1113,10 +1402,18 @@ function assignProp(node, prop, value, prev, isSVG, skipRef) {
1113
1402
  delegate && delegateEvents([name]);
1114
1403
  }
1115
1404
  } else if ((isChildProp = ChildProperties.has(prop)) || !isSVG && (PropAliases[prop] || (isProp = Properties.has(prop))) || (isCE = node.nodeName.includes("-"))) {
1116
- if (prop === "class" || prop === "className") className(node, value);else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;else node[PropAliases[prop] || prop] = value;
1405
+ if (prop === "class" || prop === "className")
1406
+ className(node, value);
1407
+ else if (isCE && !isProp && !isChildProp)
1408
+ node[toPropertyName(prop)] = value;
1409
+ else
1410
+ node[PropAliases[prop] || prop] = value;
1117
1411
  } else {
1118
1412
  const ns = isSVG && prop.indexOf(":") > -1 && SVGNamespace[prop.split(":")[0]];
1119
- if (ns) setAttributeNS(node, ns, prop, value);else setAttribute(node, Aliases[prop] || prop, value);
1413
+ if (ns)
1414
+ setAttributeNS(node, ns, prop, value);
1415
+ else
1416
+ setAttribute(node, Aliases[prop] || prop, value);
1120
1417
  }
1121
1418
  return value;
1122
1419
  }
@@ -1137,7 +1434,7 @@ function eventHandler(e) {
1137
1434
  });
1138
1435
  if (sharedConfig.registry && !sharedConfig.done) {
1139
1436
  sharedConfig.done = true;
1140
- document.querySelectorAll("[id^=pl-]").forEach(elem => {
1437
+ document.querySelectorAll("[id^=pl-]").forEach((elem) => {
1141
1438
  while (elem && elem.nodeType !== 8 && elem.nodeValue !== "pl-" + e) {
1142
1439
  let x = elem.nextSibling;
1143
1440
  elem.remove();
@@ -1150,40 +1447,49 @@ function eventHandler(e) {
1150
1447
  const handler = node[key];
1151
1448
  if (handler && !node.disabled) {
1152
1449
  const data = node[`${key}Data`];
1153
- data !== undefined ? handler.call(node, data, e) : handler.call(node, e);
1154
- if (e.cancelBubble) return;
1450
+ data !== void 0 ? handler.call(node, data, e) : handler.call(node, e);
1451
+ if (e.cancelBubble)
1452
+ return;
1155
1453
  }
1156
1454
  node = node._$host || node.parentNode || node.host;
1157
1455
  }
1158
1456
  }
1159
1457
  function insertExpression(parent, value, current, marker, unwrapArray) {
1160
- if (sharedConfig.context && !current) current = [...parent.childNodes];
1161
- while (typeof current === "function") current = current();
1162
- if (value === current) return current;
1163
- const t = typeof value,
1164
- multi = marker !== undefined;
1458
+ if (sharedConfig.context && !current)
1459
+ current = [...parent.childNodes];
1460
+ while (typeof current === "function")
1461
+ current = current();
1462
+ if (value === current)
1463
+ return current;
1464
+ const t = typeof value, multi = marker !== void 0;
1165
1465
  parent = multi && current[0] && current[0].parentNode || parent;
1166
1466
  if (t === "string" || t === "number") {
1167
- if (sharedConfig.context) return current;
1168
- if (t === "number") value = value.toString();
1467
+ if (sharedConfig.context)
1468
+ return current;
1469
+ if (t === "number")
1470
+ value = value.toString();
1169
1471
  if (multi) {
1170
1472
  let node = current[0];
1171
1473
  if (node && node.nodeType === 3) {
1172
1474
  node.data = value;
1173
- } else node = document.createTextNode(value);
1475
+ } else
1476
+ node = document.createTextNode(value);
1174
1477
  current = cleanChildren(parent, current, marker, node);
1175
1478
  } else {
1176
1479
  if (current !== "" && typeof current === "string") {
1177
1480
  current = parent.firstChild.data = value;
1178
- } else current = parent.textContent = value;
1481
+ } else
1482
+ current = parent.textContent = value;
1179
1483
  }
1180
1484
  } else if (value == null || t === "boolean") {
1181
- if (sharedConfig.context) return current;
1485
+ if (sharedConfig.context)
1486
+ return current;
1182
1487
  current = cleanChildren(parent, current, marker);
1183
1488
  } else if (t === "function") {
1184
1489
  createRenderEffect(() => {
1185
1490
  let v = value();
1186
- while (typeof v === "function") v = v();
1491
+ while (typeof v === "function")
1492
+ v = v();
1187
1493
  current = insertExpression(parent, v, current, marker);
1188
1494
  });
1189
1495
  return () => current;
@@ -1195,47 +1501,57 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
1195
1501
  return () => current;
1196
1502
  }
1197
1503
  if (sharedConfig.context) {
1198
- if (!array.length) return current;
1504
+ if (!array.length)
1505
+ return current;
1199
1506
  for (let i = 0; i < array.length; i++) {
1200
- if (array[i].parentNode) return current = array;
1507
+ if (array[i].parentNode)
1508
+ return current = array;
1201
1509
  }
1202
1510
  }
1203
1511
  if (array.length === 0) {
1204
1512
  current = cleanChildren(parent, current, marker);
1205
- if (multi) return current;
1513
+ if (multi)
1514
+ return current;
1206
1515
  } else if (currentArray) {
1207
1516
  if (current.length === 0) {
1208
1517
  appendNodes(parent, array, marker);
1209
- } else reconcileArrays(parent, current, array);
1518
+ } else
1519
+ reconcileArrays(parent, current, array);
1210
1520
  } else {
1211
1521
  current && cleanChildren(parent);
1212
1522
  appendNodes(parent, array);
1213
1523
  }
1214
1524
  current = array;
1215
1525
  } else if (value instanceof Node) {
1216
- if (sharedConfig.context && value.parentNode) return current = multi ? [value] : value;
1526
+ if (sharedConfig.context && value.parentNode)
1527
+ return current = multi ? [value] : value;
1217
1528
  if (Array.isArray(current)) {
1218
- if (multi) return current = cleanChildren(parent, current, marker, value);
1529
+ if (multi)
1530
+ return current = cleanChildren(parent, current, marker, value);
1219
1531
  cleanChildren(parent, current, null, value);
1220
1532
  } else if (current == null || current === "" || !parent.firstChild) {
1221
1533
  parent.appendChild(value);
1222
- } else parent.replaceChild(value, parent.firstChild);
1534
+ } else
1535
+ parent.replaceChild(value, parent.firstChild);
1223
1536
  current = value;
1224
- } else console.warn(`Unrecognized value. Skipped inserting`, value);
1537
+ } else
1538
+ console.warn(`Unrecognized value. Skipped inserting`, value);
1225
1539
  return current;
1226
1540
  }
1227
1541
  function normalizeIncomingArray(normalized, array, current, unwrap) {
1228
1542
  let dynamic = false;
1229
1543
  for (let i = 0, len = array.length; i < len; i++) {
1230
- let item = array[i],
1231
- prev = current && current[i];
1544
+ let item = array[i], prev = current && current[i];
1232
1545
  if (item instanceof Node) {
1233
1546
  normalized.push(item);
1234
- } else if (item == null || item === true || item === false) ;else if (Array.isArray(item)) {
1547
+ } else if (item == null || item === true || item === false)
1548
+ ;
1549
+ else if (Array.isArray(item)) {
1235
1550
  dynamic = normalizeIncomingArray(normalized, item, prev) || dynamic;
1236
1551
  } else if (typeof item === "function") {
1237
1552
  if (unwrap) {
1238
- while (typeof item === "function") item = item();
1553
+ while (typeof item === "function")
1554
+ item = item();
1239
1555
  dynamic = normalizeIncomingArray(normalized, Array.isArray(item) ? item : [item], Array.isArray(prev) ? prev : [prev]) || dynamic;
1240
1556
  } else {
1241
1557
  normalized.push(item);
@@ -1244,20 +1560,24 @@ function normalizeIncomingArray(normalized, array, current, unwrap) {
1244
1560
  } else {
1245
1561
  const value = String(item);
1246
1562
  if (value === "<!>") {
1247
- if (prev && prev.nodeType === 8) normalized.push(prev);
1563
+ if (prev && prev.nodeType === 8)
1564
+ normalized.push(prev);
1248
1565
  } else if (prev && prev.nodeType === 3) {
1249
1566
  prev.data = value;
1250
1567
  normalized.push(prev);
1251
- } else normalized.push(document.createTextNode(value));
1568
+ } else
1569
+ normalized.push(document.createTextNode(value));
1252
1570
  }
1253
1571
  }
1254
1572
  return dynamic;
1255
1573
  }
1256
1574
  function appendNodes(parent, array, marker = null) {
1257
- for (let i = 0, len = array.length; i < len; i++) parent.insertBefore(array[i], marker);
1575
+ for (let i = 0, len = array.length; i < len; i++)
1576
+ parent.insertBefore(array[i], marker);
1258
1577
  }
1259
1578
  function cleanChildren(parent, current, marker, replacement) {
1260
- if (marker === undefined) return parent.textContent = "";
1579
+ if (marker === void 0)
1580
+ return parent.textContent = "";
1261
1581
  const node = replacement || document.createTextNode("");
1262
1582
  if (current.length) {
1263
1583
  let inserted = false;
@@ -1265,135 +1585,17 @@ function cleanChildren(parent, current, marker, replacement) {
1265
1585
  const el = current[i];
1266
1586
  if (node !== el) {
1267
1587
  const isParent = el.parentNode === parent;
1268
- if (!inserted && !i) isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);else isParent && el.remove();
1269
- } else inserted = true;
1588
+ if (!inserted && !i)
1589
+ isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);
1590
+ else
1591
+ isParent && el.remove();
1592
+ } else
1593
+ inserted = true;
1270
1594
  }
1271
- } else parent.insertBefore(node, marker);
1595
+ } else
1596
+ parent.insertBefore(node, marker);
1272
1597
  return [node];
1273
1598
  }
1599
+ var isServer = false;
1274
1600
 
1275
- class TanstackQueryDevtools {
1276
- isMounted = false;
1277
- constructor(config) {
1278
- const {
1279
- client,
1280
- queryFlavor,
1281
- version,
1282
- onlineManager,
1283
- buttonPosition,
1284
- position,
1285
- initialIsOpen,
1286
- errorTypes
1287
- } = config;
1288
- this.client = createSignal(client);
1289
- this.queryFlavor = queryFlavor;
1290
- this.version = version;
1291
- this.onlineManager = onlineManager;
1292
- this.buttonPosition = createSignal(buttonPosition);
1293
- this.position = createSignal(position);
1294
- this.initialIsOpen = createSignal(initialIsOpen);
1295
- this.errorTypes = createSignal(errorTypes);
1296
- }
1297
- setButtonPosition(position) {
1298
- this.buttonPosition[1](position);
1299
- }
1300
- setPosition(position) {
1301
- this.position[1](position);
1302
- }
1303
- setInitialIsOpen(isOpen) {
1304
- this.initialIsOpen[1](isOpen);
1305
- }
1306
- setErrorTypes(errorTypes) {
1307
- this.errorTypes[1](errorTypes);
1308
- }
1309
- setClient(client) {
1310
- this.client[1](client);
1311
- }
1312
- mount(el) {
1313
- if (this.isMounted) {
1314
- throw new Error('Devtools is already mounted');
1315
- }
1316
- const dispose = render(() => {
1317
- const [btnPosition] = this.buttonPosition;
1318
- const [pos] = this.position;
1319
- const [isOpen] = this.initialIsOpen;
1320
- const [errors] = this.errorTypes;
1321
- const [queryClient] = this.client;
1322
- let Devtools;
1323
- if (this.Component) {
1324
- Devtools = this.Component;
1325
- } else {
1326
- Devtools = lazy(() => Promise.resolve().then(function () { return require('./Devtools-5eee2153.cjs'); }));
1327
- this.Component = Devtools;
1328
- }
1329
- const _self$ = this;
1330
- return createComponent(Devtools, mergeProps({
1331
- get queryFlavor() {
1332
- return _self$.queryFlavor;
1333
- },
1334
- get version() {
1335
- return _self$.version;
1336
- },
1337
- get onlineManager() {
1338
- return _self$.onlineManager;
1339
- }
1340
- }, {
1341
- get client() {
1342
- return queryClient();
1343
- },
1344
- get buttonPosition() {
1345
- return btnPosition();
1346
- },
1347
- get position() {
1348
- return pos();
1349
- },
1350
- get initialIsOpen() {
1351
- return isOpen();
1352
- },
1353
- get errorTypes() {
1354
- return errors();
1355
- }
1356
- }));
1357
- }, el);
1358
- this.isMounted = true;
1359
- this.dispose = dispose;
1360
- }
1361
- unmount() {
1362
- if (!this.isMounted) {
1363
- throw new Error('Devtools is not mounted');
1364
- }
1365
- this.dispose?.();
1366
- this.isMounted = false;
1367
- }
1368
- }
1369
-
1370
- exports.$TRACK = $TRACK;
1371
- exports.For = For;
1372
- exports.Index = Index;
1373
- exports.Match = Match;
1374
- exports.Show = Show;
1375
- exports.Switch = Switch;
1376
- exports.TanstackQueryDevtools = TanstackQueryDevtools;
1377
- exports.addEventListener = addEventListener;
1378
- exports.className = className;
1379
- exports.createComponent = createComponent;
1380
- exports.createContext = createContext;
1381
- exports.createEffect = createEffect;
1382
- exports.createMemo = createMemo;
1383
- exports.createRenderEffect = createRenderEffect;
1384
- exports.createRoot = createRoot;
1385
- exports.createSignal = createSignal;
1386
- exports.delegateEvents = delegateEvents;
1387
- exports.insert = insert;
1388
- exports.mergeProps = mergeProps;
1389
- exports.on = on;
1390
- exports.onCleanup = onCleanup;
1391
- exports.onMount = onMount;
1392
- exports.setAttribute = setAttribute;
1393
- exports.spread = spread;
1394
- exports.template = template;
1395
- exports.untrack = untrack;
1396
- exports.use = use;
1397
- exports.useContext = useContext;
1398
- exports.useTransition = useTransition;
1399
- //# sourceMappingURL=index-94a2ab18.cjs.map
1601
+ export { $TRACK, For, Index, Match, Show, Switch, addEventListener, className, createComponent, createContext, createEffect, createMemo, createRenderEffect, createRoot, createSignal, delegateEvents, insert, isServer, lazy, mergeProps, on, onCleanup, onMount, render, setAttribute, spread, template, untrack, use, useContext, useTransition };