@tanstack/query-devtools 5.0.0-rc.9 → 5.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/Devtools/{XXDYGLB2.js → 3Y5CBXUA.js} +978 -598
- package/build/Devtools/{5OOWR6BQ.jsx → 7SMWYMBY.jsx} +849 -511
- package/build/Devtools/{CIR3WCBJ.js → B2H37NSB.js} +978 -598
- package/build/Devtools/{336SHOD5.jsx → Y2E2LEWB.jsx} +849 -511
- package/build/chunk/{PWC4YVZY.jsx → AHAJNSNO.jsx} +299 -177
- package/build/chunk/{7MNJIXJ6.js → Z53XT47W.js} +299 -178
- package/build/dev.cjs +1377 -880
- package/build/dev.js +43 -33
- package/build/dev.jsx +43 -33
- package/build/index.cjs +1376 -879
- package/build/index.d.cts +1 -14
- package/build/index.d.ts +1 -14
- package/build/index.js +43 -33
- package/build/index.jsx +43 -33
- package/package.json +2 -2
- package/src/Context.ts +9 -0
- package/src/Devtools.tsx +422 -206
- package/src/Explorer.tsx +140 -61
- package/src/icons/index.tsx +203 -97
- package/src/index.tsx +41 -41
- package/src/utils.tsx +17 -0
- package/build/chunk/L2WNRKEK.js +0 -1912
- package/build/chunk/LGDS24HT.jsx +0 -1948
package/build/chunk/LGDS24HT.jsx
DELETED
|
@@ -1,1948 +0,0 @@
|
|
|
1
|
-
// ../../node_modules/.pnpm/solid-js@1.7.8/node_modules/solid-js/dist/solid.js
|
|
2
|
-
var sharedConfig = {
|
|
3
|
-
context: void 0,
|
|
4
|
-
registry: void 0
|
|
5
|
-
};
|
|
6
|
-
function setHydrateContext(context) {
|
|
7
|
-
sharedConfig.context = context;
|
|
8
|
-
}
|
|
9
|
-
function nextHydrateContext() {
|
|
10
|
-
return {
|
|
11
|
-
...sharedConfig.context,
|
|
12
|
-
id: `${sharedConfig.context.id}${sharedConfig.context.count++}-`,
|
|
13
|
-
count: 0
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
var equalFn = (a, b) => a === b;
|
|
17
|
-
var $PROXY = Symbol("solid-proxy");
|
|
18
|
-
var $TRACK = Symbol("solid-track");
|
|
19
|
-
var $DEVCOMP = Symbol("solid-dev-component");
|
|
20
|
-
var signalOptions = {
|
|
21
|
-
equals: equalFn
|
|
22
|
-
};
|
|
23
|
-
var ERROR = null;
|
|
24
|
-
var runEffects = runQueue;
|
|
25
|
-
var STALE = 1;
|
|
26
|
-
var PENDING = 2;
|
|
27
|
-
var UNOWNED = {
|
|
28
|
-
owned: null,
|
|
29
|
-
cleanups: null,
|
|
30
|
-
context: null,
|
|
31
|
-
owner: null
|
|
32
|
-
};
|
|
33
|
-
var NO_INIT = {};
|
|
34
|
-
var Owner = null;
|
|
35
|
-
var Transition = null;
|
|
36
|
-
var Scheduler = null;
|
|
37
|
-
var ExternalSourceFactory = null;
|
|
38
|
-
var Listener = null;
|
|
39
|
-
var Updates = null;
|
|
40
|
-
var Effects = null;
|
|
41
|
-
var ExecCount = 0;
|
|
42
|
-
var [transPending, setTransPending] = /* @__PURE__ */ createSignal(false);
|
|
43
|
-
function createRoot(fn, detachedOwner) {
|
|
44
|
-
const listener = Listener, owner = Owner, unowned = fn.length === 0, root = unowned ? UNOWNED : {
|
|
45
|
-
owned: null,
|
|
46
|
-
cleanups: null,
|
|
47
|
-
context: null,
|
|
48
|
-
owner: detachedOwner === void 0 ? owner : detachedOwner
|
|
49
|
-
}, updateFn = unowned ? fn : () => fn(() => untrack(() => cleanNode(root)));
|
|
50
|
-
Owner = root;
|
|
51
|
-
Listener = null;
|
|
52
|
-
try {
|
|
53
|
-
return runUpdates(updateFn, true);
|
|
54
|
-
} finally {
|
|
55
|
-
Listener = listener;
|
|
56
|
-
Owner = owner;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
function createSignal(value, options) {
|
|
60
|
-
options = options ? Object.assign({}, signalOptions, options) : signalOptions;
|
|
61
|
-
const s = {
|
|
62
|
-
value,
|
|
63
|
-
observers: null,
|
|
64
|
-
observerSlots: null,
|
|
65
|
-
comparator: options.equals || void 0
|
|
66
|
-
};
|
|
67
|
-
const setter = (value2) => {
|
|
68
|
-
if (typeof value2 === "function") {
|
|
69
|
-
if (Transition && Transition.running && Transition.sources.has(s))
|
|
70
|
-
value2 = value2(s.tValue);
|
|
71
|
-
else
|
|
72
|
-
value2 = value2(s.value);
|
|
73
|
-
}
|
|
74
|
-
return writeSignal(s, value2);
|
|
75
|
-
};
|
|
76
|
-
return [readSignal.bind(s), setter];
|
|
77
|
-
}
|
|
78
|
-
function createComputed(fn, value, options) {
|
|
79
|
-
const c = createComputation(fn, value, true, STALE);
|
|
80
|
-
if (Scheduler && Transition && Transition.running)
|
|
81
|
-
Updates.push(c);
|
|
82
|
-
else
|
|
83
|
-
updateComputation(c);
|
|
84
|
-
}
|
|
85
|
-
function createRenderEffect(fn, value, options) {
|
|
86
|
-
const c = createComputation(fn, value, false, STALE);
|
|
87
|
-
if (Scheduler && Transition && Transition.running)
|
|
88
|
-
Updates.push(c);
|
|
89
|
-
else
|
|
90
|
-
updateComputation(c);
|
|
91
|
-
}
|
|
92
|
-
function createEffect(fn, value, options) {
|
|
93
|
-
runEffects = runUserEffects;
|
|
94
|
-
const c = createComputation(fn, value, false, STALE), s = SuspenseContext && lookup(Owner, SuspenseContext.id);
|
|
95
|
-
if (s)
|
|
96
|
-
c.suspense = s;
|
|
97
|
-
if (!options || !options.render)
|
|
98
|
-
c.user = true;
|
|
99
|
-
Effects ? Effects.push(c) : updateComputation(c);
|
|
100
|
-
}
|
|
101
|
-
function createMemo(fn, value, options) {
|
|
102
|
-
options = options ? Object.assign({}, signalOptions, options) : signalOptions;
|
|
103
|
-
const c = createComputation(fn, value, true, 0);
|
|
104
|
-
c.observers = null;
|
|
105
|
-
c.observerSlots = null;
|
|
106
|
-
c.comparator = options.equals || void 0;
|
|
107
|
-
if (Scheduler && Transition && Transition.running) {
|
|
108
|
-
c.tState = STALE;
|
|
109
|
-
Updates.push(c);
|
|
110
|
-
} else
|
|
111
|
-
updateComputation(c);
|
|
112
|
-
return readSignal.bind(c);
|
|
113
|
-
}
|
|
114
|
-
function createResource(pSource, pFetcher, pOptions) {
|
|
115
|
-
let source;
|
|
116
|
-
let fetcher;
|
|
117
|
-
let options;
|
|
118
|
-
if (arguments.length === 2 && typeof pFetcher === "object" || arguments.length === 1) {
|
|
119
|
-
source = true;
|
|
120
|
-
fetcher = pSource;
|
|
121
|
-
options = pFetcher || {};
|
|
122
|
-
} else {
|
|
123
|
-
source = pSource;
|
|
124
|
-
fetcher = pFetcher;
|
|
125
|
-
options = pOptions || {};
|
|
126
|
-
}
|
|
127
|
-
let pr = null, initP = NO_INIT, id = null, loadedUnderTransition = false, scheduled = false, resolved = "initialValue" in options, dynamic = typeof source === "function" && createMemo(source);
|
|
128
|
-
const contexts = /* @__PURE__ */ new Set(), [value, setValue] = (options.storage || createSignal)(options.initialValue), [error, setError] = createSignal(void 0), [track, trigger] = createSignal(void 0, {
|
|
129
|
-
equals: false
|
|
130
|
-
}), [state, setState] = createSignal(resolved ? "ready" : "unresolved");
|
|
131
|
-
if (sharedConfig.context) {
|
|
132
|
-
id = `${sharedConfig.context.id}${sharedConfig.context.count++}`;
|
|
133
|
-
let v;
|
|
134
|
-
if (options.ssrLoadFrom === "initial")
|
|
135
|
-
initP = options.initialValue;
|
|
136
|
-
else if (sharedConfig.load && (v = sharedConfig.load(id)))
|
|
137
|
-
initP = v[0];
|
|
138
|
-
}
|
|
139
|
-
function loadEnd(p, v, error2, key) {
|
|
140
|
-
if (pr === p) {
|
|
141
|
-
pr = null;
|
|
142
|
-
key !== void 0 && (resolved = true);
|
|
143
|
-
if ((p === initP || v === initP) && options.onHydrated)
|
|
144
|
-
queueMicrotask(() => options.onHydrated(key, {
|
|
145
|
-
value: v
|
|
146
|
-
}));
|
|
147
|
-
initP = NO_INIT;
|
|
148
|
-
if (Transition && p && loadedUnderTransition) {
|
|
149
|
-
Transition.promises.delete(p);
|
|
150
|
-
loadedUnderTransition = false;
|
|
151
|
-
runUpdates(() => {
|
|
152
|
-
Transition.running = true;
|
|
153
|
-
completeLoad(v, error2);
|
|
154
|
-
}, false);
|
|
155
|
-
} else
|
|
156
|
-
completeLoad(v, error2);
|
|
157
|
-
}
|
|
158
|
-
return v;
|
|
159
|
-
}
|
|
160
|
-
function completeLoad(v, err) {
|
|
161
|
-
runUpdates(() => {
|
|
162
|
-
if (err === void 0)
|
|
163
|
-
setValue(() => v);
|
|
164
|
-
setState(err !== void 0 ? "errored" : resolved ? "ready" : "unresolved");
|
|
165
|
-
setError(err);
|
|
166
|
-
for (const c of contexts.keys())
|
|
167
|
-
c.decrement();
|
|
168
|
-
contexts.clear();
|
|
169
|
-
}, false);
|
|
170
|
-
}
|
|
171
|
-
function read() {
|
|
172
|
-
const c = SuspenseContext && lookup(Owner, SuspenseContext.id), v = value(), err = error();
|
|
173
|
-
if (err !== void 0 && !pr)
|
|
174
|
-
throw err;
|
|
175
|
-
if (Listener && !Listener.user && c) {
|
|
176
|
-
createComputed(() => {
|
|
177
|
-
track();
|
|
178
|
-
if (pr) {
|
|
179
|
-
if (c.resolved && Transition && loadedUnderTransition)
|
|
180
|
-
Transition.promises.add(pr);
|
|
181
|
-
else if (!contexts.has(c)) {
|
|
182
|
-
c.increment();
|
|
183
|
-
contexts.add(c);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
return v;
|
|
189
|
-
}
|
|
190
|
-
function load(refetching = true) {
|
|
191
|
-
if (refetching !== false && scheduled)
|
|
192
|
-
return;
|
|
193
|
-
scheduled = false;
|
|
194
|
-
const lookup2 = dynamic ? dynamic() : source;
|
|
195
|
-
loadedUnderTransition = Transition && Transition.running;
|
|
196
|
-
if (lookup2 == null || lookup2 === false) {
|
|
197
|
-
loadEnd(pr, untrack(value));
|
|
198
|
-
return;
|
|
199
|
-
}
|
|
200
|
-
if (Transition && pr)
|
|
201
|
-
Transition.promises.delete(pr);
|
|
202
|
-
const p = initP !== NO_INIT ? initP : untrack(() => fetcher(lookup2, {
|
|
203
|
-
value: value(),
|
|
204
|
-
refetching
|
|
205
|
-
}));
|
|
206
|
-
if (typeof p !== "object" || !(p && "then" in p)) {
|
|
207
|
-
loadEnd(pr, p, void 0, lookup2);
|
|
208
|
-
return p;
|
|
209
|
-
}
|
|
210
|
-
pr = p;
|
|
211
|
-
scheduled = true;
|
|
212
|
-
queueMicrotask(() => scheduled = false);
|
|
213
|
-
runUpdates(() => {
|
|
214
|
-
setState(resolved ? "refreshing" : "pending");
|
|
215
|
-
trigger();
|
|
216
|
-
}, false);
|
|
217
|
-
return p.then((v) => loadEnd(p, v, void 0, lookup2), (e) => loadEnd(p, void 0, castError(e), lookup2));
|
|
218
|
-
}
|
|
219
|
-
Object.defineProperties(read, {
|
|
220
|
-
state: {
|
|
221
|
-
get: () => state()
|
|
222
|
-
},
|
|
223
|
-
error: {
|
|
224
|
-
get: () => error()
|
|
225
|
-
},
|
|
226
|
-
loading: {
|
|
227
|
-
get() {
|
|
228
|
-
const s = state();
|
|
229
|
-
return s === "pending" || s === "refreshing";
|
|
230
|
-
}
|
|
231
|
-
},
|
|
232
|
-
latest: {
|
|
233
|
-
get() {
|
|
234
|
-
if (!resolved)
|
|
235
|
-
return read();
|
|
236
|
-
const err = error();
|
|
237
|
-
if (err && !pr)
|
|
238
|
-
throw err;
|
|
239
|
-
return value();
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
});
|
|
243
|
-
if (dynamic)
|
|
244
|
-
createComputed(() => load(false));
|
|
245
|
-
else
|
|
246
|
-
load(false);
|
|
247
|
-
return [read, {
|
|
248
|
-
refetch: load,
|
|
249
|
-
mutate: setValue
|
|
250
|
-
}];
|
|
251
|
-
}
|
|
252
|
-
function batch(fn) {
|
|
253
|
-
return runUpdates(fn, false);
|
|
254
|
-
}
|
|
255
|
-
function untrack(fn) {
|
|
256
|
-
if (Listener === null)
|
|
257
|
-
return fn();
|
|
258
|
-
const listener = Listener;
|
|
259
|
-
Listener = null;
|
|
260
|
-
try {
|
|
261
|
-
return fn();
|
|
262
|
-
} finally {
|
|
263
|
-
Listener = listener;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
function on(deps, fn, options) {
|
|
267
|
-
const isArray = Array.isArray(deps);
|
|
268
|
-
let prevInput;
|
|
269
|
-
let defer = options && options.defer;
|
|
270
|
-
return (prevValue) => {
|
|
271
|
-
let input;
|
|
272
|
-
if (isArray) {
|
|
273
|
-
input = Array(deps.length);
|
|
274
|
-
for (let i = 0; i < deps.length; i++)
|
|
275
|
-
input[i] = deps[i]();
|
|
276
|
-
} else
|
|
277
|
-
input = deps();
|
|
278
|
-
if (defer) {
|
|
279
|
-
defer = false;
|
|
280
|
-
return void 0;
|
|
281
|
-
}
|
|
282
|
-
const result = untrack(() => fn(input, prevInput, prevValue));
|
|
283
|
-
prevInput = input;
|
|
284
|
-
return result;
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
|
-
function onMount(fn) {
|
|
288
|
-
createEffect(() => untrack(fn));
|
|
289
|
-
}
|
|
290
|
-
function onCleanup(fn) {
|
|
291
|
-
if (Owner === null)
|
|
292
|
-
;
|
|
293
|
-
else if (Owner.cleanups === null)
|
|
294
|
-
Owner.cleanups = [fn];
|
|
295
|
-
else
|
|
296
|
-
Owner.cleanups.push(fn);
|
|
297
|
-
return fn;
|
|
298
|
-
}
|
|
299
|
-
function getListener() {
|
|
300
|
-
return Listener;
|
|
301
|
-
}
|
|
302
|
-
function getOwner() {
|
|
303
|
-
return Owner;
|
|
304
|
-
}
|
|
305
|
-
function runWithOwner(o, fn) {
|
|
306
|
-
const prev = Owner;
|
|
307
|
-
const prevListener = Listener;
|
|
308
|
-
Owner = o;
|
|
309
|
-
Listener = null;
|
|
310
|
-
try {
|
|
311
|
-
return runUpdates(fn, true);
|
|
312
|
-
} catch (err) {
|
|
313
|
-
handleError(err);
|
|
314
|
-
} finally {
|
|
315
|
-
Owner = prev;
|
|
316
|
-
Listener = prevListener;
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
function startTransition(fn) {
|
|
320
|
-
if (Transition && Transition.running) {
|
|
321
|
-
fn();
|
|
322
|
-
return Transition.done;
|
|
323
|
-
}
|
|
324
|
-
const l = Listener;
|
|
325
|
-
const o = Owner;
|
|
326
|
-
return Promise.resolve().then(() => {
|
|
327
|
-
Listener = l;
|
|
328
|
-
Owner = o;
|
|
329
|
-
let t;
|
|
330
|
-
if (Scheduler || SuspenseContext) {
|
|
331
|
-
t = Transition || (Transition = {
|
|
332
|
-
sources: /* @__PURE__ */ new Set(),
|
|
333
|
-
effects: [],
|
|
334
|
-
promises: /* @__PURE__ */ new Set(),
|
|
335
|
-
disposed: /* @__PURE__ */ new Set(),
|
|
336
|
-
queue: /* @__PURE__ */ new Set(),
|
|
337
|
-
running: true
|
|
338
|
-
});
|
|
339
|
-
t.done || (t.done = new Promise((res) => t.resolve = res));
|
|
340
|
-
t.running = true;
|
|
341
|
-
}
|
|
342
|
-
runUpdates(fn, false);
|
|
343
|
-
Listener = Owner = null;
|
|
344
|
-
return t ? t.done : void 0;
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
function useTransition() {
|
|
348
|
-
return [transPending, startTransition];
|
|
349
|
-
}
|
|
350
|
-
function createContext(defaultValue, options) {
|
|
351
|
-
const id = Symbol("context");
|
|
352
|
-
return {
|
|
353
|
-
id,
|
|
354
|
-
Provider: createProvider(id),
|
|
355
|
-
defaultValue
|
|
356
|
-
};
|
|
357
|
-
}
|
|
358
|
-
function useContext(context) {
|
|
359
|
-
let ctx;
|
|
360
|
-
return (ctx = lookup(Owner, context.id)) !== void 0 ? ctx : context.defaultValue;
|
|
361
|
-
}
|
|
362
|
-
function children(fn) {
|
|
363
|
-
const children2 = createMemo(fn);
|
|
364
|
-
const memo = createMemo(() => resolveChildren(children2()));
|
|
365
|
-
memo.toArray = () => {
|
|
366
|
-
const c = memo();
|
|
367
|
-
return Array.isArray(c) ? c : c != null ? [c] : [];
|
|
368
|
-
};
|
|
369
|
-
return memo;
|
|
370
|
-
}
|
|
371
|
-
var SuspenseContext;
|
|
372
|
-
function readSignal() {
|
|
373
|
-
const runningTransition = Transition && Transition.running;
|
|
374
|
-
if (this.sources && (runningTransition ? this.tState : this.state)) {
|
|
375
|
-
if ((runningTransition ? this.tState : this.state) === STALE)
|
|
376
|
-
updateComputation(this);
|
|
377
|
-
else {
|
|
378
|
-
const updates = Updates;
|
|
379
|
-
Updates = null;
|
|
380
|
-
runUpdates(() => lookUpstream(this), false);
|
|
381
|
-
Updates = updates;
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
if (Listener) {
|
|
385
|
-
const sSlot = this.observers ? this.observers.length : 0;
|
|
386
|
-
if (!Listener.sources) {
|
|
387
|
-
Listener.sources = [this];
|
|
388
|
-
Listener.sourceSlots = [sSlot];
|
|
389
|
-
} else {
|
|
390
|
-
Listener.sources.push(this);
|
|
391
|
-
Listener.sourceSlots.push(sSlot);
|
|
392
|
-
}
|
|
393
|
-
if (!this.observers) {
|
|
394
|
-
this.observers = [Listener];
|
|
395
|
-
this.observerSlots = [Listener.sources.length - 1];
|
|
396
|
-
} else {
|
|
397
|
-
this.observers.push(Listener);
|
|
398
|
-
this.observerSlots.push(Listener.sources.length - 1);
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
if (runningTransition && Transition.sources.has(this))
|
|
402
|
-
return this.tValue;
|
|
403
|
-
return this.value;
|
|
404
|
-
}
|
|
405
|
-
function writeSignal(node, value, isComp) {
|
|
406
|
-
let current = Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value;
|
|
407
|
-
if (!node.comparator || !node.comparator(current, value)) {
|
|
408
|
-
if (Transition) {
|
|
409
|
-
const TransitionRunning = Transition.running;
|
|
410
|
-
if (TransitionRunning || !isComp && Transition.sources.has(node)) {
|
|
411
|
-
Transition.sources.add(node);
|
|
412
|
-
node.tValue = value;
|
|
413
|
-
}
|
|
414
|
-
if (!TransitionRunning)
|
|
415
|
-
node.value = value;
|
|
416
|
-
} else
|
|
417
|
-
node.value = value;
|
|
418
|
-
if (node.observers && node.observers.length) {
|
|
419
|
-
runUpdates(() => {
|
|
420
|
-
for (let i = 0; i < node.observers.length; i += 1) {
|
|
421
|
-
const o = node.observers[i];
|
|
422
|
-
const TransitionRunning = Transition && Transition.running;
|
|
423
|
-
if (TransitionRunning && Transition.disposed.has(o))
|
|
424
|
-
continue;
|
|
425
|
-
if (TransitionRunning ? !o.tState : !o.state) {
|
|
426
|
-
if (o.pure)
|
|
427
|
-
Updates.push(o);
|
|
428
|
-
else
|
|
429
|
-
Effects.push(o);
|
|
430
|
-
if (o.observers)
|
|
431
|
-
markDownstream(o);
|
|
432
|
-
}
|
|
433
|
-
if (!TransitionRunning)
|
|
434
|
-
o.state = STALE;
|
|
435
|
-
else
|
|
436
|
-
o.tState = STALE;
|
|
437
|
-
}
|
|
438
|
-
if (Updates.length > 1e6) {
|
|
439
|
-
Updates = [];
|
|
440
|
-
if (false)
|
|
441
|
-
;
|
|
442
|
-
throw new Error();
|
|
443
|
-
}
|
|
444
|
-
}, false);
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
return value;
|
|
448
|
-
}
|
|
449
|
-
function updateComputation(node) {
|
|
450
|
-
if (!node.fn)
|
|
451
|
-
return;
|
|
452
|
-
cleanNode(node);
|
|
453
|
-
const owner = Owner, listener = Listener, time = ExecCount;
|
|
454
|
-
Listener = Owner = node;
|
|
455
|
-
runComputation(node, Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value, time);
|
|
456
|
-
if (Transition && !Transition.running && Transition.sources.has(node)) {
|
|
457
|
-
queueMicrotask(() => {
|
|
458
|
-
runUpdates(() => {
|
|
459
|
-
Transition && (Transition.running = true);
|
|
460
|
-
Listener = Owner = node;
|
|
461
|
-
runComputation(node, node.tValue, time);
|
|
462
|
-
Listener = Owner = null;
|
|
463
|
-
}, false);
|
|
464
|
-
});
|
|
465
|
-
}
|
|
466
|
-
Listener = listener;
|
|
467
|
-
Owner = owner;
|
|
468
|
-
}
|
|
469
|
-
function runComputation(node, value, time) {
|
|
470
|
-
let nextValue;
|
|
471
|
-
try {
|
|
472
|
-
nextValue = node.fn(value);
|
|
473
|
-
} catch (err) {
|
|
474
|
-
if (node.pure) {
|
|
475
|
-
if (Transition && Transition.running) {
|
|
476
|
-
node.tState = STALE;
|
|
477
|
-
node.tOwned && node.tOwned.forEach(cleanNode);
|
|
478
|
-
node.tOwned = void 0;
|
|
479
|
-
} else {
|
|
480
|
-
node.state = STALE;
|
|
481
|
-
node.owned && node.owned.forEach(cleanNode);
|
|
482
|
-
node.owned = null;
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
node.updatedAt = time + 1;
|
|
486
|
-
return handleError(err);
|
|
487
|
-
}
|
|
488
|
-
if (!node.updatedAt || node.updatedAt <= time) {
|
|
489
|
-
if (node.updatedAt != null && "observers" in node) {
|
|
490
|
-
writeSignal(node, nextValue, true);
|
|
491
|
-
} else if (Transition && Transition.running && node.pure) {
|
|
492
|
-
Transition.sources.add(node);
|
|
493
|
-
node.tValue = nextValue;
|
|
494
|
-
} else
|
|
495
|
-
node.value = nextValue;
|
|
496
|
-
node.updatedAt = time;
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
function createComputation(fn, init, pure, state = STALE, options) {
|
|
500
|
-
const c = {
|
|
501
|
-
fn,
|
|
502
|
-
state,
|
|
503
|
-
updatedAt: null,
|
|
504
|
-
owned: null,
|
|
505
|
-
sources: null,
|
|
506
|
-
sourceSlots: null,
|
|
507
|
-
cleanups: null,
|
|
508
|
-
value: init,
|
|
509
|
-
owner: Owner,
|
|
510
|
-
context: null,
|
|
511
|
-
pure
|
|
512
|
-
};
|
|
513
|
-
if (Transition && Transition.running) {
|
|
514
|
-
c.state = 0;
|
|
515
|
-
c.tState = state;
|
|
516
|
-
}
|
|
517
|
-
if (Owner === null)
|
|
518
|
-
;
|
|
519
|
-
else if (Owner !== UNOWNED) {
|
|
520
|
-
if (Transition && Transition.running && Owner.pure) {
|
|
521
|
-
if (!Owner.tOwned)
|
|
522
|
-
Owner.tOwned = [c];
|
|
523
|
-
else
|
|
524
|
-
Owner.tOwned.push(c);
|
|
525
|
-
} else {
|
|
526
|
-
if (!Owner.owned)
|
|
527
|
-
Owner.owned = [c];
|
|
528
|
-
else
|
|
529
|
-
Owner.owned.push(c);
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
if (ExternalSourceFactory) {
|
|
533
|
-
const [track, trigger] = createSignal(void 0, {
|
|
534
|
-
equals: false
|
|
535
|
-
});
|
|
536
|
-
const ordinary = ExternalSourceFactory(c.fn, trigger);
|
|
537
|
-
onCleanup(() => ordinary.dispose());
|
|
538
|
-
const triggerInTransition = () => startTransition(trigger).then(() => inTransition.dispose());
|
|
539
|
-
const inTransition = ExternalSourceFactory(c.fn, triggerInTransition);
|
|
540
|
-
c.fn = (x) => {
|
|
541
|
-
track();
|
|
542
|
-
return Transition && Transition.running ? inTransition.track(x) : ordinary.track(x);
|
|
543
|
-
};
|
|
544
|
-
}
|
|
545
|
-
return c;
|
|
546
|
-
}
|
|
547
|
-
function runTop(node) {
|
|
548
|
-
const runningTransition = Transition && Transition.running;
|
|
549
|
-
if ((runningTransition ? node.tState : node.state) === 0)
|
|
550
|
-
return;
|
|
551
|
-
if ((runningTransition ? node.tState : node.state) === PENDING)
|
|
552
|
-
return lookUpstream(node);
|
|
553
|
-
if (node.suspense && untrack(node.suspense.inFallback))
|
|
554
|
-
return node.suspense.effects.push(node);
|
|
555
|
-
const ancestors = [node];
|
|
556
|
-
while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {
|
|
557
|
-
if (runningTransition && Transition.disposed.has(node))
|
|
558
|
-
return;
|
|
559
|
-
if (runningTransition ? node.tState : node.state)
|
|
560
|
-
ancestors.push(node);
|
|
561
|
-
}
|
|
562
|
-
for (let i = ancestors.length - 1; i >= 0; i--) {
|
|
563
|
-
node = ancestors[i];
|
|
564
|
-
if (runningTransition) {
|
|
565
|
-
let top = node, prev = ancestors[i + 1];
|
|
566
|
-
while ((top = top.owner) && top !== prev) {
|
|
567
|
-
if (Transition.disposed.has(top))
|
|
568
|
-
return;
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
if ((runningTransition ? node.tState : node.state) === STALE) {
|
|
572
|
-
updateComputation(node);
|
|
573
|
-
} else if ((runningTransition ? node.tState : node.state) === PENDING) {
|
|
574
|
-
const updates = Updates;
|
|
575
|
-
Updates = null;
|
|
576
|
-
runUpdates(() => lookUpstream(node, ancestors[0]), false);
|
|
577
|
-
Updates = updates;
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
function runUpdates(fn, init) {
|
|
582
|
-
if (Updates)
|
|
583
|
-
return fn();
|
|
584
|
-
let wait = false;
|
|
585
|
-
if (!init)
|
|
586
|
-
Updates = [];
|
|
587
|
-
if (Effects)
|
|
588
|
-
wait = true;
|
|
589
|
-
else
|
|
590
|
-
Effects = [];
|
|
591
|
-
ExecCount++;
|
|
592
|
-
try {
|
|
593
|
-
const res = fn();
|
|
594
|
-
completeUpdates(wait);
|
|
595
|
-
return res;
|
|
596
|
-
} catch (err) {
|
|
597
|
-
if (!wait)
|
|
598
|
-
Effects = null;
|
|
599
|
-
Updates = null;
|
|
600
|
-
handleError(err);
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
function completeUpdates(wait) {
|
|
604
|
-
if (Updates) {
|
|
605
|
-
if (Scheduler && Transition && Transition.running)
|
|
606
|
-
scheduleQueue(Updates);
|
|
607
|
-
else
|
|
608
|
-
runQueue(Updates);
|
|
609
|
-
Updates = null;
|
|
610
|
-
}
|
|
611
|
-
if (wait)
|
|
612
|
-
return;
|
|
613
|
-
let res;
|
|
614
|
-
if (Transition) {
|
|
615
|
-
if (!Transition.promises.size && !Transition.queue.size) {
|
|
616
|
-
const sources = Transition.sources;
|
|
617
|
-
const disposed = Transition.disposed;
|
|
618
|
-
Effects.push.apply(Effects, Transition.effects);
|
|
619
|
-
res = Transition.resolve;
|
|
620
|
-
for (const e2 of Effects) {
|
|
621
|
-
"tState" in e2 && (e2.state = e2.tState);
|
|
622
|
-
delete e2.tState;
|
|
623
|
-
}
|
|
624
|
-
Transition = null;
|
|
625
|
-
runUpdates(() => {
|
|
626
|
-
for (const d of disposed)
|
|
627
|
-
cleanNode(d);
|
|
628
|
-
for (const v of sources) {
|
|
629
|
-
v.value = v.tValue;
|
|
630
|
-
if (v.owned) {
|
|
631
|
-
for (let i = 0, len = v.owned.length; i < len; i++)
|
|
632
|
-
cleanNode(v.owned[i]);
|
|
633
|
-
}
|
|
634
|
-
if (v.tOwned)
|
|
635
|
-
v.owned = v.tOwned;
|
|
636
|
-
delete v.tValue;
|
|
637
|
-
delete v.tOwned;
|
|
638
|
-
v.tState = 0;
|
|
639
|
-
}
|
|
640
|
-
setTransPending(false);
|
|
641
|
-
}, false);
|
|
642
|
-
} else if (Transition.running) {
|
|
643
|
-
Transition.running = false;
|
|
644
|
-
Transition.effects.push.apply(Transition.effects, Effects);
|
|
645
|
-
Effects = null;
|
|
646
|
-
setTransPending(true);
|
|
647
|
-
return;
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
const e = Effects;
|
|
651
|
-
Effects = null;
|
|
652
|
-
if (e.length)
|
|
653
|
-
runUpdates(() => runEffects(e), false);
|
|
654
|
-
if (res)
|
|
655
|
-
res();
|
|
656
|
-
}
|
|
657
|
-
function runQueue(queue) {
|
|
658
|
-
for (let i = 0; i < queue.length; i++)
|
|
659
|
-
runTop(queue[i]);
|
|
660
|
-
}
|
|
661
|
-
function scheduleQueue(queue) {
|
|
662
|
-
for (let i = 0; i < queue.length; i++) {
|
|
663
|
-
const item = queue[i];
|
|
664
|
-
const tasks = Transition.queue;
|
|
665
|
-
if (!tasks.has(item)) {
|
|
666
|
-
tasks.add(item);
|
|
667
|
-
Scheduler(() => {
|
|
668
|
-
tasks.delete(item);
|
|
669
|
-
runUpdates(() => {
|
|
670
|
-
Transition.running = true;
|
|
671
|
-
runTop(item);
|
|
672
|
-
}, false);
|
|
673
|
-
Transition && (Transition.running = false);
|
|
674
|
-
});
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
function runUserEffects(queue) {
|
|
679
|
-
let i, userLength = 0;
|
|
680
|
-
for (i = 0; i < queue.length; i++) {
|
|
681
|
-
const e = queue[i];
|
|
682
|
-
if (!e.user)
|
|
683
|
-
runTop(e);
|
|
684
|
-
else
|
|
685
|
-
queue[userLength++] = e;
|
|
686
|
-
}
|
|
687
|
-
if (sharedConfig.context) {
|
|
688
|
-
if (sharedConfig.count) {
|
|
689
|
-
sharedConfig.effects || (sharedConfig.effects = []);
|
|
690
|
-
sharedConfig.effects.push(...queue.slice(0, userLength));
|
|
691
|
-
return;
|
|
692
|
-
} else if (sharedConfig.effects) {
|
|
693
|
-
queue = [...sharedConfig.effects, ...queue];
|
|
694
|
-
userLength += sharedConfig.effects.length;
|
|
695
|
-
delete sharedConfig.effects;
|
|
696
|
-
}
|
|
697
|
-
setHydrateContext();
|
|
698
|
-
}
|
|
699
|
-
for (i = 0; i < userLength; i++)
|
|
700
|
-
runTop(queue[i]);
|
|
701
|
-
}
|
|
702
|
-
function lookUpstream(node, ignore) {
|
|
703
|
-
const runningTransition = Transition && Transition.running;
|
|
704
|
-
if (runningTransition)
|
|
705
|
-
node.tState = 0;
|
|
706
|
-
else
|
|
707
|
-
node.state = 0;
|
|
708
|
-
for (let i = 0; i < node.sources.length; i += 1) {
|
|
709
|
-
const source = node.sources[i];
|
|
710
|
-
if (source.sources) {
|
|
711
|
-
const state = runningTransition ? source.tState : source.state;
|
|
712
|
-
if (state === STALE) {
|
|
713
|
-
if (source !== ignore && (!source.updatedAt || source.updatedAt < ExecCount))
|
|
714
|
-
runTop(source);
|
|
715
|
-
} else if (state === PENDING)
|
|
716
|
-
lookUpstream(source, ignore);
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
function markDownstream(node) {
|
|
721
|
-
const runningTransition = Transition && Transition.running;
|
|
722
|
-
for (let i = 0; i < node.observers.length; i += 1) {
|
|
723
|
-
const o = node.observers[i];
|
|
724
|
-
if (runningTransition ? !o.tState : !o.state) {
|
|
725
|
-
if (runningTransition)
|
|
726
|
-
o.tState = PENDING;
|
|
727
|
-
else
|
|
728
|
-
o.state = PENDING;
|
|
729
|
-
if (o.pure)
|
|
730
|
-
Updates.push(o);
|
|
731
|
-
else
|
|
732
|
-
Effects.push(o);
|
|
733
|
-
o.observers && markDownstream(o);
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
}
|
|
737
|
-
function cleanNode(node) {
|
|
738
|
-
let i;
|
|
739
|
-
if (node.sources) {
|
|
740
|
-
while (node.sources.length) {
|
|
741
|
-
const source = node.sources.pop(), index = node.sourceSlots.pop(), obs = source.observers;
|
|
742
|
-
if (obs && obs.length) {
|
|
743
|
-
const n = obs.pop(), s = source.observerSlots.pop();
|
|
744
|
-
if (index < obs.length) {
|
|
745
|
-
n.sourceSlots[s] = index;
|
|
746
|
-
obs[index] = n;
|
|
747
|
-
source.observerSlots[index] = s;
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
if (Transition && Transition.running && node.pure) {
|
|
753
|
-
if (node.tOwned) {
|
|
754
|
-
for (i = node.tOwned.length - 1; i >= 0; i--)
|
|
755
|
-
cleanNode(node.tOwned[i]);
|
|
756
|
-
delete node.tOwned;
|
|
757
|
-
}
|
|
758
|
-
reset(node, true);
|
|
759
|
-
} else if (node.owned) {
|
|
760
|
-
for (i = node.owned.length - 1; i >= 0; i--)
|
|
761
|
-
cleanNode(node.owned[i]);
|
|
762
|
-
node.owned = null;
|
|
763
|
-
}
|
|
764
|
-
if (node.cleanups) {
|
|
765
|
-
for (i = node.cleanups.length - 1; i >= 0; i--)
|
|
766
|
-
node.cleanups[i]();
|
|
767
|
-
node.cleanups = null;
|
|
768
|
-
}
|
|
769
|
-
if (Transition && Transition.running)
|
|
770
|
-
node.tState = 0;
|
|
771
|
-
else
|
|
772
|
-
node.state = 0;
|
|
773
|
-
node.context = null;
|
|
774
|
-
}
|
|
775
|
-
function reset(node, top) {
|
|
776
|
-
if (!top) {
|
|
777
|
-
node.tState = 0;
|
|
778
|
-
Transition.disposed.add(node);
|
|
779
|
-
}
|
|
780
|
-
if (node.owned) {
|
|
781
|
-
for (let i = 0; i < node.owned.length; i++)
|
|
782
|
-
reset(node.owned[i]);
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
function castError(err) {
|
|
786
|
-
if (err instanceof Error)
|
|
787
|
-
return err;
|
|
788
|
-
return new Error(typeof err === "string" ? err : "Unknown error", {
|
|
789
|
-
cause: err
|
|
790
|
-
});
|
|
791
|
-
}
|
|
792
|
-
function runErrors(err, fns, owner) {
|
|
793
|
-
try {
|
|
794
|
-
for (const f of fns)
|
|
795
|
-
f(err);
|
|
796
|
-
} catch (e) {
|
|
797
|
-
handleError(e, owner && owner.owner || null);
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
|
-
function handleError(err, owner = Owner) {
|
|
801
|
-
const fns = ERROR && lookup(owner, ERROR);
|
|
802
|
-
const error = castError(err);
|
|
803
|
-
if (!fns)
|
|
804
|
-
throw error;
|
|
805
|
-
if (Effects)
|
|
806
|
-
Effects.push({
|
|
807
|
-
fn() {
|
|
808
|
-
runErrors(error, fns, owner);
|
|
809
|
-
},
|
|
810
|
-
state: STALE
|
|
811
|
-
});
|
|
812
|
-
else
|
|
813
|
-
runErrors(error, fns, owner);
|
|
814
|
-
}
|
|
815
|
-
function lookup(owner, key) {
|
|
816
|
-
return owner ? owner.context && owner.context[key] !== void 0 ? owner.context[key] : lookup(owner.owner, key) : void 0;
|
|
817
|
-
}
|
|
818
|
-
function resolveChildren(children2) {
|
|
819
|
-
if (typeof children2 === "function" && !children2.length)
|
|
820
|
-
return resolveChildren(children2());
|
|
821
|
-
if (Array.isArray(children2)) {
|
|
822
|
-
const results = [];
|
|
823
|
-
for (let i = 0; i < children2.length; i++) {
|
|
824
|
-
const result = resolveChildren(children2[i]);
|
|
825
|
-
Array.isArray(result) ? results.push.apply(results, result) : results.push(result);
|
|
826
|
-
}
|
|
827
|
-
return results;
|
|
828
|
-
}
|
|
829
|
-
return children2;
|
|
830
|
-
}
|
|
831
|
-
function createProvider(id, options) {
|
|
832
|
-
return function provider(props) {
|
|
833
|
-
let res;
|
|
834
|
-
createRenderEffect(() => res = untrack(() => {
|
|
835
|
-
Owner.context = {
|
|
836
|
-
[id]: props.value
|
|
837
|
-
};
|
|
838
|
-
return children(() => props.children);
|
|
839
|
-
}), void 0);
|
|
840
|
-
return res;
|
|
841
|
-
};
|
|
842
|
-
}
|
|
843
|
-
var FALLBACK = Symbol("fallback");
|
|
844
|
-
function dispose(d) {
|
|
845
|
-
for (let i = 0; i < d.length; i++)
|
|
846
|
-
d[i]();
|
|
847
|
-
}
|
|
848
|
-
function mapArray(list, mapFn, options = {}) {
|
|
849
|
-
let items = [], mapped = [], disposers = [], len = 0, indexes = mapFn.length > 1 ? [] : null;
|
|
850
|
-
onCleanup(() => dispose(disposers));
|
|
851
|
-
return () => {
|
|
852
|
-
let newItems = list() || [], i, j;
|
|
853
|
-
newItems[$TRACK];
|
|
854
|
-
return untrack(() => {
|
|
855
|
-
let newLen = newItems.length, newIndices, newIndicesNext, temp, tempdisposers, tempIndexes, start, end, newEnd, item;
|
|
856
|
-
if (newLen === 0) {
|
|
857
|
-
if (len !== 0) {
|
|
858
|
-
dispose(disposers);
|
|
859
|
-
disposers = [];
|
|
860
|
-
items = [];
|
|
861
|
-
mapped = [];
|
|
862
|
-
len = 0;
|
|
863
|
-
indexes && (indexes = []);
|
|
864
|
-
}
|
|
865
|
-
if (options.fallback) {
|
|
866
|
-
items = [FALLBACK];
|
|
867
|
-
mapped[0] = createRoot((disposer) => {
|
|
868
|
-
disposers[0] = disposer;
|
|
869
|
-
return options.fallback();
|
|
870
|
-
});
|
|
871
|
-
len = 1;
|
|
872
|
-
}
|
|
873
|
-
} else if (len === 0) {
|
|
874
|
-
mapped = new Array(newLen);
|
|
875
|
-
for (j = 0; j < newLen; j++) {
|
|
876
|
-
items[j] = newItems[j];
|
|
877
|
-
mapped[j] = createRoot(mapper);
|
|
878
|
-
}
|
|
879
|
-
len = newLen;
|
|
880
|
-
} else {
|
|
881
|
-
temp = new Array(newLen);
|
|
882
|
-
tempdisposers = new Array(newLen);
|
|
883
|
-
indexes && (tempIndexes = new Array(newLen));
|
|
884
|
-
for (start = 0, end = Math.min(len, newLen); start < end && items[start] === newItems[start]; start++)
|
|
885
|
-
;
|
|
886
|
-
for (end = len - 1, newEnd = newLen - 1; end >= start && newEnd >= start && items[end] === newItems[newEnd]; end--, newEnd--) {
|
|
887
|
-
temp[newEnd] = mapped[end];
|
|
888
|
-
tempdisposers[newEnd] = disposers[end];
|
|
889
|
-
indexes && (tempIndexes[newEnd] = indexes[end]);
|
|
890
|
-
}
|
|
891
|
-
newIndices = /* @__PURE__ */ new Map();
|
|
892
|
-
newIndicesNext = new Array(newEnd + 1);
|
|
893
|
-
for (j = newEnd; j >= start; j--) {
|
|
894
|
-
item = newItems[j];
|
|
895
|
-
i = newIndices.get(item);
|
|
896
|
-
newIndicesNext[j] = i === void 0 ? -1 : i;
|
|
897
|
-
newIndices.set(item, j);
|
|
898
|
-
}
|
|
899
|
-
for (i = start; i <= end; i++) {
|
|
900
|
-
item = items[i];
|
|
901
|
-
j = newIndices.get(item);
|
|
902
|
-
if (j !== void 0 && j !== -1) {
|
|
903
|
-
temp[j] = mapped[i];
|
|
904
|
-
tempdisposers[j] = disposers[i];
|
|
905
|
-
indexes && (tempIndexes[j] = indexes[i]);
|
|
906
|
-
j = newIndicesNext[j];
|
|
907
|
-
newIndices.set(item, j);
|
|
908
|
-
} else
|
|
909
|
-
disposers[i]();
|
|
910
|
-
}
|
|
911
|
-
for (j = start; j < newLen; j++) {
|
|
912
|
-
if (j in temp) {
|
|
913
|
-
mapped[j] = temp[j];
|
|
914
|
-
disposers[j] = tempdisposers[j];
|
|
915
|
-
if (indexes) {
|
|
916
|
-
indexes[j] = tempIndexes[j];
|
|
917
|
-
indexes[j](j);
|
|
918
|
-
}
|
|
919
|
-
} else
|
|
920
|
-
mapped[j] = createRoot(mapper);
|
|
921
|
-
}
|
|
922
|
-
mapped = mapped.slice(0, len = newLen);
|
|
923
|
-
items = newItems.slice(0);
|
|
924
|
-
}
|
|
925
|
-
return mapped;
|
|
926
|
-
});
|
|
927
|
-
function mapper(disposer) {
|
|
928
|
-
disposers[j] = disposer;
|
|
929
|
-
if (indexes) {
|
|
930
|
-
const [s, set] = createSignal(j);
|
|
931
|
-
indexes[j] = set;
|
|
932
|
-
return mapFn(newItems[j], s);
|
|
933
|
-
}
|
|
934
|
-
return mapFn(newItems[j]);
|
|
935
|
-
}
|
|
936
|
-
};
|
|
937
|
-
}
|
|
938
|
-
function indexArray(list, mapFn, options = {}) {
|
|
939
|
-
let items = [], mapped = [], disposers = [], signals = [], len = 0, i;
|
|
940
|
-
onCleanup(() => dispose(disposers));
|
|
941
|
-
return () => {
|
|
942
|
-
const newItems = list() || [];
|
|
943
|
-
newItems[$TRACK];
|
|
944
|
-
return untrack(() => {
|
|
945
|
-
if (newItems.length === 0) {
|
|
946
|
-
if (len !== 0) {
|
|
947
|
-
dispose(disposers);
|
|
948
|
-
disposers = [];
|
|
949
|
-
items = [];
|
|
950
|
-
mapped = [];
|
|
951
|
-
len = 0;
|
|
952
|
-
signals = [];
|
|
953
|
-
}
|
|
954
|
-
if (options.fallback) {
|
|
955
|
-
items = [FALLBACK];
|
|
956
|
-
mapped[0] = createRoot((disposer) => {
|
|
957
|
-
disposers[0] = disposer;
|
|
958
|
-
return options.fallback();
|
|
959
|
-
});
|
|
960
|
-
len = 1;
|
|
961
|
-
}
|
|
962
|
-
return mapped;
|
|
963
|
-
}
|
|
964
|
-
if (items[0] === FALLBACK) {
|
|
965
|
-
disposers[0]();
|
|
966
|
-
disposers = [];
|
|
967
|
-
items = [];
|
|
968
|
-
mapped = [];
|
|
969
|
-
len = 0;
|
|
970
|
-
}
|
|
971
|
-
for (i = 0; i < newItems.length; i++) {
|
|
972
|
-
if (i < items.length && items[i] !== newItems[i]) {
|
|
973
|
-
signals[i](() => newItems[i]);
|
|
974
|
-
} else if (i >= items.length) {
|
|
975
|
-
mapped[i] = createRoot(mapper);
|
|
976
|
-
}
|
|
977
|
-
}
|
|
978
|
-
for (; i < items.length; i++) {
|
|
979
|
-
disposers[i]();
|
|
980
|
-
}
|
|
981
|
-
len = signals.length = disposers.length = newItems.length;
|
|
982
|
-
items = newItems.slice(0);
|
|
983
|
-
return mapped = mapped.slice(0, len);
|
|
984
|
-
});
|
|
985
|
-
function mapper(disposer) {
|
|
986
|
-
disposers[i] = disposer;
|
|
987
|
-
const [s, set] = createSignal(newItems[i]);
|
|
988
|
-
signals[i] = set;
|
|
989
|
-
return mapFn(s, i);
|
|
990
|
-
}
|
|
991
|
-
};
|
|
992
|
-
}
|
|
993
|
-
var hydrationEnabled = false;
|
|
994
|
-
function createComponent(Comp, props) {
|
|
995
|
-
if (hydrationEnabled) {
|
|
996
|
-
if (sharedConfig.context) {
|
|
997
|
-
const c = sharedConfig.context;
|
|
998
|
-
setHydrateContext(nextHydrateContext());
|
|
999
|
-
const r = untrack(() => Comp(props || {}));
|
|
1000
|
-
setHydrateContext(c);
|
|
1001
|
-
return r;
|
|
1002
|
-
}
|
|
1003
|
-
}
|
|
1004
|
-
return untrack(() => Comp(props || {}));
|
|
1005
|
-
}
|
|
1006
|
-
function trueFn() {
|
|
1007
|
-
return true;
|
|
1008
|
-
}
|
|
1009
|
-
var propTraps = {
|
|
1010
|
-
get(_, property, receiver) {
|
|
1011
|
-
if (property === $PROXY)
|
|
1012
|
-
return receiver;
|
|
1013
|
-
return _.get(property);
|
|
1014
|
-
},
|
|
1015
|
-
has(_, property) {
|
|
1016
|
-
if (property === $PROXY)
|
|
1017
|
-
return true;
|
|
1018
|
-
return _.has(property);
|
|
1019
|
-
},
|
|
1020
|
-
set: trueFn,
|
|
1021
|
-
deleteProperty: trueFn,
|
|
1022
|
-
getOwnPropertyDescriptor(_, property) {
|
|
1023
|
-
return {
|
|
1024
|
-
configurable: true,
|
|
1025
|
-
enumerable: true,
|
|
1026
|
-
get() {
|
|
1027
|
-
return _.get(property);
|
|
1028
|
-
},
|
|
1029
|
-
set: trueFn,
|
|
1030
|
-
deleteProperty: trueFn
|
|
1031
|
-
};
|
|
1032
|
-
},
|
|
1033
|
-
ownKeys(_) {
|
|
1034
|
-
return _.keys();
|
|
1035
|
-
}
|
|
1036
|
-
};
|
|
1037
|
-
function resolveSource(s) {
|
|
1038
|
-
return !(s = typeof s === "function" ? s() : s) ? {} : s;
|
|
1039
|
-
}
|
|
1040
|
-
function resolveSources() {
|
|
1041
|
-
for (let i = 0, length = this.length; i < length; ++i) {
|
|
1042
|
-
const v = this[i]();
|
|
1043
|
-
if (v !== void 0)
|
|
1044
|
-
return v;
|
|
1045
|
-
}
|
|
1046
|
-
}
|
|
1047
|
-
function mergeProps(...sources) {
|
|
1048
|
-
let proxy = false;
|
|
1049
|
-
for (let i = 0; i < sources.length; i++) {
|
|
1050
|
-
const s = sources[i];
|
|
1051
|
-
proxy = proxy || !!s && $PROXY in s;
|
|
1052
|
-
sources[i] = typeof s === "function" ? (proxy = true, createMemo(s)) : s;
|
|
1053
|
-
}
|
|
1054
|
-
if (proxy) {
|
|
1055
|
-
return new Proxy({
|
|
1056
|
-
get(property) {
|
|
1057
|
-
for (let i = sources.length - 1; i >= 0; i--) {
|
|
1058
|
-
const v = resolveSource(sources[i])[property];
|
|
1059
|
-
if (v !== void 0)
|
|
1060
|
-
return v;
|
|
1061
|
-
}
|
|
1062
|
-
},
|
|
1063
|
-
has(property) {
|
|
1064
|
-
for (let i = sources.length - 1; i >= 0; i--) {
|
|
1065
|
-
if (property in resolveSource(sources[i]))
|
|
1066
|
-
return true;
|
|
1067
|
-
}
|
|
1068
|
-
return false;
|
|
1069
|
-
},
|
|
1070
|
-
keys() {
|
|
1071
|
-
const keys = [];
|
|
1072
|
-
for (let i = 0; i < sources.length; i++)
|
|
1073
|
-
keys.push(...Object.keys(resolveSource(sources[i])));
|
|
1074
|
-
return [...new Set(keys)];
|
|
1075
|
-
}
|
|
1076
|
-
}, propTraps);
|
|
1077
|
-
}
|
|
1078
|
-
const target = {};
|
|
1079
|
-
const sourcesMap = {};
|
|
1080
|
-
const defined = /* @__PURE__ */ new Set();
|
|
1081
|
-
for (let i = sources.length - 1; i >= 0; i--) {
|
|
1082
|
-
const source = sources[i];
|
|
1083
|
-
if (!source)
|
|
1084
|
-
continue;
|
|
1085
|
-
const sourceKeys = Object.getOwnPropertyNames(source);
|
|
1086
|
-
for (let i2 = 0, length = sourceKeys.length; i2 < length; i2++) {
|
|
1087
|
-
const key = sourceKeys[i2];
|
|
1088
|
-
if (key === "__proto__" || key === "constructor")
|
|
1089
|
-
continue;
|
|
1090
|
-
const desc = Object.getOwnPropertyDescriptor(source, key);
|
|
1091
|
-
if (!defined.has(key)) {
|
|
1092
|
-
if (desc.get) {
|
|
1093
|
-
defined.add(key);
|
|
1094
|
-
Object.defineProperty(target, key, {
|
|
1095
|
-
enumerable: true,
|
|
1096
|
-
configurable: true,
|
|
1097
|
-
get: resolveSources.bind(sourcesMap[key] = [desc.get.bind(source)])
|
|
1098
|
-
});
|
|
1099
|
-
} else {
|
|
1100
|
-
if (desc.value !== void 0)
|
|
1101
|
-
defined.add(key);
|
|
1102
|
-
target[key] = desc.value;
|
|
1103
|
-
}
|
|
1104
|
-
} else {
|
|
1105
|
-
const sources2 = sourcesMap[key];
|
|
1106
|
-
if (sources2) {
|
|
1107
|
-
if (desc.get) {
|
|
1108
|
-
sources2.push(desc.get.bind(source));
|
|
1109
|
-
} else if (desc.value !== void 0) {
|
|
1110
|
-
sources2.push(() => desc.value);
|
|
1111
|
-
}
|
|
1112
|
-
} else if (target[key] === void 0)
|
|
1113
|
-
target[key] = desc.value;
|
|
1114
|
-
}
|
|
1115
|
-
}
|
|
1116
|
-
}
|
|
1117
|
-
return target;
|
|
1118
|
-
}
|
|
1119
|
-
function splitProps(props, ...keys) {
|
|
1120
|
-
if ($PROXY in props) {
|
|
1121
|
-
const blocked = new Set(keys.length > 1 ? keys.flat() : keys[0]);
|
|
1122
|
-
const res = keys.map((k) => {
|
|
1123
|
-
return new Proxy({
|
|
1124
|
-
get(property) {
|
|
1125
|
-
return k.includes(property) ? props[property] : void 0;
|
|
1126
|
-
},
|
|
1127
|
-
has(property) {
|
|
1128
|
-
return k.includes(property) && property in props;
|
|
1129
|
-
},
|
|
1130
|
-
keys() {
|
|
1131
|
-
return k.filter((property) => property in props);
|
|
1132
|
-
}
|
|
1133
|
-
}, propTraps);
|
|
1134
|
-
});
|
|
1135
|
-
res.push(new Proxy({
|
|
1136
|
-
get(property) {
|
|
1137
|
-
return blocked.has(property) ? void 0 : props[property];
|
|
1138
|
-
},
|
|
1139
|
-
has(property) {
|
|
1140
|
-
return blocked.has(property) ? false : property in props;
|
|
1141
|
-
},
|
|
1142
|
-
keys() {
|
|
1143
|
-
return Object.keys(props).filter((k) => !blocked.has(k));
|
|
1144
|
-
}
|
|
1145
|
-
}, propTraps));
|
|
1146
|
-
return res;
|
|
1147
|
-
}
|
|
1148
|
-
const otherObject = {};
|
|
1149
|
-
const objects = keys.map(() => ({}));
|
|
1150
|
-
for (const propName of Object.getOwnPropertyNames(props)) {
|
|
1151
|
-
const desc = Object.getOwnPropertyDescriptor(props, propName);
|
|
1152
|
-
const isDefaultDesc = !desc.get && !desc.set && desc.enumerable && desc.writable && desc.configurable;
|
|
1153
|
-
let blocked = false;
|
|
1154
|
-
let objectIndex = 0;
|
|
1155
|
-
for (const k of keys) {
|
|
1156
|
-
if (k.includes(propName)) {
|
|
1157
|
-
blocked = true;
|
|
1158
|
-
isDefaultDesc ? objects[objectIndex][propName] = desc.value : Object.defineProperty(objects[objectIndex], propName, desc);
|
|
1159
|
-
}
|
|
1160
|
-
++objectIndex;
|
|
1161
|
-
}
|
|
1162
|
-
if (!blocked) {
|
|
1163
|
-
isDefaultDesc ? otherObject[propName] = desc.value : Object.defineProperty(otherObject, propName, desc);
|
|
1164
|
-
}
|
|
1165
|
-
}
|
|
1166
|
-
return [...objects, otherObject];
|
|
1167
|
-
}
|
|
1168
|
-
function lazy(fn) {
|
|
1169
|
-
let comp;
|
|
1170
|
-
let p;
|
|
1171
|
-
const wrap = (props) => {
|
|
1172
|
-
const ctx = sharedConfig.context;
|
|
1173
|
-
if (ctx) {
|
|
1174
|
-
const [s, set] = createSignal();
|
|
1175
|
-
sharedConfig.count || (sharedConfig.count = 0);
|
|
1176
|
-
sharedConfig.count++;
|
|
1177
|
-
(p || (p = fn())).then((mod) => {
|
|
1178
|
-
setHydrateContext(ctx);
|
|
1179
|
-
sharedConfig.count--;
|
|
1180
|
-
set(() => mod.default);
|
|
1181
|
-
setHydrateContext();
|
|
1182
|
-
});
|
|
1183
|
-
comp = s;
|
|
1184
|
-
} else if (!comp) {
|
|
1185
|
-
const [s] = createResource(() => (p || (p = fn())).then((mod) => mod.default));
|
|
1186
|
-
comp = s;
|
|
1187
|
-
}
|
|
1188
|
-
let Comp;
|
|
1189
|
-
return createMemo(() => (Comp = comp()) && untrack(() => {
|
|
1190
|
-
if (false)
|
|
1191
|
-
;
|
|
1192
|
-
if (!ctx)
|
|
1193
|
-
return Comp(props);
|
|
1194
|
-
const c = sharedConfig.context;
|
|
1195
|
-
setHydrateContext(ctx);
|
|
1196
|
-
const r = Comp(props);
|
|
1197
|
-
setHydrateContext(c);
|
|
1198
|
-
return r;
|
|
1199
|
-
}));
|
|
1200
|
-
};
|
|
1201
|
-
wrap.preload = () => p || ((p = fn()).then((mod) => comp = () => mod.default), p);
|
|
1202
|
-
return wrap;
|
|
1203
|
-
}
|
|
1204
|
-
var counter = 0;
|
|
1205
|
-
function createUniqueId() {
|
|
1206
|
-
const ctx = sharedConfig.context;
|
|
1207
|
-
return ctx ? `${ctx.id}${ctx.count++}` : `cl-${counter++}`;
|
|
1208
|
-
}
|
|
1209
|
-
var narrowedError = (name) => `Stale read from <${name}>.`;
|
|
1210
|
-
function For(props) {
|
|
1211
|
-
const fallback = "fallback" in props && {
|
|
1212
|
-
fallback: () => props.fallback
|
|
1213
|
-
};
|
|
1214
|
-
return createMemo(mapArray(() => props.each, props.children, fallback || void 0));
|
|
1215
|
-
}
|
|
1216
|
-
function Index(props) {
|
|
1217
|
-
const fallback = "fallback" in props && {
|
|
1218
|
-
fallback: () => props.fallback
|
|
1219
|
-
};
|
|
1220
|
-
return createMemo(indexArray(() => props.each, props.children, fallback || void 0));
|
|
1221
|
-
}
|
|
1222
|
-
function Show(props) {
|
|
1223
|
-
const keyed = props.keyed;
|
|
1224
|
-
const condition = createMemo(() => props.when, void 0, {
|
|
1225
|
-
equals: (a, b) => keyed ? a === b : !a === !b
|
|
1226
|
-
});
|
|
1227
|
-
return createMemo(() => {
|
|
1228
|
-
const c = condition();
|
|
1229
|
-
if (c) {
|
|
1230
|
-
const child = props.children;
|
|
1231
|
-
const fn = typeof child === "function" && child.length > 0;
|
|
1232
|
-
return fn ? untrack(() => child(keyed ? c : () => {
|
|
1233
|
-
if (!untrack(condition))
|
|
1234
|
-
throw narrowedError("Show");
|
|
1235
|
-
return props.when;
|
|
1236
|
-
})) : child;
|
|
1237
|
-
}
|
|
1238
|
-
return props.fallback;
|
|
1239
|
-
}, void 0, void 0);
|
|
1240
|
-
}
|
|
1241
|
-
function Switch(props) {
|
|
1242
|
-
let keyed = false;
|
|
1243
|
-
const equals = (a, b) => a[0] === b[0] && (keyed ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2];
|
|
1244
|
-
const conditions = children(() => props.children), evalConditions = createMemo(() => {
|
|
1245
|
-
let conds = conditions();
|
|
1246
|
-
if (!Array.isArray(conds))
|
|
1247
|
-
conds = [conds];
|
|
1248
|
-
for (let i = 0; i < conds.length; i++) {
|
|
1249
|
-
const c = conds[i].when;
|
|
1250
|
-
if (c) {
|
|
1251
|
-
keyed = !!conds[i].keyed;
|
|
1252
|
-
return [i, c, conds[i]];
|
|
1253
|
-
}
|
|
1254
|
-
}
|
|
1255
|
-
return [-1];
|
|
1256
|
-
}, void 0, {
|
|
1257
|
-
equals
|
|
1258
|
-
});
|
|
1259
|
-
return createMemo(() => {
|
|
1260
|
-
const [index, when, cond] = evalConditions();
|
|
1261
|
-
if (index < 0)
|
|
1262
|
-
return props.fallback;
|
|
1263
|
-
const c = cond.children;
|
|
1264
|
-
const fn = typeof c === "function" && c.length > 0;
|
|
1265
|
-
return fn ? untrack(() => c(keyed ? when : () => {
|
|
1266
|
-
if (untrack(evalConditions)[0] !== index)
|
|
1267
|
-
throw narrowedError("Match");
|
|
1268
|
-
return cond.when;
|
|
1269
|
-
})) : c;
|
|
1270
|
-
}, void 0, void 0);
|
|
1271
|
-
}
|
|
1272
|
-
function Match(props) {
|
|
1273
|
-
return props;
|
|
1274
|
-
}
|
|
1275
|
-
var SuspenseListContext = createContext();
|
|
1276
|
-
var DEV = void 0;
|
|
1277
|
-
|
|
1278
|
-
// ../../node_modules/.pnpm/solid-js@1.7.8/node_modules/solid-js/web/dist/web.js
|
|
1279
|
-
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"];
|
|
1280
|
-
var Properties = /* @__PURE__ */ new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans]);
|
|
1281
|
-
var ChildProperties = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]);
|
|
1282
|
-
var Aliases = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
1283
|
-
className: "class",
|
|
1284
|
-
htmlFor: "for"
|
|
1285
|
-
});
|
|
1286
|
-
var PropAliases = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
1287
|
-
class: "className",
|
|
1288
|
-
formnovalidate: {
|
|
1289
|
-
$: "formNoValidate",
|
|
1290
|
-
BUTTON: 1,
|
|
1291
|
-
INPUT: 1
|
|
1292
|
-
},
|
|
1293
|
-
ismap: {
|
|
1294
|
-
$: "isMap",
|
|
1295
|
-
IMG: 1
|
|
1296
|
-
},
|
|
1297
|
-
nomodule: {
|
|
1298
|
-
$: "noModule",
|
|
1299
|
-
SCRIPT: 1
|
|
1300
|
-
},
|
|
1301
|
-
playsinline: {
|
|
1302
|
-
$: "playsInline",
|
|
1303
|
-
VIDEO: 1
|
|
1304
|
-
},
|
|
1305
|
-
readonly: {
|
|
1306
|
-
$: "readOnly",
|
|
1307
|
-
INPUT: 1,
|
|
1308
|
-
TEXTAREA: 1
|
|
1309
|
-
}
|
|
1310
|
-
});
|
|
1311
|
-
function getPropAlias(prop, tagName) {
|
|
1312
|
-
const a = PropAliases[prop];
|
|
1313
|
-
return typeof a === "object" ? a[tagName] ? a["$"] : void 0 : a;
|
|
1314
|
-
}
|
|
1315
|
-
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"]);
|
|
1316
|
-
var SVGElements = /* @__PURE__ */ new Set([
|
|
1317
|
-
"altGlyph",
|
|
1318
|
-
"altGlyphDef",
|
|
1319
|
-
"altGlyphItem",
|
|
1320
|
-
"animate",
|
|
1321
|
-
"animateColor",
|
|
1322
|
-
"animateMotion",
|
|
1323
|
-
"animateTransform",
|
|
1324
|
-
"circle",
|
|
1325
|
-
"clipPath",
|
|
1326
|
-
"color-profile",
|
|
1327
|
-
"cursor",
|
|
1328
|
-
"defs",
|
|
1329
|
-
"desc",
|
|
1330
|
-
"ellipse",
|
|
1331
|
-
"feBlend",
|
|
1332
|
-
"feColorMatrix",
|
|
1333
|
-
"feComponentTransfer",
|
|
1334
|
-
"feComposite",
|
|
1335
|
-
"feConvolveMatrix",
|
|
1336
|
-
"feDiffuseLighting",
|
|
1337
|
-
"feDisplacementMap",
|
|
1338
|
-
"feDistantLight",
|
|
1339
|
-
"feFlood",
|
|
1340
|
-
"feFuncA",
|
|
1341
|
-
"feFuncB",
|
|
1342
|
-
"feFuncG",
|
|
1343
|
-
"feFuncR",
|
|
1344
|
-
"feGaussianBlur",
|
|
1345
|
-
"feImage",
|
|
1346
|
-
"feMerge",
|
|
1347
|
-
"feMergeNode",
|
|
1348
|
-
"feMorphology",
|
|
1349
|
-
"feOffset",
|
|
1350
|
-
"fePointLight",
|
|
1351
|
-
"feSpecularLighting",
|
|
1352
|
-
"feSpotLight",
|
|
1353
|
-
"feTile",
|
|
1354
|
-
"feTurbulence",
|
|
1355
|
-
"filter",
|
|
1356
|
-
"font",
|
|
1357
|
-
"font-face",
|
|
1358
|
-
"font-face-format",
|
|
1359
|
-
"font-face-name",
|
|
1360
|
-
"font-face-src",
|
|
1361
|
-
"font-face-uri",
|
|
1362
|
-
"foreignObject",
|
|
1363
|
-
"g",
|
|
1364
|
-
"glyph",
|
|
1365
|
-
"glyphRef",
|
|
1366
|
-
"hkern",
|
|
1367
|
-
"image",
|
|
1368
|
-
"line",
|
|
1369
|
-
"linearGradient",
|
|
1370
|
-
"marker",
|
|
1371
|
-
"mask",
|
|
1372
|
-
"metadata",
|
|
1373
|
-
"missing-glyph",
|
|
1374
|
-
"mpath",
|
|
1375
|
-
"path",
|
|
1376
|
-
"pattern",
|
|
1377
|
-
"polygon",
|
|
1378
|
-
"polyline",
|
|
1379
|
-
"radialGradient",
|
|
1380
|
-
"rect",
|
|
1381
|
-
"set",
|
|
1382
|
-
"stop",
|
|
1383
|
-
"svg",
|
|
1384
|
-
"switch",
|
|
1385
|
-
"symbol",
|
|
1386
|
-
"text",
|
|
1387
|
-
"textPath",
|
|
1388
|
-
"tref",
|
|
1389
|
-
"tspan",
|
|
1390
|
-
"use",
|
|
1391
|
-
"view",
|
|
1392
|
-
"vkern"
|
|
1393
|
-
]);
|
|
1394
|
-
var SVGNamespace = {
|
|
1395
|
-
xlink: "http://www.w3.org/1999/xlink",
|
|
1396
|
-
xml: "http://www.w3.org/XML/1998/namespace"
|
|
1397
|
-
};
|
|
1398
|
-
function reconcileArrays(parentNode, a, b) {
|
|
1399
|
-
let bLength = b.length, aEnd = a.length, bEnd = bLength, aStart = 0, bStart = 0, after = a[aEnd - 1].nextSibling, map = null;
|
|
1400
|
-
while (aStart < aEnd || bStart < bEnd) {
|
|
1401
|
-
if (a[aStart] === b[bStart]) {
|
|
1402
|
-
aStart++;
|
|
1403
|
-
bStart++;
|
|
1404
|
-
continue;
|
|
1405
|
-
}
|
|
1406
|
-
while (a[aEnd - 1] === b[bEnd - 1]) {
|
|
1407
|
-
aEnd--;
|
|
1408
|
-
bEnd--;
|
|
1409
|
-
}
|
|
1410
|
-
if (aEnd === aStart) {
|
|
1411
|
-
const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after;
|
|
1412
|
-
while (bStart < bEnd)
|
|
1413
|
-
parentNode.insertBefore(b[bStart++], node);
|
|
1414
|
-
} else if (bEnd === bStart) {
|
|
1415
|
-
while (aStart < aEnd) {
|
|
1416
|
-
if (!map || !map.has(a[aStart]))
|
|
1417
|
-
a[aStart].remove();
|
|
1418
|
-
aStart++;
|
|
1419
|
-
}
|
|
1420
|
-
} else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) {
|
|
1421
|
-
const node = a[--aEnd].nextSibling;
|
|
1422
|
-
parentNode.insertBefore(b[bStart++], a[aStart++].nextSibling);
|
|
1423
|
-
parentNode.insertBefore(b[--bEnd], node);
|
|
1424
|
-
a[aEnd] = b[bEnd];
|
|
1425
|
-
} else {
|
|
1426
|
-
if (!map) {
|
|
1427
|
-
map = /* @__PURE__ */ new Map();
|
|
1428
|
-
let i = bStart;
|
|
1429
|
-
while (i < bEnd)
|
|
1430
|
-
map.set(b[i], i++);
|
|
1431
|
-
}
|
|
1432
|
-
const index = map.get(a[aStart]);
|
|
1433
|
-
if (index != null) {
|
|
1434
|
-
if (bStart < index && index < bEnd) {
|
|
1435
|
-
let i = aStart, sequence = 1, t;
|
|
1436
|
-
while (++i < aEnd && i < bEnd) {
|
|
1437
|
-
if ((t = map.get(a[i])) == null || t !== index + sequence)
|
|
1438
|
-
break;
|
|
1439
|
-
sequence++;
|
|
1440
|
-
}
|
|
1441
|
-
if (sequence > index - bStart) {
|
|
1442
|
-
const node = a[aStart];
|
|
1443
|
-
while (bStart < index)
|
|
1444
|
-
parentNode.insertBefore(b[bStart++], node);
|
|
1445
|
-
} else
|
|
1446
|
-
parentNode.replaceChild(b[bStart++], a[aStart++]);
|
|
1447
|
-
} else
|
|
1448
|
-
aStart++;
|
|
1449
|
-
} else
|
|
1450
|
-
a[aStart++].remove();
|
|
1451
|
-
}
|
|
1452
|
-
}
|
|
1453
|
-
}
|
|
1454
|
-
var $$EVENTS = "_$DX_DELEGATE";
|
|
1455
|
-
function render(code, element, init, options = {}) {
|
|
1456
|
-
let disposer;
|
|
1457
|
-
createRoot((dispose2) => {
|
|
1458
|
-
disposer = dispose2;
|
|
1459
|
-
element === document ? code() : insert(element, code(), element.firstChild ? null : void 0, init);
|
|
1460
|
-
}, options.owner);
|
|
1461
|
-
return () => {
|
|
1462
|
-
disposer();
|
|
1463
|
-
element.textContent = "";
|
|
1464
|
-
};
|
|
1465
|
-
}
|
|
1466
|
-
function template(html, isCE, isSVG) {
|
|
1467
|
-
let node;
|
|
1468
|
-
const create = () => {
|
|
1469
|
-
const t = document.createElement("template");
|
|
1470
|
-
t.innerHTML = html;
|
|
1471
|
-
return isSVG ? t.content.firstChild.firstChild : t.content.firstChild;
|
|
1472
|
-
};
|
|
1473
|
-
const fn = isCE ? () => untrack(() => document.importNode(node || (node = create()), true)) : () => (node || (node = create())).cloneNode(true);
|
|
1474
|
-
fn.cloneNode = fn;
|
|
1475
|
-
return fn;
|
|
1476
|
-
}
|
|
1477
|
-
function delegateEvents(eventNames, document2 = window.document) {
|
|
1478
|
-
const e = document2[$$EVENTS] || (document2[$$EVENTS] = /* @__PURE__ */ new Set());
|
|
1479
|
-
for (let i = 0, l = eventNames.length; i < l; i++) {
|
|
1480
|
-
const name = eventNames[i];
|
|
1481
|
-
if (!e.has(name)) {
|
|
1482
|
-
e.add(name);
|
|
1483
|
-
document2.addEventListener(name, eventHandler);
|
|
1484
|
-
}
|
|
1485
|
-
}
|
|
1486
|
-
}
|
|
1487
|
-
function setAttribute(node, name, value) {
|
|
1488
|
-
if (value == null)
|
|
1489
|
-
node.removeAttribute(name);
|
|
1490
|
-
else
|
|
1491
|
-
node.setAttribute(name, value);
|
|
1492
|
-
}
|
|
1493
|
-
function setAttributeNS(node, namespace, name, value) {
|
|
1494
|
-
if (value == null)
|
|
1495
|
-
node.removeAttributeNS(namespace, name);
|
|
1496
|
-
else
|
|
1497
|
-
node.setAttributeNS(namespace, name, value);
|
|
1498
|
-
}
|
|
1499
|
-
function className(node, value) {
|
|
1500
|
-
if (value == null)
|
|
1501
|
-
node.removeAttribute("class");
|
|
1502
|
-
else
|
|
1503
|
-
node.className = value;
|
|
1504
|
-
}
|
|
1505
|
-
function addEventListener(node, name, handler, delegate) {
|
|
1506
|
-
if (delegate) {
|
|
1507
|
-
if (Array.isArray(handler)) {
|
|
1508
|
-
node[`$$${name}`] = handler[0];
|
|
1509
|
-
node[`$$${name}Data`] = handler[1];
|
|
1510
|
-
} else
|
|
1511
|
-
node[`$$${name}`] = handler;
|
|
1512
|
-
} else if (Array.isArray(handler)) {
|
|
1513
|
-
const handlerFn = handler[0];
|
|
1514
|
-
node.addEventListener(name, handler[0] = (e) => handlerFn.call(node, handler[1], e));
|
|
1515
|
-
} else
|
|
1516
|
-
node.addEventListener(name, handler);
|
|
1517
|
-
}
|
|
1518
|
-
function classList(node, value, prev = {}) {
|
|
1519
|
-
const classKeys = Object.keys(value || {}), prevKeys = Object.keys(prev);
|
|
1520
|
-
let i, len;
|
|
1521
|
-
for (i = 0, len = prevKeys.length; i < len; i++) {
|
|
1522
|
-
const key = prevKeys[i];
|
|
1523
|
-
if (!key || key === "undefined" || value[key])
|
|
1524
|
-
continue;
|
|
1525
|
-
toggleClassKey(node, key, false);
|
|
1526
|
-
delete prev[key];
|
|
1527
|
-
}
|
|
1528
|
-
for (i = 0, len = classKeys.length; i < len; i++) {
|
|
1529
|
-
const key = classKeys[i], classValue = !!value[key];
|
|
1530
|
-
if (!key || key === "undefined" || prev[key] === classValue || !classValue)
|
|
1531
|
-
continue;
|
|
1532
|
-
toggleClassKey(node, key, true);
|
|
1533
|
-
prev[key] = classValue;
|
|
1534
|
-
}
|
|
1535
|
-
return prev;
|
|
1536
|
-
}
|
|
1537
|
-
function style(node, value, prev) {
|
|
1538
|
-
if (!value)
|
|
1539
|
-
return prev ? setAttribute(node, "style") : value;
|
|
1540
|
-
const nodeStyle = node.style;
|
|
1541
|
-
if (typeof value === "string")
|
|
1542
|
-
return nodeStyle.cssText = value;
|
|
1543
|
-
typeof prev === "string" && (nodeStyle.cssText = prev = void 0);
|
|
1544
|
-
prev || (prev = {});
|
|
1545
|
-
value || (value = {});
|
|
1546
|
-
let v, s;
|
|
1547
|
-
for (s in prev) {
|
|
1548
|
-
value[s] == null && nodeStyle.removeProperty(s);
|
|
1549
|
-
delete prev[s];
|
|
1550
|
-
}
|
|
1551
|
-
for (s in value) {
|
|
1552
|
-
v = value[s];
|
|
1553
|
-
if (v !== prev[s]) {
|
|
1554
|
-
nodeStyle.setProperty(s, v);
|
|
1555
|
-
prev[s] = v;
|
|
1556
|
-
}
|
|
1557
|
-
}
|
|
1558
|
-
return prev;
|
|
1559
|
-
}
|
|
1560
|
-
function spread(node, props = {}, isSVG, skipChildren) {
|
|
1561
|
-
const prevProps = {};
|
|
1562
|
-
if (!skipChildren) {
|
|
1563
|
-
createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
|
|
1564
|
-
}
|
|
1565
|
-
createRenderEffect(() => props.ref && props.ref(node));
|
|
1566
|
-
createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
|
|
1567
|
-
return prevProps;
|
|
1568
|
-
}
|
|
1569
|
-
function insert(parent, accessor, marker, initial) {
|
|
1570
|
-
if (marker !== void 0 && !initial)
|
|
1571
|
-
initial = [];
|
|
1572
|
-
if (typeof accessor !== "function")
|
|
1573
|
-
return insertExpression(parent, accessor, initial, marker);
|
|
1574
|
-
createRenderEffect((current) => insertExpression(parent, accessor(), current, marker), initial);
|
|
1575
|
-
}
|
|
1576
|
-
function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {
|
|
1577
|
-
props || (props = {});
|
|
1578
|
-
for (const prop in prevProps) {
|
|
1579
|
-
if (!(prop in props)) {
|
|
1580
|
-
if (prop === "children")
|
|
1581
|
-
continue;
|
|
1582
|
-
prevProps[prop] = assignProp(node, prop, null, prevProps[prop], isSVG, skipRef);
|
|
1583
|
-
}
|
|
1584
|
-
}
|
|
1585
|
-
for (const prop in props) {
|
|
1586
|
-
if (prop === "children") {
|
|
1587
|
-
if (!skipChildren)
|
|
1588
|
-
insertExpression(node, props.children);
|
|
1589
|
-
continue;
|
|
1590
|
-
}
|
|
1591
|
-
const value = props[prop];
|
|
1592
|
-
prevProps[prop] = assignProp(node, prop, value, prevProps[prop], isSVG, skipRef);
|
|
1593
|
-
}
|
|
1594
|
-
}
|
|
1595
|
-
function getNextElement(template2) {
|
|
1596
|
-
let node, key;
|
|
1597
|
-
if (!sharedConfig.context || !(node = sharedConfig.registry.get(key = getHydrationKey()))) {
|
|
1598
|
-
if (sharedConfig.context)
|
|
1599
|
-
console.warn("Unable to find DOM nodes for hydration key:", key);
|
|
1600
|
-
if (!template2)
|
|
1601
|
-
throw new Error("Unrecoverable Hydration Mismatch. No template for key: " + key);
|
|
1602
|
-
return template2();
|
|
1603
|
-
}
|
|
1604
|
-
if (sharedConfig.completed)
|
|
1605
|
-
sharedConfig.completed.add(node);
|
|
1606
|
-
sharedConfig.registry.delete(key);
|
|
1607
|
-
return node;
|
|
1608
|
-
}
|
|
1609
|
-
function toPropertyName(name) {
|
|
1610
|
-
return name.toLowerCase().replace(/-([a-z])/g, (_, w) => w.toUpperCase());
|
|
1611
|
-
}
|
|
1612
|
-
function toggleClassKey(node, key, value) {
|
|
1613
|
-
const classNames = key.trim().split(/\s+/);
|
|
1614
|
-
for (let i = 0, nameLen = classNames.length; i < nameLen; i++)
|
|
1615
|
-
node.classList.toggle(classNames[i], value);
|
|
1616
|
-
}
|
|
1617
|
-
function assignProp(node, prop, value, prev, isSVG, skipRef) {
|
|
1618
|
-
let isCE, isProp, isChildProp, propAlias, forceProp;
|
|
1619
|
-
if (prop === "style")
|
|
1620
|
-
return style(node, value, prev);
|
|
1621
|
-
if (prop === "classList")
|
|
1622
|
-
return classList(node, value, prev);
|
|
1623
|
-
if (value === prev)
|
|
1624
|
-
return prev;
|
|
1625
|
-
if (prop === "ref") {
|
|
1626
|
-
if (!skipRef)
|
|
1627
|
-
value(node);
|
|
1628
|
-
} else if (prop.slice(0, 3) === "on:") {
|
|
1629
|
-
const e = prop.slice(3);
|
|
1630
|
-
prev && node.removeEventListener(e, prev);
|
|
1631
|
-
value && node.addEventListener(e, value);
|
|
1632
|
-
} else if (prop.slice(0, 10) === "oncapture:") {
|
|
1633
|
-
const e = prop.slice(10);
|
|
1634
|
-
prev && node.removeEventListener(e, prev, true);
|
|
1635
|
-
value && node.addEventListener(e, value, true);
|
|
1636
|
-
} else if (prop.slice(0, 2) === "on") {
|
|
1637
|
-
const name = prop.slice(2).toLowerCase();
|
|
1638
|
-
const delegate = DelegatedEvents.has(name);
|
|
1639
|
-
if (!delegate && prev) {
|
|
1640
|
-
const h = Array.isArray(prev) ? prev[0] : prev;
|
|
1641
|
-
node.removeEventListener(name, h);
|
|
1642
|
-
}
|
|
1643
|
-
if (delegate || value) {
|
|
1644
|
-
addEventListener(node, name, value, delegate);
|
|
1645
|
-
delegate && delegateEvents([name]);
|
|
1646
|
-
}
|
|
1647
|
-
} else if (prop.slice(0, 5) === "attr:") {
|
|
1648
|
-
setAttribute(node, prop.slice(5), value);
|
|
1649
|
-
} 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("-"))) {
|
|
1650
|
-
if (forceProp) {
|
|
1651
|
-
prop = prop.slice(5);
|
|
1652
|
-
isProp = true;
|
|
1653
|
-
}
|
|
1654
|
-
if (prop === "class" || prop === "className")
|
|
1655
|
-
className(node, value);
|
|
1656
|
-
else if (isCE && !isProp && !isChildProp)
|
|
1657
|
-
node[toPropertyName(prop)] = value;
|
|
1658
|
-
else
|
|
1659
|
-
node[propAlias || prop] = value;
|
|
1660
|
-
} else {
|
|
1661
|
-
const ns = isSVG && prop.indexOf(":") > -1 && SVGNamespace[prop.split(":")[0]];
|
|
1662
|
-
if (ns)
|
|
1663
|
-
setAttributeNS(node, ns, prop, value);
|
|
1664
|
-
else
|
|
1665
|
-
setAttribute(node, Aliases[prop] || prop, value);
|
|
1666
|
-
}
|
|
1667
|
-
return value;
|
|
1668
|
-
}
|
|
1669
|
-
function eventHandler(e) {
|
|
1670
|
-
const key = `$$${e.type}`;
|
|
1671
|
-
let node = e.composedPath && e.composedPath()[0] || e.target;
|
|
1672
|
-
if (e.target !== node) {
|
|
1673
|
-
Object.defineProperty(e, "target", {
|
|
1674
|
-
configurable: true,
|
|
1675
|
-
value: node
|
|
1676
|
-
});
|
|
1677
|
-
}
|
|
1678
|
-
Object.defineProperty(e, "currentTarget", {
|
|
1679
|
-
configurable: true,
|
|
1680
|
-
get() {
|
|
1681
|
-
return node || document;
|
|
1682
|
-
}
|
|
1683
|
-
});
|
|
1684
|
-
if (sharedConfig.registry && !sharedConfig.done)
|
|
1685
|
-
sharedConfig.done = _$HY.done = true;
|
|
1686
|
-
while (node) {
|
|
1687
|
-
const handler = node[key];
|
|
1688
|
-
if (handler && !node.disabled) {
|
|
1689
|
-
const data = node[`${key}Data`];
|
|
1690
|
-
data !== void 0 ? handler.call(node, data, e) : handler.call(node, e);
|
|
1691
|
-
if (e.cancelBubble)
|
|
1692
|
-
return;
|
|
1693
|
-
}
|
|
1694
|
-
node = node._$host || node.parentNode || node.host;
|
|
1695
|
-
}
|
|
1696
|
-
}
|
|
1697
|
-
function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
1698
|
-
if (sharedConfig.context) {
|
|
1699
|
-
!current && (current = [...parent.childNodes]);
|
|
1700
|
-
let cleaned = [];
|
|
1701
|
-
for (let i = 0; i < current.length; i++) {
|
|
1702
|
-
const node = current[i];
|
|
1703
|
-
if (node.nodeType === 8 && node.data.slice(0, 2) === "!$")
|
|
1704
|
-
node.remove();
|
|
1705
|
-
else
|
|
1706
|
-
cleaned.push(node);
|
|
1707
|
-
}
|
|
1708
|
-
current = cleaned;
|
|
1709
|
-
}
|
|
1710
|
-
while (typeof current === "function")
|
|
1711
|
-
current = current();
|
|
1712
|
-
if (value === current)
|
|
1713
|
-
return current;
|
|
1714
|
-
const t = typeof value, multi = marker !== void 0;
|
|
1715
|
-
parent = multi && current[0] && current[0].parentNode || parent;
|
|
1716
|
-
if (t === "string" || t === "number") {
|
|
1717
|
-
if (sharedConfig.context)
|
|
1718
|
-
return current;
|
|
1719
|
-
if (t === "number")
|
|
1720
|
-
value = value.toString();
|
|
1721
|
-
if (multi) {
|
|
1722
|
-
let node = current[0];
|
|
1723
|
-
if (node && node.nodeType === 3) {
|
|
1724
|
-
node.data = value;
|
|
1725
|
-
} else
|
|
1726
|
-
node = document.createTextNode(value);
|
|
1727
|
-
current = cleanChildren(parent, current, marker, node);
|
|
1728
|
-
} else {
|
|
1729
|
-
if (current !== "" && typeof current === "string") {
|
|
1730
|
-
current = parent.firstChild.data = value;
|
|
1731
|
-
} else
|
|
1732
|
-
current = parent.textContent = value;
|
|
1733
|
-
}
|
|
1734
|
-
} else if (value == null || t === "boolean") {
|
|
1735
|
-
if (sharedConfig.context)
|
|
1736
|
-
return current;
|
|
1737
|
-
current = cleanChildren(parent, current, marker);
|
|
1738
|
-
} else if (t === "function") {
|
|
1739
|
-
createRenderEffect(() => {
|
|
1740
|
-
let v = value();
|
|
1741
|
-
while (typeof v === "function")
|
|
1742
|
-
v = v();
|
|
1743
|
-
current = insertExpression(parent, v, current, marker);
|
|
1744
|
-
});
|
|
1745
|
-
return () => current;
|
|
1746
|
-
} else if (Array.isArray(value)) {
|
|
1747
|
-
const array = [];
|
|
1748
|
-
const currentArray = current && Array.isArray(current);
|
|
1749
|
-
if (normalizeIncomingArray(array, value, current, unwrapArray)) {
|
|
1750
|
-
createRenderEffect(() => current = insertExpression(parent, array, current, marker, true));
|
|
1751
|
-
return () => current;
|
|
1752
|
-
}
|
|
1753
|
-
if (sharedConfig.context) {
|
|
1754
|
-
if (!array.length)
|
|
1755
|
-
return current;
|
|
1756
|
-
for (let i = 0; i < array.length; i++) {
|
|
1757
|
-
if (array[i].parentNode)
|
|
1758
|
-
return current = array;
|
|
1759
|
-
}
|
|
1760
|
-
}
|
|
1761
|
-
if (array.length === 0) {
|
|
1762
|
-
current = cleanChildren(parent, current, marker);
|
|
1763
|
-
if (multi)
|
|
1764
|
-
return current;
|
|
1765
|
-
} else if (currentArray) {
|
|
1766
|
-
if (current.length === 0) {
|
|
1767
|
-
appendNodes(parent, array, marker);
|
|
1768
|
-
} else
|
|
1769
|
-
reconcileArrays(parent, current, array);
|
|
1770
|
-
} else {
|
|
1771
|
-
current && cleanChildren(parent);
|
|
1772
|
-
appendNodes(parent, array);
|
|
1773
|
-
}
|
|
1774
|
-
current = array;
|
|
1775
|
-
} else if (value.nodeType) {
|
|
1776
|
-
if (sharedConfig.context && value.parentNode)
|
|
1777
|
-
return current = multi ? [value] : value;
|
|
1778
|
-
if (Array.isArray(current)) {
|
|
1779
|
-
if (multi)
|
|
1780
|
-
return current = cleanChildren(parent, current, marker, value);
|
|
1781
|
-
cleanChildren(parent, current, null, value);
|
|
1782
|
-
} else if (current == null || current === "" || !parent.firstChild) {
|
|
1783
|
-
parent.appendChild(value);
|
|
1784
|
-
} else
|
|
1785
|
-
parent.replaceChild(value, parent.firstChild);
|
|
1786
|
-
current = value;
|
|
1787
|
-
} else
|
|
1788
|
-
console.warn(`Unrecognized value. Skipped inserting`, value);
|
|
1789
|
-
return current;
|
|
1790
|
-
}
|
|
1791
|
-
function normalizeIncomingArray(normalized, array, current, unwrap) {
|
|
1792
|
-
let dynamic = false;
|
|
1793
|
-
for (let i = 0, len = array.length; i < len; i++) {
|
|
1794
|
-
let item = array[i], prev = current && current[i], t;
|
|
1795
|
-
if (item == null || item === true || item === false)
|
|
1796
|
-
;
|
|
1797
|
-
else if ((t = typeof item) === "object" && item.nodeType) {
|
|
1798
|
-
normalized.push(item);
|
|
1799
|
-
} else if (Array.isArray(item)) {
|
|
1800
|
-
dynamic = normalizeIncomingArray(normalized, item, prev) || dynamic;
|
|
1801
|
-
} else if (t === "function") {
|
|
1802
|
-
if (unwrap) {
|
|
1803
|
-
while (typeof item === "function")
|
|
1804
|
-
item = item();
|
|
1805
|
-
dynamic = normalizeIncomingArray(normalized, Array.isArray(item) ? item : [item], Array.isArray(prev) ? prev : [prev]) || dynamic;
|
|
1806
|
-
} else {
|
|
1807
|
-
normalized.push(item);
|
|
1808
|
-
dynamic = true;
|
|
1809
|
-
}
|
|
1810
|
-
} else {
|
|
1811
|
-
const value = String(item);
|
|
1812
|
-
if (prev && prev.nodeType === 3 && prev.data === value)
|
|
1813
|
-
normalized.push(prev);
|
|
1814
|
-
else
|
|
1815
|
-
normalized.push(document.createTextNode(value));
|
|
1816
|
-
}
|
|
1817
|
-
}
|
|
1818
|
-
return dynamic;
|
|
1819
|
-
}
|
|
1820
|
-
function appendNodes(parent, array, marker = null) {
|
|
1821
|
-
for (let i = 0, len = array.length; i < len; i++)
|
|
1822
|
-
parent.insertBefore(array[i], marker);
|
|
1823
|
-
}
|
|
1824
|
-
function cleanChildren(parent, current, marker, replacement) {
|
|
1825
|
-
if (marker === void 0)
|
|
1826
|
-
return parent.textContent = "";
|
|
1827
|
-
const node = replacement || document.createTextNode("");
|
|
1828
|
-
if (current.length) {
|
|
1829
|
-
let inserted = false;
|
|
1830
|
-
for (let i = current.length - 1; i >= 0; i--) {
|
|
1831
|
-
const el = current[i];
|
|
1832
|
-
if (node !== el) {
|
|
1833
|
-
const isParent = el.parentNode === parent;
|
|
1834
|
-
if (!inserted && !i)
|
|
1835
|
-
isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);
|
|
1836
|
-
else
|
|
1837
|
-
isParent && el.remove();
|
|
1838
|
-
} else
|
|
1839
|
-
inserted = true;
|
|
1840
|
-
}
|
|
1841
|
-
} else
|
|
1842
|
-
parent.insertBefore(node, marker);
|
|
1843
|
-
return [node];
|
|
1844
|
-
}
|
|
1845
|
-
function getHydrationKey() {
|
|
1846
|
-
const hydrate = sharedConfig.context;
|
|
1847
|
-
return `${hydrate.id}${hydrate.count++}`;
|
|
1848
|
-
}
|
|
1849
|
-
var isServer = false;
|
|
1850
|
-
var SVG_NAMESPACE = "http://www.w3.org/2000/svg";
|
|
1851
|
-
function createElement(tagName, isSVG = false) {
|
|
1852
|
-
return isSVG ? document.createElementNS(SVG_NAMESPACE, tagName) : document.createElement(tagName);
|
|
1853
|
-
}
|
|
1854
|
-
function Portal(props) {
|
|
1855
|
-
const {
|
|
1856
|
-
useShadow
|
|
1857
|
-
} = props, marker = document.createTextNode(""), mount = () => props.mount || document.body, owner = getOwner();
|
|
1858
|
-
let content;
|
|
1859
|
-
let hydrating = !!sharedConfig.context;
|
|
1860
|
-
createEffect(() => {
|
|
1861
|
-
if (hydrating)
|
|
1862
|
-
getOwner().user = hydrating = false;
|
|
1863
|
-
content || (content = runWithOwner(owner, () => createMemo(() => props.children)));
|
|
1864
|
-
const el = mount();
|
|
1865
|
-
if (el instanceof HTMLHeadElement) {
|
|
1866
|
-
const [clean, setClean] = createSignal(false);
|
|
1867
|
-
const cleanup = () => setClean(true);
|
|
1868
|
-
createRoot((dispose2) => insert(el, () => !clean() ? content() : dispose2(), null));
|
|
1869
|
-
onCleanup(cleanup);
|
|
1870
|
-
} else {
|
|
1871
|
-
const container = createElement(props.isSVG ? "g" : "div", props.isSVG), renderRoot = useShadow && container.attachShadow ? container.attachShadow({
|
|
1872
|
-
mode: "open"
|
|
1873
|
-
}) : container;
|
|
1874
|
-
Object.defineProperty(container, "_$host", {
|
|
1875
|
-
get() {
|
|
1876
|
-
return marker.parentNode;
|
|
1877
|
-
},
|
|
1878
|
-
configurable: true
|
|
1879
|
-
});
|
|
1880
|
-
insert(renderRoot, content);
|
|
1881
|
-
el.appendChild(container);
|
|
1882
|
-
props.ref && props.ref(container);
|
|
1883
|
-
onCleanup(() => el.removeChild(container));
|
|
1884
|
-
}
|
|
1885
|
-
}, void 0, {
|
|
1886
|
-
render: !hydrating
|
|
1887
|
-
});
|
|
1888
|
-
return marker;
|
|
1889
|
-
}
|
|
1890
|
-
function Dynamic(props) {
|
|
1891
|
-
const [p, others] = splitProps(props, ["component"]);
|
|
1892
|
-
const cached = createMemo(() => p.component);
|
|
1893
|
-
return createMemo(() => {
|
|
1894
|
-
const component = cached();
|
|
1895
|
-
switch (typeof component) {
|
|
1896
|
-
case "function":
|
|
1897
|
-
Object.assign(component, {
|
|
1898
|
-
[$DEVCOMP]: true
|
|
1899
|
-
});
|
|
1900
|
-
return untrack(() => component(others));
|
|
1901
|
-
case "string":
|
|
1902
|
-
const isSvg = SVGElements.has(component);
|
|
1903
|
-
const el = sharedConfig.context ? getNextElement() : createElement(component, isSvg);
|
|
1904
|
-
spread(el, others, isSvg);
|
|
1905
|
-
return el;
|
|
1906
|
-
}
|
|
1907
|
-
});
|
|
1908
|
-
}
|
|
1909
|
-
|
|
1910
|
-
export {
|
|
1911
|
-
$PROXY,
|
|
1912
|
-
$TRACK,
|
|
1913
|
-
createRoot,
|
|
1914
|
-
createSignal,
|
|
1915
|
-
createComputed,
|
|
1916
|
-
createRenderEffect,
|
|
1917
|
-
createEffect,
|
|
1918
|
-
createMemo,
|
|
1919
|
-
batch,
|
|
1920
|
-
untrack,
|
|
1921
|
-
on,
|
|
1922
|
-
onMount,
|
|
1923
|
-
onCleanup,
|
|
1924
|
-
getListener,
|
|
1925
|
-
getOwner,
|
|
1926
|
-
useTransition,
|
|
1927
|
-
createContext,
|
|
1928
|
-
useContext,
|
|
1929
|
-
children,
|
|
1930
|
-
createComponent,
|
|
1931
|
-
mergeProps,
|
|
1932
|
-
splitProps,
|
|
1933
|
-
lazy,
|
|
1934
|
-
createUniqueId,
|
|
1935
|
-
For,
|
|
1936
|
-
Index,
|
|
1937
|
-
Show,
|
|
1938
|
-
Switch,
|
|
1939
|
-
Match,
|
|
1940
|
-
DEV,
|
|
1941
|
-
render,
|
|
1942
|
-
template,
|
|
1943
|
-
delegateEvents,
|
|
1944
|
-
setAttribute,
|
|
1945
|
-
isServer,
|
|
1946
|
-
Portal,
|
|
1947
|
-
Dynamic
|
|
1948
|
-
};
|