@tempots/beatui 0.60.0 → 0.60.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/_commonjsHelpers-DwGv2jUC.cjs +1 -0
- package/dist/{ar-B7Vs1jtG.cjs → ar-CZ-UB9pc.cjs} +1 -1
- package/dist/{ar-BOqk-mzn.js → ar-TEVFGyor.js} +1 -1
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +4 -4
- package/dist/{de-CviZ-p_4.js → de-DAzM31i4.js} +1 -1
- package/dist/{de-DNjhUbYu.cjs → de-IZSle3Nd.cjs} +1 -1
- package/dist/{es-DxuZQTVE.js → es-C7Gx9dqG.js} +1 -1
- package/dist/{es-D82T2KKm.cjs → es-DYe8rpsj.cjs} +1 -1
- package/dist/{fa-C7eY3MZF.cjs → fa-CEbnfFly.cjs} +1 -1
- package/dist/{fa-BBySqLUh.js → fa-DKX_zJDi.js} +1 -1
- package/dist/{fr-DBCblSme.js → fr-BRfNV0Yj.js} +1 -1
- package/dist/{fr-DlXc2xhl.cjs → fr-CrG0l5HN.cjs} +1 -1
- package/dist/{he-1Czj0G0s.cjs → he-D6hsIiTH.cjs} +1 -1
- package/dist/{he-DUrHwGF6.js → he-DRAV97MO.js} +1 -1
- package/dist/{hi-BdJqIhvL.js → hi-BaZyjzct.js} +1 -1
- package/dist/{hi-DyWQTexo.cjs → hi-DyS6BNlk.cjs} +1 -1
- package/dist/hls.light.min-BHW1Af0w.js +8303 -0
- package/dist/hls.light.min-D3hUMpII.cjs +27 -0
- package/dist/{index-BLTlhUPG.cjs → index-BJxozmss.cjs} +21 -21
- package/dist/{index-D6_EcuJG.js → index-Bu4A7nbp.js} +1 -1
- package/dist/{index-CMIeO1pS.cjs → index-Ch-e3nx4.cjs} +1 -1
- package/dist/{index-yhjOw19A.js → index-nqoZcPdT.js} +2973 -3015
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +986 -964
- package/dist/{it-BhqBuhZq.cjs → it-5c_IK4cL.cjs} +1 -1
- package/dist/{it-B7HY_G0n.js → it-TCCyUGRc.js} +1 -1
- package/dist/{ja-DavHeIBC.js → ja-Bpc6MfYs.js} +1 -1
- package/dist/{ja-Be1SXGQn.cjs → ja-VrfuPGN3.cjs} +1 -1
- package/dist/json-schema/index.cjs.js +8 -1
- package/dist/json-schema/index.es.js +8797 -35
- package/dist/{ko-Be3o52et.js → ko-BBN3tai6.js} +1 -1
- package/dist/{ko-BuyoVlmH.cjs → ko-BKSVpY_x.cjs} +1 -1
- package/dist/{modal-DT3cH1Kz.cjs → modal-DA0OKusk.cjs} +1 -1
- package/dist/{modal-BT2LwYlK.js → modal-DJDeFIxV.js} +2 -2
- package/dist/{nl-FD8OAOWL.cjs → nl-Bry6kgvp.cjs} +1 -1
- package/dist/{nl-DJIY4R0b.js → nl-CwXW1x3G.js} +1 -1
- package/dist/{notice-CUTUN2Kh.cjs → notice-BIcHmVnn.cjs} +1 -1
- package/dist/{notice-Cs95CTP3.js → notice-Cpso9PgQ.js} +1 -1
- package/dist/{pl-weZLWcSD.cjs → pl-CI2JMYK3.cjs} +1 -1
- package/dist/{pl-Bqoq63Fm.js → pl-utONv5st.js} +1 -1
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +1 -1
- package/dist/{pt-7g4YVboz.js → pt-BKZlur2O.js} +1 -1
- package/dist/{pt-BuBrXOmS.cjs → pt-pg3nMUQB.cjs} +1 -1
- package/dist/{ru-hvj4lu1_.js → ru-B6HTgTqQ.js} +1 -1
- package/dist/{ru-Br9Wedcu.cjs → ru-DcagJ4uT.cjs} +1 -1
- package/dist/{toolbar-Bk_vLHOS.cjs → toolbar-CC22Z53U.cjs} +1 -1
- package/dist/{toolbar-ReCF2tBa.js → toolbar-_yJ-dm-Z.js} +1 -1
- package/dist/{tr-BSuvz1N5.cjs → tr-BabBuwqd.cjs} +1 -1
- package/dist/{tr-qxangEut.js → tr-DhELxnEm.js} +1 -1
- package/dist/translations-BRRDPpLp.cjs +1 -0
- package/dist/translations-ConAsIH1.js +67 -0
- package/dist/translations-DM5R5VZ0.cjs +1 -0
- package/dist/{translations-D5WRSMhS.js → translations-g3qGTkzw.js} +322 -308
- package/dist/types/components/json-schema/ajv-utils.d.ts +1 -3
- package/dist/types/components/media/pdf-page-viewer.d.ts +2 -2
- package/dist/{ur-DBg2MZvK.cjs → ur-BVE5ZRyR.cjs} +1 -1
- package/dist/{ur-CCcFf5OU.js → ur-CT09S1x5.js} +1 -1
- package/dist/{utils-3Mm1sj4Q.cjs → utils-B25pniId.cjs} +1 -1
- package/dist/{utils-CutcxfzK.js → utils-BRzdi3Gx.js} +2 -2
- package/dist/{vi-BAHqe-lr.js → vi-BsZzI9Fa.js} +1 -1
- package/dist/{vi-DeH8SXUt.cjs → vi-DvU7fKay.cjs} +1 -1
- package/dist/{zh-B-ZsrhFY.js → zh-BeCkrv4q.js} +1 -1
- package/dist/{zh-Ceo_KGzC.cjs → zh-CijYgDFA.cjs} +1 -1
- package/package.json +2 -2
- package/dist/2019-CSG1mHKh.cjs +0 -1
- package/dist/2019-xRoq64Hq.js +0 -163
- package/dist/2020-BxLJruSu.js +0 -191
- package/dist/2020-CySfMcC9.cjs +0 -1
- package/dist/hls-B5PliUq8.cjs +0 -40
- package/dist/hls-DLd3ClAs.js +0 -21741
- package/dist/index-B6myFAz5.js +0 -226
- package/dist/index-Cok4rljj.cjs +0 -8
- package/dist/index-DGQhsTxm.js +0 -8317
- package/dist/index-Duw9TkLf.cjs +0 -1
- package/dist/translations-BtsgtW4T.js +0 -47
- package/dist/translations-CGTcEchB.cjs +0 -1
- package/dist/translations-DmVvxPlr.cjs +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { makeProviderMark as
|
|
2
|
-
import { WhenInViewport as
|
|
3
|
-
import { b as
|
|
4
|
-
function
|
|
1
|
+
import { makeProviderMark as O, localStorageProp as E, computedOf as k, Use as A, html as g, attr as i, When as w, Fragment as y, aria as f, coalesce as z, style as D, prop as j, on as I, Value as V, Empty as L, WithElement as K, OnDispose as W, input as J, emitValue as S } from "@tempots/dom";
|
|
2
|
+
import { WhenInViewport as Q, Query as Y, ElementRect as Z } from "@tempots/ui";
|
|
3
|
+
import { b as X, g as tt } from "./colors-pQZlNrwM.js";
|
|
4
|
+
function et(t, {
|
|
5
5
|
units: e = ["B", "KB", "MB", "GB", "TB"],
|
|
6
|
-
decimalPlaces:
|
|
7
|
-
locale:
|
|
6
|
+
decimalPlaces: o = 0,
|
|
7
|
+
locale: n
|
|
8
8
|
} = {}) {
|
|
9
9
|
if (t === 0 || t === 0n)
|
|
10
|
-
return new Intl.NumberFormat(
|
|
10
|
+
return new Intl.NumberFormat(n, {
|
|
11
11
|
style: "unit",
|
|
12
12
|
unit: "byte",
|
|
13
13
|
unitDisplay: "short",
|
|
@@ -15,21 +15,21 @@ function tt(t, {
|
|
|
15
15
|
}).format(0).replace("byte", e[0]);
|
|
16
16
|
let a, r;
|
|
17
17
|
if (typeof t == "bigint") {
|
|
18
|
-
let
|
|
19
|
-
for (a = 0;
|
|
20
|
-
|
|
18
|
+
let l = t < 0n ? -t : t;
|
|
19
|
+
for (a = 0; l >= 1024n && a < e.length - 1; )
|
|
20
|
+
l = l / 1024n, a++;
|
|
21
21
|
r = Number(t) / Math.pow(1024, a);
|
|
22
22
|
} else
|
|
23
23
|
a = Math.floor(Math.log(Math.abs(t)) / Math.log(1024)), a = Math.min(a, e.length - 1), r = t / Math.pow(1024, a);
|
|
24
|
-
return new Intl.NumberFormat(
|
|
24
|
+
return new Intl.NumberFormat(n, {
|
|
25
25
|
style: "unit",
|
|
26
26
|
unit: "byte",
|
|
27
27
|
unitDisplay: "short",
|
|
28
|
-
minimumFractionDigits: a === 0 ? 0 :
|
|
29
|
-
maximumFractionDigits: a === 0 ? 0 :
|
|
28
|
+
minimumFractionDigits: a === 0 ? 0 : o,
|
|
29
|
+
maximumFractionDigits: a === 0 ? 0 : o
|
|
30
30
|
}).format(r).replace("byte", e[a]);
|
|
31
31
|
}
|
|
32
|
-
const
|
|
32
|
+
const nt = {
|
|
33
33
|
loadingExtended: "Loading, please wait",
|
|
34
34
|
loadingShort: "Loading...",
|
|
35
35
|
locale: "Locale",
|
|
@@ -87,19 +87,19 @@ const R = {
|
|
|
87
87
|
// inputs reset
|
|
88
88
|
clearValue: "Reset",
|
|
89
89
|
unknownType: "Unknown type",
|
|
90
|
-
filesInputInstructions: (t, e,
|
|
91
|
-
let
|
|
90
|
+
filesInputInstructions: (t, e, o) => {
|
|
91
|
+
let n = t == null || t > 1 ? "Click to choose or drag files here" : "Click to choose or drag a file here";
|
|
92
92
|
if (t || e) {
|
|
93
93
|
const a = [];
|
|
94
|
-
if (t != null && t > 1 && a.push(`up to ${t} files`), e &&
|
|
95
|
-
const r =
|
|
96
|
-
units:
|
|
94
|
+
if (t != null && t > 1 && a.push(`up to ${t} files`), e && o) {
|
|
95
|
+
const r = et(e, {
|
|
96
|
+
units: o
|
|
97
97
|
});
|
|
98
98
|
a.push(`max ${r} each`);
|
|
99
99
|
}
|
|
100
|
-
a.length > 0 && (
|
|
100
|
+
a.length > 0 && (n += ` (${a.join(", ")})`);
|
|
101
101
|
}
|
|
102
|
-
return
|
|
102
|
+
return n;
|
|
103
103
|
},
|
|
104
104
|
// ProseMirror editor
|
|
105
105
|
prosemirror: {
|
|
@@ -124,15 +124,7 @@ const R = {
|
|
|
124
124
|
pageOutOfRange: (t, e) => `Page ${t} is out of range (1-${e})`,
|
|
125
125
|
renderFailed: "Failed to render PDF page"
|
|
126
126
|
}
|
|
127
|
-
},
|
|
128
|
-
__proto__: null,
|
|
129
|
-
default: R
|
|
130
|
-
}, Symbol.toStringTag, { value: "Module" })), ot = R, nt = "en", rt = (t, e, n) => {
|
|
131
|
-
const o = t[e];
|
|
132
|
-
return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((a, r) => {
|
|
133
|
-
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(r.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + e + (e.split("/").length !== n ? ". Note that variables only represent file names one level deep." : ""))));
|
|
134
|
-
});
|
|
135
|
-
}, at = /* @__PURE__ */ new Set([
|
|
127
|
+
}, M = nt, T = "en", ot = /* @__PURE__ */ new Set([
|
|
136
128
|
"ar",
|
|
137
129
|
// Arabic
|
|
138
130
|
"he",
|
|
@@ -158,24 +150,24 @@ const R = {
|
|
|
158
150
|
"in"
|
|
159
151
|
// Indonesian (deprecated, but sometimes confused)
|
|
160
152
|
]);
|
|
161
|
-
function
|
|
153
|
+
function N(t) {
|
|
162
154
|
if (!t) return "ltr";
|
|
163
155
|
const e = t.split(/[-_]/)[0].toLowerCase();
|
|
164
|
-
return
|
|
156
|
+
return ot.has(e) ? "rtl" : "ltr";
|
|
165
157
|
}
|
|
166
|
-
function
|
|
167
|
-
return t === "auto" ?
|
|
158
|
+
function rt(t, e) {
|
|
159
|
+
return t === "auto" ? N(e) : t;
|
|
168
160
|
}
|
|
169
|
-
function
|
|
161
|
+
function Vt(t) {
|
|
170
162
|
return `b-${t}`;
|
|
171
163
|
}
|
|
172
|
-
function
|
|
173
|
-
return
|
|
164
|
+
function _t(t) {
|
|
165
|
+
return N(t) === "rtl";
|
|
174
166
|
}
|
|
175
|
-
function
|
|
167
|
+
function Et(t) {
|
|
176
168
|
return t === "ltr" ? "rtl" : "ltr";
|
|
177
169
|
}
|
|
178
|
-
const
|
|
170
|
+
const at = {
|
|
179
171
|
ltr: {
|
|
180
172
|
"inline-start": "left",
|
|
181
173
|
"inline-end": "right",
|
|
@@ -189,42 +181,42 @@ const it = {
|
|
|
189
181
|
"block-end": "bottom"
|
|
190
182
|
}
|
|
191
183
|
};
|
|
192
|
-
function
|
|
193
|
-
return
|
|
184
|
+
function Tt(t, e) {
|
|
185
|
+
return at[e][t];
|
|
194
186
|
}
|
|
195
|
-
const
|
|
196
|
-
mark:
|
|
187
|
+
const st = {
|
|
188
|
+
mark: O("Locale"),
|
|
197
189
|
create: (t) => {
|
|
198
|
-
const e =
|
|
190
|
+
const e = E({
|
|
199
191
|
defaultValue: navigator.language ?? "en-US",
|
|
200
192
|
key: "beatui-locale"
|
|
201
|
-
}),
|
|
193
|
+
}), o = E({
|
|
202
194
|
defaultValue: "auto",
|
|
203
195
|
key: "beatui-direction-preference"
|
|
204
|
-
}),
|
|
196
|
+
}), n = k(
|
|
205
197
|
e,
|
|
206
|
-
|
|
198
|
+
o
|
|
207
199
|
)(
|
|
208
|
-
(r, s) =>
|
|
200
|
+
(r, s) => rt(s, r)
|
|
209
201
|
);
|
|
210
202
|
return {
|
|
211
203
|
value: {
|
|
212
204
|
locale: e,
|
|
213
205
|
setLocale: (r) => e.set(r),
|
|
214
|
-
direction:
|
|
215
|
-
directionPreference:
|
|
216
|
-
setDirectionPreference: (r) =>
|
|
206
|
+
direction: n,
|
|
207
|
+
directionPreference: o,
|
|
208
|
+
setDirectionPreference: (r) => o.set(r)
|
|
217
209
|
},
|
|
218
210
|
dispose: () => {
|
|
219
|
-
e.dispose(),
|
|
211
|
+
e.dispose(), o.dispose(), n.dispose();
|
|
220
212
|
}
|
|
221
213
|
};
|
|
222
214
|
}
|
|
223
215
|
}, {
|
|
224
|
-
variants:
|
|
225
|
-
special:
|
|
226
|
-
overrides:
|
|
227
|
-
} =
|
|
216
|
+
variants: lt,
|
|
217
|
+
special: it,
|
|
218
|
+
overrides: _
|
|
219
|
+
} = X;
|
|
228
220
|
function v(t, e) {
|
|
229
221
|
switch (t) {
|
|
230
222
|
case "white":
|
|
@@ -234,76 +226,76 @@ function v(t, e) {
|
|
|
234
226
|
case "transparent":
|
|
235
227
|
return "transparent";
|
|
236
228
|
default:
|
|
237
|
-
return
|
|
229
|
+
return tt(t, e);
|
|
238
230
|
}
|
|
239
231
|
}
|
|
240
|
-
function
|
|
241
|
-
const
|
|
242
|
-
if (!
|
|
232
|
+
function U(t, e) {
|
|
233
|
+
const o = it[t];
|
|
234
|
+
if (!o) return;
|
|
243
235
|
if (e === "light")
|
|
244
|
-
return
|
|
245
|
-
const
|
|
246
|
-
return
|
|
236
|
+
return o;
|
|
237
|
+
const n = _[t];
|
|
238
|
+
return n ? n[e] : o;
|
|
247
239
|
}
|
|
248
|
-
function x(t, e,
|
|
249
|
-
const
|
|
250
|
-
if (
|
|
251
|
-
const r = o
|
|
240
|
+
function x(t, e, o) {
|
|
241
|
+
const n = _[t];
|
|
242
|
+
if (n) {
|
|
243
|
+
const r = n[o];
|
|
252
244
|
if (r)
|
|
253
245
|
return { backgroundColor: r.backgroundColor, textColor: r.color };
|
|
254
246
|
}
|
|
255
247
|
if (e === "solid") {
|
|
256
|
-
const r =
|
|
248
|
+
const r = U(t, o);
|
|
257
249
|
if (r)
|
|
258
250
|
return {
|
|
259
251
|
backgroundColor: r.backgroundColor,
|
|
260
252
|
textColor: r.color
|
|
261
253
|
};
|
|
262
254
|
}
|
|
263
|
-
const a =
|
|
255
|
+
const a = lt[e][o];
|
|
264
256
|
return {
|
|
265
257
|
backgroundColor: v(t, a.bgShade),
|
|
266
258
|
textColor: a.textColor
|
|
267
259
|
};
|
|
268
260
|
}
|
|
269
|
-
const
|
|
261
|
+
const ct = {
|
|
270
262
|
light: { shade: 600, textColor: "var(--color-white)" },
|
|
271
263
|
dark: { shade: 600, textColor: "var(--text-inverted-dark)" }
|
|
272
|
-
},
|
|
264
|
+
}, ut = {
|
|
273
265
|
light: { shade: 300, textColor: "var(--text-normal-light)" },
|
|
274
266
|
dark: { shade: 700, textColor: "var(--text-normal-dark)" }
|
|
275
|
-
},
|
|
267
|
+
}, dt = {
|
|
276
268
|
light: { shade: 400, textColor: "var(--text-normal-light)" },
|
|
277
269
|
dark: { shade: 600, textColor: "var(--text-normal-dark)" }
|
|
278
270
|
};
|
|
279
|
-
function
|
|
280
|
-
const
|
|
281
|
-
if (
|
|
282
|
-
const r = o
|
|
271
|
+
function m(t, e, o) {
|
|
272
|
+
const n = _[t];
|
|
273
|
+
if (n) {
|
|
274
|
+
const r = n[o];
|
|
283
275
|
if (r)
|
|
284
276
|
return { backgroundColor: r.backgroundColor, textColor: r.color };
|
|
285
277
|
}
|
|
286
278
|
if (e === "solid") {
|
|
287
|
-
const r =
|
|
279
|
+
const r = U(t, o);
|
|
288
280
|
if (r)
|
|
289
281
|
return {
|
|
290
282
|
backgroundColor: r.backgroundColor,
|
|
291
283
|
textColor: r.color
|
|
292
284
|
};
|
|
293
|
-
const s =
|
|
285
|
+
const s = ct[o];
|
|
294
286
|
return {
|
|
295
287
|
backgroundColor: v(t, s.shade),
|
|
296
288
|
textColor: s.textColor
|
|
297
289
|
};
|
|
298
290
|
}
|
|
299
|
-
const a = e === "light" ?
|
|
291
|
+
const a = e === "light" ? ut[o] : dt[o];
|
|
300
292
|
return {
|
|
301
293
|
backgroundColor: v(t, a.shade),
|
|
302
294
|
textColor: a.textColor
|
|
303
295
|
};
|
|
304
296
|
}
|
|
305
|
-
function
|
|
306
|
-
const
|
|
297
|
+
function F(t, e) {
|
|
298
|
+
const o = e === "light" ? 500 : 600;
|
|
307
299
|
switch (t) {
|
|
308
300
|
case "white":
|
|
309
301
|
return e === "light" ? "var(--text-inverse-light)" : "var(--text-inverted-dark)";
|
|
@@ -312,16 +304,16 @@ function E(t, e) {
|
|
|
312
304
|
case "transparent":
|
|
313
305
|
return "transparent";
|
|
314
306
|
default:
|
|
315
|
-
return v(t,
|
|
307
|
+
return v(t, o);
|
|
316
308
|
}
|
|
317
309
|
}
|
|
318
310
|
function C(t, e) {
|
|
319
311
|
return t === "white" ? "var(--color-white)" : t === "black" ? "var(--color-black)" : t === "transparent" ? "inherit" : v(t, e === "light" ? 800 : 200);
|
|
320
312
|
}
|
|
321
|
-
function
|
|
322
|
-
return e === "soft" ? v(t,
|
|
313
|
+
function R(t, e, o) {
|
|
314
|
+
return e === "soft" ? v(t, o === "light" ? 300 : 700) : v(t, o === "light" ? 500 : 600);
|
|
323
315
|
}
|
|
324
|
-
const
|
|
316
|
+
const ht = "bui-icons", P = /* @__PURE__ */ new Map(), q = (() => {
|
|
325
317
|
try {
|
|
326
318
|
return typeof indexedDB < "u" && indexedDB !== null;
|
|
327
319
|
} catch {
|
|
@@ -330,135 +322,135 @@ const gt = "bui-icons", D = /* @__PURE__ */ new Map(), q = (() => {
|
|
|
330
322
|
})();
|
|
331
323
|
function ft() {
|
|
332
324
|
return q ? new Promise((t, e) => {
|
|
333
|
-
const
|
|
334
|
-
|
|
335
|
-
const a =
|
|
325
|
+
const o = indexedDB.open(ht, 1);
|
|
326
|
+
o.onupgradeneeded = function(n) {
|
|
327
|
+
const a = n.target.result;
|
|
336
328
|
a.objectStoreNames.contains("icons") || a.createObjectStore("icons");
|
|
337
|
-
},
|
|
338
|
-
t(
|
|
339
|
-
},
|
|
340
|
-
e(
|
|
329
|
+
}, o.onsuccess = function() {
|
|
330
|
+
t(o.result);
|
|
331
|
+
}, o.onerror = function() {
|
|
332
|
+
e(o.error);
|
|
341
333
|
};
|
|
342
334
|
}) : Promise.reject(new Error("IndexedDB not available"));
|
|
343
335
|
}
|
|
344
336
|
const B = q ? ft() : null;
|
|
345
|
-
async function
|
|
337
|
+
async function gt(t, e) {
|
|
346
338
|
try {
|
|
347
339
|
if (B) {
|
|
348
|
-
const
|
|
349
|
-
return new Promise((
|
|
350
|
-
const r =
|
|
351
|
-
r.objectStore("icons").put(e, t), r.oncomplete = () =>
|
|
340
|
+
const o = await B;
|
|
341
|
+
return new Promise((n, a) => {
|
|
342
|
+
const r = o.transaction("icons", "readwrite");
|
|
343
|
+
r.objectStore("icons").put(e, t), r.oncomplete = () => n(), r.onerror = a;
|
|
352
344
|
});
|
|
353
345
|
} else
|
|
354
|
-
|
|
346
|
+
P.set(t, e);
|
|
355
347
|
} catch {
|
|
356
|
-
|
|
348
|
+
P.set(t, e);
|
|
357
349
|
}
|
|
358
350
|
}
|
|
359
|
-
async function
|
|
351
|
+
async function bt(t) {
|
|
360
352
|
try {
|
|
361
353
|
if (B) {
|
|
362
354
|
const e = await B;
|
|
363
|
-
return new Promise((
|
|
355
|
+
return new Promise((o, n) => {
|
|
364
356
|
const s = e.transaction("icons", "readonly").objectStore("icons").get(t);
|
|
365
357
|
s.onsuccess = function() {
|
|
366
|
-
|
|
367
|
-
}, s.onerror =
|
|
358
|
+
o(s.result);
|
|
359
|
+
}, s.onerror = n;
|
|
368
360
|
});
|
|
369
361
|
} else
|
|
370
|
-
return
|
|
362
|
+
return P.get(t) || null;
|
|
371
363
|
} catch {
|
|
372
|
-
return
|
|
364
|
+
return P.get(t) || null;
|
|
373
365
|
}
|
|
374
366
|
}
|
|
375
|
-
async function
|
|
367
|
+
async function pt(t) {
|
|
376
368
|
const e = `https://api.iconify.design/${t}.svg`;
|
|
377
|
-
return fetch(e).then((
|
|
378
|
-
if (
|
|
379
|
-
return
|
|
369
|
+
return fetch(e).then((o) => {
|
|
370
|
+
if (o.status === 200)
|
|
371
|
+
return o.text();
|
|
380
372
|
throw new Error(`Failed to load icon: ${t}`);
|
|
381
373
|
});
|
|
382
374
|
}
|
|
383
|
-
async function
|
|
384
|
-
const e = t.replace(":", "/"),
|
|
385
|
-
if (
|
|
386
|
-
return
|
|
387
|
-
const
|
|
388
|
-
return await
|
|
375
|
+
async function kt(t) {
|
|
376
|
+
const e = t.replace(":", "/"), o = await bt(e);
|
|
377
|
+
if (o)
|
|
378
|
+
return o;
|
|
379
|
+
const n = await pt(e);
|
|
380
|
+
return await gt(e, n), n;
|
|
389
381
|
}
|
|
390
|
-
function
|
|
382
|
+
function mt(t) {
|
|
391
383
|
return ["bc-icon", `bc-icon--${t}`].join(" ");
|
|
392
384
|
}
|
|
393
|
-
function
|
|
385
|
+
function vt(t, e = "solid") {
|
|
394
386
|
if (!t) return "";
|
|
395
|
-
const
|
|
396
|
-
return `--icon-color: ${
|
|
387
|
+
const o = R(t, e, "light"), n = R(t, e, "dark");
|
|
388
|
+
return `--icon-color: ${o}; --icon-color-dark: ${n}`;
|
|
397
389
|
}
|
|
398
|
-
function
|
|
390
|
+
function G({
|
|
399
391
|
icon: t,
|
|
400
392
|
size: e = "md",
|
|
401
|
-
color:
|
|
402
|
-
title:
|
|
393
|
+
color: o,
|
|
394
|
+
title: n,
|
|
403
395
|
accessibility: a = "auto",
|
|
404
396
|
tone: r = "solid"
|
|
405
397
|
}, ...s) {
|
|
406
|
-
const c =
|
|
398
|
+
const c = k(
|
|
407
399
|
a,
|
|
408
|
-
|
|
409
|
-
)((
|
|
410
|
-
return
|
|
400
|
+
n
|
|
401
|
+
)((l, u) => l === "decorative" ? !1 : l === "informative" ? !0 : u != null && u !== "");
|
|
402
|
+
return A(
|
|
411
403
|
H,
|
|
412
|
-
(
|
|
413
|
-
|
|
414
|
-
|
|
404
|
+
(l) => g.span(
|
|
405
|
+
i.class(
|
|
406
|
+
k(e, o)((u) => mt(u ?? "md"))
|
|
415
407
|
),
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
408
|
+
i.style(
|
|
409
|
+
k(
|
|
410
|
+
o,
|
|
419
411
|
r
|
|
420
412
|
)(
|
|
421
|
-
(u,
|
|
413
|
+
(u, b) => vt(u ?? void 0, b ?? "solid")
|
|
422
414
|
)
|
|
423
415
|
),
|
|
424
416
|
// Add accessibility attributes based on icon type
|
|
425
417
|
w(
|
|
426
418
|
c,
|
|
427
419
|
() => y(
|
|
428
|
-
|
|
429
|
-
|
|
420
|
+
i.role("img"),
|
|
421
|
+
f.label(z(n, l.$.iconDescription))
|
|
430
422
|
),
|
|
431
|
-
() =>
|
|
423
|
+
() => f.hidden(!0)
|
|
432
424
|
),
|
|
433
|
-
|
|
425
|
+
Q(
|
|
434
426
|
{ once: !0 },
|
|
435
|
-
() =>
|
|
427
|
+
() => Y({
|
|
436
428
|
request: t,
|
|
437
|
-
load: ({ request: u }) =>
|
|
429
|
+
load: ({ request: u }) => kt(u),
|
|
438
430
|
convertError: String,
|
|
439
431
|
success: ({ value: u }) => g.span(
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
432
|
+
D.width("100%"),
|
|
433
|
+
D.height("100%"),
|
|
434
|
+
i.innerHTML(u)
|
|
443
435
|
),
|
|
444
436
|
pending: () => g.span(
|
|
445
|
-
|
|
437
|
+
i.class("animate-spin"),
|
|
446
438
|
// Loading state accessibility
|
|
447
439
|
w(
|
|
448
440
|
c,
|
|
449
|
-
() => y(
|
|
450
|
-
() =>
|
|
441
|
+
() => y(i.role("img"), f.label(l.$.loadingIcon)),
|
|
442
|
+
() => f.hidden(!0)
|
|
451
443
|
),
|
|
452
444
|
"↻"
|
|
453
445
|
),
|
|
454
446
|
failure: ({ error: u }) => g.span(
|
|
455
|
-
|
|
456
|
-
|
|
447
|
+
i.title(u),
|
|
448
|
+
i.class("text-red-500"),
|
|
457
449
|
// Error state accessibility
|
|
458
450
|
w(
|
|
459
451
|
c,
|
|
460
|
-
() => y(
|
|
461
|
-
() =>
|
|
452
|
+
() => y(i.role("img"), f.label(l.$.failedToLoadIcon)),
|
|
453
|
+
() => f.hidden(!0)
|
|
462
454
|
),
|
|
463
455
|
"🚫"
|
|
464
456
|
)
|
|
@@ -468,61 +460,61 @@ function U({
|
|
|
468
460
|
)
|
|
469
461
|
);
|
|
470
462
|
}
|
|
471
|
-
function
|
|
463
|
+
function xt(t, e, o, n) {
|
|
472
464
|
const a = [
|
|
473
465
|
"bc-button",
|
|
474
466
|
`bc-button--size-${t}`,
|
|
475
467
|
`bc-control--padding-${t}`,
|
|
476
468
|
`bc-control--rounded-${e}`
|
|
477
469
|
];
|
|
478
|
-
return
|
|
470
|
+
return o && a.push("bc-button--loading"), n && a.push("bc-button--full-width"), a.join(" ");
|
|
479
471
|
}
|
|
480
|
-
function
|
|
481
|
-
const
|
|
482
|
-
|
|
483
|
-
const a = (r, s, c,
|
|
484
|
-
|
|
472
|
+
function Ct(t, e, o) {
|
|
473
|
+
const n = /* @__PURE__ */ new Map();
|
|
474
|
+
n.set("--button-text-shadow", "var(--text-shadow-none)"), n.set("--button-text-shadow-dark", "var(--text-shadow-none)");
|
|
475
|
+
const a = (r, s, c, l) => {
|
|
476
|
+
o || (n.set("--button-bg-hover", r), n.set("--button-text-hover", c), n.set("--button-bg-hover-dark", s), n.set("--button-text-hover-dark", l));
|
|
485
477
|
};
|
|
486
478
|
switch (t) {
|
|
487
479
|
case "filled": {
|
|
488
480
|
const r = x(e, "solid", "light"), s = x(e, "solid", "dark");
|
|
489
|
-
|
|
481
|
+
n.set("--button-bg", r.backgroundColor), n.set("--button-text", r.textColor), n.set("--button-bg-dark", s.backgroundColor), n.set("--button-text-dark", s.textColor), n.set(
|
|
490
482
|
"--button-text-shadow",
|
|
491
483
|
"var(--text-shadow-button-filled, var(--text-shadow-sm))"
|
|
492
|
-
),
|
|
484
|
+
), n.set(
|
|
493
485
|
"--button-text-shadow-dark",
|
|
494
486
|
"var(--text-shadow-button-filled, var(--text-shadow-sm))"
|
|
495
487
|
);
|
|
496
|
-
const c =
|
|
488
|
+
const c = m(e, "solid", "light"), l = m(e, "solid", "dark");
|
|
497
489
|
a(
|
|
498
490
|
c.backgroundColor,
|
|
499
|
-
|
|
491
|
+
l.backgroundColor,
|
|
500
492
|
c.textColor,
|
|
501
|
-
|
|
493
|
+
l.textColor
|
|
502
494
|
);
|
|
503
495
|
break;
|
|
504
496
|
}
|
|
505
497
|
case "light": {
|
|
506
498
|
const r = x(e, "light", "light"), s = x(e, "light", "dark");
|
|
507
|
-
|
|
508
|
-
const c =
|
|
499
|
+
n.set("--button-bg", r.backgroundColor), n.set("--button-text", r.textColor), n.set("--button-bg-dark", s.backgroundColor), n.set("--button-text-dark", s.textColor);
|
|
500
|
+
const c = m(e, "light", "light"), l = m(e, "light", "dark");
|
|
509
501
|
a(
|
|
510
502
|
c.backgroundColor,
|
|
511
|
-
|
|
503
|
+
l.backgroundColor,
|
|
512
504
|
c.textColor,
|
|
513
|
-
|
|
505
|
+
l.textColor
|
|
514
506
|
);
|
|
515
507
|
break;
|
|
516
508
|
}
|
|
517
509
|
case "outline": {
|
|
518
|
-
|
|
510
|
+
n.set("--button-bg", "transparent"), n.set("--button-bg-dark", "transparent"), n.set("--button-border", F(e, "light")), n.set("--button-border-dark", F(e, "dark")), n.set("--button-text", C(e, "light")), n.set("--button-text-dark", C(e, "dark")), n.set(
|
|
519
511
|
"--button-text-shadow",
|
|
520
512
|
"var(--text-shadow-button-light, var(--text-shadow-xs))"
|
|
521
|
-
),
|
|
513
|
+
), n.set(
|
|
522
514
|
"--button-text-shadow-dark",
|
|
523
515
|
"var(--text-shadow-button-light, var(--text-shadow-xs))"
|
|
524
516
|
);
|
|
525
|
-
const r =
|
|
517
|
+
const r = m(e, "light", "light"), s = m(e, "light", "dark");
|
|
526
518
|
a(
|
|
527
519
|
r.backgroundColor,
|
|
528
520
|
s.backgroundColor,
|
|
@@ -533,74 +525,74 @@ function yt(t, e, n) {
|
|
|
533
525
|
}
|
|
534
526
|
case "default": {
|
|
535
527
|
const r = x("neutral", "light", "light"), s = x("neutral", "light", "dark");
|
|
536
|
-
|
|
528
|
+
n.set("--button-bg", r.backgroundColor), n.set("--button-text", C(e, "light")), n.set("--button-bg-dark", s.backgroundColor), n.set("--button-text-dark", C(e, "dark")), n.set(
|
|
537
529
|
"--button-text-shadow",
|
|
538
530
|
"var(--text-shadow-button-default, var(--text-shadow-2xs))"
|
|
539
|
-
),
|
|
531
|
+
), n.set(
|
|
540
532
|
"--button-text-shadow-dark",
|
|
541
533
|
"var(--text-shadow-button-default, var(--text-shadow-2xs))"
|
|
542
534
|
);
|
|
543
|
-
const c =
|
|
535
|
+
const c = m("base", "light", "light"), l = m("base", "light", "dark");
|
|
544
536
|
a(
|
|
545
537
|
c.backgroundColor,
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
538
|
+
l.backgroundColor,
|
|
539
|
+
n.get("--button-text") ?? r.textColor,
|
|
540
|
+
n.get("--button-text-dark") ?? s.textColor
|
|
549
541
|
);
|
|
550
542
|
break;
|
|
551
543
|
}
|
|
552
544
|
case "text": {
|
|
553
|
-
|
|
545
|
+
n.set("--button-bg", "transparent"), n.set("--button-bg-dark", "transparent"), n.set("--button-text", C(e, "light")), n.set("--button-text-dark", C(e, "dark")), o || n.set("--button-hover-decoration", "underline");
|
|
554
546
|
break;
|
|
555
547
|
}
|
|
556
548
|
}
|
|
557
|
-
return Array.from(
|
|
549
|
+
return Array.from(n.entries()).map(([r, s]) => `${r}: ${s}`).join("; ");
|
|
558
550
|
}
|
|
559
|
-
function
|
|
551
|
+
function Ft({
|
|
560
552
|
type: t = "button",
|
|
561
553
|
disabled: e = !1,
|
|
562
|
-
loading:
|
|
563
|
-
variant:
|
|
554
|
+
loading: o = !1,
|
|
555
|
+
variant: n = "filled",
|
|
564
556
|
size: a = "md",
|
|
565
557
|
color: r = "base",
|
|
566
558
|
roundedness: s = "sm",
|
|
567
559
|
onClick: c = () => {
|
|
568
560
|
},
|
|
569
|
-
fullWidth:
|
|
561
|
+
fullWidth: l = !1,
|
|
570
562
|
stopPropagation: u = !0
|
|
571
|
-
}, ...
|
|
572
|
-
const h =
|
|
573
|
-
return
|
|
563
|
+
}, ...b) {
|
|
564
|
+
const h = j(null);
|
|
565
|
+
return A(
|
|
574
566
|
H,
|
|
575
567
|
(p) => g.button(
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
568
|
+
i.type(t),
|
|
569
|
+
i.disabled(
|
|
570
|
+
k(
|
|
579
571
|
e,
|
|
580
|
-
|
|
581
|
-
)((d,
|
|
572
|
+
o
|
|
573
|
+
)((d, $) => d || $)
|
|
582
574
|
),
|
|
583
575
|
// Add ARIA attributes for accessibility
|
|
584
|
-
|
|
585
|
-
w(
|
|
586
|
-
|
|
587
|
-
|
|
576
|
+
f.busy(o ?? !1),
|
|
577
|
+
w(o ?? !1, () => f.label(p.$.loadingExtended)),
|
|
578
|
+
i.class(
|
|
579
|
+
k(a, s, o, l)(xt)
|
|
588
580
|
),
|
|
589
|
-
|
|
581
|
+
i.style(k(n, r, e)(Ct)),
|
|
590
582
|
w(
|
|
591
|
-
|
|
583
|
+
o ?? !1,
|
|
592
584
|
() => y(
|
|
593
|
-
|
|
585
|
+
D.width(
|
|
594
586
|
h.map((d) => d == null ? "" : `${d.width}px`)
|
|
595
587
|
),
|
|
596
|
-
|
|
588
|
+
D.height(
|
|
597
589
|
h.map((d) => d == null ? "" : `${d.height}px`)
|
|
598
590
|
),
|
|
599
|
-
|
|
591
|
+
G({ icon: "line-md:loading-twotone-loop", size: a ?? "md" }),
|
|
600
592
|
// Hidden live region for screen reader announcements
|
|
601
593
|
g.span(
|
|
602
|
-
|
|
603
|
-
|
|
594
|
+
i.class("sr-only"),
|
|
595
|
+
f.live("polite"),
|
|
604
596
|
p.$.loadingExtended
|
|
605
597
|
)
|
|
606
598
|
),
|
|
@@ -608,59 +600,59 @@ function Ot({
|
|
|
608
600
|
I.click((d) => {
|
|
609
601
|
t !== "submit" && d.preventDefault(), u && (d.stopImmediatePropagation(), d.stopPropagation()), c();
|
|
610
602
|
}),
|
|
611
|
-
...
|
|
603
|
+
...b
|
|
612
604
|
)
|
|
613
605
|
),
|
|
614
606
|
w(
|
|
615
|
-
|
|
616
|
-
() =>
|
|
617
|
-
|
|
607
|
+
o != null,
|
|
608
|
+
() => Z((d) => (d.on(($) => {
|
|
609
|
+
V.get(o ?? !1) || h.set($);
|
|
618
610
|
}), L))
|
|
619
611
|
)
|
|
620
612
|
)
|
|
621
613
|
);
|
|
622
614
|
}
|
|
623
|
-
function
|
|
624
|
-
const
|
|
615
|
+
function wt(t, e, o) {
|
|
616
|
+
const n = [
|
|
625
617
|
t ? "bc-base-input-container" : "bc-input-container"
|
|
626
618
|
];
|
|
627
|
-
return e ?
|
|
619
|
+
return e ? n.push(
|
|
628
620
|
t ? "bc-base-input-container--disabled" : "bc-input-container--disabled"
|
|
629
|
-
) :
|
|
621
|
+
) : n.push(
|
|
630
622
|
t ? "bc-base-input-container--default" : "bc-input-container--default"
|
|
631
|
-
),
|
|
623
|
+
), o && n.push("bc-input-container--error"), n.join(" ");
|
|
632
624
|
}
|
|
633
|
-
function
|
|
634
|
-
const
|
|
635
|
-
return t || (
|
|
625
|
+
function yt(t, e) {
|
|
626
|
+
const o = ["bc-input-container__input"];
|
|
627
|
+
return t || (o.push(`bc-control--padding-${e}`), o.push(`bc-control--text-size-${e}`)), o.join(" ");
|
|
636
628
|
}
|
|
637
|
-
const
|
|
629
|
+
const It = ({
|
|
638
630
|
baseContainer: t,
|
|
639
631
|
disabled: e,
|
|
640
|
-
input:
|
|
641
|
-
before:
|
|
632
|
+
input: o,
|
|
633
|
+
before: n,
|
|
642
634
|
after: a,
|
|
643
635
|
hasError: r,
|
|
644
636
|
focusableSelector: s = "input, select, textarea",
|
|
645
637
|
growInput: c = !0,
|
|
646
|
-
size:
|
|
638
|
+
size: l
|
|
647
639
|
}, ...u) => {
|
|
648
|
-
const
|
|
640
|
+
const b = V.map(e ?? !1, (h) => h);
|
|
649
641
|
return g.div(
|
|
650
|
-
|
|
642
|
+
K((h) => {
|
|
651
643
|
const p = () => {
|
|
652
644
|
h.querySelector(s)?.focus();
|
|
653
645
|
};
|
|
654
|
-
return h.addEventListener("click", p),
|
|
646
|
+
return h.addEventListener("click", p), W(() => h.removeEventListener("click", p));
|
|
655
647
|
}),
|
|
656
|
-
|
|
657
|
-
|
|
648
|
+
i.class(
|
|
649
|
+
k(
|
|
658
650
|
t,
|
|
659
|
-
|
|
651
|
+
b,
|
|
660
652
|
r ?? !1
|
|
661
653
|
// size ?? 'md'
|
|
662
654
|
)(
|
|
663
|
-
(h, p, d) =>
|
|
655
|
+
(h, p, d) => wt(
|
|
664
656
|
h ?? !1,
|
|
665
657
|
p ?? !1,
|
|
666
658
|
d ?? !1
|
|
@@ -668,100 +660,100 @@ const Pt = ({
|
|
|
668
660
|
)
|
|
669
661
|
)
|
|
670
662
|
),
|
|
671
|
-
|
|
663
|
+
n != null ? g.span(i.class("bc-input-container__before"), n) : null,
|
|
672
664
|
g.div(
|
|
673
|
-
|
|
674
|
-
|
|
665
|
+
i.class(
|
|
666
|
+
k(
|
|
675
667
|
t,
|
|
676
|
-
|
|
668
|
+
l ?? "md"
|
|
677
669
|
)(
|
|
678
|
-
(h, p) =>
|
|
670
|
+
(h, p) => yt(
|
|
679
671
|
h ?? !1,
|
|
680
672
|
p ?? "md"
|
|
681
673
|
)
|
|
682
674
|
)
|
|
683
675
|
),
|
|
684
676
|
// attr.class('bc-input-container__input'),
|
|
685
|
-
|
|
686
|
-
|
|
677
|
+
i.class(
|
|
678
|
+
V.map(
|
|
687
679
|
c,
|
|
688
680
|
(h) => h ? "bc-input-container__input--grow" : ""
|
|
689
681
|
)
|
|
690
682
|
),
|
|
691
|
-
|
|
683
|
+
o
|
|
692
684
|
),
|
|
693
|
-
a != null ? g.span(
|
|
685
|
+
a != null ? g.span(i.class("bc-input-container__after"), a) : null,
|
|
694
686
|
...u
|
|
695
687
|
);
|
|
696
688
|
};
|
|
697
689
|
function Rt({
|
|
698
690
|
icon: t,
|
|
699
691
|
size: e = "md",
|
|
700
|
-
color:
|
|
692
|
+
color: o = "neutral"
|
|
701
693
|
}) {
|
|
702
694
|
return g.span(
|
|
703
|
-
|
|
704
|
-
|
|
695
|
+
i.class("bc-input-container__icon"),
|
|
696
|
+
G({ icon: t, size: e, color: o })
|
|
705
697
|
);
|
|
706
698
|
}
|
|
707
|
-
const
|
|
699
|
+
const Lt = ({
|
|
708
700
|
autocomplete: t,
|
|
709
701
|
autofocus: e,
|
|
710
|
-
class:
|
|
711
|
-
disabled:
|
|
702
|
+
class: o,
|
|
703
|
+
disabled: n,
|
|
712
704
|
name: a,
|
|
713
705
|
placeholder: r,
|
|
714
706
|
id: s,
|
|
715
707
|
required: c,
|
|
716
|
-
tabIndex:
|
|
708
|
+
tabIndex: l,
|
|
717
709
|
hasError: u
|
|
718
710
|
}) => y(
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
u != null ?
|
|
711
|
+
i.autocomplete(t),
|
|
712
|
+
i.autofocus(e),
|
|
713
|
+
i.class(o),
|
|
714
|
+
i.disabled(n),
|
|
715
|
+
i.name(a ?? s),
|
|
716
|
+
i.placeholder(r),
|
|
717
|
+
i.id(s),
|
|
718
|
+
f.required(c),
|
|
719
|
+
i.tabindex(l),
|
|
720
|
+
u != null ? f.invalid(
|
|
729
721
|
u ?? !1
|
|
730
722
|
) : null
|
|
731
|
-
),
|
|
732
|
-
const { value: e, onBlur:
|
|
733
|
-
return
|
|
723
|
+
), Ot = (t) => {
|
|
724
|
+
const { value: e, onBlur: o, onChange: n, onInput: a } = t;
|
|
725
|
+
return It({
|
|
734
726
|
...t,
|
|
735
|
-
input:
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
a != null ? I.input(
|
|
727
|
+
input: J.text(
|
|
728
|
+
Lt(t),
|
|
729
|
+
i.value(e),
|
|
730
|
+
i.class("bc-input"),
|
|
731
|
+
o != null ? I.blur(S(o)) : L,
|
|
732
|
+
n != null ? I.change(S(n)) : L,
|
|
733
|
+
a != null ? I.input(S(a)) : L
|
|
742
734
|
)
|
|
743
735
|
});
|
|
744
736
|
};
|
|
745
|
-
function
|
|
746
|
-
const e = t.split("-"),
|
|
747
|
-
return e.length > 1 &&
|
|
737
|
+
function Dt(t) {
|
|
738
|
+
const e = t.split("-"), o = [t];
|
|
739
|
+
return e.length > 1 && o.push(e[0]), o;
|
|
748
740
|
}
|
|
749
|
-
function
|
|
741
|
+
function Pt({
|
|
750
742
|
locale: t,
|
|
751
743
|
defaultLocale: e = "en-US",
|
|
752
|
-
defaultMessages:
|
|
753
|
-
localeLoader:
|
|
744
|
+
defaultMessages: o,
|
|
745
|
+
localeLoader: n
|
|
754
746
|
}) {
|
|
755
|
-
const a =
|
|
747
|
+
const a = j(e), r = j(o), s = t.on(async (c) => {
|
|
756
748
|
if (c === a.value) return;
|
|
757
749
|
a.set(c);
|
|
758
|
-
const
|
|
759
|
-
for (const u of
|
|
750
|
+
const l = Dt(c);
|
|
751
|
+
for (const u of l)
|
|
760
752
|
try {
|
|
761
|
-
const
|
|
753
|
+
const b = await n(u);
|
|
762
754
|
if (
|
|
763
755
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
764
|
-
typeof
|
|
756
|
+
typeof b.default == "object" && Object.keys(b).length === 1
|
|
765
757
|
) {
|
|
766
758
|
console.error(
|
|
767
759
|
"It appears that you are trying to load a translation module without referencing the default export. Please use `(await import(...)).default` in your loader function."
|
|
@@ -769,13 +761,13 @@ function St({
|
|
|
769
761
|
return;
|
|
770
762
|
}
|
|
771
763
|
if (c === a.value) {
|
|
772
|
-
r.set(
|
|
764
|
+
r.set(b);
|
|
773
765
|
return;
|
|
774
766
|
}
|
|
775
767
|
} catch {
|
|
776
768
|
continue;
|
|
777
769
|
}
|
|
778
|
-
console.warn(`No locale found for "${t.value}", using fallback`), c === a.value && r.set(
|
|
770
|
+
console.warn(`No locale found for "${t.value}", using fallback`), c === a.value && r.set(o);
|
|
779
771
|
});
|
|
780
772
|
return {
|
|
781
773
|
/** Clean up all resources and event listeners */
|
|
@@ -786,66 +778,88 @@ function St({
|
|
|
786
778
|
t: r
|
|
787
779
|
};
|
|
788
780
|
}
|
|
789
|
-
function
|
|
781
|
+
function Bt({
|
|
790
782
|
defaultLocale: t,
|
|
791
783
|
defaultMessages: e,
|
|
792
|
-
localeLoader:
|
|
793
|
-
providerName:
|
|
784
|
+
localeLoader: o,
|
|
785
|
+
providerName: n = "I18nProvider"
|
|
794
786
|
}) {
|
|
795
787
|
return {
|
|
796
|
-
mark:
|
|
788
|
+
mark: O(n),
|
|
797
789
|
create: (a, r) => {
|
|
798
790
|
const {
|
|
799
791
|
value: { locale: s }
|
|
800
|
-
} = r.getProvider(
|
|
792
|
+
} = r.getProvider(st.mark), { t: c, dispose: l } = Pt({
|
|
801
793
|
locale: s,
|
|
802
794
|
defaultMessages: e,
|
|
803
795
|
defaultLocale: t,
|
|
804
|
-
localeLoader:
|
|
796
|
+
localeLoader: o
|
|
805
797
|
});
|
|
806
798
|
return {
|
|
807
799
|
value: c,
|
|
808
|
-
dispose:
|
|
800
|
+
dispose: l
|
|
809
801
|
};
|
|
810
802
|
}
|
|
811
803
|
};
|
|
812
804
|
}
|
|
813
|
-
const
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
805
|
+
const $t = /* @__PURE__ */ Object.assign({
|
|
806
|
+
"./locales/ar.ts": () => import("./ar-TEVFGyor.js").then((t) => t.default),
|
|
807
|
+
"./locales/de.ts": () => import("./de-DAzM31i4.js").then((t) => t.default),
|
|
808
|
+
"./locales/es.ts": () => import("./es-C7Gx9dqG.js").then((t) => t.default),
|
|
809
|
+
"./locales/fa.ts": () => import("./fa-DKX_zJDi.js").then((t) => t.default),
|
|
810
|
+
"./locales/fr.ts": () => import("./fr-BRfNV0Yj.js").then((t) => t.default),
|
|
811
|
+
"./locales/he.ts": () => import("./he-DRAV97MO.js").then((t) => t.default),
|
|
812
|
+
"./locales/hi.ts": () => import("./hi-BaZyjzct.js").then((t) => t.default),
|
|
813
|
+
"./locales/it.ts": () => import("./it-TCCyUGRc.js").then((t) => t.default),
|
|
814
|
+
"./locales/ja.ts": () => import("./ja-Bpc6MfYs.js").then((t) => t.default),
|
|
815
|
+
"./locales/ko.ts": () => import("./ko-BBN3tai6.js").then((t) => t.default),
|
|
816
|
+
"./locales/nl.ts": () => import("./nl-CwXW1x3G.js").then((t) => t.default),
|
|
817
|
+
"./locales/pl.ts": () => import("./pl-utONv5st.js").then((t) => t.default),
|
|
818
|
+
"./locales/pt.ts": () => import("./pt-BKZlur2O.js").then((t) => t.default),
|
|
819
|
+
"./locales/ru.ts": () => import("./ru-B6HTgTqQ.js").then((t) => t.default),
|
|
820
|
+
"./locales/tr.ts": () => import("./tr-DhELxnEm.js").then((t) => t.default),
|
|
821
|
+
"./locales/ur.ts": () => import("./ur-CT09S1x5.js").then((t) => t.default),
|
|
822
|
+
"./locales/vi.ts": () => import("./vi-BsZzI9Fa.js").then((t) => t.default),
|
|
823
|
+
"./locales/zh.ts": () => import("./zh-BeCkrv4q.js").then((t) => t.default)
|
|
824
|
+
}), H = Bt({
|
|
825
|
+
defaultLocale: T,
|
|
826
|
+
defaultMessages: M,
|
|
827
|
+
localeLoader: async (t) => {
|
|
828
|
+
if (t === T) return M;
|
|
829
|
+
const e = $t[`./locales/${t}.ts`];
|
|
830
|
+
return e ? await e() : M;
|
|
831
|
+
},
|
|
817
832
|
providerName: "BeatUII18n"
|
|
818
833
|
});
|
|
819
834
|
export {
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
rt as _,
|
|
835
|
+
Ft as B,
|
|
836
|
+
Lt as C,
|
|
837
|
+
G as I,
|
|
838
|
+
st as L,
|
|
839
|
+
Ot as T,
|
|
826
840
|
H as a,
|
|
827
|
-
|
|
841
|
+
It as b,
|
|
828
842
|
Rt as c,
|
|
829
|
-
|
|
843
|
+
M as d,
|
|
830
844
|
x as e,
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
845
|
+
et as f,
|
|
846
|
+
yt as g,
|
|
847
|
+
F as h,
|
|
848
|
+
m as i,
|
|
849
|
+
xt as j,
|
|
850
|
+
Ct as k,
|
|
851
|
+
T as l,
|
|
852
|
+
Bt as m,
|
|
839
853
|
q as n,
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
854
|
+
bt as o,
|
|
855
|
+
Pt as p,
|
|
856
|
+
N as q,
|
|
857
|
+
rt as r,
|
|
858
|
+
gt as s,
|
|
845
859
|
C as t,
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
860
|
+
Vt as u,
|
|
861
|
+
_t as v,
|
|
862
|
+
Et as w,
|
|
863
|
+
at as x,
|
|
864
|
+
Tt as y
|
|
851
865
|
};
|