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

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.
@@ -0,0 +1,65 @@
1
+ import { Ref } from 'vue';
2
+ /**
3
+ * 登录状态枚举
4
+ */
5
+ export declare enum LOGIN_STATUS {
6
+ FAILED = -1,// 登录失败
7
+ NOT = 0,// 未登录
8
+ DOING = 1,// 登录中
9
+ DONE = 2
10
+ }
11
+ /**
12
+ * 设置 CSRF Token 的 Cookie 键名
13
+ * @param key - Cookie 键名,默认为 '_U_T_'
14
+ */
15
+ export declare const setLoginKeys: (key: string) => void;
16
+ /**
17
+ * 获取当前存储的登录凭证
18
+ * @returns 包含 csrfCookie 的对象
19
+ */
20
+ export declare const getUserAuth: () => {
21
+ csrfCookie: string | undefined;
22
+ };
23
+ /**
24
+ * 清除存储的登录凭证
25
+ */
26
+ export declare const clearUserAuth: () => void;
27
+ /**
28
+ * 跳转到登录页面
29
+ * @param loginUrl - 登录页面的 URL
30
+ */
31
+ export declare const doLogin: (loginUrl: string) => void;
32
+ /**
33
+ * 设置登录状态到 store
34
+ * @param status - 登录状态值
35
+ */
36
+ export declare const setStatus: (status: LOGIN_STATUS) => void;
37
+ /**
38
+ * 尝试自动登录并获取用户信息
39
+ * @param getUserInfo - 获取用户信息的异步函数
40
+ * @param noPrivacy - 是否跳过隐私检查,默认为 false
41
+ * @returns 用户信息或 undefined
42
+ */
43
+ export declare const tryLogin: (getUserInfo: () => Promise<{
44
+ data?: any;
45
+ }>, noPrivacy?: boolean) => Promise<any>;
46
+ /**
47
+ * 执行退出登录操作
48
+ * @param logoutUrl - 退出登录后要跳转的 URL
49
+ */
50
+ export declare const doLogout: (logoutUrl: string) => void;
51
+ /**
52
+ * 监听路由变化,自动处理登录状态
53
+ * @param guardList - 需要登录的路由路径数组
54
+ * @param getUserInfo - 获取用户信息的异步函数
55
+ * @param userInfo - 用户信息的响应式引用
56
+ * @param noPrivacy - 是否跳过隐私检查,默认为 false
57
+ *
58
+ * 行为说明:
59
+ * - 监听立即生效(immediate: true)
60
+ * - 若目标路由在 guardList 中,等待 tryLogin 完成后再进入
61
+ * - 其他路由直接进入,同时在后台执行 tryLogin
62
+ */
63
+ export declare const useLoginWatcher: (guardList: string[], getUserInfo: () => Promise<{
64
+ data?: any;
65
+ }>, userInfo: Ref<any>, route: any, noPrivacy?: boolean) => void;
package/dist/index.d.ts CHANGED
@@ -4,3 +4,4 @@ export * from './core/useLocale';
4
4
  export * from './core/useTheme';
5
5
  export * from './core/useClipboard';
6
6
  export * from './analytics/useAnalytics';
