@astral-sh/ruff-wasm-web 0.15.17 → 0.15.18

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/ruff_wasm.js CHANGED
@@ -1,206 +1,5 @@
1
- let wasm;
1
+ /* @ts-self-types="./ruff_wasm.d.ts" */
2
2
 
3
- let cachedUint8ArrayMemory0 = null;
4
-
5
- function getUint8ArrayMemory0() {
6
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
7
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
8
- }
9
- return cachedUint8ArrayMemory0;
10
- }
11
-
12
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
13
-
14
- cachedTextDecoder.decode();
15
-
16
- const MAX_SAFARI_DECODE_BYTES = 2146435072;
17
- let numBytesDecoded = 0;
18
- function decodeText(ptr, len) {
19
- numBytesDecoded += len;
20
- if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
21
- cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
22
- cachedTextDecoder.decode();
23
- numBytesDecoded = len;
24
- }
25
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
26
- }
27
-
28
- function getStringFromWasm0(ptr, len) {
29
- ptr = ptr >>> 0;
30
- return decodeText(ptr, len);
31
- }
32
-
33
- let WASM_VECTOR_LEN = 0;
34
-
35
- const cachedTextEncoder = new TextEncoder();
36
-
37
- if (!('encodeInto' in cachedTextEncoder)) {
38
- cachedTextEncoder.encodeInto = function (arg, view) {
39
- const buf = cachedTextEncoder.encode(arg);
40
- view.set(buf);
41
- return {
42
- read: arg.length,
43
- written: buf.length
44
- };
45
- }
46
- }
47
-
48
- function passStringToWasm0(arg, malloc, realloc) {
49
-
50
- if (realloc === undefined) {
51
- const buf = cachedTextEncoder.encode(arg);
52
- const ptr = malloc(buf.length, 1) >>> 0;
53
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
54
- WASM_VECTOR_LEN = buf.length;
55
- return ptr;
56
- }
57
-
58
- let len = arg.length;
59
- let ptr = malloc(len, 1) >>> 0;
60
-
61
- const mem = getUint8ArrayMemory0();
62
-
63
- let offset = 0;
64
-
65
- for (; offset < len; offset++) {
66
- const code = arg.charCodeAt(offset);
67
- if (code > 0x7F) break;
68
- mem[ptr + offset] = code;
69
- }
70
-
71
- if (offset !== len) {
72
- if (offset !== 0) {
73
- arg = arg.slice(offset);
74
- }
75
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
76
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
77
- const ret = cachedTextEncoder.encodeInto(arg, view);
78
-
79
- offset += ret.written;
80
- ptr = realloc(ptr, len, offset, 1) >>> 0;
81
- }
82
-
83
- WASM_VECTOR_LEN = offset;
84
- return ptr;
85
- }
86
-
87
- let cachedDataViewMemory0 = null;
88
-
89
- function getDataViewMemory0() {
90
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
91
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
92
- }
93
- return cachedDataViewMemory0;
94
- }
95
-
96
- function isLikeNone(x) {
97
- return x === undefined || x === null;
98
- }
99
-
100
- function debugString(val) {
101
- // primitive types
102
- const type = typeof val;
103
- if (type == 'number' || type == 'boolean' || val == null) {
104
- return `${val}`;
105
- }
106
- if (type == 'string') {
107
- return `"${val}"`;
108
- }
109
- if (type == 'symbol') {
110
- const description = val.description;
111
- if (description == null) {
112
- return 'Symbol';
113
- } else {
114
- return `Symbol(${description})`;
115
- }
116
- }
117
- if (type == 'function') {
118
- const name = val.name;
119
- if (typeof name == 'string' && name.length > 0) {
120
- return `Function(${name})`;
121
- } else {
122
- return 'Function';
123
- }
124
- }
125
- // objects
126
- if (Array.isArray(val)) {
127
- const length = val.length;
128
- let debug = '[';
129
- if (length > 0) {
130
- debug += debugString(val[0]);
131
- }
132
- for(let i = 1; i < length; i++) {
133
- debug += ', ' + debugString(val[i]);
134
- }
135
- debug += ']';
136
- return debug;
137
- }
138
- // Test for built-in
139
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
140
- let className;
141
- if (builtInMatches && builtInMatches.length > 1) {
142
- className = builtInMatches[1];
143
- } else {
144
- // Failed to match the standard '[object ClassName]'
145
- return toString.call(val);
146
- }
147
- if (className == 'Object') {
148
- // we're a user defined class or Object
149
- // JSON.stringify avoids problems with cycles, and is generally much
150
- // easier than looping through ownProperties of `val`.
151
- try {
152
- return 'Object(' + JSON.stringify(val) + ')';
153
- } catch (_) {
154
- return 'Object';
155
- }
156
- }
157
- // errors
158
- if (val instanceof Error) {
159
- return `${val.name}: ${val.message}\n${val.stack}`;
160
- }
161
- // TODO we could test for more things here, like `Set`s and `Map`s.
162
- return className;
163
- }
164
-
165
- function addToExternrefTable0(obj) {
166
- const idx = wasm.__externref_table_alloc();
167
- wasm.__wbindgen_externrefs.set(idx, obj);
168
- return idx;
169
- }
170
-
171
- function handleError(f, args) {
172
- try {
173
- return f.apply(this, args);
174
- } catch (e) {
175
- const idx = addToExternrefTable0(e);
176
- wasm.__wbindgen_exn_store(idx);
177
- }
178
- }
179
-
180
- function getArrayU8FromWasm0(ptr, len) {
181
- ptr = ptr >>> 0;
182
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
183
- }
184
- /**
185
- * Initializes the logger with the given log level.
186
- *
187
- * ## Panics
188
- * If this function is called more than once.
189
- * @param {LogLevel} level
190
- */
191
- export function initLogging(level) {
192
- wasm.initLogging(level);
193
- }
194
-
195
- export function run() {
196
- wasm.run();
197
- }
198
-
199
- function takeFromExternrefTable0(idx) {
200
- const value = wasm.__wbindgen_externrefs.get(idx);
201
- wasm.__externref_table_dealloc(idx);
202
- return value;
203
- }
204
3
  /**
205
4
  * @enum {0 | 1 | 2 | 3 | 4}
206
5
  */
