@vector-im/matrix-wysiwyg 2.37.13 → 2.38.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.
@@ -0,0 +1,1889 @@
1
+ let wasm;
2
+ export function __wbg_set_wasm(val) {
3
+ wasm = val;
4
+ }
5
+
6
+
7
+ const heap = new Array(128).fill(undefined);
8
+
9
+ heap.push(undefined, null, true, false);
10
+
11
+ function getObject(idx) { return heap[idx]; }
12
+
13
+ let WASM_VECTOR_LEN = 0;
14
+
15
+ let cachedUint8Memory0 = null;
16
+
17
+ function getUint8Memory0() {
18
+ if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
19
+ cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
20
+ }
21
+ return cachedUint8Memory0;
22
+ }
23
+
24
+ const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
25
+
26
+ let cachedTextEncoder = new lTextEncoder('utf-8');
27
+
28
+ const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
29
+ ? function (arg, view) {
30
+ return cachedTextEncoder.encodeInto(arg, view);
31
+ }
32
+ : function (arg, view) {
33
+ const buf = cachedTextEncoder.encode(arg);
34
+ view.set(buf);
35
+ return {
36
+ read: arg.length,
37
+ written: buf.length
38
+ };
39
+ });
40
+
41
+ function passStringToWasm0(arg, malloc, realloc) {
42
+
43
+ if (realloc === undefined) {
44
+ const buf = cachedTextEncoder.encode(arg);
45
+ const ptr = malloc(buf.length, 1) >>> 0;
46
+ getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
47
+ WASM_VECTOR_LEN = buf.length;
48
+ return ptr;
49
+ }
50
+
51
+ let len = arg.length;
52
+ let ptr = malloc(len, 1) >>> 0;
53
+
54
+ const mem = getUint8Memory0();
55
+
56
+ let offset = 0;
57
+
58
+ for (; offset < len; offset++) {
59
+ const code = arg.charCodeAt(offset);
60
+ if (code > 0x7F) break;
61
+ mem[ptr + offset] = code;
62
+ }
63
+
64
+ if (offset !== len) {
65
+ if (offset !== 0) {
66
+ arg = arg.slice(offset);
67
+ }
68
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
69
+ const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
70
+ const ret = encodeString(arg, view);
71
+
72
+ offset += ret.written;
73
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
74
+ }
75
+
76
+ WASM_VECTOR_LEN = offset;
77
+ return ptr;
78
+ }
79
+
80
+ function isLikeNone(x) {
81
+ return x === undefined || x === null;
82
+ }
83
+
84
+ let cachedInt32Memory0 = null;
85
+
86
+ function getInt32Memory0() {
87
+ if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
88
+ cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
89
+ }
90
+ return cachedInt32Memory0;
91
+ }
92
+
93
+ let heap_next = heap.length;
94
+
95
+ function dropObject(idx) {
96
+ if (idx < 132) return;
97
+ heap[idx] = heap_next;
98
+ heap_next = idx;
99
+ }
100
+
101
+ function takeObject(idx) {
102
+ const ret = getObject(idx);
103
+ dropObject(idx);
104
+ return ret;
105
+ }
106
+
107
+ const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
108
+
109
+ let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
110
+
111
+ cachedTextDecoder.decode();
112
+
113
+ function getStringFromWasm0(ptr, len) {
114
+ ptr = ptr >>> 0;
115
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
116
+ }
117
+
118
+ function addHeapObject(obj) {
119
+ if (heap_next === heap.length) heap.push(heap.length + 1);
120
+ const idx = heap_next;
121
+ heap_next = heap[idx];
122
+
123
+ heap[idx] = obj;
124
+ return idx;
125
+ }
126
+ /**
127
+ */
128
+ export function start() {
129
+ wasm.start();
130
+ }
131
+
132
+ /**
133
+ * @returns {ComposerModel}
134
+ */
135
+ export function new_composer_model() {
136
+ const ret = wasm.composermodel_new();
137
+ return ComposerModel.__wrap(ret);
138
+ }
139
+
140
+ /**
141
+ * @param {string} html
142
+ * @param {number} start_utf16_codeunit
143
+ * @param {number} end_utf16_codeunit
144
+ * @returns {ComposerModel}
145
+ */
146
+ export function new_composer_model_from_html(html, start_utf16_codeunit, end_utf16_codeunit) {
147
+ const ptr0 = passStringToWasm0(html, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
148
+ const len0 = WASM_VECTOR_LEN;
149
+ const ret = wasm.new_composer_model_from_html(ptr0, len0, start_utf16_codeunit, end_utf16_codeunit);
150
+ return ComposerModel.__wrap(ret);
151
+ }
152
+
153
+ function _assertClass(instance, klass) {
154
+ if (!(instance instanceof klass)) {
155
+ throw new Error(`expected instance of ${klass.name}`);
156
+ }
157
+ return instance.ptr;
158
+ }
159
+ function __wbg_adapter_121(arg0, arg1, arg2, arg3, arg4) {
160
+ wasm.wasm_bindgen__convert__closures__invoke3_mut__h755216c79df6c7d9(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
161
+ }
162
+
163
+ function __wbg_adapter_124(arg0, arg1, arg2, arg3) {
164
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h5427b2b10c47063d(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
165
+ }
166
+
167
+ function handleError(f, args) {
168
+ try {
169
+ return f.apply(this, args);
170
+ } catch (e) {
171
+ wasm.__wbindgen_exn_store(addHeapObject(e));
172
+ }
173
+ }
174
+ /**
175
+ */
176
+ export const PatternKeyType = Object.freeze({ At:0,"0":"At",Hash:1,"1":"Hash",Slash:2,"2":"Slash",Custom:3,"3":"Custom", });
177
+ /**
178
+ */
179
+ export const DomCreationError = Object.freeze({ HtmlParseError:0,"0":"HtmlParseError",MarkdownParseError:1,"1":"MarkdownParseError", });
180
+ /**
181
+ */
182
+ export const ComposerAction = Object.freeze({ Bold:0,"0":"Bold",Italic:1,"1":"Italic",StrikeThrough:2,"2":"StrikeThrough",Underline:3,"3":"Underline",InlineCode:4,"4":"InlineCode",Link:5,"5":"Link",Undo:6,"6":"Undo",Redo:7,"7":"Redo",OrderedList:8,"8":"OrderedList",UnorderedList:9,"9":"UnorderedList",Indent:10,"10":"Indent",Unindent:11,"11":"Unindent",CodeBlock:12,"12":"CodeBlock",Quote:13,"13":"Quote", });
183
+ /**
184
+ */
185
+ export const ActionState = Object.freeze({
186
+ /**
187
+ * The button can be clicked, and will perform its normal action
188
+ * e.g. make something bold
189
+ */
190
+ Enabled:0,"0":"Enabled",
191
+ /**
192
+ * The button can be clicked, and will perform the reverse of its
193
+ * normal action e.g. stop something being bold
194
+ */
195
+ Reversed:1,"1":"Reversed",
196
+ /**
197
+ * The button cannot be clicked
198
+ */
199
+ Disabled:2,"2":"Disabled", });
200
+
201
+ const ComposerModelFinalization = (typeof FinalizationRegistry === 'undefined')
202
+ ? { register: () => {}, unregister: () => {} }
203
+ : new FinalizationRegistry(ptr => wasm.__wbg_composermodel_free(ptr >>> 0));
204
+ /**
205
+ */
206
+ export class ComposerModel {
207
+
208
+ static __wrap(ptr) {
209
+ ptr = ptr >>> 0;
210
+ const obj = Object.create(ComposerModel.prototype);
211
+ obj.__wbg_ptr = ptr;
212
+ ComposerModelFinalization.register(obj, obj.__wbg_ptr, obj);
213
+ return obj;
214
+ }
215
+
216
+ __destroy_into_raw() {
217
+ const ptr = this.__wbg_ptr;
218
+ this.__wbg_ptr = 0;
219
+ ComposerModelFinalization.unregister(this);
220
+ return ptr;
221
+ }
222
+
223
+ free() {
224
+ const ptr = this.__destroy_into_raw();
225
+ wasm.__wbg_composermodel_free(ptr);
226
+ }
227
+ /**
228
+ * @returns {ComposerModel}
229
+ */
230
+ static new() {
231
+ const ret = wasm.composermodel_new();
232
+ return ComposerModel.__wrap(ret);
233
+ }
234
+ /**
235
+ * @param {string} text
236
+ * @returns {ComposerModel}
237
+ */
238
+ static from_example_format(text) {
239
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
240
+ const len0 = WASM_VECTOR_LEN;
241
+ const ret = wasm.composermodel_from_example_format(ptr0, len0);
242
+ return ComposerModel.__wrap(ret);
243
+ }
244
+ /**
245
+ * @returns {string}
246
+ */
247
+ to_example_format() {
248
+ let deferred1_0;
249
+ let deferred1_1;
250
+ try {
251
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
252
+ wasm.composermodel_to_example_format(retptr, this.__wbg_ptr);
253
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
254
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
255
+ deferred1_0 = r0;
256
+ deferred1_1 = r1;
257
+ return getStringFromWasm0(r0, r1);
258
+ } finally {
259
+ wasm.__wbindgen_add_to_stack_pointer(16);
260
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
261
+ }
262
+ }
263
+ /**
264
+ * @returns {string}
265
+ */
266
+ get_content_as_html() {
267
+ let deferred1_0;
268
+ let deferred1_1;
269
+ try {
270
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
271
+ wasm.composermodel_get_content_as_html(retptr, this.__wbg_ptr);
272
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
273
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
274
+ deferred1_0 = r0;
275
+ deferred1_1 = r1;
276
+ return getStringFromWasm0(r0, r1);
277
+ } finally {
278
+ wasm.__wbindgen_add_to_stack_pointer(16);
279
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
280
+ }
281
+ }
282
+ /**
283
+ * @returns {string}
284
+ */
285
+ get_content_as_message_html() {
286
+ let deferred1_0;
287
+ let deferred1_1;
288
+ try {
289
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
290
+ wasm.composermodel_get_content_as_message_html(retptr, this.__wbg_ptr);
291
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
292
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
293
+ deferred1_0 = r0;
294
+ deferred1_1 = r1;
295
+ return getStringFromWasm0(r0, r1);
296
+ } finally {
297
+ wasm.__wbindgen_add_to_stack_pointer(16);
298
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
299
+ }
300
+ }
301
+ /**
302
+ * @returns {string}
303
+ */
304
+ get_content_as_markdown() {
305
+ let deferred1_0;
306
+ let deferred1_1;
307
+ try {
308
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
309
+ wasm.composermodel_get_content_as_markdown(retptr, this.__wbg_ptr);
310
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
311
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
312
+ deferred1_0 = r0;
313
+ deferred1_1 = r1;
314
+ return getStringFromWasm0(r0, r1);
315
+ } finally {
316
+ wasm.__wbindgen_add_to_stack_pointer(16);
317
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
318
+ }
319
+ }
320
+ /**
321
+ * @returns {string}
322
+ */
323
+ get_content_as_message_markdown() {
324
+ let deferred1_0;
325
+ let deferred1_1;
326
+ try {
327
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
328
+ wasm.composermodel_get_content_as_message_markdown(retptr, this.__wbg_ptr);
329
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
330
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
331
+ deferred1_0 = r0;
332
+ deferred1_1 = r1;
333
+ return getStringFromWasm0(r0, r1);
334
+ } finally {
335
+ wasm.__wbindgen_add_to_stack_pointer(16);
336
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
337
+ }
338
+ }
339
+ /**
340
+ * @returns {string}
341
+ */
342
+ get_content_as_plain_text() {
343
+ let deferred1_0;
344
+ let deferred1_1;
345
+ try {
346
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
347
+ wasm.composermodel_get_content_as_plain_text(retptr, this.__wbg_ptr);
348
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
349
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
350
+ deferred1_0 = r0;
351
+ deferred1_1 = r1;
352
+ return getStringFromWasm0(r0, r1);
353
+ } finally {
354
+ wasm.__wbindgen_add_to_stack_pointer(16);
355
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
356
+ }
357
+ }
358
+ /**
359
+ * @returns {DomHandle}
360
+ */
361
+ document() {
362
+ const ret = wasm.composermodel_document(this.__wbg_ptr);
363
+ return DomHandle.__wrap(ret);
364
+ }
365
+ /**
366
+ * @returns {Map<any, any>}
367
+ */
368
+ action_states() {
369
+ const ret = wasm.composermodel_action_states(this.__wbg_ptr);
370
+ return takeObject(ret);
371
+ }
372
+ /**
373
+ * @param {number} start_utf16_codeunit
374
+ * @param {number} end_utf16_codeunit
375
+ * @returns {ComposerUpdate}
376
+ */
377
+ select(start_utf16_codeunit, end_utf16_codeunit) {
378
+ const ret = wasm.composermodel_select(this.__wbg_ptr, start_utf16_codeunit, end_utf16_codeunit);
379
+ return ComposerUpdate.__wrap(ret);
380
+ }
381
+ /**
382
+ * @returns {number}
383
+ */
384
+ selection_start() {
385
+ const ret = wasm.composermodel_selection_start(this.__wbg_ptr);
386
+ return ret >>> 0;
387
+ }
388
+ /**
389
+ * @returns {number}
390
+ */
391
+ selection_end() {
392
+ const ret = wasm.composermodel_selection_end(this.__wbg_ptr);
393
+ return ret >>> 0;
394
+ }
395
+ /**
396
+ * @param {string} new_text
397
+ * @returns {ComposerUpdate}
398
+ */
399
+ replace_text(new_text) {
400
+ const ptr0 = passStringToWasm0(new_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
401
+ const len0 = WASM_VECTOR_LEN;
402
+ const ret = wasm.composermodel_replace_text(this.__wbg_ptr, ptr0, len0);
403
+ return ComposerUpdate.__wrap(ret);
404
+ }
405
+ /**
406
+ * @param {string} new_text
407
+ * @param {SuggestionPattern} suggestion
408
+ * @param {boolean} append_space
409
+ * @returns {ComposerUpdate}
410
+ */
411
+ replace_text_suggestion(new_text, suggestion, append_space) {
412
+ const ptr0 = passStringToWasm0(new_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
413
+ const len0 = WASM_VECTOR_LEN;
414
+ _assertClass(suggestion, SuggestionPattern);
415
+ const ret = wasm.composermodel_replace_text_suggestion(this.__wbg_ptr, ptr0, len0, suggestion.__wbg_ptr, append_space);
416
+ return ComposerUpdate.__wrap(ret);
417
+ }
418
+ /**
419
+ * @param {string} text
420
+ * @returns {ComposerUpdate}
421
+ */
422
+ set_content_from_html(text) {
423
+ try {
424
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
425
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
426
+ const len0 = WASM_VECTOR_LEN;
427
+ wasm.composermodel_set_content_from_html(retptr, this.__wbg_ptr, ptr0, len0);
428
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
429
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
430
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
431
+ if (r2) {
432
+ throw takeObject(r1);
433
+ }
434
+ return ComposerUpdate.__wrap(r0);
435
+ } finally {
436
+ wasm.__wbindgen_add_to_stack_pointer(16);
437
+ }
438
+ }
439
+ /**
440
+ * @param {string} text
441
+ * @returns {ComposerUpdate}
442
+ */
443
+ set_content_from_markdown(text) {
444
+ try {
445
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
446
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
447
+ const len0 = WASM_VECTOR_LEN;
448
+ wasm.composermodel_set_content_from_markdown(retptr, this.__wbg_ptr, ptr0, len0);
449
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
450
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
451
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
452
+ if (r2) {
453
+ throw takeObject(r1);
454
+ }
455
+ return ComposerUpdate.__wrap(r0);
456
+ } finally {
457
+ wasm.__wbindgen_add_to_stack_pointer(16);
458
+ }
459
+ }
460
+ /**
461
+ * @returns {ComposerUpdate}
462
+ */
463
+ clear() {
464
+ const ret = wasm.composermodel_clear(this.__wbg_ptr);
465
+ return ComposerUpdate.__wrap(ret);
466
+ }
467
+ /**
468
+ * @returns {ComposerUpdate}
469
+ */
470
+ enter() {
471
+ const ret = wasm.composermodel_enter(this.__wbg_ptr);
472
+ return ComposerUpdate.__wrap(ret);
473
+ }
474
+ /**
475
+ * @returns {ComposerUpdate}
476
+ */
477
+ backspace() {
478
+ const ret = wasm.composermodel_backspace(this.__wbg_ptr);
479
+ return ComposerUpdate.__wrap(ret);
480
+ }
481
+ /**
482
+ * @returns {ComposerUpdate}
483
+ */
484
+ backspace_word() {
485
+ const ret = wasm.composermodel_backspace_word(this.__wbg_ptr);
486
+ return ComposerUpdate.__wrap(ret);
487
+ }
488
+ /**
489
+ * @returns {ComposerUpdate}
490
+ */
491
+ delete() {
492
+ const ret = wasm.composermodel_delete(this.__wbg_ptr);
493
+ return ComposerUpdate.__wrap(ret);
494
+ }
495
+ /**
496
+ * @returns {ComposerUpdate}
497
+ */
498
+ delete_word() {
499
+ const ret = wasm.composermodel_delete_word(this.__wbg_ptr);
500
+ return ComposerUpdate.__wrap(ret);
501
+ }
502
+ /**
503
+ * @returns {ComposerUpdate}
504
+ */
505
+ bold() {
506
+ const ret = wasm.composermodel_bold(this.__wbg_ptr);
507
+ return ComposerUpdate.__wrap(ret);
508
+ }
509
+ /**
510
+ * @returns {ComposerUpdate}
511
+ */
512
+ italic() {
513
+ const ret = wasm.composermodel_italic(this.__wbg_ptr);
514
+ return ComposerUpdate.__wrap(ret);
515
+ }
516
+ /**
517
+ * @returns {ComposerUpdate}
518
+ */
519
+ strike_through() {
520
+ const ret = wasm.composermodel_strike_through(this.__wbg_ptr);
521
+ return ComposerUpdate.__wrap(ret);
522
+ }
523
+ /**
524
+ * @returns {ComposerUpdate}
525
+ */
526
+ underline() {
527
+ const ret = wasm.composermodel_underline(this.__wbg_ptr);
528
+ return ComposerUpdate.__wrap(ret);
529
+ }
530
+ /**
531
+ * @returns {ComposerUpdate}
532
+ */
533
+ quote() {
534
+ const ret = wasm.composermodel_quote(this.__wbg_ptr);
535
+ return ComposerUpdate.__wrap(ret);
536
+ }
537
+ /**
538
+ * @returns {ComposerUpdate}
539
+ */
540
+ inline_code() {
541
+ const ret = wasm.composermodel_inline_code(this.__wbg_ptr);
542
+ return ComposerUpdate.__wrap(ret);
543
+ }
544
+ /**
545
+ * @returns {ComposerUpdate}
546
+ */
547
+ code_block() {
548
+ const ret = wasm.composermodel_code_block(this.__wbg_ptr);
549
+ return ComposerUpdate.__wrap(ret);
550
+ }
551
+ /**
552
+ * @returns {ComposerUpdate}
553
+ */
554
+ undo() {
555
+ const ret = wasm.composermodel_undo(this.__wbg_ptr);
556
+ return ComposerUpdate.__wrap(ret);
557
+ }
558
+ /**
559
+ * @returns {ComposerUpdate}
560
+ */
561
+ redo() {
562
+ const ret = wasm.composermodel_redo(this.__wbg_ptr);
563
+ return ComposerUpdate.__wrap(ret);
564
+ }
565
+ /**
566
+ * @returns {ComposerUpdate}
567
+ */
568
+ ordered_list() {
569
+ const ret = wasm.composermodel_ordered_list(this.__wbg_ptr);
570
+ return ComposerUpdate.__wrap(ret);
571
+ }
572
+ /**
573
+ * @returns {ComposerUpdate}
574
+ */
575
+ unordered_list() {
576
+ const ret = wasm.composermodel_unordered_list(this.__wbg_ptr);
577
+ return ComposerUpdate.__wrap(ret);
578
+ }
579
+ /**
580
+ * @returns {ComposerUpdate}
581
+ */
582
+ indent() {
583
+ const ret = wasm.composermodel_indent(this.__wbg_ptr);
584
+ return ComposerUpdate.__wrap(ret);
585
+ }
586
+ /**
587
+ * @returns {ComposerUpdate}
588
+ */
589
+ unindent() {
590
+ const ret = wasm.composermodel_unindent(this.__wbg_ptr);
591
+ return ComposerUpdate.__wrap(ret);
592
+ }
593
+ /**
594
+ * @returns {LinkAction}
595
+ */
596
+ get_link_action() {
597
+ const ret = wasm.composermodel_get_link_action(this.__wbg_ptr);
598
+ return LinkAction.__wrap(ret);
599
+ }
600
+ /**
601
+ * @param {string} url
602
+ * @param {Map<any, any>} attributes
603
+ * @returns {ComposerUpdate}
604
+ */
605
+ set_link(url, attributes) {
606
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
607
+ const len0 = WASM_VECTOR_LEN;
608
+ const ret = wasm.composermodel_set_link(this.__wbg_ptr, ptr0, len0, addHeapObject(attributes));
609
+ return ComposerUpdate.__wrap(ret);
610
+ }
611
+ /**
612
+ * @param {string} url
613
+ * @param {string} text
614
+ * @param {Map<any, any>} attributes
615
+ * @returns {ComposerUpdate}
616
+ */
617
+ set_link_with_text(url, text, attributes) {
618
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
619
+ const len0 = WASM_VECTOR_LEN;
620
+ const ptr1 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
621
+ const len1 = WASM_VECTOR_LEN;
622
+ const ret = wasm.composermodel_set_link_with_text(this.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(attributes));
623
+ return ComposerUpdate.__wrap(ret);
624
+ }
625
+ /**
626
+ * @param {Array<any>} custom_suggestion_patterns
627
+ */
628
+ set_custom_suggestion_patterns(custom_suggestion_patterns) {
629
+ wasm.composermodel_set_custom_suggestion_patterns(this.__wbg_ptr, addHeapObject(custom_suggestion_patterns));
630
+ }
631
+ /**
632
+ * Creates an at-room mention node and inserts it into the composer at the current selection
633
+ * @param {Map<any, any>} attributes
634
+ * @returns {ComposerUpdate}
635
+ */
636
+ insert_at_room_mention(attributes) {
637
+ const ret = wasm.composermodel_insert_at_room_mention(this.__wbg_ptr, addHeapObject(attributes));
638
+ return ComposerUpdate.__wrap(ret);
639
+ }
640
+ /**
641
+ * Creates a mention node and inserts it into the composer at the current selection
642
+ * @param {string} url
643
+ * @param {string} text
644
+ * @param {Map<any, any>} attributes
645
+ * @returns {ComposerUpdate}
646
+ */
647
+ insert_mention(url, text, attributes) {
648
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
649
+ const len0 = WASM_VECTOR_LEN;
650
+ const ptr1 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
651
+ const len1 = WASM_VECTOR_LEN;
652
+ const ret = wasm.composermodel_insert_mention(this.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(attributes));
653
+ return ComposerUpdate.__wrap(ret);
654
+ }
655
+ /**
656
+ * Creates an at-room mention node and inserts it into the composer, replacing the
657
+ * text content defined by the suggestion
658
+ * @param {SuggestionPattern} suggestion
659
+ * @param {Map<any, any>} attributes
660
+ * @returns {ComposerUpdate}
661
+ */
662
+ insert_at_room_mention_at_suggestion(suggestion, attributes) {
663
+ _assertClass(suggestion, SuggestionPattern);
664
+ const ret = wasm.composermodel_insert_at_room_mention_at_suggestion(this.__wbg_ptr, suggestion.__wbg_ptr, addHeapObject(attributes));
665
+ return ComposerUpdate.__wrap(ret);
666
+ }
667
+ /**
668
+ * Creates a mention node and inserts it into the composer, replacing the
669
+ * text content defined by the suggestion
670
+ * @param {string} url
671
+ * @param {string} text
672
+ * @param {SuggestionPattern} suggestion
673
+ * @param {Map<any, any>} attributes
674
+ * @returns {ComposerUpdate}
675
+ */
676
+ insert_mention_at_suggestion(url, text, suggestion, attributes) {
677
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
678
+ const len0 = WASM_VECTOR_LEN;
679
+ const ptr1 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
680
+ const len1 = WASM_VECTOR_LEN;
681
+ _assertClass(suggestion, SuggestionPattern);
682
+ const ret = wasm.composermodel_insert_mention_at_suggestion(this.__wbg_ptr, ptr0, len0, ptr1, len1, suggestion.__wbg_ptr, addHeapObject(attributes));
683
+ return ComposerUpdate.__wrap(ret);
684
+ }
685
+ /**
686
+ * @returns {ComposerUpdate}
687
+ */
688
+ remove_links() {
689
+ const ret = wasm.composermodel_remove_links(this.__wbg_ptr);
690
+ return ComposerUpdate.__wrap(ret);
691
+ }
692
+ }
693
+
694
+ const ComposerUpdateFinalization = (typeof FinalizationRegistry === 'undefined')
695
+ ? { register: () => {}, unregister: () => {} }
696
+ : new FinalizationRegistry(ptr => wasm.__wbg_composerupdate_free(ptr >>> 0));
697
+ /**
698
+ */
699
+ export class ComposerUpdate {
700
+
701
+ static __wrap(ptr) {
702
+ ptr = ptr >>> 0;
703
+ const obj = Object.create(ComposerUpdate.prototype);
704
+ obj.__wbg_ptr = ptr;
705
+ ComposerUpdateFinalization.register(obj, obj.__wbg_ptr, obj);
706
+ return obj;
707
+ }
708
+
709
+ __destroy_into_raw() {
710
+ const ptr = this.__wbg_ptr;
711
+ this.__wbg_ptr = 0;
712
+ ComposerUpdateFinalization.unregister(this);
713
+ return ptr;
714
+ }
715
+
716
+ free() {
717
+ const ptr = this.__destroy_into_raw();
718
+ wasm.__wbg_composerupdate_free(ptr);
719
+ }
720
+ /**
721
+ * @returns {TextUpdate}
722
+ */
723
+ text_update() {
724
+ const ret = wasm.composerupdate_text_update(this.__wbg_ptr);
725
+ return TextUpdate.__wrap(ret);
726
+ }
727
+ /**
728
+ * @returns {MenuState}
729
+ */
730
+ menu_state() {
731
+ const ret = wasm.composerupdate_menu_state(this.__wbg_ptr);
732
+ return MenuState.__wrap(ret);
733
+ }
734
+ /**
735
+ * @returns {MenuAction}
736
+ */
737
+ menu_action() {
738
+ const ret = wasm.composerupdate_menu_action(this.__wbg_ptr);
739
+ return MenuAction.__wrap(ret);
740
+ }
741
+ }
742
+
743
+ const CreateFinalization = (typeof FinalizationRegistry === 'undefined')
744
+ ? { register: () => {}, unregister: () => {} }
745
+ : new FinalizationRegistry(ptr => wasm.__wbg_create_free(ptr >>> 0));
746
+ /**
747
+ */
748
+ export class Create {
749
+
750
+ static __wrap(ptr) {
751
+ ptr = ptr >>> 0;
752
+ const obj = Object.create(Create.prototype);
753
+ obj.__wbg_ptr = ptr;
754
+ CreateFinalization.register(obj, obj.__wbg_ptr, obj);
755
+ return obj;
756
+ }
757
+
758
+ __destroy_into_raw() {
759
+ const ptr = this.__wbg_ptr;
760
+ this.__wbg_ptr = 0;
761
+ CreateFinalization.unregister(this);
762
+ return ptr;
763
+ }
764
+
765
+ free() {
766
+ const ptr = this.__destroy_into_raw();
767
+ wasm.__wbg_create_free(ptr);
768
+ }
769
+ }
770
+
771
+ const CreateWithTextFinalization = (typeof FinalizationRegistry === 'undefined')
772
+ ? { register: () => {}, unregister: () => {} }
773
+ : new FinalizationRegistry(ptr => wasm.__wbg_createwithtext_free(ptr >>> 0));
774
+ /**
775
+ */
776
+ export class CreateWithText {
777
+
778
+ static __wrap(ptr) {
779
+ ptr = ptr >>> 0;
780
+ const obj = Object.create(CreateWithText.prototype);
781
+ obj.__wbg_ptr = ptr;
782
+ CreateWithTextFinalization.register(obj, obj.__wbg_ptr, obj);
783
+ return obj;
784
+ }
785
+
786
+ __destroy_into_raw() {
787
+ const ptr = this.__wbg_ptr;
788
+ this.__wbg_ptr = 0;
789
+ CreateWithTextFinalization.unregister(this);
790
+ return ptr;
791
+ }
792
+
793
+ free() {
794
+ const ptr = this.__destroy_into_raw();
795
+ wasm.__wbg_createwithtext_free(ptr);
796
+ }
797
+ }
798
+
799
+ const DisabledFinalization = (typeof FinalizationRegistry === 'undefined')
800
+ ? { register: () => {}, unregister: () => {} }
801
+ : new FinalizationRegistry(ptr => wasm.__wbg_disabled_free(ptr >>> 0));
802
+ /**
803
+ */
804
+ export class Disabled {
805
+
806
+ static __wrap(ptr) {
807
+ ptr = ptr >>> 0;
808
+ const obj = Object.create(Disabled.prototype);
809
+ obj.__wbg_ptr = ptr;
810
+ DisabledFinalization.register(obj, obj.__wbg_ptr, obj);
811
+ return obj;
812
+ }
813
+
814
+ __destroy_into_raw() {
815
+ const ptr = this.__wbg_ptr;
816
+ this.__wbg_ptr = 0;
817
+ DisabledFinalization.unregister(this);
818
+ return ptr;
819
+ }
820
+
821
+ free() {
822
+ const ptr = this.__destroy_into_raw();
823
+ wasm.__wbg_disabled_free(ptr);
824
+ }
825
+ }
826
+
827
+ const DomChildrenFinalization = (typeof FinalizationRegistry === 'undefined')
828
+ ? { register: () => {}, unregister: () => {} }
829
+ : new FinalizationRegistry(ptr => wasm.__wbg_domchildren_free(ptr >>> 0));
830
+ /**
831
+ * An iterator-like view of a DomHandle's children, written to work around
832
+ * the lack of support for returning Vec<T> in wasm_bindgen.
833
+ */
834
+ export class DomChildren {
835
+
836
+ static __wrap(ptr) {
837
+ ptr = ptr >>> 0;
838
+ const obj = Object.create(DomChildren.prototype);
839
+ obj.__wbg_ptr = ptr;
840
+ DomChildrenFinalization.register(obj, obj.__wbg_ptr, obj);
841
+ return obj;
842
+ }
843
+
844
+ __destroy_into_raw() {
845
+ const ptr = this.__wbg_ptr;
846
+ this.__wbg_ptr = 0;
847
+ DomChildrenFinalization.unregister(this);
848
+ return ptr;
849
+ }
850
+
851
+ free() {
852
+ const ptr = this.__destroy_into_raw();
853
+ wasm.__wbg_domchildren_free(ptr);
854
+ }
855
+ /**
856
+ * @returns {DomHandle | undefined}
857
+ */
858
+ next_child() {
859
+ const ret = wasm.domchildren_next_child(this.__wbg_ptr);
860
+ return ret === 0 ? undefined : DomHandle.__wrap(ret);
861
+ }
862
+ }
863
+
864
+ const DomHandleFinalization = (typeof FinalizationRegistry === 'undefined')
865
+ ? { register: () => {}, unregister: () => {} }
866
+ : new FinalizationRegistry(ptr => wasm.__wbg_domhandle_free(ptr >>> 0));
867
+ /**
868
+ * Refers to a node in the composer model.
869
+ */
870
+ export class DomHandle {
871
+
872
+ static __wrap(ptr) {
873
+ ptr = ptr >>> 0;
874
+ const obj = Object.create(DomHandle.prototype);
875
+ obj.__wbg_ptr = ptr;
876
+ DomHandleFinalization.register(obj, obj.__wbg_ptr, obj);
877
+ return obj;
878
+ }
879
+
880
+ __destroy_into_raw() {
881
+ const ptr = this.__wbg_ptr;
882
+ this.__wbg_ptr = 0;
883
+ DomHandleFinalization.unregister(this);
884
+ return ptr;
885
+ }
886
+
887
+ free() {
888
+ const ptr = this.__destroy_into_raw();
889
+ wasm.__wbg_domhandle_free(ptr);
890
+ }
891
+ /**
892
+ * Returns "container", "line_break", "text" or "zwsp" depending on the type of
893
+ * node we refer to.
894
+ * Panics if we are not a valid reference (because the model has changed
895
+ * since we were created, or because you passed in a different model
896
+ * from the one that created us.)
897
+ * @param {ComposerModel} model
898
+ * @returns {string}
899
+ */
900
+ node_type(model) {
901
+ let deferred1_0;
902
+ let deferred1_1;
903
+ try {
904
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
905
+ _assertClass(model, ComposerModel);
906
+ wasm.domhandle_node_type(retptr, this.__wbg_ptr, model.__wbg_ptr);
907
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
908
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
909
+ deferred1_0 = r0;
910
+ deferred1_1 = r1;
911
+ return getStringFromWasm0(r0, r1);
912
+ } finally {
913
+ wasm.__wbindgen_add_to_stack_pointer(16);
914
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
915
+ }
916
+ }
917
+ /**
918
+ * Returns a list of our children nodes, or an empty list if we refer
919
+ * to a text or line break node.
920
+ * Panics if we are not a valid reference (because the model has changed
921
+ * since we were created, or because you passed in a different model
922
+ * from the one that created us.)
923
+ * @param {ComposerModel} model
924
+ * @returns {DomChildren}
925
+ */
926
+ children(model) {
927
+ _assertClass(model, ComposerModel);
928
+ const ret = wasm.domhandle_children(this.__wbg_ptr, model.__wbg_ptr);
929
+ return DomChildren.__wrap(ret);
930
+ }
931
+ /**
932
+ * Returns the text of this node, or an empty string if this is a
933
+ * container or line break.
934
+ * Panics if we are not a valid reference (because the model has changed
935
+ * since we were created, or because you passed in a different model
936
+ * from the one that created us.)
937
+ * @param {ComposerModel} model
938
+ * @returns {string}
939
+ */
940
+ text(model) {
941
+ let deferred1_0;
942
+ let deferred1_1;
943
+ try {
944
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
945
+ _assertClass(model, ComposerModel);
946
+ wasm.domhandle_text(retptr, this.__wbg_ptr, model.__wbg_ptr);
947
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
948
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
949
+ deferred1_0 = r0;
950
+ deferred1_1 = r1;
951
+ return getStringFromWasm0(r0, r1);
952
+ } finally {
953
+ wasm.__wbindgen_add_to_stack_pointer(16);
954
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
955
+ }
956
+ }
957
+ /**
958
+ * Returns our tagname, or "-text-"/"-zwsp-" if we are a text/zwsp node.
959
+ * Panics if we are not a valid reference (because the model has changed
960
+ * since we were created, or because you passed in a different model
961
+ * from the one that created us.)
962
+ * @param {ComposerModel} model
963
+ * @returns {string}
964
+ */
965
+ tag(model) {
966
+ let deferred1_0;
967
+ let deferred1_1;
968
+ try {
969
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
970
+ _assertClass(model, ComposerModel);
971
+ wasm.domhandle_tag(retptr, this.__wbg_ptr, model.__wbg_ptr);
972
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
973
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
974
+ deferred1_0 = r0;
975
+ deferred1_1 = r1;
976
+ return getStringFromWasm0(r0, r1);
977
+ } finally {
978
+ wasm.__wbindgen_add_to_stack_pointer(16);
979
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
980
+ }
981
+ }
982
+ }
983
+
984
+ const EditFinalization = (typeof FinalizationRegistry === 'undefined')
985
+ ? { register: () => {}, unregister: () => {} }
986
+ : new FinalizationRegistry(ptr => wasm.__wbg_edit_free(ptr >>> 0));
987
+ /**
988
+ */
989
+ export class Edit {
990
+
991
+ static __wrap(ptr) {
992
+ ptr = ptr >>> 0;
993
+ const obj = Object.create(Edit.prototype);
994
+ obj.__wbg_ptr = ptr;
995
+ EditFinalization.register(obj, obj.__wbg_ptr, obj);
996
+ return obj;
997
+ }
998
+
999
+ __destroy_into_raw() {
1000
+ const ptr = this.__wbg_ptr;
1001
+ this.__wbg_ptr = 0;
1002
+ EditFinalization.unregister(this);
1003
+ return ptr;
1004
+ }
1005
+
1006
+ free() {
1007
+ const ptr = this.__destroy_into_raw();
1008
+ wasm.__wbg_edit_free(ptr);
1009
+ }
1010
+ /**
1011
+ * @returns {string}
1012
+ */
1013
+ get url() {
1014
+ let deferred1_0;
1015
+ let deferred1_1;
1016
+ try {
1017
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1018
+ wasm.__wbg_get_edit_url(retptr, this.__wbg_ptr);
1019
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1020
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1021
+ deferred1_0 = r0;
1022
+ deferred1_1 = r1;
1023
+ return getStringFromWasm0(r0, r1);
1024
+ } finally {
1025
+ wasm.__wbindgen_add_to_stack_pointer(16);
1026
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1027
+ }
1028
+ }
1029
+ /**
1030
+ * @param {string} arg0
1031
+ */
1032
+ set url(arg0) {
1033
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1034
+ const len0 = WASM_VECTOR_LEN;
1035
+ wasm.__wbg_set_edit_url(this.__wbg_ptr, ptr0, len0);
1036
+ }
1037
+ }
1038
+
1039
+ const KeepFinalization = (typeof FinalizationRegistry === 'undefined')
1040
+ ? { register: () => {}, unregister: () => {} }
1041
+ : new FinalizationRegistry(ptr => wasm.__wbg_keep_free(ptr >>> 0));
1042
+ /**
1043
+ */
1044
+ export class Keep {
1045
+
1046
+ static __wrap(ptr) {
1047
+ ptr = ptr >>> 0;
1048
+ const obj = Object.create(Keep.prototype);
1049
+ obj.__wbg_ptr = ptr;
1050
+ KeepFinalization.register(obj, obj.__wbg_ptr, obj);
1051
+ return obj;
1052
+ }
1053
+
1054
+ __destroy_into_raw() {
1055
+ const ptr = this.__wbg_ptr;
1056
+ this.__wbg_ptr = 0;
1057
+ KeepFinalization.unregister(this);
1058
+ return ptr;
1059
+ }
1060
+
1061
+ free() {
1062
+ const ptr = this.__destroy_into_raw();
1063
+ wasm.__wbg_keep_free(ptr);
1064
+ }
1065
+ }
1066
+
1067
+ const LinkActionFinalization = (typeof FinalizationRegistry === 'undefined')
1068
+ ? { register: () => {}, unregister: () => {} }
1069
+ : new FinalizationRegistry(ptr => wasm.__wbg_linkaction_free(ptr >>> 0));
1070
+ /**
1071
+ */
1072
+ export class LinkAction {
1073
+
1074
+ static __wrap(ptr) {
1075
+ ptr = ptr >>> 0;
1076
+ const obj = Object.create(LinkAction.prototype);
1077
+ obj.__wbg_ptr = ptr;
1078
+ LinkActionFinalization.register(obj, obj.__wbg_ptr, obj);
1079
+ return obj;
1080
+ }
1081
+
1082
+ __destroy_into_raw() {
1083
+ const ptr = this.__wbg_ptr;
1084
+ this.__wbg_ptr = 0;
1085
+ LinkActionFinalization.unregister(this);
1086
+ return ptr;
1087
+ }
1088
+
1089
+ free() {
1090
+ const ptr = this.__destroy_into_raw();
1091
+ wasm.__wbg_linkaction_free(ptr);
1092
+ }
1093
+ /**
1094
+ * @returns {CreateWithText | undefined}
1095
+ */
1096
+ get create_with_text() {
1097
+ const ret = wasm.__wbg_get_linkaction_create_with_text(this.__wbg_ptr);
1098
+ return ret === 0 ? undefined : CreateWithText.__wrap(ret);
1099
+ }
1100
+ /**
1101
+ * @param {CreateWithText | undefined} [arg0]
1102
+ */
1103
+ set create_with_text(arg0) {
1104
+ let ptr0 = 0;
1105
+ if (!isLikeNone(arg0)) {
1106
+ _assertClass(arg0, CreateWithText);
1107
+ ptr0 = arg0.__destroy_into_raw();
1108
+ }
1109
+ wasm.__wbg_set_linkaction_create_with_text(this.__wbg_ptr, ptr0);
1110
+ }
1111
+ /**
1112
+ * @returns {Create | undefined}
1113
+ */
1114
+ get create() {
1115
+ const ret = wasm.__wbg_get_linkaction_create(this.__wbg_ptr);
1116
+ return ret === 0 ? undefined : Create.__wrap(ret);
1117
+ }
1118
+ /**
1119
+ * @param {Create | undefined} [arg0]
1120
+ */
1121
+ set create(arg0) {
1122
+ let ptr0 = 0;
1123
+ if (!isLikeNone(arg0)) {
1124
+ _assertClass(arg0, Create);
1125
+ ptr0 = arg0.__destroy_into_raw();
1126
+ }
1127
+ wasm.__wbg_set_linkaction_create(this.__wbg_ptr, ptr0);
1128
+ }
1129
+ /**
1130
+ * @returns {Edit | undefined}
1131
+ */
1132
+ get edit_link() {
1133
+ const ret = wasm.__wbg_get_linkaction_edit_link(this.__wbg_ptr);
1134
+ return ret === 0 ? undefined : Edit.__wrap(ret);
1135
+ }
1136
+ /**
1137
+ * @param {Edit | undefined} [arg0]
1138
+ */
1139
+ set edit_link(arg0) {
1140
+ let ptr0 = 0;
1141
+ if (!isLikeNone(arg0)) {
1142
+ _assertClass(arg0, Edit);
1143
+ ptr0 = arg0.__destroy_into_raw();
1144
+ }
1145
+ wasm.__wbg_set_linkaction_edit_link(this.__wbg_ptr, ptr0);
1146
+ }
1147
+ /**
1148
+ * @returns {Disabled | undefined}
1149
+ */
1150
+ get disabled() {
1151
+ const ret = wasm.__wbg_get_linkaction_disabled(this.__wbg_ptr);
1152
+ return ret === 0 ? undefined : Disabled.__wrap(ret);
1153
+ }
1154
+ /**
1155
+ * @param {Disabled | undefined} [arg0]
1156
+ */
1157
+ set disabled(arg0) {
1158
+ let ptr0 = 0;
1159
+ if (!isLikeNone(arg0)) {
1160
+ _assertClass(arg0, Disabled);
1161
+ ptr0 = arg0.__destroy_into_raw();
1162
+ }
1163
+ wasm.__wbg_set_linkaction_disabled(this.__wbg_ptr, ptr0);
1164
+ }
1165
+ }
1166
+
1167
+ const MenuActionFinalization = (typeof FinalizationRegistry === 'undefined')
1168
+ ? { register: () => {}, unregister: () => {} }
1169
+ : new FinalizationRegistry(ptr => wasm.__wbg_menuaction_free(ptr >>> 0));
1170
+ /**
1171
+ */
1172
+ export class MenuAction {
1173
+
1174
+ static __wrap(ptr) {
1175
+ ptr = ptr >>> 0;
1176
+ const obj = Object.create(MenuAction.prototype);
1177
+ obj.__wbg_ptr = ptr;
1178
+ MenuActionFinalization.register(obj, obj.__wbg_ptr, obj);
1179
+ return obj;
1180
+ }
1181
+
1182
+ __destroy_into_raw() {
1183
+ const ptr = this.__wbg_ptr;
1184
+ this.__wbg_ptr = 0;
1185
+ MenuActionFinalization.unregister(this);
1186
+ return ptr;
1187
+ }
1188
+
1189
+ free() {
1190
+ const ptr = this.__destroy_into_raw();
1191
+ wasm.__wbg_menuaction_free(ptr);
1192
+ }
1193
+ /**
1194
+ * @returns {boolean}
1195
+ */
1196
+ keep() {
1197
+ const ret = wasm.menuaction_keep(this.__wbg_ptr);
1198
+ return ret !== 0;
1199
+ }
1200
+ /**
1201
+ * @returns {boolean}
1202
+ */
1203
+ none() {
1204
+ const ret = wasm.menuaction_none(this.__wbg_ptr);
1205
+ return ret !== 0;
1206
+ }
1207
+ /**
1208
+ * @returns {MenuActionSuggestion | undefined}
1209
+ */
1210
+ suggestion() {
1211
+ const ret = wasm.menuaction_suggestion(this.__wbg_ptr);
1212
+ return ret === 0 ? undefined : MenuActionSuggestion.__wrap(ret);
1213
+ }
1214
+ }
1215
+
1216
+ const MenuActionSuggestionFinalization = (typeof FinalizationRegistry === 'undefined')
1217
+ ? { register: () => {}, unregister: () => {} }
1218
+ : new FinalizationRegistry(ptr => wasm.__wbg_menuactionsuggestion_free(ptr >>> 0));
1219
+ /**
1220
+ */
1221
+ export class MenuActionSuggestion {
1222
+
1223
+ static __wrap(ptr) {
1224
+ ptr = ptr >>> 0;
1225
+ const obj = Object.create(MenuActionSuggestion.prototype);
1226
+ obj.__wbg_ptr = ptr;
1227
+ MenuActionSuggestionFinalization.register(obj, obj.__wbg_ptr, obj);
1228
+ return obj;
1229
+ }
1230
+
1231
+ __destroy_into_raw() {
1232
+ const ptr = this.__wbg_ptr;
1233
+ this.__wbg_ptr = 0;
1234
+ MenuActionSuggestionFinalization.unregister(this);
1235
+ return ptr;
1236
+ }
1237
+
1238
+ free() {
1239
+ const ptr = this.__destroy_into_raw();
1240
+ wasm.__wbg_menuactionsuggestion_free(ptr);
1241
+ }
1242
+ /**
1243
+ * @returns {SuggestionPattern}
1244
+ */
1245
+ get suggestion_pattern() {
1246
+ const ret = wasm.__wbg_get_menuactionsuggestion_suggestion_pattern(this.__wbg_ptr);
1247
+ return SuggestionPattern.__wrap(ret);
1248
+ }
1249
+ /**
1250
+ * @param {SuggestionPattern} arg0
1251
+ */
1252
+ set suggestion_pattern(arg0) {
1253
+ _assertClass(arg0, SuggestionPattern);
1254
+ var ptr0 = arg0.__destroy_into_raw();
1255
+ wasm.__wbg_set_menuactionsuggestion_suggestion_pattern(this.__wbg_ptr, ptr0);
1256
+ }
1257
+ }
1258
+
1259
+ const MenuStateFinalization = (typeof FinalizationRegistry === 'undefined')
1260
+ ? { register: () => {}, unregister: () => {} }
1261
+ : new FinalizationRegistry(ptr => wasm.__wbg_menustate_free(ptr >>> 0));
1262
+ /**
1263
+ */
1264
+ export class MenuState {
1265
+
1266
+ static __wrap(ptr) {
1267
+ ptr = ptr >>> 0;
1268
+ const obj = Object.create(MenuState.prototype);
1269
+ obj.__wbg_ptr = ptr;
1270
+ MenuStateFinalization.register(obj, obj.__wbg_ptr, obj);
1271
+ return obj;
1272
+ }
1273
+
1274
+ __destroy_into_raw() {
1275
+ const ptr = this.__wbg_ptr;
1276
+ this.__wbg_ptr = 0;
1277
+ MenuStateFinalization.unregister(this);
1278
+ return ptr;
1279
+ }
1280
+
1281
+ free() {
1282
+ const ptr = this.__destroy_into_raw();
1283
+ wasm.__wbg_menustate_free(ptr);
1284
+ }
1285
+ /**
1286
+ * @returns {boolean}
1287
+ */
1288
+ keep() {
1289
+ const ret = wasm.menustate_keep(this.__wbg_ptr);
1290
+ return ret !== 0;
1291
+ }
1292
+ /**
1293
+ * @returns {MenuStateUpdate | undefined}
1294
+ */
1295
+ update() {
1296
+ const ret = wasm.menustate_update(this.__wbg_ptr);
1297
+ return ret === 0 ? undefined : MenuStateUpdate.__wrap(ret);
1298
+ }
1299
+ }
1300
+
1301
+ const MenuStateUpdateFinalization = (typeof FinalizationRegistry === 'undefined')
1302
+ ? { register: () => {}, unregister: () => {} }
1303
+ : new FinalizationRegistry(ptr => wasm.__wbg_menustateupdate_free(ptr >>> 0));
1304
+ /**
1305
+ */
1306
+ export class MenuStateUpdate {
1307
+
1308
+ static __wrap(ptr) {
1309
+ ptr = ptr >>> 0;
1310
+ const obj = Object.create(MenuStateUpdate.prototype);
1311
+ obj.__wbg_ptr = ptr;
1312
+ MenuStateUpdateFinalization.register(obj, obj.__wbg_ptr, obj);
1313
+ return obj;
1314
+ }
1315
+
1316
+ __destroy_into_raw() {
1317
+ const ptr = this.__wbg_ptr;
1318
+ this.__wbg_ptr = 0;
1319
+ MenuStateUpdateFinalization.unregister(this);
1320
+ return ptr;
1321
+ }
1322
+
1323
+ free() {
1324
+ const ptr = this.__destroy_into_raw();
1325
+ wasm.__wbg_menustateupdate_free(ptr);
1326
+ }
1327
+ /**
1328
+ * @returns {Map<any, any>}
1329
+ */
1330
+ get action_states() {
1331
+ const ret = wasm.__wbg_get_menustateupdate_action_states(this.__wbg_ptr);
1332
+ return takeObject(ret);
1333
+ }
1334
+ /**
1335
+ * @param {Map<any, any>} arg0
1336
+ */
1337
+ set action_states(arg0) {
1338
+ wasm.__wbg_set_menustateupdate_action_states(this.__wbg_ptr, addHeapObject(arg0));
1339
+ }
1340
+ }
1341
+
1342
+ const PatternKeyFinalization = (typeof FinalizationRegistry === 'undefined')
1343
+ ? { register: () => {}, unregister: () => {} }
1344
+ : new FinalizationRegistry(ptr => wasm.__wbg_patternkey_free(ptr >>> 0));
1345
+ /**
1346
+ */
1347
+ export class PatternKey {
1348
+
1349
+ static __wrap(ptr) {
1350
+ ptr = ptr >>> 0;
1351
+ const obj = Object.create(PatternKey.prototype);
1352
+ obj.__wbg_ptr = ptr;
1353
+ PatternKeyFinalization.register(obj, obj.__wbg_ptr, obj);
1354
+ return obj;
1355
+ }
1356
+
1357
+ __destroy_into_raw() {
1358
+ const ptr = this.__wbg_ptr;
1359
+ this.__wbg_ptr = 0;
1360
+ PatternKeyFinalization.unregister(this);
1361
+ return ptr;
1362
+ }
1363
+
1364
+ free() {
1365
+ const ptr = this.__destroy_into_raw();
1366
+ wasm.__wbg_patternkey_free(ptr);
1367
+ }
1368
+ /**
1369
+ * @returns {PatternKeyType}
1370
+ */
1371
+ get key_type() {
1372
+ const ret = wasm.__wbg_get_patternkey_key_type(this.__wbg_ptr);
1373
+ return ret;
1374
+ }
1375
+ /**
1376
+ * @param {PatternKeyType} arg0
1377
+ */
1378
+ set key_type(arg0) {
1379
+ wasm.__wbg_set_patternkey_key_type(this.__wbg_ptr, arg0);
1380
+ }
1381
+ /**
1382
+ * @returns {string | undefined}
1383
+ */
1384
+ get custom_key_value() {
1385
+ try {
1386
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1387
+ wasm.__wbg_get_patternkey_custom_key_value(retptr, this.__wbg_ptr);
1388
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1389
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1390
+ let v1;
1391
+ if (r0 !== 0) {
1392
+ v1 = getStringFromWasm0(r0, r1).slice();
1393
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
1394
+ }
1395
+ return v1;
1396
+ } finally {
1397
+ wasm.__wbindgen_add_to_stack_pointer(16);
1398
+ }
1399
+ }
1400
+ /**
1401
+ * @param {string | undefined} [arg0]
1402
+ */
1403
+ set custom_key_value(arg0) {
1404
+ var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1405
+ var len0 = WASM_VECTOR_LEN;
1406
+ wasm.__wbg_set_patternkey_custom_key_value(this.__wbg_ptr, ptr0, len0);
1407
+ }
1408
+ }
1409
+
1410
+ const ReplaceAllFinalization = (typeof FinalizationRegistry === 'undefined')
1411
+ ? { register: () => {}, unregister: () => {} }
1412
+ : new FinalizationRegistry(ptr => wasm.__wbg_replaceall_free(ptr >>> 0));
1413
+ /**
1414
+ */
1415
+ export class ReplaceAll {
1416
+
1417
+ static __wrap(ptr) {
1418
+ ptr = ptr >>> 0;
1419
+ const obj = Object.create(ReplaceAll.prototype);
1420
+ obj.__wbg_ptr = ptr;
1421
+ ReplaceAllFinalization.register(obj, obj.__wbg_ptr, obj);
1422
+ return obj;
1423
+ }
1424
+
1425
+ __destroy_into_raw() {
1426
+ const ptr = this.__wbg_ptr;
1427
+ this.__wbg_ptr = 0;
1428
+ ReplaceAllFinalization.unregister(this);
1429
+ return ptr;
1430
+ }
1431
+
1432
+ free() {
1433
+ const ptr = this.__destroy_into_raw();
1434
+ wasm.__wbg_replaceall_free(ptr);
1435
+ }
1436
+ /**
1437
+ * @returns {string}
1438
+ */
1439
+ get replacement_html() {
1440
+ let deferred1_0;
1441
+ let deferred1_1;
1442
+ try {
1443
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1444
+ wasm.__wbg_get_edit_url(retptr, this.__wbg_ptr);
1445
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1446
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1447
+ deferred1_0 = r0;
1448
+ deferred1_1 = r1;
1449
+ return getStringFromWasm0(r0, r1);
1450
+ } finally {
1451
+ wasm.__wbindgen_add_to_stack_pointer(16);
1452
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1453
+ }
1454
+ }
1455
+ /**
1456
+ * @param {string} arg0
1457
+ */
1458
+ set replacement_html(arg0) {
1459
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1460
+ const len0 = WASM_VECTOR_LEN;
1461
+ wasm.__wbg_set_edit_url(this.__wbg_ptr, ptr0, len0);
1462
+ }
1463
+ /**
1464
+ * @returns {number}
1465
+ */
1466
+ get start_utf16_codeunit() {
1467
+ const ret = wasm.__wbg_get_replaceall_start_utf16_codeunit(this.__wbg_ptr);
1468
+ return ret >>> 0;
1469
+ }
1470
+ /**
1471
+ * @param {number} arg0
1472
+ */
1473
+ set start_utf16_codeunit(arg0) {
1474
+ wasm.__wbg_set_replaceall_start_utf16_codeunit(this.__wbg_ptr, arg0);
1475
+ }
1476
+ /**
1477
+ * @returns {number}
1478
+ */
1479
+ get end_utf16_codeunit() {
1480
+ const ret = wasm.__wbg_get_replaceall_end_utf16_codeunit(this.__wbg_ptr);
1481
+ return ret >>> 0;
1482
+ }
1483
+ /**
1484
+ * @param {number} arg0
1485
+ */
1486
+ set end_utf16_codeunit(arg0) {
1487
+ wasm.__wbg_set_replaceall_end_utf16_codeunit(this.__wbg_ptr, arg0);
1488
+ }
1489
+ }
1490
+
1491
+ const SelectionFinalization = (typeof FinalizationRegistry === 'undefined')
1492
+ ? { register: () => {}, unregister: () => {} }
1493
+ : new FinalizationRegistry(ptr => wasm.__wbg_selection_free(ptr >>> 0));
1494
+ /**
1495
+ */
1496
+ export class Selection {
1497
+
1498
+ static __wrap(ptr) {
1499
+ ptr = ptr >>> 0;
1500
+ const obj = Object.create(Selection.prototype);
1501
+ obj.__wbg_ptr = ptr;
1502
+ SelectionFinalization.register(obj, obj.__wbg_ptr, obj);
1503
+ return obj;
1504
+ }
1505
+
1506
+ __destroy_into_raw() {
1507
+ const ptr = this.__wbg_ptr;
1508
+ this.__wbg_ptr = 0;
1509
+ SelectionFinalization.unregister(this);
1510
+ return ptr;
1511
+ }
1512
+
1513
+ free() {
1514
+ const ptr = this.__destroy_into_raw();
1515
+ wasm.__wbg_selection_free(ptr);
1516
+ }
1517
+ /**
1518
+ * @returns {number}
1519
+ */
1520
+ get start_utf16_codeunit() {
1521
+ const ret = wasm.__wbg_get_selection_start_utf16_codeunit(this.__wbg_ptr);
1522
+ return ret >>> 0;
1523
+ }
1524
+ /**
1525
+ * @param {number} arg0
1526
+ */
1527
+ set start_utf16_codeunit(arg0) {
1528
+ wasm.__wbg_set_selection_start_utf16_codeunit(this.__wbg_ptr, arg0);
1529
+ }
1530
+ /**
1531
+ * @returns {number}
1532
+ */
1533
+ get end_utf16_codeunit() {
1534
+ const ret = wasm.__wbg_get_selection_end_utf16_codeunit(this.__wbg_ptr);
1535
+ return ret >>> 0;
1536
+ }
1537
+ /**
1538
+ * @param {number} arg0
1539
+ */
1540
+ set end_utf16_codeunit(arg0) {
1541
+ wasm.__wbg_set_selection_end_utf16_codeunit(this.__wbg_ptr, arg0);
1542
+ }
1543
+ }
1544
+
1545
+ const SuggestionPatternFinalization = (typeof FinalizationRegistry === 'undefined')
1546
+ ? { register: () => {}, unregister: () => {} }
1547
+ : new FinalizationRegistry(ptr => wasm.__wbg_suggestionpattern_free(ptr >>> 0));
1548
+ /**
1549
+ */
1550
+ export class SuggestionPattern {
1551
+
1552
+ static __wrap(ptr) {
1553
+ ptr = ptr >>> 0;
1554
+ const obj = Object.create(SuggestionPattern.prototype);
1555
+ obj.__wbg_ptr = ptr;
1556
+ SuggestionPatternFinalization.register(obj, obj.__wbg_ptr, obj);
1557
+ return obj;
1558
+ }
1559
+
1560
+ __destroy_into_raw() {
1561
+ const ptr = this.__wbg_ptr;
1562
+ this.__wbg_ptr = 0;
1563
+ SuggestionPatternFinalization.unregister(this);
1564
+ return ptr;
1565
+ }
1566
+
1567
+ free() {
1568
+ const ptr = this.__destroy_into_raw();
1569
+ wasm.__wbg_suggestionpattern_free(ptr);
1570
+ }
1571
+ /**
1572
+ * @returns {PatternKey}
1573
+ */
1574
+ get key() {
1575
+ const ret = wasm.__wbg_get_suggestionpattern_key(this.__wbg_ptr);
1576
+ return PatternKey.__wrap(ret);
1577
+ }
1578
+ /**
1579
+ * @param {PatternKey} arg0
1580
+ */
1581
+ set key(arg0) {
1582
+ _assertClass(arg0, PatternKey);
1583
+ var ptr0 = arg0.__destroy_into_raw();
1584
+ wasm.__wbg_set_suggestionpattern_key(this.__wbg_ptr, ptr0);
1585
+ }
1586
+ /**
1587
+ * @returns {string}
1588
+ */
1589
+ get text() {
1590
+ let deferred1_0;
1591
+ let deferred1_1;
1592
+ try {
1593
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1594
+ wasm.__wbg_get_edit_url(retptr, this.__wbg_ptr);
1595
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1596
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1597
+ deferred1_0 = r0;
1598
+ deferred1_1 = r1;
1599
+ return getStringFromWasm0(r0, r1);
1600
+ } finally {
1601
+ wasm.__wbindgen_add_to_stack_pointer(16);
1602
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1603
+ }
1604
+ }
1605
+ /**
1606
+ * @param {string} arg0
1607
+ */
1608
+ set text(arg0) {
1609
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1610
+ const len0 = WASM_VECTOR_LEN;
1611
+ wasm.__wbg_set_edit_url(this.__wbg_ptr, ptr0, len0);
1612
+ }
1613
+ /**
1614
+ * @returns {number}
1615
+ */
1616
+ get start() {
1617
+ const ret = wasm.__wbg_get_suggestionpattern_start(this.__wbg_ptr);
1618
+ return ret >>> 0;
1619
+ }
1620
+ /**
1621
+ * @param {number} arg0
1622
+ */
1623
+ set start(arg0) {
1624
+ wasm.__wbg_set_suggestionpattern_start(this.__wbg_ptr, arg0);
1625
+ }
1626
+ /**
1627
+ * @returns {number}
1628
+ */
1629
+ get end() {
1630
+ const ret = wasm.__wbg_get_suggestionpattern_end(this.__wbg_ptr);
1631
+ return ret >>> 0;
1632
+ }
1633
+ /**
1634
+ * @param {number} arg0
1635
+ */
1636
+ set end(arg0) {
1637
+ wasm.__wbg_set_suggestionpattern_end(this.__wbg_ptr, arg0);
1638
+ }
1639
+ }
1640
+
1641
+ const TextUpdateFinalization = (typeof FinalizationRegistry === 'undefined')
1642
+ ? { register: () => {}, unregister: () => {} }
1643
+ : new FinalizationRegistry(ptr => wasm.__wbg_textupdate_free(ptr >>> 0));
1644
+ /**
1645
+ */
1646
+ export class TextUpdate {
1647
+
1648
+ static __wrap(ptr) {
1649
+ ptr = ptr >>> 0;
1650
+ const obj = Object.create(TextUpdate.prototype);
1651
+ obj.__wbg_ptr = ptr;
1652
+ TextUpdateFinalization.register(obj, obj.__wbg_ptr, obj);
1653
+ return obj;
1654
+ }
1655
+
1656
+ __destroy_into_raw() {
1657
+ const ptr = this.__wbg_ptr;
1658
+ this.__wbg_ptr = 0;
1659
+ TextUpdateFinalization.unregister(this);
1660
+ return ptr;
1661
+ }
1662
+
1663
+ free() {
1664
+ const ptr = this.__destroy_into_raw();
1665
+ wasm.__wbg_textupdate_free(ptr);
1666
+ }
1667
+ /**
1668
+ * @returns {Keep | undefined}
1669
+ */
1670
+ get keep() {
1671
+ const ret = wasm.__wbg_get_textupdate_keep(this.__wbg_ptr);
1672
+ return ret === 0 ? undefined : Keep.__wrap(ret);
1673
+ }
1674
+ /**
1675
+ * @param {Keep | undefined} [arg0]
1676
+ */
1677
+ set keep(arg0) {
1678
+ let ptr0 = 0;
1679
+ if (!isLikeNone(arg0)) {
1680
+ _assertClass(arg0, Keep);
1681
+ ptr0 = arg0.__destroy_into_raw();
1682
+ }
1683
+ wasm.__wbg_set_textupdate_keep(this.__wbg_ptr, ptr0);
1684
+ }
1685
+ /**
1686
+ * @returns {ReplaceAll | undefined}
1687
+ */
1688
+ get replace_all() {
1689
+ const ret = wasm.__wbg_get_textupdate_replace_all(this.__wbg_ptr);
1690
+ return ret === 0 ? undefined : ReplaceAll.__wrap(ret);
1691
+ }
1692
+ /**
1693
+ * @param {ReplaceAll | undefined} [arg0]
1694
+ */
1695
+ set replace_all(arg0) {
1696
+ let ptr0 = 0;
1697
+ if (!isLikeNone(arg0)) {
1698
+ _assertClass(arg0, ReplaceAll);
1699
+ ptr0 = arg0.__destroy_into_raw();
1700
+ }
1701
+ wasm.__wbg_set_textupdate_replace_all(this.__wbg_ptr, ptr0);
1702
+ }
1703
+ /**
1704
+ * @returns {Selection | undefined}
1705
+ */
1706
+ get select() {
1707
+ const ret = wasm.__wbg_get_textupdate_select(this.__wbg_ptr);
1708
+ return ret === 0 ? undefined : Selection.__wrap(ret);
1709
+ }
1710
+ /**
1711
+ * @param {Selection | undefined} [arg0]
1712
+ */
1713
+ set select(arg0) {
1714
+ let ptr0 = 0;
1715
+ if (!isLikeNone(arg0)) {
1716
+ _assertClass(arg0, Selection);
1717
+ ptr0 = arg0.__destroy_into_raw();
1718
+ }
1719
+ wasm.__wbg_set_textupdate_select(this.__wbg_ptr, ptr0);
1720
+ }
1721
+ }
1722
+
1723
+ export function __wbindgen_string_get(arg0, arg1) {
1724
+ const obj = getObject(arg1);
1725
+ const ret = typeof(obj) === 'string' ? obj : undefined;
1726
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1727
+ var len1 = WASM_VECTOR_LEN;
1728
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
1729
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
1730
+ };
1731
+
1732
+ export function __wbindgen_object_drop_ref(arg0) {
1733
+ takeObject(arg0);
1734
+ };
1735
+
1736
+ export function __wbg_new_d9bc3a0147634640() {
1737
+ const ret = new Map();
1738
+ return addHeapObject(ret);
1739
+ };
1740
+
1741
+ export function __wbindgen_string_new(arg0, arg1) {
1742
+ const ret = getStringFromWasm0(arg0, arg1);
1743
+ return addHeapObject(ret);
1744
+ };
1745
+
1746
+ export function __wbg_set_8417257aaedc936b(arg0, arg1, arg2) {
1747
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
1748
+ return addHeapObject(ret);
1749
+ };
1750
+
1751
+ export function __wbg_forEach_4cee849ec749be17(arg0, arg1, arg2) {
1752
+ try {
1753
+ var state0 = {a: arg1, b: arg2};
1754
+ var cb0 = (arg0, arg1) => {
1755
+ const a = state0.a;
1756
+ state0.a = 0;
1757
+ try {
1758
+ return __wbg_adapter_124(a, state0.b, arg0, arg1);
1759
+ } finally {
1760
+ state0.a = a;
1761
+ }
1762
+ };
1763
+ getObject(arg0).forEach(cb0);
1764
+ } finally {
1765
+ state0.a = state0.b = 0;
1766
+ }
1767
+ };
1768
+
1769
+ export function __wbindgen_number_new(arg0) {
1770
+ const ret = arg0;
1771
+ return addHeapObject(ret);
1772
+ };
1773
+
1774
+ export function __wbg_forEach_2be8de7347d63332(arg0, arg1, arg2) {
1775
+ try {
1776
+ var state0 = {a: arg1, b: arg2};
1777
+ var cb0 = (arg0, arg1, arg2) => {
1778
+ const a = state0.a;
1779
+ state0.a = 0;
1780
+ try {
1781
+ return __wbg_adapter_121(a, state0.b, arg0, arg1, arg2);
1782
+ } finally {
1783
+ state0.a = a;
1784
+ }
1785
+ };
1786
+ getObject(arg0).forEach(cb0);
1787
+ } finally {
1788
+ state0.a = state0.b = 0;
1789
+ }
1790
+ };
1791
+
1792
+ export function __wbindgen_object_clone_ref(arg0) {
1793
+ const ret = getObject(arg0);
1794
+ return addHeapObject(ret);
1795
+ };
1796
+
1797
+ export function __wbg_new_abda76e883ba8a5f() {
1798
+ const ret = new Error();
1799
+ return addHeapObject(ret);
1800
+ };
1801
+
1802
+ export function __wbg_stack_658279fe44541cf6(arg0, arg1) {
1803
+ const ret = getObject(arg1).stack;
1804
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1805
+ const len1 = WASM_VECTOR_LEN;
1806
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
1807
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
1808
+ };
1809
+
1810
+ export function __wbg_error_f851667af71bcfc6(arg0, arg1) {
1811
+ let deferred0_0;
1812
+ let deferred0_1;
1813
+ try {
1814
+ deferred0_0 = arg0;
1815
+ deferred0_1 = arg1;
1816
+ console.error(getStringFromWasm0(arg0, arg1));
1817
+ } finally {
1818
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1819
+ }
1820
+ };
1821
+
1822
+ export function __wbindgen_throw(arg0, arg1) {
1823
+ throw new Error(getStringFromWasm0(arg0, arg1));
1824
+ };
1825
+
1826
+ export function __wbg_getAttribute_99bddb29274b29b9(arg0, arg1, arg2, arg3) {
1827
+ const ret = getObject(arg1).getAttribute(getStringFromWasm0(arg2, arg3));
1828
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1829
+ var len1 = WASM_VECTOR_LEN;
1830
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
1831
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
1832
+ };
1833
+
1834
+ export function __wbg_nodeValue_0b5f7b2274265747(arg0, arg1) {
1835
+ const ret = getObject(arg1).nodeValue;
1836
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1837
+ var len1 = WASM_VECTOR_LEN;
1838
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
1839
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
1840
+ };
1841
+
1842
+ export function __wbg_new_aec969a21ad2fc71() { return handleError(function () {
1843
+ const ret = new DOMParser();
1844
+ return addHeapObject(ret);
1845
+ }, arguments) };
1846
+
1847
+ export function __wbg_parseFromString_656e5773ad0b3845() { return handleError(function (arg0, arg1, arg2, arg3) {
1848
+ const ret = getObject(arg0).parseFromString(getStringFromWasm0(arg1, arg2), takeObject(arg3));
1849
+ return addHeapObject(ret);
1850
+ }, arguments) };
1851
+
1852
+ export function __wbg_body_edb1908d3ceff3a1(arg0) {
1853
+ const ret = getObject(arg0).body;
1854
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1855
+ };
1856
+
1857
+ export function __wbg_childNodes_118168e8b23bcb9b(arg0) {
1858
+ const ret = getObject(arg0).childNodes;
1859
+ return addHeapObject(ret);
1860
+ };
1861
+
1862
+ export function __wbg_length_d0a802565d17eec4(arg0) {
1863
+ const ret = getObject(arg0).length;
1864
+ return ret;
1865
+ };
1866
+
1867
+ export function __wbg_get_8cd5eba00ab6304f(arg0, arg1) {
1868
+ const ret = getObject(arg0)[arg1 >>> 0];
1869
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1870
+ };
1871
+
1872
+ export function __wbg_nodeName_149f7e29f80d1338(arg0, arg1) {
1873
+ const ret = getObject(arg1).nodeName;
1874
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1875
+ const len1 = WASM_VECTOR_LEN;
1876
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
1877
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
1878
+ };
1879
+
1880
+ export function __wbg_hasAttribute_8340e1a2a46f10f3(arg0, arg1, arg2) {
1881
+ const ret = getObject(arg0).hasAttribute(getStringFromWasm0(arg1, arg2));
1882
+ return ret;
1883
+ };
1884
+
1885
+ export function __wbg_nodeType_9dd609af1b555b54(arg0) {
1886
+ const ret = getObject(arg0).nodeType;
1887
+ return ret;
1888
+ };
1889
+