7
+ export * from './core/useLogin';
package/dist/index.js CHANGED
@@ -1,404 +1,810 @@
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();
1
+ var ju = Object.defineProperty;
2
+ var Iu = (u, e, D) => e in u ? ju(u, e, { enumerable: !0, configurable: !0, writable: !0, value: D }) : u[e] = D;
3
+ var $ = (u, e, D) => Iu(u, typeof e != "symbol" ? e + "" : e, D);
4
+ import { onBeforeUnmount as _u, reactive as gu, ref as X, computed as B, onMounted as vu, nextTick as G, onUnmounted as yu, getCurrentInstance as bu, watch as uu, inject as O, isRef as T, unref as Nu, provide as $u, hasInjectionContext as ou, markRaw as H, effectScope as Hu, isReactive as cu, toRef as tu, toRaw as Uu, getCurrentScope as Ku, onScopeDispose as Wu, toRefs as Eu } from "vue";
5
+ import Mu from "markdown-it-async";
6
+ import zu from "markdown-it-anchor";
7
+ import { bundledLanguages as Yu, bundledThemes as lu, createHighlighter as qu } from "shiki";
8
+ import { useI18n as Gu } from "vue-i18n";
9
+ import { isClient as Ju, isUndefined as Qu } from "@opensig/opendesign";
10
+ import J from "js-cookie";
11
+ const Zu = new Set(Object.keys(Yu));
12
+ async function _e(u = {}) {
13
+ const { anchor: e = !0, anchorType: D = "vitepress", copy: t = !0, wrapMarkdownBodyDiv: n = !0, theme: s = {}, ...r } = u, c = typeof (s == null ? void 0 : s.light) == "string" && s.light in lu ? s.light : "light-plus", l = typeof (s == null ? void 0 : s.dark) == "string" && s.dark in lu ? s.dark : "dark-plus", E = /* @__PURE__ */ new Set(["text"]);
14
+ _u(() => {
15
+ a && a.dispose();
16
16
  });
17
- const i = await nu({
18
- themes: [E, A],
17
+ const a = await qu({
18
+ themes: [c, l],
19
19
  langs: ["text"]
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,
20
+ }), C = Mu({
21
+ async highlight(f, A) {
22
+ return Zu.has(A) || (A = "text"), E.has(A) || (await a.loadLanguage(A), E.add(A)), a.codeToHtml(f, {
23
+ lang: A,
24
24
  themes: {
25
- light: E,
26
- dark: A
25
+ light: c,
26
+ dark: l
27
27
  }
28
28
  });
29
29
  },
30
- ...C
30
+ ...r
31
31
  });
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>";
32
+ if (e && C.use(zu, {
33
+ slugify: (f) => D === "github" ? Xu(f) : ue(f)
34
+ }), t) {
35
+ const f = C.renderer.rules.fence;
36
+ C.renderer.rules.fence = (...A) => {
37
+ var g;
38
+ const [p, m] = A, h = p[m], _ = C.utils.escapeHtml(h.content || "");
39
+ return `<div class="language-${((g = h.info) == null ? void 0 : g.trim()) || ""}"><div class="copy" data-clipboard-text="${_}"></div>` + f(...A) + "</div>";
40
40
  };
41
41
  }
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>`;
42
+ if (n) {
43
+ const f = C.render;
44
+ C.render = (p, m) => `<div class="markdown-body">${f.call(C, p, m)}</div>`;
45
+ const A = C.renderInline;
46
+ C.renderInline = (p, m) => `<div class="markdown-body">${A.call(C, p, m)}</div>`;
47
47
  }
48
48
  return {
49
- shiki: i,
50
- markdwon: s
49
+ shiki: a,
50
+ markdwon: C
51
51
  };
52
52
  }
53
- function ru(D) {
54
- const u = (
53
+ function Xu(u) {
54
+ const e = (
55
55
  // eslint-disable-next-line no-useless-escape,no-control-regex,no-misleading-character-class
56
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-\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uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g
57
57
  );
58
- return `user-content-${D.toLowerCase().replace(u, "").replace(/ /g, "-")}`;
58
+ return `user-content-${u.toLowerCase().replace(e, "").replace(/ /g, "-")}`;
59
59
  }
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();
60
+ function ue(u) {
61
+ return u.normalize("NFKD").replace(/[\u0300-\u036F]/g, "").replace(/[\u0000-\u001f]/g, "").replace(/[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'“”‘’<>,.?/]+/g, "-").replace(/-{2,}/g, "-").replace(/^-+|-+$/g, "").replace(/^(\d)/, "_$1").toLowerCase();
62
62
  }
63
- var iu = /* @__PURE__ */ ((D) => (D.Phone = "phone", D.PadV = "pad_v", D.PadH = "pad_h", D.Laptop = "laptop", D))(iu || {});
64
- const v = {
63
+ var ee = /* @__PURE__ */ ((u) => (u.Phone = "phone", u.PadV = "pad_v", u.PadH = "pad_h", u.Laptop = "laptop", u))(ee || {});
64
+ const z = {
65
65
  phone: 600,
66
66
  pad_v: 840,
67
67
  pad_h: 1200,
68
68
  laptop: 1440
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({
69
+ }, te = {
70
+ lt: (u, e) => u < e,
71
+ le: (u, e) => u <= e,
72
+ eq: (u, e) => u === e,
73
+ ne: (u, e) => u !== e,
74
+ ge: (u, e) => u >= e,
75
+ gt: (u, e) => u > e
76
+ }, ge = () => {
77
+ const u = gu({
78
78
  width: 1440,
79
79
  height: 0
80
- }), u = H(
80
+ }), e = X(
81
81
  "laptop"
82
82
  /* Laptop */
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(
83
+ ), D = (N) => (typeof N > "u" && (N = u.width), N < z.phone ? "phone" : N < z.pad_v ? "pad_v" : N < z.pad_h ? "pad_h" : "laptop"), t = (N = "eq", V) => {
84
+ const S = u.width, M = z[V], i = te[N];
85
+ return i(S, M);
86
+ }, n = B(() => t(
87
87
  "le",
88
88
  "phone"
89
89
  /* Phone */
90
- )), n = o(() => F(
90
+ )), s = B(() => t(
91
91
  "gt",
92
92
  "phone"
93
93
  /* Phone */
94
- )), C = o(() => F(
94
+ )), r = B(() => t(
95
95
  "gt",
96
96
  "phone"
97
97
  /* Phone */
98
- ) && F(
98
+ ) && t(
99
99
  "le",
100
100
  "pad_h"
101
101
  /* PadH */
102
- )), E = o(() => F(
102
+ )), c = B(() => t(
103
103
  "le",
104
104
  "pad_h"
105
105
  /* PadH */
106
- )), A = o(() => F(
106
+ )), l = B(() => t(
107
107
  "gt",
108
108
  "pad_h"
109
109
  /* PadH */
110
- )), B = o(() => F(
110
+ )), E = B(() => t(
111
111
  "gt",
112
112
  "phone"
113
113
  /* Phone */
114
- ) && F(
114
+ ) && t(
115
115
  "le",
116
116
  "pad_v"
117
117
  /* PadV */
118
- )), i = o(() => F(
118
+ )), a = B(() => t(
119
119
  "le",
120
120
  "pad_v"
121
121
  /* PadV */
122
- )), s = o(() => F(
122
+ )), C = B(() => t(
123
123
  "gt",
124
124
  "pad_v"
125
125
  /* PadV */
126
- )), a = o(() => F(
126
+ )), f = B(() => t(
127
127
  "gt",
128
128
  "pad_v"
129
129
  /* PadV */
130
- ) && F(
130
+ ) && t(
131
131
  "le",
132
132
  "pad_h"
133
133
  /* PadH */
134
- )), r = o(() => F(
134
+ )), A = B(() => t(
135
135
  "gt",
136
136
  "pad_h"
137
137
  /* PadH */
138
- ) && F(
138
+ ) && t(
139
139
  "le",
140
140
  "laptop"
141
141
  /* Laptop */
142
- )), l = o(() => F(
142
+ )), p = B(() => t(
143
143
  "le",
144
144
  "laptop"
145
145
  /* Laptop */
146
- )), m = o(() => F(
146
+ )), m = B(() => t(
147
147
  "gt",
148
148
  "laptop"
149
149
  /* Laptop */
150
- )), c = o(() => F(
150
+ )), h = B(() => t(
151
151
  "gt",
152
152
  "phone"
153
153
  /* Phone */
154
- ) && F(
154
+ ) && t(
155
155
  "le",
156
156
  "laptop"
157
157
  /* Laptop */
158
- )), f = o(() => F(
158
+ )), _ = B(() => t(
159
159
  "gt",
160
160
  "pad_v"
161
161
  /* PadV */
162
- ) && F(
162
+ ) && t(
163
163
  "le",
164
164
  "laptop"
165
165
  /* Laptop */
166
- )), d = () => {
167
- const { innerWidth: p, innerHeight: b } = window;
168
- D.width = p, D.height = b, u.value = e();
166
+ )), g = () => {
167
+ const { innerWidth: N, innerHeight: V } = window;
168
+ u.width = N, u.height = V, e.value = D();
169
169
  };
170
- return O(() => {
171
- typeof window < "u" && (window.addEventListener("resize", d), d(), V(() => d()));
172
- }), K(() => {
173
- typeof window < "u" && window.removeEventListener("resize", d);
170
+ return vu(() => {
171
+ typeof window < "u" && (window.addEventListener("resize", g), g(), G(() => g()));
172
+ }), yu(() => {
173
+ typeof window < "u" && window.removeEventListener("resize", g);
174
174
  }), {
175
175
  // 获取屏幕宽度分级
176
- getSize: e,
176
+ getSize: D,
177
177
  // 当前屏幕分级
178
- current: u,
178
+ current: e,
179
179
  // 当前屏幕宽度
180
- size: D,
181
- isPhone: t,
180
+ size: u,
181
+ isPhone: n,
182
182
  // [0, 600]
183
- gtPhone: n,
183
+ gtPhone: s,
184
184
  // [601, -]
185
- isPad: C,
185
+ isPad: r,
186
186
  // [601, 1200]
187
- lePad: E,
187
+ lePad: c,
188
188
  // [0, 1200]
189
- gtPad: A,
189
+ gtPad: l,
190
190
  // [1201, -]
191
- isPadV: B,
191
+ isPadV: E,
192
192
  // [601, 840]
193
- lePadV: i,
193
+ lePadV: a,
194
194
  // [0, 840]
195
- gtPadV: s,
195
+ gtPadV: C,
196
196
  // [841, -]
197
- isPadH: a,
197
+ isPadH: f,
198
198
  // [841, 1200]
199
- isLaptop: r,
199
+ isLaptop: A,
200
200
  // [1201, 1440]
201
- leLaptop: l,
201
+ leLaptop: p,
202
202
  // [0, 1440]
203
203
  gtLaptop: m,
204
204
  // [1441, -]
205
- isPadToLaptop: c,
205
+ isPadToLaptop: h,
206
206
  // [601, 1440]
207
- isPadVToLaptop: f
207
+ isPadVToLaptop: _
208
208
  // [841, 1440]
209
209
  };
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));
210
+ }, ve = () => {
211
+ const { t: u, locale: e } = Gu(), D = bu(), t = B(() => e.value === "zh"), n = B(() => e.value === "en");
212
+ return uu(
213
+ () => e.value,
214
+ (r) => {
215
+ Ju && (document.documentElement.lang = r, localStorage.setItem("locale", r));
216
216
  },
217
217
  {
218
218
  immediate: !0
219
219
  }
220
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());
221
+ t: u,
222
+ $t: u,
223
+ locale: e,
224
+ isZh: t,
225
+ isEn: n,
226
+ changeLocale: async (r) => {
227
+ var l;
228
+ const c = Qu(r) ? t.value ? "en" : "zh" : r;
229
+ e.value !== c && (e.value = c, await G(), (l = D == null ? void 0 : D.proxy) != null && l.$forceUpdate && D.proxy.$forceUpdate());
230
230
  }
231
231
  };
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) {
232
+ }, De = "[警告] 请在项目中注入主题配置项:app.use(createTheme(options))", ne = "[警告] 缺少参数 cookieKey 和 cookieDomain,请在 createTheme 传入 cookieKey 和 cookieDomain 参数", Ou = Symbol("theme"), wu = Symbol("isLight"), Vu = Symbol("isDark"), Lu = Symbol("setTheme"), Pu = Symbol("toggleTheme");
233
+ function ye(u) {
234
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)));
235
+ cookieKey: e,
236
+ cookieDomain: D,
237
+ lightValue: t = "light",
238
+ darkValue: n = "dark",
239
+ attribute: s = "data-o-theme",
240
+ attributeLightValue: r = t,
241
+ attributeDarkValue: c = n,
242
+ classLightValue: l = t,
243
+ classDarkValue: E = n
244
+ } = u || {}, a = X(t), C = B(() => a.value === t), f = B(() => a.value === n), A = B(() => a.value), p = (h, _ = !0) => {
245
+ const g = h === n ? n : t;
246
+ a.value = g, !(typeof window > "u") && (g === n ? (document.documentElement.setAttribute(s, c), document.documentElement.classList.add(E), document.documentElement.classList.remove(l)) : (document.documentElement.setAttribute(s, r), document.documentElement.classList.add(l), document.documentElement.classList.remove(E)), _ && (e && D ? J.set(e, g, { domain: D }) : console.warn(ne)));
247
247
  }, m = () => {
248
- l(r.value === t ? F : t);
248
+ p(A.value === n ? t : n);
249
249
  };
250
250
  return {
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")
251
+ install(h) {
252
+ if (h.provide(Ou, A), h.provide(wu, C), h.provide(Vu, f), h.provide(Lu, p), h.provide(Pu, m), typeof window > "u")
253
253
  return;
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);
254
+ let _;
255
+ e && (_ = J.get(e)), _ || (_ = window.matchMedia("(prefers-color-scheme: dark)").matches ? n : t), p(_ === n ? n : t, !1);
256
256
  }
257
257
  };
258
258
  }
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)
259
+ function be() {
260
+ const u = O(Ou);
261
+ return u || console.warn(De), {
262
+ theme: u,
263
+ isLight: O(wu),
264
+ isDark: O(Vu),
265
+ setTheme: O(Lu),
266
+ toggleTheme: O(Pu)
267
267
  };
268
268
  }
269
- async function Tu(D) {
269
+ async function Ne(u) {
270
270
  try {
271
- return navigator.clipboard ? (await navigator.clipboard.writeText(D), !0) : lu(D);
271
+ return navigator.clipboard ? (await navigator.clipboard.writeText(u), !0) : oe(u);
272
272
  } catch {
273
273
  return !1;
274
274
  }
275
275
  }
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();
276
+ function oe(u) {
277
+ const e = document.createElement("textarea");
278
+ e.value = u, e.style.top = "0", e.style.left = "0", e.style.width = "1px", e.style.height = "1px", e.style.position = "fixed", e.style.opacity = "0", document.body.appendChild(e), e.focus(), e.select();
279
279
  try {
280
- const e = document.execCommand("copy");
281
- return document.body.removeChild(u), e;
280
+ const D = document.execCommand("copy");
281
+ return document.body.removeChild(e), D;
282
282
  } catch {
283
- return document.body.removeChild(u), !1;
283
+ return document.body.removeChild(e), !1;
284
284
  }
285
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;
286
+ class W {
287
+ constructor(e) {
288
+ $(this, "prev", null);
289
+ $(this, "next", null);
290
+ $(this, "data", null);
291
+ this.data = e;
292
292
  }
293
293
  removeSelf() {
294
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
295
  }
296
296
  }
297
- class du {
297
+ class Fe {
298
298
  constructor() {
299
- y(this, "dummyHead", new g(null));
299
+ $(this, "dummyHead", new W(null));
300
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;
301
+ shift(e) {
302
+ const D = new W(e), t = this.dummyHead.next;
303
+ return D.prev = this.dummyHead, this.dummyHead.next = D, t && (D.next = t, t.prev = D), D;
304
304
  }
305
- remove(u) {
306
- u.removeSelf();
305
+ remove(e) {
306
+ e.removeSelf();
307
307
  }
308
308
  clear() {
309
- let u = this.dummyHead.next;
310
- for (; u; ) {
311
- const e = u.next;
312
- u.removeSelf(), u = e;
309
+ let e = this.dummyHead.next;
310
+ for (; e; ) {
311
+ const D = e.next;
312
+ e.removeSelf(), e = D;
313
313
  }
314
314
  this.dummyHead.next = null;
315
315
  }
316
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,
317
+ const Cu = Symbol(), Y = Symbol(), Q = async (u, ...e) => typeof u == "function" ? await u(...e) : Nu(u), q = (u) => typeof u == "object" && u !== null, Du = (u) => typeof u.event == "string" && q(u.properties);
318
+ function iu(u, e) {
319
+ let D, t;
320
+ if (e != null && e.catchBubble)
321
+ D = new Fe(), t = D.shift(async (n) => {
322
+ var s, r;
323
+ if (q(n))
324
+ if (n[Y]) {
325
+ const c = await Q(u);
326
+ if (!Du(c)) return;
327
+ delete n[Y];
328
+ const l = {
329
+ ...c,
330
330
  properties: {
331
- ...E.properties,
332
- ...t
331
+ ...c.properties,
332
+ ...n
333
333
  }
334
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
335
+ (s = window.__OA_REPORT__) == null || s.call(window, l.event, l.properties);
336
+ } else Du(n) && ((r = window.__OA_REPORT__) == null || r.call(window, n.event, n.properties));
337
+ }), $u((e == null ? void 0 : e.key) ?? Cu, D);
338
+ else if (e != null && e.bubble) {
339
+ if (D = O((e == null ? void 0 : e.key) ?? Cu), !D) return;
340
+ t = D.shift(async (n) => {
341
+ var s, r, c, l;
342
+ if (q(n))
343
+ if (n[Y]) {
344
+ const E = await Q(u);
345
+ if (!q(E)) return;
346
+ const a = {
347
+ ...E,
348
+ ...n
349
349
  };
350
- (C = (n = F.next) == null ? void 0 : n.data) == null || C.call(n, i);
350
+ (r = (s = t.next) == null ? void 0 : s.data) == null || r.call(s, a);
351
351
  } else
352
- (A = (E = F.next) == null ? void 0 : E.data) == null || A.call(E, { ...t, [w]: !0 });
352
+ (l = (c = t.next) == null ? void 0 : c.data) == null || l.call(c, { ...n, [Y]: !0 });
353
353
  });
354
354
  } else
355
- F = (t) => {
356
- var n;
357
- k(t) && ((n = window.__OA_REPORT__) == null || n.call(window, t.event, t.properties));
355
+ t = (n) => {
356
+ var s;
357
+ Du(n) && ((s = window.__OA_REPORT__) == null || s.call(window, n.event, n.properties));
358
358
  };
359
- return K(() => {
360
- e = null, F instanceof g && F.removeSelf(), F = null;
361
- }), F;
359
+ return yu(() => {
360
+ D = null, t instanceof W && t.removeSelf(), t = null;
361
+ }), t;
362
+ }
363
+ function Oe(u, e, D) {
364
+ if (!T(u) && typeof u != "function") return;
365
+ const t = iu(e, D);
366
+ uu(u, async (n, s) => {
367
+ var c;
368
+ const r = await Q(e, n, s);
369
+ t instanceof W ? (c = t.data) == null || c.call(t, r) : typeof t == "function" && t(r);
370
+ });
362
371
  }
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) => {
372
+ const Au = /* @__PURE__ */ new WeakSet();
373
+ function we(u, e, D, t) {
374
+ const n = B(() => Nu(u)), s = iu(D, { ...t, key: e }), r = async (c) => {
367
375
  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);
376
+ if (t != null && t.bubble && Au.has(c)) return;
377
+ Au.add(c);
378
+ const l = await Q(D, c);
379
+ typeof l == "object" && l !== null && (s instanceof W ? (E = s.data) == null || E.call(s, l) : typeof s == "function" && s(l));
380
+ };
381
+ vu(() => {
382
+ var c;
383
+ return (c = n.value) == null ? void 0 : c.addEventListener(e, r);
384
+ }), _u(() => {
385
+ var c;
386
+ return (c = n.value) == null ? void 0 : c.removeEventListener(e, r);
370
387
  });
371
388
  }
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));
389
+ function Ve(u, e) {
390
+ iu(u, e);
391
+ }
392
+ /*!
393
+ * pinia v3.0.4
394
+ * (c) 2025 Eduardo San Martin Morote
395
+ * @license MIT
396
+ */
397
+ const R = typeof window < "u";
398
+ let L;
399
+ const Z = (u) => L = u;
400
+ process.env.NODE_ENV;
401
+ const Fu = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
402
+ /* istanbul ignore next */
403
+ Symbol()
404
+ );
405
+ function P(u) {
406
+ return u && typeof u == "object" && Object.prototype.toString.call(u) === "[object Object]" && typeof u.toJSON != "function";
407
+ }
408
+ var K;
409
+ (function(u) {
410
+ u.direct = "direct", u.patchObject = "patch object", u.patchFunction = "patch function";
411
+ })(K || (K = {}));
412
+ function Su(u, e) {
413
+ for (const D in e) {
414
+ const t = e[D];
415
+ if (!(D in u))
416
+ continue;
417
+ const n = u[D];
418
+ P(n) && P(t) && !T(t) && !cu(t) ? u[D] = Su(n, t) : u[D] = t;
419
+ }
420
+ return u;
421
+ }
422
+ const xu = () => {
423
+ };
424
+ function du(u, e, D, t = xu) {
425
+ u.add(e);
426
+ const n = () => {
427
+ u.delete(e) && t();
380
428
  };
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);
429
+ return !D && Ku() && Wu(n), n;
430
+ }
431
+ function x(u, ...e) {
432
+ u.forEach((D) => {
433
+ D(...e);
387
434
  });
388
435
  }
389
- function Iu(D, u) {
390
- L(D, u);
436
+ const se = (u) => u(), fu = Symbol(), nu = Symbol();
437
+ function su(u, e) {
438
+ u instanceof Map && e instanceof Map ? e.forEach((D, t) => u.set(t, D)) : u instanceof Set && e instanceof Set && e.forEach(u.add, u);
439
+ for (const D in e) {
440
+ if (!e.hasOwnProperty(D))
441
+ continue;
442
+ const t = e[D], n = u[D];
443
+ P(n) && P(t) && u.hasOwnProperty(D) && !T(t) && !cu(t) ? u[D] = su(n, t) : u[D] = t;
444
+ }
445
+ return u;
446
+ }
447
+ const re = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
448
+ /* istanbul ignore next */
449
+ Symbol()
450
+ );
451
+ function ce(u) {
452
+ return !P(u) || !Object.prototype.hasOwnProperty.call(u, re);
453
+ }
454
+ const { assign: b } = Object;
455
+ function Bu(u) {
456
+ return !!(T(u) && u.effect);
457
+ }
458
+ function pu(u, e, D, t) {
459
+ const { state: n, actions: s, getters: r } = e, c = D.state.value[u];
460
+ let l;
461
+ function E() {
462
+ !c && (process.env.NODE_ENV === "production" || !t) && (D.state.value[u] = n ? n() : {});
463
+ const a = process.env.NODE_ENV !== "production" && t ? (
464
+ // use ref() to unwrap refs inside state TODO: check if this is still necessary
465
+ Eu(X(n ? n() : {}).value)
466
+ ) : Eu(D.state.value[u]);
467
+ return b(a, s, Object.keys(r || {}).reduce((C, f) => (process.env.NODE_ENV !== "production" && f in a && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${f}" in store "${u}".`), C[f] = H(B(() => {
468
+ Z(D);
469
+ const A = D._s.get(u);
470
+ return r[f].call(A, A);
471
+ })), C), {}));
472
+ }
473
+ return l = ru(u, E, e, D, t, !0), l;
474
+ }
475
+ function ru(u, e, D = {}, t, n, s) {
476
+ let r;
477
+ const c = b({ actions: {} }, D);
478
+ if (process.env.NODE_ENV !== "production" && !t._e.active)
479
+ throw new Error("Pinia destroyed");
480
+ const l = { deep: !0 };
481
+ process.env.NODE_ENV !== "production" && (l.onTrigger = (F) => {
482
+ E ? A = F : E == !1 && !i._hotUpdating && (Array.isArray(A) ? A.push(F) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
483
+ });
484
+ let E, a, C = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set(), A;
485
+ const p = t.state.value[u];
486
+ !s && !p && (process.env.NODE_ENV === "production" || !n) && (t.state.value[u] = {});
487
+ const m = X({});
488
+ let h;
489
+ function _(F) {
490
+ let o;
491
+ E = a = !1, process.env.NODE_ENV !== "production" && (A = []), typeof F == "function" ? (F(t.state.value[u]), o = {
492
+ type: K.patchFunction,
493
+ storeId: u,
494
+ events: A
495
+ }) : (su(t.state.value[u], F), o = {
496
+ type: K.patchObject,
497
+ payload: F,
498
+ storeId: u,
499
+ events: A
500
+ });
501
+ const d = h = Symbol();
502
+ G().then(() => {
503
+ h === d && (E = !0);
504
+ }), a = !0, x(C, o, t.state.value[u]);
505
+ }
506
+ const g = s ? function() {
507
+ const { state: o } = D, d = o ? o() : {};
508
+ this.$patch((v) => {
509
+ b(v, d);
510
+ });
511
+ } : (
512
+ /* istanbul ignore next */
513
+ process.env.NODE_ENV !== "production" ? () => {
514
+ throw new Error(`🍍: Store "${u}" is built using the setup syntax and does not implement $reset().`);
515
+ } : xu
516
+ );
517
+ function N() {
518
+ r.stop(), C.clear(), f.clear(), t._s.delete(u);
519
+ }
520
+ const V = (F, o = "") => {
521
+ if (fu in F)
522
+ return F[nu] = o, F;
523
+ const d = function() {
524
+ Z(t);
525
+ const v = Array.from(arguments), j = /* @__PURE__ */ new Set(), eu = /* @__PURE__ */ new Set();
526
+ function Ru(y) {
527
+ j.add(y);
528
+ }
529
+ function Tu(y) {
530
+ eu.add(y);
531
+ }
532
+ x(f, {
533
+ args: v,
534
+ name: d[nu],
535
+ store: i,
536
+ after: Ru,
537
+ onError: Tu
538
+ });
539
+ let I;
540
+ try {
541
+ I = F.apply(this && this.$id === u ? this : i, v);
542
+ } catch (y) {
543
+ throw x(eu, y), y;
544
+ }
545
+ return I instanceof Promise ? I.then((y) => (x(j, y), y)).catch((y) => (x(eu, y), Promise.reject(y))) : (x(j, I), I);
546
+ };
547
+ return d[fu] = !0, d[nu] = o, d;
548
+ }, S = /* @__PURE__ */ H({
549
+ actions: {},
550
+ getters: {},
551
+ state: [],
552
+ hotState: m
553
+ }), M = {
554
+ _p: t,
555
+ // _s: scope,
556
+ $id: u,
557
+ $onAction: du.bind(null, f),
558
+ $patch: _,
559
+ $reset: g,
560
+ $subscribe(F, o = {}) {
561
+ const d = du(C, F, o.detached, () => v()), v = r.run(() => uu(() => t.state.value[u], (j) => {
562
+ (o.flush === "sync" ? a : E) && F({
563
+ storeId: u,
564
+ type: K.direct,
565
+ events: A
566
+ }, j);
567
+ }, b({}, l, o)));
568
+ return d;
569
+ },
570
+ $dispose: N
571
+ }, i = gu(process.env.NODE_ENV !== "production" || (process.env.NODE_ENV !== "production" || typeof __VUE_PROD_DEVTOOLS__ < "u" && __VUE_PROD_DEVTOOLS__) && process.env.NODE_ENV !== "test" && R ? b(
572
+ {
573
+ _hmrPayload: S,
574
+ _customProperties: H(/* @__PURE__ */ new Set())
575
+ // devtools custom properties
576
+ },
577
+ M
578
+ // must be added later
579
+ // setupStore
580
+ ) : M);
581
+ t._s.set(u, i);
582
+ const w = (t._a && t._a.runWithContext || se)(() => t._e.run(() => (r = Hu()).run(() => e({ action: V }))));
583
+ for (const F in w) {
584
+ const o = w[F];
585
+ if (T(o) && !Bu(o) || cu(o))
586
+ process.env.NODE_ENV !== "production" && n ? m.value[F] = tu(w, F) : s || (p && ce(o) && (T(o) ? o.value = p[F] : su(o, p[F])), t.state.value[u][F] = o), process.env.NODE_ENV !== "production" && S.state.push(F);
587
+ else if (typeof o == "function") {
588
+ const d = process.env.NODE_ENV !== "production" && n ? o : V(o, F);
589
+ w[F] = d, process.env.NODE_ENV !== "production" && (S.actions[F] = o), c.actions[F] = o;
590
+ } else process.env.NODE_ENV !== "production" && Bu(o) && (S.getters[F] = s ? (
591
+ // @ts-expect-error
592
+ D.getters[F]
593
+ ) : o, R && (w._getters || // @ts-expect-error: same
594
+ (w._getters = H([]))).push(F));
595
+ }
596
+ if (b(i, w), b(Uu(i), w), Object.defineProperty(i, "$state", {
597
+ get: () => process.env.NODE_ENV !== "production" && n ? m.value : t.state.value[u],
598
+ set: (F) => {
599
+ if (process.env.NODE_ENV !== "production" && n)
600
+ throw new Error("cannot set hotState");
601
+ _((o) => {
602
+ b(o, F);
603
+ });
604
+ }
605
+ }), process.env.NODE_ENV !== "production" && (i._hotUpdate = H((F) => {
606
+ i._hotUpdating = !0, F._hmrPayload.state.forEach((o) => {
607
+ if (o in i.$state) {
608
+ const d = F.$state[o], v = i.$state[o];
609
+ typeof d == "object" && P(d) && P(v) ? Su(d, v) : F.$state[o] = v;
610
+ }
611
+ i[o] = tu(F.$state, o);
612
+ }), Object.keys(i.$state).forEach((o) => {
613
+ o in F.$state || delete i[o];
614
+ }), E = !1, a = !1, t.state.value[u] = tu(F._hmrPayload, "hotState"), a = !0, G().then(() => {
615
+ E = !0;
616
+ });
617
+ for (const o in F._hmrPayload.actions) {
618
+ const d = F[o];
619
+ i[o] = //
620
+ V(d, o);
621
+ }
622
+ for (const o in F._hmrPayload.getters) {
623
+ const d = F._hmrPayload.getters[o], v = s ? (
624
+ // special handling of options api
625
+ B(() => (Z(t), d.call(i, i)))
626
+ ) : d;
627
+ i[o] = //
628
+ v;
629
+ }
630
+ Object.keys(i._hmrPayload.getters).forEach((o) => {
631
+ o in F._hmrPayload.getters || delete i[o];
632
+ }), Object.keys(i._hmrPayload.actions).forEach((o) => {
633
+ o in F._hmrPayload.actions || delete i[o];
634
+ }), i._hmrPayload = F._hmrPayload, i._getters = F._getters, i._hotUpdating = !1;
635
+ })), (process.env.NODE_ENV !== "production" || typeof __VUE_PROD_DEVTOOLS__ < "u" && __VUE_PROD_DEVTOOLS__) && process.env.NODE_ENV !== "test" && R) {
636
+ const F = {
637
+ writable: !0,
638
+ configurable: !0,
639
+ // avoid warning on devtools trying to display this property
640
+ enumerable: !1
641
+ };
642
+ ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((o) => {
643
+ Object.defineProperty(i, o, b({ value: i[o] }, F));
644
+ });
645
+ }
646
+ return t._p.forEach((F) => {
647
+ if ((process.env.NODE_ENV !== "production" || typeof __VUE_PROD_DEVTOOLS__ < "u" && __VUE_PROD_DEVTOOLS__) && process.env.NODE_ENV !== "test" && R) {
648
+ const o = r.run(() => F({
649
+ store: i,
650
+ app: t._a,
651
+ pinia: t,
652
+ options: c
653
+ }));
654
+ Object.keys(o || {}).forEach((d) => i._customProperties.add(d)), b(i, o);
655
+ } else
656
+ b(i, r.run(() => F({
657
+ store: i,
658
+ app: t._a,
659
+ pinia: t,
660
+ options: c
661
+ })));
662
+ }), process.env.NODE_ENV !== "production" && i.$state && typeof i.$state == "object" && typeof i.$state.constructor == "function" && !i.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
663
+ state: () => new MyClass()
664
+ Found in store "${i.$id}".`), p && s && D.hydrate && D.hydrate(i.$state, p), E = !0, a = !0, i;
665
+ }
666
+ /*! #__NO_SIDE_EFFECTS__ */
667
+ // @__NO_SIDE_EFFECTS__
668
+ function ie(u, e, D) {
669
+ let t;
670
+ const n = typeof e == "function";
671
+ t = n ? D : e;
672
+ function s(r, c) {
673
+ const l = ou();
674
+ if (r = // in test mode, ignore the argument provided as we can always retrieve a
675
+ // pinia instance with getActivePinia()
676
+ (process.env.NODE_ENV === "test" && L && L._testing ? null : r) || (l ? O(Fu, null) : null), r && Z(r), process.env.NODE_ENV !== "production" && !L)
677
+ throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
678
+ See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
679
+ This will fail in production.`);
680
+ r = L, r._s.has(u) || (n ? ru(u, e, t, r) : pu(u, t, r), process.env.NODE_ENV !== "production" && (s._pinia = r));
681
+ const E = r._s.get(u);
682
+ if (process.env.NODE_ENV !== "production" && c) {
683
+ const a = "__hot:" + u, C = n ? ru(a, e, t, r, !0) : pu(a, b({}, t), r, !0);
684
+ c._hotUpdate(C), delete r.state.value[a], r._s.delete(a);
685
+ }
686
+ if (process.env.NODE_ENV !== "production" && R) {
687
+ const a = bu();
688
+ if (a && a.proxy && // avoid adding stores that are just built for hot module replacement
689
+ !c) {
690
+ const C = a.proxy, f = "_pStores" in C ? C._pStores : C._pStores = {};
691
+ f[u] = E;
692
+ }
693
+ }
694
+ return E;
695
+ }
696
+ return s.$id = u, s;
391
697
  }
