app-devtools 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -1,437 +1,1091 @@
1
- import Q from "dayjs";
2
- import { sharedConfig as D, createRoot as it, createRenderEffect as C, mergeProps as st, $PROXY as z, $TRACK as _e, getListener as Ke, batch as at, createSignal as re, createMemo as m, splitProps as ct, createComponent as p, Show as ae, For as F, Switch as dt, Match as G } from "solid-js";
3
- import { css as _ } from "solid-styled-components";
4
- import { dequal as Ue } from "dequal";
5
- import { nanoid as ut } from "nanoid";
6
- import { parse as ft } from "regexparam";
7
- import * as pt from "diff";
8
- import gt from "tinykeys";
9
- const ht = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"], mt = /* @__PURE__ */ new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...ht]), $t = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), yt = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
1
+ import dayjs from 'dayjs';
2
+ import { dequal } from 'dequal';
3
+ import { nanoid } from 'nanoid';
4
+ import { parse } from 'regexparam';
5
+ import * as diff from 'diff';
6
+ import tinykeys from 'tinykeys';
7
+
8
+ const sharedConfig = {};
9
+
10
+ const equalFn = (a, b) => a === b;
11
+ const $PROXY = Symbol("solid-proxy");
12
+ const $TRACK = Symbol("solid-track");
13
+ const signalOptions = {
14
+ equals: equalFn
15
+ };
16
+ let runEffects = runQueue;
17
+ const STALE = 1;
18
+ const PENDING = 2;
19
+ const UNOWNED = {
20
+ owned: null,
21
+ cleanups: null,
22
+ context: null,
23
+ owner: null
24
+ };
25
+ var Owner = null;
26
+ let Transition = null;
27
+ let Listener = null;
28
+ let Updates = null;
29
+ let Effects = null;
30
+ let ExecCount = 0;
31
+ function createRoot(fn, detachedOwner) {
32
+ const listener = Listener,
33
+ owner = Owner,
34
+ unowned = fn.length === 0,
35
+ root = unowned ? UNOWNED : {
36
+ owned: null,
37
+ cleanups: null,
38
+ context: null,
39
+ owner: detachedOwner === undefined ? owner : detachedOwner
40
+ },
41
+ updateFn = unowned ? fn : () => fn(() => untrack(() => cleanNode(root)));
42
+ Owner = root;
43
+ Listener = null;
44
+ try {
45
+ return runUpdates(updateFn, true);
46
+ } finally {
47
+ Listener = listener;
48
+ Owner = owner;
49
+ }
50
+ }
51
+ function createSignal(value, options) {
52
+ options = options ? Object.assign({}, signalOptions, options) : signalOptions;
53
+ const s = {
54
+ value,
55
+ observers: null,
56
+ observerSlots: null,
57
+ comparator: options.equals || undefined
58
+ };
59
+ const setter = value => {
60
+ if (typeof value === "function") {
61
+ value = value(s.value);
62
+ }
63
+ return writeSignal(s, value);
64
+ };
65
+ return [readSignal.bind(s), setter];
66
+ }
67
+ function createRenderEffect(fn, value, options) {
68
+ const c = createComputation(fn, value, false, STALE);
69
+ updateComputation(c);
70
+ }
71
+ function createMemo(fn, value, options) {
72
+ options = options ? Object.assign({}, signalOptions, options) : signalOptions;
73
+ const c = createComputation(fn, value, true, 0);
74
+ c.observers = null;
75
+ c.observerSlots = null;
76
+ c.comparator = options.equals || undefined;
77
+ updateComputation(c);
78
+ return readSignal.bind(c);
79
+ }
80
+ function batch(fn) {
81
+ return runUpdates(fn, false);
82
+ }
83
+ function untrack(fn) {
84
+ if (Listener === null) return fn();
85
+ const listener = Listener;
86
+ Listener = null;
87
+ try {
88
+ return fn();
89
+ } finally {
90
+ Listener = listener;
91
+ }
92
+ }
93
+ function onCleanup(fn) {
94
+ if (Owner === null) ;else if (Owner.cleanups === null) Owner.cleanups = [fn];else Owner.cleanups.push(fn);
95
+ return fn;
96
+ }
97
+ function getListener() {
98
+ return Listener;
99
+ }
100
+ function children(fn) {
101
+ const children = createMemo(fn);
102
+ const memo = createMemo(() => resolveChildren(children()));
103
+ memo.toArray = () => {
104
+ const c = memo();
105
+ return Array.isArray(c) ? c : c != null ? [c] : [];
106
+ };
107
+ return memo;
108
+ }
109
+ function readSignal() {
110
+ const runningTransition = Transition ;
111
+ if (this.sources && (this.state || runningTransition )) {
112
+ if (this.state === STALE || runningTransition ) updateComputation(this);else {
113
+ const updates = Updates;
114
+ Updates = null;
115
+ runUpdates(() => lookUpstream(this), false);
116
+ Updates = updates;
117
+ }
118
+ }
119
+ if (Listener) {
120
+ const sSlot = this.observers ? this.observers.length : 0;
121
+ if (!Listener.sources) {
122
+ Listener.sources = [this];
123
+ Listener.sourceSlots = [sSlot];
124
+ } else {
125
+ Listener.sources.push(this);
126
+ Listener.sourceSlots.push(sSlot);
127
+ }
128
+ if (!this.observers) {
129
+ this.observers = [Listener];
130
+ this.observerSlots = [Listener.sources.length - 1];
131
+ } else {
132
+ this.observers.push(Listener);
133
+ this.observerSlots.push(Listener.sources.length - 1);
134
+ }
135
+ }
136
+ return this.value;
137
+ }
138
+ function writeSignal(node, value, isComp) {
139
+ let current = node.value;
140
+ if (!node.comparator || !node.comparator(current, value)) {
141
+ node.value = value;
142
+ if (node.observers && node.observers.length) {
143
+ runUpdates(() => {
144
+ for (let i = 0; i < node.observers.length; i += 1) {
145
+ const o = node.observers[i];
146
+ const TransitionRunning = Transition && Transition.running;
147
+ if (TransitionRunning && Transition.disposed.has(o)) ;
148
+ if (TransitionRunning && !o.tState || !TransitionRunning && !o.state) {
149
+ if (o.pure) Updates.push(o);else Effects.push(o);
150
+ if (o.observers) markDownstream(o);
151
+ }
152
+ if (TransitionRunning) ;else o.state = STALE;
153
+ }
154
+ if (Updates.length > 10e5) {
155
+ Updates = [];
156
+ if (false) ;
157
+ throw new Error();
158
+ }
159
+ }, false);
160
+ }
161
+ }
162
+ return value;
163
+ }
164
+ function updateComputation(node) {
165
+ if (!node.fn) return;
166
+ cleanNode(node);
167
+ const owner = Owner,
168
+ listener = Listener,
169
+ time = ExecCount;
170
+ Listener = Owner = node;
171
+ runComputation(node, node.value, time);
172
+ Listener = listener;
173
+ Owner = owner;
174
+ }
175
+ function runComputation(node, value, time) {
176
+ let nextValue;
177
+ try {
178
+ nextValue = node.fn(value);
179
+ } catch (err) {
180
+ if (node.pure) {
181
+ {
182
+ node.state = STALE;
183
+ node.owned && node.owned.forEach(cleanNode);
184
+ node.owned = null;
185
+ }
186
+ }
187
+ handleError(err);
188
+ }
189
+ if (!node.updatedAt || node.updatedAt <= time) {
190
+ if (node.updatedAt != null && "observers" in node) {
191
+ writeSignal(node, nextValue);
192
+ } else node.value = nextValue;
193
+ node.updatedAt = time;
194
+ }
195
+ }
196
+ function createComputation(fn, init, pure, state = STALE, options) {
197
+ const c = {
198
+ fn,
199
+ state: state,
200
+ updatedAt: null,
201
+ owned: null,
202
+ sources: null,
203
+ sourceSlots: null,
204
+ cleanups: null,
205
+ value: init,
206
+ owner: Owner,
207
+ context: null,
208
+ pure
209
+ };
210
+ if (Owner === null) ;else if (Owner !== UNOWNED) {
211
+ {
212
+ if (!Owner.owned) Owner.owned = [c];else Owner.owned.push(c);
213
+ }
214
+ }
215
+ return c;
216
+ }
217
+ function runTop(node) {
218
+ const runningTransition = Transition ;
219
+ if (node.state === 0 || runningTransition ) return;
220
+ if (node.state === PENDING || runningTransition ) return lookUpstream(node);
221
+ if (node.suspense && untrack(node.suspense.inFallback)) return node.suspense.effects.push(node);
222
+ const ancestors = [node];
223
+ while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {
224
+ if (node.state || runningTransition ) ancestors.push(node);
225
+ }
226
+ for (let i = ancestors.length - 1; i >= 0; i--) {
227
+ node = ancestors[i];
228
+ if (node.state === STALE || runningTransition ) {
229
+ updateComputation(node);
230
+ } else if (node.state === PENDING || runningTransition ) {
231
+ const updates = Updates;
232
+ Updates = null;
233
+ runUpdates(() => lookUpstream(node, ancestors[0]), false);
234
+ Updates = updates;
235
+ }
236
+ }
237
+ }
238
+ function runUpdates(fn, init) {
239
+ if (Updates) return fn();
240
+ let wait = false;
241
+ if (!init) Updates = [];
242
+ if (Effects) wait = true;else Effects = [];
243
+ ExecCount++;
244
+ try {
245
+ const res = fn();
246
+ completeUpdates(wait);
247
+ return res;
248
+ } catch (err) {
249
+ if (!wait) Effects = null;
250
+ Updates = null;
251
+ handleError(err);
252
+ }
253
+ }
254
+ function completeUpdates(wait) {
255
+ if (Updates) {
256
+ runQueue(Updates);
257
+ Updates = null;
258
+ }
259
+ if (wait) return;
260
+ const e = Effects;
261
+ Effects = null;
262
+ if (e.length) runUpdates(() => runEffects(e), false);
263
+ }
264
+ function runQueue(queue) {
265
+ for (let i = 0; i < queue.length; i++) runTop(queue[i]);
266
+ }
267
+ function lookUpstream(node, ignore) {
268
+ const runningTransition = Transition ;
269
+ node.state = 0;
270
+ for (let i = 0; i < node.sources.length; i += 1) {
271
+ const source = node.sources[i];
272
+ if (source.sources) {
273
+ if (source.state === STALE || runningTransition ) {
274
+ if (source !== ignore) runTop(source);
275
+ } else if (source.state === PENDING || runningTransition ) lookUpstream(source, ignore);
276
+ }
277
+ }
278
+ }
279
+ function markDownstream(node) {
280
+ const runningTransition = Transition ;
281
+ for (let i = 0; i < node.observers.length; i += 1) {
282
+ const o = node.observers[i];
283
+ if (!o.state || runningTransition ) {
284
+ o.state = PENDING;
285
+ if (o.pure) Updates.push(o);else Effects.push(o);
286
+ o.observers && markDownstream(o);
287
+ }
288
+ }
289
+ }
290
+ function cleanNode(node) {
291
+ let i;
292
+ if (node.sources) {
293
+ while (node.sources.length) {
294
+ const source = node.sources.pop(),
295
+ index = node.sourceSlots.pop(),
296
+ obs = source.observers;
297
+ if (obs && obs.length) {
298
+ const n = obs.pop(),
299
+ s = source.observerSlots.pop();
300
+ if (index < obs.length) {
301
+ n.sourceSlots[s] = index;
302
+ obs[index] = n;
303
+ source.observerSlots[index] = s;
304
+ }
305
+ }
306
+ }
307
+ }
308
+ if (node.owned) {
309
+ for (i = 0; i < node.owned.length; i++) cleanNode(node.owned[i]);
310
+ node.owned = null;
311
+ }
312
+ if (node.cleanups) {
313
+ for (i = 0; i < node.cleanups.length; i++) node.cleanups[i]();
314
+ node.cleanups = null;
315
+ }
316
+ node.state = 0;
317
+ node.context = null;
318
+ }
319
+ function castError(err) {
320
+ if (err instanceof Error || typeof err === "string") return err;
321
+ return new Error("Unknown error");
322
+ }
323
+ function handleError(err) {
324
+ err = castError(err);
325
+ throw err;
326
+ }
327
+ function resolveChildren(children) {
328
+ if (typeof children === "function" && !children.length) return resolveChildren(children());
329
+ if (Array.isArray(children)) {
330
+ const results = [];
331
+ for (let i = 0; i < children.length; i++) {
332
+ const result = resolveChildren(children[i]);
333
+ Array.isArray(result) ? results.push.apply(results, result) : results.push(result);
334
+ }
335
+ return results;
336
+ }
337
+ return children;
338
+ }
339
+
340
+ const FALLBACK = Symbol("fallback");
341
+ function dispose(d) {
342
+ for (let i = 0; i < d.length; i++) d[i]();
343
+ }
344
+ function mapArray(list, mapFn, options = {}) {
345
+ let items = [],
346
+ mapped = [],
347
+ disposers = [],
348
+ len = 0,
349
+ indexes = mapFn.length > 1 ? [] : null;
350
+ onCleanup(() => dispose(disposers));
351
+ return () => {
352
+ let newItems = list() || [],
353
+ i,
354
+ j;
355
+ newItems[$TRACK];
356
+ return untrack(() => {
357
+ let newLen = newItems.length,
358
+ newIndices,
359
+ newIndicesNext,
360
+ temp,
361
+ tempdisposers,
362
+ tempIndexes,
363
+ start,
364
+ end,
365
+ newEnd,
366
+ item;
367
+ if (newLen === 0) {
368
+ if (len !== 0) {
369
+ dispose(disposers);
370
+ disposers = [];
371
+ items = [];
372
+ mapped = [];
373
+ len = 0;
374
+ indexes && (indexes = []);
375
+ }
376
+ if (options.fallback) {
377
+ items = [FALLBACK];
378
+ mapped[0] = createRoot(disposer => {
379
+ disposers[0] = disposer;
380
+ return options.fallback();
381
+ });
382
+ len = 1;
383
+ }
384
+ }
385
+ else if (len === 0) {
386
+ mapped = new Array(newLen);
387
+ for (j = 0; j < newLen; j++) {
388
+ items[j] = newItems[j];
389
+ mapped[j] = createRoot(mapper);
390
+ }
391
+ len = newLen;
392
+ } else {
393
+ temp = new Array(newLen);
394
+ tempdisposers = new Array(newLen);
395
+ indexes && (tempIndexes = new Array(newLen));
396
+ for (start = 0, end = Math.min(len, newLen); start < end && items[start] === newItems[start]; start++);
397
+ for (end = len - 1, newEnd = newLen - 1; end >= start && newEnd >= start && items[end] === newItems[newEnd]; end--, newEnd--) {
398
+ temp[newEnd] = mapped[end];
399
+ tempdisposers[newEnd] = disposers[end];
400
+ indexes && (tempIndexes[newEnd] = indexes[end]);
401
+ }
402
+ newIndices = new Map();
403
+ newIndicesNext = new Array(newEnd + 1);
404
+ for (j = newEnd; j >= start; j--) {
405
+ item = newItems[j];
406
+ i = newIndices.get(item);
407
+ newIndicesNext[j] = i === undefined ? -1 : i;
408
+ newIndices.set(item, j);
409
+ }
410
+ for (i = start; i <= end; i++) {
411
+ item = items[i];
412
+ j = newIndices.get(item);
413
+ if (j !== undefined && j !== -1) {
414
+ temp[j] = mapped[i];
415
+ tempdisposers[j] = disposers[i];
416
+ indexes && (tempIndexes[j] = indexes[i]);
417
+ j = newIndicesNext[j];
418
+ newIndices.set(item, j);
419
+ } else disposers[i]();
420
+ }
421
+ for (j = start; j < newLen; j++) {
422
+ if (j in temp) {
423
+ mapped[j] = temp[j];
424
+ disposers[j] = tempdisposers[j];
425
+ if (indexes) {
426
+ indexes[j] = tempIndexes[j];
427
+ indexes[j](j);
428
+ }
429
+ } else mapped[j] = createRoot(mapper);
430
+ }
431
+ mapped = mapped.slice(0, len = newLen);
432
+ items = newItems.slice(0);
433
+ }
434
+ return mapped;
435
+ });
436
+ function mapper(disposer) {
437
+ disposers[j] = disposer;
438
+ if (indexes) {
439
+ const [s, set] = createSignal(j);
440
+ indexes[j] = set;
441
+ return mapFn(newItems[j], s);
442
+ }
443
+ return mapFn(newItems[j]);
444
+ }
445
+ };
446
+ }
447
+ function createComponent(Comp, props) {
448
+ return untrack(() => Comp(props || {}));
449
+ }
450
+ function trueFn() {
451
+ return true;
452
+ }
453
+ const propTraps = {
454
+ get(_, property, receiver) {
455
+ if (property === $PROXY) return receiver;
456
+ return _.get(property);
457
+ },
458
+ has(_, property) {
459
+ if (property === $PROXY) return true;
460
+ return _.has(property);
461
+ },
462
+ set: trueFn,
463
+ deleteProperty: trueFn,
464
+ getOwnPropertyDescriptor(_, property) {
465
+ return {
466
+ configurable: true,
467
+ enumerable: true,
468
+ get() {
469
+ return _.get(property);
470
+ },
471
+ set: trueFn,
472
+ deleteProperty: trueFn
473
+ };
474
+ },
475
+ ownKeys(_) {
476
+ return _.keys();
477
+ }
478
+ };
479
+ function resolveSource(s) {
480
+ return !(s = typeof s === "function" ? s() : s) ? {} : s;
481
+ }
482
+ function mergeProps(...sources) {
483
+ let proxy = false;
484
+ for (let i = 0; i < sources.length; i++) {
485
+ const s = sources[i];
486
+ proxy = proxy || !!s && $PROXY in s;
487
+ sources[i] = typeof s === "function" ? (proxy = true, createMemo(s)) : s;
488
+ }
489
+ if (proxy) {
490
+ return new Proxy({
491
+ get(property) {
492
+ for (let i = sources.length - 1; i >= 0; i--) {
493
+ const v = resolveSource(sources[i])[property];
494
+ if (v !== undefined) return v;
495
+ }
496
+ },
497
+ has(property) {
498
+ for (let i = sources.length - 1; i >= 0; i--) {
499
+ if (property in resolveSource(sources[i])) return true;
500
+ }
501
+ return false;
502
+ },
503
+ keys() {
504
+ const keys = [];
505
+ for (let i = 0; i < sources.length; i++) keys.push(...Object.keys(resolveSource(sources[i])));
506
+ return [...new Set(keys)];
507
+ }
508
+ }, propTraps);
509
+ }
510
+ const target = {};
511
+ for (let i = sources.length - 1; i >= 0; i--) {
512
+ if (sources[i]) {
513
+ const descriptors = Object.getOwnPropertyDescriptors(sources[i]);
514
+ for (const key in descriptors) {
515
+ if (key in target) continue;
516
+ Object.defineProperty(target, key, {
517
+ enumerable: true,
518
+ get() {
519
+ for (let i = sources.length - 1; i >= 0; i--) {
520
+ const v = (sources[i] || {})[key];
521
+ if (v !== undefined) return v;
522
+ }
523
+ }
524
+ });
525
+ }
526
+ }
527
+ }
528
+ return target;
529
+ }
530
+ function splitProps(props, ...keys) {
531
+ const blocked = new Set(keys.flat());
532
+ if ($PROXY in props) {
533
+ const res = keys.map(k => {
534
+ return new Proxy({
535
+ get(property) {
536
+ return k.includes(property) ? props[property] : undefined;
537
+ },
538
+ has(property) {
539
+ return k.includes(property) && property in props;
540
+ },
541
+ keys() {
542
+ return k.filter(property => property in props);
543
+ }
544
+ }, propTraps);
545
+ });
546
+ res.push(new Proxy({
547
+ get(property) {
548
+ return blocked.has(property) ? undefined : props[property];
549
+ },
550
+ has(property) {
551
+ return blocked.has(property) ? false : property in props;
552
+ },
553
+ keys() {
554
+ return Object.keys(props).filter(k => !blocked.has(k));
555
+ }
556
+ }, propTraps));
557
+ return res;
558
+ }
559
+ const descriptors = Object.getOwnPropertyDescriptors(props);
560
+ keys.push(Object.keys(descriptors).filter(k => !blocked.has(k)));
561
+ return keys.map(k => {
562
+ const clone = {};
563
+ for (let i = 0; i < k.length; i++) {
564
+ const key = k[i];
565
+ if (!(key in props)) continue;
566
+ Object.defineProperty(clone, key, descriptors[key] ? descriptors[key] : {
567
+ get() {
568
+ return props[key];
569
+ },
570
+ set() {
571
+ return true;
572
+ },
573
+ enumerable: true
574
+ });
575
+ }
576
+ return clone;
577
+ });
578
+ }
579
+
580
+ function For(props) {
581
+ const fallback = "fallback" in props && {
582
+ fallback: () => props.fallback
583
+ };
584
+ return createMemo(mapArray(() => props.each, props.children, fallback || undefined));
585
+ }
586
+ function Show(props) {
587
+ let strictEqual = false;
588
+ const keyed = props.keyed;
589
+ const condition = createMemo(() => props.when, undefined, {
590
+ equals: (a, b) => strictEqual ? a === b : !a === !b
591
+ });
592
+ return createMemo(() => {
593
+ const c = condition();
594
+ if (c) {
595
+ const child = props.children;
596
+ const fn = typeof child === "function" && child.length > 0;
597
+ strictEqual = keyed || fn;
598
+ return fn ? untrack(() => child(c)) : child;
599
+ }
600
+ return props.fallback;
601
+ }, undefined, undefined);
602
+ }
603
+ function Switch(props) {
604
+ let strictEqual = false;
605
+ let keyed = false;
606
+ const equals = (a, b) => a[0] === b[0] && (strictEqual ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2];
607
+ const conditions = children(() => props.children),
608
+ evalConditions = createMemo(() => {
609
+ let conds = conditions();
610
+ if (!Array.isArray(conds)) conds = [conds];
611
+ for (let i = 0; i < conds.length; i++) {
612
+ const c = conds[i].when;
613
+ if (c) {
614
+ keyed = !!conds[i].keyed;
615
+ return [i, c, conds[i]];
616
+ }
617
+ }
618
+ return [-1];
619
+ }, undefined, {
620
+ equals
621
+ });
622
+ return createMemo(() => {
623
+ const [index, when, cond] = evalConditions();
624
+ if (index < 0) return props.fallback;
625
+ const c = cond.children;
626
+ const fn = typeof c === "function" && c.length > 0;
627
+ strictEqual = keyed || fn;
628
+ return fn ? untrack(() => c(when)) : c;
629
+ }, undefined, undefined);
630
+ }
631
+ function Match(props) {
632
+ return props;
633
+ }
634
+
635
+ 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"];
636
+ const Properties = /*#__PURE__*/new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans]);
637
+ const ChildProperties = /*#__PURE__*/new Set(["innerHTML", "textContent", "innerText", "children"]);
638
+ const Aliases = /*#__PURE__*/Object.assign(Object.create(null), {
10
639
  className: "class",
11
640
  htmlFor: "for"
12
- }), Ne = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
641
+ });
642
+ const PropAliases = /*#__PURE__*/Object.assign(Object.create(null), {
13
643
  class: "className",
14
644
  formnovalidate: "formNoValidate",
15
645
  ismap: "isMap",
16
646
  nomodule: "noModule",
17
647
  playsinline: "playsInline",
18
648
  readonly: "readOnly"
19
- }), vt = /* @__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"]), bt = {
649
+ });
650
+ 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"]);
651
+ const SVGNamespace = {
20
652
  xlink: "http://www.w3.org/1999/xlink",
21
653
  xml: "http://www.w3.org/XML/1998/namespace"
22
654
  };
23
- function Ct(e, t, n) {
24
- let l = n.length, i = t.length, o = l, s = 0, r = 0, a = t[i - 1].nextSibling, c = null;
25
- for (; s < i || r < o; ) {
26
- if (t[s] === n[r]) {
27
- s++, r++;
655
+
656
+ function reconcileArrays(parentNode, a, b) {
657
+ let bLength = b.length,
658
+ aEnd = a.length,
659
+ bEnd = bLength,
660
+ aStart = 0,
661
+ bStart = 0,
662
+ after = a[aEnd - 1].nextSibling,
663
+ map = null;
664
+ while (aStart < aEnd || bStart < bEnd) {
665
+ if (a[aStart] === b[bStart]) {
666
+ aStart++;
667
+ bStart++;
28
668
  continue;
29
669
  }
30
- for (; t[i - 1] === n[o - 1]; )
31
- i--, o--;
32
- if (i === s) {
33
- const d = o < l ? r ? n[r - 1].nextSibling : n[o - r] : a;
34
- for (; r < o; )
35
- e.insertBefore(n[r++], d);
36
- } else if (o === r)
37
- for (; s < i; )
38
- (!c || !c.has(t[s])) && t[s].remove(), s++;
39
- else if (t[s] === n[o - 1] && n[r] === t[i - 1]) {
40
- const d = t[--i].nextSibling;
41
- e.insertBefore(n[r++], t[s++].nextSibling), e.insertBefore(n[--o], d), t[i] = n[o];
670
+ while (a[aEnd - 1] === b[bEnd - 1]) {
671
+ aEnd--;
672
+ bEnd--;
673
+ }
674
+ if (aEnd === aStart) {
675
+ const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after;
676
+ while (bStart < bEnd) parentNode.insertBefore(b[bStart++], node);
677
+ } else if (bEnd === bStart) {
678
+ while (aStart < aEnd) {
679
+ if (!map || !map.has(a[aStart])) a[aStart].remove();
680
+ aStart++;
681
+ }
682
+ } else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) {
683
+ const node = a[--aEnd].nextSibling;
684
+ parentNode.insertBefore(b[bStart++], a[aStart++].nextSibling);
685
+ parentNode.insertBefore(b[--bEnd], node);
686
+ a[aEnd] = b[bEnd];
42
687
  } else {
43
- if (!c) {
44
- c = /* @__PURE__ */ new Map();
45
- let g = r;
46
- for (; g < o; )
47
- c.set(n[g], g++);
688
+ if (!map) {
689
+ map = new Map();
690
+ let i = bStart;
691
+ while (i < bEnd) map.set(b[i], i++);
48
692
  }
49
- const d = c.get(t[s]);
50
- if (d != null)
51
- if (r < d && d < o) {
52
- let g = s, f = 1, y;
53
- for (; ++g < i && g < o && !((y = c.get(t[g])) == null || y !== d + f); )
54
- f++;
55
- if (f > d - r) {
56
- const v = t[s];
57
- for (; r < d; )
58
- e.insertBefore(n[r++], v);
59
- } else
60
- e.replaceChild(n[r++], t[s++]);
61
- } else
62
- s++;
63
- else
64
- t[s++].remove();
65
- }
66
- }
67
- }
68
- const Se = "_$DX_DELEGATE";
69
- function xt(e, t, n, l = {}) {
70
- let i;
71
- return it((o) => {
72
- i = o, t === document ? e() : u(t, e(), t.firstChild ? null : void 0, n);
73
- }, l.owner), () => {
74
- i(), t.textContent = "";
693
+ const index = map.get(a[aStart]);
694
+ if (index != null) {
695
+ if (bStart < index && index < bEnd) {
696
+ let i = aStart,
697
+ sequence = 1,
698
+ t;
699
+ while (++i < aEnd && i < bEnd) {
700
+ if ((t = map.get(a[i])) == null || t !== index + sequence) break;
701
+ sequence++;
702
+ }
703
+ if (sequence > index - bStart) {
704
+ const node = a[aStart];
705
+ while (bStart < index) parentNode.insertBefore(b[bStart++], node);
706
+ } else parentNode.replaceChild(b[bStart++], a[aStart++]);
707
+ } else aStart++;
708
+ } else a[aStart++].remove();
709
+ }
710
+ }
711
+ }
712
+
713
+ const $$EVENTS = "_$DX_DELEGATE";
714
+ function render(code, element, init, options = {}) {
715
+ let disposer;
716
+ createRoot(dispose => {
717
+ disposer = dispose;
718
+ element === document ? code() : insert(element, code(), element.firstChild ? null : undefined, init);
719
+ }, options.owner);
720
+ return () => {
721
+ disposer();
722
+ element.textContent = "";
75
723
  };
76
724
  }
