@docoi/mys-sdk 1.2.0 → 1.2.2
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/README.md +213 -212
- package/dist/api/basic.d.ts +164 -28
- package/dist/api/biz.d.ts +12 -3
- package/dist/api/router/index.d.ts +42 -0
- package/dist/api/router/routes.d.ts +0 -2
- package/dist/bridge.d.ts +2 -1
- package/dist/constants/code.d.ts +2 -0
- package/dist/index.mjs +864 -740
- package/dist/types/base.d.ts +18 -0
- package/dist/types/enums.d.ts +6 -0
- package/dist/types/params.d.ts +132 -6
- package/dist/types/results.d.ts +51 -4
- package/dist/types/router.d.ts +87 -10
- package/dist/utils/data.d.ts +12 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,64 +1,75 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
3
|
-
function
|
|
1
|
+
import Qe from "@docoi/jsbridge-sdk";
|
|
2
|
+
const Ae = 0, qe = -1, Ze = 1001, et = 1002, Ir = 2002, mr = 3001, Sr = 3002, Er = 4002, K = 5001, tt = 5002, _e = 9002, kr = 9101, Cr = 9102;
|
|
3
|
+
function l(e) {
|
|
4
4
|
return typeof e == "string";
|
|
5
5
|
}
|
|
6
|
-
function
|
|
6
|
+
function Re(e) {
|
|
7
7
|
return typeof e == "number";
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function k(e) {
|
|
10
10
|
return typeof e == "object" && e !== null;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
if (!
|
|
14
|
-
const
|
|
15
|
-
return
|
|
12
|
+
function m(e) {
|
|
13
|
+
if (!k(e) || Object.prototype.toString.call(e) !== "[object Object]") return !1;
|
|
14
|
+
const t = Object.getPrototypeOf(e);
|
|
15
|
+
return t === null || Object.getPrototypeOf(t) === null;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
return
|
|
17
|
+
function nt(e) {
|
|
18
|
+
return l(e) && /^\d+(\.\d+){1,3}$/.test(e);
|
|
19
19
|
}
|
|
20
|
-
const
|
|
21
|
-
function
|
|
22
|
-
return
|
|
20
|
+
const rt = /^data:image\/[\w.+-]+;base64,[A-Za-z0-9+/]/i, it = /^[A-Za-z0-9+/]+={0,2}$/;
|
|
21
|
+
function ot(e) {
|
|
22
|
+
return l(e) && (rt.test(e) || it.test(e));
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function ie(e, t = null) {
|
|
25
25
|
try {
|
|
26
26
|
return JSON.parse(e);
|
|
27
|
-
} catch (
|
|
28
|
-
return
|
|
27
|
+
} catch (n) {
|
|
28
|
+
return t;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function ye(e) {
|
|
32
32
|
try {
|
|
33
33
|
return decodeURIComponent(e);
|
|
34
|
-
} catch (
|
|
34
|
+
} catch (t) {
|
|
35
35
|
return e;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
if (
|
|
38
|
+
function w(e) {
|
|
39
|
+
if (l(e)) return e;
|
|
40
40
|
if (e instanceof Error) return e.message || "system error";
|
|
41
|
-
if (
|
|
42
|
-
if (
|
|
43
|
-
if (
|
|
44
|
-
if (
|
|
41
|
+
if (k(e)) {
|
|
42
|
+
if (l(e.errMsg)) return e.errMsg;
|
|
43
|
+
if (l(e.msg)) return e.msg;
|
|
44
|
+
if (l(e.message)) return e.message;
|
|
45
45
|
}
|
|
46
46
|
return "system error";
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
function R(e) {
|
|
49
|
+
if (!l(e)) return e;
|
|
50
|
+
const t = ie(e);
|
|
51
|
+
return m(t) ? t : e;
|
|
49
52
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
class N extends Error {
|
|
54
|
+
}
|
|
55
|
+
function Oe(e, t) {
|
|
56
|
+
if (typeof e == "bigint") throw new N(`${t} 是 BigInt,不能传给 Native`);
|
|
57
|
+
if (e instanceof Map || e instanceof Set) throw new N(`${t} 是 ${e.constructor.name},不能传给 Native`);
|
|
53
58
|
if (typeof ArrayBuffer != "undefined" && (e instanceof ArrayBuffer || ArrayBuffer.isView(e)))
|
|
54
|
-
throw new
|
|
55
|
-
if (typeof Blob != "undefined" && e instanceof Blob) throw new
|
|
59
|
+
throw new N(`${t} 是二进制数据,不能传给 Native`);
|
|
60
|
+
if (typeof Blob != "undefined" && e instanceof Blob) throw new N(`${t} 是 Blob,不能传给 Native`);
|
|
56
61
|
}
|
|
57
|
-
function
|
|
58
|
-
|
|
59
|
-
|
|
62
|
+
function Te(e, t) {
|
|
63
|
+
return e && Oe(t, e), t;
|
|
64
|
+
}
|
|
65
|
+
function oe(e) {
|
|
66
|
+
const t = JSON.stringify(e, Te);
|
|
67
|
+
return t === void 0 ? void 0 : JSON.parse(t);
|
|
68
|
+
}
|
|
69
|
+
function ut(e) {
|
|
70
|
+
return Oe(e, "value"), JSON.stringify(e, Te);
|
|
60
71
|
}
|
|
61
|
-
const
|
|
72
|
+
const S = {
|
|
62
73
|
/** iOS 调用通道 */
|
|
63
74
|
iosInvoke: "jsbridge",
|
|
64
75
|
/** iOS 上 H5 异步回调的回传通道 */
|
|
@@ -69,228 +80,229 @@ const I = {
|
|
|
69
80
|
globalInvoke: "JSBridgeInvoke",
|
|
70
81
|
/** 回调 ID 前缀,1.0.0 为 cb_ */
|
|
71
82
|
callbackIdPrefix: "cb"
|
|
72
|
-
},
|
|
73
|
-
class
|
|
74
|
-
constructor(
|
|
75
|
-
super(
|
|
83
|
+
}, st = "[jsbridge]";
|
|
84
|
+
class G extends Error {
|
|
85
|
+
constructor(t, n) {
|
|
86
|
+
super(n), this.kind = t;
|
|
76
87
|
}
|
|
77
88
|
}
|
|
78
89
|
const Y = { error: 1, warn: 2, info: 3, debug: 4 };
|
|
79
|
-
let
|
|
80
|
-
function g(e, ...
|
|
81
|
-
!
|
|
82
|
-
}
|
|
83
|
-
let
|
|
84
|
-
const
|
|
85
|
-
function
|
|
86
|
-
var
|
|
87
|
-
const
|
|
88
|
-
return typeof (
|
|
89
|
-
}
|
|
90
|
-
function
|
|
90
|
+
let Be = !1, Ne = "info", De = !0;
|
|
91
|
+
function g(e, ...t) {
|
|
92
|
+
!Be || !De || Y[e] > Y[Ne] || console[e](`${st} [${e.toUpperCase()}]`, ...t);
|
|
93
|
+
}
|
|
94
|
+
let ct = 1;
|
|
95
|
+
const V = /* @__PURE__ */ new Map(), X = /* @__PURE__ */ new Map(), D = /* @__PURE__ */ new Map(), he = /* @__PURE__ */ new Map();
|
|
96
|
+
function Me(e) {
|
|
97
|
+
var n, r;
|
|
98
|
+
const t = (r = (n = window.webkit) == null ? void 0 : n.messageHandlers) == null ? void 0 : r[e];
|
|
99
|
+
return typeof (t == null ? void 0 : t.postMessage) == "function" ? t : void 0;
|
|
100
|
+
}
|
|
101
|
+
function Le() {
|
|
91
102
|
return window.JSBridgeNative;
|
|
92
103
|
}
|
|
93
|
-
function
|
|
94
|
-
const
|
|
95
|
-
if (
|
|
96
|
-
|
|
104
|
+
function dt(e) {
|
|
105
|
+
const t = Me(S.iosInvoke);
|
|
106
|
+
if (t) {
|
|
107
|
+
t.postMessage(e);
|
|
97
108
|
return;
|
|
98
109
|
}
|
|
99
|
-
const
|
|
100
|
-
if (
|
|
101
|
-
|
|
110
|
+
const n = Le();
|
|
111
|
+
if (n && typeof n.call == "function") {
|
|
112
|
+
n.call(JSON.stringify(e));
|
|
102
113
|
return;
|
|
103
114
|
}
|
|
104
|
-
throw new
|
|
115
|
+
throw new G("communication", "当前环境不支持调用原生方法");
|
|
105
116
|
}
|
|
106
|
-
function
|
|
107
|
-
return `${
|
|
117
|
+
function lt() {
|
|
118
|
+
return `${S.callbackIdPrefix}_${Date.now()}_${ct++}`;
|
|
108
119
|
}
|
|
109
|
-
function
|
|
110
|
-
return
|
|
111
|
-
}
|
|
112
|
-
function
|
|
113
|
-
return new Promise((
|
|
114
|
-
const i =
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
120
|
+
function at(e) {
|
|
121
|
+
return k(e) && !!e.error;
|
|
122
|
+
}
|
|
123
|
+
function be(e, t) {
|
|
124
|
+
return new Promise((n, r) => {
|
|
125
|
+
const i = lt();
|
|
126
|
+
V.set(i, (o) => {
|
|
127
|
+
const c = R(o);
|
|
128
|
+
if (at(c)) {
|
|
129
|
+
r(new G("native", w(c.error)));
|
|
118
130
|
return;
|
|
119
131
|
}
|
|
120
|
-
|
|
121
|
-
}), g("debug", `调用原生方法: ${e}`,
|
|
132
|
+
n(c);
|
|
133
|
+
}), g("debug", `调用原生方法: ${e}`, t);
|
|
122
134
|
try {
|
|
123
|
-
|
|
135
|
+
dt({ method: e, params: t, callbackId: i });
|
|
124
136
|
} catch (o) {
|
|
125
|
-
|
|
137
|
+
V.delete(i), r(new G("communication", w(o)));
|
|
126
138
|
}
|
|
127
139
|
});
|
|
128
140
|
}
|
|
129
|
-
function
|
|
130
|
-
const
|
|
131
|
-
return
|
|
141
|
+
function ft(e, t) {
|
|
142
|
+
const n = he.get(e), r = n ? n.then(t, t) : t();
|
|
143
|
+
return he.set(e, r.then(we, we)), r;
|
|
132
144
|
}
|
|
133
|
-
function
|
|
145
|
+
function we() {
|
|
134
146
|
}
|
|
135
|
-
function
|
|
136
|
-
return Q(), (
|
|
147
|
+
function gt(e, t, n) {
|
|
148
|
+
return Q(), (n == null ? void 0 : n.queue) === "serial" ? ft(e, () => be(e, t)) : be(e, t);
|
|
137
149
|
}
|
|
138
|
-
function
|
|
150
|
+
function yt(e, t) {
|
|
139
151
|
if (!e) {
|
|
140
152
|
g("warn", "无效的回调ID");
|
|
141
153
|
return;
|
|
142
154
|
}
|
|
143
|
-
g("debug", `接收到回调: ${e}`,
|
|
144
|
-
const
|
|
145
|
-
if (!
|
|
155
|
+
g("debug", `接收到回调: ${e}`, t);
|
|
156
|
+
const n = V.get(e);
|
|
157
|
+
if (!n) {
|
|
146
158
|
g("warn", `未找到回调: ${e}`);
|
|
147
159
|
return;
|
|
148
160
|
}
|
|
149
161
|
try {
|
|
150
|
-
t
|
|
162
|
+
n(t);
|
|
151
163
|
} catch (r) {
|
|
152
164
|
g("error", `回调执行错误: ${e}`, r);
|
|
153
165
|
} finally {
|
|
154
|
-
|
|
166
|
+
V.delete(e);
|
|
155
167
|
}
|
|
156
168
|
}
|
|
157
|
-
function
|
|
158
|
-
g("debug", `接收到事件: ${e}`,
|
|
159
|
-
const
|
|
160
|
-
if (
|
|
161
|
-
for (const r of [...
|
|
169
|
+
function ht(e, t) {
|
|
170
|
+
g("debug", `接收到事件: ${e}`, t);
|
|
171
|
+
const n = D.get(e);
|
|
172
|
+
if (n != null && n.length)
|
|
173
|
+
for (const r of [...n])
|
|
162
174
|
try {
|
|
163
|
-
r(
|
|
175
|
+
r(t);
|
|
164
176
|
} catch (i) {
|
|
165
177
|
g("warn", `事件处理器执行错误: ${e}`, i);
|
|
166
178
|
}
|
|
167
179
|
}
|
|
168
|
-
function
|
|
180
|
+
function bt(e) {
|
|
169
181
|
return JSON.stringify({ success: !0, data: e });
|
|
170
182
|
}
|
|
171
|
-
function
|
|
183
|
+
function ve(e) {
|
|
172
184
|
return JSON.stringify({ success: !1, error: e });
|
|
173
185
|
}
|
|
174
|
-
function
|
|
175
|
-
g("debug", `调用原生回调: ${e}`,
|
|
176
|
-
const
|
|
177
|
-
if (
|
|
178
|
-
|
|
186
|
+
function pe(e, t) {
|
|
187
|
+
g("debug", `调用原生回调: ${e}`, t);
|
|
188
|
+
const n = Me(S.iosCallback);
|
|
189
|
+
if (n) {
|
|
190
|
+
n.postMessage({ callbackId: e, data: t });
|
|
179
191
|
return;
|
|
180
192
|
}
|
|
181
|
-
const r =
|
|
182
|
-
r && typeof r.callback == "function" && r.callback(e, JSON.stringify(
|
|
193
|
+
const r = Le();
|
|
194
|
+
r && typeof r.callback == "function" && r.callback(e, JSON.stringify(t));
|
|
183
195
|
}
|
|
184
|
-
function
|
|
185
|
-
g("debug", `接收到原生调用: ${e}`,
|
|
196
|
+
function wt(e, t, n) {
|
|
197
|
+
g("debug", `接收到原生调用: ${e}`, t);
|
|
186
198
|
const r = X.get(e);
|
|
187
199
|
if (!r) {
|
|
188
200
|
const i = `方法 ${e} 未注册`;
|
|
189
|
-
return g("error", i),
|
|
201
|
+
return g("error", i), ve({ code: -1, message: i });
|
|
190
202
|
}
|
|
191
203
|
try {
|
|
192
|
-
const i = r(
|
|
193
|
-
return i && typeof i.then == "function" ?
|
|
194
|
-
(o) =>
|
|
195
|
-
(o) =>
|
|
204
|
+
const i = r(t);
|
|
205
|
+
return i && typeof i.then == "function" ? n ? (i.then(
|
|
206
|
+
(o) => pe(n, { success: !0, data: o }),
|
|
207
|
+
(o) => pe(n, {
|
|
196
208
|
success: !1,
|
|
197
|
-
error: { message:
|
|
209
|
+
error: { message: w(o) }
|
|
198
210
|
})
|
|
199
|
-
), null) : (g("warn", `异步方法 ${e} 没有 callbackId,结果无法回传`), null) :
|
|
211
|
+
), null) : (g("warn", `异步方法 ${e} 没有 callbackId,结果无法回传`), null) : bt(i);
|
|
200
212
|
} catch (i) {
|
|
201
|
-
const o =
|
|
202
|
-
return g("error", `方法执行错误: ${e}`, o),
|
|
213
|
+
const o = w(i);
|
|
214
|
+
return g("error", `方法执行错误: ${e}`, o), ve({ message: o });
|
|
203
215
|
}
|
|
204
216
|
}
|
|
205
|
-
function
|
|
217
|
+
function vt() {
|
|
206
218
|
if (typeof window == "undefined") return;
|
|
207
219
|
const e = window;
|
|
208
|
-
typeof e[
|
|
220
|
+
typeof e[S.globalEvent] != "function" && (e[S.globalEvent] = () => {
|
|
209
221
|
});
|
|
210
222
|
}
|
|
211
|
-
let
|
|
223
|
+
let Pe = !1;
|
|
212
224
|
function Q() {
|
|
213
|
-
if (
|
|
214
|
-
|
|
225
|
+
if (Pe) return;
|
|
226
|
+
Pe = !0;
|
|
215
227
|
const e = window;
|
|
216
|
-
e[
|
|
228
|
+
e[S.globalCallback] = (t, n) => yt(t, n), e[S.globalEvent] = (t, n) => ht(t, n), e[S.globalInvoke] = (t, n, r) => wt(t, n, r), g("info", "初始化完成");
|
|
217
229
|
}
|
|
218
|
-
const
|
|
219
|
-
callAsync:
|
|
220
|
-
on(e,
|
|
230
|
+
const O = {
|
|
231
|
+
callAsync: gt,
|
|
232
|
+
on(e, t) {
|
|
221
233
|
Q();
|
|
222
|
-
const
|
|
223
|
-
if (!
|
|
224
|
-
|
|
234
|
+
const n = D.get(e);
|
|
235
|
+
if (!n) {
|
|
236
|
+
D.set(e, [t]);
|
|
225
237
|
return;
|
|
226
238
|
}
|
|
227
|
-
|
|
239
|
+
n.includes(t) || n.push(t);
|
|
228
240
|
},
|
|
229
|
-
off(e,
|
|
230
|
-
const
|
|
231
|
-
if (!
|
|
232
|
-
const r =
|
|
233
|
-
r !== -1 && (
|
|
241
|
+
off(e, t) {
|
|
242
|
+
const n = D.get(e);
|
|
243
|
+
if (!n) return;
|
|
244
|
+
const r = n.indexOf(t);
|
|
245
|
+
r !== -1 && (n.splice(r, 1), n.length || D.delete(e));
|
|
234
246
|
},
|
|
235
|
-
register(e,
|
|
236
|
-
Q(), X.set(e,
|
|
247
|
+
register(e, t) {
|
|
248
|
+
Q(), X.set(e, t);
|
|
237
249
|
},
|
|
238
250
|
unregister(e) {
|
|
239
251
|
X.delete(e);
|
|
240
252
|
},
|
|
241
|
-
setDebug(e,
|
|
242
|
-
|
|
253
|
+
setDebug(e, t) {
|
|
254
|
+
Be = e, t != null && t.logLevel && t.logLevel in Y && (Ne = t.logLevel), typeof (t == null ? void 0 : t.useConsole) == "boolean" && (De = t.useConsole);
|
|
243
255
|
}
|
|
244
256
|
};
|
|
245
|
-
let
|
|
246
|
-
function
|
|
247
|
-
return
|
|
257
|
+
let C;
|
|
258
|
+
function Ie(e) {
|
|
259
|
+
return m(e) && nt(e.app_version);
|
|
248
260
|
}
|
|
249
|
-
function
|
|
250
|
-
const
|
|
251
|
-
return
|
|
261
|
+
function pt(e) {
|
|
262
|
+
const t = /#webBaseInfo(.*?[^\\])#/.exec(e);
|
|
263
|
+
return t != null && t[1] ? ie(t[1]) : null;
|
|
252
264
|
}
|
|
253
|
-
function
|
|
254
|
-
if (
|
|
265
|
+
function L() {
|
|
266
|
+
if (C !== void 0) return C;
|
|
255
267
|
if (typeof window == "undefined") return null;
|
|
256
|
-
const e = window,
|
|
257
|
-
if (
|
|
258
|
-
return
|
|
268
|
+
const e = window, t = e._appBaseInfo;
|
|
269
|
+
if (t !== void 0)
|
|
270
|
+
return C = Ie(t) ? t : null, C;
|
|
259
271
|
if (typeof navigator == "undefined") return null;
|
|
260
|
-
const
|
|
261
|
-
return
|
|
272
|
+
const n = navigator.userAgent.replace(/ +/g, "").replace(/[\r\n]/g, ""), r = pt(n);
|
|
273
|
+
return C = Ie(r) ? r : null, e._appBaseInfo = C, C;
|
|
262
274
|
}
|
|
263
|
-
function
|
|
264
|
-
return !!
|
|
275
|
+
function $e() {
|
|
276
|
+
return !!L();
|
|
265
277
|
}
|
|
266
|
-
function
|
|
267
|
-
return !!e &&
|
|
278
|
+
function je(e) {
|
|
279
|
+
return !!e && Pt(e) === -1;
|
|
268
280
|
}
|
|
269
|
-
function
|
|
281
|
+
function xe() {
|
|
270
282
|
return typeof window == "undefined" ? 1 : window.devicePixelRatio || 1;
|
|
271
283
|
}
|
|
272
|
-
function
|
|
273
|
-
if (!e && !
|
|
284
|
+
function Pt(e, t = ((n) => (n = L()) == null ? void 0 : n.app_version)() || "") {
|
|
285
|
+
if (!e && !t) return 0;
|
|
274
286
|
if (!e) return 1;
|
|
275
|
-
if (!
|
|
287
|
+
if (!t) return -1;
|
|
276
288
|
const r = (d) => d.split(".").map((a) => {
|
|
277
|
-
const
|
|
278
|
-
return Number.isFinite(
|
|
279
|
-
}), i = r(e), o = r(
|
|
280
|
-
for (let d = 0; d <
|
|
281
|
-
const a = d < i.length ? i[d] : 0,
|
|
282
|
-
if (a >
|
|
283
|
-
if (a <
|
|
289
|
+
const h = Number(a);
|
|
290
|
+
return Number.isFinite(h) ? h : 0;
|
|
291
|
+
}), i = r(e), o = r(t), c = Math.max(i.length, o.length);
|
|
292
|
+
for (let d = 0; d < c; d++) {
|
|
293
|
+
const a = d < i.length ? i[d] : 0, h = d < o.length ? o[d] : 0;
|
|
294
|
+
if (a > h) return -1;
|
|
295
|
+
if (a < h) return 1;
|
|
284
296
|
}
|
|
285
297
|
return 0;
|
|
286
298
|
}
|
|
287
299
|
const me = "docoi-web-community-frame";
|
|
288
|
-
function
|
|
300
|
+
function Ue() {
|
|
289
301
|
if (typeof navigator == "undefined") return "unknown";
|
|
290
302
|
const e = navigator.userAgent;
|
|
291
303
|
return /\(i[^;]+;( U;)? CPU.+Mac OS X/.test(e) ? "ios" : e.includes("Android") || e.includes("Linux") ? "android" : "unknown";
|
|
292
304
|
}
|
|
293
|
-
function
|
|
305
|
+
function It() {
|
|
294
306
|
if (typeof window == "undefined") return !1;
|
|
295
307
|
try {
|
|
296
308
|
return window.self !== window.top && window.name === me;
|
|
@@ -298,205 +310,198 @@ function yn() {
|
|
|
298
310
|
return window.name === me;
|
|
299
311
|
}
|
|
300
312
|
}
|
|
301
|
-
function
|
|
302
|
-
var
|
|
313
|
+
function Se() {
|
|
314
|
+
var t, n;
|
|
303
315
|
const e = typeof window == "undefined" ? void 0 : window;
|
|
304
316
|
return {
|
|
305
|
-
...
|
|
306
|
-
pixelRatio:
|
|
307
|
-
screenWidth: (
|
|
308
|
-
screenHeight: (
|
|
317
|
+
...L(),
|
|
318
|
+
pixelRatio: xe(),
|
|
319
|
+
screenWidth: (t = e == null ? void 0 : e.screen) == null ? void 0 : t.width,
|
|
320
|
+
screenHeight: (n = e == null ? void 0 : e.screen) == null ? void 0 : n.height,
|
|
309
321
|
windowWidth: e == null ? void 0 : e.innerWidth,
|
|
310
322
|
windowHeight: e == null ? void 0 : e.innerHeight
|
|
311
323
|
};
|
|
312
324
|
}
|
|
313
|
-
const
|
|
325
|
+
const q = Qe.init({
|
|
314
326
|
debug: !1
|
|
315
327
|
});
|
|
316
|
-
|
|
317
|
-
const
|
|
318
|
-
|
|
328
|
+
vt();
|
|
329
|
+
const mt = (e, t) => {
|
|
330
|
+
O.setDebug(e, t), q.setDebug(e, t);
|
|
319
331
|
};
|
|
320
|
-
let
|
|
321
|
-
const
|
|
322
|
-
|
|
332
|
+
let A;
|
|
333
|
+
const Ar = (e) => {
|
|
334
|
+
A = e;
|
|
323
335
|
};
|
|
324
336
|
function Z(e) {
|
|
325
337
|
try {
|
|
326
|
-
|
|
327
|
-
} catch (
|
|
338
|
+
A == null || A(e);
|
|
339
|
+
} catch (t) {
|
|
328
340
|
}
|
|
329
341
|
}
|
|
330
|
-
function
|
|
331
|
-
return
|
|
342
|
+
function p(e) {
|
|
343
|
+
return $e() && je(e);
|
|
332
344
|
}
|
|
333
345
|
const ee = /* @__PURE__ */ new Map();
|
|
334
|
-
function
|
|
335
|
-
const { since: r, once: i, transform: o } =
|
|
336
|
-
E(e,
|
|
337
|
-
const
|
|
346
|
+
function y(e, t, n = {}) {
|
|
347
|
+
const { since: r, once: i, transform: o } = n;
|
|
348
|
+
E(e, t);
|
|
349
|
+
const c = p(r) ? O : q;
|
|
338
350
|
let d = ee.get(e);
|
|
339
351
|
d || (d = /* @__PURE__ */ new Map(), ee.set(e, d));
|
|
340
|
-
const a = (
|
|
341
|
-
i && E(e,
|
|
352
|
+
const a = (h) => {
|
|
353
|
+
i && E(e, t);
|
|
354
|
+
const P = R(h);
|
|
355
|
+
t(o ? o(P) : P);
|
|
342
356
|
};
|
|
343
|
-
return d.set(
|
|
344
|
-
}
|
|
345
|
-
function E(e,
|
|
346
|
-
const
|
|
347
|
-
if (
|
|
348
|
-
for (const r of
|
|
349
|
-
const i =
|
|
350
|
-
i && (i.target.off(e, i.handler),
|
|
357
|
+
return d.set(t, { handler: a, target: c }), c.on(e, a), () => E(e, t);
|
|
358
|
+
}
|
|
359
|
+
function E(e, t) {
|
|
360
|
+
const n = ee.get(e);
|
|
361
|
+
if (n)
|
|
362
|
+
for (const r of t ? [t] : [...n.keys()]) {
|
|
363
|
+
const i = n.get(r);
|
|
364
|
+
i && (i.target.off(e, i.handler), n.delete(r));
|
|
351
365
|
}
|
|
352
366
|
}
|
|
353
|
-
function
|
|
354
|
-
const r =
|
|
355
|
-
return r ?
|
|
367
|
+
function He(e, t, n) {
|
|
368
|
+
const r = p(n);
|
|
369
|
+
return r ? O.register(e, async (i) => oe(await t(R(i)))) : Fe(e, t), () => (r ? O : q).unregister(e);
|
|
356
370
|
}
|
|
357
|
-
function
|
|
358
|
-
(
|
|
371
|
+
function St(e, t) {
|
|
372
|
+
(p(t) ? O : q).unregister(e);
|
|
359
373
|
}
|
|
360
|
-
function
|
|
361
|
-
return
|
|
374
|
+
function Fe(e, t) {
|
|
375
|
+
return q.register(e, async (n) => {
|
|
362
376
|
try {
|
|
363
|
-
|
|
364
|
-
return F(J(r));
|
|
377
|
+
return { success: !0, data: oe(await t(R(n))) };
|
|
365
378
|
} catch (r) {
|
|
366
|
-
|
|
367
|
-
try {
|
|
368
|
-
return F(i);
|
|
369
|
-
} catch (o) {
|
|
370
|
-
return { code: i.code, msg: i.msg, result: {} };
|
|
371
|
-
}
|
|
379
|
+
return { success: !1, error: { message: w(r) } };
|
|
372
380
|
}
|
|
373
|
-
}), () =>
|
|
374
|
-
}
|
|
375
|
-
function J(e) {
|
|
376
|
-
return { code: Pe, msg: "ok", result: e != null ? e : {} };
|
|
377
|
-
}
|
|
378
|
-
function bn(e) {
|
|
379
|
-
return O(e) && Ee(e.code);
|
|
381
|
+
}), () => q.unregister(e);
|
|
380
382
|
}
|
|
381
|
-
function
|
|
382
|
-
|
|
383
|
-
if (!bn(r)) throw v(e, re, m(r));
|
|
384
|
-
if (r.code !== Pe) throw v(e, r.code, r.msg || `code ${r.code}`);
|
|
385
|
-
return J(ne(e, t, r.result));
|
|
383
|
+
function ue(e) {
|
|
384
|
+
return { code: Ae, msg: "ok", result: e != null ? e : {} };
|
|
386
385
|
}
|
|
387
|
-
function
|
|
386
|
+
function Et(e) {
|
|
387
|
+
if (!m(e)) return;
|
|
388
|
+
const t = l(e.code) && /^-?\d+$/.test(e.code) ? Number(e.code) : e.code;
|
|
389
|
+
if (Re(t))
|
|
390
|
+
return { code: t, msg: l(e.msg) ? e.msg : "", result: e.result };
|
|
391
|
+
}
|
|
392
|
+
function kt(e, t, n) {
|
|
393
|
+
const r = R(t), i = Et(r);
|
|
394
|
+
if (!i) throw I(e, qe, w(r));
|
|
395
|
+
const { code: o, msg: c, result: d } = i;
|
|
396
|
+
if (o !== Ae) throw I(e, o, c || `code ${o}`);
|
|
397
|
+
return ue(te(e, n, R(d)));
|
|
398
|
+
}
|
|
399
|
+
function te(e, t, n) {
|
|
388
400
|
try {
|
|
389
|
-
return
|
|
401
|
+
return t ? t(n) : n;
|
|
390
402
|
} catch (r) {
|
|
391
|
-
throw
|
|
403
|
+
throw se(r) ? r : I(e, _e, w(r));
|
|
392
404
|
}
|
|
393
405
|
}
|
|
394
|
-
function
|
|
395
|
-
return
|
|
406
|
+
function se(e) {
|
|
407
|
+
return k(e) && l(e.errMsg) && Re(e.errCode);
|
|
396
408
|
}
|
|
397
|
-
function
|
|
398
|
-
return { errMsg: `${e}:fail ${
|
|
409
|
+
function I(e, t, n) {
|
|
410
|
+
return { errMsg: `${e}:fail ${n}`, errCode: t };
|
|
399
411
|
}
|
|
400
|
-
function
|
|
401
|
-
return
|
|
412
|
+
function Ct(e, t) {
|
|
413
|
+
return t instanceof G ? I(e, t.kind === "native" ? Ze : K, t.message) : I(e, K, w(t));
|
|
402
414
|
}
|
|
403
|
-
function
|
|
404
|
-
return {
|
|
405
|
-
code: re,
|
|
406
|
-
msg: `${e}:fail ${m(n)}`,
|
|
407
|
-
result: P(n) && "result" in n ? n.result : n
|
|
408
|
-
};
|
|
409
|
-
}
|
|
410
|
-
function V(e, n) {
|
|
415
|
+
function J(e, t) {
|
|
411
416
|
try {
|
|
412
|
-
e == null || e(
|
|
413
|
-
} catch (
|
|
414
|
-
console.error("[mys-sdk] 回调执行错误",
|
|
417
|
+
e == null || e(t);
|
|
418
|
+
} catch (n) {
|
|
419
|
+
console.error("[mys-sdk] 回调执行错误", n);
|
|
415
420
|
}
|
|
416
421
|
}
|
|
417
|
-
function
|
|
418
|
-
return
|
|
422
|
+
function ce(e, t) {
|
|
423
|
+
return J(t == null ? void 0 : t.fail, e), J(t == null ? void 0 : t.complete, e), Promise.reject(e);
|
|
419
424
|
}
|
|
420
|
-
function
|
|
421
|
-
return
|
|
425
|
+
function We(e, t, n) {
|
|
426
|
+
return t.then(
|
|
422
427
|
(r) => {
|
|
423
428
|
const i = r;
|
|
424
|
-
return
|
|
429
|
+
return J(n == null ? void 0 : n.success, i), J(n == null ? void 0 : n.complete, i), i;
|
|
425
430
|
},
|
|
426
|
-
(r) =>
|
|
431
|
+
(r) => ce(se(r) ? r : I(e, K, w(r)), n)
|
|
427
432
|
);
|
|
428
433
|
}
|
|
429
|
-
function
|
|
430
|
-
return
|
|
434
|
+
function s(e, t, n) {
|
|
435
|
+
return ce(I(e, et, `parameter error: ${t}`), n);
|
|
431
436
|
}
|
|
432
|
-
function
|
|
433
|
-
return
|
|
437
|
+
function de(e, t, n) {
|
|
438
|
+
return ce(I(e, tt, `unsupported: ${t}`), n);
|
|
434
439
|
}
|
|
435
|
-
function
|
|
440
|
+
function ne(e, t, n, r) {
|
|
436
441
|
var o;
|
|
437
|
-
|
|
442
|
+
A && Z({ fnName: e, channel: "local", appVersion: (o = L()) == null ? void 0 : o.app_version, method: e, data: t });
|
|
438
443
|
let i;
|
|
439
444
|
try {
|
|
440
|
-
i = Promise.resolve(
|
|
441
|
-
} catch (
|
|
442
|
-
i = Promise.reject(
|
|
445
|
+
i = Promise.resolve(ue(n()));
|
|
446
|
+
} catch (c) {
|
|
447
|
+
i = Promise.reject(se(c) ? c : I(e, qe, w(c)));
|
|
443
448
|
}
|
|
444
|
-
return
|
|
449
|
+
return We(e, i, r);
|
|
445
450
|
}
|
|
446
|
-
function u(e,
|
|
447
|
-
var
|
|
448
|
-
const { since: i, legacyOnly: o, jsbridge:
|
|
449
|
-
let
|
|
451
|
+
function u(e, t = {}, n, r = {}) {
|
|
452
|
+
var ge;
|
|
453
|
+
const { since: i, legacyOnly: o, jsbridge: c, transformResult: d, ...a } = r, h = o || p(i);
|
|
454
|
+
let P;
|
|
450
455
|
try {
|
|
451
|
-
const
|
|
452
|
-
|
|
453
|
-
} catch (
|
|
454
|
-
const
|
|
455
|
-
return
|
|
456
|
+
const f = oe(t);
|
|
457
|
+
P = m(f) ? f : {};
|
|
458
|
+
} catch (f) {
|
|
459
|
+
const T = f instanceof N || f instanceof TypeError ? f.message : "参数无法序列化";
|
|
460
|
+
return s(e, T, n);
|
|
456
461
|
}
|
|
457
|
-
const
|
|
458
|
-
let
|
|
462
|
+
const fe = (ge = L()) == null ? void 0 : ge.app_version;
|
|
463
|
+
let $;
|
|
459
464
|
try {
|
|
460
|
-
if (
|
|
461
|
-
const
|
|
462
|
-
|
|
463
|
-
(
|
|
464
|
-
(
|
|
465
|
+
if (h) {
|
|
466
|
+
const f = te(e, c == null ? void 0 : c.data, P);
|
|
467
|
+
A && Z({ fnName: e, channel: "jsbridge", appVersion: fe, since: i, method: e, data: f }), $ = O.callAsync(e, f, a).then(
|
|
468
|
+
(T) => ue(te(e, c == null ? void 0 : c.result, T)),
|
|
469
|
+
(T) => Promise.reject(Ct(e, T))
|
|
465
470
|
);
|
|
466
471
|
} else
|
|
467
|
-
|
|
468
|
-
} catch (
|
|
469
|
-
|
|
472
|
+
A && Z({ fnName: e, channel: "mysJSBridge", appVersion: fe, since: i, method: e, data: P }), $ = q.callAsync(e, P, a).then((f) => kt(e, f, d));
|
|
473
|
+
} catch (f) {
|
|
474
|
+
$ = Promise.reject(f);
|
|
470
475
|
}
|
|
471
|
-
return
|
|
476
|
+
return We(e, $, n);
|
|
472
477
|
}
|
|
473
|
-
const
|
|
474
|
-
var
|
|
475
|
-
function
|
|
476
|
-
var
|
|
478
|
+
const qr = u;
|
|
479
|
+
var Ge = /* @__PURE__ */ ((e) => (e[e.Short = 0] = "Short", e[e.Long = 1] = "Long", e))(Ge || {}), W = /* @__PURE__ */ ((e) => (e[e.RecentContacts = 1] = "RecentContacts", e[e.External = 2] = "External", e[e.Channel = 3] = "Channel", e))(W || {});
|
|
480
|
+
function At(e) {
|
|
481
|
+
var t;
|
|
477
482
|
return e.text ? u(
|
|
478
483
|
"showToast",
|
|
479
484
|
{
|
|
480
485
|
text: e.text,
|
|
481
|
-
duration: (
|
|
486
|
+
duration: (t = e.duration) != null ? t : Ge.Short
|
|
482
487
|
},
|
|
483
488
|
e,
|
|
484
489
|
{
|
|
485
490
|
since: "4.4.0",
|
|
486
491
|
// 旧通道 jsbridge 的 showToast 只有 text,没有 duration
|
|
487
|
-
jsbridge: { data: ({ text:
|
|
492
|
+
jsbridge: { data: ({ text: n }) => ({ text: n }) }
|
|
488
493
|
}
|
|
489
|
-
) :
|
|
494
|
+
) : s("showToast", "text is required", e);
|
|
490
495
|
}
|
|
491
|
-
function
|
|
492
|
-
var
|
|
496
|
+
function qt(e = {}) {
|
|
497
|
+
var t, n;
|
|
493
498
|
return u(
|
|
494
499
|
"triggerVibrate",
|
|
495
500
|
{
|
|
496
501
|
duration: e.duration,
|
|
497
|
-
intensity: (
|
|
502
|
+
intensity: (t = e.intensity) != null ? t : 1,
|
|
498
503
|
steps: e.steps,
|
|
499
|
-
repeat: (
|
|
504
|
+
repeat: (n = e.repeat) != null ? n : !1
|
|
500
505
|
},
|
|
501
506
|
e,
|
|
502
507
|
{
|
|
@@ -505,60 +510,54 @@ function In(e = {}) {
|
|
|
505
510
|
}
|
|
506
511
|
);
|
|
507
512
|
}
|
|
508
|
-
function
|
|
513
|
+
function _t(e) {
|
|
509
514
|
return u("stopVibrate", {}, e, { since: "4.4.0", queue: "serial" });
|
|
510
515
|
}
|
|
511
|
-
function
|
|
516
|
+
function Rt(e) {
|
|
512
517
|
return u("hideKeyboard", {}, e);
|
|
513
518
|
}
|
|
514
|
-
function
|
|
515
|
-
|
|
519
|
+
function Ot(e, t) {
|
|
520
|
+
y("keyboardHeightChange", e, {
|
|
516
521
|
since: "4.4.0",
|
|
517
|
-
once:
|
|
518
|
-
transform: (
|
|
522
|
+
once: t == null ? void 0 : t.once,
|
|
523
|
+
transform: (n) => n ? n / xe() : 0
|
|
519
524
|
});
|
|
520
525
|
}
|
|
521
|
-
function
|
|
526
|
+
function Tt(e) {
|
|
522
527
|
E("keyboardHeightChange", e);
|
|
523
528
|
}
|
|
524
|
-
function
|
|
525
|
-
h("onCommentPanelChange", e, { since: "4.4.0", once: n == null ? void 0 : n.once });
|
|
526
|
-
}
|
|
527
|
-
function qn(e) {
|
|
528
|
-
E("onCommentPanelChange", e);
|
|
529
|
-
}
|
|
530
|
-
function $e(e, n) {
|
|
529
|
+
function Ve(e, t) {
|
|
531
530
|
var i, o;
|
|
532
|
-
if (!((i =
|
|
533
|
-
return
|
|
534
|
-
const
|
|
535
|
-
if (!Number.isInteger(
|
|
536
|
-
return
|
|
531
|
+
if (!((i = t.urls) != null && i.length))
|
|
532
|
+
return s(e, "urls is required", t);
|
|
533
|
+
const n = (o = t.current) != null ? o : 0;
|
|
534
|
+
if (!Number.isInteger(n) || n < 0 || n >= t.urls.length)
|
|
535
|
+
return s(e, "current is out of range", t);
|
|
537
536
|
const r = e === "previewImage";
|
|
538
|
-
return
|
|
537
|
+
return p("4.3.0") ? u(
|
|
539
538
|
"playMedia",
|
|
540
539
|
{
|
|
541
540
|
type: r ? 1 : 2,
|
|
542
|
-
url:
|
|
543
|
-
urls: r ?
|
|
541
|
+
url: t.urls[n],
|
|
542
|
+
urls: r ? t.urls : void 0
|
|
544
543
|
},
|
|
545
|
-
|
|
544
|
+
t,
|
|
546
545
|
{ legacyOnly: !0 }
|
|
547
|
-
) : u("previewMedia", { type: r ? "image" : "video", urls:
|
|
546
|
+
) : u("previewMedia", { type: r ? "image" : "video", urls: t.urls, current: n }, t);
|
|
548
547
|
}
|
|
549
|
-
function
|
|
550
|
-
return
|
|
548
|
+
function Bt(e) {
|
|
549
|
+
return Ve("previewImage", e);
|
|
551
550
|
}
|
|
552
|
-
function
|
|
553
|
-
return
|
|
551
|
+
function Nt(e) {
|
|
552
|
+
return Ve("previewVideo", e);
|
|
554
553
|
}
|
|
555
|
-
function
|
|
556
|
-
var
|
|
557
|
-
return e.count !== void 0 && (!Number.isInteger(e.count) || e.count <= 0) ?
|
|
554
|
+
function Dt(e = {}) {
|
|
555
|
+
var t, n, r, i, o;
|
|
556
|
+
return e.count !== void 0 && (!Number.isInteger(e.count) || e.count <= 0) ? s("chooseMedia", "可选择照片数量范围为1-9张", e) : u(
|
|
558
557
|
"chooseMedia",
|
|
559
558
|
{
|
|
560
|
-
count: (
|
|
561
|
-
mediaType: (
|
|
559
|
+
count: (t = e.count) != null ? t : 9,
|
|
560
|
+
mediaType: (n = e.mediaType) != null ? n : "image",
|
|
562
561
|
compressed: (r = e.compressed) != null ? r : !0,
|
|
563
562
|
maxDuration: (i = e.maxDuration) != null ? i : 60,
|
|
564
563
|
camera: (o = e.camera) != null ? o : "back"
|
|
@@ -567,224 +566,325 @@ function Rn(e = {}) {
|
|
|
567
566
|
{ queue: "serial" }
|
|
568
567
|
);
|
|
569
568
|
}
|
|
570
|
-
let
|
|
571
|
-
function
|
|
572
|
-
var
|
|
569
|
+
let z = !1;
|
|
570
|
+
function Mt(e) {
|
|
571
|
+
var n;
|
|
573
572
|
if (!Array.isArray(e.files) || e.files.length === 0)
|
|
574
|
-
return
|
|
573
|
+
return s("uploadFiles", "files is required", e);
|
|
575
574
|
if (e.files.some((r) => !r))
|
|
576
|
-
return
|
|
577
|
-
if (
|
|
578
|
-
return
|
|
579
|
-
|
|
580
|
-
const
|
|
575
|
+
return s("uploadFiles", "files[] is required", e);
|
|
576
|
+
if (z)
|
|
577
|
+
return s("uploadFiles", "another uploadFiles request is in progress", e);
|
|
578
|
+
z = !0;
|
|
579
|
+
const t = e.onProgress ? y("uploadFilesProgress", e.onProgress) : void 0;
|
|
581
580
|
return u(
|
|
582
581
|
"uploadFiles",
|
|
583
582
|
{
|
|
584
583
|
files: e.files,
|
|
585
|
-
cosDirPath: (
|
|
584
|
+
cosDirPath: (n = e.cosDirPath) != null ? n : "multipleSource/common/"
|
|
586
585
|
},
|
|
587
586
|
e,
|
|
588
587
|
{ queue: "serial" }
|
|
589
588
|
).finally(() => {
|
|
590
|
-
|
|
589
|
+
z = !1, t == null || t();
|
|
591
590
|
});
|
|
592
591
|
}
|
|
593
|
-
function
|
|
594
|
-
const
|
|
595
|
-
if (
|
|
596
|
-
throw { errMsg: `saveImageToPhotosAlbum:fail ${
|
|
592
|
+
function Lt(e) {
|
|
593
|
+
const t = m(e) ? e : {};
|
|
594
|
+
if (t.status === "success" || t.result === "success") return;
|
|
595
|
+
throw { errMsg: `saveImageToPhotosAlbum:fail ${l(t.reason) && t.reason ? t.reason : "unknown reason"}`, errCode: _e, errDetail: e };
|
|
597
596
|
}
|
|
598
|
-
function
|
|
599
|
-
return
|
|
597
|
+
function $t(e) {
|
|
598
|
+
return ot(e == null ? void 0 : e.filePath) ? u("saveMediaToPhotosAlbum", { type: "image", file: e.filePath }, e, {
|
|
600
599
|
legacyOnly: !0,
|
|
601
|
-
jsbridge: { result:
|
|
602
|
-
}) :
|
|
600
|
+
jsbridge: { result: Lt }
|
|
601
|
+
}) : s("saveImageToPhotosAlbum", "filePath must be base64 data (data URL or plain base64)", e);
|
|
602
|
+
}
|
|
603
|
+
const Ee = ["qrCode", "barCode"];
|
|
604
|
+
function jt(e = {}) {
|
|
605
|
+
const { scanType: t, onlyFromCamera: n } = e;
|
|
606
|
+
return t !== void 0 && (!Array.isArray(t) || t.length === 0 || t.some((r) => !Ee.includes(r))) ? s("scanCode", "scanType must be a non-empty array of qrCode or barCode", e) : n !== void 0 && typeof n != "boolean" ? s("scanCode", "onlyFromCamera must be a boolean", e) : u(
|
|
607
|
+
"scanCode",
|
|
608
|
+
{ scanType: t != null ? t : [...Ee], onlyFromCamera: n != null ? n : !1 },
|
|
609
|
+
e,
|
|
610
|
+
{
|
|
611
|
+
// 扫码页是独占界面,连续点击不应拉起两个
|
|
612
|
+
queue: "serial",
|
|
613
|
+
// 取消时 Native 可能不带 result 或只带 cancelled,补齐成约定结构
|
|
614
|
+
transformResult: (r) => {
|
|
615
|
+
const i = m(r) ? r : {}, o = i.cancelled === !0;
|
|
616
|
+
return {
|
|
617
|
+
result: o || !l(i.result) ? "" : i.result,
|
|
618
|
+
scanType: o ? void 0 : i.scanType,
|
|
619
|
+
cancelled: o
|
|
620
|
+
};
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
);
|
|
603
624
|
}
|
|
604
|
-
let
|
|
605
|
-
function
|
|
606
|
-
|
|
607
|
-
const { onEnd:
|
|
625
|
+
let v;
|
|
626
|
+
function xt(e) {
|
|
627
|
+
v == null || v.release();
|
|
628
|
+
const { onEnd: t, onProgress: n } = e != null ? e : {};
|
|
608
629
|
let r, i;
|
|
609
630
|
const o = {
|
|
610
631
|
stopProgress: () => r == null ? void 0 : r(),
|
|
611
632
|
release: () => {
|
|
612
|
-
r == null || r(), i == null || i(),
|
|
633
|
+
r == null || r(), i == null || i(), v === o && (v = void 0);
|
|
613
634
|
}
|
|
614
635
|
};
|
|
615
|
-
return r =
|
|
616
|
-
o.release(),
|
|
617
|
-
}),
|
|
618
|
-
}
|
|
619
|
-
function
|
|
620
|
-
const
|
|
621
|
-
if (
|
|
622
|
-
return
|
|
623
|
-
const { release:
|
|
624
|
-
return u("startRecordAudio", { maxDuration:
|
|
625
|
-
throw
|
|
636
|
+
return r = n ? y("onRecordAudioProgress", n) : void 0, i = y("onRecordAudioEnd", (c) => {
|
|
637
|
+
o.release(), t == null || t({ ...c, duration: c.duration / 1e3, size: c.size / 1024 });
|
|
638
|
+
}), v = o, o;
|
|
639
|
+
}
|
|
640
|
+
function Ut(e) {
|
|
641
|
+
const t = e == null ? void 0 : e.maxDuration;
|
|
642
|
+
if (t !== void 0 && (!Number.isFinite(t) || t <= 0))
|
|
643
|
+
return s("startRecordAudio", "maxDuration must be a number greater than 0", e);
|
|
644
|
+
const { release: n } = xt(e);
|
|
645
|
+
return u("startRecordAudio", { maxDuration: t }, e, { queue: "serial" }).catch((r) => {
|
|
646
|
+
throw n(), r;
|
|
626
647
|
});
|
|
627
648
|
}
|
|
628
|
-
function
|
|
629
|
-
const
|
|
649
|
+
function Ht(e) {
|
|
650
|
+
const t = v;
|
|
630
651
|
return u("stopRecordAudio", {}, e).then(
|
|
631
|
-
(
|
|
632
|
-
(
|
|
633
|
-
throw
|
|
652
|
+
(n) => (t == null || t.stopProgress(), n),
|
|
653
|
+
(n) => {
|
|
654
|
+
throw t == null || t.release(), n;
|
|
634
655
|
}
|
|
635
656
|
);
|
|
636
657
|
}
|
|
637
|
-
function
|
|
638
|
-
return
|
|
658
|
+
function Ft(e) {
|
|
659
|
+
return v == null || v.release(), u("cancelRecordAudio", {}, e);
|
|
639
660
|
}
|
|
640
|
-
function
|
|
641
|
-
return
|
|
642
|
-
transformResult: (
|
|
661
|
+
function Wt(e) {
|
|
662
|
+
return p("4.4.0") ? ne("getSystemInfo", {}, Se, e) : u("getSystemInfo", {}, e, {
|
|
663
|
+
transformResult: (t) => ({ ...Se(), ...m(t) ? t : {} })
|
|
643
664
|
});
|
|
644
665
|
}
|
|
645
|
-
function
|
|
646
|
-
return e.data === void 0 ?
|
|
666
|
+
function Gt(e) {
|
|
667
|
+
return e.data === void 0 ? s("setClipboardData", "data is required", e) : u("setClipboardData", { data: e.data }, e);
|
|
647
668
|
}
|
|
648
|
-
function
|
|
669
|
+
function Vt(e) {
|
|
649
670
|
return u("getClipboardData", {}, e);
|
|
650
671
|
}
|
|
651
|
-
function
|
|
652
|
-
return { permission: "notification", result:
|
|
672
|
+
function Jt(e) {
|
|
673
|
+
return { permission: "notification", result: m(e) && e.isOpen === !0 ? "granted" : "denied" };
|
|
653
674
|
}
|
|
654
|
-
function
|
|
655
|
-
return e.permission ?
|
|
675
|
+
function zt(e) {
|
|
676
|
+
return e.permission ? p("4.4.0") ? e.permission !== "notification" ? de("checkPermission", `permission ${e.permission} requires app >= 4.4.0`, e) : u("isNotificationEnabled", {}, e, {
|
|
656
677
|
legacyOnly: !0,
|
|
657
|
-
jsbridge: { result:
|
|
658
|
-
}) : u("checkPermission", { permission: e.permission }, e) :
|
|
678
|
+
jsbridge: { result: Jt }
|
|
679
|
+
}) : u("checkPermission", { permission: e.permission }, e) : s("checkPermission", "permission is required", e);
|
|
659
680
|
}
|
|
660
|
-
function
|
|
661
|
-
return e.permission ?
|
|
681
|
+
function Kt(e) {
|
|
682
|
+
return e.permission ? p("4.4.0") ? e.permission !== "notification" ? de("openPhoneSetting", `permission ${e.permission} requires app >= 4.4.0`, e) : u("gotoSetPhoneNotify", {}, e, { legacyOnly: !0 }) : u("openPhoneSetting", { permission: e.permission }, e, { queue: "serial" }) : s("openPhoneSetting", "permission is required", e);
|
|
683
|
+
}
|
|
684
|
+
const re = "web_";
|
|
685
|
+
function le(e) {
|
|
686
|
+
return e.startsWith(re) ? e : `${re}${e}`;
|
|
687
|
+
}
|
|
688
|
+
const ke = Symbol("invalid json");
|
|
689
|
+
function Yt(e) {
|
|
690
|
+
if (!l(e == null ? void 0 : e.key) || !e.key)
|
|
691
|
+
return s("setStorage", "key is required", e);
|
|
692
|
+
let t;
|
|
693
|
+
try {
|
|
694
|
+
t = ut(e.value);
|
|
695
|
+
} catch (n) {
|
|
696
|
+
return s("setStorage", w(n), e);
|
|
697
|
+
}
|
|
698
|
+
return t === void 0 ? s("setStorage", "value cannot be serialized to JSON", e) : u("setStorage", { key: le(e.key), value: t }, e);
|
|
699
|
+
}
|
|
700
|
+
function Xt(e) {
|
|
701
|
+
return !l(e == null ? void 0 : e.key) || !e.key ? s("getStorage", "key is required", e) : u("getStorage", { key: le(e.key) }, e, {
|
|
702
|
+
// Native 约定 result 为 { data: string | null },data 是 setStorage 存入的 JSON 文本;抛错由钩子归一成失败
|
|
703
|
+
transformResult: (t) => {
|
|
704
|
+
const n = m(t) ? t.data : void 0;
|
|
705
|
+
if (n == null) return { data: null };
|
|
706
|
+
if (!l(n)) throw new Error("stored data is not a string");
|
|
707
|
+
const r = ie(n, ke);
|
|
708
|
+
if (r === ke) throw new Error("stored data is not valid JSON");
|
|
709
|
+
return { data: r };
|
|
710
|
+
}
|
|
711
|
+
});
|
|
712
|
+
}
|
|
713
|
+
function Qt(e) {
|
|
714
|
+
return !l(e == null ? void 0 : e.key) || !e.key ? s("removeStorage", "key is required", e) : u("removeStorage", { key: le(e.key) }, e);
|
|
662
715
|
}
|
|
663
|
-
function
|
|
716
|
+
function Zt(e) {
|
|
717
|
+
return u("clearStorage", { prefix: re }, e);
|
|
718
|
+
}
|
|
719
|
+
function en(e = {}) {
|
|
664
720
|
return u("openApp", { url: e.url, packageNames: e.packageNames }, e, { since: "4.4.0", queue: "serial" });
|
|
665
721
|
}
|
|
666
|
-
function
|
|
667
|
-
return typeof (e == null ? void 0 : e.enable) != "boolean" ?
|
|
722
|
+
function tn(e) {
|
|
723
|
+
return typeof (e == null ? void 0 : e.enable) != "boolean" ? s("swipeBack", "enable must be a boolean", e) : u("swipeBack", { enable: e.enable }, e);
|
|
724
|
+
}
|
|
725
|
+
function nn(e = {}) {
|
|
726
|
+
var t;
|
|
727
|
+
return e.enabled !== void 0 && typeof e.enabled != "boolean" ? s("setPullDownRefresh", "enabled must be a boolean", e) : u("setPullDownRefresh", { enabled: (t = e.enabled) != null ? t : !0 }, e);
|
|
728
|
+
}
|
|
729
|
+
function rn(e) {
|
|
730
|
+
return u("startPullDownRefresh", {}, e);
|
|
731
|
+
}
|
|
732
|
+
function on(e) {
|
|
733
|
+
return u("stopPullDownRefresh", {}, e);
|
|
734
|
+
}
|
|
735
|
+
function un(e, t) {
|
|
736
|
+
y("pullDownRefresh", e, { once: t == null ? void 0 : t.once });
|
|
668
737
|
}
|
|
669
|
-
function
|
|
670
|
-
|
|
738
|
+
function sn(e) {
|
|
739
|
+
E("pullDownRefresh", e);
|
|
671
740
|
}
|
|
672
|
-
function
|
|
741
|
+
function cn(e) {
|
|
742
|
+
return l(e == null ? void 0 : e.title) ? u("setNavigationBarTitle", { title: e.title }, e) : s("setNavigationBarTitle", "title must be a string", e);
|
|
743
|
+
}
|
|
744
|
+
const dn = /^#[0-9a-fA-F]{6}$/;
|
|
745
|
+
function ln(e) {
|
|
746
|
+
return !l(e == null ? void 0 : e.backgroundColor) || !dn.test(e.backgroundColor) ? s("setNavigationBarColor", "backgroundColor must be #RRGGBB", e) : e.frontColor !== "white" && e.frontColor !== "black" ? s("setNavigationBarColor", "frontColor must be white or black", e) : u("setNavigationBarColor", { backgroundColor: e.backgroundColor, frontColor: e.frontColor }, e);
|
|
747
|
+
}
|
|
748
|
+
function an(e) {
|
|
749
|
+
return u("showNavigationBar", {}, e);
|
|
750
|
+
}
|
|
751
|
+
function fn(e) {
|
|
752
|
+
return u("hideNavigationBar", {}, e);
|
|
753
|
+
}
|
|
754
|
+
function gn(e) {
|
|
755
|
+
return (e == null ? void 0 : e.style) !== "light" && (e == null ? void 0 : e.style) !== "dark" ? s("setStatusBarStyle", "style must be light or dark", e) : u("setStatusBarStyle", { style: e.style }, e);
|
|
756
|
+
}
|
|
757
|
+
function yn(e) {
|
|
758
|
+
return e.nameType === void 0 ? s("showPageName", "nameType is required", e) : u("showPageName", { nameType: e.nameType }, e, { since: "4.4.0" });
|
|
759
|
+
}
|
|
760
|
+
function hn(e) {
|
|
673
761
|
return u("H5Loaded", {}, e, { since: "4.4.0" });
|
|
674
762
|
}
|
|
675
|
-
function
|
|
763
|
+
function bn(e) {
|
|
676
764
|
return u("getBeforeInfo", {}, e, { since: "4.4.0" });
|
|
677
765
|
}
|
|
678
|
-
function
|
|
766
|
+
function wn(e = {}) {
|
|
679
767
|
return u("setH5BeforeInfo", e, e, { since: "4.4.0" });
|
|
680
768
|
}
|
|
681
|
-
function
|
|
682
|
-
|
|
769
|
+
function vn(e, t) {
|
|
770
|
+
y("h5PageShow", e, { since: "4.4.0", once: t == null ? void 0 : t.once });
|
|
683
771
|
}
|
|
684
|
-
function
|
|
772
|
+
function pn(e) {
|
|
685
773
|
E("h5PageShow", e);
|
|
686
774
|
}
|
|
687
|
-
function
|
|
688
|
-
|
|
775
|
+
function Pn(e, t) {
|
|
776
|
+
y("h5PageVisible", e, { since: "4.4.0", once: t == null ? void 0 : t.once });
|
|
689
777
|
}
|
|
690
|
-
function
|
|
778
|
+
function In(e) {
|
|
691
779
|
E("h5PageVisible", e);
|
|
692
780
|
}
|
|
693
|
-
function
|
|
694
|
-
|
|
781
|
+
function mn(e, t) {
|
|
782
|
+
y("h5PageInvisible", e, { since: "4.4.0", once: t == null ? void 0 : t.once });
|
|
695
783
|
}
|
|
696
|
-
function
|
|
784
|
+
function Sn(e) {
|
|
697
785
|
E("h5PageInvisible", e);
|
|
698
786
|
}
|
|
699
|
-
const
|
|
787
|
+
const En = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
700
788
|
__proto__: null,
|
|
701
|
-
cancelRecordAudio:
|
|
702
|
-
checkPermission:
|
|
703
|
-
chooseMedia:
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
789
|
+
cancelRecordAudio: Ft,
|
|
790
|
+
checkPermission: zt,
|
|
791
|
+
chooseMedia: Dt,
|
|
792
|
+
clearStorage: Zt,
|
|
793
|
+
getBeforeInfo: bn,
|
|
794
|
+
getClipboardData: Vt,
|
|
795
|
+
getStorage: Xt,
|
|
796
|
+
getSystemInfo: Wt,
|
|
797
|
+
h5Loaded: hn,
|
|
798
|
+
hideKeyboard: Rt,
|
|
799
|
+
hideNavigationBar: fn,
|
|
800
|
+
offKeyboardHeightChange: Tt,
|
|
801
|
+
offPageInvisible: Sn,
|
|
802
|
+
offPageShow: pn,
|
|
803
|
+
offPageVisible: In,
|
|
804
|
+
offPullDownRefresh: sn,
|
|
805
|
+
onKeyboardHeightChange: Ot,
|
|
806
|
+
onPageInvisible: mn,
|
|
807
|
+
onPageShow: vn,
|
|
808
|
+
onPageVisible: Pn,
|
|
809
|
+
onPullDownRefresh: un,
|
|
810
|
+
openApp: en,
|
|
811
|
+
openPhoneSetting: Kt,
|
|
812
|
+
previewImage: Bt,
|
|
813
|
+
previewVideo: Nt,
|
|
814
|
+
removeStorage: Qt,
|
|
815
|
+
saveImageToPhotosAlbum: $t,
|
|
816
|
+
scanCode: jt,
|
|
817
|
+
setBeforeInfo: wn,
|
|
818
|
+
setClipboardData: Gt,
|
|
819
|
+
setNavigationBarColor: ln,
|
|
820
|
+
setNavigationBarTitle: cn,
|
|
821
|
+
setPullDownRefresh: nn,
|
|
822
|
+
setStatusBarStyle: gn,
|
|
823
|
+
setStorage: Yt,
|
|
824
|
+
showNavigationBar: an,
|
|
825
|
+
showPageName: yn,
|
|
826
|
+
showToast: At,
|
|
827
|
+
startPullDownRefresh: rn,
|
|
828
|
+
startRecordAudio: Ut,
|
|
829
|
+
stopPullDownRefresh: on,
|
|
830
|
+
stopRecordAudio: Ht,
|
|
831
|
+
stopVibrate: _t,
|
|
832
|
+
swipeBack: tn,
|
|
833
|
+
triggerVibrate: qt,
|
|
834
|
+
uploadFiles: Mt
|
|
734
835
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
735
|
-
function
|
|
836
|
+
function kn(e) {
|
|
736
837
|
return u("login", {}, e, { since: "4.4.0", queue: "serial" });
|
|
737
838
|
}
|
|
738
|
-
function
|
|
739
|
-
return u("getToken", {}, e, {
|
|
740
|
-
since: "4.4.0",
|
|
741
|
-
// 旧通道可能直接返回 token 字符串,统一成对象
|
|
742
|
-
jsbridge: { result: (n) => f(n) ? { token: n } : n }
|
|
743
|
-
});
|
|
839
|
+
function Cn(e) {
|
|
840
|
+
return u("getToken", {}, e, { since: "4.4.0" });
|
|
744
841
|
}
|
|
745
|
-
function
|
|
842
|
+
function An(e) {
|
|
746
843
|
return u("getCurrentCircleInfo", {}, e, { since: "4.4.0" });
|
|
747
844
|
}
|
|
748
|
-
function
|
|
845
|
+
function qn(e) {
|
|
749
846
|
var r;
|
|
750
847
|
if (!e.title)
|
|
751
|
-
return
|
|
848
|
+
return s("shareWebCard", "title is required", e);
|
|
752
849
|
if (!e.daokeUrl)
|
|
753
|
-
return
|
|
754
|
-
const { activityDetail:
|
|
850
|
+
return s("shareWebCard", "daokeUrl is required", e);
|
|
851
|
+
const { activityDetail: t } = e, n = _n(e);
|
|
755
852
|
return u(
|
|
756
853
|
"shareWebCard",
|
|
757
854
|
{
|
|
758
855
|
...e,
|
|
759
|
-
shareTypes: (r = e.shareTypes) != null ? r : [
|
|
760
|
-
activityDetail:
|
|
856
|
+
shareTypes: (r = e.shareTypes) != null ? r : [W.RecentContacts, W.External, W.Channel],
|
|
857
|
+
activityDetail: k(t) ? JSON.stringify(t) : t
|
|
761
858
|
},
|
|
762
859
|
e,
|
|
763
860
|
{ since: "4.4.0", queue: "serial" }
|
|
764
861
|
).catch((i) => {
|
|
765
|
-
throw
|
|
862
|
+
throw n(), i;
|
|
766
863
|
});
|
|
767
864
|
}
|
|
768
|
-
let
|
|
769
|
-
function
|
|
770
|
-
|
|
771
|
-
const { onShared:
|
|
772
|
-
let o,
|
|
865
|
+
let B;
|
|
866
|
+
function _n(e) {
|
|
867
|
+
B == null || B();
|
|
868
|
+
const { onShared: t, getSharePictureUrl: n, isSharePic: r } = e, i = r ? n : void 0;
|
|
869
|
+
let o, c;
|
|
773
870
|
const d = () => {
|
|
774
|
-
o == null || o(),
|
|
871
|
+
B === d && (o == null || o(), c == null || c());
|
|
775
872
|
};
|
|
776
|
-
return (
|
|
777
|
-
d(), n == null || n(a);
|
|
778
|
-
}, { since: "4.4.0" })), i && (s = Le("getSharePictureUrl", i, "4.4.0")), j = d, d;
|
|
873
|
+
return t && (o = y("onShared", t, { since: "4.4.0", once: !0 })), i && (c = He("getSharePictureUrl", i, "4.4.0")), B = d, d;
|
|
779
874
|
}
|
|
780
|
-
function
|
|
781
|
-
return !e.url || !/^https?:\/\//i.test(e.url) ?
|
|
875
|
+
function Rn(e) {
|
|
876
|
+
return !e.url || !/^https?:\/\//i.test(e.url) ? s("shareImage", "url must be a valid http(s) url", e) : u("shareImage", { url: e.url }, e, { queue: "serial" });
|
|
782
877
|
}
|
|
783
|
-
function
|
|
878
|
+
function On(e) {
|
|
784
879
|
return u("openAddCustomEmoji", {}, e, { since: "4.4.0", queue: "serial" });
|
|
785
880
|
}
|
|
786
|
-
function
|
|
787
|
-
|
|
881
|
+
function Tn(e) {
|
|
882
|
+
if (!e.serverId)
|
|
883
|
+
return s("openCommentPanel", "serverId is required", e);
|
|
884
|
+
if (!e.dynamicId)
|
|
885
|
+
return s("openCommentPanel", "dynamicId is required", e);
|
|
886
|
+
const t = Bn(e);
|
|
887
|
+
return u(
|
|
788
888
|
"openCommentPanel",
|
|
789
889
|
{
|
|
790
890
|
serverId: e.serverId,
|
|
@@ -794,139 +894,149 @@ function lt(e) {
|
|
|
794
894
|
},
|
|
795
895
|
e,
|
|
796
896
|
{ since: "4.4.0", queue: "serial" }
|
|
797
|
-
)
|
|
897
|
+
).catch((n) => {
|
|
898
|
+
throw t(), n;
|
|
899
|
+
});
|
|
900
|
+
}
|
|
901
|
+
let j;
|
|
902
|
+
function Bn(e) {
|
|
903
|
+
j == null || j();
|
|
904
|
+
const { onChange: t } = e;
|
|
905
|
+
let n;
|
|
906
|
+
const r = () => n == null ? void 0 : n();
|
|
907
|
+
return t && (n = y("onCommentPanelChange", (i) => t(i), { since: "4.4.0" })), j = r, r;
|
|
798
908
|
}
|
|
799
|
-
function
|
|
909
|
+
function Nn(e) {
|
|
800
910
|
return u("showLongVipDesDialog", {}, e, { since: "4.4.0", queue: "serial" });
|
|
801
911
|
}
|
|
802
|
-
function
|
|
803
|
-
return e.index === void 0 ?
|
|
912
|
+
function Dn(e) {
|
|
913
|
+
return e.index === void 0 ? s("voteAction", "index is required", e) : u("voteAction", e, e, { since: "4.4.0", queue: "serial" });
|
|
804
914
|
}
|
|
805
|
-
function
|
|
806
|
-
return Array.isArray(e.selectedUserIds) ?
|
|
915
|
+
function Mn(e) {
|
|
916
|
+
return Array.isArray(e.selectedUserIds) ? p("4.4.0") ? Ln(e) : u("openFriendsList", { selectedUserIds: e.selectedUserIds }, e, {
|
|
807
917
|
queue: "serial",
|
|
808
|
-
transformResult:
|
|
809
|
-
}) :
|
|
918
|
+
transformResult: Je
|
|
919
|
+
}) : s("openFriendsList", "selectedUserIds is required", e);
|
|
810
920
|
}
|
|
811
|
-
function
|
|
812
|
-
const
|
|
813
|
-
return { selectedList: Array.isArray(
|
|
921
|
+
function Je(e) {
|
|
922
|
+
const t = k(e) ? e.selectedList : void 0;
|
|
923
|
+
return { selectedList: Array.isArray(t) ? t : [] };
|
|
814
924
|
}
|
|
815
|
-
function
|
|
816
|
-
let
|
|
817
|
-
const
|
|
818
|
-
|
|
925
|
+
function Ln(e) {
|
|
926
|
+
let t;
|
|
927
|
+
const n = y("submitFriendsList", (r) => {
|
|
928
|
+
t = r;
|
|
819
929
|
}, { since: "4.4.0" });
|
|
820
930
|
return u("openFriendsList", { selectedUserIds: e.selectedUserIds }, e, {
|
|
821
931
|
legacyOnly: !0,
|
|
822
|
-
jsbridge: { result: () =>
|
|
823
|
-
}).finally(() =>
|
|
932
|
+
jsbridge: { result: () => Je(t) }
|
|
933
|
+
}).finally(() => n());
|
|
824
934
|
}
|
|
825
|
-
function
|
|
826
|
-
return e.gameName ? e.serverId ? u("pointsMallBindGame", e, e, { since: "4.4.0", queue: "serial" }) :
|
|
935
|
+
function $n(e) {
|
|
936
|
+
return e.gameName ? e.serverId ? u("pointsMallBindGame", e, e, { since: "4.4.0", queue: "serial" }) : s("toBindGameRole", "serverId is required", e) : s("toBindGameRole", "gameName is required", e);
|
|
827
937
|
}
|
|
828
|
-
function
|
|
938
|
+
function jn(e) {
|
|
829
939
|
return u("bindGameRoleSuccess", {}, e, { since: "4.4.0" });
|
|
830
940
|
}
|
|
831
|
-
function
|
|
832
|
-
return e.type === void 0 ?
|
|
941
|
+
function xn(e) {
|
|
942
|
+
return e.type === void 0 ? s("showAd", "type is required", e) : (Un(e), u("showAdVideo", { type: e.type, params: e.params }, e, {
|
|
833
943
|
since: "4.4.0",
|
|
834
944
|
queue: "serial"
|
|
835
945
|
}));
|
|
836
946
|
}
|
|
837
|
-
const
|
|
838
|
-
function
|
|
839
|
-
var
|
|
840
|
-
const { onFinished:
|
|
841
|
-
if (!
|
|
842
|
-
const
|
|
843
|
-
(d =
|
|
947
|
+
const x = /* @__PURE__ */ new Map();
|
|
948
|
+
function Un(e) {
|
|
949
|
+
var c, d;
|
|
950
|
+
const { onFinished: t } = e;
|
|
951
|
+
if (!t) return;
|
|
952
|
+
const n = (c = e.params) == null ? void 0 : c.module, r = n === void 0 ? void 0 : String(n);
|
|
953
|
+
(d = x.get(r)) == null || d();
|
|
844
954
|
let i;
|
|
845
955
|
const o = () => {
|
|
846
|
-
i == null || i(),
|
|
956
|
+
i == null || i(), x.get(r) === o && x.delete(r);
|
|
847
957
|
};
|
|
848
|
-
i =
|
|
849
|
-
r !== void 0 && String(a == null ? void 0 : a.module) !== r || (o(),
|
|
850
|
-
}, { since: "4.4.0" }),
|
|
958
|
+
i = y("onAdFinished", (a) => {
|
|
959
|
+
r !== void 0 && String(a == null ? void 0 : a.module) !== r || (o(), t(a));
|
|
960
|
+
}, { since: "4.4.0" }), x.set(r, o);
|
|
851
961
|
}
|
|
852
|
-
function
|
|
853
|
-
return e.type ? u("updateData", { type: e.type, params: e.params }, e, { since: "4.4.0" }) :
|
|
962
|
+
function Hn(e) {
|
|
963
|
+
return e.type ? u("updateData", { type: e.type, params: e.params }, e, { since: "4.4.0" }) : s("updateData", "type is required", e);
|
|
854
964
|
}
|
|
855
|
-
function
|
|
965
|
+
function Fn(e) {
|
|
856
966
|
if (!e.user_id)
|
|
857
|
-
return
|
|
967
|
+
return s("openGiftBag", "user_id is required", e);
|
|
858
968
|
if (!e.server_id)
|
|
859
|
-
return
|
|
860
|
-
const
|
|
969
|
+
return s("openGiftBag", "server_id is required", e);
|
|
970
|
+
const t = Wn(e);
|
|
861
971
|
return u(
|
|
862
972
|
"openGiftBag",
|
|
863
973
|
{ user_id: e.user_id, openBag: e.openBag, server_id: e.server_id },
|
|
864
974
|
e,
|
|
865
975
|
{ since: "4.4.0", queue: "serial" }
|
|
866
|
-
).catch((
|
|
867
|
-
throw
|
|
976
|
+
).catch((n) => {
|
|
977
|
+
throw t(), n;
|
|
868
978
|
});
|
|
869
979
|
}
|
|
870
|
-
let
|
|
871
|
-
function
|
|
872
|
-
|
|
873
|
-
const { onSent:
|
|
874
|
-
let
|
|
875
|
-
const r = () =>
|
|
876
|
-
return
|
|
980
|
+
let U;
|
|
981
|
+
function Wn(e) {
|
|
982
|
+
U == null || U();
|
|
983
|
+
const { onSent: t } = e;
|
|
984
|
+
let n;
|
|
985
|
+
const r = () => n == null ? void 0 : n();
|
|
986
|
+
return t && (n = y("openGiftBag", (i) => t(i), { since: "4.4.0" })), U = r, r;
|
|
877
987
|
}
|
|
878
|
-
function
|
|
879
|
-
|
|
988
|
+
function Gn(e) {
|
|
989
|
+
He("getMemberActivate", e, "4.4.0");
|
|
880
990
|
}
|
|
881
|
-
function
|
|
882
|
-
|
|
991
|
+
function Vn() {
|
|
992
|
+
St("getMemberActivate", "4.4.0");
|
|
883
993
|
}
|
|
884
|
-
const
|
|
994
|
+
const Jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
885
995
|
__proto__: null,
|
|
886
|
-
bindGameRoleSuccess:
|
|
887
|
-
getCurrentCircleInfo:
|
|
888
|
-
getToken:
|
|
889
|
-
login:
|
|
890
|
-
offMemberActivate:
|
|
891
|
-
onMemberActivate:
|
|
892
|
-
openAddCustomEmoji:
|
|
893
|
-
openCommentPanel:
|
|
894
|
-
openFriendsList:
|
|
895
|
-
openGiftBag:
|
|
896
|
-
shareImage:
|
|
897
|
-
shareWebCard:
|
|
898
|
-
showAd:
|
|
899
|
-
showLongVipDesDialog:
|
|
900
|
-
toBindGameRole:
|
|
901
|
-
updateData:
|
|
902
|
-
voteAction:
|
|
903
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
904
|
-
function
|
|
905
|
-
if (window.location.href = e, !
|
|
906
|
-
let
|
|
996
|
+
bindGameRoleSuccess: jn,
|
|
997
|
+
getCurrentCircleInfo: An,
|
|
998
|
+
getToken: Cn,
|
|
999
|
+
login: kn,
|
|
1000
|
+
offMemberActivate: Vn,
|
|
1001
|
+
onMemberActivate: Gn,
|
|
1002
|
+
openAddCustomEmoji: On,
|
|
1003
|
+
openCommentPanel: Tn,
|
|
1004
|
+
openFriendsList: Mn,
|
|
1005
|
+
openGiftBag: Fn,
|
|
1006
|
+
shareImage: Rn,
|
|
1007
|
+
shareWebCard: qn,
|
|
1008
|
+
showAd: xn,
|
|
1009
|
+
showLongVipDesDialog: Nn,
|
|
1010
|
+
toBindGameRole: $n,
|
|
1011
|
+
updateData: Hn,
|
|
1012
|
+
voteAction: Dn
|
|
1013
|
+
}, Symbol.toStringTag, { value: "Module" })), zn = "community-open-app", Kn = "https://app.docoi.cc/open-app", Yn = /quark|qqbrowser|ucbrowser/, Xn = 2e3;
|
|
1014
|
+
function Qn(e, t) {
|
|
1015
|
+
if (window.location.href = e, !t) return;
|
|
1016
|
+
let n = !1;
|
|
907
1017
|
const r = () => {
|
|
908
|
-
|
|
1018
|
+
n || (n = !0, window.removeEventListener("pagehide", r), document.removeEventListener("visibilitychange", i));
|
|
909
1019
|
}, i = () => {
|
|
910
1020
|
document.hidden && r();
|
|
911
1021
|
};
|
|
912
1022
|
window.addEventListener("pagehide", r), document.addEventListener("visibilitychange", i), setTimeout(() => {
|
|
913
|
-
|
|
914
|
-
},
|
|
1023
|
+
n || (r(), t());
|
|
1024
|
+
}, Xn);
|
|
915
1025
|
}
|
|
916
|
-
function
|
|
917
|
-
if (
|
|
918
|
-
window.parent.postMessage({ type:
|
|
1026
|
+
function Zn(e, t) {
|
|
1027
|
+
if (It()) {
|
|
1028
|
+
window.parent.postMessage({ type: zn, params: e.query }, "*");
|
|
919
1029
|
return;
|
|
920
1030
|
}
|
|
921
|
-
const
|
|
922
|
-
if (
|
|
1031
|
+
const n = navigator.userAgent.toLowerCase(), r = n.includes("micromessenger") || n.includes("qq/");
|
|
1032
|
+
if (Ue() === "ios" && !r && !Yn.test(n)) {
|
|
923
1033
|
const i = e.url.includes("?") ? e.url.slice(e.url.indexOf("?")) : "";
|
|
924
|
-
window.location.href = `${
|
|
1034
|
+
window.location.href = `${Kn}${i}`;
|
|
925
1035
|
return;
|
|
926
1036
|
}
|
|
927
|
-
|
|
1037
|
+
Qn(e.url, t);
|
|
928
1038
|
}
|
|
929
|
-
const
|
|
1039
|
+
const Ce = "daoke://", ze = {
|
|
930
1040
|
joinCirclePage: {
|
|
931
1041
|
type: 1,
|
|
932
1042
|
name: "查询圈子并加入",
|
|
@@ -1014,7 +1124,7 @@ const ve = "daoke://", xe = {
|
|
|
1014
1124
|
since: "4.1.0",
|
|
1015
1125
|
fields: {
|
|
1016
1126
|
userId: { key: "userId", required: !0 },
|
|
1017
|
-
nickName: { key: "nickName"
|
|
1127
|
+
nickName: { key: "nickName" }
|
|
1018
1128
|
}
|
|
1019
1129
|
},
|
|
1020
1130
|
browseHistoryPage: { type: 26, name: "浏览记录", since: "4.4.0", fields: {} },
|
|
@@ -1072,7 +1182,7 @@ const ve = "daoke://", xe = {
|
|
|
1072
1182
|
publishType: { key: "publishType" }
|
|
1073
1183
|
}
|
|
1074
1184
|
}
|
|
1075
|
-
},
|
|
1185
|
+
}, er = {
|
|
1076
1186
|
type: 18,
|
|
1077
1187
|
name: "底部 tab",
|
|
1078
1188
|
since: "3.7.0",
|
|
@@ -1082,7 +1192,7 @@ const ve = "daoke://", xe = {
|
|
|
1082
1192
|
subTab: { key: "subTab", enum: { friends: "1_0", square: "1_1", comic: "1_2" } },
|
|
1083
1193
|
fromMbtiShare: { key: "form_mbti_share", bool: !0 }
|
|
1084
1194
|
}
|
|
1085
|
-
},
|
|
1195
|
+
}, tr = {
|
|
1086
1196
|
type: 5,
|
|
1087
1197
|
name: "Webview",
|
|
1088
1198
|
fields: {
|
|
@@ -1090,271 +1200,285 @@ const ve = "daoke://", xe = {
|
|
|
1090
1200
|
type: { key: "h5Type", required: !0, enum: { normal: "1", mini: "2", dynamic: "3", immersive: "4" } },
|
|
1091
1201
|
isUpdateApp: { key: "isUpdateApp", bool: !0 }
|
|
1092
1202
|
}
|
|
1093
|
-
},
|
|
1203
|
+
}, nr = {
|
|
1094
1204
|
type: 23,
|
|
1095
1205
|
name: "纯透明 H5",
|
|
1096
1206
|
since: "3.8.0",
|
|
1097
1207
|
fields: { url: { key: "url", required: !0 } }
|
|
1098
|
-
},
|
|
1099
|
-
...
|
|
1100
|
-
tab:
|
|
1101
|
-
webview:
|
|
1102
|
-
transparentWebview:
|
|
1103
|
-
},
|
|
1104
|
-
Object.keys(
|
|
1208
|
+
}, _ = {
|
|
1209
|
+
...ze,
|
|
1210
|
+
tab: er,
|
|
1211
|
+
webview: tr,
|
|
1212
|
+
transparentWebview: nr
|
|
1213
|
+
}, rr = Object.fromEntries(
|
|
1214
|
+
Object.keys(_).map((e) => [String(_[e].type), e])
|
|
1105
1215
|
);
|
|
1106
|
-
function
|
|
1107
|
-
const
|
|
1108
|
-
return
|
|
1216
|
+
function ir(e) {
|
|
1217
|
+
const t = rr[e];
|
|
1218
|
+
return t ? { key: t, route: _[t] } : void 0;
|
|
1109
1219
|
}
|
|
1110
|
-
const
|
|
1111
|
-
class
|
|
1220
|
+
const Ke = "daoke://page";
|
|
1221
|
+
class b extends Error {
|
|
1112
1222
|
}
|
|
1113
|
-
function
|
|
1114
|
-
const
|
|
1223
|
+
function H(e, t = {}) {
|
|
1224
|
+
const n = { type: String(e.type) };
|
|
1115
1225
|
for (const [r, i] of Object.entries(e.fields)) {
|
|
1116
|
-
const o =
|
|
1226
|
+
const o = t[r];
|
|
1117
1227
|
if (o == null || o === "") {
|
|
1118
|
-
if (i.required) throw new
|
|
1228
|
+
if (i.required) throw new b(`${r} is required`);
|
|
1119
1229
|
continue;
|
|
1120
1230
|
}
|
|
1121
1231
|
if (i.enum) {
|
|
1122
|
-
const
|
|
1123
|
-
if (
|
|
1124
|
-
|
|
1232
|
+
const c = i.enum[String(o)];
|
|
1233
|
+
if (c === void 0) throw new b(`${r} must be one of ${Object.keys(i.enum).join(" / ")}`);
|
|
1234
|
+
n[i.key] = c;
|
|
1125
1235
|
} else if (i.bool)
|
|
1126
|
-
|
|
1236
|
+
n[i.key] = o ? "true" : "false";
|
|
1127
1237
|
else {
|
|
1128
|
-
if (
|
|
1129
|
-
throw new
|
|
1130
|
-
|
|
1238
|
+
if (k(o))
|
|
1239
|
+
throw new b(`${r} must be a string or number`);
|
|
1240
|
+
n[i.key] = String(o);
|
|
1131
1241
|
}
|
|
1132
1242
|
}
|
|
1133
|
-
return
|
|
1134
|
-
}
|
|
1135
|
-
function
|
|
1136
|
-
const
|
|
1137
|
-
return { url: `${
|
|
1138
|
-
}
|
|
1139
|
-
function
|
|
1140
|
-
if (!
|
|
1141
|
-
const
|
|
1142
|
-
if (
|
|
1143
|
-
const
|
|
1144
|
-
for (const r of e.slice(
|
|
1243
|
+
return n;
|
|
1244
|
+
}
|
|
1245
|
+
function F(e) {
|
|
1246
|
+
const t = Object.entries(e).map(([n, r]) => `${encodeURIComponent(n)}=${encodeURIComponent(r)}`).join("&");
|
|
1247
|
+
return { url: `${Ke}?${t}`, query: e };
|
|
1248
|
+
}
|
|
1249
|
+
function Ye(e) {
|
|
1250
|
+
if (!l(e) || !e.startsWith(Ke)) return null;
|
|
1251
|
+
const t = e.indexOf("?");
|
|
1252
|
+
if (t < 0) return null;
|
|
1253
|
+
const n = {};
|
|
1254
|
+
for (const r of e.slice(t + 1).split("&")) {
|
|
1145
1255
|
if (!r) continue;
|
|
1146
|
-
const i = r.indexOf("="), o =
|
|
1147
|
-
o && !(o in
|
|
1256
|
+
const i = r.indexOf("="), o = ye(i < 0 ? r : r.slice(0, i));
|
|
1257
|
+
o && !(o in n) && (n[o] = i < 0 ? "" : ye(r.slice(i + 1)));
|
|
1148
1258
|
}
|
|
1149
|
-
return
|
|
1259
|
+
return n.type && /^\d+$/.test(n.type) ? n : null;
|
|
1150
1260
|
}
|
|
1151
|
-
function
|
|
1261
|
+
function or(e) {
|
|
1152
1262
|
return "type" in e && !("url" in e);
|
|
1153
1263
|
}
|
|
1154
|
-
function
|
|
1155
|
-
if (!
|
|
1264
|
+
function ur(e) {
|
|
1265
|
+
if (!k(e == null ? void 0 : e.params)) throw new b("params is required");
|
|
1156
1266
|
switch (e.api) {
|
|
1157
1267
|
case "switchTab":
|
|
1158
|
-
return
|
|
1268
|
+
return F(H(_.tab, { ...e.params.params, tab: e.params.tab }));
|
|
1159
1269
|
case "openWebview": {
|
|
1160
|
-
const { url:
|
|
1161
|
-
if (!
|
|
1162
|
-
if (
|
|
1163
|
-
if (!
|
|
1164
|
-
if (r && Object.keys(r).length) throw new
|
|
1165
|
-
return
|
|
1270
|
+
const { url: t, type: n = "normal", params: r } = e.params;
|
|
1271
|
+
if (!t || !l(t)) throw new b("url is required");
|
|
1272
|
+
if (n !== "transparent") return F(H(_.webview, { ...r, url: t, type: n }));
|
|
1273
|
+
if (!t.startsWith("https://")) throw new b("transparent webview url must be https");
|
|
1274
|
+
if (r && Object.keys(r).length) throw new b("transparent webview does not support params");
|
|
1275
|
+
return F(H(_.transparentWebview, { url: t }));
|
|
1166
1276
|
}
|
|
1167
1277
|
case "navigateTo": {
|
|
1168
|
-
if (
|
|
1169
|
-
const
|
|
1170
|
-
if (!
|
|
1171
|
-
return
|
|
1278
|
+
if (or(e.params)) {
|
|
1279
|
+
const n = ze[e.params.type];
|
|
1280
|
+
if (!n) throw new b(`unknown page type: ${String(e.params.type)}`);
|
|
1281
|
+
return F(H(n, e.params.params));
|
|
1172
1282
|
}
|
|
1173
|
-
const
|
|
1174
|
-
if (!
|
|
1175
|
-
return { url: e.params.url, query:
|
|
1283
|
+
const t = Ye(e.params.url);
|
|
1284
|
+
if (!t) throw new b("url or type is required, url must be a daoke://page?type= link");
|
|
1285
|
+
return { url: e.params.url, query: t };
|
|
1176
1286
|
}
|
|
1177
1287
|
default:
|
|
1178
|
-
throw new
|
|
1288
|
+
throw new b("unknown navigation api");
|
|
1179
1289
|
}
|
|
1180
1290
|
}
|
|
1181
|
-
const
|
|
1291
|
+
const M = "4.4.0", sr = 11, cr = {
|
|
1182
1292
|
dynamicPublishPage: { page: 7, params: (e) => ({ server_id: e.serverId, channel_id: e.channelId }) },
|
|
1183
1293
|
profileEditPage: { page: 10 },
|
|
1184
1294
|
douyinMallPage: { page: 14 },
|
|
1185
1295
|
likeListPage: { page: 15, params: (e) => ({ dynamicId: e.dynamicId, publishType: e.publishType }) },
|
|
1186
1296
|
adPage: { page: 16, params: (e) => ({ url: e.url }) }
|
|
1187
|
-
},
|
|
1297
|
+
}, dr = {
|
|
1188
1298
|
bindGamePage: { method: "pointsMallBindGame", data: (e) => ({ gameName: e.gameName, serverId: e.serverId }) },
|
|
1189
1299
|
addCustomEmojiPage: { method: "openAddCustomEmoji", data: () => ({}) }
|
|
1190
1300
|
};
|
|
1191
|
-
function
|
|
1301
|
+
function lr(e, t) {
|
|
1192
1302
|
var r, i, o;
|
|
1193
|
-
const
|
|
1194
|
-
if (
|
|
1195
|
-
const
|
|
1196
|
-
if (
|
|
1197
|
-
const d =
|
|
1303
|
+
const n = ir((r = t.type) != null ? r : "");
|
|
1304
|
+
if (n && je(n.route.since)) {
|
|
1305
|
+
const c = dr[n.key];
|
|
1306
|
+
if (c) return { via: "legacyMethod", method: c.method, data: c.data(t) };
|
|
1307
|
+
const d = cr[n.key];
|
|
1198
1308
|
if (!d) {
|
|
1199
|
-
const { name: a, type:
|
|
1200
|
-
return { via: "unsupported", reason: `${a}(type ${
|
|
1309
|
+
const { name: a, type: h, since: P } = n.route;
|
|
1310
|
+
return { via: "unsupported", reason: `${a}(type ${h})需要 App ${P}+` };
|
|
1201
1311
|
}
|
|
1202
|
-
return { via: "redirectPage", page: d.page, params: (o = (i = d.params) == null ? void 0 : i.call(d,
|
|
1312
|
+
return { via: "redirectPage", page: d.page, params: (o = (i = d.params) == null ? void 0 : i.call(d, t)) != null ? o : {} };
|
|
1203
1313
|
}
|
|
1204
|
-
return
|
|
1314
|
+
return Ue() === "ios" ? { via: "redirectPage", page: sr, params: { url: e } } : { via: "locationHref" };
|
|
1205
1315
|
}
|
|
1206
|
-
function
|
|
1207
|
-
return
|
|
1316
|
+
function ar(e, t) {
|
|
1317
|
+
return $e() ? p(M) ? lr(e.url, e.query) : { via: "openScheme", extra: t } : { via: "launchOutsideApp" };
|
|
1208
1318
|
}
|
|
1209
|
-
function
|
|
1210
|
-
switch (
|
|
1319
|
+
function fr(e, t, n, r) {
|
|
1320
|
+
switch (t.via) {
|
|
1211
1321
|
case "launchOutsideApp":
|
|
1212
|
-
return
|
|
1322
|
+
return ne(e, { url: n.url }, () => Zn(n, r == null ? void 0 : r.onLaunchFail), r);
|
|
1213
1323
|
case "openScheme":
|
|
1214
|
-
return u("openScheme", { url:
|
|
1324
|
+
return u("openScheme", { url: n.url, ...t.extra }, r, { queue: "serial" });
|
|
1215
1325
|
case "redirectPage":
|
|
1216
|
-
return u("redirectPage", { page:
|
|
1217
|
-
since:
|
|
1326
|
+
return u("redirectPage", { page: t.page, params: t.params }, r, {
|
|
1327
|
+
since: M,
|
|
1218
1328
|
queue: "serial"
|
|
1219
1329
|
});
|
|
1220
1330
|
case "legacyMethod":
|
|
1221
|
-
return u(
|
|
1331
|
+
return u(t.method, t.data, r, { since: M, queue: "serial" });
|
|
1222
1332
|
case "locationHref":
|
|
1223
|
-
return
|
|
1224
|
-
window.location.href =
|
|
1333
|
+
return ne(e, { url: n.url }, () => {
|
|
1334
|
+
window.location.href = n.url;
|
|
1225
1335
|
}, r);
|
|
1226
1336
|
case "unsupported":
|
|
1227
|
-
return
|
|
1337
|
+
return de(e, t.reason, r);
|
|
1228
1338
|
}
|
|
1229
1339
|
}
|
|
1230
|
-
function
|
|
1231
|
-
const i =
|
|
1232
|
-
return
|
|
1340
|
+
function Xe(e, t, n, r = {}) {
|
|
1341
|
+
const i = ar(t, r);
|
|
1342
|
+
return fr(e, i, t, n);
|
|
1233
1343
|
}
|
|
1234
|
-
function
|
|
1235
|
-
let
|
|
1344
|
+
function ae(e, t) {
|
|
1345
|
+
let n;
|
|
1236
1346
|
try {
|
|
1237
|
-
|
|
1347
|
+
n = ur(e);
|
|
1238
1348
|
} catch (r) {
|
|
1239
|
-
return
|
|
1349
|
+
return s(e.api, r instanceof b ? r.message : String(r), t);
|
|
1240
1350
|
}
|
|
1241
|
-
return
|
|
1351
|
+
return Xe(e.api, n, t);
|
|
1242
1352
|
}
|
|
1243
|
-
function
|
|
1244
|
-
return
|
|
1353
|
+
function gr(e) {
|
|
1354
|
+
return ae({ api: "switchTab", params: e }, e);
|
|
1245
1355
|
}
|
|
1246
|
-
function
|
|
1247
|
-
return
|
|
1356
|
+
function yr(e) {
|
|
1357
|
+
return ae({ api: "navigateTo", params: e }, e);
|
|
1248
1358
|
}
|
|
1249
|
-
function
|
|
1250
|
-
return
|
|
1359
|
+
function hr(e) {
|
|
1360
|
+
return ae({ api: "openWebview", params: e }, e);
|
|
1251
1361
|
}
|
|
1252
|
-
function
|
|
1362
|
+
function br(e) {
|
|
1253
1363
|
var r;
|
|
1254
|
-
const { url:
|
|
1255
|
-
return !
|
|
1364
|
+
const { url: t, params: n } = e != null ? e : {};
|
|
1365
|
+
return !l(t) || !t.startsWith(Ce) ? s("openScheme", `url must start with ${Ce}`, e) : Xe("openScheme", { url: t, query: (r = Ye(t)) != null ? r : {} }, e, n ? { params: n } : {});
|
|
1256
1366
|
}
|
|
1257
|
-
function
|
|
1367
|
+
function wr(e) {
|
|
1258
1368
|
return e != null && e.url ? u("openInExternalBrowser", { url: e.url }, e, {
|
|
1259
|
-
since:
|
|
1369
|
+
since: M,
|
|
1260
1370
|
queue: "serial"
|
|
1261
|
-
}) :
|
|
1371
|
+
}) : s("openInExternalBrowser", "url is required", e);
|
|
1262
1372
|
}
|
|
1263
|
-
function
|
|
1264
|
-
return u("closeWebView", {}, e, { since:
|
|
1373
|
+
function vr(e) {
|
|
1374
|
+
return u("closeWebView", {}, e, { since: M, queue: "serial" });
|
|
1265
1375
|
}
|
|
1266
|
-
const
|
|
1376
|
+
const pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1267
1377
|
__proto__: null,
|
|
1268
|
-
closeWebView:
|
|
1269
|
-
navigateTo:
|
|
1270
|
-
openInExternalBrowser:
|
|
1271
|
-
openScheme:
|
|
1272
|
-
openWebview:
|
|
1273
|
-
switchTab:
|
|
1274
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1275
|
-
...
|
|
1276
|
-
...
|
|
1277
|
-
...
|
|
1278
|
-
setDebug:
|
|
1279
|
-
registerNativeHandler:
|
|
1378
|
+
closeWebView: vr,
|
|
1379
|
+
navigateTo: yr,
|
|
1380
|
+
openInExternalBrowser: wr,
|
|
1381
|
+
openScheme: br,
|
|
1382
|
+
openWebview: hr,
|
|
1383
|
+
switchTab: gr
|
|
1384
|
+
}, Symbol.toStringTag, { value: "Module" })), _r = {
|
|
1385
|
+
...En,
|
|
1386
|
+
...pr,
|
|
1387
|
+
...Jn,
|
|
1388
|
+
setDebug: mt,
|
|
1389
|
+
registerNativeHandler: Fe
|
|
1280
1390
|
};
|
|
1281
1391
|
export {
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1392
|
+
K as BRIDGE_ERROR,
|
|
1393
|
+
_e as CUSTOM,
|
|
1394
|
+
tt as ENV_UNSUPPORTED,
|
|
1395
|
+
Ze as METHOD_NOT_FOUND,
|
|
1396
|
+
Er as NETWORK_ERROR,
|
|
1397
|
+
Ir as NOT_LOGGED_IN,
|
|
1398
|
+
et as PARAMS_ERROR,
|
|
1399
|
+
Sr as PERMISSION_DENIED,
|
|
1400
|
+
kr as RECORD_BUSY,
|
|
1401
|
+
Cr as RECORD_FAILED,
|
|
1402
|
+
Ae as SUCCESS,
|
|
1403
|
+
qe as SYSTEM_EXCEPTION,
|
|
1404
|
+
W as ShareType,
|
|
1405
|
+
Ge as ToastDuration,
|
|
1406
|
+
mr as UNAUTHORIZED,
|
|
1407
|
+
jn as bindGameRoleSuccess,
|
|
1408
|
+
Ft as cancelRecordAudio,
|
|
1409
|
+
zt as checkPermission,
|
|
1410
|
+
Dt as chooseMedia,
|
|
1411
|
+
Zt as clearStorage,
|
|
1412
|
+
vr as closeWebView,
|
|
1413
|
+
Pt as compareVersions,
|
|
1414
|
+
_r as default,
|
|
1415
|
+
L as getAppBaseInfo,
|
|
1416
|
+
bn as getBeforeInfo,
|
|
1417
|
+
Vt as getClipboardData,
|
|
1418
|
+
An as getCurrentCircleInfo,
|
|
1419
|
+
Xt as getStorage,
|
|
1420
|
+
Wt as getSystemInfo,
|
|
1421
|
+
Cn as getToken,
|
|
1422
|
+
hn as h5Loaded,
|
|
1423
|
+
Rt as hideKeyboard,
|
|
1424
|
+
fn as hideNavigationBar,
|
|
1425
|
+
qr as invokeDebug,
|
|
1426
|
+
$e as isInApp,
|
|
1427
|
+
kn as login,
|
|
1428
|
+
yr as navigateTo,
|
|
1429
|
+
Tt as offKeyboardHeightChange,
|
|
1430
|
+
Vn as offMemberActivate,
|
|
1431
|
+
Sn as offPageInvisible,
|
|
1432
|
+
pn as offPageShow,
|
|
1433
|
+
In as offPageVisible,
|
|
1434
|
+
sn as offPullDownRefresh,
|
|
1435
|
+
Ot as onKeyboardHeightChange,
|
|
1436
|
+
Gn as onMemberActivate,
|
|
1437
|
+
mn as onPageInvisible,
|
|
1438
|
+
vn as onPageShow,
|
|
1439
|
+
Pn as onPageVisible,
|
|
1440
|
+
un as onPullDownRefresh,
|
|
1441
|
+
Ar as onRoute,
|
|
1442
|
+
On as openAddCustomEmoji,
|
|
1443
|
+
en as openApp,
|
|
1444
|
+
Tn as openCommentPanel,
|
|
1445
|
+
Mn as openFriendsList,
|
|
1446
|
+
Fn as openGiftBag,
|
|
1447
|
+
wr as openInExternalBrowser,
|
|
1448
|
+
Kt as openPhoneSetting,
|
|
1449
|
+
br as openScheme,
|
|
1450
|
+
hr as openWebview,
|
|
1451
|
+
Bt as previewImage,
|
|
1452
|
+
Nt as previewVideo,
|
|
1453
|
+
Fe as registerNativeHandler,
|
|
1454
|
+
Qt as removeStorage,
|
|
1455
|
+
$t as saveImageToPhotosAlbum,
|
|
1456
|
+
jt as scanCode,
|
|
1457
|
+
wn as setBeforeInfo,
|
|
1458
|
+
Gt as setClipboardData,
|
|
1459
|
+
mt as setDebug,
|
|
1460
|
+
ln as setNavigationBarColor,
|
|
1461
|
+
cn as setNavigationBarTitle,
|
|
1462
|
+
nn as setPullDownRefresh,
|
|
1463
|
+
gn as setStatusBarStyle,
|
|
1464
|
+
Yt as setStorage,
|
|
1465
|
+
Rn as shareImage,
|
|
1466
|
+
qn as shareWebCard,
|
|
1467
|
+
xn as showAd,
|
|
1468
|
+
Nn as showLongVipDesDialog,
|
|
1469
|
+
an as showNavigationBar,
|
|
1470
|
+
yn as showPageName,
|
|
1471
|
+
At as showToast,
|
|
1472
|
+
rn as startPullDownRefresh,
|
|
1473
|
+
Ut as startRecordAudio,
|
|
1474
|
+
on as stopPullDownRefresh,
|
|
1475
|
+
Ht as stopRecordAudio,
|
|
1476
|
+
_t as stopVibrate,
|
|
1477
|
+
tn as swipeBack,
|
|
1478
|
+
gr as switchTab,
|
|
1479
|
+
$n as toBindGameRole,
|
|
1480
|
+
qt as triggerVibrate,
|
|
1481
|
+
Hn as updateData,
|
|
1482
|
+
Mt as uploadFiles,
|
|
1483
|
+
Dn as voteAction
|
|
1360
1484
|
};
|