@sylwellsoftware/fray 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/README.md +198 -30
  2. package/colors/README.md +28 -13
  3. package/colors/gray/colors.css +54 -26
  4. package/colors/green/colors.css +54 -26
  5. package/colors/iceblue/colors.css +54 -26
  6. package/colors/ocean/colors.css +54 -26
  7. package/colors/orange/colors.css +54 -26
  8. package/colors/purple/colors.css +54 -26
  9. package/colors/red/colors.css +54 -26
  10. package/colors/yellow/colors.css +54 -26
  11. package/dist/Components/component.d.ts.map +1 -1
  12. package/dist/Components/data/descriptionList.d.ts.map +1 -1
  13. package/dist/Components/data/listview/listview.d.ts.map +1 -1
  14. package/dist/Components/data/table/DataTable.d.ts.map +1 -1
  15. package/dist/Components/data/table/FilterPanel.d.ts.map +1 -1
  16. package/dist/Components/data/table/TableHeaderCell.d.ts.map +1 -1
  17. package/dist/Components/data/treeview/treeview.d.ts.map +1 -1
  18. package/dist/Components/dialog/dialog.d.ts.map +1 -1
  19. package/dist/Components/layout/panel.d.ts +0 -1
  20. package/dist/Components/layout/panel.d.ts.map +1 -1
  21. package/dist/Components/layout/sidebar.d.ts +0 -1
  22. package/dist/Components/layout/sidebar.d.ts.map +1 -1
  23. package/dist/Components/layout/tabpanel/tab.d.ts +2 -0
  24. package/dist/Components/layout/tabpanel/tab.d.ts.map +1 -1
  25. package/dist/Components/layout/tabpanel/tabline.d.ts.map +1 -1
  26. package/dist/Components/layout/tabpanel/tabpanel.d.ts +9 -1
  27. package/dist/Components/layout/tabpanel/tabpanel.d.ts.map +1 -1
  28. package/dist/Components/lineinputs/checkbox/Checkbox.d.ts +0 -1
  29. package/dist/Components/lineinputs/checkbox/Checkbox.d.ts.map +1 -1
  30. package/dist/Components/lineinputs/dropdown.d.ts.map +1 -1
  31. package/dist/Components/lineinputs/radio.d.ts +51 -0
  32. package/dist/Components/lineinputs/radio.d.ts.map +1 -0
  33. package/dist/Components/lineinputs/textbox.d.ts.map +1 -1
  34. package/dist/Components/lineinputs/toggle.d.ts.map +1 -1
  35. package/dist/Components/menu/toolbar.d.ts +0 -1
  36. package/dist/Components/menu/toolbar.d.ts.map +1 -1
  37. package/dist/Components/status/progressBar.d.ts.map +1 -1
  38. package/dist/Components/theme/stylesheetPicker.d.ts.map +1 -1
  39. package/dist/index.d.ts +8 -0
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/index.js +2485 -1456
  42. package/dist/index.js.map +1 -1
  43. package/dist/{jsx-dev-runtime-pzseD2Sz.js → jsx-dev-runtime-Kf1Dhu-y.js} +412 -469
  44. package/dist/jsx-dev-runtime-Kf1Dhu-y.js.map +1 -0
  45. package/dist/jsx-dev-runtime.js +1 -1
  46. package/dist/jsx-runtime.js +1 -1
  47. package/dist/routing/RouteLink.d.ts +17 -0
  48. package/dist/routing/RouteLink.d.ts.map +1 -0
  49. package/dist/routing/RouteQuery.d.ts +18 -0
  50. package/dist/routing/RouteQuery.d.ts.map +1 -0
  51. package/dist/routing/RouteScope.d.ts +17 -0
  52. package/dist/routing/RouteScope.d.ts.map +1 -0
  53. package/dist/routing/RouteValue.d.ts +18 -0
  54. package/dist/routing/RouteValue.d.ts.map +1 -0
  55. package/dist/routing/navigationAdapter.d.ts +33 -0
  56. package/dist/routing/navigationAdapter.d.ts.map +1 -0
  57. package/dist/routing/route.d.ts +64 -0
  58. package/dist/routing/route.d.ts.map +1 -0
  59. package/dist/routing/router.d.ts +109 -0
  60. package/dist/routing/router.d.ts.map +1 -0
  61. package/dist/runtime.d.ts +5 -0
  62. package/dist/runtime.d.ts.map +1 -1
  63. package/dist/styling/baseStyleDefinitions.d.ts +0 -82
  64. package/dist/styling/baseStyleDefinitions.d.ts.map +1 -1
  65. package/dist/styling/theme.d.ts +3 -3
  66. package/dist/styling/theme.d.ts.map +1 -1
  67. package/package.json +3 -3
  68. package/styles/structural.css +220 -429
  69. package/themes/README.md +68 -66
  70. package/themes/dark.css +60 -1
  71. package/themes/java/theme.css +422 -135
  72. package/themes/light.css +60 -1
  73. package/themes/minimal/theme.css +420 -125
  74. package/themes/shiny/theme.css +492 -294
  75. package/dist/jsx-dev-runtime-pzseD2Sz.js.map +0 -1
