@capillaryjs/capillary-ui 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +117 -2
- package/README.md +196 -35
- package/colors/README.md +53 -3
- package/colors/gray/colors.css +4 -2
- package/colors/green/colors.css +4 -2
- package/colors/iceblue/colors.css +4 -2
- package/colors/ocean/colors.css +4 -2
- package/colors/orange/colors.css +4 -2
- package/colors/purple/colors.css +4 -2
- package/colors/red/colors.css +7 -3
- package/colors/yellow/colors.css +8 -4
- package/dist/Components/app/app.d.ts +3 -3
- package/dist/Components/app/app.d.ts.map +1 -1
- package/dist/Components/component.d.ts +24 -3
- package/dist/Components/component.d.ts.map +1 -1
- package/dist/Components/data/descriptionList.d.ts.map +1 -1
- package/dist/Components/data/listview/listview.d.ts.map +1 -1
- package/dist/Components/data/table/DataTable.d.ts +8 -0
- package/dist/Components/data/table/DataTable.d.ts.map +1 -1
- package/dist/Components/data/table/FilterPanel.d.ts.map +1 -1
- package/dist/Components/data/table/TableHeader.d.ts +2 -0
- package/dist/Components/data/table/TableHeader.d.ts.map +1 -1
- package/dist/Components/data/table/TableHeaderCell.d.ts +18 -0
- package/dist/Components/data/table/TableHeaderCell.d.ts.map +1 -1
- package/dist/Components/data/table/tableDataSource.d.ts +6 -0
- package/dist/Components/data/table/tableDataSource.d.ts.map +1 -1
- package/dist/Components/data/treeview/treeview.d.ts.map +1 -1
- package/dist/Components/layout/groupBox.d.ts.map +1 -1
- package/dist/Components/layout/header.d.ts.map +1 -1
- package/dist/Components/layout/layout.d.ts +2 -2
- package/dist/Components/layout/layout.d.ts.map +1 -1
- package/dist/Components/layout/layoutTraits.d.ts +6 -0
- package/dist/Components/layout/layoutTraits.d.ts.map +1 -1
- package/dist/Components/layout/optionGroup.d.ts.map +1 -1
- package/dist/Components/layout/optionsBox.d.ts +2 -1
- package/dist/Components/layout/optionsBox.d.ts.map +1 -1
- package/dist/Components/layout/splitView.d.ts +2 -0
- package/dist/Components/layout/splitView.d.ts.map +1 -1
- package/dist/Components/lineinputs/CheckableControl.d.ts +2 -2
- package/dist/Components/lineinputs/CheckableControl.d.ts.map +1 -1
- package/dist/Components/lineinputs/LabeledInputControl.d.ts +2 -2
- package/dist/Components/lineinputs/LabeledInputControl.d.ts.map +1 -1
- package/dist/Components/lineinputs/LineControl.d.ts +7 -0
- package/dist/Components/lineinputs/LineControl.d.ts.map +1 -0
- package/dist/Components/lineinputs/SelectControl.d.ts.map +1 -1
- package/dist/Components/lineinputs/checkbox/Checkbox.d.ts +9 -3
- package/dist/Components/lineinputs/checkbox/Checkbox.d.ts.map +1 -1
- package/dist/Components/lineinputs/checkbox/QuadCheckbox.d.ts +1 -0
- package/dist/Components/lineinputs/checkbox/QuadCheckbox.d.ts.map +1 -1
- package/dist/Components/lineinputs/checkbox/TriCheckbox.d.ts +1 -0
- package/dist/Components/lineinputs/checkbox/TriCheckbox.d.ts.map +1 -1
- package/dist/Components/lineinputs/datetime/TemporalInput.d.ts.map +1 -1
- package/dist/Components/lineinputs/dropdown.d.ts +4 -2
- package/dist/Components/lineinputs/dropdown.d.ts.map +1 -1
- package/dist/Components/lineinputs/radio.d.ts +9 -4
- package/dist/Components/lineinputs/radio.d.ts.map +1 -1
- package/dist/Components/lineinputs/requiredPresentation.d.ts +21 -0
- package/dist/Components/lineinputs/requiredPresentation.d.ts.map +1 -0
- package/dist/Components/lineinputs/textbox.d.ts.map +1 -1
- package/dist/Components/lineinputs/toggle.d.ts +4 -2
- package/dist/Components/lineinputs/toggle.d.ts.map +1 -1
- package/dist/Components/menu/button.d.ts +2 -2
- package/dist/Components/menu/button.d.ts.map +1 -1
- package/dist/Components/status/progressBar.d.ts +2 -2
- package/dist/Components/status/progressBar.d.ts.map +1 -1
- package/dist/Components/status/statusPresentation.d.ts.map +1 -1
- package/dist/Components/theme/stylesheetPicker.d.ts +2 -1
- package/dist/Components/theme/stylesheetPicker.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2697 -2079
- package/dist/index.js.map +1 -1
- package/dist/jsx-dev-runtime.js +3 -3
- package/dist/jsx-runtime-Ba-uafjl.js +1631 -0
- package/dist/jsx-runtime-Ba-uafjl.js.map +1 -0
- package/dist/jsx-runtime.js +2 -2
- package/dist/localization.d.ts +1 -1
- package/dist/localization.d.ts.map +1 -1
- package/dist/routing/RouteOutlet.d.ts.map +1 -1
- package/dist/runtime.d.ts +4 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/styling/theme.d.ts +1 -1
- package/dist/styling/theme.d.ts.map +1 -1
- package/docs/application-composition-guide.md +22 -5
- package/package.json +3 -3
- package/styles/structural.css +704 -158
- package/themes/README.md +9 -2
- package/themes/base.css +114 -18
- package/themes/capillary/theme.css +300 -0
- package/themes/shiny/theme.css +33 -15
- package/themes/soft/theme.css +37 -0
- package/themes/white/theme.css +52 -0
- package/dist/jsx-dev-runtime-D3UnwrKT.js +0 -1362
- package/dist/jsx-dev-runtime-D3UnwrKT.js.map +0 -1
- package/themes/java/theme.css +0 -21
|
@@ -0,0 +1,1631 @@
|
|
|
1
|
+
var $e = Object.defineProperty;
|
|
2
|
+
var Ae = (e, t, n) => t in e ? $e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var c = (e, t, n) => Ae(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { defaultDiagnosticScope as ke, Diagnostics as u, diagnosticInfo as ze, EventBubble as X } from "@capillaryjs/capillary";
|
|
5
|
+
const ee = "data-cap-structural-styles";
|
|
6
|
+
let Ne = 1;
|
|
7
|
+
class le {
|
|
8
|
+
constructor(t = `runtime-${Ne++}`) {
|
|
9
|
+
c(this, "id");
|
|
10
|
+
c(this, "cssFragments", /* @__PURE__ */ new Map());
|
|
11
|
+
if (typeof t != "string") throw new TypeError("StyleRegistry id must be a string");
|
|
12
|
+
this.id = t;
|
|
13
|
+
}
|
|
14
|
+
registerCSS(t) {
|
|
15
|
+
if (typeof t != "string") throw new TypeError("Component CSS must be a string");
|
|
16
|
+
const n = t.trim();
|
|
17
|
+
return n.length > 0 && this.cssFragments.set(`raw:${n}`, { kind: "raw", css: n }), this;
|
|
18
|
+
}
|
|
19
|
+
/** @internal Collect a host-relative component template without resolving it yet. */
|
|
20
|
+
registerHostCSS(t, n) {
|
|
21
|
+
if (typeof t != "string") throw new TypeError("Component CSS must be a string");
|
|
22
|
+
if (typeof n != "string" || n.trim().length === 0)
|
|
23
|
+
throw new TypeError("Component CSS host must be a non-empty selector");
|
|
24
|
+
const i = t.trim();
|
|
25
|
+
if (i.length === 0) return this;
|
|
26
|
+
if (!i.includes("&")) return this.registerCSS(i);
|
|
27
|
+
const s = `host:${i}`, r = this.cssFragments.get(s);
|
|
28
|
+
return r == null ? this.cssFragments.set(s, {
|
|
29
|
+
kind: "host",
|
|
30
|
+
css: i,
|
|
31
|
+
hosts: /* @__PURE__ */ new Set([n.trim()])
|
|
32
|
+
}) : r.kind === "host" && r.hosts.add(n.trim()), this;
|
|
33
|
+
}
|
|
34
|
+
generateCSS() {
|
|
35
|
+
return [...this.cssFragments.values()].map((t) => t.kind === "raw" ? t.css : ce(t.css, [...t.hosts])).join(`
|
|
36
|
+
|
|
37
|
+
`);
|
|
38
|
+
}
|
|
39
|
+
injectAll(t = globalThis.document) {
|
|
40
|
+
if ((t == null ? void 0 : t.head) == null)
|
|
41
|
+
throw new TypeError("StyleRegistry.injectAll requires a document with a head");
|
|
42
|
+
const n = `style[${ee}="${Me(this.id)}"]`;
|
|
43
|
+
let i = t.head.querySelector(n);
|
|
44
|
+
i == null && (i = t.createElement("style"), i.setAttribute(ee, this.id), t.head.prepend(i));
|
|
45
|
+
const s = this.generateCSS();
|
|
46
|
+
return i.textContent !== s && (i.textContent = s), i;
|
|
47
|
+
}
|
|
48
|
+
reset() {
|
|
49
|
+
this.cssFragments.clear();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function xe() {
|
|
53
|
+
return new le();
|
|
54
|
+
}
|
|
55
|
+
const Ie = new le("");
|
|
56
|
+
function Me(e) {
|
|
57
|
+
return e.replaceAll("\\", "\\\\").replaceAll('"', '\\"');
|
|
58
|
+
}
|
|
59
|
+
function ce(e, t) {
|
|
60
|
+
let n = "", i = 0;
|
|
61
|
+
for (; i < e.length; ) {
|
|
62
|
+
const s = qe(e, i);
|
|
63
|
+
if (s < 0) return n + e.slice(i);
|
|
64
|
+
const r = Be(e, s);
|
|
65
|
+
if (r < 0) return n + e.slice(i);
|
|
66
|
+
const o = e.slice(i, s), a = e.slice(s + 1, r), l = o.trim();
|
|
67
|
+
n += l.startsWith("@") ? `${o}{${ce(a, t)}}` : `${Ue(o, t)}{${a}}`, i = r + 1;
|
|
68
|
+
}
|
|
69
|
+
return n;
|
|
70
|
+
}
|
|
71
|
+
function Ue(e, t) {
|
|
72
|
+
var o, a, l;
|
|
73
|
+
if (t.length === 1 || !e.includes("&"))
|
|
74
|
+
return t.length === 1 ? e.replaceAll("&", t[0]) : e;
|
|
75
|
+
const n = ((o = e.match(/^\s*/)) == null ? void 0 : o[0]) ?? "", i = ((a = e.match(/\s*$/)) == null ? void 0 : a[0]) ?? "", s = Fe(e.trim()), r = ((l = n.match(/(?:^|\n)([ \t]*)$/)) == null ? void 0 : l[1]) ?? "";
|
|
76
|
+
return n + s.flatMap((f) => f.includes("&") ? t.map((p) => f.replaceAll("&", p)) : [f]).join(`,
|
|
77
|
+
${r}`) + i;
|
|
78
|
+
}
|
|
79
|
+
function Fe(e) {
|
|
80
|
+
const t = [];
|
|
81
|
+
let n = 0, i = 0, s = 0, r = null;
|
|
82
|
+
for (let o = 0; o < e.length; o += 1) {
|
|
83
|
+
const a = e[o];
|
|
84
|
+
if (r != null) {
|
|
85
|
+
a === "\\" ? o += 1 : a === r && (r = null);
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
a === '"' || a === "'" ? r = a : a === "(" ? i += 1 : a === ")" ? i -= 1 : a === "[" ? s += 1 : a === "]" ? s -= 1 : a === "," && i === 0 && s === 0 && (t.push(e.slice(n, o).trim()), n = o + 1);
|
|
89
|
+
}
|
|
90
|
+
return t.push(e.slice(n).trim()), t.filter(Boolean);
|
|
91
|
+
}
|
|
92
|
+
function qe(e, t) {
|
|
93
|
+
for (let n = t; n < e.length; n += 1) {
|
|
94
|
+
const i = e[n];
|
|
95
|
+
if (i === '"' || i === "'")
|
|
96
|
+
n = ue(e, n);
|
|
97
|
+
else if (i === "/" && e[n + 1] === "*")
|
|
98
|
+
n = fe(e, n);
|
|
99
|
+
else if (i === "{")
|
|
100
|
+
return n;
|
|
101
|
+
}
|
|
102
|
+
return -1;
|
|
103
|
+
}
|
|
104
|
+
function Be(e, t) {
|
|
105
|
+
let n = 1;
|
|
106
|
+
for (let i = t + 1; i < e.length; i += 1) {
|
|
107
|
+
const s = e[i];
|
|
108
|
+
if (s === '"' || s === "'")
|
|
109
|
+
i = ue(e, i);
|
|
110
|
+
else if (s === "/" && e[i + 1] === "*")
|
|
111
|
+
i = fe(e, i);
|
|
112
|
+
else if (s === "{")
|
|
113
|
+
n += 1;
|
|
114
|
+
else if (s === "}" && --n === 0)
|
|
115
|
+
return i;
|
|
116
|
+
}
|
|
117
|
+
return -1;
|
|
118
|
+
}
|
|
119
|
+
function ue(e, t) {
|
|
120
|
+
const n = e[t];
|
|
121
|
+
for (let i = t + 1; i < e.length; i += 1)
|
|
122
|
+
if (e[i] === "\\") i += 1;
|
|
123
|
+
else if (e[i] === n) return i;
|
|
124
|
+
return e.length;
|
|
125
|
+
}
|
|
126
|
+
function fe(e, t) {
|
|
127
|
+
const n = e.indexOf("*/", t + 2);
|
|
128
|
+
return n < 0 ? e.length : n + 1;
|
|
129
|
+
}
|
|
130
|
+
const pe = /* @__PURE__ */ new WeakSet(), de = /* @__PURE__ */ new WeakSet();
|
|
131
|
+
function vt(e) {
|
|
132
|
+
if (typeof e != "string" || e.trim() === "")
|
|
133
|
+
throw new TypeError("Service name must be a non-empty string");
|
|
134
|
+
const t = Object.freeze({ name: e.trim() });
|
|
135
|
+
return pe.add(t), t;
|
|
136
|
+
}
|
|
137
|
+
function Et(e, t) {
|
|
138
|
+
if (W(e), typeof t != "function")
|
|
139
|
+
throw new TypeError(`Service provider "${e.name}" requires a factory function`);
|
|
140
|
+
const n = Object.freeze({ key: e, create: t });
|
|
141
|
+
return de.add(n), n;
|
|
142
|
+
}
|
|
143
|
+
class he {
|
|
144
|
+
constructor(t = []) {
|
|
145
|
+
c(this, "providers", /* @__PURE__ */ new Map());
|
|
146
|
+
c(this, "instances", /* @__PURE__ */ new Map());
|
|
147
|
+
c(this, "creationOrder", []);
|
|
148
|
+
c(this, "resolving", []);
|
|
149
|
+
c(this, "disposed", !1);
|
|
150
|
+
if (!Array.isArray(t))
|
|
151
|
+
throw new TypeError("ServiceScope providers must be an array");
|
|
152
|
+
for (const n of t) {
|
|
153
|
+
if (De(n), this.providers.has(n.key))
|
|
154
|
+
throw new Error(`Service "${n.key.name}" is registered more than once`);
|
|
155
|
+
this.providers.set(n.key, n);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
get isDisposed() {
|
|
159
|
+
return this.disposed;
|
|
160
|
+
}
|
|
161
|
+
has(t) {
|
|
162
|
+
return this.assertActive(), W(t), this.providers.has(t);
|
|
163
|
+
}
|
|
164
|
+
require(t) {
|
|
165
|
+
if (this.assertActive(), W(t), this.instances.has(t)) return this.instances.get(t);
|
|
166
|
+
const n = this.providers.get(t);
|
|
167
|
+
if (n == null) throw new Error(`Service "${t.name}" is not registered`);
|
|
168
|
+
const i = this.resolving.indexOf(t);
|
|
169
|
+
if (i >= 0) {
|
|
170
|
+
const s = [...this.resolving.slice(i), t].map((r) => r.name).join(" -> ");
|
|
171
|
+
throw new Error(`Circular service dependency: ${s}`);
|
|
172
|
+
}
|
|
173
|
+
this.resolving.push(t);
|
|
174
|
+
try {
|
|
175
|
+
const s = n.create(this);
|
|
176
|
+
return this.instances.set(t, s), this.creationOrder.push(t), s;
|
|
177
|
+
} finally {
|
|
178
|
+
this.resolving.pop();
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
dispose() {
|
|
182
|
+
if (this.disposed) return;
|
|
183
|
+
this.disposed = !0;
|
|
184
|
+
const t = [];
|
|
185
|
+
for (const n of [...this.creationOrder].reverse()) {
|
|
186
|
+
const i = this.instances.get(n);
|
|
187
|
+
try {
|
|
188
|
+
const s = He(i);
|
|
189
|
+
s != null && s.call(i);
|
|
190
|
+
} catch (s) {
|
|
191
|
+
t.push(s);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
if (this.instances.clear(), this.creationOrder.length = 0, this.resolving.length = 0, t.length === 1) throw t[0];
|
|
195
|
+
if (t.length > 1)
|
|
196
|
+
throw new AggregateError(t, "Several services failed during disposal");
|
|
197
|
+
}
|
|
198
|
+
assertActive() {
|
|
199
|
+
if (this.disposed) throw new Error("ServiceScope has been disposed");
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
function Ve(e = []) {
|
|
203
|
+
return new he(e);
|
|
204
|
+
}
|
|
205
|
+
function We(e) {
|
|
206
|
+
return e != null && (typeof e == "object" || typeof e == "function") && pe.has(e);
|
|
207
|
+
}
|
|
208
|
+
function W(e) {
|
|
209
|
+
if (!We(e)) throw new TypeError("Expected a service key created by defineService()");
|
|
210
|
+
}
|
|
211
|
+
function De(e) {
|
|
212
|
+
if (e == null || typeof e != "object" && typeof e != "function" || !de.has(e))
|
|
213
|
+
throw new TypeError("Expected a service provider created by provideService()");
|
|
214
|
+
}
|
|
215
|
+
function He(e) {
|
|
216
|
+
if (e == null || typeof e != "object" && typeof e != "function") return null;
|
|
217
|
+
const t = Reflect.get(e, "dispose");
|
|
218
|
+
return typeof t == "function" ? t : null;
|
|
219
|
+
}
|
|
220
|
+
const z = Object.freeze({
|
|
221
|
+
breadcrumbLabel: "Breadcrumb",
|
|
222
|
+
checkboxOptionLabel: "Option",
|
|
223
|
+
checkboxStateLabel: (e, t) => `${e}: ${t}`,
|
|
224
|
+
colorOptionGrayLabel: "Gray",
|
|
225
|
+
colorOptionGreenLabel: "Green",
|
|
226
|
+
colorOptionIceBlueLabel: "Ice blue",
|
|
227
|
+
colorOptionOceanLabel: "Ocean",
|
|
228
|
+
colorOptionOrangeLabel: "Orange",
|
|
229
|
+
colorOptionPurpleLabel: "Purple",
|
|
230
|
+
colorOptionRedLabel: "Red",
|
|
231
|
+
colorOptionYellowLabel: "Yellow",
|
|
232
|
+
dataTableEmpty: "No rows",
|
|
233
|
+
dataTableLoadError: "Unable to load rows",
|
|
234
|
+
dataTableLoading: "Loading rows…",
|
|
235
|
+
dataTableRetry: "Retry",
|
|
236
|
+
dialogCloseLabel: "Close",
|
|
237
|
+
dropdownLoadError: "Unable to load options",
|
|
238
|
+
dropdownPlaceholder: "Select…",
|
|
239
|
+
filterModeDenyLabel: "deny",
|
|
240
|
+
filterModeNeutralLabel: "neutral",
|
|
241
|
+
filterModePreferLabel: "prefer",
|
|
242
|
+
filterModeRequireLabel: "require",
|
|
243
|
+
filterPanelEmpty: "No filter options",
|
|
244
|
+
filterPanelLabel: "Filter options",
|
|
245
|
+
filterPanelLoadError: "Unable to load filter options",
|
|
246
|
+
filterPanelLoading: "Loading filter options…",
|
|
247
|
+
listViewEmpty: "No items",
|
|
248
|
+
listViewLabel: "Items",
|
|
249
|
+
listViewLoadError: "Unable to load items",
|
|
250
|
+
listViewLoading: "Loading items…",
|
|
251
|
+
progressInProgress: "In progress",
|
|
252
|
+
radioOptionLabel: "Option",
|
|
253
|
+
splitViewSeparatorLabel: "Resize panes",
|
|
254
|
+
tabLineLabel: "Sections",
|
|
255
|
+
tableFilterColumnLabel: (e) => `Filter ${e}`,
|
|
256
|
+
tableSortColumnLabel: (e) => `Sort ${e}`,
|
|
257
|
+
themeOptionCapillaryLabel: "Capillary",
|
|
258
|
+
themeOptionMinimalLabel: "Minimal",
|
|
259
|
+
themeOptionShinyLabel: "Shiny",
|
|
260
|
+
toolbarLabel: "Actions",
|
|
261
|
+
treeViewEmpty: "No tree items",
|
|
262
|
+
treeViewLoadError: "Unable to load tree items",
|
|
263
|
+
treeViewLoading: "Loading tree items…"
|
|
264
|
+
});
|
|
265
|
+
class me {
|
|
266
|
+
constructor(t, n) {
|
|
267
|
+
c(this, "locale");
|
|
268
|
+
c(this, "messages");
|
|
269
|
+
this.locale = t, this.messages = n, Object.freeze(this);
|
|
270
|
+
}
|
|
271
|
+
message(t) {
|
|
272
|
+
return this.messages[t];
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
const Ke = new me(
|
|
276
|
+
void 0,
|
|
277
|
+
z
|
|
278
|
+
);
|
|
279
|
+
function Ye(e) {
|
|
280
|
+
if (e == null) return Ke;
|
|
281
|
+
if (typeof e != "object" || Array.isArray(e))
|
|
282
|
+
throw new TypeError("Capillary UI localization must be an object");
|
|
283
|
+
const t = Ze(e.locale), n = e.messages;
|
|
284
|
+
if (n != null && (typeof n != "object" || Array.isArray(n)))
|
|
285
|
+
throw new TypeError("Capillary UI localization messages must be an object");
|
|
286
|
+
const i = { ...z };
|
|
287
|
+
if (n != null)
|
|
288
|
+
for (const s of Object.keys(z)) {
|
|
289
|
+
const r = n[s];
|
|
290
|
+
if (r === void 0) continue;
|
|
291
|
+
const o = z[s];
|
|
292
|
+
if (typeof r != typeof o)
|
|
293
|
+
throw new TypeError(`Capillary UI localization message "${s}" has the wrong type`);
|
|
294
|
+
Object.assign(i, { [s]: r });
|
|
295
|
+
}
|
|
296
|
+
return new me(t, Object.freeze(i));
|
|
297
|
+
}
|
|
298
|
+
function Ze(e) {
|
|
299
|
+
if (typeof e != "string" || e.trim() === "")
|
|
300
|
+
throw new TypeError("Capillary UI localization locale must be a non-empty BCP 47 language tag");
|
|
301
|
+
try {
|
|
302
|
+
return Intl.getCanonicalLocales(e)[0];
|
|
303
|
+
} catch (t) {
|
|
304
|
+
throw new RangeError(`Invalid Capillary UI localization locale: ${e}`, { cause: t });
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
const Ge = /* @__PURE__ */ new Set([
|
|
308
|
+
"annotation-xml",
|
|
309
|
+
"color-profile",
|
|
310
|
+
"font-face",
|
|
311
|
+
"font-face-src",
|
|
312
|
+
"font-face-uri",
|
|
313
|
+
"font-face-format",
|
|
314
|
+
"font-face-name",
|
|
315
|
+
"missing-glyph"
|
|
316
|
+
]);
|
|
317
|
+
class K {
|
|
318
|
+
constructor(t = {}, n = xe()) {
|
|
319
|
+
c(this, "styleRegistry");
|
|
320
|
+
c(this, "services");
|
|
321
|
+
c(this, "router");
|
|
322
|
+
c(this, "localization");
|
|
323
|
+
c(this, "diagnosticScope");
|
|
324
|
+
c(this, "routedRoots", /* @__PURE__ */ new WeakSet());
|
|
325
|
+
if (t == null || typeof t != "object" || Array.isArray(t))
|
|
326
|
+
throw new TypeError("CapillaryUiRuntime options must be an object");
|
|
327
|
+
if (Object.hasOwn(t, "elementNames"))
|
|
328
|
+
throw new TypeError("CapillaryUiRuntime no longer supports configurable element names");
|
|
329
|
+
if (this.styleRegistry = n, this.diagnosticScope = t.diagnosticScope ?? ke, this.localization = Ye(t.localization), this.services = t.services ?? Ve(), !(this.services instanceof he))
|
|
330
|
+
throw new TypeError("Capillary UI services must be a ServiceScope");
|
|
331
|
+
if (this.router = t.router ?? null, this.router != null && (typeof this.router != "object" || typeof this.router.openScope != "function" || typeof this.router.completeScope != "function"))
|
|
332
|
+
throw new TypeError("Capillary UI router must be a BrowserRouter");
|
|
333
|
+
}
|
|
334
|
+
/** Resolve a fixed one-hyphen public host name for a built-in component. */
|
|
335
|
+
resolveElementName(t) {
|
|
336
|
+
ge(t, "Capillary UI component host name");
|
|
337
|
+
const n = `cap-${t.replaceAll("-", "")}`;
|
|
338
|
+
return Je(n), n;
|
|
339
|
+
}
|
|
340
|
+
resolveHostSelector(t, n) {
|
|
341
|
+
if (typeof t != "string") throw new TypeError("Host selector must be a string");
|
|
342
|
+
return t.replaceAll("&", this.resolveElementName(n));
|
|
343
|
+
}
|
|
344
|
+
resolveHostCSS(t, n) {
|
|
345
|
+
if (typeof t != "string") throw new TypeError("Host CSS must be a string");
|
|
346
|
+
return t.replaceAll("&", this.resolveElementName(n));
|
|
347
|
+
}
|
|
348
|
+
create(t, ...n) {
|
|
349
|
+
const i = u.withScope(this.diagnosticScope, () => new t(...n));
|
|
350
|
+
return i._setRuntime(this), i;
|
|
351
|
+
}
|
|
352
|
+
mount(t, n, i = null) {
|
|
353
|
+
t._setRuntime(this);
|
|
354
|
+
let s = null;
|
|
355
|
+
this.router != null && !this.routedRoots.has(t) && (this.routedRoots.add(t), s = this.router.openScope(this.router.root, t), t.onCleanup(s));
|
|
356
|
+
try {
|
|
357
|
+
t.mount(n, i), this.router != null && s != null && this.router.completeScope(this.router.root, t);
|
|
358
|
+
} catch (r) {
|
|
359
|
+
throw s == null || s(), r;
|
|
360
|
+
}
|
|
361
|
+
return t;
|
|
362
|
+
}
|
|
363
|
+
registerStyles(t) {
|
|
364
|
+
if (t == null || typeof t.registerStyles != "function")
|
|
365
|
+
throw new TypeError("registerStyles requires a Capillary UI component dependency");
|
|
366
|
+
return t.registerStyles(this), this;
|
|
367
|
+
}
|
|
368
|
+
injectStyles(t = globalThis.document) {
|
|
369
|
+
return this.styleRegistry.injectAll(t);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
function Ct(e = {}) {
|
|
373
|
+
return new K(e);
|
|
374
|
+
}
|
|
375
|
+
const te = new K({}, Ie);
|
|
376
|
+
function ge(e, t) {
|
|
377
|
+
if (typeof e != "string" || !/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/.test(e))
|
|
378
|
+
throw new TypeError(`${t} must be a lowercase kebab-case name`);
|
|
379
|
+
}
|
|
380
|
+
function Je(e) {
|
|
381
|
+
if (ge(e, "Capillary UI element name"), !e.includes("-") || Ge.has(e))
|
|
382
|
+
throw new TypeError(`Capillary UI element name must be a non-reserved name containing a hyphen: ${e}`);
|
|
383
|
+
}
|
|
384
|
+
const N = Symbol.for("@capillaryjs/capillary-ui.Fragment"), ye = /* @__PURE__ */ new WeakSet(), Qe = /* @__PURE__ */ new Set([
|
|
385
|
+
"allowFullScreen",
|
|
386
|
+
"async",
|
|
387
|
+
"autoFocus",
|
|
388
|
+
"autoPlay",
|
|
389
|
+
"checked",
|
|
390
|
+
"controls",
|
|
391
|
+
"default",
|
|
392
|
+
"defer",
|
|
393
|
+
"disabled",
|
|
394
|
+
"formNoValidate",
|
|
395
|
+
"hidden",
|
|
396
|
+
"inert",
|
|
397
|
+
"loop",
|
|
398
|
+
"multiple",
|
|
399
|
+
"muted",
|
|
400
|
+
"noModule",
|
|
401
|
+
"noValidate",
|
|
402
|
+
"open",
|
|
403
|
+
"playsInline",
|
|
404
|
+
"readOnly",
|
|
405
|
+
"required",
|
|
406
|
+
"reversed",
|
|
407
|
+
"selected"
|
|
408
|
+
]), Xe = /* @__PURE__ */ new Set([
|
|
409
|
+
"checked",
|
|
410
|
+
"defaultChecked",
|
|
411
|
+
"defaultValue",
|
|
412
|
+
"disabled",
|
|
413
|
+
"indeterminate",
|
|
414
|
+
"multiple",
|
|
415
|
+
"muted",
|
|
416
|
+
"readOnly",
|
|
417
|
+
"required",
|
|
418
|
+
"selected",
|
|
419
|
+
"selectedIndex",
|
|
420
|
+
"tabIndex",
|
|
421
|
+
"value"
|
|
422
|
+
]), ne = "data-cap";
|
|
423
|
+
let g = null;
|
|
424
|
+
function h() {
|
|
425
|
+
g && (g.count += 1);
|
|
426
|
+
}
|
|
427
|
+
function Rt(e) {
|
|
428
|
+
Q(e, "live");
|
|
429
|
+
const t = Object.freeze({ emitter: e });
|
|
430
|
+
return ye.add(t), t;
|
|
431
|
+
}
|
|
432
|
+
function x(e, t = null, ...n) {
|
|
433
|
+
const i = t ?? {};
|
|
434
|
+
if (typeof i != "object" || Array.isArray(i))
|
|
435
|
+
throw new TypeError("VNode props must be an object or null");
|
|
436
|
+
const {
|
|
437
|
+
children: s,
|
|
438
|
+
key: r = null,
|
|
439
|
+
...o
|
|
440
|
+
} = i;
|
|
441
|
+
return {
|
|
442
|
+
type: e,
|
|
443
|
+
key: r,
|
|
444
|
+
props: {
|
|
445
|
+
...o,
|
|
446
|
+
children: be([s, n])
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
function et(e, ...t) {
|
|
451
|
+
return e.reduce((n, i, s) => n + i + String(t[s] ?? ""), "");
|
|
452
|
+
}
|
|
453
|
+
const m = class m {
|
|
454
|
+
constructor(t = {}) {
|
|
455
|
+
c(this, "props");
|
|
456
|
+
c(this, "dom", null);
|
|
457
|
+
/** @internal */
|
|
458
|
+
c(this, "_rendered", null);
|
|
459
|
+
/** @internal */
|
|
460
|
+
c(this, "_childComponents", /* @__PURE__ */ new Set());
|
|
461
|
+
/** @internal Component ancestry used to enforce structural invariants. */
|
|
462
|
+
c(this, "_parentComponent", null);
|
|
463
|
+
c(this, "initialized", !1);
|
|
464
|
+
c(this, "mounted", !1);
|
|
465
|
+
c(this, "destroyed", !1);
|
|
466
|
+
c(this, "updating", !1);
|
|
467
|
+
c(this, "updateRequested", !1);
|
|
468
|
+
c(this, "cleanupFunctions", /* @__PURE__ */ new Set());
|
|
469
|
+
c(this, "watched", /* @__PURE__ */ new Map());
|
|
470
|
+
c(this, "renderReadSubscriptions", /* @__PURE__ */ new Map());
|
|
471
|
+
c(this, "collectingRenderReads", null);
|
|
472
|
+
/** @internal */
|
|
473
|
+
c(this, "_runtime", te);
|
|
474
|
+
/** @internal Route lineage inherited by nested routed components. */
|
|
475
|
+
c(this, "_routeContext", null);
|
|
476
|
+
/** JSX component for this instance's runtime-configured custom host. */
|
|
477
|
+
c(this, "Host", ({
|
|
478
|
+
children: t = [],
|
|
479
|
+
...n
|
|
480
|
+
}) => this.host(n, t));
|
|
481
|
+
if (t == null || typeof t != "object" || Array.isArray(t))
|
|
482
|
+
throw new TypeError(`${this.constructor.name} props must be an object`);
|
|
483
|
+
this.props = t;
|
|
484
|
+
}
|
|
485
|
+
static new(...t) {
|
|
486
|
+
const n = new this(...t);
|
|
487
|
+
if (!(n instanceof m))
|
|
488
|
+
throw new TypeError("Component.new() requires a Component constructor");
|
|
489
|
+
return n.mount();
|
|
490
|
+
}
|
|
491
|
+
static registerStyles(t = te, n = /* @__PURE__ */ new Set()) {
|
|
492
|
+
if (n.has(this)) return;
|
|
493
|
+
n.add(this);
|
|
494
|
+
const i = this.hostName ?? null, s = yt(this);
|
|
495
|
+
for (const r of s)
|
|
496
|
+
Object.hasOwn(r, "css") && r.css && (i == null ? t.styleRegistry.registerCSS(r.css) : t.styleRegistry.registerHostCSS(
|
|
497
|
+
r.css,
|
|
498
|
+
t.resolveElementName(i)
|
|
499
|
+
));
|
|
500
|
+
for (const r of s)
|
|
501
|
+
if (Object.hasOwn(r, "dependencies"))
|
|
502
|
+
for (const o of r.dependencies ?? [])
|
|
503
|
+
o.registerStyles(t, n);
|
|
504
|
+
}
|
|
505
|
+
get diagnosticScope() {
|
|
506
|
+
var t;
|
|
507
|
+
return this.constructor.diagnosticScope ?? ((t = this._parentComponent) == null ? void 0 : t.diagnosticScope) ?? this._runtime.diagnosticScope;
|
|
508
|
+
}
|
|
509
|
+
/** Stable instance label, captured when this component is first observed. */
|
|
510
|
+
get diagnosticLabel() {
|
|
511
|
+
const t = this.constructor;
|
|
512
|
+
return t.diagnosticLabel ?? t.hostName ?? t.name;
|
|
513
|
+
}
|
|
514
|
+
[ze]() {
|
|
515
|
+
return {
|
|
516
|
+
kind: "component",
|
|
517
|
+
label: R(this),
|
|
518
|
+
scope: this.diagnosticScope,
|
|
519
|
+
sources: [...this.watched.keys(), ...this.renderReadSubscriptions.keys()],
|
|
520
|
+
targets: [...this._childComponents]
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
/** One-time setup hook. Constructors must not subscribe or render. */
|
|
524
|
+
initialize() {
|
|
525
|
+
}
|
|
526
|
+
render() {
|
|
527
|
+
throw new Error(`${this.constructor.name} must implement render()`);
|
|
528
|
+
}
|
|
529
|
+
/** Render this component's configured custom host element. */
|
|
530
|
+
host(t = null, ...n) {
|
|
531
|
+
const i = this.constructor, s = i.hostName;
|
|
532
|
+
if (s == null)
|
|
533
|
+
throw new Error(`${this.constructor.name} does not declare a custom host name`);
|
|
534
|
+
const {
|
|
535
|
+
class: r,
|
|
536
|
+
className: o,
|
|
537
|
+
...a
|
|
538
|
+
} = t ?? {}, l = o ?? r, f = this.props.island === !0 ? bt(l, "island") : l;
|
|
539
|
+
return x(this._runtime.resolveElementName(s), {
|
|
540
|
+
...a,
|
|
541
|
+
...f == null ? {} : { className: f },
|
|
542
|
+
"data-cap-component": s,
|
|
543
|
+
...i.dataSurface == null ? {} : { "data-cap-surface": i.dataSurface }
|
|
544
|
+
}, ...n);
|
|
545
|
+
}
|
|
546
|
+
/** @internal Assign an immutable application runtime before initialization or mounting. */
|
|
547
|
+
_setRuntime(t) {
|
|
548
|
+
var n;
|
|
549
|
+
if (!(t instanceof K))
|
|
550
|
+
throw new TypeError("Component runtime must be a CapillaryUiRuntime");
|
|
551
|
+
if (t === this._runtime) return this;
|
|
552
|
+
if (this.initialized || this.mounted || this._rendered != null)
|
|
553
|
+
throw new Error("Cannot change a component runtime after initialization");
|
|
554
|
+
return this._runtime = t, this._routeContext == null && (this._routeContext = ((n = t.router) == null ? void 0 : n.root) ?? null), this;
|
|
555
|
+
}
|
|
556
|
+
/** @internal Assign contextual route lineage before initialization. */
|
|
557
|
+
_setRouteContext(t) {
|
|
558
|
+
if (this.initialized || this.mounted || this._rendered != null)
|
|
559
|
+
throw new Error("Cannot change a component route context after initialization");
|
|
560
|
+
return this._routeContext = t, this;
|
|
561
|
+
}
|
|
562
|
+
/** @internal Route lineage inherited by component children. */
|
|
563
|
+
_routeContextForChildren() {
|
|
564
|
+
return this._routeContext;
|
|
565
|
+
}
|
|
566
|
+
/** @internal Assign the renderer-owned component ancestry. */
|
|
567
|
+
_setParentComponent(t) {
|
|
568
|
+
if (this._parentComponent != null && this._parentComponent !== t)
|
|
569
|
+
throw new Error("A component instance cannot move between component owners");
|
|
570
|
+
return this._parentComponent = t, this.validateIslandAncestry(this.props), this;
|
|
571
|
+
}
|
|
572
|
+
mount(t = null, n = null) {
|
|
573
|
+
if (this.destroyed) throw new Error("Cannot mount a destroyed component");
|
|
574
|
+
this.validateIslandAncestry(this.props);
|
|
575
|
+
let i = !1;
|
|
576
|
+
return this.initialized || (this.validateRequiredServices(), this.initialized = !0, u.withScope(this.diagnosticScope, () => this.initialize())), this.mounted || (this.mounted = !0, this.update(), i = !0), t != null && (gt(t), J(t, this._rendered, n)), i && this.afterMount(this.dom), this;
|
|
577
|
+
}
|
|
578
|
+
attachTo(t) {
|
|
579
|
+
return this.mount(t), this;
|
|
580
|
+
}
|
|
581
|
+
update(t, n = t instanceof X ? "dependency" : "explicit") {
|
|
582
|
+
if (this.destroyed) return this;
|
|
583
|
+
if (!this.mounted) return this.mount();
|
|
584
|
+
if (this.updating)
|
|
585
|
+
return this.updateRequested = !0, this;
|
|
586
|
+
this.updating = !0;
|
|
587
|
+
const i = u.event(this, "consumer", {
|
|
588
|
+
parent: t instanceof X ? t : u.currentEvent,
|
|
589
|
+
cause: "component render",
|
|
590
|
+
outcome: "started",
|
|
591
|
+
consumer: { trigger: n }
|
|
592
|
+
}), s = g, r = i ? { count: 0 } : null;
|
|
593
|
+
let o = 0;
|
|
594
|
+
g = r;
|
|
595
|
+
try {
|
|
596
|
+
u.withEvent(i, () => {
|
|
597
|
+
do {
|
|
598
|
+
o += 1, this.updateRequested = !1;
|
|
599
|
+
const a = /* @__PURE__ */ new Set();
|
|
600
|
+
this.collectingRenderReads = a;
|
|
601
|
+
let l;
|
|
602
|
+
try {
|
|
603
|
+
l = u.withScope(this.diagnosticScope, () => j(this.render()));
|
|
604
|
+
} finally {
|
|
605
|
+
this.collectingRenderReads = null;
|
|
606
|
+
}
|
|
607
|
+
this._rendered = Y(this._rendered, l, this), this.dom = Le(this._rendered), this.reconcileRenderReads(a), this.afterUpdate(this.dom);
|
|
608
|
+
} while (this.updateRequested && !this.destroyed);
|
|
609
|
+
}), i && u.event(this, "consumer", {
|
|
610
|
+
parent: i,
|
|
611
|
+
cause: "component rendered",
|
|
612
|
+
outcome: "succeeded",
|
|
613
|
+
consumer: { trigger: n, domWrites: r.count, renderPasses: o }
|
|
614
|
+
});
|
|
615
|
+
} catch (a) {
|
|
616
|
+
throw i && u.event(this, "consumer", {
|
|
617
|
+
parent: i,
|
|
618
|
+
cause: "component render failed",
|
|
619
|
+
outcome: "failed",
|
|
620
|
+
error: a,
|
|
621
|
+
consumer: { trigger: n, domWrites: r.count, renderPasses: o }
|
|
622
|
+
}), a;
|
|
623
|
+
} finally {
|
|
624
|
+
g = s, this.updating = !1;
|
|
625
|
+
}
|
|
626
|
+
return this;
|
|
627
|
+
}
|
|
628
|
+
setProps(t) {
|
|
629
|
+
var n, i;
|
|
630
|
+
if (t == null || typeof t != "object" || Array.isArray(t))
|
|
631
|
+
throw new TypeError(`${this.constructor.name} props must be an object`);
|
|
632
|
+
return this.validateIslandAncestry(t), this.props = t, this.mounted && this.update(
|
|
633
|
+
void 0,
|
|
634
|
+
((i = (n = u.currentEvent) == null ? void 0 : n.diagnostic) == null ? void 0 : i.node.kind) === "binding" ? "dependency" : "parent"
|
|
635
|
+
), this;
|
|
636
|
+
}
|
|
637
|
+
afterMount(t) {
|
|
638
|
+
}
|
|
639
|
+
afterUpdate(t) {
|
|
640
|
+
}
|
|
641
|
+
watch(...t) {
|
|
642
|
+
for (const n of t) {
|
|
643
|
+
if (n == null || typeof n.subscribe != "function")
|
|
644
|
+
throw new TypeError("watch requires emitter-like values");
|
|
645
|
+
if (this.watched.has(n)) continue;
|
|
646
|
+
const i = n.subscribe(({ event: s }) => {
|
|
647
|
+
this.mounted && !this.destroyed && this.update(s);
|
|
648
|
+
}, { emitCurrent: !1, diagnosticTarget: this });
|
|
649
|
+
this.watched.set(n, i), this.onCleanup(() => {
|
|
650
|
+
i(), this.watched.delete(n);
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
return this;
|
|
654
|
+
}
|
|
655
|
+
watchFutureValues(...t) {
|
|
656
|
+
return this.watch(...t);
|
|
657
|
+
}
|
|
658
|
+
/** Read an emitter during render and rerender when that dependency changes. */
|
|
659
|
+
read(t) {
|
|
660
|
+
return this.trackRenderRead(t), t.get();
|
|
661
|
+
}
|
|
662
|
+
/** Read a Capillary value, fetch state, and error as one tracked render dependency. */
|
|
663
|
+
snapshot(t) {
|
|
664
|
+
return this.trackRenderRead(t), Object.freeze({
|
|
665
|
+
value: t.get(),
|
|
666
|
+
fetchState: t.getFetchState(),
|
|
667
|
+
error: t.getError()
|
|
668
|
+
});
|
|
669
|
+
}
|
|
670
|
+
onCleanup(t) {
|
|
671
|
+
if (typeof t != "function") throw new TypeError("cleanup must be a function");
|
|
672
|
+
if (this.destroyed)
|
|
673
|
+
return t(), () => {
|
|
674
|
+
};
|
|
675
|
+
this.cleanupFunctions.add(t);
|
|
676
|
+
let n = !0;
|
|
677
|
+
return () => {
|
|
678
|
+
n && (n = !1, this.cleanupFunctions.delete(t), t());
|
|
679
|
+
};
|
|
680
|
+
}
|
|
681
|
+
/** Resolve one explicitly declared application service from this component's runtime. */
|
|
682
|
+
requireService(t) {
|
|
683
|
+
if (!this.initialized)
|
|
684
|
+
throw new Error("Components may resolve services during initialize() or later");
|
|
685
|
+
const n = this.constructor;
|
|
686
|
+
if (!n.requiredServices.includes(t))
|
|
687
|
+
throw new Error(
|
|
688
|
+
`${n.name} must declare service "${t.name}" in requiredServices`
|
|
689
|
+
);
|
|
690
|
+
return this._runtime.services.require(t);
|
|
691
|
+
}
|
|
692
|
+
/** Read the immutable Capillary UI localization selected for this component's runtime. */
|
|
693
|
+
get localization() {
|
|
694
|
+
return this._runtime.localization;
|
|
695
|
+
}
|
|
696
|
+
/** Resolve one Capillary UI-authored message with the runtime's English fallback. */
|
|
697
|
+
capillaryUiMessage(t) {
|
|
698
|
+
return this.localization.message(t);
|
|
699
|
+
}
|
|
700
|
+
listen(t, n, i, s) {
|
|
701
|
+
if (t == null || typeof t.addEventListener != "function")
|
|
702
|
+
throw new TypeError("listen target must be an EventTarget");
|
|
703
|
+
const r = {};
|
|
704
|
+
u.configure(r, {
|
|
705
|
+
kind: "interaction",
|
|
706
|
+
label: `${R(this)}: ${n}`,
|
|
707
|
+
scope: this.diagnosticScope
|
|
708
|
+
});
|
|
709
|
+
const o = (a) => M(
|
|
710
|
+
r,
|
|
711
|
+
this.diagnosticScope,
|
|
712
|
+
a,
|
|
713
|
+
o,
|
|
714
|
+
n,
|
|
715
|
+
() => i(a)
|
|
716
|
+
);
|
|
717
|
+
return t.addEventListener(n, o, s), this.onCleanup(() => {
|
|
718
|
+
t.removeEventListener(n, o, s), u.dispose(r);
|
|
719
|
+
}), this;
|
|
720
|
+
}
|
|
721
|
+
/**
|
|
722
|
+
* Like {@link listen}, but returns a function that detaches the listener.
|
|
723
|
+
* Use for listeners that are only active some of the time — for example
|
|
724
|
+
* an outside-click handler that exists only while a popup is open — so
|
|
725
|
+
* they neither fire nor appear in the trace while inactive. The listener
|
|
726
|
+
* runs through the same traced native-event coalescing as listen(), and
|
|
727
|
+
* is removed on destroy if it is still attached.
|
|
728
|
+
*/
|
|
729
|
+
listenWhile(t, n, i, s) {
|
|
730
|
+
if (t == null || typeof t.addEventListener != "function")
|
|
731
|
+
throw new TypeError("listen target must be an EventTarget");
|
|
732
|
+
const r = {};
|
|
733
|
+
u.configure(r, {
|
|
734
|
+
kind: "interaction",
|
|
735
|
+
label: `${R(this)}: ${n}`,
|
|
736
|
+
scope: this.diagnosticScope
|
|
737
|
+
});
|
|
738
|
+
const o = (p) => M(
|
|
739
|
+
r,
|
|
740
|
+
this.diagnosticScope,
|
|
741
|
+
p,
|
|
742
|
+
o,
|
|
743
|
+
n,
|
|
744
|
+
() => i(p)
|
|
745
|
+
);
|
|
746
|
+
let a = !1;
|
|
747
|
+
const l = () => {
|
|
748
|
+
a && (a = !1, t.removeEventListener(n, o, s), u.dispose(r));
|
|
749
|
+
}, f = this.onCleanup(l);
|
|
750
|
+
return this.destroyed || (a = !0, t.addEventListener(n, o, s)), f;
|
|
751
|
+
}
|
|
752
|
+
registerChild(t) {
|
|
753
|
+
if (!(t instanceof m))
|
|
754
|
+
throw new TypeError("registerChild requires a Component");
|
|
755
|
+
return this._childComponents.add(t), u.active && u.inspect(this), t;
|
|
756
|
+
}
|
|
757
|
+
destroy() {
|
|
758
|
+
if (!this.destroyed) {
|
|
759
|
+
this.destroyed = !0, this.mounted = !1, u.dispose(this);
|
|
760
|
+
for (const t of [...this.cleanupFunctions]) t();
|
|
761
|
+
this.cleanupFunctions.clear(), this.watched.clear();
|
|
762
|
+
for (const t of this.renderReadSubscriptions.values()) t();
|
|
763
|
+
this.renderReadSubscriptions.clear(), this.collectingRenderReads = null, this._rendered && E(this._rendered, !0), this._rendered = null, this.dom = null, this._childComponents.clear(), this.onDestroy();
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
validateRequiredServices() {
|
|
767
|
+
const t = this.constructor;
|
|
768
|
+
for (const n of t.requiredServices)
|
|
769
|
+
if (!this._runtime.services.has(n))
|
|
770
|
+
throw new Error(`${t.name} requires unregistered service "${n.name}"`);
|
|
771
|
+
}
|
|
772
|
+
validateIslandAncestry(t) {
|
|
773
|
+
if (!V(t)) return;
|
|
774
|
+
if (this.hasIslandDescendant())
|
|
775
|
+
throw new Error("An island component cannot contain another island");
|
|
776
|
+
let n = this._parentComponent;
|
|
777
|
+
for (; n != null; ) {
|
|
778
|
+
if (V(n.props))
|
|
779
|
+
throw new Error("An island component cannot be nested inside another island");
|
|
780
|
+
n = n._parentComponent;
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
hasIslandDescendant() {
|
|
784
|
+
for (const t of this._childComponents)
|
|
785
|
+
if (V(t.props) || t.hasIslandDescendant()) return !0;
|
|
786
|
+
return !1;
|
|
787
|
+
}
|
|
788
|
+
onDestroy() {
|
|
789
|
+
}
|
|
790
|
+
trackRenderRead(t) {
|
|
791
|
+
if (Q(t, "Component.read"), this.collectingRenderReads == null)
|
|
792
|
+
throw new Error("Component.read() and snapshot() may only be called during render()");
|
|
793
|
+
this.collectingRenderReads.add(t);
|
|
794
|
+
}
|
|
795
|
+
reconcileRenderReads(t) {
|
|
796
|
+
for (const [n, i] of this.renderReadSubscriptions)
|
|
797
|
+
t.has(n) || (i(), this.renderReadSubscriptions.delete(n));
|
|
798
|
+
for (const n of t) {
|
|
799
|
+
if (this.watched.has(n) || this.renderReadSubscriptions.has(n)) continue;
|
|
800
|
+
const i = n.subscribe(({ event: s }) => {
|
|
801
|
+
this.mounted && !this.destroyed && this.update(s);
|
|
802
|
+
}, { emitCurrent: !1, diagnosticTarget: this });
|
|
803
|
+
this.renderReadSubscriptions.set(n, i);
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
};
|
|
807
|
+
c(m, "dependencies", []), c(m, "requiredServices", []), /** Component `live()` bindings are opt-in; subclasses declare their allowlist. */
|
|
808
|
+
c(m, "liveProps", []), c(m, "css", et`
|
|
809
|
+
.cap-fill-horizontal,
|
|
810
|
+
.cap-fill-vertical {
|
|
811
|
+
box-sizing: border-box;
|
|
812
|
+
background: var(--application-background);
|
|
813
|
+
color: var(--ui-color);
|
|
814
|
+
font-family: var(--font-family);
|
|
815
|
+
font-size: var(--font-size);
|
|
816
|
+
line-height: var(--line-height);
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
.cap-fill-horizontal {
|
|
820
|
+
width: 100vw;
|
|
821
|
+
max-width: 100vw;
|
|
822
|
+
min-width: 0;
|
|
823
|
+
overflow-x: auto;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
.cap-fill-vertical {
|
|
827
|
+
height: 100vh;
|
|
828
|
+
max-height: 100vh;
|
|
829
|
+
min-height: 0;
|
|
830
|
+
overflow-y: auto;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
.cap-layout-horizontal,
|
|
834
|
+
.cap-layout-vertical {
|
|
835
|
+
display: flex;
|
|
836
|
+
align-items: stretch;
|
|
837
|
+
min-inline-size: 0;
|
|
838
|
+
min-block-size: 0;
|
|
839
|
+
gap: calc(var(--_cap-island-flow, 0) * var(--island-gap, 0px));
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
.cap-layout-horizontal {
|
|
843
|
+
flex-direction: row;
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
.cap-layout-vertical {
|
|
847
|
+
flex-direction: column;
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
.cap-size-natural {
|
|
851
|
+
flex: 0 0 auto;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
.cap-size-flexible {
|
|
855
|
+
flex: 1 1 0;
|
|
856
|
+
min-inline-size: 0;
|
|
857
|
+
min-block-size: 0;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
.cap-scroll {
|
|
861
|
+
/* Move the clip into the surrounding gutter without moving the
|
|
862
|
+
* content. The inherited allowance is owned by the parent layout,
|
|
863
|
+
* so local gaps and nested scrollports do not add extra spacing. */
|
|
864
|
+
--_cap-scroll-gutter: calc(var(--_cap-island-flow, 0) * var(--_cap-island-gutter, 0px));
|
|
865
|
+
margin: calc(-1 * var(--_cap-scroll-gutter));
|
|
866
|
+
padding: var(--_cap-scroll-gutter);
|
|
867
|
+
overflow: auto;
|
|
868
|
+
min-inline-size: 0;
|
|
869
|
+
min-block-size: 0;
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
/* The mode crosses wrappers; each layout resolves its own public gap.
|
|
873
|
+
* Only the first enabled scope contributes a perimeter inset. */
|
|
874
|
+
.cap-island-layout {
|
|
875
|
+
--_cap-island-flow: 1;
|
|
876
|
+
--_cap-island-margin: 0px;
|
|
877
|
+
--_cap-island-separator-background: transparent;
|
|
878
|
+
box-sizing: border-box;
|
|
879
|
+
padding: var(--_cap-island-outer-inset, var(--island-inset, 0px));
|
|
880
|
+
gap: calc(var(--_cap-island-flow, 0) * var(--island-gap, 0px));
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
.cap-island-layout > * {
|
|
884
|
+
--_cap-island-outer-inset: 0px;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
.cap-layout-horizontal > *,
|
|
888
|
+
.cap-layout-vertical > *,
|
|
889
|
+
.cap-island-layout > * {
|
|
890
|
+
--_cap-island-gutter: calc(var(--_cap-island-flow, 0) * var(--island-gap, 0px) / 2);
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
.cap-island-layout.cap-scroll {
|
|
894
|
+
padding: calc(var(--_cap-island-outer-inset, var(--island-inset, 0px))
|
|
895
|
+
+ var(--_cap-scroll-gutter));
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
.cap-island-layout-off {
|
|
899
|
+
--_cap-island-flow: 0;
|
|
900
|
+
--_cap-island-margin: initial;
|
|
901
|
+
--_cap-island-separator-background: initial;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
.cap-island-layout-off > *,
|
|
905
|
+
.island > * {
|
|
906
|
+
--_cap-island-outer-inset: initial;
|
|
907
|
+
--_cap-island-gutter: 0px;
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
.colored {
|
|
911
|
+
--colored-base-bg:
|
|
912
|
+
linear-gradient(
|
|
913
|
+
15deg,
|
|
914
|
+
var(--c1) 0%,
|
|
915
|
+
var(--c2) 65%,
|
|
916
|
+
var(--c2) 65%,
|
|
917
|
+
var(--c3) 100%
|
|
918
|
+
);
|
|
919
|
+
|
|
920
|
+
background: var(--colored-base-bg);
|
|
921
|
+
box-shadow: var(--colored-shadow);
|
|
922
|
+
border-radius: var(--ui-border-radius);
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
.app-footer.island,
|
|
926
|
+
.island {
|
|
927
|
+
--_cap-island-flow: 0;
|
|
928
|
+
--_cap-island-separator-background: initial;
|
|
929
|
+
box-sizing: border-box;
|
|
930
|
+
min-width: 0;
|
|
931
|
+
min-height: 0;
|
|
932
|
+
margin: var(--_cap-island-margin, var(--island-margin));
|
|
933
|
+
padding: var(--island-padding);
|
|
934
|
+
background: var(--island-background);
|
|
935
|
+
border: var(--island-border);
|
|
936
|
+
border-radius: var(--island-radius);
|
|
937
|
+
box-shadow: var(--island-shadow);
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
.cap-fill-horizontal.island,
|
|
941
|
+
.cap-fill-horizontal .island {
|
|
942
|
+
max-width: calc(100% - (2 * var(--_cap-island-margin, var(--island-margin))));
|
|
943
|
+
overflow-x: auto;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
.cap-fill-vertical.island,
|
|
947
|
+
.cap-fill-vertical .island {
|
|
948
|
+
max-height: calc(100% - (2 * var(--_cap-island-margin, var(--island-margin))));
|
|
949
|
+
overflow-y: auto;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
label[data-cap] {
|
|
953
|
+
user-select: none;
|
|
954
|
+
}
|
|
955
|
+
`), c(m, "hostName", null), /** Override for a diagnostic-tool subtree; ordinary components inherit their owner/runtime. */
|
|
956
|
+
c(m, "diagnosticScope", null), /** Optional stable display name for bundled application components. Built-ins use their host name. */
|
|
957
|
+
c(m, "diagnosticLabel", null), /** Optional host-level data surface marker for parent composition. */
|
|
958
|
+
c(m, "dataSurface", null);
|
|
959
|
+
let w = m;
|
|
960
|
+
function j(e) {
|
|
961
|
+
return Array.isArray(e) ? x(N, null, e) : e == null || typeof e == "boolean" ? x(N) : e;
|
|
962
|
+
}
|
|
963
|
+
function be(e) {
|
|
964
|
+
const t = [], n = (i) => {
|
|
965
|
+
if (Array.isArray(i))
|
|
966
|
+
for (const s of i) n(s);
|
|
967
|
+
else i != null && typeof i != "boolean" && t.push(i);
|
|
968
|
+
};
|
|
969
|
+
return n(e), t;
|
|
970
|
+
}
|
|
971
|
+
function $(e, t) {
|
|
972
|
+
if (typeof e == "string" || typeof e == "number")
|
|
973
|
+
return {
|
|
974
|
+
kind: "text",
|
|
975
|
+
key: null,
|
|
976
|
+
value: e,
|
|
977
|
+
node: document.createTextNode(String(e)),
|
|
978
|
+
owner: t
|
|
979
|
+
};
|
|
980
|
+
if (q(e)) {
|
|
981
|
+
const r = document.createComment("cap-emitter-start"), o = document.createComment("cap-emitter-end"), a = e.get();
|
|
982
|
+
if (Object.is(a, e))
|
|
983
|
+
throw new TypeError("A Capillary UI emitter child cannot render itself");
|
|
984
|
+
const l = document.createDocumentFragment();
|
|
985
|
+
l.append(r, o), h(), h();
|
|
986
|
+
const f = $(j(a), t);
|
|
987
|
+
J(l, f, o);
|
|
988
|
+
const p = {
|
|
989
|
+
kind: "emitter",
|
|
990
|
+
key: null,
|
|
991
|
+
source: e,
|
|
992
|
+
start: r,
|
|
993
|
+
end: o,
|
|
994
|
+
child: f,
|
|
995
|
+
unsubscribe: () => {
|
|
996
|
+
},
|
|
997
|
+
owner: t
|
|
998
|
+
};
|
|
999
|
+
return p.unsubscribe = F(e, p, t, "reactive child", (y) => {
|
|
1000
|
+
if (Object.is(y, e))
|
|
1001
|
+
throw new TypeError("A Capillary UI emitter child cannot render itself");
|
|
1002
|
+
p.child = Y(p.child, j(y), t);
|
|
1003
|
+
}), p;
|
|
1004
|
+
}
|
|
1005
|
+
if (e instanceof w)
|
|
1006
|
+
return e._setRuntime(t._runtime), e._setRouteContext(t._routeContextForChildren()), e._setParentComponent(t), e.mount(), t.registerChild(e), {
|
|
1007
|
+
kind: "component",
|
|
1008
|
+
key: Te(e.props),
|
|
1009
|
+
type: e.constructor,
|
|
1010
|
+
instance: e,
|
|
1011
|
+
prebuilt: !0,
|
|
1012
|
+
props: e.props,
|
|
1013
|
+
liveProps: /* @__PURE__ */ new Map(),
|
|
1014
|
+
owner: t
|
|
1015
|
+
};
|
|
1016
|
+
if (!S(e))
|
|
1017
|
+
throw new TypeError(`Invalid Capillary UI child: ${ae(e)}`);
|
|
1018
|
+
const { type: n, key: i = null, props: s } = e;
|
|
1019
|
+
if (n === N) {
|
|
1020
|
+
const r = document.createComment("cap-fragment-start"), o = document.createComment("cap-fragment-end"), a = {
|
|
1021
|
+
kind: "fragment",
|
|
1022
|
+
key: i,
|
|
1023
|
+
type: n,
|
|
1024
|
+
start: r,
|
|
1025
|
+
end: o,
|
|
1026
|
+
children: [],
|
|
1027
|
+
owner: t
|
|
1028
|
+
}, l = document.createDocumentFragment();
|
|
1029
|
+
return l.append(r, o), h(), h(), a.children = I(
|
|
1030
|
+
l,
|
|
1031
|
+
[],
|
|
1032
|
+
s.children,
|
|
1033
|
+
t,
|
|
1034
|
+
o,
|
|
1035
|
+
r
|
|
1036
|
+
), a;
|
|
1037
|
+
}
|
|
1038
|
+
if (typeof n == "string") {
|
|
1039
|
+
const r = document.createElement(n), o = {
|
|
1040
|
+
kind: "element",
|
|
1041
|
+
key: i,
|
|
1042
|
+
type: n,
|
|
1043
|
+
node: r,
|
|
1044
|
+
props: {},
|
|
1045
|
+
listeners: /* @__PURE__ */ new Map(),
|
|
1046
|
+
liveProps: /* @__PURE__ */ new Map(),
|
|
1047
|
+
nativeBindings: /* @__PURE__ */ new Map(),
|
|
1048
|
+
ref: null,
|
|
1049
|
+
children: [],
|
|
1050
|
+
owner: t
|
|
1051
|
+
};
|
|
1052
|
+
return Ce(o, s), o.children = I(r, [], s.children, t), o;
|
|
1053
|
+
}
|
|
1054
|
+
if (Pe(n)) {
|
|
1055
|
+
const r = s;
|
|
1056
|
+
ve(n, r);
|
|
1057
|
+
const o = ie(r), a = u.withScope(
|
|
1058
|
+
n.diagnosticScope ?? t.diagnosticScope,
|
|
1059
|
+
() => new n(o)
|
|
1060
|
+
);
|
|
1061
|
+
a._setRuntime(t._runtime), a._setRouteContext(t._routeContextForChildren()), a._setParentComponent(t);
|
|
1062
|
+
const l = {
|
|
1063
|
+
kind: "component",
|
|
1064
|
+
key: i,
|
|
1065
|
+
type: n,
|
|
1066
|
+
instance: a,
|
|
1067
|
+
prebuilt: !1,
|
|
1068
|
+
props: o,
|
|
1069
|
+
liveProps: /* @__PURE__ */ new Map(),
|
|
1070
|
+
owner: t
|
|
1071
|
+
};
|
|
1072
|
+
return Se(l, r), a.mount(), t.registerChild(a), l;
|
|
1073
|
+
}
|
|
1074
|
+
if (typeof n == "function") {
|
|
1075
|
+
const r = n, o = s, a = ie(o), l = r === Reflect.get(t, "Host") ? null : {};
|
|
1076
|
+
l && u.configure(l, {
|
|
1077
|
+
kind: "component",
|
|
1078
|
+
label: String(Reflect.get(r, "diagnosticLabel") ?? r.name ?? "Function component"),
|
|
1079
|
+
scope: t.diagnosticScope,
|
|
1080
|
+
sources: [t]
|
|
1081
|
+
});
|
|
1082
|
+
const f = Ee(l, () => $(j(r(a)), t)), p = {
|
|
1083
|
+
kind: "function",
|
|
1084
|
+
key: i,
|
|
1085
|
+
type: r,
|
|
1086
|
+
props: a,
|
|
1087
|
+
sourceProps: o,
|
|
1088
|
+
liveProps: /* @__PURE__ */ new Map(),
|
|
1089
|
+
child: f,
|
|
1090
|
+
diagnosticSubject: l,
|
|
1091
|
+
owner: t
|
|
1092
|
+
};
|
|
1093
|
+
return nt(p), p;
|
|
1094
|
+
}
|
|
1095
|
+
throw new TypeError(`Unsupported vnode type: ${ae(n)}`);
|
|
1096
|
+
}
|
|
1097
|
+
function Y(e, t, n) {
|
|
1098
|
+
if (e == null) return $(t, n);
|
|
1099
|
+
if (Oe(e, t)) return we(e, t, n);
|
|
1100
|
+
const i = $(t, n), s = Le(e), r = (s == null ? void 0 : s.parentNode) ?? null;
|
|
1101
|
+
return r && J(r, i, s), E(e, !0), i;
|
|
1102
|
+
}
|
|
1103
|
+
function we(e, t, n) {
|
|
1104
|
+
return e.kind === "text" ? (typeof t != "string" && typeof t != "number" || Object.is(e.value, t) || (e.value = t, e.node.data = String(t), h()), e) : e.kind === "emitter" ? (!q(t) || e.source !== t, e) : e.kind === "component" ? (t instanceof w || S(t) && tt(e, t.props), e) : S(t) ? e.kind === "function" ? (it(e, t.props), e) : e.kind === "fragment" ? (e.children = I(
|
|
1105
|
+
e.start.parentNode,
|
|
1106
|
+
e.children,
|
|
1107
|
+
t.props.children,
|
|
1108
|
+
n,
|
|
1109
|
+
e.end,
|
|
1110
|
+
e.start
|
|
1111
|
+
), e) : (Ce(e, t.props), e.children = I(
|
|
1112
|
+
e.node,
|
|
1113
|
+
e.children,
|
|
1114
|
+
t.props.children,
|
|
1115
|
+
n
|
|
1116
|
+
), e) : e;
|
|
1117
|
+
}
|
|
1118
|
+
function ie(e) {
|
|
1119
|
+
return Object.fromEntries(Object.entries(e).map(([t, n]) => [
|
|
1120
|
+
t,
|
|
1121
|
+
T(n) ? n.emitter.get() : n
|
|
1122
|
+
]));
|
|
1123
|
+
}
|
|
1124
|
+
function Se(e, t) {
|
|
1125
|
+
Z(e.liveProps, t, e.instance, R(e.instance), (n, i) => {
|
|
1126
|
+
e.props = { ...e.props, [n]: i }, e.instance.setProps(e.props);
|
|
1127
|
+
}), e.props = G(e.liveProps, t), e.instance.setProps(e.props);
|
|
1128
|
+
}
|
|
1129
|
+
function tt(e, t) {
|
|
1130
|
+
ve(e.type, t), Se(e, t);
|
|
1131
|
+
}
|
|
1132
|
+
function ve(e, t) {
|
|
1133
|
+
const n = Reflect.get(e, "liveProps");
|
|
1134
|
+
if (n == null) return;
|
|
1135
|
+
if (!Array.isArray(n) || n.some((s) => typeof s != "string"))
|
|
1136
|
+
throw new TypeError(`${e.name || "Component"}.liveProps must be an array`);
|
|
1137
|
+
const i = new Set(n);
|
|
1138
|
+
for (const [s, r] of Object.entries(t))
|
|
1139
|
+
if (T(r) && !i.has(s))
|
|
1140
|
+
throw new TypeError(
|
|
1141
|
+
`${e.name || "Component"} prop "${s}" does not support live()`
|
|
1142
|
+
);
|
|
1143
|
+
}
|
|
1144
|
+
function nt(e) {
|
|
1145
|
+
Z(e.liveProps, e.sourceProps, e.owner, e.type.diagnosticLabel ?? e.type.name, (t, n) => {
|
|
1146
|
+
e.props = { ...e.props, [t]: n }, D(e, "dependency");
|
|
1147
|
+
}), e.props = G(e.liveProps, e.sourceProps);
|
|
1148
|
+
}
|
|
1149
|
+
function it(e, t) {
|
|
1150
|
+
e.sourceProps = t, Z(e.liveProps, t, e.owner, e.type.diagnosticLabel ?? e.type.name, (n, i) => {
|
|
1151
|
+
e.props = { ...e.props, [n]: i }, D(e, "dependency");
|
|
1152
|
+
}), e.props = G(e.liveProps, t), D(e);
|
|
1153
|
+
}
|
|
1154
|
+
function D(e, t = "parent") {
|
|
1155
|
+
Ee(e.diagnosticSubject, () => {
|
|
1156
|
+
const n = j(e.type(e.props));
|
|
1157
|
+
e.child = Y(e.child, n, e.owner);
|
|
1158
|
+
}, t);
|
|
1159
|
+
}
|
|
1160
|
+
function Ee(e, t, n = "parent") {
|
|
1161
|
+
if (!e) return t();
|
|
1162
|
+
const i = u.event(e, "consumer", { cause: "function component render", outcome: "started", consumer: { trigger: n } }), s = g, r = i ? { count: 0 } : null;
|
|
1163
|
+
g = r;
|
|
1164
|
+
try {
|
|
1165
|
+
const o = i ? u.withEvent(i, t) : t();
|
|
1166
|
+
return i && u.event(e, "consumer", { parent: i, cause: "function component rendered", outcome: "succeeded", consumer: { trigger: n, domWrites: r.count, renderPasses: 1 } }), o;
|
|
1167
|
+
} catch (o) {
|
|
1168
|
+
throw i && u.event(e, "consumer", { parent: i, cause: "function component failed", outcome: "failed", error: o, consumer: { trigger: n, domWrites: r.count, renderPasses: 1 } }), o;
|
|
1169
|
+
} finally {
|
|
1170
|
+
g = s;
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
function Z(e, t, n, i, s) {
|
|
1174
|
+
for (const [r, o] of e) {
|
|
1175
|
+
const a = t[r];
|
|
1176
|
+
T(a) && a.emitter === o.source || (o.unsubscribe(), e.delete(r));
|
|
1177
|
+
}
|
|
1178
|
+
for (const [r, o] of Object.entries(t)) {
|
|
1179
|
+
if (!T(o) || e.has(r)) continue;
|
|
1180
|
+
const a = {
|
|
1181
|
+
source: o.emitter,
|
|
1182
|
+
value: o.emitter.get(),
|
|
1183
|
+
unsubscribe: () => {
|
|
1184
|
+
}
|
|
1185
|
+
};
|
|
1186
|
+
a.unsubscribe = F(o.emitter, a, n, `${i}.${r}`, (l) => {
|
|
1187
|
+
e.get(r) === a && (a.value = l, s(r, l));
|
|
1188
|
+
}), e.set(r, a);
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
function G(e, t) {
|
|
1192
|
+
return Object.fromEntries(Object.entries(t).map(([n, i]) => {
|
|
1193
|
+
var s;
|
|
1194
|
+
return [
|
|
1195
|
+
n,
|
|
1196
|
+
T(i) ? ((s = e.get(n)) == null ? void 0 : s.value) ?? i.emitter.get() : i
|
|
1197
|
+
];
|
|
1198
|
+
}));
|
|
1199
|
+
}
|
|
1200
|
+
function I(e, t, n, i, s = null, r = null) {
|
|
1201
|
+
if (e == null) throw new Error("Cannot patch a detached fragment range");
|
|
1202
|
+
const o = be(n), a = /* @__PURE__ */ new Map(), l = [];
|
|
1203
|
+
for (const d of t)
|
|
1204
|
+
d.key == null ? l.push(d) : a.has(d.key) || a.set(d.key, d);
|
|
1205
|
+
const f = /* @__PURE__ */ new Set(), p = /* @__PURE__ */ new Set(), y = [];
|
|
1206
|
+
let je = 0;
|
|
1207
|
+
for (const d of o) {
|
|
1208
|
+
const b = _(d);
|
|
1209
|
+
if (b != null) {
|
|
1210
|
+
if (f.has(b)) throw new Error(`Duplicate sibling key: ${String(b)}`);
|
|
1211
|
+
f.add(b);
|
|
1212
|
+
}
|
|
1213
|
+
const A = b == null ? l[je++] : a.get(b);
|
|
1214
|
+
A && Oe(A, d) ? (p.add(A), y.push(we(A, d, i))) : y.push($(d, i));
|
|
1215
|
+
}
|
|
1216
|
+
for (const d of t)
|
|
1217
|
+
p.has(d) || E(d, !0);
|
|
1218
|
+
let O = r ? r.nextSibling : e.firstChild;
|
|
1219
|
+
for (const d of y)
|
|
1220
|
+
for (const b of C(d))
|
|
1221
|
+
b === O ? O = O.nextSibling : (e.insertBefore(b, O ?? s), h(), O = b.nextSibling);
|
|
1222
|
+
return y;
|
|
1223
|
+
}
|
|
1224
|
+
function Ce(e, t) {
|
|
1225
|
+
const n = Object.fromEntries(Object.entries(t).filter(
|
|
1226
|
+
([r]) => r !== "children" && P(r) !== ne
|
|
1227
|
+
)), i = e.props, s = /* @__PURE__ */ new Set([...Object.keys(i), ...Object.keys(n)]);
|
|
1228
|
+
for (const r of ["value", "checked"])
|
|
1229
|
+
if (Object.hasOwn(n, r) && Object.hasOwn(n, `bind:${r}`))
|
|
1230
|
+
throw new Error(`${r} and bind:${r} cannot be used together`);
|
|
1231
|
+
for (const r of s) {
|
|
1232
|
+
const o = i[r], a = n[r];
|
|
1233
|
+
if (pt(r))
|
|
1234
|
+
st(e, r, a);
|
|
1235
|
+
else if (r === "ref")
|
|
1236
|
+
o !== a && at(e, a);
|
|
1237
|
+
else if (ft(r))
|
|
1238
|
+
ot(e, r, a);
|
|
1239
|
+
else if (T(a))
|
|
1240
|
+
rt(e, r, a);
|
|
1241
|
+
else {
|
|
1242
|
+
const l = e.liveProps.get(r);
|
|
1243
|
+
l && (l.unsubscribe(), e.liveProps.delete(r));
|
|
1244
|
+
const f = (l == null ? void 0 : l.value) ?? o;
|
|
1245
|
+
Object.is(f, a) || L(e.node, r, f, a);
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
v(e.node, ne, ""), e.props = { ...n };
|
|
1249
|
+
}
|
|
1250
|
+
function rt(e, t, n) {
|
|
1251
|
+
const i = e.liveProps.get(t);
|
|
1252
|
+
if ((i == null ? void 0 : i.source) === n.emitter) return;
|
|
1253
|
+
i == null || i.unsubscribe();
|
|
1254
|
+
const s = n.emitter.get();
|
|
1255
|
+
L(e.node, t, (i == null ? void 0 : i.value) ?? e.props[t], s);
|
|
1256
|
+
const r = {
|
|
1257
|
+
source: n.emitter,
|
|
1258
|
+
value: s,
|
|
1259
|
+
unsubscribe: () => {
|
|
1260
|
+
}
|
|
1261
|
+
};
|
|
1262
|
+
r.unsubscribe = F(n.emitter, r, e.owner, `${e.type}.${t}`, (o) => {
|
|
1263
|
+
const a = r.value;
|
|
1264
|
+
r.value = o, Object.is(a, o) || L(e.node, t, a, o);
|
|
1265
|
+
}), e.liveProps.set(t, r);
|
|
1266
|
+
}
|
|
1267
|
+
function st(e, t, n) {
|
|
1268
|
+
const i = t.slice(5), s = e.nativeBindings.get(t);
|
|
1269
|
+
if (n == null) {
|
|
1270
|
+
s && (s.unsubscribe(), e.node.removeEventListener(s.eventName, s.listener), e.nativeBindings.delete(t), L(e.node, i, s.value, void 0));
|
|
1271
|
+
return;
|
|
1272
|
+
}
|
|
1273
|
+
if (dt(n, t), (s == null ? void 0 : s.source) === n) return;
|
|
1274
|
+
s && (s.unsubscribe(), e.node.removeEventListener(s.eventName, s.listener)), ht(e.node, i);
|
|
1275
|
+
const r = mt(e.node, i), o = n.get();
|
|
1276
|
+
L(e.node, i, s == null ? void 0 : s.value, o);
|
|
1277
|
+
const a = (f) => {
|
|
1278
|
+
M(
|
|
1279
|
+
Re(e, r),
|
|
1280
|
+
e.owner.diagnosticScope,
|
|
1281
|
+
f,
|
|
1282
|
+
a,
|
|
1283
|
+
`${t} changed`,
|
|
1284
|
+
() => n.set(Reflect.get(e.node, i), `${t} changed`)
|
|
1285
|
+
);
|
|
1286
|
+
}, l = {
|
|
1287
|
+
source: n,
|
|
1288
|
+
value: o,
|
|
1289
|
+
eventName: r,
|
|
1290
|
+
listener: a,
|
|
1291
|
+
unsubscribe: () => {
|
|
1292
|
+
}
|
|
1293
|
+
};
|
|
1294
|
+
l.unsubscribe = F(n, l, e.owner, `${e.type}.${t}`, (f) => {
|
|
1295
|
+
const p = l.value;
|
|
1296
|
+
l.value = f, Object.is(p, f) || L(e.node, i, p, f);
|
|
1297
|
+
}), e.node.addEventListener(r, a), e.nativeBindings.set(t, l);
|
|
1298
|
+
}
|
|
1299
|
+
function ot(e, t, n) {
|
|
1300
|
+
const i = t.slice(2).toLowerCase(), s = e.listeners.get(t), r = s ? se.get(s) ?? s : null;
|
|
1301
|
+
if (s && r !== n && (e.node.removeEventListener(i, s), e.listeners.delete(t)), n != null && typeof n != "function")
|
|
1302
|
+
throw new TypeError(`${t} must be a function or null`);
|
|
1303
|
+
if (typeof n == "function" && r !== n) {
|
|
1304
|
+
const o = (a) => M(
|
|
1305
|
+
Re(e, i),
|
|
1306
|
+
e.owner.diagnosticScope,
|
|
1307
|
+
a,
|
|
1308
|
+
o,
|
|
1309
|
+
i,
|
|
1310
|
+
() => n.call(e.node, a)
|
|
1311
|
+
);
|
|
1312
|
+
se.set(o, n), e.node.addEventListener(i, o), e.listeners.set(t, o);
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
const re = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap();
|
|
1316
|
+
function M(e, t, n, i, s, r) {
|
|
1317
|
+
return u.withScope(t, () => {
|
|
1318
|
+
if (!u.active) return r();
|
|
1319
|
+
let o = B.get(n);
|
|
1320
|
+
return (!o || o.listeners.has(i)) && (o = { event: u.event(e, "interaction", { cause: s, outcome: "started" }), listeners: /* @__PURE__ */ new Set() }, B.set(n, o), queueMicrotask(() => B.delete(n))), o.listeners.add(i), u.withEvent(o.event, r);
|
|
1321
|
+
});
|
|
1322
|
+
}
|
|
1323
|
+
function Re(e, t) {
|
|
1324
|
+
var s;
|
|
1325
|
+
let n = re.get(e);
|
|
1326
|
+
n || (n = /* @__PURE__ */ new Map(), re.set(e, n));
|
|
1327
|
+
let i = n.get(t);
|
|
1328
|
+
if (!i) {
|
|
1329
|
+
i = {};
|
|
1330
|
+
const r = e.node.getAttribute("aria-label") ?? e.node.getAttribute("name") ?? ((s = e.node.textContent) == null ? void 0 : s.trim().slice(0, 80)) ?? "";
|
|
1331
|
+
u.configure(i, {
|
|
1332
|
+
kind: "interaction",
|
|
1333
|
+
label: `${R(e.owner)}: ${e.type} ${r} ${t}`.trim(),
|
|
1334
|
+
scope: e.owner.diagnosticScope
|
|
1335
|
+
}), n.set(t, i);
|
|
1336
|
+
}
|
|
1337
|
+
return i;
|
|
1338
|
+
}
|
|
1339
|
+
function F(e, t, n, i, s) {
|
|
1340
|
+
u.configure(t, {
|
|
1341
|
+
kind: "binding",
|
|
1342
|
+
label: `${R(n)}: ${i}`,
|
|
1343
|
+
scope: n.diagnosticScope,
|
|
1344
|
+
sources: [e]
|
|
1345
|
+
});
|
|
1346
|
+
const r = e.subscribe(({ value: o, event: a }) => {
|
|
1347
|
+
const l = u.event(t, "consumer", {
|
|
1348
|
+
parent: a,
|
|
1349
|
+
cause: "binding update",
|
|
1350
|
+
value: o,
|
|
1351
|
+
outcome: "started",
|
|
1352
|
+
consumer: { trigger: "dependency" }
|
|
1353
|
+
}), f = g, p = l ? { count: 0 } : null;
|
|
1354
|
+
g = p;
|
|
1355
|
+
try {
|
|
1356
|
+
u.withEvent(l, () => s(o)), l && u.event(t, "consumer", {
|
|
1357
|
+
parent: l,
|
|
1358
|
+
cause: "binding updated",
|
|
1359
|
+
value: o,
|
|
1360
|
+
outcome: "succeeded",
|
|
1361
|
+
consumer: { trigger: "dependency", domWrites: p.count }
|
|
1362
|
+
});
|
|
1363
|
+
} catch (y) {
|
|
1364
|
+
throw l && u.event(t, "consumer", {
|
|
1365
|
+
parent: l,
|
|
1366
|
+
cause: "binding update failed",
|
|
1367
|
+
outcome: "failed",
|
|
1368
|
+
error: y,
|
|
1369
|
+
consumer: { trigger: "dependency", domWrites: p.count }
|
|
1370
|
+
}), y;
|
|
1371
|
+
} finally {
|
|
1372
|
+
g = f;
|
|
1373
|
+
}
|
|
1374
|
+
}, { emitCurrent: !1, diagnosticTarget: t });
|
|
1375
|
+
return () => {
|
|
1376
|
+
r(), u.dispose(t);
|
|
1377
|
+
};
|
|
1378
|
+
}
|
|
1379
|
+
function R(e) {
|
|
1380
|
+
return e.diagnosticLabel;
|
|
1381
|
+
}
|
|
1382
|
+
function at(e, t) {
|
|
1383
|
+
if (H(e.ref, null), t != null && typeof t != "function" && typeof t != "object")
|
|
1384
|
+
throw new TypeError("ref must be a function, object, or null");
|
|
1385
|
+
e.ref = t, H(e.ref, e.node);
|
|
1386
|
+
}
|
|
1387
|
+
function L(e, t, n, i) {
|
|
1388
|
+
if (t === "class" || t === "className") {
|
|
1389
|
+
v(e, "class", i);
|
|
1390
|
+
return;
|
|
1391
|
+
}
|
|
1392
|
+
if (t === "for" || t === "htmlFor") {
|
|
1393
|
+
v(e, "for", i);
|
|
1394
|
+
return;
|
|
1395
|
+
}
|
|
1396
|
+
if (t === "dataset") {
|
|
1397
|
+
lt(e, n, i);
|
|
1398
|
+
return;
|
|
1399
|
+
}
|
|
1400
|
+
if (t === "style") {
|
|
1401
|
+
ct(e, n, i);
|
|
1402
|
+
return;
|
|
1403
|
+
}
|
|
1404
|
+
if (t === "dangerouslySetInnerHTML")
|
|
1405
|
+
throw new Error("dangerouslySetInnerHTML is not supported");
|
|
1406
|
+
const s = ut(t);
|
|
1407
|
+
if (Qe.has(s)) {
|
|
1408
|
+
const r = !!i;
|
|
1409
|
+
s in e && Reflect.get(e, s) !== r && (Reflect.set(e, s, r), h()), v(e, P(t), r);
|
|
1410
|
+
return;
|
|
1411
|
+
}
|
|
1412
|
+
if (s === "value" && e.localName === "option") {
|
|
1413
|
+
v(e, P(t), i);
|
|
1414
|
+
return;
|
|
1415
|
+
}
|
|
1416
|
+
if (Xe.has(s) && s in e) {
|
|
1417
|
+
const r = i ?? (s === "value" ? "" : !1);
|
|
1418
|
+
Object.is(Reflect.get(e, s), r) || (Reflect.set(e, s, r), h()), i == null && v(e, P(t), null);
|
|
1419
|
+
return;
|
|
1420
|
+
}
|
|
1421
|
+
v(e, P(t), i);
|
|
1422
|
+
}
|
|
1423
|
+
function lt(e, t, n) {
|
|
1424
|
+
const i = U(t, "dataset"), s = U(n, "dataset");
|
|
1425
|
+
for (const r of /* @__PURE__ */ new Set([...Object.keys(i), ...Object.keys(s)])) {
|
|
1426
|
+
const o = s[r];
|
|
1427
|
+
e.dataset[r] !== (o == null ? void 0 : String(o)) && (o == null ? delete e.dataset[r] : e.dataset[r] = String(o), h());
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
function ct(e, t, n) {
|
|
1431
|
+
if (typeof n == "string") {
|
|
1432
|
+
e.style.cssText !== n && (e.style.cssText = n, h());
|
|
1433
|
+
return;
|
|
1434
|
+
}
|
|
1435
|
+
const i = typeof t == "string" ? {} : U(t, "style"), s = U(n, "style");
|
|
1436
|
+
typeof t == "string" && e.style.cssText !== "" && (e.style.cssText = "", h());
|
|
1437
|
+
for (const r of /* @__PURE__ */ new Set([...Object.keys(i), ...Object.keys(s)])) {
|
|
1438
|
+
const o = s[r];
|
|
1439
|
+
if (r.startsWith("--")) {
|
|
1440
|
+
if (e.style.getPropertyValue(r) === (o == null ? "" : String(o))) continue;
|
|
1441
|
+
o == null ? e.style.removeProperty(r) : e.style.setProperty(r, String(o));
|
|
1442
|
+
} else {
|
|
1443
|
+
if (Reflect.get(e.style, r) === (o == null ? "" : String(o))) continue;
|
|
1444
|
+
Reflect.set(e.style, r, o == null ? "" : String(o));
|
|
1445
|
+
}
|
|
1446
|
+
h();
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
function U(e, t) {
|
|
1450
|
+
if (e == null) return {};
|
|
1451
|
+
if (typeof e != "object" || Array.isArray(e))
|
|
1452
|
+
throw new TypeError(`${t} must be an object or null`);
|
|
1453
|
+
return e;
|
|
1454
|
+
}
|
|
1455
|
+
function v(e, t, n) {
|
|
1456
|
+
const i = n == null || n === !1 ? null : n === !0 ? "" : String(n);
|
|
1457
|
+
e.getAttribute(t) !== i && (i === null ? e.removeAttribute(t) : e.setAttribute(t, i), h());
|
|
1458
|
+
}
|
|
1459
|
+
function ut(e) {
|
|
1460
|
+
return e === "readonly" ? "readOnly" : e === "autofocus" ? "autoFocus" : e;
|
|
1461
|
+
}
|
|
1462
|
+
function P(e) {
|
|
1463
|
+
return e === "className" ? "class" : e === "htmlFor" ? "for" : e === "minLength" ? "minlength" : e === "maxLength" ? "maxlength" : e === "autoComplete" ? "autocomplete" : e === "inputMode" ? "inputmode" : /^aria[A-Z]/.test(e) || /^data[A-Z]/.test(e) ? oe(e) : e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`);
|
|
1464
|
+
}
|
|
1465
|
+
function oe(e) {
|
|
1466
|
+
return e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`);
|
|
1467
|
+
}
|
|
1468
|
+
function H(e, t) {
|
|
1469
|
+
e != null && (typeof e == "function" ? e(t) : e.current = t);
|
|
1470
|
+
}
|
|
1471
|
+
function E(e, t) {
|
|
1472
|
+
if (e.kind === "emitter") {
|
|
1473
|
+
if (e.unsubscribe(), E(e.child, !1), t)
|
|
1474
|
+
for (const n of C(e)) k(n);
|
|
1475
|
+
return;
|
|
1476
|
+
}
|
|
1477
|
+
if (e.kind === "component") {
|
|
1478
|
+
for (const n of e.liveProps.values()) n.unsubscribe();
|
|
1479
|
+
e.liveProps.clear(), e.owner._childComponents.delete(e.instance), e.instance.destroy();
|
|
1480
|
+
return;
|
|
1481
|
+
}
|
|
1482
|
+
if (e.kind === "function") {
|
|
1483
|
+
for (const n of e.liveProps.values()) n.unsubscribe();
|
|
1484
|
+
e.liveProps.clear(), e.diagnosticSubject && u.dispose(e.diagnosticSubject), E(e.child, t);
|
|
1485
|
+
return;
|
|
1486
|
+
}
|
|
1487
|
+
if (e.kind === "element") {
|
|
1488
|
+
H(e.ref, null);
|
|
1489
|
+
for (const [n, i] of e.listeners)
|
|
1490
|
+
e.node.removeEventListener(n.slice(2).toLowerCase(), i);
|
|
1491
|
+
e.listeners.clear();
|
|
1492
|
+
for (const n of e.liveProps.values()) n.unsubscribe();
|
|
1493
|
+
e.liveProps.clear();
|
|
1494
|
+
for (const n of e.nativeBindings.values())
|
|
1495
|
+
n.unsubscribe(), e.node.removeEventListener(n.eventName, n.listener);
|
|
1496
|
+
e.nativeBindings.clear();
|
|
1497
|
+
for (const n of e.children) E(n, !1);
|
|
1498
|
+
t && k(e.node);
|
|
1499
|
+
return;
|
|
1500
|
+
}
|
|
1501
|
+
if (e.kind === "fragment") {
|
|
1502
|
+
for (const n of e.children) E(n, !1);
|
|
1503
|
+
if (t)
|
|
1504
|
+
for (const n of C(e)) k(n);
|
|
1505
|
+
return;
|
|
1506
|
+
}
|
|
1507
|
+
t && k(e.node);
|
|
1508
|
+
}
|
|
1509
|
+
function k(e) {
|
|
1510
|
+
e.parentNode && (e.remove(), h());
|
|
1511
|
+
}
|
|
1512
|
+
function J(e, t, n = null) {
|
|
1513
|
+
if (t != null)
|
|
1514
|
+
for (const i of C(t))
|
|
1515
|
+
i.parentNode === e && i.nextSibling === n || (e.insertBefore(i, n), h());
|
|
1516
|
+
}
|
|
1517
|
+
function C(e) {
|
|
1518
|
+
if (e == null) return [];
|
|
1519
|
+
if (e.kind === "text" || e.kind === "element") return [e.node];
|
|
1520
|
+
if (e.kind === "component") return C(e.instance._rendered);
|
|
1521
|
+
if (e.kind === "function") return C(e.child);
|
|
1522
|
+
const t = [];
|
|
1523
|
+
let n = e.start;
|
|
1524
|
+
for (; n && (t.push(n), n !== e.end); )
|
|
1525
|
+
n = n.nextSibling;
|
|
1526
|
+
return t;
|
|
1527
|
+
}
|
|
1528
|
+
function Le(e) {
|
|
1529
|
+
return C(e)[0] ?? null;
|
|
1530
|
+
}
|
|
1531
|
+
function _(e) {
|
|
1532
|
+
return e instanceof w ? Te(e.props) : S(e) ? e.key : null;
|
|
1533
|
+
}
|
|
1534
|
+
function Te(e) {
|
|
1535
|
+
const t = e.key;
|
|
1536
|
+
return typeof t == "string" || typeof t == "number" ? t : null;
|
|
1537
|
+
}
|
|
1538
|
+
function Oe(e, t) {
|
|
1539
|
+
return e.kind === "text" ? typeof t == "string" || typeof t == "number" : e.kind === "emitter" ? q(t) && e.source === t : e.kind === "component" ? t instanceof w ? e.instance === t : S(t) && Pe(t.type) && e.type === t.type && e.key === _(t) : e.kind === "function" ? S(t) && e.type === t.type && e.key === _(t) : e.kind === "fragment" ? S(t) && t.type === N && e.key === _(t) : S(t) && typeof t.type == "string" && e.type === t.type && e.key === _(t);
|
|
1540
|
+
}
|
|
1541
|
+
function S(e) {
|
|
1542
|
+
return e != null && typeof e == "object" && Object.hasOwn(e, "type");
|
|
1543
|
+
}
|
|
1544
|
+
function Pe(e) {
|
|
1545
|
+
return typeof e == "function" && (e === w || e.prototype instanceof w);
|
|
1546
|
+
}
|
|
1547
|
+
function ft(e) {
|
|
1548
|
+
return /^on[A-Z]/.test(e);
|
|
1549
|
+
}
|
|
1550
|
+
function pt(e) {
|
|
1551
|
+
return e === "bind:value" || e === "bind:checked";
|
|
1552
|
+
}
|
|
1553
|
+
function T(e) {
|
|
1554
|
+
return e != null && typeof e == "object" && ye.has(e);
|
|
1555
|
+
}
|
|
1556
|
+
function q(e) {
|
|
1557
|
+
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";
|
|
1558
|
+
}
|
|
1559
|
+
function Q(e, t) {
|
|
1560
|
+
if (!q(e)) throw new TypeError(`${t} requires a readable emitter`);
|
|
1561
|
+
}
|
|
1562
|
+
function dt(e, t) {
|
|
1563
|
+
if (Q(e, t), typeof Reflect.get(e, "set") != "function")
|
|
1564
|
+
throw new TypeError(`${t} requires a writable emitter`);
|
|
1565
|
+
}
|
|
1566
|
+
function ht(e, t) {
|
|
1567
|
+
const n = e.localName;
|
|
1568
|
+
if (!(t === "checked" ? n === "input" : n === "input" || n === "textarea" || n === "select")) throw new TypeError(`bind:${t} is not supported on ${n}`);
|
|
1569
|
+
}
|
|
1570
|
+
function mt(e, t) {
|
|
1571
|
+
return t === "value" && e.localName !== "select" ? "input" : "change";
|
|
1572
|
+
}
|
|
1573
|
+
function gt(e) {
|
|
1574
|
+
if (e == null || typeof e != "object" && typeof e != "function" || typeof Reflect.get(e, "insertBefore") != "function")
|
|
1575
|
+
throw new TypeError("Component parent must be a DOM ParentNode");
|
|
1576
|
+
}
|
|
1577
|
+
function ae(e) {
|
|
1578
|
+
try {
|
|
1579
|
+
return String(e);
|
|
1580
|
+
} catch {
|
|
1581
|
+
return Object.prototype.toString.call(e);
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
function yt(e) {
|
|
1585
|
+
const t = [];
|
|
1586
|
+
let n = e;
|
|
1587
|
+
for (; n != null && typeof n == "function" && (t.unshift(n), n !== w); )
|
|
1588
|
+
n = Object.getPrototypeOf(n);
|
|
1589
|
+
return t;
|
|
1590
|
+
}
|
|
1591
|
+
function bt(...e) {
|
|
1592
|
+
return [...new Set(e.flatMap((t) => typeof t == "string" ? t.split(/\s+/) : []).filter(Boolean))].join(" ");
|
|
1593
|
+
}
|
|
1594
|
+
function V(e) {
|
|
1595
|
+
if (e.island === !0) return !0;
|
|
1596
|
+
const t = e.className ?? e.class;
|
|
1597
|
+
return typeof t == "string" && t.split(/\s+/).includes("island");
|
|
1598
|
+
}
|
|
1599
|
+
function _e(e, t, n) {
|
|
1600
|
+
const i = t == null ? {} : { ...t };
|
|
1601
|
+
return n !== void 0 && (i.key = n), x(e, i);
|
|
1602
|
+
}
|
|
1603
|
+
const Lt = _e, Tt = _e;
|
|
1604
|
+
function Ot(e) {
|
|
1605
|
+
if (!(e instanceof w))
|
|
1606
|
+
throw new TypeError("createPrebuiltElement requires a Component instance");
|
|
1607
|
+
return e;
|
|
1608
|
+
}
|
|
1609
|
+
export {
|
|
1610
|
+
w as C,
|
|
1611
|
+
N as F,
|
|
1612
|
+
he as S,
|
|
1613
|
+
_e as a,
|
|
1614
|
+
Lt as b,
|
|
1615
|
+
et as c,
|
|
1616
|
+
K as d,
|
|
1617
|
+
le as e,
|
|
1618
|
+
Ct as f,
|
|
1619
|
+
Ve as g,
|
|
1620
|
+
x as h,
|
|
1621
|
+
S as i,
|
|
1622
|
+
Tt as j,
|
|
1623
|
+
xe as k,
|
|
1624
|
+
te as l,
|
|
1625
|
+
vt as m,
|
|
1626
|
+
Rt as n,
|
|
1627
|
+
Ot as o,
|
|
1628
|
+
Et as p,
|
|
1629
|
+
Ie as s
|
|
1630
|
+
};
|
|
1631
|
+
//# sourceMappingURL=jsx-runtime-Ba-uafjl.js.map
|