html-to-markdown-wasm 2.9.1 → 2.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.
@@ -1,41 +1,5 @@
1
1
  let wasm;
2
2
 
3
- let cachedUint8ArrayMemory0 = null;
4
-
5
- function getUint8ArrayMemory0() {
6
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
7
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
8
- }
9
- return cachedUint8ArrayMemory0;
10
- }
11
-
12
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
13
-
14
- cachedTextDecoder.decode();
15
-
16
- const MAX_SAFARI_DECODE_BYTES = 2146435072;
17
- let numBytesDecoded = 0;
18
- function decodeText(ptr, len) {
19
- numBytesDecoded += len;
20
- if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
21
- cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
22
- cachedTextDecoder.decode();
23
- numBytesDecoded = len;
24
- }
25
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
26
- }
27
-
28
- function getStringFromWasm0(ptr, len) {
29
- ptr = ptr >>> 0;
30
- return decodeText(ptr, len);
31
- }
32
-
33
- let heap = new Array(128).fill(undefined);
34
-
35
- heap.push(undefined, null, true, false);
36
-
37
- let heap_next = heap.length;
38
-
39
3
  function addHeapObject(obj) {
40
4
  if (heap_next === heap.length) heap.push(heap.length + 1);
41
5
  const idx = heap_next;
@@ -45,73 +9,10 @@ function addHeapObject(obj) {
45
9
  return idx;
46
10
  }
47
11
 
48
- function getObject(idx) { return heap[idx]; }
49
-
50
- let WASM_VECTOR_LEN = 0;
51
-
52
- const cachedTextEncoder = new TextEncoder();
53
-
54
- if (!('encodeInto' in cachedTextEncoder)) {
55
- cachedTextEncoder.encodeInto = function (arg, view) {
56
- const buf = cachedTextEncoder.encode(arg);
57
- view.set(buf);
58
- return {
59
- read: arg.length,
60
- written: buf.length
61
- };
62
- }
63
- }
64
-
65
- function passStringToWasm0(arg, malloc, realloc) {
66
-
67
- if (realloc === undefined) {
68
- const buf = cachedTextEncoder.encode(arg);
69
- const ptr = malloc(buf.length, 1) >>> 0;
70
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
71
- WASM_VECTOR_LEN = buf.length;
72
- return ptr;
73
- }
74
-
75
- let len = arg.length;
76
- let ptr = malloc(len, 1) >>> 0;
77
-
78
- const mem = getUint8ArrayMemory0();
79
-
80
- let offset = 0;
81
-
82
- for (; offset < len; offset++) {
83
- const code = arg.charCodeAt(offset);
84
- if (code > 0x7F) break;
85
- mem[ptr + offset] = code;
86
- }
87
-
88
- if (offset !== len) {
89
- if (offset !== 0) {
90
- arg = arg.slice(offset);
91
- }
92
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
93
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
94
- const ret = cachedTextEncoder.encodeInto(arg, view);
95
-
96
- offset += ret.written;
97
- ptr = realloc(ptr, len, offset, 1) >>> 0;
98
- }
99
-
100
- WASM_VECTOR_LEN = offset;
101
- return ptr;
102
- }
103
-
104
- let cachedDataViewMemory0 = null;
105
-
106
- function getDataViewMemory0() {
107
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
108
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
12
+ function _assertClass(instance, klass) {
13
+ if (!(instance instanceof klass)) {
14
+ throw new Error(`expected instance of ${klass.name}`);
109
15
  }
110
- return cachedDataViewMemory0;
111
- }
112
-
113
- function isLikeNone(x) {
114
- return x === undefined || x === null;
115
16
  }
116
17
 
117
18
  function debugString(val) {
@@ -179,12 +80,25 @@ function debugString(val) {
179
80
  return className;
180
81
  }
181
82
 
182
- function handleError(f, args) {
183
- try {
184
- return f.apply(this, args);
185
- } catch (e) {
186
- wasm.__wbindgen_export3(addHeapObject(e));
83
+ function dropObject(idx) {
84
+ if (idx < 132) return;
85
+ heap[idx] = heap_next;
86
+ heap_next = idx;
87
+ }
88
+
89
+ function getArrayJsValueFromWasm0(ptr, len) {
90
+ ptr = ptr >>> 0;
91
+ const mem = getDataViewMemory0();
92
+ const result = [];
93
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
94
+ result.push(takeObject(mem.getUint32(i, true)));
187
95
  }
96
+ return result;
97
+ }
98
+
99
+ function getArrayU32FromWasm0(ptr, len) {
100
+ ptr = ptr >>> 0;
101
+ return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
188
102
  }
189
103
 
190
104
  function getArrayU8FromWasm0(ptr, len) {
@@ -192,20 +106,20 @@ function getArrayU8FromWasm0(ptr, len) {
192
106
  return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
193
107
  }
194
108
 
195
- function dropObject(idx) {
196
- if (idx < 132) return;
197
- heap[idx] = heap_next;
198
- heap_next = idx;
109
+ let cachedDataViewMemory0 = null;
110
+ function getDataViewMemory0() {
111
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
112
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
113
+ }
114
+ return cachedDataViewMemory0;
199
115
  }
200
116
 
201
- function takeObject(idx) {
202
- const ret = getObject(idx);
203
- dropObject(idx);
204
- return ret;
117
+ function getStringFromWasm0(ptr, len) {
118
+ ptr = ptr >>> 0;
119
+ return decodeText(ptr, len);
205
120
  }
206
121
 
207
122
  let cachedUint32ArrayMemory0 = null;
208
-
209
123
  function getUint32ArrayMemory0() {
210
124
  if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
211
125
  cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
@@ -213,256 +127,126 @@ function getUint32ArrayMemory0() {
213
127
  return cachedUint32ArrayMemory0;
214
128
  }
215
129
 
216
- function getArrayU32FromWasm0(ptr, len) {
217
- ptr = ptr >>> 0;
218
- return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
219
- }
220
-
221
- function getArrayJsValueFromWasm0(ptr, len) {
222
- ptr = ptr >>> 0;
223
- const mem = getDataViewMemory0();
224
- const result = [];
225
- for (let i = ptr; i < ptr + 4 * len; i += 4) {
226
- result.push(takeObject(mem.getUint32(i, true)));
130
+ let cachedUint8ArrayMemory0 = null;
131
+ function getUint8ArrayMemory0() {
132
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
133
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
227
134
  }
228
- return result;
135
+ return cachedUint8ArrayMemory0;
229
136
  }
230
- /**
231
- * Convert HTML to Markdown
232
- *
233
- * # Arguments
234
- *
235
- * * `html` - The HTML string to convert
236
- * * `options` - Optional conversion options (as a JavaScript object)
237
- *
238
- * # Example
239
- *
240
- * ```javascript
241
- * import { convert } from 'html-to-markdown-wasm';
242
- *
243
- * const html = '<h1>Hello World</h1>';
244
- * const markdown = convert(html);
245
- * console.log(markdown); // # Hello World
246
- * ```
247
- * @param {string} html
248
- * @param {any} options
249
- * @returns {string}
250
- */
251
- export function convert(html, options) {
252
- let deferred3_0;
253
- let deferred3_1;
137
+
138
+ function getObject(idx) { return heap[idx]; }
139
+
140
+ function handleError(f, args) {
254
141
  try {
255
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
256
- const ptr0 = passStringToWasm0(html, wasm.__wbindgen_export, wasm.__wbindgen_export2);
257
- const len0 = WASM_VECTOR_LEN;
258
- wasm.convert(retptr, ptr0, len0, addHeapObject(options));
259
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
260
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
261
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
262
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
263
- var ptr2 = r0;
264
- var len2 = r1;
265
- if (r3) {
266
- ptr2 = 0; len2 = 0;
267
- throw takeObject(r2);
268
- }
269
- deferred3_0 = ptr2;
270
- deferred3_1 = len2;
271
- return getStringFromWasm0(ptr2, len2);
272
- } finally {
273
- wasm.__wbindgen_add_to_stack_pointer(16);
274
- wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
142
+ return f.apply(this, args);
143
+ } catch (e) {
144
+ wasm.__wbindgen_export3(addHeapObject(e));
275
145
  }
276
146
  }
277
147
 
278
- function _assertClass(instance, klass) {
279
- if (!(instance instanceof klass)) {
280
- throw new Error(`expected instance of ${klass.name}`);
281
- }
282
- }
283
- /**
284
- * @param {string} html
285
- * @param {any} options
286
- * @param {WasmInlineImageConfig | null} [image_config]
287
- * @returns {WasmHtmlExtraction}
288
- */
289
- export function convertWithInlineImages(html, options, image_config) {
290
- try {
291
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
292
- const ptr0 = passStringToWasm0(html, wasm.__wbindgen_export, wasm.__wbindgen_export2);
293
- const len0 = WASM_VECTOR_LEN;
294
- let ptr1 = 0;
295
- if (!isLikeNone(image_config)) {
296
- _assertClass(image_config, WasmInlineImageConfig);
297
- ptr1 = image_config.__destroy_into_raw();
298
- }
299
- wasm.convertWithInlineImages(retptr, ptr0, len0, addHeapObject(options), ptr1);
300
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
301
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
302
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
303
- if (r2) {
304
- throw takeObject(r1);
305
- }
306
- return WasmHtmlExtraction.__wrap(r0);
307
- } finally {
308
- wasm.__wbindgen_add_to_stack_pointer(16);
309
- }
148
+ let heap = new Array(128).fill(undefined);
149
+ heap.push(undefined, null, true, false);
150
+
151
+ let heap_next = heap.length;
152
+
153
+ function isLikeNone(x) {
154
+ return x === undefined || x === null;
310
155
  }
311
156
 
312
- /**
313
- * @param {Uint8Array} html
314
- * @param {WasmConversionOptionsHandle} handle
315
- * @returns {string}
316
- */
317
- export function convertBytesWithOptionsHandle(html, handle) {
318
- let deferred2_0;
319
- let deferred2_1;
320
- try {
321
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
322
- _assertClass(handle, WasmConversionOptionsHandle);
323
- wasm.convertBytesWithOptionsHandle(retptr, addHeapObject(html), handle.__wbg_ptr);
324
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
325
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
326
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
327
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
328
- var ptr1 = r0;
329
- var len1 = r1;
330
- if (r3) {
331
- ptr1 = 0; len1 = 0;
332
- throw takeObject(r2);
333
- }
334
- deferred2_0 = ptr1;
335
- deferred2_1 = len1;
336
- return getStringFromWasm0(ptr1, len1);
337
- } finally {
338
- wasm.__wbindgen_add_to_stack_pointer(16);
339
- wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
157
+ function passStringToWasm0(arg, malloc, realloc) {
158
+ if (realloc === undefined) {
159
+ const buf = cachedTextEncoder.encode(arg);
160
+ const ptr = malloc(buf.length, 1) >>> 0;
161
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
162
+ WASM_VECTOR_LEN = buf.length;
163
+ return ptr;
340
164
  }
341
- }
342
165
 
343
- /**
344
- * @param {Uint8Array} html
345
- * @param {any} options
346
- * @param {WasmInlineImageConfig | null} [image_config]
347
- * @returns {WasmHtmlExtraction}
348
- */
349
- export function convertBytesWithInlineImages(html, options, image_config) {
350
- try {
351
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
352
- let ptr0 = 0;
353
- if (!isLikeNone(image_config)) {
354
- _assertClass(image_config, WasmInlineImageConfig);
355
- ptr0 = image_config.__destroy_into_raw();
356
- }
357
- wasm.convertBytesWithInlineImages(retptr, addHeapObject(html), addHeapObject(options), ptr0);
358
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
359
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
360
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
361
- if (r2) {
362
- throw takeObject(r1);
166
+ let len = arg.length;
167
+ let ptr = malloc(len, 1) >>> 0;
168
+
169
+ const mem = getUint8ArrayMemory0();
170
+
171
+ let offset = 0;
172
+
173
+ for (; offset < len; offset++) {
174
+ const code = arg.charCodeAt(offset);
175
+ if (code > 0x7F) break;
176
+ mem[ptr + offset] = code;
177
+ }
178
+ if (offset !== len) {
179
+ if (offset !== 0) {
180
+ arg = arg.slice(offset);
363
181
  }
364
- return WasmHtmlExtraction.__wrap(r0);
365
- } finally {
366
- wasm.__wbindgen_add_to_stack_pointer(16);
182
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
183
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
184
+ const ret = cachedTextEncoder.encodeInto(arg, view);
185
+
186
+ offset += ret.written;
187
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
367
188
  }
189
+
190
+ WASM_VECTOR_LEN = offset;
191
+ return ptr;
368
192
  }
369
193
 
370
- /**
371
- * @param {any} options
372
- * @returns {WasmConversionOptionsHandle}
373
- */
374
- export function createConversionOptionsHandle(options) {
375
- try {
376
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
377
- wasm.createConversionOptionsHandle(retptr, addHeapObject(options));
378
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
379
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
380
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
381
- if (r2) {
382
- throw takeObject(r1);
383
- }
384
- return WasmConversionOptionsHandle.__wrap(r0);
385
- } finally {
386
- wasm.__wbindgen_add_to_stack_pointer(16);
387
- }
194
+ function takeObject(idx) {
195
+ const ret = getObject(idx);
196
+ dropObject(idx);
197
+ return ret;
388
198
  }
389
199
 
390
- /**
391
- * @param {string} html
392
- * @param {WasmConversionOptionsHandle} handle
393
- * @returns {string}
394
- */
395
- export function convertWithOptionsHandle(html, handle) {
396
- let deferred3_0;
397
- let deferred3_1;
398
- try {
399
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
400
- const ptr0 = passStringToWasm0(html, wasm.__wbindgen_export, wasm.__wbindgen_export2);
401
- const len0 = WASM_VECTOR_LEN;
402
- _assertClass(handle, WasmConversionOptionsHandle);
403
- wasm.convertWithOptionsHandle(retptr, ptr0, len0, handle.__wbg_ptr);
404
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
405
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
406
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
407
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
408
- var ptr2 = r0;
409
- var len2 = r1;
410
- if (r3) {
411
- ptr2 = 0; len2 = 0;
412
- throw takeObject(r2);
413
- }
414
- deferred3_0 = ptr2;
415
- deferred3_1 = len2;
416
- return getStringFromWasm0(ptr2, len2);
417
- } finally {
418
- wasm.__wbindgen_add_to_stack_pointer(16);
419
- wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
200
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
201
+ cachedTextDecoder.decode();
202
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
203
+ let numBytesDecoded = 0;
204
+ function decodeText(ptr, len) {
205
+ numBytesDecoded += len;
206
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
207
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
208
+ cachedTextDecoder.decode();
209
+ numBytesDecoded = len;
420
210
  }
211
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
421
212
  }
422
213
 
423
- /**
424
- * @param {Uint8Array} html
425
- * @param {any} options
426
- * @returns {string}
427
- */
428
- export function convertBytes(html, options) {
429
- let deferred2_0;
430
- let deferred2_1;
431
- try {
432
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
433
- wasm.convertBytes(retptr, addHeapObject(html), addHeapObject(options));
434
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
435
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
436
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
437
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
438
- var ptr1 = r0;
439
- var len1 = r1;
440
- if (r3) {
441
- ptr1 = 0; len1 = 0;
442
- throw takeObject(r2);
443
- }
444
- deferred2_0 = ptr1;
445
- deferred2_1 = len1;
446
- return getStringFromWasm0(ptr1, len1);
447
- } finally {
448
- wasm.__wbindgen_add_to_stack_pointer(16);
449
- wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
214
+ const cachedTextEncoder = new TextEncoder();
215
+
216
+ if (!('encodeInto' in cachedTextEncoder)) {
217
+ cachedTextEncoder.encodeInto = function (arg, view) {
218
+ const buf = cachedTextEncoder.encode(arg);
219
+ view.set(buf);
220
+ return {
221
+ read: arg.length,
222
+ written: buf.length
223
+ };
450
224
  }
451
225
  }
452
226
 
453
- /**
454
- * Initialize panic hook for better error messages in the browser
455
- */
456
- export function init() {
457
- wasm.init();
458
- }
227
+ let WASM_VECTOR_LEN = 0;
459
228
 
460
229
  const WasmConversionOptionsHandleFinalization = (typeof FinalizationRegistry === 'undefined')
461
230
  ? { register: () => {}, unregister: () => {} }
462
231
  : new FinalizationRegistry(ptr => wasm.__wbg_wasmconversionoptionshandle_free(ptr >>> 0, 1));
463
232
 
464
- export class WasmConversionOptionsHandle {
233
+ const WasmHtmlExtractionFinalization = (typeof FinalizationRegistry === 'undefined')
234
+ ? { register: () => {}, unregister: () => {} }
235
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmhtmlextraction_free(ptr >>> 0, 1));
236
+
237
+ const WasmInlineImageFinalization = (typeof FinalizationRegistry === 'undefined')
238
+ ? { register: () => {}, unregister: () => {} }
239
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasminlineimage_free(ptr >>> 0, 1));
465
240
 
241
+ const WasmInlineImageConfigFinalization = (typeof FinalizationRegistry === 'undefined')
242
+ ? { register: () => {}, unregister: () => {} }
243
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasminlineimageconfig_free(ptr >>> 0, 1));
244
+
245
+ const WasmInlineImageWarningFinalization = (typeof FinalizationRegistry === 'undefined')
246
+ ? { register: () => {}, unregister: () => {} }
247
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasminlineimagewarning_free(ptr >>> 0, 1));
248
+
249
+ export class WasmConversionOptionsHandle {
466
250
  static __wrap(ptr) {
467
251
  ptr = ptr >>> 0;
468
252
  const obj = Object.create(WasmConversionOptionsHandle.prototype);
@@ -470,14 +254,12 @@ export class WasmConversionOptionsHandle {
470
254
  WasmConversionOptionsHandleFinalization.register(obj, obj.__wbg_ptr, obj);
471
255
  return obj;
472
256
  }
473
-
474
257
  __destroy_into_raw() {
475
258
  const ptr = this.__wbg_ptr;
476
259
  this.__wbg_ptr = 0;
477
260
  WasmConversionOptionsHandleFinalization.unregister(this);
478
261
  return ptr;
479
262
  }
480
-
481
263
  free() {
482
264
  const ptr = this.__destroy_into_raw();
483
265
  wasm.__wbg_wasmconversionoptionshandle_free(ptr, 0);
@@ -505,14 +287,10 @@ export class WasmConversionOptionsHandle {
505
287
  }
506
288
  if (Symbol.dispose) WasmConversionOptionsHandle.prototype[Symbol.dispose] = WasmConversionOptionsHandle.prototype.free;
507
289
 
508
- const WasmHtmlExtractionFinalization = (typeof FinalizationRegistry === 'undefined')
509
- ? { register: () => {}, unregister: () => {} }
510
- : new FinalizationRegistry(ptr => wasm.__wbg_wasmhtmlextraction_free(ptr >>> 0, 1));
511
290
  /**
512
291
  * Result of HTML extraction with inline images
513
292
  */
514
293
  export class WasmHtmlExtraction {
515
-
516
294
  static __wrap(ptr) {
517
295
  ptr = ptr >>> 0;
518
296
  const obj = Object.create(WasmHtmlExtraction.prototype);
@@ -520,14 +298,12 @@ export class WasmHtmlExtraction {
520
298
  WasmHtmlExtractionFinalization.register(obj, obj.__wbg_ptr, obj);
521
299
  return obj;
522
300
  }
523
-
524
301
  __destroy_into_raw() {
525
302
  const ptr = this.__wbg_ptr;
526
303
  this.__wbg_ptr = 0;
527
304
  WasmHtmlExtractionFinalization.unregister(this);
528
305
  return ptr;
529
306
  }
530
-
531
307
  free() {
532
308
  const ptr = this.__destroy_into_raw();
533
309
  wasm.__wbg_wasmhtmlextraction_free(ptr, 0);
@@ -586,14 +362,10 @@ export class WasmHtmlExtraction {
586
362
  }
587
363
  if (Symbol.dispose) WasmHtmlExtraction.prototype[Symbol.dispose] = WasmHtmlExtraction.prototype.free;
588
364
 
589
- const WasmInlineImageFinalization = (typeof FinalizationRegistry === 'undefined')
590
- ? { register: () => {}, unregister: () => {} }
591
- : new FinalizationRegistry(ptr => wasm.__wbg_wasminlineimage_free(ptr >>> 0, 1));
592
365
  /**
593
366
  * Inline image data
594
367
  */
595
368
  export class WasmInlineImage {
596
-
597
369
  static __wrap(ptr) {
598
370
  ptr = ptr >>> 0;
599
371
  const obj = Object.create(WasmInlineImage.prototype);
@@ -601,14 +373,12 @@ export class WasmInlineImage {
601
373
  WasmInlineImageFinalization.register(obj, obj.__wbg_ptr, obj);
602
374
  return obj;
603
375
  }
604
-
605
376
  __destroy_into_raw() {
606
377
  const ptr = this.__wbg_ptr;
607
378
  this.__wbg_ptr = 0;
608
379
  WasmInlineImageFinalization.unregister(this);
609
380
  return ptr;
610
381
  }
611
-
612
382
  free() {
613
383
  const ptr = this.__destroy_into_raw();
614
384
  wasm.__wbg_wasminlineimage_free(ptr, 0);
@@ -725,21 +495,16 @@ export class WasmInlineImage {
725
495
  }
726
496
  if (Symbol.dispose) WasmInlineImage.prototype[Symbol.dispose] = WasmInlineImage.prototype.free;
727
497
 
728
- const WasmInlineImageConfigFinalization = (typeof FinalizationRegistry === 'undefined')
729
- ? { register: () => {}, unregister: () => {} }
730
- : new FinalizationRegistry(ptr => wasm.__wbg_wasminlineimageconfig_free(ptr >>> 0, 1));
731
498
  /**
732
499
  * Inline image configuration
733
500
  */
734
501
  export class WasmInlineImageConfig {
735
-
736
502
  __destroy_into_raw() {
737
503
  const ptr = this.__wbg_ptr;
738
504
  this.__wbg_ptr = 0;
739
505
  WasmInlineImageConfigFinalization.unregister(this);
740
506
  return ptr;
741
507
  }
742
-
743
508
  free() {
744
509
  const ptr = this.__destroy_into_raw();
745
510
  wasm.__wbg_wasminlineimageconfig_free(ptr, 0);
@@ -776,14 +541,10 @@ export class WasmInlineImageConfig {
776
541
  }
777
542
  if (Symbol.dispose) WasmInlineImageConfig.prototype[Symbol.dispose] = WasmInlineImageConfig.prototype.free;
778
543
 
779
- const WasmInlineImageWarningFinalization = (typeof FinalizationRegistry === 'undefined')
780
- ? { register: () => {}, unregister: () => {} }
781
- : new FinalizationRegistry(ptr => wasm.__wbg_wasminlineimagewarning_free(ptr >>> 0, 1));
782
544
  /**
783
545
  * Warning about inline image processing
784
546
  */
785
547
  export class WasmInlineImageWarning {
786
-
787
548
  static __wrap(ptr) {
788
549
  ptr = ptr >>> 0;
789
550
  const obj = Object.create(WasmInlineImageWarning.prototype);
@@ -791,14 +552,12 @@ export class WasmInlineImageWarning {
791
552
  WasmInlineImageWarningFinalization.register(obj, obj.__wbg_ptr, obj);
792
553
  return obj;
793
554
  }
794
-
795
555
  __destroy_into_raw() {
796
556
  const ptr = this.__wbg_ptr;
797
557
  this.__wbg_ptr = 0;
798
558
  WasmInlineImageWarningFinalization.unregister(this);
799
559
  return ptr;
800
560
  }
801
-
802
561
  free() {
803
562
  const ptr = this.__destroy_into_raw();
804
563
  wasm.__wbg_wasminlineimagewarning_free(ptr, 0);
@@ -832,6 +591,231 @@ export class WasmInlineImageWarning {
832
591
  }
833
592
  if (Symbol.dispose) WasmInlineImageWarning.prototype[Symbol.dispose] = WasmInlineImageWarning.prototype.free;
834
593
 
594
+ /**
595
+ * Convert HTML to Markdown
596
+ *
597
+ * # Arguments
598
+ *
599
+ * * `html` - The HTML string to convert
600
+ * * `options` - Optional conversion options (as a JavaScript object)
601
+ *
602
+ * # Example
603
+ *
604
+ * ```javascript
605
+ * import { convert } from 'html-to-markdown-wasm';
606
+ *
607
+ * const html = '<h1>Hello World</h1>';
608
+ * const markdown = convert(html);
609
+ * console.log(markdown); // # Hello World
610
+ * ```
611
+ * @param {string} html
612
+ * @param {any} options
613
+ * @returns {string}
614
+ */
615
+ export function convert(html, options) {
616
+ let deferred3_0;
617
+ let deferred3_1;
618
+ try {
619
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
620
+ const ptr0 = passStringToWasm0(html, wasm.__wbindgen_export, wasm.__wbindgen_export2);
621
+ const len0 = WASM_VECTOR_LEN;
622
+ wasm.convert(retptr, ptr0, len0, addHeapObject(options));
623
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
624
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
625
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
626
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
627
+ var ptr2 = r0;
628
+ var len2 = r1;
629
+ if (r3) {
630
+ ptr2 = 0; len2 = 0;
631
+ throw takeObject(r2);
632
+ }
633
+ deferred3_0 = ptr2;
634
+ deferred3_1 = len2;
635
+ return getStringFromWasm0(ptr2, len2);
636
+ } finally {
637
+ wasm.__wbindgen_add_to_stack_pointer(16);
638
+ wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
639
+ }
640
+ }
641
+
642
+ /**
643
+ * @param {Uint8Array} html
644
+ * @param {any} options
645
+ * @returns {string}
646
+ */
647
+ export function convertBytes(html, options) {
648
+ let deferred2_0;
649
+ let deferred2_1;
650
+ try {
651
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
652
+ wasm.convertBytes(retptr, addHeapObject(html), addHeapObject(options));
653
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
654
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
655
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
656
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
657
+ var ptr1 = r0;
658
+ var len1 = r1;
659
+ if (r3) {
660
+ ptr1 = 0; len1 = 0;
661
+ throw takeObject(r2);
662
+ }
663
+ deferred2_0 = ptr1;
664
+ deferred2_1 = len1;
665
+ return getStringFromWasm0(ptr1, len1);
666
+ } finally {
667
+ wasm.__wbindgen_add_to_stack_pointer(16);
668
+ wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
669
+ }
670
+ }
671
+
672
+ /**
673
+ * @param {Uint8Array} html
674
+ * @param {any} options
675
+ * @param {WasmInlineImageConfig | null} [image_config]
676
+ * @returns {WasmHtmlExtraction}
677
+ */
678
+ export function convertBytesWithInlineImages(html, options, image_config) {
679
+ try {
680
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
681
+ let ptr0 = 0;
682
+ if (!isLikeNone(image_config)) {
683
+ _assertClass(image_config, WasmInlineImageConfig);
684
+ ptr0 = image_config.__destroy_into_raw();
685
+ }
686
+ wasm.convertBytesWithInlineImages(retptr, addHeapObject(html), addHeapObject(options), ptr0);
687
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
688
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
689
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
690
+ if (r2) {
691
+ throw takeObject(r1);
692
+ }
693
+ return WasmHtmlExtraction.__wrap(r0);
694
+ } finally {
695
+ wasm.__wbindgen_add_to_stack_pointer(16);
696
+ }
697
+ }
698
+
699
+ /**
700
+ * @param {Uint8Array} html
701
+ * @param {WasmConversionOptionsHandle} handle
702
+ * @returns {string}
703
+ */
704
+ export function convertBytesWithOptionsHandle(html, handle) {
705
+ let deferred2_0;
706
+ let deferred2_1;
707
+ try {
708
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
709
+ _assertClass(handle, WasmConversionOptionsHandle);
710
+ wasm.convertBytesWithOptionsHandle(retptr, addHeapObject(html), handle.__wbg_ptr);
711
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
712
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
713
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
714
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
715
+ var ptr1 = r0;
716
+ var len1 = r1;
717
+ if (r3) {
718
+ ptr1 = 0; len1 = 0;
719
+ throw takeObject(r2);
720
+ }
721
+ deferred2_0 = ptr1;
722
+ deferred2_1 = len1;
723
+ return getStringFromWasm0(ptr1, len1);
724
+ } finally {
725
+ wasm.__wbindgen_add_to_stack_pointer(16);
726
+ wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
727
+ }
728
+ }
729
+
730
+ /**
731
+ * @param {string} html
732
+ * @param {any} options
733
+ * @param {WasmInlineImageConfig | null} [image_config]
734
+ * @returns {WasmHtmlExtraction}
735
+ */
736
+ export function convertWithInlineImages(html, options, image_config) {
737
+ try {
738
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
739
+ const ptr0 = passStringToWasm0(html, wasm.__wbindgen_export, wasm.__wbindgen_export2);
740
+ const len0 = WASM_VECTOR_LEN;
741
+ let ptr1 = 0;
742
+ if (!isLikeNone(image_config)) {
743
+ _assertClass(image_config, WasmInlineImageConfig);
744
+ ptr1 = image_config.__destroy_into_raw();
745
+ }
746
+ wasm.convertWithInlineImages(retptr, ptr0, len0, addHeapObject(options), ptr1);
747
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
748
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
749
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
750
+ if (r2) {
751
+ throw takeObject(r1);
752
+ }
753
+ return WasmHtmlExtraction.__wrap(r0);
754
+ } finally {
755
+ wasm.__wbindgen_add_to_stack_pointer(16);
756
+ }
757
+ }
758
+
759
+ /**
760
+ * @param {string} html
761
+ * @param {WasmConversionOptionsHandle} handle
762
+ * @returns {string}
763
+ */
764
+ export function convertWithOptionsHandle(html, handle) {
765
+ let deferred3_0;
766
+ let deferred3_1;
767
+ try {
768
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
769
+ const ptr0 = passStringToWasm0(html, wasm.__wbindgen_export, wasm.__wbindgen_export2);
770
+ const len0 = WASM_VECTOR_LEN;
771
+ _assertClass(handle, WasmConversionOptionsHandle);
772
+ wasm.convertWithOptionsHandle(retptr, ptr0, len0, handle.__wbg_ptr);
773
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
774
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
775
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
776
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
777
+ var ptr2 = r0;
778
+ var len2 = r1;
779
+ if (r3) {
780
+ ptr2 = 0; len2 = 0;
781
+ throw takeObject(r2);
782
+ }
783
+ deferred3_0 = ptr2;
784
+ deferred3_1 = len2;
785
+ return getStringFromWasm0(ptr2, len2);
786
+ } finally {
787
+ wasm.__wbindgen_add_to_stack_pointer(16);
788
+ wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
789
+ }
790
+ }
791
+
792
+ /**
793
+ * @param {any} options
794
+ * @returns {WasmConversionOptionsHandle}
795
+ */
796
+ export function createConversionOptionsHandle(options) {
797
+ try {
798
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
799
+ wasm.createConversionOptionsHandle(retptr, addHeapObject(options));
800
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
801
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
802
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
803
+ if (r2) {
804
+ throw takeObject(r1);
805
+ }
806
+ return WasmConversionOptionsHandle.__wrap(r0);
807
+ } finally {
808
+ wasm.__wbindgen_add_to_stack_pointer(16);
809
+ }
810
+ }
811
+
812
+ /**
813
+ * Initialize panic hook for better error messages in the browser
814
+ */
815
+ export function init() {
816
+ wasm.init();
817
+ }
818
+
835
819
  const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
836
820
 
837
821
  async function __wbg_load(module, imports) {
@@ -839,7 +823,6 @@ async function __wbg_load(module, imports) {
839
823
  if (typeof WebAssembly.instantiateStreaming === 'function') {
840
824
  try {
841
825
  return await WebAssembly.instantiateStreaming(module, imports);
842
-
843
826
  } catch (e) {
844
827
  const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
845
828
 
@@ -854,13 +837,11 @@ async function __wbg_load(module, imports) {
854
837
 
855
838
  const bytes = await module.arrayBuffer();
856
839
  return await WebAssembly.instantiate(bytes, imports);
857
-
858
840
  } else {
859
841
  const instance = await WebAssembly.instantiate(module, imports);
860
842
 
861
843
  if (instance instanceof WebAssembly.Instance) {
862
844
  return { instance, module };
863
-
864
845
  } else {
865
846
  return instance;
866
847
  }
@@ -870,11 +851,11 @@ async function __wbg_load(module, imports) {
870
851
  function __wbg_get_imports() {
871
852
  const imports = {};
872
853
  imports.wbg = {};
873
- imports.wbg.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
854
+ imports.wbg.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
874
855
  const ret = Error(getStringFromWasm0(arg0, arg1));
875
856
  return addHeapObject(ret);
876
857
  };
877
- imports.wbg.__wbg_Number_bb48ca12f395cd08 = function(arg0) {
858
+ imports.wbg.__wbg_Number_2d1dcfcf4ec51736 = function(arg0) {
878
859
  const ret = Number(getObject(arg0));
879
860
  return ret;
880
861
  };
@@ -885,68 +866,68 @@ function __wbg_get_imports() {
885
866
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
886
867
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
887
868
  };
888
- imports.wbg.__wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd = function(arg0, arg1) {
869
+ imports.wbg.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d = function(arg0, arg1) {
889
870
  const v = getObject(arg1);
890
871
  const ret = typeof(v) === 'bigint' ? v : undefined;
891
872
  getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
892
873
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
893
874
  };
894
- imports.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68 = function(arg0) {
875
+ imports.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b = function(arg0) {
895
876
  const v = getObject(arg0);
896
877
  const ret = typeof(v) === 'boolean' ? v : undefined;
897
878
  return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
898
879
  };
899
- imports.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
880
+ imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
900
881
  const ret = debugString(getObject(arg1));
901
882
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
902
883
  const len1 = WASM_VECTOR_LEN;
903
884
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
904
885
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
905
886
  };
906
- imports.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f = function(arg0, arg1) {
887
+ imports.wbg.__wbg___wbindgen_in_0d3e1e8f0c669317 = function(arg0, arg1) {
907
888
  const ret = getObject(arg0) in getObject(arg1);
908
889
  return ret;
909
890
  };
910
- imports.wbg.__wbg___wbindgen_is_bigint_cb320707dcd35f0b = function(arg0) {
891
+ imports.wbg.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27 = function(arg0) {
911
892
  const ret = typeof(getObject(arg0)) === 'bigint';
912
893
  return ret;
913
894
  };
914
- imports.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
895
+ imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
915
896
  const ret = typeof(getObject(arg0)) === 'function';
916
897
  return ret;
917
898
  };
918
- imports.wbg.__wbg___wbindgen_is_null_5e69f72e906cc57c = function(arg0) {
899
+ imports.wbg.__wbg___wbindgen_is_null_dfda7d66506c95b5 = function(arg0) {
919
900
  const ret = getObject(arg0) === null;
920
901
  return ret;
921
902
  };
922
- imports.wbg.__wbg___wbindgen_is_object_c818261d21f283a4 = function(arg0) {
903
+ imports.wbg.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {
923
904
  const val = getObject(arg0);
924
905
  const ret = typeof(val) === 'object' && val !== null;
925
906
  return ret;
926
907
  };
927
- imports.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd = function(arg0) {
908
+ imports.wbg.__wbg___wbindgen_is_string_704ef9c8fc131030 = function(arg0) {
928
909
  const ret = typeof(getObject(arg0)) === 'string';
929
910
  return ret;
930
911
  };
931
- imports.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
912
+ imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
932
913
  const ret = getObject(arg0) === undefined;
933
914
  return ret;
934
915
  };
935
- imports.wbg.__wbg___wbindgen_jsval_eq_6b13ab83478b1c50 = function(arg0, arg1) {
916
+ imports.wbg.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36 = function(arg0, arg1) {
936
917
  const ret = getObject(arg0) === getObject(arg1);
937
918
  return ret;
938
919
  };
939
- imports.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147 = function(arg0, arg1) {
920
+ imports.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d = function(arg0, arg1) {
940
921
  const ret = getObject(arg0) == getObject(arg1);
941
922
  return ret;
942
923
  };
943
- imports.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
924
+ imports.wbg.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
944
925
  const obj = getObject(arg1);
945
926
  const ret = typeof(obj) === 'number' ? obj : undefined;
946
927
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
947
928
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
948
929
  };
949
- imports.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
930
+ imports.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
950
931
  const obj = getObject(arg1);
951
932
  const ret = typeof(obj) === 'string' ? obj : undefined;
952
933
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -954,22 +935,22 @@ function __wbg_get_imports() {
954
935
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
955
936
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
956
937
  };
957
- imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
938
+ imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
958
939
  throw new Error(getStringFromWasm0(arg0, arg1));
959
940
  };
960
- imports.wbg.__wbg_call_e762c39fa8ea36bf = function() { return handleError(function (arg0, arg1) {
941
+ imports.wbg.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
961
942
  const ret = getObject(arg0).call(getObject(arg1));
962
943
  return addHeapObject(ret);
963
944
  }, arguments) };
964
- imports.wbg.__wbg_codePointAt_01a186303396f7ad = function(arg0, arg1) {
945
+ imports.wbg.__wbg_codePointAt_6fd4439a1e465afd = function(arg0, arg1) {
965
946
  const ret = getObject(arg0).codePointAt(arg1 >>> 0);
966
947
  return addHeapObject(ret);
967
948
  };
968
- imports.wbg.__wbg_done_2042aa2670fb1db1 = function(arg0) {
949
+ imports.wbg.__wbg_done_62ea16af4ce34b24 = function(arg0) {
969
950
  const ret = getObject(arg0).done;
970
951
  return ret;
971
952
  };
972
- imports.wbg.__wbg_entries_e171b586f8f6bdbf = function(arg0) {
953
+ imports.wbg.__wbg_entries_83c79938054e065f = function(arg0) {
973
954
  const ret = Object.entries(getObject(arg0));
974
955
  return addHeapObject(ret);
975
956
  };
@@ -984,11 +965,11 @@ function __wbg_get_imports() {
984
965
  wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
985
966
  }
986
967
  };
987
- imports.wbg.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
968
+ imports.wbg.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {
988
969
  const ret = getObject(arg0)[arg1 >>> 0];
989
970
  return addHeapObject(ret);
990
971
  };
991
- imports.wbg.__wbg_get_efcb449f58ec27c2 = function() { return handleError(function (arg0, arg1) {
972
+ imports.wbg.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {
992
973
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
993
974
  return addHeapObject(ret);
994
975
  }, arguments) };
@@ -996,7 +977,7 @@ function __wbg_get_imports() {
996
977
  const ret = getObject(arg0)[getObject(arg1)];
997
978
  return addHeapObject(ret);
998
979
  };
999
- imports.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
980
+ imports.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {
1000
981
  let result;
1001
982
  try {
1002
983
  result = getObject(arg0) instanceof ArrayBuffer;
@@ -1006,7 +987,7 @@ function __wbg_get_imports() {
1006
987
  const ret = result;
1007
988
  return ret;
1008
989
  };
1009
- imports.wbg.__wbg_instanceof_Object_10bb762262230c68 = function(arg0) {
990
+ imports.wbg.__wbg_instanceof_Object_577e21051f7bcb79 = function(arg0) {
1010
991
  let result;
1011
992
  try {
1012
993
  result = getObject(arg0) instanceof Object;
@@ -1016,7 +997,7 @@ function __wbg_get_imports() {
1016
997
  const ret = result;
1017
998
  return ret;
1018
999
  };
1019
- imports.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
1000
+ imports.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) {
1020
1001
  let result;
1021
1002
  try {
1022
1003
  result = getObject(arg0) instanceof Uint8Array;
@@ -1026,69 +1007,69 @@ function __wbg_get_imports() {
1026
1007
  const ret = result;
1027
1008
  return ret;
1028
1009
  };
1029
- imports.wbg.__wbg_isArray_96e0af9891d0945d = function(arg0) {
1010
+ imports.wbg.__wbg_isArray_51fd9e6422c0a395 = function(arg0) {
1030
1011
  const ret = Array.isArray(getObject(arg0));
1031
1012
  return ret;
1032
1013
  };
1033
- imports.wbg.__wbg_isSafeInteger_d216eda7911dde36 = function(arg0) {
1014
+ imports.wbg.__wbg_isSafeInteger_ae7d3f054d55fa16 = function(arg0) {
1034
1015
  const ret = Number.isSafeInteger(getObject(arg0));
1035
1016
  return ret;
1036
1017
  };
1037
- imports.wbg.__wbg_iterator_e5822695327a3c39 = function() {
1018
+ imports.wbg.__wbg_iterator_27b7c8b35ab3e86b = function() {
1038
1019
  const ret = Symbol.iterator;
1039
1020
  return addHeapObject(ret);
1040
1021
  };
1041
- imports.wbg.__wbg_keys_b4d27b02ad14f4be = function(arg0) {
1022
+ imports.wbg.__wbg_keys_f5c6002ff150fc6c = function(arg0) {
1042
1023
  const ret = Object.keys(getObject(arg0));
1043
1024
  return addHeapObject(ret);
1044
1025
  };
1045
- imports.wbg.__wbg_length_69bca3cb64fc8748 = function(arg0) {
1026
+ imports.wbg.__wbg_length_1f83b8e5895c84aa = function(arg0) {
1046
1027
  const ret = getObject(arg0).length;
1047
1028
  return ret;
1048
1029
  };
1049
- imports.wbg.__wbg_length_a95b69f903b746c4 = function(arg0) {
1030
+ imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) {
1050
1031
  const ret = getObject(arg0).length;
1051
1032
  return ret;
1052
1033
  };
1053
- imports.wbg.__wbg_length_cdd215e10d9dd507 = function(arg0) {
1034
+ imports.wbg.__wbg_length_d45040a40c570362 = function(arg0) {
1054
1035
  const ret = getObject(arg0).length;
1055
1036
  return ret;
1056
1037
  };
1057
- imports.wbg.__wbg_new_1acc0b6eea89d040 = function() {
1038
+ imports.wbg.__wbg_new_1ba21ce319a06297 = function() {
1058
1039
  const ret = new Object();
1059
1040
  return addHeapObject(ret);
1060
1041
  };
1061
- imports.wbg.__wbg_new_5a79be3ab53b8aa5 = function(arg0) {
1042
+ imports.wbg.__wbg_new_6421f6084cc5bc5a = function(arg0) {
1062
1043
  const ret = new Uint8Array(getObject(arg0));
1063
1044
  return addHeapObject(ret);
1064
1045
  };
1065
- imports.wbg.__wbg_new_68651c719dcda04e = function() {
1066
- const ret = new Map();
1067
- return addHeapObject(ret);
1068
- };
1069
1046
  imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
1070
1047
  const ret = new Error();
1071
1048
  return addHeapObject(ret);
1072
1049
  };
1073
- imports.wbg.__wbg_new_from_slice_92f4d78ca282a2d2 = function(arg0, arg1) {
1074
- const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1050
+ imports.wbg.__wbg_new_b546ae120718850e = function() {
1051
+ const ret = new Map();
1075
1052
  return addHeapObject(ret);
1076
1053
  };
1077
- imports.wbg.__wbg_next_020810e0ae8ebcb0 = function() { return handleError(function (arg0) {
1078
- const ret = getObject(arg0).next();
1054
+ imports.wbg.__wbg_new_from_slice_f9c22b9153b26992 = function(arg0, arg1) {
1055
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1079
1056
  return addHeapObject(ret);
1080
- }, arguments) };
1081
- imports.wbg.__wbg_next_2c826fe5dfec6b6a = function(arg0) {
1057
+ };
1058
+ imports.wbg.__wbg_next_138a17bbf04e926c = function(arg0) {
1082
1059
  const ret = getObject(arg0).next;
1083
1060
  return addHeapObject(ret);
1084
1061
  };
1085
- imports.wbg.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
1062
+ imports.wbg.__wbg_next_3cfe5c0fe2a4cc53 = function() { return handleError(function (arg0) {
1063
+ const ret = getObject(arg0).next();
1064
+ return addHeapObject(ret);
1065
+ }, arguments) };
1066
+ imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
1086
1067
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
1087
1068
  };
1088
1069
  imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
1089
1070
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
1090
1071
  };
1091
- imports.wbg.__wbg_set_907fb406c34a251d = function(arg0, arg1, arg2) {
1072
+ imports.wbg.__wbg_set_efaaf145b9377369 = function(arg0, arg1, arg2) {
1092
1073
  const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
1093
1074
  return addHeapObject(ret);
1094
1075
  };
@@ -1099,7 +1080,7 @@ function __wbg_get_imports() {
1099
1080
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1100
1081
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1101
1082
  };
1102
- imports.wbg.__wbg_value_692627309814bb8c = function(arg0) {
1083
+ imports.wbg.__wbg_value_57b7b035e117f7ee = function(arg0) {
1103
1084
  const ret = getObject(arg0).value;
1104
1085
  return addHeapObject(ret);
1105
1086
  };
@@ -1157,13 +1138,10 @@ function initSync(module) {
1157
1138
  }
1158
1139
 
1159
1140
  const imports = __wbg_get_imports();
1160
-
1161
1141
  if (!(module instanceof WebAssembly.Module)) {
1162
1142
  module = new WebAssembly.Module(module);
1163
1143
  }
1164
-
1165
1144
  const instance = new WebAssembly.Instance(module, imports);
1166
-
1167
1145
  return __wbg_finalize_init(instance, module);
1168
1146
  }
1169
1147