@tma.js/bridge 2.2.1 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dts/base64-url.d.ts +1 -1
- package/dist/dts/env/isTMA.d.ts +1 -1
- package/dist/dts/events/types/events.d.ts +3 -3
- package/dist/dts/launch-params.d.ts +1 -2
- package/dist/dts/methods/postEvent.d.ts +1 -1
- package/dist/dts/start-param.d.ts +1 -2
- package/dist/dts/utils/invokeCustomMethod.d.ts +1 -1
- package/dist/dts/utils/request.d.ts +1 -1
- package/dist/dts/utils/request2.d.ts +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.iife.js +3 -3
- package/dist/index.iife.js.map +1 -1
- package/dist/index.js +296 -488
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,222 +1,35 @@
|
|
|
1
|
-
import { is as
|
|
2
|
-
import { throwifyFpFn as T, getStorageValue as
|
|
3
|
-
import { createLogger as
|
|
4
|
-
import { BetterPromise as
|
|
5
|
-
import { CancelledError as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { is as O, looseObject as m, function as Y, nullish as v, boolean as I, number as $, string as E, optional as z, unknown as me, parse as F, any as we } from "valibot";
|
|
2
|
+
import { throwifyFpFn as T, getStorageValue as de, setStorageValue as X, createLogger as ge, throwifyAnyEither as A, createCbCollector as Z, BetterTaskEither as ee } from "@tma.js/toolkit";
|
|
3
|
+
import { createLogger as yt, deepSnakeToCamelObjKeys as vt } from "@tma.js/toolkit";
|
|
4
|
+
import { BetterPromise as te, TimeoutError as be } from "better-promises";
|
|
5
|
+
import { CancelledError as Pt, TimeoutError as kt } from "better-promises";
|
|
6
|
+
import { function as f, either as c, option as L, taskEither as w, json as he } from "fp-ts";
|
|
7
|
+
import { errorClassWithData as ye, errorClass as k } from "error-kid";
|
|
8
|
+
import { parseLaunchParamsQueryFp as re, themeParams as ve, pipeJsonToSchema as ne, miniAppsMessage as oe, serializeLaunchParamsQuery as Ee, parseLaunchParamsQuery as Pe } from "@tma.js/transformers";
|
|
9
|
+
import { signal as b, computed as ae } from "@tma.js/signals";
|
|
10
|
+
import ke from "mitt";
|
|
11
|
+
function se(e) {
|
|
12
|
+
return O(
|
|
13
|
+
m({ TelegramWebviewProxy: m({ postEvent: Y() }) }),
|
|
13
14
|
e
|
|
14
15
|
);
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
+
function ie() {
|
|
17
18
|
try {
|
|
18
19
|
return window.self !== window.top;
|
|
19
20
|
} catch {
|
|
20
21
|
return !0;
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
|
-
|
|
24
|
-
if (r || arguments.length === 2) for (var n = 0, a = t.length, o; n < a; n++)
|
|
25
|
-
(o || !(n in t)) && (o || (o = Array.prototype.slice.call(t, 0, n)), o[n] = t[n]);
|
|
26
|
-
return e.concat(o || Array.prototype.slice.call(t));
|
|
27
|
-
};
|
|
28
|
-
function ze(e) {
|
|
29
|
-
return e;
|
|
30
|
-
}
|
|
31
|
-
function _e(e, t, r, n, a, o, s, i, c) {
|
|
32
|
-
switch (arguments.length) {
|
|
33
|
-
case 1:
|
|
34
|
-
return e;
|
|
35
|
-
case 2:
|
|
36
|
-
return function() {
|
|
37
|
-
return t(e.apply(this, arguments));
|
|
38
|
-
};
|
|
39
|
-
case 3:
|
|
40
|
-
return function() {
|
|
41
|
-
return r(t(e.apply(this, arguments)));
|
|
42
|
-
};
|
|
43
|
-
case 4:
|
|
44
|
-
return function() {
|
|
45
|
-
return n(r(t(e.apply(this, arguments))));
|
|
46
|
-
};
|
|
47
|
-
case 5:
|
|
48
|
-
return function() {
|
|
49
|
-
return a(n(r(t(e.apply(this, arguments)))));
|
|
50
|
-
};
|
|
51
|
-
case 6:
|
|
52
|
-
return function() {
|
|
53
|
-
return o(a(n(r(t(e.apply(this, arguments))))));
|
|
54
|
-
};
|
|
55
|
-
case 7:
|
|
56
|
-
return function() {
|
|
57
|
-
return s(o(a(n(r(t(e.apply(this, arguments)))))));
|
|
58
|
-
};
|
|
59
|
-
case 8:
|
|
60
|
-
return function() {
|
|
61
|
-
return i(s(o(a(n(r(t(e.apply(this, arguments))))))));
|
|
62
|
-
};
|
|
63
|
-
case 9:
|
|
64
|
-
return function() {
|
|
65
|
-
return c(i(s(o(a(n(r(t(e.apply(this, arguments)))))))));
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
function f(e, t, r, n, a, o, s, i, c) {
|
|
70
|
-
switch (arguments.length) {
|
|
71
|
-
case 1:
|
|
72
|
-
return e;
|
|
73
|
-
case 2:
|
|
74
|
-
return t(e);
|
|
75
|
-
case 3:
|
|
76
|
-
return r(t(e));
|
|
77
|
-
case 4:
|
|
78
|
-
return n(r(t(e)));
|
|
79
|
-
case 5:
|
|
80
|
-
return a(n(r(t(e))));
|
|
81
|
-
case 6:
|
|
82
|
-
return o(a(n(r(t(e)))));
|
|
83
|
-
case 7:
|
|
84
|
-
return s(o(a(n(r(t(e))))));
|
|
85
|
-
case 8:
|
|
86
|
-
return i(s(o(a(n(r(t(e)))))));
|
|
87
|
-
case 9:
|
|
88
|
-
return c(i(s(o(a(n(r(t(e))))))));
|
|
89
|
-
default: {
|
|
90
|
-
for (var u = arguments[0], p = 1; p < arguments.length; p++)
|
|
91
|
-
u = arguments[p](u);
|
|
92
|
-
return u;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
var M = function(e, t) {
|
|
97
|
-
var r = typeof e == "number" ? function(n) {
|
|
98
|
-
return n.length >= e;
|
|
99
|
-
} : e;
|
|
100
|
-
return function() {
|
|
101
|
-
var n = Array.from(arguments);
|
|
102
|
-
return r(arguments) ? t.apply(this, n) : function(a) {
|
|
103
|
-
return t.apply(void 0, je([a], n, !1));
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
}, Ge = { _tag: "None" }, Ve = function(e) {
|
|
107
|
-
return { _tag: "Some", value: e };
|
|
108
|
-
}, Be = function(e) {
|
|
109
|
-
return e._tag === "Left";
|
|
110
|
-
}, De = function(e) {
|
|
111
|
-
return { _tag: "Left", left: e };
|
|
112
|
-
}, Ne = function(e) {
|
|
113
|
-
return { _tag: "Right", right: e };
|
|
114
|
-
}, w = De, _ = Ne, fe = /* @__PURE__ */ M(2, function(e, t) {
|
|
115
|
-
return v(e) ? e : t(e.right);
|
|
116
|
-
}), Je = function(e) {
|
|
117
|
-
return function(t) {
|
|
118
|
-
return v(t) ? t : _(e(t.right));
|
|
119
|
-
};
|
|
120
|
-
}, Qe = function(e, t) {
|
|
121
|
-
return function(r) {
|
|
122
|
-
return v(r) ? w(e(r.left)) : _(t(r.right));
|
|
123
|
-
};
|
|
124
|
-
}, He = function(e) {
|
|
125
|
-
return function(t) {
|
|
126
|
-
return v(t) ? w(e(t.left)) : t;
|
|
127
|
-
};
|
|
128
|
-
}, v = Be, le = function(e, t) {
|
|
129
|
-
return function(r) {
|
|
130
|
-
return v(r) ? e(r.left) : t(r.right);
|
|
131
|
-
};
|
|
132
|
-
}, Ke = le, U = le, Ye = U, I = function(e, t) {
|
|
133
|
-
try {
|
|
134
|
-
return _(e());
|
|
135
|
-
} catch (r) {
|
|
136
|
-
return w(t(r));
|
|
137
|
-
}
|
|
138
|
-
}, Xe = fe, Ze = fe, et = Ge, tt = Ve, rt = function(e) {
|
|
139
|
-
return e._tag === "None";
|
|
140
|
-
}, nt = function(e, t) {
|
|
141
|
-
return function(r) {
|
|
142
|
-
return rt(r) ? e() : t(r.value);
|
|
143
|
-
};
|
|
144
|
-
}, ot = nt;
|
|
145
|
-
function at(e) {
|
|
146
|
-
return _e(_, e.of);
|
|
147
|
-
}
|
|
148
|
-
function st(e) {
|
|
149
|
-
return _e(w, e.of);
|
|
150
|
-
}
|
|
151
|
-
function it(e) {
|
|
152
|
-
return function(t, r) {
|
|
153
|
-
return e.chain(t, function(n) {
|
|
154
|
-
return v(n) ? e.of(n) : r(n.right);
|
|
155
|
-
});
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
function ut(e) {
|
|
159
|
-
return function(t, r, n) {
|
|
160
|
-
return e.map(t, Qe(r, n));
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
function ct(e) {
|
|
164
|
-
return function(t, r) {
|
|
165
|
-
return function(n) {
|
|
166
|
-
return e.map(n, U(t, r));
|
|
167
|
-
};
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
var me = function(e, t) {
|
|
171
|
-
return f(e, _t(t));
|
|
172
|
-
}, pt = function(e, t) {
|
|
173
|
-
return f(e, ft(t));
|
|
174
|
-
}, _t = function(e) {
|
|
175
|
-
return function(t) {
|
|
176
|
-
return function() {
|
|
177
|
-
return Promise.resolve().then(t).then(e);
|
|
178
|
-
};
|
|
179
|
-
};
|
|
180
|
-
}, ft = function(e) {
|
|
181
|
-
return function(t) {
|
|
182
|
-
return function() {
|
|
183
|
-
return Promise.all([Promise.resolve().then(t), Promise.resolve().then(e)]).then(function(r) {
|
|
184
|
-
var n = r[0], a = r[1];
|
|
185
|
-
return n(a);
|
|
186
|
-
});
|
|
187
|
-
};
|
|
188
|
-
};
|
|
189
|
-
}, we = function(e) {
|
|
190
|
-
return function() {
|
|
191
|
-
return Promise.resolve(e);
|
|
192
|
-
};
|
|
193
|
-
}, lt = /* @__PURE__ */ M(2, function(e, t) {
|
|
194
|
-
return function() {
|
|
195
|
-
return Promise.resolve().then(e).then(function(r) {
|
|
196
|
-
return t(r)();
|
|
197
|
-
});
|
|
198
|
-
};
|
|
199
|
-
}), he = "Task", ge = {
|
|
200
|
-
URI: he,
|
|
201
|
-
map: me
|
|
202
|
-
}, de = {
|
|
203
|
-
of: we
|
|
204
|
-
}, mt = {
|
|
205
|
-
URI: he,
|
|
206
|
-
map: me,
|
|
207
|
-
of: we,
|
|
208
|
-
ap: pt,
|
|
209
|
-
chain: lt
|
|
210
|
-
}, wt = /* @__PURE__ */ st(de), ve = /* @__PURE__ */ at(de), be = /* @__PURE__ */ ct(ge), ye = /* @__PURE__ */ M(3, ut(ge)), Ee = /* @__PURE__ */ M(2, it(mt)), ht = Ee, Pe = Ee;
|
|
211
|
-
class gt extends (/* @__PURE__ */ k("MethodUnsupportedError", (t, r) => [
|
|
24
|
+
class xe extends (/* @__PURE__ */ k("MethodUnsupportedError", (t, r) => [
|
|
212
25
|
`Method "${t}" is unsupported in Mini Apps version ${r}`
|
|
213
26
|
])) {
|
|
214
27
|
}
|
|
215
|
-
class
|
|
28
|
+
class Se extends (/* @__PURE__ */ k("MethodParameterUnsupportedError", (t, r, n) => [
|
|
216
29
|
`Parameter "${r}" of "${t}" method is unsupported in Mini Apps version ${n}`
|
|
217
30
|
])) {
|
|
218
31
|
}
|
|
219
|
-
class
|
|
32
|
+
class Te extends (/* @__PURE__ */ ye(
|
|
220
33
|
"LaunchParamsRetrieveError",
|
|
221
34
|
(t) => ({ errors: t }),
|
|
222
35
|
(t) => [
|
|
@@ -232,45 +45,45 @@ class vt extends (/* @__PURE__ */ We(
|
|
|
232
45
|
]
|
|
233
46
|
)) {
|
|
234
47
|
}
|
|
235
|
-
class
|
|
48
|
+
class Ae extends (/* @__PURE__ */ k("InvalidLaunchParamsError", (t, r) => [
|
|
236
49
|
`Invalid value for launch params: ${t}`,
|
|
237
50
|
{ cause: r }
|
|
238
51
|
])) {
|
|
239
52
|
}
|
|
240
|
-
class
|
|
53
|
+
class pe extends (/* @__PURE__ */ k("UnknownEnvError")) {
|
|
241
54
|
}
|
|
242
|
-
class
|
|
55
|
+
class Ce extends (/* @__PURE__ */ k(
|
|
243
56
|
"InvokeCustomMethodError",
|
|
244
57
|
(t) => [`Server returned error: ${t}`]
|
|
245
58
|
)) {
|
|
246
59
|
}
|
|
247
|
-
const
|
|
248
|
-
function
|
|
60
|
+
const V = "launchParams";
|
|
61
|
+
function B(e) {
|
|
249
62
|
return e.replace(/^[^?#]*[?#]/, "").replace(/[?#]/g, "&");
|
|
250
63
|
}
|
|
251
|
-
function
|
|
252
|
-
return f(
|
|
64
|
+
function Me() {
|
|
65
|
+
return f.pipe(
|
|
253
66
|
C(),
|
|
254
|
-
|
|
67
|
+
c.chainW(re)
|
|
255
68
|
);
|
|
256
69
|
}
|
|
257
|
-
const
|
|
258
|
-
function
|
|
259
|
-
return f(
|
|
70
|
+
const tt = T(Me);
|
|
71
|
+
function qe() {
|
|
72
|
+
return f.pipe(
|
|
260
73
|
C(),
|
|
261
|
-
|
|
74
|
+
c.map((e) => {
|
|
262
75
|
const t = new URLSearchParams(e).get("tgWebAppData");
|
|
263
|
-
return t ?
|
|
76
|
+
return t ? L.some(t) : L.none;
|
|
264
77
|
})
|
|
265
78
|
);
|
|
266
79
|
}
|
|
267
|
-
function
|
|
268
|
-
return f(
|
|
269
|
-
|
|
270
|
-
|
|
80
|
+
function rt() {
|
|
81
|
+
return f.pipe(
|
|
82
|
+
qe(),
|
|
83
|
+
c.fold((e) => {
|
|
271
84
|
throw e;
|
|
272
85
|
}, (e) => e),
|
|
273
|
-
|
|
86
|
+
L.match(() => {
|
|
274
87
|
}, (e) => e)
|
|
275
88
|
);
|
|
276
89
|
}
|
|
@@ -280,58 +93,58 @@ function C() {
|
|
|
280
93
|
// Try to retrieve launch parameters from the current location. This method
|
|
281
94
|
// can return nothing in case, location was changed, and then the page was
|
|
282
95
|
// reloaded.
|
|
283
|
-
[() =>
|
|
96
|
+
[() => B(window.location.href), "window.location.href"],
|
|
284
97
|
// Then, try using the lower level API - window.performance.
|
|
285
98
|
[() => {
|
|
286
99
|
const n = performance.getEntriesByType("navigation")[0];
|
|
287
|
-
return n &&
|
|
100
|
+
return n && B(n.name);
|
|
288
101
|
}, "performance navigation entries"],
|
|
289
102
|
// Finally, try using the session storage.
|
|
290
|
-
[() =>
|
|
103
|
+
[() => de(V), "local storage"]
|
|
291
104
|
]) {
|
|
292
105
|
const n = t();
|
|
293
106
|
if (!n) {
|
|
294
107
|
e.push({ source: r, error: new Error("Source is empty") });
|
|
295
108
|
continue;
|
|
296
109
|
}
|
|
297
|
-
const a = f(
|
|
298
|
-
|
|
299
|
-
|
|
110
|
+
const a = f.pipe(
|
|
111
|
+
re(n),
|
|
112
|
+
c.foldW((o) => o, () => !0)
|
|
300
113
|
);
|
|
301
114
|
if (typeof a != "boolean") {
|
|
302
115
|
e.push({ source: r, error: a });
|
|
303
116
|
continue;
|
|
304
117
|
}
|
|
305
|
-
return
|
|
118
|
+
return X(V, n), c.right(n);
|
|
306
119
|
}
|
|
307
|
-
return
|
|
308
|
-
}
|
|
309
|
-
const
|
|
310
|
-
function
|
|
311
|
-
const r = /* @__PURE__ */ new Map(), n =
|
|
312
|
-
const
|
|
313
|
-
r.set(o,
|
|
314
|
-
const
|
|
315
|
-
|
|
316
|
-
const
|
|
317
|
-
if (
|
|
120
|
+
return c.left(new Te(e));
|
|
121
|
+
}
|
|
122
|
+
const nt = T(C);
|
|
123
|
+
function We(e, t) {
|
|
124
|
+
const r = /* @__PURE__ */ new Map(), n = ke(), a = (o, s, p = !1) => {
|
|
125
|
+
const _ = r.get(o) || /* @__PURE__ */ new Map();
|
|
126
|
+
r.set(o, _);
|
|
127
|
+
const i = _.get(s) || [];
|
|
128
|
+
_.set(s, i);
|
|
129
|
+
const u = i.findIndex((l) => l[1] === p);
|
|
130
|
+
if (u >= 0 && (n.off(o, i[u][0]), i.splice(u, 1), !i.length && (_.delete(s), !_.size))) {
|
|
318
131
|
const l = r.size;
|
|
319
132
|
r.delete(o), l && !r.size && t();
|
|
320
133
|
}
|
|
321
134
|
};
|
|
322
135
|
return {
|
|
323
|
-
on(o, s,
|
|
136
|
+
on(o, s, p) {
|
|
324
137
|
!r.size && e();
|
|
325
|
-
const
|
|
326
|
-
a(o, s,
|
|
327
|
-
},
|
|
328
|
-
|
|
138
|
+
const _ = () => {
|
|
139
|
+
a(o, s, p);
|
|
140
|
+
}, i = (...d) => {
|
|
141
|
+
p && _(), o === "*" ? s({ name: d[0], payload: d[1] }) : s(...d);
|
|
329
142
|
};
|
|
330
|
-
n.on(o,
|
|
331
|
-
const
|
|
332
|
-
r.set(o,
|
|
333
|
-
const l =
|
|
334
|
-
return
|
|
143
|
+
n.on(o, i);
|
|
144
|
+
const u = r.get(o) || /* @__PURE__ */ new Map();
|
|
145
|
+
r.set(o, u);
|
|
146
|
+
const l = u.get(s) || [];
|
|
147
|
+
return u.set(s, l), l.push([i, p || !1]), _;
|
|
335
148
|
},
|
|
336
149
|
off: a,
|
|
337
150
|
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
@@ -351,66 +164,66 @@ function q(e, t) {
|
|
|
351
164
|
source: window.parent
|
|
352
165
|
}));
|
|
353
166
|
}
|
|
354
|
-
const
|
|
167
|
+
const S = b(!1), R = b("https://web.telegram.org"), Fe = (e) => {
|
|
355
168
|
g().log("Event received:", e);
|
|
356
|
-
},
|
|
357
|
-
function
|
|
358
|
-
e !==
|
|
169
|
+
}, ce = ae(S);
|
|
170
|
+
function ot(e) {
|
|
171
|
+
e !== S() && (S.set(e), (e ? j : Oe)("*", Fe));
|
|
359
172
|
}
|
|
360
|
-
const
|
|
361
|
-
function
|
|
362
|
-
|
|
173
|
+
const _e = ae(R);
|
|
174
|
+
function at(e) {
|
|
175
|
+
R.set(e), g().log("New target origin set", e);
|
|
363
176
|
}
|
|
364
|
-
const
|
|
177
|
+
const P = b((...e) => {
|
|
365
178
|
window.parent.postMessage(...e);
|
|
366
|
-
}), g =
|
|
179
|
+
}), g = b(ge("Bridge", {
|
|
367
180
|
bgColor: "#9147ff",
|
|
368
181
|
textColor: "white",
|
|
369
|
-
shouldLog:
|
|
182
|
+
shouldLog: ce
|
|
370
183
|
}));
|
|
371
|
-
function
|
|
372
|
-
|
|
184
|
+
function st() {
|
|
185
|
+
je(), [P, R, _e, S, ce, g].forEach((e) => {
|
|
373
186
|
e.unsubAll(), "reset" in e && e.reset();
|
|
374
187
|
});
|
|
375
188
|
}
|
|
376
|
-
function
|
|
189
|
+
function W(e, t, r) {
|
|
377
190
|
const n = [r], a = e[t];
|
|
378
191
|
typeof a == "function" && n.push(a);
|
|
379
|
-
const o = (...
|
|
380
|
-
n.forEach((
|
|
381
|
-
}, s = Object.assign((...
|
|
382
|
-
o(...
|
|
192
|
+
const o = (...p) => {
|
|
193
|
+
n.forEach((_) => _(...p));
|
|
194
|
+
}, s = Object.assign((...p) => {
|
|
195
|
+
o(...p);
|
|
383
196
|
}, {
|
|
384
197
|
// Unwraps the composer.
|
|
385
198
|
unwrap() {
|
|
386
|
-
const { length:
|
|
387
|
-
if (
|
|
199
|
+
const { length: p } = n;
|
|
200
|
+
if (p === 1) {
|
|
388
201
|
delete e[t];
|
|
389
202
|
return;
|
|
390
203
|
}
|
|
391
|
-
if (
|
|
392
|
-
|
|
204
|
+
if (p === 2) {
|
|
205
|
+
D(e, t, n[1]);
|
|
393
206
|
return;
|
|
394
207
|
}
|
|
395
|
-
n.unshift(1),
|
|
208
|
+
n.unshift(1), D(e, t, o);
|
|
396
209
|
}
|
|
397
210
|
});
|
|
398
|
-
|
|
211
|
+
ue(
|
|
399
212
|
e,
|
|
400
213
|
t,
|
|
401
214
|
() => s,
|
|
402
|
-
(
|
|
215
|
+
(p) => n.push(p)
|
|
403
216
|
);
|
|
404
217
|
}
|
|
405
|
-
function
|
|
218
|
+
function G(e, t) {
|
|
406
219
|
const r = e[t];
|
|
407
|
-
|
|
220
|
+
ue(e, t, () => r, (n) => {
|
|
408
221
|
Object.entries(n).forEach(([a, o]) => {
|
|
409
222
|
r[a] = o;
|
|
410
223
|
});
|
|
411
224
|
});
|
|
412
225
|
}
|
|
413
|
-
function
|
|
226
|
+
function ue(e, t, r, n) {
|
|
414
227
|
Object.defineProperty(e, t, {
|
|
415
228
|
enumerable: !0,
|
|
416
229
|
configurable: !0,
|
|
@@ -418,7 +231,7 @@ function Ae(e, t, r, n) {
|
|
|
418
231
|
set: n
|
|
419
232
|
});
|
|
420
233
|
}
|
|
421
|
-
function
|
|
234
|
+
function D(e, t, r) {
|
|
422
235
|
Object.defineProperty(e, t, {
|
|
423
236
|
enumerable: !0,
|
|
424
237
|
configurable: !0,
|
|
@@ -426,27 +239,27 @@ function Q(e, t, r) {
|
|
|
426
239
|
value: r
|
|
427
240
|
});
|
|
428
241
|
}
|
|
429
|
-
const
|
|
242
|
+
const Le = {
|
|
430
243
|
clipboard_text_received: m({
|
|
431
|
-
req_id:
|
|
432
|
-
data: E(
|
|
244
|
+
req_id: E(),
|
|
245
|
+
data: v(E())
|
|
433
246
|
}),
|
|
434
247
|
custom_method_invoked: m({
|
|
435
|
-
req_id:
|
|
436
|
-
result:
|
|
437
|
-
error:
|
|
248
|
+
req_id: E(),
|
|
249
|
+
result: z(me()),
|
|
250
|
+
error: z(E())
|
|
438
251
|
}),
|
|
439
|
-
popup_closed:
|
|
440
|
-
m({ button_id: E(
|
|
252
|
+
popup_closed: v(
|
|
253
|
+
m({ button_id: v(E(), () => {
|
|
441
254
|
}) }),
|
|
442
255
|
{}
|
|
443
256
|
),
|
|
444
|
-
viewport_changed:
|
|
257
|
+
viewport_changed: v(
|
|
445
258
|
m({
|
|
446
|
-
height:
|
|
447
|
-
width:
|
|
448
|
-
is_state_stable:
|
|
449
|
-
is_expanded:
|
|
259
|
+
height: $(),
|
|
260
|
+
width: v($(), () => window.innerWidth),
|
|
261
|
+
is_state_stable: I(),
|
|
262
|
+
is_expanded: I()
|
|
450
263
|
}),
|
|
451
264
|
// TODO: At the moment, macOS has a bug with the invalid event payload - it is always equal to
|
|
452
265
|
// null. Leaving this default value until the bug is fixed.
|
|
@@ -457,22 +270,22 @@ const St = {
|
|
|
457
270
|
})
|
|
458
271
|
),
|
|
459
272
|
theme_changed: m({
|
|
460
|
-
theme_params:
|
|
273
|
+
theme_params: ve()
|
|
461
274
|
})
|
|
462
275
|
};
|
|
463
|
-
function
|
|
276
|
+
function J(e) {
|
|
464
277
|
if (e.source !== window.parent)
|
|
465
278
|
return;
|
|
466
279
|
let t;
|
|
467
280
|
try {
|
|
468
|
-
t =
|
|
281
|
+
t = F(ne(oe()), e.data);
|
|
469
282
|
} catch {
|
|
470
283
|
return;
|
|
471
284
|
}
|
|
472
|
-
const { eventType: r, eventData: n } = t, a =
|
|
285
|
+
const { eventType: r, eventData: n } = t, a = Le[r];
|
|
473
286
|
let o;
|
|
474
287
|
try {
|
|
475
|
-
o = a ?
|
|
288
|
+
o = a ? F(a, n) : n;
|
|
476
289
|
} catch (s) {
|
|
477
290
|
return g().forceError(
|
|
478
291
|
[
|
|
@@ -485,17 +298,17 @@ function H(e) {
|
|
|
485
298
|
s
|
|
486
299
|
);
|
|
487
300
|
}
|
|
488
|
-
|
|
301
|
+
Re(r, o);
|
|
489
302
|
}
|
|
490
303
|
const {
|
|
491
304
|
on: j,
|
|
492
|
-
off:
|
|
493
|
-
emit:
|
|
494
|
-
clear:
|
|
495
|
-
} =
|
|
305
|
+
off: Oe,
|
|
306
|
+
emit: Re,
|
|
307
|
+
clear: je
|
|
308
|
+
} = We(
|
|
496
309
|
() => {
|
|
497
310
|
const e = window;
|
|
498
|
-
!e.TelegramGameProxy && (e.TelegramGameProxy = {}),
|
|
311
|
+
!e.TelegramGameProxy && (e.TelegramGameProxy = {}), W(e.TelegramGameProxy, "receiveEvent", q), G(e, "TelegramGameProxy"), !e.Telegram && (e.Telegram = {}), !e.Telegram.WebView && (e.Telegram.WebView = {}), W(e.Telegram.WebView, "receiveEvent", q), G(e.Telegram, "WebView"), W(e, "TelegramGameProxy_receiveEvent", q), window.addEventListener("message", J);
|
|
499
312
|
},
|
|
500
313
|
() => {
|
|
501
314
|
[
|
|
@@ -510,127 +323,127 @@ const {
|
|
|
510
323
|
return;
|
|
511
324
|
const [n, a] = r;
|
|
512
325
|
"unwrap" in a && (a.unwrap(), n && n !== t && !Object.keys(n).length && delete t[e[0]]);
|
|
513
|
-
}), window.removeEventListener("message",
|
|
326
|
+
}), window.removeEventListener("message", J);
|
|
514
327
|
}
|
|
515
|
-
),
|
|
516
|
-
function
|
|
517
|
-
f(
|
|
518
|
-
|
|
328
|
+
), Ue = (...e) => P()(...e);
|
|
329
|
+
function Ie(e, t) {
|
|
330
|
+
f.pipe(
|
|
331
|
+
x(
|
|
519
332
|
// @ts-expect-error It's ok, TS can't determine a specific override.
|
|
520
333
|
e,
|
|
521
334
|
t
|
|
522
335
|
),
|
|
523
|
-
|
|
336
|
+
c.mapLeft((r) => {
|
|
524
337
|
throw r;
|
|
525
338
|
})
|
|
526
339
|
);
|
|
527
340
|
}
|
|
528
|
-
function
|
|
341
|
+
function x(e, t) {
|
|
529
342
|
g().log("Posting event:", t ? { eventType: e, eventData: t } : { eventType: e });
|
|
530
343
|
const r = window, n = JSON.stringify({ eventType: e, eventData: t });
|
|
531
|
-
return
|
|
344
|
+
return ie() ? (Ue(n, _e()), c.right(void 0)) : se(r) ? (r.TelegramWebviewProxy.postEvent(e, JSON.stringify(t)), c.right(void 0)) : O(m({ external: m({ notify: Y() }) }), r) ? (r.external.notify(n), c.right(void 0)) : c.left(new pe());
|
|
532
345
|
}
|
|
533
|
-
function
|
|
346
|
+
function U(e, t, r = {}) {
|
|
534
347
|
const {
|
|
535
348
|
// If no capture function was passed, we capture the first compatible event.
|
|
536
349
|
capture: n = () => !0,
|
|
537
|
-
postEvent: a =
|
|
538
|
-
} = r, o =
|
|
539
|
-
(Array.isArray(t) ? t : [t]).forEach((
|
|
350
|
+
postEvent: a = x
|
|
351
|
+
} = r, o = b(), [s, p] = Z();
|
|
352
|
+
(Array.isArray(t) ? t : [t]).forEach((i) => {
|
|
540
353
|
s(
|
|
541
|
-
j(
|
|
354
|
+
j(i, (u) => {
|
|
542
355
|
const l = Array.isArray(t);
|
|
543
|
-
n(l ? { event:
|
|
544
|
-
l ? { event:
|
|
356
|
+
n(l ? { event: i, payload: u } : u) && o.set([
|
|
357
|
+
l ? { event: i, payload: u } : u
|
|
545
358
|
]);
|
|
546
359
|
})
|
|
547
360
|
);
|
|
548
361
|
});
|
|
549
|
-
const
|
|
550
|
-
return f(
|
|
362
|
+
const _ = (i) => (p(), i);
|
|
363
|
+
return f.pipe(
|
|
551
364
|
async () => a(e, r.params),
|
|
552
|
-
|
|
553
|
-
const
|
|
554
|
-
if (
|
|
555
|
-
return
|
|
556
|
-
const
|
|
557
|
-
y &&
|
|
558
|
-
},
|
|
559
|
-
o.unsub(
|
|
365
|
+
w.chainW(() => ee((i, u, l) => {
|
|
366
|
+
const d = o();
|
|
367
|
+
if (d)
|
|
368
|
+
return i(d[0]);
|
|
369
|
+
const h = (y) => {
|
|
370
|
+
y && i(y[0]);
|
|
371
|
+
}, M = () => {
|
|
372
|
+
o.unsub(h);
|
|
560
373
|
};
|
|
561
|
-
o.sub(
|
|
374
|
+
o.sub(h), l.on("finalized", M);
|
|
562
375
|
}, r)),
|
|
563
|
-
|
|
376
|
+
w.mapBoth(_, _)
|
|
564
377
|
);
|
|
565
378
|
}
|
|
566
|
-
function
|
|
379
|
+
function it(e, t, r) {
|
|
567
380
|
const { postEvent: n } = r || {};
|
|
568
|
-
return
|
|
381
|
+
return A(
|
|
569
382
|
// @ts-expect-error TypeScript will not be able to handle our overrides here.
|
|
570
|
-
|
|
383
|
+
U(e, t, {
|
|
571
384
|
...r,
|
|
572
385
|
postEvent: n ? (...a) => {
|
|
573
386
|
try {
|
|
574
|
-
return n(...a),
|
|
387
|
+
return n(...a), c.right(void 0);
|
|
575
388
|
} catch (o) {
|
|
576
|
-
return
|
|
389
|
+
return c.left(o);
|
|
577
390
|
}
|
|
578
|
-
} :
|
|
391
|
+
} : x
|
|
579
392
|
})
|
|
580
393
|
);
|
|
581
394
|
}
|
|
582
|
-
function
|
|
583
|
-
const r =
|
|
395
|
+
function pt(e, t) {
|
|
396
|
+
const r = $e(
|
|
584
397
|
// @ts-expect-error TS doesn't get what override we are going to use.
|
|
585
398
|
e,
|
|
586
399
|
t
|
|
587
400
|
);
|
|
588
|
-
return typeof r == "function" ?
|
|
401
|
+
return typeof r == "function" ? te.fn(() => A(r)) : r;
|
|
589
402
|
}
|
|
590
|
-
function
|
|
591
|
-
const r =
|
|
403
|
+
function $e(e, t) {
|
|
404
|
+
const r = se(window);
|
|
592
405
|
if (!e)
|
|
593
|
-
return r || f(C(),
|
|
406
|
+
return r || f.pipe(C(), c.match(() => !1, () => !0));
|
|
594
407
|
if (r)
|
|
595
|
-
return
|
|
408
|
+
return w.right(!0);
|
|
596
409
|
const { timeout: n = 100 } = t || {};
|
|
597
|
-
return f(
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
(a) =>
|
|
601
|
-
() =>
|
|
410
|
+
return f.pipe(
|
|
411
|
+
U("web_app_request_theme", "theme_changed", { ...t, timeout: n }),
|
|
412
|
+
w.match(
|
|
413
|
+
(a) => be.is(a) || pe.is(a) ? c.right(!1) : c.left(a),
|
|
414
|
+
() => c.right(!0)
|
|
602
415
|
)
|
|
603
416
|
);
|
|
604
417
|
}
|
|
605
|
-
function
|
|
418
|
+
function ct({ launchParams: e, onEvent: t, resetPostMessage: r } = {}) {
|
|
606
419
|
if (e) {
|
|
607
420
|
const o = typeof e == "string" || e instanceof URLSearchParams ? e.toString() : (
|
|
608
421
|
// Here we have to trick serializeLaunchParamsQuery into thinking, it serializes a valid
|
|
609
422
|
// value. We are doing it because we are working with tgWebAppData presented as a
|
|
610
423
|
// string, not an object as serializeLaunchParamsQuery requires.
|
|
611
|
-
|
|
424
|
+
Ee({ ...e, tgWebAppData: void 0 }) + (e.tgWebAppData ? `&tgWebAppData=${encodeURIComponent(e.tgWebAppData.toString())}` : "")
|
|
612
425
|
);
|
|
613
426
|
try {
|
|
614
|
-
|
|
427
|
+
Pe(o);
|
|
615
428
|
} catch (s) {
|
|
616
|
-
throw new
|
|
429
|
+
throw new Ae(o, s);
|
|
617
430
|
}
|
|
618
|
-
|
|
431
|
+
X("launchParams", o);
|
|
619
432
|
}
|
|
620
|
-
if (
|
|
433
|
+
if (ie()) {
|
|
621
434
|
if (!t)
|
|
622
435
|
return;
|
|
623
|
-
r &&
|
|
624
|
-
const o =
|
|
625
|
-
|
|
626
|
-
const [
|
|
436
|
+
r && P.reset();
|
|
437
|
+
const o = P();
|
|
438
|
+
P.set((...s) => {
|
|
439
|
+
const [p] = s, _ = () => {
|
|
627
440
|
o(...s);
|
|
628
441
|
};
|
|
629
442
|
try {
|
|
630
|
-
const
|
|
631
|
-
t({ name:
|
|
443
|
+
const i = F(ne(oe()), p);
|
|
444
|
+
t({ name: i.eventType, params: i.eventData }, _);
|
|
632
445
|
} catch {
|
|
633
|
-
|
|
446
|
+
_();
|
|
634
447
|
}
|
|
635
448
|
});
|
|
636
449
|
return;
|
|
@@ -640,20 +453,20 @@ function tr({ launchParams: e, onEvent: t, resetPostMessage: r } = {}) {
|
|
|
640
453
|
window.TelegramWebviewProxy = {
|
|
641
454
|
...n,
|
|
642
455
|
postEvent(o, s) {
|
|
643
|
-
const
|
|
456
|
+
const p = () => {
|
|
644
457
|
a(o, s);
|
|
645
458
|
};
|
|
646
459
|
t ? t({
|
|
647
460
|
name: o,
|
|
648
461
|
params: s ? JSON.parse(s) : void 0
|
|
649
|
-
},
|
|
462
|
+
}, p) : p();
|
|
650
463
|
}
|
|
651
464
|
}, g().log("Environment was mocked by the mockTelegramEnv function");
|
|
652
465
|
}
|
|
653
|
-
function
|
|
466
|
+
function ze(e) {
|
|
654
467
|
return ({ req_id: t }) => t === e;
|
|
655
468
|
}
|
|
656
|
-
const
|
|
469
|
+
const N = {
|
|
657
470
|
"6.0": [
|
|
658
471
|
"iframe_ready",
|
|
659
472
|
"iframe_will_reload",
|
|
@@ -741,52 +554,52 @@ const K = {
|
|
|
741
554
|
],
|
|
742
555
|
9.1: ["web_app_hide_keyboard"]
|
|
743
556
|
};
|
|
744
|
-
function
|
|
745
|
-
return Object.keys(
|
|
557
|
+
function Q(e, t) {
|
|
558
|
+
return Object.keys(N).find((n) => N[n].some((a) => t ? typeof a == "object" && a.method === e && a.param === t : a === e)) || null;
|
|
746
559
|
}
|
|
747
|
-
function
|
|
560
|
+
function H(e) {
|
|
748
561
|
return e.split(".").map(Number);
|
|
749
562
|
}
|
|
750
|
-
function
|
|
751
|
-
const r =
|
|
563
|
+
function Ve(e, t) {
|
|
564
|
+
const r = H(e), n = H(t), a = Math.max(r.length, n.length);
|
|
752
565
|
for (let o = 0; o < a; o += 1) {
|
|
753
|
-
const s = r[o] || 0,
|
|
754
|
-
if (s !==
|
|
755
|
-
return s >
|
|
566
|
+
const s = r[o] || 0, p = n[o] || 0;
|
|
567
|
+
if (s !== p)
|
|
568
|
+
return s > p ? 1 : -1;
|
|
756
569
|
}
|
|
757
570
|
return 0;
|
|
758
571
|
}
|
|
759
|
-
function
|
|
760
|
-
const n = r ?
|
|
572
|
+
function K(e, t, r) {
|
|
573
|
+
const n = r ? Q(
|
|
761
574
|
e,
|
|
762
575
|
t
|
|
763
|
-
) :
|
|
764
|
-
return n ?
|
|
576
|
+
) : Q(e);
|
|
577
|
+
return n ? Ve(n, r || t) <= 0 : !1;
|
|
765
578
|
}
|
|
766
|
-
function
|
|
579
|
+
function _t(e, t = "strict") {
|
|
767
580
|
const r = typeof t == "function" ? t : (n) => {
|
|
768
|
-
const { method: a, version: o } = n, s = "param" in n ? new
|
|
581
|
+
const { method: a, version: o } = n, s = "param" in n ? new Se(a, n.param, o) : new xe(a, o);
|
|
769
582
|
if (t === "strict")
|
|
770
583
|
throw s;
|
|
771
584
|
return g().forceWarn(s.message);
|
|
772
585
|
};
|
|
773
|
-
return (n, a) =>
|
|
586
|
+
return (n, a) => K(n, e) ? n === "web_app_set_header_color" && O(m({ color: we() }), a) && !K(n, "color", e) ? r({ version: e, method: n, param: "color" }) : Ie(n, a) : r({ version: e, method: n });
|
|
774
587
|
}
|
|
775
|
-
function
|
|
776
|
-
return f(
|
|
777
|
-
|
|
588
|
+
function Be(e, t, r, n) {
|
|
589
|
+
return f.pipe(
|
|
590
|
+
U("web_app_invoke_custom_method", "custom_method_invoked", {
|
|
778
591
|
...n || {},
|
|
779
592
|
params: { method: e, params: t, req_id: r },
|
|
780
|
-
capture:
|
|
593
|
+
capture: ze(r)
|
|
781
594
|
}),
|
|
782
|
-
|
|
595
|
+
w.chain(({ result: a, error: o }) => o ? w.left(new Ce(o)) : w.right(a))
|
|
783
596
|
);
|
|
784
597
|
}
|
|
785
|
-
function
|
|
786
|
-
return
|
|
598
|
+
function ut(e, t, r, n) {
|
|
599
|
+
return te.fn(() => f.pipe(
|
|
787
600
|
// @ts-expect-error TypeScript is unable to determine required override.
|
|
788
|
-
|
|
789
|
-
|
|
601
|
+
Be(e, t, r, n),
|
|
602
|
+
w.match(
|
|
790
603
|
(a) => {
|
|
791
604
|
throw a;
|
|
792
605
|
},
|
|
@@ -794,153 +607,148 @@ function nr(e, t, r, n) {
|
|
|
794
607
|
)
|
|
795
608
|
)());
|
|
796
609
|
}
|
|
797
|
-
function
|
|
610
|
+
function Ge(e, t, r = {}) {
|
|
798
611
|
const {
|
|
799
612
|
// If no capture function was passed, we capture the first compatible event.
|
|
800
613
|
capture: n = () => !0,
|
|
801
|
-
postEvent: a =
|
|
802
|
-
} = r, o =
|
|
803
|
-
(Array.isArray(t) ? t : [t]).forEach((
|
|
614
|
+
postEvent: a = x
|
|
615
|
+
} = r, o = b(), [s, p] = Z();
|
|
616
|
+
(Array.isArray(t) ? t : [t]).forEach((i) => {
|
|
804
617
|
s(
|
|
805
|
-
j(
|
|
806
|
-
(Array.isArray(t) ? n({ event:
|
|
618
|
+
j(i, (u) => {
|
|
619
|
+
(Array.isArray(t) ? n({ event: i, payload: u }) : n(u)) && o.set([u]);
|
|
807
620
|
})
|
|
808
621
|
);
|
|
809
622
|
});
|
|
810
|
-
const
|
|
811
|
-
return f(
|
|
623
|
+
const _ = (i) => (p(), i);
|
|
624
|
+
return f.pipe(
|
|
812
625
|
async () => a(e, r.params),
|
|
813
|
-
|
|
814
|
-
const
|
|
815
|
-
if (
|
|
816
|
-
return
|
|
817
|
-
const
|
|
818
|
-
y &&
|
|
819
|
-
},
|
|
820
|
-
o.unsub(
|
|
626
|
+
w.chainW(() => ee((i, u, l) => {
|
|
627
|
+
const d = o();
|
|
628
|
+
if (d)
|
|
629
|
+
return i(d[0]);
|
|
630
|
+
const h = (y) => {
|
|
631
|
+
y && i(y[0]);
|
|
632
|
+
}, M = () => {
|
|
633
|
+
o.unsub(h);
|
|
821
634
|
};
|
|
822
|
-
o.sub(
|
|
635
|
+
o.sub(h), l.on("finalized", M);
|
|
823
636
|
}, r)),
|
|
824
|
-
|
|
637
|
+
w.mapBoth(_, _)
|
|
825
638
|
);
|
|
826
639
|
}
|
|
827
|
-
function
|
|
640
|
+
function lt(e, t, r) {
|
|
828
641
|
const { postEvent: n } = r || {};
|
|
829
|
-
return
|
|
642
|
+
return A(
|
|
830
643
|
// @ts-expect-error TypeScript will not be able to handle our overrides here.
|
|
831
|
-
|
|
644
|
+
Ge(e, t, {
|
|
832
645
|
...r,
|
|
833
646
|
postEvent: n ? (...a) => {
|
|
834
647
|
try {
|
|
835
|
-
return n(...a),
|
|
648
|
+
return n(...a), c.right(void 0);
|
|
836
649
|
} catch (o) {
|
|
837
|
-
return
|
|
650
|
+
return c.left(o);
|
|
838
651
|
}
|
|
839
|
-
} :
|
|
652
|
+
} : x
|
|
840
653
|
})
|
|
841
654
|
);
|
|
842
655
|
}
|
|
843
|
-
function
|
|
656
|
+
function ft() {
|
|
844
657
|
Object.hasOwn || (Object.hasOwn = function(e, t) {
|
|
845
658
|
return Object.prototype.hasOwnProperty.call(e, t);
|
|
846
659
|
});
|
|
847
660
|
}
|
|
848
|
-
function
|
|
849
|
-
return
|
|
661
|
+
function le(e) {
|
|
662
|
+
return c.tryCatch(() => decodeURIComponent(
|
|
850
663
|
atob(
|
|
851
664
|
e.replace(/-/g, "+").replace(/_/g, "/")
|
|
852
665
|
).split("").map((t) => "%" + ("00" + t.charCodeAt(0).toString(16)).slice(-2)).join("")
|
|
853
666
|
), (t) => t);
|
|
854
667
|
}
|
|
855
|
-
const
|
|
856
|
-
function
|
|
668
|
+
const mt = T(le);
|
|
669
|
+
function fe(e) {
|
|
857
670
|
return btoa(
|
|
858
671
|
encodeURIComponent(e).replace(/%([0-9A-F]{2})/g, (t, r) => String.fromCharCode(parseInt(`0x${r}`)))
|
|
859
672
|
).replace(/\+/g, "-").replace(/\//g, "_");
|
|
860
673
|
}
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
function
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
}
|
|
870
|
-
const ir = T(It);
|
|
871
|
-
function ur(e, t) {
|
|
872
|
-
return $(
|
|
873
|
-
Ot(
|
|
674
|
+
function De(e) {
|
|
675
|
+
const t = fe(typeof e == "string" ? e : JSON.stringify(e));
|
|
676
|
+
return t.length > 512 ? c.left(new Error("Value is too long for start parameter")) : c.right(t);
|
|
677
|
+
}
|
|
678
|
+
const wt = T(De);
|
|
679
|
+
function dt(e, t) {
|
|
680
|
+
return A(
|
|
681
|
+
Je(
|
|
874
682
|
e,
|
|
875
683
|
// @ts-expect-error TypeScript is unable to detect a correct override.
|
|
876
|
-
typeof t == "function" ? (r) =>
|
|
684
|
+
typeof t == "function" ? (r) => c.tryCatch(() => t(r), (n) => n) : t
|
|
877
685
|
)
|
|
878
686
|
);
|
|
879
687
|
}
|
|
880
|
-
function
|
|
881
|
-
return f(
|
|
882
|
-
|
|
883
|
-
|
|
688
|
+
function Je(e, t) {
|
|
689
|
+
return f.pipe(
|
|
690
|
+
le(e),
|
|
691
|
+
c.chain((r) => t ? typeof t == "function" ? t(r) : he.parse(r) : c.right(r))
|
|
884
692
|
);
|
|
885
693
|
}
|
|
886
|
-
function
|
|
887
|
-
return
|
|
694
|
+
function gt(e) {
|
|
695
|
+
return fe(e).length <= 512;
|
|
888
696
|
}
|
|
889
697
|
export {
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
698
|
+
Pt as CancelledError,
|
|
699
|
+
Ae as InvalidLaunchParamsError,
|
|
700
|
+
Ce as InvokeCustomMethodFailedError,
|
|
701
|
+
Te as LaunchParamsRetrieveError,
|
|
702
|
+
Se as MethodParameterUnsupportedError,
|
|
703
|
+
xe as MethodUnsupportedError,
|
|
704
|
+
kt as TimeoutError,
|
|
705
|
+
pe as UnknownEnvError,
|
|
706
|
+
ft as applyPolyfills,
|
|
707
|
+
ze as captureSameReq,
|
|
708
|
+
Ve as compareVersions,
|
|
709
|
+
yt as createLogger,
|
|
710
|
+
_t as createPostEvent,
|
|
711
|
+
wt as createStartParam,
|
|
712
|
+
De as createStartParamFp,
|
|
713
|
+
ce as debug,
|
|
714
|
+
mt as decodeBase64Url,
|
|
715
|
+
le as decodeBase64UrlFp,
|
|
716
|
+
dt as decodeStartParam,
|
|
717
|
+
Je as decodeStartParamFp,
|
|
718
|
+
vt as deepSnakeToCamelObjKeys,
|
|
911
719
|
q as emitEvent,
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
720
|
+
fe as encodeBase64Url,
|
|
721
|
+
Q as getReleaseVersion,
|
|
722
|
+
se as hasWebviewProxy,
|
|
723
|
+
ut as invokeCustomMethod,
|
|
724
|
+
Be as invokeCustomMethodFp,
|
|
725
|
+
ie as isIframe,
|
|
726
|
+
gt as isSafeToCreateStartParam,
|
|
727
|
+
pt as isTMA,
|
|
728
|
+
$e as isTMAFp,
|
|
921
729
|
g as logger,
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
730
|
+
ct as mockTelegramEnv,
|
|
731
|
+
Oe as off,
|
|
732
|
+
je as offAll,
|
|
925
733
|
j as on,
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
734
|
+
Ie as postEvent,
|
|
735
|
+
x as postEventFp,
|
|
736
|
+
Ue as postMessage,
|
|
737
|
+
P as postMessageImpl,
|
|
738
|
+
lt as request,
|
|
739
|
+
it as request2,
|
|
740
|
+
U as request2Fp,
|
|
741
|
+
Ge as requestFp,
|
|
742
|
+
st as resetGlobals,
|
|
743
|
+
tt as retrieveLaunchParams,
|
|
744
|
+
Me as retrieveLaunchParamsFp,
|
|
745
|
+
rt as retrieveRawInitData,
|
|
746
|
+
qe as retrieveRawInitDataFp,
|
|
747
|
+
nt as retrieveRawLaunchParams,
|
|
940
748
|
C as retrieveRawLaunchParamsFp,
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
749
|
+
ot as setDebug,
|
|
750
|
+
at as setTargetOrigin,
|
|
751
|
+
K as supports,
|
|
752
|
+
_e as targetOrigin
|
|
945
753
|
};
|
|
946
754
|
//# sourceMappingURL=index.js.map
|