@vector-im/matrix-wysiwyg 2.40.0 → 2.42.1

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