@vscode/editor-view 0.0.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/LICENSE +41 -0
- package/README.md +3 -0
- package/SECURITY.md +14 -0
- package/dist/editor_view_wasm_bg-Bn_d_uyf.wasm +0 -0
- package/dist/index.d.ts +700 -0
- package/dist/index.js +5 -0
- package/package.json +45 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
MICROSOFT SOFTWARE LICENSE TERMS
|
|
2
|
+
MICROSOFT EDITOR VIEW (@vscode/editor-view)
|
|
3
|
+
|
|
4
|
+
These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. They apply to the software named above. The terms also apply to any Microsoft services or updates for the software, except to the extent those have different terms.
|
|
5
|
+
|
|
6
|
+
IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE RIGHTS BELOW.
|
|
7
|
+
|
|
8
|
+
1. INSTALLATION AND USE RIGHTS. You may install and use any number of copies of the software only with Microsoft Visual Studio, Visual Studio for Mac, Visual Studio Code, Azure DevOps, Team Foundation Server, Code Spaces and successor Microsoft products and services (collectively, the "Visual Studio Products and Services") to develop and test your applications.
|
|
9
|
+
|
|
10
|
+
2. TERMS FOR SPECIFIC COMPONENTS. The software may include third party components with separate legal notices or governed by other agreements, as may be described in the notices file(s) accompanying the software.
|
|
11
|
+
|
|
12
|
+
3. SCOPE OF LICENSE. The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not
|
|
13
|
+
* work around any technical limitations in the software;
|
|
14
|
+
* reverse engineer, decompile or disassemble the software, or otherwise attempt to derive the source code for the software except, and only to the extent required by third party licensing terms governing the use of certain open source components that may be included in the software;
|
|
15
|
+
* remove, minimize, block or modify any notices of Microsoft or its suppliers in the software;
|
|
16
|
+
* use the software in any way that is against the law;
|
|
17
|
+
* share, publish, rent or lease the software; or
|
|
18
|
+
* provide the software as a stand-alone offering or combined with any of your applications for others to use, or transfer the software or this agreement to any third party.
|
|
19
|
+
|
|
20
|
+
4. EXPORT RESTRICTIONS. You must comply with all domestic and international export laws and regulations that apply to the software, which include restrictions on destinations, end users, and end use. For further information on export restrictions, visit www.microsoft.com/exporting.
|
|
21
|
+
|
|
22
|
+
5. SUPPORT SERVICES. Because this software is "as is," we may not provide support services for it.
|
|
23
|
+
|
|
24
|
+
6. ENTIRE AGREEMENT. This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.
|
|
25
|
+
|
|
26
|
+
7. APPLICABLE LAW. If you acquired the software in the United States, Washington law applies to interpretation of and claims for breach of this agreement, and the laws of the state where you live apply to all other claims. If you acquired the software in any other country, its laws apply.
|
|
27
|
+
|
|
28
|
+
8. CONSUMER RIGHTS; REGIONAL VARIATIONS. This agreement describes certain legal rights. You may have other rights, including consumer rights, under the laws of your state or country. Separate and apart from your relationship with Microsoft, you may also have rights with respect to the party from which you acquired the software. This agreement does not change those other rights if the laws of your state or country do not permit it to do so. For example, if you acquired the software in one of the below regions, or mandatory country law applies, then the following provisions apply to you:
|
|
29
|
+
a. Australia. You have statutory guarantees under the Australian Consumer Law and nothing in this agreement is intended to affect those rights.
|
|
30
|
+
|
|
31
|
+
b. Canada. If you acquired this software in Canada, you may stop receiving updates by turning off the automatic update feature, disconnecting your device from the Internet (if and when you re-connect to the Internet, however, the software will resume checking for and installing updates), or uninstalling the software. The product documentation, if any, may also specify how to turn off updates for your specific device or software.
|
|
32
|
+
|
|
33
|
+
c. Germany and Austria.
|
|
34
|
+
(i) Warranty. The properly licensed software will perform substantially as described in any Microsoft materials that accompany the software. However, Microsoft gives no contractual guarantee in relation to the licensed software.
|
|
35
|
+
(ii) Limitation of Liability. In case of intentional conduct, gross negligence, claims based on the Product Liability Act, as well as, in case of death or personal or physical injury, Microsoft is liable according to the statutory law.
|
|
36
|
+
Subject to the foregoing clause (ii), Microsoft will only be liable for slight negligence if Microsoft is in breach of such material contractual obligations, the fulfillment of which facilitate the due performance of this agreement, the breach of which would endanger the purpose of this agreement and the compliance with which a party may constantly trust in (so-called "cardinal obligations"). In other cases of slight negligence, Microsoft will not be liable for slight negligence.
|
|
37
|
+
|
|
38
|
+
9. DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED "AS-IS." YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
|
39
|
+
10. LIMITATION ON AND EXCLUSION OF DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.
|
|
40
|
+
This limitation applies to (a) anything related to the software, services, content (including code) on third party Internet sites, or third party applications; and (b) claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.
|
|
41
|
+
It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.
|
package/README.md
ADDED
package/SECURITY.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!-- BEGIN MICROSOFT SECURITY.MD V1.0.0 BLOCK -->
|
|
2
|
+
|
|
3
|
+
## Security
|
|
4
|
+
|
|
5
|
+
Microsoft takes the security of our software products and services seriously, which
|
|
6
|
+
includes all source code repositories in our GitHub organizations.
|
|
7
|
+
|
|
8
|
+
**Please do not report security vulnerabilities through public GitHub issues.**
|
|
9
|
+
|
|
10
|
+
For security reporting information, locations, contact information, and policies,
|
|
11
|
+
please review the latest guidance for Microsoft repositories at
|
|
12
|
+
[https://aka.ms/SECURITY.md](https://aka.ms/SECURITY.md).
|
|
13
|
+
|
|
14
|
+
<!-- END MICROSOFT SECURITY.MD BLOCK -->
|
|
Binary file
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,700 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the Microsoft Software License Terms. See LICENSE in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/**
|
|
6
|
+
* Public TypeScript types for `@vscode/editor-view`.
|
|
7
|
+
*
|
|
8
|
+
* Colors are packed 32-bit integers `0xRRGGBBAA` to match the Rust core's
|
|
9
|
+
* `Rgba::from_rgba8`.
|
|
10
|
+
*/
|
|
11
|
+
/** Packed `0xRRGGBBAA` color. */
|
|
12
|
+
type PackedColor = number;
|
|
13
|
+
interface EditorViewConfig {
|
|
14
|
+
fontFamily: string;
|
|
15
|
+
fontSize: number;
|
|
16
|
+
lineHeight: number;
|
|
17
|
+
/**
|
|
18
|
+
* Font ascent in CSS px (baseline to top of the font box). When provided
|
|
19
|
+
* (and `> 0`), the renderer positions text with the browser's half-leading
|
|
20
|
+
* model to match the DOM editor exactly. Left unset, {@link EditorView}
|
|
21
|
+
* measures it from `fontFamily`/`fontSize`.
|
|
22
|
+
*/
|
|
23
|
+
fontAscent?: number;
|
|
24
|
+
/** Font descent in CSS px (baseline to bottom of the font box). See {@link EditorViewConfig.fontAscent}. */
|
|
25
|
+
fontDescent?: number;
|
|
26
|
+
fontLigatures?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* CSS-pixel advance of one ASCII cell when the host has verified that the
|
|
29
|
+
* configured font is monospace. Enables exact, allocation-free width
|
|
30
|
+
* calculation for long ASCII lines. Omit for proportional/unverified fonts.
|
|
31
|
+
*/
|
|
32
|
+
monospaceWidth?: number;
|
|
33
|
+
/** Number of columns a tab advances to (tab stop width). Defaults to 4. */
|
|
34
|
+
tabSize?: number;
|
|
35
|
+
/** Number of visual columns per indentation level. Defaults to `tabSize`. */
|
|
36
|
+
indentSize?: number;
|
|
37
|
+
/** Whether indentation guides are painted. Defaults to `false`. */
|
|
38
|
+
indentGuides?: boolean;
|
|
39
|
+
/** Inactive indentation-guide colors, cycled by nesting level. */
|
|
40
|
+
indentGuideColors?: PackedColor[];
|
|
41
|
+
/** Active indentation-guide colors, cycled by nesting level. */
|
|
42
|
+
activeIndentGuideColors?: PackedColor[];
|
|
43
|
+
/** Maximum guide offset from the content left edge in CSS px; `-1` means unlimited. */
|
|
44
|
+
maxIndentGuideOffset?: number;
|
|
45
|
+
/** Which spaces and tabs are visualized. Defaults to `'none'`. */
|
|
46
|
+
renderWhitespace?: RenderWhitespace;
|
|
47
|
+
/** Whitespace-marker color (`editorWhitespace.foreground`). */
|
|
48
|
+
whitespaceColor?: PackedColor;
|
|
49
|
+
/** Glyph used to visualize a space. Defaults to `U+00B7 MIDDLE DOT`. */
|
|
50
|
+
spaceMarker?: string;
|
|
51
|
+
/** Glyph used to visualize a tab. Defaults to `U+2192 RIGHTWARDS ARROW`. */
|
|
52
|
+
tabMarker?: string;
|
|
53
|
+
/** Stop visualizing whitespace after this UTF-16 column; `-1` means unlimited. */
|
|
54
|
+
stopRenderingLineAfter?: number;
|
|
55
|
+
gutterWidth?: number;
|
|
56
|
+
/** X of the line-numbers right edge (`lineNumbersLeft + lineNumbersWidth`); line numbers are right-aligned to it. */
|
|
57
|
+
lineNumbersRight?: number;
|
|
58
|
+
/** X of the folding-control decoration lane in CSS pixels. */
|
|
59
|
+
foldingControlLeft?: number;
|
|
60
|
+
/** Width of the folding-control decoration lane in CSS pixels. */
|
|
61
|
+
foldingControlWidth?: number;
|
|
62
|
+
/** Folding-control color (`editorGutter.foldingControlForeground`). */
|
|
63
|
+
foldingControlForeground?: PackedColor;
|
|
64
|
+
/** CSS font family containing the folding control glyphs. Defaults to `codicon`. */
|
|
65
|
+
foldingControlFontFamily?: string;
|
|
66
|
+
/** Folding-control font size in CSS pixels. Defaults to `fontSize * 1.4`. */
|
|
67
|
+
foldingControlFontSize?: number;
|
|
68
|
+
/** Whether the pointer currently hovers the margin, revealing auto-hide expanded controls. */
|
|
69
|
+
foldingControlsHovered?: boolean;
|
|
70
|
+
background: PackedColor;
|
|
71
|
+
/** Gutter (left margin) background (`editorGutter.background`). Defaults to `background`. */
|
|
72
|
+
gutterBackground?: PackedColor;
|
|
73
|
+
foreground: PackedColor;
|
|
74
|
+
/** Line-number color (`editorLineNumber.foreground`). Defaults to `#858585`. */
|
|
75
|
+
lineNumberForeground?: PackedColor;
|
|
76
|
+
/** Active line-number color (`editorLineNumber.activeForeground`). Defaults to `#c6c6c6`. */
|
|
77
|
+
lineNumberActiveForeground?: PackedColor;
|
|
78
|
+
/** 0-based index of the primary cursor's line; its number uses the active color. */
|
|
79
|
+
activeLine?: number;
|
|
80
|
+
/**
|
|
81
|
+
* Selection ranges (0-based, UTF-16 columns) painted with
|
|
82
|
+
* {@link EditorViewConfig.selectionBackground}. Empty ranges suppress the
|
|
83
|
+
* current-line highlight (matching VS Code) but draw nothing.
|
|
84
|
+
*/
|
|
85
|
+
selections?: SelectionInput[];
|
|
86
|
+
/** Selection highlight color (`editor.selectionBackground`, or the inactive variant when unfocused). */
|
|
87
|
+
selectionBackground?: PackedColor;
|
|
88
|
+
/**
|
|
89
|
+
* Draw selections with 3px rounded corners (VS Code's `roundedSelection`
|
|
90
|
+
* option). Defaults to `true`; pass `false` to keep square corners (e.g. in
|
|
91
|
+
* high-contrast themes, which force the radius off).
|
|
92
|
+
*/
|
|
93
|
+
roundedSelection?: boolean;
|
|
94
|
+
/** Current-line highlight fill (`editor.lineHighlightBackground`). Omit/0 for no fill. */
|
|
95
|
+
lineHighlightBackground?: PackedColor;
|
|
96
|
+
/** Current-line highlight border (`editor.lineHighlightBorder`), drawn as a 2px box. Omit/0 for none. */
|
|
97
|
+
lineHighlightBorder?: PackedColor;
|
|
98
|
+
/**
|
|
99
|
+
* Current-line highlight width in CSS px, normally
|
|
100
|
+
* `max(scrollWidth, contentWidth)`. Omit/`<= 0` to use the visible content
|
|
101
|
+
* width.
|
|
102
|
+
*/
|
|
103
|
+
lineHighlightWidth?: number;
|
|
104
|
+
/** 0-based view lines carrying a cursor, on which the current-line highlight is painted. */
|
|
105
|
+
highlightLines?: number[];
|
|
106
|
+
/** Paint the current-line highlight across the content area (`renderLineHighlight` `line`/`all`, selection empty). */
|
|
107
|
+
highlightContent?: boolean;
|
|
108
|
+
/** Paint the current-line highlight across the gutter/margin (`renderLineHighlight` `gutter`/`all`). */
|
|
109
|
+
highlightMargin?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Text carets painted on top of the content. Blink and focus are the host's
|
|
112
|
+
* responsibility: omit a caret on the frames where it should not show (e.g.
|
|
113
|
+
* blinked off, or the editor is unfocused).
|
|
114
|
+
*/
|
|
115
|
+
cursors?: CursorInput[];
|
|
116
|
+
/** Caret style, shared by every caret (mirrors `cursorStyle`). Defaults to `'line'`. */
|
|
117
|
+
cursorStyle?: CursorStyle;
|
|
118
|
+
/**
|
|
119
|
+
* Width of a line-style caret in CSS px (cap it at
|
|
120
|
+
* `typicalHalfwidthCharacterWidth` on the host). `<= 0` falls back to 2px.
|
|
121
|
+
* Ignored for block/underline styles, which span the character.
|
|
122
|
+
*/
|
|
123
|
+
cursorWidth?: number;
|
|
124
|
+
/** Height of a line-style caret in CSS px; `0`/omitted means the full line height. */
|
|
125
|
+
cursorHeight?: number;
|
|
126
|
+
minimapEnabled?: boolean;
|
|
127
|
+
minimapWidth?: number;
|
|
128
|
+
}
|
|
129
|
+
/** Caret style, matching VS Code's `cursorStyle` string values. */
|
|
130
|
+
type CursorStyle = 'line' | 'line-thin' | 'block' | 'block-outline' | 'underline' | 'underline-thin';
|
|
131
|
+
/** Whitespace visualization mode, matching VS Code's `renderWhitespace` values. */
|
|
132
|
+
type RenderWhitespace = 'none' | 'boundary' | 'selection' | 'trailing' | 'all';
|
|
133
|
+
/** Folding control painted on a view line. */
|
|
134
|
+
type FoldingControlInput = 'expanded' | 'expanded-auto-hide' | 'collapsed';
|
|
135
|
+
/** A text caret at a 0-based `(line, UTF-16 column)`, drawn in `color` (`0xRRGGBBAA`). */
|
|
136
|
+
interface CursorInput {
|
|
137
|
+
line: number;
|
|
138
|
+
column: number;
|
|
139
|
+
color: PackedColor;
|
|
140
|
+
/**
|
|
141
|
+
* Color the character *under* a block (or wide line) caret is redrawn in so
|
|
142
|
+
* it stays legible against the caret fill (`editorCursor.background`, or the
|
|
143
|
+
* caret color's opposite). Ignored by thin line / underline / block-outline
|
|
144
|
+
* carets. Omit/0 to leave the covered glyph as-is.
|
|
145
|
+
*/
|
|
146
|
+
background?: PackedColor;
|
|
147
|
+
}
|
|
148
|
+
/** A selection range in 0-based `(line, UTF-16 column)` coordinates. */
|
|
149
|
+
interface SelectionInput {
|
|
150
|
+
startLine: number;
|
|
151
|
+
startColumn: number;
|
|
152
|
+
endLine: number;
|
|
153
|
+
endColumn: number;
|
|
154
|
+
}
|
|
155
|
+
interface TokenInput {
|
|
156
|
+
startColumn: number;
|
|
157
|
+
endColumn: number;
|
|
158
|
+
foreground: PackedColor;
|
|
159
|
+
bold?: boolean;
|
|
160
|
+
italic?: boolean;
|
|
161
|
+
underline?: boolean;
|
|
162
|
+
strikethrough?: boolean;
|
|
163
|
+
}
|
|
164
|
+
interface LineInput {
|
|
165
|
+
text: string;
|
|
166
|
+
tokens?: TokenInput[];
|
|
167
|
+
/**
|
|
168
|
+
* The gutter (line-number) label for this **view** line. The host owns the
|
|
169
|
+
* view↔model mapping, so it supplies the label per view line: the model line
|
|
170
|
+
* number (as a string) on a model line's first row, and an **empty string**
|
|
171
|
+
* on soft-wrap continuation rows (whose gutter must stay blank). Omit it to
|
|
172
|
+
* let the renderer fall back to the 1-based view-line index.
|
|
173
|
+
*/
|
|
174
|
+
gutterLabel?: string;
|
|
175
|
+
/** Whether this view line is followed by another wrapped row from the same model line. */
|
|
176
|
+
continuesWithWrappedLine?: boolean;
|
|
177
|
+
/** Number of leading UTF-16 columns synthesized by wrapping; markers skip this faux indent. */
|
|
178
|
+
fauxIndentLength?: number;
|
|
179
|
+
/** Number of indentation guides to paint on this view line. */
|
|
180
|
+
indentGuideCount?: number;
|
|
181
|
+
/** 1-based indentation-guide level to highlight on this view line; `0`/omitted means none. */
|
|
182
|
+
activeIndentGuideLevel?: number;
|
|
183
|
+
/** Folding control painted in the gutter for this view line. */
|
|
184
|
+
foldingControl?: FoldingControlInput;
|
|
185
|
+
}
|
|
186
|
+
type DecorationKindInput = {
|
|
187
|
+
kind: 'background';
|
|
188
|
+
color: PackedColor;
|
|
189
|
+
} | {
|
|
190
|
+
kind: 'foreground';
|
|
191
|
+
color: PackedColor;
|
|
192
|
+
} | {
|
|
193
|
+
kind: 'underline';
|
|
194
|
+
color: PackedColor;
|
|
195
|
+
style?: DecorationStrokeStyle;
|
|
196
|
+
/** CSS-pixel stroke width. Defaults to 1. */
|
|
197
|
+
width?: number;
|
|
198
|
+
/** Paint inside the line box; false matches a content-box bottom border. */
|
|
199
|
+
inside?: boolean;
|
|
200
|
+
} | {
|
|
201
|
+
kind: 'border';
|
|
202
|
+
color: PackedColor;
|
|
203
|
+
style?: Exclude<DecorationStrokeStyle, 'wavy'>;
|
|
204
|
+
/** CSS-pixel border width. Defaults to 1. */
|
|
205
|
+
width?: number;
|
|
206
|
+
};
|
|
207
|
+
type DecorationStrokeStyle = 'solid' | 'dotted' | 'dashed' | 'wavy';
|
|
208
|
+
interface DecorationInput {
|
|
209
|
+
id: number;
|
|
210
|
+
/**
|
|
211
|
+
* Stable host style identifier. Decorations with the same style id and paint
|
|
212
|
+
* can be merged in Rust; ids also provide deterministic ordering within a
|
|
213
|
+
* z-index, matching the host's class ordering.
|
|
214
|
+
*/
|
|
215
|
+
styleId?: number;
|
|
216
|
+
zIndex?: number;
|
|
217
|
+
startLine: number;
|
|
218
|
+
startColumn: number;
|
|
219
|
+
endLine: number;
|
|
220
|
+
endColumn: number;
|
|
221
|
+
wholeLine?: boolean;
|
|
222
|
+
fillLineBreak?: boolean;
|
|
223
|
+
includeNewLines?: boolean;
|
|
224
|
+
showIfCollapsed?: boolean;
|
|
225
|
+
kind: DecorationKindInput;
|
|
226
|
+
}
|
|
227
|
+
interface DecorationRangeInput {
|
|
228
|
+
startLine: number;
|
|
229
|
+
startColumn: number;
|
|
230
|
+
endLine: number;
|
|
231
|
+
endColumn: number;
|
|
232
|
+
includeNewLines?: boolean;
|
|
233
|
+
}
|
|
234
|
+
interface DecorationLineRange {
|
|
235
|
+
line: number;
|
|
236
|
+
left: number;
|
|
237
|
+
width: number;
|
|
238
|
+
continuesOnNextLine: boolean;
|
|
239
|
+
}
|
|
240
|
+
type ModelDeltaInput = {
|
|
241
|
+
type: 'replaceLines';
|
|
242
|
+
start: number;
|
|
243
|
+
deleteCount: number;
|
|
244
|
+
insert: LineInput[];
|
|
245
|
+
} | {
|
|
246
|
+
type: 'setTokens';
|
|
247
|
+
line: number;
|
|
248
|
+
tokens: TokenInput[];
|
|
249
|
+
} | {
|
|
250
|
+
type: 'setIndentGuides';
|
|
251
|
+
start: number;
|
|
252
|
+
counts: number[];
|
|
253
|
+
activeLevels?: number[];
|
|
254
|
+
} | {
|
|
255
|
+
type: 'setFoldingControls';
|
|
256
|
+
controls: (FoldingControlInput | null)[];
|
|
257
|
+
} | {
|
|
258
|
+
type: 'setDecorations';
|
|
259
|
+
decorations: DecorationInput[];
|
|
260
|
+
} | {
|
|
261
|
+
type: 'upsertDecoration';
|
|
262
|
+
decoration: DecorationInput;
|
|
263
|
+
} | {
|
|
264
|
+
type: 'removeDecoration';
|
|
265
|
+
id: number;
|
|
266
|
+
};
|
|
267
|
+
interface Position {
|
|
268
|
+
line: number;
|
|
269
|
+
column: number;
|
|
270
|
+
}
|
|
271
|
+
/** Description of a run to rasterize, passed to a {@link RasterProvider}. */
|
|
272
|
+
interface RasterRequest {
|
|
273
|
+
text: string;
|
|
274
|
+
cssFont: string;
|
|
275
|
+
fontFeatures: string;
|
|
276
|
+
direction: 'ltr' | 'rtl';
|
|
277
|
+
deviceFontPx: number;
|
|
278
|
+
subpixelBucketX: number;
|
|
279
|
+
/** Horizontal sub-pixel draw offset in device px (`bucketX / PHASE_BUCKETS`, in `[0, 1)`). */
|
|
280
|
+
subpixelOffsetX?: number;
|
|
281
|
+
}
|
|
282
|
+
/** Placement metrics shared by CPU-pixel and external-image raster results. */
|
|
283
|
+
interface RasterResultMetrics {
|
|
284
|
+
width: number;
|
|
285
|
+
height: number;
|
|
286
|
+
bearingX: number;
|
|
287
|
+
bearingY: number;
|
|
288
|
+
advance: number;
|
|
289
|
+
format: 'a8' | 'rgba8';
|
|
290
|
+
}
|
|
291
|
+
/** The pixels + metrics of a rasterized run. */
|
|
292
|
+
type RasterResult = RasterResultMetrics & ({
|
|
293
|
+
/** Tightly packed A8 or RGBA8 pixels copied through the WASM core. */
|
|
294
|
+
pixels: Uint8Array;
|
|
295
|
+
imageBitmap?: never;
|
|
296
|
+
} | {
|
|
297
|
+
/** Browser-owned RGBA source uploaded directly with `copyExternalImageToTexture`. */
|
|
298
|
+
imageBitmap: ImageBitmap;
|
|
299
|
+
pixels?: never;
|
|
300
|
+
});
|
|
301
|
+
/**
|
|
302
|
+
* Rasterizes runs into glyph pixels. The default is
|
|
303
|
+
* {@link BrowserCanvasRasterProvider}; hosts may supply their own (e.g. a
|
|
304
|
+
* prebaked provider in tests). Returning `null`/`undefined` skips the run this
|
|
305
|
+
* frame (for async providers).
|
|
306
|
+
*
|
|
307
|
+
* Providers that own resources (e.g. a scratch `<canvas>` attached to the DOM)
|
|
308
|
+
* may expose an optional {@link RasterProvider.dispose} hook; {@link EditorView}
|
|
309
|
+
* calls it when the view is disposed so those resources don't leak.
|
|
310
|
+
*/
|
|
311
|
+
interface RasterProvider {
|
|
312
|
+
(req: RasterRequest): RasterResult | null | undefined;
|
|
313
|
+
/** Measure horizontal advance in CSS pixels without producing glyph pixels. */
|
|
314
|
+
measure?(req: RasterRequest): number | null | undefined;
|
|
315
|
+
/**
|
|
316
|
+
* Select direct `ImageBitmap` uploads when the renderer supports them.
|
|
317
|
+
* The view enables this only for the browser WebGPU backend.
|
|
318
|
+
*/
|
|
319
|
+
setExternalImageUploadEnabled?(enabled: boolean): void;
|
|
320
|
+
/** Release any resources held by the provider (called on view disposal). */
|
|
321
|
+
dispose?(): void;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* The production glyph rasterizer: draws runs with a scratch 2D canvas and
|
|
326
|
+
* hands the coverage mask to the WASM core.
|
|
327
|
+
*
|
|
328
|
+
* This inherits the platform's font rendering, fallback, ligatures and complex
|
|
329
|
+
* script shaping for free. Runs are rasterized at *device* resolution (the
|
|
330
|
+
* core embeds `deviceFontPx` in the request); the coverage lives in the alpha
|
|
331
|
+
* channel and is returned as an A8 mask, tinted per-token in the GPU shader.
|
|
332
|
+
*
|
|
333
|
+
* ## Font smoothing (matching the DOM editor)
|
|
334
|
+
*
|
|
335
|
+
* VS Code's workbench applies `-webkit-font-smoothing: antialiased` /
|
|
336
|
+
* `-moz-osx-font-smoothing: grayscale` to all editor text on macOS (see
|
|
337
|
+
* `workbench/browser/media/style.css` -> `.monaco-font-aliasing-*`), so the DOM
|
|
338
|
+
* `ViewLines` render *grayscale-antialiased* glyphs with no stem-darkening. An
|
|
339
|
+
* `OffscreenCanvas` -- which cannot receive CSS -- instead rasterizes with the
|
|
340
|
+
* OS default (heavier, "font-smoothed") glyphs, which made our GPU text look
|
|
341
|
+
* noticeably **bolder** than the DOM at the same font size. To match, we draw
|
|
342
|
+
* into a real (off-screen) `HTMLCanvasElement` carrying the same
|
|
343
|
+
* `-webkit-font-smoothing` the DOM uses -- Chromium honors the element's
|
|
344
|
+
* computed style when rasterizing `fillText` (verified: ~22% less coverage,
|
|
345
|
+
* matching the DOM). We fall back to `OffscreenCanvas` when there's no
|
|
346
|
+
* `document` (e.g. a worker), where the CSS can't apply anyway.
|
|
347
|
+
*
|
|
348
|
+
* On browser WebGPU, the view enables an `ImageBitmap` result path so glyph
|
|
349
|
+
* pixels stay browser-owned through `GPUQueue.copyExternalImageToTexture`.
|
|
350
|
+
* Headless and WebGL renderers keep the synchronous `getImageData` fallback,
|
|
351
|
+
* emitting A8 for monochrome runs and premultiplied RGBA8 for color glyphs.
|
|
352
|
+
*/
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* How to smooth glyph edges, mirroring the DOM editor's `-webkit-font-smoothing`
|
|
356
|
+
* (`font-smooth`) so GPU glyphs have the same weight as `ViewLines`.
|
|
357
|
+
*
|
|
358
|
+
* - `'auto'` (default): mirror VS Code's default -- `'antialiased'` on macOS
|
|
359
|
+
* (grayscale, no stem-darkening), the browser/OS default elsewhere (VS Code's
|
|
360
|
+
* font-aliasing CSS is `.mac`-scoped, so non-mac DOM text uses the default and
|
|
361
|
+
* already matches an `OffscreenCanvas`).
|
|
362
|
+
* - `'antialiased'` / `'none'` / `'subpixel-antialiased'`: force a specific
|
|
363
|
+
* `-webkit-font-smoothing` value (e.g. from `workbench.fontAliasing`).
|
|
364
|
+
* - `'default'`: don't set the property (OS default).
|
|
365
|
+
*/
|
|
366
|
+
type CanvasFontSmoothing = 'auto' | 'antialiased' | 'subpixel-antialiased' | 'none' | 'default';
|
|
367
|
+
interface BrowserCanvasRasterProviderOptions {
|
|
368
|
+
/** See {@link CanvasFontSmoothing}. Defaults to `'auto'`. */
|
|
369
|
+
fontSmoothing?: CanvasFontSmoothing;
|
|
370
|
+
}
|
|
371
|
+
declare function createBrowserCanvasRasterProvider(options?: BrowserCanvasRasterProviderOptions): RasterProvider;
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* High-level, ergonomic entry point for `@vscode/editor-view`.
|
|
375
|
+
*
|
|
376
|
+
* Wires together the WASM retained-model handle, a {@link RasterProvider}
|
|
377
|
+
* (defaulting to the browser canvas rasterizer), and — when a canvas is
|
|
378
|
+
* provided — a GPU {@link WebRenderer}. The core is thread-agnostic: pass a
|
|
379
|
+
* `HTMLCanvasElement` for main-thread rendering or an `OffscreenCanvas`
|
|
380
|
+
* (transferred to a worker) for off-main-thread rendering.
|
|
381
|
+
*/
|
|
382
|
+
|
|
383
|
+
interface CreateEditorViewOptions {
|
|
384
|
+
config: EditorViewConfig;
|
|
385
|
+
/** Override the glyph rasterizer. Defaults to the browser canvas provider. */
|
|
386
|
+
rasterProvider?: RasterProvider;
|
|
387
|
+
/**
|
|
388
|
+
* Glyph anti-aliasing for the default browser rasterizer, mirroring the DOM
|
|
389
|
+
* editor's `-webkit-font-smoothing`. Defaults to `'auto'` (VS Code's default:
|
|
390
|
+
* `'antialiased'` on macOS). Pass VS Code's `workbench.fontAliasing` here so
|
|
391
|
+
* GPU glyphs match `ViewLines` weight. Ignored when `rasterProvider` is set.
|
|
392
|
+
*/
|
|
393
|
+
fontSmoothing?: CanvasFontSmoothing;
|
|
394
|
+
}
|
|
395
|
+
interface AttachCanvasOptions extends CreateEditorViewOptions {
|
|
396
|
+
/** Backing store size in physical pixels. */
|
|
397
|
+
width: number;
|
|
398
|
+
height: number;
|
|
399
|
+
}
|
|
400
|
+
declare class EditorView {
|
|
401
|
+
private readonly wasm;
|
|
402
|
+
private readonly handle;
|
|
403
|
+
private renderer;
|
|
404
|
+
private readonly raster;
|
|
405
|
+
private disposed;
|
|
406
|
+
private attachmentGeneration;
|
|
407
|
+
private surface;
|
|
408
|
+
private constructor();
|
|
409
|
+
/**
|
|
410
|
+
* Create a headless view (no GPU surface). Useful for layout/measurement or
|
|
411
|
+
* driving a custom renderer. Call {@link EditorView.attachCanvas} to add GPU
|
|
412
|
+
* rendering later, or use {@link EditorView.create} directly with a canvas.
|
|
413
|
+
*/
|
|
414
|
+
static createHeadless(options: CreateEditorViewOptions): Promise<EditorView>;
|
|
415
|
+
/**
|
|
416
|
+
* Create a view bound to a canvas and initialize the GPU renderer
|
|
417
|
+
* (WebGPU-first, WebGL2 fallback).
|
|
418
|
+
*/
|
|
419
|
+
static create(canvas: HTMLCanvasElement | OffscreenCanvas, options: AttachCanvasOptions): Promise<EditorView>;
|
|
420
|
+
/**
|
|
421
|
+
* Attach (or replace) the GPU surface. The latest request wins; superseded
|
|
422
|
+
* requests and requests completing after disposal reject and release their
|
|
423
|
+
* acquired renderer. The current renderer remains active until replacement.
|
|
424
|
+
* Committing a renderer rebuilds glyph placements, preserving retained editor
|
|
425
|
+
* state and measured advances.
|
|
426
|
+
*/
|
|
427
|
+
attachCanvas(canvas: HTMLCanvasElement | OffscreenCanvas, width: number, height: number): Promise<void>;
|
|
428
|
+
private restoreSurface;
|
|
429
|
+
private checkAttachment;
|
|
430
|
+
/** The active GPU backend, e.g. `"BrowserWebGpu"` or `"Gl"`. */
|
|
431
|
+
get backend(): string | undefined;
|
|
432
|
+
setLines(lines: LineInput[]): void;
|
|
433
|
+
applyDelta(delta: ModelDeltaInput): void;
|
|
434
|
+
upsertDecoration(decoration: DecorationInput): void;
|
|
435
|
+
/** Replace the retained decoration set in one coarse-grained WASM call. */
|
|
436
|
+
setDecorations(decorations: DecorationInput[]): void;
|
|
437
|
+
/**
|
|
438
|
+
* Measure many decoration ranges in one WASM call. Geometry traversal remains
|
|
439
|
+
* in Rust; hosts can use the result to position DOM-only fallback paint.
|
|
440
|
+
*/
|
|
441
|
+
decorationRanges(ranges: DecorationRangeInput[]): DecorationLineRange[][];
|
|
442
|
+
setConfig(config: EditorViewConfig): void;
|
|
443
|
+
setViewport(opts: {
|
|
444
|
+
width: number;
|
|
445
|
+
height: number;
|
|
446
|
+
scrollTop?: number;
|
|
447
|
+
scrollLeft?: number;
|
|
448
|
+
devicePixelRatio?: number;
|
|
449
|
+
}): void;
|
|
450
|
+
contentHeight(): number;
|
|
451
|
+
/**
|
|
452
|
+
* Maximum full-line width in CSS px across an inclusive **0-based** line range
|
|
453
|
+
* `[startLine, endLine]` (clamped to the document), measured with the real
|
|
454
|
+
* glyph advances the renderer uses. The host uses this to size the horizontal
|
|
455
|
+
* scroll extent instead of a monospace `columns × typicalCharWidth` estimate.
|
|
456
|
+
*/
|
|
457
|
+
maxLineWidth(startLine: number, endLine: number): number;
|
|
458
|
+
/**
|
|
459
|
+
* Horizontal offset in CSS px (from the text-left origin) of a **0-based**
|
|
460
|
+
* `column` on a **0-based** `lineIndex`, measured with real glyph advances.
|
|
461
|
+
* Columns past end-of-line clamp to the line's full width; out-of-range lines
|
|
462
|
+
* return `0`. The host uses this for horizontal reveal / caret x.
|
|
463
|
+
*/
|
|
464
|
+
columnOffset(lineIndex: number, column: number): number;
|
|
465
|
+
/**
|
|
466
|
+
* Nearest scalar-safe UTF-16 column to a horizontal offset in CSS px from the
|
|
467
|
+
* text-left origin. Search and glyph traversal execute in Rust/WASM.
|
|
468
|
+
*/
|
|
469
|
+
columnAtOffset(lineIndex: number, offset: number): number | undefined;
|
|
470
|
+
hitTest(x: number, y: number): Position | undefined;
|
|
471
|
+
/**
|
|
472
|
+
* Build the current frame's scene and return primitive counts. A GPU-free
|
|
473
|
+
* hook for tests and diagnostics.
|
|
474
|
+
*/
|
|
475
|
+
buildSceneStats(): {
|
|
476
|
+
quads: number;
|
|
477
|
+
glyphs: number;
|
|
478
|
+
overlayQuads: number;
|
|
479
|
+
overlayGlyphs: number;
|
|
480
|
+
};
|
|
481
|
+
/** Resize the GPU surface (physical pixels). */
|
|
482
|
+
resize(width: number, height: number): void;
|
|
483
|
+
/**
|
|
484
|
+
* Render one frame. Returns `true` if presented, `false` if the surface was
|
|
485
|
+
* unavailable this tick. Throws if no canvas is attached.
|
|
486
|
+
*/
|
|
487
|
+
render(): boolean;
|
|
488
|
+
dispose(): void;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/* tslint:disable */
|
|
492
|
+
/* eslint-disable */
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* The JS-facing editor view: owns the retained model, config, viewport and
|
|
496
|
+
* glyph atlas. GPU rendering is attached separately (see [`WebRenderer`]).
|
|
497
|
+
*/
|
|
498
|
+
declare class EditorViewHandle {
|
|
499
|
+
free(): void;
|
|
500
|
+
[Symbol.dispose](): void;
|
|
501
|
+
/**
|
|
502
|
+
* Apply a single incremental delta (see `convert::delta_from_js`).
|
|
503
|
+
*/
|
|
504
|
+
applyDelta(delta: any): void;
|
|
505
|
+
/**
|
|
506
|
+
* Number of glyphs laid out for the current frame — a lightweight hook for
|
|
507
|
+
* tests/diagnostics that don't have a GPU surface.
|
|
508
|
+
*/
|
|
509
|
+
buildSceneStats(): any;
|
|
510
|
+
/**
|
|
511
|
+
* Nearest scalar-safe UTF-16 column to a horizontal text offset in CSS px.
|
|
512
|
+
*/
|
|
513
|
+
columnAtOffset(line_index: number, offset: number): number | undefined;
|
|
514
|
+
/**
|
|
515
|
+
* Horizontal offset (CSS px, from the text-left origin) of a 0-based
|
|
516
|
+
* `column` on the 0-based `line_index`, measured with real glyph advances.
|
|
517
|
+
* Used by the host for horizontal reveal / caret x positioning.
|
|
518
|
+
*/
|
|
519
|
+
columnOffset(line_index: number, column: number): number;
|
|
520
|
+
/**
|
|
521
|
+
* Total scrollable content height in CSS px.
|
|
522
|
+
*/
|
|
523
|
+
contentHeight(): number;
|
|
524
|
+
/**
|
|
525
|
+
* Measure many decoration ranges in one coarse-grained WASM call.
|
|
526
|
+
*/
|
|
527
|
+
decorationRanges(ranges: any): any;
|
|
528
|
+
/**
|
|
529
|
+
* Map a canvas pixel to `{ line, column }`, or `undefined` if empty.
|
|
530
|
+
*/
|
|
531
|
+
hitTest(x: number, y: number): any;
|
|
532
|
+
/**
|
|
533
|
+
* Maximum full-line width (CSS px) across the inclusive 0-based line range
|
|
534
|
+
* `[start_line, end_line]`, measured with real glyph advances. Used by the
|
|
535
|
+
* host to size the horizontal scroll extent (`scrollWidth`).
|
|
536
|
+
*/
|
|
537
|
+
maxLineWidth(start_line: number, end_line: number): number;
|
|
538
|
+
/**
|
|
539
|
+
* Create a view from a config object (see `convert::config_from_js`) and a
|
|
540
|
+
* JS rasterizer callback `(key) => { width, height, bearingX, bearingY,
|
|
541
|
+
* advance, format, pixels }`.
|
|
542
|
+
*/
|
|
543
|
+
constructor(config: any, rasterize: Function);
|
|
544
|
+
/**
|
|
545
|
+
* Prepare for a fresh GPU compositor without changing retained editor state
|
|
546
|
+
* or measured advances. Call only when committing a new renderer.
|
|
547
|
+
*/
|
|
548
|
+
resetRasterPlacements(): void;
|
|
549
|
+
/**
|
|
550
|
+
* Update the rendering configuration / theme.
|
|
551
|
+
*/
|
|
552
|
+
setConfig(config: any): void;
|
|
553
|
+
/**
|
|
554
|
+
* Replace the whole document with an array of `{ text, tokens? }` lines.
|
|
555
|
+
*/
|
|
556
|
+
setLines(lines: any): void;
|
|
557
|
+
/**
|
|
558
|
+
* Update the viewport (size, scroll, DPR).
|
|
559
|
+
*/
|
|
560
|
+
setViewport(width: number, height: number, scroll_top: number, scroll_left: number, device_pixel_ratio: number): void;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* A GPU-backed renderer bound to a canvas surface.
|
|
565
|
+
*/
|
|
566
|
+
declare class WebRenderer {
|
|
567
|
+
private constructor();
|
|
568
|
+
free(): void;
|
|
569
|
+
[Symbol.dispose](): void;
|
|
570
|
+
/**
|
|
571
|
+
* Create a renderer for an `HTMLCanvasElement`.
|
|
572
|
+
*
|
|
573
|
+
* Async because adapter/device acquisition is async in the browser.
|
|
574
|
+
*/
|
|
575
|
+
static createForCanvas(canvas: HTMLCanvasElement, width: number, height: number): Promise<WebRenderer>;
|
|
576
|
+
/**
|
|
577
|
+
* Create a renderer for an `OffscreenCanvas` (worker rendering path).
|
|
578
|
+
*/
|
|
579
|
+
static createForOffscreenCanvas(canvas: OffscreenCanvas, width: number, height: number): Promise<WebRenderer>;
|
|
580
|
+
/**
|
|
581
|
+
* Build the current scene from `view` and render one frame.
|
|
582
|
+
*
|
|
583
|
+
* Returns `true` if a frame was presented, `false` if the surface texture
|
|
584
|
+
* was unavailable this tick (timeout/occluded/outdated — caller may retry).
|
|
585
|
+
*/
|
|
586
|
+
render(view: EditorViewHandle): boolean;
|
|
587
|
+
/**
|
|
588
|
+
* Resize the surface (physical pixels).
|
|
589
|
+
*/
|
|
590
|
+
resize(width: number, height: number): void;
|
|
591
|
+
/**
|
|
592
|
+
* The active backend name (e.g. `"BrowserWebGpu"`, `"Gl"`).
|
|
593
|
+
*/
|
|
594
|
+
readonly backend: string;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* Initialize panic hook + logging. Safe to call multiple times.
|
|
599
|
+
*/
|
|
600
|
+
declare function start(): void;
|
|
601
|
+
|
|
602
|
+
type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
603
|
+
|
|
604
|
+
interface InitOutput {
|
|
605
|
+
readonly memory: WebAssembly.Memory;
|
|
606
|
+
readonly __wbg_editorviewhandle_free: (a: number, b: number) => void;
|
|
607
|
+
readonly __wbg_webrenderer_free: (a: number, b: number) => void;
|
|
608
|
+
readonly editorviewhandle_applyDelta: (a: number, b: any) => [number, number];
|
|
609
|
+
readonly editorviewhandle_buildSceneStats: (a: number) => any;
|
|
610
|
+
readonly editorviewhandle_columnAtOffset: (a: number, b: number, c: number) => number;
|
|
611
|
+
readonly editorviewhandle_columnOffset: (a: number, b: number, c: number) => number;
|
|
612
|
+
readonly editorviewhandle_contentHeight: (a: number) => number;
|
|
613
|
+
readonly editorviewhandle_decorationRanges: (a: number, b: any) => [number, number, number];
|
|
614
|
+
readonly editorviewhandle_hitTest: (a: number, b: number, c: number) => any;
|
|
615
|
+
readonly editorviewhandle_maxLineWidth: (a: number, b: number, c: number) => number;
|
|
616
|
+
readonly editorviewhandle_new: (a: any, b: any) => [number, number, number];
|
|
617
|
+
readonly editorviewhandle_resetRasterPlacements: (a: number) => void;
|
|
618
|
+
readonly editorviewhandle_setConfig: (a: number, b: any) => [number, number];
|
|
619
|
+
readonly editorviewhandle_setLines: (a: number, b: any) => [number, number];
|
|
620
|
+
readonly editorviewhandle_setViewport: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
621
|
+
readonly start: () => void;
|
|
622
|
+
readonly webrenderer_backend: (a: number) => [number, number];
|
|
623
|
+
readonly webrenderer_createForCanvas: (a: any, b: number, c: number) => any;
|
|
624
|
+
readonly webrenderer_createForOffscreenCanvas: (a: any, b: number, c: number) => any;
|
|
625
|
+
readonly webrenderer_render: (a: number, b: number) => [number, number, number];
|
|
626
|
+
readonly webrenderer_resize: (a: number, b: number, c: number) => void;
|
|
627
|
+
readonly wasm_bindgen_69c280ee226ac681___convert__closures_____invoke___js_sys_528a3d7b760fa255___Function_fn_wasm_bindgen_69c280ee226ac681___JsValue_____wasm_bindgen_69c280ee226ac681___sys__Undefined___js_sys_528a3d7b760fa255___Function_fn_wasm_bindgen_69c280ee226ac681___JsValue_____wasm_bindgen_69c280ee226ac681___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
|
|
628
|
+
readonly wasm_bindgen_69c280ee226ac681___convert__closures_____invoke___wasm_bindgen_69c280ee226ac681___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_69c280ee226ac681___JsError___true_: (a: number, b: number, c: any) => [number, number];
|
|
629
|
+
readonly wasm_bindgen_69c280ee226ac681___convert__closures_____invoke___wasm_bindgen_69c280ee226ac681___sys__JsNullable_wgpu_c689e10bd176567e___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_ed718c3d60ebd546___result__Result_____wasm_bindgen_69c280ee226ac681___JsError___true_: (a: number, b: number, c: any) => [number, number];
|
|
630
|
+
readonly wasm_bindgen_69c280ee226ac681___convert__closures_____invoke___wasm_bindgen_69c280ee226ac681___sys__JsNullable_wgpu_c689e10bd176567e___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_ed718c3d60ebd546___result__Result_____wasm_bindgen_69c280ee226ac681___JsError___true__22: (a: number, b: number, c: any) => [number, number];
|
|
631
|
+
readonly wasm_bindgen_69c280ee226ac681___convert__closures_____invoke___wasm_bindgen_69c280ee226ac681___sys__JsNullable_wgpu_c689e10bd176567e___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_ed718c3d60ebd546___result__Result_____wasm_bindgen_69c280ee226ac681___JsError___true__23: (a: number, b: number, c: any) => [number, number];
|
|
632
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
633
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
634
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
635
|
+
readonly __externref_table_alloc: () => number;
|
|
636
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
637
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
638
|
+
readonly __wbindgen_destroy_closure: (a: number, b: number) => void;
|
|
639
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
640
|
+
readonly __wbindgen_start: () => void;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
647
|
+
* a precompiled `WebAssembly.Module`.
|
|
648
|
+
*
|
|
649
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
650
|
+
*
|
|
651
|
+
* @returns {InitOutput}
|
|
652
|
+
*/
|
|
653
|
+
declare function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
657
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
658
|
+
*
|
|
659
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
660
|
+
*
|
|
661
|
+
* @returns {Promise<InitOutput>}
|
|
662
|
+
*/
|
|
663
|
+
declare function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|
|
664
|
+
|
|
665
|
+
type wasm_EditorViewHandle = EditorViewHandle;
|
|
666
|
+
declare const wasm_EditorViewHandle: typeof EditorViewHandle;
|
|
667
|
+
type wasm_InitInput = InitInput;
|
|
668
|
+
type wasm_InitOutput = InitOutput;
|
|
669
|
+
type wasm_SyncInitInput = SyncInitInput;
|
|
670
|
+
type wasm_WebRenderer = WebRenderer;
|
|
671
|
+
declare const wasm_WebRenderer: typeof WebRenderer;
|
|
672
|
+
declare const wasm_initSync: typeof initSync;
|
|
673
|
+
declare const wasm_start: typeof start;
|
|
674
|
+
declare namespace wasm {
|
|
675
|
+
export { wasm_EditorViewHandle as EditorViewHandle, wasm_WebRenderer as WebRenderer, __wbg_init as default, wasm_initSync as initSync, wasm_start as start };
|
|
676
|
+
export type { wasm_InitInput as InitInput, wasm_InitOutput as InitOutput, wasm_SyncInitInput as SyncInitInput };
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* WASM module loader.
|
|
681
|
+
*
|
|
682
|
+
* Handles async initialization of the WASM module produced by
|
|
683
|
+
* `npm run build:wasm` (wasm-pack `--target web`).
|
|
684
|
+
*/
|
|
685
|
+
|
|
686
|
+
type WasmModule = typeof wasm;
|
|
687
|
+
/**
|
|
688
|
+
* Initialize the WASM module. Safe to call multiple times — subsequent calls
|
|
689
|
+
* resolve to the same instance. Failed attempts may be retried.
|
|
690
|
+
*/
|
|
691
|
+
declare function initWasm(): Promise<WasmModule>;
|
|
692
|
+
/**
|
|
693
|
+
* Get the initialized WASM module synchronously.
|
|
694
|
+
* @throws if {@link initWasm} has not resolved yet.
|
|
695
|
+
*/
|
|
696
|
+
declare function getWasm(): WasmModule;
|
|
697
|
+
declare function isWasmInitialized(): boolean;
|
|
698
|
+
|
|
699
|
+
export { EditorView, getWasm as _getWasm, initWasm as _initWasm, isWasmInitialized as _isWasmInitialized, createBrowserCanvasRasterProvider };
|
|
700
|
+
export type { AttachCanvasOptions, BrowserCanvasRasterProviderOptions, CanvasFontSmoothing, CreateEditorViewOptions, CursorInput, CursorStyle, DecorationInput, DecorationKindInput, DecorationLineRange, DecorationRangeInput, DecorationStrokeStyle, EditorViewConfig, FoldingControlInput, LineInput, ModelDeltaInput, PackedColor, Position, RasterProvider, RasterRequest, RasterResult, RenderWhitespace, SelectionInput, TokenInput };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the Microsoft Software License Terms. See LICENSE in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
class e{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,k.unregister(this),e}free(){const e=this.__destroy_into_raw();be.__wbg_editorviewhandle_free(e,0)}applyDelta(e){const n=be.editorviewhandle_applyDelta(this.__wbg_ptr,e);if(n[1])throw ce(n[0])}buildSceneStats(){return be.editorviewhandle_buildSceneStats(this.__wbg_ptr)}columnAtOffset(e,n){const t=be.editorviewhandle_columnAtOffset(this.__wbg_ptr,e,n);return t===Number.MAX_SAFE_INTEGER?void 0:t}columnOffset(e,n){return be.editorviewhandle_columnOffset(this.__wbg_ptr,e,n)}contentHeight(){return be.editorviewhandle_contentHeight(this.__wbg_ptr)}decorationRanges(e){const n=be.editorviewhandle_decorationRanges(this.__wbg_ptr,e);if(n[2])throw ce(n[1]);return ce(n[0])}hitTest(e,n){return be.editorviewhandle_hitTest(this.__wbg_ptr,e,n)}maxLineWidth(e,n){return be.editorviewhandle_maxLineWidth(this.__wbg_ptr,e,n)}constructor(e,n){const t=be.editorviewhandle_new(e,n);if(t[2])throw ce(t[1]);return this.__wbg_ptr=t[0],k.register(this,this.__wbg_ptr,this),this}resetRasterPlacements(){be.editorviewhandle_resetRasterPlacements(this.__wbg_ptr)}setConfig(e){const n=be.editorviewhandle_setConfig(this.__wbg_ptr,e);if(n[1])throw ce(n[0])}setLines(e){const n=be.editorviewhandle_setLines(this.__wbg_ptr,e);if(n[1])throw ce(n[0])}setViewport(e,n,t,_,r){be.editorviewhandle_setViewport(this.__wbg_ptr,e,n,t,_,r)}}Symbol.dispose&&(e.prototype[Symbol.dispose]=e.prototype.free);class n{static __wrap(e){const t=Object.create(n.prototype);return t.__wbg_ptr=e,L.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,L.unregister(this),e}free(){const e=this.__destroy_into_raw();be.__wbg_webrenderer_free(e,0)}get backend(){let e,n;try{const t=be.webrenderer_backend(this.__wbg_ptr);return e=t[0],n=t[1],Y(t[0],t[1])}finally{be.__wbindgen_free(e,n,1)}}static createForCanvas(e,n,t){return be.webrenderer_createForCanvas(e,n,t)}static createForOffscreenCanvas(e,n,t){return be.webrenderer_createForOffscreenCanvas(e,n,t)}render(n){!function(e,n){if(!(e instanceof n))throw new Error(`expected instance of ${n.name}`)}(n,e);const t=be.webrenderer_render(this.__wbg_ptr,n.__wbg_ptr);if(t[2])throw ce(t[1]);return 0!==t[0]}resize(e,n){be.webrenderer_resize(this.__wbg_ptr,e,n)}}function t(){be.start()}function _(){const e={__proto__:null,__wbg_Error_67e7344beaa85059:function(e,n){return Error(Y(e,n))},__wbg_Number_c54e7112a3fa7e3e:function(e){return Number(e)},__wbg_String_8564e559799eccda:function(e,n){const t=ae(String(n),be.__wbindgen_malloc,be.__wbindgen_realloc),_=se;$().setInt32(e+4,_,!0),$().setInt32(e+0,t,!0)},__wbg_Window_a2a6c4d665047b14:function(e){return e.Window},__wbg_WorkerGlobalScope_2664448a7c667d67:function(e){return e.WorkerGlobalScope},__wbg___wbindgen_bigint_get_as_i64_b482365c149396c8:function(e,n){const t="bigint"==typeof n?n:void 0;$().setBigInt64(e+8,_e(t)?BigInt(0):t,!0),$().setInt32(e+0,!_e(t),!0)},__wbg___wbindgen_boolean_get_7a12af2b3f899c5a:function(e){const n="boolean"==typeof e?e:void 0;return _e(n)?16777215:n?1:0},__wbg___wbindgen_debug_string_0e68cf47c9cbd9b0:function(e,n){const t=ae(V(n),be.__wbindgen_malloc,be.__wbindgen_realloc),_=se;$().setInt32(e+4,_,!0),$().setInt32(e+0,t,!0)},__wbg___wbindgen_in_50072d4d6e45c193:function(e,n){return e in n},__wbg___wbindgen_is_bigint_60fc0336cb14f5d7:function(e){return"bigint"==typeof e},__wbg___wbindgen_is_function_fcda5e3902d732fe:function(e){return"function"==typeof e},__wbg___wbindgen_is_null_5160b3e381865372:function(e){return null===e},__wbg___wbindgen_is_object_edb6b15aa3afe12e:function(e){return"object"==typeof e&&null!==e},__wbg___wbindgen_is_string_c4f7cb494a2a21f1:function(e){return"string"==typeof e},__wbg___wbindgen_is_undefined_8c687d0b90d5b524:function(e){return void 0===e},__wbg___wbindgen_jsval_eq_9fdcd3c0a860dd3b:function(e,n){return e===n},__wbg___wbindgen_jsval_loose_eq_3c30021c243b64cd:function(e,n){return e==n},__wbg___wbindgen_number_get_1dc732b810cb937c:function(e,n){const t="number"==typeof n?n:void 0;$().setFloat64(e+8,_e(t)?0:t,!0),$().setInt32(e+0,!_e(t),!0)},__wbg___wbindgen_string_get_92ab86bb19cbc12f:function(e,n){const t="string"==typeof n?n:void 0;var _=_e(t)?0:ae(t,be.__wbindgen_malloc,be.__wbindgen_realloc),r=se;$().setInt32(e+4,r,!0),$().setInt32(e+0,_,!0)},__wbg___wbindgen_throw_5d9e815e6fdf150f:function(e,n){throw new Error(Y(e,n))},__wbg__wbg_cb_unref_997e73d32238e655:function(e){e._wbg_cb_unref()},__wbg_activeTexture_79f1f4662ee9ed93:function(e,n){e.activeTexture(n>>>0)},__wbg_activeTexture_e6dac82eb23d9409:function(e,n){e.activeTexture(n>>>0)},__wbg_attachShader_74ecf95efc73ee58:function(e,n,t){e.attachShader(n,t)},__wbg_attachShader_bfb57af27e3c4a25:function(e,n,t){e.attachShader(n,t)},__wbg_beginQuery_8c123fa7e7aec2a4:function(e,n,t){e.beginQuery(n>>>0,t)},__wbg_beginRenderPass_3c53642423af50dc:function(){return te(function(e,n){return e.beginRenderPass(n)},arguments)},__wbg_bindAttribLocation_601c8f14be6021f1:function(e,n,t,_,r){e.bindAttribLocation(n,t>>>0,Y(_,r))},__wbg_bindAttribLocation_f97028966e63a9a0:function(e,n,t,_,r){e.bindAttribLocation(n,t>>>0,Y(_,r))},__wbg_bindBufferRange_34928ebaef37fa71:function(e,n,t,_,r,a){e.bindBufferRange(n>>>0,t>>>0,_,r,a)},__wbg_bindBuffer_24fab2b14c509d6f:function(e,n,t){e.bindBuffer(n>>>0,t)},__wbg_bindBuffer_f1f33e087b91687c:function(e,n,t){e.bindBuffer(n>>>0,t)},__wbg_bindFramebuffer_6c6a9caf742c2cdb:function(e,n,t){e.bindFramebuffer(n>>>0,t)},__wbg_bindFramebuffer_dc00cdd13fca80a8:function(e,n,t){e.bindFramebuffer(n>>>0,t)},__wbg_bindRenderbuffer_27f21bc7608d07e3:function(e,n,t){e.bindRenderbuffer(n>>>0,t)},__wbg_bindRenderbuffer_a5af5373faa4fb14:function(e,n,t){e.bindRenderbuffer(n>>>0,t)},__wbg_bindSampler_06a184f24b4f473a:function(e,n,t){e.bindSampler(n>>>0,t)},__wbg_bindTexture_7858cc136e95ec24:function(e,n,t){e.bindTexture(n>>>0,t)},__wbg_bindTexture_e8a625bf5d240b0f:function(e,n,t){e.bindTexture(n>>>0,t)},__wbg_bindVertexArrayOES_c947f00135eda668:function(e,n){e.bindVertexArrayOES(n)},__wbg_bindVertexArray_4687bb1e8b327fc9:function(e,n){e.bindVertexArray(n)},__wbg_blendColor_25f3208af2a1a86f:function(e,n,t,_,r){e.blendColor(n,t,_,r)},__wbg_blendColor_7b3873c65a61b8a7:function(e,n,t,_,r){e.blendColor(n,t,_,r)},__wbg_blendEquationSeparate_7255a352fb614ccb:function(e,n,t){e.blendEquationSeparate(n>>>0,t>>>0)},__wbg_blendEquationSeparate_a63d5c1a833c1137:function(e,n,t){e.blendEquationSeparate(n>>>0,t>>>0)},__wbg_blendEquation_1636f14afa7d37d0:function(e,n){e.blendEquation(n>>>0)},__wbg_blendEquation_9a5ca6936a9438b3:function(e,n){e.blendEquation(n>>>0)},__wbg_blendFuncSeparate_1afc51f9c96486b2:function(e,n,t,_,r){e.blendFuncSeparate(n>>>0,t>>>0,_>>>0,r>>>0)},__wbg_blendFuncSeparate_222d39ec0d6bb147:function(e,n,t,_,r){e.blendFuncSeparate(n>>>0,t>>>0,_>>>0,r>>>0)},__wbg_blendFunc_041c4d7dc50ac8c9:function(e,n,t){e.blendFunc(n>>>0,t>>>0)},__wbg_blendFunc_ad7d043180d4f86a:function(e,n,t){e.blendFunc(n>>>0,t>>>0)},__wbg_blitFramebuffer_beb217dd67c23446:function(e,n,t,_,r,a,c,i,f,o,u){e.blitFramebuffer(n,t,_,r,a,c,i,f,o>>>0,u>>>0)},__wbg_bufferData_5d0d376bd14d58f3:function(e,n,t,_){e.bufferData(n>>>0,t,_>>>0)},__wbg_bufferData_9ce5cb209386d279:function(e,n,t,_){e.bufferData(n>>>0,t,_>>>0)},__wbg_bufferData_b58d3ee720ef8b13:function(e,n,t,_){e.bufferData(n>>>0,t,_>>>0)},__wbg_bufferData_c074912da5a8e8c2:function(e,n,t,_){e.bufferData(n>>>0,t,_>>>0)},__wbg_bufferSubData_1210904a130da787:function(e,n,t,_){e.bufferSubData(n>>>0,t,_)},__wbg_bufferSubData_bb3556faa77ce63a:function(e,n,t,_){e.bufferSubData(n>>>0,t,_)},__wbg_call_269c5566fbede3eb:function(){return te(function(e,n){return e.call(n)},arguments)},__wbg_call_6bcf8d3e20937e46:function(){return te(function(e,n,t){return e.call(n,t)},arguments)},__wbg_clearBufferfv_5c3233abb46232dd:function(e,n,t,_,r){e.clearBufferfv(n>>>0,t,q(_,r))},__wbg_clearBufferiv_a6017e170f127402:function(e,n,t,_,r){e.clearBufferiv(n>>>0,t,G(_,r))},__wbg_clearBufferuiv_a7ff44fb5a19e886:function(e,n,t,_,r){e.clearBufferuiv(n>>>0,t,U(_,r))},__wbg_clearDepth_a4e9a96e0b87fadb:function(e,n){e.clearDepth(n)},__wbg_clearDepth_ea9081c357d405be:function(e,n){e.clearDepth(n)},__wbg_clearStencil_8c03daa5a936cf97:function(e,n){e.clearStencil(n)},__wbg_clearStencil_bd3508b2e4a055c8:function(e,n){e.clearStencil(n)},__wbg_clear_55f5d5ab26fe80b4:function(e,n){e.clear(n>>>0)},__wbg_clear_faad852996d5b5ca:function(e,n){e.clear(n>>>0)},__wbg_clientWaitSync_1e222800321920a4:function(e,n,t,_){return e.clientWaitSync(n,t>>>0,_>>>0)},__wbg_colorMask_dc6ca7d28d90ca79:function(e,n,t,_,r){e.colorMask(0!==n,0!==t,0!==_,0!==r)},__wbg_colorMask_ee5503a19adab893:function(e,n,t,_,r){e.colorMask(0!==n,0!==t,0!==_,0!==r)},__wbg_compileShader_cabeb4aa8cb42914:function(e,n){e.compileShader(n)},__wbg_compileShader_dada15a718167c7f:function(e,n){e.compileShader(n)},__wbg_compressedTexSubImage2D_08a73ef1b07eadd4:function(e,n,t,_,r,a,c,i,f){e.compressedTexSubImage2D(n>>>0,t,_,r,a,c,i>>>0,f)},__wbg_compressedTexSubImage2D_26483f478d06e5b6:function(e,n,t,_,r,a,c,i,f){e.compressedTexSubImage2D(n>>>0,t,_,r,a,c,i>>>0,f)},__wbg_compressedTexSubImage2D_fd0d06f029b00475:function(e,n,t,_,r,a,c,i,f,o){e.compressedTexSubImage2D(n>>>0,t,_,r,a,c,i>>>0,f,o)},__wbg_compressedTexSubImage3D_916c6fa47a2c6ca4:function(e,n,t,_,r,a,c,i,f,o,u){e.compressedTexSubImage3D(n>>>0,t,_,r,a,c,i,f,o>>>0,u)},__wbg_compressedTexSubImage3D_ca08254972ab7956:function(e,n,t,_,r,a,c,i,f,o,u,b){e.compressedTexSubImage3D(n>>>0,t,_,r,a,c,i,f,o>>>0,u,b)},__wbg_configure_1e2c1c9edad07d26:function(){return te(function(e,n){e.configure(n)},arguments)},__wbg_copyBufferSubData_4649cb7afad601b3:function(e,n,t,_,r,a){e.copyBufferSubData(n>>>0,t>>>0,_,r,a)},__wbg_copyExternalImageToTexture_620bc2dad5487dc0:function(){return te(function(e,n,t,_,r){e.copyExternalImageToTexture(n,t,z(_,r))},arguments)},__wbg_copyTexSubImage2D_b5dc78e744bb31d3:function(e,n,t,_,r,a,c,i,f){e.copyTexSubImage2D(n>>>0,t,_,r,a,c,i,f)},__wbg_copyTexSubImage2D_f1d2043ea68078f1:function(e,n,t,_,r,a,c,i,f){e.copyTexSubImage2D(n>>>0,t,_,r,a,c,i,f)},__wbg_copyTexSubImage3D_a6674efc4225de77:function(e,n,t,_,r,a,c,i,f,o){e.copyTexSubImage3D(n>>>0,t,_,r,a,c,i,f,o)},__wbg_createBindGroupLayout_b1bd63b4e88459d8:function(){return te(function(e,n){return e.createBindGroupLayout(n)},arguments)},__wbg_createBindGroup_f539b26ca341308f:function(e,n){return e.createBindGroup(n)},__wbg_createBuffer_77a9a8580e5123cc:function(e){const n=e.createBuffer();return _e(n)?0:C(n)},__wbg_createBuffer_b4dd77c6c40a2e87:function(e){const n=e.createBuffer();return _e(n)?0:C(n)},__wbg_createBuffer_d800e9b1d41b2ee5:function(){return te(function(e,n){return e.createBuffer(n)},arguments)},__wbg_createCommandEncoder_3352d1ffc36c6fc0:function(e,n){return e.createCommandEncoder(n)},__wbg_createFramebuffer_aa440c781a6c7da2:function(e){const n=e.createFramebuffer();return _e(n)?0:C(n)},__wbg_createFramebuffer_ac4ca0fc2cfc1bd1:function(e){const n=e.createFramebuffer();return _e(n)?0:C(n)},__wbg_createPipelineLayout_6eab52c327118937:function(e,n){return e.createPipelineLayout(n)},__wbg_createProgram_89a2bb21dab7e222:function(e){const n=e.createProgram();return _e(n)?0:C(n)},__wbg_createProgram_e43ace4085d1086d:function(e){const n=e.createProgram();return _e(n)?0:C(n)},__wbg_createQuery_731629e292b35522:function(e){const n=e.createQuery();return _e(n)?0:C(n)},__wbg_createRenderPipeline_0ebb7ebc653e9207:function(){return te(function(e,n){return e.createRenderPipeline(n)},arguments)},__wbg_createRenderbuffer_3605e09d07f5a422:function(e){const n=e.createRenderbuffer();return _e(n)?0:C(n)},__wbg_createRenderbuffer_42eeb481e4c92ff2:function(e){const n=e.createRenderbuffer();return _e(n)?0:C(n)},__wbg_createSampler_9bd91d7e928c0060:function(e,n){return e.createSampler(n)},__wbg_createSampler_ebfb34feb26878f1:function(e){const n=e.createSampler();return _e(n)?0:C(n)},__wbg_createShaderModule_cefa51336cb288ae:function(e,n){return e.createShaderModule(n)},__wbg_createShader_4d944e14daceede8:function(e,n){const t=e.createShader(n>>>0);return _e(t)?0:C(t)},__wbg_createShader_70a84327b207bda4:function(e,n){const t=e.createShader(n>>>0);return _e(t)?0:C(t)},__wbg_createTexture_a409a8c7972e99b3:function(e){const n=e.createTexture();return _e(n)?0:C(n)},__wbg_createTexture_ecccbb9df64e8c81:function(e){const n=e.createTexture();return _e(n)?0:C(n)},__wbg_createTexture_ed7e9fc04dd54d84:function(){return te(function(e,n){return e.createTexture(n)},arguments)},__wbg_createVertexArrayOES_083ec6fc6262613d:function(e){const n=e.createVertexArrayOES();return _e(n)?0:C(n)},__wbg_createVertexArray_9411e94d2ee6864e:function(e){const n=e.createVertexArray();return _e(n)?0:C(n)},__wbg_createView_da41c2d2cb212715:function(){return te(function(e,n){return e.createView(n)},arguments)},__wbg_cullFace_3e14866a0c370004:function(e,n){e.cullFace(n>>>0)},__wbg_cullFace_b64f84debd112644:function(e,n){e.cullFace(n>>>0)},__wbg_debug_eb092a10b3338acb:function(e){console.debug(e)},__wbg_deleteBuffer_54e287dbecb17d6e:function(e,n){e.deleteBuffer(n)},__wbg_deleteBuffer_c9dc22cdbb93ffbc:function(e,n){e.deleteBuffer(n)},__wbg_deleteFramebuffer_6c3b62109b65e8de:function(e,n){e.deleteFramebuffer(n)},__wbg_deleteFramebuffer_977fae88c7df1c6f:function(e,n){e.deleteFramebuffer(n)},__wbg_deleteProgram_16fe8b000141443c:function(e,n){e.deleteProgram(n)},__wbg_deleteProgram_c990794adb74a326:function(e,n){e.deleteProgram(n)},__wbg_deleteQuery_670219eac170c9fb:function(e,n){e.deleteQuery(n)},__wbg_deleteRenderbuffer_1066bd086097d9c0:function(e,n){e.deleteRenderbuffer(n)},__wbg_deleteRenderbuffer_be22a49b59807a79:function(e,n){e.deleteRenderbuffer(n)},__wbg_deleteSampler_a7f5bf9c8096d80a:function(e,n){e.deleteSampler(n)},__wbg_deleteShader_7169f1760153b284:function(e,n){e.deleteShader(n)},__wbg_deleteShader_9b34ccd212c66de7:function(e,n){e.deleteShader(n)},__wbg_deleteSync_5f19ce0564df8ade:function(e,n){e.deleteSync(n)},__wbg_deleteTexture_4cc3a009d8de3629:function(e,n){e.deleteTexture(n)},__wbg_deleteTexture_5f176c5fb10209e7:function(e,n){e.deleteTexture(n)},__wbg_deleteVertexArrayOES_8ddbff0c3c4bd01b:function(e,n){e.deleteVertexArrayOES(n)},__wbg_deleteVertexArray_a810728c9f325e4c:function(e,n){e.deleteVertexArray(n)},__wbg_depthFunc_e3cb63d0ea760f4f:function(e,n){e.depthFunc(n>>>0)},__wbg_depthFunc_fc1a3d2fde41ec92:function(e,n){e.depthFunc(n>>>0)},__wbg_depthMask_77fed42fc2117471:function(e,n){e.depthMask(0!==n)},__wbg_depthMask_e85b064c1ee5147d:function(e,n){e.depthMask(0!==n)},__wbg_depthRange_2b6920405cfb1e3d:function(e,n,t){e.depthRange(n,t)},__wbg_depthRange_6e341dd878a6597d:function(e,n,t){e.depthRange(n,t)},__wbg_description_83b8a393160021b9:function(e,n){const t=ae(n.description,be.__wbindgen_malloc,be.__wbindgen_realloc),_=se;$().setInt32(e+4,_,!0),$().setInt32(e+0,t,!0)},__wbg_disableVertexAttribArray_45e2fd394cde8686:function(e,n){e.disableVertexAttribArray(n>>>0)},__wbg_disableVertexAttribArray_b985896436c82562:function(e,n){e.disableVertexAttribArray(n>>>0)},__wbg_disable_6907c683adc38e04:function(e,n){e.disable(n>>>0)},__wbg_disable_71ea0d3d0529f100:function(e,n){e.disable(n>>>0)},__wbg_document_c7f486c52d63d24e:function(e){const n=e.document;return _e(n)?0:C(n)},__wbg_done_cffed884d87aa22e:function(e){return e.done},__wbg_drawArraysInstancedANGLE_1161faf698564d6d:function(e,n,t,_,r){e.drawArraysInstancedANGLE(n>>>0,t,_,r)},__wbg_drawArraysInstanced_0ef1fbcdba111c38:function(e,n,t,_,r){e.drawArraysInstanced(n>>>0,t,_,r)},__wbg_drawArrays_983f352c9e94d800:function(e,n,t,_){e.drawArrays(n>>>0,t,_)},__wbg_drawArrays_bc085b67da45ec03:function(e,n,t,_){e.drawArrays(n>>>0,t,_)},__wbg_drawBuffersWEBGL_6cfb1b5e064e9ed2:function(e,n){e.drawBuffersWEBGL(n)},__wbg_drawBuffers_9b22ea9d8f6a15f0:function(e,n){e.drawBuffers(n)},__wbg_drawElementsInstancedANGLE_da080f7c11a85ead:function(e,n,t,_,r,a){e.drawElementsInstancedANGLE(n>>>0,t,_>>>0,r,a)},__wbg_drawElementsInstanced_ea7d6b71beea79a4:function(e,n,t,_,r,a){e.drawElementsInstanced(n>>>0,t,_>>>0,r,a)},__wbg_draw_086a9578fc9898c2:function(e,n,t,_,r){e.draw(n>>>0,t>>>0,_>>>0,r>>>0)},__wbg_enableVertexAttribArray_ad4d8ff487ea8fe1:function(e,n){e.enableVertexAttribArray(n>>>0)},__wbg_enableVertexAttribArray_db5eef27f6b32c4a:function(e,n){e.enableVertexAttribArray(n>>>0)},__wbg_enable_9fb8e4de75a17155:function(e,n){e.enable(n>>>0)},__wbg_enable_9fca6962aca10f48:function(e,n){e.enable(n>>>0)},__wbg_endQuery_4eea0267f103b625:function(e,n){e.endQuery(n>>>0)},__wbg_end_b57473834b877409:function(e){e.end()},__wbg_entries_972a87586902cf87:function(e){return Object.entries(e)},__wbg_error_756c5934221e6fee:function(e){console.error(e)},__wbg_error_757e9472f8410341:function(e,n){let t,_;try{t=e,_=n,console.error(Y(e,n))}finally{be.__wbindgen_free(t,_,1)}},__wbg_fenceSync_13999b65854e9b9b:function(e,n,t){const _=e.fenceSync(n>>>0,t>>>0);return _e(_)?0:C(_)},__wbg_finish_09ec094c10f41e7b:function(e){return e.finish()},__wbg_finish_0ce019eb398085de:function(e){e.finish()},__wbg_finish_646a6b6ddc91f563:function(e){e.finish()},__wbg_finish_ec1c191f66a895b1:function(e,n){return e.finish(n)},__wbg_flush_824eea12383b8cca:function(e){e.flush()},__wbg_flush_c4a6f752e79bfc53:function(e){e.flush()},__wbg_framebufferRenderbuffer_aa5275e6a52dc6bd:function(e,n,t,_,r){e.framebufferRenderbuffer(n>>>0,t>>>0,_>>>0,r)},__wbg_framebufferRenderbuffer_f5e60406b8ee912e:function(e,n,t,_,r){e.framebufferRenderbuffer(n>>>0,t>>>0,_>>>0,r)},__wbg_framebufferTexture2D_7a85448ff0ab4b2c:function(e,n,t,_,r,a){e.framebufferTexture2D(n>>>0,t>>>0,_>>>0,r,a)},__wbg_framebufferTexture2D_ee6a0d85fd7083aa:function(e,n,t,_,r,a){e.framebufferTexture2D(n>>>0,t>>>0,_>>>0,r,a)},__wbg_framebufferTextureLayer_7c877ec2a0f9220b:function(e,n,t,_,r,a){e.framebufferTextureLayer(n>>>0,t>>>0,_,r,a)},__wbg_framebufferTextureMultiviewOVR_64b070ac25c07833:function(e,n,t,_,r,a,c){e.framebufferTextureMultiviewOVR(n>>>0,t>>>0,_,r,a,c)},__wbg_frontFace_77f09a7664c8cd54:function(e,n){e.frontFace(n>>>0)},__wbg_frontFace_b3888c65efdb32fe:function(e,n){e.frontFace(n>>>0)},__wbg_getBufferSubData_2c901ce3bd14301e:function(e,n,t,_){e.getBufferSubData(n>>>0,t,_)},__wbg_getContext_2c75bba1a1c9739b:function(){return te(function(e,n,t,_){const r=e.getContext(Y(n,t),_);return _e(r)?0:C(r)},arguments)},__wbg_getContext_5ff6bd600503b094:function(){return te(function(e,n,t){const _=e.getContext(Y(n,t));return _e(_)?0:C(_)},arguments)},__wbg_getContext_db25e9527f2ccc08:function(){return te(function(e,n,t,_){const r=e.getContext(Y(n,t),_);return _e(r)?0:C(r)},arguments)},__wbg_getContext_e0c05ffee530bdcf:function(){return te(function(e,n,t){const _=e.getContext(Y(n,t));return _e(_)?0:C(_)},arguments)},__wbg_getCurrentTexture_9f3b84d0eaa6cd95:function(){return te(function(e){return e.getCurrentTexture()},arguments)},__wbg_getExtension_112db5d69fdfc10f:function(){return te(function(e,n,t){const _=e.getExtension(Y(n,t));return _e(_)?0:C(_)},arguments)},__wbg_getIndexedParameter_d4437eb4ad4a0bfa:function(){return te(function(e,n,t){return e.getIndexedParameter(n>>>0,t>>>0)},arguments)},__wbg_getMappedRange_fb54c6327b2d8d20:function(){return te(function(e,n,t){return e.getMappedRange(n,t)},arguments)},__wbg_getParameter_031885c3618c2d0c:function(){return te(function(e,n){return e.getParameter(n>>>0)},arguments)},__wbg_getParameter_7f269432cd46eb73:function(){return te(function(e,n){return e.getParameter(n>>>0)},arguments)},__wbg_getPreferredCanvasFormat_0ef5034c8902201b:function(e){const n=e.getPreferredCanvasFormat();return(F.indexOf(n)+1||102)-1},__wbg_getProgramInfoLog_0e335b65673afba8:function(e,n,t){const _=n.getProgramInfoLog(t);var r=_e(_)?0:ae(_,be.__wbindgen_malloc,be.__wbindgen_realloc),a=se;$().setInt32(e+4,a,!0),$().setInt32(e+0,r,!0)},__wbg_getProgramInfoLog_82aa11c9d7e8d96e:function(e,n,t){const _=n.getProgramInfoLog(t);var r=_e(_)?0:ae(_,be.__wbindgen_malloc,be.__wbindgen_realloc),a=se;$().setInt32(e+4,a,!0),$().setInt32(e+0,r,!0)},__wbg_getProgramParameter_1a93fd2f4dcc0622:function(e,n,t){return e.getProgramParameter(n,t>>>0)},__wbg_getProgramParameter_2a5860ab824690ec:function(e,n,t){return e.getProgramParameter(n,t>>>0)},__wbg_getQueryParameter_145128cfab5de56d:function(e,n,t){return e.getQueryParameter(n,t>>>0)},__wbg_getShaderInfoLog_416aea280f6fdf84:function(e,n,t){const _=n.getShaderInfoLog(t);var r=_e(_)?0:ae(_,be.__wbindgen_malloc,be.__wbindgen_realloc),a=se;$().setInt32(e+4,a,!0),$().setInt32(e+0,r,!0)},__wbg_getShaderInfoLog_e66ab6619bcd208d:function(e,n,t){const _=n.getShaderInfoLog(t);var r=_e(_)?0:ae(_,be.__wbindgen_malloc,be.__wbindgen_realloc),a=se;$().setInt32(e+4,a,!0),$().setInt32(e+0,r,!0)},__wbg_getShaderParameter_b19fb6adcff77066:function(e,n,t){return e.getShaderParameter(n,t>>>0)},__wbg_getShaderParameter_d542b1412563ae42:function(e,n,t){return e.getShaderParameter(n,t>>>0)},__wbg_getSupportedExtensions_67cde11dd49cad1a:function(e){const n=e.getSupportedExtensions();return _e(n)?0:C(n)},__wbg_getSupportedProfiles_abd53cd63178e1e0:function(e){const n=e.getSupportedProfiles();return _e(n)?0:C(n)},__wbg_getSyncParameter_f4eeca8570f06af5:function(e,n,t){return e.getSyncParameter(n,t>>>0)},__wbg_getUniformBlockIndex_db57fe2d6ed6af2a:function(e,n,t,_){return e.getUniformBlockIndex(n,Y(t,_))},__wbg_getUniformLocation_03b9677a8f868582:function(e,n,t,_){const r=e.getUniformLocation(n,Y(t,_));return _e(r)?0:C(r)},__wbg_getUniformLocation_20bad5ce4a0aaae4:function(e,n,t,_){const r=e.getUniformLocation(n,Y(t,_));return _e(r)?0:C(r)},__wbg_get_6cf5a4d4d8ad3c5a:function(){return te(function(e,n){return Reflect.get(e,n)},arguments)},__wbg_get_95e4d462165c92ae:function(e,n){const t=e[n>>>0];return _e(t)?0:C(t)},__wbg_get_989d0a1309644f2b:function(){return te(function(e,n){return Reflect.get(e,n)},arguments)},__wbg_get_b1f0ab13c737f856:function(e,n){return e[n>>>0]},__wbg_get_unchecked_363572bdd397d473:function(e,n){return e[n>>>0]},__wbg_get_with_ref_key_6412cf3094599694:function(e,n){return e[n]},__wbg_gpu_afdd4387c7afe5f9:function(e){return e.gpu},__wbg_includes_c0f578d8314b8dbf:function(e,n,t){return e.includes(n,t)},__wbg_info_971d8b9db3dae69f:function(e){return e.info},__wbg_info_f25c01bee103395d:function(e){console.info(e)},__wbg_instanceof_ArrayBuffer_d4ff01f8247925ae:function(e){let n;try{n=e instanceof ArrayBuffer}catch(e){n=!1}return n},__wbg_instanceof_HtmlCanvasElement_4d7e131643d814c1:function(e){let n;try{n=e instanceof HTMLCanvasElement}catch(e){n=!1}return n},__wbg_instanceof_ImageBitmap_3cbd94d6c4808341:function(e){let n;try{n=e instanceof ImageBitmap}catch(e){n=!1}return n},__wbg_instanceof_Map_1ff6a2b54c899f0d:function(e){let n;try{n=e instanceof Map}catch(e){n=!1}return n},__wbg_instanceof_Uint8Array_598adc0fef426aa8:function(e){let n;try{n=e instanceof Uint8Array}catch(e){n=!1}return n},__wbg_instanceof_WebGl2RenderingContext_015d221b904a3c7b:function(e){let n;try{n=e instanceof WebGL2RenderingContext}catch(e){n=!1}return n},__wbg_instanceof_Window_a3b8566f0a9c5d1a:function(e){let n;try{n=e instanceof Window}catch(e){n=!1}return n},__wbg_invalidateFramebuffer_4538559f02a556ae:function(){return te(function(e,n,t){e.invalidateFramebuffer(n>>>0,t)},arguments)},__wbg_isArray_5674713bb7b79043:function(e){return Array.isArray(e)},__wbg_isFallbackAdapter_4c8cc3b18677460a:function(e){return e.isFallbackAdapter},__wbg_isSafeInteger_8f51c743827d1ec5:function(e){return Number.isSafeInteger(e)},__wbg_is_61443cc073056436:function(e,n){return Object.is(e,n)},__wbg_iterator_22ddeb808cf55a6f:function(){return Symbol.iterator},__wbg_label_7add8cb37a6ef98f:function(e,n){const t=ae(n.label,be.__wbindgen_malloc,be.__wbindgen_realloc),_=se;$().setInt32(e+4,_,!0),$().setInt32(e+0,t,!0)},__wbg_length_31bdaf014f5fbde2:function(e){return e.length},__wbg_length_4e1adc0d42e23620:function(e){return e.length},__wbg_linkProgram_794fd290a759542a:function(e,n){e.linkProgram(n)},__wbg_linkProgram_e408ee5f93686f1f:function(e,n){e.linkProgram(n)},__wbg_log_363d83b9114c8831:function(e){console.log(e)},__wbg_mapAsync_b0597127f5037286:function(e,n,t,_){return e.mapAsync(n>>>0,t,_)},__wbg_matchMedia_0e1d9f8bfb0f1f46:function(){return te(function(e,n,t){const _=e.matchMedia(Y(n,t));return _e(_)?0:C(_)},arguments)},__wbg_matches_0c791086704a6cb5:function(e){return e.matches},__wbg_navigator_d217ca64c4bbff48:function(e){return e.navigator},__wbg_navigator_d25c0f071226f233:function(e){return e.navigator},__wbg_new_12e5d807044fbfe3:function(){return te(function(e,n){return new OffscreenCanvas(e>>>0,n>>>0)},arguments)},__wbg_new_1da3429bc3c4541c:function(e){return new Uint8Array(e)},__wbg_new_227d7c05414eb861:function(){return new Error},__wbg_new_bebc3f4757acf305:function(){return new Object},__wbg_new_ffa92086ea89f79c:function(){return new Array},__wbg_new_typed_6f8b0d724fe26c07:function(e,n){try{var t={a:e,b:n};const _=new Promise((e,n)=>{const _=t.a;t.a=0;try{return function(e,n,t,_){be.wasm_bindgen_69c280ee226ac681___convert__closures_____invoke___js_sys_528a3d7b760fa255___Function_fn_wasm_bindgen_69c280ee226ac681___JsValue_____wasm_bindgen_69c280ee226ac681___sys__Undefined___js_sys_528a3d7b760fa255___Function_fn_wasm_bindgen_69c280ee226ac681___JsValue_____wasm_bindgen_69c280ee226ac681___sys__Undefined_______true_(e,n,t,_)}(_,t.b,e,n)}finally{t.a=_}});return _}finally{t.a=0}},__wbg_new_typed_7d4574ab4b8446c8:function(){return new Object},__wbg_new_with_byte_offset_and_length_492c969e8b5da8a4:function(e,n,t){return new Uint8Array(e,n>>>0,t>>>0)},__wbg_next_95053e306b1c3aed:function(e){return e.next},__wbg_next_f31ecb8646d2c605:function(){return te(function(e){return e.next()},arguments)},__wbg_of_1a3f47170341cefe:function(e){return Array.of(e)},__wbg_of_d9a05aa72bb023a2:function(e,n,t){return Array.of(e,n,t)},__wbg_onSubmittedWorkDone_1190213cee1ecf7e:function(e){return e.onSubmittedWorkDone()},__wbg_pixelStorei_1bc7980b82e1ba4b:function(e,n,t){e.pixelStorei(n>>>0,t)},__wbg_pixelStorei_d540c25aafa93789:function(e,n,t){e.pixelStorei(n>>>0,t)},__wbg_polygonOffset_a97069c9fe385bff:function(e,n,t){e.polygonOffset(n,t)},__wbg_polygonOffset_f99887a0cc3d7df4:function(e,n,t){e.polygonOffset(n,t)},__wbg_prototypesetcall_ae9f5e7459250748:function(e,n,t){Uint8Array.prototype.set.call(j(e,n),t)},__wbg_push_bfdf956ba476f65b:function(e,n){return e.push(n)},__wbg_queryCounterEXT_c9fb8ad39c35fdf6:function(e,n,t){e.queryCounterEXT(n,t>>>0)},__wbg_querySelectorAll_fdbf93e11103921d:function(){return te(function(e,n,t){return e.querySelectorAll(Y(n,t))},arguments)},__wbg_querySelector_5b1d9ebad373dc9d:function(){return te(function(e,n,t){const _=e.querySelector(Y(n,t));return _e(_)?0:C(_)},arguments)},__wbg_queueMicrotask_85c90f6987555d65:function(e){return e.queueMicrotask},__wbg_queueMicrotask_f6a1fa10b81d1fc0:function(e){queueMicrotask(e)},__wbg_queue_7b62c28143d44293:function(e){return e.queue},__wbg_readBuffer_1679a4b6dcd78e30:function(e,n){e.readBuffer(n>>>0)},__wbg_readPixels_5d75a0ec1e2aab33:function(){return te(function(e,n,t,_,r,a,c,i){e.readPixels(n,t,_,r,a>>>0,c>>>0,i)},arguments)},__wbg_readPixels_c60bfe6126f65619:function(){return te(function(e,n,t,_,r,a,c,i){e.readPixels(n,t,_,r,a>>>0,c>>>0,i)},arguments)},__wbg_readPixels_dcde619ca94b6296:function(){return te(function(e,n,t,_,r,a,c,i){e.readPixels(n,t,_,r,a>>>0,c>>>0,i)},arguments)},__wbg_renderbufferStorageMultisample_5d9012ce50f133e3:function(e,n,t,_,r,a){e.renderbufferStorageMultisample(n>>>0,t,_>>>0,r,a)},__wbg_renderbufferStorage_2b50da85624a8b73:function(e,n,t,_,r){e.renderbufferStorage(n>>>0,t>>>0,_,r)},__wbg_renderbufferStorage_2eb3d4343d1a1c6e:function(e,n,t,_,r){e.renderbufferStorage(n>>>0,t>>>0,_,r)},__wbg_requestAdapter_a539af006419f2e9:function(e,n){return e.requestAdapter(n)},__wbg_requestDevice_5cb8a582e55d08cb:function(e,n){return e.requestDevice(n)},__wbg_resolve_35ec7e0c6af4c82c:function(e){return Promise.resolve(e)},__wbg_samplerParameterf_34605394359af7ae:function(e,n,t,_){e.samplerParameterf(n,t>>>0,_)},__wbg_samplerParameteri_ff1f558c8f43a220:function(e,n,t,_){e.samplerParameteri(n,t>>>0,_)},__wbg_scissor_c53448a6fa939bfb:function(e,n,t,_,r){e.scissor(n,t,_,r)},__wbg_scissor_d896348c98d0c9ac:function(e,n,t,_,r){e.scissor(n,t,_,r)},__wbg_setBindGroup_11bdbb60cc8b54b9:function(){return te(function(e,n,t,_,r,a,c){e.setBindGroup(n>>>0,t,U(_,r),a,c>>>0)},arguments)},__wbg_setBindGroup_418c3e0eb6943ce0:function(e,n,t){e.setBindGroup(n>>>0,t)},__wbg_setPipeline_b6f981027e02cd16:function(e,n){e.setPipeline(n)},__wbg_setScissorRect_889235eeb784732b:function(e,n,t,_,r){e.setScissorRect(n>>>0,t>>>0,_>>>0,r>>>0)},__wbg_setVertexBuffer_6db3b60e99280744:function(e,n,t,_){e.setVertexBuffer(n>>>0,t,_)},__wbg_setVertexBuffer_cbf4ca1627c02f4c:function(e,n,t,_,r){e.setVertexBuffer(n>>>0,t,_,r)},__wbg_set_13d25b81ab403f5e:function(e,n,t){e[n>>>0]=t},__wbg_set_6be42768c690e380:function(e,n,t){e[n]=t},__wbg_set_9cfc0f17d60ff0af:function(e,n,t){e.set(n,t>>>0)},__wbg_set_a377297433dfea63:function(){return te(function(e,n,t){return Reflect.set(e,n,t)},arguments)},__wbg_set_a_82818effc94f6256:function(e,n){e.a=n},__wbg_set_access_a099cfbbeec9b96f:function(e,n){e.access=D[n]},__wbg_set_address_mode_u_a68737cf5d288f95:function(e,n){e.addressModeU=f[n]},__wbg_set_address_mode_v_b1c3c45933f540d1:function(e,n){e.addressModeV=f[n]},__wbg_set_address_mode_w_889c31cf7022c764:function(e,n){e.addressModeW=f[n]},__wbg_set_alpha_106f21a936a85eba:function(e,n){e.alpha=n},__wbg_set_alpha_mode_5544568dbac50280:function(e,n){e.alphaMode=d[n]},__wbg_set_alpha_to_coverage_enabled_3372ce329447b8f1:function(e,n){e.alphaToCoverageEnabled=0!==n},__wbg_set_array_layer_count_22afa0a979e4ad55:function(e,n){e.arrayLayerCount=n>>>0},__wbg_set_array_stride_f64_6816040e5e7598c3:function(e,n){e.arrayStride=n},__wbg_set_aspect_a48d046965270281:function(e,n){e.aspect=M[n]},__wbg_set_aspect_b1a9909bf315433f:function(e,n){e.aspect=M[n]},__wbg_set_attributes_9e38cb1dde387a5b:function(e,n,t){e.attributes=z(n,t)},__wbg_set_b_a3297ee7e7cac3a8:function(e,n){e.b=n},__wbg_set_base_array_layer_2435ba92c80346ae:function(e,n){e.baseArrayLayer=n>>>0},__wbg_set_base_mip_level_8b6093e875e7c65d:function(e,n){e.baseMipLevel=n>>>0},__wbg_set_beginning_of_pass_write_index_e552c5e8b8bbf52f:function(e,n){e.beginningOfPassWriteIndex=n>>>0},__wbg_set_bind_group_layouts_458c44ba55100b82:function(e,n,t){e.bindGroupLayouts=z(n,t)},__wbg_set_binding_81b3fac7f7acaf8d:function(e,n){e.binding=n>>>0},__wbg_set_binding_b6cee57f35ac5190:function(e,n){e.binding=n>>>0},__wbg_set_blend_1a801617945f7945:function(e,n){e.blend=n},__wbg_set_buffer_1548ae88a9188037:function(e,n){e.buffer=n},__wbg_set_buffer_8d0ac64ad20dfc84:function(e,n){e.buffer=n},__wbg_set_buffers_5d0e0c50791f710e:function(e,n,t){e.buffers=z(n,t)},__wbg_set_bytes_per_row_c28583f0063160f1:function(e,n){e.bytesPerRow=n>>>0},__wbg_set_clear_value_gpu_color_dict_a9f763e8372ac1de:function(e,n){e.clearValue=n},__wbg_set_code_5d5b0b9e2fd0dca7:function(e,n,t){e.code=Y(n,t)},__wbg_set_color_8ecace4011f47d2e:function(e,n){e.color=n},__wbg_set_color_attachments_622fe2d5997fda7a:function(e,n,t){e.colorAttachments=z(n,t)},__wbg_set_compare_080c9e492ff36990:function(e,n){e.compare=l[n]},__wbg_set_compare_817cf3695599eaa6:function(e,n){e.compare=l[n]},__wbg_set_count_8ff0c9474e39a849:function(e,n){e.count=n>>>0},__wbg_set_cull_mode_85d2b4ab0ce3a564:function(e,n){e.cullMode=w[n]},__wbg_set_depth_bias_95abf479cae3f3cd:function(e,n){e.depthBias=n},__wbg_set_depth_bias_clamp_ba3d0b8348151350:function(e,n){e.depthBiasClamp=n},__wbg_set_depth_bias_slope_scale_6b2584d93f5b9cd2:function(e,n){e.depthBiasSlopeScale=n},__wbg_set_depth_clear_value_e30a4c754c6b3b26:function(e,n){e.depthClearValue=n},__wbg_set_depth_compare_a90de4e3714397ab:function(e,n){e.depthCompare=l[n]},__wbg_set_depth_fail_op_b5c64541d1b6b482:function(e,n){e.depthFailOp=A[n]},__wbg_set_depth_load_op_932888016d762d3e:function(e,n){e.depthLoadOp=x[n]},__wbg_set_depth_or_array_layers_e2f074a0284e4806:function(e,n){e.depthOrArrayLayers=n>>>0},__wbg_set_depth_read_only_be790175a1c2db9a:function(e,n){e.depthReadOnly=0!==n},__wbg_set_depth_stencil_attachment_54a8922f5fbe08bf:function(e,n){e.depthStencilAttachment=n},__wbg_set_depth_stencil_b7cffc59ad4da529:function(e,n){e.depthStencil=n},__wbg_set_depth_store_op_9054814f164ab55d:function(e,n){e.depthStoreOp=P[n]},__wbg_set_depth_write_enabled_31a821ee1fb3b0b3:function(e,n){e.depthWriteEnabled=0!==n},__wbg_set_device_210484a77b675c9c:function(e,n){e.device=n},__wbg_set_dimension_3da9d03131a9f446:function(e,n){e.dimension=B[n]},__wbg_set_dimension_56332450afa3e0c0:function(e,n){e.dimension=T[n]},__wbg_set_dst_factor_865ba9aaf187890c:function(e,n){e.dstFactor=u[n]},__wbg_set_end_of_pass_write_index_8f164f9e60d4ad16:function(e,n){e.endOfPassWriteIndex=n>>>0},__wbg_set_entries_6f866302103b81e9:function(e,n,t){e.entries=z(n,t)},__wbg_set_entries_f26b77ab9548e906:function(e,n,t){e.entries=z(n,t)},__wbg_set_entry_point_71cef95c137b5774:function(e,n,t){e.entryPoint=Y(n,t)},__wbg_set_entry_point_b70f98f5025a114d:function(e,n,t){e.entryPoint=Y(n,t)},__wbg_set_external_texture_7f966c604c4f8098:function(e,n){e.externalTexture=n},__wbg_set_fail_op_d59d0187e4111dfe:function(e,n){e.failOp=A[n]},__wbg_set_format_23f7f32549751d43:function(e,n){e.format=F[n]},__wbg_set_format_283dca56552f07a3:function(e,n){e.format=F[n]},__wbg_set_format_5080a858117ad2c1:function(e,n){e.format=R[n]},__wbg_set_format_66735b94bd868ba2:function(e,n){e.format=F[n]},__wbg_set_format_7f2bdbfb101b1ae1:function(e,n){e.format=F[n]},__wbg_set_format_92732ea75d3b79f5:function(e,n){e.format=F[n]},__wbg_set_format_f009e603f7d4c28e:function(e,n){e.format=F[n]},__wbg_set_fragment_d2b0ec97d7cf8d47:function(e,n){e.fragment=n},__wbg_set_front_face_d3f8a2e07e7b25dd:function(e,n){e.frontFace=p[n]},__wbg_set_g_b527ee8a9bed553d:function(e,n){e.g=n},__wbg_set_has_dynamic_offset_0c72ffa900c5a269:function(e,n){e.hasDynamicOffset=0!==n},__wbg_set_height_1202ad0eab43cbe0:function(e,n){e.height=n>>>0},__wbg_set_height_698fb3b255bc1348:function(e,n){e.height=n>>>0},__wbg_set_height_f6619158e5735877:function(e,n){e.height=n>>>0},__wbg_set_label_17202740051e9722:function(e,n,t){e.label=Y(n,t)},__wbg_set_label_2fefb39c0e0dbbe8:function(e,n,t){e.label=Y(n,t)},__wbg_set_label_3cb2322e6f6db14c:function(e,n,t){e.label=Y(n,t)},__wbg_set_label_3f2ccaafef5ff7c9:function(e,n,t){e.label=Y(n,t)},__wbg_set_label_612add98a4398f92:function(e,n,t){e.label=Y(n,t)},__wbg_set_label_70a09ee68d6b1b26:function(e,n,t){e.label=Y(n,t)},__wbg_set_label_92cd3811e96b487c:function(e,n,t){e.label=Y(n,t)},__wbg_set_label_9c2a186152427ee0:function(e,n,t){e.label=Y(n,t)},__wbg_set_label_c3eaf136aa464cba:function(e,n,t){e.label=Y(n,t)},__wbg_set_label_c7987704d29f284b:function(e,n,t){e.label=Y(n,t)},__wbg_set_label_cfe64bca8945ee30:function(e,n,t){e.label=Y(n,t)},__wbg_set_label_e02179cf97e95763:function(e,n,t){e.label=Y(n,t)},__wbg_set_label_ee172cd5f6a96961:function(e,n,t){e.label=Y(n,t)},__wbg_set_layout_454e3a091b390cd4:function(e,n){e.layout=n},__wbg_set_layout_75dc1ca3f2421cff:function(e,n){e.layout=n},__wbg_set_layout_gpu_auto_layout_mode_06a2b95af1043098:function(e,n){e.layout=o[n]},__wbg_set_load_op_c56b1269acc2d51f:function(e,n){e.loadOp=x[n]},__wbg_set_lod_max_clamp_db24179f67f3aa31:function(e,n){e.lodMaxClamp=n},__wbg_set_lod_min_clamp_2bbce566e9fefa04:function(e,n){e.lodMinClamp=n},__wbg_set_mag_filter_db8e6b42d4f8846d:function(e,n){e.magFilter=m[n]},__wbg_set_mapped_at_creation_3f320fef6761b02c:function(e,n){e.mappedAtCreation=0!==n},__wbg_set_mask_c1079e551ec360dc:function(e,n){e.mask=n>>>0},__wbg_set_max_anisotropy_84749fdcec362dc4:function(e,n){e.maxAnisotropy=n},__wbg_set_min_binding_size_f64_897e3cd4496ddec9:function(e,n){e.minBindingSize=n},__wbg_set_min_filter_d435bbfc5a637757:function(e,n){e.minFilter=m[n]},__wbg_set_mip_level_count_047936c630acee7b:function(e,n){e.mipLevelCount=n>>>0},__wbg_set_mip_level_count_44bc46a1ae6f6daa:function(e,n){e.mipLevelCount=n>>>0},__wbg_set_mip_level_f3745730372683d5:function(e,n){e.mipLevel=n>>>0},__wbg_set_mipmap_filter_62fb49a84b0747ff:function(e,n){e.mipmapFilter=y[n]},__wbg_set_mode_7edfbc344ef9c650:function(e,n){e.mode=g[n]},__wbg_set_module_392eeaa269f203b0:function(e,n){e.module=n},__wbg_set_module_715d37652c4998ec:function(e,n){e.module=n},__wbg_set_multisample_ff72a7a5456cbeb7:function(e,n){e.multisample=n},__wbg_set_multisampled_039f032dc4b67367:function(e,n){e.multisampled=0!==n},__wbg_set_offset_f64_127e8a0aa5c5485a:function(e,n){e.offset=n},__wbg_set_offset_f64_457756429ede426d:function(e,n){e.offset=n},__wbg_set_offset_f64_a903425d5a8e5815:function(e,n){e.offset=n},__wbg_set_operation_00a77386523b88f9:function(e,n){e.operation=b[n]},__wbg_set_origin_gpu_origin_3d_dict_0619d4860adb4eb6:function(e,n){e.origin=n},__wbg_set_pass_op_3cf10feb3d76ab97:function(e,n){e.passOp=A[n]},__wbg_set_power_preference_b42d00a8facfbade:function(e,n){e.powerPreference=v[n]},__wbg_set_primitive_e796cf76f0ff89f3:function(e,n){e.primitive=n},__wbg_set_query_set_f030702f1b69199f:function(e,n){e.querySet=n},__wbg_set_r_6ece4d74af63364f:function(e,n){e.r=n},__wbg_set_required_features_bbab71414c45e621:function(e,n,t){e.requiredFeatures=z(n,t)},__wbg_set_required_limits_837f62d865e7cfac:function(e,n){e.requiredLimits=n},__wbg_set_resolve_target_gpu_texture_view_e4c1e3bbb8c27d87:function(e,n){e.resolveTarget=n},__wbg_set_resource_8fd8658b30d86ecf:function(e,n){e.resource=n},__wbg_set_resource_gpu_buffer_binding_33099b25da65b610:function(e,n){e.resource=n},__wbg_set_resource_gpu_texture_view_4cffe7bc7c8e5cbe:function(e,n){e.resource=n},__wbg_set_rows_per_image_c6d50d227e634379:function(e,n){e.rowsPerImage=n>>>0},__wbg_set_sample_count_481c255a12054e1d:function(e,n){e.sampleCount=n>>>0},__wbg_set_sample_type_ebc5fcd029513bda:function(e,n){e.sampleType=E[n]},__wbg_set_sampler_89cb4a7efcfc6005:function(e,n){e.sampler=n},__wbg_set_shader_location_3fb9f6a012eba494:function(e,n){e.shaderLocation=n>>>0},__wbg_set_size_f64_2f591b0654540477:function(e,n){e.size=n},__wbg_set_size_f64_e844c985b8f95261:function(e,n){e.size=n},__wbg_set_size_gpu_extent_3d_dict_adf57388ab1d4f18:function(e,n){e.size=n},__wbg_set_src_factor_6f2c9ec8e4d3d979:function(e,n){e.srcFactor=u[n]},__wbg_set_stencil_back_c54d0443b8b6a957:function(e,n){e.stencilBack=n},__wbg_set_stencil_clear_value_a321b0e045bfd8c2:function(e,n){e.stencilClearValue=n>>>0},__wbg_set_stencil_front_3ff3f8385852efff:function(e,n){e.stencilFront=n},__wbg_set_stencil_load_op_37d20deccb26a0f1:function(e,n){e.stencilLoadOp=x[n]},__wbg_set_stencil_read_mask_021ef4271b24352c:function(e,n){e.stencilReadMask=n>>>0},__wbg_set_stencil_read_only_75fe66a2356d6e92:function(e,n){e.stencilReadOnly=0!==n},__wbg_set_stencil_store_op_501f91638dd386e6:function(e,n){e.stencilStoreOp=P[n]},__wbg_set_stencil_write_mask_ec1c12237e094bdd:function(e,n){e.stencilWriteMask=n>>>0},__wbg_set_step_mode_3cbbdeba1e5dfd62:function(e,n){e.stepMode=O[n]},__wbg_set_storage_texture_786aea7c5773b6c1:function(e,n){e.storageTexture=n},__wbg_set_store_op_678f33376d741711:function(e,n){e.storeOp=P[n]},__wbg_set_strip_index_format_70313df755145d5e:function(e,n){e.stripIndexFormat=h[n]},__wbg_set_targets_674b33931e512fb1:function(e,n,t){e.targets=z(n,t)},__wbg_set_texture_95f2bfdf7767e76f:function(e,n){e.texture=n},__wbg_set_texture_a33be3fe02ac6264:function(e,n){e.texture=n},__wbg_set_timestamp_writes_de6a09f299b71b76:function(e,n){e.timestampWrites=n},__wbg_set_tone_mapping_320c1aad31db2e7f:function(e,n){e.toneMapping=n},__wbg_set_topology_b92cfe523bd9653b:function(e,n){e.topology=S[n]},__wbg_set_type_43e0092f16775979:function(e,n){e.type=I[n]},__wbg_set_type_79cec55caf4cdb6d:function(e,n){e.type=s[n]},__wbg_set_unclipped_depth_32b7caf29fa5633d:function(e,n){e.unclippedDepth=0!==n},__wbg_set_usage_1ee33d98267e787d:function(e,n){e.usage=n>>>0},__wbg_set_usage_2365e2704b1fdb10:function(e,n){e.usage=n>>>0},__wbg_set_usage_d53ee6f0c7aedbfa:function(e,n){e.usage=n>>>0},__wbg_set_usage_f3e34822998d2147:function(e,n){e.usage=n>>>0},__wbg_set_vertex_77ed7a1229239b5a:function(e,n){e.vertex=n},__wbg_set_view_dimension_893e2d16561e56e8:function(e,n){e.viewDimension=T[n]},__wbg_set_view_dimension_f2c5fe4bf927c3fe:function(e,n){e.viewDimension=T[n]},__wbg_set_view_formats_427069064d8b7139:function(e,n,t){e.viewFormats=z(n,t)},__wbg_set_view_formats_9c2f01a6f3b365c7:function(e,n,t){e.viewFormats=z(n,t)},__wbg_set_view_gpu_texture_view_35f4655788535c4d:function(e,n){e.view=n},__wbg_set_view_gpu_texture_view_a532c825c52042c0:function(e,n){e.view=n},__wbg_set_visibility_d8a6821789538c25:function(e,n){e.visibility=n>>>0},__wbg_set_width_4c3a2252e0dea033:function(e,n){e.width=n>>>0},__wbg_set_width_b20525f5f4df4eb8:function(e,n){e.width=n>>>0},__wbg_set_width_f52a20e39808b138:function(e,n){e.width=n>>>0},__wbg_set_write_mask_42d89f182ade6b2d:function(e,n){e.writeMask=n>>>0},__wbg_set_x_f470b03dd54724cd:function(e,n){e.x=n>>>0},__wbg_set_y_4c44eb40ebca5bfc:function(e,n){e.y=n>>>0},__wbg_set_z_2e6820ef0f5821ed:function(e,n){e.z=n>>>0},__wbg_shaderSource_108c27c8694ef4c0:function(e,n,t,_){e.shaderSource(n,Y(t,_))},__wbg_shaderSource_82a2cbfe223a86e0:function(e,n,t,_){e.shaderSource(n,Y(t,_))},__wbg_stack_3b0d974bbf31e44f:function(e,n){const t=ae(n.stack,be.__wbindgen_malloc,be.__wbindgen_realloc),_=se;$().setInt32(e+4,_,!0),$().setInt32(e+0,t,!0)},__wbg_static_accessor_GLOBAL_8eb4cd83130a11a0:function(){const e="undefined"==typeof global?null:global;return _e(e)?0:C(e)},__wbg_static_accessor_GLOBAL_THIS_1e7044f654e934db:function(){const e="undefined"==typeof globalThis?null:globalThis;return _e(e)?0:C(e)},__wbg_static_accessor_SELF_d8b50611246a6d92:function(){const e="undefined"==typeof self?null:self;return _e(e)?0:C(e)},__wbg_static_accessor_WINDOW_fd0bc376bf0f8b42:function(){const e="undefined"==typeof window?null:window;return _e(e)?0:C(e)},__wbg_stencilFuncSeparate_d7b5956ce3fe1272:function(e,n,t,_,r){e.stencilFuncSeparate(n>>>0,t>>>0,_,r>>>0)},__wbg_stencilFuncSeparate_fd17ac8961fd8359:function(e,n,t,_,r){e.stencilFuncSeparate(n>>>0,t>>>0,_,r>>>0)},__wbg_stencilMaskSeparate_5f3823dfe31289be:function(e,n,t){e.stencilMaskSeparate(n>>>0,t>>>0)},__wbg_stencilMaskSeparate_d0910e6d55b4605a:function(e,n,t){e.stencilMaskSeparate(n>>>0,t>>>0)},__wbg_stencilMask_4a8c4bda850006f1:function(e,n){e.stencilMask(n>>>0)},__wbg_stencilMask_cb69051e26a265bb:function(e,n){e.stencilMask(n>>>0)},__wbg_stencilOpSeparate_3fe9feaf978f0a17:function(e,n,t,_,r){e.stencilOpSeparate(n>>>0,t>>>0,_>>>0,r>>>0)},__wbg_stencilOpSeparate_cb0bb47587f022de:function(e,n,t,_,r){e.stencilOpSeparate(n>>>0,t>>>0,_>>>0,r>>>0)},__wbg_subgroupMaxSize_b43be0aa16182403:function(e){return e.subgroupMaxSize},__wbg_subgroupMinSize_03feb6ee0cda6775:function(e){return e.subgroupMinSize},__wbg_submit_077c85cc28e36892:function(e,n,t){e.submit(z(n,t))},__wbg_texImage2D_1b8d273f15622f0e:function(){return te(function(e,n,t,_,r,a,c,i,f,o){e.texImage2D(n>>>0,t,_,r,a,c,i>>>0,f>>>0,o)},arguments)},__wbg_texImage2D_6fca8c58ea7e4c8e:function(){return te(function(e,n,t,_,r,a,c,i,f,o){e.texImage2D(n>>>0,t,_,r,a,c,i>>>0,f>>>0,o)},arguments)},__wbg_texImage2D_8c5d6403fa51874d:function(){return te(function(e,n,t,_,r,a,c,i,f,o){e.texImage2D(n>>>0,t,_,r,a,c,i>>>0,f>>>0,o)},arguments)},__wbg_texImage3D_2bba05e03e9def07:function(){return te(function(e,n,t,_,r,a,c,i,f,o,u){e.texImage3D(n>>>0,t,_,r,a,c,i,f>>>0,o>>>0,u)},arguments)},__wbg_texImage3D_3977c422ce82cf99:function(){return te(function(e,n,t,_,r,a,c,i,f,o,u){e.texImage3D(n>>>0,t,_,r,a,c,i,f>>>0,o>>>0,u)},arguments)},__wbg_texParameteri_1fea50207adbfd68:function(e,n,t,_){e.texParameteri(n>>>0,t>>>0,_)},__wbg_texParameteri_e127aa385b821d68:function(e,n,t,_){e.texParameteri(n>>>0,t>>>0,_)},__wbg_texStorage2D_eb27b3383d99c349:function(e,n,t,_,r,a){e.texStorage2D(n>>>0,t,_>>>0,r,a)},__wbg_texStorage3D_cb53309842f2c8eb:function(e,n,t,_,r,a,c){e.texStorage3D(n>>>0,t,_>>>0,r,a,c)},__wbg_texSubImage2D_0542ae723245dd04:function(){return te(function(e,n,t,_,r,a,c,i,f,o){e.texSubImage2D(n>>>0,t,_,r,a,c,i>>>0,f>>>0,o)},arguments)},__wbg_texSubImage2D_0721d9d910ecf097:function(){return te(function(e,n,t,_,r,a,c,i,f,o){e.texSubImage2D(n>>>0,t,_,r,a,c,i>>>0,f>>>0,o)},arguments)},__wbg_texSubImage2D_11c39463147c9d38:function(){return te(function(e,n,t,_,r,a,c,i,f,o){e.texSubImage2D(n>>>0,t,_,r,a,c,i>>>0,f>>>0,o)},arguments)},__wbg_texSubImage2D_21b4316b692aa7bc:function(){return te(function(e,n,t,_,r,a,c,i,f,o){e.texSubImage2D(n>>>0,t,_,r,a,c,i>>>0,f>>>0,o)},arguments)},__wbg_texSubImage2D_339324fe86d9879e:function(){return te(function(e,n,t,_,r,a,c,i,f,o){e.texSubImage2D(n>>>0,t,_,r,a,c,i>>>0,f>>>0,o)},arguments)},__wbg_texSubImage2D_6218009ef1e27c0e:function(){return te(function(e,n,t,_,r,a,c,i,f,o){e.texSubImage2D(n>>>0,t,_,r,a,c,i>>>0,f>>>0,o)},arguments)},__wbg_texSubImage2D_79b4ac26a5580960:function(){return te(function(e,n,t,_,r,a,c,i,f,o){e.texSubImage2D(n>>>0,t,_,r,a,c,i>>>0,f>>>0,o)},arguments)},__wbg_texSubImage2D_892cfa51f196ee93:function(){return te(function(e,n,t,_,r,a,c,i,f,o){e.texSubImage2D(n>>>0,t,_,r,a,c,i>>>0,f>>>0,o)},arguments)},__wbg_texSubImage3D_6458575ddb6df6b3:function(){return te(function(e,n,t,_,r,a,c,i,f,o,u,b){e.texSubImage3D(n>>>0,t,_,r,a,c,i,f,o>>>0,u>>>0,b)},arguments)},__wbg_texSubImage3D_747bc81ed2ed4116:function(){return te(function(e,n,t,_,r,a,c,i,f,o,u,b){e.texSubImage3D(n>>>0,t,_,r,a,c,i,f,o>>>0,u>>>0,b)},arguments)},__wbg_texSubImage3D_7a674dd9403f8be3:function(){return te(function(e,n,t,_,r,a,c,i,f,o,u,b){e.texSubImage3D(n>>>0,t,_,r,a,c,i,f,o>>>0,u>>>0,b)},arguments)},__wbg_texSubImage3D_805532d56bdd814d:function(){return te(function(e,n,t,_,r,a,c,i,f,o,u,b){e.texSubImage3D(n>>>0,t,_,r,a,c,i,f,o>>>0,u>>>0,b)},arguments)},__wbg_texSubImage3D_ad76ff2925daf174:function(){return te(function(e,n,t,_,r,a,c,i,f,o,u,b){e.texSubImage3D(n>>>0,t,_,r,a,c,i,f,o>>>0,u>>>0,b)},arguments)},__wbg_texSubImage3D_c65a616189ed3b19:function(){return te(function(e,n,t,_,r,a,c,i,f,o,u,b){e.texSubImage3D(n>>>0,t,_,r,a,c,i,f,o>>>0,u>>>0,b)},arguments)},__wbg_texSubImage3D_f99458987d5b061a:function(){return te(function(e,n,t,_,r,a,c,i,f,o,u,b){e.texSubImage3D(n>>>0,t,_,r,a,c,i,f,o>>>0,u>>>0,b)},arguments)},__wbg_then_7a850dae4493f353:function(e,n,t){return e.then(n,t)},__wbg_then_b830475380919203:function(e,n){return e.then(n)},__wbg_unconfigure_835307f58dc68d80:function(e){e.unconfigure()},__wbg_uniform1f_6067a9c69ed38c8b:function(e,n,t){e.uniform1f(n,t)},__wbg_uniform1f_d08261cd87e412e0:function(e,n,t){e.uniform1f(n,t)},__wbg_uniform1i_25a3df9f69c2f765:function(e,n,t){e.uniform1i(n,t)},__wbg_uniform1i_89c631d199860f60:function(e,n,t){e.uniform1i(n,t)},__wbg_uniform1ui_58cbbe1a93e44a02:function(e,n,t){e.uniform1ui(n,t>>>0)},__wbg_uniform2fv_6a494ce09154afdb:function(e,n,t,_){e.uniform2fv(n,q(t,_))},__wbg_uniform2fv_f85b3b2779a6c2b9:function(e,n,t,_){e.uniform2fv(n,q(t,_))},__wbg_uniform2iv_5c591a2edfd26c45:function(e,n,t,_){e.uniform2iv(n,G(t,_))},__wbg_uniform2iv_63a2ba7206eaf2b3:function(e,n,t,_){e.uniform2iv(n,G(t,_))},__wbg_uniform2uiv_aaa076c2f50b5c86:function(e,n,t,_){e.uniform2uiv(n,U(t,_))},__wbg_uniform3fv_2e139d144894f1ec:function(e,n,t,_){e.uniform3fv(n,q(t,_))},__wbg_uniform3fv_dfaba6b65cfc2c2b:function(e,n,t,_){e.uniform3fv(n,q(t,_))},__wbg_uniform3iv_700228c611ca323d:function(e,n,t,_){e.uniform3iv(n,G(t,_))},__wbg_uniform3iv_f32512d7179442f8:function(e,n,t,_){e.uniform3iv(n,G(t,_))},__wbg_uniform3uiv_c972de1ee5eb2b48:function(e,n,t,_){e.uniform3uiv(n,U(t,_))},__wbg_uniform4f_b5ea01e0388c425e:function(e,n,t,_,r,a){e.uniform4f(n,t,_,r,a)},__wbg_uniform4f_b9880b3e743b1cf3:function(e,n,t,_,r,a){e.uniform4f(n,t,_,r,a)},__wbg_uniform4fv_0763a5cfb3d561c9:function(e,n,t,_){e.uniform4fv(n,q(t,_))},__wbg_uniform4fv_95b1afba56301916:function(e,n,t,_){e.uniform4fv(n,q(t,_))},__wbg_uniform4iv_1269cd3a3f01909d:function(e,n,t,_){e.uniform4iv(n,G(t,_))},__wbg_uniform4iv_84dc6c0b2ea09256:function(e,n,t,_){e.uniform4iv(n,G(t,_))},__wbg_uniform4uiv_13ca9c250b538d85:function(e,n,t,_){e.uniform4uiv(n,U(t,_))},__wbg_uniformBlockBinding_d97dbfc1886608c9:function(e,n,t,_){e.uniformBlockBinding(n,t>>>0,_>>>0)},__wbg_uniformMatrix2fv_4a95dd9315ceafce:function(e,n,t,_,r){e.uniformMatrix2fv(n,0!==t,q(_,r))},__wbg_uniformMatrix2fv_554c771038fd18e7:function(e,n,t,_,r){e.uniformMatrix2fv(n,0!==t,q(_,r))},__wbg_uniformMatrix2x3fv_18f2ff07b55f7458:function(e,n,t,_,r){e.uniformMatrix2x3fv(n,0!==t,q(_,r))},__wbg_uniformMatrix2x4fv_2b66cdeb52233873:function(e,n,t,_,r){e.uniformMatrix2x4fv(n,0!==t,q(_,r))},__wbg_uniformMatrix3fv_303d7eef53df7ed2:function(e,n,t,_,r){e.uniformMatrix3fv(n,0!==t,q(_,r))},__wbg_uniformMatrix3fv_a9db97f34b3706b3:function(e,n,t,_,r){e.uniformMatrix3fv(n,0!==t,q(_,r))},__wbg_uniformMatrix3x2fv_67c65614f0e122e8:function(e,n,t,_,r){e.uniformMatrix3x2fv(n,0!==t,q(_,r))},__wbg_uniformMatrix3x4fv_e3bd46b1bf5227ed:function(e,n,t,_,r){e.uniformMatrix3x4fv(n,0!==t,q(_,r))},__wbg_uniformMatrix4fv_db6f9ad4f00e3b76:function(e,n,t,_,r){e.uniformMatrix4fv(n,0!==t,q(_,r))},__wbg_uniformMatrix4fv_e411faf4de6021c5:function(e,n,t,_,r){e.uniformMatrix4fv(n,0!==t,q(_,r))},__wbg_uniformMatrix4x2fv_c59133281828fe8e:function(e,n,t,_,r){e.uniformMatrix4x2fv(n,0!==t,q(_,r))},__wbg_uniformMatrix4x3fv_dc85828b88505234:function(e,n,t,_,r){e.uniformMatrix4x3fv(n,0!==t,q(_,r))},__wbg_unmap_6a96b14c9ef5f7f5:function(e){e.unmap()},__wbg_useProgram_7019ac9ef4bdbe96:function(e,n){e.useProgram(n)},__wbg_useProgram_fcab4319331e0094:function(e,n){e.useProgram(n)},__wbg_value_c227f843d21da141:function(e){return e.value},__wbg_vertexAttribDivisorANGLE_5bebd4490e25d0f4:function(e,n,t){e.vertexAttribDivisorANGLE(n>>>0,t>>>0)},__wbg_vertexAttribDivisor_e2a9ba8c397af61b:function(e,n,t){e.vertexAttribDivisor(n>>>0,t>>>0)},__wbg_vertexAttribIPointer_660e209bed7575ab:function(e,n,t,_,r,a){e.vertexAttribIPointer(n>>>0,t,_>>>0,r,a)},__wbg_vertexAttribPointer_b6db7a62b9bda090:function(e,n,t,_,r,a,c){e.vertexAttribPointer(n>>>0,t,_>>>0,0!==r,a,c)},__wbg_vertexAttribPointer_ed019b681b1aaacf:function(e,n,t,_,r,a,c){e.vertexAttribPointer(n>>>0,t,_>>>0,0!==r,a,c)},__wbg_viewport_704a6159fb0395cb:function(e,n,t,_,r){e.viewport(n,t,_,r)},__wbg_viewport_f9d3214251b38c39:function(e,n,t,_,r){e.viewport(n,t,_,r)},__wbg_warn_d3544c7814fab534:function(e){console.warn(e)},__wbg_webrenderer_new:function(e){return n.__wrap(e)},__wbg_writeBuffer_f4bb3f54adfe1330:function(){return te(function(e,n,t,_,r,a,c){e.writeBuffer(n,t,j(_,r),a,c)},arguments)},__wbg_writeTexture_30e592e8c061c3d9:function(){return te(function(e,n,t,_,r,a){e.writeTexture(n,j(t,_),r,a)},arguments)},__wbindgen_generic_0000000000000001:function(e,n){return re(e,n,r)},__wbindgen_generic_0000000000000002:function(e,n){return re(e,n,a)},__wbindgen_generic_0000000000000003:function(e,n){return re(e,n,c)},__wbindgen_generic_0000000000000004:function(e,n){return re(e,n,i)},__wbindgen_generic_0000000000000005:function(e){return e},__wbindgen_generic_0000000000000006:function(e){return e},__wbindgen_generic_0000000000000007:function(e,n){return q(e,n)},__wbindgen_generic_0000000000000008:function(e,n){var t,_;return t=e,_=n,t>>>=0,(null!==J&&0!==J.byteLength||(J=new Int16Array(be.memory.buffer)),J).subarray(t/2,t/2+_)},__wbindgen_generic_0000000000000009:function(e,n){return G(e,n)},__wbindgen_generic_000000000000000a:function(e,n){var t,_;return t=e,_=n,t>>>=0,(null!==X&&0!==X.byteLength||(X=new Int8Array(be.memory.buffer)),X).subarray(t/1,t/1+_)},__wbindgen_generic_000000000000000b:function(e,n){var t,_;return t=e,_=n,t>>>=0,(null!==K&&0!==K.byteLength||(K=new Uint16Array(be.memory.buffer)),K).subarray(t/2,t/2+_)},__wbindgen_generic_000000000000000c:function(e,n){return U(e,n)},__wbindgen_generic_000000000000000d:function(e,n){return j(e,n)},__wbindgen_generic_000000000000000e:function(e,n){return Y(e,n)},__wbindgen_generic_000000000000000f:function(e){return BigInt.asUintN(64,e)},__wbindgen_init_externref_table:function(){const e=be.__wbindgen_externrefs,n=e.grow(4);e.set(0,void 0),e.set(n+0,void 0),e.set(n+1,null),e.set(n+2,!0),e.set(n+3,!1)}};return{__proto__:null,"./editor_view_wasm_bg.js":e}}function r(e,n,t){const _=be.wasm_bindgen_69c280ee226ac681___convert__closures_____invoke___wasm_bindgen_69c280ee226ac681___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_69c280ee226ac681___JsError___true_(e,n,t);if(_[1])throw ce(_[0])}function a(e,n,t){const _=be.wasm_bindgen_69c280ee226ac681___convert__closures_____invoke___wasm_bindgen_69c280ee226ac681___sys__JsNullable_wgpu_c689e10bd176567e___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_ed718c3d60ebd546___result__Result_____wasm_bindgen_69c280ee226ac681___JsError___true_(e,n,t);if(_[1])throw ce(_[0])}function c(e,n,t){const _=be.wasm_bindgen_69c280ee226ac681___convert__closures_____invoke___wasm_bindgen_69c280ee226ac681___sys__JsNullable_wgpu_c689e10bd176567e___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_ed718c3d60ebd546___result__Result_____wasm_bindgen_69c280ee226ac681___JsError___true__22(e,n,t);if(_[1])throw ce(_[0])}function i(e,n,t){const _=be.wasm_bindgen_69c280ee226ac681___convert__closures_____invoke___wasm_bindgen_69c280ee226ac681___sys__JsNullable_wgpu_c689e10bd176567e___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_ed718c3d60ebd546___result__Result_____wasm_bindgen_69c280ee226ac681___JsError___true__23(e,n,t);if(_[1])throw ce(_[0])}Symbol.dispose&&(n.prototype[Symbol.dispose]=n.prototype.free);const f=["clamp-to-edge","repeat","mirror-repeat"],o=["auto"],u=["zero","one","src","one-minus-src","src-alpha","one-minus-src-alpha","dst","one-minus-dst","dst-alpha","one-minus-dst-alpha","src-alpha-saturated","constant","one-minus-constant","src1","one-minus-src1","src1-alpha","one-minus-src1-alpha"],b=["add","subtract","reverse-subtract","min","max"],s=["uniform","storage","read-only-storage"],d=["opaque","premultiplied"],g=["standard","extended"],l=["never","less","equal","less-equal","greater","not-equal","greater-equal","always"],w=["none","front","back"],m=["nearest","linear"],p=["ccw","cw"],h=["uint16","uint32"],x=["load","clear"],y=["nearest","linear"],v=["low-power","high-performance"],S=["point-list","line-list","line-strip","triangle-list","triangle-strip"],I=["filtering","non-filtering","comparison"],A=["keep","zero","replace","invert","increment-clamp","decrement-clamp","increment-wrap","decrement-wrap"],D=["write-only","read-only","read-write"],P=["store","discard"],M=["all","stencil-only","depth-only"],B=["1d","2d","3d"],F=["r8unorm","r8snorm","r8uint","r8sint","r16unorm","r16snorm","r16uint","r16sint","r16float","rg8unorm","rg8snorm","rg8uint","rg8sint","r32uint","r32sint","r32float","rg16unorm","rg16snorm","rg16uint","rg16sint","rg16float","rgba8unorm","rgba8unorm-srgb","rgba8snorm","rgba8uint","rgba8sint","bgra8unorm","bgra8unorm-srgb","rgb9e5ufloat","rgb10a2uint","rgb10a2unorm","rg11b10ufloat","rg32uint","rg32sint","rg32float","rgba16unorm","rgba16snorm","rgba16uint","rgba16sint","rgba16float","rgba32uint","rgba32sint","rgba32float","stencil8","depth16unorm","depth24plus","depth24plus-stencil8","depth32float","depth32float-stencil8","bc1-rgba-unorm","bc1-rgba-unorm-srgb","bc2-rgba-unorm","bc2-rgba-unorm-srgb","bc3-rgba-unorm","bc3-rgba-unorm-srgb","bc4-r-unorm","bc4-r-snorm","bc5-rg-unorm","bc5-rg-snorm","bc6h-rgb-ufloat","bc6h-rgb-float","bc7-rgba-unorm","bc7-rgba-unorm-srgb","etc2-rgb8unorm","etc2-rgb8unorm-srgb","etc2-rgb8a1unorm","etc2-rgb8a1unorm-srgb","etc2-rgba8unorm","etc2-rgba8unorm-srgb","eac-r11unorm","eac-r11snorm","eac-rg11unorm","eac-rg11snorm","astc-4x4-unorm","astc-4x4-unorm-srgb","astc-5x4-unorm","astc-5x4-unorm-srgb","astc-5x5-unorm","astc-5x5-unorm-srgb","astc-6x5-unorm","astc-6x5-unorm-srgb","astc-6x6-unorm","astc-6x6-unorm-srgb","astc-8x5-unorm","astc-8x5-unorm-srgb","astc-8x6-unorm","astc-8x6-unorm-srgb","astc-8x8-unorm","astc-8x8-unorm-srgb","astc-10x5-unorm","astc-10x5-unorm-srgb","astc-10x6-unorm","astc-10x6-unorm-srgb","astc-10x8-unorm","astc-10x8-unorm-srgb","astc-10x10-unorm","astc-10x10-unorm-srgb","astc-12x10-unorm","astc-12x10-unorm-srgb","astc-12x12-unorm","astc-12x12-unorm-srgb"],E=["float","unfilterable-float","depth","sint","uint"],T=["1d","2d","2d-array","cube","cube-array","3d"],R=["uint8","uint8x2","uint8x4","sint8","sint8x2","sint8x4","unorm8","unorm8x2","unorm8x4","snorm8","snorm8x2","snorm8x4","uint16","uint16x2","uint16x4","sint16","sint16x2","sint16x4","unorm16","unorm16x2","unorm16x4","snorm16","snorm16x2","snorm16x4","float16","float16x2","float16x4","float32","float32x2","float32x3","float32x4","uint32","uint32x2","uint32x3","uint32x4","sint32","sint32x2","sint32x3","sint32x4","unorm10-10-10-2","unorm8x4-bgra"],O=["vertex","instance"],k="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>be.__wbg_editorviewhandle_free(e,1)),L="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>be.__wbg_webrenderer_free(e,1));function C(e){const n=be.__externref_table_alloc();return be.__wbindgen_externrefs.set(n,e),n}const W="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>be.__wbindgen_destroy_closure(e.a,e.b));function V(e){const n=typeof e;if("number"==n||"boolean"==n||null==e)return`${e}`;if("string"==n)return`"${e}"`;if("symbol"==n){const n=e.description;return null==n?"Symbol":`Symbol(${n})`}if("function"==n){const n=e.name;return"string"==typeof n&&n.length>0?`Function(${n})`:"Function"}if(Array.isArray(e)){const n=e.length;let t="[";n>0&&(t+=V(e[0]));for(let _=1;_<n;_++)t+=", "+V(e[_]);return t+="]",t}const t=/\[object ([^\]]+)\]/.exec(toString.call(e));let _;if(!(t&&t.length>1))return toString.call(e);if(_=t[1],"Object"==_)try{return"Object("+JSON.stringify(e)+")"}catch(e){return"Object"}return e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:_}function q(e,n){return e>>>=0,function(){null!==H&&0!==H.byteLength||(H=new Float32Array(be.memory.buffer));return H}().subarray(e/4,e/4+n)}function G(e,n){return e>>>=0,function(){null!==Q&&0!==Q.byteLength||(Q=new Int32Array(be.memory.buffer));return Q}().subarray(e/4,e/4+n)}function z(e,n){e>>>=0;const t=$(),_=[];for(let r=e;r<e+4*n;r+=4)_.push(be.__wbindgen_externrefs.get(t.getUint32(r,!0)));return _}function U(e,n){return e>>>=0,function(){null!==Z&&0!==Z.byteLength||(Z=new Uint32Array(be.memory.buffer));return Z}().subarray(e/4,e/4+n)}function j(e,n){return e>>>=0,ne().subarray(e/1,e/1+n)}let N=null;function $(){return(null===N||!0===N.buffer.detached||void 0===N.buffer.detached&&N.buffer!==be.memory.buffer)&&(N=new DataView(be.memory.buffer)),N}let H=null;let J=null;let Q=null;let X=null;function Y(e,n){return function(e,n){oe+=n,oe>=fe&&(ie=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),ie.decode(),oe=n);return ie.decode(ne().subarray(e,e+n))}(e>>>0,n)}let K=null;let Z=null;let ee=null;function ne(){return null!==ee&&0!==ee.byteLength||(ee=new Uint8Array(be.memory.buffer)),ee}function te(e,n){try{return e.apply(this,n)}catch(e){const n=C(e);be.__wbindgen_exn_store(n)}}function _e(e){return null==e}function re(e,n,t){const _={a:e,b:n,cnt:1},r=(...e)=>{_.cnt++;const n=_.a;_.a=0;try{return t(n,_.b,...e)}finally{_.a=n,r._wbg_cb_unref()}};return r._wbg_cb_unref=()=>{0===--_.cnt&&(be.__wbindgen_destroy_closure(_.a,_.b),_.a=0,W.unregister(_))},W.register(r,_,_),r}function ae(e,n,t){if(void 0===t){const t=ue.encode(e),_=n(t.length,1)>>>0;return ne().subarray(_,_+t.length).set(t),se=t.length,_}let _=e.length,r=n(_,1)>>>0;const a=ne();let c=0;for(;c<_;c++){const n=e.charCodeAt(c);if(n>127)break;a[r+c]=n}if(c!==_){0!==c&&(e=e.slice(c)),r=t(r,_,_=c+3*e.length,1)>>>0;const n=ne().subarray(r+c,r+_);c+=ue.encodeInto(e,n).written,r=t(r,_,c,1)>>>0}return se=c,r}function ce(e){const n=be.__wbindgen_externrefs.get(e);return be.__externref_table_dealloc(e),n}let ie=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});ie.decode();const fe=2146435072;let oe=0;const ue=new TextEncoder;"encodeInto"in ue||(ue.encodeInto=function(e,n){const t=ue.encode(e);return n.set(t),{read:e.length,written:t.length}});let be,se=0;function de(e,n){return be=e.exports,N=null,H=null,J=null,Q=null,X=null,K=null,Z=null,ee=null,be.__wbindgen_start(),be}async function ge(e){if(void 0!==be)return be;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?({module_or_path:e}=e):console.warn("using deprecated parameters for the initialization function; pass a single object instead")),void 0===e&&(e=new URL(new URL("editor_view_wasm_bg-Bn_d_uyf.wasm",import.meta.url).href));const n=_();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:t,module:r}=await async function(e,n){if("function"==typeof Response&&e instanceof Response){if(!e.ok)throw new Error(`failed to fetch Wasm: ${e.status} ${e.statusText} fetching '${e.url}'`);if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,n)}catch(n){if(!function(e){switch(e){case"basic":case"cors":case"default":return!0}return!1}(e.type)||"application/wasm"===e.headers.get("Content-Type"))throw n;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",n)}const t=await e.arrayBuffer();return await WebAssembly.instantiate(t,n)}{const t=await WebAssembly.instantiate(e,n);return t instanceof WebAssembly.Instance?{instance:t,module:e}:t}}(await e,n);return de(t)}var le=Object.freeze({__proto__:null,EditorViewHandle:e,WebRenderer:n,default:ge,initSync:function(e){if(void 0!==be)return be;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?({module:e}=e):console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));const n=_();return e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e)),de(new WebAssembly.Instance(e,n))},start:t});let we=null,me=null;async function pe(){if(we)return we;if(me)return me;const e=(async()=>{const e=new URL(new URL("editor_view_wasm_bg-Bn_d_uyf.wasm",import.meta.url).href);let n=e;if("undefined"!=typeof process&&process.versions?.node){const{readFile:t}=await(import("node:fs/promises"));n=await t(e)}return await ge({module_or_path:n}),t(),we=le,we})();me=e;try{return await e}catch(n){throw me===e&&(me=null),n}}function he(){if(!we)throw new Error("WASM not initialized. Call initWasm() first and await it.");return we}function xe(){return null!==we}const ye=/\p{Emoji_Presentation}/u;function ve(e){return ye.test(e)||e.includes("️")||e.includes("⃣")}function Se(e,n){const t=e.match(/(\d+(?:\.\d+)?)px/),_=t?parseFloat(t[1]):n;return{font:t?e.replace(/(\d+(?:\.\d+)?)px/,`${n}px`):e,cssPx:_}}function Ie(e){switch(e){case"auto":return function(){if("undefined"==typeof navigator)return!1;const e=navigator,n=e.userAgentData?.platform||e.platform||e.userAgent||"";return/mac|iphone|ipad|ipod/i.test(n)}()?"antialiased":void 0;case"default":return;default:return e}}function Ae(e={}){const n=Ie(e.fontSmoothing??"auto"),t=void 0!==n&&"undefined"!=typeof document,_=(e,_,r)=>{if(t){const t=document.createElement("canvas");t.width=e,t.height=_,t.style.position="absolute",t.style.left="-99999px",t.style.top="0",t.style.pointerEvents="none",t.style.setProperty("-webkit-font-smoothing",n),t.style.setProperty("-moz-osx-font-smoothing","antialiased"===n?"grayscale":"auto"),document.body.appendChild(t);const a=t.getContext("2d",{willReadFrequently:r});return{canvas:t,ctx:a}}const a=new OffscreenCanvas(e,_),c=a.getContext("2d",{willReadFrequently:r});return{canvas:a,ctx:c}};let r=!1,a=_(256,256,!0);const c=e=>{const{ctx:n}=a;n.font=e,"fontKerning"in n&&(n.fontKerning="normal"),n.textBaseline="alphabetic",n.textAlign="left"},i=e=>{if(0===e.text.length)return null;const{font:n,cssPx:t}=Se(e.cssFont,e.deviceFontPx),_=t>0?e.deviceFontPx/t:1;c(n);const i=a.ctx.measureText(e.text),f=Math.ceil(i.actualBoundingBoxLeft)||0,o=Math.ceil(i.actualBoundingBoxRight)||Math.ceil(i.width),u=Math.ceil(i.actualBoundingBoxAscent)||Math.ceil(.8*e.deviceFontPx),b=Math.ceil(i.actualBoundingBoxDescent)||Math.ceil(.2*e.deviceFontPx),s=e.subpixelOffsetX??0,d=Math.max(1,f+o)+1+1,g=Math.max(1,u+b)+1;if(d>8192||g>8192)return null;var l,w;l=d,w=g,(a.canvas.width<l||a.canvas.height<w)&&(a.canvas.width=Math.max(l,a.canvas.width),a.canvas.height=Math.max(w,a.canvas.height)),c(n);const{ctx:m}=a;if(m.clearRect(0,0,d,g),m.fillStyle="#fff",m.fillText(e.text,f+s,u),r){const n=((e,n)=>{if("undefined"==typeof OffscreenCanvas)return;const t=new OffscreenCanvas(e,n),_=t.getContext("2d");return _&&"function"==typeof t.transferToImageBitmap?(_.drawImage(a.canvas,0,0,e,n,0,0,e,n),t.transferToImageBitmap()):void 0})(d,g);if(n)return{width:d,height:g,bearingX:-f,bearingY:u,advance:i.width/_,format:ve(e.text)?"rgba8":"a8",imageBitmap:n}}const p=m.getImageData(0,0,d,g).data;let h=!1;if(ve(e.text))for(let e=0;e<p.length;e+=4)if(0!==p[e+3]&&(p[e]!==p[e+1]||p[e+1]!==p[e+2])){h=!0;break}if(h){const e=new Uint8Array(p.length);for(let n=0;n<p.length;n+=4){const t=p[n+3];e[n]=Math.round(p[n]*t/255),e[n+1]=Math.round(p[n+1]*t/255),e[n+2]=Math.round(p[n+2]*t/255),e[n+3]=t}return{width:d,height:g,bearingX:-f,bearingY:u,advance:i.width/_,format:"rgba8",pixels:e}}const x=new Uint8Array(d*g);for(let e=0,n=3;e<x.length;e++,n+=4)x[e]=p[n];return{width:d,height:g,bearingX:-f,bearingY:u,advance:i.width/_,format:"a8",pixels:x}};return i.measure=e=>{if(0===e.text.length)return null;const{font:n,cssPx:t}=Se(e.cssFont,e.deviceFontPx),_=t>0?e.deviceFontPx/t:1;return c(n),a.ctx.measureText(e.text).width/_},i.setExternalImageUploadEnabled=e=>{const n=e&&!t&&"undefined"!=typeof OffscreenCanvas&&"function"==typeof OffscreenCanvas.prototype.transferToImageBitmap;if(n===r)return;const c=a.canvas.width,i=a.canvas.height;t&&a.canvas.remove(),r=n,a=_(c,i,!r)},i.dispose=()=>{t&&a.canvas.remove()},i}function De(e){if(null!=e.fontAscent&&null!=e.fontDescent)return e;const n=function(e,n){try{if("undefined"==typeof OffscreenCanvas)return;const t=new OffscreenCanvas(8,8).getContext("2d");if(!t)return;t.font=`${n}px ${e}`,t.textBaseline="alphabetic";const _=t.measureText("Mg"),r=_.fontBoundingBoxAscent,a=_.fontBoundingBoxDescent;if(!(r>0&&a>=0))return;return{ascent:r,descent:a}}catch{return}}(e.fontFamily,e.fontSize);return n?{...e,fontAscent:n.ascent,fontDescent:n.descent}:e}function Pe(e,n){try{n()}catch(n){throw new AggregateError([e,n],"Editor view operation and cleanup both failed.")}throw e}class Me{wasm;handle;renderer;raster;disposed=!1;attachmentGeneration=0;surface=null;constructor(e,n,t,_){this.wasm=e,this.handle=n,this.renderer=t,this.raster=_}static async createHeadless(e){const n=await pe(),t=e.rasterProvider??Ae({fontSmoothing:e.fontSmoothing});try{const _=new n.EditorViewHandle(De(e.config),t);return new Me(n,_,null,t)}catch(e){return Pe(e,()=>t.dispose?.())}}static async create(e,n){const t=await Me.createHeadless(n);try{return await t.attachCanvas(e,n.width,n.height),t}catch(e){return Pe(e,()=>t.dispose())}}async attachCanvas(e,n,t){this.checkAttachment(this.attachmentGeneration);const _=++this.attachmentGeneration;let r;try{r=function(e){return"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas}(e)?await this.wasm.WebRenderer.createForOffscreenCanvas(e,n,t):await this.wasm.WebRenderer.createForCanvas(e,n,t)}catch(n){return Pe(n,()=>this.restoreSurface(e))}try{this.checkAttachment(_),this.raster.setExternalImageUploadEnabled?.("BrowserWebGpu"===r.backend),this.checkAttachment(_),this.handle.resetRasterPlacements()}catch(n){return Pe(n,()=>{try{r.free()}finally{this.restoreSurface(e)}})}const a=this.renderer;this.renderer=r,this.surface={canvas:e,width:n,height:t},a?.free()}restoreSurface(e){this.surface?.canvas===e&&this.renderer?.resize(this.surface.width,this.surface.height)}checkAttachment(e){if(this.disposed)throw new Error("EditorView has been disposed.");if(e!==this.attachmentGeneration)throw new Error("Canvas attachment was superseded by a newer request.")}get backend(){return this.renderer?.backend}setLines(e){this.handle.setLines(e)}applyDelta(e){this.handle.applyDelta(e)}upsertDecoration(e){this.handle.applyDelta({type:"upsertDecoration",decoration:e})}setDecorations(e){this.handle.applyDelta({type:"setDecorations",decorations:e})}decorationRanges(e){return this.handle.decorationRanges(e)}setConfig(e){this.handle.setConfig(De(e))}setViewport(e){this.handle.setViewport(e.width,e.height,e.scrollTop??0,e.scrollLeft??0,e.devicePixelRatio??(globalThis.devicePixelRatio||1))}contentHeight(){return this.handle.contentHeight()}maxLineWidth(e,n){return this.handle.maxLineWidth(e,n)}columnOffset(e,n){return this.handle.columnOffset(e,n)}columnAtOffset(e,n){return this.handle.columnAtOffset(e,n)}hitTest(e,n){return this.handle.hitTest(e,n)}buildSceneStats(){return this.handle.buildSceneStats()}resize(e,n){this.renderer?.resize(e,n),this.surface&&(this.surface={...this.surface,width:e,height:n})}render(){if(!this.renderer)throw new Error("No canvas attached. Call attachCanvas() or create() with a canvas.");return this.renderer.render(this.handle)}dispose(){if(this.disposed)return;this.disposed=!0;const e=this.renderer;this.renderer=null,this.surface=null;const n=[];for(const t of[()=>e?.free(),()=>this.handle.free(),()=>this.raster.dispose?.()])try{t()}catch(e){n.push(e)}if(1===n.length)throw n[0];if(n.length>1)throw new AggregateError(n,"Editor view disposal failed.")}}export{Me as EditorView,he as _getWasm,pe as _initWasm,xe as _isWasmInitialized,Ae as createBrowserCanvasRasterProvider};
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vscode/editor-view",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "A GPU-accelerated editor renderer with a Rust/WASM core (wgpu, WebGPU + WebGL2 fallback)",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist/**/*.js",
|
|
16
|
+
"dist/**/*.d.ts",
|
|
17
|
+
"dist/**/*.wasm",
|
|
18
|
+
"README.md",
|
|
19
|
+
"LICENSE",
|
|
20
|
+
"SECURITY.md"
|
|
21
|
+
],
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/microsoft/vscode-packages.git",
|
|
25
|
+
"directory": "vscode-editor-view"
|
|
26
|
+
},
|
|
27
|
+
"keywords": [
|
|
28
|
+
"vscode",
|
|
29
|
+
"editor",
|
|
30
|
+
"gpu",
|
|
31
|
+
"webgpu",
|
|
32
|
+
"wgpu",
|
|
33
|
+
"wasm",
|
|
34
|
+
"rust",
|
|
35
|
+
"renderer"
|
|
36
|
+
],
|
|
37
|
+
"author": "Microsoft Corporation",
|
|
38
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
39
|
+
"bugs": {
|
|
40
|
+
"url": "https://github.com/microsoft/vscode-packages/issues"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://github.com/microsoft/vscode-packages/tree/main/vscode-editor-view",
|
|
43
|
+
"sideEffects": false,
|
|
44
|
+
"gitHead": "ea63671d0d8be01b13c9979cdce4aa6843a9b550"
|
|
45
|
+
}
|