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