@capillaryjs/capillary-ui 1.2.0 → 1.4.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 +152 -16
- package/README.md +177 -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 +13 -2
- 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 +17 -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 +2750 -2084
- package/dist/index.js.map +1 -1
- package/dist/jsx-dev-runtime.js +1 -1
- package/dist/{jsx-runtime-BD_q3rPg.js → jsx-runtime-Ba-uafjl.js} +595 -475
- package/dist/jsx-runtime-Ba-uafjl.js.map +1 -0
- package/dist/jsx-runtime.js +1 -1
- 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/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 +756 -161
- package/themes/README.md +9 -2
- package/themes/base.css +114 -18
- package/themes/capillary/theme.css +300 -0
- package/themes/shiny/theme.css +35 -21
- package/themes/soft/theme.css +37 -0
- package/themes/white/theme.css +52 -0
- package/dist/jsx-runtime-BD_q3rPg.js.map +0 -1
- package/themes/java/theme.css +0 -21
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var c = (e, t, n) =>
|
|
4
|
-
import { defaultDiagnosticScope as
|
|
5
|
-
const
|
|
6
|
-
let
|
|
7
|
-
class
|
|
8
|
-
constructor(t = `runtime-${
|
|
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
9
|
c(this, "id");
|
|
10
10
|
c(this, "cssFragments", /* @__PURE__ */ new Map());
|
|
11
11
|
if (typeof t != "string") throw new TypeError("StyleRegistry id must be a string");
|
|
@@ -24,123 +24,123 @@ class re {
|
|
|
24
24
|
const i = t.trim();
|
|
25
25
|
if (i.length === 0) return this;
|
|
26
26
|
if (!i.includes("&")) return this.registerCSS(i);
|
|
27
|
-
const
|
|
28
|
-
return
|
|
27
|
+
const s = `host:${i}`, r = this.cssFragments.get(s);
|
|
28
|
+
return r == null ? this.cssFragments.set(s, {
|
|
29
29
|
kind: "host",
|
|
30
30
|
css: i,
|
|
31
31
|
hosts: /* @__PURE__ */ new Set([n.trim()])
|
|
32
|
-
}) :
|
|
32
|
+
}) : r.kind === "host" && r.hosts.add(n.trim()), this;
|
|
33
33
|
}
|
|
34
34
|
generateCSS() {
|
|
35
|
-
return [...this.cssFragments.values()].map((t) => t.kind === "raw" ? t.css :
|
|
35
|
+
return [...this.cssFragments.values()].map((t) => t.kind === "raw" ? t.css : ce(t.css, [...t.hosts])).join(`
|
|
36
36
|
|
|
37
37
|
`);
|
|
38
38
|
}
|
|
39
39
|
injectAll(t = globalThis.document) {
|
|
40
40
|
if ((t == null ? void 0 : t.head) == null)
|
|
41
41
|
throw new TypeError("StyleRegistry.injectAll requires a document with a head");
|
|
42
|
-
const n = `style[${
|
|
42
|
+
const n = `style[${ee}="${Me(this.id)}"]`;
|
|
43
43
|
let i = t.head.querySelector(n);
|
|
44
|
-
i == null && (i = t.createElement("style"), i.setAttribute(
|
|
45
|
-
const
|
|
46
|
-
return i.textContent !==
|
|
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
47
|
}
|
|
48
48
|
reset() {
|
|
49
49
|
this.cssFragments.clear();
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
return new
|
|
52
|
+
function xe() {
|
|
53
|
+
return new le();
|
|
54
54
|
}
|
|
55
|
-
const
|
|
56
|
-
function
|
|
55
|
+
const Ie = new le("");
|
|
56
|
+
function Me(e) {
|
|
57
57
|
return e.replaceAll("\\", "\\\\").replaceAll('"', '\\"');
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function ce(e, t) {
|
|
60
60
|
let n = "", i = 0;
|
|
61
61
|
for (; i < e.length; ) {
|
|
62
|
-
const
|
|
63
|
-
if (r < 0) return n + e.slice(i);
|
|
64
|
-
const s = Fe(e, r);
|
|
62
|
+
const s = qe(e, i);
|
|
65
63
|
if (s < 0) return n + e.slice(i);
|
|
66
|
-
const
|
|
67
|
-
|
|
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
68
|
}
|
|
69
69
|
return n;
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function Ue(e, t) {
|
|
72
72
|
var o, a, l;
|
|
73
73
|
if (t.length === 1 || !e.includes("&"))
|
|
74
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]) ?? "",
|
|
76
|
-
return n +
|
|
77
|
-
${
|
|
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
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Fe(e) {
|
|
80
80
|
const t = [];
|
|
81
|
-
let n = 0, i = 0,
|
|
81
|
+
let n = 0, i = 0, s = 0, r = null;
|
|
82
82
|
for (let o = 0; o < e.length; o += 1) {
|
|
83
83
|
const a = e[o];
|
|
84
|
-
if (
|
|
85
|
-
a === "\\" ? o += 1 : a ===
|
|
84
|
+
if (r != null) {
|
|
85
|
+
a === "\\" ? o += 1 : a === r && (r = null);
|
|
86
86
|
continue;
|
|
87
87
|
}
|
|
88
|
-
a === '"' || a === "'" ?
|
|
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
89
|
}
|
|
90
90
|
return t.push(e.slice(n).trim()), t.filter(Boolean);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function qe(e, t) {
|
|
93
93
|
for (let n = t; n < e.length; n += 1) {
|
|
94
94
|
const i = e[n];
|
|
95
95
|
if (i === '"' || i === "'")
|
|
96
|
-
n =
|
|
96
|
+
n = ue(e, n);
|
|
97
97
|
else if (i === "/" && e[n + 1] === "*")
|
|
98
|
-
n =
|
|
98
|
+
n = fe(e, n);
|
|
99
99
|
else if (i === "{")
|
|
100
100
|
return n;
|
|
101
101
|
}
|
|
102
102
|
return -1;
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function Be(e, t) {
|
|
105
105
|
let n = 1;
|
|
106
106
|
for (let i = t + 1; i < e.length; i += 1) {
|
|
107
|
-
const
|
|
108
|
-
if (
|
|
109
|
-
i =
|
|
110
|
-
else if (
|
|
111
|
-
i =
|
|
112
|
-
else if (
|
|
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
113
|
n += 1;
|
|
114
|
-
else if (
|
|
114
|
+
else if (s === "}" && --n === 0)
|
|
115
115
|
return i;
|
|
116
116
|
}
|
|
117
117
|
return -1;
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function ue(e, t) {
|
|
120
120
|
const n = e[t];
|
|
121
121
|
for (let i = t + 1; i < e.length; i += 1)
|
|
122
122
|
if (e[i] === "\\") i += 1;
|
|
123
123
|
else if (e[i] === n) return i;
|
|
124
124
|
return e.length;
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function fe(e, t) {
|
|
127
127
|
const n = e.indexOf("*/", t + 2);
|
|
128
128
|
return n < 0 ? e.length : n + 1;
|
|
129
129
|
}
|
|
130
|
-
const
|
|
131
|
-
function
|
|
130
|
+
const pe = /* @__PURE__ */ new WeakSet(), de = /* @__PURE__ */ new WeakSet();
|
|
131
|
+
function vt(e) {
|
|
132
132
|
if (typeof e != "string" || e.trim() === "")
|
|
133
133
|
throw new TypeError("Service name must be a non-empty string");
|
|
134
134
|
const t = Object.freeze({ name: e.trim() });
|
|
135
|
-
return
|
|
135
|
+
return pe.add(t), t;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
if (
|
|
137
|
+
function Et(e, t) {
|
|
138
|
+
if (W(e), typeof t != "function")
|
|
139
139
|
throw new TypeError(`Service provider "${e.name}" requires a factory function`);
|
|
140
140
|
const n = Object.freeze({ key: e, create: t });
|
|
141
|
-
return
|
|
141
|
+
return de.add(n), n;
|
|
142
142
|
}
|
|
143
|
-
class
|
|
143
|
+
class he {
|
|
144
144
|
constructor(t = []) {
|
|
145
145
|
c(this, "providers", /* @__PURE__ */ new Map());
|
|
146
146
|
c(this, "instances", /* @__PURE__ */ new Map());
|
|
@@ -150,7 +150,7 @@ class ue {
|
|
|
150
150
|
if (!Array.isArray(t))
|
|
151
151
|
throw new TypeError("ServiceScope providers must be an array");
|
|
152
152
|
for (const n of t) {
|
|
153
|
-
if (
|
|
153
|
+
if (De(n), this.providers.has(n.key))
|
|
154
154
|
throw new Error(`Service "${n.key.name}" is registered more than once`);
|
|
155
155
|
this.providers.set(n.key, n);
|
|
156
156
|
}
|
|
@@ -159,21 +159,21 @@ class ue {
|
|
|
159
159
|
return this.disposed;
|
|
160
160
|
}
|
|
161
161
|
has(t) {
|
|
162
|
-
return this.assertActive(),
|
|
162
|
+
return this.assertActive(), W(t), this.providers.has(t);
|
|
163
163
|
}
|
|
164
164
|
require(t) {
|
|
165
|
-
if (this.assertActive(),
|
|
165
|
+
if (this.assertActive(), W(t), this.instances.has(t)) return this.instances.get(t);
|
|
166
166
|
const n = this.providers.get(t);
|
|
167
167
|
if (n == null) throw new Error(`Service "${t.name}" is not registered`);
|
|
168
168
|
const i = this.resolving.indexOf(t);
|
|
169
169
|
if (i >= 0) {
|
|
170
|
-
const
|
|
171
|
-
throw new Error(`Circular service dependency: ${
|
|
170
|
+
const s = [...this.resolving.slice(i), t].map((r) => r.name).join(" -> ");
|
|
171
|
+
throw new Error(`Circular service dependency: ${s}`);
|
|
172
172
|
}
|
|
173
173
|
this.resolving.push(t);
|
|
174
174
|
try {
|
|
175
|
-
const
|
|
176
|
-
return this.instances.set(t,
|
|
175
|
+
const s = n.create(this);
|
|
176
|
+
return this.instances.set(t, s), this.creationOrder.push(t), s;
|
|
177
177
|
} finally {
|
|
178
178
|
this.resolving.pop();
|
|
179
179
|
}
|
|
@@ -185,10 +185,10 @@ class ue {
|
|
|
185
185
|
for (const n of [...this.creationOrder].reverse()) {
|
|
186
186
|
const i = this.instances.get(n);
|
|
187
187
|
try {
|
|
188
|
-
const
|
|
189
|
-
|
|
190
|
-
} catch (
|
|
191
|
-
t.push(
|
|
188
|
+
const s = He(i);
|
|
189
|
+
s != null && s.call(i);
|
|
190
|
+
} catch (s) {
|
|
191
|
+
t.push(s);
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
if (this.instances.clear(), this.creationOrder.length = 0, this.resolving.length = 0, t.length === 1) throw t[0];
|
|
@@ -199,25 +199,25 @@ class ue {
|
|
|
199
199
|
if (this.disposed) throw new Error("ServiceScope has been disposed");
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
-
function
|
|
203
|
-
return new
|
|
202
|
+
function Ve(e = []) {
|
|
203
|
+
return new he(e);
|
|
204
204
|
}
|
|
205
|
-
function
|
|
206
|
-
return e != null && (typeof e == "object" || typeof e == "function") &&
|
|
205
|
+
function We(e) {
|
|
206
|
+
return e != null && (typeof e == "object" || typeof e == "function") && pe.has(e);
|
|
207
207
|
}
|
|
208
|
-
function
|
|
209
|
-
if (!
|
|
208
|
+
function W(e) {
|
|
209
|
+
if (!We(e)) throw new TypeError("Expected a service key created by defineService()");
|
|
210
210
|
}
|
|
211
|
-
function
|
|
212
|
-
if (e == null || typeof e != "object" && typeof e != "function" || !
|
|
211
|
+
function De(e) {
|
|
212
|
+
if (e == null || typeof e != "object" && typeof e != "function" || !de.has(e))
|
|
213
213
|
throw new TypeError("Expected a service provider created by provideService()");
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function He(e) {
|
|
216
216
|
if (e == null || typeof e != "object" && typeof e != "function") return null;
|
|
217
217
|
const t = Reflect.get(e, "dispose");
|
|
218
218
|
return typeof t == "function" ? t : null;
|
|
219
219
|
}
|
|
220
|
-
const
|
|
220
|
+
const z = Object.freeze({
|
|
221
221
|
breadcrumbLabel: "Breadcrumb",
|
|
222
222
|
checkboxOptionLabel: "Option",
|
|
223
223
|
checkboxStateLabel: (e, t) => `${e}: ${t}`,
|
|
@@ -254,7 +254,7 @@ const P = Object.freeze({
|
|
|
254
254
|
tabLineLabel: "Sections",
|
|
255
255
|
tableFilterColumnLabel: (e) => `Filter ${e}`,
|
|
256
256
|
tableSortColumnLabel: (e) => `Sort ${e}`,
|
|
257
|
-
|
|
257
|
+
themeOptionCapillaryLabel: "Capillary",
|
|
258
258
|
themeOptionMinimalLabel: "Minimal",
|
|
259
259
|
themeOptionShinyLabel: "Shiny",
|
|
260
260
|
toolbarLabel: "Actions",
|
|
@@ -262,7 +262,7 @@ const P = Object.freeze({
|
|
|
262
262
|
treeViewLoadError: "Unable to load tree items",
|
|
263
263
|
treeViewLoading: "Loading tree items…"
|
|
264
264
|
});
|
|
265
|
-
class
|
|
265
|
+
class me {
|
|
266
266
|
constructor(t, n) {
|
|
267
267
|
c(this, "locale");
|
|
268
268
|
c(this, "messages");
|
|
@@ -272,30 +272,30 @@ class fe {
|
|
|
272
272
|
return this.messages[t];
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
|
-
const
|
|
275
|
+
const Ke = new me(
|
|
276
276
|
void 0,
|
|
277
|
-
|
|
277
|
+
z
|
|
278
278
|
);
|
|
279
|
-
function
|
|
280
|
-
if (e == null) return
|
|
279
|
+
function Ye(e) {
|
|
280
|
+
if (e == null) return Ke;
|
|
281
281
|
if (typeof e != "object" || Array.isArray(e))
|
|
282
282
|
throw new TypeError("Capillary UI localization must be an object");
|
|
283
|
-
const t =
|
|
283
|
+
const t = Ze(e.locale), n = e.messages;
|
|
284
284
|
if (n != null && (typeof n != "object" || Array.isArray(n)))
|
|
285
285
|
throw new TypeError("Capillary UI localization messages must be an object");
|
|
286
|
-
const i = { ...
|
|
286
|
+
const i = { ...z };
|
|
287
287
|
if (n != null)
|
|
288
|
-
for (const
|
|
289
|
-
const
|
|
290
|
-
if (
|
|
291
|
-
const o =
|
|
292
|
-
if (typeof
|
|
293
|
-
throw new TypeError(`Capillary UI localization message "${
|
|
294
|
-
Object.assign(i, { [
|
|
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
295
|
}
|
|
296
|
-
return new
|
|
296
|
+
return new me(t, Object.freeze(i));
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function Ze(e) {
|
|
299
299
|
if (typeof e != "string" || e.trim() === "")
|
|
300
300
|
throw new TypeError("Capillary UI localization locale must be a non-empty BCP 47 language tag");
|
|
301
301
|
try {
|
|
@@ -304,7 +304,7 @@ function We(e) {
|
|
|
304
304
|
throw new RangeError(`Invalid Capillary UI localization locale: ${e}`, { cause: t });
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
|
-
const
|
|
307
|
+
const Ge = /* @__PURE__ */ new Set([
|
|
308
308
|
"annotation-xml",
|
|
309
309
|
"color-profile",
|
|
310
310
|
"font-face",
|
|
@@ -314,8 +314,8 @@ const Ke = /* @__PURE__ */ new Set([
|
|
|
314
314
|
"font-face-name",
|
|
315
315
|
"missing-glyph"
|
|
316
316
|
]);
|
|
317
|
-
class
|
|
318
|
-
constructor(t = {}, n =
|
|
317
|
+
class K {
|
|
318
|
+
constructor(t = {}, n = xe()) {
|
|
319
319
|
c(this, "styleRegistry");
|
|
320
320
|
c(this, "services");
|
|
321
321
|
c(this, "router");
|
|
@@ -326,16 +326,16 @@ class V {
|
|
|
326
326
|
throw new TypeError("CapillaryUiRuntime options must be an object");
|
|
327
327
|
if (Object.hasOwn(t, "elementNames"))
|
|
328
328
|
throw new TypeError("CapillaryUiRuntime no longer supports configurable element names");
|
|
329
|
-
if (this.styleRegistry = n, this.diagnosticScope = t.diagnosticScope ??
|
|
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
330
|
throw new TypeError("Capillary UI services must be a ServiceScope");
|
|
331
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
332
|
throw new TypeError("Capillary UI router must be a BrowserRouter");
|
|
333
333
|
}
|
|
334
334
|
/** Resolve a fixed one-hyphen public host name for a built-in component. */
|
|
335
335
|
resolveElementName(t) {
|
|
336
|
-
|
|
336
|
+
ge(t, "Capillary UI component host name");
|
|
337
337
|
const n = `cap-${t.replaceAll("-", "")}`;
|
|
338
|
-
return
|
|
338
|
+
return Je(n), n;
|
|
339
339
|
}
|
|
340
340
|
resolveHostSelector(t, n) {
|
|
341
341
|
if (typeof t != "string") throw new TypeError("Host selector must be a string");
|
|
@@ -351,12 +351,12 @@ class V {
|
|
|
351
351
|
}
|
|
352
352
|
mount(t, n, i = null) {
|
|
353
353
|
t._setRuntime(this);
|
|
354
|
-
let
|
|
355
|
-
this.router != null && !this.routedRoots.has(t) && (this.routedRoots.add(t),
|
|
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
356
|
try {
|
|
357
|
-
t.mount(n, i), this.router != null &&
|
|
358
|
-
} catch (
|
|
359
|
-
throw
|
|
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
360
|
}
|
|
361
361
|
return t;
|
|
362
362
|
}
|
|
@@ -369,19 +369,19 @@ class V {
|
|
|
369
369
|
return this.styleRegistry.injectAll(t);
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
|
-
function
|
|
373
|
-
return new
|
|
372
|
+
function Ct(e = {}) {
|
|
373
|
+
return new K(e);
|
|
374
374
|
}
|
|
375
|
-
const
|
|
376
|
-
function
|
|
375
|
+
const te = new K({}, Ie);
|
|
376
|
+
function ge(e, t) {
|
|
377
377
|
if (typeof e != "string" || !/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/.test(e))
|
|
378
378
|
throw new TypeError(`${t} must be a lowercase kebab-case name`);
|
|
379
379
|
}
|
|
380
|
-
function
|
|
381
|
-
if (
|
|
380
|
+
function Je(e) {
|
|
381
|
+
if (ge(e, "Capillary UI element name"), !e.includes("-") || Ge.has(e))
|
|
382
382
|
throw new TypeError(`Capillary UI element name must be a non-reserved name containing a hyphen: ${e}`);
|
|
383
383
|
}
|
|
384
|
-
const
|
|
384
|
+
const N = Symbol.for("@capillaryjs/capillary-ui.Fragment"), ye = /* @__PURE__ */ new WeakSet(), Qe = /* @__PURE__ */ new Set([
|
|
385
385
|
"allowFullScreen",
|
|
386
386
|
"async",
|
|
387
387
|
"autoFocus",
|
|
@@ -405,7 +405,7 @@ const $ = Symbol.for("@capillaryjs/capillary-ui.Fragment"), de = /* @__PURE__ */
|
|
|
405
405
|
"required",
|
|
406
406
|
"reversed",
|
|
407
407
|
"selected"
|
|
408
|
-
]),
|
|
408
|
+
]), Xe = /* @__PURE__ */ new Set([
|
|
409
409
|
"checked",
|
|
410
410
|
"defaultChecked",
|
|
411
411
|
"defaultValue",
|
|
@@ -419,34 +419,38 @@ const $ = Symbol.for("@capillaryjs/capillary-ui.Fragment"), de = /* @__PURE__ */
|
|
|
419
419
|
"selectedIndex",
|
|
420
420
|
"tabIndex",
|
|
421
421
|
"value"
|
|
422
|
-
]),
|
|
423
|
-
|
|
424
|
-
|
|
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");
|
|
425
429
|
const t = Object.freeze({ emitter: e });
|
|
426
|
-
return
|
|
430
|
+
return ye.add(t), t;
|
|
427
431
|
}
|
|
428
|
-
function
|
|
432
|
+
function x(e, t = null, ...n) {
|
|
429
433
|
const i = t ?? {};
|
|
430
434
|
if (typeof i != "object" || Array.isArray(i))
|
|
431
435
|
throw new TypeError("VNode props must be an object or null");
|
|
432
436
|
const {
|
|
433
|
-
children:
|
|
434
|
-
key:
|
|
437
|
+
children: s,
|
|
438
|
+
key: r = null,
|
|
435
439
|
...o
|
|
436
440
|
} = i;
|
|
437
441
|
return {
|
|
438
442
|
type: e,
|
|
439
|
-
key:
|
|
443
|
+
key: r,
|
|
440
444
|
props: {
|
|
441
445
|
...o,
|
|
442
|
-
children:
|
|
446
|
+
children: be([s, n])
|
|
443
447
|
}
|
|
444
448
|
};
|
|
445
449
|
}
|
|
446
|
-
function
|
|
447
|
-
return e.reduce((n, i,
|
|
450
|
+
function et(e, ...t) {
|
|
451
|
+
return e.reduce((n, i, s) => n + i + String(t[s] ?? ""), "");
|
|
448
452
|
}
|
|
449
|
-
const
|
|
453
|
+
const m = class m {
|
|
450
454
|
constructor(t = {}) {
|
|
451
455
|
c(this, "props");
|
|
452
456
|
c(this, "dom", null);
|
|
@@ -466,7 +470,7 @@ const h = class h {
|
|
|
466
470
|
c(this, "renderReadSubscriptions", /* @__PURE__ */ new Map());
|
|
467
471
|
c(this, "collectingRenderReads", null);
|
|
468
472
|
/** @internal */
|
|
469
|
-
c(this, "_runtime",
|
|
473
|
+
c(this, "_runtime", te);
|
|
470
474
|
/** @internal Route lineage inherited by nested routed components. */
|
|
471
475
|
c(this, "_routeContext", null);
|
|
472
476
|
/** JSX component for this instance's runtime-configured custom host. */
|
|
@@ -480,32 +484,37 @@ const h = class h {
|
|
|
480
484
|
}
|
|
481
485
|
static new(...t) {
|
|
482
486
|
const n = new this(...t);
|
|
483
|
-
if (!(n instanceof
|
|
487
|
+
if (!(n instanceof m))
|
|
484
488
|
throw new TypeError("Component.new() requires a Component constructor");
|
|
485
489
|
return n.mount();
|
|
486
490
|
}
|
|
487
|
-
static registerStyles(t =
|
|
491
|
+
static registerStyles(t = te, n = /* @__PURE__ */ new Set()) {
|
|
488
492
|
if (n.has(this)) return;
|
|
489
493
|
n.add(this);
|
|
490
|
-
const i = this.hostName ?? null,
|
|
491
|
-
for (const
|
|
492
|
-
Object.hasOwn(
|
|
493
|
-
|
|
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,
|
|
494
498
|
t.resolveElementName(i)
|
|
495
499
|
));
|
|
496
|
-
for (const
|
|
497
|
-
if (Object.hasOwn(
|
|
498
|
-
for (const o of
|
|
500
|
+
for (const r of s)
|
|
501
|
+
if (Object.hasOwn(r, "dependencies"))
|
|
502
|
+
for (const o of r.dependencies ?? [])
|
|
499
503
|
o.registerStyles(t, n);
|
|
500
504
|
}
|
|
501
505
|
get diagnosticScope() {
|
|
502
506
|
var t;
|
|
503
507
|
return this.constructor.diagnosticScope ?? ((t = this._parentComponent) == null ? void 0 : t.diagnosticScope) ?? this._runtime.diagnosticScope;
|
|
504
508
|
}
|
|
505
|
-
|
|
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]() {
|
|
506
515
|
return {
|
|
507
516
|
kind: "component",
|
|
508
|
-
label:
|
|
517
|
+
label: R(this),
|
|
509
518
|
scope: this.diagnosticScope,
|
|
510
519
|
sources: [...this.watched.keys(), ...this.renderReadSubscriptions.keys()],
|
|
511
520
|
targets: [...this._childComponents]
|
|
@@ -519,25 +528,25 @@ const h = class h {
|
|
|
519
528
|
}
|
|
520
529
|
/** Render this component's configured custom host element. */
|
|
521
530
|
host(t = null, ...n) {
|
|
522
|
-
const i = this.constructor,
|
|
523
|
-
if (
|
|
531
|
+
const i = this.constructor, s = i.hostName;
|
|
532
|
+
if (s == null)
|
|
524
533
|
throw new Error(`${this.constructor.name} does not declare a custom host name`);
|
|
525
534
|
const {
|
|
526
|
-
class:
|
|
535
|
+
class: r,
|
|
527
536
|
className: o,
|
|
528
537
|
...a
|
|
529
|
-
} = t ?? {}, l = o ??
|
|
530
|
-
return
|
|
538
|
+
} = t ?? {}, l = o ?? r, f = this.props.island === !0 ? bt(l, "island") : l;
|
|
539
|
+
return x(this._runtime.resolveElementName(s), {
|
|
531
540
|
...a,
|
|
532
541
|
...f == null ? {} : { className: f },
|
|
533
|
-
"data-cap-component":
|
|
542
|
+
"data-cap-component": s,
|
|
534
543
|
...i.dataSurface == null ? {} : { "data-cap-surface": i.dataSurface }
|
|
535
544
|
}, ...n);
|
|
536
545
|
}
|
|
537
546
|
/** @internal Assign an immutable application runtime before initialization or mounting. */
|
|
538
547
|
_setRuntime(t) {
|
|
539
548
|
var n;
|
|
540
|
-
if (!(t instanceof
|
|
549
|
+
if (!(t instanceof K))
|
|
541
550
|
throw new TypeError("Component runtime must be a CapillaryUiRuntime");
|
|
542
551
|
if (t === this._runtime) return this;
|
|
543
552
|
if (this.initialized || this.mounted || this._rendered != null)
|
|
@@ -564,57 +573,66 @@ const h = class h {
|
|
|
564
573
|
if (this.destroyed) throw new Error("Cannot mount a destroyed component");
|
|
565
574
|
this.validateIslandAncestry(this.props);
|
|
566
575
|
let i = !1;
|
|
567
|
-
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 && (
|
|
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;
|
|
568
577
|
}
|
|
569
578
|
attachTo(t) {
|
|
570
579
|
return this.mount(t), this;
|
|
571
580
|
}
|
|
572
|
-
update(t) {
|
|
581
|
+
update(t, n = t instanceof X ? "dependency" : "explicit") {
|
|
573
582
|
if (this.destroyed) return this;
|
|
574
583
|
if (!this.mounted) return this.mount();
|
|
575
584
|
if (this.updating)
|
|
576
585
|
return this.updateRequested = !0, this;
|
|
577
586
|
this.updating = !0;
|
|
578
|
-
const
|
|
579
|
-
parent: t instanceof
|
|
587
|
+
const i = u.event(this, "consumer", {
|
|
588
|
+
parent: t instanceof X ? t : u.currentEvent,
|
|
580
589
|
cause: "component render",
|
|
581
|
-
outcome: "started"
|
|
582
|
-
|
|
590
|
+
outcome: "started",
|
|
591
|
+
consumer: { trigger: n }
|
|
592
|
+
}), s = g, r = i ? { count: 0 } : null;
|
|
593
|
+
let o = 0;
|
|
594
|
+
g = r;
|
|
583
595
|
try {
|
|
584
|
-
u.withEvent(
|
|
596
|
+
u.withEvent(i, () => {
|
|
585
597
|
do {
|
|
586
|
-
this.updateRequested = !1;
|
|
587
|
-
const
|
|
588
|
-
this.collectingRenderReads =
|
|
589
|
-
let
|
|
598
|
+
o += 1, this.updateRequested = !1;
|
|
599
|
+
const a = /* @__PURE__ */ new Set();
|
|
600
|
+
this.collectingRenderReads = a;
|
|
601
|
+
let l;
|
|
590
602
|
try {
|
|
591
|
-
|
|
603
|
+
l = u.withScope(this.diagnosticScope, () => j(this.render()));
|
|
592
604
|
} finally {
|
|
593
605
|
this.collectingRenderReads = null;
|
|
594
606
|
}
|
|
595
|
-
this._rendered =
|
|
607
|
+
this._rendered = Y(this._rendered, l, this), this.dom = Le(this._rendered), this.reconcileRenderReads(a), this.afterUpdate(this.dom);
|
|
596
608
|
} while (this.updateRequested && !this.destroyed);
|
|
597
|
-
}),
|
|
598
|
-
parent:
|
|
609
|
+
}), i && u.event(this, "consumer", {
|
|
610
|
+
parent: i,
|
|
599
611
|
cause: "component rendered",
|
|
600
|
-
outcome: "succeeded"
|
|
612
|
+
outcome: "succeeded",
|
|
613
|
+
consumer: { trigger: n, domWrites: r.count, renderPasses: o }
|
|
601
614
|
});
|
|
602
|
-
} catch (
|
|
603
|
-
throw
|
|
604
|
-
parent:
|
|
615
|
+
} catch (a) {
|
|
616
|
+
throw i && u.event(this, "consumer", {
|
|
617
|
+
parent: i,
|
|
605
618
|
cause: "component render failed",
|
|
606
619
|
outcome: "failed",
|
|
607
|
-
error:
|
|
608
|
-
|
|
620
|
+
error: a,
|
|
621
|
+
consumer: { trigger: n, domWrites: r.count, renderPasses: o }
|
|
622
|
+
}), a;
|
|
609
623
|
} finally {
|
|
610
|
-
this.updating = !1;
|
|
624
|
+
g = s, this.updating = !1;
|
|
611
625
|
}
|
|
612
626
|
return this;
|
|
613
627
|
}
|
|
614
628
|
setProps(t) {
|
|
629
|
+
var n, i;
|
|
615
630
|
if (t == null || typeof t != "object" || Array.isArray(t))
|
|
616
631
|
throw new TypeError(`${this.constructor.name} props must be an object`);
|
|
617
|
-
return this.validateIslandAncestry(t), this.props = t, this.mounted && this.update(
|
|
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;
|
|
618
636
|
}
|
|
619
637
|
afterMount(t) {
|
|
620
638
|
}
|
|
@@ -625,8 +643,8 @@ const h = class h {
|
|
|
625
643
|
if (n == null || typeof n.subscribe != "function")
|
|
626
644
|
throw new TypeError("watch requires emitter-like values");
|
|
627
645
|
if (this.watched.has(n)) continue;
|
|
628
|
-
const i = n.subscribe(({ event:
|
|
629
|
-
this.mounted && !this.destroyed && this.update(
|
|
646
|
+
const i = n.subscribe(({ event: s }) => {
|
|
647
|
+
this.mounted && !this.destroyed && this.update(s);
|
|
630
648
|
}, { emitCurrent: !1, diagnosticTarget: this });
|
|
631
649
|
this.watched.set(n, i), this.onCleanup(() => {
|
|
632
650
|
i(), this.watched.delete(n);
|
|
@@ -679,29 +697,60 @@ const h = class h {
|
|
|
679
697
|
capillaryUiMessage(t) {
|
|
680
698
|
return this.localization.message(t);
|
|
681
699
|
}
|
|
682
|
-
listen(t, n, i,
|
|
700
|
+
listen(t, n, i, s) {
|
|
683
701
|
if (t == null || typeof t.addEventListener != "function")
|
|
684
702
|
throw new TypeError("listen target must be an EventTarget");
|
|
685
|
-
const
|
|
686
|
-
u.configure(
|
|
703
|
+
const r = {};
|
|
704
|
+
u.configure(r, {
|
|
687
705
|
kind: "interaction",
|
|
688
|
-
label: `${
|
|
706
|
+
label: `${R(this)}: ${n}`,
|
|
689
707
|
scope: this.diagnosticScope
|
|
690
708
|
});
|
|
691
|
-
const o = (a) =>
|
|
692
|
-
|
|
709
|
+
const o = (a) => M(
|
|
710
|
+
r,
|
|
693
711
|
this.diagnosticScope,
|
|
694
712
|
a,
|
|
695
713
|
o,
|
|
696
714
|
n,
|
|
697
715
|
() => i(a)
|
|
698
716
|
);
|
|
699
|
-
return t.addEventListener(n, o,
|
|
700
|
-
t.removeEventListener(n, o,
|
|
717
|
+
return t.addEventListener(n, o, s), this.onCleanup(() => {
|
|
718
|
+
t.removeEventListener(n, o, s), u.dispose(r);
|
|
701
719
|
}), this;
|
|
702
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
|
+
}
|
|
703
752
|
registerChild(t) {
|
|
704
|
-
if (!(t instanceof
|
|
753
|
+
if (!(t instanceof m))
|
|
705
754
|
throw new TypeError("registerChild requires a Component");
|
|
706
755
|
return this._childComponents.add(t), u.active && u.inspect(this), t;
|
|
707
756
|
}
|
|
@@ -711,7 +760,7 @@ const h = class h {
|
|
|
711
760
|
for (const t of [...this.cleanupFunctions]) t();
|
|
712
761
|
this.cleanupFunctions.clear(), this.watched.clear();
|
|
713
762
|
for (const t of this.renderReadSubscriptions.values()) t();
|
|
714
|
-
this.renderReadSubscriptions.clear(), this.collectingRenderReads = null, this._rendered &&
|
|
763
|
+
this.renderReadSubscriptions.clear(), this.collectingRenderReads = null, this._rendered && E(this._rendered, !0), this._rendered = null, this.dom = null, this._childComponents.clear(), this.onDestroy();
|
|
715
764
|
}
|
|
716
765
|
}
|
|
717
766
|
validateRequiredServices() {
|
|
@@ -721,25 +770,25 @@ const h = class h {
|
|
|
721
770
|
throw new Error(`${t.name} requires unregistered service "${n.name}"`);
|
|
722
771
|
}
|
|
723
772
|
validateIslandAncestry(t) {
|
|
724
|
-
if (!
|
|
773
|
+
if (!V(t)) return;
|
|
725
774
|
if (this.hasIslandDescendant())
|
|
726
775
|
throw new Error("An island component cannot contain another island");
|
|
727
776
|
let n = this._parentComponent;
|
|
728
777
|
for (; n != null; ) {
|
|
729
|
-
if (
|
|
778
|
+
if (V(n.props))
|
|
730
779
|
throw new Error("An island component cannot be nested inside another island");
|
|
731
780
|
n = n._parentComponent;
|
|
732
781
|
}
|
|
733
782
|
}
|
|
734
783
|
hasIslandDescendant() {
|
|
735
784
|
for (const t of this._childComponents)
|
|
736
|
-
if (
|
|
785
|
+
if (V(t.props) || t.hasIslandDescendant()) return !0;
|
|
737
786
|
return !1;
|
|
738
787
|
}
|
|
739
788
|
onDestroy() {
|
|
740
789
|
}
|
|
741
790
|
trackRenderRead(t) {
|
|
742
|
-
if (
|
|
791
|
+
if (Q(t, "Component.read"), this.collectingRenderReads == null)
|
|
743
792
|
throw new Error("Component.read() and snapshot() may only be called during render()");
|
|
744
793
|
this.collectingRenderReads.add(t);
|
|
745
794
|
}
|
|
@@ -748,15 +797,15 @@ const h = class h {
|
|
|
748
797
|
t.has(n) || (i(), this.renderReadSubscriptions.delete(n));
|
|
749
798
|
for (const n of t) {
|
|
750
799
|
if (this.watched.has(n) || this.renderReadSubscriptions.has(n)) continue;
|
|
751
|
-
const i = n.subscribe(({ event:
|
|
752
|
-
this.mounted && !this.destroyed && this.update(
|
|
800
|
+
const i = n.subscribe(({ event: s }) => {
|
|
801
|
+
this.mounted && !this.destroyed && this.update(s);
|
|
753
802
|
}, { emitCurrent: !1, diagnosticTarget: this });
|
|
754
803
|
this.renderReadSubscriptions.set(n, i);
|
|
755
804
|
}
|
|
756
805
|
}
|
|
757
806
|
};
|
|
758
|
-
c(
|
|
759
|
-
c(
|
|
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`
|
|
760
809
|
.cap-fill-horizontal,
|
|
761
810
|
.cap-fill-vertical {
|
|
762
811
|
box-sizing: border-box;
|
|
@@ -787,6 +836,7 @@ c(h, "liveProps", []), c(h, "css", Je`
|
|
|
787
836
|
align-items: stretch;
|
|
788
837
|
min-inline-size: 0;
|
|
789
838
|
min-block-size: 0;
|
|
839
|
+
gap: calc(var(--_cap-island-flow, 0) * var(--island-gap, 0px));
|
|
790
840
|
}
|
|
791
841
|
|
|
792
842
|
.cap-layout-horizontal {
|
|
@@ -808,11 +858,55 @@ c(h, "liveProps", []), c(h, "css", Je`
|
|
|
808
858
|
}
|
|
809
859
|
|
|
810
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);
|
|
811
867
|
overflow: auto;
|
|
812
868
|
min-inline-size: 0;
|
|
813
869
|
min-block-size: 0;
|
|
814
870
|
}
|
|
815
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
|
+
|
|
816
910
|
.colored {
|
|
817
911
|
--colored-base-bg:
|
|
818
912
|
linear-gradient(
|
|
@@ -830,10 +924,12 @@ c(h, "liveProps", []), c(h, "css", Je`
|
|
|
830
924
|
|
|
831
925
|
.app-footer.island,
|
|
832
926
|
.island {
|
|
927
|
+
--_cap-island-flow: 0;
|
|
928
|
+
--_cap-island-separator-background: initial;
|
|
833
929
|
box-sizing: border-box;
|
|
834
930
|
min-width: 0;
|
|
835
931
|
min-height: 0;
|
|
836
|
-
margin: var(--island-margin);
|
|
932
|
+
margin: var(--_cap-island-margin, var(--island-margin));
|
|
837
933
|
padding: var(--island-padding);
|
|
838
934
|
background: var(--island-background);
|
|
839
935
|
border: var(--island-border);
|
|
@@ -843,36 +939,36 @@ c(h, "liveProps", []), c(h, "css", Je`
|
|
|
843
939
|
|
|
844
940
|
.cap-fill-horizontal.island,
|
|
845
941
|
.cap-fill-horizontal .island {
|
|
846
|
-
max-width: calc(100% - (2 * var(--island-margin)));
|
|
942
|
+
max-width: calc(100% - (2 * var(--_cap-island-margin, var(--island-margin))));
|
|
847
943
|
overflow-x: auto;
|
|
848
944
|
}
|
|
849
945
|
|
|
850
946
|
.cap-fill-vertical.island,
|
|
851
947
|
.cap-fill-vertical .island {
|
|
852
|
-
max-height: calc(100% - (2 * var(--island-margin)));
|
|
948
|
+
max-height: calc(100% - (2 * var(--_cap-island-margin, var(--island-margin))));
|
|
853
949
|
overflow-y: auto;
|
|
854
950
|
}
|
|
855
951
|
|
|
856
952
|
label[data-cap] {
|
|
857
953
|
user-select: none;
|
|
858
954
|
}
|
|
859
|
-
`), c(
|
|
860
|
-
c(
|
|
861
|
-
c(
|
|
862
|
-
c(
|
|
863
|
-
let
|
|
864
|
-
function
|
|
865
|
-
return Array.isArray(e) ?
|
|
866
|
-
}
|
|
867
|
-
function
|
|
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) {
|
|
868
964
|
const t = [], n = (i) => {
|
|
869
965
|
if (Array.isArray(i))
|
|
870
|
-
for (const
|
|
966
|
+
for (const s of i) n(s);
|
|
871
967
|
else i != null && typeof i != "boolean" && t.push(i);
|
|
872
968
|
};
|
|
873
969
|
return n(e), t;
|
|
874
970
|
}
|
|
875
|
-
function
|
|
971
|
+
function $(e, t) {
|
|
876
972
|
if (typeof e == "string" || typeof e == "number")
|
|
877
973
|
return {
|
|
878
974
|
kind: "text",
|
|
@@ -881,35 +977,35 @@ function O(e, t) {
|
|
|
881
977
|
node: document.createTextNode(String(e)),
|
|
882
978
|
owner: t
|
|
883
979
|
};
|
|
884
|
-
if (
|
|
885
|
-
const
|
|
980
|
+
if (q(e)) {
|
|
981
|
+
const r = document.createComment("cap-emitter-start"), o = document.createComment("cap-emitter-end"), a = e.get();
|
|
886
982
|
if (Object.is(a, e))
|
|
887
983
|
throw new TypeError("A Capillary UI emitter child cannot render itself");
|
|
888
984
|
const l = document.createDocumentFragment();
|
|
889
|
-
l.append(
|
|
890
|
-
const f =
|
|
891
|
-
|
|
985
|
+
l.append(r, o), h(), h();
|
|
986
|
+
const f = $(j(a), t);
|
|
987
|
+
J(l, f, o);
|
|
892
988
|
const p = {
|
|
893
989
|
kind: "emitter",
|
|
894
990
|
key: null,
|
|
895
991
|
source: e,
|
|
896
|
-
start:
|
|
992
|
+
start: r,
|
|
897
993
|
end: o,
|
|
898
994
|
child: f,
|
|
899
995
|
unsubscribe: () => {
|
|
900
996
|
},
|
|
901
997
|
owner: t
|
|
902
998
|
};
|
|
903
|
-
return p.unsubscribe =
|
|
999
|
+
return p.unsubscribe = F(e, p, t, "reactive child", (y) => {
|
|
904
1000
|
if (Object.is(y, e))
|
|
905
1001
|
throw new TypeError("A Capillary UI emitter child cannot render itself");
|
|
906
|
-
p.child =
|
|
1002
|
+
p.child = Y(p.child, j(y), t);
|
|
907
1003
|
}), p;
|
|
908
1004
|
}
|
|
909
|
-
if (e instanceof
|
|
1005
|
+
if (e instanceof w)
|
|
910
1006
|
return e._setRuntime(t._runtime), e._setRouteContext(t._routeContextForChildren()), e._setParentComponent(t), e.mount(), t.registerChild(e), {
|
|
911
1007
|
kind: "component",
|
|
912
|
-
key:
|
|
1008
|
+
key: Te(e.props),
|
|
913
1009
|
type: e.constructor,
|
|
914
1010
|
instance: e,
|
|
915
1011
|
prebuilt: !0,
|
|
@@ -917,34 +1013,34 @@ function O(e, t) {
|
|
|
917
1013
|
liveProps: /* @__PURE__ */ new Map(),
|
|
918
1014
|
owner: t
|
|
919
1015
|
};
|
|
920
|
-
if (!
|
|
921
|
-
throw new TypeError(`Invalid Capillary UI child: ${
|
|
922
|
-
const { type: n, key: i = null, props:
|
|
923
|
-
if (n ===
|
|
924
|
-
const
|
|
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 = {
|
|
925
1021
|
kind: "fragment",
|
|
926
1022
|
key: i,
|
|
927
1023
|
type: n,
|
|
928
|
-
start:
|
|
1024
|
+
start: r,
|
|
929
1025
|
end: o,
|
|
930
1026
|
children: [],
|
|
931
1027
|
owner: t
|
|
932
1028
|
}, l = document.createDocumentFragment();
|
|
933
|
-
return l.append(
|
|
1029
|
+
return l.append(r, o), h(), h(), a.children = I(
|
|
934
1030
|
l,
|
|
935
1031
|
[],
|
|
936
|
-
|
|
1032
|
+
s.children,
|
|
937
1033
|
t,
|
|
938
1034
|
o,
|
|
939
|
-
|
|
1035
|
+
r
|
|
940
1036
|
), a;
|
|
941
1037
|
}
|
|
942
1038
|
if (typeof n == "string") {
|
|
943
|
-
const
|
|
1039
|
+
const r = document.createElement(n), o = {
|
|
944
1040
|
kind: "element",
|
|
945
1041
|
key: i,
|
|
946
1042
|
type: n,
|
|
947
|
-
node:
|
|
1043
|
+
node: r,
|
|
948
1044
|
props: {},
|
|
949
1045
|
listeners: /* @__PURE__ */ new Map(),
|
|
950
1046
|
liveProps: /* @__PURE__ */ new Map(),
|
|
@@ -953,12 +1049,12 @@ function O(e, t) {
|
|
|
953
1049
|
children: [],
|
|
954
1050
|
owner: t
|
|
955
1051
|
};
|
|
956
|
-
return
|
|
1052
|
+
return Ce(o, s), o.children = I(r, [], s.children, t), o;
|
|
957
1053
|
}
|
|
958
|
-
if (
|
|
959
|
-
const
|
|
960
|
-
|
|
961
|
-
const o =
|
|
1054
|
+
if (Pe(n)) {
|
|
1055
|
+
const r = s;
|
|
1056
|
+
ve(n, r);
|
|
1057
|
+
const o = ie(r), a = u.withScope(
|
|
962
1058
|
n.diagnosticScope ?? t.diagnosticScope,
|
|
963
1059
|
() => new n(o)
|
|
964
1060
|
);
|
|
@@ -973,20 +1069,20 @@ function O(e, t) {
|
|
|
973
1069
|
liveProps: /* @__PURE__ */ new Map(),
|
|
974
1070
|
owner: t
|
|
975
1071
|
};
|
|
976
|
-
return
|
|
1072
|
+
return Se(l, r), a.mount(), t.registerChild(a), l;
|
|
977
1073
|
}
|
|
978
1074
|
if (typeof n == "function") {
|
|
979
|
-
const
|
|
1075
|
+
const r = n, o = s, a = ie(o), l = r === Reflect.get(t, "Host") ? null : {};
|
|
980
1076
|
l && u.configure(l, {
|
|
981
1077
|
kind: "component",
|
|
982
|
-
label: String(Reflect.get(
|
|
1078
|
+
label: String(Reflect.get(r, "diagnosticLabel") ?? r.name ?? "Function component"),
|
|
983
1079
|
scope: t.diagnosticScope,
|
|
984
1080
|
sources: [t]
|
|
985
1081
|
});
|
|
986
|
-
const f =
|
|
1082
|
+
const f = Ee(l, () => $(j(r(a)), t)), p = {
|
|
987
1083
|
kind: "function",
|
|
988
1084
|
key: i,
|
|
989
|
-
type:
|
|
1085
|
+
type: r,
|
|
990
1086
|
props: a,
|
|
991
1087
|
sourceProps: o,
|
|
992
1088
|
liveProps: /* @__PURE__ */ new Map(),
|
|
@@ -994,190 +1090,193 @@ function O(e, t) {
|
|
|
994
1090
|
diagnosticSubject: l,
|
|
995
1091
|
owner: t
|
|
996
1092
|
};
|
|
997
|
-
return
|
|
1093
|
+
return nt(p), p;
|
|
998
1094
|
}
|
|
999
|
-
throw new TypeError(`Unsupported vnode type: ${
|
|
1095
|
+
throw new TypeError(`Unsupported vnode type: ${ae(n)}`);
|
|
1000
1096
|
}
|
|
1001
|
-
function
|
|
1002
|
-
if (e == null) return
|
|
1003
|
-
if (
|
|
1004
|
-
const i =
|
|
1005
|
-
return
|
|
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;
|
|
1006
1102
|
}
|
|
1007
|
-
function
|
|
1008
|
-
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" ? (!
|
|
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(
|
|
1009
1105
|
e.start.parentNode,
|
|
1010
1106
|
e.children,
|
|
1011
1107
|
t.props.children,
|
|
1012
1108
|
n,
|
|
1013
1109
|
e.end,
|
|
1014
1110
|
e.start
|
|
1015
|
-
), e) : (
|
|
1111
|
+
), e) : (Ce(e, t.props), e.children = I(
|
|
1016
1112
|
e.node,
|
|
1017
1113
|
e.children,
|
|
1018
1114
|
t.props.children,
|
|
1019
1115
|
n
|
|
1020
1116
|
), e) : e;
|
|
1021
1117
|
}
|
|
1022
|
-
function
|
|
1118
|
+
function ie(e) {
|
|
1023
1119
|
return Object.fromEntries(Object.entries(e).map(([t, n]) => [
|
|
1024
1120
|
t,
|
|
1025
|
-
|
|
1121
|
+
T(n) ? n.emitter.get() : n
|
|
1026
1122
|
]));
|
|
1027
1123
|
}
|
|
1028
|
-
function
|
|
1029
|
-
|
|
1124
|
+
function Se(e, t) {
|
|
1125
|
+
Z(e.liveProps, t, e.instance, R(e.instance), (n, i) => {
|
|
1030
1126
|
e.props = { ...e.props, [n]: i }, e.instance.setProps(e.props);
|
|
1031
|
-
}), e.props =
|
|
1127
|
+
}), e.props = G(e.liveProps, t), e.instance.setProps(e.props);
|
|
1032
1128
|
}
|
|
1033
|
-
function
|
|
1034
|
-
|
|
1129
|
+
function tt(e, t) {
|
|
1130
|
+
ve(e.type, t), Se(e, t);
|
|
1035
1131
|
}
|
|
1036
|
-
function
|
|
1132
|
+
function ve(e, t) {
|
|
1037
1133
|
const n = Reflect.get(e, "liveProps");
|
|
1038
1134
|
if (n == null) return;
|
|
1039
|
-
if (!Array.isArray(n) || n.some((
|
|
1135
|
+
if (!Array.isArray(n) || n.some((s) => typeof s != "string"))
|
|
1040
1136
|
throw new TypeError(`${e.name || "Component"}.liveProps must be an array`);
|
|
1041
1137
|
const i = new Set(n);
|
|
1042
|
-
for (const [
|
|
1043
|
-
if (
|
|
1138
|
+
for (const [s, r] of Object.entries(t))
|
|
1139
|
+
if (T(r) && !i.has(s))
|
|
1044
1140
|
throw new TypeError(
|
|
1045
|
-
`${e.name || "Component"} prop "${
|
|
1141
|
+
`${e.name || "Component"} prop "${s}" does not support live()`
|
|
1046
1142
|
);
|
|
1047
1143
|
}
|
|
1048
|
-
function
|
|
1049
|
-
|
|
1050
|
-
e.props = { ...e.props, [t]: n },
|
|
1051
|
-
}), e.props =
|
|
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);
|
|
1052
1148
|
}
|
|
1053
|
-
function
|
|
1054
|
-
e.sourceProps = t,
|
|
1055
|
-
e.props = { ...e.props, [n]: i },
|
|
1056
|
-
}), e.props =
|
|
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);
|
|
1057
1153
|
}
|
|
1058
|
-
function
|
|
1059
|
-
|
|
1060
|
-
const
|
|
1061
|
-
e.child =
|
|
1062
|
-
});
|
|
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);
|
|
1063
1159
|
}
|
|
1064
|
-
function
|
|
1160
|
+
function Ee(e, t, n = "parent") {
|
|
1065
1161
|
if (!e) return t();
|
|
1066
|
-
const
|
|
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;
|
|
1067
1164
|
try {
|
|
1068
|
-
const
|
|
1069
|
-
return
|
|
1070
|
-
} catch (
|
|
1071
|
-
throw
|
|
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;
|
|
1072
1171
|
}
|
|
1073
1172
|
}
|
|
1074
|
-
function
|
|
1075
|
-
for (const [
|
|
1076
|
-
const a = t[
|
|
1077
|
-
|
|
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));
|
|
1078
1177
|
}
|
|
1079
|
-
for (const [
|
|
1080
|
-
if (!
|
|
1178
|
+
for (const [r, o] of Object.entries(t)) {
|
|
1179
|
+
if (!T(o) || e.has(r)) continue;
|
|
1081
1180
|
const a = {
|
|
1082
1181
|
source: o.emitter,
|
|
1083
1182
|
value: o.emitter.get(),
|
|
1084
1183
|
unsubscribe: () => {
|
|
1085
1184
|
}
|
|
1086
1185
|
};
|
|
1087
|
-
a.unsubscribe =
|
|
1088
|
-
e.get(
|
|
1089
|
-
}), e.set(
|
|
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);
|
|
1090
1189
|
}
|
|
1091
1190
|
}
|
|
1092
|
-
function
|
|
1191
|
+
function G(e, t) {
|
|
1093
1192
|
return Object.fromEntries(Object.entries(t).map(([n, i]) => {
|
|
1094
|
-
var
|
|
1193
|
+
var s;
|
|
1095
1194
|
return [
|
|
1096
1195
|
n,
|
|
1097
|
-
|
|
1196
|
+
T(i) ? ((s = e.get(n)) == null ? void 0 : s.value) ?? i.emitter.get() : i
|
|
1098
1197
|
];
|
|
1099
1198
|
}));
|
|
1100
1199
|
}
|
|
1101
|
-
function
|
|
1200
|
+
function I(e, t, n, i, s = null, r = null) {
|
|
1102
1201
|
if (e == null) throw new Error("Cannot patch a detached fragment range");
|
|
1103
|
-
const o =
|
|
1202
|
+
const o = be(n), a = /* @__PURE__ */ new Map(), l = [];
|
|
1104
1203
|
for (const d of t)
|
|
1105
1204
|
d.key == null ? l.push(d) : a.has(d.key) || a.set(d.key, d);
|
|
1106
1205
|
const f = /* @__PURE__ */ new Set(), p = /* @__PURE__ */ new Set(), y = [];
|
|
1107
|
-
let
|
|
1206
|
+
let je = 0;
|
|
1108
1207
|
for (const d of o) {
|
|
1109
|
-
const
|
|
1110
|
-
if (
|
|
1111
|
-
if (f.has(
|
|
1112
|
-
f.add(
|
|
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);
|
|
1113
1212
|
}
|
|
1114
|
-
const
|
|
1115
|
-
|
|
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));
|
|
1116
1215
|
}
|
|
1117
1216
|
for (const d of t)
|
|
1118
|
-
p.has(d) ||
|
|
1119
|
-
let
|
|
1217
|
+
p.has(d) || E(d, !0);
|
|
1218
|
+
let O = r ? r.nextSibling : e.firstChild;
|
|
1120
1219
|
for (const d of y)
|
|
1121
|
-
for (const
|
|
1122
|
-
|
|
1220
|
+
for (const b of C(d))
|
|
1221
|
+
b === O ? O = O.nextSibling : (e.insertBefore(b, O ?? s), h(), O = b.nextSibling);
|
|
1123
1222
|
return y;
|
|
1124
1223
|
}
|
|
1125
|
-
function
|
|
1224
|
+
function Ce(e, t) {
|
|
1126
1225
|
const n = Object.fromEntries(Object.entries(t).filter(
|
|
1127
|
-
([
|
|
1128
|
-
)), i = e.props,
|
|
1129
|
-
for (const
|
|
1130
|
-
if (Object.hasOwn(n,
|
|
1131
|
-
throw new Error(`${
|
|
1132
|
-
for (const
|
|
1133
|
-
const o = i[
|
|
1134
|
-
if (
|
|
1135
|
-
|
|
1136
|
-
else if (
|
|
1137
|
-
o !== a &&
|
|
1138
|
-
else if (
|
|
1139
|
-
|
|
1140
|
-
else if (
|
|
1141
|
-
|
|
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);
|
|
1142
1241
|
else {
|
|
1143
|
-
const l = e.liveProps.get(
|
|
1144
|
-
l && (l.unsubscribe(), e.liveProps.delete(
|
|
1242
|
+
const l = e.liveProps.get(r);
|
|
1243
|
+
l && (l.unsubscribe(), e.liveProps.delete(r));
|
|
1145
1244
|
const f = (l == null ? void 0 : l.value) ?? o;
|
|
1146
|
-
Object.is(f, a) ||
|
|
1245
|
+
Object.is(f, a) || L(e.node, r, f, a);
|
|
1147
1246
|
}
|
|
1148
1247
|
}
|
|
1149
|
-
e.node
|
|
1248
|
+
v(e.node, ne, ""), e.props = { ...n };
|
|
1150
1249
|
}
|
|
1151
|
-
function
|
|
1250
|
+
function rt(e, t, n) {
|
|
1152
1251
|
const i = e.liveProps.get(t);
|
|
1153
1252
|
if ((i == null ? void 0 : i.source) === n.emitter) return;
|
|
1154
1253
|
i == null || i.unsubscribe();
|
|
1155
|
-
const
|
|
1156
|
-
|
|
1157
|
-
const
|
|
1254
|
+
const s = n.emitter.get();
|
|
1255
|
+
L(e.node, t, (i == null ? void 0 : i.value) ?? e.props[t], s);
|
|
1256
|
+
const r = {
|
|
1158
1257
|
source: n.emitter,
|
|
1159
|
-
value:
|
|
1258
|
+
value: s,
|
|
1160
1259
|
unsubscribe: () => {
|
|
1161
1260
|
}
|
|
1162
1261
|
};
|
|
1163
|
-
|
|
1164
|
-
const a =
|
|
1165
|
-
|
|
1166
|
-
}), e.liveProps.set(t,
|
|
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);
|
|
1167
1266
|
}
|
|
1168
|
-
function
|
|
1169
|
-
const i = t.slice(5),
|
|
1267
|
+
function st(e, t, n) {
|
|
1268
|
+
const i = t.slice(5), s = e.nativeBindings.get(t);
|
|
1170
1269
|
if (n == null) {
|
|
1171
|
-
|
|
1270
|
+
s && (s.unsubscribe(), e.node.removeEventListener(s.eventName, s.listener), e.nativeBindings.delete(t), L(e.node, i, s.value, void 0));
|
|
1172
1271
|
return;
|
|
1173
1272
|
}
|
|
1174
|
-
if (
|
|
1175
|
-
|
|
1176
|
-
const
|
|
1177
|
-
|
|
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);
|
|
1178
1277
|
const a = (f) => {
|
|
1179
|
-
|
|
1180
|
-
|
|
1278
|
+
M(
|
|
1279
|
+
Re(e, r),
|
|
1181
1280
|
e.owner.diagnosticScope,
|
|
1182
1281
|
f,
|
|
1183
1282
|
a,
|
|
@@ -1187,175 +1286,192 @@ function nt(e, t, n) {
|
|
|
1187
1286
|
}, l = {
|
|
1188
1287
|
source: n,
|
|
1189
1288
|
value: o,
|
|
1190
|
-
eventName:
|
|
1289
|
+
eventName: r,
|
|
1191
1290
|
listener: a,
|
|
1192
1291
|
unsubscribe: () => {
|
|
1193
1292
|
}
|
|
1194
1293
|
};
|
|
1195
|
-
l.unsubscribe =
|
|
1294
|
+
l.unsubscribe = F(n, l, e.owner, `${e.type}.${t}`, (f) => {
|
|
1196
1295
|
const p = l.value;
|
|
1197
|
-
l.value = f, Object.is(p, f) ||
|
|
1198
|
-
}), e.node.addEventListener(
|
|
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);
|
|
1199
1298
|
}
|
|
1200
|
-
function
|
|
1201
|
-
const i = t.slice(2).toLowerCase(),
|
|
1202
|
-
if (
|
|
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")
|
|
1203
1302
|
throw new TypeError(`${t} must be a function or null`);
|
|
1204
|
-
if (typeof n == "function" &&
|
|
1205
|
-
const o = (a) =>
|
|
1206
|
-
|
|
1303
|
+
if (typeof n == "function" && r !== n) {
|
|
1304
|
+
const o = (a) => M(
|
|
1305
|
+
Re(e, i),
|
|
1207
1306
|
e.owner.diagnosticScope,
|
|
1208
1307
|
a,
|
|
1209
1308
|
o,
|
|
1210
1309
|
i,
|
|
1211
1310
|
() => n.call(e.node, a)
|
|
1212
1311
|
);
|
|
1213
|
-
|
|
1312
|
+
se.set(o, n), e.node.addEventListener(i, o), e.listeners.set(t, o);
|
|
1214
1313
|
}
|
|
1215
1314
|
}
|
|
1216
|
-
const
|
|
1217
|
-
function
|
|
1315
|
+
const re = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap();
|
|
1316
|
+
function M(e, t, n, i, s, r) {
|
|
1218
1317
|
return u.withScope(t, () => {
|
|
1219
|
-
if (!u.active) return
|
|
1220
|
-
let o =
|
|
1221
|
-
return (!o || o.listeners.has(i)) && (o = { event: u.event(e, "interaction", { cause:
|
|
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);
|
|
1222
1321
|
});
|
|
1223
1322
|
}
|
|
1224
|
-
function
|
|
1225
|
-
var
|
|
1226
|
-
let n =
|
|
1227
|
-
n || (n = /* @__PURE__ */ new Map(),
|
|
1323
|
+
function Re(e, t) {
|
|
1324
|
+
var s;
|
|
1325
|
+
let n = re.get(e);
|
|
1326
|
+
n || (n = /* @__PURE__ */ new Map(), re.set(e, n));
|
|
1228
1327
|
let i = n.get(t);
|
|
1229
1328
|
if (!i) {
|
|
1230
1329
|
i = {};
|
|
1231
|
-
const
|
|
1330
|
+
const r = e.node.getAttribute("aria-label") ?? e.node.getAttribute("name") ?? ((s = e.node.textContent) == null ? void 0 : s.trim().slice(0, 80)) ?? "";
|
|
1232
1331
|
u.configure(i, {
|
|
1233
1332
|
kind: "interaction",
|
|
1234
|
-
label: `${
|
|
1333
|
+
label: `${R(e.owner)}: ${e.type} ${r} ${t}`.trim(),
|
|
1235
1334
|
scope: e.owner.diagnosticScope
|
|
1236
1335
|
}), n.set(t, i);
|
|
1237
1336
|
}
|
|
1238
1337
|
return i;
|
|
1239
1338
|
}
|
|
1240
|
-
function
|
|
1339
|
+
function F(e, t, n, i, s) {
|
|
1241
1340
|
u.configure(t, {
|
|
1242
1341
|
kind: "binding",
|
|
1243
|
-
label: `${
|
|
1342
|
+
label: `${R(n)}: ${i}`,
|
|
1244
1343
|
scope: n.diagnosticScope,
|
|
1245
1344
|
sources: [e]
|
|
1246
1345
|
});
|
|
1247
|
-
const
|
|
1346
|
+
const r = e.subscribe(({ value: o, event: a }) => {
|
|
1248
1347
|
const l = u.event(t, "consumer", {
|
|
1249
1348
|
parent: a,
|
|
1250
1349
|
cause: "binding update",
|
|
1251
1350
|
value: o,
|
|
1252
|
-
outcome: "started"
|
|
1253
|
-
|
|
1351
|
+
outcome: "started",
|
|
1352
|
+
consumer: { trigger: "dependency" }
|
|
1353
|
+
}), f = g, p = l ? { count: 0 } : null;
|
|
1354
|
+
g = p;
|
|
1254
1355
|
try {
|
|
1255
|
-
u.withEvent(l, () =>
|
|
1356
|
+
u.withEvent(l, () => s(o)), l && u.event(t, "consumer", {
|
|
1256
1357
|
parent: l,
|
|
1257
1358
|
cause: "binding updated",
|
|
1258
1359
|
value: o,
|
|
1259
|
-
outcome: "succeeded"
|
|
1360
|
+
outcome: "succeeded",
|
|
1361
|
+
consumer: { trigger: "dependency", domWrites: p.count }
|
|
1260
1362
|
});
|
|
1261
|
-
} catch (
|
|
1363
|
+
} catch (y) {
|
|
1262
1364
|
throw l && u.event(t, "consumer", {
|
|
1263
1365
|
parent: l,
|
|
1264
1366
|
cause: "binding update failed",
|
|
1265
1367
|
outcome: "failed",
|
|
1266
|
-
error:
|
|
1267
|
-
|
|
1368
|
+
error: y,
|
|
1369
|
+
consumer: { trigger: "dependency", domWrites: p.count }
|
|
1370
|
+
}), y;
|
|
1371
|
+
} finally {
|
|
1372
|
+
g = f;
|
|
1268
1373
|
}
|
|
1269
1374
|
}, { emitCurrent: !1, diagnosticTarget: t });
|
|
1270
1375
|
return () => {
|
|
1271
|
-
|
|
1376
|
+
r(), u.dispose(t);
|
|
1272
1377
|
};
|
|
1273
1378
|
}
|
|
1274
|
-
function
|
|
1275
|
-
|
|
1276
|
-
return t.diagnosticLabel ?? t.hostName ?? t.name;
|
|
1379
|
+
function R(e) {
|
|
1380
|
+
return e.diagnosticLabel;
|
|
1277
1381
|
}
|
|
1278
|
-
function
|
|
1279
|
-
if (
|
|
1382
|
+
function at(e, t) {
|
|
1383
|
+
if (H(e.ref, null), t != null && typeof t != "function" && typeof t != "object")
|
|
1280
1384
|
throw new TypeError("ref must be a function, object, or null");
|
|
1281
|
-
e.ref = t,
|
|
1385
|
+
e.ref = t, H(e.ref, e.node);
|
|
1282
1386
|
}
|
|
1283
|
-
function
|
|
1387
|
+
function L(e, t, n, i) {
|
|
1284
1388
|
if (t === "class" || t === "className") {
|
|
1285
|
-
|
|
1389
|
+
v(e, "class", i);
|
|
1286
1390
|
return;
|
|
1287
1391
|
}
|
|
1288
1392
|
if (t === "for" || t === "htmlFor") {
|
|
1289
|
-
|
|
1393
|
+
v(e, "for", i);
|
|
1290
1394
|
return;
|
|
1291
1395
|
}
|
|
1292
1396
|
if (t === "dataset") {
|
|
1293
|
-
|
|
1397
|
+
lt(e, n, i);
|
|
1294
1398
|
return;
|
|
1295
1399
|
}
|
|
1296
1400
|
if (t === "style") {
|
|
1297
|
-
|
|
1401
|
+
ct(e, n, i);
|
|
1298
1402
|
return;
|
|
1299
1403
|
}
|
|
1300
1404
|
if (t === "dangerouslySetInnerHTML")
|
|
1301
1405
|
throw new Error("dangerouslySetInnerHTML is not supported");
|
|
1302
|
-
const
|
|
1303
|
-
if (
|
|
1304
|
-
const
|
|
1305
|
-
|
|
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);
|
|
1306
1414
|
return;
|
|
1307
1415
|
}
|
|
1308
|
-
if (
|
|
1309
|
-
const
|
|
1310
|
-
Object.is(Reflect.get(e,
|
|
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);
|
|
1311
1419
|
return;
|
|
1312
1420
|
}
|
|
1313
|
-
|
|
1421
|
+
v(e, P(t), i);
|
|
1314
1422
|
}
|
|
1315
|
-
function
|
|
1316
|
-
const i =
|
|
1317
|
-
for (const
|
|
1318
|
-
const o = r
|
|
1319
|
-
o == null ? delete e.dataset[
|
|
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());
|
|
1320
1428
|
}
|
|
1321
1429
|
}
|
|
1322
|
-
function
|
|
1430
|
+
function ct(e, t, n) {
|
|
1323
1431
|
if (typeof n == "string") {
|
|
1324
|
-
e.style.cssText = n;
|
|
1432
|
+
e.style.cssText !== n && (e.style.cssText = n, h());
|
|
1325
1433
|
return;
|
|
1326
1434
|
}
|
|
1327
|
-
const i = typeof t == "string" ? {} :
|
|
1328
|
-
typeof t == "string" && (e.style.cssText = "");
|
|
1329
|
-
for (const
|
|
1330
|
-
const o = r
|
|
1331
|
-
|
|
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();
|
|
1332
1447
|
}
|
|
1333
1448
|
}
|
|
1334
|
-
function
|
|
1449
|
+
function U(e, t) {
|
|
1335
1450
|
if (e == null) return {};
|
|
1336
1451
|
if (typeof e != "object" || Array.isArray(e))
|
|
1337
1452
|
throw new TypeError(`${t} must be an object or null`);
|
|
1338
1453
|
return e;
|
|
1339
1454
|
}
|
|
1340
|
-
function
|
|
1341
|
-
n == null || n === !1 ?
|
|
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());
|
|
1342
1458
|
}
|
|
1343
|
-
function
|
|
1459
|
+
function ut(e) {
|
|
1344
1460
|
return e === "readonly" ? "readOnly" : e === "autofocus" ? "autoFocus" : e;
|
|
1345
1461
|
}
|
|
1346
|
-
function
|
|
1347
|
-
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) ?
|
|
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()}`);
|
|
1348
1464
|
}
|
|
1349
|
-
function
|
|
1465
|
+
function oe(e) {
|
|
1350
1466
|
return e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`);
|
|
1351
1467
|
}
|
|
1352
|
-
function
|
|
1468
|
+
function H(e, t) {
|
|
1353
1469
|
e != null && (typeof e == "function" ? e(t) : e.current = t);
|
|
1354
1470
|
}
|
|
1355
|
-
function
|
|
1471
|
+
function E(e, t) {
|
|
1356
1472
|
if (e.kind === "emitter") {
|
|
1357
|
-
if (e.unsubscribe(),
|
|
1358
|
-
for (const n of
|
|
1473
|
+
if (e.unsubscribe(), E(e.child, !1), t)
|
|
1474
|
+
for (const n of C(e)) k(n);
|
|
1359
1475
|
return;
|
|
1360
1476
|
}
|
|
1361
1477
|
if (e.kind === "component") {
|
|
@@ -1365,11 +1481,11 @@ function w(e, t) {
|
|
|
1365
1481
|
}
|
|
1366
1482
|
if (e.kind === "function") {
|
|
1367
1483
|
for (const n of e.liveProps.values()) n.unsubscribe();
|
|
1368
|
-
e.liveProps.clear(), e.diagnosticSubject && u.dispose(e.diagnosticSubject),
|
|
1484
|
+
e.liveProps.clear(), e.diagnosticSubject && u.dispose(e.diagnosticSubject), E(e.child, t);
|
|
1369
1485
|
return;
|
|
1370
1486
|
}
|
|
1371
1487
|
if (e.kind === "element") {
|
|
1372
|
-
|
|
1488
|
+
H(e.ref, null);
|
|
1373
1489
|
for (const [n, i] of e.listeners)
|
|
1374
1490
|
e.node.removeEventListener(n.slice(2).toLowerCase(), i);
|
|
1375
1491
|
e.listeners.clear();
|
|
@@ -1378,134 +1494,138 @@ function w(e, t) {
|
|
|
1378
1494
|
for (const n of e.nativeBindings.values())
|
|
1379
1495
|
n.unsubscribe(), e.node.removeEventListener(n.eventName, n.listener);
|
|
1380
1496
|
e.nativeBindings.clear();
|
|
1381
|
-
for (const n of e.children)
|
|
1382
|
-
t && e.node
|
|
1497
|
+
for (const n of e.children) E(n, !1);
|
|
1498
|
+
t && k(e.node);
|
|
1383
1499
|
return;
|
|
1384
1500
|
}
|
|
1385
1501
|
if (e.kind === "fragment") {
|
|
1386
|
-
for (const n of e.children)
|
|
1502
|
+
for (const n of e.children) E(n, !1);
|
|
1387
1503
|
if (t)
|
|
1388
|
-
for (const n of
|
|
1504
|
+
for (const n of C(e)) k(n);
|
|
1389
1505
|
return;
|
|
1390
1506
|
}
|
|
1391
|
-
t && e.node
|
|
1507
|
+
t && k(e.node);
|
|
1508
|
+
}
|
|
1509
|
+
function k(e) {
|
|
1510
|
+
e.parentNode && (e.remove(), h());
|
|
1392
1511
|
}
|
|
1393
|
-
function
|
|
1512
|
+
function J(e, t, n = null) {
|
|
1394
1513
|
if (t != null)
|
|
1395
|
-
for (const i of
|
|
1514
|
+
for (const i of C(t))
|
|
1515
|
+
i.parentNode === e && i.nextSibling === n || (e.insertBefore(i, n), h());
|
|
1396
1516
|
}
|
|
1397
|
-
function
|
|
1517
|
+
function C(e) {
|
|
1398
1518
|
if (e == null) return [];
|
|
1399
1519
|
if (e.kind === "text" || e.kind === "element") return [e.node];
|
|
1400
|
-
if (e.kind === "component") return
|
|
1401
|
-
if (e.kind === "function") return
|
|
1520
|
+
if (e.kind === "component") return C(e.instance._rendered);
|
|
1521
|
+
if (e.kind === "function") return C(e.child);
|
|
1402
1522
|
const t = [];
|
|
1403
1523
|
let n = e.start;
|
|
1404
1524
|
for (; n && (t.push(n), n !== e.end); )
|
|
1405
1525
|
n = n.nextSibling;
|
|
1406
1526
|
return t;
|
|
1407
1527
|
}
|
|
1408
|
-
function
|
|
1409
|
-
return
|
|
1528
|
+
function Le(e) {
|
|
1529
|
+
return C(e)[0] ?? null;
|
|
1410
1530
|
}
|
|
1411
|
-
function
|
|
1412
|
-
return e instanceof
|
|
1531
|
+
function _(e) {
|
|
1532
|
+
return e instanceof w ? Te(e.props) : S(e) ? e.key : null;
|
|
1413
1533
|
}
|
|
1414
|
-
function
|
|
1534
|
+
function Te(e) {
|
|
1415
1535
|
const t = e.key;
|
|
1416
1536
|
return typeof t == "string" || typeof t == "number" ? t : null;
|
|
1417
1537
|
}
|
|
1418
|
-
function
|
|
1419
|
-
return e.kind === "text" ? typeof t == "string" || typeof t == "number" : e.kind === "emitter" ?
|
|
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);
|
|
1420
1540
|
}
|
|
1421
|
-
function
|
|
1541
|
+
function S(e) {
|
|
1422
1542
|
return e != null && typeof e == "object" && Object.hasOwn(e, "type");
|
|
1423
1543
|
}
|
|
1424
|
-
function
|
|
1425
|
-
return typeof e == "function" && (e ===
|
|
1544
|
+
function Pe(e) {
|
|
1545
|
+
return typeof e == "function" && (e === w || e.prototype instanceof w);
|
|
1426
1546
|
}
|
|
1427
|
-
function
|
|
1547
|
+
function ft(e) {
|
|
1428
1548
|
return /^on[A-Z]/.test(e);
|
|
1429
1549
|
}
|
|
1430
|
-
function
|
|
1550
|
+
function pt(e) {
|
|
1431
1551
|
return e === "bind:value" || e === "bind:checked";
|
|
1432
1552
|
}
|
|
1433
|
-
function
|
|
1434
|
-
return e != null && typeof e == "object" &&
|
|
1553
|
+
function T(e) {
|
|
1554
|
+
return e != null && typeof e == "object" && ye.has(e);
|
|
1435
1555
|
}
|
|
1436
|
-
function
|
|
1556
|
+
function q(e) {
|
|
1437
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";
|
|
1438
1558
|
}
|
|
1439
|
-
function
|
|
1440
|
-
if (!
|
|
1559
|
+
function Q(e, t) {
|
|
1560
|
+
if (!q(e)) throw new TypeError(`${t} requires a readable emitter`);
|
|
1441
1561
|
}
|
|
1442
|
-
function
|
|
1443
|
-
if (
|
|
1562
|
+
function dt(e, t) {
|
|
1563
|
+
if (Q(e, t), typeof Reflect.get(e, "set") != "function")
|
|
1444
1564
|
throw new TypeError(`${t} requires a writable emitter`);
|
|
1445
1565
|
}
|
|
1446
|
-
function
|
|
1566
|
+
function ht(e, t) {
|
|
1447
1567
|
const n = e.localName;
|
|
1448
1568
|
if (!(t === "checked" ? n === "input" : n === "input" || n === "textarea" || n === "select")) throw new TypeError(`bind:${t} is not supported on ${n}`);
|
|
1449
1569
|
}
|
|
1450
|
-
function
|
|
1570
|
+
function mt(e, t) {
|
|
1451
1571
|
return t === "value" && e.localName !== "select" ? "input" : "change";
|
|
1452
1572
|
}
|
|
1453
|
-
function
|
|
1573
|
+
function gt(e) {
|
|
1454
1574
|
if (e == null || typeof e != "object" && typeof e != "function" || typeof Reflect.get(e, "insertBefore") != "function")
|
|
1455
1575
|
throw new TypeError("Component parent must be a DOM ParentNode");
|
|
1456
1576
|
}
|
|
1457
|
-
function
|
|
1577
|
+
function ae(e) {
|
|
1458
1578
|
try {
|
|
1459
1579
|
return String(e);
|
|
1460
1580
|
} catch {
|
|
1461
1581
|
return Object.prototype.toString.call(e);
|
|
1462
1582
|
}
|
|
1463
1583
|
}
|
|
1464
|
-
function
|
|
1584
|
+
function yt(e) {
|
|
1465
1585
|
const t = [];
|
|
1466
1586
|
let n = e;
|
|
1467
|
-
for (; n != null && typeof n == "function" && (t.unshift(n), n !==
|
|
1587
|
+
for (; n != null && typeof n == "function" && (t.unshift(n), n !== w); )
|
|
1468
1588
|
n = Object.getPrototypeOf(n);
|
|
1469
1589
|
return t;
|
|
1470
1590
|
}
|
|
1471
|
-
function
|
|
1591
|
+
function bt(...e) {
|
|
1472
1592
|
return [...new Set(e.flatMap((t) => typeof t == "string" ? t.split(/\s+/) : []).filter(Boolean))].join(" ");
|
|
1473
1593
|
}
|
|
1474
|
-
function
|
|
1594
|
+
function V(e) {
|
|
1475
1595
|
if (e.island === !0) return !0;
|
|
1476
1596
|
const t = e.className ?? e.class;
|
|
1477
1597
|
return typeof t == "string" && t.split(/\s+/).includes("island");
|
|
1478
1598
|
}
|
|
1479
|
-
function
|
|
1599
|
+
function _e(e, t, n) {
|
|
1480
1600
|
const i = t == null ? {} : { ...t };
|
|
1481
|
-
return n !== void 0 && (i.key = n),
|
|
1601
|
+
return n !== void 0 && (i.key = n), x(e, i);
|
|
1482
1602
|
}
|
|
1483
|
-
const
|
|
1484
|
-
function
|
|
1485
|
-
if (!(e instanceof
|
|
1603
|
+
const Lt = _e, Tt = _e;
|
|
1604
|
+
function Ot(e) {
|
|
1605
|
+
if (!(e instanceof w))
|
|
1486
1606
|
throw new TypeError("createPrebuiltElement requires a Component instance");
|
|
1487
1607
|
return e;
|
|
1488
1608
|
}
|
|
1489
1609
|
export {
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
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
|
|
1510
1630
|
};
|
|
1511
|
-
//# sourceMappingURL=jsx-runtime-
|
|
1631
|
+
//# sourceMappingURL=jsx-runtime-Ba-uafjl.js.map
|