@das-fed/upf-utils 6.4.0-dev.255 → 6.4.0-dev.256

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.
Files changed (65) hide show
  1. package/api-services/modules/app-manage/es5.js +1075 -1063
  2. package/api-services/modules/app-manage/index.js +874 -856
  3. package/api-services/modules/app-manage/index.js.gz +0 -0
  4. package/api-services/modules/authentication/es5.js +1037 -1047
  5. package/api-services/modules/authentication/index.js +829 -843
  6. package/api-services/modules/authentication/index.js.gz +0 -0
  7. package/api-services/modules/bems/es5.js +979 -981
  8. package/api-services/modules/bems/index.js +773 -777
  9. package/api-services/modules/bems/index.js.gz +0 -0
  10. package/api-services/modules/contract/es5.js +1063 -1075
  11. package/api-services/modules/contract/index.js +856 -874
  12. package/api-services/modules/contract/index.js.gz +0 -0
  13. package/api-services/modules/enterpriseright/es5.js +1048 -1039
  14. package/api-services/modules/enterpriseright/index.js +846 -832
  15. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  16. package/api-services/modules/es5.js +1066 -1064
  17. package/api-services/modules/file/es5.js +980 -978
  18. package/api-services/modules/file/index.js +763 -759
  19. package/api-services/modules/file/index.js.gz +0 -0
  20. package/api-services/modules/index.js +807 -803
  21. package/api-services/modules/index.js.gz +0 -0
  22. package/api-services/modules/link/es5.js +975 -978
  23. package/api-services/modules/link/index.js +769 -773
  24. package/api-services/modules/link/index.js.gz +0 -0
  25. package/api-services/modules/portal/es5.js +1075 -1063
  26. package/api-services/modules/portal/index.js +874 -856
  27. package/api-services/modules/portal/index.js.gz +0 -0
  28. package/api-services/modules/space-manage/es5.js +1048 -1039
  29. package/api-services/modules/space-manage/index.js +846 -832
  30. package/api-services/modules/space-manage/index.js.gz +0 -0
  31. package/api-services/modules/super-admin/es5.js +1046 -1055
  32. package/api-services/modules/super-admin/index.js +834 -848
  33. package/api-services/modules/super-admin/index.js.gz +0 -0
  34. package/api-services/modules/tool/es5.js +1075 -1063
  35. package/api-services/modules/tool/index.js +874 -856
  36. package/api-services/modules/tool/index.js.gz +0 -0
  37. package/api-services/src/create-service/es5.js +1047 -1035
  38. package/api-services/src/create-service/index.js +846 -828
  39. package/api-services/src/create-service/index.js.gz +0 -0
  40. package/common-info/getPermissionMethod/es5.js +1184 -1181
  41. package/common-info/getPermissionMethod/index.js +945 -941
  42. package/common-info/getPermissionMethod/index.js.gz +0 -0
  43. package/esm-map.json +6 -6
  44. package/package.json +3 -3
  45. package/theme/es5.d.ts +22 -2
  46. package/theme/es5.js +390 -310
  47. package/theme/index.d.ts +22 -2
  48. package/theme/index.js +309 -250
  49. package/theme/index.js.gz +0 -0
  50. package/theme/presets/color.d.ts +0 -7
  51. package/theme/presets/default.d.ts +0 -13
  52. package/theme/presets/es5.js +0 -440
  53. package/theme/presets/index.js +0 -249
  54. package/theme/presets/index.js.gz +0 -0
  55. package/theme/presets/presets/cjb.d.ts +0 -4
  56. package/theme/presets/presets/default.d.ts +0 -13
  57. package/theme/presets/presets/dkh.d.ts +0 -4
  58. package/theme/presets/presets/index.d.ts +0 -8
  59. package/theme/presets/presets/ssl.d.ts +0 -4
  60. package/theme/presets/source-variables.d.ts +0 -35
  61. package/theme/vue/es5.d.ts +0 -8
  62. package/theme/vue/es5.js +0 -1794
  63. package/theme/vue.d.ts +0 -8
  64. package/theme/vue.js +0 -1083
  65. package/theme/vue.js.gz +0 -0
