delta-comic-core 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bundle.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { Fragment, Teleport, Transition, TransitionGroup, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, customRef, defineComponent, getCurrentInstance, getCurrentScope, guardReactiveProps, hasInjectionContext, inject, isRef, isVNode, markRaw, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeUnmount, onBeforeUpdate, onDeactivated, onMounted, onScopeDispose, onUnmounted, openBlock, provide, reactive, readonly, ref, renderList, renderSlot, resolveDynamicComponent, shallowReactive, shallowReadonly, shallowRef, toDisplayString, toRef, toValue, unref, useCssVars, useModel, useTemplateRef, vShow, watch, watchEffect, withCtx, withDirectives, withModifiers } from "vue";
2
2
  import { onBeforeRouteLeave, useRoute, useRouter } from "vue-router";
3
- import { NButton, NEmpty, NIcon, NImage, NProgress, NResult, NVirtualList } from "naive-ui";
3
+ import { NButton, NEmpty, NIcon, NIconWrapper, NImage, NProgress, NResult, NVirtualList } from "naive-ui";
4
4
  import { Icon, Loading, showImagePreview } from "vant";
5
5
  import { defineStore } from "pinia";
6
6
  import axios, { getAdapter, isAxiosError, isCancel } from "axios";
7
- import { delay, isError, isUndefined } from "es-toolkit";
7
+ import { delay, isError, isString, isUndefined } from "es-toolkit";
8
8
  import { AnimatePresence, motion } from "motion-v";
9
9
  var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropNames = Object.getOwnPropertyNames, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __commonJSMin = (e, n) => () => (n || e((n = { exports: {} }).exports, n), n.exports), __export = (e) => {
10
10
  let n = {};
@@ -825,7 +825,7 @@ var useScopeId = () => {
825
825
  }), r;
826
826
  };
827
827
  process.env.NODE_ENV === "production" || Object.freeze({}), process.env.NODE_ENV === "production" || Object.freeze([]);
828
- var isArray$1 = Array.isArray, isString$1 = (e) => typeof e == "string", isObject$2 = (e) => typeof e == "object" && !!e, cacheStringFunction$1 = (e) => {
828
+ var isArray$1 = Array.isArray, isString$2 = (e) => typeof e == "string", isObject$2 = (e) => typeof e == "object" && !!e, cacheStringFunction$1 = (e) => {
829
829
  let n = /* @__PURE__ */ Object.create(null);
830
830
  return ((r) => n[r] || (n[r] = e(r)));
831
831
  }, hyphenateRE$1 = /\B([A-Z])/g, hyphenate$1 = cacheStringFunction$1((e) => e.replace(hyphenateRE$1, "-$1").toLowerCase());
@@ -833,11 +833,11 @@ function normalizeStyle$1(e) {
833
833
  if (isArray$1(e)) {
834
834
  let n = {};
835
835
  for (let r = 0; r < e.length; r++) {
836
- let i = e[r], a = isString$1(i) ? parseStringStyle(i) : normalizeStyle$1(i);
836
+ let i = e[r], a = isString$2(i) ? parseStringStyle(i) : normalizeStyle$1(i);
837
837
  if (a) for (let e in a) n[e] = a[e];
838
838
  }
839
839
  return n;
840
- } else if (isString$1(e) || isObject$2(e)) return e;
840
+ } else if (isString$2(e) || isObject$2(e)) return e;
841
841
  }
842
842
  var listDelimiterRE = /;(?![^(]*\))/g, propertyDelimiterRE = /:([^]+)/, styleCommentRE = /\/\*[^]*?\*\//g;
