/**
 * Minified by jsDelivr using Terser v5.48.0.
 * Original file: /npm/@astral-sh/ruff-wasm-web@0.15.22/ruff_wasm.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
export const LogLevel=Object.freeze({Trace:0,0:"Trace",Debug:1,1:"Debug",Info:2,2:"Info",Warn:3,3:"Warn",Error:4,4:"Error"});export const PositionEncoding=Object.freeze({Utf8:0,0:"Utf8",Utf16:1,1:"Utf16",Utf32:2,2:"Utf32"});export class Workspace{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,WorkspaceFinalization.unregister(this),e}free(){const e=this.__destroy_into_raw();wasm.__wbg_workspace_free(e,0)}check(e){const n=passStringToWasm0(e,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),t=WASM_VECTOR_LEN,r=wasm.workspace_check(this.__wbg_ptr,n,t);if(r[2])throw takeFromExternrefTable0(r[1]);return takeFromExternrefTable0(r[0])}comments(e){let n,t;try{const o=passStringToWasm0(e,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),a=WASM_VECTOR_LEN,i=wasm.workspace_comments(this.__wbg_ptr,o,a);var r=i[0],_=i[1];if(i[3])throw r=0,_=0,takeFromExternrefTable0(i[2]);return n=r,t=_,getStringFromWasm0(r,_)}finally{wasm.__wbindgen_free(n,t,1)}}static defaultSettings(){const e=wasm.workspace_defaultSettings();if(e[2])throw takeFromExternrefTable0(e[1]);return takeFromExternrefTable0(e[0])}format(e){let n,t;try{const o=passStringToWasm0(e,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),a=WASM_VECTOR_LEN,i=wasm.workspace_format(this.__wbg_ptr,o,a);var r=i[0],_=i[1];if(i[3])throw r=0,_=0,takeFromExternrefTable0(i[2]);return n=r,t=_,getStringFromWasm0(r,_)}finally{wasm.__wbindgen_free(n,t,1)}}format_ir(e){let n,t;try{const o=passStringToWasm0(e,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),a=WASM_VECTOR_LEN,i=wasm.workspace_format_ir(this.__wbg_ptr,o,a);var r=i[0],_=i[1];if(i[3])throw r=0,_=0,takeFromExternrefTable0(i[2]);return n=r,t=_,getStringFromWasm0(r,_)}finally{wasm.__wbindgen_free(n,t,1)}}constructor(e,n){const t=wasm.workspace_new(e,n);if(t[2])throw takeFromExternrefTable0(t[1]);return this.__wbg_ptr=t[0],WorkspaceFinalization.register(this,this.__wbg_ptr,this),this}parse(e){let n,t;try{const o=passStringToWasm0(e,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),a=WASM_VECTOR_LEN,i=wasm.workspace_parse(this.__wbg_ptr,o,a);var r=i[0],_=i[1];if(i[3])throw r=0,_=0,takeFromExternrefTable0(i[2]);return n=r,t=_,getStringFromWasm0(r,_)}finally{wasm.__wbindgen_free(n,t,1)}}tokens(e){let n,t;try{const o=passStringToWasm0(e,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),a=WASM_VECTOR_LEN,i=wasm.workspace_tokens(this.__wbg_ptr,o,a);var r=i[0],_=i[1];if(i[3])throw r=0,_=0,takeFromExternrefTable0(i[2]);return n=r,t=_,getStringFromWasm0(r,_)}finally{wasm.__wbindgen_free(n,t,1)}}static version(){let e,n;try{const t=wasm.workspace_version();return e=t[0],n=t[1],getStringFromWasm0(t[0],t[1])}finally{wasm.__wbindgen_free(e,n,1)}}}Symbol.dispose&&(Workspace.prototype[Symbol.dispose]=Workspace.prototype.free);export function initLogging(e){wasm.initLogging(e)}export function run(){wasm.run()}function __wbg_get_imports(){const e={__proto__:null,__wbg_Error_9dc85fe1bc224456:function(e,n){return Error(getStringFromWasm0(e,n))},__wbg_Number_4779d427bae39753:function(e){return Number(e)},__wbg_String_8564e559799eccda:function(e,n){const t=passStringToWasm0(String(n),wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),r=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(e+4,r,!0),getDataViewMemory0().setInt32(e+0,t,!0)},__wbg___wbindgen_bigint_get_as_i64_8ea6736501f396b6:function(e,n){const t="bigint"==typeof n?n:void 0;getDataViewMemory0().setBigInt64(e+8,isLikeNone(t)?BigInt(0):t,!0),getDataViewMemory0().setInt32(e+0,!isLikeNone(t),!0)},__wbg___wbindgen_boolean_get_b131b2f36d6b2f55:function(e){const n="boolean"==typeof e?e:void 0;return isLikeNone(n)?16777215:n?1:0},__wbg___wbindgen_debug_string_56c147eb1a51f0c4:function(e,n){const t=passStringToWasm0(debugString(n),wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),r=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(e+4,r,!0),getDataViewMemory0().setInt32(e+0,t,!0)},__wbg___wbindgen_in_ce8569b2fc6f5088:function(e,n){return e in n},__wbg___wbindgen_is_bigint_df272c65456269c2:function(e){return"bigint"==typeof e},__wbg___wbindgen_is_function_147961669f068cd4:function(e){return"function"==typeof e},__wbg___wbindgen_is_object_3a2c414391dbf751:function(e){return"object"==typeof e&&null!==e},__wbg___wbindgen_is_string_6541b0f6ecd4e8e5:function(e){return"string"==typeof e},__wbg___wbindgen_is_undefined_4410e3c20a99fa97:function(e){return void 0===e},__wbg___wbindgen_jsval_eq_174c93ec61bab0c5:function(e,n){return e===n},__wbg___wbindgen_jsval_loose_eq_e07e3b1f5db6da6c:function(e,n){return e==n},__wbg___wbindgen_number_get_588ed6b97f0d7e14:function(e,n){const t="number"==typeof n?n:void 0;getDataViewMemory0().setFloat64(e+8,isLikeNone(t)?0:t,!0),getDataViewMemory0().setInt32(e+0,!isLikeNone(t),!0)},__wbg___wbindgen_string_get_fa2687d531ed17a5:function(e,n){const t="string"==typeof n?n:void 0;var r=isLikeNone(t)?0:passStringToWasm0(t,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),_=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(e+4,_,!0),getDataViewMemory0().setInt32(e+0,r,!0)},__wbg___wbindgen_throw_bbadd78c1bac3a77:function(e,n){throw new Error(getStringFromWasm0(e,n))},__wbg_call_91f00ddc43e01490:function(){return handleError(function(e,n){return e.call(n)},arguments)},__wbg_codePointAt_92c678dd76a87be4:function(e,n){return e.codePointAt(n>>>0)},__wbg_debug_de823612d4d12f74:function(e){console.debug(e)},__wbg_done_6a8439e544ec6206:function(e){return e.done},__wbg_entries_5a6a7e7e0df09fe5:function(e){return Object.entries(e)},__wbg_error_6651fee1c71e5da9:function(e){console.error(e)},__wbg_error_a6fa202b58aa1cd3:function(e,n){let t,r;try{t=e,r=n,console.error(getStringFromWasm0(e,n))}finally{wasm.__wbindgen_free(t,r,1)}},__wbg_fromCodePoint_9732a81eca648320:function(){return handleError(function(e){return String.fromCodePoint(e>>>0)},arguments)},__wbg_get_44e98e27bda25b5b:function(){return handleError(function(e,n){return Reflect.get(e,n)},arguments)},__wbg_get_4b90d6d8c5deb5d5:function(e,n){return e[n>>>0]},__wbg_get_unchecked_46e778e3cec74b5e:function(e,n){return e[n>>>0]},__wbg_get_with_ref_key_6412cf3094599694:function(e,n){return e[n]},__wbg_info_a2b5f8a5dae8b26c:function(e){console.info(e)},__wbg_instanceof_ArrayBuffer_a581da923203f29f:function(e){let n;try{n=e instanceof ArrayBuffer}catch(e){n=!1}return n},__wbg_instanceof_Map_7f94c740225003e2:function(e){let n;try{n=e instanceof Map}catch(e){n=!1}return n},__wbg_instanceof_Uint8Array_b6fe1ac89eba107e:function(e){let n;try{n=e instanceof Uint8Array}catch(e){n=!1}return n},__wbg_isArray_139f48e3c057ede8:function(e){return Array.isArray(e)},__wbg_isSafeInteger_c22ccb4af2201fe9:function(e){return Number.isSafeInteger(e)},__wbg_iterator_9b36cebf3be7b7cd:function(){return Symbol.iterator},__wbg_length_68a9d5278d084f4f:function(e){return e.length},__wbg_length_7abf942ae12c9744:function(e){return e.length},__wbg_length_fb04d16d7bdf6d4c:function(e){return e.length},__wbg_log_6614a4effdb4e983:function(e){console.log(e)},__wbg_new_0b303268aa395a38:function(){return new Array},__wbg_new_20b778a4c5c691c3:function(){return new Object},__wbg_new_227d7c05414eb861:function(){return new Error},__wbg_new_5fae30e6b23db8df:function(e,n){return new Error(getStringFromWasm0(e,n))},__wbg_new_883c0db065f06efd:function(){return new Map},__wbg_new_b06772b280cc6e52:function(e){return new Uint8Array(e)},__wbg_next_8cb028b6ba50743f:function(){return handleError(function(e){return e.next()},arguments)},__wbg_next_cfd0b146c9538df8:function(e){return e.next},__wbg_prototypesetcall_956c7493c68e29b4:function(e,n,t){Uint8Array.prototype.set.call(getArrayU8FromWasm0(e,n),t)},__wbg_set_5f806304fb633ab3:function(e,n,t){return e.set(n,t)},__wbg_set_6be42768c690e380:function(e,n,t){e[n]=t},__wbg_set_da33c120a6584674:function(e,n,t){e[n>>>0]=t},__wbg_stack_3b0d974bbf31e44f:function(e,n){const t=passStringToWasm0(n.stack,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),r=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(e+4,r,!0),getDataViewMemory0().setInt32(e+0,t,!0)},__wbg_value_3d3defe09fb1ffca:function(e){return e.value},__wbg_warn_633bacc13ba7e6c3:function(e){console.warn(e)},__wbindgen_cast_0000000000000001:function(e){return e},__wbindgen_cast_0000000000000002:function(e){return e},__wbindgen_cast_0000000000000003:function(e,n){return getStringFromWasm0(e,n)},__wbindgen_cast_0000000000000004:function(e){return BigInt.asUintN(64,e)},__wbindgen_init_externref_table:function(){const e=wasm.__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,"./ruff_wasm_bg.js":e}}const WorkspaceFinalization="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>wasm.__wbg_workspace_free(e,1));function addToExternrefTable0(e){const n=wasm.__externref_table_alloc();return wasm.__wbindgen_externrefs.set(n,e),n}function debugString(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+=debugString(e[0]));for(let r=1;r<n;r++)t+=", "+debugString(e[r]);return t+="]",t}const t=/\[object ([^\]]+)\]/.exec(toString.call(e));let r;if(!(t&&t.length>1))return toString.call(e);if(r=t[1],"Object"==r)try{return"Object("+JSON.stringify(e)+")"}catch(e){return"Object"}return e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:r}function getArrayU8FromWasm0(e,n){return e>>>=0,getUint8ArrayMemory0().subarray(e/1,e/1+n)}let cachedDataViewMemory0=null;function getDataViewMemory0(){return(null===cachedDataViewMemory0||!0===cachedDataViewMemory0.buffer.detached||void 0===cachedDataViewMemory0.buffer.detached&&cachedDataViewMemory0.buffer!==wasm.memory.buffer)&&(cachedDataViewMemory0=new DataView(wasm.memory.buffer)),cachedDataViewMemory0}function getStringFromWasm0(e,n){return decodeText(e>>>0,n)}let cachedUint8ArrayMemory0=null;function getUint8ArrayMemory0(){return null!==cachedUint8ArrayMemory0&&0!==cachedUint8ArrayMemory0.byteLength||(cachedUint8ArrayMemory0=new Uint8Array(wasm.memory.buffer)),cachedUint8ArrayMemory0}function handleError(e,n){try{return e.apply(this,n)}catch(e){const n=addToExternrefTable0(e);wasm.__wbindgen_exn_store(n)}}function isLikeNone(e){return null==e}function passStringToWasm0(e,n,t){if(void 0===t){const t=cachedTextEncoder.encode(e),r=n(t.length,1)>>>0;return getUint8ArrayMemory0().subarray(r,r+t.length).set(t),WASM_VECTOR_LEN=t.length,r}let r=e.length,_=n(r,1)>>>0;const o=getUint8ArrayMemory0();let a=0;for(;a<r;a++){const n=e.charCodeAt(a);if(n>127)break;o[_+a]=n}if(a!==r){0!==a&&(e=e.slice(a)),_=t(_,r,r=a+3*e.length,1)>>>0;const n=getUint8ArrayMemory0().subarray(_+a,_+r);a+=cachedTextEncoder.encodeInto(e,n).written,_=t(_,r,a,1)>>>0}return WASM_VECTOR_LEN=a,_}function takeFromExternrefTable0(e){const n=wasm.__wbindgen_externrefs.get(e);return wasm.__externref_table_dealloc(e),n}let cachedTextDecoder=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});cachedTextDecoder.decode();const MAX_SAFARI_DECODE_BYTES=2146435072;let numBytesDecoded=0;function decodeText(e,n){return numBytesDecoded+=n,numBytesDecoded>=MAX_SAFARI_DECODE_BYTES&&(cachedTextDecoder=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),cachedTextDecoder.decode(),numBytesDecoded=n),cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(e,e+n))}const cachedTextEncoder=new TextEncoder;"encodeInto"in cachedTextEncoder||(cachedTextEncoder.encodeInto=function(e,n){const t=cachedTextEncoder.encode(e);return n.set(t),{read:e.length,written:t.length}});let wasmModule,wasmInstance,wasm,WASM_VECTOR_LEN=0;function __wbg_finalize_init(e,n){return wasmInstance=e,wasm=e.exports,wasmModule=n,cachedDataViewMemory0=null,cachedUint8ArrayMemory0=null,wasm.__wbindgen_start(),wasm}async function __wbg_load(e,n){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,n)}catch(n){if(!(e.ok&&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}}function initSync(e){if(void 0!==wasm)return wasm;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=__wbg_get_imports();e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));return __wbg_finalize_init(new WebAssembly.Instance(e,n),e)}async function __wbg_init(e){if(void 0!==wasm)return wasm;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("ruff_wasm_bg.wasm",import.meta.url));const n=__wbg_get_imports();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:t,module:r}=await __wbg_load(await e,n);return __wbg_finalize_init(t,r)}export{initSync,__wbg_init as default};
//# sourceMappingURL=/sm/a7f7fed28837fc30b0b8dc2948d925fc0a4fd55182fb902ba66f5f27ca6da0ce.map