@webpodjs/net-worker 0.0.0-stage → 0.1.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/README.md +175 -2
- package/dist/abi/index.js +3 -0
- package/dist/abi/ring.js +317 -0
- package/dist/pkg/webpod_net_wasm.d.ts +134 -0
- package/dist/pkg/webpod_net_wasm.js +1075 -0
- package/dist/pkg/webpod_net_wasm_bg.wasm +0 -0
- package/dist/pkg/webpod_net_wasm_bg.wasm.d.ts +33 -0
- package/dist/worker.js +211 -0
- package/package.json +32 -4
|
@@ -0,0 +1,1075 @@
|
|
|
1
|
+
/* @ts-self-types="./webpod_net_wasm.d.ts" */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* One guest NIC's network: gateway stack, egress and inbound bridge.
|
|
5
|
+
*/
|
|
6
|
+
export class NetPod {
|
|
7
|
+
__destroy_into_raw() {
|
|
8
|
+
const ptr = this.__wbg_ptr;
|
|
9
|
+
this.__wbg_ptr = 0;
|
|
10
|
+
NetPodFinalization.unregister(this);
|
|
11
|
+
return ptr;
|
|
12
|
+
}
|
|
13
|
+
free() {
|
|
14
|
+
const ptr = this.__destroy_into_raw();
|
|
15
|
+
wasm.__wbg_netpod_free(ptr, 0);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Another pod on the page LAN: its guest is `hostname` at its LAN index's address.
|
|
19
|
+
* @param {number} id
|
|
20
|
+
* @param {string} hostname
|
|
21
|
+
* @param {number} index
|
|
22
|
+
*/
|
|
23
|
+
add_peer(id, hostname, index) {
|
|
24
|
+
const val2 = +id;
|
|
25
|
+
const val3 = +index;
|
|
26
|
+
const ptr0 = passStringToWasm0(hostname, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
27
|
+
const len0 = WASM_VECTOR_LEN;
|
|
28
|
+
wasm.netpod_add_peer(this.__wbg_ptr, val2, ptr0, len0, val3);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Certificate and private key, for the Worker to persist (never handed to the page).
|
|
32
|
+
* @returns {string}
|
|
33
|
+
*/
|
|
34
|
+
ca_bundle() {
|
|
35
|
+
let deferred1_0;
|
|
36
|
+
let deferred1_1;
|
|
37
|
+
try {
|
|
38
|
+
const ret = wasm.netpod_ca_bundle(this.__wbg_ptr);
|
|
39
|
+
deferred1_0 = ret[0];
|
|
40
|
+
deferred1_1 = ret[1];
|
|
41
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
42
|
+
} finally {
|
|
43
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The pod CA certificate (PEM) to install in the guest's trust stores.
|
|
48
|
+
* @returns {string}
|
|
49
|
+
*/
|
|
50
|
+
ca_certificate() {
|
|
51
|
+
let deferred1_0;
|
|
52
|
+
let deferred1_1;
|
|
53
|
+
try {
|
|
54
|
+
const ret = wasm.netpod_ca_certificate(this.__wbg_ptr);
|
|
55
|
+
deferred1_0 = ret[0];
|
|
56
|
+
deferred1_1 = ret[1];
|
|
57
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
58
|
+
} finally {
|
|
59
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Milliseconds until the stack wants to be polled again (-1: no timer).
|
|
64
|
+
* @param {number} now_ms
|
|
65
|
+
* @returns {number}
|
|
66
|
+
*/
|
|
67
|
+
delay(now_ms) {
|
|
68
|
+
const ret = wasm.netpod_delay(this.__wbg_ptr, now_ms);
|
|
69
|
+
return ret;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* `network`: `{ mode?: "browser" | "none", mtu?, corsProxy?: { url, token? }, relay?: { url,
|
|
73
|
+
* token? }, routes?: [{ host?, ports?: [lo, hi], protocol?, via, stripHeaders? }] }` (see
|
|
74
|
+
* packages/net-worker/README.md). `ca_bundle`: a previously exported CA (PEM, certificate and
|
|
75
|
+
* key) or empty to generate one. `get_token`: called for relay tokens when `relay.token` is
|
|
76
|
+
* absent (returns a string or a Promise). `unix_secs`: wall clock (wasm has none).
|
|
77
|
+
* @param {any} network
|
|
78
|
+
* @param {string} ca_bundle
|
|
79
|
+
* @param {Function | null | undefined} get_token
|
|
80
|
+
* @param {number} unix_secs
|
|
81
|
+
*/
|
|
82
|
+
constructor(network, ca_bundle, get_token, unix_secs) {
|
|
83
|
+
const val2 = +unix_secs;
|
|
84
|
+
const ptr0 = passStringToWasm0(ca_bundle, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
85
|
+
const len0 = WASM_VECTOR_LEN;
|
|
86
|
+
const ret = wasm.netpod_new(network, ptr0, len0, isLikeNone(get_token) ? 0 : addToExternrefTable0(get_token), val2);
|
|
87
|
+
if (ret[2]) {
|
|
88
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
89
|
+
}
|
|
90
|
+
this.__wbg_ptr = ret[0];
|
|
91
|
+
NetPodFinalization.register(this, this.__wbg_ptr, this);
|
|
92
|
+
return this;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* A page connection (preview, pod.fetch, pod.net.connect).
|
|
96
|
+
* @param {MessagePort} port
|
|
97
|
+
*/
|
|
98
|
+
open_inbound(port) {
|
|
99
|
+
wasm.netpod_open_inbound(this.__wbg_ptr, port);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Run the stack; returns whether anything happened (frames in or out, completions, page
|
|
103
|
+
* commands), in which case the Worker should poll again right away.
|
|
104
|
+
* @param {number} now_ms
|
|
105
|
+
* @returns {boolean}
|
|
106
|
+
*/
|
|
107
|
+
poll(now_ms) {
|
|
108
|
+
const ret = wasm.netpod_poll(this.__wbg_ptr, now_ms);
|
|
109
|
+
return ret !== 0;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* An Ethernet frame from the guest.
|
|
113
|
+
* @param {Uint8Array | number[]} frame
|
|
114
|
+
*/
|
|
115
|
+
push(frame) {
|
|
116
|
+
const ptr0 = passArray8ToWasm0(frame, wasm.__wbindgen_malloc);
|
|
117
|
+
const len0 = WASM_VECTOR_LEN;
|
|
118
|
+
wasm.netpod_push(this.__wbg_ptr, ptr0, len0);
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* A frame a peer forwarded for this guest.
|
|
122
|
+
* @param {Uint8Array | number[]} frame
|
|
123
|
+
* @returns {boolean}
|
|
124
|
+
*/
|
|
125
|
+
push_forwarded(frame) {
|
|
126
|
+
const ptr0 = passArray8ToWasm0(frame, wasm.__wbindgen_malloc);
|
|
127
|
+
const len0 = WASM_VECTOR_LEN;
|
|
128
|
+
const ret = wasm.netpod_push_forwarded(this.__wbg_ptr, ptr0, len0);
|
|
129
|
+
return ret !== 0;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* @param {number} id
|
|
133
|
+
*/
|
|
134
|
+
remove_peer(id) {
|
|
135
|
+
wasm.netpod_remove_peer(this.__wbg_ptr, id);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Called (at most once per batch) when egress completions or page commands arrive.
|
|
139
|
+
* @param {Function | null} [f]
|
|
140
|
+
*/
|
|
141
|
+
set_notify(f) {
|
|
142
|
+
wasm.netpod_set_notify(this.__wbg_ptr, isLikeNone(f) ? 0 : addToExternrefTable0(f));
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* @param {number} secs
|
|
146
|
+
*/
|
|
147
|
+
set_unix_time(secs) {
|
|
148
|
+
wasm.netpod_set_unix_time(this.__wbg_ptr, secs);
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Gauges for leak and load checks: the stack's, the egress's, page connections, queued
|
|
152
|
+
* frames and the wasm memory size (bytes).
|
|
153
|
+
* @returns {any}
|
|
154
|
+
*/
|
|
155
|
+
stats() {
|
|
156
|
+
const ret = wasm.netpod_stats(this.__wbg_ptr);
|
|
157
|
+
return ret;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Frames for the guest produced by the last polls.
|
|
161
|
+
* @returns {Array<any>}
|
|
162
|
+
*/
|
|
163
|
+
take() {
|
|
164
|
+
const ret = wasm.netpod_take(this.__wbg_ptr);
|
|
165
|
+
return ret;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Guest frames for peers: `[[peerId, Uint8Array], ...]`, to post to their Workers.
|
|
169
|
+
* @returns {Array<any>}
|
|
170
|
+
*/
|
|
171
|
+
take_forwarded() {
|
|
172
|
+
const ret = wasm.netpod_take_forwarded(this.__wbg_ptr);
|
|
173
|
+
return ret;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
if (Symbol.dispose) NetPod.prototype[Symbol.dispose] = NetPod.prototype.free;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Sends log records at `level` (`"error"`, `"warn"`, `"info"`, `"debug"`; default warn) and
|
|
180
|
+
* above to `f(level, text)`.
|
|
181
|
+
* @param {Function} f
|
|
182
|
+
* @param {string | null} [level]
|
|
183
|
+
*/
|
|
184
|
+
export function set_logger(f, level) {
|
|
185
|
+
var ptr0 = isLikeNone(level) ? 0 : passStringToWasm0(level, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
186
|
+
var len0 = WASM_VECTOR_LEN;
|
|
187
|
+
wasm.set_logger(f, ptr0, len0);
|
|
188
|
+
}
|
|
189
|
+
function __wbg_get_imports() {
|
|
190
|
+
const import0 = {
|
|
191
|
+
__proto__: null,
|
|
192
|
+
__wbg___wbindgen_boolean_get_4f1baf9a00be3c74: function(arg0) {
|
|
193
|
+
const v = arg0;
|
|
194
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
195
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
196
|
+
},
|
|
197
|
+
__wbg___wbindgen_debug_string_f249a2a76caa9a55: function(arg0, arg1) {
|
|
198
|
+
const ret = debugString(arg1);
|
|
199
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
200
|
+
const len1 = WASM_VECTOR_LEN;
|
|
201
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
|
|
202
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
|
|
203
|
+
},
|
|
204
|
+
__wbg___wbindgen_is_function_741ff2bb612836f5: function(arg0) {
|
|
205
|
+
const ret = typeof(arg0) === 'function';
|
|
206
|
+
return ret;
|
|
207
|
+
},
|
|
208
|
+
__wbg___wbindgen_is_null_c22311b1cc228e3a: function(arg0) {
|
|
209
|
+
const ret = arg0 === null;
|
|
210
|
+
return ret;
|
|
211
|
+
},
|
|
212
|
+
__wbg___wbindgen_is_object_8b968c3ab8e96595: function(arg0) {
|
|
213
|
+
const val = arg0;
|
|
214
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
215
|
+
return ret;
|
|
216
|
+
},
|
|
217
|
+
__wbg___wbindgen_is_string_fc456fee5d3317de: function(arg0) {
|
|
218
|
+
const ret = typeof(arg0) === 'string';
|
|
219
|
+
return ret;
|
|
220
|
+
},
|
|
221
|
+
__wbg___wbindgen_is_undefined_be5b34249ff1fc15: function(arg0) {
|
|
222
|
+
const ret = arg0 === undefined;
|
|
223
|
+
return ret;
|
|
224
|
+
},
|
|
225
|
+
__wbg___wbindgen_memory_17a1178bc3328ea3: function() {
|
|
226
|
+
const ret = wasm.memory;
|
|
227
|
+
return ret;
|
|
228
|
+
},
|
|
229
|
+
__wbg___wbindgen_number_get_934b640d0889af78: function(arg0, arg1) {
|
|
230
|
+
const obj = arg1;
|
|
231
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
232
|
+
getDataViewMemory0().setFloat64((arg0 >>> 0) + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
233
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, !isLikeNone(ret), true);
|
|
234
|
+
},
|
|
235
|
+
__wbg___wbindgen_string_get_7ce8eee7fd327545: function(arg0, arg1) {
|
|
236
|
+
const obj = arg1;
|
|
237
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
238
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
239
|
+
var len1 = WASM_VECTOR_LEN;
|
|
240
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
|
|
241
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
|
|
242
|
+
},
|
|
243
|
+
__wbg___wbindgen_throw_4c88d8bf264fd984: function(arg0, arg1) {
|
|
244
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
245
|
+
},
|
|
246
|
+
__wbg__wbg_cb_unref_09736879a3f67559: function(arg0) {
|
|
247
|
+
arg0._wbg_cb_unref();
|
|
248
|
+
},
|
|
249
|
+
__wbg_abort_f8d1589eb0c65ee2: function(arg0) {
|
|
250
|
+
arg0.abort();
|
|
251
|
+
},
|
|
252
|
+
__wbg_append_ba9a4dc30a0323fd: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
253
|
+
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
254
|
+
}, arguments); },
|
|
255
|
+
__wbg_body_0da01a9a056907d8: function(arg0) {
|
|
256
|
+
const ret = arg0.body;
|
|
257
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
258
|
+
},
|
|
259
|
+
__wbg_buffer_0eaa216bac6b8749: function(arg0) {
|
|
260
|
+
const ret = arg0.buffer;
|
|
261
|
+
return ret;
|
|
262
|
+
},
|
|
263
|
+
__wbg_buffer_aca05a93c046db1a: function(arg0) {
|
|
264
|
+
const ret = arg0.buffer;
|
|
265
|
+
return ret;
|
|
266
|
+
},
|
|
267
|
+
__wbg_byteLength_fa48f24814f5ef46: function(arg0) {
|
|
268
|
+
const ret = arg0.byteLength;
|
|
269
|
+
return ret;
|
|
270
|
+
},
|
|
271
|
+
__wbg_call_40b008ba32f73991: function() { return handleError(function (arg0, arg1) {
|
|
272
|
+
const ret = arg0.call(arg1);
|
|
273
|
+
return ret;
|
|
274
|
+
}, arguments); },
|
|
275
|
+
__wbg_call_a410eb4b59ed5965: function() { return handleError(function (arg0, arg1, arg2) {
|
|
276
|
+
const ret = arg0.call(arg1, arg2);
|
|
277
|
+
return ret;
|
|
278
|
+
}, arguments); },
|
|
279
|
+
__wbg_call_fc92fee6137d452d: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
280
|
+
const ret = arg0.call(arg1, arg2, arg3);
|
|
281
|
+
return ret;
|
|
282
|
+
}, arguments); },
|
|
283
|
+
__wbg_cancel_b195250778e9d8e7: function(arg0) {
|
|
284
|
+
const ret = arg0.cancel();
|
|
285
|
+
return ret;
|
|
286
|
+
},
|
|
287
|
+
__wbg_close_294d3f727cb7a844: function() { return handleError(function (arg0) {
|
|
288
|
+
arg0.close();
|
|
289
|
+
}, arguments); },
|
|
290
|
+
__wbg_close_2a8b1ba07b9e0fee: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
291
|
+
arg0.close(arg1, getStringFromWasm0(arg2, arg3));
|
|
292
|
+
}, arguments); },
|
|
293
|
+
__wbg_close_5ee9c5fe4e8754a4: function() { return handleError(function (arg0) {
|
|
294
|
+
arg0.close();
|
|
295
|
+
}, arguments); },
|
|
296
|
+
__wbg_close_ba88eb9a9b3180c7: function(arg0) {
|
|
297
|
+
arg0.close();
|
|
298
|
+
},
|
|
299
|
+
__wbg_code_3e6881d821eab2c4: function(arg0) {
|
|
300
|
+
const ret = arg0.code;
|
|
301
|
+
return ret;
|
|
302
|
+
},
|
|
303
|
+
__wbg_crypto_23f565a907d30078: function(arg0) {
|
|
304
|
+
const ret = arg0.crypto;
|
|
305
|
+
return ret;
|
|
306
|
+
},
|
|
307
|
+
__wbg_data_c7e5e8500f1bca2f: function(arg0) {
|
|
308
|
+
const ret = arg0.data;
|
|
309
|
+
return ret;
|
|
310
|
+
},
|
|
311
|
+
__wbg_defineProperty_a5a9526e5e4e6fd7: function(arg0, arg1, arg2) {
|
|
312
|
+
const ret = Object.defineProperty(arg0, arg1, arg2);
|
|
313
|
+
return ret;
|
|
314
|
+
},
|
|
315
|
+
__wbg_done_57e08d0be6e30c02: function(arg0) {
|
|
316
|
+
const ret = arg0.done;
|
|
317
|
+
return ret;
|
|
318
|
+
},
|
|
319
|
+
__wbg_enqueue_c11626eae1c54509: function() { return handleError(function (arg0, arg1) {
|
|
320
|
+
arg0.enqueue(arg1);
|
|
321
|
+
}, arguments); },
|
|
322
|
+
__wbg_from_eac91875c8a5ffa4: function(arg0) {
|
|
323
|
+
const ret = Array.from(arg0);
|
|
324
|
+
return ret;
|
|
325
|
+
},
|
|
326
|
+
__wbg_getRandomValues_d2908e0b99612b91: function() { return handleError(function (arg0, arg1) {
|
|
327
|
+
arg0.getRandomValues(arg1);
|
|
328
|
+
}, arguments); },
|
|
329
|
+
__wbg_getReader_fadcafe607253a67: function(arg0) {
|
|
330
|
+
const ret = arg0.getReader();
|
|
331
|
+
return ret;
|
|
332
|
+
},
|
|
333
|
+
__wbg_get_2080c49015e35254: function() { return handleError(function (arg0, arg1) {
|
|
334
|
+
const ret = Reflect.get(arg0, arg1);
|
|
335
|
+
return ret;
|
|
336
|
+
}, arguments); },
|
|
337
|
+
__wbg_get_556f1c9a5c587e8c: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
338
|
+
const ret = arg1.get(getStringFromWasm0(arg2, arg3));
|
|
339
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
340
|
+
var len1 = WASM_VECTOR_LEN;
|
|
341
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
|
|
342
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
|
|
343
|
+
}, arguments); },
|
|
344
|
+
__wbg_get_635eea311fa1a291: function() { return handleError(function (arg0, arg1) {
|
|
345
|
+
const ret = Reflect.get(arg0, arg1);
|
|
346
|
+
return ret;
|
|
347
|
+
}, arguments); },
|
|
348
|
+
__wbg_get_d7176cfb76d71114: function(arg0, arg1) {
|
|
349
|
+
const ret = arg0[arg1 >>> 0];
|
|
350
|
+
return ret;
|
|
351
|
+
},
|
|
352
|
+
__wbg_get_unchecked_e6325ad374eff861: function(arg0, arg1) {
|
|
353
|
+
const ret = arg0[arg1 >>> 0];
|
|
354
|
+
return ret;
|
|
355
|
+
},
|
|
356
|
+
__wbg_has_4893849f7bfec3df: function() { return handleError(function (arg0, arg1, arg2) {
|
|
357
|
+
const ret = arg0.has(getStringFromWasm0(arg1, arg2));
|
|
358
|
+
return ret;
|
|
359
|
+
}, arguments); },
|
|
360
|
+
__wbg_headers_5fc0106c076eb731: function(arg0) {
|
|
361
|
+
const ret = arg0.headers;
|
|
362
|
+
return ret;
|
|
363
|
+
},
|
|
364
|
+
__wbg_headers_9ef80dd266706f48: function(arg0) {
|
|
365
|
+
const ret = arg0.headers;
|
|
366
|
+
return ret;
|
|
367
|
+
},
|
|
368
|
+
__wbg_instanceof_CloseEvent_6202f4fa271aaafc: function(arg0) {
|
|
369
|
+
let result;
|
|
370
|
+
try {
|
|
371
|
+
result = arg0 instanceof CloseEvent;
|
|
372
|
+
} catch (_) {
|
|
373
|
+
result = false;
|
|
374
|
+
}
|
|
375
|
+
const ret = result;
|
|
376
|
+
return ret;
|
|
377
|
+
},
|
|
378
|
+
__wbg_instanceof_MessageEvent_7f71d71db210f737: function(arg0) {
|
|
379
|
+
let result;
|
|
380
|
+
try {
|
|
381
|
+
result = arg0 instanceof MessageEvent;
|
|
382
|
+
} catch (_) {
|
|
383
|
+
result = false;
|
|
384
|
+
}
|
|
385
|
+
const ret = result;
|
|
386
|
+
return ret;
|
|
387
|
+
},
|
|
388
|
+
__wbg_instanceof_Promise_59148c6049d0e3a0: function(arg0) {
|
|
389
|
+
let result;
|
|
390
|
+
try {
|
|
391
|
+
result = arg0 instanceof Promise;
|
|
392
|
+
} catch (_) {
|
|
393
|
+
result = false;
|
|
394
|
+
}
|
|
395
|
+
const ret = result;
|
|
396
|
+
return ret;
|
|
397
|
+
},
|
|
398
|
+
__wbg_isArray_bcf1376d0d732d08: function(arg0) {
|
|
399
|
+
const ret = Array.isArray(arg0);
|
|
400
|
+
return ret;
|
|
401
|
+
},
|
|
402
|
+
__wbg_iterator_e4c5e8f68ada7b58: function() {
|
|
403
|
+
const ret = Symbol.iterator;
|
|
404
|
+
return ret;
|
|
405
|
+
},
|
|
406
|
+
__wbg_length_186163212ffe79c3: function(arg0) {
|
|
407
|
+
const ret = arg0.length;
|
|
408
|
+
return ret;
|
|
409
|
+
},
|
|
410
|
+
__wbg_length_b03a0fabb109b1e9: function(arg0) {
|
|
411
|
+
const ret = arg0.length;
|
|
412
|
+
return ret;
|
|
413
|
+
},
|
|
414
|
+
__wbg_msCrypto_d5f06fad6bf1409b: function(arg0) {
|
|
415
|
+
const ret = arg0.msCrypto;
|
|
416
|
+
return ret;
|
|
417
|
+
},
|
|
418
|
+
__wbg_new_13de428334042d26: function(arg0) {
|
|
419
|
+
const ret = new Uint8Array(arg0);
|
|
420
|
+
return ret;
|
|
421
|
+
},
|
|
422
|
+
__wbg_new_277c27c26f94cbc2: function() { return handleError(function () {
|
|
423
|
+
const ret = new Headers();
|
|
424
|
+
return ret;
|
|
425
|
+
}, arguments); },
|
|
426
|
+
__wbg_new_37eb45aaf5eeb820: function() {
|
|
427
|
+
const ret = new Array();
|
|
428
|
+
return ret;
|
|
429
|
+
},
|
|
430
|
+
__wbg_new_5f28518387ad0e34: function() { return handleError(function () {
|
|
431
|
+
const ret = new AbortController();
|
|
432
|
+
return ret;
|
|
433
|
+
}, arguments); },
|
|
434
|
+
__wbg_new_97dce49aefb4de92: function() { return handleError(function () {
|
|
435
|
+
const ret = new ReadableStream();
|
|
436
|
+
return ret;
|
|
437
|
+
}, arguments); },
|
|
438
|
+
__wbg_new_cd4348290afae586: function() {
|
|
439
|
+
const ret = new Object();
|
|
440
|
+
return ret;
|
|
441
|
+
},
|
|
442
|
+
__wbg_new_from_slice_b8daf545a41c6aa0: function(arg0, arg1) {
|
|
443
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
444
|
+
return ret;
|
|
445
|
+
},
|
|
446
|
+
__wbg_new_with_length_01b143a7e5dd5a3e: function(arg0) {
|
|
447
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
448
|
+
return ret;
|
|
449
|
+
},
|
|
450
|
+
__wbg_new_with_str_4c87e2a5ba925021: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
451
|
+
const ret = new WebSocket(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
|
|
452
|
+
return ret;
|
|
453
|
+
}, arguments); },
|
|
454
|
+
__wbg_new_with_str_and_init_d9f6b5611184e16b: function() { return handleError(function (arg0, arg1, arg2) {
|
|
455
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
456
|
+
return ret;
|
|
457
|
+
}, arguments); },
|
|
458
|
+
__wbg_new_with_str_sequence_75b26d88172889d0: function() { return handleError(function (arg0, arg1, arg2) {
|
|
459
|
+
const ret = new WebSocket(getStringFromWasm0(arg0, arg1), arg2);
|
|
460
|
+
return ret;
|
|
461
|
+
}, arguments); },
|
|
462
|
+
__wbg_new_with_u8_array_sequence_9cda61cd48ab1b97: function() { return handleError(function (arg0) {
|
|
463
|
+
const ret = new Blob(arg0);
|
|
464
|
+
return ret;
|
|
465
|
+
}, arguments); },
|
|
466
|
+
__wbg_new_with_underlying_source_773c33d935d90014: function() { return handleError(function (arg0) {
|
|
467
|
+
const ret = new ReadableStream(arg0);
|
|
468
|
+
return ret;
|
|
469
|
+
}, arguments); },
|
|
470
|
+
__wbg_next_178c1651c11432b3: function(arg0) {
|
|
471
|
+
const ret = arg0.next;
|
|
472
|
+
return ret;
|
|
473
|
+
},
|
|
474
|
+
__wbg_next_af5ac6a08bb0a717: function() { return handleError(function (arg0) {
|
|
475
|
+
const ret = arg0.next();
|
|
476
|
+
return ret;
|
|
477
|
+
}, arguments); },
|
|
478
|
+
__wbg_node_86166ff8ce1f2002: function(arg0) {
|
|
479
|
+
const ret = arg0.node;
|
|
480
|
+
return ret;
|
|
481
|
+
},
|
|
482
|
+
__wbg_of_027eb15371aac932: function(arg0) {
|
|
483
|
+
const ret = Array.of(arg0);
|
|
484
|
+
return ret;
|
|
485
|
+
},
|
|
486
|
+
__wbg_of_e7ea0fcd535c1444: function(arg0, arg1) {
|
|
487
|
+
const ret = Array.of(arg0, arg1);
|
|
488
|
+
return ret;
|
|
489
|
+
},
|
|
490
|
+
__wbg_parse_c3f72b5a24f83c01: function() { return handleError(function (arg0, arg1) {
|
|
491
|
+
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
492
|
+
return ret;
|
|
493
|
+
}, arguments); },
|
|
494
|
+
__wbg_postMessage_53810840ac0d2b79: function() { return handleError(function (arg0, arg1, arg2) {
|
|
495
|
+
arg0.postMessage(arg1, arg2);
|
|
496
|
+
}, arguments); },
|
|
497
|
+
__wbg_postMessage_56704f0f0cc1999c: function() { return handleError(function (arg0, arg1) {
|
|
498
|
+
arg0.postMessage(arg1);
|
|
499
|
+
}, arguments); },
|
|
500
|
+
__wbg_process_91f425a63f58e399: function(arg0) {
|
|
501
|
+
const ret = arg0.process;
|
|
502
|
+
return ret;
|
|
503
|
+
},
|
|
504
|
+
__wbg_protocol_2ecd96d73c042808: function(arg0, arg1) {
|
|
505
|
+
const ret = arg1.protocol;
|
|
506
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
507
|
+
const len1 = WASM_VECTOR_LEN;
|
|
508
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
|
|
509
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
|
|
510
|
+
},
|
|
511
|
+
__wbg_prototypesetcall_13162965d1fe7aa3: function(arg0, arg1, arg2) {
|
|
512
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
513
|
+
},
|
|
514
|
+
__wbg_push_c9f4893fc209f768: function(arg0, arg1) {
|
|
515
|
+
const ret = arg0.push(arg1);
|
|
516
|
+
return ret;
|
|
517
|
+
},
|
|
518
|
+
__wbg_queueMicrotask_1e8503a8a690f0a3: function(arg0) {
|
|
519
|
+
const ret = arg0.queueMicrotask;
|
|
520
|
+
return ret;
|
|
521
|
+
},
|
|
522
|
+
__wbg_queueMicrotask_4a1a4d8dd332373b: function(arg0) {
|
|
523
|
+
queueMicrotask(arg0);
|
|
524
|
+
},
|
|
525
|
+
__wbg_randomFillSync_34b023059e3363de: function() { return handleError(function (arg0, arg1) {
|
|
526
|
+
arg0.randomFillSync(arg1);
|
|
527
|
+
}, arguments); },
|
|
528
|
+
__wbg_read_e3bea75dace70752: function(arg0) {
|
|
529
|
+
const ret = arg0.read();
|
|
530
|
+
return ret;
|
|
531
|
+
},
|
|
532
|
+
__wbg_reason_34b16516ab3f72d4: function(arg0, arg1) {
|
|
533
|
+
const ret = arg1.reason;
|
|
534
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
535
|
+
const len1 = WASM_VECTOR_LEN;
|
|
536
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
|
|
537
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
|
|
538
|
+
},
|
|
539
|
+
__wbg_redirected_f6975756fc89c2ab: function(arg0) {
|
|
540
|
+
const ret = arg0.redirected;
|
|
541
|
+
return ret;
|
|
542
|
+
},
|
|
543
|
+
__wbg_require_9a7d8cc2e1d275c0: function() { return handleError(function () {
|
|
544
|
+
const ret = module.require;
|
|
545
|
+
return ret;
|
|
546
|
+
}, arguments); },
|
|
547
|
+
__wbg_resolve_dbf78ab4942478b0: function(arg0) {
|
|
548
|
+
const ret = Promise.resolve(arg0);
|
|
549
|
+
return ret;
|
|
550
|
+
},
|
|
551
|
+
__wbg_send_cd51063ca1be4d0f: function() { return handleError(function (arg0, arg1, arg2) {
|
|
552
|
+
arg0.send(getStringFromWasm0(arg1, arg2));
|
|
553
|
+
}, arguments); },
|
|
554
|
+
__wbg_send_d83d0891cf698779: function() { return handleError(function (arg0, arg1, arg2) {
|
|
555
|
+
arg0.send(getArrayU8FromWasm0(arg1, arg2));
|
|
556
|
+
}, arguments); },
|
|
557
|
+
__wbg_set_2793479888329cb6: function() { return handleError(function (arg0, arg1, arg2) {
|
|
558
|
+
const ret = Reflect.set(arg0, arg1, arg2);
|
|
559
|
+
return ret;
|
|
560
|
+
}, arguments); },
|
|
561
|
+
__wbg_set_binaryType_d5b4dafd0f127fb2: function(arg0, arg1) {
|
|
562
|
+
arg0.binaryType = __wbindgen_enum_BinaryType[arg1];
|
|
563
|
+
},
|
|
564
|
+
__wbg_set_body_877d5251e78ca815: function(arg0, arg1) {
|
|
565
|
+
arg0.body = arg1;
|
|
566
|
+
},
|
|
567
|
+
__wbg_set_cache_7a23201e29cbd632: function(arg0, arg1) {
|
|
568
|
+
arg0.cache = __wbindgen_enum_RequestCache[arg1];
|
|
569
|
+
},
|
|
570
|
+
__wbg_set_credentials_bb5277b4006149d4: function(arg0, arg1) {
|
|
571
|
+
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
572
|
+
},
|
|
573
|
+
__wbg_set_headers_6d75a7df4eb22716: function(arg0, arg1) {
|
|
574
|
+
arg0.headers = arg1;
|
|
575
|
+
},
|
|
576
|
+
__wbg_set_method_639e69af35614d36: function(arg0, arg1, arg2) {
|
|
577
|
+
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
578
|
+
},
|
|
579
|
+
__wbg_set_mode_07e051ad8b4e2126: function(arg0, arg1) {
|
|
580
|
+
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
581
|
+
},
|
|
582
|
+
__wbg_set_onclose_078935cf8d0fb024: function(arg0, arg1) {
|
|
583
|
+
arg0.onclose = arg1;
|
|
584
|
+
},
|
|
585
|
+
__wbg_set_onmessage_26abc49cfa5f9ffc: function(arg0, arg1) {
|
|
586
|
+
arg0.onmessage = arg1;
|
|
587
|
+
},
|
|
588
|
+
__wbg_set_onmessage_5e09c5c5df17fb8b: function(arg0, arg1) {
|
|
589
|
+
arg0.onmessage = arg1;
|
|
590
|
+
},
|
|
591
|
+
__wbg_set_onopen_757be120cc7b1ea6: function(arg0, arg1) {
|
|
592
|
+
arg0.onopen = arg1;
|
|
593
|
+
},
|
|
594
|
+
__wbg_set_redirect_a95a432ab7d10765: function(arg0, arg1) {
|
|
595
|
+
arg0.redirect = __wbindgen_enum_RequestRedirect[arg1];
|
|
596
|
+
},
|
|
597
|
+
__wbg_set_referrer_413a47ffe5e2e157: function(arg0, arg1, arg2) {
|
|
598
|
+
arg0.referrer = getStringFromWasm0(arg1, arg2);
|
|
599
|
+
},
|
|
600
|
+
__wbg_set_referrer_policy_f3e837a21403cf06: function(arg0, arg1) {
|
|
601
|
+
arg0.referrerPolicy = __wbindgen_enum_ReferrerPolicy[arg1];
|
|
602
|
+
},
|
|
603
|
+
__wbg_set_signal_0b2eee78907e5ba7: function(arg0, arg1) {
|
|
604
|
+
arg0.signal = arg1;
|
|
605
|
+
},
|
|
606
|
+
__wbg_signal_fac908876f45725d: function(arg0) {
|
|
607
|
+
const ret = arg0.signal;
|
|
608
|
+
return ret;
|
|
609
|
+
},
|
|
610
|
+
__wbg_start_519d7e0585a678a1: function(arg0) {
|
|
611
|
+
arg0.start();
|
|
612
|
+
},
|
|
613
|
+
__wbg_static_accessor_GLOBAL_THIS_003ee833af9699fc: function() {
|
|
614
|
+
const ret = typeof globalThis === 'undefined' ? undefined : globalThis;
|
|
615
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
616
|
+
},
|
|
617
|
+
__wbg_static_accessor_GLOBAL_e4293fb22cbe77da: function() {
|
|
618
|
+
const ret = typeof global === 'undefined' ? undefined : global;
|
|
619
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
620
|
+
},
|
|
621
|
+
__wbg_static_accessor_SELF_53bb20457401453d: function() {
|
|
622
|
+
const ret = typeof self === 'undefined' ? undefined : self;
|
|
623
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
624
|
+
},
|
|
625
|
+
__wbg_static_accessor_WINDOW_b5e0810bfecb7feb: function() {
|
|
626
|
+
const ret = typeof window === 'undefined' ? undefined : window;
|
|
627
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
628
|
+
},
|
|
629
|
+
__wbg_statusText_f5d9635edef1913e: function(arg0, arg1) {
|
|
630
|
+
const ret = arg1.statusText;
|
|
631
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
632
|
+
const len1 = WASM_VECTOR_LEN;
|
|
633
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
|
|
634
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
|
|
635
|
+
},
|
|
636
|
+
__wbg_status_cb85b6c8d1769fa1: function(arg0) {
|
|
637
|
+
const ret = arg0.status;
|
|
638
|
+
return ret;
|
|
639
|
+
},
|
|
640
|
+
__wbg_stringify_0a0fbf2ef722380a: function() { return handleError(function (arg0) {
|
|
641
|
+
const ret = JSON.stringify(arg0);
|
|
642
|
+
return ret;
|
|
643
|
+
}, arguments); },
|
|
644
|
+
__wbg_subarray_58f388a9247ac0bb: function(arg0, arg1, arg2) {
|
|
645
|
+
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
646
|
+
return ret;
|
|
647
|
+
},
|
|
648
|
+
__wbg_text_5240eb2c41de8292: function() { return handleError(function (arg0) {
|
|
649
|
+
const ret = arg0.text();
|
|
650
|
+
return ret;
|
|
651
|
+
}, arguments); },
|
|
652
|
+
__wbg_then_656f253a5dd7d8ea: function(arg0, arg1, arg2) {
|
|
653
|
+
const ret = arg0.then(arg1, arg2);
|
|
654
|
+
return ret;
|
|
655
|
+
},
|
|
656
|
+
__wbg_then_e3f7f2d365708be8: function(arg0, arg1) {
|
|
657
|
+
const ret = arg0.then(arg1);
|
|
658
|
+
return ret;
|
|
659
|
+
},
|
|
660
|
+
__wbg_url_9fadea28ec624f1d: function(arg0, arg1) {
|
|
661
|
+
const ret = arg1.url;
|
|
662
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
663
|
+
const len1 = WASM_VECTOR_LEN;
|
|
664
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
|
|
665
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
|
|
666
|
+
},
|
|
667
|
+
__wbg_value_e0f328965e184931: function(arg0) {
|
|
668
|
+
const ret = arg0.value;
|
|
669
|
+
return ret;
|
|
670
|
+
},
|
|
671
|
+
__wbg_versions_6e128a981b0df859: function(arg0) {
|
|
672
|
+
const ret = arg0.versions;
|
|
673
|
+
return ret;
|
|
674
|
+
},
|
|
675
|
+
__wbindgen_generic_0000000000000001: function(arg0, arg1) {
|
|
676
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 39, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
677
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_5a2380350bab5903___convert__closures_____invoke___wasm_bindgen_5a2380350bab5903___JsValue______true_);
|
|
678
|
+
return ret;
|
|
679
|
+
},
|
|
680
|
+
__wbindgen_generic_0000000000000002: function(arg0, arg1) {
|
|
681
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 806, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
682
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_5a2380350bab5903___convert__closures_____invoke___wasm_bindgen_5a2380350bab5903___JsValue__core_6a51abefd5362b2___result__Result_____wasm_bindgen_5a2380350bab5903___JsError___true_);
|
|
683
|
+
return ret;
|
|
684
|
+
},
|
|
685
|
+
__wbindgen_generic_0000000000000003: function(arg0, arg1) {
|
|
686
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 41, ret: Externref, inner_ret: Some(Externref) }, mutable: true }) -> Externref`.
|
|
687
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_5a2380350bab5903___convert__closures_____invoke___wasm_bindgen_5a2380350bab5903___JsValue__true_);
|
|
688
|
+
return ret;
|
|
689
|
+
},
|
|
690
|
+
__wbindgen_generic_0000000000000004: function(arg0) {
|
|
691
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
692
|
+
const ret = arg0;
|
|
693
|
+
return ret;
|
|
694
|
+
},
|
|
695
|
+
__wbindgen_generic_0000000000000005: function(arg0, arg1) {
|
|
696
|
+
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
697
|
+
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
698
|
+
return ret;
|
|
699
|
+
},
|
|
700
|
+
__wbindgen_generic_0000000000000006: function(arg0, arg1) {
|
|
701
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
702
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
703
|
+
return ret;
|
|
704
|
+
},
|
|
705
|
+
__wbindgen_init_externref_table: function() {
|
|
706
|
+
const table = wasm.__wbindgen_externrefs;
|
|
707
|
+
table.set(0, undefined);
|
|
708
|
+
table.set(1024, undefined);
|
|
709
|
+
table.set(1025, null);
|
|
710
|
+
table.set(1026, true);
|
|
711
|
+
table.set(1027, false);
|
|
712
|
+
},
|
|
713
|
+
};
|
|
714
|
+
return {
|
|
715
|
+
__proto__: null,
|
|
716
|
+
"./webpod_net_wasm_bg.js": import0,
|
|
717
|
+
};
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
function wasm_bindgen_5a2380350bab5903___convert__closures_____invoke___wasm_bindgen_5a2380350bab5903___JsValue__true_(arg0, arg1) {
|
|
721
|
+
const ret = wasm.wasm_bindgen_5a2380350bab5903___convert__closures_____invoke___wasm_bindgen_5a2380350bab5903___JsValue__true_(arg0, arg1);
|
|
722
|
+
return ret;
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
function wasm_bindgen_5a2380350bab5903___convert__closures_____invoke___wasm_bindgen_5a2380350bab5903___JsValue______true_(arg0, arg1, arg2) {
|
|
726
|
+
wasm.wasm_bindgen_5a2380350bab5903___convert__closures_____invoke___wasm_bindgen_5a2380350bab5903___JsValue______true_(arg0, arg1, arg2);
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
function wasm_bindgen_5a2380350bab5903___convert__closures_____invoke___wasm_bindgen_5a2380350bab5903___JsValue__core_6a51abefd5362b2___result__Result_____wasm_bindgen_5a2380350bab5903___JsError___true_(arg0, arg1, arg2) {
|
|
730
|
+
const ret = wasm.wasm_bindgen_5a2380350bab5903___convert__closures_____invoke___wasm_bindgen_5a2380350bab5903___JsValue__core_6a51abefd5362b2___result__Result_____wasm_bindgen_5a2380350bab5903___JsError___true_(arg0, arg1, arg2);
|
|
731
|
+
if (ret[1]) {
|
|
732
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
|
|
737
|
+
const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
|
|
738
|
+
|
|
739
|
+
|
|
740
|
+
const __wbindgen_enum_ReferrerPolicy = ["", "no-referrer", "no-referrer-when-downgrade", "origin", "origin-when-cross-origin", "unsafe-url", "same-origin", "strict-origin", "strict-origin-when-cross-origin"];
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
750
|
+
|
|
751
|
+
|
|
752
|
+
const __wbindgen_enum_RequestRedirect = ["follow", "error", "manual"];
|
|
753
|
+
const NetPodFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
754
|
+
? { register: () => {}, unregister: () => {} }
|
|
755
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_netpod_free(ptr, 1));
|
|
756
|
+
|
|
757
|
+
function addToExternrefTable0(obj) {
|
|
758
|
+
const idx = wasm.__externref_table_alloc();
|
|
759
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
760
|
+
return idx;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
764
|
+
? { register: () => {}, unregister: () => {} }
|
|
765
|
+
: new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
|
|
766
|
+
|
|
767
|
+
function debugString(val) {
|
|
768
|
+
switch (typeof val) {
|
|
769
|
+
// primitive types
|
|
770
|
+
case 'number':
|
|
771
|
+
case 'boolean':
|
|
772
|
+
case 'undefined':
|
|
773
|
+
return `${val}`;
|
|
774
|
+
case 'string':
|
|
775
|
+
return JSON.stringify(val);
|
|
776
|
+
case 'bigint':
|
|
777
|
+
return `${val}n`;
|
|
778
|
+
case 'symbol':
|
|
779
|
+
return val.description !== undefined
|
|
780
|
+
? `Symbol(${val.description})`
|
|
781
|
+
: 'Symbol';
|
|
782
|
+
case 'function':
|
|
783
|
+
return typeof val.name === 'string' && val.name !== ''
|
|
784
|
+
? `Function(${val.name})`
|
|
785
|
+
: 'Function';
|
|
786
|
+
case 'object': {
|
|
787
|
+
if (val === null) {
|
|
788
|
+
return 'null';
|
|
789
|
+
}
|
|
790
|
+
// objects
|
|
791
|
+
if (Array.isArray(val)) {
|
|
792
|
+
return '[' + Array.from(val, debugString).join(', ') + ']';
|
|
793
|
+
}
|
|
794
|
+
// errors
|
|
795
|
+
if (val instanceof Error) {
|
|
796
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
const toStringOutput = toString.call(val);
|
|
800
|
+
// Test for built-in
|
|
801
|
+
const className = /\[object ([^\]]+)\]/.exec(toStringOutput)?.[1];
|
|
802
|
+
|
|
803
|
+
// Failed to match the standard '[object ClassName]'
|
|
804
|
+
if (className === undefined) {
|
|
805
|
+
return toStringOutput;
|
|
806
|
+
}
|
|
807
|
+
if (className === 'Object') {
|
|
808
|
+
// we're a user defined class or Object
|
|
809
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
810
|
+
// easier than looping through ownProperties of `val`.
|
|
811
|
+
try {
|
|
812
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
813
|
+
} catch (_) {
|
|
814
|
+
return 'Object';
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
818
|
+
return className;
|
|
819
|
+
}
|
|
820
|
+
// Per MDN: 'This list of values is exhaustive.'
|
|
821
|
+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof#description
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
826
|
+
ptr = ptr >>> 0;
|
|
827
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
let cachedDataViewMemory0 = null;
|
|
831
|
+
function getDataViewMemory0() {
|
|
832
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
833
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
834
|
+
}
|
|
835
|
+
return cachedDataViewMemory0;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
function getStringFromWasm0(ptr, len) {
|
|
839
|
+
ptr = ptr >>> 0;
|
|
840
|
+
return decodeText(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
let cachedUint8ArrayMemory0 = null;
|
|
844
|
+
function getUint8ArrayMemory0() {
|
|
845
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
846
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
847
|
+
}
|
|
848
|
+
return cachedUint8ArrayMemory0;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
function handleError(f, args) {
|
|
852
|
+
try {
|
|
853
|
+
return f.apply(this, args);
|
|
854
|
+
} catch (e) {
|
|
855
|
+
const idx = addToExternrefTable0(e);
|
|
856
|
+
wasm.__wbindgen_exn_store(idx);
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
function isLikeNone(x) {
|
|
861
|
+
return x === undefined || x === null;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
function makeMutClosure(arg0, arg1, f) {
|
|
865
|
+
const state = { a: arg0, b: arg1, cnt: 1 };
|
|
866
|
+
const real = (...args) => {
|
|
867
|
+
|
|
868
|
+
// First up with a closure we increment the internal reference
|
|
869
|
+
// count. This ensures that the Rust closure environment won't
|
|
870
|
+
// be deallocated while we're invoking it.
|
|
871
|
+
state.cnt++;
|
|
872
|
+
const a = state.a;
|
|
873
|
+
state.a = 0;
|
|
874
|
+
try {
|
|
875
|
+
return f(a, state.b, ...args);
|
|
876
|
+
} finally {
|
|
877
|
+
state.a = a;
|
|
878
|
+
real._wbg_cb_unref();
|
|
879
|
+
}
|
|
880
|
+
};
|
|
881
|
+
real._wbg_cb_unref = () => {
|
|
882
|
+
if (--state.cnt === 0) {
|
|
883
|
+
wasm.__wbindgen_destroy_closure(state.a, state.b);
|
|
884
|
+
state.a = 0;
|
|
885
|
+
CLOSURE_DTORS.unregister(state);
|
|
886
|
+
}
|
|
887
|
+
};
|
|
888
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
889
|
+
return real;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
893
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
894
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
895
|
+
WASM_VECTOR_LEN = arg.length;
|
|
896
|
+
return ptr;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
900
|
+
if (realloc === undefined) {
|
|
901
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
902
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
903
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
904
|
+
WASM_VECTOR_LEN = buf.length;
|
|
905
|
+
return ptr;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
let len = arg.length;
|
|
909
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
910
|
+
|
|
911
|
+
const mem = getUint8ArrayMemory0();
|
|
912
|
+
|
|
913
|
+
let offset = 0;
|
|
914
|
+
|
|
915
|
+
for (; offset < len; offset++) {
|
|
916
|
+
const code = arg.charCodeAt(offset);
|
|
917
|
+
if (code > 0x7F) break;
|
|
918
|
+
mem[ptr + offset] = code;
|
|
919
|
+
}
|
|
920
|
+
if (offset !== len) {
|
|
921
|
+
if (offset !== 0) {
|
|
922
|
+
arg = arg.slice(offset);
|
|
923
|
+
}
|
|
924
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
925
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
926
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
927
|
+
|
|
928
|
+
offset += ret.written;
|
|
929
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
WASM_VECTOR_LEN = offset;
|
|
933
|
+
return ptr;
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
function takeFromExternrefTable0(idx) {
|
|
937
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
938
|
+
wasm.__externref_table_dealloc(idx);
|
|
939
|
+
return value;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
|
|
943
|
+
cachedTextDecoder.decode();
|
|
944
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
945
|
+
let numBytesDecoded = 0;
|
|
946
|
+
function decodeText(bytes) {
|
|
947
|
+
numBytesDecoded += bytes.length;
|
|
948
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
949
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
|
|
950
|
+
cachedTextDecoder.decode();
|
|
951
|
+
numBytesDecoded = bytes.length;
|
|
952
|
+
}
|
|
953
|
+
return cachedTextDecoder.decode(bytes);
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
const cachedTextEncoder = new TextEncoder();
|
|
957
|
+
|
|
958
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
959
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
960
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
961
|
+
view.set(buf);
|
|
962
|
+
return {
|
|
963
|
+
read: arg.length,
|
|
964
|
+
written: buf.length
|
|
965
|
+
};
|
|
966
|
+
};
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
let WASM_VECTOR_LEN = 0;
|
|
970
|
+
|
|
971
|
+
let wasmModule, wasmInstance, wasm;
|
|
972
|
+
function __wbg_finalize_init(instance, module) {
|
|
973
|
+
wasmInstance = instance;
|
|
974
|
+
wasm = instance.exports;
|
|
975
|
+
wasmModule = module;
|
|
976
|
+
cachedDataViewMemory0 = null;
|
|
977
|
+
cachedUint8ArrayMemory0 = null;
|
|
978
|
+
wasm.__wbindgen_start();
|
|
979
|
+
return wasm;
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
async function __wbg_load(module, imports) {
|
|
983
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
984
|
+
if (!module.ok) {
|
|
985
|
+
throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
989
|
+
try {
|
|
990
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
991
|
+
} catch (e) {
|
|
992
|
+
const validResponse = expectedResponseType(module.type);
|
|
993
|
+
|
|
994
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
995
|
+
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", e);
|
|
996
|
+
|
|
997
|
+
} else { throw e; }
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
const bytes = await module.arrayBuffer();
|
|
1002
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
1003
|
+
} else {
|
|
1004
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
1005
|
+
|
|
1006
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
1007
|
+
return { instance, module };
|
|
1008
|
+
} else {
|
|
1009
|
+
return instance;
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
function expectedResponseType(type) {
|
|
1014
|
+
switch (type) {
|
|
1015
|
+
case 'basic': case 'cors': case 'default': return true;
|
|
1016
|
+
}
|
|
1017
|
+
return false;
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
function initSync(module) {
|
|
1022
|
+
if (wasm !== undefined) return wasm;
|
|
1023
|
+
|
|
1024
|
+
|
|
1025
|
+
if (module !== undefined) {
|
|
1026
|
+
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
1027
|
+
({module} = module)
|
|
1028
|
+
} else {
|
|
1029
|
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
const imports = __wbg_get_imports();
|
|
1034
|
+
if (!(module instanceof WebAssembly.Module)) {
|
|
1035
|
+
module = new WebAssembly.Module(module);
|
|
1036
|
+
}
|
|
1037
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
1038
|
+
return __wbg_finalize_init(instance, module);
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
let __wbg_init_promise;
|
|
1042
|
+
async function __wbg_init(module_or_path) {
|
|
1043
|
+
if (wasm !== undefined) return wasm;
|
|
1044
|
+
if (__wbg_init_promise === undefined) {
|
|
1045
|
+
__wbg_init_promise = __wbg_init_once(module_or_path);
|
|
1046
|
+
__wbg_init_promise.catch(() => { __wbg_init_promise = undefined; });
|
|
1047
|
+
}
|
|
1048
|
+
return __wbg_init_promise;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
async function __wbg_init_once(module_or_path) {
|
|
1052
|
+
|
|
1053
|
+
if (module_or_path !== undefined) {
|
|
1054
|
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
1055
|
+
({module_or_path} = module_or_path)
|
|
1056
|
+
} else {
|
|
1057
|
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
if (module_or_path === undefined) {
|
|
1062
|
+
module_or_path = new URL('webpod_net_wasm_bg.wasm', import.meta.url);
|
|
1063
|
+
}
|
|
1064
|
+
const imports = __wbg_get_imports();
|
|
1065
|
+
|
|
1066
|
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
1067
|
+
module_or_path = fetch(module_or_path);
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
1071
|
+
|
|
1072
|
+
return __wbg_finalize_init(instance, module);
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
export { initSync, __wbg_init as default };
|