diff --git a/docs/js/tree-sitter.js b/docs/js/tree-sitter.js index d58803711..6ffc98766 100644 --- a/docs/js/tree-sitter.js +++ b/docs/js/tree-sitter.js @@ -1 +1 @@ -var Module=void 0!==Module?Module:{};!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():window.TreeSitter=t()}(0,function(){var e,t={};for(e in Module)Module.hasOwnProperty(e)&&(t[e]=Module[e]);var n,r,s=[],o="./this.program",_=function(e,t){throw t},a=!1,u=!1;a="object"==typeof window,u="function"==typeof importScripts,n="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,r=!a&&!n&&!u;var i,l,d,c,m,f="";n?(f=u?require("path").dirname(f)+"/":__dirname+"/",i=function(e,t){return c||(c=require("fs")),m||(m=require("path")),e=m.normalize(e),c.readFileSync(e,t?null:"utf8")},d=function(e){var t=i(e,!0);return t.buffer||(t=new Uint8Array(t)),N(t.buffer),t},process.argv.length>1&&(o=process.argv[1].replace(/\\/g,"/")),s=process.argv.slice(2),"undefined"!=typeof module&&(module.exports=Module),_=function(e){process.exit(e)},Module.inspect=function(){return"[Emscripten Module object]"}):r?("undefined"!=typeof read&&(i=function(e){return read(e)}),d=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(N("object"==typeof(t=read(e,"binary"))),t)},"undefined"!=typeof scriptArgs?s=scriptArgs:void 0!==arguments&&(s=arguments),"function"==typeof quit&&(_=function(e){quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(a||u)&&(u?f=self.location.href:"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),f=0!==f.indexOf("blob:")?f.substr(0,f.lastIndexOf("/")+1):"",i=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},u&&(d=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),l=function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){200==r.status||0==r.status&&r.response?t(r.response):n()},r.onerror=n,r.send(null)});Module.print||console.log.bind(console);var p=Module.printErr||console.warn.bind(console);for(e in t)t.hasOwnProperty(e)&&(Module[e]=t[e]);t=null,Module.arguments&&(s=Module.arguments),Module.thisProgram&&(o=Module.thisProgram),Module.quit&&(_=Module.quit);var h=16;var g,w=[];function y(e,t){if(!g){g=new WeakMap;for(var n=0;n>0]=t;break;case"i16":R[e>>1]=t;break;case"i32":T[e>>2]=t;break;case"i64":ae=[t>>>0,(_e=t,+Math.abs(_e)>=1?_e>0?(0|Math.min(+Math.floor(_e/4294967296),4294967295))>>>0:~~+Math.ceil((_e-+(~~_e>>>0))/4294967296)>>>0:0)],T[e>>2]=ae[0],T[e+4>>2]=ae[1];break;case"float":L[e>>2]=t;break;case"double":W[e>>3]=t;break;default:re("invalid type for setValue: "+n)}}function S(e,t,n){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return C[e>>0];case"i16":return R[e>>1];case"i32":case"i64":return T[e>>2];case"float":return L[e>>2];case"double":return W[e>>3];default:re("invalid type for getValue: "+t)}return null}"object"!=typeof WebAssembly&&re("no native wasm support detected");var x=!1;function N(e,t){e||re("Assertion failed: "+t)}var P=1;var k,C,q,R,T,L,W,Z="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function F(e,t,n){for(var r=t+n,s=t;e[s]&&!(s>=r);)++s;if(s-t>16&&e.subarray&&Z)return Z.decode(e.subarray(t,s));for(var o="";t>10,56320|1023&i)}}else o+=String.fromCharCode((31&_)<<6|a)}else o+=String.fromCharCode(_)}return o}function $(e,t){return e?F(q,e,t):""}function O(e,t,n,r){if(!(r>0))return 0;for(var s=n,o=n+r-1,_=0;_=55296&&a<=57343)a=65536+((1023&a)<<10)|1023&e.charCodeAt(++_);if(a<=127){if(n>=o)break;t[n++]=a}else if(a<=2047){if(n+1>=o)break;t[n++]=192|a>>6,t[n++]=128|63&a}else if(a<=65535){if(n+2>=o)break;t[n++]=224|a>>12,t[n++]=128|a>>6&63,t[n++]=128|63&a}else{if(n+3>=o)break;t[n++]=240|a>>18,t[n++]=128|a>>12&63,t[n++]=128|a>>6&63,t[n++]=128|63&a}}return t[n]=0,n-s}function U(e,t,n){return O(e,q,t,n)}function j(e){for(var t=0,n=0;n=55296&&r<=57343&&(r=65536+((1023&r)<<10)|1023&e.charCodeAt(++n)),r<=127?++t:t+=r<=2047?2:r<=65535?3:4}return t}function D(e){var t=j(e)+1,n=De(t);return O(e,C,n,t),n}function z(e){k=e,Module.HEAP8=C=new Int8Array(e),Module.HEAP16=R=new Int16Array(e),Module.HEAP32=T=new Int32Array(e),Module.HEAPU8=q=new Uint8Array(e),Module.HEAPU16=new Uint16Array(e),Module.HEAPU32=new Uint32Array(e),Module.HEAPF32=L=new Float32Array(e),Module.HEAPF64=W=new Float64Array(e)}var G=Module.INITIAL_MEMORY||33554432;(E=Module.wasmMemory?Module.wasmMemory:new WebAssembly.Memory({initial:G/65536,maximum:32768}))&&(k=E.buffer),G=k.byteLength,z(k);var H=new WebAssembly.Table({initial:13,element:"anyfunc"}),B=[],K=[],V=[],X=[],Q=!1;var Y=0,J=null,ee=null;function te(e){Y++,Module.monitorRunDependencies&&Module.monitorRunDependencies(Y)}function ne(e){if(Y--,Module.monitorRunDependencies&&Module.monitorRunDependencies(Y),0==Y&&(null!==J&&(clearInterval(J),J=null),ee)){var t=ee;ee=null,t()}}function re(e){throw Module.onAbort&&Module.onAbort(e),p(e+=""),x=!0,1,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(e)}Module.preloadedImages={},Module.preloadedAudios={},Module.preloadedWasm={};var se,oe,_e,ae,ue="data:application/octet-stream;base64,";function ie(e){return e.startsWith(ue)}function le(e){return e.startsWith("file://")}function de(e){try{if(e==se&&M)return new Uint8Array(M);if(d)return d(e);throw"both async and sync fetching of the wasm failed"}catch(e){re(e)}}ie(se="tree-sitter.wasm")||(oe=se,se=Module.locateFile?Module.locateFile(oe,f):f+oe);var ce={},me={get:function(e,t){return ce[t]||(ce[t]=new WebAssembly.Global({value:"i32",mutable:!0})),ce[t]}};function fe(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var n=t.func;"number"==typeof n?void 0===t.arg?H.get(n)():H.get(n)(t.arg):n(void 0===t.arg?null:t.arg)}else t(Module)}}function pe(e){var t=0;function n(){for(var n=0,r=1;;){var s=e[t++];if(n+=(127&s)*r,r*=128,!(128&s))break}return n}if(e instanceof WebAssembly.Module){var r=WebAssembly.Module.customSections(e,"dylink");N(0!=r.length,"need dylink section"),e=new Int8Array(r[0])}else{N(1836278016==new Uint32Array(new Uint8Array(e.subarray(0,24)).buffer)[0],"need to see wasm magic number"),N(0===e[8],"need the dylink section to be first"),t=9,n(),N(6===e[t]),N(e[++t]==="d".charCodeAt(0)),N(e[++t]==="y".charCodeAt(0)),N(e[++t]==="l".charCodeAt(0)),N(e[++t]==="i".charCodeAt(0)),N(e[++t]==="n".charCodeAt(0)),N(e[++t]==="k".charCodeAt(0)),t++}var s={};s.memorySize=n(),s.memoryAlign=n(),s.tableSize=n(),s.tableAlign=n();var o=n();s.neededDynlibs=[];for(var _=0;_0}function we(e){return 0==e.indexOf("dynCall_")||["stackAlloc","stackSave","stackRestore"].includes(e)?e:"_"+e}function ye(e,t){for(var n in e)if(e.hasOwnProperty(n)){Fe.hasOwnProperty(n)||(Fe[n]=e[n]);var r=we(n);Module.hasOwnProperty(r)||(Module[r]=e[n])}}var Me={nextHandle:1,loadedLibs:{},loadedLibNames:{}};function be(e,t,n){return e.includes("j")?function(e,t,n){var r=Module["dynCall_"+e];return n&&n.length?r.apply(null,[t].concat(n)):r.call(null,t)}(e,t,n):H.get(t).apply(null,n)}var ve=5250816;function Ee(e){return["__cpp_exception","__wasm_apply_data_relocs","__dso_handle","__set_stack_limits"].includes(e)}function Ie(e,t){var n={};for(var r in e){var s=e[r];"object"==typeof s&&(s=s.value),"number"==typeof s&&(s+=t),n[r]=s}return function(e){for(var t in e)if(!Ee(t)){var n=!1,r=e[t];t.startsWith("orig$")&&(t=t.split("$")[1],n=!0),ce[t]||(ce[t]=new WebAssembly.Global({value:"i32",mutable:!0})),(n||0==ce[t].value)&&("function"==typeof r?ce[t].value=y(r):"number"==typeof r?ce[t].value=r:p("unhandled export type for `"+t+"`: "+typeof r))}}(n),n}function Ae(e,t){var n,r;return t&&(n=Fe["orig$"+e]),n||(n=Fe[e]),n||(n=Module[we(e)]),!n&&e.startsWith("invoke_")&&(r=e.split("_")[1],n=function(){var e=Ue();try{return be(r,arguments[0],Array.prototype.slice.call(arguments,1))}catch(t){if(je(e),t!==t+0&&"longjmp"!==t)throw t;ze(1,0)}}),n}function Se(e,t){var n=pe(e);function r(){var r=Math.pow(2,n.memoryAlign);r=Math.max(r,h);var s,o,_,a=(s=function(e){if(Q)return $e(e);var t=ve,n=t+e+15&-16;return ve=n,ce.__heap_base.value=n,t}(n.memorySize+r),(o=r)||(o=h),Math.ceil(s/o)*o),u=H.length;H.grow(n.tableSize);for(var i=a;i>2]=r,-1;n=Pe()}return T[t>>2]=n/1e3|0,T[t+4>>2]=n%1e3*1e3*1e3|0,0}function Te(e){try{return E.grow(e-k.byteLength+65535>>>16),z(E.buffer),1}catch(e){}}function Le(e){Ke(e)}function We(e){b(e)}Re.sig="iii",Le.sig="vi",We.sig="vi";var Ze,Fe={__heap_base:ve,__indirect_function_table:H,__memory_base:1024,__stack_pointer:ke,__table_base:1,abort:Ce,clock_gettime:Re,emscripten_memcpy_big:function(e,t,n){q.copyWithin(e,t,t+n)},emscripten_resize_heap:function(e){var t,n,r=q.length;if((e>>>=0)>2147483648)return!1;for(var s=1;s<=4;s*=2){var o=r*(1+.2/s);if(o=Math.min(o,e+100663296),Te(Math.min(2147483648,((t=Math.max(e,o))%(n=65536)>0&&(t+=n-t%n),t))))return!0}return!1},exit:Le,memory:E,setTempRet0:We,tree_sitter_log_callback:function(e,t){if(dt){const n=$(t);dt(n,0!==e)}},tree_sitter_parse_callback:function(e,t,n,r,s){var o=lt(t,{row:n,column:r});"string"==typeof o?(A(s,o.length,"i32"),function(e,t,n){if(void 0===n&&(n=2147483647),n<2)return 0;for(var r=(n-=2)<2*e.length?n/2:e.length,s=0;s>1]=o,t+=2}R[t>>1]=0}(o,e,10240)):A(s,0,"i32")}},$e=(function(){var e={env:Fe,wasi_snapshot_preview1:Fe,"GOT.mem":new Proxy(Fe,me),"GOT.func":new Proxy(Fe,me)};function t(e,t){var n=e.exports;n=Ie(n,1024),Module.asm=n;var r,s=pe(t);s.neededDynlibs&&(v=s.neededDynlibs.concat(v)),ye(n),r=Module.asm.__wasm_call_ctors,K.unshift(r),ne()}function n(e){t(e.instance,e.module)}function r(t){return function(){if(!M&&(a||u)){if("function"==typeof fetch&&!le(se))return fetch(se,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+se+"'";return e.arrayBuffer()}).catch(function(){return de(se)});if(l)return new Promise(function(e,t){l(se,function(t){e(new Uint8Array(t))},t)})}return Promise.resolve().then(function(){return de(se)})}().then(function(t){return WebAssembly.instantiate(t,e)}).then(t,function(e){p("failed to asynchronously prepare wasm: "+e),re(e)})}if(te(),Module.instantiateWasm)try{return Module.instantiateWasm(e,t)}catch(e){return p("Module.instantiateWasm callback failed with error: "+e),!1}M||"function"!=typeof WebAssembly.instantiateStreaming||ie(se)||le(se)||"function"!=typeof fetch?r(n):fetch(se,{credentials:"same-origin"}).then(function(t){return WebAssembly.instantiateStreaming(t,e).then(n,function(e){return p("wasm streaming compile failed: "+e),p("falling back to ArrayBuffer instantiation"),r(n)})})}(),Module.___wasm_call_ctors=function(){return(Module.___wasm_call_ctors=Module.asm.__wasm_call_ctors).apply(null,arguments)},Module._malloc=function(){return($e=Module._malloc=Module.asm.malloc).apply(null,arguments)}),Oe=(Module._ts_language_symbol_count=function(){return(Module._ts_language_symbol_count=Module.asm.ts_language_symbol_count).apply(null,arguments)},Module._ts_language_version=function(){return(Module._ts_language_version=Module.asm.ts_language_version).apply(null,arguments)},Module._ts_language_field_count=function(){return(Module._ts_language_field_count=Module.asm.ts_language_field_count).apply(null,arguments)},Module._ts_language_symbol_name=function(){return(Module._ts_language_symbol_name=Module.asm.ts_language_symbol_name).apply(null,arguments)},Module._ts_language_symbol_for_name=function(){return(Module._ts_language_symbol_for_name=Module.asm.ts_language_symbol_for_name).apply(null,arguments)},Module._ts_language_symbol_type=function(){return(Module._ts_language_symbol_type=Module.asm.ts_language_symbol_type).apply(null,arguments)},Module._ts_language_field_name_for_id=function(){return(Module._ts_language_field_name_for_id=Module.asm.ts_language_field_name_for_id).apply(null,arguments)},Module._memcpy=function(){return(Module._memcpy=Module.asm.memcpy).apply(null,arguments)},Module._free=function(){return(Module._free=Module.asm.free).apply(null,arguments)},Module._calloc=function(){return(Module._calloc=Module.asm.calloc).apply(null,arguments)},Module._ts_parser_delete=function(){return(Module._ts_parser_delete=Module.asm.ts_parser_delete).apply(null,arguments)},Module._ts_parser_reset=function(){return(Module._ts_parser_reset=Module.asm.ts_parser_reset).apply(null,arguments)},Module._ts_parser_set_language=function(){return(Module._ts_parser_set_language=Module.asm.ts_parser_set_language).apply(null,arguments)},Module._ts_parser_timeout_micros=function(){return(Module._ts_parser_timeout_micros=Module.asm.ts_parser_timeout_micros).apply(null,arguments)},Module._ts_parser_set_timeout_micros=function(){return(Module._ts_parser_set_timeout_micros=Module.asm.ts_parser_set_timeout_micros).apply(null,arguments)},Module._memcmp=function(){return(Module._memcmp=Module.asm.memcmp).apply(null,arguments)},Module._ts_query_new=function(){return(Module._ts_query_new=Module.asm.ts_query_new).apply(null,arguments)},Module._ts_query_delete=function(){return(Module._ts_query_delete=Module.asm.ts_query_delete).apply(null,arguments)},Module._iswspace=function(){return(Module._iswspace=Module.asm.iswspace).apply(null,arguments)},Module._iswalnum=function(){return(Module._iswalnum=Module.asm.iswalnum).apply(null,arguments)},Module._ts_query_pattern_count=function(){return(Module._ts_query_pattern_count=Module.asm.ts_query_pattern_count).apply(null,arguments)},Module._ts_query_capture_count=function(){return(Module._ts_query_capture_count=Module.asm.ts_query_capture_count).apply(null,arguments)},Module._ts_query_string_count=function(){return(Module._ts_query_string_count=Module.asm.ts_query_string_count).apply(null,arguments)},Module._ts_query_capture_name_for_id=function(){return(Module._ts_query_capture_name_for_id=Module.asm.ts_query_capture_name_for_id).apply(null,arguments)},Module._ts_query_string_value_for_id=function(){return(Module._ts_query_string_value_for_id=Module.asm.ts_query_string_value_for_id).apply(null,arguments)},Module._ts_query_predicates_for_pattern=function(){return(Module._ts_query_predicates_for_pattern=Module.asm.ts_query_predicates_for_pattern).apply(null,arguments)},Module._ts_tree_copy=function(){return(Module._ts_tree_copy=Module.asm.ts_tree_copy).apply(null,arguments)},Module._ts_tree_delete=function(){return(Module._ts_tree_delete=Module.asm.ts_tree_delete).apply(null,arguments)},Module._ts_init=function(){return(Module._ts_init=Module.asm.ts_init).apply(null,arguments)},Module._ts_parser_new_wasm=function(){return(Module._ts_parser_new_wasm=Module.asm.ts_parser_new_wasm).apply(null,arguments)},Module._ts_parser_enable_logger_wasm=function(){return(Module._ts_parser_enable_logger_wasm=Module.asm.ts_parser_enable_logger_wasm).apply(null,arguments)},Module._ts_parser_parse_wasm=function(){return(Module._ts_parser_parse_wasm=Module.asm.ts_parser_parse_wasm).apply(null,arguments)},Module._ts_language_type_is_named_wasm=function(){return(Module._ts_language_type_is_named_wasm=Module.asm.ts_language_type_is_named_wasm).apply(null,arguments)},Module._ts_language_type_is_visible_wasm=function(){return(Module._ts_language_type_is_visible_wasm=Module.asm.ts_language_type_is_visible_wasm).apply(null,arguments)},Module._ts_tree_root_node_wasm=function(){return(Module._ts_tree_root_node_wasm=Module.asm.ts_tree_root_node_wasm).apply(null,arguments)},Module._ts_tree_edit_wasm=function(){return(Module._ts_tree_edit_wasm=Module.asm.ts_tree_edit_wasm).apply(null,arguments)},Module._ts_tree_get_changed_ranges_wasm=function(){return(Module._ts_tree_get_changed_ranges_wasm=Module.asm.ts_tree_get_changed_ranges_wasm).apply(null,arguments)},Module._ts_tree_cursor_new_wasm=function(){return(Module._ts_tree_cursor_new_wasm=Module.asm.ts_tree_cursor_new_wasm).apply(null,arguments)},Module._ts_tree_cursor_delete_wasm=function(){return(Module._ts_tree_cursor_delete_wasm=Module.asm.ts_tree_cursor_delete_wasm).apply(null,arguments)},Module._ts_tree_cursor_reset_wasm=function(){return(Module._ts_tree_cursor_reset_wasm=Module.asm.ts_tree_cursor_reset_wasm).apply(null,arguments)},Module._ts_tree_cursor_goto_first_child_wasm=function(){return(Module._ts_tree_cursor_goto_first_child_wasm=Module.asm.ts_tree_cursor_goto_first_child_wasm).apply(null,arguments)},Module._ts_tree_cursor_goto_next_sibling_wasm=function(){return(Module._ts_tree_cursor_goto_next_sibling_wasm=Module.asm.ts_tree_cursor_goto_next_sibling_wasm).apply(null,arguments)},Module._ts_tree_cursor_goto_parent_wasm=function(){return(Module._ts_tree_cursor_goto_parent_wasm=Module.asm.ts_tree_cursor_goto_parent_wasm).apply(null,arguments)},Module._ts_tree_cursor_current_node_type_id_wasm=function(){return(Module._ts_tree_cursor_current_node_type_id_wasm=Module.asm.ts_tree_cursor_current_node_type_id_wasm).apply(null,arguments)},Module._ts_tree_cursor_current_node_is_named_wasm=function(){return(Module._ts_tree_cursor_current_node_is_named_wasm=Module.asm.ts_tree_cursor_current_node_is_named_wasm).apply(null,arguments)},Module._ts_tree_cursor_current_node_is_missing_wasm=function(){return(Module._ts_tree_cursor_current_node_is_missing_wasm=Module.asm.ts_tree_cursor_current_node_is_missing_wasm).apply(null,arguments)},Module._ts_tree_cursor_current_node_id_wasm=function(){return(Module._ts_tree_cursor_current_node_id_wasm=Module.asm.ts_tree_cursor_current_node_id_wasm).apply(null,arguments)},Module._ts_tree_cursor_start_position_wasm=function(){return(Module._ts_tree_cursor_start_position_wasm=Module.asm.ts_tree_cursor_start_position_wasm).apply(null,arguments)},Module._ts_tree_cursor_end_position_wasm=function(){return(Module._ts_tree_cursor_end_position_wasm=Module.asm.ts_tree_cursor_end_position_wasm).apply(null,arguments)},Module._ts_tree_cursor_start_index_wasm=function(){return(Module._ts_tree_cursor_start_index_wasm=Module.asm.ts_tree_cursor_start_index_wasm).apply(null,arguments)},Module._ts_tree_cursor_end_index_wasm=function(){return(Module._ts_tree_cursor_end_index_wasm=Module.asm.ts_tree_cursor_end_index_wasm).apply(null,arguments)},Module._ts_tree_cursor_current_field_id_wasm=function(){return(Module._ts_tree_cursor_current_field_id_wasm=Module.asm.ts_tree_cursor_current_field_id_wasm).apply(null,arguments)},Module._ts_tree_cursor_current_node_wasm=function(){return(Module._ts_tree_cursor_current_node_wasm=Module.asm.ts_tree_cursor_current_node_wasm).apply(null,arguments)},Module._ts_node_symbol_wasm=function(){return(Module._ts_node_symbol_wasm=Module.asm.ts_node_symbol_wasm).apply(null,arguments)},Module._ts_node_child_count_wasm=function(){return(Module._ts_node_child_count_wasm=Module.asm.ts_node_child_count_wasm).apply(null,arguments)},Module._ts_node_named_child_count_wasm=function(){return(Module._ts_node_named_child_count_wasm=Module.asm.ts_node_named_child_count_wasm).apply(null,arguments)},Module._ts_node_child_wasm=function(){return(Module._ts_node_child_wasm=Module.asm.ts_node_child_wasm).apply(null,arguments)},Module._ts_node_named_child_wasm=function(){return(Module._ts_node_named_child_wasm=Module.asm.ts_node_named_child_wasm).apply(null,arguments)},Module._ts_node_child_by_field_id_wasm=function(){return(Module._ts_node_child_by_field_id_wasm=Module.asm.ts_node_child_by_field_id_wasm).apply(null,arguments)},Module._ts_node_next_sibling_wasm=function(){return(Module._ts_node_next_sibling_wasm=Module.asm.ts_node_next_sibling_wasm).apply(null,arguments)},Module._ts_node_prev_sibling_wasm=function(){return(Module._ts_node_prev_sibling_wasm=Module.asm.ts_node_prev_sibling_wasm).apply(null,arguments)},Module._ts_node_next_named_sibling_wasm=function(){return(Module._ts_node_next_named_sibling_wasm=Module.asm.ts_node_next_named_sibling_wasm).apply(null,arguments)},Module._ts_node_prev_named_sibling_wasm=function(){return(Module._ts_node_prev_named_sibling_wasm=Module.asm.ts_node_prev_named_sibling_wasm).apply(null,arguments)},Module._ts_node_parent_wasm=function(){return(Module._ts_node_parent_wasm=Module.asm.ts_node_parent_wasm).apply(null,arguments)},Module._ts_node_descendant_for_index_wasm=function(){return(Module._ts_node_descendant_for_index_wasm=Module.asm.ts_node_descendant_for_index_wasm).apply(null,arguments)},Module._ts_node_named_descendant_for_index_wasm=function(){return(Module._ts_node_named_descendant_for_index_wasm=Module.asm.ts_node_named_descendant_for_index_wasm).apply(null,arguments)},Module._ts_node_descendant_for_position_wasm=function(){return(Module._ts_node_descendant_for_position_wasm=Module.asm.ts_node_descendant_for_position_wasm).apply(null,arguments)},Module._ts_node_named_descendant_for_position_wasm=function(){return(Module._ts_node_named_descendant_for_position_wasm=Module.asm.ts_node_named_descendant_for_position_wasm).apply(null,arguments)},Module._ts_node_start_point_wasm=function(){return(Module._ts_node_start_point_wasm=Module.asm.ts_node_start_point_wasm).apply(null,arguments)},Module._ts_node_end_point_wasm=function(){return(Module._ts_node_end_point_wasm=Module.asm.ts_node_end_point_wasm).apply(null,arguments)},Module._ts_node_start_index_wasm=function(){return(Module._ts_node_start_index_wasm=Module.asm.ts_node_start_index_wasm).apply(null,arguments)},Module._ts_node_end_index_wasm=function(){return(Module._ts_node_end_index_wasm=Module.asm.ts_node_end_index_wasm).apply(null,arguments)},Module._ts_node_to_string_wasm=function(){return(Module._ts_node_to_string_wasm=Module.asm.ts_node_to_string_wasm).apply(null,arguments)},Module._ts_node_children_wasm=function(){return(Module._ts_node_children_wasm=Module.asm.ts_node_children_wasm).apply(null,arguments)},Module._ts_node_named_children_wasm=function(){return(Module._ts_node_named_children_wasm=Module.asm.ts_node_named_children_wasm).apply(null,arguments)},Module._ts_node_descendants_of_type_wasm=function(){return(Module._ts_node_descendants_of_type_wasm=Module.asm.ts_node_descendants_of_type_wasm).apply(null,arguments)},Module._ts_node_is_named_wasm=function(){return(Module._ts_node_is_named_wasm=Module.asm.ts_node_is_named_wasm).apply(null,arguments)},Module._ts_node_has_changes_wasm=function(){return(Module._ts_node_has_changes_wasm=Module.asm.ts_node_has_changes_wasm).apply(null,arguments)},Module._ts_node_has_error_wasm=function(){return(Module._ts_node_has_error_wasm=Module.asm.ts_node_has_error_wasm).apply(null,arguments)},Module._ts_node_is_missing_wasm=function(){return(Module._ts_node_is_missing_wasm=Module.asm.ts_node_is_missing_wasm).apply(null,arguments)},Module._ts_query_matches_wasm=function(){return(Module._ts_query_matches_wasm=Module.asm.ts_query_matches_wasm).apply(null,arguments)},Module._ts_query_captures_wasm=function(){return(Module._ts_query_captures_wasm=Module.asm.ts_query_captures_wasm).apply(null,arguments)},Module.___errno_location=function(){return(Oe=Module.___errno_location=Module.asm.__errno_location).apply(null,arguments)}),Ue=(Module._memchr=function(){return(Module._memchr=Module.asm.memchr).apply(null,arguments)},Module._strlen=function(){return(Module._strlen=Module.asm.strlen).apply(null,arguments)},Module._iswdigit=function(){return(Module._iswdigit=Module.asm.iswdigit).apply(null,arguments)},Module._iswalpha=function(){return(Module._iswalpha=Module.asm.iswalpha).apply(null,arguments)},Module._iswlower=function(){return(Module._iswlower=Module.asm.iswlower).apply(null,arguments)},Module._towupper=function(){return(Module._towupper=Module.asm.towupper).apply(null,arguments)},Module.stackSave=function(){return(Ue=Module.stackSave=Module.asm.stackSave).apply(null,arguments)}),je=Module.stackRestore=function(){return(je=Module.stackRestore=Module.asm.stackRestore).apply(null,arguments)},De=Module.stackAlloc=function(){return(De=Module.stackAlloc=Module.asm.stackAlloc).apply(null,arguments)},ze=Module._setThrew=function(){return(ze=Module._setThrew=Module.asm.setThrew).apply(null,arguments)};Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev=function(){return(Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev).apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm=function(){return(Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm).apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm=function(){return(Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm).apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm=function(){return(Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm).apply(null,arguments)},Module.__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm=function(){return(Module.__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm=Module.asm._ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm).apply(null,arguments)},Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc=function(){return(Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc).apply(null,arguments)},Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev=function(){return(Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev=Module.asm._ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev).apply(null,arguments)},Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw=function(){return(Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw=Module.asm._ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw).apply(null,arguments)},Module.__ZNKSt3__220__vector_base_commonILb1EE20__throw_length_errorEv=function(){return(Module.__ZNKSt3__220__vector_base_commonILb1EE20__throw_length_errorEv=Module.asm._ZNKSt3__220__vector_base_commonILb1EE20__throw_length_errorEv).apply(null,arguments)},Module.__Znwm=function(){return(Module.__Znwm=Module.asm._Znwm).apply(null,arguments)},Module.__ZdlPv=function(){return(Module.__ZdlPv=Module.asm._ZdlPv).apply(null,arguments)},Module._orig$ts_parser_timeout_micros=function(){return(Module._orig$ts_parser_timeout_micros=Module.asm.orig$ts_parser_timeout_micros).apply(null,arguments)},Module._orig$ts_parser_set_timeout_micros=function(){return(Module._orig$ts_parser_set_timeout_micros=Module.asm.orig$ts_parser_set_timeout_micros).apply(null,arguments)};function Ge(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}Module.allocate=function(e,t){var n;return n=t==P?De(e.length):$e(e.length),e.subarray||e.slice?q.set(e,n):q.set(new Uint8Array(e),n),n};ee=function e(){Ze||Be(),Ze||(ee=e)};var He=!1;function Be(e){function t(){Ze||(Ze=!0,Module.calledRun=!0,x||(Q=!0,fe(K),fe(V),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Ve&&function(e){var t=Module._main;if(t){var n=(e=e||[]).length+1,r=De(4*(n+1));T[r>>2]=D(o);for(var s=1;s>2)+s]=D(e[s-1]);T[(r>>2)+n]=0;try{Ke(t(n,r),!0)}catch(e){if(e instanceof Ge)return;if("unwind"==e)return;var a=e;e&&"object"==typeof e&&e.stack&&(a=[e,e.stack]),p("exception thrown: "+a),_(1,e)}finally{!0}}}(e),function(){if(Module.postRun)for("function"==typeof Module.postRun&&(Module.postRun=[Module.postRun]);Module.postRun.length;)e=Module.postRun.shift(),X.unshift(e);var e;fe(X)}()))}e=e||s,Y>0||!He&&(function(){if(v.length){if(!d)return te(),void v.reduce(function(e,t){return e.then(function(){return xe(t,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0})})},Promise.resolve()).then(function(){ne(),Ne()});v.forEach(function(e){xe(e,{global:!0,nodelete:!0,allowUndefined:!0})}),Ne()}else Ne()}(),He=!0,Y>0)||(!function(){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)e=Module.preRun.shift(),B.unshift(e);var e;fe(B)}(),Y>0||(Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),t()},1)):t()))}function Ke(e,t){e,t&&ge()&&0===e||(ge()||(!0,Module.onExit&&Module.onExit(e),x=!0),_(e,new Ge(e)))}if(Module.run=Be,Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var Ve=!0;Module.noInitialRun&&(Ve=!1),Be();const Xe=Module,Qe={},Ye=4,Je=5*Ye,et=2*Ye,tt=2*Ye+2*et,nt={row:0,column:0},rt=/[\w-.]*/g,st=1,ot=2,_t=/^_?tree_sitter_\w+/;var at,ut,it,lt,dt,ct=new Promise(e=>{Module.onRuntimeInitialized=e}).then(()=>{it=Xe._ts_init(),at=S(it,"i32"),ut=S(it+Ye,"i32")});class Parser{static init(){return ct}constructor(){if(null==it)throw new Error("You must first call Parser.init() and wait for it to resolve.");Xe._ts_parser_new_wasm(),this[0]=S(it,"i32"),this[1]=S(it+Ye,"i32")}delete(){Xe._ts_parser_delete(this[0]),Xe._free(this[1]),this[0]=0,this[1]=0}setLanguage(e){let t;if(e){if(e.constructor!==Language)throw new Error("Argument must be a Language");{t=e[0];const n=Xe._ts_language_version(t);if(ne.slice(t,r));else{if("function"!=typeof e)throw new Error("Argument must be a string or a function");lt=e}this.logCallback?(dt=this.logCallback,Xe._ts_parser_enable_logger_wasm(this[0],1)):(dt=null,Xe._ts_parser_enable_logger_wasm(this[0],0));let r=0,s=0;if(n&&n.includedRanges){r=n.includedRanges.length;let e=s=Xe._calloc(r,tt);for(let t=0;t0){let e=n;for(let n=0;n0){let n=t;for(let t=0;t0){let n=t;for(let t=0;t0){let e=a;for(let t=0;t<_;t++)u[t]=wt(this.tree,e),e+=Je}return Xe._free(a),Xe._free(o),u}get nextSibling(){return gt(this),Xe._ts_node_next_sibling_wasm(this.tree[0]),wt(this.tree)}get previousSibling(){return gt(this),Xe._ts_node_prev_sibling_wasm(this.tree[0]),wt(this.tree)}get nextNamedSibling(){return gt(this),Xe._ts_node_next_named_sibling_wasm(this.tree[0]),wt(this.tree)}get previousNamedSibling(){return gt(this),Xe._ts_node_prev_named_sibling_wasm(this.tree[0]),wt(this.tree)}get parent(){return gt(this),Xe._ts_node_parent_wasm(this.tree[0]),wt(this.tree)}descendantForIndex(e,t=e){if("number"!=typeof e||"number"!=typeof t)throw new Error("Arguments must be numbers");gt(this);let n=it+Je;return A(n,e,"i32"),A(n+Ye,t,"i32"),Xe._ts_node_descendant_for_index_wasm(this.tree[0]),wt(this.tree)}namedDescendantForIndex(e,t=e){if("number"!=typeof e||"number"!=typeof t)throw new Error("Arguments must be numbers");gt(this);let n=it+Je;return A(n,e,"i32"),A(n+Ye,t,"i32"),Xe._ts_node_named_descendant_for_index_wasm(this.tree[0]),wt(this.tree)}descendantForPosition(e,t=e){if(!ht(e)||!ht(t))throw new Error("Arguments must be {row, column} objects");gt(this);let n=it+Je;return bt(n,e),bt(n+et,t),Xe._ts_node_descendant_for_position_wasm(this.tree[0]),wt(this.tree)}namedDescendantForPosition(e,t=e){if(!ht(e)||!ht(t))throw new Error("Arguments must be {row, column} objects");gt(this);let n=it+Je;return bt(n,e),bt(n+et,t),Xe._ts_node_named_descendant_for_position_wasm(this.tree[0]),wt(this.tree)}walk(){return gt(this),Xe._ts_tree_cursor_new_wasm(this.tree[0]),new TreeCursor(Qe,this.tree)}toString(){gt(this);const e=Xe._ts_node_to_string_wasm(this.tree[0]),t=function(e){for(var t="";;){var n=q[e++>>0];if(!n)return t;t+=String.fromCharCode(n)}}(e);return Xe._free(e),t}}class TreeCursor{constructor(e,t){pt(e),this.tree=t,Mt(this)}delete(){yt(this),Xe._ts_tree_cursor_delete_wasm(this.tree[0]),this[0]=this[1]=this[2]=0}reset(e){gt(e),yt(this,it+Je),Xe._ts_tree_cursor_reset_wasm(this.tree[0]),Mt(this)}get nodeType(){return this.tree.language.types[this.nodeTypeId]||"ERROR"}get nodeTypeId(){return yt(this),Xe._ts_tree_cursor_current_node_type_id_wasm(this.tree[0])}get nodeId(){return yt(this),Xe._ts_tree_cursor_current_node_id_wasm(this.tree[0])}get nodeIsNamed(){return yt(this),1===Xe._ts_tree_cursor_current_node_is_named_wasm(this.tree[0])}get nodeIsMissing(){return yt(this),1===Xe._ts_tree_cursor_current_node_is_missing_wasm(this.tree[0])}get nodeText(){yt(this);const e=Xe._ts_tree_cursor_start_index_wasm(this.tree[0]),t=Xe._ts_tree_cursor_end_index_wasm(this.tree[0]);return mt(this.tree,e,t)}get startPosition(){return yt(this),Xe._ts_tree_cursor_start_position_wasm(this.tree[0]),vt(it)}get endPosition(){return yt(this),Xe._ts_tree_cursor_end_position_wasm(this.tree[0]),vt(it)}get startIndex(){return yt(this),Xe._ts_tree_cursor_start_index_wasm(this.tree[0])}get endIndex(){return yt(this),Xe._ts_tree_cursor_end_index_wasm(this.tree[0])}currentNode(){return yt(this),Xe._ts_tree_cursor_current_node_wasm(this.tree[0]),wt(this.tree)}currentFieldId(){return yt(this),Xe._ts_tree_cursor_current_field_id_wasm(this.tree[0])}currentFieldName(){return this.tree.language.fields[this.currentFieldId()]}gotoFirstChild(){yt(this);const e=Xe._ts_tree_cursor_goto_first_child_wasm(this.tree[0]);return Mt(this),1===e}gotoNextSibling(){yt(this);const e=Xe._ts_tree_cursor_goto_next_sibling_wasm(this.tree[0]);return Mt(this),1===e}gotoParent(){yt(this);const e=Xe._ts_tree_cursor_goto_parent_wasm(this.tree[0]);return Mt(this),1===e}}class Language{constructor(e,t){pt(e),this[0]=t,this.types=new Array(Xe._ts_language_symbol_count(this[0]));for(let e=0,t=this.types.length;e0){if("string"!==s[0].type)throw new Error("Predicates must begin with a literal value");const t=s[0].value;let n=!0;switch(t){case"not-eq?":n=!1;case"eq?":if(3!==s.length)throw new Error(`Wrong number of arguments to \`#eq?\` predicate. Expected 2, got ${s.length-1}`);if("capture"!==s[1].type)throw new Error(`First argument of \`#eq?\` predicate must be a capture. Got "${s[1].value}"`);if("capture"===s[2].type){const t=s[1].name,r=s[2].name;m[e].push(function(e){let s,o;for(const n of e)n.name===t&&(s=n.node),n.name===r&&(o=n.node);return s.text===o.text===n})}else{const t=s[1].name,r=s[2].value;m[e].push(function(e){for(const s of e)if(s.name===t)return s.node.text===r===n;return!1})}break;case"not-match?":n=!1;case"match?":if(3!==s.length)throw new Error(`Wrong number of arguments to \`#match?\` predicate. Expected 2, got ${s.length-1}.`);if("capture"!==s[1].type)throw new Error(`First argument of \`#match?\` predicate must be a capture. Got "${s[1].value}".`);if("string"!==s[2].type)throw new Error(`Second argument of \`#match?\` predicate must be a string. Got @${s[2].value}.`);const r=s[1].name,o=new RegExp(s[2].value);m[e].push(function(e){for(const t of e)if(t.name===r)return o.test(t.node.text)===n;return!1});break;case"set!":if(s.length<2||s.length>3)throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${s.length-1}.`);if(s.some(e=>"string"!==e.type))throw new Error('Arguments to `#set!` predicate must be a strings.".');i[e]||(i[e]={}),i[e][s[1].value]=s[2]?s[2].value:null;break;case"is?":case"is-not?":if(s.length<2||s.length>3)throw new Error(`Wrong number of arguments to \`#${t}\` predicate. Expected 1 or 2. Got ${s.length-1}.`);if(s.some(e=>"string"!==e.type))throw new Error(`Arguments to \`#${t}\` predicate must be a strings.".`);const _="is?"===t?l:d;_[e]||(_[e]={}),_[e][s[1].value]=s[2]?s[2].value:null;break;default:c[e].push({operator:t,operands:s.slice(1)})}s.length=0}}Object.freeze(i[e]),Object.freeze(l[e]),Object.freeze(d[e])}return Xe._free(n),new Query(Qe,r,a,m,c,Object.freeze(i),Object.freeze(l),Object.freeze(d))}static load(e){let t;if(e instanceof Uint8Array)t=Promise.resolve(e);else{const n=e;if("undefined"!=typeof process&&process.versions&&process.versions.node){const e=require("fs");t=Promise.resolve(e.readFileSync(n))}else t=fetch(n).then(e=>e.arrayBuffer().then(t=>{if(e.ok)return new Uint8Array(t);{const n=new TextDecoder("utf-8").decode(t);throw new Error(`Language.load failed with status ${e.status}.\n\n${n}`)}}))}const n="function"==typeof loadSideModule?loadSideModule:Se;return t.then(e=>n(e,{loadAsync:!0})).then(e=>{const t=Object.keys(e),n=t.find(e=>_t.test(e)&&!e.includes("external_scanner_"));n||console.log(`Couldn't find language function in WASM file. Symbols:\n${JSON.stringify(t,null,2)}`);const r=e[n]();return new Language(Qe,r)})}}class Query{constructor(e,t,n,r,s,o,_,a){pt(e),this[0]=t,this.captureNames=n,this.textPredicates=r,this.predicates=s,this.setProperties=o,this.assertedProperties=_,this.refutedProperties=a,this.exceededMatchLimit=!1}delete(){Xe._ts_query_delete(this[0]),this[0]=0}matches(e,t,n,r){t||(t=nt),n||(n=nt),r||(r={});let s=r.matchLimit;if(void 0===s)s=0;else if("number"!=typeof s)throw new Error("Arguments must be numbers");gt(e),Xe._ts_query_matches_wasm(this[0],e.tree[0],t.row,t.column,n.row,n.column,s);const o=S(it,"i32"),_=S(it+Ye,"i32"),a=S(it+2*Ye,"i32"),u=new Array(o);this.exceededMatchLimit=!!a;let i=0,l=_;for(let t=0;te(s))){u[i++]={pattern:n,captures:s};const e=this.setProperties[n];e&&(u[t].setProperties=e);const r=this.assertedProperties[n];r&&(u[t].assertedProperties=r);const o=this.refutedProperties[n];o&&(u[t].refutedProperties=o)}}return u.length=i,Xe._free(_),u}captures(e,t,n,r){t||(t=nt),n||(n=nt),r||(r={});let s=r.matchLimit;if(void 0===s)s=0;else if("number"!=typeof s)throw new Error("Arguments must be numbers");gt(e),Xe._ts_query_captures_wasm(this[0],e.tree[0],t.row,t.column,n.row,n.column,s);const o=S(it,"i32"),_=S(it+Ye,"i32"),a=S(it+2*Ye,"i32"),u=[];this.exceededMatchLimit=!!a;const i=[];let l=_;for(let t=0;te(i))){const e=i[r],n=this.setProperties[t];n&&(e.setProperties=n);const s=this.assertedProperties[t];s&&(e.assertedProperties=s);const o=this.refutedProperties[t];o&&(e.refutedProperties=o),u.push(e)}}return Xe._free(_),u}predicatesForPattern(e){return this.predicates[e]}didExceedMatchLimit(){return this.exceededMatchLimit}}function mt(e,t,n){const r=n-t;let s=e.textCallback(t,null,n);for(t+=s.length;t0))break;t+=r.length,s+=r}return t>n&&(s=s.slice(0,r)),s}function ft(e,t,n,r){for(let s=0,o=r.length;s{var moduleOverrides=Object.assign({},Module),arguments_=[],thisProgram="./this.program",quit_=(e,t)=>{throw t},ENVIRONMENT_IS_WEB="object"==typeof window,ENVIRONMENT_IS_WORKER="function"==typeof importScripts,ENVIRONMENT_IS_NODE="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,scriptDirectory="",read_,readAsync,readBinary,setWindowTitle;function locateFile(e){return Module.locateFile?Module.locateFile(e,scriptDirectory):scriptDirectory+e}if(ENVIRONMENT_IS_NODE){var fs=require("fs"),nodePath=require("path");scriptDirectory=ENVIRONMENT_IS_WORKER?nodePath.dirname(scriptDirectory)+"/":__dirname+"/",read_=(e,t)=>(e=isFileURI(e)?new URL(e):nodePath.normalize(e),fs.readFileSync(e,t?void 0:"utf8")),readBinary=e=>{var t=read_(e,!0);return t.buffer||(t=new Uint8Array(t)),t},readAsync=(e,t,r,_=!0)=>{e=isFileURI(e)?new URL(e):nodePath.normalize(e),fs.readFile(e,_?void 0:"utf8",((e,s)=>{e?r(e):t(_?s.buffer:s)}))},!Module.thisProgram&&process.argv.length>1&&(thisProgram=process.argv[1].replace(/\\/g,"/")),arguments_=process.argv.slice(2),"undefined"!=typeof module&&(module.exports=Module),quit_=(e,t)=>{throw process.exitCode=e,t},Module.inspect=()=>"[Emscripten Module object]"}else(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&(ENVIRONMENT_IS_WORKER?scriptDirectory=self.location.href:void 0!==document&&document.currentScript&&(scriptDirectory=document.currentScript.src),scriptDirectory=0!==scriptDirectory.indexOf("blob:")?scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1):"",read_=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},ENVIRONMENT_IS_WORKER&&(readBinary=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),readAsync=(e,t,r)=>{var _=new XMLHttpRequest;_.open("GET",e,!0),_.responseType="arraybuffer",_.onload=()=>{200==_.status||0==_.status&&_.response?t(_.response):r()},_.onerror=r,_.send(null)},setWindowTitle=e=>document.title=e);var out=Module.print||console.log.bind(console),err=Module.printErr||console.warn.bind(console);Object.assign(Module,moduleOverrides),moduleOverrides=null,Module.arguments&&(arguments_=Module.arguments),Module.thisProgram&&(thisProgram=Module.thisProgram),Module.quit&&(quit_=Module.quit);var dynamicLibraries=Module.dynamicLibraries||[],wasmBinary;Module.wasmBinary&&(wasmBinary=Module.wasmBinary);var noExitRuntime=Module.noExitRuntime||!0,wasmMemory;"object"!=typeof WebAssembly&&abort("no native wasm support detected");var ABORT=!1,EXITSTATUS,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function assert(e,t){e||abort(t)}function updateMemoryViews(){var e=wasmMemory.buffer;Module.HEAP8=HEAP8=new Int8Array(e),Module.HEAP16=HEAP16=new Int16Array(e),Module.HEAP32=HEAP32=new Int32Array(e),Module.HEAPU8=HEAPU8=new Uint8Array(e),Module.HEAPU16=HEAPU16=new Uint16Array(e),Module.HEAPU32=HEAPU32=new Uint32Array(e),Module.HEAPF32=HEAPF32=new Float32Array(e),Module.HEAPF64=HEAPF64=new Float64Array(e)}var INITIAL_MEMORY=Module.INITIAL_MEMORY||33554432;assert(INITIAL_MEMORY>=65536,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+INITIAL_MEMORY+"! (STACK_SIZE=65536)"),wasmMemory=Module.wasmMemory?Module.wasmMemory:new WebAssembly.Memory({initial:INITIAL_MEMORY/65536,maximum:32768}),updateMemoryViews(),INITIAL_MEMORY=wasmMemory.buffer.byteLength;var wasmTable=new WebAssembly.Table({initial:25,element:"anyfunc"}),__ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATPOSTRUN__=[],__RELOC_FUNCS__=[],runtimeInitialized=!1,runtimeKeepaliveCounter=0;function keepRuntimeAlive(){return noExitRuntime||runtimeKeepaliveCounter>0}function preRun(){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=!0,callRuntimeCallbacks(__RELOC_FUNCS__),callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function postRun(){if(Module.postRun)for("function"==typeof Module.postRun&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(e){__ATPRERUN__.unshift(e)}function addOnInit(e){__ATINIT__.unshift(e)}function addOnPostRun(e){__ATPOSTRUN__.unshift(e)}var runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function getUniqueRunDependency(e){return e}function addRunDependency(e){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}function removeRunDependency(e){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),0==runDependencies&&(null!==runDependencyWatcher&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var t=dependenciesFulfilled;dependenciesFulfilled=null,t()}}function abort(e){throw Module.onAbort&&Module.onAbort(e),err(e="Aborted("+e+")"),ABORT=!0,EXITSTATUS=1,e+=". Build with -sASSERTIONS for more info.",new WebAssembly.RuntimeError(e)}var dataURIPrefix="data:application/octet-stream;base64,",wasmBinaryFile,tempDouble,tempI64;function isDataURI(e){return e.startsWith(dataURIPrefix)}function isFileURI(e){return e.startsWith("file://")}function getBinary(e){try{if(e==wasmBinaryFile&&wasmBinary)return new Uint8Array(wasmBinary);if(readBinary)return readBinary(e);throw"both async and sync fetching of the wasm failed"}catch(e){abort(e)}}function getBinaryPromise(e){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if("function"==typeof fetch&&!isFileURI(e))return fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>getBinary(e)));if(readAsync)return new Promise(((t,r)=>{readAsync(e,(e=>t(new Uint8Array(e))),r)}))}return Promise.resolve().then((()=>getBinary(e)))}function instantiateArrayBuffer(e,t,r){return getBinaryPromise(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{err("failed to asynchronously prepare wasm: "+e),abort(e)}))}function instantiateAsync(e,t,r,_){return e||"function"!=typeof WebAssembly.instantiateStreaming||isDataURI(t)||isFileURI(t)||ENVIRONMENT_IS_NODE||"function"!=typeof fetch?instantiateArrayBuffer(t,r,_):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(_,(function(e){return err("wasm streaming compile failed: "+e),err("falling back to ArrayBuffer instantiation"),instantiateArrayBuffer(t,r,_)}))))}function createWasm(){var e={env:wasmImports,wasi_snapshot_preview1:wasmImports,"GOT.mem":new Proxy(wasmImports,GOTHandler),"GOT.func":new Proxy(wasmImports,GOTHandler)};function t(e,t){var r=e.exports;r=relocateExports(r,1024);var _=getDylinkMetadata(t);return _.neededDynlibs&&(dynamicLibraries=_.neededDynlibs.concat(dynamicLibraries)),mergeLibSymbols(r,"main"),Module.asm=r,addOnInit(Module.asm.__wasm_call_ctors),__RELOC_FUNCS__.push(Module.asm.__wasm_apply_data_relocs),removeRunDependency("wasm-instantiate"),r}if(addRunDependency("wasm-instantiate"),Module.instantiateWasm)try{return Module.instantiateWasm(e,t)}catch(e){return err("Module.instantiateWasm callback failed with error: "+e),!1}return instantiateAsync(wasmBinary,wasmBinaryFile,e,(function(e){t(e.instance,e.module)})),{}}wasmBinaryFile="tree-sitter.wasm",isDataURI(wasmBinaryFile)||(wasmBinaryFile=locateFile(wasmBinaryFile));var ASM_CONSTS={};function ExitStatus(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}var GOT={},currentModuleWeakSymbols=new Set([]),GOTHandler={get:function(e,t){var r=GOT[t];return r||(r=GOT[t]=new WebAssembly.Global({value:"i32",mutable:!0})),currentModuleWeakSymbols.has(t)||(r.required=!0),r}};function callRuntimeCallbacks(e){for(;e.length>0;)e.shift()(Module)}var UTF8Decoder="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function UTF8ArrayToString(e,t,r){for(var _=t+r,s=t;e[s]&&!(s>=_);)++s;if(s-t>16&&e.buffer&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(t,s));for(var n="";t>10,56320|1023&i)}}else n+=String.fromCharCode((31&a)<<6|o)}else n+=String.fromCharCode(a)}return n}function getDylinkMetadata(e){var t=0,r=0;function _(){for(var r=0,_=1;;){var s=e[t++];if(r+=(127&s)*_,_*=128,!(128&s))break}return r}function s(){var r=_();return UTF8ArrayToString(e,(t+=r)-r,r)}function n(e,t){if(e)throw new Error(t)}var a="dylink.0";if(e instanceof WebAssembly.Module){var o=WebAssembly.Module.customSections(e,a);0===o.length&&(a="dylink",o=WebAssembly.Module.customSections(e,a)),n(0===o.length,"need dylink section"),r=(e=new Uint8Array(o[0])).length}else{n(!(1836278016==new Uint32Array(new Uint8Array(e.subarray(0,24)).buffer)[0]),"need to see wasm magic number"),n(0!==e[8],"need the dylink section to be first"),t=9;var l=_();r=t+l,a=s()}var i={neededDynlibs:[],tlsExports:new Set,weakImports:new Set};if("dylink"==a){i.memorySize=_(),i.memoryAlign=_(),i.tableSize=_(),i.tableAlign=_();for(var u=_(),d=0;d>0];case"i16":return HEAP16[e>>1];case"i32":case"i64":return HEAP32[e>>2];case"float":return HEAPF32[e>>2];case"double":return HEAPF64[e>>3];case"*":return HEAPU32[e>>2];default:abort("invalid type for getValue: "+t)}}function newDSO(e,t,r){var _={refcount:1/0,name:e,exports:r,global:!0};return LDSO.loadedLibsByName[e]=_,null!=t&&(LDSO.loadedLibsByHandle[t]=_),_}var LDSO={loadedLibsByName:{},loadedLibsByHandle:{},init:()=>newDSO("__main__",0,wasmImports)},___heap_base=78160;function zeroMemory(e,t){return HEAPU8.fill(0,e,e+t),e}function getMemory(e){if(runtimeInitialized)return zeroMemory(_malloc(e),e);var t=___heap_base,r=t+e+15&-16;return ___heap_base=r,GOT.__heap_base.value=r,t}function isInternalSym(e){return["__cpp_exception","__c_longjmp","__wasm_apply_data_relocs","__dso_handle","__tls_size","__tls_align","__set_stack_limits","_emscripten_tls_init","__wasm_init_tls","__wasm_call_ctors","__start_em_asm","__stop_em_asm"].includes(e)}function uleb128Encode(e,t){e<128?t.push(e):t.push(e%128|128,e>>7)}function sigToWasmTypes(e){for(var t={i:"i32",j:"i32",f:"f32",d:"f64",p:"i32"},r={parameters:[],results:"v"==e[0]?[]:[t[e[0]]]},_=1;_=wasmTableMirror.length&&(wasmTableMirror.length=e+1),wasmTableMirror[e]=t=wasmTable.get(e)),t}function updateTableMap(e,t){if(functionsInTableMap)for(var r=e;r>0];if(firstLoad){var memAlign=Math.pow(2,metadata.memoryAlign);memAlign=Math.max(memAlign,16);var memoryBase=metadata.memorySize?alignMemory(getMemory(metadata.memorySize+memAlign),memAlign):0,tableBase=metadata.tableSize?wasmTable.length:0;handle&&(HEAP8[handle+8>>0]=1,HEAPU32[handle+12>>2]=memoryBase,HEAP32[handle+16>>2]=metadata.memorySize,HEAPU32[handle+20>>2]=tableBase,HEAP32[handle+24>>2]=metadata.tableSize)}else memoryBase=HEAPU32[handle+12>>2],tableBase=HEAPU32[handle+20>>2];var tableGrowthNeeded=tableBase+metadata.tableSize-wasmTable.length,moduleExports;function resolveSymbol(e){var t=resolveGlobalSymbol(e).sym;return!t&&localScope&&(t=localScope[e]),t||(t=moduleExports[e]),t}tableGrowthNeeded>0&&wasmTable.grow(tableGrowthNeeded);var proxyHandler={get:function(e,t){switch(t){case"__memory_base":return memoryBase;case"__table_base":return tableBase}if(t in wasmImports&&!wasmImports[t].stub)return wasmImports[t];var r;t in e||(e[t]=function(){return r||(r=resolveSymbol(t)),r.apply(null,arguments)});return e[t]}},proxy=new Proxy({},proxyHandler),info={"GOT.mem":new Proxy({},GOTHandler),"GOT.func":new Proxy({},GOTHandler),env:proxy,wasi_snapshot_preview1:proxy};function postInstantiation(instance){function addEmAsm(addr,body){for(var args=[],arity=0;arity<16&&-1!=body.indexOf("$"+arity);arity++)args.push("$"+arity);args=args.join(",");var func="("+args+" ) => { "+body+"};";ASM_CONSTS[start]=eval(func)}if(updateTableMap(tableBase,metadata.tableSize),moduleExports=relocateExports(instance.exports,memoryBase),flags.allowUndefined||reportUndefinedSymbols(),"__start_em_asm"in moduleExports)for(var start=moduleExports.__start_em_asm,stop=moduleExports.__stop_em_asm;startpostInstantiation(e.instance)))}var module=binary instanceof WebAssembly.Module?binary:new WebAssembly.Module(binary),instance=new WebAssembly.Instance(module,info);return postInstantiation(instance)}return currentModuleWeakSymbols=metadata.weakImports,flags.loadAsync?metadata.neededDynlibs.reduce(((e,t)=>e.then((()=>loadDynamicLibrary(t,flags)))),Promise.resolve()).then(loadModule):(metadata.neededDynlibs.forEach((e=>loadDynamicLibrary(e,flags,localScope))),loadModule())}function mergeLibSymbols(e,t){for(var r in e){if(!e.hasOwnProperty(r))continue;const t=t=>{isSymbolDefined(t)||(wasmImports[t]=e[r])};t(r);const _="__main_argc_argv";"main"==r&&t(_),r==_&&t("main"),r.startsWith("dynCall_")&&!Module.hasOwnProperty(r)&&(Module[r]=e[r])}}function asyncLoad(e,t,r,_){var s=_?"":getUniqueRunDependency("al "+e);readAsync(e,(r=>{assert(r,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(r)),s&&removeRunDependency(s)}),(t=>{if(!r)throw'Loading data file "'+e+'" failed.';r()})),s&&addRunDependency(s)}function loadDynamicLibrary(e,t={global:!0,nodelete:!0},r,_){var s=LDSO.loadedLibsByName[e];if(s)return t.global&&!s.global&&(s.global=!0,"loading"!==s.exports&&mergeLibSymbols(s.exports,e)),t.nodelete&&s.refcount!==1/0&&(s.refcount=1/0),s.refcount++,_&&(LDSO.loadedLibsByHandle[_]=s),!t.loadAsync||Promise.resolve(!0);function n(){if(t.fs&&t.fs.findObject(e)){var r=t.fs.readFile(e,{encoding:"binary"});return r instanceof Uint8Array||(r=new Uint8Array(r)),t.loadAsync?Promise.resolve(r):r}var _=locateFile(e);if(t.loadAsync)return new Promise((function(e,t){asyncLoad(_,(t=>e(t)),t)}));if(!readBinary)throw new Error(_+": file not found, and synchronous loading of external files is not available");return readBinary(_)}function a(){if("undefined"!=typeof preloadedWasm&&preloadedWasm[e]){var s=preloadedWasm[e];return t.loadAsync?Promise.resolve(s):s}return t.loadAsync?n().then((e=>loadWebAssemblyModule(e,t,r,_))):loadWebAssemblyModule(n(),t,r,_)}function o(t){s.global?mergeLibSymbols(t,e):r&&Object.assign(r,t),s.exports=t}return(s=newDSO(e,_,"loading")).refcount=t.nodelete?1/0:1,s.global=t.global,t.loadAsync?a().then((e=>(o(e),!0))):(o(a()),!0)}function reportUndefinedSymbols(){for(var e in GOT)if(0==GOT[e].value){var t=resolveGlobalSymbol(e,!0).sym;if(!t&&!GOT[e].required)continue;if("function"==typeof t)GOT[e].value=addFunction(t,t.sig);else{if("number"!=typeof t)throw new Error("bad export type for `"+e+"`: "+typeof t);GOT[e].value=t}}}function loadDylibs(){dynamicLibraries.length?(addRunDependency("loadDylibs"),dynamicLibraries.reduce(((e,t)=>e.then((()=>loadDynamicLibrary(t,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0})))),Promise.resolve()).then((()=>{reportUndefinedSymbols(),removeRunDependency("loadDylibs")}))):reportUndefinedSymbols()}function setValue(e,t,r="i8"){switch(r.endsWith("*")&&(r="*"),r){case"i1":case"i8":HEAP8[e>>0]=t;break;case"i16":HEAP16[e>>1]=t;break;case"i32":HEAP32[e>>2]=t;break;case"i64":tempI64=[t>>>0,(tempDouble=t,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[e>>2]=tempI64[0],HEAP32[e+4>>2]=tempI64[1];break;case"float":HEAPF32[e>>2]=t;break;case"double":HEAPF64[e>>3]=t;break;case"*":HEAPU32[e>>2]=t;break;default:abort("invalid type for setValue: "+r)}}var ___memory_base=new WebAssembly.Global({value:"i32",mutable:!1},1024),___stack_pointer=new WebAssembly.Global({value:"i32",mutable:!0},78160),___table_base=new WebAssembly.Global({value:"i32",mutable:!1},1),nowIsMonotonic=!0,_emscripten_get_now;function __emscripten_get_now_is_monotonic(){return nowIsMonotonic}function _abort(){abort("")}function _emscripten_date_now(){return Date.now()}function _emscripten_memcpy_big(e,t,r){HEAPU8.copyWithin(e,t,t+r)}function getHeapMax(){return 2147483648}function emscripten_realloc_buffer(e){var t=wasmMemory.buffer;try{return wasmMemory.grow(e-t.byteLength+65535>>>16),updateMemoryViews(),1}catch(e){}}function _emscripten_resize_heap(e){var t=HEAPU8.length;e>>>=0;var r=getHeapMax();if(e>r)return!1;for(var _=1;_<=4;_*=2){var s=t*(1+.2/_);if(s=Math.min(s,e+100663296),emscripten_realloc_buffer(Math.min(r,(n=Math.max(e,s))+((a=65536)-n%a)%a)))return!0}var n,a;return!1}__emscripten_get_now_is_monotonic.sig="i",Module._abort=_abort,_abort.sig="v",_emscripten_date_now.sig="d",_emscripten_get_now=ENVIRONMENT_IS_NODE?()=>{var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:()=>performance.now(),_emscripten_get_now.sig="d",_emscripten_memcpy_big.sig="vppp",_emscripten_resize_heap.sig="ip";var SYSCALLS={DEFAULT_POLLMASK:5,calculateAt:function(e,t,r){if(PATH.isAbs(t))return t;var _;-100===e?_=FS.cwd():_=SYSCALLS.getStreamFromFD(e).path;if(0==t.length){if(!r)throw new FS.ErrnoError(44);return _}return PATH.join2(_,t)},doStat:function(e,t,r){try{var _=e(t)}catch(e){if(e&&e.node&&PATH.normalize(t)!==PATH.normalize(FS.getPath(e.node)))return-54;throw e}HEAP32[r>>2]=_.dev,HEAP32[r+8>>2]=_.ino,HEAP32[r+12>>2]=_.mode,HEAPU32[r+16>>2]=_.nlink,HEAP32[r+20>>2]=_.uid,HEAP32[r+24>>2]=_.gid,HEAP32[r+28>>2]=_.rdev,tempI64=[_.size>>>0,(tempDouble=_.size,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+40>>2]=tempI64[0],HEAP32[r+44>>2]=tempI64[1],HEAP32[r+48>>2]=4096,HEAP32[r+52>>2]=_.blocks;var s=_.atime.getTime(),n=_.mtime.getTime(),a=_.ctime.getTime();return tempI64=[Math.floor(s/1e3)>>>0,(tempDouble=Math.floor(s/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+56>>2]=tempI64[0],HEAP32[r+60>>2]=tempI64[1],HEAPU32[r+64>>2]=s%1e3*1e3,tempI64=[Math.floor(n/1e3)>>>0,(tempDouble=Math.floor(n/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+72>>2]=tempI64[0],HEAP32[r+76>>2]=tempI64[1],HEAPU32[r+80>>2]=n%1e3*1e3,tempI64=[Math.floor(a/1e3)>>>0,(tempDouble=Math.floor(a/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+88>>2]=tempI64[0],HEAP32[r+92>>2]=tempI64[1],HEAPU32[r+96>>2]=a%1e3*1e3,tempI64=[_.ino>>>0,(tempDouble=_.ino,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+104>>2]=tempI64[0],HEAP32[r+108>>2]=tempI64[1],0},doMsync:function(e,t,r,_,s){if(!FS.isFile(t.node.mode))throw new FS.ErrnoError(43);if(2&_)return 0;var n=HEAPU8.slice(e,e+r);FS.msync(t,n,s,r,_)},varargs:void 0,get:function(){return SYSCALLS.varargs+=4,HEAP32[SYSCALLS.varargs-4>>2]},getStr:function(e){return UTF8ToString(e)},getStreamFromFD:function(e){var t=FS.getStream(e);if(!t)throw new FS.ErrnoError(8);return t}};function _fd_close(e){try{var t=SYSCALLS.getStreamFromFD(e);return FS.close(t),0}catch(e){if("undefined"==typeof FS||"ErrnoError"!==e.name)throw e;return e.errno}}function convertI32PairToI53Checked(e,t){return t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN}function _fd_seek(e,t,r,_,s){try{var n=convertI32PairToI53Checked(t,r);if(isNaN(n))return 61;var a=SYSCALLS.getStreamFromFD(e);return FS.llseek(a,n,_),tempI64=[a.position>>>0,(tempDouble=a.position,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[s>>2]=tempI64[0],HEAP32[s+4>>2]=tempI64[1],a.getdents&&0===n&&0===_&&(a.getdents=null),0}catch(e){if("undefined"==typeof FS||"ErrnoError"!==e.name)throw e;return e.errno}}function doWritev(e,t,r,_){for(var s=0,n=0;n>2],o=HEAPU32[t+4>>2];t+=8;var l=FS.write(e,HEAP8,a,o,_);if(l<0)return-1;s+=l,void 0!==_&&(_+=l)}return s}function _fd_write(e,t,r,_){try{var s=doWritev(SYSCALLS.getStreamFromFD(e),t,r);return HEAPU32[_>>2]=s,0}catch(e){if("undefined"==typeof FS||"ErrnoError"!==e.name)throw e;return e.errno}}function _tree_sitter_log_callback(e,t){if(currentLogCallback){const r=UTF8ToString(t);currentLogCallback(r,0!==e)}}function _tree_sitter_parse_callback(e,t,r,_,s){var n=currentParseCallback(t,{row:r,column:_});"string"==typeof n?(setValue(s,n.length,"i32"),stringToUTF16(n,e,10240)):setValue(s,0,"i32")}function _proc_exit(e){EXITSTATUS=e,keepRuntimeAlive()||(Module.onExit&&Module.onExit(e),ABORT=!0),quit_(e,new ExitStatus(e))}function exitJS(e,t){EXITSTATUS=e,_proc_exit(e)}function handleException(e){if(e instanceof ExitStatus||"unwind"==e)return EXITSTATUS;quit_(1,e)}function lengthBytesUTF8(e){for(var t=0,r=0;r=55296&&_<=57343?(t+=4,++r):t+=3}return t}function stringToUTF8Array(e,t,r,_){if(!(_>0))return 0;for(var s=r,n=r+_-1,a=0;a=55296&&o<=57343)o=65536+((1023&o)<<10)|1023&e.charCodeAt(++a);if(o<=127){if(r>=n)break;t[r++]=o}else if(o<=2047){if(r+1>=n)break;t[r++]=192|o>>6,t[r++]=128|63&o}else if(o<=65535){if(r+2>=n)break;t[r++]=224|o>>12,t[r++]=128|o>>6&63,t[r++]=128|63&o}else{if(r+3>=n)break;t[r++]=240|o>>18,t[r++]=128|o>>12&63,t[r++]=128|o>>6&63,t[r++]=128|63&o}}return t[r]=0,r-s}function stringToUTF8(e,t,r){return stringToUTF8Array(e,HEAPU8,t,r)}function stringToUTF8OnStack(e){var t=lengthBytesUTF8(e)+1,r=stackAlloc(t);return stringToUTF8(e,r,t),r}function stringToUTF16(e,t,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var _=t,s=(r-=2)<2*e.length?r/2:e.length,n=0;n>1]=a,t+=2}return HEAP16[t>>1]=0,t-_}function AsciiToString(e){for(var t="";;){var r=HEAPU8[e++>>0];if(!r)return t;t+=String.fromCharCode(r)}}_fd_close.sig="ii",_fd_seek.sig="iijip",_fd_write.sig="iippp",_proc_exit.sig="vi";var wasmImports={__heap_base:___heap_base,__indirect_function_table:wasmTable,__memory_base:___memory_base,__stack_pointer:___stack_pointer,__table_base:___table_base,_emscripten_get_now_is_monotonic:__emscripten_get_now_is_monotonic,abort:_abort,emscripten_get_now:_emscripten_get_now,emscripten_memcpy_big:_emscripten_memcpy_big,emscripten_resize_heap:_emscripten_resize_heap,fd_close:_fd_close,fd_seek:_fd_seek,fd_write:_fd_write,memory:wasmMemory,tree_sitter_log_callback:_tree_sitter_log_callback,tree_sitter_parse_callback:_tree_sitter_parse_callback},asm=createWasm(),___wasm_call_ctors=function(){return(___wasm_call_ctors=Module.asm.__wasm_call_ctors).apply(null,arguments)},___wasm_apply_data_relocs=Module.___wasm_apply_data_relocs=function(){return(___wasm_apply_data_relocs=Module.___wasm_apply_data_relocs=Module.asm.__wasm_apply_data_relocs).apply(null,arguments)},_malloc=Module._malloc=function(){return(_malloc=Module._malloc=Module.asm.malloc).apply(null,arguments)},_calloc=Module._calloc=function(){return(_calloc=Module._calloc=Module.asm.calloc).apply(null,arguments)},_realloc=Module._realloc=function(){return(_realloc=Module._realloc=Module.asm.realloc).apply(null,arguments)},_free=Module._free=function(){return(_free=Module._free=Module.asm.free).apply(null,arguments)},_ts_language_symbol_count=Module._ts_language_symbol_count=function(){return(_ts_language_symbol_count=Module._ts_language_symbol_count=Module.asm.ts_language_symbol_count).apply(null,arguments)},_ts_language_state_count=Module._ts_language_state_count=function(){return(_ts_language_state_count=Module._ts_language_state_count=Module.asm.ts_language_state_count).apply(null,arguments)},_ts_language_version=Module._ts_language_version=function(){return(_ts_language_version=Module._ts_language_version=Module.asm.ts_language_version).apply(null,arguments)},_ts_language_field_count=Module._ts_language_field_count=function(){return(_ts_language_field_count=Module._ts_language_field_count=Module.asm.ts_language_field_count).apply(null,arguments)},_ts_language_next_state=Module._ts_language_next_state=function(){return(_ts_language_next_state=Module._ts_language_next_state=Module.asm.ts_language_next_state).apply(null,arguments)},_ts_language_symbol_name=Module._ts_language_symbol_name=function(){return(_ts_language_symbol_name=Module._ts_language_symbol_name=Module.asm.ts_language_symbol_name).apply(null,arguments)},_ts_language_symbol_for_name=Module._ts_language_symbol_for_name=function(){return(_ts_language_symbol_for_name=Module._ts_language_symbol_for_name=Module.asm.ts_language_symbol_for_name).apply(null,arguments)},_ts_language_symbol_type=Module._ts_language_symbol_type=function(){return(_ts_language_symbol_type=Module._ts_language_symbol_type=Module.asm.ts_language_symbol_type).apply(null,arguments)},_ts_language_field_name_for_id=Module._ts_language_field_name_for_id=function(){return(_ts_language_field_name_for_id=Module._ts_language_field_name_for_id=Module.asm.ts_language_field_name_for_id).apply(null,arguments)},_ts_lookahead_iterator_new=Module._ts_lookahead_iterator_new=function(){return(_ts_lookahead_iterator_new=Module._ts_lookahead_iterator_new=Module.asm.ts_lookahead_iterator_new).apply(null,arguments)},_ts_lookahead_iterator_delete=Module._ts_lookahead_iterator_delete=function(){return(_ts_lookahead_iterator_delete=Module._ts_lookahead_iterator_delete=Module.asm.ts_lookahead_iterator_delete).apply(null,arguments)},_ts_lookahead_iterator_reset_state=Module._ts_lookahead_iterator_reset_state=function(){return(_ts_lookahead_iterator_reset_state=Module._ts_lookahead_iterator_reset_state=Module.asm.ts_lookahead_iterator_reset_state).apply(null,arguments)},_ts_lookahead_iterator_reset=Module._ts_lookahead_iterator_reset=function(){return(_ts_lookahead_iterator_reset=Module._ts_lookahead_iterator_reset=Module.asm.ts_lookahead_iterator_reset).apply(null,arguments)},_ts_lookahead_iterator_next=Module._ts_lookahead_iterator_next=function(){return(_ts_lookahead_iterator_next=Module._ts_lookahead_iterator_next=Module.asm.ts_lookahead_iterator_next).apply(null,arguments)},_ts_lookahead_iterator_current_symbol=Module._ts_lookahead_iterator_current_symbol=function(){return(_ts_lookahead_iterator_current_symbol=Module._ts_lookahead_iterator_current_symbol=Module.asm.ts_lookahead_iterator_current_symbol).apply(null,arguments)},_memset=Module._memset=function(){return(_memset=Module._memset=Module.asm.memset).apply(null,arguments)},_memcpy=Module._memcpy=function(){return(_memcpy=Module._memcpy=Module.asm.memcpy).apply(null,arguments)},_ts_parser_delete=Module._ts_parser_delete=function(){return(_ts_parser_delete=Module._ts_parser_delete=Module.asm.ts_parser_delete).apply(null,arguments)},_ts_parser_reset=Module._ts_parser_reset=function(){return(_ts_parser_reset=Module._ts_parser_reset=Module.asm.ts_parser_reset).apply(null,arguments)},_ts_parser_set_language=Module._ts_parser_set_language=function(){return(_ts_parser_set_language=Module._ts_parser_set_language=Module.asm.ts_parser_set_language).apply(null,arguments)},_ts_parser_timeout_micros=Module._ts_parser_timeout_micros=function(){return(_ts_parser_timeout_micros=Module._ts_parser_timeout_micros=Module.asm.ts_parser_timeout_micros).apply(null,arguments)},_ts_parser_set_timeout_micros=Module._ts_parser_set_timeout_micros=function(){return(_ts_parser_set_timeout_micros=Module._ts_parser_set_timeout_micros=Module.asm.ts_parser_set_timeout_micros).apply(null,arguments)},_memmove=Module._memmove=function(){return(_memmove=Module._memmove=Module.asm.memmove).apply(null,arguments)},_memcmp=Module._memcmp=function(){return(_memcmp=Module._memcmp=Module.asm.memcmp).apply(null,arguments)},_ts_query_new=Module._ts_query_new=function(){return(_ts_query_new=Module._ts_query_new=Module.asm.ts_query_new).apply(null,arguments)},_ts_query_delete=Module._ts_query_delete=function(){return(_ts_query_delete=Module._ts_query_delete=Module.asm.ts_query_delete).apply(null,arguments)},_iswspace=Module._iswspace=function(){return(_iswspace=Module._iswspace=Module.asm.iswspace).apply(null,arguments)},_iswalnum=Module._iswalnum=function(){return(_iswalnum=Module._iswalnum=Module.asm.iswalnum).apply(null,arguments)},_ts_query_pattern_count=Module._ts_query_pattern_count=function(){return(_ts_query_pattern_count=Module._ts_query_pattern_count=Module.asm.ts_query_pattern_count).apply(null,arguments)},_ts_query_capture_count=Module._ts_query_capture_count=function(){return(_ts_query_capture_count=Module._ts_query_capture_count=Module.asm.ts_query_capture_count).apply(null,arguments)},_ts_query_string_count=Module._ts_query_string_count=function(){return(_ts_query_string_count=Module._ts_query_string_count=Module.asm.ts_query_string_count).apply(null,arguments)},_ts_query_capture_name_for_id=Module._ts_query_capture_name_for_id=function(){return(_ts_query_capture_name_for_id=Module._ts_query_capture_name_for_id=Module.asm.ts_query_capture_name_for_id).apply(null,arguments)},_ts_query_string_value_for_id=Module._ts_query_string_value_for_id=function(){return(_ts_query_string_value_for_id=Module._ts_query_string_value_for_id=Module.asm.ts_query_string_value_for_id).apply(null,arguments)},_ts_query_predicates_for_pattern=Module._ts_query_predicates_for_pattern=function(){return(_ts_query_predicates_for_pattern=Module._ts_query_predicates_for_pattern=Module.asm.ts_query_predicates_for_pattern).apply(null,arguments)},_ts_tree_copy=Module._ts_tree_copy=function(){return(_ts_tree_copy=Module._ts_tree_copy=Module.asm.ts_tree_copy).apply(null,arguments)},_ts_tree_delete=Module._ts_tree_delete=function(){return(_ts_tree_delete=Module._ts_tree_delete=Module.asm.ts_tree_delete).apply(null,arguments)},_ts_init=Module._ts_init=function(){return(_ts_init=Module._ts_init=Module.asm.ts_init).apply(null,arguments)},_ts_parser_new_wasm=Module._ts_parser_new_wasm=function(){return(_ts_parser_new_wasm=Module._ts_parser_new_wasm=Module.asm.ts_parser_new_wasm).apply(null,arguments)},_ts_parser_enable_logger_wasm=Module._ts_parser_enable_logger_wasm=function(){return(_ts_parser_enable_logger_wasm=Module._ts_parser_enable_logger_wasm=Module.asm.ts_parser_enable_logger_wasm).apply(null,arguments)},_ts_parser_parse_wasm=Module._ts_parser_parse_wasm=function(){return(_ts_parser_parse_wasm=Module._ts_parser_parse_wasm=Module.asm.ts_parser_parse_wasm).apply(null,arguments)},_ts_language_type_is_named_wasm=Module._ts_language_type_is_named_wasm=function(){return(_ts_language_type_is_named_wasm=Module._ts_language_type_is_named_wasm=Module.asm.ts_language_type_is_named_wasm).apply(null,arguments)},_ts_language_type_is_visible_wasm=Module._ts_language_type_is_visible_wasm=function(){return(_ts_language_type_is_visible_wasm=Module._ts_language_type_is_visible_wasm=Module.asm.ts_language_type_is_visible_wasm).apply(null,arguments)},_ts_tree_root_node_wasm=Module._ts_tree_root_node_wasm=function(){return(_ts_tree_root_node_wasm=Module._ts_tree_root_node_wasm=Module.asm.ts_tree_root_node_wasm).apply(null,arguments)},_ts_tree_edit_wasm=Module._ts_tree_edit_wasm=function(){return(_ts_tree_edit_wasm=Module._ts_tree_edit_wasm=Module.asm.ts_tree_edit_wasm).apply(null,arguments)},_ts_tree_get_changed_ranges_wasm=Module._ts_tree_get_changed_ranges_wasm=function(){return(_ts_tree_get_changed_ranges_wasm=Module._ts_tree_get_changed_ranges_wasm=Module.asm.ts_tree_get_changed_ranges_wasm).apply(null,arguments)},_ts_tree_cursor_new_wasm=Module._ts_tree_cursor_new_wasm=function(){return(_ts_tree_cursor_new_wasm=Module._ts_tree_cursor_new_wasm=Module.asm.ts_tree_cursor_new_wasm).apply(null,arguments)},_ts_tree_cursor_delete_wasm=Module._ts_tree_cursor_delete_wasm=function(){return(_ts_tree_cursor_delete_wasm=Module._ts_tree_cursor_delete_wasm=Module.asm.ts_tree_cursor_delete_wasm).apply(null,arguments)},_ts_tree_cursor_reset_wasm=Module._ts_tree_cursor_reset_wasm=function(){return(_ts_tree_cursor_reset_wasm=Module._ts_tree_cursor_reset_wasm=Module.asm.ts_tree_cursor_reset_wasm).apply(null,arguments)},_ts_tree_cursor_reset_to_wasm=Module._ts_tree_cursor_reset_to_wasm=function(){return(_ts_tree_cursor_reset_to_wasm=Module._ts_tree_cursor_reset_to_wasm=Module.asm.ts_tree_cursor_reset_to_wasm).apply(null,arguments)},_ts_tree_cursor_goto_first_child_wasm=Module._ts_tree_cursor_goto_first_child_wasm=function(){return(_ts_tree_cursor_goto_first_child_wasm=Module._ts_tree_cursor_goto_first_child_wasm=Module.asm.ts_tree_cursor_goto_first_child_wasm).apply(null,arguments)},_ts_tree_cursor_goto_last_child_wasm=Module._ts_tree_cursor_goto_last_child_wasm=function(){return(_ts_tree_cursor_goto_last_child_wasm=Module._ts_tree_cursor_goto_last_child_wasm=Module.asm.ts_tree_cursor_goto_last_child_wasm).apply(null,arguments)},_ts_tree_cursor_goto_next_sibling_wasm=Module._ts_tree_cursor_goto_next_sibling_wasm=function(){return(_ts_tree_cursor_goto_next_sibling_wasm=Module._ts_tree_cursor_goto_next_sibling_wasm=Module.asm.ts_tree_cursor_goto_next_sibling_wasm).apply(null,arguments)},_ts_tree_cursor_goto_previous_sibling_wasm=Module._ts_tree_cursor_goto_previous_sibling_wasm=function(){return(_ts_tree_cursor_goto_previous_sibling_wasm=Module._ts_tree_cursor_goto_previous_sibling_wasm=Module.asm.ts_tree_cursor_goto_previous_sibling_wasm).apply(null,arguments)},_ts_tree_cursor_goto_parent_wasm=Module._ts_tree_cursor_goto_parent_wasm=function(){return(_ts_tree_cursor_goto_parent_wasm=Module._ts_tree_cursor_goto_parent_wasm=Module.asm.ts_tree_cursor_goto_parent_wasm).apply(null,arguments)},_ts_tree_cursor_current_node_type_id_wasm=Module._ts_tree_cursor_current_node_type_id_wasm=function(){return(_ts_tree_cursor_current_node_type_id_wasm=Module._ts_tree_cursor_current_node_type_id_wasm=Module.asm.ts_tree_cursor_current_node_type_id_wasm).apply(null,arguments)},_ts_tree_cursor_current_node_state_id_wasm=Module._ts_tree_cursor_current_node_state_id_wasm=function(){return(_ts_tree_cursor_current_node_state_id_wasm=Module._ts_tree_cursor_current_node_state_id_wasm=Module.asm.ts_tree_cursor_current_node_state_id_wasm).apply(null,arguments)},_ts_tree_cursor_current_node_is_named_wasm=Module._ts_tree_cursor_current_node_is_named_wasm=function(){return(_ts_tree_cursor_current_node_is_named_wasm=Module._ts_tree_cursor_current_node_is_named_wasm=Module.asm.ts_tree_cursor_current_node_is_named_wasm).apply(null,arguments)},_ts_tree_cursor_current_node_is_missing_wasm=Module._ts_tree_cursor_current_node_is_missing_wasm=function(){return(_ts_tree_cursor_current_node_is_missing_wasm=Module._ts_tree_cursor_current_node_is_missing_wasm=Module.asm.ts_tree_cursor_current_node_is_missing_wasm).apply(null,arguments)},_ts_tree_cursor_current_node_id_wasm=Module._ts_tree_cursor_current_node_id_wasm=function(){return(_ts_tree_cursor_current_node_id_wasm=Module._ts_tree_cursor_current_node_id_wasm=Module.asm.ts_tree_cursor_current_node_id_wasm).apply(null,arguments)},_ts_tree_cursor_start_position_wasm=Module._ts_tree_cursor_start_position_wasm=function(){return(_ts_tree_cursor_start_position_wasm=Module._ts_tree_cursor_start_position_wasm=Module.asm.ts_tree_cursor_start_position_wasm).apply(null,arguments)},_ts_tree_cursor_end_position_wasm=Module._ts_tree_cursor_end_position_wasm=function(){return(_ts_tree_cursor_end_position_wasm=Module._ts_tree_cursor_end_position_wasm=Module.asm.ts_tree_cursor_end_position_wasm).apply(null,arguments)},_ts_tree_cursor_start_index_wasm=Module._ts_tree_cursor_start_index_wasm=function(){return(_ts_tree_cursor_start_index_wasm=Module._ts_tree_cursor_start_index_wasm=Module.asm.ts_tree_cursor_start_index_wasm).apply(null,arguments)},_ts_tree_cursor_end_index_wasm=Module._ts_tree_cursor_end_index_wasm=function(){return(_ts_tree_cursor_end_index_wasm=Module._ts_tree_cursor_end_index_wasm=Module.asm.ts_tree_cursor_end_index_wasm).apply(null,arguments)},_ts_tree_cursor_current_field_id_wasm=Module._ts_tree_cursor_current_field_id_wasm=function(){return(_ts_tree_cursor_current_field_id_wasm=Module._ts_tree_cursor_current_field_id_wasm=Module.asm.ts_tree_cursor_current_field_id_wasm).apply(null,arguments)},_ts_tree_cursor_current_node_wasm=Module._ts_tree_cursor_current_node_wasm=function(){return(_ts_tree_cursor_current_node_wasm=Module._ts_tree_cursor_current_node_wasm=Module.asm.ts_tree_cursor_current_node_wasm).apply(null,arguments)},_ts_node_symbol_wasm=Module._ts_node_symbol_wasm=function(){return(_ts_node_symbol_wasm=Module._ts_node_symbol_wasm=Module.asm.ts_node_symbol_wasm).apply(null,arguments)},_ts_node_field_name_for_child_wasm=Module._ts_node_field_name_for_child_wasm=function(){return(_ts_node_field_name_for_child_wasm=Module._ts_node_field_name_for_child_wasm=Module.asm.ts_node_field_name_for_child_wasm).apply(null,arguments)},_ts_node_grammar_symbol_wasm=Module._ts_node_grammar_symbol_wasm=function(){return(_ts_node_grammar_symbol_wasm=Module._ts_node_grammar_symbol_wasm=Module.asm.ts_node_grammar_symbol_wasm).apply(null,arguments)},_ts_node_child_count_wasm=Module._ts_node_child_count_wasm=function(){return(_ts_node_child_count_wasm=Module._ts_node_child_count_wasm=Module.asm.ts_node_child_count_wasm).apply(null,arguments)},_ts_node_named_child_count_wasm=Module._ts_node_named_child_count_wasm=function(){return(_ts_node_named_child_count_wasm=Module._ts_node_named_child_count_wasm=Module.asm.ts_node_named_child_count_wasm).apply(null,arguments)},_ts_node_child_wasm=Module._ts_node_child_wasm=function(){return(_ts_node_child_wasm=Module._ts_node_child_wasm=Module.asm.ts_node_child_wasm).apply(null,arguments)},_ts_node_named_child_wasm=Module._ts_node_named_child_wasm=function(){return(_ts_node_named_child_wasm=Module._ts_node_named_child_wasm=Module.asm.ts_node_named_child_wasm).apply(null,arguments)},_ts_node_child_by_field_id_wasm=Module._ts_node_child_by_field_id_wasm=function(){return(_ts_node_child_by_field_id_wasm=Module._ts_node_child_by_field_id_wasm=Module.asm.ts_node_child_by_field_id_wasm).apply(null,arguments)},_ts_node_next_sibling_wasm=Module._ts_node_next_sibling_wasm=function(){return(_ts_node_next_sibling_wasm=Module._ts_node_next_sibling_wasm=Module.asm.ts_node_next_sibling_wasm).apply(null,arguments)},_ts_node_prev_sibling_wasm=Module._ts_node_prev_sibling_wasm=function(){return(_ts_node_prev_sibling_wasm=Module._ts_node_prev_sibling_wasm=Module.asm.ts_node_prev_sibling_wasm).apply(null,arguments)},_ts_node_next_named_sibling_wasm=Module._ts_node_next_named_sibling_wasm=function(){return(_ts_node_next_named_sibling_wasm=Module._ts_node_next_named_sibling_wasm=Module.asm.ts_node_next_named_sibling_wasm).apply(null,arguments)},_ts_node_prev_named_sibling_wasm=Module._ts_node_prev_named_sibling_wasm=function(){return(_ts_node_prev_named_sibling_wasm=Module._ts_node_prev_named_sibling_wasm=Module.asm.ts_node_prev_named_sibling_wasm).apply(null,arguments)},_ts_node_parent_wasm=Module._ts_node_parent_wasm=function(){return(_ts_node_parent_wasm=Module._ts_node_parent_wasm=Module.asm.ts_node_parent_wasm).apply(null,arguments)},_ts_node_descendant_for_index_wasm=Module._ts_node_descendant_for_index_wasm=function(){return(_ts_node_descendant_for_index_wasm=Module._ts_node_descendant_for_index_wasm=Module.asm.ts_node_descendant_for_index_wasm).apply(null,arguments)},_ts_node_named_descendant_for_index_wasm=Module._ts_node_named_descendant_for_index_wasm=function(){return(_ts_node_named_descendant_for_index_wasm=Module._ts_node_named_descendant_for_index_wasm=Module.asm.ts_node_named_descendant_for_index_wasm).apply(null,arguments)},_ts_node_descendant_for_position_wasm=Module._ts_node_descendant_for_position_wasm=function(){return(_ts_node_descendant_for_position_wasm=Module._ts_node_descendant_for_position_wasm=Module.asm.ts_node_descendant_for_position_wasm).apply(null,arguments)},_ts_node_named_descendant_for_position_wasm=Module._ts_node_named_descendant_for_position_wasm=function(){return(_ts_node_named_descendant_for_position_wasm=Module._ts_node_named_descendant_for_position_wasm=Module.asm.ts_node_named_descendant_for_position_wasm).apply(null,arguments)},_ts_node_start_point_wasm=Module._ts_node_start_point_wasm=function(){return(_ts_node_start_point_wasm=Module._ts_node_start_point_wasm=Module.asm.ts_node_start_point_wasm).apply(null,arguments)},_ts_node_end_point_wasm=Module._ts_node_end_point_wasm=function(){return(_ts_node_end_point_wasm=Module._ts_node_end_point_wasm=Module.asm.ts_node_end_point_wasm).apply(null,arguments)},_ts_node_start_index_wasm=Module._ts_node_start_index_wasm=function(){return(_ts_node_start_index_wasm=Module._ts_node_start_index_wasm=Module.asm.ts_node_start_index_wasm).apply(null,arguments)},_ts_node_end_index_wasm=Module._ts_node_end_index_wasm=function(){return(_ts_node_end_index_wasm=Module._ts_node_end_index_wasm=Module.asm.ts_node_end_index_wasm).apply(null,arguments)},_ts_node_to_string_wasm=Module._ts_node_to_string_wasm=function(){return(_ts_node_to_string_wasm=Module._ts_node_to_string_wasm=Module.asm.ts_node_to_string_wasm).apply(null,arguments)},_ts_node_children_wasm=Module._ts_node_children_wasm=function(){return(_ts_node_children_wasm=Module._ts_node_children_wasm=Module.asm.ts_node_children_wasm).apply(null,arguments)},_ts_node_named_children_wasm=Module._ts_node_named_children_wasm=function(){return(_ts_node_named_children_wasm=Module._ts_node_named_children_wasm=Module.asm.ts_node_named_children_wasm).apply(null,arguments)},_ts_node_descendants_of_type_wasm=Module._ts_node_descendants_of_type_wasm=function(){return(_ts_node_descendants_of_type_wasm=Module._ts_node_descendants_of_type_wasm=Module.asm.ts_node_descendants_of_type_wasm).apply(null,arguments)},_ts_node_is_named_wasm=Module._ts_node_is_named_wasm=function(){return(_ts_node_is_named_wasm=Module._ts_node_is_named_wasm=Module.asm.ts_node_is_named_wasm).apply(null,arguments)},_ts_node_has_changes_wasm=Module._ts_node_has_changes_wasm=function(){return(_ts_node_has_changes_wasm=Module._ts_node_has_changes_wasm=Module.asm.ts_node_has_changes_wasm).apply(null,arguments)},_ts_node_has_error_wasm=Module._ts_node_has_error_wasm=function(){return(_ts_node_has_error_wasm=Module._ts_node_has_error_wasm=Module.asm.ts_node_has_error_wasm).apply(null,arguments)},_ts_node_is_error_wasm=Module._ts_node_is_error_wasm=function(){return(_ts_node_is_error_wasm=Module._ts_node_is_error_wasm=Module.asm.ts_node_is_error_wasm).apply(null,arguments)},_ts_node_is_missing_wasm=Module._ts_node_is_missing_wasm=function(){return(_ts_node_is_missing_wasm=Module._ts_node_is_missing_wasm=Module.asm.ts_node_is_missing_wasm).apply(null,arguments)},_ts_node_parse_state_wasm=Module._ts_node_parse_state_wasm=function(){return(_ts_node_parse_state_wasm=Module._ts_node_parse_state_wasm=Module.asm.ts_node_parse_state_wasm).apply(null,arguments)},_ts_node_next_parse_state_wasm=Module._ts_node_next_parse_state_wasm=function(){return(_ts_node_next_parse_state_wasm=Module._ts_node_next_parse_state_wasm=Module.asm.ts_node_next_parse_state_wasm).apply(null,arguments)},_ts_query_matches_wasm=Module._ts_query_matches_wasm=function(){return(_ts_query_matches_wasm=Module._ts_query_matches_wasm=Module.asm.ts_query_matches_wasm).apply(null,arguments)},_ts_query_captures_wasm=Module._ts_query_captures_wasm=function(){return(_ts_query_captures_wasm=Module._ts_query_captures_wasm=Module.asm.ts_query_captures_wasm).apply(null,arguments)},___cxa_atexit=Module.___cxa_atexit=function(){return(___cxa_atexit=Module.___cxa_atexit=Module.asm.__cxa_atexit).apply(null,arguments)},___errno_location=function(){return(___errno_location=Module.asm.__errno_location).apply(null,arguments)},_isalpha=Module._isalpha=function(){return(_isalpha=Module._isalpha=Module.asm.isalpha).apply(null,arguments)},_isspace=Module._isspace=function(){return(_isspace=Module._isspace=Module.asm.isspace).apply(null,arguments)},_iswdigit=Module._iswdigit=function(){return(_iswdigit=Module._iswdigit=Module.asm.iswdigit).apply(null,arguments)},_iswalpha=Module._iswalpha=function(){return(_iswalpha=Module._iswalpha=Module.asm.iswalpha).apply(null,arguments)},_iswblank=Module._iswblank=function(){return(_iswblank=Module._iswblank=Module.asm.iswblank).apply(null,arguments)},_iswlower=Module._iswlower=function(){return(_iswlower=Module._iswlower=Module.asm.iswlower).apply(null,arguments)},_iswupper=Module._iswupper=function(){return(_iswupper=Module._iswupper=Module.asm.iswupper).apply(null,arguments)},_memchr=Module._memchr=function(){return(_memchr=Module._memchr=Module.asm.memchr).apply(null,arguments)},_strlen=Module._strlen=function(){return(_strlen=Module._strlen=Module.asm.strlen).apply(null,arguments)},_strcmp=Module._strcmp=function(){return(_strcmp=Module._strcmp=Module.asm.strcmp).apply(null,arguments)},_strncpy=Module._strncpy=function(){return(_strncpy=Module._strncpy=Module.asm.strncpy).apply(null,arguments)},_tolower=Module._tolower=function(){return(_tolower=Module._tolower=Module.asm.tolower).apply(null,arguments)},_towlower=Module._towlower=function(){return(_towlower=Module._towlower=Module.asm.towlower).apply(null,arguments)},_towupper=Module._towupper=function(){return(_towupper=Module._towupper=Module.asm.towupper).apply(null,arguments)},_setThrew=function(){return(_setThrew=Module.asm.setThrew).apply(null,arguments)},stackSave=function(){return(stackSave=Module.asm.stackSave).apply(null,arguments)},stackRestore=function(){return(stackRestore=Module.asm.stackRestore).apply(null,arguments)},stackAlloc=function(){return(stackAlloc=Module.asm.stackAlloc).apply(null,arguments)},__Znwm=Module.__Znwm=function(){return(__Znwm=Module.__Znwm=Module.asm._Znwm).apply(null,arguments)},__ZdlPv=Module.__ZdlPv=function(){return(__ZdlPv=Module.__ZdlPv=Module.asm._ZdlPv).apply(null,arguments)},__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev=Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev=function(){return(__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev=Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev).apply(null,arguments)},__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm=Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm=function(){return(__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm=Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm).apply(null,arguments)},__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm=Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm=function(){return(__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm=Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm).apply(null,arguments)},__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm=Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm=function(){return(__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm=Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm).apply(null,arguments)},__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm=Module.__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm=function(){return(__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm=Module.__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm=Module.asm._ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm).apply(null,arguments)},__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc=Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc=function(){return(__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc=Module.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc=Module.asm._ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc).apply(null,arguments)},__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev=Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev=function(){return(__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev=Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev=Module.asm._ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev).apply(null,arguments)},__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw=Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw=function(){return(__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw=Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw=Module.asm._ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw).apply(null,arguments)},__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw=Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw=function(){return(__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw=Module.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw=Module.asm._ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw).apply(null,arguments)},dynCall_jiji=Module.dynCall_jiji=function(){return(dynCall_jiji=Module.dynCall_jiji=Module.asm.dynCall_jiji).apply(null,arguments)},_orig$ts_parser_timeout_micros=Module._orig$ts_parser_timeout_micros=function(){return(_orig$ts_parser_timeout_micros=Module._orig$ts_parser_timeout_micros=Module.asm.orig$ts_parser_timeout_micros).apply(null,arguments)},_orig$ts_parser_set_timeout_micros=Module._orig$ts_parser_set_timeout_micros=function(){return(_orig$ts_parser_set_timeout_micros=Module._orig$ts_parser_set_timeout_micros=Module.asm.orig$ts_parser_set_timeout_micros).apply(null,arguments)},_stderr=Module._stderr=11824,calledRun;function callMain(e=[]){var t=resolveGlobalSymbol("main").sym;if(t){e.unshift(thisProgram);var r=e.length,_=stackAlloc(4*(r+1)),s=_>>2;e.forEach((e=>{HEAP32[s++]=stringToUTF8OnStack(e)})),HEAP32[s]=0;try{var n=t(r,_);return exitJS(n,!0),n}catch(e){return handleException(e)}}}Module.AsciiToString=AsciiToString,Module.stringToUTF16=stringToUTF16,dependenciesFulfilled=function e(){calledRun||run(),calledRun||(dependenciesFulfilled=e)};var dylibsLoaded=!1;function run(e=arguments_){function t(){calledRun||(calledRun=!0,Module.calledRun=!0,ABORT||(initRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),shouldRunNow&&callMain(e),postRun()))}runDependencies>0||!dylibsLoaded&&(loadDylibs(),dylibsLoaded=!0,runDependencies>0)||(preRun(),runDependencies>0||(Module.setStatus?(Module.setStatus("Running..."),setTimeout((function(){setTimeout((function(){Module.setStatus("")}),1),t()}),1)):t()))}if(LDSO.init(),Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run();const C=Module,INTERNAL={},SIZE_OF_INT=4,SIZE_OF_CURSOR=3*SIZE_OF_INT,SIZE_OF_NODE=5*SIZE_OF_INT,SIZE_OF_POINT=2*SIZE_OF_INT,SIZE_OF_RANGE=2*SIZE_OF_INT+2*SIZE_OF_POINT,ZERO_POINT={row:0,column:0},QUERY_WORD_REGEX=/[\w-.]*/g,PREDICATE_STEP_TYPE_CAPTURE=1,PREDICATE_STEP_TYPE_STRING=2,LANGUAGE_FUNCTION_REGEX=/^_?tree_sitter_\w+/;var VERSION,MIN_COMPATIBLE_VERSION,TRANSFER_BUFFER,currentParseCallback,currentLogCallback;class ParserImpl{static init(){TRANSFER_BUFFER=C._ts_init(),VERSION=getValue(TRANSFER_BUFFER,"i32"),MIN_COMPATIBLE_VERSION=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32")}initialize(){C._ts_parser_new_wasm(),this[0]=getValue(TRANSFER_BUFFER,"i32"),this[1]=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32")}delete(){C._ts_parser_delete(this[0]),C._free(this[1]),this[0]=0,this[1]=0}setLanguage(e){let t;if(e){if(e.constructor!==Language)throw new Error("Argument must be a Language");{t=e[0];const r=C._ts_language_version(t);if(re.slice(t,_);else{if("function"!=typeof e)throw new Error("Argument must be a string or a function");currentParseCallback=e}this.logCallback?(currentLogCallback=this.logCallback,C._ts_parser_enable_logger_wasm(this[0],1)):(currentLogCallback=null,C._ts_parser_enable_logger_wasm(this[0],0));let _=0,s=0;if(r&&r.includedRanges){_=r.includedRanges.length,s=C._calloc(_,SIZE_OF_RANGE);let e=s;for(let t=0;t<_;t++)marshalRange(e,r.includedRanges[t]),e+=SIZE_OF_RANGE}const n=C._ts_parser_parse_wasm(this[0],this[1],t?t[0]:0,s,_);if(!n)throw currentParseCallback=null,currentLogCallback=null,new Error("Parsing failed");const a=new Tree(INTERNAL,n,this.language,currentParseCallback);return currentParseCallback=null,currentLogCallback=null,a}reset(){C._ts_parser_reset(this[0])}setTimeoutMicros(e){C._ts_parser_set_timeout_micros(this[0],e)}getTimeoutMicros(){return C._ts_parser_timeout_micros(this[0])}setLogger(e){if(e){if("function"!=typeof e)throw new Error("Logger callback must be a function")}else e=null;return this.logCallback=e,this}getLogger(){return this.logCallback}}class Tree{constructor(e,t,r,_){assertInternal(e),this[0]=t,this.language=r,this.textCallback=_}copy(){const e=C._ts_tree_copy(this[0]);return new Tree(INTERNAL,e,this.language,this.textCallback)}delete(){C._ts_tree_delete(this[0]),this[0]=0}edit(e){marshalEdit(e),C._ts_tree_edit_wasm(this[0])}get rootNode(){return C._ts_tree_root_node_wasm(this[0]),unmarshalNode(this)}getLanguage(){return this.language}walk(){return this.rootNode.walk()}getChangedRanges(e){if(e.constructor!==Tree)throw new TypeError("Argument must be a Tree");C._ts_tree_get_changed_ranges_wasm(this[0],e[0]);const t=getValue(TRANSFER_BUFFER,"i32"),r=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),_=new Array(t);if(t>0){let e=r;for(let r=0;r0){let r=t;for(let t=0;t0){let r=t;for(let t=0;t0){let e=o;for(let t=0;t0){if("string"!==s[0].type)throw new Error("Predicates must begin with a literal value");const t=s[0].value;let r,_=!0,n=!0;switch(t){case"any-not-eq?":case"not-eq?":_=!1;case"any-eq?":case"eq?":if(3!==s.length)throw new Error(`Wrong number of arguments to \`#${t}\` predicate. Expected 2, got ${s.length-1}`);if("capture"!==s[1].type)throw new Error(`First argument of \`#${t}\` predicate must be a capture. Got "${s[1].value}"`);if(n=!t.startsWith("any-"),"capture"===s[2].type){const t=s[1].name,r=s[2].name;m[e].push((function(e){let s=[],a=[];for(const _ of e)_.name===t&&s.push(_.node),_.name===r&&a.push(_.node);let o=(e,t,r)=>r?e.text===t.text:e.text!==t.text;return n?s.every((e=>a.some((t=>o(e,t,_))))):s.some((e=>a.some((t=>o(e,t,_)))))}))}else{r=s[1].name;const t=s[2].value;let a=e=>e.text===t,o=e=>e.text!==t;m[e].push((function(e){let t=[];for(const _ of e)_.name===r&&t.push(_.node);let s=_?a:o;return n?t.every(s):t.some(s)}))}break;case"any-not-match?":case"not-match?":_=!1;case"any-match?":case"match?":if(3!==s.length)throw new Error(`Wrong number of arguments to \`#${t}\` predicate. Expected 2, got ${s.length-1}.`);if("capture"!==s[1].type)throw new Error(`First argument of \`#${t}\` predicate must be a capture. Got "${s[1].value}".`);if("string"!==s[2].type)throw new Error(`Second argument of \`#${t}\` predicate must be a string. Got @${s[2].value}.`);r=s[1].name;const a=new RegExp(s[2].value);n=!t.startsWith("any-"),m[e].push((function(e){const t=[];for(const _ of e)_.name===r&&t.push(_.node.text);let s=(e,t)=>t?a.test(e):!a.test(e);return 0===t.length?!_:n?t.every((e=>s(e,_))):t.some((e=>s(e,_)))}));break;case"set!":if(s.length<2||s.length>3)throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${s.length-1}.`);if(s.some((e=>"string"!==e.type)))throw new Error('Arguments to `#set!` predicate must be a strings.".');i[e]||(i[e]={}),i[e][s[1].value]=s[2]?s[2].value:null;break;case"is?":case"is-not?":if(s.length<2||s.length>3)throw new Error(`Wrong number of arguments to \`#${t}\` predicate. Expected 1 or 2. Got ${s.length-1}.`);if(s.some((e=>"string"!==e.type)))throw new Error(`Arguments to \`#${t}\` predicate must be a strings.".`);const o="is?"===t?u:d;o[e]||(o[e]={}),o[e][s[1].value]=s[2]?s[2].value:null;break;case"not-any-of?":_=!1;case"any-of?":if(s.length<2)throw new Error(`Wrong number of arguments to \`#${t}\` predicate. Expected at least 1. Got ${s.length-1}.`);if("capture"!==s[1].type)throw new Error(`First argument of \`#${t}\` predicate must be a capture. Got "${s[1].value}".`);for(let e=2;ee.value));m[e].push((function(e){const t=[];for(const _ of e)_.name===r&&t.push(_.node.text);return 0===t.length?!_:t.every((e=>l.includes(e)))===_}));break;default:c[e].push({operator:t,operands:s.slice(1)})}s.length=0}}Object.freeze(i[e]),Object.freeze(u[e]),Object.freeze(d[e])}return C._free(r),new Query(INTERNAL,_,o,m,c,Object.freeze(i),Object.freeze(u),Object.freeze(d))}static load(e){let t;if(e instanceof Uint8Array)t=Promise.resolve(e);else{const r=e;if("undefined"!=typeof process&&process.versions&&process.versions.node){const e=require("fs");t=Promise.resolve(e.readFileSync(r))}else t=fetch(r).then((e=>e.arrayBuffer().then((t=>{if(e.ok)return new Uint8Array(t);{const r=new TextDecoder("utf-8").decode(t);throw new Error(`Language.load failed with status ${e.status}.\n\n${r}`)}}))))}return t.then((e=>loadWebAssemblyModule(e,{loadAsync:!0}))).then((e=>{const t=Object.keys(e),r=t.find((e=>LANGUAGE_FUNCTION_REGEX.test(e)&&!e.includes("external_scanner_")));r||console.log(`Couldn't find language function in WASM file. Symbols:\n${JSON.stringify(t,null,2)}`);const _=e[r]();return new Language(INTERNAL,_)}))}}class LookaheadIterable{constructor(e,t,r){assertInternal(e),this[0]=t,this.language=r}get currentTypeId(){return C._ts_lookahead_iterator_current_symbol(this[0])}get currentType(){return this.language.types[this.currentTypeId]||"ERROR"}delete(){C._ts_lookahead_iterator_delete(this[0]),this[0]=0}resetState(e){return C._ts_lookahead_iterator_reset_state(this[0],e)}reset(e,t){return!!C._ts_lookahead_iterator_reset(this[0],e[0],t)&&(this.language=e,!0)}[Symbol.iterator](){const e=this;return{next:()=>C._ts_lookahead_iterator_next(e[0])?{done:!1,value:e.currentType}:{done:!0,value:""}}}}class Query{constructor(e,t,r,_,s,n,a,o){assertInternal(e),this[0]=t,this.captureNames=r,this.textPredicates=_,this.predicates=s,this.setProperties=n,this.assertedProperties=a,this.refutedProperties=o,this.exceededMatchLimit=!1}delete(){C._ts_query_delete(this[0]),this[0]=0}matches(e,t,r,_){t||(t=ZERO_POINT),r||(r=ZERO_POINT),_||(_={});let s=_.matchLimit;if(void 0===s)s=0;else if("number"!=typeof s)throw new Error("Arguments must be numbers");marshalNode(e),C._ts_query_matches_wasm(this[0],e.tree[0],t.row,t.column,r.row,r.column,s);const n=getValue(TRANSFER_BUFFER,"i32"),a=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),o=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),l=new Array(n);this.exceededMatchLimit=!!o;let i=0,u=a;for(let t=0;te(s)))){l[i++]={pattern:r,captures:s};const e=this.setProperties[r];e&&(l[t].setProperties=e);const _=this.assertedProperties[r];_&&(l[t].assertedProperties=_);const n=this.refutedProperties[r];n&&(l[t].refutedProperties=n)}}return l.length=i,C._free(a),l}captures(e,t,r,_){t||(t=ZERO_POINT),r||(r=ZERO_POINT),_||(_={});let s=_.matchLimit;if(void 0===s)s=0;else if("number"!=typeof s)throw new Error("Arguments must be numbers");marshalNode(e),C._ts_query_captures_wasm(this[0],e.tree[0],t.row,t.column,r.row,r.column,s);const n=getValue(TRANSFER_BUFFER,"i32"),a=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),o=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),l=[];this.exceededMatchLimit=!!o;const i=[];let u=a;for(let t=0;te(i)))){const e=i[_],r=this.setProperties[t];r&&(e.setProperties=r);const s=this.assertedProperties[t];s&&(e.assertedProperties=s);const n=this.refutedProperties[t];n&&(e.refutedProperties=n),l.push(e)}}return C._free(a),l}predicatesForPattern(e){return this.predicates[e]}didExceedMatchLimit(){return this.exceededMatchLimit}}function getText(e,t,r){const _=r-t;let s=e.textCallback(t,null,r);for(t+=s.length;t0))break;t+=_.length,s+=_}return t>r&&(s=s.slice(0,_)),s}function unmarshalCaptures(e,t,r,_){for(let s=0,n=_.length;s{ParserImpl.init(),resolveInitPromise()}})))}}return Parser}();"object"==typeof exports&&(module.exports=TreeSitter); diff --git a/docs/js/tree-sitter.wasm b/docs/js/tree-sitter.wasm index 3233461d5..935549d76 100644 Binary files a/docs/js/tree-sitter.wasm and b/docs/js/tree-sitter.wasm differ