@opendesign-plus-test/composables 0.0.1-rc.4 → 0.0.1-rc.5

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/index.js CHANGED
@@ -1,3058 +1,404 @@
1
- import * as $t from "vue";
2
- import { onBeforeUnmount as nu, reactive as uu, ref as Cn, computed as $, onMounted as pn, nextTick as Nn, onUnmounted as gn, inject as ru, shallowRef as au, watch as mt, defineComponent as St, h as Ln, createVNode as su, Text as ou, Fragment as Tn, getCurrentInstance as lu } from "vue";
3
- import iu from "markdown-it-async";
4
- import cu from "markdown-it-anchor";
5
- import { bundledLanguages as Du, bundledThemes as Wt, createHighlighter as fu } from "shiki";
6
- import { isClient as Eu, isUndefined as _u } from "@opensig/opendesign";
7
- import { useColorMode as Fu } from "@vueuse/core";
8
- import xt from "js-cookie";
9
- const du = new Set(Object.keys(Du));
10
- async function wa(e = {}) {
11
- const { anchor: t = !0, anchorType: n = "vitepress", copy: u = !0, wrapMarkdownBodyDiv: a = !0, theme: r = {}, ...l } = e, c = typeof (r == null ? void 0 : r.light) == "string" && r.light in Wt ? r.light : "light-plus", i = typeof (r == null ? void 0 : r.dark) == "string" && r.dark in Wt ? r.dark : "dark-plus", A = /* @__PURE__ */ new Set(["text"]);
12
- nu(() => {
13
- g && g.dispose();
1
+ var Y = Object.defineProperty;
2
+ var J = (D, u, e) => u in D ? Y(D, u, { enumerable: !0, configurable: !0, writable: !0, value: e }) : D[u] = e;
3
+ var y = (D, u, e) => J(D, typeof u != "symbol" ? u + "" : u, e);
4
+ import { onBeforeUnmount as S, reactive as Z, ref as H, computed as o, onMounted as O, nextTick as V, onUnmounted as K, getCurrentInstance as X, watch as $, inject as h, isRef as uu, unref as N, provide as Du } from "vue";
5
+ import Fu from "markdown-it-async";
6
+ import eu from "markdown-it-anchor";
7
+ import { bundledLanguages as tu, bundledThemes as T, createHighlighter as nu } from "shiki";
8
+ import { useI18n as Eu } from "vue-i18n";
9
+ import { isClient as Cu, isUndefined as Au } from "@opensig/opendesign";
10
+ import R from "js-cookie";
11
+ const ou = new Set(Object.keys(tu));
12
+ async function xu(D = {}) {
13
+ const { anchor: u = !0, anchorType: e = "vitepress", copy: F = !0, wrapMarkdownBodyDiv: t = !0, theme: n = {}, ...C } = D, E = typeof (n == null ? void 0 : n.light) == "string" && n.light in T ? n.light : "light-plus", A = typeof (n == null ? void 0 : n.dark) == "string" && n.dark in T ? n.dark : "dark-plus", B = /* @__PURE__ */ new Set(["text"]);
14
+ S(() => {
15
+ i && i.dispose();
14
16
  });
15
- const g = await fu({
16
- themes: [c, i],
17
+ const i = await nu({
18
+ themes: [E, A],
17
19
  langs: ["text"]
18
- }), N = iu({
19
- async highlight(F, L) {
20
- return du.has(L) || (L = "text"), A.has(L) || (await g.loadLanguage(L), A.add(L)), g.codeToHtml(F, {
21
- lang: L,
20
+ }), s = Fu({
21
+ async highlight(a, r) {
22
+ return ou.has(r) || (r = "text"), B.has(r) || (await i.loadLanguage(r), B.add(r)), i.codeToHtml(a, {
23
+ lang: r,
22
24
  themes: {
23
- light: c,
24
- dark: i
25
+ light: E,
26
+ dark: A
25
27
  }
26
28
  });
27
29
  },
28
- ...l
30
+ ...C
29
31
  });
30
- if (t && N.use(cu, {
31
- slugify: (F) => n === "github" ? mu(F) : Au(F)
32
- }), u) {
33
- const F = N.renderer.rules.fence;
34
- N.renderer.rules.fence = (...L) => {
35
- var E;
36
- const [v, h] = L, b = v[h], D = N.utils.escapeHtml(b.content || "");
37
- return `<div class="language-${((E = b.info) == null ? void 0 : E.trim()) || ""}"><div class="copy" data-clipboard-text="${D}"></div>` + F(...L) + "</div>";
32
+ if (u && s.use(eu, {
33
+ slugify: (a) => e === "github" ? ru(a) : su(a)
34
+ }), F) {
35
+ const a = s.renderer.rules.fence;
36
+ s.renderer.rules.fence = (...r) => {
37
+ var d;
38
+ const [l, m] = r, c = l[m], f = s.utils.escapeHtml(c.content || "");
39
+ return `<div class="language-${((d = c.info) == null ? void 0 : d.trim()) || ""}"><div class="copy" data-clipboard-text="${f}"></div>` + a(...r) + "</div>";
38
40
  };
39
41
  }
40
- if (a) {
41
- const F = N.render;
42
- N.render = (v, h) => `<div class="markdown-body">${F.call(N, v, h)}</div>`;
43
- const L = N.renderInline;
44
- N.renderInline = (v, h) => `<div class="markdown-body">${L.call(N, v, h)}</div>`;
42
+ if (t) {
43
+ const a = s.render;
44
+ s.render = (l, m) => `<div class="markdown-body">${a.call(s, l, m)}</div>`;
45
+ const r = s.renderInline;
46
+ s.renderInline = (l, m) => `<div class="markdown-body">${r.call(s, l, m)}</div>`;
45
47
  }
46
48
  return {
47
- shiki: g,
48
- markdwon: N
49
+ shiki: i,
50
+ markdwon: s
49
51
  };
50
52
  }
51
- function mu(e) {
52
- const t = /[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g;
53
- return `user-content-${e.toLowerCase().replace(t, "").replace(/ /g, "-")}`;
53
+ function ru(D) {
54
+ const u = (
55
+ // eslint-disable-next-line no-useless-escape,no-control-regex,no-misleading-character-class
56
+ /[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g
57
+ );
58
+ return `user-content-${D.toLowerCase().replace(u, "").replace(/ /g, "-")}`;
54
59
  }
55
- function Au(e) {
56
- return e.normalize("NFKD").replace(/[\u0300-\u036F]/g, "").replace(/[\u0000-\u001f]/g, "").replace(/[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'“”‘’<>,.?/]+/g, "-").replace(/-{2,}/g, "-").replace(/^-+|-+$/g, "").replace(/^(\d)/, "_$1").toLowerCase();
60
+ function su(D) {
61
+ return D.normalize("NFKD").replace(/[\u0300-\u036F]/g, "").replace(/[\u0000-\u001f]/g, "").replace(/[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'“”‘’<>,.?/]+/g, "-").replace(/-{2,}/g, "-").replace(/^-+|-+$/g, "").replace(/^(\d)/, "_$1").toLowerCase();
57
62
  }
58
- var Cu = /* @__PURE__ */ ((e) => (e.Phone = "phone", e.PadV = "pad_v", e.PadH = "pad_h", e.Laptop = "laptop", e))(Cu || {});
59
- const Ve = {
63
+ var iu = /* @__PURE__ */ ((D) => (D.Phone = "phone", D.PadV = "pad_v", D.PadH = "pad_h", D.Laptop = "laptop", D))(iu || {});
64
+ const v = {
60
65
  phone: 600,
61
66
  pad_v: 840,
62
67
  pad_h: 1200,
63
68
  laptop: 1440
64
- }, pu = {
65
- lt: (e, t) => e < t,
66
- le: (e, t) => e <= t,
67
- eq: (e, t) => e === t,
68
- ne: (e, t) => e !== t,
69
- ge: (e, t) => e >= t,
70
- gt: (e, t) => e > t
71
- }, Ua = () => {
72
- const e = uu({
69
+ }, Bu = {
70
+ lt: (D, u) => D < u,
71
+ le: (D, u) => D <= u,
72
+ eq: (D, u) => D === u,
73
+ ne: (D, u) => D !== u,
74
+ ge: (D, u) => D >= u,
75
+ gt: (D, u) => D > u
76
+ }, _u = () => {
77
+ const D = Z({
73
78
  width: 1440,
74
79
  height: 0
75
- }), t = Cn(
80
+ }), u = H(
76
81
  "laptop"
77
82
  /* Laptop */
78
- ), n = (C) => (typeof C > "u" && (C = e.width), C < Ve.phone ? "phone" : C < Ve.pad_v ? "pad_v" : C < Ve.pad_h ? "pad_h" : "laptop"), u = (C = "eq", _) => {
79
- const T = e.width, O = Ve[_], m = pu[C];
80
- return m(T, O);
81
- }, a = $(() => u(
83
+ ), e = (p) => (typeof p > "u" && (p = D.width), p < v.phone ? "phone" : p < v.pad_v ? "pad_v" : p < v.pad_h ? "pad_h" : "laptop"), F = (p = "eq", b) => {
84
+ const G = D.width, q = v[b], Q = Bu[p];
85
+ return Q(G, q);
86
+ }, t = o(() => F(
82
87
  "le",
83
88
  "phone"
84
89
  /* Phone */
85
- )), r = $(() => u(
90
+ )), n = o(() => F(
86
91
  "gt",
87
92
  "phone"
88
93
  /* Phone */
89
- )), l = $(() => u(
94
+ )), C = o(() => F(
90
95
  "gt",
91
96
  "phone"
92
97
  /* Phone */
93
- ) && u(
98
+ ) && F(
94
99
  "le",
95
100
  "pad_h"
96
101
  /* PadH */
97
- )), c = $(() => u(
102
+ )), E = o(() => F(
98
103
  "le",
99
104
  "pad_h"
100
105
  /* PadH */
101
- )), i = $(() => u(
106
+ )), A = o(() => F(
102
107
  "gt",
103
108
  "pad_h"
104
109
  /* PadH */
105
- )), A = $(() => u(
110
+ )), B = o(() => F(
106
111
  "gt",
107
112
  "phone"
108
113
  /* Phone */
109
- ) && u(
114
+ ) && F(
110
115
  "le",
111
116
  "pad_v"
112
117
  /* PadV */
113
- )), g = $(() => u(
118
+ )), i = o(() => F(
114
119
  "le",
115
120
  "pad_v"
116
121
  /* PadV */
117
- )), N = $(() => u(
122
+ )), s = o(() => F(
118
123
  "gt",
119
124
  "pad_v"
120
125
  /* PadV */
121
- )), F = $(() => u(
126
+ )), a = o(() => F(
122
127
  "gt",
123
128
  "pad_v"
124
129
  /* PadV */
125
- ) && u(
130
+ ) && F(
126
131
  "le",
127
132
  "pad_h"
128
133
  /* PadH */
129
- )), L = $(() => u(
134
+ )), r = o(() => F(
130
135
  "gt",
131
136
  "pad_h"
132
137
  /* PadH */
133
- ) && u(
138
+ ) && F(
134
139
  "le",
135
140
  "laptop"
136
141
  /* Laptop */
137
- )), v = $(() => u(
142
+ )), l = o(() => F(
138
143
  "le",
139
144
  "laptop"
140
145
  /* Laptop */
141
- )), h = $(() => u(
146
+ )), m = o(() => F(
142
147
  "gt",
143
148
  "laptop"
144
149
  /* Laptop */
145
- )), b = $(() => u(
150
+ )), c = o(() => F(
146
151
  "gt",
147
152
  "phone"
148
153
  /* Phone */
149
- ) && u(
154
+ ) && F(
150
155
  "le",
151
156
  "laptop"
152
157
  /* Laptop */
153
- )), D = $(() => u(
158
+ )), f = o(() => F(
154
159
  "gt",
155
160
  "pad_v"
156
161
  /* PadV */
157
- ) && u(
162
+ ) && F(
158
163
  "le",
159
164
  "laptop"
160
165
  /* Laptop */
161
- )), E = () => {
162
- const { innerWidth: C, innerHeight: _ } = window;
163
- e.width = C, e.height = _, t.value = n();
166
+ )), d = () => {
167
+ const { innerWidth: p, innerHeight: b } = window;
168
+ D.width = p, D.height = b, u.value = e();
164
169
  };
165
- return pn(() => {
166
- typeof window < "u" && (window.addEventListener("resize", E), E(), Nn(() => E()));
167
- }), gn(() => {
168
- typeof window < "u" && window.removeEventListener("resize", E);
170
+ return O(() => {
171
+ typeof window < "u" && (window.addEventListener("resize", d), d(), V(() => d()));
172
+ }), K(() => {
173
+ typeof window < "u" && window.removeEventListener("resize", d);
169
174
  }), {
170
175
  // 获取屏幕宽度分级
171
- getSize: n,
176
+ getSize: e,
172
177
  // 当前屏幕分级
173
- current: t,
178
+ current: u,
174
179
  // 当前屏幕宽度
175
- size: e,
176
- isPhone: a,
180
+ size: D,
181
+ isPhone: t,
177
182
  // [0, 600]
178
- gtPhone: r,
183
+ gtPhone: n,
179
184
  // [601, -]
180
- isPad: l,
185
+ isPad: C,
181
186
  // [601, 1200]
182
- lePad: c,
187
+ lePad: E,
183
188
  // [0, 1200]
184
- gtPad: i,
189
+ gtPad: A,
185
190
  // [1201, -]
186
- isPadV: A,
191
+ isPadV: B,
187
192
  // [601, 840]
188
- lePadV: g,
193
+ lePadV: i,
189
194
  // [0, 840]
190
- gtPadV: N,
195
+ gtPadV: s,
191
196
  // [841, -]
192
- isPadH: F,
197
+ isPadH: a,
193
198
  // [841, 1200]
194
- isLaptop: L,
199
+ isLaptop: r,
195
200
  // [1201, 1440]
196
- leLaptop: v,
201
+ leLaptop: l,
197
202
  // [0, 1440]
198
- gtLaptop: h,
203
+ gtLaptop: m,
199
204
  // [1441, -]
200
- isPadToLaptop: b,
205
+ isPadToLaptop: c,
201
206
  // [601, 1440]
202
- isPadVToLaptop: D
207
+ isPadVToLaptop: f
203
208
  // [841, 1440]
204
209
  };
205
- };
206
- /*!
207
- * shared v11.2.1
208
- * (c) 2025 kazuya kawaguchi
209
- * Released under the MIT License.
210
- */
211
- function le(e, t) {
212
- typeof console < "u" && (console.warn("[intlify] " + e), t && console.warn(t.stack));
213
- }
214
- const Gt = {};
215
- function Nu(e) {
216
- Gt[e] || (Gt[e] = !0, le(e));
217
- }
218
- const fe = typeof window < "u";
219
- let ee, pe;
220
- if (process.env.NODE_ENV !== "production") {
221
- const e = fe && window.performance;
222
- e && e.mark && e.measure && e.clearMarks && // @ts-ignore browser compat
223
- e.clearMeasures && (ee = (t) => {
224
- e.mark(t);
225
- }, pe = (t, n, u) => {
226
- e.measure(t, n, u), e.clearMarks(n), e.clearMarks(u);
227
- });
228
- }
229
- const gu = /\{([0-9a-zA-Z]+)\}/g;
230
- function je(e, ...t) {
231
- return t.length === 1 && B(t[0]) && (t = t[0]), (!t || !t.hasOwnProperty) && (t = {}), e.replace(gu, (n, u) => t.hasOwnProperty(u) ? t[u] : "");
232
- }
233
- const Ee = (e, t = !1) => t ? Symbol.for(e) : Symbol(e), Lu = (e, t, n) => Tu({ l: e, k: t, s: n }), Tu = (e) => JSON.stringify(e).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), j = (e) => typeof e == "number" && isFinite(e), Ou = (e) => vt(e) === "[object Date]", Ye = (e) => vt(e) === "[object RegExp]", Je = (e) => k(e) && Object.keys(e).length === 0, J = Object.assign, hu = Object.create, U = (e = null) => hu(e);
234
- let Yt;
235
- const Ce = () => Yt || (Yt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : U());
236
- function Ht(e) {
237
- return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;").replace(/\//g, "&#x2F;").replace(/=/g, "&#x3D;");
238
- }
239
- function Kt(e) {
240
- return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&apos;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
241
- }
242
- function Iu(e) {
243
- return e = e.replace(/(\w+)\s*=\s*"([^"]*)"/g, (u, a, r) => `${a}="${Kt(r)}"`), e = e.replace(/(\w+)\s*=\s*'([^']*)'/g, (u, a, r) => `${a}='${Kt(r)}'`), /\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e) && (process.env.NODE_ENV !== "production" && le("Potentially dangerous event handlers detected in translation. Consider removing onclick, onerror, etc. from your translation messages."), e = e.replace(/(\s+)(on)(\w+\s*=)/gi, "$1&#111;n$3")), [
244
- // In href, src, action, formaction attributes
245
- /(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,
246
- // In style attributes within url()
247
- /(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi
248
- ].forEach((u) => {
249
- e = e.replace(u, "$1javascript&#58;");
250
- }), e;
251
- }
252
- const bu = Object.prototype.hasOwnProperty;
253
- function ue(e, t) {
254
- return bu.call(e, t);
255
- }
256
- const K = Array.isArray, W = (e) => typeof e == "function", I = (e) => typeof e == "string", H = (e) => typeof e == "boolean", B = (e) => e !== null && typeof e == "object", Su = (e) => B(e) && W(e.then) && W(e.catch), On = Object.prototype.toString, vt = (e) => On.call(e), k = (e) => vt(e) === "[object Object]", vu = (e) => e == null ? "" : K(e) || k(e) && e.toString === On ? JSON.stringify(e, null, 2) : String(e);
257
- function yt(e, t = "") {
258
- return e.reduce((n, u, a) => a === 0 ? n + u : n + t + u, "");
259
- }
260
- const Xt = 2;
261
- function yu(e, t = 0, n = e.length) {
262
- const u = e.split(/\r?\n/);
263
- let a = 0;
264
- const r = [];
265
- for (let l = 0; l < u.length; l++)
266
- if (a += u[l].length + 1, a >= t) {
267
- for (let c = l - Xt; c <= l + Xt || n > a; c++) {
268
- if (c < 0 || c >= u.length)
269
- continue;
270
- const i = c + 1;
271
- r.push(`${i}${" ".repeat(3 - String(i).length)}| ${u[c]}`);
272
- const A = u[c].length;
273
- if (c === l) {
274
- const g = t - (a - A) + 1, N = Math.max(1, n > a ? A - g : n - t);
275
- r.push(" | " + " ".repeat(g) + "^".repeat(N));
276
- } else if (c > l) {
277
- if (n > a) {
278
- const g = Math.max(Math.min(n - a, A), 1);
279
- r.push(" | " + "^".repeat(g));
280
- }
281
- a += A + 1;
282
- }
283
- }
284
- break;
285
- }
286
- return r.join(`
287
- `);
288
- }
289
- function Pu() {
290
- const e = /* @__PURE__ */ new Map();
291
- return {
292
- events: e,
293
- on(n, u) {
294
- const a = e.get(n);
295
- a && a.push(u) || e.set(n, [u]);
296
- },
297
- off(n, u) {
298
- const a = e.get(n);
299
- a && a.splice(a.indexOf(u) >>> 0, 1);
210
+ }, bu = () => {
211
+ const { t: D, locale: u } = Eu(), e = X(), F = o(() => u.value === "zh"), t = o(() => u.value === "en");
212
+ return $(
213
+ () => u.value,
214
+ (C) => {
215
+ Cu && (document.documentElement.lang = C, localStorage.setItem("locale", C));
300
216
  },
301
- emit(n, u) {
302
- (e.get(n) || []).slice().map((a) => a(u)), (e.get("*") || []).slice().map((a) => a(n, u));
303
- }
304
- };
305
- }
306
- const $e = (e) => !B(e) || K(e);
307
- function Ge(e, t) {
308
- if ($e(e) || $e(t))
309
- throw new Error("Invalid value");
310
- const n = [{ src: e, des: t }];
311
- for (; n.length; ) {
312
- const { src: u, des: a } = n.pop();
313
- Object.keys(u).forEach((r) => {
314
- r !== "__proto__" && (B(u[r]) && !B(a[r]) && (a[r] = Array.isArray(u[r]) ? [] : U()), $e(a[r]) || $e(u[r]) ? a[r] = u[r] : n.push({ src: u[r], des: a[r] }));
315
- });
316
- }
317
- }
318
- /*!
319
- * message-compiler v11.2.1
320
- * (c) 2025 kazuya kawaguchi
321
- * Released under the MIT License.
322
- */
323
- function Ru(e, t, n) {
324
- return { line: e, column: t, offset: n };
325
- }
326
- function At(e, t, n) {
327
- return { start: e, end: t };
328
- }
329
- const y = {
330
- // tokenizer error codes
331
- EXPECTED_TOKEN: 1,
332
- INVALID_TOKEN_IN_PLACEHOLDER: 2,
333
- UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
334
- UNKNOWN_ESCAPE_SEQUENCE: 4,
335
- INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
336
- UNBALANCED_CLOSING_BRACE: 6,
337
- UNTERMINATED_CLOSING_BRACE: 7,
338
- EMPTY_PLACEHOLDER: 8,
339
- NOT_ALLOW_NEST_PLACEHOLDER: 9,
340
- INVALID_LINKED_FORMAT: 10,
341
- // parser error codes
342
- MUST_HAVE_MESSAGES_IN_PLURAL: 11,
343
- UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
344
- UNEXPECTED_EMPTY_LINKED_KEY: 13,
345
- UNEXPECTED_LEXICAL_ANALYSIS: 14,
346
- // generator error codes
347
- UNHANDLED_CODEGEN_NODE_TYPE: 15,
348
- // minifier error codes
349
- UNHANDLED_MINIFIER_NODE_TYPE: 16
350
- }, ku = 17, Bu = {
351
- // tokenizer error messages
352
- [y.EXPECTED_TOKEN]: "Expected token: '{0}'",
353
- [y.INVALID_TOKEN_IN_PLACEHOLDER]: "Invalid token in placeholder: '{0}'",
354
- [y.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: "Unterminated single quote in placeholder",
355
- [y.UNKNOWN_ESCAPE_SEQUENCE]: "Unknown escape sequence: \\{0}",
356
- [y.INVALID_UNICODE_ESCAPE_SEQUENCE]: "Invalid unicode escape sequence: {0}",
357
- [y.UNBALANCED_CLOSING_BRACE]: "Unbalanced closing brace",
358
- [y.UNTERMINATED_CLOSING_BRACE]: "Unterminated closing brace",
359
- [y.EMPTY_PLACEHOLDER]: "Empty placeholder",
360
- [y.NOT_ALLOW_NEST_PLACEHOLDER]: "Not allowed nest placeholder",
361
- [y.INVALID_LINKED_FORMAT]: "Invalid linked format",
362
- // parser error messages
363
- [y.MUST_HAVE_MESSAGES_IN_PLURAL]: "Plural must have messages",
364
- [y.UNEXPECTED_EMPTY_LINKED_MODIFIER]: "Unexpected empty linked modifier",
365
- [y.UNEXPECTED_EMPTY_LINKED_KEY]: "Unexpected empty linked key",
366
- [y.UNEXPECTED_LEXICAL_ANALYSIS]: "Unexpected lexical analysis in token: '{0}'",
367
- // generator error messages
368
- [y.UNHANDLED_CODEGEN_NODE_TYPE]: "unhandled codegen node type: '{0}'",
369
- // minimizer error messages
370
- [y.UNHANDLED_MINIFIER_NODE_TYPE]: "unhandled mimifier node type: '{0}'"
371
- };
372
- function he(e, t, n = {}) {
373
- const { domain: u, messages: a, args: r } = n, l = process.env.NODE_ENV !== "production" ? je((a || Bu)[e] || "", ...r || []) : e, c = new SyntaxError(String(l));
374
- return c.code = e, t && (c.location = t), c.domain = u, c;
375
- }
376
- function Mu(e) {
377
- throw e;
378
- }
379
- const wu = /<\/?[\w\s="/.':;#-\/]+>/, Uu = (e) => wu.test(e), ae = " ", Vu = "\r", Q = `
380
- `, $u = "\u2028", Wu = "\u2029";
381
- function xu(e) {
382
- const t = e;
383
- let n = 0, u = 1, a = 1, r = 0;
384
- const l = (m) => t[m] === Vu && t[m + 1] === Q, c = (m) => t[m] === Q, i = (m) => t[m] === Wu, A = (m) => t[m] === $u, g = (m) => l(m) || c(m) || i(m) || A(m), N = () => n, F = () => u, L = () => a, v = () => r, h = (m) => l(m) || i(m) || A(m) ? Q : t[m], b = () => h(n), D = () => h(n + r);
385
- function E() {
386
- return r = 0, g(n) && (u++, a = 0), l(n) && n++, n++, a++, t[n];
387
- }
388
- function C() {
389
- return l(n + r) && r++, r++, t[n + r];
390
- }
391
- function _() {
392
- n = 0, u = 1, a = 1, r = 0;
393
- }
394
- function T(m = 0) {
395
- r = m;
396
- }
397
- function O() {
398
- const m = n + r;
399
- for (; m !== n; )
400
- E();
401
- r = 0;
402
- }
403
- return {
404
- index: N,
405
- line: F,
406
- column: L,
407
- peekOffset: v,
408
- charAt: h,
409
- currentChar: b,
410
- currentPeek: D,
411
- next: E,
412
- peek: C,
413
- reset: _,
414
- resetPeek: T,
415
- skipToPeek: O
416
- };
417
- }
418
- const ce = void 0, Gu = ".", jt = "'", Yu = "tokenizer";
419
- function Hu(e, t = {}) {
420
- const n = t.location !== !1, u = xu(e), a = () => u.index(), r = () => Ru(u.line(), u.column(), u.index()), l = r(), c = a(), i = {
421
- currentType: 13,
422
- offset: c,
423
- startLoc: l,
424
- endLoc: l,
425
- lastType: 13,
426
- lastOffset: c,
427
- lastStartLoc: l,
428
- lastEndLoc: l,
429
- braceNest: 0,
430
- inLinked: !1,
431
- text: ""
432
- }, A = () => i, { onError: g } = t;
433
- function N(s, o, d, ...S) {
434
- const V = A();
435
- if (o.column += d, o.offset += d, g) {
436
- const G = n ? At(V.startLoc, o) : null, R = he(s, G, {
437
- domain: Yu,
438
- args: S
439
- });
440
- g(R);
441
- }
442
- }
443
- function F(s, o, d) {
444
- s.endLoc = r(), s.currentType = o;
445
- const S = { type: o };
446
- return n && (S.loc = At(s.startLoc, s.endLoc)), d != null && (S.value = d), S;
447
- }
448
- const L = (s) => F(
449
- s,
450
- 13
451
- /* TokenTypes.EOF */
452
- );
453
- function v(s, o) {
454
- return s.currentChar() === o ? (s.next(), o) : (N(y.EXPECTED_TOKEN, r(), 0, o), "");
455
- }
456
- function h(s) {
457
- let o = "";
458
- for (; s.currentPeek() === ae || s.currentPeek() === Q; )
459
- o += s.currentPeek(), s.peek();
460
- return o;
461
- }
462
- function b(s) {
463
- const o = h(s);
464
- return s.skipToPeek(), o;
465
- }
466
- function D(s) {
467
- if (s === ce)
468
- return !1;
469
- const o = s.charCodeAt(0);
470
- return o >= 97 && o <= 122 || // a-z
471
- o >= 65 && o <= 90 || // A-Z
472
- o === 95;
473
- }
474
- function E(s) {
475
- if (s === ce)
476
- return !1;
477
- const o = s.charCodeAt(0);
478
- return o >= 48 && o <= 57;
479
- }
480
- function C(s, o) {
481
- const { currentType: d } = o;
482
- if (d !== 2)
483
- return !1;
484
- h(s);
485
- const S = D(s.currentPeek());
486
- return s.resetPeek(), S;
487
- }
488
- function _(s, o) {
489
- const { currentType: d } = o;
490
- if (d !== 2)
491
- return !1;
492
- h(s);
493
- const S = s.currentPeek() === "-" ? s.peek() : s.currentPeek(), V = E(S);
494
- return s.resetPeek(), V;
495
- }
496
- function T(s, o) {
497
- const { currentType: d } = o;
498
- if (d !== 2)
499
- return !1;
500
- h(s);
501
- const S = s.currentPeek() === jt;
502
- return s.resetPeek(), S;
503
- }
504
- function O(s, o) {
505
- const { currentType: d } = o;
506
- if (d !== 7)
507
- return !1;
508
- h(s);
509
- const S = s.currentPeek() === ".";
510
- return s.resetPeek(), S;
511
- }
512
- function m(s, o) {
513
- const { currentType: d } = o;
514
- if (d !== 8)
515
- return !1;
516
- h(s);
517
- const S = D(s.currentPeek());
518
- return s.resetPeek(), S;
519
- }
520
- function P(s, o) {
521
- const { currentType: d } = o;
522
- if (!(d === 7 || d === 11))
523
- return !1;
524
- h(s);
525
- const S = s.currentPeek() === ":";
526
- return s.resetPeek(), S;
527
- }
528
- function w(s, o) {
529
- const { currentType: d } = o;
530
- if (d !== 9)
531
- return !1;
532
- const S = () => {
533
- const G = s.currentPeek();
534
- return G === "{" ? D(s.peek()) : G === "@" || G === "|" || G === ":" || G === "." || G === ae || !G ? !1 : G === Q ? (s.peek(), S()) : ne(s, !1);
535
- }, V = S();
536
- return s.resetPeek(), V;
537
- }
538
- function X(s) {
539
- h(s);
540
- const o = s.currentPeek() === "|";
541
- return s.resetPeek(), o;
542
- }
543
- function ne(s, o = !0) {
544
- const d = (V = !1, G = "") => {
545
- const R = s.currentPeek();
546
- return R === "{" || R === "@" || !R ? V : R === "|" ? !(G === ae || G === Q) : R === ae ? (s.peek(), d(!0, ae)) : R === Q ? (s.peek(), d(!0, Q)) : !0;
547
- }, S = d();
548
- return o && s.resetPeek(), S;
549
- }
550
- function x(s, o) {
551
- const d = s.currentChar();
552
- return d === ce ? ce : o(d) ? (s.next(), d) : null;
553
- }
554
- function ge(s) {
555
- const o = s.charCodeAt(0);
556
- return o >= 97 && o <= 122 || // a-z
557
- o >= 65 && o <= 90 || // A-Z
558
- o >= 48 && o <= 57 || // 0-9
559
- o === 95 || // _
560
- o === 36;
561
- }
562
- function ze(s) {
563
- return x(s, ge);
564
- }
565
- function et(s) {
566
- const o = s.charCodeAt(0);
567
- return o >= 97 && o <= 122 || // a-z
568
- o >= 65 && o <= 90 || // A-Z
569
- o >= 48 && o <= 57 || // 0-9
570
- o === 95 || // _
571
- o === 36 || // $
572
- o === 45;
573
- }
574
- function tt(s) {
575
- return x(s, et);
576
- }
577
- function nt(s) {
578
- const o = s.charCodeAt(0);
579
- return o >= 48 && o <= 57;
580
- }
581
- function ut(s) {
582
- return x(s, nt);
583
- }
584
- function rt(s) {
585
- const o = s.charCodeAt(0);
586
- return o >= 48 && o <= 57 || // 0-9
587
- o >= 65 && o <= 70 || // A-F
588
- o >= 97 && o <= 102;
589
- }
590
- function ie(s) {
591
- return x(s, rt);
592
- }
593
- function Ie(s) {
594
- let o = "", d = "";
595
- for (; o = ut(s); )
596
- d += o;
597
- return d;
598
- }
599
- function at(s) {
600
- let o = "";
601
- for (; ; ) {
602
- const d = s.currentChar();
603
- if (d === "{" || d === "}" || d === "@" || d === "|" || !d)
604
- break;
605
- if (d === ae || d === Q)
606
- if (ne(s))
607
- o += d, s.next();
608
- else {
609
- if (X(s))
610
- break;
611
- o += d, s.next();
612
- }
613
- else
614
- o += d, s.next();
615
- }
616
- return o;
617
- }
618
- function st(s) {
619
- b(s);
620
- let o = "", d = "";
621
- for (; o = tt(s); )
622
- d += o;
623
- const S = s.currentChar();
624
- if (S && S !== "}" && S !== ce && S !== ae && S !== Q && S !== " ") {
625
- const V = we(s);
626
- return N(y.INVALID_TOKEN_IN_PLACEHOLDER, r(), 0, d + V), d + V;
627
- }
628
- return s.currentChar() === ce && N(y.UNTERMINATED_CLOSING_BRACE, r(), 0), d;
629
- }
630
- function ot(s) {
631
- b(s);
632
- let o = "";
633
- return s.currentChar() === "-" ? (s.next(), o += `-${Ie(s)}`) : o += Ie(s), s.currentChar() === ce && N(y.UNTERMINATED_CLOSING_BRACE, r(), 0), o;
634
- }
635
- function lt(s) {
636
- return s !== jt && s !== Q;
637
- }
638
- function Ut(s) {
639
- b(s), v(s, "'");
640
- let o = "", d = "";
641
- for (; o = x(s, lt); )
642
- o === "\\" ? d += it(s) : d += o;
643
- const S = s.currentChar();
644
- return S === Q || S === ce ? (N(y.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, r(), 0), S === Q && (s.next(), v(s, "'")), d) : (v(s, "'"), d);
645
- }
646
- function it(s) {
647
- const o = s.currentChar();
648
- switch (o) {
649
- case "\\":
650
- case "'":
651
- return s.next(), `\\${o}`;
652
- case "u":
653
- return Me(s, o, 4);
654
- case "U":
655
- return Me(s, o, 6);
656
- default:
657
- return N(y.UNKNOWN_ESCAPE_SEQUENCE, r(), 0, o), "";
658
- }
659
- }
660
- function Me(s, o, d) {
661
- v(s, o);
662
- let S = "";
663
- for (let V = 0; V < d; V++) {
664
- const G = ie(s);
665
- if (!G) {
666
- N(y.INVALID_UNICODE_ESCAPE_SEQUENCE, r(), 0, `\\${o}${S}${s.currentChar()}`);
667
- break;
668
- }
669
- S += G;
670
- }
671
- return `\\${o}${S}`;
672
- }
673
- function ct(s) {
674
- return s !== "{" && s !== "}" && s !== ae && s !== Q;
675
- }
676
- function we(s) {
677
- b(s);
678
- let o = "", d = "";
679
- for (; o = x(s, ct); )
680
- d += o;
681
- return d;
682
- }
683
- function Dt(s) {
684
- let o = "", d = "";
685
- for (; o = ze(s); )
686
- d += o;
687
- return d;
688
- }
689
- function ft(s) {
690
- const o = (d) => {
691
- const S = s.currentChar();
692
- return S === "{" || S === "@" || S === "|" || S === "(" || S === ")" || !S || S === ae ? d : (d += S, s.next(), o(d));
693
- };
694
- return o("");
695
- }
696
- function be(s) {
697
- b(s);
698
- const o = v(
699
- s,
700
- "|"
701
- /* TokenChars.Pipe */
702
- );
703
- return b(s), o;
704
- }
705
- function Se(s, o) {
706
- let d = null;
707
- switch (s.currentChar()) {
708
- case "{":
709
- return o.braceNest >= 1 && N(y.NOT_ALLOW_NEST_PLACEHOLDER, r(), 0), s.next(), d = F(
710
- o,
711
- 2,
712
- "{"
713
- /* TokenChars.BraceLeft */
714
- ), b(s), o.braceNest++, d;
715
- case "}":
716
- return o.braceNest > 0 && o.currentType === 2 && N(y.EMPTY_PLACEHOLDER, r(), 0), s.next(), d = F(
717
- o,
718
- 3,
719
- "}"
720
- /* TokenChars.BraceRight */
721
- ), o.braceNest--, o.braceNest > 0 && b(s), o.inLinked && o.braceNest === 0 && (o.inLinked = !1), d;
722
- case "@":
723
- return o.braceNest > 0 && N(y.UNTERMINATED_CLOSING_BRACE, r(), 0), d = de(s, o) || L(o), o.braceNest = 0, d;
724
- default: {
725
- let V = !0, G = !0, R = !0;
726
- if (X(s))
727
- return o.braceNest > 0 && N(y.UNTERMINATED_CLOSING_BRACE, r(), 0), d = F(o, 1, be(s)), o.braceNest = 0, o.inLinked = !1, d;
728
- if (o.braceNest > 0 && (o.currentType === 4 || o.currentType === 5 || o.currentType === 6))
729
- return N(y.UNTERMINATED_CLOSING_BRACE, r(), 0), o.braceNest = 0, ve(s, o);
730
- if (V = C(s, o))
731
- return d = F(o, 4, st(s)), b(s), d;
732
- if (G = _(s, o))
733
- return d = F(o, 5, ot(s)), b(s), d;
734
- if (R = T(s, o))
735
- return d = F(o, 6, Ut(s)), b(s), d;
736
- if (!V && !G && !R)
737
- return d = F(o, 12, we(s)), N(y.INVALID_TOKEN_IN_PLACEHOLDER, r(), 0, d.value), b(s), d;
738
- break;
739
- }
740
- }
741
- return d;
742
- }
743
- function de(s, o) {
744
- const { currentType: d } = o;
745
- let S = null;
746
- const V = s.currentChar();
747
- switch ((d === 7 || d === 8 || d === 11 || d === 9) && (V === Q || V === ae) && N(y.INVALID_LINKED_FORMAT, r(), 0), V) {
748
- case "@":
749
- return s.next(), S = F(
750
- o,
751
- 7,
752
- "@"
753
- /* TokenChars.LinkedAlias */
754
- ), o.inLinked = !0, S;
755
- case ".":
756
- return b(s), s.next(), F(
757
- o,
758
- 8,
759
- "."
760
- /* TokenChars.LinkedDot */
761
- );
762
- case ":":
763
- return b(s), s.next(), F(
764
- o,
765
- 9,
766
- ":"
767
- /* TokenChars.LinkedDelimiter */
768
- );
769
- default:
770
- return X(s) ? (S = F(o, 1, be(s)), o.braceNest = 0, o.inLinked = !1, S) : O(s, o) || P(s, o) ? (b(s), de(s, o)) : m(s, o) ? (b(s), F(o, 11, Dt(s))) : w(s, o) ? (b(s), V === "{" ? Se(s, o) || S : F(o, 10, ft(s))) : (d === 7 && N(y.INVALID_LINKED_FORMAT, r(), 0), o.braceNest = 0, o.inLinked = !1, ve(s, o));
771
- }
772
- }
773
- function ve(s, o) {
774
- let d = {
775
- type: 13
776
- /* TokenTypes.EOF */
777
- };
778
- if (o.braceNest > 0)
779
- return Se(s, o) || L(o);
780
- if (o.inLinked)
781
- return de(s, o) || L(o);
782
- switch (s.currentChar()) {
783
- case "{":
784
- return Se(s, o) || L(o);
785
- case "}":
786
- return N(y.UNBALANCED_CLOSING_BRACE, r(), 0), s.next(), F(
787
- o,
788
- 3,
789
- "}"
790
- /* TokenChars.BraceRight */
791
- );
792
- case "@":
793
- return de(s, o) || L(o);
794
- default: {
795
- if (X(s))
796
- return d = F(o, 1, be(s)), o.braceNest = 0, o.inLinked = !1, d;
797
- if (ne(s))
798
- return F(o, 0, at(s));
799
- break;
800
- }
801
- }
802
- return d;
803
- }
804
- function Et() {
805
- const { currentType: s, offset: o, startLoc: d, endLoc: S } = i;
806
- return i.lastType = s, i.lastOffset = o, i.lastStartLoc = d, i.lastEndLoc = S, i.offset = a(), i.startLoc = r(), u.currentChar() === ce ? F(
807
- i,
808
- 13
809
- /* TokenTypes.EOF */
810
- ) : ve(u, i);
811
- }
812
- return {
813
- nextToken: Et,
814
- currentOffset: a,
815
- currentPosition: r,
816
- context: A
817
- };
818
- }
819
- const Ku = "parser", Xu = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
820
- function ju(e, t, n) {
821
- switch (e) {
822
- case "\\\\":
823
- return "\\";
824
- // eslint-disable-next-line no-useless-escape
825
- case "\\'":
826
- return "'";
827
- default: {
828
- const u = parseInt(t || n, 16);
829
- return u <= 55295 || u >= 57344 ? String.fromCodePoint(u) : "�";
830
- }
831
- }
832
- }
833
- function Ju(e = {}) {
834
- const t = e.location !== !1, { onError: n } = e;
835
- function u(D, E, C, _, ...T) {
836
- const O = D.currentPosition();
837
- if (O.offset += _, O.column += _, n) {
838
- const m = t ? At(C, O) : null, P = he(E, m, {
839
- domain: Ku,
840
- args: T
841
- });
842
- n(P);
843
- }
844
- }
845
- function a(D, E, C) {
846
- const _ = { type: D };
847
- return t && (_.start = E, _.end = E, _.loc = { start: C, end: C }), _;
848
- }
849
- function r(D, E, C, _) {
850
- t && (D.end = E, D.loc && (D.loc.end = C));
851
- }
852
- function l(D, E) {
853
- const C = D.context(), _ = a(3, C.offset, C.startLoc);
854
- return _.value = E, r(_, D.currentOffset(), D.currentPosition()), _;
855
- }
856
- function c(D, E) {
857
- const C = D.context(), { lastOffset: _, lastStartLoc: T } = C, O = a(5, _, T);
858
- return O.index = parseInt(E, 10), D.nextToken(), r(O, D.currentOffset(), D.currentPosition()), O;
859
- }
860
- function i(D, E) {
861
- const C = D.context(), { lastOffset: _, lastStartLoc: T } = C, O = a(4, _, T);
862
- return O.key = E, D.nextToken(), r(O, D.currentOffset(), D.currentPosition()), O;
863
- }
864
- function A(D, E) {
865
- const C = D.context(), { lastOffset: _, lastStartLoc: T } = C, O = a(9, _, T);
866
- return O.value = E.replace(Xu, ju), D.nextToken(), r(O, D.currentOffset(), D.currentPosition()), O;
867
- }
868
- function g(D) {
869
- const E = D.nextToken(), C = D.context(), { lastOffset: _, lastStartLoc: T } = C, O = a(8, _, T);
870
- return E.type !== 11 ? (u(D, y.UNEXPECTED_EMPTY_LINKED_MODIFIER, C.lastStartLoc, 0), O.value = "", r(O, _, T), {
871
- nextConsumeToken: E,
872
- node: O
873
- }) : (E.value == null && u(D, y.UNEXPECTED_LEXICAL_ANALYSIS, C.lastStartLoc, 0, se(E)), O.value = E.value || "", r(O, D.currentOffset(), D.currentPosition()), {
874
- node: O
875
- });
876
- }
877
- function N(D, E) {
878
- const C = D.context(), _ = a(7, C.offset, C.startLoc);
879
- return _.value = E, r(_, D.currentOffset(), D.currentPosition()), _;
880
- }
881
- function F(D) {
882
- const E = D.context(), C = a(6, E.offset, E.startLoc);
883
- let _ = D.nextToken();
884
- if (_.type === 8) {
885
- const T = g(D);
886
- C.modifier = T.node, _ = T.nextConsumeToken || D.nextToken();
217
+ {
218
+ immediate: !0
887
219
  }
888
- switch (_.type !== 9 && u(D, y.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, se(_)), _ = D.nextToken(), _.type === 2 && (_ = D.nextToken()), _.type) {
889
- case 10:
890
- _.value == null && u(D, y.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, se(_)), C.key = N(D, _.value || "");
891
- break;
892
- case 4:
893
- _.value == null && u(D, y.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, se(_)), C.key = i(D, _.value || "");
894
- break;
895
- case 5:
896
- _.value == null && u(D, y.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, se(_)), C.key = c(D, _.value || "");
897
- break;
898
- case 6:
899
- _.value == null && u(D, y.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, se(_)), C.key = A(D, _.value || "");
900
- break;
901
- default: {
902
- u(D, y.UNEXPECTED_EMPTY_LINKED_KEY, E.lastStartLoc, 0);
903
- const T = D.context(), O = a(7, T.offset, T.startLoc);
904
- return O.value = "", r(O, T.offset, T.startLoc), C.key = O, r(C, T.offset, T.startLoc), {
905
- nextConsumeToken: _,
906
- node: C
907
- };
908
- }
220
+ ), {
221
+ t: D,
222
+ $t: D,
223
+ locale: u,
224
+ isZh: F,
225
+ isEn: t,
226
+ changeLocale: async (C) => {
227
+ var A;
228
+ const E = Au(C) ? F.value ? "en" : "zh" : C;
229
+ u.value !== E && (u.value = E, await V(), (A = e == null ? void 0 : e.proxy) != null && A.$forceUpdate && e.proxy.$forceUpdate());
909
230
  }
910
- return r(C, D.currentOffset(), D.currentPosition()), {
911
- node: C
912
- };
913
- }
914
- function L(D) {
915
- const E = D.context(), C = E.currentType === 1 ? D.currentOffset() : E.offset, _ = E.currentType === 1 ? E.endLoc : E.startLoc, T = a(2, C, _);
916
- T.items = [];
917
- let O = null;
918
- do {
919
- const w = O || D.nextToken();
920
- switch (O = null, w.type) {
921
- case 0:
922
- w.value == null && u(D, y.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, se(w)), T.items.push(l(D, w.value || ""));
923
- break;
924
- case 5:
925
- w.value == null && u(D, y.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, se(w)), T.items.push(c(D, w.value || ""));
926
- break;
927
- case 4:
928
- w.value == null && u(D, y.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, se(w)), T.items.push(i(D, w.value || ""));
929
- break;
930
- case 6:
931
- w.value == null && u(D, y.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, se(w)), T.items.push(A(D, w.value || ""));
932
- break;
933
- case 7: {
934
- const X = F(D);
935
- T.items.push(X.node), O = X.nextConsumeToken || null;
936
- break;
937
- }
938
- }
939
- } while (E.currentType !== 13 && E.currentType !== 1);
940
- const m = E.currentType === 1 ? E.lastOffset : D.currentOffset(), P = E.currentType === 1 ? E.lastEndLoc : D.currentPosition();
941
- return r(T, m, P), T;
942
- }
943
- function v(D, E, C, _) {
944
- const T = D.context();
945
- let O = _.items.length === 0;
946
- const m = a(1, E, C);
947
- m.cases = [], m.cases.push(_);
948
- do {
949
- const P = L(D);
950
- O || (O = P.items.length === 0), m.cases.push(P);
951
- } while (T.currentType !== 13);
952
- return O && u(D, y.MUST_HAVE_MESSAGES_IN_PLURAL, C, 0), r(m, D.currentOffset(), D.currentPosition()), m;
953
- }
954
- function h(D) {
955
- const E = D.context(), { offset: C, startLoc: _ } = E, T = L(D);
956
- return E.currentType === 13 ? T : v(D, C, _, T);
957
- }
958
- function b(D) {
959
- const E = Hu(D, J({}, e)), C = E.context(), _ = a(0, C.offset, C.startLoc);
960
- return t && _.loc && (_.loc.source = D), _.body = h(E), e.onCacheKey && (_.cacheKey = e.onCacheKey(D)), C.currentType !== 13 && u(E, y.UNEXPECTED_LEXICAL_ANALYSIS, C.lastStartLoc, 0, D[C.offset] || ""), r(_, E.currentOffset(), E.currentPosition()), _;
961
- }
962
- return { parse: b };
963
- }
964
- function se(e) {
965
- if (e.type === 13)
966
- return "EOF";
967
- const t = (e.value || "").replace(/\r?\n/gu, "\\n");
968
- return t.length > 10 ? t.slice(0, 9) + "…" : t;
969
- }
970
- function qu(e, t = {}) {
971
- const n = {
972
- ast: e,
973
- helpers: /* @__PURE__ */ new Set()
974
231
  };
975
- return { context: () => n, helper: (r) => (n.helpers.add(r), r) };
976
- }
977
- function Jt(e, t) {
978
- for (let n = 0; n < e.length; n++)
979
- Pt(e[n], t);
980
- }
981
- function Pt(e, t) {
982
- switch (e.type) {
983
- case 1:
984
- Jt(e.cases, t), t.helper(
985
- "plural"
986
- /* HelperNameMap.PLURAL */
987
- );
988
- break;
989
- case 2:
990
- Jt(e.items, t);
991
- break;
992
- case 6: {
993
- Pt(e.key, t), t.helper(
994
- "linked"
995
- /* HelperNameMap.LINKED */
996
- ), t.helper(
997
- "type"
998
- /* HelperNameMap.TYPE */
999
- );
1000
- break;
1001
- }
1002
- case 5:
1003
- t.helper(
1004
- "interpolate"
1005
- /* HelperNameMap.INTERPOLATE */
1006
- ), t.helper(
1007
- "list"
1008
- /* HelperNameMap.LIST */
1009
- );
1010
- break;
1011
- case 4:
1012
- t.helper(
1013
- "interpolate"
1014
- /* HelperNameMap.INTERPOLATE */
1015
- ), t.helper(
1016
- "named"
1017
- /* HelperNameMap.NAMED */
1018
- );
1019
- break;
1020
- }
1021
- }
1022
- function Qu(e, t = {}) {
1023
- const n = qu(e);
1024
- n.helper(
1025
- "normalize"
1026
- /* HelperNameMap.NORMALIZE */
1027
- ), e.body && Pt(e.body, n);
1028
- const u = n.context();
1029
- e.helpers = Array.from(u.helpers);
1030
- }
1031
- function Zu(e) {
1032
- const t = e.body;
1033
- return t.type === 2 ? qt(t) : t.cases.forEach((n) => qt(n)), e;
1034
- }
1035
- function qt(e) {
1036
- if (e.items.length === 1) {
1037
- const t = e.items[0];
1038
- (t.type === 3 || t.type === 9) && (e.static = t.value, delete t.value);
1039
- } else {
1040
- const t = [];
1041
- for (let n = 0; n < e.items.length; n++) {
1042
- const u = e.items[n];
1043
- if (!(u.type === 3 || u.type === 9) || u.value == null)
1044
- break;
1045
- t.push(u.value);
1046
- }
1047
- if (t.length === e.items.length) {
1048
- e.static = yt(t);
1049
- for (let n = 0; n < e.items.length; n++) {
1050
- const u = e.items[n];
1051
- (u.type === 3 || u.type === 9) && delete u.value;
1052
- }
1053
- }
1054
- }
1055
- }
1056
- const zu = "minifier";
1057
- function Te(e) {
1058
- switch (e.t = e.type, e.type) {
1059
- case 0: {
1060
- const t = e;
1061
- Te(t.body), t.b = t.body, delete t.body;
1062
- break;
1063
- }
1064
- case 1: {
1065
- const t = e, n = t.cases;
1066
- for (let u = 0; u < n.length; u++)
1067
- Te(n[u]);
1068
- t.c = n, delete t.cases;
1069
- break;
1070
- }
1071
- case 2: {
1072
- const t = e, n = t.items;
1073
- for (let u = 0; u < n.length; u++)
1074
- Te(n[u]);
1075
- t.i = n, delete t.items, t.static && (t.s = t.static, delete t.static);
1076
- break;
1077
- }
1078
- case 3:
1079
- case 9:
1080
- case 8:
1081
- case 7: {
1082
- const t = e;
1083
- t.value && (t.v = t.value, delete t.value);
1084
- break;
1085
- }
1086
- case 6: {
1087
- const t = e;
1088
- Te(t.key), t.k = t.key, delete t.key, t.modifier && (Te(t.modifier), t.m = t.modifier, delete t.modifier);
1089
- break;
1090
- }
1091
- case 5: {
1092
- const t = e;
1093
- t.i = t.index, delete t.index;
1094
- break;
1095
- }
1096
- case 4: {
1097
- const t = e;
1098
- t.k = t.key, delete t.key;
1099
- break;
1100
- }
1101
- default:
1102
- if (process.env.NODE_ENV !== "production")
1103
- throw he(y.UNHANDLED_MINIFIER_NODE_TYPE, null, {
1104
- domain: zu,
1105
- args: [e.type]
1106
- });
1107
- }
1108
- delete e.type;
1109
- }
1110
- const er = "parser";
1111
- function tr(e, t) {
1112
- const { filename: n, breakLineCode: u, needIndent: a } = t, r = t.location !== !1, l = {
1113
- filename: n,
1114
- code: "",
1115
- column: 1,
1116
- line: 1,
1117
- offset: 0,
1118
- map: void 0,
1119
- breakLineCode: u,
1120
- needIndent: a,
1121
- indentLevel: 0
232
+ }, au = "[警告] 请在项目中注入主题配置项:app.use(createTheme(options))", cu = "[警告] 缺少参数 cookieKey 和 cookieDomain,请在 createTheme 传入 cookieKey 和 cookieDomain 参数", U = Symbol("theme"), z = Symbol("isLight"), M = Symbol("isDark"), W = Symbol("setTheme"), j = Symbol("toggleTheme");
233
+ function ku(D) {
234
+ const {
235
+ cookieKey: u,
236
+ cookieDomain: e,
237
+ lightValue: F = "light",
238
+ darkValue: t = "dark",
239
+ attribute: n = "data-o-theme",
240
+ attributeLightValue: C = F,
241
+ attributeDarkValue: E = t,
242
+ classLightValue: A = F,
243
+ classDarkValue: B = t
244
+ } = D || {}, i = H(F), s = o(() => i.value === F), a = o(() => i.value === t), r = o(() => i.value), l = (c, f = !0) => {
245
+ const d = c === t ? t : F;
246
+ i.value = d, !(typeof window > "u") && (d === t ? (document.documentElement.setAttribute(n, E), document.documentElement.classList.add(B), document.documentElement.classList.remove(A)) : (document.documentElement.setAttribute(n, C), document.documentElement.classList.add(A), document.documentElement.classList.remove(B)), f && (u && e ? R.set(u, d, { domain: e }) : console.warn(cu)));
247
+ }, m = () => {
248
+ l(r.value === t ? F : t);
1122
249
  };
1123
- r && e.loc && (l.source = e.loc.source);
1124
- const c = () => l;
1125
- function i(h, b) {
1126
- l.code += h;
1127
- }
1128
- function A(h, b = !0) {
1129
- const D = b ? u : "";
1130
- i(a ? D + " ".repeat(h) : D);
1131
- }
1132
- function g(h = !0) {
1133
- const b = ++l.indentLevel;
1134
- h && A(b);
1135
- }
1136
- function N(h = !0) {
1137
- const b = --l.indentLevel;
1138
- h && A(b);
1139
- }
1140
- function F() {
1141
- A(l.indentLevel);
1142
- }
1143
250
  return {
1144
- context: c,
1145
- push: i,
1146
- indent: g,
1147
- deindent: N,
1148
- newline: F,
1149
- helper: (h) => `_${h}`,
1150
- needIndent: () => l.needIndent
1151
- };
1152
- }
1153
- function nr(e, t) {
1154
- const { helper: n } = e;
1155
- e.push(`${n(
1156
- "linked"
1157
- /* HelperNameMap.LINKED */
1158
- )}(`), Oe(e, t.key), t.modifier ? (e.push(", "), Oe(e, t.modifier), e.push(", _type")) : e.push(", undefined, _type"), e.push(")");
1159
- }
1160
- function ur(e, t) {
1161
- const { helper: n, needIndent: u } = e;
1162
- e.push(`${n(
1163
- "normalize"
1164
- /* HelperNameMap.NORMALIZE */
1165
- )}([`), e.indent(u());
1166
- const a = t.items.length;
1167
- for (let r = 0; r < a && (Oe(e, t.items[r]), r !== a - 1); r++)
1168
- e.push(", ");
1169
- e.deindent(u()), e.push("])");
1170
- }
1171
- function rr(e, t) {
1172
- const { helper: n, needIndent: u } = e;
1173
- if (t.cases.length > 1) {
1174
- e.push(`${n(
1175
- "plural"
1176
- /* HelperNameMap.PLURAL */
1177
- )}([`), e.indent(u());
1178
- const a = t.cases.length;
1179
- for (let r = 0; r < a && (Oe(e, t.cases[r]), r !== a - 1); r++)
1180
- e.push(", ");
1181
- e.deindent(u()), e.push("])");
1182
- }
1183
- }
1184
- function ar(e, t) {
1185
- t.body ? Oe(e, t.body) : e.push("null");
1186
- }
1187
- function Oe(e, t) {
1188
- const { helper: n } = e;
1189
- switch (t.type) {
1190
- case 0:
1191
- ar(e, t);
1192
- break;
1193
- case 1:
1194
- rr(e, t);
1195
- break;
1196
- case 2:
1197
- ur(e, t);
1198
- break;
1199
- case 6:
1200
- nr(e, t);
1201
- break;
1202
- case 8:
1203
- e.push(JSON.stringify(t.value), t);
1204
- break;
1205
- case 7:
1206
- e.push(JSON.stringify(t.value), t);
1207
- break;
1208
- case 5:
1209
- e.push(`${n(
1210
- "interpolate"
1211
- /* HelperNameMap.INTERPOLATE */
1212
- )}(${n(
1213
- "list"
1214
- /* HelperNameMap.LIST */
1215
- )}(${t.index}))`, t);
1216
- break;
1217
- case 4:
1218
- e.push(`${n(
1219
- "interpolate"
1220
- /* HelperNameMap.INTERPOLATE */
1221
- )}(${n(
1222
- "named"
1223
- /* HelperNameMap.NAMED */
1224
- )}(${JSON.stringify(t.key)}))`, t);
1225
- break;
1226
- case 9:
1227
- e.push(JSON.stringify(t.value), t);
1228
- break;
1229
- case 3:
1230
- e.push(JSON.stringify(t.value), t);
1231
- break;
1232
- default:
1233
- if (process.env.NODE_ENV !== "production")
1234
- throw he(y.UNHANDLED_CODEGEN_NODE_TYPE, null, {
1235
- domain: er,
1236
- args: [t.type]
1237
- });
1238
- }
1239
- }
1240
- const sr = (e, t = {}) => {
1241
- const n = I(t.mode) ? t.mode : "normal", u = I(t.filename) ? t.filename : "message.intl";
1242
- t.sourceMap;
1243
- const a = t.breakLineCode != null ? t.breakLineCode : n === "arrow" ? ";" : `
1244
- `, r = t.needIndent ? t.needIndent : n !== "arrow", l = e.helpers || [], c = tr(e, {
1245
- filename: u,
1246
- breakLineCode: a,
1247
- needIndent: r
1248
- });
1249
- c.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), c.indent(r), l.length > 0 && (c.push(`const { ${yt(l.map((g) => `${g}: _${g}`), ", ")} } = ctx`), c.newline()), c.push("return "), Oe(c, e), c.deindent(r), c.push("}"), delete e.helpers;
1250
- const { code: i, map: A } = c.context();
1251
- return {
1252
- ast: e,
1253
- code: i,
1254
- map: A ? A.toJSON() : void 0
1255
- // eslint-disable-line @typescript-eslint/no-explicit-any
1256
- };
1257
- };
1258
- function or(e, t = {}) {
1259
- const n = J({}, t), u = !!n.jit, a = !!n.minify, r = n.optimize == null ? !0 : n.optimize, c = Ju(n).parse(e);
1260
- return u ? (r && Zu(c), a && Te(c), { ast: c, code: "" }) : (Qu(c, n), sr(c, n));
1261
- }
1262
- /*!
1263
- * core-base v11.2.1
1264
- * (c) 2025 kazuya kawaguchi
1265
- * Released under the MIT License.
1266
- */
1267
- function lr() {
1268
- typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Ce().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Ce().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
1269
- }
1270
- function re(e) {
1271
- return B(e) && Rt(e) === 0 && (ue(e, "b") || ue(e, "body"));
1272
- }
1273
- const hn = ["b", "body"];
1274
- function ir(e) {
1275
- return _e(e, hn);
1276
- }
1277
- const In = ["c", "cases"];
1278
- function cr(e) {
1279
- return _e(e, In, []);
1280
- }
1281
- const bn = ["s", "static"];
1282
- function Dr(e) {
1283
- return _e(e, bn);
1284
- }
1285
- const Sn = ["i", "items"];
1286
- function fr(e) {
1287
- return _e(e, Sn, []);
1288
- }
1289
- const vn = ["t", "type"];
1290
- function Rt(e) {
1291
- return _e(e, vn);
1292
- }
1293
- const yn = ["v", "value"];
1294
- function We(e, t) {
1295
- const n = _e(e, yn);
1296
- if (n != null)
1297
- return n;
1298
- throw Pe(t);
1299
- }
1300
- const Pn = ["m", "modifier"];
1301
- function Er(e) {
1302
- return _e(e, Pn);
1303
- }
1304
- const Rn = ["k", "key"];
1305
- function _r(e) {
1306
- const t = _e(e, Rn);
1307
- if (t)
1308
- return t;
1309
- throw Pe(
1310
- 6
1311
- /* NodeTypes.Linked */
1312
- );
1313
- }
1314
- function _e(e, t, n) {
1315
- for (let u = 0; u < t.length; u++) {
1316
- const a = t[u];
1317
- if (ue(e, a) && e[a] != null)
1318
- return e[a];
1319
- }
1320
- return n;
1321
- }
1322
- const kn = [
1323
- ...hn,
1324
- ...In,
1325
- ...bn,
1326
- ...Sn,
1327
- ...Rn,
1328
- ...Pn,
1329
- ...yn,
1330
- ...vn
1331
- ];
1332
- function Pe(e) {
1333
- return new Error(`unhandled node type: ${e}`);
1334
- }
1335
- function _t(e) {
1336
- return (n) => Fr(n, e);
1337
- }
1338
- function Fr(e, t) {
1339
- const n = ir(t);
1340
- if (n == null)
1341
- throw Pe(
1342
- 0
1343
- /* NodeTypes.Resource */
1344
- );
1345
- if (Rt(n) === 1) {
1346
- const r = cr(n);
1347
- return e.plural(r.reduce((l, c) => [
1348
- ...l,
1349
- Qt(e, c)
1350
- ], []));
1351
- } else
1352
- return Qt(e, n);
1353
- }
1354
- function Qt(e, t) {
1355
- const n = Dr(t);
1356
- if (n != null)
1357
- return e.type === "text" ? n : e.normalize([n]);
1358
- {
1359
- const u = fr(t).reduce((a, r) => [...a, Ct(e, r)], []);
1360
- return e.normalize(u);
1361
- }
1362
- }
1363
- function Ct(e, t) {
1364
- const n = Rt(t);
1365
- switch (n) {
1366
- case 3:
1367
- return We(t, n);
1368
- case 9:
1369
- return We(t, n);
1370
- case 4: {
1371
- const u = t;
1372
- if (ue(u, "k") && u.k)
1373
- return e.interpolate(e.named(u.k));
1374
- if (ue(u, "key") && u.key)
1375
- return e.interpolate(e.named(u.key));
1376
- throw Pe(n);
1377
- }
1378
- case 5: {
1379
- const u = t;
1380
- if (ue(u, "i") && j(u.i))
1381
- return e.interpolate(e.list(u.i));
1382
- if (ue(u, "index") && j(u.index))
1383
- return e.interpolate(e.list(u.index));
1384
- throw Pe(n);
1385
- }
1386
- case 6: {
1387
- const u = t, a = Er(u), r = _r(u);
1388
- return e.linked(Ct(e, r), a ? Ct(e, a) : void 0, e.type);
1389
- }
1390
- case 7:
1391
- return We(t, n);
1392
- case 8:
1393
- return We(t, n);
1394
- default:
1395
- throw new Error(`unhandled node on format message part: ${n}`);
1396
- }
1397
- }
1398
- const dr = "Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";
1399
- function mr(e, t) {
1400
- t && Uu(e) && le(je(dr, { source: e }));
1401
- }
1402
- const Ar = (e) => e;
1403
- let xe = U();
1404
- function Cr(e, t = {}) {
1405
- let n = !1;
1406
- const u = t.onError || Mu;
1407
- return t.onError = (a) => {
1408
- n = !0, u(a);
1409
- }, { ...or(e, t), detectError: n };
1410
- }
1411
- // @__NO_SIDE_EFFECTS__
1412
- function pr(e, t) {
1413
- if (!__INTLIFY_DROP_MESSAGE_COMPILER__ && I(e)) {
1414
- const n = H(t.warnHtmlMessage) ? t.warnHtmlMessage : !0;
1415
- process.env.NODE_ENV !== "production" && mr(e, n);
1416
- const a = (t.onCacheKey || Ar)(e), r = xe[a];
1417
- if (r)
1418
- return r;
1419
- const { ast: l, detectError: c } = Cr(e, {
1420
- ...t,
1421
- location: process.env.NODE_ENV !== "production",
1422
- jit: !0
1423
- }), i = _t(l);
1424
- return c ? i : xe[a] = i;
1425
- } else {
1426
- if (process.env.NODE_ENV !== "production" && !re(e))
1427
- return le(`the message that is resolve with key '${t.key}' is not supported for jit compilation`), (() => e);
1428
- const n = e.cacheKey;
1429
- if (n) {
1430
- const u = xe[n];
1431
- return u || (xe[n] = _t(e));
1432
- } else
1433
- return _t(e);
1434
- }
1435
- }
1436
- let Re = null;
1437
- function Nr(e) {
1438
- Re = e;
1439
- }
1440
- function gr(e, t, n) {
1441
- Re && Re.emit("i18n:init", {
1442
- timestamp: Date.now(),
1443
- i18n: e,
1444
- version: t,
1445
- meta: n
1446
- });
1447
- }
1448
- const Lr = /* @__PURE__ */ Tr("function:translate");
1449
- function Tr(e) {
1450
- return (t) => Re && Re.emit(e, t);
1451
- }
1452
- const Z = {
1453
- INVALID_ARGUMENT: ku,
1454
- // 17
1455
- INVALID_DATE_ARGUMENT: 18,
1456
- INVALID_ISO_DATE_ARGUMENT: 19,
1457
- NOT_SUPPORT_NON_STRING_MESSAGE: 20,
1458
- NOT_SUPPORT_LOCALE_PROMISE_VALUE: 21,
1459
- NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22,
1460
- NOT_SUPPORT_LOCALE_TYPE: 23
1461
- }, Or = 24;
1462
- function De(e) {
1463
- return he(e, null, process.env.NODE_ENV !== "production" ? { messages: hr } : void 0);
1464
- }
1465
- const hr = {
1466
- [Z.INVALID_ARGUMENT]: "Invalid arguments",
1467
- [Z.INVALID_DATE_ARGUMENT]: "The date provided is an invalid Date object.Make sure your Date represents a valid date.",
1468
- [Z.INVALID_ISO_DATE_ARGUMENT]: "The argument provided is not a valid ISO date string",
1469
- [Z.NOT_SUPPORT_NON_STRING_MESSAGE]: "Not support non-string message",
1470
- [Z.NOT_SUPPORT_LOCALE_PROMISE_VALUE]: "cannot support promise value",
1471
- [Z.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]: "cannot support async function",
1472
- [Z.NOT_SUPPORT_LOCALE_TYPE]: "cannot support locale type"
1473
- };
1474
- function kt(e, t) {
1475
- return t.locale != null ? Zt(t.locale) : Zt(e.locale);
1476
- }
1477
- let Ft;
1478
- function Zt(e) {
1479
- if (I(e))
1480
- return e;
1481
- if (W(e)) {
1482
- if (e.resolvedOnce && Ft != null)
1483
- return Ft;
1484
- if (e.constructor.name === "Function") {
1485
- const t = e();
1486
- if (Su(t))
1487
- throw De(Z.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
1488
- return Ft = t;
1489
- } else
1490
- throw De(Z.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
1491
- } else
1492
- throw De(Z.NOT_SUPPORT_LOCALE_TYPE);
1493
- }
1494
- function Ir(e, t, n) {
1495
- return [.../* @__PURE__ */ new Set([
1496
- n,
1497
- ...K(t) ? t : B(t) ? Object.keys(t) : I(t) ? [t] : [n]
1498
- ])];
1499
- }
1500
- function Bn(e, t, n) {
1501
- const u = I(n) ? n : He, a = e;
1502
- a.__localeChainCache || (a.__localeChainCache = /* @__PURE__ */ new Map());
1503
- let r = a.__localeChainCache.get(u);
1504
- if (!r) {
1505
- r = [];
1506
- let l = [n];
1507
- for (; K(l); )
1508
- l = zt(r, l, t);
1509
- const c = K(t) || !k(t) ? t : t.default ? t.default : null;
1510
- l = I(c) ? [c] : c, K(l) && zt(r, l, !1), a.__localeChainCache.set(u, r);
1511
- }
1512
- return r;
1513
- }
1514
- function zt(e, t, n) {
1515
- let u = !0;
1516
- for (let a = 0; a < t.length && H(u); a++) {
1517
- const r = t[a];
1518
- I(r) && (u = br(e, t[a], n));
1519
- }
1520
- return u;
1521
- }
1522
- function br(e, t, n) {
1523
- let u;
1524
- const a = t.split("-");
1525
- do {
1526
- const r = a.join("-");
1527
- u = Sr(e, r, n), a.splice(-1, 1);
1528
- } while (a.length && u === !0);
1529
- return u;
1530
- }
1531
- function Sr(e, t, n) {
1532
- let u = !1;
1533
- if (!e.includes(t) && (u = !0, t)) {
1534
- u = t[t.length - 1] !== "!";
1535
- const a = t.replace(/!/g, "");
1536
- e.push(a), (K(n) || k(n)) && n[a] && (u = n[a]);
1537
- }
1538
- return u;
1539
- }
1540
- const Fe = [];
1541
- Fe[
1542
- 0
1543
- /* States.BEFORE_PATH */
1544
- ] = {
1545
- w: [
1546
- 0
1547
- /* States.BEFORE_PATH */
1548
- ],
1549
- i: [
1550
- 3,
1551
- 0
1552
- /* Actions.APPEND */
1553
- ],
1554
- "[": [
1555
- 4
1556
- /* States.IN_SUB_PATH */
1557
- ],
1558
- o: [
1559
- 7
1560
- /* States.AFTER_PATH */
1561
- ]
1562
- };
1563
- Fe[
1564
- 1
1565
- /* States.IN_PATH */
1566
- ] = {
1567
- w: [
1568
- 1
1569
- /* States.IN_PATH */
1570
- ],
1571
- ".": [
1572
- 2
1573
- /* States.BEFORE_IDENT */
1574
- ],
1575
- "[": [
1576
- 4
1577
- /* States.IN_SUB_PATH */
1578
- ],
1579
- o: [
1580
- 7
1581
- /* States.AFTER_PATH */
1582
- ]
1583
- };
1584
- Fe[
1585
- 2
1586
- /* States.BEFORE_IDENT */
1587
- ] = {
1588
- w: [
1589
- 2
1590
- /* States.BEFORE_IDENT */
1591
- ],
1592
- i: [
1593
- 3,
1594
- 0
1595
- /* Actions.APPEND */
1596
- ],
1597
- 0: [
1598
- 3,
1599
- 0
1600
- /* Actions.APPEND */
1601
- ]
1602
- };
1603
- Fe[
1604
- 3
1605
- /* States.IN_IDENT */
1606
- ] = {
1607
- i: [
1608
- 3,
1609
- 0
1610
- /* Actions.APPEND */
1611
- ],
1612
- 0: [
1613
- 3,
1614
- 0
1615
- /* Actions.APPEND */
1616
- ],
1617
- w: [
1618
- 1,
1619
- 1
1620
- /* Actions.PUSH */
1621
- ],
1622
- ".": [
1623
- 2,
1624
- 1
1625
- /* Actions.PUSH */
1626
- ],
1627
- "[": [
1628
- 4,
1629
- 1
1630
- /* Actions.PUSH */
1631
- ],
1632
- o: [
1633
- 7,
1634
- 1
1635
- /* Actions.PUSH */
1636
- ]
1637
- };
1638
- Fe[
1639
- 4
1640
- /* States.IN_SUB_PATH */
1641
- ] = {
1642
- "'": [
1643
- 5,
1644
- 0
1645
- /* Actions.APPEND */
1646
- ],
1647
- '"': [
1648
- 6,
1649
- 0
1650
- /* Actions.APPEND */
1651
- ],
1652
- "[": [
1653
- 4,
1654
- 2
1655
- /* Actions.INC_SUB_PATH_DEPTH */
1656
- ],
1657
- "]": [
1658
- 1,
1659
- 3
1660
- /* Actions.PUSH_SUB_PATH */
1661
- ],
1662
- o: 8,
1663
- l: [
1664
- 4,
1665
- 0
1666
- /* Actions.APPEND */
1667
- ]
1668
- };
1669
- Fe[
1670
- 5
1671
- /* States.IN_SINGLE_QUOTE */
1672
- ] = {
1673
- "'": [
1674
- 4,
1675
- 0
1676
- /* Actions.APPEND */
1677
- ],
1678
- o: 8,
1679
- l: [
1680
- 5,
1681
- 0
1682
- /* Actions.APPEND */
1683
- ]
1684
- };
1685
- Fe[
1686
- 6
1687
- /* States.IN_DOUBLE_QUOTE */
1688
- ] = {
1689
- '"': [
1690
- 4,
1691
- 0
1692
- /* Actions.APPEND */
1693
- ],
1694
- o: 8,
1695
- l: [
1696
- 6,
1697
- 0
1698
- /* Actions.APPEND */
1699
- ]
1700
- };
1701
- const vr = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
1702
- function yr(e) {
1703
- return vr.test(e);
1704
- }
1705
- function Pr(e) {
1706
- const t = e.charCodeAt(0), n = e.charCodeAt(e.length - 1);
1707
- return t === n && (t === 34 || t === 39) ? e.slice(1, -1) : e;
1708
- }
1709
- function Rr(e) {
1710
- if (e == null)
1711
- return "o";
1712
- switch (e.charCodeAt(0)) {
1713
- case 91:
1714
- // [
1715
- case 93:
1716
- // ]
1717
- case 46:
1718
- // .
1719
- case 34:
1720
- // "
1721
- case 39:
1722
- return e;
1723
- case 95:
1724
- // _
1725
- case 36:
1726
- // $
1727
- case 45:
1728
- return "i";
1729
- case 9:
1730
- // Tab (HT)
1731
- case 10:
1732
- // Newline (LF)
1733
- case 13:
1734
- // Return (CR)
1735
- case 160:
1736
- // No-break space (NBSP)
1737
- case 65279:
1738
- // Byte Order Mark (BOM)
1739
- case 8232:
1740
- // Line Separator (LS)
1741
- case 8233:
1742
- return "w";
1743
- }
1744
- return "i";
1745
- }
1746
- function kr(e) {
1747
- const t = e.trim();
1748
- return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 : yr(t) ? Pr(t) : "*" + t;
1749
- }
1750
- function Br(e) {
1751
- const t = [];
1752
- let n = -1, u = 0, a = 0, r, l, c, i, A, g, N;
1753
- const F = [];
1754
- F[
1755
- 0
1756
- /* Actions.APPEND */
1757
- ] = () => {
1758
- l === void 0 ? l = c : l += c;
1759
- }, F[
1760
- 1
1761
- /* Actions.PUSH */
1762
- ] = () => {
1763
- l !== void 0 && (t.push(l), l = void 0);
1764
- }, F[
1765
- 2
1766
- /* Actions.INC_SUB_PATH_DEPTH */
1767
- ] = () => {
1768
- F[
1769
- 0
1770
- /* Actions.APPEND */
1771
- ](), a++;
1772
- }, F[
1773
- 3
1774
- /* Actions.PUSH_SUB_PATH */
1775
- ] = () => {
1776
- if (a > 0)
1777
- a--, u = 4, F[
1778
- 0
1779
- /* Actions.APPEND */
1780
- ]();
1781
- else {
1782
- if (a = 0, l === void 0 || (l = kr(l), l === !1))
1783
- return !1;
1784
- F[
1785
- 1
1786
- /* Actions.PUSH */
1787
- ]();
1788
- }
1789
- };
1790
- function L() {
1791
- const v = e[n + 1];
1792
- if (u === 5 && v === "'" || u === 6 && v === '"')
1793
- return n++, c = "\\" + v, F[
1794
- 0
1795
- /* Actions.APPEND */
1796
- ](), !0;
1797
- }
1798
- for (; u !== null; )
1799
- if (n++, r = e[n], !(r === "\\" && L())) {
1800
- if (i = Rr(r), N = Fe[u], A = N[i] || N.l || 8, A === 8 || (u = A[0], A[1] !== void 0 && (g = F[A[1]], g && (c = r, g() === !1))))
251
+ install(c) {
252
+ if (c.provide(U, r), c.provide(z, s), c.provide(M, a), c.provide(W, l), c.provide(j, m), typeof window > "u")
1801
253
  return;
1802
- if (u === 7)
1803
- return t;
254
+ let f;
255
+ u && (f = R.get(u)), f || (f = window.matchMedia("(prefers-color-scheme: dark)").matches ? t : F), l(f === t ? t : F, !1);
1804
256
  }
1805
- }
1806
- const en = /* @__PURE__ */ new Map();
1807
- function Mr(e, t) {
1808
- return B(e) ? e[t] : null;
1809
- }
1810
- function wr(e, t) {
1811
- if (!B(e))
1812
- return null;
1813
- let n = en.get(t);
1814
- if (n || (n = Br(t), n && en.set(t, n)), !n)
1815
- return null;
1816
- const u = n.length;
1817
- let a = e, r = 0;
1818
- for (; r < u; ) {
1819
- const l = n[r];
1820
- if (kn.includes(l) && re(a))
1821
- return null;
1822
- const c = a[l];
1823
- if (c === void 0 || W(a))
1824
- return null;
1825
- a = c, r++;
1826
- }
1827
- return a;
1828
- }
1829
- const z = {
1830
- NOT_FOUND_KEY: 1,
1831
- FALLBACK_TO_TRANSLATE: 2,
1832
- CANNOT_FORMAT_NUMBER: 3,
1833
- FALLBACK_TO_NUMBER_FORMAT: 4,
1834
- CANNOT_FORMAT_DATE: 5,
1835
- FALLBACK_TO_DATE_FORMAT: 6,
1836
- EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: 7
1837
- }, Ur = 8, Vr = {
1838
- [z.NOT_FOUND_KEY]: "Not found '{key}' key in '{locale}' locale messages.",
1839
- [z.FALLBACK_TO_TRANSLATE]: "Fall back to translate '{key}' key with '{target}' locale.",
1840
- [z.CANNOT_FORMAT_NUMBER]: "Cannot format a number value due to not supported Intl.NumberFormat.",
1841
- [z.FALLBACK_TO_NUMBER_FORMAT]: "Fall back to number format '{key}' key with '{target}' locale.",
1842
- [z.CANNOT_FORMAT_DATE]: "Cannot format a date value due to not supported Intl.DateTimeFormat.",
1843
- [z.FALLBACK_TO_DATE_FORMAT]: "Fall back to datetime format '{key}' key with '{target}' locale.",
1844
- [z.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: "This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."
1845
- };
1846
- function Ne(e, ...t) {
1847
- return je(Vr[e], ...t);
1848
- }
1849
- const $r = "11.2.1", qe = -1, He = "en-US", Ke = "", tn = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
1850
- function Wr() {
1851
- return {
1852
- upper: (e, t) => t === "text" && I(e) ? e.toUpperCase() : t === "vnode" && B(e) && "__v_isVNode" in e ? e.children.toUpperCase() : e,
1853
- lower: (e, t) => t === "text" && I(e) ? e.toLowerCase() : t === "vnode" && B(e) && "__v_isVNode" in e ? e.children.toLowerCase() : e,
1854
- capitalize: (e, t) => t === "text" && I(e) ? tn(e) : t === "vnode" && B(e) && "__v_isVNode" in e ? tn(e.children) : e
1855
257
  };
1856
258
  }
1857
- let Mn;
1858
- function xr(e) {
1859
- Mn = e;
1860
- }
1861
- let wn;
1862
- function Gr(e) {
1863
- wn = e;
1864
- }
1865
- let Un;
1866
- function Yr(e) {
1867
- Un = e;
1868
- }
1869
- let Vn = null;
1870
- const Hr = /* @__NO_SIDE_EFFECTS__ */ (e) => {
1871
- Vn = e;
1872
- }, Kr = /* @__NO_SIDE_EFFECTS__ */ () => Vn;
1873
- let $n = null;
1874
- const nn = (e) => {
1875
- $n = e;
1876
- }, Xr = () => $n;
1877
- let un = 0;
1878
- function jr(e = {}) {
1879
- const t = W(e.onWarn) ? e.onWarn : le, n = I(e.version) ? e.version : $r, u = I(e.locale) || W(e.locale) ? e.locale : He, a = W(u) ? He : u, r = K(e.fallbackLocale) || k(e.fallbackLocale) || I(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : a, l = k(e.messages) ? e.messages : dt(a), c = k(e.datetimeFormats) ? e.datetimeFormats : dt(a), i = k(e.numberFormats) ? e.numberFormats : dt(a), A = J(U(), e.modifiers, Wr()), g = e.pluralRules || U(), N = W(e.missing) ? e.missing : null, F = H(e.missingWarn) || Ye(e.missingWarn) ? e.missingWarn : !0, L = H(e.fallbackWarn) || Ye(e.fallbackWarn) ? e.fallbackWarn : !0, v = !!e.fallbackFormat, h = !!e.unresolving, b = W(e.postTranslation) ? e.postTranslation : null, D = k(e.processor) ? e.processor : null, E = H(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, C = !!e.escapeParameter, _ = W(e.messageCompiler) ? e.messageCompiler : Mn;
1880
- process.env.NODE_ENV !== "production" && W(e.messageCompiler) && Nu(Ne(z.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));
1881
- const T = W(e.messageResolver) ? e.messageResolver : wn || Mr, O = W(e.localeFallbacker) ? e.localeFallbacker : Un || Ir, m = B(e.fallbackContext) ? e.fallbackContext : void 0, P = e, w = B(P.__datetimeFormatters) ? P.__datetimeFormatters : /* @__PURE__ */ new Map(), X = B(P.__numberFormatters) ? P.__numberFormatters : /* @__PURE__ */ new Map(), ne = B(P.__meta) ? P.__meta : {};
1882
- un++;
1883
- const x = {
1884
- version: n,
1885
- cid: un,
1886
- locale: u,
1887
- fallbackLocale: r,
1888
- messages: l,
1889
- modifiers: A,
1890
- pluralRules: g,
1891
- missing: N,
1892
- missingWarn: F,
1893
- fallbackWarn: L,
1894
- fallbackFormat: v,
1895
- unresolving: h,
1896
- postTranslation: b,
1897
- processor: D,
1898
- warnHtmlMessage: E,
1899
- escapeParameter: C,
1900
- messageCompiler: _,
1901
- messageResolver: T,
1902
- localeFallbacker: O,
1903
- fallbackContext: m,
1904
- onWarn: t,
1905
- __meta: ne
259
+ function Lu() {
260
+ const D = h(U);
261
+ return D || console.warn(au), {
262
+ theme: D,
263
+ isLight: h(z),
264
+ isDark: h(M),
265
+ setTheme: h(W),
266
+ toggleTheme: h(j)
1906
267
  };
1907
- return x.datetimeFormats = c, x.numberFormats = i, x.__datetimeFormatters = w, x.__numberFormatters = X, process.env.NODE_ENV !== "production" && (x.__v_emitter = P.__v_emitter != null ? P.__v_emitter : void 0), (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) && gr(x, n, ne), x;
1908
- }
1909
- const dt = (e) => ({ [e]: U() });
1910
- function Qe(e, t) {
1911
- return e instanceof RegExp ? e.test(t) : e;
1912
268
  }
1913
- function Wn(e, t) {
1914
- return e instanceof RegExp ? e.test(t) : e;
1915
- }
1916
- function Bt(e, t, n, u, a) {
1917
- const { missing: r, onWarn: l } = e;
1918
- if (process.env.NODE_ENV !== "production") {
1919
- const c = e.__v_emitter;
1920
- c && c.emit("missing", {
1921
- locale: n,
1922
- key: t,
1923
- type: a,
1924
- groupId: `${a}:${t}`
1925
- });
1926
- }
1927
- if (r !== null) {
1928
- const c = r(e, n, t, a);
1929
- return I(c) ? c : t;
1930
- } else
1931
- return process.env.NODE_ENV !== "production" && Wn(u, t) && l(Ne(z.NOT_FOUND_KEY, { key: t, locale: n })), t;
1932
- }
1933
- function ye(e, t, n) {
1934
- const u = e;
1935
- u.__localeChainCache = /* @__PURE__ */ new Map(), e.localeFallbacker(e, n, t);
1936
- }
1937
- function xn(e, t) {
1938
- return e === t ? !1 : e.split("-")[0] === t.split("-")[0];
1939
- }
1940
- function Jr(e, t) {
1941
- const n = t.indexOf(e);
1942
- if (n === -1)
269
+ async function Tu(D) {
270
+ try {
271
+ return navigator.clipboard ? (await navigator.clipboard.writeText(D), !0) : lu(D);
272
+ } catch {
1943
273
  return !1;
1944
- for (let u = n + 1; u < t.length; u++)
1945
- if (xn(e, t[u]))
1946
- return !0;
1947
- return !1;
1948
- }
1949
- const rn = typeof Intl < "u", Gn = {
1950
- dateTimeFormat: rn && typeof Intl.DateTimeFormat < "u",
1951
- numberFormat: rn && typeof Intl.NumberFormat < "u"
1952
- };
1953
- function an(e, ...t) {
1954
- const { datetimeFormats: n, unresolving: u, fallbackLocale: a, onWarn: r, localeFallbacker: l } = e, { __datetimeFormatters: c } = e;
1955
- if (process.env.NODE_ENV !== "production" && !Gn.dateTimeFormat)
1956
- return r(Ne(z.CANNOT_FORMAT_DATE)), Ke;
1957
- const [i, A, g, N] = pt(...t), F = H(g.missingWarn) ? g.missingWarn : e.missingWarn, L = H(g.fallbackWarn) ? g.fallbackWarn : e.fallbackWarn, v = !!g.part, h = kt(e, g), b = l(
1958
- e,
1959
- // eslint-disable-line @typescript-eslint/no-explicit-any
1960
- a,
1961
- h
1962
- );
1963
- if (!I(i) || i === "")
1964
- return new Intl.DateTimeFormat(h, N).format(A);
1965
- let D = {}, E, C = null, _ = h, T = null;
1966
- const O = "datetime format";
1967
- for (let w = 0; w < b.length; w++) {
1968
- if (E = T = b[w], process.env.NODE_ENV !== "production" && h !== E && Qe(L, i) && r(Ne(z.FALLBACK_TO_DATE_FORMAT, {
1969
- key: i,
1970
- target: E
1971
- })), process.env.NODE_ENV !== "production" && h !== E) {
1972
- const X = e.__v_emitter;
1973
- X && X.emit("fallback", {
1974
- type: O,
1975
- key: i,
1976
- from: _,
1977
- to: T,
1978
- groupId: `${O}:${i}`
1979
- });
1980
- }
1981
- if (D = n[E] || {}, C = D[i], k(C))
1982
- break;
1983
- Bt(e, i, E, F, O), _ = T;
1984
- }
1985
- if (!k(C) || !I(E))
1986
- return u ? qe : i;
1987
- let m = `${E}__${i}`;
1988
- Je(N) || (m = `${m}__${JSON.stringify(N)}`);
1989
- let P = c.get(m);
1990
- return P || (P = new Intl.DateTimeFormat(E, J({}, C, N)), c.set(m, P)), v ? P.formatToParts(A) : P.format(A);
1991
- }
1992
- const Yn = [
1993
- "localeMatcher",
1994
- "weekday",
1995
- "era",
1996
- "year",
1997
- "month",
1998
- "day",
1999
- "hour",
2000
- "minute",
2001
- "second",
2002
- "timeZoneName",
2003
- "formatMatcher",
2004
- "hour12",
2005
- "timeZone",
2006
- "dateStyle",
2007
- "timeStyle",
2008
- "calendar",
2009
- "dayPeriod",
2010
- "numberingSystem",
2011
- "hourCycle",
2012
- "fractionalSecondDigits"
2013
- ];
2014
- function pt(...e) {
2015
- const [t, n, u, a] = e, r = U();
2016
- let l = U(), c;
2017
- if (I(t)) {
2018
- const i = t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
2019
- if (!i)
2020
- throw De(Z.INVALID_ISO_DATE_ARGUMENT);
2021
- const A = i[3] ? i[3].trim().startsWith("T") ? `${i[1].trim()}${i[3].trim()}` : `${i[1].trim()}T${i[3].trim()}` : i[1].trim();
2022
- c = new Date(A);
2023
- try {
2024
- c.toISOString();
2025
- } catch {
2026
- throw De(Z.INVALID_ISO_DATE_ARGUMENT);
2027
- }
2028
- } else if (Ou(t)) {
2029
- if (isNaN(t.getTime()))
2030
- throw De(Z.INVALID_DATE_ARGUMENT);
2031
- c = t;
2032
- } else if (j(t))
2033
- c = t;
2034
- else
2035
- throw De(Z.INVALID_ARGUMENT);
2036
- return I(n) ? r.key = n : k(n) && Object.keys(n).forEach((i) => {
2037
- Yn.includes(i) ? l[i] = n[i] : r[i] = n[i];
2038
- }), I(u) ? r.locale = u : k(u) && (l = u), k(a) && (l = a), [r.key || "", c, r, l];
2039
- }
2040
- function sn(e, t, n) {
2041
- const u = e;
2042
- for (const a in n) {
2043
- const r = `${t}__${a}`;
2044
- u.__datetimeFormatters.has(r) && u.__datetimeFormatters.delete(r);
2045
- }
2046
- }
2047
- function on(e, ...t) {
2048
- const { numberFormats: n, unresolving: u, fallbackLocale: a, onWarn: r, localeFallbacker: l } = e, { __numberFormatters: c } = e;
2049
- if (process.env.NODE_ENV !== "production" && !Gn.numberFormat)
2050
- return r(Ne(z.CANNOT_FORMAT_NUMBER)), Ke;
2051
- const [i, A, g, N] = Nt(...t), F = H(g.missingWarn) ? g.missingWarn : e.missingWarn, L = H(g.fallbackWarn) ? g.fallbackWarn : e.fallbackWarn, v = !!g.part, h = kt(e, g), b = l(
2052
- e,
2053
- // eslint-disable-line @typescript-eslint/no-explicit-any
2054
- a,
2055
- h
2056
- );
2057
- if (!I(i) || i === "")
2058
- return new Intl.NumberFormat(h, N).format(A);
2059
- let D = {}, E, C = null, _ = h, T = null;
2060
- const O = "number format";
2061
- for (let w = 0; w < b.length; w++) {
2062
- if (E = T = b[w], process.env.NODE_ENV !== "production" && h !== E && Qe(L, i) && r(Ne(z.FALLBACK_TO_NUMBER_FORMAT, {
2063
- key: i,
2064
- target: E
2065
- })), process.env.NODE_ENV !== "production" && h !== E) {
2066
- const X = e.__v_emitter;
2067
- X && X.emit("fallback", {
2068
- type: O,
2069
- key: i,
2070
- from: _,
2071
- to: T,
2072
- groupId: `${O}:${i}`
2073
- });
2074
- }
2075
- if (D = n[E] || {}, C = D[i], k(C))
2076
- break;
2077
- Bt(e, i, E, F, O), _ = T;
2078
- }
2079
- if (!k(C) || !I(E))
2080
- return u ? qe : i;
2081
- let m = `${E}__${i}`;
2082
- Je(N) || (m = `${m}__${JSON.stringify(N)}`);
2083
- let P = c.get(m);
2084
- return P || (P = new Intl.NumberFormat(E, J({}, C, N)), c.set(m, P)), v ? P.formatToParts(A) : P.format(A);
2085
- }
2086
- const Hn = [
2087
- "localeMatcher",
2088
- "style",
2089
- "currency",
2090
- "currencyDisplay",
2091
- "currencySign",
2092
- "useGrouping",
2093
- "minimumIntegerDigits",
2094
- "minimumFractionDigits",
2095
- "maximumFractionDigits",
2096
- "minimumSignificantDigits",
2097
- "maximumSignificantDigits",
2098
- "compactDisplay",
2099
- "notation",
2100
- "signDisplay",
2101
- "unit",
2102
- "unitDisplay",
2103
- "roundingMode",
2104
- "roundingPriority",
2105
- "roundingIncrement",
2106
- "trailingZeroDisplay"
2107
- ];
2108
- function Nt(...e) {
2109
- const [t, n, u, a] = e, r = U();
2110
- let l = U();
2111
- if (!j(t))
2112
- throw De(Z.INVALID_ARGUMENT);
2113
- const c = t;
2114
- return I(n) ? r.key = n : k(n) && Object.keys(n).forEach((i) => {
2115
- Hn.includes(i) ? l[i] = n[i] : r[i] = n[i];
2116
- }), I(u) ? r.locale = u : k(u) && (l = u), k(a) && (l = a), [r.key || "", c, r, l];
2117
- }
2118
- function ln(e, t, n) {
2119
- const u = e;
2120
- for (const a in n) {
2121
- const r = `${t}__${a}`;
2122
- u.__numberFormatters.has(r) && u.__numberFormatters.delete(r);
2123
274
  }
2124
275
  }
2125
- const qr = (e) => e, Qr = (e) => "", Zr = "text", zr = (e) => e.length === 0 ? "" : yt(e), ea = vu;
2126
- function cn(e, t) {
2127
- return e = Math.abs(e), t === 2 ? e ? e > 1 ? 1 : 0 : 1 : e ? Math.min(e, 2) : 0;
2128
- }
2129
- function ta(e) {
2130
- const t = j(e.pluralIndex) ? e.pluralIndex : -1;
2131
- return e.named && (j(e.named.count) || j(e.named.n)) ? j(e.named.count) ? e.named.count : j(e.named.n) ? e.named.n : t : t;
2132
- }
2133
- function na(e, t) {
2134
- t.count || (t.count = e), t.n || (t.n = e);
2135
- }
2136
- function ua(e = {}) {
2137
- const t = e.locale, n = ta(e), u = B(e.pluralRules) && I(t) && W(e.pluralRules[t]) ? e.pluralRules[t] : cn, a = B(e.pluralRules) && I(t) && W(e.pluralRules[t]) ? cn : void 0, r = (D) => D[u(n, D.length, a)], l = e.list || [], c = (D) => l[D], i = e.named || U();
2138
- j(e.pluralIndex) && na(n, i);
2139
- const A = (D) => i[D];
2140
- function g(D, E) {
2141
- const C = W(e.messages) ? e.messages(D, !!E) : B(e.messages) ? e.messages[D] : !1;
2142
- return C || (e.parent ? e.parent.message(D) : Qr);
2143
- }
2144
- const N = (D) => e.modifiers ? e.modifiers[D] : qr, F = k(e.processor) && W(e.processor.normalize) ? e.processor.normalize : zr, L = k(e.processor) && W(e.processor.interpolate) ? e.processor.interpolate : ea, v = k(e.processor) && I(e.processor.type) ? e.processor.type : Zr, b = {
2145
- list: c,
2146
- named: A,
2147
- plural: r,
2148
- linked: (D, ...E) => {
2149
- const [C, _] = E;
2150
- let T = "text", O = "";
2151
- E.length === 1 ? B(C) ? (O = C.modifier || O, T = C.type || T) : I(C) && (O = C || O) : E.length === 2 && (I(C) && (O = C || O), I(_) && (T = _ || T));
2152
- const m = g(D, !0)(b), P = (
2153
- // The message in vnode resolved with linked are returned as an array by processor.nomalize
2154
- T === "vnode" && K(m) && O ? m[0] : m
2155
- );
2156
- return O ? N(O)(P, T) : P;
2157
- },
2158
- message: g,
2159
- type: v,
2160
- interpolate: L,
2161
- normalize: F,
2162
- values: J(U(), l, i)
2163
- };
2164
- return b;
2165
- }
2166
- const Dn = () => "", te = (e) => W(e);
2167
- function fn(e, ...t) {
2168
- const { fallbackFormat: n, postTranslation: u, unresolving: a, messageCompiler: r, fallbackLocale: l, messages: c } = e, [i, A] = gt(...t), g = H(A.missingWarn) ? A.missingWarn : e.missingWarn, N = H(A.fallbackWarn) ? A.fallbackWarn : e.fallbackWarn, F = H(A.escapeParameter) ? A.escapeParameter : e.escapeParameter, L = !!A.resolvedMessage, v = I(A.default) || H(A.default) ? H(A.default) ? r ? i : () => i : A.default : n ? r ? i : () => i : null, h = n || v != null && (I(v) || W(v)), b = kt(e, A);
2169
- F && ra(A);
2170
- let [D, E, C] = L ? [
2171
- i,
2172
- b,
2173
- c[b] || U()
2174
- ] : Kn(e, i, b, l, N, g), _ = D, T = i;
2175
- if (!L && !(I(_) || re(_) || te(_)) && h && (_ = v, T = _), !L && (!(I(_) || re(_) || te(_)) || !I(E)))
2176
- return a ? qe : i;
2177
- if (process.env.NODE_ENV !== "production" && I(_) && e.messageCompiler == null)
2178
- return le(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${i}'.`), i;
2179
- let O = !1;
2180
- const m = () => {
2181
- O = !0;
2182
- }, P = te(_) ? _ : Xn(e, i, E, _, T, m);
2183
- if (O)
2184
- return _;
2185
- const w = la(e, E, C, A), X = ua(w), ne = aa(e, P, X);
2186
- let x = u ? u(ne, i) : ne;
2187
- if (F && I(x) && (x = Iu(x)), process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
2188
- const ge = {
2189
- timestamp: Date.now(),
2190
- key: I(i) ? i : te(_) ? _.key : "",
2191
- locale: E || (te(_) ? _.locale : ""),
2192
- format: I(_) ? _ : te(_) ? _.source : "",
2193
- message: x
276
+ function lu(D) {
277
+ const u = document.createElement("textarea");
278
+ u.value = D, u.style.top = "0", u.style.left = "0", u.style.width = "1px", u.style.height = "1px", u.style.position = "fixed", u.style.opacity = "0", document.body.appendChild(u), u.focus(), u.select();
279
+ try {
280
+ const e = document.execCommand("copy");
281
+ return document.body.removeChild(u), e;
282
+ } catch {
283
+ return document.body.removeChild(u), !1;
284
+ }
285
+ }
286
+ class g {
287
+ constructor(u) {
288
+ y(this, "prev", null);
289
+ y(this, "next", null);
290
+ y(this, "data", null);
291
+ this.data = u;
292
+ }
293
+ removeSelf() {
294
+ this.data = null, this.prev && (this.prev.next = this.next), this.next && (this.next.prev = this.prev), this.prev = null, this.next = null;
295
+ }
296
+ }
297
+ class du {
298
+ constructor() {
299
+ y(this, "dummyHead", new g(null));
300
+ }
301
+ shift(u) {
302
+ const e = new g(u), F = this.dummyHead.next;
303
+ return e.prev = this.dummyHead, this.dummyHead.next = e, F && (e.next = F, F.prev = e), e;
304
+ }
305
+ remove(u) {
306
+ u.removeSelf();
307
+ }
308
+ clear() {
309
+ let u = this.dummyHead.next;
310
+ for (; u; ) {
311
+ const e = u.next;
312
+ u.removeSelf(), u = e;
313
+ }
314
+ this.dummyHead.next = null;
315
+ }
316
+ }
317
+ const P = Symbol(), w = Symbol(), _ = async (D, ...u) => typeof D == "function" ? await D(...u) : N(D), x = (D) => typeof D == "object" && D !== null, k = (D) => typeof D.event == "string" && x(D.properties);
318
+ function L(D, u) {
319
+ let e, F;
320
+ if (u != null && u.catchBubble)
321
+ e = new du(), F = e.shift(async (t) => {
322
+ var n, C;
323
+ if (x(t))
324
+ if (t[w]) {
325
+ const E = await _(D);
326
+ if (!k(E)) return;
327
+ delete t[w];
328
+ const A = {
329
+ ...E,
330
+ properties: {
331
+ ...E.properties,
332
+ ...t
333
+ }
334
+ };
335
+ (n = window.__OA_REPORT__) == null || n.call(window, A.event, A.properties);
336
+ } else k(t) && ((C = window.__OA_REPORT__) == null || C.call(window, t.event, t.properties));
337
+ }), Du((u == null ? void 0 : u.key) ?? P, e);
338
+ else if (u != null && u.bubble) {
339
+ if (e = h((u == null ? void 0 : u.key) ?? P), !e) return;
340
+ F = e.shift(async (t) => {
341
+ var n, C, E, A;
342
+ if (x(t))
343
+ if (t[w]) {
344
+ const B = await _(D);
345
+ if (!x(B)) return;
346
+ const i = {
347
+ ...B,
348
+ ...t
349
+ };
350
+ (C = (n = F.next) == null ? void 0 : n.data) == null || C.call(n, i);
351
+ } else
352
+ (A = (E = F.next) == null ? void 0 : E.data) == null || A.call(E, { ...t, [w]: !0 });
353
+ });
354
+ } else
355
+ F = (t) => {
356
+ var n;
357
+ k(t) && ((n = window.__OA_REPORT__) == null || n.call(window, t.event, t.properties));
2194
358
  };
2195
- ge.meta = J({}, e.__meta, /* @__PURE__ */ Kr() || {}), Lr(ge);
2196
- }
2197
- return x;
2198
- }
2199
- function ra(e) {
2200
- K(e.list) ? e.list = e.list.map((t) => I(t) ? Ht(t) : t) : B(e.named) && Object.keys(e.named).forEach((t) => {
2201
- I(e.named[t]) && (e.named[t] = Ht(e.named[t]));
359
+ return K(() => {
360
+ e = null, F instanceof g && F.removeSelf(), F = null;
361
+ }), F;
362
+ }
363
+ function Ru(D, u, e) {
364
+ if (!uu(D) && typeof D != "function") return;
365
+ const F = L(u, e);
366
+ $(D, async (t, n) => {
367
+ var E;
368
+ const C = await _(u, t, n);
369
+ F instanceof g ? (E = F.data) == null || E.call(F, C) : typeof F == "function" && F(C);
2202
370
  });
2203
371
  }
2204
- function Kn(e, t, n, u, a, r) {
2205
- const { messages: l, onWarn: c, messageResolver: i, localeFallbacker: A } = e, g = A(e, u, n);
2206
- let N = U(), F, L = null, v = n, h = null;
2207
- const b = "translate";
2208
- for (let D = 0; D < g.length; D++) {
2209
- if (F = h = g[D], process.env.NODE_ENV !== "production" && n !== F && !xn(n, F) && Qe(a, t) && c(Ne(z.FALLBACK_TO_TRANSLATE, {
2210
- key: t,
2211
- target: F
2212
- })), process.env.NODE_ENV !== "production" && n !== F) {
2213
- const T = e.__v_emitter;
2214
- T && T.emit("fallback", {
2215
- type: b,
2216
- key: t,
2217
- from: v,
2218
- to: h,
2219
- groupId: `${b}:${t}`
2220
- });
2221
- }
2222
- N = l[F] || U();
2223
- let E = null, C, _;
2224
- if (process.env.NODE_ENV !== "production" && fe && (E = window.performance.now(), C = "intlify-message-resolve-start", _ = "intlify-message-resolve-end", ee && ee(C)), (L = i(N, t)) === null && (L = N[t]), process.env.NODE_ENV !== "production" && fe) {
2225
- const T = window.performance.now(), O = e.__v_emitter;
2226
- O && E && L && O.emit("message-resolve", {
2227
- type: "message-resolve",
2228
- key: t,
2229
- message: L,
2230
- time: T - E,
2231
- groupId: `${b}:${t}`
2232
- }), C && _ && ee && pe && (ee(_), pe("intlify message resolve", C, _));
2233
- }
2234
- if (I(L) || re(L) || te(L))
2235
- break;
2236
- if (!Jr(F, g)) {
2237
- const T = Bt(
2238
- e,
2239
- // eslint-disable-line @typescript-eslint/no-explicit-any
2240
- t,
2241
- F,
2242
- r,
2243
- b
2244
- );
2245
- T !== t && (L = T);
2246
- }
2247
- v = h;
2248
- }
2249
- return [L, F, N];
2250
- }
2251
- function Xn(e, t, n, u, a, r) {
2252
- const { messageCompiler: l, warnHtmlMessage: c } = e;
2253
- if (te(u)) {
2254
- const F = u;
2255
- return F.locale = F.locale || n, F.key = F.key || t, F;
2256
- }
2257
- if (l == null) {
2258
- const F = (() => u);
2259
- return F.locale = n, F.key = t, F;
2260
- }
2261
- let i = null, A, g;
2262
- process.env.NODE_ENV !== "production" && fe && (i = window.performance.now(), A = "intlify-message-compilation-start", g = "intlify-message-compilation-end", ee && ee(A));
2263
- const N = l(u, sa(e, n, a, u, c, r));
2264
- if (process.env.NODE_ENV !== "production" && fe) {
2265
- const F = window.performance.now(), L = e.__v_emitter;
2266
- L && i && L.emit("message-compilation", {
2267
- type: "message-compilation",
2268
- message: u,
2269
- time: F - i,
2270
- groupId: `translate:${t}`
2271
- }), A && g && ee && pe && (ee(g), pe("intlify message compilation", A, g));
2272
- }
2273
- return N.locale = n, N.key = t, N.source = u, N;
2274
- }
2275
- function aa(e, t, n) {
2276
- let u = null, a, r;
2277
- process.env.NODE_ENV !== "production" && fe && (u = window.performance.now(), a = "intlify-message-evaluation-start", r = "intlify-message-evaluation-end", ee && ee(a));
2278
- const l = t(n);
2279
- if (process.env.NODE_ENV !== "production" && fe) {
2280
- const c = window.performance.now(), i = e.__v_emitter;
2281
- i && u && i.emit("message-evaluation", {
2282
- type: "message-evaluation",
2283
- value: l,
2284
- time: c - u,
2285
- groupId: `translate:${t.key}`
2286
- }), a && r && ee && pe && (ee(r), pe("intlify message evaluation", a, r));
2287
- }
2288
- return l;
2289
- }
2290
- function gt(...e) {
2291
- const [t, n, u] = e, a = U();
2292
- if (!I(t) && !j(t) && !te(t) && !re(t))
2293
- throw De(Z.INVALID_ARGUMENT);
2294
- const r = j(t) ? String(t) : (te(t), t);
2295
- return j(n) ? a.plural = n : I(n) ? a.default = n : k(n) && !Je(n) ? a.named = n : K(n) && (a.list = n), j(u) ? a.plural = u : I(u) ? a.default = u : k(u) && J(a, u), [r, a];
2296
- }
2297
- function sa(e, t, n, u, a, r) {
2298
- return {
2299
- locale: t,
2300
- key: n,
2301
- warnHtmlMessage: a,
2302
- onError: (l) => {
2303
- if (r && r(l), process.env.NODE_ENV !== "production") {
2304
- const c = oa(u), i = `Message compilation error: ${l.message}`, A = l.location && c && yu(c, l.location.start.offset, l.location.end.offset), g = e.__v_emitter;
2305
- g && c && g.emit("compile-error", {
2306
- message: c,
2307
- error: l.message,
2308
- start: l.location && l.location.start.offset,
2309
- end: l.location && l.location.end.offset,
2310
- groupId: `translate:${n}`
2311
- }), console.error(A ? `${i}
2312
- ${A}` : i);
2313
- } else
2314
- throw l;
2315
- },
2316
- onCacheKey: (l) => Lu(t, n, l)
372
+ const I = /* @__PURE__ */ new WeakSet();
373
+ function Pu(D, u, e, F) {
374
+ const t = o(() => N(D)), n = L(e, { ...F, key: u }), C = async (E) => {
375
+ var B;
376
+ if (F != null && F.bubble && I.has(E)) return;
377
+ I.add(E);
378
+ const A = await _(e, E);
379
+ typeof A == "object" && A !== null && (n instanceof g ? (B = n.data) == null || B.call(n, A) : typeof n == "function" && n(A));
2317
380
  };
2318
- }
2319
- function oa(e) {
2320
- if (I(e))
2321
- return e;
2322
- if (e.loc && e.loc.source)
2323
- return e.loc.source;
2324
- }
2325
- function la(e, t, n, u) {
2326
- const { modifiers: a, pluralRules: r, messageResolver: l, fallbackLocale: c, fallbackWarn: i, missingWarn: A, fallbackContext: g } = e, F = {
2327
- locale: t,
2328
- modifiers: a,
2329
- pluralRules: r,
2330
- messages: (L, v) => {
2331
- let h = l(n, L);
2332
- if (h == null && (g || v)) {
2333
- const [, , b] = Kn(
2334
- g || e,
2335
- // NOTE: if has fallbackContext, fallback to root, else if use linked, fallback to local context
2336
- L,
2337
- t,
2338
- c,
2339
- i,
2340
- A
2341
- );
2342
- h = l(b, L);
2343
- }
2344
- if (I(h) || re(h)) {
2345
- let b = !1;
2346
- const E = Xn(e, L, t, h, L, () => {
2347
- b = !0;
2348
- });
2349
- return b ? Dn : E;
2350
- } else return te(h) ? h : Dn;
2351
- }
2352
- };
2353
- return e.processor && (F.processor = e.processor), u.list && (F.list = u.list), u.named && (F.named = u.named), j(u.plural) && (F.pluralIndex = u.plural), F;
2354
- }
2355
- lr();
2356
- /*!
2357
- * vue-i18n v11.2.1
2358
- * (c) 2025 kazuya kawaguchi
2359
- * Released under the MIT License.
2360
- */
2361
- const ia = "11.2.1";
2362
- function ca() {
2363
- typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (Ce().__VUE_I18N_FULL_INSTALL__ = !0), typeof __VUE_I18N_LEGACY_API__ != "boolean" && (Ce().__VUE_I18N_LEGACY_API__ = !0), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Ce().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1), typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Ce().__INTLIFY_PROD_DEVTOOLS__ = !1);
2364
- }
2365
- const q = {
2366
- // composer module errors
2367
- UNEXPECTED_RETURN_TYPE: Or,
2368
- // 24
2369
- // legacy module errors
2370
- INVALID_ARGUMENT: 25,
2371
- // i18n module errors
2372
- MUST_BE_CALL_SETUP_TOP: 26,
2373
- NOT_INSTALLED: 27,
2374
- // directive module errors
2375
- REQUIRED_VALUE: 28,
2376
- INVALID_VALUE: 29,
2377
- // vue-devtools errors
2378
- CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN: 30,
2379
- NOT_INSTALLED_WITH_PROVIDE: 31,
2380
- // unexpected error
2381
- UNEXPECTED_ERROR: 32,
2382
- // not compatible legacy vue-i18n constructor
2383
- NOT_COMPATIBLE_LEGACY_VUE_I18N: 33,
2384
- // Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly
2385
- NOT_AVAILABLE_COMPOSITION_IN_LEGACY: 34
2386
- };
2387
- function ke(e, ...t) {
2388
- return he(e, null, process.env.NODE_ENV !== "production" ? { messages: Da, args: t } : void 0);
2389
- }
2390
- const Da = {
2391
- [q.UNEXPECTED_RETURN_TYPE]: "Unexpected return type in composer",
2392
- [q.INVALID_ARGUMENT]: "Invalid argument",
2393
- [q.MUST_BE_CALL_SETUP_TOP]: "Must be called at the top of a `setup` function",
2394
- [q.NOT_INSTALLED]: "Need to install with `app.use` function",
2395
- [q.UNEXPECTED_ERROR]: "Unexpected error",
2396
- [q.REQUIRED_VALUE]: "Required in value: {0}",
2397
- [q.INVALID_VALUE]: "Invalid value",
2398
- [q.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]: "Cannot setup vue-devtools plugin",
2399
- [q.NOT_INSTALLED_WITH_PROVIDE]: "Need to install with `provide` function",
2400
- [q.NOT_COMPATIBLE_LEGACY_VUE_I18N]: "Not compatible legacy VueI18n.",
2401
- [q.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]: "Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"
2402
- }, Lt = /* @__PURE__ */ Ee("__translateVNode"), Tt = /* @__PURE__ */ Ee("__datetimeParts"), Ot = /* @__PURE__ */ Ee("__numberParts"), ht = /* @__PURE__ */ Ee("__enableEmitter"), It = /* @__PURE__ */ Ee("__disableEmitter"), fa = Ee("__setPluralRules"), jn = /* @__PURE__ */ Ee("__injectWithOption"), bt = /* @__PURE__ */ Ee("__dispose"), oe = {
2403
- FALLBACK_TO_ROOT: Ur,
2404
- // 8
2405
- NOT_FOUND_PARENT_SCOPE: 9,
2406
- IGNORE_OBJ_FLATTEN: 10,
2407
- /**
2408
- * @deprecated will be removed at vue-i18n v12
2409
- */
2410
- DEPRECATE_LEGACY_MODE: 11,
2411
- /**
2412
- * @deprecated will be removed at vue-i18n v12
2413
- */
2414
- DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE: 12,
2415
- // duplicate `useI18n` calling
2416
- DUPLICATE_USE_I18N_CALLING: 13
2417
- }, Ea = {
2418
- [oe.FALLBACK_TO_ROOT]: "Fall back to {type} '{key}' with root locale.",
2419
- [oe.NOT_FOUND_PARENT_SCOPE]: "Not found parent scope. use the global scope.",
2420
- [oe.IGNORE_OBJ_FLATTEN]: "Ignore object flatten: '{key}' key has an string value",
2421
- /**
2422
- * @deprecated will be removed at vue-i18n v12
2423
- */
2424
- [oe.DEPRECATE_LEGACY_MODE]: `Legacy API mode has been deprecated in v11. Use Composition API mode instead.
2425
- About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,
2426
- /**
2427
- * @deprecated will be removed at vue-i18n v12
2428
- */
2429
- [oe.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]: "'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.",
2430
- [oe.DUPLICATE_USE_I18N_CALLING]: "Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component."
2431
- };
2432
- function Xe(e, ...t) {
2433
- return je(Ea[e], ...t);
2434
- }
2435
- function Be(e) {
2436
- if (!B(e) || re(e))
2437
- return e;
2438
- for (const t in e)
2439
- if (ue(e, t))
2440
- if (!t.includes("."))
2441
- B(e[t]) && Be(e[t]);
2442
- else {
2443
- const n = t.split("."), u = n.length - 1;
2444
- let a = e, r = !1;
2445
- for (let l = 0; l < u; l++) {
2446
- if (n[l] === "__proto__")
2447
- throw new Error(`unsafe key: ${n[l]}`);
2448
- if (n[l] in a || (a[n[l]] = U()), !B(a[n[l]])) {
2449
- process.env.NODE_ENV !== "production" && le(Xe(oe.IGNORE_OBJ_FLATTEN, {
2450
- key: n[l]
2451
- })), r = !0;
2452
- break;
2453
- }
2454
- a = a[n[l]];
2455
- }
2456
- if (r || (re(a) ? kn.includes(n[u]) || delete e[t] : (a[n[u]] = e[t], delete e[t])), !re(a)) {
2457
- const l = a[n[u]];
2458
- B(l) && Be(l);
2459
- }
2460
- }
2461
- return e;
2462
- }
2463
- function Jn(e, t) {
2464
- const { messages: n, __i18n: u, messageResolver: a, flatJson: r } = t, l = k(n) ? n : K(u) ? U() : { [e]: U() };
2465
- if (K(u) && u.forEach((c) => {
2466
- if ("locale" in c && "resource" in c) {
2467
- const { locale: i, resource: A } = c;
2468
- i ? (l[i] = l[i] || U(), Ge(A, l[i])) : Ge(A, l);
2469
- } else
2470
- I(c) && Ge(JSON.parse(c), l);
2471
- }), a == null && r)
2472
- for (const c in l)
2473
- ue(l, c) && Be(l[c]);
2474
- return l;
2475
- }
2476
- function qn(e) {
2477
- return e.type;
2478
- }
2479
- function _a(e, t, n) {
2480
- let u = B(t.messages) ? t.messages : U();
2481
- "__i18nGlobal" in n && (u = Jn(e.locale.value, {
2482
- messages: u,
2483
- __i18n: n.__i18nGlobal
2484
- }));
2485
- const a = Object.keys(u);
2486
- a.length && a.forEach((r) => {
2487
- e.mergeLocaleMessage(r, u[r]);
381
+ O(() => {
382
+ var E;
383
+ return (E = t.value) == null ? void 0 : E.addEventListener(u, C);
384
+ }), S(() => {
385
+ var E;
386
+ return (E = t.value) == null ? void 0 : E.removeEventListener(u, C);
2488
387
  });
2489
- {
2490
- if (B(t.datetimeFormats)) {
2491
- const r = Object.keys(t.datetimeFormats);
2492
- r.length && r.forEach((l) => {
2493
- e.mergeDateTimeFormat(l, t.datetimeFormats[l]);
2494
- });
2495
- }
2496
- if (B(t.numberFormats)) {
2497
- const r = Object.keys(t.numberFormats);
2498
- r.length && r.forEach((l) => {
2499
- e.mergeNumberFormat(l, t.numberFormats[l]);
2500
- });
2501
- }
2502
- }
2503
- }
2504
- function En(e) {
2505
- return su(ou, null, e, 0);
2506
- }
2507
- function Mt() {
2508
- return $t.currentInstance || $t.getCurrentInstance();
2509
- }
2510
- const _n = "__INTLIFY_META__", Fn = () => [], Fa = () => !1;
2511
- let dn = 0;
2512
- function mn(e) {
2513
- return ((t, n, u, a) => e(n, u, Mt() || void 0, a));
2514
388
  }
2515
- const da = /* @__NO_SIDE_EFFECTS__ */ () => {
2516
- const e = Mt();
2517
- let t = null;
2518
- return e && (t = qn(e)[_n]) ? { [_n]: t } : null;
2519
- };
2520
- function ma(e = {}) {
2521
- const { __root: t, __injectWithOption: n } = e, u = t === void 0, a = e.flatJson, r = fe ? Cn : au;
2522
- let l = H(e.inheritLocale) ? e.inheritLocale : !0;
2523
- const c = r(
2524
- // prettier-ignore
2525
- t && l ? t.locale.value : I(e.locale) ? e.locale : He
2526
- ), i = r(
2527
- // prettier-ignore
2528
- t && l ? t.fallbackLocale.value : I(e.fallbackLocale) || K(e.fallbackLocale) || k(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : c.value
2529
- ), A = r(Jn(c.value, e)), g = r(k(e.datetimeFormats) ? e.datetimeFormats : { [c.value]: {} }), N = r(k(e.numberFormats) ? e.numberFormats : { [c.value]: {} });
2530
- let F = t ? t.missingWarn : H(e.missingWarn) || Ye(e.missingWarn) ? e.missingWarn : !0, L = t ? t.fallbackWarn : H(e.fallbackWarn) || Ye(e.fallbackWarn) ? e.fallbackWarn : !0, v = t ? t.fallbackRoot : H(e.fallbackRoot) ? e.fallbackRoot : !0, h = !!e.fallbackFormat, b = W(e.missing) ? e.missing : null, D = W(e.missing) ? mn(e.missing) : null, E = W(e.postTranslation) ? e.postTranslation : null, C = t ? t.warnHtmlMessage : H(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, _ = !!e.escapeParameter;
2531
- const T = t ? t.modifiers : k(e.modifiers) ? e.modifiers : {};
2532
- let O = e.pluralRules || t && t.pluralRules, m;
2533
- m = (() => {
2534
- u && nn(null);
2535
- const f = {
2536
- version: ia,
2537
- locale: c.value,
2538
- fallbackLocale: i.value,
2539
- messages: A.value,
2540
- modifiers: T,
2541
- pluralRules: O,
2542
- missing: D === null ? void 0 : D,
2543
- missingWarn: F,
2544
- fallbackWarn: L,
2545
- fallbackFormat: h,
2546
- unresolving: !0,
2547
- postTranslation: E === null ? void 0 : E,
2548
- warnHtmlMessage: C,
2549
- escapeParameter: _,
2550
- messageResolver: e.messageResolver,
2551
- messageCompiler: e.messageCompiler,
2552
- __meta: { framework: "vue" }
2553
- };
2554
- f.datetimeFormats = g.value, f.numberFormats = N.value, f.__datetimeFormatters = k(m) ? m.__datetimeFormatters : void 0, f.__numberFormatters = k(m) ? m.__numberFormatters : void 0, process.env.NODE_ENV !== "production" && (f.__v_emitter = k(m) ? m.__v_emitter : void 0);
2555
- const p = jr(f);
2556
- return u && nn(p), p;
2557
- })(), ye(m, c.value, i.value);
2558
- function w() {
2559
- return [
2560
- c.value,
2561
- i.value,
2562
- A.value,
2563
- g.value,
2564
- N.value
2565
- ];
2566
- }
2567
- const X = $({
2568
- get: () => c.value,
2569
- set: (f) => {
2570
- m.locale = f, c.value = f;
2571
- }
2572
- }), ne = $({
2573
- get: () => i.value,
2574
- set: (f) => {
2575
- m.fallbackLocale = f, i.value = f, ye(m, c.value, f);
2576
- }
2577
- }), x = $(() => A.value), ge = /* @__PURE__ */ $(() => g.value), ze = /* @__PURE__ */ $(() => N.value);
2578
- function et() {
2579
- return W(E) ? E : null;
2580
- }
2581
- function tt(f) {
2582
- E = f, m.postTranslation = f;
2583
- }
2584
- function nt() {
2585
- return b;
2586
- }
2587
- function ut(f) {
2588
- f !== null && (D = mn(f)), b = f, m.missing = D;
2589
- }
2590
- function rt(f, p) {
2591
- return f !== "translate" || !p.resolvedMessage;
2592
- }
2593
- const ie = (f, p, M, Y, me, Ue) => {
2594
- w();
2595
- let Le;
2596
- try {
2597
- process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, u || (m.fallbackContext = t ? Xr() : void 0), Le = f(m);
2598
- } finally {
2599
- process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, u || (m.fallbackContext = void 0);
2600
- }
2601
- if (M !== "translate exists" && // for not `te` (e.g `t`)
2602
- j(Le) && Le === qe || M === "translate exists" && !Le) {
2603
- const [Ae, tu] = p();
2604
- if (process.env.NODE_ENV !== "production" && t && I(Ae) && rt(M, tu) && (v && (Qe(L, Ae) || Wn(F, Ae)) && le(Xe(oe.FALLBACK_TO_ROOT, {
2605
- key: Ae,
2606
- type: M
2607
- })), process.env.NODE_ENV !== "production")) {
2608
- const { __v_emitter: Vt } = m;
2609
- Vt && v && Vt.emit("fallback", {
2610
- type: M,
2611
- key: Ae,
2612
- to: "global",
2613
- groupId: `${M}:${Ae}`
2614
- });
2615
- }
2616
- return t && v ? Y(t) : me(Ae);
2617
- } else {
2618
- if (Ue(Le))
2619
- return Le;
2620
- throw ke(q.UNEXPECTED_RETURN_TYPE);
2621
- }
2622
- };
2623
- function Ie(...f) {
2624
- return ie((p) => Reflect.apply(fn, null, [p, ...f]), () => gt(...f), "translate", (p) => Reflect.apply(p.t, p, [...f]), (p) => p, (p) => I(p));
2625
- }
2626
- function at(...f) {
2627
- const [p, M, Y] = f;
2628
- if (Y && !B(Y))
2629
- throw ke(q.INVALID_ARGUMENT);
2630
- return Ie(p, M, J({ resolvedMessage: !0 }, Y || {}));
2631
- }
2632
- function st(...f) {
2633
- return ie((p) => Reflect.apply(an, null, [p, ...f]), () => pt(...f), "datetime format", (p) => Reflect.apply(p.d, p, [...f]), () => Ke, (p) => I(p) || K(p));
2634
- }
2635
- function ot(...f) {
2636
- return ie((p) => Reflect.apply(on, null, [p, ...f]), () => Nt(...f), "number format", (p) => Reflect.apply(p.n, p, [...f]), () => Ke, (p) => I(p) || K(p));
2637
- }
2638
- function lt(f) {
2639
- return f.map((p) => I(p) || j(p) || H(p) ? En(String(p)) : p);
2640
- }
2641
- const it = {
2642
- normalize: lt,
2643
- interpolate: (f) => f,
2644
- type: "vnode"
2645
- };
2646
- function Me(...f) {
2647
- return ie((p) => {
2648
- let M;
2649
- const Y = p;
2650
- try {
2651
- Y.processor = it, M = Reflect.apply(fn, null, [Y, ...f]);
2652
- } finally {
2653
- Y.processor = null;
2654
- }
2655
- return M;
2656
- }, () => gt(...f), "translate", (p) => p[Lt](...f), (p) => [En(p)], (p) => K(p));
2657
- }
2658
- function ct(...f) {
2659
- return ie((p) => Reflect.apply(on, null, [p, ...f]), () => Nt(...f), "number format", (p) => p[Ot](...f), Fn, (p) => I(p) || K(p));
2660
- }
2661
- function we(...f) {
2662
- return ie((p) => Reflect.apply(an, null, [p, ...f]), () => pt(...f), "datetime format", (p) => p[Tt](...f), Fn, (p) => I(p) || K(p));
2663
- }
2664
- function Dt(f) {
2665
- O = f, m.pluralRules = O;
2666
- }
2667
- function ft(f, p) {
2668
- return ie(() => {
2669
- if (!f)
2670
- return !1;
2671
- const M = I(p) ? p : c.value, Y = de(M), me = m.messageResolver(Y, f);
2672
- return re(me) || te(me) || I(me);
2673
- }, () => [f], "translate exists", (M) => Reflect.apply(M.te, M, [f, p]), Fa, (M) => H(M));
2674
- }
2675
- function be(f) {
2676
- let p = null;
2677
- const M = Bn(m, i.value, c.value);
2678
- for (let Y = 0; Y < M.length; Y++) {
2679
- const me = A.value[M[Y]] || {}, Ue = m.messageResolver(me, f);
2680
- if (Ue != null) {
2681
- p = Ue;
2682
- break;
2683
- }
2684
- }
2685
- return p;
2686
- }
2687
- function Se(f) {
2688
- const p = be(f);
2689
- return p ?? (t ? t.tm(f) || {} : {});
2690
- }
2691
- function de(f) {
2692
- return A.value[f] || {};
2693
- }
2694
- function ve(f, p) {
2695
- if (a) {
2696
- const M = { [f]: p };
2697
- for (const Y in M)
2698
- ue(M, Y) && Be(M[Y]);
2699
- p = M[f];
2700
- }
2701
- A.value[f] = p, m.messages = A.value;
2702
- }
2703
- function Et(f, p) {
2704
- A.value[f] = A.value[f] || {};
2705
- const M = { [f]: p };
2706
- if (a)
2707
- for (const Y in M)
2708
- ue(M, Y) && Be(M[Y]);
2709
- p = M[f], Ge(p, A.value[f]), m.messages = A.value;
2710
- }
2711
- function s(f) {
2712
- return g.value[f] || {};
2713
- }
2714
- function o(f, p) {
2715
- g.value[f] = p, m.datetimeFormats = g.value, sn(m, f, p);
2716
- }
2717
- function d(f, p) {
2718
- g.value[f] = J(g.value[f] || {}, p), m.datetimeFormats = g.value, sn(m, f, p);
2719
- }
2720
- function S(f) {
2721
- return N.value[f] || {};
2722
- }
2723
- function V(f, p) {
2724
- N.value[f] = p, m.numberFormats = N.value, ln(m, f, p);
2725
- }
2726
- function G(f, p) {
2727
- N.value[f] = J(N.value[f] || {}, p), m.numberFormats = N.value, ln(m, f, p);
2728
- }
2729
- dn++, t && fe && (mt(t.locale, (f) => {
2730
- l && (c.value = f, m.locale = f, ye(m, c.value, i.value));
2731
- }), mt(t.fallbackLocale, (f) => {
2732
- l && (i.value = f, m.fallbackLocale = f, ye(m, c.value, i.value));
2733
- }));
2734
- const R = {
2735
- id: dn,
2736
- locale: X,
2737
- fallbackLocale: ne,
2738
- get inheritLocale() {
2739
- return l;
2740
- },
2741
- set inheritLocale(f) {
2742
- l = f, f && t && (c.value = t.locale.value, i.value = t.fallbackLocale.value, ye(m, c.value, i.value));
2743
- },
2744
- get availableLocales() {
2745
- return Object.keys(A.value).sort();
2746
- },
2747
- messages: x,
2748
- get modifiers() {
2749
- return T;
2750
- },
2751
- get pluralRules() {
2752
- return O || {};
2753
- },
2754
- get isGlobal() {
2755
- return u;
2756
- },
2757
- get missingWarn() {
2758
- return F;
2759
- },
2760
- set missingWarn(f) {
2761
- F = f, m.missingWarn = F;
2762
- },
2763
- get fallbackWarn() {
2764
- return L;
2765
- },
2766
- set fallbackWarn(f) {
2767
- L = f, m.fallbackWarn = L;
2768
- },
2769
- get fallbackRoot() {
2770
- return v;
2771
- },
2772
- set fallbackRoot(f) {
2773
- v = f;
2774
- },
2775
- get fallbackFormat() {
2776
- return h;
2777
- },
2778
- set fallbackFormat(f) {
2779
- h = f, m.fallbackFormat = h;
2780
- },
2781
- get warnHtmlMessage() {
2782
- return C;
2783
- },
2784
- set warnHtmlMessage(f) {
2785
- C = f, m.warnHtmlMessage = f;
2786
- },
2787
- get escapeParameter() {
2788
- return _;
2789
- },
2790
- set escapeParameter(f) {
2791
- _ = f, m.escapeParameter = f;
2792
- },
2793
- t: Ie,
2794
- getLocaleMessage: de,
2795
- setLocaleMessage: ve,
2796
- mergeLocaleMessage: Et,
2797
- getPostTranslationHandler: et,
2798
- setPostTranslationHandler: tt,
2799
- getMissingHandler: nt,
2800
- setMissingHandler: ut,
2801
- [fa]: Dt
2802
- };
2803
- return R.datetimeFormats = ge, R.numberFormats = ze, R.rt = at, R.te = ft, R.tm = Se, R.d = st, R.n = ot, R.getDateTimeFormat = s, R.setDateTimeFormat = o, R.mergeDateTimeFormat = d, R.getNumberFormat = S, R.setNumberFormat = V, R.mergeNumberFormat = G, R[jn] = n, R[Lt] = Me, R[Tt] = we, R[Ot] = ct, process.env.NODE_ENV !== "production" && (R[ht] = (f) => {
2804
- m.__v_emitter = f;
2805
- }, R[It] = () => {
2806
- m.__v_emitter = void 0;
2807
- }), R;
2808
- }
2809
- function An(e, t) {
2810
- }
2811
- const wt = {
2812
- tag: {
2813
- type: [String, Object]
2814
- },
2815
- locale: {
2816
- type: String
2817
- },
2818
- scope: {
2819
- type: String,
2820
- // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050
2821
- validator: (e) => e === "parent" || e === "global",
2822
- default: "parent"
2823
- /* ComponentI18nScope */
2824
- },
2825
- i18n: {
2826
- type: Object
2827
- }
2828
- };
2829
- function Aa({ slots: e }, t) {
2830
- return t.length === 1 && t[0] === "default" ? (e.default ? e.default() : []).reduce((u, a) => [
2831
- ...u,
2832
- // prettier-ignore
2833
- ...a.type === Tn ? a.children : [a]
2834
- ], []) : t.reduce((n, u) => {
2835
- const a = e[u];
2836
- return a && (n[u] = a()), n;
2837
- }, U());
2838
- }
2839
- function Qn() {
2840
- return Tn;
2841
- }
2842
- J({
2843
- keypath: {
2844
- type: String,
2845
- required: !0
2846
- },
2847
- plural: {
2848
- type: [Number, String],
2849
- validator: (e) => j(e) || !isNaN(e)
2850
- }
2851
- }, wt);
2852
- function Ca(e) {
2853
- return K(e) && !I(e[0]);
2854
- }
2855
- function Zn(e, t, n, u) {
2856
- const { slots: a, attrs: r } = t;
2857
- return () => {
2858
- const l = { part: !0 };
2859
- let c = U();
2860
- e.locale && (l.locale = e.locale), I(e.format) ? l.key = e.format : B(e.format) && (I(e.format.key) && (l.key = e.format.key), c = Object.keys(e.format).reduce((F, L) => n.includes(L) ? J(U(), F, { [L]: e.format[L] }) : F, U()));
2861
- const i = u(e.value, l, c);
2862
- let A = [l.key];
2863
- K(i) ? A = i.map((F, L) => {
2864
- const v = a[F.type], h = v ? v({ [F.type]: F.value, index: L, parts: i }) : [F.value];
2865
- return Ca(h) && (h[0].key = `${F.type}-${L}`), h;
2866
- }) : I(i) && (A = [i]);
2867
- const g = J(U(), r), N = I(e.tag) || B(e.tag) ? e.tag : Qn();
2868
- return Ln(N, g, A);
2869
- };
2870
- }
2871
- J({
2872
- value: {
2873
- type: Number,
2874
- required: !0
2875
- },
2876
- format: {
2877
- type: [String, Object]
2878
- }
2879
- }, wt);
2880
- const pa = /* @__PURE__ */ Ee("global-vue-i18n");
2881
- function Ze(e = {}) {
2882
- const t = Mt();
2883
- if (t == null)
2884
- throw ke(q.MUST_BE_CALL_SETUP_TOP);
2885
- if (!t.isCE && t.appContext.app != null && !t.appContext.app.__VUE_I18N_SYMBOL__)
2886
- throw ke(q.NOT_INSTALLED);
2887
- const n = Na(t), u = La(n), a = qn(t), r = ga(e, a);
2888
- if (r === "global")
2889
- return _a(u, e, a), u;
2890
- if (r === "parent") {
2891
- let i = Ta(n, t, e.__useComponent);
2892
- return i == null && (process.env.NODE_ENV !== "production" && le(Xe(oe.NOT_FOUND_PARENT_SCOPE)), i = u), i;
2893
- }
2894
- const l = n;
2895
- let c = l.__getInstance(t);
2896
- if (c == null) {
2897
- const i = J({}, e);
2898
- "__i18n" in a && (i.__i18n = a.__i18n), u && (i.__root = u), c = ma(i), l.__composerExtend && (c[bt] = l.__composerExtend(c)), ha(l, t, c), l.__setInstance(t, c);
2899
- } else
2900
- process.env.NODE_ENV !== "production" && r === "local" && le(Xe(oe.DUPLICATE_USE_I18N_CALLING));
2901
- return c;
2902
- }
2903
- function Na(e) {
2904
- const t = ru(e.isCE ? pa : e.appContext.app.__VUE_I18N_SYMBOL__);
2905
- if (!t)
2906
- throw ke(e.isCE ? q.NOT_INSTALLED_WITH_PROVIDE : q.UNEXPECTED_ERROR);
2907
- return t;
2908
- }
2909
- function ga(e, t) {
2910
- return Je(e) ? "__i18n" in t ? "local" : "global" : e.useScope ? e.useScope : "local";
2911
- }
2912
- function La(e) {
2913
- return e.mode === "composition" ? e.global : e.global.__composer;
2914
- }
2915
- function Ta(e, t, n = !1) {
2916
- let u = null;
2917
- const a = t.root;
2918
- let r = Oa(t, n);
2919
- for (; r != null; ) {
2920
- const l = e;
2921
- if (e.mode === "composition")
2922
- u = l.__getInstance(r);
2923
- else if (__VUE_I18N_LEGACY_API__) {
2924
- const c = l.__getInstance(r);
2925
- c != null && (u = c.__composer, n && u && !u[jn] && (u = null));
2926
- }
2927
- if (u != null || a === r)
2928
- break;
2929
- r = r.parent;
2930
- }
2931
- return u;
2932
- }
2933
- function Oa(e, t = !1) {
2934
- return e == null ? null : t && e.vnode.ctx || e.parent;
2935
- }
2936
- function ha(e, t, n) {
2937
- let u = null;
2938
- pn(() => {
2939
- if (process.env.NODE_ENV !== "production" || __VUE_PROD_DEVTOOLS__) {
2940
- t.__VUE_I18N__ = n, u = Pu();
2941
- const a = n;
2942
- a[ht] && a[ht](u), u.on("*", An);
2943
- }
2944
- }, t), gn(() => {
2945
- const a = n;
2946
- (process.env.NODE_ENV !== "production" || __VUE_PROD_DEVTOOLS__) && (u && u.off("*", An), a[It] && a[It](), delete t.__VUE_I18N__), e.__deleteInstance(t);
2947
- const r = a[bt];
2948
- r && (r(), delete a[bt]);
2949
- }, t);
2950
- }
2951
- J({
2952
- value: {
2953
- type: [Number, Date],
2954
- required: !0
2955
- },
2956
- format: {
2957
- type: [String, Object]
2958
- }
2959
- }, wt);
2960
- ca();
2961
- xr(pr);
2962
- Gr(wr);
2963
- Yr(Bn);
2964
- if (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
2965
- const e = Ce();
2966
- e.__INTLIFY__ = !0, Nr(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
2967
- }
2968
- process.env.NODE_ENV;
2969
- const Va = () => {
2970
- const { t: e, locale: t } = Ze(), n = lu(), u = $(() => t.value === "zh"), a = $(() => t.value === "en");
2971
- return mt(
2972
- () => t.value,
2973
- (l) => {
2974
- Eu && (document.documentElement.lang = l, localStorage.setItem("locale", l));
2975
- },
2976
- {
2977
- immediate: !0
2978
- }
2979
- ), {
2980
- t: e,
2981
- $t: e,
2982
- locale: t,
2983
- isZh: u,
2984
- isEn: a,
2985
- changeLocale: async (l) => {
2986
- var i;
2987
- const c = _u(l) ? u.value ? "en" : "zh" : l;
2988
- t.value !== c && (t.value = c, await Nn(), (i = n == null ? void 0 : n.proxy) != null && i.$forceUpdate && n.proxy.$forceUpdate());
2989
- }
2990
- };
2991
- }, Ia = `
2992
- [警告] useTheme 缺少参数 storageKey 和 cookieDomain,解决方法:
2993
- 1. 在项目入口处调用 initTheme 初始化主题,后续调用 useTheme 不必再传值;
2994
- 2. 调用 useTheme 时传入 storageKey 和 cookieDomain 参数
2995
- `.trim();
2996
- let zn, eu;
2997
- function $a(e, t) {
2998
- zn = e, eu = t;
2999
- const { isDark: n } = ba();
3000
- n.value && (document.documentElement.getAttribute("data-o-theme") !== "dark" && document.documentElement.setAttribute("data-o-theme", "dark"), document.documentElement.classList.contains("dark") || document.documentElement.classList.add("dark"));
3001
- }
3002
- function ba(e, t) {
3003
- const n = e || zn, u = t || eu;
3004
- let a;
3005
- typeof window < "u" && n && (a = xt.get(n));
3006
- const r = Fu({
3007
- // 初始值,优先从 Cookie 中获取用户偏好设置
3008
- initialValue: a,
3009
- // 存储键名,用于 localStorage 持久化
3010
- storageKey: n || null,
3011
- // HTML 属性名,会添加到 html 元素上标识当前主题
3012
- attribute: "data-o-theme",
3013
- // 定义支持的主题模式映射
3014
- modes: {
3015
- light: "light",
3016
- dark: "dark"
3017
- }
3018
- }), l = $(() => r.value), c = $(() => r.value === "light"), i = $(() => r.value === "dark"), A = (N) => {
3019
- const F = N === "dark" ? "dark" : "light";
3020
- n && u ? xt.set(n, F, { domain: u }) : console.warn(Ia), r.value = F, typeof window < "u" && (F === "dark" ? document.documentElement.classList.add("dark") : (document.documentElement.classList.remove("dark"), document.documentElement.classList.length === 0 && document.documentElement.removeAttribute("class")));
3021
- };
3022
- return {
3023
- theme: l,
3024
- isLight: c,
3025
- isDark: i,
3026
- setTheme: A,
3027
- toggleTheme: () => {
3028
- A(l.value === "light" ? "dark" : "light");
3029
- }
3030
- };
3031
- }
3032
- async function Wa(e) {
3033
- try {
3034
- return navigator.clipboard ? (await navigator.clipboard.writeText(e), !0) : Sa(e);
3035
- } catch {
3036
- return !1;
3037
- }
3038
- }
3039
- function Sa(e) {
3040
- const t = document.createElement("textarea");
3041
- t.value = e, t.style.top = "0", t.style.left = "0", t.style.width = "1px", t.style.height = "1px", t.style.position = "fixed", t.style.opacity = "0", document.body.appendChild(t), t.focus(), t.select();
3042
- try {
3043
- const n = document.execCommand("copy");
3044
- return document.body.removeChild(t), n;
3045
- } catch {
3046
- return document.body.removeChild(t), !1;
3047
- }
389
+ function Iu(D, u) {
390
+ L(D, u);
3048
391
  }
3049
392
  export {
3050
- Ve as ScreenConfig,
3051
- Cu as Size,
3052
- $a as initTheme,
3053
- Wa as useClipboard,
3054
- Va as useLocale,
3055
- wa as useMdRender,
3056
- Ua as useScreen,
3057
- ba as useTheme
393
+ v as ScreenConfig,
394
+ iu as Size,
395
+ ku as createTheme,
396
+ Iu as useAnalytics,
397
+ Tu as useClipboard,
398
+ Pu as useElementEventAnalytics,
399
+ bu as useLocale,
400
+ xu as useMdRender,
401
+ _u as useScreen,
402
+ Lu as useTheme,
403
+ Ru as useWatchAnalytics
3058
404
  };