superapp-miniapp-invoke-native 1.11.0 → 1.11.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/lib/main.js +351 -354
- package/lib/main.umd.cjs +3 -1
- package/package.json +1 -1
package/lib/main.js
CHANGED
|
@@ -1,34 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
/* eslint-disable no-restricted-globals, no-unused-expressions */
|
|
2
|
+
/* global globalThis, AndroidInitialContext */
|
|
3
|
+
var Vr = Object.defineProperty, Hr = Object.defineProperties;
|
|
4
|
+
var Fr = Object.getOwnPropertyDescriptors;
|
|
5
|
+
var qe = Object.getOwnPropertySymbols;
|
|
6
|
+
var Ur = Object.prototype.hasOwnProperty, Wr = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var ve = (t, e, r) => e in t ? Vr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, b = (t, e) => {
|
|
6
8
|
for (var r in e || (e = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var r of
|
|
10
|
-
|
|
9
|
+
Ur.call(e, r) && ve(t, r, e[r]);
|
|
10
|
+
if (qe)
|
|
11
|
+
for (var r of qe(e))
|
|
12
|
+
Wr.call(e, r) && ve(t, r, e[r]);
|
|
11
13
|
return t;
|
|
12
|
-
}, T = (t, e) =>
|
|
13
|
-
var P = (t, e, r) => (
|
|
14
|
+
}, T = (t, e) => Hr(t, Fr(e));
|
|
15
|
+
var P = (t, e, r) => (ve(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
14
16
|
var a = (t, e, r) => new Promise((n, o) => {
|
|
15
17
|
var i = (l) => {
|
|
16
18
|
try {
|
|
17
19
|
s(r.next(l));
|
|
18
|
-
} catch (
|
|
19
|
-
o(
|
|
20
|
+
} catch (d) {
|
|
21
|
+
o(d);
|
|
20
22
|
}
|
|
21
23
|
}, c = (l) => {
|
|
22
24
|
try {
|
|
23
25
|
s(r.throw(l));
|
|
24
|
-
} catch (
|
|
25
|
-
o(
|
|
26
|
+
} catch (d) {
|
|
27
|
+
o(d);
|
|
26
28
|
}
|
|
27
29
|
}, s = (l) => l.done ? n(l.value) : Promise.resolve(l.value).then(i, c);
|
|
28
30
|
s((r = r.apply(t, e)).next());
|
|
29
31
|
});
|
|
30
32
|
/*! Capacitor: https://capacitorjs.com/ - MIT License */
|
|
31
|
-
const
|
|
33
|
+
const Dr = (t) => t.CapacitorPlatforms = ((e) => {
|
|
32
34
|
const r = /* @__PURE__ */ new Map();
|
|
33
35
|
r.set("web", { name: "web" });
|
|
34
36
|
const n = e.CapacitorPlatforms || { currentPlatform: { name: "web" }, platforms: r };
|
|
@@ -37,73 +39,73 @@ const $r = (t) => t.CapacitorPlatforms = ((e) => {
|
|
|
37
39
|
}, n.setPlatform = (o) => {
|
|
38
40
|
n.platforms.has(o) && (n.currentPlatform = n.platforms.get(o));
|
|
39
41
|
}, n;
|
|
40
|
-
})(t), ze =
|
|
42
|
+
})(t), ze = Dr(typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {});
|
|
41
43
|
var $;
|
|
42
44
|
ze.addPlatform, ze.setPlatform, function(t) {
|
|
43
45
|
t.Unimplemented = "UNIMPLEMENTED", t.Unavailable = "UNAVAILABLE";
|
|
44
46
|
}($ || ($ = {}));
|
|
45
|
-
class
|
|
47
|
+
class Le extends Error {
|
|
46
48
|
constructor(e, r, n) {
|
|
47
49
|
super(e), this.message = e, this.code = r, this.data = n;
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
|
-
const
|
|
52
|
+
const xr = (t) => {
|
|
51
53
|
var e, r, n, o, i;
|
|
52
|
-
const c = t.CapacitorCustomPlatform || null, s = t.Capacitor || {}, l = s.Plugins = s.Plugins || {},
|
|
54
|
+
const c = t.CapacitorCustomPlatform || null, s = t.Capacitor || {}, l = s.Plugins = s.Plugins || {}, d = t.CapacitorPlatforms, w = ((e = d == null ? void 0 : d.currentPlatform) === null || e === void 0 ? void 0 : e.getPlatform) || (() => c !== null ? c.name : ((p) => {
|
|
53
55
|
var m, N;
|
|
54
56
|
return p != null && p.androidBridge ? "android" : !((N = (m = p == null ? void 0 : p.webkit) === null || m === void 0 ? void 0 : m.messageHandlers) === null || N === void 0) && N.bridge ? "ios" : "web";
|
|
55
|
-
})(t)), h = ((r =
|
|
57
|
+
})(t)), h = ((r = d == null ? void 0 : d.currentPlatform) === null || r === void 0 ? void 0 : r.isNativePlatform) || (() => w() !== "web"), f = ((n = d == null ? void 0 : d.currentPlatform) === null || n === void 0 ? void 0 : n.isPluginAvailable) || ((p) => {
|
|
56
58
|
const m = I.get(p);
|
|
57
|
-
return !!(m != null && m.platforms.has(
|
|
58
|
-
}),
|
|
59
|
+
return !!(m != null && m.platforms.has(w())) || !!M(p);
|
|
60
|
+
}), M = ((o = d == null ? void 0 : d.currentPlatform) === null || o === void 0 ? void 0 : o.getPluginHeader) || ((p) => {
|
|
59
61
|
var m;
|
|
60
62
|
return (m = s.PluginHeaders) === null || m === void 0 ? void 0 : m.find((N) => N.name === p);
|
|
61
|
-
}), I = /* @__PURE__ */ new Map(),
|
|
63
|
+
}), I = /* @__PURE__ */ new Map(), O = ((i = d == null ? void 0 : d.currentPlatform) === null || i === void 0 ? void 0 : i.registerPlugin) || ((p, m = {}) => {
|
|
62
64
|
const N = I.get(p);
|
|
63
65
|
if (N)
|
|
64
66
|
return console.warn(`Capacitor plugin "${p}" already registered. Cannot register plugins twice.`), N.proxy;
|
|
65
|
-
const
|
|
67
|
+
const v = w(), q = M(p);
|
|
66
68
|
let k;
|
|
67
69
|
const Me = (A) => {
|
|
68
70
|
let R;
|
|
69
|
-
const x = (...
|
|
70
|
-
const
|
|
71
|
-
return !k &&
|
|
71
|
+
const x = (...Y) => {
|
|
72
|
+
const z = (() => a(void 0, null, function* () {
|
|
73
|
+
return !k && v in m ? k = k = typeof m[v] == "function" ? yield m[v]() : m[v] : c !== null && !k && "web" in m && (k = k = typeof m.web == "function" ? yield m.web() : m.web), k;
|
|
72
74
|
}))().then((K) => {
|
|
73
|
-
const je = ((L,
|
|
75
|
+
const je = ((L, G) => {
|
|
74
76
|
var Ce, Oe;
|
|
75
|
-
if (!
|
|
77
|
+
if (!q) {
|
|
76
78
|
if (L)
|
|
77
|
-
return (Oe = L[
|
|
78
|
-
throw new
|
|
79
|
+
return (Oe = L[G]) === null || Oe === void 0 ? void 0 : Oe.bind(L);
|
|
80
|
+
throw new Le(`"${p}" plugin is not implemented on ${v}`, $.Unimplemented);
|
|
79
81
|
}
|
|
80
82
|
{
|
|
81
|
-
const
|
|
82
|
-
if (
|
|
83
|
-
return
|
|
83
|
+
const $e = q == null ? void 0 : q.methods.find((J) => G === J.name);
|
|
84
|
+
if ($e)
|
|
85
|
+
return $e.rtype === "promise" ? (J) => s.nativePromise(p, G.toString(), J) : (J, Br) => s.nativeCallback(p, G.toString(), J, Br);
|
|
84
86
|
if (L)
|
|
85
|
-
return (Ce = L[
|
|
87
|
+
return (Ce = L[G]) === null || Ce === void 0 ? void 0 : Ce.bind(L);
|
|
86
88
|
}
|
|
87
89
|
})(K, A);
|
|
88
90
|
if (je) {
|
|
89
|
-
const L = je(...
|
|
91
|
+
const L = je(...Y);
|
|
90
92
|
return R = L == null ? void 0 : L.remove, L;
|
|
91
93
|
}
|
|
92
|
-
throw new
|
|
94
|
+
throw new Le(`"${p}.${A}()" is not implemented on ${v}`, $.Unimplemented);
|
|
93
95
|
});
|
|
94
|
-
return A === "addListener" && (
|
|
96
|
+
return A === "addListener" && (z.remove = () => a(void 0, null, function* () {
|
|
95
97
|
return R();
|
|
96
|
-
})),
|
|
98
|
+
})), z;
|
|
97
99
|
};
|
|
98
100
|
return x.toString = () => `${A.toString()}() { [capacitor code] }`, Object.defineProperty(x, "name", { value: A, writable: !1, configurable: !1 }), x;
|
|
99
|
-
},
|
|
100
|
-
const x =
|
|
101
|
+
}, De = Me("addListener"), xe = Me("removeListener"), Tr = (A, R) => {
|
|
102
|
+
const x = De({ eventName: A }, R), Y = () => a(void 0, null, function* () {
|
|
101
103
|
const K = yield x;
|
|
102
|
-
|
|
103
|
-
}),
|
|
104
|
-
return
|
|
105
|
-
console.warn("Using addListener() without 'await' is deprecated."), yield
|
|
106
|
-
}),
|
|
104
|
+
xe({ eventName: A, callbackId: K }, R);
|
|
105
|
+
}), z = new Promise((K) => x.then(() => K({ remove: Y })));
|
|
106
|
+
return z.remove = () => a(void 0, null, function* () {
|
|
107
|
+
console.warn("Using addListener() without 'await' is deprecated."), yield Y();
|
|
108
|
+
}), z;
|
|
107
109
|
}, Ie = new Proxy({}, { get(A, R) {
|
|
108
110
|
switch (R) {
|
|
109
111
|
case "$$typeof":
|
|
@@ -111,18 +113,18 @@ const jr = (t) => {
|
|
|
111
113
|
case "toJSON":
|
|
112
114
|
return () => ({});
|
|
113
115
|
case "addListener":
|
|
114
|
-
return
|
|
116
|
+
return q ? Tr : De;
|
|
115
117
|
case "removeListener":
|
|
116
|
-
return
|
|
118
|
+
return xe;
|
|
117
119
|
default:
|
|
118
120
|
return Me(R);
|
|
119
121
|
}
|
|
120
122
|
} });
|
|
121
|
-
return l[p] = Ie, I.set(p, { name: p, proxy: Ie, platforms: /* @__PURE__ */ new Set([...Object.keys(m), ...
|
|
123
|
+
return l[p] = Ie, I.set(p, { name: p, proxy: Ie, platforms: /* @__PURE__ */ new Set([...Object.keys(m), ...q ? [v] : []]) }), Ie;
|
|
122
124
|
});
|
|
123
|
-
return s.convertFileSrc || (s.convertFileSrc = (p) => p), s.getPlatform =
|
|
124
|
-
},
|
|
125
|
-
|
|
125
|
+
return s.convertFileSrc || (s.convertFileSrc = (p) => p), s.getPlatform = w, s.handleError = (p) => t.console.error(p), s.isNativePlatform = h, s.isPluginAvailable = f, s.pluginMethodNoop = (p, m, N) => Promise.reject(`${N} does not have an implementation of "${m}".`), s.registerPlugin = O, s.Exception = Le, s.DEBUG = !!s.DEBUG, s.isLoggingEnabled = !!s.isLoggingEnabled, s.platform = s.getPlatform(), s.isNative = s.isNativePlatform(), s;
|
|
126
|
+
}, jr = (t) => t.Capacitor = xr(t), _ = jr(typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {}), Ue = _.registerPlugin;
|
|
127
|
+
_.Plugins;
|
|
126
128
|
class y {
|
|
127
129
|
constructor(e) {
|
|
128
130
|
this.listeners = {}, this.windowListeners = {}, e && (console.warn(`Capacitor WebPlugin "${e.name}" config object was deprecated in v3 and will be removed in v4.`), this.config = e);
|
|
@@ -159,10 +161,10 @@ class y {
|
|
|
159
161
|
} };
|
|
160
162
|
}
|
|
161
163
|
unimplemented(e = "not implemented") {
|
|
162
|
-
return new
|
|
164
|
+
return new _.Exception(e, $.Unimplemented);
|
|
163
165
|
}
|
|
164
166
|
unavailable(e = "not available") {
|
|
165
|
-
return new
|
|
167
|
+
return new _.Exception(e, $.Unavailable);
|
|
166
168
|
}
|
|
167
169
|
removeListener(e, r) {
|
|
168
170
|
return a(this, null, function* () {
|
|
@@ -180,8 +182,8 @@ class y {
|
|
|
180
182
|
e && (window.removeEventListener(e.windowEventName, e.handler), e.registered = !1);
|
|
181
183
|
}
|
|
182
184
|
}
|
|
183
|
-
const
|
|
184
|
-
class
|
|
185
|
+
const Ke = (t) => encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape), Ge = (t) => t.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
186
|
+
class $r extends y {
|
|
185
187
|
getCookies() {
|
|
186
188
|
return a(this, null, function* () {
|
|
187
189
|
const e = document.cookie, r = {};
|
|
@@ -189,14 +191,14 @@ class Kr extends y {
|
|
|
189
191
|
if (n.length <= 0)
|
|
190
192
|
return;
|
|
191
193
|
let [o, i] = n.replace(/=/, "CAP_COOKIE").split("CAP_COOKIE");
|
|
192
|
-
o =
|
|
194
|
+
o = Ge(o).trim(), i = Ge(i).trim(), r[o] = i;
|
|
193
195
|
}), r;
|
|
194
196
|
});
|
|
195
197
|
}
|
|
196
198
|
setCookie(e) {
|
|
197
199
|
return a(this, null, function* () {
|
|
198
200
|
try {
|
|
199
|
-
const r =
|
|
201
|
+
const r = Ke(e.key), n = Ke(e.value), o = `; expires=${(e.expires || "").replace("expires=", "")}`, i = (e.path || "/").replace("path=", ""), c = e.url != null && e.url.length > 0 ? `domain=${e.url}` : "";
|
|
200
202
|
document.cookie = `${r}=${n || ""}${o}; path=${i}; ${c};`;
|
|
201
203
|
} catch (r) {
|
|
202
204
|
return Promise.reject(r);
|
|
@@ -233,8 +235,8 @@ class Kr extends y {
|
|
|
233
235
|
});
|
|
234
236
|
}
|
|
235
237
|
}
|
|
236
|
-
Ue("CapacitorCookies", { web: () => new
|
|
237
|
-
const
|
|
238
|
+
Ue("CapacitorCookies", { web: () => new $r() });
|
|
239
|
+
const qr = (t, e = {}) => {
|
|
238
240
|
const r = Object.assign({ method: t.method || "GET", headers: t.headers }, e), n = ((o = {}) => {
|
|
239
241
|
const i = Object.keys(o);
|
|
240
242
|
return Object.keys(o).map((c) => c.toLocaleLowerCase()).reduce((c, s, l) => (c[s] = o[i[l]], c), {});
|
|
@@ -262,27 +264,27 @@ const zr = (t, e = {}) => {
|
|
|
262
264
|
(n.includes("application/json") || typeof t.data == "object") && (r.body = JSON.stringify(t.data));
|
|
263
265
|
return r;
|
|
264
266
|
};
|
|
265
|
-
class
|
|
267
|
+
class zr extends y {
|
|
266
268
|
request(e) {
|
|
267
269
|
return a(this, null, function* () {
|
|
268
|
-
const r =
|
|
269
|
-
const [
|
|
270
|
+
const r = qr(e, e.webFetchExtra), n = ((h, f = !0) => h ? Object.entries(h).reduce((M, I) => {
|
|
271
|
+
const [O, p] = I;
|
|
270
272
|
let m, N;
|
|
271
|
-
return Array.isArray(p) ? (N = "", p.forEach((
|
|
272
|
-
m =
|
|
273
|
-
}), N.slice(0, -1)) : (m =
|
|
273
|
+
return Array.isArray(p) ? (N = "", p.forEach((v) => {
|
|
274
|
+
m = f ? encodeURIComponent(v) : v, N += `${O}=${m}&`;
|
|
275
|
+
}), N.slice(0, -1)) : (m = f ? encodeURIComponent(p) : p, N = `${O}=${m}`), `${M}&${N}`;
|
|
274
276
|
}, "").substr(1) : null)(e.params, e.shouldEncodeUrlParams), o = n ? `${e.url}?${n}` : e.url, i = yield fetch(o, r), c = i.headers.get("content-type") || "";
|
|
275
|
-
let s, l, { responseType:
|
|
276
|
-
switch (c.includes("application/json") && (
|
|
277
|
+
let s, l, { responseType: d = "text" } = i.ok ? e : {};
|
|
278
|
+
switch (c.includes("application/json") && (d = "json"), d) {
|
|
277
279
|
case "arraybuffer":
|
|
278
280
|
case "blob":
|
|
279
281
|
l = yield i.blob(), s = yield ((h) => a(this, null, function* () {
|
|
280
|
-
return new Promise((
|
|
282
|
+
return new Promise((f, M) => {
|
|
281
283
|
const I = new FileReader();
|
|
282
284
|
I.onload = () => {
|
|
283
|
-
const
|
|
284
|
-
|
|
285
|
-
}, I.onerror = (
|
|
285
|
+
const O = I.result;
|
|
286
|
+
f(O.indexOf(",") >= 0 ? O.split(",")[1] : O);
|
|
287
|
+
}, I.onerror = (O) => M(O), I.readAsDataURL(h);
|
|
286
288
|
});
|
|
287
289
|
}))(l);
|
|
288
290
|
break;
|
|
@@ -292,10 +294,10 @@ class Gr extends y {
|
|
|
292
294
|
default:
|
|
293
295
|
s = yield i.text();
|
|
294
296
|
}
|
|
295
|
-
const
|
|
296
|
-
return i.headers.forEach((h,
|
|
297
|
-
|
|
298
|
-
}), { data: s, headers:
|
|
297
|
+
const w = {};
|
|
298
|
+
return i.headers.forEach((h, f) => {
|
|
299
|
+
w[f] = h;
|
|
300
|
+
}), { data: s, headers: w, status: i.status, url: i.url };
|
|
299
301
|
});
|
|
300
302
|
}
|
|
301
303
|
get(e) {
|
|
@@ -325,13 +327,13 @@ class Gr extends y {
|
|
|
325
327
|
}
|
|
326
328
|
}
|
|
327
329
|
function Ae() {
|
|
328
|
-
return
|
|
330
|
+
return _.getPlatform() === "android" ? JSON.parse(AndroidInitialContext.initialContext()) : window.portalInitialContext;
|
|
329
331
|
}
|
|
330
|
-
Ue("CapacitorHttp", { web: () => new
|
|
332
|
+
Ue("CapacitorHttp", { web: () => new zr() }), /*! Ionic Portals: https://ionic.io/portals - Commercial License */
|
|
331
333
|
Ue("Portals", { web: () => Promise.resolve().then(function() {
|
|
332
|
-
return
|
|
334
|
+
return Kr;
|
|
333
335
|
}).then((t) => new t.PortalsWeb()) });
|
|
334
|
-
const
|
|
336
|
+
const Kr = Object.freeze({ __proto__: null, PortalsWeb: class extends y {
|
|
335
337
|
publishNative(t) {
|
|
336
338
|
return a(this, null, function* () {
|
|
337
339
|
});
|
|
@@ -353,7 +355,7 @@ const Jr = Object.freeze({ __proto__: null, PortalsWeb: class extends y {
|
|
|
353
355
|
throw console.error("getInitialContextHandle error", o), o;
|
|
354
356
|
}
|
|
355
357
|
};
|
|
356
|
-
class
|
|
358
|
+
class Gr {
|
|
357
359
|
isNative() {
|
|
358
360
|
try {
|
|
359
361
|
return (() => {
|
|
@@ -428,16 +430,16 @@ class Qr {
|
|
|
428
430
|
});
|
|
429
431
|
}
|
|
430
432
|
}
|
|
431
|
-
const
|
|
433
|
+
const C = () => {
|
|
432
434
|
try {
|
|
433
435
|
let t = {};
|
|
434
436
|
return typeof window != "undefined" && (t = window), t;
|
|
435
437
|
} catch (t) {
|
|
436
438
|
throw console.error("isWinHandle error", t), t;
|
|
437
439
|
}
|
|
438
|
-
}, E = "CommunicatePlugin", g =
|
|
440
|
+
}, E = "CommunicatePlugin", g = _.registerPlugin(E, { web: () => Promise.resolve().then(() => Pt).then((t) => new t.PluginsWeb()) }), te = C();
|
|
439
441
|
te.removeAddListenerFab = () => null;
|
|
440
|
-
const
|
|
442
|
+
const Jr = (t, e) => {
|
|
441
443
|
var r, n;
|
|
442
444
|
try {
|
|
443
445
|
te.removeAddListenerFab && te.removeAddListenerFab();
|
|
@@ -445,8 +447,8 @@ const Yr = (t, e) => {
|
|
|
445
447
|
if ((r = g.showFABMenu) == null || r.call(g, { fabMenu: o, position: null }), !t || !((n = Object.keys(t)) != null && n.length))
|
|
446
448
|
return;
|
|
447
449
|
Object.keys(t).forEach((i) => {
|
|
448
|
-
var c, s, l,
|
|
449
|
-
o.push({ disable: (s = (c = t == null ? void 0 : t[i]) == null ? void 0 : c.disable) != null ? s : !1, icon: (
|
|
450
|
+
var c, s, l, d, w, h, f, M;
|
|
451
|
+
o.push({ disable: (s = (c = t == null ? void 0 : t[i]) == null ? void 0 : c.disable) != null ? s : !1, icon: (d = (l = t == null ? void 0 : t[i]) == null ? void 0 : l.icon) != null ? d : "", id: (h = (w = t == null ? void 0 : t[i]) == null ? void 0 : w.id) != null ? h : "", name: (M = (f = t == null ? void 0 : t[i]) == null ? void 0 : f.title) != null ? M : "" });
|
|
450
452
|
}), queueMicrotask(() => {
|
|
451
453
|
var i;
|
|
452
454
|
(i = g.showFABMenu) == null || i.call(g, { fabMenu: o, position: e != null ? e : null });
|
|
@@ -454,8 +456,8 @@ const Yr = (t, e) => {
|
|
|
454
456
|
((i) => a(void 0, null, function* () {
|
|
455
457
|
i && (te.removeAddListenerFab = yield ((c) => a(void 0, null, function* () {
|
|
456
458
|
try {
|
|
457
|
-
if (
|
|
458
|
-
const s = yield
|
|
459
|
+
if (_.addListener) {
|
|
460
|
+
const s = yield _.addListener(E, "nativeSendFab", (l) => c && c(l));
|
|
459
461
|
return s != null && s.remove ? s.remove : () => null;
|
|
460
462
|
}
|
|
461
463
|
} catch (s) {
|
|
@@ -465,22 +467,22 @@ const Yr = (t, e) => {
|
|
|
465
467
|
}))((i) => {
|
|
466
468
|
let c;
|
|
467
469
|
i != null && i.disable || i != null && i.id && (Object.keys(t).forEach((s) => {
|
|
468
|
-
var l,
|
|
469
|
-
(l = t == null ? void 0 : t[s]) != null && l.id && i.id === t[s].id && (c = (
|
|
470
|
+
var l, d, w;
|
|
471
|
+
(l = t == null ? void 0 : t[s]) != null && l.id && i.id === t[s].id && (c = (w = (d = t[s]) == null ? void 0 : d.fn) != null ? w : () => null);
|
|
470
472
|
}), typeof c == "function" && c());
|
|
471
473
|
});
|
|
472
474
|
});
|
|
473
475
|
} catch (o) {
|
|
474
476
|
throw console.error("fabBtnHandle error", o), o;
|
|
475
477
|
}
|
|
476
|
-
}, B =
|
|
478
|
+
}, B = C();
|
|
477
479
|
B.addListenerBackRemoveHandle = () => null;
|
|
478
|
-
const
|
|
480
|
+
const Je = (t = () => null) => a(void 0, null, function* () {
|
|
479
481
|
try {
|
|
480
482
|
B != null && B.addListenerBackRemoveHandle && typeof B.addListenerBackRemoveHandle == "function" && B.addListenerBackRemoveHandle(), B.addListenerBackRemoveHandle = yield ((e) => a(void 0, null, function* () {
|
|
481
483
|
try {
|
|
482
|
-
if (
|
|
483
|
-
const r = yield
|
|
484
|
+
if (_.addListener) {
|
|
485
|
+
const r = yield _.addListener(E, "nativeSendBack", (n) => e && e(n));
|
|
484
486
|
return r != null && r.remove ? r.remove : () => null;
|
|
485
487
|
}
|
|
486
488
|
} catch (r) {
|
|
@@ -490,7 +492,7 @@ const Qe = (t = () => null) => a(void 0, null, function* () {
|
|
|
490
492
|
} catch (e) {
|
|
491
493
|
throw console.error("initBackBtnFn error", e), e;
|
|
492
494
|
}
|
|
493
|
-
}), ne =
|
|
495
|
+
}), ne = C();
|
|
494
496
|
ne.addListenerHomeHandle = () => null;
|
|
495
497
|
const Zr = (t) => {
|
|
496
498
|
try {
|
|
@@ -498,8 +500,8 @@ const Zr = (t) => {
|
|
|
498
500
|
((e) => a(void 0, null, function* () {
|
|
499
501
|
e && (ne.addListenerHomeHandle = yield ((r) => a(void 0, null, function* () {
|
|
500
502
|
try {
|
|
501
|
-
if (
|
|
502
|
-
const n = yield
|
|
503
|
+
if (_.addListener) {
|
|
504
|
+
const n = yield _.addListener(E, "nativeSendHome", (o) => r && r(o));
|
|
503
505
|
return n != null && n.remove ? n.remove : () => null;
|
|
504
506
|
}
|
|
505
507
|
} catch (n) {
|
|
@@ -511,14 +513,14 @@ const Zr = (t) => {
|
|
|
511
513
|
} catch (e) {
|
|
512
514
|
throw console.error("homeFn error", e), e;
|
|
513
515
|
}
|
|
514
|
-
}, V =
|
|
516
|
+
}, V = C();
|
|
515
517
|
V.addListenerTouchRemoveHandle = () => null;
|
|
516
|
-
const
|
|
518
|
+
const Ze = (t = () => null) => a(void 0, null, function* () {
|
|
517
519
|
try {
|
|
518
520
|
V != null && V.addListenerTouchRemoveHandle && typeof V.addListenerTouchRemoveHandle == "function" && V.addListenerTouchRemoveHandle(), V.addListenerTouchRemoveHandle = yield ((e) => a(void 0, null, function* () {
|
|
519
521
|
try {
|
|
520
|
-
if (
|
|
521
|
-
const r = yield
|
|
522
|
+
if (_.addListener) {
|
|
523
|
+
const r = yield _.addListener(E, "nativeTouchListener", (n) => e && e(n));
|
|
522
524
|
return r != null && r.remove ? r.remove : () => null;
|
|
523
525
|
}
|
|
524
526
|
} catch (r) {
|
|
@@ -528,16 +530,16 @@ const Ye = (t = () => null) => a(void 0, null, function* () {
|
|
|
528
530
|
} catch (e) {
|
|
529
531
|
throw console.error("initTouchFn error", e), e;
|
|
530
532
|
}
|
|
531
|
-
}), H =
|
|
533
|
+
}), H = C();
|
|
532
534
|
H.addListenerSendDeepLinkRemoveHandle = () => null;
|
|
533
|
-
const
|
|
535
|
+
const Xe = (t = () => null) => a(void 0, null, function* () {
|
|
534
536
|
try {
|
|
535
537
|
H != null && H.addListenerSendDeepLinkRemoveHandle && typeof H.addListenerSendDeepLinkRemoveHandle == "function" && H.addListenerSendDeepLinkRemoveHandle(), H.addListenerSendDeepLinkRemoveHandle = yield ((e) => a(void 0, null, function* () {
|
|
536
538
|
try {
|
|
537
539
|
if (window.__MICRO_APP_ENVIRONMENT__)
|
|
538
540
|
return e && window.rawWindow.__mini_app_hook__.getDeeplinkParams(e), { remove: () => null };
|
|
539
|
-
if (
|
|
540
|
-
const r = yield
|
|
541
|
+
if (_.addListener) {
|
|
542
|
+
const r = yield _.addListener(E, "nativeSendDeeplinkCallbackListener", (n) => e && e(n));
|
|
541
543
|
return r != null && r.remove ? r.remove : () => null;
|
|
542
544
|
}
|
|
543
545
|
} catch (r) {
|
|
@@ -547,14 +549,14 @@ const Ze = (t = () => null) => a(void 0, null, function* () {
|
|
|
547
549
|
} catch (e) {
|
|
548
550
|
throw console.error("initTouchFn error", e), e;
|
|
549
551
|
}
|
|
550
|
-
}), F =
|
|
552
|
+
}), F = C();
|
|
551
553
|
F.addListenerSwitchLanguageRemoveHandle = () => null;
|
|
552
|
-
const
|
|
554
|
+
const Ye = (t = () => null) => a(void 0, null, function* () {
|
|
553
555
|
try {
|
|
554
556
|
F != null && F.addListenerSwitchLanguageRemoveHandle && typeof F.addListenerSwitchLanguageRemoveHandle == "function" && F.addListenerSwitchLanguageRemoveHandle(), F.addListenerSwitchLanguageRemoveHandle = yield ((e) => a(void 0, null, function* () {
|
|
555
557
|
try {
|
|
556
|
-
if (
|
|
557
|
-
const r = yield
|
|
558
|
+
if (_.addListener) {
|
|
559
|
+
const r = yield _.addListener(E, "nativeSendSwitchLanguage", (n) => e && e(n));
|
|
558
560
|
return r != null && r.remove ? r.remove : () => null;
|
|
559
561
|
}
|
|
560
562
|
if (window.__MICRO_APP_ENVIRONMENT__)
|
|
@@ -568,14 +570,14 @@ const Xe = (t = () => null) => a(void 0, null, function* () {
|
|
|
568
570
|
} catch (e) {
|
|
569
571
|
throw console.error("initSwitchLanguageFn error", e), e;
|
|
570
572
|
}
|
|
571
|
-
}), U =
|
|
573
|
+
}), U = C();
|
|
572
574
|
U.addListenerSetupMiniAppRemoveHandle = () => null;
|
|
573
|
-
const
|
|
575
|
+
const Qe = (t = () => null) => a(void 0, null, function* () {
|
|
574
576
|
try {
|
|
575
577
|
U != null && U.addListenerSetupMiniAppRemoveHandle && typeof U.addListenerSetupMiniAppRemoveHandle == "function" && U.addListenerSetupMiniAppRemoveHandle(), U.addListenerSetupMiniAppRemoveHandle = yield ((e) => a(void 0, null, function* () {
|
|
576
578
|
try {
|
|
577
|
-
if (
|
|
578
|
-
const r = yield
|
|
579
|
+
if (_.addListener) {
|
|
580
|
+
const r = yield _.addListener(E, "nativeSetupMiniApp", (n) => e && e(n));
|
|
579
581
|
return r != null && r.remove ? r.remove : () => null;
|
|
580
582
|
}
|
|
581
583
|
} catch (r) {
|
|
@@ -585,14 +587,14 @@ const er = (t = () => null) => a(void 0, null, function* () {
|
|
|
585
587
|
} catch (e) {
|
|
586
588
|
throw console.error("initSetupMiniAppFn error", e), e;
|
|
587
589
|
}
|
|
588
|
-
}), W =
|
|
590
|
+
}), W = C();
|
|
589
591
|
W.addListenerSwitchStoreRemoveHandle = () => null;
|
|
590
|
-
const
|
|
592
|
+
const er = (t = () => null) => a(void 0, null, function* () {
|
|
591
593
|
try {
|
|
592
594
|
W != null && W.addListenerSwitchStoreRemoveHandle && typeof W.addListenerSwitchStoreRemoveHandle == "function" && W.addListenerSwitchStoreRemoveHandle(), W.addListenerSwitchStoreRemoveHandle = yield ((e) => a(void 0, null, function* () {
|
|
593
595
|
try {
|
|
594
|
-
if (
|
|
595
|
-
const r = yield
|
|
596
|
+
if (_.addListener) {
|
|
597
|
+
const r = yield _.addListener(E, "nativeSendSwitchStore", (n) => e && e(n));
|
|
596
598
|
return r != null && r.remove ? r.remove : () => null;
|
|
597
599
|
}
|
|
598
600
|
if (window.__MICRO_APP_ENVIRONMENT__)
|
|
@@ -627,9 +629,9 @@ class Xr {
|
|
|
627
629
|
try {
|
|
628
630
|
const { mounted: n, beforeUnmount: o, callBack: i } = r;
|
|
629
631
|
n(() => {
|
|
630
|
-
|
|
632
|
+
Je(i);
|
|
631
633
|
}), o(() => {
|
|
632
|
-
|
|
634
|
+
Je();
|
|
633
635
|
});
|
|
634
636
|
} catch (n) {
|
|
635
637
|
throw console.error("backBtnHandle error", n), n;
|
|
@@ -648,7 +650,7 @@ class Xr {
|
|
|
648
650
|
}
|
|
649
651
|
setFabBtn(e, r) {
|
|
650
652
|
try {
|
|
651
|
-
window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setFabBtn(e, r) :
|
|
653
|
+
window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setFabBtn(e, r) : Jr(e, r);
|
|
652
654
|
} catch (n) {
|
|
653
655
|
throw console.error("setFabBtn error", n), n;
|
|
654
656
|
}
|
|
@@ -659,9 +661,9 @@ class Xr {
|
|
|
659
661
|
try {
|
|
660
662
|
const { mounted: n, beforeUnmount: o, callBack: i } = r;
|
|
661
663
|
n(() => {
|
|
662
|
-
|
|
664
|
+
Ze(i);
|
|
663
665
|
}), o(() => {
|
|
664
|
-
|
|
666
|
+
Ze();
|
|
665
667
|
});
|
|
666
668
|
} catch (n) {
|
|
667
669
|
throw console.error("touchListenerHandle error", n), n;
|
|
@@ -758,9 +760,9 @@ class Xr {
|
|
|
758
760
|
try {
|
|
759
761
|
const { mounted: n, beforeUnmount: o, callBack: i } = r;
|
|
760
762
|
n(() => {
|
|
761
|
-
|
|
763
|
+
Xe(i);
|
|
762
764
|
}), o(() => {
|
|
763
|
-
|
|
765
|
+
Xe();
|
|
764
766
|
});
|
|
765
767
|
} catch (n) {
|
|
766
768
|
throw console.error("sendDeepLinkListenerHandle error", n), n;
|
|
@@ -776,9 +778,9 @@ class Xr {
|
|
|
776
778
|
try {
|
|
777
779
|
const { mounted: n, beforeUnmount: o, callBack: i } = r;
|
|
778
780
|
n(() => {
|
|
779
|
-
|
|
781
|
+
Ye(i);
|
|
780
782
|
}), o(() => {
|
|
781
|
-
|
|
783
|
+
Ye();
|
|
782
784
|
});
|
|
783
785
|
} catch (n) {
|
|
784
786
|
throw console.error("sendSwitchLanguageHandle error", n), n;
|
|
@@ -794,9 +796,9 @@ class Xr {
|
|
|
794
796
|
try {
|
|
795
797
|
const { mounted: n, beforeUnmount: o, callBack: i } = r;
|
|
796
798
|
n(() => {
|
|
797
|
-
|
|
799
|
+
Qe(i);
|
|
798
800
|
}), o(() => {
|
|
799
|
-
|
|
801
|
+
Qe();
|
|
800
802
|
});
|
|
801
803
|
} catch (n) {
|
|
802
804
|
throw console.error("setupMiniAppHandle error", n), n;
|
|
@@ -812,9 +814,9 @@ class Xr {
|
|
|
812
814
|
try {
|
|
813
815
|
const { mounted: n, beforeUnmount: o, callBack: i } = r;
|
|
814
816
|
n(() => {
|
|
815
|
-
|
|
817
|
+
er(i);
|
|
816
818
|
}), o(() => {
|
|
817
|
-
|
|
819
|
+
er();
|
|
818
820
|
});
|
|
819
821
|
} catch (n) {
|
|
820
822
|
throw console.error("sendSwitchStoreHandle error", n), n;
|
|
@@ -862,9 +864,9 @@ class Xr {
|
|
|
862
864
|
}
|
|
863
865
|
}
|
|
864
866
|
let oe = null;
|
|
865
|
-
var
|
|
866
|
-
window.__MICRO_APP_ENVIRONMENT__ && (oe = (
|
|
867
|
-
const Ee =
|
|
867
|
+
var ur;
|
|
868
|
+
window.__MICRO_APP_ENVIRONMENT__ && (oe = (ur = window.rawWindow.__mini_app_status_hook__) != null ? ur : {});
|
|
869
|
+
const Ee = _.registerPlugin("CameraScanPlugin", { web: new class extends y {
|
|
868
870
|
pickCameraScan(t) {
|
|
869
871
|
return a(this, null, function* () {
|
|
870
872
|
return new Promise((e) => {
|
|
@@ -890,7 +892,7 @@ const Ee = d.registerPlugin("CameraScanPlugin", { web: new class extends y {
|
|
|
890
892
|
}
|
|
891
893
|
}() });
|
|
892
894
|
window.removeAddListenerCameraScan = () => null;
|
|
893
|
-
class
|
|
895
|
+
class Yr {
|
|
894
896
|
pickCameraScan(e) {
|
|
895
897
|
return a(this, null, function* () {
|
|
896
898
|
try {
|
|
@@ -920,9 +922,9 @@ class et {
|
|
|
920
922
|
}
|
|
921
923
|
}
|
|
922
924
|
let ae = null;
|
|
923
|
-
var
|
|
924
|
-
window.__MICRO_APP_ENVIRONMENT__ && (ae = (
|
|
925
|
-
const Re =
|
|
925
|
+
var _r;
|
|
926
|
+
window.__MICRO_APP_ENVIRONMENT__ && (ae = (_r = window.rawWindow.__mini_app_status_hook__) != null ? _r : {});
|
|
927
|
+
const Re = _.registerPlugin("CameraScanMultiplePlugin", { web: new class extends y {
|
|
926
928
|
pickCameraScanMultiple() {
|
|
927
929
|
return a(this, null, function* () {
|
|
928
930
|
});
|
|
@@ -944,7 +946,7 @@ const Re = d.registerPlugin("CameraScanMultiplePlugin", { web: new class extends
|
|
|
944
946
|
}
|
|
945
947
|
}
|
|
946
948
|
}() });
|
|
947
|
-
class
|
|
949
|
+
class Qr {
|
|
948
950
|
pickCameraScanMultiple(e) {
|
|
949
951
|
return a(this, null, function* () {
|
|
950
952
|
try {
|
|
@@ -976,7 +978,7 @@ class rt {
|
|
|
976
978
|
let ie = null;
|
|
977
979
|
var hr;
|
|
978
980
|
window.__MICRO_APP_ENVIRONMENT__ && (ie = (hr = window.rawWindow.__mini_app_status_hook__) != null ? hr : {});
|
|
979
|
-
const ke =
|
|
981
|
+
const ke = _.registerPlugin("CameraScanMultipleNoCountPlugin", { web: new class extends y {
|
|
980
982
|
pickCameraScanMultipleNoCount() {
|
|
981
983
|
return a(this, null, function* () {
|
|
982
984
|
});
|
|
@@ -998,7 +1000,7 @@ const ke = d.registerPlugin("CameraScanMultipleNoCountPlugin", { web: new class
|
|
|
998
1000
|
}
|
|
999
1001
|
}
|
|
1000
1002
|
}() });
|
|
1001
|
-
class
|
|
1003
|
+
class et {
|
|
1002
1004
|
pickCameraScanMultipleNoCount(e) {
|
|
1003
1005
|
return a(this, null, function* () {
|
|
1004
1006
|
try {
|
|
@@ -1028,9 +1030,9 @@ class tt {
|
|
|
1028
1030
|
}
|
|
1029
1031
|
}
|
|
1030
1032
|
let se = null;
|
|
1031
|
-
var
|
|
1032
|
-
window.__MICRO_APP_ENVIRONMENT__ && (se = (
|
|
1033
|
-
const be =
|
|
1033
|
+
var pr;
|
|
1034
|
+
window.__MICRO_APP_ENVIRONMENT__ && (se = (pr = window.rawWindow.__mini_app_status_hook__) != null ? pr : {});
|
|
1035
|
+
const be = _.registerPlugin("CameraScanSingleOrDualPlugin", { web: new class extends y {
|
|
1034
1036
|
pickCameraScanSingleOrDual() {
|
|
1035
1037
|
return a(this, null, function* () {
|
|
1036
1038
|
});
|
|
@@ -1052,7 +1054,7 @@ const be = d.registerPlugin("CameraScanSingleOrDualPlugin", { web: new class ext
|
|
|
1052
1054
|
}
|
|
1053
1055
|
}
|
|
1054
1056
|
}() });
|
|
1055
|
-
class
|
|
1057
|
+
class rt {
|
|
1056
1058
|
pickCameraScanSingleOrDual(e) {
|
|
1057
1059
|
return a(this, null, function* () {
|
|
1058
1060
|
try {
|
|
@@ -1081,11 +1083,11 @@ class nt {
|
|
|
1081
1083
|
});
|
|
1082
1084
|
}
|
|
1083
1085
|
}
|
|
1084
|
-
const
|
|
1086
|
+
const Ar = "LaserScanPlugin";
|
|
1085
1087
|
let ce = null;
|
|
1086
|
-
var
|
|
1087
|
-
window.__MICRO_APP_ENVIRONMENT__ && (ce = (
|
|
1088
|
-
const
|
|
1088
|
+
var mr;
|
|
1089
|
+
window.__MICRO_APP_ENVIRONMENT__ && (ce = (mr = window.rawWindow.__mini_app_status_hook__) != null ? mr : {});
|
|
1090
|
+
const Q = _.registerPlugin(Ar, { web: new class extends y {
|
|
1089
1091
|
pickLaserScan() {
|
|
1090
1092
|
return a(this, null, function* () {
|
|
1091
1093
|
});
|
|
@@ -1110,16 +1112,16 @@ const X = d.registerPlugin(Er, { web: new class extends y {
|
|
|
1110
1112
|
throw console.error("laserScan getStatus error", t), t;
|
|
1111
1113
|
}
|
|
1112
1114
|
}
|
|
1113
|
-
}() }), le =
|
|
1115
|
+
}() }), le = C();
|
|
1114
1116
|
le.removeAddListenerLaserScan = () => null;
|
|
1115
|
-
const
|
|
1117
|
+
const rr = (t = () => null) => {
|
|
1116
1118
|
try {
|
|
1117
1119
|
le.removeAddListenerLaserScan && le.removeAddListenerLaserScan();
|
|
1118
1120
|
const e = (r) => a(void 0, null, function* () {
|
|
1119
1121
|
r && (le.removeAddListenerLaserScan = yield ((n) => a(void 0, null, function* () {
|
|
1120
1122
|
try {
|
|
1121
|
-
if (
|
|
1122
|
-
const o = yield
|
|
1123
|
+
if (_.addListener) {
|
|
1124
|
+
const o = yield _.addListener(Ar, "nativeSendLaser", (i) => n && n(i));
|
|
1123
1125
|
return o != null && o.remove ? o.remove : () => null;
|
|
1124
1126
|
}
|
|
1125
1127
|
} catch (o) {
|
|
@@ -1134,14 +1136,14 @@ const tr = (t = () => null) => {
|
|
|
1134
1136
|
throw console.error("laserScanFn error", e), e;
|
|
1135
1137
|
}
|
|
1136
1138
|
};
|
|
1137
|
-
class
|
|
1139
|
+
class tt {
|
|
1138
1140
|
constructor() {
|
|
1139
1141
|
this.pickLaserScan();
|
|
1140
1142
|
}
|
|
1141
1143
|
pickLaserScan() {
|
|
1142
1144
|
return a(this, null, function* () {
|
|
1143
1145
|
try {
|
|
1144
|
-
return yield
|
|
1146
|
+
return yield Q.pickLaserScan({ isContinue: !1 });
|
|
1145
1147
|
} catch (e) {
|
|
1146
1148
|
throw console.error("pickLaserScan error", e), e;
|
|
1147
1149
|
}
|
|
@@ -1150,7 +1152,7 @@ class ot {
|
|
|
1150
1152
|
unPickLaserScan() {
|
|
1151
1153
|
return a(this, null, function* () {
|
|
1152
1154
|
try {
|
|
1153
|
-
return yield
|
|
1155
|
+
return yield Q.unPickLaserScan();
|
|
1154
1156
|
} catch (e) {
|
|
1155
1157
|
throw console.error("unPickLaserScan error", e), e;
|
|
1156
1158
|
}
|
|
@@ -1158,7 +1160,7 @@ class ot {
|
|
|
1158
1160
|
}
|
|
1159
1161
|
setLaserState(e) {
|
|
1160
1162
|
try {
|
|
1161
|
-
|
|
1163
|
+
Q.setLaserState(e);
|
|
1162
1164
|
} catch (r) {
|
|
1163
1165
|
throw console.error("setLaserState error", r), r;
|
|
1164
1166
|
}
|
|
@@ -1168,9 +1170,9 @@ class ot {
|
|
|
1168
1170
|
try {
|
|
1169
1171
|
const { mounted: n, beforeUnmount: o, callBack: i } = r;
|
|
1170
1172
|
n(() => {
|
|
1171
|
-
|
|
1173
|
+
rr(i);
|
|
1172
1174
|
}), o(() => {
|
|
1173
|
-
|
|
1175
|
+
rr();
|
|
1174
1176
|
});
|
|
1175
1177
|
} catch (n) {
|
|
1176
1178
|
throw console.error("laserScanApiParams error", n), n;
|
|
@@ -1180,18 +1182,18 @@ class ot {
|
|
|
1180
1182
|
getStatus() {
|
|
1181
1183
|
return a(this, null, function* () {
|
|
1182
1184
|
try {
|
|
1183
|
-
return yield
|
|
1185
|
+
return yield Q.getStatus();
|
|
1184
1186
|
} catch (e) {
|
|
1185
1187
|
throw console.error("getStatus error", e), e;
|
|
1186
1188
|
}
|
|
1187
1189
|
});
|
|
1188
1190
|
}
|
|
1189
1191
|
}
|
|
1190
|
-
const
|
|
1192
|
+
const Er = "CountAssistPlugin";
|
|
1191
1193
|
let we = null;
|
|
1192
|
-
var
|
|
1193
|
-
window.__MICRO_APP_ENVIRONMENT__ && (we = (
|
|
1194
|
-
const ee =
|
|
1194
|
+
var gr;
|
|
1195
|
+
window.__MICRO_APP_ENVIRONMENT__ && (we = (gr = window.rawWindow.__mini_app_status_hook__) != null ? gr : {});
|
|
1196
|
+
const ee = _.registerPlugin(Er, { web: new class extends y {
|
|
1195
1197
|
setCountAssistState(t) {
|
|
1196
1198
|
return a(this, null, function* () {
|
|
1197
1199
|
try {
|
|
@@ -1237,14 +1239,14 @@ const ee = d.registerPlugin(Rr, { web: new class extends y {
|
|
|
1237
1239
|
throw console.error("countAssist getStatus error", t), t;
|
|
1238
1240
|
}
|
|
1239
1241
|
}
|
|
1240
|
-
}() }), D =
|
|
1242
|
+
}() }), D = C();
|
|
1241
1243
|
D.addListenerCountAssistRemoveHandle = () => null;
|
|
1242
|
-
const
|
|
1244
|
+
const tr = (t = () => null) => a(void 0, null, function* () {
|
|
1243
1245
|
try {
|
|
1244
1246
|
D != null && D.addListenerCountAssistRemoveHandle && typeof D.addListenerCountAssistRemoveHandle == "function" && D.addListenerCountAssistRemoveHandle(), D.addListenerCountAssistRemoveHandle = yield ((e) => a(void 0, null, function* () {
|
|
1245
1247
|
try {
|
|
1246
|
-
if (
|
|
1247
|
-
const r = yield
|
|
1248
|
+
if (_.addListener) {
|
|
1249
|
+
const r = yield _.addListener(Er, "nativeSendCountAssist", (n) => e && e(n));
|
|
1248
1250
|
return r != null && r.remove ? r.remove : () => null;
|
|
1249
1251
|
}
|
|
1250
1252
|
} catch (r) {
|
|
@@ -1255,7 +1257,7 @@ const nr = (t = () => null) => a(void 0, null, function* () {
|
|
|
1255
1257
|
throw console.error("initCountAssistFn error", e), e;
|
|
1256
1258
|
}
|
|
1257
1259
|
});
|
|
1258
|
-
class
|
|
1260
|
+
class nt {
|
|
1259
1261
|
setCountAssistState(e) {
|
|
1260
1262
|
return a(this, null, function* () {
|
|
1261
1263
|
return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.setCountAssistState(e) : yield ee.setCountAssistState(e);
|
|
@@ -1278,9 +1280,9 @@ class at {
|
|
|
1278
1280
|
try {
|
|
1279
1281
|
const { mounted: n, beforeUnmount: o, callBack: i } = r;
|
|
1280
1282
|
n(() => {
|
|
1281
|
-
|
|
1283
|
+
tr(i);
|
|
1282
1284
|
}), o(() => {
|
|
1283
|
-
|
|
1285
|
+
tr();
|
|
1284
1286
|
});
|
|
1285
1287
|
} catch (n) {
|
|
1286
1288
|
throw console.error("setCountAssistBtnHandle error", n), n;
|
|
@@ -1308,9 +1310,9 @@ class at {
|
|
|
1308
1310
|
}
|
|
1309
1311
|
}
|
|
1310
1312
|
let de = null;
|
|
1311
|
-
var
|
|
1312
|
-
window.__MICRO_APP_ENVIRONMENT__ && (de = (
|
|
1313
|
-
const Te =
|
|
1313
|
+
var Pr;
|
|
1314
|
+
window.__MICRO_APP_ENVIRONMENT__ && (de = (Pr = window.rawWindow.__mini_app_status_hook__) != null ? Pr : {});
|
|
1315
|
+
const Te = _.registerPlugin("ClickStreamPlugin", { web: new class extends y {
|
|
1314
1316
|
init() {
|
|
1315
1317
|
return a(this, null, function* () {
|
|
1316
1318
|
return new Promise((t) => {
|
|
@@ -1343,7 +1345,7 @@ const Te = d.registerPlugin("ClickStreamPlugin", { web: new class extends y {
|
|
|
1343
1345
|
}
|
|
1344
1346
|
}
|
|
1345
1347
|
}() });
|
|
1346
|
-
class
|
|
1348
|
+
class ot {
|
|
1347
1349
|
constructor() {
|
|
1348
1350
|
this.init();
|
|
1349
1351
|
}
|
|
@@ -1375,12 +1377,12 @@ class it {
|
|
|
1375
1377
|
});
|
|
1376
1378
|
}
|
|
1377
1379
|
}
|
|
1378
|
-
const
|
|
1380
|
+
const Rr = "MiniAppLifecyclePlugin";
|
|
1379
1381
|
let ue = null;
|
|
1380
|
-
var
|
|
1381
|
-
window.__MICRO_APP_ENVIRONMENT__ && (ue = (
|
|
1382
|
-
var
|
|
1383
|
-
const Be =
|
|
1382
|
+
var yr;
|
|
1383
|
+
window.__MICRO_APP_ENVIRONMENT__ && (ue = (yr = window.rawWindow.__mini_app_status_hook__) != null ? yr : {});
|
|
1384
|
+
var Z = ((t) => (t.MINI_APP_BEFORE_UNMOUNT_PERMISSION = "mini_app_before_unmount_permission", t.MINI_APP_BEFORE_UNMOUNT_COMPLETION = "mini_app_before_unmount_completion", t))(Z || {});
|
|
1385
|
+
const Be = _.registerPlugin(Rr, { web: new class extends y {
|
|
1384
1386
|
setNativeUsagePermission() {
|
|
1385
1387
|
return a(this, null, function* () {
|
|
1386
1388
|
});
|
|
@@ -1401,16 +1403,16 @@ const Be = d.registerPlugin(kr, { web: new class extends y {
|
|
|
1401
1403
|
throw console.error("lifecycle getStatus error", t), t;
|
|
1402
1404
|
}
|
|
1403
1405
|
}
|
|
1404
|
-
}() }), _e =
|
|
1406
|
+
}() }), _e = C();
|
|
1405
1407
|
_e.removeAddListenerLifecycleMiniAppBeforeUnmount = () => null;
|
|
1406
|
-
const
|
|
1408
|
+
const nr = (t = () => null) => {
|
|
1407
1409
|
try {
|
|
1408
1410
|
_e.removeAddListenerLifecycleMiniAppBeforeUnmount && _e.removeAddListenerLifecycleMiniAppBeforeUnmount();
|
|
1409
1411
|
const e = (r) => a(void 0, null, function* () {
|
|
1410
1412
|
r && (_e.removeAddListenerLifecycleMiniAppBeforeUnmount = yield ((n) => a(void 0, null, function* () {
|
|
1411
1413
|
try {
|
|
1412
|
-
if (
|
|
1413
|
-
const o = yield
|
|
1414
|
+
if (_.addListener) {
|
|
1415
|
+
const o = yield _.addListener(Rr, "miniAppBeforeUnmount", (i) => n && n(i));
|
|
1414
1416
|
return o != null && o.remove ? o.remove : () => null;
|
|
1415
1417
|
}
|
|
1416
1418
|
} catch (o) {
|
|
@@ -1425,7 +1427,7 @@ const or = (t = () => null) => {
|
|
|
1425
1427
|
throw console.error("laserScanFn error", e), e;
|
|
1426
1428
|
}
|
|
1427
1429
|
};
|
|
1428
|
-
class
|
|
1430
|
+
class at {
|
|
1429
1431
|
constructor() {
|
|
1430
1432
|
}
|
|
1431
1433
|
setNativeUsagePermission(e) {
|
|
@@ -1447,25 +1449,25 @@ class st {
|
|
|
1447
1449
|
});
|
|
1448
1450
|
}
|
|
1449
1451
|
miniAppBeforeUnmount(e) {
|
|
1450
|
-
this.setNativeUsagePermission({ action:
|
|
1452
|
+
this.setNativeUsagePermission({ action: Z.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !0 }), ((r, n) => {
|
|
1451
1453
|
try {
|
|
1452
1454
|
const { mounted: o, beforeUnmount: i, callBack: c } = r;
|
|
1453
1455
|
o(() => {
|
|
1454
|
-
|
|
1456
|
+
nr((s) => a(this, null, function* () {
|
|
1455
1457
|
var l;
|
|
1456
1458
|
if (c && c instanceof Function)
|
|
1457
1459
|
try {
|
|
1458
1460
|
(l = c(s)) == null || l.then(() => a(this, null, function* () {
|
|
1459
|
-
yield n.setNativeUsagePermission({ action:
|
|
1461
|
+
yield n.setNativeUsagePermission({ action: Z.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !1 }), yield n.authorizeWebCallback({ action: Z.MINI_APP_BEFORE_UNMOUNT_COMPLETION });
|
|
1460
1462
|
}));
|
|
1461
|
-
} catch (
|
|
1463
|
+
} catch (d) {
|
|
1462
1464
|
console.error("miniAppBeforeUnmount error callBack is not a function or promise");
|
|
1463
1465
|
}
|
|
1464
1466
|
else
|
|
1465
1467
|
console.error("miniAppBeforeUnmount error callBack is not a function or promise");
|
|
1466
1468
|
}));
|
|
1467
1469
|
}), i(() => a(this, null, function* () {
|
|
1468
|
-
|
|
1470
|
+
nr(), n.setNativeUsagePermission({ action: Z.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !1 });
|
|
1469
1471
|
}));
|
|
1470
1472
|
} catch (o) {
|
|
1471
1473
|
throw console.error("miniAppBeforeUnmount error", o), o;
|
|
@@ -1482,10 +1484,10 @@ class st {
|
|
|
1482
1484
|
});
|
|
1483
1485
|
}
|
|
1484
1486
|
}
|
|
1485
|
-
let
|
|
1486
|
-
var
|
|
1487
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
1488
|
-
const Ve =
|
|
1487
|
+
let he = null;
|
|
1488
|
+
var Sr;
|
|
1489
|
+
window.__MICRO_APP_ENVIRONMENT__ && (he = (Sr = window.rawWindow.__mini_app_status_hook__) != null ? Sr : {});
|
|
1490
|
+
const Ve = _.registerPlugin("DeviceInteractionPlugin", { web: new class extends y {
|
|
1489
1491
|
callVibrate() {
|
|
1490
1492
|
return a(this, null, function* () {
|
|
1491
1493
|
});
|
|
@@ -1498,7 +1500,7 @@ const Ve = d.registerPlugin("DeviceInteractionPlugin", { web: new class extends
|
|
|
1498
1500
|
try {
|
|
1499
1501
|
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => a(this, null, function* () {
|
|
1500
1502
|
var e, r;
|
|
1501
|
-
t((yield (r = (e =
|
|
1503
|
+
t((yield (r = (e = he == null ? void 0 : he.deviceInteraction) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1502
1504
|
})) : new Promise((t) => {
|
|
1503
1505
|
t(null);
|
|
1504
1506
|
});
|
|
@@ -1507,7 +1509,7 @@ const Ve = d.registerPlugin("DeviceInteractionPlugin", { web: new class extends
|
|
|
1507
1509
|
}
|
|
1508
1510
|
}
|
|
1509
1511
|
}() });
|
|
1510
|
-
class
|
|
1512
|
+
class it {
|
|
1511
1513
|
callVibrate() {
|
|
1512
1514
|
return a(this, null, function* () {
|
|
1513
1515
|
try {
|
|
@@ -1536,11 +1538,11 @@ class ct {
|
|
|
1536
1538
|
});
|
|
1537
1539
|
}
|
|
1538
1540
|
}
|
|
1539
|
-
const
|
|
1540
|
-
let
|
|
1541
|
-
var
|
|
1542
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
1543
|
-
const He =
|
|
1541
|
+
const kr = "PollingPlugin";
|
|
1542
|
+
let pe = null;
|
|
1543
|
+
var Nr;
|
|
1544
|
+
window.__MICRO_APP_ENVIRONMENT__ && (pe = (Nr = window.rawWindow.__mini_app_status_hook__) != null ? Nr : {});
|
|
1545
|
+
const He = _.registerPlugin(kr, { web: new class extends y {
|
|
1544
1546
|
create() {
|
|
1545
1547
|
return a(this, null, function* () {
|
|
1546
1548
|
});
|
|
@@ -1553,7 +1555,7 @@ const He = d.registerPlugin(br, { web: new class extends y {
|
|
|
1553
1555
|
try {
|
|
1554
1556
|
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => a(this, null, function* () {
|
|
1555
1557
|
var e, r;
|
|
1556
|
-
t((yield (r = (e =
|
|
1558
|
+
t((yield (r = (e = pe == null ? void 0 : pe.polling) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
|
|
1557
1559
|
})) : new Promise((t) => {
|
|
1558
1560
|
t(null);
|
|
1559
1561
|
});
|
|
@@ -1561,17 +1563,17 @@ const He = d.registerPlugin(br, { web: new class extends y {
|
|
|
1561
1563
|
throw console.error("polling getStatus error", t), t;
|
|
1562
1564
|
}
|
|
1563
1565
|
}
|
|
1564
|
-
}() }), me =
|
|
1566
|
+
}() }), me = C();
|
|
1565
1567
|
me.removeAddListenerPolling = () => null;
|
|
1566
|
-
const
|
|
1568
|
+
const st = (t, e) => {
|
|
1567
1569
|
try {
|
|
1568
1570
|
me.removeAddListenerPolling && me.removeAddListenerPolling();
|
|
1569
1571
|
const r = e.pollingId;
|
|
1570
1572
|
((n) => a(void 0, null, function* () {
|
|
1571
1573
|
return n && (me.removeAddListenerPolling = yield ((o) => a(void 0, null, function* () {
|
|
1572
1574
|
try {
|
|
1573
|
-
if (
|
|
1574
|
-
const i = yield
|
|
1575
|
+
if (_.addListener) {
|
|
1576
|
+
const i = yield _.addListener(kr, "nativeSendPolling", (c) => o && o(c));
|
|
1575
1577
|
return i != null && i.remove ? i.remove : () => null;
|
|
1576
1578
|
}
|
|
1577
1579
|
} catch (i) {
|
|
@@ -1587,7 +1589,7 @@ const lt = (t, e) => {
|
|
|
1587
1589
|
throw console.error("pollingFn error", r), r;
|
|
1588
1590
|
}
|
|
1589
1591
|
};
|
|
1590
|
-
class
|
|
1592
|
+
class ct {
|
|
1591
1593
|
constructor() {
|
|
1592
1594
|
P(this, "pollingList");
|
|
1593
1595
|
this.pollingList = [];
|
|
@@ -1597,19 +1599,19 @@ class wt {
|
|
|
1597
1599
|
if (window.__MICRO_APP_ENVIRONMENT__) {
|
|
1598
1600
|
const { mounted: i, pollingParams: c, callBack: s } = e;
|
|
1599
1601
|
return i(() => {
|
|
1600
|
-
var l,
|
|
1601
|
-
(
|
|
1602
|
+
var l, d;
|
|
1603
|
+
(d = (l = window.rawWindow.__mini_app_hook__) == null ? void 0 : l.addPolling) == null || d.call(l, c, s);
|
|
1602
1604
|
}), () => {
|
|
1603
1605
|
this.destroy({ pollingId: c.pollingId });
|
|
1604
1606
|
};
|
|
1605
1607
|
}
|
|
1606
1608
|
try {
|
|
1607
|
-
(r = e == null ? void 0 : e.pollingParams) != null && r.pollingId && this.pollingList.push({ pollingId: (n = e == null ? void 0 : e.pollingParams) == null ? void 0 : n.pollingId, callBack: e == null ? void 0 : e.callBack }), this.pollingList = this.pollingList.filter((c, s, l) => s === l.findIndex((
|
|
1609
|
+
(r = e == null ? void 0 : e.pollingParams) != null && r.pollingId && this.pollingList.push({ pollingId: (n = e == null ? void 0 : e.pollingParams) == null ? void 0 : n.pollingId, callBack: e == null ? void 0 : e.callBack }), this.pollingList = this.pollingList.filter((c, s, l) => s === l.findIndex((d) => d.pollingId === c.pollingId));
|
|
1608
1610
|
const i = ((o = e == null ? void 0 : e.pollingParams) == null ? void 0 : o.delay) / 1e3;
|
|
1609
1611
|
return He.create(T(b({}, e == null ? void 0 : e.pollingParams), { delay: i })), ((c, s) => {
|
|
1610
1612
|
try {
|
|
1611
|
-
const { mounted: l, pollingParams:
|
|
1612
|
-
l(() =>
|
|
1613
|
+
const { mounted: l, pollingParams: d } = c;
|
|
1614
|
+
l(() => st(s, d));
|
|
1613
1615
|
} catch (l) {
|
|
1614
1616
|
throw console.error("createPolling error", l), l;
|
|
1615
1617
|
}
|
|
@@ -1645,9 +1647,9 @@ class wt {
|
|
|
1645
1647
|
}
|
|
1646
1648
|
}
|
|
1647
1649
|
let ge = null;
|
|
1648
|
-
var
|
|
1649
|
-
window.__MICRO_APP_ENVIRONMENT__ && (ge = (
|
|
1650
|
-
const
|
|
1650
|
+
var fr;
|
|
1651
|
+
window.__MICRO_APP_ENVIRONMENT__ && (ge = (fr = window.rawWindow.__mini_app_status_hook__) != null ? fr : {});
|
|
1652
|
+
const or = _.registerPlugin("PaymentPlugin", { web: new class extends y {
|
|
1651
1653
|
process(t) {
|
|
1652
1654
|
return a(this, null, function* () {
|
|
1653
1655
|
try {
|
|
@@ -1672,11 +1674,11 @@ const ar = d.registerPlugin("PaymentPlugin", { web: new class extends y {
|
|
|
1672
1674
|
}
|
|
1673
1675
|
}
|
|
1674
1676
|
}() });
|
|
1675
|
-
class
|
|
1677
|
+
class lt {
|
|
1676
1678
|
process(e) {
|
|
1677
1679
|
return a(this, null, function* () {
|
|
1678
1680
|
try {
|
|
1679
|
-
return yield
|
|
1681
|
+
return yield or.process(e);
|
|
1680
1682
|
} catch (r) {
|
|
1681
1683
|
throw console.error("paymentPlugins.process error", r), r;
|
|
1682
1684
|
}
|
|
@@ -1685,7 +1687,7 @@ class dt {
|
|
|
1685
1687
|
getStatus() {
|
|
1686
1688
|
return a(this, null, function* () {
|
|
1687
1689
|
try {
|
|
1688
|
-
return yield
|
|
1690
|
+
return yield or.getStatus();
|
|
1689
1691
|
} catch (e) {
|
|
1690
1692
|
throw console.error("getStatus error", e), e;
|
|
1691
1693
|
}
|
|
@@ -1693,9 +1695,9 @@ class dt {
|
|
|
1693
1695
|
}
|
|
1694
1696
|
}
|
|
1695
1697
|
let Pe = null;
|
|
1696
|
-
var
|
|
1697
|
-
window.__MICRO_APP_ENVIRONMENT__ && (Pe = (
|
|
1698
|
-
const Fe =
|
|
1698
|
+
var Mr;
|
|
1699
|
+
window.__MICRO_APP_ENVIRONMENT__ && (Pe = (Mr = window.rawWindow.__mini_app_status_hook__) != null ? Mr : {});
|
|
1700
|
+
const Fe = _.registerPlugin("CameraForTakePhotoPlugin", { web: new class extends y {
|
|
1699
1701
|
pickCameraForTakePhoto() {
|
|
1700
1702
|
return a(this, null, function* () {
|
|
1701
1703
|
});
|
|
@@ -1717,7 +1719,7 @@ const Fe = d.registerPlugin("CameraForTakePhotoPlugin", { web: new class extends
|
|
|
1717
1719
|
}
|
|
1718
1720
|
}
|
|
1719
1721
|
}() });
|
|
1720
|
-
class
|
|
1722
|
+
class wt {
|
|
1721
1723
|
pickCameraForTakePhoto() {
|
|
1722
1724
|
return a(this, null, function* () {
|
|
1723
1725
|
try {
|
|
@@ -1747,9 +1749,9 @@ class ut {
|
|
|
1747
1749
|
}
|
|
1748
1750
|
}
|
|
1749
1751
|
let ye = null;
|
|
1750
|
-
var
|
|
1751
|
-
window.__MICRO_APP_ENVIRONMENT__ && (ye = (
|
|
1752
|
-
const
|
|
1752
|
+
var Ir;
|
|
1753
|
+
window.__MICRO_APP_ENVIRONMENT__ && (ye = (Ir = window.rawWindow.__mini_app_status_hook__) != null ? Ir : {});
|
|
1754
|
+
const ar = _.registerPlugin("HttpPlugin", { web: new class extends y {
|
|
1753
1755
|
request(t) {
|
|
1754
1756
|
return a(this, null, function* () {
|
|
1755
1757
|
return new Promise((e) => {
|
|
@@ -1770,7 +1772,7 @@ const ir = d.registerPlugin("HttpPlugin", { web: new class extends y {
|
|
|
1770
1772
|
}
|
|
1771
1773
|
}
|
|
1772
1774
|
}() });
|
|
1773
|
-
class
|
|
1775
|
+
class dt {
|
|
1774
1776
|
request(e) {
|
|
1775
1777
|
return a(this, null, function* () {
|
|
1776
1778
|
try {
|
|
@@ -1778,7 +1780,7 @@ class _t {
|
|
|
1778
1780
|
return window.rawWindow.__mini_app_hook__.requestHttp(e);
|
|
1779
1781
|
{
|
|
1780
1782
|
let r = {};
|
|
1781
|
-
return e.url && (r.url = e.url), e.method && (r.method = e.method), e.headers && (r.headers = e.headers), e.params && (r.urlParams = e.params), e.data && (typeof e.data == "string" ? r.bodyData = e.data : r.bodyParams = e.data), e.upload && (r.upload = e.upload), yield
|
|
1783
|
+
return e.url && (r.url = e.url), e.method && (r.method = e.method), e.headers && (r.headers = e.headers), e.params && (r.urlParams = e.params), e.data && (typeof e.data == "string" ? r.bodyData = e.data : r.bodyParams = e.data), e.upload && (r.upload = e.upload), yield ar.request(r);
|
|
1782
1784
|
}
|
|
1783
1785
|
} catch (r) {
|
|
1784
1786
|
throw console.error("HttpPlugin, trace error", r), r;
|
|
@@ -1788,7 +1790,7 @@ class _t {
|
|
|
1788
1790
|
getStatus() {
|
|
1789
1791
|
return a(this, null, function* () {
|
|
1790
1792
|
try {
|
|
1791
|
-
return yield
|
|
1793
|
+
return yield ar.getStatus();
|
|
1792
1794
|
} catch (e) {
|
|
1793
1795
|
throw console.error("HttpPlugin getStatus error", e), e;
|
|
1794
1796
|
}
|
|
@@ -1798,31 +1800,31 @@ class _t {
|
|
|
1798
1800
|
const S = [];
|
|
1799
1801
|
for (let t = 0; t < 256; ++t)
|
|
1800
1802
|
S.push((t + 256).toString(16).slice(1));
|
|
1801
|
-
const
|
|
1802
|
-
function
|
|
1803
|
+
const ut = new Uint8Array(16);
|
|
1804
|
+
function _t(t, e, r) {
|
|
1803
1805
|
return e || t || !crypto.randomUUID ? function(n, o, i) {
|
|
1804
|
-
var s, l,
|
|
1806
|
+
var s, l, d;
|
|
1805
1807
|
n = n || {};
|
|
1806
|
-
const c = (
|
|
1808
|
+
const c = (d = (l = n.random) != null ? l : (s = n.rng) == null ? void 0 : s.call(n)) != null ? d : crypto.getRandomValues(ut);
|
|
1807
1809
|
if (c.length < 16)
|
|
1808
1810
|
throw new Error("Random bytes length must be >= 16");
|
|
1809
1811
|
if (c[6] = 15 & c[6] | 64, c[8] = 63 & c[8] | 128, o) {
|
|
1810
1812
|
if ((i = i || 0) < 0 || i + 16 > o.length)
|
|
1811
1813
|
throw new RangeError(`UUID byte range ${i}:${i + 15} is out of buffer bounds`);
|
|
1812
|
-
for (let
|
|
1813
|
-
o[i +
|
|
1814
|
+
for (let w = 0; w < 16; ++w)
|
|
1815
|
+
o[i + w] = c[w];
|
|
1814
1816
|
return o;
|
|
1815
1817
|
}
|
|
1816
|
-
return function(
|
|
1817
|
-
return (S[
|
|
1818
|
+
return function(w, h = 0) {
|
|
1819
|
+
return (S[w[h + 0]] + S[w[h + 1]] + S[w[h + 2]] + S[w[h + 3]] + "-" + S[w[h + 4]] + S[w[h + 5]] + "-" + S[w[h + 6]] + S[w[h + 7]] + "-" + S[w[h + 8]] + S[w[h + 9]] + "-" + S[w[h + 10]] + S[w[h + 11]] + S[w[h + 12]] + S[w[h + 13]] + S[w[h + 14]] + S[w[h + 15]]).toLowerCase();
|
|
1818
1820
|
}(c);
|
|
1819
1821
|
}(t, e, r) : crypto.randomUUID();
|
|
1820
1822
|
}
|
|
1821
|
-
const
|
|
1823
|
+
const br = "PrintPlugin";
|
|
1822
1824
|
let Se = null;
|
|
1823
|
-
var
|
|
1824
|
-
window.__MICRO_APP_ENVIRONMENT__ && (Se = (
|
|
1825
|
-
const
|
|
1825
|
+
var Cr;
|
|
1826
|
+
window.__MICRO_APP_ENVIRONMENT__ && (Se = (Cr = window.rawWindow.__mini_app_status_hook__) != null ? Cr : {});
|
|
1827
|
+
const ir = _.registerPlugin(br, { web: new class extends y {
|
|
1826
1828
|
print() {
|
|
1827
1829
|
}
|
|
1828
1830
|
getStatus() {
|
|
@@ -1837,17 +1839,17 @@ const sr = d.registerPlugin(Tr, { web: new class extends y {
|
|
|
1837
1839
|
throw console.error("print getStatus error", t), t;
|
|
1838
1840
|
}
|
|
1839
1841
|
}
|
|
1840
|
-
}() }),
|
|
1841
|
-
|
|
1842
|
-
const
|
|
1842
|
+
}() }), X = C();
|
|
1843
|
+
X.removeAddListenerPrintList = {};
|
|
1844
|
+
const ht = (t, e) => {
|
|
1843
1845
|
try {
|
|
1844
1846
|
const r = e.printId;
|
|
1845
|
-
|
|
1847
|
+
X.removeAddListenerPrintList = T(b({}, X.removeAddListenerPrintList), { printId: () => {
|
|
1846
1848
|
} }), ((n) => a(void 0, null, function* () {
|
|
1847
|
-
return n && (
|
|
1849
|
+
return n && (X.removeAddListenerPrintList[r] = yield ((o) => a(void 0, null, function* () {
|
|
1848
1850
|
try {
|
|
1849
|
-
if (
|
|
1850
|
-
const i = yield
|
|
1851
|
+
if (_.addListener) {
|
|
1852
|
+
const i = yield _.addListener(br, "nativeSendPrint", (c) => o && o(c));
|
|
1851
1853
|
return i != null && i.remove ? i.remove : () => null;
|
|
1852
1854
|
}
|
|
1853
1855
|
} catch (i) {
|
|
@@ -1857,32 +1859,32 @@ const mt = (t, e) => {
|
|
|
1857
1859
|
}))((n) => {
|
|
1858
1860
|
(n == null ? void 0 : n.printId) === r && (n != null && n.printId) && t.printList.forEach((o) => {
|
|
1859
1861
|
var i, c, s;
|
|
1860
|
-
o != null && o.printId && (n == null ? void 0 : n.printId) === (o == null ? void 0 : o.printId) && (typeof (o == null ? void 0 : o.callBack) == "function" && o.callBack(n), (s = o.state == 5 || o.state == 6) != null || (c = (i =
|
|
1862
|
+
o != null && o.printId && (n == null ? void 0 : n.printId) === (o == null ? void 0 : o.printId) && (typeof (o == null ? void 0 : o.callBack) == "function" && o.callBack(n), (s = o.state == 5 || o.state == 6) != null || (c = (i = X.removeAddListenerPrintList) == null ? void 0 : i[o == null ? void 0 : o.printId]) == null || c.call(i));
|
|
1861
1863
|
});
|
|
1862
1864
|
});
|
|
1863
1865
|
} catch (r) {
|
|
1864
1866
|
throw console.error("printFn error", r), r;
|
|
1865
1867
|
}
|
|
1866
1868
|
};
|
|
1867
|
-
class
|
|
1869
|
+
class pt {
|
|
1868
1870
|
constructor() {
|
|
1869
1871
|
P(this, "printList");
|
|
1870
1872
|
this.printList = [];
|
|
1871
1873
|
}
|
|
1872
1874
|
print(e) {
|
|
1873
1875
|
var n, o, i, c;
|
|
1874
|
-
const r = ((o = (n = e == null ? void 0 : e.printParams) == null ? void 0 : n.functionId) != null ? o : "") +
|
|
1875
|
-
if (this.printList.push({ printId: r, callBack: e == null ? void 0 : e.callBack }), this.printList = this.printList.filter((s, l,
|
|
1876
|
+
const r = ((o = (n = e == null ? void 0 : e.printParams) == null ? void 0 : n.functionId) != null ? o : "") + _t().replace(/-/g, "");
|
|
1877
|
+
if (this.printList.push({ printId: r, callBack: e == null ? void 0 : e.callBack }), this.printList = this.printList.filter((s, l, d) => l === d.findIndex((w) => w.printId === s.printId)), window.__MICRO_APP_ENVIRONMENT__) {
|
|
1876
1878
|
const { printParams: s, callBack: l } = e;
|
|
1877
1879
|
return (c = (i = window.rawWindow.__mini_app_hook__) == null ? void 0 : i.print) == null || c.call(i, T(b({}, s), { printId: r }), l), { id: r };
|
|
1878
1880
|
}
|
|
1879
1881
|
try {
|
|
1880
|
-
return
|
|
1882
|
+
return ir.print(T(b({}, e == null ? void 0 : e.printParams), { printId: r })), ((s, l) => {
|
|
1881
1883
|
try {
|
|
1882
|
-
const { printParams:
|
|
1883
|
-
|
|
1884
|
-
} catch (
|
|
1885
|
-
throw console.error("createPrint error",
|
|
1884
|
+
const { printParams: d } = s;
|
|
1885
|
+
ht(l, d);
|
|
1886
|
+
} catch (d) {
|
|
1887
|
+
throw console.error("createPrint error", d), d;
|
|
1886
1888
|
}
|
|
1887
1889
|
})(T(b({}, e), { printParams: T(b({}, e.printParams), { printId: r }) }), this), { id: r };
|
|
1888
1890
|
} catch (s) {
|
|
@@ -1892,7 +1894,7 @@ class gt {
|
|
|
1892
1894
|
getStatus() {
|
|
1893
1895
|
return a(this, null, function* () {
|
|
1894
1896
|
try {
|
|
1895
|
-
return yield
|
|
1897
|
+
return yield ir.getStatus();
|
|
1896
1898
|
} catch (e) {
|
|
1897
1899
|
throw console.error("getStatus error", e), e;
|
|
1898
1900
|
}
|
|
@@ -1900,56 +1902,56 @@ class gt {
|
|
|
1900
1902
|
}
|
|
1901
1903
|
}
|
|
1902
1904
|
let Ne = null;
|
|
1903
|
-
var
|
|
1904
|
-
window.__MICRO_APP_ENVIRONMENT__ && (Ne = (
|
|
1905
|
-
const
|
|
1905
|
+
var Or;
|
|
1906
|
+
window.__MICRO_APP_ENVIRONMENT__ && (Ne = (Or = window.rawWindow.__mini_app_status_hook__) != null ? Or : {});
|
|
1907
|
+
const j = (t, e, r = "", n = "") => ({ success: t, message: e, type: r, fileName: n }), We = (t) => {
|
|
1906
1908
|
var e;
|
|
1907
1909
|
return (e = t == null ? void 0 : t.trim().replace(/^\.+/, "").toLowerCase()) != null ? e : "";
|
|
1908
|
-
},
|
|
1909
|
-
const r = (
|
|
1910
|
-
var c, s, l;
|
|
1911
|
-
const o = We(n);
|
|
1912
|
-
return o ? o.includes("/") ? (l = (s = ((c = o.split("/").pop()) != null ? c : "").split("+").pop()) == null ? void 0 : s.split(".").pop()) != null ? l : "" : o : "";
|
|
1913
|
-
})(e);
|
|
1910
|
+
}, sr = (t, e) => {
|
|
1911
|
+
const r = We(e);
|
|
1914
1912
|
return !r || t.toLowerCase().endsWith(`.${r}`) ? t : `${t}.${r}`;
|
|
1915
1913
|
}, cr = (t) => {
|
|
1916
|
-
var
|
|
1917
|
-
const e = (
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1914
|
+
var s, l;
|
|
1915
|
+
const e = ((d) => {
|
|
1916
|
+
var I;
|
|
1917
|
+
const w = (I = d == null ? void 0 : d.trim()) != null ? I : "", h = w.lastIndexOf(".");
|
|
1918
|
+
if (h <= 0 || h === w.length - 1)
|
|
1919
|
+
return { name: w, type: "", fileName: w };
|
|
1920
|
+
const f = w.slice(0, h), M = We(w.slice(h + 1));
|
|
1921
|
+
return { name: f, type: M, fileName: M ? sr(f, M) : w };
|
|
1922
|
+
})(((d) => {
|
|
1923
|
+
var w;
|
|
1924
|
+
if (!d)
|
|
1925
1925
|
return "";
|
|
1926
1926
|
try {
|
|
1927
|
-
const
|
|
1928
|
-
return
|
|
1929
|
-
} catch (
|
|
1927
|
+
const h = decodeURIComponent(d).match(/[^/?#&=]+\.[a-zA-Z0-9]+(?=$|[?&#])/g);
|
|
1928
|
+
return (w = h == null ? void 0 : h.pop()) != null ? w : "";
|
|
1929
|
+
} catch (h) {
|
|
1930
1930
|
return "";
|
|
1931
1931
|
}
|
|
1932
|
-
})(t == null ? void 0 : t.url)),
|
|
1933
|
-
return { type:
|
|
1934
|
-
},
|
|
1932
|
+
})(t == null ? void 0 : t.url)), r = We(t == null ? void 0 : t.type), n = (l = (s = t == null ? void 0 : t.fileName) == null ? void 0 : s.trim()) != null ? l : "", o = e.type || r, i = n || e.name || `path_${Date.now()}`, c = !r || !n;
|
|
1933
|
+
return { type: o, fileName: i, downloadFileName: o ? sr(i, o) : i, hasUrlFile: !!e.type, requiresUrlFile: c };
|
|
1934
|
+
}, lr = _.registerPlugin("DownloadFilePlugin", { web: new class extends y {
|
|
1935
1935
|
downloadFile(t) {
|
|
1936
1936
|
return a(this, null, function* () {
|
|
1937
1937
|
var e;
|
|
1938
1938
|
try {
|
|
1939
|
-
const { type: r, fileName: n } =
|
|
1939
|
+
const { type: r, fileName: n, downloadFileName: o, hasUrlFile: i, requiresUrlFile: c } = cr(t), s = (e = t == null ? void 0 : t.url) == null ? void 0 : e.trim();
|
|
1940
|
+
if (c && !i)
|
|
1941
|
+
return j(!1, "Missing file name or type in url", r, n);
|
|
1940
1942
|
if (!r)
|
|
1941
|
-
return
|
|
1942
|
-
if (!
|
|
1943
|
-
return
|
|
1944
|
-
const
|
|
1945
|
-
if (!
|
|
1946
|
-
return
|
|
1947
|
-
const
|
|
1948
|
-
return
|
|
1943
|
+
return j(!1, "Missing required parameter: type", r, n);
|
|
1944
|
+
if (!s)
|
|
1945
|
+
return j(!1, "Missing required parameter: url", r, n);
|
|
1946
|
+
const l = yield fetch(s, t == null ? void 0 : t.fetchOptions);
|
|
1947
|
+
if (!l.ok)
|
|
1948
|
+
return j(!1, `HTTP error! status: ${l.status}`, r, n);
|
|
1949
|
+
const d = yield l.blob(), w = window.URL.createObjectURL(d), h = document.createElement("a");
|
|
1950
|
+
return h.href = w, h.download = o, document.body.appendChild(h), h.click(), h.remove(), window.setTimeout(() => window.URL.revokeObjectURL(w), 0), j(!0, "download success", r, n);
|
|
1949
1951
|
} catch (r) {
|
|
1950
1952
|
console.error("downloadFile error", r);
|
|
1951
|
-
const { type: n, fileName: o } =
|
|
1952
|
-
return
|
|
1953
|
+
const { type: n, fileName: o } = cr(t);
|
|
1954
|
+
return j(!1, r instanceof Error ? r.message : "download failed", n, o);
|
|
1953
1955
|
}
|
|
1954
1956
|
});
|
|
1955
1957
|
}
|
|
@@ -1965,94 +1967,89 @@ const J = (t, e, r = "", n = "") => ({ success: t, message: e, type: r, fileName
|
|
|
1965
1967
|
throw console.error("downloadFile getStatus error", t), t;
|
|
1966
1968
|
}
|
|
1967
1969
|
}
|
|
1968
|
-
}() }),
|
|
1970
|
+
}() }), wr = (t) => {
|
|
1969
1971
|
var e;
|
|
1970
1972
|
return (e = t == null ? void 0 : t.trim().replace(/^\.+/, "").toLowerCase()) != null ? e : "";
|
|
1971
|
-
},
|
|
1972
|
-
const r = ((n) => {
|
|
1973
|
-
var c, s, l;
|
|
1974
|
-
const o = De(n);
|
|
1975
|
-
return o ? o.includes("/") ? (l = (s = ((c = o.split("/").pop()) != null ? c : "").split("+").pop()) == null ? void 0 : s.split(".").pop()) != null ? l : "" : o : "";
|
|
1976
|
-
})(e);
|
|
1977
|
-
return !r || t.toLowerCase().endsWith(`.${r}`) ? t : `${t}.${r}`;
|
|
1978
|
-
}, dr = (t) => {
|
|
1973
|
+
}, dr = (t, e) => {
|
|
1979
1974
|
var n;
|
|
1980
|
-
const
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1975
|
+
const r = ((o) => {
|
|
1976
|
+
var s;
|
|
1977
|
+
const i = (s = o == null ? void 0 : o.trim()) != null ? s : "", c = i.lastIndexOf(".");
|
|
1978
|
+
return c <= 0 || c === i.length - 1 ? { name: i, type: "" } : { name: i.slice(0, c), type: wr(i.slice(c + 1)) };
|
|
1979
|
+
})(((o) => {
|
|
1980
|
+
var i;
|
|
1981
|
+
if (!o)
|
|
1985
1982
|
return "";
|
|
1986
1983
|
try {
|
|
1987
|
-
const
|
|
1988
|
-
return
|
|
1989
|
-
} catch (
|
|
1984
|
+
const c = decodeURIComponent(o).match(/[^/?#&=]+\.[a-zA-Z0-9]+(?=$|[?&#])/g);
|
|
1985
|
+
return (i = c == null ? void 0 : c.pop()) != null ? i : "";
|
|
1986
|
+
} catch (c) {
|
|
1990
1987
|
return "";
|
|
1991
1988
|
}
|
|
1992
|
-
})(t == null ? void 0 : t.url))
|
|
1993
|
-
return { success: !1, message: e, type:
|
|
1989
|
+
})(t == null ? void 0 : t.url));
|
|
1990
|
+
return { success: !1, message: e, type: r.type || wr(t == null ? void 0 : t.type), fileName: ((n = t == null ? void 0 : t.fileName) == null ? void 0 : n.trim()) || r.name || `path_${Date.now()}` };
|
|
1994
1991
|
};
|
|
1995
|
-
class
|
|
1992
|
+
class mt {
|
|
1996
1993
|
downloadFile(e) {
|
|
1997
1994
|
return a(this, null, function* () {
|
|
1998
1995
|
try {
|
|
1999
1996
|
if (window.__MICRO_APP_ENVIRONMENT__) {
|
|
2000
1997
|
const r = window.rawWindow.__mini_app_hook__.downloadFile;
|
|
2001
|
-
return r ? yield r(e) :
|
|
1998
|
+
return r ? yield r(e) : dr(e, "DownloadFilePlugin is not available");
|
|
2002
1999
|
}
|
|
2003
|
-
return yield
|
|
2000
|
+
return yield lr.downloadFile(e);
|
|
2004
2001
|
} catch (r) {
|
|
2005
|
-
return console.error("downloadFile error", r),
|
|
2002
|
+
return console.error("downloadFile error", r), dr(e, r instanceof Error ? r.message : "download failed");
|
|
2006
2003
|
}
|
|
2007
2004
|
});
|
|
2008
2005
|
}
|
|
2009
2006
|
getStatus() {
|
|
2010
2007
|
return a(this, null, function* () {
|
|
2011
2008
|
try {
|
|
2012
|
-
return yield
|
|
2009
|
+
return yield lr.getStatus();
|
|
2013
2010
|
} catch (e) {
|
|
2014
2011
|
throw console.error("downloadFile getStatus error", e), e;
|
|
2015
2012
|
}
|
|
2016
2013
|
});
|
|
2017
2014
|
}
|
|
2018
2015
|
}
|
|
2019
|
-
class
|
|
2016
|
+
class gt {
|
|
2020
2017
|
constructor() {
|
|
2021
|
-
P(this, "initialContextPlugins", new
|
|
2018
|
+
P(this, "initialContextPlugins", new Gr());
|
|
2022
2019
|
P(this, "communicatePlugins", new Xr());
|
|
2023
|
-
P(this, "cameraScanPlugins", new
|
|
2024
|
-
P(this, "cameraScanMultiplePlugins", new
|
|
2025
|
-
P(this, "cameraScanMultipleNoCountPlugins", new
|
|
2026
|
-
P(this, "cameraScanSingleOrDualPlugins", new
|
|
2027
|
-
P(this, "laserScanPlugins", new
|
|
2028
|
-
P(this, "countAssistPlugins", new
|
|
2029
|
-
P(this, "clickStreamPlugins", new
|
|
2030
|
-
P(this, "lifecyclePlugins", new
|
|
2031
|
-
P(this, "deviceInteractionPlugins", new
|
|
2032
|
-
P(this, "pollingPlugins", new
|
|
2033
|
-
P(this, "paymentPlugins", new
|
|
2034
|
-
P(this, "cameraForTakePhotoPlugin", new
|
|
2035
|
-
P(this, "httpPlugin", new
|
|
2036
|
-
P(this, "printPlugins", new
|
|
2037
|
-
P(this, "downloadFilePlugin", new
|
|
2020
|
+
P(this, "cameraScanPlugins", new Yr());
|
|
2021
|
+
P(this, "cameraScanMultiplePlugins", new Qr());
|
|
2022
|
+
P(this, "cameraScanMultipleNoCountPlugins", new et());
|
|
2023
|
+
P(this, "cameraScanSingleOrDualPlugins", new rt());
|
|
2024
|
+
P(this, "laserScanPlugins", new tt());
|
|
2025
|
+
P(this, "countAssistPlugins", new nt());
|
|
2026
|
+
P(this, "clickStreamPlugins", new ot());
|
|
2027
|
+
P(this, "lifecyclePlugins", new at());
|
|
2028
|
+
P(this, "deviceInteractionPlugins", new it());
|
|
2029
|
+
P(this, "pollingPlugins", new ct());
|
|
2030
|
+
P(this, "paymentPlugins", new lt());
|
|
2031
|
+
P(this, "cameraForTakePhotoPlugin", new wt());
|
|
2032
|
+
P(this, "httpPlugin", new dt());
|
|
2033
|
+
P(this, "printPlugins", new pt());
|
|
2034
|
+
P(this, "downloadFilePlugin", new mt());
|
|
2038
2035
|
}
|
|
2039
2036
|
}
|
|
2040
|
-
const
|
|
2041
|
-
let
|
|
2042
|
-
var vr,
|
|
2043
|
-
window.__MICRO_APP_ENVIRONMENT__ && (
|
|
2044
|
-
const
|
|
2037
|
+
const St = new gt();
|
|
2038
|
+
let u = null, fe = null;
|
|
2039
|
+
var vr, Lr;
|
|
2040
|
+
window.__MICRO_APP_ENVIRONMENT__ && (u = (vr = window.rawWindow.__mini_app_hook__) != null ? vr : {}, fe = (Lr = window.rawWindow.__mini_app_status_hook__) != null ? Lr : {});
|
|
2041
|
+
const Pt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: class extends y {
|
|
2045
2042
|
homeIsClick(t) {
|
|
2046
2043
|
return a(this, null, function* () {
|
|
2047
2044
|
var e;
|
|
2048
|
-
window.__MICRO_APP_ENVIRONMENT__ && (console.log("window.microApp.forceDispatch homeIsClick", t), (e =
|
|
2045
|
+
window.__MICRO_APP_ENVIRONMENT__ && (console.log("window.microApp.forceDispatch homeIsClick", t), (e = u.disabledMenu) == null || e.call(u, t));
|
|
2049
2046
|
});
|
|
2050
2047
|
}
|
|
2051
2048
|
openMiniApp(t) {
|
|
2052
2049
|
return a(this, null, function* () {
|
|
2053
2050
|
var e;
|
|
2054
2051
|
try {
|
|
2055
|
-
return window.__MICRO_APP_ENVIRONMENT__ && ((e =
|
|
2052
|
+
return window.__MICRO_APP_ENVIRONMENT__ && ((e = u.openMiniApp) == null || e.call(u, t)), new Promise((r) => {
|
|
2056
2053
|
r(t);
|
|
2057
2054
|
});
|
|
2058
2055
|
} catch (r) {
|
|
@@ -2064,7 +2061,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2064
2061
|
return a(this, null, function* () {
|
|
2065
2062
|
var e;
|
|
2066
2063
|
try {
|
|
2067
|
-
return window.__MICRO_APP_ENVIRONMENT__ && (console.log("window.microApp.forceDispatch showTitle", t), (e =
|
|
2064
|
+
return window.__MICRO_APP_ENVIRONMENT__ && (console.log("window.microApp.forceDispatch showTitle", t), (e = u.showTitle) == null || e.call(u, t)), new Promise((r) => {
|
|
2068
2065
|
r(t);
|
|
2069
2066
|
});
|
|
2070
2067
|
} catch (r) {
|
|
@@ -2076,7 +2073,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2076
2073
|
return a(this, null, function* () {
|
|
2077
2074
|
var e;
|
|
2078
2075
|
try {
|
|
2079
|
-
return window.__MICRO_APP_ENVIRONMENT__ && ((e =
|
|
2076
|
+
return window.__MICRO_APP_ENVIRONMENT__ && ((e = u.showFABMenu) == null || e.call(u, t)), new Promise((r) => {
|
|
2080
2077
|
r(t);
|
|
2081
2078
|
});
|
|
2082
2079
|
} catch (r) {
|
|
@@ -2088,7 +2085,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2088
2085
|
return a(this, null, function* () {
|
|
2089
2086
|
var e;
|
|
2090
2087
|
try {
|
|
2091
|
-
return window.__MICRO_APP_ENVIRONMENT__ && ((e =
|
|
2088
|
+
return window.__MICRO_APP_ENVIRONMENT__ && ((e = u.disableFAB) == null || e.call(u, t)), new Promise((r) => {
|
|
2092
2089
|
r(t);
|
|
2093
2090
|
});
|
|
2094
2091
|
} catch (r) {
|
|
@@ -2100,7 +2097,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2100
2097
|
return a(this, null, function* () {
|
|
2101
2098
|
var e;
|
|
2102
2099
|
try {
|
|
2103
|
-
return window.__MICRO_APP_ENVIRONMENT__ && ((e =
|
|
2100
|
+
return window.__MICRO_APP_ENVIRONMENT__ && ((e = u.disableBack) == null || e.call(u, t)), new Promise((r) => {
|
|
2104
2101
|
r(t);
|
|
2105
2102
|
});
|
|
2106
2103
|
} catch (r) {
|
|
@@ -2112,7 +2109,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2112
2109
|
return a(this, null, function* () {
|
|
2113
2110
|
var e;
|
|
2114
2111
|
try {
|
|
2115
|
-
return window.__MICRO_APP_ENVIRONMENT__ && ((e =
|
|
2112
|
+
return window.__MICRO_APP_ENVIRONMENT__ && ((e = u.showSubMask) == null || e.call(u, t)), new Promise((r) => {
|
|
2116
2113
|
r(t);
|
|
2117
2114
|
});
|
|
2118
2115
|
} catch (r) {
|
|
@@ -2124,7 +2121,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2124
2121
|
return a(this, null, function* () {
|
|
2125
2122
|
var e;
|
|
2126
2123
|
try {
|
|
2127
|
-
return window.__MICRO_APP_ENVIRONMENT__ && ((e =
|
|
2124
|
+
return window.__MICRO_APP_ENVIRONMENT__ && ((e = u.setMiniAppVersion) == null || e.call(u, t)), new Promise((r) => {
|
|
2128
2125
|
r(t);
|
|
2129
2126
|
});
|
|
2130
2127
|
} catch (r) {
|
|
@@ -2135,13 +2132,13 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2135
2132
|
showDialog() {
|
|
2136
2133
|
return a(this, null, function* () {
|
|
2137
2134
|
var t;
|
|
2138
|
-
window.__MICRO_APP_ENVIRONMENT__ && ((t =
|
|
2135
|
+
window.__MICRO_APP_ENVIRONMENT__ && ((t = u.showDialog) == null || t.call(u));
|
|
2139
2136
|
});
|
|
2140
2137
|
}
|
|
2141
2138
|
cancelDialog() {
|
|
2142
2139
|
return a(this, null, function* () {
|
|
2143
2140
|
var t;
|
|
2144
|
-
window.__MICRO_APP_ENVIRONMENT__ && ((t =
|
|
2141
|
+
window.__MICRO_APP_ENVIRONMENT__ && ((t = u.cancelDialog) == null || t.call(u));
|
|
2145
2142
|
});
|
|
2146
2143
|
}
|
|
2147
2144
|
getMiniAppKong(t) {
|
|
@@ -2149,7 +2146,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2149
2146
|
var e, r;
|
|
2150
2147
|
try {
|
|
2151
2148
|
if (window.__MICRO_APP_ENVIRONMENT__) {
|
|
2152
|
-
const n = (r = (e =
|
|
2149
|
+
const n = (r = (e = u.getMiniAppKong) == null ? void 0 : e.call(u, t)) != null ? r : {};
|
|
2153
2150
|
return new Promise((o) => {
|
|
2154
2151
|
o(n);
|
|
2155
2152
|
});
|
|
@@ -2165,7 +2162,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2165
2162
|
closeMiniApp() {
|
|
2166
2163
|
return a(this, null, function* () {
|
|
2167
2164
|
var t;
|
|
2168
|
-
window.__MICRO_APP_ENVIRONMENT__ && ((t =
|
|
2165
|
+
window.__MICRO_APP_ENVIRONMENT__ && ((t = u.closeMiniApp) == null || t.call(u));
|
|
2169
2166
|
});
|
|
2170
2167
|
}
|
|
2171
2168
|
getStatus() {
|
|
@@ -2184,7 +2181,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2184
2181
|
try {
|
|
2185
2182
|
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((e) => a(this, null, function* () {
|
|
2186
2183
|
var r;
|
|
2187
|
-
e((yield (r =
|
|
2184
|
+
e((yield (r = u == null ? void 0 : u.dispatchToShell) == null ? void 0 : r.call(u, t)) || {});
|
|
2188
2185
|
})) : new Promise((e) => {
|
|
2189
2186
|
e(t);
|
|
2190
2187
|
});
|
|
@@ -2196,7 +2193,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2196
2193
|
try {
|
|
2197
2194
|
return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((e) => a(this, null, function* () {
|
|
2198
2195
|
var r;
|
|
2199
|
-
e((yield (r =
|
|
2196
|
+
e((yield (r = u == null ? void 0 : u.getMiniAppInfo) == null ? void 0 : r.call(u, t)) || {});
|
|
2200
2197
|
})) : new Promise((e) => {
|
|
2201
2198
|
e({});
|
|
2202
2199
|
});
|
|
@@ -2206,6 +2203,6 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
|
|
|
2206
2203
|
}
|
|
2207
2204
|
} }, Symbol.toStringTag, { value: "Module" }));
|
|
2208
2205
|
export {
|
|
2209
|
-
|
|
2210
|
-
|
|
2206
|
+
gt as NativeApi,
|
|
2207
|
+
St as default
|
|
2211
2208
|
};
|