843
843
  function parseStringStyle(e) {
@@ -851,11 +851,11 @@ function parseStringStyle(e) {
851
851
  }
852
852
  function stringifyStyle(e) {
853
853
  if (!e) return "";
854
- if (isString$1(e)) return e;
854
+ if (isString$2(e)) return e;
855
855
  let n = "";
856
856
  for (let r in e) {
857
857
  let i = e[r];
858
- if (isString$1(i) || typeof i == "number") {
858
+ if (isString$2(i) || typeof i == "number") {
859
859
  let e = r.startsWith("--") ? r : hyphenate$1(r);
860
860
  n += `${e}:${i};`;
861
861
  }
@@ -864,7 +864,7 @@ function stringifyStyle(e) {
864
864
  }
865
865
  function normalizeClass$1(e) {
866
866
  let n = "";
867
- if (isString$1(e)) n = e;
867
+ if (isString$2(e)) n = e;
868
868
  else if (isArray$1(e)) for (let r = 0; r < e.length; r++) {
869
869
  let i = normalizeClass$1(e[r]);
870
870
  i && (n += i + " ");
@@ -1081,13 +1081,13 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
1081
1081
  }), W();
1082
1082
  };
1083
1083
  isHidden(i) ? nextTick().then(r) : r();
1084
- }, J = () => K(s.active), Sl, Cl = (n) => {
1085
- !e.touchable || n.touches.length > 1 || (l.start(n), c = !1, Sl = Date.now(), H(), k());
1086
- }, wl = (r) => {
1084
+ }, J = () => K(s.active), Ol, kl = (n) => {
1085
+ !e.touchable || n.touches.length > 1 || (l.start(n), c = !1, Ol = Date.now(), H(), k());
1086
+ }, Al = (r) => {
1087
1087
  e.touchable && s.swiping && (l.move(r), S.value && (!e.loop && (s.active === 0 && h.value > 0 || s.active === p.value - 1 && h.value < 0) || (preventDefault(r, e.stopPropagation), O({ offset: h.value }), c ||= (n("dragStart", { index: b.value }), !0))));
1088
- }, Tl = () => {
1088
+ }, jl = () => {
1089
1089
  if (!e.touchable || !s.swiping) return;
1090
- let r = Date.now() - Sl, i = h.value / r;
1090
+ let r = Date.now() - Ol, i = h.value / r;
1091
1091
  if ((Math.abs(i) > .25 || Math.abs(h.value) > m.value / 2) && S.value) {
1092
1092
  let n = e.vertical ? l.offsetY.value : l.offsetX.value, r = 0;
1093
1093
  r = e.loop ? n > 0 ? h.value > 0 ? -1 : 1 : 0 : -Math[h.value > 0 ? "ceil" : "floor"](h.value / m.value), O({
@@ -1096,7 +1096,7 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
1096
1096
  });
1097
1097
  } else h.value && O({ pace: 0 });
1098
1098
  c = !1, s.swiping = !1, n("dragEnd", { index: b.value }), W();
1099
- }, El = (n, r = {}) => {
1099
+ }, Ml = (n, r = {}) => {
1100
1100
  k(), l.reset(), doubleRaf(() => {
1101
1101
  let i;
1102
1102
  i = e.loop && n === p.value ? s.active === 0 ? 0 : n : n % p.value, r.immediate ? doubleRaf(() => {
@@ -1106,25 +1106,25 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
1106
1106
  emitChange: !0
1107
1107
  });
1108
1108
  });
1109
- }, Dl = (n, r) => {
1109
+ }, Nl = (n, r) => {
1110
1110
  let i = r === b.value;
1111
1111
  return createVNode("i", {
1112
1112
  style: i ? { backgroundColor: e.indicatorColor } : void 0,
1113
1113
  class: bem$7("indicator", { active: i })
1114
1114
  }, null);
1115
- }, Ol = () => {
1115
+ }, Pl = () => {
1116
1116
  if (r.indicator) return r.indicator({
1117
1117
  active: b.value,
1118
1118
  total: p.value
1119
1119
  });
1120
- if (e.showIndicators && p.value > 1) return createVNode("div", { class: bem$7("indicators", { vertical: e.vertical }) }, [Array(p.value).fill("").map(Dl)]);
1120
+ if (e.showIndicators && p.value > 1) return createVNode("div", { class: bem$7("indicators", { vertical: e.vertical }) }, [Array(p.value).fill("").map(Nl)]);
1121
1121
  };
1122
1122
  return useExpose({
1123
1123
  prev: A,
1124
1124
  next: z,
1125
1125
  state: s,
1126
1126
  resize: J,
1127
- swipeTo: El
1127
+ swipeTo: Ml
1128
1128
  }), f({
1129
1129
  size: m,
1130
1130
  props: e,
@@ -1137,17 +1137,17 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
1137
1137
  () => e.height
1138
1138
  ], J), watch(usePageVisibility(), (e) => {
1139
1139
  e === "visible" ? W() : H();
1140
- }), onMounted(K), onActivated(() => K(s.active)), onPopupReopen(() => K(s.active)), onDeactivated(H), onBeforeUnmount(H), useEventListener("touchmove", wl, { target: o }), () => createVNode("div", {
1140
+ }), onMounted(K), onActivated(() => K(s.active)), onPopupReopen(() => K(s.active)), onDeactivated(H), onBeforeUnmount(H), useEventListener("touchmove", Al, { target: o }), () => createVNode("div", {
1141
1141
  ref: i,
1142
1142
  class: bem$7()
1143
1143
  }, [createVNode("div", {
1144
1144
  ref: o,
1145
1145
  style: C.value,
1146
1146
  class: bem$7("track", { vertical: e.vertical }),
1147
- onTouchstartPassive: Cl,
1148
- onTouchend: Tl,
1149
- onTouchcancel: Tl
1150
- }, [r.default?.call(r)]), Ol()]);
1147
+ onTouchstartPassive: kl,
1148
+ onTouchend: jl,
1149
+ onTouchcancel: jl
1150
+ }, [r.default?.call(r)]), Pl()]);
1151
1151
  }
