@linxai/3d-web 0.1.0 → 0.1.1
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/chunk-WUKYLWAZ.mjs +0 -0
- package/dist/hls-UG2Y6VAT.mjs +33000 -0
- package/dist/index.d.mts +87 -0
- package/dist/index.d.ts +87 -0
- package/dist/index.js +4969 -0
- package/dist/index.mjs +4929 -0
- package/dist/vision_bundle-JCRSWKU6.mjs +4084 -0
- package/package.json +13 -7
- package/src/adapters/AnimationLoaderAdapter.ts +0 -34
- package/src/adapters/ModelLoaderAdapter.ts +0 -34
- package/src/builders/SceneBuilder.tsx +0 -91
- package/src/components/CharacterOverlay.tsx +0 -183
- package/src/components/CharacterView.tsx +0 -165
- package/src/components/ProgressBar.tsx +0 -69
- package/src/components/Scene3D.tsx +0 -89
- package/src/components/Subtitle.tsx +0 -89
- package/src/hooks/useModelLoader.ts +0 -12
- package/src/index.tsx +0 -44
- package/tsconfig.json +0 -23
- package/tsup.config.ts +0 -19
|
@@ -0,0 +1,4084 @@
|
|
|
1
|
+
import "./chunk-WUKYLWAZ.mjs";
|
|
2
|
+
|
|
3
|
+
// ../../node_modules/@mediapipe/tasks-vision/vision_bundle.mjs
|
|
4
|
+
var t = "undefined" != typeof self ? self : {};
|
|
5
|
+
function e(e2, n2) {
|
|
6
|
+
t: {
|
|
7
|
+
for (var r2 = ["CLOSURE_FLAGS"], i2 = t, s2 = 0; s2 < r2.length; s2++) if (null == (i2 = i2[r2[s2]])) {
|
|
8
|
+
r2 = null;
|
|
9
|
+
break t;
|
|
10
|
+
}
|
|
11
|
+
r2 = i2;
|
|
12
|
+
}
|
|
13
|
+
return null != (e2 = r2 && r2[e2]) ? e2 : n2;
|
|
14
|
+
}
|
|
15
|
+
function n() {
|
|
16
|
+
throw Error("Invalid UTF8");
|
|
17
|
+
}
|
|
18
|
+
function r(t2, e2) {
|
|
19
|
+
return e2 = String.fromCharCode.apply(null, e2), null == t2 ? e2 : t2 + e2;
|
|
20
|
+
}
|
|
21
|
+
var i;
|
|
22
|
+
var s;
|
|
23
|
+
var o = "undefined" != typeof TextDecoder;
|
|
24
|
+
var a;
|
|
25
|
+
var h = "undefined" != typeof TextEncoder;
|
|
26
|
+
function c(t2) {
|
|
27
|
+
if (h) t2 = (a || (a = new TextEncoder())).encode(t2);
|
|
28
|
+
else {
|
|
29
|
+
let n2 = 0;
|
|
30
|
+
const r2 = new Uint8Array(3 * t2.length);
|
|
31
|
+
for (let i2 = 0; i2 < t2.length; i2++) {
|
|
32
|
+
var e2 = t2.charCodeAt(i2);
|
|
33
|
+
if (e2 < 128) r2[n2++] = e2;
|
|
34
|
+
else {
|
|
35
|
+
if (e2 < 2048) r2[n2++] = e2 >> 6 | 192;
|
|
36
|
+
else {
|
|
37
|
+
if (e2 >= 55296 && e2 <= 57343) {
|
|
38
|
+
if (e2 <= 56319 && i2 < t2.length) {
|
|
39
|
+
const s2 = t2.charCodeAt(++i2);
|
|
40
|
+
if (s2 >= 56320 && s2 <= 57343) {
|
|
41
|
+
e2 = 1024 * (e2 - 55296) + s2 - 56320 + 65536, r2[n2++] = e2 >> 18 | 240, r2[n2++] = e2 >> 12 & 63 | 128, r2[n2++] = e2 >> 6 & 63 | 128, r2[n2++] = 63 & e2 | 128;
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
i2--;
|
|
45
|
+
}
|
|
46
|
+
e2 = 65533;
|
|
47
|
+
}
|
|
48
|
+
r2[n2++] = e2 >> 12 | 224, r2[n2++] = e2 >> 6 & 63 | 128;
|
|
49
|
+
}
|
|
50
|
+
r2[n2++] = 63 & e2 | 128;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
t2 = n2 === r2.length ? r2 : r2.subarray(0, n2);
|
|
54
|
+
}
|
|
55
|
+
return t2;
|
|
56
|
+
}
|
|
57
|
+
var u;
|
|
58
|
+
var l = e(610401301, false);
|
|
59
|
+
var f = e(653718497, e(1, true));
|
|
60
|
+
var d = e(660014094, false);
|
|
61
|
+
var p = t.navigator;
|
|
62
|
+
function g(t2) {
|
|
63
|
+
return !!l && (!!u && u.brands.some((({ brand: e2 }) => e2 && -1 != e2.indexOf(t2))));
|
|
64
|
+
}
|
|
65
|
+
function m(e2) {
|
|
66
|
+
var n2;
|
|
67
|
+
return (n2 = t.navigator) && (n2 = n2.userAgent) || (n2 = ""), -1 != n2.indexOf(e2);
|
|
68
|
+
}
|
|
69
|
+
function y() {
|
|
70
|
+
return !!l && (!!u && u.brands.length > 0);
|
|
71
|
+
}
|
|
72
|
+
function _() {
|
|
73
|
+
return y() ? g("Chromium") : (m("Chrome") || m("CriOS")) && !(!y() && m("Edge")) || m("Silk");
|
|
74
|
+
}
|
|
75
|
+
function v(t2) {
|
|
76
|
+
return v[" "](t2), t2;
|
|
77
|
+
}
|
|
78
|
+
u = p && p.userAgentData || null, v[" "] = function() {
|
|
79
|
+
};
|
|
80
|
+
var E = !y() && (m("Trident") || m("MSIE"));
|
|
81
|
+
!m("Android") || _(), _(), m("Safari") && (_() || !y() && m("Coast") || !y() && m("Opera") || !y() && m("Edge") || (y() ? g("Microsoft Edge") : m("Edg/")) || y() && g("Opera"));
|
|
82
|
+
var w = {};
|
|
83
|
+
var T = null;
|
|
84
|
+
function A(t2) {
|
|
85
|
+
var e2 = t2.length, n2 = 3 * e2 / 4;
|
|
86
|
+
n2 % 3 ? n2 = Math.floor(n2) : -1 != "=.".indexOf(t2[e2 - 1]) && (n2 = -1 != "=.".indexOf(t2[e2 - 2]) ? n2 - 2 : n2 - 1);
|
|
87
|
+
var r2 = new Uint8Array(n2), i2 = 0;
|
|
88
|
+
return (function(t3, e3) {
|
|
89
|
+
function n3(e4) {
|
|
90
|
+
for (; r3 < t3.length; ) {
|
|
91
|
+
var n4 = t3.charAt(r3++), i4 = T[n4];
|
|
92
|
+
if (null != i4) return i4;
|
|
93
|
+
if (!/^[\s\xa0]*$/.test(n4)) throw Error("Unknown base64 encoding at char: " + n4);
|
|
94
|
+
}
|
|
95
|
+
return e4;
|
|
96
|
+
}
|
|
97
|
+
b();
|
|
98
|
+
for (var r3 = 0; ; ) {
|
|
99
|
+
var i3 = n3(-1), s2 = n3(0), o2 = n3(64), a2 = n3(64);
|
|
100
|
+
if (64 === a2 && -1 === i3) break;
|
|
101
|
+
e3(i3 << 2 | s2 >> 4), 64 != o2 && (e3(s2 << 4 & 240 | o2 >> 2), 64 != a2 && e3(o2 << 6 & 192 | a2));
|
|
102
|
+
}
|
|
103
|
+
})(t2, (function(t3) {
|
|
104
|
+
r2[i2++] = t3;
|
|
105
|
+
})), i2 !== n2 ? r2.subarray(0, i2) : r2;
|
|
106
|
+
}
|
|
107
|
+
function b() {
|
|
108
|
+
if (!T) {
|
|
109
|
+
T = {};
|
|
110
|
+
for (var t2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""), e2 = ["+/=", "+/", "-_=", "-_.", "-_"], n2 = 0; n2 < 5; n2++) {
|
|
111
|
+
var r2 = t2.concat(e2[n2].split(""));
|
|
112
|
+
w[n2] = r2;
|
|
113
|
+
for (var i2 = 0; i2 < r2.length; i2++) {
|
|
114
|
+
var s2 = r2[i2];
|
|
115
|
+
void 0 === T[s2] && (T[s2] = i2);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
var k = "undefined" != typeof Uint8Array;
|
|
121
|
+
var S = !E && "function" == typeof btoa;
|
|
122
|
+
function x(t2) {
|
|
123
|
+
if (!S) {
|
|
124
|
+
var e2;
|
|
125
|
+
void 0 === e2 && (e2 = 0), b(), e2 = w[e2];
|
|
126
|
+
var n2 = Array(Math.floor(t2.length / 3)), r2 = e2[64] || "";
|
|
127
|
+
let h2 = 0, c2 = 0;
|
|
128
|
+
for (; h2 < t2.length - 2; h2 += 3) {
|
|
129
|
+
var i2 = t2[h2], s2 = t2[h2 + 1], o2 = t2[h2 + 2], a2 = e2[i2 >> 2];
|
|
130
|
+
i2 = e2[(3 & i2) << 4 | s2 >> 4], s2 = e2[(15 & s2) << 2 | o2 >> 6], o2 = e2[63 & o2], n2[c2++] = a2 + i2 + s2 + o2;
|
|
131
|
+
}
|
|
132
|
+
switch (a2 = 0, o2 = r2, t2.length - h2) {
|
|
133
|
+
case 2:
|
|
134
|
+
o2 = e2[(15 & (a2 = t2[h2 + 1])) << 2] || r2;
|
|
135
|
+
case 1:
|
|
136
|
+
t2 = t2[h2], n2[c2] = e2[t2 >> 2] + e2[(3 & t2) << 4 | a2 >> 4] + o2 + r2;
|
|
137
|
+
}
|
|
138
|
+
return n2.join("");
|
|
139
|
+
}
|
|
140
|
+
for (e2 = "", n2 = 0, r2 = t2.length - 10240; n2 < r2; ) e2 += String.fromCharCode.apply(null, t2.subarray(n2, n2 += 10240));
|
|
141
|
+
return e2 += String.fromCharCode.apply(null, n2 ? t2.subarray(n2) : t2), btoa(e2);
|
|
142
|
+
}
|
|
143
|
+
var L = /[-_.]/g;
|
|
144
|
+
var R = { "-": "+", _: "/", ".": "=" };
|
|
145
|
+
function F(t2) {
|
|
146
|
+
return R[t2] || "";
|
|
147
|
+
}
|
|
148
|
+
function M(t2) {
|
|
149
|
+
if (!S) return A(t2);
|
|
150
|
+
L.test(t2) && (t2 = t2.replace(L, F)), t2 = atob(t2);
|
|
151
|
+
const e2 = new Uint8Array(t2.length);
|
|
152
|
+
for (let n2 = 0; n2 < t2.length; n2++) e2[n2] = t2.charCodeAt(n2);
|
|
153
|
+
return e2;
|
|
154
|
+
}
|
|
155
|
+
function I(t2) {
|
|
156
|
+
return k && null != t2 && t2 instanceof Uint8Array;
|
|
157
|
+
}
|
|
158
|
+
var P = {};
|
|
159
|
+
var O;
|
|
160
|
+
function C(t2) {
|
|
161
|
+
if (t2 !== P) throw Error("illegal external caller");
|
|
162
|
+
}
|
|
163
|
+
function N() {
|
|
164
|
+
return O || (O = new D(null, P));
|
|
165
|
+
}
|
|
166
|
+
function U(t2) {
|
|
167
|
+
C(P);
|
|
168
|
+
var e2 = t2.ba;
|
|
169
|
+
return null == (e2 = null == e2 || I(e2) ? e2 : "string" == typeof e2 ? M(e2) : null) ? e2 : t2.ba = e2;
|
|
170
|
+
}
|
|
171
|
+
var D = class {
|
|
172
|
+
constructor(t2, e2) {
|
|
173
|
+
if (C(e2), this.ba = t2, null != t2 && 0 === t2.length) throw Error("ByteString should be constructed with non-empty values");
|
|
174
|
+
}
|
|
175
|
+
ua() {
|
|
176
|
+
return new Uint8Array(U(this) || 0);
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
function B(t2, e2) {
|
|
180
|
+
t2.__closure__error__context__984382 || (t2.__closure__error__context__984382 = {}), t2.__closure__error__context__984382.severity = e2;
|
|
181
|
+
}
|
|
182
|
+
var G;
|
|
183
|
+
function j() {
|
|
184
|
+
const e2 = Error();
|
|
185
|
+
B(e2, "incident"), (function(e3) {
|
|
186
|
+
t.setTimeout((() => {
|
|
187
|
+
throw e3;
|
|
188
|
+
}), 0);
|
|
189
|
+
})(e2);
|
|
190
|
+
}
|
|
191
|
+
function V(t2) {
|
|
192
|
+
return B(t2 = Error(t2), "warning"), t2;
|
|
193
|
+
}
|
|
194
|
+
function X() {
|
|
195
|
+
return "function" == typeof BigInt;
|
|
196
|
+
}
|
|
197
|
+
function H(t2) {
|
|
198
|
+
return Array.prototype.slice.call(t2);
|
|
199
|
+
}
|
|
200
|
+
var W = "function" == typeof Symbol && "symbol" == typeof /* @__PURE__ */ Symbol();
|
|
201
|
+
function z(t2) {
|
|
202
|
+
return "function" == typeof Symbol && "symbol" == typeof /* @__PURE__ */ Symbol() ? /* @__PURE__ */ Symbol() : t2;
|
|
203
|
+
}
|
|
204
|
+
var K = z();
|
|
205
|
+
var Y = z("0di");
|
|
206
|
+
var $ = z("2ex");
|
|
207
|
+
var q = z("1oa");
|
|
208
|
+
var J = z("0dg");
|
|
209
|
+
var Z = W ? (t2, e2) => {
|
|
210
|
+
t2[K] |= e2;
|
|
211
|
+
} : (t2, e2) => {
|
|
212
|
+
void 0 !== t2.G ? t2.G |= e2 : Object.defineProperties(t2, { G: { value: e2, configurable: true, writable: true, enumerable: false } });
|
|
213
|
+
};
|
|
214
|
+
var Q = W ? (t2, e2) => {
|
|
215
|
+
t2[K] &= ~e2;
|
|
216
|
+
} : (t2, e2) => {
|
|
217
|
+
void 0 !== t2.G && (t2.G &= ~e2);
|
|
218
|
+
};
|
|
219
|
+
var tt = W ? (t2) => 0 | t2[K] : (t2) => 0 | t2.G;
|
|
220
|
+
var et = W ? (t2) => t2[K] : (t2) => t2.G;
|
|
221
|
+
var nt = W ? (t2, e2) => {
|
|
222
|
+
t2[K] = e2;
|
|
223
|
+
} : (t2, e2) => {
|
|
224
|
+
void 0 !== t2.G ? t2.G = e2 : Object.defineProperties(t2, { G: { value: e2, configurable: true, writable: true, enumerable: false } });
|
|
225
|
+
};
|
|
226
|
+
function rt(t2) {
|
|
227
|
+
return Z(t2, 34), t2;
|
|
228
|
+
}
|
|
229
|
+
function it(t2, e2) {
|
|
230
|
+
nt(e2, -14591 & (0 | t2));
|
|
231
|
+
}
|
|
232
|
+
function st(t2, e2) {
|
|
233
|
+
nt(e2, -14557 & (34 | t2));
|
|
234
|
+
}
|
|
235
|
+
var ot;
|
|
236
|
+
var at = {};
|
|
237
|
+
var ht = {};
|
|
238
|
+
function ct(t2) {
|
|
239
|
+
return !(!t2 || "object" != typeof t2 || t2.La !== ht);
|
|
240
|
+
}
|
|
241
|
+
function ut(t2) {
|
|
242
|
+
return null !== t2 && "object" == typeof t2 && !Array.isArray(t2) && t2.constructor === Object;
|
|
243
|
+
}
|
|
244
|
+
function lt(t2, e2, n2) {
|
|
245
|
+
if (null != t2) {
|
|
246
|
+
if ("string" == typeof t2) t2 = t2 ? new D(t2, P) : N();
|
|
247
|
+
else if (t2.constructor !== D) if (I(t2)) t2 = t2.length ? new D(n2 ? t2 : new Uint8Array(t2), P) : N();
|
|
248
|
+
else {
|
|
249
|
+
if (!e2) throw Error();
|
|
250
|
+
t2 = void 0;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
return t2;
|
|
254
|
+
}
|
|
255
|
+
function ft(t2) {
|
|
256
|
+
return !(!Array.isArray(t2) || t2.length) && !!(1 & tt(t2));
|
|
257
|
+
}
|
|
258
|
+
var dt = [];
|
|
259
|
+
function pt(t2) {
|
|
260
|
+
if (2 & t2) throw Error();
|
|
261
|
+
}
|
|
262
|
+
nt(dt, 55), ot = Object.freeze(dt);
|
|
263
|
+
var gt = class _gt {
|
|
264
|
+
constructor(t2, e2, n2) {
|
|
265
|
+
this.l = 0, this.g = t2, this.h = e2, this.m = n2;
|
|
266
|
+
}
|
|
267
|
+
next() {
|
|
268
|
+
if (this.l < this.g.length) {
|
|
269
|
+
const t2 = this.g[this.l++];
|
|
270
|
+
return { done: false, value: this.h ? this.h.call(this.m, t2) : t2 };
|
|
271
|
+
}
|
|
272
|
+
return { done: true, value: void 0 };
|
|
273
|
+
}
|
|
274
|
+
[Symbol.iterator]() {
|
|
275
|
+
return new _gt(this.g, this.h, this.m);
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
var mt;
|
|
279
|
+
function yt(t2, e2) {
|
|
280
|
+
(e2 = mt ? e2[mt] : void 0) && (t2[mt] = H(e2));
|
|
281
|
+
}
|
|
282
|
+
var _t = Object.freeze({});
|
|
283
|
+
Object.freeze({});
|
|
284
|
+
var vt = Object.freeze({});
|
|
285
|
+
function Et(t2) {
|
|
286
|
+
return t2.Sa = true, t2;
|
|
287
|
+
}
|
|
288
|
+
var wt = Et(((t2) => "number" == typeof t2));
|
|
289
|
+
var Tt = Et(((t2) => "string" == typeof t2));
|
|
290
|
+
var At = Et(((t2) => "boolean" == typeof t2));
|
|
291
|
+
var bt = "function" == typeof t.BigInt && "bigint" == typeof t.BigInt(0);
|
|
292
|
+
var kt = Et(((t2) => bt ? t2 >= xt && t2 <= Rt : "-" === t2[0] ? Ft(t2, St) : Ft(t2, Lt)));
|
|
293
|
+
var St = Number.MIN_SAFE_INTEGER.toString();
|
|
294
|
+
var xt = bt ? BigInt(Number.MIN_SAFE_INTEGER) : void 0;
|
|
295
|
+
var Lt = Number.MAX_SAFE_INTEGER.toString();
|
|
296
|
+
var Rt = bt ? BigInt(Number.MAX_SAFE_INTEGER) : void 0;
|
|
297
|
+
function Ft(t2, e2) {
|
|
298
|
+
if (t2.length > e2.length) return false;
|
|
299
|
+
if (t2.length < e2.length || t2 === e2) return true;
|
|
300
|
+
for (let n2 = 0; n2 < t2.length; n2++) {
|
|
301
|
+
const r2 = t2[n2], i2 = e2[n2];
|
|
302
|
+
if (r2 > i2) return false;
|
|
303
|
+
if (r2 < i2) return true;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
var Mt = "function" == typeof Uint8Array.prototype.slice;
|
|
307
|
+
var It;
|
|
308
|
+
var Pt = 0;
|
|
309
|
+
var Ot = 0;
|
|
310
|
+
function Ct(t2) {
|
|
311
|
+
const e2 = t2 >>> 0;
|
|
312
|
+
Pt = e2, Ot = (t2 - e2) / 4294967296 >>> 0;
|
|
313
|
+
}
|
|
314
|
+
function Nt(t2) {
|
|
315
|
+
if (t2 < 0) {
|
|
316
|
+
Ct(-t2);
|
|
317
|
+
const [e2, n2] = Xt(Pt, Ot);
|
|
318
|
+
Pt = e2 >>> 0, Ot = n2 >>> 0;
|
|
319
|
+
} else Ct(t2);
|
|
320
|
+
}
|
|
321
|
+
function Ut(t2) {
|
|
322
|
+
const e2 = It || (It = new DataView(new ArrayBuffer(8)));
|
|
323
|
+
e2.setFloat32(0, +t2, true), Ot = 0, Pt = e2.getUint32(0, true);
|
|
324
|
+
}
|
|
325
|
+
function Dt(t2, e2) {
|
|
326
|
+
return 4294967296 * e2 + (t2 >>> 0);
|
|
327
|
+
}
|
|
328
|
+
function Bt(t2, e2) {
|
|
329
|
+
const n2 = 2147483648 & e2;
|
|
330
|
+
return n2 && (e2 = ~e2 >>> 0, 0 == (t2 = 1 + ~t2 >>> 0) && (e2 = e2 + 1 >>> 0)), t2 = Dt(t2, e2), n2 ? -t2 : t2;
|
|
331
|
+
}
|
|
332
|
+
function Gt(t2, e2) {
|
|
333
|
+
if (t2 >>>= 0, (e2 >>>= 0) <= 2097151) var n2 = "" + (4294967296 * e2 + t2);
|
|
334
|
+
else X() ? n2 = "" + (BigInt(e2) << BigInt(32) | BigInt(t2)) : (t2 = (16777215 & t2) + 6777216 * (n2 = 16777215 & (t2 >>> 24 | e2 << 8)) + 6710656 * (e2 = e2 >> 16 & 65535), n2 += 8147497 * e2, e2 *= 2, t2 >= 1e7 && (n2 += t2 / 1e7 >>> 0, t2 %= 1e7), n2 >= 1e7 && (e2 += n2 / 1e7 >>> 0, n2 %= 1e7), n2 = e2 + jt(n2) + jt(t2));
|
|
335
|
+
return n2;
|
|
336
|
+
}
|
|
337
|
+
function jt(t2) {
|
|
338
|
+
return t2 = String(t2), "0000000".slice(t2.length) + t2;
|
|
339
|
+
}
|
|
340
|
+
function Vt(t2) {
|
|
341
|
+
if (t2.length < 16) Nt(Number(t2));
|
|
342
|
+
else if (X()) t2 = BigInt(t2), Pt = Number(t2 & BigInt(4294967295)) >>> 0, Ot = Number(t2 >> BigInt(32) & BigInt(4294967295));
|
|
343
|
+
else {
|
|
344
|
+
const e2 = +("-" === t2[0]);
|
|
345
|
+
Ot = Pt = 0;
|
|
346
|
+
const n2 = t2.length;
|
|
347
|
+
for (let r2 = e2, i2 = (n2 - e2) % 6 + e2; i2 <= n2; r2 = i2, i2 += 6) {
|
|
348
|
+
const e3 = Number(t2.slice(r2, i2));
|
|
349
|
+
Ot *= 1e6, Pt = 1e6 * Pt + e3, Pt >= 4294967296 && (Ot += Math.trunc(Pt / 4294967296), Ot >>>= 0, Pt >>>= 0);
|
|
350
|
+
}
|
|
351
|
+
if (e2) {
|
|
352
|
+
const [t3, e3] = Xt(Pt, Ot);
|
|
353
|
+
Pt = t3, Ot = e3;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
function Xt(t2, e2) {
|
|
358
|
+
return e2 = ~e2, t2 ? t2 = 1 + ~t2 : e2 += 1, [t2, e2];
|
|
359
|
+
}
|
|
360
|
+
function Ht(t2) {
|
|
361
|
+
return null == t2 || "number" == typeof t2 ? t2 : "NaN" === t2 || "Infinity" === t2 || "-Infinity" === t2 ? Number(t2) : void 0;
|
|
362
|
+
}
|
|
363
|
+
function Wt(t2) {
|
|
364
|
+
return null == t2 || "boolean" == typeof t2 ? t2 : "number" == typeof t2 ? !!t2 : void 0;
|
|
365
|
+
}
|
|
366
|
+
var zt = /^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;
|
|
367
|
+
function Kt(t2) {
|
|
368
|
+
const e2 = typeof t2;
|
|
369
|
+
switch (e2) {
|
|
370
|
+
case "bigint":
|
|
371
|
+
return true;
|
|
372
|
+
case "number":
|
|
373
|
+
return Number.isFinite(t2);
|
|
374
|
+
}
|
|
375
|
+
return "string" === e2 && zt.test(t2);
|
|
376
|
+
}
|
|
377
|
+
function Yt(t2) {
|
|
378
|
+
if (null == t2) return t2;
|
|
379
|
+
if ("string" == typeof t2) {
|
|
380
|
+
if (!t2) return;
|
|
381
|
+
t2 = +t2;
|
|
382
|
+
}
|
|
383
|
+
return "number" == typeof t2 && Number.isFinite(t2) ? 0 | t2 : void 0;
|
|
384
|
+
}
|
|
385
|
+
function $t(t2) {
|
|
386
|
+
if (null == t2) return t2;
|
|
387
|
+
if ("string" == typeof t2) {
|
|
388
|
+
if (!t2) return;
|
|
389
|
+
t2 = +t2;
|
|
390
|
+
}
|
|
391
|
+
return "number" == typeof t2 && Number.isFinite(t2) ? t2 >>> 0 : void 0;
|
|
392
|
+
}
|
|
393
|
+
function qt(t2) {
|
|
394
|
+
return "-" !== t2[0] && (t2.length < 20 || 20 === t2.length && Number(t2.substring(0, 6)) < 184467);
|
|
395
|
+
}
|
|
396
|
+
function Jt(t2) {
|
|
397
|
+
return t2 = Math.trunc(t2), Number.isSafeInteger(t2) || (Nt(t2), t2 = Bt(Pt, Ot)), t2;
|
|
398
|
+
}
|
|
399
|
+
function Zt(t2) {
|
|
400
|
+
var e2 = Math.trunc(Number(t2));
|
|
401
|
+
if (Number.isSafeInteger(e2)) return String(e2);
|
|
402
|
+
if (-1 !== (e2 = t2.indexOf(".")) && (t2 = t2.substring(0, e2)), !("-" === t2[0] ? t2.length < 20 || 20 === t2.length && Number(t2.substring(0, 7)) > -922337 : t2.length < 19 || 19 === t2.length && Number(t2.substring(0, 6)) < 922337)) if (Vt(t2), t2 = Pt, 2147483648 & (e2 = Ot)) if (X()) t2 = "" + (BigInt(0 | e2) << BigInt(32) | BigInt(t2 >>> 0));
|
|
403
|
+
else {
|
|
404
|
+
const [n2, r2] = Xt(t2, e2);
|
|
405
|
+
t2 = "-" + Gt(n2, r2);
|
|
406
|
+
}
|
|
407
|
+
else t2 = Gt(t2, e2);
|
|
408
|
+
return t2;
|
|
409
|
+
}
|
|
410
|
+
function Qt(t2) {
|
|
411
|
+
return null == t2 ? t2 : "bigint" == typeof t2 ? (kt(t2) ? t2 = Number(t2) : (t2 = BigInt.asIntN(64, t2), t2 = kt(t2) ? Number(t2) : String(t2)), t2) : Kt(t2) ? "number" == typeof t2 ? Jt(t2) : Zt(t2) : void 0;
|
|
412
|
+
}
|
|
413
|
+
function te(t2) {
|
|
414
|
+
if (null == t2) return t2;
|
|
415
|
+
var e2 = typeof t2;
|
|
416
|
+
if ("bigint" === e2) return String(BigInt.asUintN(64, t2));
|
|
417
|
+
if (Kt(t2)) {
|
|
418
|
+
if ("string" === e2) return e2 = Math.trunc(Number(t2)), Number.isSafeInteger(e2) && e2 >= 0 ? t2 = String(e2) : (-1 !== (e2 = t2.indexOf(".")) && (t2 = t2.substring(0, e2)), qt(t2) || (Vt(t2), t2 = Gt(Pt, Ot))), t2;
|
|
419
|
+
if ("number" === e2) return (t2 = Math.trunc(t2)) >= 0 && Number.isSafeInteger(t2) ? t2 : (function(t3) {
|
|
420
|
+
if (t3 < 0) {
|
|
421
|
+
Nt(t3);
|
|
422
|
+
const e3 = Gt(Pt, Ot);
|
|
423
|
+
return t3 = Number(e3), Number.isSafeInteger(t3) ? t3 : e3;
|
|
424
|
+
}
|
|
425
|
+
return qt(String(t3)) ? t3 : (Nt(t3), Dt(Pt, Ot));
|
|
426
|
+
})(t2);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
function ee(t2) {
|
|
430
|
+
if ("string" != typeof t2) throw Error();
|
|
431
|
+
return t2;
|
|
432
|
+
}
|
|
433
|
+
function ne(t2) {
|
|
434
|
+
if (null != t2 && "string" != typeof t2) throw Error();
|
|
435
|
+
return t2;
|
|
436
|
+
}
|
|
437
|
+
function re(t2) {
|
|
438
|
+
return null == t2 || "string" == typeof t2 ? t2 : void 0;
|
|
439
|
+
}
|
|
440
|
+
function ie(t2, e2, n2, r2) {
|
|
441
|
+
if (null != t2 && "object" == typeof t2 && t2.Y === at) return t2;
|
|
442
|
+
if (!Array.isArray(t2)) return n2 ? 2 & r2 ? (t2 = e2[Y]) ? e2 = t2 : (rt((t2 = new e2()).u), e2 = e2[Y] = t2) : e2 = new e2() : e2 = void 0, e2;
|
|
443
|
+
let i2 = n2 = tt(t2);
|
|
444
|
+
return 0 === i2 && (i2 |= 32 & r2), i2 |= 2 & r2, i2 !== n2 && nt(t2, i2), new e2(t2);
|
|
445
|
+
}
|
|
446
|
+
function se(t2, e2, n2) {
|
|
447
|
+
if (e2) t: {
|
|
448
|
+
if (!Kt(e2 = t2)) throw V("int64");
|
|
449
|
+
switch (typeof e2) {
|
|
450
|
+
case "string":
|
|
451
|
+
e2 = Zt(e2);
|
|
452
|
+
break t;
|
|
453
|
+
case "bigint":
|
|
454
|
+
if (t2 = e2 = BigInt.asIntN(64, e2), Tt(t2)) {
|
|
455
|
+
if (!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(t2)) throw Error(String(t2));
|
|
456
|
+
} else if (wt(t2) && !Number.isSafeInteger(t2)) throw Error(String(t2));
|
|
457
|
+
e2 = bt ? BigInt(e2) : At(e2) ? e2 ? "1" : "0" : Tt(e2) ? e2.trim() || "0" : String(e2);
|
|
458
|
+
break t;
|
|
459
|
+
default:
|
|
460
|
+
e2 = Jt(e2);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
else e2 = Qt(t2);
|
|
464
|
+
return "string" == typeof (n2 = null == (t2 = e2) ? n2 ? 0 : void 0 : t2) && (e2 = +n2, Number.isSafeInteger(e2)) ? e2 : n2;
|
|
465
|
+
}
|
|
466
|
+
function oe(t2) {
|
|
467
|
+
if (void 0 === ce && (ce = "function" == typeof Proxy ? ye(Proxy) : null), !ce || !me()) return t2;
|
|
468
|
+
let e2 = ae?.get(t2);
|
|
469
|
+
return e2 || (Math.random() > 0.01 ? t2 : ((function(t3) {
|
|
470
|
+
if (void 0 === le) {
|
|
471
|
+
const t4 = new ce([], {});
|
|
472
|
+
le = 1 === Array.prototype.concat.call([], t4).length;
|
|
473
|
+
}
|
|
474
|
+
le && "function" == typeof Symbol && Symbol.isConcatSpreadable && (t3[Symbol.isConcatSpreadable] = true);
|
|
475
|
+
})(t2), e2 = new ce(t2, { set: (t3, e3, n2) => (j(), t3[e3] = n2, true) }), (function(t3, e3) {
|
|
476
|
+
(ae || (ae = new ue())).set(t3, e3), (he || (he = new ue())).set(e3, t3);
|
|
477
|
+
})(t2, e2), e2));
|
|
478
|
+
}
|
|
479
|
+
var ae;
|
|
480
|
+
var he;
|
|
481
|
+
var ce;
|
|
482
|
+
var ue;
|
|
483
|
+
var le;
|
|
484
|
+
var fe;
|
|
485
|
+
var de;
|
|
486
|
+
var pe;
|
|
487
|
+
var ge;
|
|
488
|
+
function me() {
|
|
489
|
+
return void 0 === ue && (ue = "function" == typeof WeakMap ? ye(WeakMap) : null), ue;
|
|
490
|
+
}
|
|
491
|
+
function ye(t2) {
|
|
492
|
+
try {
|
|
493
|
+
return -1 !== t2.toString().indexOf("[native code]") ? t2 : null;
|
|
494
|
+
} catch {
|
|
495
|
+
return null;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
function _e(t2, e2, n2) {
|
|
499
|
+
if (f && me()) {
|
|
500
|
+
if (fe?.get(e2)?.get(t2)) {
|
|
501
|
+
if (n2) return;
|
|
502
|
+
} else if (Math.random() > 0.01) return;
|
|
503
|
+
var r2 = t2.length;
|
|
504
|
+
n2 = { length: r2 };
|
|
505
|
+
for (var i2 = 0; i2 < Math.min(r2, 10); i2++) {
|
|
506
|
+
if (r2 <= 10) var s2 = i2;
|
|
507
|
+
else {
|
|
508
|
+
s2 = r2 / 10;
|
|
509
|
+
const t3 = Math.floor(i2 * s2);
|
|
510
|
+
s2 = t3 + Math.floor(Math.random() * (Math.floor((i2 + 1) * s2) - t3));
|
|
511
|
+
}
|
|
512
|
+
n2[s2] = t2[s2];
|
|
513
|
+
}
|
|
514
|
+
Ee(t2, n2) ? ((i2 = (r2 = fe || (fe = new ue())).get(e2)) || (i2 = new ue(), r2.set(e2, i2)), i2.set(t2, n2)) : (j(), Te(t2, e2));
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
function ve(t2, e2) {
|
|
518
|
+
const n2 = fe?.get(e2)?.get(t2);
|
|
519
|
+
n2 && !Ee(t2, n2) && (j(), Te(t2, e2));
|
|
520
|
+
}
|
|
521
|
+
function Ee(t2, e2) {
|
|
522
|
+
if (t2.length !== e2.length) return false;
|
|
523
|
+
for (const i2 in e2) {
|
|
524
|
+
var n2, r2 = Number(i2);
|
|
525
|
+
if ((n2 = Number.isInteger(r2)) && (n2 = t2[r2], r2 = e2[r2], n2 = !(Number.isNaN(n2) ? Number.isNaN(r2) : n2 === r2)), n2) return false;
|
|
526
|
+
}
|
|
527
|
+
return true;
|
|
528
|
+
}
|
|
529
|
+
function we(t2) {
|
|
530
|
+
if (t2 && fe?.has(t2)) {
|
|
531
|
+
var e2 = t2.u;
|
|
532
|
+
if (e2) for (let n2 = 0; n2 < e2.length; n2++) {
|
|
533
|
+
const r2 = e2[n2];
|
|
534
|
+
if (n2 === e2.length - 1 && ut(r2)) for (const e3 in r2) {
|
|
535
|
+
const n3 = r2[e3];
|
|
536
|
+
Array.isArray(n3) && ve(n3, t2);
|
|
537
|
+
}
|
|
538
|
+
else Array.isArray(r2) && ve(r2, t2);
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
function Te(t2, e2) {
|
|
543
|
+
fe?.get(e2)?.delete(t2);
|
|
544
|
+
}
|
|
545
|
+
function Ae(t2, e2) {
|
|
546
|
+
return t2 = be(t2, e2[0], e2[1]), Z(t2, 16384), t2;
|
|
547
|
+
}
|
|
548
|
+
function be(t2, e2, n2) {
|
|
549
|
+
if (null == t2 && (t2 = de), de = void 0, null == t2) {
|
|
550
|
+
var r2 = 96;
|
|
551
|
+
n2 ? (t2 = [n2], r2 |= 512) : t2 = [], e2 && (r2 = -33521665 & r2 | (1023 & e2) << 15);
|
|
552
|
+
} else {
|
|
553
|
+
if (!Array.isArray(t2)) throw Error("narr");
|
|
554
|
+
if (2048 & (r2 = tt(t2))) throw Error("farr");
|
|
555
|
+
if (64 & r2) return t2;
|
|
556
|
+
if (r2 |= 64, n2 && (r2 |= 512, n2 !== t2[0])) throw Error("mid");
|
|
557
|
+
t: {
|
|
558
|
+
const i2 = (n2 = t2).length;
|
|
559
|
+
if (i2) {
|
|
560
|
+
const t3 = i2 - 1;
|
|
561
|
+
if (ut(n2[t3])) {
|
|
562
|
+
if ((e2 = t3 - (+!!(512 & (r2 |= 256)) - 1)) >= 1024) throw Error("pvtlmt");
|
|
563
|
+
r2 = -33521665 & r2 | (1023 & e2) << 15;
|
|
564
|
+
break t;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
if (e2) {
|
|
568
|
+
if ((e2 = Math.max(e2, i2 - (+!!(512 & r2) - 1))) > 1024) throw Error("spvt");
|
|
569
|
+
r2 = -33521665 & r2 | (1023 & e2) << 15;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
return nt(t2, r2), t2;
|
|
574
|
+
}
|
|
575
|
+
var ke = {};
|
|
576
|
+
var Se = (function() {
|
|
577
|
+
try {
|
|
578
|
+
return v(new class extends Map {
|
|
579
|
+
constructor() {
|
|
580
|
+
super();
|
|
581
|
+
}
|
|
582
|
+
}()), false;
|
|
583
|
+
} catch {
|
|
584
|
+
return true;
|
|
585
|
+
}
|
|
586
|
+
})();
|
|
587
|
+
var xe = class {
|
|
588
|
+
constructor() {
|
|
589
|
+
this.g = /* @__PURE__ */ new Map();
|
|
590
|
+
}
|
|
591
|
+
get(t2) {
|
|
592
|
+
return this.g.get(t2);
|
|
593
|
+
}
|
|
594
|
+
set(t2, e2) {
|
|
595
|
+
return this.g.set(t2, e2), this.size = this.g.size, this;
|
|
596
|
+
}
|
|
597
|
+
delete(t2) {
|
|
598
|
+
return t2 = this.g.delete(t2), this.size = this.g.size, t2;
|
|
599
|
+
}
|
|
600
|
+
clear() {
|
|
601
|
+
this.g.clear(), this.size = this.g.size;
|
|
602
|
+
}
|
|
603
|
+
has(t2) {
|
|
604
|
+
return this.g.has(t2);
|
|
605
|
+
}
|
|
606
|
+
entries() {
|
|
607
|
+
return this.g.entries();
|
|
608
|
+
}
|
|
609
|
+
keys() {
|
|
610
|
+
return this.g.keys();
|
|
611
|
+
}
|
|
612
|
+
values() {
|
|
613
|
+
return this.g.values();
|
|
614
|
+
}
|
|
615
|
+
forEach(t2, e2) {
|
|
616
|
+
return this.g.forEach(t2, e2);
|
|
617
|
+
}
|
|
618
|
+
[Symbol.iterator]() {
|
|
619
|
+
return this.entries();
|
|
620
|
+
}
|
|
621
|
+
};
|
|
622
|
+
var Le = Se ? (Object.setPrototypeOf(xe.prototype, Map.prototype), Object.defineProperties(xe.prototype, { size: { value: 0, configurable: true, enumerable: true, writable: true } }), xe) : class extends Map {
|
|
623
|
+
constructor() {
|
|
624
|
+
super();
|
|
625
|
+
}
|
|
626
|
+
};
|
|
627
|
+
function Re(t2) {
|
|
628
|
+
return t2;
|
|
629
|
+
}
|
|
630
|
+
function Fe(t2) {
|
|
631
|
+
if (2 & t2.M) throw Error("Cannot mutate an immutable Map");
|
|
632
|
+
}
|
|
633
|
+
var Me = class extends Le {
|
|
634
|
+
constructor(t2, e2, n2 = Re, r2 = Re) {
|
|
635
|
+
super();
|
|
636
|
+
let i2 = tt(t2);
|
|
637
|
+
i2 |= 64, nt(t2, i2), this.M = i2, this.U = e2, this.T = n2, this.aa = this.U ? Ie : r2;
|
|
638
|
+
for (let s2 = 0; s2 < t2.length; s2++) {
|
|
639
|
+
const o2 = t2[s2], a2 = n2(o2[0], false, true);
|
|
640
|
+
let h2 = o2[1];
|
|
641
|
+
e2 ? void 0 === h2 && (h2 = null) : h2 = r2(o2[1], false, true, void 0, void 0, i2), super.set(a2, h2);
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
pa(t2 = Pe) {
|
|
645
|
+
if (0 !== this.size) return this.Z(t2);
|
|
646
|
+
}
|
|
647
|
+
Z(t2 = Pe) {
|
|
648
|
+
const e2 = [], n2 = super.entries();
|
|
649
|
+
for (var r2; !(r2 = n2.next()).done; ) (r2 = r2.value)[0] = t2(r2[0]), r2[1] = t2(r2[1]), e2.push(r2);
|
|
650
|
+
return e2;
|
|
651
|
+
}
|
|
652
|
+
clear() {
|
|
653
|
+
Fe(this), super.clear();
|
|
654
|
+
}
|
|
655
|
+
delete(t2) {
|
|
656
|
+
return Fe(this), super.delete(this.T(t2, true, false));
|
|
657
|
+
}
|
|
658
|
+
entries() {
|
|
659
|
+
var t2 = this.oa();
|
|
660
|
+
return new gt(t2, Oe, this);
|
|
661
|
+
}
|
|
662
|
+
keys() {
|
|
663
|
+
return this.Ka();
|
|
664
|
+
}
|
|
665
|
+
values() {
|
|
666
|
+
var t2 = this.oa();
|
|
667
|
+
return new gt(t2, Me.prototype.get, this);
|
|
668
|
+
}
|
|
669
|
+
forEach(t2, e2) {
|
|
670
|
+
super.forEach(((n2, r2) => {
|
|
671
|
+
t2.call(e2, this.get(r2), r2, this);
|
|
672
|
+
}));
|
|
673
|
+
}
|
|
674
|
+
set(t2, e2) {
|
|
675
|
+
return Fe(this), null == (t2 = this.T(t2, true, false)) ? this : null == e2 ? (super.delete(t2), this) : super.set(t2, this.aa(e2, true, true, this.U, false, this.M));
|
|
676
|
+
}
|
|
677
|
+
Qa(t2) {
|
|
678
|
+
const e2 = this.T(t2[0], false, true);
|
|
679
|
+
t2 = t2[1], t2 = this.U ? void 0 === t2 ? null : t2 : this.aa(t2, false, true, void 0, false, this.M), super.set(e2, t2);
|
|
680
|
+
}
|
|
681
|
+
has(t2) {
|
|
682
|
+
return super.has(this.T(t2, false, false));
|
|
683
|
+
}
|
|
684
|
+
get(t2) {
|
|
685
|
+
t2 = this.T(t2, false, false);
|
|
686
|
+
const e2 = super.get(t2);
|
|
687
|
+
if (void 0 !== e2) {
|
|
688
|
+
var n2 = this.U;
|
|
689
|
+
return n2 ? ((n2 = this.aa(e2, false, true, n2, this.va, this.M)) !== e2 && super.set(t2, n2), n2) : e2;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
oa() {
|
|
693
|
+
return Array.from(super.keys());
|
|
694
|
+
}
|
|
695
|
+
Ka() {
|
|
696
|
+
return super.keys();
|
|
697
|
+
}
|
|
698
|
+
[Symbol.iterator]() {
|
|
699
|
+
return this.entries();
|
|
700
|
+
}
|
|
701
|
+
};
|
|
702
|
+
function Ie(t2, e2, n2, r2, i2, s2) {
|
|
703
|
+
return t2 = ie(t2, r2, n2, s2), i2 && (t2 = He(t2)), t2;
|
|
704
|
+
}
|
|
705
|
+
function Pe(t2) {
|
|
706
|
+
return t2;
|
|
707
|
+
}
|
|
708
|
+
function Oe(t2) {
|
|
709
|
+
return [t2, this.get(t2)];
|
|
710
|
+
}
|
|
711
|
+
var Ce;
|
|
712
|
+
function Ne() {
|
|
713
|
+
return Ce || (Ce = new Me(rt([]), void 0, void 0, void 0, ke));
|
|
714
|
+
}
|
|
715
|
+
function Ue(t2, e2, n2, r2, i2) {
|
|
716
|
+
if (null != t2) {
|
|
717
|
+
if (Array.isArray(t2)) t2 = ft(t2) ? void 0 : i2 && 2 & tt(t2) ? t2 : De(t2, e2, n2, void 0 !== r2, i2);
|
|
718
|
+
else if (ut(t2)) {
|
|
719
|
+
const s2 = {};
|
|
720
|
+
for (let o2 in t2) s2[o2] = Ue(t2[o2], e2, n2, r2, i2);
|
|
721
|
+
t2 = s2;
|
|
722
|
+
} else t2 = e2(t2, r2);
|
|
723
|
+
return t2;
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
function De(t2, e2, n2, r2, i2) {
|
|
727
|
+
const s2 = r2 || n2 ? tt(t2) : 0;
|
|
728
|
+
r2 = r2 ? !!(32 & s2) : void 0;
|
|
729
|
+
const o2 = H(t2);
|
|
730
|
+
for (let t3 = 0; t3 < o2.length; t3++) o2[t3] = Ue(o2[t3], e2, n2, r2, i2);
|
|
731
|
+
return n2 && (yt(o2, t2), n2(s2, o2)), o2;
|
|
732
|
+
}
|
|
733
|
+
function Be(t2) {
|
|
734
|
+
return Ue(t2, Ge, void 0, void 0, false);
|
|
735
|
+
}
|
|
736
|
+
function Ge(t2) {
|
|
737
|
+
return t2.Y === at ? t2.toJSON() : t2 instanceof Me ? t2.pa(Be) : (function(t3) {
|
|
738
|
+
switch (typeof t3) {
|
|
739
|
+
case "number":
|
|
740
|
+
return isFinite(t3) ? t3 : String(t3);
|
|
741
|
+
case "bigint":
|
|
742
|
+
return kt(t3) ? Number(t3) : String(t3);
|
|
743
|
+
case "boolean":
|
|
744
|
+
return t3 ? 1 : 0;
|
|
745
|
+
case "object":
|
|
746
|
+
if (t3) if (Array.isArray(t3)) {
|
|
747
|
+
if (ft(t3)) return;
|
|
748
|
+
} else {
|
|
749
|
+
if (I(t3)) return x(t3);
|
|
750
|
+
if (t3 instanceof D) {
|
|
751
|
+
const e2 = t3.ba;
|
|
752
|
+
return null == e2 ? "" : "string" == typeof e2 ? e2 : t3.ba = x(e2);
|
|
753
|
+
}
|
|
754
|
+
if (t3 instanceof Me) return t3.pa();
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
return t3;
|
|
758
|
+
})(t2);
|
|
759
|
+
}
|
|
760
|
+
function je(t2, e2, n2 = st) {
|
|
761
|
+
if (null != t2) {
|
|
762
|
+
if (k && t2 instanceof Uint8Array) return e2 ? t2 : new Uint8Array(t2);
|
|
763
|
+
if (Array.isArray(t2)) {
|
|
764
|
+
var r2 = tt(t2);
|
|
765
|
+
return 2 & r2 ? t2 : (e2 && (e2 = 0 === r2 || !!(32 & r2) && !(64 & r2 || !(16 & r2))), e2 ? (nt(t2, -12293 & (34 | r2)), t2) : De(t2, je, 4 & r2 ? st : n2, true, true));
|
|
766
|
+
}
|
|
767
|
+
return t2.Y === at ? (n2 = t2.u, t2 = 2 & (r2 = et(n2)) ? t2 : Ve(t2, n2, r2, true)) : t2 instanceof Me && !(2 & t2.M) && (n2 = rt(t2.Z(je)), t2 = new Me(n2, t2.U, t2.T, t2.aa)), t2;
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
function Ve(t2, e2, n2, r2) {
|
|
771
|
+
return we(t2), t2 = t2.constructor, de = e2 = Xe(e2, n2, r2), e2 = new t2(e2), de = void 0, e2;
|
|
772
|
+
}
|
|
773
|
+
function Xe(t2, e2, n2) {
|
|
774
|
+
const r2 = n2 || 2 & e2 ? st : it, i2 = !!(32 & e2);
|
|
775
|
+
return t2 = (function(t3, e3, n3) {
|
|
776
|
+
const r3 = H(t3);
|
|
777
|
+
var i3 = r3.length;
|
|
778
|
+
const s2 = 256 & e3 ? r3[i3 - 1] : void 0;
|
|
779
|
+
for (i3 += s2 ? -1 : 0, e3 = 512 & e3 ? 1 : 0; e3 < i3; e3++) r3[e3] = n3(r3[e3]);
|
|
780
|
+
if (s2) {
|
|
781
|
+
e3 = r3[e3] = {};
|
|
782
|
+
for (const t4 in s2) e3[t4] = n3(s2[t4]);
|
|
783
|
+
}
|
|
784
|
+
return yt(r3, t3), r3;
|
|
785
|
+
})(t2, e2, ((t3) => je(t3, i2, r2))), Z(t2, 32 | (n2 ? 2 : 0)), t2;
|
|
786
|
+
}
|
|
787
|
+
function He(t2) {
|
|
788
|
+
const e2 = t2.u, n2 = et(e2);
|
|
789
|
+
return 2 & n2 ? Ve(t2, e2, n2, false) : t2;
|
|
790
|
+
}
|
|
791
|
+
function We(t2, e2, n2, r2) {
|
|
792
|
+
return !(4 & e2) || null != n2 && (!r2 && 0 === n2 && (4096 & e2 || 8192 & e2) && (t2.constructor[J] = 1 + (0 | t2.constructor[J])) < 5 && j(), 0 !== n2 && !(n2 & e2));
|
|
793
|
+
}
|
|
794
|
+
function ze(t2, e2) {
|
|
795
|
+
return Ye(t2 = t2.u, et(t2), e2);
|
|
796
|
+
}
|
|
797
|
+
function Ke(t2, e2, n2, r2) {
|
|
798
|
+
if (!((e2 = r2 + (+!!(512 & e2) - 1)) < 0 || e2 >= t2.length || e2 >= n2)) return t2[e2];
|
|
799
|
+
}
|
|
800
|
+
function Ye(t2, e2, n2, r2) {
|
|
801
|
+
if (-1 === n2) return null;
|
|
802
|
+
const i2 = e2 >> 15 & 1023 || 536870912;
|
|
803
|
+
if (!(n2 >= i2)) {
|
|
804
|
+
var s2 = t2.length;
|
|
805
|
+
return r2 && 256 & e2 && null != (r2 = t2[s2 - 1][n2]) ? (Ke(t2, e2, i2, n2) && null != $ && ((e2 = (t2 = G ?? (G = {}))[$] || 0) >= 4 || (t2[$] = e2 + 1, j())), r2) : Ke(t2, e2, i2, n2);
|
|
806
|
+
}
|
|
807
|
+
return 256 & e2 ? t2[t2.length - 1][n2] : void 0;
|
|
808
|
+
}
|
|
809
|
+
function $e(t2, e2, n2) {
|
|
810
|
+
const r2 = t2.u;
|
|
811
|
+
let i2 = et(r2);
|
|
812
|
+
return pt(i2), qe(r2, i2, e2, n2), t2;
|
|
813
|
+
}
|
|
814
|
+
function qe(t2, e2, n2, r2) {
|
|
815
|
+
const i2 = e2 >> 15 & 1023 || 536870912;
|
|
816
|
+
if (n2 >= i2) {
|
|
817
|
+
let s2, o2 = e2;
|
|
818
|
+
if (256 & e2) s2 = t2[t2.length - 1];
|
|
819
|
+
else {
|
|
820
|
+
if (null == r2) return o2;
|
|
821
|
+
s2 = t2[i2 + (+!!(512 & e2) - 1)] = {}, o2 |= 256;
|
|
822
|
+
}
|
|
823
|
+
return s2[n2] = r2, n2 < i2 && (t2[n2 + (+!!(512 & e2) - 1)] = void 0), o2 !== e2 && nt(t2, o2), o2;
|
|
824
|
+
}
|
|
825
|
+
return t2[n2 + (+!!(512 & e2) - 1)] = r2, 256 & e2 && (n2 in (t2 = t2[t2.length - 1]) && delete t2[n2]), e2;
|
|
826
|
+
}
|
|
827
|
+
function Je(t2, e2, n2, r2, i2) {
|
|
828
|
+
var s2 = 2 & e2;
|
|
829
|
+
i2 = Ye(t2, e2, n2, i2), Array.isArray(i2) || (i2 = ot);
|
|
830
|
+
const o2 = !(2 & r2);
|
|
831
|
+
r2 = !(1 & r2);
|
|
832
|
+
const a2 = !!(32 & e2);
|
|
833
|
+
let h2 = tt(i2);
|
|
834
|
+
return 0 !== h2 || !a2 || s2 || o2 ? 1 & h2 || (h2 |= 1, nt(i2, h2)) : (h2 |= 33, nt(i2, h2)), s2 ? (t2 = false, 2 & h2 || (rt(i2), t2 = !!(4 & h2)), (r2 || t2) && Object.freeze(i2)) : (s2 = !!(2 & h2) || !!(2048 & h2), r2 && s2 ? (i2 = H(i2), s2 = 1, a2 && !o2 && (s2 |= 32), nt(i2, s2), qe(t2, e2, n2, i2)) : o2 && 32 & h2 && !s2 && Q(i2, 32)), i2;
|
|
835
|
+
}
|
|
836
|
+
function Ze(t2, e2) {
|
|
837
|
+
t2 = t2.u;
|
|
838
|
+
let n2 = et(t2);
|
|
839
|
+
const r2 = Ye(t2, n2, e2), i2 = Ht(r2);
|
|
840
|
+
return null != i2 && i2 !== r2 && qe(t2, n2, e2, i2), i2;
|
|
841
|
+
}
|
|
842
|
+
function Qe(t2) {
|
|
843
|
+
t2 = t2.u;
|
|
844
|
+
let e2 = et(t2);
|
|
845
|
+
const n2 = Ye(t2, e2, 1), r2 = lt(n2, true, !!(34 & e2));
|
|
846
|
+
return null != r2 && r2 !== n2 && qe(t2, e2, 1, r2), r2;
|
|
847
|
+
}
|
|
848
|
+
function tn() {
|
|
849
|
+
return void 0 === _t ? 2 : 5;
|
|
850
|
+
}
|
|
851
|
+
function en(t2, e2, n2, r2, i2, s2) {
|
|
852
|
+
const o2 = t2.u;
|
|
853
|
+
let a2 = et(o2);
|
|
854
|
+
r2 = 2 & a2 ? 1 : r2, s2 = !!s2, i2 = nn(o2, a2, e2, i2);
|
|
855
|
+
var h2 = tt(i2), c2 = i2;
|
|
856
|
+
if (ve(c2, t2), 2 !== r2 && 1 !== r2 || Te(c2, t2), We(t2, h2, void 0, s2)) {
|
|
857
|
+
4 & h2 && (i2 = H(i2), h2 = vn(h2, a2), a2 = qe(o2, a2, e2, i2));
|
|
858
|
+
let t3 = c2 = 0;
|
|
859
|
+
for (; c2 < i2.length; c2++) {
|
|
860
|
+
const e3 = n2(i2[c2]);
|
|
861
|
+
null != e3 && (i2[t3++] = e3);
|
|
862
|
+
}
|
|
863
|
+
t3 < c2 && (i2.length = t3), h2 = -4097 & (20 | (h2 = rn(h2, a2))), nt(i2, h2 &= -8193), 2 & h2 && Object.freeze(i2);
|
|
864
|
+
}
|
|
865
|
+
let u2;
|
|
866
|
+
return 1 === r2 || 4 === r2 && 32 & h2 ? sn(h2) || (t2 = h2, (h2 |= 2) !== t2 && nt(i2, h2), Object.freeze(i2)) : (n2 = 5 === r2 && (!!(32 & h2) || sn(h2) || !!ae?.get(i2)), (2 === r2 || n2) && sn(h2) && (i2 = H(i2), h2 = En(h2 = vn(h2, a2), a2, s2), nt(i2, h2), a2 = qe(o2, a2, e2, i2)), sn(h2) || (e2 = h2, (h2 = En(h2, a2, s2)) !== e2 && nt(i2, h2)), n2 ? (u2 = oe(i2), _e(i2, t2, true)) : 2 !== r2 || s2 || ae?.delete(i2)), u2 || i2;
|
|
867
|
+
}
|
|
868
|
+
function nn(t2, e2, n2, r2) {
|
|
869
|
+
return t2 = Ye(t2, e2, n2, r2), Array.isArray(t2) ? t2 : ot;
|
|
870
|
+
}
|
|
871
|
+
function rn(t2, e2) {
|
|
872
|
+
return 0 === t2 && (t2 = vn(t2, e2)), 1 | t2;
|
|
873
|
+
}
|
|
874
|
+
function sn(t2) {
|
|
875
|
+
return !!(2 & t2) && !!(4 & t2) || !!(2048 & t2);
|
|
876
|
+
}
|
|
877
|
+
function on(t2) {
|
|
878
|
+
t2 = H(t2);
|
|
879
|
+
for (let e2 = 0; e2 < t2.length; e2++) {
|
|
880
|
+
const n2 = t2[e2] = H(t2[e2]);
|
|
881
|
+
Array.isArray(n2[1]) && (n2[1] = rt(n2[1]));
|
|
882
|
+
}
|
|
883
|
+
return t2;
|
|
884
|
+
}
|
|
885
|
+
function an(t2, e2, n2, r2) {
|
|
886
|
+
t2 = t2.u;
|
|
887
|
+
let i2 = et(t2);
|
|
888
|
+
pt(i2), qe(t2, i2, e2, ("0" === r2 ? 0 === Number(n2) : n2 === r2) ? void 0 : n2);
|
|
889
|
+
}
|
|
890
|
+
function hn(t2, e2) {
|
|
891
|
+
var n2 = _s;
|
|
892
|
+
return ln(cn(t2 = t2.u), t2, et(t2), n2) === e2 ? e2 : -1;
|
|
893
|
+
}
|
|
894
|
+
function cn(t2) {
|
|
895
|
+
if (W) return t2[q] ?? (t2[q] = /* @__PURE__ */ new Map());
|
|
896
|
+
if (q in t2) return t2[q];
|
|
897
|
+
const e2 = /* @__PURE__ */ new Map();
|
|
898
|
+
return Object.defineProperty(t2, q, { value: e2 }), e2;
|
|
899
|
+
}
|
|
900
|
+
function un(t2, e2, n2, r2) {
|
|
901
|
+
const i2 = cn(t2), s2 = ln(i2, t2, e2, n2);
|
|
902
|
+
return s2 !== r2 && (s2 && (e2 = qe(t2, e2, s2)), i2.set(n2, r2)), e2;
|
|
903
|
+
}
|
|
904
|
+
function ln(t2, e2, n2, r2) {
|
|
905
|
+
let i2 = t2.get(r2);
|
|
906
|
+
if (null != i2) return i2;
|
|
907
|
+
i2 = 0;
|
|
908
|
+
for (let t3 = 0; t3 < r2.length; t3++) {
|
|
909
|
+
const s2 = r2[t3];
|
|
910
|
+
null != Ye(e2, n2, s2) && (0 !== i2 && (n2 = qe(e2, n2, i2)), i2 = s2);
|
|
911
|
+
}
|
|
912
|
+
return t2.set(r2, i2), i2;
|
|
913
|
+
}
|
|
914
|
+
function fn(t2, e2, n2, r2) {
|
|
915
|
+
let i2, s2 = et(t2);
|
|
916
|
+
if (null != (r2 = Ye(t2, s2, n2, r2)) && r2.Y === at) return (e2 = He(r2)) !== r2 && qe(t2, s2, n2, e2), e2.u;
|
|
917
|
+
if (Array.isArray(r2)) {
|
|
918
|
+
const t3 = tt(r2);
|
|
919
|
+
i2 = 2 & t3 ? Xe(r2, t3, false) : r2, i2 = Ae(i2, e2);
|
|
920
|
+
} else i2 = Ae(void 0, e2);
|
|
921
|
+
return i2 !== r2 && qe(t2, s2, n2, i2), i2;
|
|
922
|
+
}
|
|
923
|
+
function dn(t2, e2, n2, r2) {
|
|
924
|
+
t2 = t2.u;
|
|
925
|
+
let i2 = et(t2);
|
|
926
|
+
return (e2 = ie(r2 = Ye(t2, i2, n2, r2), e2, false, i2)) !== r2 && null != e2 && qe(t2, i2, n2, e2), e2;
|
|
927
|
+
}
|
|
928
|
+
function pn(t2, e2, n2, r2 = false) {
|
|
929
|
+
if (null == (e2 = dn(t2, e2, n2, r2))) return e2;
|
|
930
|
+
if (t2 = t2.u, !(2 & (r2 = et(t2)))) {
|
|
931
|
+
const i2 = He(e2);
|
|
932
|
+
i2 !== e2 && qe(t2, r2, n2, e2 = i2);
|
|
933
|
+
}
|
|
934
|
+
return e2;
|
|
935
|
+
}
|
|
936
|
+
function gn(t2, e2, n2, r2, i2, s2, o2) {
|
|
937
|
+
const a2 = t2.u;
|
|
938
|
+
var h2 = !!(2 & e2);
|
|
939
|
+
i2 = h2 ? 1 : i2, s2 = !!s2, o2 && (o2 = !h2), h2 = nn(a2, e2, r2);
|
|
940
|
+
var c2 = tt(h2), u2 = h2;
|
|
941
|
+
if (ve(u2, t2), 2 !== i2 && 1 !== i2 || Te(u2, t2), !(u2 = !!(4 & c2))) {
|
|
942
|
+
var l2 = h2, f2 = e2;
|
|
943
|
+
const t3 = !!(2 & (c2 = rn(c2, e2)));
|
|
944
|
+
t3 && (f2 |= 2);
|
|
945
|
+
let r3 = !t3, i3 = true, s3 = 0, o3 = 0;
|
|
946
|
+
for (; s3 < l2.length; s3++) {
|
|
947
|
+
const e3 = ie(l2[s3], n2, false, f2);
|
|
948
|
+
if (e3 instanceof n2) {
|
|
949
|
+
if (!t3) {
|
|
950
|
+
const t4 = !!(2 & tt(e3.u));
|
|
951
|
+
r3 && (r3 = !t4), i3 && (i3 = t4);
|
|
952
|
+
}
|
|
953
|
+
l2[o3++] = e3;
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
o3 < s3 && (l2.length = o3), c2 |= 4, c2 = i3 ? 16 | c2 : -17 & c2, nt(l2, c2 = r3 ? 8 | c2 : -9 & c2), t3 && Object.freeze(l2);
|
|
957
|
+
}
|
|
958
|
+
if (o2 && !(8 & c2 || !h2.length && (1 === i2 || 4 === i2 && 32 & c2))) {
|
|
959
|
+
for (sn(c2) ? (h2 = H(h2), c2 = vn(c2, e2), e2 = qe(a2, e2, r2, h2)) : Te(h2, t2), n2 = h2, o2 = c2, l2 = 0; l2 < n2.length; l2++) (c2 = n2[l2]) !== (f2 = He(c2)) && (n2[l2] = f2);
|
|
960
|
+
o2 |= 8, o2 = n2.length ? -17 & o2 : 16 | o2, nt(n2, o2), c2 = o2;
|
|
961
|
+
}
|
|
962
|
+
let d2;
|
|
963
|
+
return 1 === i2 || 4 === i2 && 32 & c2 ? sn(c2) || (t2 = c2, (c2 |= !h2.length || 16 & c2 && (!u2 || 32 & c2) ? 2 : 2048) !== t2 && nt(h2, c2), Object.freeze(h2)) : (u2 = 5 === i2 && (!!(32 & c2) || sn(c2) || !!ae?.get(h2)), (2 === i2 || u2) && sn(c2) && (h2 = H(h2), c2 = En(c2 = vn(c2, e2), e2, s2), nt(h2, c2), e2 = qe(a2, e2, r2, h2)), sn(c2) || (r2 = c2, (c2 = En(c2, e2, s2)) !== r2 && nt(h2, c2)), u2 ? (d2 = oe(h2), _e(h2, t2, true)) : 2 !== i2 || s2 || ae?.delete(h2)), d2 || h2;
|
|
964
|
+
}
|
|
965
|
+
function mn(t2, e2, n2) {
|
|
966
|
+
const r2 = et(t2.u);
|
|
967
|
+
return gn(t2, r2, e2, n2, tn(), false, !(2 & r2));
|
|
968
|
+
}
|
|
969
|
+
function yn(t2, e2, n2, r2) {
|
|
970
|
+
return null == r2 && (r2 = void 0), $e(t2, n2, r2);
|
|
971
|
+
}
|
|
972
|
+
function _n(t2, e2, n2, r2) {
|
|
973
|
+
null == r2 && (r2 = void 0);
|
|
974
|
+
t: {
|
|
975
|
+
t2 = t2.u;
|
|
976
|
+
let i2 = et(t2);
|
|
977
|
+
if (pt(i2), null == r2) {
|
|
978
|
+
const r3 = cn(t2);
|
|
979
|
+
if (ln(r3, t2, i2, n2) !== e2) break t;
|
|
980
|
+
r3.set(n2, 0);
|
|
981
|
+
} else i2 = un(t2, i2, n2, e2);
|
|
982
|
+
qe(t2, i2, e2, r2);
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
function vn(t2, e2) {
|
|
986
|
+
return -2049 & (t2 = 32 | (2 & e2 ? 2 | t2 : -3 & t2));
|
|
987
|
+
}
|
|
988
|
+
function En(t2, e2, n2) {
|
|
989
|
+
return 32 & e2 && n2 || (t2 &= -33), t2;
|
|
990
|
+
}
|
|
991
|
+
function wn(t2, e2, n2, r2) {
|
|
992
|
+
const i2 = et(t2.u);
|
|
993
|
+
pt(i2), t2 = gn(t2, i2, n2, e2, 2, true), n2 = null != r2 ? r2 : new n2(), t2.push(n2), 2 & tt(n2.u) ? Q(t2, 8) : Q(t2, 16);
|
|
994
|
+
}
|
|
995
|
+
function Tn(t2, e2) {
|
|
996
|
+
return t2 ?? e2;
|
|
997
|
+
}
|
|
998
|
+
function An(t2, e2) {
|
|
999
|
+
return Yt(ze(t2, e2));
|
|
1000
|
+
}
|
|
1001
|
+
function bn(t2, e2) {
|
|
1002
|
+
return Tn(Ze(t2, e2), 0);
|
|
1003
|
+
}
|
|
1004
|
+
function kn(t2, e2) {
|
|
1005
|
+
return Tn(re(ze(t2, e2)), "");
|
|
1006
|
+
}
|
|
1007
|
+
function Sn(t2, e2, n2) {
|
|
1008
|
+
if (null != n2 && "boolean" != typeof n2) throw t2 = typeof n2, Error(`Expected boolean but got ${"object" != t2 ? t2 : n2 ? Array.isArray(n2) ? "array" : t2 : "null"}: ${n2}`);
|
|
1009
|
+
$e(t2, e2, n2);
|
|
1010
|
+
}
|
|
1011
|
+
function xn(t2, e2, n2) {
|
|
1012
|
+
if (null != n2) {
|
|
1013
|
+
if ("number" != typeof n2) throw V("int32");
|
|
1014
|
+
if (!Number.isFinite(n2)) throw V("int32");
|
|
1015
|
+
n2 |= 0;
|
|
1016
|
+
}
|
|
1017
|
+
$e(t2, e2, n2);
|
|
1018
|
+
}
|
|
1019
|
+
function Ln(t2, e2, n2) {
|
|
1020
|
+
if (null != n2 && "number" != typeof n2) throw Error(`Value of float/double field must be a number, found ${typeof n2}: ${n2}`);
|
|
1021
|
+
$e(t2, e2, n2);
|
|
1022
|
+
}
|
|
1023
|
+
function Rn(t2, e2, n2) {
|
|
1024
|
+
{
|
|
1025
|
+
const a2 = t2.u;
|
|
1026
|
+
let h2 = et(a2);
|
|
1027
|
+
if (pt(h2), null == n2) qe(a2, h2, e2);
|
|
1028
|
+
else {
|
|
1029
|
+
n2 = he?.get(n2) || n2;
|
|
1030
|
+
var r2, i2 = tt(n2), s2 = i2, o2 = !!(2 & i2) || Object.isFrozen(n2);
|
|
1031
|
+
if ((r2 = !o2) && (r2 = void 0 === vt || false), We(t2, i2)) {
|
|
1032
|
+
i2 = 21, o2 && (n2 = H(n2), s2 = 0, i2 = En(i2 = vn(i2, h2), h2, true));
|
|
1033
|
+
for (let t3 = 0; t3 < n2.length; t3++) n2[t3] = ee(n2[t3]);
|
|
1034
|
+
}
|
|
1035
|
+
r2 ? (n2 = H(n2), s2 = 0, i2 = En(i2 = vn(i2, h2), h2, true)) : o2 || _e(n2, t2), i2 !== s2 && nt(n2, i2), qe(a2, h2, e2, n2);
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
function Fn(t2, e2, n2) {
|
|
1040
|
+
pt(et(t2.u)), en(t2, e2, re, 2, void 0, true).push(ee(n2));
|
|
1041
|
+
}
|
|
1042
|
+
function Mn(t2, e2) {
|
|
1043
|
+
return Error(`Invalid wire type: ${t2} (at position ${e2})`);
|
|
1044
|
+
}
|
|
1045
|
+
function In() {
|
|
1046
|
+
return Error("Failed to read varint, encoding is invalid.");
|
|
1047
|
+
}
|
|
1048
|
+
function Pn(t2, e2) {
|
|
1049
|
+
return Error(`Tried to read past the end of the data ${e2} > ${t2}`);
|
|
1050
|
+
}
|
|
1051
|
+
function On(t2) {
|
|
1052
|
+
if ("string" == typeof t2) return { buffer: M(t2), O: false };
|
|
1053
|
+
if (Array.isArray(t2)) return { buffer: new Uint8Array(t2), O: false };
|
|
1054
|
+
if (t2.constructor === Uint8Array) return { buffer: t2, O: false };
|
|
1055
|
+
if (t2.constructor === ArrayBuffer) return { buffer: new Uint8Array(t2), O: false };
|
|
1056
|
+
if (t2.constructor === D) return { buffer: U(t2) || new Uint8Array(0), O: true };
|
|
1057
|
+
if (t2 instanceof Uint8Array) return { buffer: new Uint8Array(t2.buffer, t2.byteOffset, t2.byteLength), O: false };
|
|
1058
|
+
throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, a ByteString or an Array of numbers");
|
|
1059
|
+
}
|
|
1060
|
+
function Cn(t2, e2) {
|
|
1061
|
+
let n2, r2 = 0, i2 = 0, s2 = 0;
|
|
1062
|
+
const o2 = t2.h;
|
|
1063
|
+
let a2 = t2.g;
|
|
1064
|
+
do {
|
|
1065
|
+
n2 = o2[a2++], r2 |= (127 & n2) << s2, s2 += 7;
|
|
1066
|
+
} while (s2 < 32 && 128 & n2);
|
|
1067
|
+
for (s2 > 32 && (i2 |= (127 & n2) >> 4), s2 = 3; s2 < 32 && 128 & n2; s2 += 7) n2 = o2[a2++], i2 |= (127 & n2) << s2;
|
|
1068
|
+
if (Xn(t2, a2), n2 < 128) return e2(r2 >>> 0, i2 >>> 0);
|
|
1069
|
+
throw In();
|
|
1070
|
+
}
|
|
1071
|
+
function Nn(t2) {
|
|
1072
|
+
let e2 = 0, n2 = t2.g;
|
|
1073
|
+
const r2 = n2 + 10, i2 = t2.h;
|
|
1074
|
+
for (; n2 < r2; ) {
|
|
1075
|
+
const r3 = i2[n2++];
|
|
1076
|
+
if (e2 |= r3, 0 == (128 & r3)) return Xn(t2, n2), !!(127 & e2);
|
|
1077
|
+
}
|
|
1078
|
+
throw In();
|
|
1079
|
+
}
|
|
1080
|
+
function Un(t2) {
|
|
1081
|
+
const e2 = t2.h;
|
|
1082
|
+
let n2 = t2.g, r2 = e2[n2++], i2 = 127 & r2;
|
|
1083
|
+
if (128 & r2 && (r2 = e2[n2++], i2 |= (127 & r2) << 7, 128 & r2 && (r2 = e2[n2++], i2 |= (127 & r2) << 14, 128 & r2 && (r2 = e2[n2++], i2 |= (127 & r2) << 21, 128 & r2 && (r2 = e2[n2++], i2 |= r2 << 28, 128 & r2 && 128 & e2[n2++] && 128 & e2[n2++] && 128 & e2[n2++] && 128 & e2[n2++] && 128 & e2[n2++]))))) throw In();
|
|
1084
|
+
return Xn(t2, n2), i2;
|
|
1085
|
+
}
|
|
1086
|
+
function Dn(t2) {
|
|
1087
|
+
return Un(t2) >>> 0;
|
|
1088
|
+
}
|
|
1089
|
+
function Bn(t2) {
|
|
1090
|
+
var e2 = t2.h;
|
|
1091
|
+
const n2 = t2.g, r2 = e2[n2], i2 = e2[n2 + 1], s2 = e2[n2 + 2];
|
|
1092
|
+
return e2 = e2[n2 + 3], Xn(t2, t2.g + 4), (r2 << 0 | i2 << 8 | s2 << 16 | e2 << 24) >>> 0;
|
|
1093
|
+
}
|
|
1094
|
+
function Gn(t2) {
|
|
1095
|
+
var e2 = Bn(t2);
|
|
1096
|
+
t2 = 2 * (e2 >> 31) + 1;
|
|
1097
|
+
const n2 = e2 >>> 23 & 255;
|
|
1098
|
+
return e2 &= 8388607, 255 == n2 ? e2 ? NaN : t2 * (1 / 0) : 0 == n2 ? 1401298464324817e-60 * t2 * e2 : t2 * Math.pow(2, n2 - 150) * (e2 + 8388608);
|
|
1099
|
+
}
|
|
1100
|
+
function jn(t2) {
|
|
1101
|
+
return Un(t2);
|
|
1102
|
+
}
|
|
1103
|
+
function Vn(t2, e2, { ea: n2 = false } = {}) {
|
|
1104
|
+
t2.ea = n2, e2 && (e2 = On(e2), t2.h = e2.buffer, t2.m = e2.O, t2.j = 0, t2.l = t2.h.length, t2.g = t2.j);
|
|
1105
|
+
}
|
|
1106
|
+
function Xn(t2, e2) {
|
|
1107
|
+
if (t2.g = e2, e2 > t2.l) throw Pn(t2.l, e2);
|
|
1108
|
+
}
|
|
1109
|
+
function Hn(t2, e2) {
|
|
1110
|
+
if (e2 < 0) throw Error(`Tried to read a negative byte length: ${e2}`);
|
|
1111
|
+
const n2 = t2.g, r2 = n2 + e2;
|
|
1112
|
+
if (r2 > t2.l) throw Pn(e2, t2.l - n2);
|
|
1113
|
+
return t2.g = r2, n2;
|
|
1114
|
+
}
|
|
1115
|
+
function Wn(t2, e2) {
|
|
1116
|
+
if (0 == e2) return N();
|
|
1117
|
+
var n2 = Hn(t2, e2);
|
|
1118
|
+
return t2.ea && t2.m ? n2 = t2.h.subarray(n2, n2 + e2) : (t2 = t2.h, n2 = n2 === (e2 = n2 + e2) ? new Uint8Array(0) : Mt ? t2.slice(n2, e2) : new Uint8Array(t2.subarray(n2, e2))), 0 == n2.length ? N() : new D(n2, P);
|
|
1119
|
+
}
|
|
1120
|
+
Me.prototype.toJSON = void 0, Me.prototype.La = ht;
|
|
1121
|
+
var zn = [];
|
|
1122
|
+
function Kn(t2) {
|
|
1123
|
+
var e2 = t2.g;
|
|
1124
|
+
if (e2.g == e2.l) return false;
|
|
1125
|
+
t2.l = t2.g.g;
|
|
1126
|
+
var n2 = Dn(t2.g);
|
|
1127
|
+
if (e2 = n2 >>> 3, !((n2 &= 7) >= 0 && n2 <= 5)) throw Mn(n2, t2.l);
|
|
1128
|
+
if (e2 < 1) throw Error(`Invalid field number: ${e2} (at position ${t2.l})`);
|
|
1129
|
+
return t2.m = e2, t2.h = n2, true;
|
|
1130
|
+
}
|
|
1131
|
+
function Yn(t2) {
|
|
1132
|
+
switch (t2.h) {
|
|
1133
|
+
case 0:
|
|
1134
|
+
0 != t2.h ? Yn(t2) : Nn(t2.g);
|
|
1135
|
+
break;
|
|
1136
|
+
case 1:
|
|
1137
|
+
Xn(t2 = t2.g, t2.g + 8);
|
|
1138
|
+
break;
|
|
1139
|
+
case 2:
|
|
1140
|
+
if (2 != t2.h) Yn(t2);
|
|
1141
|
+
else {
|
|
1142
|
+
var e2 = Dn(t2.g);
|
|
1143
|
+
Xn(t2 = t2.g, t2.g + e2);
|
|
1144
|
+
}
|
|
1145
|
+
break;
|
|
1146
|
+
case 5:
|
|
1147
|
+
Xn(t2 = t2.g, t2.g + 4);
|
|
1148
|
+
break;
|
|
1149
|
+
case 3:
|
|
1150
|
+
for (e2 = t2.m; ; ) {
|
|
1151
|
+
if (!Kn(t2)) throw Error("Unmatched start-group tag: stream EOF");
|
|
1152
|
+
if (4 == t2.h) {
|
|
1153
|
+
if (t2.m != e2) throw Error("Unmatched end-group tag");
|
|
1154
|
+
break;
|
|
1155
|
+
}
|
|
1156
|
+
Yn(t2);
|
|
1157
|
+
}
|
|
1158
|
+
break;
|
|
1159
|
+
default:
|
|
1160
|
+
throw Mn(t2.h, t2.l);
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
function $n(t2, e2, n2) {
|
|
1164
|
+
const r2 = t2.g.l, i2 = Dn(t2.g), s2 = t2.g.g + i2;
|
|
1165
|
+
let o2 = s2 - r2;
|
|
1166
|
+
if (o2 <= 0 && (t2.g.l = s2, n2(e2, t2, void 0, void 0, void 0), o2 = s2 - t2.g.g), o2) throw Error(`Message parsing ended unexpectedly. Expected to read ${i2} bytes, instead read ${i2 - o2} bytes, either the data ended unexpectedly or the message misreported its own length`);
|
|
1167
|
+
return t2.g.g = s2, t2.g.l = r2, e2;
|
|
1168
|
+
}
|
|
1169
|
+
function qn(t2) {
|
|
1170
|
+
var e2 = Dn(t2.g), a2 = Hn(t2 = t2.g, e2);
|
|
1171
|
+
if (t2 = t2.h, o) {
|
|
1172
|
+
var h2, c2 = t2;
|
|
1173
|
+
(h2 = s) || (h2 = s = new TextDecoder("utf-8", { fatal: true })), e2 = a2 + e2, c2 = 0 === a2 && e2 === c2.length ? c2 : c2.subarray(a2, e2);
|
|
1174
|
+
try {
|
|
1175
|
+
var u2 = h2.decode(c2);
|
|
1176
|
+
} catch (t3) {
|
|
1177
|
+
if (void 0 === i) {
|
|
1178
|
+
try {
|
|
1179
|
+
h2.decode(new Uint8Array([128]));
|
|
1180
|
+
} catch (t4) {
|
|
1181
|
+
}
|
|
1182
|
+
try {
|
|
1183
|
+
h2.decode(new Uint8Array([97])), i = true;
|
|
1184
|
+
} catch (t4) {
|
|
1185
|
+
i = false;
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
throw !i && (s = void 0), t3;
|
|
1189
|
+
}
|
|
1190
|
+
} else {
|
|
1191
|
+
e2 = (u2 = a2) + e2, a2 = [];
|
|
1192
|
+
let i2, s2 = null;
|
|
1193
|
+
for (; u2 < e2; ) {
|
|
1194
|
+
var l2 = t2[u2++];
|
|
1195
|
+
l2 < 128 ? a2.push(l2) : l2 < 224 ? u2 >= e2 ? n() : (i2 = t2[u2++], l2 < 194 || 128 != (192 & i2) ? (u2--, n()) : a2.push((31 & l2) << 6 | 63 & i2)) : l2 < 240 ? u2 >= e2 - 1 ? n() : (i2 = t2[u2++], 128 != (192 & i2) || 224 === l2 && i2 < 160 || 237 === l2 && i2 >= 160 || 128 != (192 & (h2 = t2[u2++])) ? (u2--, n()) : a2.push((15 & l2) << 12 | (63 & i2) << 6 | 63 & h2)) : l2 <= 244 ? u2 >= e2 - 2 ? n() : (i2 = t2[u2++], 128 != (192 & i2) || i2 - 144 + (l2 << 28) >> 30 != 0 || 128 != (192 & (h2 = t2[u2++])) || 128 != (192 & (c2 = t2[u2++])) ? (u2--, n()) : (l2 = (7 & l2) << 18 | (63 & i2) << 12 | (63 & h2) << 6 | 63 & c2, l2 -= 65536, a2.push(55296 + (l2 >> 10 & 1023), 56320 + (1023 & l2)))) : n(), a2.length >= 8192 && (s2 = r(s2, a2), a2.length = 0);
|
|
1196
|
+
}
|
|
1197
|
+
u2 = r(s2, a2);
|
|
1198
|
+
}
|
|
1199
|
+
return u2;
|
|
1200
|
+
}
|
|
1201
|
+
function Jn(t2) {
|
|
1202
|
+
const e2 = Dn(t2.g);
|
|
1203
|
+
return Wn(t2.g, e2);
|
|
1204
|
+
}
|
|
1205
|
+
function Zn(t2, e2, n2) {
|
|
1206
|
+
var r2 = Dn(t2.g);
|
|
1207
|
+
for (r2 = t2.g.g + r2; t2.g.g < r2; ) n2.push(e2(t2.g));
|
|
1208
|
+
}
|
|
1209
|
+
var Qn = [];
|
|
1210
|
+
var tr;
|
|
1211
|
+
function er(t2, e2, n2) {
|
|
1212
|
+
e2.g ? e2.m(t2, e2.g, e2.h, n2, true) : e2.m(t2, e2.h, n2, true);
|
|
1213
|
+
}
|
|
1214
|
+
var nr = class {
|
|
1215
|
+
constructor(t2, e2) {
|
|
1216
|
+
this.u = be(t2, e2);
|
|
1217
|
+
}
|
|
1218
|
+
toJSON() {
|
|
1219
|
+
return rr(this);
|
|
1220
|
+
}
|
|
1221
|
+
l() {
|
|
1222
|
+
var t2 = vo;
|
|
1223
|
+
return t2.g ? t2.l(this, t2.g, t2.h, true) : t2.l(this, t2.h, t2.defaultValue, true);
|
|
1224
|
+
}
|
|
1225
|
+
clone() {
|
|
1226
|
+
const t2 = this.u;
|
|
1227
|
+
return Ve(this, t2, et(t2), false);
|
|
1228
|
+
}
|
|
1229
|
+
O() {
|
|
1230
|
+
return !!(2 & tt(this.u));
|
|
1231
|
+
}
|
|
1232
|
+
};
|
|
1233
|
+
function rr(t2) {
|
|
1234
|
+
we(t2), t2 = tr ? t2.u : De(t2.u, Ge, void 0, void 0, false);
|
|
1235
|
+
{
|
|
1236
|
+
var e2 = !tr;
|
|
1237
|
+
let c2 = t2.length;
|
|
1238
|
+
if (c2) {
|
|
1239
|
+
var n2 = t2[c2 - 1], r2 = ut(n2);
|
|
1240
|
+
r2 ? c2-- : n2 = void 0;
|
|
1241
|
+
var i2 = t2;
|
|
1242
|
+
if (r2) {
|
|
1243
|
+
t: {
|
|
1244
|
+
var s2, o2 = n2, a2 = false;
|
|
1245
|
+
if (o2) for (let t3 in o2) isNaN(+t3) ? (s2 ?? (s2 = {}))[t3] = o2[t3] : (r2 = o2[t3], Array.isArray(r2) && (ft(r2) || ct(r2) && 0 === r2.size) && (r2 = null), null == r2 && (a2 = true), null != r2 && ((s2 ?? (s2 = {}))[t3] = r2));
|
|
1246
|
+
if (a2 || (s2 = o2), s2) for (let t3 in s2) {
|
|
1247
|
+
a2 = s2;
|
|
1248
|
+
break t;
|
|
1249
|
+
}
|
|
1250
|
+
a2 = null;
|
|
1251
|
+
}
|
|
1252
|
+
o2 = null == a2 ? null != n2 : a2 !== n2;
|
|
1253
|
+
}
|
|
1254
|
+
for (; c2 > 0 && (null == (s2 = i2[c2 - 1]) || ft(s2) || ct(s2) && 0 === s2.size); c2--) var h2 = true;
|
|
1255
|
+
(i2 !== t2 || o2 || h2) && (e2 ? (h2 || o2 || a2) && (i2.length = c2) : i2 = Array.prototype.slice.call(i2, 0, c2), a2 && i2.push(a2)), h2 = i2;
|
|
1256
|
+
} else h2 = t2;
|
|
1257
|
+
}
|
|
1258
|
+
return h2;
|
|
1259
|
+
}
|
|
1260
|
+
function ir(t2) {
|
|
1261
|
+
return t2 ? /^\d+$/.test(t2) ? (Vt(t2), new sr(Pt, Ot)) : null : or || (or = new sr(0, 0));
|
|
1262
|
+
}
|
|
1263
|
+
nr.prototype.Y = at, nr.prototype.toString = function() {
|
|
1264
|
+
try {
|
|
1265
|
+
return tr = true, rr(this).toString();
|
|
1266
|
+
} finally {
|
|
1267
|
+
tr = false;
|
|
1268
|
+
}
|
|
1269
|
+
};
|
|
1270
|
+
var sr = class {
|
|
1271
|
+
constructor(t2, e2) {
|
|
1272
|
+
this.h = t2 >>> 0, this.g = e2 >>> 0;
|
|
1273
|
+
}
|
|
1274
|
+
};
|
|
1275
|
+
var or;
|
|
1276
|
+
function ar(t2) {
|
|
1277
|
+
return t2 ? /^-?\d+$/.test(t2) ? (Vt(t2), new hr(Pt, Ot)) : null : cr || (cr = new hr(0, 0));
|
|
1278
|
+
}
|
|
1279
|
+
var hr = class {
|
|
1280
|
+
constructor(t2, e2) {
|
|
1281
|
+
this.h = t2 >>> 0, this.g = e2 >>> 0;
|
|
1282
|
+
}
|
|
1283
|
+
};
|
|
1284
|
+
var cr;
|
|
1285
|
+
function ur(t2, e2, n2) {
|
|
1286
|
+
for (; n2 > 0 || e2 > 127; ) t2.g.push(127 & e2 | 128), e2 = (e2 >>> 7 | n2 << 25) >>> 0, n2 >>>= 7;
|
|
1287
|
+
t2.g.push(e2);
|
|
1288
|
+
}
|
|
1289
|
+
function lr(t2, e2) {
|
|
1290
|
+
for (; e2 > 127; ) t2.g.push(127 & e2 | 128), e2 >>>= 7;
|
|
1291
|
+
t2.g.push(e2);
|
|
1292
|
+
}
|
|
1293
|
+
function fr(t2, e2) {
|
|
1294
|
+
if (e2 >= 0) lr(t2, e2);
|
|
1295
|
+
else {
|
|
1296
|
+
for (let n2 = 0; n2 < 9; n2++) t2.g.push(127 & e2 | 128), e2 >>= 7;
|
|
1297
|
+
t2.g.push(1);
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
function dr(t2, e2) {
|
|
1301
|
+
t2.g.push(e2 >>> 0 & 255), t2.g.push(e2 >>> 8 & 255), t2.g.push(e2 >>> 16 & 255), t2.g.push(e2 >>> 24 & 255);
|
|
1302
|
+
}
|
|
1303
|
+
function pr(t2, e2) {
|
|
1304
|
+
0 !== e2.length && (t2.l.push(e2), t2.h += e2.length);
|
|
1305
|
+
}
|
|
1306
|
+
function gr(t2, e2, n2) {
|
|
1307
|
+
lr(t2.g, 8 * e2 + n2);
|
|
1308
|
+
}
|
|
1309
|
+
function mr(t2, e2) {
|
|
1310
|
+
return gr(t2, e2, 2), e2 = t2.g.end(), pr(t2, e2), e2.push(t2.h), e2;
|
|
1311
|
+
}
|
|
1312
|
+
function yr(t2, e2) {
|
|
1313
|
+
var n2 = e2.pop();
|
|
1314
|
+
for (n2 = t2.h + t2.g.length() - n2; n2 > 127; ) e2.push(127 & n2 | 128), n2 >>>= 7, t2.h++;
|
|
1315
|
+
e2.push(n2), t2.h++;
|
|
1316
|
+
}
|
|
1317
|
+
function _r(t2, e2, n2) {
|
|
1318
|
+
gr(t2, e2, 2), lr(t2.g, n2.length), pr(t2, t2.g.end()), pr(t2, n2);
|
|
1319
|
+
}
|
|
1320
|
+
function vr(t2, e2, n2, r2) {
|
|
1321
|
+
null != n2 && (e2 = mr(t2, e2), r2(n2, t2), yr(t2, e2));
|
|
1322
|
+
}
|
|
1323
|
+
var Er = class {
|
|
1324
|
+
constructor(t2, e2, n2) {
|
|
1325
|
+
this.g = t2, this.h = e2, this.qa = n2;
|
|
1326
|
+
}
|
|
1327
|
+
};
|
|
1328
|
+
function wr(t2) {
|
|
1329
|
+
return Array.isArray(t2) ? t2[0] instanceof Er ? t2 : [gi, t2] : [t2, void 0];
|
|
1330
|
+
}
|
|
1331
|
+
function Tr(t2, e2) {
|
|
1332
|
+
if (Array.isArray(e2)) {
|
|
1333
|
+
var n2 = tt(e2);
|
|
1334
|
+
if (4 & n2) return e2;
|
|
1335
|
+
for (var r2 = 0, i2 = 0; r2 < e2.length; r2++) {
|
|
1336
|
+
const n3 = t2(e2[r2]);
|
|
1337
|
+
null != n3 && (e2[i2++] = n3);
|
|
1338
|
+
}
|
|
1339
|
+
return i2 < r2 && (e2.length = i2), nt(e2, -12289 & (5 | n2)), 2 & n2 && Object.freeze(e2), e2;
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
var Ar = /* @__PURE__ */ Symbol();
|
|
1343
|
+
function br(t2) {
|
|
1344
|
+
let e2 = t2[Ar];
|
|
1345
|
+
if (!e2) {
|
|
1346
|
+
const n2 = Ur(t2), r2 = n2.h;
|
|
1347
|
+
e2 = r2 ? (t3, e3) => r2(t3, e3, n2) : (t3, e3) => {
|
|
1348
|
+
for (; Kn(e3) && 4 != e3.h; ) {
|
|
1349
|
+
var r3 = e3.m;
|
|
1350
|
+
let o2 = n2[r3];
|
|
1351
|
+
const a2 = !o2;
|
|
1352
|
+
let h2 = false;
|
|
1353
|
+
if (!o2) {
|
|
1354
|
+
var i2 = n2.X;
|
|
1355
|
+
if (i2) {
|
|
1356
|
+
var s2 = i2[r3];
|
|
1357
|
+
s2 && (h2 = i2.P?.[r3], (!d || h2) && (i2 = kr(s2)) && (o2 = n2[r3] = i2));
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
o2 && o2(e3, t3, r3) || (r3 = (i2 = e3).l, Yn(i2), i2.ja ? i2 = void 0 : (s2 = i2.g.g - r3, i2.g.g = r3, i2 = Wn(i2.g, s2)), r3 = t3, i2 && (mt || (mt = /* @__PURE__ */ Symbol()), (s2 = r3[mt]) ? s2.push(i2) : r3[mt] = [i2])), a2 && o2 && !h2 && Wr++ < 5 && j();
|
|
1361
|
+
}
|
|
1362
|
+
}, t2[Ar] = e2;
|
|
1363
|
+
}
|
|
1364
|
+
return e2;
|
|
1365
|
+
}
|
|
1366
|
+
function kr(t2) {
|
|
1367
|
+
const e2 = (t2 = wr(t2))[0].g;
|
|
1368
|
+
if (t2 = t2[1]) {
|
|
1369
|
+
const n2 = br(t2), r2 = Ur(t2).g;
|
|
1370
|
+
return (t3, i2, s2) => e2(t3, i2, s2, r2, n2);
|
|
1371
|
+
}
|
|
1372
|
+
return e2;
|
|
1373
|
+
}
|
|
1374
|
+
function Sr(t2, e2, n2) {
|
|
1375
|
+
t2[e2] = n2;
|
|
1376
|
+
}
|
|
1377
|
+
function xr(t2, e2, n2, r2) {
|
|
1378
|
+
var i2 = Sr;
|
|
1379
|
+
e2.g = (function(t3) {
|
|
1380
|
+
switch (typeof t3) {
|
|
1381
|
+
case "boolean":
|
|
1382
|
+
return pe || (pe = [0, void 0, true]);
|
|
1383
|
+
case "number":
|
|
1384
|
+
return t3 > 0 ? void 0 : 0 === t3 ? ge || (ge = [0, void 0]) : [-t3, void 0];
|
|
1385
|
+
case "string":
|
|
1386
|
+
return [0, t3];
|
|
1387
|
+
case "object":
|
|
1388
|
+
return t3;
|
|
1389
|
+
}
|
|
1390
|
+
})(t2[0]);
|
|
1391
|
+
let s2 = 0;
|
|
1392
|
+
var o2 = t2[++s2];
|
|
1393
|
+
o2 && o2.constructor === Object && (e2.X = o2, "function" == typeof (o2 = t2[++s2]) && (e2.h = o2, e2.l = t2[++s2], o2 = t2[++s2]));
|
|
1394
|
+
const a2 = {};
|
|
1395
|
+
for (; Array.isArray(o2) && "number" == typeof o2[0] && o2[0] > 0; ) {
|
|
1396
|
+
for (var h2 = 0; h2 < o2.length; h2++) a2[o2[h2]] = o2;
|
|
1397
|
+
o2 = t2[++s2];
|
|
1398
|
+
}
|
|
1399
|
+
for (h2 = 1; void 0 !== o2; ) {
|
|
1400
|
+
let l2;
|
|
1401
|
+
"number" == typeof o2 && (h2 += o2, o2 = t2[++s2]);
|
|
1402
|
+
var c2 = void 0;
|
|
1403
|
+
if (o2 instanceof Er ? l2 = o2 : (l2 = mi, s2--), l2.qa) {
|
|
1404
|
+
o2 = t2[++s2], c2 = t2;
|
|
1405
|
+
var u2 = s2;
|
|
1406
|
+
"function" == typeof o2 && (o2 = o2(), c2[u2] = o2), c2 = o2;
|
|
1407
|
+
}
|
|
1408
|
+
for (u2 = h2 + 1, "number" == typeof (o2 = t2[++s2]) && o2 < 0 && (u2 -= o2, o2 = t2[++s2]); h2 < u2; h2++) {
|
|
1409
|
+
const t3 = a2[h2];
|
|
1410
|
+
i2(e2, h2, c2 ? r2(l2, c2, t3) : n2(l2, t3));
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
return e2;
|
|
1414
|
+
}
|
|
1415
|
+
var Lr = /* @__PURE__ */ Symbol();
|
|
1416
|
+
function Rr(t2) {
|
|
1417
|
+
let e2 = t2[Lr];
|
|
1418
|
+
if (!e2) {
|
|
1419
|
+
const n2 = Pr(t2);
|
|
1420
|
+
e2 = (t3, e3) => Br(t3, e3, n2), t2[Lr] = e2;
|
|
1421
|
+
}
|
|
1422
|
+
return e2;
|
|
1423
|
+
}
|
|
1424
|
+
var Fr = /* @__PURE__ */ Symbol();
|
|
1425
|
+
function Mr(t2) {
|
|
1426
|
+
return t2.h;
|
|
1427
|
+
}
|
|
1428
|
+
function Ir(t2, e2) {
|
|
1429
|
+
let n2, r2;
|
|
1430
|
+
const i2 = t2.h;
|
|
1431
|
+
return (t3, s2, o2) => i2(t3, s2, o2, r2 || (r2 = Pr(e2).g), n2 || (n2 = Rr(e2)));
|
|
1432
|
+
}
|
|
1433
|
+
function Pr(t2) {
|
|
1434
|
+
let e2 = t2[Fr];
|
|
1435
|
+
return e2 || (e2 = xr(t2, t2[Fr] = {}, Mr, Ir));
|
|
1436
|
+
}
|
|
1437
|
+
var Or = /* @__PURE__ */ Symbol();
|
|
1438
|
+
function Cr(t2, e2) {
|
|
1439
|
+
const n2 = t2.g;
|
|
1440
|
+
return e2 ? (t3, r2, i2) => n2(t3, r2, i2, e2) : n2;
|
|
1441
|
+
}
|
|
1442
|
+
function Nr(t2, e2, n2) {
|
|
1443
|
+
const r2 = t2.g;
|
|
1444
|
+
let i2, s2;
|
|
1445
|
+
return (t3, o2, a2) => r2(t3, o2, a2, s2 || (s2 = Ur(e2).g), i2 || (i2 = br(e2)), n2);
|
|
1446
|
+
}
|
|
1447
|
+
function Ur(t2) {
|
|
1448
|
+
let e2 = t2[Or];
|
|
1449
|
+
return e2 || (e2 = xr(t2, t2[Or] = {}, Cr, Nr));
|
|
1450
|
+
}
|
|
1451
|
+
function Dr(t2, e2) {
|
|
1452
|
+
var n2 = t2[e2];
|
|
1453
|
+
if (n2) return n2;
|
|
1454
|
+
if (n2 = t2.X) {
|
|
1455
|
+
var r2 = n2[e2];
|
|
1456
|
+
if (r2) {
|
|
1457
|
+
var i2 = (r2 = wr(r2))[0].h;
|
|
1458
|
+
if (r2 = r2[1], n2 = n2.P?.[e2], !d || n2) {
|
|
1459
|
+
if (r2) {
|
|
1460
|
+
const e3 = Rr(r2), s2 = Pr(r2).g;
|
|
1461
|
+
n2 = (n2 = t2.l) ? n2(s2, e3) : (t3, n3, r3) => i2(t3, n3, r3, s2, e3);
|
|
1462
|
+
} else n2 = i2;
|
|
1463
|
+
return t2[e2] = n2;
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
function Br(t2, e2, n2) {
|
|
1469
|
+
for (var r2 = et(t2), i2 = +!!(512 & r2) - 1, s2 = t2.length, o2 = 512 & r2 ? 1 : 0, a2 = s2 + (256 & r2 ? -1 : 0); o2 < a2; o2++) {
|
|
1470
|
+
const r3 = t2[o2];
|
|
1471
|
+
if (null == r3) continue;
|
|
1472
|
+
const s3 = o2 - i2, a3 = Dr(n2, s3);
|
|
1473
|
+
if (!a3) continue;
|
|
1474
|
+
const h2 = n2.X;
|
|
1475
|
+
h2?.[s3] && !h2?.P?.[s3] && Wr++ < 5 && j(), a3(e2, r3, s3);
|
|
1476
|
+
}
|
|
1477
|
+
if (256 & r2) {
|
|
1478
|
+
r2 = t2[s2 - 1];
|
|
1479
|
+
for (let t3 in r2) i2 = +t3, !Number.isNaN(i2) && (null != (s2 = r2[t3]) && (a2 = Dr(n2, i2))) && ((o2 = n2.X)?.[i2] && !o2?.P?.[i2] && Wr++ < 5 && j(), a2(e2, s2, i2));
|
|
1480
|
+
}
|
|
1481
|
+
if (t2 = mt ? t2[mt] : void 0) for (pr(e2, e2.g.end()), n2 = 0; n2 < t2.length; n2++) pr(e2, U(t2[n2]) || new Uint8Array(0));
|
|
1482
|
+
}
|
|
1483
|
+
function Gr(t2, e2) {
|
|
1484
|
+
return new Er(t2, e2, false);
|
|
1485
|
+
}
|
|
1486
|
+
function jr(t2, e2) {
|
|
1487
|
+
return new Er(t2, e2, false);
|
|
1488
|
+
}
|
|
1489
|
+
function Vr(t2, e2) {
|
|
1490
|
+
return new Er(t2, e2, true);
|
|
1491
|
+
}
|
|
1492
|
+
function Xr(t2, e2, n2) {
|
|
1493
|
+
qe(t2, et(t2), e2, n2);
|
|
1494
|
+
}
|
|
1495
|
+
var Hr = Vr((function(t2, e2, n2, r2, i2) {
|
|
1496
|
+
return 2 === t2.h && (t2 = $n(t2, Ae([void 0, void 0], r2), i2), pt(r2 = et(e2)), (i2 = Ye(e2, r2, n2)) instanceof Me ? 0 != (2 & i2.M) ? ((i2 = i2.Z()).push(t2), qe(e2, r2, n2, i2)) : i2.Qa(t2) : Array.isArray(i2) ? (2 & tt(i2) && qe(e2, r2, n2, i2 = on(i2)), i2.push(t2)) : qe(e2, r2, n2, [t2]), true);
|
|
1497
|
+
}), (function(t2, e2, n2, r2, i2) {
|
|
1498
|
+
if (e2 instanceof Me) e2.forEach(((e3, s2) => {
|
|
1499
|
+
vr(t2, n2, Ae([s2, e3], r2), i2);
|
|
1500
|
+
}));
|
|
1501
|
+
else if (Array.isArray(e2)) for (let s2 = 0; s2 < e2.length; s2++) {
|
|
1502
|
+
const o2 = e2[s2];
|
|
1503
|
+
Array.isArray(o2) && vr(t2, n2, Ae(o2, r2), i2);
|
|
1504
|
+
}
|
|
1505
|
+
}));
|
|
1506
|
+
var Wr = 0;
|
|
1507
|
+
function zr(t2, e2, n2) {
|
|
1508
|
+
if (e2 = (function(t3) {
|
|
1509
|
+
if (null == t3) return t3;
|
|
1510
|
+
const e3 = typeof t3;
|
|
1511
|
+
if ("bigint" === e3) return String(BigInt.asIntN(64, t3));
|
|
1512
|
+
if (Kt(t3)) {
|
|
1513
|
+
if ("string" === e3) return Zt(t3);
|
|
1514
|
+
if ("number" === e3) return Jt(t3);
|
|
1515
|
+
}
|
|
1516
|
+
})(e2), null != e2) {
|
|
1517
|
+
if ("string" == typeof e2) ar(e2);
|
|
1518
|
+
if (null != e2) switch (gr(t2, n2, 0), typeof e2) {
|
|
1519
|
+
case "number":
|
|
1520
|
+
t2 = t2.g, Nt(e2), ur(t2, Pt, Ot);
|
|
1521
|
+
break;
|
|
1522
|
+
case "bigint":
|
|
1523
|
+
n2 = BigInt.asUintN(64, e2), n2 = new hr(Number(n2 & BigInt(4294967295)), Number(n2 >> BigInt(32))), ur(t2.g, n2.h, n2.g);
|
|
1524
|
+
break;
|
|
1525
|
+
default:
|
|
1526
|
+
n2 = ar(e2), ur(t2.g, n2.h, n2.g);
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
function Kr(t2, e2, n2) {
|
|
1531
|
+
null != (e2 = Yt(e2)) && null != e2 && (gr(t2, n2, 0), fr(t2.g, e2));
|
|
1532
|
+
}
|
|
1533
|
+
function Yr(t2, e2, n2) {
|
|
1534
|
+
null != (e2 = Wt(e2)) && (gr(t2, n2, 0), t2.g.g.push(e2 ? 1 : 0));
|
|
1535
|
+
}
|
|
1536
|
+
function $r(t2, e2, n2) {
|
|
1537
|
+
null != (e2 = re(e2)) && _r(t2, n2, c(e2));
|
|
1538
|
+
}
|
|
1539
|
+
function qr(t2, e2, n2, r2, i2) {
|
|
1540
|
+
e2 instanceof nr ? (we(e2), e2 = e2.u) : e2 = Array.isArray(e2) ? Ae(e2, r2) : void 0, vr(t2, n2, e2, i2);
|
|
1541
|
+
}
|
|
1542
|
+
function Jr(t2, e2, n2) {
|
|
1543
|
+
null != (e2 = null == e2 || "string" == typeof e2 || I(e2) || e2 instanceof D ? e2 : void 0) && _r(t2, n2, On(e2).buffer);
|
|
1544
|
+
}
|
|
1545
|
+
function Zr(t2, e2, n2) {
|
|
1546
|
+
return (5 === t2.h || 2 === t2.h) && (e2 = Je(e2, et(e2), n2, 2, false), 2 == t2.h ? Zn(t2, Gn, e2) : e2.push(Gn(t2.g)), true);
|
|
1547
|
+
}
|
|
1548
|
+
var Qr;
|
|
1549
|
+
var ti = Gr((function(t2, e2, n2) {
|
|
1550
|
+
if (1 !== t2.h) return false;
|
|
1551
|
+
var r2 = t2.g;
|
|
1552
|
+
t2 = Bn(r2);
|
|
1553
|
+
const i2 = Bn(r2);
|
|
1554
|
+
r2 = 2 * (i2 >> 31) + 1;
|
|
1555
|
+
const s2 = i2 >>> 20 & 2047;
|
|
1556
|
+
return t2 = 4294967296 * (1048575 & i2) + t2, Xr(e2, n2, 2047 == s2 ? t2 ? NaN : r2 * (1 / 0) : 0 == s2 ? 5e-324 * r2 * t2 : r2 * Math.pow(2, s2 - 1075) * (t2 + 4503599627370496)), true;
|
|
1557
|
+
}), (function(t2, e2, n2) {
|
|
1558
|
+
null != (e2 = Ht(e2)) && (gr(t2, n2, 1), t2 = t2.g, (n2 = It || (It = new DataView(new ArrayBuffer(8)))).setFloat64(0, +e2, true), Pt = n2.getUint32(0, true), Ot = n2.getUint32(4, true), dr(t2, Pt), dr(t2, Ot));
|
|
1559
|
+
}));
|
|
1560
|
+
var ei = Gr((function(t2, e2, n2) {
|
|
1561
|
+
return 5 === t2.h && (Xr(e2, n2, Gn(t2.g)), true);
|
|
1562
|
+
}), (function(t2, e2, n2) {
|
|
1563
|
+
null != (e2 = Ht(e2)) && (gr(t2, n2, 5), t2 = t2.g, Ut(e2), dr(t2, Pt));
|
|
1564
|
+
}));
|
|
1565
|
+
var ni = jr(Zr, (function(t2, e2, n2) {
|
|
1566
|
+
if (null != (e2 = Tr(Ht, e2))) for (let o2 = 0; o2 < e2.length; o2++) {
|
|
1567
|
+
var r2 = t2, i2 = n2, s2 = e2[o2];
|
|
1568
|
+
null != s2 && (gr(r2, i2, 5), r2 = r2.g, Ut(s2), dr(r2, Pt));
|
|
1569
|
+
}
|
|
1570
|
+
}));
|
|
1571
|
+
var ri = jr(Zr, (function(t2, e2, n2) {
|
|
1572
|
+
if (null != (e2 = Tr(Ht, e2)) && e2.length) {
|
|
1573
|
+
gr(t2, n2, 2), lr(t2.g, 4 * e2.length);
|
|
1574
|
+
for (let r2 = 0; r2 < e2.length; r2++) n2 = t2.g, Ut(e2[r2]), dr(n2, Pt);
|
|
1575
|
+
}
|
|
1576
|
+
}));
|
|
1577
|
+
var ii = Gr((function(t2, e2, n2) {
|
|
1578
|
+
return 0 === t2.h && (Xr(e2, n2, Cn(t2.g, Bt)), true);
|
|
1579
|
+
}), zr);
|
|
1580
|
+
var si = Gr((function(t2, e2, n2) {
|
|
1581
|
+
return 0 === t2.h && (Xr(e2, n2, 0 === (t2 = Cn(t2.g, Bt)) ? void 0 : t2), true);
|
|
1582
|
+
}), zr);
|
|
1583
|
+
var oi = Gr((function(t2, e2, n2) {
|
|
1584
|
+
return 0 === t2.h && (Xr(e2, n2, Cn(t2.g, Dt)), true);
|
|
1585
|
+
}), (function(t2, e2, n2) {
|
|
1586
|
+
if (null != (e2 = te(e2))) {
|
|
1587
|
+
if ("string" == typeof e2) ir(e2);
|
|
1588
|
+
if (null != e2) switch (gr(t2, n2, 0), typeof e2) {
|
|
1589
|
+
case "number":
|
|
1590
|
+
t2 = t2.g, Nt(e2), ur(t2, Pt, Ot);
|
|
1591
|
+
break;
|
|
1592
|
+
case "bigint":
|
|
1593
|
+
n2 = BigInt.asUintN(64, e2), n2 = new sr(Number(n2 & BigInt(4294967295)), Number(n2 >> BigInt(32))), ur(t2.g, n2.h, n2.g);
|
|
1594
|
+
break;
|
|
1595
|
+
default:
|
|
1596
|
+
n2 = ir(e2), ur(t2.g, n2.h, n2.g);
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1599
|
+
}));
|
|
1600
|
+
var ai = Gr((function(t2, e2, n2) {
|
|
1601
|
+
return 0 === t2.h && (Xr(e2, n2, Un(t2.g)), true);
|
|
1602
|
+
}), Kr);
|
|
1603
|
+
var hi = jr((function(t2, e2, n2) {
|
|
1604
|
+
return (0 === t2.h || 2 === t2.h) && (e2 = Je(e2, et(e2), n2, 2, false), 2 == t2.h ? Zn(t2, Un, e2) : e2.push(Un(t2.g)), true);
|
|
1605
|
+
}), (function(t2, e2, n2) {
|
|
1606
|
+
if (null != (e2 = Tr(Yt, e2)) && e2.length) {
|
|
1607
|
+
n2 = mr(t2, n2);
|
|
1608
|
+
for (let n3 = 0; n3 < e2.length; n3++) fr(t2.g, e2[n3]);
|
|
1609
|
+
yr(t2, n2);
|
|
1610
|
+
}
|
|
1611
|
+
}));
|
|
1612
|
+
var ci = Gr((function(t2, e2, n2) {
|
|
1613
|
+
return 0 === t2.h && (Xr(e2, n2, 0 === (t2 = Un(t2.g)) ? void 0 : t2), true);
|
|
1614
|
+
}), Kr);
|
|
1615
|
+
var ui = Gr((function(t2, e2, n2) {
|
|
1616
|
+
return 0 === t2.h && (Xr(e2, n2, Nn(t2.g)), true);
|
|
1617
|
+
}), Yr);
|
|
1618
|
+
var li = Gr((function(t2, e2, n2) {
|
|
1619
|
+
return 0 === t2.h && (Xr(e2, n2, false === (t2 = Nn(t2.g)) ? void 0 : t2), true);
|
|
1620
|
+
}), Yr);
|
|
1621
|
+
var fi = jr((function(t2, e2, n2) {
|
|
1622
|
+
if (2 !== t2.h) return false;
|
|
1623
|
+
t2 = qn(t2);
|
|
1624
|
+
const r2 = et(e2);
|
|
1625
|
+
return pt(r2), Je(e2, r2, n2, 2).push(t2), true;
|
|
1626
|
+
}), (function(t2, e2, n2) {
|
|
1627
|
+
if (null != (e2 = Tr(re, e2))) for (let o2 = 0; o2 < e2.length; o2++) {
|
|
1628
|
+
var r2 = t2, i2 = n2, s2 = e2[o2];
|
|
1629
|
+
null != s2 && _r(r2, i2, c(s2));
|
|
1630
|
+
}
|
|
1631
|
+
}));
|
|
1632
|
+
var di = Gr((function(t2, e2, n2) {
|
|
1633
|
+
return 2 === t2.h && (Xr(e2, n2, "" === (t2 = qn(t2)) ? void 0 : t2), true);
|
|
1634
|
+
}), $r);
|
|
1635
|
+
var pi = Gr((function(t2, e2, n2) {
|
|
1636
|
+
return 2 === t2.h && (Xr(e2, n2, qn(t2)), true);
|
|
1637
|
+
}), $r);
|
|
1638
|
+
var gi = Vr((function(t2, e2, n2, r2, i2) {
|
|
1639
|
+
return 2 === t2.h && ($n(t2, fn(e2, r2, n2, true), i2), true);
|
|
1640
|
+
}), qr);
|
|
1641
|
+
var mi = Vr((function(t2, e2, n2, r2, i2) {
|
|
1642
|
+
return 2 === t2.h && ($n(t2, fn(e2, r2, n2), i2), true);
|
|
1643
|
+
}), qr);
|
|
1644
|
+
Qr = new Er((function(t2, e2, n2, r2, i2) {
|
|
1645
|
+
if (2 !== t2.h) return false;
|
|
1646
|
+
r2 = Ae(void 0, r2);
|
|
1647
|
+
let s2 = et(e2);
|
|
1648
|
+
pt(s2);
|
|
1649
|
+
let o2 = Je(e2, s2, n2, 3);
|
|
1650
|
+
return s2 = et(e2), 4 & tt(o2) && (o2 = H(o2), nt(o2, -2079 & (1 | tt(o2))), qe(e2, s2, n2, o2)), o2.push(r2), $n(t2, r2, i2), true;
|
|
1651
|
+
}), (function(t2, e2, n2, r2, i2) {
|
|
1652
|
+
if (Array.isArray(e2)) for (let s2 = 0; s2 < e2.length; s2++) qr(t2, e2[s2], n2, r2, i2);
|
|
1653
|
+
}), true);
|
|
1654
|
+
var yi = Vr((function(t2, e2, n2, r2, i2, s2) {
|
|
1655
|
+
return 2 === t2.h && (un(e2, et(e2), s2, n2), $n(t2, e2 = fn(e2, r2, n2), i2), true);
|
|
1656
|
+
}), qr);
|
|
1657
|
+
var _i = Gr((function(t2, e2, n2) {
|
|
1658
|
+
return 2 === t2.h && (Xr(e2, n2, Jn(t2)), true);
|
|
1659
|
+
}), Jr);
|
|
1660
|
+
var vi = jr((function(t2, e2, n2) {
|
|
1661
|
+
return (0 === t2.h || 2 === t2.h) && (e2 = Je(e2, et(e2), n2, 2, false), 2 == t2.h ? Zn(t2, Dn, e2) : e2.push(Dn(t2.g)), true);
|
|
1662
|
+
}), (function(t2, e2, n2) {
|
|
1663
|
+
if (null != (e2 = Tr($t, e2))) for (let o2 = 0; o2 < e2.length; o2++) {
|
|
1664
|
+
var r2 = t2, i2 = n2, s2 = e2[o2];
|
|
1665
|
+
null != s2 && (gr(r2, i2, 0), lr(r2.g, s2));
|
|
1666
|
+
}
|
|
1667
|
+
}));
|
|
1668
|
+
var Ei = Gr((function(t2, e2, n2) {
|
|
1669
|
+
return 0 === t2.h && (Xr(e2, n2, Un(t2.g)), true);
|
|
1670
|
+
}), (function(t2, e2, n2) {
|
|
1671
|
+
null != (e2 = Yt(e2)) && (e2 = parseInt(e2, 10), gr(t2, n2, 0), fr(t2.g, e2));
|
|
1672
|
+
}));
|
|
1673
|
+
var wi = class {
|
|
1674
|
+
constructor(t2, e2) {
|
|
1675
|
+
this.h = t2, this.g = e2, this.l = pn, this.m = yn, this.defaultValue = void 0;
|
|
1676
|
+
}
|
|
1677
|
+
};
|
|
1678
|
+
function Ti(t2, e2) {
|
|
1679
|
+
return new wi(t2, e2);
|
|
1680
|
+
}
|
|
1681
|
+
function Ai(t2, e2) {
|
|
1682
|
+
return (n2, r2) => {
|
|
1683
|
+
if (Qn.length) {
|
|
1684
|
+
const t3 = Qn.pop();
|
|
1685
|
+
t3.o(r2), Vn(t3.g, n2, r2), n2 = t3;
|
|
1686
|
+
} else n2 = new class {
|
|
1687
|
+
constructor(t3, e3) {
|
|
1688
|
+
if (zn.length) {
|
|
1689
|
+
const n3 = zn.pop();
|
|
1690
|
+
Vn(n3, t3, e3), t3 = n3;
|
|
1691
|
+
} else t3 = new class {
|
|
1692
|
+
constructor(t4, e4) {
|
|
1693
|
+
this.h = null, this.m = false, this.g = this.l = this.j = 0, Vn(this, t4, e4);
|
|
1694
|
+
}
|
|
1695
|
+
clear() {
|
|
1696
|
+
this.h = null, this.m = false, this.g = this.l = this.j = 0, this.ea = false;
|
|
1697
|
+
}
|
|
1698
|
+
}(t3, e3);
|
|
1699
|
+
this.g = t3, this.l = this.g.g, this.h = this.m = -1, this.o(e3);
|
|
1700
|
+
}
|
|
1701
|
+
o({ ja: t3 = false } = {}) {
|
|
1702
|
+
this.ja = t3;
|
|
1703
|
+
}
|
|
1704
|
+
}(n2, r2);
|
|
1705
|
+
try {
|
|
1706
|
+
const r3 = new t2(), s2 = r3.u;
|
|
1707
|
+
br(e2)(s2, n2);
|
|
1708
|
+
var i2 = r3;
|
|
1709
|
+
} finally {
|
|
1710
|
+
n2.g.clear(), n2.m = -1, n2.h = -1, Qn.length < 100 && Qn.push(n2);
|
|
1711
|
+
}
|
|
1712
|
+
return i2;
|
|
1713
|
+
};
|
|
1714
|
+
}
|
|
1715
|
+
function bi(t2) {
|
|
1716
|
+
return function() {
|
|
1717
|
+
we(this);
|
|
1718
|
+
const e2 = new class {
|
|
1719
|
+
constructor() {
|
|
1720
|
+
this.l = [], this.h = 0, this.g = new class {
|
|
1721
|
+
constructor() {
|
|
1722
|
+
this.g = [];
|
|
1723
|
+
}
|
|
1724
|
+
length() {
|
|
1725
|
+
return this.g.length;
|
|
1726
|
+
}
|
|
1727
|
+
end() {
|
|
1728
|
+
const t3 = this.g;
|
|
1729
|
+
return this.g = [], t3;
|
|
1730
|
+
}
|
|
1731
|
+
}();
|
|
1732
|
+
}
|
|
1733
|
+
}();
|
|
1734
|
+
Br(this.u, e2, Pr(t2)), pr(e2, e2.g.end());
|
|
1735
|
+
const n2 = new Uint8Array(e2.h), r2 = e2.l, i2 = r2.length;
|
|
1736
|
+
let s2 = 0;
|
|
1737
|
+
for (let t3 = 0; t3 < i2; t3++) {
|
|
1738
|
+
const e3 = r2[t3];
|
|
1739
|
+
n2.set(e3, s2), s2 += e3.length;
|
|
1740
|
+
}
|
|
1741
|
+
return e2.l = [n2], n2;
|
|
1742
|
+
};
|
|
1743
|
+
}
|
|
1744
|
+
var ki = class extends nr {
|
|
1745
|
+
constructor(t2) {
|
|
1746
|
+
super(t2);
|
|
1747
|
+
}
|
|
1748
|
+
};
|
|
1749
|
+
var Si = [0, di, Gr((function(t2, e2, n2) {
|
|
1750
|
+
return 2 === t2.h && (Xr(e2, n2, (t2 = Jn(t2)) === N() ? void 0 : t2), true);
|
|
1751
|
+
}), (function(t2, e2, n2) {
|
|
1752
|
+
if (null != e2) {
|
|
1753
|
+
if (e2 instanceof nr) {
|
|
1754
|
+
const r2 = e2.Ta;
|
|
1755
|
+
return void (r2 && (e2 = r2(e2), null != e2 && _r(t2, n2, On(e2).buffer)));
|
|
1756
|
+
}
|
|
1757
|
+
if (Array.isArray(e2)) return;
|
|
1758
|
+
}
|
|
1759
|
+
Jr(t2, e2, n2);
|
|
1760
|
+
}))];
|
|
1761
|
+
var xi = [0, ai, Ei, ui, -1, hi, Ei, -1];
|
|
1762
|
+
var Li = class extends nr {
|
|
1763
|
+
constructor() {
|
|
1764
|
+
super();
|
|
1765
|
+
}
|
|
1766
|
+
};
|
|
1767
|
+
var Ri = [0, ui, pi, ui, Ei, -1, jr((function(t2, e2, n2) {
|
|
1768
|
+
return (0 === t2.h || 2 === t2.h) && (e2 = Je(e2, et(e2), n2, 2, false), 2 == t2.h ? Zn(t2, jn, e2) : e2.push(Un(t2.g)), true);
|
|
1769
|
+
}), (function(t2, e2, n2) {
|
|
1770
|
+
if (null != (e2 = Tr(Yt, e2)) && e2.length) {
|
|
1771
|
+
n2 = mr(t2, n2);
|
|
1772
|
+
for (let n3 = 0; n3 < e2.length; n3++) fr(t2.g, e2[n3]);
|
|
1773
|
+
yr(t2, n2);
|
|
1774
|
+
}
|
|
1775
|
+
})), pi, -1, [0, ui, -1], Ei, ui, -1];
|
|
1776
|
+
var Fi = [0, pi, -2];
|
|
1777
|
+
var Mi = class extends nr {
|
|
1778
|
+
constructor() {
|
|
1779
|
+
super();
|
|
1780
|
+
}
|
|
1781
|
+
};
|
|
1782
|
+
var Ii = [0];
|
|
1783
|
+
var Pi = [0, ai, ui, 1, ui, -3];
|
|
1784
|
+
var Oi = [0, pi, ui, -1, ai, [0, [1, 2, 3, 4, 5, 6, 7], yi, Ii, yi, Ri, yi, Fi, yi, Pi, yi, xi, yi, [0, pi, -2], yi, [0, pi, Ei]], [0, pi], ui, [0, [1, 3], [2, 4], yi, [0, hi], -1, yi, [0, fi], -1, Qr, [0, pi, -1]], pi];
|
|
1785
|
+
var Ci = class extends nr {
|
|
1786
|
+
constructor(t2) {
|
|
1787
|
+
super(t2, 2);
|
|
1788
|
+
}
|
|
1789
|
+
};
|
|
1790
|
+
var Ni = {};
|
|
1791
|
+
var Ui = Ni.P = {};
|
|
1792
|
+
Ni[336783863] = Oi, Ui[336783863] = 1;
|
|
1793
|
+
var Di = [0, si, -1, li, -3, si, hi, di, ci, si, -1, li, ci, li, -2, di];
|
|
1794
|
+
function Bi(t2, e2) {
|
|
1795
|
+
an(t2, 2, ne(e2), "");
|
|
1796
|
+
}
|
|
1797
|
+
function Gi(t2, e2) {
|
|
1798
|
+
Fn(t2, 3, e2);
|
|
1799
|
+
}
|
|
1800
|
+
function ji(t2, e2) {
|
|
1801
|
+
Fn(t2, 4, e2);
|
|
1802
|
+
}
|
|
1803
|
+
var Vi = class extends nr {
|
|
1804
|
+
constructor(t2) {
|
|
1805
|
+
super(t2, 500);
|
|
1806
|
+
}
|
|
1807
|
+
o(t2) {
|
|
1808
|
+
return yn(this, 0, 7, t2);
|
|
1809
|
+
}
|
|
1810
|
+
};
|
|
1811
|
+
var Xi = [-1, { P: {} }];
|
|
1812
|
+
var Hi = [0, pi, 1, Xi];
|
|
1813
|
+
var Wi = [0, pi, fi, Xi];
|
|
1814
|
+
function zi(t2, e2) {
|
|
1815
|
+
wn(t2, 1, Vi, e2);
|
|
1816
|
+
}
|
|
1817
|
+
function Ki(t2, e2) {
|
|
1818
|
+
Fn(t2, 10, e2);
|
|
1819
|
+
}
|
|
1820
|
+
function Yi(t2, e2) {
|
|
1821
|
+
Fn(t2, 15, e2);
|
|
1822
|
+
}
|
|
1823
|
+
var $i = class extends nr {
|
|
1824
|
+
constructor(t2) {
|
|
1825
|
+
super(t2, 500);
|
|
1826
|
+
}
|
|
1827
|
+
o(t2) {
|
|
1828
|
+
return yn(this, 0, 1001, t2);
|
|
1829
|
+
}
|
|
1830
|
+
};
|
|
1831
|
+
var qi = [-500, Qr, [-500, di, -1, fi, -3, [-2, Ni, ui], Qr, Si, ci, -1, Hi, Wi, Qr, [0, di, li], di, Di, ci, fi, 987, fi], 4, Qr, [-500, pi, -1, [-1, { P: {} }], 998, pi], Qr, [-500, pi, fi, -1, [-2, { P: {} }, ui], 997, fi, -1], ci, Qr, [-500, pi, fi, Xi, 998, fi], fi, ci, Hi, Wi, Qr, [0, di, -1, Xi], fi, -2, Di, di, -1, li, 979, Xi, Qr, Si];
|
|
1832
|
+
$i.prototype.g = bi(qi);
|
|
1833
|
+
var Ji = Ai($i, qi);
|
|
1834
|
+
var Zi = class extends nr {
|
|
1835
|
+
constructor(t2) {
|
|
1836
|
+
super(t2);
|
|
1837
|
+
}
|
|
1838
|
+
};
|
|
1839
|
+
var Qi = class extends nr {
|
|
1840
|
+
constructor(t2) {
|
|
1841
|
+
super(t2);
|
|
1842
|
+
}
|
|
1843
|
+
g() {
|
|
1844
|
+
return mn(this, Zi, 1);
|
|
1845
|
+
}
|
|
1846
|
+
};
|
|
1847
|
+
var ts = [0, Qr, [0, ai, ei, pi, -1]];
|
|
1848
|
+
var es = Ai(Qi, ts);
|
|
1849
|
+
var ns = class extends nr {
|
|
1850
|
+
constructor(t2) {
|
|
1851
|
+
super(t2);
|
|
1852
|
+
}
|
|
1853
|
+
};
|
|
1854
|
+
var rs = class extends nr {
|
|
1855
|
+
constructor(t2) {
|
|
1856
|
+
super(t2);
|
|
1857
|
+
}
|
|
1858
|
+
};
|
|
1859
|
+
var is = class extends nr {
|
|
1860
|
+
constructor(t2) {
|
|
1861
|
+
super(t2);
|
|
1862
|
+
}
|
|
1863
|
+
h() {
|
|
1864
|
+
return pn(this, ns, 2);
|
|
1865
|
+
}
|
|
1866
|
+
g() {
|
|
1867
|
+
return mn(this, rs, 5);
|
|
1868
|
+
}
|
|
1869
|
+
};
|
|
1870
|
+
var ss = Ai(class extends nr {
|
|
1871
|
+
constructor(t2) {
|
|
1872
|
+
super(t2);
|
|
1873
|
+
}
|
|
1874
|
+
}, [0, fi, hi, ri, [0, Ei, [0, ai, -3], [0, ei, -3], [0, ai, -1, [0, Qr, [0, ai, -2]]], Qr, [0, ei, -1, pi, ei]], pi, -1, ii, Qr, [0, ai, ei], fi, ii]);
|
|
1875
|
+
var os = class extends nr {
|
|
1876
|
+
constructor(t2) {
|
|
1877
|
+
super(t2);
|
|
1878
|
+
}
|
|
1879
|
+
};
|
|
1880
|
+
var as = Ai(class extends nr {
|
|
1881
|
+
constructor(t2) {
|
|
1882
|
+
super(t2);
|
|
1883
|
+
}
|
|
1884
|
+
}, [0, Qr, [0, ei, -4]]);
|
|
1885
|
+
var hs = class extends nr {
|
|
1886
|
+
constructor(t2) {
|
|
1887
|
+
super(t2);
|
|
1888
|
+
}
|
|
1889
|
+
};
|
|
1890
|
+
var cs = Ai(class extends nr {
|
|
1891
|
+
constructor(t2) {
|
|
1892
|
+
super(t2);
|
|
1893
|
+
}
|
|
1894
|
+
}, [0, Qr, [0, ei, -4]]);
|
|
1895
|
+
var us = class extends nr {
|
|
1896
|
+
constructor(t2) {
|
|
1897
|
+
super(t2);
|
|
1898
|
+
}
|
|
1899
|
+
};
|
|
1900
|
+
var ls = [0, ai, -1, ri, Ei];
|
|
1901
|
+
var fs = class extends nr {
|
|
1902
|
+
constructor() {
|
|
1903
|
+
super();
|
|
1904
|
+
}
|
|
1905
|
+
};
|
|
1906
|
+
fs.prototype.g = bi([0, ei, -4, ii]);
|
|
1907
|
+
var ds = class extends nr {
|
|
1908
|
+
constructor(t2) {
|
|
1909
|
+
super(t2);
|
|
1910
|
+
}
|
|
1911
|
+
};
|
|
1912
|
+
var ps = Ai(class extends nr {
|
|
1913
|
+
constructor(t2) {
|
|
1914
|
+
super(t2);
|
|
1915
|
+
}
|
|
1916
|
+
}, [0, Qr, [0, 1, ai, pi, ts], ii]);
|
|
1917
|
+
var gs = class extends nr {
|
|
1918
|
+
constructor(t2) {
|
|
1919
|
+
super(t2);
|
|
1920
|
+
}
|
|
1921
|
+
};
|
|
1922
|
+
var ms = class extends nr {
|
|
1923
|
+
constructor(t2) {
|
|
1924
|
+
super(t2);
|
|
1925
|
+
}
|
|
1926
|
+
ra() {
|
|
1927
|
+
const t2 = Qe(this);
|
|
1928
|
+
return null == t2 ? N() : t2;
|
|
1929
|
+
}
|
|
1930
|
+
};
|
|
1931
|
+
var ys = class extends nr {
|
|
1932
|
+
constructor(t2) {
|
|
1933
|
+
super(t2);
|
|
1934
|
+
}
|
|
1935
|
+
};
|
|
1936
|
+
var _s = [1, 2];
|
|
1937
|
+
var vs = Ai(class extends nr {
|
|
1938
|
+
constructor(t2) {
|
|
1939
|
+
super(t2);
|
|
1940
|
+
}
|
|
1941
|
+
}, [0, Qr, [0, _s, yi, [0, ri], yi, [0, _i], ai, pi], ii]);
|
|
1942
|
+
var Es = class extends nr {
|
|
1943
|
+
constructor(t2) {
|
|
1944
|
+
super(t2);
|
|
1945
|
+
}
|
|
1946
|
+
};
|
|
1947
|
+
var ws = [0, pi, ai, ei, fi, -1];
|
|
1948
|
+
var Ts = class extends nr {
|
|
1949
|
+
constructor(t2) {
|
|
1950
|
+
super(t2);
|
|
1951
|
+
}
|
|
1952
|
+
};
|
|
1953
|
+
var As = [0, ui, -1];
|
|
1954
|
+
var bs = class extends nr {
|
|
1955
|
+
constructor(t2) {
|
|
1956
|
+
super(t2);
|
|
1957
|
+
}
|
|
1958
|
+
};
|
|
1959
|
+
var ks = [1, 2, 3, 4, 5];
|
|
1960
|
+
var Ss = class extends nr {
|
|
1961
|
+
constructor(t2) {
|
|
1962
|
+
super(t2);
|
|
1963
|
+
}
|
|
1964
|
+
g() {
|
|
1965
|
+
return null != Qe(this);
|
|
1966
|
+
}
|
|
1967
|
+
h() {
|
|
1968
|
+
return null != re(ze(this, 2));
|
|
1969
|
+
}
|
|
1970
|
+
};
|
|
1971
|
+
var xs = class extends nr {
|
|
1972
|
+
constructor(t2) {
|
|
1973
|
+
super(t2);
|
|
1974
|
+
}
|
|
1975
|
+
g() {
|
|
1976
|
+
return Wt(ze(this, 2)) ?? false;
|
|
1977
|
+
}
|
|
1978
|
+
};
|
|
1979
|
+
var Ls = [0, _i, pi, [0, ai, ii, -1], [0, oi, ii]];
|
|
1980
|
+
var Rs = [0, Ls, ui, [0, ks, yi, Pi, yi, Ri, yi, xi, yi, Ii, yi, Fi], Ei];
|
|
1981
|
+
var Fs = class extends nr {
|
|
1982
|
+
constructor(t2) {
|
|
1983
|
+
super(t2);
|
|
1984
|
+
}
|
|
1985
|
+
};
|
|
1986
|
+
var Ms = [0, Rs, ei, -1, ai];
|
|
1987
|
+
var Is = Ti(502141897, Fs);
|
|
1988
|
+
Ni[502141897] = Ms, Ui[502141897] = 1;
|
|
1989
|
+
var Ps = [0, Ls];
|
|
1990
|
+
Ni[512499200] = Ps;
|
|
1991
|
+
var Os = [0, Ps];
|
|
1992
|
+
Ni[515723506] = Os;
|
|
1993
|
+
var Cs = Ai(class extends nr {
|
|
1994
|
+
constructor(t2) {
|
|
1995
|
+
super(t2);
|
|
1996
|
+
}
|
|
1997
|
+
}, [0, [0, Ei, -1, ni, vi], ls]);
|
|
1998
|
+
var Ns = [0, Rs];
|
|
1999
|
+
Ni[508981768] = Ns;
|
|
2000
|
+
var Us = class extends nr {
|
|
2001
|
+
constructor(t2) {
|
|
2002
|
+
super(t2);
|
|
2003
|
+
}
|
|
2004
|
+
};
|
|
2005
|
+
var Ds = class extends nr {
|
|
2006
|
+
constructor(t2) {
|
|
2007
|
+
super(t2);
|
|
2008
|
+
}
|
|
2009
|
+
};
|
|
2010
|
+
var Bs = [0, Rs, ei, Ns, ui];
|
|
2011
|
+
var Gs = [0, Rs, Ms, Bs, ei, Os];
|
|
2012
|
+
Ni[508968149] = Bs;
|
|
2013
|
+
var js = Ti(508968150, Ds);
|
|
2014
|
+
Ni[508968150] = Gs, Ui[508968150] = 1, Ui[508968149] = 1;
|
|
2015
|
+
var Vs = class extends nr {
|
|
2016
|
+
constructor(t2) {
|
|
2017
|
+
super(t2);
|
|
2018
|
+
}
|
|
2019
|
+
};
|
|
2020
|
+
var Xs = Ti(513916220, Vs);
|
|
2021
|
+
Ni[513916220] = [0, Rs, Gs, ai], Ui[513916220] = 1;
|
|
2022
|
+
var Hs = class extends nr {
|
|
2023
|
+
constructor(t2) {
|
|
2024
|
+
super(t2);
|
|
2025
|
+
}
|
|
2026
|
+
h() {
|
|
2027
|
+
return pn(this, Es, 2);
|
|
2028
|
+
}
|
|
2029
|
+
g() {
|
|
2030
|
+
$e(this, 2);
|
|
2031
|
+
}
|
|
2032
|
+
};
|
|
2033
|
+
var Ws = [0, Rs, ws];
|
|
2034
|
+
Ni[478825465] = Ws, Ui[478825465] = 1;
|
|
2035
|
+
var zs = [0, Rs];
|
|
2036
|
+
Ni[478825422] = zs;
|
|
2037
|
+
var Ks = class extends nr {
|
|
2038
|
+
constructor(t2) {
|
|
2039
|
+
super(t2);
|
|
2040
|
+
}
|
|
2041
|
+
};
|
|
2042
|
+
var Ys = class extends nr {
|
|
2043
|
+
constructor(t2) {
|
|
2044
|
+
super(t2);
|
|
2045
|
+
}
|
|
2046
|
+
};
|
|
2047
|
+
var $s = class extends nr {
|
|
2048
|
+
constructor(t2) {
|
|
2049
|
+
super(t2);
|
|
2050
|
+
}
|
|
2051
|
+
};
|
|
2052
|
+
var qs = class extends nr {
|
|
2053
|
+
constructor(t2) {
|
|
2054
|
+
super(t2);
|
|
2055
|
+
}
|
|
2056
|
+
};
|
|
2057
|
+
var Js = class extends nr {
|
|
2058
|
+
constructor(t2) {
|
|
2059
|
+
super(t2);
|
|
2060
|
+
}
|
|
2061
|
+
};
|
|
2062
|
+
var Zs = [0, Rs, zs, Ws, -1];
|
|
2063
|
+
var Qs = [0, Rs, ei, ai];
|
|
2064
|
+
var to = [0, Rs, ei];
|
|
2065
|
+
var eo = [0, Rs, Qs, to, ei];
|
|
2066
|
+
var no = [0, Rs, eo, Zs];
|
|
2067
|
+
Ni[463370452] = Zs, Ni[464864288] = Qs, Ni[474472470] = to;
|
|
2068
|
+
var ro = Ti(462713202, qs);
|
|
2069
|
+
Ni[462713202] = eo;
|
|
2070
|
+
var io = Ti(479097054, Js);
|
|
2071
|
+
Ni[479097054] = no, Ui[479097054] = 1, Ui[463370452] = 1, Ui[464864288] = 1, Ui[462713202] = 1, Ui[474472470] = 1;
|
|
2072
|
+
var so = class extends nr {
|
|
2073
|
+
constructor(t2) {
|
|
2074
|
+
super(t2);
|
|
2075
|
+
}
|
|
2076
|
+
};
|
|
2077
|
+
var oo = class extends nr {
|
|
2078
|
+
constructor(t2) {
|
|
2079
|
+
super(t2);
|
|
2080
|
+
}
|
|
2081
|
+
};
|
|
2082
|
+
var ao = class extends nr {
|
|
2083
|
+
constructor(t2) {
|
|
2084
|
+
super(t2);
|
|
2085
|
+
}
|
|
2086
|
+
};
|
|
2087
|
+
var ho = class extends nr {
|
|
2088
|
+
constructor() {
|
|
2089
|
+
super();
|
|
2090
|
+
}
|
|
2091
|
+
};
|
|
2092
|
+
var co = [0, Rs, ei, -1, ai];
|
|
2093
|
+
var uo = [0, Rs, ei, ui];
|
|
2094
|
+
ho.prototype.g = bi([0, Rs, to, [0, Rs], Ms, Bs, co, uo]), Ni[514774813] = co, Ni[518928384] = uo;
|
|
2095
|
+
var lo = class extends nr {
|
|
2096
|
+
constructor(t2) {
|
|
2097
|
+
super(t2);
|
|
2098
|
+
}
|
|
2099
|
+
};
|
|
2100
|
+
var fo = Ti(456383383, lo);
|
|
2101
|
+
Ni[456383383] = [0, Rs, ws], Ui[456383383] = 1;
|
|
2102
|
+
var po = class extends nr {
|
|
2103
|
+
constructor(t2) {
|
|
2104
|
+
super(t2);
|
|
2105
|
+
}
|
|
2106
|
+
};
|
|
2107
|
+
var go = Ti(476348187, po);
|
|
2108
|
+
Ni[476348187] = [0, Rs, As], Ui[476348187] = 1;
|
|
2109
|
+
var mo = class extends nr {
|
|
2110
|
+
constructor(t2) {
|
|
2111
|
+
super(t2);
|
|
2112
|
+
}
|
|
2113
|
+
};
|
|
2114
|
+
var yo = class extends nr {
|
|
2115
|
+
constructor(t2) {
|
|
2116
|
+
super(t2);
|
|
2117
|
+
}
|
|
2118
|
+
};
|
|
2119
|
+
var _o = [0, Ei, -1];
|
|
2120
|
+
var vo = Ti(458105876, class extends nr {
|
|
2121
|
+
constructor(t2) {
|
|
2122
|
+
super(t2);
|
|
2123
|
+
}
|
|
2124
|
+
g() {
|
|
2125
|
+
var t2 = this.u;
|
|
2126
|
+
const e2 = et(t2);
|
|
2127
|
+
const n2 = 2 & e2;
|
|
2128
|
+
return t2 = (function(t3, e3, n3) {
|
|
2129
|
+
var r2 = yo;
|
|
2130
|
+
const i2 = 2 & e3;
|
|
2131
|
+
let s2 = false;
|
|
2132
|
+
if (null == n3) {
|
|
2133
|
+
if (i2) return Ne();
|
|
2134
|
+
n3 = [];
|
|
2135
|
+
} else if (n3.constructor === Me) {
|
|
2136
|
+
if (0 == (2 & n3.M) || i2) return n3;
|
|
2137
|
+
n3 = n3.Z();
|
|
2138
|
+
} else Array.isArray(n3) ? s2 = !!(2 & tt(n3)) : n3 = [];
|
|
2139
|
+
if (i2) {
|
|
2140
|
+
if (!n3.length) return Ne();
|
|
2141
|
+
s2 || (s2 = true, rt(n3));
|
|
2142
|
+
} else s2 && (s2 = false, n3 = on(n3));
|
|
2143
|
+
return s2 || (64 & tt(n3) ? Q(n3, 32) : 32 & e3 && Z(n3, 32)), qe(t3, e3, 2, r2 = new Me(n3, r2, se, void 0)), r2;
|
|
2144
|
+
})(t2, e2, Ye(t2, e2, 2)), !n2 && yo && (t2.va = true), t2;
|
|
2145
|
+
}
|
|
2146
|
+
});
|
|
2147
|
+
Ni[458105876] = [0, _o, Hr, [true, ii, [0, pi, -1, fi]]], Ui[458105876] = 1;
|
|
2148
|
+
var Eo = class extends nr {
|
|
2149
|
+
constructor(t2) {
|
|
2150
|
+
super(t2);
|
|
2151
|
+
}
|
|
2152
|
+
};
|
|
2153
|
+
var wo = Ti(458105758, Eo);
|
|
2154
|
+
Ni[458105758] = [0, Rs, pi, _o], Ui[458105758] = 1;
|
|
2155
|
+
var To = class extends nr {
|
|
2156
|
+
constructor(t2) {
|
|
2157
|
+
super(t2);
|
|
2158
|
+
}
|
|
2159
|
+
};
|
|
2160
|
+
var Ao = Ti(443442058, To);
|
|
2161
|
+
Ni[443442058] = [0, Rs, pi, ai, ei, fi, -1], Ui[443442058] = 1, Ui[514774813] = 1;
|
|
2162
|
+
var bo = class extends nr {
|
|
2163
|
+
constructor(t2) {
|
|
2164
|
+
super(t2);
|
|
2165
|
+
}
|
|
2166
|
+
};
|
|
2167
|
+
var ko = Ti(516587230, bo);
|
|
2168
|
+
function So(t2, e2) {
|
|
2169
|
+
return e2 = e2 ? e2.clone() : new Es(), void 0 !== t2.displayNamesLocale ? $e(e2, 1, ne(t2.displayNamesLocale)) : void 0 === t2.displayNamesLocale && $e(e2, 1), void 0 !== t2.maxResults ? xn(e2, 2, t2.maxResults) : "maxResults" in t2 && $e(e2, 2), void 0 !== t2.scoreThreshold ? Ln(e2, 3, t2.scoreThreshold) : "scoreThreshold" in t2 && $e(e2, 3), void 0 !== t2.categoryAllowlist ? Rn(e2, 4, t2.categoryAllowlist) : "categoryAllowlist" in t2 && $e(e2, 4), void 0 !== t2.categoryDenylist ? Rn(e2, 5, t2.categoryDenylist) : "categoryDenylist" in t2 && $e(e2, 5), e2;
|
|
2170
|
+
}
|
|
2171
|
+
function xo(t2, e2 = -1, n2 = "") {
|
|
2172
|
+
return { categories: t2.map(((t3) => ({ index: Tn(An(t3, 1), 0) ?? -1, score: bn(t3, 2) ?? 0, categoryName: kn(t3, 3) ?? "", displayName: kn(t3, 4) ?? "" }))), headIndex: e2, headName: n2 };
|
|
2173
|
+
}
|
|
2174
|
+
function Lo(t2) {
|
|
2175
|
+
var e2 = en(t2, 3, Ht, tn()), n2 = en(t2, 2, Yt, tn()), r2 = en(t2, 1, re, tn()), i2 = en(t2, 9, re, tn());
|
|
2176
|
+
const s2 = { categories: [], keypoints: [] };
|
|
2177
|
+
for (let t3 = 0; t3 < e2.length; t3++) s2.categories.push({ score: e2[t3], index: n2[t3] ?? -1, categoryName: r2[t3] ?? "", displayName: i2[t3] ?? "" });
|
|
2178
|
+
if ((e2 = pn(t2, is, 4)?.h()) && (s2.boundingBox = { originX: An(e2, 1) ?? 0, originY: An(e2, 2) ?? 0, width: An(e2, 3) ?? 0, height: An(e2, 4) ?? 0, angle: 0 }), pn(t2, is, 4)?.g().length) for (const e3 of pn(t2, is, 4).g()) s2.keypoints.push({ x: Ze(e3, 1) ?? 0, y: Ze(e3, 2) ?? 0, score: Ze(e3, 4) ?? 0, label: re(ze(e3, 3)) ?? "" });
|
|
2179
|
+
return s2;
|
|
2180
|
+
}
|
|
2181
|
+
function Ro(t2) {
|
|
2182
|
+
const e2 = [];
|
|
2183
|
+
for (const n2 of mn(t2, hs, 1)) e2.push({ x: bn(n2, 1) ?? 0, y: bn(n2, 2) ?? 0, z: bn(n2, 3) ?? 0, visibility: bn(n2, 4) ?? 0 });
|
|
2184
|
+
return e2;
|
|
2185
|
+
}
|
|
2186
|
+
function Fo(t2) {
|
|
2187
|
+
const e2 = [];
|
|
2188
|
+
for (const n2 of mn(t2, os, 1)) e2.push({ x: bn(n2, 1) ?? 0, y: bn(n2, 2) ?? 0, z: bn(n2, 3) ?? 0, visibility: bn(n2, 4) ?? 0 });
|
|
2189
|
+
return e2;
|
|
2190
|
+
}
|
|
2191
|
+
function Mo(t2) {
|
|
2192
|
+
return Array.from(t2, ((t3) => t3 > 127 ? t3 - 256 : t3));
|
|
2193
|
+
}
|
|
2194
|
+
function Io(t2, e2) {
|
|
2195
|
+
if (t2.length !== e2.length) throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t2.length} vs. ${e2.length}).`);
|
|
2196
|
+
let n2 = 0, r2 = 0, i2 = 0;
|
|
2197
|
+
for (let s2 = 0; s2 < t2.length; s2++) n2 += t2[s2] * e2[s2], r2 += t2[s2] * t2[s2], i2 += e2[s2] * e2[s2];
|
|
2198
|
+
if (r2 <= 0 || i2 <= 0) throw Error("Cannot compute cosine similarity on embedding with 0 norm.");
|
|
2199
|
+
return n2 / Math.sqrt(r2 * i2);
|
|
2200
|
+
}
|
|
2201
|
+
var Po;
|
|
2202
|
+
Ni[516587230] = [0, Rs, co, uo, ei], Ui[516587230] = 1, Ui[518928384] = 1;
|
|
2203
|
+
var Oo = new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 5, 1, 96, 0, 1, 123, 3, 2, 1, 0, 10, 10, 1, 8, 0, 65, 0, 253, 15, 253, 98, 11]);
|
|
2204
|
+
async function Co() {
|
|
2205
|
+
if (void 0 === Po) try {
|
|
2206
|
+
await WebAssembly.instantiate(Oo), Po = true;
|
|
2207
|
+
} catch {
|
|
2208
|
+
Po = false;
|
|
2209
|
+
}
|
|
2210
|
+
return Po;
|
|
2211
|
+
}
|
|
2212
|
+
async function No(t2, e2 = "") {
|
|
2213
|
+
const n2 = await Co() ? "wasm_internal" : "wasm_nosimd_internal";
|
|
2214
|
+
return { wasmLoaderPath: `${e2}/${t2}_${n2}.js`, wasmBinaryPath: `${e2}/${t2}_${n2}.wasm` };
|
|
2215
|
+
}
|
|
2216
|
+
var Uo = class {
|
|
2217
|
+
};
|
|
2218
|
+
function Do() {
|
|
2219
|
+
var t2 = navigator;
|
|
2220
|
+
return "undefined" != typeof OffscreenCanvas && (!(function(t3 = navigator) {
|
|
2221
|
+
return (t3 = t3.userAgent).includes("Safari") && !t3.includes("Chrome");
|
|
2222
|
+
})(t2) || !!((t2 = t2.userAgent.match(/Version\/([\d]+).*Safari/)) && t2.length >= 1 && Number(t2[1]) >= 17));
|
|
2223
|
+
}
|
|
2224
|
+
async function Bo(t2) {
|
|
2225
|
+
if ("function" != typeof importScripts) {
|
|
2226
|
+
const e2 = document.createElement("script");
|
|
2227
|
+
return e2.src = t2.toString(), e2.crossOrigin = "anonymous", new Promise(((t3, n2) => {
|
|
2228
|
+
e2.addEventListener("load", (() => {
|
|
2229
|
+
t3();
|
|
2230
|
+
}), false), e2.addEventListener("error", ((t4) => {
|
|
2231
|
+
n2(t4);
|
|
2232
|
+
}), false), document.body.appendChild(e2);
|
|
2233
|
+
}));
|
|
2234
|
+
}
|
|
2235
|
+
importScripts(t2.toString());
|
|
2236
|
+
}
|
|
2237
|
+
function Go(t2) {
|
|
2238
|
+
return void 0 !== t2.videoWidth ? [t2.videoWidth, t2.videoHeight] : void 0 !== t2.naturalWidth ? [t2.naturalWidth, t2.naturalHeight] : void 0 !== t2.displayWidth ? [t2.displayWidth, t2.displayHeight] : [t2.width, t2.height];
|
|
2239
|
+
}
|
|
2240
|
+
function jo(t2, e2, n2) {
|
|
2241
|
+
t2.m || console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"), n2(e2 = t2.i.stringToNewUTF8(e2)), t2.i._free(e2);
|
|
2242
|
+
}
|
|
2243
|
+
function Vo(t2, e2, n2) {
|
|
2244
|
+
if (!t2.i.canvas) throw Error("No OpenGL canvas configured.");
|
|
2245
|
+
if (n2 ? t2.i._bindTextureToStream(n2) : t2.i._bindTextureToCanvas(), !(n2 = t2.i.canvas.getContext("webgl2") || t2.i.canvas.getContext("webgl"))) throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");
|
|
2246
|
+
t2.i.gpuOriginForWebTexturesIsBottomLeft && n2.pixelStorei(n2.UNPACK_FLIP_Y_WEBGL, true), n2.texImage2D(n2.TEXTURE_2D, 0, n2.RGBA, n2.RGBA, n2.UNSIGNED_BYTE, e2), t2.i.gpuOriginForWebTexturesIsBottomLeft && n2.pixelStorei(n2.UNPACK_FLIP_Y_WEBGL, false);
|
|
2247
|
+
const [r2, i2] = Go(e2);
|
|
2248
|
+
return !t2.l || r2 === t2.i.canvas.width && i2 === t2.i.canvas.height || (t2.i.canvas.width = r2, t2.i.canvas.height = i2), [r2, i2];
|
|
2249
|
+
}
|
|
2250
|
+
function Xo(t2, e2, n2) {
|
|
2251
|
+
t2.m || console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");
|
|
2252
|
+
const r2 = new Uint32Array(e2.length);
|
|
2253
|
+
for (let n3 = 0; n3 < e2.length; n3++) r2[n3] = t2.i.stringToNewUTF8(e2[n3]);
|
|
2254
|
+
e2 = t2.i._malloc(4 * r2.length), t2.i.HEAPU32.set(r2, e2 >> 2), n2(e2);
|
|
2255
|
+
for (const e3 of r2) t2.i._free(e3);
|
|
2256
|
+
t2.i._free(e2);
|
|
2257
|
+
}
|
|
2258
|
+
function Ho(t2, e2, n2) {
|
|
2259
|
+
t2.i.simpleListeners = t2.i.simpleListeners || {}, t2.i.simpleListeners[e2] = n2;
|
|
2260
|
+
}
|
|
2261
|
+
function Wo(t2, e2, n2) {
|
|
2262
|
+
let r2 = [];
|
|
2263
|
+
t2.i.simpleListeners = t2.i.simpleListeners || {}, t2.i.simpleListeners[e2] = (t3, e3, i2) => {
|
|
2264
|
+
e3 ? (n2(r2, i2), r2 = []) : r2.push(t3);
|
|
2265
|
+
};
|
|
2266
|
+
}
|
|
2267
|
+
Uo.forVisionTasks = function(t2) {
|
|
2268
|
+
return No("vision", t2);
|
|
2269
|
+
}, Uo.forTextTasks = function(t2) {
|
|
2270
|
+
return No("text", t2);
|
|
2271
|
+
}, Uo.forGenAiExperimentalTasks = function(t2) {
|
|
2272
|
+
return No("genai_experimental", t2);
|
|
2273
|
+
}, Uo.forGenAiTasks = function(t2) {
|
|
2274
|
+
return No("genai", t2);
|
|
2275
|
+
}, Uo.forAudioTasks = function(t2) {
|
|
2276
|
+
return No("audio", t2);
|
|
2277
|
+
}, Uo.isSimdSupported = function() {
|
|
2278
|
+
return Co();
|
|
2279
|
+
};
|
|
2280
|
+
async function zo(t2, e2, n2, r2) {
|
|
2281
|
+
return t2 = await (async (t3, e3, n3, r3, i2) => {
|
|
2282
|
+
if (e3 && await Bo(e3), !self.ModuleFactory) throw Error("ModuleFactory not set.");
|
|
2283
|
+
if (n3 && (await Bo(n3), !self.ModuleFactory)) throw Error("ModuleFactory not set.");
|
|
2284
|
+
return self.Module && i2 && ((e3 = self.Module).locateFile = i2.locateFile, i2.mainScriptUrlOrBlob && (e3.mainScriptUrlOrBlob = i2.mainScriptUrlOrBlob)), i2 = await self.ModuleFactory(self.Module || i2), self.ModuleFactory = self.Module = void 0, new t3(i2, r3);
|
|
2285
|
+
})(t2, n2.wasmLoaderPath, n2.assetLoaderPath, e2, { locateFile: (t3) => t3.endsWith(".wasm") ? n2.wasmBinaryPath.toString() : n2.assetBinaryPath && t3.endsWith(".data") ? n2.assetBinaryPath.toString() : t3 }), await t2.o(r2), t2;
|
|
2286
|
+
}
|
|
2287
|
+
function Ko(t2, e2) {
|
|
2288
|
+
const n2 = pn(t2.baseOptions, Ss, 1) || new Ss();
|
|
2289
|
+
"string" == typeof e2 ? ($e(n2, 2, ne(e2)), $e(n2, 1)) : e2 instanceof Uint8Array && ($e(n2, 1, lt(e2, false, false)), $e(n2, 2)), yn(t2.baseOptions, 0, 1, n2);
|
|
2290
|
+
}
|
|
2291
|
+
function Yo(t2) {
|
|
2292
|
+
try {
|
|
2293
|
+
const e2 = t2.H.length;
|
|
2294
|
+
if (1 === e2) throw Error(t2.H[0].message);
|
|
2295
|
+
if (e2 > 1) throw Error("Encountered multiple errors: " + t2.H.map(((t3) => t3.message)).join(", "));
|
|
2296
|
+
} finally {
|
|
2297
|
+
t2.H = [];
|
|
2298
|
+
}
|
|
2299
|
+
}
|
|
2300
|
+
function $o(t2, e2) {
|
|
2301
|
+
t2.B = Math.max(t2.B, e2);
|
|
2302
|
+
}
|
|
2303
|
+
function qo(t2, e2) {
|
|
2304
|
+
t2.A = new Vi(), Bi(t2.A, "PassThroughCalculator"), Gi(t2.A, "free_memory"), ji(t2.A, "free_memory_unused_out"), Ki(e2, "free_memory"), zi(e2, t2.A);
|
|
2305
|
+
}
|
|
2306
|
+
function Jo(t2, e2) {
|
|
2307
|
+
Gi(t2.A, e2), ji(t2.A, e2 + "_unused_out");
|
|
2308
|
+
}
|
|
2309
|
+
function Zo(t2) {
|
|
2310
|
+
t2.g.addBoolToStream(true, "free_memory", t2.B);
|
|
2311
|
+
}
|
|
2312
|
+
var Qo = class {
|
|
2313
|
+
constructor(t2) {
|
|
2314
|
+
this.g = t2, this.H = [], this.B = 0, this.g.setAutoRenderToScreen(false);
|
|
2315
|
+
}
|
|
2316
|
+
l(t2, e2 = true) {
|
|
2317
|
+
if (e2) {
|
|
2318
|
+
const e3 = t2.baseOptions || {};
|
|
2319
|
+
if (t2.baseOptions?.modelAssetBuffer && t2.baseOptions?.modelAssetPath) throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");
|
|
2320
|
+
if (!(pn(this.baseOptions, Ss, 1)?.g() || pn(this.baseOptions, Ss, 1)?.h() || t2.baseOptions?.modelAssetBuffer || t2.baseOptions?.modelAssetPath)) throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");
|
|
2321
|
+
if ((function(t3, e4) {
|
|
2322
|
+
let n2 = pn(t3.baseOptions, bs, 3);
|
|
2323
|
+
if (!n2) {
|
|
2324
|
+
var r2 = n2 = new bs(), i2 = new Mi();
|
|
2325
|
+
_n(r2, 4, ks, i2);
|
|
2326
|
+
}
|
|
2327
|
+
"delegate" in e4 && ("GPU" === e4.delegate ? (e4 = n2, r2 = new Li(), _n(e4, 2, ks, r2)) : (e4 = n2, r2 = new Mi(), _n(e4, 4, ks, r2))), yn(t3.baseOptions, 0, 3, n2);
|
|
2328
|
+
})(this, e3), e3.modelAssetPath) return fetch(e3.modelAssetPath.toString()).then(((t3) => {
|
|
2329
|
+
if (t3.ok) return t3.arrayBuffer();
|
|
2330
|
+
throw Error(`Failed to fetch model: ${e3.modelAssetPath} (${t3.status})`);
|
|
2331
|
+
})).then(((t3) => {
|
|
2332
|
+
try {
|
|
2333
|
+
this.g.i.FS_unlink("/model.dat");
|
|
2334
|
+
} catch {
|
|
2335
|
+
}
|
|
2336
|
+
this.g.i.FS_createDataFile("/", "model.dat", new Uint8Array(t3), true, false, false), Ko(this, "/model.dat"), this.m(), this.J();
|
|
2337
|
+
}));
|
|
2338
|
+
if (e3.modelAssetBuffer instanceof Uint8Array) Ko(this, e3.modelAssetBuffer);
|
|
2339
|
+
else if (e3.modelAssetBuffer) return (async function(t3) {
|
|
2340
|
+
const e4 = [];
|
|
2341
|
+
for (var n2 = 0; ; ) {
|
|
2342
|
+
const { done: r2, value: i2 } = await t3.read();
|
|
2343
|
+
if (r2) break;
|
|
2344
|
+
e4.push(i2), n2 += i2.length;
|
|
2345
|
+
}
|
|
2346
|
+
if (0 === e4.length) return new Uint8Array(0);
|
|
2347
|
+
if (1 === e4.length) return e4[0];
|
|
2348
|
+
t3 = new Uint8Array(n2), n2 = 0;
|
|
2349
|
+
for (const r2 of e4) t3.set(r2, n2), n2 += r2.length;
|
|
2350
|
+
return t3;
|
|
2351
|
+
})(e3.modelAssetBuffer).then(((t3) => {
|
|
2352
|
+
Ko(this, t3), this.m(), this.J();
|
|
2353
|
+
}));
|
|
2354
|
+
}
|
|
2355
|
+
return this.m(), this.J(), Promise.resolve();
|
|
2356
|
+
}
|
|
2357
|
+
J() {
|
|
2358
|
+
}
|
|
2359
|
+
ga() {
|
|
2360
|
+
let t2;
|
|
2361
|
+
if (this.g.ga(((e2) => {
|
|
2362
|
+
t2 = Ji(e2);
|
|
2363
|
+
})), !t2) throw Error("Failed to retrieve CalculatorGraphConfig");
|
|
2364
|
+
return t2;
|
|
2365
|
+
}
|
|
2366
|
+
setGraph(t2, e2) {
|
|
2367
|
+
this.g.attachErrorListener(((t3, e3) => {
|
|
2368
|
+
this.H.push(Error(e3));
|
|
2369
|
+
})), this.g.Oa(), this.g.setGraph(t2, e2), this.A = void 0, Yo(this);
|
|
2370
|
+
}
|
|
2371
|
+
finishProcessing() {
|
|
2372
|
+
this.g.finishProcessing(), Yo(this);
|
|
2373
|
+
}
|
|
2374
|
+
close() {
|
|
2375
|
+
this.A = void 0, this.g.closeGraph();
|
|
2376
|
+
}
|
|
2377
|
+
};
|
|
2378
|
+
function ta(t2, e2) {
|
|
2379
|
+
if (!t2) throw Error(`Unable to obtain required WebGL resource: ${e2}`);
|
|
2380
|
+
return t2;
|
|
2381
|
+
}
|
|
2382
|
+
Qo.prototype.close = Qo.prototype.close, (function(e2, n2) {
|
|
2383
|
+
e2 = e2.split(".");
|
|
2384
|
+
var r2, i2 = t;
|
|
2385
|
+
e2[0] in i2 || void 0 === i2.execScript || i2.execScript("var " + e2[0]);
|
|
2386
|
+
for (; e2.length && (r2 = e2.shift()); ) e2.length || void 0 === n2 ? i2 = i2[r2] && i2[r2] !== Object.prototype[r2] ? i2[r2] : i2[r2] = {} : i2[r2] = n2;
|
|
2387
|
+
})("TaskRunner", Qo);
|
|
2388
|
+
var ea = class {
|
|
2389
|
+
constructor(t2, e2, n2, r2) {
|
|
2390
|
+
this.g = t2, this.h = e2, this.m = n2, this.l = r2;
|
|
2391
|
+
}
|
|
2392
|
+
bind() {
|
|
2393
|
+
this.g.bindVertexArray(this.h);
|
|
2394
|
+
}
|
|
2395
|
+
close() {
|
|
2396
|
+
this.g.deleteVertexArray(this.h), this.g.deleteBuffer(this.m), this.g.deleteBuffer(this.l);
|
|
2397
|
+
}
|
|
2398
|
+
};
|
|
2399
|
+
function na(t2, e2, n2) {
|
|
2400
|
+
const r2 = t2.g;
|
|
2401
|
+
if (n2 = ta(r2.createShader(n2), "Failed to create WebGL shader"), r2.shaderSource(n2, e2), r2.compileShader(n2), !r2.getShaderParameter(n2, r2.COMPILE_STATUS)) throw Error(`Could not compile WebGL shader: ${r2.getShaderInfoLog(n2)}`);
|
|
2402
|
+
return r2.attachShader(t2.h, n2), n2;
|
|
2403
|
+
}
|
|
2404
|
+
function ra(t2, e2) {
|
|
2405
|
+
const n2 = t2.g, r2 = ta(n2.createVertexArray(), "Failed to create vertex array");
|
|
2406
|
+
n2.bindVertexArray(r2);
|
|
2407
|
+
const i2 = ta(n2.createBuffer(), "Failed to create buffer");
|
|
2408
|
+
n2.bindBuffer(n2.ARRAY_BUFFER, i2), n2.enableVertexAttribArray(t2.R), n2.vertexAttribPointer(t2.R, 2, n2.FLOAT, false, 0, 0), n2.bufferData(n2.ARRAY_BUFFER, new Float32Array([-1, -1, -1, 1, 1, 1, 1, -1]), n2.STATIC_DRAW);
|
|
2409
|
+
const s2 = ta(n2.createBuffer(), "Failed to create buffer");
|
|
2410
|
+
return n2.bindBuffer(n2.ARRAY_BUFFER, s2), n2.enableVertexAttribArray(t2.J), n2.vertexAttribPointer(t2.J, 2, n2.FLOAT, false, 0, 0), n2.bufferData(n2.ARRAY_BUFFER, new Float32Array(e2 ? [0, 1, 0, 0, 1, 0, 1, 1] : [0, 0, 0, 1, 1, 1, 1, 0]), n2.STATIC_DRAW), n2.bindBuffer(n2.ARRAY_BUFFER, null), n2.bindVertexArray(null), new ea(n2, r2, i2, s2);
|
|
2411
|
+
}
|
|
2412
|
+
function ia(t2, e2) {
|
|
2413
|
+
if (t2.g) {
|
|
2414
|
+
if (e2 !== t2.g) throw Error("Cannot change GL context once initialized");
|
|
2415
|
+
} else t2.g = e2;
|
|
2416
|
+
}
|
|
2417
|
+
function sa(t2, e2, n2, r2) {
|
|
2418
|
+
return ia(t2, e2), t2.h || (t2.m(), t2.C()), n2 ? (t2.s || (t2.s = ra(t2, true)), n2 = t2.s) : (t2.v || (t2.v = ra(t2, false)), n2 = t2.v), e2.useProgram(t2.h), n2.bind(), t2.l(), t2 = r2(), n2.g.bindVertexArray(null), t2;
|
|
2419
|
+
}
|
|
2420
|
+
function oa(t2, e2, n2) {
|
|
2421
|
+
return ia(t2, e2), t2 = ta(e2.createTexture(), "Failed to create texture"), e2.bindTexture(e2.TEXTURE_2D, t2), e2.texParameteri(e2.TEXTURE_2D, e2.TEXTURE_WRAP_S, e2.CLAMP_TO_EDGE), e2.texParameteri(e2.TEXTURE_2D, e2.TEXTURE_WRAP_T, e2.CLAMP_TO_EDGE), e2.texParameteri(e2.TEXTURE_2D, e2.TEXTURE_MIN_FILTER, n2 ?? e2.LINEAR), e2.texParameteri(e2.TEXTURE_2D, e2.TEXTURE_MAG_FILTER, n2 ?? e2.LINEAR), e2.bindTexture(e2.TEXTURE_2D, null), t2;
|
|
2422
|
+
}
|
|
2423
|
+
function aa(t2, e2, n2) {
|
|
2424
|
+
ia(t2, e2), t2.A || (t2.A = ta(e2.createFramebuffer(), "Failed to create framebuffe.")), e2.bindFramebuffer(e2.FRAMEBUFFER, t2.A), e2.framebufferTexture2D(e2.FRAMEBUFFER, e2.COLOR_ATTACHMENT0, e2.TEXTURE_2D, n2, 0);
|
|
2425
|
+
}
|
|
2426
|
+
function ha(t2) {
|
|
2427
|
+
t2.g?.bindFramebuffer(t2.g.FRAMEBUFFER, null);
|
|
2428
|
+
}
|
|
2429
|
+
var ca = class {
|
|
2430
|
+
H() {
|
|
2431
|
+
return "\n precision mediump float;\n varying vec2 vTex;\n uniform sampler2D inputTexture;\n void main() {\n gl_FragColor = texture2D(inputTexture, vTex);\n }\n ";
|
|
2432
|
+
}
|
|
2433
|
+
m() {
|
|
2434
|
+
const t2 = this.g;
|
|
2435
|
+
if (this.h = ta(t2.createProgram(), "Failed to create WebGL program"), this.da = na(this, "\n attribute vec2 aVertex;\n attribute vec2 aTex;\n varying vec2 vTex;\n void main(void) {\n gl_Position = vec4(aVertex, 0.0, 1.0);\n vTex = aTex;\n }", t2.VERTEX_SHADER), this.ca = na(this, this.H(), t2.FRAGMENT_SHADER), t2.linkProgram(this.h), !t2.getProgramParameter(this.h, t2.LINK_STATUS)) throw Error(`Error during program linking: ${t2.getProgramInfoLog(this.h)}`);
|
|
2436
|
+
this.R = t2.getAttribLocation(this.h, "aVertex"), this.J = t2.getAttribLocation(this.h, "aTex");
|
|
2437
|
+
}
|
|
2438
|
+
C() {
|
|
2439
|
+
}
|
|
2440
|
+
l() {
|
|
2441
|
+
}
|
|
2442
|
+
close() {
|
|
2443
|
+
if (this.h) {
|
|
2444
|
+
const t2 = this.g;
|
|
2445
|
+
t2.deleteProgram(this.h), t2.deleteShader(this.da), t2.deleteShader(this.ca);
|
|
2446
|
+
}
|
|
2447
|
+
this.A && this.g.deleteFramebuffer(this.A), this.v && this.v.close(), this.s && this.s.close();
|
|
2448
|
+
}
|
|
2449
|
+
};
|
|
2450
|
+
var ua = class extends ca {
|
|
2451
|
+
H() {
|
|
2452
|
+
return "\n precision mediump float;\n uniform sampler2D backgroundTexture;\n uniform sampler2D maskTexture;\n uniform sampler2D colorMappingTexture;\n varying vec2 vTex;\n void main() {\n vec4 backgroundColor = texture2D(backgroundTexture, vTex);\n float category = texture2D(maskTexture, vTex).r;\n vec4 categoryColor = texture2D(colorMappingTexture, vec2(category, 0.0));\n gl_FragColor = mix(backgroundColor, categoryColor, categoryColor.a);\n }\n ";
|
|
2453
|
+
}
|
|
2454
|
+
C() {
|
|
2455
|
+
const t2 = this.g;
|
|
2456
|
+
t2.activeTexture(t2.TEXTURE1), this.B = oa(this, t2, t2.LINEAR), t2.activeTexture(t2.TEXTURE2), this.j = oa(this, t2, t2.NEAREST);
|
|
2457
|
+
}
|
|
2458
|
+
m() {
|
|
2459
|
+
super.m();
|
|
2460
|
+
const t2 = this.g;
|
|
2461
|
+
this.L = ta(t2.getUniformLocation(this.h, "backgroundTexture"), "Uniform location"), this.V = ta(t2.getUniformLocation(this.h, "colorMappingTexture"), "Uniform location"), this.K = ta(t2.getUniformLocation(this.h, "maskTexture"), "Uniform location");
|
|
2462
|
+
}
|
|
2463
|
+
l() {
|
|
2464
|
+
super.l();
|
|
2465
|
+
const t2 = this.g;
|
|
2466
|
+
t2.uniform1i(this.K, 0), t2.uniform1i(this.L, 1), t2.uniform1i(this.V, 2);
|
|
2467
|
+
}
|
|
2468
|
+
close() {
|
|
2469
|
+
this.B && this.g.deleteTexture(this.B), this.j && this.g.deleteTexture(this.j), super.close();
|
|
2470
|
+
}
|
|
2471
|
+
};
|
|
2472
|
+
var la = class extends ca {
|
|
2473
|
+
H() {
|
|
2474
|
+
return "\n precision mediump float;\n uniform sampler2D maskTexture;\n uniform sampler2D defaultTexture;\n uniform sampler2D overlayTexture;\n varying vec2 vTex;\n void main() {\n float confidence = texture2D(maskTexture, vTex).r;\n vec4 defaultColor = texture2D(defaultTexture, vTex);\n vec4 overlayColor = texture2D(overlayTexture, vTex);\n // Apply the alpha from the overlay and merge in the default color\n overlayColor = mix(defaultColor, overlayColor, overlayColor.a);\n gl_FragColor = mix(defaultColor, overlayColor, confidence);\n }\n ";
|
|
2475
|
+
}
|
|
2476
|
+
C() {
|
|
2477
|
+
const t2 = this.g;
|
|
2478
|
+
t2.activeTexture(t2.TEXTURE1), this.j = oa(this, t2), t2.activeTexture(t2.TEXTURE2), this.B = oa(this, t2);
|
|
2479
|
+
}
|
|
2480
|
+
m() {
|
|
2481
|
+
super.m();
|
|
2482
|
+
const t2 = this.g;
|
|
2483
|
+
this.K = ta(t2.getUniformLocation(this.h, "defaultTexture"), "Uniform location"), this.L = ta(t2.getUniformLocation(this.h, "overlayTexture"), "Uniform location"), this.I = ta(t2.getUniformLocation(this.h, "maskTexture"), "Uniform location");
|
|
2484
|
+
}
|
|
2485
|
+
l() {
|
|
2486
|
+
super.l();
|
|
2487
|
+
const t2 = this.g;
|
|
2488
|
+
t2.uniform1i(this.I, 0), t2.uniform1i(this.K, 1), t2.uniform1i(this.L, 2);
|
|
2489
|
+
}
|
|
2490
|
+
close() {
|
|
2491
|
+
this.j && this.g.deleteTexture(this.j), this.B && this.g.deleteTexture(this.B), super.close();
|
|
2492
|
+
}
|
|
2493
|
+
};
|
|
2494
|
+
function fa(t2, e2) {
|
|
2495
|
+
switch (e2) {
|
|
2496
|
+
case 0:
|
|
2497
|
+
return t2.g.find(((t3) => t3 instanceof Uint8Array));
|
|
2498
|
+
case 1:
|
|
2499
|
+
return t2.g.find(((t3) => t3 instanceof Float32Array));
|
|
2500
|
+
case 2:
|
|
2501
|
+
return t2.g.find(((t3) => "undefined" != typeof WebGLTexture && t3 instanceof WebGLTexture));
|
|
2502
|
+
default:
|
|
2503
|
+
throw Error(`Type is not supported: ${e2}`);
|
|
2504
|
+
}
|
|
2505
|
+
}
|
|
2506
|
+
function da(t2) {
|
|
2507
|
+
var e2 = fa(t2, 1);
|
|
2508
|
+
if (!e2) {
|
|
2509
|
+
if (e2 = fa(t2, 0)) e2 = new Float32Array(e2).map(((t3) => t3 / 255));
|
|
2510
|
+
else {
|
|
2511
|
+
e2 = new Float32Array(t2.width * t2.height);
|
|
2512
|
+
const r2 = ga(t2);
|
|
2513
|
+
var n2 = ya(t2);
|
|
2514
|
+
if (aa(n2, r2, pa(t2)), "iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in self.document) {
|
|
2515
|
+
n2 = new Float32Array(t2.width * t2.height * 4), r2.readPixels(0, 0, t2.width, t2.height, r2.RGBA, r2.FLOAT, n2);
|
|
2516
|
+
for (let t3 = 0, r3 = 0; t3 < e2.length; ++t3, r3 += 4) e2[t3] = n2[r3];
|
|
2517
|
+
} else r2.readPixels(0, 0, t2.width, t2.height, r2.RED, r2.FLOAT, e2);
|
|
2518
|
+
}
|
|
2519
|
+
t2.g.push(e2);
|
|
2520
|
+
}
|
|
2521
|
+
return e2;
|
|
2522
|
+
}
|
|
2523
|
+
function pa(t2) {
|
|
2524
|
+
let e2 = fa(t2, 2);
|
|
2525
|
+
if (!e2) {
|
|
2526
|
+
const n2 = ga(t2);
|
|
2527
|
+
e2 = _a(t2);
|
|
2528
|
+
const r2 = da(t2), i2 = ma(t2);
|
|
2529
|
+
n2.texImage2D(n2.TEXTURE_2D, 0, i2, t2.width, t2.height, 0, n2.RED, n2.FLOAT, r2), va(t2);
|
|
2530
|
+
}
|
|
2531
|
+
return e2;
|
|
2532
|
+
}
|
|
2533
|
+
function ga(t2) {
|
|
2534
|
+
if (!t2.canvas) throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");
|
|
2535
|
+
return t2.h || (t2.h = ta(t2.canvas.getContext("webgl2"), "You cannot use a canvas that is already bound to a different type of rendering context.")), t2.h;
|
|
2536
|
+
}
|
|
2537
|
+
function ma(t2) {
|
|
2538
|
+
if (t2 = ga(t2), !Ea) if (t2.getExtension("EXT_color_buffer_float") && t2.getExtension("OES_texture_float_linear") && t2.getExtension("EXT_float_blend")) Ea = t2.R32F;
|
|
2539
|
+
else {
|
|
2540
|
+
if (!t2.getExtension("EXT_color_buffer_half_float")) throw Error("GPU does not fully support 4-channel float32 or float16 formats");
|
|
2541
|
+
Ea = t2.R16F;
|
|
2542
|
+
}
|
|
2543
|
+
return Ea;
|
|
2544
|
+
}
|
|
2545
|
+
function ya(t2) {
|
|
2546
|
+
return t2.l || (t2.l = new ca()), t2.l;
|
|
2547
|
+
}
|
|
2548
|
+
function _a(t2) {
|
|
2549
|
+
const e2 = ga(t2);
|
|
2550
|
+
e2.viewport(0, 0, t2.width, t2.height), e2.activeTexture(e2.TEXTURE0);
|
|
2551
|
+
let n2 = fa(t2, 2);
|
|
2552
|
+
return n2 || (n2 = oa(ya(t2), e2, t2.m ? e2.LINEAR : e2.NEAREST), t2.g.push(n2), t2.j = true), e2.bindTexture(e2.TEXTURE_2D, n2), n2;
|
|
2553
|
+
}
|
|
2554
|
+
function va(t2) {
|
|
2555
|
+
t2.h.bindTexture(t2.h.TEXTURE_2D, null);
|
|
2556
|
+
}
|
|
2557
|
+
var Ea;
|
|
2558
|
+
var wa = class {
|
|
2559
|
+
constructor(t2, e2, n2, r2, i2, s2, o2) {
|
|
2560
|
+
this.g = t2, this.m = e2, this.j = n2, this.canvas = r2, this.l = i2, this.width = s2, this.height = o2, this.j && (0 === --Ta && console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources."));
|
|
2561
|
+
}
|
|
2562
|
+
Ja() {
|
|
2563
|
+
return !!fa(this, 0);
|
|
2564
|
+
}
|
|
2565
|
+
ma() {
|
|
2566
|
+
return !!fa(this, 1);
|
|
2567
|
+
}
|
|
2568
|
+
S() {
|
|
2569
|
+
return !!fa(this, 2);
|
|
2570
|
+
}
|
|
2571
|
+
la() {
|
|
2572
|
+
return (e2 = fa(t2 = this, 0)) || (e2 = da(t2), e2 = new Uint8Array(e2.map(((t3) => 255 * t3))), t2.g.push(e2)), e2;
|
|
2573
|
+
var t2, e2;
|
|
2574
|
+
}
|
|
2575
|
+
ka() {
|
|
2576
|
+
return da(this);
|
|
2577
|
+
}
|
|
2578
|
+
N() {
|
|
2579
|
+
return pa(this);
|
|
2580
|
+
}
|
|
2581
|
+
clone() {
|
|
2582
|
+
const t2 = [];
|
|
2583
|
+
for (const e2 of this.g) {
|
|
2584
|
+
let n2;
|
|
2585
|
+
if (e2 instanceof Uint8Array) n2 = new Uint8Array(e2);
|
|
2586
|
+
else if (e2 instanceof Float32Array) n2 = new Float32Array(e2);
|
|
2587
|
+
else {
|
|
2588
|
+
if (!(e2 instanceof WebGLTexture)) throw Error(`Type is not supported: ${e2}`);
|
|
2589
|
+
{
|
|
2590
|
+
const t3 = ga(this), e3 = ya(this);
|
|
2591
|
+
t3.activeTexture(t3.TEXTURE1), n2 = oa(e3, t3, this.m ? t3.LINEAR : t3.NEAREST), t3.bindTexture(t3.TEXTURE_2D, n2);
|
|
2592
|
+
const r2 = ma(this);
|
|
2593
|
+
t3.texImage2D(t3.TEXTURE_2D, 0, r2, this.width, this.height, 0, t3.RED, t3.FLOAT, null), t3.bindTexture(t3.TEXTURE_2D, null), aa(e3, t3, n2), sa(e3, t3, false, (() => {
|
|
2594
|
+
_a(this), t3.clearColor(0, 0, 0, 0), t3.clear(t3.COLOR_BUFFER_BIT), t3.drawArrays(t3.TRIANGLE_FAN, 0, 4), va(this);
|
|
2595
|
+
})), ha(e3), va(this);
|
|
2596
|
+
}
|
|
2597
|
+
}
|
|
2598
|
+
t2.push(n2);
|
|
2599
|
+
}
|
|
2600
|
+
return new wa(t2, this.m, this.S(), this.canvas, this.l, this.width, this.height);
|
|
2601
|
+
}
|
|
2602
|
+
close() {
|
|
2603
|
+
this.j && ga(this).deleteTexture(fa(this, 2)), Ta = -1;
|
|
2604
|
+
}
|
|
2605
|
+
};
|
|
2606
|
+
wa.prototype.close = wa.prototype.close, wa.prototype.clone = wa.prototype.clone, wa.prototype.getAsWebGLTexture = wa.prototype.N, wa.prototype.getAsFloat32Array = wa.prototype.ka, wa.prototype.getAsUint8Array = wa.prototype.la, wa.prototype.hasWebGLTexture = wa.prototype.S, wa.prototype.hasFloat32Array = wa.prototype.ma, wa.prototype.hasUint8Array = wa.prototype.Ja;
|
|
2607
|
+
var Ta = 250;
|
|
2608
|
+
var Aa = { color: "white", lineWidth: 4, radius: 6 };
|
|
2609
|
+
function ba(t2) {
|
|
2610
|
+
return { ...Aa, fillColor: (t2 = t2 || {}).color, ...t2 };
|
|
2611
|
+
}
|
|
2612
|
+
function ka(t2, e2) {
|
|
2613
|
+
return t2 instanceof Function ? t2(e2) : t2;
|
|
2614
|
+
}
|
|
2615
|
+
function Sa(t2, e2, n2) {
|
|
2616
|
+
return Math.max(Math.min(e2, n2), Math.min(Math.max(e2, n2), t2));
|
|
2617
|
+
}
|
|
2618
|
+
function xa(t2) {
|
|
2619
|
+
if (!t2.l) throw Error("CPU rendering requested but CanvasRenderingContext2D not provided.");
|
|
2620
|
+
return t2.l;
|
|
2621
|
+
}
|
|
2622
|
+
function La(t2) {
|
|
2623
|
+
if (!t2.j) throw Error("GPU rendering requested but WebGL2RenderingContext not provided.");
|
|
2624
|
+
return t2.j;
|
|
2625
|
+
}
|
|
2626
|
+
function Ra(t2, e2, n2) {
|
|
2627
|
+
if (e2.S()) n2(e2.N());
|
|
2628
|
+
else {
|
|
2629
|
+
const r2 = e2.ma() ? e2.ka() : e2.la();
|
|
2630
|
+
t2.m = t2.m ?? new ca();
|
|
2631
|
+
const i2 = La(t2);
|
|
2632
|
+
n2((t2 = new wa([r2], e2.m, false, i2.canvas, t2.m, e2.width, e2.height)).N()), t2.close();
|
|
2633
|
+
}
|
|
2634
|
+
}
|
|
2635
|
+
function Fa(t2, e2, n2, r2) {
|
|
2636
|
+
const i2 = (function(t3) {
|
|
2637
|
+
return t3.g || (t3.g = new ua()), t3.g;
|
|
2638
|
+
})(t2), s2 = La(t2), o2 = Array.isArray(n2) ? new ImageData(new Uint8ClampedArray(n2), 1, 1) : n2;
|
|
2639
|
+
sa(i2, s2, true, (() => {
|
|
2640
|
+
!(function(t4, e3, n3, r3) {
|
|
2641
|
+
const i3 = t4.g;
|
|
2642
|
+
if (i3.activeTexture(i3.TEXTURE0), i3.bindTexture(i3.TEXTURE_2D, e3), i3.activeTexture(i3.TEXTURE1), i3.bindTexture(i3.TEXTURE_2D, t4.B), i3.texImage2D(i3.TEXTURE_2D, 0, i3.RGBA, i3.RGBA, i3.UNSIGNED_BYTE, n3), t4.I && (function(t5, e4) {
|
|
2643
|
+
if (t5 !== e4) return false;
|
|
2644
|
+
t5 = t5.entries(), e4 = e4.entries();
|
|
2645
|
+
for (const [r4, i4] of t5) {
|
|
2646
|
+
t5 = r4;
|
|
2647
|
+
const s3 = i4;
|
|
2648
|
+
var n4 = e4.next();
|
|
2649
|
+
if (n4.done) return false;
|
|
2650
|
+
const [o3, a2] = n4.value;
|
|
2651
|
+
if (n4 = a2, t5 !== o3 || s3[0] !== n4[0] || s3[1] !== n4[1] || s3[2] !== n4[2] || s3[3] !== n4[3]) return false;
|
|
2652
|
+
}
|
|
2653
|
+
return !!e4.next().done;
|
|
2654
|
+
})(t4.I, r3)) i3.activeTexture(i3.TEXTURE2), i3.bindTexture(i3.TEXTURE_2D, t4.j);
|
|
2655
|
+
else {
|
|
2656
|
+
t4.I = r3;
|
|
2657
|
+
const e4 = Array(1024).fill(0);
|
|
2658
|
+
r3.forEach(((t5, n4) => {
|
|
2659
|
+
if (4 !== t5.length) throw Error(`Color at index ${n4} is not a four-channel value.`);
|
|
2660
|
+
e4[4 * n4] = t5[0], e4[4 * n4 + 1] = t5[1], e4[4 * n4 + 2] = t5[2], e4[4 * n4 + 3] = t5[3];
|
|
2661
|
+
})), i3.activeTexture(i3.TEXTURE2), i3.bindTexture(i3.TEXTURE_2D, t4.j), i3.texImage2D(i3.TEXTURE_2D, 0, i3.RGBA, 256, 1, 0, i3.RGBA, i3.UNSIGNED_BYTE, new Uint8Array(e4));
|
|
2662
|
+
}
|
|
2663
|
+
})(i2, e2, o2, r2), s2.clearColor(0, 0, 0, 0), s2.clear(s2.COLOR_BUFFER_BIT), s2.drawArrays(s2.TRIANGLE_FAN, 0, 4);
|
|
2664
|
+
const t3 = i2.g;
|
|
2665
|
+
t3.activeTexture(t3.TEXTURE0), t3.bindTexture(t3.TEXTURE_2D, null), t3.activeTexture(t3.TEXTURE1), t3.bindTexture(t3.TEXTURE_2D, null), t3.activeTexture(t3.TEXTURE2), t3.bindTexture(t3.TEXTURE_2D, null);
|
|
2666
|
+
}));
|
|
2667
|
+
}
|
|
2668
|
+
function Ma(t2, e2, n2, r2) {
|
|
2669
|
+
const i2 = La(t2), s2 = (function(t3) {
|
|
2670
|
+
return t3.h || (t3.h = new la()), t3.h;
|
|
2671
|
+
})(t2), o2 = Array.isArray(n2) ? new ImageData(new Uint8ClampedArray(n2), 1, 1) : n2, a2 = Array.isArray(r2) ? new ImageData(new Uint8ClampedArray(r2), 1, 1) : r2;
|
|
2672
|
+
sa(s2, i2, true, (() => {
|
|
2673
|
+
var t3 = s2.g;
|
|
2674
|
+
t3.activeTexture(t3.TEXTURE0), t3.bindTexture(t3.TEXTURE_2D, e2), t3.activeTexture(t3.TEXTURE1), t3.bindTexture(t3.TEXTURE_2D, s2.j), t3.texImage2D(t3.TEXTURE_2D, 0, t3.RGBA, t3.RGBA, t3.UNSIGNED_BYTE, o2), t3.activeTexture(t3.TEXTURE2), t3.bindTexture(t3.TEXTURE_2D, s2.B), t3.texImage2D(t3.TEXTURE_2D, 0, t3.RGBA, t3.RGBA, t3.UNSIGNED_BYTE, a2), i2.clearColor(0, 0, 0, 0), i2.clear(i2.COLOR_BUFFER_BIT), i2.drawArrays(i2.TRIANGLE_FAN, 0, 4), i2.bindTexture(i2.TEXTURE_2D, null), (t3 = s2.g).activeTexture(t3.TEXTURE0), t3.bindTexture(t3.TEXTURE_2D, null), t3.activeTexture(t3.TEXTURE1), t3.bindTexture(t3.TEXTURE_2D, null), t3.activeTexture(t3.TEXTURE2), t3.bindTexture(t3.TEXTURE_2D, null);
|
|
2675
|
+
}));
|
|
2676
|
+
}
|
|
2677
|
+
var Ia = class {
|
|
2678
|
+
constructor(t2, e2) {
|
|
2679
|
+
t2 instanceof CanvasRenderingContext2D || t2 instanceof OffscreenCanvasRenderingContext2D ? (this.l = t2, this.j = e2) : this.j = t2;
|
|
2680
|
+
}
|
|
2681
|
+
Ca(t2, e2) {
|
|
2682
|
+
if (t2) {
|
|
2683
|
+
var n2 = xa(this);
|
|
2684
|
+
e2 = ba(e2), n2.save();
|
|
2685
|
+
var r2 = n2.canvas, i2 = 0;
|
|
2686
|
+
for (const s2 of t2) n2.fillStyle = ka(e2.fillColor, { index: i2, from: s2 }), n2.strokeStyle = ka(e2.color, { index: i2, from: s2 }), n2.lineWidth = ka(e2.lineWidth, { index: i2, from: s2 }), (t2 = new Path2D()).arc(s2.x * r2.width, s2.y * r2.height, ka(e2.radius, { index: i2, from: s2 }), 0, 2 * Math.PI), n2.fill(t2), n2.stroke(t2), ++i2;
|
|
2687
|
+
n2.restore();
|
|
2688
|
+
}
|
|
2689
|
+
}
|
|
2690
|
+
Ba(t2, e2, n2) {
|
|
2691
|
+
if (t2 && e2) {
|
|
2692
|
+
var r2 = xa(this);
|
|
2693
|
+
n2 = ba(n2), r2.save();
|
|
2694
|
+
var i2 = r2.canvas, s2 = 0;
|
|
2695
|
+
for (const o2 of e2) {
|
|
2696
|
+
r2.beginPath(), e2 = t2[o2.start];
|
|
2697
|
+
const a2 = t2[o2.end];
|
|
2698
|
+
e2 && a2 && (r2.strokeStyle = ka(n2.color, { index: s2, from: e2, to: a2 }), r2.lineWidth = ka(n2.lineWidth, { index: s2, from: e2, to: a2 }), r2.moveTo(e2.x * i2.width, e2.y * i2.height), r2.lineTo(a2.x * i2.width, a2.y * i2.height)), ++s2, r2.stroke();
|
|
2699
|
+
}
|
|
2700
|
+
r2.restore();
|
|
2701
|
+
}
|
|
2702
|
+
}
|
|
2703
|
+
ya(t2, e2) {
|
|
2704
|
+
const n2 = xa(this);
|
|
2705
|
+
e2 = ba(e2), n2.save(), n2.beginPath(), n2.lineWidth = ka(e2.lineWidth, {}), n2.strokeStyle = ka(e2.color, {}), n2.fillStyle = ka(e2.fillColor, {}), n2.moveTo(t2.originX, t2.originY), n2.lineTo(t2.originX + t2.width, t2.originY), n2.lineTo(t2.originX + t2.width, t2.originY + t2.height), n2.lineTo(t2.originX, t2.originY + t2.height), n2.lineTo(t2.originX, t2.originY), n2.stroke(), n2.fill(), n2.restore();
|
|
2706
|
+
}
|
|
2707
|
+
za(t2, e2, n2 = [0, 0, 0, 255]) {
|
|
2708
|
+
this.l ? (function(t3, e3, n3, r2) {
|
|
2709
|
+
const i2 = La(t3);
|
|
2710
|
+
Ra(t3, e3, ((e4) => {
|
|
2711
|
+
Fa(t3, e4, n3, r2), (e4 = xa(t3)).drawImage(i2.canvas, 0, 0, e4.canvas.width, e4.canvas.height);
|
|
2712
|
+
}));
|
|
2713
|
+
})(this, t2, n2, e2) : Fa(this, t2.N(), n2, e2);
|
|
2714
|
+
}
|
|
2715
|
+
Aa(t2, e2, n2) {
|
|
2716
|
+
this.l ? (function(t3, e3, n3, r2) {
|
|
2717
|
+
const i2 = La(t3);
|
|
2718
|
+
Ra(t3, e3, ((e4) => {
|
|
2719
|
+
Ma(t3, e4, n3, r2), (e4 = xa(t3)).drawImage(i2.canvas, 0, 0, e4.canvas.width, e4.canvas.height);
|
|
2720
|
+
}));
|
|
2721
|
+
})(this, t2, e2, n2) : Ma(this, t2.N(), e2, n2);
|
|
2722
|
+
}
|
|
2723
|
+
close() {
|
|
2724
|
+
this.g?.close(), this.g = void 0, this.h?.close(), this.h = void 0, this.m?.close(), this.m = void 0;
|
|
2725
|
+
}
|
|
2726
|
+
};
|
|
2727
|
+
function Pa(t2, e2) {
|
|
2728
|
+
switch (e2) {
|
|
2729
|
+
case 0:
|
|
2730
|
+
return t2.g.find(((t3) => t3 instanceof ImageData));
|
|
2731
|
+
case 1:
|
|
2732
|
+
return t2.g.find(((t3) => "undefined" != typeof ImageBitmap && t3 instanceof ImageBitmap));
|
|
2733
|
+
case 2:
|
|
2734
|
+
return t2.g.find(((t3) => "undefined" != typeof WebGLTexture && t3 instanceof WebGLTexture));
|
|
2735
|
+
default:
|
|
2736
|
+
throw Error(`Type is not supported: ${e2}`);
|
|
2737
|
+
}
|
|
2738
|
+
}
|
|
2739
|
+
function Oa(t2) {
|
|
2740
|
+
var e2 = Pa(t2, 0);
|
|
2741
|
+
if (!e2) {
|
|
2742
|
+
e2 = Na(t2);
|
|
2743
|
+
const n2 = Ua(t2), r2 = new Uint8Array(t2.width * t2.height * 4);
|
|
2744
|
+
aa(n2, e2, Ca(t2)), e2.readPixels(0, 0, t2.width, t2.height, e2.RGBA, e2.UNSIGNED_BYTE, r2), ha(n2), e2 = new ImageData(new Uint8ClampedArray(r2.buffer), t2.width, t2.height), t2.g.push(e2);
|
|
2745
|
+
}
|
|
2746
|
+
return e2;
|
|
2747
|
+
}
|
|
2748
|
+
function Ca(t2) {
|
|
2749
|
+
let e2 = Pa(t2, 2);
|
|
2750
|
+
if (!e2) {
|
|
2751
|
+
const n2 = Na(t2);
|
|
2752
|
+
e2 = Da(t2);
|
|
2753
|
+
const r2 = Pa(t2, 1) || Oa(t2);
|
|
2754
|
+
n2.texImage2D(n2.TEXTURE_2D, 0, n2.RGBA, n2.RGBA, n2.UNSIGNED_BYTE, r2), Ba(t2);
|
|
2755
|
+
}
|
|
2756
|
+
return e2;
|
|
2757
|
+
}
|
|
2758
|
+
function Na(t2) {
|
|
2759
|
+
if (!t2.canvas) throw Error("Conversion to different image formats require that a canvas is passed when iniitializing the image.");
|
|
2760
|
+
return t2.h || (t2.h = ta(t2.canvas.getContext("webgl2"), "You cannot use a canvas that is already bound to a different type of rendering context.")), t2.h;
|
|
2761
|
+
}
|
|
2762
|
+
function Ua(t2) {
|
|
2763
|
+
return t2.l || (t2.l = new ca()), t2.l;
|
|
2764
|
+
}
|
|
2765
|
+
function Da(t2) {
|
|
2766
|
+
const e2 = Na(t2);
|
|
2767
|
+
e2.viewport(0, 0, t2.width, t2.height), e2.activeTexture(e2.TEXTURE0);
|
|
2768
|
+
let n2 = Pa(t2, 2);
|
|
2769
|
+
return n2 || (n2 = oa(Ua(t2), e2), t2.g.push(n2), t2.m = true), e2.bindTexture(e2.TEXTURE_2D, n2), n2;
|
|
2770
|
+
}
|
|
2771
|
+
function Ba(t2) {
|
|
2772
|
+
t2.h.bindTexture(t2.h.TEXTURE_2D, null);
|
|
2773
|
+
}
|
|
2774
|
+
function Ga(t2) {
|
|
2775
|
+
const e2 = Na(t2);
|
|
2776
|
+
return sa(Ua(t2), e2, true, (() => (function(t3, e3) {
|
|
2777
|
+
const n2 = t3.canvas;
|
|
2778
|
+
if (n2.width === t3.width && n2.height === t3.height) return e3();
|
|
2779
|
+
const r2 = n2.width, i2 = n2.height;
|
|
2780
|
+
return n2.width = t3.width, n2.height = t3.height, t3 = e3(), n2.width = r2, n2.height = i2, t3;
|
|
2781
|
+
})(t2, (() => {
|
|
2782
|
+
if (e2.bindFramebuffer(e2.FRAMEBUFFER, null), e2.clearColor(0, 0, 0, 0), e2.clear(e2.COLOR_BUFFER_BIT), e2.drawArrays(e2.TRIANGLE_FAN, 0, 4), !(t2.canvas instanceof OffscreenCanvas)) throw Error("Conversion to ImageBitmap requires that the MediaPipe Tasks is initialized with an OffscreenCanvas");
|
|
2783
|
+
return t2.canvas.transferToImageBitmap();
|
|
2784
|
+
}))));
|
|
2785
|
+
}
|
|
2786
|
+
Ia.prototype.close = Ia.prototype.close, Ia.prototype.drawConfidenceMask = Ia.prototype.Aa, Ia.prototype.drawCategoryMask = Ia.prototype.za, Ia.prototype.drawBoundingBox = Ia.prototype.ya, Ia.prototype.drawConnectors = Ia.prototype.Ba, Ia.prototype.drawLandmarks = Ia.prototype.Ca, Ia.lerp = function(t2, e2, n2, r2, i2) {
|
|
2787
|
+
return Sa(r2 * (1 - (t2 - e2) / (n2 - e2)) + i2 * (1 - (n2 - t2) / (n2 - e2)), r2, i2);
|
|
2788
|
+
}, Ia.clamp = Sa;
|
|
2789
|
+
var ja = class {
|
|
2790
|
+
constructor(t2, e2, n2, r2, i2, s2, o2) {
|
|
2791
|
+
this.g = t2, this.j = e2, this.m = n2, this.canvas = r2, this.l = i2, this.width = s2, this.height = o2, (this.j || this.m) && (0 === --Va && console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources."));
|
|
2792
|
+
}
|
|
2793
|
+
Ia() {
|
|
2794
|
+
return !!Pa(this, 0);
|
|
2795
|
+
}
|
|
2796
|
+
na() {
|
|
2797
|
+
return !!Pa(this, 1);
|
|
2798
|
+
}
|
|
2799
|
+
S() {
|
|
2800
|
+
return !!Pa(this, 2);
|
|
2801
|
+
}
|
|
2802
|
+
Ga() {
|
|
2803
|
+
return Oa(this);
|
|
2804
|
+
}
|
|
2805
|
+
Fa() {
|
|
2806
|
+
var t2 = Pa(this, 1);
|
|
2807
|
+
return t2 || (Ca(this), Da(this), t2 = Ga(this), Ba(this), this.g.push(t2), this.j = true), t2;
|
|
2808
|
+
}
|
|
2809
|
+
N() {
|
|
2810
|
+
return Ca(this);
|
|
2811
|
+
}
|
|
2812
|
+
clone() {
|
|
2813
|
+
const t2 = [];
|
|
2814
|
+
for (const e2 of this.g) {
|
|
2815
|
+
let n2;
|
|
2816
|
+
if (e2 instanceof ImageData) n2 = new ImageData(e2.data, this.width, this.height);
|
|
2817
|
+
else if (e2 instanceof WebGLTexture) {
|
|
2818
|
+
const t3 = Na(this), e3 = Ua(this);
|
|
2819
|
+
t3.activeTexture(t3.TEXTURE1), n2 = oa(e3, t3), t3.bindTexture(t3.TEXTURE_2D, n2), t3.texImage2D(t3.TEXTURE_2D, 0, t3.RGBA, this.width, this.height, 0, t3.RGBA, t3.UNSIGNED_BYTE, null), t3.bindTexture(t3.TEXTURE_2D, null), aa(e3, t3, n2), sa(e3, t3, false, (() => {
|
|
2820
|
+
Da(this), t3.clearColor(0, 0, 0, 0), t3.clear(t3.COLOR_BUFFER_BIT), t3.drawArrays(t3.TRIANGLE_FAN, 0, 4), Ba(this);
|
|
2821
|
+
})), ha(e3), Ba(this);
|
|
2822
|
+
} else {
|
|
2823
|
+
if (!(e2 instanceof ImageBitmap)) throw Error(`Type is not supported: ${e2}`);
|
|
2824
|
+
Ca(this), Da(this), n2 = Ga(this), Ba(this);
|
|
2825
|
+
}
|
|
2826
|
+
t2.push(n2);
|
|
2827
|
+
}
|
|
2828
|
+
return new ja(t2, this.na(), this.S(), this.canvas, this.l, this.width, this.height);
|
|
2829
|
+
}
|
|
2830
|
+
close() {
|
|
2831
|
+
this.j && Pa(this, 1).close(), this.m && Na(this).deleteTexture(Pa(this, 2)), Va = -1;
|
|
2832
|
+
}
|
|
2833
|
+
};
|
|
2834
|
+
ja.prototype.close = ja.prototype.close, ja.prototype.clone = ja.prototype.clone, ja.prototype.getAsWebGLTexture = ja.prototype.N, ja.prototype.getAsImageBitmap = ja.prototype.Fa, ja.prototype.getAsImageData = ja.prototype.Ga, ja.prototype.hasWebGLTexture = ja.prototype.S, ja.prototype.hasImageBitmap = ja.prototype.na, ja.prototype.hasImageData = ja.prototype.Ia;
|
|
2835
|
+
var Va = 250;
|
|
2836
|
+
function Xa(...t2) {
|
|
2837
|
+
return t2.map((([t3, e2]) => ({ start: t3, end: e2 })));
|
|
2838
|
+
}
|
|
2839
|
+
var Ha = /* @__PURE__ */ (function(t2) {
|
|
2840
|
+
return class extends t2 {
|
|
2841
|
+
Oa() {
|
|
2842
|
+
this.i._registerModelResourcesGraphService();
|
|
2843
|
+
}
|
|
2844
|
+
};
|
|
2845
|
+
})((Wa = class {
|
|
2846
|
+
constructor(t2, e2) {
|
|
2847
|
+
this.l = true, this.i = t2, this.g = null, this.h = 0, this.m = "function" == typeof this.i._addIntToInputStream, void 0 !== e2 ? this.i.canvas = e2 : Do() ? this.i.canvas = new OffscreenCanvas(1, 1) : (console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."), this.i.canvas = document.createElement("canvas"));
|
|
2848
|
+
}
|
|
2849
|
+
async initializeGraph(t2) {
|
|
2850
|
+
const e2 = await (await fetch(t2)).arrayBuffer();
|
|
2851
|
+
t2 = !(t2.endsWith(".pbtxt") || t2.endsWith(".textproto")), this.setGraph(new Uint8Array(e2), t2);
|
|
2852
|
+
}
|
|
2853
|
+
setGraphFromString(t2) {
|
|
2854
|
+
this.setGraph(new TextEncoder().encode(t2), false);
|
|
2855
|
+
}
|
|
2856
|
+
setGraph(t2, e2) {
|
|
2857
|
+
const n2 = t2.length, r2 = this.i._malloc(n2);
|
|
2858
|
+
this.i.HEAPU8.set(t2, r2), e2 ? this.i._changeBinaryGraph(n2, r2) : this.i._changeTextGraph(n2, r2), this.i._free(r2);
|
|
2859
|
+
}
|
|
2860
|
+
configureAudio(t2, e2, n2, r2, i2) {
|
|
2861
|
+
this.i._configureAudio || console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'), jo(this, r2 || "input_audio", ((r3) => {
|
|
2862
|
+
jo(this, i2 = i2 || "audio_header", ((i3) => {
|
|
2863
|
+
this.i._configureAudio(r3, i3, t2, e2, n2);
|
|
2864
|
+
}));
|
|
2865
|
+
}));
|
|
2866
|
+
}
|
|
2867
|
+
setAutoResizeCanvas(t2) {
|
|
2868
|
+
this.l = t2;
|
|
2869
|
+
}
|
|
2870
|
+
setAutoRenderToScreen(t2) {
|
|
2871
|
+
this.i._setAutoRenderToScreen(t2);
|
|
2872
|
+
}
|
|
2873
|
+
setGpuBufferVerticalFlip(t2) {
|
|
2874
|
+
this.i.gpuOriginForWebTexturesIsBottomLeft = t2;
|
|
2875
|
+
}
|
|
2876
|
+
ga(t2) {
|
|
2877
|
+
Ho(this, "__graph_config__", ((e2) => {
|
|
2878
|
+
t2(e2);
|
|
2879
|
+
})), jo(this, "__graph_config__", ((t3) => {
|
|
2880
|
+
this.i._getGraphConfig(t3, void 0);
|
|
2881
|
+
})), delete this.i.simpleListeners.__graph_config__;
|
|
2882
|
+
}
|
|
2883
|
+
attachErrorListener(t2) {
|
|
2884
|
+
this.i.errorListener = t2;
|
|
2885
|
+
}
|
|
2886
|
+
attachEmptyPacketListener(t2, e2) {
|
|
2887
|
+
this.i.emptyPacketListeners = this.i.emptyPacketListeners || {}, this.i.emptyPacketListeners[t2] = e2;
|
|
2888
|
+
}
|
|
2889
|
+
addAudioToStream(t2, e2, n2) {
|
|
2890
|
+
this.addAudioToStreamWithShape(t2, 0, 0, e2, n2);
|
|
2891
|
+
}
|
|
2892
|
+
addAudioToStreamWithShape(t2, e2, n2, r2, i2) {
|
|
2893
|
+
const s2 = 4 * t2.length;
|
|
2894
|
+
this.h !== s2 && (this.g && this.i._free(this.g), this.g = this.i._malloc(s2), this.h = s2), this.i.HEAPF32.set(t2, this.g / 4), jo(this, r2, ((t3) => {
|
|
2895
|
+
this.i._addAudioToInputStream(this.g, e2, n2, t3, i2);
|
|
2896
|
+
}));
|
|
2897
|
+
}
|
|
2898
|
+
addGpuBufferToStream(t2, e2, n2) {
|
|
2899
|
+
jo(this, e2, ((e3) => {
|
|
2900
|
+
const [r2, i2] = Vo(this, t2, e3);
|
|
2901
|
+
this.i._addBoundTextureToStream(e3, r2, i2, n2);
|
|
2902
|
+
}));
|
|
2903
|
+
}
|
|
2904
|
+
addBoolToStream(t2, e2, n2) {
|
|
2905
|
+
jo(this, e2, ((e3) => {
|
|
2906
|
+
this.i._addBoolToInputStream(t2, e3, n2);
|
|
2907
|
+
}));
|
|
2908
|
+
}
|
|
2909
|
+
addDoubleToStream(t2, e2, n2) {
|
|
2910
|
+
jo(this, e2, ((e3) => {
|
|
2911
|
+
this.i._addDoubleToInputStream(t2, e3, n2);
|
|
2912
|
+
}));
|
|
2913
|
+
}
|
|
2914
|
+
addFloatToStream(t2, e2, n2) {
|
|
2915
|
+
jo(this, e2, ((e3) => {
|
|
2916
|
+
this.i._addFloatToInputStream(t2, e3, n2);
|
|
2917
|
+
}));
|
|
2918
|
+
}
|
|
2919
|
+
addIntToStream(t2, e2, n2) {
|
|
2920
|
+
jo(this, e2, ((e3) => {
|
|
2921
|
+
this.i._addIntToInputStream(t2, e3, n2);
|
|
2922
|
+
}));
|
|
2923
|
+
}
|
|
2924
|
+
addUintToStream(t2, e2, n2) {
|
|
2925
|
+
jo(this, e2, ((e3) => {
|
|
2926
|
+
this.i._addUintToInputStream(t2, e3, n2);
|
|
2927
|
+
}));
|
|
2928
|
+
}
|
|
2929
|
+
addStringToStream(t2, e2, n2) {
|
|
2930
|
+
jo(this, e2, ((e3) => {
|
|
2931
|
+
jo(this, t2, ((t3) => {
|
|
2932
|
+
this.i._addStringToInputStream(t3, e3, n2);
|
|
2933
|
+
}));
|
|
2934
|
+
}));
|
|
2935
|
+
}
|
|
2936
|
+
addStringRecordToStream(t2, e2, n2) {
|
|
2937
|
+
jo(this, e2, ((e3) => {
|
|
2938
|
+
Xo(this, Object.keys(t2), ((r2) => {
|
|
2939
|
+
Xo(this, Object.values(t2), ((i2) => {
|
|
2940
|
+
this.i._addFlatHashMapToInputStream(r2, i2, Object.keys(t2).length, e3, n2);
|
|
2941
|
+
}));
|
|
2942
|
+
}));
|
|
2943
|
+
}));
|
|
2944
|
+
}
|
|
2945
|
+
addProtoToStream(t2, e2, n2, r2) {
|
|
2946
|
+
jo(this, n2, ((n3) => {
|
|
2947
|
+
jo(this, e2, ((e3) => {
|
|
2948
|
+
const i2 = this.i._malloc(t2.length);
|
|
2949
|
+
this.i.HEAPU8.set(t2, i2), this.i._addProtoToInputStream(i2, t2.length, e3, n3, r2), this.i._free(i2);
|
|
2950
|
+
}));
|
|
2951
|
+
}));
|
|
2952
|
+
}
|
|
2953
|
+
addEmptyPacketToStream(t2, e2) {
|
|
2954
|
+
jo(this, t2, ((t3) => {
|
|
2955
|
+
this.i._addEmptyPacketToInputStream(t3, e2);
|
|
2956
|
+
}));
|
|
2957
|
+
}
|
|
2958
|
+
addBoolVectorToStream(t2, e2, n2) {
|
|
2959
|
+
jo(this, e2, ((e3) => {
|
|
2960
|
+
const r2 = this.i._allocateBoolVector(t2.length);
|
|
2961
|
+
if (!r2) throw Error("Unable to allocate new bool vector on heap.");
|
|
2962
|
+
for (const e4 of t2) this.i._addBoolVectorEntry(r2, e4);
|
|
2963
|
+
this.i._addBoolVectorToInputStream(r2, e3, n2);
|
|
2964
|
+
}));
|
|
2965
|
+
}
|
|
2966
|
+
addDoubleVectorToStream(t2, e2, n2) {
|
|
2967
|
+
jo(this, e2, ((e3) => {
|
|
2968
|
+
const r2 = this.i._allocateDoubleVector(t2.length);
|
|
2969
|
+
if (!r2) throw Error("Unable to allocate new double vector on heap.");
|
|
2970
|
+
for (const e4 of t2) this.i._addDoubleVectorEntry(r2, e4);
|
|
2971
|
+
this.i._addDoubleVectorToInputStream(r2, e3, n2);
|
|
2972
|
+
}));
|
|
2973
|
+
}
|
|
2974
|
+
addFloatVectorToStream(t2, e2, n2) {
|
|
2975
|
+
jo(this, e2, ((e3) => {
|
|
2976
|
+
const r2 = this.i._allocateFloatVector(t2.length);
|
|
2977
|
+
if (!r2) throw Error("Unable to allocate new float vector on heap.");
|
|
2978
|
+
for (const e4 of t2) this.i._addFloatVectorEntry(r2, e4);
|
|
2979
|
+
this.i._addFloatVectorToInputStream(r2, e3, n2);
|
|
2980
|
+
}));
|
|
2981
|
+
}
|
|
2982
|
+
addIntVectorToStream(t2, e2, n2) {
|
|
2983
|
+
jo(this, e2, ((e3) => {
|
|
2984
|
+
const r2 = this.i._allocateIntVector(t2.length);
|
|
2985
|
+
if (!r2) throw Error("Unable to allocate new int vector on heap.");
|
|
2986
|
+
for (const e4 of t2) this.i._addIntVectorEntry(r2, e4);
|
|
2987
|
+
this.i._addIntVectorToInputStream(r2, e3, n2);
|
|
2988
|
+
}));
|
|
2989
|
+
}
|
|
2990
|
+
addUintVectorToStream(t2, e2, n2) {
|
|
2991
|
+
jo(this, e2, ((e3) => {
|
|
2992
|
+
const r2 = this.i._allocateUintVector(t2.length);
|
|
2993
|
+
if (!r2) throw Error("Unable to allocate new unsigned int vector on heap.");
|
|
2994
|
+
for (const e4 of t2) this.i._addUintVectorEntry(r2, e4);
|
|
2995
|
+
this.i._addUintVectorToInputStream(r2, e3, n2);
|
|
2996
|
+
}));
|
|
2997
|
+
}
|
|
2998
|
+
addStringVectorToStream(t2, e2, n2) {
|
|
2999
|
+
jo(this, e2, ((e3) => {
|
|
3000
|
+
const r2 = this.i._allocateStringVector(t2.length);
|
|
3001
|
+
if (!r2) throw Error("Unable to allocate new string vector on heap.");
|
|
3002
|
+
for (const e4 of t2) jo(this, e4, ((t3) => {
|
|
3003
|
+
this.i._addStringVectorEntry(r2, t3);
|
|
3004
|
+
}));
|
|
3005
|
+
this.i._addStringVectorToInputStream(r2, e3, n2);
|
|
3006
|
+
}));
|
|
3007
|
+
}
|
|
3008
|
+
addBoolToInputSidePacket(t2, e2) {
|
|
3009
|
+
jo(this, e2, ((e3) => {
|
|
3010
|
+
this.i._addBoolToInputSidePacket(t2, e3);
|
|
3011
|
+
}));
|
|
3012
|
+
}
|
|
3013
|
+
addDoubleToInputSidePacket(t2, e2) {
|
|
3014
|
+
jo(this, e2, ((e3) => {
|
|
3015
|
+
this.i._addDoubleToInputSidePacket(t2, e3);
|
|
3016
|
+
}));
|
|
3017
|
+
}
|
|
3018
|
+
addFloatToInputSidePacket(t2, e2) {
|
|
3019
|
+
jo(this, e2, ((e3) => {
|
|
3020
|
+
this.i._addFloatToInputSidePacket(t2, e3);
|
|
3021
|
+
}));
|
|
3022
|
+
}
|
|
3023
|
+
addIntToInputSidePacket(t2, e2) {
|
|
3024
|
+
jo(this, e2, ((e3) => {
|
|
3025
|
+
this.i._addIntToInputSidePacket(t2, e3);
|
|
3026
|
+
}));
|
|
3027
|
+
}
|
|
3028
|
+
addUintToInputSidePacket(t2, e2) {
|
|
3029
|
+
jo(this, e2, ((e3) => {
|
|
3030
|
+
this.i._addUintToInputSidePacket(t2, e3);
|
|
3031
|
+
}));
|
|
3032
|
+
}
|
|
3033
|
+
addStringToInputSidePacket(t2, e2) {
|
|
3034
|
+
jo(this, e2, ((e3) => {
|
|
3035
|
+
jo(this, t2, ((t3) => {
|
|
3036
|
+
this.i._addStringToInputSidePacket(t3, e3);
|
|
3037
|
+
}));
|
|
3038
|
+
}));
|
|
3039
|
+
}
|
|
3040
|
+
addProtoToInputSidePacket(t2, e2, n2) {
|
|
3041
|
+
jo(this, n2, ((n3) => {
|
|
3042
|
+
jo(this, e2, ((e3) => {
|
|
3043
|
+
const r2 = this.i._malloc(t2.length);
|
|
3044
|
+
this.i.HEAPU8.set(t2, r2), this.i._addProtoToInputSidePacket(r2, t2.length, e3, n3), this.i._free(r2);
|
|
3045
|
+
}));
|
|
3046
|
+
}));
|
|
3047
|
+
}
|
|
3048
|
+
addBoolVectorToInputSidePacket(t2, e2) {
|
|
3049
|
+
jo(this, e2, ((e3) => {
|
|
3050
|
+
const n2 = this.i._allocateBoolVector(t2.length);
|
|
3051
|
+
if (!n2) throw Error("Unable to allocate new bool vector on heap.");
|
|
3052
|
+
for (const e4 of t2) this.i._addBoolVectorEntry(n2, e4);
|
|
3053
|
+
this.i._addBoolVectorToInputSidePacket(n2, e3);
|
|
3054
|
+
}));
|
|
3055
|
+
}
|
|
3056
|
+
addDoubleVectorToInputSidePacket(t2, e2) {
|
|
3057
|
+
jo(this, e2, ((e3) => {
|
|
3058
|
+
const n2 = this.i._allocateDoubleVector(t2.length);
|
|
3059
|
+
if (!n2) throw Error("Unable to allocate new double vector on heap.");
|
|
3060
|
+
for (const e4 of t2) this.i._addDoubleVectorEntry(n2, e4);
|
|
3061
|
+
this.i._addDoubleVectorToInputSidePacket(n2, e3);
|
|
3062
|
+
}));
|
|
3063
|
+
}
|
|
3064
|
+
addFloatVectorToInputSidePacket(t2, e2) {
|
|
3065
|
+
jo(this, e2, ((e3) => {
|
|
3066
|
+
const n2 = this.i._allocateFloatVector(t2.length);
|
|
3067
|
+
if (!n2) throw Error("Unable to allocate new float vector on heap.");
|
|
3068
|
+
for (const e4 of t2) this.i._addFloatVectorEntry(n2, e4);
|
|
3069
|
+
this.i._addFloatVectorToInputSidePacket(n2, e3);
|
|
3070
|
+
}));
|
|
3071
|
+
}
|
|
3072
|
+
addIntVectorToInputSidePacket(t2, e2) {
|
|
3073
|
+
jo(this, e2, ((e3) => {
|
|
3074
|
+
const n2 = this.i._allocateIntVector(t2.length);
|
|
3075
|
+
if (!n2) throw Error("Unable to allocate new int vector on heap.");
|
|
3076
|
+
for (const e4 of t2) this.i._addIntVectorEntry(n2, e4);
|
|
3077
|
+
this.i._addIntVectorToInputSidePacket(n2, e3);
|
|
3078
|
+
}));
|
|
3079
|
+
}
|
|
3080
|
+
addUintVectorToInputSidePacket(t2, e2) {
|
|
3081
|
+
jo(this, e2, ((e3) => {
|
|
3082
|
+
const n2 = this.i._allocateUintVector(t2.length);
|
|
3083
|
+
if (!n2) throw Error("Unable to allocate new unsigned int vector on heap.");
|
|
3084
|
+
for (const e4 of t2) this.i._addUintVectorEntry(n2, e4);
|
|
3085
|
+
this.i._addUintVectorToInputSidePacket(n2, e3);
|
|
3086
|
+
}));
|
|
3087
|
+
}
|
|
3088
|
+
addStringVectorToInputSidePacket(t2, e2) {
|
|
3089
|
+
jo(this, e2, ((e3) => {
|
|
3090
|
+
const n2 = this.i._allocateStringVector(t2.length);
|
|
3091
|
+
if (!n2) throw Error("Unable to allocate new string vector on heap.");
|
|
3092
|
+
for (const e4 of t2) jo(this, e4, ((t3) => {
|
|
3093
|
+
this.i._addStringVectorEntry(n2, t3);
|
|
3094
|
+
}));
|
|
3095
|
+
this.i._addStringVectorToInputSidePacket(n2, e3);
|
|
3096
|
+
}));
|
|
3097
|
+
}
|
|
3098
|
+
attachBoolListener(t2, e2) {
|
|
3099
|
+
Ho(this, t2, e2), jo(this, t2, ((t3) => {
|
|
3100
|
+
this.i._attachBoolListener(t3);
|
|
3101
|
+
}));
|
|
3102
|
+
}
|
|
3103
|
+
attachBoolVectorListener(t2, e2) {
|
|
3104
|
+
Wo(this, t2, e2), jo(this, t2, ((t3) => {
|
|
3105
|
+
this.i._attachBoolVectorListener(t3);
|
|
3106
|
+
}));
|
|
3107
|
+
}
|
|
3108
|
+
attachIntListener(t2, e2) {
|
|
3109
|
+
Ho(this, t2, e2), jo(this, t2, ((t3) => {
|
|
3110
|
+
this.i._attachIntListener(t3);
|
|
3111
|
+
}));
|
|
3112
|
+
}
|
|
3113
|
+
attachIntVectorListener(t2, e2) {
|
|
3114
|
+
Wo(this, t2, e2), jo(this, t2, ((t3) => {
|
|
3115
|
+
this.i._attachIntVectorListener(t3);
|
|
3116
|
+
}));
|
|
3117
|
+
}
|
|
3118
|
+
attachUintListener(t2, e2) {
|
|
3119
|
+
Ho(this, t2, e2), jo(this, t2, ((t3) => {
|
|
3120
|
+
this.i._attachUintListener(t3);
|
|
3121
|
+
}));
|
|
3122
|
+
}
|
|
3123
|
+
attachUintVectorListener(t2, e2) {
|
|
3124
|
+
Wo(this, t2, e2), jo(this, t2, ((t3) => {
|
|
3125
|
+
this.i._attachUintVectorListener(t3);
|
|
3126
|
+
}));
|
|
3127
|
+
}
|
|
3128
|
+
attachDoubleListener(t2, e2) {
|
|
3129
|
+
Ho(this, t2, e2), jo(this, t2, ((t3) => {
|
|
3130
|
+
this.i._attachDoubleListener(t3);
|
|
3131
|
+
}));
|
|
3132
|
+
}
|
|
3133
|
+
attachDoubleVectorListener(t2, e2) {
|
|
3134
|
+
Wo(this, t2, e2), jo(this, t2, ((t3) => {
|
|
3135
|
+
this.i._attachDoubleVectorListener(t3);
|
|
3136
|
+
}));
|
|
3137
|
+
}
|
|
3138
|
+
attachFloatListener(t2, e2) {
|
|
3139
|
+
Ho(this, t2, e2), jo(this, t2, ((t3) => {
|
|
3140
|
+
this.i._attachFloatListener(t3);
|
|
3141
|
+
}));
|
|
3142
|
+
}
|
|
3143
|
+
attachFloatVectorListener(t2, e2) {
|
|
3144
|
+
Wo(this, t2, e2), jo(this, t2, ((t3) => {
|
|
3145
|
+
this.i._attachFloatVectorListener(t3);
|
|
3146
|
+
}));
|
|
3147
|
+
}
|
|
3148
|
+
attachStringListener(t2, e2) {
|
|
3149
|
+
Ho(this, t2, e2), jo(this, t2, ((t3) => {
|
|
3150
|
+
this.i._attachStringListener(t3);
|
|
3151
|
+
}));
|
|
3152
|
+
}
|
|
3153
|
+
attachStringVectorListener(t2, e2) {
|
|
3154
|
+
Wo(this, t2, e2), jo(this, t2, ((t3) => {
|
|
3155
|
+
this.i._attachStringVectorListener(t3);
|
|
3156
|
+
}));
|
|
3157
|
+
}
|
|
3158
|
+
attachProtoListener(t2, e2, n2) {
|
|
3159
|
+
Ho(this, t2, e2), jo(this, t2, ((t3) => {
|
|
3160
|
+
this.i._attachProtoListener(t3, n2 || false);
|
|
3161
|
+
}));
|
|
3162
|
+
}
|
|
3163
|
+
attachProtoVectorListener(t2, e2, n2) {
|
|
3164
|
+
Wo(this, t2, e2), jo(this, t2, ((t3) => {
|
|
3165
|
+
this.i._attachProtoVectorListener(t3, n2 || false);
|
|
3166
|
+
}));
|
|
3167
|
+
}
|
|
3168
|
+
attachAudioListener(t2, e2, n2) {
|
|
3169
|
+
this.i._attachAudioListener || console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'), Ho(this, t2, ((t3, n3) => {
|
|
3170
|
+
t3 = new Float32Array(t3.buffer, t3.byteOffset, t3.length / 4), e2(t3, n3);
|
|
3171
|
+
})), jo(this, t2, ((t3) => {
|
|
3172
|
+
this.i._attachAudioListener(t3, n2 || false);
|
|
3173
|
+
}));
|
|
3174
|
+
}
|
|
3175
|
+
finishProcessing() {
|
|
3176
|
+
this.i._waitUntilIdle();
|
|
3177
|
+
}
|
|
3178
|
+
closeGraph() {
|
|
3179
|
+
this.i._closeGraph(), this.i.simpleListeners = void 0, this.i.emptyPacketListeners = void 0;
|
|
3180
|
+
}
|
|
3181
|
+
}, class extends Wa {
|
|
3182
|
+
get ia() {
|
|
3183
|
+
return this.i;
|
|
3184
|
+
}
|
|
3185
|
+
ta(t2, e2, n2) {
|
|
3186
|
+
jo(this, e2, ((e3) => {
|
|
3187
|
+
const [r2, i2] = Vo(this, t2, e3);
|
|
3188
|
+
this.ia._addBoundTextureAsImageToStream(e3, r2, i2, n2);
|
|
3189
|
+
}));
|
|
3190
|
+
}
|
|
3191
|
+
W(t2, e2) {
|
|
3192
|
+
Ho(this, t2, e2), jo(this, t2, ((t3) => {
|
|
3193
|
+
this.ia._attachImageListener(t3);
|
|
3194
|
+
}));
|
|
3195
|
+
}
|
|
3196
|
+
fa(t2, e2) {
|
|
3197
|
+
Wo(this, t2, e2), jo(this, t2, ((t3) => {
|
|
3198
|
+
this.ia._attachImageVectorListener(t3);
|
|
3199
|
+
}));
|
|
3200
|
+
}
|
|
3201
|
+
}));
|
|
3202
|
+
var Wa;
|
|
3203
|
+
var za = class extends Ha {
|
|
3204
|
+
};
|
|
3205
|
+
async function Ka(t2, e2, n2) {
|
|
3206
|
+
return (async function(t3, e3, n3, r2) {
|
|
3207
|
+
return zo(t3, e3, n3, r2);
|
|
3208
|
+
})(t2, n2.canvas ?? (Do() ? void 0 : document.createElement("canvas")), e2, n2);
|
|
3209
|
+
}
|
|
3210
|
+
function Ya(t2, e2, n2, r2) {
|
|
3211
|
+
if (t2.V) {
|
|
3212
|
+
const s2 = new fs();
|
|
3213
|
+
if (n2?.regionOfInterest) {
|
|
3214
|
+
if (!t2.sa) throw Error("This task doesn't support region-of-interest.");
|
|
3215
|
+
var i2 = n2.regionOfInterest;
|
|
3216
|
+
if (i2.left >= i2.right || i2.top >= i2.bottom) throw Error("Expected RectF with left < right and top < bottom.");
|
|
3217
|
+
if (i2.left < 0 || i2.top < 0 || i2.right > 1 || i2.bottom > 1) throw Error("Expected RectF values to be in [0,1].");
|
|
3218
|
+
Ln(s2, 1, (i2.left + i2.right) / 2), Ln(s2, 2, (i2.top + i2.bottom) / 2), Ln(s2, 4, i2.right - i2.left), Ln(s2, 3, i2.bottom - i2.top);
|
|
3219
|
+
} else Ln(s2, 1, 0.5), Ln(s2, 2, 0.5), Ln(s2, 4, 1), Ln(s2, 3, 1);
|
|
3220
|
+
if (n2?.rotationDegrees) {
|
|
3221
|
+
if (n2?.rotationDegrees % 90 != 0) throw Error("Expected rotation to be a multiple of 90\xB0.");
|
|
3222
|
+
if (Ln(s2, 5, -Math.PI * n2.rotationDegrees / 180), n2?.rotationDegrees % 180 != 0) {
|
|
3223
|
+
const [t3, r3] = Go(e2);
|
|
3224
|
+
n2 = bn(s2, 3) * r3 / t3, i2 = bn(s2, 4) * t3 / r3, Ln(s2, 4, n2), Ln(s2, 3, i2);
|
|
3225
|
+
}
|
|
3226
|
+
}
|
|
3227
|
+
t2.g.addProtoToStream(s2.g(), "mediapipe.NormalizedRect", t2.V, r2);
|
|
3228
|
+
}
|
|
3229
|
+
t2.g.ta(e2, t2.da, r2 ?? performance.now()), t2.finishProcessing();
|
|
3230
|
+
}
|
|
3231
|
+
function $a(t2, e2, n2) {
|
|
3232
|
+
if (t2.baseOptions?.g()) throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");
|
|
3233
|
+
Ya(t2, e2, n2, t2.B + 1);
|
|
3234
|
+
}
|
|
3235
|
+
function qa(t2, e2, n2, r2) {
|
|
3236
|
+
if (!t2.baseOptions?.g()) throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");
|
|
3237
|
+
Ya(t2, e2, n2, r2);
|
|
3238
|
+
}
|
|
3239
|
+
function Ja(t2, e2, n2, r2) {
|
|
3240
|
+
var i2 = e2.data;
|
|
3241
|
+
const s2 = e2.width, o2 = s2 * (e2 = e2.height);
|
|
3242
|
+
if ((i2 instanceof Uint8Array || i2 instanceof Float32Array) && i2.length !== o2) throw Error("Unsupported channel count: " + i2.length / o2);
|
|
3243
|
+
return t2 = new wa([i2], n2, false, t2.g.i.canvas, t2.R, s2, e2), r2 ? t2.clone() : t2;
|
|
3244
|
+
}
|
|
3245
|
+
var Za = class extends Qo {
|
|
3246
|
+
constructor(t2, e2, n2, r2) {
|
|
3247
|
+
super(t2), this.g = t2, this.da = e2, this.V = n2, this.sa = r2, this.R = new ca();
|
|
3248
|
+
}
|
|
3249
|
+
l(t2, e2 = true) {
|
|
3250
|
+
if ("runningMode" in t2 && Sn(this.baseOptions, 2, !!t2.runningMode && "IMAGE" !== t2.runningMode), void 0 !== t2.canvas && this.g.i.canvas !== t2.canvas) throw Error("You must create a new task to reset the canvas.");
|
|
3251
|
+
return super.l(t2, e2);
|
|
3252
|
+
}
|
|
3253
|
+
close() {
|
|
3254
|
+
this.R.close(), super.close();
|
|
3255
|
+
}
|
|
3256
|
+
};
|
|
3257
|
+
Za.prototype.close = Za.prototype.close;
|
|
3258
|
+
var Qa = class extends Za {
|
|
3259
|
+
constructor(t2, e2) {
|
|
3260
|
+
super(new za(t2, e2), "image_in", "norm_rect_in", false), this.j = { detections: [] }, yn(t2 = this.h = new Fs(), 0, 1, e2 = new xs()), Ln(this.h, 2, 0.5), Ln(this.h, 3, 0.3);
|
|
3261
|
+
}
|
|
3262
|
+
get baseOptions() {
|
|
3263
|
+
return pn(this.h, xs, 1);
|
|
3264
|
+
}
|
|
3265
|
+
set baseOptions(t2) {
|
|
3266
|
+
yn(this.h, 0, 1, t2);
|
|
3267
|
+
}
|
|
3268
|
+
o(t2) {
|
|
3269
|
+
return "minDetectionConfidence" in t2 && Ln(this.h, 2, t2.minDetectionConfidence ?? 0.5), "minSuppressionThreshold" in t2 && Ln(this.h, 3, t2.minSuppressionThreshold ?? 0.3), this.l(t2);
|
|
3270
|
+
}
|
|
3271
|
+
D(t2, e2) {
|
|
3272
|
+
return this.j = { detections: [] }, $a(this, t2, e2), this.j;
|
|
3273
|
+
}
|
|
3274
|
+
F(t2, e2, n2) {
|
|
3275
|
+
return this.j = { detections: [] }, qa(this, t2, n2, e2), this.j;
|
|
3276
|
+
}
|
|
3277
|
+
m() {
|
|
3278
|
+
var t2 = new $i();
|
|
3279
|
+
Ki(t2, "image_in"), Ki(t2, "norm_rect_in"), Yi(t2, "detections");
|
|
3280
|
+
const e2 = new Ci();
|
|
3281
|
+
er(e2, Is, this.h);
|
|
3282
|
+
const n2 = new Vi();
|
|
3283
|
+
Bi(n2, "mediapipe.tasks.vision.face_detector.FaceDetectorGraph"), Gi(n2, "IMAGE:image_in"), Gi(n2, "NORM_RECT:norm_rect_in"), ji(n2, "DETECTIONS:detections"), n2.o(e2), zi(t2, n2), this.g.attachProtoVectorListener("detections", ((t3, e3) => {
|
|
3284
|
+
for (const e4 of t3) t3 = ss(e4), this.j.detections.push(Lo(t3));
|
|
3285
|
+
$o(this, e3);
|
|
3286
|
+
})), this.g.attachEmptyPacketListener("detections", ((t3) => {
|
|
3287
|
+
$o(this, t3);
|
|
3288
|
+
})), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3289
|
+
}
|
|
3290
|
+
};
|
|
3291
|
+
Qa.prototype.detectForVideo = Qa.prototype.F, Qa.prototype.detect = Qa.prototype.D, Qa.prototype.setOptions = Qa.prototype.o, Qa.createFromModelPath = async function(t2, e2) {
|
|
3292
|
+
return Ka(Qa, t2, { baseOptions: { modelAssetPath: e2 } });
|
|
3293
|
+
}, Qa.createFromModelBuffer = function(t2, e2) {
|
|
3294
|
+
return Ka(Qa, t2, { baseOptions: { modelAssetBuffer: e2 } });
|
|
3295
|
+
}, Qa.createFromOptions = function(t2, e2) {
|
|
3296
|
+
return Ka(Qa, t2, e2);
|
|
3297
|
+
};
|
|
3298
|
+
var th = Xa([61, 146], [146, 91], [91, 181], [181, 84], [84, 17], [17, 314], [314, 405], [405, 321], [321, 375], [375, 291], [61, 185], [185, 40], [40, 39], [39, 37], [37, 0], [0, 267], [267, 269], [269, 270], [270, 409], [409, 291], [78, 95], [95, 88], [88, 178], [178, 87], [87, 14], [14, 317], [317, 402], [402, 318], [318, 324], [324, 308], [78, 191], [191, 80], [80, 81], [81, 82], [82, 13], [13, 312], [312, 311], [311, 310], [310, 415], [415, 308]);
|
|
3299
|
+
var eh = Xa([263, 249], [249, 390], [390, 373], [373, 374], [374, 380], [380, 381], [381, 382], [382, 362], [263, 466], [466, 388], [388, 387], [387, 386], [386, 385], [385, 384], [384, 398], [398, 362]);
|
|
3300
|
+
var nh = Xa([276, 283], [283, 282], [282, 295], [295, 285], [300, 293], [293, 334], [334, 296], [296, 336]);
|
|
3301
|
+
var rh = Xa([474, 475], [475, 476], [476, 477], [477, 474]);
|
|
3302
|
+
var ih = Xa([33, 7], [7, 163], [163, 144], [144, 145], [145, 153], [153, 154], [154, 155], [155, 133], [33, 246], [246, 161], [161, 160], [160, 159], [159, 158], [158, 157], [157, 173], [173, 133]);
|
|
3303
|
+
var sh = Xa([46, 53], [53, 52], [52, 65], [65, 55], [70, 63], [63, 105], [105, 66], [66, 107]);
|
|
3304
|
+
var oh = Xa([469, 470], [470, 471], [471, 472], [472, 469]);
|
|
3305
|
+
var ah = Xa([10, 338], [338, 297], [297, 332], [332, 284], [284, 251], [251, 389], [389, 356], [356, 454], [454, 323], [323, 361], [361, 288], [288, 397], [397, 365], [365, 379], [379, 378], [378, 400], [400, 377], [377, 152], [152, 148], [148, 176], [176, 149], [149, 150], [150, 136], [136, 172], [172, 58], [58, 132], [132, 93], [93, 234], [234, 127], [127, 162], [162, 21], [21, 54], [54, 103], [103, 67], [67, 109], [109, 10]);
|
|
3306
|
+
var hh = [...th, ...eh, ...nh, ...ih, ...sh, ...ah];
|
|
3307
|
+
var ch = Xa([127, 34], [34, 139], [139, 127], [11, 0], [0, 37], [37, 11], [232, 231], [231, 120], [120, 232], [72, 37], [37, 39], [39, 72], [128, 121], [121, 47], [47, 128], [232, 121], [121, 128], [128, 232], [104, 69], [69, 67], [67, 104], [175, 171], [171, 148], [148, 175], [118, 50], [50, 101], [101, 118], [73, 39], [39, 40], [40, 73], [9, 151], [151, 108], [108, 9], [48, 115], [115, 131], [131, 48], [194, 204], [204, 211], [211, 194], [74, 40], [40, 185], [185, 74], [80, 42], [42, 183], [183, 80], [40, 92], [92, 186], [186, 40], [230, 229], [229, 118], [118, 230], [202, 212], [212, 214], [214, 202], [83, 18], [18, 17], [17, 83], [76, 61], [61, 146], [146, 76], [160, 29], [29, 30], [30, 160], [56, 157], [157, 173], [173, 56], [106, 204], [204, 194], [194, 106], [135, 214], [214, 192], [192, 135], [203, 165], [165, 98], [98, 203], [21, 71], [71, 68], [68, 21], [51, 45], [45, 4], [4, 51], [144, 24], [24, 23], [23, 144], [77, 146], [146, 91], [91, 77], [205, 50], [50, 187], [187, 205], [201, 200], [200, 18], [18, 201], [91, 106], [106, 182], [182, 91], [90, 91], [91, 181], [181, 90], [85, 84], [84, 17], [17, 85], [206, 203], [203, 36], [36, 206], [148, 171], [171, 140], [140, 148], [92, 40], [40, 39], [39, 92], [193, 189], [189, 244], [244, 193], [159, 158], [158, 28], [28, 159], [247, 246], [246, 161], [161, 247], [236, 3], [3, 196], [196, 236], [54, 68], [68, 104], [104, 54], [193, 168], [168, 8], [8, 193], [117, 228], [228, 31], [31, 117], [189, 193], [193, 55], [55, 189], [98, 97], [97, 99], [99, 98], [126, 47], [47, 100], [100, 126], [166, 79], [79, 218], [218, 166], [155, 154], [154, 26], [26, 155], [209, 49], [49, 131], [131, 209], [135, 136], [136, 150], [150, 135], [47, 126], [126, 217], [217, 47], [223, 52], [52, 53], [53, 223], [45, 51], [51, 134], [134, 45], [211, 170], [170, 140], [140, 211], [67, 69], [69, 108], [108, 67], [43, 106], [106, 91], [91, 43], [230, 119], [119, 120], [120, 230], [226, 130], [130, 247], [247, 226], [63, 53], [53, 52], [52, 63], [238, 20], [20, 242], [242, 238], [46, 70], [70, 156], [156, 46], [78, 62], [62, 96], [96, 78], [46, 53], [53, 63], [63, 46], [143, 34], [34, 227], [227, 143], [123, 117], [117, 111], [111, 123], [44, 125], [125, 19], [19, 44], [236, 134], [134, 51], [51, 236], [216, 206], [206, 205], [205, 216], [154, 153], [153, 22], [22, 154], [39, 37], [37, 167], [167, 39], [200, 201], [201, 208], [208, 200], [36, 142], [142, 100], [100, 36], [57, 212], [212, 202], [202, 57], [20, 60], [60, 99], [99, 20], [28, 158], [158, 157], [157, 28], [35, 226], [226, 113], [113, 35], [160, 159], [159, 27], [27, 160], [204, 202], [202, 210], [210, 204], [113, 225], [225, 46], [46, 113], [43, 202], [202, 204], [204, 43], [62, 76], [76, 77], [77, 62], [137, 123], [123, 116], [116, 137], [41, 38], [38, 72], [72, 41], [203, 129], [129, 142], [142, 203], [64, 98], [98, 240], [240, 64], [49, 102], [102, 64], [64, 49], [41, 73], [73, 74], [74, 41], [212, 216], [216, 207], [207, 212], [42, 74], [74, 184], [184, 42], [169, 170], [170, 211], [211, 169], [170, 149], [149, 176], [176, 170], [105, 66], [66, 69], [69, 105], [122, 6], [6, 168], [168, 122], [123, 147], [147, 187], [187, 123], [96, 77], [77, 90], [90, 96], [65, 55], [55, 107], [107, 65], [89, 90], [90, 180], [180, 89], [101, 100], [100, 120], [120, 101], [63, 105], [105, 104], [104, 63], [93, 137], [137, 227], [227, 93], [15, 86], [86, 85], [85, 15], [129, 102], [102, 49], [49, 129], [14, 87], [87, 86], [86, 14], [55, 8], [8, 9], [9, 55], [100, 47], [47, 121], [121, 100], [145, 23], [23, 22], [22, 145], [88, 89], [89, 179], [179, 88], [6, 122], [122, 196], [196, 6], [88, 95], [95, 96], [96, 88], [138, 172], [172, 136], [136, 138], [215, 58], [58, 172], [172, 215], [115, 48], [48, 219], [219, 115], [42, 80], [80, 81], [81, 42], [195, 3], [3, 51], [51, 195], [43, 146], [146, 61], [61, 43], [171, 175], [175, 199], [199, 171], [81, 82], [82, 38], [38, 81], [53, 46], [46, 225], [225, 53], [144, 163], [163, 110], [110, 144], [52, 65], [65, 66], [66, 52], [229, 228], [228, 117], [117, 229], [34, 127], [127, 234], [234, 34], [107, 108], [108, 69], [69, 107], [109, 108], [108, 151], [151, 109], [48, 64], [64, 235], [235, 48], [62, 78], [78, 191], [191, 62], [129, 209], [209, 126], [126, 129], [111, 35], [35, 143], [143, 111], [117, 123], [123, 50], [50, 117], [222, 65], [65, 52], [52, 222], [19, 125], [125, 141], [141, 19], [221, 55], [55, 65], [65, 221], [3, 195], [195, 197], [197, 3], [25, 7], [7, 33], [33, 25], [220, 237], [237, 44], [44, 220], [70, 71], [71, 139], [139, 70], [122, 193], [193, 245], [245, 122], [247, 130], [130, 33], [33, 247], [71, 21], [21, 162], [162, 71], [170, 169], [169, 150], [150, 170], [188, 174], [174, 196], [196, 188], [216, 186], [186, 92], [92, 216], [2, 97], [97, 167], [167, 2], [141, 125], [125, 241], [241, 141], [164, 167], [167, 37], [37, 164], [72, 38], [38, 12], [12, 72], [38, 82], [82, 13], [13, 38], [63, 68], [68, 71], [71, 63], [226, 35], [35, 111], [111, 226], [101, 50], [50, 205], [205, 101], [206, 92], [92, 165], [165, 206], [209, 198], [198, 217], [217, 209], [165, 167], [167, 97], [97, 165], [220, 115], [115, 218], [218, 220], [133, 112], [112, 243], [243, 133], [239, 238], [238, 241], [241, 239], [214, 135], [135, 169], [169, 214], [190, 173], [173, 133], [133, 190], [171, 208], [208, 32], [32, 171], [125, 44], [44, 237], [237, 125], [86, 87], [87, 178], [178, 86], [85, 86], [86, 179], [179, 85], [84, 85], [85, 180], [180, 84], [83, 84], [84, 181], [181, 83], [201, 83], [83, 182], [182, 201], [137, 93], [93, 132], [132, 137], [76, 62], [62, 183], [183, 76], [61, 76], [76, 184], [184, 61], [57, 61], [61, 185], [185, 57], [212, 57], [57, 186], [186, 212], [214, 207], [207, 187], [187, 214], [34, 143], [143, 156], [156, 34], [79, 239], [239, 237], [237, 79], [123, 137], [137, 177], [177, 123], [44, 1], [1, 4], [4, 44], [201, 194], [194, 32], [32, 201], [64, 102], [102, 129], [129, 64], [213, 215], [215, 138], [138, 213], [59, 166], [166, 219], [219, 59], [242, 99], [99, 97], [97, 242], [2, 94], [94, 141], [141, 2], [75, 59], [59, 235], [235, 75], [24, 110], [110, 228], [228, 24], [25, 130], [130, 226], [226, 25], [23, 24], [24, 229], [229, 23], [22, 23], [23, 230], [230, 22], [26, 22], [22, 231], [231, 26], [112, 26], [26, 232], [232, 112], [189, 190], [190, 243], [243, 189], [221, 56], [56, 190], [190, 221], [28, 56], [56, 221], [221, 28], [27, 28], [28, 222], [222, 27], [29, 27], [27, 223], [223, 29], [30, 29], [29, 224], [224, 30], [247, 30], [30, 225], [225, 247], [238, 79], [79, 20], [20, 238], [166, 59], [59, 75], [75, 166], [60, 75], [75, 240], [240, 60], [147, 177], [177, 215], [215, 147], [20, 79], [79, 166], [166, 20], [187, 147], [147, 213], [213, 187], [112, 233], [233, 244], [244, 112], [233, 128], [128, 245], [245, 233], [128, 114], [114, 188], [188, 128], [114, 217], [217, 174], [174, 114], [131, 115], [115, 220], [220, 131], [217, 198], [198, 236], [236, 217], [198, 131], [131, 134], [134, 198], [177, 132], [132, 58], [58, 177], [143, 35], [35, 124], [124, 143], [110, 163], [163, 7], [7, 110], [228, 110], [110, 25], [25, 228], [356, 389], [389, 368], [368, 356], [11, 302], [302, 267], [267, 11], [452, 350], [350, 349], [349, 452], [302, 303], [303, 269], [269, 302], [357, 343], [343, 277], [277, 357], [452, 453], [453, 357], [357, 452], [333, 332], [332, 297], [297, 333], [175, 152], [152, 377], [377, 175], [347, 348], [348, 330], [330, 347], [303, 304], [304, 270], [270, 303], [9, 336], [336, 337], [337, 9], [278, 279], [279, 360], [360, 278], [418, 262], [262, 431], [431, 418], [304, 408], [408, 409], [409, 304], [310, 415], [415, 407], [407, 310], [270, 409], [409, 410], [410, 270], [450, 348], [348, 347], [347, 450], [422, 430], [430, 434], [434, 422], [313, 314], [314, 17], [17, 313], [306, 307], [307, 375], [375, 306], [387, 388], [388, 260], [260, 387], [286, 414], [414, 398], [398, 286], [335, 406], [406, 418], [418, 335], [364, 367], [367, 416], [416, 364], [423, 358], [358, 327], [327, 423], [251, 284], [284, 298], [298, 251], [281, 5], [5, 4], [4, 281], [373, 374], [374, 253], [253, 373], [307, 320], [320, 321], [321, 307], [425, 427], [427, 411], [411, 425], [421, 313], [313, 18], [18, 421], [321, 405], [405, 406], [406, 321], [320, 404], [404, 405], [405, 320], [315, 16], [16, 17], [17, 315], [426, 425], [425, 266], [266, 426], [377, 400], [400, 369], [369, 377], [322, 391], [391, 269], [269, 322], [417, 465], [465, 464], [464, 417], [386, 257], [257, 258], [258, 386], [466, 260], [260, 388], [388, 466], [456, 399], [399, 419], [419, 456], [284, 332], [332, 333], [333, 284], [417, 285], [285, 8], [8, 417], [346, 340], [340, 261], [261, 346], [413, 441], [441, 285], [285, 413], [327, 460], [460, 328], [328, 327], [355, 371], [371, 329], [329, 355], [392, 439], [439, 438], [438, 392], [382, 341], [341, 256], [256, 382], [429, 420], [420, 360], [360, 429], [364, 394], [394, 379], [379, 364], [277, 343], [343, 437], [437, 277], [443, 444], [444, 283], [283, 443], [275, 440], [440, 363], [363, 275], [431, 262], [262, 369], [369, 431], [297, 338], [338, 337], [337, 297], [273, 375], [375, 321], [321, 273], [450, 451], [451, 349], [349, 450], [446, 342], [342, 467], [467, 446], [293, 334], [334, 282], [282, 293], [458, 461], [461, 462], [462, 458], [276, 353], [353, 383], [383, 276], [308, 324], [324, 325], [325, 308], [276, 300], [300, 293], [293, 276], [372, 345], [345, 447], [447, 372], [352, 345], [345, 340], [340, 352], [274, 1], [1, 19], [19, 274], [456, 248], [248, 281], [281, 456], [436, 427], [427, 425], [425, 436], [381, 256], [256, 252], [252, 381], [269, 391], [391, 393], [393, 269], [200, 199], [199, 428], [428, 200], [266, 330], [330, 329], [329, 266], [287, 273], [273, 422], [422, 287], [250, 462], [462, 328], [328, 250], [258, 286], [286, 384], [384, 258], [265, 353], [353, 342], [342, 265], [387, 259], [259, 257], [257, 387], [424, 431], [431, 430], [430, 424], [342, 353], [353, 276], [276, 342], [273, 335], [335, 424], [424, 273], [292, 325], [325, 307], [307, 292], [366, 447], [447, 345], [345, 366], [271, 303], [303, 302], [302, 271], [423, 266], [266, 371], [371, 423], [294, 455], [455, 460], [460, 294], [279, 278], [278, 294], [294, 279], [271, 272], [272, 304], [304, 271], [432, 434], [434, 427], [427, 432], [272, 407], [407, 408], [408, 272], [394, 430], [430, 431], [431, 394], [395, 369], [369, 400], [400, 395], [334, 333], [333, 299], [299, 334], [351, 417], [417, 168], [168, 351], [352, 280], [280, 411], [411, 352], [325, 319], [319, 320], [320, 325], [295, 296], [296, 336], [336, 295], [319, 403], [403, 404], [404, 319], [330, 348], [348, 349], [349, 330], [293, 298], [298, 333], [333, 293], [323, 454], [454, 447], [447, 323], [15, 16], [16, 315], [315, 15], [358, 429], [429, 279], [279, 358], [14, 15], [15, 316], [316, 14], [285, 336], [336, 9], [9, 285], [329, 349], [349, 350], [350, 329], [374, 380], [380, 252], [252, 374], [318, 402], [402, 403], [403, 318], [6, 197], [197, 419], [419, 6], [318, 319], [319, 325], [325, 318], [367, 364], [364, 365], [365, 367], [435, 367], [367, 397], [397, 435], [344, 438], [438, 439], [439, 344], [272, 271], [271, 311], [311, 272], [195, 5], [5, 281], [281, 195], [273, 287], [287, 291], [291, 273], [396, 428], [428, 199], [199, 396], [311, 271], [271, 268], [268, 311], [283, 444], [444, 445], [445, 283], [373, 254], [254, 339], [339, 373], [282, 334], [334, 296], [296, 282], [449, 347], [347, 346], [346, 449], [264, 447], [447, 454], [454, 264], [336, 296], [296, 299], [299, 336], [338, 10], [10, 151], [151, 338], [278, 439], [439, 455], [455, 278], [292, 407], [407, 415], [415, 292], [358, 371], [371, 355], [355, 358], [340, 345], [345, 372], [372, 340], [346, 347], [347, 280], [280, 346], [442, 443], [443, 282], [282, 442], [19, 94], [94, 370], [370, 19], [441, 442], [442, 295], [295, 441], [248, 419], [419, 197], [197, 248], [263, 255], [255, 359], [359, 263], [440, 275], [275, 274], [274, 440], [300, 383], [383, 368], [368, 300], [351, 412], [412, 465], [465, 351], [263, 467], [467, 466], [466, 263], [301, 368], [368, 389], [389, 301], [395, 378], [378, 379], [379, 395], [412, 351], [351, 419], [419, 412], [436, 426], [426, 322], [322, 436], [2, 164], [164, 393], [393, 2], [370, 462], [462, 461], [461, 370], [164, 0], [0, 267], [267, 164], [302, 11], [11, 12], [12, 302], [268, 12], [12, 13], [13, 268], [293, 300], [300, 301], [301, 293], [446, 261], [261, 340], [340, 446], [330, 266], [266, 425], [425, 330], [426, 423], [423, 391], [391, 426], [429, 355], [355, 437], [437, 429], [391, 327], [327, 326], [326, 391], [440, 457], [457, 438], [438, 440], [341, 382], [382, 362], [362, 341], [459, 457], [457, 461], [461, 459], [434, 430], [430, 394], [394, 434], [414, 463], [463, 362], [362, 414], [396, 369], [369, 262], [262, 396], [354, 461], [461, 457], [457, 354], [316, 403], [403, 402], [402, 316], [315, 404], [404, 403], [403, 315], [314, 405], [405, 404], [404, 314], [313, 406], [406, 405], [405, 313], [421, 418], [418, 406], [406, 421], [366, 401], [401, 361], [361, 366], [306, 408], [408, 407], [407, 306], [291, 409], [409, 408], [408, 291], [287, 410], [410, 409], [409, 287], [432, 436], [436, 410], [410, 432], [434, 416], [416, 411], [411, 434], [264, 368], [368, 383], [383, 264], [309, 438], [438, 457], [457, 309], [352, 376], [376, 401], [401, 352], [274, 275], [275, 4], [4, 274], [421, 428], [428, 262], [262, 421], [294, 327], [327, 358], [358, 294], [433, 416], [416, 367], [367, 433], [289, 455], [455, 439], [439, 289], [462, 370], [370, 326], [326, 462], [2, 326], [326, 370], [370, 2], [305, 460], [460, 455], [455, 305], [254, 449], [449, 448], [448, 254], [255, 261], [261, 446], [446, 255], [253, 450], [450, 449], [449, 253], [252, 451], [451, 450], [450, 252], [256, 452], [452, 451], [451, 256], [341, 453], [453, 452], [452, 341], [413, 464], [464, 463], [463, 413], [441, 413], [413, 414], [414, 441], [258, 442], [442, 441], [441, 258], [257, 443], [443, 442], [442, 257], [259, 444], [444, 443], [443, 259], [260, 445], [445, 444], [444, 260], [467, 342], [342, 445], [445, 467], [459, 458], [458, 250], [250, 459], [289, 392], [392, 290], [290, 289], [290, 328], [328, 460], [460, 290], [376, 433], [433, 435], [435, 376], [250, 290], [290, 392], [392, 250], [411, 416], [416, 433], [433, 411], [341, 463], [463, 464], [464, 341], [453, 464], [464, 465], [465, 453], [357, 465], [465, 412], [412, 357], [343, 412], [412, 399], [399, 343], [360, 363], [363, 440], [440, 360], [437, 399], [399, 456], [456, 437], [420, 456], [456, 363], [363, 420], [401, 435], [435, 288], [288, 401], [372, 383], [383, 353], [353, 372], [339, 255], [255, 249], [249, 339], [448, 261], [261, 255], [255, 448], [133, 243], [243, 190], [190, 133], [133, 155], [155, 112], [112, 133], [33, 246], [246, 247], [247, 33], [33, 130], [130, 25], [25, 33], [398, 384], [384, 286], [286, 398], [362, 398], [398, 414], [414, 362], [362, 463], [463, 341], [341, 362], [263, 359], [359, 467], [467, 263], [263, 249], [249, 255], [255, 263], [466, 467], [467, 260], [260, 466], [75, 60], [60, 166], [166, 75], [238, 239], [239, 79], [79, 238], [162, 127], [127, 139], [139, 162], [72, 11], [11, 37], [37, 72], [121, 232], [232, 120], [120, 121], [73, 72], [72, 39], [39, 73], [114, 128], [128, 47], [47, 114], [233, 232], [232, 128], [128, 233], [103, 104], [104, 67], [67, 103], [152, 175], [175, 148], [148, 152], [119, 118], [118, 101], [101, 119], [74, 73], [73, 40], [40, 74], [107, 9], [9, 108], [108, 107], [49, 48], [48, 131], [131, 49], [32, 194], [194, 211], [211, 32], [184, 74], [74, 185], [185, 184], [191, 80], [80, 183], [183, 191], [185, 40], [40, 186], [186, 185], [119, 230], [230, 118], [118, 119], [210, 202], [202, 214], [214, 210], [84, 83], [83, 17], [17, 84], [77, 76], [76, 146], [146, 77], [161, 160], [160, 30], [30, 161], [190, 56], [56, 173], [173, 190], [182, 106], [106, 194], [194, 182], [138, 135], [135, 192], [192, 138], [129, 203], [203, 98], [98, 129], [54, 21], [21, 68], [68, 54], [5, 51], [51, 4], [4, 5], [145, 144], [144, 23], [23, 145], [90, 77], [77, 91], [91, 90], [207, 205], [205, 187], [187, 207], [83, 201], [201, 18], [18, 83], [181, 91], [91, 182], [182, 181], [180, 90], [90, 181], [181, 180], [16, 85], [85, 17], [17, 16], [205, 206], [206, 36], [36, 205], [176, 148], [148, 140], [140, 176], [165, 92], [92, 39], [39, 165], [245, 193], [193, 244], [244, 245], [27, 159], [159, 28], [28, 27], [30, 247], [247, 161], [161, 30], [174, 236], [236, 196], [196, 174], [103, 54], [54, 104], [104, 103], [55, 193], [193, 8], [8, 55], [111, 117], [117, 31], [31, 111], [221, 189], [189, 55], [55, 221], [240, 98], [98, 99], [99, 240], [142, 126], [126, 100], [100, 142], [219, 166], [166, 218], [218, 219], [112, 155], [155, 26], [26, 112], [198, 209], [209, 131], [131, 198], [169, 135], [135, 150], [150, 169], [114, 47], [47, 217], [217, 114], [224, 223], [223, 53], [53, 224], [220, 45], [45, 134], [134, 220], [32, 211], [211, 140], [140, 32], [109, 67], [67, 108], [108, 109], [146, 43], [43, 91], [91, 146], [231, 230], [230, 120], [120, 231], [113, 226], [226, 247], [247, 113], [105, 63], [63, 52], [52, 105], [241, 238], [238, 242], [242, 241], [124, 46], [46, 156], [156, 124], [95, 78], [78, 96], [96, 95], [70, 46], [46, 63], [63, 70], [116, 143], [143, 227], [227, 116], [116, 123], [123, 111], [111, 116], [1, 44], [44, 19], [19, 1], [3, 236], [236, 51], [51, 3], [207, 216], [216, 205], [205, 207], [26, 154], [154, 22], [22, 26], [165, 39], [39, 167], [167, 165], [199, 200], [200, 208], [208, 199], [101, 36], [36, 100], [100, 101], [43, 57], [57, 202], [202, 43], [242, 20], [20, 99], [99, 242], [56, 28], [28, 157], [157, 56], [124, 35], [35, 113], [113, 124], [29, 160], [160, 27], [27, 29], [211, 204], [204, 210], [210, 211], [124, 113], [113, 46], [46, 124], [106, 43], [43, 204], [204, 106], [96, 62], [62, 77], [77, 96], [227, 137], [137, 116], [116, 227], [73, 41], [41, 72], [72, 73], [36, 203], [203, 142], [142, 36], [235, 64], [64, 240], [240, 235], [48, 49], [49, 64], [64, 48], [42, 41], [41, 74], [74, 42], [214, 212], [212, 207], [207, 214], [183, 42], [42, 184], [184, 183], [210, 169], [169, 211], [211, 210], [140, 170], [170, 176], [176, 140], [104, 105], [105, 69], [69, 104], [193, 122], [122, 168], [168, 193], [50, 123], [123, 187], [187, 50], [89, 96], [96, 90], [90, 89], [66, 65], [65, 107], [107, 66], [179, 89], [89, 180], [180, 179], [119, 101], [101, 120], [120, 119], [68, 63], [63, 104], [104, 68], [234, 93], [93, 227], [227, 234], [16, 15], [15, 85], [85, 16], [209, 129], [129, 49], [49, 209], [15, 14], [14, 86], [86, 15], [107, 55], [55, 9], [9, 107], [120, 100], [100, 121], [121, 120], [153, 145], [145, 22], [22, 153], [178, 88], [88, 179], [179, 178], [197, 6], [6, 196], [196, 197], [89, 88], [88, 96], [96, 89], [135, 138], [138, 136], [136, 135], [138, 215], [215, 172], [172, 138], [218, 115], [115, 219], [219, 218], [41, 42], [42, 81], [81, 41], [5, 195], [195, 51], [51, 5], [57, 43], [43, 61], [61, 57], [208, 171], [171, 199], [199, 208], [41, 81], [81, 38], [38, 41], [224, 53], [53, 225], [225, 224], [24, 144], [144, 110], [110, 24], [105, 52], [52, 66], [66, 105], [118, 229], [229, 117], [117, 118], [227, 34], [34, 234], [234, 227], [66, 107], [107, 69], [69, 66], [10, 109], [109, 151], [151, 10], [219, 48], [48, 235], [235, 219], [183, 62], [62, 191], [191, 183], [142, 129], [129, 126], [126, 142], [116, 111], [111, 143], [143, 116], [118, 117], [117, 50], [50, 118], [223, 222], [222, 52], [52, 223], [94, 19], [19, 141], [141, 94], [222, 221], [221, 65], [65, 222], [196, 3], [3, 197], [197, 196], [45, 220], [220, 44], [44, 45], [156, 70], [70, 139], [139, 156], [188, 122], [122, 245], [245, 188], [139, 71], [71, 162], [162, 139], [149, 170], [170, 150], [150, 149], [122, 188], [188, 196], [196, 122], [206, 216], [216, 92], [92, 206], [164, 2], [2, 167], [167, 164], [242, 141], [141, 241], [241, 242], [0, 164], [164, 37], [37, 0], [11, 72], [72, 12], [12, 11], [12, 38], [38, 13], [13, 12], [70, 63], [63, 71], [71, 70], [31, 226], [226, 111], [111, 31], [36, 101], [101, 205], [205, 36], [203, 206], [206, 165], [165, 203], [126, 209], [209, 217], [217, 126], [98, 165], [165, 97], [97, 98], [237, 220], [220, 218], [218, 237], [237, 239], [239, 241], [241, 237], [210, 214], [214, 169], [169, 210], [140, 171], [171, 32], [32, 140], [241, 125], [125, 237], [237, 241], [179, 86], [86, 178], [178, 179], [180, 85], [85, 179], [179, 180], [181, 84], [84, 180], [180, 181], [182, 83], [83, 181], [181, 182], [194, 201], [201, 182], [182, 194], [177, 137], [137, 132], [132, 177], [184, 76], [76, 183], [183, 184], [185, 61], [61, 184], [184, 185], [186, 57], [57, 185], [185, 186], [216, 212], [212, 186], [186, 216], [192, 214], [214, 187], [187, 192], [139, 34], [34, 156], [156, 139], [218, 79], [79, 237], [237, 218], [147, 123], [123, 177], [177, 147], [45, 44], [44, 4], [4, 45], [208, 201], [201, 32], [32, 208], [98, 64], [64, 129], [129, 98], [192, 213], [213, 138], [138, 192], [235, 59], [59, 219], [219, 235], [141, 242], [242, 97], [97, 141], [97, 2], [2, 141], [141, 97], [240, 75], [75, 235], [235, 240], [229, 24], [24, 228], [228, 229], [31, 25], [25, 226], [226, 31], [230, 23], [23, 229], [229, 230], [231, 22], [22, 230], [230, 231], [232, 26], [26, 231], [231, 232], [233, 112], [112, 232], [232, 233], [244, 189], [189, 243], [243, 244], [189, 221], [221, 190], [190, 189], [222, 28], [28, 221], [221, 222], [223, 27], [27, 222], [222, 223], [224, 29], [29, 223], [223, 224], [225, 30], [30, 224], [224, 225], [113, 247], [247, 225], [225, 113], [99, 60], [60, 240], [240, 99], [213, 147], [147, 215], [215, 213], [60, 20], [20, 166], [166, 60], [192, 187], [187, 213], [213, 192], [243, 112], [112, 244], [244, 243], [244, 233], [233, 245], [245, 244], [245, 128], [128, 188], [188, 245], [188, 114], [114, 174], [174, 188], [134, 131], [131, 220], [220, 134], [174, 217], [217, 236], [236, 174], [236, 198], [198, 134], [134, 236], [215, 177], [177, 58], [58, 215], [156, 143], [143, 124], [124, 156], [25, 110], [110, 7], [7, 25], [31, 228], [228, 25], [25, 31], [264, 356], [356, 368], [368, 264], [0, 11], [11, 267], [267, 0], [451, 452], [452, 349], [349, 451], [267, 302], [302, 269], [269, 267], [350, 357], [357, 277], [277, 350], [350, 452], [452, 357], [357, 350], [299, 333], [333, 297], [297, 299], [396, 175], [175, 377], [377, 396], [280, 347], [347, 330], [330, 280], [269, 303], [303, 270], [270, 269], [151, 9], [9, 337], [337, 151], [344, 278], [278, 360], [360, 344], [424, 418], [418, 431], [431, 424], [270, 304], [304, 409], [409, 270], [272, 310], [310, 407], [407, 272], [322, 270], [270, 410], [410, 322], [449, 450], [450, 347], [347, 449], [432, 422], [422, 434], [434, 432], [18, 313], [313, 17], [17, 18], [291, 306], [306, 375], [375, 291], [259, 387], [387, 260], [260, 259], [424, 335], [335, 418], [418, 424], [434, 364], [364, 416], [416, 434], [391, 423], [423, 327], [327, 391], [301, 251], [251, 298], [298, 301], [275, 281], [281, 4], [4, 275], [254, 373], [373, 253], [253, 254], [375, 307], [307, 321], [321, 375], [280, 425], [425, 411], [411, 280], [200, 421], [421, 18], [18, 200], [335, 321], [321, 406], [406, 335], [321, 320], [320, 405], [405, 321], [314, 315], [315, 17], [17, 314], [423, 426], [426, 266], [266, 423], [396, 377], [377, 369], [369, 396], [270, 322], [322, 269], [269, 270], [413, 417], [417, 464], [464, 413], [385, 386], [386, 258], [258, 385], [248, 456], [456, 419], [419, 248], [298, 284], [284, 333], [333, 298], [168, 417], [417, 8], [8, 168], [448, 346], [346, 261], [261, 448], [417, 413], [413, 285], [285, 417], [326, 327], [327, 328], [328, 326], [277, 355], [355, 329], [329, 277], [309, 392], [392, 438], [438, 309], [381, 382], [382, 256], [256, 381], [279, 429], [429, 360], [360, 279], [365, 364], [364, 379], [379, 365], [355, 277], [277, 437], [437, 355], [282, 443], [443, 283], [283, 282], [281, 275], [275, 363], [363, 281], [395, 431], [431, 369], [369, 395], [299, 297], [297, 337], [337, 299], [335, 273], [273, 321], [321, 335], [348, 450], [450, 349], [349, 348], [359, 446], [446, 467], [467, 359], [283, 293], [293, 282], [282, 283], [250, 458], [458, 462], [462, 250], [300, 276], [276, 383], [383, 300], [292, 308], [308, 325], [325, 292], [283, 276], [276, 293], [293, 283], [264, 372], [372, 447], [447, 264], [346, 352], [352, 340], [340, 346], [354, 274], [274, 19], [19, 354], [363, 456], [456, 281], [281, 363], [426, 436], [436, 425], [425, 426], [380, 381], [381, 252], [252, 380], [267, 269], [269, 393], [393, 267], [421, 200], [200, 428], [428, 421], [371, 266], [266, 329], [329, 371], [432, 287], [287, 422], [422, 432], [290, 250], [250, 328], [328, 290], [385, 258], [258, 384], [384, 385], [446, 265], [265, 342], [342, 446], [386, 387], [387, 257], [257, 386], [422, 424], [424, 430], [430, 422], [445, 342], [342, 276], [276, 445], [422, 273], [273, 424], [424, 422], [306, 292], [292, 307], [307, 306], [352, 366], [366, 345], [345, 352], [268, 271], [271, 302], [302, 268], [358, 423], [423, 371], [371, 358], [327, 294], [294, 460], [460, 327], [331, 279], [279, 294], [294, 331], [303, 271], [271, 304], [304, 303], [436, 432], [432, 427], [427, 436], [304, 272], [272, 408], [408, 304], [395, 394], [394, 431], [431, 395], [378, 395], [395, 400], [400, 378], [296, 334], [334, 299], [299, 296], [6, 351], [351, 168], [168, 6], [376, 352], [352, 411], [411, 376], [307, 325], [325, 320], [320, 307], [285, 295], [295, 336], [336, 285], [320, 319], [319, 404], [404, 320], [329, 330], [330, 349], [349, 329], [334, 293], [293, 333], [333, 334], [366, 323], [323, 447], [447, 366], [316, 15], [15, 315], [315, 316], [331, 358], [358, 279], [279, 331], [317, 14], [14, 316], [316, 317], [8, 285], [285, 9], [9, 8], [277, 329], [329, 350], [350, 277], [253, 374], [374, 252], [252, 253], [319, 318], [318, 403], [403, 319], [351, 6], [6, 419], [419, 351], [324, 318], [318, 325], [325, 324], [397, 367], [367, 365], [365, 397], [288, 435], [435, 397], [397, 288], [278, 344], [344, 439], [439, 278], [310, 272], [272, 311], [311, 310], [248, 195], [195, 281], [281, 248], [375, 273], [273, 291], [291, 375], [175, 396], [396, 199], [199, 175], [312, 311], [311, 268], [268, 312], [276, 283], [283, 445], [445, 276], [390, 373], [373, 339], [339, 390], [295, 282], [282, 296], [296, 295], [448, 449], [449, 346], [346, 448], [356, 264], [264, 454], [454, 356], [337, 336], [336, 299], [299, 337], [337, 338], [338, 151], [151, 337], [294, 278], [278, 455], [455, 294], [308, 292], [292, 415], [415, 308], [429, 358], [358, 355], [355, 429], [265, 340], [340, 372], [372, 265], [352, 346], [346, 280], [280, 352], [295, 442], [442, 282], [282, 295], [354, 19], [19, 370], [370, 354], [285, 441], [441, 295], [295, 285], [195, 248], [248, 197], [197, 195], [457, 440], [440, 274], [274, 457], [301, 300], [300, 368], [368, 301], [417, 351], [351, 465], [465, 417], [251, 301], [301, 389], [389, 251], [394, 395], [395, 379], [379, 394], [399, 412], [412, 419], [419, 399], [410, 436], [436, 322], [322, 410], [326, 2], [2, 393], [393, 326], [354, 370], [370, 461], [461, 354], [393, 164], [164, 267], [267, 393], [268, 302], [302, 12], [12, 268], [312, 268], [268, 13], [13, 312], [298, 293], [293, 301], [301, 298], [265, 446], [446, 340], [340, 265], [280, 330], [330, 425], [425, 280], [322, 426], [426, 391], [391, 322], [420, 429], [429, 437], [437, 420], [393, 391], [391, 326], [326, 393], [344, 440], [440, 438], [438, 344], [458, 459], [459, 461], [461, 458], [364, 434], [434, 394], [394, 364], [428, 396], [396, 262], [262, 428], [274, 354], [354, 457], [457, 274], [317, 316], [316, 402], [402, 317], [316, 315], [315, 403], [403, 316], [315, 314], [314, 404], [404, 315], [314, 313], [313, 405], [405, 314], [313, 421], [421, 406], [406, 313], [323, 366], [366, 361], [361, 323], [292, 306], [306, 407], [407, 292], [306, 291], [291, 408], [408, 306], [291, 287], [287, 409], [409, 291], [287, 432], [432, 410], [410, 287], [427, 434], [434, 411], [411, 427], [372, 264], [264, 383], [383, 372], [459, 309], [309, 457], [457, 459], [366, 352], [352, 401], [401, 366], [1, 274], [274, 4], [4, 1], [418, 421], [421, 262], [262, 418], [331, 294], [294, 358], [358, 331], [435, 433], [433, 367], [367, 435], [392, 289], [289, 439], [439, 392], [328, 462], [462, 326], [326, 328], [94, 2], [2, 370], [370, 94], [289, 305], [305, 455], [455, 289], [339, 254], [254, 448], [448, 339], [359, 255], [255, 446], [446, 359], [254, 253], [253, 449], [449, 254], [253, 252], [252, 450], [450, 253], [252, 256], [256, 451], [451, 252], [256, 341], [341, 452], [452, 256], [414, 413], [413, 463], [463, 414], [286, 441], [441, 414], [414, 286], [286, 258], [258, 441], [441, 286], [258, 257], [257, 442], [442, 258], [257, 259], [259, 443], [443, 257], [259, 260], [260, 444], [444, 259], [260, 467], [467, 445], [445, 260], [309, 459], [459, 250], [250, 309], [305, 289], [289, 290], [290, 305], [305, 290], [290, 460], [460, 305], [401, 376], [376, 435], [435, 401], [309, 250], [250, 392], [392, 309], [376, 411], [411, 433], [433, 376], [453, 341], [341, 464], [464, 453], [357, 453], [453, 465], [465, 357], [343, 357], [357, 412], [412, 343], [437, 343], [343, 399], [399, 437], [344, 360], [360, 440], [440, 344], [420, 437], [437, 456], [456, 420], [360, 420], [420, 363], [363, 360], [361, 401], [401, 288], [288, 361], [265, 372], [372, 353], [353, 265], [390, 339], [339, 249], [249, 390], [339, 448], [448, 255], [255, 339]);
|
|
3308
|
+
function uh(t2) {
|
|
3309
|
+
t2.j = { faceLandmarks: [], faceBlendshapes: [], facialTransformationMatrixes: [] };
|
|
3310
|
+
}
|
|
3311
|
+
var lh = class extends Za {
|
|
3312
|
+
constructor(t2, e2) {
|
|
3313
|
+
super(new za(t2, e2), "image_in", "norm_rect", false), this.j = { faceLandmarks: [], faceBlendshapes: [], facialTransformationMatrixes: [] }, this.outputFacialTransformationMatrixes = this.outputFaceBlendshapes = false, yn(t2 = this.h = new Ds(), 0, 1, e2 = new xs()), this.v = new Us(), yn(this.h, 0, 3, this.v), this.s = new Fs(), yn(this.h, 0, 2, this.s), xn(this.s, 4, 1), Ln(this.s, 2, 0.5), Ln(this.v, 2, 0.5), Ln(this.h, 4, 0.5);
|
|
3314
|
+
}
|
|
3315
|
+
get baseOptions() {
|
|
3316
|
+
return pn(this.h, xs, 1);
|
|
3317
|
+
}
|
|
3318
|
+
set baseOptions(t2) {
|
|
3319
|
+
yn(this.h, 0, 1, t2);
|
|
3320
|
+
}
|
|
3321
|
+
o(t2) {
|
|
3322
|
+
return "numFaces" in t2 && xn(this.s, 4, t2.numFaces ?? 1), "minFaceDetectionConfidence" in t2 && Ln(this.s, 2, t2.minFaceDetectionConfidence ?? 0.5), "minTrackingConfidence" in t2 && Ln(this.h, 4, t2.minTrackingConfidence ?? 0.5), "minFacePresenceConfidence" in t2 && Ln(this.v, 2, t2.minFacePresenceConfidence ?? 0.5), "outputFaceBlendshapes" in t2 && (this.outputFaceBlendshapes = !!t2.outputFaceBlendshapes), "outputFacialTransformationMatrixes" in t2 && (this.outputFacialTransformationMatrixes = !!t2.outputFacialTransformationMatrixes), this.l(t2);
|
|
3323
|
+
}
|
|
3324
|
+
D(t2, e2) {
|
|
3325
|
+
return uh(this), $a(this, t2, e2), this.j;
|
|
3326
|
+
}
|
|
3327
|
+
F(t2, e2, n2) {
|
|
3328
|
+
return uh(this), qa(this, t2, n2, e2), this.j;
|
|
3329
|
+
}
|
|
3330
|
+
m() {
|
|
3331
|
+
var t2 = new $i();
|
|
3332
|
+
Ki(t2, "image_in"), Ki(t2, "norm_rect"), Yi(t2, "face_landmarks");
|
|
3333
|
+
const e2 = new Ci();
|
|
3334
|
+
er(e2, js, this.h);
|
|
3335
|
+
const n2 = new Vi();
|
|
3336
|
+
Bi(n2, "mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"), Gi(n2, "IMAGE:image_in"), Gi(n2, "NORM_RECT:norm_rect"), ji(n2, "NORM_LANDMARKS:face_landmarks"), n2.o(e2), zi(t2, n2), this.g.attachProtoVectorListener("face_landmarks", ((t3, e3) => {
|
|
3337
|
+
for (const e4 of t3) t3 = cs(e4), this.j.faceLandmarks.push(Ro(t3));
|
|
3338
|
+
$o(this, e3);
|
|
3339
|
+
})), this.g.attachEmptyPacketListener("face_landmarks", ((t3) => {
|
|
3340
|
+
$o(this, t3);
|
|
3341
|
+
})), this.outputFaceBlendshapes && (Yi(t2, "blendshapes"), ji(n2, "BLENDSHAPES:blendshapes"), this.g.attachProtoVectorListener("blendshapes", ((t3, e3) => {
|
|
3342
|
+
if (this.outputFaceBlendshapes) for (const e4 of t3) t3 = es(e4), this.j.faceBlendshapes.push(xo(t3.g() ?? []));
|
|
3343
|
+
$o(this, e3);
|
|
3344
|
+
})), this.g.attachEmptyPacketListener("blendshapes", ((t3) => {
|
|
3345
|
+
$o(this, t3);
|
|
3346
|
+
}))), this.outputFacialTransformationMatrixes && (Yi(t2, "face_geometry"), ji(n2, "FACE_GEOMETRY:face_geometry"), this.g.attachProtoVectorListener("face_geometry", ((t3, e3) => {
|
|
3347
|
+
if (this.outputFacialTransformationMatrixes) for (const e4 of t3) (t3 = pn(Cs(e4), us, 2)) && this.j.facialTransformationMatrixes.push({ rows: Tn(An(t3, 1), 0) ?? 0, columns: Tn(An(t3, 2), 0) ?? 0, data: en(t3, 3, Ht, tn()).slice() ?? [] });
|
|
3348
|
+
$o(this, e3);
|
|
3349
|
+
})), this.g.attachEmptyPacketListener("face_geometry", ((t3) => {
|
|
3350
|
+
$o(this, t3);
|
|
3351
|
+
}))), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3352
|
+
}
|
|
3353
|
+
};
|
|
3354
|
+
lh.prototype.detectForVideo = lh.prototype.F, lh.prototype.detect = lh.prototype.D, lh.prototype.setOptions = lh.prototype.o, lh.createFromModelPath = function(t2, e2) {
|
|
3355
|
+
return Ka(lh, t2, { baseOptions: { modelAssetPath: e2 } });
|
|
3356
|
+
}, lh.createFromModelBuffer = function(t2, e2) {
|
|
3357
|
+
return Ka(lh, t2, { baseOptions: { modelAssetBuffer: e2 } });
|
|
3358
|
+
}, lh.createFromOptions = function(t2, e2) {
|
|
3359
|
+
return Ka(lh, t2, e2);
|
|
3360
|
+
}, lh.FACE_LANDMARKS_LIPS = th, lh.FACE_LANDMARKS_LEFT_EYE = eh, lh.FACE_LANDMARKS_LEFT_EYEBROW = nh, lh.FACE_LANDMARKS_LEFT_IRIS = rh, lh.FACE_LANDMARKS_RIGHT_EYE = ih, lh.FACE_LANDMARKS_RIGHT_EYEBROW = sh, lh.FACE_LANDMARKS_RIGHT_IRIS = oh, lh.FACE_LANDMARKS_FACE_OVAL = ah, lh.FACE_LANDMARKS_CONTOURS = hh, lh.FACE_LANDMARKS_TESSELATION = ch;
|
|
3361
|
+
var fh = class extends Za {
|
|
3362
|
+
constructor(t2, e2) {
|
|
3363
|
+
super(new za(t2, e2), "image_in", "norm_rect", true), yn(t2 = this.j = new Vs(), 0, 1, e2 = new xs());
|
|
3364
|
+
}
|
|
3365
|
+
get baseOptions() {
|
|
3366
|
+
return pn(this.j, xs, 1);
|
|
3367
|
+
}
|
|
3368
|
+
set baseOptions(t2) {
|
|
3369
|
+
yn(this.j, 0, 1, t2);
|
|
3370
|
+
}
|
|
3371
|
+
o(t2) {
|
|
3372
|
+
return super.l(t2);
|
|
3373
|
+
}
|
|
3374
|
+
Ra(t2, e2, n2) {
|
|
3375
|
+
const r2 = "function" != typeof e2 ? e2 : {};
|
|
3376
|
+
if (this.h = "function" == typeof e2 ? e2 : n2, $a(this, t2, r2 ?? {}), !this.h) return this.s;
|
|
3377
|
+
}
|
|
3378
|
+
m() {
|
|
3379
|
+
var t2 = new $i();
|
|
3380
|
+
Ki(t2, "image_in"), Ki(t2, "norm_rect"), Yi(t2, "stylized_image");
|
|
3381
|
+
const e2 = new Ci();
|
|
3382
|
+
er(e2, Xs, this.j);
|
|
3383
|
+
const n2 = new Vi();
|
|
3384
|
+
Bi(n2, "mediapipe.tasks.vision.face_stylizer.FaceStylizerGraph"), Gi(n2, "IMAGE:image_in"), Gi(n2, "NORM_RECT:norm_rect"), ji(n2, "STYLIZED_IMAGE:stylized_image"), n2.o(e2), zi(t2, n2), this.g.W("stylized_image", ((t3, e3) => {
|
|
3385
|
+
var n3 = !this.h, r2 = t3.data, i2 = t3.width;
|
|
3386
|
+
const s2 = i2 * (t3 = t3.height);
|
|
3387
|
+
if (r2 instanceof Uint8Array) if (r2.length === 3 * s2) {
|
|
3388
|
+
const e4 = new Uint8ClampedArray(4 * s2);
|
|
3389
|
+
for (let t4 = 0; t4 < s2; ++t4) e4[4 * t4] = r2[3 * t4], e4[4 * t4 + 1] = r2[3 * t4 + 1], e4[4 * t4 + 2] = r2[3 * t4 + 2], e4[4 * t4 + 3] = 255;
|
|
3390
|
+
r2 = new ImageData(e4, i2, t3);
|
|
3391
|
+
} else {
|
|
3392
|
+
if (r2.length !== 4 * s2) throw Error("Unsupported channel count: " + r2.length / s2);
|
|
3393
|
+
r2 = new ImageData(new Uint8ClampedArray(r2.buffer, r2.byteOffset, r2.length), i2, t3);
|
|
3394
|
+
}
|
|
3395
|
+
else if (!(r2 instanceof WebGLTexture)) throw Error(`Unsupported format: ${r2.constructor.name}`);
|
|
3396
|
+
i2 = new ja([r2], false, false, this.g.i.canvas, this.R, i2, t3), this.s = n3 = n3 ? i2.clone() : i2, this.h && this.h(n3), $o(this, e3);
|
|
3397
|
+
})), this.g.attachEmptyPacketListener("stylized_image", ((t3) => {
|
|
3398
|
+
this.s = null, this.h && this.h(null), $o(this, t3);
|
|
3399
|
+
})), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3400
|
+
}
|
|
3401
|
+
};
|
|
3402
|
+
fh.prototype.stylize = fh.prototype.Ra, fh.prototype.setOptions = fh.prototype.o, fh.createFromModelPath = function(t2, e2) {
|
|
3403
|
+
return Ka(fh, t2, { baseOptions: { modelAssetPath: e2 } });
|
|
3404
|
+
}, fh.createFromModelBuffer = function(t2, e2) {
|
|
3405
|
+
return Ka(fh, t2, { baseOptions: { modelAssetBuffer: e2 } });
|
|
3406
|
+
}, fh.createFromOptions = function(t2, e2) {
|
|
3407
|
+
return Ka(fh, t2, e2);
|
|
3408
|
+
};
|
|
3409
|
+
var dh = Xa([0, 1], [1, 2], [2, 3], [3, 4], [0, 5], [5, 6], [6, 7], [7, 8], [5, 9], [9, 10], [10, 11], [11, 12], [9, 13], [13, 14], [14, 15], [15, 16], [13, 17], [0, 17], [17, 18], [18, 19], [19, 20]);
|
|
3410
|
+
function ph(t2) {
|
|
3411
|
+
t2.gestures = [], t2.landmarks = [], t2.worldLandmarks = [], t2.handedness = [];
|
|
3412
|
+
}
|
|
3413
|
+
function gh(t2) {
|
|
3414
|
+
return 0 === t2.gestures.length ? { gestures: [], landmarks: [], worldLandmarks: [], handedness: [], handednesses: [] } : { gestures: t2.gestures, landmarks: t2.landmarks, worldLandmarks: t2.worldLandmarks, handedness: t2.handedness, handednesses: t2.handedness };
|
|
3415
|
+
}
|
|
3416
|
+
function mh(t2, e2 = true) {
|
|
3417
|
+
const n2 = [];
|
|
3418
|
+
for (const i2 of t2) {
|
|
3419
|
+
var r2 = es(i2);
|
|
3420
|
+
t2 = [];
|
|
3421
|
+
for (const n3 of r2.g()) r2 = e2 && null != An(n3, 1) ? Tn(An(n3, 1), 0) : -1, t2.push({ score: bn(n3, 2) ?? 0, index: r2, categoryName: kn(n3, 3) ?? "", displayName: kn(n3, 4) ?? "" });
|
|
3422
|
+
n2.push(t2);
|
|
3423
|
+
}
|
|
3424
|
+
return n2;
|
|
3425
|
+
}
|
|
3426
|
+
var yh = class extends Za {
|
|
3427
|
+
constructor(t2, e2) {
|
|
3428
|
+
super(new za(t2, e2), "image_in", "norm_rect", false), this.gestures = [], this.landmarks = [], this.worldLandmarks = [], this.handedness = [], yn(t2 = this.j = new Js(), 0, 1, e2 = new xs()), this.s = new qs(), yn(this.j, 0, 2, this.s), this.C = new $s(), yn(this.s, 0, 3, this.C), this.v = new Ys(), yn(this.s, 0, 2, this.v), this.h = new Ks(), yn(this.j, 0, 3, this.h), Ln(this.v, 2, 0.5), Ln(this.s, 4, 0.5), Ln(this.C, 2, 0.5);
|
|
3429
|
+
}
|
|
3430
|
+
get baseOptions() {
|
|
3431
|
+
return pn(this.j, xs, 1);
|
|
3432
|
+
}
|
|
3433
|
+
set baseOptions(t2) {
|
|
3434
|
+
yn(this.j, 0, 1, t2);
|
|
3435
|
+
}
|
|
3436
|
+
o(t2) {
|
|
3437
|
+
if (xn(this.v, 3, t2.numHands ?? 1), "minHandDetectionConfidence" in t2 && Ln(this.v, 2, t2.minHandDetectionConfidence ?? 0.5), "minTrackingConfidence" in t2 && Ln(this.s, 4, t2.minTrackingConfidence ?? 0.5), "minHandPresenceConfidence" in t2 && Ln(this.C, 2, t2.minHandPresenceConfidence ?? 0.5), t2.cannedGesturesClassifierOptions) {
|
|
3438
|
+
var e2 = new Hs(), n2 = e2, r2 = So(t2.cannedGesturesClassifierOptions, pn(this.h, Hs, 3)?.h());
|
|
3439
|
+
yn(n2, 0, 2, r2), yn(this.h, 0, 3, e2);
|
|
3440
|
+
} else void 0 === t2.cannedGesturesClassifierOptions && pn(this.h, Hs, 3)?.g();
|
|
3441
|
+
return t2.customGesturesClassifierOptions ? (yn(n2 = e2 = new Hs(), 0, 2, r2 = So(t2.customGesturesClassifierOptions, pn(this.h, Hs, 4)?.h())), yn(this.h, 0, 4, e2)) : void 0 === t2.customGesturesClassifierOptions && pn(this.h, Hs, 4)?.g(), this.l(t2);
|
|
3442
|
+
}
|
|
3443
|
+
Ma(t2, e2) {
|
|
3444
|
+
return ph(this), $a(this, t2, e2), gh(this);
|
|
3445
|
+
}
|
|
3446
|
+
Na(t2, e2, n2) {
|
|
3447
|
+
return ph(this), qa(this, t2, n2, e2), gh(this);
|
|
3448
|
+
}
|
|
3449
|
+
m() {
|
|
3450
|
+
var t2 = new $i();
|
|
3451
|
+
Ki(t2, "image_in"), Ki(t2, "norm_rect"), Yi(t2, "hand_gestures"), Yi(t2, "hand_landmarks"), Yi(t2, "world_hand_landmarks"), Yi(t2, "handedness");
|
|
3452
|
+
const e2 = new Ci();
|
|
3453
|
+
er(e2, io, this.j);
|
|
3454
|
+
const n2 = new Vi();
|
|
3455
|
+
Bi(n2, "mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"), Gi(n2, "IMAGE:image_in"), Gi(n2, "NORM_RECT:norm_rect"), ji(n2, "HAND_GESTURES:hand_gestures"), ji(n2, "LANDMARKS:hand_landmarks"), ji(n2, "WORLD_LANDMARKS:world_hand_landmarks"), ji(n2, "HANDEDNESS:handedness"), n2.o(e2), zi(t2, n2), this.g.attachProtoVectorListener("hand_landmarks", ((t3, e3) => {
|
|
3456
|
+
for (const e4 of t3) {
|
|
3457
|
+
t3 = cs(e4);
|
|
3458
|
+
const n3 = [];
|
|
3459
|
+
for (const e5 of mn(t3, hs, 1)) n3.push({ x: bn(e5, 1) ?? 0, y: bn(e5, 2) ?? 0, z: bn(e5, 3) ?? 0, visibility: bn(e5, 4) ?? 0 });
|
|
3460
|
+
this.landmarks.push(n3);
|
|
3461
|
+
}
|
|
3462
|
+
$o(this, e3);
|
|
3463
|
+
})), this.g.attachEmptyPacketListener("hand_landmarks", ((t3) => {
|
|
3464
|
+
$o(this, t3);
|
|
3465
|
+
})), this.g.attachProtoVectorListener("world_hand_landmarks", ((t3, e3) => {
|
|
3466
|
+
for (const e4 of t3) {
|
|
3467
|
+
t3 = as(e4);
|
|
3468
|
+
const n3 = [];
|
|
3469
|
+
for (const e5 of mn(t3, os, 1)) n3.push({ x: bn(e5, 1) ?? 0, y: bn(e5, 2) ?? 0, z: bn(e5, 3) ?? 0, visibility: bn(e5, 4) ?? 0 });
|
|
3470
|
+
this.worldLandmarks.push(n3);
|
|
3471
|
+
}
|
|
3472
|
+
$o(this, e3);
|
|
3473
|
+
})), this.g.attachEmptyPacketListener("world_hand_landmarks", ((t3) => {
|
|
3474
|
+
$o(this, t3);
|
|
3475
|
+
})), this.g.attachProtoVectorListener("hand_gestures", ((t3, e3) => {
|
|
3476
|
+
this.gestures.push(...mh(t3, false)), $o(this, e3);
|
|
3477
|
+
})), this.g.attachEmptyPacketListener("hand_gestures", ((t3) => {
|
|
3478
|
+
$o(this, t3);
|
|
3479
|
+
})), this.g.attachProtoVectorListener("handedness", ((t3, e3) => {
|
|
3480
|
+
this.handedness.push(...mh(t3)), $o(this, e3);
|
|
3481
|
+
})), this.g.attachEmptyPacketListener("handedness", ((t3) => {
|
|
3482
|
+
$o(this, t3);
|
|
3483
|
+
})), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3484
|
+
}
|
|
3485
|
+
};
|
|
3486
|
+
function _h(t2) {
|
|
3487
|
+
return { landmarks: t2.landmarks, worldLandmarks: t2.worldLandmarks, handednesses: t2.handedness, handedness: t2.handedness };
|
|
3488
|
+
}
|
|
3489
|
+
yh.prototype.recognizeForVideo = yh.prototype.Na, yh.prototype.recognize = yh.prototype.Ma, yh.prototype.setOptions = yh.prototype.o, yh.createFromModelPath = function(t2, e2) {
|
|
3490
|
+
return Ka(yh, t2, { baseOptions: { modelAssetPath: e2 } });
|
|
3491
|
+
}, yh.createFromModelBuffer = function(t2, e2) {
|
|
3492
|
+
return Ka(yh, t2, { baseOptions: { modelAssetBuffer: e2 } });
|
|
3493
|
+
}, yh.createFromOptions = function(t2, e2) {
|
|
3494
|
+
return Ka(yh, t2, e2);
|
|
3495
|
+
}, yh.HAND_CONNECTIONS = dh;
|
|
3496
|
+
var vh = class extends Za {
|
|
3497
|
+
constructor(t2, e2) {
|
|
3498
|
+
super(new za(t2, e2), "image_in", "norm_rect", false), this.landmarks = [], this.worldLandmarks = [], this.handedness = [], yn(t2 = this.h = new qs(), 0, 1, e2 = new xs()), this.s = new $s(), yn(this.h, 0, 3, this.s), this.j = new Ys(), yn(this.h, 0, 2, this.j), xn(this.j, 3, 1), Ln(this.j, 2, 0.5), Ln(this.s, 2, 0.5), Ln(this.h, 4, 0.5);
|
|
3499
|
+
}
|
|
3500
|
+
get baseOptions() {
|
|
3501
|
+
return pn(this.h, xs, 1);
|
|
3502
|
+
}
|
|
3503
|
+
set baseOptions(t2) {
|
|
3504
|
+
yn(this.h, 0, 1, t2);
|
|
3505
|
+
}
|
|
3506
|
+
o(t2) {
|
|
3507
|
+
return "numHands" in t2 && xn(this.j, 3, t2.numHands ?? 1), "minHandDetectionConfidence" in t2 && Ln(this.j, 2, t2.minHandDetectionConfidence ?? 0.5), "minTrackingConfidence" in t2 && Ln(this.h, 4, t2.minTrackingConfidence ?? 0.5), "minHandPresenceConfidence" in t2 && Ln(this.s, 2, t2.minHandPresenceConfidence ?? 0.5), this.l(t2);
|
|
3508
|
+
}
|
|
3509
|
+
D(t2, e2) {
|
|
3510
|
+
return this.landmarks = [], this.worldLandmarks = [], this.handedness = [], $a(this, t2, e2), _h(this);
|
|
3511
|
+
}
|
|
3512
|
+
F(t2, e2, n2) {
|
|
3513
|
+
return this.landmarks = [], this.worldLandmarks = [], this.handedness = [], qa(this, t2, n2, e2), _h(this);
|
|
3514
|
+
}
|
|
3515
|
+
m() {
|
|
3516
|
+
var t2 = new $i();
|
|
3517
|
+
Ki(t2, "image_in"), Ki(t2, "norm_rect"), Yi(t2, "hand_landmarks"), Yi(t2, "world_hand_landmarks"), Yi(t2, "handedness");
|
|
3518
|
+
const e2 = new Ci();
|
|
3519
|
+
er(e2, ro, this.h);
|
|
3520
|
+
const n2 = new Vi();
|
|
3521
|
+
Bi(n2, "mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"), Gi(n2, "IMAGE:image_in"), Gi(n2, "NORM_RECT:norm_rect"), ji(n2, "LANDMARKS:hand_landmarks"), ji(n2, "WORLD_LANDMARKS:world_hand_landmarks"), ji(n2, "HANDEDNESS:handedness"), n2.o(e2), zi(t2, n2), this.g.attachProtoVectorListener("hand_landmarks", ((t3, e3) => {
|
|
3522
|
+
for (const e4 of t3) t3 = cs(e4), this.landmarks.push(Ro(t3));
|
|
3523
|
+
$o(this, e3);
|
|
3524
|
+
})), this.g.attachEmptyPacketListener("hand_landmarks", ((t3) => {
|
|
3525
|
+
$o(this, t3);
|
|
3526
|
+
})), this.g.attachProtoVectorListener("world_hand_landmarks", ((t3, e3) => {
|
|
3527
|
+
for (const e4 of t3) t3 = as(e4), this.worldLandmarks.push(Fo(t3));
|
|
3528
|
+
$o(this, e3);
|
|
3529
|
+
})), this.g.attachEmptyPacketListener("world_hand_landmarks", ((t3) => {
|
|
3530
|
+
$o(this, t3);
|
|
3531
|
+
})), this.g.attachProtoVectorListener("handedness", ((t3, e3) => {
|
|
3532
|
+
var n3 = this.handedness, r2 = n3.push;
|
|
3533
|
+
const i2 = [];
|
|
3534
|
+
for (const e4 of t3) {
|
|
3535
|
+
t3 = es(e4);
|
|
3536
|
+
const n4 = [];
|
|
3537
|
+
for (const e5 of t3.g()) n4.push({ score: bn(e5, 2) ?? 0, index: Tn(An(e5, 1), 0) ?? -1, categoryName: kn(e5, 3) ?? "", displayName: kn(e5, 4) ?? "" });
|
|
3538
|
+
i2.push(n4);
|
|
3539
|
+
}
|
|
3540
|
+
r2.call(n3, ...i2), $o(this, e3);
|
|
3541
|
+
})), this.g.attachEmptyPacketListener("handedness", ((t3) => {
|
|
3542
|
+
$o(this, t3);
|
|
3543
|
+
})), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3544
|
+
}
|
|
3545
|
+
};
|
|
3546
|
+
vh.prototype.detectForVideo = vh.prototype.F, vh.prototype.detect = vh.prototype.D, vh.prototype.setOptions = vh.prototype.o, vh.createFromModelPath = function(t2, e2) {
|
|
3547
|
+
return Ka(vh, t2, { baseOptions: { modelAssetPath: e2 } });
|
|
3548
|
+
}, vh.createFromModelBuffer = function(t2, e2) {
|
|
3549
|
+
return Ka(vh, t2, { baseOptions: { modelAssetBuffer: e2 } });
|
|
3550
|
+
}, vh.createFromOptions = function(t2, e2) {
|
|
3551
|
+
return Ka(vh, t2, e2);
|
|
3552
|
+
}, vh.HAND_CONNECTIONS = dh;
|
|
3553
|
+
var Eh = Xa([0, 1], [1, 2], [2, 3], [3, 7], [0, 4], [4, 5], [5, 6], [6, 8], [9, 10], [11, 12], [11, 13], [13, 15], [15, 17], [15, 19], [15, 21], [17, 19], [12, 14], [14, 16], [16, 18], [16, 20], [16, 22], [18, 20], [11, 23], [12, 24], [23, 24], [23, 25], [24, 26], [25, 27], [26, 28], [27, 29], [28, 30], [29, 31], [30, 32], [27, 31], [28, 32]);
|
|
3554
|
+
function wh(t2) {
|
|
3555
|
+
t2.h = { faceLandmarks: [], faceBlendshapes: [], poseLandmarks: [], poseWorldLandmarks: [], poseSegmentationMasks: [], leftHandLandmarks: [], leftHandWorldLandmarks: [], rightHandLandmarks: [], rightHandWorldLandmarks: [] };
|
|
3556
|
+
}
|
|
3557
|
+
function Th(t2) {
|
|
3558
|
+
try {
|
|
3559
|
+
if (!t2.C) return t2.h;
|
|
3560
|
+
t2.C(t2.h);
|
|
3561
|
+
} finally {
|
|
3562
|
+
Zo(t2);
|
|
3563
|
+
}
|
|
3564
|
+
}
|
|
3565
|
+
function Ah(t2, e2) {
|
|
3566
|
+
t2 = cs(t2), e2.push(Ro(t2));
|
|
3567
|
+
}
|
|
3568
|
+
var bh = class extends Za {
|
|
3569
|
+
constructor(t2, e2) {
|
|
3570
|
+
super(new za(t2, e2), "input_frames_image", null, false), this.h = { faceLandmarks: [], faceBlendshapes: [], poseLandmarks: [], poseWorldLandmarks: [], poseSegmentationMasks: [], leftHandLandmarks: [], leftHandWorldLandmarks: [], rightHandLandmarks: [], rightHandWorldLandmarks: [] }, this.outputPoseSegmentationMasks = this.outputFaceBlendshapes = false, yn(t2 = this.j = new ho(), 0, 1, e2 = new xs()), this.K = new $s(), yn(this.j, 0, 2, this.K), this.ca = new so(), yn(this.j, 0, 3, this.ca), this.s = new Fs(), yn(this.j, 0, 4, this.s), this.I = new Us(), yn(this.j, 0, 5, this.I), this.v = new oo(), yn(this.j, 0, 6, this.v), this.L = new ao(), yn(this.j, 0, 7, this.L), Ln(this.s, 2, 0.5), Ln(this.s, 3, 0.3), Ln(this.I, 2, 0.5), Ln(this.v, 2, 0.5), Ln(this.v, 3, 0.3), Ln(this.L, 2, 0.5), Ln(this.K, 2, 0.5);
|
|
3571
|
+
}
|
|
3572
|
+
get baseOptions() {
|
|
3573
|
+
return pn(this.j, xs, 1);
|
|
3574
|
+
}
|
|
3575
|
+
set baseOptions(t2) {
|
|
3576
|
+
yn(this.j, 0, 1, t2);
|
|
3577
|
+
}
|
|
3578
|
+
o(t2) {
|
|
3579
|
+
return "minFaceDetectionConfidence" in t2 && Ln(this.s, 2, t2.minFaceDetectionConfidence ?? 0.5), "minFaceSuppressionThreshold" in t2 && Ln(this.s, 3, t2.minFaceSuppressionThreshold ?? 0.3), "minFacePresenceConfidence" in t2 && Ln(this.I, 2, t2.minFacePresenceConfidence ?? 0.5), "outputFaceBlendshapes" in t2 && (this.outputFaceBlendshapes = !!t2.outputFaceBlendshapes), "minPoseDetectionConfidence" in t2 && Ln(this.v, 2, t2.minPoseDetectionConfidence ?? 0.5), "minPoseSuppressionThreshold" in t2 && Ln(this.v, 3, t2.minPoseSuppressionThreshold ?? 0.3), "minPosePresenceConfidence" in t2 && Ln(this.L, 2, t2.minPosePresenceConfidence ?? 0.5), "outputPoseSegmentationMasks" in t2 && (this.outputPoseSegmentationMasks = !!t2.outputPoseSegmentationMasks), "minHandLandmarksConfidence" in t2 && Ln(this.K, 2, t2.minHandLandmarksConfidence ?? 0.5), this.l(t2);
|
|
3580
|
+
}
|
|
3581
|
+
D(t2, e2, n2) {
|
|
3582
|
+
const r2 = "function" != typeof e2 ? e2 : {};
|
|
3583
|
+
return this.C = "function" == typeof e2 ? e2 : n2, wh(this), $a(this, t2, r2), Th(this);
|
|
3584
|
+
}
|
|
3585
|
+
F(t2, e2, n2, r2) {
|
|
3586
|
+
const i2 = "function" != typeof n2 ? n2 : {};
|
|
3587
|
+
return this.C = "function" == typeof n2 ? n2 : r2, wh(this), qa(this, t2, i2, e2), Th(this);
|
|
3588
|
+
}
|
|
3589
|
+
m() {
|
|
3590
|
+
var t2 = new $i();
|
|
3591
|
+
Ki(t2, "input_frames_image"), Yi(t2, "pose_landmarks"), Yi(t2, "pose_world_landmarks"), Yi(t2, "face_landmarks"), Yi(t2, "left_hand_landmarks"), Yi(t2, "left_hand_world_landmarks"), Yi(t2, "right_hand_landmarks"), Yi(t2, "right_hand_world_landmarks");
|
|
3592
|
+
const e2 = new Ci(), n2 = new ki();
|
|
3593
|
+
an(n2, 1, ne("type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"), ""), (function(t3, e3) {
|
|
3594
|
+
if (null != e3) if (Array.isArray(e3)) $e(t3, 2, De(e3, Ge, void 0, void 0, false));
|
|
3595
|
+
else {
|
|
3596
|
+
if (!("string" == typeof e3 || e3 instanceof D || I(e3))) throw Error("invalid value in Any.value field: " + e3 + " expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");
|
|
3597
|
+
an(t3, 2, lt(e3, false, false), N());
|
|
3598
|
+
}
|
|
3599
|
+
})(n2, this.j.g());
|
|
3600
|
+
const r2 = new Vi();
|
|
3601
|
+
Bi(r2, "mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"), wn(r2, 8, ki, n2), Gi(r2, "IMAGE:input_frames_image"), ji(r2, "POSE_LANDMARKS:pose_landmarks"), ji(r2, "POSE_WORLD_LANDMARKS:pose_world_landmarks"), ji(r2, "FACE_LANDMARKS:face_landmarks"), ji(r2, "LEFT_HAND_LANDMARKS:left_hand_landmarks"), ji(r2, "LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"), ji(r2, "RIGHT_HAND_LANDMARKS:right_hand_landmarks"), ji(r2, "RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"), r2.o(e2), zi(t2, r2), qo(this, t2), this.g.attachProtoListener("pose_landmarks", ((t3, e3) => {
|
|
3602
|
+
Ah(t3, this.h.poseLandmarks), $o(this, e3);
|
|
3603
|
+
})), this.g.attachEmptyPacketListener("pose_landmarks", ((t3) => {
|
|
3604
|
+
$o(this, t3);
|
|
3605
|
+
})), this.g.attachProtoListener("pose_world_landmarks", ((t3, e3) => {
|
|
3606
|
+
var n3 = this.h.poseWorldLandmarks;
|
|
3607
|
+
t3 = as(t3), n3.push(Fo(t3)), $o(this, e3);
|
|
3608
|
+
})), this.g.attachEmptyPacketListener("pose_world_landmarks", ((t3) => {
|
|
3609
|
+
$o(this, t3);
|
|
3610
|
+
})), this.outputPoseSegmentationMasks && (ji(r2, "POSE_SEGMENTATION_MASK:pose_segmentation_mask"), Jo(this, "pose_segmentation_mask"), this.g.W("pose_segmentation_mask", ((t3, e3) => {
|
|
3611
|
+
this.h.poseSegmentationMasks = [Ja(this, t3, true, !this.C)], $o(this, e3);
|
|
3612
|
+
})), this.g.attachEmptyPacketListener("pose_segmentation_mask", ((t3) => {
|
|
3613
|
+
this.h.poseSegmentationMasks = [], $o(this, t3);
|
|
3614
|
+
}))), this.g.attachProtoListener("face_landmarks", ((t3, e3) => {
|
|
3615
|
+
Ah(t3, this.h.faceLandmarks), $o(this, e3);
|
|
3616
|
+
})), this.g.attachEmptyPacketListener("face_landmarks", ((t3) => {
|
|
3617
|
+
$o(this, t3);
|
|
3618
|
+
})), this.outputFaceBlendshapes && (Yi(t2, "extra_blendshapes"), ji(r2, "FACE_BLENDSHAPES:extra_blendshapes"), this.g.attachProtoListener("extra_blendshapes", ((t3, e3) => {
|
|
3619
|
+
var n3 = this.h.faceBlendshapes;
|
|
3620
|
+
this.outputFaceBlendshapes && (t3 = es(t3), n3.push(xo(t3.g() ?? []))), $o(this, e3);
|
|
3621
|
+
})), this.g.attachEmptyPacketListener("extra_blendshapes", ((t3) => {
|
|
3622
|
+
$o(this, t3);
|
|
3623
|
+
}))), this.g.attachProtoListener("left_hand_landmarks", ((t3, e3) => {
|
|
3624
|
+
Ah(t3, this.h.leftHandLandmarks), $o(this, e3);
|
|
3625
|
+
})), this.g.attachEmptyPacketListener("left_hand_landmarks", ((t3) => {
|
|
3626
|
+
$o(this, t3);
|
|
3627
|
+
})), this.g.attachProtoListener("left_hand_world_landmarks", ((t3, e3) => {
|
|
3628
|
+
var n3 = this.h.leftHandWorldLandmarks;
|
|
3629
|
+
t3 = as(t3), n3.push(Fo(t3)), $o(this, e3);
|
|
3630
|
+
})), this.g.attachEmptyPacketListener("left_hand_world_landmarks", ((t3) => {
|
|
3631
|
+
$o(this, t3);
|
|
3632
|
+
})), this.g.attachProtoListener("right_hand_landmarks", ((t3, e3) => {
|
|
3633
|
+
Ah(t3, this.h.rightHandLandmarks), $o(this, e3);
|
|
3634
|
+
})), this.g.attachEmptyPacketListener("right_hand_landmarks", ((t3) => {
|
|
3635
|
+
$o(this, t3);
|
|
3636
|
+
})), this.g.attachProtoListener("right_hand_world_landmarks", ((t3, e3) => {
|
|
3637
|
+
var n3 = this.h.rightHandWorldLandmarks;
|
|
3638
|
+
t3 = as(t3), n3.push(Fo(t3)), $o(this, e3);
|
|
3639
|
+
})), this.g.attachEmptyPacketListener("right_hand_world_landmarks", ((t3) => {
|
|
3640
|
+
$o(this, t3);
|
|
3641
|
+
})), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3642
|
+
}
|
|
3643
|
+
};
|
|
3644
|
+
bh.prototype.detectForVideo = bh.prototype.F, bh.prototype.detect = bh.prototype.D, bh.prototype.setOptions = bh.prototype.o, bh.createFromModelPath = function(t2, e2) {
|
|
3645
|
+
return Ka(bh, t2, { baseOptions: { modelAssetPath: e2 } });
|
|
3646
|
+
}, bh.createFromModelBuffer = function(t2, e2) {
|
|
3647
|
+
return Ka(bh, t2, { baseOptions: { modelAssetBuffer: e2 } });
|
|
3648
|
+
}, bh.createFromOptions = function(t2, e2) {
|
|
3649
|
+
return Ka(bh, t2, e2);
|
|
3650
|
+
}, bh.HAND_CONNECTIONS = dh, bh.POSE_CONNECTIONS = Eh, bh.FACE_LANDMARKS_LIPS = th, bh.FACE_LANDMARKS_LEFT_EYE = eh, bh.FACE_LANDMARKS_LEFT_EYEBROW = nh, bh.FACE_LANDMARKS_LEFT_IRIS = rh, bh.FACE_LANDMARKS_RIGHT_EYE = ih, bh.FACE_LANDMARKS_RIGHT_EYEBROW = sh, bh.FACE_LANDMARKS_RIGHT_IRIS = oh, bh.FACE_LANDMARKS_FACE_OVAL = ah, bh.FACE_LANDMARKS_CONTOURS = hh, bh.FACE_LANDMARKS_TESSELATION = ch;
|
|
3651
|
+
var kh = class extends Za {
|
|
3652
|
+
constructor(t2, e2) {
|
|
3653
|
+
super(new za(t2, e2), "input_image", "norm_rect", true), this.j = { classifications: [] }, yn(t2 = this.h = new lo(), 0, 1, e2 = new xs());
|
|
3654
|
+
}
|
|
3655
|
+
get baseOptions() {
|
|
3656
|
+
return pn(this.h, xs, 1);
|
|
3657
|
+
}
|
|
3658
|
+
set baseOptions(t2) {
|
|
3659
|
+
yn(this.h, 0, 1, t2);
|
|
3660
|
+
}
|
|
3661
|
+
o(t2) {
|
|
3662
|
+
return yn(this.h, 0, 2, So(t2, pn(this.h, Es, 2))), this.l(t2);
|
|
3663
|
+
}
|
|
3664
|
+
wa(t2, e2) {
|
|
3665
|
+
return this.j = { classifications: [] }, $a(this, t2, e2), this.j;
|
|
3666
|
+
}
|
|
3667
|
+
xa(t2, e2, n2) {
|
|
3668
|
+
return this.j = { classifications: [] }, qa(this, t2, n2, e2), this.j;
|
|
3669
|
+
}
|
|
3670
|
+
m() {
|
|
3671
|
+
var t2 = new $i();
|
|
3672
|
+
Ki(t2, "input_image"), Ki(t2, "norm_rect"), Yi(t2, "classifications");
|
|
3673
|
+
const e2 = new Ci();
|
|
3674
|
+
er(e2, fo, this.h);
|
|
3675
|
+
const n2 = new Vi();
|
|
3676
|
+
Bi(n2, "mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"), Gi(n2, "IMAGE:input_image"), Gi(n2, "NORM_RECT:norm_rect"), ji(n2, "CLASSIFICATIONS:classifications"), n2.o(e2), zi(t2, n2), this.g.attachProtoListener("classifications", ((t3, e3) => {
|
|
3677
|
+
this.j = (function(t4) {
|
|
3678
|
+
const e4 = { classifications: mn(t4, ds, 1).map(((t5) => xo(pn(t5, Qi, 4)?.g() ?? [], Tn(An(t5, 2), 0), kn(t5, 3)))) };
|
|
3679
|
+
return null != Qt(ze(t4, 2)) && (e4.timestampMs = Tn(Qt(ze(t4, 2)), 0)), e4;
|
|
3680
|
+
})(ps(t3)), $o(this, e3);
|
|
3681
|
+
})), this.g.attachEmptyPacketListener("classifications", ((t3) => {
|
|
3682
|
+
$o(this, t3);
|
|
3683
|
+
})), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3684
|
+
}
|
|
3685
|
+
};
|
|
3686
|
+
kh.prototype.classifyForVideo = kh.prototype.xa, kh.prototype.classify = kh.prototype.wa, kh.prototype.setOptions = kh.prototype.o, kh.createFromModelPath = function(t2, e2) {
|
|
3687
|
+
return Ka(kh, t2, { baseOptions: { modelAssetPath: e2 } });
|
|
3688
|
+
}, kh.createFromModelBuffer = function(t2, e2) {
|
|
3689
|
+
return Ka(kh, t2, { baseOptions: { modelAssetBuffer: e2 } });
|
|
3690
|
+
}, kh.createFromOptions = function(t2, e2) {
|
|
3691
|
+
return Ka(kh, t2, e2);
|
|
3692
|
+
};
|
|
3693
|
+
var Sh = class extends Za {
|
|
3694
|
+
constructor(t2, e2) {
|
|
3695
|
+
super(new za(t2, e2), "image_in", "norm_rect", true), this.h = new po(), this.embeddings = { embeddings: [] }, yn(t2 = this.h, 0, 1, e2 = new xs());
|
|
3696
|
+
}
|
|
3697
|
+
get baseOptions() {
|
|
3698
|
+
return pn(this.h, xs, 1);
|
|
3699
|
+
}
|
|
3700
|
+
set baseOptions(t2) {
|
|
3701
|
+
yn(this.h, 0, 1, t2);
|
|
3702
|
+
}
|
|
3703
|
+
o(t2) {
|
|
3704
|
+
var e2 = this.h, n2 = pn(this.h, Ts, 2);
|
|
3705
|
+
return n2 = n2 ? n2.clone() : new Ts(), void 0 !== t2.l2Normalize ? Sn(n2, 1, t2.l2Normalize) : "l2Normalize" in t2 && $e(n2, 1), void 0 !== t2.quantize ? Sn(n2, 2, t2.quantize) : "quantize" in t2 && $e(n2, 2), yn(e2, 0, 2, n2), this.l(t2);
|
|
3706
|
+
}
|
|
3707
|
+
Da(t2, e2) {
|
|
3708
|
+
return $a(this, t2, e2), this.embeddings;
|
|
3709
|
+
}
|
|
3710
|
+
Ea(t2, e2, n2) {
|
|
3711
|
+
return qa(this, t2, n2, e2), this.embeddings;
|
|
3712
|
+
}
|
|
3713
|
+
m() {
|
|
3714
|
+
var t2 = new $i();
|
|
3715
|
+
Ki(t2, "image_in"), Ki(t2, "norm_rect"), Yi(t2, "embeddings_out");
|
|
3716
|
+
const e2 = new Ci();
|
|
3717
|
+
er(e2, go, this.h);
|
|
3718
|
+
const n2 = new Vi();
|
|
3719
|
+
Bi(n2, "mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"), Gi(n2, "IMAGE:image_in"), Gi(n2, "NORM_RECT:norm_rect"), ji(n2, "EMBEDDINGS:embeddings_out"), n2.o(e2), zi(t2, n2), this.g.attachProtoListener("embeddings_out", ((t3, e3) => {
|
|
3720
|
+
t3 = vs(t3), this.embeddings = (function(t4) {
|
|
3721
|
+
return { embeddings: mn(t4, ys, 1).map(((t5) => {
|
|
3722
|
+
const e4 = { headIndex: Tn(An(t5, 3), 0) ?? -1, headName: kn(t5, 4) ?? "" };
|
|
3723
|
+
if (void 0 !== dn(t5, gs, hn(t5, 1))) t5 = en(t5 = pn(t5, gs, hn(t5, 1)), 1, Ht, tn()), e4.floatEmbedding = t5.slice();
|
|
3724
|
+
else {
|
|
3725
|
+
const n3 = new Uint8Array(0);
|
|
3726
|
+
e4.quantizedEmbedding = pn(t5, ms, hn(t5, 2))?.ra()?.ua() ?? n3;
|
|
3727
|
+
}
|
|
3728
|
+
return e4;
|
|
3729
|
+
})), timestampMs: Tn(Qt(ze(t4, 2)), 0) };
|
|
3730
|
+
})(t3), $o(this, e3);
|
|
3731
|
+
})), this.g.attachEmptyPacketListener("embeddings_out", ((t3) => {
|
|
3732
|
+
$o(this, t3);
|
|
3733
|
+
})), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3734
|
+
}
|
|
3735
|
+
};
|
|
3736
|
+
Sh.cosineSimilarity = function(t2, e2) {
|
|
3737
|
+
if (t2.floatEmbedding && e2.floatEmbedding) t2 = Io(t2.floatEmbedding, e2.floatEmbedding);
|
|
3738
|
+
else {
|
|
3739
|
+
if (!t2.quantizedEmbedding || !e2.quantizedEmbedding) throw Error("Cannot compute cosine similarity between quantized and float embeddings.");
|
|
3740
|
+
t2 = Io(Mo(t2.quantizedEmbedding), Mo(e2.quantizedEmbedding));
|
|
3741
|
+
}
|
|
3742
|
+
return t2;
|
|
3743
|
+
}, Sh.prototype.embedForVideo = Sh.prototype.Ea, Sh.prototype.embed = Sh.prototype.Da, Sh.prototype.setOptions = Sh.prototype.o, Sh.createFromModelPath = function(t2, e2) {
|
|
3744
|
+
return Ka(Sh, t2, { baseOptions: { modelAssetPath: e2 } });
|
|
3745
|
+
}, Sh.createFromModelBuffer = function(t2, e2) {
|
|
3746
|
+
return Ka(Sh, t2, { baseOptions: { modelAssetBuffer: e2 } });
|
|
3747
|
+
}, Sh.createFromOptions = function(t2, e2) {
|
|
3748
|
+
return Ka(Sh, t2, e2);
|
|
3749
|
+
};
|
|
3750
|
+
var xh = class {
|
|
3751
|
+
constructor(t2, e2, n2) {
|
|
3752
|
+
this.confidenceMasks = t2, this.categoryMask = e2, this.qualityScores = n2;
|
|
3753
|
+
}
|
|
3754
|
+
close() {
|
|
3755
|
+
this.confidenceMasks?.forEach(((t2) => {
|
|
3756
|
+
t2.close();
|
|
3757
|
+
})), this.categoryMask?.close();
|
|
3758
|
+
}
|
|
3759
|
+
};
|
|
3760
|
+
function Lh(t2) {
|
|
3761
|
+
t2.categoryMask = void 0, t2.confidenceMasks = void 0, t2.qualityScores = void 0;
|
|
3762
|
+
}
|
|
3763
|
+
function Rh(t2) {
|
|
3764
|
+
try {
|
|
3765
|
+
const e2 = new xh(t2.confidenceMasks, t2.categoryMask, t2.qualityScores);
|
|
3766
|
+
if (!t2.j) return e2;
|
|
3767
|
+
t2.j(e2);
|
|
3768
|
+
} finally {
|
|
3769
|
+
Zo(t2);
|
|
3770
|
+
}
|
|
3771
|
+
}
|
|
3772
|
+
xh.prototype.close = xh.prototype.close;
|
|
3773
|
+
var Fh = class extends Za {
|
|
3774
|
+
constructor(t2, e2) {
|
|
3775
|
+
super(new za(t2, e2), "image_in", "norm_rect", false), this.s = [], this.outputCategoryMask = false, this.outputConfidenceMasks = true, this.h = new Eo(), this.v = new mo(), yn(this.h, 0, 3, this.v), yn(t2 = this.h, 0, 1, e2 = new xs());
|
|
3776
|
+
}
|
|
3777
|
+
get baseOptions() {
|
|
3778
|
+
return pn(this.h, xs, 1);
|
|
3779
|
+
}
|
|
3780
|
+
set baseOptions(t2) {
|
|
3781
|
+
yn(this.h, 0, 1, t2);
|
|
3782
|
+
}
|
|
3783
|
+
o(t2) {
|
|
3784
|
+
return void 0 !== t2.displayNamesLocale ? $e(this.h, 2, ne(t2.displayNamesLocale)) : "displayNamesLocale" in t2 && $e(this.h, 2), "outputCategoryMask" in t2 && (this.outputCategoryMask = t2.outputCategoryMask ?? false), "outputConfidenceMasks" in t2 && (this.outputConfidenceMasks = t2.outputConfidenceMasks ?? true), super.l(t2);
|
|
3785
|
+
}
|
|
3786
|
+
J() {
|
|
3787
|
+
!(function(t2) {
|
|
3788
|
+
const e2 = mn(t2.ga(), Vi, 1).filter(((t3) => kn(t3, 1).includes("mediapipe.tasks.TensorsToSegmentationCalculator")));
|
|
3789
|
+
if (t2.s = [], e2.length > 1) throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");
|
|
3790
|
+
1 === e2.length && (pn(e2[0], Ci, 7)?.l()?.g() ?? /* @__PURE__ */ new Map()).forEach(((e3, n2) => {
|
|
3791
|
+
t2.s[Number(n2)] = kn(e3, 1);
|
|
3792
|
+
}));
|
|
3793
|
+
})(this);
|
|
3794
|
+
}
|
|
3795
|
+
ha(t2, e2, n2) {
|
|
3796
|
+
const r2 = "function" != typeof e2 ? e2 : {};
|
|
3797
|
+
return this.j = "function" == typeof e2 ? e2 : n2, Lh(this), $a(this, t2, r2), Rh(this);
|
|
3798
|
+
}
|
|
3799
|
+
Pa(t2, e2, n2, r2) {
|
|
3800
|
+
const i2 = "function" != typeof n2 ? n2 : {};
|
|
3801
|
+
return this.j = "function" == typeof n2 ? n2 : r2, Lh(this), qa(this, t2, i2, e2), Rh(this);
|
|
3802
|
+
}
|
|
3803
|
+
Ha() {
|
|
3804
|
+
return this.s;
|
|
3805
|
+
}
|
|
3806
|
+
m() {
|
|
3807
|
+
var t2 = new $i();
|
|
3808
|
+
Ki(t2, "image_in"), Ki(t2, "norm_rect");
|
|
3809
|
+
const e2 = new Ci();
|
|
3810
|
+
er(e2, wo, this.h);
|
|
3811
|
+
const n2 = new Vi();
|
|
3812
|
+
Bi(n2, "mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"), Gi(n2, "IMAGE:image_in"), Gi(n2, "NORM_RECT:norm_rect"), n2.o(e2), zi(t2, n2), qo(this, t2), this.outputConfidenceMasks && (Yi(t2, "confidence_masks"), ji(n2, "CONFIDENCE_MASKS:confidence_masks"), Jo(this, "confidence_masks"), this.g.fa("confidence_masks", ((t3, e3) => {
|
|
3813
|
+
this.confidenceMasks = t3.map(((t4) => Ja(this, t4, true, !this.j))), $o(this, e3);
|
|
3814
|
+
})), this.g.attachEmptyPacketListener("confidence_masks", ((t3) => {
|
|
3815
|
+
this.confidenceMasks = [], $o(this, t3);
|
|
3816
|
+
}))), this.outputCategoryMask && (Yi(t2, "category_mask"), ji(n2, "CATEGORY_MASK:category_mask"), Jo(this, "category_mask"), this.g.W("category_mask", ((t3, e3) => {
|
|
3817
|
+
this.categoryMask = Ja(this, t3, false, !this.j), $o(this, e3);
|
|
3818
|
+
})), this.g.attachEmptyPacketListener("category_mask", ((t3) => {
|
|
3819
|
+
this.categoryMask = void 0, $o(this, t3);
|
|
3820
|
+
}))), Yi(t2, "quality_scores"), ji(n2, "QUALITY_SCORES:quality_scores"), this.g.attachFloatVectorListener("quality_scores", ((t3, e3) => {
|
|
3821
|
+
this.qualityScores = t3, $o(this, e3);
|
|
3822
|
+
})), this.g.attachEmptyPacketListener("quality_scores", ((t3) => {
|
|
3823
|
+
this.categoryMask = void 0, $o(this, t3);
|
|
3824
|
+
})), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3825
|
+
}
|
|
3826
|
+
};
|
|
3827
|
+
Fh.prototype.getLabels = Fh.prototype.Ha, Fh.prototype.segmentForVideo = Fh.prototype.Pa, Fh.prototype.segment = Fh.prototype.ha, Fh.prototype.setOptions = Fh.prototype.o, Fh.createFromModelPath = function(t2, e2) {
|
|
3828
|
+
return Ka(Fh, t2, { baseOptions: { modelAssetPath: e2 } });
|
|
3829
|
+
}, Fh.createFromModelBuffer = function(t2, e2) {
|
|
3830
|
+
return Ka(Fh, t2, { baseOptions: { modelAssetBuffer: e2 } });
|
|
3831
|
+
}, Fh.createFromOptions = function(t2, e2) {
|
|
3832
|
+
return Ka(Fh, t2, e2);
|
|
3833
|
+
};
|
|
3834
|
+
var Mh = class {
|
|
3835
|
+
constructor(t2, e2, n2) {
|
|
3836
|
+
this.confidenceMasks = t2, this.categoryMask = e2, this.qualityScores = n2;
|
|
3837
|
+
}
|
|
3838
|
+
close() {
|
|
3839
|
+
this.confidenceMasks?.forEach(((t2) => {
|
|
3840
|
+
t2.close();
|
|
3841
|
+
})), this.categoryMask?.close();
|
|
3842
|
+
}
|
|
3843
|
+
};
|
|
3844
|
+
Mh.prototype.close = Mh.prototype.close;
|
|
3845
|
+
var Ih = class extends nr {
|
|
3846
|
+
constructor(t2) {
|
|
3847
|
+
super(t2);
|
|
3848
|
+
}
|
|
3849
|
+
};
|
|
3850
|
+
var Ph = [0, ai, -2];
|
|
3851
|
+
var Oh = [0, ti, -3, ui, ti, -1];
|
|
3852
|
+
var Ch = [0, Oh];
|
|
3853
|
+
var Nh = [0, Oh, ai, -1];
|
|
3854
|
+
var Uh = class extends nr {
|
|
3855
|
+
constructor(t2) {
|
|
3856
|
+
super(t2);
|
|
3857
|
+
}
|
|
3858
|
+
};
|
|
3859
|
+
var Dh = [0, ti, -1, ui];
|
|
3860
|
+
var Bh = class extends nr {
|
|
3861
|
+
constructor() {
|
|
3862
|
+
super();
|
|
3863
|
+
}
|
|
3864
|
+
};
|
|
3865
|
+
var Gh = class extends nr {
|
|
3866
|
+
constructor(t2) {
|
|
3867
|
+
super(t2);
|
|
3868
|
+
}
|
|
3869
|
+
};
|
|
3870
|
+
var jh = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 15];
|
|
3871
|
+
var Vh = class extends nr {
|
|
3872
|
+
constructor() {
|
|
3873
|
+
super();
|
|
3874
|
+
}
|
|
3875
|
+
};
|
|
3876
|
+
Vh.prototype.g = bi([0, Qr, [0, jh, yi, Oh, yi, [0, Oh, Ph], yi, Ch, yi, [0, Ch, Ph], yi, Dh, yi, [0, ti, -3, ui, Ei], yi, [0, ti, -3, ui], yi, [0, pi, ti, -2, ui, ai, ui, -1, 2, ti, Ph], yi, Nh, yi, [0, Nh, Ph], ti, Ph, pi, yi, [0, ti, -3, ui, Ph, -1], yi, [0, Qr, Dh]], pi, [0, pi, ai, -1, ui]]);
|
|
3877
|
+
var Xh = class extends Za {
|
|
3878
|
+
constructor(t2, e2) {
|
|
3879
|
+
super(new za(t2, e2), "image_in", "norm_rect_in", false), this.outputCategoryMask = false, this.outputConfidenceMasks = true, this.h = new Eo(), this.s = new mo(), yn(this.h, 0, 3, this.s), yn(t2 = this.h, 0, 1, e2 = new xs());
|
|
3880
|
+
}
|
|
3881
|
+
get baseOptions() {
|
|
3882
|
+
return pn(this.h, xs, 1);
|
|
3883
|
+
}
|
|
3884
|
+
set baseOptions(t2) {
|
|
3885
|
+
yn(this.h, 0, 1, t2);
|
|
3886
|
+
}
|
|
3887
|
+
o(t2) {
|
|
3888
|
+
return "outputCategoryMask" in t2 && (this.outputCategoryMask = t2.outputCategoryMask ?? false), "outputConfidenceMasks" in t2 && (this.outputConfidenceMasks = t2.outputConfidenceMasks ?? true), super.l(t2);
|
|
3889
|
+
}
|
|
3890
|
+
ha(t2, e2, n2, r2) {
|
|
3891
|
+
const i2 = "function" != typeof n2 ? n2 : {};
|
|
3892
|
+
this.j = "function" == typeof n2 ? n2 : r2, this.qualityScores = this.categoryMask = this.confidenceMasks = void 0, n2 = this.B + 1, r2 = new Vh();
|
|
3893
|
+
const s2 = new Gh();
|
|
3894
|
+
var o2 = new Ih();
|
|
3895
|
+
if (xn(o2, 1, 255), yn(s2, 0, 12, o2), e2.keypoint && e2.scribble) throw Error("Cannot provide both keypoint and scribble.");
|
|
3896
|
+
if (e2.keypoint) {
|
|
3897
|
+
var a2 = new Uh();
|
|
3898
|
+
Sn(a2, 3, true), Ln(a2, 1, e2.keypoint.x), Ln(a2, 2, e2.keypoint.y), _n(s2, 5, jh, a2);
|
|
3899
|
+
} else {
|
|
3900
|
+
if (!e2.scribble) throw Error("Must provide either a keypoint or a scribble.");
|
|
3901
|
+
for (a2 of (o2 = new Bh(), e2.scribble)) Sn(e2 = new Uh(), 3, true), Ln(e2, 1, a2.x), Ln(e2, 2, a2.y), wn(o2, 1, Uh, e2);
|
|
3902
|
+
_n(s2, 15, jh, o2);
|
|
3903
|
+
}
|
|
3904
|
+
wn(r2, 1, Gh, s2), this.g.addProtoToStream(r2.g(), "drishti.RenderData", "roi_in", n2), $a(this, t2, i2);
|
|
3905
|
+
t: {
|
|
3906
|
+
try {
|
|
3907
|
+
const t3 = new Mh(this.confidenceMasks, this.categoryMask, this.qualityScores);
|
|
3908
|
+
if (!this.j) {
|
|
3909
|
+
var h2 = t3;
|
|
3910
|
+
break t;
|
|
3911
|
+
}
|
|
3912
|
+
this.j(t3);
|
|
3913
|
+
} finally {
|
|
3914
|
+
Zo(this);
|
|
3915
|
+
}
|
|
3916
|
+
h2 = void 0;
|
|
3917
|
+
}
|
|
3918
|
+
return h2;
|
|
3919
|
+
}
|
|
3920
|
+
m() {
|
|
3921
|
+
var t2 = new $i();
|
|
3922
|
+
Ki(t2, "image_in"), Ki(t2, "roi_in"), Ki(t2, "norm_rect_in");
|
|
3923
|
+
const e2 = new Ci();
|
|
3924
|
+
er(e2, wo, this.h);
|
|
3925
|
+
const n2 = new Vi();
|
|
3926
|
+
Bi(n2, "mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraph"), Gi(n2, "IMAGE:image_in"), Gi(n2, "ROI:roi_in"), Gi(n2, "NORM_RECT:norm_rect_in"), n2.o(e2), zi(t2, n2), qo(this, t2), this.outputConfidenceMasks && (Yi(t2, "confidence_masks"), ji(n2, "CONFIDENCE_MASKS:confidence_masks"), Jo(this, "confidence_masks"), this.g.fa("confidence_masks", ((t3, e3) => {
|
|
3927
|
+
this.confidenceMasks = t3.map(((t4) => Ja(this, t4, true, !this.j))), $o(this, e3);
|
|
3928
|
+
})), this.g.attachEmptyPacketListener("confidence_masks", ((t3) => {
|
|
3929
|
+
this.confidenceMasks = [], $o(this, t3);
|
|
3930
|
+
}))), this.outputCategoryMask && (Yi(t2, "category_mask"), ji(n2, "CATEGORY_MASK:category_mask"), Jo(this, "category_mask"), this.g.W("category_mask", ((t3, e3) => {
|
|
3931
|
+
this.categoryMask = Ja(this, t3, false, !this.j), $o(this, e3);
|
|
3932
|
+
})), this.g.attachEmptyPacketListener("category_mask", ((t3) => {
|
|
3933
|
+
this.categoryMask = void 0, $o(this, t3);
|
|
3934
|
+
}))), Yi(t2, "quality_scores"), ji(n2, "QUALITY_SCORES:quality_scores"), this.g.attachFloatVectorListener("quality_scores", ((t3, e3) => {
|
|
3935
|
+
this.qualityScores = t3, $o(this, e3);
|
|
3936
|
+
})), this.g.attachEmptyPacketListener("quality_scores", ((t3) => {
|
|
3937
|
+
this.categoryMask = void 0, $o(this, t3);
|
|
3938
|
+
})), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3939
|
+
}
|
|
3940
|
+
};
|
|
3941
|
+
Xh.prototype.segment = Xh.prototype.ha, Xh.prototype.setOptions = Xh.prototype.o, Xh.createFromModelPath = function(t2, e2) {
|
|
3942
|
+
return Ka(Xh, t2, { baseOptions: { modelAssetPath: e2 } });
|
|
3943
|
+
}, Xh.createFromModelBuffer = function(t2, e2) {
|
|
3944
|
+
return Ka(Xh, t2, { baseOptions: { modelAssetBuffer: e2 } });
|
|
3945
|
+
}, Xh.createFromOptions = function(t2, e2) {
|
|
3946
|
+
return Ka(Xh, t2, e2);
|
|
3947
|
+
};
|
|
3948
|
+
var Hh = class extends Za {
|
|
3949
|
+
constructor(t2, e2) {
|
|
3950
|
+
super(new za(t2, e2), "input_frame_gpu", "norm_rect", false), this.j = { detections: [] }, yn(t2 = this.h = new To(), 0, 1, e2 = new xs());
|
|
3951
|
+
}
|
|
3952
|
+
get baseOptions() {
|
|
3953
|
+
return pn(this.h, xs, 1);
|
|
3954
|
+
}
|
|
3955
|
+
set baseOptions(t2) {
|
|
3956
|
+
yn(this.h, 0, 1, t2);
|
|
3957
|
+
}
|
|
3958
|
+
o(t2) {
|
|
3959
|
+
return void 0 !== t2.displayNamesLocale ? $e(this.h, 2, ne(t2.displayNamesLocale)) : "displayNamesLocale" in t2 && $e(this.h, 2), void 0 !== t2.maxResults ? xn(this.h, 3, t2.maxResults) : "maxResults" in t2 && $e(this.h, 3), void 0 !== t2.scoreThreshold ? Ln(this.h, 4, t2.scoreThreshold) : "scoreThreshold" in t2 && $e(this.h, 4), void 0 !== t2.categoryAllowlist ? Rn(this.h, 5, t2.categoryAllowlist) : "categoryAllowlist" in t2 && $e(this.h, 5), void 0 !== t2.categoryDenylist ? Rn(this.h, 6, t2.categoryDenylist) : "categoryDenylist" in t2 && $e(this.h, 6), this.l(t2);
|
|
3960
|
+
}
|
|
3961
|
+
D(t2, e2) {
|
|
3962
|
+
return this.j = { detections: [] }, $a(this, t2, e2), this.j;
|
|
3963
|
+
}
|
|
3964
|
+
F(t2, e2, n2) {
|
|
3965
|
+
return this.j = { detections: [] }, qa(this, t2, n2, e2), this.j;
|
|
3966
|
+
}
|
|
3967
|
+
m() {
|
|
3968
|
+
var t2 = new $i();
|
|
3969
|
+
Ki(t2, "input_frame_gpu"), Ki(t2, "norm_rect"), Yi(t2, "detections");
|
|
3970
|
+
const e2 = new Ci();
|
|
3971
|
+
er(e2, Ao, this.h);
|
|
3972
|
+
const n2 = new Vi();
|
|
3973
|
+
Bi(n2, "mediapipe.tasks.vision.ObjectDetectorGraph"), Gi(n2, "IMAGE:input_frame_gpu"), Gi(n2, "NORM_RECT:norm_rect"), ji(n2, "DETECTIONS:detections"), n2.o(e2), zi(t2, n2), this.g.attachProtoVectorListener("detections", ((t3, e3) => {
|
|
3974
|
+
for (const e4 of t3) t3 = ss(e4), this.j.detections.push(Lo(t3));
|
|
3975
|
+
$o(this, e3);
|
|
3976
|
+
})), this.g.attachEmptyPacketListener("detections", ((t3) => {
|
|
3977
|
+
$o(this, t3);
|
|
3978
|
+
})), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3979
|
+
}
|
|
3980
|
+
};
|
|
3981
|
+
Hh.prototype.detectForVideo = Hh.prototype.F, Hh.prototype.detect = Hh.prototype.D, Hh.prototype.setOptions = Hh.prototype.o, Hh.createFromModelPath = async function(t2, e2) {
|
|
3982
|
+
return Ka(Hh, t2, { baseOptions: { modelAssetPath: e2 } });
|
|
3983
|
+
}, Hh.createFromModelBuffer = function(t2, e2) {
|
|
3984
|
+
return Ka(Hh, t2, { baseOptions: { modelAssetBuffer: e2 } });
|
|
3985
|
+
}, Hh.createFromOptions = function(t2, e2) {
|
|
3986
|
+
return Ka(Hh, t2, e2);
|
|
3987
|
+
};
|
|
3988
|
+
var Wh = class {
|
|
3989
|
+
constructor(t2, e2, n2) {
|
|
3990
|
+
this.landmarks = t2, this.worldLandmarks = e2, this.segmentationMasks = n2;
|
|
3991
|
+
}
|
|
3992
|
+
close() {
|
|
3993
|
+
this.segmentationMasks?.forEach(((t2) => {
|
|
3994
|
+
t2.close();
|
|
3995
|
+
}));
|
|
3996
|
+
}
|
|
3997
|
+
};
|
|
3998
|
+
function zh(t2) {
|
|
3999
|
+
t2.landmarks = [], t2.worldLandmarks = [], t2.segmentationMasks = void 0;
|
|
4000
|
+
}
|
|
4001
|
+
function Kh(t2) {
|
|
4002
|
+
try {
|
|
4003
|
+
const e2 = new Wh(t2.landmarks, t2.worldLandmarks, t2.segmentationMasks);
|
|
4004
|
+
if (!t2.s) return e2;
|
|
4005
|
+
t2.s(e2);
|
|
4006
|
+
} finally {
|
|
4007
|
+
Zo(t2);
|
|
4008
|
+
}
|
|
4009
|
+
}
|
|
4010
|
+
Wh.prototype.close = Wh.prototype.close;
|
|
4011
|
+
var Yh = class extends Za {
|
|
4012
|
+
constructor(t2, e2) {
|
|
4013
|
+
super(new za(t2, e2), "image_in", "norm_rect", false), this.landmarks = [], this.worldLandmarks = [], this.outputSegmentationMasks = false, yn(t2 = this.h = new bo(), 0, 1, e2 = new xs()), this.v = new ao(), yn(this.h, 0, 3, this.v), this.j = new oo(), yn(this.h, 0, 2, this.j), xn(this.j, 4, 1), Ln(this.j, 2, 0.5), Ln(this.v, 2, 0.5), Ln(this.h, 4, 0.5);
|
|
4014
|
+
}
|
|
4015
|
+
get baseOptions() {
|
|
4016
|
+
return pn(this.h, xs, 1);
|
|
4017
|
+
}
|
|
4018
|
+
set baseOptions(t2) {
|
|
4019
|
+
yn(this.h, 0, 1, t2);
|
|
4020
|
+
}
|
|
4021
|
+
o(t2) {
|
|
4022
|
+
return "numPoses" in t2 && xn(this.j, 4, t2.numPoses ?? 1), "minPoseDetectionConfidence" in t2 && Ln(this.j, 2, t2.minPoseDetectionConfidence ?? 0.5), "minTrackingConfidence" in t2 && Ln(this.h, 4, t2.minTrackingConfidence ?? 0.5), "minPosePresenceConfidence" in t2 && Ln(this.v, 2, t2.minPosePresenceConfidence ?? 0.5), "outputSegmentationMasks" in t2 && (this.outputSegmentationMasks = t2.outputSegmentationMasks ?? false), this.l(t2);
|
|
4023
|
+
}
|
|
4024
|
+
D(t2, e2, n2) {
|
|
4025
|
+
const r2 = "function" != typeof e2 ? e2 : {};
|
|
4026
|
+
return this.s = "function" == typeof e2 ? e2 : n2, zh(this), $a(this, t2, r2), Kh(this);
|
|
4027
|
+
}
|
|
4028
|
+
F(t2, e2, n2, r2) {
|
|
4029
|
+
const i2 = "function" != typeof n2 ? n2 : {};
|
|
4030
|
+
return this.s = "function" == typeof n2 ? n2 : r2, zh(this), qa(this, t2, i2, e2), Kh(this);
|
|
4031
|
+
}
|
|
4032
|
+
m() {
|
|
4033
|
+
var t2 = new $i();
|
|
4034
|
+
Ki(t2, "image_in"), Ki(t2, "norm_rect"), Yi(t2, "normalized_landmarks"), Yi(t2, "world_landmarks"), Yi(t2, "segmentation_masks");
|
|
4035
|
+
const e2 = new Ci();
|
|
4036
|
+
er(e2, ko, this.h);
|
|
4037
|
+
const n2 = new Vi();
|
|
4038
|
+
Bi(n2, "mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"), Gi(n2, "IMAGE:image_in"), Gi(n2, "NORM_RECT:norm_rect"), ji(n2, "NORM_LANDMARKS:normalized_landmarks"), ji(n2, "WORLD_LANDMARKS:world_landmarks"), n2.o(e2), zi(t2, n2), qo(this, t2), this.g.attachProtoVectorListener("normalized_landmarks", ((t3, e3) => {
|
|
4039
|
+
this.landmarks = [];
|
|
4040
|
+
for (const e4 of t3) t3 = cs(e4), this.landmarks.push(Ro(t3));
|
|
4041
|
+
$o(this, e3);
|
|
4042
|
+
})), this.g.attachEmptyPacketListener("normalized_landmarks", ((t3) => {
|
|
4043
|
+
this.landmarks = [], $o(this, t3);
|
|
4044
|
+
})), this.g.attachProtoVectorListener("world_landmarks", ((t3, e3) => {
|
|
4045
|
+
this.worldLandmarks = [];
|
|
4046
|
+
for (const e4 of t3) t3 = as(e4), this.worldLandmarks.push(Fo(t3));
|
|
4047
|
+
$o(this, e3);
|
|
4048
|
+
})), this.g.attachEmptyPacketListener("world_landmarks", ((t3) => {
|
|
4049
|
+
this.worldLandmarks = [], $o(this, t3);
|
|
4050
|
+
})), this.outputSegmentationMasks && (ji(n2, "SEGMENTATION_MASK:segmentation_masks"), Jo(this, "segmentation_masks"), this.g.fa("segmentation_masks", ((t3, e3) => {
|
|
4051
|
+
this.segmentationMasks = t3.map(((t4) => Ja(this, t4, true, !this.s))), $o(this, e3);
|
|
4052
|
+
})), this.g.attachEmptyPacketListener("segmentation_masks", ((t3) => {
|
|
4053
|
+
this.segmentationMasks = [], $o(this, t3);
|
|
4054
|
+
}))), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
4055
|
+
}
|
|
4056
|
+
};
|
|
4057
|
+
Yh.prototype.detectForVideo = Yh.prototype.F, Yh.prototype.detect = Yh.prototype.D, Yh.prototype.setOptions = Yh.prototype.o, Yh.createFromModelPath = function(t2, e2) {
|
|
4058
|
+
return Ka(Yh, t2, { baseOptions: { modelAssetPath: e2 } });
|
|
4059
|
+
}, Yh.createFromModelBuffer = function(t2, e2) {
|
|
4060
|
+
return Ka(Yh, t2, { baseOptions: { modelAssetBuffer: e2 } });
|
|
4061
|
+
}, Yh.createFromOptions = function(t2, e2) {
|
|
4062
|
+
return Ka(Yh, t2, e2);
|
|
4063
|
+
}, Yh.POSE_CONNECTIONS = Eh;
|
|
4064
|
+
export {
|
|
4065
|
+
Ia as DrawingUtils,
|
|
4066
|
+
Qa as FaceDetector,
|
|
4067
|
+
lh as FaceLandmarker,
|
|
4068
|
+
fh as FaceStylizer,
|
|
4069
|
+
Uo as FilesetResolver,
|
|
4070
|
+
yh as GestureRecognizer,
|
|
4071
|
+
vh as HandLandmarker,
|
|
4072
|
+
bh as HolisticLandmarker,
|
|
4073
|
+
kh as ImageClassifier,
|
|
4074
|
+
Sh as ImageEmbedder,
|
|
4075
|
+
Fh as ImageSegmenter,
|
|
4076
|
+
xh as ImageSegmenterResult,
|
|
4077
|
+
Xh as InteractiveSegmenter,
|
|
4078
|
+
Mh as InteractiveSegmenterResult,
|
|
4079
|
+
ja as MPImage,
|
|
4080
|
+
wa as MPMask,
|
|
4081
|
+
Hh as ObjectDetector,
|
|
4082
|
+
Yh as PoseLandmarker,
|
|
4083
|
+
Za as VisionTaskRunner
|
|
4084
|
+
};
|