package/theme/index.js CHANGED
@@ -1,9 +1,10 @@
1
- import { bus as le } from "@das-fed/mframe";
2
- const m = "#ffffff", g = "#000000", ie = 0.115, q = (e) => {
1
+ import { bus as pe } from "@das-fed/mframe";
2
+ import { ref as me, onMounted as de, onUnmounted as ge } from "vue";
3
+ const m = "#ffffff", d = "#000000", be = 0.115, re = (e) => {
3
4
  const r = String(e || "").trim();
4
5
  return /^#([\da-f]{3}|[\da-f]{6})$/i.test(r) ? r.length === 4 ? `#${r.slice(1).split("").map((t) => `${t}${t}`).join("")}` : r : "";
5
- }, k = (e) => {
6
- const r = q(e);
6
+ }, D = (e) => {
7
+ const r = re(e);
7
8
  if (!r)
8
9
  return null;
9
10
  const t = r.slice(1);
@@ -12,19 +13,19 @@ const m = "#ffffff", g = "#000000", ie = 0.115, q = (e) => {
12
13
  green: Number.parseInt(t.slice(2, 4), 16),
13
14
  blue: Number.parseInt(t.slice(4, 6), 16)
14
15
  };
15
- }, _ = (e) => Math.min(255, Math.max(0, Math.round(e))), J = (e, r, t, o) => {
16
- const u = k(e), n = k(r);
16
+ }, V = (e) => Math.min(255, Math.max(0, Math.round(e))), te = (e, r, t, o) => {
17
+ const u = D(e), n = D(r);
17
18
  if (!u || !n)
18
19
  return o;
19
- const l = Math.min(1, Math.max(0, t)), i = _(u.red * l + n.red * (1 - l)), f = _(u.green * l + n.green * (1 - l)), c = _(u.blue * l + n.blue * (1 - l));
20
- return `#${[i, f, c].map((p) => p.toString(16).padStart(2, "0")).join("")}`;
21
- }, fe = (e, r, t) => {
22
- const o = k(e);
20
+ const l = Math.min(1, Math.max(0, t)), i = V(u.red * l + n.red * (1 - l)), s = V(u.green * l + n.green * (1 - l)), c = V(u.blue * l + n.blue * (1 - l));
21
+ return `#${[i, s, c].map((p) => p.toString(16).padStart(2, "0")).join("")}`;
22
+ }, he = (e, r, t) => {
23
+ const o = D(e);
23
24
  if (!o)
24
25
  return t;
25
26
  const u = Math.min(1, Math.max(0, r));
26
27
  return `rgba(${o.red}, ${o.green}, ${o.blue}, ${u})`;
27
- }, H = (e, r = m) => J(e || "#5582F3", r || m, ie, "#ebf1fe"), P = "#5582f3", L = "#e63946", se = [
28
+ }, R = (e, r = m) => te(e || "#5582F3", r || m, be, "#ebf1fe"), W = "#5582f3", G = "#e63946", ye = [
28
29
  {
29
30
  group: "foundation",
30
31
  name: "brand",
@@ -107,7 +108,7 @@ const m = "#ffffff", g = "#000000", ie = 0.115, q = (e) => {
107
108
  description: "圆角和阴影等样式效果",
108
109
  variables: ["--upf-border-radius", "--upf-box-shadow", "--upf-box-shadow-elevated"]
109
110
  }
110
- ], T = [
111
+ ], F = [
111
112
  { name: "--upf-brand-primary", label: "品牌主色", hint: "品牌主色,建议用于导航背景、Logo等品牌识别场景", category: "brand" },
112
113
  { name: "--upf-brand-secondary", label: "品牌辅色", hint: "品牌辅色,用于辅助品牌识别和强调元素", category: "brand" },
113
114
  { name: "--upf-color-primary", label: "主色", hint: "功能主色,用于按钮、交互元素、状态反馈", category: "basic" },
@@ -116,7 +117,7 @@ const m = "#ffffff", g = "#000000", ie = 0.115, q = (e) => {
116
117
  label: "主色高亮背景",
117
118
  hint: "主色配套高亮背景,默认跟随主色自动生成透明背景,也可手动覆盖",
118
119
  category: "basic",
119
- fallback: (e) => H(e["--upf-color-primary"], e["--upf-bg-primary"]),
120
+ fallback: (e) => R(e["--upf-color-primary"], e["--upf-bg-primary"]),
120
121
  fallbackDeps: ["--upf-color-primary", "--upf-bg-primary"]
121
122
  },
122
123
  { name: "--upf-color-success", label: "成功色", hint: "成功状态色,用于成功提示、成功按钮", category: "basic" },
@@ -160,14 +161,14 @@ const m = "#ffffff", g = "#000000", ie = 0.115, q = (e) => {
160
161
  { name: "--upf-border-radius", label: "圆角", hint: "圆角大小,用于组件圆角", category: "effect" },
161
162
  { name: "--upf-box-shadow", label: "阴影", hint: "阴影效果,用于普通阴影", category: "effect" },
162
163
  { name: "--upf-box-shadow-elevated", label: "浮层阴影", hint: "浮层阴影,用于弹窗、浮层阴影", category: "effect" }
163
- ], ce = T.map((e) => e.name), pe = T.reduce((e, r) => (e[r.name] = r.label, e), {}), me = T.reduce((e, r) => (e[r.name] = r.hint, e), {}), ge = {
164
+ ], ve = F.map((e) => e.name), xe = F.reduce((e, r) => (e[r.name] = r.label, e), {}), Ee = F.reduce((e, r) => (e[r.name] = r.hint, e), {}), Te = {
164
165
  "--upf-nav-bg": "--upf-brand-primary",
165
166
  "--upf-color-primary-bg": "--upf-color-primary",
166
167
  "--upf-menu-active-text": "--upf-color-primary",
167
168
  "--upf-tab-active-text": "--upf-color-primary"
168
- }, h = {
169
- "--upf-color-primary": P,
170
- "--upf-color-primary-bg": H(P),
169
+ }, x = {
170
+ "--upf-color-primary": W,
171
+ "--upf-color-primary-bg": R(W),
171
172
  "--upf-color-success": "#52c41a",
172
173
  "--upf-color-warning": "#faad14",
173
174
  "--upf-color-error": "#ff4d4f",
@@ -182,9 +183,9 @@ const m = "#ffffff", g = "#000000", ie = 0.115, q = (e) => {
182
183
  "--upf-tab-text": "#666666",
183
184
  "--upf-tab-active-bg": "#ffffff",
184
185
  "--upf-border-radius": "4px"
185
- }, X = {
186
+ }, h = {
186
187
  default: {
187
- ...h,
188
+ ...x,
188
189
  "--upf-brand-primary": "#0e5fd8",
189
190
  "--upf-brand-secondary": "#3579de",
190
191
  "--upf-text-primary": "#231815",
@@ -209,7 +210,7 @@ const m = "#ffffff", g = "#000000", ie = 0.115, q = (e) => {
209
210
  "--upf-box-shadow-elevated": "0 4px 16px rgba(0, 0, 0, 0.15)"
210
211
  },
211
212
  cjb: {
212
- ...h,
213
+ ...x,
213
214
  "--upf-brand-primary": "#ffffff",
214
215
  "--upf-brand-secondary": "#f2f6ff",
215
216
  "--upf-text-primary": "#212121",
@@ -234,7 +235,7 @@ const m = "#ffffff", g = "#000000", ie = 0.115, q = (e) => {
234
235
  "--upf-box-shadow-elevated": "0 4px 16px rgba(0, 0, 0, 0.12)"
235
236
  },
236
237
  ssl: {
237
- ...h,
238
+ ...x,
238
239
  "--upf-brand-primary": "#1f2346",
239
240
  "--upf-brand-secondary": "#2d3158",
240
241
  "--upf-text-primary": "#231815",
@@ -260,11 +261,11 @@ const m = "#ffffff", g = "#000000", ie = 0.115, q = (e) => {
260
261
  "--upf-box-shadow-elevated": "0 10px 28px rgba(35, 41, 75, 0.12)"
261
262
  },
262
263
  dkh: {
263
- ...h,
264
+ ...x,
264
265
  "--upf-brand-primary": "#eb0e1b",
265
266
  "--upf-brand-secondary": "#f15760",
266
- "--upf-color-primary": L,
267
- "--upf-color-primary-bg": H(L),
267
+ "--upf-color-primary": G,
268
+ "--upf-color-primary-bg": R(G),
268
269
  "--upf-text-primary": "#231815",
269
270
  "--upf-text-secondary": "#666666",
270
271
  "--upf-text-placeholder": "#bfbfbf",
@@ -286,7 +287,7 @@ const m = "#ffffff", g = "#000000", ie = 0.115, q = (e) => {
286
287
  "--upf-box-shadow": "0 2px 8px rgba(0, 0, 0, 0.08)",
287
288
  "--upf-box-shadow-elevated": "0 4px 16px rgba(0, 0, 0, 0.12)"
288
289
  }
289
- }, de = (e, r) => {
290
+ }, Ce = (e, r) => {
290
291
  if (!r)
291
292
  return "";
292
293
  if (typeof r == "function")
@@ -298,48 +299,40 @@ const m = "#ffffff", g = "#000000", ie = 0.115, q = (e) => {
298
299
  return u;
299
300
  }
300
301
  return "";
301
- }, U = (e) => Object.entries(e || {}).reduce((r, [t, o]) => (r[t] = String(o ?? "").trim(), r), {}), ar = () => [...ce], ur = () => ({ ...pe }), nr = () => ({ ...me }), lr = () => se.map((e) => ({
302
+ }, Y = (e) => Object.entries(e || {}).reduce((r, [t, o]) => (r[t] = String(o ?? "").trim(), r), {}), pr = () => [...ve], mr = () => ({ ...xe }), dr = () => ({ ...Ee }), gr = () => ye.map((e) => ({
302
303
  ...e,
303
304
  variables: [...e.variables]
304
- })), ir = () => ({ ...ge }), be = (e, r = X.default) => {
305
- const t = U(e), o = U(r), u = {
305
+ })), br = () => ({ ...Te }), Se = (e, r = h.default) => {
306
+ const t = Y(e), o = Y(r), u = {
306
307
  ...o,
307
308
  ...t
308
309
  };
309
- return T.reduce((n, l) => {
310
+ return F.reduce((n, l) => {
310
311
  var p;
311
- const i = t[l.name] || "", f = (p = l.fallbackDeps) == null ? void 0 : p.some((I) => !!t[I]), c = de({ ...u, ...n }, l.fallback);
312
- return n[l.name] = i || (f ? c : "") || o[l.name] || c, n;
312
+ const i = t[l.name] || "", s = (p = l.fallbackDeps) == null ? void 0 : p.some((K) => !!t[K]), c = Ce({ ...u, ...n }, l.fallback);
313
+ return n[l.name] = i || (s ? c : "") || o[l.name] || c, n;
313
314
  }, {});
314
- }, he = X.default, z = {
315
- name: "default",
316
- displayName: "经典蓝",
317
- description: "经典蓝导航主题,内容区沿用浅底与高亮蓝交互色",
318
- mode: "light",
319
- source: "preset",
320
- basePresetName: "default",
321
- variables: he
322
- }, Q = (e) => e, a = (e, r) => {
323
- const t = Q(e);
315
+ }, oe = (e) => e, a = (e, r) => {
316
+ const t = oe(e);
324
317
  return String((r ? t[r] : "") ?? "");
325
- }, s = (e, r) => r.map((t) => ({ target: t, from: e })), V = (e) => {
326
- const r = Q(e);
318
+ }, f = (e, r) => r.map((t) => ({ target: t, from: e })), M = (e) => {
319
+ const r = oe(e);
327
320
  return {
328
321
  ...Object.entries(r).reduce((o, [u, n]) => (o[u] = String(n ?? ""), o), {}),
329
- ...be(r)
322
+ ...Se(r)
330
323
  };
331
- }, ye = {
324
+ }, we = {
332
325
  "#5582f3": "#3761CA",
333
326
  "#e63946": "#C9303C"
334
- }, j = (e, r) => {
327
+ }, q = (e, r) => {
335
328
  const t = e || "#5582F3";
336
- return ye[q(t).toLowerCase()] || r(t, g, 0.84, "#3761CA");
337
- }, ve = "#999", xe = (e) => [e.themeName, e.basePresetName].some((r) => String(r || "").trim() === "dkh"), Ee = (e) => xe(e) ? ve : a(e.variables, "--upf-color-primary"), Te = (e) => Array.isArray(e) ? [...e] : [e], C = (e, r, t = {}) => r.reduce((o, u) => {
338
- const n = u.resolve ? u.resolve({ variables: e, result: o, mixHexColor: J, toRgbaColor: fe, ...t }) : u.from ? a(e, String(u.from)) : String(u.value ?? "");
339
- return Te(u.target).forEach((l) => {
329
+ return we[re(t).toLowerCase()] || r(t, d, 0.84, "#3761CA");
330
+ }, Fe = "#999", Ne = (e) => [e.themeName, e.basePresetName].some((r) => String(r || "").trim() === "dkh"), ke = (e) => Ne(e) ? Fe : a(e.variables, "--upf-color-primary"), _e = (e) => Array.isArray(e) ? [...e] : [e], N = (e, r, t = {}) => r.reduce((o, u) => {
331
+ const n = u.resolve ? u.resolve({ variables: e, result: o, mixHexColor: te, toRgbaColor: he, ...t }) : u.from ? a(e, String(u.from)) : String(u.value ?? "");
332
+ return _e(u.target).forEach((l) => {
340
333
  o[l] = String(n ?? "");
341
334
  }), o;
342
- }, {}), Ce = [
335
+ }, {}), Ae = [
343
336
  { target: "--upf-primary", from: "--upf-color-primary" },
344
337
  { target: "--upf-text", from: "--upf-text-primary" },
345
338
  { target: "--upf-surface", from: "--upf-bg-primary" },
@@ -349,7 +342,7 @@ const m = "#ffffff", g = "#000000", ie = 0.115, q = (e) => {
349
342
  { target: "--upf-menu-item-hover-bg", from: "--upf-menu-hover-bg" },
350
343
  { target: "--upf-menu-item-active-bg", from: "--upf-menu-active-bg" },
351
344
  { target: "--upf-menu-item-active-text", from: "--upf-menu-active-text" }
352
- ], Se = [
345
+ ], He = [
353
346
  { target: "--el-color-primary", from: "--upf-color-primary" },
354
347
  { target: "--el-color-success", from: "--upf-color-success" },
355
348
  { target: "--el-color-warning", from: "--upf-color-warning" },
@@ -382,13 +375,13 @@ const m = "#ffffff", g = "#000000", ie = 0.115, q = (e) => {
382
375
  target: "--el-checkbox-input-border",
383
376
  resolve: ({ variables: e }) => `1px solid ${a(e, "--upf-border-color")}`
384
377
  }
385
- ], we = [
378
+ ], Ve = [
386
379
  { target: "--das-ui-color-primary-level1", from: "--upf-color-primary-bg" },
387
- ...s("--upf-color-primary-bg", [
380
+ ...f("--upf-color-primary-bg", [
388
381
  "--das-ui-color-primary-level1",
389
382
  "--das-ui-upload-bgcolor-hover"
390
383
  ]),
391
- ...s("--upf-bg-primary", [
384
+ ...f("--upf-bg-primary", [
392
385
  "--das-black-list-mange-color-white"
393
386
  ]),
394
387
  { target: "--das-ui-color-primary", from: "--upf-color-primary" },
@@ -466,7 +459,7 @@ const m = "#ffffff", g = "#000000", ie = 0.115, q = (e) => {
466
459
  { target: "--das-input-base-border-color", from: "--upf-border-color" },
467
460
  {
468
461
  target: ["--upf-form-active-border-color", "--das-input-active-border-color", "--upf-date-picker-active-border-color"],
469
- resolve: Ee
462
+ resolve: ke
470
463
  },
471
464
  { target: "--das-input-font-color", from: "--upf-text-primary" },
472
465
  { target: "--das-input-sub-font-color", from: "--upf-text-placeholder" },
@@ -552,15 +545,15 @@ const m = "#ffffff", g = "#000000", ie = 0.115, q = (e) => {
552
545
  },
553
546
  {
554
547
  target: "--das-ui-color-primary-level7",
555
- resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary"), g, 0.82, "#104CCC")
548
+ resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary"), d, 0.82, "#104CCC")
556
549
  },
557
550
  {
558
551
  target: "--das-ui-color-primary-level8",
559
- resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary"), g, 0.68, "#002EA3")
552
+ resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary"), d, 0.68, "#002EA3")
560
553
  },
561
554
  {
562
555
  target: "--das-ui-color-primary-level9",
563
- resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary"), g, 0.5, "#001F7A")
556
+ resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary"), d, 0.5, "#001F7A")
564
557
  },
565
558
  {
566
559
  target: "--das-ui-color-danger-level1",
@@ -627,22 +620,22 @@ const m = "#ffffff", g = "#000000", ie = 0.115, q = (e) => {
627
620
  },
628
621
  {
629
622
  target: "--das-ui-button-primary-hover",
630
- resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary"), g, 0.82, "#104CCC")
623
+ resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary"), d, 0.82, "#104CCC")
631
624
  },
632
- ...s("--upf-color-primary", [
625
+ ...f("--upf-color-primary", [
633
626
  "--das-ui-search-form-primary-color"
634
627
  ]),
635
- ...s("--upf-text-primary", [
628
+ ...f("--upf-text-primary", [
636
629
  "--das-ui-tag-list-text-color"
637
630
  ]),
638
- ...s("--upf-border-color", [
631
+ ...f("--upf-border-color", [
639
632
  "--das-ui-tag-list-border-color",
640
633
  "--das-ui-upload-border-color"
641
634
  ]),
642
- ...s("--upf-bg-secondary", [
635
+ ...f("--upf-bg-secondary", [
643
636
  "--das-ui-upload-bgcolor"
644
637
  ]),
645
- ...s("--upf-text-secondary", [
638
+ ...f("--upf-text-secondary", [
646
639
  "--das-ui-search-form-tip-color"
647
640
  ]),
648
641
  { target: "--das-ui-layout-header-menu-border-color", from: "--upf-nav-border-color" },
@@ -695,37 +688,37 @@ const m = "#ffffff", g = "#000000", ie = 0.115, q = (e) => {
695
688
  { target: "--das-ui-layout-aside-menu-expired-color", from: "--upf-text-disabled" },
696
689
  { target: "--das-ui-layout-aside-menu-top-left-icon-color", from: "--upf-color-primary" },
697
690
  { target: "--das-ui-layout-aside-menu-top-right-icon-color", from: "--upf-text-secondary" }
698
- ], Fe = [
691
+ ], Be = [
699
692
  // 同源变量集中维护,新增 target 时优先追加到对应 source 分组。
700
- ...s("--upf-color-primary", [
693
+ ...f("--upf-color-primary", [
701
694
  "--upf-button-primary",
702
695
  "--upf-notification-primary-bg"
703
696
  ]),
704
- ...s("--upf-text-primary", [
697
+ ...f("--upf-text-primary", [
705
698
  "--upf-button-default-text",
706
699
  "--upf-notification-title-text",
707
700
  "--upf-text-tooltip-text"
708
701
  ]),
709
- ...s("--upf-border-color", [
702
+ ...f("--upf-border-color", [
710
703
  "--upf-button-default-border",
711
704
  "--upf-text-tooltip-border"
712
705
  ]),
713
- ...s("--upf-text-disabled", [
706
+ ...f("--upf-text-disabled", [
714
707
  "--upf-button-default-disabled",
715
708
  "--upf-switch-off-color",
716
709
  "--upf-message-thumb",
717
710
  "--upf-text-tooltip-scrollbar-thumb"
718
711
  ]),
719
- ...s("--upf-bg-secondary", [
712
+ ...f("--upf-bg-secondary", [
720
713
  "--upf-button-default-disabled-bg",
721
714
  "--upf-table-header-bg"
722
715
  ]),
723
- ...s("--upf-bg-primary", ["--upf-checkbox-filter-bg"]),
724
- ...s("--upf-color-info", ["--upf-loading-color-1"]),
725
- ...s("--upf-brand-secondary", ["--upf-loading-color-2"]),
726
- ...s("--upf-color-success", ["--upf-loading-color-3"]),
727
- ...s("--upf-divider-color", ["--upf-loading-color-6"]),
728
- ...s("--upf-text-secondary", [
716
+ ...f("--upf-bg-primary", ["--upf-checkbox-filter-bg"]),
717
+ ...f("--upf-color-info", ["--upf-loading-color-1"]),
718
+ ...f("--upf-brand-secondary", ["--upf-loading-color-2"]),
719
+ ...f("--upf-color-success", ["--upf-loading-color-3"]),
720
+ ...f("--upf-divider-color", ["--upf-loading-color-6"]),
721
+ ...f("--upf-text-secondary", [
729
722
  "--upf-message-close",
730
723
  "--upf-notification-description-text",
731
724
  "--upf-notification-close",
@@ -758,7 +751,7 @@ const m = "#ffffff", g = "#000000", ie = 0.115, q = (e) => {
758
751
  },
759
752
  {
760
753
  target: "--upf-button-active",
761
- resolve: ({ variables: e, mixHexColor: r }) => j(a(e, "--upf-color-primary"), r)
754
+ resolve: ({ variables: e, mixHexColor: r }) => q(a(e, "--upf-color-primary"), r)
762
755
  },
763
756
  {
764
757
  target: "--upf-button-disabled",
@@ -766,15 +759,15 @@ const m = "#ffffff", g = "#000000", ie = 0.115, q = (e) => {
766
759
  },
767
760
  {
768
761
  target: "--upf-button-set",
769
- resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary") || "#5582F3", g, 0.78, "#4367C1")
762
+ resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary") || "#5582F3", d, 0.78, "#4367C1")
770
763
  },
771
764
  {
772
765
  target: "--upf-button-set-hover",
773
- resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary") || "#5582F3", g, 0.86, "#4C74DA")
766
+ resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary") || "#5582F3", d, 0.86, "#4C74DA")
774
767
  },
775
768
  {
776
769
  target: "--upf-button-set-active",
777
- resolve: ({ variables: e, mixHexColor: r }) => j(a(e, "--upf-color-primary"), r)
770
+ resolve: ({ variables: e, mixHexColor: r }) => q(a(e, "--upf-color-primary"), r)
778
771
  },
779
772
  {
780
773
  target: "--upf-button-set-disabled",
@@ -978,72 +971,112 @@ const m = "#ffffff", g = "#000000", ie = 0.115, q = (e) => {
978
971
  },
979
972
  { target: "--upf-app-container-app-bg-override", from: "--upf-nav-bg" },
980
973
  { target: "--upf-app-container-app-text-override", from: "--upf-nav-text" }
981
- ], Ne = (e, r = {}) => C(e, Ce, r), _e = (e, r = {}) => C(e, Se, r), Ae = (e, r = {}) => C(e, we, r), ke = (e, r = {}) => C(e, Fe, r), B = (e, r = {}) => {
982
- const t = V(e), { includeElementAndDasUiBridges: o = !0, themeName: u, basePresetName: n } = r, l = { themeName: u, basePresetName: n }, i = ke(t, l), f = {
974
+ ], De = (e, r = {}) => N(e, Ae, r), Re = (e, r = {}) => N(e, He, r), Me = (e, r = {}) => N(e, Ve, r), Oe = (e, r = {}) => N(e, Be, r), O = (e, r = {}) => {
975
+ const t = M(e), { includeElementAndDasUiBridges: o = !0, themeName: u, basePresetName: n } = r, l = { themeName: u, basePresetName: n }, i = Oe(t, l), s = {
983
976
  ...t,
984
977
  ...i
985
978
  };
986
979
  return {
987
980
  ...t,
988
981
  ...i,
989
- ...o ? _e(f, l) : {},
990
- ...o ? Ae(f, l) : {},
991
- ...Ne(f, l)
982
+ ...o ? Re(s, l) : {},
983
+ ...o ? Me(s, l) : {},
984
+ ...De(s, l)
992
985
  };
993
- }, D = () => ({
994
- ...z,
995
- variables: { ...z.variables }
996
- }), $ = "themeChange", x = "upf-theme-root-vars", He = "upf-default-theme-vars", E = "upf-theme-config", Ve = ["--upf-color-primary", "--upf-brand-primary"], K = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakSet(), b = /* @__PURE__ */ new WeakMap(), v = (e) => e ? Object.entries(e).reduce((r, [t, o]) => (r[t] = String(o ?? ""), r), {}) : null, R = (e) => e || (typeof document > "u" ? null : document.documentElement), Z = (e) => !!(e && String(e.tagName || "").toLowerCase() === "style"), S = (e) => e.head || e.documentElement, ee = (e, r) => {
997
- const t = S(e);
986
+ }, Pe = ["default", "cjb", "ssl", "dkh"], y = (e) => ({ ...e }), C = {
987
+ default: {
988
+ name: "default",
989
+ displayName: "经典蓝",
990
+ description: "经典蓝导航主题,内容区沿用浅底与高亮蓝交互色",
991
+ mode: "light",
992
+ source: "preset",
993
+ basePresetName: "default",
994
+ variables: y(h.default)
995
+ },
996
+ cjb: {
997
+ name: "cjb",
998
+ displayName: "纯净白",
999
+ description: "白底壳层主题,内容区沿用浅蓝高亮交互色",
1000
+ mode: "light",
1001
+ source: "preset",
1002
+ basePresetName: "cjb",
1003
+ variables: y(h.cjb)
1004
+ },
1005
+ ssl: {
1006
+ name: "ssl",
1007
+ displayName: "深邃蓝",
1008
+ description: "深邃蓝壳层主题,内容区沿用浅底与高亮蓝交互色",
1009
+ mode: "dark",
1010
+ source: "preset",
1011
+ basePresetName: "ssl",
1012
+ variables: y(h.ssl)
1013
+ },
1014
+ dkh: {
1015
+ name: "dkh",
1016
+ displayName: "大咖红",
1017
+ description: "大咖红主题,壳层与内容交互色保持同系红色",
1018
+ mode: "light",
1019
+ source: "preset",
1020
+ basePresetName: "dkh",
1021
+ variables: y(h.dkh)
1022
+ }
1023
+ }, P = (e) => ({
1024
+ ...e,
1025
+ variables: y(e.variables)
1026
+ }), v = (e) => {
1027
+ const r = String(e || "").trim();
1028
+ return C[r] ? P(C[r]) : void 0;
1029
+ }, hr = () => Pe.map((e) => P(C[e])), I = () => P(C.default), J = "themeChange", S = "upf-theme-root-vars", Ie = "upf-default-theme-vars", w = "upf-theme-config", Le = ["--upf-color-primary", "--upf-brand-primary"], X = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakSet(), b = /* @__PURE__ */ new WeakMap(), T = (e) => e ? Object.entries(e).reduce((r, [t, o]) => (r[t] = String(o ?? ""), r), {}) : null, L = (e) => e || (typeof document > "u" ? null : document.documentElement), ae = (e) => !!(e && String(e.tagName || "").toLowerCase() === "style"), k = (e) => e.head || e.documentElement, ue = (e, r) => {
1030
+ const t = k(e);
998
1031
  t && (r.parentNode !== t || t.lastElementChild !== r) && t.appendChild(r);
999
- }, G = (e) => {
1032
+ }, Z = (e) => {
1000
1033
  var u;
1001
- if (W.has(e))
1034
+ if (Q.has(e))
1002
1035
  return;
1003
- const r = S(e), t = ((u = e.defaultView) == null ? void 0 : u.MutationObserver) || (typeof MutationObserver < "u" ? MutationObserver : void 0);
1036
+ const r = k(e), t = ((u = e.defaultView) == null ? void 0 : u.MutationObserver) || (typeof MutationObserver < "u" ? MutationObserver : void 0);
1004
1037
  if (!r || !t)
1005
1038
  return;
1006
1039
  new t(() => {
1007
- const n = e.getElementById(x);
1008
- Z(n) && ee(e, n);
1009
- }).observe(r, { childList: !0 }), W.add(e);
1010
- }, Be = (e) => {
1011
- const r = e.getElementById(x);
1012
- if (Z(r))
1013
- return ee(e, r), G(e), r;
1040
+ const n = e.getElementById(S);
1041
+ ae(n) && ue(e, n);
1042
+ }).observe(r, { childList: !0 }), Q.add(e);
1043
+ }, Ue = (e) => {
1044
+ const r = e.getElementById(S);
1045
+ if (ae(r))
1046
+ return ue(e, r), Z(e), r;
1014
1047
  const t = e.createElement("style");
1015
- return t.id = x, S(e).appendChild(t), G(e), t;
1016
- }, M = (e) => {
1048
+ return t.id = S, k(e).appendChild(t), Z(e), t;
1049
+ }, U = (e) => {
1017
1050
  const r = Object.entries(e).filter(([, t]) => String(t ?? "").trim()).map(([t, o]) => ` ${t}: ${String(o ?? "")};`).join(`
1018
1051
  `);
1019
1052
  return r ? `:root {
1020
1053
  ${r}
1021
1054
  }` : ":root {}";
1022
- }, De = (e = "default", r = {}) => {
1023
- const t = getSharedPresetTheme(e) || D();
1024
- return M(B(t.variables, {
1055
+ }, ze = (e = "default", r = {}) => {
1056
+ const t = v(e) || I();
1057
+ return U(O(t.variables, {
1025
1058
  ...r,
1026
1059
  themeName: r.themeName || t.name,
1027
1060
  basePresetName: r.basePresetName || t.basePresetName
1028
1061
  }));
1029
- }, fr = (e = {}) => De("default", e), Re = (e) => {
1030
- const r = e.getElementById(x);
1062
+ }, yr = (e = {}) => ze("default", e), je = (e) => {
1063
+ const r = e.getElementById(S);
1031
1064
  if (r != null && r.textContent)
1032
1065
  return !0;
1033
1066
  const t = b.get(e) || b.get(e.documentElement);
1034
1067
  return !!(t && Object.keys(t).length);
1035
- }, Me = (e) => {
1068
+ }, $e = (e) => {
1036
1069
  var o;
1037
1070
  const r = ((o = e.defaultView) == null ? void 0 : o.getComputedStyle) || (typeof getComputedStyle == "function" ? getComputedStyle : void 0);
1038
1071
  if (!r || !e.documentElement)
1039
1072
  return !1;
1040
1073
  const t = r(e.documentElement);
1041
- return Ve.some((u) => t.getPropertyValue(u).trim());
1042
- }, O = (e) => Object.prototype.toString.call(e) === "[object Object]", w = (e) => ({
1074
+ return Le.some((u) => t.getPropertyValue(u).trim());
1075
+ }, z = (e) => Object.prototype.toString.call(e) === "[object Object]", _ = (e) => ({
1043
1076
  themeName: e.name,
1044
1077
  basePresetName: e.basePresetName,
1045
1078
  variables: e.variables
1046
- }), y = () => w(D()), re = (e) => {
1079
+ }), E = () => _(I()), ne = (e) => {
1047
1080
  if (typeof window > "u")
1048
1081
  return null;
1049
1082
  try {
@@ -1051,31 +1084,31 @@ ${r}
1051
1084
  if (!r)
1052
1085
  return null;
1053
1086
  const t = JSON.parse(r);
1054
- return O(t) ? t : null;
1087
+ return z(t) ? t : null;
1055
1088
  } catch {
1056
1089
  return null;
1057
1090
  }
1058
- }, Oe = (e, r) => {
1059
- if (!O(e))
1091
+ }, Ke = (e, r) => {
1092
+ if (!z(e))
1060
1093
  return null;
1061
1094
  const t = { ...r };
1062
1095
  return Object.entries(e).forEach(([o, u]) => {
1063
1096
  !o.startsWith("--") || typeof u != "string" && typeof u != "number" || (t[o] = String(u));
1064
- }), V(t);
1065
- }, te = (e) => {
1066
- const r = O(e.customTheme) ? e.customTheme : null;
1097
+ }), M(t);
1098
+ }, le = (e) => {
1099
+ const r = z(e.customTheme) ? e.customTheme : null;
1067
1100
  if (!r)
1068
1101
  return null;
1069
- const t = String(r.basePresetName || e.remoteTheme || "").trim(), o = getSharedPresetTheme(t) || D(), u = Oe(r.variables, o.variables);
1102
+ const t = String(r.basePresetName || e.remoteTheme || "").trim(), o = v(t) || I(), u = Ke(r.variables, o.variables);
1070
1103
  return u ? {
1071
1104
  themeName: "custom",
1072
1105
  basePresetName: o.name,
1073
1106
  variables: u
1074
1107
  } : null;
1075
- }, Ie = (e) => {
1108
+ }, We = (e) => {
1076
1109
  if (!e.useStoredTheme)
1077
1110
  return null;
1078
- const r = String(e.storageKey || E).trim() || E, t = re(r);
1111
+ const r = String(e.storageKey || w).trim() || w, t = ne(r);
1079
1112
  if (!t)
1080
1113
  return null;
1081
1114
  const o = [t.currentTheme, t.remoteTheme];
@@ -1084,61 +1117,61 @@ ${r}
1084
1117
  if (!n)
1085
1118
  continue;
1086
1119
  if (n === "custom") {
1087
- const i = te(t);
1120
+ const i = le(t);
1088
1121
  if (i)
1089
1122
  return i;
1090
1123
  continue;
1091
1124
  }
1092
- const l = getSharedPresetTheme(n);
1125
+ const l = v(n);
1093
1126
  if (l)
1094
- return w(l);
1127
+ return _(l);
1095
1128
  }
1096
1129
  return null;
1097
- }, Pe = (e) => {
1130
+ }, Ge = (e) => {
1098
1131
  const r = e.documentElement, t = [r.getAttribute("data-theme"), r.getAttribute("data-skin")];
1099
1132
  for (const o of t) {
1100
- const u = getSharedPresetTheme(String(o || "").trim());
1133
+ const u = v(String(o || "").trim());
1101
1134
  if (u)
1102
- return w(u);
1135
+ return _(u);
1103
1136
  }
1104
1137
  return null;
1105
- }, Le = (e, r) => {
1138
+ }, Ye = (e, r) => {
1106
1139
  const t = String(r.presetName || "").trim();
1107
1140
  if (t) {
1108
1141
  if (t === "custom") {
1109
1142
  if (r.useStoredTheme === !1)
1110
- return y();
1111
- const u = String(r.storageKey || E).trim() || E, n = re(u);
1112
- return (n ? te(n) : null) || y();
1143
+ return E();
1144
+ const u = String(r.storageKey || w).trim() || w, n = ne(u);
1145
+ return (n ? le(n) : null) || E();
1113
1146
  }
1114
- const o = getSharedPresetTheme(t);
1115
- return o ? w(o) : y();
1147
+ const o = v(t);
1148
+ return o ? _(o) : E();
1116
1149
  }
1117
- return Pe(e) || Ie(r) || y();
1118
- }, Ue = (e, r) => {
1119
- const t = S(e);
1150
+ return Ge(e) || We(r) || E();
1151
+ }, qe = (e, r) => {
1152
+ const t = k(e);
1120
1153
  (r.parentNode !== t || t.firstChild !== r) && t.insertBefore(r, t.firstChild);
1121
- }, sr = (e = {}) => {
1154
+ }, vr = (e = {}) => {
1122
1155
  var p;
1123
1156
  if (typeof document > "u")
1124
1157
  return null;
1125
- const r = ((p = e.root) == null ? void 0 : p.ownerDocument) || document, t = Le(r, e), o = e.styleId || He;
1126
- if (!e.force && Re(r))
1158
+ const r = ((p = e.root) == null ? void 0 : p.ownerDocument) || document, t = Ye(r, e), o = e.styleId || Ie;
1159
+ if (!e.force && je(r))
1127
1160
  return null;
1128
1161
  const u = r.getElementById(o);
1129
- if (!e.force && !u && Me(r))
1162
+ if (!e.force && !u && $e(r))
1130
1163
  return null;
1131
1164
  const n = u || r.createElement("style");
1132
1165
  n.id || (n.id = o);
1133
- const l = e.themeName || t.themeName, i = e.basePresetName || t.basePresetName, f = M(B(t.variables, {
1166
+ const l = e.themeName || t.themeName, i = e.basePresetName || t.basePresetName, s = U(O(t.variables, {
1134
1167
  includeElementAndDasUiBridges: e.includeElementAndDasUiBridges,
1135
1168
  themeName: l,
1136
1169
  basePresetName: i
1137
1170
  }));
1138
- n.textContent !== f && (n.textContent = f), Ue(r, n);
1171
+ n.textContent !== s && (n.textContent = s), qe(r, n);
1139
1172
  const { setThemeAttributes: c = !0 } = e;
1140
1173
  return c && ((e.themeName || !r.documentElement.getAttribute("data-theme")) && r.documentElement.setAttribute("data-theme", l), e.skinName !== null && !r.documentElement.getAttribute("data-skin") && r.documentElement.setAttribute("data-skin", e.skinName || i)), n;
1141
- }, Y = (e, r) => {
1174
+ }, ee = (e, r) => {
1142
1175
  if (!e.length || !r.length)
1143
1176
  return;
1144
1177
  const t = new Set(r);
@@ -1146,22 +1179,22 @@ ${r}
1146
1179
  const u = e[o];
1147
1180
  t.has(u) && e.removeProperty(u);
1148
1181
  }
1149
- }, ze = (e, r) => {
1150
- const t = Be(e), o = M(r);
1151
- (K.get(e) !== o || t.textContent !== o) && (t.textContent = o, K.set(e, o));
1182
+ }, Je = (e, r) => {
1183
+ const t = Ue(e), o = U(r);
1184
+ (X.get(e) !== o || t.textContent !== o) && (t.textContent = o, X.set(e, o));
1152
1185
  const u = Object.keys(r);
1153
- Y(e.documentElement.style, u), e.body && Y(e.body.style, u);
1154
- }, je = (e) => {
1186
+ ee(e.documentElement.style, u), e.body && ee(e.body.style, u);
1187
+ }, Xe = (e) => {
1155
1188
  typeof window > "u" || (window.__UPF_THEME_SNAPSHOT__ = e);
1156
- }, $e = (e, r) => {
1157
- const t = v(r) || {}, o = e.ownerDocument || document;
1189
+ }, Qe = (e, r) => {
1190
+ const t = T(r) || {}, o = e.ownerDocument || document;
1158
1191
  b.set(e, t);
1159
1192
  const u = e === o.documentElement || e === o.body;
1160
1193
  u && b.set(o, t), u && typeof window < "u" && o === document && (window.__UPF_THEME_RUNTIME_VARIABLES__ = t);
1161
- }, Ke = (e) => {
1162
- const r = R(e), t = (r == null ? void 0 : r.ownerDocument) || (typeof document < "u" ? document : null), o = typeof window < "u" && t === document && window.__UPF_THEME_RUNTIME_VARIABLES__ || null;
1194
+ }, Ze = (e) => {
1195
+ const r = L(e), t = (r == null ? void 0 : r.ownerDocument) || (typeof document < "u" ? document : null), o = typeof window < "u" && t === document && window.__UPF_THEME_RUNTIME_VARIABLES__ || null;
1163
1196
  return (r ? b.get(r) : null) || (t ? b.get(t) : null) || o;
1164
- }, We = (e = !0) => {
1197
+ }, er = (e = !0) => {
1165
1198
  var r;
1166
1199
  if (typeof window > "u" || !window.name)
1167
1200
  return null;
@@ -1176,157 +1209,183 @@ ${r}
1176
1209
  } catch {
1177
1210
  return null;
1178
1211
  }
1179
- }, Ge = (e, r) => {
1212
+ }, rr = (e, r) => {
1180
1213
  if (r !== void 0)
1181
1214
  return r;
1182
1215
  const t = e.config || {};
1183
1216
  return String(t.basePresetName || t.name || e.themeName || "").trim() || null;
1184
- }, Ye = (e, r = {}) => {
1185
- const t = R(r.root);
1217
+ }, tr = (e, r = {}) => {
1218
+ const t = L(r.root);
1186
1219
  if (!t)
1187
1220
  return {};
1188
- const o = V(e), u = r.includeBridges === !1 ? Object.entries(o).reduce((l, [i, f]) => (l[i] = String(f ?? ""), l), {}) : B(o, {
1221
+ const o = M(e), u = r.includeBridges === !1 ? Object.entries(o).reduce((l, [i, s]) => (l[i] = String(s ?? ""), l), {}) : O(o, {
1189
1222
  includeElementAndDasUiBridges: r.includeElementAndDasUiBridges,
1190
1223
  themeName: r.themeName,
1191
1224
  basePresetName: r.basePresetName
1192
1225
  }), n = t.ownerDocument || document;
1193
- return t === n.documentElement || t === n.body ? ze(n, u) : Object.entries(u).forEach(([l, i]) => {
1226
+ return t === n.documentElement || t === n.body ? Je(n, u) : Object.entries(u).forEach(([l, i]) => {
1194
1227
  t.style.getPropertyValue(l) !== i && t.style.setProperty(l, i);
1195
- }), $e(t, u), r.themeName && t.setAttribute("data-theme", r.themeName), r.skinName === null ? t.removeAttribute("data-skin") : r.skinName && t.setAttribute("data-skin", r.skinName), u;
1196
- }, oe = (e, r = {}) => {
1197
- const t = e.config || {}, o = Ye(e.variables || {}, {
1228
+ }), Qe(t, u), r.themeName && t.setAttribute("data-theme", r.themeName), r.skinName === null ? t.removeAttribute("data-skin") : r.skinName && t.setAttribute("data-skin", r.skinName), u;
1229
+ }, ie = (e, r = {}) => {
1230
+ const t = e.config || {}, o = tr(e.variables || {}, {
1198
1231
  ...r,
1199
1232
  themeName: r.themeName || e.themeName,
1200
1233
  basePresetName: r.basePresetName || String(t.basePresetName || t.name || ""),
1201
- skinName: Ge(e, r.skinName)
1234
+ skinName: rr(e, r.skinName)
1202
1235
  });
1203
- return je(e), o;
1204
- }, A = (e, r, t = !0) => {
1236
+ return Xe(e), o;
1237
+ }, B = (e, r, t = !0) => {
1205
1238
  try {
1206
1239
  return e && e.__THEME_API__ || null;
1207
1240
  } catch {
1208
1241
  return null;
1209
1242
  }
1210
- }, F = (e = !0) => typeof window > "u" ? null : A(window, "current", e) || A(window.parent, "parent", e) || A(window.top, "top", e), ae = (e = {}) => {
1211
- const r = F(e.debug), t = r != null && r.getCurrentTheme ? r.getCurrentTheme() : null;
1243
+ }, A = (e = !0) => typeof window > "u" ? null : B(window, "current", e) || B(window.parent, "parent", e) || B(window.top, "top", e), j = (e = {}) => {
1244
+ const r = A(e.debug), t = r != null && r.getCurrentTheme ? r.getCurrentTheme() : null;
1212
1245
  if (t)
1213
1246
  return t;
1214
1247
  const o = (typeof window < "u" ? window.__UPF_THEME_SNAPSHOT__ : null) || null;
1215
- return o || We(e.debug);
1216
- }, qe = (e = {}) => {
1217
- const r = Ke(e.root);
1248
+ return o || er(e.debug);
1249
+ }, or = (e = {}) => {
1250
+ const r = Ze(e.root);
1218
1251
  if (r)
1219
- return v(r);
1220
- const t = ae(e);
1252
+ return T(r);
1253
+ const t = j(e);
1221
1254
  if (t != null && t.variables)
1222
- return v(t.variables);
1223
- const o = F(e.debug);
1255
+ return T(t.variables);
1256
+ const o = A(e.debug);
1224
1257
  if (!o)
1225
1258
  return null;
1226
1259
  const u = o.getVariables ? o.getVariables() : null;
1227
- return v(u);
1228
- }, cr = (e, r = !0) => {
1229
- const t = F(r);
1260
+ return T(u);
1261
+ }, ar = (e, r = !0) => {
1262
+ const t = A(r);
1230
1263
  return t != null && t.changeTheme ? (t.changeTheme(e), !0) : !1;
1231
- }, ue = (e = {}) => {
1232
- const r = ae(e);
1233
- return r ? (oe(r, e), r) : (e.debug, null);
1234
- }, pr = (e = {}) => ue({
1264
+ }, $ = (e = {}) => {
1265
+ const r = j(e);
1266
+ return r ? (ie(r, e), r) : (e.debug, null);
1267
+ }, xr = (e = {}) => $({
1235
1268
  includeBridges: !1,
1236
1269
  includeElementAndDasUiBridges: !1,
1237
1270
  ...e
1238
- }), Je = (e, r = !0) => {
1271
+ }), ur = (e, r = !0) => {
1239
1272
  try {
1240
- const t = le("microApp");
1241
- return t.event.on($, e), () => {
1242
- t.event.off($, e);
1273
+ const t = pe("microApp");
1274
+ return t.event.on(J, e), () => {
1275
+ t.event.off(J, e);
1243
1276
  };
1244
1277
  } catch {
1245
1278
  return null;
1246
1279
  }
1247
- }, Xe = (e, r) => e != null && e.onThemeChange ? e.onThemeChange(r) : null, Qe = (e) => e ? [String(e.themeName || ""), String(e.source || ""), String(Number(e.timestamp) || 0)].join("|") : "", Ze = (e) => {
1280
+ }, nr = (e, r) => e != null && e.onThemeChange ? e.onThemeChange(r) : null, lr = (e) => e ? [String(e.themeName || ""), String(e.source || ""), String(Number(e.timestamp) || 0)].join("|") : "", ir = (e) => {
1248
1281
  let r = "";
1249
1282
  return (t) => {
1250
- const o = Qe(t);
1283
+ const o = lr(t);
1251
1284
  o && o === r || (r = o, e(t));
1252
1285
  };
1253
- }, er = (e, r, t = !1, o = !0) => {
1254
- const u = Ze(r), n = Xe(e, u), l = Je(u, o), f = (t ? [n, l] : [l, n]).filter(Boolean);
1255
- return f.length ? () => {
1256
- f.forEach((c) => c());
1286
+ }, sr = (e, r, t = !1, o = !0) => {
1287
+ const u = ir(r), n = nr(e, u), l = ur(u, o), s = (t ? [n, l] : [l, n]).filter(Boolean);
1288
+ return s.length ? () => {
1289
+ s.forEach((c) => c());
1257
1290
  } : null;
1258
- }, rr = (e = {}) => {
1259
- const { syncOnInit: r = !0, preferWindowSubscription: t = !1, onThemeChange: o, debug: u = !0, ...n } = e, l = F(u);
1260
- let i = !1, f = null, c = null;
1291
+ }, se = (e = {}) => {
1292
+ const { syncOnInit: r = !0, preferWindowSubscription: t = !1, onThemeChange: o, debug: u = !0, ...n } = e, l = A(u);
1293
+ let i = !1, s = null, c = null;
1261
1294
  const p = () => {
1262
- i || ue({ ...n, debug: u });
1263
- }, N = er(l, (d) => {
1264
- oe(d, n), o && (d == null ? void 0 : d.source) !== "mountSync" && o(d);
1295
+ i || $({ ...n, debug: u });
1296
+ }, H = sr(l, (g) => {
1297
+ ie(g, n), o && (g == null ? void 0 : g.source) !== "mountSync" && o(g);
1265
1298
  }, t, u);
1266
- return r && (p(), (typeof queueMicrotask == "function" ? queueMicrotask : (ne) => Promise.resolve().then(ne))(p), typeof requestAnimationFrame == "function" ? f = requestAnimationFrame(() => {
1267
- f = null, p();
1299
+ return r && (p(), (typeof queueMicrotask == "function" ? queueMicrotask : (ce) => Promise.resolve().then(ce))(p), typeof requestAnimationFrame == "function" ? s = requestAnimationFrame(() => {
1300
+ s = null, p();
1268
1301
  }) : c = setTimeout(() => {
1269
1302
  c = null, p();
1270
1303
  }, 16)), () => {
1271
- i = !0, f !== null && typeof cancelAnimationFrame == "function" && (cancelAnimationFrame(f), f = null), c !== null && (clearTimeout(c), c = null), N == null || N();
1304
+ i = !0, s !== null && typeof cancelAnimationFrame == "function" && (cancelAnimationFrame(s), s = null), c !== null && (clearTimeout(c), c = null), H == null || H();
1272
1305
  };
1273
- }, mr = (e = {}) => rr({
1306
+ }, Er = (e = {}) => se({
1274
1307
  includeBridges: !1,
1275
1308
  includeElementAndDasUiBridges: !1,
1276
1309
  ...e
1277
- }), tr = (e, r) => {
1310
+ }), fe = (e, r) => {
1278
1311
  var n;
1279
- const t = R(r), o = String(e || "").trim();
1312
+ const t = L(r), o = String(e || "").trim();
1280
1313
  if (!t || !o)
1281
1314
  return "";
1282
1315
  const u = typeof getComputedStyle > "u" ? "" : getComputedStyle(t).getPropertyValue(o).trim();
1283
- return u || String(((n = qe({ root: t, debug: !1 })) == null ? void 0 : n[o]) ?? "");
1284
- }, gr = (e) => `var(${String(e || "").trim()})`, dr = (e, r) => ({
1285
- value: tr(String(e || "").trim(), r)
1286
- });
1316
+ return u || String(((n = or({ root: t, debug: !1 })) == null ? void 0 : n[o]) ?? "");
1317
+ }, Tr = (e) => `var(${String(e || "").trim()})`, Cr = (e, r) => ({
1318
+ value: fe(String(e || "").trim(), r)
1319
+ }), Sr = (e = {}) => {
1320
+ const r = me("default");
1321
+ let t = null;
1322
+ return de(() => {
1323
+ t = se({
1324
+ ...e,
1325
+ onThemeChange: (u) => {
1326
+ r.value = u.themeName, e.onThemeChange && e.onThemeChange(u);
1327
+ }
1328
+ });
1329
+ const o = j({ debug: e.debug });
1330
+ o && (r.value = o.themeName);
1331
+ }), ge(() => {
1332
+ t == null || t();
1333
+ }), {
1334
+ currentTheme: r,
1335
+ getVariable: (o) => fe(o, e.root),
1336
+ syncTheme: () => $(e),
1337
+ changeTheme: (o) => ar(o, e.debug)
1338
+ };
1339
+ };
1287
1340
  export {
1288
- we as DAS_UI_THEME_BRIDGE_ITEMS,
1289
- Se as ELEMENT_THEME_BRIDGE_ITEMS,
1290
- Ce as LEGACY_THEME_BRIDGE_ITEMS,
1291
- X as PRESET_THEME_VARIABLES,
1292
- se as THEME_SOURCE_VARIABLE_CATEGORIES,
1293
- me as THEME_SOURCE_VARIABLE_HINTS,
1294
- pe as THEME_SOURCE_VARIABLE_LABELS,
1295
- T as THEME_SOURCE_VARIABLE_META,
1296
- ce as THEME_SOURCE_VARIABLE_NAMES,
1297
- ge as THEME_SOURCE_VARIABLE_RELATIONS,
1298
- Fe as UPF_COMPONENT_THEME_BRIDGE_ITEMS,
1299
- oe as applyThemeEventToDocument,
1300
- Ye as applyThemeVariablesToDocument,
1301
- fr as buildDefaultThemeCssText,
1302
- De as buildPresetThemeCssText,
1303
- B as buildRuntimeThemeVariables,
1304
- cr as changeTheme,
1305
- sr as ensureDefaultThemeStyle,
1306
- ae as getCurrentTheme,
1307
- We as getHostThemeSnapshotFromWindowName,
1308
- F as getThemeAPI,
1309
- lr as getThemeSourceVariableCategories,
1310
- nr as getThemeSourceVariableHints,
1311
- ur as getThemeSourceVariableLabels,
1312
- ar as getThemeSourceVariableNames,
1313
- ir as getThemeSourceVariableRelations,
1314
- tr as getThemeVariable,
1315
- qe as getThemeVariables,
1316
- gr as getVar,
1317
- dr as getVarValue,
1318
- mr as initHostThemeRootSync,
1319
- rr as initSubAppThemeSync,
1320
- J as mixHexColor,
1321
- q as normalizeHexColor,
1322
- be as normalizeThemeSourceVariables,
1323
- H as resolvePrimaryBgColor,
1324
- C as resolveThemeBridgeVariables,
1325
- pr as syncHostThemeRoot,
1326
- ue as syncThemeFromHost,
1327
- Ae as toDasUiColorOverrides,
1328
- _e as toElementThemeVariables,
1329
- Ne as toLegacyThemeVariables,
1330
- fe as toRgbaColor,
1331
- ke as toUpfComponentThemeVariables
1341
+ Pe as BUILTIN_PRESET_THEME_NAMES,
1342
+ Ve as DAS_UI_THEME_BRIDGE_ITEMS,
1343
+ He as ELEMENT_THEME_BRIDGE_ITEMS,
1344
+ Ae as LEGACY_THEME_BRIDGE_ITEMS,
1345
+ C as PRESET_THEMES,
1346
+ h as PRESET_THEME_VARIABLES,
1347
+ ye as THEME_SOURCE_VARIABLE_CATEGORIES,
1348
+ Ee as THEME_SOURCE_VARIABLE_HINTS,
1349
+ xe as THEME_SOURCE_VARIABLE_LABELS,
1350
+ F as THEME_SOURCE_VARIABLE_META,
1351
+ ve as THEME_SOURCE_VARIABLE_NAMES,
1352
+ Te as THEME_SOURCE_VARIABLE_RELATIONS,
1353
+ Be as UPF_COMPONENT_THEME_BRIDGE_ITEMS,
1354
+ ie as applyThemeEventToDocument,
1355
+ tr as applyThemeVariablesToDocument,
1356
+ yr as buildDefaultThemeCssText,
1357
+ ze as buildPresetThemeCssText,
1358
+ O as buildRuntimeThemeVariables,
1359
+ ar as changeTheme,
1360
+ P as clonePresetTheme,
1361
+ vr as ensureDefaultThemeStyle,
1362
+ hr as getAllPresetThemes,
1363
+ j as getCurrentTheme,
1364
+ er as getHostThemeSnapshotFromWindowName,
1365
+ v as getPresetTheme,
1366
+ A as getThemeAPI,
1367
+ gr as getThemeSourceVariableCategories,
1368
+ dr as getThemeSourceVariableHints,
1369
+ mr as getThemeSourceVariableLabels,
1370
+ pr as getThemeSourceVariableNames,
1371
+ br as getThemeSourceVariableRelations,
1372
+ fe as getThemeVariable,
1373
+ or as getThemeVariables,
1374
+ Tr as getVar,
1375
+ Cr as getVarValue,
1376
+ Er as initHostThemeRootSync,
1377
+ se as initSubAppThemeSync,
1378
+ te as mixHexColor,
1379
+ re as normalizeHexColor,
1380
+ Se as normalizeThemeSourceVariables,
1381
+ R as resolvePrimaryBgColor,
1382
+ N as resolveThemeBridgeVariables,
1383
+ xr as syncHostThemeRoot,
1384
+ $ as syncThemeFromHost,
1385
+ Me as toDasUiColorOverrides,
1386
+ Re as toElementThemeVariables,
1387
+ De as toLegacyThemeVariables,
1388
+ he as toRgbaColor,
1389
+ Oe as toUpfComponentThemeVariables,
1390
+ Sr as useSubAppTheme
1332
1391
  };