1152
1152
  })), [name$6, bem$6] = createNamespace("tabs"), stdin_default$5 = defineComponent({
1153
1153
  name: name$6,
@@ -1247,14 +1247,14 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
1247
1247
  }
1248
1248
  C.lineStyle = c;
1249
1249
  });
1250
- }, xl = (e) => {
1250
+ }, Dl = (e) => {
1251
1251
  let n = e < C.currentIndex ? -1 : 1;
1252
1252
  for (; e >= 0 && e < b.length;) {
1253
1253
  if (!b[e].disabled) return e;
1254
1254
  e += n;
1255
1255
  }
1256
1256
  }, V = (r, i) => {
1257
- let a = xl(r);
1257
+ let a = Dl(r);
1258
1258
  if (!isDef$1(a)) return;
1259
1259
  let o = b[a], c = O(o, a), l = C.currentIndex !== null;
1260
1260
  C.currentIndex !== a && (C.currentIndex = a, i || z(), B()), c !== e.active && (n("update:active", c), l && n("change", c, o.title)), s && !e.scrollspy && setRootScrollTop(Math.ceil(getElementTop(u.value) - A.value));
@@ -1286,24 +1286,24 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
1286
1286
  });
1287
1287
  }, J = (e) => {
1288
1288
  s = e.isFixed, n("scroll", e);
1289
- }, Sl = (e) => {
1289
+ }, Ol = (e) => {
1290
1290
  nextTick(() => {
1291
1291
  H(e), W(!0);
1292
1292
  });
1293
- }, Cl = () => {
1293
+ }, kl = () => {
1294
1294
  for (let e = 0; e < b.length; e++) {
1295
1295
  let { top: n } = useRect(b[e].$el);
1296
1296
  if (n > M.value) return e === 0 ? 0 : e - 1;
1297
1297
  }
1298
1298
  return b.length - 1;
1299
- }, wl = () => {
1300
- e.scrollspy && !o && V(Cl());
1301
- }, Tl = () => {
1299
+ }, Al = () => {
1300
+ e.scrollspy && !o && V(kl());
1301
+ }, jl = () => {
1302
1302
  if (e.type === "line" && b.length) return createVNode("div", {
1303
1303
  class: bem$5("line"),
1304
1304
  style: C.lineStyle
1305
1305
  }, null);
1306
- }, El = () => {
1306
+ }, Ml = () => {
1307
1307
  let { type: n, border: i, sticky: a } = e, o = [createVNode("div", {
1308
1308
  ref: a ? void 0 : p,
1309
1309
  class: [bem$5("wrap"), { [BORDER_TOP_BOTTOM]: n === "line" && i }]
@@ -1319,11 +1319,11 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
1319
1319
  }, [
1320
1320
  r["nav-left"]?.call(r),
1321
1321
  b.map((e) => e.renderTitle(K)),
1322
- Tl(),
1322
+ jl(),
1323
1323
  r["nav-right"]?.call(r)
1324
1324
  ])]), r["nav-bottom"]?.call(r)];
1325
1325
  return a ? createVNode("div", { ref: p }, [o]) : o;
