@labpics/colors 0.10.0 → 1.0.3
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/LICENSE +1 -1
- package/LICENSES/CC-BY-4.0.txt +396 -0
- package/LICENSES/CC-BY-SA-4.0.txt +428 -0
- package/NOTICE.md +65 -0
- package/README.md +312 -330
- package/build-metadata.json +16 -12
- package/evidence/point-support-reference-surplus-q55-bps-proof-v1.json +1 -0
- package/evidence/wcag22-srgb8-q55-proof-v1.json +1 -0
- package/evidence/wcag22-srgb8-q55-v1.bin +0 -0
- package/evidence/wcag22-srgb8-v1.json +1 -0
- package/index.d.ts +204 -63
- package/index.js +495 -17
- package/package.json +38 -39
- package/pkg/labcolors.d.ts +227 -491
- package/pkg/labcolors.js +945 -178
- package/pkg/labcolors_bg.wasm +0 -0
- package/pkg/labcolors_bg.wasm.d.ts +61 -12
- package/pkg/snippets/labcolors-wasm-9fb8b927594c3d6f/inline0.js +108 -0
- package/program-wire/abi-v1.d.ts +84 -0
- package/program-wire/abi-v1.js +323 -0
- package/program-wire/abi-v2.d.ts +17 -0
- package/program-wire/abi-v2.js +62 -0
- package/program-wire/encoding.js +210 -0
- package/wcag22.d.ts +6 -0
- package/adapt-theme.d.ts +0 -76
- package/adapt-theme.js +0 -738
- package/apply-theme.d.ts +0 -16
- package/apply-theme.js +0 -45
- package/effective-bg.d.ts +0 -51
- package/effective-bg.js +0 -501
- package/watch-theme.d.ts +0 -57
- package/watch-theme.js +0 -144
package/pkg/labcolors.js
CHANGED
|
@@ -1,105 +1,379 @@
|
|
|
1
1
|
/* @ts-self-types="./labcolors.d.ts" */
|
|
2
|
+
import { bindingFailure, certificateError, certificateProjection, copyOutputRgb, programError, programFailure } from './snippets/labcolors-wasm-9fb8b927594c3d6f/inline0.js';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
|
|
5
|
+
export class AttachedMaterializationAuthority {
|
|
6
|
+
static __wrap(ptr) {
|
|
7
|
+
const obj = Object.create(AttachedMaterializationAuthority.prototype);
|
|
8
|
+
obj.__wbg_ptr = ptr;
|
|
9
|
+
AttachedMaterializationAuthorityFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
10
|
+
return obj;
|
|
11
|
+
}
|
|
10
12
|
__destroy_into_raw() {
|
|
11
13
|
const ptr = this.__wbg_ptr;
|
|
12
14
|
this.__wbg_ptr = 0;
|
|
13
|
-
|
|
15
|
+
AttachedMaterializationAuthorityFinalization.unregister(this);
|
|
14
16
|
return ptr;
|
|
15
17
|
}
|
|
16
18
|
free() {
|
|
17
19
|
const ptr = this.__destroy_into_raw();
|
|
18
|
-
wasm.
|
|
20
|
+
wasm.__wbg_attachedmaterializationauthority_free(ptr, 0);
|
|
19
21
|
}
|
|
20
22
|
/**
|
|
21
|
-
*
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
* @returns {
|
|
23
|
+
* @returns {bigint}
|
|
24
|
+
*/
|
|
25
|
+
bindingEpoch() {
|
|
26
|
+
const ret = wasm.attachedmaterializationauthority_bindingEpoch(this.__wbg_ptr);
|
|
27
|
+
return BigInt.asUintN(64, ret);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @returns {Uint8Array}
|
|
29
31
|
*/
|
|
30
|
-
|
|
32
|
+
contentIdentity() {
|
|
31
33
|
try {
|
|
32
34
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
33
|
-
|
|
34
|
-
const len0 = WASM_VECTOR_LEN;
|
|
35
|
-
const ptr1 = passStringToWasm0(bg_hex, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
36
|
-
const len1 = WASM_VECTOR_LEN;
|
|
37
|
-
wasm.labcolors_isStableGlowPointNoop(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
35
|
+
wasm.attachedmaterializationauthority_contentIdentity(retptr, this.__wbg_ptr);
|
|
38
36
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
39
37
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
return r0 !== 0;
|
|
38
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
39
|
+
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
40
|
+
return v1;
|
|
45
41
|
} finally {
|
|
46
42
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
47
43
|
}
|
|
48
44
|
}
|
|
49
45
|
/**
|
|
50
|
-
*
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
46
|
+
* @returns {Uint8Array}
|
|
47
|
+
*/
|
|
48
|
+
contextIdentity() {
|
|
49
|
+
try {
|
|
50
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
51
|
+
wasm.attachedmaterializationauthority_contextIdentity(retptr, this.__wbg_ptr);
|
|
52
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
53
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
54
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
55
|
+
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
56
|
+
return v1;
|
|
57
|
+
} finally {
|
|
58
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* @returns {number}
|
|
63
|
+
*/
|
|
64
|
+
occurrence() {
|
|
65
|
+
const ret = wasm.attachedmaterializationauthority_occurrence(this.__wbg_ptr);
|
|
66
|
+
return ret >>> 0;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* @returns {number}
|
|
70
|
+
*/
|
|
71
|
+
outputOpacity() {
|
|
72
|
+
const ret = wasm.attachedmaterializationauthority_outputOpacity(this.__wbg_ptr);
|
|
73
|
+
return ret;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* @returns {Uint8Array}
|
|
77
|
+
*/
|
|
78
|
+
outputRgb() {
|
|
79
|
+
try {
|
|
80
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
81
|
+
wasm.attachedmaterializationauthority_outputRgb(retptr, this.__wbg_ptr);
|
|
82
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
83
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
84
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
85
|
+
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
86
|
+
return v1;
|
|
87
|
+
} finally {
|
|
88
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* @returns {number}
|
|
93
|
+
*/
|
|
94
|
+
outputSlot() {
|
|
95
|
+
const ret = wasm.attachedmaterializationauthority_outputSlot(this.__wbg_ptr);
|
|
96
|
+
return ret >>> 0;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
59
99
|
* @returns {string}
|
|
60
100
|
*/
|
|
61
|
-
|
|
62
|
-
let
|
|
63
|
-
let
|
|
101
|
+
physicalIdentity() {
|
|
102
|
+
let deferred1_0;
|
|
103
|
+
let deferred1_1;
|
|
64
104
|
try {
|
|
65
105
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
66
|
-
|
|
67
|
-
const len0 = WASM_VECTOR_LEN;
|
|
68
|
-
wasm.labcolors_loadConfig(retptr, this.__wbg_ptr, ptr0, len0);
|
|
106
|
+
wasm.attachedmaterializationauthority_physicalIdentity(retptr, this.__wbg_ptr);
|
|
69
107
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
70
108
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
109
|
+
deferred1_0 = r0;
|
|
110
|
+
deferred1_1 = r1;
|
|
111
|
+
return getStringFromWasm0(r0, r1);
|
|
112
|
+
} finally {
|
|
113
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
114
|
+
wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* @returns {number}
|
|
119
|
+
*/
|
|
120
|
+
presentationRoot() {
|
|
121
|
+
const ret = wasm.attachedmaterializationauthority_presentationRoot(this.__wbg_ptr);
|
|
122
|
+
return ret >>> 0;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* @returns {string}
|
|
126
|
+
*/
|
|
127
|
+
rendererProvenance() {
|
|
128
|
+
let deferred1_0;
|
|
129
|
+
let deferred1_1;
|
|
130
|
+
try {
|
|
131
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
132
|
+
wasm.attachedmaterializationauthority_rendererProvenance(retptr, this.__wbg_ptr);
|
|
133
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
134
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
135
|
+
deferred1_0 = r0;
|
|
136
|
+
deferred1_1 = r1;
|
|
137
|
+
return getStringFromWasm0(r0, r1);
|
|
138
|
+
} finally {
|
|
139
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
140
|
+
wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* @returns {bigint}
|
|
145
|
+
*/
|
|
146
|
+
revision() {
|
|
147
|
+
const ret = wasm.attachedmaterializationauthority_revision(this.__wbg_ptr);
|
|
148
|
+
return BigInt.asUintN(64, ret);
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* @returns {bigint}
|
|
152
|
+
*/
|
|
153
|
+
sinkSequence() {
|
|
154
|
+
const ret = wasm.attachedmaterializationauthority_sinkSequence(this.__wbg_ptr);
|
|
155
|
+
return BigInt.asUintN(64, ret);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* @returns {Uint8Array}
|
|
159
|
+
*/
|
|
160
|
+
terminalCompositeRgb() {
|
|
161
|
+
try {
|
|
162
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
163
|
+
wasm.attachedmaterializationauthority_terminalCompositeRgb(retptr, this.__wbg_ptr);
|
|
164
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
165
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
166
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
167
|
+
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
168
|
+
return v1;
|
|
169
|
+
} finally {
|
|
170
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
if (Symbol.dispose) AttachedMaterializationAuthority.prototype[Symbol.dispose] = AttachedMaterializationAuthority.prototype.free;
|
|
175
|
+
|
|
176
|
+
export class ProgramAttachedRender {
|
|
177
|
+
static __wrap(ptr) {
|
|
178
|
+
const obj = Object.create(ProgramAttachedRender.prototype);
|
|
179
|
+
obj.__wbg_ptr = ptr;
|
|
180
|
+
ProgramAttachedRenderFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
181
|
+
return obj;
|
|
182
|
+
}
|
|
183
|
+
__destroy_into_raw() {
|
|
184
|
+
const ptr = this.__wbg_ptr;
|
|
185
|
+
this.__wbg_ptr = 0;
|
|
186
|
+
ProgramAttachedRenderFinalization.unregister(this);
|
|
187
|
+
return ptr;
|
|
188
|
+
}
|
|
189
|
+
free() {
|
|
190
|
+
const ptr = this.__destroy_into_raw();
|
|
191
|
+
wasm.__wbg_programattachedrender_free(ptr, 0);
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* @returns {bigint}
|
|
195
|
+
*/
|
|
196
|
+
bindingEpoch() {
|
|
197
|
+
const ret = wasm.programattachedrender_bindingEpoch(this.__wbg_ptr);
|
|
198
|
+
return BigInt.asUintN(64, ret);
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* @returns {Uint8Array}
|
|
202
|
+
*/
|
|
203
|
+
contentIdentity() {
|
|
204
|
+
try {
|
|
205
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
206
|
+
wasm.programattachedrender_contentIdentity(retptr, this.__wbg_ptr);
|
|
207
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
208
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
209
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
210
|
+
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
211
|
+
return v1;
|
|
212
|
+
} finally {
|
|
213
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* @returns {Uint8Array}
|
|
218
|
+
*/
|
|
219
|
+
contextIdentity() {
|
|
220
|
+
try {
|
|
221
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
222
|
+
wasm.programattachedrender_contextIdentity(retptr, this.__wbg_ptr);
|
|
223
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
224
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
225
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
226
|
+
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
227
|
+
return v1;
|
|
228
|
+
} finally {
|
|
229
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* @returns {number}
|
|
234
|
+
*/
|
|
235
|
+
occurrence() {
|
|
236
|
+
const ret = wasm.programattachedrender_occurrence(this.__wbg_ptr);
|
|
237
|
+
return ret >>> 0;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* @returns {number}
|
|
241
|
+
*/
|
|
242
|
+
outputOpacity() {
|
|
243
|
+
const ret = wasm.programattachedrender_outputOpacity(this.__wbg_ptr);
|
|
244
|
+
return ret;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* @returns {Uint8Array}
|
|
248
|
+
*/
|
|
249
|
+
outputRgb() {
|
|
250
|
+
try {
|
|
251
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
252
|
+
wasm.programattachedrender_outputRgb(retptr, this.__wbg_ptr);
|
|
253
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
254
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
255
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
256
|
+
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
257
|
+
return v1;
|
|
258
|
+
} finally {
|
|
259
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* @returns {number}
|
|
264
|
+
*/
|
|
265
|
+
outputSlot() {
|
|
266
|
+
const ret = wasm.programattachedrender_outputSlot(this.__wbg_ptr);
|
|
267
|
+
return ret >>> 0;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* @returns {string}
|
|
271
|
+
*/
|
|
272
|
+
physicalIdentity() {
|
|
273
|
+
let deferred1_0;
|
|
274
|
+
let deferred1_1;
|
|
275
|
+
try {
|
|
276
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
277
|
+
wasm.programattachedrender_physicalIdentity(retptr, this.__wbg_ptr);
|
|
278
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
279
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
280
|
+
deferred1_0 = r0;
|
|
281
|
+
deferred1_1 = r1;
|
|
282
|
+
return getStringFromWasm0(r0, r1);
|
|
283
|
+
} finally {
|
|
284
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
285
|
+
wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* @returns {number}
|
|
290
|
+
*/
|
|
291
|
+
presentationRoot() {
|
|
292
|
+
const ret = wasm.programattachedrender_presentationRoot(this.__wbg_ptr);
|
|
293
|
+
return ret >>> 0;
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* @returns {bigint}
|
|
297
|
+
*/
|
|
298
|
+
revision() {
|
|
299
|
+
const ret = wasm.programattachedrender_revision(this.__wbg_ptr);
|
|
300
|
+
return BigInt.asUintN(64, ret);
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* @returns {number}
|
|
304
|
+
*/
|
|
305
|
+
sinkOutput() {
|
|
306
|
+
const ret = wasm.programattachedrender_sinkOutput(this.__wbg_ptr);
|
|
307
|
+
return ret >>> 0;
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* @returns {bigint}
|
|
311
|
+
*/
|
|
312
|
+
sinkSequence() {
|
|
313
|
+
const ret = wasm.programattachedrender_sinkSequence(this.__wbg_ptr);
|
|
314
|
+
return BigInt.asUintN(64, ret);
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* @returns {Uint8Array | undefined}
|
|
318
|
+
*/
|
|
319
|
+
terminalCompositeRgb() {
|
|
320
|
+
try {
|
|
321
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
322
|
+
wasm.programattachedrender_terminalCompositeRgb(retptr, this.__wbg_ptr);
|
|
323
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
324
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
325
|
+
let v1;
|
|
326
|
+
if (r0 !== 0) {
|
|
327
|
+
v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
328
|
+
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
78
329
|
}
|
|
79
|
-
|
|
80
|
-
deferred3_1 = len2;
|
|
81
|
-
return getStringFromWasm0(ptr2, len2);
|
|
330
|
+
return v1;
|
|
82
331
|
} finally {
|
|
83
332
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
84
|
-
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
85
333
|
}
|
|
86
334
|
}
|
|
335
|
+
}
|
|
336
|
+
if (Symbol.dispose) ProgramAttachedRender.prototype[Symbol.dispose] = ProgramAttachedRender.prototype.free;
|
|
337
|
+
|
|
338
|
+
export class ProgramAttachedSnapshot {
|
|
339
|
+
static __wrap(ptr) {
|
|
340
|
+
const obj = Object.create(ProgramAttachedSnapshot.prototype);
|
|
341
|
+
obj.__wbg_ptr = ptr;
|
|
342
|
+
ProgramAttachedSnapshotFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
343
|
+
return obj;
|
|
344
|
+
}
|
|
345
|
+
__destroy_into_raw() {
|
|
346
|
+
const ptr = this.__wbg_ptr;
|
|
347
|
+
this.__wbg_ptr = 0;
|
|
348
|
+
ProgramAttachedSnapshotFinalization.unregister(this);
|
|
349
|
+
return ptr;
|
|
350
|
+
}
|
|
351
|
+
free() {
|
|
352
|
+
const ptr = this.__destroy_into_raw();
|
|
353
|
+
wasm.__wbg_programattachedsnapshot_free(ptr, 0);
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* @returns {boolean}
|
|
357
|
+
*/
|
|
358
|
+
hasRender() {
|
|
359
|
+
const ret = wasm.programattachedsnapshot_hasRender(this.__wbg_ptr);
|
|
360
|
+
return ret !== 0;
|
|
361
|
+
}
|
|
87
362
|
/**
|
|
88
|
-
* Return the frozen legacy `muddiness` coordinate for an sRGB hex colour.
|
|
89
|
-
*
|
|
90
|
-
* This is an experimental compatibility proxy: it reproduces the historic
|
|
91
|
-
* numeric API, but is not an observer-validated human clean/dirty verdict
|
|
92
|
-
* or a production decision. The legacy identifier is retained only for
|
|
93
|
-
* compatibility.
|
|
94
|
-
* @param {string} hex
|
|
95
363
|
* @returns {number}
|
|
96
364
|
*/
|
|
97
|
-
|
|
365
|
+
outputCount() {
|
|
366
|
+
const ret = wasm.programattachedsnapshot_outputCount(this.__wbg_ptr);
|
|
367
|
+
return ret >>> 0;
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* @param {number} index
|
|
371
|
+
* @returns {number}
|
|
372
|
+
*/
|
|
373
|
+
outputOpacity(index) {
|
|
98
374
|
try {
|
|
99
375
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
100
|
-
|
|
101
|
-
const len0 = WASM_VECTOR_LEN;
|
|
102
|
-
wasm.labcolors_muddiness(retptr, this.__wbg_ptr, ptr0, len0);
|
|
376
|
+
wasm.programattachedsnapshot_outputOpacity(retptr, this.__wbg_ptr, addHeapObject(index));
|
|
103
377
|
var r0 = getDataViewMemory0().getFloat64(retptr + 8 * 0, true);
|
|
104
378
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
105
379
|
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
@@ -112,44 +386,13 @@ export class LabColors {
|
|
|
112
386
|
}
|
|
113
387
|
}
|
|
114
388
|
/**
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
* until [`loadConfig`](LabColors::load_config) supplies a design system.
|
|
120
|
-
*/
|
|
121
|
-
constructor() {
|
|
122
|
-
const ret = wasm.labcolors_new();
|
|
123
|
-
this.__wbg_ptr = ret;
|
|
124
|
-
LabColorsFinalization.register(this, this.__wbg_ptr, this);
|
|
125
|
-
return this;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Recheck the contrasts `fgHexes` achieve against `bgHex` under `theme` —
|
|
129
|
-
* the cheap per-frame primitive a reactive runtime uses to decide whether
|
|
130
|
-
* already-resolved colours still pass against a changed background (re-solve
|
|
131
|
-
* only when they stably do not). No full solve: one perceptual-model forward
|
|
132
|
-
* for the background plus one per foreground.
|
|
133
|
-
*
|
|
134
|
-
* Returns a `Float64Array` of `[lc, wcagRatio]` pairs, interleaved and in the
|
|
135
|
-
* order of `fgHexes`: index `2*i` is foreground `i`'s signed `Lc`, `2*i+1`
|
|
136
|
-
* its WCAG ratio. Rejects (structured `{code, message}`) on an invalid hex or
|
|
137
|
-
* an unknown theme.
|
|
138
|
-
* @param {string} bg_hex
|
|
139
|
-
* @param {string[]} fg_hexes
|
|
140
|
-
* @param {string} theme
|
|
141
|
-
* @returns {Float64Array}
|
|
142
|
-
*/
|
|
143
|
-
recheckContrast(bg_hex, fg_hexes, theme) {
|
|
389
|
+
* @param {number} index
|
|
390
|
+
* @returns {Uint8Array}
|
|
391
|
+
*/
|
|
392
|
+
outputRgb(index) {
|
|
144
393
|
try {
|
|
145
394
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
146
|
-
|
|
147
|
-
const len0 = WASM_VECTOR_LEN;
|
|
148
|
-
const ptr1 = passArrayJsValueToWasm0(fg_hexes, wasm.__wbindgen_export);
|
|
149
|
-
const len1 = WASM_VECTOR_LEN;
|
|
150
|
-
const ptr2 = passStringToWasm0(theme, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
151
|
-
const len2 = WASM_VECTOR_LEN;
|
|
152
|
-
wasm.labcolors_recheckContrast(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
395
|
+
wasm.programattachedsnapshot_outputRgb(retptr, this.__wbg_ptr, addHeapObject(index));
|
|
153
396
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
154
397
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
155
398
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -157,76 +400,314 @@ export class LabColors {
|
|
|
157
400
|
if (r3) {
|
|
158
401
|
throw takeObject(r2);
|
|
159
402
|
}
|
|
160
|
-
var
|
|
161
|
-
wasm.
|
|
162
|
-
return
|
|
403
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
404
|
+
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
405
|
+
return v1;
|
|
406
|
+
} finally {
|
|
407
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* @param {number} index
|
|
412
|
+
* @returns {number}
|
|
413
|
+
*/
|
|
414
|
+
outputSlot(index) {
|
|
415
|
+
try {
|
|
416
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
417
|
+
wasm.programattachedsnapshot_outputSlot(retptr, this.__wbg_ptr, addHeapObject(index));
|
|
418
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
419
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
420
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
421
|
+
if (r2) {
|
|
422
|
+
throw takeObject(r1);
|
|
423
|
+
}
|
|
424
|
+
return r0 >>> 0;
|
|
425
|
+
} finally {
|
|
426
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* @returns {ProgramAttachedRender | undefined}
|
|
431
|
+
*/
|
|
432
|
+
render() {
|
|
433
|
+
const ret = wasm.programattachedsnapshot_render(this.__wbg_ptr);
|
|
434
|
+
return ret === 0 ? undefined : ProgramAttachedRender.__wrap(ret);
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* @returns {string}
|
|
438
|
+
*/
|
|
439
|
+
get state() {
|
|
440
|
+
let deferred1_0;
|
|
441
|
+
let deferred1_1;
|
|
442
|
+
try {
|
|
443
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
444
|
+
wasm.programattachedsnapshot_state(retptr, this.__wbg_ptr);
|
|
445
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
446
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
447
|
+
deferred1_0 = r0;
|
|
448
|
+
deferred1_1 = r1;
|
|
449
|
+
return getStringFromWasm0(r0, r1);
|
|
450
|
+
} finally {
|
|
451
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
452
|
+
wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
if (Symbol.dispose) ProgramAttachedSnapshot.prototype[Symbol.dispose] = ProgramAttachedSnapshot.prototype.free;
|
|
457
|
+
|
|
458
|
+
export class ProgramAttachment {
|
|
459
|
+
static __wrap(ptr) {
|
|
460
|
+
const obj = Object.create(ProgramAttachment.prototype);
|
|
461
|
+
obj.__wbg_ptr = ptr;
|
|
462
|
+
ProgramAttachmentFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
463
|
+
return obj;
|
|
464
|
+
}
|
|
465
|
+
__destroy_into_raw() {
|
|
466
|
+
const ptr = this.__wbg_ptr;
|
|
467
|
+
this.__wbg_ptr = 0;
|
|
468
|
+
ProgramAttachmentFinalization.unregister(this);
|
|
469
|
+
return ptr;
|
|
470
|
+
}
|
|
471
|
+
free() {
|
|
472
|
+
const ptr = this.__destroy_into_raw();
|
|
473
|
+
wasm.__wbg_programattachment_free(ptr, 0);
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* Потребляет attachment только после подтверждения внешнего revoke caller-ом.
|
|
477
|
+
* @param {boolean} confirmed
|
|
478
|
+
*/
|
|
479
|
+
dispose(confirmed) {
|
|
480
|
+
try {
|
|
481
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
482
|
+
wasm.programattachment_dispose(retptr, this.__wbg_ptr, addHeapObject(confirmed));
|
|
483
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
484
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
485
|
+
if (r1) {
|
|
486
|
+
throw takeObject(r0);
|
|
487
|
+
}
|
|
163
488
|
} finally {
|
|
164
489
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
165
490
|
}
|
|
166
491
|
}
|
|
167
492
|
/**
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
* independent, so this shares it across all samples instead of recomputing it
|
|
173
|
-
* per `recheckContrast` call — a measured ~2.6x on the multi-sample recheck.
|
|
174
|
-
*
|
|
175
|
-
* Returns a flat, background-major `Float64Array`: sample `s`, foreground `i`
|
|
176
|
-
* is at `(s * fgHexes.length + i) * 2` (`lc`) and `+1` (`wcagRatio`). The
|
|
177
|
-
* values are byte-identical to calling `recheckContrast(bgHexes[s], fgHexes,
|
|
178
|
-
* theme)` for each `s`.
|
|
179
|
-
* @param {string[]} bg_hexes
|
|
180
|
-
* @param {string[]} fg_hexes
|
|
181
|
-
* @param {string} theme
|
|
182
|
-
* @returns {Float64Array}
|
|
183
|
-
*/
|
|
184
|
-
recheckContrastMulti(bg_hexes, fg_hexes, theme) {
|
|
493
|
+
* Допускает authority только из текущего committed head attachment.
|
|
494
|
+
* @returns {AttachedMaterializationAuthority}
|
|
495
|
+
*/
|
|
496
|
+
materializationAuthority() {
|
|
185
497
|
try {
|
|
186
498
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
187
|
-
|
|
499
|
+
wasm.programattachment_materializationAuthority(retptr, this.__wbg_ptr);
|
|
500
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
501
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
502
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
503
|
+
if (r2) {
|
|
504
|
+
throw takeObject(r1);
|
|
505
|
+
}
|
|
506
|
+
return AttachedMaterializationAuthority.__wrap(r0);
|
|
507
|
+
} finally {
|
|
508
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Проверяет переданные caller-ом revision, identity и epoch против current head.
|
|
513
|
+
* @param {bigint} revision
|
|
514
|
+
* @param {Uint8Array} content_identity
|
|
515
|
+
* @param {bigint} binding_epoch
|
|
516
|
+
* @returns {AttachedMaterializationAuthority}
|
|
517
|
+
*/
|
|
518
|
+
materializationAuthorityFor(revision, content_identity, binding_epoch) {
|
|
519
|
+
try {
|
|
520
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
521
|
+
const ptr0 = passArray8ToWasm0(content_identity, wasm.__wbindgen_export2);
|
|
188
522
|
const len0 = WASM_VECTOR_LEN;
|
|
189
|
-
|
|
523
|
+
wasm.programattachment_materializationAuthorityFor(retptr, this.__wbg_ptr, addHeapObject(revision), ptr0, len0, addHeapObject(binding_epoch));
|
|
524
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
525
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
526
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
527
|
+
if (r2) {
|
|
528
|
+
throw takeObject(r1);
|
|
529
|
+
}
|
|
530
|
+
return AttachedMaterializationAuthority.__wrap(r0);
|
|
531
|
+
} finally {
|
|
532
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* Атомарно применяет observed revision через host sink.
|
|
537
|
+
* @param {bigint} revision
|
|
538
|
+
* @param {Uint32Array} scenario_ids
|
|
539
|
+
* @param {Uint8Array} surfaces
|
|
540
|
+
* @param {number} surface_count
|
|
541
|
+
* @returns {ProgramAttachedSnapshot}
|
|
542
|
+
*/
|
|
543
|
+
updateObserved(revision, scenario_ids, surfaces, surface_count) {
|
|
544
|
+
try {
|
|
545
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
546
|
+
const ptr0 = passArray32ToWasm0(scenario_ids, wasm.__wbindgen_export2);
|
|
547
|
+
const len0 = WASM_VECTOR_LEN;
|
|
548
|
+
const ptr1 = passArray8ToWasm0(surfaces, wasm.__wbindgen_export2);
|
|
190
549
|
const len1 = WASM_VECTOR_LEN;
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
550
|
+
wasm.programattachment_updateObserved(retptr, this.__wbg_ptr, addHeapObject(revision), ptr0, len0, ptr1, len1, addHeapObject(surface_count));
|
|
551
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
552
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
553
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
554
|
+
if (r2) {
|
|
555
|
+
throw takeObject(r1);
|
|
556
|
+
}
|
|
557
|
+
return ProgramAttachedSnapshot.__wrap(r0);
|
|
558
|
+
} finally {
|
|
559
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* Атомарно отзывает owned sink для недоступной revision.
|
|
564
|
+
* @param {bigint} revision
|
|
565
|
+
* @param {number} reason_id
|
|
566
|
+
* @returns {ProgramAttachedSnapshot}
|
|
567
|
+
*/
|
|
568
|
+
updateUnknown(revision, reason_id) {
|
|
569
|
+
try {
|
|
570
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
571
|
+
wasm.programattachment_updateUnknown(retptr, this.__wbg_ptr, addHeapObject(revision), addHeapObject(reason_id));
|
|
194
572
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
195
573
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
196
574
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
575
|
+
if (r2) {
|
|
576
|
+
throw takeObject(r1);
|
|
577
|
+
}
|
|
578
|
+
return ProgramAttachedSnapshot.__wrap(r0);
|
|
579
|
+
} finally {
|
|
580
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
if (Symbol.dispose) ProgramAttachment.prototype[Symbol.dispose] = ProgramAttachment.prototype.free;
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* Публичный runtime одного скомпилированного Program.
|
|
588
|
+
*/
|
|
589
|
+
export class ProgramRuntime {
|
|
590
|
+
static __wrap(ptr) {
|
|
591
|
+
const obj = Object.create(ProgramRuntime.prototype);
|
|
592
|
+
obj.__wbg_ptr = ptr;
|
|
593
|
+
ProgramRuntimeFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
594
|
+
return obj;
|
|
595
|
+
}
|
|
596
|
+
__destroy_into_raw() {
|
|
597
|
+
const ptr = this.__wbg_ptr;
|
|
598
|
+
this.__wbg_ptr = 0;
|
|
599
|
+
ProgramRuntimeFinalization.unregister(this);
|
|
600
|
+
return ptr;
|
|
601
|
+
}
|
|
602
|
+
free() {
|
|
603
|
+
const ptr = this.__destroy_into_raw();
|
|
604
|
+
wasm.__wbg_programruntime_free(ptr, 0);
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* Атомарный observed update. `surfaces` — row-major
|
|
608
|
+
* `scenario_ids.len() × surface_count × 3` bytes.
|
|
609
|
+
* @param {bigint} revision
|
|
610
|
+
* @param {Uint32Array} scenario_ids
|
|
611
|
+
* @param {Uint8Array} surfaces
|
|
612
|
+
* @param {number} surface_count
|
|
613
|
+
* @returns {ProgramSnapshot}
|
|
614
|
+
*/
|
|
615
|
+
updateObserved(revision, scenario_ids, surfaces, surface_count) {
|
|
616
|
+
try {
|
|
617
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
618
|
+
const ptr0 = passArray32ToWasm0(scenario_ids, wasm.__wbindgen_export2);
|
|
619
|
+
const len0 = WASM_VECTOR_LEN;
|
|
620
|
+
const ptr1 = passArray8ToWasm0(surfaces, wasm.__wbindgen_export2);
|
|
621
|
+
const len1 = WASM_VECTOR_LEN;
|
|
622
|
+
wasm.programruntime_updateObserved(retptr, this.__wbg_ptr, addHeapObject(revision), ptr0, len0, ptr1, len1, addHeapObject(surface_count));
|
|
623
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
624
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
625
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
626
|
+
if (r2) {
|
|
627
|
+
throw takeObject(r1);
|
|
628
|
+
}
|
|
629
|
+
return ProgramSnapshot.__wrap(r0);
|
|
630
|
+
} finally {
|
|
631
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
/**
|
|
635
|
+
* @param {bigint} revision
|
|
636
|
+
* @param {number} reason_id
|
|
637
|
+
* @returns {ProgramSnapshot}
|
|
638
|
+
*/
|
|
639
|
+
updateUnknown(revision, reason_id) {
|
|
640
|
+
try {
|
|
641
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
642
|
+
wasm.programruntime_updateUnknown(retptr, this.__wbg_ptr, addHeapObject(revision), addHeapObject(reason_id));
|
|
643
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
644
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
645
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
646
|
+
if (r2) {
|
|
647
|
+
throw takeObject(r1);
|
|
648
|
+
}
|
|
649
|
+
return ProgramSnapshot.__wrap(r0);
|
|
650
|
+
} finally {
|
|
651
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
if (Symbol.dispose) ProgramRuntime.prototype[Symbol.dispose] = ProgramRuntime.prototype.free;
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* Owned snapshot одного Program update.
|
|
659
|
+
*/
|
|
660
|
+
export class ProgramSnapshot {
|
|
661
|
+
static __wrap(ptr) {
|
|
662
|
+
const obj = Object.create(ProgramSnapshot.prototype);
|
|
663
|
+
obj.__wbg_ptr = ptr;
|
|
664
|
+
ProgramSnapshotFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
665
|
+
return obj;
|
|
666
|
+
}
|
|
667
|
+
__destroy_into_raw() {
|
|
668
|
+
const ptr = this.__wbg_ptr;
|
|
669
|
+
this.__wbg_ptr = 0;
|
|
670
|
+
ProgramSnapshotFinalization.unregister(this);
|
|
671
|
+
return ptr;
|
|
672
|
+
}
|
|
673
|
+
free() {
|
|
674
|
+
const ptr = this.__destroy_into_raw();
|
|
675
|
+
wasm.__wbg_programsnapshot_free(ptr, 0);
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* @returns {number}
|
|
679
|
+
*/
|
|
680
|
+
outputCount() {
|
|
681
|
+
const ret = wasm.programsnapshot_outputCount(this.__wbg_ptr);
|
|
682
|
+
return ret >>> 0;
|
|
683
|
+
}
|
|
684
|
+
/**
|
|
685
|
+
* @param {number} index
|
|
686
|
+
* @returns {number}
|
|
687
|
+
*/
|
|
688
|
+
outputOpacity(index) {
|
|
689
|
+
try {
|
|
690
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
691
|
+
wasm.programsnapshot_outputOpacity(retptr, this.__wbg_ptr, addHeapObject(index));
|
|
692
|
+
var r0 = getDataViewMemory0().getFloat64(retptr + 8 * 0, true);
|
|
693
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
197
694
|
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
198
695
|
if (r3) {
|
|
199
696
|
throw takeObject(r2);
|
|
200
697
|
}
|
|
201
|
-
|
|
202
|
-
wasm.__wbindgen_export4(r0, r1 * 8, 8);
|
|
203
|
-
return v4;
|
|
698
|
+
return r0;
|
|
204
699
|
} finally {
|
|
205
700
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
206
701
|
}
|
|
207
702
|
}
|
|
208
703
|
/**
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
* Returns a `ResolvedTheme` object. Per-role unreachability is part of a
|
|
213
|
-
* successful result (each role carries its own `kind`); only whole-call
|
|
214
|
-
* failures reject (no config loaded yet as `config_required`, invalid hex,
|
|
215
|
-
* unknown theme, a core invariant failure, and the by-construction-
|
|
216
|
-
* unreachable oklch serialisation failure as `internal_error`) — as a
|
|
217
|
-
* structured `"<code>: <message>"` error, never an unwound panic.
|
|
218
|
-
* @param {string} bg_hex
|
|
219
|
-
* @param {string} theme
|
|
220
|
-
* @returns {ResolvedTheme}
|
|
704
|
+
* @param {number} index
|
|
705
|
+
* @returns {Uint8Array}
|
|
221
706
|
*/
|
|
222
|
-
|
|
707
|
+
outputRgb(index) {
|
|
223
708
|
try {
|
|
224
709
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
225
|
-
|
|
226
|
-
const len0 = WASM_VECTOR_LEN;
|
|
227
|
-
const ptr1 = passStringToWasm0(theme, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
228
|
-
const len1 = WASM_VECTOR_LEN;
|
|
229
|
-
wasm.labcolors_resolveTheme(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
710
|
+
wasm.programsnapshot_outputRgb(retptr, this.__wbg_ptr, addHeapObject(index));
|
|
230
711
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
231
712
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
232
713
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -238,30 +719,289 @@ export class LabColors {
|
|
|
238
719
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
239
720
|
}
|
|
240
721
|
}
|
|
722
|
+
/**
|
|
723
|
+
* @param {number} index
|
|
724
|
+
* @returns {number}
|
|
725
|
+
*/
|
|
726
|
+
outputSlot(index) {
|
|
727
|
+
try {
|
|
728
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
729
|
+
wasm.programsnapshot_outputSlot(retptr, this.__wbg_ptr, addHeapObject(index));
|
|
730
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
731
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
732
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
733
|
+
if (r2) {
|
|
734
|
+
throw takeObject(r1);
|
|
735
|
+
}
|
|
736
|
+
return r0 >>> 0;
|
|
737
|
+
} finally {
|
|
738
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
/**
|
|
742
|
+
* Stable lifecycle key: waiting|ready|stale|failed.
|
|
743
|
+
* @returns {string}
|
|
744
|
+
*/
|
|
745
|
+
get state() {
|
|
746
|
+
let deferred1_0;
|
|
747
|
+
let deferred1_1;
|
|
748
|
+
try {
|
|
749
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
750
|
+
wasm.programsnapshot_state(retptr, this.__wbg_ptr);
|
|
751
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
752
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
753
|
+
deferred1_0 = r0;
|
|
754
|
+
deferred1_1 = r1;
|
|
755
|
+
return getStringFromWasm0(r0, r1);
|
|
756
|
+
} finally {
|
|
757
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
758
|
+
wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
if (Symbol.dispose) ProgramSnapshot.prototype[Symbol.dispose] = ProgramSnapshot.prototype.free;
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* Создаёт один публичный attachment и передаёт все внешние эффекты в `host`.
|
|
766
|
+
* @param {Uint8Array} bytes
|
|
767
|
+
* @param {number} stream_id
|
|
768
|
+
* @param {number} output_slot
|
|
769
|
+
* @param {number} sink_output
|
|
770
|
+
* @param {number} presentation_root
|
|
771
|
+
* @param {number} occurrence
|
|
772
|
+
* @param {Function} host
|
|
773
|
+
* @returns {ProgramAttachment}
|
|
774
|
+
*/
|
|
775
|
+
export function attachProgramWire(bytes, stream_id, output_slot, sink_output, presentation_root, occurrence, host) {
|
|
776
|
+
try {
|
|
777
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
778
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export2);
|
|
779
|
+
const len0 = WASM_VECTOR_LEN;
|
|
780
|
+
wasm.attachProgramWire(retptr, ptr0, len0, addHeapObject(stream_id), addHeapObject(output_slot), addHeapObject(sink_output), addHeapObject(presentation_root), addHeapObject(occurrence), addBorrowedObject(host));
|
|
781
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
782
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
783
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
784
|
+
if (r2) {
|
|
785
|
+
throw takeObject(r1);
|
|
786
|
+
}
|
|
787
|
+
return ProgramAttachment.__wrap(r0);
|
|
788
|
+
} finally {
|
|
789
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
790
|
+
heap[stack_pointer++] = undefined;
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* Компилирует canonical Program wire bytes и создаёт одну runtime Session.
|
|
796
|
+
* @param {Uint8Array} bytes
|
|
797
|
+
* @param {number} stream_id
|
|
798
|
+
* @returns {ProgramRuntime}
|
|
799
|
+
*/
|
|
800
|
+
export function compileProgramWire(bytes, stream_id) {
|
|
801
|
+
try {
|
|
802
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
803
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export2);
|
|
804
|
+
const len0 = WASM_VECTOR_LEN;
|
|
805
|
+
wasm.compileProgramWire(retptr, ptr0, len0, addHeapObject(stream_id));
|
|
806
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
807
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
808
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
809
|
+
if (r2) {
|
|
810
|
+
throw takeObject(r1);
|
|
811
|
+
}
|
|
812
|
+
return ProgramRuntime.__wrap(r0);
|
|
813
|
+
} finally {
|
|
814
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* Decodes untrusted certificate bytes into immutable metadata for inspection
|
|
820
|
+
* only. The opaque body, producer capability, and admission state stay in
|
|
821
|
+
* Core and are not projected to JavaScript.
|
|
822
|
+
* @param {Uint8Array} bytes
|
|
823
|
+
* @returns {any}
|
|
824
|
+
*/
|
|
825
|
+
export function decodeCertificateEnvelope(bytes) {
|
|
826
|
+
try {
|
|
827
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
828
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export2);
|
|
829
|
+
const len0 = WASM_VECTOR_LEN;
|
|
830
|
+
wasm.decodeCertificateEnvelope(retptr, ptr0, len0);
|
|
831
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
832
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
833
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
834
|
+
if (r2) {
|
|
835
|
+
throw takeObject(r1);
|
|
836
|
+
}
|
|
837
|
+
return takeObject(r0);
|
|
838
|
+
} finally {
|
|
839
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
/**
|
|
844
|
+
* Точная оценка WCAG 2.2 одной финальной пары sRGB8.
|
|
845
|
+
* @param {string} foreground_hex
|
|
846
|
+
* @param {string} background_hex
|
|
847
|
+
* @param {string} criterion
|
|
848
|
+
* @returns {Wcag22AssessmentV1}
|
|
849
|
+
*/
|
|
850
|
+
export function evaluateWcag22(foreground_hex, background_hex, criterion) {
|
|
851
|
+
try {
|
|
852
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
853
|
+
const ptr0 = passStringToWasm0(foreground_hex, wasm.__wbindgen_export2, wasm.__wbindgen_export4);
|
|
854
|
+
const len0 = WASM_VECTOR_LEN;
|
|
855
|
+
const ptr1 = passStringToWasm0(background_hex, wasm.__wbindgen_export2, wasm.__wbindgen_export4);
|
|
856
|
+
const len1 = WASM_VECTOR_LEN;
|
|
857
|
+
const ptr2 = passStringToWasm0(criterion, wasm.__wbindgen_export2, wasm.__wbindgen_export4);
|
|
858
|
+
const len2 = WASM_VECTOR_LEN;
|
|
859
|
+
wasm.evaluateWcag22(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
860
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
861
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
862
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
863
|
+
if (r2) {
|
|
864
|
+
throw takeObject(r1);
|
|
865
|
+
}
|
|
866
|
+
return takeObject(r0);
|
|
867
|
+
} finally {
|
|
868
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
/**
|
|
873
|
+
* Выдаёт собственную копию байтов сертификата встроенного дескриптора исходников Core.
|
|
874
|
+
* Идентичность и маркер создаёт Core; capability и состояние приёма остаются внутри.
|
|
875
|
+
* @returns {Uint8Array}
|
|
876
|
+
*/
|
|
877
|
+
export function issueSourceCertificateEnvelope() {
|
|
878
|
+
try {
|
|
879
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
880
|
+
wasm.issueSourceCertificateEnvelope(retptr);
|
|
881
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
882
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
883
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
884
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
885
|
+
if (r3) {
|
|
886
|
+
throw takeObject(r2);
|
|
887
|
+
}
|
|
888
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
889
|
+
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
890
|
+
return v1;
|
|
891
|
+
} finally {
|
|
892
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* Единственный публичный манифест численных возможностей.
|
|
898
|
+
* @returns {NumericalCapabilityManifestV2}
|
|
899
|
+
*/
|
|
900
|
+
export function numericalCapabilityManifest() {
|
|
901
|
+
try {
|
|
902
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
903
|
+
wasm.numericalCapabilityManifest(retptr);
|
|
904
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
905
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
906
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
907
|
+
if (r2) {
|
|
908
|
+
throw takeObject(r1);
|
|
909
|
+
}
|
|
910
|
+
return takeObject(r0);
|
|
911
|
+
} finally {
|
|
912
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
913
|
+
}
|
|
241
914
|
}
|
|
242
|
-
if (Symbol.dispose) LabColors.prototype[Symbol.dispose] = LabColors.prototype.free;
|
|
243
915
|
function __wbg_get_imports() {
|
|
244
916
|
const import0 = {
|
|
245
917
|
__proto__: null,
|
|
246
|
-
|
|
247
|
-
const
|
|
248
|
-
|
|
918
|
+
__wbg___wbindgen_bigint_get_as_i64_d968e41184ae354f: function(arg0, arg1) {
|
|
919
|
+
const v = getObject(arg1);
|
|
920
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
921
|
+
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
922
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
923
|
+
},
|
|
924
|
+
__wbg___wbindgen_boolean_get_fa956cfa2d1bd751: function(arg0) {
|
|
925
|
+
const v = getObject(arg0);
|
|
926
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
927
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
928
|
+
},
|
|
929
|
+
__wbg___wbindgen_jsval_eq_e659fcf7b0e32763: function(arg0, arg1) {
|
|
930
|
+
const ret = getObject(arg0) === getObject(arg1);
|
|
931
|
+
return ret;
|
|
249
932
|
},
|
|
250
|
-
|
|
933
|
+
__wbg___wbindgen_number_get_394265ed1e1b84ee: function(arg0, arg1) {
|
|
251
934
|
const obj = getObject(arg1);
|
|
252
|
-
const ret = typeof(obj) === '
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
256
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
935
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
936
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
937
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
257
938
|
},
|
|
258
939
|
__wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
|
|
259
940
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
260
941
|
},
|
|
942
|
+
__wbg_bindingFailure_4877cb613e60386d: function(arg0, arg1, arg2) {
|
|
943
|
+
const ret = bindingFailure(arg0 >>> 0, getStringFromWasm0(arg1, arg2));
|
|
944
|
+
return addHeapObject(ret);
|
|
945
|
+
},
|
|
946
|
+
__wbg_call_a6e5c5dce5018821: function() { return handleError(function (arg0, arg1, arg2) {
|
|
947
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
948
|
+
return addHeapObject(ret);
|
|
949
|
+
}, arguments); },
|
|
950
|
+
__wbg_certificateError_2ec426aadd4e43a9: function(arg0, arg1, arg2, arg3) {
|
|
951
|
+
const ret = certificateError(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
|
|
952
|
+
return addHeapObject(ret);
|
|
953
|
+
},
|
|
954
|
+
__wbg_certificateProjection_ebb48b40efb00a94: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21) {
|
|
955
|
+
const ret = certificateProjection(arg0, getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), arg5, getStringFromWasm0(arg6, arg7), getStringFromWasm0(arg8, arg9), getArrayU8FromWasm0(arg10, arg11), getStringFromWasm0(arg12, arg13), getStringFromWasm0(arg14, arg15), arg16, arg17 >>> 0, getArrayU8FromWasm0(arg18, arg19), getArrayU8FromWasm0(arg20, arg21));
|
|
956
|
+
return addHeapObject(ret);
|
|
957
|
+
},
|
|
958
|
+
__wbg_copyOutputRgb_9c1248136397e8f7: function() { return handleError(function (arg0, arg1, arg2) {
|
|
959
|
+
const ret = copyOutputRgb(arg0, arg1, arg2);
|
|
960
|
+
return addHeapObject(ret);
|
|
961
|
+
}, arguments); },
|
|
962
|
+
__wbg_new_da52cf8fe3429cb2: function() {
|
|
963
|
+
const ret = new Object();
|
|
964
|
+
return addHeapObject(ret);
|
|
965
|
+
},
|
|
966
|
+
__wbg_new_from_slice_77cdfb7977362f3c: function(arg0, arg1) {
|
|
967
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
968
|
+
return addHeapObject(ret);
|
|
969
|
+
},
|
|
261
970
|
__wbg_parse_1c0d8a8656d7e016: function() { return handleError(function (arg0, arg1) {
|
|
262
971
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
263
972
|
return addHeapObject(ret);
|
|
264
973
|
}, arguments); },
|
|
974
|
+
__wbg_programError_5f6bdc898b9887ae: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
975
|
+
const ret = programError(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5));
|
|
976
|
+
return addHeapObject(ret);
|
|
977
|
+
},
|
|
978
|
+
__wbg_programFailure_39b68ebdcc015c84: function(arg0, arg1, arg2) {
|
|
979
|
+
const ret = programFailure(arg0 >>> 0, getStringFromWasm0(arg1, arg2));
|
|
980
|
+
return addHeapObject(ret);
|
|
981
|
+
},
|
|
982
|
+
__wbg_set_8535240470bf2500: function() { return handleError(function (arg0, arg1, arg2) {
|
|
983
|
+
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
984
|
+
return ret;
|
|
985
|
+
}, arguments); },
|
|
986
|
+
__wbindgen_cast_0000000000000001: function(arg0) {
|
|
987
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
988
|
+
const ret = arg0;
|
|
989
|
+
return addHeapObject(ret);
|
|
990
|
+
},
|
|
991
|
+
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
992
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
993
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
994
|
+
return addHeapObject(ret);
|
|
995
|
+
},
|
|
996
|
+
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
997
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
998
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
999
|
+
return addHeapObject(ret);
|
|
1000
|
+
},
|
|
1001
|
+
__wbindgen_object_clone_ref: function(arg0) {
|
|
1002
|
+
const ret = getObject(arg0);
|
|
1003
|
+
return addHeapObject(ret);
|
|
1004
|
+
},
|
|
265
1005
|
__wbindgen_object_drop_ref: function(arg0) {
|
|
266
1006
|
takeObject(arg0);
|
|
267
1007
|
},
|
|
@@ -272,9 +1012,24 @@ function __wbg_get_imports() {
|
|
|
272
1012
|
};
|
|
273
1013
|
}
|
|
274
1014
|
|
|
275
|
-
const
|
|
1015
|
+
const AttachedMaterializationAuthorityFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1016
|
+
? { register: () => {}, unregister: () => {} }
|
|
1017
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_attachedmaterializationauthority_free(ptr, 1));
|
|
1018
|
+
const ProgramAttachedRenderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1019
|
+
? { register: () => {}, unregister: () => {} }
|
|
1020
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_programattachedrender_free(ptr, 1));
|
|
1021
|
+
const ProgramAttachedSnapshotFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1022
|
+
? { register: () => {}, unregister: () => {} }
|
|
1023
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_programattachedsnapshot_free(ptr, 1));
|
|
1024
|
+
const ProgramAttachmentFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
276
1025
|
? { register: () => {}, unregister: () => {} }
|
|
277
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1026
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_programattachment_free(ptr, 1));
|
|
1027
|
+
const ProgramRuntimeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1028
|
+
? { register: () => {}, unregister: () => {} }
|
|
1029
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_programruntime_free(ptr, 1));
|
|
1030
|
+
const ProgramSnapshotFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1031
|
+
? { register: () => {}, unregister: () => {} }
|
|
1032
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_programsnapshot_free(ptr, 1));
|
|
278
1033
|
|
|
279
1034
|
function addHeapObject(obj) {
|
|
280
1035
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
@@ -285,15 +1040,21 @@ function addHeapObject(obj) {
|
|
|
285
1040
|
return idx;
|
|
286
1041
|
}
|
|
287
1042
|
|
|
1043
|
+
function addBorrowedObject(obj) {
|
|
1044
|
+
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
1045
|
+
heap[--stack_pointer] = obj;
|
|
1046
|
+
return stack_pointer;
|
|
1047
|
+
}
|
|
1048
|
+
|
|
288
1049
|
function dropObject(idx) {
|
|
289
1050
|
if (idx < 1028) return;
|
|
290
1051
|
heap[idx] = heap_next;
|
|
291
1052
|
heap_next = idx;
|
|
292
1053
|
}
|
|
293
1054
|
|
|
294
|
-
function
|
|
1055
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
295
1056
|
ptr = ptr >>> 0;
|
|
296
|
-
return
|
|
1057
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
297
1058
|
}
|
|
298
1059
|
|
|
299
1060
|
let cachedDataViewMemory0 = null;
|
|
@@ -304,18 +1065,18 @@ function getDataViewMemory0() {
|
|
|
304
1065
|
return cachedDataViewMemory0;
|
|
305
1066
|
}
|
|
306
1067
|
|
|
307
|
-
let cachedFloat64ArrayMemory0 = null;
|
|
308
|
-
function getFloat64ArrayMemory0() {
|
|
309
|
-
if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
|
|
310
|
-
cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
|
|
311
|
-
}
|
|
312
|
-
return cachedFloat64ArrayMemory0;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
1068
|
function getStringFromWasm0(ptr, len) {
|
|
316
1069
|
return decodeText(ptr >>> 0, len);
|
|
317
1070
|
}
|
|
318
1071
|
|
|
1072
|
+
let cachedUint32ArrayMemory0 = null;
|
|
1073
|
+
function getUint32ArrayMemory0() {
|
|
1074
|
+
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
1075
|
+
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
1076
|
+
}
|
|
1077
|
+
return cachedUint32ArrayMemory0;
|
|
1078
|
+
}
|
|
1079
|
+
|
|
319
1080
|
let cachedUint8ArrayMemory0 = null;
|
|
320
1081
|
function getUint8ArrayMemory0() {
|
|
321
1082
|
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
@@ -330,7 +1091,7 @@ function handleError(f, args) {
|
|
|
330
1091
|
try {
|
|
331
1092
|
return f.apply(this, args);
|
|
332
1093
|
} catch (e) {
|
|
333
|
-
wasm.
|
|
1094
|
+
wasm.__wbindgen_export(addHeapObject(e));
|
|
334
1095
|
}
|
|
335
1096
|
}
|
|
336
1097
|
|
|
@@ -343,13 +1104,17 @@ function isLikeNone(x) {
|
|
|
343
1104
|
return x === undefined || x === null;
|
|
344
1105
|
}
|
|
345
1106
|
|
|
346
|
-
function
|
|
347
|
-
const ptr = malloc(
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
1107
|
+
function passArray32ToWasm0(arg, malloc) {
|
|
1108
|
+
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
1109
|
+
getUint32ArrayMemory0().set(arg, ptr / 4);
|
|
1110
|
+
WASM_VECTOR_LEN = arg.length;
|
|
1111
|
+
return ptr;
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
1115
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
1116
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
1117
|
+
WASM_VECTOR_LEN = arg.length;
|
|
353
1118
|
return ptr;
|
|
354
1119
|
}
|
|
355
1120
|
|
|
@@ -390,6 +1155,8 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
390
1155
|
return ptr;
|
|
391
1156
|
}
|
|
392
1157
|
|
|
1158
|
+
let stack_pointer = 1024;
|
|
1159
|
+
|
|
393
1160
|
function takeObject(idx) {
|
|
394
1161
|
const ret = getObject(idx);
|
|
395
1162
|
dropObject(idx);
|
|
@@ -431,7 +1198,7 @@ function __wbg_finalize_init(instance, module) {
|
|
|
431
1198
|
wasm = instance.exports;
|
|
432
1199
|
wasmModule = module;
|
|
433
1200
|
cachedDataViewMemory0 = null;
|
|
434
|
-
|
|
1201
|
+
cachedUint32ArrayMemory0 = null;
|
|
435
1202
|
cachedUint8ArrayMemory0 = null;
|
|
436
1203
|
return wasm;
|
|
437
1204
|
}
|