@willbooster/web-tree-sitter 21.0.0 → 23.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -120,8 +120,7 @@
120
120
  export let LANGUAGE_VERSION: number;
121
121
  /**
122
122
  * The earliest ABI version that is supported by the current version of the
123
- * library. Its parse tables are a subset of those of {@link LANGUAGE_VERSION},
124
- * so the library loads both.
123
+ * library.
125
124
  */
126
125
  export let MIN_COMPATIBLE_VERSION: number;
127
126
  /**
@@ -37,6 +37,6 @@
37
37
  null,
38
38
  null
39
39
  ],
40
- "mappings": ";;;;;;kBASiBA,KAAKA;;;;;;;;;;kBAYLC,KAAKA;;;;;;;;;;;;;aAgCVC,aAAaA;;;;aAMbC,gBAAgBA;;;;;;aAOhBC,WAAWA;;kBC3DNC,iBAAiBA;;;;;;;;;;;;;;;;;;;;kBCajBC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAiDZC,UAAUA;;;;;;;;;;;;;;YAuBhBC,gBAAgBA;;;;;;YAOhBC,sBAAsBA;;;;;cA0BpBC,MAAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WCvHFC,gBAAgBA;;;;;;;;;cAYpBC,QAAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCsBRC,IAAIA;;;;;;;;;;;;;;;;;;;;cC9BJC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCEJC,UAAUA",
40
+ "mappings": ";;;;;;kBASiBA,KAAKA;;;;;;;;;;kBAYLC,KAAKA;;;;;;;;;;;;;aAgCVC,aAAaA;;;;aAMbC,gBAAgBA;;;;;;aAOhBC,WAAWA;;kBC3DNC,iBAAiBA;;;;;;;;;;;;;;;;;;;;kBCajBC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAiDZC,UAAUA;;;;;;;;;;;;;;YAuBhBC,gBAAgBA;;;;;YAMhBC,sBAAsBA;;;;;cA0BpBC,MAAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WCtHFC,gBAAgBA;;;;;;;;;cAYpBC,QAAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCsBRC,IAAIA;;;;;;;;;;;;;;;;;;;;cC7BJC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCCJC,UAAUA",
41
41
  "ignoreList": []
42
42
  }
@@ -120,8 +120,7 @@
120
120
  export let LANGUAGE_VERSION: number;
121
121
  /**
122
122
  * The earliest ABI version that is supported by the current version of the
123
- * library. Its parse tables are a subset of those of {@link LANGUAGE_VERSION},
124
- * so the library loads both.
123
+ * library.
125
124
  */
126
125
  export let MIN_COMPATIBLE_VERSION: number;
