@vscode/component-explorer 0.1.1-7 → 0.1.1-9

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/index.js CHANGED
@@ -1,38 +1,38 @@
1
- var it = Object.defineProperty;
2
- var ot = (s, e, t) => e in s ? it(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
- var c = (s, e, t) => ot(s, typeof e != "symbol" ? e + "" : e, t);
4
- import { createRoot as at } from "react-dom/client";
5
- import { createElement as dt } from "react";
6
- import { jsx as a, jsxs as p, Fragment as ce } from "react/jsx-runtime";
7
- import { ViewModel as N, prop as f, viewWithModel as V, view as D } from "@vscode/observables-react";
8
- const lt = {
1
+ var vt = Object.defineProperty;
2
+ var bt = (s, e, t) => e in s ? vt(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
+ var l = (s, e, t) => bt(s, typeof e != "symbol" ? e + "" : e, t);
4
+ import { createRoot as yt } from "react-dom/client";
5
+ import { createContext as Le, useReducer as Ct, useState as xt, useContext as wt, useEffect as Ie, createElement as St } from "react";
6
+ import { jsx as a, jsxs as p, Fragment as be } from "react/jsx-runtime";
7
+ import { unstable_batchedUpdates as $e } from "react-dom";
8
+ const It = {
9
9
  mobile: { width: 390, height: 844 },
10
10
  tablet: { width: 768, height: 1024 },
11
11
  desktop: { width: 1440, height: 900 }
12
12
  };
13
- function ct(s) {
14
- return typeof s == "string" ? { name: s, ...lt[s] } : s;
13
+ function Ot(s) {
14
+ return typeof s == "string" ? { name: s, ...It[s] } : s;
15
15
  }
16
- function ht(s) {
16
+ function Tt(s) {
17
17
  const e = {};
18
18
  for (const t of s)
19
19
  e[t.name] = t.defaultValue;
20
20
  return e;
21
21
  }
22
- function qn(s) {
22
+ function ys(s) {
23
23
  return typeof s == "object" && s !== null && "render" in s && typeof s.render == "function" && "id" in s && "name" in s;
24
24
  }
25
- const Ne = Symbol("singleFixture"), Ve = Symbol("fixtureGroup"), De = Symbol("fixtureVariants");
26
- function ut(s) {
27
- return typeof s == "object" && s !== null && Ne in s;
25
+ const Ue = Symbol("singleFixture"), je = Symbol("fixtureGroup"), Pe = Symbol("fixtureVariants");
26
+ function Rt(s) {
27
+ return typeof s == "object" && s !== null && Ue in s;
28
28
  }
29
- function ft(s) {
30
- return typeof s == "object" && s !== null && Ve in s;
29
+ function Vt(s) {
30
+ return typeof s == "object" && s !== null && je in s;
31
31
  }
32
- function pt(s) {
33
- return typeof s == "object" && s !== null && De in s;
32
+ function Nt(s) {
33
+ return typeof s == "object" && s !== null && Pe in s;
34
34
  }
35
- function gt(s, e, t) {
35
+ function kt(s, e, t) {
36
36
  return {
37
37
  id: e,
38
38
  name: t,
@@ -45,26 +45,26 @@ function gt(s, e, t) {
45
45
  render: s.render
46
46
  };
47
47
  }
48
- function J(s) {
48
+ function ee(s) {
49
49
  return {
50
- [Ne]: !0,
50
+ [Ue]: !0,
51
51
  _options: s,
52
- _createDefinition: (e, t) => gt(s, e, t)
52
+ _createDefinition: (e, t) => kt(s, e, t)
53
53
  };
54
54
  }
55
- function Kn(s) {
55
+ function Cs(s) {
56
56
  return {
57
- [Ve]: !0,
57
+ [je]: !0,
58
58
  _entries: s
59
59
  };
60
60
  }
61
- function Jn(s) {
61
+ function xs(s) {
62
62
  return {
63
- [De]: !0,
63
+ [Pe]: !0,
64
64
  _variants: s
65
65
  };
66
66
  }
67
- function re(s) {
67
+ function ce(s) {
68
68
  const e = {
69
69
  id: "",
70
70
  name: "Components",
@@ -72,17 +72,17 @@ function re(s) {
72
72
  children: []
73
73
  };
74
74
  for (const [t, n] of s) {
75
- const r = vt(t);
76
- Ae(e, [r], n);
75
+ const r = Dt(t);
76
+ Ge(e, [r], n);
77
77
  }
78
78
  return e;
79
79
  }
80
- function vt(s) {
80
+ function Dt(s) {
81
81
  return (s.split("/").pop() ?? s).replace(/\.fixture\.(tsx?|jsx?)$/, "");
82
82
  }
83
- function Ae(s, e, t) {
83
+ function Ge(s, e, t) {
84
84
  var n;
85
- if (ut(t)) {
85
+ if (Rt(t)) {
86
86
  const r = e.join("/"), i = e[e.length - 1], o = {
87
87
  id: r,
88
88
  name: i,
@@ -90,7 +90,7 @@ function Ae(s, e, t) {
90
90
  component: t._createDefinition(r, i)
91
91
  };
92
92
  s.children || (s.children = []), s.children.push(o);
93
- } else if (ft(t)) {
93
+ } else if (Vt(t)) {
94
94
  const r = e[e.length - 1], i = e.join("/");
95
95
  let o = (n = s.children) == null ? void 0 : n.find(
96
96
  (d) => d.type === "folder" && d.name === r
@@ -101,9 +101,9 @@ function Ae(s, e, t) {
101
101
  type: "folder",
102
102
  children: []
103
103
  }, s.children || (s.children = []), s.children.push(o));
104
- for (const [d, l] of Object.entries(t._entries))
105
- Ae(o, [...e, d], l);
106
- } else if (pt(t)) {
104
+ for (const [d, c] of Object.entries(t._entries))
105
+ Ge(o, [...e, d], c);
106
+ } else if (Nt(t)) {
107
107
  const r = e[e.length - 1], o = {
108
108
  id: e.join("/"),
109
109
  name: r,
@@ -111,18 +111,18 @@ function Ae(s, e, t) {
111
111
  children: []
112
112
  };
113
113
  s.children || (s.children = []), s.children.push(o);
114
- for (const [d, l] of Object.entries(t._variants)) {
115
- const g = [...e, d].join("/"), b = {
114
+ for (const [d, c] of Object.entries(t._variants)) {
115
+ const g = [...e, d].join("/"), _ = {
116
116
  id: g,
117
117
  name: d,
118
118
  type: "component",
119
- component: l._createDefinition(g, d)
119
+ component: c._createDefinition(g, d)
120
120
  };
121
- o.children.push(b);
121
+ o.children.push(_);
122
122
  }
123
123
  }
124
124
  }
125
- function ve(s, e) {
125
+ function Oe(s, e) {
126
126
  if (e.length === 0)
127
127
  return s;
128
128
  let t = s;
@@ -133,29 +133,29 @@ function ve(s, e) {
133
133
  }
134
134
  return t;
135
135
  }
136
- function mt(s) {
136
+ function At(s) {
137
137
  if (s.type === "component" && s.component)
138
138
  return [s.component];
139
139
  const e = [];
140
140
  for (const t of s.children ?? [])
141
- e.push(...mt(t));
141
+ e.push(...At(t));
142
142
  return e;
143
143
  }
144
- let B;
145
- function Be(s) {
146
- B ? B instanceof me ? B.loggers.push(s) : B = new me([B, s]) : B = s;
144
+ let L;
145
+ function We(s) {
146
+ L ? L instanceof Te ? L.loggers.push(s) : L = new Te([L, s]) : L = s;
147
147
  }
148
- function v() {
149
- return B;
148
+ function m() {
149
+ return L;
150
150
  }
151
- let ie;
152
- function _t(s) {
153
- ie = s;
151
+ let le;
152
+ function Mt(s) {
153
+ le = s;
154
154
  }
155
- function bt(s) {
156
- ie && ie(s);
155
+ function Ft(s) {
156
+ le && le(s);
157
157
  }
158
- class me {
158
+ class Te {
159
159
  constructor(e) {
160
160
  this.loggers = e;
161
161
  }
@@ -208,7 +208,7 @@ class me {
208
208
  t.handleEndTransaction(e);
209
209
  }
210
210
  }
211
- var R;
211
+ var T;
212
212
  (function(s) {
213
213
  let e = !1;
214
214
  function t() {
@@ -224,23 +224,23 @@ var R;
224
224
  return;
225
225
  const o = Error, d = o.stackTraceLimit;
226
226
  o.stackTraceLimit = 3;
227
- const l = new Error().stack;
228
- return o.stackTraceLimit = d, he.fromStack(l, i + 1);
227
+ const c = new Error().stack;
228
+ return o.stackTraceLimit = d, ye.fromStack(c, i + 1);
229
229
  }
230
230
  s.ofNthCaller = r;
231
- })(R || (R = {}));
232
- class he {
231
+ })(T || (T = {}));
232
+ class ye {
233
233
  static fromStack(e, t) {
234
234
  const n = e.split(`
235
- `), r = yt(n[t + 1]);
235
+ `), r = Bt(n[t + 1]);
236
236
  if (r)
237
- return new he(r.fileName, r.line, r.column, r.id);
237
+ return new ye(r.fileName, r.line, r.column, r.id);
238
238
  }
239
239
  constructor(e, t, n, r) {
240
240
  this.fileName = e, this.line = t, this.column = n, this.id = r;
241
241
  }
242
242
  }
243
- function yt(s) {
243
+ function Bt(s) {
244
244
  if (!s)
245
245
  return;
246
246
  const e = s.match(/\((.*):(\d+):(\d+)\)/);
@@ -260,32 +260,32 @@ function yt(s) {
260
260
  id: s
261
261
  };
262
262
  }
263
- class F {
263
+ class M {
264
264
  constructor(e, t, n) {
265
265
  this.owner = e, this.debugNameSource = t, this.referenceFn = n;
266
266
  }
267
267
  getDebugName(e) {
268
- return Ct(e, this);
268
+ return Et(e, this);
269
269
  }
270
270
  }
271
- const _e = /* @__PURE__ */ new Map(), oe = /* @__PURE__ */ new WeakMap();
272
- function Ct(s, e) {
273
- const t = oe.get(s);
271
+ const Re = /* @__PURE__ */ new Map(), he = /* @__PURE__ */ new WeakMap();
272
+ function Et(s, e) {
273
+ const t = he.get(s);
274
274
  if (t)
275
275
  return t;
276
- const n = xt(s, e);
276
+ const n = zt(s, e);
277
277
  if (n) {
278
- let r = _e.get(n) ?? 0;
279
- r++, _e.set(n, r);
278
+ let r = Re.get(n) ?? 0;
279
+ r++, Re.set(n, r);
280
280
  const i = r === 1 ? n : `${n}#${r}`;
281
- return oe.set(s, i), i;
281
+ return he.set(s, i), i;
282
282
  }
283
283
  }
284
- function xt(s, e) {
285
- const t = oe.get(s);
284
+ function zt(s, e) {
285
+ const t = he.get(s);
286
286
  if (t)
287
287
  return t;
288
- const n = e.owner ? wt(e.owner) + "." : "";
288
+ const n = e.owner ? Lt(e.owner) + "." : "";
289
289
  let r;
290
290
  const i = e.debugNameSource;
291
291
  if (i !== void 0)
@@ -295,56 +295,56 @@ function xt(s, e) {
295
295
  } else
296
296
  return n + i;
297
297
  const o = e.referenceFn;
298
- if (o !== void 0 && (r = ue(o), r !== void 0))
298
+ if (o !== void 0 && (r = Ce(o), r !== void 0))
299
299
  return n + r;
300
300
  if (e.owner !== void 0) {
301
- const d = St(e.owner, s);
301
+ const d = Ht(e.owner, s);
302
302
  if (d !== void 0)
303
303
  return n + d;
304
304
  }
305
305
  }
306
- function St(s, e) {
306
+ function Ht(s, e) {
307
307
  for (const t in s)
308
308
  if (s[t] === e)
309
309
  return t;
310
310
  }
311
- const be = /* @__PURE__ */ new Map(), ye = /* @__PURE__ */ new WeakMap();
312
- function wt(s) {
313
- const e = ye.get(s);
311
+ const Ve = /* @__PURE__ */ new Map(), Ne = /* @__PURE__ */ new WeakMap();
312
+ function Lt(s) {
313
+ const e = Ne.get(s);
314
314
  if (e)
315
315
  return e;
316
- const t = Me(s) ?? "Object";
317
- let n = be.get(t) ?? 0;
318
- n++, be.set(t, n);
316
+ const t = qe(s) ?? "Object";
317
+ let n = Ve.get(t) ?? 0;
318
+ n++, Ve.set(t, n);
319
319
  const r = n === 1 ? t : `${t}#${n}`;
320
- return ye.set(s, r), r;
320
+ return Ne.set(s, r), r;
321
321
  }
322
- function Me(s) {
322
+ function qe(s) {
323
323
  const e = s.constructor;
324
324
  if (e)
325
325
  return e.name === "Object" ? void 0 : e.name;
326
326
  }
327
- function ue(s) {
327
+ function Ce(s) {
328
328
  const e = s.toString(), n = /\/\*\*\s*@description\s*([^*]*)\*\//.exec(e), r = n ? n[1] : void 0;
329
329
  return r == null ? void 0 : r.trim();
330
330
  }
331
- let ae;
332
- function It(s) {
333
- ae = s;
331
+ let ue;
332
+ function $t(s) {
333
+ ue = s;
334
334
  }
335
- let Fe;
336
- function Ot(s) {
337
- Fe = s;
335
+ let Ke;
336
+ function Ut(s) {
337
+ Ke = s;
338
338
  }
339
- let Ee;
340
- function Tt(s) {
341
- Ee = s;
339
+ let Je;
340
+ function jt(s) {
341
+ Je = s;
342
342
  }
343
- let ze;
344
- function Rt(s) {
345
- ze = s;
343
+ let Ze;
344
+ function Pt(s) {
345
+ Ze = s;
346
346
  }
347
- class kt {
347
+ class Gt {
348
348
  get TChange() {
349
349
  return null;
350
350
  }
@@ -355,17 +355,17 @@ class kt {
355
355
  read(e) {
356
356
  return e ? e.readObservable(this) : this.get();
357
357
  }
358
- map(e, t, n = R.ofCaller()) {
358
+ map(e, t, n = T.ofCaller()) {
359
359
  const r = t === void 0 ? void 0 : e, i = t === void 0 ? e : t;
360
- return ae({
360
+ return ue({
361
361
  owner: r,
362
362
  debugName: () => {
363
- const o = ue(i);
363
+ const o = Ce(i);
364
364
  if (o !== void 0)
365
365
  return o;
366
- const l = /^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(i.toString());
367
- if (l)
368
- return `${this.debugName}.${l[2]}`;
366
+ const c = /^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(i.toString());
367
+ if (c)
368
+ return `${this.debugName}.${c[2]}`;
369
369
  if (!r)
370
370
  return `${this.debugName} (mapped)`;
371
371
  },
@@ -377,13 +377,13 @@ class kt {
377
377
  * Converts an observable of an observable value into a direct observable of the value.
378
378
  */
379
379
  flatten() {
380
- return ae({
380
+ return ue({
381
381
  owner: void 0,
382
382
  debugName: () => `${this.debugName} (flattened)`
383
383
  }, (e) => this.read(e).read(e));
384
384
  }
385
385
  recomputeInitiallyAndOnChange(e, t) {
386
- return e.add(Fe(this, t)), this;
386
+ return e.add(Ke(this, t)), this;
387
387
  }
388
388
  /**
389
389
  * Ensures that this observable is observed. This keeps the cache alive.
@@ -391,29 +391,29 @@ class kt {
391
391
  * Use `recomputeInitiallyAndOnChange` for eager evaluation.
392
392
  */
393
393
  keepObserved(e) {
394
- return e.add(Ee(this)), this;
394
+ return e.add(Je(this)), this;
395
395
  }
396
396
  get debugValue() {
397
397
  return this.get();
398
398
  }
399
399
  debugGetDependencyGraph() {
400
- return ze(this);
400
+ return Ze(this);
401
401
  }
402
402
  }
403
- class fe extends kt {
403
+ class xe extends Gt {
404
404
  constructor(e) {
405
405
  var t;
406
- super(), this._observers = /* @__PURE__ */ new Set(), (t = v()) == null || t.handleObservableCreated(this, e);
406
+ super(), this._observers = /* @__PURE__ */ new Set(), (t = m()) == null || t.handleObservableCreated(this, e);
407
407
  }
408
408
  addObserver(e) {
409
409
  var n;
410
410
  const t = this._observers.size;
411
- this._observers.add(e), t === 0 && this.onFirstObserverAdded(), t !== this._observers.size && ((n = v()) == null || n.handleOnListenerCountChanged(this, this._observers.size));
411
+ this._observers.add(e), t === 0 && this.onFirstObserverAdded(), t !== this._observers.size && ((n = m()) == null || n.handleOnListenerCountChanged(this, this._observers.size));
412
412
  }
413
413
  removeObserver(e) {
414
414
  var n;
415
415
  const t = this._observers.delete(e);
416
- t && this._observers.size === 0 && this.onLastObserverRemoved(), t && ((n = v()) == null || n.handleOnListenerCountChanged(this, this._observers.size));
416
+ t && this._observers.size === 0 && this.onLastObserverRemoved(), t && ((n = m()) == null || n.handleOnListenerCountChanged(this, this._observers.size));
417
417
  }
418
418
  onFirstObserverAdded() {
419
419
  }
@@ -421,34 +421,34 @@ class fe extends kt {
421
421
  }
422
422
  log() {
423
423
  var t;
424
- const e = !!v();
425
- return bt(this), e || (t = v()) == null || t.handleObservableCreated(this, R.ofCaller()), this;
424
+ const e = !!m();
425
+ return Ft(this), e || (t = m()) == null || t.handleObservableCreated(this, T.ofCaller()), this;
426
426
  }
427
427
  debugGetObservers() {
428
428
  return this._observers;
429
429
  }
430
430
  }
431
- function He(s) {
431
+ function Xe(s) {
432
432
  return {
433
433
  dispose: s
434
434
  };
435
435
  }
436
- class x extends Error {
436
+ class I extends Error {
437
437
  constructor(e) {
438
- super(e || "An unexpected bug occurred."), Object.setPrototypeOf(this, x.prototype);
438
+ super(e || "An unexpected bug occurred."), Object.setPrototypeOf(this, I.prototype);
439
439
  }
440
440
  }
441
- function X(s) {
441
+ function ne(s) {
442
442
  throw s;
443
443
  }
444
- function de(s) {
444
+ function fe(s) {
445
445
  console.error("Unexpected error:", s);
446
446
  }
447
- const q = (s, e) => s === e;
448
- function G(s) {
447
+ const Z = (s, e) => s === e;
448
+ function Y(s) {
449
449
  return s != null;
450
450
  }
451
- class Y {
451
+ class X {
452
452
  constructor() {
453
453
  this.disposables = [], this._isDisposed = !1;
454
454
  }
@@ -476,7 +476,7 @@ class Y {
476
476
  this.disposables = [];
477
477
  }
478
478
  }
479
- function Nt(s) {
479
+ function Wt(s) {
480
480
  switch (s) {
481
481
  case 0:
482
482
  return "initial";
@@ -490,7 +490,7 @@ function Nt(s) {
490
490
  return "<unknown>";
491
491
  }
492
492
  }
493
- class y extends fe {
493
+ class C extends xe {
494
494
  get debugName() {
495
495
  return this._debugNameData.getDebugName(this) ?? "(anonymous)";
496
496
  }
@@ -500,7 +500,7 @@ class y extends fe {
500
500
  }
501
501
  onLastObserverRemoved() {
502
502
  var e, t;
503
- this._state = 0, this._value = void 0, (e = v()) == null || e.handleDerivedCleared(this);
503
+ this._state = 0, this._value = void 0, (e = m()) == null || e.handleDerivedCleared(this);
504
504
  for (const n of this._dependencies)
505
505
  n.removeObserver(this);
506
506
  this._dependencies.clear(), this._store !== void 0 && (this._store.dispose(), this._store = void 0), this._delayedStore !== void 0 && (this._delayedStore.dispose(), this._delayedStore = void 0), (t = this._handleLastObserverRemoved) == null || t.call(this);
@@ -538,7 +538,7 @@ class y extends fe {
538
538
  try {
539
539
  const d = this._changeSummary;
540
540
  this._isReaderValid = !0, this._changeTracker && (this._isInBeforeUpdate = !0, (r = (n = this._changeTracker).beforeUpdate) == null || r.call(n, this, d), this._isInBeforeUpdate = !1, this._changeSummary = (i = this._changeTracker) == null ? void 0 : i.createChangeSummary(d));
541
- const l = this._state !== 0, h = this._value;
541
+ const c = this._state !== 0, h = this._value;
542
542
  this._state = 3;
543
543
  const g = this._delayedStore;
544
544
  g !== void 0 && (this._delayedStore = void 0);
@@ -546,19 +546,19 @@ class y extends fe {
546
546
  this._store !== void 0 && (this._store.dispose(), this._store = void 0), this._value = this._computeFn(this, d);
547
547
  } finally {
548
548
  this._isReaderValid = !1;
549
- for (const b of this._dependenciesToBeRemoved)
550
- b.removeObserver(this);
549
+ for (const _ of this._dependenciesToBeRemoved)
550
+ _.removeObserver(this);
551
551
  this._dependenciesToBeRemoved.clear(), g !== void 0 && g.dispose();
552
552
  }
553
- e = this._didReportChange || l && !this._equalityComparator(h, this._value), (o = v()) == null || o.handleObservableUpdated(this, {
553
+ e = this._didReportChange || c && !this._equalityComparator(h, this._value), (o = m()) == null || o.handleObservableUpdated(this, {
554
554
  oldValue: h,
555
555
  newValue: this._value,
556
556
  change: void 0,
557
557
  didChange: e,
558
- hadValue: l
558
+ hadValue: c
559
559
  });
560
560
  } catch (d) {
561
- X(d);
561
+ ne(d);
562
562
  }
563
563
  if (this._isComputing = !1, !this._didReportChange && e)
564
564
  for (const d of this._observers)
@@ -572,7 +572,7 @@ class y extends fe {
572
572
  // IObserver Implementation
573
573
  beginUpdate(e) {
574
574
  if (this._isUpdating)
575
- throw new x("Cyclic deriveds are not supported yet!");
575
+ throw new I("Cyclic deriveds are not supported yet!");
576
576
  this._updateCount++, this._isUpdating = !0;
577
577
  try {
578
578
  const t = this._updateCount === 1;
@@ -609,7 +609,7 @@ class y extends fe {
609
609
  handleChange(e, t) {
610
610
  var n;
611
611
  if (this._dependencies.has(e) && !this._dependenciesToBeRemoved.has(e) || this._isInBeforeUpdate) {
612
- (n = v()) == null || n.handleDerivedDependencyChanged(this, e, t);
612
+ (n = m()) == null || n.handleDerivedDependencyChanged(this, e, t);
613
613
  let r = !1;
614
614
  try {
615
615
  r = this._changeTracker ? this._changeTracker.handleChange({
@@ -618,7 +618,7 @@ class y extends fe {
618
618
  didChange: (o) => o === e
619
619
  }, this._changeSummary) : !0;
620
620
  } catch (o) {
621
- X(o);
621
+ ne(o);
622
622
  }
623
623
  const i = this._state === 3;
624
624
  if (r && (this._state === 1 || i) && (this._state = 2, i))
@@ -629,7 +629,7 @@ class y extends fe {
629
629
  // IReader Implementation
630
630
  _ensureReaderValid() {
631
631
  if (!this._isReaderValid)
632
- throw new x("The reader object cannot be used outside its compute function!");
632
+ throw new I("The reader object cannot be used outside its compute function!");
633
633
  }
634
634
  readObservable(e) {
635
635
  this._ensureReaderValid(), e.addObserver(this);
@@ -642,10 +642,10 @@ class y extends fe {
642
642
  t.handleChange(this, e);
643
643
  }
644
644
  get store() {
645
- return this._ensureReaderValid(), this._store === void 0 && (this._store = new Y()), this._store;
645
+ return this._ensureReaderValid(), this._store === void 0 && (this._store = new X()), this._store;
646
646
  }
647
647
  get delayedStore() {
648
- return this._ensureReaderValid(), this._delayedStore === void 0 && (this._delayedStore = new Y()), this._delayedStore;
648
+ return this._ensureReaderValid(), this._delayedStore === void 0 && (this._delayedStore = new X()), this._delayedStore;
649
649
  }
650
650
  addObserver(e) {
651
651
  const t = !this._observers.has(e) && this._updateCount > 0;
@@ -657,7 +657,7 @@ class y extends fe {
657
657
  debugGetState() {
658
658
  return {
659
659
  state: this._state,
660
- stateStr: Nt(this._state),
660
+ stateStr: Wt(this._state),
661
661
  updateCount: this._updateCount,
662
662
  isComputing: this._isComputing,
663
663
  dependencies: this._dependencies,
@@ -678,14 +678,26 @@ class y extends fe {
678
678
  i.handleChange(this, n);
679
679
  }
680
680
  }
681
- function j(s, e, t = R.ofCaller()) {
682
- return e !== void 0 ? new y(new F(s, void 0, e), e, void 0, void 0, q, t) : new y(new F(void 0, void 0, s), s, void 0, void 0, q, t);
681
+ function N(s, e, t = T.ofCaller()) {
682
+ return e !== void 0 ? new C(new M(s, void 0, e), e, void 0, void 0, Z, t) : new C(new M(void 0, void 0, s), s, void 0, void 0, Z, t);
683
683
  }
684
- function Vt(s, e, t = R.ofCaller()) {
685
- return new y(new F(s.owner, s.debugName, s.debugReferenceFn), e, void 0, s.onLastObserverRemoved, s.equalsFn ?? q, t);
684
+ function qt(s, e, t = T.ofCaller()) {
685
+ return new C(new M(s.owner, s.debugName, s.debugReferenceFn), e, void 0, s.onLastObserverRemoved, s.equalsFn ?? Z, t);
686
686
  }
687
- It(Vt);
688
- function Dt(s) {
687
+ $t(qt);
688
+ function Kt(s, e, t = T.ofCaller()) {
689
+ let n, r;
690
+ n = s, r = void 0;
691
+ let i;
692
+ return new C(new M(r, void 0, n), (o) => {
693
+ i ? i.clear() : i = new X();
694
+ const d = n(o);
695
+ return d && i.add(d), d;
696
+ }, void 0, () => {
697
+ i && (i.dispose(), i = void 0);
698
+ }, Z, t);
699
+ }
700
+ function Jt(s) {
689
701
  switch (s) {
690
702
  case 1:
691
703
  return "dependenciesMightHaveChanged";
@@ -697,13 +709,13 @@ function Dt(s) {
697
709
  return "<unknown>";
698
710
  }
699
711
  }
700
- class Q {
712
+ class se {
701
713
  get debugName() {
702
714
  return this._debugNameData.getDebugName(this) ?? "(anonymous)";
703
715
  }
704
716
  constructor(e, t, n, r) {
705
717
  var i, o;
706
- this._debugNameData = e, this._runFn = t, this._changeTracker = n, this._state = 2, this._updateCount = 0, this._disposed = !1, this._dependencies = /* @__PURE__ */ new Set(), this._dependenciesToBeRemoved = /* @__PURE__ */ new Set(), this._isRunning = !1, this._store = void 0, this._delayedStore = void 0, this._changeSummary = (i = this._changeTracker) == null ? void 0 : i.createChangeSummary(void 0), (o = v()) == null || o.handleAutorunCreated(this, r), this._run();
718
+ this._debugNameData = e, this._runFn = t, this._changeTracker = n, this._state = 2, this._updateCount = 0, this._disposed = !1, this._dependencies = /* @__PURE__ */ new Set(), this._dependenciesToBeRemoved = /* @__PURE__ */ new Set(), this._isRunning = !1, this._store = void 0, this._delayedStore = void 0, this._changeSummary = (i = this._changeTracker) == null ? void 0 : i.createChangeSummary(void 0), (o = m()) == null || o.handleAutorunCreated(this, r), this._run();
707
719
  }
708
720
  dispose() {
709
721
  var e;
@@ -711,7 +723,7 @@ class Q {
711
723
  this._disposed = !0;
712
724
  for (const t of this._dependencies)
713
725
  t.removeObserver(this);
714
- this._dependencies.clear(), this._store !== void 0 && this._store.dispose(), this._delayedStore !== void 0 && this._delayedStore.dispose(), (e = v()) == null || e.handleAutorunDisposed(this);
726
+ this._dependencies.clear(), this._store !== void 0 && this._store.dispose(), this._delayedStore !== void 0 && this._delayedStore.dispose(), (e = m()) == null || e.handleAutorunDisposed(this);
715
727
  }
716
728
  }
717
729
  _run() {
@@ -720,19 +732,19 @@ class Q {
720
732
  this._dependenciesToBeRemoved = this._dependencies, this._dependencies = e, this._state = 3;
721
733
  try {
722
734
  if (!this._disposed) {
723
- (t = v()) == null || t.handleAutorunStarted(this);
735
+ (t = m()) == null || t.handleAutorunStarted(this);
724
736
  const o = this._changeSummary, d = this._delayedStore;
725
737
  d !== void 0 && (this._delayedStore = void 0);
726
738
  try {
727
739
  this._isRunning = !0, this._changeTracker && ((r = (n = this._changeTracker).beforeUpdate) == null || r.call(n, this, o), this._changeSummary = this._changeTracker.createChangeSummary(o)), this._store !== void 0 && (this._store.dispose(), this._store = void 0), this._runFn(this, o);
728
- } catch (l) {
729
- X(l);
740
+ } catch (c) {
741
+ ne(c);
730
742
  } finally {
731
743
  this._isRunning = !1, d !== void 0 && d.dispose();
732
744
  }
733
745
  }
734
746
  } finally {
735
- this._disposed || (i = v()) == null || i.handleAutorunFinished(this);
747
+ this._disposed || (i = m()) == null || i.handleAutorunFinished(this);
736
748
  for (const o of this._dependenciesToBeRemoved)
737
749
  o.removeObserver(this);
738
750
  this._dependenciesToBeRemoved.clear();
@@ -767,7 +779,7 @@ class Q {
767
779
  handleChange(e, t) {
768
780
  var n;
769
781
  if (this._isDependency(e)) {
770
- (n = v()) == null || n.handleAutorunDependencyChanged(this, e, t);
782
+ (n = m()) == null || n.handleAutorunDependencyChanged(this, e, t);
771
783
  try {
772
784
  (this._changeTracker ? this._changeTracker.handleChange({
773
785
  changedObservable: e,
@@ -775,7 +787,7 @@ class Q {
775
787
  didChange: (i) => i === e
776
788
  }, this._changeSummary) : !0) && (this._state = 2);
777
789
  } catch (r) {
778
- X(r);
790
+ ne(r);
779
791
  }
780
792
  }
781
793
  }
@@ -785,7 +797,7 @@ class Q {
785
797
  // IReader implementation
786
798
  _ensureNoRunning() {
787
799
  if (!this._isRunning)
788
- throw new x("The reader object cannot be used outside its compute function!");
800
+ throw new I("The reader object cannot be used outside its compute function!");
789
801
  }
790
802
  readObservable(e) {
791
803
  if (this._ensureNoRunning(), this._disposed)
@@ -796,13 +808,13 @@ class Q {
796
808
  }
797
809
  get store() {
798
810
  if (this._ensureNoRunning(), this._disposed)
799
- throw new x("Cannot access store after dispose");
800
- return this._store === void 0 && (this._store = new Y()), this._store;
811
+ throw new I("Cannot access store after dispose");
812
+ return this._store === void 0 && (this._store = new X()), this._store;
801
813
  }
802
814
  get delayedStore() {
803
815
  if (this._ensureNoRunning(), this._disposed)
804
- throw new x("Cannot access store after dispose");
805
- return this._delayedStore === void 0 && (this._delayedStore = new Y()), this._delayedStore;
816
+ throw new I("Cannot access store after dispose");
817
+ return this._delayedStore === void 0 && (this._delayedStore = new X()), this._delayedStore;
806
818
  }
807
819
  debugGetState() {
808
820
  return {
@@ -810,42 +822,42 @@ class Q {
810
822
  updateCount: this._updateCount,
811
823
  dependencies: this._dependencies,
812
824
  state: this._state,
813
- stateStr: Dt(this._state)
825
+ stateStr: Jt(this._state)
814
826
  };
815
827
  }
816
828
  debugRerun() {
817
829
  this._isRunning ? this._state = 2 : this._run();
818
830
  }
819
831
  }
820
- function Le(s, e = R.ofCaller()) {
821
- return new Q(new F(void 0, void 0, s), s, void 0, e);
832
+ function Ye(s, e = T.ofCaller()) {
833
+ return new se(new M(void 0, void 0, s), s, void 0, e);
822
834
  }
823
- function Ce(s) {
835
+ function ke(s) {
824
836
  const e = new Error("BugIndicatingErrorRecovery: " + s);
825
- de(e), console.error("recovered from an error that indicates a bug", e);
837
+ fe(e), console.error("recovered from an error that indicates a bug", e);
826
838
  }
827
- function $e(s, e) {
828
- const t = new Ue(s, e);
839
+ function Qe(s, e) {
840
+ const t = new et(s, e);
829
841
  try {
830
842
  s(t);
831
843
  } finally {
832
844
  t.finish();
833
845
  }
834
846
  }
835
- function At(s, e, t) {
836
- s ? e(s) : $e(e, t);
847
+ function Zt(s, e, t) {
848
+ s ? e(s) : Qe(e, t);
837
849
  }
838
- class Ue {
850
+ class et {
839
851
  constructor(e, t) {
840
852
  var n;
841
- this._fn = e, this._getDebugName = t, this._updatingObservers = [], (n = v()) == null || n.handleBeginTransaction(this);
853
+ this._fn = e, this._getDebugName = t, this._updatingObservers = [], (n = m()) == null || n.handleBeginTransaction(this);
842
854
  }
843
855
  getDebugName() {
844
- return this._getDebugName ? this._getDebugName() : ue(this._fn);
856
+ return this._getDebugName ? this._getDebugName() : Ce(this._fn);
845
857
  }
846
858
  updateObserver(e, t) {
847
859
  if (!this._updatingObservers) {
848
- Ce("Transaction already finished!"), $e((n) => {
860
+ ke("Transaction already finished!"), Qe((n) => {
849
861
  n.updateObserver(e, t);
850
862
  });
851
863
  return;
@@ -856,30 +868,30 @@ class Ue {
856
868
  var t;
857
869
  const e = this._updatingObservers;
858
870
  if (!e) {
859
- Ce("transaction.finish() has already been called!");
871
+ ke("transaction.finish() has already been called!");
860
872
  return;
861
873
  }
862
874
  for (let n = 0; n < e.length; n++) {
863
875
  const { observer: r, observable: i } = e[n];
864
876
  r.endUpdate(i);
865
877
  }
866
- this._updatingObservers = null, (t = v()) == null || t.handleEndTransaction(this);
878
+ this._updatingObservers = null, (t = m()) == null || t.handleEndTransaction(this);
867
879
  }
868
880
  debugGetUpdatingObservers() {
869
881
  return this._updatingObservers;
870
882
  }
871
883
  }
872
- function _(s, e, t = R.ofCaller()) {
884
+ function v(s, e, t = T.ofCaller()) {
873
885
  let n;
874
- return typeof s == "string" ? n = new F(void 0, s, void 0) : n = new F(s, void 0, void 0), new ee(n, e, q, t);
886
+ return typeof s == "string" ? n = new M(void 0, s, void 0) : n = new M(s, void 0, void 0), new re(n, e, Z, t);
875
887
  }
876
- class ee extends fe {
888
+ class re extends xe {
877
889
  get debugName() {
878
890
  return this._debugNameData.getDebugName(this) ?? "ObservableValue";
879
891
  }
880
892
  constructor(e, t, n, r) {
881
893
  var i;
882
- super(r), this._debugNameData = e, this._equalityComparator = n, this._value = t, (i = v()) == null || i.handleObservableUpdated(this, { hadValue: !1, newValue: t, change: void 0, didChange: !0, oldValue: void 0 });
894
+ super(r), this._debugNameData = e, this._equalityComparator = n, this._value = t, (i = m()) == null || i.handleObservableUpdated(this, { hadValue: !1, newValue: t, change: void 0, didChange: !0, oldValue: void 0 });
883
895
  }
884
896
  get() {
885
897
  return this._value;
@@ -889,11 +901,11 @@ class ee extends fe {
889
901
  if (n === void 0 && this._equalityComparator(this._value, e))
890
902
  return;
891
903
  let r;
892
- t || (t = r = new Ue(() => {
904
+ t || (t = r = new et(() => {
893
905
  }, () => `Setting ${this.debugName}`));
894
906
  try {
895
907
  const o = this._value;
896
- this._setValue(e), (i = v()) == null || i.handleObservableUpdated(this, { oldValue: o, newValue: e, change: n, didChange: !0, hadValue: !0 });
908
+ this._setValue(e), (i = m()) == null || i.handleObservableUpdated(this, { oldValue: o, newValue: e, change: n, didChange: !0, hadValue: !0 });
897
909
  for (const d of this._observers)
898
910
  t.updateObserver(d, this), d.handleChange(this, n);
899
911
  } finally {
@@ -915,25 +927,25 @@ class ee extends fe {
915
927
  this._value = e;
916
928
  }
917
929
  }
918
- function xe(...s) {
930
+ function De(...s) {
919
931
  let e, t, n, r;
920
- return s.length === 2 ? [t, n] = s : [e, t, n, r] = s, new k(new F(e, void 0, n), t, n, () => k.globalTransaction, q, r ?? R.ofCaller());
932
+ return s.length === 2 ? [t, n] = s : [e, t, n, r] = s, new A(new M(e, void 0, n), t, n, () => A.globalTransaction, Z, r ?? T.ofCaller());
921
933
  }
922
- class k extends fe {
934
+ class A extends xe {
923
935
  constructor(e, t, n, r, i, o) {
924
936
  super(o), this._debugNameData = e, this.event = t, this._getValue = n, this._getTransaction = r, this._equalityComparator = i, this._hasValue = !1, this.handleEvent = (d) => {
925
- var I;
926
- const l = this._getValue(d), h = this._value, g = !this._hasValue || !this._equalityComparator(h, l);
927
- let b = !1;
928
- g && (this._value = l, this._hasValue && (b = !0, At(this._getTransaction(), (S) => {
929
- var K;
930
- (K = v()) == null || K.handleObservableUpdated(this, { oldValue: h, newValue: l, change: void 0, didChange: g, hadValue: this._hasValue });
931
- for (const E of this._observers)
932
- S.updateObserver(E, this), E.handleChange(this, void 0);
937
+ var x;
938
+ const c = this._getValue(d), h = this._value, g = !this._hasValue || !this._equalityComparator(h, c);
939
+ let _ = !1;
940
+ g && (this._value = c, this._hasValue && (_ = !0, Zt(this._getTransaction(), (w) => {
941
+ var U;
942
+ (U = m()) == null || U.handleObservableUpdated(this, { oldValue: h, newValue: c, change: void 0, didChange: g, hadValue: this._hasValue });
943
+ for (const D of this._observers)
944
+ w.updateObserver(D, this), D.handleChange(this, void 0);
933
945
  }, () => {
934
- const S = this.getDebugName();
935
- return "Event fired" + (S ? `: ${S}` : "");
936
- })), this._hasValue = !0), b || (I = v()) == null || I.handleObservableUpdated(this, { oldValue: h, newValue: l, change: void 0, didChange: g, hadValue: this._hasValue });
946
+ const w = this.getDebugName();
947
+ return "Event fired" + (w ? `: ${w}` : "");
948
+ })), this._hasValue = !0), _ || (x = m()) == null || x.handleObservableUpdated(this, { oldValue: h, newValue: c, change: void 0, didChange: g, hadValue: this._hasValue });
937
949
  };
938
950
  }
939
951
  getDebugName() {
@@ -960,39 +972,39 @@ class k extends fe {
960
972
  }
961
973
  }
962
974
  (function(s) {
963
- s.Observer = k;
975
+ s.Observer = A;
964
976
  function e(t, n) {
965
977
  let r = !1;
966
- k.globalTransaction === void 0 && (k.globalTransaction = t, r = !0);
978
+ A.globalTransaction === void 0 && (A.globalTransaction = t, r = !0);
967
979
  try {
968
980
  n();
969
981
  } finally {
970
- r && (k.globalTransaction = void 0);
982
+ r && (A.globalTransaction = void 0);
971
983
  }
972
984
  }
973
985
  s.batchEventsGlobally = e;
974
- })(xe || (xe = {}));
975
- function Bt(s) {
976
- const e = new je(!1, void 0);
977
- return s.addObserver(e), He(() => {
986
+ })(De || (De = {}));
987
+ function Xt(s) {
988
+ const e = new tt(!1, void 0);
989
+ return s.addObserver(e), Xe(() => {
978
990
  s.removeObserver(e);
979
991
  });
980
992
  }
981
- Tt(Bt);
982
- function Mt(s, e) {
983
- const t = new je(!0, e);
993
+ jt(Xt);
994
+ function Yt(s, e) {
995
+ const t = new tt(!0, e);
984
996
  s.addObserver(t);
985
997
  try {
986
998
  t.beginUpdate(s);
987
999
  } finally {
988
1000
  t.endUpdate(s);
989
1001
  }
990
- return He(() => {
1002
+ return Xe(() => {
991
1003
  s.removeObserver(t);
992
1004
  });
993
1005
  }
994
- Ot(Mt);
995
- class je {
1006
+ Ut(Yt);
1007
+ class tt {
996
1008
  constructor(e, t) {
997
1009
  this._forceRecompute = e, this._handleValue = t, this._counter = 0;
998
1010
  }
@@ -1007,11 +1019,11 @@ class je {
1007
1019
  handleChange(e, t) {
1008
1020
  }
1009
1021
  }
1010
- let Z;
1011
- function Ft(s) {
1012
- Z || (Z = new Et(), Be(Z)), Z.addFilteredObj(s);
1022
+ let te;
1023
+ function Qt(s) {
1024
+ te || (te = new en(), We(te)), te.addFilteredObj(s);
1013
1025
  }
1014
- class Et {
1026
+ class en {
1015
1027
  constructor() {
1016
1028
  this.indentation = 0, this.changedObservablesSets = /* @__PURE__ */ new WeakMap();
1017
1029
  }
@@ -1023,32 +1035,32 @@ class Et {
1023
1035
  return ((t = this._filteredObjects) == null ? void 0 : t.has(e)) ?? !0;
1024
1036
  }
1025
1037
  textToConsoleArgs(e) {
1026
- return zt([
1027
- z($t("| ", this.indentation)),
1038
+ return tn([
1039
+ j(rn("| ", this.indentation)),
1028
1040
  e
1029
1041
  ]);
1030
1042
  }
1031
1043
  formatInfo(e) {
1032
1044
  return e.hadValue ? e.didChange ? [
1033
- z(" "),
1034
- C(T(e.oldValue, 70), {
1045
+ j(" "),
1046
+ S(V(e.oldValue, 70), {
1035
1047
  color: "red",
1036
1048
  strikeThrough: !0
1037
1049
  }),
1038
- z(" "),
1039
- C(T(e.newValue, 60), {
1050
+ j(" "),
1051
+ S(V(e.newValue, 60), {
1040
1052
  color: "green"
1041
1053
  })
1042
- ] : [z(" (unchanged)")] : [
1043
- z(" "),
1044
- C(T(e.newValue, 60), {
1054
+ ] : [j(" (unchanged)")] : [
1055
+ j(" "),
1056
+ S(V(e.newValue, 60), {
1045
1057
  color: "green"
1046
1058
  }),
1047
- z(" (initial)")
1059
+ j(" (initial)")
1048
1060
  ];
1049
1061
  }
1050
1062
  handleObservableCreated(e) {
1051
- if (e instanceof y) {
1063
+ if (e instanceof C) {
1052
1064
  const t = e;
1053
1065
  this.changedObservablesSets.set(t, /* @__PURE__ */ new Set());
1054
1066
  }
@@ -1057,20 +1069,20 @@ class Et {
1057
1069
  }
1058
1070
  handleObservableUpdated(e, t) {
1059
1071
  if (this._isIncluded(e)) {
1060
- if (e instanceof y) {
1072
+ if (e instanceof C) {
1061
1073
  this._handleDerivedRecomputed(e, t);
1062
1074
  return;
1063
1075
  }
1064
1076
  console.log(...this.textToConsoleArgs([
1065
- H("observable value changed"),
1066
- C(e.debugName, { color: "BlueViolet" }),
1077
+ P("observable value changed"),
1078
+ S(e.debugName, { color: "BlueViolet" }),
1067
1079
  ...this.formatInfo(t)
1068
1080
  ]));
1069
1081
  }
1070
1082
  }
1071
1083
  formatChanges(e) {
1072
1084
  if (e.size !== 0)
1073
- return C(" (changed deps: " + [...e].map((t) => t.debugName).join(", ") + ")", { color: "gray" });
1085
+ return S(" (changed deps: " + [...e].map((t) => t.debugName).join(", ") + ")", { color: "gray" });
1074
1086
  }
1075
1087
  handleDerivedDependencyChanged(e, t, n) {
1076
1088
  var r;
@@ -1081,8 +1093,8 @@ class Et {
1081
1093
  return;
1082
1094
  const n = this.changedObservablesSets.get(e);
1083
1095
  n && (console.log(...this.textToConsoleArgs([
1084
- H("derived recomputed"),
1085
- C(e.debugName, { color: "BlueViolet" }),
1096
+ P("derived recomputed"),
1097
+ S(e.debugName, { color: "BlueViolet" }),
1086
1098
  ...this.formatInfo(t),
1087
1099
  this.formatChanges(n),
1088
1100
  { data: [{ fn: e._debugNameData.referenceFn ?? e._computeFn }] }
@@ -1090,14 +1102,14 @@ class Et {
1090
1102
  }
1091
1103
  handleDerivedCleared(e) {
1092
1104
  this._isIncluded(e) && console.log(...this.textToConsoleArgs([
1093
- H("derived cleared"),
1094
- C(e.debugName, { color: "BlueViolet" })
1105
+ P("derived cleared"),
1106
+ S(e.debugName, { color: "BlueViolet" })
1095
1107
  ]));
1096
1108
  }
1097
1109
  handleFromEventObservableTriggered(e, t) {
1098
1110
  this._isIncluded(e) && console.log(...this.textToConsoleArgs([
1099
- H("observable from event triggered"),
1100
- C(e.debugName, { color: "BlueViolet" }),
1111
+ P("observable from event triggered"),
1112
+ S(e.debugName, { color: "BlueViolet" }),
1101
1113
  ...this.formatInfo(t),
1102
1114
  { data: [{ fn: e._getValue }] }
1103
1115
  ]));
@@ -1113,8 +1125,8 @@ class Et {
1113
1125
  handleAutorunStarted(e) {
1114
1126
  const t = this.changedObservablesSets.get(e);
1115
1127
  t && (this._isIncluded(e) && console.log(...this.textToConsoleArgs([
1116
- H("autorun"),
1117
- C(e.debugName, { color: "BlueViolet" }),
1128
+ P("autorun"),
1129
+ S(e.debugName, { color: "BlueViolet" }),
1118
1130
  this.formatChanges(t),
1119
1131
  { data: [{ fn: e._debugNameData.referenceFn ?? e._runFn }] }
1120
1132
  ])), t.clear(), this.indentation++);
@@ -1125,8 +1137,8 @@ class Et {
1125
1137
  handleBeginTransaction(e) {
1126
1138
  let t = e.getDebugName();
1127
1139
  t === void 0 && (t = ""), this._isIncluded(e) && console.log(...this.textToConsoleArgs([
1128
- H("transaction"),
1129
- C(t, { color: "BlueViolet" }),
1140
+ P("transaction"),
1141
+ S(t, { color: "BlueViolet" }),
1130
1142
  { data: [{ fn: e._fn }] }
1131
1143
  ])), this.indentation++;
1132
1144
  }
@@ -1134,7 +1146,7 @@ class Et {
1134
1146
  this.indentation--;
1135
1147
  }
1136
1148
  }
1137
- function zt(s) {
1149
+ function tn(s) {
1138
1150
  const e = new Array(), t = [];
1139
1151
  let n = "";
1140
1152
  function r(o) {
@@ -1147,13 +1159,13 @@ function zt(s) {
1147
1159
  const i = [n, ...e];
1148
1160
  return i.push(...t), i;
1149
1161
  }
1150
- function z(s) {
1151
- return C(s, { color: "black" });
1162
+ function j(s) {
1163
+ return S(s, { color: "black" });
1152
1164
  }
1153
- function H(s) {
1154
- return C(Ut(`${s}: `, 10), { color: "black", bold: !0 });
1165
+ function P(s) {
1166
+ return S(on(`${s}: `, 10), { color: "black", bold: !0 });
1155
1167
  }
1156
- function C(s, e = {
1168
+ function S(s, e = {
1157
1169
  color: "black"
1158
1170
  }) {
1159
1171
  function t(r) {
@@ -1167,7 +1179,7 @@ function C(s, e = {
1167
1179
  style: t(n)
1168
1180
  };
1169
1181
  }
1170
- function T(s, e) {
1182
+ function V(s, e) {
1171
1183
  switch (typeof s) {
1172
1184
  case "number":
1173
1185
  return "" + s;
@@ -1178,7 +1190,7 @@ function T(s, e) {
1178
1190
  case "undefined":
1179
1191
  return "undefined";
1180
1192
  case "object":
1181
- return s === null ? "null" : Array.isArray(s) ? Ht(s, e) : Lt(s, e);
1193
+ return s === null ? "null" : Array.isArray(s) ? nn(s, e) : sn(s, e);
1182
1194
  case "symbol":
1183
1195
  return s.toString();
1184
1196
  case "function":
@@ -1187,50 +1199,50 @@ function T(s, e) {
1187
1199
  return "" + s;
1188
1200
  }
1189
1201
  }
1190
- function Ht(s, e) {
1202
+ function nn(s, e) {
1191
1203
  let t = "[ ", n = !0;
1192
1204
  for (const r of s) {
1193
1205
  if (n || (t += ", "), t.length - 5 > e) {
1194
1206
  t += "...";
1195
1207
  break;
1196
1208
  }
1197
- n = !1, t += `${T(r, e - t.length)}`;
1209
+ n = !1, t += `${V(r, e - t.length)}`;
1198
1210
  }
1199
1211
  return t += " ]", t;
1200
1212
  }
1201
- function Lt(s, e) {
1213
+ function sn(s, e) {
1202
1214
  if (typeof s.toString == "function" && s.toString !== Object.prototype.toString) {
1203
1215
  const i = s.toString();
1204
1216
  return i.length <= e ? i : i.substring(0, e - 3) + "...";
1205
1217
  }
1206
- const t = Me(s);
1218
+ const t = qe(s);
1207
1219
  let n = t ? t + "(" : "{ ", r = !0;
1208
1220
  for (const [i, o] of Object.entries(s)) {
1209
1221
  if (r || (n += ", "), n.length - 5 > e) {
1210
1222
  n += "...";
1211
1223
  break;
1212
1224
  }
1213
- r = !1, n += `${i}: ${T(o, e - n.length)}`;
1225
+ r = !1, n += `${i}: ${V(o, e - n.length)}`;
1214
1226
  }
1215
1227
  return n += t ? ")" : " }", n;
1216
1228
  }
1217
- function $t(s, e) {
1229
+ function rn(s, e) {
1218
1230
  let t = "";
1219
1231
  for (let n = 1; n <= e; n++)
1220
1232
  t += s;
1221
1233
  return t;
1222
1234
  }
1223
- function Ut(s, e) {
1235
+ function on(s, e) {
1224
1236
  for (; s.length < e; )
1225
1237
  s += " ";
1226
1238
  return s;
1227
1239
  }
1228
- class te {
1240
+ class ie {
1229
1241
  static createHost(e, t) {
1230
- return new te(e, t);
1242
+ return new ie(e, t);
1231
1243
  }
1232
1244
  static createClient(e, t) {
1233
- return new te(e, t);
1245
+ return new ie(e, t);
1234
1246
  }
1235
1247
  constructor(e, t) {
1236
1248
  this._channelFactory = e, this._getHandler = t, this._channel = this._channelFactory({
@@ -1251,10 +1263,10 @@ class te {
1251
1263
  });
1252
1264
  const n = new Proxy({}, {
1253
1265
  get: (i, o) => async (...d) => {
1254
- const l = await this._channel.sendRequest([o, d]);
1255
- if (l.type === "error")
1256
- throw l.value;
1257
- return l.value;
1266
+ const c = await this._channel.sendRequest([o, d]);
1267
+ if (c.type === "error")
1268
+ throw c.value;
1269
+ return c.value;
1258
1270
  }
1259
1271
  }), r = new Proxy({}, {
1260
1272
  get: (i, o) => (...d) => {
@@ -1264,27 +1276,27 @@ class te {
1264
1276
  this.api = { notifications: r, requests: n };
1265
1277
  }
1266
1278
  }
1267
- function jt(s, e) {
1279
+ function an(s, e) {
1268
1280
  const t = globalThis;
1269
1281
  let n = [], r;
1270
- const { channel: i, handler: o } = Pt({
1271
- sendNotification: (l) => {
1272
- r ? r.sendNotification(l) : n.push(l);
1282
+ const { channel: i, handler: o } = dn({
1283
+ sendNotification: (c) => {
1284
+ r ? r.sendNotification(c) : n.push(c);
1273
1285
  }
1274
1286
  });
1275
1287
  let d;
1276
- return (t.$$debugValueEditor_debugChannels ?? (t.$$debugValueEditor_debugChannels = {}))[s] = (l) => {
1277
- d = e(), r = l;
1288
+ return (t.$$debugValueEditor_debugChannels ?? (t.$$debugValueEditor_debugChannels = {}))[s] = (c) => {
1289
+ d = e(), r = c;
1278
1290
  for (const h of n)
1279
- l.sendNotification(h);
1291
+ c.sendNotification(h);
1280
1292
  return n = [], o;
1281
- }, te.createClient(i, () => {
1293
+ }, ie.createClient(i, () => {
1282
1294
  if (!d)
1283
1295
  throw new Error("Not supported");
1284
1296
  return d;
1285
1297
  });
1286
1298
  }
1287
- function Pt(s) {
1299
+ function dn(s) {
1288
1300
  let e;
1289
1301
  return {
1290
1302
  channel: (n) => (e = n, {
@@ -1300,7 +1312,7 @@ function Pt(s) {
1300
1312
  }
1301
1313
  };
1302
1314
  }
1303
- class Gt {
1315
+ class cn {
1304
1316
  constructor() {
1305
1317
  this._timeout = void 0;
1306
1318
  }
@@ -1313,17 +1325,17 @@ class Gt {
1313
1325
  this._timeout !== void 0 && clearTimeout(this._timeout);
1314
1326
  }
1315
1327
  }
1316
- function Pe(s, e) {
1328
+ function nt(s, e) {
1317
1329
  for (const t in e)
1318
- s[t] && typeof s[t] == "object" && e[t] && typeof e[t] == "object" ? Pe(s[t], e[t]) : s[t] = e[t];
1330
+ s[t] && typeof s[t] == "object" && e[t] && typeof e[t] == "object" ? nt(s[t], e[t]) : s[t] = e[t];
1319
1331
  }
1320
- function Ge(s, e) {
1332
+ function st(s, e) {
1321
1333
  for (const t in e)
1322
- e[t] === null ? delete s[t] : s[t] && typeof s[t] == "object" && e[t] && typeof e[t] == "object" ? Ge(s[t], e[t]) : s[t] = e[t];
1334
+ e[t] === null ? delete s[t] : s[t] && typeof s[t] == "object" && e[t] && typeof e[t] == "object" ? st(s[t], e[t]) : s[t] = e[t];
1323
1335
  }
1324
- class M {
1336
+ class $ {
1325
1337
  static getInstance() {
1326
- return M._instance === void 0 && (M._instance = new M()), M._instance;
1338
+ return $._instance === void 0 && ($._instance = new $()), $._instance;
1327
1339
  }
1328
1340
  getTransactionState() {
1329
1341
  const e = [], t = [...this._activeTransactions];
@@ -1345,7 +1357,7 @@ class M {
1345
1357
  _getObservableInfo(e) {
1346
1358
  const t = this._instanceInfos.get(e);
1347
1359
  if (!t) {
1348
- de(new x("No info found"));
1360
+ fe(new I("No info found"));
1349
1361
  return;
1350
1362
  }
1351
1363
  return t;
@@ -1353,23 +1365,23 @@ class M {
1353
1365
  _getAutorunInfo(e) {
1354
1366
  const t = this._instanceInfos.get(e);
1355
1367
  if (!t) {
1356
- de(new x("No info found"));
1368
+ fe(new I("No info found"));
1357
1369
  return;
1358
1370
  }
1359
1371
  return t;
1360
1372
  }
1361
1373
  _getInfo(e, t) {
1362
- if (e instanceof y) {
1374
+ if (e instanceof C) {
1363
1375
  const n = [...e.debugGetObservers()];
1364
- for (const l of n)
1365
- t(l);
1376
+ for (const c of n)
1377
+ t(c);
1366
1378
  const r = this._getObservableInfo(e);
1367
1379
  if (!r)
1368
1380
  return;
1369
- const i = e.debugGetState(), o = { name: e.debugName, instanceId: r.instanceId, updateCount: i.updateCount }, d = [...r.changedObservables].map((l) => {
1381
+ const i = e.debugGetState(), o = { name: e.debugName, instanceId: r.instanceId, updateCount: i.updateCount }, d = [...r.changedObservables].map((c) => {
1370
1382
  var h;
1371
- return (h = this._instanceInfos.get(l)) == null ? void 0 : h.instanceId;
1372
- }).filter(G);
1383
+ return (h = this._instanceInfos.get(c)) == null ? void 0 : h.instanceId;
1384
+ }).filter(Y);
1373
1385
  if (i.isComputing)
1374
1386
  return { ...o, type: "observable/derived", state: "updating", changedDependencies: d, initialComputation: !1 };
1375
1387
  switch (i.state) {
@@ -1382,7 +1394,7 @@ class M {
1382
1394
  case 1:
1383
1395
  return { ...o, type: "observable/derived", state: "possiblyStale" };
1384
1396
  }
1385
- } else if (e instanceof Q) {
1397
+ } else if (e instanceof se) {
1386
1398
  const n = this._getAutorunInfo(e);
1387
1399
  if (!n)
1388
1400
  return;
@@ -1406,14 +1418,14 @@ class M {
1406
1418
  }
1407
1419
  _formatObserver(e) {
1408
1420
  var n;
1409
- if (e instanceof y)
1421
+ if (e instanceof C)
1410
1422
  return { name: e.toString(), instanceId: (n = this._getObservableInfo(e)) == null ? void 0 : n.instanceId };
1411
1423
  const t = this._getAutorunInfo(e);
1412
1424
  if (t)
1413
1425
  return { name: e.toString(), instanceId: t.instanceId };
1414
1426
  }
1415
1427
  constructor() {
1416
- this._declarationId = 0, this._instanceId = 0, this._declarations = /* @__PURE__ */ new Map(), this._instanceInfos = /* @__PURE__ */ new WeakMap(), this._aliveInstances = /* @__PURE__ */ new Map(), this._activeTransactions = /* @__PURE__ */ new Set(), this._channel = jt("observableDevTools", () => ({
1428
+ this._declarationId = 0, this._instanceId = 0, this._declarations = /* @__PURE__ */ new Map(), this._instanceInfos = /* @__PURE__ */ new WeakMap(), this._aliveInstances = /* @__PURE__ */ new Map(), this._activeTransactions = /* @__PURE__ */ new Set(), this._channel = an("observableDevTools", () => ({
1417
1429
  notifications: {
1418
1430
  setDeclarationIdFilter: (e) => {
1419
1431
  },
@@ -1436,29 +1448,29 @@ class M {
1436
1448
  },
1437
1449
  getSummarizedInstances: () => null,
1438
1450
  getObservableValueInfo: (e) => ({
1439
- observers: [...this._aliveInstances.get(e).debugGetObservers()].map((n) => this._formatObserver(n)).filter(G)
1451
+ observers: [...this._aliveInstances.get(e).debugGetObservers()].map((n) => this._formatObserver(n)).filter(Y)
1440
1452
  }),
1441
1453
  getDerivedInfo: (e) => {
1442
1454
  const t = this._aliveInstances.get(e);
1443
1455
  return {
1444
- dependencies: [...t.debugGetState().dependencies].map((n) => this._formatObservable(n)).filter(G),
1445
- observers: [...t.debugGetObservers()].map((n) => this._formatObserver(n)).filter(G)
1456
+ dependencies: [...t.debugGetState().dependencies].map((n) => this._formatObservable(n)).filter(Y),
1457
+ observers: [...t.debugGetObservers()].map((n) => this._formatObserver(n)).filter(Y)
1446
1458
  };
1447
1459
  },
1448
1460
  getAutorunInfo: (e) => ({
1449
- dependencies: [...this._aliveInstances.get(e).debugGetState().dependencies].map((n) => this._formatObservable(n)).filter(G)
1461
+ dependencies: [...this._aliveInstances.get(e).debugGetState().dependencies].map((n) => this._formatObservable(n)).filter(Y)
1450
1462
  }),
1451
1463
  getTransactionState: () => this.getTransactionState(),
1452
1464
  setValue: (e, t) => {
1453
1465
  const n = this._aliveInstances.get(e);
1454
- if (n instanceof y)
1466
+ if (n instanceof C)
1455
1467
  n.debugSetValue(t);
1456
- else if (n instanceof ee)
1468
+ else if (n instanceof re)
1457
1469
  n.debugSetValue(t);
1458
- else if (n instanceof k)
1470
+ else if (n instanceof A)
1459
1471
  n.debugSetValue(t);
1460
1472
  else
1461
- throw new x("Observable is not supported");
1473
+ throw new I("Observable is not supported");
1462
1474
  const r = [...n.debugGetObservers()];
1463
1475
  for (const i of r)
1464
1476
  i.beginUpdate(n);
@@ -1469,34 +1481,34 @@ class M {
1469
1481
  },
1470
1482
  getValue: (e) => {
1471
1483
  const t = this._aliveInstances.get(e);
1472
- if (t instanceof y)
1473
- return T(t.debugGetState().value, 200);
1474
- if (t instanceof ee)
1475
- return T(t.debugGetState().value, 200);
1484
+ if (t instanceof C)
1485
+ return V(t.debugGetState().value, 200);
1486
+ if (t instanceof re)
1487
+ return V(t.debugGetState().value, 200);
1476
1488
  },
1477
1489
  logValue: (e) => {
1478
1490
  const t = this._aliveInstances.get(e);
1479
1491
  if (t && "get" in t)
1480
1492
  console.log("Logged Value:", t.get());
1481
1493
  else
1482
- throw new x("Observable is not supported");
1494
+ throw new I("Observable is not supported");
1483
1495
  },
1484
1496
  rerun: (e) => {
1485
1497
  const t = this._aliveInstances.get(e);
1486
- if (t instanceof y)
1498
+ if (t instanceof C)
1487
1499
  t.debugRecompute();
1488
- else if (t instanceof Q)
1500
+ else if (t instanceof se)
1489
1501
  t.debugRerun();
1490
1502
  else
1491
- throw new x("Observable is not supported");
1503
+ throw new I("Observable is not supported");
1492
1504
  }
1493
1505
  }
1494
- })), this._pendingChanges = null, this._changeThrottler = new Gt(), this._fullState = {}, this._flushUpdates = () => {
1506
+ })), this._pendingChanges = null, this._changeThrottler = new cn(), this._fullState = {}, this._flushUpdates = () => {
1495
1507
  this._pendingChanges !== null && (this._channel.api.notifications.handleChange(this._pendingChanges, !1), this._pendingChanges = null);
1496
- }, R.enable();
1508
+ }, T.enable();
1497
1509
  }
1498
1510
  _handleChange(e) {
1499
- Ge(this._fullState, e), this._pendingChanges === null ? this._pendingChanges = e : Pe(this._pendingChanges, e), this._changeThrottler.throttle(this._flushUpdates, 10);
1511
+ st(this._fullState, e), this._pendingChanges === null ? this._pendingChanges = e : nt(this._pendingChanges, e), this._changeThrottler.throttle(this._flushUpdates, 10);
1500
1512
  }
1501
1513
  _getDeclarationId(e, t) {
1502
1514
  if (!t)
@@ -1525,7 +1537,7 @@ class M {
1525
1537
  const n = this._getObservableInfo(e);
1526
1538
  if (n) {
1527
1539
  if (n.listenerCount === 0 && t > 0) {
1528
- const r = e instanceof y ? "observable/derived" : "observable/value";
1540
+ const r = e instanceof C ? "observable/derived" : "observable/value";
1529
1541
  this._aliveInstances.set(n.instanceId, e), this._handleChange({
1530
1542
  instances: {
1531
1543
  [n.instanceId]: {
@@ -1544,12 +1556,12 @@ class M {
1544
1556
  }
1545
1557
  }
1546
1558
  handleObservableUpdated(e, t) {
1547
- if (e instanceof y) {
1559
+ if (e instanceof C) {
1548
1560
  this._handleDerivedRecomputed(e, t);
1549
1561
  return;
1550
1562
  }
1551
1563
  const n = this._getObservableInfo(e);
1552
- n && t.didChange && (n.lastValue = T(t.newValue, 30), n.listenerCount > 0 && this._handleChange({
1564
+ n && t.didChange && (n.lastValue = V(t.newValue, 30), n.listenerCount > 0 && this._handleChange({
1553
1565
  instances: { [n.instanceId]: { formattedValue: n.lastValue } }
1554
1566
  }));
1555
1567
  }
@@ -1598,7 +1610,7 @@ class M {
1598
1610
  const n = this._getObservableInfo(e);
1599
1611
  if (!n)
1600
1612
  return;
1601
- const r = T(t.newValue, 30);
1613
+ const r = V(t.newValue, 30);
1602
1614
  n.updateCount++, n.changedObservables.clear(), n.lastValue = r, n.listenerCount > 0 && this._handleChange({
1603
1615
  instances: { [n.instanceId]: { formattedValue: r, recomputationCount: n.updateCount } }
1604
1616
  });
@@ -1620,57 +1632,57 @@ class M {
1620
1632
  this._activeTransactions.delete(e);
1621
1633
  }
1622
1634
  }
1623
- M._instance = void 0;
1624
- function Wt(s, e) {
1625
- const t = (e == null ? void 0 : e.debugNamePostProcessor) ?? ((i) => i), n = w.from(s, t);
1626
- return n ? We(n, 0, /* @__PURE__ */ new Set()).trim() : "";
1635
+ $._instance = void 0;
1636
+ function ln(s, e) {
1637
+ const t = (e == null ? void 0 : e.debugNamePostProcessor) ?? ((i) => i), n = O.from(s, t);
1638
+ return n ? rt(n, 0, /* @__PURE__ */ new Set()).trim() : "";
1627
1639
  }
1628
- function We(s, e, t) {
1640
+ function rt(s, e, t) {
1629
1641
  const n = " ".repeat(e), r = [];
1630
1642
  if (t.has(s.sourceObj))
1631
1643
  return r.push(`${n}* ${s.type} ${s.name} (already listed)`), r.join(`
1632
1644
  `);
1633
- if (t.add(s.sourceObj), r.push(`${n}* ${s.type} ${s.name}:`), r.push(`${n} value: ${T(s.value, 50)}`), r.push(`${n} state: ${s.state}`), s.dependencies.length > 0) {
1645
+ if (t.add(s.sourceObj), r.push(`${n}* ${s.type} ${s.name}:`), r.push(`${n} value: ${V(s.value, 50)}`), r.push(`${n} state: ${s.state}`), s.dependencies.length > 0) {
1634
1646
  r.push(`${n} dependencies:`);
1635
1647
  for (const o of s.dependencies)
1636
- r.push(We(o, e + 1, t));
1648
+ r.push(rt(o, e + 1, t));
1637
1649
  }
1638
1650
  return r.join(`
1639
1651
  `);
1640
1652
  }
1641
- class w {
1653
+ class O {
1642
1654
  static from(e, t) {
1643
- if (e instanceof Q) {
1655
+ if (e instanceof se) {
1644
1656
  const n = e.debugGetState();
1645
- return new w(e, t(e.debugName), "autorun", void 0, n.stateStr, Array.from(n.dependencies).map((r) => w.from(r, t) || w.unknown(r)));
1646
- } else if (e instanceof y) {
1657
+ return new O(e, t(e.debugName), "autorun", void 0, n.stateStr, Array.from(n.dependencies).map((r) => O.from(r, t) || O.unknown(r)));
1658
+ } else if (e instanceof C) {
1647
1659
  const n = e.debugGetState();
1648
- return new w(e, t(e.debugName), "derived", n.value, n.stateStr, Array.from(n.dependencies).map((r) => w.from(r, t) || w.unknown(r)));
1649
- } else if (e instanceof ee) {
1660
+ return new O(e, t(e.debugName), "derived", n.value, n.stateStr, Array.from(n.dependencies).map((r) => O.from(r, t) || O.unknown(r)));
1661
+ } else if (e instanceof re) {
1650
1662
  const n = e.debugGetState();
1651
- return new w(e, t(e.debugName), "observableValue", n.value, "upToDate", []);
1652
- } else if (e instanceof k) {
1663
+ return new O(e, t(e.debugName), "observableValue", n.value, "upToDate", []);
1664
+ } else if (e instanceof A) {
1653
1665
  const n = e.debugGetState();
1654
- return new w(e, t(e.debugName), "fromEvent", n.value, n.hasValue ? "upToDate" : "initial", []);
1666
+ return new O(e, t(e.debugName), "fromEvent", n.value, n.hasValue ? "upToDate" : "initial", []);
1655
1667
  }
1656
1668
  }
1657
1669
  static unknown(e) {
1658
- return new w(e, "(unknown)", "unknown", void 0, "unknown", []);
1670
+ return new O(e, "(unknown)", "unknown", void 0, "unknown", []);
1659
1671
  }
1660
1672
  constructor(e, t, n, r, i, o) {
1661
1673
  this.sourceObj = e, this.name = t, this.type = n, this.value = r, this.state = i, this.dependencies = o;
1662
1674
  }
1663
1675
  }
1664
- Rt(Wt);
1665
- _t(Ft);
1666
- Be(M.getInstance());
1667
- class qe {
1676
+ Pt(ln);
1677
+ Mt(Qt);
1678
+ We($.getInstance());
1679
+ class it {
1668
1680
  constructor() {
1669
- c(this, "_fixtures", _(this, /* @__PURE__ */ new Map()));
1681
+ l(this, "_fixtures", v(this, /* @__PURE__ */ new Map()));
1670
1682
  /** Observable root of the fixture tree */
1671
- c(this, "root", j(this, (e) => {
1683
+ l(this, "root", N(this, (e) => {
1672
1684
  const t = this._fixtures.read(e);
1673
- return re(t);
1685
+ return ce(t);
1674
1686
  }));
1675
1687
  }
1676
1688
  /**
@@ -1701,25 +1713,25 @@ class qe {
1701
1713
  */
1702
1714
  getNode(e, t) {
1703
1715
  const n = this.root.read(e);
1704
- return ve(n, t);
1716
+ return Oe(n, t);
1705
1717
  }
1706
1718
  /**
1707
1719
  * Gets a component by path (non-reactive, for use in preview iframe).
1708
1720
  * @param path Array of path segments (e.g., ['Button', 'Primary'])
1709
1721
  */
1710
1722
  getComponentByPath(e) {
1711
- const t = this._fixtures.get(), n = re(t), r = ve(n, e);
1723
+ const t = this._fixtures.get(), n = ce(t), r = Oe(n, e);
1712
1724
  return r == null ? void 0 : r.component;
1713
1725
  }
1714
1726
  }
1715
- class Zn {
1727
+ class ws {
1716
1728
  constructor(e, t) {
1717
- c(this, "sessionId", Math.random().toString(36).slice(2));
1718
- c(this, "_updateVersion", 0);
1719
- c(this, "_root");
1720
- c(this, "_fixtureModules");
1721
- c(this, "_currentDisposable");
1722
- c(this, "_currentContainer");
1729
+ l(this, "sessionId", Math.random().toString(36).slice(2));
1730
+ l(this, "_updateVersion", 0);
1731
+ l(this, "_root");
1732
+ l(this, "_fixtureModules");
1733
+ l(this, "_currentDisposable");
1734
+ l(this, "_currentContainer");
1723
1735
  this._containerElement = e, this._fixtureModules = t, this._root = this._buildRegistry(), this._installGlobalApi();
1724
1736
  const n = this._flattenFixtures(this._root).length;
1725
1737
  console.log("[cli] CLI entry initialized, sessionId:", this.sessionId, "version:", this._updateVersion, "fixtures:", n);
@@ -1745,14 +1757,14 @@ class Zn {
1745
1757
  this._currentDisposable && (this._currentDisposable.dispose(), this._currentDisposable = void 0), this._currentContainer && (this._currentContainer.remove(), this._currentContainer = void 0);
1746
1758
  const n = document.createElement("div");
1747
1759
  n.style.display = "inline-block", this._containerElement.appendChild(n), this._currentContainer = n;
1748
- const r = t.component, i = ht(r.properties);
1760
+ const r = t.component, i = Tt(r.properties);
1749
1761
  let o = n;
1750
1762
  if (r.isolation === "shadow-dom") {
1751
- const l = n.attachShadow({ mode: "open" });
1752
- o = document.createElement("div"), l.appendChild(o);
1763
+ const c = n.attachShadow({ mode: "open" });
1764
+ o = document.createElement("div"), c.appendChild(o);
1753
1765
  }
1754
1766
  const d = r.render(o, i);
1755
- this._currentDisposable = d && typeof d == "object" && "dispose" in d ? d : void 0, await new Promise((l) => requestAnimationFrame(() => requestAnimationFrame(() => l())));
1767
+ this._currentDisposable = d && typeof d == "object" && "dispose" in d ? d : void 0, await new Promise((c) => requestAnimationFrame(() => requestAnimationFrame(() => c())));
1756
1768
  }
1757
1769
  _buildRegistry() {
1758
1770
  const e = /* @__PURE__ */ new Map();
@@ -1760,7 +1772,7 @@ class Zn {
1760
1772
  const r = n.default;
1761
1773
  r && typeof r == "object" && e.set(t, r);
1762
1774
  }
1763
- return re(e);
1775
+ return ce(e);
1764
1776
  }
1765
1777
  _flattenFixtures(e, t = []) {
1766
1778
  const n = [];
@@ -1791,17 +1803,186 @@ class Zn {
1791
1803
  });
1792
1804
  }
1793
1805
  }
1794
- function Ke(s) {
1806
+ class hn {
1807
+ constructor(e) {
1808
+ this._run = e, this._changes = [], this._map = /* @__PURE__ */ new Map(), this._updateCounter = 0;
1809
+ }
1810
+ addDependency(e, t) {
1811
+ return this._map.set(e, t), e.addObserver(this), {
1812
+ dispose: () => {
1813
+ this._map.delete(e), e.removeObserver(this);
1814
+ }
1815
+ };
1816
+ }
1817
+ beginUpdate(e) {
1818
+ this._updateCounter++, this._changes.push(this._map.get(e));
1819
+ }
1820
+ endUpdate(e) {
1821
+ if (this._updateCounter--, this._updateCounter === 0 && this._changes.length > 0) {
1822
+ const t = this._changes;
1823
+ this._changes = [], this._run(t);
1824
+ }
1825
+ }
1826
+ handlePossibleChange(e) {
1827
+ this._changes.push(this._map.get(e));
1828
+ }
1829
+ handleChange(e, t) {
1830
+ }
1831
+ }
1832
+ function f() {
1833
+ return pe.instance;
1834
+ }
1835
+ function un() {
1836
+ return ge.instance;
1837
+ }
1838
+ function fn() {
1839
+ return me.instance;
1840
+ }
1841
+ f.const = un;
1842
+ f.obs = fn;
1843
+ class pe {
1844
+ create(e) {
1845
+ const t = N((n) => e(n));
1846
+ return { read: (n) => t };
1847
+ }
1848
+ }
1849
+ pe.instance = new pe();
1850
+ class ge {
1851
+ create(e) {
1852
+ const t = N((n) => e(n));
1853
+ return { read: (n) => t.read(n) };
1854
+ }
1855
+ }
1856
+ ge.instance = new ge();
1857
+ class me {
1858
+ create(e) {
1859
+ const t = N((n) => {
1860
+ const r = e(n);
1861
+ return pn(r) ? r.read(n) : r;
1862
+ });
1863
+ return { read: (n) => t };
1864
+ }
1865
+ }
1866
+ me.instance = new me();
1867
+ function pn(s) {
1868
+ return typeof s == "object" && s !== null && "read" in s;
1869
+ }
1870
+ function q(s, e) {
1871
+ return Object.fromEntries(Object.entries(s).map(([t, n]) => [t, e(n, t)]));
1872
+ }
1873
+ const ae = Symbol("ViewModelContext");
1874
+ class gn {
1875
+ constructor(e) {
1876
+ this._store = new X(), this.props = e;
1877
+ }
1878
+ dispose() {
1879
+ this._store.dispose();
1880
+ }
1881
+ }
1882
+ function mn(s) {
1883
+ return s[ae] || (s[ae] = Le(void 0)), s[ae];
1884
+ }
1885
+ function F(s = {}) {
1886
+ var e;
1887
+ return e = class extends gn {
1888
+ }, e._props = s, e;
1889
+ }
1890
+ let _e = 0;
1891
+ const _n = new hn((s) => {
1892
+ for (const e of s)
1893
+ e.rendered = !1;
1894
+ if (_e > 0) {
1895
+ const e = s.find((t) => t.isRendering);
1896
+ e.itemsToRender = s;
1897
+ } else
1898
+ $e(() => {
1899
+ for (const e of s)
1900
+ e.rendered || e.forceUpdate();
1901
+ });
1902
+ });
1903
+ let vn = 0;
1904
+ class bn {
1905
+ constructor(e, t) {
1906
+ this.debugName = e, this.renderFactory = t, this._obsProps = void 0, this.forceUpdate = void 0, this._render = void 0, this._disposable = void 0, this.contextValues = /* @__PURE__ */ new Map(), this.cleanupEffect = () => () => {
1907
+ var n;
1908
+ (n = this._disposable) == null || n.dispose();
1909
+ }, this.itemsToRender = [], this.handleAfterRender = () => {
1910
+ $e(() => {
1911
+ for (const n of this.itemsToRender)
1912
+ n.rendered || n.forceUpdate();
1913
+ }), this.itemsToRender = [];
1914
+ }, this.rendering = void 0, this.isRendering = !1, this.rendered = !1;
1915
+ }
1916
+ toString() {
1917
+ return this.debugName;
1918
+ }
1919
+ updateProps(e) {
1920
+ this._obsProps ? this._obsProps.set(e, void 0) : (this._obsProps = v(this, e), this._render = this.renderFactory(this._obsProps, () => this.contextValues), this.rendering = N(this, this._render), this._disposable = _n.addDependency(this.rendering, this));
1921
+ }
1922
+ }
1923
+ function we(s, e, t) {
1924
+ const n = (o) => o + 1, r = () => new bn(s + ++vn, e), i = function(o) {
1925
+ const d = Ct(n, 0)[1], c = xt(r)[0];
1926
+ for (const h of t ?? [])
1927
+ c.contextValues.set(h, wt(h));
1928
+ if (Ie(c.cleanupEffect, []), Ie(c.handleAfterRender), c.isRendering)
1929
+ throw new Error("Component is already rendering");
1930
+ c.isRendering = !0, _e++;
1931
+ try {
1932
+ c.forceUpdate = d, c.updateProps(o);
1933
+ const h = c.rendering.get();
1934
+ return c.rendered = !0, h;
1935
+ } finally {
1936
+ c.isRendering = !1, _e--;
1937
+ }
1938
+ };
1939
+ return i.displayName = s, i;
1940
+ }
1941
+ we("ObsView", (s) => (e) => s.read(e).children(e));
1942
+ function k(s, e) {
1943
+ return we("view", (t) => {
1944
+ const n = q(s, (r, i) => r.create((o) => t.read(o)[i], void 0));
1945
+ return (r) => {
1946
+ const i = q(n, (o) => o.read(r));
1947
+ return e(r, i);
1948
+ };
1949
+ });
1950
+ }
1951
+ function yn(s) {
1952
+ const e = [];
1953
+ for (const t of Object.values(s)) {
1954
+ const n = t._requiredContext;
1955
+ n && !e.includes(n) && e.push(n);
1956
+ }
1957
+ return e;
1958
+ }
1959
+ function B(s, e, t) {
1960
+ const n = typeof e == "function" ? {} : e, r = typeof e == "function" ? e : t, i = "_props" in s ? s._props : {}, o = yn({ ...i, ...n }), d = mn(s), c = [...o, d];
1961
+ return we("viewWithModel", (h, g) => {
1962
+ const _ = g(), x = _.get(d), w = "_props" in s ? q(s._props, (y, E) => y.create((z) => h.read(z)[E], _.get(y._requiredContext))) : {}, U = x ? { read: () => x, dispose: () => {
1963
+ } } : Kt((y) => {
1964
+ const E = q(w, (z) => z.read(y));
1965
+ return new s(E);
1966
+ }), D = q(n, (y, E) => y.create((z) => h.read(z)[E], _.get(y._requiredContext)));
1967
+ return (y) => {
1968
+ const E = U.read(y), z = q(D, (_t) => _t.read(y));
1969
+ return r(y, E, z);
1970
+ };
1971
+ }, c.length > 0 ? c : void 0);
1972
+ }
1973
+ k({ value: f.obs() }, (s, e) => e.value.read(s));
1974
+ Le(null);
1975
+ function ot(s) {
1795
1976
  var e;
1796
1977
  return {
1797
1978
  id: s.id,
1798
1979
  name: s.name,
1799
1980
  type: s.type,
1800
- children: (e = s.children) == null ? void 0 : e.map(Ke),
1981
+ children: (e = s.children) == null ? void 0 : e.map(ot),
1801
1982
  component: s.component
1802
1983
  };
1803
1984
  }
1804
- function W(s, e) {
1985
+ function Q(s, e) {
1805
1986
  const {
1806
1987
  storageKey: t,
1807
1988
  defaultValue: n,
@@ -1814,80 +1995,80 @@ function W(s, e) {
1814
1995
  h !== null && (o = i(h));
1815
1996
  } catch {
1816
1997
  }
1817
- const d = _(s, o), l = d.set.bind(d);
1998
+ const d = v(s, o), c = d.set.bind(d);
1818
1999
  return d.set = (h, g) => {
1819
2000
  try {
1820
2001
  localStorage.setItem(t, r(h));
1821
2002
  } catch {
1822
2003
  }
1823
- l(h, g);
2004
+ c(h, g);
1824
2005
  }, d;
1825
2006
  }
1826
- class qt extends N({
2007
+ class Cn extends F({
1827
2008
  registry: f.const(),
1828
2009
  daemonModel: f.const()
1829
2010
  }) {
1830
2011
  constructor() {
1831
2012
  super(...arguments);
1832
- c(this, "leftSidebarVisible", W(this, {
2013
+ l(this, "leftSidebarVisible", Q(this, {
1833
2014
  storageKey: "component-explorer:leftSidebarVisible",
1834
2015
  defaultValue: !0
1835
2016
  }));
1836
- c(this, "rightSidebarVisible", W(this, {
2017
+ l(this, "rightSidebarVisible", Q(this, {
1837
2018
  storageKey: "component-explorer:rightSidebarVisible",
1838
2019
  defaultValue: !0
1839
2020
  }));
1840
- c(this, "isDarkTheme", W(this, {
2021
+ l(this, "isDarkTheme", Q(this, {
1841
2022
  storageKey: "component-explorer:isDarkTheme",
1842
2023
  defaultValue: !0
1843
2024
  }));
1844
- c(this, "selectedNodeId", W(this, {
2025
+ l(this, "selectedNodeId", Q(this, {
1845
2026
  storageKey: "component-explorer:selectedNodeId",
1846
2027
  defaultValue: void 0
1847
2028
  }));
1848
- c(this, "expandedNodeIds", _(this, /* @__PURE__ */ new Set()));
1849
- c(this, "viewMode", W(this, {
2029
+ l(this, "expandedNodeIds", v(this, /* @__PURE__ */ new Set()));
2030
+ l(this, "viewMode", Q(this, {
1850
2031
  storageKey: "component-explorer:viewMode",
1851
2032
  defaultValue: "session"
1852
2033
  }));
1853
2034
  /** The explorer's tree derived from the registry */
1854
- c(this, "tree", j(this, (t) => {
2035
+ l(this, "tree", N(this, (t) => {
1855
2036
  const n = this.props.registry.root.read(t);
1856
- return Ke(n);
2037
+ return ot(n);
1857
2038
  }));
1858
- c(this, "selectedNode", j(this, (t) => {
2039
+ l(this, "selectedNode", N(this, (t) => {
1859
2040
  const n = this.selectedNodeId.read(t);
1860
2041
  if (!n) return;
1861
2042
  const r = this.tree.read(t);
1862
2043
  return this._findNode(r.children ?? [], n);
1863
2044
  }));
1864
2045
  /** List of preview rows to render based on current selection and view mode */
1865
- c(this, "selectedFixtures", j(this, (t) => {
2046
+ l(this, "selectedFixtures", N(this, (t) => {
1866
2047
  const n = this.selectedNode.read(t);
1867
2048
  return n ? this.viewMode.read(t) === "diff" && this.daemonAvailable ? this._collectDiffRows(n, n.name) : this._collectPreviewRows(n, n.name) : [];
1868
2049
  }));
1869
- c(this, "setViewMode", (t) => {
2050
+ l(this, "setViewMode", (t) => {
1870
2051
  this.viewMode.set(t, void 0);
1871
2052
  });
1872
- c(this, "navigateToSession", (t) => {
2053
+ l(this, "navigateToSession", (t) => {
1873
2054
  const n = this.props.daemonModel;
1874
2055
  if (!n) return;
1875
2056
  const r = n.getSessionExplorerUrl(t);
1876
2057
  r && (window.location.href = r);
1877
2058
  });
1878
- c(this, "toggleLeftSidebar", () => {
2059
+ l(this, "toggleLeftSidebar", () => {
1879
2060
  this.leftSidebarVisible.set(!this.leftSidebarVisible.get(), void 0);
1880
2061
  });
1881
- c(this, "toggleRightSidebar", () => {
2062
+ l(this, "toggleRightSidebar", () => {
1882
2063
  this.rightSidebarVisible.set(!this.rightSidebarVisible.get(), void 0);
1883
2064
  });
1884
- c(this, "toggleTheme", () => {
2065
+ l(this, "toggleTheme", () => {
1885
2066
  this.isDarkTheme.set(!this.isDarkTheme.get(), void 0);
1886
2067
  });
1887
- c(this, "selectNode", (t) => {
2068
+ l(this, "selectNode", (t) => {
1888
2069
  this.selectedNodeId.set(t, void 0);
1889
2070
  });
1890
- c(this, "toggleNodeExpanded", (t) => {
2071
+ l(this, "toggleNodeExpanded", (t) => {
1891
2072
  const n = this.expandedNodeIds.get(), r = new Set(n);
1892
2073
  r.has(t) ? r.delete(t) : r.add(t), this.expandedNodeIds.set(r, void 0);
1893
2074
  });
@@ -2175,16 +2356,16 @@ const u = {
2175
2356
  cursor: "pointer"
2176
2357
  }
2177
2358
  };
2178
- function pe(...s) {
2359
+ function Se(...s) {
2179
2360
  return Object.assign({}, ...s.filter(Boolean));
2180
2361
  }
2181
- class Kt extends N({
2362
+ class xn extends F({
2182
2363
  active: f()
2183
2364
  }) {
2184
2365
  constructor() {
2185
2366
  super(...arguments);
2186
- c(this, "isHovered", _(this, !1));
2187
- c(this, "setHovered", (t) => {
2367
+ l(this, "isHovered", v(this, !1));
2368
+ l(this, "setHovered", (t) => {
2188
2369
  this.isHovered.set(t, void 0);
2189
2370
  });
2190
2371
  }
@@ -2192,15 +2373,15 @@ class Kt extends N({
2192
2373
  return this.props.active;
2193
2374
  }
2194
2375
  }
2195
- const se = V(
2196
- Kt,
2376
+ const de = B(
2377
+ xn,
2197
2378
  {
2198
2379
  onClick: f.const(),
2199
2380
  title: f.const(),
2200
2381
  children: f.const()
2201
2382
  },
2202
2383
  (s, e, t) => {
2203
- const n = e.isHovered.read(s), r = e.active.read(s), i = pe(
2384
+ const n = e.isHovered.read(s), r = e.active.read(s), i = Se(
2204
2385
  u.titleBarButton,
2205
2386
  n && !r && u.titleBarButtonHover,
2206
2387
  r && u.titleBarButtonActive
@@ -2217,20 +2398,20 @@ const se = V(
2217
2398
  }
2218
2399
  );
2219
2400
  }
2220
- ), Jt = ({ style: s }) => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", style: s, children: /* @__PURE__ */ a("path", { d: "M5.7 13.7L5 13l4.6-4.6L5 3.7l.7-.7 5.3 5.4-5.3 5.3z" }) }), Zt = ({ style: s }) => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", style: s, children: /* @__PURE__ */ a("path", { d: "M11 5.5L6 10.5L5.3 9.8L9.6 5.5L5.3 1.2L6 0.5L11 5.5z", transform: "rotate(90 8 5.5)" }) }), Xt = ({ style: s }) => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", style: s, children: /* @__PURE__ */ a("path", { d: "M14.5 2H9l-.35.15-.65.64-.65-.64L7 2H1.5l-.5.5v10l.5.5H7l.35-.15.65-.64.65.64.35.15h5.5l.5-.5v-10l-.5-.5zm-7 10H2V3h5v.86L5.85 5l1.15 1.14V10l-1.15-1.14L7 7.72V12zm6 0H8V7.72l1.15 1.14L8 10V6.14L9.15 5 8 3.86V3h5v9z" }) }), Yt = ({ style: s }) => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", style: s, children: /* @__PURE__ */ a("path", { d: "M14.5 3H7.71l-.85-.85L6.5 2h-5l-.5.5v11l.5.5h13l.5-.5v-10l-.5-.5zm-.5 10H2V6h12v7zm0-8H2V3h4.29l.85.85.36.15H14v1z" }) }), Qt = () => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M2 2v12h12V2H2zm11 11H6V3h7v10zM3 3h2v10H3V3z" }) }), en = () => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M2 2v12h12V2H2zm6 11V3h5v10H8zM3 3h4v10H3V3z" }) }), tn = () => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M8 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z" }) }), nn = () => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z" }) }), sn = D(
2401
+ ), wn = ({ style: s }) => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", style: s, children: /* @__PURE__ */ a("path", { d: "M5.7 13.7L5 13l4.6-4.6L5 3.7l.7-.7 5.3 5.4-5.3 5.3z" }) }), Sn = ({ style: s }) => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", style: s, children: /* @__PURE__ */ a("path", { d: "M11 5.5L6 10.5L5.3 9.8L9.6 5.5L5.3 1.2L6 0.5L11 5.5z", transform: "rotate(90 8 5.5)" }) }), In = ({ style: s }) => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", style: s, children: /* @__PURE__ */ a("path", { d: "M14.5 2H9l-.35.15-.65.64-.65-.64L7 2H1.5l-.5.5v10l.5.5H7l.35-.15.65-.64.65.64.35.15h5.5l.5-.5v-10l-.5-.5zm-7 10H2V3h5v.86L5.85 5l1.15 1.14V10l-1.15-1.14L7 7.72V12zm6 0H8V7.72l1.15 1.14L8 10V6.14L9.15 5 8 3.86V3h5v9z" }) }), On = ({ style: s }) => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", style: s, children: /* @__PURE__ */ a("path", { d: "M14.5 3H7.71l-.85-.85L6.5 2h-5l-.5.5v11l.5.5h13l.5-.5v-10l-.5-.5zm-.5 10H2V6h12v7zm0-8H2V3h4.29l.85.85.36.15H14v1z" }) }), Tn = () => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M2 2v12h12V2H2zm11 11H6V3h7v10zM3 3h2v10H3V3z" }) }), Rn = () => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M2 2v12h12V2H2zm6 11V3h5v10H8zM3 3h4v10H3V3z" }) }), Vn = () => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M8 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z" }) }), Nn = () => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z" }) }), kn = k(
2221
2402
  { model: f.const() },
2222
2403
  (s, e) => {
2223
- var d, l;
2224
- const t = e.model, n = t.viewMode.read(s), r = ((d = t.daemon) == null ? void 0 : d.sessions.read(s)) ?? [], i = (l = t.daemon) == null ? void 0 : l.sessionName, o = r.filter((h) => h.name !== i);
2225
- return /* @__PURE__ */ p("div", { style: U.container, children: [
2226
- /* @__PURE__ */ p("div", { style: U.segmentedControl, children: [
2227
- /* @__PURE__ */ a(Se, { label: "Live", mode: "session", active: n === "session", onClick: () => t.setViewMode("session") }),
2228
- /* @__PURE__ */ a(Se, { label: "Diff", mode: "diff", active: n === "diff", onClick: () => t.setViewMode("diff") })
2404
+ var d, c;
2405
+ const t = e.model, n = t.viewMode.read(s), r = ((d = t.daemon) == null ? void 0 : d.sessions.read(s)) ?? [], i = (c = t.daemon) == null ? void 0 : c.sessionName, o = r.filter((h) => h.name !== i);
2406
+ return /* @__PURE__ */ p("div", { style: K.container, children: [
2407
+ /* @__PURE__ */ p("div", { style: K.segmentedControl, children: [
2408
+ /* @__PURE__ */ a(Ae, { label: "Live", mode: "session", active: n === "session", onClick: () => t.setViewMode("session") }),
2409
+ /* @__PURE__ */ a(Ae, { label: "Diff", mode: "diff", active: n === "diff", onClick: () => t.setViewMode("diff") })
2229
2410
  ] }),
2230
- o.length > 0 && /* @__PURE__ */ a("div", { style: U.sessionLinks, children: o.map((h) => /* @__PURE__ */ p(
2411
+ o.length > 0 && /* @__PURE__ */ a("div", { style: K.sessionLinks, children: o.map((h) => /* @__PURE__ */ p(
2231
2412
  "button",
2232
2413
  {
2233
- style: U.sessionLink,
2414
+ style: K.sessionLink,
2234
2415
  onClick: () => t.navigateToSession(h.name),
2235
2416
  title: `Switch to ${h.name} session`,
2236
2417
  children: [
@@ -2243,17 +2424,17 @@ const se = V(
2243
2424
  ] });
2244
2425
  }
2245
2426
  );
2246
- function Se({ label: s, mode: e, active: t, onClick: n }) {
2427
+ function Ae({ label: s, mode: e, active: t, onClick: n }) {
2247
2428
  return /* @__PURE__ */ a(
2248
2429
  "button",
2249
2430
  {
2250
- style: t ? U.segmentActive : U.segment,
2431
+ style: t ? K.segmentActive : K.segment,
2251
2432
  onClick: n,
2252
2433
  children: s
2253
2434
  }
2254
2435
  );
2255
2436
  }
2256
- const rn = D(
2437
+ const Dn = k(
2257
2438
  {
2258
2439
  model: f.const()
2259
2440
  },
@@ -2261,17 +2442,17 @@ const rn = D(
2261
2442
  const t = e.model, n = t.leftSidebarVisible.read(s), r = t.rightSidebarVisible.read(s), i = t.isDarkTheme.read(s), o = t.selectedNode.read(s);
2262
2443
  return /* @__PURE__ */ p("div", { style: u.titleBar, children: [
2263
2444
  /* @__PURE__ */ a("div", { style: u.titleBarSection, children: /* @__PURE__ */ a(
2264
- se,
2445
+ de,
2265
2446
  {
2266
2447
  active: n,
2267
2448
  onClick: t.toggleLeftSidebar,
2268
2449
  title: "Toggle left sidebar",
2269
- children: /* @__PURE__ */ a(Qt, {})
2450
+ children: /* @__PURE__ */ a(Tn, {})
2270
2451
  }
2271
2452
  ) }),
2272
2453
  /* @__PURE__ */ p("div", { style: u.titleBarCenter, children: [
2273
- t.daemonAvailable && /* @__PURE__ */ a(sn, { model: t }),
2274
- o ? /* @__PURE__ */ p(ce, { children: [
2454
+ t.daemonAvailable && /* @__PURE__ */ a(kn, { model: t }),
2455
+ o ? /* @__PURE__ */ p(be, { children: [
2275
2456
  /* @__PURE__ */ a("span", { style: { color: "var(--vscode-textLink-foreground)" }, children: "<" }),
2276
2457
  /* @__PURE__ */ a("span", { children: o.name }),
2277
2458
  /* @__PURE__ */ a("span", { style: { color: "var(--vscode-textLink-foreground)" }, children: "/>" })
@@ -2279,27 +2460,27 @@ const rn = D(
2279
2460
  ] }),
2280
2461
  /* @__PURE__ */ p("div", { style: u.titleBarSection, children: [
2281
2462
  /* @__PURE__ */ a(
2282
- se,
2463
+ de,
2283
2464
  {
2284
2465
  active: !1,
2285
2466
  onClick: t.toggleTheme,
2286
2467
  title: i ? "Switch to light theme" : "Switch to dark theme",
2287
- children: i ? /* @__PURE__ */ a(tn, {}) : /* @__PURE__ */ a(nn, {})
2468
+ children: i ? /* @__PURE__ */ a(Vn, {}) : /* @__PURE__ */ a(Nn, {})
2288
2469
  }
2289
2470
  ),
2290
2471
  /* @__PURE__ */ a(
2291
- se,
2472
+ de,
2292
2473
  {
2293
2474
  active: r,
2294
2475
  onClick: t.toggleRightSidebar,
2295
2476
  title: "Toggle right sidebar",
2296
- children: /* @__PURE__ */ a(en, {})
2477
+ children: /* @__PURE__ */ a(Rn, {})
2297
2478
  }
2298
2479
  )
2299
2480
  ] })
2300
2481
  ] });
2301
2482
  }
2302
- ), U = {
2483
+ ), K = {
2303
2484
  container: {
2304
2485
  display: "flex",
2305
2486
  alignItems: "center",
@@ -2343,32 +2524,32 @@ const rn = D(
2343
2524
  color: "var(--vscode-textLink-foreground)",
2344
2525
  cursor: "pointer"
2345
2526
  }
2346
- }, Je = D(
2527
+ }, at = k(
2347
2528
  {
2348
2529
  model: f.const(),
2349
2530
  nodes: f.const(),
2350
2531
  depth: f.const()
2351
2532
  },
2352
- (s, e) => /* @__PURE__ */ a(ce, { children: e.nodes.map((t) => /* @__PURE__ */ a(an, { model: e.model, node: t, depth: e.depth }, t.id)) })
2533
+ (s, e) => /* @__PURE__ */ a(be, { children: e.nodes.map((t) => /* @__PURE__ */ a(Mn, { model: e.model, node: t, depth: e.depth }, t.id)) })
2353
2534
  );
2354
- class on extends N({
2535
+ class An extends F({
2355
2536
  model: f.const(),
2356
2537
  node: f.const(),
2357
2538
  depth: f.const()
2358
2539
  }) {
2359
2540
  constructor() {
2360
2541
  super(...arguments);
2361
- c(this, "isHovered", _(this, !1));
2362
- c(this, "setHovered", (t) => {
2542
+ l(this, "isHovered", v(this, !1));
2543
+ l(this, "setHovered", (t) => {
2363
2544
  this.isHovered.set(t, void 0);
2364
2545
  });
2365
- c(this, "handleClick", () => {
2546
+ l(this, "handleClick", () => {
2366
2547
  this.props.model.selectNode(this.props.node.id);
2367
2548
  });
2368
- c(this, "handleDoubleClick", () => {
2549
+ l(this, "handleDoubleClick", () => {
2369
2550
  this._hasChildren && this.props.model.toggleNodeExpanded(this.props.node.id);
2370
2551
  });
2371
- c(this, "handleChevronClick", (t) => {
2552
+ l(this, "handleChevronClick", (t) => {
2372
2553
  t.stopPropagation(), this.props.model.toggleNodeExpanded(this.props.node.id);
2373
2554
  });
2374
2555
  }
@@ -2386,14 +2567,14 @@ class on extends N({
2386
2567
  return !!(this.props.node.children && this.props.node.children.length > 0);
2387
2568
  }
2388
2569
  }
2389
- const an = V(on, {}, (s, e) => {
2390
- const t = e.explorerModel, n = e.treeNode, r = e.treeDepth, i = !!(n.children && n.children.length > 0), o = i ? t.isNodeExpanded(n.id, s) : !1, l = t.selectedNodeId.read(s) === n.id, h = e.isHovered.read(s), g = pe(
2570
+ const Mn = B(An, {}, (s, e) => {
2571
+ const t = e.explorerModel, n = e.treeNode, r = e.treeDepth, i = !!(n.children && n.children.length > 0), o = i ? t.isNodeExpanded(n.id, s) : !1, c = t.selectedNodeId.read(s) === n.id, h = e.isHovered.read(s), g = Se(
2391
2572
  u.treeItem,
2392
2573
  { paddingLeft: `${8 + r * 12}px` },
2393
- l && u.treeItemSelected,
2394
- !l && h && u.treeItemHover
2574
+ c && u.treeItemSelected,
2575
+ !c && h && u.treeItemHover
2395
2576
  );
2396
- return /* @__PURE__ */ p(ce, { children: [
2577
+ return /* @__PURE__ */ p(be, { children: [
2397
2578
  /* @__PURE__ */ p(
2398
2579
  "div",
2399
2580
  {
@@ -2403,16 +2584,16 @@ const an = V(on, {}, (s, e) => {
2403
2584
  onMouseEnter: () => e.setHovered(!0),
2404
2585
  onMouseLeave: () => e.setHovered(!1),
2405
2586
  children: [
2406
- i ? /* @__PURE__ */ a("div", { style: u.treeItemChevron, onClick: e.handleChevronClick, children: o ? /* @__PURE__ */ a(Zt, {}) : /* @__PURE__ */ a(Jt, {}) }) : /* @__PURE__ */ a("div", { style: u.treeItemChevronPlaceholder }),
2407
- /* @__PURE__ */ a("div", { style: u.treeItemIcon, children: n.type === "folder" ? /* @__PURE__ */ a(Yt, { style: { color: "var(--vscode-symbolIcon-folderForeground)" } }) : /* @__PURE__ */ a(Xt, { style: { color: "#deb45b" } }) }),
2587
+ i ? /* @__PURE__ */ a("div", { style: u.treeItemChevron, onClick: e.handleChevronClick, children: o ? /* @__PURE__ */ a(Sn, {}) : /* @__PURE__ */ a(wn, {}) }) : /* @__PURE__ */ a("div", { style: u.treeItemChevronPlaceholder }),
2588
+ /* @__PURE__ */ a("div", { style: u.treeItemIcon, children: n.type === "folder" ? /* @__PURE__ */ a(On, { style: { color: "var(--vscode-symbolIcon-folderForeground)" } }) : /* @__PURE__ */ a(In, { style: { color: "#deb45b" } }) }),
2408
2589
  /* @__PURE__ */ a("span", { style: u.treeItemLabel, children: n.name }),
2409
2590
  i && /* @__PURE__ */ a("span", { style: u.treeItemCount, children: n.children.length })
2410
2591
  ]
2411
2592
  }
2412
2593
  ),
2413
- i && o && /* @__PURE__ */ a(Je, { model: t, nodes: n.children, depth: r + 1 })
2594
+ i && o && /* @__PURE__ */ a(at, { model: t, nodes: n.children, depth: r + 1 })
2414
2595
  ] });
2415
- }), dn = D(
2596
+ }), Fn = k(
2416
2597
  {
2417
2598
  model: f.const()
2418
2599
  },
@@ -2420,20 +2601,20 @@ const an = V(on, {}, (s, e) => {
2420
2601
  const t = e.model.tree.read(s);
2421
2602
  return /* @__PURE__ */ p("div", { style: u.sidebar, children: [
2422
2603
  /* @__PURE__ */ a("div", { style: u.sidebarHeader, children: "Explorer" }),
2423
- /* @__PURE__ */ a("div", { style: u.sidebarContent, children: /* @__PURE__ */ a(Je, { model: e.model, nodes: t.children ?? [], depth: 0 }) })
2604
+ /* @__PURE__ */ a("div", { style: u.sidebarContent, children: /* @__PURE__ */ a(at, { model: e.model, nodes: t.children ?? [], depth: 0 }) })
2424
2605
  ] });
2425
2606
  }
2426
2607
  );
2427
- class ln extends N({}) {
2608
+ class Bn extends F({}) {
2428
2609
  constructor() {
2429
2610
  super(...arguments);
2430
- c(this, "checked", _(this, !1));
2431
- c(this, "toggle", () => {
2611
+ l(this, "checked", v(this, !1));
2612
+ l(this, "toggle", () => {
2432
2613
  this.checked.set(!this.checked.get(), void 0);
2433
2614
  });
2434
2615
  }
2435
2616
  }
2436
- const cn = V(ln, {}, (s, e) => {
2617
+ const En = B(Bn, {}, (s, e) => {
2437
2618
  const t = e.checked.read(s), n = {
2438
2619
  position: "relative",
2439
2620
  width: "36px",
@@ -2454,7 +2635,7 @@ const cn = V(ln, {}, (s, e) => {
2454
2635
  transition: "left 0.2s"
2455
2636
  };
2456
2637
  return /* @__PURE__ */ a("div", { style: n, onClick: e.toggle, children: /* @__PURE__ */ a("div", { style: r }) });
2457
- }), hn = D(
2638
+ }), zn = k(
2458
2639
  {
2459
2640
  node: f.const()
2460
2641
  },
@@ -2505,44 +2686,44 @@ const cn = V(ln, {}, (s, e) => {
2505
2686
  "disabled",
2506
2687
  /* @__PURE__ */ a("span", { style: { color: "var(--vscode-descriptionForeground)" }, children: " : boolean" })
2507
2688
  ] }),
2508
- /* @__PURE__ */ a(cn, {}),
2689
+ /* @__PURE__ */ a(En, {}),
2509
2690
  /* @__PURE__ */ a("div", { style: u.propertyDescription, children: "Disable the button" })
2510
2691
  ] })
2511
2692
  ] })
2512
- ), un = D(
2693
+ ), Hn = k(
2513
2694
  {
2514
2695
  selectedNode: f.const()
2515
2696
  },
2516
- (s, e) => /* @__PURE__ */ p("div", { style: pe(u.sidebar, u.sidebarRight), children: [
2697
+ (s, e) => /* @__PURE__ */ p("div", { style: Se(u.sidebar, u.sidebarRight), children: [
2517
2698
  /* @__PURE__ */ p("div", { style: u.sidebarHeader, children: [
2518
2699
  /* @__PURE__ */ a("span", { style: { marginRight: "6px", color: "var(--vscode-textLink-foreground)" }, children: "</>" }),
2519
2700
  "Props"
2520
2701
  ] }),
2521
- /* @__PURE__ */ a("div", { style: u.sidebarContent, children: e.selectedNode ? /* @__PURE__ */ a(hn, { node: e.selectedNode }) : /* @__PURE__ */ a("div", { style: { padding: "12px", color: "var(--vscode-descriptionForeground)", fontSize: "12px" }, children: "Select a component to view its properties" }) })
2702
+ /* @__PURE__ */ a("div", { style: u.sidebarContent, children: e.selectedNode ? /* @__PURE__ */ a(zn, { node: e.selectedNode }) : /* @__PURE__ */ a("div", { style: { padding: "12px", color: "var(--vscode-descriptionForeground)", fontSize: "12px" }, children: "Select a component to view its properties" }) })
2522
2703
  ] })
2523
2704
  );
2524
- class fn extends N({
2705
+ class Ln extends F({
2525
2706
  fixture: f.const(),
2526
2707
  compact: f.const()
2527
2708
  }) {
2528
2709
  constructor() {
2529
2710
  super(...arguments);
2530
- c(this, "_containerRef", null);
2531
- c(this, "_shadowRoot", null);
2532
- c(this, "_renderContainer", null);
2533
- c(this, "_disposable", null);
2534
- c(this, "_resizeObserver", null);
2535
- c(this, "measuredWidth", _(this, void 0));
2536
- c(this, "measuredHeight", _(this, void 0));
2537
- c(this, "setContainerRef", (t) => {
2711
+ l(this, "_containerRef", null);
2712
+ l(this, "_shadowRoot", null);
2713
+ l(this, "_renderContainer", null);
2714
+ l(this, "_disposable", null);
2715
+ l(this, "_resizeObserver", null);
2716
+ l(this, "measuredWidth", v(this, void 0));
2717
+ l(this, "measuredHeight", v(this, void 0));
2718
+ l(this, "setContainerRef", (t) => {
2538
2719
  if (t === this._containerRef || (this._cleanup(), this._containerRef = t, !t)) return;
2539
2720
  const n = this.fixture.component;
2540
2721
  n.isolation === "shadow-dom" ? this._renderInShadowDom(t, n) : this._renderDirect(t, n);
2541
2722
  const r = this._renderContainer ?? t;
2542
2723
  this._resizeObserver = new ResizeObserver((i) => {
2543
2724
  for (const o of i) {
2544
- const { width: d, height: l } = o.contentRect;
2545
- l > 0 && (this.measuredWidth.set(Math.round(d), void 0), this.measuredHeight.set(Math.round(l), void 0));
2725
+ const { width: d, height: c } = o.contentRect;
2726
+ c > 0 && (this.measuredWidth.set(Math.round(d), void 0), this.measuredHeight.set(Math.round(c), void 0));
2546
2727
  }
2547
2728
  }), this._resizeObserver.observe(r);
2548
2729
  });
@@ -2596,34 +2777,34 @@ class fn extends N({
2596
2777
  this._cleanup();
2597
2778
  }
2598
2779
  }
2599
- const Ze = V(
2600
- fn,
2780
+ const dt = B(
2781
+ Ln,
2601
2782
  {},
2602
2783
  (s, e) => {
2603
2784
  const t = e.fixture, n = t.component, r = n.displayMode, i = e.measuredWidth.read(s), o = e.measuredHeight.read(s), d = e.compact;
2604
- let l;
2785
+ let c;
2605
2786
  if (r.type === "page") {
2606
- const I = r.viewports[0], S = ct(I);
2607
- l = {
2608
- width: S.width,
2609
- height: S.height,
2787
+ const x = r.viewports[0], w = Ot(x);
2788
+ c = {
2789
+ width: w.width,
2790
+ height: w.height,
2610
2791
  overflow: "auto"
2611
2792
  };
2612
2793
  } else
2613
- l = {
2794
+ c = {
2614
2795
  display: "inline-block"
2615
2796
  };
2616
- const h = i && o ? `${i} × ${o}` : "", g = d ? $.wrapperCompact : $.wrapper, b = d ? $.nameCompact : $.name;
2797
+ const h = i && o ? `${i} × ${o}` : "", g = d ? W.wrapperCompact : W.wrapper, _ = d ? W.nameCompact : W.name;
2617
2798
  return /* @__PURE__ */ p("div", { style: g, children: [
2618
- /* @__PURE__ */ p("div", { style: $.labelRow, children: [
2619
- /* @__PURE__ */ a("span", { style: b, children: t.name }),
2620
- !d && h && /* @__PURE__ */ a("span", { style: $.dimensions, children: h })
2799
+ /* @__PURE__ */ p("div", { style: W.labelRow, children: [
2800
+ /* @__PURE__ */ a("span", { style: _, children: t.name }),
2801
+ !d && h && /* @__PURE__ */ a("span", { style: W.dimensions, children: h })
2621
2802
  ] }),
2622
- /* @__PURE__ */ a("div", { style: mn(n.background), children: /* @__PURE__ */ a("div", { ref: e.setContainerRef, style: l }) })
2803
+ /* @__PURE__ */ a("div", { style: Pn(n.background), children: /* @__PURE__ */ a("div", { ref: e.setContainerRef, style: c }) })
2623
2804
  ] });
2624
2805
  }
2625
- ), L = 8;
2626
- function Xe(s, e) {
2806
+ ), G = 8;
2807
+ function ct(s, e) {
2627
2808
  return `
2628
2809
  linear-gradient(45deg, ${e} 25%, transparent 25%),
2629
2810
  linear-gradient(-45deg, ${e} 25%, transparent 25%),
@@ -2631,29 +2812,29 @@ function Xe(s, e) {
2631
2812
  linear-gradient(-45deg, transparent 75%, ${e} 75%)
2632
2813
  `;
2633
2814
  }
2634
- const pn = {
2815
+ const $n = {
2635
2816
  backgroundColor: "#ffffff",
2636
- backgroundImage: Xe("#ffffff", "#e5e5e5")
2637
- }, gn = {
2817
+ backgroundImage: ct("#ffffff", "#e5e5e5")
2818
+ }, Un = {
2638
2819
  backgroundColor: "#1e1e1e",
2639
- backgroundImage: Xe("#1e1e1e", "#2d2d2d")
2640
- }, vn = {
2820
+ backgroundImage: ct("#1e1e1e", "#2d2d2d")
2821
+ }, jn = {
2641
2822
  display: "inline-block",
2642
2823
  padding: "12px",
2643
2824
  borderRadius: "4px",
2644
- backgroundSize: `${L * 2}px ${L * 2}px`,
2645
- backgroundPosition: `0 0, 0 ${L}px, ${L}px -${L}px, -${L}px 0`,
2825
+ backgroundSize: `${G * 2}px ${G * 2}px`,
2826
+ backgroundPosition: `0 0, 0 ${G}px, ${G}px -${G}px, -${G}px 0`,
2646
2827
  boxShadow: "0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08)"
2647
2828
  };
2648
- function mn(s) {
2649
- const e = s === "dark" ? gn : pn;
2829
+ function Pn(s) {
2830
+ const e = s === "dark" ? Un : $n;
2650
2831
  return {
2651
- ...vn,
2832
+ ...jn,
2652
2833
  backgroundColor: e.backgroundColor,
2653
2834
  backgroundImage: e.backgroundImage
2654
2835
  };
2655
2836
  }
2656
- const $ = {
2837
+ const W = {
2657
2838
  wrapper: {
2658
2839
  marginBottom: "32px"
2659
2840
  },
@@ -2682,16 +2863,16 @@ const $ = {
2682
2863
  fontFamily: "var(--vscode-editor-font-family, monospace)"
2683
2864
  }
2684
2865
  };
2685
- class _n extends N({
2866
+ class Gn extends F({
2686
2867
  fixtureId: f.const(),
2687
2868
  sessionName: f.const(),
2688
2869
  daemon: f.const()
2689
2870
  }) {
2690
2871
  constructor(t) {
2691
2872
  super(t);
2692
- c(this, "screenshot", _(this, { status: "idle" }));
2693
- c(this, "_fetchVersion", 0);
2694
- this._store.add(Le((n) => {
2873
+ l(this, "screenshot", v(this, { status: "idle" }));
2874
+ l(this, "_fetchVersion", 0);
2875
+ this._store.add(Ye((n) => {
2695
2876
  this.props.daemon.sourceTreeIds.read(n).get(this.props.sessionName) && this._fetchScreenshot();
2696
2877
  }));
2697
2878
  }
@@ -2709,26 +2890,26 @@ class _n extends N({
2709
2890
  }
2710
2891
  }
2711
2892
  }
2712
- const we = V(
2713
- _n,
2893
+ const Me = B(
2894
+ Gn,
2714
2895
  {},
2715
2896
  (s, e) => {
2716
2897
  const t = e.screenshot.read(s);
2717
2898
  if (t.status === "idle" || t.status === "loading")
2718
- return /* @__PURE__ */ a("div", { style: A.placeholder, children: /* @__PURE__ */ a("div", { style: A.shimmer }) });
2899
+ return /* @__PURE__ */ a("div", { style: H.placeholder, children: /* @__PURE__ */ a("div", { style: H.shimmer }) });
2719
2900
  if (t.status === "error")
2720
- return /* @__PURE__ */ a("div", { style: A.error, children: /* @__PURE__ */ a("span", { style: A.errorText, children: "Screenshot failed" }) });
2901
+ return /* @__PURE__ */ a("div", { style: H.error, children: /* @__PURE__ */ a("span", { style: H.errorText, children: "Screenshot failed" }) });
2721
2902
  const { data: n } = t;
2722
2903
  return n.image ? /* @__PURE__ */ a(
2723
2904
  "img",
2724
2905
  {
2725
2906
  src: `data:image/png;base64,${n.image}`,
2726
- style: A.image,
2907
+ style: H.image,
2727
2908
  alt: `Screenshot of ${e.fixtureId}`
2728
2909
  }
2729
- ) : /* @__PURE__ */ a("div", { style: A.placeholder, children: /* @__PURE__ */ a("span", { style: A.hashText, children: n.hash.slice(0, 12) }) });
2910
+ ) : /* @__PURE__ */ a("div", { style: H.placeholder, children: /* @__PURE__ */ a("span", { style: H.hashText, children: n.hash.slice(0, 12) }) });
2730
2911
  }
2731
- ), A = {
2912
+ ), H = {
2732
2913
  placeholder: {
2733
2914
  minHeight: 80,
2734
2915
  display: "flex",
@@ -2771,7 +2952,7 @@ const we = V(
2771
2952
  border: "1px solid var(--vscode-panel-border)"
2772
2953
  }
2773
2954
  };
2774
- class bn extends N({
2955
+ class Wn extends F({
2775
2956
  fixtureId: f.const(),
2776
2957
  daemon: f.const(),
2777
2958
  baselineSession: f.const(),
@@ -2779,8 +2960,8 @@ class bn extends N({
2779
2960
  }) {
2780
2961
  constructor(t) {
2781
2962
  super(t);
2782
- c(this, "comparisonStatus", _(this, { status: "loading" }));
2783
- this._store.add(Le((n) => {
2963
+ l(this, "comparisonStatus", v(this, { status: "loading" }));
2964
+ this._store.add(Ye((n) => {
2784
2965
  const r = this.props.daemon.sourceTreeIds.read(n), i = r.get(this.props.baselineSession), o = r.get(this.props.currentSession);
2785
2966
  i && o && this._fetchComparison();
2786
2967
  }));
@@ -2811,21 +2992,21 @@ class bn extends N({
2811
2992
  }
2812
2993
  }
2813
2994
  }
2814
- const yn = V(
2815
- bn,
2995
+ const qn = B(
2996
+ Wn,
2816
2997
  {},
2817
2998
  (s, e) => {
2818
- const t = e.comparisonStatus.read(s), n = t.status === "loading" ? /* @__PURE__ */ a("span", { style: m.badgeLoading, children: "comparing..." }) : t.status === "error" ? /* @__PURE__ */ a("span", { style: m.badgeError, children: "error" }) : t.match ? /* @__PURE__ */ a("span", { style: m.badgeMatch, children: "✓ match" }) : /* @__PURE__ */ a("span", { style: m.badgeChanged, children: "● changed" });
2819
- return /* @__PURE__ */ p("div", { style: m.fixtureRow, children: [
2820
- /* @__PURE__ */ p("div", { style: m.fixtureLabel, children: [
2821
- /* @__PURE__ */ a("span", { style: m.fixtureName, children: e.fixtureId }),
2999
+ const t = e.comparisonStatus.read(s), n = t.status === "loading" ? /* @__PURE__ */ a("span", { style: b.badgeLoading, children: "comparing..." }) : t.status === "error" ? /* @__PURE__ */ a("span", { style: b.badgeError, children: "error" }) : t.match ? /* @__PURE__ */ a("span", { style: b.badgeMatch, children: "✓ match" }) : /* @__PURE__ */ a("span", { style: b.badgeChanged, children: "● changed" });
3000
+ return /* @__PURE__ */ p("div", { style: b.fixtureRow, children: [
3001
+ /* @__PURE__ */ p("div", { style: b.fixtureLabel, children: [
3002
+ /* @__PURE__ */ a("span", { style: b.fixtureName, children: e.fixtureId }),
2822
3003
  n
2823
3004
  ] }),
2824
- /* @__PURE__ */ p("div", { style: m.sideBySide, children: [
2825
- /* @__PURE__ */ p("div", { style: m.screenshotColumn, children: [
2826
- /* @__PURE__ */ a("span", { style: m.columnLabel, children: "Current" }),
3005
+ /* @__PURE__ */ p("div", { style: b.sideBySide, children: [
3006
+ /* @__PURE__ */ p("div", { style: b.screenshotColumn, children: [
3007
+ /* @__PURE__ */ a("span", { style: b.columnLabel, children: "Current" }),
2827
3008
  /* @__PURE__ */ a(
2828
- we,
3009
+ Me,
2829
3010
  {
2830
3011
  fixtureId: e.fixtureId,
2831
3012
  sessionName: e.currentSession,
@@ -2833,10 +3014,10 @@ const yn = V(
2833
3014
  }
2834
3015
  )
2835
3016
  ] }),
2836
- /* @__PURE__ */ p("div", { style: m.screenshotColumn, children: [
2837
- /* @__PURE__ */ a("span", { style: m.columnLabel, children: "Baseline" }),
3017
+ /* @__PURE__ */ p("div", { style: b.screenshotColumn, children: [
3018
+ /* @__PURE__ */ a("span", { style: b.columnLabel, children: "Baseline" }),
2838
3019
  /* @__PURE__ */ a(
2839
- we,
3020
+ Me,
2840
3021
  {
2841
3022
  fixtureId: e.fixtureId,
2842
3023
  sessionName: e.baselineSession,
@@ -2847,7 +3028,7 @@ const yn = V(
2847
3028
  ] })
2848
3029
  ] });
2849
3030
  }
2850
- ), Cn = D(
3031
+ ), Kn = k(
2851
3032
  {
2852
3033
  name: f.const(),
2853
3034
  path: f.const(),
@@ -2857,9 +3038,9 @@ const yn = V(
2857
3038
  currentSession: f.const()
2858
3039
  },
2859
3040
  (s, e) => /* @__PURE__ */ p("div", { children: [
2860
- /* @__PURE__ */ a("div", { style: m.groupHeader, children: /* @__PURE__ */ a("span", { style: m.groupTitle, children: e.path }) }),
2861
- /* @__PURE__ */ a("div", { style: m.groupContent, children: e.items.map((t) => /* @__PURE__ */ a(
2862
- yn,
3041
+ /* @__PURE__ */ a("div", { style: b.groupHeader, children: /* @__PURE__ */ a("span", { style: b.groupTitle, children: e.path }) }),
3042
+ /* @__PURE__ */ a("div", { style: b.groupContent, children: e.items.map((t) => /* @__PURE__ */ a(
3043
+ qn,
2863
3044
  {
2864
3045
  fixtureId: t.fixtureId,
2865
3046
  daemon: e.daemon,
@@ -2869,7 +3050,7 @@ const yn = V(
2869
3050
  t.fixtureId
2870
3051
  )) })
2871
3052
  ] })
2872
- ), m = {
3053
+ ), b = {
2873
3054
  groupHeader: {
2874
3055
  marginBottom: 12
2875
3056
  },
@@ -2937,72 +3118,72 @@ const yn = V(
2937
3118
  color: "var(--vscode-errorForeground)",
2938
3119
  fontWeight: 500
2939
3120
  }
2940
- }, Ye = "component-explorer:fixtureHeights", Ie = 500;
2941
- let O = null;
2942
- function Qe() {
2943
- if (O !== null) return O;
3121
+ }, lt = "component-explorer:fixtureHeights", Fe = 500;
3122
+ let R = null;
3123
+ function ht() {
3124
+ if (R !== null) return R;
2944
3125
  try {
2945
- const s = localStorage.getItem(Ye);
3126
+ const s = localStorage.getItem(lt);
2946
3127
  if (s)
2947
- return O = JSON.parse(s), O;
3128
+ return R = JSON.parse(s), R;
2948
3129
  } catch {
2949
3130
  }
2950
- return O = {}, O;
3131
+ return R = {}, R;
2951
3132
  }
2952
- function xn() {
2953
- if (O !== null)
3133
+ function Jn() {
3134
+ if (R !== null)
2954
3135
  try {
2955
- const s = Object.entries(O);
2956
- s.length > Ie && (O = Object.fromEntries(s.slice(-Ie))), localStorage.setItem(Ye, JSON.stringify(O));
3136
+ const s = Object.entries(R);
3137
+ s.length > Fe && (R = Object.fromEntries(s.slice(-Fe))), localStorage.setItem(lt, JSON.stringify(R));
2957
3138
  } catch {
2958
3139
  }
2959
3140
  }
2960
- function Sn(s, e) {
2961
- const t = Qe();
2962
- t[s] = e, xn();
3141
+ function Zn(s, e) {
3142
+ const t = ht();
3143
+ t[s] = e, Jn();
2963
3144
  }
2964
- function wn() {
2965
- return new Map(Object.entries(Qe()));
3145
+ function Xn() {
3146
+ return new Map(Object.entries(ht()));
2966
3147
  }
2967
- const In = 280, On = 32, ne = 32, Oe = 400, et = "component-explorer:scrollAnchors", Te = 100;
2968
- function tt() {
3148
+ const Yn = 280, Qn = 32, oe = 32, Be = 400, ut = "component-explorer:scrollAnchors", Ee = 100;
3149
+ function ft() {
2969
3150
  try {
2970
- const s = localStorage.getItem(et);
3151
+ const s = localStorage.getItem(ut);
2971
3152
  if (s) return JSON.parse(s);
2972
3153
  } catch {
2973
3154
  }
2974
3155
  return {};
2975
3156
  }
2976
- function Tn(s, e) {
3157
+ function es(s, e) {
2977
3158
  try {
2978
- const t = tt();
3159
+ const t = ft();
2979
3160
  t[s] = e;
2980
- const n = Object.entries(t), r = n.length > Te ? Object.fromEntries(n.slice(-Te)) : t;
2981
- localStorage.setItem(et, JSON.stringify(r));
3161
+ const n = Object.entries(t), r = n.length > Ee ? Object.fromEntries(n.slice(-Ee)) : t;
3162
+ localStorage.setItem(ut, JSON.stringify(r));
2982
3163
  } catch {
2983
3164
  }
2984
3165
  }
2985
- function Rn(s) {
2986
- return tt()[s];
3166
+ function ts(s) {
3167
+ return ft()[s];
2987
3168
  }
2988
- function nt(s) {
3169
+ function pt(s) {
2989
3170
  return s.type === "single" ? s.fixture.id : s.id;
2990
3171
  }
2991
- function kn(s, e) {
3172
+ function ns(s, e) {
2992
3173
  const t = new Array(s.length);
2993
- let n = ne;
3174
+ let n = oe;
2994
3175
  for (let r = 0; r < s.length; r++) {
2995
- const i = e.get(nt(s[r])) ?? In;
2996
- t[r] = { top: n, height: i }, n += i + On;
3176
+ const i = e.get(pt(s[r])) ?? Yn;
3177
+ t[r] = { top: n, height: i }, n += i + Qn;
2997
3178
  }
2998
3179
  return t;
2999
3180
  }
3000
- function Nn(s) {
3181
+ function ss(s) {
3001
3182
  if (s.length === 0) return 0;
3002
3183
  const e = s[s.length - 1];
3003
- return e.top + e.height + ne;
3184
+ return e.top + e.height + oe;
3004
3185
  }
3005
- function st(s, e) {
3186
+ function gt(s, e) {
3006
3187
  let t = 0, n = s.length;
3007
3188
  for (; t < n; ) {
3008
3189
  const r = t + n >> 1;
@@ -3010,75 +3191,75 @@ function st(s, e) {
3010
3191
  }
3011
3192
  return t;
3012
3193
  }
3013
- function Vn(s, e, t) {
3194
+ function rs(s, e, t) {
3014
3195
  if (s.length === 0) return { start: 0, end: 0 };
3015
- const n = st(s, e - Oe);
3196
+ const n = gt(s, e - Be);
3016
3197
  let r = n;
3017
- const i = e + t + Oe;
3198
+ const i = e + t + Be;
3018
3199
  for (; r < s.length && s[r].top < i; )
3019
3200
  r++;
3020
3201
  return { start: n, end: r };
3021
3202
  }
3022
- function Re(s, e) {
3203
+ function ze(s, e) {
3023
3204
  if (s.length === 0) return;
3024
- const t = st(s, e), n = Math.min(t, s.length - 1);
3205
+ const t = gt(s, e), n = Math.min(t, s.length - 1);
3025
3206
  return {
3026
3207
  rowIndex: n,
3027
3208
  offsetFromViewport: s[n].top - e
3028
3209
  };
3029
3210
  }
3030
- function ke(s, e) {
3211
+ function He(s, e) {
3031
3212
  return e.rowIndex >= s.length ? 0 : s[e.rowIndex].top - e.offsetFromViewport;
3032
3213
  }
3033
- class Dn extends N({
3214
+ class is extends F({
3034
3215
  model: f.const()
3035
3216
  }) {
3036
3217
  constructor() {
3037
3218
  super(...arguments);
3038
- c(this, "_rowHeights", _(this, wn()));
3039
- c(this, "_scrollTop", _(this, 0));
3040
- c(this, "_viewportHeight", _(this, 0));
3041
- c(this, "_scrollContainerRef", null);
3042
- c(this, "_resizeObserver", null);
3043
- c(this, "_viewportResizeObserver", null);
3044
- c(this, "_currentNodeId");
3045
- c(this, "_scrollSaveTimeout", null);
3046
- c(this, "_suppressScrollHandler", !1);
3047
- c(this, "layout", j(this, (t) => {
3219
+ l(this, "_rowHeights", v(this, Xn()));
3220
+ l(this, "_scrollTop", v(this, 0));
3221
+ l(this, "_viewportHeight", v(this, 0));
3222
+ l(this, "_scrollContainerRef", null);
3223
+ l(this, "_resizeObserver", null);
3224
+ l(this, "_viewportResizeObserver", null);
3225
+ l(this, "_currentNodeId");
3226
+ l(this, "_scrollSaveTimeout", null);
3227
+ l(this, "_suppressScrollHandler", !1);
3228
+ l(this, "layout", N(this, (t) => {
3048
3229
  const n = this.explorerModel.selectedFixtures.read(t), r = this._rowHeights.read(t);
3049
- return kn(n, r);
3230
+ return ns(n, r);
3050
3231
  }));
3051
- c(this, "visibleRowRange", j(this, (t) => {
3232
+ l(this, "visibleRowRange", N(this, (t) => {
3052
3233
  const n = this.layout.read(t), r = this._scrollTop.read(t), i = this._viewportHeight.read(t);
3053
- return Vn(n, r, i);
3234
+ return rs(n, r, i);
3054
3235
  }));
3055
- c(this, "setScrollContainerRef", (t) => {
3236
+ l(this, "setScrollContainerRef", (t) => {
3056
3237
  var n;
3057
3238
  this._scrollContainerRef && this._scrollContainerRef.removeEventListener("scroll", this._handleScroll), (n = this._viewportResizeObserver) == null || n.disconnect(), this._scrollContainerRef = t, t && (t.addEventListener("scroll", this._handleScroll, { passive: !0 }), this._viewportHeight.set(t.clientHeight, void 0), this._viewportResizeObserver = new ResizeObserver(([r]) => {
3058
3239
  this._viewportHeight.set(Math.round(r.contentRect.height), void 0);
3059
3240
  }), this._viewportResizeObserver.observe(t), this._restoreScrollPosition());
3060
3241
  });
3061
- c(this, "_handleScroll", () => {
3242
+ l(this, "_handleScroll", () => {
3062
3243
  this._scrollContainerRef && (this._scrollTop.set(this._scrollContainerRef.scrollTop, void 0), !(this._suppressScrollHandler || !this._currentNodeId) && (this._scrollSaveTimeout && clearTimeout(this._scrollSaveTimeout), this._scrollSaveTimeout = setTimeout(() => {
3063
3244
  if (!this._currentNodeId) return;
3064
- const t = this.layout.get(), n = Re(t, this._scrollTop.get());
3065
- n && Tn(this._currentNodeId, n);
3245
+ const t = this.layout.get(), n = ze(t, this._scrollTop.get());
3246
+ n && es(this._currentNodeId, n);
3066
3247
  }, 150)));
3067
3248
  });
3068
- c(this, "observeRowElement", (t, n) => {
3249
+ l(this, "observeRowElement", (t, n) => {
3069
3250
  t && (this._resizeObserver || (this._resizeObserver = new ResizeObserver((r) => {
3070
3251
  const i = this._rowHeights.get();
3071
3252
  let o;
3072
3253
  for (const d of r) {
3073
- const l = d.target.getAttribute("data-row-id");
3074
- if (!l) continue;
3254
+ const c = d.target.getAttribute("data-row-id");
3255
+ if (!c) continue;
3075
3256
  const h = Math.round(d.contentRect.height);
3076
- h > 0 && i.get(l) !== h && (o || (o = new Map(i)), o.set(l, h), Sn(l, h));
3257
+ h > 0 && i.get(c) !== h && (o || (o = new Map(i)), o.set(c, h), Zn(c, h));
3077
3258
  }
3078
3259
  if (o) {
3079
- const d = this.layout.get(), l = Re(d, this._scrollTop.get());
3080
- if (this._rowHeights.set(o, void 0), l && this._scrollContainerRef) {
3081
- const h = this.layout.get(), g = ke(h, l);
3260
+ const d = this.layout.get(), c = ze(d, this._scrollTop.get());
3261
+ if (this._rowHeights.set(o, void 0), c && this._scrollContainerRef) {
3262
+ const h = this.layout.get(), g = He(h, c);
3082
3263
  this._suppressScrollHandler = !0, this._scrollContainerRef.scrollTop = g, this._scrollTop.set(g, void 0), requestAnimationFrame(() => {
3083
3264
  this._suppressScrollHandler = !1;
3084
3265
  });
@@ -3095,9 +3276,9 @@ class Dn extends N({
3095
3276
  }
3096
3277
  _restoreScrollPosition() {
3097
3278
  if (!this._scrollContainerRef || !this._currentNodeId) return;
3098
- const t = Rn(this._currentNodeId);
3279
+ const t = ts(this._currentNodeId);
3099
3280
  if (!t) return;
3100
- const n = this.layout.get(), r = ke(n, t);
3281
+ const n = this.layout.get(), r = He(n, t);
3101
3282
  this._suppressScrollHandler = !0, this._scrollContainerRef.scrollTop = r, this._scrollTop.set(r, void 0), requestAnimationFrame(() => {
3102
3283
  this._suppressScrollHandler = !1;
3103
3284
  });
@@ -3107,47 +3288,47 @@ class Dn extends N({
3107
3288
  (t = this._resizeObserver) == null || t.disconnect(), (n = this._viewportResizeObserver) == null || n.disconnect(), this._scrollContainerRef && this._scrollContainerRef.removeEventListener("scroll", this._handleScroll), this._scrollSaveTimeout && clearTimeout(this._scrollSaveTimeout);
3108
3289
  }
3109
3290
  }
3110
- const An = V(
3111
- Dn,
3291
+ const os = B(
3292
+ is,
3112
3293
  {},
3113
3294
  (s, e) => {
3114
3295
  const t = e.explorerModel.selectedFixtures.read(s), n = e.explorerModel.selectedNodeId.read(s), r = e.layout.read(s), { start: i, end: o } = e.visibleRowRange.read(s);
3115
3296
  if (e.updateForSelection(n), t.length === 0)
3116
- return /* @__PURE__ */ a("div", { style: P.emptyState, children: /* @__PURE__ */ a("span", { style: P.emptyText, children: "Select a component or folder to preview" }) });
3117
- const d = Nn(r);
3118
- return /* @__PURE__ */ a("div", { ref: e.setScrollContainerRef, style: P.scrollContainer, children: /* @__PURE__ */ a("div", { style: { position: "relative", height: d }, children: t.slice(i, o).map((l, h) => {
3119
- const g = i + h, { top: b } = r[g], I = nt(l);
3297
+ return /* @__PURE__ */ a("div", { style: J.emptyState, children: /* @__PURE__ */ a("span", { style: J.emptyText, children: "Select a component or folder to preview" }) });
3298
+ const d = ss(r);
3299
+ return /* @__PURE__ */ a("div", { ref: e.setScrollContainerRef, style: J.scrollContainer, children: /* @__PURE__ */ a("div", { style: { position: "relative", height: d }, children: t.slice(i, o).map((c, h) => {
3300
+ const g = i + h, { top: _ } = r[g], x = pt(c);
3120
3301
  return /* @__PURE__ */ a(
3121
3302
  "div",
3122
3303
  {
3123
- ref: (S) => e.observeRowElement(S, I),
3124
- style: { position: "absolute", top: b, left: ne, right: ne },
3125
- children: l.type === "single" ? /* @__PURE__ */ a(Ze, { fixture: l.fixture, compact: !1 }) : l.type === "variants" ? /* @__PURE__ */ a(Bn, { row: l }) : l.type === "screenshot-comparison" && e.explorerModel.daemon ? /* @__PURE__ */ a(
3126
- Cn,
3304
+ ref: (w) => e.observeRowElement(w, x),
3305
+ style: { position: "absolute", top: _, left: oe, right: oe },
3306
+ children: c.type === "single" ? /* @__PURE__ */ a(dt, { fixture: c.fixture, compact: !1 }) : c.type === "variants" ? /* @__PURE__ */ a(as, { row: c }) : c.type === "screenshot-comparison" && e.explorerModel.daemon ? /* @__PURE__ */ a(
3307
+ Kn,
3127
3308
  {
3128
- name: l.name,
3129
- path: l.path,
3130
- items: l.items,
3309
+ name: c.name,
3310
+ path: c.path,
3311
+ items: c.items,
3131
3312
  daemon: e.explorerModel.daemon,
3132
3313
  baselineSession: "baseline",
3133
3314
  currentSession: "current"
3134
3315
  }
3135
3316
  ) : null
3136
3317
  },
3137
- I
3318
+ x
3138
3319
  );
3139
3320
  }) }) });
3140
3321
  }
3141
- ), Bn = D(
3322
+ ), as = k(
3142
3323
  { row: f.const() },
3143
3324
  (s, e) => {
3144
3325
  const t = e.row;
3145
3326
  return /* @__PURE__ */ p("div", { children: [
3146
- /* @__PURE__ */ a("div", { style: P.variantsHeader, children: /* @__PURE__ */ a("span", { style: P.variantsTitle, children: t.path }) }),
3147
- /* @__PURE__ */ a("div", { style: P.variantsContent, children: t.fixtures.map((n) => /* @__PURE__ */ a(Ze, { fixture: n, compact: !0 }, n.id)) })
3327
+ /* @__PURE__ */ a("div", { style: J.variantsHeader, children: /* @__PURE__ */ a("span", { style: J.variantsTitle, children: t.path }) }),
3328
+ /* @__PURE__ */ a("div", { style: J.variantsContent, children: t.fixtures.map((n) => /* @__PURE__ */ a(dt, { fixture: n, compact: !0 }, n.id)) })
3148
3329
  ] });
3149
3330
  }
3150
- ), P = {
3331
+ ), J = {
3151
3332
  scrollContainer: {
3152
3333
  flex: 1,
3153
3334
  overflow: "auto",
@@ -3178,24 +3359,24 @@ const An = V(
3178
3359
  flexWrap: "wrap",
3179
3360
  gap: "16px"
3180
3361
  }
3181
- }, rt = V(
3182
- qt,
3362
+ }, mt = B(
3363
+ Cn,
3183
3364
  { daemonModel: f.const() },
3184
3365
  (s, e) => {
3185
3366
  const t = e.leftSidebarVisible.read(s), n = e.rightSidebarVisible.read(s), r = e.isDarkTheme.read(s), i = e.selectedNode.read(s);
3186
3367
  return /* @__PURE__ */ p("div", { className: r ? "vscode-theme default-dark-plus" : "vscode-theme default-light-plus", style: u.container, children: [
3187
- t && /* @__PURE__ */ a(dn, { model: e }),
3368
+ t && /* @__PURE__ */ a(Fn, { model: e }),
3188
3369
  /* @__PURE__ */ p("div", { style: u.centerArea, children: [
3189
- /* @__PURE__ */ a(rn, { model: e }),
3190
- /* @__PURE__ */ a(An, { model: e })
3370
+ /* @__PURE__ */ a(Dn, { model: e }),
3371
+ /* @__PURE__ */ a(os, { model: e })
3191
3372
  ] }),
3192
- n && /* @__PURE__ */ a(un, { selectedNode: i })
3373
+ n && /* @__PURE__ */ a(Hn, { selectedNode: i })
3193
3374
  ] });
3194
3375
  }
3195
3376
  );
3196
- function Mn() {
3197
- const s = new qe();
3198
- return s.register("components/Button.fixture.tsx", J({
3377
+ function ds() {
3378
+ const s = new it();
3379
+ return s.register("components/Button.fixture.tsx", ee({
3199
3380
  Primary: {
3200
3381
  render: (e) => (e.innerHTML = "<button>Primary Button</button>", { dispose: () => {
3201
3382
  e.innerHTML = "";
@@ -3206,7 +3387,7 @@ function Mn() {
3206
3387
  e.innerHTML = "";
3207
3388
  } })
3208
3389
  }
3209
- })), s.register("components/Input.fixture.tsx", J({
3390
+ })), s.register("components/Input.fixture.tsx", ee({
3210
3391
  Text: {
3211
3392
  render: (e) => (e.innerHTML = '<input type="text" placeholder="Text Input" />', { dispose: () => {
3212
3393
  e.innerHTML = "";
@@ -3217,13 +3398,13 @@ function Mn() {
3217
3398
  e.innerHTML = "";
3218
3399
  } })
3219
3400
  }
3220
- })), s.register("components/Card.fixture.tsx", J({
3401
+ })), s.register("components/Card.fixture.tsx", ee({
3221
3402
  Basic: {
3222
3403
  render: (e) => (e.innerHTML = '<div style="border: 1px solid #ccc; padding: 16px;">Basic Card</div>', { dispose: () => {
3223
3404
  e.innerHTML = "";
3224
3405
  } })
3225
3406
  }
3226
- })), s.register("components/Feedback.fixture.tsx", J({
3407
+ })), s.register("components/Feedback.fixture.tsx", ee({
3227
3408
  Badge: {
3228
3409
  render: (e) => (e.innerHTML = '<span style="background: blue; color: white; padding: 2px 8px; border-radius: 4px;">Badge</span>', { dispose: () => {
3229
3410
  e.innerHTML = "";
@@ -3236,30 +3417,30 @@ function Mn() {
3236
3417
  }
3237
3418
  })), s;
3238
3419
  }
3239
- function Xn() {
3240
- const s = Mn();
3241
- return /* @__PURE__ */ a(rt, { registry: s });
3420
+ function Ss() {
3421
+ const s = ds();
3422
+ return /* @__PURE__ */ a(mt, { registry: s });
3242
3423
  }
3243
- var Fn = class le {
3424
+ var cs = class ve {
3244
3425
  constructor(e) {
3245
3426
  this.iterator = e;
3246
3427
  }
3247
3428
  static fromIterable(e) {
3248
- return new le(e[Symbol.asyncIterator]());
3429
+ return new ve(e[Symbol.asyncIterator]());
3249
3430
  }
3250
3431
  static fromFn(e) {
3251
- return new le(e());
3432
+ return new ve(e());
3252
3433
  }
3253
3434
  [Symbol.asyncIterator]() {
3254
3435
  return this.iterator;
3255
3436
  }
3256
- }, En = class extends Error {
3437
+ }, ls = class extends Error {
3257
3438
  constructor(s, e, t) {
3258
3439
  super(t), this.statusCode = s, this.method = e, this.name = "ApiError";
3259
3440
  }
3260
- }, zn = class {
3441
+ }, hs = class {
3261
3442
  constructor(s) {
3262
- c(this, "methods", this._createProxy(""));
3443
+ l(this, "methods", this._createProxy(""));
3263
3444
  this._request = s;
3264
3445
  }
3265
3446
  _createProxy(s) {
@@ -3270,8 +3451,8 @@ var Fn = class le {
3270
3451
  });
3271
3452
  }
3272
3453
  };
3273
- function Hn(s, e) {
3274
- return new zn(async (t, n) => {
3454
+ function us(s, e) {
3455
+ return new hs(async (t, n) => {
3275
3456
  var d;
3276
3457
  const r = await fetch(`${s}/${t}`, {
3277
3458
  method: "POST",
@@ -3282,48 +3463,48 @@ function Hn(s, e) {
3282
3463
  body: JSON.stringify(n)
3283
3464
  });
3284
3465
  if (r.status !== 200) {
3285
- const l = await r.json().catch(() => null);
3466
+ const c = await r.json().catch(() => null);
3286
3467
  let h;
3287
- throw l && typeof l == "object" && "errorMessage" in l ? h = `${l.errorMessage}` : h = `Error calling API method ${t}: ${JSON.stringify(l)} (Status: ${r.status}, Status Text: ${r.statusText})`, new En(r.status, t, h);
3468
+ throw c && typeof c == "object" && "errorMessage" in c ? h = `${c.errorMessage}` : h = `Error calling API method ${t}: ${JSON.stringify(c)} (Status: ${r.status}, Status Text: ${r.statusText})`, new ls(r.status, t, h);
3288
3469
  }
3289
3470
  const i = r.headers.get("Content-Type");
3290
- return i != null && i.startsWith("application/jsonl") ? Fn.fromFn(async function* () {
3291
- var I;
3292
- const l = (I = r.body) == null ? void 0 : I.getReader();
3293
- if (!l)
3471
+ return i != null && i.startsWith("application/jsonl") ? cs.fromFn(async function* () {
3472
+ var x;
3473
+ const c = (x = r.body) == null ? void 0 : x.getReader();
3474
+ if (!c)
3294
3475
  return;
3295
3476
  let h = "";
3296
3477
  const g = new TextDecoder("utf-8");
3297
3478
  for (; ; ) {
3298
- const { done: S, value: K } = await l.read();
3299
- if (S)
3479
+ const { done: w, value: U } = await c.read();
3480
+ if (w)
3300
3481
  break;
3301
- h += g.decode(K, { stream: !0 });
3302
- let E;
3303
- for (; (E = h.indexOf(`
3482
+ h += g.decode(U, { stream: !0 });
3483
+ let D;
3484
+ for (; (D = h.indexOf(`
3304
3485
  `)) >= 0; ) {
3305
- const ge = h.slice(0, E).trim();
3306
- h = h.slice(E + 1), ge.length > 0 && (yield JSON.parse(ge));
3486
+ const y = h.slice(0, D).trim();
3487
+ h = h.slice(D + 1), y.length > 0 && (yield JSON.parse(y));
3307
3488
  }
3308
3489
  }
3309
- const b = h.trim();
3310
- b.length > 0 && (yield JSON.parse(b));
3490
+ const _ = h.trim();
3491
+ _.length > 0 && (yield JSON.parse(_));
3311
3492
  }) : await r.json();
3312
3493
  });
3313
3494
  }
3314
- class Ln {
3495
+ class fs {
3315
3496
  constructor(e) {
3316
- c(this, "_sourceTreeIds", _(this, /* @__PURE__ */ new Map()));
3317
- c(this, "_sessions", _(this, []));
3318
- c(this, "_screenshotCache", /* @__PURE__ */ new Map());
3319
- c(this, "_client");
3320
- c(this, "_eventStreamAbort", null);
3321
- c(this, "sessionName");
3497
+ l(this, "_sourceTreeIds", v(this, /* @__PURE__ */ new Map()));
3498
+ l(this, "_sessions", v(this, []));
3499
+ l(this, "_screenshotCache", /* @__PURE__ */ new Map());
3500
+ l(this, "_client");
3501
+ l(this, "_eventStreamAbort", null);
3502
+ l(this, "sessionName");
3322
3503
  /** Observable map of sessionName → current sourceTreeId */
3323
- c(this, "sourceTreeIds", this._sourceTreeIds);
3504
+ l(this, "sourceTreeIds", this._sourceTreeIds);
3324
3505
  /** Observable list of sessions from the daemon */
3325
- c(this, "sessions", this._sessions);
3326
- this.config = e, this.sessionName = e.sessionName, this._client = Hn("/__explorer/daemon-api");
3506
+ l(this, "sessions", this._sessions);
3507
+ this.config = e, this.sessionName = e.sessionName, this._client = us("/__explorer/daemon-api");
3327
3508
  }
3328
3509
  /**
3329
3510
  * Initializes the model: fetches initial session info and starts listening to events.
@@ -3421,21 +3602,21 @@ class Ln {
3421
3602
  }
3422
3603
  }
3423
3604
  }
3424
- function $n() {
3605
+ function ps() {
3425
3606
  return window.__EXPLORER_DAEMON__;
3426
3607
  }
3427
- class Yn {
3608
+ class Is {
3428
3609
  constructor(e, t) {
3429
- c(this, "_root");
3430
- c(this, "_registry", new qe());
3431
- c(this, "_daemonModel");
3432
- this._populateRegistry(t), this._daemonModel = this._initializeDaemonModel(), this._root = at(e), this._root.render(dt(rt, { registry: this._registry, daemonModel: this._daemonModel }));
3610
+ l(this, "_root");
3611
+ l(this, "_registry", new it());
3612
+ l(this, "_daemonModel");
3613
+ this._populateRegistry(t), this._daemonModel = this._initializeDaemonModel(), this._root = yt(e), this._root.render(St(mt, { registry: this._registry, daemonModel: this._daemonModel }));
3433
3614
  }
3434
3615
  _initializeDaemonModel() {
3435
- const e = $n();
3616
+ const e = ps();
3436
3617
  if (!e)
3437
3618
  return;
3438
- const t = new Ln(e);
3619
+ const t = new fs(e);
3439
3620
  return t.initialize().catch((n) => {
3440
3621
  console.error("[ExplorerApp] Failed to initialize DaemonModel:", n);
3441
3622
  }), t;
@@ -3468,42 +3649,42 @@ class Yn {
3468
3649
  }
3469
3650
  }
3470
3651
  export {
3471
- Zt as ChevronDownIcon,
3472
- Jt as ChevronRightIcon,
3473
- Zn as CliRuntime,
3474
- Xt as ComponentIcon,
3475
- Ln as DaemonModel,
3476
- rt as Explorer,
3477
- Yn as ExplorerApp,
3478
- qt as ExplorerModel,
3479
- Xn as ExplorerWithDefaults,
3480
- qe as FixtureRegistry,
3481
- Yt as FolderIcon,
3482
- dn as LeftSidebar,
3483
- nn as MoonIcon,
3484
- Qt as PanelLeftIcon,
3485
- en as PanelRightIcon,
3486
- un as RightSidebar,
3487
- tn as SunIcon,
3488
- rn as TitleBar,
3489
- se as TitleBarButton,
3490
- an as TreeItem,
3491
- Je as TreeView,
3492
- lt as VIEWPORT_SIZES,
3493
- mt as collectComponents,
3494
- re as createFixtureTree,
3495
- J as defineFixture,
3496
- Kn as defineFixtureGroup,
3497
- Jn as defineFixtureVariants,
3498
- ve as findNodeByPath,
3499
- ht as getDefaultPropertyValues,
3500
- qn as isComponentDefinition,
3501
- ft as isFixtureGroup,
3502
- pt as isFixtureVariants,
3503
- ut as isSingleFixture,
3504
- pe as mergeStyles,
3505
- ct as resolveViewport,
3652
+ Sn as ChevronDownIcon,
3653
+ wn as ChevronRightIcon,
3654
+ ws as CliRuntime,
3655
+ In as ComponentIcon,
3656
+ fs as DaemonModel,
3657
+ mt as Explorer,
3658
+ Is as ExplorerApp,
3659
+ Cn as ExplorerModel,
3660
+ Ss as ExplorerWithDefaults,
3661
+ it as FixtureRegistry,
3662
+ On as FolderIcon,
3663
+ Fn as LeftSidebar,
3664
+ Nn as MoonIcon,
3665
+ Tn as PanelLeftIcon,
3666
+ Rn as PanelRightIcon,
3667
+ Hn as RightSidebar,
3668
+ Vn as SunIcon,
3669
+ Dn as TitleBar,
3670
+ de as TitleBarButton,
3671
+ Mn as TreeItem,
3672
+ at as TreeView,
3673
+ It as VIEWPORT_SIZES,
3674
+ At as collectComponents,
3675
+ ce as createFixtureTree,
3676
+ ee as defineFixture,
3677
+ Cs as defineFixtureGroup,
3678
+ xs as defineFixtureVariants,
3679
+ Oe as findNodeByPath,
3680
+ Tt as getDefaultPropertyValues,
3681
+ ys as isComponentDefinition,
3682
+ Vt as isFixtureGroup,
3683
+ Nt as isFixtureVariants,
3684
+ Rt as isSingleFixture,
3685
+ Se as mergeStyles,
3686
+ Ot as resolveViewport,
3506
3687
  u as styles,
3507
- Ke as toExplorerTree
3688
+ ot as toExplorerTree
3508
3689
  };
3509
3690
  //# sourceMappingURL=index.js.map