@relo-ui/web 0.0.0-stage → 0.1.0-rc.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.
- package/README.md +27 -2
- package/dist/LICENSE +202 -0
- package/dist/NOTICE +5 -0
- package/dist/core/contracts.d.ts +72 -0
- package/dist/core/contracts.js +76 -0
- package/dist/core/document.d.ts +16 -0
- package/dist/core/document.js +21 -0
- package/dist/core/engine.d.ts +8 -0
- package/dist/core/engine.js +28 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/index.js +7 -0
- package/dist/core/runtime.d.ts +23 -0
- package/dist/core/runtime.js +46 -0
- package/dist/core/schema.d.ts +56 -0
- package/dist/core/schema.js +72 -0
- package/dist/core/session.d.ts +88 -0
- package/dist/core/session.js +520 -0
- package/dist/core/value.d.ts +18 -0
- package/dist/core/value.js +118 -0
- package/dist/dom/accessibility.d.ts +2 -0
- package/dist/dom/accessibility.js +69 -0
- package/dist/dom/icons.d.ts +1 -0
- package/dist/dom/icons.js +21 -0
- package/dist/dom/images.d.ts +59 -0
- package/dist/dom/images.js +406 -0
- package/dist/dom/index.d.ts +3 -0
- package/dist/dom/index.js +2 -0
- package/dist/dom/inputs.d.ts +5 -0
- package/dist/dom/inputs.js +85 -0
- package/dist/dom/lists.d.ts +7 -0
- package/dist/dom/lists.js +48 -0
- package/dist/dom/measurement.d.ts +16 -0
- package/dist/dom/measurement.js +67 -0
- package/dist/dom/motion-lifecycle.d.ts +17 -0
- package/dist/dom/motion-lifecycle.js +28 -0
- package/dist/dom/motion-plan.d.ts +44 -0
- package/dist/dom/motion-plan.js +31 -0
- package/dist/dom/motion.d.ts +73 -0
- package/dist/dom/motion.js +817 -0
- package/dist/dom/mount-plan.d.ts +15 -0
- package/dist/dom/mount-plan.js +58 -0
- package/dist/dom/presentation.d.ts +11 -0
- package/dist/dom/presentation.js +331 -0
- package/dist/dom/primitives.d.ts +16 -0
- package/dist/dom/primitives.js +378 -0
- package/dist/dom/range.d.ts +9 -0
- package/dist/dom/range.js +120 -0
- package/dist/dom/renderer.d.ts +99 -0
- package/dist/dom/renderer.js +1041 -0
- package/dist/dom/scroll.d.ts +7 -0
- package/dist/dom/scroll.js +167 -0
- package/dist/dom/shared-layout.d.ts +40 -0
- package/dist/dom/shared-layout.js +440 -0
- package/dist/dom/style.d.ts +35 -0
- package/dist/dom/style.js +337 -0
- package/dist/dom/text-motion.d.ts +17 -0
- package/dist/dom/text-motion.js +185 -0
- package/dist/dom/theme.d.ts +13 -0
- package/dist/dom/theme.js +65 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +18 -0
- package/dist/licenses/Rust-COPYRIGHT-library.html +29357 -0
- package/dist/licenses/archery-1.2.3/LICENSE.md +21 -0
- package/dist/licenses/bytemuck-1.25.2/LICENSE-APACHE +61 -0
- package/dist/licenses/bytemuck-1.25.2/LICENSE-MIT +9 -0
- package/dist/licenses/bytemuck-1.25.2/LICENSE-ZLIB +11 -0
- package/dist/licenses/cargo.json +340 -0
- package/dist/licenses/cfg-if-1.0.5/LICENSE-APACHE +201 -0
- package/dist/licenses/cfg-if-1.0.5/LICENSE-MIT +25 -0
- package/dist/licenses/equivalent-1.0.2/LICENSE-APACHE +201 -0
- package/dist/licenses/equivalent-1.0.2/LICENSE-MIT +25 -0
- package/dist/licenses/futures-core-0.3.34/LICENSE-APACHE +202 -0
- package/dist/licenses/futures-core-0.3.34/LICENSE-MIT +26 -0
- package/dist/licenses/futures-task-0.3.34/LICENSE-APACHE +202 -0
- package/dist/licenses/futures-task-0.3.34/LICENSE-MIT +26 -0
- package/dist/licenses/futures-util-0.3.34/LICENSE-APACHE +202 -0
- package/dist/licenses/futures-util-0.3.34/LICENSE-MIT +26 -0
- package/dist/licenses/imbl-7.0.2/LICENCE.md +355 -0
- package/dist/licenses/imbl-sized-chunks-0.2.0/LICENCE.md +355 -0
- package/dist/licenses/itoa-1.0.18/LICENSE-APACHE +176 -0
- package/dist/licenses/itoa-1.0.18/LICENSE-MIT +23 -0
- package/dist/licenses/js-sys-0.3.106/LICENSE-APACHE +201 -0
- package/dist/licenses/js-sys-0.3.106/LICENSE-MIT +25 -0
- package/dist/licenses/memchr-2.8.3/COPYING +3 -0
- package/dist/licenses/memchr-2.8.3/LICENSE-MIT +21 -0
- package/dist/licenses/once_cell-1.21.4/LICENSE-APACHE +201 -0
- package/dist/licenses/once_cell-1.21.4/LICENSE-MIT +23 -0
- package/dist/licenses/pin-project-lite-0.2.17/LICENSE-APACHE +177 -0
- package/dist/licenses/pin-project-lite-0.2.17/LICENSE-MIT +23 -0
- package/dist/licenses/rand_core-0.9.5/COPYRIGHT +12 -0
- package/dist/licenses/rand_core-0.9.5/LICENSE-APACHE +187 -0
- package/dist/licenses/rand_core-0.9.5/LICENSE-MIT +26 -0
- package/dist/licenses/rand_xoshiro-0.7.0/COPYRIGHT +12 -0
- package/dist/licenses/rand_xoshiro-0.7.0/LICENSE-APACHE +176 -0
- package/dist/licenses/rand_xoshiro-0.7.0/LICENSE-MIT +25 -0
- package/dist/licenses/roxmltree-0.21.1/LICENSE-APACHE +201 -0
- package/dist/licenses/roxmltree-0.21.1/LICENSE-MIT +21 -0
- package/dist/licenses/safe_arch-0.7.4/LICENSE-APACHE.md +61 -0
- package/dist/licenses/safe_arch-0.7.4/LICENSE-MIT.md +9 -0
- package/dist/licenses/safe_arch-0.7.4/LICENSE-ZLIB.md +11 -0
- package/dist/licenses/serde-1.0.229/LICENSE-APACHE +176 -0
- package/dist/licenses/serde-1.0.229/LICENSE-MIT +23 -0
- package/dist/licenses/serde_core-1.0.229/LICENSE-APACHE +176 -0
- package/dist/licenses/serde_core-1.0.229/LICENSE-MIT +23 -0
- package/dist/licenses/serde_json-1.0.151/LICENSE-APACHE +176 -0
- package/dist/licenses/serde_json-1.0.151/LICENSE-MIT +23 -0
- package/dist/licenses/slab-0.4.12/LICENSE +25 -0
- package/dist/licenses/slotmap-1.1.1/LICENSE +19 -0
- package/dist/licenses/smallvec-1.16.3/LICENSE-APACHE +201 -0
- package/dist/licenses/smallvec-1.16.3/LICENSE-MIT +25 -0
- package/dist/licenses/taffy-0.15.0/taffy-0.15.0-LICENSE +22 -0
- package/dist/licenses/unicode-ident-1.0.26/LICENSE-APACHE +176 -0
- package/dist/licenses/unicode-ident-1.0.26/LICENSE-MIT +23 -0
- package/dist/licenses/unicode-ident-1.0.26/LICENSE-UNICODE +39 -0
- package/dist/licenses/wasm-bindgen-0.2.129/LICENSE-APACHE +201 -0
- package/dist/licenses/wasm-bindgen-0.2.129/LICENSE-MIT +25 -0
- package/dist/licenses/wasm-bindgen-shared-0.2.129/LICENSE-APACHE +201 -0
- package/dist/licenses/wasm-bindgen-shared-0.2.129/LICENSE-MIT +25 -0
- package/dist/licenses/web-time-1.1.0/LICENSE-APACHE +201 -0
- package/dist/licenses/web-time-1.1.0/LICENSE-MIT +21 -0
- package/dist/licenses/wide-0.7.33/LICENSE-ZLIB.md +11 -0
- package/dist/licenses/zmij-1.0.23/LICENSE-MIT +23 -0
- package/dist/wasm/relo_wasm.d.ts +179 -0
- package/dist/wasm/relo_wasm.js +1228 -0
- package/dist/wasm/relo_wasm_bg.wasm +0 -0
- package/dist/wasm/relo_wasm_bg.wasm.d.ts +65 -0
- package/package.json +25 -4
|
@@ -0,0 +1,1228 @@
|
|
|
1
|
+
/* @ts-self-types="./relo_wasm.d.ts" */
|
|
2
|
+
|
|
3
|
+
export class WasmHeightIndex {
|
|
4
|
+
__destroy_into_raw() {
|
|
5
|
+
const ptr = this.__wbg_ptr;
|
|
6
|
+
this.__wbg_ptr = 0;
|
|
7
|
+
WasmHeightIndexFinalization.unregister(this);
|
|
8
|
+
return ptr;
|
|
9
|
+
}
|
|
10
|
+
free() {
|
|
11
|
+
const ptr = this.__destroy_into_raw();
|
|
12
|
+
wasm.__wbg_wasmheightindex_free(ptr, 0);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @param {number} offset
|
|
16
|
+
* @returns {string}
|
|
17
|
+
*/
|
|
18
|
+
anchor(offset) {
|
|
19
|
+
let deferred1_0;
|
|
20
|
+
let deferred1_1;
|
|
21
|
+
try {
|
|
22
|
+
const ret = wasm.wasmheightindex_anchor(this.__wbg_ptr, offset);
|
|
23
|
+
deferred1_0 = ret[0];
|
|
24
|
+
deferred1_1 = ret[1];
|
|
25
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
26
|
+
} finally {
|
|
27
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
constructor() {
|
|
31
|
+
const ret = wasm.wasmheightindex_new();
|
|
32
|
+
this.__wbg_ptr = ret;
|
|
33
|
+
WasmHeightIndexFinalization.register(this, this.__wbg_ptr, this);
|
|
34
|
+
return this;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* @param {string} key
|
|
38
|
+
* @returns {number | undefined}
|
|
39
|
+
*/
|
|
40
|
+
offset(key) {
|
|
41
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
42
|
+
const len0 = WASM_VECTOR_LEN;
|
|
43
|
+
const ret = wasm.wasmheightindex_offset(this.__wbg_ptr, ptr0, len0);
|
|
44
|
+
return ret[0] === 0 ? undefined : ret[1];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* @param {string} keys
|
|
48
|
+
* @param {number} estimate
|
|
49
|
+
* @param {boolean} clear
|
|
50
|
+
*/
|
|
51
|
+
reset(keys, estimate, clear) {
|
|
52
|
+
const ptr0 = passStringToWasm0(keys, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
53
|
+
const len0 = WASM_VECTOR_LEN;
|
|
54
|
+
const ret = wasm.wasmheightindex_reset(this.__wbg_ptr, ptr0, len0, estimate, clear);
|
|
55
|
+
if (ret[1]) {
|
|
56
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* @param {string} key
|
|
61
|
+
* @param {number} height
|
|
62
|
+
* @returns {boolean}
|
|
63
|
+
*/
|
|
64
|
+
set_height(key, height) {
|
|
65
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
66
|
+
const len0 = WASM_VECTOR_LEN;
|
|
67
|
+
const ret = wasm.wasmheightindex_set_height(this.__wbg_ptr, ptr0, len0, height);
|
|
68
|
+
if (ret[2]) {
|
|
69
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
70
|
+
}
|
|
71
|
+
return ret[0] !== 0;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* @returns {number}
|
|
75
|
+
*/
|
|
76
|
+
total() {
|
|
77
|
+
const ret = wasm.wasmheightindex_total(this.__wbg_ptr);
|
|
78
|
+
return ret;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* @param {number} offset
|
|
82
|
+
* @param {number} viewport
|
|
83
|
+
* @param {number} overscan
|
|
84
|
+
* @param {number} limit
|
|
85
|
+
* @returns {string}
|
|
86
|
+
*/
|
|
87
|
+
window(offset, viewport, overscan, limit) {
|
|
88
|
+
let deferred2_0;
|
|
89
|
+
let deferred2_1;
|
|
90
|
+
try {
|
|
91
|
+
const ret = wasm.wasmheightindex_window(this.__wbg_ptr, offset, viewport, overscan, limit);
|
|
92
|
+
var ptr1 = ret[0];
|
|
93
|
+
var len1 = ret[1];
|
|
94
|
+
if (ret[3]) {
|
|
95
|
+
ptr1 = 0; len1 = 0;
|
|
96
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
97
|
+
}
|
|
98
|
+
deferred2_0 = ptr1;
|
|
99
|
+
deferred2_1 = len1;
|
|
100
|
+
return getStringFromWasm0(ptr1, len1);
|
|
101
|
+
} finally {
|
|
102
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
if (Symbol.dispose) WasmHeightIndex.prototype[Symbol.dispose] = WasmHeightIndex.prototype.free;
|
|
107
|
+
|
|
108
|
+
export class WasmMountTree {
|
|
109
|
+
__destroy_into_raw() {
|
|
110
|
+
const ptr = this.__wbg_ptr;
|
|
111
|
+
this.__wbg_ptr = 0;
|
|
112
|
+
WasmMountTreeFinalization.unregister(this);
|
|
113
|
+
return ptr;
|
|
114
|
+
}
|
|
115
|
+
free() {
|
|
116
|
+
const ptr = this.__destroy_into_raw();
|
|
117
|
+
wasm.__wbg_wasmmounttree_free(ptr, 0);
|
|
118
|
+
}
|
|
119
|
+
abort() {
|
|
120
|
+
wasm.wasmmounttree_abort(this.__wbg_ptr);
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* @param {number} token
|
|
124
|
+
* @returns {string}
|
|
125
|
+
*/
|
|
126
|
+
commit(token) {
|
|
127
|
+
let deferred2_0;
|
|
128
|
+
let deferred2_1;
|
|
129
|
+
try {
|
|
130
|
+
const ret = wasm.wasmmounttree_commit(this.__wbg_ptr, token);
|
|
131
|
+
var ptr1 = ret[0];
|
|
132
|
+
var len1 = ret[1];
|
|
133
|
+
if (ret[3]) {
|
|
134
|
+
ptr1 = 0; len1 = 0;
|
|
135
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
136
|
+
}
|
|
137
|
+
deferred2_0 = ptr1;
|
|
138
|
+
deferred2_1 = len1;
|
|
139
|
+
return getStringFromWasm0(ptr1, len1);
|
|
140
|
+
} finally {
|
|
141
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* @param {number} slot
|
|
146
|
+
* @param {number} generation
|
|
147
|
+
* @returns {boolean}
|
|
148
|
+
*/
|
|
149
|
+
contains(slot, generation) {
|
|
150
|
+
const ret = wasm.wasmmounttree_contains(this.__wbg_ptr, slot, generation);
|
|
151
|
+
return ret !== 0;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* @param {number} generation
|
|
155
|
+
*/
|
|
156
|
+
constructor(generation) {
|
|
157
|
+
const ret = wasm.wasmmounttree_new(generation);
|
|
158
|
+
this.__wbg_ptr = ret;
|
|
159
|
+
WasmMountTreeFinalization.register(this, this.__wbg_ptr, this);
|
|
160
|
+
return this;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
if (Symbol.dispose) WasmMountTree.prototype[Symbol.dispose] = WasmMountTree.prototype.free;
|
|
164
|
+
|
|
165
|
+
export class WasmPresentation {
|
|
166
|
+
__destroy_into_raw() {
|
|
167
|
+
const ptr = this.__wbg_ptr;
|
|
168
|
+
this.__wbg_ptr = 0;
|
|
169
|
+
WasmPresentationFinalization.unregister(this);
|
|
170
|
+
return ptr;
|
|
171
|
+
}
|
|
172
|
+
free() {
|
|
173
|
+
const ptr = this.__destroy_into_raw();
|
|
174
|
+
wasm.__wbg_wasmpresentation_free(ptr, 0);
|
|
175
|
+
}
|
|
176
|
+
abort() {
|
|
177
|
+
wasm.wasmpresentation_abort(this.__wbg_ptr);
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* @param {number} token
|
|
181
|
+
* @returns {string}
|
|
182
|
+
*/
|
|
183
|
+
commit(token) {
|
|
184
|
+
let deferred2_0;
|
|
185
|
+
let deferred2_1;
|
|
186
|
+
try {
|
|
187
|
+
const ret = wasm.wasmpresentation_commit(this.__wbg_ptr, token);
|
|
188
|
+
var ptr1 = ret[0];
|
|
189
|
+
var len1 = ret[1];
|
|
190
|
+
if (ret[3]) {
|
|
191
|
+
ptr1 = 0; len1 = 0;
|
|
192
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
193
|
+
}
|
|
194
|
+
deferred2_0 = ptr1;
|
|
195
|
+
deferred2_1 = len1;
|
|
196
|
+
return getStringFromWasm0(ptr1, len1);
|
|
197
|
+
} finally {
|
|
198
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* @param {number} width
|
|
203
|
+
* @param {number | null | undefined} height
|
|
204
|
+
* @param {Function} measure
|
|
205
|
+
* @returns {string}
|
|
206
|
+
*/
|
|
207
|
+
compute(width, height, measure) {
|
|
208
|
+
let deferred2_0;
|
|
209
|
+
let deferred2_1;
|
|
210
|
+
try {
|
|
211
|
+
const ret = wasm.wasmpresentation_compute(this.__wbg_ptr, width, isLikeNone(height) ? Number.MAX_SAFE_INTEGER : Math.fround(height), measure);
|
|
212
|
+
var ptr1 = ret[0];
|
|
213
|
+
var len1 = ret[1];
|
|
214
|
+
if (ret[3]) {
|
|
215
|
+
ptr1 = 0; len1 = 0;
|
|
216
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
217
|
+
}
|
|
218
|
+
deferred2_0 = ptr1;
|
|
219
|
+
deferred2_1 = len1;
|
|
220
|
+
return getStringFromWasm0(ptr1, len1);
|
|
221
|
+
} finally {
|
|
222
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* @param {number} width
|
|
227
|
+
* @param {number | null | undefined} height
|
|
228
|
+
* @param {Function} measure
|
|
229
|
+
* @returns {string}
|
|
230
|
+
*/
|
|
231
|
+
compute_targets(width, height, measure) {
|
|
232
|
+
let deferred2_0;
|
|
233
|
+
let deferred2_1;
|
|
234
|
+
try {
|
|
235
|
+
const ret = wasm.wasmpresentation_compute_targets(this.__wbg_ptr, width, isLikeNone(height) ? Number.MAX_SAFE_INTEGER : Math.fround(height), measure);
|
|
236
|
+
var ptr1 = ret[0];
|
|
237
|
+
var len1 = ret[1];
|
|
238
|
+
if (ret[3]) {
|
|
239
|
+
ptr1 = 0; len1 = 0;
|
|
240
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
241
|
+
}
|
|
242
|
+
deferred2_0 = ptr1;
|
|
243
|
+
deferred2_1 = len1;
|
|
244
|
+
return getStringFromWasm0(ptr1, len1);
|
|
245
|
+
} finally {
|
|
246
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
invalidate_all_intrinsics() {
|
|
250
|
+
const ret = wasm.wasmpresentation_invalidate_all_intrinsics(this.__wbg_ptr);
|
|
251
|
+
if (ret[1]) {
|
|
252
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* @param {number} attachment_generation
|
|
257
|
+
*/
|
|
258
|
+
constructor(attachment_generation) {
|
|
259
|
+
const ret = wasm.wasmpresentation_new(attachment_generation);
|
|
260
|
+
this.__wbg_ptr = ret;
|
|
261
|
+
WasmPresentationFinalization.register(this, this.__wbg_ptr, this);
|
|
262
|
+
return this;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* @param {string} description
|
|
266
|
+
* @param {boolean} replace
|
|
267
|
+
* @returns {string}
|
|
268
|
+
*/
|
|
269
|
+
prepare(description, replace) {
|
|
270
|
+
let deferred3_0;
|
|
271
|
+
let deferred3_1;
|
|
272
|
+
try {
|
|
273
|
+
const ptr0 = passStringToWasm0(description, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
274
|
+
const len0 = WASM_VECTOR_LEN;
|
|
275
|
+
const ret = wasm.wasmpresentation_prepare(this.__wbg_ptr, ptr0, len0, replace);
|
|
276
|
+
var ptr2 = ret[0];
|
|
277
|
+
var len2 = ret[1];
|
|
278
|
+
if (ret[3]) {
|
|
279
|
+
ptr2 = 0; len2 = 0;
|
|
280
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
281
|
+
}
|
|
282
|
+
deferred3_0 = ptr2;
|
|
283
|
+
deferred3_1 = len2;
|
|
284
|
+
return getStringFromWasm0(ptr2, len2);
|
|
285
|
+
} finally {
|
|
286
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
require_full_frames() {
|
|
290
|
+
wasm.wasmpresentation_require_full_frames(this.__wbg_ptr);
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* @param {string} overrides
|
|
294
|
+
*/
|
|
295
|
+
set_layout_overrides(overrides) {
|
|
296
|
+
const ptr0 = passStringToWasm0(overrides, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
297
|
+
const len0 = WASM_VECTOR_LEN;
|
|
298
|
+
const ret = wasm.wasmpresentation_set_layout_overrides(this.__wbg_ptr, ptr0, len0);
|
|
299
|
+
if (ret[1]) {
|
|
300
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
if (Symbol.dispose) WasmPresentation.prototype[Symbol.dispose] = WasmPresentation.prototype.free;
|
|
305
|
+
|
|
306
|
+
export class WasmSession {
|
|
307
|
+
__destroy_into_raw() {
|
|
308
|
+
const ptr = this.__wbg_ptr;
|
|
309
|
+
this.__wbg_ptr = 0;
|
|
310
|
+
WasmSessionFinalization.unregister(this);
|
|
311
|
+
return ptr;
|
|
312
|
+
}
|
|
313
|
+
free() {
|
|
314
|
+
const ptr = this.__destroy_into_raw();
|
|
315
|
+
wasm.__wbg_wasmsession_free(ptr, 0);
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* @returns {string}
|
|
319
|
+
*/
|
|
320
|
+
abort() {
|
|
321
|
+
let deferred1_0;
|
|
322
|
+
let deferred1_1;
|
|
323
|
+
try {
|
|
324
|
+
const ret = wasm.wasmsession_abort(this.__wbg_ptr);
|
|
325
|
+
deferred1_0 = ret[0];
|
|
326
|
+
deferred1_1 = ret[1];
|
|
327
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
328
|
+
} finally {
|
|
329
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* @param {string} owner
|
|
334
|
+
* @param {boolean} enabled
|
|
335
|
+
*/
|
|
336
|
+
attach(owner, enabled) {
|
|
337
|
+
const ptr0 = passStringToWasm0(owner, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
338
|
+
const len0 = WASM_VECTOR_LEN;
|
|
339
|
+
const ret = wasm.wasmsession_attach(this.__wbg_ptr, ptr0, len0, enabled);
|
|
340
|
+
if (ret[1]) {
|
|
341
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* @param {string} id
|
|
346
|
+
* @returns {string}
|
|
347
|
+
*/
|
|
348
|
+
commit(id) {
|
|
349
|
+
let deferred3_0;
|
|
350
|
+
let deferred3_1;
|
|
351
|
+
try {
|
|
352
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
353
|
+
const len0 = WASM_VECTOR_LEN;
|
|
354
|
+
const ret = wasm.wasmsession_commit(this.__wbg_ptr, ptr0, len0);
|
|
355
|
+
var ptr2 = ret[0];
|
|
356
|
+
var len2 = ret[1];
|
|
357
|
+
if (ret[3]) {
|
|
358
|
+
ptr2 = 0; len2 = 0;
|
|
359
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
360
|
+
}
|
|
361
|
+
deferred3_0 = ptr2;
|
|
362
|
+
deferred3_1 = len2;
|
|
363
|
+
return getStringFromWasm0(ptr2, len2);
|
|
364
|
+
} finally {
|
|
365
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* @param {string} id
|
|
370
|
+
* @param {string} completion
|
|
371
|
+
* @returns {string}
|
|
372
|
+
*/
|
|
373
|
+
complete(id, completion) {
|
|
374
|
+
let deferred4_0;
|
|
375
|
+
let deferred4_1;
|
|
376
|
+
try {
|
|
377
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
378
|
+
const len0 = WASM_VECTOR_LEN;
|
|
379
|
+
const ptr1 = passStringToWasm0(completion, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
380
|
+
const len1 = WASM_VECTOR_LEN;
|
|
381
|
+
const ret = wasm.wasmsession_complete(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
382
|
+
var ptr3 = ret[0];
|
|
383
|
+
var len3 = ret[1];
|
|
384
|
+
if (ret[3]) {
|
|
385
|
+
ptr3 = 0; len3 = 0;
|
|
386
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
387
|
+
}
|
|
388
|
+
deferred4_0 = ptr3;
|
|
389
|
+
deferred4_1 = len3;
|
|
390
|
+
return getStringFromWasm0(ptr3, len3);
|
|
391
|
+
} finally {
|
|
392
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* @param {string} owner
|
|
397
|
+
*/
|
|
398
|
+
detach(owner) {
|
|
399
|
+
const ptr0 = passStringToWasm0(owner, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
400
|
+
const len0 = WASM_VECTOR_LEN;
|
|
401
|
+
wasm.wasmsession_detach(this.__wbg_ptr, ptr0, len0);
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* @param {string} id
|
|
405
|
+
* @param {string} event
|
|
406
|
+
* @param {string} payload
|
|
407
|
+
* @returns {string}
|
|
408
|
+
*/
|
|
409
|
+
dispatch(id, event, payload) {
|
|
410
|
+
let deferred5_0;
|
|
411
|
+
let deferred5_1;
|
|
412
|
+
try {
|
|
413
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
414
|
+
const len0 = WASM_VECTOR_LEN;
|
|
415
|
+
const ptr1 = passStringToWasm0(event, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
416
|
+
const len1 = WASM_VECTOR_LEN;
|
|
417
|
+
const ptr2 = passStringToWasm0(payload, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
418
|
+
const len2 = WASM_VECTOR_LEN;
|
|
419
|
+
const ret = wasm.wasmsession_dispatch(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
420
|
+
var ptr4 = ret[0];
|
|
421
|
+
var len4 = ret[1];
|
|
422
|
+
if (ret[3]) {
|
|
423
|
+
ptr4 = 0; len4 = 0;
|
|
424
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
425
|
+
}
|
|
426
|
+
deferred5_0 = ptr4;
|
|
427
|
+
deferred5_1 = len4;
|
|
428
|
+
return getStringFromWasm0(ptr4, len4);
|
|
429
|
+
} finally {
|
|
430
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* @param {string} document
|
|
435
|
+
* @param {string} registrations
|
|
436
|
+
* @param {string} host
|
|
437
|
+
*/
|
|
438
|
+
constructor(document, registrations, host) {
|
|
439
|
+
const ptr0 = passStringToWasm0(document, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
440
|
+
const len0 = WASM_VECTOR_LEN;
|
|
441
|
+
const ptr1 = passStringToWasm0(registrations, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
442
|
+
const len1 = WASM_VECTOR_LEN;
|
|
443
|
+
const ptr2 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
444
|
+
const len2 = WASM_VECTOR_LEN;
|
|
445
|
+
const ret = wasm.wasmsession_new(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
446
|
+
if (ret[2]) {
|
|
447
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
448
|
+
}
|
|
449
|
+
this.__wbg_ptr = ret[0];
|
|
450
|
+
WasmSessionFinalization.register(this, this.__wbg_ptr, this);
|
|
451
|
+
return this;
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* Internal diagnostics for the accepted preparation, outside the public graph.
|
|
455
|
+
* @returns {string}
|
|
456
|
+
*/
|
|
457
|
+
preparation_work() {
|
|
458
|
+
let deferred1_0;
|
|
459
|
+
let deferred1_1;
|
|
460
|
+
try {
|
|
461
|
+
const ret = wasm.wasmsession_preparation_work(this.__wbg_ptr);
|
|
462
|
+
deferred1_0 = ret[0];
|
|
463
|
+
deferred1_1 = ret[1];
|
|
464
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
465
|
+
} finally {
|
|
466
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* @param {WasmMountTree} tree
|
|
471
|
+
* @param {string} root_id
|
|
472
|
+
* @param {boolean} replace
|
|
473
|
+
* @returns {number}
|
|
474
|
+
*/
|
|
475
|
+
prepare_mount(tree, root_id, replace) {
|
|
476
|
+
_assertClass(tree, WasmMountTree);
|
|
477
|
+
const ptr0 = passStringToWasm0(root_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
478
|
+
const len0 = WASM_VECTOR_LEN;
|
|
479
|
+
const ret = wasm.wasmsession_prepare_mount(this.__wbg_ptr, tree.__wbg_ptr, ptr0, len0, replace);
|
|
480
|
+
if (ret[2]) {
|
|
481
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
482
|
+
}
|
|
483
|
+
return ret[0] >>> 0;
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* @param {string} document
|
|
487
|
+
* @returns {string}
|
|
488
|
+
*/
|
|
489
|
+
prepare_replace(document) {
|
|
490
|
+
let deferred3_0;
|
|
491
|
+
let deferred3_1;
|
|
492
|
+
try {
|
|
493
|
+
const ptr0 = passStringToWasm0(document, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
494
|
+
const len0 = WASM_VECTOR_LEN;
|
|
495
|
+
const ret = wasm.wasmsession_prepare_replace(this.__wbg_ptr, ptr0, len0);
|
|
496
|
+
var ptr2 = ret[0];
|
|
497
|
+
var len2 = ret[1];
|
|
498
|
+
if (ret[3]) {
|
|
499
|
+
ptr2 = 0; len2 = 0;
|
|
500
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
501
|
+
}
|
|
502
|
+
deferred3_0 = ptr2;
|
|
503
|
+
deferred3_1 = len2;
|
|
504
|
+
return getStringFromWasm0(ptr2, len2);
|
|
505
|
+
} finally {
|
|
506
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* @param {string} data
|
|
511
|
+
* @returns {string}
|
|
512
|
+
*/
|
|
513
|
+
prepare_update(data) {
|
|
514
|
+
let deferred3_0;
|
|
515
|
+
let deferred3_1;
|
|
516
|
+
try {
|
|
517
|
+
const ptr0 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
518
|
+
const len0 = WASM_VECTOR_LEN;
|
|
519
|
+
const ret = wasm.wasmsession_prepare_update(this.__wbg_ptr, ptr0, len0);
|
|
520
|
+
var ptr2 = ret[0];
|
|
521
|
+
var len2 = ret[1];
|
|
522
|
+
if (ret[3]) {
|
|
523
|
+
ptr2 = 0; len2 = 0;
|
|
524
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
525
|
+
}
|
|
526
|
+
deferred3_0 = ptr2;
|
|
527
|
+
deferred3_1 = len2;
|
|
528
|
+
return getStringFromWasm0(ptr2, len2);
|
|
529
|
+
} finally {
|
|
530
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* @param {boolean} enabled
|
|
535
|
+
*/
|
|
536
|
+
set_enabled(enabled) {
|
|
537
|
+
wasm.wasmsession_set_enabled(this.__wbg_ptr, enabled);
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
540
|
+
* @returns {string}
|
|
541
|
+
*/
|
|
542
|
+
shutdown() {
|
|
543
|
+
let deferred1_0;
|
|
544
|
+
let deferred1_1;
|
|
545
|
+
try {
|
|
546
|
+
const ret = wasm.wasmsession_shutdown(this.__wbg_ptr);
|
|
547
|
+
deferred1_0 = ret[0];
|
|
548
|
+
deferred1_1 = ret[1];
|
|
549
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
550
|
+
} finally {
|
|
551
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* @returns {string}
|
|
556
|
+
*/
|
|
557
|
+
snapshot() {
|
|
558
|
+
let deferred1_0;
|
|
559
|
+
let deferred1_1;
|
|
560
|
+
try {
|
|
561
|
+
const ret = wasm.wasmsession_snapshot(this.__wbg_ptr);
|
|
562
|
+
deferred1_0 = ret[0];
|
|
563
|
+
deferred1_1 = ret[1];
|
|
564
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
565
|
+
} finally {
|
|
566
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
/**
|
|
570
|
+
* @param {string} id
|
|
571
|
+
* @returns {string}
|
|
572
|
+
*/
|
|
573
|
+
timeout(id) {
|
|
574
|
+
let deferred3_0;
|
|
575
|
+
let deferred3_1;
|
|
576
|
+
try {
|
|
577
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
578
|
+
const len0 = WASM_VECTOR_LEN;
|
|
579
|
+
const ret = wasm.wasmsession_timeout(this.__wbg_ptr, ptr0, len0);
|
|
580
|
+
var ptr2 = ret[0];
|
|
581
|
+
var len2 = ret[1];
|
|
582
|
+
if (ret[3]) {
|
|
583
|
+
ptr2 = 0; len2 = 0;
|
|
584
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
585
|
+
}
|
|
586
|
+
deferred3_0 = ptr2;
|
|
587
|
+
deferred3_1 = len2;
|
|
588
|
+
return getStringFromWasm0(ptr2, len2);
|
|
589
|
+
} finally {
|
|
590
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
/**
|
|
594
|
+
* @param {string} host
|
|
595
|
+
* @returns {string}
|
|
596
|
+
*/
|
|
597
|
+
update_host(host) {
|
|
598
|
+
let deferred3_0;
|
|
599
|
+
let deferred3_1;
|
|
600
|
+
try {
|
|
601
|
+
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
602
|
+
const len0 = WASM_VECTOR_LEN;
|
|
603
|
+
const ret = wasm.wasmsession_update_host(this.__wbg_ptr, ptr0, len0);
|
|
604
|
+
var ptr2 = ret[0];
|
|
605
|
+
var len2 = ret[1];
|
|
606
|
+
if (ret[3]) {
|
|
607
|
+
ptr2 = 0; len2 = 0;
|
|
608
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
609
|
+
}
|
|
610
|
+
deferred3_0 = ptr2;
|
|
611
|
+
deferred3_1 = len2;
|
|
612
|
+
return getStringFromWasm0(ptr2, len2);
|
|
613
|
+
} finally {
|
|
614
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
if (Symbol.dispose) WasmSession.prototype[Symbol.dispose] = WasmSession.prototype.free;
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* @returns {string}
|
|
622
|
+
*/
|
|
623
|
+
export function builtin_contracts() {
|
|
624
|
+
let deferred1_0;
|
|
625
|
+
let deferred1_1;
|
|
626
|
+
try {
|
|
627
|
+
const ret = wasm.builtin_contracts();
|
|
628
|
+
deferred1_0 = ret[0];
|
|
629
|
+
deferred1_1 = ret[1];
|
|
630
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
631
|
+
} finally {
|
|
632
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* @param {string} input
|
|
638
|
+
* @returns {string}
|
|
639
|
+
*/
|
|
640
|
+
export function compile_document(input) {
|
|
641
|
+
let deferred3_0;
|
|
642
|
+
let deferred3_1;
|
|
643
|
+
try {
|
|
644
|
+
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
645
|
+
const len0 = WASM_VECTOR_LEN;
|
|
646
|
+
const ret = wasm.compile_document(ptr0, len0);
|
|
647
|
+
var ptr2 = ret[0];
|
|
648
|
+
var len2 = ret[1];
|
|
649
|
+
if (ret[3]) {
|
|
650
|
+
ptr2 = 0; len2 = 0;
|
|
651
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
652
|
+
}
|
|
653
|
+
deferred3_0 = ptr2;
|
|
654
|
+
deferred3_1 = len2;
|
|
655
|
+
return getStringFromWasm0(ptr2, len2);
|
|
656
|
+
} finally {
|
|
657
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
* @param {string} source
|
|
663
|
+
* @param {string} values
|
|
664
|
+
* @returns {string}
|
|
665
|
+
*/
|
|
666
|
+
export function evaluate_expression(source, values) {
|
|
667
|
+
let deferred4_0;
|
|
668
|
+
let deferred4_1;
|
|
669
|
+
try {
|
|
670
|
+
const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
671
|
+
const len0 = WASM_VECTOR_LEN;
|
|
672
|
+
const ptr1 = passStringToWasm0(values, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
673
|
+
const len1 = WASM_VECTOR_LEN;
|
|
674
|
+
const ret = wasm.evaluate_expression(ptr0, len0, ptr1, len1);
|
|
675
|
+
var ptr3 = ret[0];
|
|
676
|
+
var len3 = ret[1];
|
|
677
|
+
if (ret[3]) {
|
|
678
|
+
ptr3 = 0; len3 = 0;
|
|
679
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
680
|
+
}
|
|
681
|
+
deferred4_0 = ptr3;
|
|
682
|
+
deferred4_1 = len3;
|
|
683
|
+
return getStringFromWasm0(ptr3, len3);
|
|
684
|
+
} finally {
|
|
685
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
/**
|
|
690
|
+
* @param {string} theme
|
|
691
|
+
* @param {string} classes
|
|
692
|
+
* @param {boolean} control
|
|
693
|
+
* @returns {string}
|
|
694
|
+
*/
|
|
695
|
+
export function expand_theme(theme, classes, control) {
|
|
696
|
+
let deferred4_0;
|
|
697
|
+
let deferred4_1;
|
|
698
|
+
try {
|
|
699
|
+
const ptr0 = passStringToWasm0(theme, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
700
|
+
const len0 = WASM_VECTOR_LEN;
|
|
701
|
+
const ptr1 = passStringToWasm0(classes, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
702
|
+
const len1 = WASM_VECTOR_LEN;
|
|
703
|
+
const ret = wasm.expand_theme(ptr0, len0, ptr1, len1, control);
|
|
704
|
+
var ptr3 = ret[0];
|
|
705
|
+
var len3 = ret[1];
|
|
706
|
+
if (ret[3]) {
|
|
707
|
+
ptr3 = 0; len3 = 0;
|
|
708
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
709
|
+
}
|
|
710
|
+
deferred4_0 = ptr3;
|
|
711
|
+
deferred4_1 = len3;
|
|
712
|
+
return getStringFromWasm0(ptr3, len3);
|
|
713
|
+
} finally {
|
|
714
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* @param {string} classes
|
|
720
|
+
* @returns {string}
|
|
721
|
+
*/
|
|
722
|
+
export function layout_style(classes) {
|
|
723
|
+
let deferred2_0;
|
|
724
|
+
let deferred2_1;
|
|
725
|
+
try {
|
|
726
|
+
const ptr0 = passStringToWasm0(classes, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
727
|
+
const len0 = WASM_VECTOR_LEN;
|
|
728
|
+
const ret = wasm.layout_style(ptr0, len0);
|
|
729
|
+
deferred2_0 = ret[0];
|
|
730
|
+
deferred2_1 = ret[1];
|
|
731
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
732
|
+
} finally {
|
|
733
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* @param {string} classes
|
|
739
|
+
* @param {number} states
|
|
740
|
+
* @param {boolean} reduced
|
|
741
|
+
* @returns {string}
|
|
742
|
+
*/
|
|
743
|
+
export function motion_compile(classes, states, reduced) {
|
|
744
|
+
let deferred3_0;
|
|
745
|
+
let deferred3_1;
|
|
746
|
+
try {
|
|
747
|
+
const ptr0 = passStringToWasm0(classes, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
748
|
+
const len0 = WASM_VECTOR_LEN;
|
|
749
|
+
const ret = wasm.motion_compile(ptr0, len0, states, reduced);
|
|
750
|
+
var ptr2 = ret[0];
|
|
751
|
+
var len2 = ret[1];
|
|
752
|
+
if (ret[3]) {
|
|
753
|
+
ptr2 = 0; len2 = 0;
|
|
754
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
755
|
+
}
|
|
756
|
+
deferred3_0 = ptr2;
|
|
757
|
+
deferred3_1 = len2;
|
|
758
|
+
return getStringFromWasm0(ptr2, len2);
|
|
759
|
+
} finally {
|
|
760
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* @param {Float64Array} rgba
|
|
766
|
+
* @returns {Float64Array}
|
|
767
|
+
*/
|
|
768
|
+
export function motion_display_color(rgba) {
|
|
769
|
+
const ptr0 = passArrayF64ToWasm0(rgba, wasm.__wbindgen_malloc);
|
|
770
|
+
const len0 = WASM_VECTOR_LEN;
|
|
771
|
+
const ret = wasm.motion_display_color(ptr0, len0);
|
|
772
|
+
if (ret[3]) {
|
|
773
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
774
|
+
}
|
|
775
|
+
var v2 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
776
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
777
|
+
return v2;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* @param {Float64Array} rgba
|
|
782
|
+
* @returns {Float64Array}
|
|
783
|
+
*/
|
|
784
|
+
export function motion_linear_color(rgba) {
|
|
785
|
+
const ptr0 = passArrayF64ToWasm0(rgba, wasm.__wbindgen_malloc);
|
|
786
|
+
const len0 = WASM_VECTOR_LEN;
|
|
787
|
+
const ret = wasm.motion_linear_color(ptr0, len0);
|
|
788
|
+
if (ret[3]) {
|
|
789
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
790
|
+
}
|
|
791
|
+
var v2 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
792
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
793
|
+
return v2;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* @param {Float64Array} row
|
|
798
|
+
* @param {number} delta
|
|
799
|
+
* @param {number} now
|
|
800
|
+
* @param {boolean} animated
|
|
801
|
+
*/
|
|
802
|
+
export function motion_rebase(row, delta, now, animated) {
|
|
803
|
+
var ptr0 = passArrayF64ToWasm0(row, wasm.__wbindgen_malloc);
|
|
804
|
+
var len0 = WASM_VECTOR_LEN;
|
|
805
|
+
const ret = wasm.motion_rebase(ptr0, len0, row, delta, now, animated);
|
|
806
|
+
if (ret[1]) {
|
|
807
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* @param {Float64Array} row
|
|
813
|
+
* @param {number} target
|
|
814
|
+
* @param {number} now
|
|
815
|
+
* @param {boolean} animated
|
|
816
|
+
*/
|
|
817
|
+
export function motion_retarget(row, target, now, animated) {
|
|
818
|
+
var ptr0 = passArrayF64ToWasm0(row, wasm.__wbindgen_malloc);
|
|
819
|
+
var len0 = WASM_VECTOR_LEN;
|
|
820
|
+
const ret = wasm.motion_retarget(ptr0, len0, row, target, now, animated);
|
|
821
|
+
if (ret[1]) {
|
|
822
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* @param {Float64Array} rows
|
|
828
|
+
* @param {number} now
|
|
829
|
+
* @returns {number}
|
|
830
|
+
*/
|
|
831
|
+
export function motion_sample(rows, now) {
|
|
832
|
+
var ptr0 = passArrayF64ToWasm0(rows, wasm.__wbindgen_malloc);
|
|
833
|
+
var len0 = WASM_VECTOR_LEN;
|
|
834
|
+
const ret = wasm.motion_sample(ptr0, len0, rows, now);
|
|
835
|
+
if (ret[2]) {
|
|
836
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
837
|
+
}
|
|
838
|
+
return ret[0] >>> 0;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
/**
|
|
842
|
+
* @param {number} state
|
|
843
|
+
* @param {number} features
|
|
844
|
+
* @param {number} mask
|
|
845
|
+
* @returns {Uint32Array}
|
|
846
|
+
*/
|
|
847
|
+
export function motion_transition(state, features, mask) {
|
|
848
|
+
const ret = wasm.motion_transition(state, features, mask);
|
|
849
|
+
var v1 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
|
|
850
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
851
|
+
return v1;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
/**
|
|
855
|
+
* @param {string} input
|
|
856
|
+
* @returns {string}
|
|
857
|
+
*/
|
|
858
|
+
export function requirements(input) {
|
|
859
|
+
let deferred3_0;
|
|
860
|
+
let deferred3_1;
|
|
861
|
+
try {
|
|
862
|
+
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
863
|
+
const len0 = WASM_VECTOR_LEN;
|
|
864
|
+
const ret = wasm.requirements(ptr0, len0);
|
|
865
|
+
var ptr2 = ret[0];
|
|
866
|
+
var len2 = ret[1];
|
|
867
|
+
if (ret[3]) {
|
|
868
|
+
ptr2 = 0; len2 = 0;
|
|
869
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
870
|
+
}
|
|
871
|
+
deferred3_0 = ptr2;
|
|
872
|
+
deferred3_1 = len2;
|
|
873
|
+
return getStringFromWasm0(ptr2, len2);
|
|
874
|
+
} finally {
|
|
875
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
/**
|
|
880
|
+
* @param {string} name
|
|
881
|
+
* @param {string} kind
|
|
882
|
+
* @returns {boolean}
|
|
883
|
+
*/
|
|
884
|
+
export function valid_registration(name, kind) {
|
|
885
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
886
|
+
const len0 = WASM_VECTOR_LEN;
|
|
887
|
+
const ptr1 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
888
|
+
const len1 = WASM_VECTOR_LEN;
|
|
889
|
+
const ret = wasm.valid_registration(ptr0, len0, ptr1, len1);
|
|
890
|
+
return ret !== 0;
|
|
891
|
+
}
|
|
892
|
+
function __wbg_get_imports() {
|
|
893
|
+
const import0 = {
|
|
894
|
+
__proto__: null,
|
|
895
|
+
__wbg___wbindgen_copy_to_typed_array_88899a52af046901: function(arg0, arg1, arg2) {
|
|
896
|
+
new Uint8Array(arg2.buffer, arg2.byteOffset, arg2.byteLength).set(getArrayU8FromWasm0(arg0, arg1));
|
|
897
|
+
},
|
|
898
|
+
__wbg___wbindgen_is_undefined_8865fb403f8fe9d8: function(arg0) {
|
|
899
|
+
const ret = arg0 === undefined;
|
|
900
|
+
return ret;
|
|
901
|
+
},
|
|
902
|
+
__wbg___wbindgen_string_get_0380ccaa2f57f0d9: function(arg0, arg1) {
|
|
903
|
+
const obj = arg1;
|
|
904
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
905
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
906
|
+
var len1 = WASM_VECTOR_LEN;
|
|
907
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
908
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
909
|
+
},
|
|
910
|
+
__wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
|
|
911
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
912
|
+
},
|
|
913
|
+
__wbg_call_187d372bd5fdd4aa: function() { return handleError(function (arg0, arg1, arg2) {
|
|
914
|
+
const ret = arg0.call(arg1, arg2);
|
|
915
|
+
return ret;
|
|
916
|
+
}, arguments); },
|
|
917
|
+
__wbg_now_e7c6795a7f81e10f: function(arg0) {
|
|
918
|
+
const ret = arg0.now();
|
|
919
|
+
return ret;
|
|
920
|
+
},
|
|
921
|
+
__wbg_performance_3fcf6e32a7e1ed0a: function(arg0) {
|
|
922
|
+
const ret = arg0.performance;
|
|
923
|
+
return ret;
|
|
924
|
+
},
|
|
925
|
+
__wbg_static_accessor_GLOBAL_266715b9d96ba635: function() {
|
|
926
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
927
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
928
|
+
},
|
|
929
|
+
__wbg_static_accessor_GLOBAL_THIS_10fb7dc1ae063179: function() {
|
|
930
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
931
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
932
|
+
},
|
|
933
|
+
__wbg_static_accessor_SELF_0b583911f537483a: function() {
|
|
934
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
935
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
936
|
+
},
|
|
937
|
+
__wbg_static_accessor_WINDOW_d7f903d1508cbdc4: function() {
|
|
938
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
939
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
940
|
+
},
|
|
941
|
+
__wbindgen_generic_0000000000000001: function(arg0, arg1) {
|
|
942
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
943
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
944
|
+
return ret;
|
|
945
|
+
},
|
|
946
|
+
__wbindgen_init_externref_table: function() {
|
|
947
|
+
const table = wasm.__wbindgen_externrefs;
|
|
948
|
+
const offset = table.grow(4);
|
|
949
|
+
table.set(0, undefined);
|
|
950
|
+
table.set(offset + 0, undefined);
|
|
951
|
+
table.set(offset + 1, null);
|
|
952
|
+
table.set(offset + 2, true);
|
|
953
|
+
table.set(offset + 3, false);
|
|
954
|
+
},
|
|
955
|
+
};
|
|
956
|
+
return {
|
|
957
|
+
__proto__: null,
|
|
958
|
+
"./relo_wasm_bg.js": import0,
|
|
959
|
+
};
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
const WasmHeightIndexFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
963
|
+
? { register: () => {}, unregister: () => {} }
|
|
964
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmheightindex_free(ptr, 1));
|
|
965
|
+
const WasmMountTreeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
966
|
+
? { register: () => {}, unregister: () => {} }
|
|
967
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmmounttree_free(ptr, 1));
|
|
968
|
+
const WasmPresentationFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
969
|
+
? { register: () => {}, unregister: () => {} }
|
|
970
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmpresentation_free(ptr, 1));
|
|
971
|
+
const WasmSessionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
972
|
+
? { register: () => {}, unregister: () => {} }
|
|
973
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmsession_free(ptr, 1));
|
|
974
|
+
|
|
975
|
+
function addToExternrefTable0(obj) {
|
|
976
|
+
const idx = wasm.__externref_table_alloc();
|
|
977
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
978
|
+
return idx;
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
function _assertClass(instance, klass) {
|
|
982
|
+
if (!(instance instanceof klass)) {
|
|
983
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
function getArrayF64FromWasm0(ptr, len) {
|
|
988
|
+
ptr = ptr >>> 0;
|
|
989
|
+
return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
function getArrayU32FromWasm0(ptr, len) {
|
|
993
|
+
ptr = ptr >>> 0;
|
|
994
|
+
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
998
|
+
ptr = ptr >>> 0;
|
|
999
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
let cachedDataViewMemory0 = null;
|
|
1003
|
+
function getDataViewMemory0() {
|
|
1004
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
1005
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
1006
|
+
}
|
|
1007
|
+
return cachedDataViewMemory0;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
let cachedFloat64ArrayMemory0 = null;
|
|
1011
|
+
function getFloat64ArrayMemory0() {
|
|
1012
|
+
if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
|
|
1013
|
+
cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
|
|
1014
|
+
}
|
|
1015
|
+
return cachedFloat64ArrayMemory0;
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
function getStringFromWasm0(ptr, len) {
|
|
1019
|
+
return decodeText(ptr >>> 0, len);
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
let cachedUint32ArrayMemory0 = null;
|
|
1023
|
+
function getUint32ArrayMemory0() {
|
|
1024
|
+
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
1025
|
+
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
1026
|
+
}
|
|
1027
|
+
return cachedUint32ArrayMemory0;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
let cachedUint8ArrayMemory0 = null;
|
|
1031
|
+
function getUint8ArrayMemory0() {
|
|
1032
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
1033
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
1034
|
+
}
|
|
1035
|
+
return cachedUint8ArrayMemory0;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
function handleError(f, args) {
|
|
1039
|
+
try {
|
|
1040
|
+
return f.apply(this, args);
|
|
1041
|
+
} catch (e) {
|
|
1042
|
+
const idx = addToExternrefTable0(e);
|
|
1043
|
+
wasm.__wbindgen_exn_store(idx);
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
function isLikeNone(x) {
|
|
1048
|
+
return x === undefined || x === null;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
function passArrayF64ToWasm0(arg, malloc) {
|
|
1052
|
+
const ptr = malloc(arg.length * 8, 8) >>> 0;
|
|
1053
|
+
getFloat64ArrayMemory0().set(arg, ptr / 8);
|
|
1054
|
+
WASM_VECTOR_LEN = arg.length;
|
|
1055
|
+
return ptr;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
1059
|
+
if (realloc === undefined) {
|
|
1060
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
1061
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
1062
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
1063
|
+
WASM_VECTOR_LEN = buf.length;
|
|
1064
|
+
return ptr;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
let len = arg.length;
|
|
1068
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
1069
|
+
|
|
1070
|
+
const mem = getUint8ArrayMemory0();
|
|
1071
|
+
|
|
1072
|
+
let offset = 0;
|
|
1073
|
+
|
|
1074
|
+
for (; offset < len; offset++) {
|
|
1075
|
+
const code = arg.charCodeAt(offset);
|
|
1076
|
+
if (code > 0x7F) break;
|
|
1077
|
+
mem[ptr + offset] = code;
|
|
1078
|
+
}
|
|
1079
|
+
if (offset !== len) {
|
|
1080
|
+
if (offset !== 0) {
|
|
1081
|
+
arg = arg.slice(offset);
|
|
1082
|
+
}
|
|
1083
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
1084
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
1085
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
1086
|
+
|
|
1087
|
+
offset += ret.written;
|
|
1088
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
WASM_VECTOR_LEN = offset;
|
|
1092
|
+
return ptr;
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
function takeFromExternrefTable0(idx) {
|
|
1096
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
1097
|
+
wasm.__externref_table_dealloc(idx);
|
|
1098
|
+
return value;
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1102
|
+
cachedTextDecoder.decode();
|
|
1103
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
1104
|
+
let numBytesDecoded = 0;
|
|
1105
|
+
function decodeText(ptr, len) {
|
|
1106
|
+
numBytesDecoded += len;
|
|
1107
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
1108
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1109
|
+
cachedTextDecoder.decode();
|
|
1110
|
+
numBytesDecoded = len;
|
|
1111
|
+
}
|
|
1112
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
const cachedTextEncoder = new TextEncoder();
|
|
1116
|
+
|
|
1117
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
1118
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
1119
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
1120
|
+
view.set(buf);
|
|
1121
|
+
return {
|
|
1122
|
+
read: arg.length,
|
|
1123
|
+
written: buf.length
|
|
1124
|
+
};
|
|
1125
|
+
};
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
let WASM_VECTOR_LEN = 0;
|
|
1129
|
+
|
|
1130
|
+
let wasmModule, wasmInstance, wasm;
|
|
1131
|
+
function __wbg_finalize_init(instance, module) {
|
|
1132
|
+
wasmInstance = instance;
|
|
1133
|
+
wasm = instance.exports;
|
|
1134
|
+
wasmModule = module;
|
|
1135
|
+
cachedDataViewMemory0 = null;
|
|
1136
|
+
cachedFloat64ArrayMemory0 = null;
|
|
1137
|
+
cachedUint32ArrayMemory0 = null;
|
|
1138
|
+
cachedUint8ArrayMemory0 = null;
|
|
1139
|
+
wasm.__wbindgen_start();
|
|
1140
|
+
return wasm;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
async function __wbg_load(module, imports) {
|
|
1144
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
1145
|
+
if (!module.ok) {
|
|
1146
|
+
throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
1150
|
+
try {
|
|
1151
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
1152
|
+
} catch (e) {
|
|
1153
|
+
const validResponse = expectedResponseType(module.type);
|
|
1154
|
+
|
|
1155
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
1156
|
+
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);
|
|
1157
|
+
|
|
1158
|
+
} else { throw e; }
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
const bytes = await module.arrayBuffer();
|
|
1163
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
1164
|
+
} else {
|
|
1165
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
1166
|
+
|
|
1167
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
1168
|
+
return { instance, module };
|
|
1169
|
+
} else {
|
|
1170
|
+
return instance;
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
function expectedResponseType(type) {
|
|
1175
|
+
switch (type) {
|
|
1176
|
+
case 'basic': case 'cors': case 'default': return true;
|
|
1177
|
+
}
|
|
1178
|
+
return false;
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
function initSync(module) {
|
|
1183
|
+
if (wasm !== undefined) return wasm;
|
|
1184
|
+
|
|
1185
|
+
|
|
1186
|
+
if (module !== undefined) {
|
|
1187
|
+
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
1188
|
+
({module} = module)
|
|
1189
|
+
} else {
|
|
1190
|
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
const imports = __wbg_get_imports();
|
|
1195
|
+
if (!(module instanceof WebAssembly.Module)) {
|
|
1196
|
+
module = new WebAssembly.Module(module);
|
|
1197
|
+
}
|
|
1198
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
1199
|
+
return __wbg_finalize_init(instance, module);
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
async function __wbg_init(module_or_path) {
|
|
1203
|
+
if (wasm !== undefined) return wasm;
|
|
1204
|
+
|
|
1205
|
+
|
|
1206
|
+
if (module_or_path !== undefined) {
|
|
1207
|
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
1208
|
+
({module_or_path} = module_or_path)
|
|
1209
|
+
} else {
|
|
1210
|
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
if (module_or_path === undefined) {
|
|
1215
|
+
module_or_path = new URL('relo_wasm_bg.wasm', import.meta.url);
|
|
1216
|
+
}
|
|
1217
|
+
const imports = __wbg_get_imports();
|
|
1218
|
+
|
|
1219
|
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
1220
|
+
module_or_path = fetch(module_or_path);
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
1224
|
+
|
|
1225
|
+
return __wbg_finalize_init(instance, module);
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
export { initSync, __wbg_init as default };
|