@elmethis/react 0.27.0 → 0.27.1
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/lib/index.react.mjs
CHANGED
|
@@ -15,10 +15,11 @@ import nt from "@46ki75/ikuma-theme/dark";
|
|
|
15
15
|
import rt from "@46ki75/ikuma-theme/light";
|
|
16
16
|
import { useCopyToClipboard as it, useDebounceValue as at } from "usehooks-ts";
|
|
17
17
|
import { useControllableState as ot } from "@radix-ui/react-use-controllable-state";
|
|
18
|
-
import {
|
|
18
|
+
import { primitive as st } from "@elmethis/core/tokens";
|
|
19
|
+
import { useAutoAnimate as ct } from "@formkit/auto-animate/react";
|
|
19
20
|
import "@formkit/auto-animate";
|
|
20
|
-
import { cloneDeep as
|
|
21
|
-
var
|
|
21
|
+
import { cloneDeep as lt, isEqual as ut } from "es-toolkit";
|
|
22
|
+
var dt = { text: "_text_zme4t_1" }, ft = { "elm-katex": "_elm-katex_e25qs_5" }, pt = (e) => {
|
|
22
23
|
let t = H(17), n, r, i, a;
|
|
23
24
|
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4]) : ({className: r, expression: i, block: n, ...a} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a);
|
|
24
25
|
let o = n ?? !1, s;
|
|
@@ -26,8 +27,8 @@ var ut = { text: "_text_zme4t_1" }, dt = { "elm-katex": "_elm-katex_e25qs_5" },
|
|
|
26
27
|
displayMode: o,
|
|
27
28
|
output: "mathml"
|
|
28
29
|
}), t[5] = i, t[6] = o, t[7] = s) : s = t[7];
|
|
29
|
-
let c = s, l = n ?
|
|
30
|
-
t[8] !== r || t[9] !== l ? (u = m(
|
|
30
|
+
let c = s, l = n ? ft["elm-katex"] : void 0, u;
|
|
31
|
+
t[8] !== r || t[9] !== l ? (u = m(dt.text, l, r), t[8] = r, t[9] = l, t[10] = u) : u = t[10];
|
|
31
32
|
let d;
|
|
32
33
|
t[11] === c ? d = t[12] : (d = { __html: c }, t[11] = c, t[12] = d);
|
|
33
34
|
let f;
|
|
@@ -36,22 +37,22 @@ var ut = { text: "_text_zme4t_1" }, dt = { "elm-katex": "_elm-katex_e25qs_5" },
|
|
|
36
37
|
dangerouslySetInnerHTML: d,
|
|
37
38
|
...a
|
|
38
39
|
}), t[13] = a, t[14] = u, t[15] = d, t[16] = f) : f = t[16], f;
|
|
39
|
-
},
|
|
40
|
+
}, mt = {
|
|
40
41
|
"elm-code-block": "_elm-code-block_vp5qr_1",
|
|
41
42
|
"language-icon": "_language-icon_vp5qr_16",
|
|
42
43
|
caption: "_caption_vp5qr_21",
|
|
43
44
|
"copy-icon": "_copy-icon_vp5qr_28",
|
|
44
45
|
divider: "_divider_vp5qr_32",
|
|
45
46
|
code: "_code_vp5qr_39"
|
|
46
|
-
},
|
|
47
|
+
}, ht = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), gt = (e, t, n) => t === "id" ? `${e}-${n}` : e.replace(/url\(#([^)]+)\)/g, `url(#$1-${n})`), _t = (e, t, r) => {
|
|
47
48
|
let i = { key: r };
|
|
48
|
-
for (let [n, r] of Object.entries(e.attrs ?? {})) i[
|
|
49
|
+
for (let [n, r] of Object.entries(e.attrs ?? {})) i[ht(n)] = gt(r, n, t);
|
|
49
50
|
e.style && (i.style = e.style);
|
|
50
|
-
let a = e.children?.map((e, n) =>
|
|
51
|
+
let a = e.children?.map((e, n) => _t(e, t, n));
|
|
51
52
|
return n(e.tag, i, a);
|
|
52
|
-
},
|
|
53
|
+
}, vt = ({ icon: e, size: t = 24, className: n, style: r }) => {
|
|
53
54
|
let i = c().replace(/:/g, ""), a = {};
|
|
54
|
-
for (let [t, n] of Object.entries(e.attrs ?? {})) a[
|
|
55
|
+
for (let [t, n] of Object.entries(e.attrs ?? {})) a[ht(t)] = n;
|
|
55
56
|
return /* @__PURE__ */ U("svg", {
|
|
56
57
|
xmlns: "http://www.w3.org/2000/svg",
|
|
57
58
|
viewBox: e.viewBox,
|
|
@@ -60,12 +61,12 @@ var ut = { text: "_text_zme4t_1" }, dt = { "elm-katex": "_elm-katex_e25qs_5" },
|
|
|
60
61
|
className: n,
|
|
61
62
|
style: r,
|
|
62
63
|
...a,
|
|
63
|
-
children: e.children.map((e, t) =>
|
|
64
|
+
children: e.children.map((e, t) => _t(e, i, t))
|
|
64
65
|
});
|
|
65
|
-
},
|
|
66
|
+
}, yt = { "elm-mdi-icon": "_elm-mdi-icon_1k12x_1" }, G = ({ className: e, style: t, path: n, size: r = "1em", color: i, label: a, ...o }) => {
|
|
66
67
|
let s = !!(a || o["aria-label"] || o["aria-labelledby"]);
|
|
67
68
|
return /* @__PURE__ */ W("svg", {
|
|
68
|
-
className: m(
|
|
69
|
+
className: m(yt["elm-mdi-icon"], e),
|
|
69
70
|
style: t,
|
|
70
71
|
width: r,
|
|
71
72
|
height: r,
|
|
@@ -79,18 +80,18 @@ var ut = { text: "_text_zme4t_1" }, dt = { "elm-katex": "_elm-katex_e25qs_5" },
|
|
|
79
80
|
...o,
|
|
80
81
|
children: [a && /* @__PURE__ */ U("title", { children: a }), /* @__PURE__ */ U("path", { d: n })]
|
|
81
82
|
});
|
|
82
|
-
},
|
|
83
|
+
}, bt = ({ className: e, style: t, size: n = 24, language: r }) => {
|
|
83
84
|
let i = de(r);
|
|
84
85
|
return i === "file" ? /* @__PURE__ */ U(G, {
|
|
85
86
|
path: we,
|
|
86
87
|
size: String(n)
|
|
87
|
-
}) : /* @__PURE__ */ U(
|
|
88
|
+
}) : /* @__PURE__ */ U(vt, {
|
|
88
89
|
icon: ue[i],
|
|
89
90
|
size: n,
|
|
90
91
|
className: e,
|
|
91
92
|
style: t
|
|
92
93
|
});
|
|
93
|
-
},
|
|
94
|
+
}, xt = {
|
|
94
95
|
"elm-inline-text": "_elm-inline-text_1r4f6_1",
|
|
95
96
|
code: "_code_1r4f6_13",
|
|
96
97
|
kbd: "_kbd_1r4f6_25",
|
|
@@ -99,38 +100,38 @@ var ut = { text: "_text_zme4t_1" }, dt = { "elm-katex": "_elm-katex_e25qs_5" },
|
|
|
99
100
|
"ogp-text": "_ogp-text_1r4f6_104",
|
|
100
101
|
"ogp-title": "_ogp-title_1r4f6_109",
|
|
101
102
|
"ogp-description": "_ogp-description_1r4f6_115"
|
|
102
|
-
},
|
|
103
|
-
className: m(
|
|
103
|
+
}, St = { "elm-inline-icon": "_elm-inline-icon_1r7uc_1" }, Ct = ({ className: e, src: t, alt: n, width: r, height: i, size: a = 16, ...o }) => /* @__PURE__ */ U("span", {
|
|
104
|
+
className: m(St["elm-inline-icon"], e),
|
|
104
105
|
...o,
|
|
105
106
|
children: /* @__PURE__ */ U("img", {
|
|
106
107
|
src: t,
|
|
107
108
|
alt: n,
|
|
108
|
-
className:
|
|
109
|
+
className: St["elm-inline-icon"],
|
|
109
110
|
width: r ?? a,
|
|
110
111
|
height: i ?? a
|
|
111
112
|
})
|
|
112
113
|
}), K = ({ className: e, style: t, color: n, size: r = "1em", backgroundColor: i, bold: a = !1, italic: o = !1, underline: s = !1, strikethrough: c = !1, code: l = !1, kbd: u = !1, ruby: d, href: f, favicon: p, children: h, ...g }) => {
|
|
113
114
|
let _ = h;
|
|
114
115
|
return f && (_ = /* @__PURE__ */ W("a", {
|
|
115
|
-
className:
|
|
116
|
+
className: xt.link,
|
|
116
117
|
href: f,
|
|
117
118
|
target: "_blank",
|
|
118
119
|
rel: "noopener noreferrer",
|
|
119
|
-
children: [p && /* @__PURE__ */ U(
|
|
120
|
+
children: [p && /* @__PURE__ */ U(Ct, {
|
|
120
121
|
src: p,
|
|
121
122
|
alt: "favicon"
|
|
122
123
|
}), _]
|
|
123
124
|
})), u && (_ = /* @__PURE__ */ U("kbd", {
|
|
124
|
-
className:
|
|
125
|
+
className: xt.kbd,
|
|
125
126
|
children: _
|
|
126
127
|
})), c && (_ = /* @__PURE__ */ U("del", { children: _ })), o && (_ = /* @__PURE__ */ U("em", { children: _ })), s && (_ = /* @__PURE__ */ U("ins", { children: _ })), a && (_ = /* @__PURE__ */ U("strong", { children: _ })), l && (_ = /* @__PURE__ */ U("code", {
|
|
127
|
-
className:
|
|
128
|
+
className: xt.code,
|
|
128
129
|
children: _
|
|
129
130
|
})), d && (_ = /* @__PURE__ */ W("ruby", {
|
|
130
|
-
className:
|
|
131
|
+
className: xt["elm-inline-text"],
|
|
131
132
|
children: [/* @__PURE__ */ U("span", { children: _ }), /* @__PURE__ */ U("rt", { children: d })]
|
|
132
133
|
})), /* @__PURE__ */ U("span", {
|
|
133
|
-
className: m(
|
|
134
|
+
className: m(xt["elm-inline-text"], dt.text, e),
|
|
134
135
|
style: {
|
|
135
136
|
...t,
|
|
136
137
|
"--elmethis-scoped-color": n,
|
|
@@ -140,7 +141,7 @@ var ut = { text: "_text_zme4t_1" }, dt = { "elm-katex": "_elm-katex_e25qs_5" },
|
|
|
140
141
|
...g,
|
|
141
142
|
children: _
|
|
142
143
|
});
|
|
143
|
-
},
|
|
144
|
+
}, wt = { "elm-shiki-highlighter": "_elm-shiki-highlighter_kejp3_1" }, Tt = ({ className: e, code: t, language: n = "txt", ...r }) => {
|
|
144
145
|
let [i, a] = f("");
|
|
145
146
|
return s(() => {
|
|
146
147
|
let e = !0;
|
|
@@ -167,14 +168,14 @@ var ut = { text: "_text_zme4t_1" }, dt = { "elm-katex": "_elm-katex_e25qs_5" },
|
|
|
167
168
|
e = !1;
|
|
168
169
|
};
|
|
169
170
|
}, [t, n]), /* @__PURE__ */ U("pre", {
|
|
170
|
-
className: m(
|
|
171
|
+
className: m(wt["elm-shiki-highlighter"], e),
|
|
171
172
|
dangerouslySetInnerHTML: { __html: i },
|
|
172
173
|
...r
|
|
173
174
|
});
|
|
174
|
-
},
|
|
175
|
+
}, Et = {
|
|
175
176
|
"use-clipboard": "_use-clipboard_mb0qt_1",
|
|
176
177
|
"use-clipboard-icon-copied": "_use-clipboard-icon-copied_mb0qt_15"
|
|
177
|
-
},
|
|
178
|
+
}, Dt = (e) => {
|
|
178
179
|
let t = H(14), [n, r] = f(!1), [, i] = it(), a = d(void 0), o = d(e), c;
|
|
179
180
|
t[0] === e ? c = t[1] : (c = () => {
|
|
180
181
|
o.current = e;
|
|
@@ -186,19 +187,19 @@ var ut = { text: "_text_zme4t_1" }, dt = { "elm-katex": "_elm-katex_e25qs_5" },
|
|
|
186
187
|
let p;
|
|
187
188
|
t[4] === i ? p = t[5] : (p = async () => {
|
|
188
189
|
let { content: e, delay: t } = o.current;
|
|
189
|
-
typeof e == "string" ? await i(e) : await window.navigator.clipboard.write(e.map(
|
|
190
|
+
typeof e == "string" ? await i(e) : await window.navigator.clipboard.write(e.map(Ot)), a.current !== void 0 && clearTimeout(a.current), r(!0), a.current = setTimeout(() => {
|
|
190
191
|
r(!1), a.current = void 0;
|
|
191
192
|
}, t ?? 1500);
|
|
192
193
|
}, t[4] = i, t[5] = p);
|
|
193
194
|
let h = p, g;
|
|
194
195
|
t[6] !== n || t[7] !== h || t[8] !== e.className || t[9] !== e.style ? (g = () => /* @__PURE__ */ U("span", {
|
|
195
|
-
className: m(
|
|
196
|
+
className: m(Et["use-clipboard"], e.className),
|
|
196
197
|
style: e.style,
|
|
197
198
|
onClick: () => {
|
|
198
199
|
h();
|
|
199
200
|
},
|
|
200
201
|
children: /* @__PURE__ */ U(G, {
|
|
201
|
-
className: m(n &&
|
|
202
|
+
className: m(n && Et["use-clipboard-icon-copied"]),
|
|
202
203
|
path: n ? Se : Ce,
|
|
203
204
|
size: "1.25rem"
|
|
204
205
|
})
|
|
@@ -209,59 +210,59 @@ var ut = { text: "_text_zme4t_1" }, dt = { "elm-katex": "_elm-katex_e25qs_5" },
|
|
|
209
210
|
copy: h
|
|
210
211
|
}, t[11] = _, t[12] = h, t[13] = v) : v = t[13], v;
|
|
211
212
|
};
|
|
212
|
-
function
|
|
213
|
+
function Ot(e) {
|
|
213
214
|
return new ClipboardItem(e);
|
|
214
215
|
}
|
|
215
216
|
//#endregion
|
|
216
217
|
//#region src/components/code/elm-code-block.tsx
|
|
217
|
-
var
|
|
218
|
-
let { CopyButton: o } =
|
|
218
|
+
var kt = ({ className: e, code: t, language: n = "txt", caption: r, children: i, ...a }) => {
|
|
219
|
+
let { CopyButton: o } = Dt({ content: t });
|
|
219
220
|
return /* @__PURE__ */ W("figure", {
|
|
220
|
-
className: m(
|
|
221
|
+
className: m(mt["elm-code-block"], e),
|
|
221
222
|
...a,
|
|
222
223
|
children: [
|
|
223
224
|
/* @__PURE__ */ U("span", {
|
|
224
|
-
className:
|
|
225
|
-
children: /* @__PURE__ */ U(
|
|
225
|
+
className: mt["language-icon"],
|
|
226
|
+
children: /* @__PURE__ */ U(bt, { language: n })
|
|
226
227
|
}),
|
|
227
228
|
/* @__PURE__ */ U("span", {
|
|
228
|
-
className:
|
|
229
|
+
className: mt.caption,
|
|
229
230
|
children: /* @__PURE__ */ W(K, { children: [r || n, i] })
|
|
230
231
|
}),
|
|
231
232
|
/* @__PURE__ */ U("div", {
|
|
232
|
-
className:
|
|
233
|
+
className: mt["copy-icon"],
|
|
233
234
|
children: /* @__PURE__ */ U(o, {})
|
|
234
235
|
}),
|
|
235
|
-
/* @__PURE__ */ U("hr", { className:
|
|
236
|
+
/* @__PURE__ */ U("hr", { className: mt.divider }),
|
|
236
237
|
/* @__PURE__ */ U("div", {
|
|
237
|
-
className:
|
|
238
|
-
children: /* @__PURE__ */ U(
|
|
238
|
+
className: mt.code,
|
|
239
|
+
children: /* @__PURE__ */ U(Tt, {
|
|
239
240
|
code: t,
|
|
240
241
|
language: n
|
|
241
242
|
})
|
|
242
243
|
})
|
|
243
244
|
]
|
|
244
245
|
});
|
|
245
|
-
},
|
|
246
|
+
}, At = {
|
|
246
247
|
"elm-html-viewer": "_elm-html-viewer_17ksq_1",
|
|
247
248
|
header: "_header_17ksq_15",
|
|
248
249
|
"icon-button": "_icon-button_17ksq_23",
|
|
249
250
|
divider: "_divider_17ksq_49",
|
|
250
251
|
content: "_content_17ksq_57"
|
|
251
|
-
},
|
|
252
|
+
}, jt = { "elm-html": "_elm-html_339tp_1" };
|
|
252
253
|
//#endregion
|
|
253
254
|
//#region src/components/code/elm-html.tsx
|
|
254
|
-
function
|
|
255
|
+
function Mt(e, t) {
|
|
255
256
|
return t ? !0 : (e?.split(/\s+/).filter(Boolean) ?? []).some((e) => e.toLowerCase() === "allow-scripts");
|
|
256
257
|
}
|
|
257
|
-
var
|
|
258
|
-
function
|
|
258
|
+
var Nt = "elmethis:elm-html:auto-height";
|
|
259
|
+
function Pt(e) {
|
|
259
260
|
return `${e}
|
|
260
261
|
<script>(function () {
|
|
261
262
|
var send = function () {
|
|
262
263
|
try {
|
|
263
264
|
parent.postMessage(
|
|
264
|
-
{ kind: ${JSON.stringify(
|
|
265
|
+
{ kind: ${JSON.stringify(Nt)}, height: document.documentElement.scrollHeight },
|
|
265
266
|
"*",
|
|
266
267
|
);
|
|
267
268
|
} catch (e) {}
|
|
@@ -270,7 +271,7 @@ function Nt(e) {
|
|
|
270
271
|
send();
|
|
271
272
|
})();<\/script>`;
|
|
272
273
|
}
|
|
273
|
-
var
|
|
274
|
+
var Ft = ({ className: e, html: t, src: n, sandbox: r, style: i, height: a, autoHeight: o = !0, allowScripts: c = !1, title: l, ...u }) => {
|
|
274
275
|
let p = n !== void 0, h = d(null), [g, _] = f(), [v, y] = f({
|
|
275
276
|
html: t,
|
|
276
277
|
src: n,
|
|
@@ -283,18 +284,18 @@ var Pt = ({ className: e, html: t, src: n, sandbox: r, style: i, height: a, auto
|
|
|
283
284
|
}), o && _(void 0));
|
|
284
285
|
let b = new Set(r?.split(/\s+/).filter(Boolean) ?? []);
|
|
285
286
|
c && b.add("allow-scripts");
|
|
286
|
-
let x =
|
|
287
|
+
let x = Mt(r, c);
|
|
287
288
|
if (x) for (let e of b) e.toLowerCase() === "allow-same-origin" && b.delete(e);
|
|
288
289
|
else o && b.add("allow-same-origin");
|
|
289
290
|
let S = [...b].join(" ");
|
|
290
291
|
s(() => {
|
|
291
292
|
let e = h.current;
|
|
292
|
-
if (!e || !o || p &&
|
|
293
|
-
if (
|
|
293
|
+
if (!e || !o || p && Mt(r, c)) return;
|
|
294
|
+
if (Mt(r, c)) {
|
|
294
295
|
let t = (t) => {
|
|
295
296
|
if (t.source !== e.contentWindow) return;
|
|
296
297
|
let n = t.data;
|
|
297
|
-
n && n.kind ===
|
|
298
|
+
n && n.kind === Nt && typeof n.height == "number" && _(n.height);
|
|
298
299
|
};
|
|
299
300
|
return window.addEventListener("message", t), () => window.removeEventListener("message", t);
|
|
300
301
|
}
|
|
@@ -321,7 +322,7 @@ var Pt = ({ className: e, html: t, src: n, sandbox: r, style: i, height: a, auto
|
|
|
321
322
|
return /* @__PURE__ */ U("iframe", {
|
|
322
323
|
ref: h,
|
|
323
324
|
title: l ?? "Embedded HTML content",
|
|
324
|
-
className: m(
|
|
325
|
+
className: m(jt["elm-html"], e),
|
|
325
326
|
style: o ? {
|
|
326
327
|
...i,
|
|
327
328
|
height: g ?? i?.height
|
|
@@ -329,11 +330,11 @@ var Pt = ({ className: e, html: t, src: n, sandbox: r, style: i, height: a, auto
|
|
|
329
330
|
height: o ? g === void 0 && i?.height === void 0 ? a : void 0 : a,
|
|
330
331
|
...D,
|
|
331
332
|
src: p ? n : void 0,
|
|
332
|
-
srcDoc: p ? void 0 : o && x ?
|
|
333
|
+
srcDoc: p ? void 0 : o && x ? Pt(t ?? "") : t ?? "",
|
|
333
334
|
sandbox: S,
|
|
334
335
|
referrerPolicy: p ? "no-referrer" : void 0
|
|
335
336
|
}, String(o));
|
|
336
|
-
},
|
|
337
|
+
}, It = ({ className: e, html: t, src: n, filename: r, sandbox: i, autoHeight: o, allowScripts: s, height: c, ...l }) => {
|
|
337
338
|
let u = n !== void 0, d = a(() => {
|
|
338
339
|
if (u) {
|
|
339
340
|
window.open(n, "_blank", "noreferrer");
|
|
@@ -379,14 +380,14 @@ var Pt = ({ className: e, html: t, src: n, sandbox: r, style: i, height: a, auto
|
|
|
379
380
|
r
|
|
380
381
|
]);
|
|
381
382
|
return /* @__PURE__ */ W("figure", {
|
|
382
|
-
className: m(
|
|
383
|
+
className: m(At["elm-html-viewer"], e),
|
|
383
384
|
...l,
|
|
384
385
|
children: [
|
|
385
386
|
/* @__PURE__ */ W("div", {
|
|
386
|
-
className:
|
|
387
|
+
className: At.header,
|
|
387
388
|
children: [/* @__PURE__ */ U("button", {
|
|
388
389
|
type: "button",
|
|
389
|
-
className:
|
|
390
|
+
className: At["icon-button"],
|
|
390
391
|
onClick: f,
|
|
391
392
|
"aria-label": "Download",
|
|
392
393
|
children: /* @__PURE__ */ U(G, {
|
|
@@ -395,7 +396,7 @@ var Pt = ({ className: e, html: t, src: n, sandbox: r, style: i, height: a, auto
|
|
|
395
396
|
})
|
|
396
397
|
}), /* @__PURE__ */ U("button", {
|
|
397
398
|
type: "button",
|
|
398
|
-
className:
|
|
399
|
+
className: At["icon-button"],
|
|
399
400
|
onClick: d,
|
|
400
401
|
"aria-label": "Open in new tab",
|
|
401
402
|
children: /* @__PURE__ */ U(G, {
|
|
@@ -404,10 +405,10 @@ var Pt = ({ className: e, html: t, src: n, sandbox: r, style: i, height: a, auto
|
|
|
404
405
|
})
|
|
405
406
|
})]
|
|
406
407
|
}),
|
|
407
|
-
/* @__PURE__ */ U("hr", { className:
|
|
408
|
+
/* @__PURE__ */ U("hr", { className: At.divider }),
|
|
408
409
|
/* @__PURE__ */ U("div", {
|
|
409
|
-
className:
|
|
410
|
-
children: /* @__PURE__ */ U(
|
|
410
|
+
className: At.content,
|
|
411
|
+
children: /* @__PURE__ */ U(Ft, {
|
|
411
412
|
html: t,
|
|
412
413
|
src: n,
|
|
413
414
|
sandbox: i,
|
|
@@ -448,18 +449,18 @@ var Pt = ({ className: e, html: t, src: n, sandbox: r, style: i, height: a, auto
|
|
|
448
449
|
errored: "_errored_1bk09_405",
|
|
449
450
|
"error-notice": "_error-notice_1bk09_414",
|
|
450
451
|
"error-message": "_error-message_1bk09_424"
|
|
451
|
-
},
|
|
452
|
+
}, Lt = (e) => {
|
|
452
453
|
(!Number.isFinite(e) || e < 0) && (e = 0);
|
|
453
454
|
let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60, a = `${n > 0 ? String(r).padStart(2, "0") : String(r)}:${String(i).padStart(2, "0")}`;
|
|
454
455
|
return n > 0 ? `${n}:${a}` : a;
|
|
455
|
-
},
|
|
456
|
+
}, Rt = (e) => {
|
|
456
457
|
let t = e.split(/[?#]/)[0].split("/").filter(Boolean).pop() ?? e;
|
|
457
458
|
try {
|
|
458
459
|
return decodeURIComponent(t);
|
|
459
460
|
} catch {
|
|
460
461
|
return t;
|
|
461
462
|
}
|
|
462
|
-
},
|
|
463
|
+
}, zt = ({ className: e, style: t, src: n, title: r, artist: i, errorMessage: o = "This audio couldn't be loaded.", seekStep: c = 10, loop: l, autoPlay: u, ...p }) => {
|
|
463
464
|
let h = d(null), g = d(null), _ = d(null), [v, y] = f(!1), [b, x] = f(!0), [S, C] = f(!1), [w, T] = f(0), [E, D] = f(0), [O, k] = f(1), [A, j] = f(!1), [M, N] = f(null), P = w > 0 ? Math.min(1, E / w) : 0, F = a(() => {
|
|
464
465
|
if (_.current != null) return;
|
|
465
466
|
let e = () => {
|
|
@@ -512,7 +513,7 @@ var Pt = ({ className: e, html: t, src: n, sandbox: r, style: i, height: a, auto
|
|
|
512
513
|
if (!e) return;
|
|
513
514
|
let t = !e.muted;
|
|
514
515
|
e.muted = t, j(t);
|
|
515
|
-
}, []), re = A || O === 0 ? et : O < .34 ? Qe : O < .67 ? $e : Ze, ie = r ??
|
|
516
|
+
}, []), re = A || O === 0 ? et : O < .34 ? Qe : O < .67 ? $e : Ze, ie = r ?? Rt(n);
|
|
516
517
|
return /* @__PURE__ */ W("div", {
|
|
517
518
|
className: m(q["elm-audio-player"], v && q.playing, b && q.loading, S && q.errored, e),
|
|
518
519
|
style: {
|
|
@@ -607,7 +608,7 @@ var Pt = ({ className: e, html: t, src: n, sandbox: r, style: i, height: a, auto
|
|
|
607
608
|
"aria-valuemin": 0,
|
|
608
609
|
"aria-valuemax": Math.round(w) || 0,
|
|
609
610
|
"aria-valuenow": Math.round(E),
|
|
610
|
-
"aria-valuetext": `${
|
|
611
|
+
"aria-valuetext": `${Lt(E)} of ${Lt(w)}`,
|
|
611
612
|
onPointerDown: B,
|
|
612
613
|
onPointerMove: V,
|
|
613
614
|
onPointerLeave: () => N(null),
|
|
@@ -632,7 +633,7 @@ var Pt = ({ className: e, html: t, src: n, sandbox: r, style: i, height: a, auto
|
|
|
632
633
|
children: [
|
|
633
634
|
/* @__PURE__ */ U("span", {
|
|
634
635
|
className: m(q.time, q["time-current"]),
|
|
635
|
-
children:
|
|
636
|
+
children: Lt(E)
|
|
636
637
|
}),
|
|
637
638
|
/* @__PURE__ */ W("div", {
|
|
638
639
|
className: q.transport,
|
|
@@ -696,22 +697,22 @@ var Pt = ({ className: e, html: t, src: n, sandbox: r, style: i, height: a, auto
|
|
|
696
697
|
}),
|
|
697
698
|
/* @__PURE__ */ U("span", {
|
|
698
699
|
className: m(q.time, q["time-total"]),
|
|
699
|
-
children:
|
|
700
|
+
children: Lt(w)
|
|
700
701
|
})
|
|
701
702
|
]
|
|
702
703
|
})] })
|
|
703
704
|
]
|
|
704
705
|
});
|
|
705
|
-
},
|
|
706
|
+
}, Bt = {
|
|
706
707
|
"elm-block-image": "_elm-block-image_pjk5z_1",
|
|
707
708
|
"image-container": "_image-container_pjk5z_11",
|
|
708
709
|
image: "_image_pjk5z_11",
|
|
709
710
|
"caption-box": "_caption-box_pjk5z_33",
|
|
710
711
|
"caption-icon": "_caption-icon_pjk5z_41"
|
|
711
|
-
},
|
|
712
|
+
}, Vt = {
|
|
712
713
|
"elm-modal": "_elm-modal_veywy_1",
|
|
713
714
|
shown: "_shown_veywy_18"
|
|
714
|
-
},
|
|
715
|
+
}, Ht = ({ className: e, isOpen: t, delay: n = 200, style: r, onClose: i, children: a, ...o }) => {
|
|
715
716
|
let c = d(null), [l, u] = f(!1);
|
|
716
717
|
return s(() => {
|
|
717
718
|
let e = c.current;
|
|
@@ -730,7 +731,7 @@ var Pt = ({ className: e, html: t, src: n, sandbox: r, style: i, height: a, auto
|
|
|
730
731
|
}
|
|
731
732
|
}, [t, n]), /* @__PURE__ */ U("dialog", {
|
|
732
733
|
ref: c,
|
|
733
|
-
className: m(
|
|
734
|
+
className: m(Vt["elm-modal"], l && Vt.shown, e),
|
|
734
735
|
onClick: (e) => {
|
|
735
736
|
c.current && i?.(e.nativeEvent, c.current);
|
|
736
737
|
},
|
|
@@ -745,7 +746,7 @@ var Pt = ({ className: e, html: t, src: n, sandbox: r, style: i, height: a, auto
|
|
|
745
746
|
children: a
|
|
746
747
|
})
|
|
747
748
|
});
|
|
748
|
-
},
|
|
749
|
+
}, Ut = (e) => {
|
|
749
750
|
let t = H(10), n;
|
|
750
751
|
t[0] === e ? n = t[1] : (n = e === void 0 ? {} : e, t[0] = e, t[1] = n);
|
|
751
752
|
let r = n.delay, [i, a] = f(!1), o = d(i), c;
|
|
@@ -767,7 +768,7 @@ var Pt = ({ className: e, html: t, src: n, sandbox: r, style: i, height: a, auto
|
|
|
767
768
|
let v;
|
|
768
769
|
t[7] === Symbol.for("react.memo_cache_sentinel") ? (v = function(e) {
|
|
769
770
|
let { children: t } = e;
|
|
770
|
-
return /* @__PURE__ */ U(
|
|
771
|
+
return /* @__PURE__ */ U(Ht, {
|
|
771
772
|
isOpen: o.current,
|
|
772
773
|
delay: g.current,
|
|
773
774
|
onClose: p,
|
|
@@ -782,10 +783,10 @@ var Pt = ({ className: e, html: t, src: n, sandbox: r, style: i, height: a, auto
|
|
|
782
783
|
hide: p,
|
|
783
784
|
toggle: h
|
|
784
785
|
}, t[8] = i, t[9] = b), b;
|
|
785
|
-
},
|
|
786
|
+
}, Wt = (e) => {
|
|
786
787
|
let t = H(48), n, r, i, a, o, s, c, l, u, d;
|
|
787
788
|
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5], s = t[6], c = t[7], l = t[8], u = t[9], d = t[10]) : ({className: i, src: l, alt: n, caption: r, width: d, height: o, srcSet: u, sizes: c, enableModal: a, ...s} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o, t[6] = s, t[7] = c, t[8] = l, t[9] = u, t[10] = d);
|
|
788
|
-
let { Modal: f, isOpen: p, show: h, hide: g } =
|
|
789
|
+
let { Modal: f, isOpen: p, show: h, hide: g } = Ut(), _;
|
|
789
790
|
t[11] !== a || t[12] !== h ? (_ = () => {
|
|
790
791
|
(a ?? !0) && h();
|
|
791
792
|
}, t[11] = a, t[12] = h, t[13] = _) : _ = t[13];
|
|
@@ -795,7 +796,7 @@ var Pt = ({ className: e, html: t, src: n, sandbox: r, style: i, height: a, auto
|
|
|
795
796
|
}, t[14] = g, t[15] = y);
|
|
796
797
|
let b = y, x;
|
|
797
798
|
t[16] !== n || t[17] !== r || t[18] !== a || t[19] !== b || t[20] !== o || t[21] !== p || t[22] !== c || t[23] !== l || t[24] !== u || t[25] !== d ? (x = (e) => /* @__PURE__ */ U("img", {
|
|
798
|
-
className:
|
|
799
|
+
className: Bt.image,
|
|
799
800
|
src: l,
|
|
800
801
|
alt: n ?? r ?? "Image",
|
|
801
802
|
srcSet: e ? void 0 : u,
|
|
@@ -811,20 +812,20 @@ var Pt = ({ className: e, html: t, src: n, sandbox: r, style: i, height: a, auto
|
|
|
811
812
|
}
|
|
812
813
|
}), t[16] = n, t[17] = r, t[18] = a, t[19] = b, t[20] = o, t[21] = p, t[22] = c, t[23] = l, t[24] = u, t[25] = d, t[26] = x) : x = t[26];
|
|
813
814
|
let S = x, C;
|
|
814
|
-
t[27] === i ? C = t[28] : (C = m(
|
|
815
|
+
t[27] === i ? C = t[28] : (C = m(Bt["elm-block-image"], i), t[27] = i, t[28] = C);
|
|
815
816
|
let w;
|
|
816
817
|
t[29] === S ? w = t[30] : (w = S(!1), t[29] = S, t[30] = w);
|
|
817
818
|
let T;
|
|
818
819
|
t[31] !== v || t[32] !== w ? (T = /* @__PURE__ */ U("div", {
|
|
819
|
-
className:
|
|
820
|
+
className: Bt["image-container"],
|
|
820
821
|
onClick: v,
|
|
821
822
|
children: w
|
|
822
823
|
}), t[31] = v, t[32] = w, t[33] = T) : T = t[33];
|
|
823
824
|
let E;
|
|
824
825
|
t[34] === r ? E = t[35] : (E = r && /* @__PURE__ */ W("figcaption", {
|
|
825
|
-
className:
|
|
826
|
+
className: Bt["caption-box"],
|
|
826
827
|
children: [/* @__PURE__ */ U("span", {
|
|
827
|
-
className:
|
|
828
|
+
className: Bt["caption-icon"],
|
|
828
829
|
children: /* @__PURE__ */ U(G, {
|
|
829
830
|
path: Be,
|
|
830
831
|
size: "1.25rem"
|
|
@@ -848,25 +849,25 @@ var Pt = ({ className: e, html: t, src: n, sandbox: r, style: i, height: a, auto
|
|
|
848
849
|
O
|
|
849
850
|
]
|
|
850
851
|
}), t[42] = s, t[43] = C, t[44] = T, t[45] = E, t[46] = O, t[47] = k) : k = t[47], k;
|
|
851
|
-
},
|
|
852
|
+
}, Gt = {
|
|
852
853
|
"elm-file": "_elm-file_1we6j_1",
|
|
853
854
|
"file-size": "_file-size_1we6j_12",
|
|
854
855
|
"download-icon": "_download-icon_1we6j_17"
|
|
855
856
|
};
|
|
856
857
|
//#endregion
|
|
857
858
|
//#region src/components/media/elm-file.tsx
|
|
858
|
-
function
|
|
859
|
+
function Kt(e) {
|
|
859
860
|
let t = e.split(/[?#]/)[0].split("/").filter(Boolean);
|
|
860
861
|
return t.length > 0 ? t[t.length - 1] : null;
|
|
861
862
|
}
|
|
862
|
-
var
|
|
863
|
+
var qt = ({ className: e, name: t, src: n, filesize: r, ...i }) => {
|
|
863
864
|
let a = async () => {
|
|
864
865
|
let e;
|
|
865
866
|
try {
|
|
866
867
|
let r = await fetch(n);
|
|
867
868
|
if (!r.ok) throw Error("Failed to download file");
|
|
868
869
|
let i = await r.blob();
|
|
869
|
-
e = document.createElement("a"), e.href = URL.createObjectURL(i), e.download = t ??
|
|
870
|
+
e = document.createElement("a"), e.href = URL.createObjectURL(i), e.download = t ?? Kt(n) ?? "file", e.click();
|
|
870
871
|
} catch (e) {
|
|
871
872
|
console.error("ERROR:", e);
|
|
872
873
|
} finally {
|
|
@@ -874,20 +875,20 @@ var Kt = ({ className: e, name: t, src: n, filesize: r, ...i }) => {
|
|
|
874
875
|
}
|
|
875
876
|
};
|
|
876
877
|
return /* @__PURE__ */ W("div", {
|
|
877
|
-
className: m(
|
|
878
|
+
className: m(Gt["elm-file"], e),
|
|
878
879
|
...i,
|
|
879
880
|
children: [
|
|
880
881
|
/* @__PURE__ */ U("div", { children: /* @__PURE__ */ U(G, {
|
|
881
882
|
path: ke,
|
|
882
883
|
size: "1.25rem"
|
|
883
884
|
}) }),
|
|
884
|
-
/* @__PURE__ */ U("div", { children: /* @__PURE__ */ U(K, { children: t ??
|
|
885
|
+
/* @__PURE__ */ U("div", { children: /* @__PURE__ */ U(K, { children: t ?? Kt(n) }) }),
|
|
885
886
|
/* @__PURE__ */ U("div", {
|
|
886
|
-
className:
|
|
887
|
+
className: Gt["file-size"],
|
|
887
888
|
children: /* @__PURE__ */ U(K, { children: r })
|
|
888
889
|
}),
|
|
889
890
|
/* @__PURE__ */ U("div", {
|
|
890
|
-
className:
|
|
891
|
+
className: Gt["download-icon"],
|
|
891
892
|
onClick: () => {
|
|
892
893
|
a();
|
|
893
894
|
},
|
|
@@ -898,7 +899,7 @@ var Kt = ({ className: e, name: t, src: n, filesize: r, ...i }) => {
|
|
|
898
899
|
})
|
|
899
900
|
]
|
|
900
901
|
});
|
|
901
|
-
},
|
|
902
|
+
}, Jt = {
|
|
902
903
|
"elm-bookmark": "_elm-bookmark_zkn8n_1",
|
|
903
904
|
container: "_container_zkn8n_23",
|
|
904
905
|
image: "_image_zkn8n_35",
|
|
@@ -906,21 +907,21 @@ var Kt = ({ className: e, name: t, src: n, filesize: r, ...i }) => {
|
|
|
906
907
|
title: "_title_zkn8n_69",
|
|
907
908
|
description: "_description_zkn8n_73",
|
|
908
909
|
link: "_link_zkn8n_78"
|
|
909
|
-
},
|
|
910
|
+
}, Yt = {
|
|
910
911
|
visibility: "hidden",
|
|
911
912
|
width: "0"
|
|
912
|
-
},
|
|
913
|
+
}, Xt = (e) => {
|
|
913
914
|
let t = H(40), n, r, i, a, o, s, c;
|
|
914
915
|
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5], s = t[6], c = t[7]) : ({className: n, title: s, url: c, image: a, description: r, favicon: i, ...o} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o, t[6] = s, t[7] = c);
|
|
915
916
|
let [l, u] = f(!1), d;
|
|
916
|
-
t[8] === n ? d = t[9] : (d = m(
|
|
917
|
+
t[8] === n ? d = t[9] : (d = m(Jt["elm-bookmark"], n), t[8] = n, t[9] = d);
|
|
917
918
|
let p;
|
|
918
919
|
t[10] === Symbol.for("react.memo_cache_sentinel") ? (p = () => u(!0), t[10] = p) : p = t[10];
|
|
919
920
|
let h;
|
|
920
|
-
t[11] !== a || t[12] !== l ? (h = l || a == null ?
|
|
921
|
+
t[11] !== a || t[12] !== l ? (h = l || a == null ? Yt : {}, t[11] = a, t[12] = l, t[13] = h) : h = t[13];
|
|
921
922
|
let g;
|
|
922
923
|
t[14] !== a || t[15] !== h ? (g = /* @__PURE__ */ U("img", {
|
|
923
|
-
className:
|
|
924
|
+
className: Jt.image,
|
|
924
925
|
src: a,
|
|
925
926
|
alt: "OGP Image",
|
|
926
927
|
onError: p,
|
|
@@ -928,7 +929,7 @@ var Kt = ({ className: e, name: t, src: n, filesize: r, ...i }) => {
|
|
|
928
929
|
}), t[14] = a, t[15] = h, t[16] = g) : g = t[16];
|
|
929
930
|
let _;
|
|
930
931
|
t[17] === s ? _ = t[18] : (_ = /* @__PURE__ */ U("div", {
|
|
931
|
-
className:
|
|
932
|
+
className: Jt.title,
|
|
932
933
|
children: /* @__PURE__ */ U(K, {
|
|
933
934
|
bold: !0,
|
|
934
935
|
children: s
|
|
@@ -936,14 +937,14 @@ var Kt = ({ className: e, name: t, src: n, filesize: r, ...i }) => {
|
|
|
936
937
|
}), t[17] = s, t[18] = _);
|
|
937
938
|
let v;
|
|
938
939
|
t[19] === r ? v = t[20] : (v = /* @__PURE__ */ U("div", {
|
|
939
|
-
className:
|
|
940
|
+
className: Jt.description,
|
|
940
941
|
children: /* @__PURE__ */ U(K, {
|
|
941
942
|
size: "0.75rem",
|
|
942
943
|
children: r
|
|
943
944
|
})
|
|
944
945
|
}), t[19] = r, t[20] = v);
|
|
945
946
|
let y;
|
|
946
|
-
t[21] === i ? y = t[22] : (y = i ? /* @__PURE__ */ U(
|
|
947
|
+
t[21] === i ? y = t[22] : (y = i ? /* @__PURE__ */ U(Ct, { src: i }) : /* @__PURE__ */ U(G, {
|
|
947
948
|
path: Re,
|
|
948
949
|
color: "var(--elmethis-color-accent-info)"
|
|
949
950
|
}), t[21] = i, t[22] = y);
|
|
@@ -954,12 +955,12 @@ var Kt = ({ className: e, name: t, src: n, filesize: r, ...i }) => {
|
|
|
954
955
|
}), t[23] = c, t[24] = b);
|
|
955
956
|
let x;
|
|
956
957
|
t[25] !== y || t[26] !== b ? (x = /* @__PURE__ */ W("div", {
|
|
957
|
-
className:
|
|
958
|
+
className: Jt.link,
|
|
958
959
|
children: [y, b]
|
|
959
960
|
}), t[25] = y, t[26] = b, t[27] = x) : x = t[27];
|
|
960
961
|
let S;
|
|
961
962
|
t[28] !== _ || t[29] !== v || t[30] !== x ? (S = /* @__PURE__ */ W("div", {
|
|
962
|
-
className:
|
|
963
|
+
className: Jt.content,
|
|
963
964
|
children: [
|
|
964
965
|
_,
|
|
965
966
|
v,
|
|
@@ -968,7 +969,7 @@ var Kt = ({ className: e, name: t, src: n, filesize: r, ...i }) => {
|
|
|
968
969
|
}), t[28] = _, t[29] = v, t[30] = x, t[31] = S) : S = t[31];
|
|
969
970
|
let C;
|
|
970
971
|
t[32] !== S || t[33] !== g || t[34] !== c ? (C = /* @__PURE__ */ W("a", {
|
|
971
|
-
className:
|
|
972
|
+
className: Jt.container,
|
|
972
973
|
href: c,
|
|
973
974
|
target: "_blank",
|
|
974
975
|
rel: "noopener noreferrer",
|
|
@@ -980,35 +981,35 @@ var Kt = ({ className: e, name: t, src: n, filesize: r, ...i }) => {
|
|
|
980
981
|
...o,
|
|
981
982
|
children: C
|
|
982
983
|
}), t[36] = o, t[37] = d, t[38] = C, t[39] = w) : w = t[39], w;
|
|
983
|
-
},
|
|
984
|
+
}, Zt = {
|
|
984
985
|
"elm-tabs": "_elm-tabs_4f8z7_1",
|
|
985
986
|
"tab-container": "_tab-container_4f8z7_13",
|
|
986
987
|
tab: "_tab_4f8z7_13",
|
|
987
988
|
active: "_active_4f8z7_41",
|
|
988
989
|
"tab-content": "_tab-content_4f8z7_52",
|
|
989
990
|
"tab-content-inner": "_tab-content-inner_4f8z7_57"
|
|
990
|
-
},
|
|
991
|
+
}, Qt = {
|
|
991
992
|
"elm-collapse": "_elm-collapse_12wiu_1",
|
|
992
993
|
row: "_row_12wiu_5",
|
|
993
994
|
open: "_open_12wiu_11",
|
|
994
995
|
column: "_column_12wiu_16",
|
|
995
996
|
both: "_both_12wiu_27",
|
|
996
997
|
inner: "_inner_12wiu_44"
|
|
997
|
-
},
|
|
998
|
-
className: m(
|
|
998
|
+
}, $t = ({ className: e, style: t, isOpen: n, direction: r = "row", transitionTimingFunction: i = "ease-in-out", children: a, ...o }) => /* @__PURE__ */ U("div", {
|
|
999
|
+
className: m(Qt["elm-collapse"], n && Qt.open, r === "row" && Qt.row, r === "column" && Qt.column, r === "both" && Qt.both, e),
|
|
999
1000
|
style: {
|
|
1000
1001
|
...t,
|
|
1001
1002
|
"--elmethis-scoped-transition-timing-function": i
|
|
1002
1003
|
},
|
|
1003
1004
|
...o,
|
|
1004
1005
|
children: /* @__PURE__ */ U("div", {
|
|
1005
|
-
className:
|
|
1006
|
+
className: Qt.inner,
|
|
1006
1007
|
children: a
|
|
1007
1008
|
})
|
|
1008
1009
|
});
|
|
1009
1010
|
//#endregion
|
|
1010
1011
|
//#region src/hooks/use-bindable-signal.ts
|
|
1011
|
-
function
|
|
1012
|
+
function en(e) {
|
|
1012
1013
|
let t = H(4), { value: n, defaultValue: r, onChange: i } = e, a;
|
|
1013
1014
|
return t[0] !== r || t[1] !== i || t[2] !== n ? (a = {
|
|
1014
1015
|
prop: n,
|
|
@@ -1019,44 +1020,44 @@ function $t(e) {
|
|
|
1019
1020
|
}
|
|
1020
1021
|
//#endregion
|
|
1021
1022
|
//#region src/components/containments/elm-tabs.tsx
|
|
1022
|
-
var
|
|
1023
|
-
let e = o(
|
|
1023
|
+
var tn = t(null), nn = () => {
|
|
1024
|
+
let e = o(tn);
|
|
1024
1025
|
if (e == null) throw Error("ElmTabs subcomponents must be used within <ElmTabs>");
|
|
1025
1026
|
return e;
|
|
1026
|
-
},
|
|
1027
|
-
let [s, c] =
|
|
1027
|
+
}, rn = ({ className: e, value: t, defaultValue: n, onValueChange: r, transitionTimingFunction: i = "linear", children: a, ...o }) => {
|
|
1028
|
+
let [s, c] = en({
|
|
1028
1029
|
value: t,
|
|
1029
1030
|
defaultValue: n ?? "",
|
|
1030
1031
|
onChange: r
|
|
1031
1032
|
});
|
|
1032
|
-
return /* @__PURE__ */ U(
|
|
1033
|
+
return /* @__PURE__ */ U(tn.Provider, {
|
|
1033
1034
|
value: {
|
|
1034
1035
|
selectedValue: s,
|
|
1035
1036
|
setSelectedValue: c,
|
|
1036
1037
|
transitionTimingFunction: i
|
|
1037
1038
|
},
|
|
1038
1039
|
children: /* @__PURE__ */ U("div", {
|
|
1039
|
-
className: m(
|
|
1040
|
+
className: m(Zt["elm-tabs"], e),
|
|
1040
1041
|
...o,
|
|
1041
1042
|
children: a
|
|
1042
1043
|
})
|
|
1043
1044
|
});
|
|
1044
|
-
},
|
|
1045
|
+
}, an = (e) => {
|
|
1045
1046
|
let t = H(10), n, r, i;
|
|
1046
1047
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({className: r, children: n, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
1047
1048
|
let a;
|
|
1048
|
-
t[4] === r ? a = t[5] : (a = m(
|
|
1049
|
+
t[4] === r ? a = t[5] : (a = m(Zt["tab-container"], r), t[4] = r, t[5] = a);
|
|
1049
1050
|
let o;
|
|
1050
1051
|
return t[6] !== n || t[7] !== i || t[8] !== a ? (o = /* @__PURE__ */ U("div", {
|
|
1051
1052
|
className: a,
|
|
1052
1053
|
...i,
|
|
1053
1054
|
children: n
|
|
1054
1055
|
}), t[6] = n, t[7] = i, t[8] = a, t[9] = o) : o = t[9], o;
|
|
1055
|
-
},
|
|
1056
|
+
}, on = (e) => {
|
|
1056
1057
|
let t = H(18), n, r, i, a, o;
|
|
1057
1058
|
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5]) : ({value: o, className: r, children: n, onClick: i, ...a} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o);
|
|
1058
|
-
let s =
|
|
1059
|
-
t[6] !== r || t[7] !== c ? (l = m(
|
|
1059
|
+
let s = nn(), c = s.selectedValue === o && Zt.active, l;
|
|
1060
|
+
t[6] !== r || t[7] !== c ? (l = m(Zt.tab, c, r), t[6] = r, t[7] = c, t[8] = l) : l = t[8];
|
|
1060
1061
|
let u;
|
|
1061
1062
|
t[9] !== s || t[10] !== i || t[11] !== o ? (u = (e) => {
|
|
1062
1063
|
s.setSelectedValue(o), i?.(e);
|
|
@@ -1068,18 +1069,18 @@ var en = t(null), tn = () => {
|
|
|
1068
1069
|
...a,
|
|
1069
1070
|
children: n
|
|
1070
1071
|
}), t[13] = n, t[14] = a, t[15] = l, t[16] = u, t[17] = d) : d = t[17], d;
|
|
1071
|
-
},
|
|
1072
|
+
}, sn = (e) => {
|
|
1072
1073
|
let t = H(17), n, r, i, a;
|
|
1073
1074
|
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4]) : ({value: a, className: r, children: n, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a);
|
|
1074
|
-
let o =
|
|
1075
|
-
t[5] === r ? s = t[6] : (s = m(
|
|
1075
|
+
let o = nn(), s;
|
|
1076
|
+
t[5] === r ? s = t[6] : (s = m(Zt["tab-content"], r), t[5] = r, t[6] = s);
|
|
1076
1077
|
let c = o.selectedValue === a, l;
|
|
1077
1078
|
t[7] === n ? l = t[8] : (l = /* @__PURE__ */ U("div", {
|
|
1078
|
-
className:
|
|
1079
|
+
className: Zt["tab-content-inner"],
|
|
1079
1080
|
children: n
|
|
1080
1081
|
}), t[7] = n, t[8] = l);
|
|
1081
1082
|
let u;
|
|
1082
|
-
t[9] !== o.transitionTimingFunction || t[10] !== c || t[11] !== l ? (u = /* @__PURE__ */ U(
|
|
1083
|
+
t[9] !== o.transitionTimingFunction || t[10] !== c || t[11] !== l ? (u = /* @__PURE__ */ U($t, {
|
|
1083
1084
|
direction: "row",
|
|
1084
1085
|
isOpen: c,
|
|
1085
1086
|
transitionTimingFunction: o.transitionTimingFunction,
|
|
@@ -1091,7 +1092,7 @@ var en = t(null), tn = () => {
|
|
|
1091
1092
|
...i,
|
|
1092
1093
|
children: u
|
|
1093
1094
|
}), t[13] = i, t[14] = s, t[15] = u, t[16] = d) : d = t[16], d;
|
|
1094
|
-
},
|
|
1095
|
+
}, cn = {
|
|
1095
1096
|
"elm-toggle": "_elm-toggle_18cr5_1",
|
|
1096
1097
|
open: "_open_18cr5_8",
|
|
1097
1098
|
summary: "_summary_18cr5_13",
|
|
@@ -1101,7 +1102,7 @@ var en = t(null), tn = () => {
|
|
|
1101
1102
|
cross: "_cross_18cr5_62",
|
|
1102
1103
|
border: "_border_18cr5_76",
|
|
1103
1104
|
content: "_content_18cr5_84"
|
|
1104
|
-
},
|
|
1105
|
+
}, ln = (e) => {
|
|
1105
1106
|
let t = H(57), n, r, i, a, o, s, c, l, u;
|
|
1106
1107
|
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5], s = t[6], c = t[7], l = t[8], u = t[9]) : ({className: r, summary: u, style: l, monochrome: o, isOpen: a, defaultIsOpen: i, onOpenChange: s, children: n, ...c} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o, t[6] = s, t[7] = c, t[8] = l, t[9] = u);
|
|
1107
1108
|
let d = i ?? !1, f;
|
|
@@ -1110,14 +1111,14 @@ var en = t(null), tn = () => {
|
|
|
1110
1111
|
defaultValue: d,
|
|
1111
1112
|
onChange: s
|
|
1112
1113
|
}, t[10] = a, t[11] = s, t[12] = d, t[13] = f) : f = t[13];
|
|
1113
|
-
let [p, h] =
|
|
1114
|
-
t[14] !== r || t[15] !== g ? (_ = m(
|
|
1114
|
+
let [p, h] = en(f), g = p && cn.open, _;
|
|
1115
|
+
t[14] !== r || t[15] !== g ? (_ = m(cn["elm-toggle"], g, r), t[14] = r, t[15] = g, t[16] = _) : _ = t[16];
|
|
1115
1116
|
let v;
|
|
1116
1117
|
t[17] === h ? v = t[18] : (v = (e) => {
|
|
1117
|
-
e.preventDefault(), h(
|
|
1118
|
+
e.preventDefault(), h(un);
|
|
1118
1119
|
}, t[17] = h, t[18] = v);
|
|
1119
|
-
let y = p &&
|
|
1120
|
-
t[19] === y ? b = t[20] : (b = m(
|
|
1120
|
+
let y = p && cn.open, b;
|
|
1121
|
+
t[19] === y ? b = t[20] : (b = m(cn.chevron, y), t[19] = y, t[20] = b);
|
|
1121
1122
|
let x = o ? "var(--elmethis-color-neutral-weak)" : "var(--elmethis-color-primary)", S;
|
|
1122
1123
|
t[21] === x ? S = t[22] : (S = /* @__PURE__ */ U(G, {
|
|
1123
1124
|
path: xe,
|
|
@@ -1135,13 +1136,13 @@ var en = t(null), tn = () => {
|
|
|
1135
1136
|
t[28] === w ? T = t[29] : (T = /* @__PURE__ */ U("div", { children: w }), t[28] = w, t[29] = T);
|
|
1136
1137
|
let E;
|
|
1137
1138
|
t[30] !== C || t[31] !== T ? (E = /* @__PURE__ */ W("div", {
|
|
1138
|
-
className:
|
|
1139
|
+
className: cn["summary-left"],
|
|
1139
1140
|
children: [C, T]
|
|
1140
1141
|
}), t[30] = C, t[31] = T, t[32] = E) : E = t[32];
|
|
1141
1142
|
let D;
|
|
1142
|
-
t[33] === Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ U("hr", { className:
|
|
1143
|
-
let O = p &&
|
|
1144
|
-
t[34] === O ? k = t[35] : (k = m(
|
|
1143
|
+
t[33] === Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ U("hr", { className: cn.divider }), t[33] = D) : D = t[33];
|
|
1144
|
+
let O = p && cn.open, k;
|
|
1145
|
+
t[34] === O ? k = t[35] : (k = m(cn.cross, O), t[34] = O, t[35] = k);
|
|
1145
1146
|
let A = o ? "var(--elmethis-color-neutral-weak)" : p ? "var(--elmethis-color-accent-error)" : "var(--elmethis-color-primary)", j;
|
|
1146
1147
|
t[36] === A ? j = t[37] : (j = /* @__PURE__ */ U(G, {
|
|
1147
1148
|
path: Ge,
|
|
@@ -1155,7 +1156,7 @@ var en = t(null), tn = () => {
|
|
|
1155
1156
|
}), t[38] = k, t[39] = j, t[40] = M) : M = t[40];
|
|
1156
1157
|
let N;
|
|
1157
1158
|
t[41] !== E || t[42] !== M || t[43] !== v ? (N = /* @__PURE__ */ W("div", {
|
|
1158
|
-
className:
|
|
1159
|
+
className: cn.summary,
|
|
1159
1160
|
onClick: v,
|
|
1160
1161
|
children: [
|
|
1161
1162
|
E,
|
|
@@ -1164,9 +1165,9 @@ var en = t(null), tn = () => {
|
|
|
1164
1165
|
]
|
|
1165
1166
|
}), t[41] = E, t[42] = M, t[43] = v, t[44] = N) : N = t[44];
|
|
1166
1167
|
let P;
|
|
1167
|
-
t[45] === Symbol.for("react.memo_cache_sentinel") ? (P = /* @__PURE__ */ U("div", { className:
|
|
1168
|
-
let F = p &&
|
|
1169
|
-
t[46] === F ? I = t[47] : (I = m(
|
|
1168
|
+
t[45] === Symbol.for("react.memo_cache_sentinel") ? (P = /* @__PURE__ */ U("div", { className: cn.border }), t[45] = P) : P = t[45];
|
|
1169
|
+
let F = p && cn.open, I;
|
|
1170
|
+
t[46] === F ? I = t[47] : (I = m(cn.content, F), t[46] = F, t[47] = I);
|
|
1170
1171
|
let L;
|
|
1171
1172
|
t[48] !== n || t[49] !== I ? (L = /* @__PURE__ */ U("div", {
|
|
1172
1173
|
className: I,
|
|
@@ -1184,33 +1185,33 @@ var en = t(null), tn = () => {
|
|
|
1184
1185
|
]
|
|
1185
1186
|
}), t[51] = c, t[52] = l, t[53] = N, t[54] = L, t[55] = _, t[56] = R) : R = t[56], R;
|
|
1186
1187
|
};
|
|
1187
|
-
function
|
|
1188
|
+
function un(e) {
|
|
1188
1189
|
return !e;
|
|
1189
1190
|
}
|
|
1190
|
-
var
|
|
1191
|
+
var dn = {
|
|
1191
1192
|
"elm-block-quote": "_elm-block-quote_1ez87_1",
|
|
1192
1193
|
body: "_body_1ez87_19",
|
|
1193
1194
|
icon: "_icon_1ez87_28",
|
|
1194
1195
|
"icon-top-left": "_icon-top-left_1ez87_33",
|
|
1195
1196
|
"icon-bottom-right": "_icon-bottom-right_1ez87_37"
|
|
1196
|
-
},
|
|
1197
|
+
}, fn = (e) => {
|
|
1197
1198
|
let t = H(14), n, r, i;
|
|
1198
1199
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({className: r, children: n, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
1199
1200
|
let a;
|
|
1200
|
-
t[4] === r ? a = t[5] : (a = m(
|
|
1201
|
+
t[4] === r ? a = t[5] : (a = m(dn["elm-block-quote"], dt.text, r), t[4] = r, t[5] = a);
|
|
1201
1202
|
let o;
|
|
1202
1203
|
t[6] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ U("div", {
|
|
1203
|
-
className: m(
|
|
1204
|
+
className: m(dn.icon, dn["icon-top-left"]),
|
|
1204
1205
|
children: /* @__PURE__ */ U(G, { path: Ne })
|
|
1205
1206
|
}), t[6] = o) : o = t[6];
|
|
1206
1207
|
let s;
|
|
1207
1208
|
t[7] === n ? s = t[8] : (s = /* @__PURE__ */ U("div", {
|
|
1208
|
-
className:
|
|
1209
|
+
className: dn.body,
|
|
1209
1210
|
children: n
|
|
1210
1211
|
}), t[7] = n, t[8] = s);
|
|
1211
1212
|
let c;
|
|
1212
1213
|
t[9] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ U("div", {
|
|
1213
|
-
className: m(
|
|
1214
|
+
className: m(dn.icon, dn["icon-bottom-right"]),
|
|
1214
1215
|
children: /* @__PURE__ */ U(G, { path: Me })
|
|
1215
1216
|
}), t[9] = c) : c = t[9];
|
|
1216
1217
|
let l;
|
|
@@ -1223,7 +1224,7 @@ var un = {
|
|
|
1223
1224
|
c
|
|
1224
1225
|
]
|
|
1225
1226
|
}), t[10] = i, t[11] = a, t[12] = s, t[13] = l) : l = t[13], l;
|
|
1226
|
-
},
|
|
1227
|
+
}, pn = {
|
|
1227
1228
|
"elm-callout": "_elm-callout_1nsmp_1",
|
|
1228
1229
|
header: "_header_1nsmp_26",
|
|
1229
1230
|
content: "_content_1nsmp_35",
|
|
@@ -1233,28 +1234,28 @@ var un = {
|
|
|
1233
1234
|
important: "_important_1nsmp_55",
|
|
1234
1235
|
warning: "_warning_1nsmp_59",
|
|
1235
1236
|
caution: "_caution_1nsmp_63"
|
|
1236
|
-
},
|
|
1237
|
+
}, mn = Object.freeze({
|
|
1237
1238
|
note: Ie,
|
|
1238
1239
|
tip: Le,
|
|
1239
1240
|
important: qe,
|
|
1240
1241
|
warning: me,
|
|
1241
1242
|
caution: ge
|
|
1242
|
-
}),
|
|
1243
|
-
className: m(
|
|
1243
|
+
}), hn = ({ className: e, type: t = "note", style: n, children: r, ...i }) => /* @__PURE__ */ W("aside", {
|
|
1244
|
+
className: m(pn["elm-callout"], pn[t], e),
|
|
1244
1245
|
style: n,
|
|
1245
1246
|
...i,
|
|
1246
1247
|
children: [/* @__PURE__ */ W("div", {
|
|
1247
|
-
className:
|
|
1248
|
+
className: pn.header,
|
|
1248
1249
|
children: [/* @__PURE__ */ U(G, {
|
|
1249
|
-
className:
|
|
1250
|
-
path:
|
|
1250
|
+
className: pn.icon,
|
|
1251
|
+
path: mn[t],
|
|
1251
1252
|
size: "1.25rem"
|
|
1252
1253
|
}), /* @__PURE__ */ U("span", { children: t })]
|
|
1253
1254
|
}), /* @__PURE__ */ U("div", {
|
|
1254
|
-
className:
|
|
1255
|
+
className: pn.content,
|
|
1255
1256
|
children: r
|
|
1256
1257
|
})]
|
|
1257
|
-
}),
|
|
1258
|
+
}), gn = {
|
|
1258
1259
|
"elm-notion-callout": "_elm-notion-callout_15idh_1",
|
|
1259
1260
|
icon: "_icon_15idh_9",
|
|
1260
1261
|
content: "_content_15idh_15",
|
|
@@ -1270,34 +1271,34 @@ var un = {
|
|
|
1270
1271
|
blue: "_blue_15idh_74",
|
|
1271
1272
|
purple: "_purple_15idh_79",
|
|
1272
1273
|
magenta: "_magenta_15idh_86"
|
|
1273
|
-
},
|
|
1274
|
-
className: m(
|
|
1274
|
+
}, _n = ({ className: e, style: t, icon: n, color: r = "gray", variant: i = "filled", children: a, ...o }) => /* @__PURE__ */ W("div", {
|
|
1275
|
+
className: m(gn["elm-notion-callout"], gn[r], gn[i], e),
|
|
1275
1276
|
style: t,
|
|
1276
1277
|
...o,
|
|
1277
1278
|
children: [n !== void 0 && (n.kind === "emoji" ? /* @__PURE__ */ U("span", {
|
|
1278
|
-
className:
|
|
1279
|
+
className: gn.icon,
|
|
1279
1280
|
role: "img",
|
|
1280
1281
|
children: n.emoji
|
|
1281
|
-
}) : /* @__PURE__ */ U(
|
|
1282
|
-
className:
|
|
1282
|
+
}) : /* @__PURE__ */ U(Ct, {
|
|
1283
|
+
className: gn.icon,
|
|
1283
1284
|
src: n.src,
|
|
1284
1285
|
alt: n.alt,
|
|
1285
1286
|
size: 20
|
|
1286
1287
|
})), /* @__PURE__ */ U("div", {
|
|
1287
|
-
className:
|
|
1288
|
+
className: gn.content,
|
|
1288
1289
|
children: a
|
|
1289
1290
|
})]
|
|
1290
|
-
}),
|
|
1291
|
+
}), vn = { "elm-divider": "_elm-divider_9m6gb_1" }, yn = (e) => {
|
|
1291
1292
|
let t = H(8), n, r;
|
|
1292
1293
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
1293
1294
|
let i;
|
|
1294
|
-
t[3] === n ? i = t[4] : (i = m(
|
|
1295
|
+
t[3] === n ? i = t[4] : (i = m(vn["elm-divider"], n), t[3] = n, t[4] = i);
|
|
1295
1296
|
let a;
|
|
1296
1297
|
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */ U("hr", {
|
|
1297
1298
|
className: i,
|
|
1298
1299
|
...r
|
|
1299
1300
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
1300
|
-
},
|
|
1301
|
+
}, bn = {
|
|
1301
1302
|
"elm-heading": "_elm-heading_1fuld_1",
|
|
1302
1303
|
h1: "_h1_1fuld_12",
|
|
1303
1304
|
h2: "_h2_1fuld_34",
|
|
@@ -1306,11 +1307,11 @@ var un = {
|
|
|
1306
1307
|
h4: "_h4_1fuld_86",
|
|
1307
1308
|
h5: "_h5_1fuld_90",
|
|
1308
1309
|
h6: "_h6_1fuld_94"
|
|
1309
|
-
},
|
|
1310
|
+
}, xn = { "elm-fragment-identifier": "_elm-fragment-identifier_xb2v4_1" }, Sn = (e) => {
|
|
1310
1311
|
let t = H(12), n, r, i;
|
|
1311
1312
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({className: n, id: r, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
1312
|
-
let a =
|
|
1313
|
-
t[4] === n ? o = t[5] : (o = m(
|
|
1313
|
+
let a = Cn, o;
|
|
1314
|
+
t[4] === n ? o = t[5] : (o = m(xn["elm-fragment-identifier"], n), t[4] = n, t[5] = o);
|
|
1314
1315
|
let s;
|
|
1315
1316
|
t[6] === r ? s = t[7] : (s = () => a(r), t[6] = r, t[7] = s);
|
|
1316
1317
|
let c;
|
|
@@ -1321,32 +1322,32 @@ var un = {
|
|
|
1321
1322
|
children: "#"
|
|
1322
1323
|
}), t[8] = i, t[9] = o, t[10] = s, t[11] = c) : c = t[11], c;
|
|
1323
1324
|
};
|
|
1324
|
-
function
|
|
1325
|
+
function Cn(e) {
|
|
1325
1326
|
let t = new URL(window.location.href);
|
|
1326
1327
|
t.hash = e, window.history.replaceState(null, "", t.toString()), document.getElementById(e)?.scrollIntoView({ behavior: "smooth" });
|
|
1327
1328
|
}
|
|
1328
1329
|
//#endregion
|
|
1329
1330
|
//#region src/components/typography/elm-heading.tsx
|
|
1330
|
-
var
|
|
1331
|
+
var wn = Object.freeze({
|
|
1331
1332
|
1: 1.5,
|
|
1332
1333
|
2: 1.4,
|
|
1333
1334
|
3: 1.3,
|
|
1334
1335
|
4: 1.2,
|
|
1335
1336
|
5: 1.15,
|
|
1336
1337
|
6: 1.1
|
|
1337
|
-
}),
|
|
1338
|
+
}), Tn = [
|
|
1338
1339
|
"h1",
|
|
1339
1340
|
"h2",
|
|
1340
1341
|
"h3",
|
|
1341
1342
|
"h4",
|
|
1342
1343
|
"h5",
|
|
1343
1344
|
"h6"
|
|
1344
|
-
],
|
|
1345
|
+
], En = (e) => {
|
|
1345
1346
|
let t = H(30), n, r, i, a, o, s, c;
|
|
1346
1347
|
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5], s = t[6], c = t[7]) : ({className: r, level: a, text: c, id: i, style: s, children: n, ...o} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o, t[6] = s, t[7] = c);
|
|
1347
|
-
let l =
|
|
1348
|
-
t[8] !== r || t[9] !== u ? (d = m(
|
|
1349
|
-
let f = `${
|
|
1348
|
+
let l = Tn[a - 1], u = bn[`h${a}`], d;
|
|
1349
|
+
t[8] !== r || t[9] !== u ? (d = m(bn["elm-heading"], dt.text, u, r), t[8] = r, t[9] = u, t[10] = d) : d = t[10];
|
|
1350
|
+
let f = `${wn[a]}em`, p;
|
|
1350
1351
|
t[11] !== s || t[12] !== f ? (p = {
|
|
1351
1352
|
"--elmethis-scoped-font-size": f,
|
|
1352
1353
|
...s
|
|
@@ -1356,11 +1357,11 @@ var Cn = Object.freeze({
|
|
|
1356
1357
|
let _;
|
|
1357
1358
|
t[16] === i ? _ = t[17] : (_ = i && /* @__PURE__ */ U("span", {
|
|
1358
1359
|
style: { padding: "0.5rem" },
|
|
1359
|
-
children: /* @__PURE__ */ U(
|
|
1360
|
+
children: /* @__PURE__ */ U(Sn, { id: i })
|
|
1360
1361
|
}), t[16] = i, t[17] = _);
|
|
1361
1362
|
let v;
|
|
1362
1363
|
t[18] === a ? v = t[19] : (v = a === 2 && /* @__PURE__ */ U("span", {
|
|
1363
|
-
className:
|
|
1364
|
+
className: bn["h2-underline"],
|
|
1364
1365
|
"aria-hidden": "true"
|
|
1365
1366
|
}), t[18] = a, t[19] = v);
|
|
1366
1367
|
let y;
|
|
@@ -1376,23 +1377,23 @@ var Cn = Object.freeze({
|
|
|
1376
1377
|
v
|
|
1377
1378
|
]
|
|
1378
1379
|
}), t[20] = l, t[21] = n, t[22] = i, t[23] = o, t[24] = d, t[25] = h, t[26] = g, t[27] = _, t[28] = v, t[29] = y) : y = t[29], y;
|
|
1379
|
-
},
|
|
1380
|
+
}, Dn = {
|
|
1380
1381
|
"elm-list": "_elm-list_brpi5_1",
|
|
1381
1382
|
bulleted: "_bulleted_brpi5_8",
|
|
1382
1383
|
numbered: "_numbered_brpi5_57"
|
|
1383
|
-
},
|
|
1384
|
-
className: m(
|
|
1384
|
+
}, On = ({ className: e, listStyle: t = "unordered", children: n, ...r }) => t === "ordered" ? /* @__PURE__ */ U("ol", {
|
|
1385
|
+
className: m(dt.text, Dn["elm-list"], Dn.numbered, e),
|
|
1385
1386
|
...r,
|
|
1386
1387
|
children: n
|
|
1387
1388
|
}) : /* @__PURE__ */ U("ul", {
|
|
1388
|
-
className: m(
|
|
1389
|
+
className: m(dt.text, Dn["elm-list"], Dn.bulleted, e),
|
|
1389
1390
|
...r,
|
|
1390
1391
|
children: n
|
|
1391
|
-
}),
|
|
1392
|
+
}), kn = { "elm-paragraph": "_elm-paragraph_y4o6n_1" }, An = (e) => {
|
|
1392
1393
|
let t = H(18), n, r, i, a, o, s;
|
|
1393
1394
|
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5], s = t[6]) : ({className: i, style: s, color: a, backgroundColor: n, children: r, ...o} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o, t[6] = s);
|
|
1394
1395
|
let c;
|
|
1395
|
-
t[7] === i ? c = t[8] : (c = m(
|
|
1396
|
+
t[7] === i ? c = t[8] : (c = m(kn["elm-paragraph"], dt.text, i), t[7] = i, t[8] = c);
|
|
1396
1397
|
let l;
|
|
1397
1398
|
t[9] !== n || t[10] !== a || t[11] !== s ? (l = {
|
|
1398
1399
|
...s,
|
|
@@ -1406,7 +1407,7 @@ var Cn = Object.freeze({
|
|
|
1406
1407
|
...o,
|
|
1407
1408
|
children: r
|
|
1408
1409
|
}), t[13] = r, t[14] = o, t[15] = c, t[16] = u, t[17] = d) : d = t[17], d;
|
|
1409
|
-
},
|
|
1410
|
+
}, jn = {
|
|
1410
1411
|
"elm-table-frame": "_elm-table-frame_zk7x1_3",
|
|
1411
1412
|
"elm-table-scroll": "_elm-table-scroll_zk7x1_49",
|
|
1412
1413
|
"elm-table": "_elm-table_zk7x1_3",
|
|
@@ -1414,7 +1415,7 @@ var Cn = Object.freeze({
|
|
|
1414
1415
|
"caption-inner": "_caption-inner_zk7x1_77",
|
|
1415
1416
|
spacing: "_spacing_zk7x1_84",
|
|
1416
1417
|
"sticky-row-header": "_sticky-row-header_zk7x1_95"
|
|
1417
|
-
},
|
|
1418
|
+
}, Mn = t({ value: !1 }), Nn = t("body"), Pn = () => {
|
|
1418
1419
|
let e = H(5), t = d(null), n;
|
|
1419
1420
|
e[0] === Symbol.for("react.memo_cache_sentinel") ? (n = {
|
|
1420
1421
|
canScroll: !1,
|
|
@@ -1444,74 +1445,74 @@ var Cn = Object.freeze({
|
|
|
1444
1445
|
ref: t,
|
|
1445
1446
|
...r
|
|
1446
1447
|
}, e[3] = r, e[4] = c), c;
|
|
1447
|
-
},
|
|
1448
|
-
let a = l(() => ({ value: n }), [n]), { ref: o, canScroll: s, atStart: c, atEnd: u } =
|
|
1449
|
-
return /* @__PURE__ */ U(
|
|
1448
|
+
}, Fn = ({ className: e, caption: t, hasRowHeader: n = !1, children: r, ...i }) => {
|
|
1449
|
+
let a = l(() => ({ value: n }), [n]), { ref: o, canScroll: s, atStart: c, atEnd: u } = Pn();
|
|
1450
|
+
return /* @__PURE__ */ U(Mn.Provider, {
|
|
1450
1451
|
value: a,
|
|
1451
1452
|
children: /* @__PURE__ */ U("div", {
|
|
1452
|
-
className:
|
|
1453
|
+
className: jn["elm-table-frame"],
|
|
1453
1454
|
"data-overflow-start": s && !c ? "" : void 0,
|
|
1454
1455
|
"data-overflow-end": s && !u ? "" : void 0,
|
|
1455
1456
|
children: /* @__PURE__ */ U("div", {
|
|
1456
1457
|
ref: o,
|
|
1457
|
-
className:
|
|
1458
|
+
className: jn["elm-table-scroll"],
|
|
1458
1459
|
tabIndex: s ? 0 : void 0,
|
|
1459
1460
|
role: s && t != null ? "region" : void 0,
|
|
1460
1461
|
"aria-label": s && t != null ? t : void 0,
|
|
1461
1462
|
children: /* @__PURE__ */ W("table", {
|
|
1462
|
-
className: m(
|
|
1463
|
+
className: m(jn["elm-table"], dt.text, n && jn["sticky-row-header"], e),
|
|
1463
1464
|
...i,
|
|
1464
1465
|
children: [t && /* @__PURE__ */ U("caption", { children: /* @__PURE__ */ W("span", {
|
|
1465
|
-
className:
|
|
1466
|
+
className: jn.caption,
|
|
1466
1467
|
children: [
|
|
1467
|
-
/* @__PURE__ */ U("span", { className:
|
|
1468
|
+
/* @__PURE__ */ U("span", { className: jn.spacing }),
|
|
1468
1469
|
/* @__PURE__ */ U("span", {
|
|
1469
|
-
className:
|
|
1470
|
+
className: jn["caption-inner"],
|
|
1470
1471
|
children: /* @__PURE__ */ U(K, { children: t })
|
|
1471
1472
|
}),
|
|
1472
|
-
/* @__PURE__ */ U("span", { className:
|
|
1473
|
+
/* @__PURE__ */ U("span", { className: jn.spacing })
|
|
1473
1474
|
]
|
|
1474
1475
|
}) }), r]
|
|
1475
1476
|
})
|
|
1476
1477
|
})
|
|
1477
1478
|
})
|
|
1478
1479
|
});
|
|
1479
|
-
},
|
|
1480
|
+
}, In = (e) => {
|
|
1480
1481
|
let t = H(6), n, r;
|
|
1481
1482
|
t[0] === e ? (n = t[1], r = t[2]) : ({children: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
1482
1483
|
let i;
|
|
1483
|
-
return t[3] !== n || t[4] !== r ? (i = /* @__PURE__ */ U(
|
|
1484
|
+
return t[3] !== n || t[4] !== r ? (i = /* @__PURE__ */ U(Nn.Provider, {
|
|
1484
1485
|
value: "body",
|
|
1485
1486
|
children: /* @__PURE__ */ U("tbody", {
|
|
1486
1487
|
...r,
|
|
1487
1488
|
children: n
|
|
1488
1489
|
})
|
|
1489
1490
|
}), t[3] = n, t[4] = r, t[5] = i) : i = t[5], i;
|
|
1490
|
-
},
|
|
1491
|
+
}, Ln = {
|
|
1491
1492
|
"elm-table-cell": "_elm-table-cell_1a21f_1",
|
|
1492
1493
|
td: "_td_1a21f_20",
|
|
1493
1494
|
th: "_th_1a21f_25"
|
|
1494
|
-
},
|
|
1495
|
-
let l = o(
|
|
1495
|
+
}, Rn = ({ className: e, style: t, isHeader: n = !1, columnIndex: r, text: i, scope: a, children: s, ...c }) => {
|
|
1496
|
+
let l = o(Nn), u = o(Mn), d = l === "head", f = !d && !n && r === 0 && u.value, p = d || n || f, h = a ?? (d ? "col" : f ? "row" : void 0), g = i ?? s;
|
|
1496
1497
|
return p ? /* @__PURE__ */ U("th", {
|
|
1497
|
-
className: m(
|
|
1498
|
+
className: m(Ln["elm-table-cell"], Ln.th, e),
|
|
1498
1499
|
style: t,
|
|
1499
1500
|
scope: h,
|
|
1500
1501
|
...c,
|
|
1501
1502
|
children: g
|
|
1502
1503
|
}) : /* @__PURE__ */ U("td", {
|
|
1503
|
-
className: m(
|
|
1504
|
+
className: m(Ln["elm-table-cell"], Ln.td, e),
|
|
1504
1505
|
style: t,
|
|
1505
1506
|
...c,
|
|
1506
1507
|
children: g
|
|
1507
1508
|
});
|
|
1508
|
-
},
|
|
1509
|
+
}, zn = { "elm-table-header": "_elm-table-header_jhft7_1" }, Bn = (e) => {
|
|
1509
1510
|
let t = H(10), n, r, i;
|
|
1510
1511
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({className: r, children: n, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
1511
1512
|
let a;
|
|
1512
|
-
t[4] === r ? a = t[5] : (a = m(
|
|
1513
|
+
t[4] === r ? a = t[5] : (a = m(zn["elm-table-header"], r), t[4] = r, t[5] = a);
|
|
1513
1514
|
let o;
|
|
1514
|
-
return t[6] !== n || t[7] !== i || t[8] !== a ? (o = /* @__PURE__ */ U(
|
|
1515
|
+
return t[6] !== n || t[7] !== i || t[8] !== a ? (o = /* @__PURE__ */ U(Nn.Provider, {
|
|
1515
1516
|
value: "head",
|
|
1516
1517
|
children: /* @__PURE__ */ U("thead", {
|
|
1517
1518
|
className: a,
|
|
@@ -1519,41 +1520,41 @@ var Cn = Object.freeze({
|
|
|
1519
1520
|
children: n
|
|
1520
1521
|
})
|
|
1521
1522
|
}), t[6] = n, t[7] = i, t[8] = a, t[9] = o) : o = t[9], o;
|
|
1522
|
-
},
|
|
1523
|
+
}, Vn = { "elm-table-row": "_elm-table-row_mkm0q_1" }, Hn = (e) => {
|
|
1523
1524
|
let t = H(10), n, r, i;
|
|
1524
1525
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({className: r, children: n, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
1525
1526
|
let a;
|
|
1526
|
-
t[4] === r ? a = t[5] : (a = m(
|
|
1527
|
+
t[4] === r ? a = t[5] : (a = m(Vn["elm-table-row"], r), t[4] = r, t[5] = a);
|
|
1527
1528
|
let o;
|
|
1528
1529
|
return t[6] !== n || t[7] !== i || t[8] !== a ? (o = /* @__PURE__ */ U("tr", {
|
|
1529
1530
|
className: a,
|
|
1530
1531
|
...i,
|
|
1531
1532
|
children: n
|
|
1532
1533
|
}), t[6] = n, t[7] = i, t[8] = a, t[9] = o) : o = t[9], o;
|
|
1533
|
-
},
|
|
1534
|
+
}, Un = {
|
|
1534
1535
|
"elm-unsupported-block": "_elm-unsupported-block_8bkk1_1",
|
|
1535
1536
|
message: "_message_8bkk1_13",
|
|
1536
1537
|
icon: "_icon_8bkk1_20",
|
|
1537
1538
|
details: "_details_8bkk1_24"
|
|
1538
|
-
},
|
|
1539
|
+
}, Wn = (e) => {
|
|
1539
1540
|
let t = H(13), n, r, i;
|
|
1540
1541
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({className: n, details: r, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
1541
1542
|
let a;
|
|
1542
|
-
t[4] === n ? a = t[5] : (a = m(
|
|
1543
|
+
t[4] === n ? a = t[5] : (a = m(Un["elm-unsupported-block"], n), t[4] = n, t[5] = a);
|
|
1543
1544
|
let o;
|
|
1544
1545
|
t[6] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ W("div", {
|
|
1545
|
-
className:
|
|
1546
|
+
className: Un.message,
|
|
1546
1547
|
children: [/* @__PURE__ */ U("svg", {
|
|
1547
1548
|
viewBox: "0 0 24 24",
|
|
1548
1549
|
width: "1.25rem",
|
|
1549
1550
|
height: "1.25rem",
|
|
1550
|
-
className:
|
|
1551
|
+
className: Un.icon,
|
|
1551
1552
|
children: /* @__PURE__ */ U("path", { d: "M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" })
|
|
1552
1553
|
}), /* @__PURE__ */ U(K, { children: "UNSUPPORTED BLOCK" })]
|
|
1553
1554
|
}), t[6] = o) : o = t[6];
|
|
1554
1555
|
let s;
|
|
1555
1556
|
t[7] === r ? s = t[8] : (s = r && /* @__PURE__ */ U("div", {
|
|
1556
|
-
className:
|
|
1557
|
+
className: Un.details,
|
|
1557
1558
|
children: /* @__PURE__ */ U(K, { children: r })
|
|
1558
1559
|
}), t[7] = r, t[8] = s);
|
|
1559
1560
|
let c;
|
|
@@ -1562,7 +1563,7 @@ var Cn = Object.freeze({
|
|
|
1562
1563
|
...i,
|
|
1563
1564
|
children: [o, s]
|
|
1564
1565
|
}), t[9] = i, t[10] = a, t[11] = s, t[12] = c) : c = t[12], c;
|
|
1565
|
-
},
|
|
1566
|
+
}, Gn = {
|
|
1566
1567
|
start: "flex-start",
|
|
1567
1568
|
end: "flex-end",
|
|
1568
1569
|
center: "center",
|
|
@@ -1570,7 +1571,7 @@ var Cn = Object.freeze({
|
|
|
1570
1571
|
spaceAround: "space-around",
|
|
1571
1572
|
spaceEvenly: "space-evenly",
|
|
1572
1573
|
stretch: "stretch"
|
|
1573
|
-
},
|
|
1574
|
+
}, Kn = {
|
|
1574
1575
|
start: "flex-start",
|
|
1575
1576
|
end: "flex-end",
|
|
1576
1577
|
center: "center",
|
|
@@ -1585,7 +1586,7 @@ function J(t, n) {
|
|
|
1585
1586
|
return typeof t == "string" ? /* @__PURE__ */ U(e, { children: n(t) }, `${t}-${r}`) : null;
|
|
1586
1587
|
}) : null;
|
|
1587
1588
|
}
|
|
1588
|
-
function
|
|
1589
|
+
function qn(e) {
|
|
1589
1590
|
return Array.isArray(e) ? e.flatMap((e) => {
|
|
1590
1591
|
if (typeof e == "string") return [{ id: e }];
|
|
1591
1592
|
if (e && typeof e == "object" && "id" in e) {
|
|
@@ -1598,12 +1599,12 @@ function Kn(e) {
|
|
|
1598
1599
|
return [];
|
|
1599
1600
|
}) : [];
|
|
1600
1601
|
}
|
|
1601
|
-
function
|
|
1602
|
+
function Jn(e) {
|
|
1602
1603
|
return Array.isArray(e) ? e.map((e) => typeof e == "string" ? e : e && typeof e == "object" && "id" in e ? e.id : null).filter((e) => typeof e == "string") : [];
|
|
1603
1604
|
}
|
|
1604
1605
|
//#endregion
|
|
1605
1606
|
//#region src/components/a2ui/catalog/notion-block-catalog.tsx
|
|
1606
|
-
var
|
|
1607
|
+
var Yn = "https://a2ui.org/specification/v0_9/basic_catalog.json", Xn = {
|
|
1607
1608
|
boxSizing: "content-box",
|
|
1608
1609
|
paddingBlock: "0.25rem",
|
|
1609
1610
|
width: "100%",
|
|
@@ -1612,10 +1613,10 @@ var Jn = "https://a2ui.org/specification/v0_9/basic_catalog.json", Yn = {
|
|
|
1612
1613
|
gap: "0.25rem",
|
|
1613
1614
|
justifyContent: "space-around",
|
|
1614
1615
|
overflowX: "auto"
|
|
1615
|
-
},
|
|
1616
|
+
}, Zn = [
|
|
1616
1617
|
y(re, ({ props: e }) => {
|
|
1617
1618
|
let t = e.decoration ?? [];
|
|
1618
|
-
return t.includes("katex") ? /* @__PURE__ */ U(
|
|
1619
|
+
return t.includes("katex") ? /* @__PURE__ */ U(pt, {
|
|
1619
1620
|
expression: e.text,
|
|
1620
1621
|
block: !1
|
|
1621
1622
|
}) : /* @__PURE__ */ U(K, {
|
|
@@ -1634,7 +1635,7 @@ var Jn = "https://a2ui.org/specification/v0_9/basic_catalog.json", Yn = {
|
|
|
1634
1635
|
favicon: e.favicon,
|
|
1635
1636
|
children: e.text
|
|
1636
1637
|
})),
|
|
1637
|
-
y(L, ({ props: e }) => /* @__PURE__ */ U(
|
|
1638
|
+
y(L, ({ props: e }) => /* @__PURE__ */ U(Ct, {
|
|
1638
1639
|
src: e.src,
|
|
1639
1640
|
alt: e.alt
|
|
1640
1641
|
})),
|
|
@@ -1642,8 +1643,8 @@ var Jn = "https://a2ui.org/specification/v0_9/basic_catalog.json", Yn = {
|
|
|
1642
1643
|
style: {
|
|
1643
1644
|
display: "flex",
|
|
1644
1645
|
flexDirection: "column",
|
|
1645
|
-
justifyContent:
|
|
1646
|
-
alignItems:
|
|
1646
|
+
justifyContent: Gn[e.justify ?? "start"],
|
|
1647
|
+
alignItems: Kn[e.align ?? "stretch"],
|
|
1647
1648
|
flex: e.widthRatio == null ? void 0 : String(e.widthRatio),
|
|
1648
1649
|
boxSizing: "border-box",
|
|
1649
1650
|
padding: "0.125rem",
|
|
@@ -1652,53 +1653,53 @@ var Jn = "https://a2ui.org/specification/v0_9/basic_catalog.json", Yn = {
|
|
|
1652
1653
|
children: J(e.children, t)
|
|
1653
1654
|
})),
|
|
1654
1655
|
y(A, ({ props: e, buildChild: t }) => /* @__PURE__ */ U("div", {
|
|
1655
|
-
style:
|
|
1656
|
+
style: Xn,
|
|
1656
1657
|
children: J(e.children, t)
|
|
1657
1658
|
})),
|
|
1658
|
-
y(F, ({ props: e, buildChild: t }) => /* @__PURE__ */ U(
|
|
1659
|
+
y(F, ({ props: e, buildChild: t }) => /* @__PURE__ */ U(En, {
|
|
1659
1660
|
level: e.level,
|
|
1660
1661
|
children: J(e.children, t)
|
|
1661
1662
|
})),
|
|
1662
|
-
y(ne, ({ props: e, buildChild: t }) => /* @__PURE__ */ U(
|
|
1663
|
+
y(ne, ({ props: e, buildChild: t }) => /* @__PURE__ */ U(An, {
|
|
1663
1664
|
color: e.color,
|
|
1664
1665
|
backgroundColor: e.backgroundColor,
|
|
1665
1666
|
children: J(e.children, t)
|
|
1666
1667
|
})),
|
|
1667
|
-
y(B, ({ props: e, buildChild: t }) => /* @__PURE__ */ U(
|
|
1668
|
+
y(B, ({ props: e, buildChild: t }) => /* @__PURE__ */ U(On, {
|
|
1668
1669
|
listStyle: e.style ?? "unordered",
|
|
1669
|
-
children:
|
|
1670
|
+
children: qn(e.children).map(({ id: e, basePath: n }, r) => /* @__PURE__ */ U("li", { children: t(e, n) }, `${e}:${r}`))
|
|
1670
1671
|
})),
|
|
1671
1672
|
y(V, ({ props: e, buildChild: t }) => /* @__PURE__ */ U(pe, { children: J(e.children, t) })),
|
|
1672
|
-
y(T, ({ props: e, buildChild: t }) => /* @__PURE__ */ U(
|
|
1673
|
+
y(T, ({ props: e, buildChild: t }) => /* @__PURE__ */ U(fn, {
|
|
1673
1674
|
cite: e.cite,
|
|
1674
1675
|
children: J(e.children, t)
|
|
1675
1676
|
})),
|
|
1676
|
-
y(D, ({ props: e, buildChild: t }) => /* @__PURE__ */ U(
|
|
1677
|
+
y(D, ({ props: e, buildChild: t }) => /* @__PURE__ */ U(hn, {
|
|
1677
1678
|
type: e.type,
|
|
1678
1679
|
children: J(e.children, t)
|
|
1679
1680
|
})),
|
|
1680
|
-
y(te, ({ props: e, buildChild: t }) => /* @__PURE__ */ U(
|
|
1681
|
+
y(te, ({ props: e, buildChild: t }) => /* @__PURE__ */ U(_n, {
|
|
1681
1682
|
icon: e.icon,
|
|
1682
1683
|
color: e.color,
|
|
1683
1684
|
variant: e.variant,
|
|
1684
1685
|
children: J(e.children, t)
|
|
1685
1686
|
})),
|
|
1686
|
-
y(N, () => /* @__PURE__ */ U(
|
|
1687
|
-
y(se, ({ props: e, buildChild: t }) => /* @__PURE__ */ U(
|
|
1687
|
+
y(N, () => /* @__PURE__ */ U(yn, {})),
|
|
1688
|
+
y(se, ({ props: e, buildChild: t }) => /* @__PURE__ */ U(ln, {
|
|
1688
1689
|
summary: J(e.summary, t),
|
|
1689
1690
|
children: J(e.children, t)
|
|
1690
1691
|
})),
|
|
1691
|
-
y(E, ({ props: e }) => /* @__PURE__ */ U(
|
|
1692
|
+
y(E, ({ props: e }) => /* @__PURE__ */ U(Xt, {
|
|
1692
1693
|
url: e.url,
|
|
1693
1694
|
title: e.title,
|
|
1694
1695
|
description: e.description,
|
|
1695
1696
|
image: e.image
|
|
1696
1697
|
})),
|
|
1697
|
-
y(P, ({ props: e }) => /* @__PURE__ */ U(
|
|
1698
|
+
y(P, ({ props: e }) => /* @__PURE__ */ U(qt, {
|
|
1698
1699
|
src: e.src,
|
|
1699
1700
|
name: e.name
|
|
1700
1701
|
})),
|
|
1701
|
-
y(C, ({ props: e }) => /* @__PURE__ */ U(
|
|
1702
|
+
y(C, ({ props: e }) => /* @__PURE__ */ U(zt, {
|
|
1702
1703
|
src: e.src,
|
|
1703
1704
|
title: e.title,
|
|
1704
1705
|
artist: e.artist,
|
|
@@ -1724,7 +1725,7 @@ var Jn = "https://a2ui.org/specification/v0_9/basic_catalog.json", Yn = {
|
|
|
1724
1725
|
}
|
|
1725
1726
|
}), e.caption ? /* @__PURE__ */ U("figcaption", { children: e.caption }) : null]
|
|
1726
1727
|
})),
|
|
1727
|
-
y(w, ({ props: e }) => /* @__PURE__ */ U(
|
|
1728
|
+
y(w, ({ props: e }) => /* @__PURE__ */ U(Wt, {
|
|
1728
1729
|
src: e.src,
|
|
1729
1730
|
alt: e.alt,
|
|
1730
1731
|
width: e.width,
|
|
@@ -1734,62 +1735,62 @@ var Jn = "https://a2ui.org/specification/v0_9/basic_catalog.json", Yn = {
|
|
|
1734
1735
|
caption: e.caption,
|
|
1735
1736
|
enableModal: !0
|
|
1736
1737
|
})),
|
|
1737
|
-
y(I, ({ props: e }) => /* @__PURE__ */ U(
|
|
1738
|
+
y(I, ({ props: e }) => /* @__PURE__ */ U(It, {
|
|
1738
1739
|
html: e.html,
|
|
1739
1740
|
src: e.src,
|
|
1740
1741
|
autoHeight: e.autoHeight,
|
|
1741
1742
|
allowScripts: e.allowScripts ?? !0,
|
|
1742
1743
|
height: e.height ?? 400
|
|
1743
1744
|
})),
|
|
1744
|
-
y(O, ({ props: e }) => /* @__PURE__ */ U(
|
|
1745
|
+
y(O, ({ props: e }) => /* @__PURE__ */ U(kt, {
|
|
1745
1746
|
code: e.code,
|
|
1746
1747
|
language: e.language,
|
|
1747
1748
|
caption: e.caption
|
|
1748
1749
|
})),
|
|
1749
|
-
y(R, ({ props: e }) => /* @__PURE__ */ U(
|
|
1750
|
+
y(R, ({ props: e }) => /* @__PURE__ */ U(pt, {
|
|
1750
1751
|
expression: e.expression,
|
|
1751
1752
|
block: !0
|
|
1752
1753
|
})),
|
|
1753
|
-
y(ee, ({ props: e }) => /* @__PURE__ */ U(
|
|
1754
|
+
y(ee, ({ props: e }) => /* @__PURE__ */ U(kt, {
|
|
1754
1755
|
code: e.code,
|
|
1755
1756
|
language: "mermaid"
|
|
1756
1757
|
})),
|
|
1757
1758
|
y(j, () => null),
|
|
1758
1759
|
y(M, ({ props: t, buildChild: n, context: r }) => {
|
|
1759
|
-
let i =
|
|
1760
|
+
let i = Jn(t.children).map((e) => {
|
|
1760
1761
|
let t = r.surfaceComponents.get(e);
|
|
1761
1762
|
return {
|
|
1762
1763
|
tabId: e,
|
|
1763
|
-
labelIds:
|
|
1764
|
-
contentIds:
|
|
1764
|
+
labelIds: Jn(t?.properties.label),
|
|
1765
|
+
contentIds: Jn(t?.properties.content)
|
|
1765
1766
|
};
|
|
1766
1767
|
});
|
|
1767
|
-
return /* @__PURE__ */ W(
|
|
1768
|
+
return /* @__PURE__ */ W(rn, {
|
|
1768
1769
|
defaultValue: "0",
|
|
1769
|
-
children: [/* @__PURE__ */ U(
|
|
1770
|
+
children: [/* @__PURE__ */ U(an, { children: i.map(({ tabId: t, labelIds: r }, i) => /* @__PURE__ */ U(on, {
|
|
1770
1771
|
value: String(i),
|
|
1771
1772
|
children: r.map((t, r) => /* @__PURE__ */ U(e, { children: n(t, "/") }, `${t}:${r}`))
|
|
1772
|
-
}, t)) }), i.map(({ tabId: t, contentIds: r }, i) => /* @__PURE__ */ U(
|
|
1773
|
+
}, t)) }), i.map(({ tabId: t, contentIds: r }, i) => /* @__PURE__ */ U(sn, {
|
|
1773
1774
|
value: String(i),
|
|
1774
1775
|
children: r.map((t, r) => /* @__PURE__ */ U(e, { children: n(t, "/") }, `${t}:${r}`))
|
|
1775
1776
|
}, t))]
|
|
1776
1777
|
});
|
|
1777
1778
|
}),
|
|
1778
|
-
y(ie, ({ props: e, buildChild: t }) => /* @__PURE__ */ W(
|
|
1779
|
+
y(ie, ({ props: e, buildChild: t }) => /* @__PURE__ */ W(Fn, {
|
|
1779
1780
|
caption: e.caption ? String(e.caption) : void 0,
|
|
1780
1781
|
hasRowHeader: e.hasRowHeader,
|
|
1781
|
-
children: [e.header && e.header.length > 0 && /* @__PURE__ */ U(
|
|
1782
|
+
children: [e.header && e.header.length > 0 && /* @__PURE__ */ U(Bn, { children: J(e.header, t) }), /* @__PURE__ */ U(In, { children: J(e.body, t) })]
|
|
1782
1783
|
})),
|
|
1783
|
-
y(oe, ({ props: e, buildChild: t }) => /* @__PURE__ */ U(
|
|
1784
|
-
y(ae, ({ props: e, buildChild: t }) => /* @__PURE__ */ U(
|
|
1784
|
+
y(oe, ({ props: e, buildChild: t }) => /* @__PURE__ */ U(Hn, { children: J(e.children, t) })),
|
|
1785
|
+
y(ae, ({ props: e, buildChild: t }) => /* @__PURE__ */ U(Rn, {
|
|
1785
1786
|
isHeader: e.isHeader,
|
|
1786
1787
|
children: J(e.children, t)
|
|
1787
1788
|
})),
|
|
1788
|
-
y(ce, ({ props: e }) => /* @__PURE__ */ U(
|
|
1789
|
-
],
|
|
1789
|
+
y(ce, ({ props: e }) => /* @__PURE__ */ U(Wn, { details: e.details ? `Unsupported component type: ${String(e.details)}` : "Unsupported component type" }))
|
|
1790
|
+
], Qn = [...S.components.values(), ...Zn], $n = Array.from(S.functions.values()), er = new b(Yn, "0.9", Qn, $n);
|
|
1790
1791
|
//#endregion
|
|
1791
1792
|
//#region src/components/a2ui/stream-json-lines.ts
|
|
1792
|
-
async function
|
|
1793
|
+
async function tr(e, { signal: t, onMessage: n, onError: r }) {
|
|
1793
1794
|
if (t?.aborted) return;
|
|
1794
1795
|
let i = e.getReader(), a = new TextDecoder(), o = "", s = () => {
|
|
1795
1796
|
i.cancel().catch(() => {});
|
|
@@ -1820,16 +1821,16 @@ async function er(e, { signal: t, onMessage: n, onError: r }) {
|
|
|
1820
1821
|
} catch {}
|
|
1821
1822
|
}
|
|
1822
1823
|
}
|
|
1823
|
-
var
|
|
1824
|
+
var nr = {
|
|
1824
1825
|
"elm-a2ui": "_elm-a2ui_vj36s_1",
|
|
1825
1826
|
surface: "_surface_vj36s_14"
|
|
1826
|
-
},
|
|
1827
|
+
}, rr = "https://a2ui.org/specification/v0_9/basic_catalog.json", ir = (e) => new Promise((t) => {
|
|
1827
1828
|
let n = h.parse(e, {
|
|
1828
1829
|
async: !1,
|
|
1829
1830
|
gfm: !0
|
|
1830
1831
|
});
|
|
1831
1832
|
t(g.sanitize(n));
|
|
1832
|
-
}),
|
|
1833
|
+
}), ar = ({ className: e, style: t, url: n, headers: r, messages: i, catalogId: a, components: o = Qn, ...c }) => {
|
|
1833
1834
|
let [l, u] = f([]), [m, h] = f([]), g = d(null), y = d(/* @__PURE__ */ new Map());
|
|
1834
1835
|
s(() => {
|
|
1835
1836
|
if (!n) return;
|
|
@@ -1838,7 +1839,7 @@ var tr = {
|
|
|
1838
1839
|
headers: r,
|
|
1839
1840
|
signal: e.signal
|
|
1840
1841
|
}).then(async (t) => {
|
|
1841
|
-
t.body && await
|
|
1842
|
+
t.body && await tr(t.body, {
|
|
1842
1843
|
signal: e.signal,
|
|
1843
1844
|
onMessage: (e) => {
|
|
1844
1845
|
e && typeof e == "object" && u((t) => [...t, e]);
|
|
@@ -1869,13 +1870,13 @@ var tr = {
|
|
|
1869
1870
|
for (let e of t.subs) e.unsubscribe();
|
|
1870
1871
|
t.processor.model.dispose();
|
|
1871
1872
|
}
|
|
1872
|
-
let n = /* @__PURE__ */ new Set([
|
|
1873
|
+
let n = /* @__PURE__ */ new Set([rr]);
|
|
1873
1874
|
a && n.add(a);
|
|
1874
1875
|
for (let e of S) if (e && typeof e == "object" && "createSurface" in e) {
|
|
1875
1876
|
let t = e.createSurface?.catalogId;
|
|
1876
1877
|
typeof t == "string" && n.add(t);
|
|
1877
1878
|
}
|
|
1878
|
-
let r = Array.from(n).map((e) => new b(e, "0.9", o,
|
|
1879
|
+
let r = Array.from(n).map((e) => new b(e, "0.9", o, $n)), i = new x(r), s = y.current;
|
|
1879
1880
|
s.clear();
|
|
1880
1881
|
let c = [];
|
|
1881
1882
|
c.push(i.model.onSurfaceCreated.subscribe((t) => {
|
|
@@ -1906,28 +1907,28 @@ var tr = {
|
|
|
1906
1907
|
e.processor.model.dispose(), g.current = null;
|
|
1907
1908
|
}
|
|
1908
1909
|
}, []), /* @__PURE__ */ U("div", {
|
|
1909
|
-
className: p(
|
|
1910
|
+
className: p(nr["elm-a2ui"], e),
|
|
1910
1911
|
style: t,
|
|
1911
1912
|
...c,
|
|
1912
1913
|
children: /* @__PURE__ */ U(v.Provider, {
|
|
1913
|
-
value:
|
|
1914
|
+
value: ir,
|
|
1914
1915
|
children: m.map((e) => /* @__PURE__ */ U("div", {
|
|
1915
|
-
className:
|
|
1916
|
+
className: nr.surface,
|
|
1916
1917
|
children: /* @__PURE__ */ U(_, { surface: e })
|
|
1917
1918
|
}, e.id))
|
|
1918
1919
|
})
|
|
1919
1920
|
});
|
|
1920
|
-
},
|
|
1921
|
+
}, or = {
|
|
1921
1922
|
"elm-parallax": "_elm-parallax_1uz2b_1",
|
|
1922
1923
|
parallax: "_parallax_1uz2b_6"
|
|
1923
|
-
},
|
|
1924
|
+
}, sr = (e, t) => `scale(1.2) translateY(${e / (1e3 * (t + 1))}%)`, cr = ({ className: e, images: t, ...n }) => {
|
|
1924
1925
|
let r = d(null), i = d(0);
|
|
1925
1926
|
return s(() => {
|
|
1926
1927
|
let e = window.matchMedia("(prefers-reduced-motion: reduce)"), t, n = window.scrollY, a = () => {
|
|
1927
1928
|
t = void 0;
|
|
1928
1929
|
let a = e.matches ? 0 : n;
|
|
1929
|
-
i.current = a, r.current?.querySelectorAll(`.${
|
|
1930
|
-
e.style.transform =
|
|
1930
|
+
i.current = a, r.current?.querySelectorAll(`.${or.parallax}`).forEach((e, t) => {
|
|
1931
|
+
e.style.transform = sr(a, t);
|
|
1931
1932
|
});
|
|
1932
1933
|
}, o = () => {
|
|
1933
1934
|
n = window.scrollY, t ?? (t = window.requestAnimationFrame(a));
|
|
@@ -1937,14 +1938,14 @@ var tr = {
|
|
|
1937
1938
|
};
|
|
1938
1939
|
}, []), /* @__PURE__ */ U("div", {
|
|
1939
1940
|
ref: r,
|
|
1940
|
-
className: m(
|
|
1941
|
+
className: m(or["elm-parallax"], e),
|
|
1941
1942
|
...n,
|
|
1942
1943
|
children: t.map((e, t) => /* @__PURE__ */ U("div", {
|
|
1943
1944
|
ref: (e) => {
|
|
1944
|
-
e && (e.style.transform =
|
|
1945
|
+
e && (e.style.transform = sr(i.current, t));
|
|
1945
1946
|
},
|
|
1946
1947
|
"aria-hidden": "true",
|
|
1947
|
-
className:
|
|
1948
|
+
className: or.parallax,
|
|
1948
1949
|
style: {
|
|
1949
1950
|
backgroundImage: `url(${JSON.stringify(e)})`,
|
|
1950
1951
|
transform: "scale(1.2) translateY(0%)",
|
|
@@ -1952,11 +1953,11 @@ var tr = {
|
|
|
1952
1953
|
}
|
|
1953
1954
|
}, t))
|
|
1954
1955
|
});
|
|
1955
|
-
},
|
|
1956
|
+
}, lr = {
|
|
1956
1957
|
"elm-tooltip": "_elm-tooltip_1b13f_1",
|
|
1957
1958
|
tooltip: "_tooltip_1b13f_5",
|
|
1958
1959
|
show: "_show_1b13f_18"
|
|
1959
|
-
},
|
|
1960
|
+
}, ur = (e) => {
|
|
1960
1961
|
let t = H(27), n, r, i, a, o, s;
|
|
1961
1962
|
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5], s = t[6]) : ({className: n, original: a, tooltip: s, onMouseOver: i, onMouseLeave: r, ...o} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o, t[6] = s);
|
|
1962
1963
|
let c = d(null), [l, u] = f(!1), p = d(!1), h = d(void 0), g;
|
|
@@ -1982,9 +1983,9 @@ var tr = {
|
|
|
1982
1983
|
}, 250)), r?.(e);
|
|
1983
1984
|
}, t[10] = r, t[11] = x);
|
|
1984
1985
|
let S = x, C;
|
|
1985
|
-
t[12] === n ? C = t[13] : (C = m(
|
|
1986
|
-
let w = l &&
|
|
1987
|
-
t[14] === w ? T = t[15] : (T = m(
|
|
1986
|
+
t[12] === n ? C = t[13] : (C = m(lr["elm-tooltip"], n), t[12] = n, t[13] = C);
|
|
1987
|
+
let w = l && lr.show, T;
|
|
1988
|
+
t[14] === w ? T = t[15] : (T = m(lr.tooltip, w), t[14] = w, t[15] = T);
|
|
1988
1989
|
let E;
|
|
1989
1990
|
t[16] !== _ || t[17] !== T || t[18] !== s ? (E = /* @__PURE__ */ U("div", {
|
|
1990
1991
|
className: T,
|
|
@@ -2000,12 +2001,12 @@ var tr = {
|
|
|
2000
2001
|
...o,
|
|
2001
2002
|
children: [a, E]
|
|
2002
2003
|
}), t[20] = S, t[21] = b, t[22] = a, t[23] = o, t[24] = C, t[25] = E, t[26] = D) : D = t[26], D;
|
|
2003
|
-
},
|
|
2004
|
+
}, dr = { "elm-block-fallback": "_elm-block-fallback_1sx02_1" }, fr = {
|
|
2004
2005
|
"elm-dot-loading-icon": "_elm-dot-loading-icon_qjgj2_15",
|
|
2005
2006
|
dot: "_dot_qjgj2_25",
|
|
2006
2007
|
bounce: "_bounce_qjgj2_1"
|
|
2007
|
-
},
|
|
2008
|
-
className: m(
|
|
2008
|
+
}, pr = ({ className: e, style: t, size: n = "4em", ...r }) => /* @__PURE__ */ W("span", {
|
|
2009
|
+
className: m(fr["elm-dot-loading-icon"], e),
|
|
2009
2010
|
style: {
|
|
2010
2011
|
"--elmethis-scoped-size": n,
|
|
2011
2012
|
...t
|
|
@@ -2013,41 +2014,41 @@ var tr = {
|
|
|
2013
2014
|
...r,
|
|
2014
2015
|
children: [
|
|
2015
2016
|
/* @__PURE__ */ U("span", {
|
|
2016
|
-
className:
|
|
2017
|
+
className: fr.dot,
|
|
2017
2018
|
"aria-hidden": "true"
|
|
2018
2019
|
}),
|
|
2019
2020
|
/* @__PURE__ */ U("span", {
|
|
2020
|
-
className:
|
|
2021
|
+
className: fr.dot,
|
|
2021
2022
|
"aria-hidden": "true"
|
|
2022
2023
|
}),
|
|
2023
2024
|
/* @__PURE__ */ U("span", {
|
|
2024
|
-
className:
|
|
2025
|
+
className: fr.dot,
|
|
2025
2026
|
"aria-hidden": "true"
|
|
2026
2027
|
})
|
|
2027
2028
|
]
|
|
2028
|
-
}),
|
|
2029
|
+
}), mr = {
|
|
2029
2030
|
"elm-rectangle-wave": "_elm-rectangle-wave_70gad_21",
|
|
2030
2031
|
wave: "_wave_70gad_1"
|
|
2031
|
-
},
|
|
2032
|
+
}, hr = (e) => {
|
|
2032
2033
|
let t = H(8), n, r;
|
|
2033
2034
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
2034
2035
|
let i;
|
|
2035
|
-
t[3] === n ? i = t[4] : (i = m(
|
|
2036
|
+
t[3] === n ? i = t[4] : (i = m(mr["elm-rectangle-wave"], n), t[3] = n, t[4] = i);
|
|
2036
2037
|
let a;
|
|
2037
2038
|
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */ U("div", {
|
|
2038
2039
|
"aria-hidden": "true",
|
|
2039
2040
|
className: i,
|
|
2040
2041
|
...r
|
|
2041
2042
|
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
2042
|
-
},
|
|
2043
|
-
className: m(
|
|
2043
|
+
}, gr = ({ className: e, style: t, height: n = "16rem", ...r }) => /* @__PURE__ */ W("div", {
|
|
2044
|
+
className: m(dr["elm-block-fallback"], e),
|
|
2044
2045
|
style: {
|
|
2045
2046
|
"--elmethis-scoped-height": n,
|
|
2046
2047
|
...t
|
|
2047
2048
|
},
|
|
2048
2049
|
...r,
|
|
2049
|
-
children: [/* @__PURE__ */ U(
|
|
2050
|
-
}),
|
|
2050
|
+
children: [/* @__PURE__ */ U(pr, {}), /* @__PURE__ */ U(hr, {})]
|
|
2051
|
+
}), _r = {
|
|
2051
2052
|
"elm-button": "_elm-button_p2wea_1",
|
|
2052
2053
|
normal: "_normal_p2wea_22",
|
|
2053
2054
|
primary: "_primary_p2wea_29",
|
|
@@ -2055,15 +2056,15 @@ var tr = {
|
|
|
2055
2056
|
enable: "_enable_p2wea_40",
|
|
2056
2057
|
flex: "_flex_p2wea_59",
|
|
2057
2058
|
"button-ripple": "_button-ripple_p2wea_1"
|
|
2058
|
-
},
|
|
2059
|
+
}, vr = (e) => {
|
|
2059
2060
|
let t = H(38), n, r, i, a, o, s, c, l, u, d;
|
|
2060
2061
|
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5], s = t[6], c = t[7], l = t[8], u = t[9], d = t[10]) : ({className: i, style: d, onClick: c, isLoading: s, block: n, color: a, primary: l, disabled: o, children: r, ...u} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o, t[6] = s, t[7] = c, t[8] = l, t[9] = u, t[10] = d);
|
|
2061
2062
|
let f;
|
|
2062
2063
|
t[11] !== o || t[12] !== s || t[13] !== c ? (f = (e) => {
|
|
2063
2064
|
!s && !o && c && c(e);
|
|
2064
2065
|
}, t[11] = o, t[12] = s, t[13] = c, t[14] = f) : f = t[14];
|
|
2065
|
-
let p = f, h = !s && !o &&
|
|
2066
|
-
t[15] !== i || t[16] !== h || t[17] !== g || t[18] !== _ || t[19] !== v ? (y = m(
|
|
2066
|
+
let p = f, h = !s && !o && _r.enable, g = a && _r.colored, _ = !a && !l && _r.normal, v = !a && l && _r.primary, y;
|
|
2067
|
+
t[15] !== i || t[16] !== h || t[17] !== g || t[18] !== _ || t[19] !== v ? (y = m(_r["elm-button"], h, g, _, v, i), t[15] = i, t[16] = h, t[17] = g, t[18] = _, t[19] = v, t[20] = y) : y = t[20];
|
|
2067
2068
|
let b = n ? "flex" : "inline-flex", x = n ? "100%" : "auto", S = o ? "not-allowed" : s ? "progress" : "pointer", C = o || s ? .6 : void 0, w;
|
|
2068
2069
|
t[21] !== a || t[22] !== d || t[23] !== C || t[24] !== b || t[25] !== x || t[26] !== S ? (w = {
|
|
2069
2070
|
display: b,
|
|
@@ -2074,8 +2075,8 @@ var tr = {
|
|
|
2074
2075
|
...d
|
|
2075
2076
|
}, t[21] = a, t[22] = d, t[23] = C, t[24] = b, t[25] = x, t[26] = S, t[27] = w) : w = t[27];
|
|
2076
2077
|
let T = w, E;
|
|
2077
|
-
t[28] !== r || t[29] !== s ? (E = s ? /* @__PURE__ */ U(
|
|
2078
|
-
className:
|
|
2078
|
+
t[28] !== r || t[29] !== s ? (E = s ? /* @__PURE__ */ U(pr, { size: "1.5rem" }) : /* @__PURE__ */ U("span", {
|
|
2079
|
+
className: _r.flex,
|
|
2079
2080
|
children: r
|
|
2080
2081
|
}), t[28] = r, t[29] = s, t[30] = E) : E = t[30];
|
|
2081
2082
|
let D;
|
|
@@ -2087,7 +2088,7 @@ var tr = {
|
|
|
2087
2088
|
...u,
|
|
2088
2089
|
children: E
|
|
2089
2090
|
}), t[31] = o, t[32] = p, t[33] = u, t[34] = T, t[35] = E, t[36] = y, t[37] = D) : D = t[37], D;
|
|
2090
|
-
},
|
|
2091
|
+
}, yr = {
|
|
2091
2092
|
"elm-button-dropdown": "_elm-button-dropdown_11bhg_1",
|
|
2092
2093
|
block: "_block_11bhg_7",
|
|
2093
2094
|
main: "_main_11bhg_11",
|
|
@@ -2097,8 +2098,8 @@ var tr = {
|
|
|
2097
2098
|
item: "_item_11bhg_51",
|
|
2098
2099
|
selected: "_selected_11bhg_68",
|
|
2099
2100
|
"item-disabled": "_item-disabled_11bhg_77"
|
|
2100
|
-
},
|
|
2101
|
-
let [E, D] = f(!1), O = d(null), [k, A] =
|
|
2101
|
+
}, br = ({ className: e, style: t, label: n, icon: r, items: i, selectedOptionId: o, defaultSelectedOptionId: c = null, onSelectedOptionIdChange: l, primary: u = !0, color: p, block: h, disabled: g, disableMainButton: _, disableDropdown: v, isLoading: y, autoClose: b = !0, dropdownIcon: x = ze, onClick: S, onItemClick: C, onOpenChange: w, ...T }) => {
|
|
2102
|
+
let [E, D] = f(!1), O = d(null), [k, A] = en({
|
|
2102
2103
|
value: o,
|
|
2103
2104
|
defaultValue: c,
|
|
2104
2105
|
onChange: l
|
|
@@ -2131,12 +2132,12 @@ var tr = {
|
|
|
2131
2132
|
});
|
|
2132
2133
|
return /* @__PURE__ */ W("div", {
|
|
2133
2134
|
ref: O,
|
|
2134
|
-
className: m(
|
|
2135
|
+
className: m(yr["elm-button-dropdown"], h && yr.block, e),
|
|
2135
2136
|
style: t,
|
|
2136
2137
|
...T,
|
|
2137
2138
|
children: [
|
|
2138
|
-
/* @__PURE__ */ U(
|
|
2139
|
-
className: m(
|
|
2139
|
+
/* @__PURE__ */ U(vr, {
|
|
2140
|
+
className: m(yr.main, yr.segment),
|
|
2140
2141
|
type: "button",
|
|
2141
2142
|
primary: u,
|
|
2142
2143
|
color: p,
|
|
@@ -2145,8 +2146,8 @@ var tr = {
|
|
|
2145
2146
|
onClick: () => S?.(j),
|
|
2146
2147
|
children: j ? /* @__PURE__ */ U(j.Content, {}, j.id) : /* @__PURE__ */ W(pe, { children: [r, n] })
|
|
2147
2148
|
}),
|
|
2148
|
-
/* @__PURE__ */ U(
|
|
2149
|
-
className: m(
|
|
2149
|
+
/* @__PURE__ */ U(vr, {
|
|
2150
|
+
className: m(yr.caret, yr.segment),
|
|
2150
2151
|
type: "button",
|
|
2151
2152
|
primary: u,
|
|
2152
2153
|
color: p,
|
|
@@ -2156,11 +2157,11 @@ var tr = {
|
|
|
2156
2157
|
"aria-expanded": E,
|
|
2157
2158
|
children: L
|
|
2158
2159
|
}),
|
|
2159
|
-
/* @__PURE__ */ U(
|
|
2160
|
+
/* @__PURE__ */ U($t, {
|
|
2160
2161
|
isOpen: E,
|
|
2161
|
-
className:
|
|
2162
|
+
className: yr.menu,
|
|
2162
2163
|
children: i.map((e) => /* @__PURE__ */ W("div", {
|
|
2163
|
-
className: m(
|
|
2164
|
+
className: m(yr.item, dt.text, e.id === k && yr.selected, e.disabled && yr["item-disabled"]),
|
|
2164
2165
|
"aria-selected": e.id === k,
|
|
2165
2166
|
onClick: (t) => {
|
|
2166
2167
|
t.stopPropagation(), I(e);
|
|
@@ -2174,7 +2175,7 @@ var tr = {
|
|
|
2174
2175
|
})
|
|
2175
2176
|
]
|
|
2176
2177
|
});
|
|
2177
|
-
},
|
|
2178
|
+
}, xr = {
|
|
2178
2179
|
"elm-checkbox": "_elm-checkbox_4ogdx_1",
|
|
2179
2180
|
disabled: "_disabled_4ogdx_12",
|
|
2180
2181
|
checkbox: "_checkbox_4ogdx_22",
|
|
@@ -2184,7 +2185,7 @@ var tr = {
|
|
|
2184
2185
|
"loading-dot": "_loading-dot_4ogdx_39",
|
|
2185
2186
|
"check-line": "_check-line_4ogdx_54",
|
|
2186
2187
|
"elmethis-checkbox-check-line": "_elmethis-checkbox-check-line_4ogdx_1"
|
|
2187
|
-
},
|
|
2188
|
+
}, Sr = (e) => {
|
|
2188
2189
|
let t = H(63), n, r, i, a, o, s, c, l;
|
|
2189
2190
|
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5], s = t[6], c = t[7], l = t[8]) : ({className: r, label: s, isLoading: o, disabled: a, checked: n, defaultChecked: i, onCheckedChange: c, ...l} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o, t[6] = s, t[7] = c, t[8] = l);
|
|
2190
2191
|
let u = i ?? !1, d;
|
|
@@ -2193,8 +2194,8 @@ var tr = {
|
|
|
2193
2194
|
defaultValue: u,
|
|
2194
2195
|
onChange: c
|
|
2195
2196
|
}, t[9] = n, t[10] = c, t[11] = u, t[12] = d) : d = t[12];
|
|
2196
|
-
let [f, p] =
|
|
2197
|
-
t[13] !== r || t[14] !== h ? (g = m(
|
|
2197
|
+
let [f, p] = en(d), h = a && xr.disabled, g;
|
|
2198
|
+
t[13] !== r || t[14] !== h ? (g = m(xr["elm-checkbox"], h, r), t[13] = r, t[14] = h, t[15] = g) : g = t[15];
|
|
2198
2199
|
let _;
|
|
2199
2200
|
t[16] !== a || t[17] !== f || t[18] !== o || t[19] !== p ? (_ = () => {
|
|
2200
2201
|
!o && !a && p(!f);
|
|
@@ -2228,7 +2229,7 @@ var tr = {
|
|
|
2228
2229
|
cx: "0",
|
|
2229
2230
|
cy: "0",
|
|
2230
2231
|
r: "2",
|
|
2231
|
-
className:
|
|
2232
|
+
className: xr["loading-dot"],
|
|
2232
2233
|
style: b,
|
|
2233
2234
|
children: [S, x]
|
|
2234
2235
|
}), t[26] = b, t[27] = C);
|
|
@@ -2255,12 +2256,12 @@ var tr = {
|
|
|
2255
2256
|
cx: "20",
|
|
2256
2257
|
cy: "20",
|
|
2257
2258
|
r: "2",
|
|
2258
|
-
className:
|
|
2259
|
+
className: xr["loading-dot"],
|
|
2259
2260
|
style: T,
|
|
2260
2261
|
children: [E, D]
|
|
2261
2262
|
}), t[32] = T, t[33] = O);
|
|
2262
|
-
let k = f &&
|
|
2263
|
-
t[34] !== k || t[35] !== A ? (j = m(
|
|
2263
|
+
let k = f && xr.checked, A = o && xr.loading, j;
|
|
2264
|
+
t[34] !== k || t[35] !== A ? (j = m(xr.rect, k, A), t[34] = k, t[35] = A, t[36] = j) : j = t[36];
|
|
2264
2265
|
let M;
|
|
2265
2266
|
t[37] === j ? M = t[38] : (M = /* @__PURE__ */ U("rect", {
|
|
2266
2267
|
x: "4",
|
|
@@ -2272,7 +2273,7 @@ var tr = {
|
|
|
2272
2273
|
}), t[37] = j, t[38] = M);
|
|
2273
2274
|
let N;
|
|
2274
2275
|
t[39] === f ? N = t[40] : (N = f && /* @__PURE__ */ U("polyline", {
|
|
2275
|
-
className:
|
|
2276
|
+
className: xr["check-line"],
|
|
2276
2277
|
points: "5,12 10,17 19,8",
|
|
2277
2278
|
strokeWidth: "1.5",
|
|
2278
2279
|
fill: "transparent"
|
|
@@ -2334,7 +2335,7 @@ var tr = {
|
|
|
2334
2335
|
t[48] !== C || t[49] !== O || t[50] !== M || t[51] !== N ? (V = /* @__PURE__ */ W("svg", {
|
|
2335
2336
|
width: "24",
|
|
2336
2337
|
height: "24",
|
|
2337
|
-
className:
|
|
2338
|
+
className: xr.checkbox,
|
|
2338
2339
|
children: [
|
|
2339
2340
|
C,
|
|
2340
2341
|
O,
|
|
@@ -2363,7 +2364,7 @@ var tr = {
|
|
|
2363
2364
|
...l,
|
|
2364
2365
|
children: te
|
|
2365
2366
|
}), t[58] = l, t[59] = te, t[60] = g, t[61] = _, t[62] = ne) : ne = t[62], ne;
|
|
2366
|
-
},
|
|
2367
|
+
}, Cr = {
|
|
2367
2368
|
"elm-select": "_elm-select_15wp8_1",
|
|
2368
2369
|
disabled: "_disabled_15wp8_23",
|
|
2369
2370
|
active: "_active_15wp8_27",
|
|
@@ -2376,8 +2377,8 @@ var tr = {
|
|
|
2376
2377
|
fallback: "_fallback_15wp8_72",
|
|
2377
2378
|
pulldown: "_pulldown_15wp8_80",
|
|
2378
2379
|
option: "_option_15wp8_65"
|
|
2379
|
-
},
|
|
2380
|
-
let [y, b] =
|
|
2380
|
+
}, wr = ({ className: e, style: t, label: n, placeholder: r, disabled: i, isLoading: o, frameless: c, options: l, selectedOptionId: u, defaultSelectedOptionId: p = null, onSelectedOptionIdChange: h, icon: g, children: _, ...v }) => {
|
|
2381
|
+
let [y, b] = en({
|
|
2381
2382
|
value: u,
|
|
2382
2383
|
defaultValue: p,
|
|
2383
2384
|
onChange: h
|
|
@@ -2395,26 +2396,26 @@ var tr = {
|
|
|
2395
2396
|
}, [i, o]);
|
|
2396
2397
|
return /* @__PURE__ */ W("div", {
|
|
2397
2398
|
ref: w,
|
|
2398
|
-
className: m(
|
|
2399
|
+
className: m(Cr["elm-select"], c && Cr.frameless, S && Cr.active, (i || o) && Cr.disabled, e),
|
|
2399
2400
|
style: t,
|
|
2400
2401
|
onClick: T,
|
|
2401
2402
|
...v,
|
|
2402
2403
|
children: [/* @__PURE__ */ W("span", {
|
|
2403
|
-
className: m(
|
|
2404
|
+
className: m(Cr.label, S && Cr["label-active"]),
|
|
2404
2405
|
children: [g ?? /* @__PURE__ */ U(G, {
|
|
2405
2406
|
path: ve,
|
|
2406
2407
|
size: "0.75rem"
|
|
2407
2408
|
}), n]
|
|
2408
2409
|
}), /* @__PURE__ */ W("div", {
|
|
2409
|
-
className:
|
|
2410
|
+
className: Cr.body,
|
|
2410
2411
|
children: [
|
|
2411
2412
|
/* @__PURE__ */ U("div", {
|
|
2412
|
-
className: m(
|
|
2413
|
+
className: m(Cr["selected-option"], dt.text),
|
|
2413
2414
|
children: x ? /* @__PURE__ */ U("div", {
|
|
2414
|
-
className:
|
|
2415
|
+
className: Cr["option-content"],
|
|
2415
2416
|
children: /* @__PURE__ */ U(x.Content, {})
|
|
2416
2417
|
}, x.id) : /* @__PURE__ */ U("div", {
|
|
2417
|
-
className:
|
|
2418
|
+
className: Cr.fallback,
|
|
2418
2419
|
children: /* @__PURE__ */ U("span", { children: r ?? "Select an option" })
|
|
2419
2420
|
})
|
|
2420
2421
|
}),
|
|
@@ -2422,11 +2423,11 @@ var tr = {
|
|
|
2422
2423
|
path: ze,
|
|
2423
2424
|
size: "1.5rem"
|
|
2424
2425
|
}),
|
|
2425
|
-
/* @__PURE__ */ U(
|
|
2426
|
+
/* @__PURE__ */ U($t, {
|
|
2426
2427
|
isOpen: S,
|
|
2427
|
-
className:
|
|
2428
|
+
className: Cr.pulldown,
|
|
2428
2429
|
children: l.map((e) => /* @__PURE__ */ W("div", {
|
|
2429
|
-
className: m(
|
|
2430
|
+
className: m(Cr.option, dt.text),
|
|
2430
2431
|
onClick: (t) => {
|
|
2431
2432
|
t.stopPropagation(), b(e.id), C(!1);
|
|
2432
2433
|
},
|
|
@@ -2459,23 +2460,23 @@ var tr = {
|
|
|
2459
2460
|
tick: "_tick_1g3pf_274",
|
|
2460
2461
|
"mark-restricted": "_mark-restricted_1g3pf_287",
|
|
2461
2462
|
"mark-label": "_mark-label_1g3pf_207"
|
|
2462
|
-
},
|
|
2463
|
-
let C = d(null), w = c === "vertical", T = Math.min(n, r), E = Math.max(n, r), D =
|
|
2463
|
+
}, Tr = (e, t, n) => Math.min(n, Math.max(t, e)), Er = (e) => Math.round(e * 1e9) / 1e9, Dr = 500, Or = (e) => e == null || typeof e == "boolean" ? "" : typeof e == "string" ? e : typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(Or).join("") : r(e) ? Or(e.props.children) : "", kr = ({ className: e, style: t, min: n = 0, max: r = 100, step: i = 1, innerMin: o, innerMax: s, orientation: c = "horizontal", value: u, defaultValue: f, onValueChange: p, disabled: h, markers: g, markerLabels: _, formatMarkerLabel: v, onKeyDown: y, onPointerDown: b, onPointerMove: x, ...S }) => {
|
|
2464
|
+
let C = d(null), w = c === "vertical", T = Math.min(n, r), E = Math.max(n, r), D = Tr(o ?? T, T, E), O = Tr(s ?? E, D, E), k = a((e) => {
|
|
2464
2465
|
let t = Math.abs(i);
|
|
2465
|
-
return
|
|
2466
|
+
return Tr(Er(t > 0 ? n + Math.round((e - n) / t) * t : e), D, O);
|
|
2466
2467
|
}, [
|
|
2467
2468
|
n,
|
|
2468
2469
|
i,
|
|
2469
2470
|
D,
|
|
2470
2471
|
O
|
|
2471
|
-
]), A = a((e) =>
|
|
2472
|
+
]), A = a((e) => Tr(Er(e), D, O), [D, O]), [j, M] = en({
|
|
2472
2473
|
value: u,
|
|
2473
2474
|
defaultValue: A(f ?? (D + O) / 2),
|
|
2474
2475
|
onChange: p
|
|
2475
|
-
}), N = a((e) => r === n ? 0 :
|
|
2476
|
+
}), N = a((e) => r === n ? 0 : Tr((e - n) / (r - n), 0, 1), [n, r]), P = a((e, t) => {
|
|
2476
2477
|
let i = C.current;
|
|
2477
2478
|
if (!i) return j;
|
|
2478
|
-
let a = i.getBoundingClientRect(), o = w ? a.height === 0 ? 0 :
|
|
2479
|
+
let a = i.getBoundingClientRect(), o = w ? a.height === 0 ? 0 : Tr((a.bottom - t) / a.height, 0, 1) : a.width === 0 ? 0 : Tr((e - a.left) / a.width, 0, 1);
|
|
2479
2480
|
return k(n + o * (r - n));
|
|
2480
2481
|
}, [
|
|
2481
2482
|
j,
|
|
@@ -2495,7 +2496,7 @@ var tr = {
|
|
|
2495
2496
|
h,
|
|
2496
2497
|
M,
|
|
2497
2498
|
P
|
|
2498
|
-
]), L =
|
|
2499
|
+
]), L = Tr(j, D, O), R = a((e) => {
|
|
2499
2500
|
if (h) return;
|
|
2500
2501
|
let t = Math.abs(i);
|
|
2501
2502
|
switch (e.key) {
|
|
@@ -2530,23 +2531,23 @@ var tr = {
|
|
|
2530
2531
|
if (!g && !_) return [];
|
|
2531
2532
|
let e = Math.abs(i);
|
|
2532
2533
|
if (e <= 0 || r === n) return [];
|
|
2533
|
-
let t = r > n ? e : -e, a = Math.floor(
|
|
2534
|
-
if (a <=
|
|
2534
|
+
let t = r > n ? e : -e, a = Math.floor(Er(Math.abs(r - n) / e)), o = [];
|
|
2535
|
+
if (a <= Dr) {
|
|
2535
2536
|
for (let e = 0; e <= a; e++) {
|
|
2536
|
-
let r =
|
|
2537
|
+
let r = Er(n + e * t);
|
|
2537
2538
|
o.push({
|
|
2538
2539
|
value: r,
|
|
2539
2540
|
ratio: N(r)
|
|
2540
2541
|
});
|
|
2541
2542
|
}
|
|
2542
|
-
|
|
2543
|
+
Er(n + a * t) !== Er(r) && o.push({
|
|
2543
2544
|
value: r,
|
|
2544
2545
|
ratio: N(r)
|
|
2545
2546
|
});
|
|
2546
2547
|
} else {
|
|
2547
|
-
let e = (r - n) /
|
|
2548
|
-
for (let t = 0; t <=
|
|
2549
|
-
let i = t ===
|
|
2548
|
+
let e = (r - n) / Dr;
|
|
2549
|
+
for (let t = 0; t <= Dr; t++) {
|
|
2550
|
+
let i = t === Dr ? r : Er(n + t * e);
|
|
2550
2551
|
o.push({
|
|
2551
2552
|
value: i,
|
|
2552
2553
|
ratio: N(i)
|
|
@@ -2565,7 +2566,7 @@ var tr = {
|
|
|
2565
2566
|
if (!_) return 0;
|
|
2566
2567
|
let e = 0;
|
|
2567
2568
|
for (let t of z) {
|
|
2568
|
-
let n =
|
|
2569
|
+
let n = Or(v?.(t.value) ?? t.value);
|
|
2569
2570
|
n.length > e && (e = n.length);
|
|
2570
2571
|
}
|
|
2571
2572
|
return e;
|
|
@@ -2632,13 +2633,13 @@ var tr = {
|
|
|
2632
2633
|
]
|
|
2633
2634
|
})
|
|
2634
2635
|
});
|
|
2635
|
-
},
|
|
2636
|
+
}, Ar = {
|
|
2636
2637
|
switch: "_switch_1ipa7_1",
|
|
2637
2638
|
bar: "_bar_1ipa7_5",
|
|
2638
2639
|
checked: "_checked_1ipa7_21",
|
|
2639
2640
|
disabled: "_disabled_1ipa7_26",
|
|
2640
2641
|
circle: "_circle_1ipa7_31"
|
|
2641
|
-
},
|
|
2642
|
+
}, jr = (e) => {
|
|
2642
2643
|
let t = H(38), n, r, i, a, o, s, c, l;
|
|
2643
2644
|
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5], s = t[6], c = t[7], l = t[8]) : ({className: r, style: l, color: i, size: c, disabled: a, checked: n, onCheckedChange: o, ...s} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o, t[6] = s, t[7] = c, t[8] = l);
|
|
2644
2645
|
let u = i ?? "var(--elmethis-color-primary)", d = c ?? "18px", f;
|
|
@@ -2655,16 +2656,16 @@ var tr = {
|
|
|
2655
2656
|
}, t[13] = u, t[14] = d, t[15] = l, t[16] = p) : p = t[16];
|
|
2656
2657
|
let h = p, g;
|
|
2657
2658
|
t[17] !== n || t[18] !== a ? (g = /* @__PURE__ */ U("input", {
|
|
2658
|
-
className:
|
|
2659
|
+
className: Ar.switch,
|
|
2659
2660
|
type: "checkbox",
|
|
2660
2661
|
checked: n,
|
|
2661
2662
|
disabled: a,
|
|
2662
2663
|
readOnly: !0
|
|
2663
2664
|
}), t[17] = n, t[18] = a, t[19] = g) : g = t[19];
|
|
2664
|
-
let _ = n &&
|
|
2665
|
-
t[20] !== _ || t[21] !== v ? (y = m(
|
|
2666
|
-
let b = n &&
|
|
2667
|
-
t[23] !== b || t[24] !== x ? (S = m(
|
|
2665
|
+
let _ = n && Ar.checked, v = a && Ar.disabled, y;
|
|
2666
|
+
t[20] !== _ || t[21] !== v ? (y = m(Ar.bar, _, v), t[20] = _, t[21] = v, t[22] = y) : y = t[22];
|
|
2667
|
+
let b = n && Ar.checked, x = a && Ar.disabled, S;
|
|
2668
|
+
t[23] !== b || t[24] !== x ? (S = m(Ar.circle, b, x), t[23] = b, t[24] = x, t[25] = S) : S = t[25];
|
|
2668
2669
|
let C;
|
|
2669
2670
|
t[26] === S ? C = t[27] : (C = /* @__PURE__ */ U("div", { className: S }), t[26] = S, t[27] = C);
|
|
2670
2671
|
let w;
|
|
@@ -2680,7 +2681,7 @@ var tr = {
|
|
|
2680
2681
|
...s,
|
|
2681
2682
|
children: [g, w]
|
|
2682
2683
|
}), t[31] = r, t[32] = s, t[33] = f, t[34] = w, t[35] = h, t[36] = g, t[37] = T) : T = t[37], T;
|
|
2683
|
-
},
|
|
2684
|
+
}, Mr = {
|
|
2684
2685
|
loading: "_loading_16809_23",
|
|
2685
2686
|
"elm-text-area": "_elm-text-area_16809_37",
|
|
2686
2687
|
disabled: "_disabled_16809_59",
|
|
@@ -2690,21 +2691,21 @@ var tr = {
|
|
|
2690
2691
|
requierd: "_requierd_16809_86",
|
|
2691
2692
|
body: "_body_16809_92",
|
|
2692
2693
|
textarea: "_textarea_16809_97"
|
|
2693
|
-
},
|
|
2694
|
+
}, Nr = ({ className: e, style: t, label: n, icon: r, maxLength: i, placeholder: a, disabled: o, isLoading: s, required: c, value: l, defaultValue: u, rows: d = 3, onInput: p, onFocus: h, onBlur: g, ..._ }) => {
|
|
2694
2695
|
let [v, y] = f(!1), b = l != null || u != null, [x, S] = f(() => String(u ?? "").length), C = l == null ? x : String(l).length;
|
|
2695
2696
|
return /* @__PURE__ */ W("label", {
|
|
2696
|
-
className: m(
|
|
2697
|
+
className: m(Mr["elm-text-area"], v && Mr.active, (o || s) && Mr.disabled, e),
|
|
2697
2698
|
style: t,
|
|
2698
2699
|
children: [
|
|
2699
2700
|
/* @__PURE__ */ W("span", {
|
|
2700
|
-
className: m(
|
|
2701
|
+
className: m(Mr.header, v && Mr["label-active"]),
|
|
2701
2702
|
children: [
|
|
2702
2703
|
r ?? /* @__PURE__ */ U(G, {
|
|
2703
2704
|
path: Ye,
|
|
2704
2705
|
size: "0.75rem"
|
|
2705
2706
|
}),
|
|
2706
2707
|
/* @__PURE__ */ W("span", { children: [n, c && /* @__PURE__ */ U("span", {
|
|
2707
|
-
className:
|
|
2708
|
+
className: Mr.requierd,
|
|
2708
2709
|
children: "*"
|
|
2709
2710
|
})] }),
|
|
2710
2711
|
b && /* @__PURE__ */ U(K, {
|
|
@@ -2715,13 +2716,13 @@ var tr = {
|
|
|
2715
2716
|
]
|
|
2716
2717
|
}),
|
|
2717
2718
|
/* @__PURE__ */ U("div", {
|
|
2718
|
-
className:
|
|
2719
|
+
className: Mr.body,
|
|
2719
2720
|
children: /* @__PURE__ */ U("textarea", {
|
|
2720
2721
|
value: l,
|
|
2721
2722
|
defaultValue: u,
|
|
2722
2723
|
rows: d,
|
|
2723
2724
|
maxLength: i,
|
|
2724
|
-
className:
|
|
2725
|
+
className: Mr.textarea,
|
|
2725
2726
|
placeholder: a,
|
|
2726
2727
|
onFocus: (e) => {
|
|
2727
2728
|
y(!0), h?.(e);
|
|
@@ -2739,7 +2740,7 @@ var tr = {
|
|
|
2739
2740
|
})
|
|
2740
2741
|
}),
|
|
2741
2742
|
/* @__PURE__ */ U("div", {
|
|
2742
|
-
className:
|
|
2743
|
+
className: Mr.loading,
|
|
2743
2744
|
style: { opacity: +!!s }
|
|
2744
2745
|
})
|
|
2745
2746
|
]
|
|
@@ -2757,7 +2758,7 @@ var tr = {
|
|
|
2757
2758
|
"right-icon-box": "_right-icon-box_17exf_121",
|
|
2758
2759
|
"clickable-icon": "_clickable-icon_17exf_126",
|
|
2759
2760
|
"prefix-suffix": "_prefix-suffix_17exf_142"
|
|
2760
|
-
},
|
|
2761
|
+
}, Pr = (e) => {
|
|
2761
2762
|
let t = H(92), n, r, i, a, o, s, c, l, u, p, h, g, _, v, y, b;
|
|
2762
2763
|
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5], s = t[6], c = t[7], l = t[8], u = t[9], p = t[10], h = t[11], g = t[12], _ = t[13], v = t[14], y = t[15], b = t[16]) : ({className: n, style: v, label: s, maxLength: c, prefix: h, suffix: y, placeholder: p, disabled: r, isLoading: a, icon: i, value: b, isPassword: o, required: g, onFocus: u, onBlur: l, ..._} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o, t[6] = s, t[7] = c, t[8] = l, t[9] = u, t[10] = p, t[11] = h, t[12] = g, t[13] = _, t[14] = v, t[15] = y, t[16] = b);
|
|
2763
2764
|
let x = d(null), [S, C] = f(!1), [w, T] = f(o ? "password" : "text"), E;
|
|
@@ -2834,7 +2835,7 @@ var tr = {
|
|
|
2834
2835
|
}), t[60] = ie, t[61] = ae);
|
|
2835
2836
|
let oe;
|
|
2836
2837
|
t[62] !== r || t[63] !== a ? (oe = () => {
|
|
2837
|
-
!a && !r && T(
|
|
2838
|
+
!a && !r && T(Fr);
|
|
2838
2839
|
}, t[62] = r, t[63] = a, t[64] = oe) : oe = t[64];
|
|
2839
2840
|
let se = w === "text" ? De : Ee, ce;
|
|
2840
2841
|
t[65] === se ? ce = t[66] : (ce = /* @__PURE__ */ U(G, {
|
|
@@ -2898,13 +2899,13 @@ var tr = {
|
|
|
2898
2899
|
]
|
|
2899
2900
|
}), t[86] = v, t[87] = R, t[88] = me, t[89] = ge, t[90] = j, t[91] = _e) : _e = t[91], _e;
|
|
2900
2901
|
};
|
|
2901
|
-
function
|
|
2902
|
+
function Fr(e) {
|
|
2902
2903
|
return e === "text" ? "password" : "text";
|
|
2903
2904
|
}
|
|
2904
2905
|
//#endregion
|
|
2905
2906
|
//#region src/components/form/elm-validation.module.css
|
|
2906
|
-
var
|
|
2907
|
-
className: m(
|
|
2907
|
+
var Ir = { "elm-validation": "_elm-validation_1cigg_1" }, Lr = ({ className: e, style: t, text: n, validColor: r = "var(--elmethis-color-accent-success)", isValid: i, ...a }) => /* @__PURE__ */ W("div", {
|
|
2908
|
+
className: m(Ir["elm-validation"], e),
|
|
2908
2909
|
style: {
|
|
2909
2910
|
"--elmethis-scoped-opacity": i ? 1 : .5,
|
|
2910
2911
|
...t
|
|
@@ -2917,23 +2918,23 @@ var Fr = { "elm-validation": "_elm-validation_1cigg_1" }, Ir = ({ className: e,
|
|
|
2917
2918
|
color: i ? r : void 0,
|
|
2918
2919
|
children: n
|
|
2919
2920
|
})]
|
|
2920
|
-
}),
|
|
2921
|
+
}), Rr = (e) => {
|
|
2921
2922
|
let t = H(6), { className: n, style: r, content: i } = e, a;
|
|
2922
2923
|
t[0] !== n || t[1] !== i || t[2] !== r ? (a = {
|
|
2923
2924
|
className: n,
|
|
2924
2925
|
style: r,
|
|
2925
2926
|
content: i
|
|
2926
2927
|
}, t[0] = n, t[1] = i, t[2] = r, t[3] = a) : a = t[3];
|
|
2927
|
-
let { CopyButton: o } =
|
|
2928
|
+
let { CopyButton: o } = Dt(a), s;
|
|
2928
2929
|
return t[4] === o ? s = t[5] : (s = /* @__PURE__ */ U(o, {}), t[4] = o, t[5] = s), s;
|
|
2929
|
-
},
|
|
2930
|
+
}, zr = {
|
|
2930
2931
|
"elm-square-loading-icon": "_elm-square-loading-icon_m72nq_19",
|
|
2931
2932
|
square: "_square_m72nq_28",
|
|
2932
2933
|
appear: "_appear_m72nq_1"
|
|
2933
|
-
},
|
|
2934
|
+
}, Br = ({ className: e, style: t, size: n = "3rem", dimensions: r = 4, ...i }) => {
|
|
2934
2935
|
let a = 1200, o = a / (r * 3);
|
|
2935
2936
|
return /* @__PURE__ */ U("span", {
|
|
2936
|
-
className: m(
|
|
2937
|
+
className: m(zr["elm-square-loading-icon"], e),
|
|
2937
2938
|
style: {
|
|
2938
2939
|
"--elmethis-scoped-size": n,
|
|
2939
2940
|
"--elmethis-scoped-dimensions": r,
|
|
@@ -2942,41 +2943,41 @@ var Fr = { "elm-validation": "_elm-validation_1cigg_1" }, Ir = ({ className: e,
|
|
|
2942
2943
|
},
|
|
2943
2944
|
...i,
|
|
2944
2945
|
children: Array(r).fill(null).map((e, t) => Array(r).fill(null).map((e, n) => /* @__PURE__ */ U("span", {
|
|
2945
|
-
className:
|
|
2946
|
+
className: zr.square,
|
|
2946
2947
|
style: { "--elmethis-scoped-delay": `${o * (t + n)}ms` }
|
|
2947
2948
|
}, `${t}-${n}`)))
|
|
2948
2949
|
});
|
|
2949
|
-
},
|
|
2950
|
+
}, Vr = "elmethis-theme", Hr = "elmethis-theme-change", Ur = (e) => e === "dark" ? "dark" : e === "light" ? "light" : null, Wr = () => typeof matchMedia < "u" && matchMedia("(prefers-color-scheme: dark)").matches, Gr = (e = Wr()) => {
|
|
2950
2951
|
let t = window.getComputedStyle(document.documentElement).colorScheme.split(/\s+/), n = t.includes("dark");
|
|
2951
2952
|
return n === t.includes("light") ? e : n;
|
|
2952
|
-
},
|
|
2953
|
+
}, Kr = (e, t) => {
|
|
2953
2954
|
let n = document.documentElement;
|
|
2954
|
-
e == null ? (n.style.removeProperty("color-scheme"), n.removeAttribute("data-theme"), t && typeof localStorage < "u" && localStorage.removeItem(
|
|
2955
|
-
},
|
|
2955
|
+
e == null ? (n.style.removeProperty("color-scheme"), n.removeAttribute("data-theme"), t && typeof localStorage < "u" && localStorage.removeItem(Vr)) : (n.style.colorScheme = e, n.setAttribute("data-theme", e), t && typeof localStorage < "u" && localStorage.setItem(Vr, e)), window.dispatchEvent(new CustomEvent(Hr, { detail: e }));
|
|
2956
|
+
}, qr = () => {
|
|
2956
2957
|
if (typeof window > "u") return !1;
|
|
2957
|
-
let e =
|
|
2958
|
-
return e == null ?
|
|
2958
|
+
let e = Ur(localStorage.getItem(Vr));
|
|
2959
|
+
return e == null ? Gr() : e === "dark";
|
|
2959
2960
|
};
|
|
2960
|
-
function
|
|
2961
|
-
let e = H(5), [t, n] = f(
|
|
2961
|
+
function Jr() {
|
|
2962
|
+
let e = H(5), [t, n] = f(qr), r;
|
|
2962
2963
|
e[0] === Symbol.for("react.memo_cache_sentinel") ? (r = () => {
|
|
2963
|
-
let e = !
|
|
2964
|
-
n(e),
|
|
2964
|
+
let e = !Gr();
|
|
2965
|
+
n(e), Kr(e ? "dark" : "light", !0);
|
|
2965
2966
|
}, e[0] = r) : r = e[0];
|
|
2966
2967
|
let i = r, a, o;
|
|
2967
2968
|
e[1] === Symbol.for("react.memo_cache_sentinel") ? (a = () => {
|
|
2968
2969
|
let e = (e) => {
|
|
2969
2970
|
let t = e.detail;
|
|
2970
|
-
n(t == null ?
|
|
2971
|
-
}, t =
|
|
2972
|
-
window.addEventListener(
|
|
2973
|
-
let r =
|
|
2974
|
-
r != null &&
|
|
2971
|
+
n(t == null ? Gr() : t === "dark");
|
|
2972
|
+
}, t = Yr;
|
|
2973
|
+
window.addEventListener(Hr, e), window.addEventListener("storage", t);
|
|
2974
|
+
let r = Ur(localStorage.getItem(Vr));
|
|
2975
|
+
r != null && Kr(r, !1);
|
|
2975
2976
|
let i, a = (e) => {
|
|
2976
|
-
|
|
2977
|
+
Ur(localStorage.getItem(Vr)) ?? n(Gr(e.matches));
|
|
2977
2978
|
};
|
|
2978
2979
|
return typeof matchMedia < "u" && (i = matchMedia("(prefers-color-scheme: dark)"), i.addEventListener("change", a)), () => {
|
|
2979
|
-
window.removeEventListener(
|
|
2980
|
+
window.removeEventListener(Hr, e), window.removeEventListener("storage", t), i?.removeEventListener("change", a);
|
|
2980
2981
|
};
|
|
2981
2982
|
}, o = [], e[1] = a, e[2] = o) : (a = e[1], o = e[2]), s(a, o);
|
|
2982
2983
|
let c;
|
|
@@ -2985,19 +2986,19 @@ function qr() {
|
|
|
2985
2986
|
toggleTheme: i
|
|
2986
2987
|
}, e[3] = t, e[4] = c), c;
|
|
2987
2988
|
}
|
|
2988
|
-
function
|
|
2989
|
-
e.key ===
|
|
2989
|
+
function Yr(e) {
|
|
2990
|
+
e.key === Vr && Kr(Ur(e.newValue), !1);
|
|
2990
2991
|
}
|
|
2991
2992
|
//#endregion
|
|
2992
2993
|
//#region src/components/icon/elm-toggle-theme.module.css
|
|
2993
|
-
var
|
|
2994
|
-
let { isDarkTheme: i, toggleTheme: a } =
|
|
2994
|
+
var Xr = { "elm-toggle-theme": "_elm-toggle-theme_58006_1" }, Zr = ({ className: e, style: t, size: n = "2rem", ...r }) => {
|
|
2995
|
+
let { isDarkTheme: i, toggleTheme: a } = Jr();
|
|
2995
2996
|
return i ? /* @__PURE__ */ W("svg", {
|
|
2996
2997
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2997
2998
|
width: n,
|
|
2998
2999
|
height: n,
|
|
2999
3000
|
viewBox: "0 0 24 24",
|
|
3000
|
-
className: m(
|
|
3001
|
+
className: m(Xr["elm-toggle-theme"], e),
|
|
3001
3002
|
style: t,
|
|
3002
3003
|
onClick: a,
|
|
3003
3004
|
...r,
|
|
@@ -3227,7 +3228,7 @@ var Yr = { "elm-toggle-theme": "_elm-toggle-theme_58006_1" }, Xr = ({ className:
|
|
|
3227
3228
|
width: n,
|
|
3228
3229
|
height: n,
|
|
3229
3230
|
viewBox: "0 0 24 24",
|
|
3230
|
-
className: m(
|
|
3231
|
+
className: m(Xr["elm-toggle-theme"], e),
|
|
3231
3232
|
style: t,
|
|
3232
3233
|
onClick: a,
|
|
3233
3234
|
...r,
|
|
@@ -3421,35 +3422,35 @@ var Yr = { "elm-toggle-theme": "_elm-toggle-theme_58006_1" }, Xr = ({ className:
|
|
|
3421
3422
|
})
|
|
3422
3423
|
]
|
|
3423
3424
|
});
|
|
3424
|
-
},
|
|
3425
|
+
}, Qr = {
|
|
3425
3426
|
"elm-breadcrumb": "_elm-breadcrumb_13oke_1",
|
|
3426
3427
|
"link-container": "_link-container_13oke_9",
|
|
3427
3428
|
icon: "_icon_13oke_23",
|
|
3428
3429
|
chunk: "_chunk_13oke_36",
|
|
3429
3430
|
chevron: "_chevron_13oke_41"
|
|
3430
|
-
},
|
|
3431
|
+
}, $r = (e) => {
|
|
3431
3432
|
let t = H(14), n, r, i;
|
|
3432
3433
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({className: n, links: r, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
3433
3434
|
let a;
|
|
3434
|
-
t[4] === n ? a = t[5] : (a = m(
|
|
3435
|
+
t[4] === n ? a = t[5] : (a = m(Qr["elm-breadcrumb"], n), t[4] = n, t[5] = a);
|
|
3435
3436
|
let o;
|
|
3436
3437
|
if (t[6] !== r) {
|
|
3437
3438
|
let e;
|
|
3438
3439
|
t[8] === r.length ? e = t[9] : (e = (e, t) => /* @__PURE__ */ W("span", {
|
|
3439
3440
|
style: { display: "contents" },
|
|
3440
3441
|
children: [/* @__PURE__ */ W("span", {
|
|
3441
|
-
className:
|
|
3442
|
+
className: Qr["link-container"],
|
|
3442
3443
|
onClick: e.onClick,
|
|
3443
3444
|
children: [/* @__PURE__ */ U(G, {
|
|
3444
|
-
className:
|
|
3445
|
+
className: Qr.icon,
|
|
3445
3446
|
path: t === 0 ? Fe : t === r.length - 1 ? _e : Ae,
|
|
3446
3447
|
size: "1rem"
|
|
3447
3448
|
}), /* @__PURE__ */ U("span", {
|
|
3448
|
-
className:
|
|
3449
|
+
className: Qr.chunk,
|
|
3449
3450
|
children: e.text
|
|
3450
3451
|
})]
|
|
3451
3452
|
}), r.length !== t + 1 && /* @__PURE__ */ U(G, {
|
|
3452
|
-
className:
|
|
3453
|
+
className: Qr.chevron,
|
|
3453
3454
|
path: xe,
|
|
3454
3455
|
size: "1rem"
|
|
3455
3456
|
})]
|
|
@@ -3461,13 +3462,13 @@ var Yr = { "elm-toggle-theme": "_elm-toggle-theme_58006_1" }, Xr = ({ className:
|
|
|
3461
3462
|
...i,
|
|
3462
3463
|
children: o
|
|
3463
3464
|
}), t[10] = i, t[11] = a, t[12] = o, t[13] = s) : s = t[13], s;
|
|
3464
|
-
},
|
|
3465
|
+
}, ei = {
|
|
3465
3466
|
"elm-page-top": "_elm-page-top_fmpmm_1",
|
|
3466
3467
|
move: "_move_fmpmm_1",
|
|
3467
3468
|
visible: "_visible_fmpmm_30",
|
|
3468
3469
|
partial: "_partial_fmpmm_37",
|
|
3469
3470
|
text: "_text_fmpmm_74"
|
|
3470
|
-
},
|
|
3471
|
+
}, ti = ({ className: e, style: t, position: n = "right", ...r }) => {
|
|
3471
3472
|
let [i, a] = f(!1);
|
|
3472
3473
|
s(() => {
|
|
3473
3474
|
let e = () => {
|
|
@@ -3482,7 +3483,7 @@ var Yr = { "elm-toggle-theme": "_elm-toggle-theme_58006_1" }, Xr = ({ className:
|
|
|
3482
3483
|
});
|
|
3483
3484
|
};
|
|
3484
3485
|
return /* @__PURE__ */ W("nav", {
|
|
3485
|
-
className: m(
|
|
3486
|
+
className: m(ei["elm-page-top"], i && ei.visible, e),
|
|
3486
3487
|
style: {
|
|
3487
3488
|
"--elmethis-scoped-size": "64px",
|
|
3488
3489
|
left: n === "left" ? "0" : "auto",
|
|
@@ -3494,23 +3495,23 @@ var Yr = { "elm-toggle-theme": "_elm-toggle-theme_58006_1" }, Xr = ({ className:
|
|
|
3494
3495
|
children: [
|
|
3495
3496
|
/* @__PURE__ */ U("div", {
|
|
3496
3497
|
"aria-hidden": "true",
|
|
3497
|
-
className:
|
|
3498
|
+
className: ei.partial
|
|
3498
3499
|
}),
|
|
3499
3500
|
/* @__PURE__ */ U("div", {
|
|
3500
3501
|
"aria-hidden": "true",
|
|
3501
|
-
className:
|
|
3502
|
+
className: ei.partial
|
|
3502
3503
|
}),
|
|
3503
3504
|
/* @__PURE__ */ U("div", {
|
|
3504
3505
|
"aria-hidden": "true",
|
|
3505
|
-
className:
|
|
3506
|
+
className: ei.partial
|
|
3506
3507
|
}),
|
|
3507
3508
|
/* @__PURE__ */ U("span", {
|
|
3508
|
-
className:
|
|
3509
|
+
className: ei.text,
|
|
3509
3510
|
children: "Back to Top"
|
|
3510
3511
|
})
|
|
3511
3512
|
]
|
|
3512
3513
|
});
|
|
3513
|
-
},
|
|
3514
|
+
}, ni = {
|
|
3514
3515
|
"elm-color-primitive-sample": "_elm-color-primitive-sample_vuro0_1",
|
|
3515
3516
|
toolbar: "_toolbar_vuro0_6",
|
|
3516
3517
|
"mode-toggle": "_mode-toggle_vuro0_11",
|
|
@@ -3521,63 +3522,16 @@ var Yr = { "elm-toggle-theme": "_elm-toggle-theme_58006_1" }, Xr = ({ className:
|
|
|
3521
3522
|
swatch: "_swatch_vuro0_52",
|
|
3522
3523
|
"swatch-name": "_swatch-name_vuro0_55",
|
|
3523
3524
|
"swatch-bg": "_swatch-bg_vuro0_60"
|
|
3524
|
-
},
|
|
3525
|
+
}, ri = (e) => {
|
|
3525
3526
|
let t = e.match(/\d+(\.\d+)?/g);
|
|
3526
3527
|
if (!t || t.length < 3) return null;
|
|
3527
3528
|
let n = (e) => Math.round(Number(e)).toString(16).padStart(2, "0");
|
|
3528
3529
|
return `#${n(t[0])}${n(t[1])}${n(t[2])}`;
|
|
3529
|
-
},
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
500,
|
|
3535
|
-
600,
|
|
3536
|
-
700,
|
|
3537
|
-
800,
|
|
3538
|
-
900
|
|
3539
|
-
], ii = [
|
|
3540
|
-
{
|
|
3541
|
-
hue: "red",
|
|
3542
|
-
steps: ri
|
|
3543
|
-
},
|
|
3544
|
-
{
|
|
3545
|
-
hue: "orange",
|
|
3546
|
-
steps: ri
|
|
3547
|
-
},
|
|
3548
|
-
{
|
|
3549
|
-
hue: "yellow",
|
|
3550
|
-
steps: ri
|
|
3551
|
-
},
|
|
3552
|
-
{
|
|
3553
|
-
hue: "green",
|
|
3554
|
-
steps: ri
|
|
3555
|
-
},
|
|
3556
|
-
{
|
|
3557
|
-
hue: "cyan",
|
|
3558
|
-
steps: ri
|
|
3559
|
-
},
|
|
3560
|
-
{
|
|
3561
|
-
hue: "blue",
|
|
3562
|
-
steps: ri
|
|
3563
|
-
},
|
|
3564
|
-
{
|
|
3565
|
-
hue: "purple",
|
|
3566
|
-
steps: ri
|
|
3567
|
-
},
|
|
3568
|
-
{
|
|
3569
|
-
hue: "magenta",
|
|
3570
|
-
steps: ri
|
|
3571
|
-
},
|
|
3572
|
-
{
|
|
3573
|
-
hue: "slate",
|
|
3574
|
-
steps: ri
|
|
3575
|
-
},
|
|
3576
|
-
{
|
|
3577
|
-
hue: "gold",
|
|
3578
|
-
steps: ri
|
|
3579
|
-
}
|
|
3580
|
-
], ai = (e) => {
|
|
3530
|
+
}, ii = Object.entries(st.color).map(([e, t]) => ({
|
|
3531
|
+
hue: e,
|
|
3532
|
+
label: e.replaceAll("-", " "),
|
|
3533
|
+
steps: Object.entries(t)
|
|
3534
|
+
})), ai = (e) => {
|
|
3581
3535
|
let t = H(29), n, r, i, a;
|
|
3582
3536
|
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4]) : ({className: n, style: a, onClick: r, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a);
|
|
3583
3537
|
let [o, c] = f(null), [l, u] = f("variable"), p = d(void 0), h, g;
|
|
@@ -3592,7 +3546,7 @@ var Yr = { "elm-toggle-theme": "_elm-toggle-theme_58006_1" }, Xr = ({ className:
|
|
|
3592
3546
|
if (l === "hex") {
|
|
3593
3547
|
let e = t.closest("[data-theme]") ?? document.documentElement, i = document.createElement("span");
|
|
3594
3548
|
i.style.color = `var(${n})`, i.style.display = "none", e.appendChild(i);
|
|
3595
|
-
let a =
|
|
3549
|
+
let a = ri(window.getComputedStyle(i).color);
|
|
3596
3550
|
i.remove(), a && (r = a);
|
|
3597
3551
|
}
|
|
3598
3552
|
await window.navigator.clipboard.writeText(r), p.current !== void 0 && clearTimeout(p.current), c(n), p.current = setTimeout(() => {
|
|
@@ -3600,7 +3554,7 @@ var Yr = { "elm-toggle-theme": "_elm-toggle-theme_58006_1" }, Xr = ({ className:
|
|
|
3600
3554
|
}, 1500);
|
|
3601
3555
|
}, t[7] = l, t[8] = _);
|
|
3602
3556
|
let v = _, y;
|
|
3603
|
-
t[9] === n ? y = t[10] : (y = m(
|
|
3557
|
+
t[9] === n ? y = t[10] : (y = m(ni["elm-color-primitive-sample"], n), t[9] = n, t[10] = y);
|
|
3604
3558
|
let b;
|
|
3605
3559
|
t[11] !== v || t[12] !== r ? (b = (e) => {
|
|
3606
3560
|
v(e), r?.(e);
|
|
@@ -3611,16 +3565,16 @@ var Yr = { "elm-toggle-theme": "_elm-toggle-theme_58006_1" }, Xr = ({ className:
|
|
|
3611
3565
|
}, t[14] = x) : x = t[14];
|
|
3612
3566
|
let S = l === "hex" ? Pe : je, C;
|
|
3613
3567
|
t[15] === S ? C = t[16] : (C = /* @__PURE__ */ U(G, {
|
|
3614
|
-
className:
|
|
3568
|
+
className: ni["mode-toggle-icon"],
|
|
3615
3569
|
path: S,
|
|
3616
3570
|
size: "1.25rem"
|
|
3617
3571
|
}), t[15] = S, t[16] = C);
|
|
3618
3572
|
let w = l === "hex" ? "hex value" : "variable name", T;
|
|
3619
3573
|
t[17] !== C || t[18] !== w ? (T = /* @__PURE__ */ U("div", {
|
|
3620
|
-
className:
|
|
3574
|
+
className: ni.toolbar,
|
|
3621
3575
|
children: /* @__PURE__ */ W("button", {
|
|
3622
3576
|
type: "button",
|
|
3623
|
-
className:
|
|
3577
|
+
className: ni["mode-toggle"],
|
|
3624
3578
|
onClick: x,
|
|
3625
3579
|
children: [
|
|
3626
3580
|
C,
|
|
@@ -3631,29 +3585,29 @@ var Yr = { "elm-toggle-theme": "_elm-toggle-theme_58006_1" }, Xr = ({ className:
|
|
|
3631
3585
|
}), t[17] = C, t[18] = w, t[19] = T) : T = t[19];
|
|
3632
3586
|
let E;
|
|
3633
3587
|
t[20] === o ? E = t[21] : (E = ii.map((e) => {
|
|
3634
|
-
let { hue: t,
|
|
3588
|
+
let { hue: t, label: n, steps: r } = e;
|
|
3635
3589
|
return /* @__PURE__ */ W("div", {
|
|
3636
|
-
className:
|
|
3590
|
+
className: ni.group,
|
|
3637
3591
|
children: [/* @__PURE__ */ U("span", {
|
|
3638
|
-
className:
|
|
3639
|
-
children:
|
|
3592
|
+
className: ni["section-title"],
|
|
3593
|
+
children: n
|
|
3640
3594
|
}), /* @__PURE__ */ U("div", {
|
|
3641
|
-
className:
|
|
3642
|
-
children:
|
|
3643
|
-
let n =
|
|
3595
|
+
className: ni.scale,
|
|
3596
|
+
children: r.map((e) => {
|
|
3597
|
+
let [t, n] = e;
|
|
3644
3598
|
return /* @__PURE__ */ W("div", {
|
|
3645
|
-
className:
|
|
3646
|
-
style: { gridColumn: String(
|
|
3647
|
-
"data-copy-token": n,
|
|
3648
|
-
title: n,
|
|
3599
|
+
className: ni.swatch,
|
|
3600
|
+
style: { gridColumn: String(Number(t) / 100) },
|
|
3601
|
+
"data-copy-token": n.property,
|
|
3602
|
+
title: n.property,
|
|
3649
3603
|
children: [/* @__PURE__ */ U("div", {
|
|
3650
|
-
className:
|
|
3651
|
-
style: { backgroundColor:
|
|
3604
|
+
className: ni["swatch-bg"],
|
|
3605
|
+
style: { backgroundColor: n.ref }
|
|
3652
3606
|
}), /* @__PURE__ */ U("code", {
|
|
3653
|
-
className:
|
|
3654
|
-
children: o === n ? "copied!" :
|
|
3607
|
+
className: ni["swatch-name"],
|
|
3608
|
+
children: o === n.property ? "copied!" : t
|
|
3655
3609
|
})]
|
|
3656
|
-
}, n);
|
|
3610
|
+
}, n.property);
|
|
3657
3611
|
})
|
|
3658
3612
|
})]
|
|
3659
3613
|
}, t);
|
|
@@ -3960,13 +3914,13 @@ var _i = { "elm-markdown": "_elm-markdown_uttgx_1" }, Q = (e) => {
|
|
|
3960
3914
|
let r = e[n];
|
|
3961
3915
|
switch (r.type) {
|
|
3962
3916
|
case "blockquote":
|
|
3963
|
-
r.tokens && r.tokens.length !== 0 && t.push(/* @__PURE__ */ U(
|
|
3917
|
+
r.tokens && r.tokens.length !== 0 && t.push(/* @__PURE__ */ U(fn, { children: Q(r.tokens) }, n));
|
|
3964
3918
|
break;
|
|
3965
3919
|
case "br":
|
|
3966
3920
|
t.push(/* @__PURE__ */ U("br", {}, n));
|
|
3967
3921
|
break;
|
|
3968
3922
|
case "code":
|
|
3969
|
-
t.push(/* @__PURE__ */ U(
|
|
3923
|
+
t.push(/* @__PURE__ */ U(kt, {
|
|
3970
3924
|
code: r.text.trim(),
|
|
3971
3925
|
language: r.lang
|
|
3972
3926
|
}, n));
|
|
@@ -3999,21 +3953,21 @@ var _i = { "elm-markdown": "_elm-markdown_uttgx_1" }, Q = (e) => {
|
|
|
3999
3953
|
case "escape": break;
|
|
4000
3954
|
case "heading": {
|
|
4001
3955
|
let e = r.depth;
|
|
4002
|
-
r.tokens && r.tokens.length !== 0 ? t.push(/* @__PURE__ */ U(
|
|
3956
|
+
r.tokens && r.tokens.length !== 0 ? t.push(/* @__PURE__ */ U(En, {
|
|
4003
3957
|
level: e,
|
|
4004
3958
|
children: Q(r.tokens)
|
|
4005
|
-
}, n)) : t.push(/* @__PURE__ */ U(
|
|
3959
|
+
}, n)) : t.push(/* @__PURE__ */ U(En, {
|
|
4006
3960
|
level: e,
|
|
4007
3961
|
text: r.text
|
|
4008
3962
|
}, n));
|
|
4009
3963
|
break;
|
|
4010
3964
|
}
|
|
4011
3965
|
case "hr":
|
|
4012
|
-
t.push(/* @__PURE__ */ U(
|
|
3966
|
+
t.push(/* @__PURE__ */ U(yn, {}, n));
|
|
4013
3967
|
break;
|
|
4014
3968
|
case "html": break;
|
|
4015
3969
|
case "image":
|
|
4016
|
-
t.push(/* @__PURE__ */ U(
|
|
3970
|
+
t.push(/* @__PURE__ */ U(Wt, {
|
|
4017
3971
|
enableModal: !0,
|
|
4018
3972
|
src: r.href,
|
|
4019
3973
|
alt: r.text
|
|
@@ -4030,7 +3984,7 @@ var _i = { "elm-markdown": "_elm-markdown_uttgx_1" }, Q = (e) => {
|
|
|
4030
3984
|
break;
|
|
4031
3985
|
case "list": {
|
|
4032
3986
|
let e = r.items.map((e, t) => /* @__PURE__ */ U("li", { children: Q(e.tokens) }, t));
|
|
4033
|
-
t.push(/* @__PURE__ */ U(
|
|
3987
|
+
t.push(/* @__PURE__ */ U(On, {
|
|
4034
3988
|
listStyle: r.ordered ? "ordered" : "unordered",
|
|
4035
3989
|
children: e
|
|
4036
3990
|
}, n));
|
|
@@ -4040,7 +3994,7 @@ var _i = { "elm-markdown": "_elm-markdown_uttgx_1" }, Q = (e) => {
|
|
|
4040
3994
|
t.push(/* @__PURE__ */ U("li", { children: r.tokens && r.tokens.length !== 0 ? Q(r.tokens) : r.text }, n));
|
|
4041
3995
|
break;
|
|
4042
3996
|
case "paragraph":
|
|
4043
|
-
t.push(/* @__PURE__ */ U(
|
|
3997
|
+
t.push(/* @__PURE__ */ U(An, { children: r.tokens && r.tokens.length !== 0 ? Q(r.tokens) : r.text }, n));
|
|
4044
3998
|
break;
|
|
4045
3999
|
case "space": break;
|
|
4046
4000
|
case "strong":
|
|
@@ -4053,8 +4007,8 @@ var _i = { "elm-markdown": "_elm-markdown_uttgx_1" }, Q = (e) => {
|
|
|
4053
4007
|
}, n));
|
|
4054
4008
|
break;
|
|
4055
4009
|
case "table": {
|
|
4056
|
-
let e = (e) => e.map((e, t) => /* @__PURE__ */ U(
|
|
4057
|
-
t.push(/* @__PURE__ */ W(
|
|
4010
|
+
let e = (e) => e.map((e, t) => /* @__PURE__ */ U(Rn, { children: Q(e.tokens) }, t)), i = /* @__PURE__ */ U(Hn, { children: e(r.header) }), a = r.rows.map((t, n) => /* @__PURE__ */ U(Hn, { children: e(t) }, n));
|
|
4011
|
+
t.push(/* @__PURE__ */ W(Fn, { children: [/* @__PURE__ */ U(Bn, { children: i }), /* @__PURE__ */ U(In, { children: a })] }, n));
|
|
4058
4012
|
break;
|
|
4059
4013
|
}
|
|
4060
4014
|
case "text": r.tokens && r.tokens.length !== 0 ? t.push(...Q(r.tokens)) : t.push(r.text);
|
|
@@ -4340,7 +4294,7 @@ var Ai = (e) => {
|
|
|
4340
4294
|
execute: E
|
|
4341
4295
|
};
|
|
4342
4296
|
}, Mi = (e) => {
|
|
4343
|
-
let t = H(3), [n, r] =
|
|
4297
|
+
let t = H(3), [n, r] = ct(e?.config), i;
|
|
4344
4298
|
return t[0] !== n || t[1] !== r ? (i = {
|
|
4345
4299
|
ref: n,
|
|
4346
4300
|
setEnabled: r
|
|
@@ -4381,18 +4335,18 @@ var Pi = (e, t) => {
|
|
|
4381
4335
|
//#endregion
|
|
4382
4336
|
//#region src/hooks/use-debounced-store.ts
|
|
4383
4337
|
function Fi(e, t) {
|
|
4384
|
-
let n = l(() =>
|
|
4338
|
+
let n = l(() => lt(e), []), [r, i] = f(n), [a, o] = f(() => lt(n)), c = t <= 0 ? r : a;
|
|
4385
4339
|
return s(() => {
|
|
4386
4340
|
if (t <= 0) return;
|
|
4387
|
-
let e =
|
|
4388
|
-
o((t) =>
|
|
4341
|
+
let e = lt(r), n = setTimeout(() => {
|
|
4342
|
+
o((t) => ut(e, t) ? t : e);
|
|
4389
4343
|
}, t);
|
|
4390
4344
|
return () => clearTimeout(n);
|
|
4391
4345
|
}, [r, t]), {
|
|
4392
4346
|
store: r,
|
|
4393
4347
|
setStore: i,
|
|
4394
4348
|
debouncedStore: c,
|
|
4395
|
-
isPending: !
|
|
4349
|
+
isPending: !ut(r, c)
|
|
4396
4350
|
};
|
|
4397
4351
|
}
|
|
4398
4352
|
//#endregion
|
|
@@ -4635,11 +4589,11 @@ var qi = (e, t) => {
|
|
|
4635
4589
|
}
|
|
4636
4590
|
let e = () => {
|
|
4637
4591
|
u(!0), h.current = setTimeout(() => {
|
|
4638
|
-
h.current = void 0, u(!1),
|
|
4592
|
+
h.current = void 0, u(!1), ut(p.current, m.current) || (m.current = p.current, c(p.current), e());
|
|
4639
4593
|
}, t);
|
|
4640
4594
|
};
|
|
4641
4595
|
if (h.current === void 0) {
|
|
4642
|
-
if (
|
|
4596
|
+
if (ut(i, m.current)) return;
|
|
4643
4597
|
m.current = i, c(i), e();
|
|
4644
4598
|
}
|
|
4645
4599
|
}, n[5] = t, n[6] = i, n[7] = y) : y = n[7];
|
|
@@ -4654,4 +4608,4 @@ var qi = (e, t) => {
|
|
|
4654
4608
|
}, n[10] = l, n[11] = o, n[12] = i, n[13] = x) : x = n[13], x;
|
|
4655
4609
|
};
|
|
4656
4610
|
//#endregion
|
|
4657
|
-
export {
|
|
4611
|
+
export { ar as ElmA2ui, zt as ElmAudioPlayer, gr as ElmBlockFallback, Wt as ElmBlockImage, fn as ElmBlockQuote, Xt as ElmBookmark, $r as ElmBreadcrumb, vr as ElmButton, br as ElmButtonDropdown, hn as ElmCallout, Sr as ElmCheckbox, kt as ElmCodeBlock, $t as ElmCollapse, ai as ElmColorPrimitiveSample, hi as ElmColorSemanticSample, Rr as ElmCopyIcon, yn as ElmDivider, pr as ElmDotLoadingIcon, qt as ElmFile, Sn as ElmFragmentIdentifier, En as ElmHeading, Ft as ElmHtml, It as ElmHtmlViewer, Ct as ElmInlineIcon, K as ElmInlineText, pt as ElmKatex, bt as ElmLanguageIcon, On as ElmList, yi as ElmMarkdown, G as ElmMdiIcon, Ht as ElmModal, _n as ElmNotionCallout, ti as ElmPageTop, An as ElmParagraph, cr as ElmParallax, hr as ElmRectangleWave, wr as ElmSelect, Tt as ElmShikiHighlighter, kr as ElmSlider, Br as ElmSquareLoadingIcon, jr as ElmSwitch, on as ElmTab, an as ElmTabList, sn as ElmTabPanel, Fn as ElmTable, In as ElmTableBody, Rn as ElmTableCell, Bn as ElmTableHeader, Hn as ElmTableRow, rn as ElmTabs, Nr as ElmTextArea, Pr as ElmTextField, ln as ElmToggle, Zr as ElmToggleTheme, ur as ElmTooltip, Wn as ElmUnsupportedBlock, Lr as ElmValidation, Mn as HasRowHeaderContext, Hr as THEME_CHANGE_EVENT, Nn as TableSectionContext, Gi as ThrottledQueue, er as notionBlockCatalog, Qn as notionBlockComponents, $n as notionBlockFunctions, ji as useAsyncState, Mi as useAutoAnimate, en as useBindableSignal, Ni as useBindableStore, Dt as useClipboard, Pi as useDebouncedSignal, Fi as useDebouncedStore, Ii as useDelayedSignal, Jr as useElmethisTheme, zi as useLocalStorage, Ut as useModal, Bi as useSessionStorage, Ki as useThrottledQueue, qi as useThrottledSignal, Ji as useThrottledStore, Ai as useWordle };
|