@@ -1,6 +1,6 @@
1
- var pe = Object.defineProperty;
2
- var he = (e, t, r) => t in e ? pe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var c = (e, t, r) => he(e, typeof t != "symbol" ? t + "" : t, r);
1
+ var he = Object.defineProperty;
2
+ var de = (e, t, n) => t in e ? he(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var a = (e, t, n) => de(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  const D = {
5
5
  after: {
6
6
  content: '""',
@@ -16,48 +16,19 @@ const D = {
16
16
  display: "flex",
17
17
  "flex-flow": "row nowrap",
18
18
  position: "relative",
19
- "line-height": "var(--fray-line-height, 1.25)",
20
- "font-size": "var(--fray-font-size, var(--ui-font-size))",
21
- "min-height": "var(--fray-control-min-height, 2rem)",
22
- color: "var(--fray-ui-color, var(--ui-text-color))",
23
- "border-radius": "var(--fray-radius-md, var(--ui-border-radius))",
19
+ "min-height": "var(--control-min-height, 2rem)",
24
20
  "box-sizing": "border-box"
25
21
  },
26
22
  input: {
27
- background: "var(--fray-input-background, var(--ui-input-bg))",
28
- color: "var(--fray-input-color, var(--fray-ui-color, var(--ui-text-color)))",
29
- padding: "var(--ui-padding-v, 0.25rem) var(--ui-padding-h, 0.5rem)",
30
23
  "pointer-events": "all",
31
- border: "var(--fray-input-border, var(--ui-input-border))",
32
24
  width: "var(--input-width, 15rem)",
33
- "box-shadow": "var(--fray-input-shadow, var(--input-shadow, none))",
34
25
  "box-sizing": "border-box",
35
- "white-space": "nowrap",
36
- variants: {
37
- ":focus-visible": {
38
- outline: "2px solid transparent",
39
- "outline-offset": "1px",
40
- "border-color": "var(--fray-color-focus, var(--ui-accent-color))",
41
- "box-shadow": "var(--fray-focus-ring, 0 0 0 2px var(--ui-accent-color-highlight))"
42
- },
43
- ":disabled": {
44
- background: "var(--fray-input-background-disabled, var(--ui-input-bg-disabled))",
45
- "border-color": "var(--fray-color-border, var(--ui-input-border-disabled))",
46
- color: "var(--fray-input-color-disabled, var(--ui-input-text-color-disabled))",
47
- cursor: "not-allowed"
48
- }
49
- }
26
+ "white-space": "nowrap"
50
27
  },
51
28
  inputlike: {
52
- background: "var(--fray-input-background, var(--ui-input-bg))",
53
- color: "var(--fray-input-color, var(--fray-ui-color, var(--ui-text-color)))",
54
- padding: "var(--ui-padding-v, 0.25rem) var(--ui-padding-h, 0.5rem)",
55
29
  "pointer-events": "all",
56
- border: "var(--fray-input-border, var(--ui-input-border))",
57
- "box-shadow": "var(--fray-input-shadow, var(--input-shadow, none))",
58
30
  "box-sizing": "border-box",
59
- "white-space": "nowrap",
60
- "border-radius": "var(--fray-radius-md, var(--ui-border-radius))"
31
+ "white-space": "nowrap"
61
32
  },
62
33
  labeledinput: {
63
34
  display: "flex",
@@ -65,17 +36,6 @@ const D = {
65
36
  "align-items": "center",
66
37
  gap: ".5em"
67
38
  },
68
- label: {
69
- color: "var(--fray-ui-color, var(--ui-text-color))",
70
- "font-size": "var(--fray-font-size, var(--ui-font-size))"
71
- },
72
- disabled: {
73
- "border-color": "var(--fray-color-border, var(--ui-input-border-disabled))",
74
- color: "var(--fray-input-color-disabled, var(--ui-input-text-color-disabled))"
75
- },
76
- error: {
77
- color: "var(--fray-color-error, var(--error-color))"
78
- },
79
39
  working: {
80
40
  display: "inline",
81
41
  position: "absolute",
@@ -84,32 +44,14 @@ const D = {
84
44
  animation: "fray-placeholder-progress 0.8s linear infinite",
85
45
  "background-repeat": "repeat",
86
46
  "background-size": "2rem 2rem",
87
- "background-image": "var(--fray-working-background-image)",
47
+ "background-image": "var(--working-background-image)",
88
48
  border: "0 solid transparent",
89
49
  "border-radius": "inherit",
90
50
  "box-sizing": "border-box"
91
51
  },
92
- panel: {
93
- background: "var(--fray-panel-background, var(--panel-bg))",
94
- border: "var(--fray-panel-border, var(--panel-border))",
95
- "border-radius": "var(--fray-panel-radius, var(--panel-radius))",
96
- "box-shadow": "var(--fray-panel-shadow, var(--panel-shadow))",
97
- color: "var(--fray-panel-color, var(--panel-color))"
98
- },
99
- sectionheader: {
100
- "box-shadow": "var(--fray-section-header-shadow, var(--fray-header-shadow, var(--sectionheader-shadow)))",
101
- background: "var(--fray-section-header-background, var(--fray-header-background, var(--sectionheader-bg)))",
102
- color: "var(--fray-section-header-color, var(--fray-header-color, var(--sectionheader-color)))",
103
- border: "var(--fray-section-header-border, var(--fray-header-border, 0 solid transparent))"
104
- },
105
52
  uiline: {
106
53
  "box-sizing": "border-box",
107
- "line-height": "var(--fray-line-height, 1.25)",
108
- "font-size": "var(--fray-font-size, var(--ui-font-size))",
109
- "min-height": "var(--fray-control-min-height, 2rem)",
110
- color: "var(--fray-ui-color, var(--ui-text-color))",
111
- padding: "var(--ui-padding-v, 0.25rem) var(--ui-padding-h, 0.5rem)",
112
- "border-radius": "var(--fray-radius-md, var(--ui-border-radius))",
54
+ "min-height": "var(--control-min-height, 2rem)",
113
55
  cursor: "pointer",
114
56
  "user-select": "none"
115
57
  },
@@ -119,46 +61,22 @@ const D = {
119
61
  },
120
62
  button: {
121
63
  "box-sizing": "border-box",
122
- background: "var(--fray-button-background, var(--button-background))",
123
- border: "var(--fray-button-border, var(--button-border))",
124
- "box-shadow": "var(--fray-button-shadow, var(--button-shadow))",
125
- color: "var(--fray-button-color, var(--button-color))",
126
64
  cursor: "default",
127
65
  "user-select": "none",
128
66
  variants: {
129
- ":hover": {
130
- background: "var(--fray-button-background-hover, var(--button-background-hover))",
131
- "box-shadow": "var(--fray-button-shadow, var(--button-shadow))"
132
- },
133
- ":focus-visible": {
134
- outline: "2px solid transparent",
135
- "outline-offset": "1px",
136
- border: "1px solid var(--fray-color-focus, var(--ui-accent-color))",
137
- "box-shadow": "var(--fray-focus-ring, 0 0 0 2px var(--ui-accent-color-highlight))"
138
- },
139
67
  ":disabled": {
140
- background: "var(--fray-button-background-disabled, var(--button-background-disabled))",
141
- border: "var(--button-border-disabled, var(--fray-button-border))",
142
- color: "var(--fray-input-color-disabled, var(--ui-input-text-color-disabled))",
143
68
  cursor: "not-allowed",
144
69
  "pointer-events": "none"
145
70
  }
146
71
  }
147
- },
148
- toolbar: {
149
- background: "var(--fray-toolbar-background, var(--toolbar-bg))",
150
- border: "var(--fray-toolbar-border, var(--toolbar-border))",
151
- "border-radius": "var(--toolbar-radius, var(--fray-radius-md))",
152
- "box-shadow": "var(--fray-toolbar-shadow, var(--toolbar-shadow))",
153
- color: "var(--fray-toolbar-color, var(--toolbar-color))"
154
72
  }
155
73
  }, K = "data-fray-structural-styles";
156
- let be = 1;
74
+ let me = 1;
157
75
  class Q {
158
- constructor(t = `runtime-${be++}`) {
159
- c(this, "id");
160
- c(this, "cssFragments", /* @__PURE__ */ new Set());
161
- c(this, "baseStyleMap", /* @__PURE__ */ new Map());
76
+ constructor(t = `runtime-${me++}`) {
77
+ a(this, "id");
78
+ a(this, "cssFragments", /* @__PURE__ */ new Set());
79
+ a(this, "baseStyleMap", /* @__PURE__ */ new Map());
162
80
  if (typeof t != "string") throw new TypeError("StyleRegistry id must be a string");
163
81
  this.id = t;
164
82
  }
@@ -166,13 +84,13 @@ class Q {
166
84
  if (typeof t != "string") throw new TypeError("Component CSS must be a string");
167
85
  return t.trim().length > 0 && this.cssFragments.add(t.trim()), this;
168
86
  }
169
- registerBaseStyle(t, r) {
87
+ registerBaseStyle(t, n) {
170
88
  if (typeof t != "string" || t.trim().length === 0)
171
89
  throw new TypeError("Base style selector must be a non-empty string");
172
- const n = typeof r == "string" ? [r] : r;
173
- if (!Array.isArray(n))
90
+ const r = typeof n == "string" ? [n] : n;
91
+ if (!Array.isArray(r))
174
92
  throw new TypeError("Base style names must be a string or array");
175
- for (const i of n) {
93
+ for (const i of r) {
176
94
  if (!Object.hasOwn(D, i))
177
95
  throw new Error(`Unknown Fray base style: ${String(i)}`);
178
96
  const s = i, o = this.baseStyleMap.get(s) ?? /* @__PURE__ */ new Set();
@@ -203,13 +121,13 @@ class Q {
203
121
  }
204
122
  generateBaseStyleCSS() {
205
123
  let t = "";
206
- for (const [r, n] of this.baseStyleMap) {
207
- const { properties: i, variants: s } = ge(D[r]), o = [...n];
208
- t += U(r, o, i);
209
- for (const [a, l] of Object.entries(s))
124
+ for (const [n, r] of this.baseStyleMap) {
125
+ const { properties: i, variants: s } = ge(D[n]), o = [...r];
126
+ t += U(n, o, i);
127
+ for (const [c, l] of Object.entries(s))
210
128
  t += U(
211
- `${r}${a}`,
212
- o.map((u) => ve(u, a)),
129
+ `${n}${c}`,
130
+ o.map((u) => we(u, c)),
213
131
  l
214
132
  );
215
133
  }
@@ -229,11 +147,11 @@ class Q {
229
147
  injectAll(t = globalThis.document) {
230
148
  if ((t == null ? void 0 : t.head) == null)
231
149
  throw new TypeError("StyleRegistry.injectAll requires a document with a head");
232
- const r = `style[${K}="${we(this.id)}"]`;
233
- let n = t.head.querySelector(r);
234
- n == null && (n = t.createElement("style"), n.setAttribute(K, this.id), t.head.prepend(n));
150
+ const n = `style[${K}="${Se(this.id)}"]`;
151
+ let r = t.head.querySelector(n);
152
+ r == null && (r = t.createElement("style"), r.setAttribute(K, this.id), t.head.prepend(r));
235
153
  const i = this.generateCSS();
236
- return n.textContent !== i && (n.textContent = i), n;
154
+ return r.textContent !== i && (r.textContent = i), r;
237
155
  }
238
156
  reset() {
239
157
  this.cssFragments.clear(), this.baseStyleMap.clear();
@@ -242,38 +160,38 @@ class Q {
242
160
  function ye() {
243
161
  return new Q();
244
162
  }
245
- const me = new Q("");
163
+ const be = new Q("");
246
164
  function ge(e) {
247
165
  const t = {};
248
- let r = {};
249
- for (const [n, i] of Object.entries(e))
250
- if (n === "variants") {
166
+ let n = {};
167
+ for (const [r, i] of Object.entries(e))
168
+ if (r === "variants") {
251
169
  if (typeof i != "object")
252
170
  throw new TypeError("Base style variants must be declaration maps");
253
- r = i;
171
+ n = i;
254
172
  } else if (typeof i == "string")
255
- t[n] = i;
173
+ t[r] = i;
256
174
  else
257
- throw new TypeError(`Base style property ${n} must be a string`);
258
- return { properties: t, variants: r };
175
+ throw new TypeError(`Base style property ${r} must be a string`);
176
+ return { properties: t, variants: n };
259
177
  }
260
- function U(e, t, r) {
261
- if (t.length === 0 || Object.keys(r).length === 0) return "";
262
- const n = Object.entries(r).map(([i, s]) => ` ${i}: ${s};`).join(`
178
+ function U(e, t, n) {
179
+ if (t.length === 0 || Object.keys(n).length === 0) return "";
180
+ const r = Object.entries(n).map(([i, s]) => ` ${i}: ${s};`).join(`
263
181
  `);
264
182
  return `/* ${e} */
265
183
  ${t.join(`,
266
184
  `)} {
267
- ${n}
185
+ ${r}
268
186
  }
269
187
 
270
188
  `;
271
189
  }
272
- function ve(e, t) {
273
- const r = e.indexOf("::");
274
- return r < 0 ? `${e}${t}` : `${e.slice(0, r)}${t}${e.slice(r)}`;
190
+ function we(e, t) {
191
+ const n = e.indexOf("::");
192
+ return n < 0 ? `${e}${t}` : `${e.slice(0, n)}${t}${e.slice(n)}`;
275
193
  }
276
- function we(e) {
194
+ function Se(e) {
277
195
  return e.replaceAll("\\", "\\\\").replaceAll('"', '\\"');
278
196
  }
279
197
  const X = /* @__PURE__ */ new WeakSet(), ee = /* @__PURE__ */ new WeakSet();
@@ -284,44 +202,44 @@ function Ue(e) {
284
202
  return X.add(t), t;
285
203
  }
286
204
  function We(e, t) {
287
- if (z(e), typeof t != "function")
205
+ if (x(e), typeof t != "function")
288
206
  throw new TypeError(`Service provider "${e.name}" requires a factory function`);
289
- const r = Object.freeze({ key: e, create: t });
290
- return ee.add(r), r;
207
+ const n = Object.freeze({ key: e, create: t });
208
+ return ee.add(n), n;
291
209
  }
292
210
  class te {
293
211
  constructor(t = []) {
294
- c(this, "providers", /* @__PURE__ */ new Map());
295
- c(this, "instances", /* @__PURE__ */ new Map());
296
- c(this, "creationOrder", []);
297
- c(this, "resolving", []);
298
- c(this, "disposed", !1);
212
+ a(this, "providers", /* @__PURE__ */ new Map());
213
+ a(this, "instances", /* @__PURE__ */ new Map());
214
+ a(this, "creationOrder", []);
215
+ a(this, "resolving", []);
216
+ a(this, "disposed", !1);
299
217
  if (!Array.isArray(t))
300
218
  throw new TypeError("ServiceScope providers must be an array");
301
- for (const r of t) {
302
- if (Re(r), this.providers.has(r.key))
303
- throw new Error(`Service "${r.key.name}" is registered more than once`);
304
- this.providers.set(r.key, r);
219
+ for (const n of t) {
220
+ if (Re(n), this.providers.has(n.key))
221
+ throw new Error(`Service "${n.key.name}" is registered more than once`);
222
+ this.providers.set(n.key, n);
305
223
  }
306
224
  }
307
225
  get isDisposed() {
308
226
  return this.disposed;
309
227
  }
310
228
  has(t) {
311
- return this.assertActive(), z(t), this.providers.has(t);
229
+ return this.assertActive(), x(t), this.providers.has(t);
312
230
  }
313
231
  require(t) {
314
- if (this.assertActive(), z(t), this.instances.has(t)) return this.instances.get(t);
315
- const r = this.providers.get(t);
316
- if (r == null) throw new Error(`Service "${t.name}" is not registered`);
317
- const n = this.resolving.indexOf(t);
318
- if (n >= 0) {
319
- const i = [...this.resolving.slice(n), t].map((s) => s.name).join(" -> ");
232
+ if (this.assertActive(), x(t), this.instances.has(t)) return this.instances.get(t);
233
+ const n = this.providers.get(t);
234
+ if (n == null) throw new Error(`Service "${t.name}" is not registered`);
235
+ const r = this.resolving.indexOf(t);
236
+ if (r >= 0) {
237
+ const i = [...this.resolving.slice(r), t].map((s) => s.name).join(" -> ");
320
238
  throw new Error(`Circular service dependency: ${i}`);
321
239
  }
322
240
  this.resolving.push(t);
323
241
  try {
324
- const i = r.create(this);
242
+ const i = n.create(this);
325
243
  return this.instances.set(t, i), this.creationOrder.push(t), i;
326
244
  } finally {
327
245
  this.resolving.pop();
@@ -331,11 +249,11 @@ class te {
331
249
  if (this.disposed) return;
332
250
  this.disposed = !0;
333
251
  const t = [];
334
- for (const r of [...this.creationOrder].reverse()) {
335
- const n = this.instances.get(r);
252
+ for (const n of [...this.creationOrder].reverse()) {
253
+ const r = this.instances.get(n);
336
254
  try {
337
- const i = je(n);
338
- i != null && i.call(n);
255
+ const i = Ce(r);
256
+ i != null && i.call(r);
339
257
  } catch (i) {
340
258
  t.push(i);
341
259
  }
@@ -348,25 +266,25 @@ class te {
348
266
  if (this.disposed) throw new Error("ServiceScope has been disposed");
349
267
  }
350
268
  }
351
- function Se(e = []) {
269
+ function ve(e = []) {
352
270
  return new te(e);
353
271
  }
354
272
  function Ee(e) {
355
273
  return e != null && (typeof e == "object" || typeof e == "function") && X.has(e);
356
274
  }
357
- function z(e) {
275
+ function x(e) {
358
276
  if (!Ee(e)) throw new TypeError("Expected a service key created by defineService()");
359
277
  }
360
278
  function Re(e) {
361
279
  if (e == null || typeof e != "object" && typeof e != "function" || !ee.has(e))
362
280
  throw new TypeError("Expected a service provider created by provideService()");
363
281
  }
364
- function je(e) {
282
+ function Ce(e) {
365
283
  if (e == null || typeof e != "object" && typeof e != "function") return null;
366
284
  const t = Reflect.get(e, "dispose");
367
285
  return typeof t == "function" ? t : null;
368
286
  }
369
- const Te = /* @__PURE__ */ new Set([
287
+ const je = /* @__PURE__ */ new Set([
370
288
  "annotation-xml",
371
289
  "color-profile",
372
290
  "font-face",
@@ -377,45 +295,57 @@ const Te = /* @__PURE__ */ new Set([
377
295
  "missing-glyph"
378
296
  ]);
379
297
  class L {
380
- constructor(t = {}, r = ye()) {
381
- c(this, "elementPrefix");
382
- c(this, "elementNameOverrides");
383
- c(this, "styleRegistry");
384
- c(this, "services");
298
+ constructor(t = {}, n = ye()) {
299
+ a(this, "elementPrefix");
300
+ a(this, "elementNameOverrides");
301
+ a(this, "styleRegistry");
302
+ a(this, "services");
303
+ a(this, "router");
304
+ a(this, "routedRoots", /* @__PURE__ */ new WeakSet());
385
305
  if (t == null || typeof t != "object" || Array.isArray(t))
386
306
  throw new TypeError("FrayRuntime options must be an object");
387
- const n = t.elementNames ?? {};
388
- if (n == null || typeof n != "object" || Array.isArray(n))
307
+ const r = t.elementNames ?? {};
308
+ if (r == null || typeof r != "object" || Array.isArray(r))
389
309
  throw new TypeError("Fray elementNames must be an object");
390
- const i = n.prefix === void 0 ? "fray" : n.prefix;
391
- i !== null && C(i, "Fray element prefix");
392
- const s = n.overrides ?? {};
310
+ const i = r.prefix === void 0 ? "fray" : r.prefix;
311
+ i !== null && P(i, "Fray element prefix");
312
+ const s = r.overrides ?? {};
393
313
  if (s == null || typeof s != "object" || Array.isArray(s))
394
314
  throw new TypeError("Fray element-name overrides must be an object");
395
- for (const [o, a] of Object.entries(s))
396
- C(o, "Fray component host name"), Z(a);
397
- if (this.elementPrefix = i, this.elementNameOverrides = Object.freeze({ ...s }), this.styleRegistry = r, this.services = t.services ?? Se(), !(this.services instanceof te))
315
+ for (const [o, c] of Object.entries(s))
316
+ P(o, "Fray component host name"), Z(c);
317
+ if (this.elementPrefix = i, this.elementNameOverrides = Object.freeze({ ...s }), this.styleRegistry = n, this.services = t.services ?? ve(), !(this.services instanceof te))
398
318
  throw new TypeError("Fray services must be a ServiceScope");
319
+ if (this.router = t.router ?? null, this.router != null && (typeof this.router != "object" || typeof this.router.openScope != "function" || typeof this.router.completeScope != "function"))
320
+ throw new TypeError("Fray router must be a BrowserRouter");
399
321
  }
400
- resolveElementName(t, r = null) {
401
- C(t, "Fray component host name");
402
- const i = this.elementNameOverrides[t] ?? (this.elementPrefix == null ? r ?? t : `${this.elementPrefix}-${t}`);
322
+ resolveElementName(t, n = null) {
323
+ P(t, "Fray component host name");
324
+ const i = this.elementNameOverrides[t] ?? (this.elementPrefix == null ? n ?? t : `${this.elementPrefix}-${t}`);
403
325
  return Z(i), i;
404
326
  }
405
- resolveHostSelector(t, r, n = null) {
327
+ resolveHostSelector(t, n, r = null) {
406
328
  if (typeof t != "string") throw new TypeError("Host selector must be a string");
407
- return t.replaceAll("&", this.resolveElementName(r, n));
329
+ return t.replaceAll("&", this.resolveElementName(n, r));
408
330
  }
409
- resolveHostCSS(t, r, n = null) {
331
+ resolveHostCSS(t, n, r = null) {
410
332
  if (typeof t != "string") throw new TypeError("Host CSS must be a string");
411
- return t.replaceAll("&", this.resolveElementName(r, n));
333
+ return t.replaceAll("&", this.resolveElementName(n, r));
412
334
  }
413
- create(t, ...r) {
414
- const n = new t(...r);
415
- return n._setRuntime(this), n;
335
+ create(t, ...n) {
336
+ const r = new t(...n);
337
+ return r._setRuntime(this), r;
416
338
  }
417
- mount(t, r, n = null) {
418
- return t._setRuntime(this), t.mount(r, n), t;
339
+ mount(t, n, r = null) {
340
+ t._setRuntime(this);
341
+ let i = null;
342
+ this.router != null && !this.routedRoots.has(t) && (this.routedRoots.add(t), i = this.router.openScope(this.router.root, t), t.onCleanup(i));
343
+ try {
344
+ t.mount(n, r), this.router != null && i != null && this.router.completeScope(this.router.root, t);
345
+ } catch (s) {
346
+ throw i == null || i(), s;
347
+ }
348
+ return t;
419
349
  }
420
350
  registerStyles(t) {
421
351
  if (t == null || typeof t.registerStyles != "function")
@@ -429,16 +359,16 @@ class L {
429
359
  function Ze(e = {}) {
430
360
  return new L(e);
431
361
  }
432
- const W = new L({}, me);
433
- function C(e, t) {
362
+ const W = new L({}, be);
363
+ function P(e, t) {
434
364
  if (typeof e != "string" || !/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/.test(e))
435
365
  throw new TypeError(`${t} must be a lowercase kebab-case name`);
436
366
  }
437
367
  function Z(e) {
438
- if (C(e, "Fray element name"), !e.includes("-") || Te.has(e))
368
+ if (P(e, "Fray element name"), !e.includes("-") || je.has(e))
439
369
  throw new TypeError(`Fray element name must be a non-reserved name containing a hyphen: ${e}`);
440
370
  }
441
- const P = Symbol.for("@sylwellsoftware/fray.Fragment"), re = /* @__PURE__ */ new WeakSet(), ke = /* @__PURE__ */ new Set([
371
+ const A = Symbol.for("@sylwellsoftware/fray.Fragment"), ne = /* @__PURE__ */ new WeakSet(), Te = /* @__PURE__ */ new Set([
442
372
  "allowFullScreen",
443
373
  "async",
444
374
  "autoFocus",
@@ -462,7 +392,7 @@ const P = Symbol.for("@sylwellsoftware/fray.Fragment"), re = /* @__PURE__ */ new
462
392
  "required",
463
393
  "reversed",
464
394
  "selected"
465
- ]), Ce = /* @__PURE__ */ new Set([
395
+ ]), Pe = /* @__PURE__ */ new Set([
466
396
  "checked",
467
397
  "defaultChecked",
468
398
  "defaultValue",
@@ -480,76 +410,78 @@ const P = Symbol.for("@sylwellsoftware/fray.Fragment"), re = /* @__PURE__ */ new
480
410
  function Ye(e) {
481
411
  I(e, "live");
482
412
  const t = Object.freeze({ emitter: e });
483
- return re.add(t), t;
413
+ return ne.add(t), t;
484
414
  }
485
- function A(e, t = null, ...r) {
486
- const n = t ?? {};
487
- if (typeof n != "object" || Array.isArray(n))
415
+ function O(e, t = null, ...n) {
416
+ const r = t ?? {};
417
+ if (typeof r != "object" || Array.isArray(r))
488
418
  throw new TypeError("VNode props must be an object or null");
489
419
  const {
490
420
  children: i,
491
421
  key: s = null,
492
422
  ...o
493
- } = n;
423
+ } = r;
494
424
  return {
495
425
  type: e,
496
426
  key: s,
497
427
  props: {
498
428
  ...o,
499
- children: ne([i, r])
429
+ children: re([i, n])
500
430
  }
501
431
  };
502
432
  }
503
433
  function Ge(e, ...t) {
504
- return e.reduce((r, n, i) => r + n + String(t[i] ?? ""), "");
434
+ return e.reduce((n, r, i) => n + r + String(t[i] ?? ""), "");
505
435
  }
506
- const h = class h {
436
+ const d = class d {
507
437
  constructor(t = {}) {
508
- c(this, "props");
509
- c(this, "dom", null);
438
+ a(this, "props");
439
+ a(this, "dom", null);
510
440
  /** @internal */
511
- c(this, "_rendered", null);
441
+ a(this, "_rendered", null);
512
442
  /** @internal */
513
- c(this, "_childComponents", /* @__PURE__ */ new Set());
514
- c(this, "initialized", !1);
515
- c(this, "mounted", !1);
516
- c(this, "destroyed", !1);
517
- c(this, "updating", !1);
518
- c(this, "updateRequested", !1);
519
- c(this, "cleanupFunctions", /* @__PURE__ */ new Set());
520
- c(this, "watched", /* @__PURE__ */ new Map());
521
- c(this, "renderReadSubscriptions", /* @__PURE__ */ new Map());
522
- c(this, "collectingRenderReads", null);
443
+ a(this, "_childComponents", /* @__PURE__ */ new Set());
444
+ a(this, "initialized", !1);
445
+ a(this, "mounted", !1);
446
+ a(this, "destroyed", !1);
447
+ a(this, "updating", !1);
448
+ a(this, "updateRequested", !1);
449
+ a(this, "cleanupFunctions", /* @__PURE__ */ new Set());
450
+ a(this, "watched", /* @__PURE__ */ new Map());
451
+ a(this, "renderReadSubscriptions", /* @__PURE__ */ new Map());
452
+ a(this, "collectingRenderReads", null);
523
453
  /** @internal */
524
- c(this, "_runtime", W);
454
+ a(this, "_runtime", W);
455
+ /** @internal Route lineage inherited by nested routed components. */
456
+ a(this, "_routeContext", null);
525
457
  /** JSX component for this instance's runtime-configured custom host. */
526
- c(this, "Host", ({
458
+ a(this, "Host", ({
527
459
  children: t = [],
528
- ...r
529
- }) => this.host(r, t));
460
+ ...n
461
+ }) => this.host(n, t));
530
462
  if (t == null || typeof t != "object" || Array.isArray(t))
531
463
  throw new TypeError(`${this.constructor.name} props must be an object`);
532
464
  this.props = t;
533
465
  }
534
466
  static new(...t) {
535
- const r = new this(...t);
536
- if (!(r instanceof h))
467
+ const n = new this(...t);
468
+ if (!(n instanceof d))
537
469
  throw new TypeError("Component.new() requires a Component constructor");
538
- return r.mount();
470
+ return n.mount();
539
471
  }
540
472
  static get baseStyles() {
541
473
  return {};
542
474
  }
543
- static registerStyles(t = W, r = /* @__PURE__ */ new Set()) {
544
- if (r.has(this)) return;
545
- r.add(this);
546
- const n = this.hostName ?? null, i = this.standaloneHostName ?? null;
547
- this.css && t.styleRegistry.registerCSS(n == null ? this.css : t.resolveHostCSS(this.css, n, i));
475
+ static registerStyles(t = W, n = /* @__PURE__ */ new Set()) {
476
+ if (n.has(this)) return;
477
+ n.add(this);
478
+ const r = this.hostName ?? null, i = this.standaloneHostName ?? null;
479
+ this.css && t.styleRegistry.registerCSS(r == null ? this.css : t.resolveHostCSS(this.css, r, i));
548
480
  const s = De(this.baseStyles);
549
- for (const [o, a] of s)
550
- t.styleRegistry.registerBaseStyle(n == null ? o : t.resolveHostSelector(o, n, i), a);
481
+ for (const [o, c] of s)
482
+ t.styleRegistry.registerBaseStyle(r == null ? o : t.resolveHostSelector(o, r, i), c);
551
483
  for (const o of this.dependencies ?? [])
552
- o.registerStyles(t, r);
484
+ o.registerStyles(t, n);
553
485
  }
554
486
  /** One-time setup hook. Constructors must not subscribe or render. */
555
487
  initialize() {
@@ -558,31 +490,42 @@ const h = class h {
558
490
  throw new Error(`${this.constructor.name} must implement render()`);
559
491
  }
560
492
  /** Render this component's configured custom host element. */
561
- host(t = null, ...r) {
562
- const n = this.constructor, i = n.hostName;
493
+ host(t = null, ...n) {
494
+ const r = this.constructor, i = r.hostName;
563
495
  if (i == null)
564
496
  throw new Error(`${this.constructor.name} does not declare a custom host name`);
565
- return A(this._runtime.resolveElementName(
497
+ return O(this._runtime.resolveElementName(
566
498
  i,
567
- n.standaloneHostName
499
+ r.standaloneHostName
568
500
  ), {
569
501
  ...t,
570
502
  "data-fray-component": i
571
- }, ...r);
503
+ }, ...n);
572
504
  }
573
505
  /** @internal Assign an immutable application runtime before initialization or mounting. */
574
506
  _setRuntime(t) {
507
+ var n;
575
508
  if (!(t instanceof L))
576
509
  throw new TypeError("Component runtime must be a FrayRuntime");
577
510
  if (t === this._runtime) return this;
578
511
  if (this.initialized || this.mounted || this._rendered != null)
579
512
  throw new Error("Cannot change a component runtime after initialization");
580
- return this._runtime = t, this;
513
+ return this._runtime = t, this._routeContext == null && (this._routeContext = ((n = t.router) == null ? void 0 : n.root) ?? null), this;
581
514
  }
582
- mount(t = null, r = null) {
515
+ /** @internal Assign contextual route lineage before initialization. */
516
+ _setRouteContext(t) {
517
+ if (this.initialized || this.mounted || this._rendered != null)
518
+ throw new Error("Cannot change a component route context after initialization");
519
+ return this._routeContext = t, this;
520
+ }
521
+ /** @internal Route lineage inherited by component children. */
522
+ _routeContextForChildren() {
523
+ return this._routeContext;
524
+ }
525
+ mount(t = null, n = null) {
583
526
  if (this.destroyed) throw new Error("Cannot mount a destroyed component");
584
- let n = !1;
585
- return this.initialized || (this.validateRequiredServices(), this.initialized = !0, this.initialize()), this.mounted || (this.mounted = !0, this.update(), n = !0), t != null && (Ie(t), H(t, this._rendered, r)), n && this.afterMount(this.dom), this;
527
+ let r = !1;
528
+ return this.initialized || (this.validateRequiredServices(), this.initialized = !0, this.initialize()), this.mounted || (this.mounted = !0, this.update(), r = !0), t != null && (Ie(t), H(t, this._rendered, n)), r && this.afterMount(this.dom), this;
586
529
  }
587
530
  attachTo(t) {
588
531
  return this.mount(t), this;
@@ -596,15 +539,15 @@ const h = class h {
596
539
  try {
597
540
  do {
598
541
  this.updateRequested = !1;
599
- const r = /* @__PURE__ */ new Set();
600
- this.collectingRenderReads = r;
601
- let n;
542
+ const n = /* @__PURE__ */ new Set();
543
+ this.collectingRenderReads = n;
544
+ let r;
602
545
  try {
603
- n = R(this.render());
546
+ r = R(this.render());
604
547
  } finally {
605
548
  this.collectingRenderReads = null;
606
549
  }
607
- this._rendered = M(this._rendered, n, this), this.dom = ae(this._rendered), this.reconcileRenderReads(r), this.afterUpdate(this.dom);
550
+ this._rendered = M(this._rendered, r, this), this.dom = ae(this._rendered), this.reconcileRenderReads(n), this.afterUpdate(this.dom);
608
551
  } while (this.updateRequested && !this.destroyed);
609
552
  } finally {
610
553
  this.updating = !1;
@@ -621,15 +564,15 @@ const h = class h {
621
564
  afterUpdate(t) {
622
565
  }
623
566
  watch(...t) {
624
- for (const r of t) {
625
- if (r == null || typeof r.subscribe != "function")
567
+ for (const n of t) {
568
+ if (n == null || typeof n.subscribe != "function")
626
569
  throw new TypeError("watch requires emitter-like values");
627
- if (this.watched.has(r)) continue;
628
- const n = r.subscribe(({ event: i }) => {
570
+ if (this.watched.has(n)) continue;
571
+ const r = n.subscribe(({ event: i }) => {
629
572
  this.mounted && !this.destroyed && this.update(i);
630
573
  }, { emitCurrent: !1 });
631
- this.watched.set(r, n), this.onCleanup(() => {
632
- n(), this.watched.delete(r);
574
+ this.watched.set(n, r), this.onCleanup(() => {
575
+ r(), this.watched.delete(n);
633
576
  });
634
577
  }
635
578
  return this;
@@ -655,30 +598,30 @@ const h = class h {
655
598
  return t(), () => {
656
599
  };
657
600
  this.cleanupFunctions.add(t);
658
- let r = !0;
601
+ let n = !0;
659
602
  return () => {
660
- r && (r = !1, this.cleanupFunctions.delete(t), t());
603
+ n && (n = !1, this.cleanupFunctions.delete(t), t());
661
604
  };
662
605
  }
663
606
  /** Resolve one explicitly declared application service from this component's runtime. */
664
607
  requireService(t) {
665
608
  if (!this.initialized)
666
609
  throw new Error("Components may resolve services during initialize() or later");
667
- const r = this.constructor;
668
- if (!r.requiredServices.includes(t))
610
+ const n = this.constructor;
611
+ if (!n.requiredServices.includes(t))
669
612
  throw new Error(
670
- `${r.name} must declare service "${t.name}" in requiredServices`
613
+ `${n.name} must declare service "${t.name}" in requiredServices`
671
614
  );
672
615
  return this._runtime.services.require(t);
673
616
  }
674
- listen(t, r, n, i) {
617
+ listen(t, n, r, i) {
675
618
  if (t == null || typeof t.addEventListener != "function")
676
619
  throw new TypeError("listen target must be an EventTarget");
677
- const s = n;
678
- return t.addEventListener(r, s, i), this.onCleanup(() => t.removeEventListener(r, s, i)), this;
620
+ const s = r;
621
+ return t.addEventListener(n, s, i), this.onCleanup(() => t.removeEventListener(n, s, i)), this;
679
622
  }
680
623
  registerChild(t) {
681
- if (!(t instanceof h))
624
+ if (!(t instanceof d))
682
625
  throw new TypeError("registerChild requires a Component");
683
626
  return this._childComponents.add(t), t;
684
627
  }
@@ -693,9 +636,9 @@ const h = class h {
693
636
  }
694
637
  validateRequiredServices() {
695
638
  const t = this.constructor;
696
- for (const r of t.requiredServices)
697
- if (!this._runtime.services.has(r))
698
- throw new Error(`${t.name} requires unregistered service "${r.name}"`);
639
+ for (const n of t.requiredServices)
640
+ if (!this._runtime.services.has(n))
641
+ throw new Error(`${t.name} requires unregistered service "${n.name}"`);
699
642
  }
700
643
  onDestroy() {
701
644
  }
@@ -705,31 +648,31 @@ const h = class h {
705
648
  this.collectingRenderReads.add(t);
706
649
  }
707
650
  reconcileRenderReads(t) {
708
- for (const [r, n] of this.renderReadSubscriptions)
709
- t.has(r) || (n(), this.renderReadSubscriptions.delete(r));
710
- for (const r of t) {
711
- if (this.watched.has(r) || this.renderReadSubscriptions.has(r)) continue;
712
- const n = r.subscribe(({ event: i }) => {
651
+ for (const [n, r] of this.renderReadSubscriptions)
652
+ t.has(n) || (r(), this.renderReadSubscriptions.delete(n));
653
+ for (const n of t) {
654
+ if (this.watched.has(n) || this.renderReadSubscriptions.has(n)) continue;
655
+ const r = n.subscribe(({ event: i }) => {
713
656
  this.mounted && !this.destroyed && this.update(i);
714
657
  }, { emitCurrent: !1 });
715
- this.renderReadSubscriptions.set(r, n);
658
+ this.renderReadSubscriptions.set(n, r);
716
659
  }
717
660
  }
718
661
  };
719
- c(h, "dependencies", []), c(h, "requiredServices", []), c(h, "css", ""), c(h, "hostName", null), c(h, "standaloneHostName", null);
720
- let b = h;
662
+ a(d, "dependencies", []), a(d, "requiredServices", []), a(d, "css", ""), a(d, "hostName", null), a(d, "standaloneHostName", null);
663
+ let m = d;
721
664
  function R(e) {
722
- return Array.isArray(e) ? A(P, null, e) : e == null || typeof e == "boolean" ? A(P) : e;
665
+ return Array.isArray(e) ? O(A, null, e) : e == null || typeof e == "boolean" ? O(A) : e;
723
666
  }
724
- function ne(e) {
725
- const t = [], r = (n) => {
726
- if (Array.isArray(n))
727
- for (const i of n) r(i);
728
- else n != null && typeof n != "boolean" && t.push(n);
667
+ function re(e) {
668
+ const t = [], n = (r) => {
669
+ if (Array.isArray(r))
670
+ for (const i of r) n(i);
671
+ else r != null && typeof r != "boolean" && t.push(r);
729
672
  };
730
- return r(e), t;
673
+ return n(e), t;
731
674
  }
732
- function j(e, t) {
675
+ function C(e, t) {
733
676
  if (typeof e == "string" || typeof e == "number")
734
677
  return {
735
678
  kind: "text",
@@ -738,15 +681,15 @@ function j(e, t) {
738
681
  node: document.createTextNode(String(e)),
739
682
  owner: t
740
683
  };
741
- if ($(e)) {
742
- const s = document.createComment("fray-emitter-start"), o = document.createComment("fray-emitter-end"), a = e.get();
743
- if (Object.is(a, e))
684
+ if (k(e)) {
685
+ const s = document.createComment("fray-emitter-start"), o = document.createComment("fray-emitter-end"), c = e.get();
686
+ if (Object.is(c, e))
744
687
  throw new TypeError("A Fray emitter child cannot render itself");
745
688
  const l = document.createDocumentFragment();
746
689
  l.append(s, o);
747
- const u = j(R(a), t);
690
+ const u = C(R(c), t);
748
691
  H(l, u, o);
749
- const d = {
692
+ const p = {
750
693
  kind: "emitter",
751
694
  key: null,
752
695
  source: e,
@@ -757,14 +700,14 @@ function j(e, t) {
757
700
  },
758
701
  owner: t
759
702
  };
760
- return d.unsubscribe = e.subscribe(({ value: m }) => {
761
- if (Object.is(m, e))
703
+ return p.unsubscribe = e.subscribe(({ value: b }) => {
704
+ if (Object.is(b, e))
762
705
  throw new TypeError("A Fray emitter child cannot render itself");
763
- d.child = M(d.child, R(m), t);
764
- }, { emitCurrent: !1 }), d;
706
+ p.child = M(p.child, R(b), t);
707
+ }, { emitCurrent: !1 }), p;
765
708
  }
766
- if (e instanceof b)
767
- return e._setRuntime(t._runtime), e.mount(), t.registerChild(e), {
709
+ if (e instanceof m)
710
+ return e._setRuntime(t._runtime), e._setRouteContext(t._routeContextForChildren()), e.mount(), t.registerChild(e), {
768
711
  kind: "component",
769
712
  key: ce(e.props),
770
713
  type: e.constructor,
@@ -776,31 +719,31 @@ function j(e, t) {
776
719
  };
777
720
  if (!y(e))
778
721
  throw new TypeError(`Invalid Fray child: ${J(e)}`);
779
- const { type: r, key: n = null, props: i } = e;
780
- if (r === P) {
781
- const s = document.createComment("fray-fragment-start"), o = document.createComment("fray-fragment-end"), a = {
722
+ const { type: n, key: r = null, props: i } = e;
723
+ if (n === A) {
724
+ const s = document.createComment("fray-fragment-start"), o = document.createComment("fray-fragment-end"), c = {
782
725
  kind: "fragment",
783
- key: n,
784
- type: r,
726
+ key: r,
727
+ type: n,
785
728
  start: s,
786
729
  end: o,
787
730
  children: [],
788
731
  owner: t
789
732
  }, l = document.createDocumentFragment();
790
- return l.append(s, o), a.children = O(
733
+ return l.append(s, o), c.children = $(
791
734
  l,
792
735
  [],
793
736
  i.children,
794
737
  t,
795
738
  o,
796
739
  s
797
- ), a;
740
+ ), c;
798
741
  }
799
- if (typeof r == "string") {
800
- const s = document.createElement(r), o = {
742
+ if (typeof n == "string") {
743
+ const s = document.createElement(n), o = {
801
744
  kind: "element",
802
- key: n,
803
- type: r,
745
+ key: r,
746
+ type: n,
804
747
  node: s,
805
748
  props: {},
806
749
  listeners: /* @__PURE__ */ new Map(),
@@ -810,94 +753,94 @@ function j(e, t) {
810
753
  children: [],
811
754
  owner: t
812
755
  };
813
- return oe(o, i), o.children = O(s, [], i.children, t), o;
756
+ return oe(o, i), o.children = $(s, [], i.children, t), o;
814
757
  }
815
- if (ue(r)) {
816
- const s = i, o = Y(s), a = new r(o);
817
- a._setRuntime(t._runtime);
758
+ if (ue(n)) {
759
+ const s = i, o = Y(s), c = new n(o);
760
+ c._setRuntime(t._runtime), c._setRouteContext(t._routeContextForChildren());
818
761
  const l = {
819
762
  kind: "component",
820
- key: n,
821
- type: r,
822
- instance: a,
763
+ key: r,
764
+ type: n,
765
+ instance: c,
823
766
  prebuilt: !1,
824
767
  props: o,
825
768
  liveProps: /* @__PURE__ */ new Map(),
826
769
  owner: t
827
770
  };
828
- return se(l, s), a.mount(), t.registerChild(a), l;
771
+ return se(l, s), c.mount(), t.registerChild(c), l;
829
772
  }
830
- if (typeof r == "function") {
831
- const s = r, o = i, a = Y(o), l = R(s(a)), u = {
773
+ if (typeof n == "function") {
774
+ const s = n, o = i, c = Y(o), l = R(s(c)), u = {
832
775
  kind: "function",
833
- key: n,
776
+ key: r,
834
777
  type: s,
835
- props: a,
778
+ props: c,
836
779
  sourceProps: o,
837
780
  liveProps: /* @__PURE__ */ new Map(),
838
- child: j(l, t),
781
+ child: C(l, t),
839
782
  owner: t
840
783
  };
841
- return Ae(u), u;
784
+ return Oe(u), u;
842
785
  }
843
- throw new TypeError(`Unsupported vnode type: ${J(r)}`);
786
+ throw new TypeError(`Unsupported vnode type: ${J(n)}`);
844
787
  }
845
- function M(e, t, r) {
846
- if (e == null) return j(t, r);
847
- if (le(e, t)) return ie(e, t, r);
848
- const n = j(t, r), i = ae(e), s = (i == null ? void 0 : i.parentNode) ?? null;
849
- return s && H(s, n, i), g(e, !0), n;
788
+ function M(e, t, n) {
789
+ if (e == null) return C(t, n);
790
+ if (le(e, t)) return ie(e, t, n);
791
+ const r = C(t, n), i = ae(e), s = (i == null ? void 0 : i.parentNode) ?? null;
792
+ return s && H(s, r, i), g(e, !0), r;
850
793
  }
851
- function ie(e, t, r) {
852
- return e.kind === "text" ? (typeof t != "string" && typeof t != "number" || Object.is(e.value, t) || (e.value = t, e.node.data = String(t)), e) : e.kind === "emitter" ? (!$(t) || e.source !== t, e) : e.kind === "component" ? (t instanceof b || y(t) && Pe(e, t.props), e) : y(t) ? e.kind === "function" ? (Oe(e, t.props), e) : e.kind === "fragment" ? (e.children = O(
794
+ function ie(e, t, n) {
795
+ return e.kind === "text" ? (typeof t != "string" && typeof t != "number" || Object.is(e.value, t) || (e.value = t, e.node.data = String(t)), e) : e.kind === "emitter" ? (!k(t) || e.source !== t, e) : e.kind === "component" ? (t instanceof m || y(t) && Ae(e, t.props), e) : y(t) ? e.kind === "function" ? ($e(e, t.props), e) : e.kind === "fragment" ? (e.children = $(
853
796
  e.start.parentNode,
854
797
  e.children,
855
798
  t.props.children,
856
- r,
799
+ n,
857
800
  e.end,
858
801
  e.start
859
- ), e) : (oe(e, t.props), e.children = O(
802
+ ), e) : (oe(e, t.props), e.children = $(
860
803
  e.node,
861
804
  e.children,
862
805
  t.props.children,
863
- r
806
+ n
864
807
  ), e) : e;
865
808
  }
866
809
  function Y(e) {
867
- return Object.fromEntries(Object.entries(e).map(([t, r]) => [
810
+ return Object.fromEntries(Object.entries(e).map(([t, n]) => [
868
811
  t,
869
- T(r) ? r.emitter.get() : r
812
+ j(n) ? n.emitter.get() : n
870
813
  ]));
871
814
  }
872
815
  function se(e, t) {
873
- q(e.liveProps, t, (r, n) => {
874
- e.props = { ...e.props, [r]: n }, e.instance.setProps(e.props);
816
+ q(e.liveProps, t, (n, r) => {
817
+ e.props = { ...e.props, [n]: r }, e.instance.setProps(e.props);
875
818
  }), e.props = V(e.liveProps, t), e.instance.setProps(e.props);
876
819
  }
877
- function Pe(e, t) {
820
+ function Ae(e, t) {
878
821
  se(e, t);
879
822
  }
880
- function Ae(e) {
881
- q(e.liveProps, e.sourceProps, (t, r) => {
882
- e.props = { ...e.props, [t]: r }, _(e);
823
+ function Oe(e) {
824
+ q(e.liveProps, e.sourceProps, (t, n) => {
825
+ e.props = { ...e.props, [t]: n }, z(e);
883
826
  }), e.props = V(e.liveProps, e.sourceProps);
884
827
  }
885
- function Oe(e, t) {
886
- e.sourceProps = t, q(e.liveProps, t, (r, n) => {
887
- e.props = { ...e.props, [r]: n }, _(e);
888
- }), e.props = V(e.liveProps, t), _(e);
828
+ function $e(e, t) {
829
+ e.sourceProps = t, q(e.liveProps, t, (n, r) => {
830
+ e.props = { ...e.props, [n]: r }, z(e);
831
+ }), e.props = V(e.liveProps, t), z(e);
889
832
  }
890
- function _(e) {
833
+ function z(e) {
891
834
  const t = R(e.type(e.props));
892
835
  e.child = M(e.child, t, e.owner);
893
836
  }
894
- function q(e, t, r) {
895
- for (const [n, i] of e) {
896
- const s = t[n];
897
- T(s) && s.emitter === i.source || (i.unsubscribe(), e.delete(n));
837
+ function q(e, t, n) {
838
+ for (const [r, i] of e) {
839
+ const s = t[r];
840
+ j(s) && s.emitter === i.source || (i.unsubscribe(), e.delete(r));
898
841
  }
899
- for (const [n, i] of Object.entries(t)) {
900
- if (!T(i) || e.has(n)) continue;
842
+ for (const [r, i] of Object.entries(t)) {
843
+ if (!j(i) || e.has(r)) continue;
901
844
  const s = {
902
845
  source: i.emitter,
903
846
  value: i.emitter.get(),
@@ -905,187 +848,187 @@ function q(e, t, r) {
905
848
  }
906
849
  };
907
850
  s.unsubscribe = i.emitter.subscribe(({ value: o }) => {
908
- e.get(n) === s && (s.value = o, r(n, o));
909
- }, { emitCurrent: !1 }), e.set(n, s);
851
+ e.get(r) === s && (s.value = o, n(r, o));
852
+ }, { emitCurrent: !1 }), e.set(r, s);
910
853
  }
911
854
  }
912
855
  function V(e, t) {
913
- return Object.fromEntries(Object.entries(t).map(([r, n]) => {
856
+ return Object.fromEntries(Object.entries(t).map(([n, r]) => {
914
857
  var i;
915
858
  return [
916
- r,
917
- T(n) ? ((i = e.get(r)) == null ? void 0 : i.value) ?? n.emitter.get() : n
859
+ n,
860
+ j(r) ? ((i = e.get(n)) == null ? void 0 : i.value) ?? r.emitter.get() : r
918
861
  ];
919
862
  }));
920
863
  }
921
- function O(e, t, r, n, i = null, s = null) {
864
+ function $(e, t, n, r, i = null, s = null) {
922
865
  if (e == null) throw new Error("Cannot patch a detached fragment range");
923
- const o = ne(r), a = /* @__PURE__ */ new Map(), l = [];
866
+ const o = re(n), c = /* @__PURE__ */ new Map(), l = [];
924
867
  for (const f of t)
925
- f.key == null ? l.push(f) : a.has(f.key) || a.set(f.key, f);
926
- const u = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set(), m = [];
927
- let de = 0;
868
+ f.key == null ? l.push(f) : c.has(f.key) || c.set(f.key, f);
869
+ const u = /* @__PURE__ */ new Set(), p = /* @__PURE__ */ new Set(), b = [];
870
+ let pe = 0;
928
871
  for (const f of o) {
929
- const p = E(f);
930
- if (p != null) {
931
- if (u.has(p)) throw new Error(`Duplicate sibling key: ${String(p)}`);
932
- u.add(p);
872
+ const h = E(f);
873
+ if (h != null) {
874
+ if (u.has(h)) throw new Error(`Duplicate sibling key: ${String(h)}`);
875
+ u.add(h);
933
876
  }
934
- const k = p == null ? l[de++] : a.get(p);
935
- k && le(k, f) ? (d.add(k), m.push(ie(k, f, n))) : m.push(j(f, n));
877
+ const T = h == null ? l[pe++] : c.get(h);
878
+ T && le(T, f) ? (p.add(T), b.push(ie(T, f, r))) : b.push(C(f, r));
936
879
  }
937
880
  for (const f of t)
938
- d.has(f) || g(f, !0);
939
- let S = s ? s.nextSibling : e.firstChild;
940
- for (const f of m)
941
- for (const p of v(f))
942
- p === S ? S = S.nextSibling : (e.insertBefore(p, S ?? i), S = p.nextSibling);
943
- return m;
881
+ p.has(f) || g(f, !0);
882
+ let v = s ? s.nextSibling : e.firstChild;
883
+ for (const f of b)
884
+ for (const h of w(f))
885
+ h === v ? v = v.nextSibling : (e.insertBefore(h, v ?? i), v = h.nextSibling);
886
+ return b;
944
887
  }
945
888
  function oe(e, t) {
946
- const { children: r, ...n } = t, i = e.props, s = /* @__PURE__ */ new Set([...Object.keys(i), ...Object.keys(n)]);
889
+ const { children: n, ...r } = t, i = e.props, s = /* @__PURE__ */ new Set([...Object.keys(i), ...Object.keys(r)]);
947
890
  for (const o of ["value", "checked"])
948
- if (Object.hasOwn(n, o) && Object.hasOwn(n, `bind:${o}`))
891
+ if (Object.hasOwn(r, o) && Object.hasOwn(r, `bind:${o}`))
949
892
  throw new Error(`${o} and bind:${o} cannot be used together`);
950
893
  for (const o of s) {
951
- const a = i[o], l = n[o];
894
+ const c = i[o], l = r[o];
952
895
  if (Me(o))
953
- $e(e, o, l);
896
+ ke(e, o, l);
954
897
  else if (o === "ref")
955
- a !== l && Fe(e, l);
898
+ c !== l && _e(e, l);
956
899
  else if (Le(o))
957
900
  Ne(e, o, l);
958
- else if (T(l))
959
- xe(e, o, l);
901
+ else if (j(l))
902
+ Fe(e, o, l);
960
903
  else {
961
904
  const u = e.liveProps.get(o);
962
905
  u && (u.unsubscribe(), e.liveProps.delete(o));
963
- const d = (u == null ? void 0 : u.value) ?? a;
964
- Object.is(d, l) || w(e.node, o, d, l);
906
+ const p = (u == null ? void 0 : u.value) ?? c;
907
+ Object.is(p, l) || S(e.node, o, p, l);
965
908
  }
966
909
  }
967
- e.props = { ...n };
910
+ e.props = { ...r };
968
911
  }
969
- function xe(e, t, r) {
970
- const n = e.liveProps.get(t);
971
- if ((n == null ? void 0 : n.source) === r.emitter) return;
972
- n == null || n.unsubscribe();
973
- const i = r.emitter.get();
974
- w(e.node, t, (n == null ? void 0 : n.value) ?? e.props[t], i);
912
+ function Fe(e, t, n) {
913
+ const r = e.liveProps.get(t);
914
+ if ((r == null ? void 0 : r.source) === n.emitter) return;
915
+ r == null || r.unsubscribe();
916
+ const i = n.emitter.get();
917
+ S(e.node, t, (r == null ? void 0 : r.value) ?? e.props[t], i);
975
918
  const s = {
976
- source: r.emitter,
919
+ source: n.emitter,
977
920
  value: i,
978
921
  unsubscribe: () => {
979
922
  }
980
923
  };
981
- s.unsubscribe = r.emitter.subscribe(({ value: o }) => {
982
- const a = s.value;
983
- s.value = o, Object.is(a, o) || w(e.node, t, a, o);
924
+ s.unsubscribe = n.emitter.subscribe(({ value: o }) => {
925
+ const c = s.value;
926
+ s.value = o, Object.is(c, o) || S(e.node, t, c, o);
984
927
  }, { emitCurrent: !1 }), e.liveProps.set(t, s);
985
928
  }
986
- function $e(e, t, r) {
987
- const n = t.slice(5), i = e.nativeBindings.get(t);
988
- if (r == null) {
989
- i && (i.unsubscribe(), e.node.removeEventListener(i.eventName, i.listener), e.nativeBindings.delete(t), w(e.node, n, i.value, void 0));
929
+ function ke(e, t, n) {
930
+ const r = t.slice(5), i = e.nativeBindings.get(t);
931
+ if (n == null) {
932
+ i && (i.unsubscribe(), e.node.removeEventListener(i.eventName, i.listener), e.nativeBindings.delete(t), S(e.node, r, i.value, void 0));
990
933
  return;
991
934
  }
992
- if (qe(r, t), (i == null ? void 0 : i.source) === r) return;
993
- i && (i.unsubscribe(), e.node.removeEventListener(i.eventName, i.listener)), Ve(e.node, n);
994
- const s = He(e.node, n), o = r.get();
995
- w(e.node, n, i == null ? void 0 : i.value, o);
996
- const a = () => {
997
- r.set(Reflect.get(e.node, n), `${t} changed`);
935
+ if (qe(n, t), (i == null ? void 0 : i.source) === n) return;
936
+ i && (i.unsubscribe(), e.node.removeEventListener(i.eventName, i.listener)), Ve(e.node, r);
937
+ const s = He(e.node, r), o = n.get();
938
+ S(e.node, r, i == null ? void 0 : i.value, o);
939
+ const c = () => {
940
+ n.set(Reflect.get(e.node, r), `${t} changed`);
998
941
  }, l = {
999
- source: r,
942
+ source: n,
1000
943
  value: o,
1001
944
  eventName: s,
1002
- listener: a,
945
+ listener: c,
1003
946
  unsubscribe: () => {
1004
947
  }
1005
948
  };
1006
- l.unsubscribe = r.subscribe(({ value: u }) => {
1007
- const d = l.value;
1008
- l.value = u, Object.is(d, u) || w(e.node, n, d, u);
1009
- }, { emitCurrent: !1 }), e.node.addEventListener(s, a), e.nativeBindings.set(t, l);
1010
- }
1011
- function Ne(e, t, r) {
1012
- const n = t.slice(2).toLowerCase(), i = e.listeners.get(t);
1013
- if (i && i !== r && (e.node.removeEventListener(n, i), e.listeners.delete(t)), r != null && typeof r != "function")
949
+ l.unsubscribe = n.subscribe(({ value: u }) => {
950
+ const p = l.value;
951
+ l.value = u, Object.is(p, u) || S(e.node, r, p, u);
952
+ }, { emitCurrent: !1 }), e.node.addEventListener(s, c), e.nativeBindings.set(t, l);
953
+ }
954
+ function Ne(e, t, n) {
955
+ const r = t.slice(2).toLowerCase(), i = e.listeners.get(t);
956
+ if (i && i !== n && (e.node.removeEventListener(r, i), e.listeners.delete(t)), n != null && typeof n != "function")
1014
957
  throw new TypeError(`${t} must be a function or null`);
1015
- if (typeof r == "function" && i !== r) {
1016
- const s = r;
1017
- e.node.addEventListener(n, s), e.listeners.set(t, s);
958
+ if (typeof n == "function" && i !== n) {
959
+ const s = n;
960
+ e.node.addEventListener(r, s), e.listeners.set(t, s);
1018
961
  }
1019
962
  }
1020
- function Fe(e, t) {
963
+ function _e(e, t) {
1021
964
  if (B(e.ref, null), t != null && typeof t != "function" && typeof t != "object")
1022
965
  throw new TypeError("ref must be a function, object, or null");
1023
966
  e.ref = t, B(e.ref, e.node);
1024
967
  }
1025
- function w(e, t, r, n) {
968
+ function S(e, t, n, r) {
1026
969
  if (t === "class" || t === "className") {
1027
- N(e, "class", n);
970
+ N(e, "class", r);
1028
971
  return;
1029
972
  }
1030
973
  if (t === "for" || t === "htmlFor") {
1031
- N(e, "for", n);
974
+ N(e, "for", r);
1032
975
  return;
1033
976
  }
1034
977
  if (t === "dataset") {
1035
- ze(e, r, n);
978
+ xe(e, n, r);
1036
979
  return;
1037
980
  }
1038
981
  if (t === "style") {
1039
- _e(e, r, n);
982
+ ze(e, n, r);
1040
983
  return;
1041
984
  }
1042
985
  if (t === "dangerouslySetInnerHTML")
1043
986
  throw new Error("dangerouslySetInnerHTML is not supported");
1044
987
  const i = Be(t);
1045
- if (ke.has(i)) {
1046
- const s = !!n;
1047
- i in e && Reflect.set(e, i, s), e.toggleAttribute(F(t), s);
988
+ if (Te.has(i)) {
989
+ const s = !!r;
990
+ i in e && Reflect.set(e, i, s), e.toggleAttribute(_(t), s);
1048
991
  return;
1049
992
  }
1050
- if (Ce.has(i) && i in e) {
1051
- const s = n ?? (i === "value" ? "" : !1);
1052
- Object.is(Reflect.get(e, i), s) || Reflect.set(e, i, s), n == null && e.removeAttribute(F(t));
993
+ if (Pe.has(i) && i in e) {
994
+ const s = r ?? (i === "value" ? "" : !1);
995
+ Object.is(Reflect.get(e, i), s) || Reflect.set(e, i, s), r == null && e.removeAttribute(_(t));
1053
996
  return;
1054
997
  }
1055
- N(e, F(t), n);
998
+ N(e, _(t), r);
1056
999
  }
1057
- function ze(e, t, r) {
1058
- const n = x(t, "dataset"), i = x(r, "dataset");
1059
- for (const s of /* @__PURE__ */ new Set([...Object.keys(n), ...Object.keys(i)])) {
1000
+ function xe(e, t, n) {
1001
+ const r = F(t, "dataset"), i = F(n, "dataset");
1002
+ for (const s of /* @__PURE__ */ new Set([...Object.keys(r), ...Object.keys(i)])) {
1060
1003
  const o = i[s];
1061
1004
  o == null ? delete e.dataset[s] : e.dataset[s] = String(o);
1062
1005
  }
1063
1006
  }
1064
- function _e(e, t, r) {
1065
- if (typeof r == "string") {
1066
- e.style.cssText = r;
1007
+ function ze(e, t, n) {
1008
+ if (typeof n == "string") {
1009
+ e.style.cssText = n;
1067
1010
  return;
1068
1011
  }
1069
- const n = typeof t == "string" ? {} : x(t, "style"), i = x(r, "style");
1012
+ const r = typeof t == "string" ? {} : F(t, "style"), i = F(n, "style");
1070
1013
  typeof t == "string" && (e.style.cssText = "");
1071
- for (const s of /* @__PURE__ */ new Set([...Object.keys(n), ...Object.keys(i)])) {
1014
+ for (const s of /* @__PURE__ */ new Set([...Object.keys(r), ...Object.keys(i)])) {
1072
1015
  const o = i[s];
1073
1016
  s.startsWith("--") ? o == null ? e.style.removeProperty(s) : e.style.setProperty(s, String(o)) : Reflect.set(e.style, s, o == null ? "" : String(o));
1074
1017
  }
1075
1018
  }
1076
- function x(e, t) {
1019
+ function F(e, t) {
1077
1020
  if (e == null) return {};
1078
1021
  if (typeof e != "object" || Array.isArray(e))
1079
1022
  throw new TypeError(`${t} must be an object or null`);
1080
1023
  return e;
1081
1024
  }
1082
- function N(e, t, r) {
1083
- r == null || r === !1 ? e.removeAttribute(t) : r === !0 ? e.setAttribute(t, "") : e.setAttribute(t, String(r));
1025
+ function N(e, t, n) {
1026
+ n == null || n === !1 ? e.removeAttribute(t) : n === !0 ? e.setAttribute(t, "") : e.setAttribute(t, String(n));
1084
1027
  }
1085
1028
  function Be(e) {
1086
1029
  return e === "readonly" ? "readOnly" : e === "autofocus" ? "autoFocus" : e;
1087
1030
  }
1088
- function F(e) {
1031
+ function _(e) {
1089
1032
  return e === "className" ? "class" : e === "htmlFor" ? "for" : /^aria[A-Z]/.test(e) || /^data[A-Z]/.test(e) ? G(e) : e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`);
1090
1033
  }
1091
1034
  function G(e) {
@@ -1097,74 +1040,74 @@ function B(e, t) {
1097
1040
  function g(e, t) {
1098
1041
  if (e.kind === "emitter") {
1099
1042
  if (e.unsubscribe(), g(e.child, !1), t)
1100
- for (const r of v(e)) r.remove();
1043
+ for (const n of w(e)) n.remove();
1101
1044
  return;
1102
1045
  }
1103
1046
  if (e.kind === "component") {
1104
- for (const r of e.liveProps.values()) r.unsubscribe();
1047
+ for (const n of e.liveProps.values()) n.unsubscribe();
1105
1048
  e.liveProps.clear(), e.owner._childComponents.delete(e.instance), e.instance.destroy();
1106
1049
  return;
1107
1050
  }
1108
1051
  if (e.kind === "function") {
1109
- for (const r of e.liveProps.values()) r.unsubscribe();
1052
+ for (const n of e.liveProps.values()) n.unsubscribe();
1110
1053
  e.liveProps.clear(), g(e.child, t);
1111
1054
  return;
1112
1055
  }
1113
1056
  if (e.kind === "element") {
1114
1057
  B(e.ref, null);
1115
- for (const [r, n] of e.listeners)
1116
- e.node.removeEventListener(r.slice(2).toLowerCase(), n);
1058
+ for (const [n, r] of e.listeners)
1059
+ e.node.removeEventListener(n.slice(2).toLowerCase(), r);
1117
1060
  e.listeners.clear();
1118
- for (const r of e.liveProps.values()) r.unsubscribe();
1061
+ for (const n of e.liveProps.values()) n.unsubscribe();
1119
1062
  e.liveProps.clear();
1120
- for (const r of e.nativeBindings.values())
1121
- r.unsubscribe(), e.node.removeEventListener(r.eventName, r.listener);
1063
+ for (const n of e.nativeBindings.values())
1064
+ n.unsubscribe(), e.node.removeEventListener(n.eventName, n.listener);
1122
1065
  e.nativeBindings.clear();
1123
- for (const r of e.children) g(r, !1);
1066
+ for (const n of e.children) g(n, !1);
1124
1067
  t && e.node.remove();
1125
1068
  return;
1126
1069
  }
1127
1070
  if (e.kind === "fragment") {
1128
- for (const r of e.children) g(r, !1);
1071
+ for (const n of e.children) g(n, !1);
1129
1072
  if (t)
1130
- for (const r of v(e)) r.remove();
1073
+ for (const n of w(e)) n.remove();
1131
1074
  return;
1132
1075
  }
1133
1076
  t && e.node.remove();
1134
1077
  }
1135
- function H(e, t, r = null) {
1078
+ function H(e, t, n = null) {
1136
1079
  if (t != null)
1137
- for (const n of v(t)) e.insertBefore(n, r);
1080
+ for (const r of w(t)) e.insertBefore(r, n);
1138
1081
  }
1139
- function v(e) {
1082
+ function w(e) {
1140
1083
  if (e == null) return [];
1141
1084
  if (e.kind === "text" || e.kind === "element") return [e.node];
1142
- if (e.kind === "component") return v(e.instance._rendered);
1143
- if (e.kind === "function") return v(e.child);
1085
+ if (e.kind === "component") return w(e.instance._rendered);
1086
+ if (e.kind === "function") return w(e.child);
1144
1087
  const t = [];
1145
- let r = e.start;
1146
- for (; r && (t.push(r), r !== e.end); )
1147
- r = r.nextSibling;
1088
+ let n = e.start;
1089
+ for (; n && (t.push(n), n !== e.end); )
1090
+ n = n.nextSibling;
1148
1091
  return t;
1149
1092
  }
1150
1093
  function ae(e) {
1151
- return v(e)[0] ?? null;
1094
+ return w(e)[0] ?? null;
1152
1095
  }
1153
1096
  function E(e) {
1154
- return e instanceof b ? ce(e.props) : y(e) ? e.key : null;
1097
+ return e instanceof m ? ce(e.props) : y(e) ? e.key : null;
1155
1098
  }
1156
1099
  function ce(e) {
1157
1100
  const t = e.key;
1158
1101
  return typeof t == "string" || typeof t == "number" ? t : null;
1159
1102
  }
1160
1103
  function le(e, t) {
1161
- return e.kind === "text" ? typeof t == "string" || typeof t == "number" : e.kind === "emitter" ? $(t) && e.source === t : e.kind === "component" ? t instanceof b ? e.instance === t : y(t) && ue(t.type) && e.type === t.type && e.key === E(t) : e.kind === "function" ? y(t) && e.type === t.type && e.key === E(t) : e.kind === "fragment" ? y(t) && t.type === P && e.key === E(t) : y(t) && typeof t.type == "string" && e.type === t.type && e.key === E(t);
1104
+ return e.kind === "text" ? typeof t == "string" || typeof t == "number" : e.kind === "emitter" ? k(t) && e.source === t : e.kind === "component" ? t instanceof m ? e.instance === t : y(t) && ue(t.type) && e.type === t.type && e.key === E(t) : e.kind === "function" ? y(t) && e.type === t.type && e.key === E(t) : e.kind === "fragment" ? y(t) && t.type === A && e.key === E(t) : y(t) && typeof t.type == "string" && e.type === t.type && e.key === E(t);
1162
1105
  }
1163
1106
  function y(e) {
1164
1107
  return e != null && typeof e == "object" && Object.hasOwn(e, "type");
1165
1108
  }
1166
1109
  function ue(e) {
1167
- return typeof e == "function" && (e === b || e.prototype instanceof b);
1110
+ return typeof e == "function" && (e === m || e.prototype instanceof m);
1168
1111
  }
1169
1112
  function Le(e) {
1170
1113
  return /^on[A-Z]/.test(e);
@@ -1172,22 +1115,22 @@ function Le(e) {
1172
1115
  function Me(e) {
1173
1116
  return e === "bind:value" || e === "bind:checked";
1174
1117
  }
1175
- function T(e) {
1176
- return e != null && typeof e == "object" && re.has(e);
1118
+ function j(e) {
1119
+ return e != null && typeof e == "object" && ne.has(e);
1177
1120
  }
1178
- function $(e) {
1121
+ function k(e) {
1179
1122
  return (typeof e != "object" || e == null) && typeof e != "function" ? !1 : typeof Reflect.get(e, "get") == "function" && typeof Reflect.get(e, "getFetchState") == "function" && typeof Reflect.get(e, "getError") == "function" && typeof Reflect.get(e, "subscribe") == "function";
1180
1123
  }
1181
1124
  function I(e, t) {
1182
- if (!$(e)) throw new TypeError(`${t} requires a readable emitter`);
1125
+ if (!k(e)) throw new TypeError(`${t} requires a readable emitter`);
1183
1126
  }
1184
1127
  function qe(e, t) {
1185
1128
  if (I(e, t), typeof Reflect.get(e, "set") != "function")
1186
1129
  throw new TypeError(`${t} requires a writable emitter`);
1187
1130
  }
1188
1131
  function Ve(e, t) {
1189
- const r = e.localName;
1190
- if (!(t === "checked" ? r === "input" : r === "input" || r === "textarea" || r === "select")) throw new TypeError(`bind:${t} is not supported on ${r}`);
1132
+ const n = e.localName;
1133
+ if (!(t === "checked" ? n === "input" : n === "input" || n === "textarea" || n === "select")) throw new TypeError(`bind:${t} is not supported on ${n}`);
1191
1134
  }
1192
1135
  function He(e, t) {
1193
1136
  return t === "value" && e.localName !== "select" ? "input" : "change";
@@ -1209,48 +1152,48 @@ function De(e) {
1209
1152
  return e.map((t) => {
1210
1153
  if (!Array.isArray(t) || t.length < 2 || typeof t[0] != "string")
1211
1154
  throw new TypeError("Component baseStyles entries must be selector/style tuples");
1212
- const r = t[1];
1213
- if (typeof r != "string" && (!Array.isArray(r) || r.some((n) => typeof n != "string")))
1155
+ const n = t[1];
1156
+ if (typeof n != "string" && (!Array.isArray(n) || n.some((r) => typeof r != "string")))
1214
1157
  throw new TypeError("Component base style names must be strings");
1215
- return [t[0], r];
1158
+ return [t[0], n];
1216
1159
  });
1217
1160
  if (typeof e != "object")
1218
1161
  throw new TypeError("Component baseStyles must be an object or tuple array");
1219
- return Object.entries(e).map(([t, r]) => [
1162
+ return Object.entries(e).map(([t, n]) => [
1220
1163
  t,
1221
- r
1164
+ n
1222
1165
  ]);
1223
1166
  }
1224
- function fe(e, t, r) {
1225
- const n = t == null ? {} : { ...t };
1226
- return r !== void 0 && (n.key = r), A(e, n);
1167
+ function fe(e, t, n) {
1168
+ const r = t == null ? {} : { ...t };
1169
+ return n !== void 0 && (r.key = n), O(e, r);
1227
1170
  }
1228
1171
  const Je = fe, Qe = fe;
1229
1172
  function Xe(e) {
1230
- if (!(e instanceof b))
1173
+ if (!(e instanceof m))
1231
1174
  throw new TypeError("createPrebuiltElement requires a Component instance");
1232
1175
  return e;
1233
1176
  }
1234
1177
  export {
1235
- b as C,
1236
- P as F,
1178
+ m as C,
1179
+ A as F,
1237
1180
  te as S,
1238
1181
  Je as a,
1239
1182
  L as b,
1240
1183
  Ge as c,
1241
1184
  Q as d,
1242
1185
  Ze as e,
1243
- Se as f,
1186
+ ve as f,
1244
1187
  ye as g,
1245
- W as h,
1188
+ O as h,
1246
1189
  y as i,
1247
1190
  fe as j,
1248
- Ue as k,
1249
- A as l,
1191
+ W as k,
1192
+ Ue as l,
1250
1193
  Qe as m,
1251
1194
  Ye as n,
1252
1195
  Xe as o,
1253
1196
  We as p,
1254
- me as s
1197
+ be as s
1255
1198
  };
1256
- //# sourceMappingURL=jsx-dev-runtime-pzseD2Sz.js.map
1199
+ //# sourceMappingURL=jsx-dev-runtime-Kf1Dhu-y.js.map