@bobfrankston/rmfmail 1.1.3 → 1.1.5

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.
Files changed (72) hide show
  1. package/bin/build-bundles.mjs +14 -4
  2. package/bin/mailx.js +15 -21
  3. package/bin/mailx.js.map +1 -1
  4. package/bin/mailx.ts +16 -22
  5. package/client/android-bootstrap.bundle.js +2151 -2
  6. package/client/android-bootstrap.bundle.js.map +4 -4
  7. package/client/app.bundle.js +30 -16
  8. package/client/app.bundle.js.map +2 -2
  9. package/client/app.js +20 -20
  10. package/client/app.js.map +1 -1
  11. package/client/app.ts +20 -20
  12. package/client/components/context-menu.js +9 -0
  13. package/client/components/context-menu.js.map +1 -1
  14. package/client/components/context-menu.ts +8 -0
  15. package/client/components/message-viewer.js +21 -5
  16. package/client/components/message-viewer.js.map +1 -1
  17. package/client/components/message-viewer.ts +21 -5
  18. package/client/compose/compose.bundle.js +4 -0
  19. package/client/compose/compose.bundle.js.map +2 -2
  20. package/client/index.html +23 -4
  21. package/client/lib/mailxapi.js +11 -7
  22. package/package.json +9 -9
  23. package/packages/mailx-api/index.d.ts +2 -2
  24. package/packages/mailx-api/index.d.ts.map +1 -1
  25. package/packages/mailx-api/index.js +2 -2
  26. package/packages/mailx-api/index.js.map +1 -1
  27. package/packages/mailx-api/index.ts +3 -3
  28. package/packages/mailx-core/index.d.ts.map +1 -1
  29. package/packages/mailx-core/index.js +3 -2
  30. package/packages/mailx-core/index.js.map +1 -1
  31. package/packages/mailx-core/index.ts +3 -2
  32. package/packages/mailx-imap/index.d.ts +13 -4
  33. package/packages/mailx-imap/index.d.ts.map +1 -1
  34. package/packages/mailx-imap/index.js +16 -8
  35. package/packages/mailx-imap/index.js.map +1 -1
  36. package/packages/mailx-imap/index.ts +15 -7
  37. package/packages/mailx-imap/package-lock.json +2 -2
  38. package/packages/mailx-imap/package.json +1 -1
  39. package/packages/mailx-server/index.d.ts.map +1 -1
  40. package/packages/mailx-server/index.js +4 -3
  41. package/packages/mailx-server/index.js.map +1 -1
  42. package/packages/mailx-server/index.ts +4 -3
  43. package/packages/mailx-service/db-worker.js +3 -4
  44. package/packages/mailx-service/db-worker.js.map +1 -1
  45. package/packages/mailx-service/db-worker.ts +5 -6
  46. package/packages/mailx-service/index.d.ts +20 -3
  47. package/packages/mailx-service/index.d.ts.map +1 -1
  48. package/packages/mailx-service/index.js +19 -17
  49. package/packages/mailx-service/index.js.map +1 -1
  50. package/packages/mailx-service/index.ts +18 -17
  51. package/packages/mailx-service/local-store.d.ts +7 -144
  52. package/packages/mailx-service/local-store.d.ts.map +1 -1
  53. package/packages/mailx-service/local-store.js +6 -511
  54. package/packages/mailx-service/local-store.js.map +1 -1
  55. package/packages/mailx-service/local-store.ts +7 -551
  56. package/packages/mailx-store/charset.d.ts +15 -0
  57. package/packages/mailx-store/charset.d.ts.map +1 -0
  58. package/packages/mailx-store/charset.js +61 -0
  59. package/packages/mailx-store/charset.js.map +1 -0
  60. package/packages/mailx-store/charset.ts +45 -0
  61. package/packages/mailx-store/index.d.ts +2 -0
  62. package/packages/mailx-store/index.d.ts.map +1 -1
  63. package/packages/mailx-store/index.js +2 -0
  64. package/packages/mailx-store/index.js.map +1 -1
  65. package/packages/mailx-store/index.ts +4 -0
  66. package/packages/mailx-store/package.json +1 -1
  67. package/packages/mailx-store/store.d.ts +169 -0
  68. package/packages/mailx-store/store.d.ts.map +1 -0
  69. package/packages/mailx-store/store.js +528 -0
  70. package/packages/mailx-store/store.js.map +1 -0
  71. package/packages/mailx-store/store.ts +567 -0
  72. /package/packages/mailx-imap/{node_modules.npmglobalize-stash-444 → node_modules.npmglobalize-stash-11408}/.package-lock.json +0 -0
@@ -1,12 +1,2161 @@
1
+ var __create = Object.create;
1
2
  var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
2
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
3
7
  var __esm = (fn, res) => function __init() {
4
8
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
5
9
  };
10
+ var __commonJS = (cb, mod) => function __require() {
11
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
12
+ };
6
13
  var __export = (target, all) => {
7
14
  for (var name in all)
8
15
  __defProp(target, name, { get: all[name], enumerable: true });
9
16
  };