698
+ const ku = /* @__PURE__ */ ie("login", {
699
+ state: () => ({
700
+ loginStatus: k.NOT
701
+ }),
702
+ actions: {
703
+ /**
704
+ * 设置登录状态
705
+ * @param status - 登录状态值
706
+ */
707
+ setLoginStatus(u) {
708
+ this.loginStatus = u;
709
+ }
710
+ },
711
+ getters: {
712
+ // 登录失败
713
+ isLoginFailed() {
714
+ return this.loginStatus === k.FAILED;
715
+ },
716
+ // 未登录
717
+ isLoginNot() {
718
+ return this.loginStatus === k.NOT;
719
+ },
720
+ // 登录中
721
+ isLoggingIn() {
722
+ return this.loginStatus === k.DOING;
723
+ },
724
+ // 登录成功
725
+ isLogined() {
726
+ return this.loginStatus === k.DONE;
727
+ }
728
+ }
729
+ });
730
+ var k = /* @__PURE__ */ ((u) => (u[u.FAILED = -1] = "FAILED", u[u.NOT = 0] = "NOT", u[u.DOING = 1] = "DOING", u[u.DONE = 2] = "DONE", u))(k || {});
731
+ const au = {
732
+ CSRF_TOKEN: "_U_T_"
733
+ }, ae = 300, Le = (u) => {
734
+ au.CSRF_TOKEN = u;
735
+ }, Ee = () => ({
736
+ csrfCookie: J.get(au.CSRF_TOKEN)
737
+ }), hu = () => {
738
+ J.remove(au.CSRF_TOKEN);
739
+ }, Pe = (u) => {
740
+ window.location.href = u;
741
+ }, U = (u) => {
742
+ ku().setLoginStatus(u);
743
+ }, mu = async (u, e = !1) => {
744
+ const { csrfCookie: D } = Ee();
745
+ if (!(!D || e))
746
+ try {
747
+ U(
748
+ 1
749
+ /* DOING */
750
+ );
751
+ const t = await u();
752
+ if (t != null && t.data)
753
+ return U(
754
+ 2
755
+ /* DONE */
756
+ ), t.data;
757
+ U(
758
+ -1
759
+ /* FAILED */
760
+ ), hu();
761
+ return;
762
+ } catch {
763
+ U(
764
+ -1
765
+ /* FAILED */
766
+ ), hu();
767
+ return;
768
+ }
769
+ }, Se = (u) => {
770
+ window.location.href = u, setTimeout(() => {
771
+ U(
772
+ 0
773
+ /* NOT */
774
+ );
775
+ }, ae);
776
+ }, xe = (u, e, D, t, n = !1) => {
777
+ const s = ku();
778
+ uu(
779
+ () => t.path,
780
+ async (r, c) => {
781
+ if (r === c || s.isLogined) return;
782
+ u.some((E) => r.includes(E)) ? D.value = await mu(e, n) : mu(e, n).then((E) => {
783
+ D.value = E;
784
+ });
785
+ },
786
+ { immediate: !0 }
787
+ );
788
+ };
392
789
  export {
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
790
+ k as LOGIN_STATUS,
791
+ z as ScreenConfig,
792
+ ee as Size,
793
+ hu as clearUserAuth,
794
+ ye as createTheme,
795
+ Pe as doLogin,
796
+ Se as doLogout,
797
+ Ee as getUserAuth,
798
+ Le as setLoginKeys,
799
+ U as setStatus,
800
+ mu as tryLogin,
801
+ Ve as useAnalytics,
802
+ Ne as useClipboard,
803
+ we as useElementEventAnalytics,
804
+ ve as useLocale,
805
+ xe as useLoginWatcher,
806
+ _e as useMdRender,
807
+ ge as useScreen,
808
+ be as useTheme,
809
+ Oe as useWatchAnalytics
404
810
  };