77
- function $(e, t, n) {
78
- const l = document.createElement("template");
79
- l.innerHTML = e;
80
- let i = l.content.firstChild;
81
- return n && (i = i.firstChild), i;
82
- }
83
- function ce(e, t = window.document) {
84
- const n = t[Se] || (t[Se] = /* @__PURE__ */ new Set());
85
- for (let l = 0, i = e.length; l < i; l++) {
86
- const o = e[l];
87
- n.has(o) || (n.add(o), t.addEventListener(o, At));
88
- }
89
- }
90
- function P(e, t, n) {
91
- n == null ? e.removeAttribute(t) : e.setAttribute(t, n);
92
- }
93
- function wt(e, t, n, l) {
94
- l == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, l);
95
- }
96
- function b(e, t) {
97
- t == null ? e.removeAttribute("class") : e.className = t;
98
- }
99
- function oe(e, t, n, l) {
100
- if (l)
101
- Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
102
- else if (Array.isArray(n)) {
103
- const i = n[0];
104
- e.addEventListener(t, n[0] = (o) => i.call(e, n[1], o));
105
- } else
106
- e.addEventListener(t, n);
107
- }
108
- function _t(e, t, n = {}) {
109
- const l = Object.keys(t || {}), i = Object.keys(n);
110
- let o, s;
111
- for (o = 0, s = i.length; o < s; o++) {
112
- const r = i[o];
113
- !r || r === "undefined" || t[r] || (ke(e, r, !1), delete n[r]);
114
- }
115
- for (o = 0, s = l.length; o < s; o++) {
116
- const r = l[o], a = !!t[r];
117
- !r || r === "undefined" || n[r] === a || !a || (ke(e, r, !0), n[r] = a);
118
- }
119
- return n;
120
- }
121
- function We(e, t, n) {
122
- if (!t)
123
- return n ? P(e, "style") : t;
124
- const l = e.style;
125
- if (typeof t == "string")
126
- return l.cssText = t;
127
- typeof n == "string" && (l.cssText = n = void 0), n || (n = {}), t || (t = {});
128
- let i, o;
129
- for (o in n)
130
- t[o] == null && l.removeProperty(o), delete n[o];
131
- for (o in t)
132
- i = t[o], i !== n[o] && (l.setProperty(o, i), n[o] = i);
133
- return n;
134
- }
135
- function Nt(e, t = {}, n, l) {
136
- const i = {};
137
- return l || C(() => i.children = U(e, t.children, i.children)), C(() => t.ref && t.ref(e)), C(() => St(e, t, n, !0, i, !0)), i;
138
- }
139
- function u(e, t, n, l) {
140
- if (n !== void 0 && !l && (l = []), typeof t != "function")
141
- return U(e, t, l, n);
142
- C((i) => U(e, t(), i, n), l);
143
- }
144
- function St(e, t, n, l, i = {}, o = !1) {
145
- t || (t = {});
146
- for (const s in i)
147
- if (!(s in t)) {
148
- if (s === "children")
149
- continue;
150
- i[s] = Ae(e, s, null, i[s], n, o);
725
+ function template(html, check, isSVG) {
726
+ const t = document.createElement("template");
727
+ t.innerHTML = html;
728
+ let node = t.content.firstChild;
729
+ if (isSVG) node = node.firstChild;
730
+ return node;
731
+ }
732
+ function delegateEvents(eventNames, document = window.document) {
733
+ const e = document[$$EVENTS] || (document[$$EVENTS] = new Set());
734
+ for (let i = 0, l = eventNames.length; i < l; i++) {
735
+ const name = eventNames[i];
736
+ if (!e.has(name)) {
737
+ e.add(name);
738
+ document.addEventListener(name, eventHandler);
739
+ }
740
+ }
741
+ }
742
+ function setAttribute(node, name, value) {
743
+ if (value == null) node.removeAttribute(name);else node.setAttribute(name, value);
744
+ }
745
+ function setAttributeNS(node, namespace, name, value) {
746
+ if (value == null) node.removeAttributeNS(namespace, name);else node.setAttributeNS(namespace, name, value);
747
+ }
748
+ function className(node, value) {
749
+ if (value == null) node.removeAttribute("class");else node.className = value;
750
+ }
751
+ function addEventListener(node, name, handler, delegate) {
752
+ if (delegate) {
753
+ if (Array.isArray(handler)) {
754
+ node[`$$${name}`] = handler[0];
755
+ node[`$$${name}Data`] = handler[1];
756
+ } else node[`$$${name}`] = handler;
757
+ } else if (Array.isArray(handler)) {
758
+ const handlerFn = handler[0];
759
+ node.addEventListener(name, handler[0] = e => handlerFn.call(node, handler[1], e));
760
+ } else node.addEventListener(name, handler);
761
+ }
762
+ function classList(node, value, prev = {}) {
763
+ const classKeys = Object.keys(value || {}),
764
+ prevKeys = Object.keys(prev);
765
+ let i, len;
766
+ for (i = 0, len = prevKeys.length; i < len; i++) {
767
+ const key = prevKeys[i];
768
+ if (!key || key === "undefined" || value[key]) continue;
769
+ toggleClassKey(node, key, false);
770
+ delete prev[key];
771
+ }
772
+ for (i = 0, len = classKeys.length; i < len; i++) {
773
+ const key = classKeys[i],
774
+ classValue = !!value[key];
775
+ if (!key || key === "undefined" || prev[key] === classValue || !classValue) continue;
776
+ toggleClassKey(node, key, true);
777
+ prev[key] = classValue;
778
+ }
779
+ return prev;
780
+ }
781
+ function style$1(node, value, prev) {
782
+ if (!value) return prev ? setAttribute(node, "style") : value;
783
+ const nodeStyle = node.style;
784
+ if (typeof value === "string") return nodeStyle.cssText = value;
785
+ typeof prev === "string" && (nodeStyle.cssText = prev = undefined);
786
+ prev || (prev = {});
787
+ value || (value = {});
788
+ let v, s;
789
+ for (s in prev) {
790
+ value[s] == null && nodeStyle.removeProperty(s);
791
+ delete prev[s];
792
+ }
793
+ for (s in value) {
794
+ v = value[s];
795
+ if (v !== prev[s]) {
796
+ nodeStyle.setProperty(s, v);
797
+ prev[s] = v;
798
+ }
799
+ }
800
+ return prev;
801
+ }
802
+ function spread(node, props = {}, isSVG, skipChildren) {
803
+ const prevProps = {};
804
+ if (!skipChildren) {
805
+ createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
806
+ }
807
+ createRenderEffect(() => props.ref && props.ref(node));
808
+ createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
809
+ return prevProps;
810
+ }
811
+ function insert(parent, accessor, marker, initial) {
812
+ if (marker !== undefined && !initial) initial = [];
813
+ if (typeof accessor !== "function") return insertExpression(parent, accessor, initial, marker);
814
+ createRenderEffect(current => insertExpression(parent, accessor(), current, marker), initial);
815
+ }
816
+ function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {
817
+ props || (props = {});
818
+ for (const prop in prevProps) {
819
+ if (!(prop in props)) {
820
+ if (prop === "children") continue;
821
+ prevProps[prop] = assignProp(node, prop, null, prevProps[prop], isSVG, skipRef);
151
822
  }
152
- for (const s in t) {
153
- if (s === "children") {
154
- l || U(e, t.children);
823
+ }
824
+ for (const prop in props) {
825
+ if (prop === "children") {
826
+ if (!skipChildren) insertExpression(node, props.children);
155
827
  continue;
156
828
  }
157
- const r = t[s];
158
- i[s] = Ae(e, s, r, i[s], n, o);
159
- }
160
- }
161
- function kt(e) {
162
- return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
163
- }
164
- function ke(e, t, n) {
165
- const l = t.trim().split(/\s+/);
166
- for (let i = 0, o = l.length; i < o; i++)
167
- e.classList.toggle(l[i], n);
168
- }
169
- function Ae(e, t, n, l, i, o) {
170
- let s, r, a;
171
- if (t === "style")
172
- return We(e, n, l);
173
- if (t === "classList")
174
- return _t(e, n, l);
175
- if (n === l)
176
- return l;
177
- if (t === "ref")
178
- o || n(e);
179
- else if (t.slice(0, 3) === "on:") {
180
- const c = t.slice(3);
181
- l && e.removeEventListener(c, l), n && e.addEventListener(c, n);
182
- } else if (t.slice(0, 10) === "oncapture:") {
183
- const c = t.slice(10);
184
- l && e.removeEventListener(c, l, !0), n && e.addEventListener(c, n, !0);
185
- } else if (t.slice(0, 2) === "on") {
186
- const c = t.slice(2).toLowerCase(), d = vt.has(c);
187
- if (!d && l) {
188
- const g = Array.isArray(l) ? l[0] : l;
189
- e.removeEventListener(c, g);
190
- }
191
- (d || n) && (oe(e, c, n, d), d && ce([c]));
192
- } else if ((a = $t.has(t)) || !i && (Ne[t] || (r = mt.has(t))) || (s = e.nodeName.includes("-")))
193
- t === "class" || t === "className" ? b(e, n) : s && !r && !a ? e[kt(t)] = n : e[Ne[t] || t] = n;
194
- else {
195
- const c = i && t.indexOf(":") > -1 && bt[t.split(":")[0]];
196
- c ? wt(e, c, t, n) : P(e, yt[t] || t, n);
197
- }
198
- return n;
199
- }
200
- function At(e) {
201
- const t = `$$${e.type}`;
202
- let n = e.composedPath && e.composedPath()[0] || e.target;
203
- for (e.target !== n && Object.defineProperty(e, "target", {
204
- configurable: !0,
205
- value: n
206
- }), Object.defineProperty(e, "currentTarget", {
207
- configurable: !0,
208
- get() {
209
- return n || document;
210
- }
211
- }), D.registry && !D.done && (D.done = !0, document.querySelectorAll("[id^=pl-]").forEach((l) => {
212
- for (; l && l.nodeType !== 8 && l.nodeValue !== "pl-" + e; ) {
213
- let i = l.nextSibling;
214
- l.remove(), l = i;
215
- }
216
- l && l.remove();
217
- })); n; ) {
218
- const l = n[t];
219
- if (l && !n.disabled) {
220
- const i = n[`${t}Data`];
221
- if (i !== void 0 ? l.call(n, i, e) : l.call(n, e), e.cancelBubble)
222
- return;
829
+ const value = props[prop];
830
+ prevProps[prop] = assignProp(node, prop, value, prevProps[prop], isSVG, skipRef);
831
+ }
832
+ }
833
+ function toPropertyName(name) {
834
+ return name.toLowerCase().replace(/-([a-z])/g, (_, w) => w.toUpperCase());
835
+ }
836
+ function toggleClassKey(node, key, value) {
837
+ const classNames = key.trim().split(/\s+/);
838
+ for (let i = 0, nameLen = classNames.length; i < nameLen; i++) node.classList.toggle(classNames[i], value);
839
+ }
840
+ function assignProp(node, prop, value, prev, isSVG, skipRef) {
841
+ let isCE, isProp, isChildProp;
842
+ if (prop === "style") return style$1(node, value, prev);
843
+ if (prop === "classList") return classList(node, value, prev);
844
+ if (value === prev) return prev;
845
+ if (prop === "ref") {
846
+ if (!skipRef) value(node);
847
+ } else if (prop.slice(0, 3) === "on:") {
848
+ const e = prop.slice(3);
849
+ prev && node.removeEventListener(e, prev);
850
+ value && node.addEventListener(e, value);
851
+ } else if (prop.slice(0, 10) === "oncapture:") {
852
+ const e = prop.slice(10);
853
+ prev && node.removeEventListener(e, prev, true);
854
+ value && node.addEventListener(e, value, true);
855
+ } else if (prop.slice(0, 2) === "on") {
856
+ const name = prop.slice(2).toLowerCase();
857
+ const delegate = DelegatedEvents.has(name);
858
+ if (!delegate && prev) {
859
+ const h = Array.isArray(prev) ? prev[0] : prev;
860
+ node.removeEventListener(name, h);
861
+ }
862
+ if (delegate || value) {
863
+ addEventListener(node, name, value, delegate);
864
+ delegate && delegateEvents([name]);
223
865
  }
224
- n = n._$host || n.parentNode || n.host;
225
- }
226
- }
227
- function U(e, t, n, l, i) {
228
- for (D.context && !n && (n = [...e.childNodes]); typeof n == "function"; )
229
- n = n();
230
- if (t === n)
231
- return n;
232
- const o = typeof t, s = l !== void 0;
233
- if (e = s && n[0] && n[0].parentNode || e, o === "string" || o === "number") {
234
- if (D.context)
235
- return n;
236
- if (o === "number" && (t = t.toString()), s) {
237
- let r = n[0];
238
- r && r.nodeType === 3 ? r.data = t : r = document.createTextNode(t), n = Z(e, n, l, r);
239
- } else
240
- n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
241
- } else if (t == null || o === "boolean") {
242
- if (D.context)
243
- return n;
244
- n = Z(e, n, l);
866
+ } else if ((isChildProp = ChildProperties.has(prop)) || !isSVG && (PropAliases[prop] || (isProp = Properties.has(prop))) || (isCE = node.nodeName.includes("-"))) {
867
+ if (prop === "class" || prop === "className") className(node, value);else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;else node[PropAliases[prop] || prop] = value;
245
868
  } else {
246
- if (o === "function")
247
- return C(() => {
248
- let r = t();
249
- for (; typeof r == "function"; )
250
- r = r();
251
- n = U(e, r, n, l);
252
- }), () => n;
253
- if (Array.isArray(t)) {
254
- const r = [], a = n && Array.isArray(n);
255
- if (me(r, t, n, i))
256
- return C(() => n = U(e, r, n, l, !0)), () => n;
257
- if (D.context) {
258
- if (!r.length)
259
- return n;
260
- for (let c = 0; c < r.length; c++)
261
- if (r[c].parentNode)
262
- return n = r;
263
- }
264
- if (r.length === 0) {
265
- if (n = Z(e, n, l), s)
266
- return n;
267
- } else
268
- a ? n.length === 0 ? Pe(e, r, l) : Ct(e, n, r) : (n && Z(e), Pe(e, r));
269
- n = r;
270
- } else if (t instanceof Node) {
271
- if (D.context && t.parentNode)
272
- return n = s ? [t] : t;
273
- if (Array.isArray(n)) {
274
- if (s)
275
- return n = Z(e, n, l, t);
276
- Z(e, n, null, t);
277
- } else
278
- n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
279
- n = t;
280
- }
281
- }
282
- return n;
283
- }
284
- function me(e, t, n, l) {
285
- let i = !1;
286
- for (let o = 0, s = t.length; o < s; o++) {
287
- let r = t[o], a = n && n[o];
288
- if (r instanceof Node)
289
- e.push(r);
290
- else if (!(r == null || r === !0 || r === !1))
291
- if (Array.isArray(r))
292
- i = me(e, r, a) || i;
293
- else if (typeof r == "function")
294
- if (l) {
295
- for (; typeof r == "function"; )
296
- r = r();
297
- i = me(e, Array.isArray(r) ? r : [r], Array.isArray(a) ? a : [a]) || i;
298
- } else
299
- e.push(r), i = !0;
300
- else {
301
- const c = String(r);
302
- a && a.nodeType === 3 && a.data === c ? e.push(a) : e.push(document.createTextNode(c));
869
+ const ns = isSVG && prop.indexOf(":") > -1 && SVGNamespace[prop.split(":")[0]];
870
+ if (ns) setAttributeNS(node, ns, prop, value);else setAttribute(node, Aliases[prop] || prop, value);
871
+ }
872
+ return value;
873
+ }
874
+ function eventHandler(e) {
875
+ const key = `$$${e.type}`;
876
+ let node = e.composedPath && e.composedPath()[0] || e.target;
877
+ if (e.target !== node) {
878
+ Object.defineProperty(e, "target", {
879
+ configurable: true,
880
+ value: node
881
+ });
882
+ }
883
+ Object.defineProperty(e, "currentTarget", {
884
+ configurable: true,
885
+ get() {
886
+ return node || document;
887
+ }
888
+ });
889
+ if (sharedConfig.registry && !sharedConfig.done) {
890
+ sharedConfig.done = true;
891
+ document.querySelectorAll("[id^=pl-]").forEach(elem => {
892
+ while (elem && elem.nodeType !== 8 && elem.nodeValue !== "pl-" + e) {
893
+ let x = elem.nextSibling;
894
+ elem.remove();
895
+ elem = x;
303
896
  }
897
+ elem && elem.remove();
898
+ });
304
899
  }
305
- return i;
306
- }
307
- function Pe(e, t, n = null) {
308
- for (let l = 0, i = t.length; l < i; l++)
309
- e.insertBefore(t[l], n);
310
- }
311
- function Z(e, t, n, l) {
312
- if (n === void 0)
313
- return e.textContent = "";
314
- const i = l || document.createTextNode("");
315
- if (t.length) {
316
- let o = !1;
317
- for (let s = t.length - 1; s >= 0; s--) {
318
- const r = t[s];
319
- if (i !== r) {
320
- const a = r.parentNode === e;
321
- !o && !s ? a ? e.replaceChild(i, r) : e.insertBefore(i, n) : a && r.remove();
322
- } else
323
- o = !0;
324
- }
325
- } else
326
- e.insertBefore(i, n);
327
- return [i];
328
- }
329
- var Pt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, $e = {}, Tt = {
330
- get exports() {
331
- return $e;
332
- },
333
- set exports(e) {
334
- $e = e;
900
+ while (node) {
901
+ const handler = node[key];
902
+ if (handler && !node.disabled) {
903
+ const data = node[`${key}Data`];
904
+ data !== undefined ? handler.call(node, data, e) : handler.call(node, e);
905
+ if (e.cancelBubble) return;
906
+ }
907
+ node = node._$host || node.parentNode || node.host;
335
908
  }
336
- };
337
- (function(e, t) {
338
- (function(n, l) {
339
- e.exports = l();
340
- })(Pt, function() {
341
- return function(n, l, i) {
342
- n = n || {};
343
- var o = l.prototype, s = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
344
- function r(c, d, g, f) {
345
- return o.fromToBase(c, d, g, f);
909
+ }
910
+ function insertExpression(parent, value, current, marker, unwrapArray) {
911
+ if (sharedConfig.context && !current) current = [...parent.childNodes];
912
+ while (typeof current === "function") current = current();
913
+ if (value === current) return current;
914
+ const t = typeof value,
915
+ multi = marker !== undefined;
916
+ parent = multi && current[0] && current[0].parentNode || parent;
917
+ if (t === "string" || t === "number") {
918
+ if (sharedConfig.context) return current;
919
+ if (t === "number") value = value.toString();
920
+ if (multi) {
921
+ let node = current[0];
922
+ if (node && node.nodeType === 3) {
923
+ node.data = value;
924
+ } else node = document.createTextNode(value);
925
+ current = cleanChildren(parent, current, marker, node);
926
+ } else {
927
+ if (current !== "" && typeof current === "string") {
928
+ current = parent.firstChild.data = value;
929
+ } else current = parent.textContent = value;
930
+ }
931
+ } else if (value == null || t === "boolean") {
932
+ if (sharedConfig.context) return current;
933
+ current = cleanChildren(parent, current, marker);
934
+ } else if (t === "function") {
935
+ createRenderEffect(() => {
936
+ let v = value();
937
+ while (typeof v === "function") v = v();
938
+ current = insertExpression(parent, v, current, marker);
939
+ });
940
+ return () => current;
941
+ } else if (Array.isArray(value)) {
942
+ const array = [];
943
+ const currentArray = current && Array.isArray(current);
944
+ if (normalizeIncomingArray(array, value, current, unwrapArray)) {
945
+ createRenderEffect(() => current = insertExpression(parent, array, current, marker, true));
946
+ return () => current;
947
+ }
948
+ if (sharedConfig.context) {
949
+ if (!array.length) return current;
950
+ for (let i = 0; i < array.length; i++) {
951
+ if (array[i].parentNode) return current = array;
346
952
  }
347
- i.en.relativeTime = s, o.fromToBase = function(c, d, g, f, y) {
348
- for (var v, x, w, A = g.$locale().relativeTime || s, k = n.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], ee = k.length, O = 0; O < ee; O += 1) {
349
- var T = k[O];
350
- T.d && (v = f ? i(c).diff(g, T.d, !0) : g.diff(c, T.d, !0));
351
- var V = (n.rounding || Math.round)(Math.abs(v));
352
- if (w = v > 0, V <= T.r || !T.r) {
353
- V <= 1 && O > 0 && (T = k[O - 1]);
354
- var pe = A[T.l];
355
- y && (V = y("" + V)), x = typeof pe == "string" ? pe.replace("%d", V) : pe(V, d, T.l, w);
356
- break;
357
- }
358
- }
359
- if (d)
360
- return x;
361
- var ge = w ? A.future : A.past;
362
- return typeof ge == "function" ? ge(x) : ge.replace("%s", x);
363
- }, o.to = function(c, d) {
364
- return r(c, d, this, !0);
365
- }, o.from = function(c, d) {
366
- return r(c, d, this);
367
- };
368
- var a = function(c) {
369
- return c.$u ? i.utc() : i();
370
- };
371
- o.toNow = function(c) {
372
- return this.to(a(this), c);
373
- }, o.fromNow = function(c) {
374
- return this.from(a(this), c);
375
- };
376
- };
377
- });
378
- })(Tt);
379
- const Et = $e, Lt = /* @__PURE__ */ $("<button></button>"), M = (e) => (() => {
380
- const t = Lt.cloneNode(!0);
381
- return Nt(t, st(e, {
382
- onMouseDown: Ot
383
- }), !1, !1), t;
384
- })();
385
- function Ot(e) {
953
+ }
954
+ if (array.length === 0) {
955
+ current = cleanChildren(parent, current, marker);
956
+ if (multi) return current;
957
+ } else if (currentArray) {
958
+ if (current.length === 0) {
959
+ appendNodes(parent, array, marker);
960
+ } else reconcileArrays(parent, current, array);
961
+ } else {
962
+ current && cleanChildren(parent);
963
+ appendNodes(parent, array);
964
+ }
965
+ current = array;
966
+ } else if (value instanceof Node) {
967
+ if (sharedConfig.context && value.parentNode) return current = multi ? [value] : value;
968
+ if (Array.isArray(current)) {
969
+ if (multi) return current = cleanChildren(parent, current, marker, value);
970
+ cleanChildren(parent, current, null, value);
971
+ } else if (current == null || current === "" || !parent.firstChild) {
972
+ parent.appendChild(value);
973
+ } else parent.replaceChild(value, parent.firstChild);
974
+ current = value;
975
+ } else ;
976
+ return current;
977
+ }
978
+ function normalizeIncomingArray(normalized, array, current, unwrap) {
979
+ let dynamic = false;
980
+ for (let i = 0, len = array.length; i < len; i++) {
981
+ let item = array[i],
982
+ prev = current && current[i];
983
+ if (item instanceof Node) {
984
+ normalized.push(item);
985
+ } else if (item == null || item === true || item === false) ; else if (Array.isArray(item)) {
986
+ dynamic = normalizeIncomingArray(normalized, item, prev) || dynamic;
987
+ } else if ((typeof item) === "function") {
988
+ if (unwrap) {
989
+ while (typeof item === "function") item = item();
990
+ dynamic = normalizeIncomingArray(normalized, Array.isArray(item) ? item : [item], Array.isArray(prev) ? prev : [prev]) || dynamic;
991
+ } else {
992
+ normalized.push(item);
993
+ dynamic = true;
994
+ }
995
+ } else {
996
+ const value = String(item);
997
+ if (prev && prev.nodeType === 3 && prev.data === value) {
998
+ normalized.push(prev);
999
+ } else normalized.push(document.createTextNode(value));
1000
+ }
1001
+ }
1002
+ return dynamic;
1003
+ }
1004
+ function appendNodes(parent, array, marker = null) {
1005
+ for (let i = 0, len = array.length; i < len; i++) parent.insertBefore(array[i], marker);
1006
+ }
1007
+ function cleanChildren(parent, current, marker, replacement) {
1008
+ if (marker === undefined) return parent.textContent = "";
1009
+ const node = replacement || document.createTextNode("");
1010
+ if (current.length) {
1011
+ let inserted = false;
1012
+ for (let i = current.length - 1; i >= 0; i--) {
1013
+ const el = current[i];
1014
+ if (node !== el) {
1015
+ const isParent = el.parentNode === parent;
1016
+ if (!inserted && !i) isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);else isParent && el.remove();
1017
+ } else inserted = true;
1018
+ }
1019
+ } else parent.insertBefore(node, marker);
1020
+ return [node];
1021
+ }
1022
+
1023
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
1024
+
1025
+ var relativeTimeExports = {};
1026
+ var relativeTime$1 = {
1027
+ get exports(){ return relativeTimeExports; },
1028
+ set exports(v){ relativeTimeExports = v; },
1029
+ };
1030
+
1031
+ (function (module, exports) {
1032
+ !function(r,e){module.exports=e();}(commonjsGlobal,(function(){return function(r,e,t){r=r||{};var n=e.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(""+p)),a="string"==typeof v?v.replace("%d",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return "function"==typeof M?M(a):M.replace("%s",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)};}}));
1033
+ } (relativeTime$1));
1034
+
1035
+ const relativeTime = relativeTimeExports;
1036
+
1037
+ const _tmpl$$b = /*#__PURE__*/template(`<button></button>`);
1038
+ /* eslint-disable @typescript-eslint/no-unsafe-call */
1039
+ /* eslint-disable @typescript-eslint/no-unsafe-member-access */
1040
+
1041
+ const ButtonElement = props => {
1042
+ return (() => {
1043
+ const _el$ = _tmpl$$b.cloneNode(true);
1044
+ spread(_el$, mergeProps(props, {
1045
+ "onMouseDown": preventDefault
1046
+ }), false, false);
1047
+ return _el$;
1048
+ })();
1049
+ };
1050
+ function preventDefault(e) {
386
1051
  e.preventDefault();
387
1052
  }
388
- const jt = `<svg
389
- xmlns="http://www.w3.org/2000/svg"
390
- width="32"
391
- height="32"
392
- viewBox="0 0 32 32"
393
- >
394
- <path
395
- fill="currentColor"
396
- d="m24 12l-8 10l-8-10z"
397
- />
398
- </svg>
399
- `, Mt = `<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
400
- <path d="M21 28C22.1046 28 23 27.1046 23 26C23 24.8954 22.1046 24 21 24C19.8954 24 19 24.8954 19 26C19 27.1046 19.8954 28 21 28Z" fill="currentColor"/>
401
- <path d="M21 8C22.1046 8 23 7.10457 23 6C23 4.89543 22.1046 4 21 4C19.8954 4 19 4.89543 19 6C19 7.10457 19.8954 8 21 8Z" fill="currentColor"/>
402
- <path d="M4 18C5.10457 18 6 17.1046 6 16C6 14.8954 5.10457 14 4 14C2.89543 14 2 14.8954 2 16C2 17.1046 2.89543 18 4 18Z" fill="currentColor"/>
403
- <path d="M28 12C27.1156 12.0026 26.2571 12.2986 25.5589 12.8415C24.8608 13.3844 24.3624 14.1435 24.142 15H19.858C19.7164 14.4361 19.4525 13.9101 19.085 13.4595C18.7175 13.0089 18.2555 12.6446 17.7315 12.3924C17.2076 12.1402 16.6346 12.0064 16.0532 12.0002C15.4718 11.9941 14.8961 12.1159 14.367 12.357L11.19 8.387C11.7126 7.7007 11.997 6.86262 12 6C12 5.20887 11.7654 4.43552 11.3259 3.77772C10.8864 3.11992 10.2616 2.60723 9.53073 2.30448C8.79983 2.00173 7.99556 1.92252 7.21964 2.07686C6.44371 2.2312 5.73098 2.61216 5.17157 3.17157C4.61216 3.73098 4.2312 4.44371 4.07686 5.21964C3.92252 5.99556 4.00173 6.79983 4.30448 7.53073C4.60723 8.26164 5.11992 8.88635 5.77772 9.32588C6.43552 9.7654 7.20887 10 8 10C8.56387 9.99869 9.12096 9.87698 9.634 9.643L12.81 13.613C12.285 14.298 12.0005 15.137 12.0005 16C12.0005 16.863 12.285 17.702 12.81 18.387L9.634 22.357C9.12096 22.123 8.56387 22.0013 8 22C7.20887 22 6.43552 22.2346 5.77772 22.6741C5.11992 23.1136 4.60723 23.7384 4.30448 24.4693C4.00173 25.2002 3.92252 26.0044 4.07686 26.7804C4.2312 27.5563 4.61216 28.269 5.17157 28.8284C5.73098 29.3878 6.44371 29.7688 7.21964 29.9231C7.99556 30.0775 8.79983 29.9983 9.53073 29.6955C10.2616 29.3928 10.8864 28.8801 11.3259 28.2223C11.7654 27.5645 12 26.7911 12 26C11.9971 25.1374 11.7127 24.2993 11.19 23.613L14.366 19.643C14.8952 19.8843 15.4709 20.0062 16.0525 20.0002C16.634 19.9942 17.2071 19.8603 17.7312 19.6081C18.2552 19.3559 18.7174 18.9915 19.0849 18.5408C19.4525 18.0901 19.7164 17.5641 19.858 17H24.142C24.3303 17.7226 24.7175 18.3778 25.2595 18.8914C25.8015 19.405 26.4766 19.7563 27.2083 19.9055C27.9399 20.0547 28.6987 19.9957 29.3985 19.7353C30.0983 19.4749 30.7111 19.0234 31.1673 18.4323C31.6234 17.8411 31.9047 17.1339 31.9791 16.3909C32.0535 15.6479 31.9181 14.899 31.5882 14.2291C31.2584 13.5592 30.7473 12.9952 30.113 12.6012C29.4787 12.2072 28.7467 11.9989 28 12ZM6 6C6 5.60444 6.1173 5.21776 6.33706 4.88886C6.55682 4.55996 6.86918 4.30362 7.23463 4.15224C7.60009 4.00087 8.00222 3.96126 8.39018 4.03843C8.77814 4.1156 9.13451 4.30608 9.41421 4.58579C9.69392 4.86549 9.8844 5.22186 9.96157 5.60982C10.0387 5.99778 9.99913 6.39991 9.84776 6.76537C9.69638 7.13082 9.44004 7.44318 9.11114 7.66294C8.78224 7.8827 8.39556 8 8 8C7.46973 7.99947 6.96133 7.78859 6.58637 7.41363C6.21141 7.03867 6.00053 6.53027 6 6ZM8 28C7.60444 28 7.21776 27.8827 6.88886 27.6629C6.55996 27.4432 6.30362 27.1308 6.15224 26.7654C6.00087 26.3999 5.96126 25.9978 6.03843 25.6098C6.1156 25.2219 6.30608 24.8655 6.58579 24.5858C6.86549 24.3061 7.22186 24.1156 7.60982 24.0384C7.99778 23.9613 8.39991 24.0009 8.76537 24.1522C9.13082 24.3036 9.44318 24.56 9.66294 24.8889C9.8827 25.2178 10 25.6044 10 26C9.99947 26.5303 9.78859 27.0387 9.41363 27.4136C9.03867 27.7886 8.53027 27.9995 8 28ZM16 18C15.6044 18 15.2178 17.8827 14.8889 17.6629C14.56 17.4432 14.3036 17.1308 14.1522 16.7654C14.0009 16.3999 13.9613 15.9978 14.0384 15.6098C14.1156 15.2219 14.3061 14.8655 14.5858 14.5858C14.8655 14.3061 15.2219 14.1156 15.6098 14.0384C15.9978 13.9613 16.3999 14.0009 16.7654 14.1522C17.1308 14.3036 17.4432 14.56 17.6629 14.8889C17.8827 15.2178 18 15.6044 18 16C17.9995 16.5303 17.7886 17.0387 17.4136 17.4136C17.0387 17.7886 16.5303 17.9995 16 18ZM28 18C27.6044 18 27.2178 17.8827 26.8889 17.6629C26.56 17.4432 26.3036 17.1308 26.1522 16.7654C26.0009 16.3999 25.9613 15.9978 26.0384 15.6098C26.1156 15.2219 26.3061 14.8655 26.5858 14.5858C26.8655 14.3061 27.2219 14.1156 27.6098 14.0384C27.9978 13.9613 28.3999 14.0009 28.7654 14.1522C29.1308 14.3036 29.4432 14.56 29.6629 14.8889C29.8827 15.2178 30 15.6044 30 16C29.9995 16.5303 29.7886 17.0387 29.4136 17.4136C29.0387 17.7886 28.5303 17.9995 28 18Z" fill="currentColor"/>
404
- </svg>
405
- `, Rt = `<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
406
- <path d="M29 27.586L21.448 20.034C23.2628 17.8553 24.1678 15.0608 23.9747 12.2319C23.7816 9.40297 22.5053 6.75739 20.4112 4.84552C18.3172 2.93364 15.5667 1.90267 12.732 1.96709C9.89717 2.0315 7.19635 3.18633 5.19134 5.19134C3.18633 7.19635 2.0315 9.89717 1.96709 12.732C1.90268 15.5667 2.93364 18.3172 4.84552 20.4112C6.75739 22.5053 9.40297 23.7816 12.2319 23.9747C15.0608 24.1678 17.8553 23.2628 20.034 21.448L27.586 29L29 27.586ZM4 13C4 11.22 4.52784 9.47991 5.51677 7.99987C6.50571 6.51983 7.91132 5.36627 9.55585 4.68508C11.2004 4.0039 13.01 3.82567 14.7558 4.17293C16.5016 4.5202 18.1053 5.37737 19.364 6.63604C20.6226 7.89471 21.4798 9.49836 21.8271 11.2442C22.1743 12.99 21.9961 14.7996 21.3149 16.4442C20.6337 18.0887 19.4802 19.4943 18.0001 20.4832C16.5201 21.4722 14.78 22 13 22C10.6139 21.9974 8.32622 21.0483 6.63896 19.361C4.95171 17.6738 4.00265 15.3861 4 13Z" fill="currentColor"/>
407
- </svg>
408
- `, Dt = `<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
409
- <path d="M27.71 4.29C27.575 4.15567 27.4045 4.06267 27.2185 4.02193C27.0325 3.98118 26.8388 3.99439 26.66 4.06L4.66 12.06C4.47027 12.132 4.30692 12.26 4.19165 12.427C4.07638 12.594 4.01465 12.7921 4.01465 12.995C4.01465 13.1979 4.07638 13.396 4.19165 13.563C4.30692 13.73 4.47027 13.858 4.66 13.93L14.26 17.77L18.1 27.37C18.1721 27.5514 18.2958 27.7077 18.4557 27.8197C18.6157 27.9316 18.8049 27.9943 19 28C19.2021 27.9959 19.3982 27.9306 19.5624 27.8127C19.7266 27.6949 19.8513 27.5301 19.92 27.34L27.92 5.34C27.9881 5.16308 28.0046 4.97043 27.9674 4.78452C27.9302 4.59862 27.8409 4.42711 27.71 4.29ZM19 24.2L16.21 17.2L21 12.41L19.59 11L14.76 15.83L7.8 13L25.33 6.67L19 24.2Z" fill="currentColor"/>
410
- </svg>
411
- `, It = `<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
412
- <path d="M30 8H25.9C25.4 5.7 23.4 4 21 4C18.6 4 16.6 5.7 16.1 8H2V10H16.1C16.6 12.3 18.6 14 21 14C23.4 14 25.4 12.3 25.9 10H30V8ZM21 12C19.3 12 18 10.7 18 9C18 7.3 19.3 6 21 6C22.7 6 24 7.3 24 9C24 10.7 22.7 12 21 12ZM2 24H6.1C6.6 26.3 8.6 28 11 28C13.4 28 15.4 26.3 15.9 24H30V22H15.9C15.4 19.7 13.4 18 11 18C8.6 18 6.6 19.7 6.1 22H2V24ZM11 20C12.7 20 14 21.3 14 23C14 24.7 12.7 26 11 26C9.3 26 8 24.7 8 23C8 21.3 9.3 20 11 20Z" fill="currentColor"/>
413
- </svg>
414
- `, zt = /* @__PURE__ */ Object.assign({
415
- "/src/assets/icons/caret-down.svg": jt,
416
- "/src/assets/icons/network.svg": Mt,
417
- "/src/assets/icons/search.svg": Rt,
418
- "/src/assets/icons/send.svg": Dt,
419
- "/src/assets/icons/settings.svg": It
1053
+
1054
+ const __vite_glob_0_0 = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"32\"\n height=\"32\"\n viewBox=\"0 0 32 32\"\n>\n <path\n fill=\"currentColor\"\n d=\"m24 12l-8 10l-8-10z\"\n />\n</svg>\n";
1055
+
1056
+ const __vite_glob_0_1 = "<svg width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M21 28C22.1046 28 23 27.1046 23 26C23 24.8954 22.1046 24 21 24C19.8954 24 19 24.8954 19 26C19 27.1046 19.8954 28 21 28Z\" fill=\"currentColor\"/>\n<path d=\"M21 8C22.1046 8 23 7.10457 23 6C23 4.89543 22.1046 4 21 4C19.8954 4 19 4.89543 19 6C19 7.10457 19.8954 8 21 8Z\" fill=\"currentColor\"/>\n<path d=\"M4 18C5.10457 18 6 17.1046 6 16C6 14.8954 5.10457 14 4 14C2.89543 14 2 14.8954 2 16C2 17.1046 2.89543 18 4 18Z\" fill=\"currentColor\"/>\n<path d=\"M28 12C27.1156 12.0026 26.2571 12.2986 25.5589 12.8415C24.8608 13.3844 24.3624 14.1435 24.142 15H19.858C19.7164 14.4361 19.4525 13.9101 19.085 13.4595C18.7175 13.0089 18.2555 12.6446 17.7315 12.3924C17.2076 12.1402 16.6346 12.0064 16.0532 12.0002C15.4718 11.9941 14.8961 12.1159 14.367 12.357L11.19 8.387C11.7126 7.7007 11.997 6.86262 12 6C12 5.20887 11.7654 4.43552 11.3259 3.77772C10.8864 3.11992 10.2616 2.60723 9.53073 2.30448C8.79983 2.00173 7.99556 1.92252 7.21964 2.07686C6.44371 2.2312 5.73098 2.61216 5.17157 3.17157C4.61216 3.73098 4.2312 4.44371 4.07686 5.21964C3.92252 5.99556 4.00173 6.79983 4.30448 7.53073C4.60723 8.26164 5.11992 8.88635 5.77772 9.32588C6.43552 9.7654 7.20887 10 8 10C8.56387 9.99869 9.12096 9.87698 9.634 9.643L12.81 13.613C12.285 14.298 12.0005 15.137 12.0005 16C12.0005 16.863 12.285 17.702 12.81 18.387L9.634 22.357C9.12096 22.123 8.56387 22.0013 8 22C7.20887 22 6.43552 22.2346 5.77772 22.6741C5.11992 23.1136 4.60723 23.7384 4.30448 24.4693C4.00173 25.2002 3.92252 26.0044 4.07686 26.7804C4.2312 27.5563 4.61216 28.269 5.17157 28.8284C5.73098 29.3878 6.44371 29.7688 7.21964 29.9231C7.99556 30.0775 8.79983 29.9983 9.53073 29.6955C10.2616 29.3928 10.8864 28.8801 11.3259 28.2223C11.7654 27.5645 12 26.7911 12 26C11.9971 25.1374 11.7127 24.2993 11.19 23.613L14.366 19.643C14.8952 19.8843 15.4709 20.0062 16.0525 20.0002C16.634 19.9942 17.2071 19.8603 17.7312 19.6081C18.2552 19.3559 18.7174 18.9915 19.0849 18.5408C19.4525 18.0901 19.7164 17.5641 19.858 17H24.142C24.3303 17.7226 24.7175 18.3778 25.2595 18.8914C25.8015 19.405 26.4766 19.7563 27.2083 19.9055C27.9399 20.0547 28.6987 19.9957 29.3985 19.7353C30.0983 19.4749 30.7111 19.0234 31.1673 18.4323C31.6234 17.8411 31.9047 17.1339 31.9791 16.3909C32.0535 15.6479 31.9181 14.899 31.5882 14.2291C31.2584 13.5592 30.7473 12.9952 30.113 12.6012C29.4787 12.2072 28.7467 11.9989 28 12ZM6 6C6 5.60444 6.1173 5.21776 6.33706 4.88886C6.55682 4.55996 6.86918 4.30362 7.23463 4.15224C7.60009 4.00087 8.00222 3.96126 8.39018 4.03843C8.77814 4.1156 9.13451 4.30608 9.41421 4.58579C9.69392 4.86549 9.8844 5.22186 9.96157 5.60982C10.0387 5.99778 9.99913 6.39991 9.84776 6.76537C9.69638 7.13082 9.44004 7.44318 9.11114 7.66294C8.78224 7.8827 8.39556 8 8 8C7.46973 7.99947 6.96133 7.78859 6.58637 7.41363C6.21141 7.03867 6.00053 6.53027 6 6ZM8 28C7.60444 28 7.21776 27.8827 6.88886 27.6629C6.55996 27.4432 6.30362 27.1308 6.15224 26.7654C6.00087 26.3999 5.96126 25.9978 6.03843 25.6098C6.1156 25.2219 6.30608 24.8655 6.58579 24.5858C6.86549 24.3061 7.22186 24.1156 7.60982 24.0384C7.99778 23.9613 8.39991 24.0009 8.76537 24.1522C9.13082 24.3036 9.44318 24.56 9.66294 24.8889C9.8827 25.2178 10 25.6044 10 26C9.99947 26.5303 9.78859 27.0387 9.41363 27.4136C9.03867 27.7886 8.53027 27.9995 8 28ZM16 18C15.6044 18 15.2178 17.8827 14.8889 17.6629C14.56 17.4432 14.3036 17.1308 14.1522 16.7654C14.0009 16.3999 13.9613 15.9978 14.0384 15.6098C14.1156 15.2219 14.3061 14.8655 14.5858 14.5858C14.8655 14.3061 15.2219 14.1156 15.6098 14.0384C15.9978 13.9613 16.3999 14.0009 16.7654 14.1522C17.1308 14.3036 17.4432 14.56 17.6629 14.8889C17.8827 15.2178 18 15.6044 18 16C17.9995 16.5303 17.7886 17.0387 17.4136 17.4136C17.0387 17.7886 16.5303 17.9995 16 18ZM28 18C27.6044 18 27.2178 17.8827 26.8889 17.6629C26.56 17.4432 26.3036 17.1308 26.1522 16.7654C26.0009 16.3999 25.9613 15.9978 26.0384 15.6098C26.1156 15.2219 26.3061 14.8655 26.5858 14.5858C26.8655 14.3061 27.2219 14.1156 27.6098 14.0384C27.9978 13.9613 28.3999 14.0009 28.7654 14.1522C29.1308 14.3036 29.4432 14.56 29.6629 14.8889C29.8827 15.2178 30 15.6044 30 16C29.9995 16.5303 29.7886 17.0387 29.4136 17.4136C29.0387 17.7886 28.5303 17.9995 28 18Z\" fill=\"currentColor\"/>\n</svg>\n";
1057
+
1058
+ const __vite_glob_0_2 = "<svg width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M29 27.586L21.448 20.034C23.2628 17.8553 24.1678 15.0608 23.9747 12.2319C23.7816 9.40297 22.5053 6.75739 20.4112 4.84552C18.3172 2.93364 15.5667 1.90267 12.732 1.96709C9.89717 2.0315 7.19635 3.18633 5.19134 5.19134C3.18633 7.19635 2.0315 9.89717 1.96709 12.732C1.90268 15.5667 2.93364 18.3172 4.84552 20.4112C6.75739 22.5053 9.40297 23.7816 12.2319 23.9747C15.0608 24.1678 17.8553 23.2628 20.034 21.448L27.586 29L29 27.586ZM4 13C4 11.22 4.52784 9.47991 5.51677 7.99987C6.50571 6.51983 7.91132 5.36627 9.55585 4.68508C11.2004 4.0039 13.01 3.82567 14.7558 4.17293C16.5016 4.5202 18.1053 5.37737 19.364 6.63604C20.6226 7.89471 21.4798 9.49836 21.8271 11.2442C22.1743 12.99 21.9961 14.7996 21.3149 16.4442C20.6337 18.0887 19.4802 19.4943 18.0001 20.4832C16.5201 21.4722 14.78 22 13 22C10.6139 21.9974 8.32622 21.0483 6.63896 19.361C4.95171 17.6738 4.00265 15.3861 4 13Z\" fill=\"currentColor\"/>\n</svg>\n";
1059
+
1060
+ const __vite_glob_0_3 = "<svg width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M27.71 4.29C27.575 4.15567 27.4045 4.06267 27.2185 4.02193C27.0325 3.98118 26.8388 3.99439 26.66 4.06L4.66 12.06C4.47027 12.132 4.30692 12.26 4.19165 12.427C4.07638 12.594 4.01465 12.7921 4.01465 12.995C4.01465 13.1979 4.07638 13.396 4.19165 13.563C4.30692 13.73 4.47027 13.858 4.66 13.93L14.26 17.77L18.1 27.37C18.1721 27.5514 18.2958 27.7077 18.4557 27.8197C18.6157 27.9316 18.8049 27.9943 19 28C19.2021 27.9959 19.3982 27.9306 19.5624 27.8127C19.7266 27.6949 19.8513 27.5301 19.92 27.34L27.92 5.34C27.9881 5.16308 28.0046 4.97043 27.9674 4.78452C27.9302 4.59862 27.8409 4.42711 27.71 4.29ZM19 24.2L16.21 17.2L21 12.41L19.59 11L14.76 15.83L7.8 13L25.33 6.67L19 24.2Z\" fill=\"currentColor\"/>\n</svg>\n";
1061
+
1062
+ const __vite_glob_0_4 = "<svg width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M30 8H25.9C25.4 5.7 23.4 4 21 4C18.6 4 16.6 5.7 16.1 8H2V10H16.1C16.6 12.3 18.6 14 21 14C23.4 14 25.4 12.3 25.9 10H30V8ZM21 12C19.3 12 18 10.7 18 9C18 7.3 19.3 6 21 6C22.7 6 24 7.3 24 9C24 10.7 22.7 12 21 12ZM2 24H6.1C6.6 26.3 8.6 28 11 28C13.4 28 15.4 26.3 15.9 24H30V22H15.9C15.4 19.7 13.4 18 11 18C8.6 18 6.6 19.7 6.1 22H2V24ZM11 20C12.7 20 14 21.3 14 23C14 24.7 12.7 26 11 26C9.3 26 8 24.7 8 23C8 21.3 9.3 20 11 20Z\" fill=\"currentColor\"/>\n</svg>\n";
1063
+
1064
+ const test = /* #__PURE__ */ Object.assign({"/src/assets/icons/caret-down.svg": __vite_glob_0_0,"/src/assets/icons/network.svg": __vite_glob_0_1,"/src/assets/icons/search.svg": __vite_glob_0_2,"/src/assets/icons/send.svg": __vite_glob_0_3,"/src/assets/icons/settings.svg": __vite_glob_0_4
1065
+
1066
+
420
1067
  });
421
- function Ft(e) {
422
- return zt[`/src/assets/icons/${e}.svg`];
1068
+ function getIconSvg(icon) {
1069
+ const svg = test[`/src/assets/icons/${icon}.svg`];
1070
+ return svg;
423
1071
  }
424
- const Ce = `
1072
+
1073
+ const fillContainer = `
425
1074
  position: absolute;
426
1075
  width: 100%;
427
1076
  height: 100%;
428
1077
  top: 0;
429
1078
  left: 0;
430
1079
  `;
431
- function Bt(e, t = "px") {
432
- return typeof e == "string" ? String(e) : Array.isArray(e) ? e.map((n) => `${n}${t}`).join(" ") : `${e}${t}`;
1080
+
1081
+ function parseUnit(value, defaultUnit = "px") {
1082
+ return typeof value === "string" ? String(value) : Array.isArray(value) ? value.map((item) => `${item}${defaultUnit}`).join(" ") : `${value}${defaultUnit}`;
433
1083
  }
434
- const Ht = /* @__PURE__ */ $("<div></div>"), Vt = _`
1084
+
1085
+ let e={data:""},t=t=>"object"==typeof window?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||e,l=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,a=/\/\*[^]*?\*\/| +/g,n=/\n+/g,o=(e,t)=>{let r="",l="",a="";for(let n in e){let c=e[n];"@"==n[0]?"i"==n[1]?r=n+" "+c+";":l+="f"==n[1]?o(c,n):n+"{"+o(c,"k"==n[1]?"":t)+"}":"object"==typeof c?l+=o(c,t?t.replace(/([^,])+/g,e=>n.replace(/(^:.*)|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):n):null!=c&&(n=/^--/.test(n)?n:n.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=o.p?o.p(n,c):n+":"+c+";");}return r+(t&&a?t+"{"+a+"}":a)+l},c={},s=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+s(e[r]);return t}return e},i=(e,t,r,i,p)=>{let u=s(e),d=c[u]||(c[u]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return "go"+r})(u));if(!c[d]){let t=u!==e?e:(e=>{let t,r,o=[{}];for(;t=l.exec(e.replace(a,""));)t[4]?o.shift():t[3]?(r=t[3].replace(n," ").trim(),o.unshift(o[0][r]=o[0][r]||{})):o[0][t[1]]=t[2].replace(n," ").trim();return o[0]})(e);c[d]=o(p?{["@keyframes "+d]:t}:t,r?"":"."+d);}let f=r&&c.g?c.g:null;return r&&(c.g=c[d]),((e,t,r,l)=>{l?t.data=t.data.replace(l,e):-1===t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e);})(c[d],t,i,f),d},p=(e,t,r)=>e.reduce((e,l,a)=>{let n=t[a];if(n&&n.call){let e=n(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;n=t?"."+t:e&&"object"==typeof e?e.props?"":o(e,""):!1===e?"":e;}return e+l+(null==n?"":n)},"");function u(e){let r=this||{},l=e.call?e(r.p):e;return i(l.unshift?l.raw?p(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>Object.assign(e,t&&t.call?t(r.p):t),{}):l,t(r.target),r.g,r.o,r.k)}u.bind({g:1});u.bind({k:1});
1086
+
1087
+ const _tmpl$$a = /*#__PURE__*/template(`<div></div>`);
1088
+ const style = u`
435
1089
  &&& {
436
1090
  position: relative;
437
1091
  color: currentColor;
@@ -440,316 +1094,392 @@ const Ht = /* @__PURE__ */ $("<div></div>"), Vt = _`
440
1094
 
441
1095
  svg {
442
1096
  display: block;
443
- ${Ce};
1097
+ ${fillContainer};
444
1098
  }
445
1099
  }
446
- `, de = (e) => {
447
- const t = Ft(e.name);
1100
+ `;
1101
+ const Icon = props => {
1102
+ const icon = getIconSvg(props.name);
448
1103
  return (() => {
449
- const n = Ht.cloneNode(!0);
450
- return n.innerHTML = t, C((l) => {
451
- const i = `icon ${e.class || ""} ${Vt}`, o = {
452
- color: e.color,
453
- "--icon-size": e.size && Bt(e.size)
454
- };
455
- return i !== l._v$ && b(n, l._v$ = i), l._v$2 = We(n, o, l._v$2), l;
1104
+ const _el$ = _tmpl$$a.cloneNode(true);
1105
+ _el$.innerHTML = icon;
1106
+ createRenderEffect(_p$ => {
1107
+ const _v$ = `icon ${props.class || ''} ${style}`,
1108
+ _v$2 = {
1109
+ color: props.color,
1110
+ '--icon-size': props.size && parseUnit(props.size)
1111
+ };
1112
+ _v$ !== _p$._v$ && className(_el$, _p$._v$ = _v$);
1113
+ _p$._v$2 = style$1(_el$, _v$2, _p$._v$2);
1114
+ return _p$;
456
1115
  }, {
457
- _v$: void 0,
458
- _v$2: void 0
459
- }), n;
1116
+ _v$: undefined,
1117
+ _v$2: undefined
1118
+ });
1119
+ return _el$;
460
1120
  })();
461
- }, le = Symbol("store-raw"), q = Symbol("store-node"), Zt = Symbol("store-name");
462
- function Je(e, t) {
463
- let n = e[z];
464
- if (!n && (Object.defineProperty(e, z, {
465
- value: n = new Proxy(e, Wt)
466
- }), !Array.isArray(e))) {
467
- const l = Object.keys(e), i = Object.getOwnPropertyDescriptors(e);
468
- for (let o = 0, s = l.length; o < s; o++) {
469
- const r = l[o];
470
- i[r].get && Object.defineProperty(e, r, {
471
- enumerable: i[r].enumerable,
472
- get: i[r].get.bind(n)
473
- });
1121
+ };
1122
+
1123
+ const $RAW = Symbol("store-raw"),
1124
+ $NODE = Symbol("store-node"),
1125
+ $NAME = Symbol("store-name");
1126
+ function wrap$1(value, name) {
1127
+ let p = value[$PROXY];
1128
+ if (!p) {
1129
+ Object.defineProperty(value, $PROXY, {
1130
+ value: p = new Proxy(value, proxyTraps$1)
1131
+ });
1132
+ if (!Array.isArray(value)) {
1133
+ const keys = Object.keys(value),
1134
+ desc = Object.getOwnPropertyDescriptors(value);
1135
+ for (let i = 0, l = keys.length; i < l; i++) {
1136
+ const prop = keys[i];
1137
+ if (desc[prop].get) {
1138
+ Object.defineProperty(value, prop, {
1139
+ enumerable: desc[prop].enumerable,
1140
+ get: desc[prop].get.bind(p)
1141
+ });
1142
+ }
1143
+ }
474
1144
  }
475
1145
  }
476
- return n;
477
- }
478
- function W(e) {
479
- let t;
480
- return e != null && typeof e == "object" && (e[z] || !(t = Object.getPrototypeOf(e)) || t === Object.prototype || Array.isArray(e));
481
- }
482
- function J(e, t = /* @__PURE__ */ new Set()) {
483
- let n, l, i, o;
484
- if (n = e != null && e[le])
485
- return n;
486
- if (!W(e) || t.has(e))
487
- return e;
488
- if (Array.isArray(e)) {
489
- Object.isFrozen(e) ? e = e.slice(0) : t.add(e);
490
- for (let s = 0, r = e.length; s < r; s++)
491
- i = e[s], (l = J(i, t)) !== i && (e[s] = l);
1146
+ return p;
1147
+ }
1148
+ function isWrappable(obj) {
1149
+ let proto;
1150
+ return obj != null && typeof obj === "object" && (obj[$PROXY] || !(proto = Object.getPrototypeOf(obj)) || proto === Object.prototype || Array.isArray(obj));
1151
+ }
1152
+ function unwrap(item, set = new Set()) {
1153
+ let result, unwrapped, v, prop;
1154
+ if (result = item != null && item[$RAW]) return result;
1155
+ if (!isWrappable(item) || set.has(item)) return item;
1156
+ if (Array.isArray(item)) {
1157
+ if (Object.isFrozen(item)) item = item.slice(0);else set.add(item);
1158
+ for (let i = 0, l = item.length; i < l; i++) {
1159
+ v = item[i];
1160
+ if ((unwrapped = unwrap(v, set)) !== v) item[i] = unwrapped;
1161
+ }
492
1162
  } else {
493
- Object.isFrozen(e) ? e = Object.assign({}, e) : t.add(e);
494
- const s = Object.keys(e), r = Object.getOwnPropertyDescriptors(e);
495
- for (let a = 0, c = s.length; a < c; a++)
496
- o = s[a], !r[o].get && (i = e[o], (l = J(i, t)) !== i && (e[o] = l));
1163
+ if (Object.isFrozen(item)) item = Object.assign({}, item);else set.add(item);
1164
+ const keys = Object.keys(item),
1165
+ desc = Object.getOwnPropertyDescriptors(item);
1166
+ for (let i = 0, l = keys.length; i < l; i++) {
1167
+ prop = keys[i];
1168
+ if (desc[prop].get) continue;
1169
+ v = item[prop];
1170
+ if ((unwrapped = unwrap(v, set)) !== v) item[prop] = unwrapped;
1171
+ }
497
1172
  }
498
- return e;
499
- }
500
- function xe(e) {
501
- let t = e[q];
502
- return t || Object.defineProperty(e, q, {
503
- value: t = {}
504
- }), t;
1173
+ return item;
505
1174
  }
506
- function ye(e, t, n) {
507
- return e[t] || (e[t] = Ge(n));
508
- }
509
- function Kt(e, t) {
510
- const n = Reflect.getOwnPropertyDescriptor(e, t);
511
- return !n || n.get || !n.configurable || t === z || t === q || t === Zt || (delete n.value, delete n.writable, n.get = () => e[z][t]), n;
512
- }
513
- function Xe(e) {
514
- if (Ke()) {
515
- const t = xe(e);
516
- (t._ || (t._ = Ge()))();
1175
+ function getDataNodes(target) {
1176
+ let nodes = target[$NODE];
1177
+ if (!nodes) Object.defineProperty(target, $NODE, {
1178
+ value: nodes = {}
1179
+ });
1180
+ return nodes;
1181
+ }
1182
+ function getDataNode(nodes, property, value) {
1183
+ return nodes[property] || (nodes[property] = createDataNode(value));
1184
+ }
1185
+ function proxyDescriptor$1(target, property) {
1186
+ const desc = Reflect.getOwnPropertyDescriptor(target, property);
1187
+ if (!desc || desc.get || !desc.configurable || property === $PROXY || property === $NODE || property === $NAME) return desc;
1188
+ delete desc.value;
1189
+ delete desc.writable;
1190
+ desc.get = () => target[$PROXY][property];
1191
+ return desc;
1192
+ }
1193
+ function trackSelf(target) {
1194
+ if (getListener()) {
1195
+ const nodes = getDataNodes(target);
1196
+ (nodes._ || (nodes._ = createDataNode()))();
517
1197
  }
518
1198
  }
519
- function Ut(e) {
520
- return Xe(e), Reflect.ownKeys(e);
1199
+ function ownKeys(target) {
1200
+ trackSelf(target);
1201
+ return Reflect.ownKeys(target);
521
1202
  }
522
- function Ge(e) {
523
- const [t, n] = re(e, {
524
- equals: !1,
525
- internal: !0
1203
+ function createDataNode(value) {
1204
+ const [s, set] = createSignal(value, {
1205
+ equals: false,
1206
+ internal: true
526
1207
  });
527
- return t.$ = n, t;
528
- }
529
- const Wt = {
530
- get(e, t, n) {
531
- if (t === le)
532
- return e;
533
- if (t === z)
534
- return n;
535
- if (t === _e)
536
- return Xe(e), n;
537
- const l = xe(e), i = l.hasOwnProperty(t);
538
- let o = i ? l[t]() : e[t];
539
- if (t === q || t === "__proto__")
540
- return o;
541
- if (!i) {
542
- const s = Object.getOwnPropertyDescriptor(e, t);
543
- Ke() && (typeof o != "function" || e.hasOwnProperty(t)) && !(s && s.get) && (o = ye(l, t, o)());
544
- }
545
- return W(o) ? Je(o) : o;
1208
+ s.$ = set;
1209
+ return s;
1210
+ }
1211
+ const proxyTraps$1 = {
1212
+ get(target, property, receiver) {
1213
+ if (property === $RAW) return target;
1214
+ if (property === $PROXY) return receiver;
1215
+ if (property === $TRACK) {
1216
+ trackSelf(target);
1217
+ return receiver;
1218
+ }
1219
+ const nodes = getDataNodes(target);
1220
+ const tracked = nodes.hasOwnProperty(property);
1221
+ let value = tracked ? nodes[property]() : target[property];
1222
+ if (property === $NODE || property === "__proto__") return value;
1223
+ if (!tracked) {
1224
+ const desc = Object.getOwnPropertyDescriptor(target, property);
1225
+ if (getListener() && (typeof value !== "function" || target.hasOwnProperty(property)) && !(desc && desc.get)) value = getDataNode(nodes, property, value)();
1226
+ }
1227
+ return isWrappable(value) ? wrap$1(value) : value;
546
1228
  },
547
- has(e, t) {
548
- return t === le || t === z || t === _e || t === q || t === "__proto__" ? !0 : (this.get(e, t, e), t in e);
1229
+ has(target, property) {
1230
+ if (property === $RAW || property === $PROXY || property === $TRACK || property === $NODE || property === "__proto__") return true;
1231
+ this.get(target, property, target);
1232
+ return property in target;
549
1233
  },
550
1234
  set() {
551
- return !0;
1235
+ return true;
552
1236
  },
553
1237
  deleteProperty() {
554
- return !0;
1238
+ return true;
555
1239
  },
556
- ownKeys: Ut,
557
- getOwnPropertyDescriptor: Kt
1240
+ ownKeys: ownKeys,
1241
+ getOwnPropertyDescriptor: proxyDescriptor$1
558
1242
  };
559
- function X(e, t, n, l = !1) {
560
- if (!l && e[t] === n)
561
- return;
562
- const i = e[t], o = e.length;
563
- n === void 0 ? delete e[t] : e[t] = n;
564
- let s = xe(e), r;
565
- (r = ye(s, t, i)) && r.$(() => n), Array.isArray(e) && e.length !== o && (r = ye(s, "length", o)) && r.$(e.length), (r = s._) && r.$();
566
- }
567
- function Ye(e, t) {
568
- const n = Object.keys(t);
569
- for (let l = 0; l < n.length; l += 1) {
570
- const i = n[l];
571
- X(e, i, t[i]);
572
- }
573
- }
574
- function Jt(e, t) {
575
- if (typeof t == "function" && (t = t(e)), t = J(t), Array.isArray(t)) {
576
- if (e === t)
577
- return;
578
- let n = 0, l = t.length;
579
- for (; n < l; n++) {
580
- const i = t[n];
581
- e[n] !== i && X(e, n, i);
582
- }
583
- X(e, "length", l);
584
- } else
585
- Ye(e, t);
586
- }
587
- function Y(e, t, n = []) {
588
- let l, i = e;
589
- if (t.length > 1) {
590
- l = t.shift();
591
- const s = typeof l, r = Array.isArray(e);
592
- if (Array.isArray(l)) {
593
- for (let a = 0; a < l.length; a++)
594
- Y(e, [l[a]].concat(t), n);
1243
+ function setProperty(state, property, value, deleting = false) {
1244
+ if (!deleting && state[property] === value) return;
1245
+ const prev = state[property],
1246
+ len = state.length;
1247
+ if (value === undefined) delete state[property];else state[property] = value;
1248
+ let nodes = getDataNodes(state),
1249
+ node;
1250
+ if (node = getDataNode(nodes, property, prev)) node.$(() => value);
1251
+ if (Array.isArray(state) && state.length !== len) (node = getDataNode(nodes, "length", len)) && node.$(state.length);
1252
+ (node = nodes._) && node.$();
1253
+ }
1254
+ function mergeStoreNode(state, value) {
1255
+ const keys = Object.keys(value);
1256
+ for (let i = 0; i < keys.length; i += 1) {
1257
+ const key = keys[i];
1258
+ setProperty(state, key, value[key]);
1259
+ }
1260
+ }
1261
+ function updateArray(current, next) {
1262
+ if (typeof next === "function") next = next(current);
1263
+ next = unwrap(next);
1264
+ if (Array.isArray(next)) {
1265
+ if (current === next) return;
1266
+ let i = 0,
1267
+ len = next.length;
1268
+ for (; i < len; i++) {
1269
+ const value = next[i];
1270
+ if (current[i] !== value) setProperty(current, i, value);
1271
+ }
1272
+ setProperty(current, "length", len);
1273
+ } else mergeStoreNode(current, next);
1274
+ }
1275
+ function updatePath(current, path, traversed = []) {
1276
+ let part,
1277
+ prev = current;
1278
+ if (path.length > 1) {
1279
+ part = path.shift();
1280
+ const partType = typeof part,
1281
+ isArray = Array.isArray(current);
1282
+ if (Array.isArray(part)) {
1283
+ for (let i = 0; i < part.length; i++) {
1284
+ updatePath(current, [part[i]].concat(path), traversed);
1285
+ }
595
1286
  return;
596
- } else if (r && s === "function") {
597
- for (let a = 0; a < e.length; a++)
598
- l(e[a], a) && Y(e, [a].concat(t), n);
1287
+ } else if (isArray && partType === "function") {
1288
+ for (let i = 0; i < current.length; i++) {
1289
+ if (part(current[i], i)) updatePath(current, [i].concat(path), traversed);
1290
+ }
599
1291
  return;
600
- } else if (r && s === "object") {
1292
+ } else if (isArray && partType === "object") {
601
1293
  const {
602
- from: a = 0,
603
- to: c = e.length - 1,
604
- by: d = 1
605
- } = l;
606
- for (let g = a; g <= c; g += d)
607
- Y(e, [g].concat(t), n);
1294
+ from = 0,
1295
+ to = current.length - 1,
1296
+ by = 1
1297
+ } = part;
1298
+ for (let i = from; i <= to; i += by) {
1299
+ updatePath(current, [i].concat(path), traversed);
1300
+ }
608
1301
  return;
609
- } else if (t.length > 1) {
610
- Y(e[l], t, [l].concat(n));
1302
+ } else if (path.length > 1) {
1303
+ updatePath(current[part], path, [part].concat(traversed));
611
1304
  return;
612
1305
  }
613
- i = e[l], n = [l].concat(n);
1306
+ prev = current[part];
1307
+ traversed = [part].concat(traversed);
614
1308
  }
615
- let o = t[0];
616
- typeof o == "function" && (o = o(i, n), o === i) || l === void 0 && o == null || (o = J(o), l === void 0 || W(i) && W(o) && !Array.isArray(o) ? Ye(i, o) : X(e, l, o));
617
- }
618
- function Qe(...[e, t]) {
619
- const n = J(e || {}), l = Array.isArray(n), i = Je(n);
620
- function o(...s) {
621
- at(() => {
622
- l && s.length === 1 ? Jt(n, s[0]) : Y(n, s);
1309
+ let value = path[0];
1310
+ if (typeof value === "function") {
1311
+ value = value(prev, traversed);
1312
+ if (value === prev) return;
1313
+ }
1314
+ if (part === undefined && value == undefined) return;
1315
+ value = unwrap(value);
1316
+ if (part === undefined || isWrappable(prev) && isWrappable(value) && !Array.isArray(value)) {
1317
+ mergeStoreNode(prev, value);
1318
+ } else setProperty(current, part, value);
1319
+ }
1320
+ function createStore(...[store, options]) {
1321
+ const unwrappedStore = unwrap(store || {});
1322
+ const isArray = Array.isArray(unwrappedStore);
1323
+ const wrappedStore = wrap$1(unwrappedStore);
1324
+ function setStore(...args) {
1325
+ batch(() => {
1326
+ isArray && args.length === 1 ? updateArray(unwrappedStore, args[0]) : updatePath(unwrappedStore, args);
623
1327
  });
624
1328
  }
625
- return [i, o];
626
- }
627
- const ie = /* @__PURE__ */ new WeakMap(), qe = {
628
- get(e, t) {
629
- if (t === le)
630
- return e;
631
- const n = e[t];
632
- let l;
633
- return W(n) ? ie.get(n) || (ie.set(n, l = new Proxy(n, qe)), l) : n;
1329
+ return [wrappedStore, setStore];
1330
+ }
1331
+ const producers = new WeakMap();
1332
+ const setterTraps = {
1333
+ get(target, property) {
1334
+ if (property === $RAW) return target;
1335
+ const value = target[property];
1336
+ let proxy;
1337
+ return isWrappable(value) ? producers.get(value) || (producers.set(value, proxy = new Proxy(value, setterTraps)), proxy) : value;
634
1338
  },
635
- set(e, t, n) {
636
- return X(e, t, J(n)), !0;
1339
+ set(target, property, value) {
1340
+ setProperty(target, property, unwrap(value));
1341
+ return true;
637
1342
  },
638
- deleteProperty(e, t) {
639
- return X(e, t, void 0, !0), !0;
1343
+ deleteProperty(target, property) {
1344
+ setProperty(target, property, undefined, true);
1345
+ return true;
640
1346
  }
641
1347
  };
642
- function Xt(e) {
643
- return (t) => {
644
- if (W(t)) {
645
- let n;
646
- (n = ie.get(t)) || ie.set(t, n = new Proxy(t, qe)), e(n);
1348
+ function produce(fn) {
1349
+ return state => {
1350
+ if (isWrappable(state)) {
1351
+ let proxy;
1352
+ if (!(proxy = producers.get(state))) {
1353
+ producers.set(state, proxy = new Proxy(state, setterTraps));
1354
+ }
1355
+ fn(proxy);
647
1356
  }
648
- return t;
1357
+ return state;
649
1358
  };
650
1359
  }
651
- const [S, se] = Qe({
1360
+
1361
+ const [uiStore, setUiStore] = createStore({
652
1362
  selectedCall: null,
653
1363
  selectedRequest: null,
654
1364
  selectedTab: null,
655
1365
  selectedSubitem: null
656
- }), ue = `
1366
+ });
1367
+
1368
+ const ellipsis = `
657
1369
  display: inline-block;
658
1370
  overflow: hidden;
659
1371
  text-overflow: ellipsis;
660
1372
  white-space: nowrap;
661
1373
  word-wrap: norma;
662
1374
  max-width: 100%;
663
- `, Gt = {
1375
+ `;
1376
+
1377
+ const justifyValues$1 = {
664
1378
  left: "flex-start",
665
1379
  center: "center",
666
1380
  right: "flex-end",
667
1381
  spaceBetween: "space-between",
668
1382
  spaceAround: "space-around",
669
1383
  spaceEvenly: "space-evenly"
670
- }, Yt = {
1384
+ };
1385
+ const alignValues$1 = {
671
1386
  top: "flex-start",
672
1387
  bottom: "flex-end",
673
1388
  center: "center",
674
1389
  stretch: "stretch"
675
- }, B = ({
676
- justify: e = "left",
677
- align: t = "center",
678
- gap: n
1390
+ };
1391
+ const inline = ({
1392
+ justify = "left",
1393
+ align = "center",
1394
+ gap
679
1395
  } = {}) => `
680
1396
  display: flex;
681
- column-gap: ${n}px;
1397
+ column-gap: ${gap}px;
682
1398
  flex-direction: row;
683
- justify-content: ${Gt[e]};
684
- align-items: ${Yt[t]};
685
- `, Qt = {
1399
+ justify-content: ${justifyValues$1[justify]};
1400
+ align-items: ${alignValues$1[align]};
1401
+ `;
1402
+
1403
+ const justifyValues = {
686
1404
  top: "flex-start",
687
1405
  center: "center",
688
1406
  bottom: "flex-end",
689
1407
  spaceBetween: "space-between",
690
1408
  spaceAround: "space-around",
691
1409
  spaceEvenly: "space-evenly"
692
- }, qt = {
1410
+ };
1411
+ const alignValues = {
693
1412
  left: "flex-start",
694
1413
  right: "flex-end",
695
1414
  center: "center",
696
1415
  stretch: "stretch"
697
- }, N = ({
698
- justify: e = "top",
699
- align: t = "stretch",
700
- gap: n = 0
1416
+ };
1417
+ const stack = ({
1418
+ justify = "top",
1419
+ align = "stretch",
1420
+ gap = 0
701
1421
  } = {}) => `
702
- row-gap: ${n}px;
1422
+ row-gap: ${gap}px;
703
1423
  display: flex;
704
1424
  flex-direction: column;
705
- justify-content: ${Qt[e]};
706
- align-items: ${qt[t]};
1425
+ justify-content: ${justifyValues[justify]};
1426
+ align-items: ${alignValues[align]};
707
1427
  `;
708
- function en(e) {
709
- if (e.length < 4)
1428
+
1429
+ function hexToRgb(hex) {
1430
+ if (hex.length < 4)
710
1431
  throw new Error("Invalid hex value");
711
- return (e.replace(
1432
+ return (hex.replace(
712
1433
  /^#?([a-f\d])([a-f\d])([a-f\d])$/i,
713
- (t, n, l, i) => `#${n}${n}${l}${l}${i}${i}`
714
- ).substring(1).match(/.{2}/g) || []).map((t) => parseInt(t, 16));
715
- }
716
- function tn(e) {
717
- return Object.entries(e);
718
- }
719
- const te = document.documentElement.style;
720
- let Te = 1;
721
- function nn(e) {
722
- const t = {};
723
- for (const [n, l] of tn(e)) {
724
- const [i, o, s] = en(l), r = `c${Te}`;
725
- Te++, te.setProperty(`--${r}-r`, String(i)), te.setProperty(`--${r}-g`, String(o)), te.setProperty(`--${r}-b`, String(s)), te.setProperty(`--${r}`, l), t[n] = {
726
- red: i,
727
- green: o,
728
- blue: s,
729
- var: `var(--${r})`,
730
- raw: l,
731
- alpha: (a) => `rgba(var(--${r}-r), var(--${r}-g), var(--${r}-b), ${a})`,
732
- darker: (a, c) => {
733
- const d = a / 100;
734
- return `${c ? "rgba" : "rgb"}(${[
735
- `calc(var(--${r}-r) - var(--${r}-r) * ${d})`,
736
- `calc(var(--${r}-g) - var(--${r}-g) * ${d})`,
737
- `calc(var(--${r}-b) - var(--${r}-b) * ${d})`
738
- ].join(",")}${c !== void 0 ? `, ${c}` : ""})`;
1434
+ (m, r, g, b) => `#${r}${r}${g}${g}${b}${b}`
1435
+ ).substring(1).match(/.{2}/g) || []).map((x) => parseInt(x, 16));
1436
+ }
1437
+
1438
+ function typedObjectEntries(obj) {
1439
+ return Object.entries(obj);
1440
+ }
1441
+
1442
+ const rootStyle = document.documentElement.style;
1443
+ let autoId = 1;
1444
+ function createThemeColors(colors) {
1445
+ const themeColors = {};
1446
+ for (const [name, color] of typedObjectEntries(colors)) {
1447
+ const [red, green, blue] = hexToRgb(color);
1448
+ const colorId = `c${autoId}`;
1449
+ autoId++;
1450
+ rootStyle.setProperty(`--${colorId}-r`, String(red));
1451
+ rootStyle.setProperty(`--${colorId}-g`, String(green));
1452
+ rootStyle.setProperty(`--${colorId}-b`, String(blue));
1453
+ rootStyle.setProperty(`--${colorId}`, color);
1454
+ themeColors[name] = {
1455
+ red,
1456
+ green,
1457
+ blue,
1458
+ var: `var(--${colorId})`,
1459
+ raw: color,
1460
+ alpha: (alpha) => `rgba(var(--${colorId}-r), var(--${colorId}-g), var(--${colorId}-b), ${alpha})`,
1461
+ darker: (percentage, alpha) => {
1462
+ const weight = percentage / 100;
1463
+ return `${alpha ? "rgba" : "rgb"}(${[
1464
+ `calc(var(--${colorId}-r) - var(--${colorId}-r) * ${weight})`,
1465
+ `calc(var(--${colorId}-g) - var(--${colorId}-g) * ${weight})`,
1466
+ `calc(var(--${colorId}-b) - var(--${colorId}-b) * ${weight})`
1467
+ ].join(",")}${alpha !== void 0 ? `, ${alpha}` : ""})`;
739
1468
  },
740
- lighter: (a, c) => {
741
- const d = a / 100;
742
- return `${c ? "rgba" : "rgb"}(${[
743
- `calc(var(--${r}-r) + (255 - var(--${r}-r)) * ${d})`,
744
- `calc(var(--${r}-g) + (255 - var(--${r}-g)) * ${d})`,
745
- `calc(var(--${r}-b) + (255 - var(--${r}-b)) * ${d})`
746
- ].join(",")}${c !== void 0 ? `, ${c}` : ""})`;
1469
+ lighter: (percentage, alpha) => {
1470
+ const weight = percentage / 100;
1471
+ return `${alpha ? "rgba" : "rgb"}(${[
1472
+ `calc(var(--${colorId}-r) + (255 - var(--${colorId}-r)) * ${weight})`,
1473
+ `calc(var(--${colorId}-g) + (255 - var(--${colorId}-g)) * ${weight})`,
1474
+ `calc(var(--${colorId}-b) + (255 - var(--${colorId}-b)) * ${weight})`
1475
+ ].join(",")}${alpha !== void 0 ? `, ${alpha}` : ""})`;
747
1476
  }
748
1477
  };
749
1478
  }
750
- return t;
1479
+ return themeColors;
751
1480
  }
752
- const h = nn({
1481
+
1482
+ const colors = createThemeColors({
753
1483
  bgPrimary: "#0F172A",
754
1484
  bgSecondary: "#1E293B",
755
1485
  textPrimary: "#fff",
@@ -762,65 +1492,81 @@ const h = nn({
762
1492
  bg: "#EAEFFF",
763
1493
  white: "#fff",
764
1494
  black: "#000"
765
- }), L = {
1495
+ });
1496
+ const fonts = {
766
1497
  primary: "Work Sans, sans-serif",
767
1498
  decorative: '"Fira Code", monospaced'
768
1499
  };
769
- function rn(e, t, n) {
770
- if (!e)
771
- return t;
772
- const l = [], i = new Map(e.map((o) => [o[n], o]));
773
- for (const o of t) {
774
- const s = i.get(o[n]);
775
- s && Ue(s, o) ? l.push(s) : l.push(o);
1500
+
1501
+ function reconcile(original, newItems, key) {
1502
+ if (!original) {
1503
+ return newItems;
1504
+ }
1505
+ const final = [];
1506
+ const originalMap = new Map(original.map((item) => [item[key], item]));
1507
+ for (const item of newItems) {
1508
+ const currentValue = originalMap.get(item[key]);
1509
+ if (!currentValue) {
1510
+ final.push(item);
1511
+ } else if (dequal(currentValue, item)) {
1512
+ final.push(currentValue);
1513
+ } else {
1514
+ final.push(item);
1515
+ }
776
1516
  }
777
- return l;
1517
+ return final;
778
1518
  }
779
- function et(e, t) {
780
- return m((n) => rn(n, typeof e == "function" ? e() : e, t));
1519
+ function createReconciledArray(array, key) {
1520
+ return createMemo((prev) => {
1521
+ return reconcile(prev, typeof array === "function" ? array() : array, key);
1522
+ });
781
1523
  }
782
- function we(e) {
783
- const [t, n] = re(e);
1524
+ function createSignalRef(initialValue) {
1525
+ const [value, setValue] = createSignal(initialValue);
784
1526
  return {
785
1527
  get value() {
786
- return t();
1528
+ return value();
787
1529
  },
788
- set value(l) {
789
- n(() => l);
1530
+ set value(newValue) {
1531
+ setValue(() => newValue);
790
1532
  },
791
- set(l) {
792
- n(() => l);
1533
+ set(newValue) {
1534
+ setValue(() => newValue);
793
1535
  }
794
1536
  };
795
1537
  }
796
- const on = /* @__PURE__ */ $('<div class="tag"></div>'), Ee = /* @__PURE__ */ $("<span></span>"), ln = /* @__PURE__ */ $('<div><div class="call"></div></div>'), sn = _`
1538
+
1539
+ const _tmpl$$9 = /*#__PURE__*/template(`<div class="tag"></div>`),
1540
+ _tmpl$2$7 = /*#__PURE__*/template(`<span></span>`),
1541
+ _tmpl$3$5 = /*#__PURE__*/template(`<div><div class="call"></div></div>`);
1542
+ const menuItemStyle = u`
797
1543
  &&& {
798
1544
  font-size: 14px;
799
- ${N()};
1545
+ ${stack()};
800
1546
 
801
1547
  > .call {
802
1548
  padding: 4px 12px;
803
- ${B()};
1549
+ ${inline()};
804
1550
  opacity: 0.8;
805
1551
 
806
1552
  &.selected {
807
1553
  opacity: 1;
808
- background-color: ${h.secondary.alpha(0.16)};
1554
+ background-color: ${colors.secondary.alpha(0.16)};
809
1555
  }
810
1556
 
811
1557
  > button {
812
1558
  text-align: left;
813
- ${B({
1559
+ ${inline({
814
1560
  gap: 8
815
1561
  })};
816
1562
 
817
1563
  > .tag {
818
1564
  font-weight: 600;
819
- font-family: ${L.decorative};
1565
+ font-family: ${fonts.decorative};
820
1566
  }
821
1567
 
822
1568
  > span {
823
- ${ue};
1569
+ ${ellipsis};
824
1570
  flex-shrink: 1;
825
1571
  }
826
1572
  }
@@ -831,7 +1577,7 @@ const on = /* @__PURE__ */ $('<div class="tag"></div>'), Ee = /* @__PURE__ */ $(
831
1577
  padding: 4px 12px;
832
1578
  padding-left: 14px;
833
1579
  margin-left: 16px;
834
- border-left: 1px solid ${h.white.alpha(0.1)};
1580
+ border-left: 1px solid ${colors.white.alpha(0.1)};
835
1581
 
836
1582
  span {
837
1583
  opacity: 0.6;
@@ -842,7 +1588,7 @@ const on = /* @__PURE__ */ $('<div class="tag"></div>'), Ee = /* @__PURE__ */ $(
842
1588
 
843
1589
  &.selected span {
844
1590
  opacity: 1;
845
- background-color: ${h.secondary.alpha(0.16)};
1591
+ background-color: ${colors.secondary.alpha(0.16)};
846
1592
  }
847
1593
 
848
1594
  &:first-of-type {
@@ -851,7 +1597,7 @@ const on = /* @__PURE__ */ $('<div class="tag"></div>'), Ee = /* @__PURE__ */ $(
851
1597
 
852
1598
  &:last-of-type {
853
1599
  border-radius: 0 0 0 10px;
854
- border-bottom: 1px solid ${h.white.alpha(0.1)};
1600
+ border-bottom: 1px solid ${colors.white.alpha(0.1)};
855
1601
  padding-bottom: 10px;
856
1602
  margin-bottom: 4px;
857
1603
  }
@@ -866,238 +1612,317 @@ const on = /* @__PURE__ */ $('<div class="tag"></div>'), Ee = /* @__PURE__ */ $(
866
1612
  }
867
1613
  }
868
1614
  }
869
- `, an = (e) => {
870
- const t = () => e.item, n = () => e.currentCallId;
871
- ct(e, ["item", "currentCallId"])[1];
872
- const l = we(e.item.subitemsWithAlias.length < 4), i = cn(t().type, t().subType);
1615
+ `;
1616
+ const ApiExplorerMenuItem = props => {
1617
+ const _prop = () => props.item,
1618
+ _prop2 = () => props.currentCallId;
1619
+ splitProps(props, ["item", "currentCallId"])[1];
1620
+ const showSubitems = createSignalRef(props.item.subitemsWithAlias.length < 4);
1621
+ const typeIcon = getTypeIcon(_prop().type, _prop().subType);
873
1622
  return (() => {
874
- const o = ln.cloneNode(!0), s = o.firstChild;
875
- return b(o, sn), u(s, p(M, {
1623
+ const _el$ = _tmpl$3$5.cloneNode(true),
1624
+ _el$2 = _el$.firstChild;
1625
+ className(_el$, menuItemStyle);
1626
+ insert(_el$2, createComponent(ButtonElement, {
876
1627
  onClick: () => {
877
- se({
878
- selectedCall: t().id,
1628
+ setUiStore({
1629
+ selectedCall: _prop().id,
879
1630
  selectedSubitem: null
880
1631
  });
881
1632
  },
882
1633
  get children() {
883
1634
  return [(() => {
884
- const r = on.cloneNode(!0);
885
- return u(r, () => i.icon), C((a) => {
886
- const c = `${t().type}${t().subType ? ` (${t().subType})` : ""}`, d = i.color;
887
- return c !== a._v$ && P(r, "title", a._v$ = c), d !== a._v$2 && r.style.setProperty("color", a._v$2 = d), a;
1635
+ const _el$3 = _tmpl$$9.cloneNode(true);
1636
+ insert(_el$3, () => typeIcon.icon);
1637
+ createRenderEffect(_p$ => {
1638
+ const _v$ = `${_prop().type}${_prop().subType ? ` (${_prop().subType})` : ''}`,
1639
+ _v$2 = typeIcon.color;
1640
+ _v$ !== _p$._v$ && setAttribute(_el$3, "title", _p$._v$ = _v$);
1641
+ _v$2 !== _p$._v$2 && _el$3.style.setProperty("color", _p$._v$2 = _v$2);
1642
+ return _p$;
888
1643
  }, {
889
- _v$: void 0,
890
- _v$2: void 0
891
- }), r;
1644
+ _v$: undefined,
1645
+ _v$2: undefined
1646
+ });
1647
+ return _el$3;
892
1648
  })(), (() => {
893
- const r = Ee.cloneNode(!0);
894
- return u(r, () => t().name), C(() => P(r, "title", t().name)), r;
1649
+ const _el$4 = _tmpl$2$7.cloneNode(true);
1650
+ insert(_el$4, () => _prop().name);
1651
+ createRenderEffect(() => setAttribute(_el$4, "title", _prop().name));
1652
+ return _el$4;
895
1653
  })()];
896
1654
  }
897
- }), null), u(s, (() => {
898
- const r = m(() => t().subitemsWithAlias.length > 0);
899
- return () => r() && p(M, {
900
- class: "expand-button",
1655
+ }), null);
1656
+ insert(_el$2, (() => {
1657
+ const _c$ = createMemo(() => _prop().subitemsWithAlias.length > 0);
1658
+ return () => _c$() && createComponent(ButtonElement, {
1659
+ "class": "expand-button",
901
1660
  get classList() {
902
1661
  return {
903
- expanded: l.value
1662
+ expanded: showSubitems.value
904
1663
  };
905
1664
  },
906
1665
  onClick: () => {
907
- l.value = !l.value;
1666
+ showSubitems.value = !showSubitems.value;
908
1667
  },
909
1668
  get children() {
910
- return p(de, {
1669
+ return createComponent(Icon, {
911
1670
  name: "caret-down"
912
1671
  });
913
1672
  }
914
1673
  });
915
- })(), null), u(o, p(ae, {
1674
+ })(), null);
1675
+ insert(_el$, createComponent(Show, {
916
1676
  get when() {
917
- return l.value;
1677
+ return showSubitems.value;
918
1678
  },
919
1679
  get children() {
920
- return p(F, {
1680
+ return createComponent(For, {
921
1681
  get each() {
922
- return t().subitemsWithAlias;
1682
+ return _prop().subitemsWithAlias;
923
1683
  },
924
- children: (r) => p(M, {
925
- class: "subitem",
1684
+ children: subitem => createComponent(ButtonElement, {
1685
+ "class": "subitem",
926
1686
  get classList() {
927
1687
  return {
928
- selected: n() === t().id && S.selectedSubitem === r
1688
+ selected: _prop2() === _prop().id && uiStore.selectedSubitem === subitem
929
1689
  };
930
1690
  },
931
1691
  onClick: () => {
932
- se({
933
- selectedCall: t().id,
934
- selectedSubitem: r
1692
+ setUiStore({
1693
+ selectedCall: _prop().id,
1694
+ selectedSubitem: subitem
935
1695
  });
936
1696
  },
937
1697
  get children() {
938
- const a = Ee.cloneNode(!0);
939
- return u(a, r), a;
1698
+ const _el$5 = _tmpl$2$7.cloneNode(true);
1699
+ insert(_el$5, subitem);
1700
+ return _el$5;
940
1701
  }
941
1702
  })
942
1703
  });
943
1704
  }
944
- }), null), C(() => s.classList.toggle("selected", n() ? n() === t().id : e.index === 0)), o;
1705
+ }), null);
1706
+ createRenderEffect(() => _el$2.classList.toggle("selected", !!(_prop2() ? _prop2() === _prop().id : props.index === 0)));
1707
+ return _el$;
945
1708
  })();
946
1709
  };
947
- function cn(e, t) {
948
- let n = "", l = "";
949
- return e === "fetch" ? (n = "F", l = "#FDE047") : t ? t === "create" ? (n = "C", l = "#6EE7B7") : t === "update" ? (n = "U", l = "#A78BFA") : t === "delete" ? (n = "D", l = "#E53558") : (n = t[0]?.toUpperCase() || "?", l = "#FDE047") : (n = "M", l = "#A78BFA"), {
950
- icon: n,
951
- color: l
1710
+ function getTypeIcon(type, subType) {
1711
+ let icon = '';
1712
+ let color = '';
1713
+ if (type === 'fetch') {
1714
+ icon = 'F';
1715
+ color = '#FDE047';
1716
+ } else {
1717
+ if (subType) {
1718
+ if (subType === 'create') {
1719
+ icon = 'C';
1720
+ color = '#6EE7B7';
1721
+ } else if (subType === 'update') {
1722
+ icon = 'U';
1723
+ color = '#A78BFA';
1724
+ } else if (subType === 'delete') {
1725
+ icon = 'D';
1726
+ color = '#E53558';
1727
+ } else {
1728
+ icon = subType[0]?.toUpperCase() || '?';
1729
+ color = '#FDE047';
1730
+ }
1731
+ } else {
1732
+ icon = 'M';
1733
+ color = '#A78BFA';
1734
+ }
1735
+ }
1736
+ return {
1737
+ icon,
1738
+ color
952
1739
  };
953
1740
  }
954
- function Le(e) {
955
- if (e == null)
1741
+
1742
+ function assertIsNotNullish(value) {
1743
+ if (value === null || value === void 0) {
956
1744
  throw new Error("Value is null or undefined");
1745
+ }
957
1746
  }
958
- function Oe(e, t) {
1747
+
1748
+ function tryExpression(expression, onError) {
959
1749
  try {
960
- return e();
961
- } catch (n) {
962
- return t && t(n), null;
1750
+ return expression();
1751
+ } catch (error) {
1752
+ if (onError) {
1753
+ onError(error);
1754
+ }
1755
+ return null;
963
1756
  }
964
1757
  }
965
- function dn(e, t) {
966
- const n = ft(t);
967
- return un(e, n);
1758
+
1759
+ function matchURLPattern(url, pattern) {
1760
+ const regex = parse(pattern);
1761
+ return exec(url, regex);
968
1762
  }
969
- function un(e, t) {
970
- let n = 0;
971
- const l = {}, i = t.pattern.exec(e);
972
- if (!i)
1763
+ function exec(path, result) {
1764
+ let i = 0;
1765
+ const out = {};
1766
+ const matches = result.pattern.exec(path);
1767
+ if (!matches)
973
1768
  return null;
974
- for (; n < t.keys.length; )
975
- l[t.keys[n]] = i[++n] || null;
976
- return l;
1769
+ while (i < result.keys.length) {
1770
+ out[result.keys[i]] = matches[++i] || null;
1771
+ }
1772
+ return out;
977
1773
  }
978
- function tt(e) {
979
- return e ? e.slice().reverse() : [];
1774
+
1775
+ function reverseCopy(array) {
1776
+ if (!array)
1777
+ return [];
1778
+ return array.slice().reverse();
980
1779
  }
981
- function fn(...e) {
982
- const t = [];
983
- for (const n of e)
984
- n != null && t.push(...n);
985
- return t;
1780
+ function concatNonNullable(...arrays) {
1781
+ const result = [];
1782
+ for (const array of arrays) {
1783
+ if (array !== null && array !== void 0) {
1784
+ result.push(...array);
1785
+ }
1786
+ }
1787
+ return result;
986
1788
  }
987
- function pn(e) {
988
- return e.filter((t) => t != null);
1789
+ function filterNonNullableElements(array) {
1790
+ return array.filter((item) => item !== null && item !== void 0);
989
1791
  }
990
- const [H, gn] = Qe({
1792
+
1793
+ const [callsStore, setCallsStore] = createStore({
991
1794
  calls: {}
992
1795
  });
993
- let ve = {
1796
+ let config = {
994
1797
  callsProcessor: []
995
1798
  };
996
- function hn(e) {
997
- ve = {
998
- ...ve,
999
- ...e
1799
+ function setConfig(newConfig) {
1800
+ config = {
1801
+ ...config,
1802
+ ...newConfig
1000
1803
  };
1001
1804
  }
1002
- function Vr(e) {
1003
- const t = e.startTime || Date.now();
1805
+ function addCall(request) {
1806
+ const startTime = request.startTime || Date.now();
1004
1807
  return ({
1005
- isError: n,
1006
- status: l,
1007
- response: i,
1008
- metadata: o,
1009
- tags: s
1808
+ isError,
1809
+ status,
1810
+ response,
1811
+ metadata,
1812
+ tags
1010
1813
  }) => {
1011
- const r = e.duration || Date.now() - t;
1012
- gn(
1013
- Xt((a) => {
1014
- const c = Oe(
1015
- () => new URL(e.path, "http://localhost")
1814
+ const duration = request.duration || Date.now() - startTime;
1815
+ setCallsStore(
1816
+ produce((draft) => {
1817
+ const pathURL = tryExpression(
1818
+ () => new URL(request.path, "http://localhost")
1016
1819
  );
1017
- Le(c);
1018
- const d = c.searchParams.toString() !== "" ? Object.fromEntries(c.searchParams.entries()) : null;
1019
- let g = null;
1020
- const f = ve.callsProcessor.find((O) => {
1021
- if (typeof O.match == "string") {
1022
- const T = dn(c.pathname, O.match);
1023
- return T ? (g = T, !0) : !1;
1024
- } else
1025
- return O.match({
1026
- url: c,
1027
- type: e.type,
1028
- subType: e.subType
1820
+ assertIsNotNullish(pathURL);
1821
+ const searchParams = pathURL.searchParams.toString() !== "" ? Object.fromEntries(pathURL.searchParams.entries()) : null;
1822
+ let pathParams = null;
1823
+ const relatedConfig = config.callsProcessor.find((processor) => {
1824
+ if (typeof processor.match === "string") {
1825
+ const pattern = matchURLPattern(pathURL.pathname, processor.match);
1826
+ if (pattern) {
1827
+ pathParams = pattern;
1828
+ return true;
1829
+ }
1830
+ return false;
1831
+ } else {
1832
+ return processor.match({
1833
+ url: pathURL,
1834
+ type: request.type,
1835
+ subType: request.subType
1029
1836
  });
1030
- }), y = f?.callID?.({
1031
- url: c,
1032
- type: e.type,
1033
- subType: e.subType
1034
- }) || typeof f?.match == "string" && f.match, v = btoa(
1035
- y || `${c.pathname}|${e.type}${e.subType ? `|${e.subType}` : ""}`
1036
- ), x = f?.callName, w = typeof x == "function" ? x({
1037
- url: c,
1038
- type: e.type,
1039
- subType: e.subType
1040
- }) : x;
1041
- a.calls[v] || (a.calls[v] = {
1042
- name: w || typeof f?.match == "string" && f.match || c.pathname.replace(/^\//, ""),
1043
- path: c.pathname.replace(/^\//, ""),
1044
- lastRequestStartTime: t,
1045
- requests: [],
1046
- type: e.type,
1047
- subType: e.subType
1837
+ }
1048
1838
  });
1049
- const A = a.calls[v];
1050
- Le(A), A.requests.length > 100 && A.requests.shift();
1051
- const k = {
1052
- id: ut(),
1053
- duration: r,
1054
- pathParams: g,
1055
- isError: n,
1056
- metadata: o,
1057
- path: e.path.replace(/^\//, ""),
1058
- payload: e.payload,
1059
- response: i,
1060
- searchParams: d,
1061
- startTime: t,
1062
- type: e.type,
1063
- method: e.method,
1064
- subType: e.subType,
1065
- code: l,
1066
- tags: pn(
1067
- fn(e.tags, s)
1839
+ const normalizedCallId = relatedConfig?.callID?.({
1840
+ url: pathURL,
1841
+ type: request.type,
1842
+ subType: request.subType
1843
+ }) || typeof relatedConfig?.match === "string" && relatedConfig.match;
1844
+ const callID = btoa(
1845
+ normalizedCallId || `${pathURL.pathname}|${request.type}${request.subType ? `|${request.subType}` : ""}`
1846
+ );
1847
+ const callNameNormalizer = relatedConfig?.callName;
1848
+ const normalizedCallName = typeof callNameNormalizer === "function" ? callNameNormalizer({
1849
+ url: pathURL,
1850
+ type: request.type,
1851
+ subType: request.subType
1852
+ }) : callNameNormalizer;
1853
+ if (!draft.calls[callID]) {
1854
+ draft.calls[callID] = {
1855
+ name: normalizedCallName || typeof relatedConfig?.match === "string" && relatedConfig.match || pathURL.pathname.replace(/^\//, ""),
1856
+ path: pathURL.pathname.replace(/^\//, ""),
1857
+ lastRequestStartTime: startTime,
1858
+ requests: [],
1859
+ type: request.type,
1860
+ subType: request.subType
1861
+ };
1862
+ }
1863
+ const call = draft.calls[callID];
1864
+ assertIsNotNullish(call);
1865
+ if (call.requests.length > 100) {
1866
+ call.requests.shift();
1867
+ }
1868
+ const requestToAdd = {
1869
+ id: nanoid(),
1870
+ duration,
1871
+ pathParams,
1872
+ isError,
1873
+ metadata,
1874
+ path: request.path.replace(/^\//, ""),
1875
+ payload: request.payload,
1876
+ response,
1877
+ searchParams,
1878
+ startTime,
1879
+ type: request.type,
1880
+ method: request.method,
1881
+ subType: request.subType,
1882
+ code: status,
1883
+ tags: filterNonNullableElements(
1884
+ concatNonNullable(request.tags, tags)
1068
1885
  )
1069
- }, ee = Oe(
1070
- () => f?.payloadAlias?.(k.payload, k)
1886
+ };
1887
+ const payloadAlias = tryExpression(
1888
+ () => relatedConfig?.payloadAlias?.(requestToAdd.payload, requestToAdd)
1071
1889
  );
1072
- ee && (k.alias = ee), A.requests.push(k);
1890
+ if (payloadAlias) {
1891
+ requestToAdd.alias = payloadAlias;
1892
+ }
1893
+ call.requests.push(requestToAdd);
1073
1894
  })
1074
1895
  );
1075
1896
  };
1076
1897
  }
1077
- const mn = /* @__PURE__ */ $('<div><h1>API EXPLORER</h1><label><input type="text" placeholder="Search"></label><div></div></div>'), $n = _`
1898
+
1899
+ const _tmpl$$8 = /*#__PURE__*/template(`<div><h1>API EXPLORER</h1><label><input type="text" placeholder="Search"></label><div></div></div>`);
1900
+ const containerStyle$8 = u`
1078
1901
  &&& {
1079
- ${N()};
1080
- border-right: 1px solid ${h.white.alpha(0.1)};
1902
+ ${stack()};
1903
+ border-right: 1px solid ${colors.white.alpha(0.1)};
1081
1904
 
1082
1905
  > h1 {
1083
1906
  font-size: 18px;
1084
1907
  padding-left: 12px;
1085
1908
  padding-top: 10px;
1086
- font-family: ${L.decorative};
1087
- color: ${h.secondary.var};
1909
+ font-family: ${fonts.decorative};
1910
+ color: ${colors.secondary.var};
1088
1911
  padding-bottom: 16px;
1089
1912
  }
1090
1913
  }
1091
- `, yn = _`
1914
+ `;
1915
+ const menuContainerStyle = u`
1092
1916
  &&& {
1093
- ${N()};
1917
+ ${stack()};
1094
1918
  flex: 1 1;
1095
1919
  overflow-y: auto;
1096
1920
  padding-bottom: 16px;
1097
1921
  }
1098
- `, vn = _`
1922
+ `;
1923
+ const searchStyle = u`
1099
1924
  &&& {
1100
- ${B({
1925
+ ${inline({
1101
1926
  gap: 8
1102
1927
  })};
1103
1928
  margin: 0 10px;
@@ -1105,92 +1930,121 @@ const mn = /* @__PURE__ */ $('<div><h1>API EXPLORER</h1><label><input type="text
1105
1930
 
1106
1931
  display: grid;
1107
1932
  grid-template-columns: 14px 1fr;
1108
- background: ${h.white.alpha(0.05)};
1933
+ background: ${colors.white.alpha(0.05)};
1109
1934
  border-radius: 4px;
1110
1935
  --icon-size: 16px;
1111
1936
  padding: 4px 0;
1112
1937
  padding-left: 6px;
1113
1938
 
1114
1939
  .icon {
1115
- color: ${h.secondary.var};
1940
+ color: ${colors.secondary.var};
1116
1941
  }
1117
1942
 
1118
1943
  input {
1119
1944
  border: none;
1120
1945
  background: transparent;
1121
- color: ${h.white.var};
1946
+ color: ${colors.white.var};
1122
1947
 
1123
1948
  &:focus {
1124
1949
  outline: none;
1125
1950
  }
1126
1951
  }
1127
1952
  }
1128
- `, bn = () => {
1129
- const e = we(""), t = et(() => {
1130
- const l = Object.entries(H.calls), i = [];
1131
- for (const [o, s] of l.reverse()) {
1132
- if (e.value.trim() && !s.name.includes(e.value.toLowerCase()))
1953
+ `;
1954
+ const ApiExplorerMenu = () => {
1955
+ const search = createSignalRef('');
1956
+ const menuItems = createReconciledArray(() => {
1957
+ const callsEntries = Object.entries(callsStore.calls);
1958
+ const filtered = [];
1959
+ for (const [key, value] of callsEntries.reverse()) {
1960
+ if (search.value.trim() && !value.name.includes(search.value.toLowerCase())) {
1133
1961
  continue;
1134
- const r = /* @__PURE__ */ new Set();
1135
- for (const a of s.requests)
1136
- a.alias && r.add(a.alias);
1137
- i.push({
1138
- id: o,
1139
- subitemsWithAlias: [...r],
1140
- ...s
1962
+ }
1963
+ const subitemsWithAlias = new Set();
1964
+ for (const request of value.requests) {
1965
+ if (request.alias) {
1966
+ subitemsWithAlias.add(request.alias);
1967
+ }
1968
+ }
1969
+ filtered.push({
1970
+ id: key,
1971
+ subitemsWithAlias: [...subitemsWithAlias],
1972
+ ...value
1141
1973
  });
1142
1974
  }
1143
- return i;
1144
- }, "id"), n = m(() => S.selectedCall);
1975
+ return filtered;
1976
+ }, 'id');
1977
+ const _currentCallId = createMemo(() => uiStore.selectedCall);
1145
1978
  return (() => {
1146
- const l = mn.cloneNode(!0), i = l.firstChild, o = i.nextSibling, s = o.firstChild, r = o.nextSibling;
1147
- return b(l, $n), b(o, vn), u(o, p(de, {
1979
+ const _el$ = _tmpl$$8.cloneNode(true),
1980
+ _el$2 = _el$.firstChild,
1981
+ _el$3 = _el$2.nextSibling,
1982
+ _el$4 = _el$3.firstChild,
1983
+ _el$5 = _el$3.nextSibling;
1984
+ className(_el$, containerStyle$8);
1985
+ className(_el$3, searchStyle);
1986
+ insert(_el$3, createComponent(Icon, {
1148
1987
  name: "search"
1149
- }), s), s.$$input = (a) => {
1150
- e.value = a.currentTarget.value;
1151
- }, b(r, yn), u(r, p(F, {
1988
+ }), _el$4);
1989
+ _el$4.$$input = e => {
1990
+ search.value = e.currentTarget.value;
1991
+ };
1992
+ className(_el$5, menuContainerStyle);
1993
+ insert(_el$5, createComponent(For, {
1152
1994
  get each() {
1153
- return t();
1995
+ return menuItems();
1154
1996
  },
1155
- children: (a, c) => p(an, {
1156
- get index() {
1157
- return c();
1158
- },
1159
- item: a,
1160
- get currentCallId() {
1161
- return n();
1162
- }
1163
- })
1164
- })), C(() => s.value = e.value), l;
1997
+ children: (item, i) => {
1998
+ return createComponent(ApiExplorerMenuItem, {
1999
+ get index() {
2000
+ return i();
2001
+ },
2002
+ item: item,
2003
+ get currentCallId() {
2004
+ return _currentCallId();
2005
+ }
2006
+ });
2007
+ }
2008
+ }));
2009
+ createRenderEffect(() => _el$4.value = search.value);
2010
+ return _el$;
1165
2011
  })();
1166
2012
  };
1167
- ce(["input"]);
1168
- function nt(...e) {
1169
- const t = [];
1170
- for (let n = 0; n < e.length; n++) {
1171
- const l = e[n];
1172
- if (!l)
2013
+ delegateEvents(["input"]);
2014
+
2015
+ function cx(...args) {
2016
+ const classNames = [];
2017
+ for (let i = 0; i < args.length; i++) {
2018
+ const arg = args[i];
2019
+ if (!arg)
1173
2020
  continue;
1174
- const i = typeof l;
1175
- if (i === "string" || i === "number")
1176
- t.push(l);
1177
- else if (i === "object")
1178
- for (let o = 0, s = Object.keys(l); o < s.length; o++)
1179
- l[s[o]] && t.push(s[o]);
2021
+ const argType = typeof arg;
2022
+ if (argType === "string" || argType === "number") {
2023
+ classNames.push(arg);
2024
+ } else if (argType === "object") {
2025
+ for (let i2 = 0, keys = Object.keys(arg); i2 < keys.length; i2++) {
2026
+ if (arg[keys[i2]]) {
2027
+ classNames.push(keys[i2]);
2028
+ }
2029
+ }
2030
+ }
1180
2031
  }
1181
- return t.join(" ");
2032
+ return classNames.join(" ");
1182
2033
  }
1183
- const Cn = /* @__PURE__ */ $('<div><div class="content"></div></div>'), xn = /* @__PURE__ */ $("<h1></h1>"), wn = _`
2034
+
2035
+ const _tmpl$$7 = /*#__PURE__*/template(`<div><div class="content"></div></div>`),
2036
+ _tmpl$2$6 = /*#__PURE__*/template(`<h1></h1>`);
2037
+ const containerStyle$7 = u`
1184
2038
  &&& {
1185
- ${N()};
2039
+ ${stack()};
1186
2040
 
1187
2041
  > h1 {
1188
2042
  font-size: 14px;
1189
- color: ${h.secondary.var};
2043
+ color: ${colors.secondary.var};
1190
2044
  letter-spacing: 0.08em;
1191
- font-family: ${L.decorative};
2045
+ font-family: ${fonts.decorative};
1192
2046
  font-weight: 300;
1193
- background: ${h.bgPrimary.var};
2047
+ background: ${colors.bgPrimary.var};
1194
2048
  z-index: 1;
1195
2049
  align-self: flex-start;
1196
2050
  position: sticky;
@@ -1206,7 +2060,7 @@ const Cn = /* @__PURE__ */ $('<div><div class="content"></div></div>'), xn = /*
1206
2060
  padding-top: calc(var(--padding-top) + 10px);
1207
2061
  padding-inline: 10px;
1208
2062
  padding-bottom: 10px;
1209
- background: ${h.white.alpha(0.05)};
2063
+ background: ${colors.white.alpha(0.05)};
1210
2064
  border-radius: 4px;
1211
2065
  }
1212
2066
 
@@ -1214,36 +2068,60 @@ const Cn = /* @__PURE__ */ $('<div><div class="content"></div></div>'), xn = /*
1214
2068
  margin-top: 20px;
1215
2069
  }
1216
2070
  }
1217
- `, E = (e) => (() => {
1218
- const t = Cn.cloneNode(!0), n = t.firstChild;
1219
- return u(t, (() => {
1220
- const l = m(() => !!e.title);
1221
- return () => l() && (() => {
1222
- const i = xn.cloneNode(!0);
1223
- return u(i, () => e.title), i;
1224
- })();
1225
- })(), n), u(n, () => e.children), C(() => b(t, nt(wn, e.class))), t;
1226
- })(), _n = `
2071
+ `;
2072
+ const Section = props => {
2073
+ return (() => {
2074
+ const _el$ = _tmpl$$7.cloneNode(true),
2075
+ _el$2 = _el$.firstChild;
2076
+ insert(_el$, (() => {
2077
+ const _c$ = createMemo(() => !!props.title);
2078
+ return () => _c$() && (() => {
2079
+ const _el$3 = _tmpl$2$6.cloneNode(true);
2080
+ insert(_el$3, () => props.title);
2081
+ return _el$3;
2082
+ })();
2083
+ })(), _el$2);
2084
+ insert(_el$2, () => props.children);
2085
+ createRenderEffect(() => className(_el$, cx(containerStyle$7, props.class)));
2086
+ return _el$;
2087
+ })();
2088
+ };
2089
+
2090
+ const allowTextSelection = `
1227
2091
  user-select: text;
1228
2092
 
1229
2093
  *, *::before, *::after {
1230
2094
  user-select: text;
1231
2095
  }
1232
2096
  `;
1233
- function Nn(e) {
2097
+
2098
+ function multilineEllipsis(breakAtLine) {
1234
2099
  return `
1235
2100
  display: -webkit-box;
1236
2101
  overflow: hidden;
1237
- -webkit-line-clamp: ${e};
2102
+ -webkit-line-clamp: ${breakAtLine};
1238
2103
  -webkit-box-orient: vertical;
1239
2104
  `;
1240
2105
  }
1241
- const Sn = /* @__PURE__ */ $('<div class="key"><span></span></div>'), kn = /* @__PURE__ */ $('<div class="collapsed"></div>'), An = /* @__PURE__ */ $('<div class="delimiter">[]</div>'), Pn = /* @__PURE__ */ $('<div class="delimiter">{}</div>'), je = /* @__PURE__ */ $('<div class="delimiter"></div>'), Me = /* @__PURE__ */ $('<div class="childs"></div>'), Tn = /* @__PURE__ */ $('<div class="delimiter end">]</div>'), Re = /* @__PURE__ */ $('<div class="child"></div>'), En = /* @__PURE__ */ $('<div class="delimiter end">}</div>'), Ln = /* @__PURE__ */ $('<div class="value" title="Shift + Click to copy value"></div>'), De = /* @__PURE__ */ $('<span class="string-quotes">"</span>'), On = /* @__PURE__ */ $("<div></div>"), jn = _`
2106
+
2107
+ const _tmpl$$6 = /*#__PURE__*/template(`<div class="key"><span></span></div>`),
2108
+ _tmpl$2$5 = /*#__PURE__*/template(`<div class="collapsed"></div>`),
2109
+ _tmpl$3$4 = /*#__PURE__*/template(`<div class="delimiter">[]</div>`),
2110
+ _tmpl$4$4 = /*#__PURE__*/template(`<div class="delimiter">{}</div>`),
2111
+ _tmpl$5$2 = /*#__PURE__*/template(`<div class="delimiter"></div>`),
2112
+ _tmpl$6$2 = /*#__PURE__*/template(`<div class="childs"></div>`),
2113
+ _tmpl$7$1 = /*#__PURE__*/template(`<div class="delimiter end">]</div>`),
2114
+ _tmpl$8$1 = /*#__PURE__*/template(`<div class="child"></div>`),
2115
+ _tmpl$9$1 = /*#__PURE__*/template(`<div class="delimiter end">}</div>`),
2116
+ _tmpl$10 = /*#__PURE__*/template(`<div class="value" title="Shift + Click to copy value"></div>`),
2117
+ _tmpl$11 = /*#__PURE__*/template(`<span class="string-quotes">"</span>`),
2118
+ _tmpl$12 = /*#__PURE__*/template(`<div></div>`);
2119
+ const containerStyle$6 = u`
1242
2120
  &&& {
1243
- font-family: ${L.decorative};
2121
+ font-family: ${fonts.decorative};
1244
2122
  font-size: 13px;
1245
- ${_n};
1246
- ${N({
2123
+ ${allowTextSelection};
2124
+ ${stack({
1247
2125
  gap: 2
1248
2126
  })};
1249
2127
  padding-left: 8px;
@@ -1253,7 +2131,7 @@ const Sn = /* @__PURE__ */ $('<div class="key"><span></span></div>'), kn = /* @_
1253
2131
  width: 16px;
1254
2132
  display: inline-block;
1255
2133
  vertical-align: middle;
1256
- color: ${h.white.alpha(0.5)};
2134
+ color: ${colors.white.alpha(0.5)};
1257
2135
 
1258
2136
  &:not(.expanded) .icon {
1259
2137
  transform: rotate(-90deg);
@@ -1261,18 +2139,18 @@ const Sn = /* @__PURE__ */ $('<div class="key"><span></span></div>'), kn = /* @_
1261
2139
  }
1262
2140
 
1263
2141
  .show-all {
1264
- color: ${h.white.alpha(0.5)};
2142
+ color: ${colors.white.alpha(0.5)};
1265
2143
  text-align: left;
1266
2144
  }
1267
2145
 
1268
2146
  .childs {
1269
- ${N({
2147
+ ${stack({
1270
2148
  gap: 2
1271
2149
  })};
1272
2150
  }
1273
2151
 
1274
2152
  .delimiter {
1275
- color: ${h.white.alpha(0.5)};
2153
+ color: ${colors.white.alpha(0.5)};
1276
2154
  margin-top: 1px;
1277
2155
  margin-bottom: 1px;
1278
2156
 
@@ -1286,13 +2164,13 @@ const Sn = /* @__PURE__ */ $('<div class="key"><span></span></div>'), kn = /* @_
1286
2164
  .childs {
1287
2165
  padding-left: 20px;
1288
2166
  grid-column: 1 / span 3;
1289
- border-left: 1px solid ${h.white.alpha(0.05)};
2167
+ border-left: 1px solid ${colors.white.alpha(0.05)};
1290
2168
 
1291
2169
  > .value {
1292
2170
  &::after {
1293
2171
  content: ',';
1294
2172
  opacity: 0.5;
1295
- color: ${h.white.var};
2173
+ color: ${colors.white.var};
1296
2174
  }
1297
2175
  }
1298
2176
  }
@@ -1304,22 +2182,22 @@ const Sn = /* @__PURE__ */ $('<div class="key"><span></span></div>'), kn = /* @_
1304
2182
  .key {
1305
2183
  color: #a5d6ff;
1306
2184
  margin-right: 5px;
1307
- ${B({
1308
- align: "top"
2185
+ ${inline({
2186
+ align: 'top'
1309
2187
  })};
1310
2188
 
1311
2189
  span {
1312
2190
  flex-shrink: 1;
1313
- ${ue};
2191
+ ${ellipsis};
1314
2192
  }
1315
2193
 
1316
2194
  &.index {
1317
- color: ${h.success.alpha(0.7)};
2195
+ color: ${colors.success.alpha(0.7)};
1318
2196
  }
1319
2197
 
1320
2198
  &::after {
1321
2199
  content: ':';
1322
- color: ${h.secondary.alpha(0.5)};
2200
+ color: ${colors.secondary.alpha(0.5)};
1323
2201
  }
1324
2202
  }
1325
2203
  }
@@ -1330,180 +2208,254 @@ const Sn = /* @__PURE__ */ $('<div class="key"><span></span></div>'), kn = /* @_
1330
2208
 
1331
2209
  .value {
1332
2210
  word-wrap: break-word;
1333
- ${Nn(5)};
2211
+ ${multilineEllipsis(5)};
1334
2212
  }
1335
2213
 
1336
2214
  [data-type='number'] {
1337
- color: ${h.primary.var};
2215
+ color: ${colors.primary.var};
1338
2216
  }
1339
2217
 
1340
2218
  [data-type='boolean'] {
1341
- color: ${h.warning.var};
2219
+ color: ${colors.warning.var};
1342
2220
  }
1343
2221
 
1344
2222
  [data-type='object'],
1345
2223
  [data-type='undefined'] {
1346
- color: ${h.white.alpha(0.6)};
2224
+ color: ${colors.white.alpha(0.6)};
1347
2225
  }
1348
2226
 
1349
2227
  .collapsed {
1350
- color: ${h.white.alpha(0.5)};
2228
+ color: ${colors.white.alpha(0.5)};
1351
2229
  }
1352
2230
  }
1353
- `, Mn = new Intl.NumberFormat("en-US"), K = 14, be = (e) => {
1354
- let [t, n] = re(!(e.indent > 0 && e.compact)), [l, i] = re(!e.compact);
1355
- return m(() => {
1356
- const o = e.value, s = Array.isArray(o), r = !s && typeof o == "object" && o !== null, a = e.key !== void 0 || e.index !== void 0, c = s && o.length > 0 || r && Object.keys(o).length > 0, d = c && p(M, {
2231
+ `;
2232
+ const numberFormatter = new Intl.NumberFormat('en-US');
2233
+ const compactMaxChilds = 14;
2234
+ const ValueItem = props => {
2235
+ let [_expanded, _setexpanded] = createSignal(props.indent > 0 && props.compact ? false : true);
2236
+ let [_showAllChilds, _setshowAllChilds] = createSignal(!props.compact);
2237
+ return createMemo(() => {
2238
+ const value = props.value;
2239
+ const valueIsArray = Array.isArray(value);
2240
+ const valueIsObject = !valueIsArray && typeof value === 'object' && value !== null;
2241
+ const hasKey = props.key !== undefined || props.index !== undefined;
2242
+ const showExpandButton = valueIsArray && value.length > 0 || valueIsObject && Object.keys(value).length > 0;
2243
+ const toggleExpanded = showExpandButton && createComponent(ButtonElement, {
1357
2244
  onClick: () => {
1358
- n(() => !t());
2245
+ _setexpanded(() => !_expanded());
1359
2246
  },
1360
2247
  get classList() {
1361
2248
  return {
1362
- expanded: t()
2249
+ expanded: _expanded()
1363
2250
  };
1364
2251
  },
1365
- class: "expand-button",
2252
+ "class": "expand-button",
1366
2253
  get children() {
1367
- return p(de, {
2254
+ return createComponent(Icon, {
1368
2255
  name: "caret-down",
1369
2256
  size: 14
1370
2257
  });
1371
2258
  }
1372
2259
  });
1373
- return [a && (() => {
1374
- const g = Sn.cloneNode(!0), f = g.firstChild;
1375
- return g.$$click = (y) => {
1376
- y.shiftKey && ne(JSON.stringify(o));
1377
- }, u(g, s || r ? d : null, f), u(f, () => e.key || e.index), C((y) => {
1378
- const v = `${e.key ? `${e.key}
1379
- ` : ""}Shift + Click to copy value`, x = e.index !== void 0;
1380
- return v !== y._v$ && P(g, "title", y._v$ = v), x !== y._v$2 && g.classList.toggle("index", y._v$2 = x), y;
2260
+ return [hasKey && (() => {
2261
+ const _el$ = _tmpl$$6.cloneNode(true),
2262
+ _el$2 = _el$.firstChild;
2263
+ _el$.$$click = e => {
2264
+ if (e.shiftKey) {
2265
+ copyToClipboard(JSON.stringify(value));
2266
+ }
2267
+ };
2268
+ insert(_el$, valueIsArray || valueIsObject ? toggleExpanded : null, _el$2);
2269
+ insert(_el$2, () => props.key || props.index);
2270
+ createRenderEffect(_p$ => {
2271
+ const _v$ = `${props.key ? `${props.key}\n` : ''}Shift + Click to copy value`,
2272
+ _v$2 = !!(props.index !== undefined);
2273
+ _v$ !== _p$._v$ && setAttribute(_el$, "title", _p$._v$ = _v$);
2274
+ _v$2 !== _p$._v$2 && _el$.classList.toggle("index", _p$._v$2 = _v$2);
2275
+ return _p$;
1381
2276
  }, {
1382
- _v$: void 0,
1383
- _v$2: void 0
1384
- }), g;
1385
- })(), m((() => {
1386
- const g = m(() => !!(a && c && !t()));
1387
- return () => g() ? (() => {
1388
- const f = kn.cloneNode(!0);
1389
- return u(f, () => s ? `[…] ${o.length} items` : `{…} ${Object.keys(o).length} properties`), f;
1390
- })() : (() => s && o.length === 0 ? An.cloneNode(!0) : r && Object.keys(o).length === 0 ? Pn.cloneNode(!0) : s ? [(() => {
1391
- const f = je.cloneNode(!0);
1392
- return oe(f, "click", a ? void 0 : (y) => {
1393
- y.shiftKey && ne(JSON.stringify(o));
1394
- }, !0), P(f, "title", a ? void 0 : "Shift + Click to copy value"), u(f, !a && d, null), u(f, () => t() ? "[" : `[…] ${o.length} items`, null), f;
1395
- })(), m((() => {
1396
- const f = m(() => !!t());
1397
- return () => f() && [(() => {
1398
- const y = Me.cloneNode(!0);
1399
- return u(y, () => {
1400
- let v = o;
1401
- const x = v.length;
1402
- return l() || (v = v.slice(0, K)), [m(() => v.map((w, A) => (() => {
1403
- const k = Re.cloneNode(!0);
1404
- return u(k, p(be, {
1405
- value: w,
1406
- get indent() {
1407
- return e.indent + 1;
1408
- },
1409
- index: A,
1410
- get compact() {
1411
- return e.compact;
1412
- }
1413
- })), k;
1414
- })())), m((() => {
1415
- const w = m(() => !l() && x > K);
1416
- return () => w() && p(M, {
1417
- onClick: () => {
1418
- i(() => !0);
1419
- },
1420
- class: "show-all",
1421
- get children() {
1422
- return ["…show all (+", x - K, ")"];
2277
+ _v$: undefined,
2278
+ _v$2: undefined
2279
+ });
2280
+ return _el$;
2281
+ })(), createMemo((() => {
2282
+ const _c$ = createMemo(() => !!(hasKey && showExpandButton && !_expanded()));
2283
+ return () => _c$() ? (() => {
2284
+ const _el$3 = _tmpl$2$5.cloneNode(true);
2285
+ insert(_el$3, () => valueIsArray ? `[…] ${value.length} items` : `{…} ${Object.keys(value).length} properties`);
2286
+ return _el$3;
2287
+ })() : (() => {
2288
+ if (valueIsArray && value.length === 0) {
2289
+ return _tmpl$3$4.cloneNode(true);
2290
+ }
2291
+ if (valueIsObject && Object.keys(value).length === 0) {
2292
+ return _tmpl$4$4.cloneNode(true);
2293
+ }
2294
+ if (valueIsArray) {
2295
+ return [(() => {
2296
+ const _el$6 = _tmpl$5$2.cloneNode(true);
2297
+ addEventListener(_el$6, "click", !hasKey ? e => {
2298
+ if (e.shiftKey) {
2299
+ copyToClipboard(JSON.stringify(value));
2300
+ }
2301
+ } : undefined, true);
2302
+ setAttribute(_el$6, "title", !hasKey ? 'Shift + Click to copy value' : undefined);
2303
+ insert(_el$6, !hasKey && toggleExpanded, null);
2304
+ insert(_el$6, () => _expanded() ? '[' : `[…] ${value.length} items`, null);
2305
+ return _el$6;
2306
+ })(), createMemo((() => {
2307
+ const _c$2 = createMemo(() => !!_expanded());
2308
+ return () => _c$2() && [(() => {
2309
+ const _el$7 = _tmpl$6$2.cloneNode(true);
2310
+ insert(_el$7, () => {
2311
+ let items = value;
2312
+ const totalSize = items.length;
2313
+ if (!_showAllChilds()) {
2314
+ items = items.slice(0, compactMaxChilds);
1423
2315
  }
2316
+ return [createMemo(() => items.map((item, index) => (() => {
2317
+ const _el$9 = _tmpl$8$1.cloneNode(true);
2318
+ insert(_el$9, createComponent(ValueItem, {
2319
+ value: item,
2320
+ get indent() {
2321
+ return props.indent + 1;
2322
+ },
2323
+ index: index,
2324
+ get compact() {
2325
+ return props.compact;
2326
+ }
2327
+ }));
2328
+ return _el$9;
2329
+ })())), createMemo((() => {
2330
+ const _c$3 = createMemo(() => !!(!_showAllChilds() && totalSize > compactMaxChilds));
2331
+ return () => _c$3() && createComponent(ButtonElement, {
2332
+ onClick: () => {
2333
+ _setshowAllChilds(() => true);
2334
+ },
2335
+ "class": "show-all",
2336
+ get children() {
2337
+ return ["\u2026show all (+", totalSize - compactMaxChilds, ")"];
2338
+ }
2339
+ });
2340
+ })())];
1424
2341
  });
1425
- })())];
1426
- }), y;
1427
- })(), Tn.cloneNode(!0)];
1428
- })())] : r ? [(() => {
1429
- const f = je.cloneNode(!0);
1430
- return oe(f, "click", a ? void 0 : (y) => {
1431
- y.shiftKey && ne(JSON.stringify(o));
1432
- }, !0), P(f, "title", a ? void 0 : "Shift + Click to copy value"), u(f, !a && d, null), u(f, (() => {
1433
- const y = m(() => !!t());
1434
- return () => y() ? "{" : `{…} ${Object.keys(o).length} properties`;
1435
- })(), null), f;
1436
- })(), m((() => {
1437
- const f = m(() => !!t());
1438
- return () => f() && [(() => {
1439
- const y = Me.cloneNode(!0);
1440
- return u(y, () => {
1441
- let v = Object.entries(o);
1442
- const x = v.length;
1443
- return l() || (v = v.slice(0, K)), [m(() => v.map(([w, A]) => (() => {
1444
- const k = Re.cloneNode(!0);
1445
- return u(k, p(be, {
1446
- value: A,
1447
- key: w,
1448
- get indent() {
1449
- return e.indent + 1;
1450
- },
1451
- get compact() {
1452
- return e.compact;
1453
- }
1454
- })), k;
1455
- })())), m((() => {
1456
- const w = m(() => !l() && x > K);
1457
- return () => w() && p(M, {
1458
- onClick: () => {
1459
- i(() => !0);
1460
- },
1461
- class: "show-all",
1462
- get children() {
1463
- return ["…show all (+", x - K, ")"];
2342
+ return _el$7;
2343
+ })(), _tmpl$7$1.cloneNode(true)];
2344
+ })())];
2345
+ }
2346
+ if (valueIsObject) {
2347
+ return [(() => {
2348
+ const _el$10 = _tmpl$5$2.cloneNode(true);
2349
+ addEventListener(_el$10, "click", !hasKey ? e => {
2350
+ if (e.shiftKey) {
2351
+ copyToClipboard(JSON.stringify(value));
2352
+ }
2353
+ } : undefined, true);
2354
+ setAttribute(_el$10, "title", !hasKey ? 'Shift + Click to copy value' : undefined);
2355
+ insert(_el$10, !hasKey && toggleExpanded, null);
2356
+ insert(_el$10, (() => {
2357
+ const _c$4 = createMemo(() => !!_expanded());
2358
+ return () => _c$4() ? '{' : `{…} ${Object.keys(value).length} properties`;
2359
+ })(), null);
2360
+ return _el$10;
2361
+ })(), createMemo((() => {
2362
+ const _c$5 = createMemo(() => !!_expanded());
2363
+ return () => _c$5() && [(() => {
2364
+ const _el$11 = _tmpl$6$2.cloneNode(true);
2365
+ insert(_el$11, () => {
2366
+ let entries = Object.entries(value);
2367
+ const totalSize = entries.length;
2368
+ if (!_showAllChilds()) {
2369
+ entries = entries.slice(0, compactMaxChilds);
1464
2370
  }
2371
+ return [createMemo(() => entries.map(([key, objValue]) => (() => {
2372
+ const _el$13 = _tmpl$8$1.cloneNode(true);
2373
+ insert(_el$13, createComponent(ValueItem, {
2374
+ value: objValue,
2375
+ key: key,
2376
+ get indent() {
2377
+ return props.indent + 1;
2378
+ },
2379
+ get compact() {
2380
+ return props.compact;
2381
+ }
2382
+ }));
2383
+ return _el$13;
2384
+ })())), createMemo((() => {
2385
+ const _c$6 = createMemo(() => !!(!_showAllChilds() && totalSize > compactMaxChilds));
2386
+ return () => _c$6() && createComponent(ButtonElement, {
2387
+ onClick: () => {
2388
+ _setshowAllChilds(() => true);
2389
+ },
2390
+ "class": "show-all",
2391
+ get children() {
2392
+ return ["\u2026show all (+", totalSize - compactMaxChilds, ")"];
2393
+ }
2394
+ });
2395
+ })())];
1465
2396
  });
1466
- })())];
1467
- }), y;
1468
- })(), En.cloneNode(!0)];
1469
- })())] : (() => {
1470
- const f = Ln.cloneNode(!0);
1471
- return f.$$click = (y) => {
1472
- y.shiftKey && ne(String(o));
1473
- }, P(f, "data-type", typeof o), u(f, typeof o == "string" && De.cloneNode(!0), null), u(f, () => typeof o == "number" ? Mn.format(o) : String(o), null), u(f, typeof o == "string" && De.cloneNode(!0), null), f;
1474
- })())();
2397
+ return _el$11;
2398
+ })(), _tmpl$9$1.cloneNode(true)];
2399
+ })())];
2400
+ }
2401
+ return (() => {
2402
+ const _el$14 = _tmpl$10.cloneNode(true);
2403
+ _el$14.$$click = e => {
2404
+ if (e.shiftKey) {
2405
+ copyToClipboard(String(value));
2406
+ }
2407
+ };
2408
+ setAttribute(_el$14, "data-type", typeof value);
2409
+ insert(_el$14, typeof value === 'string' && _tmpl$11.cloneNode(true), null);
2410
+ insert(_el$14, () => typeof value === 'number' ? numberFormatter.format(value) : String(value), null);
2411
+ insert(_el$14, typeof value === 'string' && _tmpl$11.cloneNode(true), null);
2412
+ return _el$14;
2413
+ })();
2414
+ })();
1475
2415
  })())];
1476
2416
  });
1477
- }, R = (e) => (() => {
1478
- const t = On.cloneNode(!0);
1479
- return b(t, jn), u(t, p(be, {
1480
- get value() {
1481
- return e.value;
1482
- },
1483
- indent: 0,
1484
- get compact() {
1485
- return !!e.compact;
1486
- }
1487
- })), t;
1488
- })();
1489
- async function ne(e) {
1490
- await navigator.clipboard.writeText(e), alert("Copied to clipboard");
2417
+ };
2418
+ const ValueVisualizer = props => {
2419
+ return (() => {
2420
+ const _el$17 = _tmpl$12.cloneNode(true);
2421
+ className(_el$17, containerStyle$6);
2422
+ insert(_el$17, createComponent(ValueItem, {
2423
+ get value() {
2424
+ return props.value;
2425
+ },
2426
+ indent: 0,
2427
+ get compact() {
2428
+ return !!props.compact;
2429
+ }
2430
+ }));
2431
+ return _el$17;
2432
+ })();
2433
+ };
2434
+ async function copyToClipboard(text) {
2435
+ await navigator.clipboard.writeText(text);
2436
+ alert('Copied to clipboard');
1491
2437
  }
1492
- ce(["click"]);
1493
- let Rn = 0;
1494
- function Dn() {
1495
- return Rn++;
2438
+ delegateEvents(["click"]);
2439
+
2440
+ let id = 0;
2441
+ function autoIncrementId() {
2442
+ return id++;
1496
2443
  }
1497
- const In = /* @__PURE__ */ $("<label></label>"), zn = /* @__PURE__ */ $('<div><div class="inputContainer"><select></select></div></div>'), Fn = /* @__PURE__ */ $('<option value="">-- select an option --</option>'), Bn = /* @__PURE__ */ $("<option></option>"), Hn = _`
2444
+
2445
+ const _tmpl$$5 = /*#__PURE__*/template(`<label></label>`),
2446
+ _tmpl$2$4 = /*#__PURE__*/template(`<div><div class="inputContainer"><select></select></div></div>`),
2447
+ _tmpl$3$3 = /*#__PURE__*/template(`<option value="">-- select an option --</option>`),
2448
+ _tmpl$4$3 = /*#__PURE__*/template(`<option></option>`);
2449
+ const containerStyle$5 = u`
1498
2450
  &&& {
1499
- ${N({
1500
- align: "left"
2451
+ ${stack({
2452
+ align: 'left'
1501
2453
  })};
1502
2454
  width: 100%;
1503
2455
  position: relative;
1504
2456
 
1505
2457
  label {
1506
- color: ${h.primary.var};
2458
+ color: ${colors.primary.var};
1507
2459
  z-index: 1;
1508
2460
  font-size: 13px;
1509
2461
  letter-spacing: 0.08em;
@@ -1511,14 +2463,14 @@ const In = /* @__PURE__ */ $("<label></label>"), zn = /* @__PURE__ */ $('<div><d
1511
2463
  }
1512
2464
 
1513
2465
  .inputContainer {
1514
- background: ${h.white.alpha(0.05)};
2466
+ background: ${colors.white.alpha(0.05)};
1515
2467
  border-radius: 4px;
1516
2468
  margin-top: 0px;
1517
2469
  position: relative;
1518
2470
  width: 100%;
1519
2471
  overflow: hidden;
1520
- ${N({
1521
- align: "left"
2472
+ ${stack({
2473
+ align: 'left'
1522
2474
  })};
1523
2475
  }
1524
2476
 
@@ -1530,7 +2482,7 @@ const In = /* @__PURE__ */ $("<label></label>"), zn = /* @__PURE__ */ $('<div><d
1530
2482
  padding-left: 10px;
1531
2483
  font-size: 14px;
1532
2484
  background: transparent;
1533
- color: ${h.white.var};
2485
+ color: ${colors.white.var};
1534
2486
 
1535
2487
  &:focus {
1536
2488
  outline: 0;
@@ -1546,76 +2498,114 @@ const In = /* @__PURE__ */ $("<label></label>"), zn = /* @__PURE__ */ $('<div><d
1546
2498
  left: 0;
1547
2499
  right: 8px;
1548
2500
  height: 17px;
1549
- background: ${h.white.var};
2501
+ background: ${colors.white.var};
1550
2502
  }
1551
2503
  }
1552
- `, Vn = (e) => {
1553
- const t = `input${Dn()}`;
2504
+ `;
2505
+ const Select = props => {
2506
+ const inputId = `input${autoIncrementId()}`;
1554
2507
  return (() => {
1555
- const n = zn.cloneNode(!0), l = n.firstChild, i = l.firstChild;
1556
- return u(n, p(ae, {
2508
+ const _el$ = _tmpl$2$4.cloneNode(true),
2509
+ _el$3 = _el$.firstChild,
2510
+ _el$4 = _el$3.firstChild;
2511
+ insert(_el$, createComponent(Show, {
1557
2512
  get when() {
1558
- return e.label;
2513
+ return props.label;
1559
2514
  },
1560
2515
  get children() {
1561
- const o = In.cloneNode(!0);
1562
- return P(o, "for", t), u(o, () => e.label), o;
2516
+ const _el$2 = _tmpl$$5.cloneNode(true);
2517
+ setAttribute(_el$2, "for", inputId);
2518
+ insert(_el$2, () => props.label);
2519
+ return _el$2;
1563
2520
  }
1564
- }), l), i.addEventListener("change", (o) => {
1565
- o.currentTarget.value && e.onChange(o.currentTarget.value);
1566
- }), P(i, "id", t), u(i, (() => {
1567
- const o = m(() => !e.value);
1568
- return () => o() && Fn.cloneNode(!0);
1569
- })(), null), u(i, p(F, {
2521
+ }), _el$3);
2522
+ _el$4.addEventListener("change", e => {
2523
+ if (e.currentTarget.value) {
2524
+ props.onChange(e.currentTarget.value);
2525
+ }
2526
+ });
2527
+ setAttribute(_el$4, "id", inputId);
2528
+ insert(_el$4, (() => {
2529
+ const _c$ = createMemo(() => !!!props.value);
2530
+ return () => _c$() && _tmpl$3$3.cloneNode(true);
2531
+ })(), null);
2532
+ insert(_el$4, createComponent(For, {
1570
2533
  get each() {
1571
- return e.options;
2534
+ return props.options;
1572
2535
  },
1573
- children: (o) => (() => {
1574
- const s = Bn.cloneNode(!0);
1575
- return u(s, () => o.label), C(() => s.value = o.value), s;
2536
+ children: option => (() => {
2537
+ const _el$6 = _tmpl$4$3.cloneNode(true);
2538
+ insert(_el$6, () => option.label);
2539
+ createRenderEffect(() => _el$6.value = option.value);
2540
+ return _el$6;
1576
2541
  })()
1577
- }), null), C(() => b(n, nt(Hn, e.class))), C(() => i.value = e.value ?? ""), n;
2542
+ }), null);
2543
+ createRenderEffect(() => className(_el$, cx(containerStyle$5, props.class)));
2544
+ createRenderEffect(() => _el$4.value = props.value ?? '');
2545
+ return _el$;
1578
2546
  })();
1579
2547
  };
1580
- function rt(e) {
1581
- const t = e.alias || e.payload || e.searchParams;
1582
- return !t || Object.keys(t).length === 0 ? "" : typeof t == "string" || typeof t == "number" ? String(t) : JSON.stringify(t);
1583
- }
1584
- function Ie(e, t) {
1585
- return Ue(e, t) ? "no changes" : pt.diffJson(
1586
- typeof e == "object" && e !== null ? e : String(e),
1587
- typeof t == "object" && t !== null ? t : String(t)
2548
+
2549
+ function getRequestPayload(request) {
2550
+ const payload = request.alias || request.payload || request.searchParams;
2551
+ if (!payload || Object.keys(payload).length === 0) {
2552
+ return '';
2553
+ }
2554
+ if (typeof payload === 'string' || typeof payload === 'number') {
2555
+ return String(payload);
2556
+ }
2557
+ return JSON.stringify(payload);
2558
+ }
2559
+
2560
+ function getDiff(from, to) {
2561
+ if (dequal(from, to)) {
2562
+ return "no changes";
2563
+ }
2564
+ const diffs = diff.diffJson(
2565
+ typeof from === "object" && from !== null ? from : String(from),
2566
+ typeof to === "object" && to !== null ? to : String(to)
1588
2567
  );
2568
+ return diffs;
1589
2569
  }
1590
- function Zn(e, t) {
1591
- return e.length > t ? `${e.slice(0, t)}...` : e;
2570
+
2571
+ function truncateText(text, max) {
2572
+ if (text.length > max) {
2573
+ return `${text.slice(0, max)}...`;
2574
+ }
2575
+ return text;
1592
2576
  }
1593
- const Kn = /* @__PURE__ */ $('<div class="changes-count"><span class="additions">+ <b></b> lines</span> | <span class="removals">- <b></b> lines</span></div>'), he = /* @__PURE__ */ $("<div></div>"), ze = /* @__PURE__ */ $("<div>No changes</div>"), Fe = /* @__PURE__ */ $('<div class="line"></div>'), Un = _`
2577
+
2578
+ const _tmpl$$4 = /*#__PURE__*/template(`<div class="changes-count"><span class="additions">+ <b></b> lines</span> | <span class="removals">- <b></b> lines</span></div>`),
2579
+ _tmpl$2$3 = /*#__PURE__*/template(`<div></div>`),
2580
+ _tmpl$3$2 = /*#__PURE__*/template(`<div>No changes</div>`),
2581
+ _tmpl$4$2 = /*#__PURE__*/template(`<div class="line"></div>`);
2582
+ const containerStyle$4 = u`
1594
2583
  &&& {
1595
- ${N({
2584
+ ${stack({
1596
2585
  gap: 14
1597
2586
  })};
1598
2587
 
1599
2588
  .changes-count {
1600
- color: ${h.white.alpha(0.5)};
2589
+ color: ${colors.white.alpha(0.5)};
1601
2590
  font-size: 14px;
1602
2591
 
1603
2592
  .additions {
1604
- color: ${h.success.var};
2593
+ color: ${colors.success.var};
1605
2594
  }
1606
2595
 
1607
2596
  .removals {
1608
- color: ${h.error.var};
2597
+ color: ${colors.error.var};
1609
2598
  }
1610
2599
  }
1611
2600
  }
1612
- `, Be = _`
2601
+ `;
2602
+ const diffContainerStyle = u`
1613
2603
  &&& {
1614
- ${N({
2604
+ ${stack({
1615
2605
  gap: 0
1616
2606
  })};
1617
2607
  font-size: 14px;
1618
- font-family: ${L.decorative};
2608
+ font-family: ${fonts.decorative};
1619
2609
  white-space: pre;
1620
2610
  overflow-x: auto;
1621
2611
 
@@ -1625,8 +2615,8 @@ const Kn = /* @__PURE__ */ $('<div class="changes-count"><span class="additions"
1625
2615
 
1626
2616
  &.added {
1627
2617
  opacity: 1;
1628
- color: ${h.success.var};
1629
- background: ${h.success.alpha(0.1)};
2618
+ color: ${colors.success.var};
2619
+ background: ${colors.success.alpha(0.1)};
1630
2620
 
1631
2621
  &::before {
1632
2622
  content: '+';
@@ -1637,8 +2627,8 @@ const Kn = /* @__PURE__ */ $('<div class="changes-count"><span class="additions"
1637
2627
 
1638
2628
  &.removed {
1639
2629
  opacity: 1;
1640
- color: ${h.error.var};
1641
- background: ${h.error.alpha(0.1)};
2630
+ color: ${colors.error.var};
2631
+ background: ${colors.error.alpha(0.1)};
1642
2632
 
1643
2633
  &::before {
1644
2634
  content: '-';
@@ -1648,153 +2638,209 @@ const Kn = /* @__PURE__ */ $('<div class="changes-count"><span class="additions"
1648
2638
  }
1649
2639
  }
1650
2640
  }
1651
- `, Wn = () => {
1652
- const e = m(() => {
2641
+ `;
2642
+ const Diff = () => {
2643
+ const currentCall = createMemo(() => {
1653
2644
  const {
1654
- selectedCall: r
1655
- } = S;
1656
- return r ? H.calls[r] : Object.values(H.calls).at(-1);
1657
- }), t = et(() => {
1658
- const r = e();
1659
- return r ? tt(r.requests).map((a) => ({
1660
- value: a.id,
1661
- label: `${Q(a.startTime).format("HH:mm:ss")} | ${Zn(rt(a), 50)}`
1662
- })).filter((a) => a.value !== S.selectedRequest) : [];
1663
- }, "value"), n = we(null), l = m(() => S.selectedRequest ? e()?.requests.find((r) => r.id === S.selectedRequest) : null), i = m(() => n.value ? e()?.requests.find((r) => r.id === n.value) : null), o = m(() => {
1664
- if (!n.value || !S.selectedRequest)
1665
- return [];
1666
- const r = l()?.response, a = i()?.response, c = Ie(a, r);
1667
- return c === "no changes" ? [] : c;
1668
- }), s = m(() => {
1669
- if (!n.value || !S.selectedRequest)
1670
- return [];
1671
- const r = He(l()), a = He(i()), c = Ie(a, r);
1672
- return c === "no changes" ? [] : c;
2645
+ selectedCall
2646
+ } = uiStore;
2647
+ if (!selectedCall) return Object.values(callsStore.calls).at(-1);
2648
+ return callsStore.calls[selectedCall];
2649
+ });
2650
+ const requestOptions = createReconciledArray(() => {
2651
+ const call = currentCall();
2652
+ if (!call) return [];
2653
+ return reverseCopy(call.requests).map(request => {
2654
+ return {
2655
+ value: request.id,
2656
+ label: `${dayjs(request.startTime).format('HH:mm:ss')} | ${truncateText(getRequestPayload(request), 50)}`
2657
+ };
2658
+ }).filter(request => request.value !== uiStore.selectedRequest);
2659
+ }, 'value');
2660
+ const compareRequest = createSignalRef(null);
2661
+ const activeRequest = createMemo(() => {
2662
+ if (!uiStore.selectedRequest) return null;
2663
+ return currentCall()?.requests.find(request => request.id === uiStore.selectedRequest);
2664
+ });
2665
+ const compareFromRequest = createMemo(() => {
2666
+ if (!compareRequest.value) return null;
2667
+ return currentCall()?.requests.find(request => request.id === compareRequest.value);
2668
+ });
2669
+ const responseDiff = createMemo(() => {
2670
+ if (!compareRequest.value || !uiStore.selectedRequest) return [];
2671
+ const activeResponse = activeRequest()?.response;
2672
+ const compareFromResponse = compareFromRequest()?.response;
2673
+ const diffParts = getDiff(compareFromResponse, activeResponse);
2674
+ return diffParts === 'no changes' ? [] : diffParts;
2675
+ });
2676
+ const payloadDiff = createMemo(() => {
2677
+ if (!compareRequest.value || !uiStore.selectedRequest) return [];
2678
+ const activePayload = getPayload(activeRequest());
2679
+ const compareFromPayload = getPayload(compareFromRequest());
2680
+ const diffParts = getDiff(compareFromPayload, activePayload);
2681
+ return diffParts === 'no changes' ? [] : diffParts;
1673
2682
  });
1674
2683
  return (() => {
1675
- const r = he.cloneNode(!0);
1676
- return b(r, Un), u(r, p(Vn, {
2684
+ const _el$ = _tmpl$2$3.cloneNode(true);
2685
+ className(_el$, containerStyle$4);
2686
+ insert(_el$, createComponent(Select, {
1677
2687
  get value() {
1678
- return n.value;
2688
+ return compareRequest.value;
1679
2689
  },
1680
2690
  label: "Select a request to compare with",
1681
2691
  get options() {
1682
- return t();
2692
+ return requestOptions();
1683
2693
  },
1684
- onChange: (a) => {
1685
- n.value = a;
2694
+ onChange: value => {
2695
+ compareRequest.value = value;
1686
2696
  }
1687
- }), null), u(r, p(ae, {
2697
+ }), null);
2698
+ insert(_el$, createComponent(Show, {
1688
2699
  get when() {
1689
- return n.value;
2700
+ return compareRequest.value;
1690
2701
  },
1691
2702
  get children() {
1692
2703
  return [(() => {
1693
- const a = Kn.cloneNode(!0), c = a.firstChild, d = c.firstChild, g = d.nextSibling, f = c.nextSibling, y = f.nextSibling, v = y.firstChild, x = v.nextSibling;
1694
- return u(g, () => o().filter((w) => w.added).length), u(x, () => o().filter((w) => w.removed).length), a;
1695
- })(), p(E, {
2704
+ const _el$2 = _tmpl$$4.cloneNode(true),
2705
+ _el$3 = _el$2.firstChild,
2706
+ _el$4 = _el$3.firstChild,
2707
+ _el$5 = _el$4.nextSibling,
2708
+ _el$6 = _el$3.nextSibling,
2709
+ _el$9 = _el$6.nextSibling,
2710
+ _el$10 = _el$9.firstChild,
2711
+ _el$11 = _el$10.nextSibling;
2712
+ insert(_el$5, () => responseDiff().filter(item => item.added).length);
2713
+ insert(_el$11, () => responseDiff().filter(item => item.removed).length);
2714
+ return _el$2;
2715
+ })(), createComponent(Section, {
1696
2716
  get title() {
1697
- return m(() => !!l()?.payload)() ? "Payload Diff" : l()?.searchParams ? "Search Params Diff" : "Path Params Diff";
2717
+ return createMemo(() => !!activeRequest()?.payload)() ? 'Payload Diff' : activeRequest()?.searchParams ? 'Search Params Diff' : 'Path Params Diff';
1698
2718
  },
1699
2719
  get children() {
1700
- const a = he.cloneNode(!0);
1701
- return b(a, Be), u(a, p(F, {
2720
+ const _el$12 = _tmpl$2$3.cloneNode(true);
2721
+ className(_el$12, diffContainerStyle);
2722
+ insert(_el$12, createComponent(For, {
1702
2723
  get each() {
1703
- return s();
2724
+ return payloadDiff();
1704
2725
  },
1705
2726
  get fallback() {
1706
- return ze.cloneNode(!0);
2727
+ return _tmpl$3$2.cloneNode(true);
1707
2728
  },
1708
- children: (c) => (() => {
1709
- const d = Fe.cloneNode(!0);
1710
- return u(d, () => c.value), C((g) => {
1711
- const f = !!c.added, y = !!c.removed;
1712
- return f !== g._v$ && d.classList.toggle("added", g._v$ = f), y !== g._v$2 && d.classList.toggle("removed", g._v$2 = y), g;
2729
+ children: item => (() => {
2730
+ const _el$15 = _tmpl$4$2.cloneNode(true);
2731
+ insert(_el$15, () => item.value);
2732
+ createRenderEffect(_p$ => {
2733
+ const _v$ = !!item.added,
2734
+ _v$2 = !!item.removed;
2735
+ _v$ !== _p$._v$ && _el$15.classList.toggle("added", _p$._v$ = _v$);
2736
+ _v$2 !== _p$._v$2 && _el$15.classList.toggle("removed", _p$._v$2 = _v$2);
2737
+ return _p$;
1713
2738
  }, {
1714
- _v$: void 0,
1715
- _v$2: void 0
1716
- }), d;
2739
+ _v$: undefined,
2740
+ _v$2: undefined
2741
+ });
2742
+ return _el$15;
1717
2743
  })()
1718
- })), a;
2744
+ }));
2745
+ return _el$12;
1719
2746
  }
1720
- }), p(E, {
1721
- title: "Response Diff",
2747
+ }), createComponent(Section, {
2748
+ title: 'Response Diff',
1722
2749
  get children() {
1723
- const a = he.cloneNode(!0);
1724
- return b(a, Be), u(a, p(F, {
2750
+ const _el$13 = _tmpl$2$3.cloneNode(true);
2751
+ className(_el$13, diffContainerStyle);
2752
+ insert(_el$13, createComponent(For, {
1725
2753
  get each() {
1726
- return o();
2754
+ return responseDiff();
1727
2755
  },
1728
2756
  get fallback() {
1729
- return ze.cloneNode(!0);
2757
+ return _tmpl$3$2.cloneNode(true);
1730
2758
  },
1731
- children: (c) => (() => {
1732
- const d = Fe.cloneNode(!0);
1733
- return u(d, () => c.value), C((g) => {
1734
- const f = !!c.added, y = !!c.removed;
1735
- return f !== g._v$3 && d.classList.toggle("added", g._v$3 = f), y !== g._v$4 && d.classList.toggle("removed", g._v$4 = y), g;
2759
+ children: item => (() => {
2760
+ const _el$17 = _tmpl$4$2.cloneNode(true);
2761
+ insert(_el$17, () => item.value);
2762
+ createRenderEffect(_p$ => {
2763
+ const _v$3 = !!item.added,
2764
+ _v$4 = !!item.removed;
2765
+ _v$3 !== _p$._v$3 && _el$17.classList.toggle("added", _p$._v$3 = _v$3);
2766
+ _v$4 !== _p$._v$4 && _el$17.classList.toggle("removed", _p$._v$4 = _v$4);
2767
+ return _p$;
1736
2768
  }, {
1737
- _v$3: void 0,
1738
- _v$4: void 0
1739
- }), d;
2769
+ _v$3: undefined,
2770
+ _v$4: undefined
2771
+ });
2772
+ return _el$17;
1740
2773
  })()
1741
- })), a;
2774
+ }));
2775
+ return _el$13;
1742
2776
  }
1743
2777
  })];
1744
2778
  }
1745
- }), null), r;
2779
+ }), null);
2780
+ return _el$;
1746
2781
  })();
1747
2782
  };
1748
- function He(e) {
1749
- return e ? e.payload || e.searchParams || e.pathParams : null;
1750
- }
1751
- const Ve = /* @__PURE__ */ $("<div></div>"), Jn = /* @__PURE__ */ $("<h1></h1>"), Xn = /* @__PURE__ */ $('<div class="tags"></div>'), Gn = /* @__PURE__ */ $('<div class="details"></div>'), Yn = /* @__PURE__ */ $("<h2></h2>"), Qn = /* @__PURE__ */ $('<div class="method"></div>'), qn = /* @__PURE__ */ $('<div class="code"></div>'), er = /* @__PURE__ */ $('<div class="tag error">Has Error</div>'), tr = /* @__PURE__ */ $('<div class="tag"></div>'), nr = _`
2783
+ function getPayload(request) {
2784
+ if (!request) return null;
2785
+ return request.payload || request.searchParams || request.pathParams;
2786
+ }
2787
+
2788
+ const _tmpl$$3 = /*#__PURE__*/template(`<div></div>`),
2789
+ _tmpl$2$2 = /*#__PURE__*/template(`<h1></h1>`),
2790
+ _tmpl$3$1 = /*#__PURE__*/template(`<div class="tags"></div>`),
2791
+ _tmpl$4$1 = /*#__PURE__*/template(`<div class="details"></div>`),
2792
+ _tmpl$5$1 = /*#__PURE__*/template(`<h2></h2>`),
2793
+ _tmpl$6$1 = /*#__PURE__*/template(`<div class="method"></div>`),
2794
+ _tmpl$7 = /*#__PURE__*/template(`<div class="code"></div>`),
2795
+ _tmpl$8 = /*#__PURE__*/template(`<div class="tag error">Has Error</div>`),
2796
+ _tmpl$9 = /*#__PURE__*/template(`<div class="tag"></div>`);
2797
+ const containerStyle$3 = u`
1752
2798
  &&& {
1753
- ${N()};
2799
+ ${stack()};
1754
2800
  padding-left: 10px;
1755
2801
 
1756
2802
  > h1 {
1757
2803
  margin-top: 12px;
1758
- font-family: ${L.decorative};
1759
- ${ue};
2804
+ font-family: ${fonts.decorative};
2805
+ ${ellipsis};
1760
2806
  }
1761
2807
 
1762
2808
  > h2 {
1763
2809
  margin-top: 4px;
1764
- font-family: ${L.decorative};
2810
+ font-family: ${fonts.decorative};
1765
2811
  font-size: 12px;
1766
2812
  opacity: 0.5;
1767
2813
  }
1768
2814
 
1769
2815
  .tags {
1770
- ${B({
2816
+ ${inline({
1771
2817
  gap: 8
1772
2818
  })};
1773
2819
  margin-top: 8px;
1774
2820
 
1775
2821
  .method {
1776
- color: ${h.primary.var};
2822
+ color: ${colors.primary.var};
1777
2823
  }
1778
2824
 
1779
2825
  .code {
1780
- color: ${h.success.var};
2826
+ color: ${colors.success.var};
1781
2827
 
1782
2828
  &.error {
1783
- color: ${h.error.var};
2829
+ color: ${colors.error.var};
1784
2830
  }
1785
2831
  }
1786
2832
 
1787
2833
  .tag {
1788
2834
  font-size: 11px;
1789
- color: ${h.warning.var};
2835
+ color: ${colors.warning.var};
1790
2836
  padding: 1px 3px;
1791
2837
  border-radius: 4px;
1792
- border: 1px solid ${h.warning.alpha(0.6)};
2838
+ border: 1px solid ${colors.warning.alpha(0.6)};
1793
2839
 
1794
2840
  &.error {
1795
- color: ${h.error.var};
2841
+ color: ${colors.error.var};
1796
2842
  font-weight: 600;
1797
- border-color: ${h.error.alpha(0.6)};
2843
+ border-color: ${colors.error.alpha(0.6)};
1798
2844
  }
1799
2845
  }
1800
2846
  }
@@ -1802,7 +2848,7 @@ const Ve = /* @__PURE__ */ $("<div></div>"), Jn = /* @__PURE__ */ $("<h1></h1>")
1802
2848
  > .details {
1803
2849
  margin-top: 14px;
1804
2850
  padding-right: 10px;
1805
- ${N({
2851
+ ${stack({
1806
2852
  gap: 8
1807
2853
  })};
1808
2854
  flex: 1 1;
@@ -1810,12 +2856,13 @@ const Ve = /* @__PURE__ */ $("<div></div>"), Jn = /* @__PURE__ */ $("<h1></h1>")
1810
2856
  padding-bottom: 20px;
1811
2857
  }
1812
2858
  }
1813
- `, rr = _`
2859
+ `;
2860
+ const tabsStyle = u`
1814
2861
  &&& {
1815
- ${B({
2862
+ ${inline({
1816
2863
  gap: 20
1817
2864
  })};
1818
- color: ${h.secondary.var};
2865
+ color: ${colors.secondary.var};
1819
2866
  margin-top: 20px;
1820
2867
 
1821
2868
  > button {
@@ -1832,248 +2879,289 @@ const Ve = /* @__PURE__ */ $("<div></div>"), Jn = /* @__PURE__ */ $("<h1></h1>")
1832
2879
  }
1833
2880
  }
1834
2881
  }
1835
- `, or = () => {
1836
- const e = m(() => S.selectedCall), t = m(() => S.selectedRequest), n = m(() => S.selectedTab || "summary"), l = m(() => {
1837
- let o;
1838
- e() ? o = H.calls[e()] : o = Object.values(H.calls).at(-1);
1839
- const s = t() && o?.requests.find((r) => r.id === t()) || o?.requests.at(-1);
1840
- return s && o ? {
1841
- ...s,
1842
- callName: o.name,
1843
- callPath: o.path
1844
- } : null;
2882
+ `;
2883
+ const RequestDetails = () => {
2884
+ const _selectedCallId = createMemo(() => uiStore.selectedCall);
2885
+ const _selectedRequestId = createMemo(() => uiStore.selectedRequest);
2886
+ const _selectedTab = createMemo(() => uiStore.selectedTab || 'summary');
2887
+ const selectedRequest = createMemo(() => {
2888
+ let selectedCall;
2889
+ if (_selectedCallId()) {
2890
+ selectedCall = callsStore.calls[_selectedCallId()];
2891
+ } else {
2892
+ selectedCall = Object.values(callsStore.calls).at(-1);
2893
+ }
2894
+ const selectedRequest = _selectedRequestId() && selectedCall?.requests.find(request => request.id === _selectedRequestId()) || selectedCall?.requests.at(-1);
2895
+ if (selectedRequest && selectedCall) {
2896
+ return {
2897
+ ...selectedRequest,
2898
+ callName: selectedCall.name,
2899
+ callPath: selectedCall.path
2900
+ };
2901
+ }
2902
+ return null;
1845
2903
  });
1846
- function i(o, s) {
1847
- return p(M, {
2904
+ function getTab(tabId, label) {
2905
+ return createComponent(ButtonElement, {
1848
2906
  get classList() {
1849
2907
  return {
1850
- selected: n() === o
2908
+ selected: _selectedTab() === tabId
1851
2909
  };
1852
2910
  },
1853
2911
  onClick: () => {
1854
- se("selectedTab", o);
2912
+ setUiStore('selectedTab', tabId);
1855
2913
  },
1856
- children: s
2914
+ children: label
1857
2915
  });
1858
2916
  }
1859
2917
  return (() => {
1860
- const o = Ve.cloneNode(!0);
1861
- return b(o, nr), u(o, p(ae, {
2918
+ const _el$ = _tmpl$$3.cloneNode(true);
2919
+ className(_el$, containerStyle$3);
2920
+ insert(_el$, createComponent(Show, {
1862
2921
  get when() {
1863
- return l();
2922
+ return selectedRequest();
1864
2923
  },
1865
- keyed: !0,
1866
- children: (s) => [(() => {
1867
- const r = Jn.cloneNode(!0);
1868
- return u(r, () => s.callName, null), u(r, () => s.alias && ` | ${s.alias}`, null), r;
1869
- })(), m((() => {
1870
- const r = m(() => s.callPath !== s.callName);
1871
- return () => r() && (() => {
1872
- const a = Yn.cloneNode(!0);
1873
- return u(a, () => s.callPath), a;
2924
+ keyed: true,
2925
+ children: request => [(() => {
2926
+ const _el$2 = _tmpl$2$2.cloneNode(true);
2927
+ insert(_el$2, () => request.callName, null);
2928
+ insert(_el$2, () => request.alias && ` | ${request.alias}`, null);
2929
+ return _el$2;
2930
+ })(), createMemo((() => {
2931
+ const _c$ = createMemo(() => request.callPath !== request.callName);
2932
+ return () => _c$() && (() => {
2933
+ const _el$6 = _tmpl$5$1.cloneNode(true);
2934
+ insert(_el$6, () => request.callPath);
2935
+ return _el$6;
1874
2936
  })();
1875
2937
  })()), (() => {
1876
- const r = Xn.cloneNode(!0);
1877
- return u(r, (() => {
1878
- const a = m(() => !!s.method);
1879
- return () => a() && (() => {
1880
- const c = Qn.cloneNode(!0);
1881
- return u(c, () => s.method), c;
2938
+ const _el$3 = _tmpl$3$1.cloneNode(true);
2939
+ insert(_el$3, (() => {
2940
+ const _c$2 = createMemo(() => !!request.method);
2941
+ return () => _c$2() && (() => {
2942
+ const _el$7 = _tmpl$6$1.cloneNode(true);
2943
+ insert(_el$7, () => request.method);
2944
+ return _el$7;
1882
2945
  })();
1883
- })(), null), u(r, (() => {
1884
- const a = m(() => !!s.code);
1885
- return () => a() && (() => {
1886
- const c = qn.cloneNode(!0);
1887
- return u(c, () => s.code), C(() => c.classList.toggle("error", s.code >= 400)), c;
2946
+ })(), null);
2947
+ insert(_el$3, (() => {
2948
+ const _c$3 = createMemo(() => !!request.code);
2949
+ return () => _c$3() && (() => {
2950
+ const _el$8 = _tmpl$7.cloneNode(true);
2951
+ insert(_el$8, () => request.code);
2952
+ createRenderEffect(() => _el$8.classList.toggle("error", !!(request.code >= 400)));
2953
+ return _el$8;
1888
2954
  })();
1889
- })(), null), u(r, (() => {
1890
- const a = m(() => !!s.isError);
1891
- return () => a() && er.cloneNode(!0);
1892
- })(), null), u(r, p(F, {
2955
+ })(), null);
2956
+ insert(_el$3, (() => {
2957
+ const _c$4 = createMemo(() => !!request.isError);
2958
+ return () => _c$4() && _tmpl$8.cloneNode(true);
2959
+ })(), null);
2960
+ insert(_el$3, createComponent(For, {
1893
2961
  get each() {
1894
- return s.tags;
2962
+ return request.tags;
1895
2963
  },
1896
- children: (a) => (() => {
1897
- const c = tr.cloneNode(!0);
1898
- return u(c, a), c;
2964
+ children: tag => (() => {
2965
+ const _el$10 = _tmpl$9.cloneNode(true);
2966
+ insert(_el$10, tag);
2967
+ return _el$10;
1899
2968
  })()
1900
- }), null), r;
2969
+ }), null);
2970
+ return _el$3;
1901
2971
  })(), (() => {
1902
- const r = Ve.cloneNode(!0);
1903
- return b(r, rr), u(r, () => i("summary", "Summary"), null), u(r, (() => {
1904
- const a = m(() => !!s.payload);
1905
- return () => a() && i("payload", "Payload");
1906
- })(), null), u(r, (() => {
1907
- const a = m(() => !!s.searchParams);
1908
- return () => a() && i("urlParams", "URL Params");
1909
- })(), null), u(r, () => i("response", "Response"), null), u(r, () => i("diff", "Diff"), null), r;
2972
+ const _el$4 = _tmpl$$3.cloneNode(true);
2973
+ className(_el$4, tabsStyle);
2974
+ insert(_el$4, () => getTab('summary', 'Summary'), null);
2975
+ insert(_el$4, (() => {
2976
+ const _c$5 = createMemo(() => !!!!request.payload);
2977
+ return () => _c$5() && getTab('payload', 'Payload');
2978
+ })(), null);
2979
+ insert(_el$4, (() => {
2980
+ const _c$6 = createMemo(() => !!!!request.searchParams);
2981
+ return () => _c$6() && getTab('urlParams', 'URL Params');
2982
+ })(), null);
2983
+ insert(_el$4, () => getTab('response', 'Response'), null);
2984
+ insert(_el$4, () => getTab('diff', 'Diff'), null);
2985
+ return _el$4;
1910
2986
  })(), (() => {
1911
- const r = Gn.cloneNode(!0);
1912
- return u(r, p(dt, {
2987
+ const _el$5 = _tmpl$4$1.cloneNode(true);
2988
+ insert(_el$5, createComponent(Switch, {
1913
2989
  get children() {
1914
- return [p(G, {
2990
+ return [createComponent(Match, {
1915
2991
  get when() {
1916
- return n() === "summary";
2992
+ return _selectedTab() === 'summary';
1917
2993
  },
1918
2994
  get children() {
1919
- return [m(() => m(() => !!s.payload)() && p(E, {
2995
+ return [createMemo(() => createMemo(() => !!!!request.payload)() && createComponent(Section, {
1920
2996
  title: "Payload",
1921
2997
  get children() {
1922
- return p(R, {
2998
+ return createComponent(ValueVisualizer, {
1923
2999
  get value() {
1924
- return s.payload;
3000
+ return request.payload;
1925
3001
  },
1926
- compact: !0
3002
+ compact: true
1927
3003
  });
1928
3004
  }
1929
- })), m(() => m(() => !!s.searchParams)() && p(E, {
3005
+ })), createMemo(() => createMemo(() => !!!!request.searchParams)() && createComponent(Section, {
1930
3006
  title: "URL Params",
1931
3007
  get children() {
1932
- return p(R, {
3008
+ return createComponent(ValueVisualizer, {
1933
3009
  get value() {
1934
- return s.searchParams;
3010
+ return request.searchParams;
1935
3011
  },
1936
- compact: !0
3012
+ compact: true
1937
3013
  });
1938
3014
  }
1939
- })), m(() => m(() => !!s.response)() && p(E, {
3015
+ })), createMemo(() => createMemo(() => !!!!request.response)() && createComponent(Section, {
1940
3016
  title: "Response",
1941
3017
  get children() {
1942
- return p(R, {
3018
+ return createComponent(ValueVisualizer, {
1943
3019
  get value() {
1944
- return s.response;
3020
+ return request.response;
1945
3021
  },
1946
- compact: !0
3022
+ compact: true
1947
3023
  });
1948
3024
  }
1949
- })), p(E, {
3025
+ })), createComponent(Section, {
1950
3026
  title: "Stats",
1951
3027
  get children() {
1952
- return p(R, {
3028
+ return createComponent(ValueVisualizer, {
1953
3029
  get value() {
1954
3030
  return {
1955
- "Duration (ms)": Math.round(s.duration),
1956
- "Start Time": `${Q(s.startTime).format("HH:mm:ss")} (${Q(s.startTime).fromNow()})`
3031
+ 'Duration (ms)': Math.round(request.duration),
3032
+ 'Start Time': `${dayjs(request.startTime).format('HH:mm:ss')} (${dayjs(request.startTime).fromNow()})`
1957
3033
  };
1958
3034
  }
1959
3035
  });
1960
3036
  }
1961
- }), p(E, {
3037
+ }), createComponent(Section, {
1962
3038
  title: "Metadata",
1963
3039
  get children() {
1964
- return p(R, {
3040
+ return createComponent(ValueVisualizer, {
1965
3041
  get value() {
1966
- return s.metadata;
3042
+ return request.metadata;
1967
3043
  }
1968
3044
  });
1969
3045
  }
1970
3046
  })];
1971
3047
  }
1972
- }), p(G, {
3048
+ }), createComponent(Match, {
1973
3049
  get when() {
1974
- return n() === "payload";
3050
+ return _selectedTab() === 'payload';
1975
3051
  },
1976
3052
  get children() {
1977
- return p(E, {
3053
+ return createComponent(Section, {
1978
3054
  title: null,
1979
3055
  get children() {
1980
- return p(R, {
3056
+ return createComponent(ValueVisualizer, {
1981
3057
  get value() {
1982
- return s.payload;
3058
+ return request.payload;
1983
3059
  }
1984
3060
  });
1985
3061
  }
1986
3062
  });
1987
3063
  }
1988
- }), p(G, {
3064
+ }), createComponent(Match, {
1989
3065
  get when() {
1990
- return n() === "response";
3066
+ return _selectedTab() === 'response';
1991
3067
  },
1992
3068
  get children() {
1993
- return p(E, {
3069
+ return createComponent(Section, {
1994
3070
  title: null,
1995
3071
  get children() {
1996
- return p(R, {
3072
+ return createComponent(ValueVisualizer, {
1997
3073
  get value() {
1998
- return s.response;
3074
+ return request.response;
1999
3075
  }
2000
3076
  });
2001
3077
  }
2002
3078
  });
2003
3079
  }
2004
- }), p(G, {
3080
+ }), createComponent(Match, {
2005
3081
  get when() {
2006
- return n() === "urlParams";
3082
+ return _selectedTab() === 'urlParams';
2007
3083
  },
2008
3084
  get children() {
2009
- return p(E, {
3085
+ return createComponent(Section, {
2010
3086
  title: null,
2011
3087
  get children() {
2012
- return p(R, {
3088
+ return createComponent(ValueVisualizer, {
2013
3089
  get value() {
2014
- return s.searchParams;
3090
+ return request.searchParams;
2015
3091
  }
2016
3092
  });
2017
3093
  }
2018
3094
  });
2019
3095
  }
2020
- }), p(G, {
3096
+ }), createComponent(Match, {
2021
3097
  get when() {
2022
- return n() === "diff";
3098
+ return _selectedTab() === 'diff';
2023
3099
  },
2024
3100
  get children() {
2025
- return p(Wn, {});
3101
+ return createComponent(Diff, {});
2026
3102
  }
2027
3103
  })];
2028
3104
  }
2029
- })), r;
3105
+ }));
3106
+ return _el$5;
2030
3107
  })()]
2031
- })), o;
3108
+ }));
3109
+ return _el$;
2032
3110
  })();
2033
- }, lr = /* @__PURE__ */ $("<div><h1>timeline</h1><div></div></div>"), ir = /* @__PURE__ */ $("<div>no requests found</div>"), sr = /* @__PURE__ */ $('<span class="start-time"></span>'), ar = /* @__PURE__ */ $("<div></div>"), cr = /* @__PURE__ */ $('<span class="separator">|</span>'), dr = /* @__PURE__ */ $('<span class="payload"></span>'), ur = _`
3111
+ };
3112
+
3113
+ const _tmpl$$2 = /*#__PURE__*/template(`<div><h1>timeline</h1><div></div></div>`),
3114
+ _tmpl$2$1 = /*#__PURE__*/template(`<div>no requests found</div>`),
3115
+ _tmpl$3 = /*#__PURE__*/template(`<span class="start-time"></span>`),
3116
+ _tmpl$4 = /*#__PURE__*/template(`<div></div>`),
3117
+ _tmpl$5 = /*#__PURE__*/template(`<span class="separator">|</span>`),
3118
+ _tmpl$6 = /*#__PURE__*/template(`<span class="payload"></span>`);
3119
+ const containerStyle$2 = u`
2034
3120
  &&& {
2035
- ${N()};
2036
- border-right: 1px solid ${h.white.alpha(0.1)};
3121
+ ${stack()};
3122
+ border-right: 1px solid ${colors.white.alpha(0.1)};
2037
3123
 
2038
3124
  > h1 {
2039
3125
  font-size: 16px;
2040
3126
  padding-left: 12px;
2041
3127
  padding-top: 10px;
2042
- font-family: ${L.decorative};
2043
- color: ${h.secondary.var};
3128
+ font-family: ${fonts.decorative};
3129
+ color: ${colors.secondary.var};
2044
3130
  padding-bottom: 16px;
2045
3131
  }
2046
3132
  }
2047
- `, fr = _`
3133
+ `;
3134
+ const itemsContainerStyle = u`
2048
3135
  &&& {
2049
- ${N()};
3136
+ ${stack()};
2050
3137
  flex: 1 1;
2051
3138
  overflow-y: auto;
2052
3139
  }
2053
- `, pr = _`
3140
+ `;
3141
+ const requestItemStyle = u`
2054
3142
  &&& {
2055
3143
  font-size: 13px;
2056
- ${N()};
3144
+ ${stack()};
2057
3145
 
2058
3146
  &.error {
2059
- color: ${h.error.var};
3147
+ color: ${colors.error.var};
2060
3148
  font-weight: 600;
2061
3149
  }
2062
3150
 
2063
3151
  > button {
2064
3152
  padding: 4px 12px;
2065
- ${B({
3153
+ ${inline({
2066
3154
  gap: 8
2067
3155
  })};
2068
3156
  opacity: 0.8;
2069
3157
 
2070
3158
  &.selected {
2071
3159
  opacity: 1;
2072
- background-color: ${h.secondary.alpha(0.16)};
3160
+ background-color: ${colors.secondary.alpha(0.16)};
2073
3161
  }
2074
3162
 
2075
3163
  > .start-time {
2076
- font-family: ${L.decorative};
3164
+ font-family: ${fonts.decorative};
2077
3165
  }
2078
3166
 
2079
3167
  > .separator {
@@ -2081,76 +3169,124 @@ const Ve = /* @__PURE__ */ $("<div></div>"), Jn = /* @__PURE__ */ $("<h1></h1>")
2081
3169
  }
2082
3170
 
2083
3171
  > .payload {
2084
- ${ue};
3172
+ ${ellipsis};
2085
3173
  flex-shrink: 1;
2086
3174
  }
2087
3175
  }
2088
3176
  }
2089
- `, gr = _`
3177
+ `;
3178
+ const emptyStateStyle = u`
2090
3179
  &&& {
2091
3180
  opacity: 0.4;
2092
3181
  font-size: 14px;
2093
3182
  padding: 12px;
2094
3183
  padding-top: 0;
2095
3184
  }
2096
- `, hr = () => {
2097
- const e = m(() => {
2098
- const i = S.selectedCall;
2099
- return i ? i ? H.calls[i] : null : Object.values(H.calls).at(-1) || null;
2100
- }), t = m(() => {
2101
- const i = tt(e()?.requests);
2102
- return i.length === 0 ? null : i;
2103
- }), n = m(() => S.selectedSubitem ? t()?.filter((i) => i.alias === S.selectedSubitem) : t()), l = m(() => S.selectedRequest || n()?.[0]?.id);
3185
+ `;
3186
+ const Timeline = () => {
3187
+ const selectedCall = createMemo(() => {
3188
+ const selectedCallId = uiStore.selectedCall;
3189
+ if (!selectedCallId) {
3190
+ const callsEntries = Object.values(callsStore.calls).at(-1);
3191
+ return callsEntries || null;
3192
+ }
3193
+ if (selectedCallId) {
3194
+ return callsStore.calls[selectedCallId];
3195
+ }
3196
+ return null;
3197
+ });
3198
+ const requests = createMemo(() => {
3199
+ const reversed = reverseCopy(selectedCall()?.requests);
3200
+ return reversed.length === 0 ? null : reversed;
3201
+ });
3202
+ const filteredRequests = createMemo(() => {
3203
+ if (uiStore.selectedSubitem) {
3204
+ return requests()?.filter(request => {
3205
+ return request.alias === uiStore.selectedSubitem;
3206
+ });
3207
+ } else {
3208
+ return requests();
3209
+ }
3210
+ });
3211
+ const _selectedRequestId = createMemo(() => uiStore.selectedRequest || filteredRequests()?.[0]?.id);
2104
3212
  return (() => {
2105
- const i = lr.cloneNode(!0), o = i.firstChild, s = o.nextSibling;
2106
- return b(i, ur), b(s, fr), u(s, p(F, {
3213
+ const _el$ = _tmpl$$2.cloneNode(true),
3214
+ _el$2 = _el$.firstChild,
3215
+ _el$3 = _el$2.nextSibling;
3216
+ className(_el$, containerStyle$2);
3217
+ className(_el$3, itemsContainerStyle);
3218
+ insert(_el$3, createComponent(For, {
2107
3219
  get each() {
2108
- return n();
3220
+ return filteredRequests();
2109
3221
  },
2110
3222
  get fallback() {
2111
3223
  return (() => {
2112
- const r = ir.cloneNode(!0);
2113
- return b(r, gr), r;
3224
+ const _el$4 = _tmpl$2$1.cloneNode(true);
3225
+ className(_el$4, emptyStateStyle);
3226
+ return _el$4;
2114
3227
  })();
2115
3228
  },
2116
- children: (r) => {
2117
- const a = Q(r.startTime), c = a.format("HH:mm:ss"), d = a.fromNow(), g = rt(r);
3229
+ children: request => {
3230
+ const startTime = dayjs(request.startTime);
3231
+ const formattedStartTime = startTime.format('HH:mm:ss');
3232
+ const relativeStartTime = startTime.fromNow();
3233
+ const payload = getRequestPayload(request);
2118
3234
  return (() => {
2119
- const f = ar.cloneNode(!0);
2120
- return b(f, pr), u(f, p(M, {
3235
+ const _el$5 = _tmpl$4.cloneNode(true);
3236
+ className(_el$5, requestItemStyle);
3237
+ insert(_el$5, createComponent(ButtonElement, {
2121
3238
  onClick: () => {
2122
- se("selectedRequest", r.id);
3239
+ setUiStore('selectedRequest', request.id);
2123
3240
  },
2124
3241
  get classList() {
2125
3242
  return {
2126
- selected: r.id === l()
3243
+ selected: request.id === _selectedRequestId()
2127
3244
  };
2128
3245
  },
2129
3246
  get children() {
2130
3247
  return [(() => {
2131
- const y = sr.cloneNode(!0);
2132
- return P(y, "title", d), u(y, c), y;
2133
- })(), m(() => !!g && [cr.cloneNode(!0), (() => {
2134
- const y = dr.cloneNode(!0);
2135
- return P(y, "title", g), u(y, g), y;
3248
+ const _el$6 = _tmpl$3.cloneNode(true);
3249
+ setAttribute(_el$6, "title", relativeStartTime);
3250
+ insert(_el$6, formattedStartTime);
3251
+ return _el$6;
3252
+ })(), createMemo(() => !!payload && [_tmpl$5.cloneNode(true), (() => {
3253
+ const _el$8 = _tmpl$6.cloneNode(true);
3254
+ setAttribute(_el$8, "title", payload);
3255
+ insert(_el$8, payload);
3256
+ return _el$8;
2136
3257
  })()])];
2137
3258
  }
2138
- })), C(() => f.classList.toggle("error", !!r.isError)), f;
3259
+ }));
3260
+ createRenderEffect(() => _el$5.classList.toggle("error", !!request.isError));
3261
+ return _el$5;
2139
3262
  })();
2140
3263
  }
2141
- })), i;
3264
+ }));
3265
+ return _el$;
2142
3266
  })();
2143
- }, mr = /* @__PURE__ */ $("<div></div>"), $r = _`
3267
+ };
3268
+
3269
+ const _tmpl$$1 = /*#__PURE__*/template(`<div></div>`);
3270
+ const containerStyle$1 = u`
2144
3271
  &&& {
2145
3272
  display: grid;
2146
- grid-template-columns: 1.5fr 1fr 3fr;
3273
+ grid-template-columns: 1fr 1fr 3fr;
2147
3274
  }
2148
- `, yr = () => (() => {
2149
- const e = mr.cloneNode(!0);
2150
- return b(e, $r), u(e, p(bn, {}), null), u(e, p(hr, {}), null), u(e, p(or, {}), null), e;
2151
- })(), vr = `
2152
- font-family: ${L.primary};
2153
- color: ${h.textPrimary.var};
3275
+ `;
3276
+ const ApiExplorerPage = () => {
3277
+ return (() => {
3278
+ const _el$ = _tmpl$$1.cloneNode(true);
3279
+ className(_el$, containerStyle$1);
3280
+ insert(_el$, createComponent(ApiExplorerMenu, {}), null);
3281
+ insert(_el$, createComponent(Timeline, {}), null);
3282
+ insert(_el$, createComponent(RequestDetails, {}), null);
3283
+ return _el$;
3284
+ })();
3285
+ };
3286
+
3287
+ const globalStyle = `
3288
+ font-family: ${fonts.primary};
3289
+ color: ${colors.textPrimary.var};
2154
3290
 
2155
3291
  * {
2156
3292
  user-select: none;
@@ -2199,11 +3335,15 @@ const Ve = /* @__PURE__ */ $("<div></div>"), Jn = /* @__PURE__ */ $("<h1></h1>")
2199
3335
  h3 {
2200
3336
  font-weight: normal;
2201
3337
  }
2202
- `, br = `
3338
+ `;
3339
+
3340
+ const centerContent = `
2203
3341
  display: flex;
2204
3342
  align-items: center;
2205
3343
  justify-content: center;
2206
- `, Cr = `
3344
+ `;
3345
+
3346
+ const resetStyle = `
2207
3347
  *,
2208
3348
  *::before,
2209
3349
  *::after {
@@ -2278,75 +3418,29 @@ button {
2278
3418
  -webkit-appearance: none;
2279
3419
  }
2280
3420
  `;
2281
- let xr = { data: "" }, wr = (e) => typeof window == "object" ? ((e ? e.querySelector("#_goober") : window._goober) || Object.assign((e || document.head).appendChild(document.createElement("style")), { innerHTML: " ", id: "_goober" })).firstChild : e || xr, _r = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g, Nr = /\/\*[^]*?\*\/| +/g, Ze = /\n+/g, I = (e, t) => {
2282
- let n = "", l = "", i = "";
2283
- for (let o in e) {
2284
- let s = e[o];
2285
- o[0] == "@" ? o[1] == "i" ? n = o + " " + s + ";" : l += o[1] == "f" ? I(s, o) : o + "{" + I(s, o[1] == "k" ? "" : t) + "}" : typeof s == "object" ? l += I(s, t ? t.replace(/([^,])+/g, (r) => o.replace(/(^:.*)|([^,])+/g, (a) => /&/.test(a) ? a.replace(/&/g, r) : r ? r + " " + a : a)) : o) : s != null && (o = /^--/.test(o) ? o : o.replace(/[A-Z]/g, "-$&").toLowerCase(), i += I.p ? I.p(o, s) : o + ":" + s + ";");
2286
- }
2287
- return n + (t && i ? t + "{" + i + "}" : i) + l;
2288
- }, j = {}, ot = (e) => {
2289
- if (typeof e == "object") {
2290
- let t = "";
2291
- for (let n in e)
2292
- t += n + ot(e[n]);
2293
- return t;
2294
- }
2295
- return e;
2296
- }, Sr = (e, t, n, l, i) => {
2297
- let o = ot(e), s = j[o] || (j[o] = ((a) => {
2298
- let c = 0, d = 11;
2299
- for (; c < a.length; )
2300
- d = 101 * d + a.charCodeAt(c++) >>> 0;
2301
- return "go" + d;
2302
- })(o));
2303
- if (!j[s]) {
2304
- let a = o !== e ? e : ((c) => {
2305
- let d, g, f = [{}];
2306
- for (; d = _r.exec(c.replace(Nr, "")); )
2307
- d[4] ? f.shift() : d[3] ? (g = d[3].replace(Ze, " ").trim(), f.unshift(f[0][g] = f[0][g] || {})) : f[0][d[1]] = d[2].replace(Ze, " ").trim();
2308
- return f[0];
2309
- })(e);
2310
- j[s] = I(i ? { ["@keyframes " + s]: a } : a, n ? "" : "." + s);
2311
- }
2312
- let r = n && j.g ? j.g : null;
2313
- return n && (j.g = j[s]), ((a, c, d, g) => {
2314
- g ? c.data = c.data.replace(g, a) : c.data.indexOf(a) === -1 && (c.data = d ? a + c.data : c.data + a);
2315
- })(j[s], t, l, r), s;
2316
- }, kr = (e, t, n) => e.reduce((l, i, o) => {
2317
- let s = t[o];
2318
- if (s && s.call) {
2319
- let r = s(n), a = r && r.props && r.props.className || /^go/.test(r) && r;
2320
- s = a ? "." + a : r && typeof r == "object" ? r.props ? "" : I(r, "") : r === !1 ? "" : r;
2321
- }
2322
- return l + i + (s ?? "");
2323
- }, "");
2324
- function fe(e) {
2325
- let t = this || {}, n = e.call ? e(t.p) : e;
2326
- return Sr(n.unshift ? n.raw ? kr(n, [].slice.call(arguments, 1), t.p) : n.reduce((l, i) => Object.assign(l, i && i.call ? i(t.p) : i), {}) : n, wr(t.target), t.g, t.o, t.k);
2327
- }
2328
- fe.bind({ g: 1 });
2329
- fe.bind({ k: 1 });
2330
- const Ar = /* @__PURE__ */ $("<div></div>"), Pr = /* @__PURE__ */ $('<div id="dev-tools-root-element"><nav></nav><main></main></div>'), Tr = fe`
2331
- ${Cr};
2332
- ${vr};
3421
+
3422
+ const _tmpl$ = /*#__PURE__*/template(`<div></div>`),
3423
+ _tmpl$2 = /*#__PURE__*/template(`<div id="dev-tools-root-element"><nav></nav><main></main></div>`);
3424
+ const containerStyle = u`
3425
+ ${resetStyle};
3426
+ ${globalStyle};
2333
3427
 
2334
3428
  position: fixed;
2335
3429
  inset: 32px;
2336
3430
  border-radius: 4px;
2337
- background: ${h.bgPrimary.var};
3431
+ background: ${colors.bgPrimary.var};
2338
3432
  display: grid;
2339
3433
  grid-template-columns: 51px 1fr;
2340
3434
 
2341
3435
  nav {
2342
- ${N()};
2343
- border-right: 1px solid ${h.white.alpha(0.1)};
3436
+ ${stack()};
3437
+ border-right: 1px solid ${colors.white.alpha(0.1)};
2344
3438
 
2345
3439
  button {
2346
- ${br};
3440
+ ${centerContent};
2347
3441
  width: 100%;
2348
3442
  aspect-ratio: 1 / 1;
2349
- color: ${h.bgPrimary.var};
3443
+ color: ${colors.bgPrimary.var};
2350
3444
  --icon-size: 30px;
2351
3445
 
2352
3446
  &::before {
@@ -2354,59 +3448,81 @@ const Ar = /* @__PURE__ */ $("<div></div>"), Pr = /* @__PURE__ */ $('<div id="de
2354
3448
  inset: 6px;
2355
3449
  border-radius: 3px;
2356
3450
  position: absolute;
2357
- background: ${h.primary.var};
3451
+ background: ${colors.primary.var};
2358
3452
  }
2359
3453
  }
2360
3454
  }
2361
3455
 
2362
3456
  > main > * {
2363
- ${Ce};
3457
+ ${fillContainer};
2364
3458
  }
2365
- `, Er = fe`
2366
- ${Ce};
3459
+ `;
3460
+ const backdropStyle = u`
3461
+ ${fillContainer};
2367
3462
  position: fixed;
2368
3463
  inset: 0;
2369
- `, Lr = () => [(() => {
2370
- const e = Ar.cloneNode(!0);
2371
- return oe(e, "click", Mr, !0), b(e, Er), e;
2372
- })(), (() => {
2373
- const e = Pr.cloneNode(!0), t = e.firstChild, n = t.nextSibling;
2374
- return b(e, Tr), u(t, p(M, {
2375
- title: "API Explorer",
2376
- get children() {
2377
- return p(de, {
2378
- name: "network"
2379
- });
2380
- }
2381
- })), u(n, p(yr, {})), e;
2382
- })()];
2383
- ce(["click"]);
2384
- const Or = () => p(Lr, {});
2385
- let lt = () => {
3464
+ `;
3465
+ const App = () => {
3466
+ return [(() => {
3467
+ const _el$ = _tmpl$.cloneNode(true);
3468
+ addEventListener(_el$, "click", unmountApp, true);
3469
+ className(_el$, backdropStyle);
3470
+ return _el$;
3471
+ })(), (() => {
3472
+ const _el$2 = _tmpl$2.cloneNode(true),
3473
+ _el$3 = _el$2.firstChild,
3474
+ _el$4 = _el$3.nextSibling;
3475
+ className(_el$2, containerStyle);
3476
+ insert(_el$3, createComponent(ButtonElement, {
3477
+ title: "API Explorer",
3478
+ get children() {
3479
+ return createComponent(Icon, {
3480
+ name: "network"
3481
+ });
3482
+ }
3483
+ }));
3484
+ insert(_el$4, createComponent(ApiExplorerPage, {}));
3485
+ return _el$2;
3486
+ })()];
3487
+ };
3488
+ delegateEvents(["click"]);
3489
+
3490
+ const Root = () => {
3491
+ return createComponent(App, {});
2386
3492
  };
2387
- function jr() {
2388
- Q.extend(Et), navigator.platform.indexOf("Win") > -1 && document.body.classList.add("windows");
2389
- const e = document.getElementById("dev-tools-root") || document.createElement("div");
2390
- e.id = "dev-tools-root", document.body.appendChild(e), lt = xt(() => p(Or, {}), e);
3493
+
3494
+ let unmount = () => {};
3495
+ function initializeApp() {
3496
+ dayjs.extend(relativeTime);
3497
+ if (navigator.platform.indexOf('Win') > -1) {
3498
+ document.body.classList.add('windows');
3499
+ }
3500
+ const devToolsRoot = document.getElementById('dev-tools-root') || document.createElement('div');
3501
+ devToolsRoot.id = 'dev-tools-root';
3502
+ document.body.appendChild(devToolsRoot);
3503
+ unmount = render(() => createComponent(Root, {}), devToolsRoot);
2391
3504
  }
2392
- function Mr() {
2393
- lt();
3505
+ function unmountApp() {
3506
+ unmount();
2394
3507
  }
2395
- function Zr({
2396
- callsProcessor: e,
2397
- shortcut: t = "$mod+D"
3508
+
3509
+ function initializeDevTools({
3510
+ callsProcessor,
3511
+ shortcut
2398
3512
  }) {
2399
- gt(window, {
2400
- [t]: (n) => {
2401
- n.preventDefault();
2402
- const l = document.activeElement;
2403
- l instanceof HTMLElement && (l.isContentEditable || l.tagName === "INPUT" || l.tagName === "TEXTAREA") || jr();
2404
- }
2405
- }), hn({
2406
- callsProcessor: e
3513
+ tinykeys(window, {
3514
+ [shortcut]: (e) => {
3515
+ e.preventDefault();
3516
+ const active = document.activeElement;
3517
+ const enteringText = active instanceof HTMLElement && (active.isContentEditable || active.tagName === "INPUT" || active.tagName === "TEXTAREA");
3518
+ if (enteringText)
3519
+ return;
3520
+ initializeApp();
3521
+ }
3522
+ });
3523
+ setConfig({
3524
+ callsProcessor
2407
3525
  });
2408
3526
  }
2409
- export {
2410
- Vr as addCall,
2411
- Zr as initializeDevTools
2412
- };
3527
+
3528
+ export { addCall, initializeDevTools };