glassjar 0.6.1 → 0.8.0

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/glassjar.js CHANGED
@@ -1,228 +1,228 @@
1
- function UA(Q) {
1
+ function pA(Q) {
2
2
  return Q && Q.__esModule && Object.prototype.hasOwnProperty.call(Q, "default") ? Q.default : Q;
3
3
  }
4
- var b = { exports: {} }, BA;
5
- function JA() {
6
- if (BA) return b.exports;
7
- BA = 1;
8
- var Q = typeof Reflect == "object" ? Reflect : null, A = Q && typeof Q.apply == "function" ? Q.apply : function(E, N, F) {
9
- return Function.prototype.apply.call(E, N, F);
10
- }, g;
11
- Q && typeof Q.ownKeys == "function" ? g = Q.ownKeys : Object.getOwnPropertySymbols ? g = function(E) {
12
- return Object.getOwnPropertyNames(E).concat(Object.getOwnPropertySymbols(E));
13
- } : g = function(E) {
14
- return Object.getOwnPropertyNames(E);
4
+ var u = { exports: {} }, NA;
5
+ function OA() {
6
+ if (NA) return u.exports;
7
+ NA = 1;
8
+ var Q = typeof Reflect == "object" ? Reflect : null, A = Q && typeof Q.apply == "function" ? Q.apply : function(i, F, M) {
9
+ return Function.prototype.apply.call(i, F, M);
10
+ }, I;
11
+ Q && typeof Q.ownKeys == "function" ? I = Q.ownKeys : Object.getOwnPropertySymbols ? I = function(i) {
12
+ return Object.getOwnPropertyNames(i).concat(Object.getOwnPropertySymbols(i));
13
+ } : I = function(i) {
14
+ return Object.getOwnPropertyNames(i);
15
15
  };
16
- function I(w) {
17
- console && console.warn && console.warn(w);
16
+ function g(o) {
17
+ console && console.warn && console.warn(o);
18
18
  }
19
- var C = Number.isNaN || function(E) {
20
- return E !== E;
19
+ var C = Number.isNaN || function(i) {
20
+ return i !== i;
21
21
  };
22
22
  function B() {
23
23
  B.init.call(this);
24
24
  }
25
- b.exports = B, b.exports.once = p, B.EventEmitter = B, B.prototype._events = void 0, B.prototype._eventsCount = 0, B.prototype._maxListeners = void 0;
26
- var i = 10;
27
- function D(w) {
28
- if (typeof w != "function")
29
- throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof w);
25
+ u.exports = B, u.exports.once = s, B.EventEmitter = B, B.prototype._events = void 0, B.prototype._eventsCount = 0, B.prototype._maxListeners = void 0;
26
+ var E = 10;
27
+ function D(o) {
28
+ if (typeof o != "function")
29
+ throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof o);
30
30
  }
31
31
  Object.defineProperty(B, "defaultMaxListeners", {
32
32
  enumerable: !0,
33
33
  get: function() {
34
- return i;
34
+ return E;
35
35
  },
36
- set: function(w) {
37
- if (typeof w != "number" || w < 0 || C(w))
38
- throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + w + ".");
39
- i = w;
36
+ set: function(o) {
37
+ if (typeof o != "number" || o < 0 || C(o))
38
+ throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + o + ".");
39
+ E = o;
40
40
  }
41
41
  }), B.init = function() {
42
42
  (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
43
- }, B.prototype.setMaxListeners = function(E) {
44
- if (typeof E != "number" || E < 0 || C(E))
45
- throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + E + ".");
46
- return this._maxListeners = E, this;
43
+ }, B.prototype.setMaxListeners = function(i) {
44
+ if (typeof i != "number" || i < 0 || C(i))
45
+ throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + i + ".");
46
+ return this._maxListeners = i, this;
47
47
  };
48
- function o(w) {
49
- return w._maxListeners === void 0 ? B.defaultMaxListeners : w._maxListeners;
48
+ function w(o) {
49
+ return o._maxListeners === void 0 ? B.defaultMaxListeners : o._maxListeners;
50
50
  }
51
51
  B.prototype.getMaxListeners = function() {
52
- return o(this);
53
- }, B.prototype.emit = function(E) {
54
- for (var N = [], F = 1; F < arguments.length; F++) N.push(arguments[F]);
55
- var G = E === "error", R = this._events;
56
- if (R !== void 0)
57
- G = G && R.error === void 0;
58
- else if (!G)
52
+ return w(this);
53
+ }, B.prototype.emit = function(i) {
54
+ for (var F = [], M = 1; M < arguments.length; M++) F.push(arguments[M]);
55
+ var y = i === "error", S = this._events;
56
+ if (S !== void 0)
57
+ y = y && S.error === void 0;
58
+ else if (!y)
59
59
  return !1;
60
- if (G) {
61
- var M;
62
- if (N.length > 0 && (M = N[0]), M instanceof Error)
63
- throw M;
64
- var a = new Error("Unhandled error." + (M ? " (" + M.message + ")" : ""));
65
- throw a.context = M, a;
60
+ if (y) {
61
+ var Y;
62
+ if (F.length > 0 && (Y = F[0]), Y instanceof Error)
63
+ throw Y;
64
+ var p = new Error("Unhandled error." + (Y ? " (" + Y.message + ")" : ""));
65
+ throw p.context = Y, p;
66
66
  }
67
- var W = R[E];
68
- if (W === void 0)
67
+ var t = S[i];
68
+ if (t === void 0)
69
69
  return !1;
70
- if (typeof W == "function")
71
- A(W, this, N);
70
+ if (typeof t == "function")
71
+ A(t, this, F);
72
72
  else
73
- for (var QA = W.length, YA = H(W, QA), F = 0; F < QA; ++F)
74
- A(YA[F], this, N);
73
+ for (var oA = t.length, qA = R(t, oA), M = 0; M < oA; ++M)
74
+ A(qA[M], this, F);
75
75
  return !0;
76
76
  };
77
- function K(w, E, N, F) {
78
- var G, R, M;
79
- if (D(N), R = w._events, R === void 0 ? (R = w._events = /* @__PURE__ */ Object.create(null), w._eventsCount = 0) : (R.newListener !== void 0 && (w.emit(
77
+ function N(o, i, F, M) {
78
+ var y, S, Y;
79
+ if (D(F), S = o._events, S === void 0 ? (S = o._events = /* @__PURE__ */ Object.create(null), o._eventsCount = 0) : (S.newListener !== void 0 && (o.emit(
80
80
  "newListener",
81
- E,
82
- N.listener ? N.listener : N
83
- ), R = w._events), M = R[E]), M === void 0)
84
- M = R[E] = N, ++w._eventsCount;
85
- else if (typeof M == "function" ? M = R[E] = F ? [N, M] : [M, N] : F ? M.unshift(N) : M.push(N), G = o(w), G > 0 && M.length > G && !M.warned) {
86
- M.warned = !0;
87
- var a = new Error("Possible EventEmitter memory leak detected. " + M.length + " " + String(E) + " listeners added. Use emitter.setMaxListeners() to increase limit");
88
- a.name = "MaxListenersExceededWarning", a.emitter = w, a.type = E, a.count = M.length, I(a);
81
+ i,
82
+ F.listener ? F.listener : F
83
+ ), S = o._events), Y = S[i]), Y === void 0)
84
+ Y = S[i] = F, ++o._eventsCount;
85
+ else if (typeof Y == "function" ? Y = S[i] = M ? [F, Y] : [Y, F] : M ? Y.unshift(F) : Y.push(F), y = w(o), y > 0 && Y.length > y && !Y.warned) {
86
+ Y.warned = !0;
87
+ var p = new Error("Possible EventEmitter memory leak detected. " + Y.length + " " + String(i) + " listeners added. Use emitter.setMaxListeners() to increase limit");
88
+ p.name = "MaxListenersExceededWarning", p.emitter = o, p.type = i, p.count = Y.length, g(p);
89
89
  }
90
- return w;
90
+ return o;
91
91
  }
92
- B.prototype.addListener = function(E, N) {
93
- return K(this, E, N, !1);
94
- }, B.prototype.on = B.prototype.addListener, B.prototype.prependListener = function(E, N) {
95
- return K(this, E, N, !0);
92
+ B.prototype.addListener = function(i, F) {
93
+ return N(this, i, F, !1);
94
+ }, B.prototype.on = B.prototype.addListener, B.prototype.prependListener = function(i, F) {
95
+ return N(this, i, F, !0);
96
96
  };
97
- function U() {
97
+ function k() {
98
98
  if (!this.fired)
99
99
  return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
100
100
  }
101
- function h(w, E, N) {
102
- var F = { fired: !1, wrapFn: void 0, target: w, type: E, listener: N }, G = U.bind(F);
103
- return G.listener = N, F.wrapFn = G, G;
104
- }
105
- B.prototype.once = function(E, N) {
106
- return D(N), this.on(E, h(this, E, N)), this;
107
- }, B.prototype.prependOnceListener = function(E, N) {
108
- return D(N), this.prependListener(E, h(this, E, N)), this;
109
- }, B.prototype.removeListener = function(E, N) {
110
- var F, G, R, M, a;
111
- if (D(N), G = this._events, G === void 0)
101
+ function U(o, i, F) {
102
+ var M = { fired: !1, wrapFn: void 0, target: o, type: i, listener: F }, y = k.bind(M);
103
+ return y.listener = F, M.wrapFn = y, y;
104
+ }
105
+ B.prototype.once = function(i, F) {
106
+ return D(F), this.on(i, U(this, i, F)), this;
107
+ }, B.prototype.prependOnceListener = function(i, F) {
108
+ return D(F), this.prependListener(i, U(this, i, F)), this;
109
+ }, B.prototype.removeListener = function(i, F) {
110
+ var M, y, S, Y, p;
111
+ if (D(F), y = this._events, y === void 0)
112
112
  return this;
113
- if (F = G[E], F === void 0)
113
+ if (M = y[i], M === void 0)
114
114
  return this;
115
- if (F === N || F.listener === N)
116
- --this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete G[E], G.removeListener && this.emit("removeListener", E, F.listener || N));
117
- else if (typeof F != "function") {
118
- for (R = -1, M = F.length - 1; M >= 0; M--)
119
- if (F[M] === N || F[M].listener === N) {
120
- a = F[M].listener, R = M;
115
+ if (M === F || M.listener === F)
116
+ --this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete y[i], y.removeListener && this.emit("removeListener", i, M.listener || F));
117
+ else if (typeof M != "function") {
118
+ for (S = -1, Y = M.length - 1; Y >= 0; Y--)
119
+ if (M[Y] === F || M[Y].listener === F) {
120
+ p = M[Y].listener, S = Y;
121
121
  break;
122
122
  }
123
- if (R < 0)
123
+ if (S < 0)
124
124
  return this;
125
- R === 0 ? F.shift() : d(F, R), F.length === 1 && (G[E] = F[0]), G.removeListener !== void 0 && this.emit("removeListener", E, a || N);
125
+ S === 0 ? M.shift() : H(M, S), M.length === 1 && (y[i] = M[0]), y.removeListener !== void 0 && this.emit("removeListener", i, p || F);
126
126
  }
127
127
  return this;
128
- }, B.prototype.off = B.prototype.removeListener, B.prototype.removeAllListeners = function(E) {
129
- var N, F, G;
130
- if (F = this._events, F === void 0)
128
+ }, B.prototype.off = B.prototype.removeListener, B.prototype.removeAllListeners = function(i) {
129
+ var F, M, y;
130
+ if (M = this._events, M === void 0)
131
131
  return this;
132
- if (F.removeListener === void 0)
133
- return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : F[E] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete F[E]), this;
132
+ if (M.removeListener === void 0)
133
+ return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : M[i] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete M[i]), this;
134
134
  if (arguments.length === 0) {
135
- var R = Object.keys(F), M;
136
- for (G = 0; G < R.length; ++G)
137
- M = R[G], M !== "removeListener" && this.removeAllListeners(M);
135
+ var S = Object.keys(M), Y;
136
+ for (y = 0; y < S.length; ++y)
137
+ Y = S[y], Y !== "removeListener" && this.removeAllListeners(Y);
138
138
  return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
139
139
  }
140
- if (N = F[E], typeof N == "function")
141
- this.removeListener(E, N);
142
- else if (N !== void 0)
143
- for (G = N.length - 1; G >= 0; G--)
144
- this.removeListener(E, N[G]);
140
+ if (F = M[i], typeof F == "function")
141
+ this.removeListener(i, F);
142
+ else if (F !== void 0)
143
+ for (y = F.length - 1; y >= 0; y--)
144
+ this.removeListener(i, F[y]);
145
145
  return this;
146
146
  };
147
- function Y(w, E, N) {
148
- var F = w._events;
149
- if (F === void 0)
147
+ function h(o, i, F) {
148
+ var M = o._events;
149
+ if (M === void 0)
150
150
  return [];
151
- var G = F[E];
152
- return G === void 0 ? [] : typeof G == "function" ? N ? [G.listener || G] : [G] : N ? v(G) : H(G, G.length);
153
- }
154
- B.prototype.listeners = function(E) {
155
- return Y(this, E, !0);
156
- }, B.prototype.rawListeners = function(E) {
157
- return Y(this, E, !1);
158
- }, B.listenerCount = function(w, E) {
159
- return typeof w.listenerCount == "function" ? w.listenerCount(E) : s.call(w, E);
160
- }, B.prototype.listenerCount = s;
161
- function s(w) {
162
- var E = this._events;
163
- if (E !== void 0) {
164
- var N = E[w];
165
- if (typeof N == "function")
151
+ var y = M[i];
152
+ return y === void 0 ? [] : typeof y == "function" ? F ? [y.listener || y] : [y] : F ? j(y) : R(y, y.length);
153
+ }
154
+ B.prototype.listeners = function(i) {
155
+ return h(this, i, !0);
156
+ }, B.prototype.rawListeners = function(i) {
157
+ return h(this, i, !1);
158
+ }, B.listenerCount = function(o, i) {
159
+ return typeof o.listenerCount == "function" ? o.listenerCount(i) : K.call(o, i);
160
+ }, B.prototype.listenerCount = K;
161
+ function K(o) {
162
+ var i = this._events;
163
+ if (i !== void 0) {
164
+ var F = i[o];
165
+ if (typeof F == "function")
166
166
  return 1;
167
- if (N !== void 0)
168
- return N.length;
167
+ if (F !== void 0)
168
+ return F.length;
169
169
  }
170
170
  return 0;
171
171
  }
172
172
  B.prototype.eventNames = function() {
173
- return this._eventsCount > 0 ? g(this._events) : [];
173
+ return this._eventsCount > 0 ? I(this._events) : [];
174
174
  };
175
- function H(w, E) {
176
- for (var N = new Array(E), F = 0; F < E; ++F)
177
- N[F] = w[F];
178
- return N;
179
- }
180
- function d(w, E) {
181
- for (; E + 1 < w.length; E++)
182
- w[E] = w[E + 1];
183
- w.pop();
184
- }
185
- function v(w) {
186
- for (var E = new Array(w.length), N = 0; N < E.length; ++N)
187
- E[N] = w[N].listener || w[N];
188
- return E;
189
- }
190
- function p(w, E) {
191
- return new Promise(function(N, F) {
192
- function G(M) {
193
- w.removeListener(E, R), F(M);
175
+ function R(o, i) {
176
+ for (var F = new Array(i), M = 0; M < i; ++M)
177
+ F[M] = o[M];
178
+ return F;
179
+ }
180
+ function H(o, i) {
181
+ for (; i + 1 < o.length; i++)
182
+ o[i] = o[i + 1];
183
+ o.pop();
184
+ }
185
+ function j(o) {
186
+ for (var i = new Array(o.length), F = 0; F < i.length; ++F)
187
+ i[F] = o[F].listener || o[F];
188
+ return i;
189
+ }
190
+ function s(o, i) {
191
+ return new Promise(function(F, M) {
192
+ function y(Y) {
193
+ o.removeListener(i, S), M(Y);
194
194
  }
195
- function R() {
196
- typeof w.removeListener == "function" && w.removeListener("error", G), N([].slice.call(arguments));
195
+ function S() {
196
+ typeof o.removeListener == "function" && o.removeListener("error", y), F([].slice.call(arguments));
197
197
  }
198
- CA(w, E, R, { once: !0 }), E !== "error" && RA(w, G, { once: !0 });
198
+ V(o, i, S, { once: !0 }), i !== "error" && v(o, y, { once: !0 });
199
199
  });
200
200
  }
201
- function RA(w, E, N) {
202
- typeof w.on == "function" && CA(w, "error", E, N);
201
+ function v(o, i, F) {
202
+ typeof o.on == "function" && V(o, "error", i, F);
203
203
  }
204
- function CA(w, E, N, F) {
205
- if (typeof w.on == "function")
206
- F.once ? w.once(E, N) : w.on(E, N);
207
- else if (typeof w.addEventListener == "function")
208
- w.addEventListener(E, function G(R) {
209
- F.once && w.removeEventListener(E, G), N(R);
204
+ function V(o, i, F, M) {
205
+ if (typeof o.on == "function")
206
+ M.once ? o.once(i, F) : o.on(i, F);
207
+ else if (typeof o.addEventListener == "function")
208
+ o.addEventListener(i, function y(S) {
209
+ M.once && o.removeEventListener(i, y), F(S);
210
210
  });
211
211
  else
212
- throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof w);
212
+ throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof o);
213
213
  }
214
- return b.exports;
214
+ return u.exports;
215
215
  }
216
- var LA = JA();
217
- const GA = /* @__PURE__ */ UA(LA);
218
- class $ {
216
+ var xA = OA();
217
+ const sA = /* @__PURE__ */ pA(xA);
218
+ class BA {
219
219
  __destroy_into_raw() {
220
220
  const A = this.__wbg_ptr;
221
- return this.__wbg_ptr = 0, wA.unregister(this), A;
221
+ return this.__wbg_ptr = 0, MA.unregister(this), A;
222
222
  }
223
223
  free() {
224
224
  const A = this.__destroy_into_raw();
225
- k.__wbg_dapadapter_free(A, 0);
225
+ G.__wbg_dapadapter_free(A, 0);
226
226
  }
227
227
  /**
228
228
  * Attaches a worker to the adapter.
@@ -233,80 +233,80 @@ class $ {
233
233
  * @param {Worker} worker
234
234
  */
235
235
  attach(A) {
236
- k.dapadapter_attach(this.__wbg_ptr, A);
236
+ G.dapadapter_attach(this.__wbg_ptr, A);
237
237
  }
238
238
  /**
239
239
  * Retire the listener without borrowing session state (callbacks can synchronously Stop).
240
240
  */
241
241
  detach() {
242
- k.dapadapter_detach(this.__wbg_ptr);
242
+ G.dapadapter_detach(this.__wbg_ptr);
243
243
  }
244
244
  constructor() {
245
- const A = k.dapadapter_new();
246
- return this.__wbg_ptr = A >>> 0, wA.register(this, this.__wbg_ptr, this), this;
245
+ const A = G.dapadapter_new();
246
+ return this.__wbg_ptr = A >>> 0, MA.register(this, this.__wbg_ptr, this), this;
247
247
  }
248
248
  /**
249
249
  * @param {Function} callback
250
250
  */
251
251
  on(A) {
252
- k.dapadapter_on(this.__wbg_ptr, A);
252
+ G.dapadapter_on(this.__wbg_ptr, A);
253
253
  }
254
254
  resetRun() {
255
- k.dapadapter_resetRun(this.__wbg_ptr);
255
+ G.dapadapter_resetRun(this.__wbg_ptr);
256
256
  }
257
257
  /**
258
258
  * @param {any} msg
259
259
  * @returns {any}
260
260
  */
261
261
  sendMessage(A) {
262
- return k.dapadapter_sendMessage(this.__wbg_ptr, A);
262
+ return G.dapadapter_sendMessage(this.__wbg_ptr, A);
263
263
  }
264
264
  /**
265
265
  * @param {boolean} value
266
266
  */
267
267
  setFilterInternals(A) {
268
- k.dapadapter_setFilterInternals(this.__wbg_ptr, A);
268
+ G.dapadapter_setFilterInternals(this.__wbg_ptr, A);
269
269
  }
270
270
  }
271
- Symbol.dispose && ($.prototype[Symbol.dispose] = $.prototype.free);
272
- class X {
271
+ Symbol.dispose && (BA.prototype[Symbol.dispose] = BA.prototype.free);
272
+ class r {
273
273
  static __wrap(A) {
274
274
  A = A >>> 0;
275
- const g = Object.create(X.prototype);
276
- return g.__wbg_ptr = A, iA.register(g, g.__wbg_ptr, g), g;
275
+ const I = Object.create(r.prototype);
276
+ return I.__wbg_ptr = A, kA.register(I, I.__wbg_ptr, I), I;
277
277
  }
278
278
  __destroy_into_raw() {
279
279
  const A = this.__wbg_ptr;
280
- return this.__wbg_ptr = 0, iA.unregister(this), A;
280
+ return this.__wbg_ptr = 0, kA.unregister(this), A;
281
281
  }
282
282
  free() {
283
283
  const A = this.__destroy_into_raw();
284
- k.__wbg_trap_free(A, 0);
284
+ G.__wbg_trap_free(A, 0);
285
285
  }
286
286
  /**
287
287
  * A marker method to indicate that an object is an instance of the `Trap`
288
288
  * class.
289
289
  */
290
290
  static __wbg_wasmer_trap() {
291
- k.trap___wbg_wasmer_trap();
291
+ G.trap___wbg_wasmer_trap();
292
292
  }
293
293
  }
294
- Symbol.dispose && (X.prototype[Symbol.dispose] = X.prototype.free);
295
- function SA() {
294
+ Symbol.dispose && (r.prototype[Symbol.dispose] = r.prototype.free);
295
+ function jA() {
296
296
  let Q, A;
297
297
  try {
298
- const g = k.cpp_exception_hash();
299
- return Q = g[0], A = g[1], c(g[0], g[1]);
298
+ const I = G.cpp_exception_hash();
299
+ return Q = I[0], A = I[1], q(I[0], I[1]);
300
300
  } finally {
301
- k.__wbindgen_free(Q, A, 1);
301
+ G.__wbindgen_free(Q, A, 1);
302
302
  }
303
303
  }
304
- function EA(Q) {
305
- const A = x(Q, k.__wbindgen_malloc, k.__wbindgen_realloc), g = Z, I = k.prefetch_urls(A, g);
306
- var C = MA(I[0], I[1]).slice();
307
- return k.__wbindgen_free(I[0], I[1] * 4, 4), C;
304
+ function FA(Q) {
305
+ const A = T(Q, G.__wbindgen_malloc, G.__wbindgen_realloc), I = d, g = G.prefetch_urls(A, I);
306
+ var C = zA(g[0], g[1]).slice();
307
+ return G.__wbindgen_free(g[0], g[1] * 4, 4), C;
308
308
  }
309
- function hA() {
309
+ function dA() {
310
310
  return {
311
311
  __proto__: null,
312
312
  "./engine_bg.js": {
@@ -314,33 +314,33 @@ function hA() {
314
314
  __wbg_BigInt_b7bbccdff258c9f2: function(A) {
315
315
  return BigInt(A);
316
316
  },
317
- __wbg_Error_8c4e43fe74559d73: function(A, g) {
318
- return Error(c(A, g));
317
+ __wbg_Error_8c4e43fe74559d73: function(A, I) {
318
+ return Error(q(A, I));
319
319
  },
320
320
  __wbg_Number_04624de7d0e8332d: function(A) {
321
321
  return Number(A);
322
322
  },
323
- __wbg_String_8f0eb39a4a4c2f66: function(A, g) {
324
- const I = String(g), C = x(I, k.__wbindgen_malloc, k.__wbindgen_realloc), B = Z;
325
- S().setInt32(A + 4, B, !0), S().setInt32(A + 0, C, !0);
323
+ __wbg_String_8f0eb39a4a4c2f66: function(A, I) {
324
+ const g = String(I), C = T(g, G.__wbindgen_malloc, G.__wbindgen_realloc), B = d;
325
+ a().setInt32(A + 4, B, !0), a().setInt32(A + 0, C, !0);
326
326
  },
327
- __wbg___wbindgen_bigint_get_as_i64_8fcf4ce7f1ca72a2: function(A, g) {
328
- const I = g, C = typeof I == "bigint" ? I : void 0;
329
- S().setBigInt64(A + 8, V(C) ? BigInt(0) : C, !0), S().setInt32(A + 0, !V(C), !0);
327
+ __wbg___wbindgen_bigint_get_as_i64_8fcf4ce7f1ca72a2: function(A, I) {
328
+ const g = I, C = typeof g == "bigint" ? g : void 0;
329
+ a().setBigInt64(A + 8, x(C) ? BigInt(0) : C, !0), a().setInt32(A + 0, !x(C), !0);
330
330
  },
331
331
  __wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25: function(A) {
332
- const g = A, I = typeof g == "boolean" ? g : void 0;
333
- return V(I) ? 16777215 : I ? 1 : 0;
332
+ const I = A, g = typeof I == "boolean" ? I : void 0;
333
+ return x(g) ? 16777215 : g ? 1 : 0;
334
334
  },
335
- __wbg___wbindgen_debug_string_0bc8482c6e3508ae: function(A, g) {
336
- const I = AA(g), C = x(I, k.__wbindgen_malloc, k.__wbindgen_realloc), B = Z;
337
- S().setInt32(A + 4, B, !0), S().setInt32(A + 0, C, !0);
335
+ __wbg___wbindgen_debug_string_0bc8482c6e3508ae: function(A, I) {
336
+ const g = EA(I), C = T(g, G.__wbindgen_malloc, G.__wbindgen_realloc), B = d;
337
+ a().setInt32(A + 4, B, !0), a().setInt32(A + 0, C, !0);
338
338
  },
339
339
  __wbg___wbindgen_function_table_5ae7216dfcbcc506: function() {
340
- return k.__wbindgen_export;
340
+ return G.__wbindgen_export;
341
341
  },
342
- __wbg___wbindgen_in_47fa6863be6f2f25: function(A, g) {
343
- return A in g;
342
+ __wbg___wbindgen_in_47fa6863be6f2f25: function(A, I) {
343
+ return A in I;
344
344
  },
345
345
  __wbg___wbindgen_is_bigint_31b12575b56f32fc: function(A) {
346
346
  return typeof A == "bigint";
@@ -349,8 +349,8 @@ function hA() {
349
349
  return typeof A == "function";
350
350
  },
351
351
  __wbg___wbindgen_is_object_5ae8e5880f2c1fbd: function(A) {
352
- const g = A;
353
- return typeof g == "object" && g !== null;
352
+ const I = A;
353
+ return typeof I == "object" && I !== null;
354
354
  },
355
355
  __wbg___wbindgen_is_string_cd444516edc5b180: function(A) {
356
356
  return typeof A == "string";
@@ -358,64 +358,64 @@ function hA() {
358
358
  __wbg___wbindgen_is_undefined_9e4d92534c42d778: function(A) {
359
359
  return A === void 0;
360
360
  },
361
- __wbg___wbindgen_jsval_eq_11888390b0186270: function(A, g) {
362
- return A === g;
361
+ __wbg___wbindgen_jsval_eq_11888390b0186270: function(A, I) {
362
+ return A === I;
363
363
  },
364
- __wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811: function(A, g) {
365
- return A == g;
364
+ __wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811: function(A, I) {
365
+ return A == I;
366
366
  },
367
- __wbg___wbindgen_lt_bb59cc3d23526e0d: function(A, g) {
368
- return A < g;
367
+ __wbg___wbindgen_lt_bb59cc3d23526e0d: function(A, I) {
368
+ return A < I;
369
369
  },
370
370
  __wbg___wbindgen_neg_6b4d356dff49dcc6: function(A) {
371
371
  return -A;
372
372
  },
373
- __wbg___wbindgen_number_get_8ff4255516ccad3e: function(A, g) {
374
- const I = g, C = typeof I == "number" ? I : void 0;
375
- S().setFloat64(A + 8, V(C) ? 0 : C, !0), S().setInt32(A + 0, !V(C), !0);
373
+ __wbg___wbindgen_number_get_8ff4255516ccad3e: function(A, I) {
374
+ const g = I, C = typeof g == "number" ? g : void 0;
375
+ a().setFloat64(A + 8, x(C) ? 0 : C, !0), a().setInt32(A + 0, !x(C), !0);
376
376
  },
377
377
  __wbg___wbindgen_rethrow_05525c567f154472: function(A) {
378
378
  throw A;
379
379
  },
380
- __wbg___wbindgen_shr_ef8e07cce709eb54: function(A, g) {
381
- return A >> g;
380
+ __wbg___wbindgen_shr_ef8e07cce709eb54: function(A, I) {
381
+ return A >> I;
382
382
  },
383
- __wbg___wbindgen_string_get_72fb696202c56729: function(A, g) {
384
- const I = g, C = typeof I == "string" ? I : void 0;
385
- var B = V(C) ? 0 : x(C, k.__wbindgen_malloc, k.__wbindgen_realloc), i = Z;
386
- S().setInt32(A + 4, i, !0), S().setInt32(A + 0, B, !0);
383
+ __wbg___wbindgen_string_get_72fb696202c56729: function(A, I) {
384
+ const g = I, C = typeof g == "string" ? g : void 0;
385
+ var B = x(C) ? 0 : T(C, G.__wbindgen_malloc, G.__wbindgen_realloc), E = d;
386
+ a().setInt32(A + 4, E, !0), a().setInt32(A + 0, B, !0);
387
387
  },
388
- __wbg___wbindgen_throw_be289d5034ed271b: function(A, g) {
389
- throw new Error(c(A, g));
388
+ __wbg___wbindgen_throw_be289d5034ed271b: function(A, I) {
389
+ throw new Error(q(A, I));
390
390
  },
391
391
  __wbg__wbg_cb_unref_d9b87ff7982e3b21: function(A) {
392
392
  A._wbg_cb_unref();
393
393
  },
394
394
  __wbg_addEventListener_3acb0aad4483804c: function() {
395
- return y(function(A, g, I, C) {
396
- A.addEventListener(c(g, I), C);
395
+ return J(function(A, I, g, C) {
396
+ A.addEventListener(q(I, g), C);
397
397
  }, arguments);
398
398
  },
399
399
  __wbg_apply_2e22c45cb4f12415: function() {
400
- return y(function(A, g, I) {
401
- return Reflect.apply(A, g, I);
400
+ return J(function(A, I, g) {
401
+ return Reflect.apply(A, I, g);
402
402
  }, arguments);
403
403
  },
404
404
  __wbg_apply_ada2ee1a60ac7b3c: function() {
405
- return y(function(A, g, I) {
406
- return A.apply(g, I);
405
+ return J(function(A, I, g) {
406
+ return A.apply(I, g);
407
407
  }, arguments);
408
408
  },
409
409
  __wbg_arrayBuffer_bb54076166006c39: function() {
410
- return y(function(A) {
410
+ return J(function(A) {
411
411
  return A.arrayBuffer();
412
412
  }, arguments);
413
413
  },
414
- __wbg_bind_1dc37de2b9939128: function(A, g, I, C) {
415
- return A.bind(g, I, C);
414
+ __wbg_bind_1dc37de2b9939128: function(A, I, g, C) {
415
+ return A.bind(I, g, C);
416
416
  },
417
- __wbg_bind_29ba380591735d8c: function(A, g, I) {
418
- return A.bind(g, I);
417
+ __wbg_bind_29ba380591735d8c: function(A, I, g) {
418
+ return A.bind(I, g);
419
419
  },
420
420
  __wbg_buffer_7b5f53e46557d8f1: function(A) {
421
421
  return A.buffer;
@@ -427,18 +427,18 @@ function hA() {
427
427
  return A.byteLength;
428
428
  },
429
429
  __wbg_call_389efe28435a9388: function() {
430
- return y(function(A, g) {
431
- return A.call(g);
430
+ return J(function(A, I) {
431
+ return A.call(I);
432
432
  }, arguments);
433
433
  },
434
434
  __wbg_call_4708e0c13bdc8e95: function() {
435
- return y(function(A, g, I) {
436
- return A.call(g, I);
435
+ return J(function(A, I, g) {
436
+ return A.call(I, g);
437
437
  }, arguments);
438
438
  },
439
439
  __wbg_compareExchange_b578410c358e695e: function() {
440
- return y(function(A, g, I, C) {
441
- return Atomics.compareExchange(A, g >>> 0, I, C);
440
+ return J(function(A, I, g, C) {
441
+ return Atomics.compareExchange(A, I >>> 0, g, C);
442
442
  }, arguments);
443
443
  },
444
444
  __wbg_constructor_ad6c0ed428f55d34: function(A) {
@@ -447,8 +447,8 @@ function hA() {
447
447
  __wbg_crypto_86f2631e91b51511: function(A) {
448
448
  return A.crypto;
449
449
  },
450
- __wbg_customSections_193491b069139fb1: function(A, g, I) {
451
- return WebAssembly.Module.customSections(A, c(g, I));
450
+ __wbg_customSections_193491b069139fb1: function(A, I, g) {
451
+ return WebAssembly.Module.customSections(A, q(I, g));
452
452
  },
453
453
  __wbg_data_5330da50312d0bc1: function(A) {
454
454
  return A.data;
@@ -459,12 +459,12 @@ function hA() {
459
459
  __wbg_entries_58c7934c745daac7: function(A) {
460
460
  return Object.entries(A);
461
461
  },
462
- __wbg_error_7534b8e9a36f1ab4: function(A, g) {
463
- let I, C;
462
+ __wbg_error_7534b8e9a36f1ab4: function(A, I) {
463
+ let g, C;
464
464
  try {
465
- I = A, C = g, console.error(c(A, g));
465
+ g = A, C = I, console.error(q(A, I));
466
466
  } finally {
467
- k.__wbindgen_free(I, C, 1);
467
+ G.__wbindgen_free(g, C, 1);
468
468
  }
469
469
  },
470
470
  __wbg_exports_794a42000dacd046: function(A) {
@@ -473,20 +473,20 @@ function hA() {
473
473
  __wbg_exports_86b4926134c40288: function(A) {
474
474
  return A.exports;
475
475
  },
476
- __wbg_fetch_d1488f40cef1e210: function(A, g, I) {
477
- return A.fetch(c(g, I));
476
+ __wbg_fetch_d1488f40cef1e210: function(A, I, g) {
477
+ return A.fetch(q(I, g));
478
478
  },
479
479
  __wbg_from_bddd64e7d5ff6941: function(A) {
480
480
  return Array.from(A);
481
481
  },
482
482
  __wbg_getPrototypeOf_2653517f1dc884d5: function() {
483
- return y(function(A) {
483
+ return J(function(A) {
484
484
  return Reflect.getPrototypeOf(A);
485
485
  }, arguments);
486
486
  },
487
487
  __wbg_getRandomValues_b3f15fcbfabb0f8b: function() {
488
- return y(function(A, g) {
489
- A.getRandomValues(g);
488
+ return J(function(A, I) {
489
+ A.getRandomValues(I);
490
490
  }, arguments);
491
491
  },
492
492
  __wbg_getTime_1e3cd1391c5c3995: function(A) {
@@ -495,169 +495,169 @@ function hA() {
495
495
  __wbg_getTimezoneOffset_81776d10a4ec18a8: function(A) {
496
496
  return A.getTimezoneOffset();
497
497
  },
498
- __wbg_getUint32_bb6f5a401408e7fa: function(A, g, I) {
499
- return A.getUint32(g >>> 0, I !== 0);
498
+ __wbg_getUint32_bb6f5a401408e7fa: function(A, I, g) {
499
+ return A.getUint32(I >>> 0, g !== 0);
500
500
  },
501
501
  __wbg_get_7efbcc3819719b0f: function() {
502
- return y(function(A, g) {
503
- return A.get(g >>> 0);
502
+ return J(function(A, I) {
503
+ return A.get(I >>> 0);
504
504
  }, arguments);
505
505
  },
506
- __wbg_get_9b94d73e6221f75c: function(A, g) {
507
- return A[g >>> 0];
506
+ __wbg_get_9b94d73e6221f75c: function(A, I) {
507
+ return A[I >>> 0];
508
508
  },
509
509
  __wbg_get_b3ed3ad4be2bc8ac: function() {
510
- return y(function(A, g) {
511
- return Reflect.get(A, g);
510
+ return J(function(A, I) {
511
+ return Reflect.get(A, I);
512
512
  }, arguments);
513
513
  },
514
- __wbg_get_index_253dd2a9e007656d: function(A, g) {
515
- return A[g >>> 0];
514
+ __wbg_get_index_253dd2a9e007656d: function(A, I) {
515
+ return A[I >>> 0];
516
516
  },
517
- __wbg_get_index_9a5bfdd2ca49c65f: function(A, g) {
518
- return A[g >>> 0];
517
+ __wbg_get_index_9a5bfdd2ca49c65f: function(A, I) {
518
+ return A[I >>> 0];
519
519
  },
520
- __wbg_get_with_ref_key_1dc361bd10053bfe: function(A, g) {
521
- return A[g];
520
+ __wbg_get_with_ref_key_1dc361bd10053bfe: function(A, I) {
521
+ return A[I];
522
522
  },
523
523
  __wbg_grow_5d42bf28c2da22cb: function() {
524
- return y(function(A, g) {
525
- return A.grow(g >>> 0);
524
+ return J(function(A, I) {
525
+ return A.grow(I >>> 0);
526
526
  }, arguments);
527
527
  },
528
528
  __wbg_grow_d034989fce14cc8e: function() {
529
- return y(function(A, g) {
530
- return A.grow(g >>> 0);
529
+ return J(function(A, I) {
530
+ return A.grow(I >>> 0);
531
531
  }, arguments);
532
532
  },
533
533
  __wbg_imports_8333d40ab24779ad: function(A) {
534
534
  return WebAssembly.Module.imports(A);
535
535
  },
536
536
  __wbg_instanceof_ArrayBuffer_c367199e2fa2aa04: function(A) {
537
- let g;
537
+ let I;
538
538
  try {
539
- g = A instanceof ArrayBuffer;
539
+ I = A instanceof ArrayBuffer;
540
540
  } catch {
541
- g = !1;
541
+ I = !1;
542
542
  }
543
- return g;
543
+ return I;
544
544
  },
545
545
  __wbg_instanceof_Error_8573fe0b0b480f46: function(A) {
546
- let g;
546
+ let I;
547
547
  try {
548
- g = A instanceof Error;
548
+ I = A instanceof Error;
549
549
  } catch {
550
- g = !1;
550
+ I = !1;
551
551
  }
552
- return g;
552
+ return I;
553
553
  },
554
554
  __wbg_instanceof_Function_2a29eec978bb3b11: function(A) {
555
- let g;
555
+ let I;
556
556
  try {
557
- g = A instanceof Function;
557
+ I = A instanceof Function;
558
558
  } catch {
559
- g = !1;
559
+ I = !1;
560
560
  }
561
- return g;
561
+ return I;
562
562
  },
563
563
  __wbg_instanceof_Global_2db767b6b2347f01: function(A) {
564
- let g;
564
+ let I;
565
565
  try {
566
- g = A instanceof WebAssembly.Global;
566
+ I = A instanceof WebAssembly.Global;
567
567
  } catch {
568
- g = !1;
568
+ I = !1;
569
569
  }
570
- return g;
570
+ return I;
571
571
  },
572
572
  __wbg_instanceof_Map_53af74335dec57f4: function(A) {
573
- let g;
573
+ let I;
574
574
  try {
575
- g = A instanceof Map;
575
+ I = A instanceof Map;
576
576
  } catch {
577
- g = !1;
577
+ I = !1;
578
578
  }
579
- return g;
579
+ return I;
580
580
  },
581
581
  __wbg_instanceof_Memory_dc8c61e3f831ee37: function(A) {
582
- let g;
582
+ let I;
583
583
  try {
584
- g = A instanceof WebAssembly.Memory;
584
+ I = A instanceof WebAssembly.Memory;
585
585
  } catch {
586
- g = !1;
586
+ I = !1;
587
587
  }
588
- return g;
588
+ return I;
589
589
  },
590
590
  __wbg_instanceof_Module_d0d412b14363ba9a: function(A) {
591
- let g;
591
+ let I;
592
592
  try {
593
- g = A instanceof WebAssembly.Module;
593
+ I = A instanceof WebAssembly.Module;
594
594
  } catch {
595
- g = !1;
595
+ I = !1;
596
596
  }
597
- return g;
597
+ return I;
598
598
  },
599
599
  __wbg_instanceof_Object_1c6af87502b733ed: function(A) {
600
- let g;
600
+ let I;
601
601
  try {
602
- g = A instanceof Object;
602
+ I = A instanceof Object;
603
603
  } catch {
604
- g = !1;
604
+ I = !1;
605
605
  }
606
- return g;
606
+ return I;
607
607
  },
608
608
  __wbg_instanceof_RangeError_0b0dd056bc557b89: function(A) {
609
- let g;
609
+ let I;
610
610
  try {
611
- g = A instanceof RangeError;
611
+ I = A instanceof RangeError;
612
612
  } catch {
613
- g = !1;
613
+ I = !1;
614
614
  }
615
- return g;
615
+ return I;
616
616
  },
617
617
  __wbg_instanceof_Response_ee1d54d79ae41977: function(A) {
618
- let g;
618
+ let I;
619
619
  try {
620
- g = A instanceof Response;
620
+ I = A instanceof Response;
621
621
  } catch {
622
- g = !1;
622
+ I = !1;
623
623
  }
624
- return g;
624
+ return I;
625
625
  },
626
626
  __wbg_instanceof_SharedArrayBuffer_91d8a2fa16a2cc26: function(A) {
627
- let g;
627
+ let I;
628
628
  try {
629
- g = A instanceof SharedArrayBuffer;
629
+ I = A instanceof SharedArrayBuffer;
630
630
  } catch {
631
- g = !1;
631
+ I = !1;
632
632
  }
633
- return g;
633
+ return I;
634
634
  },
635
635
  __wbg_instanceof_Table_127f216e592f4159: function(A) {
636
- let g;
636
+ let I;
637
637
  try {
638
- g = A instanceof WebAssembly.Table;
638
+ I = A instanceof WebAssembly.Table;
639
639
  } catch {
640
- g = !1;
640
+ I = !1;
641
641
  }
642
- return g;
642
+ return I;
643
643
  },
644
644
  __wbg_instanceof_Tag_f1d6b24a98b95210: function(A) {
645
- let g;
645
+ let I;
646
646
  try {
647
- g = A instanceof WebAssembly.Tag;
647
+ I = A instanceof WebAssembly.Tag;
648
648
  } catch {
649
- g = !1;
649
+ I = !1;
650
650
  }
651
- return g;
651
+ return I;
652
652
  },
653
653
  __wbg_instanceof_Uint8Array_9b9075935c74707c: function(A) {
654
- let g;
654
+ let I;
655
655
  try {
656
- g = A instanceof Uint8Array;
656
+ I = A instanceof Uint8Array;
657
657
  } catch {
658
- g = !1;
658
+ I = !1;
659
659
  }
660
- return g;
660
+ return I;
661
661
  },
662
662
  __wbg_isArray_d314bb98fcf08331: function(A) {
663
663
  return Array.isArray(A);
@@ -665,8 +665,8 @@ function hA() {
665
665
  __wbg_isSafeInteger_bfbc7332a9768d2a: function(A) {
666
666
  return Number.isSafeInteger(A);
667
667
  },
668
- __wbg_is_f29129f676e5410c: function(A, g) {
669
- return Object.is(A, g);
668
+ __wbg_is_f29129f676e5410c: function(A, I) {
669
+ return Object.is(A, I);
670
670
  },
671
671
  __wbg_iterator_6ff6560ca1568e55: function() {
672
672
  return Symbol.iterator;
@@ -681,8 +681,8 @@ function hA() {
681
681
  return A.length;
682
682
  },
683
683
  __wbg_load_eff64ff5e429a422: function() {
684
- return y(function(A, g) {
685
- return Atomics.load(A, g >>> 0);
684
+ return J(function(A, I) {
685
+ return Atomics.load(A, I >>> 0);
686
686
  }, arguments);
687
687
  },
688
688
  __wbg_message_9ddc4b9a62a7c379: function(A) {
@@ -691,19 +691,14 @@ function hA() {
691
691
  __wbg_msCrypto_d562bbe83e0d4b91: function(A) {
692
692
  return A.msCrypto;
693
693
  },
694
- __wbg_new_0728bd2d4c5d41dd: function() {
695
- return y(function(A) {
696
- return new WebAssembly.Tag(A);
697
- }, arguments);
698
- },
699
694
  __wbg_new_0_73afc35eb544e539: function() {
700
695
  return /* @__PURE__ */ new Date();
701
696
  },
702
697
  __wbg_new_245cd5c49157e602: function(A) {
703
698
  return new Date(A);
704
699
  },
705
- __wbg_new_2ac7fa8be584d280: function(A, g, I) {
706
- return new DataView(A, g >>> 0, I >>> 0);
700
+ __wbg_new_2ac7fa8be584d280: function(A, I, g) {
701
+ return new DataView(A, I >>> 0, g >>> 0);
707
702
  },
708
703
  __wbg_new_361308b2356cecd0: function() {
709
704
  return new Object();
@@ -712,47 +707,42 @@ function hA() {
712
707
  return new Array();
713
708
  },
714
709
  __wbg_new_4a996a46a82782b6: function() {
715
- return y(function(A, g) {
716
- return new WebAssembly.Global(A, g);
710
+ return J(function(A, I) {
711
+ return new WebAssembly.Global(A, I);
717
712
  }, arguments);
718
713
  },
719
714
  __wbg_new_57c27ff3ddf5b62c: function() {
720
- return y(function(A) {
715
+ return J(function(A) {
721
716
  return new WebAssembly.Module(A);
722
717
  }, arguments);
723
718
  },
724
- __wbg_new_67274f72d5abea37: function() {
725
- return y(function(A) {
726
- return new WebAssembly.Table(A);
727
- }, arguments);
728
- },
729
719
  __wbg_new_8a6f238a6ece86ea: function() {
730
720
  return new Error();
731
721
  },
732
722
  __wbg_new_a4e3cab1cdd635ba: function() {
733
- return y(function(A, g) {
734
- return new WebAssembly.Instance(A, g);
723
+ return J(function(A, I) {
724
+ return new WebAssembly.Instance(A, I);
735
725
  }, arguments);
736
726
  },
737
727
  __wbg_new_b061c0550d9f3281: function() {
738
- return y(function(A) {
728
+ return J(function(A) {
739
729
  return new WebAssembly.Memory(A);
740
730
  }, arguments);
741
731
  },
742
- __wbg_new_b5d9e2fb389fef91: function(A, g) {
732
+ __wbg_new_b5d9e2fb389fef91: function(A, I) {
743
733
  try {
744
- var I = { a: A, b: g }, C = (i, D) => {
745
- const o = I.a;
746
- I.a = 0;
734
+ var g = { a: A, b: I }, C = (E, D) => {
735
+ const w = g.a;
736
+ g.a = 0;
747
737
  try {
748
- return qA(o, I.b, i, D);
738
+ return tA(w, g.b, E, D);
749
739
  } finally {
750
- I.a = o;
740
+ g.a = w;
751
741
  }
752
742
  };
753
743
  return new Promise(C);
754
744
  } finally {
755
- I.a = I.b = 0;
745
+ g.a = g.b = 0;
756
746
  }
757
747
  },
758
748
  __wbg_new_ca409f861989e0c5: function(A) {
@@ -764,23 +754,23 @@ function hA() {
764
754
  __wbg_new_dd2b680c8bf6ae29: function(A) {
765
755
  return new Uint8Array(A);
766
756
  },
767
- __wbg_new_from_slice_a3d2629dc1826784: function(A, g) {
768
- return new Uint8Array(m(A, g));
757
+ __wbg_new_from_slice_a3d2629dc1826784: function(A, I) {
758
+ return new Uint8Array(e(A, I));
769
759
  },
770
- __wbg_new_no_args_1c7c842f08d00ebb: function(A, g) {
771
- return new Function(c(A, g));
760
+ __wbg_new_no_args_1c7c842f08d00ebb: function(A, I) {
761
+ return new Function(q(A, I));
772
762
  },
773
- __wbg_new_with_args_7bba34e94b1cfa40: function(A, g, I, C) {
774
- return new Function(c(A, g), c(I, C));
763
+ __wbg_new_with_args_7bba34e94b1cfa40: function(A, I, g, C) {
764
+ return new Function(q(A, I), q(g, C));
775
765
  },
776
- __wbg_new_with_byte_offset_9120ba79e057895b: function(A, g) {
777
- return new Uint8Array(A, g >>> 0);
766
+ __wbg_new_with_byte_offset_9120ba79e057895b: function(A, I) {
767
+ return new Uint8Array(A, I >>> 0);
778
768
  },
779
- __wbg_new_with_byte_offset_and_length_aa261d9c9da49eb1: function(A, g, I) {
780
- return new Uint8Array(A, g >>> 0, I >>> 0);
769
+ __wbg_new_with_byte_offset_and_length_aa261d9c9da49eb1: function(A, I, g) {
770
+ return new Uint8Array(A, I >>> 0, g >>> 0);
781
771
  },
782
- __wbg_new_with_byte_offset_and_length_bc2e7b72cc96d1c1: function(A, g, I) {
783
- return new Int32Array(A, g >>> 0, I >>> 0);
772
+ __wbg_new_with_byte_offset_and_length_bc2e7b72cc96d1c1: function(A, I, g) {
773
+ return new Int32Array(A, I >>> 0, g >>> 0);
784
774
  },
785
775
  __wbg_new_with_length_1763c527b2923202: function(A) {
786
776
  return new Array(A >>> 0);
@@ -789,7 +779,7 @@ function hA() {
789
779
  return new Uint8Array(A >>> 0);
790
780
  },
791
781
  __wbg_next_3482f54c49e8af19: function() {
792
- return y(function(A) {
782
+ return J(function(A) {
793
783
  return A.next();
794
784
  }, arguments);
795
785
  },
@@ -800,8 +790,8 @@ function hA() {
800
790
  return A.node;
801
791
  },
802
792
  __wbg_notify_78a90977fab74963: function() {
803
- return y(function(A, g) {
804
- return Atomics.notify(A, g >>> 0);
793
+ return J(function(A, I) {
794
+ return Atomics.notify(A, I >>> 0);
805
795
  }, arguments);
806
796
  },
807
797
  __wbg_now_a3af9a2f4bbaa4d1: function() {
@@ -814,18 +804,18 @@ function hA() {
814
804
  return A.ok;
815
805
  },
816
806
  __wbg_postMessage_2041f4e90af61318: function() {
817
- return y(function(A, g) {
818
- A.postMessage(g);
807
+ return J(function(A, I) {
808
+ A.postMessage(I);
819
809
  }, arguments);
820
810
  },
821
811
  __wbg_process_3975fd6c72f520aa: function(A) {
822
812
  return A.process;
823
813
  },
824
- __wbg_prototypesetcall_bdcdcc5842e4d77d: function(A, g, I) {
825
- Uint8Array.prototype.set.call(m(A, g), I);
814
+ __wbg_prototypesetcall_bdcdcc5842e4d77d: function(A, I, g) {
815
+ Uint8Array.prototype.set.call(e(A, I), g);
826
816
  },
827
- __wbg_push_8ffdcb2063340ba5: function(A, g) {
828
- return A.push(g);
817
+ __wbg_push_8ffdcb2063340ba5: function(A, I) {
818
+ return A.push(I);
829
819
  },
830
820
  __wbg_queueMicrotask_0aa0a927f78f5d98: function(A) {
831
821
  return A.queueMicrotask;
@@ -834,17 +824,17 @@ function hA() {
834
824
  queueMicrotask(A);
835
825
  },
836
826
  __wbg_randomFillSync_f8c153b79f285817: function() {
837
- return y(function(A, g) {
838
- A.randomFillSync(g);
827
+ return J(function(A, I) {
828
+ A.randomFillSync(I);
839
829
  }, arguments);
840
830
  },
841
831
  __wbg_removeEventListener_e63328781a5b9af9: function() {
842
- return y(function(A, g, I, C) {
843
- A.removeEventListener(c(g, I), C);
832
+ return J(function(A, I, g, C) {
833
+ A.removeEventListener(q(I, g), C);
844
834
  }, arguments);
845
835
  },
846
836
  __wbg_require_b74f47fc2d022fd6: function() {
847
- return y(function() {
837
+ return J(function() {
848
838
  return module.require;
849
839
  }, arguments);
850
840
  },
@@ -852,99 +842,99 @@ function hA() {
852
842
  return Promise.resolve(A);
853
843
  },
854
844
  __wbg_setTimeout_e0aacd5a637418a6: function() {
855
- return y(function(A, g, I) {
856
- return A.setTimeout(g, I);
845
+ return J(function(A, I, g) {
846
+ return A.setTimeout(I, g);
857
847
  }, arguments);
858
848
  },
859
- __wbg_setUint32_d168af7751a8557e: function(A, g, I, C) {
860
- A.setUint32(g >>> 0, I >>> 0, C !== 0);
849
+ __wbg_setUint32_d168af7751a8557e: function(A, I, g, C) {
850
+ A.setUint32(I >>> 0, g >>> 0, C !== 0);
861
851
  },
862
852
  __wbg_set_0af2522656c2a71b: function() {
863
- return y(function(A, g, I) {
864
- A.set(g >>> 0, I);
853
+ return J(function(A, I, g) {
854
+ A.set(I >>> 0, g);
865
855
  }, arguments);
866
856
  },
867
- __wbg_set_1eb0999cf5d27fc8: function(A, g, I) {
868
- return A.set(g, I);
857
+ __wbg_set_1eb0999cf5d27fc8: function(A, I, g) {
858
+ return A.set(I, g);
869
859
  },
870
- __wbg_set_25cf9deff6bf0ea8: function(A, g, I) {
871
- A.set(g, I >>> 0);
860
+ __wbg_set_25cf9deff6bf0ea8: function(A, I, g) {
861
+ A.set(I, g >>> 0);
872
862
  },
873
- __wbg_set_3f1d0b984ed272ed: function(A, g, I) {
874
- A[g] = I;
863
+ __wbg_set_3f1d0b984ed272ed: function(A, I, g) {
864
+ A[I] = g;
875
865
  },
876
866
  __wbg_set_6cb8631f80447a67: function() {
877
- return y(function(A, g, I) {
878
- return Reflect.set(A, g, I);
867
+ return J(function(A, I, g) {
868
+ return Reflect.set(A, I, g);
879
869
  }, arguments);
880
870
  },
881
- __wbg_set_cc56eefd2dd91957: function(A, g, I) {
882
- A.set(m(g, I));
871
+ __wbg_set_cc56eefd2dd91957: function(A, I, g) {
872
+ A.set(e(I, g));
883
873
  },
884
- __wbg_set_f43e577aea94465b: function(A, g, I) {
885
- A[g >>> 0] = I;
874
+ __wbg_set_f43e577aea94465b: function(A, I, g) {
875
+ A[I >>> 0] = g;
886
876
  },
887
- __wbg_set_index_b3244a6c458021e4: function(A, g, I) {
888
- A[g >>> 0] = I;
877
+ __wbg_set_index_b3244a6c458021e4: function(A, I, g) {
878
+ A[I >>> 0] = g;
889
879
  },
890
- __wbg_set_index_f259b54e97f7b177: function(A, g, I) {
891
- A[g >>> 0] = I;
880
+ __wbg_set_index_f259b54e97f7b177: function(A, I, g) {
881
+ A[I >>> 0] = g;
892
882
  },
893
- __wbg_set_onmessage_ea7cc2ba099021cd: function(A, g) {
894
- A.onmessage = g;
883
+ __wbg_set_onmessage_ea7cc2ba099021cd: function(A, I) {
884
+ A.onmessage = I;
895
885
  },
896
- __wbg_set_value_fc06e541de098215: function(A, g) {
897
- A.value = g;
886
+ __wbg_set_value_fc06e541de098215: function(A, I) {
887
+ A.value = I;
898
888
  },
899
- __wbg_slice_8bbd46adb2100583: function(A, g, I) {
900
- return A.slice(g >>> 0, I >>> 0);
889
+ __wbg_slice_8bbd46adb2100583: function(A, I, g) {
890
+ return A.slice(I >>> 0, g >>> 0);
901
891
  },
902
- __wbg_stack_0ed75d68575b0f3c: function(A, g) {
903
- const I = g.stack, C = x(I, k.__wbindgen_malloc, k.__wbindgen_realloc), B = Z;
904
- S().setInt32(A + 4, B, !0), S().setInt32(A + 0, C, !0);
892
+ __wbg_stack_0ed75d68575b0f3c: function(A, I) {
893
+ const g = I.stack, C = T(g, G.__wbindgen_malloc, G.__wbindgen_realloc), B = d;
894
+ a().setInt32(A + 4, B, !0), a().setInt32(A + 0, C, !0);
905
895
  },
906
896
  __wbg_static_accessor_GLOBAL_12837167ad935116: function() {
907
897
  const A = typeof global > "u" ? null : global;
908
- return V(A) ? 0 : t(A);
898
+ return x(A) ? 0 : P(A);
909
899
  },
910
900
  __wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f: function() {
911
901
  const A = typeof globalThis > "u" ? null : globalThis;
912
- return V(A) ? 0 : t(A);
902
+ return x(A) ? 0 : P(A);
913
903
  },
914
904
  __wbg_static_accessor_SELF_a621d3dfbb60d0ce: function() {
915
905
  const A = typeof self > "u" ? null : self;
916
- return V(A) ? 0 : t(A);
906
+ return x(A) ? 0 : P(A);
917
907
  },
918
908
  __wbg_static_accessor_WINDOW_f8727f0cf888e0bd: function() {
919
909
  const A = typeof window > "u" ? null : window;
920
- return V(A) ? 0 : t(A);
910
+ return x(A) ? 0 : P(A);
921
911
  },
922
912
  __wbg_store_d1d951c98d9bed41: function() {
923
- return y(function(A, g, I) {
924
- return Atomics.store(A, g >>> 0, I);
913
+ return J(function(A, I, g) {
914
+ return Atomics.store(A, I >>> 0, g);
925
915
  }, arguments);
926
916
  },
927
- __wbg_subarray_a96e1fef17ed23cb: function(A, g, I) {
928
- return A.subarray(g >>> 0, I >>> 0);
917
+ __wbg_subarray_a96e1fef17ed23cb: function(A, I, g) {
918
+ return A.subarray(I >>> 0, g >>> 0);
929
919
  },
930
- __wbg_then_0d9fe2c7b1857d32: function(A, g, I) {
931
- return A.then(g, I);
920
+ __wbg_then_0d9fe2c7b1857d32: function(A, I, g) {
921
+ return A.then(I, g);
932
922
  },
933
- __wbg_then_b9e7b3b5f1a9e1b5: function(A, g) {
934
- return A.then(g);
923
+ __wbg_then_b9e7b3b5f1a9e1b5: function(A, I) {
924
+ return A.then(I);
935
925
  },
936
- __wbg_toString_56d946daff83867b: function(A, g, I) {
937
- const C = g.toString(I), B = x(C, k.__wbindgen_malloc, k.__wbindgen_realloc), i = Z;
938
- S().setInt32(A + 4, i, !0), S().setInt32(A + 0, B, !0);
926
+ __wbg_toString_56d946daff83867b: function(A, I, g) {
927
+ const C = I.toString(g), B = T(C, G.__wbindgen_malloc, G.__wbindgen_realloc), E = d;
928
+ a().setInt32(A + 4, E, !0), a().setInt32(A + 0, B, !0);
939
929
  },
940
930
  __wbg_toString_964ff7fe6eca8362: function(A) {
941
931
  return A.toString();
942
932
  },
943
933
  __wbg_trap_new: function(A) {
944
- return X.__wrap(A);
934
+ return r.__wrap(A);
945
935
  },
946
936
  __wbg_validate_71c2d02a71bda62f: function() {
947
- return y(function(A) {
937
+ return J(function(A) {
948
938
  return WebAssembly.validate(A);
949
939
  }, arguments);
950
940
  },
@@ -958,30 +948,30 @@ function hA() {
958
948
  return A.versions;
959
949
  },
960
950
  __wbg_wait_be5dae1e53f590f1: function() {
961
- return y(function(A, g, I) {
962
- return Atomics.wait(A, g >>> 0, I);
951
+ return J(function(A, I, g) {
952
+ return Atomics.wait(A, I >>> 0, g);
963
953
  }, arguments);
964
954
  },
965
- __wbg_warn_81ab00e6e16e886d: function(A, g, I) {
966
- console.warn(A, g, I);
955
+ __wbg_warn_81ab00e6e16e886d: function(A, I, g) {
956
+ console.warn(A, I, g);
967
957
  },
968
- __wbindgen_cast_0000000000000001: function(A, g) {
969
- return O(A, g, k.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___, DA);
958
+ __wbindgen_cast_0000000000000001: function(A, I) {
959
+ return lA(A, I, G.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__Fn__web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent____Output_______, WA);
970
960
  },
971
- __wbindgen_cast_0000000000000002: function(A, g) {
972
- return O(A, g, k.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___, DA);
961
+ __wbindgen_cast_0000000000000002: function(A, I) {
962
+ return z(A, I, G.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__Fn__web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent____Output_______, ZA);
973
963
  },
974
- __wbindgen_cast_0000000000000003: function(A, g) {
975
- return O(A, g, k.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___, aA);
964
+ __wbindgen_cast_0000000000000003: function(A, I) {
965
+ return z(A, I, G.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___, GA);
976
966
  },
977
- __wbindgen_cast_0000000000000004: function(A, g) {
978
- return O(A, g, k.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__FnMut__wasm_bindgen_36932265c58943ab___JsValue____Output_______, sA);
967
+ __wbindgen_cast_0000000000000004: function(A, I) {
968
+ return z(A, I, G.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___, GA);
979
969
  },
980
- __wbindgen_cast_0000000000000005: function(A, g) {
981
- return pA(A, g, k.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__Fn__web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent____Output_______, cA);
970
+ __wbindgen_cast_0000000000000005: function(A, I) {
971
+ return z(A, I, G.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___, VA);
982
972
  },
983
- __wbindgen_cast_0000000000000006: function(A, g) {
984
- return O(A, g, k.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__Fn__web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent____Output_______, HA);
973
+ __wbindgen_cast_0000000000000006: function(A, I) {
974
+ return z(A, I, G.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__FnMut__wasm_bindgen_36932265c58943ab___JsValue____Output_______, TA);
985
975
  },
986
976
  __wbindgen_cast_0000000000000007: function(A) {
987
977
  return A;
@@ -989,65 +979,61 @@ function hA() {
989
979
  __wbindgen_cast_0000000000000008: function(A) {
990
980
  return A;
991
981
  },
992
- __wbindgen_cast_0000000000000009: function(A, g) {
993
- return m(A, g);
982
+ __wbindgen_cast_0000000000000009: function(A, I) {
983
+ return e(A, I);
994
984
  },
995
- __wbindgen_cast_000000000000000a: function(A, g) {
996
- return c(A, g);
985
+ __wbindgen_cast_000000000000000a: function(A, I) {
986
+ return q(A, I);
997
987
  },
998
- __wbindgen_cast_000000000000000b: function(A, g) {
999
- return BigInt.asUintN(64, A) | BigInt.asUintN(64, g) << BigInt(64);
988
+ __wbindgen_cast_000000000000000b: function(A, I) {
989
+ return BigInt.asUintN(64, A) | BigInt.asUintN(64, I) << BigInt(64);
1000
990
  },
1001
991
  __wbindgen_cast_000000000000000c: function(A) {
1002
992
  return BigInt.asUintN(64, A);
1003
993
  },
1004
- __wbindgen_cast_000000000000000d: function(A, g) {
1005
- var I = MA(A, g).slice();
1006
- return k.__wbindgen_free(A, g * 4, 4), I;
1007
- },
1008
994
  __wbindgen_init_externref_table: function() {
1009
- const A = k.__wbindgen_externrefs, g = A.grow(4);
1010
- A.set(0, void 0), A.set(g + 0, void 0), A.set(g + 1, null), A.set(g + 2, !0), A.set(g + 3, !1);
995
+ const A = G.__wbindgen_externrefs, I = A.grow(4);
996
+ A.set(0, void 0), A.set(I + 0, void 0), A.set(I + 1, null), A.set(I + 2, !0), A.set(I + 3, !1);
1011
997
  }
1012
998
  }
1013
999
  };
1014
1000
  }
1015
- function sA(Q, A, g) {
1016
- k.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___wasm_bindgen_36932265c58943ab___JsValue_____(Q, A, g);
1001
+ function WA(Q, A, I) {
1002
+ G.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent_____(Q, A, I);
1017
1003
  }
1018
- function cA(Q, A, g) {
1019
- k.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent_____(Q, A, g);
1004
+ function ZA(Q, A, I) {
1005
+ G.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent______1_(Q, A, I);
1020
1006
  }
1021
- function HA(Q, A, g) {
1022
- k.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent______1_(Q, A, g);
1007
+ function TA(Q, A, I) {
1008
+ G.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___wasm_bindgen_36932265c58943ab___JsValue_____(Q, A, I);
1023
1009
  }
1024
- function aA(Q, A, g) {
1025
- const I = k.wasm_bindgen_36932265c58943ab___convert__closures________invoke___js_sys_9eaf8169b8189500___Array__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_36932265c58943ab___JsValue__(Q, A, g);
1026
- if (I[1])
1027
- throw gA(I[0]);
1010
+ function VA(Q, A, I) {
1011
+ const g = G.wasm_bindgen_36932265c58943ab___convert__closures________invoke___js_sys_9eaf8169b8189500___Array__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_36932265c58943ab___JsValue__(Q, A, I);
1012
+ if (g[1])
1013
+ throw DA(g[0]);
1028
1014
  }
1029
- function DA(Q, A, g) {
1030
- const I = k.wasm_bindgen_36932265c58943ab___convert__closures________invoke___js_sys_9eaf8169b8189500___Array__core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue__(Q, A, g);
1031
- if (I[2])
1032
- throw gA(I[1]);
1033
- return gA(I[0]);
1015
+ function GA(Q, A, I) {
1016
+ const g = G.wasm_bindgen_36932265c58943ab___convert__closures________invoke___js_sys_9eaf8169b8189500___Array__core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue__(Q, A, I);
1017
+ if (g[2])
1018
+ throw DA(g[1]);
1019
+ return DA(g[0]);
1034
1020
  }
1035
- function qA(Q, A, g, I) {
1036
- k.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___wasm_bindgen_36932265c58943ab___JsValue__wasm_bindgen_36932265c58943ab___JsValue_____(Q, A, g, I);
1021
+ function tA(Q, A, I, g) {
1022
+ G.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___wasm_bindgen_36932265c58943ab___JsValue__wasm_bindgen_36932265c58943ab___JsValue_____(Q, A, I, g);
1037
1023
  }
1038
- const wA = typeof FinalizationRegistry > "u" ? { register: () => {
1024
+ const MA = typeof FinalizationRegistry > "u" ? { register: () => {
1039
1025
  }, unregister: () => {
1040
- } } : new FinalizationRegistry((Q) => k.__wbg_dapadapter_free(Q >>> 0, 1)), iA = typeof FinalizationRegistry > "u" ? { register: () => {
1026
+ } } : new FinalizationRegistry((Q) => G.__wbg_dapadapter_free(Q >>> 0, 1)), kA = typeof FinalizationRegistry > "u" ? { register: () => {
1041
1027
  }, unregister: () => {
1042
- } } : new FinalizationRegistry((Q) => k.__wbg_trap_free(Q >>> 0, 1));
1043
- function t(Q) {
1044
- const A = k.__externref_table_alloc();
1045
- return k.__wbindgen_externrefs.set(A, Q), A;
1028
+ } } : new FinalizationRegistry((Q) => G.__wbg_trap_free(Q >>> 0, 1));
1029
+ function P(Q) {
1030
+ const A = G.__externref_table_alloc();
1031
+ return G.__wbindgen_externrefs.set(A, Q), A;
1046
1032
  }
1047
- const n = typeof FinalizationRegistry > "u" ? { register: () => {
1033
+ const IA = typeof FinalizationRegistry > "u" ? { register: () => {
1048
1034
  }, unregister: () => {
1049
1035
  } } : new FinalizationRegistry((Q) => Q.dtor(Q.a, Q.b));
1050
- function AA(Q) {
1036
+ function EA(Q) {
1051
1037
  const A = typeof Q;
1052
1038
  if (A == "number" || A == "boolean" || Q == null)
1053
1039
  return `${Q}`;
@@ -1064,148 +1050,148 @@ function AA(Q) {
1064
1050
  if (Array.isArray(Q)) {
1065
1051
  const C = Q.length;
1066
1052
  let B = "[";
1067
- C > 0 && (B += AA(Q[0]));
1068
- for (let i = 1; i < C; i++)
1069
- B += ", " + AA(Q[i]);
1053
+ C > 0 && (B += EA(Q[0]));
1054
+ for (let E = 1; E < C; E++)
1055
+ B += ", " + EA(Q[E]);
1070
1056
  return B += "]", B;
1071
1057
  }
1072
- const g = /\[object ([^\]]+)\]/.exec(toString.call(Q));
1073
- let I;
1074
- if (g && g.length > 1)
1075
- I = g[1];
1058
+ const I = /\[object ([^\]]+)\]/.exec(toString.call(Q));
1059
+ let g;
1060
+ if (I && I.length > 1)
1061
+ g = I[1];
1076
1062
  else
1077
1063
  return toString.call(Q);
1078
- if (I == "Object")
1064
+ if (g == "Object")
1079
1065
  try {
1080
1066
  return "Object(" + JSON.stringify(Q) + ")";
1081
1067
  } catch {
1082
1068
  return "Object";
1083
1069
  }
1084
1070
  return Q instanceof Error ? `${Q.name}: ${Q.message}
1085
- ${Q.stack}` : I;
1071
+ ${Q.stack}` : g;
1086
1072
  }
1087
- function MA(Q, A) {
1073
+ function zA(Q, A) {
1088
1074
  Q = Q >>> 0;
1089
- const g = S(), I = [];
1075
+ const I = a(), g = [];
1090
1076
  for (let C = Q; C < Q + 4 * A; C += 4)
1091
- I.push(k.__wbindgen_externrefs.get(g.getUint32(C, !0)));
1092
- return k.__externref_drop_slice(Q, A), I;
1077
+ g.push(G.__wbindgen_externrefs.get(I.getUint32(C, !0)));
1078
+ return G.__externref_drop_slice(Q, A), g;
1093
1079
  }
1094
- function m(Q, A) {
1095
- return Q = Q >>> 0, z().subarray(Q / 1, Q / 1 + A);
1080
+ function e(Q, A) {
1081
+ return Q = Q >>> 0, b().subarray(Q / 1, Q / 1 + A);
1096
1082
  }
1097
- let T = null;
1098
- function S() {
1099
- return (T === null || T.buffer.detached === !0 || T.buffer.detached === void 0 && T.buffer !== k.memory.buffer) && (T = new DataView(k.memory.buffer)), T;
1083
+ let Z = null;
1084
+ function a() {
1085
+ return (Z === null || Z.buffer.detached === !0 || Z.buffer.detached === void 0 && Z.buffer !== G.memory.buffer) && (Z = new DataView(G.memory.buffer)), Z;
1100
1086
  }
1101
- function c(Q, A) {
1102
- return Q = Q >>> 0, ZA(Q, A);
1087
+ function q(Q, A) {
1088
+ return Q = Q >>> 0, fA(Q, A);
1103
1089
  }
1104
- let j = null;
1105
- function z() {
1106
- return (j === null || j.byteLength === 0) && (j = new Uint8Array(k.memory.buffer)), j;
1090
+ let f = null;
1091
+ function b() {
1092
+ return (f === null || f.byteLength === 0) && (f = new Uint8Array(G.memory.buffer)), f;
1107
1093
  }
1108
- function y(Q, A) {
1094
+ function J(Q, A) {
1109
1095
  try {
1110
1096
  return Q.apply(this, A);
1111
- } catch (g) {
1112
- const I = t(g);
1113
- k.__wbindgen_exn_store(I);
1097
+ } catch (I) {
1098
+ const g = P(I);
1099
+ G.__wbindgen_exn_store(g);
1114
1100
  }
1115
1101
  }
1116
- function V(Q) {
1102
+ function x(Q) {
1117
1103
  return Q == null;
1118
1104
  }
1119
- function pA(Q, A, g, I) {
1120
- const C = { a: Q, b: A, cnt: 1, dtor: g }, B = (...i) => {
1105
+ function lA(Q, A, I, g) {
1106
+ const C = { a: Q, b: A, cnt: 1, dtor: I }, B = (...E) => {
1121
1107
  C.cnt++;
1122
1108
  try {
1123
- return I(C.a, C.b, ...i);
1109
+ return g(C.a, C.b, ...E);
1124
1110
  } finally {
1125
1111
  B._wbg_cb_unref();
1126
1112
  }
1127
1113
  };
1128
1114
  return B._wbg_cb_unref = () => {
1129
- --C.cnt === 0 && (C.dtor(C.a, C.b), C.a = 0, n.unregister(C));
1130
- }, n.register(B, C, C), B;
1115
+ --C.cnt === 0 && (C.dtor(C.a, C.b), C.a = 0, IA.unregister(C));
1116
+ }, IA.register(B, C, C), B;
1131
1117
  }
1132
- function O(Q, A, g, I) {
1133
- const C = { a: Q, b: A, cnt: 1, dtor: g }, B = (...i) => {
1118
+ function z(Q, A, I, g) {
1119
+ const C = { a: Q, b: A, cnt: 1, dtor: I }, B = (...E) => {
1134
1120
  C.cnt++;
1135
1121
  const D = C.a;
1136
1122
  C.a = 0;
1137
1123
  try {
1138
- return I(D, C.b, ...i);
1124
+ return g(D, C.b, ...E);
1139
1125
  } finally {
1140
1126
  C.a = D, B._wbg_cb_unref();
1141
1127
  }
1142
1128
  };
1143
1129
  return B._wbg_cb_unref = () => {
1144
- --C.cnt === 0 && (C.dtor(C.a, C.b), C.a = 0, n.unregister(C));
1145
- }, n.register(B, C, C), B;
1130
+ --C.cnt === 0 && (C.dtor(C.a, C.b), C.a = 0, IA.unregister(C));
1131
+ }, IA.register(B, C, C), B;
1146
1132
  }
1147
- function x(Q, A, g) {
1148
- if (g === void 0) {
1149
- const D = f.encode(Q), o = A(D.length, 1) >>> 0;
1150
- return z().subarray(o, o + D.length).set(D), Z = D.length, o;
1151
- }
1152
- let I = Q.length, C = A(I, 1) >>> 0;
1153
- const B = z();
1154
- let i = 0;
1155
- for (; i < I; i++) {
1156
- const D = Q.charCodeAt(i);
1133
+ function T(Q, A, I) {
1134
+ if (I === void 0) {
1135
+ const D = m.encode(Q), w = A(D.length, 1) >>> 0;
1136
+ return b().subarray(w, w + D.length).set(D), d = D.length, w;
1137
+ }
1138
+ let g = Q.length, C = A(g, 1) >>> 0;
1139
+ const B = b();
1140
+ let E = 0;
1141
+ for (; E < g; E++) {
1142
+ const D = Q.charCodeAt(E);
1157
1143
  if (D > 127) break;
1158
- B[C + i] = D;
1144
+ B[C + E] = D;
1159
1145
  }
1160
- if (i !== I) {
1161
- i !== 0 && (Q = Q.slice(i)), C = g(C, I, I = i + Q.length * 3, 1) >>> 0;
1162
- const D = z().subarray(C + i, C + I), o = f.encodeInto(Q, D);
1163
- i += o.written, C = g(C, I, i, 1) >>> 0;
1146
+ if (E !== g) {
1147
+ E !== 0 && (Q = Q.slice(E)), C = I(C, g, g = E + Q.length * 3, 1) >>> 0;
1148
+ const D = b().subarray(C + E, C + g), w = m.encodeInto(Q, D);
1149
+ E += w.written, C = I(C, g, E, 1) >>> 0;
1164
1150
  }
1165
- return Z = i, C;
1151
+ return d = E, C;
1166
1152
  }
1167
- function gA(Q) {
1168
- const A = k.__wbindgen_externrefs.get(Q);
1169
- return k.__externref_table_dealloc(Q), A;
1153
+ function DA(Q) {
1154
+ const A = G.__wbindgen_externrefs.get(Q);
1155
+ return G.__externref_table_dealloc(Q), A;
1170
1156
  }
1171
- let r = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 });
1172
- r.decode();
1173
- const VA = 2146435072;
1174
- let e = 0;
1175
- function ZA(Q, A) {
1176
- return e += A, e >= VA && (r = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }), r.decode(), e = A), r.decode(z().subarray(Q, Q + A));
1157
+ let $ = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 });
1158
+ $.decode();
1159
+ const PA = 2146435072;
1160
+ let CA = 0;
1161
+ function fA(Q, A) {
1162
+ return CA += A, CA >= PA && ($ = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }), $.decode(), CA = A), $.decode(b().subarray(Q, Q + A));
1177
1163
  }
1178
- const f = new TextEncoder();
1179
- "encodeInto" in f || (f.encodeInto = function(Q, A) {
1180
- const g = f.encode(Q);
1181
- return A.set(g), {
1164
+ const m = new TextEncoder();
1165
+ "encodeInto" in m || (m.encodeInto = function(Q, A) {
1166
+ const I = m.encode(Q);
1167
+ return A.set(I), {
1182
1168
  read: Q.length,
1183
- written: g.length
1169
+ written: I.length
1184
1170
  };
1185
1171
  });
1186
- let Z = 0, k;
1187
- function TA(Q, A) {
1188
- return k = Q.exports, T = null, j = null, k.__wbindgen_start(), k;
1172
+ let d = 0, G;
1173
+ function bA(Q, A) {
1174
+ return G = Q.exports, Z = null, f = null, G.__wbindgen_start(), G;
1189
1175
  }
1190
- async function xA(Q, A) {
1176
+ async function mA(Q, A) {
1191
1177
  if (typeof Response == "function" && Q instanceof Response) {
1192
1178
  if (typeof WebAssembly.instantiateStreaming == "function")
1193
1179
  try {
1194
1180
  return await WebAssembly.instantiateStreaming(Q, A);
1195
1181
  } catch (C) {
1196
- if (Q.ok && g(Q.type) && Q.headers.get("Content-Type") !== "application/wasm")
1182
+ if (Q.ok && I(Q.type) && Q.headers.get("Content-Type") !== "application/wasm")
1197
1183
  console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", C);
1198
1184
  else
1199
1185
  throw C;
1200
1186
  }
1201
- const I = await Q.arrayBuffer();
1202
- return await WebAssembly.instantiate(I, A);
1187
+ const g = await Q.arrayBuffer();
1188
+ return await WebAssembly.instantiate(g, A);
1203
1189
  } else {
1204
- const I = await WebAssembly.instantiate(Q, A);
1205
- return I instanceof WebAssembly.Instance ? { instance: I, module: Q } : I;
1190
+ const g = await WebAssembly.instantiate(Q, A);
1191
+ return g instanceof WebAssembly.Instance ? { instance: g, module: Q } : g;
1206
1192
  }
1207
- function g(I) {
1208
- switch (I) {
1193
+ function I(g) {
1194
+ switch (g) {
1209
1195
  case "basic":
1210
1196
  case "cors":
1211
1197
  case "default":
@@ -1214,21 +1200,21 @@ async function xA(Q, A) {
1214
1200
  return !1;
1215
1201
  }
1216
1202
  }
1217
- async function dA(Q) {
1218
- if (k !== void 0) return k;
1203
+ async function XA(Q) {
1204
+ if (G !== void 0) return G;
1219
1205
  Q !== void 0 && (Object.getPrototypeOf(Q) === Object.prototype ? { module_or_path: Q } = Q : console.warn("using deprecated parameters for the initialization function; pass a single object instead")), Q === void 0 && (Q = new URL("", import.meta.url));
1220
- const A = hA();
1206
+ const A = dA();
1221
1207
  (typeof Q == "string" || typeof Request == "function" && Q instanceof Request || typeof URL == "function" && Q instanceof URL) && (Q = fetch(Q));
1222
- const { instance: g, module: I } = await xA(await Q, A);
1223
- return TA(g);
1208
+ const { instance: I, module: g } = await mA(await Q, A);
1209
+ return bA(I);
1224
1210
  }
1225
- const WA = new URL("https://cdn.jsdelivr.net/npm/glassjar@0.6.1/dist/engine_bg.wasm"), OA = Object.freeze({
1211
+ const rA = new URL("https://cdn.jsdelivr.net/npm/glassjar@0.8.0/dist/engine_bg.wasm"), nA = Object.freeze({
1226
1212
  maxObjectBytes: 128 * 1024 * 1024,
1227
1213
  maxEntries: 256,
1228
1214
  maxMetadataBytes: 8 * 1024 * 1024,
1229
1215
  maxEntryMetadataBytes: 1024 * 1024
1230
1216
  });
1231
- class tA {
1217
+ class vA {
1232
1218
  records = /* @__PURE__ */ new Map();
1233
1219
  staged = /* @__PURE__ */ new Map();
1234
1220
  stagingFailed = !1;
@@ -1238,9 +1224,9 @@ class tA {
1238
1224
  oversized = 0;
1239
1225
  limits;
1240
1226
  constructor(A = {}) {
1241
- this.limits = Object.freeze({ ...OA, ...A });
1242
- for (const g of Object.values(this.limits))
1243
- if (!Number.isSafeInteger(g) || g < 0)
1227
+ this.limits = Object.freeze({ ...nA, ...A });
1228
+ for (const I of Object.values(this.limits))
1229
+ if (!Number.isSafeInteger(I) || I < 0)
1244
1230
  throw new RangeError("C++ cache limits must be nonnegative safe integers");
1245
1231
  }
1246
1232
  beginBatch() {
@@ -1249,23 +1235,23 @@ class tA {
1249
1235
  /** Stage against the same storage budget, before copying any optional object. */
1250
1236
  stage(A) {
1251
1237
  if (this.stagingFailed) return;
1252
- const g = this.recordSize(A);
1253
- if (g === void 0 || this.staged.has(A.source)) {
1238
+ const I = this.recordSize(A);
1239
+ if (I === void 0 || this.staged.has(A.source)) {
1254
1240
  this.failBatch();
1255
1241
  return;
1256
1242
  }
1257
- const I = this.limits;
1258
- for (; this.records.size && (this.records.size + this.staged.size >= I.maxEntries || this.objectBytes + A.object.byteLength > I.maxObjectBytes || this.metadataBytes + g > I.maxMetadataBytes); )
1243
+ const g = this.limits;
1244
+ for (; this.records.size && (this.records.size + this.staged.size >= g.maxEntries || this.objectBytes + A.object.byteLength > g.maxObjectBytes || this.metadataBytes + I > g.maxMetadataBytes); )
1259
1245
  this.remove(this.records.keys().next().value), this.evictions++;
1260
- if (this.records.size + this.staged.size >= I.maxEntries || this.objectBytes + A.object.byteLength > I.maxObjectBytes || this.metadataBytes + g > I.maxMetadataBytes || g > I.maxEntryMetadataBytes) {
1246
+ if (this.records.size + this.staged.size >= g.maxEntries || this.objectBytes + A.object.byteLength > g.maxObjectBytes || this.metadataBytes + I > g.maxMetadataBytes || I > g.maxEntryMetadataBytes) {
1261
1247
  this.oversized++, this.failBatch();
1262
1248
  return;
1263
1249
  }
1264
1250
  this.staged.set(A.source, {
1265
1251
  ...A,
1266
1252
  object: new Uint8Array(A.object),
1267
- metadataBytes: g
1268
- }), this.objectBytes += A.object.byteLength, this.metadataBytes += g;
1253
+ metadataBytes: I
1254
+ }), this.objectBytes += A.object.byteLength, this.metadataBytes += I;
1269
1255
  }
1270
1256
  abandonBatch() {
1271
1257
  this.failBatch();
@@ -1274,7 +1260,7 @@ class tA {
1274
1260
  this.discardBatch(), this.stagingFailed = !0;
1275
1261
  }
1276
1262
  recordSize(A) {
1277
- if (!(typeof A.source != "string" || !A.source.startsWith("/") || A.source.split("/").slice(1).some((g) => !g || g === "." || g === "..") || typeof A.key != "string" || typeof A.object_hash != "string" || !/^[a-f0-9]{64}$/.test(A.key) || !/^[a-f0-9]{64}$/.test(A.object_hash) || A.receipt != null && typeof A.receipt != "string" || !(A.object instanceof Uint8Array)))
1263
+ if (!(typeof A.source != "string" || !A.source.startsWith("/") || A.source.split("/").slice(1).some((I) => !I || I === "." || I === "..") || typeof A.key != "string" || typeof A.object_hash != "string" || !/^[a-f0-9]{64}$/.test(A.key) || !/^[a-f0-9]{64}$/.test(A.object_hash) || A.receipt != null && typeof A.receipt != "string" || !(A.object instanceof Uint8Array)))
1278
1264
  return new TextEncoder().encode(
1279
1265
  JSON.stringify({
1280
1266
  source: A.source,
@@ -1287,19 +1273,19 @@ class tA {
1287
1273
  async validateBatch() {
1288
1274
  if (this.stagingFailed) return !1;
1289
1275
  const A = [...this.staged.values()];
1290
- for (const g of A) {
1291
- if (!jA(g.object)) return !1;
1292
- const I = await crypto.subtle.digest("SHA-256", g.object);
1276
+ for (const I of A) {
1277
+ if (!uA(I.object)) return !1;
1278
+ const g = await crypto.subtle.digest("SHA-256", I.object);
1293
1279
  if (Array.from(
1294
- new Uint8Array(I),
1280
+ new Uint8Array(g),
1295
1281
  (B) => B.toString(16).padStart(2, "0")
1296
- ).join("") !== g.object_hash) return !1;
1282
+ ).join("") !== I.object_hash) return !1;
1297
1283
  }
1298
1284
  return !0;
1299
1285
  }
1300
1286
  commitBatch() {
1301
- for (const [A, g] of this.staged)
1302
- this.remove(A), this.records.set(A, g);
1287
+ for (const [A, I] of this.staged)
1288
+ this.remove(A), this.records.set(A, I);
1303
1289
  this.staged.clear(), this.stagingFailed = !1;
1304
1290
  }
1305
1291
  discardBatch() {
@@ -1308,40 +1294,40 @@ class tA {
1308
1294
  this.staged.clear();
1309
1295
  }
1310
1296
  snapshot() {
1311
- return [...this.records.values()].map(({ source: A, key: g, object_hash: I, object: C, receipt: B }) => ({
1297
+ return [...this.records.values()].map(({ source: A, key: I, object_hash: g, object: C, receipt: B }) => ({
1312
1298
  source: A,
1313
- key: g,
1314
- object_hash: I,
1299
+ key: I,
1300
+ object_hash: g,
1315
1301
  ...B == null ? {} : { receipt: B },
1316
1302
  object: C.slice()
1317
1303
  }));
1318
1304
  }
1319
1305
  /** Worker hits are the only accesses that move an entry to the LRU tail. */
1320
1306
  touch(A) {
1321
- const g = this.records.get(A);
1322
- g && (this.records.delete(A), this.records.set(A, g));
1307
+ const I = this.records.get(A);
1308
+ I && (this.records.delete(A), this.records.set(A, I));
1323
1309
  }
1324
1310
  put(A) {
1325
1311
  if (typeof A.source != "string" || !A.source.startsWith("/") || A.source.split("/").slice(1).some((B) => !B || B === "." || B === "..") || typeof A.key != "string" || typeof A.object_hash != "string" || !/^[a-f0-9]{64}$/.test(A.object_hash) || !/^[a-f0-9]{64}$/.test(A.key) || !(A.object instanceof Uint8Array))
1326
1312
  return;
1327
- const g = this.recordSize(A);
1328
- if (g === void 0) return;
1329
- const I = this.limits;
1330
- if (this.remove(A.source), I.maxEntries === 0 || A.object.byteLength > I.maxObjectBytes || g > I.maxMetadataBytes || g > I.maxEntryMetadataBytes) {
1313
+ const I = this.recordSize(A);
1314
+ if (I === void 0) return;
1315
+ const g = this.limits;
1316
+ if (this.remove(A.source), g.maxEntries === 0 || A.object.byteLength > g.maxObjectBytes || I > g.maxMetadataBytes || I > g.maxEntryMetadataBytes) {
1331
1317
  this.oversized++;
1332
1318
  return;
1333
1319
  }
1334
- for (; this.records.size >= I.maxEntries || this.objectBytes + A.object.byteLength > I.maxObjectBytes || this.metadataBytes + g > I.maxMetadataBytes; )
1320
+ for (; this.records.size >= g.maxEntries || this.objectBytes + A.object.byteLength > g.maxObjectBytes || this.metadataBytes + I > g.maxMetadataBytes; )
1335
1321
  this.remove(this.records.keys().next().value), this.evictions++;
1336
- const C = { ...A, object: new Uint8Array(A.object), metadataBytes: g };
1337
- this.records.set(A.source, C), this.objectBytes += C.object.byteLength, this.metadataBytes += g;
1322
+ const C = { ...A, object: new Uint8Array(A.object), metadataBytes: I };
1323
+ this.records.set(A.source, C), this.objectBytes += C.object.byteLength, this.metadataBytes += I;
1338
1324
  }
1339
1325
  delete(A) {
1340
1326
  this.remove(A);
1341
1327
  }
1342
1328
  remove(A) {
1343
- const g = this.records.get(A);
1344
- g && (this.objectBytes -= g.object.byteLength, this.metadataBytes -= g.metadataBytes, this.records.delete(A));
1329
+ const I = this.records.get(A);
1330
+ I && (this.objectBytes -= I.object.byteLength, this.metadataBytes -= I.metadataBytes, this.records.delete(A));
1345
1331
  }
1346
1332
  clear() {
1347
1333
  this.records.clear(), this.staged.clear(), this.stagingFailed = !1, this.objectBytes = this.metadataBytes = 0;
@@ -1353,11 +1339,11 @@ class tA {
1353
1339
  entries: this.records.size,
1354
1340
  stagingEntries: this.staged.size,
1355
1341
  stagingObjectBytes: [...this.staged.values()].reduce(
1356
- (A, g) => A + g.object.byteLength,
1342
+ (A, I) => A + I.object.byteLength,
1357
1343
  0
1358
1344
  ),
1359
1345
  stagingMetadataBytes: [...this.staged.values()].reduce(
1360
- (A, g) => A + g.metadataBytes,
1346
+ (A, I) => A + I.metadataBytes,
1361
1347
  0
1362
1348
  ),
1363
1349
  evictions: this.evictions,
@@ -1365,12 +1351,12 @@ class tA {
1365
1351
  };
1366
1352
  }
1367
1353
  }
1368
- function jA(Q) {
1354
+ function uA(Q) {
1369
1355
  if (!WebAssembly.validate(Q) || Q.length < 8) return !1;
1370
- let A = 8, g = !1;
1371
- const I = () => {
1356
+ let A = 8, I = !1;
1357
+ const g = () => {
1372
1358
  let C = 0, B = 0;
1373
- for (let i = 0; i < 5 && A < Q.length; i++, B += 7) {
1359
+ for (let E = 0; E < 5 && A < Q.length; E++, B += 7) {
1374
1360
  const D = Q[A++];
1375
1361
  if (C += (D & 127) * 2 ** B, !(D & 128)) return C;
1376
1362
  }
@@ -1378,26 +1364,26 @@ function jA(Q) {
1378
1364
  };
1379
1365
  try {
1380
1366
  for (; A < Q.length; ) {
1381
- const C = Q[A++], B = I(), i = A + B;
1382
- if (i > Q.length || C === 8) return !1;
1367
+ const C = Q[A++], B = g(), E = A + B;
1368
+ if (E > Q.length || C === 8) return !1;
1383
1369
  if (C === 0) {
1384
- const D = I();
1385
- if (A + D > i) return !1;
1386
- const o = new TextDecoder().decode(Q.subarray(A, A + D));
1387
- if (A += D, o === "linking") {
1388
- if (g || I() !== 2) return !1;
1389
- g = !0;
1370
+ const D = g();
1371
+ if (A + D > E) return !1;
1372
+ const w = new TextDecoder().decode(Q.subarray(A, A + D));
1373
+ if (A += D, w === "linking") {
1374
+ if (I || g() !== 2) return !1;
1375
+ I = !0;
1390
1376
  }
1391
1377
  }
1392
- A = i;
1378
+ A = E;
1393
1379
  }
1394
- return g;
1380
+ return I;
1395
1381
  } catch {
1396
1382
  return !1;
1397
1383
  }
1398
1384
  }
1399
- const J = /* @__PURE__ */ Symbol();
1400
- function L(Q) {
1385
+ const L = /* @__PURE__ */ Symbol();
1386
+ function c(Q) {
1401
1387
  return Q instanceof Error ? {
1402
1388
  type: "error",
1403
1389
  error: { type: Q.constructor.name, message: Q.message }
@@ -1406,24 +1392,24 @@ function L(Q) {
1406
1392
  error: { type: typeof Q, message: String(Q) }
1407
1393
  };
1408
1394
  }
1409
- class zA {
1395
+ class eA {
1410
1396
  name;
1411
1397
  data;
1412
- constructor(A, g) {
1413
- this.name = A, this.data = g;
1398
+ constructor(A, I) {
1399
+ this.name = A, this.data = I;
1414
1400
  }
1415
1401
  download() {
1416
- const A = new Uint8Array(this.data), g = new Blob([A]), I = URL.createObjectURL(g), C = document.createElement("a");
1417
- C.href = I, C.download = this.name, document.body.appendChild(C), C.click(), document.body.removeChild(C), URL.revokeObjectURL(I);
1402
+ const A = new Uint8Array(this.data), I = new Blob([A]), g = URL.createObjectURL(I), C = document.createElement("a");
1403
+ C.href = g, C.download = this.name, document.body.appendChild(C), C.click(), document.body.removeChild(C), URL.revokeObjectURL(g);
1418
1404
  }
1419
1405
  }
1420
- class fA extends GA {
1406
+ class _A extends sA {
1421
1407
  /**
1422
1408
  * Access to internal properties of the debugger.
1423
1409
  * These are put under a special symbol so that they cannot be accessed by
1424
1410
  * clients of the library.
1425
1411
  */
1426
- [J];
1412
+ [L];
1427
1413
  dap;
1428
1414
  /**
1429
1415
  * Whether or not debugging is enabled.
@@ -1440,19 +1426,19 @@ class fA extends GA {
1440
1426
  this.dap.setFilterInternals(A);
1441
1427
  }
1442
1428
  constructor() {
1443
- super(), this[J] = {
1429
+ super(), this[L] = {
1444
1430
  attach: this.attach.bind(this),
1445
1431
  detach: this.detach.bind(this),
1446
1432
  beginRun: () => this.dap.resetRun()
1447
- }, this.onMessage = this.onMessage.bind(this), this.dap = new $(), this.dap.on(this.onMessage);
1433
+ }, this.onMessage = this.onMessage.bind(this), this.dap = new BA(), this.dap.on(this.onMessage);
1448
1434
  }
1449
1435
  send(A) {
1450
1436
  return this.dap.sendMessage(A);
1451
1437
  }
1452
1438
  artifactListener = (A) => {
1453
1439
  if (A.data.type !== "artifact") return;
1454
- const g = new zA(A.data.name, new Uint8Array(A.data.data));
1455
- this.emit("artifact", g);
1440
+ const I = new eA(A.data.name, new Uint8Array(A.data.data));
1441
+ this.emit("artifact", I);
1456
1442
  };
1457
1443
  attach(A) {
1458
1444
  A.addEventListener("message", this.artifactListener), this.dap.attach(A);
@@ -1464,27 +1450,27 @@ class fA extends GA {
1464
1450
  this.emit("event", A);
1465
1451
  }
1466
1452
  }
1467
- const lA = "glassjar-wasm:";
1468
- function XA(Q, A) {
1469
- const g = new URL(String(Q), A);
1470
- if (g.protocol !== "https:" && g.protocol !== "http:")
1471
- throw new TypeError(`Engine Wasm must be served over http(s), not ${g.protocol}`);
1472
- return g.href;
1453
+ const $A = "glassjar-wasm:";
1454
+ function AI(Q, A) {
1455
+ const I = new URL(String(Q), A);
1456
+ if (I.protocol !== "https:" && I.protocol !== "http:")
1457
+ throw new TypeError(`Engine Wasm must be served over http(s), not ${I.protocol}`);
1458
+ return I.href;
1473
1459
  }
1474
- function bA(Q) {
1460
+ function II(Q) {
1475
1461
  return new Worker(
1476
- "" + new URL("assets/worker-DqvbGm6m.js", import.meta.url).href,
1462
+ "" + new URL("assets/worker-DKKpKTP_.js", import.meta.url).href,
1477
1463
  {
1478
1464
  type: "module",
1479
1465
  name: Q?.name
1480
1466
  }
1481
1467
  );
1482
1468
  }
1483
- function mA(Q) {
1484
- return new bA(Q ? { name: lA + Q } : void 0);
1469
+ function gI(Q) {
1470
+ return new II(Q ? { name: $A + Q } : void 0);
1485
1471
  }
1486
- const nA = "/dev/debugger-sh-host";
1487
- class NA {
1472
+ const RI = "/dev/debugger-sh-host";
1473
+ class KA {
1488
1474
  buffer = new SharedArrayBuffer(4 + 64 * 1024);
1489
1475
  length = new Int32Array(this.buffer, 0, 1);
1490
1476
  bytes = new Uint8Array(this.buffer, 4);
@@ -1492,7 +1478,7 @@ class NA {
1492
1478
  Atomics.store(this.length, 0, A), Atomics.notify(this.length, 0);
1493
1479
  }
1494
1480
  }
1495
- function IA(Q) {
1481
+ function wA(Q) {
1496
1482
  try {
1497
1483
  return new Error(
1498
1484
  `Host device callback failed: ${Q instanceof Error ? Q.message : String(Q)}`
@@ -1501,22 +1487,22 @@ function IA(Q) {
1501
1487
  return new Error("Host device callback failed");
1502
1488
  }
1503
1489
  }
1504
- function oA(Q) {
1490
+ function yA(Q) {
1505
1491
  try {
1506
1492
  const A = Q?.();
1507
1493
  if (A && typeof A.then == "function")
1508
1494
  return Promise.resolve(A).catch(() => {
1509
1495
  }), new TypeError("Host device cleanup must be synchronous");
1510
1496
  } catch (A) {
1511
- return IA(A);
1497
+ return wA(A);
1512
1498
  }
1513
1499
  }
1514
- class PA {
1500
+ class CI {
1515
1501
  constructor(A) {
1516
1502
  this.onFailure = A;
1517
1503
  }
1518
- incoming = new NA();
1519
- outgoing = new NA();
1504
+ incoming = new KA();
1505
+ outgoing = new KA();
1520
1506
  workerStart = {
1521
1507
  guest_to_host: this.incoming.buffer,
1522
1508
  host_to_guest: this.outgoing.buffer
@@ -1527,30 +1513,30 @@ class PA {
1527
1513
  worker;
1528
1514
  writing = !1;
1529
1515
  open(A) {
1530
- let g;
1516
+ let I;
1531
1517
  try {
1532
- g = A({
1518
+ I = A({
1533
1519
  signal: this.abort.signal,
1534
- onData: (I) => {
1535
- if (this.assertOpen(), typeof I != "function")
1520
+ onData: (g) => {
1521
+ if (this.assertOpen(), typeof g != "function")
1536
1522
  throw new TypeError("Host device listener must be a function");
1537
- return this.listeners.add(I), () => {
1538
- this.listeners.delete(I);
1523
+ return this.listeners.add(g), () => {
1524
+ this.listeners.delete(g);
1539
1525
  };
1540
1526
  },
1541
- write: (I) => this.write(I)
1527
+ write: (g) => this.write(g)
1542
1528
  });
1543
- } catch (I) {
1544
- throw IA(I);
1529
+ } catch (g) {
1530
+ throw wA(g);
1545
1531
  }
1546
- if (g !== void 0 && typeof g != "function")
1547
- throw Promise.resolve(g).catch(() => {
1532
+ if (I !== void 0 && typeof I != "function")
1533
+ throw Promise.resolve(I).catch(() => {
1548
1534
  }), new TypeError("Host device opener must return a cleanup function or undefined");
1549
- if (typeof g == "function")
1535
+ if (typeof I == "function")
1550
1536
  if (this.abort.signal.aborted) {
1551
- const I = oA(g);
1552
- if (I) throw I;
1553
- } else this.cleanup = g;
1537
+ const g = yA(I);
1538
+ if (g) throw g;
1539
+ } else this.cleanup = I;
1554
1540
  }
1555
1541
  attach(A) {
1556
1542
  this.assertOpen(), this.worker = A, A.addEventListener("message", this.onMessage);
@@ -1564,17 +1550,17 @@ class PA {
1564
1550
  if (this.writing) throw new Error("Await the previous host device write before writing again");
1565
1551
  this.writing = !0;
1566
1552
  try {
1567
- const g = new Uint8Array(A), I = this.outgoing;
1553
+ const I = new Uint8Array(A), g = this.outgoing;
1568
1554
  let C = 0;
1569
- for (; C < g.length; ) {
1555
+ for (; C < I.length; ) {
1570
1556
  this.assertOpen();
1571
- const B = Atomics.load(I.length, 0);
1557
+ const B = Atomics.load(g.length, 0);
1572
1558
  if (B !== 0) {
1573
- await Atomics.waitAsync(I.length, 0, B).value;
1559
+ await Atomics.waitAsync(g.length, 0, B).value;
1574
1560
  continue;
1575
1561
  }
1576
- const i = g.subarray(C, C + I.bytes.length);
1577
- I.bytes.set(i), I.publish(i.length), C += i.length;
1562
+ const E = I.subarray(C, C + g.bytes.length);
1563
+ g.bytes.set(E), g.publish(E.length), C += E.length;
1578
1564
  }
1579
1565
  } finally {
1580
1566
  this.writing = !1;
@@ -1583,97 +1569,727 @@ class PA {
1583
1569
  onMessage = (A) => {
1584
1570
  if (!(this.abort.signal.aborted || A.data?.type !== "host_wake"))
1585
1571
  try {
1586
- const g = Atomics.load(this.incoming.length, 0);
1587
- if (g <= 0) return;
1588
- const I = this.incoming.bytes.slice(0, g);
1572
+ const I = Atomics.load(this.incoming.length, 0);
1573
+ if (I <= 0) return;
1574
+ const g = this.incoming.bytes.slice(0, I);
1589
1575
  this.incoming.publish(0);
1590
1576
  for (const C of this.listeners) {
1591
1577
  if (this.abort.signal.aborted) break;
1592
- Promise.resolve(C(I)).catch((B) => this.fail(B));
1578
+ Promise.resolve(C(g)).catch((B) => this.fail(B));
1593
1579
  }
1594
- } catch (g) {
1595
- this.fail(g);
1580
+ } catch (I) {
1581
+ this.fail(I);
1596
1582
  }
1597
1583
  };
1598
1584
  fail(A) {
1599
- this.abort.signal.aborted || (this.close(), this.onFailure(IA(A)));
1585
+ this.abort.signal.aborted || (this.close(), this.onFailure(wA(A)));
1600
1586
  }
1601
1587
  close() {
1602
1588
  if (this.abort.signal.aborted) return;
1603
1589
  this.worker?.removeEventListener("message", this.onMessage), this.worker = void 0, this.incoming.publish(-1), this.outgoing.publish(-1), this.abort.abort(), this.listeners.clear();
1604
1590
  const A = this.cleanup;
1605
- return this.cleanup = void 0, oA(A);
1591
+ return this.cleanup = void 0, yA(A);
1592
+ }
1593
+ }
1594
+ const QI = [
1595
+ "__future__",
1596
+ "_abc",
1597
+ "_aix_support",
1598
+ "_android_support",
1599
+ "_apple_support",
1600
+ "_ast",
1601
+ "_ast_unparse",
1602
+ "_asyncio",
1603
+ "_bisect",
1604
+ "_blake2",
1605
+ "_bz2",
1606
+ "_codecs",
1607
+ "_codecs_cn",
1608
+ "_codecs_hk",
1609
+ "_codecs_iso2022",
1610
+ "_codecs_jp",
1611
+ "_codecs_kr",
1612
+ "_codecs_tw",
1613
+ "_collections",
1614
+ "_collections_abc",
1615
+ "_colorize",
1616
+ "_compat_pickle",
1617
+ "_contextvars",
1618
+ "_csv",
1619
+ "_ctypes",
1620
+ "_curses",
1621
+ "_curses_panel",
1622
+ "_datetime",
1623
+ "_dbm",
1624
+ "_decimal",
1625
+ "_elementtree",
1626
+ "_frozen_importlib",
1627
+ "_frozen_importlib_external",
1628
+ "_functools",
1629
+ "_gdbm",
1630
+ "_hashlib",
1631
+ "_heapq",
1632
+ "_hmac",
1633
+ "_imp",
1634
+ "_interpchannels",
1635
+ "_interpqueues",
1636
+ "_interpreters",
1637
+ "_io",
1638
+ "_ios_support",
1639
+ "_json",
1640
+ "_locale",
1641
+ "_lsprof",
1642
+ "_lzma",
1643
+ "_markupbase",
1644
+ "_math_integer",
1645
+ "_md5",
1646
+ "_multibytecodec",
1647
+ "_multiprocessing",
1648
+ "_opcode",
1649
+ "_opcode_metadata",
1650
+ "_operator",
1651
+ "_osx_support",
1652
+ "_overlapped",
1653
+ "_pickle",
1654
+ "_posixshmem",
1655
+ "_posixsubprocess",
1656
+ "_py_abc",
1657
+ "_py_warnings",
1658
+ "_pydatetime",
1659
+ "_pydecimal",
1660
+ "_pyio",
1661
+ "_pylong",
1662
+ "_pyrepl",
1663
+ "_queue",
1664
+ "_random",
1665
+ "_remote_debugging",
1666
+ "_scproxy",
1667
+ "_sha1",
1668
+ "_sha2",
1669
+ "_sha3",
1670
+ "_signal",
1671
+ "_sitebuiltins",
1672
+ "_socket",
1673
+ "_sqlite3",
1674
+ "_sre",
1675
+ "_ssl",
1676
+ "_stat",
1677
+ "_statistics",
1678
+ "_string",
1679
+ "_strptime",
1680
+ "_struct",
1681
+ "_suggestions",
1682
+ "_symtable",
1683
+ "_sysconfig",
1684
+ "_testbuffer",
1685
+ "_testcapi",
1686
+ "_testclinic",
1687
+ "_testclinic_limited",
1688
+ "_testinternalcapi",
1689
+ "_testlimitedcapi",
1690
+ "_thread",
1691
+ "_threading_local",
1692
+ "_tkinter",
1693
+ "_tokenize",
1694
+ "_tracemalloc",
1695
+ "_types",
1696
+ "_typing",
1697
+ "_uuid",
1698
+ "_warnings",
1699
+ "_weakref",
1700
+ "_weakrefset",
1701
+ "_winapi",
1702
+ "_wmi",
1703
+ "_xxtestfuzz",
1704
+ "_zoneinfo",
1705
+ "_zstd",
1706
+ "abc",
1707
+ "annotationlib",
1708
+ "antigravity",
1709
+ "argparse",
1710
+ "array",
1711
+ "ast",
1712
+ "asyncio",
1713
+ "atexit",
1714
+ "base64",
1715
+ "bdb",
1716
+ "binascii",
1717
+ "bisect",
1718
+ "builtins",
1719
+ "bz2",
1720
+ "cProfile",
1721
+ "calendar",
1722
+ "cmath",
1723
+ "cmd",
1724
+ "code",
1725
+ "codecs",
1726
+ "codeop",
1727
+ "collections",
1728
+ "colorsys",
1729
+ "compileall",
1730
+ "compression",
1731
+ "concurrent",
1732
+ "configparser",
1733
+ "contextlib",
1734
+ "contextvars",
1735
+ "copy",
1736
+ "copyreg",
1737
+ "csv",
1738
+ "ctypes",
1739
+ "curses",
1740
+ "dataclasses",
1741
+ "datetime",
1742
+ "dbm",
1743
+ "decimal",
1744
+ "difflib",
1745
+ "dis",
1746
+ "doctest",
1747
+ "email",
1748
+ "encodings",
1749
+ "ensurepip",
1750
+ "enum",
1751
+ "errno",
1752
+ "faulthandler",
1753
+ "fcntl",
1754
+ "filecmp",
1755
+ "fileinput",
1756
+ "fnmatch",
1757
+ "fractions",
1758
+ "ftplib",
1759
+ "functools",
1760
+ "gc",
1761
+ "genericpath",
1762
+ "getopt",
1763
+ "getpass",
1764
+ "gettext",
1765
+ "glob",
1766
+ "graphlib",
1767
+ "grp",
1768
+ "gzip",
1769
+ "hashlib",
1770
+ "heapq",
1771
+ "hmac",
1772
+ "html",
1773
+ "http",
1774
+ "idlelib",
1775
+ "imaplib",
1776
+ "importlib",
1777
+ "inspect",
1778
+ "io",
1779
+ "ipaddress",
1780
+ "itertools",
1781
+ "json",
1782
+ "keyword",
1783
+ "linecache",
1784
+ "locale",
1785
+ "logging",
1786
+ "lzma",
1787
+ "mailbox",
1788
+ "marshal",
1789
+ "math",
1790
+ "mimetypes",
1791
+ "mmap",
1792
+ "modulefinder",
1793
+ "msvcrt",
1794
+ "multiprocessing",
1795
+ "netrc",
1796
+ "nt",
1797
+ "ntpath",
1798
+ "nturl2path",
1799
+ "numbers",
1800
+ "opcode",
1801
+ "operator",
1802
+ "optparse",
1803
+ "os",
1804
+ "pathlib",
1805
+ "pdb",
1806
+ "pickle",
1807
+ "pickletools",
1808
+ "pkgutil",
1809
+ "platform",
1810
+ "plistlib",
1811
+ "poplib",
1812
+ "posix",
1813
+ "posixpath",
1814
+ "pprint",
1815
+ "profile",
1816
+ "profiling",
1817
+ "pstats",
1818
+ "pty",
1819
+ "pwd",
1820
+ "py_compile",
1821
+ "pyclbr",
1822
+ "pydoc",
1823
+ "pydoc_data",
1824
+ "pyexpat",
1825
+ "queue",
1826
+ "quopri",
1827
+ "random",
1828
+ "re",
1829
+ "readline",
1830
+ "reprlib",
1831
+ "resource",
1832
+ "rlcompleter",
1833
+ "runpy",
1834
+ "sched",
1835
+ "secrets",
1836
+ "select",
1837
+ "selectors",
1838
+ "shelve",
1839
+ "shlex",
1840
+ "shutil",
1841
+ "signal",
1842
+ "site",
1843
+ "smtplib",
1844
+ "socket",
1845
+ "socketserver",
1846
+ "sqlite3",
1847
+ "ssl",
1848
+ "stat",
1849
+ "statistics",
1850
+ "string",
1851
+ "stringprep",
1852
+ "struct",
1853
+ "subprocess",
1854
+ "symtable",
1855
+ "sys",
1856
+ "sysconfig",
1857
+ "syslog",
1858
+ "tabnanny",
1859
+ "tarfile",
1860
+ "tempfile",
1861
+ "termios",
1862
+ "textwrap",
1863
+ "this",
1864
+ "threading",
1865
+ "time",
1866
+ "timeit",
1867
+ "tkinter",
1868
+ "token",
1869
+ "tokenize",
1870
+ "tomllib",
1871
+ "trace",
1872
+ "traceback",
1873
+ "tracemalloc",
1874
+ "tty",
1875
+ "turtle",
1876
+ "turtledemo",
1877
+ "types",
1878
+ "typing",
1879
+ "unicodedata",
1880
+ "unittest",
1881
+ "urllib",
1882
+ "uuid",
1883
+ "venv",
1884
+ "warnings",
1885
+ "wave",
1886
+ "weakref",
1887
+ "webbrowser",
1888
+ "winreg",
1889
+ "winsound",
1890
+ "wsgiref",
1891
+ "xml",
1892
+ "xmlrpc",
1893
+ "xxsubtype",
1894
+ "zipapp",
1895
+ "zipfile",
1896
+ "zipimport",
1897
+ "zlib",
1898
+ "zoneinfo"
1899
+ ], AA = "3.15.2", BI = "/usr/local/lib/python3.15/site-packages", UA = "https://pypi.org/pypi", EI = "files.pythonhosted.org", l = { packages: 50, downloadBytes: 60 * 1024 * 1024, files: 5e3, unpackedBytes: 200 * 1024 * 1024 }, DI = {
1900
+ python_version: AA.split(".").slice(0, 2).join("."),
1901
+ python_full_version: AA,
1902
+ implementation_name: "cpython",
1903
+ implementation_version: AA,
1904
+ platform_python_implementation: "CPython",
1905
+ os_name: "posix",
1906
+ sys_platform: "wasi",
1907
+ platform_system: "",
1908
+ platform_machine: "wasm32",
1909
+ platform_release: "0.0.0",
1910
+ platform_version: "0.0.0"
1911
+ }, RA = {
1912
+ yaml: "PyYAML",
1913
+ bs4: "beautifulsoup4",
1914
+ dateutil: "python-dateutil",
1915
+ attr: "attrs",
1916
+ dotenv: "python-dotenv",
1917
+ jwt: "PyJWT",
1918
+ serial: "pyserial",
1919
+ docx: "python-docx",
1920
+ pptx: "python-pptx",
1921
+ slugify: "python-slugify",
1922
+ PIL: "pillow",
1923
+ sklearn: "scikit-learn",
1924
+ cv2: "opencv-python",
1925
+ Crypto: "pycryptodome",
1926
+ skimage: "scikit-image",
1927
+ google: "protobuf",
1928
+ _pytest: "pytest"
1929
+ }, wI = new Set(QI), YA = /^[A-Za-z0-9]([A-Za-z0-9._-]*[A-Za-z0-9])?$/;
1930
+ function W(Q) {
1931
+ return Q.toLowerCase().replace(/[-_.]+/g, "-");
1932
+ }
1933
+ function iI(Q) {
1934
+ const A = /* @__PURE__ */ new Set();
1935
+ for (const I of Q.split(`
1936
+ `)) {
1937
+ const g = I.replace(/#.*/, "").trim();
1938
+ let C = /^import\s+(.+)$/.exec(g);
1939
+ if (C) {
1940
+ for (const B of C[1].split(",")) {
1941
+ const E = B.trim().split(/\s+/)[0]?.split(".")[0];
1942
+ E && A.add(E);
1943
+ }
1944
+ continue;
1945
+ }
1946
+ C = /^from\s+([A-Za-z_][\w.]*)\s+import\b/.exec(g), C && A.add(C[1].split(".")[0]);
1947
+ }
1948
+ return A;
1949
+ }
1950
+ function oI(Q) {
1951
+ const A = /* @__PURE__ */ new Set(), I = [];
1952
+ let g = "";
1953
+ const C = (E, D) => {
1954
+ for (const [w, N] of Object.entries(E))
1955
+ typeof N == "string" ? (w.endsWith(".py") && (I.push(N), D || A.add(w.slice(0, -3))), !D && w === "requirements.txt" && (g = N)) : (D || A.add(w), C(N, `${D}/${w}`));
1956
+ };
1957
+ C(Q, "");
1958
+ const B = /* @__PURE__ */ new Map();
1959
+ for (const E of I)
1960
+ for (const D of iI(E)) {
1961
+ if (wI.has(D) || A.has(D) || D.startsWith("_") && !(D in RA)) continue;
1962
+ const w = RA[D] ?? D;
1963
+ B.set(W(w), w);
1964
+ }
1965
+ for (const E of g.split(`
1966
+ `)) {
1967
+ const D = E.replace(/#.*/, "").trim();
1968
+ if (!D || D.startsWith("-")) continue;
1969
+ const w = /^[A-Za-z0-9][A-Za-z0-9._-]*/.exec(D)?.[0];
1970
+ w && B.set(W(w), D);
1971
+ }
1972
+ return [...B.values()].sort();
1973
+ }
1974
+ function n(Q) {
1975
+ const A = /^v?(?:\d+!)?(\d+(?:\.\d+)*)(?:[-_.]?(a|b|c|rc|alpha|beta|pre|preview)[-_.]?(\d*))?(?:-(\d+)|[-_.]?(?:post|rev|r)[-_.]?(\d*))?(?:[-_.]?dev[-_.]?(\d*))?(?:\+[a-z0-9.]+)?$/i.exec(
1976
+ Q.trim()
1977
+ );
1978
+ if (!A) return null;
1979
+ const I = A[2]?.toLowerCase(), g = I ? { a: 0, alpha: 0, b: 1, beta: 1, c: 2, rc: 2, pre: 2, preview: 2 }[I] : void 0;
1980
+ return {
1981
+ release: A[1].split(".").map(Number),
1982
+ pre: g === void 0 ? void 0 : [g, Number(A[3] || 0)],
1983
+ post: A[4] !== void 0 ? Number(A[4]) : A[5] !== void 0 ? Number(A[5] || 0) : void 0,
1984
+ dev: A[6] !== void 0 ? Number(A[6] || 0) : void 0,
1985
+ text: Q
1986
+ };
1987
+ }
1988
+ function cA(Q, A) {
1989
+ const I = Math.max(Q.release.length, A.release.length);
1990
+ for (let E = 0; E < I; E++) {
1991
+ const D = (Q.release[E] ?? 0) - (A.release[E] ?? 0);
1992
+ if (D) return Math.sign(D);
1993
+ }
1994
+ const g = (E) => [
1995
+ E.pre ? 0 : E.dev !== void 0 && E.post === void 0 ? -1 : 1,
1996
+ E.pre?.[0] ?? 0,
1997
+ E.pre?.[1] ?? 0,
1998
+ E.post ?? -1,
1999
+ E.dev ?? Number.POSITIVE_INFINITY
2000
+ ], C = g(Q), B = g(A);
2001
+ for (let E = 0; E < C.length; E++) if (C[E] !== B[E]) return Math.sign(C[E] - B[E]);
2002
+ return 0;
2003
+ }
2004
+ const JA = (Q) => Q.pre !== void 0 || Q.dev !== void 0;
2005
+ function iA(Q, A) {
2006
+ for (const I of A.split(",")) {
2007
+ const g = I.trim();
2008
+ if (!g) continue;
2009
+ const C = /^(~=|===|==|!=|<=|>=|<|>)\s*(.+)$/.exec(g);
2010
+ if (!C) return !1;
2011
+ const [, B, E] = C;
2012
+ if ((B === "==" || B === "!=") && E.endsWith(".*")) {
2013
+ if (E.slice(0, -2).split(".").map(Number).every((U, h) => (Q.release[h] ?? 0) === U) !== (B === "==")) return !1;
2014
+ continue;
2015
+ }
2016
+ const D = n(E);
2017
+ if (!D) return !1;
2018
+ const w = cA(Q, D);
2019
+ if (B === "~=") {
2020
+ const N = D.release.slice(0, Math.max(1, D.release.length - 1));
2021
+ if (w < 0 || !N.every((k, U) => (Q.release[U] ?? 0) === k)) return !1;
2022
+ } else if (!(B === "==" || B === "===" ? w === 0 : B === "!=" ? w !== 0 : B === "<=" ? w <= 0 : B === ">=" ? w >= 0 : B === "<" ? w < 0 : w > 0))
2023
+ return !1;
2024
+ }
2025
+ return !0;
2026
+ }
2027
+ function hA(Q) {
2028
+ const [A, I] = Q.split(";", 2).map((C) => C.trim()), g = /^([A-Za-z0-9][A-Za-z0-9._-]*)\s*(?:\[([^\]]*)\])?\s*\(?\s*([^)]*?)\s*\)?$/.exec(A);
2029
+ return !g || g[3].includes("@") ? null : {
2030
+ name: g[1],
2031
+ extras: (g[2] ?? "").split(",").map((C) => C.trim()).filter(Boolean),
2032
+ specifiers: g[3].replace(/\s+/g, ""),
2033
+ marker: I || void 0
2034
+ };
2035
+ }
2036
+ function NI(Q, A = []) {
2037
+ const I = Q.match(/\(|\)|'[^']*'|"[^"]*"|===|==|!=|<=|>=|~=|<|>|\bnot\s+in\b|\bin\b|\band\b|\bor\b|[A-Za-z_][A-Za-z0-9_.]*/g) ?? [];
2038
+ let g = 0;
2039
+ const C = (N) => /^['"]/.test(N) ? { text: N.slice(1, -1) } : N === "extra" ? { text: "", variable: "extra" } : { text: DI[N] ?? "", variable: N }, B = (N, k, U) => {
2040
+ if (N.variable === "extra" || U.variable === "extra") {
2041
+ const R = W((N.variable === "extra" ? U : N).text), H = A.some((j) => W(j) === R);
2042
+ return k === "!=" ? !H : H;
2043
+ }
2044
+ if (k === "in") return U.text.includes(N.text);
2045
+ if (/^not\s+in$/.test(k)) return !U.text.includes(N.text);
2046
+ if (!N.variable && U.variable)
2047
+ return B(U, { "<": ">", ">": "<", "<=": ">=", ">=": "<=" }[k] ?? k, N);
2048
+ const h = n(N.text), K = n(U.text);
2049
+ return h && K && /version/.test(N.variable ?? "") ? iA(h, `${k}${U.text}`) : k === "==" || k === "===" ? N.text === U.text : k === "!=" ? N.text !== U.text : !1;
2050
+ }, E = () => {
2051
+ if (I[g] === "(") {
2052
+ g++;
2053
+ const h = w();
2054
+ return g++, h;
2055
+ }
2056
+ const N = C(I[g++]), k = I[g++], U = C(I[g++]);
2057
+ return B(N, k, U);
2058
+ }, D = () => {
2059
+ let N = E();
2060
+ for (; I[g] === "and"; )
2061
+ g++, N = E() && N;
2062
+ return N;
2063
+ }, w = () => {
2064
+ let N = D();
2065
+ for (; I[g] === "or"; )
2066
+ g++, N = D() || N;
2067
+ return N;
2068
+ };
2069
+ try {
2070
+ return w();
2071
+ } catch {
2072
+ return !1;
1606
2073
  }
1607
2074
  }
1608
- const rA = [
2075
+ function FI(Q) {
2076
+ if (Q.packagetype !== "bdist_wheel" || Q.yanked) return !1;
2077
+ const A = Q.filename.replace(/\.whl$/, "").split("-").slice(-3);
2078
+ return A.length === 3 && A[1] === "none" && A[2] === "any" && A[0].split(".").some((I) => I === "py3" || I.startsWith("py3"));
2079
+ }
2080
+ function GI(Q) {
2081
+ return Q ? iA(n(AA), Q.replace(/\s+/g, "")) : !0;
2082
+ }
2083
+ class MI {
2084
+ constructor(A = (I, g) => fetch(I, g)) {
2085
+ this.fetchImpl = A;
2086
+ }
2087
+ projects = /* @__PURE__ */ new Map();
2088
+ metadata = /* @__PURE__ */ new Map();
2089
+ wheels = /* @__PURE__ */ new Map();
2090
+ project(A) {
2091
+ const I = W(A);
2092
+ let g = this.projects.get(I);
2093
+ return g || (g = this.fetchImpl(`${UA}/${encodeURIComponent(I)}/json`).then(
2094
+ async (C) => C.ok ? await C.json() : null,
2095
+ () => null
2096
+ ), this.projects.set(I, g)), g;
2097
+ }
2098
+ /** requires_dist of one release (the project JSON only carries the latest's). */
2099
+ requiresDist(A, I, g) {
2100
+ if (g.info.version === I) return Promise.resolve(g.info.requires_dist ?? []);
2101
+ const C = `${W(A)}@${I}`;
2102
+ let B = this.metadata.get(C);
2103
+ return B || (B = this.fetchImpl(`${UA}/${encodeURIComponent(W(A))}/${encodeURIComponent(I)}/json`).then(
2104
+ async (E) => E.ok ? (await E.json()).info.requires_dist ?? [] : [],
2105
+ () => []
2106
+ ), this.metadata.set(C, B)), B;
2107
+ }
2108
+ /**
2109
+ * Resolves requirements and their dependencies to pure-Python wheels. Greedy: the newest
2110
+ * release that fits every constraint seen so far for that project.
2111
+ */
2112
+ async resolve(A, I = () => {
2113
+ }) {
2114
+ const g = /* @__PURE__ */ new Map(), C = [];
2115
+ for (const B of A) {
2116
+ const E = hA(B);
2117
+ E && YA.test(E.name) && C.push({ requirement: E, top: !0 });
2118
+ }
2119
+ for (; C.length; ) {
2120
+ const { requirement: B, top: E } = C.shift(), D = W(B.name);
2121
+ if (g.has(D)) continue;
2122
+ if (g.size >= l.packages) break;
2123
+ const w = await this.project(B.name);
2124
+ if (!w) {
2125
+ E && I({ kind: "skipped", message: `${B.name}: not found on PyPI` });
2126
+ continue;
2127
+ }
2128
+ const N = Object.entries(w.releases).map(([K, R]) => ({ version: n(K), files: R })).filter((K) => K.version !== null && iA(K.version, B.specifiers)).sort((K, R) => cA(R.version, K.version)), U = [...N.filter((K) => !JA(K.version)), ...N.filter((K) => JA(K.version))].map((K) => ({ version: K.version, wheel: K.files.find((R) => FI(R) && GI(R.requires_python)) })).find((K) => K.wheel);
2129
+ if (!U?.wheel) {
2130
+ const K = N.some((R) => R.files.some((H) => H.packagetype === "bdist_wheel"));
2131
+ I({
2132
+ kind: "skipped",
2133
+ message: K ? `${w.info.name} has compiled code, which can't run in the browser` : `${w.info.name}: no Python 3.15 wheel on PyPI`
2134
+ });
2135
+ continue;
2136
+ }
2137
+ const h = new URL(U.wheel.url);
2138
+ if (!(h.protocol !== "https:" || h.hostname !== EI)) {
2139
+ g.set(D, { name: w.info.name, version: U.version.text, url: U.wheel.url, sha256: U.wheel.digests.sha256, size: U.wheel.size });
2140
+ for (const K of await this.requiresDist(B.name, U.version.text, w)) {
2141
+ const R = hA(K);
2142
+ !R || !YA.test(R.name) || R.marker && !NI(R.marker, B.extras) || C.push({ requirement: R, top: !1 });
2143
+ }
2144
+ }
2145
+ }
2146
+ return [...g.values()];
2147
+ }
2148
+ /** Files to mount, by absolute path in the run, for these resolved packages. */
2149
+ async install(A, I = () => {
2150
+ }) {
2151
+ const g = {};
2152
+ let C = 0, B = 0;
2153
+ for (const E of A) {
2154
+ if (C += E.size, C > l.downloadBytes) {
2155
+ I({ kind: "skipped", message: `${E.name}: over the ${l.downloadBytes >> 20}MB package limit` });
2156
+ break;
2157
+ }
2158
+ const D = `${E.url}#${E.sha256}`;
2159
+ let w = this.wheels.get(D);
2160
+ w || (I({ kind: "installing", message: `Installing ${E.name} ${E.version}` }), w = this.download(E), this.wheels.set(D, w), w.catch(() => this.wheels.delete(D)));
2161
+ let N;
2162
+ try {
2163
+ N = await w;
2164
+ } catch (k) {
2165
+ I({ kind: "skipped", message: `${E.name}: ${k instanceof Error ? k.message : String(k)}` });
2166
+ continue;
2167
+ }
2168
+ for (const [k, U] of N) {
2169
+ if (++B > l.files) break;
2170
+ g[`${BI}/${k}`] = U;
2171
+ }
2172
+ }
2173
+ return g;
2174
+ }
2175
+ async download(A) {
2176
+ const I = await this.fetchImpl(A.url, { cache: "force-cache" });
2177
+ if (!I.ok) throw new Error(`download failed (${I.status})`);
2178
+ const g = new Uint8Array(await I.arrayBuffer());
2179
+ if ([...new Uint8Array(await crypto.subtle.digest("SHA-256", g))].map((B) => B.toString(16).padStart(2, "0")).join("") !== A.sha256) throw new Error("download did not match PyPI's checksum");
2180
+ return kI(await yI(g, l.unpackedBytes));
2181
+ }
2182
+ }
2183
+ function kI(Q) {
2184
+ const A = /* @__PURE__ */ new Map();
2185
+ for (const [I, g] of Q) {
2186
+ const C = /^[^/]+\.data\/(purelib|platlib)\/(.+)$/.exec(I);
2187
+ C ? A.set(C[2], g) : /^[^/]+\.data\//.test(I) || A.set(I, g);
2188
+ }
2189
+ return A;
2190
+ }
2191
+ function KI(Q) {
2192
+ return Q.length > 0 && !Q.startsWith("/") && !Q.includes("\\") && !Q.includes("\0") && !Q.split("/").some((A) => A === ".." || A === ".");
2193
+ }
2194
+ async function yI(Q, A) {
2195
+ const I = new DataView(Q.buffer, Q.byteOffset, Q.byteLength);
2196
+ let g = -1;
2197
+ for (let N = Q.length - 22; N >= Math.max(0, Q.length - 22 - 65535); N--)
2198
+ if (I.getUint32(N, !0) === 101010256) {
2199
+ g = N;
2200
+ break;
2201
+ }
2202
+ if (g < 0) throw new Error("not a zip archive");
2203
+ const C = I.getUint16(g + 10, !0);
2204
+ let B = I.getUint32(g + 16, !0);
2205
+ const E = /* @__PURE__ */ new Map();
2206
+ let D = 0;
2207
+ const w = new TextDecoder();
2208
+ for (let N = 0; N < C; N++) {
2209
+ if (I.getUint32(B, !0) !== 33639248) throw new Error("corrupt zip directory");
2210
+ const k = I.getUint16(B + 10, !0), U = I.getUint32(B + 20, !0), h = I.getUint32(B + 24, !0), K = I.getUint16(B + 28, !0), R = I.getUint16(B + 30, !0), H = I.getUint16(B + 32, !0), j = I.getUint32(B + 42, !0), s = w.decode(Q.subarray(B + 46, B + 46 + K));
2211
+ if (B += 46 + K + R + H, s.endsWith("/")) continue;
2212
+ if (!KI(s)) throw new Error(`unsafe path in package: ${s}`);
2213
+ if (D += h, D > A) throw new Error("package too large");
2214
+ const v = j + 30 + I.getUint16(j + 26, !0) + I.getUint16(j + 28, !0), V = Q.subarray(v, v + U);
2215
+ let o;
2216
+ if (k === 0) o = V.slice();
2217
+ else if (k === 8) o = new Uint8Array(await new Response(new Blob([V.slice()]).stream().pipeThrough(new DecompressionStream("deflate-raw"))).arrayBuffer());
2218
+ else throw new Error(`unsupported compression in package: ${s}`);
2219
+ if (o.length !== h) throw new Error(`corrupt entry in package: ${s}`);
2220
+ E.set(s, o);
2221
+ }
2222
+ return E;
2223
+ }
2224
+ const UI = [
1609
2225
  "4847c7cda81eb51b1cec18fe40b396605579fe84e17eca2760702b8a9666e4e1"
1610
- ], u = Object.freeze({
2226
+ ], gA = Object.freeze({
1611
2227
  compiler: "d6b8d6e4596136fc6ae451fe3b81b1be5a1829505cbc993179247c75a764ce87",
1612
2228
  sysroot: "8745c6af23fd841fa507d0c73f6b6b8e8da1b4ec216a6339739a28b38ff7227b",
1613
2229
  exceptions: "20986166552953de0e3ca5c1e9f341e7aec8b9ba54dcb244d0d2b2f9ca843ab4"
1614
2230
  });
1615
- function yA(Q = "legacy") {
1616
- if (Q === "legacy") return { profile: Q, digests: u };
1617
- if (Q === "stock-certified-v1" && rA.length > 0)
1618
- return { profile: Q, digests: u };
2231
+ function aA(Q = "legacy") {
2232
+ if (Q === "legacy") return { profile: Q, digests: gA };
2233
+ if (Q === "stock-certified-v1" && UI.length > 0)
2234
+ return { profile: Q, digests: gA };
1619
2235
  throw new Error(`The ${Q} toolchain is not available in this build`);
1620
2236
  }
1621
- class l {
2237
+ class X {
1622
2238
  #A;
1623
2239
  hashCount = 3;
1624
2240
  hashMs;
1625
- constructor(A, g) {
1626
- this.#A = A, this.hashMs = g;
2241
+ constructor(A, I) {
2242
+ this.#A = A, this.hashMs = I;
1627
2243
  }
1628
- static async load(A, g, I, C = u.exceptions, B = "legacy") {
1629
- const i = yA(B);
2244
+ static async load(A, I, g, C = gA.exceptions, B = "legacy") {
2245
+ const E = aA(B);
1630
2246
  if (A.length !== 2) throw new Error("Missing C++ toolchain assets");
1631
- let D, o;
1632
- const K = await Promise.allSettled(
1633
- A.map(async (d, v) => {
2247
+ let D, w;
2248
+ const N = await Promise.allSettled(
2249
+ A.map(async (H, j) => {
1634
2250
  try {
1635
- const p = await fetch(d, { cache: "force-cache", signal: I });
1636
- if (!p.ok) throw new Error(`Cannot load C++ toolchain (${p.status})`);
1637
- return v === 0 && g && typeof WebAssembly.compileStreaming == "function" && typeof p.clone == "function" && (o = WebAssembly.compileStreaming(p.clone()).catch(() => {
1638
- })), new Uint8Array(await p.arrayBuffer());
1639
- } catch (p) {
1640
- throw D ??= { error: p }, p;
2251
+ const s = await fetch(H, { cache: "force-cache", signal: g });
2252
+ if (!s.ok) throw new Error(`Cannot load C++ toolchain (${s.status})`);
2253
+ return j === 0 && I && typeof WebAssembly.compileStreaming == "function" && typeof s.clone == "function" && (w = WebAssembly.compileStreaming(s.clone()).catch(() => {
2254
+ })), new Uint8Array(await s.arrayBuffer());
2255
+ } catch (s) {
2256
+ throw D ??= { error: s }, s;
1641
2257
  }
1642
2258
  })
1643
2259
  );
1644
- if (K[0].status === "rejected" || K[1].status === "rejected")
2260
+ if (N[0].status === "rejected" || N[1].status === "rejected")
1645
2261
  throw D?.error;
1646
- const [U, h] = [K[0].value, K[1].value], [Y, s] = await Promise.allSettled([
1647
- l.ingestOwned(U, h, !1, C),
1648
- g ? (o ?? Promise.resolve(void 0)).then(
1649
- (d) => d ?? WebAssembly.compile(U)
2262
+ const [k, U] = [N[0].value, N[1].value], [h, K] = await Promise.allSettled([
2263
+ X.ingestOwned(k, U, !1, C),
2264
+ I ? (w ?? Promise.resolve(void 0)).then(
2265
+ (H) => H ?? WebAssembly.compile(k)
1650
2266
  ) : Promise.resolve(void 0)
1651
2267
  ]);
1652
- if (Y.status === "rejected") throw Y.reason;
1653
- const H = Y.value;
1654
- if (H.#A.compilerHash !== i.digests.compiler || H.#A.sysrootHash !== i.digests.sysroot || H.#A.exceptionsHash !== i.digests.exceptions)
2268
+ if (h.status === "rejected") throw h.reason;
2269
+ const R = h.value;
2270
+ if (R.#A.compilerHash !== E.digests.compiler || R.#A.sysrootHash !== E.digests.sysroot || R.#A.exceptionsHash !== E.digests.exceptions)
1655
2271
  throw new Error("C++ toolchain integrity mismatch");
1656
- if (I?.aborted) throw new DOMException("Toolchain loading aborted", "AbortError");
1657
- if (s.status === "rejected") throw s.reason;
1658
- return H.#A.stockProfile = i.profile === "stock-certified-v1", H.#A.module = s.value, H;
2272
+ if (g?.aborted) throw new DOMException("Toolchain loading aborted", "AbortError");
2273
+ if (K.status === "rejected") throw K.reason;
2274
+ return R.#A.stockProfile = E.profile === "stock-certified-v1", R.#A.module = K.value, R;
1659
2275
  }
1660
2276
  /** Captures even Buffer/subclass inputs before the first asynchronous boundary. */
1661
- static async fromBytes(A, g, I) {
1662
- const C = new Uint8Array(A), B = new Uint8Array(g);
1663
- return l.ingestOwned(
2277
+ static async fromBytes(A, I, g) {
2278
+ const C = new Uint8Array(A), B = new Uint8Array(I);
2279
+ return X.ingestOwned(
1664
2280
  C,
1665
2281
  B,
1666
- I,
1667
- u.exceptions
2282
+ g,
2283
+ gA.exceptions
1668
2284
  );
1669
2285
  }
1670
- static async ingestOwned(A, g, I, C) {
1671
- const B = performance.now(), i = await Promise.allSettled([kA(A), kA(g)]);
1672
- if (i[0].status === "rejected") throw i[0].reason;
1673
- if (i[1].status === "rejected") throw i[1].reason;
1674
- const [D, o] = [i[0].value, i[1].value], K = I ? await WebAssembly.compile(A) : void 0;
1675
- return new l(
1676
- { compiler: A, sysroot: g, compilerHash: D, sysrootHash: o, exceptionsHash: C, module: K },
2286
+ static async ingestOwned(A, I, g, C) {
2287
+ const B = performance.now(), E = await Promise.allSettled([SA(A), SA(I)]);
2288
+ if (E[0].status === "rejected") throw E[0].reason;
2289
+ if (E[1].status === "rejected") throw E[1].reason;
2290
+ const [D, w] = [E[0].value, E[1].value], N = g ? await WebAssembly.compile(A) : void 0;
2291
+ return new X(
2292
+ { compiler: A, sysroot: I, compilerHash: D, sysrootHash: w, exceptionsHash: C, module: N },
1677
2293
  performance.now() - B
1678
2294
  );
1679
2295
  }
@@ -1690,25 +2306,25 @@ class l {
1690
2306
  return this.#A.compiler.byteLength;
1691
2307
  }
1692
2308
  /** postMessage clones the private seed; never transfer/detach the restart owner. */
1693
- configure(A, g) {
2309
+ configure(A, I) {
1694
2310
  try {
1695
- return A.postMessage({ ...g, toolchain: this.#A }), !!this.#A.module;
1696
- } catch (I) {
1697
- if (!(I instanceof DOMException) || I.name !== "DataCloneError" || !this.#A.module)
1698
- throw I;
1699
- return A.postMessage({ ...g, toolchain: { ...this.#A, module: void 0 } }), !1;
2311
+ return A.postMessage({ ...I, toolchain: this.#A }), !!this.#A.module;
2312
+ } catch (g) {
2313
+ if (!(g instanceof DOMException) || g.name !== "DataCloneError" || !this.#A.module)
2314
+ throw g;
2315
+ return A.postMessage({ ...I, toolchain: { ...this.#A, module: void 0 } }), !1;
1700
2316
  }
1701
2317
  }
1702
2318
  }
1703
- async function kA(Q) {
2319
+ async function SA(Q) {
1704
2320
  const A = await crypto.subtle.digest("SHA-256", Q);
1705
- return Array.from(new Uint8Array(A), (g) => g.toString(16).padStart(2, "0")).join("");
2321
+ return Array.from(new Uint8Array(A), (I) => I.toString(16).padStart(2, "0")).join("");
1706
2322
  }
1707
- let _, P;
1708
- class KA {
1709
- stdout = new FA(1);
1710
- stderr = new FA(2);
1711
- stdin = new q();
2323
+ let QA, _;
2324
+ class HA {
2325
+ stdout = new LA(1);
2326
+ stderr = new LA(2);
2327
+ stdin = new O();
1712
2328
  debugger;
1713
2329
  lang;
1714
2330
  scope;
@@ -1717,6 +2333,9 @@ class KA {
1717
2333
  cppArtifacts;
1718
2334
  hostDevice;
1719
2335
  options;
2336
+ python;
2337
+ installer;
2338
+ installed;
1720
2339
  retain;
1721
2340
  idleTimeoutMs;
1722
2341
  /** Absolute `EngineOptions.wasmUrl`, handed to each worker; unset uses the default. */
@@ -1746,35 +2365,44 @@ class KA {
1746
2365
  retirements = 0;
1747
2366
  latest;
1748
2367
  cacheValidation;
1749
- static async create(A, g = {}) {
1750
- const { wasmUrl: I, ...C } = g, B = I === void 0 ? void 0 : XA(I, globalThis.location?.href), i = structuredClone(C), D = B ?? null;
1751
- if (P !== void 0 && P !== D)
2368
+ static async create(A, I = {}) {
2369
+ const { wasmUrl: g, python: C, ...B } = I, E = g === void 0 ? void 0 : AI(g, globalThis.location?.href), D = structuredClone(B);
2370
+ C && (D.python = {
2371
+ packages: !!C.packages,
2372
+ onPackageStatus: typeof C.onPackageStatus == "function" ? C.onPackageStatus : void 0
2373
+ });
2374
+ const w = E ?? null;
2375
+ if (_ !== void 0 && _ !== w)
1752
2376
  throw new Error("The engine Wasm is already loaded from a different wasmUrl");
1753
- P = D, _ ??= dA({ module_or_path: B ?? WA }).catch((K) => {
1754
- throw _ = void 0, P = void 0, K;
1755
- }), await _;
1756
- const o = new KA(A, i);
1757
- if (o.wasmUrl = B, A !== "c" && typeof window < "u" && typeof fetch < "u")
1758
- for (const K of EA(A))
1759
- fetch(K, { cache: "force-cache" }).then((U) => U.arrayBuffer()).catch(() => {
2377
+ _ = w, QA ??= XA({ module_or_path: E ?? rA }).catch((k) => {
2378
+ throw QA = void 0, _ = void 0, k;
2379
+ }), await QA;
2380
+ const N = new HA(A, D);
2381
+ if (N.wasmUrl = E, A !== "c" && typeof window < "u" && typeof fetch < "u")
2382
+ for (const k of FA(A))
2383
+ fetch(k, { cache: "force-cache" }).then((U) => U.arrayBuffer()).catch(() => {
1760
2384
  });
1761
- return o;
2385
+ return N;
1762
2386
  }
1763
- constructor(A, g) {
1764
- const I = g.cpp;
1765
- this.retain = g.retainWorker ?? I?.retainWorker ?? !0;
1766
- const C = g.idleTimeoutMs ?? I?.idleTimeoutMs ?? 3e4;
2387
+ constructor(A, I) {
2388
+ const g = I.cpp;
2389
+ this.retain = I.retainWorker ?? g?.retainWorker ?? !0;
2390
+ const C = I.idleTimeoutMs ?? g?.idleTimeoutMs ?? 3e4;
1767
2391
  if (!Number.isSafeInteger(C) || C < 1 || C > 3e5)
1768
2392
  throw new RangeError("Worker idle timeout must be between 1 and 300000 milliseconds");
1769
- if (this.idleTimeoutMs = C, I) {
2393
+ if (this.idleTimeoutMs = C, g) {
1770
2394
  if (A !== "c") throw new TypeError("C++ performance options require C/C++");
1771
- if (!I.scope?.projectId || !I.scope.accountId)
2395
+ if (!g.scope?.projectId || !g.scope.accountId)
1772
2396
  throw new TypeError("C++ performance options require project and account identity");
1773
- if (I.compilerLifetime !== void 0 && !["idle", "project"].includes(I.compilerLifetime))
2397
+ if (g.compilerLifetime !== void 0 && !["idle", "project"].includes(g.compilerLifetime))
1774
2398
  throw new TypeError("Invalid compiler lifetime");
1775
- yA(I.toolchainProfile), this.scope = Object.freeze({ ...I.scope }), this.options = Object.freeze({ ...I, scope: this.scope, idleTimeoutMs: C });
2399
+ aA(g.toolchainProfile), this.scope = Object.freeze({ ...g.scope }), this.options = Object.freeze({ ...g, scope: this.scope, idleTimeoutMs: C });
2400
+ }
2401
+ if (I.python) {
2402
+ if (A !== "python") throw new TypeError("Python options require Python");
2403
+ this.python = Object.freeze({ ...I.python });
1776
2404
  }
1777
- this.objects = new tA(typeof I?.objectCache == "object" ? I.objectCache : {}), this.debugger = new fA(), this.lang = A;
2405
+ this.objects = new vA(typeof g?.objectCache == "object" ? g.objectCache : {}), this.debugger = new _A(), this.lang = A;
1778
2406
  }
1779
2407
  /** A retained worker reuses clang, compiled once on this thread and cloned to it. */
1780
2408
  get cacheCompilerModule() {
@@ -1816,23 +2444,23 @@ class KA {
1816
2444
  cancelCurrentOperation() {
1817
2445
  if (this.cancellationDraining) return this.cancellationDraining;
1818
2446
  this.operationId++;
1819
- const A = this.promise, g = this.active?.publication;
2447
+ const A = this.promise, I = this.active?.publication;
1820
2448
  this.retireWorker(), this.objects.discardBatch(), this.active && this.finish(this.active, { type: "stopped" });
1821
- const I = Promise.allSettled([A, g]).then(() => {
1822
- this.cancellationDraining === I && (this.cancellationDraining = void 0);
2449
+ const g = Promise.allSettled([A, I]).then(() => {
2450
+ this.cancellationDraining === g && (this.cancellationDraining = void 0);
1823
2451
  });
1824
- return this.cancellationDraining = I, I;
2452
+ return this.cancellationDraining = g, g;
1825
2453
  }
1826
2454
  /** Release idle compiler resources, or defer behind an active guest without stopping it. */
1827
2455
  releaseCompilerResources(A = {}) {
1828
- const g = A.signal;
1829
- return g?.aborted ? Promise.resolve("cancelled") : this.disposed ? Promise.resolve("released") : new Promise((I) => {
1830
- const C = { resolve: I, signal: g, abort: () => this.settleRelease(C, "cancelled") };
1831
- this.releases.add(C), g?.addEventListener("abort", C.abort, { once: !0 }), this.flushReleases();
2456
+ const I = A.signal;
2457
+ return I?.aborted ? Promise.resolve("cancelled") : this.disposed ? Promise.resolve("released") : new Promise((g) => {
2458
+ const C = { resolve: g, signal: I, abort: () => this.settleRelease(C, "cancelled") };
2459
+ this.releases.add(C), I?.addEventListener("abort", C.abort, { once: !0 }), this.flushReleases();
1832
2460
  });
1833
2461
  }
1834
- settleRelease(A, g) {
1835
- this.releases.delete(A) && (A.signal?.removeEventListener("abort", A.abort), A.resolve(g));
2462
+ settleRelease(A, I) {
2463
+ this.releases.delete(A) && (A.signal?.removeEventListener("abort", A.abort), A.resolve(I));
1836
2464
  }
1837
2465
  flushReleases() {
1838
2466
  if (!(this.active || !this.releases.size || this.releaseDrain)) {
@@ -1860,54 +2488,72 @@ class KA {
1860
2488
  /** Load compiler resources. Optional input validation never invokes Clang, links, or runs a guest. */
1861
2489
  prepareCompiler(A) {
1862
2490
  if (A?.validateCacheInputs !== void 0 && typeof A.validateCacheInputs != "boolean")
1863
- return Promise.resolve(L(new TypeError("Invalid compiler preparation options")));
1864
- const g = A?.validateCacheInputs === !0 && this.options?.toolchainProfile === "stock-certified-v1" && !!this.options?.objectCache && this.objects.limits.maxEntries > 0 && this.objects.limits.maxObjectBytes > 0 && this.objects.limits.maxMetadataBytes > 0 && this.objects.limits.maxEntryMetadataBytes > 0;
1865
- return this.submit(!0, !0, g);
2491
+ return Promise.resolve(c(new TypeError("Invalid compiler preparation options")));
2492
+ const I = A?.validateCacheInputs === !0 && this.options?.toolchainProfile === "stock-certified-v1" && !!this.options?.objectCache && this.objects.limits.maxEntries > 0 && this.objects.limits.maxObjectBytes > 0 && this.objects.limits.maxMetadataBytes > 0 && this.objects.limits.maxEntryMetadataBytes > 0;
2493
+ return this.submit(!0, !0, I);
1866
2494
  }
1867
2495
  /** Every Run links current objects and starts a fresh student runtime. */
1868
2496
  run() {
1869
- return this.submit(!1);
2497
+ return this.lang === "python" && this.python?.packages ? this.runWithPackages() : this.submit(!1);
2498
+ }
2499
+ /** Installs what the program imports from PyPI, then runs it with those files mounted. */
2500
+ async runWithPackages() {
2501
+ const A = (g) => {
2502
+ try {
2503
+ this.python?.onPackageStatus?.(g);
2504
+ } catch {
2505
+ }
2506
+ };
2507
+ let I = {};
2508
+ try {
2509
+ const g = oI(this.fs), C = g.join(`
2510
+ `);
2511
+ g.length && this.installed?.key === C ? I = this.installed.files : g.length && (this.installer ??= new MI(), I = await this.installer.install(await this.installer.resolve(g, A), A), this.installed = { key: C, files: I });
2512
+ } catch (g) {
2513
+ A({ kind: "skipped", message: `Packages: ${g instanceof Error ? g.message : String(g)}` });
2514
+ }
2515
+ return this.submit(!1, !1, !1, I);
1870
2516
  }
1871
2517
  /** Compiles Run-profile C++ translation units only; never links, runs, or opens devices. */
1872
2518
  compile() {
1873
2519
  return this.submit(!0);
1874
2520
  }
1875
- submit(A, g = !1, I = !1) {
1876
- if (this.disposed) return Promise.resolve(L(new Error("Engine is disposed")));
2521
+ submit(A, I = !1, g = !1, C = {}) {
2522
+ if (this.disposed) return Promise.resolve(c(new Error("Engine is disposed")));
1877
2523
  if (this.active || this.cancellationDraining)
1878
- return Promise.resolve(L(new Error("An engine job is already active")));
2524
+ return Promise.resolve(c(new Error("An engine job is already active")));
1879
2525
  if (A && this.lang !== "c")
1880
- return Promise.resolve(L(new Error("Compile-only is supported for C/C++")));
2526
+ return Promise.resolve(c(new Error("Compile-only is supported for C/C++")));
1881
2527
  this.cacheValidation = void 0;
1882
- const C = g && !I;
1883
- let B;
2528
+ const B = I && !g;
2529
+ let E;
1884
2530
  try {
1885
- const Y = C || !this.cppArtifacts ? null : { ...this.cppArtifacts };
1886
- if (Y?.cacheCertificate !== void 0) {
1887
- const s = Y.cacheCertificate;
1888
- (typeof s != "string" || s.length > 1024 * 1024 || new TextEncoder().encode(s).byteLength > 1024 * 1024) && delete Y.cacheCertificate;
2531
+ const K = B || !this.cppArtifacts ? null : { ...this.cppArtifacts };
2532
+ if (K?.cacheCertificate !== void 0) {
2533
+ const R = K.cacheCertificate;
2534
+ (typeof R != "string" || R.length > 1024 * 1024 || new TextEncoder().encode(R).byteLength > 1024 * 1024) && delete K.cacheCertificate;
1889
2535
  }
1890
- B = {
1891
- fs: C ? {} : structuredClone(this.fs),
2536
+ E = {
2537
+ fs: B ? {} : structuredClone(this.fs),
1892
2538
  binary_files: Object.fromEntries(
1893
- Object.entries(C ? {} : this.binaryFiles).map(([s, H]) => [
1894
- s,
2539
+ Object.entries(B ? {} : { ...C, ...this.binaryFiles }).map(([R, H]) => [
2540
+ R,
1895
2541
  new Uint8Array(H)
1896
2542
  ])
1897
2543
  ),
1898
- cpp_artifacts: structuredClone(Y)
2544
+ cpp_artifacts: structuredClone(K)
1899
2545
  };
1900
- } catch (Y) {
1901
- return Promise.resolve(L(Y));
2546
+ } catch (K) {
2547
+ return Promise.resolve(c(K));
1902
2548
  }
1903
- const i = !A && this.debugger.enabled, D = A ? void 0 : this.hostDevice;
1904
- if (D !== void 0 && (typeof D != "function" || !["c", "python"].includes(this.lang)))
1905
- return Promise.resolve(L(new TypeError("Invalid host device configuration")));
1906
- clearTimeout(this.idleTimer), this.stdin[J].clear();
1907
- const o = !!this.slot;
1908
- let K;
1909
- const U = new Promise((Y) => {
1910
- K = Y;
2549
+ const D = !A && this.debugger.enabled, w = A ? void 0 : this.hostDevice;
2550
+ if (w !== void 0 && (typeof w != "function" || !["c", "python"].includes(this.lang)))
2551
+ return Promise.resolve(c(new TypeError("Invalid host device configuration")));
2552
+ clearTimeout(this.idleTimer), this.stdin[L].clear();
2553
+ const N = !!this.slot;
2554
+ let k;
2555
+ const U = new Promise((K) => {
2556
+ k = K;
1911
2557
  });
1912
2558
  this.promise = U;
1913
2559
  const h = {
@@ -1915,31 +2561,31 @@ class KA {
1915
2561
  scopeEpoch: this.scopeEpoch,
1916
2562
  operationId: ++this.operationId,
1917
2563
  cacheEpoch: this.generation,
1918
- prepareOnly: g,
1919
- validateCacheInputs: I,
2564
+ prepareOnly: I,
2565
+ validateCacheInputs: g,
1920
2566
  settled: !1,
1921
2567
  buildOnly: A,
1922
- debug: i,
1923
- opener: D,
2568
+ debug: D,
2569
+ opener: w,
1924
2570
  startedAt: performance.now(),
1925
- resolve: K,
2571
+ resolve: k,
1926
2572
  stats: {
1927
- operation: g ? "prepare_compiler" : A ? "compile" : "run",
2573
+ operation: I ? "prepare_compiler" : A ? "compile" : "run",
1928
2574
  workerReadyMs: 0,
1929
- workerReused: o
2575
+ workerReused: N
1930
2576
  },
1931
2577
  start: {
1932
- ...B,
2578
+ ...E,
1933
2579
  lang: this.lang,
1934
- prepare_compiler: g,
1935
- validate_cache_inputs: I,
2580
+ prepare_compiler: I,
2581
+ validate_cache_inputs: g,
1936
2582
  scope_epoch: this.scopeEpoch,
1937
2583
  operation_id: this.operationId,
1938
2584
  cache_epoch: this.generation,
1939
- is_debug: i,
2585
+ is_debug: D,
1940
2586
  build_only: A,
1941
- stdin_buffer: this.stdin[J].buffer,
1942
- cpp_cache: this.options?.objectCache && !i && !g ? {
2587
+ stdin_buffer: this.stdin[L].buffer,
2588
+ cpp_cache: this.options?.objectCache && !D && !I ? {
1943
2589
  generation: this.generation,
1944
2590
  entries: this.objects.snapshot(),
1945
2591
  max_entry_metadata_bytes: Math.min(
@@ -1953,12 +2599,12 @@ class KA {
1953
2599
  this.objects.beginBatch(), this.active = h;
1954
2600
  try {
1955
2601
  if (this.slot || this.makeWorker(), !this.current(h)) return U;
1956
- const Y = this.slot;
1957
- this.lang === "c" && !this.toolchain && this.ensureToolchain().catch((s) => {
1958
- this.current(h) && this.slot === Y && this.finish(h, L(s));
2602
+ const K = this.slot;
2603
+ this.lang === "c" && !this.toolchain && this.ensureToolchain().catch((R) => {
2604
+ this.current(h) && this.slot === K && this.finish(h, c(R));
1959
2605
  }), this.slot.ready && this.dispatch(h);
1960
- } catch (Y) {
1961
- this.finish(h, L(Y));
2606
+ } catch (K) {
2607
+ this.finish(h, c(K));
1962
2608
  }
1963
2609
  return U;
1964
2610
  }
@@ -1966,74 +2612,74 @@ class KA {
1966
2612
  return this.active === A && !A.settled;
1967
2613
  }
1968
2614
  makeWorker() {
1969
- const A = mA(this.wasmUrl), g = { worker: A, ready: !1, remove: () => {
2615
+ const A = gI(this.wasmUrl), I = { worker: A, ready: !1, remove: () => {
1970
2616
  } };
1971
- this.slot = g;
1972
- const I = (i) => {
1973
- if (this.slot !== g) return;
1974
- const D = i.data, o = this.active;
2617
+ this.slot = I;
2618
+ const g = (E) => {
2619
+ if (this.slot !== I) return;
2620
+ const D = E.data, w = this.active;
1975
2621
  if (D.type === "ready") {
1976
- if (g.ready) return;
1977
- g.ready = !0, o && this.current(o) && this.dispatch(o);
2622
+ if (I.ready) return;
2623
+ I.ready = !0, w && this.current(w) && this.dispatch(w);
1978
2624
  return;
1979
2625
  }
1980
- if (!(!o || !this.current(o))) {
1981
- if (!g.ready && D.type === "error") {
1982
- this.finish(o, L(new Error(D.message)));
2626
+ if (!(!w || !this.current(w))) {
2627
+ if (!I.ready && D.type === "error") {
2628
+ this.finish(w, c(new Error(D.message)));
1983
2629
  return;
1984
2630
  }
1985
- if (!(D.operationId !== o.operationId || D.scopeEpoch !== o.scopeEpoch))
2631
+ if (!(D.operationId !== w.operationId || D.scopeEpoch !== w.scopeEpoch))
1986
2632
  try {
1987
2633
  if (D.type === "cpp_cache_eligibility") {
1988
- if (this.options?.toolchainProfile !== "stock-certified-v1" || o.prepareOnly && !o.validateCacheInputs)
2634
+ if (this.options?.toolchainProfile !== "stock-certified-v1" || w.prepareOnly && !w.validateCacheInputs)
1989
2635
  return;
1990
- const K = (h) => typeof h == "string" && /^[0-9a-f]{64}$/.test(h), U = D.eligible === !0 && K(D.certificate_sha256) && K(D.snapshot);
2636
+ const N = (U) => typeof U == "string" && /^[0-9a-f]{64}$/.test(U), k = D.eligible === !0 && N(D.certificate_sha256) && N(D.snapshot);
1991
2637
  this.cacheValidation = {
1992
- eligible: U,
1993
- certificate: K(D.certificate_sha256) ? D.certificate_sha256 : void 0,
1994
- snapshot: U ? D.snapshot : void 0,
1995
- operationId: o.operationId,
1996
- reason: U ? void 0 : typeof D.reason == "string" ? D.reason.slice(0, 128) : "stock-input-validation"
2638
+ eligible: k,
2639
+ certificate: N(D.certificate_sha256) ? D.certificate_sha256 : void 0,
2640
+ snapshot: k ? D.snapshot : void 0,
2641
+ operationId: w.operationId,
2642
+ reason: k ? void 0 : typeof D.reason == "string" ? D.reason.slice(0, 128) : "stock-input-validation"
1997
2643
  };
1998
2644
  } else if (D.type === "stop")
1999
- this.finish(o, {
2645
+ this.finish(w, {
2000
2646
  type: "completed",
2001
2647
  exitCode: D.exit_code,
2002
2648
  timing: {
2003
- totalMs: performance.now() - o.startedAt,
2649
+ totalMs: performance.now() - w.startedAt,
2004
2650
  buildMs: D.build_ms,
2005
2651
  runMs: D.run_ms
2006
2652
  }
2007
2653
  });
2008
2654
  else if (D.type === "error")
2009
- this.finish(o, L(new Error(D.message)));
2010
- else if (D.type === "cpp_cache_object" && D.generation === this.generation && o.generation === this.generation)
2655
+ this.finish(w, c(new Error(D.message)));
2656
+ else if (D.type === "cpp_cache_object" && D.generation === this.generation && w.generation === this.generation)
2011
2657
  try {
2012
2658
  this.objects.stage(D);
2013
2659
  } catch {
2014
2660
  this.objects.abandonBatch();
2015
2661
  }
2016
- else D.type === "cpp_cache_stats" && D.generation === o.generation ? o.stats.cache = D.stats : D.type === "cpp_cache_abandon" ? this.objects.abandonBatch() : D.type === "object_build_complete" ? o.publication ??= this.publishObjects(o, g) : D.type === "compiler_module_stats" && (o.stats.compilerModule = D);
2017
- } catch (K) {
2018
- this.finish(o, L(K));
2662
+ else D.type === "cpp_cache_stats" && D.generation === w.generation ? w.stats.cache = D.stats : D.type === "cpp_cache_abandon" ? this.objects.abandonBatch() : D.type === "object_build_complete" ? w.publication ??= this.publishObjects(w, I) : D.type === "compiler_module_stats" && (w.stats.compilerModule = D);
2663
+ } catch (N) {
2664
+ this.finish(w, c(N));
2019
2665
  }
2020
2666
  }
2021
- }, C = (i) => {
2022
- this.slot === g && (this.clearCaches(), this.active ? this.finish(this.active, L(i.error ?? new Error(i.message))) : this.retireWorker());
2667
+ }, C = (E) => {
2668
+ this.slot === I && (this.clearCaches(), this.active ? this.finish(this.active, c(E.error ?? new Error(E.message))) : this.retireWorker());
2023
2669
  }, B = () => C({ message: "Unreadable execution worker message" });
2024
- this.debugger[J].attach(A), A.addEventListener("message", I), A.addEventListener("error", C), A.addEventListener("messageerror", B), g.remove = () => {
2025
- A.removeEventListener("message", I), A.removeEventListener("error", C), A.removeEventListener("messageerror", B), this.debugger[J].detach(A);
2670
+ this.debugger[L].attach(A), A.addEventListener("message", g), A.addEventListener("error", C), A.addEventListener("messageerror", B), I.remove = () => {
2671
+ A.removeEventListener("message", g), A.removeEventListener("error", C), A.removeEventListener("messageerror", B), this.debugger[L].detach(A);
2026
2672
  };
2027
2673
  }
2028
- async publishObjects(A, g) {
2029
- let I = !1;
2674
+ async publishObjects(A, I) {
2675
+ let g = !1;
2030
2676
  try {
2031
- I = await this.objects.validateBatch();
2677
+ g = await this.objects.validateBatch();
2032
2678
  } catch {
2033
2679
  }
2034
- if (!(!this.current(A) || this.slot !== g)) {
2680
+ if (!(!this.current(A) || this.slot !== I)) {
2035
2681
  try {
2036
- I && A.cacheEpoch === this.generation ? this.objects.commitBatch() : (this.objects.abandonBatch(), this.cacheValidation?.operationId === A.operationId && (this.cacheValidation = {
2682
+ g && A.cacheEpoch === this.generation ? this.objects.commitBatch() : (this.objects.abandonBatch(), this.cacheValidation?.operationId === A.operationId && (this.cacheValidation = {
2037
2683
  ...this.cacheValidation,
2038
2684
  eligible: !1,
2039
2685
  snapshot: void 0,
@@ -2047,7 +2693,7 @@ class KA {
2047
2693
  reason: "stock-publication-failure"
2048
2694
  });
2049
2695
  }
2050
- this.current(A) && g.worker.postMessage({
2696
+ this.current(A) && I.worker.postMessage({
2051
2697
  type: "object_build_ack",
2052
2698
  scopeEpoch: A.scopeEpoch,
2053
2699
  operationId: A.operationId,
@@ -2059,11 +2705,11 @@ class KA {
2059
2705
  if (this.toolchain) return Promise.resolve(this.toolchain);
2060
2706
  if (this.toolchainLoading) return this.toolchainLoading;
2061
2707
  this.toolchainController = new AbortController();
2062
- const A = l.load(
2063
- EA("c"),
2708
+ const A = X.load(
2709
+ FA("c"),
2064
2710
  this.cacheCompilerModule,
2065
2711
  this.toolchainController.signal,
2066
- SA(),
2712
+ jA(),
2067
2713
  this.options?.toolchainProfile
2068
2714
  );
2069
2715
  return this.toolchainLoading = A, this.initializing.add(A), A.then(
@@ -2074,14 +2720,14 @@ class KA {
2074
2720
  ), A;
2075
2721
  }
2076
2722
  async dispatch(A) {
2077
- const g = this.slot;
2078
- if (!(!this.current(A) || !g))
2723
+ const I = this.slot;
2724
+ if (!(!this.current(A) || !I))
2079
2725
  try {
2080
2726
  if (this.lang === "c") {
2081
- const B = this.scopeEpoch, i = this.generation, D = this.ensureToolchain(), o = this.toolchain ?? await D;
2082
- if (!this.current(A) || this.slot !== g || B !== this.scopeEpoch) return;
2083
- const K = A.start.cpp_artifacts?.requiredToolchain;
2084
- if (K && !o.matchesExpectation(K)) {
2727
+ const B = this.scopeEpoch, E = this.generation, D = this.ensureToolchain(), w = this.toolchain ?? await D;
2728
+ if (!this.current(A) || this.slot !== I || B !== this.scopeEpoch) return;
2729
+ const N = A.start.cpp_artifacts?.requiredToolchain;
2730
+ if (N && !w.matchesExpectation(N)) {
2085
2731
  this.finish(A, {
2086
2732
  type: "error",
2087
2733
  error: {
@@ -2091,69 +2737,69 @@ class KA {
2091
2737
  });
2092
2738
  return;
2093
2739
  }
2094
- i === this.generation && (this.toolchainIdentity && this.toolchainIdentity !== o.identity && (this.objects.clear(), A.start.cpp_cache = null), this.toolchain !== o && (this.toolchainIngestions++, this.toolchainHashCount += o.hashCount, this.toolchainHashMs += o.hashMs), this.toolchainIdentity = o.identity, this.toolchain = o, this.toolchainLoading === D && (this.toolchainLoading = void 0)), g.toolchain !== o && (this.compilerModuleCloned = o.configure(g.worker, {
2740
+ E === this.generation && (this.toolchainIdentity && this.toolchainIdentity !== w.identity && (this.objects.clear(), A.start.cpp_cache = null), this.toolchain !== w && (this.toolchainIngestions++, this.toolchainHashCount += w.hashCount, this.toolchainHashMs += w.hashMs), this.toolchainIdentity = w.identity, this.toolchain = w, this.toolchainLoading === D && (this.toolchainLoading = void 0)), I.toolchain !== w && (this.compilerModuleCloned = w.configure(I.worker, {
2095
2741
  type: "configure_cpp",
2096
2742
  cacheCompilerModule: this.cacheCompilerModule
2097
- }), g.toolchain = o);
2743
+ }), I.toolchain = w);
2098
2744
  }
2099
- if (!this.current(A) || this.slot !== g) return;
2100
- const I = g.worker;
2745
+ if (!this.current(A) || this.slot !== I) return;
2746
+ const g = I.worker;
2101
2747
  A.stats.workerReadyMs = performance.now() - A.startedAt;
2102
2748
  const C = (B) => this.current(A) && B.scopeEpoch === A.scopeEpoch && B.operationId === A.operationId;
2103
- if (this.stdout[J].attach(I, C), this.stderr[J].attach(I, C), A.prepareOnly || this.debugger[J].beginRun(), A.opener) {
2104
- if (A.device = new PA((B) => this.finish(A, L(B))), A.device.attach(I), A.device.open(A.opener), !this.current(A)) return;
2749
+ if (this.stdout[L].attach(g, C), this.stderr[L].attach(g, C), A.prepareOnly || this.debugger[L].beginRun(), A.opener) {
2750
+ if (A.device = new CI((B) => this.finish(A, c(B))), A.device.attach(g), A.device.open(A.opener), !this.current(A)) return;
2105
2751
  A.start.host_device = A.device.workerStart;
2106
2752
  }
2107
- this.current(A) && (I.postMessage(A.start), A.start.fs = {}, A.start.binary_files = {}, A.start.cpp_artifacts = null, A.start.cpp_cache = null);
2108
- } catch (I) {
2109
- this.current(A) && (this.toolchainLoading = void 0, this.finish(A, L(I)));
2753
+ this.current(A) && (g.postMessage(A.start), A.start.fs = {}, A.start.binary_files = {}, A.start.cpp_artifacts = null, A.start.cpp_cache = null);
2754
+ } catch (g) {
2755
+ this.current(A) && (this.toolchainLoading = void 0, this.finish(A, c(g)));
2110
2756
  }
2111
2757
  }
2112
- finish(A, g) {
2758
+ finish(A, I) {
2113
2759
  if (!this.current(A)) return;
2114
- (g.type !== "completed" || g.exitCode !== 0) && (this.cacheValidation = void 0), A.settled = !0;
2115
- const I = this.slot?.worker;
2116
- I && (this.stdout[J].detach(I), this.stderr[J].detach(I));
2760
+ (I.type !== "completed" || I.exitCode !== 0) && (this.cacheValidation = void 0), A.settled = !0;
2761
+ const g = this.slot?.worker;
2762
+ g && (this.stdout[L].detach(g), this.stderr[L].detach(g));
2117
2763
  const C = A.device?.close();
2118
- C && (g = L(C));
2119
- const B = g.type === "completed" && A.generation === this.generation && !this.disposed, i = B && g.type === "completed" && g.exitCode === 0;
2764
+ C && (I = c(C));
2765
+ const B = I.type === "completed" && A.generation === this.generation && !this.disposed, E = B && I.type === "completed" && I.exitCode === 0;
2120
2766
  if (A.generation === this.generation)
2121
2767
  for (const D of A.stats.cache?.invalid_sources ?? []) this.objects.delete(D);
2122
- if (i)
2768
+ if (E)
2123
2769
  for (const D of A.stats.cache?.hit_sources ?? []) this.objects.touch(D);
2124
- this.objects.discardBatch(), this.latest = A.stats, this.stdin[J].clear(), (!B || !this.retain) && this.retireWorker(), !this.disposed && A.cacheEpoch === this.generation && (this.slot || this.toolchain && this.cacheCompilerModule) && this.options?.compilerLifetime !== "project" && (this.idleTimer = setTimeout(() => {
2770
+ this.objects.discardBatch(), this.latest = A.stats, this.stdin[L].clear(), (!B || !this.retain) && this.retireWorker(), !this.disposed && A.cacheEpoch === this.generation && (this.slot || this.toolchain && this.cacheCompilerModule) && this.options?.compilerLifetime !== "project" && (this.idleTimer = setTimeout(() => {
2125
2771
  this.retireWorker(), this.toolchain = void 0, this.toolchainLoading = void 0;
2126
- }, this.idleTimeoutMs)), !this.retain && !this.cacheCompilerModule && (this.toolchain = void 0), A.cacheEpoch !== this.generation && (this.toolchainController?.abort(), this.toolchainLoading = void 0), this.active = void 0, this.promise = void 0, this.flushReleases(), A.resolve(g);
2772
+ }, this.idleTimeoutMs)), !this.retain && !this.cacheCompilerModule && (this.toolchain = void 0), A.cacheEpoch !== this.generation && (this.toolchainController?.abort(), this.toolchainLoading = void 0), this.active = void 0, this.promise = void 0, this.flushReleases(), A.resolve(I);
2127
2773
  }
2128
2774
  retireWorker() {
2129
2775
  clearTimeout(this.idleTimer);
2130
2776
  const A = this.slot;
2131
- A && (this.slot = void 0, A.remove(), this.stdout[J].detach(A.worker), this.stderr[J].detach(A.worker), A.worker.onerror = (g) => g.preventDefault(), A.worker.terminate(), this.retirements++);
2777
+ A && (this.slot = void 0, A.remove(), this.stdout[L].detach(A.worker), this.stderr[L].detach(A.worker), A.worker.onerror = (I) => I.preventDefault(), A.worker.terminate(), this.retirements++);
2132
2778
  }
2133
2779
  }
2134
- class FA extends GA {
2780
+ class LA extends sA {
2135
2781
  constructor(A) {
2136
- super(), this.mode = A, this.callback = ((g) => {
2137
- const I = g.data;
2138
- if (this.accepts && !this.accepts(I) || I.type !== "stdout" || I.mode !== this.mode) return;
2139
- const C = I.data;
2782
+ super(), this.mode = A, this.callback = ((I) => {
2783
+ const g = I.data;
2784
+ if (this.accepts && !this.accepts(g) || g.type !== "stdout" || g.mode !== this.mode) return;
2785
+ const C = g.data;
2140
2786
  this.emit("data", C);
2141
- }).bind(this), this[J] = {
2787
+ }).bind(this), this[L] = {
2142
2788
  attach: this.attach.bind(this),
2143
2789
  detach: this.detach.bind(this)
2144
2790
  };
2145
2791
  }
2146
2792
  callback;
2147
2793
  accepts;
2148
- [J];
2149
- attach(A, g) {
2150
- this.accepts = g, A.addEventListener("message", this.callback);
2794
+ [L];
2795
+ attach(A, I) {
2796
+ this.accepts = I, A.addEventListener("message", this.callback);
2151
2797
  }
2152
2798
  detach(A) {
2153
2799
  A.removeEventListener("message", this.callback);
2154
2800
  }
2155
2801
  }
2156
- class q {
2802
+ class O {
2157
2803
  /**
2158
2804
  * Ring buffer to store stdin data.
2159
2805
  *
@@ -2163,19 +2809,19 @@ class q {
2163
2809
  static BUFFER_SIZE = 2048;
2164
2810
  static HEADER_SIZE = 8;
2165
2811
  // 2 x i32
2166
- static DATA_SIZE = q.BUFFER_SIZE - q.HEADER_SIZE;
2812
+ static DATA_SIZE = O.BUFFER_SIZE - O.HEADER_SIZE;
2167
2813
  static READ_IDX = 0;
2168
2814
  static WRITE_IDX = 1;
2169
2815
  static encoder = new TextEncoder();
2170
- buffer = new SharedArrayBuffer(q.BUFFER_SIZE);
2816
+ buffer = new SharedArrayBuffer(O.BUFFER_SIZE);
2171
2817
  generation = 0;
2172
2818
  indices;
2173
2819
  data;
2174
- [J];
2820
+ [L];
2175
2821
  constructor() {
2176
- this.indices = new Int32Array(this.buffer, 0, 2), this.data = new Int8Array(this.buffer, q.HEADER_SIZE);
2822
+ this.indices = new Int32Array(this.buffer, 0, 2), this.data = new Int8Array(this.buffer, O.HEADER_SIZE);
2177
2823
  const A = () => this.buffer;
2178
- this[J] = {
2824
+ this[L] = {
2179
2825
  clear: this.clear.bind(this),
2180
2826
  get buffer() {
2181
2827
  return A();
@@ -2183,35 +2829,35 @@ class q {
2183
2829
  };
2184
2830
  }
2185
2831
  clear() {
2186
- this.generation++, Atomics.notify(this.indices, q.READ_IDX), this.buffer = new SharedArrayBuffer(q.BUFFER_SIZE), this.indices = new Int32Array(this.buffer, 0, 2), this.data = new Int8Array(this.buffer, q.HEADER_SIZE);
2832
+ this.generation++, Atomics.notify(this.indices, O.READ_IDX), this.buffer = new SharedArrayBuffer(O.BUFFER_SIZE), this.indices = new Int32Array(this.buffer, 0, 2), this.data = new Int8Array(this.buffer, O.HEADER_SIZE);
2187
2833
  }
2188
2834
  async write(A) {
2189
- const g = typeof A == "string" ? q.encoder.encode(A) : A;
2190
- return this.writeBytes(g);
2835
+ const I = typeof A == "string" ? O.encoder.encode(A) : A;
2836
+ return this.writeBytes(I);
2191
2837
  }
2192
2838
  async writeBytes(A) {
2193
- const { DATA_SIZE: g, READ_IDX: I, WRITE_IDX: C } = q;
2839
+ const { DATA_SIZE: I, READ_IDX: g, WRITE_IDX: C } = O;
2194
2840
  let B = 0;
2195
- const i = this.generation;
2196
- for (; B < A.length && i === this.generation; ) {
2197
- const D = Atomics.load(this.indices, I);
2198
- let o = Atomics.load(this.indices, C);
2199
- o === g - 1 && D > 0 && (o = 0);
2200
- const K = D <= o ? g - o - 1 : D - o - 1;
2201
- if (K === 0) {
2202
- await Atomics.waitAsync(this.indices, I, D).value;
2841
+ const E = this.generation;
2842
+ for (; B < A.length && E === this.generation; ) {
2843
+ const D = Atomics.load(this.indices, g);
2844
+ let w = Atomics.load(this.indices, C);
2845
+ w === I - 1 && D > 0 && (w = 0);
2846
+ const N = D <= w ? I - w - 1 : D - w - 1;
2847
+ if (N === 0) {
2848
+ await Atomics.waitAsync(this.indices, g, D).value;
2203
2849
  continue;
2204
2850
  }
2205
- const U = Math.min(A.length - B, K);
2206
- this.data.set(A.subarray(B, B + U), o), Atomics.store(this.indices, C, (o + U) % g), Atomics.notify(this.indices, C), B += U;
2851
+ const k = Math.min(A.length - B, N);
2852
+ this.data.set(A.subarray(B, B + k), w), Atomics.store(this.indices, C, (w + k) % I), Atomics.notify(this.indices, C), B += k;
2207
2853
  }
2208
2854
  }
2209
2855
  }
2210
2856
  export {
2211
- zA as Artifact,
2212
- fA as Debugger,
2213
- KA as Engine,
2214
- nA as HOST_DEVICE_PATH,
2215
- q as Stdin,
2216
- FA as Stdout
2857
+ eA as Artifact,
2858
+ _A as Debugger,
2859
+ HA as Engine,
2860
+ RI as HOST_DEVICE_PATH,
2861
+ O as Stdin,
2862
+ LA as Stdout
2217
2863
  };