127
126
  /**
@@ -37,6 +37,6 @@
37
37
  null,
38
38
  null
39
39
  ],
40
- "mappings": ";;;;;;kBASiBA,KAAKA;;;;;;;;;;kBAYLC,KAAKA;;;;;;;;;;;;;aAgCVC,aAAaA;;;;aAMbC,gBAAgBA;;;;;;aAOhBC,WAAWA;;kBC3DNC,iBAAiBA;;;;;;;;;;;;;;;;;;;;kBCajBC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAiDZC,UAAUA;;;;;;;;;;;;;;YAuBhBC,gBAAgBA;;;;;;YAOhBC,sBAAsBA;;;;;cA0BpBC,MAAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WCvHFC,gBAAgBA;;;;;;;;;cAYpBC,QAAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCsBRC,IAAIA;;;;;;;;;;;;;;;;;;;;cC9BJC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCEJC,UAAUA",
40
+ "mappings": ";;;;;;kBASiBA,KAAKA;;;;;;;;;;kBAYLC,KAAKA;;;;;;;;;;;;;aAgCVC,aAAaA;;;;aAMbC,gBAAgBA;;;;;;aAOhBC,WAAWA;;kBC3DNC,iBAAiBA;;;;;;;;;;;;;;;;;;;;kBCajBC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAiDZC,UAAUA;;;;;;;;;;;;;;YAuBhBC,gBAAgBA;;;;;YAMhBC,sBAAsBA;;;;;cA0BpBC,MAAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WCtHFC,gBAAgBA;;;;;;;;;cAYpBC,QAAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCsBRC,IAAIA;;;;;;;;;;;;;;;;;;;;cC7BJC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCCJC,UAAUA",
41
41
  "ignoreList": []
42
42
  }
@@ -1,5 +1,5 @@
1
- var v=4,p=9*v,E=2*v,N=2*v+2*E,j={row:0,column:0},f=Symbol("INTERNAL");function A(e){if(e!==f)throw new Error("Illegal constructor")}function C(e){return!!e&&typeof e.row=="number"&&typeof e.column=="number"}function X(e){s=e}var s;function I(e){try{return new FinalizationRegistry(e)}catch(t){console.error("Unsupported FinalizationRegistry:",t);return}}var Y=I(e=>{s._ts_tree_cursor_delete_wasm(e)}),P=class e{0=0;tree;_nodeTypeId=0;_fieldId=0;_startIndex=0;_endIndex=0;_flags=0;constructor(t,r,n){A(t),this[0]=n,this.tree=r,this.readNodeCache(),Y?.register(this,n,this)}copy(){let t=s._ts_tree_cursor_copy_wasm(this[0]);return new e(f,this.tree,t)}delete(){Y?.unregister(this),s._ts_tree_cursor_delete_wasm(this[0]),this[0]=0}get currentNode(){return s._ts_tree_cursor_current_node_wasm(this[0]),c(this.tree)}get currentFieldId(){return this._fieldId}get currentFieldName(){return this.tree.language.fields[this._fieldId]??null}get currentDepth(){return s._ts_tree_cursor_current_depth(this[0])>>>0}get currentDescendantIndex(){return s._ts_tree_cursor_current_descendant_index(this[0])>>>0}get nodeType(){return this.tree.language.types[this._nodeTypeId]||"ERROR"}get nodeTypeId(){return this._nodeTypeId}get nodeId(){return s._ts_tree_cursor_current_node_id_wasm(this[0])}get nodeIsNamed(){return(this._flags&1)!==0}get nodeIsMissing(){return(this._flags&2)!==0}get nodeText(){let{textSource:t}=this.tree;return typeof t=="string"?t.slice(this._startIndex,this._endIndex):U(t,this._startIndex,this._endIndex,this.startPosition)}get startPosition(){return s._ts_tree_cursor_start_position_wasm(this[0]),z(m)}get endPosition(){return s._ts_tree_cursor_end_position_wasm(this[0]),z(m)}get startIndex(){return this._startIndex}get endIndex(){return this._endIndex}gotoFirstChild(){return s._ts_tree_cursor_goto_first_child_wasm(this[0])?(this.readNodeCache(),!0):!1}gotoLastChild(){return s._ts_tree_cursor_goto_last_child_wasm(this[0])?(this.readNodeCache(),!0):!1}gotoParent(){return s._ts_tree_cursor_goto_parent_wasm(this[0])?(this.readNodeCache(),!0):!1}gotoNextSibling(){return s._ts_tree_cursor_goto_next_sibling_wasm(this[0])?(this.readNodeCache(),!0):!1}gotoPreviousSibling(){return s._ts_tree_cursor_goto_previous_sibling_wasm(this[0])?(this.readNodeCache(),!0):!1}gotoDescendant(t){s._ts_tree_cursor_goto_descendant_wasm(this[0],t),this.readNodeCache()}gotoFirstChildForIndex(t){return s._ts_tree_cursor_goto_first_child_for_index_wasm(this[0],t)?(this.readNodeCache(),!0):!1}gotoFirstChildForPosition(t){return s._ts_tree_cursor_goto_first_child_for_position_wasm(this[0],t.row,t.column)?(this.readNodeCache(),!0):!1}reset(t){u(t),this.tree=t.tree,s._ts_tree_cursor_reset_wasm(this[0],t.tree[0]),this.readNodeCache()}resetTo(t){this[0]!==t[0]&&(this.tree=t.tree,s._ts_tree_cursor_reset_to_wasm(this[0],t[0]),this.readNodeCache())}readNodeCache(){let t=m>>>2,r=s.HEAPU32;this._nodeTypeId=r[t],this._fieldId=r[t+1],this._startIndex=r[t+2],this._endIndex=r[t+3],this._flags=r[t+4]}};function U(e,t,r,n){let _=r-t,a=e(t,n);if(a){for(t+=a.length;t<r;){let o=e(t,n);if(o&&o.length>0)t+=o.length,a+=o;else break}t>r&&(a=a.slice(0,_))}return a??""}var J=I(e=>{s._ts_tree_delete(e)}),k=class e{0=0;textSource;language;constructor(t,r,n,_){A(t),this[0]=r,this.language=n,this.textSource=_,J?.register(this,r,this)}copy(){let t=s._ts_tree_copy(this[0]);return new e(f,t,this.language,this.textSource)}delete(){J?.unregister(this),s._ts_tree_delete(this[0]),this[0]=0}get rootNode(){return s._ts_tree_root_node_wasm(this[0]),c(this)}rootNodeWithOffset(t,r){let n=m+p;return s.HEAP32[n>>>2]=t,M(n+v,r),s._ts_tree_root_node_with_offset_wasm(this[0]),c(this)}walk(){s._ts_tree_root_node_wasm(this[0]);let t=s._ts_tree_cursor_new_wasm(this[0]);return new P(f,this,t)}getIncludedRanges(){return s._ts_tree_included_ranges_wasm(this[0]),x()}};var Q=new WeakMap,O=class{0=0;_endIndex;_endRow;_endColumn;_flags;_children;_namedChildren;constructor(t,{id:r,tree:n,startIndex:_,startPosition:a,other:o,endIndex:l,endRow:d,endColumn:h,flags:w}){A(t),this[0]=o,this.id=r,this.tree=n,this.startIndex=_,this.startPosition=a,this._endIndex=l,this._endRow=d,this._endColumn=h,this._flags=w}id;startIndex;startPosition;tree;get typeId(){return this._flags&65535}get grammarId(){return u(this),s._ts_node_grammar_symbol_wasm(this.tree[0])}get type(){return this.tree.language.types[this._flags&65535]||"ERROR"}get grammarType(){return this.tree.language.types[this.grammarId]||"ERROR"}get isNamed(){return(this._flags&65536)!==0}get isExtra(){return(this._flags&131072)!==0}get isError(){return(this._flags&1048576)!==0}get isMissing(){return(this._flags&262144)!==0}get hasError(){return(this._flags&524288)!==0}get endIndex(){return this._endIndex}get endPosition(){return{row:this._endRow,column:this._endColumn}}get text(){let{textSource:t}=this.tree;return typeof t=="string"?t.slice(this.startIndex,this._endIndex):U(t,this.startIndex,this._endIndex,this.startPosition)}equals(t){return this.tree===t.tree&&this.id===t.id}child(t){return u(this),s._ts_node_child_wasm(this.tree[0],t),c(this.tree)}namedChild(t){return u(this),s._ts_node_named_child_wasm(this.tree[0],t),c(this.tree)}childForFieldId(t){return u(this),s._ts_node_child_by_field_id_wasm(this.tree[0],t),c(this.tree)}childForFieldName(t){let r=this.tree.language.fields.indexOf(t);return r!==-1?this.childForFieldId(r):null}fieldNameForChild(t){u(this);let r=s._ts_node_field_name_for_child_wasm(this.tree[0],t);return r?s.AsciiToString(r):null}fieldNameForNamedChild(t){u(this);let r=s._ts_node_field_name_for_named_child_wasm(this.tree[0],t);return r?s.AsciiToString(r):null}childrenForFieldName(t){let r=this.tree.language.fields.indexOf(t);return r!==-1&&r!==0?this.childrenForFieldId(r):[]}childrenForFieldId(t){return u(this),s._ts_node_children_by_field_id_wasm(this.tree[0],t),F(this.tree,!0)}firstChildForIndex(t){u(this);let r=m+p;return s.HEAP32[r>>>2]=t,s._ts_node_first_child_for_byte_wasm(this.tree[0]),c(this.tree)}firstNamedChildForIndex(t){u(this);let r=m+p;return s.HEAP32[r>>>2]=t,s._ts_node_first_named_child_for_byte_wasm(this.tree[0]),c(this.tree)}get childCount(){return u(this),s._ts_node_child_count_wasm(this.tree[0])}get namedChildCount(){return u(this),s._ts_node_named_child_count_wasm(this.tree[0])}get firstChild(){return this.child(0)}get firstNamedChild(){return this.namedChild(0)}get lastChild(){return this.child(this.childCount-1)}get lastNamedChild(){return this.namedChild(this.namedChildCount-1)}get children(){return this._children||(u(this),s._ts_node_children_wasm(this.tree[0]),this._children=F(this.tree)),this._children}get namedChildren(){return this._namedChildren||(u(this),s._ts_node_named_children_wasm(this.tree[0]),this._namedChildren=F(this.tree)),this._namedChildren}descendantsOfType(t,r=j,n=j){let _=we(this.tree.language,t);if(_.length===0)return[];let a=s._malloc(v*_.length);s.HEAPU32.set(_,a>>>2),u(this);let o=m+p;M(o,r),M(o+E,n),s._ts_node_descendants_of_type_wasm(this.tree[0],a,_.length);let l=F(this.tree,!0);return s._free(a),l}get nextSibling(){return u(this),s._ts_node_next_sibling_wasm(this.tree[0]),c(this.tree)}get previousSibling(){return u(this),s._ts_node_prev_sibling_wasm(this.tree[0]),c(this.tree)}get nextNamedSibling(){return u(this),s._ts_node_next_named_sibling_wasm(this.tree[0]),c(this.tree)}get previousNamedSibling(){return u(this),s._ts_node_prev_named_sibling_wasm(this.tree[0]),c(this.tree)}get descendantCount(){return u(this),s._ts_node_descendant_count_wasm(this.tree[0])}get parent(){return u(this),s._ts_node_parent_wasm(this.tree[0]),c(this.tree)}childWithDescendant(t){return t.tree!==this.tree?null:(u(this),u(t,1),s._ts_node_child_with_descendant_wasm(this.tree[0]),c(this.tree))}descendantForIndex(t,r=t){if(typeof t!="number"||typeof r!="number")throw new Error("Arguments must be numbers");u(this);let n=m+p>>>2,_=s.HEAP32;return _[n]=t,_[n+1]=r,s._ts_node_descendant_for_index_wasm(this.tree[0]),c(this.tree)}namedDescendantForIndex(t,r=t){if(typeof t!="number"||typeof r!="number")throw new Error("Arguments must be numbers");u(this);let n=m+p>>>2,_=s.HEAP32;return _[n]=t,_[n+1]=r,s._ts_node_named_descendant_for_index_wasm(this.tree[0]),c(this.tree)}descendantForPosition(t,r=t){if(!C(t)||!C(r))throw new Error("Arguments must be {row, column} objects");u(this);let n=m+p;return M(n,t),M(n+E,r),s._ts_node_descendant_for_position_wasm(this.tree[0]),c(this.tree)}namedDescendantForPosition(t,r=t){if(!C(t)||!C(r))throw new Error("Arguments must be {row, column} objects");u(this);let n=m+p;return M(n,t),M(n+E,r),s._ts_node_named_descendant_for_position_wasm(this.tree[0]),c(this.tree)}walk(){u(this);let t=s._ts_tree_cursor_new_wasm(this.tree[0]);return new P(f,this.tree,t)}toString(){u(this);let t=s._ts_node_to_string_wasm(this.tree[0]),r=s.AsciiToString(t);return s._ts_free_wasm(t),r}};function we(e,t){return typeof t=="string"?ee(e,t):t.length===1?ee(e,t[0]):te(e,t)}function ee(e,t){let r=Q.get(e);r||(r=new Map,Q.set(e,r));let n=r.get(t);return n||(n=te(e,[t]),r.set(t,n)),n}function te(e,t){let r=[],n=e.types;for(let _=0,a=n.length;_<a;_++)t.includes(n[_])&&r.push(_);return t.includes("ERROR")&&r.push(65535),Uint32Array.from(r)}function u(e,t=0){let r=m+t*p>>>2,n=s.HEAP32;n[r]=e.id,n[r+1]=e.startIndex,n[r+2]=e.startPosition.row,n[r+3]=e.startPosition.column,n[r+4]=e[0]}function c(e,t=m){let r=t>>>2,n=s.HEAP32,_=n[r];if(_===0)return null;let a=s.HEAPU32;return new O(f,{id:_,tree:e,startIndex:a[r+1],startPosition:{row:a[r+2],column:a[r+3]},other:n[r+4],endIndex:a[r+5],endRow:a[r+6],endColumn:a[r+7],flags:a[r+8]})}function M(e,t){let r=e>>>2,n=s.HEAP32;n[r]=t.row,n[r+1]=t.column}function z(e){let t=e>>>2,r=s.HEAPU32;return{row:r[t],column:r[t+1]}}function re(e,t){let r=e>>>2,n=s.HEAP32;n[r]=t.startPosition.row,n[r+1]=t.startPosition.column,n[r+2]=t.endPosition.row,n[r+3]=t.endPosition.column,n[r+4]=t.startIndex,n[r+5]=t.endIndex}function ye(e){let t=e>>>2,r=s.HEAPU32;return{startPosition:{row:r[t],column:r[t+1]},endPosition:{row:r[t+2],column:r[t+3]},startIndex:r[t+4],endIndex:r[t+5]}}function ne(e){let t=e>>>2,r=s.HEAP32;return{major_version:r[t],minor_version:r[t+1],patch_version:r[t+2]}}function $(){let e=m>>>2,t=s.HEAPU32[e],r=s.HEAPU32[e+1],n=new Array(t);if(t>0){let _=r>>>1,a=s.HEAPU16;for(let o=0;o<t;o++)n[o]=a[_+o]}return n}function x(e=!0){return se(N,ye,e)}function F(e,t=!1){return se(p,r=>c(e,r),t)}function se(e,t,r){let n=m>>>2,_=s.HEAPU32[n],a=s.HEAP32[n+1],o=new Array(_);for(let l=0,d=a;l<_;l++,d+=e)o[l]=t(d);return a&&(r?s._ts_free_wasm(a):s._free(a)),o}var ve=/^tree_sitter_\w+$/,S=class{0=0;types;fields;constructor(t,r){A(t),this[0]=r,this.types=new Array(s._ts_language_symbol_count(this[0]));for(let n=0,_=this.types.length;n<_;n++)s._ts_language_symbol_type(this[0],n)<2&&(this.types[n]=s.UTF8ToString(s._ts_language_symbol_name(this[0],n)));this.fields=new Array(s._ts_language_field_count(this[0])+1);for(let n=0,_=this.fields.length;n<_;n++){let a=s._ts_language_field_name_for_id(this[0],n);a!==0?this.fields[n]=s.UTF8ToString(a):this.fields[n]=null}}get name(){let t=s._ts_language_name(this[0]);return t===0?null:s.UTF8ToString(t)}get abiVersion(){return s._ts_language_abi_version(this[0])}get metadata(){return s._ts_language_metadata_wasm(this[0]),s.HEAP32[m>>>2]===0?null:ne(m+v)}get fieldCount(){return this.fields.length-1}get stateCount(){return s._ts_language_state_count(this[0])}fieldIdForName(t){let r=this.fields.indexOf(t);return r!==-1?r:null}fieldNameForId(t){return this.fields[t]??null}idForNodeType(t,r){let n=s.lengthBytesUTF8(t),_=s._malloc(n+1);s.stringToUTF8(t,_,n+1);let a=s._ts_language_symbol_for_name(this[0],_,n,r?1:0);return s._free(_),a||null}get nodeTypeCount(){return s._ts_language_symbol_count(this[0])}nodeTypeForId(t){let r=s._ts_language_symbol_name(this[0],t);return r?s.UTF8ToString(r):null}nodeTypeIsNamed(t){return!!s._ts_language_type_is_named_wasm(this[0],t)}nodeTypeIsVisible(t){return!!s._ts_language_type_is_visible_wasm(this[0],t)}get supertypes(){return s._ts_language_supertypes_wasm(this[0]),$()}subtypes(t){return s._ts_language_subtypes_wasm(this[0],t),$()}static async load(t){let r;if(t instanceof Uint8Array||t instanceof WebAssembly.Module)r=t;else if(globalThis.process?.versions.node)r=await(await import("fs/promises")).readFile(t);else{let _=await fetch(t);if(!_.ok){let o=await _.text();throw new Error(`Language.load failed with status ${_.status}.
1
+ var v=4,p=9*v,E=2*v,N=2*v+2*E,z={row:0,column:0},f=Symbol("INTERNAL");function A(e){if(e!==f)throw new Error("Illegal constructor")}function k(e){return!!e&&typeof e.row=="number"&&typeof e.column=="number"}function X(e){_=e}var _;function S(e){try{return new FinalizationRegistry(e)}catch(t){console.error("Unsupported FinalizationRegistry:",t);return}}var J=S(e=>{_._ts_tree_cursor_delete_wasm(e)}),P=class e{0=0;tree;_nodeTypeId=0;_fieldId=0;_startIndex=0;_endIndex=0;_flags=0;constructor(t,r,n){A(t),this[0]=n,this.tree=r,this.readNodeCache(),J?.register(this,n,this)}copy(){let t=_._ts_tree_cursor_copy_wasm(this[0]);return new e(f,this.tree,t)}delete(){J?.unregister(this),_._ts_tree_cursor_delete_wasm(this[0]),this[0]=0}get currentNode(){return _._ts_tree_cursor_current_node_wasm(this[0]),c(this.tree)}get currentFieldId(){return this._fieldId}get currentFieldName(){return this.tree.language.fields[this._fieldId]??null}get currentDepth(){return _._ts_tree_cursor_current_depth(this[0])>>>0}get currentDescendantIndex(){return _._ts_tree_cursor_current_descendant_index(this[0])>>>0}get nodeType(){return this.tree.language.types[this._nodeTypeId]||"ERROR"}get nodeTypeId(){return this._nodeTypeId}get nodeId(){return _._ts_tree_cursor_current_node_id_wasm(this[0])}get nodeIsNamed(){return(this._flags&1)!==0}get nodeIsMissing(){return(this._flags&2)!==0}get nodeText(){let{textSource:t}=this.tree;return typeof t=="string"?t.slice(this._startIndex,this._endIndex):U(t,this._startIndex,this._endIndex,this.startPosition)}get startPosition(){return _._ts_tree_cursor_start_position_wasm(this[0]),$(m)}get endPosition(){return _._ts_tree_cursor_end_position_wasm(this[0]),$(m)}get startIndex(){return this._startIndex}get endIndex(){return this._endIndex}gotoFirstChild(){return _._ts_tree_cursor_goto_first_child_wasm(this[0])?(this.readNodeCache(),!0):!1}gotoLastChild(){return _._ts_tree_cursor_goto_last_child_wasm(this[0])?(this.readNodeCache(),!0):!1}gotoParent(){return _._ts_tree_cursor_goto_parent_wasm(this[0])?(this.readNodeCache(),!0):!1}gotoNextSibling(){return _._ts_tree_cursor_goto_next_sibling_wasm(this[0])?(this.readNodeCache(),!0):!1}gotoPreviousSibling(){return _._ts_tree_cursor_goto_previous_sibling_wasm(this[0])?(this.readNodeCache(),!0):!1}gotoDescendant(t){_._ts_tree_cursor_goto_descendant_wasm(this[0],t),this.readNodeCache()}gotoFirstChildForIndex(t){return _._ts_tree_cursor_goto_first_child_for_index_wasm(this[0],t)?(this.readNodeCache(),!0):!1}gotoFirstChildForPosition(t){return _._ts_tree_cursor_goto_first_child_for_position_wasm(this[0],t.row,t.column)?(this.readNodeCache(),!0):!1}reset(t){u(t),this.tree=t.tree,_._ts_tree_cursor_reset_wasm(this[0],t.tree[0]),this.readNodeCache()}resetTo(t){this[0]!==t[0]&&(this.tree=t.tree,_._ts_tree_cursor_reset_to_wasm(this[0],t[0]),this.readNodeCache())}readNodeCache(){let t=m>>>2,r=_.HEAPU32;this._nodeTypeId=r[t],this._fieldId=r[t+1],this._startIndex=r[t+2],this._endIndex=r[t+3],this._flags=r[t+4]}};function U(e,t,r,n){let s=r-t,a=e(t,n);if(a){for(t+=a.length;t<r;){let o=e(t,n);if(o&&o.length>0)t+=o.length,a+=o;else break}t>r&&(a=a.slice(0,s))}return a??""}var Q=S(e=>{_._ts_tree_delete(e)}),C=class e{0=0;textSource;language;constructor(t,r,n,s){A(t),this[0]=r,this.language=n,this.textSource=s,Q?.register(this,r,this)}copy(){let t=_._ts_tree_copy(this[0]);return new e(f,t,this.language,this.textSource)}delete(){Q?.unregister(this),_._ts_tree_delete(this[0]),this[0]=0}get rootNode(){return _._ts_tree_root_node_wasm(this[0]),c(this)}rootNodeWithOffset(t,r){let n=m+p;return _.HEAP32[n>>>2]=t,M(n+v,r),_._ts_tree_root_node_with_offset_wasm(this[0]),c(this)}walk(){_._ts_tree_root_node_wasm(this[0]);let t=_._ts_tree_cursor_new_wasm(this[0]);return new P(f,this,t)}getIncludedRanges(){return _._ts_tree_included_ranges_wasm(this[0]),x()}};var W=new Uint32Array(0),ee=new WeakMap,O=class{0=0;_endIndex;_endRow;_endColumn;_flags;_children;_namedChildren;constructor(t,{id:r,tree:n,startIndex:s,startPosition:a,other:o,endIndex:l,endRow:d,endColumn:h,flags:w}){A(t),this[0]=o,this.id=r,this.tree=n,this.startIndex=s,this.startPosition=a,this._endIndex=l,this._endRow=d,this._endColumn=h,this._flags=w}id;startIndex;startPosition;tree;get typeId(){return this._flags&65535}get grammarId(){return u(this),_._ts_node_grammar_symbol_wasm(this.tree[0])}get type(){return this.tree.language.types[this._flags&65535]||"ERROR"}get grammarType(){return this.tree.language.types[this.grammarId]||"ERROR"}get isNamed(){return(this._flags&65536)!==0}get isExtra(){return(this._flags&131072)!==0}get isError(){return(this._flags&1048576)!==0}get isMissing(){return(this._flags&262144)!==0}get hasError(){return(this._flags&524288)!==0}get endIndex(){return this._endIndex}get endPosition(){return{row:this._endRow,column:this._endColumn}}get text(){let{textSource:t}=this.tree;return typeof t=="string"?t.slice(this.startIndex,this._endIndex):U(t,this.startIndex,this._endIndex,this.startPosition)}equals(t){return this.tree===t.tree&&this.id===t.id}child(t){return u(this),_._ts_node_child_wasm(this.tree[0],t),c(this.tree)}namedChild(t){return u(this),_._ts_node_named_child_wasm(this.tree[0],t),c(this.tree)}childForFieldId(t){return u(this),_._ts_node_child_by_field_id_wasm(this.tree[0],t),c(this.tree)}childForFieldName(t){let r=this.tree.language.fields.indexOf(t);return r!==-1?this.childForFieldId(r):null}fieldNameForChild(t){u(this);let r=_._ts_node_field_name_for_child_wasm(this.tree[0],t);return r?_.AsciiToString(r):null}fieldNameForNamedChild(t){u(this);let r=_._ts_node_field_name_for_named_child_wasm(this.tree[0],t);return r?_.AsciiToString(r):null}childrenForFieldName(t){let r=this.tree.language.fields.indexOf(t);return r!==-1&&r!==0?this.childrenForFieldId(r):[]}childrenForFieldId(t){return u(this),_._ts_node_children_by_field_id_wasm(this.tree[0],t),F(this.tree,!0)}firstChildForIndex(t){u(this);let r=m+p;return _.HEAP32[r>>>2]=t,_._ts_node_first_child_for_byte_wasm(this.tree[0]),c(this.tree)}firstNamedChildForIndex(t){u(this);let r=m+p;return _.HEAP32[r>>>2]=t,_._ts_node_first_named_child_for_byte_wasm(this.tree[0]),c(this.tree)}get childCount(){return u(this),_._ts_node_child_count_wasm(this.tree[0])}get namedChildCount(){return u(this),_._ts_node_named_child_count_wasm(this.tree[0])}get firstChild(){return this.child(0)}get firstNamedChild(){return this.namedChild(0)}get lastChild(){return this.child(this.childCount-1)}get lastNamedChild(){return this.namedChild(this.namedChildCount-1)}get children(){return this._children||(u(this),_._ts_node_children_wasm(this.tree[0]),this._children=F(this.tree)),this._children}get namedChildren(){return this._namedChildren||(u(this),_._ts_node_named_children_wasm(this.tree[0]),this._namedChildren=F(this.tree)),this._namedChildren}descendantsOfType(t,r=z,n=z){let s=be(this.tree.language,t);if(s.length===0)return[];let a=_._malloc(v*s.length);_.HEAPU32.set(s,a>>>2),u(this);let o=m+p;M(o,r),M(o+E,n),_._ts_node_descendants_of_type_wasm(this.tree[0],a,s.length);let l=F(this.tree,!0);return _._free(a),l}get nextSibling(){return u(this),_._ts_node_next_sibling_wasm(this.tree[0]),c(this.tree)}get previousSibling(){return u(this),_._ts_node_prev_sibling_wasm(this.tree[0]),c(this.tree)}get nextNamedSibling(){return u(this),_._ts_node_next_named_sibling_wasm(this.tree[0]),c(this.tree)}get previousNamedSibling(){return u(this),_._ts_node_prev_named_sibling_wasm(this.tree[0]),c(this.tree)}get descendantCount(){return u(this),_._ts_node_descendant_count_wasm(this.tree[0])}get parent(){return u(this),_._ts_node_parent_wasm(this.tree[0]),c(this.tree)}childWithDescendant(t){return t.tree!==this.tree?null:(u(this),u(t,1),_._ts_node_child_with_descendant_wasm(this.tree[0]),c(this.tree))}descendantForIndex(t,r=t){if(typeof t!="number"||typeof r!="number")throw new Error("Arguments must be numbers");u(this);let n=m+p>>>2,s=_.HEAP32;return s[n]=t,s[n+1]=r,_._ts_node_descendant_for_index_wasm(this.tree[0]),c(this.tree)}namedDescendantForIndex(t,r=t){if(typeof t!="number"||typeof r!="number")throw new Error("Arguments must be numbers");u(this);let n=m+p>>>2,s=_.HEAP32;return s[n]=t,s[n+1]=r,_._ts_node_named_descendant_for_index_wasm(this.tree[0]),c(this.tree)}descendantForPosition(t,r=t){if(!k(t)||!k(r))throw new Error("Arguments must be {row, column} objects");u(this);let n=m+p;return M(n,t),M(n+E,r),_._ts_node_descendant_for_position_wasm(this.tree[0]),c(this.tree)}namedDescendantForPosition(t,r=t){if(!k(t)||!k(r))throw new Error("Arguments must be {row, column} objects");u(this);let n=m+p;return M(n,t),M(n+E,r),_._ts_node_named_descendant_for_position_wasm(this.tree[0]),c(this.tree)}walk(){u(this);let t=_._ts_tree_cursor_new_wasm(this.tree[0]);return new P(f,this.tree,t)}toString(){u(this);let t=_._ts_node_to_string_wasm(this.tree[0]),r=_.AsciiToString(t);return _._ts_free_wasm(t),r}};function be(e,t){let r=we(e);return typeof t=="string"?r.get(t)??W:t.length===0?W:t.length===1?r.get(t[0])??W:ve(r,t)}function we(e){let t=ee.get(e);return t||(t=ye(e.types),ee.set(e,t)),t}function ye(e){let t=new Map;for(let s=0,a=e.length;s<a;s++){let o=e[s];if(o!==void 0){let l=t.get(o);l||(l=[],t.set(o,l)),l.push(s)}}let r=t.get("ERROR");r?r[r.length-1]!==65535&&r.push(65535):t.set("ERROR",[65535]);let n=new Map;for(let[s,a]of t)n.set(s,Uint32Array.from(a));return n}function ve(e,t){let r=[];for(let n of new Set(t)){let s=e.get(n);if(s)for(let a of s)r.push(a)}return r.length===0?W:Uint32Array.from(r).sort()}function u(e,t=0){let r=m+t*p>>>2,n=_.HEAP32;n[r]=e.id,n[r+1]=e.startIndex,n[r+2]=e.startPosition.row,n[r+3]=e.startPosition.column,n[r+4]=e[0]}function c(e,t=m){let r=t>>>2,n=_.HEAP32,s=n[r];if(s===0)return null;let a=_.HEAPU32;return new O(f,{id:s,tree:e,startIndex:a[r+1],startPosition:{row:a[r+2],column:a[r+3]},other:n[r+4],endIndex:a[r+5],endRow:a[r+6],endColumn:a[r+7],flags:a[r+8]})}function M(e,t){let r=e>>>2,n=_.HEAP32;n[r]=t.row,n[r+1]=t.column}function $(e){let t=e>>>2,r=_.HEAPU32;return{row:r[t],column:r[t+1]}}function te(e,t){let r=e>>>2,n=_.HEAP32;n[r]=t.startPosition.row,n[r+1]=t.startPosition.column,n[r+2]=t.endPosition.row,n[r+3]=t.endPosition.column,n[r+4]=t.startIndex,n[r+5]=t.endIndex}function Me(e){let t=e>>>2,r=_.HEAPU32;return{startPosition:{row:r[t],column:r[t+1]},endPosition:{row:r[t+2],column:r[t+3]},startIndex:r[t+4],endIndex:r[t+5]}}function re(e){let t=e>>>2,r=_.HEAP32;return{major_version:r[t],minor_version:r[t+1],patch_version:r[t+2]}}function V(){let e=m>>>2,t=_.HEAPU32[e],r=_.HEAPU32[e+1],n=new Array(t);if(t>0){let s=r>>>1,a=_.HEAPU16;for(let o=0;o<t;o++)n[o]=a[s+o]}return n}function x(e=!0){return ne(N,Me,e)}function F(e,t=!1){return ne(p,r=>c(e,r),t)}function ne(e,t,r){let n=m>>>2,s=_.HEAPU32[n],a=_.HEAP32[n+1],o=new Array(s);for(let l=0,d=a;l<s;l++,d+=e)o[l]=t(d);return a&&(r?_._ts_free_wasm(a):_._free(a)),o}var Ae=/^tree_sitter_\w+$/,I=class{0=0;types;fields;constructor(t,r){A(t),this[0]=r,this.types=new Array(_._ts_language_symbol_count(this[0]));for(let n=0,s=this.types.length;n<s;n++)_._ts_language_symbol_type(this[0],n)<2&&(this.types[n]=_.UTF8ToString(_._ts_language_symbol_name(this[0],n)));this.fields=new Array(_._ts_language_field_count(this[0])+1);for(let n=0,s=this.fields.length;n<s;n++){let a=_._ts_language_field_name_for_id(this[0],n);a!==0?this.fields[n]=_.UTF8ToString(a):this.fields[n]=null}}get name(){let t=_._ts_language_name(this[0]);return t===0?null:_.UTF8ToString(t)}get abiVersion(){return _._ts_language_abi_version(this[0])}get metadata(){return _._ts_language_metadata_wasm(this[0]),_.HEAP32[m>>>2]===0?null:re(m+v)}get fieldCount(){return this.fields.length-1}get stateCount(){return _._ts_language_state_count(this[0])}fieldIdForName(t){let r=this.fields.indexOf(t);return r!==-1?r:null}fieldNameForId(t){return this.fields[t]??null}idForNodeType(t,r){let n=_.lengthBytesUTF8(t),s=_._malloc(n+1);_.stringToUTF8(t,s,n+1);let a=_._ts_language_symbol_for_name(this[0],s,n,r?1:0);return _._free(s),a||null}get nodeTypeCount(){return _._ts_language_symbol_count(this[0])}nodeTypeForId(t){let r=_._ts_language_symbol_name(this[0],t);return r?_.UTF8ToString(r):null}nodeTypeIsNamed(t){return!!_._ts_language_type_is_named_wasm(this[0],t)}nodeTypeIsVisible(t){return!!_._ts_language_type_is_visible_wasm(this[0],t)}get supertypes(){return _._ts_language_supertypes_wasm(this[0]),V()}subtypes(t){return _._ts_language_subtypes_wasm(this[0],t),V()}static async load(t){let r;if(t instanceof Uint8Array||t instanceof WebAssembly.Module)r=t;else if(globalThis.process?.versions.node)r=await(await import("fs/promises")).readFile(t);else{let s=await fetch(t);if(!s.ok){let o=await s.text();throw new Error(`Language.load failed with status ${s.status}.
2
2
 
3
- ${o}`)}let a=_.clone();try{r=await WebAssembly.compileStreaming(_)}catch(o){console.error("wasm streaming compile failed:",o),console.error("falling back to ArrayBuffer instantiation"),r=new Uint8Array(await a.arrayBuffer())}}let n=await s.loadWebAssemblyModule(r,{loadAsync:!0});return _e(n,{sync:!1})}static loadSync(t){let r=s.loadWebAssemblyModule(t,{loadAsync:!1});return _e(r,{sync:!0})}};function _e(e,{sync:t}){let r=Object.keys(e),n=r.find(a=>ve.test(a)&&!a.includes("external_scanner_"));if(!n)throw console.log(`Couldn't find language function in Wasm file. Symbols:
4
- ${JSON.stringify(r,null,2)}`),new Error(`Language.${t?"loadSync":"load"} failed: no language function found in Wasm file`);let _=e[n]();return new S(f,_)}async function Me(moduleArg={}){var moduleRtn,Module=moduleArg,ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof WorkerGlobalScope<"u",ENVIRONMENT_IS_NODE=typeof process=="object"&&process.versions?.node&&process.type!="renderer";if(ENVIRONMENT_IS_NODE){let{createRequire:e}=await import("module");var require=e(import.meta.url)}Module.currentProgressCallback=null,Module.currentLogCallback=null,Module.currentParseCallback=null,Module.treeSitterSetMemoryLimit=function(e){return e?wasmMemory.buffer.byteLength>e||Module.treeSitterOriginalMemoryGrow?!1:(Module.treeSitterOriginalMemoryGrow=wasmMemory.grow,wasmMemory.grow=function(t){if(wasmMemory.buffer.byteLength+t*65536>e)throw new RangeError("Parse memory limit exceeded");return Module.treeSitterOriginalMemoryGrow.call(wasmMemory,t)},!0):(Module.treeSitterOriginalMemoryGrow&&(wasmMemory.grow=Module.treeSitterOriginalMemoryGrow,Module.treeSitterOriginalMemoryGrow=null),!0)};var arguments_=[],thisProgram="./this.program",quit_=(e,t)=>{throw t},_scriptName=import.meta.url,scriptDirectory="";function locateFile(e){return Module.locateFile?Module.locateFile(e,scriptDirectory):scriptDirectory+e}var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require("fs");_scriptName.startsWith("file:")&&(scriptDirectory=require("path").dirname(require("url").fileURLToPath(_scriptName))+"/"),readBinary=e=>{e=isFileURI(e)?new URL(e):e;var t=fs.readFileSync(e);return t},readAsync=async(e,t=!0)=>{e=isFileURI(e)?new URL(e):e;var r=fs.readFileSync(e,t?void 0:"utf8");return r},process.argv.length>1&&(thisProgram=process.argv[1].replace(/\\/g,"/")),arguments_=process.argv.slice(2),quit_=(e,t)=>{throw process.exitCode=e,t}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){try{scriptDirectory=new URL(".",_scriptName).href}catch{}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=async e=>{if(isFileURI(e))return new Promise((r,n)=>{var _=new XMLHttpRequest;_.open("GET",e,!0),_.responseType="arraybuffer",_.onload=()=>{if(_.status==200||_.status==0&&_.response){r(_.response);return}n(_.status)},_.onerror=n,_.send(null)});var t=await fetch(e,{credentials:"same-origin"});if(t.ok)return t.arrayBuffer();throw new Error(t.status+" : "+t.url)}}var out=console.log.bind(console),err=console.error.bind(console),dynamicLibraries=[],wasmBinary,ABORT=!1,EXITSTATUS,isFileURI=e=>e.startsWith("file://"),readyPromiseResolve,readyPromiseReject,wasmMemory,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,HEAP64,HEAPU64,runtimeInitialized=!1;function updateMemoryViews(){var e=wasmMemory.buffer;HEAP8=new Int8Array(e),HEAP16=new Int16Array(e),HEAPU8=new Uint8Array(e),Module.HEAPU16=HEAPU16=new Uint16Array(e),Module.HEAP32=HEAP32=new Int32Array(e),Module.HEAPU32=HEAPU32=new Uint32Array(e),HEAPF32=new Float32Array(e),HEAPF64=new Float64Array(e),HEAP64=new BigInt64Array(e),HEAPU64=new BigUint64Array(e)}function initMemory(){if(Module.wasmMemory)wasmMemory=Module.wasmMemory;else{var e=Module.INITIAL_MEMORY||524288;wasmMemory=new WebAssembly.Memory({initial:e/65536,maximum:32768})}updateMemoryViews()}var __RELOC_FUNCS__=[];function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(onPreRuns)}function initRuntime(){runtimeInitialized=!0,callRuntimeCallbacks(__RELOC_FUNCS__),wasmExports.__wasm_call_ctors(),callRuntimeCallbacks(onPostCtors)}function preMain(){}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(onPostRuns)}function abort(e){Module.onAbort?.(e),e="Aborted("+e+")",err(e),ABORT=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw readyPromiseReject?.(t),t}var wasmBinaryFile;function findWasmBinary(){return Module.locateFile?locateFile("web-tree-sitter.wasm"):new URL("web-tree-sitter.wasm",import.meta.url).href}function getBinarySync(e){if(e==wasmBinaryFile&&wasmBinary)return new Uint8Array(wasmBinary);if(readBinary)return readBinary(e);throw"both async and sync fetching of the wasm failed"}async function getWasmBinary(e){if(!wasmBinary)try{var t=await readAsync(e);return new Uint8Array(t)}catch{}return getBinarySync(e)}async function instantiateArrayBuffer(e,t){try{var r=await getWasmBinary(e),n=await WebAssembly.instantiate(r,t);return n}catch(_){err(`failed to asynchronously prepare wasm: ${_}`),abort(_)}}async function instantiateAsync(e,t,r){if(!e&&!isFileURI(t)&&!ENVIRONMENT_IS_NODE)try{var n=fetch(t,{credentials:"same-origin"}),_=await WebAssembly.instantiateStreaming(n,r);return _}catch(a){err(`wasm streaming compile failed: ${a}`),err("falling back to ArrayBuffer instantiation")}return instantiateArrayBuffer(t,r)}function getWasmImports(){return{env:wasmImports,wasi_snapshot_preview1:wasmImports,"GOT.mem":new Proxy(wasmImports,GOTHandler),"GOT.func":new Proxy(wasmImports,GOTHandler)}}async function createWasm(){function e(a,o){wasmExports=a.exports,wasmExports=relocateExports(wasmExports,1024);var l=getDylinkMetadata(o);l.neededDynlibs&&(dynamicLibraries=l.neededDynlibs.concat(dynamicLibraries));let d={malloc:wasmExports.ts_scanner_malloc_wasm,calloc:wasmExports.ts_scanner_calloc_wasm,realloc:wasmExports.ts_scanner_realloc_wasm};return Object.assign(wasmImports,d),updateGOT(d,!0),mergeLibSymbols(wasmExports,"main"),LDSO.init(),loadDylibs(),__RELOC_FUNCS__.push(wasmExports.__wasm_apply_data_relocs),assignWasmExports(wasmExports),wasmExports}function t(a){return e(a.instance,a.module)}var r=getWasmImports();if(Module.instantiateWasm)return new Promise((a,o)=>{Module.instantiateWasm(r,(l,d)=>{a(e(l,d))})});wasmBinaryFile??=findWasmBinary();var n=await instantiateAsync(wasmBinary,wasmBinaryFile,r),_=t(n);return _}class ExitStatus{name="ExitStatus";constructor(t){this.message=`Program terminated with exit(${t})`,this.status=t}}var GOT={},currentModuleWeakSymbols=new Set([]),GOTHandler={get(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}},callRuntimeCallbacks=e=>{for(;e.length>0;)e.shift()(Module)},onPostRuns=[],addOnPostRun=e=>onPostRuns.push(e),onPreRuns=[],addOnPreRun=e=>onPreRuns.push(e),UTF8Decoder=typeof TextDecoder<"u"?new TextDecoder:void 0,findStringEnd=(e,t,r,n)=>{var _=t+r;if(n)return _;for(;e[t]&&!(t>=_);)++t;return t},UTF8ArrayToString=(e,t=0,r,n)=>{var _=findStringEnd(e,t,r,n);if(_-t>16&&e.buffer&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(t,_));for(var a="";t<_;){var o=e[t++];if(!(o&128)){a+=String.fromCharCode(o);continue}var l=e[t++]&63;if((o&224)==192){a+=String.fromCharCode((o&31)<<6|l);continue}var d=e[t++]&63;if((o&240)==224?o=(o&15)<<12|l<<6|d:o=(o&7)<<18|l<<12|d<<6|e[t++]&63,o<65536)a+=String.fromCharCode(o);else{var h=o-65536;a+=String.fromCharCode(55296|h>>10,56320|h&1023)}}return a},getDylinkMetadata=e=>{var t=0,r=0;function n(){return e[t++]}function _(){for(var y=0,T=1;;){var q=e[t++];if(y+=(q&127)*T,T*=128,!(q&128))break}return y}function a(){var y=_();return t+=y,UTF8ArrayToString(e,t-y,y)}function o(){for(var y=_(),T=[];y--;)T.push(a());return T}function l(y,T){if(y)throw new Error(T)}if(e instanceof WebAssembly.Module){var d=WebAssembly.Module.customSections(e,"dylink.0");l(d.length===0,"need dylink section"),e=new Uint8Array(d[0]),r=e.length}else{var h=new Uint32Array(new Uint8Array(e.subarray(0,24)).buffer),w=h[0]==1836278016;l(!w,"need to see wasm magic number"),l(e[8]!==0,"need the dylink section to be first"),t=9;var b=_();r=t+b;var H=a();l(H!=="dylink.0")}for(var g={neededDynlibs:[],tlsExports:new Set,weakImports:new Set,runtimePaths:[]},de=1,ue=2,me=3,ce=4,ge=5,fe=256,he=3,pe=1;t<r;){var R=n(),be=_();if(R===de)g.memorySize=_(),g.memoryAlign=_(),g.tableSize=_(),g.tableAlign=_();else if(R===ue)g.neededDynlibs=o();else if(R===me)for(var D=_();D--;){var B=a(),G=_();G&fe&&g.tlsExports.add(B)}else if(R===ce)for(var D=_();D--;){var Ne=a(),B=a(),G=_();(G&he)==pe&&g.weakImports.add(B)}else R===ge?g.runtimePaths=o():t+=be}return g},newDSO=(e,t,r)=>{var n={refcount:1/0,name:e,exports:r,global:!0};return LDSO.loadedLibsByName[e]=n,t!=null&&(LDSO.loadedLibsByHandle[t]=n),n},LDSO={loadedLibsByName:{},loadedLibsByHandle:{},init(){newDSO("__main__",0,wasmImports)}},___heap_base=82176,alignMemory=(e,t)=>Math.ceil(e/t)*t,getMemory=e=>{if(runtimeInitialized)return _calloc(e,1);var t=___heap_base,r=t+alignMemory(e,16);return ___heap_base=r,GOT.__heap_base.value=r,t},isInternalSym=e=>["__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","__start_em_js","__stop_em_js"].includes(e)||e.startsWith("__em_js__"),uleb128EncodeWithLen=e=>{let t=e.length;return[t%128|128,t>>7,...e]},wasmTypeCodes={i:127,p:127,j:126,f:125,d:124,e:111},generateTypePack=e=>uleb128EncodeWithLen(Array.from(e,t=>{var r=wasmTypeCodes[t];return r})),convertJsFunctionToWasm=(e,t)=>{var r=Uint8Array.of(0,97,115,109,1,0,0,0,1,...uleb128EncodeWithLen([1,96,...generateTypePack(t.slice(1)),...generateTypePack(t[0]==="v"?"":t[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),n=new WebAssembly.Module(r),_=new WebAssembly.Instance(n,{e:{f:e}}),a=_.exports.f;return a},wasmTableMirror=[],wasmTable=new WebAssembly.Table({initial:49,element:"anyfunc"}),getWasmTableEntry=e=>{var t=wasmTableMirror[e];return t||(wasmTableMirror[e]=t=wasmTable.get(e)),t},updateTableMap=(e,t)=>{if(functionsInTableMap)for(var r=e;r<e+t;r++){var n=getWasmTableEntry(r);n&&functionsInTableMap.set(n,r)}},functionsInTableMap,getFunctionAddress=e=>(functionsInTableMap||(functionsInTableMap=new WeakMap,updateTableMap(0,wasmTable.length)),functionsInTableMap.get(e)||0),freeTableIndexes=[],getEmptyTableSlot=()=>freeTableIndexes.length?freeTableIndexes.pop():wasmTable.grow(1),setWasmTableEntry=(e,t)=>{wasmTable.set(e,t),wasmTableMirror[e]=wasmTable.get(e)},addFunction=(e,t)=>{var r=getFunctionAddress(e);if(r)return r;var n=getEmptyTableSlot();try{setWasmTableEntry(n,e)}catch(a){if(!(a instanceof TypeError))throw a;var _=convertJsFunctionToWasm(e,t);setWasmTableEntry(n,_)}return functionsInTableMap.set(e,n),n},updateGOT=(e,t)=>{for(var r in e)if(!isInternalSym(r)){var n=e[r];GOT[r]||=new WebAssembly.Global({value:"i32",mutable:!0}),(t||GOT[r].value==0)&&(typeof n=="function"?GOT[r].value=addFunction(n):typeof n=="number"?GOT[r].value=n:err(`unhandled export type for '${r}': ${typeof n}`))}},relocateExports=(e,t,r)=>{var n={};for(var _ in e){var a=e[_];typeof a=="object"&&(a=a.value),typeof a=="number"&&(a+=t),n[_]=a}return updateGOT(n,r),n},isSymbolDefined=e=>{var t=wasmImports[e];return!(!t||t.stub)},dynCall=(e,t,r=[],n=!1)=>{var _=getWasmTableEntry(t),a=_(...r);function o(l){return l}return a},stackSave=()=>_emscripten_stack_get_current(),stackRestore=e=>__emscripten_stack_restore(e),createInvokeFunction=e=>(t,...r)=>{var n=stackSave();try{return dynCall(e,t,r)}catch(_){if(stackRestore(n),_!==_+0)throw _;if(_setThrew(1,0),e[0]=="j")return 0n}},resolveGlobalSymbol=(e,t=!1)=>{var r;return isSymbolDefined(e)?r=wasmImports[e]:e.startsWith("invoke_")&&(r=wasmImports[e]=createInvokeFunction(e.split("_")[1])),{sym:r,name:e}},onPostCtors=[],addOnPostCtor=e=>onPostCtors.push(e),UTF8ToString=(e,t,r)=>e?UTF8ArrayToString(HEAPU8,e,t,r):"",loadWebAssemblyModule=(binary,flags,libName,localScope,handle)=>{var metadata=getDylinkMetadata(binary);function loadModule(){var memAlign=Math.pow(2,metadata.memoryAlign),memoryBase=metadata.memorySize?alignMemory(getMemory(metadata.memorySize+memAlign),memAlign):0,tableBase=metadata.tableSize?wasmTable.length:0;handle&&(HEAP8[handle+8]=1,HEAPU32[handle+12>>2]=memoryBase,HEAP32[handle+16>>2]=metadata.memorySize,HEAPU32[handle+20>>2]=tableBase,HEAP32[handle+24>>2]=metadata.tableSize),metadata.tableSize&&wasmTable.grow(metadata.tableSize);var moduleExports;function resolveSymbol(e){var t=resolveGlobalSymbol(e).sym;return!t&&localScope&&(t=localScope[e]),t||(t=moduleExports[e]),t}var proxyHandler={get(e,t){switch(t){case"__memory_base":return memoryBase;case"__table_base":return tableBase}if(t in wasmImports&&!wasmImports[t].stub){var r=wasmImports[t];return r}if(!(t in e)){var n;e[t]=(..._)=>(n||=resolveSymbol(t),n(..._))}return e[t]}},proxy=new Proxy({},proxyHandler);currentModuleWeakSymbols=metadata.weakImports;var info={"GOT.mem":new Proxy({},GOTHandler),"GOT.func":new Proxy({},GOTHandler),env:proxy,wasi_snapshot_preview1:proxy};function postInstantiation(module,instance){updateTableMap(tableBase,metadata.tableSize),moduleExports=relocateExports(instance.exports,memoryBase),flags.allowUndefined||reportUndefinedSymbols();function addEmAsm(addr,body){for(var args=[],arity=0;arity<16&&body.indexOf("$"+arity)!=-1;arity++)args.push("$"+arity);args=args.join(",");var func=`(${args}) => { ${body} };`;ASM_CONSTS[start]=eval(func)}if("__start_em_asm"in moduleExports)for(var start=moduleExports.__start_em_asm,stop=moduleExports.__stop_em_asm;start<stop;){var jsString=UTF8ToString(start);addEmAsm(start,jsString),start=HEAPU8.indexOf(0,start)+1}function addEmJs(name,cSig,body){var jsArgs=[];if(cSig=cSig.slice(1,-1),cSig!="void"){cSig=cSig.split(",");for(var i in cSig){var jsArg=cSig[i].split(" ").pop();jsArgs.push(jsArg.replace("*",""))}}var func=`(${jsArgs}) => ${body};`;moduleExports[name]=eval(func)}for(var name in moduleExports)if(name.startsWith("__em_js__")){var start=moduleExports[name],jsString=UTF8ToString(start),parts=jsString.split("<::>");addEmJs(name.replace("__em_js__",""),parts[0],parts[1]),delete moduleExports[name]}var applyRelocs=moduleExports.__wasm_apply_data_relocs;applyRelocs&&(runtimeInitialized?applyRelocs():__RELOC_FUNCS__.push(applyRelocs));var init=moduleExports.__wasm_call_ctors;return init&&(runtimeInitialized?init():addOnPostCtor(init)),moduleExports}if(flags.loadAsync)return(async()=>{var e;return binary instanceof WebAssembly.Module?e=await WebAssembly.instantiate(binary,info):{module:binary,instance:e}=await WebAssembly.instantiate(binary,info),postInstantiation(binary,e)})();var module=binary instanceof WebAssembly.Module?binary:new WebAssembly.Module(binary),instance=new WebAssembly.Instance(module,info);return postInstantiation(module,instance)}return flags={...flags,rpath:{parentLibPath:libName,paths:metadata.runtimePaths}},flags.loadAsync?metadata.neededDynlibs.reduce((e,t)=>e.then(()=>loadDynamicLibrary(t,flags,localScope)),Promise.resolve()).then(loadModule):(metadata.neededDynlibs.forEach(e=>loadDynamicLibrary(e,flags,localScope)),loadModule())},mergeLibSymbols=(e,t)=>{for(var[r,n]of Object.entries(e)){let _=o=>{isSymbolDefined(o)||(wasmImports[o]=n)};_(r);let a="__main_argc_argv";r=="main"&&_(a),r==a&&_("main")}},asyncLoad=async e=>{var t=await readAsync(e);return new Uint8Array(t)};function loadDynamicLibrary(e,t={global:!0,nodelete:!0},r,n){var _=LDSO.loadedLibsByName[e];if(_)return t.global?_.global||(_.global=!0,mergeLibSymbols(_.exports,e)):r&&Object.assign(r,_.exports),t.nodelete&&_.refcount!==1/0&&(_.refcount=1/0),_.refcount++,n&&(LDSO.loadedLibsByHandle[n]=_),t.loadAsync?Promise.resolve(!0):!0;_=newDSO(e,n,"loading"),_.refcount=t.nodelete?1/0:1,_.global=t.global;function a(){if(n){var d=HEAPU32[n+28>>2],h=HEAPU32[n+32>>2];if(d&&h){var w=HEAP8.slice(d,d+h);return t.loadAsync?Promise.resolve(w):w}}var b=locateFile(e);if(t.loadAsync)return asyncLoad(b);if(!readBinary)throw new Error(`${b}: file not found, and synchronous loading of external files is not available`);return readBinary(b)}function o(){return t.loadAsync?a().then(d=>loadWebAssemblyModule(d,t,e,r,n)):loadWebAssemblyModule(a(),t,e,r,n)}function l(d){_.global?mergeLibSymbols(d,e):r&&Object.assign(r,d),_.exports=d}return t.loadAsync?o().then(d=>(l(d),!0)):(l(o()),!0)}var reportUndefinedSymbols=()=>{for(var[e,t]of Object.entries(GOT))if(t.value==0){var r=resolveGlobalSymbol(e,!0).sym;if(!r&&!t.required)continue;if(typeof r=="function")t.value=addFunction(r,r.sig);else if(typeof r=="number")t.value=r;else throw new Error(`bad export type for '${e}': ${typeof r}`)}},runDependencies=0,dependenciesFulfilled=null,removeRunDependency=e=>{if(runDependencies--,Module.monitorRunDependencies?.(runDependencies),runDependencies==0&&dependenciesFulfilled){var t=dependenciesFulfilled;dependenciesFulfilled=null,t()}},addRunDependency=e=>{runDependencies++,Module.monitorRunDependencies?.(runDependencies)},loadDylibs=async()=>{if(!dynamicLibraries.length){reportUndefinedSymbols();return}addRunDependency("loadDylibs");for(var e of dynamicLibraries)await loadDynamicLibrary(e,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0});reportUndefinedSymbols(),removeRunDependency("loadDylibs")},noExitRuntime=!0,___memory_base=new WebAssembly.Global({value:"i32",mutable:!1},1024),___stack_high=82176,___stack_low=16640,___stack_pointer=new WebAssembly.Global({value:"i32",mutable:!0},82176),___table_base=new WebAssembly.Global({value:"i32",mutable:!1},1),runtimeKeepaliveCounter=0,__emscripten_runtime_keepalive_clear=()=>{noExitRuntime=!1,runtimeKeepaliveCounter=0};__emscripten_runtime_keepalive_clear.sig="v";var __emscripten_throw_longjmp=()=>{throw 1/0};__emscripten_throw_longjmp.sig="v";var timers={},handleException=e=>{if(e instanceof ExitStatus||e=="unwind")return EXITSTATUS;quit_(1,e)},keepRuntimeAlive=()=>noExitRuntime||runtimeKeepaliveCounter>0,_proc_exit=e=>{EXITSTATUS=e,keepRuntimeAlive()||(Module.onExit?.(e),ABORT=!0),quit_(e,new ExitStatus(e))};_proc_exit.sig="vi";var exitJS=(e,t)=>{EXITSTATUS=e,_proc_exit(e)},_exit=exitJS;_exit.sig="vi";var maybeExit=()=>{if(!keepRuntimeAlive())try{_exit(EXITSTATUS)}catch(e){handleException(e)}},callUserCallback=e=>{if(!ABORT)try{e(),maybeExit()}catch(t){handleException(t)}},_emscripten_get_now=()=>performance.now();_emscripten_get_now.sig="d";var __setitimer_js=(e,t)=>{if(timers[e]&&(clearTimeout(timers[e].id),delete timers[e]),!t)return 0;var r=setTimeout(()=>{delete timers[e],callUserCallback(()=>__emscripten_timeout(e,_emscripten_get_now()))},t);return timers[e]={id:r,timeout_ms:t},0};__setitimer_js.sig="iid";var getHeapMax=()=>2147483648,growMemory=e=>{var t=wasmMemory.buffer.byteLength,r=(e-t+65535)/65536|0;try{return wasmMemory.grow(r),updateMemoryViews(),1}catch{}},_emscripten_resize_heap=e=>{var t=HEAPU8.length;e>>>=0;var r=getHeapMax();if(e>r)return!1;for(var n=1;n<=4;n*=2){var _=t*(1+0/n);_=Math.min(_,e+100663296);var a=Math.min(r,alignMemory(Math.max(e,_),65536)),o=growMemory(a);if(o)return!0}return!1};_emscripten_resize_heap.sig="ip";function _tree_sitter_log_callback(e,t){if(Module.currentLogCallback){let r=UTF8ToString(t);Module.currentLogCallback(r,e!==0)}}function _tree_sitter_parse_callback(e,t,r,n,_,a){let o=Module.currentParseCallback,l=typeof o=="string",d=l?o:o(r,{row:n,column:_}),h=l?r:0,w=typeof d=="string"?d.length-h:0;if(w<=0){HEAP32[a>>>2]=0;return}let b=w<t?w:t;if(b<w&&b>1){let g=d.charCodeAt(h+b-1);g>=55296&&g<=56319&&b--}let H=e>>>1;for(let g=0;g<b;g++)HEAPU16[H+g]=d.charCodeAt(h+g);HEAP32[a>>>2]=b}function _tree_sitter_progress_callback(e,t){return Module.currentProgressCallback?Module.currentProgressCallback({currentOffset:e,hasError:t!==0})===!0:!1}var lengthBytesUTF8=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t},stringToUTF8Array=(e,t,r,n)=>{if(!(n>0))return 0;for(var _=r,a=r+n-1,o=0;o<e.length;++o){var l=e.codePointAt(o);if(l<=127){if(r>=a)break;t[r++]=l}else if(l<=2047){if(r+1>=a)break;t[r++]=192|l>>6,t[r++]=128|l&63}else if(l<=65535){if(r+2>=a)break;t[r++]=224|l>>12,t[r++]=128|l>>6&63,t[r++]=128|l&63}else{if(r+3>=a)break;t[r++]=240|l>>18,t[r++]=128|l>>12&63,t[r++]=128|l>>6&63,t[r++]=128|l&63,o++}}return t[r]=0,r-_},stringToUTF8=(e,t,r)=>stringToUTF8Array(e,HEAPU8,t,r),stackAlloc=e=>__emscripten_stack_alloc(e),stringToUTF8OnStack=e=>{var t=lengthBytesUTF8(e)+1,r=stackAlloc(t);return stringToUTF8(e,r,t),r},AsciiToString=e=>{for(var t="";;){var r=HEAPU8[e++];if(!r)return t;t+=String.fromCharCode(r)}};if(initMemory(),Module.noExitRuntime&&(noExitRuntime=Module.noExitRuntime),Module.print&&(out=Module.print),Module.printErr&&(err=Module.printErr),Module.dynamicLibraries&&(dynamicLibraries=Module.dynamicLibraries),Module.wasmBinary&&(wasmBinary=Module.wasmBinary),Module.arguments&&(arguments_=Module.arguments),Module.thisProgram&&(thisProgram=Module.thisProgram),Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.shift()();Module.UTF8ToString=UTF8ToString,Module.stringToUTF8=stringToUTF8,Module.lengthBytesUTF8=lengthBytesUTF8,Module.AsciiToString=AsciiToString,Module.loadWebAssemblyModule=loadWebAssemblyModule;var ASM_CONSTS={},_free,_ts_language_symbol_count,_ts_language_state_count,_ts_language_abi_version,_ts_language_name,_ts_language_field_count,_ts_language_symbol_name,_ts_language_symbol_for_name,_strncmp,_ts_language_symbol_type,_ts_language_field_name_for_id,_memcmp,_ts_parser_delete,_ts_parser_set_language,_ts_parser_reset,_ts_tree_cursor_current_descendant_index,_ts_tree_cursor_current_depth,_ts_tree_copy,_ts_tree_delete,_malloc,_calloc,_realloc,_ts_init,_ts_free_wasm,_ts_scanner_malloc_wasm,_ts_scanner_calloc_wasm,_ts_scanner_realloc_wasm,_ts_parser_new_wasm,_ts_parser_enable_logger_wasm,_ts_parser_parse_wasm,_ts_parser_parse_limited_wasm,_ts_parser_last_parse_operations_wasm,_ts_parser_abort_limited_wasm,_ts_parser_included_ranges_wasm,_ts_language_type_is_named_wasm,_ts_language_type_is_visible_wasm,_ts_language_metadata_wasm,_ts_language_supertypes_wasm,_ts_language_subtypes_wasm,_ts_tree_root_node_wasm,_ts_tree_root_node_with_offset_wasm,_ts_tree_included_ranges_wasm,_ts_tree_cursor_new_wasm,_ts_tree_cursor_copy_wasm,_ts_tree_cursor_delete_wasm,_ts_tree_cursor_reset_wasm,_ts_tree_cursor_reset_to_wasm,_ts_tree_cursor_goto_first_child_wasm,_ts_tree_cursor_goto_last_child_wasm,_ts_tree_cursor_goto_first_child_for_index_wasm,_ts_tree_cursor_goto_first_child_for_position_wasm,_ts_tree_cursor_goto_next_sibling_wasm,_ts_tree_cursor_goto_previous_sibling_wasm,_ts_tree_cursor_goto_descendant_wasm,_ts_tree_cursor_goto_parent_wasm,_ts_tree_cursor_current_node_id_wasm,_ts_tree_cursor_start_position_wasm,_ts_tree_cursor_end_position_wasm,_ts_tree_cursor_current_node_wasm,_ts_node_field_name_for_child_wasm,_ts_node_field_name_for_named_child_wasm,_ts_node_children_by_field_id_wasm,_ts_node_first_child_for_byte_wasm,_ts_node_first_named_child_for_byte_wasm,_ts_node_grammar_symbol_wasm,_ts_node_child_count_wasm,_ts_node_named_child_count_wasm,_ts_node_child_wasm,_ts_node_named_child_wasm,_ts_node_child_by_field_id_wasm,_ts_node_next_sibling_wasm,_ts_node_prev_sibling_wasm,_ts_node_next_named_sibling_wasm,_ts_node_prev_named_sibling_wasm,_ts_node_descendant_count_wasm,_ts_node_parent_wasm,_ts_node_child_with_descendant_wasm,_ts_node_descendant_for_index_wasm,_ts_node_named_descendant_for_index_wasm,_ts_node_descendant_for_position_wasm,_ts_node_named_descendant_for_position_wasm,_ts_node_to_string_wasm,_ts_node_children_wasm,_ts_node_named_children_wasm,_ts_node_descendants_of_type_wasm,_memcpy,_memmove,_memset,_iswalnum,_iswalpha,_iswblank,_iswdigit,_iswlower,_iswpunct,_iswspace,_iswupper,_iswxdigit,_memchr,__emscripten_timeout,_strcmp,_strlen,_strncat,_strncpy,_towlower,_towupper,_setThrew,__emscripten_stack_restore,__emscripten_stack_alloc,_emscripten_stack_get_current,___wasm_apply_data_relocs;function assignWasmExports(e){Module._free=_free=e.free,Module._ts_language_symbol_count=_ts_language_symbol_count=e.ts_language_symbol_count,Module._ts_language_state_count=_ts_language_state_count=e.ts_language_state_count,Module._ts_language_abi_version=_ts_language_abi_version=e.ts_language_abi_version,Module._ts_language_name=_ts_language_name=e.ts_language_name,Module._ts_language_field_count=_ts_language_field_count=e.ts_language_field_count,Module._ts_language_symbol_name=_ts_language_symbol_name=e.ts_language_symbol_name,Module._ts_language_symbol_for_name=_ts_language_symbol_for_name=e.ts_language_symbol_for_name,Module._strncmp=_strncmp=e.strncmp,Module._ts_language_symbol_type=_ts_language_symbol_type=e.ts_language_symbol_type,Module._ts_language_field_name_for_id=_ts_language_field_name_for_id=e.ts_language_field_name_for_id,Module._memcmp=_memcmp=e.memcmp,Module._ts_parser_delete=_ts_parser_delete=e.ts_parser_delete,Module._ts_parser_set_language=_ts_parser_set_language=e.ts_parser_set_language,Module._ts_parser_reset=_ts_parser_reset=e.ts_parser_reset,Module._ts_tree_cursor_current_descendant_index=_ts_tree_cursor_current_descendant_index=e.ts_tree_cursor_current_descendant_index,Module._ts_tree_cursor_current_depth=_ts_tree_cursor_current_depth=e.ts_tree_cursor_current_depth,Module._ts_tree_copy=_ts_tree_copy=e.ts_tree_copy,Module._ts_tree_delete=_ts_tree_delete=e.ts_tree_delete,Module._malloc=_malloc=e.malloc,Module._calloc=_calloc=e.calloc,Module._realloc=_realloc=e.realloc,Module._ts_init=_ts_init=e.ts_init,Module._ts_free_wasm=_ts_free_wasm=e.ts_free_wasm,Module._ts_scanner_malloc_wasm=_ts_scanner_malloc_wasm=e.ts_scanner_malloc_wasm,Module._ts_scanner_calloc_wasm=_ts_scanner_calloc_wasm=e.ts_scanner_calloc_wasm,Module._ts_scanner_realloc_wasm=_ts_scanner_realloc_wasm=e.ts_scanner_realloc_wasm,Module._ts_parser_new_wasm=_ts_parser_new_wasm=e.ts_parser_new_wasm,Module._ts_parser_enable_logger_wasm=_ts_parser_enable_logger_wasm=e.ts_parser_enable_logger_wasm,Module._ts_parser_parse_wasm=_ts_parser_parse_wasm=e.ts_parser_parse_wasm,Module._ts_parser_parse_limited_wasm=_ts_parser_parse_limited_wasm=e.ts_parser_parse_limited_wasm,Module._ts_parser_last_parse_operations_wasm=_ts_parser_last_parse_operations_wasm=e.ts_parser_last_parse_operations_wasm,Module._ts_parser_abort_limited_wasm=_ts_parser_abort_limited_wasm=e.ts_parser_abort_limited_wasm,Module._ts_parser_included_ranges_wasm=_ts_parser_included_ranges_wasm=e.ts_parser_included_ranges_wasm,Module._ts_language_type_is_named_wasm=_ts_language_type_is_named_wasm=e.ts_language_type_is_named_wasm,Module._ts_language_type_is_visible_wasm=_ts_language_type_is_visible_wasm=e.ts_language_type_is_visible_wasm,Module._ts_language_metadata_wasm=_ts_language_metadata_wasm=e.ts_language_metadata_wasm,Module._ts_language_supertypes_wasm=_ts_language_supertypes_wasm=e.ts_language_supertypes_wasm,Module._ts_language_subtypes_wasm=_ts_language_subtypes_wasm=e.ts_language_subtypes_wasm,Module._ts_tree_root_node_wasm=_ts_tree_root_node_wasm=e.ts_tree_root_node_wasm,Module._ts_tree_root_node_with_offset_wasm=_ts_tree_root_node_with_offset_wasm=e.ts_tree_root_node_with_offset_wasm,Module._ts_tree_included_ranges_wasm=_ts_tree_included_ranges_wasm=e.ts_tree_included_ranges_wasm,Module._ts_tree_cursor_new_wasm=_ts_tree_cursor_new_wasm=e.ts_tree_cursor_new_wasm,Module._ts_tree_cursor_copy_wasm=_ts_tree_cursor_copy_wasm=e.ts_tree_cursor_copy_wasm,Module._ts_tree_cursor_delete_wasm=_ts_tree_cursor_delete_wasm=e.ts_tree_cursor_delete_wasm,Module._ts_tree_cursor_reset_wasm=_ts_tree_cursor_reset_wasm=e.ts_tree_cursor_reset_wasm,Module._ts_tree_cursor_reset_to_wasm=_ts_tree_cursor_reset_to_wasm=e.ts_tree_cursor_reset_to_wasm,Module._ts_tree_cursor_goto_first_child_wasm=_ts_tree_cursor_goto_first_child_wasm=e.ts_tree_cursor_goto_first_child_wasm,Module._ts_tree_cursor_goto_last_child_wasm=_ts_tree_cursor_goto_last_child_wasm=e.ts_tree_cursor_goto_last_child_wasm,Module._ts_tree_cursor_goto_first_child_for_index_wasm=_ts_tree_cursor_goto_first_child_for_index_wasm=e.ts_tree_cursor_goto_first_child_for_index_wasm,Module._ts_tree_cursor_goto_first_child_for_position_wasm=_ts_tree_cursor_goto_first_child_for_position_wasm=e.ts_tree_cursor_goto_first_child_for_position_wasm,Module._ts_tree_cursor_goto_next_sibling_wasm=_ts_tree_cursor_goto_next_sibling_wasm=e.ts_tree_cursor_goto_next_sibling_wasm,Module._ts_tree_cursor_goto_previous_sibling_wasm=_ts_tree_cursor_goto_previous_sibling_wasm=e.ts_tree_cursor_goto_previous_sibling_wasm,Module._ts_tree_cursor_goto_descendant_wasm=_ts_tree_cursor_goto_descendant_wasm=e.ts_tree_cursor_goto_descendant_wasm,Module._ts_tree_cursor_goto_parent_wasm=_ts_tree_cursor_goto_parent_wasm=e.ts_tree_cursor_goto_parent_wasm,Module._ts_tree_cursor_current_node_id_wasm=_ts_tree_cursor_current_node_id_wasm=e.ts_tree_cursor_current_node_id_wasm,Module._ts_tree_cursor_start_position_wasm=_ts_tree_cursor_start_position_wasm=e.ts_tree_cursor_start_position_wasm,Module._ts_tree_cursor_end_position_wasm=_ts_tree_cursor_end_position_wasm=e.ts_tree_cursor_end_position_wasm,Module._ts_tree_cursor_current_node_wasm=_ts_tree_cursor_current_node_wasm=e.ts_tree_cursor_current_node_wasm,Module._ts_node_field_name_for_child_wasm=_ts_node_field_name_for_child_wasm=e.ts_node_field_name_for_child_wasm,Module._ts_node_field_name_for_named_child_wasm=_ts_node_field_name_for_named_child_wasm=e.ts_node_field_name_for_named_child_wasm,Module._ts_node_children_by_field_id_wasm=_ts_node_children_by_field_id_wasm=e.ts_node_children_by_field_id_wasm,Module._ts_node_first_child_for_byte_wasm=_ts_node_first_child_for_byte_wasm=e.ts_node_first_child_for_byte_wasm,Module._ts_node_first_named_child_for_byte_wasm=_ts_node_first_named_child_for_byte_wasm=e.ts_node_first_named_child_for_byte_wasm,Module._ts_node_grammar_symbol_wasm=_ts_node_grammar_symbol_wasm=e.ts_node_grammar_symbol_wasm,Module._ts_node_child_count_wasm=_ts_node_child_count_wasm=e.ts_node_child_count_wasm,Module._ts_node_named_child_count_wasm=_ts_node_named_child_count_wasm=e.ts_node_named_child_count_wasm,Module._ts_node_child_wasm=_ts_node_child_wasm=e.ts_node_child_wasm,Module._ts_node_named_child_wasm=_ts_node_named_child_wasm=e.ts_node_named_child_wasm,Module._ts_node_child_by_field_id_wasm=_ts_node_child_by_field_id_wasm=e.ts_node_child_by_field_id_wasm,Module._ts_node_next_sibling_wasm=_ts_node_next_sibling_wasm=e.ts_node_next_sibling_wasm,Module._ts_node_prev_sibling_wasm=_ts_node_prev_sibling_wasm=e.ts_node_prev_sibling_wasm,Module._ts_node_next_named_sibling_wasm=_ts_node_next_named_sibling_wasm=e.ts_node_next_named_sibling_wasm,Module._ts_node_prev_named_sibling_wasm=_ts_node_prev_named_sibling_wasm=e.ts_node_prev_named_sibling_wasm,Module._ts_node_descendant_count_wasm=_ts_node_descendant_count_wasm=e.ts_node_descendant_count_wasm,Module._ts_node_parent_wasm=_ts_node_parent_wasm=e.ts_node_parent_wasm,Module._ts_node_child_with_descendant_wasm=_ts_node_child_with_descendant_wasm=e.ts_node_child_with_descendant_wasm,Module._ts_node_descendant_for_index_wasm=_ts_node_descendant_for_index_wasm=e.ts_node_descendant_for_index_wasm,Module._ts_node_named_descendant_for_index_wasm=_ts_node_named_descendant_for_index_wasm=e.ts_node_named_descendant_for_index_wasm,Module._ts_node_descendant_for_position_wasm=_ts_node_descendant_for_position_wasm=e.ts_node_descendant_for_position_wasm,Module._ts_node_named_descendant_for_position_wasm=_ts_node_named_descendant_for_position_wasm=e.ts_node_named_descendant_for_position_wasm,Module._ts_node_to_string_wasm=_ts_node_to_string_wasm=e.ts_node_to_string_wasm,Module._ts_node_children_wasm=_ts_node_children_wasm=e.ts_node_children_wasm,Module._ts_node_named_children_wasm=_ts_node_named_children_wasm=e.ts_node_named_children_wasm,Module._ts_node_descendants_of_type_wasm=_ts_node_descendants_of_type_wasm=e.ts_node_descendants_of_type_wasm,Module._memcpy=_memcpy=e.memcpy,Module._memmove=_memmove=e.memmove,Module._memset=_memset=e.memset,Module._iswalnum=_iswalnum=e.iswalnum,Module._iswalpha=_iswalpha=e.iswalpha,Module._iswblank=_iswblank=e.iswblank,Module._iswdigit=_iswdigit=e.iswdigit,Module._iswlower=_iswlower=e.iswlower,Module._iswpunct=_iswpunct=e.iswpunct,Module._iswspace=_iswspace=e.iswspace,Module._iswupper=_iswupper=e.iswupper,Module._iswxdigit=_iswxdigit=e.iswxdigit,Module._memchr=_memchr=e.memchr,__emscripten_timeout=e._emscripten_timeout,Module._strcmp=_strcmp=e.strcmp,Module._strlen=_strlen=e.strlen,Module._strncat=_strncat=e.strncat,Module._strncpy=_strncpy=e.strncpy,Module._towlower=_towlower=e.towlower,Module._towupper=_towupper=e.towupper,_setThrew=e.setThrew,__emscripten_stack_restore=e._emscripten_stack_restore,__emscripten_stack_alloc=e._emscripten_stack_alloc,_emscripten_stack_get_current=e.emscripten_stack_get_current,___wasm_apply_data_relocs=e.__wasm_apply_data_relocs}var wasmImports={__heap_base:___heap_base,__indirect_function_table:wasmTable,__memory_base:___memory_base,__stack_high:___stack_high,__stack_low:___stack_low,__stack_pointer:___stack_pointer,__table_base:___table_base,_emscripten_runtime_keepalive_clear:__emscripten_runtime_keepalive_clear,_emscripten_throw_longjmp:__emscripten_throw_longjmp,_setitimer_js:__setitimer_js,emscripten_resize_heap:_emscripten_resize_heap,invoke_i,invoke_iii,invoke_vi,invoke_viii,memory:wasmMemory,proc_exit:_proc_exit,tree_sitter_log_callback:_tree_sitter_log_callback,tree_sitter_parse_callback:_tree_sitter_parse_callback,tree_sitter_progress_callback:_tree_sitter_progress_callback};function invoke_iii(e,t,r){var n=stackSave();try{return getWasmTableEntry(e)(t,r)}catch(_){if(stackRestore(n),_!==_+0)throw _;_setThrew(1,0)}}function invoke_vi(e,t){var r=stackSave();try{getWasmTableEntry(e)(t)}catch(n){if(stackRestore(r),n!==n+0)throw n;_setThrew(1,0)}}function invoke_i(e){var t=stackSave();try{return getWasmTableEntry(e)()}catch(r){if(stackRestore(t),r!==r+0)throw r;_setThrew(1,0)}}function invoke_viii(e,t,r,n){var _=stackSave();try{getWasmTableEntry(e)(t,r,n)}catch(a){if(stackRestore(_),a!==a+0)throw a;_setThrew(1,0)}}function callMain(e=[]){var t=resolveGlobalSymbol("main").sym;if(t){e.unshift(thisProgram);var r=e.length,n=stackAlloc((r+1)*4),_=n;e.forEach(o=>{HEAPU32[_>>2]=stringToUTF8OnStack(o),_+=4}),HEAPU32[_>>2]=0;try{var a=t(r,n);return exitJS(a,!0),a}catch(o){return handleException(o)}}}function run(e=arguments_){if(runDependencies>0){dependenciesFulfilled=run;return}if(preRun(),runDependencies>0){dependenciesFulfilled=run;return}function t(){if(Module.calledRun=!0,!ABORT){initRuntime(),readyPromiseResolve?.(Module),Module.onRuntimeInitialized?.();var r=Module.noInitialRun||!1;r||callMain(e),postRun()}}Module.setStatus?(Module.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>Module.setStatus(""),1),t()},1)):t()}var wasmExports;return wasmExports=await createWasm(),run(),runtimeInitialized?moduleRtn=Module:moduleRtn=new Promise((e,t)=>{readyPromiseResolve=e,readyPromiseReject=t}),moduleRtn}var V=Me;var L=null;async function ae(e){if(L)return L;let{wasmModule:t,...r}=e??{};if(!t)return L??=await V(r);let n=new Promise((_,a)=>{r.instantiateWasm=(o,l)=>(WebAssembly.instantiate(t,o).then(d=>{l(d,t)}).catch(a),{})});return L??=await Promise.race([V(r),n])}function ie(){return!!L}var le=4294967296,m,W,K;function Ae(e){let t=s._ts_language_abi_version(e[0]);if(t<K||t>W)throw new Error(`Incompatible language version 0x${(t>>>0).toString(16)}. Expected 0x${W.toString(16)}.`)}var oe=I(e=>{s._ts_parser_delete(e[0]),s._free(e[1])}),Z=class{0=0;1=0;logCallback=null;loggerEnabled=!1;language=null;lastParseOperations=0;static async init(t){X(await ae(t)),m=s._ts_init();let r=m>>>2;W=s.HEAP32[r],K=s.HEAP32[r+1]}constructor(){this.initialize(),oe?.register(this,[this[0],this[1]],this)}initialize(){if(!ie())throw new Error("cannot construct a Parser before calling `init()`");s._ts_parser_new_wasm();let t=m>>>2;this[0]=s.HEAP32[t],this[1]=s.HEAP32[t+1],this.loggerEnabled=!1}delete(){oe?.unregister(this),s._ts_parser_delete(this[0]),s._free(this[1]),this[0]=0,this[1]=0}setLanguage(t){let r;if(!t)r=0,this.language=null;else if(t.constructor===S)r=t[0],Ae(t),this.language=t;else throw new Error("Argument must be a Language");return s._ts_parser_set_language(this[0],r),this}parse(t,r){let n=Te(r?.maxMemoryBytes),_=Pe(r?.maxOperations);if(typeof t!="string"&&typeof t!="function")throw new Error("Argument must be a string or a function");let a=r?.progressCallback??null;s.currentParseCallback=t,s.currentProgressCallback=a,this.syncLogger(),this.lastParseOperations=0;try{let o=this.runParse(r,n,_);if(!o)return null;if(!this.language)throw new Error("Parser must have a language to parse");return new k(f,o,this.language,t)}finally{Ee()}}syncLogger(){this.logCallback?(s.currentLogCallback=this.logCallback,this.loggerEnabled||(s._ts_parser_enable_logger_wasm(this[0],1),this.loggerEnabled=!0)):(s.currentLogCallback=null,this.loggerEnabled&&(s._ts_parser_enable_logger_wasm(this[0],0),this.loggerEnabled=!1))}runParse(t,r,n){if(r!==void 0&&!s.treeSitterSetMemoryLimit(r))return 0;try{let[_,a]=Ie(t?.includedRanges);if(a&&!_)return 0;Se(n,_,a,t?.progressCallback?1:0);try{return r===void 0?this.executeOrdinaryParse():this.executeLimitedParse()}finally{this.lastParseOperations=Re()}}finally{r!==void 0&&s.treeSitterSetMemoryLimit(0)}}executeOrdinaryParse(){try{return s._ts_parser_parse_wasm(this[0],this[1])}catch(t){throw s._ts_parser_last_parse_operations_wasm(this[0]),t}}executeLimitedParse(){try{return s._ts_parser_parse_limited_wasm(this[0],this[1])}catch(t){throw s._ts_parser_abort_limited_wasm(),t}}reset(){s._ts_parser_reset(this[0])}getIncludedRanges(){return s._ts_parser_included_ranges_wasm(this[0]),x(!1)}setLogger(t){if(!t)this.logCallback=null;else{if(typeof t!="function")throw new Error("Logger callback must be a function");this.logCallback=t}return this}getLogger(){return this.logCallback}};function Te(e){if(e!==void 0&&(!Number.isSafeInteger(e)||e<=0||e>2147483647))throw new RangeError("maxMemoryBytes must be a positive integer no greater than 2147483647");return e}function Pe(e){if(e!==void 0&&(!Number.isSafeInteger(e)||e<=0))throw new RangeError("maxOperations must be a positive safe integer");return e}function Ie(e){if(!e?.length)return[0,0];let t=s._calloc(e.length,N);if(!t)return[0,e.length];try{let r=t;for(let n of e)re(r,n),r+=N;return[t,e.length]}catch(r){throw s._free(t),r}}function Se(e,t,r,n){let _=m>>>2,a=s.HEAPU32;a[_]=e===void 0?0:e>>>0,a[_+1]=e===void 0?0:Math.floor(e/le)>>>0,a[_+2]=t,a[_+3]=r,a[_+4]=n}function Re(){let e=m>>>2,t=s.HEAPU32;return t[e]+t[e+1]*le}function Ee(){s.currentParseCallback=null,s.currentLogCallback=null,s.currentProgressCallback=null}export{W as LANGUAGE_VERSION,S as Language,K as MIN_COMPATIBLE_VERSION,O as Node,Z as Parser,k as Tree,P as TreeCursor};
3
+ ${o}`)}let a=s.clone();try{r=await WebAssembly.compileStreaming(s)}catch(o){console.error("wasm streaming compile failed:",o),console.error("falling back to ArrayBuffer instantiation"),r=new Uint8Array(await a.arrayBuffer())}}let n=await _.loadWebAssemblyModule(r,{loadAsync:!0});return se(n,{sync:!1})}static loadSync(t){let r=_.loadWebAssemblyModule(t,{loadAsync:!1});return se(r,{sync:!0})}};function se(e,{sync:t}){let r=Object.keys(e),n=r.find(a=>Ae.test(a)&&!a.includes("external_scanner_"));if(!n)throw console.log(`Couldn't find language function in Wasm file. Symbols:
4
+ ${JSON.stringify(r,null,2)}`),new Error(`Language.${t?"loadSync":"load"} failed: no language function found in Wasm file`);let s=e[n]();return new I(f,s)}async function Te(moduleArg={}){var moduleRtn,Module=moduleArg,ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof WorkerGlobalScope<"u",ENVIRONMENT_IS_NODE=typeof process=="object"&&process.versions?.node&&process.type!="renderer";if(ENVIRONMENT_IS_NODE){let{createRequire:e}=await import("module");var require=e(import.meta.url)}Module.currentProgressCallback=null,Module.currentLogCallback=null,Module.currentParseCallback=null,Module.treeSitterSetMemoryLimit=function(e){return e?wasmMemory.buffer.byteLength>e||Module.treeSitterOriginalMemoryGrow?!1:(Module.treeSitterOriginalMemoryGrow=wasmMemory.grow,wasmMemory.grow=function(t){if(wasmMemory.buffer.byteLength+t*65536>e)throw new RangeError("Parse memory limit exceeded");return Module.treeSitterOriginalMemoryGrow.call(wasmMemory,t)},!0):(Module.treeSitterOriginalMemoryGrow&&(wasmMemory.grow=Module.treeSitterOriginalMemoryGrow,Module.treeSitterOriginalMemoryGrow=null),!0)};var arguments_=[],thisProgram="./this.program",quit_=(e,t)=>{throw t},_scriptName=import.meta.url,scriptDirectory="";function locateFile(e){return Module.locateFile?Module.locateFile(e,scriptDirectory):scriptDirectory+e}var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require("fs");_scriptName.startsWith("file:")&&(scriptDirectory=require("path").dirname(require("url").fileURLToPath(_scriptName))+"/"),readBinary=e=>{e=isFileURI(e)?new URL(e):e;var t=fs.readFileSync(e);return t},readAsync=async(e,t=!0)=>{e=isFileURI(e)?new URL(e):e;var r=fs.readFileSync(e,t?void 0:"utf8");return r},process.argv.length>1&&(thisProgram=process.argv[1].replace(/\\/g,"/")),arguments_=process.argv.slice(2),quit_=(e,t)=>{throw process.exitCode=e,t}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){try{scriptDirectory=new URL(".",_scriptName).href}catch{}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=async e=>{if(isFileURI(e))return new Promise((r,n)=>{var s=new XMLHttpRequest;s.open("GET",e,!0),s.responseType="arraybuffer",s.onload=()=>{if(s.status==200||s.status==0&&s.response){r(s.response);return}n(s.status)},s.onerror=n,s.send(null)});var t=await fetch(e,{credentials:"same-origin"});if(t.ok)return t.arrayBuffer();throw new Error(t.status+" : "+t.url)}}var out=console.log.bind(console),err=console.error.bind(console),dynamicLibraries=[],wasmBinary,ABORT=!1,EXITSTATUS,isFileURI=e=>e.startsWith("file://"),readyPromiseResolve,readyPromiseReject,wasmMemory,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,HEAP64,HEAPU64,runtimeInitialized=!1;function updateMemoryViews(){var e=wasmMemory.buffer;HEAP8=new Int8Array(e),HEAP16=new Int16Array(e),HEAPU8=new Uint8Array(e),Module.HEAPU16=HEAPU16=new Uint16Array(e),Module.HEAP32=HEAP32=new Int32Array(e),Module.HEAPU32=HEAPU32=new Uint32Array(e),HEAPF32=new Float32Array(e),HEAPF64=new Float64Array(e),HEAP64=new BigInt64Array(e),HEAPU64=new BigUint64Array(e)}function initMemory(){if(Module.wasmMemory)wasmMemory=Module.wasmMemory;else{var e=Module.INITIAL_MEMORY||524288;wasmMemory=new WebAssembly.Memory({initial:e/65536,maximum:32768})}updateMemoryViews()}var __RELOC_FUNCS__=[];function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(onPreRuns)}function initRuntime(){runtimeInitialized=!0,callRuntimeCallbacks(__RELOC_FUNCS__),wasmExports.__wasm_call_ctors(),callRuntimeCallbacks(onPostCtors)}function preMain(){}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(onPostRuns)}function abort(e){Module.onAbort?.(e),e="Aborted("+e+")",err(e),ABORT=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw readyPromiseReject?.(t),t}var wasmBinaryFile;function findWasmBinary(){return Module.locateFile?locateFile("web-tree-sitter.wasm"):new URL("web-tree-sitter.wasm",import.meta.url).href}function getBinarySync(e){if(e==wasmBinaryFile&&wasmBinary)return new Uint8Array(wasmBinary);if(readBinary)return readBinary(e);throw"both async and sync fetching of the wasm failed"}async function getWasmBinary(e){if(!wasmBinary)try{var t=await readAsync(e);return new Uint8Array(t)}catch{}return getBinarySync(e)}async function instantiateArrayBuffer(e,t){try{var r=await getWasmBinary(e),n=await WebAssembly.instantiate(r,t);return n}catch(s){err(`failed to asynchronously prepare wasm: ${s}`),abort(s)}}async function instantiateAsync(e,t,r){if(!e&&!isFileURI(t)&&!ENVIRONMENT_IS_NODE)try{var n=fetch(t,{credentials:"same-origin"}),s=await WebAssembly.instantiateStreaming(n,r);return s}catch(a){err(`wasm streaming compile failed: ${a}`),err("falling back to ArrayBuffer instantiation")}return instantiateArrayBuffer(t,r)}function getWasmImports(){return{env:wasmImports,wasi_snapshot_preview1:wasmImports,"GOT.mem":new Proxy(wasmImports,GOTHandler),"GOT.func":new Proxy(wasmImports,GOTHandler)}}async function createWasm(){function e(a,o){wasmExports=a.exports,wasmExports=relocateExports(wasmExports,1024);var l=getDylinkMetadata(o);l.neededDynlibs&&(dynamicLibraries=l.neededDynlibs.concat(dynamicLibraries));let d={malloc:wasmExports.ts_scanner_malloc_wasm,calloc:wasmExports.ts_scanner_calloc_wasm,realloc:wasmExports.ts_scanner_realloc_wasm};return Object.assign(wasmImports,d),updateGOT(d,!0),mergeLibSymbols(wasmExports,"main"),LDSO.init(),loadDylibs(),__RELOC_FUNCS__.push(wasmExports.__wasm_apply_data_relocs),assignWasmExports(wasmExports),wasmExports}function t(a){return e(a.instance,a.module)}var r=getWasmImports();if(Module.instantiateWasm)return new Promise((a,o)=>{Module.instantiateWasm(r,(l,d)=>{a(e(l,d))})});wasmBinaryFile??=findWasmBinary();var n=await instantiateAsync(wasmBinary,wasmBinaryFile,r),s=t(n);return s}class ExitStatus{name="ExitStatus";constructor(t){this.message=`Program terminated with exit(${t})`,this.status=t}}var GOT={},currentModuleWeakSymbols=new Set([]),GOTHandler={get(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}},callRuntimeCallbacks=e=>{for(;e.length>0;)e.shift()(Module)},onPostRuns=[],addOnPostRun=e=>onPostRuns.push(e),onPreRuns=[],addOnPreRun=e=>onPreRuns.push(e),UTF8Decoder=typeof TextDecoder<"u"?new TextDecoder:void 0,findStringEnd=(e,t,r,n)=>{var s=t+r;if(n)return s;for(;e[t]&&!(t>=s);)++t;return t},UTF8ArrayToString=(e,t=0,r,n)=>{var s=findStringEnd(e,t,r,n);if(s-t>16&&e.buffer&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(t,s));for(var a="";t<s;){var o=e[t++];if(!(o&128)){a+=String.fromCharCode(o);continue}var l=e[t++]&63;if((o&224)==192){a+=String.fromCharCode((o&31)<<6|l);continue}var d=e[t++]&63;if((o&240)==224?o=(o&15)<<12|l<<6|d:o=(o&7)<<18|l<<12|d<<6|e[t++]&63,o<65536)a+=String.fromCharCode(o);else{var h=o-65536;a+=String.fromCharCode(55296|h>>10,56320|h&1023)}}return a},getDylinkMetadata=e=>{var t=0,r=0;function n(){return e[t++]}function s(){for(var y=0,T=1;;){var Y=e[t++];if(y+=(Y&127)*T,T*=128,!(Y&128))break}return y}function a(){var y=s();return t+=y,UTF8ArrayToString(e,t-y,y)}function o(){for(var y=s(),T=[];y--;)T.push(a());return T}function l(y,T){if(y)throw new Error(T)}if(e instanceof WebAssembly.Module){var d=WebAssembly.Module.customSections(e,"dylink.0");l(d.length===0,"need dylink section"),e=new Uint8Array(d[0]),r=e.length}else{var h=new Uint32Array(new Uint8Array(e.subarray(0,24)).buffer),w=h[0]==1836278016;l(!w,"need to see wasm magic number"),l(e[8]!==0,"need the dylink section to be first"),t=9;var b=s();r=t+b;var B=a();l(B!=="dylink.0")}for(var g={neededDynlibs:[],tlsExports:new Set,weakImports:new Set,runtimePaths:[]},le=1,de=2,ue=3,me=4,ce=5,ge=256,fe=3,he=1;t<r;){var R=n(),pe=s();if(R===le)g.memorySize=s(),g.memoryAlign=s(),g.tableSize=s(),g.tableAlign=s();else if(R===de)g.neededDynlibs=o();else if(R===ue)for(var D=s();D--;){var G=a(),j=s();j&ge&&g.tlsExports.add(G)}else if(R===me)for(var D=s();D--;){var Ce=a(),G=a(),j=s();(j&fe)==he&&g.weakImports.add(G)}else R===ce?g.runtimePaths=o():t+=pe}return g},newDSO=(e,t,r)=>{var n={refcount:1/0,name:e,exports:r,global:!0};return LDSO.loadedLibsByName[e]=n,t!=null&&(LDSO.loadedLibsByHandle[t]=n),n},LDSO={loadedLibsByName:{},loadedLibsByHandle:{},init(){newDSO("__main__",0,wasmImports)}},___heap_base=82176,alignMemory=(e,t)=>Math.ceil(e/t)*t,getMemory=e=>{if(runtimeInitialized)return _calloc(e,1);var t=___heap_base,r=t+alignMemory(e,16);return ___heap_base=r,GOT.__heap_base.value=r,t},isInternalSym=e=>["__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","__start_em_js","__stop_em_js"].includes(e)||e.startsWith("__em_js__"),uleb128EncodeWithLen=e=>{let t=e.length;return[t%128|128,t>>7,...e]},wasmTypeCodes={i:127,p:127,j:126,f:125,d:124,e:111},generateTypePack=e=>uleb128EncodeWithLen(Array.from(e,t=>{var r=wasmTypeCodes[t];return r})),convertJsFunctionToWasm=(e,t)=>{var r=Uint8Array.of(0,97,115,109,1,0,0,0,1,...uleb128EncodeWithLen([1,96,...generateTypePack(t.slice(1)),...generateTypePack(t[0]==="v"?"":t[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),n=new WebAssembly.Module(r),s=new WebAssembly.Instance(n,{e:{f:e}}),a=s.exports.f;return a},wasmTableMirror=[],wasmTable=new WebAssembly.Table({initial:51,element:"anyfunc"}),getWasmTableEntry=e=>{var t=wasmTableMirror[e];return t||(wasmTableMirror[e]=t=wasmTable.get(e)),t},updateTableMap=(e,t)=>{if(functionsInTableMap)for(var r=e;r<e+t;r++){var n=getWasmTableEntry(r);n&&functionsInTableMap.set(n,r)}},functionsInTableMap,getFunctionAddress=e=>(functionsInTableMap||(functionsInTableMap=new WeakMap,updateTableMap(0,wasmTable.length)),functionsInTableMap.get(e)||0),freeTableIndexes=[],getEmptyTableSlot=()=>freeTableIndexes.length?freeTableIndexes.pop():wasmTable.grow(1),setWasmTableEntry=(e,t)=>{wasmTable.set(e,t),wasmTableMirror[e]=wasmTable.get(e)},addFunction=(e,t)=>{var r=getFunctionAddress(e);if(r)return r;var n=getEmptyTableSlot();try{setWasmTableEntry(n,e)}catch(a){if(!(a instanceof TypeError))throw a;var s=convertJsFunctionToWasm(e,t);setWasmTableEntry(n,s)}return functionsInTableMap.set(e,n),n},updateGOT=(e,t)=>{for(var r in e)if(!isInternalSym(r)){var n=e[r];GOT[r]||=new WebAssembly.Global({value:"i32",mutable:!0}),(t||GOT[r].value==0)&&(typeof n=="function"?GOT[r].value=addFunction(n):typeof n=="number"?GOT[r].value=n:err(`unhandled export type for '${r}': ${typeof n}`))}},relocateExports=(e,t,r)=>{var n={};for(var s in e){var a=e[s];typeof a=="object"&&(a=a.value),typeof a=="number"&&(a+=t),n[s]=a}return updateGOT(n,r),n},isSymbolDefined=e=>{var t=wasmImports[e];return!(!t||t.stub)},dynCall=(e,t,r=[],n=!1)=>{var s=getWasmTableEntry(t),a=s(...r);function o(l){return l}return a},stackSave=()=>_emscripten_stack_get_current(),stackRestore=e=>__emscripten_stack_restore(e),createInvokeFunction=e=>(t,...r)=>{var n=stackSave();try{return dynCall(e,t,r)}catch(s){if(stackRestore(n),s!==s+0)throw s;if(_setThrew(1,0),e[0]=="j")return 0n}},resolveGlobalSymbol=(e,t=!1)=>{var r;return isSymbolDefined(e)?r=wasmImports[e]:e.startsWith("invoke_")&&(r=wasmImports[e]=createInvokeFunction(e.split("_")[1])),{sym:r,name:e}},onPostCtors=[],addOnPostCtor=e=>onPostCtors.push(e),UTF8ToString=(e,t,r)=>e?UTF8ArrayToString(HEAPU8,e,t,r):"",loadWebAssemblyModule=(binary,flags,libName,localScope,handle)=>{var metadata=getDylinkMetadata(binary);function loadModule(){var memAlign=Math.pow(2,metadata.memoryAlign),memoryBase=metadata.memorySize?alignMemory(getMemory(metadata.memorySize+memAlign),memAlign):0,tableBase=metadata.tableSize?wasmTable.length:0;handle&&(HEAP8[handle+8]=1,HEAPU32[handle+12>>2]=memoryBase,HEAP32[handle+16>>2]=metadata.memorySize,HEAPU32[handle+20>>2]=tableBase,HEAP32[handle+24>>2]=metadata.tableSize),metadata.tableSize&&wasmTable.grow(metadata.tableSize);var moduleExports;function resolveSymbol(e){var t=resolveGlobalSymbol(e).sym;return!t&&localScope&&(t=localScope[e]),t||(t=moduleExports[e]),t}var proxyHandler={get(e,t){switch(t){case"__memory_base":return memoryBase;case"__table_base":return tableBase}if(t in wasmImports&&!wasmImports[t].stub){var r=wasmImports[t];return r}if(!(t in e)){var n;e[t]=(...s)=>(n||=resolveSymbol(t),n(...s))}return e[t]}},proxy=new Proxy({},proxyHandler);currentModuleWeakSymbols=metadata.weakImports;var info={"GOT.mem":new Proxy({},GOTHandler),"GOT.func":new Proxy({},GOTHandler),env:proxy,wasi_snapshot_preview1:proxy};function postInstantiation(module,instance){updateTableMap(tableBase,metadata.tableSize),moduleExports=relocateExports(instance.exports,memoryBase),flags.allowUndefined||reportUndefinedSymbols();function addEmAsm(addr,body){for(var args=[],arity=0;arity<16&&body.indexOf("$"+arity)!=-1;arity++)args.push("$"+arity);args=args.join(",");var func=`(${args}) => { ${body} };`;ASM_CONSTS[start]=eval(func)}if("__start_em_asm"in moduleExports)for(var start=moduleExports.__start_em_asm,stop=moduleExports.__stop_em_asm;start<stop;){var jsString=UTF8ToString(start);addEmAsm(start,jsString),start=HEAPU8.indexOf(0,start)+1}function addEmJs(name,cSig,body){var jsArgs=[];if(cSig=cSig.slice(1,-1),cSig!="void"){cSig=cSig.split(",");for(var i in cSig){var jsArg=cSig[i].split(" ").pop();jsArgs.push(jsArg.replace("*",""))}}var func=`(${jsArgs}) => ${body};`;moduleExports[name]=eval(func)}for(var name in moduleExports)if(name.startsWith("__em_js__")){var start=moduleExports[name],jsString=UTF8ToString(start),parts=jsString.split("<::>");addEmJs(name.replace("__em_js__",""),parts[0],parts[1]),delete moduleExports[name]}var applyRelocs=moduleExports.__wasm_apply_data_relocs;applyRelocs&&(runtimeInitialized?applyRelocs():__RELOC_FUNCS__.push(applyRelocs));var init=moduleExports.__wasm_call_ctors;return init&&(runtimeInitialized?init():addOnPostCtor(init)),moduleExports}if(flags.loadAsync)return(async()=>{var e;return binary instanceof WebAssembly.Module?e=await WebAssembly.instantiate(binary,info):{module:binary,instance:e}=await WebAssembly.instantiate(binary,info),postInstantiation(binary,e)})();var module=binary instanceof WebAssembly.Module?binary:new WebAssembly.Module(binary),instance=new WebAssembly.Instance(module,info);return postInstantiation(module,instance)}return flags={...flags,rpath:{parentLibPath:libName,paths:metadata.runtimePaths}},flags.loadAsync?metadata.neededDynlibs.reduce((e,t)=>e.then(()=>loadDynamicLibrary(t,flags,localScope)),Promise.resolve()).then(loadModule):(metadata.neededDynlibs.forEach(e=>loadDynamicLibrary(e,flags,localScope)),loadModule())},mergeLibSymbols=(e,t)=>{for(var[r,n]of Object.entries(e)){let s=o=>{isSymbolDefined(o)||(wasmImports[o]=n)};s(r);let a="__main_argc_argv";r=="main"&&s(a),r==a&&s("main")}},asyncLoad=async e=>{var t=await readAsync(e);return new Uint8Array(t)};function loadDynamicLibrary(e,t={global:!0,nodelete:!0},r,n){var s=LDSO.loadedLibsByName[e];if(s)return t.global?s.global||(s.global=!0,mergeLibSymbols(s.exports,e)):r&&Object.assign(r,s.exports),t.nodelete&&s.refcount!==1/0&&(s.refcount=1/0),s.refcount++,n&&(LDSO.loadedLibsByHandle[n]=s),t.loadAsync?Promise.resolve(!0):!0;s=newDSO(e,n,"loading"),s.refcount=t.nodelete?1/0:1,s.global=t.global;function a(){if(n){var d=HEAPU32[n+28>>2],h=HEAPU32[n+32>>2];if(d&&h){var w=HEAP8.slice(d,d+h);return t.loadAsync?Promise.resolve(w):w}}var b=locateFile(e);if(t.loadAsync)return asyncLoad(b);if(!readBinary)throw new Error(`${b}: file not found, and synchronous loading of external files is not available`);return readBinary(b)}function o(){return t.loadAsync?a().then(d=>loadWebAssemblyModule(d,t,e,r,n)):loadWebAssemblyModule(a(),t,e,r,n)}function l(d){s.global?mergeLibSymbols(d,e):r&&Object.assign(r,d),s.exports=d}return t.loadAsync?o().then(d=>(l(d),!0)):(l(o()),!0)}var reportUndefinedSymbols=()=>{for(var[e,t]of Object.entries(GOT))if(t.value==0){var r=resolveGlobalSymbol(e,!0).sym;if(!r&&!t.required)continue;if(typeof r=="function")t.value=addFunction(r,r.sig);else if(typeof r=="number")t.value=r;else throw new Error(`bad export type for '${e}': ${typeof r}`)}},runDependencies=0,dependenciesFulfilled=null,removeRunDependency=e=>{if(runDependencies--,Module.monitorRunDependencies?.(runDependencies),runDependencies==0&&dependenciesFulfilled){var t=dependenciesFulfilled;dependenciesFulfilled=null,t()}},addRunDependency=e=>{runDependencies++,Module.monitorRunDependencies?.(runDependencies)},loadDylibs=async()=>{if(!dynamicLibraries.length){reportUndefinedSymbols();return}addRunDependency("loadDylibs");for(var e of dynamicLibraries)await loadDynamicLibrary(e,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0});reportUndefinedSymbols(),removeRunDependency("loadDylibs")},noExitRuntime=!0,___memory_base=new WebAssembly.Global({value:"i32",mutable:!1},1024),___stack_high=82176,___stack_low=16640,___stack_pointer=new WebAssembly.Global({value:"i32",mutable:!0},82176),___table_base=new WebAssembly.Global({value:"i32",mutable:!1},1),runtimeKeepaliveCounter=0,__emscripten_runtime_keepalive_clear=()=>{noExitRuntime=!1,runtimeKeepaliveCounter=0};__emscripten_runtime_keepalive_clear.sig="v";var __emscripten_throw_longjmp=()=>{throw 1/0};__emscripten_throw_longjmp.sig="v";var timers={},handleException=e=>{if(e instanceof ExitStatus||e=="unwind")return EXITSTATUS;quit_(1,e)},keepRuntimeAlive=()=>noExitRuntime||runtimeKeepaliveCounter>0,_proc_exit=e=>{EXITSTATUS=e,keepRuntimeAlive()||(Module.onExit?.(e),ABORT=!0),quit_(e,new ExitStatus(e))};_proc_exit.sig="vi";var exitJS=(e,t)=>{EXITSTATUS=e,_proc_exit(e)},_exit=exitJS;_exit.sig="vi";var maybeExit=()=>{if(!keepRuntimeAlive())try{_exit(EXITSTATUS)}catch(e){handleException(e)}},callUserCallback=e=>{if(!ABORT)try{e(),maybeExit()}catch(t){handleException(t)}},_emscripten_get_now=()=>performance.now();_emscripten_get_now.sig="d";var __setitimer_js=(e,t)=>{if(timers[e]&&(clearTimeout(timers[e].id),delete timers[e]),!t)return 0;var r=setTimeout(()=>{delete timers[e],callUserCallback(()=>__emscripten_timeout(e,_emscripten_get_now()))},t);return timers[e]={id:r,timeout_ms:t},0};__setitimer_js.sig="iid";var getHeapMax=()=>2147483648,growMemory=e=>{var t=wasmMemory.buffer.byteLength,r=(e-t+65535)/65536|0;try{return wasmMemory.grow(r),updateMemoryViews(),1}catch{}},_emscripten_resize_heap=e=>{var t=HEAPU8.length;e>>>=0;var r=getHeapMax();if(e>r)return!1;for(var n=1;n<=4;n*=2){var s=t*(1+0/n);s=Math.min(s,e+100663296);var a=Math.min(r,alignMemory(Math.max(e,s),65536)),o=growMemory(a);if(o)return!0}return!1};_emscripten_resize_heap.sig="ip";function _tree_sitter_log_callback(e,t){if(Module.currentLogCallback){let r=UTF8ToString(t);Module.currentLogCallback(r,e!==0)}}function _tree_sitter_parse_callback(e,t,r,n,s,a){let o=Module.currentParseCallback,l=typeof o=="string",d=l?o:o(r,{row:n,column:s}),h=l?r:0,w=typeof d=="string"?d.length-h:0;if(w<=0){HEAP32[a>>>2]=0;return}let b=w<t?w:t;if(b<w&&b>1){let g=d.charCodeAt(h+b-1);g>=55296&&g<=56319&&b--}let B=e>>>1;for(let g=0;g<b;g++)HEAPU16[B+g]=d.charCodeAt(h+g);HEAP32[a>>>2]=b}function _tree_sitter_progress_callback(e,t){return Module.currentProgressCallback?Module.currentProgressCallback({currentOffset:e,hasError:t!==0})===!0:!1}var lengthBytesUTF8=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t},stringToUTF8Array=(e,t,r,n)=>{if(!(n>0))return 0;for(var s=r,a=r+n-1,o=0;o<e.length;++o){var l=e.codePointAt(o);if(l<=127){if(r>=a)break;t[r++]=l}else if(l<=2047){if(r+1>=a)break;t[r++]=192|l>>6,t[r++]=128|l&63}else if(l<=65535){if(r+2>=a)break;t[r++]=224|l>>12,t[r++]=128|l>>6&63,t[r++]=128|l&63}else{if(r+3>=a)break;t[r++]=240|l>>18,t[r++]=128|l>>12&63,t[r++]=128|l>>6&63,t[r++]=128|l&63,o++}}return t[r]=0,r-s},stringToUTF8=(e,t,r)=>stringToUTF8Array(e,HEAPU8,t,r),stackAlloc=e=>__emscripten_stack_alloc(e),stringToUTF8OnStack=e=>{var t=lengthBytesUTF8(e)+1,r=stackAlloc(t);return stringToUTF8(e,r,t),r},AsciiToString=e=>{for(var t="";;){var r=HEAPU8[e++];if(!r)return t;t+=String.fromCharCode(r)}};if(initMemory(),Module.noExitRuntime&&(noExitRuntime=Module.noExitRuntime),Module.print&&(out=Module.print),Module.printErr&&(err=Module.printErr),Module.dynamicLibraries&&(dynamicLibraries=Module.dynamicLibraries),Module.wasmBinary&&(wasmBinary=Module.wasmBinary),Module.arguments&&(arguments_=Module.arguments),Module.thisProgram&&(thisProgram=Module.thisProgram),Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.shift()();Module.UTF8ToString=UTF8ToString,Module.stringToUTF8=stringToUTF8,Module.lengthBytesUTF8=lengthBytesUTF8,Module.AsciiToString=AsciiToString,Module.loadWebAssemblyModule=loadWebAssemblyModule;var ASM_CONSTS={},_free,_ts_language_symbol_count,_ts_language_state_count,_ts_language_abi_version,_ts_language_name,_ts_language_field_count,_ts_language_symbol_name,_ts_language_symbol_for_name,_strncmp,_ts_language_symbol_type,_ts_language_field_name_for_id,_memcmp,_ts_parser_delete,_ts_parser_set_language,_ts_parser_reset,_ts_tree_cursor_current_descendant_index,_ts_tree_cursor_current_depth,_ts_tree_copy,_ts_tree_delete,_malloc,_calloc,_realloc,_ts_init,_ts_free_wasm,_ts_scanner_malloc_wasm,_ts_scanner_calloc_wasm,_ts_scanner_realloc_wasm,_ts_parser_new_wasm,_ts_parser_enable_logger_wasm,_ts_parser_parse_wasm,_ts_parser_parse_limited_wasm,_ts_parser_last_parse_operations_wasm,_ts_parser_abort_limited_wasm,_ts_parser_included_ranges_wasm,_ts_language_type_is_named_wasm,_ts_language_type_is_visible_wasm,_ts_language_metadata_wasm,_ts_language_supertypes_wasm,_ts_language_subtypes_wasm,_ts_tree_root_node_wasm,_ts_tree_root_node_with_offset_wasm,_ts_tree_included_ranges_wasm,_ts_tree_cursor_new_wasm,_ts_tree_cursor_copy_wasm,_ts_tree_cursor_delete_wasm,_ts_tree_cursor_reset_wasm,_ts_tree_cursor_reset_to_wasm,_ts_tree_cursor_goto_first_child_wasm,_ts_tree_cursor_goto_last_child_wasm,_ts_tree_cursor_goto_first_child_for_index_wasm,_ts_tree_cursor_goto_first_child_for_position_wasm,_ts_tree_cursor_goto_next_sibling_wasm,_ts_tree_cursor_goto_previous_sibling_wasm,_ts_tree_cursor_goto_descendant_wasm,_ts_tree_cursor_goto_parent_wasm,_ts_tree_cursor_current_node_id_wasm,_ts_tree_cursor_start_position_wasm,_ts_tree_cursor_end_position_wasm,_ts_tree_cursor_current_node_wasm,_ts_node_field_name_for_child_wasm,_ts_node_field_name_for_named_child_wasm,_ts_node_children_by_field_id_wasm,_ts_node_first_child_for_byte_wasm,_ts_node_first_named_child_for_byte_wasm,_ts_node_grammar_symbol_wasm,_ts_node_child_count_wasm,_ts_node_named_child_count_wasm,_ts_node_child_wasm,_ts_node_named_child_wasm,_ts_node_child_by_field_id_wasm,_ts_node_next_sibling_wasm,_ts_node_prev_sibling_wasm,_ts_node_next_named_sibling_wasm,_ts_node_prev_named_sibling_wasm,_ts_node_descendant_count_wasm,_ts_node_parent_wasm,_ts_node_child_with_descendant_wasm,_ts_node_descendant_for_index_wasm,_ts_node_named_descendant_for_index_wasm,_ts_node_descendant_for_position_wasm,_ts_node_named_descendant_for_position_wasm,_ts_node_to_string_wasm,_ts_node_children_wasm,_ts_node_named_children_wasm,_ts_node_descendants_of_type_wasm,_memcpy,_memmove,_memset,_iswalnum,_iswalpha,_iswblank,_iswdigit,_iswlower,_iswpunct,_iswspace,_iswupper,_iswxdigit,_memchr,__emscripten_timeout,_strcmp,_strlen,_strncat,_strncpy,_towlower,_towupper,_setThrew,__emscripten_stack_restore,__emscripten_stack_alloc,_emscripten_stack_get_current,___wasm_apply_data_relocs;function assignWasmExports(e){Module._free=_free=e.free,Module._ts_language_symbol_count=_ts_language_symbol_count=e.ts_language_symbol_count,Module._ts_language_state_count=_ts_language_state_count=e.ts_language_state_count,Module._ts_language_abi_version=_ts_language_abi_version=e.ts_language_abi_version,Module._ts_language_name=_ts_language_name=e.ts_language_name,Module._ts_language_field_count=_ts_language_field_count=e.ts_language_field_count,Module._ts_language_symbol_name=_ts_language_symbol_name=e.ts_language_symbol_name,Module._ts_language_symbol_for_name=_ts_language_symbol_for_name=e.ts_language_symbol_for_name,Module._strncmp=_strncmp=e.strncmp,Module._ts_language_symbol_type=_ts_language_symbol_type=e.ts_language_symbol_type,Module._ts_language_field_name_for_id=_ts_language_field_name_for_id=e.ts_language_field_name_for_id,Module._memcmp=_memcmp=e.memcmp,Module._ts_parser_delete=_ts_parser_delete=e.ts_parser_delete,Module._ts_parser_set_language=_ts_parser_set_language=e.ts_parser_set_language,Module._ts_parser_reset=_ts_parser_reset=e.ts_parser_reset,Module._ts_tree_cursor_current_descendant_index=_ts_tree_cursor_current_descendant_index=e.ts_tree_cursor_current_descendant_index,Module._ts_tree_cursor_current_depth=_ts_tree_cursor_current_depth=e.ts_tree_cursor_current_depth,Module._ts_tree_copy=_ts_tree_copy=e.ts_tree_copy,Module._ts_tree_delete=_ts_tree_delete=e.ts_tree_delete,Module._malloc=_malloc=e.malloc,Module._calloc=_calloc=e.calloc,Module._realloc=_realloc=e.realloc,Module._ts_init=_ts_init=e.ts_init,Module._ts_free_wasm=_ts_free_wasm=e.ts_free_wasm,Module._ts_scanner_malloc_wasm=_ts_scanner_malloc_wasm=e.ts_scanner_malloc_wasm,Module._ts_scanner_calloc_wasm=_ts_scanner_calloc_wasm=e.ts_scanner_calloc_wasm,Module._ts_scanner_realloc_wasm=_ts_scanner_realloc_wasm=e.ts_scanner_realloc_wasm,Module._ts_parser_new_wasm=_ts_parser_new_wasm=e.ts_parser_new_wasm,Module._ts_parser_enable_logger_wasm=_ts_parser_enable_logger_wasm=e.ts_parser_enable_logger_wasm,Module._ts_parser_parse_wasm=_ts_parser_parse_wasm=e.ts_parser_parse_wasm,Module._ts_parser_parse_limited_wasm=_ts_parser_parse_limited_wasm=e.ts_parser_parse_limited_wasm,Module._ts_parser_last_parse_operations_wasm=_ts_parser_last_parse_operations_wasm=e.ts_parser_last_parse_operations_wasm,Module._ts_parser_abort_limited_wasm=_ts_parser_abort_limited_wasm=e.ts_parser_abort_limited_wasm,Module._ts_parser_included_ranges_wasm=_ts_parser_included_ranges_wasm=e.ts_parser_included_ranges_wasm,Module._ts_language_type_is_named_wasm=_ts_language_type_is_named_wasm=e.ts_language_type_is_named_wasm,Module._ts_language_type_is_visible_wasm=_ts_language_type_is_visible_wasm=e.ts_language_type_is_visible_wasm,Module._ts_language_metadata_wasm=_ts_language_metadata_wasm=e.ts_language_metadata_wasm,Module._ts_language_supertypes_wasm=_ts_language_supertypes_wasm=e.ts_language_supertypes_wasm,Module._ts_language_subtypes_wasm=_ts_language_subtypes_wasm=e.ts_language_subtypes_wasm,Module._ts_tree_root_node_wasm=_ts_tree_root_node_wasm=e.ts_tree_root_node_wasm,Module._ts_tree_root_node_with_offset_wasm=_ts_tree_root_node_with_offset_wasm=e.ts_tree_root_node_with_offset_wasm,Module._ts_tree_included_ranges_wasm=_ts_tree_included_ranges_wasm=e.ts_tree_included_ranges_wasm,Module._ts_tree_cursor_new_wasm=_ts_tree_cursor_new_wasm=e.ts_tree_cursor_new_wasm,Module._ts_tree_cursor_copy_wasm=_ts_tree_cursor_copy_wasm=e.ts_tree_cursor_copy_wasm,Module._ts_tree_cursor_delete_wasm=_ts_tree_cursor_delete_wasm=e.ts_tree_cursor_delete_wasm,Module._ts_tree_cursor_reset_wasm=_ts_tree_cursor_reset_wasm=e.ts_tree_cursor_reset_wasm,Module._ts_tree_cursor_reset_to_wasm=_ts_tree_cursor_reset_to_wasm=e.ts_tree_cursor_reset_to_wasm,Module._ts_tree_cursor_goto_first_child_wasm=_ts_tree_cursor_goto_first_child_wasm=e.ts_tree_cursor_goto_first_child_wasm,Module._ts_tree_cursor_goto_last_child_wasm=_ts_tree_cursor_goto_last_child_wasm=e.ts_tree_cursor_goto_last_child_wasm,Module._ts_tree_cursor_goto_first_child_for_index_wasm=_ts_tree_cursor_goto_first_child_for_index_wasm=e.ts_tree_cursor_goto_first_child_for_index_wasm,Module._ts_tree_cursor_goto_first_child_for_position_wasm=_ts_tree_cursor_goto_first_child_for_position_wasm=e.ts_tree_cursor_goto_first_child_for_position_wasm,Module._ts_tree_cursor_goto_next_sibling_wasm=_ts_tree_cursor_goto_next_sibling_wasm=e.ts_tree_cursor_goto_next_sibling_wasm,Module._ts_tree_cursor_goto_previous_sibling_wasm=_ts_tree_cursor_goto_previous_sibling_wasm=e.ts_tree_cursor_goto_previous_sibling_wasm,Module._ts_tree_cursor_goto_descendant_wasm=_ts_tree_cursor_goto_descendant_wasm=e.ts_tree_cursor_goto_descendant_wasm,Module._ts_tree_cursor_goto_parent_wasm=_ts_tree_cursor_goto_parent_wasm=e.ts_tree_cursor_goto_parent_wasm,Module._ts_tree_cursor_current_node_id_wasm=_ts_tree_cursor_current_node_id_wasm=e.ts_tree_cursor_current_node_id_wasm,Module._ts_tree_cursor_start_position_wasm=_ts_tree_cursor_start_position_wasm=e.ts_tree_cursor_start_position_wasm,Module._ts_tree_cursor_end_position_wasm=_ts_tree_cursor_end_position_wasm=e.ts_tree_cursor_end_position_wasm,Module._ts_tree_cursor_current_node_wasm=_ts_tree_cursor_current_node_wasm=e.ts_tree_cursor_current_node_wasm,Module._ts_node_field_name_for_child_wasm=_ts_node_field_name_for_child_wasm=e.ts_node_field_name_for_child_wasm,Module._ts_node_field_name_for_named_child_wasm=_ts_node_field_name_for_named_child_wasm=e.ts_node_field_name_for_named_child_wasm,Module._ts_node_children_by_field_id_wasm=_ts_node_children_by_field_id_wasm=e.ts_node_children_by_field_id_wasm,Module._ts_node_first_child_for_byte_wasm=_ts_node_first_child_for_byte_wasm=e.ts_node_first_child_for_byte_wasm,Module._ts_node_first_named_child_for_byte_wasm=_ts_node_first_named_child_for_byte_wasm=e.ts_node_first_named_child_for_byte_wasm,Module._ts_node_grammar_symbol_wasm=_ts_node_grammar_symbol_wasm=e.ts_node_grammar_symbol_wasm,Module._ts_node_child_count_wasm=_ts_node_child_count_wasm=e.ts_node_child_count_wasm,Module._ts_node_named_child_count_wasm=_ts_node_named_child_count_wasm=e.ts_node_named_child_count_wasm,Module._ts_node_child_wasm=_ts_node_child_wasm=e.ts_node_child_wasm,Module._ts_node_named_child_wasm=_ts_node_named_child_wasm=e.ts_node_named_child_wasm,Module._ts_node_child_by_field_id_wasm=_ts_node_child_by_field_id_wasm=e.ts_node_child_by_field_id_wasm,Module._ts_node_next_sibling_wasm=_ts_node_next_sibling_wasm=e.ts_node_next_sibling_wasm,Module._ts_node_prev_sibling_wasm=_ts_node_prev_sibling_wasm=e.ts_node_prev_sibling_wasm,Module._ts_node_next_named_sibling_wasm=_ts_node_next_named_sibling_wasm=e.ts_node_next_named_sibling_wasm,Module._ts_node_prev_named_sibling_wasm=_ts_node_prev_named_sibling_wasm=e.ts_node_prev_named_sibling_wasm,Module._ts_node_descendant_count_wasm=_ts_node_descendant_count_wasm=e.ts_node_descendant_count_wasm,Module._ts_node_parent_wasm=_ts_node_parent_wasm=e.ts_node_parent_wasm,Module._ts_node_child_with_descendant_wasm=_ts_node_child_with_descendant_wasm=e.ts_node_child_with_descendant_wasm,Module._ts_node_descendant_for_index_wasm=_ts_node_descendant_for_index_wasm=e.ts_node_descendant_for_index_wasm,Module._ts_node_named_descendant_for_index_wasm=_ts_node_named_descendant_for_index_wasm=e.ts_node_named_descendant_for_index_wasm,Module._ts_node_descendant_for_position_wasm=_ts_node_descendant_for_position_wasm=e.ts_node_descendant_for_position_wasm,Module._ts_node_named_descendant_for_position_wasm=_ts_node_named_descendant_for_position_wasm=e.ts_node_named_descendant_for_position_wasm,Module._ts_node_to_string_wasm=_ts_node_to_string_wasm=e.ts_node_to_string_wasm,Module._ts_node_children_wasm=_ts_node_children_wasm=e.ts_node_children_wasm,Module._ts_node_named_children_wasm=_ts_node_named_children_wasm=e.ts_node_named_children_wasm,Module._ts_node_descendants_of_type_wasm=_ts_node_descendants_of_type_wasm=e.ts_node_descendants_of_type_wasm,Module._memcpy=_memcpy=e.memcpy,Module._memmove=_memmove=e.memmove,Module._memset=_memset=e.memset,Module._iswalnum=_iswalnum=e.iswalnum,Module._iswalpha=_iswalpha=e.iswalpha,Module._iswblank=_iswblank=e.iswblank,Module._iswdigit=_iswdigit=e.iswdigit,Module._iswlower=_iswlower=e.iswlower,Module._iswpunct=_iswpunct=e.iswpunct,Module._iswspace=_iswspace=e.iswspace,Module._iswupper=_iswupper=e.iswupper,Module._iswxdigit=_iswxdigit=e.iswxdigit,Module._memchr=_memchr=e.memchr,__emscripten_timeout=e._emscripten_timeout,Module._strcmp=_strcmp=e.strcmp,Module._strlen=_strlen=e.strlen,Module._strncat=_strncat=e.strncat,Module._strncpy=_strncpy=e.strncpy,Module._towlower=_towlower=e.towlower,Module._towupper=_towupper=e.towupper,_setThrew=e.setThrew,__emscripten_stack_restore=e._emscripten_stack_restore,__emscripten_stack_alloc=e._emscripten_stack_alloc,_emscripten_stack_get_current=e.emscripten_stack_get_current,___wasm_apply_data_relocs=e.__wasm_apply_data_relocs}var wasmImports={__heap_base:___heap_base,__indirect_function_table:wasmTable,__memory_base:___memory_base,__stack_high:___stack_high,__stack_low:___stack_low,__stack_pointer:___stack_pointer,__table_base:___table_base,_emscripten_runtime_keepalive_clear:__emscripten_runtime_keepalive_clear,_emscripten_throw_longjmp:__emscripten_throw_longjmp,_setitimer_js:__setitimer_js,emscripten_resize_heap:_emscripten_resize_heap,invoke_i,invoke_iii,invoke_iiij,invoke_vi,invoke_viii,invoke_vij,memory:wasmMemory,proc_exit:_proc_exit,tree_sitter_log_callback:_tree_sitter_log_callback,tree_sitter_parse_callback:_tree_sitter_parse_callback,tree_sitter_progress_callback:_tree_sitter_progress_callback};function invoke_iii(e,t,r){var n=stackSave();try{return getWasmTableEntry(e)(t,r)}catch(s){if(stackRestore(n),s!==s+0)throw s;_setThrew(1,0)}}function invoke_vi(e,t){var r=stackSave();try{getWasmTableEntry(e)(t)}catch(n){if(stackRestore(r),n!==n+0)throw n;_setThrew(1,0)}}function invoke_i(e){var t=stackSave();try{return getWasmTableEntry(e)()}catch(r){if(stackRestore(t),r!==r+0)throw r;_setThrew(1,0)}}function invoke_vij(e,t,r){var n=stackSave();try{getWasmTableEntry(e)(t,r)}catch(s){if(stackRestore(n),s!==s+0)throw s;_setThrew(1,0)}}function invoke_viii(e,t,r,n){var s=stackSave();try{getWasmTableEntry(e)(t,r,n)}catch(a){if(stackRestore(s),a!==a+0)throw a;_setThrew(1,0)}}function invoke_iiij(e,t,r,n){var s=stackSave();try{return getWasmTableEntry(e)(t,r,n)}catch(a){if(stackRestore(s),a!==a+0)throw a;_setThrew(1,0)}}function callMain(e=[]){var t=resolveGlobalSymbol("main").sym;if(t){e.unshift(thisProgram);var r=e.length,n=stackAlloc((r+1)*4),s=n;e.forEach(o=>{HEAPU32[s>>2]=stringToUTF8OnStack(o),s+=4}),HEAPU32[s>>2]=0;try{var a=t(r,n);return exitJS(a,!0),a}catch(o){return handleException(o)}}}function run(e=arguments_){if(runDependencies>0){dependenciesFulfilled=run;return}if(preRun(),runDependencies>0){dependenciesFulfilled=run;return}function t(){if(Module.calledRun=!0,!ABORT){initRuntime(),readyPromiseResolve?.(Module),Module.onRuntimeInitialized?.();var r=Module.noInitialRun||!1;r||callMain(e),postRun()}}Module.setStatus?(Module.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>Module.setStatus(""),1),t()},1)):t()}var wasmExports;return wasmExports=await createWasm(),run(),runtimeInitialized?moduleRtn=Module:moduleRtn=new Promise((e,t)=>{readyPromiseResolve=e,readyPromiseReject=t}),moduleRtn}var Z=Te;var L=null;async function _e(e){if(L)return L;let{wasmModule:t,...r}=e??{};if(!t)return L??=await Z(r);let n=new Promise((s,a)=>{r.instantiateWasm=(o,l)=>(WebAssembly.instantiate(t,o).then(d=>{l(d,t)}).catch(a),{})});return L??=await Promise.race([Z(r),n])}function ae(){return!!L}var oe=4294967296,m,H,q;function Pe(e){let t=_._ts_language_abi_version(e[0]);if(t<q||t>H)throw new Error(`Incompatible language version 0x${(t>>>0).toString(16)}. Expected 0x${H.toString(16)}.`)}var ie=S(e=>{_._ts_parser_delete(e[0]),_._free(e[1])}),K=class{0=0;1=0;logCallback=null;loggerEnabled=!1;language=null;lastParseOperations=0;static async init(t){X(await _e(t)),m=_._ts_init();let r=m>>>2;H=_.HEAP32[r],q=_.HEAP32[r+1]}constructor(){this.initialize(),ie?.register(this,[this[0],this[1]],this)}initialize(){if(!ae())throw new Error("cannot construct a Parser before calling `init()`");_._ts_parser_new_wasm();let t=m>>>2;this[0]=_.HEAP32[t],this[1]=_.HEAP32[t+1],this.loggerEnabled=!1}delete(){ie?.unregister(this),_._ts_parser_delete(this[0]),_._free(this[1]),this[0]=0,this[1]=0}setLanguage(t){let r;if(!t)r=0,this.language=null;else if(t.constructor===I)r=t[0],Pe(t),this.language=t;else throw new Error("Argument must be a Language");return _._ts_parser_set_language(this[0],r),this}parse(t,r){let n=Se(r?.maxMemoryBytes),s=Ie(r?.maxOperations);if(typeof t!="string"&&typeof t!="function")throw new Error("Argument must be a string or a function");let a=r?.progressCallback??null;_.currentParseCallback=t,_.currentProgressCallback=a,this.syncLogger(),this.lastParseOperations=0;try{let o=this.runParse(r,n,s);if(!o)return null;if(!this.language)throw new Error("Parser must have a language to parse");return new C(f,o,this.language,t)}finally{ke()}}syncLogger(){this.logCallback?(_.currentLogCallback=this.logCallback,this.loggerEnabled||(_._ts_parser_enable_logger_wasm(this[0],1),this.loggerEnabled=!0)):(_.currentLogCallback=null,this.loggerEnabled&&(_._ts_parser_enable_logger_wasm(this[0],0),this.loggerEnabled=!1))}runParse(t,r,n){if(r!==void 0&&!_.treeSitterSetMemoryLimit(r))return 0;try{let[s,a]=Re(t?.includedRanges);if(a&&!s)return 0;Ee(n,s,a,t?.progressCallback?1:0);try{return r===void 0?this.executeOrdinaryParse():this.executeLimitedParse()}finally{this.lastParseOperations=Ne()}}finally{r!==void 0&&_.treeSitterSetMemoryLimit(0)}}executeOrdinaryParse(){try{return _._ts_parser_parse_wasm(this[0],this[1])}catch(t){throw _._ts_parser_last_parse_operations_wasm(this[0]),t}}executeLimitedParse(){try{return _._ts_parser_parse_limited_wasm(this[0],this[1])}catch(t){throw _._ts_parser_abort_limited_wasm(),t}}reset(){_._ts_parser_reset(this[0])}getIncludedRanges(){return _._ts_parser_included_ranges_wasm(this[0]),x(!1)}setLogger(t){if(!t)this.logCallback=null;else{if(typeof t!="function")throw new Error("Logger callback must be a function");this.logCallback=t}return this}getLogger(){return this.logCallback}};function Se(e){if(e!==void 0&&(!Number.isSafeInteger(e)||e<=0||e>2147483647))throw new RangeError("maxMemoryBytes must be a positive integer no greater than 2147483647");return e}function Ie(e){if(e!==void 0&&(!Number.isSafeInteger(e)||e<=0))throw new RangeError("maxOperations must be a positive safe integer");return e}function Re(e){if(!e?.length)return[0,0];let t=_._calloc(e.length,N);if(!t)return[0,e.length];try{let r=t;for(let n of e)te(r,n),r+=N;return[t,e.length]}catch(r){throw _._free(t),r}}function Ee(e,t,r,n){let s=m>>>2,a=_.HEAPU32;a[s]=e===void 0?0:e>>>0,a[s+1]=e===void 0?0:Math.floor(e/oe)>>>0,a[s+2]=t,a[s+3]=r,a[s+4]=n}function Ne(){let e=m>>>2,t=_.HEAPU32;return t[e]+t[e+1]*oe}function ke(){_.currentParseCallback=null,_.currentLogCallback=null,_.currentProgressCallback=null}export{H as LANGUAGE_VERSION,I as Language,q as MIN_COMPATIBLE_VERSION,O as Node,K as Parser,C as Tree,P as TreeCursor};
5
5
  //# sourceMappingURL=web-tree-sitter.js.map