@@ -1 +1,9 @@
1
- (function(A,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("markdown-it-async"),require("markdown-it-anchor"),require("shiki"),require("vue-i18n"),require("@opensig/opendesign"),require("js-cookie")):typeof define=="function"&&define.amd?define(["exports","vue","markdown-it-async","markdown-it-anchor","shiki","vue-i18n","@opensig/opendesign","js-cookie"],e):(A=typeof globalThis<"u"?globalThis:A||self,e(A.OpenDesignPlusComposables={},A.Vue,A.MarkdownItAsync,A.markdownItAnchor,A.shiki,A.VueI18n,A.OpenDesign,A.Cookies))})(this,(function(A,e,y,U,_,q,S,P){"use strict";var su=Object.defineProperty;var cu=(A,e,y)=>e in A?su(A,e,{enumerable:!0,configurable:!0,writable:!0,value:y}):A[e]=y;var k=(A,e,y)=>cu(A,typeof e!="symbol"?e+"":e,y);const M=new Set(Object.keys(_.bundledLanguages));async function z(D={}){const{anchor:u=!0,anchorType:E="vitepress",copy:F=!0,wrapMarkdownBodyDiv:t=!0,theme:n={},...o}=D,C=typeof(n==null?void 0:n.light)=="string"&&n.light in _.bundledThemes?n.light:"light-plus",i=typeof(n==null?void 0:n.dark)=="string"&&n.dark in _.bundledThemes?n.dark:"dark-plus",a=new Set(["text"]);e.onBeforeUnmount(()=>{r&&r.dispose()});const r=await _.createHighlighter({themes:[C,i],langs:["text"]}),c=y({async highlight(B,s){return M.has(s)||(s="text"),a.has(s)||(await r.loadLanguage(s),a.add(s)),r.codeToHtml(B,{lang:s,themes:{light:C,dark:i}})},...o});if(u&&c.use(U,{slugify:B=>E==="github"?W(B):G(B)}),F){const B=c.renderer.rules.fence;c.renderer.rules.fence=(...s)=>{var m;const[l,f]=s,d=l[f],p=c.utils.escapeHtml(d.content||"");return`<div class="language-${((m=d.info)==null?void 0:m.trim())||""}"><div class="copy" data-clipboard-text="${p}"></div>`+B(...s)+"</div>"}}if(t){const B=c.render;c.render=(l,f)=>`<div class="markdown-body">${B.call(c,l,f)}</div>`;const s=c.renderInline;c.renderInline=(l,f)=>`<div class="markdown-body">${s.call(c,l,f)}</div>`}return{shiki:r,markdwon:c}}function W(D){const u=/[\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-\u4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\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;return`user-content-${D.toLowerCase().replace(u,"").replace(/ /g,"-")}`}function G(D){return D.normalize("NFKD").replace(/[\u0300-\u036F]/g,"").replace(/[\u0000-\u001f]/g,"").replace(/[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'“”‘’<>,.?/]+/g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/^(\d)/,"_$1").toLowerCase()}var I=(D=>(D.Phone="phone",D.PadV="pad_v",D.PadH="pad_h",D.Laptop="laptop",D))(I||{});const g={phone:600,pad_v:840,pad_h:1200,laptop:1440},Q={lt:(D,u)=>D<u,le:(D,u)=>D<=u,eq:(D,u)=>D===u,ne:(D,u)=>D!==u,ge:(D,u)=>D>=u,gt:(D,u)=>D>u},Y=()=>{const D=e.reactive({width:1440,height:0}),u=e.ref("laptop"),E=h=>(typeof h>"u"&&(h=D.width),h<g.phone?"phone":h<g.pad_v?"pad_v":h<g.pad_h?"pad_h":"laptop"),F=(h="eq",R)=>{const Au=D.width,ou=g[R],iu=Q[h];return iu(Au,ou)},t=e.computed(()=>F("le","phone")),n=e.computed(()=>F("gt","phone")),o=e.computed(()=>F("gt","phone")&&F("le","pad_h")),C=e.computed(()=>F("le","pad_h")),i=e.computed(()=>F("gt","pad_h")),a=e.computed(()=>F("gt","phone")&&F("le","pad_v")),r=e.computed(()=>F("le","pad_v")),c=e.computed(()=>F("gt","pad_v")),B=e.computed(()=>F("gt","pad_v")&&F("le","pad_h")),s=e.computed(()=>F("gt","pad_h")&&F("le","laptop")),l=e.computed(()=>F("le","laptop")),f=e.computed(()=>F("gt","laptop")),d=e.computed(()=>F("gt","phone")&&F("le","laptop")),p=e.computed(()=>F("gt","pad_v")&&F("le","laptop")),m=()=>{const{innerWidth:h,innerHeight:R}=window;D.width=h,D.height=R,u.value=E()};return e.onMounted(()=>{typeof window<"u"&&(window.addEventListener("resize",m),m(),e.nextTick(()=>m()))}),e.onUnmounted(()=>{typeof window<"u"&&window.removeEventListener("resize",m)}),{getSize:E,current:u,size:D,isPhone:t,gtPhone:n,isPad:o,lePad:C,gtPad:i,isPadV:a,lePadV:r,gtPadV:c,isPadH:B,isLaptop:s,leLaptop:l,gtLaptop:f,isPadToLaptop:d,isPadVToLaptop:p}},J=()=>{const{t:D,locale:u}=q.useI18n(),E=e.getCurrentInstance(),F=e.computed(()=>u.value==="zh"),t=e.computed(()=>u.value==="en");return e.watch(()=>u.value,o=>{S.isClient&&(document.documentElement.lang=o,localStorage.setItem("locale",o))},{immediate:!0}),{t:D,$t:D,locale:u,isZh:F,isEn:t,changeLocale:async o=>{var i;const C=S.isUndefined(o)?F.value?"en":"zh":o;u.value!==C&&(u.value=C,await e.nextTick(),(i=E==null?void 0:E.proxy)!=null&&i.$forceUpdate&&E.proxy.$forceUpdate())}}},Z="[警告] 请在项目中注入主题配置项:app.use(createTheme(options))",X="[警告] 缺少参数 cookieKey 和 cookieDomain,请在 createTheme 传入 cookieKey 和 cookieDomain 参数",O=Symbol("theme"),j=Symbol("isLight"),H=Symbol("isDark"),V=Symbol("setTheme"),$=Symbol("toggleTheme");function uu(D){const{cookieKey:u,cookieDomain:E,lightValue:F="light",darkValue:t="dark",attribute:n="data-o-theme",attributeLightValue:o=F,attributeDarkValue:C=t,classLightValue:i=F,classDarkValue:a=t}=D||{},r=e.ref(F),c=e.computed(()=>r.value===F),B=e.computed(()=>r.value===t),s=e.computed(()=>r.value),l=(d,p=!0)=>{const m=d===t?t:F;r.value=m,!(typeof window>"u")&&(m===t?(document.documentElement.setAttribute(n,C),document.documentElement.classList.add(a),document.documentElement.classList.remove(i)):(document.documentElement.setAttribute(n,o),document.documentElement.classList.add(i),document.documentElement.classList.remove(a)),p&&(u&&E?P.set(u,m,{domain:E}):console.warn(X)))},f=()=>{l(s.value===t?F:t)};return{install(d){if(d.provide(O,s),d.provide(j,c),d.provide(H,B),d.provide(V,l),d.provide($,f),typeof window>"u")return;let p;u&&(p=P.get(u)),p||(p=window.matchMedia("(prefers-color-scheme: dark)").matches?t:F),l(p===t?t:F,!1)}}}function Du(){const D=e.inject(O);return D||console.warn(Z),{theme:D,isLight:e.inject(j),isDark:e.inject(H),setTheme:e.inject(V),toggleTheme:e.inject($)}}async function Fu(D){try{return navigator.clipboard?(await navigator.clipboard.writeText(D),!0):eu(D)}catch{return!1}}function eu(D){const u=document.createElement("textarea");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();try{const E=document.execCommand("copy");return document.body.removeChild(u),E}catch{return document.body.removeChild(u),!1}}class w{constructor(u){k(this,"prev",null);k(this,"next",null);k(this,"data",null);this.data=u}removeSelf(){this.data=null,this.prev&&(this.prev.next=this.next),this.next&&(this.next.prev=this.prev),this.prev=null,this.next=null}}class tu{constructor(){k(this,"dummyHead",new w(null))}shift(u){const E=new w(u),F=this.dummyHead.next;return E.prev=this.dummyHead,this.dummyHead.next=E,F&&(E.next=F,F.prev=E),E}remove(u){u.removeSelf()}clear(){let u=this.dummyHead.next;for(;u;){const E=u.next;u.removeSelf(),u=E}this.dummyHead.next=null}}const K=Symbol(),b=Symbol(),x=async(D,...u)=>typeof D=="function"?await D(...u):e.unref(D),L=D=>typeof D=="object"&&D!==null,v=D=>typeof D.event=="string"&&L(D.properties);function T(D,u){let E,F;if(u!=null&&u.catchBubble)E=new tu,F=E.shift(async t=>{var n,o;if(L(t))if(t[b]){const C=await x(D);if(!v(C))return;delete t[b];const i={...C,properties:{...C.properties,...t}};(n=window.__OA_REPORT__)==null||n.call(window,i.event,i.properties)}else v(t)&&((o=window.__OA_REPORT__)==null||o.call(window,t.event,t.properties))}),e.provide((u==null?void 0:u.key)??K,E);else if(u!=null&&u.bubble){if(E=e.inject((u==null?void 0:u.key)??K),!E)return;F=E.shift(async t=>{var n,o,C,i;if(L(t))if(t[b]){const a=await x(D);if(!L(a))return;const r={...a,...t};(o=(n=F.next)==null?void 0:n.data)==null||o.call(n,r)}else(i=(C=F.next)==null?void 0:C.data)==null||i.call(C,{...t,[b]:!0})})}else F=t=>{var n;v(t)&&((n=window.__OA_REPORT__)==null||n.call(window,t.event,t.properties))};return e.onUnmounted(()=>{E=null,F instanceof w&&F.removeSelf(),F=null}),F}function nu(D,u,E){if(!e.isRef(D)&&typeof D!="function")return;const F=T(u,E);e.watch(D,async(t,n)=>{var C;const o=await x(u,t,n);F instanceof w?(C=F.data)==null||C.call(F,o):typeof F=="function"&&F(o)})}const N=new WeakSet;function Eu(D,u,E,F){const t=e.computed(()=>e.unref(D)),n=T(E,{...F,key:u}),o=async C=>{var a;if(F!=null&&F.bubble&&N.has(C))return;N.add(C);const i=await x(E,C);typeof i=="object"&&i!==null&&(n instanceof w?(a=n.data)==null||a.call(n,i):typeof n=="function"&&n(i))};e.onMounted(()=>{var C;return(C=t.value)==null?void 0:C.addEventListener(u,o)}),e.onBeforeUnmount(()=>{var C;return(C=t.value)==null?void 0:C.removeEventListener(u,o)})}function Cu(D,u){T(D,u)}A.ScreenConfig=g,A.Size=I,A.createTheme=uu,A.useAnalytics=Cu,A.useClipboard=Fu,A.useElementEventAnalytics=Eu,A.useLocale=J,A.useMdRender=z,A.useScreen=Y,A.useTheme=Du,A.useWatchAnalytics=nu,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(E,D){typeof exports=="object"&&typeof module<"u"?D(exports,require("vue"),require("markdown-it-async"),require("markdown-it-anchor"),require("shiki"),require("vue-i18n"),require("@opensig/opendesign"),require("js-cookie")):typeof define=="function"&&define.amd?define(["exports","vue","markdown-it-async","markdown-it-anchor","shiki","vue-i18n","@opensig/opendesign","js-cookie"],D):(E=typeof globalThis<"u"?globalThis:E||self,D(E.OpenDesignPlusComposables={},E.Vue,E.MarkdownItAsync,E.markdownItAnchor,E.shiki,E.VueI18n,E.OpenDesign,E.Cookies))})(this,(function(E,D,P,bu,M,Ou,ru,q){"use strict";var ee=Object.defineProperty;var te=(E,D,P)=>D in E?ee(E,D,{enumerable:!0,configurable:!0,writable:!0,value:P}):E[D]=P;var K=(E,D,P)=>te(E,typeof D!="symbol"?D+"":D,P);const Nu=new Set(Object.keys(M.bundledLanguages));async function wu(u={}){const{anchor:t=!0,anchorType:n="vitepress",copy:e=!0,wrapMarkdownBodyDiv:o=!0,theme:r={},...c}=u,i=typeof(r==null?void 0:r.light)=="string"&&r.light in M.bundledThemes?r.light:"light-plus",d=typeof(r==null?void 0:r.dark)=="string"&&r.dark in M.bundledThemes?r.dark:"dark-plus",C=new Set(["text"]);D.onBeforeUnmount(()=>{l&&l.dispose()});const l=await M.createHighlighter({themes:[i,d],langs:["text"]}),A=P({async highlight(h,f){return Nu.has(f)||(f="text"),C.has(f)||(await l.loadLanguage(f),C.add(f)),l.codeToHtml(h,{lang:f,themes:{light:i,dark:d}})},...c});if(t&&A.use(bu,{slugify:h=>n==="github"?vu(h):Lu(h)}),e){const h=A.renderer.rules.fence;A.renderer.rules.fence=(...f)=>{var y;const[p,_]=f,m=p[_],g=A.utils.escapeHtml(m.content||"");return`<div class="language-${((y=m.info)==null?void 0:y.trim())||""}"><div class="copy" data-clipboard-text="${g}"></div>`+h(...f)+"</div>"}}if(o){const h=A.render;A.render=(p,_)=>`<div class="markdown-body">${h.call(A,p,_)}</div>`;const f=A.renderInline;A.renderInline=(p,_)=>`<div class="markdown-body">${f.call(A,p,_)}</div>`}return{shiki:l,markdwon:A}}function vu(u){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-\uA7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uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g;return`user-content-${u.toLowerCase().replace(t,"").replace(/ /g,"-")}`}function Lu(u){return u.normalize("NFKD").replace(/[\u0300-\u036F]/g,"").replace(/[\u0000-\u001f]/g,"").replace(/[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'“”‘’<>,.?/]+/g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/^(\d)/,"_$1").toLowerCase()}var cu=(u=>(u.Phone="phone",u.PadV="pad_v",u.PadH="pad_h",u.Laptop="laptop",u))(cu||{});const I={phone:600,pad_v:840,pad_h:1200,laptop:1440},Su={lt:(u,t)=>u<t,le:(u,t)=>u<=t,eq:(u,t)=>u===t,ne:(u,t)=>u!==t,ge:(u,t)=>u>=t,gt:(u,t)=>u>t},ku=()=>{const u=D.reactive({width:1440,height:0}),t=D.ref("laptop"),n=w=>(typeof w>"u"&&(w=u.width),w<I.phone?"phone":w<I.pad_v?"pad_v":w<I.pad_h?"pad_h":"laptop"),e=(w="eq",V)=>{const T=u.width,Q=I[V],a=Su[w];return a(T,Q)},o=D.computed(()=>e("le","phone")),r=D.computed(()=>e("gt","phone")),c=D.computed(()=>e("gt","phone")&&e("le","pad_h")),i=D.computed(()=>e("le","pad_h")),d=D.computed(()=>e("gt","pad_h")),C=D.computed(()=>e("gt","phone")&&e("le","pad_v")),l=D.computed(()=>e("le","pad_v")),A=D.computed(()=>e("gt","pad_v")),h=D.computed(()=>e("gt","pad_v")&&e("le","pad_h")),f=D.computed(()=>e("gt","pad_h")&&e("le","laptop")),p=D.computed(()=>e("le","laptop")),_=D.computed(()=>e("gt","laptop")),m=D.computed(()=>e("gt","phone")&&e("le","laptop")),g=D.computed(()=>e("gt","pad_v")&&e("le","laptop")),y=()=>{const{innerWidth:w,innerHeight:V}=window;u.width=w,u.height=V,t.value=n()};return D.onMounted(()=>{typeof window<"u"&&(window.addEventListener("resize",y),y(),D.nextTick(()=>y()))}),D.onUnmounted(()=>{typeof window<"u"&&window.removeEventListener("resize",y)}),{getSize:n,current:t,size:u,isPhone:o,gtPhone:r,isPad:c,lePad:i,gtPad:d,isPadV:C,lePadV:l,gtPadV:A,isPadH:h,isLaptop:f,leLaptop:p,gtLaptop:_,isPadToLaptop:m,isPadVToLaptop:g}},Vu=()=>{const{t:u,locale:t}=Ou.useI18n(),n=D.getCurrentInstance(),e=D.computed(()=>t.value==="zh"),o=D.computed(()=>t.value==="en");return D.watch(()=>t.value,c=>{ru.isClient&&(document.documentElement.lang=c,localStorage.setItem("locale",c))},{immediate:!0}),{t:u,$t:u,locale:t,isZh:e,isEn:o,changeLocale:async c=>{var d;const i=ru.isUndefined(c)?e.value?"en":"zh":c;t.value!==i&&(t.value=i,await D.nextTick(),(d=n==null?void 0:n.proxy)!=null&&d.$forceUpdate&&n.proxy.$forceUpdate())}}},Pu="[警告] 请在项目中注入主题配置项:app.use(createTheme(options))",Ru="[警告] 缺少参数 cookieKey 和 cookieDomain,请在 createTheme 传入 cookieKey 和 cookieDomain 参数",iu=Symbol("theme"),au=Symbol("isLight"),Eu=Symbol("isDark"),lu=Symbol("setTheme"),Cu=Symbol("toggleTheme");function ju(u){const{cookieKey:t,cookieDomain:n,lightValue:e="light",darkValue:o="dark",attribute:r="data-o-theme",attributeLightValue:c=e,attributeDarkValue:i=o,classLightValue:d=e,classDarkValue:C=o}=u||{},l=D.ref(e),A=D.computed(()=>l.value===e),h=D.computed(()=>l.value===o),f=D.computed(()=>l.value),p=(m,g=!0)=>{const y=m===o?o:e;l.value=y,!(typeof window>"u")&&(y===o?(document.documentElement.setAttribute(r,i),document.documentElement.classList.add(C),document.documentElement.classList.remove(d)):(document.documentElement.setAttribute(r,c),document.documentElement.classList.add(d),document.documentElement.classList.remove(C)),g&&(t&&n?q.set(t,y,{domain:n}):console.warn(Ru)))},_=()=>{p(f.value===o?e:o)};return{install(m){if(m.provide(iu,f),m.provide(au,A),m.provide(Eu,h),m.provide(lu,p),m.provide(Cu,_),typeof window>"u")return;let g;t&&(g=q.get(t)),g||(g=window.matchMedia("(prefers-color-scheme: dark)").matches?o:e),p(g===o?o:e,!1)}}}function xu(){const u=D.inject(iu);return u||console.warn(Pu),{theme:u,isLight:D.inject(au),isDark:D.inject(Eu),setTheme:D.inject(lu),toggleTheme:D.inject(Cu)}}async function Tu(u){try{return navigator.clipboard?(await navigator.clipboard.writeText(u),!0):Iu(u)}catch{return!1}}function Iu(u){const t=document.createElement("textarea");t.value=u,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();try{const n=document.execCommand("copy");return document.body.removeChild(t),n}catch{return document.body.removeChild(t),!1}}class ${constructor(t){K(this,"prev",null);K(this,"next",null);K(this,"data",null);this.data=t}removeSelf(){this.data=null,this.prev&&(this.prev.next=this.next),this.next&&(this.next.prev=this.prev),this.prev=null,this.next=null}}class $u{constructor(){K(this,"dummyHead",new $(null))}shift(t){const n=new $(t),e=this.dummyHead.next;return n.prev=this.dummyHead,this.dummyHead.next=n,e&&(n.next=e,e.prev=n),n}remove(t){t.removeSelf()}clear(){let t=this.dummyHead.next;for(;t;){const n=t.next;t.removeSelf(),t=n}this.dummyHead.next=null}}const du=Symbol(),z=Symbol(),Y=async(u,...t)=>typeof u=="function"?await u(...t):D.unref(u),G=u=>typeof u=="object"&&u!==null,Z=u=>typeof u.event=="string"&&G(u.properties);function X(u,t){let n,e;if(t!=null&&t.catchBubble)n=new $u,e=n.shift(async o=>{var r,c;if(G(o))if(o[z]){const i=await Y(u);if(!Z(i))return;delete o[z];const d={...i,properties:{...i.properties,...o}};(r=window.__OA_REPORT__)==null||r.call(window,d.event,d.properties)}else Z(o)&&((c=window.__OA_REPORT__)==null||c.call(window,o.event,o.properties))}),D.provide((t==null?void 0:t.key)??du,n);else if(t!=null&&t.bubble){if(n=D.inject((t==null?void 0:t.key)??du),!n)return;e=n.shift(async o=>{var r,c,i,d;if(G(o))if(o[z]){const C=await Y(u);if(!G(C))return;const l={...C,...o};(c=(r=e.next)==null?void 0:r.data)==null||c.call(r,l)}else(d=(i=e.next)==null?void 0:i.data)==null||d.call(i,{...o,[z]:!0})})}else e=o=>{var r;Z(o)&&((r=window.__OA_REPORT__)==null||r.call(window,o.event,o.properties))};return D.onUnmounted(()=>{n=null,e instanceof $&&e.removeSelf(),e=null}),e}function Uu(u,t,n){if(!D.isRef(u)&&typeof u!="function")return;const e=X(t,n);D.watch(u,async(o,r)=>{var i;const c=await Y(t,o,r);e instanceof $?(i=e.data)==null||i.call(e,c):typeof e=="function"&&e(c)})}const Au=new WeakSet;function Hu(u,t,n,e){const o=D.computed(()=>D.unref(u)),r=X(n,{...e,key:t}),c=async i=>{var C;if(e!=null&&e.bubble&&Au.has(i))return;Au.add(i);const d=await Y(n,i);typeof d=="object"&&d!==null&&(r instanceof $?(C=r.data)==null||C.call(r,d):typeof r=="function"&&r(d))};D.onMounted(()=>{var i;return(i=o.value)==null?void 0:i.addEventListener(t,c)}),D.onBeforeUnmount(()=>{var i;return(i=o.value)==null?void 0:i.removeEventListener(t,c)})}function Wu(u,t){X(u,t)}/*!
2
+ * pinia v3.0.4
3
+ * (c) 2025 Eduardo San Martin Morote
4
+ * @license MIT
5
+ */const R=typeof window<"u";let L;const J=u=>L=u;process.env.NODE_ENV;const uu=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function S(u){return u&&typeof u=="object"&&Object.prototype.toString.call(u)==="[object Object]"&&typeof u.toJSON!="function"}var U;(function(u){u.direct="direct",u.patchObject="patch object",u.patchFunction="patch function"})(U||(U={}));function fu(u,t){for(const n in t){const e=t[n];if(!(n in u))continue;const o=u[n];S(o)&&S(e)&&!D.isRef(e)&&!D.isReactive(e)?u[n]=fu(o,e):u[n]=e}return u}const Bu=()=>{};function hu(u,t,n,e=Bu){u.add(t);const o=()=>{u.delete(t)&&e()};return!n&&D.getCurrentScope()&&D.onScopeDispose(o),o}function j(u,...t){u.forEach(n=>{n(...t)})}const Ku=u=>u(),pu=Symbol(),eu=Symbol();function tu(u,t){u instanceof Map&&t instanceof Map?t.forEach((n,e)=>u.set(e,n)):u instanceof Set&&t instanceof Set&&t.forEach(u.add,u);for(const n in t){if(!t.hasOwnProperty(n))continue;const e=t[n],o=u[n];S(o)&&S(e)&&u.hasOwnProperty(n)&&!D.isRef(e)&&!D.isReactive(e)?u[n]=tu(o,e):u[n]=e}return u}const Mu=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function qu(u){return!S(u)||!Object.prototype.hasOwnProperty.call(u,Mu)}const{assign:b}=Object;function mu(u){return!!(D.isRef(u)&&u.effect)}function _u(u,t,n,e){const{state:o,actions:r,getters:c}=t,i=n.state.value[u];let d;function C(){!i&&(process.env.NODE_ENV==="production"||!e)&&(n.state.value[u]=o?o():{});const l=process.env.NODE_ENV!=="production"&&e?D.toRefs(D.ref(o?o():{}).value):D.toRefs(n.state.value[u]);return b(l,r,Object.keys(c||{}).reduce((A,h)=>(process.env.NODE_ENV!=="production"&&h in l&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${h}" in store "${u}".`),A[h]=D.markRaw(D.computed(()=>{J(n);const f=n._s.get(u);return c[h].call(f,f)})),A),{}))}return d=Du(u,C,t,n,e,!0),d}function Du(u,t,n={},e,o,r){let c;const i=b({actions:{}},n);if(process.env.NODE_ENV!=="production"&&!e._e.active)throw new Error("Pinia destroyed");const d={deep:!0};process.env.NODE_ENV!=="production"&&(d.onTrigger=s=>{C?f=s:C==!1&&!a._hotUpdating&&(Array.isArray(f)?f.push(s):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let C,l,A=new Set,h=new Set,f;const p=e.state.value[u];!r&&!p&&(process.env.NODE_ENV==="production"||!o)&&(e.state.value[u]={});const _=D.ref({});let m;function g(s){let F;C=l=!1,process.env.NODE_ENV!=="production"&&(f=[]),typeof s=="function"?(s(e.state.value[u]),F={type:U.patchFunction,storeId:u,events:f}):(tu(e.state.value[u],s),F={type:U.patchObject,payload:s,storeId:u,events:f});const B=m=Symbol();D.nextTick().then(()=>{m===B&&(C=!0)}),l=!0,j(A,F,e.state.value[u])}const y=r?function(){const{state:F}=n,B=F?F():{};this.$patch(O=>{b(O,B)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${u}" is built using the setup syntax and does not implement $reset().`)}:Bu;function w(){c.stop(),A.clear(),h.clear(),e._s.delete(u)}const V=(s,F="")=>{if(pu in s)return s[eu]=F,s;const B=function(){J(e);const O=Array.from(arguments),H=new Set,su=new Set;function Xu(N){H.add(N)}function ue(N){su.add(N)}j(h,{args:O,name:B[eu],store:a,after:Xu,onError:ue});let W;try{W=s.apply(this&&this.$id===u?this:a,O)}catch(N){throw j(su,N),N}return W instanceof Promise?W.then(N=>(j(H,N),N)).catch(N=>(j(su,N),Promise.reject(N))):(j(H,W),W)};return B[pu]=!0,B[eu]=F,B},T=D.markRaw({actions:{},getters:{},state:[],hotState:_}),Q={_p:e,$id:u,$onAction:hu.bind(null,h),$patch:g,$reset:y,$subscribe(s,F={}){const B=hu(A,s,F.detached,()=>O()),O=c.run(()=>D.watch(()=>e.state.value[u],H=>{(F.flush==="sync"?l:C)&&s({storeId:u,type:U.direct,events:f},H)},b({},d,F)));return B},$dispose:w},a=D.reactive(process.env.NODE_ENV!=="production"||(process.env.NODE_ENV!=="production"||typeof __VUE_PROD_DEVTOOLS__<"u"&&__VUE_PROD_DEVTOOLS__)&&process.env.NODE_ENV!=="test"&&R?b({_hmrPayload:T,_customProperties:D.markRaw(new Set)},Q):Q);e._s.set(u,a);const v=(e._a&&e._a.runWithContext||Ku)(()=>e._e.run(()=>(c=D.effectScope()).run(()=>t({action:V}))));for(const s in v){const F=v[s];if(D.isRef(F)&&!mu(F)||D.isReactive(F))process.env.NODE_ENV!=="production"&&o?_.value[s]=D.toRef(v,s):r||(p&&qu(F)&&(D.isRef(F)?F.value=p[s]:tu(F,p[s])),e.state.value[u][s]=F),process.env.NODE_ENV!=="production"&&T.state.push(s);else if(typeof F=="function"){const B=process.env.NODE_ENV!=="production"&&o?F:V(F,s);v[s]=B,process.env.NODE_ENV!=="production"&&(T.actions[s]=F),i.actions[s]=F}else process.env.NODE_ENV!=="production"&&mu(F)&&(T.getters[s]=r?n.getters[s]:F,R&&(v._getters||(v._getters=D.markRaw([]))).push(s))}if(b(a,v),b(D.toRaw(a),v),Object.defineProperty(a,"$state",{get:()=>process.env.NODE_ENV!=="production"&&o?_.value:e.state.value[u],set:s=>{if(process.env.NODE_ENV!=="production"&&o)throw new Error("cannot set hotState");g(F=>{b(F,s)})}}),process.env.NODE_ENV!=="production"&&(a._hotUpdate=D.markRaw(s=>{a._hotUpdating=!0,s._hmrPayload.state.forEach(F=>{if(F in a.$state){const B=s.$state[F],O=a.$state[F];typeof B=="object"&&S(B)&&S(O)?fu(B,O):s.$state[F]=O}a[F]=D.toRef(s.$state,F)}),Object.keys(a.$state).forEach(F=>{F in s.$state||delete a[F]}),C=!1,l=!1,e.state.value[u]=D.toRef(s._hmrPayload,"hotState"),l=!0,D.nextTick().then(()=>{C=!0});for(const F in s._hmrPayload.actions){const B=s[F];a[F]=V(B,F)}for(const F in s._hmrPayload.getters){const B=s._hmrPayload.getters[F],O=r?D.computed(()=>(J(e),B.call(a,a))):B;a[F]=O}Object.keys(a._hmrPayload.getters).forEach(F=>{F in s._hmrPayload.getters||delete a[F]}),Object.keys(a._hmrPayload.actions).forEach(F=>{F in s._hmrPayload.actions||delete a[F]}),a._hmrPayload=s._hmrPayload,a._getters=s._getters,a._hotUpdating=!1})),(process.env.NODE_ENV!=="production"||typeof __VUE_PROD_DEVTOOLS__<"u"&&__VUE_PROD_DEVTOOLS__)&&process.env.NODE_ENV!=="test"&&R){const s={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(F=>{Object.defineProperty(a,F,b({value:a[F]},s))})}return e._p.forEach(s=>{if((process.env.NODE_ENV!=="production"||typeof __VUE_PROD_DEVTOOLS__<"u"&&__VUE_PROD_DEVTOOLS__)&&process.env.NODE_ENV!=="test"&&R){const F=c.run(()=>s({store:a,app:e._a,pinia:e,options:i}));Object.keys(F||{}).forEach(B=>a._customProperties.add(B)),b(a,F)}else b(a,c.run(()=>s({store:a,app:e._a,pinia:e,options:i})))}),process.env.NODE_ENV!=="production"&&a.$state&&typeof a.$state=="object"&&typeof a.$state.constructor=="function"&&!a.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
6
+ state: () => new MyClass()
7
+ Found in store "${a.$id}".`),p&&r&&n.hydrate&&n.hydrate(a.$state,p),C=!0,l=!0,a}/*! #__NO_SIDE_EFFECTS__ */function zu(u,t,n){let e;const o=typeof t=="function";e=o?n:t;function r(c,i){const d=D.hasInjectionContext();if(c=(process.env.NODE_ENV==="test"&&L&&L._testing?null:c)||(d?D.inject(uu,null):null),c&&J(c),process.env.NODE_ENV!=="production"&&!L)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
8
+ See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
9
+ This will fail in production.`);c=L,c._s.has(u)||(o?Du(u,t,e,c):_u(u,e,c),process.env.NODE_ENV!=="production"&&(r._pinia=c));const C=c._s.get(u);if(process.env.NODE_ENV!=="production"&&i){const l="__hot:"+u,A=o?Du(l,t,e,c,!0):_u(l,b({},e),c,!0);i._hotUpdate(A),delete c.state.value[l],c._s.delete(l)}if(process.env.NODE_ENV!=="production"&&R){const l=D.getCurrentInstance();if(l&&l.proxy&&!i){const A=l.proxy,h="_pStores"in A?A._pStores:A._pStores={};h[u]=C}}return C}return r.$id=u,r}const gu=zu("login",{state:()=>({loginStatus:k.NOT}),actions:{setLoginStatus(u){this.loginStatus=u}},getters:{isLoginFailed(){return this.loginStatus===k.FAILED},isLoginNot(){return this.loginStatus===k.NOT},isLoggingIn(){return this.loginStatus===k.DOING},isLogined(){return this.loginStatus===k.DONE}}});var k=(u=>(u[u.FAILED=-1]="FAILED",u[u.NOT=0]="NOT",u[u.DOING=1]="DOING",u[u.DONE=2]="DONE",u))(k||{});const nu={CSRF_TOKEN:"_U_T_"},Yu=300,Gu=u=>{nu.CSRF_TOKEN=u},yu=()=>({csrfCookie:q.get(nu.CSRF_TOKEN)}),ou=()=>{q.remove(nu.CSRF_TOKEN)},Ju=u=>{window.location.href=u},x=u=>{gu().setLoginStatus(u)},Fu=async(u,t=!1)=>{const{csrfCookie:n}=yu();if(!(!n||t))try{x(1);const e=await u();if(e!=null&&e.data)return x(2),e.data;x(-1),ou();return}catch{x(-1),ou();return}},Qu=u=>{window.location.href=u,setTimeout(()=>{x(0)},Yu)},Zu=(u,t,n,e,o=!1)=>{const r=gu();D.watch(()=>e.path,async(c,i)=>{if(c===i||r.isLogined)return;u.some(C=>c.includes(C))?n.value=await Fu(t,o):Fu(t,o).then(C=>{n.value=C})},{immediate:!0})};E.LOGIN_STATUS=k,E.ScreenConfig=I,E.Size=cu,E.clearUserAuth=ou,E.createTheme=ju,E.doLogin=Ju,E.doLogout=Qu,E.getUserAuth=yu,E.setLoginKeys=Gu,E.setStatus=x,E.tryLogin=Fu,E.useAnalytics=Wu,E.useClipboard=Tu,E.useElementEventAnalytics=Hu,E.useLocale=Vu,E.useLoginWatcher=Zu,E.useMdRender=wu,E.useScreen=ku,E.useTheme=xu,E.useWatchAnalytics=Uu,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
@@ -0,0 +1,18 @@
1
+ import { LOGIN_STATUS } from '../core/useLogin';
2
+ /**
3
+ * 登录状态 Store
4
+ */
5
+ export declare const useLoginStore: import('pinia').StoreDefinition<"login", {
6
+ loginStatus: LOGIN_STATUS;
7
+ }, {
8
+ isLoginFailed(): boolean;
9
+ isLoginNot(): boolean;
10
+ isLoggingIn(): boolean;
11
+ isLogined(): boolean;
12
+ }, {
13
+ /**
14
+ * 设置登录状态
15
+ * @param status - 登录状态值
16
+ */
17
+ setLoginStatus(status: LOGIN_STATUS): void;
18
+ }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opendesign-plus-test/composables",
3
- "version": "0.0.1-rc.5",
3
+ "version": "0.0.1-rc.6",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",