barcode-detector 2.2.1 → 2.2.3

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