@netlify/plugin-nextjs 5.9.0 → 5.9.2
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/build/content/prerendered.js +2 -2
- package/dist/build/content/static.js +2 -2
- package/dist/build/functions/edge.js +1 -1
- package/dist/esm-chunks/{chunk-BFYMHE3E.js → chunk-HGXG447M.js} +13 -0
- package/dist/esm-chunks/chunk-LVXJQ2G2.js +147 -0
- package/dist/esm-chunks/{chunk-KBX7SJLC.js → chunk-NEZW7TGG.js} +1 -1
- package/dist/esm-chunks/{next-4L47PQSM.js → next-H2VMRX5P.js} +2 -4
- package/dist/esm-chunks/{package-LCNINN36.js → package-36IBNZ37.js} +2 -2
- package/dist/index.js +4 -4
- package/dist/run/handlers/cache.cjs +251 -139
- package/dist/run/handlers/request-context.cjs +88 -63
- package/dist/run/handlers/server.js +4 -4
- package/dist/run/handlers/tracer.cjs +88 -57
- package/dist/run/handlers/tracing.js +2 -2
- package/dist/run/handlers/wait-until.cjs +88 -57
- package/dist/run/next.cjs +88 -59
- package/edge-runtime/lib/middleware.ts +1 -1
- package/edge-runtime/lib/response.ts +5 -2
- package/edge-runtime/vendor/deno.land/x/htmlrewriter@v1.0.0/pkg/htmlrewriter.js +1218 -0
- package/edge-runtime/vendor/deno.land/x/htmlrewriter@v1.0.0/pkg/htmlrewriter_bg.wasm +0 -0
- package/edge-runtime/vendor/deno.land/x/htmlrewriter@v1.0.0/src/index.ts +80 -0
- package/edge-runtime/vendor/deno.land/x/{html_rewriter@v0.1.0-pre.17/vendor/html_rewriter.d.ts → htmlrewriter@v1.0.0/src/types.d.ts} +8 -25
- package/edge-runtime/vendor/import_map.json +0 -2
- package/edge-runtime/vendor.ts +1 -1
- package/package.json +1 -1
- package/dist/esm-chunks/chunk-NDSDIXRD.js +0 -122
- package/edge-runtime/vendor/deno.land/std@0.134.0/fmt/colors.ts +0 -536
- package/edge-runtime/vendor/deno.land/std@0.134.0/testing/_diff.ts +0 -360
- package/edge-runtime/vendor/deno.land/std@0.134.0/testing/asserts.ts +0 -866
- package/edge-runtime/vendor/deno.land/x/html_rewriter@v0.1.0-pre.17/index.ts +0 -133
- package/edge-runtime/vendor/deno.land/x/html_rewriter@v0.1.0-pre.17/vendor/asyncify.js +0 -112
- package/edge-runtime/vendor/deno.land/x/html_rewriter@v0.1.0-pre.17/vendor/html_rewriter.js +0 -974
- package/edge-runtime/vendor/raw.githubusercontent.com/worker-tools/resolvable-promise/master/index.ts +0 -50
- package/dist/esm-chunks/{chunk-BVYZSEV6.js → chunk-J4D25YDX.js} +3 -3
- package/dist/esm-chunks/{chunk-HWMLYAVP.js → chunk-NTLBFRPA.js} +3 -3
|
@@ -1,974 +0,0 @@
|
|
|
1
|
-
import { awaitPromise, setWasmExports, wrap } from './asyncify.js';
|
|
2
|
-
|
|
3
|
-
let wasm;
|
|
4
|
-
|
|
5
|
-
const heap = new Array(32).fill(undefined);
|
|
6
|
-
|
|
7
|
-
heap.push(undefined, null, true, false);
|
|
8
|
-
|
|
9
|
-
function getObject(idx) { return heap[idx]; }
|
|
10
|
-
|
|
11
|
-
let heap_next = heap.length;
|
|
12
|
-
|
|
13
|
-
function dropObject(idx) {
|
|
14
|
-
if (idx < 36) return;
|
|
15
|
-
heap[idx] = heap_next;
|
|
16
|
-
heap_next = idx;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function takeObject(idx) {
|
|
20
|
-
const ret = getObject(idx);
|
|
21
|
-
dropObject(idx);
|
|
22
|
-
return ret;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
26
|
-
|
|
27
|
-
cachedTextDecoder.decode();
|
|
28
|
-
|
|
29
|
-
let cachegetUint8Memory0 = null;
|
|
30
|
-
function getUint8Memory0() {
|
|
31
|
-
if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {
|
|
32
|
-
cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
33
|
-
}
|
|
34
|
-
return cachegetUint8Memory0;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function getStringFromWasm0(ptr, len) {
|
|
38
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function addHeapObject(obj) {
|
|
42
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
43
|
-
const idx = heap_next;
|
|
44
|
-
heap_next = heap[idx];
|
|
45
|
-
|
|
46
|
-
heap[idx] = obj;
|
|
47
|
-
return idx;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function debugString(val) {
|
|
51
|
-
// primitive types
|
|
52
|
-
const type = typeof val;
|
|
53
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
|
54
|
-
return `${val}`;
|
|
55
|
-
}
|
|
56
|
-
if (type == 'string') {
|
|
57
|
-
return `"${val}"`;
|
|
58
|
-
}
|
|
59
|
-
if (type == 'symbol') {
|
|
60
|
-
const description = val.description;
|
|
61
|
-
if (description == null) {
|
|
62
|
-
return 'Symbol';
|
|
63
|
-
} else {
|
|
64
|
-
return `Symbol(${description})`;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
if (type == 'function') {
|
|
68
|
-
const name = val.name;
|
|
69
|
-
if (typeof name == 'string' && name.length > 0) {
|
|
70
|
-
return `Function(${name})`;
|
|
71
|
-
} else {
|
|
72
|
-
return 'Function';
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
// objects
|
|
76
|
-
if (Array.isArray(val)) {
|
|
77
|
-
const length = val.length;
|
|
78
|
-
let debug = '[';
|
|
79
|
-
if (length > 0) {
|
|
80
|
-
debug += debugString(val[0]);
|
|
81
|
-
}
|
|
82
|
-
for(let i = 1; i < length; i++) {
|
|
83
|
-
debug += ', ' + debugString(val[i]);
|
|
84
|
-
}
|
|
85
|
-
debug += ']';
|
|
86
|
-
return debug;
|
|
87
|
-
}
|
|
88
|
-
// Test for built-in
|
|
89
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
90
|
-
let className;
|
|
91
|
-
if (builtInMatches.length > 1) {
|
|
92
|
-
className = builtInMatches[1];
|
|
93
|
-
} else {
|
|
94
|
-
// Failed to match the standard '[object ClassName]'
|
|
95
|
-
return toString.call(val);
|
|
96
|
-
}
|
|
97
|
-
if (className == 'Object') {
|
|
98
|
-
// we're a user defined class or Object
|
|
99
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
100
|
-
// easier than looping through ownProperties of `val`.
|
|
101
|
-
try {
|
|
102
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
103
|
-
} catch (_) {
|
|
104
|
-
return 'Object';
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
// errors
|
|
108
|
-
if (val instanceof Error) {
|
|
109
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
110
|
-
}
|
|
111
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
112
|
-
return className;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
let WASM_VECTOR_LEN = 0;
|
|
116
|
-
|
|
117
|
-
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
118
|
-
|
|
119
|
-
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
120
|
-
? function (arg, view) {
|
|
121
|
-
return cachedTextEncoder.encodeInto(arg, view);
|
|
122
|
-
}
|
|
123
|
-
: function (arg, view) {
|
|
124
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
125
|
-
view.set(buf);
|
|
126
|
-
return {
|
|
127
|
-
read: arg.length,
|
|
128
|
-
written: buf.length
|
|
129
|
-
};
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
133
|
-
|
|
134
|
-
if (realloc === undefined) {
|
|
135
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
136
|
-
const ptr = malloc(buf.length);
|
|
137
|
-
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
138
|
-
WASM_VECTOR_LEN = buf.length;
|
|
139
|
-
return ptr;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
let len = arg.length;
|
|
143
|
-
let ptr = malloc(len);
|
|
144
|
-
|
|
145
|
-
const mem = getUint8Memory0();
|
|
146
|
-
|
|
147
|
-
let offset = 0;
|
|
148
|
-
|
|
149
|
-
for (; offset < len; offset++) {
|
|
150
|
-
const code = arg.charCodeAt(offset);
|
|
151
|
-
if (code > 0x7F) break;
|
|
152
|
-
mem[ptr + offset] = code;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
if (offset !== len) {
|
|
156
|
-
if (offset !== 0) {
|
|
157
|
-
arg = arg.slice(offset);
|
|
158
|
-
}
|
|
159
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3);
|
|
160
|
-
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
|
|
161
|
-
const ret = encodeString(arg, view);
|
|
162
|
-
|
|
163
|
-
offset += ret.written;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
WASM_VECTOR_LEN = offset;
|
|
167
|
-
return ptr;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
let cachegetInt32Memory0 = null;
|
|
171
|
-
function getInt32Memory0() {
|
|
172
|
-
if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
|
|
173
|
-
cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
174
|
-
}
|
|
175
|
-
return cachegetInt32Memory0;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
function isLikeNone(x) {
|
|
179
|
-
return x === undefined || x === null;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
let stack_pointer = 32;
|
|
183
|
-
|
|
184
|
-
function addBorrowedObject(obj) {
|
|
185
|
-
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
186
|
-
heap[--stack_pointer] = obj;
|
|
187
|
-
return stack_pointer;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
191
|
-
const ptr = malloc(arg.length * 1);
|
|
192
|
-
getUint8Memory0().set(arg, ptr / 1);
|
|
193
|
-
WASM_VECTOR_LEN = arg.length;
|
|
194
|
-
return ptr;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
function handleError(f, args) {
|
|
198
|
-
try {
|
|
199
|
-
return f.apply(this, args);
|
|
200
|
-
} catch (e) {
|
|
201
|
-
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
*/
|
|
206
|
-
export class Comment {
|
|
207
|
-
|
|
208
|
-
static __wrap(ptr) {
|
|
209
|
-
const obj = Object.create(Comment.prototype);
|
|
210
|
-
obj.ptr = ptr;
|
|
211
|
-
|
|
212
|
-
return obj;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
__destroy_into_raw() {
|
|
216
|
-
const ptr = this.ptr;
|
|
217
|
-
this.ptr = 0;
|
|
218
|
-
|
|
219
|
-
return ptr;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
free() {
|
|
223
|
-
const ptr = this.__destroy_into_raw();
|
|
224
|
-
wasm.__wbg_comment_free(ptr);
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* @param {string} content
|
|
228
|
-
* @param {any | undefined} content_type
|
|
229
|
-
*/
|
|
230
|
-
before(content, content_type) {
|
|
231
|
-
var ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
232
|
-
var len0 = WASM_VECTOR_LEN;
|
|
233
|
-
wasm.comment_before(this.ptr, ptr0, len0, isLikeNone(content_type) ? 0 : addHeapObject(content_type));
|
|
234
|
-
return this;
|
|
235
|
-
}
|
|
236
|
-
/**
|
|
237
|
-
* @param {string} content
|
|
238
|
-
* @param {any | undefined} content_type
|
|
239
|
-
*/
|
|
240
|
-
after(content, content_type) {
|
|
241
|
-
var ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
242
|
-
var len0 = WASM_VECTOR_LEN;
|
|
243
|
-
wasm.comment_after(this.ptr, ptr0, len0, isLikeNone(content_type) ? 0 : addHeapObject(content_type));
|
|
244
|
-
return this;
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* @param {string} content
|
|
248
|
-
* @param {any | undefined} content_type
|
|
249
|
-
*/
|
|
250
|
-
replace(content, content_type) {
|
|
251
|
-
var ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
252
|
-
var len0 = WASM_VECTOR_LEN;
|
|
253
|
-
wasm.comment_replace(this.ptr, ptr0, len0, isLikeNone(content_type) ? 0 : addHeapObject(content_type));
|
|
254
|
-
return this;
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
*/
|
|
258
|
-
remove() {
|
|
259
|
-
wasm.comment_remove(this.ptr);
|
|
260
|
-
return this;
|
|
261
|
-
}
|
|
262
|
-
/**
|
|
263
|
-
* @returns {boolean}
|
|
264
|
-
*/
|
|
265
|
-
get removed() {
|
|
266
|
-
var ret = wasm.comment_removed(this.ptr);
|
|
267
|
-
return ret !== 0;
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* @returns {string}
|
|
271
|
-
*/
|
|
272
|
-
get text() {
|
|
273
|
-
try {
|
|
274
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
275
|
-
wasm.comment_text(retptr, this.ptr);
|
|
276
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
277
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
278
|
-
return getStringFromWasm0(r0, r1);
|
|
279
|
-
} finally {
|
|
280
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
281
|
-
wasm.__wbindgen_free(r0, r1);
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
/**
|
|
285
|
-
* @param {string} text
|
|
286
|
-
*/
|
|
287
|
-
set text(text) {
|
|
288
|
-
var ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
289
|
-
var len0 = WASM_VECTOR_LEN;
|
|
290
|
-
wasm.comment_set_text(this.ptr, ptr0, len0);
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
/**
|
|
294
|
-
*/
|
|
295
|
-
export class Doctype {
|
|
296
|
-
|
|
297
|
-
static __wrap(ptr) {
|
|
298
|
-
const obj = Object.create(Doctype.prototype);
|
|
299
|
-
obj.ptr = ptr;
|
|
300
|
-
|
|
301
|
-
return obj;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
__destroy_into_raw() {
|
|
305
|
-
const ptr = this.ptr;
|
|
306
|
-
this.ptr = 0;
|
|
307
|
-
|
|
308
|
-
return ptr;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
free() {
|
|
312
|
-
const ptr = this.__destroy_into_raw();
|
|
313
|
-
wasm.__wbg_doctype_free(ptr);
|
|
314
|
-
}
|
|
315
|
-
/**
|
|
316
|
-
* @returns {any}
|
|
317
|
-
*/
|
|
318
|
-
get name() {
|
|
319
|
-
var ret = wasm.doctype_name(this.ptr);
|
|
320
|
-
return takeObject(ret);
|
|
321
|
-
}
|
|
322
|
-
/**
|
|
323
|
-
* @returns {any}
|
|
324
|
-
*/
|
|
325
|
-
get publicId() {
|
|
326
|
-
var ret = wasm.doctype_public_id(this.ptr);
|
|
327
|
-
return takeObject(ret);
|
|
328
|
-
}
|
|
329
|
-
/**
|
|
330
|
-
* @returns {any}
|
|
331
|
-
*/
|
|
332
|
-
get systemId() {
|
|
333
|
-
var ret = wasm.doctype_system_id(this.ptr);
|
|
334
|
-
return takeObject(ret);
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
/**
|
|
338
|
-
*/
|
|
339
|
-
export class DocumentEnd {
|
|
340
|
-
|
|
341
|
-
static __wrap(ptr) {
|
|
342
|
-
const obj = Object.create(DocumentEnd.prototype);
|
|
343
|
-
obj.ptr = ptr;
|
|
344
|
-
|
|
345
|
-
return obj;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
__destroy_into_raw() {
|
|
349
|
-
const ptr = this.ptr;
|
|
350
|
-
this.ptr = 0;
|
|
351
|
-
|
|
352
|
-
return ptr;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
free() {
|
|
356
|
-
const ptr = this.__destroy_into_raw();
|
|
357
|
-
wasm.__wbg_documentend_free(ptr);
|
|
358
|
-
}
|
|
359
|
-
/**
|
|
360
|
-
* @param {string} content
|
|
361
|
-
* @param {any | undefined} content_type
|
|
362
|
-
*/
|
|
363
|
-
append(content, content_type) {
|
|
364
|
-
var ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
365
|
-
var len0 = WASM_VECTOR_LEN;
|
|
366
|
-
wasm.documentend_append(this.ptr, ptr0, len0, isLikeNone(content_type) ? 0 : addHeapObject(content_type));
|
|
367
|
-
return this;
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
/**
|
|
371
|
-
*/
|
|
372
|
-
export class Element {
|
|
373
|
-
|
|
374
|
-
static __wrap(ptr) {
|
|
375
|
-
const obj = Object.create(Element.prototype);
|
|
376
|
-
obj.ptr = ptr;
|
|
377
|
-
|
|
378
|
-
return obj;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
__destroy_into_raw() {
|
|
382
|
-
const ptr = this.ptr;
|
|
383
|
-
this.ptr = 0;
|
|
384
|
-
|
|
385
|
-
return ptr;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
free() {
|
|
389
|
-
const ptr = this.__destroy_into_raw();
|
|
390
|
-
wasm.__wbg_element_free(ptr);
|
|
391
|
-
}
|
|
392
|
-
/**
|
|
393
|
-
* @param {string} content
|
|
394
|
-
* @param {any | undefined} content_type
|
|
395
|
-
*/
|
|
396
|
-
before(content, content_type) {
|
|
397
|
-
var ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
398
|
-
var len0 = WASM_VECTOR_LEN;
|
|
399
|
-
wasm.element_before(this.ptr, ptr0, len0, isLikeNone(content_type) ? 0 : addHeapObject(content_type));
|
|
400
|
-
return this;
|
|
401
|
-
}
|
|
402
|
-
/**
|
|
403
|
-
* @param {string} content
|
|
404
|
-
* @param {any | undefined} content_type
|
|
405
|
-
*/
|
|
406
|
-
after(content, content_type) {
|
|
407
|
-
var ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
408
|
-
var len0 = WASM_VECTOR_LEN;
|
|
409
|
-
wasm.element_after(this.ptr, ptr0, len0, isLikeNone(content_type) ? 0 : addHeapObject(content_type));
|
|
410
|
-
return this;
|
|
411
|
-
}
|
|
412
|
-
/**
|
|
413
|
-
* @param {string} content
|
|
414
|
-
* @param {any | undefined} content_type
|
|
415
|
-
*/
|
|
416
|
-
replace(content, content_type) {
|
|
417
|
-
var ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
418
|
-
var len0 = WASM_VECTOR_LEN;
|
|
419
|
-
wasm.element_replace(this.ptr, ptr0, len0, isLikeNone(content_type) ? 0 : addHeapObject(content_type));
|
|
420
|
-
return this;
|
|
421
|
-
}
|
|
422
|
-
/**
|
|
423
|
-
*/
|
|
424
|
-
remove() {
|
|
425
|
-
wasm.element_remove(this.ptr);
|
|
426
|
-
return this;
|
|
427
|
-
}
|
|
428
|
-
/**
|
|
429
|
-
* @returns {boolean}
|
|
430
|
-
*/
|
|
431
|
-
get removed() {
|
|
432
|
-
var ret = wasm.element_removed(this.ptr);
|
|
433
|
-
return ret !== 0;
|
|
434
|
-
}
|
|
435
|
-
/**
|
|
436
|
-
* @returns {string}
|
|
437
|
-
*/
|
|
438
|
-
get tagName() {
|
|
439
|
-
try {
|
|
440
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
441
|
-
wasm.element_tag_name(retptr, this.ptr);
|
|
442
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
443
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
444
|
-
return getStringFromWasm0(r0, r1);
|
|
445
|
-
} finally {
|
|
446
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
447
|
-
wasm.__wbindgen_free(r0, r1);
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
/**
|
|
451
|
-
* @param {string} name
|
|
452
|
-
*/
|
|
453
|
-
set tagName(name) {
|
|
454
|
-
var ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
455
|
-
var len0 = WASM_VECTOR_LEN;
|
|
456
|
-
wasm.element_set_tag_name(this.ptr, ptr0, len0);
|
|
457
|
-
}
|
|
458
|
-
/**
|
|
459
|
-
* @returns {any}
|
|
460
|
-
*/
|
|
461
|
-
get namespaceURI() {
|
|
462
|
-
var ret = wasm.element_namespace_uri(this.ptr);
|
|
463
|
-
return takeObject(ret);
|
|
464
|
-
}
|
|
465
|
-
/**
|
|
466
|
-
* @returns {any}
|
|
467
|
-
*/
|
|
468
|
-
get attributes() {
|
|
469
|
-
var ret = wasm.element_attributes(this.ptr);
|
|
470
|
-
return takeObject(ret)[Symbol.iterator]();
|
|
471
|
-
}
|
|
472
|
-
/**
|
|
473
|
-
* @param {string} name
|
|
474
|
-
* @returns {any}
|
|
475
|
-
*/
|
|
476
|
-
getAttribute(name) {
|
|
477
|
-
var ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
478
|
-
var len0 = WASM_VECTOR_LEN;
|
|
479
|
-
var ret = wasm.element_getAttribute(this.ptr, ptr0, len0);
|
|
480
|
-
return takeObject(ret);
|
|
481
|
-
}
|
|
482
|
-
/**
|
|
483
|
-
* @param {string} name
|
|
484
|
-
* @returns {boolean}
|
|
485
|
-
*/
|
|
486
|
-
hasAttribute(name) {
|
|
487
|
-
var ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
488
|
-
var len0 = WASM_VECTOR_LEN;
|
|
489
|
-
var ret = wasm.element_hasAttribute(this.ptr, ptr0, len0);
|
|
490
|
-
return ret !== 0;
|
|
491
|
-
}
|
|
492
|
-
/**
|
|
493
|
-
* @param {string} name
|
|
494
|
-
* @param {string} value
|
|
495
|
-
*/
|
|
496
|
-
setAttribute(name, value) {
|
|
497
|
-
var ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
498
|
-
var len0 = WASM_VECTOR_LEN;
|
|
499
|
-
var ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
500
|
-
var len1 = WASM_VECTOR_LEN;
|
|
501
|
-
wasm.element_setAttribute(this.ptr, ptr0, len0, ptr1, len1);
|
|
502
|
-
return this;
|
|
503
|
-
}
|
|
504
|
-
/**
|
|
505
|
-
* @param {string} name
|
|
506
|
-
*/
|
|
507
|
-
removeAttribute(name) {
|
|
508
|
-
var ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
509
|
-
var len0 = WASM_VECTOR_LEN;
|
|
510
|
-
wasm.element_removeAttribute(this.ptr, ptr0, len0);
|
|
511
|
-
return this;
|
|
512
|
-
}
|
|
513
|
-
/**
|
|
514
|
-
* @param {string} content
|
|
515
|
-
* @param {any | undefined} content_type
|
|
516
|
-
*/
|
|
517
|
-
prepend(content, content_type) {
|
|
518
|
-
var ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
519
|
-
var len0 = WASM_VECTOR_LEN;
|
|
520
|
-
wasm.element_prepend(this.ptr, ptr0, len0, isLikeNone(content_type) ? 0 : addHeapObject(content_type));
|
|
521
|
-
return this;
|
|
522
|
-
}
|
|
523
|
-
/**
|
|
524
|
-
* @param {string} content
|
|
525
|
-
* @param {any | undefined} content_type
|
|
526
|
-
*/
|
|
527
|
-
append(content, content_type) {
|
|
528
|
-
var ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
529
|
-
var len0 = WASM_VECTOR_LEN;
|
|
530
|
-
wasm.element_append(this.ptr, ptr0, len0, isLikeNone(content_type) ? 0 : addHeapObject(content_type));
|
|
531
|
-
return this;
|
|
532
|
-
}
|
|
533
|
-
/**
|
|
534
|
-
* @param {string} content
|
|
535
|
-
* @param {any | undefined} content_type
|
|
536
|
-
*/
|
|
537
|
-
setInnerContent(content, content_type) {
|
|
538
|
-
var ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
539
|
-
var len0 = WASM_VECTOR_LEN;
|
|
540
|
-
wasm.element_setInnerContent(this.ptr, ptr0, len0, isLikeNone(content_type) ? 0 : addHeapObject(content_type));
|
|
541
|
-
return this;
|
|
542
|
-
}
|
|
543
|
-
/**
|
|
544
|
-
*/
|
|
545
|
-
removeAndKeepContent() {
|
|
546
|
-
wasm.element_removeAndKeepContent(this.ptr);
|
|
547
|
-
return this;
|
|
548
|
-
}
|
|
549
|
-
/**
|
|
550
|
-
* @param {any} handler
|
|
551
|
-
*/
|
|
552
|
-
onEndTag(handler) {
|
|
553
|
-
wasm.element_onEndTag(this.ptr, addHeapObject(handler.bind(this)));
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
/**
|
|
557
|
-
*/
|
|
558
|
-
export class EndTag {
|
|
559
|
-
|
|
560
|
-
static __wrap(ptr) {
|
|
561
|
-
const obj = Object.create(EndTag.prototype);
|
|
562
|
-
obj.ptr = ptr;
|
|
563
|
-
|
|
564
|
-
return obj;
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
__destroy_into_raw() {
|
|
568
|
-
const ptr = this.ptr;
|
|
569
|
-
this.ptr = 0;
|
|
570
|
-
|
|
571
|
-
return ptr;
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
free() {
|
|
575
|
-
const ptr = this.__destroy_into_raw();
|
|
576
|
-
wasm.__wbg_endtag_free(ptr);
|
|
577
|
-
}
|
|
578
|
-
/**
|
|
579
|
-
* @returns {string}
|
|
580
|
-
*/
|
|
581
|
-
get name() {
|
|
582
|
-
try {
|
|
583
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
584
|
-
wasm.endtag_name(retptr, this.ptr);
|
|
585
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
586
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
587
|
-
return getStringFromWasm0(r0, r1);
|
|
588
|
-
} finally {
|
|
589
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
590
|
-
wasm.__wbindgen_free(r0, r1);
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
/**
|
|
594
|
-
* @param {string} name
|
|
595
|
-
*/
|
|
596
|
-
set name(name) {
|
|
597
|
-
var ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
598
|
-
var len0 = WASM_VECTOR_LEN;
|
|
599
|
-
wasm.endtag_set_name(this.ptr, ptr0, len0);
|
|
600
|
-
}
|
|
601
|
-
/**
|
|
602
|
-
* @param {string} content
|
|
603
|
-
* @param {any | undefined} content_type
|
|
604
|
-
*/
|
|
605
|
-
before(content, content_type) {
|
|
606
|
-
var ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
607
|
-
var len0 = WASM_VECTOR_LEN;
|
|
608
|
-
wasm.endtag_before(this.ptr, ptr0, len0, isLikeNone(content_type) ? 0 : addHeapObject(content_type));
|
|
609
|
-
return this;
|
|
610
|
-
}
|
|
611
|
-
/**
|
|
612
|
-
* @param {string} content
|
|
613
|
-
* @param {any | undefined} content_type
|
|
614
|
-
*/
|
|
615
|
-
after(content, content_type) {
|
|
616
|
-
var ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
617
|
-
var len0 = WASM_VECTOR_LEN;
|
|
618
|
-
wasm.endtag_after(this.ptr, ptr0, len0, isLikeNone(content_type) ? 0 : addHeapObject(content_type));
|
|
619
|
-
return this;
|
|
620
|
-
}
|
|
621
|
-
/**
|
|
622
|
-
*/
|
|
623
|
-
remove() {
|
|
624
|
-
wasm.endtag_remove(this.ptr);
|
|
625
|
-
return this;
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
/**
|
|
629
|
-
*/
|
|
630
|
-
export class HTMLRewriter {
|
|
631
|
-
|
|
632
|
-
static __wrap(ptr) {
|
|
633
|
-
const obj = Object.create(HTMLRewriter.prototype);
|
|
634
|
-
obj.ptr = ptr;
|
|
635
|
-
|
|
636
|
-
return obj;
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
__destroy_into_raw() {
|
|
640
|
-
const ptr = this.ptr;
|
|
641
|
-
this.ptr = 0;
|
|
642
|
-
|
|
643
|
-
return ptr;
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
free() {
|
|
647
|
-
const ptr = this.__destroy_into_raw();
|
|
648
|
-
wasm.__wbg_htmlrewriter_free(ptr);
|
|
649
|
-
}
|
|
650
|
-
/**
|
|
651
|
-
* @param {any} output_sink
|
|
652
|
-
* @param {any | undefined} options
|
|
653
|
-
*/
|
|
654
|
-
constructor(output_sink, options) {
|
|
655
|
-
try {
|
|
656
|
-
var ret = wasm.htmlrewriter_new(addBorrowedObject(output_sink), isLikeNone(options) ? 0 : addHeapObject(options));
|
|
657
|
-
return HTMLRewriter.__wrap(ret);
|
|
658
|
-
} finally {
|
|
659
|
-
heap[stack_pointer++] = undefined;
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
/**
|
|
663
|
-
* @param {string} selector
|
|
664
|
-
* @param {any} handlers
|
|
665
|
-
*/
|
|
666
|
-
on(selector, handlers) {
|
|
667
|
-
var ptr0 = passStringToWasm0(selector, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
668
|
-
var len0 = WASM_VECTOR_LEN;
|
|
669
|
-
wasm.htmlrewriter_on(this.ptr, ptr0, len0, addHeapObject(handlers));
|
|
670
|
-
return this;
|
|
671
|
-
}
|
|
672
|
-
/**
|
|
673
|
-
* @param {any} handlers
|
|
674
|
-
*/
|
|
675
|
-
onDocument(handlers) {
|
|
676
|
-
wasm.htmlrewriter_onDocument(this.ptr, addHeapObject(handlers));
|
|
677
|
-
return this;
|
|
678
|
-
}
|
|
679
|
-
/**
|
|
680
|
-
* @param {Uint8Array} chunk
|
|
681
|
-
*/
|
|
682
|
-
async write(chunk) {
|
|
683
|
-
var ptr0 = passArray8ToWasm0(chunk, wasm.__wbindgen_malloc);
|
|
684
|
-
var len0 = WASM_VECTOR_LEN;
|
|
685
|
-
await wrap(this, wasm.htmlrewriter_write, this.ptr, ptr0, len0)
|
|
686
|
-
}
|
|
687
|
-
/**
|
|
688
|
-
*/
|
|
689
|
-
async end() {
|
|
690
|
-
await wrap(this, wasm.htmlrewriter_end, this.ptr)
|
|
691
|
-
}
|
|
692
|
-
/**
|
|
693
|
-
* @returns {number}
|
|
694
|
-
*/
|
|
695
|
-
get asyncifyStackPtr() {
|
|
696
|
-
var ret = wasm.htmlrewriter_asyncify_stack_ptr(this.ptr);
|
|
697
|
-
return ret;
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
/**
|
|
701
|
-
*/
|
|
702
|
-
export class TextChunk {
|
|
703
|
-
|
|
704
|
-
static __wrap(ptr) {
|
|
705
|
-
const obj = Object.create(TextChunk.prototype);
|
|
706
|
-
obj.ptr = ptr;
|
|
707
|
-
|
|
708
|
-
return obj;
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
__destroy_into_raw() {
|
|
712
|
-
const ptr = this.ptr;
|
|
713
|
-
this.ptr = 0;
|
|
714
|
-
|
|
715
|
-
return ptr;
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
free() {
|
|
719
|
-
const ptr = this.__destroy_into_raw();
|
|
720
|
-
wasm.__wbg_textchunk_free(ptr);
|
|
721
|
-
}
|
|
722
|
-
/**
|
|
723
|
-
* @param {string} content
|
|
724
|
-
* @param {any | undefined} content_type
|
|
725
|
-
*/
|
|
726
|
-
before(content, content_type) {
|
|
727
|
-
var ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
728
|
-
var len0 = WASM_VECTOR_LEN;
|
|
729
|
-
wasm.textchunk_before(this.ptr, ptr0, len0, isLikeNone(content_type) ? 0 : addHeapObject(content_type));
|
|
730
|
-
return this;
|
|
731
|
-
}
|
|
732
|
-
/**
|
|
733
|
-
* @param {string} content
|
|
734
|
-
* @param {any | undefined} content_type
|
|
735
|
-
*/
|
|
736
|
-
after(content, content_type) {
|
|
737
|
-
var ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
738
|
-
var len0 = WASM_VECTOR_LEN;
|
|
739
|
-
wasm.textchunk_after(this.ptr, ptr0, len0, isLikeNone(content_type) ? 0 : addHeapObject(content_type));
|
|
740
|
-
return this;
|
|
741
|
-
}
|
|
742
|
-
/**
|
|
743
|
-
* @param {string} content
|
|
744
|
-
* @param {any | undefined} content_type
|
|
745
|
-
*/
|
|
746
|
-
replace(content, content_type) {
|
|
747
|
-
var ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
748
|
-
var len0 = WASM_VECTOR_LEN;
|
|
749
|
-
wasm.textchunk_replace(this.ptr, ptr0, len0, isLikeNone(content_type) ? 0 : addHeapObject(content_type));
|
|
750
|
-
return this;
|
|
751
|
-
}
|
|
752
|
-
/**
|
|
753
|
-
*/
|
|
754
|
-
remove() {
|
|
755
|
-
wasm.textchunk_remove(this.ptr);
|
|
756
|
-
return this;
|
|
757
|
-
}
|
|
758
|
-
/**
|
|
759
|
-
* @returns {boolean}
|
|
760
|
-
*/
|
|
761
|
-
get removed() {
|
|
762
|
-
var ret = wasm.textchunk_removed(this.ptr);
|
|
763
|
-
return ret !== 0;
|
|
764
|
-
}
|
|
765
|
-
/**
|
|
766
|
-
* @returns {string}
|
|
767
|
-
*/
|
|
768
|
-
get text() {
|
|
769
|
-
try {
|
|
770
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
771
|
-
wasm.textchunk_text(retptr, this.ptr);
|
|
772
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
773
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
774
|
-
return getStringFromWasm0(r0, r1);
|
|
775
|
-
} finally {
|
|
776
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
777
|
-
wasm.__wbindgen_free(r0, r1);
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
/**
|
|
781
|
-
* @returns {boolean}
|
|
782
|
-
*/
|
|
783
|
-
get lastInTextNode() {
|
|
784
|
-
var ret = wasm.textchunk_last_in_text_node(this.ptr);
|
|
785
|
-
return ret !== 0;
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
async function load(module, imports) {
|
|
790
|
-
if (typeof Response === 'function' && module instanceof Response) {
|
|
791
|
-
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
792
|
-
try {
|
|
793
|
-
return await WebAssembly.instantiateStreaming(module, imports);
|
|
794
|
-
|
|
795
|
-
} catch (e) {
|
|
796
|
-
if (module.headers.get('Content-Type') != 'application/wasm') {
|
|
797
|
-
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);
|
|
798
|
-
|
|
799
|
-
} else {
|
|
800
|
-
throw e;
|
|
801
|
-
}
|
|
802
|
-
}
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
const bytes = await module.arrayBuffer();
|
|
806
|
-
return await WebAssembly.instantiate(bytes, imports);
|
|
807
|
-
|
|
808
|
-
} else {
|
|
809
|
-
const instance = await WebAssembly.instantiate(module, imports);
|
|
810
|
-
|
|
811
|
-
if (instance instanceof WebAssembly.Instance) {
|
|
812
|
-
return { instance, module };
|
|
813
|
-
|
|
814
|
-
} else {
|
|
815
|
-
return instance;
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
async function init(input) {
|
|
821
|
-
if (typeof input === 'undefined') {
|
|
822
|
-
throw new Error('Initializing html_rewriter needs input')
|
|
823
|
-
}
|
|
824
|
-
const imports = {};
|
|
825
|
-
imports.wbg = {};
|
|
826
|
-
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
827
|
-
takeObject(arg0);
|
|
828
|
-
};
|
|
829
|
-
imports.wbg.__wbg_html_cd9a0f328493678b = function(arg0) {
|
|
830
|
-
var ret = getObject(arg0).html;
|
|
831
|
-
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
832
|
-
};
|
|
833
|
-
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
834
|
-
var ret = getStringFromWasm0(arg0, arg1);
|
|
835
|
-
return addHeapObject(ret);
|
|
836
|
-
};
|
|
837
|
-
imports.wbg.__wbg_documentend_new = function(arg0) {
|
|
838
|
-
var ret = DocumentEnd.__wrap(arg0);
|
|
839
|
-
return addHeapObject(ret);
|
|
840
|
-
};
|
|
841
|
-
imports.wbg.__wbg_awaitPromise_39a1101fd8518869 = function(arg0, arg1) {
|
|
842
|
-
awaitPromise(arg0, getObject(arg1));
|
|
843
|
-
};
|
|
844
|
-
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
845
|
-
var ret = getObject(arg0);
|
|
846
|
-
return addHeapObject(ret);
|
|
847
|
-
};
|
|
848
|
-
imports.wbg.__wbg_element_c38470ed972aea27 = function(arg0) {
|
|
849
|
-
var ret = getObject(arg0).element;
|
|
850
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
851
|
-
};
|
|
852
|
-
imports.wbg.__wbg_comments_ba86bc03331d9378 = function(arg0) {
|
|
853
|
-
var ret = getObject(arg0).comments;
|
|
854
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
855
|
-
};
|
|
856
|
-
imports.wbg.__wbg_text_7800bf26cb443911 = function(arg0) {
|
|
857
|
-
var ret = getObject(arg0).text;
|
|
858
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
859
|
-
};
|
|
860
|
-
imports.wbg.__wbg_doctype_ac58c0964a59b61b = function(arg0) {
|
|
861
|
-
var ret = getObject(arg0).doctype;
|
|
862
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
863
|
-
};
|
|
864
|
-
imports.wbg.__wbg_comments_94d876f6c0502e82 = function(arg0) {
|
|
865
|
-
var ret = getObject(arg0).comments;
|
|
866
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
867
|
-
};
|
|
868
|
-
imports.wbg.__wbg_text_4606a16c30e4ae91 = function(arg0) {
|
|
869
|
-
var ret = getObject(arg0).text;
|
|
870
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
871
|
-
};
|
|
872
|
-
imports.wbg.__wbg_end_34efb9402eac8a4e = function(arg0) {
|
|
873
|
-
var ret = getObject(arg0).end;
|
|
874
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
875
|
-
};
|
|
876
|
-
imports.wbg.__wbg_element_new = function(arg0) {
|
|
877
|
-
var ret = Element.__wrap(arg0);
|
|
878
|
-
return addHeapObject(ret);
|
|
879
|
-
};
|
|
880
|
-
imports.wbg.__wbg_comment_new = function(arg0) {
|
|
881
|
-
var ret = Comment.__wrap(arg0);
|
|
882
|
-
return addHeapObject(ret);
|
|
883
|
-
};
|
|
884
|
-
imports.wbg.__wbg_textchunk_new = function(arg0) {
|
|
885
|
-
var ret = TextChunk.__wrap(arg0);
|
|
886
|
-
return addHeapObject(ret);
|
|
887
|
-
};
|
|
888
|
-
imports.wbg.__wbg_doctype_new = function(arg0) {
|
|
889
|
-
var ret = Doctype.__wrap(arg0);
|
|
890
|
-
return addHeapObject(ret);
|
|
891
|
-
};
|
|
892
|
-
imports.wbg.__wbg_endtag_new = function(arg0) {
|
|
893
|
-
var ret = EndTag.__wrap(arg0);
|
|
894
|
-
return addHeapObject(ret);
|
|
895
|
-
};
|
|
896
|
-
imports.wbg.__wbg_enableEsiTags_de6b91cc61a25874 = function(arg0) {
|
|
897
|
-
var ret = getObject(arg0).enableEsiTags;
|
|
898
|
-
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
899
|
-
};
|
|
900
|
-
imports.wbg.__wbg_String_60c4ba333b5ca1c6 = function(arg0, arg1) {
|
|
901
|
-
var ret = String(getObject(arg1));
|
|
902
|
-
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
903
|
-
var len0 = WASM_VECTOR_LEN;
|
|
904
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
905
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
906
|
-
};
|
|
907
|
-
imports.wbg.__wbg_new_4fee7e2900033464 = function() {
|
|
908
|
-
var ret = new Array();
|
|
909
|
-
return addHeapObject(ret);
|
|
910
|
-
};
|
|
911
|
-
imports.wbg.__wbg_push_ba9b5e3c25cff8f9 = function(arg0, arg1) {
|
|
912
|
-
var ret = getObject(arg0).push(getObject(arg1));
|
|
913
|
-
return ret;
|
|
914
|
-
};
|
|
915
|
-
imports.wbg.__wbg_call_6c4ea719458624eb = function() { return handleError(function (arg0, arg1, arg2) {
|
|
916
|
-
var ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
917
|
-
return addHeapObject(ret);
|
|
918
|
-
}, arguments) };
|
|
919
|
-
imports.wbg.__wbg_new_917809a3e20a4b00 = function(arg0, arg1) {
|
|
920
|
-
var ret = new TypeError(getStringFromWasm0(arg0, arg1));
|
|
921
|
-
return addHeapObject(ret);
|
|
922
|
-
};
|
|
923
|
-
imports.wbg.__wbg_instanceof_Promise_c6535fc791fcc4d2 = function(arg0) {
|
|
924
|
-
var obj = getObject(arg0);
|
|
925
|
-
var ret = (obj instanceof Promise) || (Object.prototype.toString.call(obj) === '[object Promise]');
|
|
926
|
-
return ret;
|
|
927
|
-
};
|
|
928
|
-
imports.wbg.__wbg_buffer_89a8560ab6a3d9c6 = function(arg0) {
|
|
929
|
-
var ret = getObject(arg0).buffer;
|
|
930
|
-
return addHeapObject(ret);
|
|
931
|
-
};
|
|
932
|
-
imports.wbg.__wbg_newwithbyteoffsetandlength_e45d8b33c02dc3b5 = function(arg0, arg1, arg2) {
|
|
933
|
-
var ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
934
|
-
return addHeapObject(ret);
|
|
935
|
-
};
|
|
936
|
-
imports.wbg.__wbg_new_bd2e1d010adb8a1a = function(arg0) {
|
|
937
|
-
var ret = new Uint8Array(getObject(arg0));
|
|
938
|
-
return addHeapObject(ret);
|
|
939
|
-
};
|
|
940
|
-
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
941
|
-
var ret = debugString(getObject(arg1));
|
|
942
|
-
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
943
|
-
var len0 = WASM_VECTOR_LEN;
|
|
944
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
945
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
946
|
-
};
|
|
947
|
-
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
948
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
949
|
-
};
|
|
950
|
-
imports.wbg.__wbindgen_rethrow = function(arg0) {
|
|
951
|
-
throw takeObject(arg0);
|
|
952
|
-
};
|
|
953
|
-
imports.wbg.__wbindgen_memory = function() {
|
|
954
|
-
var ret = wasm.memory;
|
|
955
|
-
return addHeapObject(ret);
|
|
956
|
-
};
|
|
957
|
-
|
|
958
|
-
if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
|
|
959
|
-
input = fetch(input);
|
|
960
|
-
}
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
const { instance, module } = await load(await input, imports);
|
|
965
|
-
|
|
966
|
-
wasm = instance.exports;
|
|
967
|
-
setWasmExports(wasm)
|
|
968
|
-
init.__wbindgen_wasm_module = module;
|
|
969
|
-
|
|
970
|
-
return wasm;
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
export default init;
|
|
974
|
-
|