barcode-detector 2.2.6 → 2.2.8

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/es/pure.js CHANGED
@@ -1,12 +1,8 @@
1
- var Je = (i, f, y) => {
2
- if (!f.has(i))
3
- throw TypeError("Cannot " + y);
1
+ var Ze = (o) => {
2
+ throw TypeError(o);
4
3
  };
5
- var ue = (i, f, y) => (Je(i, f, "read from private field"), y ? y.call(i) : f.get(i)), Ke = (i, f, y) => {
6
- if (f.has(i))
7
- throw TypeError("Cannot add the same private member more than once");
8
- f instanceof WeakSet ? f.add(i) : f.set(i, y);
9
- }, tr = (i, f, y, c) => (Je(i, f, "write to private field"), c ? c.call(i, y) : f.set(i, y), y);
4
+ var Je = (o, f, p) => f.has(o) || Ze("Cannot " + p);
5
+ var se = (o, f, p) => (Je(o, f, "read from private field"), p ? p.call(o) : f.get(o)), Ke = (o, f, p) => f.has(o) ? Ze("Cannot add the same private member more than once") : f instanceof WeakSet ? f.add(o) : f.set(o, p), tr = (o, f, p, y) => (Je(o, f, "write to private field"), y ? y.call(o, p) : f.set(o, p), p);
10
6
  const er = [
11
7
  "Aztec",
12
8
  "Codabar",
@@ -31,30 +27,30 @@ const er = [
31
27
  "UPC-A",
32
28
  "UPC-E"
33
29
  ];
34
- function Ua(i) {
35
- return i.join("|");
30
+ function Ua(o) {
31
+ return o.join("|");
36
32
  }
37
- function La(i) {
38
- const f = rr(i);
39
- let y = 0, c = er.length - 1;
40
- for (; y <= c; ) {
41
- const g = Math.floor((y + c) / 2), $ = er[g], H = rr($);
42
- if (H === f)
43
- return $;
44
- H < f ? y = g + 1 : c = g - 1;
33
+ function La(o) {
34
+ const f = rr(o);
35
+ let p = 0, y = er.length - 1;
36
+ for (; p <= y; ) {
37
+ const c = Math.floor((p + y) / 2), g = er[c], j = rr(g);
38
+ if (j === f)
39
+ return g;
40
+ j < f ? p = c + 1 : y = c - 1;
45
41
  }
46
42
  return "None";
47
43
  }
48
- function rr(i) {
49
- return i.toLowerCase().replace(/_-\[\]/g, "");
44
+ function rr(o) {
45
+ return o.toLowerCase().replace(/_-\[\]/g, "");
50
46
  }
51
- function Va(i, f) {
52
- return i.Binarizer[f];
47
+ function Va(o, f) {
48
+ return o.Binarizer[f];
53
49
  }
54
- function Ya(i, f) {
55
- return i.CharacterSet[f];
50
+ function za(o, f) {
51
+ return o.CharacterSet[f];
56
52
  }
57
- const za = [
53
+ const Na = [
58
54
  "Text",
59
55
  "Binary",
60
56
  "Mixed",
@@ -62,16 +58,16 @@ const za = [
62
58
  "ISO15434",
63
59
  "UnknownECI"
64
60
  ];
65
- function Na(i) {
66
- return za[i.value];
61
+ function Ga(o) {
62
+ return Na[o.value];
67
63
  }
68
- function Ga(i, f) {
69
- return i.EanAddOnSymbol[f];
64
+ function Xa(o, f) {
65
+ return o.EanAddOnSymbol[f];
70
66
  }
71
- function Xa(i, f) {
72
- return i.TextMode[f];
67
+ function qa(o, f) {
68
+ return o.TextMode[f];
73
69
  }
74
- const dt = {
70
+ const st = {
75
71
  formats: [],
76
72
  tryHarder: !0,
77
73
  tryRotate: !0,
@@ -92,212 +88,213 @@ const dt = {
92
88
  textMode: "Plain",
93
89
  characterSet: "Unknown"
94
90
  };
95
- function ar(i, f) {
91
+ function ar(o, f) {
96
92
  return {
97
93
  ...f,
98
94
  formats: Ua(f.formats),
99
- binarizer: Va(i, f.binarizer),
100
- eanAddOnSymbol: Ga(
101
- i,
95
+ binarizer: Va(o, f.binarizer),
96
+ eanAddOnSymbol: Xa(
97
+ o,
102
98
  f.eanAddOnSymbol
103
99
  ),
104
- textMode: Xa(i, f.textMode),
105
- characterSet: Ya(
106
- i,
100
+ textMode: qa(o, f.textMode),
101
+ characterSet: za(
102
+ o,
107
103
  f.characterSet
108
104
  )
109
105
  };
110
106
  }
111
- function or(i) {
107
+ function or(o) {
112
108
  return {
113
- ...i,
114
- format: La(i.format),
115
- eccLevel: i.eccLevel,
116
- contentType: Na(i.contentType)
109
+ ...o,
110
+ format: La(o.format),
111
+ eccLevel: o.eccLevel,
112
+ contentType: Ga(o.contentType)
117
113
  };
118
114
  }
119
- const qa = {
120
- locateFile: (i, f) => {
121
- const y = i.match(/_(.+?)\.wasm$/);
122
- return y ? `https://fastly.jsdelivr.net/npm/zxing-wasm@1.2.10/dist/${y[1]}/${i}` : f + i;
115
+ const Ya = {
116
+ locateFile: (o, f) => {
117
+ const p = o.match(/_(.+?)\.wasm$/);
118
+ return p ? `https://fastly.jsdelivr.net/npm/zxing-wasm@1.2.12/dist/${p[1]}/${o}` : f + o;
123
119
  }
124
120
  };
125
- let ce = /* @__PURE__ */ new WeakMap();
126
- function le(i, f) {
127
- var y;
128
- const c = ce.get(i);
129
- if (c != null && c.modulePromise && (f === void 0 || Object.is(f, c.moduleOverrides)))
130
- return c.modulePromise;
131
- const g = (y = f != null ? f : c == null ? void 0 : c.moduleOverrides) != null ? y : qa, $ = i({
132
- ...g
121
+ let ue = /* @__PURE__ */ new WeakMap();
122
+ function ce(o, f) {
123
+ var p;
124
+ const y = ue.get(o);
125
+ if (y != null && y.modulePromise && f === void 0)
126
+ return y.modulePromise;
127
+ const c = (p = y == null ? void 0 : y.moduleOverrides) != null ? p : Ya, g = o({
128
+ ...c
133
129
  });
134
- return ce.set(i, {
135
- moduleOverrides: g,
136
- modulePromise: $
137
- }), $;
130
+ return ue.set(o, {
131
+ moduleOverrides: c,
132
+ modulePromise: g
133
+ }), g;
138
134
  }
139
- function Qa(i, f) {
140
- ce.set(i, {
135
+ function Qa(o, f) {
136
+ ue.set(o, {
141
137
  moduleOverrides: f
142
138
  });
143
139
  }
144
- async function Za(i, f, y = dt) {
145
- const c = {
146
- ...dt,
147
- ...y
148
- }, g = await le(i), { size: $ } = f, H = new Uint8Array(await f.arrayBuffer()), U = g._malloc($);
149
- g.HEAPU8.set(H, U);
150
- const V = g.readBarcodesFromImage(
151
- U,
152
- $,
153
- ar(g, c)
140
+ async function Za(o, f, p = st) {
141
+ const y = {
142
+ ...st,
143
+ ...p
144
+ }, c = await ce(o), { size: g } = f, j = new Uint8Array(await f.arrayBuffer()), k = c._malloc(g);
145
+ c.HEAPU8.set(j, k);
146
+ const H = c.readBarcodesFromImage(
147
+ k,
148
+ g,
149
+ ar(c, y)
154
150
  );
155
- g._free(U);
156
- const B = [];
157
- for (let L = 0; L < V.size(); ++L)
158
- B.push(
159
- or(V.get(L))
151
+ c._free(k);
152
+ const W = [];
153
+ for (let R = 0; R < H.size(); ++R)
154
+ W.push(
155
+ or(H.get(R))
160
156
  );
161
- return B;
157
+ return W;
162
158
  }
163
- async function Ja(i, f, y = dt) {
164
- const c = {
165
- ...dt,
166
- ...y
167
- }, g = await le(i), {
168
- data: $,
169
- width: H,
170
- height: U,
171
- data: { byteLength: V }
172
- } = f, B = g._malloc(V);
173
- g.HEAPU8.set($, B);
174
- const L = g.readBarcodesFromPixmap(
175
- B,
176
- H,
177
- U,
178
- ar(g, c)
159
+ async function Ja(o, f, p = st) {
160
+ const y = {
161
+ ...st,
162
+ ...p
163
+ }, c = await ce(o), {
164
+ data: g,
165
+ width: j,
166
+ height: k,
167
+ data: { byteLength: H }
168
+ } = f, W = c._malloc(H);
169
+ c.HEAPU8.set(g, W);
170
+ const R = c.readBarcodesFromPixmap(
171
+ W,
172
+ j,
173
+ k,
174
+ ar(c, y)
179
175
  );
180
- g._free(B);
181
- const Y = [];
182
- for (let S = 0; S < L.size(); ++S)
183
- Y.push(
184
- or(L.get(S))
176
+ c._free(W);
177
+ const N = [];
178
+ for (let U = 0; U < R.size(); ++U)
179
+ N.push(
180
+ or(R.get(U))
185
181
  );
186
- return Y;
182
+ return N;
187
183
  }
188
184
  ({
189
- ...dt,
190
- formats: [...dt.formats]
185
+ ...st,
186
+ formats: [...st.formats]
191
187
  });
192
- var Ut = (() => {
193
- var i = typeof document < "u" && document.currentScript ? document.currentScript.src : void 0;
194
- return function(f = {}) {
195
- var y, c = f, g, $;
196
- c.ready = new Promise((e, t) => {
197
- g = e, $ = t;
198
- });
199
- var H = Object.assign({}, c), U = "./this.program", V = typeof window == "object", B = typeof Bun < "u", L = typeof ((y = globalThis.WebAssembly) == null ? void 0 : y.instantiate) == "function", Y = typeof importScripts == "function";
188
+ var Ht = (() => {
189
+ var o, f = typeof document < "u" ? (o = document.currentScript) == null ? void 0 : o.src : void 0;
190
+ return function(p = {}) {
191
+ var y, c = p, g, j, k = new Promise((e, t) => {
192
+ g = e, j = t;
193
+ }), H = typeof window == "object", W = typeof Bun < "u", R = typeof importScripts == "function";
200
194
  typeof process == "object" && typeof process.versions == "object" && process.versions.node;
201
- var S = "";
202
- function ht(e) {
203
- return c.locateFile ? c.locateFile(e, S) : S + e;
195
+ var N = Object.assign({}, c), U = "./this.program", M = "";
196
+ function bt(e) {
197
+ return c.locateFile ? c.locateFile(e, M) : M + e;
204
198
  }
205
- var at;
206
- (V || Y || B) && (Y ? S = self.location.href : typeof document < "u" && document.currentScript && (S = document.currentScript.src), i && (S = i), S.startsWith("blob:") ? S = "" : S = S.substr(0, S.replace(/[?#].*/, "").lastIndexOf("/") + 1), Y && (at = (e) => {
199
+ var ut, ct;
200
+ (H || R || W) && (R ? M = self.location.href : typeof document < "u" && document.currentScript && (M = document.currentScript.src), f && (M = f), M.startsWith("blob:") ? M = "" : M = M.substr(0, M.replace(/[?#].*/, "").lastIndexOf("/") + 1), R && (ct = (e) => {
207
201
  var t = new XMLHttpRequest();
208
202
  return t.open("GET", e, !1), t.responseType = "arraybuffer", t.send(null), new Uint8Array(t.response);
209
- }));
210
- var _t = c.print || console.log.bind(console), K = c.printErr || console.error.bind(console);
211
- Object.assign(c, H), H = null, c.arguments && c.arguments, c.thisProgram && (U = c.thisProgram), c.quit && c.quit;
212
- var tt;
213
- c.wasmBinary && (tt = c.wasmBinary);
214
- var Tt, de = !1, z, R, ot, ft, W, _, he, fe;
215
- function pe() {
216
- var e = Tt.buffer;
217
- c.HEAP8 = z = new Int8Array(e), c.HEAP16 = ot = new Int16Array(e), c.HEAPU8 = R = new Uint8Array(e), c.HEAPU16 = ft = new Uint16Array(e), c.HEAP32 = W = new Int32Array(e), c.HEAPU32 = _ = new Uint32Array(e), c.HEAPF32 = he = new Float32Array(e), c.HEAPF64 = fe = new Float64Array(e);
203
+ }), ut = (e) => fetch(e, {
204
+ credentials: "same-origin"
205
+ }).then((t) => t.ok ? t.arrayBuffer() : Promise.reject(new Error(t.status + " : " + t.url))));
206
+ var Ut = c.print || console.log.bind(console), rt = c.printErr || console.error.bind(console);
207
+ Object.assign(c, N), N = null, c.arguments && c.arguments, c.thisProgram && (U = c.thisProgram), c.quit && c.quit;
208
+ var lt;
209
+ c.wasmBinary && (lt = c.wasmBinary);
210
+ var Ct, le = !1, L, F, nt, dt, Z, b, de, fe;
211
+ function he() {
212
+ var e = Ct.buffer;
213
+ c.HEAP8 = L = new Int8Array(e), c.HEAP16 = nt = new Int16Array(e), c.HEAPU8 = F = new Uint8Array(e), c.HEAPU16 = dt = new Uint16Array(e), c.HEAP32 = Z = new Int32Array(e), c.HEAPU32 = b = new Uint32Array(e), c.HEAPF32 = de = new Float32Array(e), c.HEAPF64 = fe = new Float64Array(e);
218
214
  }
219
- var me = [], ye = [], ve = [];
220
- function yr() {
215
+ var pe = [], ve = [], me = [];
216
+ function mr() {
221
217
  if (c.preRun)
222
218
  for (typeof c.preRun == "function" && (c.preRun = [c.preRun]); c.preRun.length; )
223
- wr(c.preRun.shift());
224
- Vt(me);
219
+ $r(c.preRun.shift());
220
+ Vt(pe);
225
221
  }
226
- function vr() {
227
- Vt(ye);
222
+ function yr() {
223
+ Vt(ve);
228
224
  }
229
225
  function gr() {
230
226
  if (c.postRun)
231
227
  for (typeof c.postRun == "function" && (c.postRun = [c.postRun]); c.postRun.length; )
232
228
  br(c.postRun.shift());
233
- Vt(ve);
234
- }
235
- function wr(e) {
236
- me.unshift(e);
229
+ Vt(me);
237
230
  }
238
231
  function $r(e) {
239
- ye.unshift(e);
232
+ pe.unshift(e);
240
233
  }
241
- function br(e) {
234
+ function wr(e) {
242
235
  ve.unshift(e);
243
236
  }
244
- var et = 0, pt = null;
237
+ function br(e) {
238
+ me.unshift(e);
239
+ }
240
+ var J = 0, ft = null;
245
241
  function Cr(e) {
246
242
  var t;
247
- et++, (t = c.monitorRunDependencies) === null || t === void 0 || t.call(c, et);
243
+ J++, (t = c.monitorRunDependencies) === null || t === void 0 || t.call(c, J);
248
244
  }
249
- function _r(e) {
245
+ function Tr(e) {
250
246
  var t;
251
- if (et--, (t = c.monitorRunDependencies) === null || t === void 0 || t.call(c, et), et == 0 && pt) {
252
- var r = pt;
253
- pt = null, r();
247
+ if (J--, (t = c.monitorRunDependencies) === null || t === void 0 || t.call(c, J), J == 0 && ft) {
248
+ var r = ft;
249
+ ft = null, r();
254
250
  }
255
251
  }
256
252
  function Lt(e) {
257
253
  var t;
258
- (t = c.onAbort) === null || t === void 0 || t.call(c, e), e = "Aborted(" + e + ")", K(e), de = !0, e += ". Build with -sASSERTIONS for more info.";
254
+ (t = c.onAbort) === null || t === void 0 || t.call(c, e), e = "Aborted(" + e + ")", rt(e), le = !0, e += ". Build with -sASSERTIONS for more info.";
259
255
  var r = new WebAssembly.RuntimeError(e);
260
- throw $(r), r;
256
+ throw j(r), r;
257
+ }
258
+ var Pr = "data:application/octet-stream;base64,", ye = (e) => e.startsWith(Pr);
259
+ function Er() {
260
+ var e = "zxing_reader.wasm";
261
+ return ye(e) ? e : bt(e);
261
262
  }
262
- var Tr = "data:application/octet-stream;base64,", ge = (e) => e.startsWith(Tr), it;
263
- it = "zxing_reader.wasm", ge(it) || (it = ht(it));
264
- function we(e) {
265
- if (e == it && tt)
266
- return new Uint8Array(tt);
267
- if (at)
268
- return at(e);
263
+ var Tt;
264
+ function ge(e) {
265
+ if (e == Tt && lt)
266
+ return new Uint8Array(lt);
267
+ if (ct)
268
+ return ct(e);
269
269
  throw "both async and sync fetching of the wasm failed";
270
270
  }
271
- function Pr(e) {
272
- return !tt && (V || Y || B || L) && typeof fetch == "function" ? fetch(e, {
273
- credentials: "same-origin"
274
- }).then((t) => {
275
- if (!t.ok)
276
- throw `failed to load wasm binary file at '${e}'`;
277
- return t.arrayBuffer();
278
- }).catch(() => we(e)) : Promise.resolve().then(() => we(e));
271
+ function _r(e) {
272
+ return lt ? Promise.resolve().then(() => ge(e)) : ut(e).then((t) => new Uint8Array(t), () => ge(e));
279
273
  }
280
274
  function $e(e, t, r) {
281
- return Pr(e).then((n) => WebAssembly.instantiate(n, t)).then(r, (n) => {
282
- K(`failed to asynchronously prepare wasm: ${n}`), Lt(n);
275
+ return _r(e).then((n) => WebAssembly.instantiate(n, t)).then(r, (n) => {
276
+ rt(`failed to asynchronously prepare wasm: ${n}`), Lt(n);
283
277
  });
284
278
  }
285
- function Er(e, t, r, n) {
286
- return !e && typeof WebAssembly.instantiateStreaming == "function" && !ge(t) && typeof fetch == "function" ? fetch(t, {
279
+ function Ar(e, t, r, n) {
280
+ return !e && typeof WebAssembly.instantiateStreaming == "function" && !ye(t) && typeof fetch == "function" ? fetch(t, {
287
281
  credentials: "same-origin"
288
282
  }).then((a) => {
289
- var o = WebAssembly.instantiateStreaming(a, r);
290
- return o.then(n, function(s) {
291
- return K(`wasm streaming compile failed: ${s}`), K("falling back to ArrayBuffer instantiation"), $e(t, r, n);
283
+ var i = WebAssembly.instantiateStreaming(a, r);
284
+ return i.then(n, function(u) {
285
+ return rt(`wasm streaming compile failed: ${u}`), rt("falling back to ArrayBuffer instantiation"), $e(t, r, n);
292
286
  });
293
287
  }) : $e(t, r, n);
294
288
  }
295
- function Ar() {
296
- var e = {
297
- a: wa
289
+ function xr() {
290
+ return {
291
+ a: ga
298
292
  };
293
+ }
294
+ function Dr() {
295
+ var e = xr();
299
296
  function t(n, a) {
300
- return A = n.exports, Tt = A.ma, pe(), De = A.qa, $r(A.na), _r(), A;
297
+ return P = n.exports, Ct = P.ma, he(), xe = P.qa, wr(P.na), Tr(), P;
301
298
  }
302
299
  Cr();
303
300
  function r(n) {
@@ -307,207 +304,208 @@ var Ut = (() => {
307
304
  try {
308
305
  return c.instantiateWasm(e, t);
309
306
  } catch (n) {
310
- K(`Module.instantiateWasm callback failed with error: ${n}`), $(n);
307
+ rt(`Module.instantiateWasm callback failed with error: ${n}`), j(n);
311
308
  }
312
- return Er(tt, it, e, r).catch($), {};
309
+ return Tt || (Tt = Er()), Ar(lt, Tt, e, r).catch(j), {};
313
310
  }
314
311
  var Vt = (e) => {
315
312
  for (; e.length > 0; )
316
313
  e.shift()(c);
317
314
  };
318
315
  c.noExitRuntime;
319
- var Pt = [], Et = 0, Fr = (e) => {
320
- var t = new Yt(e);
321
- return t.get_caught() || (t.set_caught(!0), Et--), t.set_rethrown(!1), Pt.push(t), Ye(t.excPtr), t.get_exception_ptr();
322
- }, q = 0, Dr = () => {
323
- T(0, 0);
316
+ var _ = (e) => Be(e), A = () => He(), Pt = [], Et = 0, Fr = (e) => {
317
+ var t = new zt(e);
318
+ return t.get_caught() || (t.set_caught(!0), Et--), t.set_rethrown(!1), Pt.push(t), Le(t.excPtr), t.get_exception_ptr();
319
+ }, G = 0, Or = () => {
320
+ C(0, 0);
324
321
  var e = Pt.pop();
325
- Ve(e.excPtr), q = 0;
322
+ Ue(e.excPtr), G = 0;
326
323
  };
327
- class Yt {
324
+ class zt {
328
325
  constructor(t) {
329
326
  this.excPtr = t, this.ptr = t - 24;
330
327
  }
331
328
  set_type(t) {
332
- _[this.ptr + 4 >> 2] = t;
329
+ b[this.ptr + 4 >> 2] = t;
333
330
  }
334
331
  get_type() {
335
- return _[this.ptr + 4 >> 2];
332
+ return b[this.ptr + 4 >> 2];
336
333
  }
337
334
  set_destructor(t) {
338
- _[this.ptr + 8 >> 2] = t;
335
+ b[this.ptr + 8 >> 2] = t;
339
336
  }
340
337
  get_destructor() {
341
- return _[this.ptr + 8 >> 2];
338
+ return b[this.ptr + 8 >> 2];
342
339
  }
343
340
  set_caught(t) {
344
- t = t ? 1 : 0, z[this.ptr + 12] = t;
341
+ t = t ? 1 : 0, L[this.ptr + 12] = t;
345
342
  }
346
343
  get_caught() {
347
- return z[this.ptr + 12] != 0;
344
+ return L[this.ptr + 12] != 0;
348
345
  }
349
346
  set_rethrown(t) {
350
- t = t ? 1 : 0, z[this.ptr + 13] = t;
347
+ t = t ? 1 : 0, L[this.ptr + 13] = t;
351
348
  }
352
349
  get_rethrown() {
353
- return z[this.ptr + 13] != 0;
350
+ return L[this.ptr + 13] != 0;
354
351
  }
355
352
  init(t, r) {
356
353
  this.set_adjusted_ptr(0), this.set_type(t), this.set_destructor(r);
357
354
  }
358
355
  set_adjusted_ptr(t) {
359
- _[this.ptr + 16 >> 2] = t;
356
+ b[this.ptr + 16 >> 2] = t;
360
357
  }
361
358
  get_adjusted_ptr() {
362
- return _[this.ptr + 16 >> 2];
359
+ return b[this.ptr + 16 >> 2];
363
360
  }
364
361
  get_exception_ptr() {
365
- var t = Ne(this.get_type());
362
+ var t = ze(this.get_type());
366
363
  if (t)
367
- return _[this.excPtr >> 2];
364
+ return b[this.excPtr >> 2];
368
365
  var r = this.get_adjusted_ptr();
369
366
  return r !== 0 ? r : this.excPtr;
370
367
  }
371
368
  }
372
- var Or = (e) => {
373
- throw q || (q = e), q;
374
- }, zt = (e) => {
375
- var t = q;
369
+ var Sr = (e) => {
370
+ throw G || (G = e), G;
371
+ }, _t = (e) => ke(e), Nt = (e) => {
372
+ var t = G;
376
373
  if (!t)
377
- return Ct(0), 0;
378
- var r = new Yt(t);
374
+ return _t(0), 0;
375
+ var r = new zt(t);
379
376
  r.set_adjusted_ptr(t);
380
377
  var n = r.get_type();
381
378
  if (!n)
382
- return Ct(0), t;
383
- for (var a in e) {
384
- var o = e[a];
385
- if (o === 0 || o === n)
379
+ return _t(0), t;
380
+ for (var a of e) {
381
+ if (a === 0 || a === n)
386
382
  break;
387
- var s = r.ptr + 16;
388
- if (ze(o, n, s))
389
- return Ct(o), t;
383
+ var i = r.ptr + 16;
384
+ if (Ve(a, n, i))
385
+ return _t(a), t;
390
386
  }
391
- return Ct(n), t;
392
- }, xr = () => zt([]), Mr = (e) => zt([e]), Sr = (e, t) => zt([e, t]), jr = () => {
387
+ return _t(n), t;
388
+ }, jr = () => Nt([]), Ir = (e) => Nt([e]), Rr = (e, t) => Nt([e, t]), Mr = () => {
393
389
  var e = Pt.pop();
394
390
  e || Lt("no exception to throw");
395
391
  var t = e.excPtr;
396
- throw e.get_rethrown() || (Pt.push(e), e.set_rethrown(!0), e.set_caught(!1), Et++), q = t, q;
397
- }, Ir = (e, t, r) => {
398
- var n = new Yt(e);
399
- throw n.init(t, r), q = e, Et++, q;
400
- }, Rr = () => Et, At = {}, Nt = (e) => {
392
+ throw e.get_rethrown() || (Pt.push(e), e.set_rethrown(!0), e.set_caught(!1), Et++), G = t, G;
393
+ }, Wr = (e, t, r) => {
394
+ var n = new zt(e);
395
+ throw n.init(t, r), G = e, Et++, G;
396
+ }, kr = () => Et, Br = () => {
397
+ Lt("");
398
+ }, At = {}, Gt = (e) => {
401
399
  for (; e.length; ) {
402
400
  var t = e.pop(), r = e.pop();
403
401
  r(t);
404
402
  }
405
403
  };
406
- function mt(e) {
407
- return this.fromWireType(_[e >> 2]);
404
+ function ht(e) {
405
+ return this.fromWireType(b[e >> 2]);
408
406
  }
409
- var st = {}, rt = {}, Ft = {}, be, Dt = (e) => {
410
- throw new be(e);
411
- }, nt = (e, t, r) => {
412
- e.forEach(function(u) {
413
- Ft[u] = t;
407
+ var at = {}, K = {}, xt = {}, we, Dt = (e) => {
408
+ throw new we(e);
409
+ }, tt = (e, t, r) => {
410
+ e.forEach(function(s) {
411
+ xt[s] = t;
414
412
  });
415
- function n(u) {
416
- var l = r(u);
413
+ function n(s) {
414
+ var l = r(s);
417
415
  l.length !== e.length && Dt("Mismatched type converter count");
418
- for (var h = 0; h < e.length; ++h)
419
- G(e[h], l[h]);
416
+ for (var d = 0; d < e.length; ++d)
417
+ V(e[d], l[d]);
420
418
  }
421
- var a = new Array(t.length), o = [], s = 0;
422
- t.forEach((u, l) => {
423
- rt.hasOwnProperty(u) ? a[l] = rt[u] : (o.push(u), st.hasOwnProperty(u) || (st[u] = []), st[u].push(() => {
424
- a[l] = rt[u], ++s, s === o.length && n(a);
419
+ var a = new Array(t.length), i = [], u = 0;
420
+ t.forEach((s, l) => {
421
+ K.hasOwnProperty(s) ? a[l] = K[s] : (i.push(s), at.hasOwnProperty(s) || (at[s] = []), at[s].push(() => {
422
+ a[l] = K[s], ++u, u === i.length && n(a);
425
423
  }));
426
- }), o.length === 0 && n(a);
427
- }, Wr = (e) => {
424
+ }), i.length === 0 && n(a);
425
+ }, Hr = (e) => {
428
426
  var t = At[e];
429
427
  delete At[e];
430
- var r = t.rawConstructor, n = t.rawDestructor, a = t.fields, o = a.map((s) => s.getterReturnType).concat(a.map((s) => s.setterArgumentType));
431
- nt([e], o, (s) => {
432
- var u = {};
433
- return a.forEach((l, h) => {
434
- var p = l.fieldName, w = s[h], v = l.getter, b = l.getterContext, O = s[h + a.length], k = l.setter, P = l.setterContext;
435
- u[p] = {
436
- read: (j) => w.fromWireType(v(b, j)),
437
- write: (j, d) => {
438
- var m = [];
439
- k(P, j, O.toWireType(m, d)), Nt(m);
428
+ var r = t.rawConstructor, n = t.rawDestructor, a = t.fields, i = a.map((u) => u.getterReturnType).concat(a.map((u) => u.setterArgumentType));
429
+ tt([e], i, (u) => {
430
+ var s = {};
431
+ return a.forEach((l, d) => {
432
+ var h = l.fieldName, v = u[d], m = l.getter, $ = l.getterContext, x = u[d + a.length], O = l.setter, E = l.setterContext;
433
+ s[h] = {
434
+ read: (S) => v.fromWireType(m($, S)),
435
+ write: (S, et) => {
436
+ var I = [];
437
+ O(E, S, x.toWireType(I, et)), Gt(I);
440
438
  }
441
439
  };
442
440
  }), [{
443
441
  name: t.name,
444
442
  fromWireType: (l) => {
445
- var h = {};
446
- for (var p in u)
447
- h[p] = u[p].read(l);
448
- return n(l), h;
443
+ var d = {};
444
+ for (var h in s)
445
+ d[h] = s[h].read(l);
446
+ return n(l), d;
449
447
  },
450
- toWireType: (l, h) => {
451
- for (var p in u)
452
- if (!(p in h))
453
- throw new TypeError(`Missing field: "${p}"`);
454
- var w = r();
455
- for (p in u)
456
- u[p].write(w, h[p]);
457
- return l !== null && l.push(n, w), w;
448
+ toWireType: (l, d) => {
449
+ for (var h in s)
450
+ if (!(h in d))
451
+ throw new TypeError(`Missing field: "${h}"`);
452
+ var v = r();
453
+ for (h in s)
454
+ s[h].write(v, d[h]);
455
+ return l !== null && l.push(n, v), v;
458
456
  },
459
- argPackAdvance: X,
460
- readValueFromPointer: mt,
457
+ argPackAdvance: z,
458
+ readValueFromPointer: ht,
461
459
  destructorFunction: n
462
460
  }];
463
461
  });
464
- }, kr = (e, t, r, n, a) => {
465
- }, Hr = () => {
462
+ }, Ur = (e, t, r, n, a) => {
463
+ }, Lr = () => {
466
464
  for (var e = new Array(256), t = 0; t < 256; ++t)
467
465
  e[t] = String.fromCharCode(t);
468
- Ce = e;
469
- }, Ce, I = (e) => {
470
- for (var t = "", r = e; R[r]; )
471
- t += Ce[R[r++]];
466
+ be = e;
467
+ }, be, D = (e) => {
468
+ for (var t = "", r = e; F[r]; )
469
+ t += be[F[r++]];
472
470
  return t;
473
- }, ut, C = (e) => {
474
- throw new ut(e);
471
+ }, ot, w = (e) => {
472
+ throw new ot(e);
475
473
  };
476
- function Br(e, t) {
474
+ function Vr(e, t) {
477
475
  let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
478
476
  var n = t.name;
479
- if (e || C(`type "${n}" must have a positive integer typeid pointer`), rt.hasOwnProperty(e)) {
477
+ if (e || w(`type "${n}" must have a positive integer typeid pointer`), K.hasOwnProperty(e)) {
480
478
  if (r.ignoreDuplicateRegistrations)
481
479
  return;
482
- C(`Cannot register type '${n}' twice`);
480
+ w(`Cannot register type '${n}' twice`);
483
481
  }
484
- if (rt[e] = t, delete Ft[e], st.hasOwnProperty(e)) {
485
- var a = st[e];
486
- delete st[e], a.forEach((o) => o());
482
+ if (K[e] = t, delete xt[e], at.hasOwnProperty(e)) {
483
+ var a = at[e];
484
+ delete at[e], a.forEach((i) => i());
487
485
  }
488
486
  }
489
- function G(e, t) {
487
+ function V(e, t) {
490
488
  let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
491
489
  if (!("argPackAdvance" in t))
492
490
  throw new TypeError("registerType registeredInstance requires argPackAdvance");
493
- return Br(e, t, r);
491
+ return Vr(e, t, r);
494
492
  }
495
- var X = 8, Ur = (e, t, r, n) => {
496
- t = I(t), G(e, {
493
+ var z = 8, zr = (e, t, r, n) => {
494
+ t = D(t), V(e, {
497
495
  name: t,
498
496
  fromWireType: function(a) {
499
497
  return !!a;
500
498
  },
501
- toWireType: function(a, o) {
502
- return o ? r : n;
499
+ toWireType: function(a, i) {
500
+ return i ? r : n;
503
501
  },
504
- argPackAdvance: X,
502
+ argPackAdvance: z,
505
503
  readValueFromPointer: function(a) {
506
- return this.fromWireType(R[a]);
504
+ return this.fromWireType(F[a]);
507
505
  },
508
506
  destructorFunction: null
509
507
  });
510
- }, Lr = (e) => ({
508
+ }, Nr = (e) => ({
511
509
  count: e.count,
512
510
  deleteScheduled: e.deleteScheduled,
513
511
  preservePointerOnDelete: e.preservePointerOnDelete,
@@ -515,18 +513,18 @@ var Ut = (() => {
515
513
  ptrType: e.ptrType,
516
514
  smartPtr: e.smartPtr,
517
515
  smartPtrType: e.smartPtrType
518
- }), Gt = (e) => {
516
+ }), Xt = (e) => {
519
517
  function t(r) {
520
518
  return r.$$.ptrType.registeredClass.name;
521
519
  }
522
- C(t(e) + " instance already deleted");
523
- }, Xt = !1, _e = (e) => {
524
- }, Vr = (e) => {
520
+ w(t(e) + " instance already deleted");
521
+ }, qt = !1, Ce = (e) => {
522
+ }, Gr = (e) => {
525
523
  e.smartPtr ? e.smartPtrType.rawDestructor(e.smartPtr) : e.ptrType.registeredClass.rawDestructor(e.ptr);
526
524
  }, Te = (e) => {
527
525
  e.count.value -= 1;
528
526
  var t = e.count.value === 0;
529
- t && Vr(e);
527
+ t && Gr(e);
530
528
  }, Pe = (e, t, r) => {
531
529
  if (t === r)
532
530
  return e;
@@ -534,41 +532,41 @@ var Ut = (() => {
534
532
  return null;
535
533
  var n = Pe(e, t, r.baseClass);
536
534
  return n === null ? null : r.downcast(n);
537
- }, Ee = {}, Yr = () => Object.keys(gt).length, zr = () => {
535
+ }, Ee = {}, Xr = () => Object.keys(mt).length, qr = () => {
538
536
  var e = [];
539
- for (var t in gt)
540
- gt.hasOwnProperty(t) && e.push(gt[t]);
537
+ for (var t in mt)
538
+ mt.hasOwnProperty(t) && e.push(mt[t]);
541
539
  return e;
542
- }, yt = [], qt = () => {
543
- for (; yt.length; ) {
544
- var e = yt.pop();
540
+ }, pt = [], Yt = () => {
541
+ for (; pt.length; ) {
542
+ var e = pt.pop();
545
543
  e.$$.deleteScheduled = !1, e.delete();
546
544
  }
547
- }, vt, Nr = (e) => {
548
- vt = e, yt.length && vt && vt(qt);
549
- }, Gr = () => {
550
- c.getInheritedInstanceCount = Yr, c.getLiveInheritedInstances = zr, c.flushPendingDeletes = qt, c.setDelayFunction = Nr;
551
- }, gt = {}, Xr = (e, t) => {
552
- for (t === void 0 && C("ptr should not be undefined"); e.baseClass; )
545
+ }, vt, Yr = (e) => {
546
+ vt = e, pt.length && vt && vt(Yt);
547
+ }, Qr = () => {
548
+ c.getInheritedInstanceCount = Xr, c.getLiveInheritedInstances = qr, c.flushPendingDeletes = Yt, c.setDelayFunction = Yr;
549
+ }, mt = {}, Zr = (e, t) => {
550
+ for (t === void 0 && w("ptr should not be undefined"); e.baseClass; )
553
551
  t = e.upcast(t), e = e.baseClass;
554
552
  return t;
555
- }, qr = (e, t) => (t = Xr(e, t), gt[t]), Ot = (e, t) => {
553
+ }, Jr = (e, t) => (t = Zr(e, t), mt[t]), Ft = (e, t) => {
556
554
  (!t.ptrType || !t.ptr) && Dt("makeClassHandle requires ptr and ptrType");
557
555
  var r = !!t.smartPtrType, n = !!t.smartPtr;
558
556
  return r !== n && Dt("Both smartPtrType and smartPtr must be specified"), t.count = {
559
557
  value: 1
560
- }, wt(Object.create(e, {
558
+ }, yt(Object.create(e, {
561
559
  $$: {
562
560
  value: t,
563
561
  writable: !0
564
562
  }
565
563
  }));
566
564
  };
567
- function Qr(e) {
565
+ function Kr(e) {
568
566
  var t = this.getPointee(e);
569
567
  if (!t)
570
568
  return this.destructor(e), null;
571
- var r = qr(this.registeredClass, t);
569
+ var r = Jr(this.registeredClass, t);
572
570
  if (r !== void 0) {
573
571
  if (r.$$.count.value === 0)
574
572
  return r.$$.ptr = t, r.$$.smartPtr = e, r.clone();
@@ -576,47 +574,47 @@ var Ut = (() => {
576
574
  return this.destructor(e), n;
577
575
  }
578
576
  function a() {
579
- return this.isSmartPointer ? Ot(this.registeredClass.instancePrototype, {
577
+ return this.isSmartPointer ? Ft(this.registeredClass.instancePrototype, {
580
578
  ptrType: this.pointeeType,
581
579
  ptr: t,
582
580
  smartPtrType: this,
583
581
  smartPtr: e
584
- }) : Ot(this.registeredClass.instancePrototype, {
582
+ }) : Ft(this.registeredClass.instancePrototype, {
585
583
  ptrType: this,
586
584
  ptr: e
587
585
  });
588
586
  }
589
- var o = this.registeredClass.getActualType(t), s = Ee[o];
590
- if (!s)
587
+ var i = this.registeredClass.getActualType(t), u = Ee[i];
588
+ if (!u)
591
589
  return a.call(this);
592
- var u;
593
- this.isConst ? u = s.constPointerType : u = s.pointerType;
594
- var l = Pe(t, this.registeredClass, u.registeredClass);
595
- return l === null ? a.call(this) : this.isSmartPointer ? Ot(u.registeredClass.instancePrototype, {
596
- ptrType: u,
590
+ var s;
591
+ this.isConst ? s = u.constPointerType : s = u.pointerType;
592
+ var l = Pe(t, this.registeredClass, s.registeredClass);
593
+ return l === null ? a.call(this) : this.isSmartPointer ? Ft(s.registeredClass.instancePrototype, {
594
+ ptrType: s,
597
595
  ptr: l,
598
596
  smartPtrType: this,
599
597
  smartPtr: e
600
- }) : Ot(u.registeredClass.instancePrototype, {
601
- ptrType: u,
598
+ }) : Ft(s.registeredClass.instancePrototype, {
599
+ ptrType: s,
602
600
  ptr: l
603
601
  });
604
602
  }
605
- var wt = (e) => typeof FinalizationRegistry > "u" ? (wt = (t) => t, e) : (Xt = new FinalizationRegistry((t) => {
603
+ var yt = (e) => typeof FinalizationRegistry > "u" ? (yt = (t) => t, e) : (qt = new FinalizationRegistry((t) => {
606
604
  Te(t.$$);
607
- }), wt = (t) => {
605
+ }), yt = (t) => {
608
606
  var r = t.$$, n = !!r.smartPtr;
609
607
  if (n) {
610
608
  var a = {
611
609
  $$: r
612
610
  };
613
- Xt.register(t, a, t);
611
+ qt.register(t, a, t);
614
612
  }
615
613
  return t;
616
- }, _e = (t) => Xt.unregister(t), wt(e)), Zr = () => {
617
- Object.assign(xt.prototype, {
614
+ }, Ce = (t) => qt.unregister(t), yt(e)), tn = () => {
615
+ Object.assign(Ot.prototype, {
618
616
  isAliasOf(e) {
619
- if (!(this instanceof xt) || !(e instanceof xt))
617
+ if (!(this instanceof Ot) || !(e instanceof Ot))
620
618
  return !1;
621
619
  var t = this.$$.ptrType.registeredClass, r = this.$$.ptr;
622
620
  e.$$ = e.$$;
@@ -627,73 +625,73 @@ var Ut = (() => {
627
625
  return t === n && r === a;
628
626
  },
629
627
  clone() {
630
- if (this.$$.ptr || Gt(this), this.$$.preservePointerOnDelete)
628
+ if (this.$$.ptr || Xt(this), this.$$.preservePointerOnDelete)
631
629
  return this.$$.count.value += 1, this;
632
- var e = wt(Object.create(Object.getPrototypeOf(this), {
630
+ var e = yt(Object.create(Object.getPrototypeOf(this), {
633
631
  $$: {
634
- value: Lr(this.$$)
632
+ value: Nr(this.$$)
635
633
  }
636
634
  }));
637
635
  return e.$$.count.value += 1, e.$$.deleteScheduled = !1, e;
638
636
  },
639
637
  delete() {
640
- this.$$.ptr || Gt(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && C("Object already scheduled for deletion"), _e(this), Te(this.$$), this.$$.preservePointerOnDelete || (this.$$.smartPtr = void 0, this.$$.ptr = void 0);
638
+ this.$$.ptr || Xt(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && w("Object already scheduled for deletion"), Ce(this), Te(this.$$), this.$$.preservePointerOnDelete || (this.$$.smartPtr = void 0, this.$$.ptr = void 0);
641
639
  },
642
640
  isDeleted() {
643
641
  return !this.$$.ptr;
644
642
  },
645
643
  deleteLater() {
646
- return this.$$.ptr || Gt(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && C("Object already scheduled for deletion"), yt.push(this), yt.length === 1 && vt && vt(qt), this.$$.deleteScheduled = !0, this;
644
+ return this.$$.ptr || Xt(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && w("Object already scheduled for deletion"), pt.push(this), pt.length === 1 && vt && vt(Yt), this.$$.deleteScheduled = !0, this;
647
645
  }
648
646
  });
649
647
  };
650
- function xt() {
648
+ function Ot() {
651
649
  }
652
- var $t = (e, t) => Object.defineProperty(t, "name", {
650
+ var gt = (e, t) => Object.defineProperty(t, "name", {
653
651
  value: e
654
- }), Ae = (e, t, r) => {
652
+ }), _e = (e, t, r) => {
655
653
  if (e[t].overloadTable === void 0) {
656
654
  var n = e[t];
657
655
  e[t] = function() {
658
- for (var a = arguments.length, o = new Array(a), s = 0; s < a; s++)
659
- o[s] = arguments[s];
660
- return e[t].overloadTable.hasOwnProperty(o.length) || C(`Function '${r}' called with an invalid number of arguments (${o.length}) - expects one of (${e[t].overloadTable})!`), e[t].overloadTable[o.length].apply(this, o);
656
+ for (var a = arguments.length, i = new Array(a), u = 0; u < a; u++)
657
+ i[u] = arguments[u];
658
+ return e[t].overloadTable.hasOwnProperty(i.length) || w(`Function '${r}' called with an invalid number of arguments (${i.length}) - expects one of (${e[t].overloadTable})!`), e[t].overloadTable[i.length].apply(this, i);
661
659
  }, e[t].overloadTable = [], e[t].overloadTable[n.argCount] = n;
662
660
  }
663
661
  }, Qt = (e, t, r) => {
664
- c.hasOwnProperty(e) ? ((r === void 0 || c[e].overloadTable !== void 0 && c[e].overloadTable[r] !== void 0) && C(`Cannot register public name '${e}' twice`), Ae(c, e, e), c.hasOwnProperty(r) && C(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`), c[e].overloadTable[r] = t) : (c[e] = t, r !== void 0 && (c[e].numArguments = r));
665
- }, Jr = 48, Kr = 57, tn = (e) => {
662
+ c.hasOwnProperty(e) ? ((r === void 0 || c[e].overloadTable !== void 0 && c[e].overloadTable[r] !== void 0) && w(`Cannot register public name '${e}' twice`), _e(c, e, e), c.hasOwnProperty(r) && w(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`), c[e].overloadTable[r] = t) : (c[e] = t, r !== void 0 && (c[e].numArguments = r));
663
+ }, en = 48, rn = 57, nn = (e) => {
666
664
  if (e === void 0)
667
665
  return "_unknown";
668
666
  e = e.replace(/[^a-zA-Z0-9_]/g, "$");
669
667
  var t = e.charCodeAt(0);
670
- return t >= Jr && t <= Kr ? `_${e}` : e;
668
+ return t >= en && t <= rn ? `_${e}` : e;
671
669
  };
672
- function en(e, t, r, n, a, o, s, u) {
673
- this.name = e, this.constructor = t, this.instancePrototype = r, this.rawDestructor = n, this.baseClass = a, this.getActualType = o, this.upcast = s, this.downcast = u, this.pureVirtualFunctions = [];
670
+ function an(e, t, r, n, a, i, u, s) {
671
+ this.name = e, this.constructor = t, this.instancePrototype = r, this.rawDestructor = n, this.baseClass = a, this.getActualType = i, this.upcast = u, this.downcast = s, this.pureVirtualFunctions = [];
674
672
  }
675
673
  var Zt = (e, t, r) => {
676
674
  for (; t !== r; )
677
- t.upcast || C(`Expected null or instance of ${r.name}, got an instance of ${t.name}`), e = t.upcast(e), t = t.baseClass;
675
+ t.upcast || w(`Expected null or instance of ${r.name}, got an instance of ${t.name}`), e = t.upcast(e), t = t.baseClass;
678
676
  return e;
679
677
  };
680
- function rn(e, t) {
678
+ function on(e, t) {
681
679
  if (t === null)
682
- return this.isReference && C(`null is not a valid ${this.name}`), 0;
683
- t.$$ || C(`Cannot pass "${ne(t)}" as a ${this.name}`), t.$$.ptr || C(`Cannot pass deleted object as a pointer of type ${this.name}`);
680
+ return this.isReference && w(`null is not a valid ${this.name}`), 0;
681
+ t.$$ || w(`Cannot pass "${ne(t)}" as a ${this.name}`), t.$$.ptr || w(`Cannot pass deleted object as a pointer of type ${this.name}`);
684
682
  var r = t.$$.ptrType.registeredClass, n = Zt(t.$$.ptr, r, this.registeredClass);
685
683
  return n;
686
684
  }
687
- function nn(e, t) {
685
+ function sn(e, t) {
688
686
  var r;
689
687
  if (t === null)
690
- return this.isReference && C(`null is not a valid ${this.name}`), this.isSmartPointer ? (r = this.rawConstructor(), e !== null && e.push(this.rawDestructor, r), r) : 0;
691
- (!t || !t.$$) && C(`Cannot pass "${ne(t)}" as a ${this.name}`), t.$$.ptr || C(`Cannot pass deleted object as a pointer of type ${this.name}`), !this.isConst && t.$$.ptrType.isConst && C(`Cannot convert argument of type ${t.$$.smartPtrType ? t.$$.smartPtrType.name : t.$$.ptrType.name} to parameter type ${this.name}`);
688
+ return this.isReference && w(`null is not a valid ${this.name}`), this.isSmartPointer ? (r = this.rawConstructor(), e !== null && e.push(this.rawDestructor, r), r) : 0;
689
+ (!t || !t.$$) && w(`Cannot pass "${ne(t)}" as a ${this.name}`), t.$$.ptr || w(`Cannot pass deleted object as a pointer of type ${this.name}`), !this.isConst && t.$$.ptrType.isConst && w(`Cannot convert argument of type ${t.$$.smartPtrType ? t.$$.smartPtrType.name : t.$$.ptrType.name} to parameter type ${this.name}`);
692
690
  var n = t.$$.ptrType.registeredClass;
693
691
  if (r = Zt(t.$$.ptr, n, this.registeredClass), this.isSmartPointer)
694
- switch (t.$$.smartPtr === void 0 && C("Passing raw pointer to smart pointer is illegal"), this.sharingPolicy) {
692
+ switch (t.$$.smartPtr === void 0 && w("Passing raw pointer to smart pointer is illegal"), this.sharingPolicy) {
695
693
  case 0:
696
- t.$$.smartPtrType === this ? r = t.$$.smartPtr : C(`Cannot convert argument of type ${t.$$.smartPtrType ? t.$$.smartPtrType.name : t.$$.ptrType.name} to parameter type ${this.name}`);
694
+ t.$$.smartPtrType === this ? r = t.$$.smartPtr : w(`Cannot convert argument of type ${t.$$.smartPtrType ? t.$$.smartPtrType.name : t.$$.ptrType.name} to parameter type ${this.name}`);
697
695
  break;
698
696
  case 1:
699
697
  r = t.$$.smartPtr;
@@ -703,23 +701,23 @@ var Ut = (() => {
703
701
  r = t.$$.smartPtr;
704
702
  else {
705
703
  var a = t.clone();
706
- r = this.rawShare(r, Z.toHandle(() => a.delete())), e !== null && e.push(this.rawDestructor, r);
704
+ r = this.rawShare(r, q.toHandle(() => a.delete())), e !== null && e.push(this.rawDestructor, r);
707
705
  }
708
706
  break;
709
707
  default:
710
- C("Unsupporting sharing policy");
708
+ w("Unsupporting sharing policy");
711
709
  }
712
710
  return r;
713
711
  }
714
- function an(e, t) {
712
+ function un(e, t) {
715
713
  if (t === null)
716
- return this.isReference && C(`null is not a valid ${this.name}`), 0;
717
- t.$$ || C(`Cannot pass "${ne(t)}" as a ${this.name}`), t.$$.ptr || C(`Cannot pass deleted object as a pointer of type ${this.name}`), t.$$.ptrType.isConst && C(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);
714
+ return this.isReference && w(`null is not a valid ${this.name}`), 0;
715
+ t.$$ || w(`Cannot pass "${ne(t)}" as a ${this.name}`), t.$$.ptr || w(`Cannot pass deleted object as a pointer of type ${this.name}`), t.$$.ptrType.isConst && w(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);
718
716
  var r = t.$$.ptrType.registeredClass, n = Zt(t.$$.ptr, r, this.registeredClass);
719
717
  return n;
720
718
  }
721
- var on = () => {
722
- Object.assign(Mt.prototype, {
719
+ var cn = () => {
720
+ Object.assign(St.prototype, {
723
721
  getPointee(e) {
724
722
  return this.rawGetPointee && (e = this.rawGetPointee(e)), e;
725
723
  },
@@ -727,41 +725,42 @@ var Ut = (() => {
727
725
  var t;
728
726
  (t = this.rawDestructor) === null || t === void 0 || t.call(this, e);
729
727
  },
730
- argPackAdvance: X,
731
- readValueFromPointer: mt,
732
- fromWireType: Qr
728
+ argPackAdvance: z,
729
+ readValueFromPointer: ht,
730
+ fromWireType: Kr
733
731
  });
734
732
  };
735
- function Mt(e, t, r, n, a, o, s, u, l, h, p) {
736
- this.name = e, this.registeredClass = t, this.isReference = r, this.isConst = n, this.isSmartPointer = a, this.pointeeType = o, this.sharingPolicy = s, this.rawGetPointee = u, this.rawConstructor = l, this.rawShare = h, this.rawDestructor = p, !a && t.baseClass === void 0 ? n ? (this.toWireType = rn, this.destructorFunction = null) : (this.toWireType = an, this.destructorFunction = null) : this.toWireType = nn;
733
+ function St(e, t, r, n, a, i, u, s, l, d, h) {
734
+ this.name = e, this.registeredClass = t, this.isReference = r, this.isConst = n, this.isSmartPointer = a, this.pointeeType = i, this.sharingPolicy = u, this.rawGetPointee = s, this.rawConstructor = l, this.rawShare = d, this.rawDestructor = h, !a && t.baseClass === void 0 ? n ? (this.toWireType = on, this.destructorFunction = null) : (this.toWireType = un, this.destructorFunction = null) : this.toWireType = sn;
737
735
  }
738
- var Fe = (e, t, r) => {
736
+ var Ae = (e, t, r) => {
739
737
  c.hasOwnProperty(e) || Dt("Replacing nonexistent public symbol"), c[e].overloadTable !== void 0 && r !== void 0 ? c[e].overloadTable[r] = t : (c[e] = t, c[e].argCount = r);
740
- }, sn = (e, t, r) => {
738
+ }, ln = (e, t, r) => {
739
+ e = e.replace(/p/g, "i");
741
740
  var n = c["dynCall_" + e];
742
741
  return n(t, ...r);
743
- }, St = [], De, E = (e) => {
744
- var t = St[e];
745
- return t || (e >= St.length && (St.length = e + 1), St[e] = t = De.get(e)), t;
746
- }, un = function(e, t) {
742
+ }, jt = [], xe, T = (e) => {
743
+ var t = jt[e];
744
+ return t || (e >= jt.length && (jt.length = e + 1), jt[e] = t = xe.get(e)), t;
745
+ }, dn = function(e, t) {
747
746
  let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
748
747
  if (e.includes("j"))
749
- return sn(e, t, r);
750
- var n = E(t)(...r);
748
+ return ln(e, t, r);
749
+ var n = T(t)(...r);
751
750
  return n;
752
- }, cn = (e, t) => function() {
751
+ }, fn = (e, t) => function() {
753
752
  for (var r = arguments.length, n = new Array(r), a = 0; a < r; a++)
754
753
  n[a] = arguments[a];
755
- return un(e, t, n);
756
- }, N = (e, t) => {
757
- e = I(e);
754
+ return dn(e, t, n);
755
+ }, B = (e, t) => {
756
+ e = D(e);
758
757
  function r() {
759
- return e.includes("j") ? cn(e, t) : E(t);
758
+ return e.includes("j") ? fn(e, t) : T(t);
760
759
  }
761
760
  var n = r();
762
- return typeof n != "function" && C(`unknown function pointer with signature ${e}: ${t}`), n;
763
- }, ln = (e, t) => {
764
- var r = $t(t, function(n) {
761
+ return typeof n != "function" && w(`unknown function pointer with signature ${e}: ${t}`), n;
762
+ }, hn = (e, t) => {
763
+ var r = gt(t, function(n) {
765
764
  this.name = t, this.message = n;
766
765
  var a = new Error(n).stack;
767
766
  a !== void 0 && (this.stack = this.toString() + `
@@ -770,130 +769,130 @@ var Ut = (() => {
770
769
  return r.prototype = Object.create(e.prototype), r.prototype.constructor = r, r.prototype.toString = function() {
771
770
  return this.message === void 0 ? this.name : `${this.name}: ${this.message}`;
772
771
  }, r;
773
- }, Oe, xe = (e) => {
774
- var t = Le(e), r = I(t);
775
- return J(t), r;
776
- }, jt = (e, t) => {
772
+ }, De, Fe = (e) => {
773
+ var t = We(e), r = D(t);
774
+ return Y(t), r;
775
+ }, It = (e, t) => {
777
776
  var r = [], n = {};
778
- function a(o) {
779
- if (!n[o] && !rt[o]) {
780
- if (Ft[o]) {
781
- Ft[o].forEach(a);
777
+ function a(i) {
778
+ if (!n[i] && !K[i]) {
779
+ if (xt[i]) {
780
+ xt[i].forEach(a);
782
781
  return;
783
782
  }
784
- r.push(o), n[o] = !0;
783
+ r.push(i), n[i] = !0;
785
784
  }
786
785
  }
787
- throw t.forEach(a), new Oe(`${e}: ` + r.map(xe).join([", "]));
788
- }, dn = (e, t, r, n, a, o, s, u, l, h, p, w, v) => {
789
- p = I(p), o = N(a, o), u && (u = N(s, u)), h && (h = N(l, h)), v = N(w, v);
790
- var b = tn(p);
791
- Qt(b, function() {
792
- jt(`Cannot construct ${p} due to unbound types`, [n]);
793
- }), nt([e, t, r], n ? [n] : [], (O) => {
794
- O = O[0];
795
- var k, P;
796
- n ? (k = O.registeredClass, P = k.instancePrototype) : P = xt.prototype;
797
- var j = $t(p, function() {
798
- if (Object.getPrototypeOf(this) !== d)
799
- throw new ut("Use 'new' to construct " + p);
800
- if (m.constructor_body === void 0)
801
- throw new ut(p + " has no accessible constructor");
802
- for (var Qe = arguments.length, kt = new Array(Qe), Ht = 0; Ht < Qe; Ht++)
803
- kt[Ht] = arguments[Ht];
804
- var Ze = m.constructor_body[kt.length];
805
- if (Ze === void 0)
806
- throw new ut(`Tried to invoke ctor of ${p} with invalid number of parameters (${kt.length}) - expected (${Object.keys(m.constructor_body).toString()}) parameters instead!`);
807
- return Ze.apply(this, kt);
808
- }), d = Object.create(P, {
786
+ throw t.forEach(a), new De(`${e}: ` + r.map(Fe).join([", "]));
787
+ }, pn = (e, t, r, n, a, i, u, s, l, d, h, v, m) => {
788
+ h = D(h), i = B(a, i), s && (s = B(u, s)), d && (d = B(l, d)), m = B(v, m);
789
+ var $ = nn(h);
790
+ Qt($, function() {
791
+ It(`Cannot construct ${h} due to unbound types`, [n]);
792
+ }), tt([e, t, r], n ? [n] : [], (x) => {
793
+ x = x[0];
794
+ var O, E;
795
+ n ? (O = x.registeredClass, E = O.instancePrototype) : E = Ot.prototype;
796
+ var S = gt(h, function() {
797
+ if (Object.getPrototypeOf(this) !== et)
798
+ throw new ot("Use 'new' to construct " + h);
799
+ if (I.constructor_body === void 0)
800
+ throw new ot(h + " has no accessible constructor");
801
+ for (var Ye = arguments.length, Wt = new Array(Ye), kt = 0; kt < Ye; kt++)
802
+ Wt[kt] = arguments[kt];
803
+ var Qe = I.constructor_body[Wt.length];
804
+ if (Qe === void 0)
805
+ throw new ot(`Tried to invoke ctor of ${h} with invalid number of parameters (${Wt.length}) - expected (${Object.keys(I.constructor_body).toString()}) parameters instead!`);
806
+ return Qe.apply(this, Wt);
807
+ }), et = Object.create(E, {
809
808
  constructor: {
810
- value: j
809
+ value: S
811
810
  }
812
811
  });
813
- j.prototype = d;
814
- var m = new en(p, j, d, v, k, o, u, h);
815
- if (m.baseClass) {
816
- var x, M;
817
- (M = (x = m.baseClass).__derivedClasses) !== null && M !== void 0 || (x.__derivedClasses = []), m.baseClass.__derivedClasses.push(m);
812
+ S.prototype = et;
813
+ var I = new an(h, S, et, m, O, i, s, d);
814
+ if (I.baseClass) {
815
+ var Q, Mt;
816
+ (Mt = (Q = I.baseClass).__derivedClasses) !== null && Mt !== void 0 || (Q.__derivedClasses = []), I.baseClass.__derivedClasses.push(I);
818
817
  }
819
- var ct = new Mt(p, m, !0, !1, !1), Wt = new Mt(p + "*", m, !1, !1, !1), qe = new Mt(p + " const*", m, !1, !0, !1);
818
+ var Ha = new St(h, I, !0, !1, !1), Xe = new St(h + "*", I, !1, !1, !1), qe = new St(h + " const*", I, !1, !0, !1);
820
819
  return Ee[e] = {
821
- pointerType: Wt,
820
+ pointerType: Xe,
822
821
  constPointerType: qe
823
- }, Fe(b, j), [ct, Wt, qe];
822
+ }, Ae($, S), [Ha, Xe, qe];
824
823
  });
825
824
  }, Jt = (e, t) => {
826
825
  for (var r = [], n = 0; n < e; n++)
827
- r.push(_[t + n * 4 >> 2]);
826
+ r.push(b[t + n * 4 >> 2]);
828
827
  return r;
829
828
  };
830
- function hn(e) {
829
+ function vn(e) {
831
830
  for (var t = 1; t < e.length; ++t)
832
831
  if (e[t] !== null && e[t].destructorFunction === void 0)
833
832
  return !0;
834
833
  return !1;
835
834
  }
836
- function Kt(e, t, r, n, a, o) {
837
- var s = t.length;
838
- s < 2 && C("argTypes array size mismatch! Must at least get return value and 'this' types!");
839
- var u = t[1] !== null && r !== null, l = hn(t), h = t[0].name !== "void", p = s - 2, w = new Array(p), v = [], b = [], O = function() {
840
- arguments.length !== p && C(`function ${e} called with ${arguments.length} arguments, expected ${p}`), b.length = 0;
841
- var k;
842
- v.length = u ? 2 : 1, v[0] = a, u && (k = t[1].toWireType(b, this), v[1] = k);
843
- for (var P = 0; P < p; ++P)
844
- w[P] = t[P + 2].toWireType(b, P < 0 || arguments.length <= P ? void 0 : arguments[P]), v.push(w[P]);
845
- var j = n(...v);
846
- function d(m) {
835
+ function Kt(e, t, r, n, a, i) {
836
+ var u = t.length;
837
+ u < 2 && w("argTypes array size mismatch! Must at least get return value and 'this' types!");
838
+ var s = t[1] !== null && r !== null, l = vn(t), d = t[0].name !== "void", h = u - 2, v = new Array(h), m = [], $ = [], x = function() {
839
+ arguments.length !== h && w(`function ${e} called with ${arguments.length} arguments, expected ${h}`), $.length = 0;
840
+ var O;
841
+ m.length = s ? 2 : 1, m[0] = a, s && (O = t[1].toWireType($, this), m[1] = O);
842
+ for (var E = 0; E < h; ++E)
843
+ v[E] = t[E + 2].toWireType($, E < 0 || arguments.length <= E ? void 0 : arguments[E]), m.push(v[E]);
844
+ var S = n(...m);
845
+ function et(I) {
847
846
  if (l)
848
- Nt(b);
847
+ Gt($);
849
848
  else
850
- for (var x = u ? 1 : 2; x < t.length; x++) {
851
- var M = x === 1 ? k : w[x - 2];
852
- t[x].destructorFunction !== null && t[x].destructorFunction(M);
849
+ for (var Q = s ? 1 : 2; Q < t.length; Q++) {
850
+ var Mt = Q === 1 ? O : v[Q - 2];
851
+ t[Q].destructorFunction !== null && t[Q].destructorFunction(Mt);
853
852
  }
854
- if (h)
855
- return t[0].fromWireType(m);
853
+ if (d)
854
+ return t[0].fromWireType(I);
856
855
  }
857
- return d(j);
856
+ return et(S);
858
857
  };
859
- return $t(e, O);
858
+ return gt(e, x);
860
859
  }
861
- var fn = (e, t, r, n, a, o) => {
862
- var s = Jt(t, r);
863
- a = N(n, a), nt([], [e], (u) => {
864
- u = u[0];
865
- var l = `constructor ${u.name}`;
866
- if (u.registeredClass.constructor_body === void 0 && (u.registeredClass.constructor_body = []), u.registeredClass.constructor_body[t - 1] !== void 0)
867
- throw new ut(`Cannot register multiple constructors with identical number of parameters (${t - 1}) for class '${u.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
868
- return u.registeredClass.constructor_body[t - 1] = () => {
869
- jt(`Cannot construct ${u.name} due to unbound types`, s);
870
- }, nt([], s, (h) => (h.splice(1, 0, null), u.registeredClass.constructor_body[t - 1] = Kt(l, h, null, a, o), [])), [];
860
+ var mn = (e, t, r, n, a, i) => {
861
+ var u = Jt(t, r);
862
+ a = B(n, a), tt([], [e], (s) => {
863
+ s = s[0];
864
+ var l = `constructor ${s.name}`;
865
+ if (s.registeredClass.constructor_body === void 0 && (s.registeredClass.constructor_body = []), s.registeredClass.constructor_body[t - 1] !== void 0)
866
+ throw new ot(`Cannot register multiple constructors with identical number of parameters (${t - 1}) for class '${s.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
867
+ return s.registeredClass.constructor_body[t - 1] = () => {
868
+ It(`Cannot construct ${s.name} due to unbound types`, u);
869
+ }, tt([], u, (d) => (d.splice(1, 0, null), s.registeredClass.constructor_body[t - 1] = Kt(l, d, null, a, i), [])), [];
871
870
  });
872
- }, Me = (e) => {
871
+ }, Oe = (e) => {
873
872
  e = e.trim();
874
873
  const t = e.indexOf("(");
875
874
  return t !== -1 ? e.substr(0, t) : e;
876
- }, pn = (e, t, r, n, a, o, s, u, l) => {
877
- var h = Jt(r, n);
878
- t = I(t), t = Me(t), o = N(a, o), nt([], [e], (p) => {
879
- p = p[0];
880
- var w = `${p.name}.${t}`;
881
- t.startsWith("@@") && (t = Symbol[t.substring(2)]), u && p.registeredClass.pureVirtualFunctions.push(t);
882
- function v() {
883
- jt(`Cannot call ${w} due to unbound types`, h);
875
+ }, yn = (e, t, r, n, a, i, u, s, l) => {
876
+ var d = Jt(r, n);
877
+ t = D(t), t = Oe(t), i = B(a, i), tt([], [e], (h) => {
878
+ h = h[0];
879
+ var v = `${h.name}.${t}`;
880
+ t.startsWith("@@") && (t = Symbol[t.substring(2)]), s && h.registeredClass.pureVirtualFunctions.push(t);
881
+ function m() {
882
+ It(`Cannot call ${v} due to unbound types`, d);
884
883
  }
885
- var b = p.registeredClass.instancePrototype, O = b[t];
886
- return O === void 0 || O.overloadTable === void 0 && O.className !== p.name && O.argCount === r - 2 ? (v.argCount = r - 2, v.className = p.name, b[t] = v) : (Ae(b, t, w), b[t].overloadTable[r - 2] = v), nt([], h, (k) => {
887
- var P = Kt(w, k, p, o, s);
888
- return b[t].overloadTable === void 0 ? (P.argCount = r - 2, b[t] = P) : b[t].overloadTable[r - 2] = P, [];
884
+ var $ = h.registeredClass.instancePrototype, x = $[t];
885
+ return x === void 0 || x.overloadTable === void 0 && x.className !== h.name && x.argCount === r - 2 ? (m.argCount = r - 2, m.className = h.name, $[t] = m) : (_e($, t, v), $[t].overloadTable[r - 2] = m), tt([], d, (O) => {
886
+ var E = Kt(v, O, h, i, u);
887
+ return $[t].overloadTable === void 0 ? (E.argCount = r - 2, $[t] = E) : $[t].overloadTable[r - 2] = E, [];
889
888
  }), [];
890
889
  });
891
- }, te = [], Q = [], ee = (e) => {
892
- e > 9 && --Q[e + 1] === 0 && (Q[e] = void 0, te.push(e));
893
- }, mn = () => Q.length / 2 - 5 - te.length, yn = () => {
894
- Q.push(0, 1, void 0, 1, null, 1, !0, 1, !1, 1), c.count_emval_handles = mn;
895
- }, Z = {
896
- toValue: (e) => (e || C("Cannot use deleted val. handle = " + e), Q[e]),
890
+ }, te = [], X = [], ee = (e) => {
891
+ e > 9 && --X[e + 1] === 0 && (X[e] = void 0, te.push(e));
892
+ }, gn = () => X.length / 2 - 5 - te.length, $n = () => {
893
+ X.push(0, 1, void 0, 1, null, 1, !0, 1, !1, 1), c.count_emval_handles = gn;
894
+ }, q = {
895
+ toValue: (e) => (e || w("Cannot use deleted val. handle = " + e), X[e]),
897
896
  toHandle: (e) => {
898
897
  switch (e) {
899
898
  case void 0:
@@ -905,85 +904,85 @@ var Ut = (() => {
905
904
  case !1:
906
905
  return 8;
907
906
  default: {
908
- const t = te.pop() || Q.length;
909
- return Q[t] = e, Q[t + 1] = 1, t;
907
+ const t = te.pop() || X.length;
908
+ return X[t] = e, X[t + 1] = 1, t;
910
909
  }
911
910
  }
912
911
  }
913
- }, vn = {
912
+ }, wn = {
914
913
  name: "emscripten::val",
915
914
  fromWireType: (e) => {
916
- var t = Z.toValue(e);
915
+ var t = q.toValue(e);
917
916
  return ee(e), t;
918
917
  },
919
- toWireType: (e, t) => Z.toHandle(t),
920
- argPackAdvance: X,
921
- readValueFromPointer: mt,
918
+ toWireType: (e, t) => q.toHandle(t),
919
+ argPackAdvance: z,
920
+ readValueFromPointer: ht,
922
921
  destructorFunction: null
923
- }, Se = (e) => G(e, vn), gn = (e, t, r) => {
922
+ }, Se = (e) => V(e, wn), bn = (e, t, r) => {
924
923
  switch (t) {
925
924
  case 1:
926
925
  return r ? function(n) {
927
- return this.fromWireType(z[n]);
926
+ return this.fromWireType(L[n]);
928
927
  } : function(n) {
929
- return this.fromWireType(R[n]);
928
+ return this.fromWireType(F[n]);
930
929
  };
931
930
  case 2:
932
931
  return r ? function(n) {
933
- return this.fromWireType(ot[n >> 1]);
932
+ return this.fromWireType(nt[n >> 1]);
934
933
  } : function(n) {
935
- return this.fromWireType(ft[n >> 1]);
934
+ return this.fromWireType(dt[n >> 1]);
936
935
  };
937
936
  case 4:
938
937
  return r ? function(n) {
939
- return this.fromWireType(W[n >> 2]);
938
+ return this.fromWireType(Z[n >> 2]);
940
939
  } : function(n) {
941
- return this.fromWireType(_[n >> 2]);
940
+ return this.fromWireType(b[n >> 2]);
942
941
  };
943
942
  default:
944
943
  throw new TypeError(`invalid integer width (${t}): ${e}`);
945
944
  }
946
- }, wn = (e, t, r, n) => {
947
- t = I(t);
945
+ }, Cn = (e, t, r, n) => {
946
+ t = D(t);
948
947
  function a() {
949
948
  }
950
- a.values = {}, G(e, {
949
+ a.values = {}, V(e, {
951
950
  name: t,
952
951
  constructor: a,
953
- fromWireType: function(o) {
954
- return this.constructor.values[o];
952
+ fromWireType: function(i) {
953
+ return this.constructor.values[i];
955
954
  },
956
- toWireType: (o, s) => s.value,
957
- argPackAdvance: X,
958
- readValueFromPointer: gn(t, r, n),
955
+ toWireType: (i, u) => u.value,
956
+ argPackAdvance: z,
957
+ readValueFromPointer: bn(t, r, n),
959
958
  destructorFunction: null
960
959
  }), Qt(t, a);
961
960
  }, re = (e, t) => {
962
- var r = rt[e];
963
- return r === void 0 && C(`${t} has unknown type ${xe(e)}`), r;
964
- }, $n = (e, t, r) => {
961
+ var r = K[e];
962
+ return r === void 0 && w(`${t} has unknown type ${Fe(e)}`), r;
963
+ }, Tn = (e, t, r) => {
965
964
  var n = re(e, "enum");
966
- t = I(t);
967
- var a = n.constructor, o = Object.create(n.constructor.prototype, {
965
+ t = D(t);
966
+ var a = n.constructor, i = Object.create(n.constructor.prototype, {
968
967
  value: {
969
968
  value: r
970
969
  },
971
970
  constructor: {
972
- value: $t(`${n.name}_${t}`, function() {
971
+ value: gt(`${n.name}_${t}`, function() {
973
972
  })
974
973
  }
975
974
  });
976
- a.values[r] = o, a[t] = o;
975
+ a.values[r] = i, a[t] = i;
977
976
  }, ne = (e) => {
978
977
  if (e === null)
979
978
  return "null";
980
979
  var t = typeof e;
981
980
  return t === "object" || t === "array" || t === "function" ? e.toString() : "" + e;
982
- }, bn = (e, t) => {
981
+ }, Pn = (e, t) => {
983
982
  switch (t) {
984
983
  case 4:
985
984
  return function(r) {
986
- return this.fromWireType(he[r >> 2]);
985
+ return this.fromWireType(de[r >> 2]);
987
986
  };
988
987
  case 8:
989
988
  return function(r) {
@@ -992,274 +991,261 @@ var Ut = (() => {
992
991
  default:
993
992
  throw new TypeError(`invalid float width (${t}): ${e}`);
994
993
  }
995
- }, Cn = (e, t, r) => {
996
- t = I(t), G(e, {
994
+ }, En = (e, t, r) => {
995
+ t = D(t), V(e, {
997
996
  name: t,
998
997
  fromWireType: (n) => n,
999
998
  toWireType: (n, a) => a,
1000
- argPackAdvance: X,
1001
- readValueFromPointer: bn(t, r),
999
+ argPackAdvance: z,
1000
+ readValueFromPointer: Pn(t, r),
1002
1001
  destructorFunction: null
1003
1002
  });
1004
- }, _n = (e, t, r, n, a, o, s) => {
1005
- var u = Jt(t, r);
1006
- e = I(e), e = Me(e), a = N(n, a), Qt(e, function() {
1007
- jt(`Cannot call ${e} due to unbound types`, u);
1008
- }, t - 1), nt([], u, (l) => {
1009
- var h = [l[0], null].concat(l.slice(1));
1010
- return Fe(e, Kt(e, h, null, a, o), t - 1), [];
1003
+ }, _n = (e, t, r, n, a, i, u) => {
1004
+ var s = Jt(t, r);
1005
+ e = D(e), e = Oe(e), a = B(n, a), Qt(e, function() {
1006
+ It(`Cannot call ${e} due to unbound types`, s);
1007
+ }, t - 1), tt([], s, (l) => {
1008
+ var d = [l[0], null].concat(l.slice(1));
1009
+ return Ae(e, Kt(e, d, null, a, i), t - 1), [];
1011
1010
  });
1012
- }, Tn = (e, t, r) => {
1011
+ }, An = (e, t, r) => {
1013
1012
  switch (t) {
1014
1013
  case 1:
1015
- return r ? (n) => z[n] : (n) => R[n];
1014
+ return r ? (n) => L[n] : (n) => F[n];
1016
1015
  case 2:
1017
- return r ? (n) => ot[n >> 1] : (n) => ft[n >> 1];
1016
+ return r ? (n) => nt[n >> 1] : (n) => dt[n >> 1];
1018
1017
  case 4:
1019
- return r ? (n) => W[n >> 2] : (n) => _[n >> 2];
1018
+ return r ? (n) => Z[n >> 2] : (n) => b[n >> 2];
1020
1019
  default:
1021
1020
  throw new TypeError(`invalid integer width (${t}): ${e}`);
1022
1021
  }
1023
- }, Pn = (e, t, r, n, a) => {
1024
- t = I(t);
1025
- var o = (p) => p;
1022
+ }, xn = (e, t, r, n, a) => {
1023
+ t = D(t);
1024
+ var i = (h) => h;
1026
1025
  if (n === 0) {
1027
- var s = 32 - 8 * r;
1028
- o = (p) => p << s >>> s;
1029
- }
1030
- var u = t.includes("unsigned"), l = (p, w) => {
1031
- }, h;
1032
- u ? h = function(p, w) {
1033
- return l(w, this.name), w >>> 0;
1034
- } : h = function(p, w) {
1035
- return l(w, this.name), w;
1036
- }, G(e, {
1026
+ var u = 32 - 8 * r;
1027
+ i = (h) => h << u >>> u;
1028
+ }
1029
+ var s = t.includes("unsigned"), l = (h, v) => {
1030
+ }, d;
1031
+ s ? d = function(h, v) {
1032
+ return l(v, this.name), v >>> 0;
1033
+ } : d = function(h, v) {
1034
+ return l(v, this.name), v;
1035
+ }, V(e, {
1037
1036
  name: t,
1038
- fromWireType: o,
1039
- toWireType: h,
1040
- argPackAdvance: X,
1041
- readValueFromPointer: Tn(t, r, n !== 0),
1037
+ fromWireType: i,
1038
+ toWireType: d,
1039
+ argPackAdvance: z,
1040
+ readValueFromPointer: An(t, r, n !== 0),
1042
1041
  destructorFunction: null
1043
1042
  });
1044
- }, En = (e, t, r) => {
1043
+ }, Dn = (e, t, r) => {
1045
1044
  var n = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array], a = n[t];
1046
- function o(s) {
1047
- var u = _[s >> 2], l = _[s + 4 >> 2];
1048
- return new a(z.buffer, l, u);
1045
+ function i(u) {
1046
+ var s = b[u >> 2], l = b[u + 4 >> 2];
1047
+ return new a(L.buffer, l, s);
1049
1048
  }
1050
- r = I(r), G(e, {
1049
+ r = D(r), V(e, {
1051
1050
  name: r,
1052
- fromWireType: o,
1053
- argPackAdvance: X,
1054
- readValueFromPointer: o
1051
+ fromWireType: i,
1052
+ argPackAdvance: z,
1053
+ readValueFromPointer: i
1055
1054
  }, {
1056
1055
  ignoreDuplicateRegistrations: !0
1057
1056
  });
1058
- }, An = (e, t) => {
1057
+ }, Fn = (e, t) => {
1059
1058
  Se(e);
1060
- }, je = (e, t, r, n) => {
1061
- if (!(n > 0))
1062
- return 0;
1063
- for (var a = r, o = r + n - 1, s = 0; s < e.length; ++s) {
1064
- var u = e.charCodeAt(s);
1065
- if (u >= 55296 && u <= 57343) {
1066
- var l = e.charCodeAt(++s);
1067
- u = 65536 + ((u & 1023) << 10) | l & 1023;
1059
+ }, On = (e, t, r, n) => {
1060
+ if (!(n > 0)) return 0;
1061
+ for (var a = r, i = r + n - 1, u = 0; u < e.length; ++u) {
1062
+ var s = e.charCodeAt(u);
1063
+ if (s >= 55296 && s <= 57343) {
1064
+ var l = e.charCodeAt(++u);
1065
+ s = 65536 + ((s & 1023) << 10) | l & 1023;
1068
1066
  }
1069
- if (u <= 127) {
1070
- if (r >= o)
1071
- break;
1072
- t[r++] = u;
1073
- } else if (u <= 2047) {
1074
- if (r + 1 >= o)
1075
- break;
1076
- t[r++] = 192 | u >> 6, t[r++] = 128 | u & 63;
1077
- } else if (u <= 65535) {
1078
- if (r + 2 >= o)
1079
- break;
1080
- t[r++] = 224 | u >> 12, t[r++] = 128 | u >> 6 & 63, t[r++] = 128 | u & 63;
1067
+ if (s <= 127) {
1068
+ if (r >= i) break;
1069
+ t[r++] = s;
1070
+ } else if (s <= 2047) {
1071
+ if (r + 1 >= i) break;
1072
+ t[r++] = 192 | s >> 6, t[r++] = 128 | s & 63;
1073
+ } else if (s <= 65535) {
1074
+ if (r + 2 >= i) break;
1075
+ t[r++] = 224 | s >> 12, t[r++] = 128 | s >> 6 & 63, t[r++] = 128 | s & 63;
1081
1076
  } else {
1082
- if (r + 3 >= o)
1083
- break;
1084
- t[r++] = 240 | u >> 18, t[r++] = 128 | u >> 12 & 63, t[r++] = 128 | u >> 6 & 63, t[r++] = 128 | u & 63;
1077
+ if (r + 3 >= i) break;
1078
+ t[r++] = 240 | s >> 18, t[r++] = 128 | s >> 12 & 63, t[r++] = 128 | s >> 6 & 63, t[r++] = 128 | s & 63;
1085
1079
  }
1086
1080
  }
1087
1081
  return t[r] = 0, r - a;
1088
- }, Fn = (e, t, r) => je(e, R, t, r), Ie = (e) => {
1082
+ }, $t = (e, t, r) => On(e, F, t, r), Sn = (e) => {
1089
1083
  for (var t = 0, r = 0; r < e.length; ++r) {
1090
1084
  var n = e.charCodeAt(r);
1091
1085
  n <= 127 ? t++ : n <= 2047 ? t += 2 : n >= 55296 && n <= 57343 ? (t += 4, ++r) : t += 3;
1092
1086
  }
1093
1087
  return t;
1094
- }, Re = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0, We = (e, t, r) => {
1095
- for (var n = t + r, a = t; e[a] && !(a >= n); )
1096
- ++a;
1097
- if (a - t > 16 && e.buffer && Re)
1098
- return Re.decode(e.subarray(t, a));
1099
- for (var o = ""; t < a; ) {
1100
- var s = e[t++];
1101
- if (!(s & 128)) {
1102
- o += String.fromCharCode(s);
1088
+ }, je = typeof TextDecoder < "u" ? new TextDecoder() : void 0, Ie = (e, t, r) => {
1089
+ for (var n = t + r, a = t; e[a] && !(a >= n); ) ++a;
1090
+ if (a - t > 16 && e.buffer && je)
1091
+ return je.decode(e.subarray(t, a));
1092
+ for (var i = ""; t < a; ) {
1093
+ var u = e[t++];
1094
+ if (!(u & 128)) {
1095
+ i += String.fromCharCode(u);
1103
1096
  continue;
1104
1097
  }
1105
- var u = e[t++] & 63;
1106
- if ((s & 224) == 192) {
1107
- o += String.fromCharCode((s & 31) << 6 | u);
1098
+ var s = e[t++] & 63;
1099
+ if ((u & 224) == 192) {
1100
+ i += String.fromCharCode((u & 31) << 6 | s);
1108
1101
  continue;
1109
1102
  }
1110
1103
  var l = e[t++] & 63;
1111
- if ((s & 240) == 224 ? s = (s & 15) << 12 | u << 6 | l : s = (s & 7) << 18 | u << 12 | l << 6 | e[t++] & 63, s < 65536)
1112
- o += String.fromCharCode(s);
1104
+ if ((u & 240) == 224 ? u = (u & 15) << 12 | s << 6 | l : u = (u & 7) << 18 | s << 12 | l << 6 | e[t++] & 63, u < 65536)
1105
+ i += String.fromCharCode(u);
1113
1106
  else {
1114
- var h = s - 65536;
1115
- o += String.fromCharCode(55296 | h >> 10, 56320 | h & 1023);
1107
+ var d = u - 65536;
1108
+ i += String.fromCharCode(55296 | d >> 10, 56320 | d & 1023);
1116
1109
  }
1117
1110
  }
1118
- return o;
1119
- }, ae = (e, t) => e ? We(R, e, t) : "", Dn = (e, t) => {
1120
- t = I(t);
1111
+ return i;
1112
+ }, jn = (e, t) => e ? Ie(F, e, t) : "", In = (e, t) => {
1113
+ t = D(t);
1121
1114
  var r = t === "std::string";
1122
- G(e, {
1115
+ V(e, {
1123
1116
  name: t,
1124
1117
  fromWireType(n) {
1125
- var a = _[n >> 2], o = n + 4, s;
1118
+ var a = b[n >> 2], i = n + 4, u;
1126
1119
  if (r)
1127
- for (var u = o, l = 0; l <= a; ++l) {
1128
- var h = o + l;
1129
- if (l == a || R[h] == 0) {
1130
- var p = h - u, w = ae(u, p);
1131
- s === void 0 ? s = w : (s += "\0", s += w), u = h + 1;
1120
+ for (var s = i, l = 0; l <= a; ++l) {
1121
+ var d = i + l;
1122
+ if (l == a || F[d] == 0) {
1123
+ var h = d - s, v = jn(s, h);
1124
+ u === void 0 ? u = v : (u += "\0", u += v), s = d + 1;
1132
1125
  }
1133
1126
  }
1134
1127
  else {
1135
- for (var v = new Array(a), l = 0; l < a; ++l)
1136
- v[l] = String.fromCharCode(R[o + l]);
1137
- s = v.join("");
1128
+ for (var m = new Array(a), l = 0; l < a; ++l)
1129
+ m[l] = String.fromCharCode(F[i + l]);
1130
+ u = m.join("");
1138
1131
  }
1139
- return J(n), s;
1132
+ return Y(n), u;
1140
1133
  },
1141
1134
  toWireType(n, a) {
1142
1135
  a instanceof ArrayBuffer && (a = new Uint8Array(a));
1143
- var o, s = typeof a == "string";
1144
- s || a instanceof Uint8Array || a instanceof Uint8ClampedArray || a instanceof Int8Array || C("Cannot pass non-string to std::string"), r && s ? o = Ie(a) : o = a.length;
1145
- var u = se(4 + o + 1), l = u + 4;
1146
- if (_[u >> 2] = o, r && s)
1147
- Fn(a, l, o + 1);
1148
- else if (s)
1149
- for (var h = 0; h < o; ++h) {
1150
- var p = a.charCodeAt(h);
1151
- p > 255 && (J(l), C("String has UTF-16 code units that do not fit in 8 bits")), R[l + h] = p;
1136
+ var i, u = typeof a == "string";
1137
+ u || a instanceof Uint8Array || a instanceof Uint8ClampedArray || a instanceof Int8Array || w("Cannot pass non-string to std::string"), r && u ? i = Sn(a) : i = a.length;
1138
+ var s = ie(4 + i + 1), l = s + 4;
1139
+ if (b[s >> 2] = i, r && u)
1140
+ $t(a, l, i + 1);
1141
+ else if (u)
1142
+ for (var d = 0; d < i; ++d) {
1143
+ var h = a.charCodeAt(d);
1144
+ h > 255 && (Y(l), w("String has UTF-16 code units that do not fit in 8 bits")), F[l + d] = h;
1152
1145
  }
1153
1146
  else
1154
- for (var h = 0; h < o; ++h)
1155
- R[l + h] = a[h];
1156
- return n !== null && n.push(J, u), u;
1147
+ for (var d = 0; d < i; ++d)
1148
+ F[l + d] = a[d];
1149
+ return n !== null && n.push(Y, s), s;
1157
1150
  },
1158
- argPackAdvance: X,
1159
- readValueFromPointer: mt,
1151
+ argPackAdvance: z,
1152
+ readValueFromPointer: ht,
1160
1153
  destructorFunction(n) {
1161
- J(n);
1154
+ Y(n);
1162
1155
  }
1163
1156
  });
1164
- }, ke = typeof TextDecoder < "u" ? new TextDecoder("utf-16le") : void 0, On = (e, t) => {
1165
- for (var r = e, n = r >> 1, a = n + t / 2; !(n >= a) && ft[n]; )
1166
- ++n;
1167
- if (r = n << 1, r - e > 32 && ke)
1168
- return ke.decode(R.subarray(e, r));
1169
- for (var o = "", s = 0; !(s >= t / 2); ++s) {
1170
- var u = ot[e + s * 2 >> 1];
1171
- if (u == 0)
1172
- break;
1173
- o += String.fromCharCode(u);
1157
+ }, Re = typeof TextDecoder < "u" ? new TextDecoder("utf-16le") : void 0, Rn = (e, t) => {
1158
+ for (var r = e, n = r >> 1, a = n + t / 2; !(n >= a) && dt[n]; ) ++n;
1159
+ if (r = n << 1, r - e > 32 && Re) return Re.decode(F.subarray(e, r));
1160
+ for (var i = "", u = 0; !(u >= t / 2); ++u) {
1161
+ var s = nt[e + u * 2 >> 1];
1162
+ if (s == 0) break;
1163
+ i += String.fromCharCode(s);
1174
1164
  }
1175
- return o;
1176
- }, xn = (e, t, r) => {
1165
+ return i;
1166
+ }, Mn = (e, t, r) => {
1177
1167
  var n;
1178
- if ((n = r) !== null && n !== void 0 || (r = 2147483647), r < 2)
1179
- return 0;
1168
+ if ((n = r) !== null && n !== void 0 || (r = 2147483647), r < 2) return 0;
1180
1169
  r -= 2;
1181
- for (var a = t, o = r < e.length * 2 ? r / 2 : e.length, s = 0; s < o; ++s) {
1182
- var u = e.charCodeAt(s);
1183
- ot[t >> 1] = u, t += 2;
1170
+ for (var a = t, i = r < e.length * 2 ? r / 2 : e.length, u = 0; u < i; ++u) {
1171
+ var s = e.charCodeAt(u);
1172
+ nt[t >> 1] = s, t += 2;
1184
1173
  }
1185
- return ot[t >> 1] = 0, t - a;
1186
- }, Mn = (e) => e.length * 2, Sn = (e, t) => {
1174
+ return nt[t >> 1] = 0, t - a;
1175
+ }, Wn = (e) => e.length * 2, kn = (e, t) => {
1187
1176
  for (var r = 0, n = ""; !(r >= t / 4); ) {
1188
- var a = W[e + r * 4 >> 2];
1189
- if (a == 0)
1190
- break;
1177
+ var a = Z[e + r * 4 >> 2];
1178
+ if (a == 0) break;
1191
1179
  if (++r, a >= 65536) {
1192
- var o = a - 65536;
1193
- n += String.fromCharCode(55296 | o >> 10, 56320 | o & 1023);
1180
+ var i = a - 65536;
1181
+ n += String.fromCharCode(55296 | i >> 10, 56320 | i & 1023);
1194
1182
  } else
1195
1183
  n += String.fromCharCode(a);
1196
1184
  }
1197
1185
  return n;
1198
- }, jn = (e, t, r) => {
1186
+ }, Bn = (e, t, r) => {
1199
1187
  var n;
1200
- if ((n = r) !== null && n !== void 0 || (r = 2147483647), r < 4)
1201
- return 0;
1202
- for (var a = t, o = a + r - 4, s = 0; s < e.length; ++s) {
1203
- var u = e.charCodeAt(s);
1204
- if (u >= 55296 && u <= 57343) {
1205
- var l = e.charCodeAt(++s);
1206
- u = 65536 + ((u & 1023) << 10) | l & 1023;
1188
+ if ((n = r) !== null && n !== void 0 || (r = 2147483647), r < 4) return 0;
1189
+ for (var a = t, i = a + r - 4, u = 0; u < e.length; ++u) {
1190
+ var s = e.charCodeAt(u);
1191
+ if (s >= 55296 && s <= 57343) {
1192
+ var l = e.charCodeAt(++u);
1193
+ s = 65536 + ((s & 1023) << 10) | l & 1023;
1207
1194
  }
1208
- if (W[t >> 2] = u, t += 4, t + 4 > o)
1209
- break;
1195
+ if (Z[t >> 2] = s, t += 4, t + 4 > i) break;
1210
1196
  }
1211
- return W[t >> 2] = 0, t - a;
1212
- }, In = (e) => {
1197
+ return Z[t >> 2] = 0, t - a;
1198
+ }, Hn = (e) => {
1213
1199
  for (var t = 0, r = 0; r < e.length; ++r) {
1214
1200
  var n = e.charCodeAt(r);
1215
1201
  n >= 55296 && n <= 57343 && ++r, t += 4;
1216
1202
  }
1217
1203
  return t;
1218
- }, Rn = (e, t, r) => {
1219
- r = I(r);
1220
- var n, a, o, s;
1221
- t === 2 ? (n = On, a = xn, s = Mn, o = (u) => ft[u >> 1]) : t === 4 && (n = Sn, a = jn, s = In, o = (u) => _[u >> 2]), G(e, {
1204
+ }, Un = (e, t, r) => {
1205
+ r = D(r);
1206
+ var n, a, i, u;
1207
+ t === 2 ? (n = Rn, a = Mn, u = Wn, i = (s) => dt[s >> 1]) : t === 4 && (n = kn, a = Bn, u = Hn, i = (s) => b[s >> 2]), V(e, {
1222
1208
  name: r,
1223
- fromWireType: (u) => {
1224
- for (var l = _[u >> 2], h, p = u + 4, w = 0; w <= l; ++w) {
1225
- var v = u + 4 + w * t;
1226
- if (w == l || o(v) == 0) {
1227
- var b = v - p, O = n(p, b);
1228
- h === void 0 ? h = O : (h += "\0", h += O), p = v + t;
1209
+ fromWireType: (s) => {
1210
+ for (var l = b[s >> 2], d, h = s + 4, v = 0; v <= l; ++v) {
1211
+ var m = s + 4 + v * t;
1212
+ if (v == l || i(m) == 0) {
1213
+ var $ = m - h, x = n(h, $);
1214
+ d === void 0 ? d = x : (d += "\0", d += x), h = m + t;
1229
1215
  }
1230
1216
  }
1231
- return J(u), h;
1217
+ return Y(s), d;
1232
1218
  },
1233
- toWireType: (u, l) => {
1234
- typeof l != "string" && C(`Cannot pass non-string to C++ string type ${r}`);
1235
- var h = s(l), p = se(4 + h + t);
1236
- return _[p >> 2] = h / t, a(l, p + 4, h + t), u !== null && u.push(J, p), p;
1219
+ toWireType: (s, l) => {
1220
+ typeof l != "string" && w(`Cannot pass non-string to C++ string type ${r}`);
1221
+ var d = u(l), h = ie(4 + d + t);
1222
+ return b[h >> 2] = d / t, a(l, h + 4, d + t), s !== null && s.push(Y, h), h;
1237
1223
  },
1238
- argPackAdvance: X,
1239
- readValueFromPointer: mt,
1240
- destructorFunction(u) {
1241
- J(u);
1224
+ argPackAdvance: z,
1225
+ readValueFromPointer: ht,
1226
+ destructorFunction(s) {
1227
+ Y(s);
1242
1228
  }
1243
1229
  });
1244
- }, Wn = (e, t, r, n, a, o) => {
1230
+ }, Ln = (e, t, r, n, a, i) => {
1245
1231
  At[e] = {
1246
- name: I(t),
1247
- rawConstructor: N(r, n),
1248
- rawDestructor: N(a, o),
1232
+ name: D(t),
1233
+ rawConstructor: B(r, n),
1234
+ rawDestructor: B(a, i),
1249
1235
  fields: []
1250
1236
  };
1251
- }, kn = (e, t, r, n, a, o, s, u, l, h) => {
1237
+ }, Vn = (e, t, r, n, a, i, u, s, l, d) => {
1252
1238
  At[e].fields.push({
1253
- fieldName: I(t),
1239
+ fieldName: D(t),
1254
1240
  getterReturnType: r,
1255
- getter: N(n, a),
1256
- getterContext: o,
1257
- setterArgumentType: s,
1258
- setter: N(u, l),
1259
- setterContext: h
1241
+ getter: B(n, a),
1242
+ getterContext: i,
1243
+ setterArgumentType: u,
1244
+ setter: B(s, l),
1245
+ setterContext: d
1260
1246
  });
1261
- }, Hn = (e, t) => {
1262
- t = I(t), G(e, {
1247
+ }, zn = (e, t) => {
1248
+ t = D(t), V(e, {
1263
1249
  isVoid: !0,
1264
1250
  name: t,
1265
1251
  argPackAdvance: 0,
@@ -1268,10 +1254,10 @@ var Ut = (() => {
1268
1254
  toWireType: (r, n) => {
1269
1255
  }
1270
1256
  });
1271
- }, oe = [], Bn = (e, t, r, n) => (e = oe[e], t = Z.toValue(t), e(null, t, r, n)), Un = {}, Ln = (e) => {
1272
- var t = Un[e];
1273
- return t === void 0 ? I(e) : t;
1274
- }, He = () => {
1257
+ }, Nn = (e, t, r) => F.copyWithin(e, t, t + r), ae = [], Gn = (e, t, r, n) => (e = ae[e], t = q.toValue(t), e(null, t, r, n)), Xn = {}, qn = (e) => {
1258
+ var t = Xn[e];
1259
+ return t === void 0 ? D(e) : t;
1260
+ }, Me = () => {
1275
1261
  if (typeof globalThis == "object")
1276
1262
  return globalThis;
1277
1263
  function e(t) {
@@ -1282,59 +1268,65 @@ var Ut = (() => {
1282
1268
  if (typeof $$$embind_global$$$ == "object" || (typeof global == "object" && e(global) ? $$$embind_global$$$ = global : typeof self == "object" && e(self) && ($$$embind_global$$$ = self), typeof $$$embind_global$$$ == "object"))
1283
1269
  return $$$embind_global$$$;
1284
1270
  throw Error("unable to get global object.");
1285
- }, Vn = (e) => e === 0 ? Z.toHandle(He()) : (e = Ln(e), Z.toHandle(He()[e])), Yn = (e) => {
1286
- var t = oe.length;
1287
- return oe.push(e), t;
1288
- }, zn = (e, t) => {
1271
+ }, Yn = (e) => e === 0 ? q.toHandle(Me()) : (e = qn(e), q.toHandle(Me()[e])), Qn = (e) => {
1272
+ var t = ae.length;
1273
+ return ae.push(e), t;
1274
+ }, Zn = (e, t) => {
1289
1275
  for (var r = new Array(e), n = 0; n < e; ++n)
1290
- r[n] = re(_[t + n * 4 >> 2], "parameter " + n);
1276
+ r[n] = re(b[t + n * 4 >> 2], "parameter " + n);
1291
1277
  return r;
1292
- }, Nn = Reflect.construct, Gn = (e, t, r) => {
1278
+ }, Jn = Reflect.construct, Kn = (e, t, r) => {
1293
1279
  var n = [], a = e.toWireType(n, r);
1294
- return n.length && (_[t >> 2] = Z.toHandle(n)), a;
1295
- }, Xn = (e, t, r) => {
1296
- var n = zn(e, t), a = n.shift();
1280
+ return n.length && (b[t >> 2] = q.toHandle(n)), a;
1281
+ }, ta = (e, t, r) => {
1282
+ var n = Zn(e, t), a = n.shift();
1297
1283
  e--;
1298
- var o = new Array(e), s = (l, h, p, w) => {
1299
- for (var v = 0, b = 0; b < e; ++b)
1300
- o[b] = n[b].readValueFromPointer(w + v), v += n[b].argPackAdvance;
1301
- var O = r === 1 ? Nn(h, o) : h.apply(l, o);
1302
- return Gn(a, p, O);
1303
- }, u = `methodCaller<(${n.map((l) => l.name).join(", ")}) => ${a.name}>`;
1304
- return Yn($t(u, s));
1305
- }, qn = (e) => {
1306
- e > 9 && (Q[e + 1] += 1);
1307
- }, Qn = (e) => {
1308
- var t = Z.toValue(e);
1309
- Nt(t), ee(e);
1310
- }, Zn = (e, t) => {
1284
+ var i = new Array(e), u = (l, d, h, v) => {
1285
+ for (var m = 0, $ = 0; $ < e; ++$)
1286
+ i[$] = n[$].readValueFromPointer(v + m), m += n[$].argPackAdvance;
1287
+ var x = r === 1 ? Jn(d, i) : d.apply(l, i);
1288
+ return Kn(a, h, x);
1289
+ }, s = `methodCaller<(${n.map((l) => l.name).join(", ")}) => ${a.name}>`;
1290
+ return Qn(gt(s, u));
1291
+ }, ea = (e) => {
1292
+ e > 9 && (X[e + 1] += 1);
1293
+ }, ra = (e) => {
1294
+ var t = q.toValue(e);
1295
+ Gt(t), ee(e);
1296
+ }, na = (e, t) => {
1311
1297
  e = re(e, "_emval_take_value");
1312
1298
  var r = e.readValueFromPointer(t);
1313
- return Z.toHandle(r);
1314
- }, Jn = () => {
1315
- Lt("");
1316
- }, Kn = (e, t, r) => R.copyWithin(e, t, t + r), ta = () => 2147483648, ea = (e) => {
1317
- var t = Tt.buffer, r = (e - t.byteLength + 65535) / 65536;
1299
+ return q.toHandle(r);
1300
+ }, aa = (e, t, r, n) => {
1301
+ var a = (/* @__PURE__ */ new Date()).getFullYear(), i = new Date(a, 0, 1), u = new Date(a, 6, 1), s = i.getTimezoneOffset(), l = u.getTimezoneOffset(), d = Math.max(s, l);
1302
+ b[e >> 2] = d * 60, Z[t >> 2] = +(s != l);
1303
+ var h = ($) => {
1304
+ var x = $ >= 0 ? "-" : "+", O = Math.abs($), E = String(Math.floor(O / 60)).padStart(2, "0"), S = String(O % 60).padStart(2, "0");
1305
+ return `UTC${x}${E}${S}`;
1306
+ }, v = h(s), m = h(l);
1307
+ l < s ? ($t(v, r, 17), $t(m, n, 17)) : ($t(v, n, 17), $t(m, r, 17));
1308
+ }, oa = () => 2147483648, ia = (e) => {
1309
+ var t = Ct.buffer, r = (e - t.byteLength + 65535) / 65536;
1318
1310
  try {
1319
- return Tt.grow(r), pe(), 1;
1311
+ return Ct.grow(r), he(), 1;
1320
1312
  } catch {
1321
1313
  }
1322
- }, ra = (e) => {
1323
- var t = R.length;
1314
+ }, sa = (e) => {
1315
+ var t = F.length;
1324
1316
  e >>>= 0;
1325
- var r = ta();
1317
+ var r = oa();
1326
1318
  if (e > r)
1327
1319
  return !1;
1328
- for (var n = (l, h) => l + (h - l % h) % h, a = 1; a <= 4; a *= 2) {
1329
- var o = t * (1 + 0.2 / a);
1330
- o = Math.min(o, e + 100663296);
1331
- var s = Math.min(r, n(Math.max(e, o), 65536)), u = ea(s);
1332
- if (u)
1320
+ for (var n = (l, d) => l + (d - l % d) % d, a = 1; a <= 4; a *= 2) {
1321
+ var i = t * (1 + 0.2 / a);
1322
+ i = Math.min(i, e + 100663296);
1323
+ var u = Math.min(r, n(Math.max(e, i), 65536)), s = ia(u);
1324
+ if (s)
1333
1325
  return !0;
1334
1326
  }
1335
1327
  return !1;
1336
- }, ie = {}, na = () => U || "./this.program", bt = () => {
1337
- if (!bt.strings) {
1328
+ }, oe = {}, ua = () => U || "./this.program", wt = () => {
1329
+ if (!wt.strings) {
1338
1330
  var e = (typeof navigator == "object" && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", t = {
1339
1331
  USER: "web_user",
1340
1332
  LOGNAME: "web_user",
@@ -1342,515 +1334,327 @@ var Ut = (() => {
1342
1334
  PWD: "/",
1343
1335
  HOME: "/home/web_user",
1344
1336
  LANG: e,
1345
- _: na()
1337
+ _: ua()
1346
1338
  };
1347
- for (var r in ie)
1348
- ie[r] === void 0 ? delete t[r] : t[r] = ie[r];
1339
+ for (var r in oe)
1340
+ oe[r] === void 0 ? delete t[r] : t[r] = oe[r];
1349
1341
  var n = [];
1350
1342
  for (var r in t)
1351
1343
  n.push(`${r}=${t[r]}`);
1352
- bt.strings = n;
1344
+ wt.strings = n;
1353
1345
  }
1354
- return bt.strings;
1355
- }, aa = (e, t) => {
1346
+ return wt.strings;
1347
+ }, ca = (e, t) => {
1356
1348
  for (var r = 0; r < e.length; ++r)
1357
- z[t++] = e.charCodeAt(r);
1358
- z[t] = 0;
1359
- }, oa = (e, t) => {
1349
+ L[t++] = e.charCodeAt(r);
1350
+ L[t] = 0;
1351
+ }, la = (e, t) => {
1360
1352
  var r = 0;
1361
- return bt().forEach((n, a) => {
1362
- var o = t + r;
1363
- _[e + a * 4 >> 2] = o, aa(n, o), r += n.length + 1;
1353
+ return wt().forEach((n, a) => {
1354
+ var i = t + r;
1355
+ b[e + a * 4 >> 2] = i, ca(n, i), r += n.length + 1;
1364
1356
  }), 0;
1365
- }, ia = (e, t) => {
1366
- var r = bt();
1367
- _[e >> 2] = r.length;
1357
+ }, da = (e, t) => {
1358
+ var r = wt();
1359
+ b[e >> 2] = r.length;
1368
1360
  var n = 0;
1369
- return r.forEach((a) => n += a.length + 1), _[t >> 2] = n, 0;
1370
- }, sa = (e) => 52;
1371
- function ua(e, t, r, n, a) {
1361
+ return r.forEach((a) => n += a.length + 1), b[t >> 2] = n, 0;
1362
+ }, fa = (e) => 52;
1363
+ function ha(e, t, r, n, a) {
1372
1364
  return 70;
1373
1365
  }
1374
- var ca = [null, [], []], la = (e, t) => {
1375
- var r = ca[e];
1376
- t === 0 || t === 10 ? ((e === 1 ? _t : K)(We(r, 0)), r.length = 0) : r.push(t);
1377
- }, da = (e, t, r, n) => {
1378
- for (var a = 0, o = 0; o < r; o++) {
1379
- var s = _[t >> 2], u = _[t + 4 >> 2];
1366
+ var pa = [null, [], []], va = (e, t) => {
1367
+ var r = pa[e];
1368
+ t === 0 || t === 10 ? ((e === 1 ? Ut : rt)(Ie(r, 0)), r.length = 0) : r.push(t);
1369
+ }, ma = (e, t, r, n) => {
1370
+ for (var a = 0, i = 0; i < r; i++) {
1371
+ var u = b[t >> 2], s = b[t + 4 >> 2];
1380
1372
  t += 8;
1381
- for (var l = 0; l < u; l++)
1382
- la(e, R[s + l]);
1383
- a += u;
1384
- }
1385
- return _[n >> 2] = a, 0;
1386
- }, ha = (e) => e, It = (e) => e % 4 === 0 && (e % 100 !== 0 || e % 400 === 0), fa = (e, t) => {
1387
- for (var r = 0, n = 0; n <= t; r += e[n++])
1388
- ;
1389
- return r;
1390
- }, Be = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Ue = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], pa = (e, t) => {
1391
- for (var r = new Date(e.getTime()); t > 0; ) {
1392
- var n = It(r.getFullYear()), a = r.getMonth(), o = (n ? Be : Ue)[a];
1393
- if (t > o - r.getDate())
1394
- t -= o - r.getDate() + 1, r.setDate(1), a < 11 ? r.setMonth(a + 1) : (r.setMonth(0), r.setFullYear(r.getFullYear() + 1));
1395
- else
1396
- return r.setDate(r.getDate() + t), r;
1397
- }
1398
- return r;
1399
- };
1400
- function ma(e, t, r) {
1401
- var n = r > 0 ? r : Ie(e) + 1, a = new Array(n), o = je(e, a, 0, a.length);
1402
- return t && (a.length = o), a;
1403
- }
1404
- var ya = (e, t) => {
1405
- z.set(e, t);
1406
- }, va = (e, t, r, n) => {
1407
- var a = _[n + 40 >> 2], o = {
1408
- tm_sec: W[n >> 2],
1409
- tm_min: W[n + 4 >> 2],
1410
- tm_hour: W[n + 8 >> 2],
1411
- tm_mday: W[n + 12 >> 2],
1412
- tm_mon: W[n + 16 >> 2],
1413
- tm_year: W[n + 20 >> 2],
1414
- tm_wday: W[n + 24 >> 2],
1415
- tm_yday: W[n + 28 >> 2],
1416
- tm_isdst: W[n + 32 >> 2],
1417
- tm_gmtoff: W[n + 36 >> 2],
1418
- tm_zone: a ? ae(a) : ""
1419
- }, s = ae(r), u = {
1420
- "%c": "%a %b %d %H:%M:%S %Y",
1421
- "%D": "%m/%d/%y",
1422
- "%F": "%Y-%m-%d",
1423
- "%h": "%b",
1424
- "%r": "%I:%M:%S %p",
1425
- "%R": "%H:%M",
1426
- "%T": "%H:%M:%S",
1427
- "%x": "%m/%d/%y",
1428
- "%X": "%H:%M:%S",
1429
- "%Ec": "%c",
1430
- "%EC": "%C",
1431
- "%Ex": "%m/%d/%y",
1432
- "%EX": "%H:%M:%S",
1433
- "%Ey": "%y",
1434
- "%EY": "%Y",
1435
- "%Od": "%d",
1436
- "%Oe": "%e",
1437
- "%OH": "%H",
1438
- "%OI": "%I",
1439
- "%Om": "%m",
1440
- "%OM": "%M",
1441
- "%OS": "%S",
1442
- "%Ou": "%u",
1443
- "%OU": "%U",
1444
- "%OV": "%V",
1445
- "%Ow": "%w",
1446
- "%OW": "%W",
1447
- "%Oy": "%y"
1448
- };
1449
- for (var l in u)
1450
- s = s.replace(new RegExp(l, "g"), u[l]);
1451
- var h = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], p = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
1452
- function w(d, m, x) {
1453
- for (var M = typeof d == "number" ? d.toString() : d || ""; M.length < m; )
1454
- M = x[0] + M;
1455
- return M;
1456
- }
1457
- function v(d, m) {
1458
- return w(d, m, "0");
1459
- }
1460
- function b(d, m) {
1461
- function x(ct) {
1462
- return ct < 0 ? -1 : ct > 0 ? 1 : 0;
1463
- }
1464
- var M;
1465
- return (M = x(d.getFullYear() - m.getFullYear())) === 0 && (M = x(d.getMonth() - m.getMonth())) === 0 && (M = x(d.getDate() - m.getDate())), M;
1373
+ for (var l = 0; l < s; l++)
1374
+ va(e, F[u + l]);
1375
+ a += s;
1466
1376
  }
1467
- function O(d) {
1468
- switch (d.getDay()) {
1469
- case 0:
1470
- return new Date(d.getFullYear() - 1, 11, 29);
1471
- case 1:
1472
- return d;
1473
- case 2:
1474
- return new Date(d.getFullYear(), 0, 3);
1475
- case 3:
1476
- return new Date(d.getFullYear(), 0, 2);
1477
- case 4:
1478
- return new Date(d.getFullYear(), 0, 1);
1479
- case 5:
1480
- return new Date(d.getFullYear() - 1, 11, 31);
1481
- case 6:
1482
- return new Date(d.getFullYear() - 1, 11, 30);
1483
- }
1484
- }
1485
- function k(d) {
1486
- var m = pa(new Date(d.tm_year + 1900, 0, 1), d.tm_yday), x = new Date(m.getFullYear(), 0, 4), M = new Date(m.getFullYear() + 1, 0, 4), ct = O(x), Wt = O(M);
1487
- return b(ct, m) <= 0 ? b(Wt, m) <= 0 ? m.getFullYear() + 1 : m.getFullYear() : m.getFullYear() - 1;
1488
- }
1489
- var P = {
1490
- "%a": (d) => h[d.tm_wday].substring(0, 3),
1491
- "%A": (d) => h[d.tm_wday],
1492
- "%b": (d) => p[d.tm_mon].substring(0, 3),
1493
- "%B": (d) => p[d.tm_mon],
1494
- "%C": (d) => {
1495
- var m = d.tm_year + 1900;
1496
- return v(m / 100 | 0, 2);
1497
- },
1498
- "%d": (d) => v(d.tm_mday, 2),
1499
- "%e": (d) => w(d.tm_mday, 2, " "),
1500
- "%g": (d) => k(d).toString().substring(2),
1501
- "%G": k,
1502
- "%H": (d) => v(d.tm_hour, 2),
1503
- "%I": (d) => {
1504
- var m = d.tm_hour;
1505
- return m == 0 ? m = 12 : m > 12 && (m -= 12), v(m, 2);
1506
- },
1507
- "%j": (d) => v(d.tm_mday + fa(It(d.tm_year + 1900) ? Be : Ue, d.tm_mon - 1), 3),
1508
- "%m": (d) => v(d.tm_mon + 1, 2),
1509
- "%M": (d) => v(d.tm_min, 2),
1510
- "%n": () => `
1511
- `,
1512
- "%p": (d) => d.tm_hour >= 0 && d.tm_hour < 12 ? "AM" : "PM",
1513
- "%S": (d) => v(d.tm_sec, 2),
1514
- "%t": () => " ",
1515
- "%u": (d) => d.tm_wday || 7,
1516
- "%U": (d) => {
1517
- var m = d.tm_yday + 7 - d.tm_wday;
1518
- return v(Math.floor(m / 7), 2);
1519
- },
1520
- "%V": (d) => {
1521
- var m = Math.floor((d.tm_yday + 7 - (d.tm_wday + 6) % 7) / 7);
1522
- if ((d.tm_wday + 371 - d.tm_yday - 2) % 7 <= 2 && m++, m) {
1523
- if (m == 53) {
1524
- var x = (d.tm_wday + 371 - d.tm_yday) % 7;
1525
- x != 4 && (x != 3 || !It(d.tm_year)) && (m = 1);
1526
- }
1527
- } else {
1528
- m = 52;
1529
- var M = (d.tm_wday + 7 - d.tm_yday - 1) % 7;
1530
- (M == 4 || M == 5 && It(d.tm_year % 400 - 1)) && m++;
1531
- }
1532
- return v(m, 2);
1533
- },
1534
- "%w": (d) => d.tm_wday,
1535
- "%W": (d) => {
1536
- var m = d.tm_yday + 7 - (d.tm_wday + 6) % 7;
1537
- return v(Math.floor(m / 7), 2);
1538
- },
1539
- "%y": (d) => (d.tm_year + 1900).toString().substring(2),
1540
- "%Y": (d) => d.tm_year + 1900,
1541
- "%z": (d) => {
1542
- var m = d.tm_gmtoff, x = m >= 0;
1543
- return m = Math.abs(m) / 60, m = m / 60 * 100 + m % 60, (x ? "+" : "-") + ("0000" + m).slice(-4);
1544
- },
1545
- "%Z": (d) => d.tm_zone,
1546
- "%%": () => "%"
1547
- };
1548
- s = s.replace(/%%/g, "\0\0");
1549
- for (var l in P)
1550
- s.includes(l) && (s = s.replace(new RegExp(l, "g"), P[l](o)));
1551
- s = s.replace(/\0\0/g, "%");
1552
- var j = ma(s, !1);
1553
- return j.length > t ? 0 : (ya(j, e), j.length - 1);
1554
- }, ga = (e, t, r, n, a) => va(e, t, r, n);
1555
- be = c.InternalError = class extends Error {
1377
+ return b[n >> 2] = a, 0;
1378
+ }, ya = (e) => e;
1379
+ we = c.InternalError = class extends Error {
1556
1380
  constructor(e) {
1557
1381
  super(e), this.name = "InternalError";
1558
1382
  }
1559
- }, Hr(), ut = c.BindingError = class extends Error {
1383
+ }, Lr(), ot = c.BindingError = class extends Error {
1560
1384
  constructor(e) {
1561
1385
  super(e), this.name = "BindingError";
1562
1386
  }
1563
- }, Zr(), Gr(), on(), Oe = c.UnboundTypeError = ln(Error, "UnboundTypeError"), yn();
1564
- var wa = {
1387
+ }, tn(), Qr(), cn(), De = c.UnboundTypeError = hn(Error, "UnboundTypeError"), $n();
1388
+ var ga = {
1565
1389
  s: Fr,
1566
- u: Dr,
1567
- b: xr,
1568
- g: Mr,
1569
- q: Sr,
1570
- K: jr,
1571
- f: Ir,
1572
- Y: Rr,
1573
- e: Or,
1574
- ha: Wr,
1575
- U: kr,
1576
- ba: Ur,
1577
- fa: dn,
1578
- ea: fn,
1579
- w: pn,
1390
+ v: Or,
1391
+ b: jr,
1392
+ g: Ir,
1393
+ q: Rr,
1394
+ Y: Mr,
1395
+ f: Wr,
1396
+ X: kr,
1397
+ e: Sr,
1398
+ T: Br,
1399
+ ha: Hr,
1400
+ S: Ur,
1401
+ ba: zr,
1402
+ fa: pn,
1403
+ ea: mn,
1404
+ w: yn,
1580
1405
  aa: Se,
1581
- x: wn,
1582
- h: $n,
1583
- O: Cn,
1584
- P: _n,
1585
- t: Pn,
1586
- o: En,
1587
- ga: An,
1588
- N: Dn,
1589
- C: Rn,
1590
- A: Wn,
1591
- ia: kn,
1592
- ca: Hn,
1593
- E: Bn,
1406
+ x: Cn,
1407
+ h: Tn,
1408
+ M: En,
1409
+ N: _n,
1410
+ t: xn,
1411
+ o: Dn,
1412
+ ga: Fn,
1413
+ L: In,
1414
+ C: Un,
1415
+ B: Ln,
1416
+ ia: Vn,
1417
+ ca: zn,
1418
+ $: Nn,
1419
+ E: Gn,
1594
1420
  ka: ee,
1595
- la: Vn,
1596
- M: Xn,
1597
- Q: qn,
1598
- R: Qn,
1599
- da: Zn,
1600
- B: Jn,
1601
- $: Kn,
1602
- Z: ra,
1603
- W: oa,
1604
- X: ia,
1605
- _: sa,
1606
- T: ua,
1607
- L: da,
1421
+ la: Yn,
1422
+ K: ta,
1423
+ O: ea,
1424
+ P: ra,
1425
+ da: na,
1426
+ U: aa,
1427
+ Z: sa,
1428
+ V: la,
1429
+ W: da,
1430
+ _: fa,
1431
+ R: ha,
1432
+ J: ma,
1608
1433
  F: Ia,
1609
1434
  D: Ta,
1610
1435
  G: ja,
1611
- m: Ra,
1436
+ n: Ra,
1612
1437
  a: $a,
1613
1438
  d: Ea,
1614
- p: _a,
1615
- k: Sa,
1616
- I: xa,
1617
- v: Da,
1618
- H: Ma,
1619
- z: ka,
1620
- S: Ba,
1621
- l: Aa,
1622
- j: Pa,
1623
- c: Ca,
1624
- n: ba,
1625
- J: Oa,
1626
- r: Wa,
1627
- i: Fa,
1628
- y: Ha,
1629
- ja: ha,
1630
- V: ga
1631
- }, A = Ar(), J = c._free = (e) => (J = c._free = A.oa)(e), se = c._malloc = (e) => (se = c._malloc = A.pa)(e), Le = (e) => (Le = A.ra)(e), T = (e, t) => (T = A.sa)(e, t), Ct = (e) => (Ct = A.ta)(e), F = () => (F = A.ua)(), D = (e) => (D = A.va)(e), Ve = (e) => (Ve = A.wa)(e), Ye = (e) => (Ye = A.xa)(e), ze = (e, t, r) => (ze = A.ya)(e, t, r), Ne = (e) => (Ne = A.za)(e);
1632
- c.dynCall_viijii = (e, t, r, n, a, o, s) => (c.dynCall_viijii = A.Aa)(e, t, r, n, a, o, s), c.dynCall_jiji = (e, t, r, n, a) => (c.dynCall_jiji = A.Ba)(e, t, r, n, a);
1633
- var Ge = c.dynCall_jiiii = (e, t, r, n, a) => (Ge = c.dynCall_jiiii = A.Ca)(e, t, r, n, a);
1634
- c.dynCall_iiiiij = (e, t, r, n, a, o, s) => (c.dynCall_iiiiij = A.Da)(e, t, r, n, a, o, s), c.dynCall_iiiiijj = (e, t, r, n, a, o, s, u, l) => (c.dynCall_iiiiijj = A.Ea)(e, t, r, n, a, o, s, u, l), c.dynCall_iiiiiijj = (e, t, r, n, a, o, s, u, l, h) => (c.dynCall_iiiiiijj = A.Fa)(e, t, r, n, a, o, s, u, l, h);
1439
+ p: Ca,
1440
+ j: Sa,
1441
+ I: Fa,
1442
+ u: Da,
1443
+ H: Oa,
1444
+ z: Wa,
1445
+ Q: Ba,
1446
+ l: _a,
1447
+ k: Pa,
1448
+ c: ba,
1449
+ m: wa,
1450
+ A: xa,
1451
+ r: Ma,
1452
+ i: Aa,
1453
+ y: ka,
1454
+ ja: ya
1455
+ }, P = Dr(), We = (e) => (We = P.oa)(e), Y = c._free = (e) => (Y = c._free = P.pa)(e), ie = c._malloc = (e) => (ie = c._malloc = P.ra)(e), C = (e, t) => (C = P.sa)(e, t), ke = (e) => (ke = P.ta)(e), Be = (e) => (Be = P.ua)(e), He = () => (He = P.va)(), Ue = (e) => (Ue = P.wa)(e), Le = (e) => (Le = P.xa)(e), Ve = (e, t, r) => (Ve = P.ya)(e, t, r), ze = (e) => (ze = P.za)(e);
1456
+ c.dynCall_viijii = (e, t, r, n, a, i, u) => (c.dynCall_viijii = P.Aa)(e, t, r, n, a, i, u), c.dynCall_jiji = (e, t, r, n, a) => (c.dynCall_jiji = P.Ba)(e, t, r, n, a);
1457
+ var Ne = c.dynCall_jiiii = (e, t, r, n, a) => (Ne = c.dynCall_jiiii = P.Ca)(e, t, r, n, a);
1458
+ c.dynCall_iiiiij = (e, t, r, n, a, i, u) => (c.dynCall_iiiiij = P.Da)(e, t, r, n, a, i, u), c.dynCall_iiiiijj = (e, t, r, n, a, i, u, s, l) => (c.dynCall_iiiiijj = P.Ea)(e, t, r, n, a, i, u, s, l), c.dynCall_iiiiiijj = (e, t, r, n, a, i, u, s, l, d) => (c.dynCall_iiiiiijj = P.Fa)(e, t, r, n, a, i, u, s, l, d);
1635
1459
  function $a(e, t) {
1636
- var r = F();
1460
+ var r = A();
1637
1461
  try {
1638
- return E(e)(t);
1462
+ return T(e)(t);
1639
1463
  } catch (n) {
1640
- if (D(r), n !== n + 0)
1641
- throw n;
1642
- T(1, 0);
1464
+ if (_(r), n !== n + 0) throw n;
1465
+ C(1, 0);
1643
1466
  }
1644
1467
  }
1645
- function ba(e, t, r, n) {
1646
- var a = F();
1468
+ function wa(e, t, r, n) {
1469
+ var a = A();
1647
1470
  try {
1648
- E(e)(t, r, n);
1649
- } catch (o) {
1650
- if (D(a), o !== o + 0)
1651
- throw o;
1652
- T(1, 0);
1471
+ T(e)(t, r, n);
1472
+ } catch (i) {
1473
+ if (_(a), i !== i + 0) throw i;
1474
+ C(1, 0);
1653
1475
  }
1654
1476
  }
1655
- function Ca(e, t, r) {
1656
- var n = F();
1477
+ function ba(e, t, r) {
1478
+ var n = A();
1657
1479
  try {
1658
- E(e)(t, r);
1480
+ T(e)(t, r);
1659
1481
  } catch (a) {
1660
- if (D(n), a !== a + 0)
1661
- throw a;
1662
- T(1, 0);
1482
+ if (_(n), a !== a + 0) throw a;
1483
+ C(1, 0);
1663
1484
  }
1664
1485
  }
1665
- function _a(e, t, r, n) {
1666
- var a = F();
1486
+ function Ca(e, t, r, n) {
1487
+ var a = A();
1667
1488
  try {
1668
- return E(e)(t, r, n);
1669
- } catch (o) {
1670
- if (D(a), o !== o + 0)
1671
- throw o;
1672
- T(1, 0);
1489
+ return T(e)(t, r, n);
1490
+ } catch (i) {
1491
+ if (_(a), i !== i + 0) throw i;
1492
+ C(1, 0);
1673
1493
  }
1674
1494
  }
1675
1495
  function Ta(e, t, r, n, a) {
1676
- var o = F();
1496
+ var i = A();
1677
1497
  try {
1678
- return E(e)(t, r, n, a);
1679
- } catch (s) {
1680
- if (D(o), s !== s + 0)
1681
- throw s;
1682
- T(1, 0);
1498
+ return T(e)(t, r, n, a);
1499
+ } catch (u) {
1500
+ if (_(i), u !== u + 0) throw u;
1501
+ C(1, 0);
1683
1502
  }
1684
1503
  }
1685
1504
  function Pa(e, t) {
1686
- var r = F();
1505
+ var r = A();
1687
1506
  try {
1688
- E(e)(t);
1507
+ T(e)(t);
1689
1508
  } catch (n) {
1690
- if (D(r), n !== n + 0)
1691
- throw n;
1692
- T(1, 0);
1509
+ if (_(r), n !== n + 0) throw n;
1510
+ C(1, 0);
1693
1511
  }
1694
1512
  }
1695
1513
  function Ea(e, t, r) {
1696
- var n = F();
1514
+ var n = A();
1697
1515
  try {
1698
- return E(e)(t, r);
1516
+ return T(e)(t, r);
1699
1517
  } catch (a) {
1700
- if (D(n), a !== a + 0)
1701
- throw a;
1702
- T(1, 0);
1518
+ if (_(n), a !== a + 0) throw a;
1519
+ C(1, 0);
1703
1520
  }
1704
1521
  }
1705
- function Aa(e) {
1706
- var t = F();
1522
+ function _a(e) {
1523
+ var t = A();
1707
1524
  try {
1708
- E(e)();
1525
+ T(e)();
1709
1526
  } catch (r) {
1710
- if (D(t), r !== r + 0)
1711
- throw r;
1712
- T(1, 0);
1527
+ if (_(t), r !== r + 0) throw r;
1528
+ C(1, 0);
1713
1529
  }
1714
1530
  }
1715
- function Fa(e, t, r, n, a, o, s, u, l, h, p) {
1716
- var w = F();
1531
+ function Aa(e, t, r, n, a, i, u, s, l, d, h) {
1532
+ var v = A();
1717
1533
  try {
1718
- E(e)(t, r, n, a, o, s, u, l, h, p);
1719
- } catch (v) {
1720
- if (D(w), v !== v + 0)
1721
- throw v;
1722
- T(1, 0);
1534
+ T(e)(t, r, n, a, i, u, s, l, d, h);
1535
+ } catch (m) {
1536
+ if (_(v), m !== m + 0) throw m;
1537
+ C(1, 0);
1723
1538
  }
1724
1539
  }
1725
- function Da(e, t, r, n, a, o, s) {
1726
- var u = F();
1540
+ function xa(e, t, r, n, a) {
1541
+ var i = A();
1727
1542
  try {
1728
- return E(e)(t, r, n, a, o, s);
1729
- } catch (l) {
1730
- if (D(u), l !== l + 0)
1731
- throw l;
1732
- T(1, 0);
1543
+ T(e)(t, r, n, a);
1544
+ } catch (u) {
1545
+ if (_(i), u !== u + 0) throw u;
1546
+ C(1, 0);
1733
1547
  }
1734
1548
  }
1735
- function Oa(e, t, r, n, a) {
1736
- var o = F();
1549
+ function Da(e, t, r, n, a, i, u) {
1550
+ var s = A();
1737
1551
  try {
1738
- E(e)(t, r, n, a);
1739
- } catch (s) {
1740
- if (D(o), s !== s + 0)
1741
- throw s;
1742
- T(1, 0);
1552
+ return T(e)(t, r, n, a, i, u);
1553
+ } catch (l) {
1554
+ if (_(s), l !== l + 0) throw l;
1555
+ C(1, 0);
1743
1556
  }
1744
1557
  }
1745
- function xa(e, t, r, n, a, o) {
1746
- var s = F();
1558
+ function Fa(e, t, r, n, a, i) {
1559
+ var u = A();
1747
1560
  try {
1748
- return E(e)(t, r, n, a, o);
1749
- } catch (u) {
1750
- if (D(s), u !== u + 0)
1751
- throw u;
1752
- T(1, 0);
1561
+ return T(e)(t, r, n, a, i);
1562
+ } catch (s) {
1563
+ if (_(u), s !== s + 0) throw s;
1564
+ C(1, 0);
1753
1565
  }
1754
1566
  }
1755
- function Ma(e, t, r, n, a, o, s, u) {
1756
- var l = F();
1567
+ function Oa(e, t, r, n, a, i, u, s) {
1568
+ var l = A();
1757
1569
  try {
1758
- return E(e)(t, r, n, a, o, s, u);
1759
- } catch (h) {
1760
- if (D(l), h !== h + 0)
1761
- throw h;
1762
- T(1, 0);
1570
+ return T(e)(t, r, n, a, i, u, s);
1571
+ } catch (d) {
1572
+ if (_(l), d !== d + 0) throw d;
1573
+ C(1, 0);
1763
1574
  }
1764
1575
  }
1765
1576
  function Sa(e, t, r, n, a) {
1766
- var o = F();
1577
+ var i = A();
1767
1578
  try {
1768
- return E(e)(t, r, n, a);
1769
- } catch (s) {
1770
- if (D(o), s !== s + 0)
1771
- throw s;
1772
- T(1, 0);
1579
+ return T(e)(t, r, n, a);
1580
+ } catch (u) {
1581
+ if (_(i), u !== u + 0) throw u;
1582
+ C(1, 0);
1773
1583
  }
1774
1584
  }
1775
1585
  function ja(e, t, r, n) {
1776
- var a = F();
1586
+ var a = A();
1777
1587
  try {
1778
- return E(e)(t, r, n);
1779
- } catch (o) {
1780
- if (D(a), o !== o + 0)
1781
- throw o;
1782
- T(1, 0);
1588
+ return T(e)(t, r, n);
1589
+ } catch (i) {
1590
+ if (_(a), i !== i + 0) throw i;
1591
+ C(1, 0);
1783
1592
  }
1784
1593
  }
1785
1594
  function Ia(e, t, r, n) {
1786
- var a = F();
1595
+ var a = A();
1787
1596
  try {
1788
- return E(e)(t, r, n);
1789
- } catch (o) {
1790
- if (D(a), o !== o + 0)
1791
- throw o;
1792
- T(1, 0);
1597
+ return T(e)(t, r, n);
1598
+ } catch (i) {
1599
+ if (_(a), i !== i + 0) throw i;
1600
+ C(1, 0);
1793
1601
  }
1794
1602
  }
1795
1603
  function Ra(e) {
1796
- var t = F();
1604
+ var t = A();
1797
1605
  try {
1798
- return E(e)();
1606
+ return T(e)();
1799
1607
  } catch (r) {
1800
- if (D(t), r !== r + 0)
1801
- throw r;
1802
- T(1, 0);
1608
+ if (_(t), r !== r + 0) throw r;
1609
+ C(1, 0);
1803
1610
  }
1804
1611
  }
1805
- function Wa(e, t, r, n, a, o, s, u) {
1806
- var l = F();
1612
+ function Ma(e, t, r, n, a, i, u, s) {
1613
+ var l = A();
1807
1614
  try {
1808
- E(e)(t, r, n, a, o, s, u);
1809
- } catch (h) {
1810
- if (D(l), h !== h + 0)
1811
- throw h;
1812
- T(1, 0);
1615
+ T(e)(t, r, n, a, i, u, s);
1616
+ } catch (d) {
1617
+ if (_(l), d !== d + 0) throw d;
1618
+ C(1, 0);
1813
1619
  }
1814
1620
  }
1815
- function ka(e, t, r, n, a, o, s, u, l, h, p, w) {
1816
- var v = F();
1621
+ function Wa(e, t, r, n, a, i, u, s, l, d, h, v) {
1622
+ var m = A();
1817
1623
  try {
1818
- return E(e)(t, r, n, a, o, s, u, l, h, p, w);
1819
- } catch (b) {
1820
- if (D(v), b !== b + 0)
1821
- throw b;
1822
- T(1, 0);
1624
+ return T(e)(t, r, n, a, i, u, s, l, d, h, v);
1625
+ } catch ($) {
1626
+ if (_(m), $ !== $ + 0) throw $;
1627
+ C(1, 0);
1823
1628
  }
1824
1629
  }
1825
- function Ha(e, t, r, n, a, o, s, u, l, h, p, w, v, b, O, k) {
1826
- var P = F();
1630
+ function ka(e, t, r, n, a, i, u, s, l, d, h, v, m, $, x, O) {
1631
+ var E = A();
1827
1632
  try {
1828
- E(e)(t, r, n, a, o, s, u, l, h, p, w, v, b, O, k);
1829
- } catch (j) {
1830
- if (D(P), j !== j + 0)
1831
- throw j;
1832
- T(1, 0);
1633
+ T(e)(t, r, n, a, i, u, s, l, d, h, v, m, $, x, O);
1634
+ } catch (S) {
1635
+ if (_(E), S !== S + 0) throw S;
1636
+ C(1, 0);
1833
1637
  }
1834
1638
  }
1835
1639
  function Ba(e, t, r, n, a) {
1836
- var o = F();
1640
+ var i = A();
1837
1641
  try {
1838
- return Ge(e, t, r, n, a);
1839
- } catch (s) {
1840
- if (D(o), s !== s + 0)
1841
- throw s;
1842
- T(1, 0);
1642
+ return Ne(e, t, r, n, a);
1643
+ } catch (u) {
1644
+ if (_(i), u !== u + 0) throw u;
1645
+ C(1, 0);
1843
1646
  }
1844
1647
  }
1845
1648
  var Rt;
1846
- pt = function e() {
1847
- Rt || Xe(), Rt || (pt = e);
1649
+ ft = function e() {
1650
+ Rt || Ge(), Rt || (ft = e);
1848
1651
  };
1849
- function Xe() {
1850
- if (et > 0 || (yr(), et > 0))
1652
+ function Ge() {
1653
+ if (J > 0 || (mr(), J > 0))
1851
1654
  return;
1852
1655
  function e() {
1853
- Rt || (Rt = !0, c.calledRun = !0, !de && (vr(), g(c), c.onRuntimeInitialized && c.onRuntimeInitialized(), gr()));
1656
+ var t;
1657
+ Rt || (Rt = !0, c.calledRun = !0, !le && (yr(), g(c), (t = c.onRuntimeInitialized) === null || t === void 0 || t.call(c), gr()));
1854
1658
  }
1855
1659
  c.setStatus ? (c.setStatus("Running..."), setTimeout(function() {
1856
1660
  setTimeout(function() {
@@ -1861,32 +1665,32 @@ var Ut = (() => {
1861
1665
  if (c.preInit)
1862
1666
  for (typeof c.preInit == "function" && (c.preInit = [c.preInit]); c.preInit.length > 0; )
1863
1667
  c.preInit.pop()();
1864
- return Xe(), f.ready;
1668
+ return Ge(), y = k, y;
1865
1669
  };
1866
1670
  })();
1867
- function Ka(i) {
1868
- return le(
1869
- Ut,
1870
- i
1671
+ function Ka(o) {
1672
+ return ce(
1673
+ Ht,
1674
+ o
1871
1675
  );
1872
1676
  }
1873
- function vo(i) {
1677
+ function yo(o) {
1874
1678
  return Qa(
1875
- Ut,
1876
- i
1679
+ Ht,
1680
+ o
1877
1681
  );
1878
1682
  }
1879
- async function to(i, f) {
1683
+ async function to(o, f) {
1880
1684
  return Za(
1881
- Ut,
1882
- i,
1685
+ Ht,
1686
+ o,
1883
1687
  f
1884
1688
  );
1885
1689
  }
1886
- async function eo(i, f) {
1690
+ async function eo(o, f) {
1887
1691
  return Ja(
1888
- Ut,
1889
- i,
1692
+ Ht,
1693
+ o,
1890
1694
  f
1891
1695
  );
1892
1696
  }
@@ -1912,336 +1716,340 @@ const ir = [
1912
1716
  ["upc_e", "UPC-E"],
1913
1717
  ["linear_codes", "Linear-Codes"],
1914
1718
  ["matrix_codes", "Matrix-Codes"]
1915
- ], ro = [...ir, ["unknown"]].map((i) => i[0]), Bt = new Map(
1719
+ ], ro = [...ir, ["unknown"]].map((o) => o[0]), Bt = new Map(
1916
1720
  ir
1917
1721
  );
1918
- function no(i) {
1919
- for (const [f, y] of Bt)
1920
- if (i === y)
1722
+ function no(o) {
1723
+ for (const [f, p] of Bt)
1724
+ if (o === p)
1921
1725
  return f;
1922
1726
  return "unknown";
1923
1727
  }
1924
- function ao(i) {
1925
- if (sr(i))
1728
+ function ao(o) {
1729
+ if (sr(o))
1926
1730
  return {
1927
- width: i.naturalWidth,
1928
- height: i.naturalHeight
1731
+ width: o.naturalWidth,
1732
+ height: o.naturalHeight
1929
1733
  };
1930
- if (ur(i))
1734
+ if (ur(o))
1931
1735
  return {
1932
- width: i.width.baseVal.value,
1933
- height: i.height.baseVal.value
1736
+ width: o.width.baseVal.value,
1737
+ height: o.height.baseVal.value
1934
1738
  };
1935
- if (cr(i))
1739
+ if (cr(o))
1936
1740
  return {
1937
- width: i.videoWidth,
1938
- height: i.videoHeight
1741
+ width: o.videoWidth,
1742
+ height: o.videoHeight
1939
1743
  };
1940
- if (dr(i))
1744
+ if (dr(o))
1941
1745
  return {
1942
- width: i.width,
1943
- height: i.height
1746
+ width: o.width,
1747
+ height: o.height
1944
1748
  };
1945
- if (fr(i))
1749
+ if (hr(o))
1946
1750
  return {
1947
- width: i.displayWidth,
1948
- height: i.displayHeight
1751
+ width: o.displayWidth,
1752
+ height: o.displayHeight
1949
1753
  };
1950
- if (lr(i))
1754
+ if (lr(o))
1951
1755
  return {
1952
- width: i.width,
1953
- height: i.height
1756
+ width: o.width,
1757
+ height: o.height
1954
1758
  };
1955
- if (hr(i))
1759
+ if (fr(o))
1956
1760
  return {
1957
- width: i.width,
1958
- height: i.height
1761
+ width: o.width,
1762
+ height: o.height
1959
1763
  };
1960
1764
  throw new TypeError(
1961
1765
  "The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'."
1962
1766
  );
1963
1767
  }
1964
- function sr(i) {
1768
+ function sr(o) {
1965
1769
  try {
1966
- return i instanceof HTMLImageElement;
1770
+ return o instanceof HTMLImageElement;
1967
1771
  } catch {
1968
1772
  return !1;
1969
1773
  }
1970
1774
  }
1971
- function ur(i) {
1775
+ function ur(o) {
1972
1776
  try {
1973
- return i instanceof SVGImageElement;
1777
+ return o instanceof SVGImageElement;
1974
1778
  } catch {
1975
1779
  return !1;
1976
1780
  }
1977
1781
  }
1978
- function cr(i) {
1782
+ function cr(o) {
1979
1783
  try {
1980
- return i instanceof HTMLVideoElement;
1784
+ return o instanceof HTMLVideoElement;
1981
1785
  } catch {
1982
1786
  return !1;
1983
1787
  }
1984
1788
  }
1985
- function lr(i) {
1789
+ function lr(o) {
1986
1790
  try {
1987
- return i instanceof HTMLCanvasElement;
1791
+ return o instanceof HTMLCanvasElement;
1988
1792
  } catch {
1989
1793
  return !1;
1990
1794
  }
1991
1795
  }
1992
- function dr(i) {
1796
+ function dr(o) {
1993
1797
  try {
1994
- return i instanceof ImageBitmap;
1798
+ return o instanceof ImageBitmap;
1995
1799
  } catch {
1996
1800
  return !1;
1997
1801
  }
1998
1802
  }
1999
- function hr(i) {
1803
+ function fr(o) {
2000
1804
  try {
2001
- return i instanceof OffscreenCanvas;
1805
+ return o instanceof OffscreenCanvas;
2002
1806
  } catch {
2003
1807
  return !1;
2004
1808
  }
2005
1809
  }
2006
- function fr(i) {
1810
+ function hr(o) {
2007
1811
  try {
2008
- return i instanceof VideoFrame;
1812
+ return o instanceof VideoFrame;
2009
1813
  } catch {
2010
1814
  return !1;
2011
1815
  }
2012
1816
  }
2013
- function pr(i) {
1817
+ function pr(o) {
2014
1818
  try {
2015
- return i instanceof Blob;
1819
+ return o instanceof Blob;
2016
1820
  } catch {
2017
1821
  return !1;
2018
1822
  }
2019
1823
  }
2020
- function oo(i) {
1824
+ function oo(o) {
2021
1825
  try {
2022
- return i instanceof ImageData;
1826
+ return o instanceof ImageData;
2023
1827
  } catch {
2024
1828
  return !1;
2025
1829
  }
2026
1830
  }
2027
- function io(i, f) {
1831
+ function io(o, f) {
2028
1832
  try {
2029
- const y = new OffscreenCanvas(i, f);
2030
- if (y.getContext("2d") instanceof OffscreenCanvasRenderingContext2D)
2031
- return y;
1833
+ const p = new OffscreenCanvas(o, f);
1834
+ if (p.getContext("2d") instanceof OffscreenCanvasRenderingContext2D)
1835
+ return p;
2032
1836
  throw void 0;
2033
1837
  } catch {
2034
- const y = document.createElement("canvas");
2035
- return y.width = i, y.height = f, y;
1838
+ const p = document.createElement("canvas");
1839
+ return p.width = o, p.height = f, p;
2036
1840
  }
2037
1841
  }
2038
- async function mr(i) {
2039
- if (sr(i) && !await lo(i))
1842
+ async function vr(o) {
1843
+ if (sr(o) && !await lo(o))
2040
1844
  throw new DOMException(
2041
1845
  "Failed to load or decode HTMLImageElement.",
2042
1846
  "InvalidStateError"
2043
1847
  );
2044
- if (ur(i) && !await ho(i))
1848
+ if (ur(o) && !await fo(o))
2045
1849
  throw new DOMException(
2046
1850
  "Failed to load or decode SVGImageElement.",
2047
1851
  "InvalidStateError"
2048
1852
  );
2049
- if (fr(i) && fo(i))
1853
+ if (hr(o) && ho(o))
2050
1854
  throw new DOMException("VideoFrame is closed.", "InvalidStateError");
2051
- if (cr(i) && (i.readyState === 0 || i.readyState === 1))
1855
+ if (cr(o) && (o.readyState === 0 || o.readyState === 1))
2052
1856
  throw new DOMException("Invalid element or state.", "InvalidStateError");
2053
- if (dr(i) && mo(i))
1857
+ if (dr(o) && vo(o))
2054
1858
  throw new DOMException(
2055
1859
  "The image source is detached.",
2056
1860
  "InvalidStateError"
2057
1861
  );
2058
- const { width: f, height: y } = ao(i);
2059
- if (f === 0 || y === 0)
1862
+ const { width: f, height: p } = ao(o);
1863
+ if (f === 0 || p === 0)
2060
1864
  return null;
2061
- const g = io(f, y).getContext("2d");
2062
- g.drawImage(i, 0, 0);
1865
+ const c = io(f, p).getContext("2d");
1866
+ c.drawImage(o, 0, 0);
2063
1867
  try {
2064
- return g.getImageData(0, 0, f, y);
1868
+ return c.getImageData(0, 0, f, p);
2065
1869
  } catch {
2066
1870
  throw new DOMException("Source would taint origin.", "SecurityError");
2067
1871
  }
2068
1872
  }
2069
- async function so(i) {
1873
+ async function so(o) {
2070
1874
  let f;
2071
1875
  try {
2072
1876
  if (globalThis.createImageBitmap)
2073
- f = await createImageBitmap(i);
1877
+ f = await createImageBitmap(o);
2074
1878
  else if (globalThis.Image) {
2075
1879
  f = new Image();
2076
- let c = "";
1880
+ let y = "";
2077
1881
  try {
2078
- c = URL.createObjectURL(i), f.src = c, await f.decode();
1882
+ y = URL.createObjectURL(o), f.src = y, await f.decode();
2079
1883
  } finally {
2080
- URL.revokeObjectURL(c);
1884
+ URL.revokeObjectURL(y);
2081
1885
  }
2082
1886
  } else
2083
- return i;
1887
+ return o;
2084
1888
  } catch {
2085
1889
  throw new DOMException(
2086
1890
  "Failed to load or decode Blob.",
2087
1891
  "InvalidStateError"
2088
1892
  );
2089
1893
  }
2090
- return await mr(f);
1894
+ return await vr(f);
2091
1895
  }
2092
- function uo(i) {
2093
- const { width: f, height: y } = i;
2094
- if (f === 0 || y === 0)
1896
+ function uo(o) {
1897
+ const { width: f, height: p } = o;
1898
+ if (f === 0 || p === 0)
2095
1899
  return null;
2096
- const c = i.getContext("2d");
1900
+ const y = o.getContext("2d");
2097
1901
  try {
2098
- return c.getImageData(0, 0, f, y);
1902
+ return y.getImageData(0, 0, f, p);
2099
1903
  } catch {
2100
1904
  throw new DOMException("Source would taint origin.", "SecurityError");
2101
1905
  }
2102
1906
  }
2103
- async function co(i) {
2104
- if (pr(i))
2105
- return await so(i);
2106
- if (oo(i)) {
2107
- if (po(i))
1907
+ async function co(o) {
1908
+ if (pr(o))
1909
+ return await so(o);
1910
+ if (oo(o)) {
1911
+ if (po(o))
2108
1912
  throw new DOMException(
2109
1913
  "The image data has been detached.",
2110
1914
  "InvalidStateError"
2111
1915
  );
2112
- return i;
1916
+ return o;
2113
1917
  }
2114
- return lr(i) || hr(i) ? uo(i) : await mr(i);
1918
+ return lr(o) || fr(o) ? uo(o) : await vr(o);
2115
1919
  }
2116
- async function lo(i) {
1920
+ async function lo(o) {
2117
1921
  try {
2118
- return await i.decode(), !0;
1922
+ return await o.decode(), !0;
2119
1923
  } catch {
2120
1924
  return !1;
2121
1925
  }
2122
1926
  }
2123
- async function ho(i) {
1927
+ async function fo(o) {
2124
1928
  var f;
2125
1929
  try {
2126
- return await ((f = i.decode) == null ? void 0 : f.call(i)), !0;
1930
+ return await ((f = o.decode) == null ? void 0 : f.call(o)), !0;
2127
1931
  } catch {
2128
1932
  return !1;
2129
1933
  }
2130
1934
  }
2131
- function fo(i) {
2132
- return i.format === null;
1935
+ function ho(o) {
1936
+ return o.format === null;
2133
1937
  }
2134
- function po(i) {
2135
- return i.data.buffer.byteLength === 0;
1938
+ function po(o) {
1939
+ return o.data.buffer.byteLength === 0;
2136
1940
  }
2137
- function mo(i) {
2138
- return i.width === 0 && i.height === 0;
1941
+ function vo(o) {
1942
+ return o.width === 0 && o.height === 0;
2139
1943
  }
2140
- function nr(i, f) {
2141
- return i instanceof DOMException ? new DOMException(`${f}: ${i.message}`, i.name) : i instanceof Error ? new i.constructor(`${f}: ${i.message}`) : new Error(`${f}: ${i}`);
1944
+ function nr(o, f) {
1945
+ return o instanceof DOMException ? new DOMException(`${f}: ${o.message}`, o.name) : o instanceof Error ? new o.constructor(`${f}: ${o.message}`) : new Error(`${f}: ${o}`);
2142
1946
  }
2143
- var lt;
1947
+ var it;
2144
1948
  class go extends EventTarget {
2145
- constructor(y = {}) {
2146
- var c;
1949
+ constructor(p = {}) {
1950
+ var y;
2147
1951
  super();
2148
- Ke(this, lt, void 0);
1952
+ Ke(this, it);
2149
1953
  try {
2150
- const g = (c = y == null ? void 0 : y.formats) == null ? void 0 : c.filter(
2151
- ($) => $ !== "unknown"
1954
+ const c = (y = p == null ? void 0 : p.formats) == null ? void 0 : y.filter(
1955
+ (g) => g !== "unknown"
2152
1956
  );
2153
- if ((g == null ? void 0 : g.length) === 0)
1957
+ if ((c == null ? void 0 : c.length) === 0)
2154
1958
  throw new TypeError("Hint option provided, but is empty.");
2155
- for (const $ of g != null ? g : [])
2156
- if (!Bt.has($))
1959
+ for (const g of c != null ? c : [])
1960
+ if (!Bt.has(g))
2157
1961
  throw new TypeError(
2158
- `Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${$}' is not a valid enum value of type BarcodeFormat.`
1962
+ `Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${g}' is not a valid enum value of type BarcodeFormat.`
2159
1963
  );
2160
- tr(this, lt, g != null ? g : []), Ka().then(($) => {
1964
+ tr(this, it, c != null ? c : []), Ka().then((g) => {
2161
1965
  this.dispatchEvent(
2162
1966
  new CustomEvent("load", {
2163
- detail: $
1967
+ detail: g
2164
1968
  })
2165
1969
  );
2166
- }).catch(($) => {
2167
- this.dispatchEvent(new CustomEvent("error", { detail: $ }));
1970
+ }).catch((g) => {
1971
+ this.dispatchEvent(new CustomEvent("error", { detail: g }));
2168
1972
  });
2169
- } catch (g) {
1973
+ } catch (c) {
2170
1974
  throw nr(
2171
- g,
1975
+ c,
2172
1976
  "Failed to construct 'BarcodeDetector'"
2173
1977
  );
2174
1978
  }
2175
1979
  }
2176
1980
  static async getSupportedFormats() {
2177
- return ro.filter((y) => y !== "unknown");
1981
+ return ro.filter((p) => p !== "unknown");
2178
1982
  }
2179
- async detect(y) {
1983
+ async detect(p) {
2180
1984
  try {
2181
- const c = await co(y);
2182
- if (c === null)
1985
+ const y = await co(p);
1986
+ if (y === null)
2183
1987
  return [];
2184
- let g;
1988
+ let c;
2185
1989
  try {
2186
- pr(c) ? g = await to(c, {
1990
+ pr(y) ? c = await to(y, {
2187
1991
  tryHarder: !0,
2188
- formats: ue(this, lt).map(($) => Bt.get($))
2189
- }) : g = await eo(c, {
1992
+ // https://github.com/Sec-ant/barcode-detector/issues/91
1993
+ returnCodabarStartEnd: !0,
1994
+ formats: se(this, it).map((g) => Bt.get(g))
1995
+ }) : c = await eo(y, {
2190
1996
  tryHarder: !0,
2191
- formats: ue(this, lt).map(($) => Bt.get($))
1997
+ // https://github.com/Sec-ant/barcode-detector/issues/91
1998
+ returnCodabarStartEnd: !0,
1999
+ formats: se(this, it).map((g) => Bt.get(g))
2192
2000
  });
2193
- } catch ($) {
2194
- throw console.error($), new DOMException(
2001
+ } catch (g) {
2002
+ throw console.error(g), new DOMException(
2195
2003
  "Barcode detection service unavailable.",
2196
2004
  "NotSupportedError"
2197
2005
  );
2198
2006
  }
2199
- return g.map(($) => {
2007
+ return c.map((g) => {
2200
2008
  const {
2201
- topLeft: { x: H, y: U },
2202
- topRight: { x: V, y: B },
2203
- bottomLeft: { x: L, y: Y },
2204
- bottomRight: { x: S, y: ht }
2205
- } = $.position, at = Math.min(H, V, L, S), _t = Math.min(U, B, Y, ht), K = Math.max(H, V, L, S), tt = Math.max(U, B, Y, ht);
2009
+ topLeft: { x: j, y: k },
2010
+ topRight: { x: H, y: W },
2011
+ bottomLeft: { x: R, y: N },
2012
+ bottomRight: { x: U, y: M }
2013
+ } = g.position, bt = Math.min(j, H, R, U), ut = Math.min(k, W, N, M), ct = Math.max(j, H, R, U), Ut = Math.max(k, W, N, M);
2206
2014
  return {
2207
2015
  boundingBox: new DOMRectReadOnly(
2208
- at,
2209
- _t,
2210
- K - at,
2211
- tt - _t
2016
+ bt,
2017
+ ut,
2018
+ ct - bt,
2019
+ Ut - ut
2212
2020
  ),
2213
- rawValue: $.text,
2214
- format: no($.format),
2021
+ rawValue: g.text,
2022
+ format: no(g.format),
2215
2023
  cornerPoints: [
2216
2024
  {
2217
- x: H,
2218
- y: U
2025
+ x: j,
2026
+ y: k
2219
2027
  },
2220
2028
  {
2221
- x: V,
2222
- y: B
2029
+ x: H,
2030
+ y: W
2223
2031
  },
2224
2032
  {
2225
- x: S,
2226
- y: ht
2033
+ x: U,
2034
+ y: M
2227
2035
  },
2228
2036
  {
2229
- x: L,
2230
- y: Y
2037
+ x: R,
2038
+ y: N
2231
2039
  }
2232
2040
  ]
2233
2041
  };
2234
2042
  });
2235
- } catch (c) {
2043
+ } catch (y) {
2236
2044
  throw nr(
2237
- c,
2045
+ y,
2238
2046
  "Failed to execute 'detect' on 'BarcodeDetector'"
2239
2047
  );
2240
2048
  }
2241
2049
  }
2242
2050
  }
2243
- lt = new WeakMap();
2051
+ it = new WeakMap();
2244
2052
  export {
2245
2053
  go as BarcodeDetector,
2246
- vo as setZXingModuleOverrides
2054
+ yo as setZXingModuleOverrides
2247
2055
  };