qsh-webview-sdk 2.4.2 → 2.4.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.
@@ -9,32 +9,32 @@ var be = (t, e, r) => e in t ? zt(t, e, { enumerable: !0, configurable: !0, writ
9
9
  for (var r of Je(e))
10
10
  Qt.call(e, r) && be(t, r, e[r]);
11
11
  return t;
12
- }, p = (t, e) => Yt(t, Xt(e));
12
+ }, m = (t, e) => Yt(t, Xt(e));
13
13
  var k = (t, e, r) => be(t, typeof e != "symbol" ? e + "" : e, r);
14
14
  var y = (t, e, r) => new Promise((n, i) => {
15
15
  var s = (u) => {
16
16
  try {
17
17
  d(r.next(u));
18
- } catch (m) {
19
- i(m);
18
+ } catch (p) {
19
+ i(p);
20
20
  }
21
21
  }, o = (u) => {
22
22
  try {
23
23
  d(r.throw(u));
24
- } catch (m) {
25
- i(m);
24
+ } catch (p) {
25
+ i(p);
26
26
  }
27
27
  }, d = (u) => u.done ? n(u.value) : Promise.resolve(u.value).then(s, o);
28
28
  d((r = r.apply(t, e)).next());
29
29
  });
30
- function me() {
30
+ function pe() {
31
31
  return typeof window != "undefined" ? window : void 0;
32
32
  }
33
33
  function De() {
34
34
  return typeof navigator == "undefined" ? "" : navigator.userAgent || "";
35
35
  }
36
36
  function _() {
37
- const t = me();
37
+ const t = pe();
38
38
  if (!t) return !1;
39
39
  if (t.__wxjs_environment === "miniprogram" || t.wx && t.wx.miniProgram)
40
40
  return !0;
@@ -42,18 +42,18 @@ function _() {
42
42
  return !!(e && /micromessenger/i.test(e) && /miniProgram/i.test(e));
43
43
  }
44
44
  function Ce() {
45
- const t = me();
45
+ const t = pe();
46
46
  return !!(t && t.plus);
47
47
  }
48
48
  function Re() {
49
- const t = me();
49
+ const t = pe();
50
50
  return !!(t && (t.__dcloud_weex_postMessage || t.__dcloud_weex_));
51
51
  }
52
- function Oe() {
53
- const t = me();
52
+ function Se() {
53
+ const t = pe();
54
54
  return !!(t && (t.__uniapp_x_postMessage || t.__uniapp_x_));
55
55
  }
56
- function Se() {
56
+ function Oe() {
57
57
  const t = De();
58
58
  return /uni-app/i.test(t);
59
59
  }
@@ -62,10 +62,10 @@ function Ue() {
62
62
  return /Html5Plus/i.test(t);
63
63
  }
64
64
  function tt() {
65
- return Se() || Ue();
65
+ return Oe() || Ue();
66
66
  }
67
- function Q() {
68
- const t = me();
67
+ function Z() {
68
+ const t = pe();
69
69
  if (!t) return !1;
70
70
  if (t.__offline_bridge_postMessage) return !0;
71
71
  try {
@@ -76,7 +76,7 @@ function Q() {
76
76
  return !1;
77
77
  }
78
78
  function er() {
79
- return Oe() ? "uvue" : Re() ? "nvue" : _() ? "weixin" : Q() ? "offline" : Ce() ? "plus" : tt() ? "webview" : Se() ? "UniApp" : "h5";
79
+ return Se() ? "uvue" : Re() ? "nvue" : _() ? "weixin" : Z() ? "offline" : Ce() ? "plus" : tt() ? "webview" : Oe() ? "UniApp" : "h5";
80
80
  }
81
81
  let Ee = null;
82
82
  function H(t = !1) {
@@ -84,11 +84,11 @@ function H(t = !1) {
84
84
  isWeixinMiniProgram: _(),
85
85
  isAppPlus: Ce(),
86
86
  isNvue: Re(),
87
- isUvue: Oe(),
88
- isUniApp: Se(),
87
+ isUvue: Se(),
88
+ isUniApp: Oe(),
89
89
  isHtml5Plus: Ue(),
90
90
  isUniAppWebView: tt(),
91
- isOfflineWebview: Q(),
91
+ isOfflineWebview: Z(),
92
92
  type: er()
93
93
  }), Ee;
94
94
  }
@@ -125,28 +125,28 @@ class T extends Error {
125
125
  };
126
126
  }
127
127
  }
128
- const O = class O {
128
+ const S = class S {
129
129
  /**
130
130
  * 设置调试模式
131
131
  * @param {boolean} enabled - 是否启用调试模式
132
132
  */
133
133
  static setDebugMode(e) {
134
- O.isDebugMode = e;
134
+ S.isDebugMode = e;
135
135
  }
136
136
  /**
137
137
  * 添加错误回调
138
138
  * @param {Function} callback - 错误处理回调函数
139
139
  */
140
140
  static addErrorCallback(e) {
141
- typeof e == "function" && O.errorCallbacks.push(e);
141
+ typeof e == "function" && S.errorCallbacks.push(e);
142
142
  }
143
143
  /**
144
144
  * 移除错误回调
145
145
  * @param {Function} callback - 要移除的回调函数
146
146
  */
147
147
  static removeErrorCallback(e) {
148
- const r = O.errorCallbacks.indexOf(e);
149
- r > -1 && O.errorCallbacks.splice(r, 1);
148
+ const r = S.errorCallbacks.indexOf(e);
149
+ r > -1 && S.errorCallbacks.splice(r, 1);
150
150
  }
151
151
  /**
152
152
  * 处理 API 调用错误
@@ -165,7 +165,7 @@ const O = class O {
165
165
  x.API_CALL_FAILED,
166
166
  String(e),
167
167
  r
168
- ), O.logError(n), O.notifyCallbacks(n), n;
168
+ ), S.logError(n), S.notifyCallbacks(n), n;
169
169
  }
170
170
  /**
171
171
  * 处理平台不支持错误
@@ -179,7 +179,7 @@ const O = class O {
179
179
  `API "${r}" is not supported on platform "${e}"`,
180
180
  { platformType: e, apiName: r }
181
181
  );
182
- return O.logError(n), O.notifyCallbacks(n), n;
182
+ return S.logError(n), S.notifyCallbacks(n), n;
183
183
  }
184
184
  /**
185
185
  * 处理桥接未就绪错误
@@ -192,7 +192,7 @@ const O = class O {
192
192
  `Bridge is not ready when calling "${e}"`,
193
193
  { apiName: e }
194
194
  );
195
- return O.logError(r), O.notifyCallbacks(r), r;
195
+ return S.logError(r), S.notifyCallbacks(r), r;
196
196
  }
197
197
  /**
198
198
  * 处理参数验证错误
@@ -208,7 +208,7 @@ const O = class O {
208
208
  `Invalid parameter "${r}" in "${e}": expected ${n}, got ${typeof i}`,
209
209
  { apiName: e, paramName: r, expectedType: n, actualValue: i }
210
210
  );
211
- return O.logError(s), O.notifyCallbacks(s), s;
211
+ return S.logError(s), S.notifyCallbacks(s), s;
212
212
  }
213
213
  /**
214
214
  * 安全地包装函数执行,捕获并处理错误
@@ -220,7 +220,7 @@ const O = class O {
220
220
  try {
221
221
  return e();
222
222
  } catch (n) {
223
- return O.handleApiError(n, r);
223
+ return S.handleApiError(n, r);
224
224
  }
225
225
  }
226
226
  /**
@@ -234,7 +234,7 @@ const O = class O {
234
234
  try {
235
235
  return yield e();
236
236
  } catch (i) {
237
- return O.handleApiError(i, r);
237
+ return S.handleApiError(i, r);
238
238
  }
239
239
  });
240
240
  }
@@ -246,7 +246,7 @@ const O = class O {
246
246
  static logError(e) {
247
247
  if (typeof console != "undefined") {
248
248
  const r = `[QSH-SDK Error] ${e.type}: ${e.message}`;
249
- O.isDebugMode ? console.error(r, {
249
+ S.isDebugMode ? console.error(r, {
250
250
  context: e.context,
251
251
  originalError: e.originalError,
252
252
  stack: e.stack,
@@ -260,7 +260,7 @@ const O = class O {
260
260
  * @private
261
261
  */
262
262
  static notifyCallbacks(e) {
263
- O.errorCallbacks.forEach((r) => {
263
+ S.errorCallbacks.forEach((r) => {
264
264
  try {
265
265
  r(e);
266
266
  } catch (n) {
@@ -277,13 +277,13 @@ const O = class O {
277
277
  return function(r, n, i) {
278
278
  const s = i.value;
279
279
  return i.value = function(...o) {
280
- return O.safeExecute(() => s.apply(this, o), p(g({}, e), { method: n, target: r.constructor.name }));
280
+ return S.safeExecute(() => s.apply(this, o), m(g({}, e), { method: n, target: r.constructor.name }));
281
281
  }, i;
282
282
  };
283
283
  }
284
284
  };
285
- k(O, "isDebugMode", !1), k(O, "errorCallbacks", []);
286
- let f = O;
285
+ k(S, "isDebugMode", !1), k(S, "errorCallbacks", []);
286
+ let f = S;
287
287
  const L = {
288
288
  UNINITIALIZED: "uninitialized",
289
289
  INITIALIZING: "initializing",
@@ -423,7 +423,7 @@ class tr {
423
423
  };
424
424
  }
425
425
  }
426
- const X = new tr(), rt = () => X.waitForReady(), rr = () => X.isReady(), nr = () => X.getState(), P = {
426
+ const Y = new tr(), rt = () => Y.waitForReady(), rr = () => Y.isReady(), nr = () => Y.getState(), P = {
427
427
  ERROR: 0,
428
428
  WARN: 1,
429
429
  INFO: 2,
@@ -491,7 +491,7 @@ const X = new tr(), rt = () => X.waitForReady(), rr = () => X.isReady(), nr = ()
491
491
  static log(e, r, n, ...i) {
492
492
  if (!h.shouldLog(e, r))
493
493
  return;
494
- const s = (/* @__PURE__ */ new Date()).toISOString(), o = le[e], d = r ? `[${r}]` : "", u = `${h.prefix} ${d} ${n}`, m = {
494
+ const s = (/* @__PURE__ */ new Date()).toISOString(), o = le[e], d = r ? `[${r}]` : "", u = `${h.prefix} ${d} ${n}`, p = {
495
495
  timestamp: s,
496
496
  level: e,
497
497
  levelName: o,
@@ -499,9 +499,9 @@ const X = new tr(), rt = () => X.waitForReady(), rr = () => X.isReady(), nr = ()
499
499
  message: n,
500
500
  args: i
501
501
  };
502
- if (h.addToHistory(m), typeof h.reporter == "function")
502
+ if (h.addToHistory(p), typeof h.reporter == "function")
503
503
  try {
504
- h.reporter(m);
504
+ h.reporter(p);
505
505
  } catch (C) {
506
506
  }
507
507
  h.outputToConsole(e, u, ...i);
@@ -669,7 +669,7 @@ if (typeof window != "undefined") {
669
669
  }
670
670
  const A = v.createModuleLogger("Bridge"), I = v.createModuleLogger("Platform"), a = v.createModuleLogger("API"), D = v.createModuleLogger("State"), Ae = /complete|loaded|interactive/;
671
671
  function ir(t) {
672
- if (!Q()) return !1;
672
+ if (!Z()) return !1;
673
673
  A.debug("检测到离线包环境,开始初始化");
674
674
  const e = () => {
675
675
  t();
@@ -687,7 +687,7 @@ function ir(t) {
687
687
  return !0;
688
688
  }
689
689
  function ar(t) {
690
- return Se() || Ue() ? (A.debug("检测到 APP 环境,开始初始化"), window.__uniapp_x_postMessage || window.__uniapp_x_ || window.__dcloud_weex_postMessage || window.__dcloud_weex_ ? (A.debug("NVUE/UVUE 环境,等待 DOMContentLoaded"), document.addEventListener("DOMContentLoaded", t)) : window.plus && Ae.test(document.readyState) ? (A.debug("Plus 环境已就绪,立即初始化"), setTimeout(t, 0)) : window.plus ? (A.debug("Plus 环境,等待 plusready 事件"), document.addEventListener("plusready", t)) : Ae.test(document.readyState) ? setTimeout(t, 0) : document.addEventListener("DOMContentLoaded", t, { once: !0 }), !0) : !1;
690
+ return Oe() || Ue() ? (A.debug("检测到 APP 环境,开始初始化"), window.__uniapp_x_postMessage || window.__uniapp_x_ || window.__dcloud_weex_postMessage || window.__dcloud_weex_ ? (A.debug("NVUE/UVUE 环境,等待 DOMContentLoaded"), document.addEventListener("DOMContentLoaded", t)) : window.plus && Ae.test(document.readyState) ? (A.debug("Plus 环境已就绪,立即初始化"), setTimeout(t, 0)) : window.plus ? (A.debug("Plus 环境,等待 plusready 事件"), document.addEventListener("plusready", t)) : Ae.test(document.readyState) ? setTimeout(t, 0) : document.addEventListener("DOMContentLoaded", t, { once: !0 }), !0) : !1;
691
691
  }
692
692
  function sr(t) {
693
693
  return window.wx && window.wx.miniProgram ? (A.debug("检测到微信小程序环境,开始初始化"), window.WeixinJSBridge && window.WeixinJSBridge.invoke ? (A.debug("微信 JSBridge 已就绪,立即初始化"), setTimeout(t, 0)) : (A.debug("微信 JSBridge 未就绪,等待 WeixinJSBridgeReady 事件"), document.addEventListener("WeixinJSBridgeReady", t)), !0) : !1;
@@ -696,10 +696,10 @@ function or(t) {
696
696
  return A.info("开始初始化 JSBridge"), ir(t) ? (A.info("使用离线包环境初始化"), !0) : ar(t) ? (A.info("使用 APP 环境初始化"), !0) : sr(t) ? (A.info("使用微信小程序环境初始化"), !0) : (A.debug("使用默认 H5 环境初始化"), Ae.test(document.readyState) ? (A.debug("DOM 已就绪,立即初始化"), setTimeout(t, 0)) : (A.debug("DOM 未就绪,等待 DOMContentLoaded"), document.addEventListener("DOMContentLoaded", t)), !0);
697
697
  }
698
698
  function cr() {
699
- return X.waitForReady();
699
+ return Y.waitForReady();
700
700
  }
701
701
  function nt() {
702
- return X.startInitialization(() => y(null, null, function* () {
702
+ return Y.startInitialization(() => y(null, null, function* () {
703
703
  return new Promise((t, e) => {
704
704
  const r = () => {
705
705
  t();
@@ -757,7 +757,7 @@ class ur {
757
757
  { isProd: e.isProd }
758
758
  );
759
759
  const r = e.clientId.trim(), n = e.isProd === !0, i = r !== this.runtimeConfig.clientId || n !== this.runtimeConfig.isProd;
760
- return this.runtimeConfig = p(g({}, this.runtimeConfig), {
760
+ return this.runtimeConfig = m(g({}, this.runtimeConfig), {
761
761
  clientId: r,
762
762
  isProd: n
763
763
  }), this.CONFIG_API_URL = this.getConfigApiUrl(n), (this.state === N.ERROR || i && (this.state === N.CONFIGURING || this.state === N.CONFIGURED)) && this.reset(), I.info("Updated Weixin runtime config", {
@@ -1042,13 +1042,13 @@ class ur {
1042
1042
  }
1043
1043
  }
1044
1044
  const b = new ur();
1045
- let ne = !1, ge = !1, U = null, Pe = !1;
1045
+ let re = !1, ge = !1, U = null, Pe = !1;
1046
1046
  function lr(t) {
1047
1047
  return new Promise((e) => {
1048
1048
  let r = !1, n = null;
1049
1049
  const i = (d) => y(null, null, function* () {
1050
1050
  if (!r) {
1051
- if (r = !0, n && clearTimeout(n), ne = !1, ge = d, d)
1051
+ if (r = !0, n && clearTimeout(n), re = !1, ge = d, d)
1052
1052
  try {
1053
1053
  yield it();
1054
1054
  } catch (u) {
@@ -1078,7 +1078,7 @@ function fr(t = !1) {
1078
1078
  if (typeof window == "undefined") return !1;
1079
1079
  if (K())
1080
1080
  return ge = !0, !1;
1081
- if (ge || Q()) return !1;
1081
+ if (ge || Z()) return !1;
1082
1082
  if (t) return !0;
1083
1083
  const e = navigator.userAgent || "", r = /micromessenger/i.test(e), n = /miniProgram/i.test(e), i = typeof window.__wxjs_environment != "undefined" && window.__wxjs_environment === "miniprogram", s = !!(window.wx && window.wx.miniProgram);
1084
1084
  return r && (n || i || s);
@@ -1105,15 +1105,15 @@ function at(t = {}) {
1105
1105
  if (K())
1106
1106
  return ge = !0, Promise.resolve();
1107
1107
  const r = document.getElementById("weixin-jssdk");
1108
- return r ? U || (ne = !0, U = lr(r).finally(() => {
1108
+ return r ? U || (re = !0, U = lr(r).finally(() => {
1109
1109
  U = null;
1110
1110
  }), U) : fr(e) ? U || (U = new Promise((n) => {
1111
- ne = !0;
1111
+ re = !0;
1112
1112
  try {
1113
1113
  const i = document.createElement("script");
1114
1114
  i.id = "weixin-jssdk", i.type = "text/javascript", i.async = !0, i.src = "https://res.wx.qq.com/open/js/jweixin-1.6.2.js", i.onload = function() {
1115
1115
  return y(this, null, function* () {
1116
- ge = !0, ne = !1, I.info("微信 JS-SDK 已自动加载");
1116
+ ge = !0, re = !1, I.info("微信 JS-SDK 已自动加载");
1117
1117
  try {
1118
1118
  yield it();
1119
1119
  } catch (o) {
@@ -1122,16 +1122,16 @@ function at(t = {}) {
1122
1122
  n();
1123
1123
  });
1124
1124
  }, i.onerror = function() {
1125
- ne = !1, I.warn("微信 JS-SDK 加载失败,SDK 将使用消息桥作为后备"), n();
1125
+ re = !1, I.warn("微信 JS-SDK 加载失败,SDK 将使用消息桥作为后备"), n();
1126
1126
  }, (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(i);
1127
1127
  } catch (i) {
1128
- ne = !1, I.error("注入微信 JS-SDK 失败", i), n();
1128
+ re = !1, I.error("注入微信 JS-SDK 失败", i), n();
1129
1129
  }
1130
1130
  }).finally(() => {
1131
1131
  U = null;
1132
1132
  }), U) : Promise.resolve();
1133
1133
  }
1134
- function z() {
1134
+ function Q() {
1135
1135
  return We({ force: !0, recoverFromError: !0 }).then(() => b.waitForReady());
1136
1136
  }
1137
1137
  function He(t = {}) {
@@ -1149,7 +1149,7 @@ function He(t = {}) {
1149
1149
  I.error("Failed to preload Weixin JS-SDK", r);
1150
1150
  }), e;
1151
1151
  }
1152
- function ee() {
1152
+ function oe() {
1153
1153
  return b.isReady();
1154
1154
  }
1155
1155
  function gr() {
@@ -1163,7 +1163,7 @@ function hr() {
1163
1163
  return I.info("手动重试微信配置"), b.reset(), Pe = !1, yield We({ force: !0 }), b.waitForReady();
1164
1164
  });
1165
1165
  }
1166
- class mr {
1166
+ class pr {
1167
1167
  constructor() {
1168
1168
  this.plugins = /* @__PURE__ */ new Map(), this.installed = /* @__PURE__ */ new Set(), this.installOrder = [], a.debug("插件管理器已初始化");
1169
1169
  }
@@ -1356,8 +1356,8 @@ class mr {
1356
1356
  this.plugins.clear(), this.installed.clear(), this.installOrder = [];
1357
1357
  }
1358
1358
  }
1359
- const fe = new mr();
1360
- class pr {
1359
+ const fe = new pr();
1360
+ class mr {
1361
1361
  constructor() {
1362
1362
  this.requestInterceptors = [], this.responseInterceptors = [], a.debug("拦截器链已初始化");
1363
1363
  }
@@ -1471,7 +1471,7 @@ class pr {
1471
1471
  };
1472
1472
  }
1473
1473
  }
1474
- const Y = new pr(), wr = {
1474
+ const z = new mr(), wr = {
1475
1475
  /**
1476
1476
  * 请求日志
1477
1477
  */
@@ -1688,10 +1688,10 @@ class Ir {
1688
1688
  for (let o = 1; o < s.length; o++) {
1689
1689
  const d = s.slice(0, o).join("."), u = this.listeners.get(d);
1690
1690
  if (u) {
1691
- const m = this.get(d);
1691
+ const p = this.get(d);
1692
1692
  u.forEach((C) => {
1693
1693
  try {
1694
- C(m, void 0, d);
1694
+ C(p, void 0, d);
1695
1695
  } catch (M) {
1696
1696
  D.error("父路径订阅者执行失败", M);
1697
1697
  }
@@ -1728,7 +1728,7 @@ class Ir {
1728
1728
  */
1729
1729
  setApiLoading(e, r = !0) {
1730
1730
  const n = `api.${e}`, i = this.get(n) || {};
1731
- this.set(n, p(g({}, i), {
1731
+ this.set(n, m(g({}, i), {
1732
1732
  loading: r,
1733
1733
  lastCall: r ? Date.now() : i.lastCall
1734
1734
  }));
@@ -1740,7 +1740,7 @@ class Ir {
1740
1740
  */
1741
1741
  setApiResult(e, r) {
1742
1742
  const n = `api.${e}`, i = this.get(n) || {};
1743
- this.set(n, p(g({}, i), {
1743
+ this.set(n, m(g({}, i), {
1744
1744
  loading: !1,
1745
1745
  lastResult: r,
1746
1746
  lastCallEnd: Date.now()
@@ -1967,7 +1967,7 @@ function Pr(t) {
1967
1967
  function _r(t) {
1968
1968
  return t.includes("CANCEL") || st(t) === W.USER_CANCEL;
1969
1969
  }
1970
- function ie(t) {
1970
+ function ne(t) {
1971
1971
  return Le[t] || Le[c.UNKNOWN_ERROR];
1972
1972
  }
1973
1973
  class V extends Error {
@@ -1978,7 +1978,7 @@ class V extends Error {
1978
1978
  * @param {Object} options - 选项
1979
1979
  */
1980
1980
  constructor(e, r, n = {}) {
1981
- super(r), this.name = "StandardError", this.code = e, this.message = r || ie(e), this.platform = n.platform || l.type, this.apiName = n.apiName, this.category = n.category || st(e), this.retriable = n.retriable !== void 0 ? n.retriable : Pr(e), this.originalError = n.originalError, this.details = n.details || {}, this.timestamp = Date.now();
1981
+ super(r), this.name = "StandardError", this.code = e, this.message = r || ne(e), this.platform = n.platform || l.type, this.apiName = n.apiName, this.category = n.category || st(e), this.retriable = n.retriable !== void 0 ? n.retriable : Pr(e), this.originalError = n.originalError, this.details = n.details || {}, this.timestamp = Date.now();
1982
1982
  }
1983
1983
  /**
1984
1984
  * 是否可重试
@@ -2039,7 +2039,7 @@ function Mr(t, e) {
2039
2039
  new: s
2040
2040
  }), new V(
2041
2041
  s,
2042
- t.message || ie(s),
2042
+ t.message || ne(s),
2043
2043
  {
2044
2044
  apiName: r,
2045
2045
  platform: t.platform || n,
@@ -2055,9 +2055,9 @@ function Cr(t, e) {
2055
2055
  const { apiName: r, platform: n } = e, i = (t.errMsg || t.message || "").toLowerCase();
2056
2056
  if (r && Ye[r]) {
2057
2057
  const d = Ye[r];
2058
- for (const [u, m] of Object.entries(d))
2058
+ for (const [u, p] of Object.entries(d))
2059
2059
  if (i.includes(u.toLowerCase()))
2060
- return new V(m, ie(m), {
2060
+ return new V(p, ne(p), {
2061
2061
  apiName: r,
2062
2062
  platform: n,
2063
2063
  originalError: t
@@ -2066,7 +2066,7 @@ function Cr(t, e) {
2066
2066
  const s = ze[n] || ze.uniapp;
2067
2067
  for (const { pattern: d, code: u } of s.patterns)
2068
2068
  if (d.test(i))
2069
- return new V(u, ie(u), {
2069
+ return new V(u, ne(u), {
2070
2070
  apiName: r,
2071
2071
  platform: n,
2072
2072
  originalError: t
@@ -2074,7 +2074,7 @@ function Cr(t, e) {
2074
2074
  const o = s.default || c.UNKNOWN_ERROR;
2075
2075
  return new V(
2076
2076
  o,
2077
- t.errMsg || t.message || ie(o),
2077
+ t.errMsg || t.message || ne(o),
2078
2078
  {
2079
2079
  apiName: r,
2080
2080
  platform: n,
@@ -2105,12 +2105,12 @@ const ct = {
2105
2105
  }
2106
2106
  };
2107
2107
  function Rr(t, e = {}) {
2108
- return new V(t, ie(t), e);
2108
+ return new V(t, ne(t), e);
2109
2109
  }
2110
- function Or(t) {
2110
+ function Sr(t) {
2111
2111
  return t instanceof V;
2112
2112
  }
2113
- function Sr(t, e, r) {
2113
+ function Or(t, e, r) {
2114
2114
  return e ? Promise.race([
2115
2115
  t(),
2116
2116
  new Promise((n, i) => setTimeout(() => i(new Error(`Init task timeout: ${r}`)), e))
@@ -2122,7 +2122,7 @@ function Nr() {
2122
2122
  const n = (r == null ? void 0 : r.name) || "anonymous-task", i = (r == null ? void 0 : r.run) || r;
2123
2123
  if (typeof i == "function")
2124
2124
  try {
2125
- yield Sr(() => Promise.resolve().then(() => i()), r.timeoutMs, n), typeof r.onSuccess == "function" && r.onSuccess();
2125
+ yield Or(() => Promise.resolve().then(() => i()), r.timeoutMs, n), typeof r.onSuccess == "function" && r.onSuccess();
2126
2126
  } catch (s) {
2127
2127
  if (typeof r.onError == "function" && r.onError(s), typeof e.onError == "function")
2128
2128
  e.onError(s, r);
@@ -2147,7 +2147,7 @@ class ut {
2147
2147
  */
2148
2148
  processNavigationOptions(e = {}) {
2149
2149
  const { url: r, delta: n = 1 } = e, i = r && encodeURI(r), s = parseInt(n) || 1;
2150
- return p(g({}, e), {
2150
+ return m(g({}, e), {
2151
2151
  url: i,
2152
2152
  delta: s
2153
2153
  });
@@ -2368,7 +2368,7 @@ function Ur(t, e) {
2368
2368
  });
2369
2369
  }
2370
2370
  function he(t, e) {
2371
- Oe() ? br(t, e) : Re() ? vr(t, e) : Q() ? Ur(t, e) : Ce() ? Lr(t, e) : xr(t, e);
2371
+ Se() ? br(t, e) : Re() ? vr(t, e) : Z() ? Ur(t, e) : Ce() ? Lr(t, e) : xr(t, e);
2372
2372
  }
2373
2373
  class lt extends ut {
2374
2374
  constructor() {
@@ -2445,7 +2445,7 @@ class lt extends ut {
2445
2445
  });
2446
2446
  }
2447
2447
  }
2448
- const te = new lt(), Wr = (t) => te.navigateTo(t), $r = (t) => te.navigateBack(t), Fr = (t) => te.switchTab(t), Br = (t) => te.reLaunch(t), kr = (t) => te.redirectTo(t), Gr = (t) => te.postMessage(t), Kr = (t) => te.getEnv(t);
2448
+ const ee = new lt(), Wr = (t) => ee.navigateTo(t), $r = (t) => ee.navigateBack(t), Fr = (t) => ee.switchTab(t), Br = (t) => ee.reLaunch(t), kr = (t) => ee.redirectTo(t), Gr = (t) => ee.postMessage(t), Kr = (t) => ee.getEnv(t);
2449
2449
  var ft = /* @__PURE__ */ Object.freeze({
2450
2450
  __proto__: null,
2451
2451
  WeixinPlatform: lt,
@@ -2504,14 +2504,14 @@ class dt extends ut {
2504
2504
  throw new Error("Callback function is required for getEnv");
2505
2505
  const r = {};
2506
2506
  let n = !1;
2507
- Oe() ? (r.uvue = !0, n = !0) : Re() ? (r.nvue = !0, n = !0) : Ce() ? (r.plus = !0, n = !0) : Q() && (r.offline = !0, n = !0), n ? r.app = !0 : r.h5 = !0, e(r);
2507
+ Se() ? (r.uvue = !0, n = !0) : Re() ? (r.nvue = !0, n = !0) : Ce() ? (r.plus = !0, n = !0) : Z() && (r.offline = !0, n = !0), n ? r.app = !0 : r.h5 = !0, e(r);
2508
2508
  }, {
2509
2509
  platform: this.name,
2510
2510
  method: "performGetEnv"
2511
2511
  });
2512
2512
  }
2513
2513
  }
2514
- const re = new dt(), Vr = (t) => re.navigateTo(t), qr = (t) => re.navigateBack(t), jr = (t) => re.switchTab(t), Jr = (t) => re.reLaunch(t), Hr = (t) => re.redirectTo(t), zr = (t) => re.postMessage(t), Yr = (t) => re.getEnv(t);
2514
+ const te = new dt(), Vr = (t) => te.navigateTo(t), qr = (t) => te.navigateBack(t), jr = (t) => te.switchTab(t), Jr = (t) => te.reLaunch(t), Hr = (t) => te.redirectTo(t), zr = (t) => te.postMessage(t), Yr = (t) => te.getEnv(t);
2515
2515
  var gt = /* @__PURE__ */ Object.freeze({
2516
2516
  __proto__: null,
2517
2517
  AppPlatform: dt,
@@ -2523,23 +2523,23 @@ var gt = /* @__PURE__ */ Object.freeze({
2523
2523
  redirectTo: Hr,
2524
2524
  switchTab: jr
2525
2525
  });
2526
- function pe() {
2526
+ function me() {
2527
2527
  return _() ? ft : gt;
2528
2528
  }
2529
2529
  function Xr(t) {
2530
- return pe().navigateTo(t);
2530
+ return me().navigateTo(t);
2531
2531
  }
2532
2532
  function Zr(t) {
2533
- return pe().navigateBack(t);
2533
+ return me().navigateBack(t);
2534
2534
  }
2535
2535
  function Qr(t) {
2536
- return pe().switchTab(t);
2536
+ return me().switchTab(t);
2537
2537
  }
2538
2538
  function en(t) {
2539
- return pe().reLaunch(t);
2539
+ return me().reLaunch(t);
2540
2540
  }
2541
2541
  function tn(t) {
2542
- return pe().redirectTo(t);
2542
+ return me().redirectTo(t);
2543
2543
  }
2544
2544
  function ht() {
2545
2545
  return _() ? ft : gt;
@@ -2570,8 +2570,8 @@ class on {
2570
2570
  callApi(i) {
2571
2571
  return y(this, arguments, function* (e, r = {}, n = {}) {
2572
2572
  return f.safeExecute(() => y(this, null, function* () {
2573
- var m;
2574
- if (typeof window != "undefined" && window === window.parent && !window.plus && !window.__uniapp_x_postMessage && !window.__uniapp_x_ && !window.__dcloud_weex_postMessage && !window.__dcloud_weex_ && !Q()) {
2573
+ var p;
2574
+ if (typeof window != "undefined" && window === window.parent && !window.plus && !window.__uniapp_x_postMessage && !window.__uniapp_x_ && !window.__dcloud_weex_postMessage && !window.__dcloud_weex_ && !Z()) {
2575
2575
  const C = new T(
2576
2576
  x.PLATFORM_NOT_SUPPORTED,
2577
2577
  "当前不在宿主 WebView 容器中,无法发送消息"
@@ -2588,17 +2588,17 @@ class on {
2588
2588
  metadata: {}
2589
2589
  };
2590
2590
  G.setApiLoading(e, !0);
2591
- const d = yield Y.runRequest(o);
2591
+ const d = yield z.runRequest(o);
2592
2592
  if (d.abort) {
2593
2593
  A.warn("API 调用被拦截器中止", { api: e }), G.setApiLoading(e, !1), n.fail && n.fail({
2594
- errMsg: ((m = d.error) == null ? void 0 : m.message) || "API 调用被中止",
2594
+ errMsg: ((p = d.error) == null ? void 0 : p.message) || "API 调用被中止",
2595
2595
  code: "INTERCEPTED"
2596
2596
  }), n.complete && n.complete({ success: !1 });
2597
2597
  return;
2598
2598
  }
2599
2599
  const u = sn();
2600
2600
  if (n.success || n.fail || n.complete) {
2601
- if (this.callbacks.set(u, p(g({}, n), {
2601
+ if (this.callbacks.set(u, m(g({}, n), {
2602
2602
  context: d
2603
2603
  // 保存上下文用于响应拦截
2604
2604
  })), window.qshWebviewCallbacks[u] = ($) => {
@@ -2655,7 +2655,7 @@ class on {
2655
2655
  }
2656
2656
  const { success: i, fail: s, complete: o, context: d } = n;
2657
2657
  A.debug("处理回调", { callbackId: e, result: r });
2658
- const u = yield Y.runResponse(r, d);
2658
+ const u = yield z.runResponse(r, d);
2659
2659
  d && G.setApiResult(d.apiName, u), u.success && i ? i(u.data) : !u.success && s && s(u.error || { errMsg: "操作失败" }), o && o(u), ((M = (C = n.context) == null ? void 0 : C.params) == null ? void 0 : M.isPersistent) ? A.debug("持久监听API:保留回调", { callbackId: e }) : (this.cleanupCallback(e), A.debug("回调执行完成,已清理", { callbackId: e }));
2660
2660
  }), {
2661
2661
  context: "WebViewBridge.handleCallback",
@@ -2709,8 +2709,8 @@ class on {
2709
2709
  };
2710
2710
  }
2711
2711
  }
2712
- const mt = new on(), S = (t, e, r) => mt.callApi(t, e, r), ae = (t) => mt.cleanupPersistentCallbacksByApi(t);
2713
- function pt() {
2712
+ const pt = new on(), O = (t, e, r) => pt.callApi(t, e, r), ie = (t) => pt.cleanupPersistentCallbacksByApi(t);
2713
+ function mt() {
2714
2714
  return H(!0);
2715
2715
  }
2716
2716
  function cn(t) {
@@ -2720,7 +2720,7 @@ function un(t = {}) {
2720
2720
  return f.safeExecute(() => {
2721
2721
  a.debug("Call getCode through offline webview bridge", {
2722
2722
  clientId: t.clientId
2723
- }), S(
2723
+ }), O(
2724
2724
  "getCode",
2725
2725
  {
2726
2726
  clientId: t.clientId
@@ -2739,13 +2739,13 @@ function un(t = {}) {
2739
2739
  );
2740
2740
  }, {
2741
2741
  context: "getCodeInHost",
2742
- platform: pt().type
2742
+ platform: mt().type
2743
2743
  });
2744
2744
  }
2745
2745
  function ln(t = {}) {
2746
2746
  return f.safeExecute(() => {
2747
2747
  var n, i;
2748
- const e = pt(), r = String((t == null ? void 0 : t.clientId) || "").trim();
2748
+ const e = mt(), r = String((t == null ? void 0 : t.clientId) || "").trim();
2749
2749
  if (!r) {
2750
2750
  const s = {
2751
2751
  errMsg: "clientId is required",
@@ -2764,7 +2764,7 @@ function ln(t = {}) {
2764
2764
  }), (i = t.fail) == null || i.call(t, s);
2765
2765
  return;
2766
2766
  }
2767
- un(p(g({}, t), {
2767
+ un(m(g({}, t), {
2768
2768
  clientId: r
2769
2769
  }));
2770
2770
  }, {
@@ -2793,7 +2793,7 @@ function fn(t = {}) {
2793
2793
  errMsg: `env must be one of ${Xe.join("/")}`,
2794
2794
  code: "PARAM_INVALID"
2795
2795
  };
2796
- return p(g({}, t), {
2796
+ return m(g({}, t), {
2797
2797
  appid: e,
2798
2798
  path: r.trim(),
2799
2799
  env: i
@@ -2839,7 +2839,7 @@ function gn(t = {}) {
2839
2839
  delta: 1,
2840
2840
  success: (o) => {
2841
2841
  var u;
2842
- const d = p(g({}, o), {
2842
+ const d = m(g({}, o), {
2843
2843
  errMsg: (o == null ? void 0 : o.errMsg) || "navigateToMiniProgram:queued"
2844
2844
  });
2845
2845
  a.info("Navigate to mini program request queued in weixin web-view", {
@@ -2866,7 +2866,7 @@ function hn(t = {}) {
2866
2866
  path: t.path,
2867
2867
  env: t.env
2868
2868
  }), new Promise((e, r) => {
2869
- S(
2869
+ O(
2870
2870
  "navigateToMiniProgram",
2871
2871
  {
2872
2872
  appid: t.appid,
@@ -2890,7 +2890,7 @@ function hn(t = {}) {
2890
2890
  platform: wt().type
2891
2891
  });
2892
2892
  }
2893
- function mn(t = {}) {
2893
+ function pn(t = {}) {
2894
2894
  return f.safeExecute(() => {
2895
2895
  var n;
2896
2896
  const e = wt();
@@ -2912,7 +2912,7 @@ function mn(t = {}) {
2912
2912
  options: t
2913
2913
  });
2914
2914
  }
2915
- function pn(t = "") {
2915
+ function mn(t = "") {
2916
2916
  return /^https?:\/\//i.test(String(t || "").trim());
2917
2917
  }
2918
2918
  function wn(t) {
@@ -2946,7 +2946,7 @@ function yn(t = {}) {
2946
2946
  errMsg: "manualShare: clientId is required",
2947
2947
  code: "PARAM_MISSING"
2948
2948
  };
2949
- if (r && !pn(r))
2949
+ if (r && !mn(r))
2950
2950
  throw {
2951
2951
  errMsg: "manualShare: h5Url must be a valid http(s) url",
2952
2952
  code: "PARAM_INVALID"
@@ -2994,7 +2994,7 @@ function An(t) {
2994
2994
  window.wx.miniProgram.navigateBack({
2995
2995
  delta: 1,
2996
2996
  success: (i) => {
2997
- const s = p(g({}, i || {}), {
2997
+ const s = m(g({}, i || {}), {
2998
2998
  success: !0,
2999
2999
  errMsg: (i == null ? void 0 : i.errMsg) || "manualShare:queued"
3000
3000
  });
@@ -3021,29 +3021,29 @@ function Et(t = {}) {
3021
3021
  let r;
3022
3022
  try {
3023
3023
  r = yn(t);
3024
- } catch (m) {
3025
- return (n = t.fail) == null || n.call(t, m), (i = t.complete) == null || i.call(t, m), Promise.reject(m);
3024
+ } catch (p) {
3025
+ return (n = t.fail) == null || n.call(t, p), (i = t.complete) == null || i.call(t, p), Promise.reject(p);
3026
3026
  }
3027
3027
  if (!e.isWeixinMiniProgram) {
3028
- const m = {
3028
+ const p = {
3029
3029
  errMsg: "manualShare only supports Weixin mini-program web-view environment",
3030
3030
  code: "ENV_NOT_SUPPORTED"
3031
3031
  };
3032
- return (s = r.fail) == null || s.call(r, m), (o = r.complete) == null || o.call(r, m), Promise.reject(m);
3032
+ return (s = r.fail) == null || s.call(r, p), (o = r.complete) == null || o.call(r, p), Promise.reject(p);
3033
3033
  }
3034
3034
  if (!En()) {
3035
- const m = {
3035
+ const p = {
3036
3036
  errMsg: "wx.miniProgram.postMessage or wx.miniProgram.navigateBack is not available",
3037
3037
  code: "PLATFORM_NOT_SUPPORTED"
3038
3038
  };
3039
- return (d = r.fail) == null || d.call(r, m), (u = r.complete) == null || u.call(r, m), Promise.reject(m);
3039
+ return (d = r.fail) == null || d.call(r, p), (u = r.complete) == null || u.call(r, p), Promise.reject(p);
3040
3040
  }
3041
- return An(r).then((m) => {
3041
+ return An(r).then((p) => {
3042
3042
  var C, M;
3043
- return (C = r.success) == null || C.call(r, m), (M = r.complete) == null || M.call(r, m), m;
3044
- }).catch((m) => {
3043
+ return (C = r.success) == null || C.call(r, p), (M = r.complete) == null || M.call(r, p), p;
3044
+ }).catch((p) => {
3045
3045
  var C, M;
3046
- return (C = r.fail) == null || C.call(r, m), (M = r.complete) == null || M.call(r, m), Promise.reject(m);
3046
+ return (C = r.fail) == null || C.call(r, p), (M = r.complete) == null || M.call(r, p), Promise.reject(p);
3047
3047
  });
3048
3048
  },
3049
3049
  {
@@ -3054,7 +3054,7 @@ function Et(t = {}) {
3054
3054
  }
3055
3055
  function Pn(t = {}) {
3056
3056
  return new Promise((e, r) => {
3057
- Et(p(g({}, t), {
3057
+ Et(m(g({}, t), {
3058
3058
  success: e,
3059
3059
  fail: r
3060
3060
  }));
@@ -3093,8 +3093,8 @@ function It(t) {
3093
3093
  (e = t.fail) == null || e.call(t, r);
3094
3094
  return;
3095
3095
  }
3096
- if (!ee()) {
3097
- a.info("等待微信配置完成"), z().then(() => It(t)).catch((r) => {
3096
+ if (!oe()) {
3097
+ a.info("等待微信配置完成"), Q().then(() => It(t)).catch((r) => {
3098
3098
  var n;
3099
3099
  a.error("微信配置失败", r), (n = t.fail) == null || n.call(t, { errMsg: `微信配置失败: ${r.message}` });
3100
3100
  });
@@ -3121,7 +3121,7 @@ function It(t) {
3121
3121
  }
3122
3122
  function Cn(t) {
3123
3123
  return f.safeExecute(() => {
3124
- a.debug("通过 WebView 桥接调用图片选择", t), S("chooseImage", p(g({}, t), { disableTimeout: !0 }), {
3124
+ a.debug("通过 WebView 桥接调用图片选择", t), O("chooseImage", m(g({}, t), { disableTimeout: !0 }), {
3125
3125
  success: (e) => {
3126
3126
  var r, n;
3127
3127
  a.info("UniApp 图片选择成功", {
@@ -3162,7 +3162,7 @@ function Rn(t = {}) {
3162
3162
  options: t
3163
3163
  });
3164
3164
  }
3165
- function On() {
3165
+ function Sn() {
3166
3166
  return {
3167
3167
  supported: yt(),
3168
3168
  environment: l.type,
@@ -3179,7 +3179,7 @@ function On() {
3179
3179
  }
3180
3180
  };
3181
3181
  }
3182
- const Z = {
3182
+ const X = {
3183
3183
  QR_CODE: "qrCode",
3184
3184
  // 二维码
3185
3185
  BAR_CODE: "barCode",
@@ -3188,15 +3188,15 @@ const Z = {
3188
3188
  // Data Matrix 码
3189
3189
  PDF417: "pdf417"
3190
3190
  // PDF417 条码
3191
- }, Sn = {
3191
+ }, On = {
3192
3192
  onlyFromCamera: !0,
3193
3193
  // 只从相机扫码
3194
- scanType: [Z.QR_CODE, Z.BAR_CODE]
3194
+ scanType: [X.QR_CODE, X.BAR_CODE]
3195
3195
  // 支持二维码和一维码
3196
3196
  };
3197
3197
  function Nn(t = {}) {
3198
- const e = g(g({}, Sn), t);
3199
- return Array.isArray(e.scanType) || (e.scanType = [e.scanType].filter(Boolean)), e.scanType.length === 0 && (e.scanType = [Z.QR_CODE, Z.BAR_CODE]), e.onlyFromCamera = !!e.onlyFromCamera, e;
3198
+ const e = g(g({}, On), t);
3199
+ return Array.isArray(e.scanType) || (e.scanType = [e.scanType].filter(Boolean)), e.scanType.length === 0 && (e.scanType = [X.QR_CODE, X.BAR_CODE]), e.onlyFromCamera = !!e.onlyFromCamera, e;
3200
3200
  }
3201
3201
  function At() {
3202
3202
  return ["weixin", "webview", "UniApp", "plus", "nvue", "uvue", "offline"].includes(l.type);
@@ -3212,8 +3212,8 @@ function Pt(t) {
3212
3212
  (e = t.fail) == null || e.call(t, r);
3213
3213
  return;
3214
3214
  }
3215
- if (!ee()) {
3216
- a.info("等待微信配置完成"), z().then(() => Pt(t)).catch((r) => {
3215
+ if (!oe()) {
3216
+ a.info("等待微信配置完成"), Q().then(() => Pt(t)).catch((r) => {
3217
3217
  var n;
3218
3218
  a.error("微信配置失败", r), (n = t.fail) == null || n.call(t, { errMsg: `微信配置失败: ${r.message}` });
3219
3219
  });
@@ -3249,11 +3249,11 @@ function Pt(t) {
3249
3249
  });
3250
3250
  }
3251
3251
  function Tn(t) {
3252
- return t ? t.length > 50 || /[^\d]/.test(t) ? Z.QR_CODE : Z.BAR_CODE : "unknown";
3252
+ return t ? t.length > 50 || /[^\d]/.test(t) ? X.QR_CODE : X.BAR_CODE : "unknown";
3253
3253
  }
3254
3254
  function bn(t) {
3255
3255
  return f.safeExecute(() => {
3256
- a.debug("通过 WebView 桥接调用扫码", t), S("scanCode", p(g({}, t), { disableTimeout: !0 }), {
3256
+ a.debug("通过 WebView 桥接调用扫码", t), O("scanCode", m(g({}, t), { disableTimeout: !0 }), {
3257
3257
  success: (e) => {
3258
3258
  var r;
3259
3259
  a.info("UniApp 扫码成功", {
@@ -3311,7 +3311,7 @@ function Ln() {
3311
3311
  }
3312
3312
  };
3313
3313
  }
3314
- const se = {
3314
+ const ae = {
3315
3315
  WGS84: "wgs84",
3316
3316
  // GPS 坐标
3317
3317
  GCJ02: "gcj02",
@@ -3319,7 +3319,7 @@ const se = {
3319
3319
  BD09: "bd09"
3320
3320
  // 百度坐标
3321
3321
  }, xn = {
3322
- type: se.WGS84,
3322
+ type: ae.WGS84,
3323
3323
  altitude: !1
3324
3324
  }, Dn = {
3325
3325
  scale: 18
@@ -3327,11 +3327,11 @@ const se = {
3327
3327
  };
3328
3328
  function Un(t = {}) {
3329
3329
  const e = g(g({}, xn), t);
3330
- return Object.values(se).includes(e.type) || (e.type = se.WGS84), e.altitude = !!e.altitude, e;
3330
+ return Object.values(ae).includes(e.type) || (e.type = ae.WGS84), e.altitude = !!e.altitude, e;
3331
3331
  }
3332
3332
  function Wn(t = {}) {
3333
3333
  const e = g({}, t);
3334
- return Object.values(se).includes(e.type) || (e.type = se.WGS84), e.needFullAccuracy = !!e.needFullAccuracy, e;
3334
+ return Object.values(ae).includes(e.type) || (e.type = ae.WGS84), e.needFullAccuracy = !!e.needFullAccuracy, e;
3335
3335
  }
3336
3336
  function $n(t = {}) {
3337
3337
  const e = g(g({}, Dn), t);
@@ -3407,8 +3407,8 @@ function _t(t) {
3407
3407
  (e = t.fail) == null || e.call(t, r);
3408
3408
  return;
3409
3409
  }
3410
- if (!ee()) {
3411
- a.info("等待微信配置完成"), z().then(() => _t(t)).catch((r) => {
3410
+ if (!oe()) {
3411
+ a.info("等待微信配置完成"), Q().then(() => _t(t)).catch((r) => {
3412
3412
  var n;
3413
3413
  a.error("微信配置失败", r), (n = t.fail) == null || n.call(t, { errMsg: `微信配置失败: ${r.message}` });
3414
3414
  });
@@ -3445,8 +3445,8 @@ function Mt(t) {
3445
3445
  (e = t.fail) == null || e.call(t, r);
3446
3446
  return;
3447
3447
  }
3448
- if (!ee()) {
3449
- a.info("等待微信配置完成"), z().then(() => Mt(t)).catch((r) => {
3448
+ if (!oe()) {
3449
+ a.info("等待微信配置完成"), Q().then(() => Mt(t)).catch((r) => {
3450
3450
  var n;
3451
3451
  a.error("微信配置失败", r), (n = t.fail) == null || n.call(t, { errMsg: `微信配置失败: ${r.message}` });
3452
3452
  });
@@ -3476,7 +3476,7 @@ function Mt(t) {
3476
3476
  }
3477
3477
  function Fn(t) {
3478
3478
  return f.safeExecute(() => {
3479
- a.debug("通过 WebView 桥接调用获取位置", t), S("getLocation", t, {
3479
+ a.debug("通过 WebView 桥接调用获取位置", t), O("getLocation", t, {
3480
3480
  success: (e) => {
3481
3481
  var r;
3482
3482
  a.info("UniApp 获取位置成功", {
@@ -3497,7 +3497,7 @@ function Fn(t) {
3497
3497
  }
3498
3498
  function Bn(t) {
3499
3499
  return f.safeExecute(() => {
3500
- a.debug("通过 WebView 桥接调用查看位置", t), S("openLocation", t, {
3500
+ a.debug("通过 WebView 桥接调用查看位置", t), O("openLocation", t, {
3501
3501
  success: (e) => {
3502
3502
  var r;
3503
3503
  a.info("UniApp 查看位置成功"), (r = t.success) == null || r.call(t, e);
@@ -3608,7 +3608,7 @@ function Vn(t = {}) {
3608
3608
  return;
3609
3609
  }
3610
3610
  const e = Wn(t);
3611
- a.info("正在开启定位监听"), S("startLocationUpdate", {
3611
+ a.info("正在开启定位监听"), O("startLocationUpdate", {
3612
3612
  type: e.type,
3613
3613
  needFullAccuracy: e.needFullAccuracy
3614
3614
  }, {
@@ -3635,7 +3635,7 @@ function qn(t = {}) {
3635
3635
  a.error("当前环境不支持此接口", { platform: l.type }), (e = t.fail) == null || e.call(t, n), (r = t.complete) == null || r.call(t, n);
3636
3636
  return;
3637
3637
  }
3638
- a.info("正在停止定位监听"), S("stopLocationUpdate", t, {
3638
+ a.info("正在停止定位监听"), O("stopLocationUpdate", t, {
3639
3639
  success: (n) => {
3640
3640
  var i;
3641
3641
  a.info("定位监听已停止"), (i = t.success) == null || i.call(t, n);
@@ -3660,12 +3660,12 @@ function jn(t) {
3660
3660
  code: "INVALID_CALLBACK"
3661
3661
  };
3662
3662
  const e = j.size > 0;
3663
- j.add(t), e || (a.debug("注册实时位置变化监听器"), S("onLocationChange", { isPersistent: !0 }, {
3663
+ j.add(t), e || (a.debug("注册实时位置变化监听器"), O("onLocationChange", { isPersistent: !0 }, {
3664
3664
  success: (r) => {
3665
3665
  a.debug("收到实时位置推送", r), Ct(j, r, "onLocationChange");
3666
3666
  },
3667
3667
  fail: (r) => {
3668
- a.warn("位置变化监听出错,请通过 onLocationChangeError 监听错误", r), j.delete(t), j.size === 0 && ae("onLocationChange");
3668
+ a.warn("位置变化监听出错,请通过 onLocationChangeError 监听错误", r), j.delete(t), j.size === 0 && ie("onLocationChange");
3669
3669
  }
3670
3670
  }));
3671
3671
  }, { context: "onLocationChange" });
@@ -3681,12 +3681,12 @@ function Jn(t) {
3681
3681
  errMsg: "offLocationChange 回调必须是函数",
3682
3682
  code: "INVALID_CALLBACK"
3683
3683
  };
3684
- t ? j.delete(t) : j.clear(), !(j.size > 0) && (a.info("移除位置变化监听器"), S("offLocationChange", {}, {
3684
+ t ? j.delete(t) : j.clear(), !(j.size > 0) && (a.info("移除位置变化监听器"), O("offLocationChange", {}, {
3685
3685
  success: () => {
3686
- a.info("位置变化监听已移除"), ae("onLocationChange");
3686
+ a.info("位置变化监听已移除"), ie("onLocationChange");
3687
3687
  },
3688
3688
  fail: (e) => {
3689
- a.error("移除位置变化监听失败", e), ae("onLocationChange");
3689
+ a.error("移除位置变化监听失败", e), ie("onLocationChange");
3690
3690
  }
3691
3691
  }));
3692
3692
  }, { context: "offLocationChange" });
@@ -3703,12 +3703,12 @@ function Hn(t) {
3703
3703
  code: "INVALID_CALLBACK"
3704
3704
  };
3705
3705
  const e = J.size > 0;
3706
- J.add(t), e || (a.debug("注册位置更新错误监听器"), S("onLocationChangeError", { isPersistent: !0 }, {
3706
+ J.add(t), e || (a.debug("注册位置更新错误监听器"), O("onLocationChangeError", { isPersistent: !0 }, {
3707
3707
  success: (r) => {
3708
3708
  a.warn("持续定位发生异常", r), Ct(J, r, "onLocationChangeError");
3709
3709
  },
3710
3710
  fail: (r) => {
3711
- a.warn("位置更新错误监听注册失败", r), J.delete(t), J.size === 0 && ae("onLocationChangeError");
3711
+ a.warn("位置更新错误监听注册失败", r), J.delete(t), J.size === 0 && ie("onLocationChangeError");
3712
3712
  }
3713
3713
  }));
3714
3714
  }, { context: "onLocationChangeError" });
@@ -3724,12 +3724,12 @@ function zn(t) {
3724
3724
  errMsg: "offLocationChangeError 回调必须是函数",
3725
3725
  code: "INVALID_CALLBACK"
3726
3726
  };
3727
- t ? J.delete(t) : J.clear(), !(J.size > 0) && (a.info("移除定位错误监听器"), S("offLocationChangeError", {}, {
3727
+ t ? J.delete(t) : J.clear(), !(J.size > 0) && (a.info("移除定位错误监听器"), O("offLocationChangeError", {}, {
3728
3728
  success: () => {
3729
- a.info("定位错误监听已移除"), ae("onLocationChangeError");
3729
+ a.info("定位错误监听已移除"), ie("onLocationChangeError");
3730
3730
  },
3731
3731
  fail: (e) => {
3732
- a.error("移除定位错误监听失败", e), ae("onLocationChangeError");
3732
+ a.error("移除定位错误监听失败", e), ie("onLocationChangeError");
3733
3733
  }
3734
3734
  }));
3735
3735
  }, { context: "offLocationChangeError" });
@@ -3753,64 +3753,7 @@ function Xn(t = {}) {
3753
3753
  }), e.longitude = null)), e;
3754
3754
  }
3755
3755
  function Rt() {
3756
- return ["weixin", "webview", "UniApp", "plus", "nvue", "uvue", "offline"].includes(l.type);
3757
- }
3758
- function Ot(t) {
3759
- return f.safeExecute(() => {
3760
- var n;
3761
- if (!window.wx) {
3762
- const i = {
3763
- errMsg: "微信JS-SDK未加载",
3764
- code: "WEIXIN_SDK_NOT_LOADED"
3765
- };
3766
- (n = t.fail) == null || n.call(t, i);
3767
- return;
3768
- }
3769
- if (!ee()) {
3770
- a.info("等待微信配置完成"), z().then(() => Ot(t)).catch((i) => {
3771
- var s;
3772
- a.error("微信配置失败", i), (s = t.fail) == null || s.call(t, { errMsg: `微信配置失败: ${i.message}` });
3773
- });
3774
- return;
3775
- }
3776
- a.debug("调用微信位置选择", t);
3777
- const e = {
3778
- success: (i) => {
3779
- var o;
3780
- a.info("微信位置选择成功", {
3781
- name: i.name,
3782
- address: i.address,
3783
- latitude: i.latitude,
3784
- longitude: i.longitude
3785
- });
3786
- const s = {
3787
- name: i.name,
3788
- // 位置名称
3789
- address: i.address,
3790
- // 详细地址
3791
- latitude: i.latitude,
3792
- // 纬度
3793
- longitude: i.longitude,
3794
- // 经度
3795
- errMsg: "chooseLocation:ok"
3796
- };
3797
- (o = t.success) == null || o.call(t, s);
3798
- },
3799
- fail: (i) => {
3800
- var s;
3801
- a.error("微信位置选择失败", i), (s = t.fail) == null || s.call(t, i);
3802
- },
3803
- complete: t.complete
3804
- }, r = {};
3805
- t.latitude !== null && t.latitude !== void 0 && (r.latitude = t.latitude), t.longitude !== null && t.longitude !== void 0 && (r.longitude = t.longitude), window.wx.chooseLocation(p(g({}, r), {
3806
- success: e.success,
3807
- fail: e.fail,
3808
- complete: e.complete
3809
- }));
3810
- }, {
3811
- context: "chooseLocationInWeixin",
3812
- platform: "weixin"
3813
- });
3756
+ return ["webview", "UniApp", "plus", "nvue", "uvue", "offline"].includes(l.type);
3814
3757
  }
3815
3758
  function Zn(t) {
3816
3759
  return f.safeExecute(() => {
@@ -3833,7 +3776,7 @@ function Zn(t) {
3833
3776
  },
3834
3777
  complete: t.complete
3835
3778
  };
3836
- t.latitude !== null && t.latitude !== void 0 && (e.latitude = t.latitude), t.longitude !== null && t.longitude !== void 0 && (e.longitude = t.longitude), S("chooseLocation", e, {
3779
+ t.latitude !== null && t.latitude !== void 0 && (e.latitude = t.latitude), t.longitude !== null && t.longitude !== void 0 && (e.longitude = t.longitude), O("chooseLocation", e, {
3837
3780
  success: (r) => {
3838
3781
  e.success(r);
3839
3782
  },
@@ -3863,7 +3806,7 @@ function Qn(t = {}) {
3863
3806
  platform: l.type,
3864
3807
  latitude: e.latitude,
3865
3808
  longitude: e.longitude
3866
- }), _() ? Ot(e) : Zn(e);
3809
+ }), _() || Zn(e);
3867
3810
  }, {
3868
3811
  context: "chooseLocation",
3869
3812
  options: t
@@ -3894,7 +3837,7 @@ function Ne(t = "", e = "targetPath") {
3894
3837
  const r = t.trim(), [, n = ""] = r.split("?");
3895
3838
  return { path: r, query: n };
3896
3839
  }
3897
- function Nt(t = "", e = "webTarget") {
3840
+ function Ot(t = "", e = "webTarget") {
3898
3841
  if (!t || typeof t != "string")
3899
3842
  throw { errMsg: `share: ${e} 必须是公网链接,例如 https://example.com/path?a=1`, code: "PARAM_INVALID" };
3900
3843
  const r = t.trim();
@@ -3973,7 +3916,7 @@ function si(t, e) {
3973
3916
  if (e.isAppPlus) {
3974
3917
  const n = (o, d) => {
3975
3918
  try {
3976
- return Nt(o, d);
3919
+ return Ot(o, d);
3977
3920
  } catch (u) {
3978
3921
  return "";
3979
3922
  }
@@ -4020,7 +3963,7 @@ function ui(t) {
4020
3963
  });
4021
3964
  });
4022
3965
  }
4023
- function Tt(t, e = "share") {
3966
+ function Nt(t, e = "share") {
4024
3967
  const r = typeof window != "undefined" && window.wx && window.wx.miniProgram;
4025
3968
  if (!r || typeof r.postMessage != "function")
4026
3969
  throw { errMsg: `当前微信小程序容器未注入 postMessage 能力,无法发起 ${e}`, code: "MINIPROGRAM_BRIDGE_UNAVAILABLE" };
@@ -4036,12 +3979,36 @@ function fi(t = {}) {
4036
3979
  if (!e.title) throw { errMsg: "shareMiniProgramCard: payload.title 必填", code: "PARAM_MISSING" };
4037
3980
  if (!e.imageUrl) throw { errMsg: "shareMiniProgramCard: payload.imageUrl 必填", code: "PARAM_MISSING" };
4038
3981
  if (!e.targetPath) throw { errMsg: "shareMiniProgramCard: payload.targetPath 必填", code: "PARAM_MISSING" };
4039
- if (!e.appid) throw { errMsg: "shareMiniProgramCard: payload.appid 必填", code: "PARAM_MISSING" };
4040
3982
  return Ne(e.targetPath, "targetPath"), { payload: e, success: t.success, fail: t.fail, complete: t.complete };
4041
3983
  }
3984
+ function Tt(t) {
3985
+ switch (String(t || "release").trim().toLowerCase()) {
3986
+ case "develop":
3987
+ case "development":
3988
+ case "test":
3989
+ return "test";
3990
+ case "trial":
3991
+ case "preview":
3992
+ case "experience":
3993
+ return "preview";
3994
+ case "release":
3995
+ case "formal":
3996
+ case "production":
3997
+ return "release";
3998
+ default:
3999
+ throw { errMsg: 'shareMiniProgramCard: payload.envVersion 仅支持 "develop"|"trial"|"release"', code: "PARAM_INVALID" };
4000
+ }
4001
+ }
4042
4002
  function di(t) {
4043
4003
  const { payload: e } = t;
4044
- return Nt(e.webUrl, "webUrl"), t;
4004
+ if (!e.appid)
4005
+ throw { errMsg: "shareMiniProgramCard: App 环境下 payload.appid 必填", code: "PARAM_MISSING" };
4006
+ try {
4007
+ Ot(e.webUrl, "webUrl");
4008
+ } catch (r) {
4009
+ throw { errMsg: "shareMiniProgramCard: App 环境下 payload.webUrl 必填,且必须是公网链接", code: (r == null ? void 0 : r.code) || "PARAM_INVALID" };
4010
+ }
4011
+ return Tt(e.envVersion), t;
4045
4012
  }
4046
4013
  function gi(t) {
4047
4014
  const { payload: e } = t, r = Ne(e.targetPath, "targetPath");
@@ -4063,25 +4030,25 @@ function hi(t) {
4063
4030
  miniProgram: {
4064
4031
  id: e.appid,
4065
4032
  path: e.targetPath,
4066
- type: e.envVersion || "release",
4033
+ type: Tt(e.envVersion),
4067
4034
  webUrl: e.webUrl
4068
4035
  }
4069
4036
  };
4070
4037
  }
4071
- function mi(t, e) {
4038
+ function pi(t, e) {
4072
4039
  return { type: "qsh_api_call", api: "shareMiniProgramCard", params: { miniProgramShare: gi(t), rowCustom: e }, timestamp: Date.now() };
4073
4040
  }
4074
- function pi(t) {
4041
+ function mi(t) {
4075
4042
  return y(this, null, function* () {
4076
4043
  return new Promise((e, r) => {
4077
- S("shareMiniProgramCard", { appShare: hi(t) }, { success: (n) => e(n || {}), fail: (n) => r(n) });
4044
+ O("shareMiniProgramCard", { appShare: hi(t) }, { success: (n) => e(n || {}), fail: (n) => r(n) });
4078
4045
  });
4079
4046
  });
4080
4047
  }
4081
4048
  function bt(t = {}) {
4082
4049
  return f.safeExecute(
4083
4050
  () => {
4084
- var s, o, d, u, m, C, M, $, ce, R, F;
4051
+ var s, o, d, u, p, C, M, $, ce, R, F;
4085
4052
  let e;
4086
4053
  try {
4087
4054
  e = ai(t);
@@ -4095,10 +4062,10 @@ function bt(t = {}) {
4095
4062
  return (o = e.fail) == null || o.call(e, w), (d = e.complete) == null || d.call(e, w), Promise.reject(w);
4096
4063
  }
4097
4064
  const n = ii(r);
4098
- if (r.isUniApp)
4065
+ if (r.isAppPlus)
4099
4066
  return ui(e).then((w) => {
4100
4067
  var ue, je;
4101
- const B = p(g({}, (w == null ? void 0 : w.data) || {}), { hint: n });
4068
+ const B = m(g({}, (w == null ? void 0 : w.data) || {}), { hint: n });
4102
4069
  return (ue = e.success) == null || ue.call(e, B), (je = e.complete) == null || je.call(e, B), B;
4103
4070
  }).catch((w) => {
4104
4071
  var B, ue;
@@ -4106,9 +4073,9 @@ function bt(t = {}) {
4106
4073
  });
4107
4074
  if (r.isWeixinMiniProgram)
4108
4075
  try {
4109
- Tt(li(e, t.rowCustom), "shareDirected");
4076
+ Nt(li(e, t.rowCustom), "shareDirected");
4110
4077
  const w = { success: !0, hint: n };
4111
- return (u = e.success) == null || u.call(e, w), (m = e.complete) == null || m.call(e, w), Promise.resolve(w);
4078
+ return (u = e.success) == null || u.call(e, w), (p = e.complete) == null || p.call(e, w), Promise.resolve(w);
4112
4079
  } catch (w) {
4113
4080
  return (C = e.fail) == null || C.call(e, w), (M = e.complete) == null || M.call(e, w), Promise.reject(w);
4114
4081
  }
@@ -4124,13 +4091,13 @@ function bt(t = {}) {
4124
4091
  }
4125
4092
  function wi(t = {}) {
4126
4093
  return new Promise((e, r) => {
4127
- bt(p(g({}, t), { success: e, fail: r }));
4094
+ bt(m(g({}, t), { success: e, fail: r }));
4128
4095
  });
4129
4096
  }
4130
4097
  function vt(t = {}) {
4131
4098
  return f.safeExecute(
4132
4099
  () => {
4133
- var s, o, d, u, m, C, M, $, ce;
4100
+ var s, o, d, u, p, C, M, $, ce;
4134
4101
  let e;
4135
4102
  try {
4136
4103
  e = fi(t);
@@ -4138,17 +4105,17 @@ function vt(t = {}) {
4138
4105
  return (s = t.fail) == null || s.call(t, R), Promise.reject(R);
4139
4106
  }
4140
4107
  const r = H(!0);
4141
- if (r.isUniApp)
4108
+ if (r.isAppPlus)
4142
4109
  try {
4143
4110
  e = di(e);
4144
4111
  } catch (R) {
4145
4112
  return (o = e.fail) == null || o.call(e, R), (d = e.complete) == null || d.call(e, R), Promise.reject(R);
4146
4113
  }
4147
4114
  const n = r.isWeixinMiniProgram ? "已同步小程序卡片内容,请点击右上角“···”后发送给朋友。" : "正在拉起微信发送给朋友面板,请继续完成小程序卡片分享。";
4148
- if (r.isUniApp)
4149
- return pi(e).then((R) => {
4115
+ if (r.isAppPlus)
4116
+ return mi(e).then((R) => {
4150
4117
  var w, B;
4151
- const F = p(g({}, R || {}), { hint: n });
4118
+ const F = m(g({}, R || {}), { hint: n });
4152
4119
  return (w = e.success) == null || w.call(e, F), (B = e.complete) == null || B.call(e, F), F;
4153
4120
  }).catch((R) => {
4154
4121
  var F, w;
@@ -4156,9 +4123,9 @@ function vt(t = {}) {
4156
4123
  });
4157
4124
  if (r.isWeixinMiniProgram)
4158
4125
  try {
4159
- Tt(mi(e, t.rowCustom), "shareMiniProgramCard");
4126
+ Nt(pi(e, t.rowCustom), "shareMiniProgramCard");
4160
4127
  const R = { success: !0, hint: n };
4161
- return (u = e.success) == null || u.call(e, R), (m = e.complete) == null || m.call(e, R), Promise.resolve(R);
4128
+ return (u = e.success) == null || u.call(e, R), (p = e.complete) == null || p.call(e, R), Promise.resolve(R);
4162
4129
  } catch (R) {
4163
4130
  return (C = e.fail) == null || C.call(e, R), (M = e.complete) == null || M.call(e, R), Promise.reject(R);
4164
4131
  }
@@ -4170,7 +4137,7 @@ function vt(t = {}) {
4170
4137
  }
4171
4138
  function Ei(t = {}) {
4172
4139
  return new Promise((e, r) => {
4173
- vt(p(g({}, t), { success: e, fail: r }));
4140
+ vt(m(g({}, t), { success: e, fail: r }));
4174
4141
  });
4175
4142
  }
4176
4143
  const yi = {
@@ -4202,7 +4169,7 @@ function Ai(t) {
4202
4169
  (e = t.fail) == null || e.call(t, r);
4203
4170
  return;
4204
4171
  }
4205
- ee() || (a.info("等待微信配置完成"), yield z()), wx.openBluetoothAdapter({
4172
+ oe() || (a.info("等待微信配置完成"), yield Q()), wx.openBluetoothAdapter({
4206
4173
  success: () => {
4207
4174
  a.info("微信蓝牙适配器已打开"), Lt(t);
4208
4175
  },
@@ -4215,7 +4182,7 @@ function Ai(t) {
4215
4182
  }
4216
4183
  function Pi(t) {
4217
4184
  return f.safeExecute(() => {
4218
- a.debug("通过 WebView 桥接调用蓝牙功能", t), S("bluetooth", t, {
4185
+ a.debug("通过 WebView 桥接调用蓝牙功能", t), O("bluetooth", t, {
4219
4186
  success: (e) => {
4220
4187
  var r;
4221
4188
  a.info("UniApp 蓝牙调用成功", e), (r = t.success) == null || r.call(t, e);
@@ -4231,7 +4198,7 @@ function Pi(t) {
4231
4198
  function _i(t) {
4232
4199
  return f.safeExecute(() => {
4233
4200
  var e;
4234
- a.debug("通过 WebView 桥接调用蓝牙设备搜索功能", t), S("bluetoothDevicesDiscovery", {
4201
+ a.debug("通过 WebView 桥接调用蓝牙设备搜索功能", t), O("bluetoothDevicesDiscovery", {
4235
4202
  action: "startBluetoothDevicesDiscovery",
4236
4203
  params: {
4237
4204
  services: t.services || [],
@@ -4254,7 +4221,7 @@ const ye = /* @__PURE__ */ new Set();
4254
4221
  function Mi(t, e = {}) {
4255
4222
  return f.safeExecute(() => {
4256
4223
  var r;
4257
- return ye.add(t), ye.size === 1 && S("onBluetoothDeviceFound", {
4224
+ return ye.add(t), ye.size === 1 && O("onBluetoothDeviceFound", {
4258
4225
  action: "onBluetoothDeviceFound",
4259
4226
  isPersistent: !0,
4260
4227
  params: {
@@ -4278,7 +4245,7 @@ function Mi(t, e = {}) {
4278
4245
  function Ci(t) {
4279
4246
  return f.safeExecute(() => {
4280
4247
  var e;
4281
- a.debug("通过 WebView 桥接调用蓝牙连接功能", t), S("bluetoothConnection", {
4248
+ a.debug("通过 WebView 桥接调用蓝牙连接功能", t), O("bluetoothConnection", {
4282
4249
  action: "createBLEConnection",
4283
4250
  params: {
4284
4251
  deviceId: t.deviceId,
@@ -4317,7 +4284,7 @@ function Ri(t = {}) {
4317
4284
  }), _() ? Ai(e) : Pi(e);
4318
4285
  }, { context: "openBluetoothAdapter", options: t });
4319
4286
  }
4320
- function Oi(t = {}) {
4287
+ function Si(t = {}) {
4321
4288
  return f.safeExecute(() => {
4322
4289
  var r, n;
4323
4290
  if (!we()) {
@@ -4351,21 +4318,21 @@ function Lt(t, e = {}) {
4351
4318
  a.info("注册蓝牙设备发现监听", { platform: l.type }), _() ? onBluetoothDeviceFoundInWeixin(r) : Mi(t, r);
4352
4319
  }, { context: "onBluetoothDeviceFound", options: e });
4353
4320
  }
4354
- function Si(t = {}) {
4321
+ function Oi(t = {}) {
4355
4322
  return f.safeExecute(() => {
4356
4323
  var s, o, d, u;
4357
4324
  if (!we()) {
4358
- const m = {
4325
+ const p = {
4359
4326
  errMsg: `当前环境 (${l.type}) 不支持蓝牙功能`,
4360
4327
  code: "PLATFORM_NOT_SUPPORTED"
4361
4328
  };
4362
- a.error("平台不支持蓝牙连接", { platform: l.type }), (s = t.fail) == null || s.call(t, m), (o = t.complete) == null || o.call(t, m);
4329
+ a.error("平台不支持蓝牙连接", { platform: l.type }), (s = t.fail) == null || s.call(t, p), (o = t.complete) == null || o.call(t, p);
4363
4330
  return;
4364
4331
  }
4365
4332
  const e = Te(t), { name: r, deviceId: n, autoConnect: i = !1 } = e;
4366
4333
  if (!n) {
4367
- const m = { errMsg: "缺少 deviceId 参数", code: "INVALID_PARAMS" };
4368
- (d = t.fail) == null || d.call(t, m), (u = t.complete) == null || u.call(t, m);
4334
+ const p = { errMsg: "缺少 deviceId 参数", code: "INVALID_PARAMS" };
4335
+ (d = t.fail) == null || d.call(t, p), (u = t.complete) == null || u.call(t, p);
4369
4336
  return;
4370
4337
  }
4371
4338
  a.info("创建蓝牙连接", { deviceId: n, autoConnect: i, platform: l.type }), _() ? uni.createBLEConnection({
@@ -4402,7 +4369,7 @@ function xt() {
4402
4369
  }
4403
4370
  function vi(t) {
4404
4371
  return f.safeExecute(() => {
4405
- a.debug("通过 WebView 桥接调用打印PDF", t), S("printPdf", p(g({}, t), {
4372
+ a.debug("通过 WebView 桥接调用打印PDF", t), O("printPdf", m(g({}, t), {
4406
4373
  isPersistent: !0
4407
4374
  // 强制禁用超时自动清理
4408
4375
  }), {
@@ -4471,7 +4438,7 @@ function Ui() {
4471
4438
  return typeof window != "undefined" && window.wx && window.wx.miniProgram && typeof window.wx.miniProgram.navigateTo == "function";
4472
4439
  }
4473
4440
  function Wi(t) {
4474
- const e = p(g({}, t), {
4441
+ const e = m(g({}, t), {
4475
4442
  title: document.title || "",
4476
4443
  url: window.location.href || ""
4477
4444
  }), r = Object.entries(e).filter(([, n]) => n != null && n !== "").map(([n, i]) => `${encodeURIComponent(n)}=${encodeURIComponent(String(i))}`).join("&");
@@ -4506,7 +4473,7 @@ function Fi(t) {
4506
4473
  a.debug("通过 WebView 桥接调用人脸识别", {
4507
4474
  platform: l.type,
4508
4475
  name: t.name
4509
- }), S("faceVerify", g({}, t), {
4476
+ }), O("faceVerify", g({}, t), {
4510
4477
  success: (e) => {
4511
4478
  a.info("UniApp 人脸识别调用成功", e);
4512
4479
  },
@@ -4568,10 +4535,10 @@ function Gi() {
4568
4535
  }
4569
4536
  function Ki() {
4570
4537
  return y(this, null, function* () {
4571
- yield cr(), Gi() && (yield z());
4538
+ yield cr(), Gi() && (yield Q());
4572
4539
  });
4573
4540
  }
4574
- Y.useResponse(ct.response, { priority: 1e3 });
4541
+ z.useResponse(ct.response, { priority: 1e3 });
4575
4542
  let Ze = !1;
4576
4543
  function Qe() {
4577
4544
  if (Ze) return;
@@ -4587,13 +4554,13 @@ function Qe() {
4587
4554
  typeof window != "undefined" && (document.readyState === "complete" || document.readyState === "interactive" ? setTimeout(Qe, 0) : document.addEventListener("DOMContentLoaded", Qe));
4588
4555
  function E(t, { apiName: e } = {}) {
4589
4556
  return function(r = {}, ...n) {
4590
- const i = r && typeof r == "object" && (typeof r.success == "function" || typeof r.fail == "function" || typeof r.complete == "function"), s = r && typeof r == "object" ? r : {}, o = () => i ? t(s, ...n) : new Promise((u, m) => {
4591
- const C = p(g({}, s), {
4557
+ const i = r && typeof r == "object" && (typeof r.success == "function" || typeof r.fail == "function" || typeof r.complete == "function"), s = r && typeof r == "object" ? r : {}, o = () => i ? t(s, ...n) : new Promise((u, p) => {
4558
+ const C = m(g({}, s), {
4592
4559
  success: (M) => {
4593
4560
  typeof s.success == "function" && s.success(M), u(M);
4594
4561
  },
4595
4562
  fail: (M) => {
4596
- typeof s.fail == "function" && s.fail(M), m(M);
4563
+ typeof s.fail == "function" && s.fail(M), p(M);
4597
4564
  },
4598
4565
  complete: s.complete
4599
4566
  });
@@ -4615,18 +4582,18 @@ function Kt(t) {
4615
4582
  const Fe = E(ln, { apiName: "getCode" });
4616
4583
  function Vi(t = {}) {
4617
4584
  return new Promise((e, r) => {
4618
- Fe(p(g({}, t), {
4585
+ Fe(m(g({}, t), {
4619
4586
  success: e,
4620
4587
  fail: r
4621
4588
  }));
4622
4589
  });
4623
4590
  }
4624
- const Be = E(mn, {
4591
+ const Be = E(pn, {
4625
4592
  apiName: "navigateToMiniProgram"
4626
4593
  });
4627
4594
  function qi(t = {}) {
4628
4595
  return new Promise((e, r) => {
4629
- Be(p(g({}, t), {
4596
+ Be(m(g({}, t), {
4630
4597
  success: e,
4631
4598
  fail: r
4632
4599
  }));
@@ -4635,7 +4602,7 @@ function qi(t = {}) {
4635
4602
  const ke = E(Rn);
4636
4603
  function ji(t = {}) {
4637
4604
  return new Promise((e, r) => {
4638
- ke(p(g({}, t), {
4605
+ ke(m(g({}, t), {
4639
4606
  success: e,
4640
4607
  fail: r
4641
4608
  }));
@@ -4644,7 +4611,7 @@ function ji(t = {}) {
4644
4611
  const Vt = E(Li);
4645
4612
  function Ji(t = {}) {
4646
4613
  return new Promise((e, r) => {
4647
- Vt(p(g({}, t), {
4614
+ Vt(m(g({}, t), {
4648
4615
  success: e,
4649
4616
  fail: r
4650
4617
  }));
@@ -4653,7 +4620,7 @@ function Ji(t = {}) {
4653
4620
  const Ge = E(vn), Hi = E(Bi);
4654
4621
  function zi(t = {}) {
4655
4622
  return new Promise((e, r) => {
4656
- Ge(p(g({}, t), {
4623
+ Ge(m(g({}, t), {
4657
4624
  success: e,
4658
4625
  fail: r
4659
4626
  }));
@@ -4662,7 +4629,7 @@ function zi(t = {}) {
4662
4629
  const Yi = E(bt, { apiName: "shareDirected" }), Xi = E(wi, { apiName: "shareDirectedAsync" }), Zi = E(Et, { apiName: "manualShare" }), Qi = E(Pn, { apiName: "manualShareAsync" }), Ke = E(kn);
4663
4630
  function ea(t = {}) {
4664
4631
  return new Promise((e, r) => {
4665
- Ke(p(g({}, t), {
4632
+ Ke(m(g({}, t), {
4666
4633
  success: e,
4667
4634
  fail: r
4668
4635
  }));
@@ -4671,7 +4638,7 @@ function ea(t = {}) {
4671
4638
  const Ve = E(Gn);
4672
4639
  function ta(t = {}) {
4673
4640
  return new Promise((e, r) => {
4674
- Ve(p(g({}, t), {
4641
+ Ve(m(g({}, t), {
4675
4642
  success: e,
4676
4643
  fail: r
4677
4644
  }));
@@ -4680,7 +4647,7 @@ function ta(t = {}) {
4680
4647
  const qe = E(Qn);
4681
4648
  function ra(t = {}) {
4682
4649
  return new Promise((e, r) => {
4683
- qe(p(g({}, t), {
4650
+ qe(m(g({}, t), {
4684
4651
  success: e,
4685
4652
  fail: r
4686
4653
  }));
@@ -4689,16 +4656,16 @@ function ra(t = {}) {
4689
4656
  const qt = E(Ri);
4690
4657
  function na(t = {}) {
4691
4658
  return new Promise((e, r) => {
4692
- qt(p(g({}, t), {
4659
+ qt(m(g({}, t), {
4693
4660
  success: e,
4694
4661
  fail: r
4695
4662
  }));
4696
4663
  });
4697
4664
  }
4698
- const jt = E(Oi);
4665
+ const jt = E(Si);
4699
4666
  function ia(t = {}) {
4700
4667
  return new Promise((e, r) => {
4701
- jt(p(g({}, t), {
4668
+ jt(m(g({}, t), {
4702
4669
  success: e,
4703
4670
  fail: r
4704
4671
  }));
@@ -4707,22 +4674,22 @@ function ia(t = {}) {
4707
4674
  const Jt = E(Lt);
4708
4675
  function aa(t = {}) {
4709
4676
  return new Promise((e, r) => {
4710
- Jt(p(g({}, t), {
4677
+ Jt(m(g({}, t), {
4711
4678
  success: e,
4712
4679
  fail: r
4713
4680
  }));
4714
4681
  });
4715
4682
  }
4716
- const Ht = E(Si);
4683
+ const Ht = E(Oi);
4717
4684
  function sa(t = {}) {
4718
4685
  return new Promise((e, r) => {
4719
- Ht(p(g({}, t), {
4686
+ Ht(m(g({}, t), {
4720
4687
  success: e,
4721
4688
  fail: r
4722
4689
  }));
4723
4690
  });
4724
4691
  }
4725
- const oa = E(vt, { apiName: "shareMiniProgramCard" }), ca = E(Ei, { apiName: "shareMiniProgramCardAsync" }), oe = {
4692
+ const oa = E(vt, { apiName: "shareMiniProgramCard" }), ca = E(Ei, { apiName: "shareMiniProgramCardAsync" }), se = {
4726
4693
  // 导航 API
4727
4694
  navigateTo: Wt,
4728
4695
  navigateBack: $t,
@@ -4804,7 +4771,7 @@ const oa = E(vt, { apiName: "shareMiniProgramCard" }), ca = E(Ei, { apiName: "sh
4804
4771
  * @since 2.0.0
4805
4772
  */
4806
4773
  config: He,
4807
- waitForConfig: z,
4774
+ waitForConfig: Q,
4808
4775
  /**
4809
4776
  * 检查微信配置是否完成
4810
4777
  * @returns {boolean}
@@ -4812,7 +4779,7 @@ const oa = E(vt, { apiName: "shareMiniProgramCard" }), ca = E(Ei, { apiName: "sh
4812
4779
  * if (qsh.weixin.isConfigReady()) { wx.chooseImage({}) }
4813
4780
  * @since 2.0.0
4814
4781
  */
4815
- isConfigReady: ee,
4782
+ isConfigReady: oe,
4816
4783
  /**
4817
4784
  * 获取微信配置状态
4818
4785
  * @returns {string}
@@ -4843,9 +4810,9 @@ const oa = E(vt, { apiName: "shareMiniProgramCard" }), ca = E(Ei, { apiName: "sh
4843
4810
  * console.log('是否支持:', capabilities.supported)
4844
4811
  * @since 2.0.0
4845
4812
  */
4846
- getImageCapabilities: On,
4813
+ getImageCapabilities: Sn,
4847
4814
  // 扫码相关常量
4848
- ScanTypes: Z,
4815
+ ScanTypes: X,
4849
4816
  /**
4850
4817
  * 获取扫码功能能力信息
4851
4818
  * @returns {Object} 能力信息对象
@@ -4856,7 +4823,7 @@ const oa = E(vt, { apiName: "shareMiniProgramCard" }), ca = E(Ei, { apiName: "sh
4856
4823
  */
4857
4824
  getScanCapabilities: Ln,
4858
4825
  // 位置相关常量
4859
- CoordinateTypes: se,
4826
+ CoordinateTypes: ae,
4860
4827
  /**
4861
4828
  * 获取位置功能能力信息
4862
4829
  * @returns {Object} 能力信息对象
@@ -4939,7 +4906,7 @@ const oa = E(vt, { apiName: "shareMiniProgramCard" }), ca = E(Ei, { apiName: "sh
4939
4906
  * @example
4940
4907
  * await qsh.plugins.install('image')
4941
4908
  */
4942
- install: (t) => fe.install(t, oe),
4909
+ install: (t) => fe.install(t, se),
4943
4910
  /**
4944
4911
  * 获取插件列表
4945
4912
  * @returns {Array} 插件列表
@@ -4953,7 +4920,7 @@ const oa = E(vt, { apiName: "shareMiniProgramCard" }), ca = E(Ei, { apiName: "sh
4953
4920
  /**
4954
4921
  * 拦截器链
4955
4922
  */
4956
- chain: Y,
4923
+ chain: z,
4957
4924
  /**
4958
4925
  * 注册请求拦截器
4959
4926
  * @param {Function} interceptor - 拦截器函数
@@ -4965,7 +4932,7 @@ const oa = E(vt, { apiName: "shareMiniProgramCard" }), ca = E(Ei, { apiName: "sh
4965
4932
  * return ctx
4966
4933
  * })
4967
4934
  */
4968
- useRequest: (t, e) => Y.useRequest(t, e),
4935
+ useRequest: (t, e) => z.useRequest(t, e),
4969
4936
  /**
4970
4937
  * 注册响应拦截器
4971
4938
  * @param {Function} interceptor - 拦截器函数
@@ -4977,7 +4944,7 @@ const oa = E(vt, { apiName: "shareMiniProgramCard" }), ca = E(Ei, { apiName: "sh
4977
4944
  * return result
4978
4945
  * })
4979
4946
  */
4980
- useResponse: (t, e) => Y.useResponse(t, e),
4947
+ useResponse: (t, e) => z.useResponse(t, e),
4981
4948
  /**
4982
4949
  * 内置拦截器
4983
4950
  */
@@ -5039,7 +5006,7 @@ const oa = E(vt, { apiName: "shareMiniProgramCard" }), ca = E(Ei, { apiName: "sh
5039
5006
  * @example
5040
5007
  * if (qsh.errors.isStandard(error)) { ... }
5041
5008
  */
5042
- isStandard: Or
5009
+ isStandard: Sr
5043
5010
  },
5044
5011
  // 状态管理
5045
5012
  store: {
@@ -5099,7 +5066,7 @@ const oa = E(vt, { apiName: "shareMiniProgramCard" }), ca = E(Ei, { apiName: "sh
5099
5066
  /**
5100
5067
  * 状态管理器
5101
5068
  */
5102
- stateManager: X,
5069
+ stateManager: Y,
5103
5070
  /**
5104
5071
  * 启用调试模式
5105
5072
  * @example
@@ -5122,10 +5089,10 @@ const oa = E(vt, { apiName: "shareMiniProgramCard" }), ca = E(Ei, { apiName: "sh
5122
5089
  */
5123
5090
  getStats: () => ({
5124
5091
  logger: v.getStats(),
5125
- state: X.getStats(),
5092
+ state: Y.getStats(),
5126
5093
  weixinConfig: ve().getStats(),
5127
5094
  plugins: fe.getStats(),
5128
- interceptors: Y.getStats(),
5095
+ interceptors: z.getStats(),
5129
5096
  store: G.getStats()
5130
5097
  }),
5131
5098
  /**
@@ -5144,7 +5111,7 @@ const oa = E(vt, { apiName: "shareMiniProgramCard" }), ca = E(Ei, { apiName: "sh
5144
5111
  exportDebugInfo: () => v.exportToJSON()
5145
5112
  }
5146
5113
  };
5147
- Ut.isWeixinMiniProgram ? oe.webView = window.wx && window.wx.miniProgram : oe.webView = {
5114
+ Ut.isWeixinMiniProgram ? se.webView = window.wx && window.wx.miniProgram : se.webView = {
5148
5115
  navigateTo: Wt,
5149
5116
  navigateBack: $t,
5150
5117
  switchTab: Ft,
@@ -5162,10 +5129,10 @@ Ut.isWeixinMiniProgram ? oe.webView = window.wx && window.wx.miniProgram : oe.we
5162
5129
  };
5163
5130
  const et = typeof window.uni != "undefined" ? window.uni : {};
5164
5131
  Object.keys(et).forEach((t) => {
5165
- oe.hasOwnProperty(t) || (oe[t] = et[t]);
5132
+ se.hasOwnProperty(t) || (se[t] = et[t]);
5166
5133
  });
5167
- typeof window != "undefined" && (window.qsh = oe);
5134
+ typeof window != "undefined" && (window.qsh = se);
5168
5135
  export {
5169
- oe as default
5136
+ se as default
5170
5137
  };
5171
5138
  //# sourceMappingURL=qsh-webview-sdk.es.js.map