1326
- }, Dl = () => {
1326
+ }, Nl = () => {
1327
1327
  B(), nextTick(() => {
1328
1328
  var e;
1329
1329
  z(!0), (e = m.value?.swipeRef.value) == null || e.resize();
@@ -1334,20 +1334,20 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
1334
1334
  e.duration,
1335
1335
  e.lineWidth,
1336
1336
  e.lineHeight
1337
- ], B), watch(windowWidth, Dl), watch(() => e.active, (e) => {
1337
+ ], B), watch(windowWidth, Nl), watch(() => e.active, (e) => {
1338
1338
  e !== k.value && H(e);
1339
1339
  }), watch(() => b.length, () => {
1340
1340
  C.inited && (H(e.active), B(), nextTick(() => {
1341
1341
  z(!0);
1342
1342
  }));
1343
1343
  }), useExpose({
1344
- resize: Dl,
1345
- scrollTo: Sl
1344
+ resize: Nl,
1345
+ scrollTo: Ol
1346
1346
  }), onActivated(B), onPopupReopen(B), onMountedOrActivated(() => {
1347
1347
  H(e.active, !0), nextTick(() => {
1348
1348
  C.inited = !0, p.value && (i = useRect(p.value).height), z(!0);
1349
1349
  });
1350
- }), useVisibilityChange(u, B), useEventListener("scroll", wl, {
1350
+ }), useVisibilityChange(u, B), useEventListener("scroll", Al, {
1351
1351
  target: g,
1352
1352
  passive: !0
1353
1353
  }), S({
@@ -1366,7 +1366,7 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
1366
1366
  container: u.value,
1367
1367
  offsetTop: A.value,
1368
1368
  onScroll: J
1369
- }, { default: () => [El()] }) : El() : null, createVNode(stdin_default$5, {
1369
+ }, { default: () => [Ml()] }) : Ml() : null, createVNode(stdin_default$5, {
1370
1370
  ref: m,
1371
1371
  count: b.length,
1372
1372
  inited: C.inited,
@@ -2047,7 +2047,7 @@ function last$1(e) {
2047
2047
  function last(e) {
2048
2048
  if (isArrayLike(e)) return last$1(toArray$1(e));
2049
2049
  }
2050
- function isString(e) {
2050
+ function isString$1(e) {
2051
2051
  return typeof e == "string" || e instanceof String;
2052
2052
  }
2053
2053
  function isArray(e) {
@@ -2999,7 +2999,7 @@ var image_default = /* @__PURE__ */ defineComponent({
2999
2999
  setup(n, { expose: r, emit: i }) {
3000
3000
  let u = n, f = computedAsync(async () => {
3001
3001
  try {
3002
- return u.src ? isString(u.src) ? u.src : await u.src.getUrl() : "";
3002
+ return u.src ? isString$1(u.src) ? u.src : await u.src.getUrl() : "";
3003
3003
  } catch (e) {
3004
3004
  console.error(e);
3005
3005
  }
@@ -3016,7 +3016,7 @@ var image_default = /* @__PURE__ */ defineComponent({
3016
3016
  watch(f, b);
3017
3017
  let S = computed(() => v.loaded.has(f.value)), C = computedAsync(async () => {
3018
3018
  try {
3019
- return u.fallback ? isString(u.fallback) ? u.fallback : await u.fallback.getUrl() : "";
3019
+ return u.fallback ? isString$1(u.fallback) ? u.fallback : await u.fallback.getUrl() : "";
3020
3020
  } catch (e) {
3021
3021
  console.error(e);
3022
3022
  }
@@ -3277,6 +3277,8 @@ const createAxios = (e, n = {}, r) => {
3277
3277
  };
3278
3278
  var data_exports = /* @__PURE__ */ __export({
3279
3279
  PromiseContent: () => PromiseContent,
3280
+ SourcedKeyMap: () => SourcedKeyMap,
3281
+ SourcedValue: () => SourcedValue,
3280
3282
  Stream: () => Stream,
3281
3283
  Struct: () => Struct,
3282
3284
  callbackToPromise: () => callbackToPromise
@@ -3287,6 +3289,61 @@ var data_exports = /* @__PURE__ */ __export({
3287
3289
  constructor(e) {
3288
3290
  this.$$raw = e;
3289
3291
  }
3292
+ }, SourcedValue = class {
3293
+ toJSON(e) {
3294
+ return isString(e) ? this.parse(e) : e;
3295
+ }
3296
+ parse(e) {
3297
+ let n = e.split(this.separator);
3298
+ return [n[0], n.slice(1).join(this.separator)];
3299
+ }
3300
+ toString(e) {
3301
+ return isString(e) ? e : this.stringify(e);
3302
+ }
3303
+ stringify(e) {
3304
+ return e.join(this.separator);
3305
+ }
3306
+ constructor(e = ":") {
3307
+ this.separator = e;
3308
+ }
3309
+ }, SourcedKeyMap = class extends SourcedValue {
3310
+ store = shallowReactive(/* @__PURE__ */ new Map());
3311
+ get size() {
3312
+ return this.store.size;
3313
+ }
3314
+ [Symbol.toStringTag] = "SourcedKeyMap";
3315
+ clear() {
3316
+ this.store.clear();
3317
+ }
3318
+ delete(e) {
3319
+ return this.store.delete(this.toString(e));
3320
+ }
3321
+ forEach(e, n) {
3322
+ this.store.forEach((r, i) => {
3323
+ e.call(n, r, i, this);
3324
+ });
3325
+ }
3326
+ get(e) {
3327
+ return this.store.get(this.toString(e));
3328
+ }
3329
+ has(e) {
3330
+ return this.store.has(this.toString(e));
3331
+ }
3332
+ set(e, n) {
3333
+ return this.store.set(this.toString(e), n), this;
3334
+ }
3335
+ entries() {
3336
+ return this.store.entries();
3337
+ }
3338
+ keys() {
3339
+ return this.store.keys();
3340
+ }
3341
+ values() {
3342
+ return this.store.values();
3343
+ }
3344
+ [Symbol.iterator]() {
3345
+ return this.entries();
3346
+ }
3290
3347
  }, PromiseContent = class e {
3291
3348
  [Symbol.toStringTag] = "PromiseContent";
3292
3349
  static _this;
@@ -3472,18 +3529,30 @@ const callbackToPromise = (e) => {
3472
3529
  let { resolve: n, promise: r } = Promise.withResolvers();
3473
3530
  return e(n), r;
3474
3531
  };
3475
- var _hoisted_1$4 = {
3532
+ var _hoisted_1$5 = {
3476
3533
  xmlns: "http://www.w3.org/2000/svg",
3477
3534
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
3478
3535
  viewBox: "0 0 1024 1024"
3479
3536
  }, ReloadOutlined_default = defineComponent({
3480
3537
  name: "ReloadOutlined",
3481
3538
  render: function(e, n) {
3482
- return openBlock(), createElementBlock("svg", _hoisted_1$4, n[0] ||= [createElementVNode("path", {
3539
+ return openBlock(), createElementBlock("svg", _hoisted_1$5, n[0] ||= [createElementVNode("path", {
3483
3540
  d: "M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92C290 92 102.3 279.5 102 511.5C101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1c1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 0 0-10.1 4.8c-1.8 5-3.8 10-5.9 14.9c-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 0 1 655.9 829c-42.3 17.9-87.4 27-133.8 27c-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 0 1 279 755.2a342.16 342.16 0 0 1-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4c31.6-31.6 68.4-56.4 109.3-73.8c42.3-17.9 87.4-27 133.8-27c46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 0 1 109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 0 0 3 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z",
3484
3541
  fill: "currentColor"
3485
3542
  }, null, -1)]);
3486
3543
  }
3544
+ }), _hoisted_1$4 = {
3545
+ xmlns: "http://www.w3.org/2000/svg",
3546
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
3547
+ viewBox: "0 0 24 24"
3548
+ }, DoneRound_default = defineComponent({
3549
+ name: "DoneRound",
3550
+ render: function(e, n) {
3551
+ return openBlock(), createElementBlock("svg", _hoisted_1$4, n[0] ||= [createElementVNode("path", {
3552
+ d: "M9 16.2l-3.5-3.5a.984.984 0 0 0-1.4 0a.984.984 0 0 0 0 1.4l4.19 4.19c.39.39 1.02.39 1.41 0L20.3 7.7a.984.984 0 0 0 0-1.4a.984.984 0 0 0-1.4 0L9 16.2z",
3553
+ fill: "currentColor"
3554
+ }, null, -1)]);
3555
+ }
3487
3556
  }), _hoisted_1$3 = {
3488
3557
  xmlns: "http://www.w3.org/2000/svg",
3489
3558
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
@@ -4571,7 +4640,7 @@ var Ce = ["data-index"], U = /* @__PURE__ */ defineComponent({
4571
4640
  return new this(e, n);
4572
4641
  }
4573
4642
  constructor(e, n) {
4574
- super(e), this.aspect = n, this.$$plugin = e.$$plugin, this.$$meta = e.$$meta, this.path = e.path, this.forkNamespace = e.forkNamespace, this.processSteps = (e.processSteps ?? []).map((e) => isString(e) ? {
4643
+ super(e), this.aspect = n, this.$$plugin = e.$$plugin, this.$$meta = e.$$meta, this.path = e.path, this.forkNamespace = e.forkNamespace, this.processSteps = (e.processSteps ?? []).map((e) => isString$1(e) ? {
4575
4644
  referenceName: e,
4576
4645
  ignoreExit: !1
4577
4646
  } : e);
@@ -4935,7 +5004,7 @@ var Ce = ["data-index"], U = /* @__PURE__ */ defineComponent({
4935
5004
  return r;
4936
5005
  }
4937
5006
  static toContentType(e) {
4938
- if (isString(e)) {
5007
+ if (isString$1(e)) {
4939
5008
  let [n, r] = e.split(":");
4940
5009
  return {
4941
5010
  name: r,
@@ -4945,7 +5014,7 @@ var Ce = ["data-index"], U = /* @__PURE__ */ defineComponent({
4945
5014
  return e;
4946
5015
  }
4947
5016
  static toContentTypeString(e) {
4948
- return isString(e) ? e : `${e.plugin}:${e.name}`;
5017
+ return isString$1(e) ? e : `${e.plugin}:${e.name}`;
4949
5018
  }
4950
5019
  static levelboard = useGlobalVar(shallowReactive(/* @__PURE__ */ new Map()), "uni/contentPage/levelboard");
4951
5020
  static setLevelboard(e, n) {
@@ -5149,21 +5218,9 @@ const createLoadingMessage = (e = "加载中", n = window.$message) => {
5149
5218
  }, createDialog = (e) => {
5150
5219
  let n = noop, r = noop, i = new Promise((e, i) => {
5151
5220
  n = e, r = i;
5152
- }), a = shallowRef(!0), [o, s, c] = useZIndex(a);
5153
- console.log("[createDialog] after useZIndex");
5154
- let l = watch(o, (e) => m.style.zIndex = e);
5155
- console.log("[createDialog] after stopStyleWatch");
5156
- let u = window.$router.beforeEach(() => s ? f() : !0);
5157
- console.log("[createDialog] after stopRouterBreak");
5158
- let d = () => (l(), c(), u(), m.destroy(), a.value = !1);
5159
- console.log("[createDialog] after stop");
5160
- let f = () => (r(), d(), !1);
5161
- console.log("[createDialog] after failStop");
5162
- let p = () => {
5221
+ }), a = shallowRef(!0), [o, s, c] = useZIndex(a), l = watch(o, (e) => m.style.zIndex = e), u = window.$router.beforeEach(() => s ? f() : !0), d = () => (l(), c(), u(), m.destroy(), a.value = !1), f = () => (r(), d(), !1), p = () => {
5163
5222
  n(), d();
5164
- };
5165
- console.log("[createDialog] after successStop");
5166
- let m = window.$dialog.create({
5223
+ }, m = window.$dialog.create({
5167
5224
  positiveText: "确定",
5168
5225
  negativeText: "取消",
5169
5226
  ...e,
@@ -5194,15 +5251,15 @@ const createLoadingMessage = (e = "加载中", n = window.$message) => {
5194
5251
  e.onAfterLeave?.(), d();
5195
5252
  }
5196
5253
  });
5197
- return console.log("[createDialog] after const dialog"), i.ins = m, i;
5254
+ return i.ins = m, i;
5198
5255
  };
5199
- var allDownloadMessagesIsMinsize = reactive([]);
5256
+ var allDownloadMessagesIsMinsize = useGlobalVar(reactive([]), "utils/messsage/allDownloadMessagesIsMinsize");
5200
5257
  const createDownloadMessage = async (e, n) => {
5201
5258
  let o = allDownloadMessagesIsMinsize.length;
5202
5259
  allDownloadMessagesIsMinsize[o] = !1;
5203
- let s = reactive([]), c = ref(!1), l = watch(c, (e) => {
5260
+ let s = ref(!1), c = reactive([]), l = ref(!1), u = watch(l, (e) => {
5204
5261
  e ? allDownloadMessagesIsMinsize[o] = !0 : allDownloadMessagesIsMinsize[o] = !1;
5205
- }, { immediate: !0 }), u = computed(() => allDownloadMessagesIsMinsize.slice(0, o).filter((e) => e).length), f = window.$message.create(e, {
5262
+ }, { immediate: !0 }), f = computed(() => allDownloadMessagesIsMinsize.slice(0, o).filter((e) => e).length), p = window.$message.create(e, {
5206
5263
  render: (e) => {
5207
5264
  let n;
5208
5265
  return createVNode(motion.div, {
@@ -5225,7 +5282,7 @@ const createDownloadMessage = async (e, n) => {
5225
5282
  paddingInline: "2px",
5226
5283
  paddingBlock: "2px",
5227
5284
  position: "fixed",
5228
- left: `${u.value * 40 + 8}px`,
5285
+ left: `${f.value * 40 + 8}px`,
5229
5286
  top: "calc(var(--safe-area-inset-top) + 4px)"
5230
5287
  },
5231
5288
  maxsize: {
@@ -5236,13 +5293,13 @@ const createDownloadMessage = async (e, n) => {
5236
5293
  height: "fit-content"
5237
5294
  }
5238
5295
  },
5239
- onDragEnd: (e, { offset: n }) => n.y < -30 && (c.value = !0),
5240
- animate: c.value ? "minsize" : "maxsize",
5296
+ onDragEnd: (e, { offset: n }) => n.y < -30 && (l.value = !0),
5297
+ animate: l.value ? "minsize" : "maxsize",
5241
5298
  class: "bg-(--n-color) overflow-hidden",
5242
5299
  style: { boxShadow: "var(--n-box-shadow)" }
5243
- }, { default: () => [createVNode(Transition, { name: "van-fade" }, { default: () => [c.value ? createVNode("div", {
5300
+ }, { default: () => [createVNode(Transition, { name: "van-fade" }, { default: () => [l.value ? createVNode("div", {
5244
5301
  class: "size-full relative",
5245
- onClick: () => c.value = !1
5302
+ onClick: () => l.value = !1
5246
5303
  }, [createVNode(Loading, {
5247
5304
  class: "absolute top-0 left-0 size-full",
5248
5305
  color: "var(--p-color)"
@@ -5250,13 +5307,17 @@ const createDownloadMessage = async (e, n) => {
5250
5307
  class: "!absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 ",
5251
5308
  size: "18px",
5252
5309
  color: "var(--p-color)"
5253
- }, { default: () => [s.some((e) => e.state == "error") ? createVNode(Icon, { name: "cross" }, null) : createVNode(FileDownloadRound_default, null, null)] })]) : createVNode("div", { class: "w-full relative" }, [
5254
- createVNode("div", { class: "font-semibold text-base" }, [e.content]),
5310
+ }, { default: () => [c.some((e) => e.state == "error") ? createVNode(Icon, { name: "cross" }, null) : createVNode(FileDownloadRound_default, null, null)] })]) : createVNode("div", { class: "w-full relative" }, [
5311
+ createVNode("div", { class: "font-semibold text-base flex items-center gap-2" }, [createVNode("span", null, [e.content]), s.value && createVNode(NIconWrapper, {
5312
+ size: 18,
5313
+ color: "var(--nui-success-color)",
5314
+ borderRadius: 114514
5315
+ }, { default: () => [createVNode(NIcon, { size: 12 }, { default: () => [createVNode(DoneRound_default, null, null)] })] })]),
5255
5316
  createVNode(TransitionGroup, {
5256
5317
  name: "list",
5257
5318
  tag: "ul",
5258
5319
  class: "!w-full h-fit !ml-1"
5259
- }, _isSlot(n = s.map((e, n) => {
5320
+ }, _isSlot(n = c.map((e, n) => {
5260
5321
  let i;
5261
5322
  return createVNode("div", {
5262
5323
  class: "w=full py-1 van-hairline--bottom",
@@ -5277,7 +5338,7 @@ const createDownloadMessage = async (e, n) => {
5277
5338
  tertiary: !0,
5278
5339
  circle: !0,
5279
5340
  onClick: e.retry,
5280
- class: "!absolute right-[4%] w-[18%] top-1/2 -translate-y-1/2"
5341
+ class: "!absolute !ease-in-out right-[4%] w-[18%] top-1/2 -translate-y-1/2"
5281
5342
  }, { icon: () => createVNode(NIcon, null, { default: () => [createVNode(ReloadOutlined_default, null, null)] }) }), [[vShow, e.state == "error" && e.retry]])) ? i : { default: () => [i] })]),
5282
5343
  createVNode("div", { class: "text-xs text-(--van-text-color-2) !h-[1rem]" }, [e.state == "error" && `${e.error.name}: ${e.error.message}` || e.description || "..."])
5283
5344
  ]);
@@ -5286,16 +5347,16 @@ const createDownloadMessage = async (e, n) => {
5286
5347
  ])] })] });
5287
5348
  },
5288
5349
  duration: 0
5289
- }), p = (e, n, r) => {
5350
+ }), m = (e, n, r) => {
5290
5351
  let i = Promise.withResolvers(), a = ref(), o = reactive({
5291
5352
  description: "",
5292
5353
  retryable: !1,
5293
5354
  ...n
5294
- }), c = /* @__PURE__ */ Error(), l = s.length, u = watch([o, a], ([, n]) => {
5295
- s[l] = {
5355
+ }), s = /* @__PURE__ */ Error(), l = c.length, u = watch([o, a], ([, n]) => {
5356
+ c[l] = {
5296
5357
  title: e,
5297
5358
  state: n,
5298
- error: c,
5359
+ error: s,
5299
5360
  retry: o.retryable ? d : void 0,
5300
5361
  ...o
5301
5362
  };
@@ -5305,18 +5366,20 @@ const createDownloadMessage = async (e, n) => {
5305
5366
  let e = await r(o);
5306
5367
  a.value = "success", await nextTick(), u.stop(), i.resolve(e);
5307
5368
  } catch (e) {
5308
- c = isError(e) ? e : Error(toString(e)), a.value = "error", await nextTick(), o.retryable || (u.stop(), i.reject(e));
5369
+ s = isError(e) ? e : Error(toString(e)), a.value = "error", await nextTick(), o.retryable || (u.stop(), i.reject(e));
5309
5370
  }
5310
5371
  };
5311
5372
  return d(), i.promise.finally(() => {}), i.promise;
5312
- }, m = n({
5313
- createProgress: (e, n) => p(e, { progress: 0 }, n),
5314
- createLoading: (e, n) => p(e, {}, n)
5373
+ }, h = await n({
5374
+ createProgress: (e, n) => m(e, { progress: 0 }, n),
5375
+ createLoading: (e, n) => m(e, {}, n)
5315
5376
  });
5316
- await until(() => s.every((e) => !isUndefined(e.state))).toBeTruthy(), c.value = !1, await nextTick(), l.stop(), await until(c).toBeTruthy(), f.destroy(), allDownloadMessagesIsMinsize[o] = void 0;
5317
- let h = s.find((e) => e.state == "error");
5318
- if (console.log("[maybeError]", h, s), h) throw h.error;
5319
- return await m;
5377
+ await until(() => c.every((e) => !!e.state)).toBeTruthy(), l.value = !1, s.value = !0, delay(3e3).then(() => {
5378
+ l.value = !0;
5379
+ }), await nextTick(), await until(l).toBeTruthy(), u.stop(), p.destroy(), allDownloadMessagesIsMinsize[o] = void 0;
5380
+ let g = c.find((e) => e.state == "error");
5381
+ if (console.log("[maybeError]", g, c), g) throw g.error;
5382
+ return h;
5320
5383
  };
5321
5384
  var ConfigPointer = class {
5322
5385
  constructor(e, n) {