@@ -211,6 +10,7 @@ export const LogLevel = Object.freeze({
211
10
  Warn: 3, "3": "Warn",
212
11
  Error: 4, "4": "Error",
213
12
  });
13
+
214
14
  /**
215
15
  * @enum {0 | 1 | 2}
216
16
  */
@@ -220,46 +20,17 @@ export const PositionEncoding = Object.freeze({
220
20
  Utf32: 2, "2": "Utf32",
221
21
  });
222
22
 
223
- const WorkspaceFinalization = (typeof FinalizationRegistry === 'undefined')
224
- ? { register: () => {}, unregister: () => {} }
225
- : new FinalizationRegistry(ptr => wasm.__wbg_workspace_free(ptr >>> 0, 1));
226
-
227
23
  export class Workspace {
228
-
229
24
  __destroy_into_raw() {
230
25
  const ptr = this.__wbg_ptr;
231
26
  this.__wbg_ptr = 0;
232
27
  WorkspaceFinalization.unregister(this);
233
28
  return ptr;
234
29
  }
235
-
236
30
  free() {
237
31
  const ptr = this.__destroy_into_raw();
238
32
  wasm.__wbg_workspace_free(ptr, 0);
239
33
  }
240
- /**
241
- * @returns {any}
242
- */
243
- static defaultSettings() {
244
- const ret = wasm.workspace_defaultSettings();
245
- if (ret[2]) {
246
- throw takeFromExternrefTable0(ret[1]);
247
- }
248
- return takeFromExternrefTable0(ret[0]);
249
- }
250
- /**
251
- * @param {any} options
252
- * @param {PositionEncoding} position_encoding
253
- */
254
- constructor(options, position_encoding) {
255
- const ret = wasm.workspace_new(options, position_encoding);
256
- if (ret[2]) {
257
- throw takeFromExternrefTable0(ret[1]);
258
- }
259
- this.__wbg_ptr = ret[0] >>> 0;
260
- WorkspaceFinalization.register(this, this.__wbg_ptr, this);
261
- return this;
262
- }
263
34
  /**
264
35
  * @param {string} contents
265
36
  * @returns {any}
@@ -274,17 +45,16 @@ export class Workspace {
274
45
  return takeFromExternrefTable0(ret[0]);
275
46
  }
276
47
  /**
277
- * Parses the content and returns its AST
278
48
  * @param {string} contents
279
49
  * @returns {string}
280
50
  */
281
- parse(contents) {
51
+ comments(contents) {
282
52
  let deferred3_0;
283
53
  let deferred3_1;
284
54
  try {
285
55
  const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
286
56
  const len0 = WASM_VECTOR_LEN;
287
- const ret = wasm.workspace_parse(this.__wbg_ptr, ptr0, len0);
57
+ const ret = wasm.workspace_comments(this.__wbg_ptr, ptr0, len0);
288
58
  var ptr2 = ret[0];
289
59
  var len2 = ret[1];
290
60
  if (ret[3]) {
@@ -298,6 +68,16 @@ export class Workspace {
298
68
  wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
299
69
  }
300
70
  }
71
+ /**
72
+ * @returns {any}
73
+ */
74
+ static defaultSettings() {
75
+ const ret = wasm.workspace_defaultSettings();
76
+ if (ret[2]) {
77
+ throw takeFromExternrefTable0(ret[1]);
78
+ }
79
+ return takeFromExternrefTable0(ret[0]);
80
+ }
301
81
  /**
302
82
  * @param {string} contents
303
83
  * @returns {string}
@@ -326,13 +106,13 @@ export class Workspace {
326
106
  * @param {string} contents
327
107
  * @returns {string}
328
108
  */
329
- tokens(contents) {
109
+ format_ir(contents) {
330
110
  let deferred3_0;
331
111
  let deferred3_1;
332
112
  try {
333
113
  const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
334
114
  const len0 = WASM_VECTOR_LEN;
335
- const ret = wasm.workspace_tokens(this.__wbg_ptr, ptr0, len0);
115
+ const ret = wasm.workspace_format_ir(this.__wbg_ptr, ptr0, len0);
336
116
  var ptr2 = ret[0];
337
117
  var len2 = ret[1];
338
118
  if (ret[3]) {
@@ -347,31 +127,30 @@ export class Workspace {
347
127
  }
348
128
  }
349
129
  /**
350
- * @returns {string}
130
+ * @param {any} options
131
+ * @param {PositionEncoding} position_encoding
351
132
  */
352
- static version() {
353
- let deferred1_0;
354
- let deferred1_1;
355
- try {
356
- const ret = wasm.workspace_version();
357
- deferred1_0 = ret[0];
358
- deferred1_1 = ret[1];
359
- return getStringFromWasm0(ret[0], ret[1]);
360
- } finally {
361
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
133
+ constructor(options, position_encoding) {
134
+ const ret = wasm.workspace_new(options, position_encoding);
135
+ if (ret[2]) {
136
+ throw takeFromExternrefTable0(ret[1]);
362
137
  }
138
+ this.__wbg_ptr = ret[0];
139
+ WorkspaceFinalization.register(this, this.__wbg_ptr, this);
140
+ return this;
363
141
  }
364
142
  /**
143
+ * Parses the content and returns its AST
365
144
  * @param {string} contents
366
145
  * @returns {string}
367
146
  */
368
- comments(contents) {
147
+ parse(contents) {
369
148
  let deferred3_0;
370
149
  let deferred3_1;
371
150
  try {
372
151
  const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
373
152
  const len0 = WASM_VECTOR_LEN;
374
- const ret = wasm.workspace_comments(this.__wbg_ptr, ptr0, len0);
153
+ const ret = wasm.workspace_parse(this.__wbg_ptr, ptr0, len0);
375
154
  var ptr2 = ret[0];
376
155
  var len2 = ret[1];
377
156
  if (ret[3]) {
@@ -389,13 +168,13 @@ export class Workspace {
389
168
  * @param {string} contents
390
169
  * @returns {string}
391
170
  */
392
- format_ir(contents) {
171
+ tokens(contents) {
393
172
  let deferred3_0;
394
173
  let deferred3_1;
395
174
  try {
396
175
  const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
397
176
  const len0 = WASM_VECTOR_LEN;
398
- const ret = wasm.workspace_format_ir(this.__wbg_ptr, ptr0, len0);
177
+ const ret = wasm.workspace_tokens(this.__wbg_ptr, ptr0, len0);
399
178
  var ptr2 = ret[0];
400
179
  var len2 = ret[1];
401
180
  if (ret[3]) {
@@ -409,352 +188,568 @@ export class Workspace {
409
188
  wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
410
189
  }
411
190
  }
191
+ /**
192
+ * @returns {string}
193
+ */
194
+ static version() {
195
+ let deferred1_0;
196
+ let deferred1_1;
197
+ try {
198
+ const ret = wasm.workspace_version();
199
+ deferred1_0 = ret[0];
200
+ deferred1_1 = ret[1];
201
+ return getStringFromWasm0(ret[0], ret[1]);
202
+ } finally {
203
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
204
+ }
205
+ }
412
206
  }
413
207
  if (Symbol.dispose) Workspace.prototype[Symbol.dispose] = Workspace.prototype.free;
414
208
 
415
- const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
209
+ /**
210
+ * Initializes the logger with the given log level.
211
+ *
212
+ * ## Panics
213
+ * If this function is called more than once.
214
+ * @param {LogLevel} level
215
+ */
216
+ export function initLogging(level) {
217
+ wasm.initLogging(level);
218
+ }
219
+
220
+ export function run() {
221
+ wasm.run();
222
+ }
223
+ function __wbg_get_imports() {
224
+ const import0 = {
225
+ __proto__: null,
226
+ __wbg_Error_9dc85fe1bc224456: function(arg0, arg1) {
227
+ const ret = Error(getStringFromWasm0(arg0, arg1));
228
+ return ret;
229
+ },
230
+ __wbg_Number_4779d427bae39753: function(arg0) {
231
+ const ret = Number(arg0);
232
+ return ret;
233
+ },
234
+ __wbg_String_8564e559799eccda: function(arg0, arg1) {
235
+ const ret = String(arg1);
236
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
237
+ const len1 = WASM_VECTOR_LEN;
238
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
239
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
240
+ },
241
+ __wbg___wbindgen_bigint_get_as_i64_8ea6736501f396b6: function(arg0, arg1) {
242
+ const v = arg1;
243
+ const ret = typeof(v) === 'bigint' ? v : undefined;
244
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
245
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
246
+ },
247
+ __wbg___wbindgen_boolean_get_b131b2f36d6b2f55: function(arg0) {
248
+ const v = arg0;
249
+ const ret = typeof(v) === 'boolean' ? v : undefined;
250
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
251
+ },
252
+ __wbg___wbindgen_debug_string_56c147eb1a51f0c4: function(arg0, arg1) {
253
+ const ret = debugString(arg1);
254
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
255
+ const len1 = WASM_VECTOR_LEN;
256
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
257
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
258
+ },
259
+ __wbg___wbindgen_in_ce8569b2fc6f5088: function(arg0, arg1) {
260
+ const ret = arg0 in arg1;
261
+ return ret;
262
+ },
263
+ __wbg___wbindgen_is_bigint_df272c65456269c2: function(arg0) {
264
+ const ret = typeof(arg0) === 'bigint';
265
+ return ret;
266
+ },
267
+ __wbg___wbindgen_is_function_147961669f068cd4: function(arg0) {
268
+ const ret = typeof(arg0) === 'function';
269
+ return ret;
270
+ },
271
+ __wbg___wbindgen_is_object_3a2c414391dbf751: function(arg0) {
272
+ const val = arg0;
273
+ const ret = typeof(val) === 'object' && val !== null;
274
+ return ret;
275
+ },
276
+ __wbg___wbindgen_is_string_6541b0f6ecd4e8e5: function(arg0) {
277
+ const ret = typeof(arg0) === 'string';
278
+ return ret;
279
+ },
280
+ __wbg___wbindgen_is_undefined_4410e3c20a99fa97: function(arg0) {
281
+ const ret = arg0 === undefined;
282
+ return ret;
283
+ },
284
+ __wbg___wbindgen_jsval_eq_174c93ec61bab0c5: function(arg0, arg1) {
285
+ const ret = arg0 === arg1;
286
+ return ret;
287
+ },
288
+ __wbg___wbindgen_jsval_loose_eq_e07e3b1f5db6da6c: function(arg0, arg1) {
289
+ const ret = arg0 == arg1;
290
+ return ret;
291
+ },
292
+ __wbg___wbindgen_number_get_588ed6b97f0d7e14: function(arg0, arg1) {
293
+ const obj = arg1;
294
+ const ret = typeof(obj) === 'number' ? obj : undefined;
295
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
296
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
297
+ },
298
+ __wbg___wbindgen_string_get_fa2687d531ed17a5: function(arg0, arg1) {
299
+ const obj = arg1;
300
+ const ret = typeof(obj) === 'string' ? obj : undefined;
301
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
302
+ var len1 = WASM_VECTOR_LEN;
303
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
304
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
305
+ },
306
+ __wbg___wbindgen_throw_bbadd78c1bac3a77: function(arg0, arg1) {
307
+ throw new Error(getStringFromWasm0(arg0, arg1));
308
+ },
309
+ __wbg_call_91f00ddc43e01490: function() { return handleError(function (arg0, arg1) {
310
+ const ret = arg0.call(arg1);
311
+ return ret;
312
+ }, arguments); },
313
+ __wbg_codePointAt_92c678dd76a87be4: function(arg0, arg1) {
314
+ const ret = arg0.codePointAt(arg1 >>> 0);
315
+ return ret;
316
+ },
317
+ __wbg_debug_de823612d4d12f74: function(arg0) {
318
+ console.debug(arg0);
319
+ },
320
+ __wbg_done_6a8439e544ec6206: function(arg0) {
321
+ const ret = arg0.done;
322
+ return ret;
323
+ },
324
+ __wbg_entries_5a6a7e7e0df09fe5: function(arg0) {
325
+ const ret = Object.entries(arg0);
326
+ return ret;
327
+ },
328
+ __wbg_error_6651fee1c71e5da9: function(arg0) {
329
+ console.error(arg0);
330
+ },
331
+ __wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
332
+ let deferred0_0;
333
+ let deferred0_1;
334
+ try {
335
+ deferred0_0 = arg0;
336
+ deferred0_1 = arg1;
337
+ console.error(getStringFromWasm0(arg0, arg1));
338
+ } finally {
339
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
340
+ }
341
+ },
342
+ __wbg_fromCodePoint_9732a81eca648320: function() { return handleError(function (arg0) {
343
+ const ret = String.fromCodePoint(arg0 >>> 0);
344
+ return ret;
345
+ }, arguments); },
346
+ __wbg_get_44e98e27bda25b5b: function() { return handleError(function (arg0, arg1) {
347
+ const ret = Reflect.get(arg0, arg1);
348
+ return ret;
349
+ }, arguments); },
350
+ __wbg_get_4b90d6d8c5deb5d5: function(arg0, arg1) {
351
+ const ret = arg0[arg1 >>> 0];
352
+ return ret;
353
+ },
354
+ __wbg_get_unchecked_46e778e3cec74b5e: function(arg0, arg1) {
355
+ const ret = arg0[arg1 >>> 0];
356
+ return ret;
357
+ },
358
+ __wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
359
+ const ret = arg0[arg1];
360
+ return ret;
361
+ },
362
+ __wbg_info_a2b5f8a5dae8b26c: function(arg0) {
363
+ console.info(arg0);
364
+ },
365
+ __wbg_instanceof_ArrayBuffer_a581da923203f29f: function(arg0) {
366
+ let result;
367
+ try {
368
+ result = arg0 instanceof ArrayBuffer;
369
+ } catch (_) {
370
+ result = false;
371
+ }
372
+ const ret = result;
373
+ return ret;
374
+ },
375
+ __wbg_instanceof_Map_7f94c740225003e2: function(arg0) {
376
+ let result;
377
+ try {
378
+ result = arg0 instanceof Map;
379
+ } catch (_) {
380
+ result = false;
381
+ }
382
+ const ret = result;
383
+ return ret;
384
+ },
385
+ __wbg_instanceof_Uint8Array_b6fe1ac89eba107e: function(arg0) {
386
+ let result;
387
+ try {
388
+ result = arg0 instanceof Uint8Array;
389
+ } catch (_) {
390
+ result = false;
391
+ }
392
+ const ret = result;
393
+ return ret;
394
+ },
395
+ __wbg_isArray_139f48e3c057ede8: function(arg0) {
396
+ const ret = Array.isArray(arg0);
397
+ return ret;
398
+ },
399
+ __wbg_isSafeInteger_c22ccb4af2201fe9: function(arg0) {
400
+ const ret = Number.isSafeInteger(arg0);
401
+ return ret;
402
+ },
403
+ __wbg_iterator_9b36cebf3be7b7cd: function() {
404
+ const ret = Symbol.iterator;
405
+ return ret;
406
+ },
407
+ __wbg_length_68a9d5278d084f4f: function(arg0) {
408
+ const ret = arg0.length;
409
+ return ret;
410
+ },
411
+ __wbg_length_7abf942ae12c9744: function(arg0) {
412
+ const ret = arg0.length;
413
+ return ret;
414
+ },
415
+ __wbg_length_fb04d16d7bdf6d4c: function(arg0) {
416
+ const ret = arg0.length;
417
+ return ret;
418
+ },
419
+ __wbg_log_6614a4effdb4e983: function(arg0) {
420
+ console.log(arg0);
421
+ },
422
+ __wbg_new_0b303268aa395a38: function() {
423
+ const ret = new Array();
424
+ return ret;
425
+ },
426
+ __wbg_new_20b778a4c5c691c3: function() {
427
+ const ret = new Object();
428
+ return ret;
429
+ },
430
+ __wbg_new_227d7c05414eb861: function() {
431
+ const ret = new Error();
432
+ return ret;
433
+ },
434
+ __wbg_new_5fae30e6b23db8df: function(arg0, arg1) {
435
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
436
+ return ret;
437
+ },
438
+ __wbg_new_883c0db065f06efd: function() {
439
+ const ret = new Map();
440
+ return ret;
441
+ },
442
+ __wbg_new_b06772b280cc6e52: function(arg0) {
443
+ const ret = new Uint8Array(arg0);
444
+ return ret;
445
+ },
446
+ __wbg_next_8cb028b6ba50743f: function() { return handleError(function (arg0) {
447
+ const ret = arg0.next();
448
+ return ret;
449
+ }, arguments); },
450
+ __wbg_next_cfd0b146c9538df8: function(arg0) {
451
+ const ret = arg0.next;
452
+ return ret;
453
+ },
454
+ __wbg_prototypesetcall_956c7493c68e29b4: function(arg0, arg1, arg2) {
455
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
456
+ },
457
+ __wbg_set_5f806304fb633ab3: function(arg0, arg1, arg2) {
458
+ const ret = arg0.set(arg1, arg2);
459
+ return ret;
460
+ },
461
+ __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
462
+ arg0[arg1] = arg2;
463
+ },
464
+ __wbg_set_da33c120a6584674: function(arg0, arg1, arg2) {
465
+ arg0[arg1 >>> 0] = arg2;
466
+ },
467
+ __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
468
+ const ret = arg1.stack;
469
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
470
+ const len1 = WASM_VECTOR_LEN;
471
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
472
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
473
+ },
474
+ __wbg_value_3d3defe09fb1ffca: function(arg0) {
475
+ const ret = arg0.value;
476
+ return ret;
477
+ },
478
+ __wbg_warn_633bacc13ba7e6c3: function(arg0) {
479
+ console.warn(arg0);
480
+ },
481
+ __wbindgen_cast_0000000000000001: function(arg0) {
482
+ // Cast intrinsic for `F64 -> Externref`.
483
+ const ret = arg0;
484
+ return ret;
485
+ },
486
+ __wbindgen_cast_0000000000000002: function(arg0) {
487
+ // Cast intrinsic for `I64 -> Externref`.
488
+ const ret = arg0;
489
+ return ret;
490
+ },
491
+ __wbindgen_cast_0000000000000003: function(arg0, arg1) {
492
+ // Cast intrinsic for `Ref(String) -> Externref`.
493
+ const ret = getStringFromWasm0(arg0, arg1);
494
+ return ret;
495
+ },
496
+ __wbindgen_cast_0000000000000004: function(arg0) {
497
+ // Cast intrinsic for `U64 -> Externref`.
498
+ const ret = BigInt.asUintN(64, arg0);
499
+ return ret;
500
+ },
501
+ __wbindgen_init_externref_table: function() {
502
+ const table = wasm.__wbindgen_externrefs;
503
+ const offset = table.grow(4);
504
+ table.set(0, undefined);
505
+ table.set(offset + 0, undefined);
506
+ table.set(offset + 1, null);
507
+ table.set(offset + 2, true);
508
+ table.set(offset + 3, false);
509
+ },
510
+ };
511
+ return {
512
+ __proto__: null,
513
+ "./ruff_wasm_bg.js": import0,
514
+ };
515
+ }
516
+
517
+ const WorkspaceFinalization = (typeof FinalizationRegistry === 'undefined')
518
+ ? { register: () => {}, unregister: () => {} }
519
+ : new FinalizationRegistry(ptr => wasm.__wbg_workspace_free(ptr, 1));
520
+
521
+ function addToExternrefTable0(obj) {
522
+ const idx = wasm.__externref_table_alloc();
523
+ wasm.__wbindgen_externrefs.set(idx, obj);
524
+ return idx;
525
+ }
526
+
527
+ function debugString(val) {
528
+ // primitive types
529
+ const type = typeof val;
530
+ if (type == 'number' || type == 'boolean' || val == null) {
531
+ return `${val}`;
532
+ }
533
+ if (type == 'string') {
534
+ return `"${val}"`;
535
+ }
536
+ if (type == 'symbol') {
537
+ const description = val.description;
538
+ if (description == null) {
539
+ return 'Symbol';
540
+ } else {
541
+ return `Symbol(${description})`;
542
+ }
543
+ }
544
+ if (type == 'function') {
545
+ const name = val.name;
546
+ if (typeof name == 'string' && name.length > 0) {
547
+ return `Function(${name})`;
548
+ } else {
549
+ return 'Function';
550
+ }
551
+ }
552
+ // objects
553
+ if (Array.isArray(val)) {
554
+ const length = val.length;
555
+ let debug = '[';
556
+ if (length > 0) {
557
+ debug += debugString(val[0]);
558
+ }
559
+ for(let i = 1; i < length; i++) {
560
+ debug += ', ' + debugString(val[i]);
561
+ }
562
+ debug += ']';
563
+ return debug;
564
+ }
565
+ // Test for built-in
566
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
567
+ let className;
568
+ if (builtInMatches && builtInMatches.length > 1) {
569
+ className = builtInMatches[1];
570
+ } else {
571
+ // Failed to match the standard '[object ClassName]'
572
+ return toString.call(val);
573
+ }
574
+ if (className == 'Object') {
575
+ // we're a user defined class or Object
576
+ // JSON.stringify avoids problems with cycles, and is generally much
577
+ // easier than looping through ownProperties of `val`.
578
+ try {
579
+ return 'Object(' + JSON.stringify(val) + ')';
580
+ } catch (_) {
581
+ return 'Object';
582
+ }
583
+ }
584
+ // errors
585
+ if (val instanceof Error) {
586
+ return `${val.name}: ${val.message}\n${val.stack}`;
587
+ }
588
+ // TODO we could test for more things here, like `Set`s and `Map`s.
589
+ return className;
590
+ }
591
+
592
+ function getArrayU8FromWasm0(ptr, len) {
593
+ ptr = ptr >>> 0;
594
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
595
+ }
596
+
597
+ let cachedDataViewMemory0 = null;
598
+ function getDataViewMemory0() {
599
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
600
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
601
+ }
602
+ return cachedDataViewMemory0;
603
+ }
604
+
605
+ function getStringFromWasm0(ptr, len) {
606
+ return decodeText(ptr >>> 0, len);
607
+ }
608
+
609
+ let cachedUint8ArrayMemory0 = null;
610
+ function getUint8ArrayMemory0() {
611
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
612
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
613
+ }
614
+ return cachedUint8ArrayMemory0;
615
+ }
616
+
617
+ function handleError(f, args) {
618
+ try {
619
+ return f.apply(this, args);
620
+ } catch (e) {
621
+ const idx = addToExternrefTable0(e);
622
+ wasm.__wbindgen_exn_store(idx);
623
+ }
624
+ }
625
+
626
+ function isLikeNone(x) {
627
+ return x === undefined || x === null;
628
+ }
629
+
630
+ function passStringToWasm0(arg, malloc, realloc) {
631
+ if (realloc === undefined) {
632
+ const buf = cachedTextEncoder.encode(arg);
633
+ const ptr = malloc(buf.length, 1) >>> 0;
634
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
635
+ WASM_VECTOR_LEN = buf.length;
636
+ return ptr;
637
+ }
638
+
639
+ let len = arg.length;
640
+ let ptr = malloc(len, 1) >>> 0;
641
+
642
+ const mem = getUint8ArrayMemory0();
643
+
644
+ let offset = 0;
645
+
646
+ for (; offset < len; offset++) {
647
+ const code = arg.charCodeAt(offset);
648
+ if (code > 0x7F) break;
649
+ mem[ptr + offset] = code;
650
+ }
651
+ if (offset !== len) {
652
+ if (offset !== 0) {
653
+ arg = arg.slice(offset);
654
+ }
655
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
656
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
657
+ const ret = cachedTextEncoder.encodeInto(arg, view);
658
+
659
+ offset += ret.written;
660
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
661
+ }
662
+
663
+ WASM_VECTOR_LEN = offset;
664
+ return ptr;
665
+ }
666
+
667
+ function takeFromExternrefTable0(idx) {
668
+ const value = wasm.__wbindgen_externrefs.get(idx);
669
+ wasm.__externref_table_dealloc(idx);
670
+ return value;
671
+ }
672
+
673
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
674
+ cachedTextDecoder.decode();
675
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
676
+ let numBytesDecoded = 0;
677
+ function decodeText(ptr, len) {
678
+ numBytesDecoded += len;
679
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
680
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
681
+ cachedTextDecoder.decode();
682
+ numBytesDecoded = len;
683
+ }
684
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
685
+ }
686
+
687
+ const cachedTextEncoder = new TextEncoder();
688
+
689
+ if (!('encodeInto' in cachedTextEncoder)) {
690
+ cachedTextEncoder.encodeInto = function (arg, view) {
691
+ const buf = cachedTextEncoder.encode(arg);
692
+ view.set(buf);
693
+ return {
694
+ read: arg.length,
695
+ written: buf.length
696
+ };
697
+ };
698
+ }
699
+
700
+ let WASM_VECTOR_LEN = 0;
701
+
702
+ let wasmModule, wasmInstance, wasm;
703
+ function __wbg_finalize_init(instance, module) {
704
+ wasmInstance = instance;
705
+ wasm = instance.exports;
706
+ wasmModule = module;
707
+ cachedDataViewMemory0 = null;
708
+ cachedUint8ArrayMemory0 = null;
709
+ wasm.__wbindgen_start();
710
+ return wasm;
711
+ }
416
712
 
417
713
  async function __wbg_load(module, imports) {
418
714
  if (typeof Response === 'function' && module instanceof Response) {
419
715
  if (typeof WebAssembly.instantiateStreaming === 'function') {
420
716
  try {
421
717
  return await WebAssembly.instantiateStreaming(module, imports);
422
-
423
718
  } catch (e) {
424
- const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
719
+ const validResponse = module.ok && expectedResponseType(module.type);
425
720
 
426
721
  if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
427
722
  console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
428
723
 
429
- } else {
430
- throw e;
431
- }
724
+ } else { throw e; }
432
725
  }
433
726
  }
434
727
 
435
728
  const bytes = await module.arrayBuffer();
436
729
  return await WebAssembly.instantiate(bytes, imports);
437
-
438
730
  } else {
439
731
  const instance = await WebAssembly.instantiate(module, imports);
440
732
 
441
733
  if (instance instanceof WebAssembly.Instance) {
442
734
  return { instance, module };
443
-
444
735
  } else {
445
736
  return instance;
446
737
  }
447
738
  }
448
- }
449
739
 
450
- function __wbg_get_imports() {
451
- const imports = {};
452
- imports.wbg = {};
453
- imports.wbg.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
454
- const ret = Error(getStringFromWasm0(arg0, arg1));
455
- return ret;
456
- };
457
- imports.wbg.__wbg_Number_bb48ca12f395cd08 = function(arg0) {
458
- const ret = Number(arg0);
459
- return ret;
460
- };
461
- imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
462
- const ret = String(arg1);
463
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
464
- const len1 = WASM_VECTOR_LEN;
465
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
466
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
467
- };
468
- imports.wbg.__wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd = function(arg0, arg1) {
469
- const v = arg1;
470
- const ret = typeof(v) === 'bigint' ? v : undefined;
471
- getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
472
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
473
- };
474
- imports.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68 = function(arg0) {
475
- const v = arg0;
476
- const ret = typeof(v) === 'boolean' ? v : undefined;
477
- return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
478
- };
479
- imports.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
480
- const ret = debugString(arg1);
481
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
482
- const len1 = WASM_VECTOR_LEN;
483
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
484
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
485
- };
486
- imports.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f = function(arg0, arg1) {
487
- const ret = arg0 in arg1;
488
- return ret;
489
- };
490
- imports.wbg.__wbg___wbindgen_is_bigint_cb320707dcd35f0b = function(arg0) {
491
- const ret = typeof(arg0) === 'bigint';
492
- return ret;
493
- };
494
- imports.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
495
- const ret = typeof(arg0) === 'function';
496
- return ret;
497
- };
498
- imports.wbg.__wbg___wbindgen_is_object_c818261d21f283a4 = function(arg0) {
499
- const val = arg0;
500
- const ret = typeof(val) === 'object' && val !== null;
501
- return ret;
502
- };
503
- imports.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd = function(arg0) {
504
- const ret = typeof(arg0) === 'string';
505
- return ret;
506
- };
507
- imports.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
508
- const ret = arg0 === undefined;
509
- return ret;
510
- };
511
- imports.wbg.__wbg___wbindgen_jsval_eq_6b13ab83478b1c50 = function(arg0, arg1) {
512
- const ret = arg0 === arg1;
513
- return ret;
514
- };
515
- imports.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147 = function(arg0, arg1) {
516
- const ret = arg0 == arg1;
517
- return ret;
518
- };
519
- imports.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
520
- const obj = arg1;
521
- const ret = typeof(obj) === 'number' ? obj : undefined;
522
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
523
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
524
- };
525
- imports.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
526
- const obj = arg1;
527
- const ret = typeof(obj) === 'string' ? obj : undefined;
528
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
529
- var len1 = WASM_VECTOR_LEN;
530
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
531
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
532
- };
533
- imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
534
- throw new Error(getStringFromWasm0(arg0, arg1));
535
- };
536
- imports.wbg.__wbg_call_e762c39fa8ea36bf = function() { return handleError(function (arg0, arg1) {
537
- const ret = arg0.call(arg1);
538
- return ret;
539
- }, arguments) };
540
- imports.wbg.__wbg_codePointAt_01a186303396f7ad = function(arg0, arg1) {
541
- const ret = arg0.codePointAt(arg1 >>> 0);
542
- return ret;
543
- };
544
- imports.wbg.__wbg_debug_f4b0c59db649db48 = function(arg0) {
545
- console.debug(arg0);
546
- };
547
- imports.wbg.__wbg_done_2042aa2670fb1db1 = function(arg0) {
548
- const ret = arg0.done;
549
- return ret;
550
- };
551
- imports.wbg.__wbg_entries_e171b586f8f6bdbf = function(arg0) {
552
- const ret = Object.entries(arg0);
553
- return ret;
554
- };
555
- imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
556
- let deferred0_0;
557
- let deferred0_1;
558
- try {
559
- deferred0_0 = arg0;
560
- deferred0_1 = arg1;
561
- console.error(getStringFromWasm0(arg0, arg1));
562
- } finally {
563
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
740
+ function expectedResponseType(type) {
741
+ switch (type) {
742
+ case 'basic': case 'cors': case 'default': return true;
564
743
  }
565
- };
566
- imports.wbg.__wbg_error_a7f8fbb0523dae15 = function(arg0) {
567
- console.error(arg0);
568
- };
569
- imports.wbg.__wbg_fromCodePoint_a1c5bb992dc05846 = function() { return handleError(function (arg0) {
570
- const ret = String.fromCodePoint(arg0 >>> 0);
571
- return ret;
572
- }, arguments) };
573
- imports.wbg.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
574
- const ret = arg0[arg1 >>> 0];
575
- return ret;
576
- };
577
- imports.wbg.__wbg_get_efcb449f58ec27c2 = function() { return handleError(function (arg0, arg1) {
578
- const ret = Reflect.get(arg0, arg1);
579
- return ret;
580
- }, arguments) };
581
- imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
582
- const ret = arg0[arg1];
583
- return ret;
584
- };
585
- imports.wbg.__wbg_info_e674a11f4f50cc0c = function(arg0) {
586
- console.info(arg0);
587
- };
588
- imports.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
589
- let result;
590
- try {
591
- result = arg0 instanceof ArrayBuffer;
592
- } catch (_) {
593
- result = false;
594
- }
595
- const ret = result;
596
- return ret;
597
- };
598
- imports.wbg.__wbg_instanceof_Map_8579b5e2ab5437c7 = function(arg0) {
599
- let result;
600
- try {
601
- result = arg0 instanceof Map;
602
- } catch (_) {
603
- result = false;
604
- }
605
- const ret = result;
606
- return ret;
607
- };
608
- imports.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
609
- let result;
610
- try {
611
- result = arg0 instanceof Uint8Array;
612
- } catch (_) {
613
- result = false;
614
- }
615
- const ret = result;
616
- return ret;
617
- };
618
- imports.wbg.__wbg_isArray_96e0af9891d0945d = function(arg0) {
619
- const ret = Array.isArray(arg0);
620
- return ret;
621
- };
622
- imports.wbg.__wbg_isSafeInteger_d216eda7911dde36 = function(arg0) {
623
- const ret = Number.isSafeInteger(arg0);
624
- return ret;
625
- };
626
- imports.wbg.__wbg_iterator_e5822695327a3c39 = function() {
627
- const ret = Symbol.iterator;
628
- return ret;
629
- };
630
- imports.wbg.__wbg_length_69bca3cb64fc8748 = function(arg0) {
631
- const ret = arg0.length;
632
- return ret;
633
- };
634
- imports.wbg.__wbg_length_a95b69f903b746c4 = function(arg0) {
635
- const ret = arg0.length;
636
- return ret;
637
- };
638
- imports.wbg.__wbg_length_cdd215e10d9dd507 = function(arg0) {
639
- const ret = arg0.length;
640
- return ret;
641
- };
642
- imports.wbg.__wbg_log_8cec76766b8c0e33 = function(arg0) {
643
- console.log(arg0);
644
- };
645
- imports.wbg.__wbg_new_1acc0b6eea89d040 = function() {
646
- const ret = new Object();
647
- return ret;
648
- };
649
- imports.wbg.__wbg_new_5a79be3ab53b8aa5 = function(arg0) {
650
- const ret = new Uint8Array(arg0);
651
- return ret;
652
- };
653
- imports.wbg.__wbg_new_68651c719dcda04e = function() {
654
- const ret = new Map();
655
- return ret;
656
- };
657
- imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
658
- const ret = new Error();
659
- return ret;
660
- };
661
- imports.wbg.__wbg_new_a7442b4b19c1a356 = function(arg0, arg1) {
662
- const ret = new Error(getStringFromWasm0(arg0, arg1));
663
- return ret;
664
- };
665
- imports.wbg.__wbg_new_e17d9f43105b08be = function() {
666
- const ret = new Array();
667
- return ret;
668
- };
669
- imports.wbg.__wbg_next_020810e0ae8ebcb0 = function() { return handleError(function (arg0) {
670
- const ret = arg0.next();
671
- return ret;
672
- }, arguments) };
673
- imports.wbg.__wbg_next_2c826fe5dfec6b6a = function(arg0) {
674
- const ret = arg0.next;
675
- return ret;
676
- };
677
- imports.wbg.__wbg_now_793306c526e2e3b6 = function() {
678
- const ret = Date.now();
679
- return ret;
680
- };
681
- imports.wbg.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
682
- Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
683
- };
684
- imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
685
- arg0[arg1] = arg2;
686
- };
687
- imports.wbg.__wbg_set_907fb406c34a251d = function(arg0, arg1, arg2) {
688
- const ret = arg0.set(arg1, arg2);
689
- return ret;
690
- };
691
- imports.wbg.__wbg_set_c213c871859d6500 = function(arg0, arg1, arg2) {
692
- arg0[arg1 >>> 0] = arg2;
693
- };
694
- imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
695
- const ret = arg1.stack;
696
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
697
- const len1 = WASM_VECTOR_LEN;
698
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
699
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
700
- };
701
- imports.wbg.__wbg_value_692627309814bb8c = function(arg0) {
702
- const ret = arg0.value;
703
- return ret;
704
- };
705
- imports.wbg.__wbg_warn_1d74dddbe2fd1dbb = function(arg0) {
706
- console.warn(arg0);
707
- };
708
- imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
709
- // Cast intrinsic for `Ref(String) -> Externref`.
710
- const ret = getStringFromWasm0(arg0, arg1);
711
- return ret;
712
- };
713
- imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
714
- // Cast intrinsic for `U64 -> Externref`.
715
- const ret = BigInt.asUintN(64, arg0);
716
- return ret;
717
- };
718
- imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
719
- // Cast intrinsic for `I64 -> Externref`.
720
- const ret = arg0;
721
- return ret;
722
- };
723
- imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
724
- // Cast intrinsic for `F64 -> Externref`.
725
- const ret = arg0;
726
- return ret;
727
- };
728
- imports.wbg.__wbindgen_init_externref_table = function() {
729
- const table = wasm.__wbindgen_externrefs;
730
- const offset = table.grow(4);
731
- table.set(0, undefined);
732
- table.set(offset + 0, undefined);
733
- table.set(offset + 1, null);
734
- table.set(offset + 2, true);
735
- table.set(offset + 3, false);
736
- ;
737
- };
738
-
739
- return imports;
740
- }
741
-
742
- function __wbg_finalize_init(instance, module) {
743
- wasm = instance.exports;
744
- __wbg_init.__wbindgen_wasm_module = module;
745
- cachedDataViewMemory0 = null;
746
- cachedUint8ArrayMemory0 = null;
747
-
748
-
749
- wasm.__wbindgen_start();
750
- return wasm;
744
+ return false;
745
+ }
751
746
  }