17
+ var __copyProps = (to, from, except, desc) => {
18
+ if (from && typeof from === "object" || typeof from === "function") {
19
+ for (let key of __getOwnPropNames(from))
20
+ if (!__hasOwnProp.call(to, key) && key !== except)
21
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
22
+ }
23
+ return to;
24
+ };
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
26
+ // If the importer is in node compatibility mode or this is not an ESM
27
+ // file that has been converted to a CommonJS file using a Babel-
28
+ // compatible transform (i.e. "__esModule" has not been set), then set
29
+ // "default" to the CommonJS "module.exports" for node compatibility.
30
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
31
+ mod
32
+ ));
33
+
34
+ // node_modules/sql.js/dist/sql-wasm-browser.js
35
+ var require_sql_wasm_browser = __commonJS({
36
+ "node_modules/sql.js/dist/sql-wasm-browser.js"(exports, module) {
37
+ var initSqlJsPromise = void 0;
38
+ var initSqlJs2 = function(moduleConfig) {
39
+ if (initSqlJsPromise) {
40
+ return initSqlJsPromise;
41
+ }
42
+ initSqlJsPromise = new Promise(function(resolveModule, reject) {
43
+ var Module = typeof moduleConfig !== "undefined" ? moduleConfig : {};
44
+ var originalOnAbortFunction = Module["onAbort"];
45
+ Module["onAbort"] = function(errorThatCausedAbort) {
46
+ reject(new Error(errorThatCausedAbort));
47
+ if (originalOnAbortFunction) {
48
+ originalOnAbortFunction(errorThatCausedAbort);
49
+ }
50
+ };
51
+ Module["postRun"] = Module["postRun"] || [];
52
+ Module["postRun"].push(function() {
53
+ resolveModule(Module);
54
+ });
55
+ module = void 0;
56
+ var k;
57
+ k ||= typeof Module != "undefined" ? Module : {};
58
+ var aa = !!globalThis.window, ba = !!globalThis.WorkerGlobalScope;
59
+ k.onRuntimeInitialized = function() {
60
+ function a(f, l) {
61
+ switch (typeof l) {
62
+ case "boolean":
63
+ $b(f, l ? 1 : 0);
64
+ break;
65
+ case "number":
66
+ ac(f, l);
67
+ break;
68
+ case "string":
69
+ bc(f, l, -1, -1);
70
+ break;
71
+ case "object":
72
+ if (null === l) eb(f);
73
+ else if (null != l.length) {
74
+ var n = ca(l.length);
75
+ m.set(l, n);
76
+ cc(f, n, l.length, -1);
77
+ da(n);
78
+ } else ra(f, "Wrong API use : tried to return a value of an unknown type (" + l + ").", -1);
79
+ break;
80
+ default:
81
+ eb(f);
82
+ }
83
+ }
84
+ function b(f, l) {
85
+ for (var n = [], p = 0; p < f; p += 1) {
86
+ var u = r(l + 4 * p, "i32"), v = dc(u);
87
+ if (1 === v || 2 === v) u = ec(u);
88
+ else if (3 === v) u = fc(u);
89
+ else if (4 === v) {
90
+ v = u;
91
+ u = gc(v);
92
+ v = hc(v);
93
+ for (var K = new Uint8Array(u), I = 0; I < u; I += 1) K[I] = m[v + I];
94
+ u = K;
95
+ } else u = null;
96
+ n.push(u);
97
+ }
98
+ return n;
99
+ }
100
+ function c(f, l) {
101
+ this.Qa = f;
102
+ this.db = l;
103
+ this.Oa = 1;
104
+ this.yb = [];
105
+ }
106
+ function d(f, l) {
107
+ this.db = l;
108
+ this.ob = ea(f);
109
+ if (null === this.ob) throw Error("Unable to allocate memory for the SQL string");
110
+ this.ub = this.ob;
111
+ this.gb = this.Fb = null;
112
+ }
113
+ function e(f) {
114
+ this.filename = "dbfile_" + (4294967295 * Math.random() >>> 0);
115
+ if (null != f) {
116
+ var l = this.filename, n = "/", p = l;
117
+ n && (n = "string" == typeof n ? n : fa(n), p = l ? ha(n + "/" + l) : n);
118
+ l = ia(true, true);
119
+ p = ja(
120
+ p,
121
+ l
122
+ );
123
+ if (f) {
124
+ if ("string" == typeof f) {
125
+ n = Array(f.length);
126
+ for (var u = 0, v = f.length; u < v; ++u) n[u] = f.charCodeAt(u);
127
+ f = n;
128
+ }
129
+ ka(p, l | 146);
130
+ n = la(p, 577);
131
+ ma(n, f, 0, f.length, 0);
132
+ na(n);
133
+ ka(p, l);
134
+ }
135
+ }
136
+ this.handleError(q(this.filename, g));
137
+ this.db = r(g, "i32");
138
+ hb(this.db);
139
+ this.pb = {};
140
+ this.Sa = {};
141
+ }
142
+ var g = y(4), h = k.cwrap, q = h("sqlite3_open", "number", ["string", "number"]), w = h("sqlite3_close_v2", "number", ["number"]), t = h("sqlite3_exec", "number", ["number", "string", "number", "number", "number"]), x = h("sqlite3_changes", "number", ["number"]), D = h(
143
+ "sqlite3_prepare_v2",
144
+ "number",
145
+ ["number", "string", "number", "number", "number"]
146
+ ), ib = h("sqlite3_sql", "string", ["number"]), jc = h("sqlite3_normalized_sql", "string", ["number"]), jb = h("sqlite3_prepare_v2", "number", ["number", "number", "number", "number", "number"]), kc = h("sqlite3_bind_text", "number", ["number", "number", "number", "number", "number"]), kb = h("sqlite3_bind_blob", "number", ["number", "number", "number", "number", "number"]), lc = h("sqlite3_bind_double", "number", ["number", "number", "number"]), mc = h("sqlite3_bind_int", "number", [
147
+ "number",
148
+ "number",
149
+ "number"
150
+ ]), nc = h("sqlite3_bind_parameter_index", "number", ["number", "string"]), oc = h("sqlite3_step", "number", ["number"]), pc = h("sqlite3_errmsg", "string", ["number"]), qc = h("sqlite3_column_count", "number", ["number"]), rc = h("sqlite3_data_count", "number", ["number"]), sc = h("sqlite3_column_double", "number", ["number", "number"]), lb = h("sqlite3_column_text", "string", ["number", "number"]), tc = h("sqlite3_column_blob", "number", ["number", "number"]), uc = h("sqlite3_column_bytes", "number", ["number", "number"]), vc = h(
151
+ "sqlite3_column_type",
152
+ "number",
153
+ ["number", "number"]
154
+ ), wc = h("sqlite3_column_name", "string", ["number", "number"]), xc = h("sqlite3_reset", "number", ["number"]), yc = h("sqlite3_clear_bindings", "number", ["number"]), zc = h("sqlite3_finalize", "number", ["number"]), mb = h("sqlite3_create_function_v2", "number", "number string number number number number number number number".split(" ")), dc = h("sqlite3_value_type", "number", ["number"]), gc = h("sqlite3_value_bytes", "number", ["number"]), fc = h("sqlite3_value_text", "string", ["number"]), hc = h(
155
+ "sqlite3_value_blob",
156
+ "number",
157
+ ["number"]
158
+ ), ec = h("sqlite3_value_double", "number", ["number"]), ac = h("sqlite3_result_double", "", ["number", "number"]), eb = h("sqlite3_result_null", "", ["number"]), bc = h("sqlite3_result_text", "", ["number", "string", "number", "number"]), cc = h("sqlite3_result_blob", "", ["number", "number", "number", "number"]), $b = h("sqlite3_result_int", "", ["number", "number"]), ra = h("sqlite3_result_error", "", ["number", "string", "number"]), nb = h("sqlite3_aggregate_context", "number", ["number", "number"]), hb = h(
159
+ "RegisterExtensionFunctions",
160
+ "number",
161
+ ["number"]
162
+ ), ob = h("sqlite3_update_hook", "number", ["number", "number", "number"]);
163
+ c.prototype.bind = function(f) {
164
+ if (!this.Qa) throw "Statement closed";
165
+ this.reset();
166
+ return Array.isArray(f) ? this.Wb(f) : null != f && "object" === typeof f ? this.Xb(f) : true;
167
+ };
168
+ c.prototype.step = function() {
169
+ if (!this.Qa) throw "Statement closed";
170
+ this.Oa = 1;
171
+ var f = oc(this.Qa);
172
+ switch (f) {
173
+ case 100:
174
+ return true;
175
+ case 101:
176
+ return false;
177
+ default:
178
+ throw this.db.handleError(f);
179
+ }
180
+ };
181
+ c.prototype.Pb = function(f) {
182
+ null == f && (f = this.Oa, this.Oa += 1);
183
+ return sc(this.Qa, f);
184
+ };
185
+ c.prototype.hc = function(f) {
186
+ null == f && (f = this.Oa, this.Oa += 1);
187
+ f = lb(this.Qa, f);
188
+ if ("function" !== typeof BigInt) throw Error("BigInt is not supported");
189
+ return BigInt(f);
190
+ };
191
+ c.prototype.mc = function(f) {
192
+ null == f && (f = this.Oa, this.Oa += 1);
193
+ return lb(this.Qa, f);
194
+ };
195
+ c.prototype.getBlob = function(f) {
196
+ null == f && (f = this.Oa, this.Oa += 1);
197
+ var l = uc(this.Qa, f);
198
+ f = tc(this.Qa, f);
199
+ for (var n = new Uint8Array(l), p = 0; p < l; p += 1) n[p] = m[f + p];
200
+ return n;
201
+ };
202
+ c.prototype.get = function(f, l) {
203
+ l = l || {};
204
+ null != f && this.bind(f) && this.step();
205
+ f = [];
206
+ for (var n = rc(this.Qa), p = 0; p < n; p += 1) switch (vc(this.Qa, p)) {
207
+ case 1:
208
+ var u = l.useBigInt ? this.hc(p) : this.Pb(p);
209
+ f.push(u);
210
+ break;
211
+ case 2:
212
+ f.push(this.Pb(p));
213
+ break;
214
+ case 3:
215
+ f.push(this.mc(p));
216
+ break;
217
+ case 4:
218
+ f.push(this.getBlob(p));
219
+ break;
220
+ default:
221
+ f.push(null);
222
+ }
223
+ return f;
224
+ };
225
+ c.prototype.Db = function() {
226
+ for (var f = [], l = qc(this.Qa), n = 0; n < l; n += 1) f.push(wc(this.Qa, n));
227
+ return f;
228
+ };
229
+ c.prototype.Ob = function(f, l) {
230
+ f = this.get(f, l);
231
+ l = this.Db();
232
+ for (var n = {}, p = 0; p < l.length; p += 1) n[l[p]] = f[p];
233
+ return n;
234
+ };
235
+ c.prototype.lc = function() {
236
+ return ib(this.Qa);
237
+ };
238
+ c.prototype.ic = function() {
239
+ return jc(this.Qa);
240
+ };
241
+ c.prototype.Jb = function(f) {
242
+ null != f && this.bind(f);
243
+ this.step();
244
+ return this.reset();
245
+ };
246
+ c.prototype.Lb = function(f, l) {
247
+ null == l && (l = this.Oa, this.Oa += 1);
248
+ f = ea(f);
249
+ this.yb.push(f);
250
+ this.db.handleError(kc(this.Qa, l, f, -1, 0));
251
+ };
252
+ c.prototype.Vb = function(f, l) {
253
+ null == l && (l = this.Oa, this.Oa += 1);
254
+ var n = ca(f.length);
255
+ m.set(f, n);
256
+ this.yb.push(n);
257
+ this.db.handleError(kb(this.Qa, l, n, f.length, 0));
258
+ };
259
+ c.prototype.Kb = function(f, l) {
260
+ null == l && (l = this.Oa, this.Oa += 1);
261
+ this.db.handleError((f === (f | 0) ? mc : lc)(
262
+ this.Qa,
263
+ l,
264
+ f
265
+ ));
266
+ };
267
+ c.prototype.Yb = function(f) {
268
+ null == f && (f = this.Oa, this.Oa += 1);
269
+ kb(this.Qa, f, 0, 0, 0);
270
+ };
271
+ c.prototype.Mb = function(f, l) {
272
+ null == l && (l = this.Oa, this.Oa += 1);
273
+ switch (typeof f) {
274
+ case "string":
275
+ this.Lb(f, l);
276
+ return;
277
+ case "number":
278
+ this.Kb(f, l);
279
+ return;
280
+ case "bigint":
281
+ this.Lb(f.toString(), l);
282
+ return;
283
+ case "boolean":
284
+ this.Kb(f + 0, l);
285
+ return;
286
+ case "object":
287
+ if (null === f) {
288
+ this.Yb(l);
289
+ return;
290
+ }
291
+ if (null != f.length) {
292
+ this.Vb(f, l);
293
+ return;
294
+ }
295
+ }
296
+ throw "Wrong API use : tried to bind a value of an unknown type (" + f + ").";
297
+ };
298
+ c.prototype.Xb = function(f) {
299
+ var l = this;
300
+ Object.keys(f).forEach(function(n) {
301
+ var p = nc(l.Qa, n);
302
+ 0 !== p && l.Mb(f[n], p);
303
+ });
304
+ return true;
305
+ };
306
+ c.prototype.Wb = function(f) {
307
+ for (var l = 0; l < f.length; l += 1) this.Mb(f[l], l + 1);
308
+ return true;
309
+ };
310
+ c.prototype.reset = function() {
311
+ this.Cb();
312
+ return 0 === yc(this.Qa) && 0 === xc(this.Qa);
313
+ };
314
+ c.prototype.Cb = function() {
315
+ for (var f; void 0 !== (f = this.yb.pop()); ) da(f);
316
+ };
317
+ c.prototype.cb = function() {
318
+ this.Cb();
319
+ var f = 0 === zc(this.Qa);
320
+ delete this.db.pb[this.Qa];
321
+ this.Qa = 0;
322
+ return f;
323
+ };
324
+ d.prototype.next = function() {
325
+ if (null === this.ob) return { done: true };
326
+ null !== this.gb && (this.gb.cb(), this.gb = null);
327
+ if (!this.db.db) throw this.Ab(), Error("Database closed");
328
+ var f = oa(), l = y(4);
329
+ pa(g);
330
+ pa(l);
331
+ try {
332
+ this.db.handleError(jb(this.db.db, this.ub, -1, g, l));
333
+ this.ub = r(l, "i32");
334
+ var n = r(g, "i32");
335
+ if (0 === n) return this.Ab(), { done: true };
336
+ this.gb = new c(n, this.db);
337
+ this.db.pb[n] = this.gb;
338
+ return { value: this.gb, done: false };
339
+ } catch (p) {
340
+ throw this.Fb = z(this.ub), this.Ab(), p;
341
+ } finally {
342
+ qa(f);
343
+ }
344
+ };
345
+ d.prototype.Ab = function() {
346
+ da(this.ob);
347
+ this.ob = null;
348
+ };
349
+ d.prototype.jc = function() {
350
+ return null !== this.Fb ? this.Fb : z(this.ub);
351
+ };
352
+ "function" === typeof Symbol && "symbol" === typeof Symbol.iterator && (d.prototype[Symbol.iterator] = function() {
353
+ return this;
354
+ });
355
+ e.prototype.Jb = function(f, l) {
356
+ if (!this.db) throw "Database closed";
357
+ if (l) {
358
+ f = this.Gb(f, l);
359
+ try {
360
+ f.step();
361
+ } finally {
362
+ f.cb();
363
+ }
364
+ } else this.handleError(t(this.db, f, 0, 0, g));
365
+ return this;
366
+ };
367
+ e.prototype.exec = function(f, l, n) {
368
+ if (!this.db) throw "Database closed";
369
+ var p = null, u = null, v = null;
370
+ try {
371
+ v = u = ea(f);
372
+ var K = y(4);
373
+ for (f = []; 0 !== r(v, "i8"); ) {
374
+ pa(g);
375
+ pa(K);
376
+ this.handleError(jb(this.db, v, -1, g, K));
377
+ var I = r(g, "i32");
378
+ v = r(
379
+ K,
380
+ "i32"
381
+ );
382
+ if (0 !== I) {
383
+ var H = null;
384
+ p = new c(I, this);
385
+ for (null != l && p.bind(l); p.step(); ) null === H && (H = { columns: p.Db(), values: [] }, f.push(H)), H.values.push(p.get(null, n));
386
+ p.cb();
387
+ }
388
+ }
389
+ return f;
390
+ } catch (L) {
391
+ throw p && p.cb(), L;
392
+ } finally {
393
+ u && da(u);
394
+ }
395
+ };
396
+ e.prototype.ec = function(f, l, n, p, u) {
397
+ "function" === typeof l && (p = n, n = l, l = void 0);
398
+ f = this.Gb(f, l);
399
+ try {
400
+ for (; f.step(); ) n(f.Ob(null, u));
401
+ } finally {
402
+ f.cb();
403
+ }
404
+ if ("function" === typeof p) return p();
405
+ };
406
+ e.prototype.Gb = function(f, l) {
407
+ pa(g);
408
+ this.handleError(D(this.db, f, -1, g, 0));
409
+ f = r(g, "i32");
410
+ if (0 === f) throw "Nothing to prepare";
411
+ var n = new c(f, this);
412
+ null != l && n.bind(l);
413
+ return this.pb[f] = n;
414
+ };
415
+ e.prototype.pc = function(f) {
416
+ return new d(f, this);
417
+ };
418
+ e.prototype.fc = function() {
419
+ Object.values(this.pb).forEach(function(l) {
420
+ l.cb();
421
+ });
422
+ Object.values(this.Sa).forEach(A);
423
+ this.Sa = {};
424
+ this.handleError(w(this.db));
425
+ var f = sa(this.filename);
426
+ this.handleError(q(this.filename, g));
427
+ this.db = r(g, "i32");
428
+ hb(this.db);
429
+ return f;
430
+ };
431
+ e.prototype.close = function() {
432
+ null !== this.db && (Object.values(this.pb).forEach(function(f) {
433
+ f.cb();
434
+ }), Object.values(this.Sa).forEach(A), this.Sa = {}, this.fb && (A(this.fb), this.fb = void 0), this.handleError(w(this.db)), ta("/" + this.filename), this.db = null);
435
+ };
436
+ e.prototype.handleError = function(f) {
437
+ if (0 === f) return null;
438
+ f = pc(this.db);
439
+ throw Error(f);
440
+ };
441
+ e.prototype.kc = function() {
442
+ return x(this.db);
443
+ };
444
+ e.prototype.bc = function(f, l) {
445
+ Object.prototype.hasOwnProperty.call(this.Sa, f) && (A(this.Sa[f]), delete this.Sa[f]);
446
+ var n = ua(function(p, u, v) {
447
+ u = b(u, v);
448
+ try {
449
+ var K = l.apply(null, u);
450
+ } catch (I) {
451
+ ra(p, I, -1);
452
+ return;
453
+ }
454
+ a(p, K);
455
+ }, "viii");
456
+ this.Sa[f] = n;
457
+ this.handleError(mb(
458
+ this.db,
459
+ f,
460
+ l.length,
461
+ 1,
462
+ 0,
463
+ n,
464
+ 0,
465
+ 0,
466
+ 0
467
+ ));
468
+ return this;
469
+ };
470
+ e.prototype.ac = function(f, l) {
471
+ var n = l.init || function() {
472
+ return null;
473
+ }, p = l.finalize || function(H) {
474
+ return H;
475
+ }, u = l.step;
476
+ if (!u) throw "An aggregate function must have a step function in " + f;
477
+ var v = {};
478
+ Object.hasOwnProperty.call(this.Sa, f) && (A(this.Sa[f]), delete this.Sa[f]);
479
+ l = f + "__finalize";
480
+ Object.hasOwnProperty.call(this.Sa, l) && (A(this.Sa[l]), delete this.Sa[l]);
481
+ var K = ua(function(H, L, Ka) {
482
+ var V = nb(H, 1);
483
+ Object.hasOwnProperty.call(v, V) || (v[V] = n());
484
+ L = b(L, Ka);
485
+ L = [v[V]].concat(L);
486
+ try {
487
+ v[V] = u.apply(
488
+ null,
489
+ L
490
+ );
491
+ } catch (Bc) {
492
+ delete v[V], ra(H, Bc, -1);
493
+ }
494
+ }, "viii"), I = ua(function(H) {
495
+ var L = nb(H, 1);
496
+ try {
497
+ var Ka = p(v[L]);
498
+ } catch (V) {
499
+ delete v[L];
500
+ ra(H, V, -1);
501
+ return;
502
+ }
503
+ a(H, Ka);
504
+ delete v[L];
505
+ }, "vi");
506
+ this.Sa[f] = K;
507
+ this.Sa[l] = I;
508
+ this.handleError(mb(this.db, f, u.length - 1, 1, 0, 0, K, I, 0));
509
+ return this;
510
+ };
511
+ e.prototype.vc = function(f) {
512
+ this.fb && (ob(this.db, 0, 0), A(this.fb), this.fb = void 0);
513
+ if (!f) return this;
514
+ this.fb = ua(function(l, n, p, u, v) {
515
+ switch (n) {
516
+ case 18:
517
+ l = "insert";
518
+ break;
519
+ case 23:
520
+ l = "update";
521
+ break;
522
+ case 9:
523
+ l = "delete";
524
+ break;
525
+ default:
526
+ throw "unknown operationCode in updateHook callback: " + n;
527
+ }
528
+ p = z(p);
529
+ u = z(u);
530
+ if (v > Number.MAX_SAFE_INTEGER) throw "rowId too big to fit inside a Number";
531
+ f(l, p, u, Number(v));
532
+ }, "viiiij");
533
+ ob(this.db, this.fb, 0);
534
+ return this;
535
+ };
536
+ c.prototype.bind = c.prototype.bind;
537
+ c.prototype.step = c.prototype.step;
538
+ c.prototype.get = c.prototype.get;
539
+ c.prototype.getColumnNames = c.prototype.Db;
540
+ c.prototype.getAsObject = c.prototype.Ob;
541
+ c.prototype.getSQL = c.prototype.lc;
542
+ c.prototype.getNormalizedSQL = c.prototype.ic;
543
+ c.prototype.run = c.prototype.Jb;
544
+ c.prototype.reset = c.prototype.reset;
545
+ c.prototype.freemem = c.prototype.Cb;
546
+ c.prototype.free = c.prototype.cb;
547
+ d.prototype.next = d.prototype.next;
548
+ d.prototype.getRemainingSQL = d.prototype.jc;
549
+ e.prototype.run = e.prototype.Jb;
550
+ e.prototype.exec = e.prototype.exec;
551
+ e.prototype.each = e.prototype.ec;
552
+ e.prototype.prepare = e.prototype.Gb;
553
+ e.prototype.iterateStatements = e.prototype.pc;
554
+ e.prototype["export"] = e.prototype.fc;
555
+ e.prototype.close = e.prototype.close;
556
+ e.prototype.handleError = e.prototype.handleError;
557
+ e.prototype.getRowsModified = e.prototype.kc;
558
+ e.prototype.create_function = e.prototype.bc;
559
+ e.prototype.create_aggregate = e.prototype.ac;
560
+ e.prototype.updateHook = e.prototype.vc;
561
+ k.Database = e;
562
+ };
563
+ var va = "./this.program", wa = globalThis.document?.currentScript?.src;
564
+ ba && (wa = self.location.href);
565
+ var xa = "", ya, za;
566
+ if (aa || ba) {
567
+ try {
568
+ xa = new URL(".", wa).href;
569
+ } catch {
570
+ }
571
+ ba && (za = (a) => {
572
+ var b = new XMLHttpRequest();
573
+ b.open("GET", a, false);
574
+ b.responseType = "arraybuffer";
575
+ b.send(null);
576
+ return new Uint8Array(b.response);
577
+ });
578
+ ya = async (a) => {
579
+ a = await fetch(a, { credentials: "same-origin" });
580
+ if (a.ok) return a.arrayBuffer();
581
+ throw Error(a.status + " : " + a.url);
582
+ };
583
+ }
584
+ var Aa = console.log.bind(console), B = console.error.bind(console), Ba, Ca = false, Da, m, C, Ea, E, F, Fa, Ga, G;
585
+ function Ha() {
586
+ var a = Ia.buffer;
587
+ m = new Int8Array(a);
588
+ Ea = new Int16Array(a);
589
+ C = new Uint8Array(a);
590
+ new Uint16Array(a);
591
+ E = new Int32Array(a);
592
+ F = new Uint32Array(a);
593
+ Fa = new Float32Array(a);
594
+ Ga = new Float64Array(a);
595
+ G = new BigInt64Array(a);
596
+ new BigUint64Array(a);
597
+ }
598
+ function Ja(a) {
599
+ k.onAbort?.(a);
600
+ a = "Aborted(" + a + ")";
601
+ B(a);
602
+ Ca = true;
603
+ throw new WebAssembly.RuntimeError(a + ". Build with -sASSERTIONS for more info.");
604
+ }
605
+ var La;
606
+ async function Ma(a) {
607
+ if (!Ba) try {
608
+ var b = await ya(a);
609
+ return new Uint8Array(b);
610
+ } catch {
611
+ }
612
+ if (a == La && Ba) a = new Uint8Array(Ba);
613
+ else if (za) a = za(a);
614
+ else throw "both async and sync fetching of the wasm failed";
615
+ return a;
616
+ }
617
+ async function Na(a, b) {
618
+ try {
619
+ var c = await Ma(a);
620
+ return await WebAssembly.instantiate(c, b);
621
+ } catch (d) {
622
+ B(`failed to asynchronously prepare wasm: ${d}`), Ja(d);
623
+ }
624
+ }
625
+ async function Oa(a) {
626
+ var b = La;
627
+ if (!Ba) try {
628
+ var c = fetch(b, { credentials: "same-origin" });
629
+ return await WebAssembly.instantiateStreaming(c, a);
630
+ } catch (d) {
631
+ B(`wasm streaming compile failed: ${d}`), B("falling back to ArrayBuffer instantiation");
632
+ }
633
+ return Na(b, a);
634
+ }
635
+ class Pa {
636
+ name = "ExitStatus";
637
+ constructor(a) {
638
+ this.message = `Program terminated with exit(${a})`;
639
+ this.status = a;
640
+ }
641
+ }
642
+ var Qa = (a) => {
643
+ for (; 0 < a.length; ) a.shift()(k);
644
+ }, Ra = [], Sa = [], Ta = () => {
645
+ var a = k.preRun.shift();
646
+ Sa.push(a);
647
+ }, J = 0, Ua = null;
648
+ function r(a, b = "i8") {
649
+ b.endsWith("*") && (b = "*");
650
+ switch (b) {
651
+ case "i1":
652
+ return m[a];
653
+ case "i8":
654
+ return m[a];
655
+ case "i16":
656
+ return Ea[a >> 1];
657
+ case "i32":
658
+ return E[a >> 2];
659
+ case "i64":
660
+ return G[a >> 3];
661
+ case "float":
662
+ return Fa[a >> 2];
663
+ case "double":
664
+ return Ga[a >> 3];
665
+ case "*":
666
+ return F[a >> 2];
667
+ default:
668
+ Ja(`invalid type for getValue: ${b}`);
669
+ }
670
+ }
671
+ var Va = true;
672
+ function pa(a) {
673
+ var b = "i32";
674
+ b.endsWith("*") && (b = "*");
675
+ switch (b) {
676
+ case "i1":
677
+ m[a] = 0;
678
+ break;
679
+ case "i8":
680
+ m[a] = 0;
681
+ break;
682
+ case "i16":
683
+ Ea[a >> 1] = 0;
684
+ break;
685
+ case "i32":
686
+ E[a >> 2] = 0;
687
+ break;
688
+ case "i64":
689
+ G[a >> 3] = BigInt(0);
690
+ break;
691
+ case "float":
692
+ Fa[a >> 2] = 0;
693
+ break;
694
+ case "double":
695
+ Ga[a >> 3] = 0;
696
+ break;
697
+ case "*":
698
+ F[a >> 2] = 0;
699
+ break;
700
+ default:
701
+ Ja(`invalid type for setValue: ${b}`);
702
+ }
703
+ }
704
+ var Wa = new TextDecoder(), Xa = (a, b, c, d) => {
705
+ c = b + c;
706
+ if (d) return c;
707
+ for (; a[b] && !(b >= c); ) ++b;
708
+ return b;
709
+ }, z = (a, b, c) => a ? Wa.decode(C.subarray(a, Xa(C, a, b, c))) : "", Ya = (a, b) => {
710
+ for (var c = 0, d = a.length - 1; 0 <= d; d--) {
711
+ var e = a[d];
712
+ "." === e ? a.splice(d, 1) : ".." === e ? (a.splice(d, 1), c++) : c && (a.splice(d, 1), c--);
713
+ }
714
+ if (b) for (; c; c--) a.unshift("..");
715
+ return a;
716
+ }, ha = (a) => {
717
+ var b = "/" === a.charAt(0), c = "/" === a.slice(-1);
718
+ (a = Ya(a.split("/").filter((d) => !!d), !b).join("/")) || b || (a = ".");
719
+ a && c && (a += "/");
720
+ return (b ? "/" : "") + a;
721
+ }, Za = (a) => {
722
+ var b = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);
723
+ a = b[0];
724
+ b = b[1];
725
+ if (!a && !b) return ".";
726
+ b &&= b.slice(0, -1);
727
+ return a + b;
728
+ }, $a = (a) => a && a.match(/([^\/]+|\/)\/*$/)[1], ab = () => (a) => crypto.getRandomValues(a), bb = (a) => {
729
+ (bb = ab())(a);
730
+ }, cb = (...a) => {
731
+ for (var b = "", c = false, d = a.length - 1; -1 <= d && !c; d--) {
732
+ c = 0 <= d ? a[d] : "/";
733
+ if ("string" != typeof c) throw new TypeError("Arguments to path.resolve must be strings");
734
+ if (!c) return "";
735
+ b = c + "/" + b;
736
+ c = "/" === c.charAt(0);
737
+ }
738
+ b = Ya(b.split("/").filter((e) => !!e), !c).join("/");
739
+ return (c ? "/" : "") + b || ".";
740
+ }, db2 = (a) => {
741
+ var b = Xa(a, 0);
742
+ return Wa.decode(a.buffer ? a.subarray(0, b) : new Uint8Array(a.slice(0, b)));
743
+ }, fb = [], gb = (a) => {
744
+ for (var b = 0, c = 0; c < a.length; ++c) {
745
+ var d = a.charCodeAt(c);
746
+ 127 >= d ? b++ : 2047 >= d ? b += 2 : 55296 <= d && 57343 >= d ? (b += 4, ++c) : b += 3;
747
+ }
748
+ return b;
749
+ }, M = (a, b, c, d) => {
750
+ if (!(0 < d)) return 0;
751
+ var e = c;
752
+ d = c + d - 1;
753
+ for (var g = 0; g < a.length; ++g) {
754
+ var h = a.codePointAt(g);
755
+ if (127 >= h) {
756
+ if (c >= d) break;
757
+ b[c++] = h;
758
+ } else if (2047 >= h) {
759
+ if (c + 1 >= d) break;
760
+ b[c++] = 192 | h >> 6;
761
+ b[c++] = 128 | h & 63;
762
+ } else if (65535 >= h) {
763
+ if (c + 2 >= d) break;
764
+ b[c++] = 224 | h >> 12;
765
+ b[c++] = 128 | h >> 6 & 63;
766
+ b[c++] = 128 | h & 63;
767
+ } else {
768
+ if (c + 3 >= d) break;
769
+ b[c++] = 240 | h >> 18;
770
+ b[c++] = 128 | h >> 12 & 63;
771
+ b[c++] = 128 | h >> 6 & 63;
772
+ b[c++] = 128 | h & 63;
773
+ g++;
774
+ }
775
+ }
776
+ b[c] = 0;
777
+ return c - e;
778
+ }, pb = [];
779
+ function qb(a, b) {
780
+ pb[a] = { input: [], output: [], kb: b };
781
+ rb(a, sb);
782
+ }
783
+ var sb = { open(a) {
784
+ var b = pb[a.node.nb];
785
+ if (!b) throw new N(43);
786
+ a.Va = b;
787
+ a.seekable = false;
788
+ }, close(a) {
789
+ a.Va.kb.lb(a.Va);
790
+ }, lb(a) {
791
+ a.Va.kb.lb(a.Va);
792
+ }, read(a, b, c, d) {
793
+ if (!a.Va || !a.Va.kb.Qb) throw new N(60);
794
+ for (var e = 0, g = 0; g < d; g++) {
795
+ try {
796
+ var h = a.Va.kb.Qb(a.Va);
797
+ } catch (q) {
798
+ throw new N(29);
799
+ }
800
+ if (void 0 === h && 0 === e) throw new N(6);
801
+ if (null === h || void 0 === h) break;
802
+ e++;
803
+ b[c + g] = h;
804
+ }
805
+ e && (a.node.$a = Date.now());
806
+ return e;
807
+ }, write(a, b, c, d) {
808
+ if (!a.Va || !a.Va.kb.Hb) throw new N(60);
809
+ try {
810
+ for (var e = 0; e < d; e++) a.Va.kb.Hb(a.Va, b[c + e]);
811
+ } catch (g) {
812
+ throw new N(29);
813
+ }
814
+ d && (a.node.Ua = a.node.Ta = Date.now());
815
+ return e;
816
+ } }, tb = { Qb() {
817
+ a: {
818
+ if (!fb.length) {
819
+ var a = null;
820
+ globalThis.window?.prompt && (a = window.prompt("Input: "), null !== a && (a += "\n"));
821
+ if (!a) {
822
+ var b = null;
823
+ break a;
824
+ }
825
+ b = Array(gb(a) + 1);
826
+ a = M(a, b, 0, b.length);
827
+ b.length = a;
828
+ fb = b;
829
+ }
830
+ b = fb.shift();
831
+ }
832
+ return b;
833
+ }, Hb(a, b) {
834
+ null === b || 10 === b ? (Aa(db2(a.output)), a.output = []) : 0 != b && a.output.push(b);
835
+ }, lb(a) {
836
+ 0 < a.output?.length && (Aa(db2(a.output)), a.output = []);
837
+ }, Dc() {
838
+ return { yc: 25856, Ac: 5, xc: 191, zc: 35387, wc: [
839
+ 3,
840
+ 28,
841
+ 127,
842
+ 21,
843
+ 4,
844
+ 0,
845
+ 1,
846
+ 0,
847
+ 17,
848
+ 19,
849
+ 26,
850
+ 0,
851
+ 18,
852
+ 15,
853
+ 23,
854
+ 22,
855
+ 0,
856
+ 0,
857
+ 0,
858
+ 0,
859
+ 0,
860
+ 0,
861
+ 0,
862
+ 0,
863
+ 0,
864
+ 0,
865
+ 0,
866
+ 0,
867
+ 0,
868
+ 0,
869
+ 0,
870
+ 0
871
+ ] };
872
+ }, Ec() {
873
+ return 0;
874
+ }, Fc() {
875
+ return [24, 80];
876
+ } }, ub = { Hb(a, b) {
877
+ null === b || 10 === b ? (B(db2(a.output)), a.output = []) : 0 != b && a.output.push(b);
878
+ }, lb(a) {
879
+ 0 < a.output?.length && (B(db2(a.output)), a.output = []);
880
+ } }, O = { Za: null, ab() {
881
+ return O.createNode(null, "/", 16895, 0);
882
+ }, createNode(a, b, c, d) {
883
+ if (24576 === (c & 61440) || 4096 === (c & 61440)) throw new N(63);
884
+ O.Za || (O.Za = { dir: { node: { Wa: O.La.Wa, Xa: O.La.Xa, mb: O.La.mb, rb: O.La.rb, Tb: O.La.Tb, xb: O.La.xb, vb: O.La.vb, Ib: O.La.Ib, wb: O.La.wb }, stream: { Ya: O.Ma.Ya } }, file: {
885
+ node: { Wa: O.La.Wa, Xa: O.La.Xa },
886
+ stream: { Ya: O.Ma.Ya, read: O.Ma.read, write: O.Ma.write, sb: O.Ma.sb, tb: O.Ma.tb }
887
+ }, link: { node: { Wa: O.La.Wa, Xa: O.La.Xa, eb: O.La.eb }, stream: {} }, Nb: { node: { Wa: O.La.Wa, Xa: O.La.Xa }, stream: vb } });
888
+ c = wb(a, b, c, d);
889
+ P(c.mode) ? (c.La = O.Za.dir.node, c.Ma = O.Za.dir.stream, c.Na = {}) : 32768 === (c.mode & 61440) ? (c.La = O.Za.file.node, c.Ma = O.Za.file.stream, c.Ra = 0, c.Na = null) : 40960 === (c.mode & 61440) ? (c.La = O.Za.link.node, c.Ma = O.Za.link.stream) : 8192 === (c.mode & 61440) && (c.La = O.Za.Nb.node, c.Ma = O.Za.Nb.stream);
890
+ c.$a = c.Ua = c.Ta = Date.now();
891
+ a && (a.Na[b] = c, a.$a = a.Ua = a.Ta = c.$a);
892
+ return c;
893
+ }, Cc(a) {
894
+ return a.Na ? a.Na.subarray ? a.Na.subarray(0, a.Ra) : new Uint8Array(a.Na) : new Uint8Array(0);
895
+ }, La: { Wa(a) {
896
+ var b = {};
897
+ b.cc = 8192 === (a.mode & 61440) ? a.id : 1;
898
+ b.oc = a.id;
899
+ b.mode = a.mode;
900
+ b.rc = 1;
901
+ b.uid = 0;
902
+ b.nc = 0;
903
+ b.nb = a.nb;
904
+ P(a.mode) ? b.size = 4096 : 32768 === (a.mode & 61440) ? b.size = a.Ra : 40960 === (a.mode & 61440) ? b.size = a.link.length : b.size = 0;
905
+ b.$a = new Date(a.$a);
906
+ b.Ua = new Date(a.Ua);
907
+ b.Ta = new Date(a.Ta);
908
+ b.Zb = 4096;
909
+ b.$b = Math.ceil(b.size / b.Zb);
910
+ return b;
911
+ }, Xa(a, b) {
912
+ for (var c of ["mode", "atime", "mtime", "ctime"]) null != b[c] && (a[c] = b[c]);
913
+ void 0 !== b.size && (b = b.size, a.Ra != b && (0 == b ? (a.Na = null, a.Ra = 0) : (c = a.Na, a.Na = new Uint8Array(b), c && a.Na.set(c.subarray(0, Math.min(b, a.Ra))), a.Ra = b)));
914
+ }, mb() {
915
+ O.zb || (O.zb = new N(44), O.zb.stack = "<generic error, no stack>");
916
+ throw O.zb;
917
+ }, rb(a, b, c, d) {
918
+ return O.createNode(a, b, c, d);
919
+ }, Tb(a, b, c) {
920
+ try {
921
+ var d = Q(b, c);
922
+ } catch (g) {
923
+ }
924
+ if (d) {
925
+ if (P(a.mode)) for (var e in d.Na) throw new N(55);
926
+ xb(d);
927
+ }
928
+ delete a.parent.Na[a.name];
929
+ b.Na[c] = a;
930
+ a.name = c;
931
+ b.Ta = b.Ua = a.parent.Ta = a.parent.Ua = Date.now();
932
+ }, xb(a, b) {
933
+ delete a.Na[b];
934
+ a.Ta = a.Ua = Date.now();
935
+ }, vb(a, b) {
936
+ var c = Q(a, b), d;
937
+ for (d in c.Na) throw new N(55);
938
+ delete a.Na[b];
939
+ a.Ta = a.Ua = Date.now();
940
+ }, Ib(a) {
941
+ return [".", "..", ...Object.keys(a.Na)];
942
+ }, wb(a, b, c) {
943
+ a = O.createNode(a, b, 41471, 0);
944
+ a.link = c;
945
+ return a;
946
+ }, eb(a) {
947
+ if (40960 !== (a.mode & 61440)) throw new N(28);
948
+ return a.link;
949
+ } }, Ma: { read(a, b, c, d, e) {
950
+ var g = a.node.Na;
951
+ if (e >= a.node.Ra) return 0;
952
+ a = Math.min(a.node.Ra - e, d);
953
+ if (8 < a && g.subarray) b.set(g.subarray(e, e + a), c);
954
+ else for (d = 0; d < a; d++) b[c + d] = g[e + d];
955
+ return a;
956
+ }, write(a, b, c, d, e, g) {
957
+ b.buffer === m.buffer && (g = false);
958
+ if (!d) return 0;
959
+ a = a.node;
960
+ a.Ua = a.Ta = Date.now();
961
+ if (b.subarray && (!a.Na || a.Na.subarray)) {
962
+ if (g) return a.Na = b.subarray(c, c + d), a.Ra = d;
963
+ if (0 === a.Ra && 0 === e) return a.Na = b.slice(c, c + d), a.Ra = d;
964
+ if (e + d <= a.Ra) return a.Na.set(b.subarray(c, c + d), e), d;
965
+ }
966
+ g = e + d;
967
+ var h = a.Na ? a.Na.length : 0;
968
+ h >= g || (g = Math.max(g, h * (1048576 > h ? 2 : 1.125) >>> 0), 0 != h && (g = Math.max(g, 256)), h = a.Na, a.Na = new Uint8Array(g), 0 < a.Ra && a.Na.set(h.subarray(0, a.Ra), 0));
969
+ if (a.Na.subarray && b.subarray) a.Na.set(b.subarray(c, c + d), e);
970
+ else for (g = 0; g < d; g++) a.Na[e + g] = b[c + g];
971
+ a.Ra = Math.max(
972
+ a.Ra,
973
+ e + d
974
+ );
975
+ return d;
976
+ }, Ya(a, b, c) {
977
+ 1 === c ? b += a.position : 2 === c && 32768 === (a.node.mode & 61440) && (b += a.node.Ra);
978
+ if (0 > b) throw new N(28);
979
+ return b;
980
+ }, sb(a, b, c, d, e) {
981
+ if (32768 !== (a.node.mode & 61440)) throw new N(43);
982
+ a = a.node.Na;
983
+ if (e & 2 || !a || a.buffer !== m.buffer) {
984
+ e = true;
985
+ d = 65536 * Math.ceil(b / 65536);
986
+ var g = yb(65536, d);
987
+ g && C.fill(0, g, g + d);
988
+ d = g;
989
+ if (!d) throw new N(48);
990
+ if (a) {
991
+ if (0 < c || c + b < a.length) a.subarray ? a = a.subarray(c, c + b) : a = Array.prototype.slice.call(a, c, c + b);
992
+ m.set(a, d);
993
+ }
994
+ } else e = false, d = a.byteOffset;
995
+ return { tc: d, Ub: e };
996
+ }, tb(a, b, c, d) {
997
+ O.Ma.write(
998
+ a,
999
+ b,
1000
+ 0,
1001
+ d,
1002
+ c,
1003
+ false
1004
+ );
1005
+ return 0;
1006
+ } } }, ia = (a, b) => {
1007
+ var c = 0;
1008
+ a && (c |= 365);
1009
+ b && (c |= 146);
1010
+ return c;
1011
+ }, zb = null, Ab = {}, Bb = [], Cb = 1, R = null, Db = false, Eb = true, N = class {
1012
+ name = "ErrnoError";
1013
+ constructor(a) {
1014
+ this.Pa = a;
1015
+ }
1016
+ }, Fb = class {
1017
+ qb = {};
1018
+ node = null;
1019
+ get flags() {
1020
+ return this.qb.flags;
1021
+ }
1022
+ set flags(a) {
1023
+ this.qb.flags = a;
1024
+ }
1025
+ get position() {
1026
+ return this.qb.position;
1027
+ }
1028
+ set position(a) {
1029
+ this.qb.position = a;
1030
+ }
1031
+ }, Gb = class {
1032
+ La = {};
1033
+ Ma = {};
1034
+ ib = null;
1035
+ constructor(a, b, c, d) {
1036
+ a ||= this;
1037
+ this.parent = a;
1038
+ this.ab = a.ab;
1039
+ this.id = Cb++;
1040
+ this.name = b;
1041
+ this.mode = c;
1042
+ this.nb = d;
1043
+ this.$a = this.Ua = this.Ta = Date.now();
1044
+ }
1045
+ get read() {
1046
+ return 365 === (this.mode & 365);
1047
+ }
1048
+ set read(a) {
1049
+ a ? this.mode |= 365 : this.mode &= -366;
1050
+ }
1051
+ get write() {
1052
+ return 146 === (this.mode & 146);
1053
+ }
1054
+ set write(a) {
1055
+ a ? this.mode |= 146 : this.mode &= -147;
1056
+ }
1057
+ };
1058
+ function S(a, b = {}) {
1059
+ if (!a) throw new N(44);
1060
+ b.Bb ?? (b.Bb = true);
1061
+ "/" === a.charAt(0) || (a = "//" + a);
1062
+ var c = 0;
1063
+ a: for (; 40 > c; c++) {
1064
+ a = a.split("/").filter((q) => !!q);
1065
+ for (var d = zb, e = "/", g = 0; g < a.length; g++) {
1066
+ var h = g === a.length - 1;
1067
+ if (h && b.parent) break;
1068
+ if ("." !== a[g]) if (".." === a[g]) if (e = Za(e), d === d.parent) {
1069
+ a = e + "/" + a.slice(g + 1).join("/");
1070
+ c--;
1071
+ continue a;
1072
+ } else d = d.parent;
1073
+ else {
1074
+ e = ha(e + "/" + a[g]);
1075
+ try {
1076
+ d = Q(d, a[g]);
1077
+ } catch (q) {
1078
+ if (44 === q?.Pa && h && b.sc) return { path: e };
1079
+ throw q;
1080
+ }
1081
+ !d.ib || h && !b.Bb || (d = d.ib.root);
1082
+ if (40960 === (d.mode & 61440) && (!h || b.hb)) {
1083
+ if (!d.La.eb) throw new N(52);
1084
+ d = d.La.eb(d);
1085
+ "/" === d.charAt(0) || (d = Za(e) + "/" + d);
1086
+ a = d + "/" + a.slice(g + 1).join("/");
1087
+ continue a;
1088
+ }
1089
+ }
1090
+ }
1091
+ return { path: e, node: d };
1092
+ }
1093
+ throw new N(32);
1094
+ }
1095
+ function fa(a) {
1096
+ for (var b; ; ) {
1097
+ if (a === a.parent) return a = a.ab.Sb, b ? "/" !== a[a.length - 1] ? `${a}/${b}` : a + b : a;
1098
+ b = b ? `${a.name}/${b}` : a.name;
1099
+ a = a.parent;
1100
+ }
1101
+ }
1102
+ function Hb(a, b) {
1103
+ for (var c = 0, d = 0; d < b.length; d++) c = (c << 5) - c + b.charCodeAt(d) | 0;
1104
+ return (a + c >>> 0) % R.length;
1105
+ }
1106
+ function xb(a) {
1107
+ var b = Hb(a.parent.id, a.name);
1108
+ if (R[b] === a) R[b] = a.jb;
1109
+ else for (b = R[b]; b; ) {
1110
+ if (b.jb === a) {
1111
+ b.jb = a.jb;
1112
+ break;
1113
+ }
1114
+ b = b.jb;
1115
+ }
1116
+ }
1117
+ function Q(a, b) {
1118
+ var c = P(a.mode) ? (c = Ib(a, "x")) ? c : a.La.mb ? 0 : 2 : 54;
1119
+ if (c) throw new N(c);
1120
+ for (c = R[Hb(a.id, b)]; c; c = c.jb) {
1121
+ var d = c.name;
1122
+ if (c.parent.id === a.id && d === b) return c;
1123
+ }
1124
+ return a.La.mb(a, b);
1125
+ }
1126
+ function wb(a, b, c, d) {
1127
+ a = new Gb(a, b, c, d);
1128
+ b = Hb(a.parent.id, a.name);
1129
+ a.jb = R[b];
1130
+ return R[b] = a;
1131
+ }
1132
+ function P(a) {
1133
+ return 16384 === (a & 61440);
1134
+ }
1135
+ function Ib(a, b) {
1136
+ return Eb ? 0 : b.includes("r") && !(a.mode & 292) || b.includes("w") && !(a.mode & 146) || b.includes("x") && !(a.mode & 73) ? 2 : 0;
1137
+ }
1138
+ function Jb(a, b) {
1139
+ if (!P(a.mode)) return 54;
1140
+ try {
1141
+ return Q(a, b), 20;
1142
+ } catch (c) {
1143
+ }
1144
+ return Ib(a, "wx");
1145
+ }
1146
+ function Kb(a, b, c) {
1147
+ try {
1148
+ var d = Q(a, b);
1149
+ } catch (e) {
1150
+ return e.Pa;
1151
+ }
1152
+ if (a = Ib(a, "wx")) return a;
1153
+ if (c) {
1154
+ if (!P(d.mode)) return 54;
1155
+ if (d === d.parent || "/" === fa(d)) return 10;
1156
+ } else if (P(d.mode)) return 31;
1157
+ return 0;
1158
+ }
1159
+ function Lb(a) {
1160
+ if (!a) throw new N(63);
1161
+ return a;
1162
+ }
1163
+ function T(a) {
1164
+ a = Bb[a];
1165
+ if (!a) throw new N(8);
1166
+ return a;
1167
+ }
1168
+ function Mb(a, b = -1) {
1169
+ a = Object.assign(new Fb(), a);
1170
+ if (-1 == b) a: {
1171
+ for (b = 0; 4096 >= b; b++) if (!Bb[b]) break a;
1172
+ throw new N(33);
1173
+ }
1174
+ a.bb = b;
1175
+ return Bb[b] = a;
1176
+ }
1177
+ function Nb(a, b = -1) {
1178
+ a = Mb(a, b);
1179
+ a.Ma?.Bc?.(a);
1180
+ return a;
1181
+ }
1182
+ function Ob(a, b, c) {
1183
+ var d = a?.Ma.Xa;
1184
+ a = d ? a : b;
1185
+ d ??= b.La.Xa;
1186
+ Lb(d);
1187
+ d(a, c);
1188
+ }
1189
+ var vb = { open(a) {
1190
+ a.Ma = Ab[a.node.nb].Ma;
1191
+ a.Ma.open?.(a);
1192
+ }, Ya() {
1193
+ throw new N(70);
1194
+ } };
1195
+ function rb(a, b) {
1196
+ Ab[a] = { Ma: b };
1197
+ }
1198
+ function Pb(a, b) {
1199
+ var c = "/" === b;
1200
+ if (c && zb) throw new N(10);
1201
+ if (!c && b) {
1202
+ var d = S(b, { Bb: false });
1203
+ b = d.path;
1204
+ d = d.node;
1205
+ if (d.ib) throw new N(10);
1206
+ if (!P(d.mode)) throw new N(54);
1207
+ }
1208
+ b = { type: a, Gc: {}, Sb: b, qc: [] };
1209
+ a = a.ab(b);
1210
+ a.ab = b;
1211
+ b.root = a;
1212
+ c ? zb = a : d && (d.ib = b, d.ab && d.ab.qc.push(b));
1213
+ }
1214
+ function Qb(a, b, c) {
1215
+ var d = S(a, { parent: true }).node;
1216
+ a = $a(a);
1217
+ if (!a) throw new N(28);
1218
+ if ("." === a || ".." === a) throw new N(20);
1219
+ var e = Jb(d, a);
1220
+ if (e) throw new N(e);
1221
+ if (!d.La.rb) throw new N(63);
1222
+ return d.La.rb(d, a, b, c);
1223
+ }
1224
+ function ja(a, b = 438) {
1225
+ return Qb(a, b & 4095 | 32768, 0);
1226
+ }
1227
+ function U(a, b = 511) {
1228
+ return Qb(a, b & 1023 | 16384, 0);
1229
+ }
1230
+ function Rb(a, b, c) {
1231
+ "undefined" == typeof c && (c = b, b = 438);
1232
+ Qb(a, b | 8192, c);
1233
+ }
1234
+ function Sb(a, b) {
1235
+ if (!cb(a)) throw new N(44);
1236
+ var c = S(b, { parent: true }).node;
1237
+ if (!c) throw new N(44);
1238
+ b = $a(b);
1239
+ var d = Jb(c, b);
1240
+ if (d) throw new N(d);
1241
+ if (!c.La.wb) throw new N(63);
1242
+ c.La.wb(c, b, a);
1243
+ }
1244
+ function Tb(a) {
1245
+ var b = S(a, { parent: true }).node;
1246
+ a = $a(a);
1247
+ var c = Q(b, a), d = Kb(b, a, true);
1248
+ if (d) throw new N(d);
1249
+ if (!b.La.vb) throw new N(63);
1250
+ if (c.ib) throw new N(10);
1251
+ b.La.vb(b, a);
1252
+ xb(c);
1253
+ }
1254
+ function ta(a) {
1255
+ var b = S(a, { parent: true }).node;
1256
+ if (!b) throw new N(44);
1257
+ a = $a(a);
1258
+ var c = Q(b, a), d = Kb(b, a, false);
1259
+ if (d) throw new N(d);
1260
+ if (!b.La.xb) throw new N(63);
1261
+ if (c.ib) throw new N(10);
1262
+ b.La.xb(b, a);
1263
+ xb(c);
1264
+ }
1265
+ function Ub(a, b) {
1266
+ a = S(a, { hb: !b }).node;
1267
+ return Lb(a.La.Wa)(a);
1268
+ }
1269
+ function Vb(a, b, c, d) {
1270
+ Ob(a, b, { mode: c & 4095 | b.mode & -4096, Ta: Date.now(), dc: d });
1271
+ }
1272
+ function ka(a, b) {
1273
+ a = "string" == typeof a ? S(a, { hb: true }).node : a;
1274
+ Vb(null, a, b);
1275
+ }
1276
+ function Wb(a, b, c) {
1277
+ if (P(b.mode)) throw new N(31);
1278
+ if (32768 !== (b.mode & 61440)) throw new N(28);
1279
+ var d = Ib(b, "w");
1280
+ if (d) throw new N(d);
1281
+ Ob(a, b, { size: c, timestamp: Date.now() });
1282
+ }
1283
+ function la(a, b, c = 438) {
1284
+ if ("" === a) throw new N(44);
1285
+ if ("string" == typeof b) {
1286
+ var d = { r: 0, "r+": 2, w: 577, "w+": 578, a: 1089, "a+": 1090 }[b];
1287
+ if ("undefined" == typeof d) throw Error(`Unknown file open mode: ${b}`);
1288
+ b = d;
1289
+ }
1290
+ c = b & 64 ? c & 4095 | 32768 : 0;
1291
+ if ("object" == typeof a) d = a;
1292
+ else {
1293
+ var e = a.endsWith("/");
1294
+ var g = S(a, { hb: !(b & 131072), sc: true });
1295
+ d = g.node;
1296
+ a = g.path;
1297
+ }
1298
+ g = false;
1299
+ if (b & 64) if (d) {
1300
+ if (b & 128) throw new N(20);
1301
+ } else {
1302
+ if (e) throw new N(31);
1303
+ d = Qb(a, c | 511, 0);
1304
+ g = true;
1305
+ }
1306
+ if (!d) throw new N(44);
1307
+ 8192 === (d.mode & 61440) && (b &= -513);
1308
+ if (b & 65536 && !P(d.mode)) throw new N(54);
1309
+ if (!g && (d ? 40960 === (d.mode & 61440) ? e = 32 : (e = ["r", "w", "rw"][b & 3], b & 512 && (e += "w"), e = P(d.mode) && ("r" !== e || b & 576) ? 31 : Ib(d, e)) : e = 44, e)) throw new N(e);
1310
+ b & 512 && !g && (e = d, e = "string" == typeof e ? S(e, { hb: true }).node : e, Wb(null, e, 0));
1311
+ b = Mb({ node: d, path: fa(d), flags: b & -131713, seekable: true, position: 0, Ma: d.Ma, uc: [], error: false });
1312
+ b.Ma.open && b.Ma.open(b);
1313
+ g && ka(d, c & 511);
1314
+ return b;
1315
+ }
1316
+ function na(a) {
1317
+ if (null === a.bb) throw new N(8);
1318
+ a.Eb && (a.Eb = null);
1319
+ try {
1320
+ a.Ma.close && a.Ma.close(a);
1321
+ } catch (b) {
1322
+ throw b;
1323
+ } finally {
1324
+ Bb[a.bb] = null;
1325
+ }
1326
+ a.bb = null;
1327
+ }
1328
+ function Xb(a, b, c) {
1329
+ if (null === a.bb) throw new N(8);
1330
+ if (!a.seekable || !a.Ma.Ya) throw new N(70);
1331
+ if (0 != c && 1 != c && 2 != c) throw new N(28);
1332
+ a.position = a.Ma.Ya(a, b, c);
1333
+ a.uc = [];
1334
+ }
1335
+ function Yb(a, b, c, d, e) {
1336
+ if (0 > d || 0 > e) throw new N(28);
1337
+ if (null === a.bb) throw new N(8);
1338
+ if (1 === (a.flags & 2097155)) throw new N(8);
1339
+ if (P(a.node.mode)) throw new N(31);
1340
+ if (!a.Ma.read) throw new N(28);
1341
+ var g = "undefined" != typeof e;
1342
+ if (!g) e = a.position;
1343
+ else if (!a.seekable) throw new N(70);
1344
+ b = a.Ma.read(a, b, c, d, e);
1345
+ g || (a.position += b);
1346
+ return b;
1347
+ }
1348
+ function ma(a, b, c, d, e) {
1349
+ if (0 > d || 0 > e) throw new N(28);
1350
+ if (null === a.bb) throw new N(8);
1351
+ if (0 === (a.flags & 2097155)) throw new N(8);
1352
+ if (P(a.node.mode)) throw new N(31);
1353
+ if (!a.Ma.write) throw new N(28);
1354
+ a.seekable && a.flags & 1024 && Xb(a, 0, 2);
1355
+ var g = "undefined" != typeof e;
1356
+ if (!g) e = a.position;
1357
+ else if (!a.seekable) throw new N(70);
1358
+ b = a.Ma.write(a, b, c, d, e, void 0);
1359
+ g || (a.position += b);
1360
+ return b;
1361
+ }
1362
+ function sa(a) {
1363
+ var b = b || 0;
1364
+ var c = "binary";
1365
+ "utf8" !== c && "binary" !== c && Ja(`Invalid encoding type "${c}"`);
1366
+ b = la(a, b);
1367
+ a = Ub(a).size;
1368
+ var d = new Uint8Array(a);
1369
+ Yb(b, d, 0, a, 0);
1370
+ "utf8" === c && (d = db2(d));
1371
+ na(b);
1372
+ return d;
1373
+ }
1374
+ function W(a, b, c) {
1375
+ a = ha("/dev/" + a);
1376
+ var d = ia(!!b, !!c);
1377
+ W.Rb ?? (W.Rb = 64);
1378
+ var e = W.Rb++ << 8 | 0;
1379
+ rb(e, { open(g) {
1380
+ g.seekable = false;
1381
+ }, close() {
1382
+ c?.buffer?.length && c(10);
1383
+ }, read(g, h, q, w) {
1384
+ for (var t = 0, x = 0; x < w; x++) {
1385
+ try {
1386
+ var D = b();
1387
+ } catch (ib) {
1388
+ throw new N(29);
1389
+ }
1390
+ if (void 0 === D && 0 === t) throw new N(6);
1391
+ if (null === D || void 0 === D) break;
1392
+ t++;
1393
+ h[q + x] = D;
1394
+ }
1395
+ t && (g.node.$a = Date.now());
1396
+ return t;
1397
+ }, write(g, h, q, w) {
1398
+ for (var t = 0; t < w; t++) try {
1399
+ c(h[q + t]);
1400
+ } catch (x) {
1401
+ throw new N(29);
1402
+ }
1403
+ w && (g.node.Ua = g.node.Ta = Date.now());
1404
+ return t;
1405
+ } });
1406
+ Rb(a, d, e);
1407
+ }
1408
+ var X = {};
1409
+ function Y(a, b, c) {
1410
+ if ("/" === b.charAt(0)) return b;
1411
+ a = -100 === a ? "/" : T(a).path;
1412
+ if (0 == b.length) {
1413
+ if (!c) throw new N(44);
1414
+ return a;
1415
+ }
1416
+ return a + "/" + b;
1417
+ }
1418
+ function Zb(a, b) {
1419
+ F[a >> 2] = b.cc;
1420
+ F[a + 4 >> 2] = b.mode;
1421
+ F[a + 8 >> 2] = b.rc;
1422
+ F[a + 12 >> 2] = b.uid;
1423
+ F[a + 16 >> 2] = b.nc;
1424
+ F[a + 20 >> 2] = b.nb;
1425
+ G[a + 24 >> 3] = BigInt(b.size);
1426
+ E[a + 32 >> 2] = 4096;
1427
+ E[a + 36 >> 2] = b.$b;
1428
+ var c = b.$a.getTime(), d = b.Ua.getTime(), e = b.Ta.getTime();
1429
+ G[a + 40 >> 3] = BigInt(Math.floor(c / 1e3));
1430
+ F[a + 48 >> 2] = c % 1e3 * 1e6;
1431
+ G[a + 56 >> 3] = BigInt(Math.floor(d / 1e3));
1432
+ F[a + 64 >> 2] = d % 1e3 * 1e6;
1433
+ G[a + 72 >> 3] = BigInt(Math.floor(e / 1e3));
1434
+ F[a + 80 >> 2] = e % 1e3 * 1e6;
1435
+ G[a + 88 >> 3] = BigInt(b.oc);
1436
+ return 0;
1437
+ }
1438
+ var ic = void 0, Ac = () => {
1439
+ var a = E[+ic >> 2];
1440
+ ic += 4;
1441
+ return a;
1442
+ }, Cc = 0, Dc = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335], Ec = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], Fc = {}, Gc = (a) => {
1443
+ if (!(a instanceof Pa || "unwind" == a)) throw a;
1444
+ }, Hc = (a) => {
1445
+ Da = a;
1446
+ Va || 0 < Cc || (k.onExit?.(a), Ca = true);
1447
+ throw new Pa(a);
1448
+ }, Ic = (a) => {
1449
+ if (!Ca) try {
1450
+ a();
1451
+ } catch (b) {
1452
+ Gc(b);
1453
+ } finally {
1454
+ if (!(Va || 0 < Cc)) try {
1455
+ Da = a = Da, Hc(a);
1456
+ } catch (b) {
1457
+ Gc(b);
1458
+ }
1459
+ }
1460
+ }, Jc = {}, Lc = () => {
1461
+ if (!Kc) {
1462
+ var a = { USER: "web_user", LOGNAME: "web_user", PATH: "/", PWD: "/", HOME: "/home/web_user", LANG: (globalThis.navigator?.language ?? "C").replace("-", "_") + ".UTF-8", _: va || "./this.program" }, b;
1463
+ for (b in Jc) void 0 === Jc[b] ? delete a[b] : a[b] = Jc[b];
1464
+ var c = [];
1465
+ for (b in a) c.push(`${b}=${a[b]}`);
1466
+ Kc = c;
1467
+ }
1468
+ return Kc;
1469
+ }, Kc, Mc = (a, b, c, d) => {
1470
+ var e = { string: (t) => {
1471
+ var x = 0;
1472
+ if (null !== t && void 0 !== t && 0 !== t) {
1473
+ x = gb(t) + 1;
1474
+ var D = y(x);
1475
+ M(t, C, D, x);
1476
+ x = D;
1477
+ }
1478
+ return x;
1479
+ }, array: (t) => {
1480
+ var x = y(t.length);
1481
+ m.set(t, x);
1482
+ return x;
1483
+ } };
1484
+ a = k["_" + a];
1485
+ var g = [], h = 0;
1486
+ if (d) for (var q = 0; q < d.length; q++) {
1487
+ var w = e[c[q]];
1488
+ w ? (0 === h && (h = oa()), g[q] = w(d[q])) : g[q] = d[q];
1489
+ }
1490
+ c = a(...g);
1491
+ return c = (function(t) {
1492
+ 0 !== h && qa(h);
1493
+ return "string" === b ? z(t) : "boolean" === b ? !!t : t;
1494
+ })(c);
1495
+ }, ea = (a) => {
1496
+ var b = gb(a) + 1, c = ca(b);
1497
+ c && M(a, C, c, b);
1498
+ return c;
1499
+ }, Nc, Oc = [], A = (a) => {
1500
+ Nc.delete(Z.get(a));
1501
+ Z.set(a, null);
1502
+ Oc.push(a);
1503
+ }, Pc = (a) => {
1504
+ const b = a.length;
1505
+ return [b % 128 | 128, b >> 7, ...a];
1506
+ }, Qc = { i: 127, p: 127, j: 126, f: 125, d: 124, e: 111 }, Rc = (a) => Pc(Array.from(a, (b) => Qc[b])), ua = (a, b) => {
1507
+ if (!Nc) {
1508
+ Nc = /* @__PURE__ */ new WeakMap();
1509
+ var c = Z.length;
1510
+ if (Nc) for (var d = 0; d < 0 + c; d++) {
1511
+ var e = Z.get(d);
1512
+ e && Nc.set(e, d);
1513
+ }
1514
+ }
1515
+ if (c = Nc.get(a) || 0) return c;
1516
+ c = Oc.length ? Oc.pop() : Z.grow(1);
1517
+ try {
1518
+ Z.set(c, a);
1519
+ } catch (g) {
1520
+ if (!(g instanceof TypeError)) throw g;
1521
+ b = Uint8Array.of(0, 97, 115, 109, 1, 0, 0, 0, 1, ...Pc([1, 96, ...Rc(b.slice(1)), ...Rc("v" === b[0] ? "" : b[0])]), 2, 7, 1, 1, 101, 1, 102, 0, 0, 7, 5, 1, 1, 102, 0, 0);
1522
+ b = new WebAssembly.Module(b);
1523
+ b = new WebAssembly.Instance(b, { e: { f: a } }).exports.f;
1524
+ Z.set(c, b);
1525
+ }
1526
+ Nc.set(a, c);
1527
+ return c;
1528
+ };
1529
+ R = Array(4096);
1530
+ Pb(O, "/");
1531
+ U("/tmp");
1532
+ U("/home");
1533
+ U("/home/web_user");
1534
+ (function() {
1535
+ U("/dev");
1536
+ rb(259, { read: () => 0, write: (d, e, g, h) => h, Ya: () => 0 });
1537
+ Rb("/dev/null", 259);
1538
+ qb(1280, tb);
1539
+ qb(1536, ub);
1540
+ Rb("/dev/tty", 1280);
1541
+ Rb("/dev/tty1", 1536);
1542
+ var a = new Uint8Array(1024), b = 0, c = () => {
1543
+ 0 === b && (bb(a), b = a.byteLength);
1544
+ return a[--b];
1545
+ };
1546
+ W("random", c);
1547
+ W("urandom", c);
1548
+ U("/dev/shm");
1549
+ U("/dev/shm/tmp");
1550
+ })();
1551
+ (function() {
1552
+ U("/proc");
1553
+ var a = U("/proc/self");
1554
+ U("/proc/self/fd");
1555
+ Pb({ ab() {
1556
+ var b = wb(a, "fd", 16895, 73);
1557
+ b.Ma = { Ya: O.Ma.Ya };
1558
+ b.La = { mb(c, d) {
1559
+ c = +d;
1560
+ var e = T(c);
1561
+ c = { parent: null, ab: { Sb: "fake" }, La: { eb: () => e.path }, id: c + 1 };
1562
+ return c.parent = c;
1563
+ }, Ib() {
1564
+ return Array.from(Bb.entries()).filter(([, c]) => c).map(([c]) => c.toString());
1565
+ } };
1566
+ return b;
1567
+ } }, "/proc/self/fd");
1568
+ })();
1569
+ k.noExitRuntime && (Va = k.noExitRuntime);
1570
+ k.print && (Aa = k.print);
1571
+ k.printErr && (B = k.printErr);
1572
+ k.wasmBinary && (Ba = k.wasmBinary);
1573
+ k.thisProgram && (va = k.thisProgram);
1574
+ if (k.preInit) for ("function" == typeof k.preInit && (k.preInit = [k.preInit]); 0 < k.preInit.length; ) k.preInit.shift()();
1575
+ k.stackSave = () => oa();
1576
+ k.stackRestore = (a) => qa(a);
1577
+ k.stackAlloc = (a) => y(a);
1578
+ k.cwrap = (a, b, c, d) => {
1579
+ var e = !c || c.every((g) => "number" === g || "boolean" === g);
1580
+ return "string" !== b && e && !d ? k["_" + a] : (...g) => Mc(a, b, c, g);
1581
+ };
1582
+ k.addFunction = ua;
1583
+ k.removeFunction = A;
1584
+ k.UTF8ToString = z;
1585
+ k.stringToNewUTF8 = ea;
1586
+ k.writeArrayToMemory = (a, b) => {
1587
+ m.set(a, b);
1588
+ };
1589
+ var ca, da, yb, Sc, qa, y, oa, Ia, Z, Tc = {
1590
+ a: (a, b, c, d) => Ja(`Assertion failed: ${z(a)}, at: ` + [b ? z(b) : "unknown filename", c, d ? z(d) : "unknown function"]),
1591
+ i: function(a, b) {
1592
+ try {
1593
+ return a = z(a), ka(a, b), 0;
1594
+ } catch (c) {
1595
+ if ("undefined" == typeof X || "ErrnoError" !== c.name) throw c;
1596
+ return -c.Pa;
1597
+ }
1598
+ },
1599
+ L: function(a, b, c) {
1600
+ try {
1601
+ b = z(b);
1602
+ b = Y(a, b);
1603
+ if (c & -8) return -28;
1604
+ var d = S(b, { hb: true }).node;
1605
+ if (!d) return -44;
1606
+ a = "";
1607
+ c & 4 && (a += "r");
1608
+ c & 2 && (a += "w");
1609
+ c & 1 && (a += "x");
1610
+ return a && Ib(d, a) ? -2 : 0;
1611
+ } catch (e) {
1612
+ if ("undefined" == typeof X || "ErrnoError" !== e.name) throw e;
1613
+ return -e.Pa;
1614
+ }
1615
+ },
1616
+ j: function(a, b) {
1617
+ try {
1618
+ var c = T(a);
1619
+ Vb(c, c.node, b, false);
1620
+ return 0;
1621
+ } catch (d) {
1622
+ if ("undefined" == typeof X || "ErrnoError" !== d.name) throw d;
1623
+ return -d.Pa;
1624
+ }
1625
+ },
1626
+ h: function(a) {
1627
+ try {
1628
+ var b = T(a);
1629
+ Ob(b, b.node, { timestamp: Date.now(), dc: false });
1630
+ return 0;
1631
+ } catch (c) {
1632
+ if ("undefined" == typeof X || "ErrnoError" !== c.name) throw c;
1633
+ return -c.Pa;
1634
+ }
1635
+ },
1636
+ b: function(a, b, c) {
1637
+ ic = c;
1638
+ try {
1639
+ var d = T(a);
1640
+ switch (b) {
1641
+ case 0:
1642
+ var e = Ac();
1643
+ if (0 > e) break;
1644
+ for (; Bb[e]; ) e++;
1645
+ return Nb(d, e).bb;
1646
+ case 1:
1647
+ case 2:
1648
+ return 0;
1649
+ case 3:
1650
+ return d.flags;
1651
+ case 4:
1652
+ return e = Ac(), d.flags |= e, 0;
1653
+ case 12:
1654
+ return e = Ac(), Ea[e + 0 >> 1] = 2, 0;
1655
+ case 13:
1656
+ case 14:
1657
+ return 0;
1658
+ }
1659
+ return -28;
1660
+ } catch (g) {
1661
+ if ("undefined" == typeof X || "ErrnoError" !== g.name) throw g;
1662
+ return -g.Pa;
1663
+ }
1664
+ },
1665
+ g: function(a, b) {
1666
+ try {
1667
+ var c = T(a), d = c.node, e = c.Ma.Wa;
1668
+ a = e ? c : d;
1669
+ e ??= d.La.Wa;
1670
+ Lb(e);
1671
+ var g = e(a);
1672
+ return Zb(b, g);
1673
+ } catch (h) {
1674
+ if ("undefined" == typeof X || "ErrnoError" !== h.name) throw h;
1675
+ return -h.Pa;
1676
+ }
1677
+ },
1678
+ H: function(a, b) {
1679
+ b = -9007199254740992 > b || 9007199254740992 < b ? NaN : Number(b);
1680
+ try {
1681
+ if (isNaN(b)) return -61;
1682
+ var c = T(a);
1683
+ if (0 > b || 0 === (c.flags & 2097155)) throw new N(28);
1684
+ Wb(c, c.node, b);
1685
+ return 0;
1686
+ } catch (d) {
1687
+ if ("undefined" == typeof X || "ErrnoError" !== d.name) throw d;
1688
+ return -d.Pa;
1689
+ }
1690
+ },
1691
+ G: function(a, b) {
1692
+ try {
1693
+ if (0 === b) return -28;
1694
+ var c = gb("/") + 1;
1695
+ if (b < c) return -68;
1696
+ M("/", C, a, b);
1697
+ return c;
1698
+ } catch (d) {
1699
+ if ("undefined" == typeof X || "ErrnoError" !== d.name) throw d;
1700
+ return -d.Pa;
1701
+ }
1702
+ },
1703
+ K: function(a, b) {
1704
+ try {
1705
+ return a = z(a), Zb(b, Ub(a, true));
1706
+ } catch (c) {
1707
+ if ("undefined" == typeof X || "ErrnoError" !== c.name) throw c;
1708
+ return -c.Pa;
1709
+ }
1710
+ },
1711
+ C: function(a, b, c) {
1712
+ try {
1713
+ return b = z(b), b = Y(a, b), U(b, c), 0;
1714
+ } catch (d) {
1715
+ if ("undefined" == typeof X || "ErrnoError" !== d.name) throw d;
1716
+ return -d.Pa;
1717
+ }
1718
+ },
1719
+ J: function(a, b, c, d) {
1720
+ try {
1721
+ b = z(b);
1722
+ var e = d & 256;
1723
+ b = Y(a, b, d & 4096);
1724
+ return Zb(c, e ? Ub(b, true) : Ub(b));
1725
+ } catch (g) {
1726
+ if ("undefined" == typeof X || "ErrnoError" !== g.name) throw g;
1727
+ return -g.Pa;
1728
+ }
1729
+ },
1730
+ x: function(a, b, c, d) {
1731
+ ic = d;
1732
+ try {
1733
+ b = z(b);
1734
+ b = Y(a, b);
1735
+ var e = d ? Ac() : 0;
1736
+ return la(b, c, e).bb;
1737
+ } catch (g) {
1738
+ if ("undefined" == typeof X || "ErrnoError" !== g.name) throw g;
1739
+ return -g.Pa;
1740
+ }
1741
+ },
1742
+ v: function(a, b, c, d) {
1743
+ try {
1744
+ b = z(b);
1745
+ b = Y(a, b);
1746
+ if (0 >= d) return -28;
1747
+ var e = S(b).node;
1748
+ if (!e) throw new N(44);
1749
+ if (!e.La.eb) throw new N(28);
1750
+ var g = e.La.eb(e);
1751
+ var h = Math.min(d, gb(g)), q = m[c + h];
1752
+ M(g, C, c, d + 1);
1753
+ m[c + h] = q;
1754
+ return h;
1755
+ } catch (w) {
1756
+ if ("undefined" == typeof X || "ErrnoError" !== w.name) throw w;
1757
+ return -w.Pa;
1758
+ }
1759
+ },
1760
+ u: function(a) {
1761
+ try {
1762
+ return a = z(a), Tb(a), 0;
1763
+ } catch (b) {
1764
+ if ("undefined" == typeof X || "ErrnoError" !== b.name) throw b;
1765
+ return -b.Pa;
1766
+ }
1767
+ },
1768
+ f: function(a, b) {
1769
+ try {
1770
+ return a = z(a), Zb(b, Ub(a));
1771
+ } catch (c) {
1772
+ if ("undefined" == typeof X || "ErrnoError" !== c.name) throw c;
1773
+ return -c.Pa;
1774
+ }
1775
+ },
1776
+ r: function(a, b, c) {
1777
+ try {
1778
+ b = z(b);
1779
+ b = Y(a, b);
1780
+ if (c) if (512 === c) Tb(b);
1781
+ else return -28;
1782
+ else ta(b);
1783
+ return 0;
1784
+ } catch (d) {
1785
+ if ("undefined" == typeof X || "ErrnoError" !== d.name) throw d;
1786
+ return -d.Pa;
1787
+ }
1788
+ },
1789
+ q: function(a, b, c) {
1790
+ try {
1791
+ b = z(b);
1792
+ b = Y(a, b, true);
1793
+ var d = Date.now(), e, g;
1794
+ if (c) {
1795
+ var h = F[c >> 2] + 4294967296 * E[c + 4 >> 2], q = E[c + 8 >> 2];
1796
+ 1073741823 == q ? e = d : 1073741822 == q ? e = null : e = 1e3 * h + q / 1e6;
1797
+ c += 16;
1798
+ h = F[c >> 2] + 4294967296 * E[c + 4 >> 2];
1799
+ q = E[c + 8 >> 2];
1800
+ 1073741823 == q ? g = d : 1073741822 == q ? g = null : g = 1e3 * h + q / 1e6;
1801
+ } else g = e = d;
1802
+ if (null !== (g ?? e)) {
1803
+ a = e;
1804
+ var w = S(b, { hb: true }).node;
1805
+ Lb(w.La.Xa)(w, { $a: a, Ua: g });
1806
+ }
1807
+ return 0;
1808
+ } catch (t) {
1809
+ if ("undefined" == typeof X || "ErrnoError" !== t.name) throw t;
1810
+ return -t.Pa;
1811
+ }
1812
+ },
1813
+ m: () => Ja(""),
1814
+ l: () => {
1815
+ Va = false;
1816
+ Cc = 0;
1817
+ },
1818
+ A: function(a, b) {
1819
+ a = -9007199254740992 > a || 9007199254740992 < a ? NaN : Number(a);
1820
+ a = new Date(1e3 * a);
1821
+ E[b >> 2] = a.getSeconds();
1822
+ E[b + 4 >> 2] = a.getMinutes();
1823
+ E[b + 8 >> 2] = a.getHours();
1824
+ E[b + 12 >> 2] = a.getDate();
1825
+ E[b + 16 >> 2] = a.getMonth();
1826
+ E[b + 20 >> 2] = a.getFullYear() - 1900;
1827
+ E[b + 24 >> 2] = a.getDay();
1828
+ var c = a.getFullYear();
1829
+ E[b + 28 >> 2] = (0 !== c % 4 || 0 === c % 100 && 0 !== c % 400 ? Ec : Dc)[a.getMonth()] + a.getDate() - 1 | 0;
1830
+ E[b + 36 >> 2] = -(60 * a.getTimezoneOffset());
1831
+ c = new Date(a.getFullYear(), 6, 1).getTimezoneOffset();
1832
+ var d = new Date(a.getFullYear(), 0, 1).getTimezoneOffset();
1833
+ E[b + 32 >> 2] = (c != d && a.getTimezoneOffset() == Math.min(d, c)) | 0;
1834
+ },
1835
+ y: function(a, b, c, d, e, g, h) {
1836
+ e = -9007199254740992 > e || 9007199254740992 < e ? NaN : Number(e);
1837
+ try {
1838
+ var q = T(d);
1839
+ if (0 !== (b & 2) && 0 === (c & 2) && 2 !== (q.flags & 2097155)) throw new N(2);
1840
+ if (1 === (q.flags & 2097155)) throw new N(2);
1841
+ if (!q.Ma.sb) throw new N(43);
1842
+ if (!a) throw new N(28);
1843
+ var w = q.Ma.sb(q, a, e, b, c);
1844
+ var t = w.tc;
1845
+ E[g >> 2] = w.Ub;
1846
+ F[h >> 2] = t;
1847
+ return 0;
1848
+ } catch (x) {
1849
+ if ("undefined" == typeof X || "ErrnoError" !== x.name) throw x;
1850
+ return -x.Pa;
1851
+ }
1852
+ },
1853
+ z: function(a, b, c, d, e, g) {
1854
+ g = -9007199254740992 > g || 9007199254740992 < g ? NaN : Number(g);
1855
+ try {
1856
+ var h = T(e);
1857
+ if (c & 2) {
1858
+ if (32768 !== (h.node.mode & 61440)) throw new N(43);
1859
+ d & 2 || h.Ma.tb && h.Ma.tb(h, C.slice(a, a + b), g, b, d);
1860
+ }
1861
+ } catch (q) {
1862
+ if ("undefined" == typeof X || "ErrnoError" !== q.name) throw q;
1863
+ return -q.Pa;
1864
+ }
1865
+ },
1866
+ n: (a, b) => {
1867
+ Fc[a] && (clearTimeout(Fc[a].id), delete Fc[a]);
1868
+ if (!b) return 0;
1869
+ var c = setTimeout(() => {
1870
+ delete Fc[a];
1871
+ Ic(() => Sc(a, performance.now()));
1872
+ }, b);
1873
+ Fc[a] = { id: c, Hc: b };
1874
+ return 0;
1875
+ },
1876
+ B: (a, b, c, d) => {
1877
+ var e = (/* @__PURE__ */ new Date()).getFullYear(), g = new Date(e, 0, 1).getTimezoneOffset();
1878
+ e = new Date(e, 6, 1).getTimezoneOffset();
1879
+ F[a >> 2] = 60 * Math.max(g, e);
1880
+ E[b >> 2] = Number(g != e);
1881
+ b = (h) => {
1882
+ var q = Math.abs(h);
1883
+ return `UTC${0 <= h ? "-" : "+"}${String(Math.floor(q / 60)).padStart(2, "0")}${String(q % 60).padStart(2, "0")}`;
1884
+ };
1885
+ a = b(g);
1886
+ b = b(e);
1887
+ e < g ? (M(a, C, c, 17), M(b, C, d, 17)) : (M(a, C, d, 17), M(b, C, c, 17));
1888
+ },
1889
+ d: () => Date.now(),
1890
+ s: () => 2147483648,
1891
+ c: () => performance.now(),
1892
+ o: (a) => {
1893
+ var b = C.length;
1894
+ a >>>= 0;
1895
+ if (2147483648 < a) return false;
1896
+ for (var c = 1; 4 >= c; c *= 2) {
1897
+ var d = b * (1 + 0.2 / c);
1898
+ d = Math.min(d, a + 100663296);
1899
+ a: {
1900
+ d = (Math.min(2147483648, 65536 * Math.ceil(Math.max(a, d) / 65536)) - Ia.buffer.byteLength + 65535) / 65536 | 0;
1901
+ try {
1902
+ Ia.grow(d);
1903
+ Ha();
1904
+ var e = 1;
1905
+ break a;
1906
+ } catch (g) {
1907
+ }
1908
+ e = void 0;
1909
+ }
1910
+ if (e) return true;
1911
+ }
1912
+ return false;
1913
+ },
1914
+ E: (a, b) => {
1915
+ var c = 0, d = 0, e;
1916
+ for (e of Lc()) {
1917
+ var g = b + c;
1918
+ F[a + d >> 2] = g;
1919
+ c += M(e, C, g, Infinity) + 1;
1920
+ d += 4;
1921
+ }
1922
+ return 0;
1923
+ },
1924
+ F: (a, b) => {
1925
+ var c = Lc();
1926
+ F[a >> 2] = c.length;
1927
+ a = 0;
1928
+ for (var d of c) a += gb(d) + 1;
1929
+ F[b >> 2] = a;
1930
+ return 0;
1931
+ },
1932
+ e: function(a) {
1933
+ try {
1934
+ var b = T(a);
1935
+ na(b);
1936
+ return 0;
1937
+ } catch (c) {
1938
+ if ("undefined" == typeof X || "ErrnoError" !== c.name) throw c;
1939
+ return c.Pa;
1940
+ }
1941
+ },
1942
+ p: function(a, b) {
1943
+ try {
1944
+ var c = T(a);
1945
+ m[b] = c.Va ? 2 : P(c.mode) ? 3 : 40960 === (c.mode & 61440) ? 7 : 4;
1946
+ Ea[b + 2 >> 1] = 0;
1947
+ G[b + 8 >> 3] = BigInt(0);
1948
+ G[b + 16 >> 3] = BigInt(0);
1949
+ return 0;
1950
+ } catch (d) {
1951
+ if ("undefined" == typeof X || "ErrnoError" !== d.name) throw d;
1952
+ return d.Pa;
1953
+ }
1954
+ },
1955
+ w: function(a, b, c, d) {
1956
+ try {
1957
+ a: {
1958
+ var e = T(a);
1959
+ a = b;
1960
+ for (var g, h = b = 0; h < c; h++) {
1961
+ var q = F[a >> 2], w = F[a + 4 >> 2];
1962
+ a += 8;
1963
+ var t = Yb(e, m, q, w, g);
1964
+ if (0 > t) {
1965
+ var x = -1;
1966
+ break a;
1967
+ }
1968
+ b += t;
1969
+ if (t < w) break;
1970
+ "undefined" != typeof g && (g += t);
1971
+ }
1972
+ x = b;
1973
+ }
1974
+ F[d >> 2] = x;
1975
+ return 0;
1976
+ } catch (D) {
1977
+ if ("undefined" == typeof X || "ErrnoError" !== D.name) throw D;
1978
+ return D.Pa;
1979
+ }
1980
+ },
1981
+ D: function(a, b, c, d) {
1982
+ b = -9007199254740992 > b || 9007199254740992 < b ? NaN : Number(b);
1983
+ try {
1984
+ if (isNaN(b)) return 61;
1985
+ var e = T(a);
1986
+ Xb(e, b, c);
1987
+ G[d >> 3] = BigInt(e.position);
1988
+ e.Eb && 0 === b && 0 === c && (e.Eb = null);
1989
+ return 0;
1990
+ } catch (g) {
1991
+ if ("undefined" == typeof X || "ErrnoError" !== g.name) throw g;
1992
+ return g.Pa;
1993
+ }
1994
+ },
1995
+ I: function(a) {
1996
+ try {
1997
+ var b = T(a);
1998
+ return b.Ma?.lb?.(b);
1999
+ } catch (c) {
2000
+ if ("undefined" == typeof X || "ErrnoError" !== c.name) throw c;
2001
+ return c.Pa;
2002
+ }
2003
+ },
2004
+ t: function(a, b, c, d) {
2005
+ try {
2006
+ a: {
2007
+ var e = T(a);
2008
+ a = b;
2009
+ for (var g, h = b = 0; h < c; h++) {
2010
+ var q = F[a >> 2], w = F[a + 4 >> 2];
2011
+ a += 8;
2012
+ var t = ma(e, m, q, w, g);
2013
+ if (0 > t) {
2014
+ var x = -1;
2015
+ break a;
2016
+ }
2017
+ b += t;
2018
+ if (t < w) break;
2019
+ "undefined" != typeof g && (g += t);
2020
+ }
2021
+ x = b;
2022
+ }
2023
+ F[d >> 2] = x;
2024
+ return 0;
2025
+ } catch (D) {
2026
+ if ("undefined" == typeof X || "ErrnoError" !== D.name) throw D;
2027
+ return D.Pa;
2028
+ }
2029
+ },
2030
+ k: Hc
2031
+ };
2032
+ function Uc() {
2033
+ function a() {
2034
+ k.calledRun = true;
2035
+ if (!Ca) {
2036
+ if (!k.noFSInit && !Db) {
2037
+ var b, c;
2038
+ Db = true;
2039
+ b ??= k.stdin;
2040
+ c ??= k.stdout;
2041
+ d ??= k.stderr;
2042
+ b ? W("stdin", b) : Sb("/dev/tty", "/dev/stdin");
2043
+ c ? W("stdout", null, c) : Sb("/dev/tty", "/dev/stdout");
2044
+ d ? W("stderr", null, d) : Sb("/dev/tty1", "/dev/stderr");
2045
+ la("/dev/stdin", 0);
2046
+ la("/dev/stdout", 1);
2047
+ la("/dev/stderr", 1);
2048
+ }
2049
+ Vc.N();
2050
+ Eb = false;
2051
+ k.onRuntimeInitialized?.();
2052
+ if (k.postRun) for ("function" == typeof k.postRun && (k.postRun = [k.postRun]); k.postRun.length; ) {
2053
+ var d = k.postRun.shift();
2054
+ Ra.push(d);
2055
+ }
2056
+ Qa(Ra);
2057
+ }
2058
+ }
2059
+ if (0 < J) Ua = Uc;
2060
+ else {
2061
+ if (k.preRun) for ("function" == typeof k.preRun && (k.preRun = [k.preRun]); k.preRun.length; ) Ta();
2062
+ Qa(Sa);
2063
+ 0 < J ? Ua = Uc : k.setStatus ? (k.setStatus("Running..."), setTimeout(() => {
2064
+ setTimeout(() => k.setStatus(""), 1);
2065
+ a();
2066
+ }, 1)) : a();
2067
+ }
2068
+ }
2069
+ var Vc;
2070
+ (async function() {
2071
+ function a(c) {
2072
+ c = Vc = c.exports;
2073
+ k._sqlite3_free = c.P;
2074
+ k._sqlite3_value_text = c.Q;
2075
+ k._sqlite3_prepare_v2 = c.R;
2076
+ k._sqlite3_step = c.S;
2077
+ k._sqlite3_reset = c.T;
2078
+ k._sqlite3_exec = c.U;
2079
+ k._sqlite3_finalize = c.V;
2080
+ k._sqlite3_column_name = c.W;
2081
+ k._sqlite3_column_text = c.X;
2082
+ k._sqlite3_column_type = c.Y;
2083
+ k._sqlite3_errmsg = c.Z;
2084
+ k._sqlite3_clear_bindings = c._;
2085
+ k._sqlite3_value_blob = c.$;
2086
+ k._sqlite3_value_bytes = c.aa;
2087
+ k._sqlite3_value_double = c.ba;
2088
+ k._sqlite3_value_int = c.ca;
2089
+ k._sqlite3_value_type = c.da;
2090
+ k._sqlite3_result_blob = c.ea;
2091
+ k._sqlite3_result_double = c.fa;
2092
+ k._sqlite3_result_error = c.ga;
2093
+ k._sqlite3_result_int = c.ha;
2094
+ k._sqlite3_result_int64 = c.ia;
2095
+ k._sqlite3_result_null = c.ja;
2096
+ k._sqlite3_result_text = c.ka;
2097
+ k._sqlite3_aggregate_context = c.la;
2098
+ k._sqlite3_column_count = c.ma;
2099
+ k._sqlite3_data_count = c.na;
2100
+ k._sqlite3_column_blob = c.oa;
2101
+ k._sqlite3_column_bytes = c.pa;
2102
+ k._sqlite3_column_double = c.qa;
2103
+ k._sqlite3_bind_blob = c.ra;
2104
+ k._sqlite3_bind_double = c.sa;
2105
+ k._sqlite3_bind_int = c.ta;
2106
+ k._sqlite3_bind_text = c.ua;
2107
+ k._sqlite3_bind_parameter_index = c.va;
2108
+ k._sqlite3_sql = c.wa;
2109
+ k._sqlite3_normalized_sql = c.xa;
2110
+ k._sqlite3_changes = c.ya;
2111
+ k._sqlite3_close_v2 = c.za;
2112
+ k._sqlite3_create_function_v2 = c.Aa;
2113
+ k._sqlite3_update_hook = c.Ba;
2114
+ k._sqlite3_open = c.Ca;
2115
+ ca = k._malloc = c.Da;
2116
+ da = k._free = c.Ea;
2117
+ k._RegisterExtensionFunctions = c.Fa;
2118
+ yb = c.Ga;
2119
+ Sc = c.Ha;
2120
+ qa = c.Ia;
2121
+ y = c.Ja;
2122
+ oa = c.Ka;
2123
+ Ia = c.M;
2124
+ Z = c.O;
2125
+ Ha();
2126
+ J--;
2127
+ k.monitorRunDependencies?.(J);
2128
+ 0 == J && Ua && (c = Ua, Ua = null, c());
2129
+ return Vc;
2130
+ }
2131
+ J++;
2132
+ k.monitorRunDependencies?.(J);
2133
+ var b = { a: Tc };
2134
+ if (k.instantiateWasm) return new Promise((c) => {
2135
+ k.instantiateWasm(b, (d, e) => {
2136
+ c(a(d, e));
2137
+ });
2138
+ });
2139
+ La ??= k.locateFile ? k.locateFile("sql-wasm-browser.wasm", xa) : xa + "sql-wasm-browser.wasm";
2140
+ return a((await Oa(b)).instance);
2141
+ })();
2142
+ Uc();
2143
+ return Module;
2144
+ });
2145
+ return initSqlJsPromise;
2146
+ };
2147
+ if (typeof exports === "object" && typeof module === "object") {
2148
+ module.exports = initSqlJs2;
2149
+ module.exports.default = initSqlJs2;
2150
+ } else if (typeof define === "function" && define["amd"]) {
2151
+ define([], function() {
2152
+ return initSqlJs2;
2153
+ });
2154
+ } else if (typeof exports === "object") {
2155
+ exports["Module"] = initSqlJs2;
2156
+ }
2157
+ }
2158
+ });
10
2159
 
11
2160
  // packages/mailx-store-web/web-settings.js
12
2161
  var web_settings_exports = {};
@@ -2176,7 +4325,7 @@ var init_main = __esm({
2176
4325
  });
2177
4326
 
2178
4327
  // packages/mailx-store-web/db.js
2179
- import initSqlJs from "sql.js";
4328
+ var import_sql = __toESM(require_sql_wasm_browser(), 1);
2180
4329
 
2181
4330
  // packages/mailx-types/contact-rules.js
2182
4331
  var CONTACT_RULES = {
@@ -2608,7 +4757,7 @@ var WebMailxDB = class {
2608
4757
  this.ready = this.init(dbName);
2609
4758
  }
2610
4759
  async init(_dbName) {
2611
- const SQL = await initSqlJs({
4760
+ const SQL = await (0, import_sql.default)({
2612
4761
  locateFile: (file) => new URL(`../node_modules/sql.js/dist/${file}`, document.baseURI).href
2613
4762
  });
2614
4763
  const existing = await loadDbFromIdb();