@casoon/opengrid 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1248 @@
1
+ /* @ts-self-types="./opengrid_web_components.d.ts" */
2
+ import { __opengrid_define_element } from './snippets/opengrid-web-core-e0ef3c8948ce8a1e/inline1.js';
3
+ import * as import1 from "./snippets/opengrid-web-core-e0ef3c8948ce8a1e/inline0.js"
4
+ import * as import2 from "./snippets/opengrid-web-core-e0ef3c8948ce8a1e/inline0.js"
5
+ import * as import3 from "./snippets/opengrid-web-core-e0ef3c8948ce8a1e/inline0.js"
6
+
7
+
8
+ /**
9
+ * One piece of a CSV: with `header`, the header line (and the byte order
10
+ * mark) first. `options`: `{ delimiter, bom, protectFormulas, null }`, each
11
+ * optional (docs/guides/export.md, point 87).
12
+ * @param {string} result_json
13
+ * @param {any} options
14
+ * @param {boolean} header
15
+ * @returns {string}
16
+ */
17
+ export function export_csv(result_json, options, header) {
18
+ let deferred3_0;
19
+ let deferred3_1;
20
+ try {
21
+ const ptr0 = passStringToWasm0(result_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
22
+ const len0 = WASM_VECTOR_LEN;
23
+ const ret = wasm.export_csv(ptr0, len0, options, header);
24
+ var ptr2 = ret[0];
25
+ var len2 = ret[1];
26
+ if (ret[3]) {
27
+ ptr2 = 0; len2 = 0;
28
+ throw takeFromExternrefTable0(ret[2]);
29
+ }
30
+ deferred3_0 = ptr2;
31
+ deferred3_1 = len2;
32
+ return getStringFromWasm0(ptr2, len2);
33
+ } finally {
34
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
35
+ }
36
+ }
37
+
38
+ /**
39
+ * One piece of a JSON array: the rows as objects, joined by commas. `first`:
40
+ * no row has been written yet (not "the first piece" — after an empty first
41
+ * piece it is still true), so no comma leads. `loader.js` writes the brackets.
42
+ * @param {string} result_json
43
+ * @param {boolean} first
44
+ * @returns {string}
45
+ */
46
+ export function export_json(result_json, first) {
47
+ let deferred3_0;
48
+ let deferred3_1;
49
+ try {
50
+ const ptr0 = passStringToWasm0(result_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
51
+ const len0 = WASM_VECTOR_LEN;
52
+ const ret = wasm.export_json(ptr0, len0, first);
53
+ var ptr2 = ret[0];
54
+ var len2 = ret[1];
55
+ if (ret[3]) {
56
+ ptr2 = 0; len2 = 0;
57
+ throw takeFromExternrefTable0(ret[2]);
58
+ }
59
+ deferred3_0 = ptr2;
60
+ deferred3_1 = len2;
61
+ return getStringFromWasm0(ptr2, len2);
62
+ } finally {
63
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
64
+ }
65
+ }
66
+
67
+ /**
68
+ * The pivot as it is shown, as CSV (issue #3).
69
+ *
70
+ * **The element exports what it shows, rather than handing out a query to
71
+ * run again.** A pivot is bounded (256 columns, 2 000 rows in V1) and the
72
+ * element holds all of it — there is no window to page past, so nothing is
73
+ * missing that a second request could fetch. A second request would only cost
74
+ * another `n+1` grouping sets and could answer differently from the table on
75
+ * screen if the data moved in between; and the labels are this element's
76
+ * texts, which an export away from the element would have to be handed. So:
77
+ * synchronous, no provider, and exactly the table the reader sees.
78
+ *
79
+ * One header line, each generated column named `2025 · total` — the reasons
80
+ * are at `opengrid_export::pivot_csv`. Subtotals and the grand total are rows
81
+ * with their labels, NULL and the empty group are named as in the table.
82
+ *
83
+ * `options`: `{ delimiter, bom, protectFormulas, null }`, each optional; any
84
+ * other key is an error. `null` while nothing is shown — before the first
85
+ * answer, while one loads, after an error — and for the table and the grid.
86
+ * @param {HTMLElement} host
87
+ * @param {any} options
88
+ * @returns {any}
89
+ */
90
+ export function get_pivot(host, options) {
91
+ const ret = wasm.get_pivot(host, options);
92
+ if (ret[2]) {
93
+ throw takeFromExternrefTable0(ret[1]);
94
+ }
95
+ return takeFromExternrefTable0(ret[0]);
96
+ }
97
+
98
+ /**
99
+ * The query of the current view, without a window (plan point 82).
100
+ *
101
+ * Exactly what the grid asks its provider for — the filter row, the facets and
102
+ * the free-text search and-ed together, the sort, the shown columns in their
103
+ * order — but with no `offset` and no `limit`: every match, not the loaded
104
+ * window. It is what a page exports, so that the export is what the reader
105
+ * sees rather than what the page believes the view to be. A grouped grid
106
+ * gives the rows, ordered by its groups first, the way it shows them.
107
+ *
108
+ * `null` for a grid that has no query yet (not connected, no `datasource`, no
109
+ * columns) or whose filter does not hold (the status line already says why),
110
+ * and for the table and the pivot.
111
+ * @param {HTMLElement} host
112
+ * @returns {any}
113
+ */
114
+ export function get_query(host) {
115
+ const ret = wasm.get_query(host);
116
+ return ret;
117
+ }
118
+
119
+ /**
120
+ * Reads the whole view as a plain JS object (plan point 59).
121
+ *
122
+ * Sort, filters, column layout and density — everything the reader chose about
123
+ * what is shown and how. **Not the selection**: it names positions, the grid
124
+ * has no key column, and sorting or filtering drops it precisely because after
125
+ * a different sort those positions hold different records. A restored view
126
+ * carrying one would not be incomplete, it would be wrong.
127
+ *
128
+ * A "saved view" is this value with a name on it, which is why the element has
129
+ * no view management of its own: naming, storing and deleting are the page's,
130
+ * the same line `docs/api.md` draws for editing.
131
+ * @param {HTMLElement} host
132
+ * @returns {any}
133
+ */
134
+ export function get_view(host) {
135
+ const ret = wasm.get_view(host);
136
+ return ret;
137
+ }
138
+
139
+ /**
140
+ * Registers `<opengrid-table>` and `<opengrid-grid>`; safe to call more than
141
+ * once.
142
+ *
143
+ * `loader.js` calls this after the WASM module is initialised; the browser test
144
+ * calls it directly.
145
+ */
146
+ export function register() {
147
+ const ret = wasm.register();
148
+ if (ret[1]) {
149
+ throw takeFromExternrefTable0(ret[0]);
150
+ }
151
+ }
152
+
153
+ /**
154
+ * Sets the choices a column's editor offers (plan point 37).
155
+ *
156
+ * `choices` is a plain JS object keyed by column name, each value a list of
157
+ * strings. A column with choices gets a `<select>` instead of a typed input.
158
+ * V1 has no enum type, so the page is the only honest source of the options.
159
+ * @param {HTMLElement} host
160
+ * @param {any} choices
161
+ */
162
+ export function set_choices(host, choices) {
163
+ wasm.set_choices(host, choices);
164
+ }
165
+
166
+ /**
167
+ * Sets how each column is presented (plan point 60).
168
+ *
169
+ * ```js
170
+ * loader.module.set_columns(host, {
171
+ * id: { width: 96, mono: true, muted: true },
172
+ * customer: { emphasis: true },
173
+ * amount: { width: 150, align: "end", aggregate: "sum", facet: "range" },
174
+ * });
175
+ * ```
176
+ *
177
+ * **The configuration narrows; it never widens.** A name the schema does not
178
+ * have, an aggregate the type does not allow (`sum` over text), a facet that
179
+ * does not fit — each is reported in the status line rather than ignored. A
180
+ * grid that looks configured and is not hides the typo that caused it.
181
+ *
182
+ * What the type already answers is not configurable: which filter operators a
183
+ * column offers is meaning, not taste. The alignment is taste, so it may be
184
+ * overridden.
185
+ * @param {HTMLElement} host
186
+ * @param {any} columns
187
+ */
188
+ export function set_columns(host, columns) {
189
+ wasm.set_columns(host, columns);
190
+ }
191
+
192
+ /**
193
+ * Overrides the texts a component writes itself (point 48).
194
+ *
195
+ * `texts` is a plain JS object with any subset of the keys `lang`, `loading`,
196
+ * `matchesOne`, `matchesOther`, `empty`, `error`, `errorUnknown`,
197
+ * `filterGroup`, `operatorLabel`, `valueLabel`, `clear` and `operators`; every
198
+ * key left out keeps its English default. `{count}`, `{column}` and `{cause}`
199
+ * are the placeholders. A `lang` is written onto the elements that carry these
200
+ * texts — the grid's filter row and status line, the table's error paragraph —
201
+ * so they are announced in the language they are written in. Never onto the
202
+ * data: the cells are the page's, in the page's language.
203
+ *
204
+ * Exported as `set_texts` beside `set_provider`, and like it, it takes effect
205
+ * immediately: the grid rebuilds, because its labels are part of the one-time
206
+ * skeleton (the filter row, the scroll offset and the focus are carried
207
+ * across). Call it **before** wiring the provider and the component renders the
208
+ * right words from its first paint.
209
+ * Sets the per-column display formats (plan point 42).
210
+ *
211
+ * `formats` is a plain JS object keyed by column name. A value is either a
212
+ * **function** `(text, value) => string` — `text` is what the component would
213
+ * have shown, `value` the JSON value — or an **`Intl` options object** with a
214
+ * `kind` of `"number"` (the default) or `"date"` and an optional `locale`;
215
+ * everything else in it goes to `Intl` unchanged.
216
+ *
217
+ * Formatting is display only: the filter, the sort and every comparison keep
218
+ * working on the value, because a grid that sorted by what it printed would
219
+ * have stopped honouring rules S4, S8 and S9.
220
+ * @param {HTMLElement} host
221
+ * @param {any} formats
222
+ */
223
+ export function set_formats(host, formats) {
224
+ wasm.set_formats(host, formats);
225
+ }
226
+
227
+ /**
228
+ * Attaches a data provider to a host element (points 14/16).
229
+ *
230
+ * `provider` is a JS object with an `execute(queryJson)` method that answers a
231
+ * Promise (or a value). Exported as `set_provider` from the components module,
232
+ * so the page wires its engine before or after connect; a connected host whose
233
+ * `datasource`/`columns` are present re-runs its query immediately. The tag
234
+ * name decides whether the table or the grid path runs.
235
+ * @param {HTMLElement} host
236
+ * @param {any} provider
237
+ */
238
+ export function set_provider(host, provider) {
239
+ wasm.set_provider(host, provider);
240
+ }
241
+
242
+ /**
243
+ * @param {HTMLElement} host
244
+ * @param {any} values
245
+ */
246
+ export function set_texts(host, values) {
247
+ wasm.set_texts(host, values);
248
+ }
249
+
250
+ /**
251
+ * Applies a whole view at once (plan point 59).
252
+ *
253
+ * **One query, not one per field.** Restoring a view field by field would flash
254
+ * through five intermediate results and announce each of them; the reader would
255
+ * hear four states that never existed.
256
+ *
257
+ * A view that names a column this grid does not have is reported in the status
258
+ * line and **not** applied in part — a grid that looks restored and is not is
259
+ * the worse failure (point 56 §Das Modell §2).
260
+ * @param {HTMLElement} host
261
+ * @param {any} view
262
+ */
263
+ export function set_view(host, view) {
264
+ wasm.set_view(host, view);
265
+ }
266
+ function __wbg_get_imports() {
267
+ const import0 = {
268
+ __proto__: null,
269
+ __wbg_Error_92b29b0548f8b746: function(arg0, arg1) {
270
+ const ret = Error(getStringFromWasm0(arg0, arg1));
271
+ return ret;
272
+ },
273
+ __wbg___opengrid_define_element_1a9a785aebecb8a9: function(arg0, arg1, arg2, arg3, arg4, arg5) {
274
+ __opengrid_define_element(getStringFromWasm0(arg0, arg1), arg2, arg3, arg4, arg5);
275
+ },
276
+ __wbg___wbindgen_boolean_get_fa956cfa2d1bd751: function(arg0) {
277
+ const v = arg0;
278
+ const ret = typeof(v) === 'boolean' ? v : undefined;
279
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
280
+ },
281
+ __wbg___wbindgen_debug_string_c25d447a39f5578f: function(arg0, arg1) {
282
+ const ret = debugString(arg1);
283
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
284
+ const len1 = WASM_VECTOR_LEN;
285
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
286
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
287
+ },
288
+ __wbg___wbindgen_is_function_1ff95bcc5517c252: function(arg0) {
289
+ const ret = typeof(arg0) === 'function';
290
+ return ret;
291
+ },
292
+ __wbg___wbindgen_is_null_ea9085d691f535d3: function(arg0) {
293
+ const ret = arg0 === null;
294
+ return ret;
295
+ },
296
+ __wbg___wbindgen_is_object_a27215656b807791: function(arg0) {
297
+ const val = arg0;
298
+ const ret = typeof(val) === 'object' && val !== null;
299
+ return ret;
300
+ },
301
+ __wbg___wbindgen_is_undefined_c05833b95a3cf397: function(arg0) {
302
+ const ret = arg0 === undefined;
303
+ return ret;
304
+ },
305
+ __wbg___wbindgen_number_get_394265ed1e1b84ee: function(arg0, arg1) {
306
+ const obj = arg1;
307
+ const ret = typeof(obj) === 'number' ? obj : undefined;
308
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
309
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
310
+ },
311
+ __wbg___wbindgen_string_get_b0ca35b86a603356: function(arg0, arg1) {
312
+ const obj = arg1;
313
+ const ret = typeof(obj) === 'string' ? obj : undefined;
314
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
315
+ var len1 = WASM_VECTOR_LEN;
316
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
317
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
318
+ },
319
+ __wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
320
+ throw new Error(getStringFromWasm0(arg0, arg1));
321
+ },
322
+ __wbg__wbg_cb_unref_fffb441def202758: function(arg0) {
323
+ arg0._wbg_cb_unref();
324
+ },
325
+ __wbg_activeElement_b85d218c5f49326e: function(arg0) {
326
+ const ret = arg0.activeElement;
327
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
328
+ },
329
+ __wbg_addEventListener_109ae44e5cc4d506: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
330
+ arg0.addEventListener(getStringFromWasm0(arg1, arg2), arg3, arg4 !== 0);
331
+ }, arguments); },
332
+ __wbg_addEventListener_d85450ee1320c989: function() { return handleError(function (arg0, arg1, arg2, arg3) {
333
+ arg0.addEventListener(getStringFromWasm0(arg1, arg2), arg3);
334
+ }, arguments); },
335
+ __wbg_altKey_50f830d1793a2eea: function(arg0) {
336
+ const ret = arg0.altKey;
337
+ return ret;
338
+ },
339
+ __wbg_appendChild_f553e8704c4f14a6: function() { return handleError(function (arg0, arg1) {
340
+ const ret = arg0.appendChild(arg1);
341
+ return ret;
342
+ }, arguments); },
343
+ __wbg_attachShadow_aa3375d613891613: function() { return handleError(function (arg0, arg1) {
344
+ const ret = arg0.attachShadow(arg1);
345
+ return ret;
346
+ }, arguments); },
347
+ __wbg_bottom_e6ed49b80d965dae: function(arg0) {
348
+ const ret = arg0.bottom;
349
+ return ret;
350
+ },
351
+ __wbg_call_44b7209e1e252e6a: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
352
+ const ret = arg0.call(arg1, arg2, arg3, arg4);
353
+ return ret;
354
+ }, arguments); },
355
+ __wbg_call_e3b662382210db98: function() { return handleError(function (arg0, arg1, arg2, arg3) {
356
+ const ret = arg0.call(arg1, arg2, arg3);
357
+ return ret;
358
+ }, arguments); },
359
+ __wbg_checked_596d0d7b35f55a01: function(arg0) {
360
+ const ret = arg0.checked;
361
+ return ret;
362
+ },
363
+ __wbg_childElementCount_e7b55fd263a23895: function(arg0) {
364
+ const ret = arg0.childElementCount;
365
+ return ret;
366
+ },
367
+ __wbg_clientHeight_994541cde34d3ca0: function(arg0) {
368
+ const ret = arg0.clientHeight;
369
+ return ret;
370
+ },
371
+ __wbg_closest_d889c758da4bb13b: function() { return handleError(function (arg0, arg1, arg2) {
372
+ const ret = arg0.closest(getStringFromWasm0(arg1, arg2));
373
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
374
+ }, arguments); },
375
+ __wbg_createElement_fcbc0805de826d62: function() { return handleError(function (arg0, arg1, arg2) {
376
+ const ret = arg0.createElement(getStringFromWasm0(arg1, arg2));
377
+ return ret;
378
+ }, arguments); },
379
+ __wbg_ctrlKey_2e52816fa7160097: function(arg0) {
380
+ const ret = arg0.ctrlKey;
381
+ return ret;
382
+ },
383
+ __wbg_currentTarget_a8ed7ef60b89f253: function(arg0) {
384
+ const ret = arg0.currentTarget;
385
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
386
+ },
387
+ __wbg_customElements_c18208f2ede84a5e: function(arg0) {
388
+ const ret = arg0.customElements;
389
+ return ret;
390
+ },
391
+ __wbg_dispatchEvent_ca78eaf3d469bc25: function() { return handleError(function (arg0, arg1) {
392
+ const ret = arg0.dispatchEvent(arg1);
393
+ return ret;
394
+ }, arguments); },
395
+ __wbg_document_179650d6cb13c263: function(arg0) {
396
+ const ret = arg0.document;
397
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
398
+ },
399
+ __wbg_firstChild_984b883406cc95b8: function(arg0) {
400
+ const ret = arg0.firstChild;
401
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
402
+ },
403
+ __wbg_focus_2f77051f98540625: function() { return handleError(function (arg0) {
404
+ arg0.focus();
405
+ }, arguments); },
406
+ __wbg_for_e542e480b076809a: function(arg0, arg1) {
407
+ const ret = Symbol.for(getStringFromWasm0(arg0, arg1));
408
+ return ret;
409
+ },
410
+ __wbg_getAttribute_5a601ba4718b922a: function(arg0, arg1, arg2, arg3) {
411
+ const ret = arg1.getAttribute(getStringFromWasm0(arg2, arg3));
412
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
413
+ var len1 = WASM_VECTOR_LEN;
414
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
415
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
416
+ },
417
+ __wbg_getBoundingClientRect_e828e6c31c66dea6: function(arg0) {
418
+ const ret = arg0.getBoundingClientRect();
419
+ return ret;
420
+ },
421
+ __wbg_getComputedStyle_961681bdf7e518e8: function() { return handleError(function (arg0, arg1) {
422
+ const ret = arg0.getComputedStyle(arg1);
423
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
424
+ }, arguments); },
425
+ __wbg_getPropertyValue_dc6b061239dad6f1: function() { return handleError(function (arg0, arg1, arg2, arg3) {
426
+ const ret = arg1.getPropertyValue(getStringFromWasm0(arg2, arg3));
427
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
428
+ const len1 = WASM_VECTOR_LEN;
429
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
430
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
431
+ }, arguments); },
432
+ __wbg_get_78f252d074a84d0b: function() { return handleError(function (arg0, arg1) {
433
+ const ret = Reflect.get(arg0, arg1);
434
+ return ret;
435
+ }, arguments); },
436
+ __wbg_get_87cffd80c07c7611: function(arg0, arg1, arg2) {
437
+ const ret = arg0.get(getStringFromWasm0(arg1, arg2));
438
+ return ret;
439
+ },
440
+ __wbg_get_unchecked_6e0ad6d2a41b06f6: function(arg0, arg1) {
441
+ const ret = arg0[arg1 >>> 0];
442
+ return ret;
443
+ },
444
+ __wbg_hasAttribute_1fc23d9b37b6dfb1: function(arg0, arg1, arg2) {
445
+ const ret = arg0.hasAttribute(getStringFromWasm0(arg1, arg2));
446
+ return ret;
447
+ },
448
+ __wbg_height_96c07d9559d0200a: function(arg0) {
449
+ const ret = arg0.height;
450
+ return ret;
451
+ },
452
+ __wbg_hidePopover_35bb234f587ca1a8: function() { return handleError(function (arg0) {
453
+ arg0.hidePopover();
454
+ }, arguments); },
455
+ __wbg_host_18450e7fb2bf2108: function(arg0) {
456
+ const ret = arg0.host;
457
+ return ret;
458
+ },
459
+ __wbg_id_2bb4f5057d3bfc99: function(arg0, arg1) {
460
+ const ret = arg1.id;
461
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
462
+ const len1 = WASM_VECTOR_LEN;
463
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
464
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
465
+ },
466
+ __wbg_innerHeight_92315939e482496d: function() { return handleError(function (arg0) {
467
+ const ret = arg0.innerHeight;
468
+ return ret;
469
+ }, arguments); },
470
+ __wbg_innerWidth_dec7d2ac73df3e63: function() { return handleError(function (arg0) {
471
+ const ret = arg0.innerWidth;
472
+ return ret;
473
+ }, arguments); },
474
+ __wbg_instanceof_Element_beebfaab75d12d9d: function(arg0) {
475
+ let result;
476
+ try {
477
+ result = arg0 instanceof Element;
478
+ } catch (_) {
479
+ result = false;
480
+ }
481
+ const ret = result;
482
+ return ret;
483
+ },
484
+ __wbg_instanceof_HtmlElement_4493a09212d3586f: function(arg0) {
485
+ let result;
486
+ try {
487
+ result = arg0 instanceof HTMLElement;
488
+ } catch (_) {
489
+ result = false;
490
+ }
491
+ const ret = result;
492
+ return ret;
493
+ },
494
+ __wbg_instanceof_HtmlInputElement_ad3be04339d0e4df: function(arg0) {
495
+ let result;
496
+ try {
497
+ result = arg0 instanceof HTMLInputElement;
498
+ } catch (_) {
499
+ result = false;
500
+ }
501
+ const ret = result;
502
+ return ret;
503
+ },
504
+ __wbg_instanceof_HtmlSelectElement_b4698f847dc49da5: function(arg0) {
505
+ let result;
506
+ try {
507
+ result = arg0 instanceof HTMLSelectElement;
508
+ } catch (_) {
509
+ result = false;
510
+ }
511
+ const ret = result;
512
+ return ret;
513
+ },
514
+ __wbg_instanceof_Object_33f20e6f12439f3e: function(arg0) {
515
+ let result;
516
+ try {
517
+ result = arg0 instanceof Object;
518
+ } catch (_) {
519
+ result = false;
520
+ }
521
+ const ret = result;
522
+ return ret;
523
+ },
524
+ __wbg_instanceof_Promise_4cb210c0b8f8c959: function(arg0) {
525
+ let result;
526
+ try {
527
+ result = arg0 instanceof Promise;
528
+ } catch (_) {
529
+ result = false;
530
+ }
531
+ const ret = result;
532
+ return ret;
533
+ },
534
+ __wbg_instanceof_ShadowRoot_8ab3038bc5e14d84: function(arg0) {
535
+ let result;
536
+ try {
537
+ result = arg0 instanceof ShadowRoot;
538
+ } catch (_) {
539
+ result = false;
540
+ }
541
+ const ret = result;
542
+ return ret;
543
+ },
544
+ __wbg_instanceof_Window_05ba1ee4f6781663: function(arg0) {
545
+ let result;
546
+ try {
547
+ result = arg0 instanceof Window;
548
+ } catch (_) {
549
+ result = false;
550
+ }
551
+ const ret = result;
552
+ return ret;
553
+ },
554
+ __wbg_isArray_0677c962b281d01a: function(arg0) {
555
+ const ret = Array.isArray(arg0);
556
+ return ret;
557
+ },
558
+ __wbg_isConnected_c24b5a7bb035eae0: function(arg0) {
559
+ const ret = arg0.isConnected;
560
+ return ret;
561
+ },
562
+ __wbg_isSameNode_75a8a5f6302c6182: function(arg0, arg1) {
563
+ const ret = arg0.isSameNode(arg1);
564
+ return ret;
565
+ },
566
+ __wbg_is_7b9d0b289033c7de: function(arg0, arg1) {
567
+ const ret = Object.is(arg0, arg1);
568
+ return ret;
569
+ },
570
+ __wbg_item_20d060e2ba81115e: function(arg0, arg1) {
571
+ const ret = arg0.item(arg1 >>> 0);
572
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
573
+ },
574
+ __wbg_key_803dca86cdcfa8dd: function(arg0, arg1) {
575
+ const ret = arg1.key;
576
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
577
+ const len1 = WASM_VECTOR_LEN;
578
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
579
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
580
+ },
581
+ __wbg_keys_58421f8f96795607: function(arg0) {
582
+ const ret = Object.keys(arg0);
583
+ return ret;
584
+ },
585
+ __wbg_left_7e76a74d0db1754f: function(arg0) {
586
+ const ret = arg0.left;
587
+ return ret;
588
+ },
589
+ __wbg_length_370319915dc99107: function(arg0) {
590
+ const ret = arg0.length;
591
+ return ret;
592
+ },
593
+ __wbg_length_6d37314da9372f80: function(arg0) {
594
+ const ret = arg0.length;
595
+ return ret;
596
+ },
597
+ __wbg_length_f013b2ebf7dcf709: function(arg0) {
598
+ const ret = arg0.length;
599
+ return ret;
600
+ },
601
+ __wbg_metaKey_d961c7572a9f84f5: function(arg0) {
602
+ const ret = arg0.metaKey;
603
+ return ret;
604
+ },
605
+ __wbg_new_32b398fb48b6d94a: function() {
606
+ const ret = new Array();
607
+ return ret;
608
+ },
609
+ __wbg_new_da52cf8fe3429cb2: function() {
610
+ const ret = new Object();
611
+ return ret;
612
+ },
613
+ __wbg_new_with_args_200d82645b6544eb: function(arg0, arg1, arg2, arg3) {
614
+ const ret = new Function(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
615
+ return ret;
616
+ },
617
+ __wbg_new_with_event_init_dict_b7d5fa264299bcfa: function() { return handleError(function (arg0, arg1, arg2) {
618
+ const ret = new CustomEvent(getStringFromWasm0(arg0, arg1), arg2);
619
+ return ret;
620
+ }, arguments); },
621
+ __wbg_ownerDocument_5a7a5473f8709b3e: function(arg0) {
622
+ const ret = arg0.ownerDocument;
623
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
624
+ },
625
+ __wbg_parse_1c0d8a8656d7e016: function() { return handleError(function (arg0, arg1) {
626
+ const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
627
+ return ret;
628
+ }, arguments); },
629
+ __wbg_preventDefault_b64888c857500682: function(arg0) {
630
+ arg0.preventDefault();
631
+ },
632
+ __wbg_push_d2ae3af0c1217ae6: function(arg0, arg1) {
633
+ const ret = arg0.push(arg1);
634
+ return ret;
635
+ },
636
+ __wbg_querySelectorAll_09d62dd04b7efea2: function() { return handleError(function (arg0, arg1, arg2) {
637
+ const ret = arg0.querySelectorAll(getStringFromWasm0(arg1, arg2));
638
+ return ret;
639
+ }, arguments); },
640
+ __wbg_querySelectorAll_c5edaa743a5f3647: function() { return handleError(function (arg0, arg1, arg2) {
641
+ const ret = arg0.querySelectorAll(getStringFromWasm0(arg1, arg2));
642
+ return ret;
643
+ }, arguments); },
644
+ __wbg_querySelector_b41be1b1bf55eea5: function() { return handleError(function (arg0, arg1, arg2) {
645
+ const ret = arg0.querySelector(getStringFromWasm0(arg1, arg2));
646
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
647
+ }, arguments); },
648
+ __wbg_querySelector_b966f59fa9848d69: function() { return handleError(function (arg0, arg1, arg2) {
649
+ const ret = arg0.querySelector(getStringFromWasm0(arg1, arg2));
650
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
651
+ }, arguments); },
652
+ __wbg_queueMicrotask_0ab5b2d2393e99b9: function(arg0) {
653
+ const ret = arg0.queueMicrotask;
654
+ return ret;
655
+ },
656
+ __wbg_queueMicrotask_6a09b7bc46549209: function(arg0) {
657
+ queueMicrotask(arg0);
658
+ },
659
+ __wbg_reject_90df95b492dd8563: function(arg0) {
660
+ const ret = Promise.reject(arg0);
661
+ return ret;
662
+ },
663
+ __wbg_removeAttribute_1e7d2c409776d836: function() { return handleError(function (arg0, arg1, arg2) {
664
+ arg0.removeAttribute(getStringFromWasm0(arg1, arg2));
665
+ }, arguments); },
666
+ __wbg_removeChild_8d9536328d674d54: function() { return handleError(function (arg0, arg1) {
667
+ const ret = arg0.removeChild(arg1);
668
+ return ret;
669
+ }, arguments); },
670
+ __wbg_remove_ce1b54059317fe8a: function(arg0) {
671
+ arg0.remove();
672
+ },
673
+ __wbg_requestAnimationFrame_1a85deeab66448c2: function() { return handleError(function (arg0, arg1) {
674
+ const ret = arg0.requestAnimationFrame(arg1);
675
+ return ret;
676
+ }, arguments); },
677
+ __wbg_resolve_2191a4dfe481c25b: function(arg0) {
678
+ const ret = Promise.resolve(arg0);
679
+ return ret;
680
+ },
681
+ __wbg_right_36c53e00496f4f0a: function(arg0) {
682
+ const ret = arg0.right;
683
+ return ret;
684
+ },
685
+ __wbg_scrollIntoView_d8b806f471b7418e: function(arg0, arg1) {
686
+ arg0.scrollIntoView(arg1);
687
+ },
688
+ __wbg_scrollTop_b3effa9c5de14d21: function(arg0) {
689
+ const ret = arg0.scrollTop;
690
+ return ret;
691
+ },
692
+ __wbg_selectedIndex_97ad3dd8ed57cf47: function(arg0) {
693
+ const ret = arg0.selectedIndex;
694
+ return ret;
695
+ },
696
+ __wbg_setAttribute_71039043be82d098: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
697
+ arg0.setAttribute(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
698
+ }, arguments); },
699
+ __wbg_setProperty_e4e51b1b1d681d15: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
700
+ arg0.setProperty(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
701
+ }, arguments); },
702
+ __wbg_set_8535240470bf2500: function() { return handleError(function (arg0, arg1, arg2) {
703
+ const ret = Reflect.set(arg0, arg1, arg2);
704
+ return ret;
705
+ }, arguments); },
706
+ __wbg_set_block_8135b3acafa1ca88: function(arg0, arg1) {
707
+ arg0.block = __wbindgen_enum_ScrollLogicalPosition[arg1];
708
+ },
709
+ __wbg_set_bubbles_b4e5c994b4f96f0e: function(arg0, arg1) {
710
+ arg0.bubbles = arg1 !== 0;
711
+ },
712
+ __wbg_set_cancelable_4980272de27d460b: function(arg0, arg1) {
713
+ arg0.cancelable = arg1 !== 0;
714
+ },
715
+ __wbg_set_checked_ebff10552290d993: function(arg0, arg1) {
716
+ arg0.checked = arg1 !== 0;
717
+ },
718
+ __wbg_set_composed_4b360b2fea1c1905: function(arg0, arg1) {
719
+ arg0.composed = arg1 !== 0;
720
+ },
721
+ __wbg_set_detail_564ad103413aa5dc: function(arg0, arg1) {
722
+ arg0.detail = arg1;
723
+ },
724
+ __wbg_set_disabled_cad2c12b3643aa52: function(arg0, arg1) {
725
+ arg0.disabled = arg1 !== 0;
726
+ },
727
+ __wbg_set_inline_77b0fb4f96d76814: function(arg0, arg1) {
728
+ arg0.inline = __wbindgen_enum_ScrollLogicalPosition[arg1];
729
+ },
730
+ __wbg_set_innerHTML_f78a45a07f97e136: function(arg0, arg1, arg2) {
731
+ arg0.innerHTML = getStringFromWasm0(arg1, arg2);
732
+ },
733
+ __wbg_set_mode_17bd6a9f8e12d5a5: function(arg0, arg1) {
734
+ arg0.mode = __wbindgen_enum_ShadowRootMode[arg1];
735
+ },
736
+ __wbg_set_scrollTop_431b03eeb3e9c636: function(arg0, arg1) {
737
+ arg0.scrollTop = arg1;
738
+ },
739
+ __wbg_set_selectedIndex_73b395b81db5623e: function(arg0, arg1) {
740
+ arg0.selectedIndex = arg1;
741
+ },
742
+ __wbg_set_textContent_54dcad83ae15772d: function(arg0, arg1, arg2) {
743
+ arg0.textContent = arg1 === 0 ? undefined : getStringFromWasm0(arg1, arg2);
744
+ },
745
+ __wbg_set_value_e0caa78ebf9917a8: function(arg0, arg1, arg2) {
746
+ arg0.value = getStringFromWasm0(arg1, arg2);
747
+ },
748
+ __wbg_set_value_e5d078763e63e81e: function(arg0, arg1, arg2) {
749
+ arg0.value = getStringFromWasm0(arg1, arg2);
750
+ },
751
+ __wbg_shadowRoot_9a0f635b93f2c2a0: function(arg0) {
752
+ const ret = arg0.shadowRoot;
753
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
754
+ },
755
+ __wbg_shiftKey_9bcb8bdd60c2f152: function(arg0) {
756
+ const ret = arg0.shiftKey;
757
+ return ret;
758
+ },
759
+ __wbg_showPopover_946be83fc4879638: function() { return handleError(function (arg0) {
760
+ arg0.showPopover();
761
+ }, arguments); },
762
+ __wbg_static_accessor_GLOBAL_4ef717fb391d88b7: function() {
763
+ const ret = typeof global === 'undefined' ? null : global;
764
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
765
+ },
766
+ __wbg_static_accessor_GLOBAL_THIS_8d1badc68b5a74f4: function() {
767
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
768
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
769
+ },
770
+ __wbg_static_accessor_SELF_146583524fe1469b: function() {
771
+ const ret = typeof self === 'undefined' ? null : self;
772
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
773
+ },
774
+ __wbg_static_accessor_WINDOW_f2829a2234d7819e: function() {
775
+ const ret = typeof window === 'undefined' ? null : window;
776
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
777
+ },
778
+ __wbg_stringify_b54333f60f1e4dad: function() { return handleError(function (arg0) {
779
+ const ret = JSON.stringify(arg0);
780
+ return ret;
781
+ }, arguments); },
782
+ __wbg_style_6657aed849e5d757: function(arg0) {
783
+ const ret = arg0.style;
784
+ return ret;
785
+ },
786
+ __wbg_tagName_d99c8072027f3c98: function(arg0, arg1) {
787
+ const ret = arg1.tagName;
788
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
789
+ const len1 = WASM_VECTOR_LEN;
790
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
791
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
792
+ },
793
+ __wbg_target_e759594a8d965ed7: function(arg0) {
794
+ const ret = arg0.target;
795
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
796
+ },
797
+ __wbg_textContent_37277f66248f39e6: function(arg0, arg1) {
798
+ const ret = arg1.textContent;
799
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
800
+ var len1 = WASM_VECTOR_LEN;
801
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
802
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
803
+ },
804
+ __wbg_then_16d107c451e9905d: function(arg0, arg1, arg2) {
805
+ const ret = arg0.then(arg1, arg2);
806
+ return ret;
807
+ },
808
+ __wbg_then_6ec10ae38b3e92f7: function(arg0, arg1) {
809
+ const ret = arg0.then(arg1);
810
+ return ret;
811
+ },
812
+ __wbg_top_fe120acfa924a430: function(arg0) {
813
+ const ret = arg0.top;
814
+ return ret;
815
+ },
816
+ __wbg_type_c1987e7fbaf7340e: function(arg0, arg1) {
817
+ const ret = arg1.type;
818
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
819
+ const len1 = WASM_VECTOR_LEN;
820
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
821
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
822
+ },
823
+ __wbg_value_1f687dfa7d6c3d08: function(arg0, arg1) {
824
+ const ret = arg1.value;
825
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
826
+ const len1 = WASM_VECTOR_LEN;
827
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
828
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
829
+ },
830
+ __wbg_value_d7621df0105931d8: function(arg0, arg1) {
831
+ const ret = arg1.value;
832
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
833
+ const len1 = WASM_VECTOR_LEN;
834
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
835
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
836
+ },
837
+ __wbg_width_219185400361db86: function(arg0) {
838
+ const ret = arg0.width;
839
+ return ret;
840
+ },
841
+ __wbindgen_cast_0000000000000001: function(arg0, arg1) {
842
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 178, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
843
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_66404d18cc2edcc2___convert__closures_____invoke___wasm_bindgen_66404d18cc2edcc2___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_66404d18cc2edcc2___JsError___true_);
844
+ return ret;
845
+ },
846
+ __wbindgen_cast_0000000000000002: function(arg0, arg1) {
847
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 17, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
848
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_66404d18cc2edcc2___convert__closures_____invoke___web_sys_f19f0f38d6ea5adb___features__gen_HtmlElement__HtmlElement______true_);
849
+ return ret;
850
+ },
851
+ __wbindgen_cast_0000000000000003: function(arg0, arg1) {
852
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("HTMLElement"), String, Option(String), Option(String)], shim_idx: 18, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
853
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_66404d18cc2edcc2___convert__closures_____invoke___web_sys_f19f0f38d6ea5adb___features__gen_HtmlElement__HtmlElement__alloc_508e33bd5656020b___string__String__core_ed718c3d60ebd546___option__Option_alloc_508e33bd5656020b___string__String___core_ed718c3d60ebd546___option__Option_alloc_508e33bd5656020b___string__String_______true_);
854
+ return ret;
855
+ },
856
+ __wbindgen_cast_0000000000000004: function(arg0, arg1) {
857
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("HTMLElement")], shim_idx: 17, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
858
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_66404d18cc2edcc2___convert__closures_____invoke___web_sys_f19f0f38d6ea5adb___features__gen_HtmlElement__HtmlElement______true__3);
859
+ return ret;
860
+ },
861
+ __wbindgen_cast_0000000000000005: function(arg0, arg1) {
862
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("KeyboardEvent")], shim_idx: 17, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
863
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_66404d18cc2edcc2___convert__closures_____invoke___web_sys_f19f0f38d6ea5adb___features__gen_HtmlElement__HtmlElement______true__4);
864
+ return ret;
865
+ },
866
+ __wbindgen_cast_0000000000000006: function(arg0, arg1) {
867
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [U32], shim_idx: 166, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
868
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_66404d18cc2edcc2___convert__closures_____invoke___u32______true_);
869
+ return ret;
870
+ },
871
+ __wbindgen_cast_0000000000000007: function(arg0, arg1) {
872
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 16, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
873
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_66404d18cc2edcc2___convert__closures_____invoke_______true_);
874
+ return ret;
875
+ },
876
+ __wbindgen_cast_0000000000000008: function(arg0) {
877
+ // Cast intrinsic for `F64 -> Externref`.
878
+ const ret = arg0;
879
+ return ret;
880
+ },
881
+ __wbindgen_cast_0000000000000009: function(arg0, arg1) {
882
+ // Cast intrinsic for `Ref(String) -> Externref`.
883
+ const ret = getStringFromWasm0(arg0, arg1);
884
+ return ret;
885
+ },
886
+ __wbindgen_init_externref_table: function() {
887
+ const table = wasm.__wbindgen_externrefs;
888
+ const offset = table.grow(4);
889
+ table.set(0, undefined);
890
+ table.set(offset + 0, undefined);
891
+ table.set(offset + 1, null);
892
+ table.set(offset + 2, true);
893
+ table.set(offset + 3, false);
894
+ },
895
+ };
896
+ return {
897
+ __proto__: null,
898
+ "./opengrid_web_components_bg.js": import0,
899
+ "./snippets/opengrid-web-core-e0ef3c8948ce8a1e/inline0.js": import1,
900
+ "./snippets/opengrid-web-core-e0ef3c8948ce8a1e/inline0.js": import2,
901
+ "./snippets/opengrid-web-core-e0ef3c8948ce8a1e/inline0.js": import3,
902
+ };
903
+ }
904
+
905
+ function wasm_bindgen_66404d18cc2edcc2___convert__closures_____invoke_______true_(arg0, arg1) {
906
+ wasm.wasm_bindgen_66404d18cc2edcc2___convert__closures_____invoke_______true_(arg0, arg1);
907
+ }
908
+
909
+ function wasm_bindgen_66404d18cc2edcc2___convert__closures_____invoke___web_sys_f19f0f38d6ea5adb___features__gen_HtmlElement__HtmlElement______true_(arg0, arg1, arg2) {
910
+ wasm.wasm_bindgen_66404d18cc2edcc2___convert__closures_____invoke___web_sys_f19f0f38d6ea5adb___features__gen_HtmlElement__HtmlElement______true_(arg0, arg1, arg2);
911
+ }
912
+
913
+ function wasm_bindgen_66404d18cc2edcc2___convert__closures_____invoke___web_sys_f19f0f38d6ea5adb___features__gen_HtmlElement__HtmlElement______true__3(arg0, arg1, arg2) {
914
+ wasm.wasm_bindgen_66404d18cc2edcc2___convert__closures_____invoke___web_sys_f19f0f38d6ea5adb___features__gen_HtmlElement__HtmlElement______true__3(arg0, arg1, arg2);
915
+ }
916
+
917
+ function wasm_bindgen_66404d18cc2edcc2___convert__closures_____invoke___web_sys_f19f0f38d6ea5adb___features__gen_HtmlElement__HtmlElement______true__4(arg0, arg1, arg2) {
918
+ wasm.wasm_bindgen_66404d18cc2edcc2___convert__closures_____invoke___web_sys_f19f0f38d6ea5adb___features__gen_HtmlElement__HtmlElement______true__4(arg0, arg1, arg2);
919
+ }
920
+
921
+ function wasm_bindgen_66404d18cc2edcc2___convert__closures_____invoke___wasm_bindgen_66404d18cc2edcc2___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_66404d18cc2edcc2___JsError___true_(arg0, arg1, arg2) {
922
+ const ret = wasm.wasm_bindgen_66404d18cc2edcc2___convert__closures_____invoke___wasm_bindgen_66404d18cc2edcc2___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_66404d18cc2edcc2___JsError___true_(arg0, arg1, arg2);
923
+ if (ret[1]) {
924
+ throw takeFromExternrefTable0(ret[0]);
925
+ }
926
+ }
927
+
928
+ function wasm_bindgen_66404d18cc2edcc2___convert__closures_____invoke___web_sys_f19f0f38d6ea5adb___features__gen_HtmlElement__HtmlElement__alloc_508e33bd5656020b___string__String__core_ed718c3d60ebd546___option__Option_alloc_508e33bd5656020b___string__String___core_ed718c3d60ebd546___option__Option_alloc_508e33bd5656020b___string__String_______true_(arg0, arg1, arg2, arg3, arg4, arg5) {
929
+ const ptr0 = passStringToWasm0(arg3, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
930
+ const len0 = WASM_VECTOR_LEN;
931
+ var ptr1 = isLikeNone(arg4) ? 0 : passStringToWasm0(arg4, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
932
+ var len1 = WASM_VECTOR_LEN;
933
+ var ptr2 = isLikeNone(arg5) ? 0 : passStringToWasm0(arg5, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
934
+ var len2 = WASM_VECTOR_LEN;
935
+ wasm.wasm_bindgen_66404d18cc2edcc2___convert__closures_____invoke___web_sys_f19f0f38d6ea5adb___features__gen_HtmlElement__HtmlElement__alloc_508e33bd5656020b___string__String__core_ed718c3d60ebd546___option__Option_alloc_508e33bd5656020b___string__String___core_ed718c3d60ebd546___option__Option_alloc_508e33bd5656020b___string__String_______true_(arg0, arg1, arg2, ptr0, len0, ptr1, len1, ptr2, len2);
936
+ }
937
+
938
+ function wasm_bindgen_66404d18cc2edcc2___convert__closures_____invoke___u32______true_(arg0, arg1, arg2) {
939
+ wasm.wasm_bindgen_66404d18cc2edcc2___convert__closures_____invoke___u32______true_(arg0, arg1, arg2);
940
+ }
941
+
942
+
943
+ const __wbindgen_enum_ScrollLogicalPosition = ["start", "center", "end", "nearest"];
944
+
945
+
946
+ const __wbindgen_enum_ShadowRootMode = ["open", "closed"];
947
+
948
+ function addToExternrefTable0(obj) {
949
+ const idx = wasm.__externref_table_alloc();
950
+ wasm.__wbindgen_externrefs.set(idx, obj);
951
+ return idx;
952
+ }
953
+
954
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
955
+ ? { register: () => {}, unregister: () => {} }
956
+ : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
957
+
958
+ function debugString(val) {
959
+ // primitive types
960
+ const type = typeof val;
961
+ if (type == 'number' || type == 'boolean' || val == null) {
962
+ return `${val}`;
963
+ }
964
+ if (type == 'string') {
965
+ return `"${val}"`;
966
+ }
967
+ if (type == 'symbol') {
968
+ const description = val.description;
969
+ if (description == null) {
970
+ return 'Symbol';
971
+ } else {
972
+ return `Symbol(${description})`;
973
+ }
974
+ }
975
+ if (type == 'function') {
976
+ const name = val.name;
977
+ if (typeof name == 'string' && name.length > 0) {
978
+ return `Function(${name})`;
979
+ } else {
980
+ return 'Function';
981
+ }
982
+ }
983
+ // objects
984
+ if (Array.isArray(val)) {
985
+ const length = val.length;
986
+ let debug = '[';
987
+ if (length > 0) {
988
+ debug += debugString(val[0]);
989
+ }
990
+ for(let i = 1; i < length; i++) {
991
+ debug += ', ' + debugString(val[i]);
992
+ }
993
+ debug += ']';
994
+ return debug;
995
+ }
996
+ // Test for built-in
997
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
998
+ let className;
999
+ if (builtInMatches && builtInMatches.length > 1) {
1000
+ className = builtInMatches[1];
1001
+ } else {
1002
+ // Failed to match the standard '[object ClassName]'
1003
+ return toString.call(val);
1004
+ }
1005
+ if (className == 'Object') {
1006
+ // we're a user defined class or Object
1007
+ // JSON.stringify avoids problems with cycles, and is generally much
1008
+ // easier than looping through ownProperties of `val`.
1009
+ try {
1010
+ return 'Object(' + JSON.stringify(val) + ')';
1011
+ } catch (_) {
1012
+ return 'Object';
1013
+ }
1014
+ }
1015
+ // errors
1016
+ if (val instanceof Error) {
1017
+ return `${val.name}: ${val.message}\n${val.stack}`;
1018
+ }
1019
+ // TODO we could test for more things here, like `Set`s and `Map`s.
1020
+ return className;
1021
+ }
1022
+
1023
+ let cachedDataViewMemory0 = null;
1024
+ function getDataViewMemory0() {
1025
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
1026
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
1027
+ }
1028
+ return cachedDataViewMemory0;
1029
+ }
1030
+
1031
+ function getStringFromWasm0(ptr, len) {
1032
+ return decodeText(ptr >>> 0, len);
1033
+ }
1034
+
1035
+ let cachedUint8ArrayMemory0 = null;
1036
+ function getUint8ArrayMemory0() {
1037
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
1038
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
1039
+ }
1040
+ return cachedUint8ArrayMemory0;
1041
+ }
1042
+
1043
+ function handleError(f, args) {
1044
+ try {
1045
+ return f.apply(this, args);
1046
+ } catch (e) {
1047
+ const idx = addToExternrefTable0(e);
1048
+ wasm.__wbindgen_exn_store(idx);
1049
+ }
1050
+ }
1051
+
1052
+ function isLikeNone(x) {
1053
+ return x === undefined || x === null;
1054
+ }
1055
+
1056
+ function makeMutClosure(arg0, arg1, f) {
1057
+ const state = { a: arg0, b: arg1, cnt: 1 };
1058
+ const real = (...args) => {
1059
+
1060
+ // First up with a closure we increment the internal reference
1061
+ // count. This ensures that the Rust closure environment won't
1062
+ // be deallocated while we're invoking it.
1063
+ state.cnt++;
1064
+ const a = state.a;
1065
+ state.a = 0;
1066
+ try {
1067
+ return f(a, state.b, ...args);
1068
+ } finally {
1069
+ state.a = a;
1070
+ real._wbg_cb_unref();
1071
+ }
1072
+ };
1073
+ real._wbg_cb_unref = () => {
1074
+ if (--state.cnt === 0) {
1075
+ wasm.__wbindgen_destroy_closure(state.a, state.b);
1076
+ state.a = 0;
1077
+ CLOSURE_DTORS.unregister(state);
1078
+ }
1079
+ };
1080
+ CLOSURE_DTORS.register(real, state, state);
1081
+ return real;
1082
+ }
1083
+
1084
+ function passStringToWasm0(arg, malloc, realloc) {
1085
+ if (realloc === undefined) {
1086
+ const buf = cachedTextEncoder.encode(arg);
1087
+ const ptr = malloc(buf.length, 1) >>> 0;
1088
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
1089
+ WASM_VECTOR_LEN = buf.length;
1090
+ return ptr;
1091
+ }
1092
+
1093
+ let len = arg.length;
1094
+ let ptr = malloc(len, 1) >>> 0;
1095
+
1096
+ const mem = getUint8ArrayMemory0();
1097
+
1098
+ let offset = 0;
1099
+
1100
+ for (; offset < len; offset++) {
1101
+ const code = arg.charCodeAt(offset);
1102
+ if (code > 0x7F) break;
1103
+ mem[ptr + offset] = code;
1104
+ }
1105
+ if (offset !== len) {
1106
+ if (offset !== 0) {
1107
+ arg = arg.slice(offset);
1108
+ }
1109
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
1110
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
1111
+ const ret = cachedTextEncoder.encodeInto(arg, view);
1112
+
1113
+ offset += ret.written;
1114
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
1115
+ }
1116
+
1117
+ WASM_VECTOR_LEN = offset;
1118
+ return ptr;
1119
+ }
1120
+
1121
+ function takeFromExternrefTable0(idx) {
1122
+ const value = wasm.__wbindgen_externrefs.get(idx);
1123
+ wasm.__externref_table_dealloc(idx);
1124
+ return value;
1125
+ }
1126
+
1127
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1128
+ cachedTextDecoder.decode();
1129
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
1130
+ let numBytesDecoded = 0;
1131
+ function decodeText(ptr, len) {
1132
+ numBytesDecoded += len;
1133
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
1134
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1135
+ cachedTextDecoder.decode();
1136
+ numBytesDecoded = len;
1137
+ }
1138
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
1139
+ }
1140
+
1141
+ const cachedTextEncoder = new TextEncoder();
1142
+
1143
+ if (!('encodeInto' in cachedTextEncoder)) {
1144
+ cachedTextEncoder.encodeInto = function (arg, view) {
1145
+ const buf = cachedTextEncoder.encode(arg);
1146
+ view.set(buf);
1147
+ return {
1148
+ read: arg.length,
1149
+ written: buf.length
1150
+ };
1151
+ };
1152
+ }
1153
+
1154
+ let WASM_VECTOR_LEN = 0;
1155
+
1156
+ let wasmModule, wasmInstance, wasm;
1157
+ function __wbg_finalize_init(instance, module) {
1158
+ wasmInstance = instance;
1159
+ wasm = instance.exports;
1160
+ wasmModule = module;
1161
+ cachedDataViewMemory0 = null;
1162
+ cachedUint8ArrayMemory0 = null;
1163
+ wasm.__wbindgen_start();
1164
+ return wasm;
1165
+ }
1166
+
1167
+ async function __wbg_load(module, imports) {
1168
+ if (typeof Response === 'function' && module instanceof Response) {
1169
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
1170
+ try {
1171
+ return await WebAssembly.instantiateStreaming(module, imports);
1172
+ } catch (e) {
1173
+ const validResponse = module.ok && expectedResponseType(module.type);
1174
+
1175
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
1176
+ console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
1177
+
1178
+ } else { throw e; }
1179
+ }
1180
+ }
1181
+
1182
+ const bytes = await module.arrayBuffer();
1183
+ return await WebAssembly.instantiate(bytes, imports);
1184
+ } else {
1185
+ const instance = await WebAssembly.instantiate(module, imports);
1186
+
1187
+ if (instance instanceof WebAssembly.Instance) {
1188
+ return { instance, module };
1189
+ } else {
1190
+ return instance;
1191
+ }
1192
+ }
1193
+
1194
+ function expectedResponseType(type) {
1195
+ switch (type) {
1196
+ case 'basic': case 'cors': case 'default': return true;
1197
+ }
1198
+ return false;
1199
+ }
1200
+ }
1201
+
1202
+ function initSync(module) {
1203
+ if (wasm !== undefined) return wasm;
1204
+
1205
+
1206
+ if (module !== undefined) {
1207
+ if (Object.getPrototypeOf(module) === Object.prototype) {
1208
+ ({module} = module)
1209
+ } else {
1210
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
1211
+ }
1212
+ }
1213
+
1214
+ const imports = __wbg_get_imports();
1215
+ if (!(module instanceof WebAssembly.Module)) {
1216
+ module = new WebAssembly.Module(module);
1217
+ }
1218
+ const instance = new WebAssembly.Instance(module, imports);
1219
+ return __wbg_finalize_init(instance, module);
1220
+ }
1221
+
1222
+ async function __wbg_init(module_or_path) {
1223
+ if (wasm !== undefined) return wasm;
1224
+
1225
+
1226
+ if (module_or_path !== undefined) {
1227
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
1228
+ ({module_or_path} = module_or_path)
1229
+ } else {
1230
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
1231
+ }
1232
+ }
1233
+
1234
+ if (module_or_path === undefined) {
1235
+ module_or_path = new URL('opengrid_web_components_bg.wasm', import.meta.url);
1236
+ }
1237
+ const imports = __wbg_get_imports();
1238
+
1239
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
1240
+ module_or_path = fetch(module_or_path);
1241
+ }
1242
+
1243
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
1244
+
1245
+ return __wbg_finalize_init(instance, module);
1246
+ }
1247
+
1248
+ export { initSync, __wbg_init as default };