752
747
 
753
748
  function initSync(module) {
754
749
  if (wasm !== undefined) return wasm;
755
750
 
756
751
 
757
- if (typeof module !== 'undefined') {
752
+ if (module !== undefined) {
758
753
  if (Object.getPrototypeOf(module) === Object.prototype) {
759
754
  ({module} = module)
760
755
  } else {
@@ -763,13 +758,10 @@ function initSync(module) {
763
758
  }
764
759
 
765
760
  const imports = __wbg_get_imports();
766
-
767
761
  if (!(module instanceof WebAssembly.Module)) {
768
762
  module = new WebAssembly.Module(module);
769
763
  }
770
-
771
764
  const instance = new WebAssembly.Instance(module, imports);
772
-
773
765
  return __wbg_finalize_init(instance, module);
774
766
  }
775
767
 
@@ -777,7 +769,7 @@ async function __wbg_init(module_or_path) {
777
769
  if (wasm !== undefined) return wasm;
778
770
 
779
771
 
780
- if (typeof module_or_path !== 'undefined') {
772
+ if (module_or_path !== undefined) {
781
773
  if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
782
774
  ({module_or_path} = module_or_path)
783
775
  } else {
@@ -785,7 +777,7 @@ async function __wbg_init(module_or_path) {
785
777
  }
786
778
  }
787
779
 
788
- if (typeof module_or_path === 'undefined') {
780
+ if (module_or_path === undefined) {
789
781
  module_or_path = new URL('ruff_wasm_bg.wasm', import.meta.url);
790
782
  }
791
783
  const imports = __wbg_get_imports();
@@ -799,5 +791,4 @@ async function __wbg_init(module_or_path) {
799
791
  return __wbg_finalize_init(instance, module);
800
792
  }
801
793
 
802
- export { initSync };
803
- export default __wbg_init;
794
+ export { initSync, __wbg_init as default };