@willbooster/web-tree-sitter 16.0.2 → 17.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.
@@ -128,6 +128,12 @@
128
128
  * state of the parser.
129
129
  */
130
130
  progressCallback?: (state: ParseState) => boolean | void;
131
+ /**
132
+ * The maximum size of Wasm memory during this parse, in bytes. Reaching it
133
+ * cancels the parse. Memory is shared by all parsers and does not shrink, so
134
+ * a parse also returns `null` when memory already exceeds this limit.
135
+ */
136
+ maxMemoryBytes?: number;
131
137
  }
132
138
  /**
133
139
  * A stateful object that is passed into the progress callback {@link ParseOptions#progressCallback}
@@ -140,7 +146,7 @@
140
146
  hasError: boolean;
141
147
  }
142
148
  /**
143
- * The only ABI version that the current version of the library supports. The
149
+ * The latest ABI version that the current version of the library supports. The
144
150
  * CLI of this fork assigns it to each generated language. Its upper 16 bits
145
151
  * (`0x5742`, "WB") tag the fork and its lower 16 bits count the fork's ABI
146
152
  * revisions, so that it never equals an ABI version of upstream Tree-sitter:
@@ -150,7 +156,8 @@
150
156
  export let LANGUAGE_VERSION: number;
151
157
  /**
152
158
  * The earliest ABI version that is supported by the current version of the
153
- * library, which is {@link LANGUAGE_VERSION}.
159
+ * library. Its parse tables are a subset of those of {@link LANGUAGE_VERSION},
160
+ * so the library loads both.
154
161
  */
155
162
  export let MIN_COMPATIBLE_VERSION: number;
156
163
  /**
@@ -180,8 +187,8 @@
180
187
  * If the language was not successfully assigned, an error will be thrown.
181
188
  * This happens if the language was generated with an incompatible
182
189
  * version of the Tree-sitter CLI. Check the language's version using
183
- * {@link Language#abiVersion} and compare it to this library's
184
- * {@link LANGUAGE_VERSION} constant.
190
+ * {@link Language#abiVersion}; this library accepts versions from
191
+ * {@link MIN_COMPATIBLE_VERSION} to {@link LANGUAGE_VERSION}.
185
192
  */
186
193
  setLanguage(language: Language | null): this;
187
194
  /**
@@ -199,6 +206,7 @@
199
206
  * @returns A {@link Tree} if parsing succeeded, or `null` if:
200
207
  * - The parser has not yet had a language assigned with {@link Parser#setLanguage}.
201
208
  * - The progress callback returned true.
209
+ * - The memory limit was reached.
202
210
  */
203
211
  parse(callback: string | ParseCallback, oldTree?: Tree | null, options?: ParseOptions): Tree | null;
204
212
  /**
@@ -56,6 +56,6 @@
56
56
  null,
57
57
  null
58
58
  ],
59
- "mappings": ";;;;;;kBASiBA,KAAKA;;;;;;;;;;kBAYLC,KAAKA;;;;;;;;;;;;;aAsCVC,aAAaA;;;;aAMbC,gBAAgBA;;;;;;aAOhBC,WAAWA;;kBCjENC,iBAAiBA;;;;;;;;;cCLrBC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBCgBAC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAoCZC,UAAUA;;;;;;;;;;;;;;YAuBhBC,gBAAgBA;;;;;YAqBhBC,sBAAsBA;;;;;cAWpBC,MAAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WCtGFC,gBAAgBA;;;;;;;;;cAYpBC,QAAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCiBRC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cC1BJC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCIJC,UAAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBCENC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAuEZC,UAAUA;;;;;aAMfC,eAAeA;;;;kBAKVC,cAAcA;;;;;;;;;;kBAYdC,YAAYA;;;;;;;;;;;;;;;kBAqBZC,UAAUA;;;;;;;;;;;;;cA2BfC,iBAAiBA;;;;;;;;aAAjBA,iBAAiBA;;;;;;;;;;;;aAajBC,aAAaA;;;;;;WAORC,oBAAoBA;;;;;;;;;WAOpBC,mBAAmBA;;;;cAyUvBC,KAAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cC1fLC,iBAAiBA",
59
+ "mappings": ";;;;;;kBASiBA,KAAKA;;;;;;;;;;kBAYLC,KAAKA;;;;;;;;;;;;;aAsCVC,aAAaA;;;;aAMbC,gBAAgBA;;;;;;aAOhBC,WAAWA;;kBCjENC,iBAAiBA;;;;;;;;;cCLrBC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBCgBAC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA2CZC,UAAUA;;;;;;;;;;;;;;YAuBhBC,gBAAgBA;;;;;;YAsBhBC,sBAAsBA;;;;;cAWpBC,MAAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WC9GFC,gBAAgBA;;;;;;;;;cAYpBC,QAAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCiBRC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cC1BJC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCIJC,UAAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBCENC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAuEZC,UAAUA;;;;;aAMfC,eAAeA;;;;kBAKVC,cAAcA;;;;;;;;;;kBAYdC,YAAYA;;;;;;;;;;;;;;;kBAqBZC,UAAUA;;;;;;;;;;;;;cA2BfC,iBAAiBA;;;;;;;;aAAjBA,iBAAiBA;;;;;;;;;;;;aAajBC,aAAaA;;;;;;WAORC,oBAAoBA;;;;;;;;;WAOpBC,mBAAmBA;;;;cAyUvBC,KAAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cC1fLC,iBAAiBA",
60
60
  "ignoreList": []
61
61
  }
@@ -128,6 +128,12 @@
128
128
  * state of the parser.
129
129
  */
130
130
  progressCallback?: (state: ParseState) => boolean | void;
131
+ /**
132
+ * The maximum size of Wasm memory during this parse, in bytes. Reaching it
133
+ * cancels the parse. Memory is shared by all parsers and does not shrink, so
134
+ * a parse also returns `null` when memory already exceeds this limit.
135
+ */
136
+ maxMemoryBytes?: number;
131
137
  }
132
138
  /**
133
139
  * A stateful object that is passed into the progress callback {@link ParseOptions#progressCallback}
@@ -140,7 +146,7 @@
140
146
  hasError: boolean;
141
147
  }
142
148
  /**
143
- * The only ABI version that the current version of the library supports. The
149
+ * The latest ABI version that the current version of the library supports. The
144
150
  * CLI of this fork assigns it to each generated language. Its upper 16 bits
145
151
  * (`0x5742`, "WB") tag the fork and its lower 16 bits count the fork's ABI
146
152
  * revisions, so that it never equals an ABI version of upstream Tree-sitter:
@@ -150,7 +156,8 @@
150
156
  export let LANGUAGE_VERSION: number;
151
157
  /**
152
158
  * The earliest ABI version that is supported by the current version of the
153
- * library, which is {@link LANGUAGE_VERSION}.
159
+ * library. Its parse tables are a subset of those of {@link LANGUAGE_VERSION},
160
+ * so the library loads both.
154
161
  */
155
162
  export let MIN_COMPATIBLE_VERSION: number;
156
163
  /**
@@ -180,8 +187,8 @@
180
187
  * If the language was not successfully assigned, an error will be thrown.
181
188
  * This happens if the language was generated with an incompatible
182
189
  * version of the Tree-sitter CLI. Check the language's version using
183
- * {@link Language#abiVersion} and compare it to this library's
184
- * {@link LANGUAGE_VERSION} constant.
190
+ * {@link Language#abiVersion}; this library accepts versions from
191
+ * {@link MIN_COMPATIBLE_VERSION} to {@link LANGUAGE_VERSION}.
185
192
  */
186
193
  setLanguage(language: Language | null): this;
187
194
  /**
@@ -199,6 +206,7 @@
199
206
  * @returns A {@link Tree} if parsing succeeded, or `null` if:
200
207
  * - The parser has not yet had a language assigned with {@link Parser#setLanguage}.
201
208
  * - The progress callback returned true.
209
+ * - The memory limit was reached.
202
210
  */
203
211
  parse(callback: string | ParseCallback, oldTree?: Tree | null, options?: ParseOptions): Tree | null;
204
212
  /**
@@ -56,6 +56,6 @@
56
56
  null,
57
57
  null
58
58
  ],
59
- "mappings": ";;;;;;kBASiBA,KAAKA;;;;;;;;;;kBAYLC,KAAKA;;;;;;;;;;;;;aAsCVC,aAAaA;;;;aAMbC,gBAAgBA;;;;;;aAOhBC,WAAWA;;kBCjENC,iBAAiBA;;;;;;;;;cCLrBC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBCgBAC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAoCZC,UAAUA;;;;;;;;;;;;;;YAuBhBC,gBAAgBA;;;;;YAqBhBC,sBAAsBA;;;;;cAWpBC,MAAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WCtGFC,gBAAgBA;;;;;;;;;cAYpBC,QAAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCiBRC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cC1BJC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCIJC,UAAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBCENC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAuEZC,UAAUA;;;;;aAMfC,eAAeA;;;;kBAKVC,cAAcA;;;;;;;;;;kBAYdC,YAAYA;;;;;;;;;;;;;;;kBAqBZC,UAAUA;;;;;;;;;;;;;cA2BfC,iBAAiBA;;;;;;;;aAAjBA,iBAAiBA;;;;;;;;;;;;aAajBC,aAAaA;;;;;;WAORC,oBAAoBA;;;;;;;;;WAOpBC,mBAAmBA;;;;cAyUvBC,KAAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cC1fLC,iBAAiBA",
59
+ "mappings": ";;;;;;kBASiBA,KAAKA;;;;;;;;;;kBAYLC,KAAKA;;;;;;;;;;;;;aAsCVC,aAAaA;;;;aAMbC,gBAAgBA;;;;;;aAOhBC,WAAWA;;kBCjENC,iBAAiBA;;;;;;;;;cCLrBC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBCgBAC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA2CZC,UAAUA;;;;;;;;;;;;;;YAuBhBC,gBAAgBA;;;;;;YAsBhBC,sBAAsBA;;;;;cAWpBC,MAAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WC9GFC,gBAAgBA;;;;;;;;;cAYpBC,QAAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCiBRC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cC1BJC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCIJC,UAAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBCENC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAuEZC,UAAUA;;;;;aAMfC,eAAeA;;;;kBAKVC,cAAcA;;;;;;;;;;kBAYdC,YAAYA;;;;;;;;;;;;;;;kBAqBZC,UAAUA;;;;;;;;;;;;;cA2BfC,iBAAiBA;;;;;;;;aAAjBA,iBAAiBA;;;;;;;;;;;;aAajBC,aAAaA;;;;;;WAORC,oBAAoBA;;;;;;;;;WAOpBC,mBAAmBA;;;;cAyUvBC,KAAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cC1fLC,iBAAiBA",
60
60
  "ignoreList": []
61
61
  }
@@ -1,6 +1,6 @@
1
- var Fe=Object.defineProperty;var a=(e,t)=>Fe(e,"name",{value:t,configurable:!0});var ae=class{static{a(this,"Edit")}startPosition;oldEndPosition;newEndPosition;startIndex;oldEndIndex;newEndIndex;constructor({startIndex:t,oldEndIndex:r,newEndIndex:_,startPosition:s,oldEndPosition:o,newEndPosition:u}){this.startIndex=t>>>0,this.oldEndIndex=r>>>0,this.newEndIndex=_>>>0,this.startPosition=s,this.oldEndPosition=o,this.newEndPosition=u}editPoint(t,r){let _=r,s={...t};if(r>=this.oldEndIndex){_=this.newEndIndex+(r-this.oldEndIndex);let o=t.row;s.row=this.newEndPosition.row+(t.row-this.oldEndPosition.row),s.column=o===this.oldEndPosition.row?this.newEndPosition.column+(t.column-this.oldEndPosition.column):t.column}else r>this.startIndex&&(_=this.newEndIndex,s.row=this.newEndPosition.row,s.column=this.newEndPosition.column);return{point:s,index:_}}editRange(t){let r={startIndex:t.startIndex,startPosition:{...t.startPosition},endIndex:t.endIndex,endPosition:{...t.endPosition}};return t.endIndex>=this.oldEndIndex?t.endIndex!==Number.MAX_SAFE_INTEGER&&(r.endIndex=this.newEndIndex+(t.endIndex-this.oldEndIndex),r.endPosition={row:this.newEndPosition.row+(t.endPosition.row-this.oldEndPosition.row),column:t.endPosition.row===this.oldEndPosition.row?this.newEndPosition.column+(t.endPosition.column-this.oldEndPosition.column):t.endPosition.column},r.endIndex<this.newEndIndex&&(r.endIndex=Number.MAX_SAFE_INTEGER,r.endPosition={row:Number.MAX_SAFE_INTEGER,column:Number.MAX_SAFE_INTEGER})):t.endIndex>this.startIndex&&(r.endIndex=this.startIndex,r.endPosition={...this.startPosition}),t.startIndex>=this.oldEndIndex?(r.startIndex=this.newEndIndex+(t.startIndex-this.oldEndIndex),r.startPosition={row:this.newEndPosition.row+(t.startPosition.row-this.oldEndPosition.row),column:t.startPosition.row===this.oldEndPosition.row?this.newEndPosition.column+(t.startPosition.column-this.oldEndPosition.column):t.startPosition.column},r.startIndex<this.newEndIndex&&(r.startIndex=Number.MAX_SAFE_INTEGER,r.startPosition={row:Number.MAX_SAFE_INTEGER,column:Number.MAX_SAFE_INTEGER})):t.startIndex>this.startIndex&&(r.startIndex=this.startIndex,r.startPosition={...this.startPosition}),r}};var oe=2,m=4,ne=4*m,I=5*m,k=2*m,j=2*m+2*k,S={row:0,column:0},F=Symbol("INTERNAL");function D(e){if(e!==F)throw new Error("Illegal constructor")}a(D,"assertInternal");function K(e){return!!e&&typeof e.row=="number"&&typeof e.column=="number"}a(K,"isPoint");function he(e){n=e}a(he,"setModule");var n;function H(e){try{return new FinalizationRegistry(e)}catch(t){console.error("Unsupported FinalizationRegistry:",t);return}}a(H,"newFinalizer");var pe=H(e=>{n._ts_lookahead_iterator_delete(e)}),X=class{static{a(this,"LookaheadIterator")}0=0;language;positioned=!1;constructor(t,r,_){D(t),this[0]=r,this.language=_,pe?.register(this,r,this)}get currentTypeId(){return this.positioned?n._ts_lookahead_iterator_current_symbol(this[0]):null}get currentType(){let t=this.currentTypeId;return t===null?null:this.language.types[t]??n.UTF8ToString(n._ts_language_symbol_name(this.language[0],t))}delete(){pe?.unregister(this),n._ts_lookahead_iterator_delete(this[0]),this[0]=0}reset(t,r){return n._ts_lookahead_iterator_reset(this[0],t[0],r)?(this.language=t,this.positioned=!1,!0):!1}resetState(t){return n._ts_lookahead_iterator_reset_state(this[0],t)?(this.positioned=!1,!0):!1}[Symbol.iterator](){return{next:a(()=>{this.positioned=!!n._ts_lookahead_iterator_next(this[0]);let t=this.currentType;return t===null?{done:!0,value:""}:{done:!1,value:t}},"next")}}};function _e(e,t,r,_){let s=r-t,o=e.textCallback(t,_);if(o){for(t+=o.length;t<r;){let u=e.textCallback(t,_);if(u&&u.length>0)t+=u.length,o+=u;else break}t>r&&(o=o.slice(0,s))}return o??""}a(_e,"getText");var ye=H(e=>{n._ts_tree_delete(e)}),Y=class e{static{a(this,"Tree")}0=0;textCallback;language;constructor(t,r,_,s){D(t),this[0]=r,this.language=_,this.textCallback=s,ye?.register(this,r,this)}copy(){let t=n._ts_tree_copy(this[0]);return new e(F,t,this.language,this.textCallback)}delete(){ye?.unregister(this),n._ts_tree_delete(this[0]),this[0]=0}get rootNode(){return n._ts_tree_root_node_wasm(this[0]),E(this)}rootNodeWithOffset(t,r){let _=d+I;return n.setValue(_,t,"i32"),C(_+m,r),n._ts_tree_root_node_with_offset_wasm(this[0]),E(this)}edit(t){we(t),n._ts_tree_edit_wasm(this[0])}walk(){return this.rootNode.walk()}getChangedRanges(t){if(!(t instanceof e))throw new TypeError("Argument must be a Tree");n._ts_tree_get_changed_ranges_wasm(this[0],t[0]);let r=n.getValue(d,"i32"),_=n.getValue(d+m,"i32"),s=new Array(r);if(r>0){let o=_;for(let u=0;u<r;u++)s[u]=J(o),o+=j;n._free(_)}return s}getIncludedRanges(){n._ts_tree_included_ranges_wasm(this[0]);let t=n.getValue(d,"i32"),r=n.getValue(d+m,"i32"),_=new Array(t);if(t>0){let s=r;for(let o=0;o<t;o++)_[o]=J(s),s+=j;n._free(r)}return _}};var be=H(e=>{P({handles:e}),n._ts_tree_cursor_delete_wasm(0)}),ee=class e{static{a(this,"TreeCursor")}handles=[0,0,0,0];tree;constructor(t,r){D(t),this.tree=r,O(this),be?.register(this,this.handles,this)}copy(){return P(this),n._ts_tree_cursor_copy_wasm(this.tree[0]),new e(F,this.tree)}delete(){be?.unregister(this),P(this),n._ts_tree_cursor_delete_wasm(this.tree[0]),this.handles.fill(0)}get currentNode(){return P(this),n._ts_tree_cursor_current_node_wasm(this.tree[0]),E(this.tree)}get currentFieldId(){return P(this),n._ts_tree_cursor_current_field_id_wasm(this.tree[0])}get currentFieldName(){return this.tree.language.fields[this.currentFieldId]}get currentDepth(){return P(this),n._ts_tree_cursor_current_depth_wasm(this.tree[0])}get currentDescendantIndex(){return P(this),n._ts_tree_cursor_current_descendant_index_wasm(this.tree[0])}get nodeType(){return this.tree.language.types[this.nodeTypeId]||"ERROR"}get nodeTypeId(){return P(this),n._ts_tree_cursor_current_node_type_id_wasm(this.tree[0])}get nodeStateId(){return P(this),n._ts_tree_cursor_current_node_state_id_wasm(this.tree[0])}get nodeId(){return P(this),n._ts_tree_cursor_current_node_id_wasm(this.tree[0])}get nodeIsNamed(){return P(this),n._ts_tree_cursor_current_node_is_named_wasm(this.tree[0])===1}get nodeIsMissing(){return P(this),n._ts_tree_cursor_current_node_is_missing_wasm(this.tree[0])===1}get nodeText(){P(this);let t=n._ts_tree_cursor_start_index_wasm(this.tree[0]),r=n._ts_tree_cursor_end_index_wasm(this.tree[0]);n._ts_tree_cursor_start_position_wasm(this.tree[0]);let _=B(d);return _e(this.tree,t,r,_)}get startPosition(){return P(this),n._ts_tree_cursor_start_position_wasm(this.tree[0]),B(d)}get endPosition(){return P(this),n._ts_tree_cursor_end_position_wasm(this.tree[0]),B(d)}get startIndex(){return P(this),n._ts_tree_cursor_start_index_wasm(this.tree[0])}get endIndex(){return P(this),n._ts_tree_cursor_end_index_wasm(this.tree[0])}gotoFirstChild(){P(this);let t=n._ts_tree_cursor_goto_first_child_wasm(this.tree[0]);return O(this),t===1}gotoLastChild(){P(this);let t=n._ts_tree_cursor_goto_last_child_wasm(this.tree[0]);return O(this),t===1}gotoParent(){P(this);let t=n._ts_tree_cursor_goto_parent_wasm(this.tree[0]);return O(this),t===1}gotoNextSibling(){P(this);let t=n._ts_tree_cursor_goto_next_sibling_wasm(this.tree[0]);return O(this),t===1}gotoPreviousSibling(){P(this);let t=n._ts_tree_cursor_goto_previous_sibling_wasm(this.tree[0]);return O(this),t===1}gotoDescendant(t){P(this),n._ts_tree_cursor_goto_descendant_wasm(this.tree[0],t),O(this)}gotoFirstChildForIndex(t){P(this),n.setValue(d+ne,t,"i32");let r=n._ts_tree_cursor_goto_first_child_for_index_wasm(this.tree[0]);return O(this),r===1}gotoFirstChildForPosition(t){P(this),C(d+ne,t);let r=n._ts_tree_cursor_goto_first_child_for_position_wasm(this.tree[0]);return O(this),r===1}reset(t){h(t),P(this,d+I),n._ts_tree_cursor_reset_wasm(t.tree[0]),O(this),this.tree=t.tree}resetTo(t){P(this,d),P(t,d+ne),n._ts_tree_cursor_reset_to_wasm(this.tree[0],t.tree[0]),O(this),this.tree=t.tree}};var te=class{static{a(this,"Node")}0=0;_children;_namedChildren;constructor(t,{id:r,tree:_,startIndex:s,startPosition:o,other:u}){D(t),this[0]=u,this.id=r,this.tree=_,this.startIndex=s,this.startPosition=o}id;startIndex;startPosition;tree;get typeId(){return h(this),n._ts_node_symbol_wasm(this.tree[0])}get grammarId(){return h(this),n._ts_node_grammar_symbol_wasm(this.tree[0])}get type(){return this.tree.language.types[this.typeId]||"ERROR"}get grammarType(){return this.tree.language.types[this.grammarId]||"ERROR"}get isNamed(){return h(this),n._ts_node_is_named_wasm(this.tree[0])===1}get isExtra(){return h(this),n._ts_node_is_extra_wasm(this.tree[0])===1}get isError(){return h(this),n._ts_node_is_error_wasm(this.tree[0])===1}get isMissing(){return h(this),n._ts_node_is_missing_wasm(this.tree[0])===1}get hasChanges(){return h(this),n._ts_node_has_changes_wasm(this.tree[0])===1}get hasError(){return h(this),n._ts_node_has_error_wasm(this.tree[0])===1}get endIndex(){return h(this),n._ts_node_end_index_wasm(this.tree[0])}get endPosition(){return h(this),n._ts_node_end_point_wasm(this.tree[0]),B(d)}get text(){return _e(this.tree,this.startIndex,this.endIndex,this.startPosition)}get parseState(){return h(this),n._ts_node_parse_state_wasm(this.tree[0])}get nextParseState(){return h(this),n._ts_node_next_parse_state_wasm(this.tree[0])}equals(t){return this.tree===t.tree&&this.id===t.id}child(t){return h(this),n._ts_node_child_wasm(this.tree[0],t),E(this.tree)}namedChild(t){return h(this),n._ts_node_named_child_wasm(this.tree[0],t),E(this.tree)}childForFieldId(t){return h(this),n._ts_node_child_by_field_id_wasm(this.tree[0],t),E(this.tree)}childForFieldName(t){let r=this.tree.language.fields.indexOf(t);return r!==-1?this.childForFieldId(r):null}fieldNameForChild(t){h(this);let r=n._ts_node_field_name_for_child_wasm(this.tree[0],t);return r?n.AsciiToString(r):null}fieldNameForNamedChild(t){h(this);let r=n._ts_node_field_name_for_named_child_wasm(this.tree[0],t);return r?n.AsciiToString(r):null}childrenForFieldName(t){let r=this.tree.language.fields.indexOf(t);return r!==-1&&r!==0?this.childrenForFieldId(r):[]}childrenForFieldId(t){h(this),n._ts_node_children_by_field_id_wasm(this.tree[0],t);let r=n.getValue(d,"i32"),_=n.getValue(d+m,"i32"),s=new Array(r);if(r>0){let o=_;for(let u=0;u<r;u++)s[u]=E(this.tree,o),o+=I;n._free(_)}return s}firstChildForIndex(t){h(this);let r=d+I;return n.setValue(r,t,"i32"),n._ts_node_first_child_for_byte_wasm(this.tree[0]),E(this.tree)}firstNamedChildForIndex(t){h(this);let r=d+I;return n.setValue(r,t,"i32"),n._ts_node_first_named_child_for_byte_wasm(this.tree[0]),E(this.tree)}get childCount(){return h(this),n._ts_node_child_count_wasm(this.tree[0])}get namedChildCount(){return h(this),n._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(){if(!this._children){h(this),n._ts_node_children_wasm(this.tree[0]);let t=n.getValue(d,"i32"),r=n.getValue(d+m,"i32");if(this._children=new Array(t),t>0){let _=r;for(let s=0;s<t;s++)this._children[s]=E(this.tree,_),_+=I;n._free(r)}}return this._children}get namedChildren(){if(!this._namedChildren){h(this),n._ts_node_named_children_wasm(this.tree[0]);let t=n.getValue(d,"i32"),r=n.getValue(d+m,"i32");if(this._namedChildren=new Array(t),t>0){let _=r;for(let s=0;s<t;s++)this._namedChildren[s]=E(this.tree,_),_+=I;n._free(r)}}return this._namedChildren}descendantsOfType(t,r=S,_=S){Array.isArray(t)||(t=[t]);let s=[],o=this.tree.language.types;for(let f=0,g=o.length;f<g;f++)t.includes(o[f])&&s.push(f);t.includes("ERROR")&&s.push(65535);let u=n._malloc(m*s.length);for(let f=0,g=s.length;f<g;f++)n.setValue(u+f*m,s[f],"i32");h(this),n._ts_node_descendants_of_type_wasm(this.tree[0],u,s.length,r.row,r.column,_.row,_.column);let l=n.getValue(d,"i32"),c=n.getValue(d+m,"i32"),y=new Array(l);if(l>0){let f=c;for(let g=0;g<l;g++)y[g]=E(this.tree,f),f+=I}return n._free(c),n._free(u),y}get nextSibling(){return h(this),n._ts_node_next_sibling_wasm(this.tree[0]),E(this.tree)}get previousSibling(){return h(this),n._ts_node_prev_sibling_wasm(this.tree[0]),E(this.tree)}get nextNamedSibling(){return h(this),n._ts_node_next_named_sibling_wasm(this.tree[0]),E(this.tree)}get previousNamedSibling(){return h(this),n._ts_node_prev_named_sibling_wasm(this.tree[0]),E(this.tree)}get descendantCount(){return h(this),n._ts_node_descendant_count_wasm(this.tree[0])}get parent(){return h(this),n._ts_node_parent_wasm(this.tree[0]),E(this.tree)}childWithDescendant(t){return t.tree!==this.tree?null:(h(this),h(t,1),n._ts_node_child_with_descendant_wasm(this.tree[0]),E(this.tree))}descendantForIndex(t,r=t){if(typeof t!="number"||typeof r!="number")throw new Error("Arguments must be numbers");h(this);let _=d+I;return n.setValue(_,t,"i32"),n.setValue(_+m,r,"i32"),n._ts_node_descendant_for_index_wasm(this.tree[0]),E(this.tree)}namedDescendantForIndex(t,r=t){if(typeof t!="number"||typeof r!="number")throw new Error("Arguments must be numbers");h(this);let _=d+I;return n.setValue(_,t,"i32"),n.setValue(_+m,r,"i32"),n._ts_node_named_descendant_for_index_wasm(this.tree[0]),E(this.tree)}descendantForPosition(t,r=t){if(!K(t)||!K(r))throw new Error("Arguments must be {row, column} objects");h(this);let _=d+I;return C(_,t),C(_+k,r),n._ts_node_descendant_for_position_wasm(this.tree[0]),E(this.tree)}namedDescendantForPosition(t,r=t){if(!K(t)||!K(r))throw new Error("Arguments must be {row, column} objects");h(this);let _=d+I;return C(_,t),C(_+k,r),n._ts_node_named_descendant_for_position_wasm(this.tree[0]),E(this.tree)}walk(){return h(this),n._ts_tree_cursor_new_wasm(this.tree[0]),new ee(F,this.tree)}edit(t){let{point:r,index:_}=t.editPoint(this.startPosition,this.startIndex);this.startPosition=r,this.startIndex=_}toString(){h(this);let t=n._ts_node_to_string_wasm(this.tree[0]),r=n.AsciiToString(t);return n._free(t),r}};function ie(e,t,r,_,s){for(let o=0,u=s.length;o<u;o++){let l=n.getValue(r,"i32");r+=m;let c=E(t,r);r+=I,s[o]={patternIndex:_,name:e.captureNames[l],node:c}}return r}a(ie,"unmarshalCaptures");function h(e,t=0){let r=d+t*I;n.setValue(r,e.id,"i32"),r+=m,n.setValue(r,e.startIndex,"i32"),r+=m,n.setValue(r,e.startPosition.row,"i32"),r+=m,n.setValue(r,e.startPosition.column,"i32"),r+=m,n.setValue(r,e[0],"i32")}a(h,"marshalNode");function E(e,t=d){let r=n.getValue(t,"i32");if(t+=m,r===0)return null;let _=n.getValue(t,"i32");t+=m;let s=n.getValue(t,"i32");t+=m;let o=n.getValue(t,"i32");t+=m;let u=n.getValue(t,"i32");return new te(F,{id:r,tree:e,startIndex:_,startPosition:{row:s,column:o},other:u})}a(E,"unmarshalNode");function P({handles:e},t=d){n.setValue(t+0*m,e[0],"i32"),n.setValue(t+1*m,e[1],"i32"),n.setValue(t+2*m,e[2],"i32"),n.setValue(t+3*m,e[3],"i32")}a(P,"marshalTreeCursor");function O({handles:e}){e[0]=n.getValue(d+0*m,"i32"),e[1]=n.getValue(d+1*m,"i32"),e[2]=n.getValue(d+2*m,"i32"),e[3]=n.getValue(d+3*m,"i32")}a(O,"unmarshalTreeCursor");function C(e,t){n.setValue(e,t.row,"i32"),n.setValue(e+m,t.column,"i32")}a(C,"marshalPoint");function B(e){return{row:n.getValue(e,"i32")>>>0,column:n.getValue(e+m,"i32")>>>0}}a(B,"unmarshalPoint");function Pe(e,t){C(e,t.startPosition),e+=k,C(e,t.endPosition),e+=k,n.setValue(e,t.startIndex,"i32"),e+=m,n.setValue(e,t.endIndex,"i32")}a(Pe,"marshalRange");function J(e){let t={};return t.startPosition=B(e),e+=k,t.endPosition=B(e),e+=k,t.startIndex=n.getValue(e,"i32")>>>0,e+=m,t.endIndex=n.getValue(e,"i32")>>>0,t}a(J,"unmarshalRange");function we(e,t=d){C(t,e.startPosition),t+=k,C(t,e.oldEndPosition),t+=k,C(t,e.newEndPosition),t+=k,n.setValue(t,e.startIndex,"i32"),t+=m,n.setValue(t,e.oldEndIndex,"i32"),t+=m,n.setValue(t,e.newEndIndex,"i32")}a(we,"marshalEdit");function ve(e){let t=n.getValue(e,"i32"),r=n.getValue(e+=m,"i32"),_=n.getValue(e+m,"i32");return{major_version:t,minor_version:r,patch_version:_}}a(ve,"unmarshalLanguageMetadata");var Ce=/^tree_sitter_\w+$/,Z=class{static{a(this,"Language")}0=0;types;fields;constructor(t,r){D(t),this[0]=r,this.types=new Array(n._ts_language_symbol_count(this[0]));for(let _=0,s=this.types.length;_<s;_++)n._ts_language_symbol_type(this[0],_)<2&&(this.types[_]=n.UTF8ToString(n._ts_language_symbol_name(this[0],_)));this.fields=new Array(n._ts_language_field_count(this[0])+1);for(let _=0,s=this.fields.length;_<s;_++){let o=n._ts_language_field_name_for_id(this[0],_);o!==0?this.fields[_]=n.UTF8ToString(o):this.fields[_]=null}}get name(){let t=n._ts_language_name(this[0]);return t===0?null:n.UTF8ToString(t)}get abiVersion(){return n._ts_language_abi_version(this[0])}get metadata(){return n._ts_language_metadata_wasm(this[0]),n.getValue(d,"i32")===0?null:ve(d+m)}get fieldCount(){return this.fields.length-1}get stateCount(){return n._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=n._malloc(_+1);n.stringToUTF8(t,s,_+1);let o=n._ts_language_symbol_for_name(this[0],s,_,r?1:0);return n._free(s),o||null}get nodeTypeCount(){return n._ts_language_symbol_count(this[0])}nodeTypeForId(t){let r=n._ts_language_symbol_name(this[0],t);return r?n.UTF8ToString(r):null}nodeTypeIsNamed(t){return!!n._ts_language_type_is_named_wasm(this[0],t)}nodeTypeIsVisible(t){return!!n._ts_language_type_is_visible_wasm(this[0],t)}get supertypes(){n._ts_language_supertypes_wasm(this[0]);let t=n.getValue(d,"i32"),r=n.getValue(d+m,"i32"),_=new Array(t);if(t>0){let s=r;for(let o=0;o<t;o++)_[o]=n.getValue(s,"i16"),s+=oe}return _}subtypes(t){n._ts_language_subtypes_wasm(this[0],t);let r=n.getValue(d,"i32"),_=n.getValue(d+m,"i32"),s=new Array(r);if(r>0){let o=_;for(let u=0;u<r;u++)s[u]=n.getValue(o,"i16"),o+=oe}return s}nextState(t,r){return n._ts_language_next_state(this[0],t,r)}lookaheadIterator(t){let r=n._ts_lookahead_iterator_new(this[0],t);return r?new X(F,r,this):null}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 u=await s.text();throw new Error(`Language.load failed with status ${s.status}.
1
+ var Ce=Object.defineProperty;var a=(e,t)=>Ce(e,"name",{value:t,configurable:!0});var ae=class{static{a(this,"Edit")}startPosition;oldEndPosition;newEndPosition;startIndex;oldEndIndex;newEndIndex;constructor({startIndex:t,oldEndIndex:r,newEndIndex:_,startPosition:s,oldEndPosition:o,newEndPosition:l}){this.startIndex=t>>>0,this.oldEndIndex=r>>>0,this.newEndIndex=_>>>0,this.startPosition=s,this.oldEndPosition=o,this.newEndPosition=l}editPoint(t,r){let _=r,s={...t};if(r>=this.oldEndIndex){_=this.newEndIndex+(r-this.oldEndIndex);let o=t.row;s.row=this.newEndPosition.row+(t.row-this.oldEndPosition.row),s.column=o===this.oldEndPosition.row?this.newEndPosition.column+(t.column-this.oldEndPosition.column):t.column}else r>this.startIndex&&(_=this.newEndIndex,s.row=this.newEndPosition.row,s.column=this.newEndPosition.column);return{point:s,index:_}}editRange(t){let r={startIndex:t.startIndex,startPosition:{...t.startPosition},endIndex:t.endIndex,endPosition:{...t.endPosition}};return t.endIndex>=this.oldEndIndex?t.endIndex!==Number.MAX_SAFE_INTEGER&&(r.endIndex=this.newEndIndex+(t.endIndex-this.oldEndIndex),r.endPosition={row:this.newEndPosition.row+(t.endPosition.row-this.oldEndPosition.row),column:t.endPosition.row===this.oldEndPosition.row?this.newEndPosition.column+(t.endPosition.column-this.oldEndPosition.column):t.endPosition.column},r.endIndex<this.newEndIndex&&(r.endIndex=Number.MAX_SAFE_INTEGER,r.endPosition={row:Number.MAX_SAFE_INTEGER,column:Number.MAX_SAFE_INTEGER})):t.endIndex>this.startIndex&&(r.endIndex=this.startIndex,r.endPosition={...this.startPosition}),t.startIndex>=this.oldEndIndex?(r.startIndex=this.newEndIndex+(t.startIndex-this.oldEndIndex),r.startPosition={row:this.newEndPosition.row+(t.startPosition.row-this.oldEndPosition.row),column:t.startPosition.row===this.oldEndPosition.row?this.newEndPosition.column+(t.startPosition.column-this.oldEndPosition.column):t.startPosition.column},r.startIndex<this.newEndIndex&&(r.startIndex=Number.MAX_SAFE_INTEGER,r.startPosition={row:Number.MAX_SAFE_INTEGER,column:Number.MAX_SAFE_INTEGER})):t.startIndex>this.startIndex&&(r.startIndex=this.startIndex,r.startPosition={...this.startPosition}),r}};var oe=2,m=4,ne=4*m,I=5*m,L=2*m,j=2*m+2*L,S={row:0,column:0},F=Symbol("INTERNAL");function W(e){if(e!==F)throw new Error("Illegal constructor")}a(W,"assertInternal");function K(e){return!!e&&typeof e.row=="number"&&typeof e.column=="number"}a(K,"isPoint");function pe(e){n=e}a(pe,"setModule");var n;function D(e){try{return new FinalizationRegistry(e)}catch(t){console.error("Unsupported FinalizationRegistry:",t);return}}a(D,"newFinalizer");var we=D(e=>{n._ts_lookahead_iterator_delete(e)}),X=class{static{a(this,"LookaheadIterator")}0=0;language;positioned=!1;constructor(t,r,_){W(t),this[0]=r,this.language=_,we?.register(this,r,this)}get currentTypeId(){return this.positioned?n._ts_lookahead_iterator_current_symbol(this[0]):null}get currentType(){let t=this.currentTypeId;return t===null?null:this.language.types[t]??n.UTF8ToString(n._ts_language_symbol_name(this.language[0],t))}delete(){we?.unregister(this),n._ts_lookahead_iterator_delete(this[0]),this[0]=0}reset(t,r){return n._ts_lookahead_iterator_reset(this[0],t[0],r)?(this.language=t,this.positioned=!1,!0):!1}resetState(t){return n._ts_lookahead_iterator_reset_state(this[0],t)?(this.positioned=!1,!0):!1}[Symbol.iterator](){return{next:a(()=>{this.positioned=!!n._ts_lookahead_iterator_next(this[0]);let t=this.currentType;return t===null?{done:!0,value:""}:{done:!1,value:t}},"next")}}};function _e(e,t,r,_){let s=r-t,o=e.textCallback(t,_);if(o){for(t+=o.length;t<r;){let l=e.textCallback(t,_);if(l&&l.length>0)t+=l.length,o+=l;else break}t>r&&(o=o.slice(0,s))}return o??""}a(_e,"getText");var ye=D(e=>{n._ts_tree_delete(e)}),Y=class e{static{a(this,"Tree")}0=0;textCallback;language;constructor(t,r,_,s){W(t),this[0]=r,this.language=_,this.textCallback=s,ye?.register(this,r,this)}copy(){let t=n._ts_tree_copy(this[0]);return new e(F,t,this.language,this.textCallback)}delete(){ye?.unregister(this),n._ts_tree_delete(this[0]),this[0]=0}get rootNode(){return n._ts_tree_root_node_wasm(this[0]),E(this)}rootNodeWithOffset(t,r){let _=d+I;return n.setValue(_,t,"i32"),C(_+m,r),n._ts_tree_root_node_with_offset_wasm(this[0]),E(this)}edit(t){be(t),n._ts_tree_edit_wasm(this[0])}walk(){return this.rootNode.walk()}getChangedRanges(t){if(!(t instanceof e))throw new TypeError("Argument must be a Tree");n._ts_tree_get_changed_ranges_wasm(this[0],t[0]);let r=n.getValue(d,"i32"),_=n.getValue(d+m,"i32"),s=new Array(r);if(r>0){let o=_;for(let l=0;l<r;l++)s[l]=J(o),o+=j;n._ts_free_wasm(_)}return s}getIncludedRanges(){n._ts_tree_included_ranges_wasm(this[0]);let t=n.getValue(d,"i32"),r=n.getValue(d+m,"i32"),_=new Array(t);if(t>0){let s=r;for(let o=0;o<t;o++)_[o]=J(s),s+=j;n._ts_free_wasm(r)}return _}};var Pe=D(e=>{P({handles:e}),n._ts_tree_cursor_delete_wasm(0)}),ee=class e{static{a(this,"TreeCursor")}handles=[0,0,0,0];tree;constructor(t,r){W(t),this.tree=r,O(this),Pe?.register(this,this.handles,this)}copy(){return P(this),n._ts_tree_cursor_copy_wasm(this.tree[0]),new e(F,this.tree)}delete(){Pe?.unregister(this),P(this),n._ts_tree_cursor_delete_wasm(this.tree[0]),this.handles.fill(0)}get currentNode(){return P(this),n._ts_tree_cursor_current_node_wasm(this.tree[0]),E(this.tree)}get currentFieldId(){return P(this),n._ts_tree_cursor_current_field_id_wasm(this.tree[0])}get currentFieldName(){return this.tree.language.fields[this.currentFieldId]}get currentDepth(){return P(this),n._ts_tree_cursor_current_depth_wasm(this.tree[0])}get currentDescendantIndex(){return P(this),n._ts_tree_cursor_current_descendant_index_wasm(this.tree[0])}get nodeType(){return this.tree.language.types[this.nodeTypeId]||"ERROR"}get nodeTypeId(){return P(this),n._ts_tree_cursor_current_node_type_id_wasm(this.tree[0])}get nodeStateId(){return P(this),n._ts_tree_cursor_current_node_state_id_wasm(this.tree[0])}get nodeId(){return P(this),n._ts_tree_cursor_current_node_id_wasm(this.tree[0])}get nodeIsNamed(){return P(this),n._ts_tree_cursor_current_node_is_named_wasm(this.tree[0])===1}get nodeIsMissing(){return P(this),n._ts_tree_cursor_current_node_is_missing_wasm(this.tree[0])===1}get nodeText(){P(this);let t=n._ts_tree_cursor_start_index_wasm(this.tree[0]),r=n._ts_tree_cursor_end_index_wasm(this.tree[0]);n._ts_tree_cursor_start_position_wasm(this.tree[0]);let _=Q(d);return _e(this.tree,t,r,_)}get startPosition(){return P(this),n._ts_tree_cursor_start_position_wasm(this.tree[0]),Q(d)}get endPosition(){return P(this),n._ts_tree_cursor_end_position_wasm(this.tree[0]),Q(d)}get startIndex(){return P(this),n._ts_tree_cursor_start_index_wasm(this.tree[0])}get endIndex(){return P(this),n._ts_tree_cursor_end_index_wasm(this.tree[0])}gotoFirstChild(){P(this);let t=n._ts_tree_cursor_goto_first_child_wasm(this.tree[0]);return O(this),t===1}gotoLastChild(){P(this);let t=n._ts_tree_cursor_goto_last_child_wasm(this.tree[0]);return O(this),t===1}gotoParent(){P(this);let t=n._ts_tree_cursor_goto_parent_wasm(this.tree[0]);return O(this),t===1}gotoNextSibling(){P(this);let t=n._ts_tree_cursor_goto_next_sibling_wasm(this.tree[0]);return O(this),t===1}gotoPreviousSibling(){P(this);let t=n._ts_tree_cursor_goto_previous_sibling_wasm(this.tree[0]);return O(this),t===1}gotoDescendant(t){P(this),n._ts_tree_cursor_goto_descendant_wasm(this.tree[0],t),O(this)}gotoFirstChildForIndex(t){P(this),n.setValue(d+ne,t,"i32");let r=n._ts_tree_cursor_goto_first_child_for_index_wasm(this.tree[0]);return O(this),r===1}gotoFirstChildForPosition(t){P(this),C(d+ne,t);let r=n._ts_tree_cursor_goto_first_child_for_position_wasm(this.tree[0]);return O(this),r===1}reset(t){h(t),P(this,d+I),n._ts_tree_cursor_reset_wasm(t.tree[0]),O(this),this.tree=t.tree}resetTo(t){P(this,d),P(t,d+ne),n._ts_tree_cursor_reset_to_wasm(this.tree[0],t.tree[0]),O(this),this.tree=t.tree}};var te=class{static{a(this,"Node")}0=0;_children;_namedChildren;constructor(t,{id:r,tree:_,startIndex:s,startPosition:o,other:l}){W(t),this[0]=l,this.id=r,this.tree=_,this.startIndex=s,this.startPosition=o}id;startIndex;startPosition;tree;get typeId(){return h(this),n._ts_node_symbol_wasm(this.tree[0])}get grammarId(){return h(this),n._ts_node_grammar_symbol_wasm(this.tree[0])}get type(){return this.tree.language.types[this.typeId]||"ERROR"}get grammarType(){return this.tree.language.types[this.grammarId]||"ERROR"}get isNamed(){return h(this),n._ts_node_is_named_wasm(this.tree[0])===1}get isExtra(){return h(this),n._ts_node_is_extra_wasm(this.tree[0])===1}get isError(){return h(this),n._ts_node_is_error_wasm(this.tree[0])===1}get isMissing(){return h(this),n._ts_node_is_missing_wasm(this.tree[0])===1}get hasChanges(){return h(this),n._ts_node_has_changes_wasm(this.tree[0])===1}get hasError(){return h(this),n._ts_node_has_error_wasm(this.tree[0])===1}get endIndex(){return h(this),n._ts_node_end_index_wasm(this.tree[0])}get endPosition(){return h(this),n._ts_node_end_point_wasm(this.tree[0]),Q(d)}get text(){return _e(this.tree,this.startIndex,this.endIndex,this.startPosition)}get parseState(){return h(this),n._ts_node_parse_state_wasm(this.tree[0])}get nextParseState(){return h(this),n._ts_node_next_parse_state_wasm(this.tree[0])}equals(t){return this.tree===t.tree&&this.id===t.id}child(t){return h(this),n._ts_node_child_wasm(this.tree[0],t),E(this.tree)}namedChild(t){return h(this),n._ts_node_named_child_wasm(this.tree[0],t),E(this.tree)}childForFieldId(t){return h(this),n._ts_node_child_by_field_id_wasm(this.tree[0],t),E(this.tree)}childForFieldName(t){let r=this.tree.language.fields.indexOf(t);return r!==-1?this.childForFieldId(r):null}fieldNameForChild(t){h(this);let r=n._ts_node_field_name_for_child_wasm(this.tree[0],t);return r?n.AsciiToString(r):null}fieldNameForNamedChild(t){h(this);let r=n._ts_node_field_name_for_named_child_wasm(this.tree[0],t);return r?n.AsciiToString(r):null}childrenForFieldName(t){let r=this.tree.language.fields.indexOf(t);return r!==-1&&r!==0?this.childrenForFieldId(r):[]}childrenForFieldId(t){h(this),n._ts_node_children_by_field_id_wasm(this.tree[0],t);let r=n.getValue(d,"i32"),_=n.getValue(d+m,"i32"),s=new Array(r);if(r>0){let o=_;for(let l=0;l<r;l++)s[l]=E(this.tree,o),o+=I;n._ts_free_wasm(_)}return s}firstChildForIndex(t){h(this);let r=d+I;return n.setValue(r,t,"i32"),n._ts_node_first_child_for_byte_wasm(this.tree[0]),E(this.tree)}firstNamedChildForIndex(t){h(this);let r=d+I;return n.setValue(r,t,"i32"),n._ts_node_first_named_child_for_byte_wasm(this.tree[0]),E(this.tree)}get childCount(){return h(this),n._ts_node_child_count_wasm(this.tree[0])}get namedChildCount(){return h(this),n._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(){if(!this._children){h(this),n._ts_node_children_wasm(this.tree[0]);let t=n.getValue(d,"i32"),r=n.getValue(d+m,"i32");if(this._children=new Array(t),t>0){let _=r;for(let s=0;s<t;s++)this._children[s]=E(this.tree,_),_+=I;n._free(r)}}return this._children}get namedChildren(){if(!this._namedChildren){h(this),n._ts_node_named_children_wasm(this.tree[0]);let t=n.getValue(d,"i32"),r=n.getValue(d+m,"i32");if(this._namedChildren=new Array(t),t>0){let _=r;for(let s=0;s<t;s++)this._namedChildren[s]=E(this.tree,_),_+=I;n._free(r)}}return this._namedChildren}descendantsOfType(t,r=S,_=S){Array.isArray(t)||(t=[t]);let s=[],o=this.tree.language.types;for(let f=0,g=o.length;f<g;f++)t.includes(o[f])&&s.push(f);t.includes("ERROR")&&s.push(65535);let l=n._malloc(m*s.length);for(let f=0,g=s.length;f<g;f++)n.setValue(l+f*m,s[f],"i32");h(this),n._ts_node_descendants_of_type_wasm(this.tree[0],l,s.length,r.row,r.column,_.row,_.column);let u=n.getValue(d,"i32"),c=n.getValue(d+m,"i32"),w=new Array(u);if(u>0){let f=c;for(let g=0;g<u;g++)w[g]=E(this.tree,f),f+=I}return n._ts_free_wasm(c),n._free(l),w}get nextSibling(){return h(this),n._ts_node_next_sibling_wasm(this.tree[0]),E(this.tree)}get previousSibling(){return h(this),n._ts_node_prev_sibling_wasm(this.tree[0]),E(this.tree)}get nextNamedSibling(){return h(this),n._ts_node_next_named_sibling_wasm(this.tree[0]),E(this.tree)}get previousNamedSibling(){return h(this),n._ts_node_prev_named_sibling_wasm(this.tree[0]),E(this.tree)}get descendantCount(){return h(this),n._ts_node_descendant_count_wasm(this.tree[0])}get parent(){return h(this),n._ts_node_parent_wasm(this.tree[0]),E(this.tree)}childWithDescendant(t){return t.tree!==this.tree?null:(h(this),h(t,1),n._ts_node_child_with_descendant_wasm(this.tree[0]),E(this.tree))}descendantForIndex(t,r=t){if(typeof t!="number"||typeof r!="number")throw new Error("Arguments must be numbers");h(this);let _=d+I;return n.setValue(_,t,"i32"),n.setValue(_+m,r,"i32"),n._ts_node_descendant_for_index_wasm(this.tree[0]),E(this.tree)}namedDescendantForIndex(t,r=t){if(typeof t!="number"||typeof r!="number")throw new Error("Arguments must be numbers");h(this);let _=d+I;return n.setValue(_,t,"i32"),n.setValue(_+m,r,"i32"),n._ts_node_named_descendant_for_index_wasm(this.tree[0]),E(this.tree)}descendantForPosition(t,r=t){if(!K(t)||!K(r))throw new Error("Arguments must be {row, column} objects");h(this);let _=d+I;return C(_,t),C(_+L,r),n._ts_node_descendant_for_position_wasm(this.tree[0]),E(this.tree)}namedDescendantForPosition(t,r=t){if(!K(t)||!K(r))throw new Error("Arguments must be {row, column} objects");h(this);let _=d+I;return C(_,t),C(_+L,r),n._ts_node_named_descendant_for_position_wasm(this.tree[0]),E(this.tree)}walk(){return h(this),n._ts_tree_cursor_new_wasm(this.tree[0]),new ee(F,this.tree)}edit(t){let{point:r,index:_}=t.editPoint(this.startPosition,this.startIndex);this.startPosition=r,this.startIndex=_}toString(){h(this);let t=n._ts_node_to_string_wasm(this.tree[0]),r=n.AsciiToString(t);return n._ts_free_wasm(t),r}};function ie(e,t,r,_,s){for(let o=0,l=s.length;o<l;o++){let u=n.getValue(r,"i32");r+=m;let c=E(t,r);r+=I,s[o]={patternIndex:_,name:e.captureNames[u],node:c}}return r}a(ie,"unmarshalCaptures");function h(e,t=0){let r=d+t*I;n.setValue(r,e.id,"i32"),r+=m,n.setValue(r,e.startIndex,"i32"),r+=m,n.setValue(r,e.startPosition.row,"i32"),r+=m,n.setValue(r,e.startPosition.column,"i32"),r+=m,n.setValue(r,e[0],"i32")}a(h,"marshalNode");function E(e,t=d){let r=n.getValue(t,"i32");if(t+=m,r===0)return null;let _=n.getValue(t,"i32");t+=m;let s=n.getValue(t,"i32");t+=m;let o=n.getValue(t,"i32");t+=m;let l=n.getValue(t,"i32");return new te(F,{id:r,tree:e,startIndex:_,startPosition:{row:s,column:o},other:l})}a(E,"unmarshalNode");function P({handles:e},t=d){n.setValue(t+0*m,e[0],"i32"),n.setValue(t+1*m,e[1],"i32"),n.setValue(t+2*m,e[2],"i32"),n.setValue(t+3*m,e[3],"i32")}a(P,"marshalTreeCursor");function O({handles:e}){e[0]=n.getValue(d+0*m,"i32"),e[1]=n.getValue(d+1*m,"i32"),e[2]=n.getValue(d+2*m,"i32"),e[3]=n.getValue(d+3*m,"i32")}a(O,"unmarshalTreeCursor");function C(e,t){n.setValue(e,t.row,"i32"),n.setValue(e+m,t.column,"i32")}a(C,"marshalPoint");function Q(e){return{row:n.getValue(e,"i32")>>>0,column:n.getValue(e+m,"i32")>>>0}}a(Q,"unmarshalPoint");function ve(e,t){C(e,t.startPosition),e+=L,C(e,t.endPosition),e+=L,n.setValue(e,t.startIndex,"i32"),e+=m,n.setValue(e,t.endIndex,"i32")}a(ve,"marshalRange");function J(e){let t={};return t.startPosition=Q(e),e+=L,t.endPosition=Q(e),e+=L,t.startIndex=n.getValue(e,"i32")>>>0,e+=m,t.endIndex=n.getValue(e,"i32")>>>0,t}a(J,"unmarshalRange");function be(e,t=d){C(t,e.startPosition),t+=L,C(t,e.oldEndPosition),t+=L,C(t,e.newEndPosition),t+=L,n.setValue(t,e.startIndex,"i32"),t+=m,n.setValue(t,e.oldEndIndex,"i32"),t+=m,n.setValue(t,e.newEndIndex,"i32")}a(be,"marshalEdit");function Me(e){let t=n.getValue(e,"i32"),r=n.getValue(e+=m,"i32"),_=n.getValue(e+m,"i32");return{major_version:t,minor_version:r,patch_version:_}}a(Me,"unmarshalLanguageMetadata");var Ne=/^tree_sitter_\w+$/,Z=class{static{a(this,"Language")}0=0;types;fields;constructor(t,r){W(t),this[0]=r,this.types=new Array(n._ts_language_symbol_count(this[0]));for(let _=0,s=this.types.length;_<s;_++)n._ts_language_symbol_type(this[0],_)<2&&(this.types[_]=n.UTF8ToString(n._ts_language_symbol_name(this[0],_)));this.fields=new Array(n._ts_language_field_count(this[0])+1);for(let _=0,s=this.fields.length;_<s;_++){let o=n._ts_language_field_name_for_id(this[0],_);o!==0?this.fields[_]=n.UTF8ToString(o):this.fields[_]=null}}get name(){let t=n._ts_language_name(this[0]);return t===0?null:n.UTF8ToString(t)}get abiVersion(){return n._ts_language_abi_version(this[0])}get metadata(){return n._ts_language_metadata_wasm(this[0]),n.getValue(d,"i32")===0?null:Me(d+m)}get fieldCount(){return this.fields.length-1}get stateCount(){return n._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=n._malloc(_+1);n.stringToUTF8(t,s,_+1);let o=n._ts_language_symbol_for_name(this[0],s,_,r?1:0);return n._free(s),o||null}get nodeTypeCount(){return n._ts_language_symbol_count(this[0])}nodeTypeForId(t){let r=n._ts_language_symbol_name(this[0],t);return r?n.UTF8ToString(r):null}nodeTypeIsNamed(t){return!!n._ts_language_type_is_named_wasm(this[0],t)}nodeTypeIsVisible(t){return!!n._ts_language_type_is_visible_wasm(this[0],t)}get supertypes(){n._ts_language_supertypes_wasm(this[0]);let t=n.getValue(d,"i32"),r=n.getValue(d+m,"i32"),_=new Array(t);if(t>0){let s=r;for(let o=0;o<t;o++)_[o]=n.getValue(s,"i16"),s+=oe}return _}subtypes(t){n._ts_language_subtypes_wasm(this[0],t);let r=n.getValue(d,"i32"),_=n.getValue(d+m,"i32"),s=new Array(r);if(r>0){let o=_;for(let l=0;l<r;l++)s[l]=n.getValue(o,"i16"),o+=oe}return s}nextState(t,r){return n._ts_language_next_state(this[0],t,r)}lookaheadIterator(t){let r=n._ts_lookahead_iterator_new(this[0],t);return r?new X(F,r,this):null}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 l=await s.text();throw new Error(`Language.load failed with status ${s.status}.
2
2
 
3
- ${u}`)}let o=s.clone();try{r=await WebAssembly.compileStreaming(s)}catch(u){console.error("wasm streaming compile failed:",u),console.error("falling back to ArrayBuffer instantiation"),r=new Uint8Array(await o.arrayBuffer())}}let _=await n.loadWebAssemblyModule(r,{loadAsync:!0});return Me(_,{sync:!1})}static loadSync(t){let r=n.loadWebAssemblyModule(t,{loadAsync:!1});return Me(r,{sync:!0})}};function Me(e,{sync:t}){let r=Object.keys(e),_=r.find(o=>Ce.test(o)&&!o.includes("external_scanner_"));if(!_)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[_]();return new Z(F,s)}a(Me,"loadFromWasmExports");async function Ne(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.currentQueryProgressCallback=null,Module.currentProgressCallback=null,Module.currentLogCallback=null,Module.currentParseCallback=null;var arguments_=[],thisProgram="./this.program",quit_=a((e,t)=>{throw t},"quit_"),_scriptName=import.meta.url,scriptDirectory="";function locateFile(e){return Module.locateFile?Module.locateFile(e,scriptDirectory):scriptDirectory+e}a(locateFile,"locateFile");var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require("fs");_scriptName.startsWith("file:")&&(scriptDirectory=require("path").dirname(require("url").fileURLToPath(_scriptName))+"/"),readBinary=a(e=>{e=isFileURI(e)?new URL(e):e;var t=fs.readFileSync(e);return t},"readBinary"),readAsync=a(async(e,t=!0)=>{e=isFileURI(e)?new URL(e):e;var r=fs.readFileSync(e,t?void 0:"utf8");return r},"readAsync"),process.argv.length>1&&(thisProgram=process.argv[1].replace(/\\/g,"/")),arguments_=process.argv.slice(2),quit_=a((e,t)=>{throw process.exitCode=e,t},"quit_")}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){try{scriptDirectory=new URL(".",_scriptName).href}catch{}ENVIRONMENT_IS_WORKER&&(readBinary=a(e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)},"readBinary")),readAsync=a(async e=>{if(isFileURI(e))return new Promise((r,_)=>{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}_(s.status)},s.onerror=_,s.send(null)});var t=await fetch(e,{credentials:"same-origin"});if(t.ok)return t.arrayBuffer();throw new Error(t.status+" : "+t.url)},"readAsync")}var out=console.log.bind(console),err=console.error.bind(console),dynamicLibraries=[],wasmBinary,ABORT=!1,EXITSTATUS,isFileURI=a(e=>e.startsWith("file://"),"isFileURI"),readyPromiseResolve,readyPromiseReject,wasmMemory,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,HEAP64,HEAPU64,HEAP_DATA_VIEW,runtimeInitialized=!1;function updateMemoryViews(){var e=wasmMemory.buffer;Module.HEAP8=HEAP8=new Int8Array(e),Module.HEAP16=HEAP16=new Int16Array(e),Module.HEAPU8=HEAPU8=new Uint8Array(e),Module.HEAPU16=HEAPU16=new Uint16Array(e),Module.HEAP32=HEAP32=new Int32Array(e),Module.HEAPU32=HEAPU32=new Uint32Array(e),Module.HEAPF32=HEAPF32=new Float32Array(e),Module.HEAPF64=HEAPF64=new Float64Array(e),Module.HEAP64=HEAP64=new BigInt64Array(e),Module.HEAPU64=HEAPU64=new BigUint64Array(e),Module.HEAP_DATA_VIEW=HEAP_DATA_VIEW=new DataView(e),LE_HEAP_UPDATE()}a(updateMemoryViews,"updateMemoryViews");function initMemory(){if(Module.wasmMemory)wasmMemory=Module.wasmMemory;else{var e=Module.INITIAL_MEMORY||33554432;wasmMemory=new WebAssembly.Memory({initial:e/65536,maximum:32768})}updateMemoryViews()}a(initMemory,"initMemory");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)}a(preRun,"preRun");function initRuntime(){runtimeInitialized=!0,callRuntimeCallbacks(__RELOC_FUNCS__),wasmExports.__wasm_call_ctors(),callRuntimeCallbacks(onPostCtors)}a(initRuntime,"initRuntime");function preMain(){}a(preMain,"preMain");function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(onPostRuns)}a(postRun,"postRun");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}a(abort,"abort");var wasmBinaryFile;function findWasmBinary(){return Module.locateFile?locateFile("web-tree-sitter.wasm"):new URL("web-tree-sitter.wasm",import.meta.url).href}a(findWasmBinary,"findWasmBinary");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"}a(getBinarySync,"getBinarySync");async function getWasmBinary(e){if(!wasmBinary)try{var t=await readAsync(e);return new Uint8Array(t)}catch{}return getBinarySync(e)}a(getWasmBinary,"getWasmBinary");async function instantiateArrayBuffer(e,t){try{var r=await getWasmBinary(e),_=await WebAssembly.instantiate(r,t);return _}catch(s){err(`failed to asynchronously prepare wasm: ${s}`),abort(s)}}a(instantiateArrayBuffer,"instantiateArrayBuffer");async function instantiateAsync(e,t,r){if(!e&&!isFileURI(t)&&!ENVIRONMENT_IS_NODE)try{var _=fetch(t,{credentials:"same-origin"}),s=await WebAssembly.instantiateStreaming(_,r);return s}catch(o){err(`wasm streaming compile failed: ${o}`),err("falling back to ArrayBuffer instantiation")}return instantiateArrayBuffer(t,r)}a(instantiateAsync,"instantiateAsync");function getWasmImports(){return{env:wasmImports,wasi_snapshot_preview1:wasmImports,"GOT.mem":new Proxy(wasmImports,GOTHandler),"GOT.func":new Proxy(wasmImports,GOTHandler)}}a(getWasmImports,"getWasmImports");async function createWasm(){function e(o,u){wasmExports=o.exports,wasmExports=relocateExports(wasmExports,1024);var l=getDylinkMetadata(u);return l.neededDynlibs&&(dynamicLibraries=l.neededDynlibs.concat(dynamicLibraries)),mergeLibSymbols(wasmExports,"main"),LDSO.init(),loadDylibs(),__RELOC_FUNCS__.push(wasmExports.__wasm_apply_data_relocs),assignWasmExports(wasmExports),wasmExports}a(e,"receiveInstance");function t(o){return e(o.instance,o.module)}a(t,"receiveInstantiationResult");var r=getWasmImports();if(Module.instantiateWasm)return new Promise((o,u)=>{Module.instantiateWasm(r,(l,c)=>{o(e(l,c))})});wasmBinaryFile??=findWasmBinary();var _=await instantiateAsync(wasmBinary,wasmBinaryFile,r),s=t(_);return s}a(createWasm,"createWasm");class ExitStatus{static{a(this,"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}},LE_ATOMICS_NATIVE_BYTE_ORDER=[],LE_HEAP_LOAD_F32=a(e=>HEAP_DATA_VIEW.getFloat32(e,!0),"LE_HEAP_LOAD_F32"),LE_HEAP_LOAD_F64=a(e=>HEAP_DATA_VIEW.getFloat64(e,!0),"LE_HEAP_LOAD_F64"),LE_HEAP_LOAD_I16=a(e=>HEAP_DATA_VIEW.getInt16(e,!0),"LE_HEAP_LOAD_I16"),LE_HEAP_LOAD_I32=a(e=>HEAP_DATA_VIEW.getInt32(e,!0),"LE_HEAP_LOAD_I32"),LE_HEAP_LOAD_I64=a(e=>HEAP_DATA_VIEW.getBigInt64(e,!0),"LE_HEAP_LOAD_I64"),LE_HEAP_LOAD_U32=a(e=>HEAP_DATA_VIEW.getUint32(e,!0),"LE_HEAP_LOAD_U32"),LE_HEAP_STORE_F32=a((e,t)=>HEAP_DATA_VIEW.setFloat32(e,t,!0),"LE_HEAP_STORE_F32"),LE_HEAP_STORE_F64=a((e,t)=>HEAP_DATA_VIEW.setFloat64(e,t,!0),"LE_HEAP_STORE_F64"),LE_HEAP_STORE_I16=a((e,t)=>HEAP_DATA_VIEW.setInt16(e,t,!0),"LE_HEAP_STORE_I16"),LE_HEAP_STORE_I32=a((e,t)=>HEAP_DATA_VIEW.setInt32(e,t,!0),"LE_HEAP_STORE_I32"),LE_HEAP_STORE_I64=a((e,t)=>HEAP_DATA_VIEW.setBigInt64(e,t,!0),"LE_HEAP_STORE_I64"),LE_HEAP_STORE_U32=a((e,t)=>HEAP_DATA_VIEW.setUint32(e,t,!0),"LE_HEAP_STORE_U32"),callRuntimeCallbacks=a(e=>{for(;e.length>0;)e.shift()(Module)},"callRuntimeCallbacks"),onPostRuns=[],addOnPostRun=a(e=>onPostRuns.push(e),"addOnPostRun"),onPreRuns=[],addOnPreRun=a(e=>onPreRuns.push(e),"addOnPreRun"),UTF8Decoder=typeof TextDecoder<"u"?new TextDecoder:void 0,findStringEnd=a((e,t,r,_)=>{var s=t+r;if(_)return s;for(;e[t]&&!(t>=s);)++t;return t},"findStringEnd"),UTF8ArrayToString=a((e,t=0,r,_)=>{var s=findStringEnd(e,t,r,_);if(s-t>16&&e.buffer&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(t,s));for(var o="";t<s;){var u=e[t++];if(!(u&128)){o+=String.fromCharCode(u);continue}var l=e[t++]&63;if((u&224)==192){o+=String.fromCharCode((u&31)<<6|l);continue}var c=e[t++]&63;if((u&240)==224?u=(u&15)<<12|l<<6|c:u=(u&7)<<18|l<<12|c<<6|e[t++]&63,u<65536)o+=String.fromCharCode(u);else{var y=u-65536;o+=String.fromCharCode(55296|y>>10,56320|y&1023)}}return o},"UTF8ArrayToString"),getDylinkMetadata=a(e=>{var t=0,r=0;function _(){return e[t++]}a(_,"getU8");function s(){for(var q=0,$=1;;){var fe=e[t++];if(q+=(fe&127)*$,$*=128,!(fe&128))break}return q}a(s,"getLEB");function o(){var q=s();return t+=q,UTF8ArrayToString(e,t-q,q)}a(o,"getString");function u(){for(var q=s(),$=[];q--;)$.push(o());return $}a(u,"getStringList");function l(q,$){if(q)throw new Error($)}if(a(l,"failIf"),e instanceof WebAssembly.Module){var c=WebAssembly.Module.customSections(e,"dylink.0");l(c.length===0,"need dylink section"),e=new Uint8Array(c[0]),r=e.length}else{var y=new Uint32Array(new Uint8Array(e.subarray(0,24)).buffer),f=y[0]==1836278016||y[0]==6386541;l(!f,"need to see wasm magic number"),l(e[8]!==0,"need the dylink section to be first"),t=9;var g=s();r=t+g;var v=o();l(v!=="dylink.0")}for(var b={neededDynlibs:[],tlsExports:new Set,weakImports:new Set,runtimePaths:[]},N=1,x=2,V=3,p=4,A=5,w=256,R=3,M=1;t<r;){var L=_(),W=s();if(L===N)b.memorySize=s(),b.memoryAlign=s(),b.tableSize=s(),b.tableAlign=s();else if(L===x)b.neededDynlibs=u();else if(L===V)for(var T=s();T--;){var Q=o(),G=s();G&w&&b.tlsExports.add(Q)}else if(L===p)for(var T=s();T--;){var ge=o(),Q=o(),G=s();(G&R)==M&&b.weakImports.add(Q)}else L===A?b.runtimePaths=u():t+=W}return b},"getDylinkMetadata");function getValue(e,t="i8"){switch(t.endsWith("*")&&(t="*"),t){case"i1":return HEAP8[e];case"i8":return HEAP8[e];case"i16":return LE_HEAP_LOAD_I16((e>>1)*2);case"i32":return LE_HEAP_LOAD_I32((e>>2)*4);case"i64":return LE_HEAP_LOAD_I64((e>>3)*8);case"float":return LE_HEAP_LOAD_F32((e>>2)*4);case"double":return LE_HEAP_LOAD_F64((e>>3)*8);case"*":return LE_HEAP_LOAD_U32((e>>2)*4);default:abort(`invalid type for getValue: ${t}`)}}a(getValue,"getValue");var newDSO=a((e,t,r)=>{var _={refcount:1/0,name:e,exports:r,global:!0};return LDSO.loadedLibsByName[e]=_,t!=null&&(LDSO.loadedLibsByHandle[t]=_),_},"newDSO"),LDSO={loadedLibsByName:{},loadedLibsByHandle:{},init(){newDSO("__main__",0,wasmImports)}},___heap_base=82496,alignMemory=a((e,t)=>Math.ceil(e/t)*t,"alignMemory"),getMemory=a(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},"getMemory"),isInternalSym=a(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__"),"isInternalSym"),uleb128EncodeWithLen=a(e=>{let t=e.length;return[t%128|128,t>>7,...e]},"uleb128EncodeWithLen"),wasmTypeCodes={i:127,p:127,j:126,f:125,d:124,e:111},generateTypePack=a(e=>uleb128EncodeWithLen(Array.from(e,t=>{var r=wasmTypeCodes[t];return r})),"generateTypePack"),convertJsFunctionToWasm=a((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),_=new WebAssembly.Module(r),s=new WebAssembly.Instance(_,{e:{f:e}}),o=s.exports.f;return o},"convertJsFunctionToWasm"),wasmTableMirror=[],wasmTable=new WebAssembly.Table({initial:39,element:"anyfunc"}),getWasmTableEntry=a(e=>{var t=wasmTableMirror[e];return t||(wasmTableMirror[e]=t=wasmTable.get(e)),t},"getWasmTableEntry"),updateTableMap=a((e,t)=>{if(functionsInTableMap)for(var r=e;r<e+t;r++){var _=getWasmTableEntry(r);_&&functionsInTableMap.set(_,r)}},"updateTableMap"),functionsInTableMap,getFunctionAddress=a(e=>(functionsInTableMap||(functionsInTableMap=new WeakMap,updateTableMap(0,wasmTable.length)),functionsInTableMap.get(e)||0),"getFunctionAddress"),freeTableIndexes=[],getEmptyTableSlot=a(()=>freeTableIndexes.length?freeTableIndexes.pop():wasmTable.grow(1),"getEmptyTableSlot"),setWasmTableEntry=a((e,t)=>{wasmTable.set(e,t),wasmTableMirror[e]=wasmTable.get(e)},"setWasmTableEntry"),addFunction=a((e,t)=>{var r=getFunctionAddress(e);if(r)return r;var _=getEmptyTableSlot();try{setWasmTableEntry(_,e)}catch(o){if(!(o instanceof TypeError))throw o;var s=convertJsFunctionToWasm(e,t);setWasmTableEntry(_,s)}return functionsInTableMap.set(e,_),_},"addFunction"),updateGOT=a((e,t)=>{for(var r in e)if(!isInternalSym(r)){var _=e[r];GOT[r]||=new WebAssembly.Global({value:"i32",mutable:!0}),(t||GOT[r].value==0)&&(typeof _=="function"?GOT[r].value=addFunction(_):typeof _=="number"?GOT[r].value=_:err(`unhandled export type for '${r}': ${typeof _}`))}},"updateGOT"),relocateExports=a((e,t,r)=>{var _={};for(var s in e){var o=e[s];typeof o=="object"&&(o=o.value),typeof o=="number"&&(o+=t),_[s]=o}return updateGOT(_,r),_},"relocateExports"),isSymbolDefined=a(e=>{var t=wasmImports[e];return!(!t||t.stub)},"isSymbolDefined"),dynCall=a((e,t,r=[],_=!1)=>{var s=getWasmTableEntry(t),o=s(...r);function u(l){return l}return a(u,"convert"),o},"dynCall"),stackSave=a(()=>_emscripten_stack_get_current(),"stackSave"),stackRestore=a(e=>__emscripten_stack_restore(e),"stackRestore"),createInvokeFunction=a(e=>(t,...r)=>{var _=stackSave();try{return dynCall(e,t,r)}catch(s){if(stackRestore(_),s!==s+0)throw s;if(_setThrew(1,0),e[0]=="j")return 0n}},"createInvokeFunction"),resolveGlobalSymbol=a((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}},"resolveGlobalSymbol"),onPostCtors=[],addOnPostCtor=a(e=>onPostCtors.push(e),"addOnPostCtor"),UTF8ToString=a((e,t,r)=>e?UTF8ArrayToString(HEAPU8,e,t,r):"","UTF8ToString"),loadWebAssemblyModule=a((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,LE_HEAP_STORE_U32((handle+12>>2)*4,memoryBase),LE_HEAP_STORE_I32((handle+16>>2)*4,metadata.memorySize),LE_HEAP_STORE_U32((handle+20>>2)*4,tableBase),LE_HEAP_STORE_I32((handle+24>>2)*4,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}a(resolveSymbol,"resolveSymbol");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 _;e[t]=(...s)=>(_||=resolveSymbol(t),_(...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(a(addEmAsm,"addEmAsm"),"__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)}a(addEmJs,"addEmJs");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(a(postInstantiation,"postInstantiation"),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 a(loadModule,"loadModule"),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())},"loadWebAssemblyModule"),mergeLibSymbols=a((e,t)=>{for(var[r,_]of Object.entries(e)){let s=a(u=>{isSymbolDefined(u)||(wasmImports[u]=_)},"setImport");s(r);let o="__main_argc_argv";r=="main"&&s(o),r==o&&s("main")}},"mergeLibSymbols"),asyncLoad=a(async e=>{var t=await readAsync(e);return new Uint8Array(t)},"asyncLoad");function loadDynamicLibrary(e,t={global:!0,nodelete:!0},r,_){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++,_&&(LDSO.loadedLibsByHandle[_]=s),t.loadAsync?Promise.resolve(!0):!0;s=newDSO(e,_,"loading"),s.refcount=t.nodelete?1/0:1,s.global=t.global;function o(){if(_){var c=LE_HEAP_LOAD_U32((_+28>>2)*4),y=LE_HEAP_LOAD_U32((_+32>>2)*4);if(c&&y){var f=HEAP8.slice(c,c+y);return t.loadAsync?Promise.resolve(f):f}}var g=locateFile(e);if(t.loadAsync)return asyncLoad(g);if(!readBinary)throw new Error(`${g}: file not found, and synchronous loading of external files is not available`);return readBinary(g)}a(o,"loadLibData");function u(){return t.loadAsync?o().then(c=>loadWebAssemblyModule(c,t,e,r,_)):loadWebAssemblyModule(o(),t,e,r,_)}a(u,"getExports");function l(c){s.global?mergeLibSymbols(c,e):r&&Object.assign(r,c),s.exports=c}return a(l,"moduleLoaded"),t.loadAsync?u().then(c=>(l(c),!0)):(l(u()),!0)}a(loadDynamicLibrary,"loadDynamicLibrary");var reportUndefinedSymbols=a(()=>{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}`)}},"reportUndefinedSymbols"),runDependencies=0,dependenciesFulfilled=null,removeRunDependency=a(e=>{if(runDependencies--,Module.monitorRunDependencies?.(runDependencies),runDependencies==0&&dependenciesFulfilled){var t=dependenciesFulfilled;dependenciesFulfilled=null,t()}},"removeRunDependency"),addRunDependency=a(e=>{runDependencies++,Module.monitorRunDependencies?.(runDependencies)},"addRunDependency"),loadDylibs=a(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")},"loadDylibs"),noExitRuntime=!0;function setValue(e,t,r="i8"){switch(r.endsWith("*")&&(r="*"),r){case"i1":HEAP8[e]=t;break;case"i8":HEAP8[e]=t;break;case"i16":LE_HEAP_STORE_I16((e>>1)*2,t);break;case"i32":LE_HEAP_STORE_I32((e>>2)*4,t);break;case"i64":LE_HEAP_STORE_I64((e>>3)*8,BigInt(t));break;case"float":LE_HEAP_STORE_F32((e>>2)*4,t);break;case"double":LE_HEAP_STORE_F64((e>>3)*8,t);break;case"*":LE_HEAP_STORE_U32((e>>2)*4,t);break;default:abort(`invalid type for setValue: ${r}`)}}a(setValue,"setValue");var ___memory_base=new WebAssembly.Global({value:"i32",mutable:!1},1024),___stack_high=82496,___stack_low=16960,___stack_pointer=new WebAssembly.Global({value:"i32",mutable:!0},82496),___table_base=new WebAssembly.Global({value:"i32",mutable:!1},1),__abort_js=a(()=>abort(""),"__abort_js");__abort_js.sig="v";var getHeapMax=a(()=>2147483648,"getHeapMax"),growMemory=a(e=>{var t=wasmMemory.buffer.byteLength,r=(e-t+65535)/65536|0;try{return wasmMemory.grow(r),updateMemoryViews(),1}catch{}},"growMemory"),_emscripten_resize_heap=a(e=>{var t=HEAPU8.length;e>>>=0;var r=getHeapMax();if(e>r)return!1;for(var _=1;_<=4;_*=2){var s=t*(1+.2/_);s=Math.min(s,e+100663296);var o=Math.min(r,alignMemory(Math.max(e,s),65536)),u=growMemory(o);if(u)return!0}return!1},"_emscripten_resize_heap");_emscripten_resize_heap.sig="ip";var _fd_close=a(e=>52,"_fd_close");_fd_close.sig="ii";var INT53_MAX=9007199254740992,INT53_MIN=-9007199254740992,bigintToI53Checked=a(e=>e<INT53_MIN||e>INT53_MAX?NaN:Number(e),"bigintToI53Checked");function _fd_seek(e,t,r,_){return t=bigintToI53Checked(t),70}a(_fd_seek,"_fd_seek"),_fd_seek.sig="iijip";var printCharBuffers=[null,[],[]],printChar=a((e,t)=>{var r=printCharBuffers[e];t===0||t===10?((e===1?out:err)(UTF8ArrayToString(r)),r.length=0):r.push(t)},"printChar"),_fd_write=a((e,t,r,_)=>{for(var s=0,o=0;o<r;o++){var u=LE_HEAP_LOAD_U32((t>>2)*4),l=LE_HEAP_LOAD_U32((t+4>>2)*4);t+=8;for(var c=0;c<l;c++)printChar(e,HEAPU8[u+c]);s+=l}return LE_HEAP_STORE_U32((_>>2)*4,s),0},"_fd_write");_fd_write.sig="iippp";function _tree_sitter_log_callback(e,t){if(Module.currentLogCallback){let r=UTF8ToString(t);Module.currentLogCallback(r,e!==0)}}a(_tree_sitter_log_callback,"_tree_sitter_log_callback");function _tree_sitter_parse_callback(e,t,r,_,s){let u=Module.currentParseCallback(t,{row:r,column:_});typeof u=="string"?(setValue(s,u.length,"i32"),stringToUTF16(u,e,10240)):setValue(s,0,"i32")}a(_tree_sitter_parse_callback,"_tree_sitter_parse_callback");function _tree_sitter_progress_callback(e,t){return Module.currentProgressCallback?Module.currentProgressCallback({currentOffset:e,hasError:t!==0})===!0:!1}a(_tree_sitter_progress_callback,"_tree_sitter_progress_callback");function _tree_sitter_query_progress_callback(e){return Module.currentQueryProgressCallback?Module.currentQueryProgressCallback({currentOffset:e})===!0:!1}a(_tree_sitter_query_progress_callback,"_tree_sitter_query_progress_callback");var runtimeKeepaliveCounter=0,keepRuntimeAlive=a(()=>noExitRuntime||runtimeKeepaliveCounter>0,"keepRuntimeAlive"),_proc_exit=a(e=>{EXITSTATUS=e,keepRuntimeAlive()||(Module.onExit?.(e),ABORT=!0),quit_(e,new ExitStatus(e))},"_proc_exit");_proc_exit.sig="vi";var exitJS=a((e,t)=>{EXITSTATUS=e,_proc_exit(e)},"exitJS"),handleException=a(e=>{if(e instanceof ExitStatus||e=="unwind")return EXITSTATUS;quit_(1,e)},"handleException"),lengthBytesUTF8=a(e=>{for(var t=0,r=0;r<e.length;++r){var _=e.charCodeAt(r);_<=127?t++:_<=2047?t+=2:_>=55296&&_<=57343?(t+=4,++r):t+=3}return t},"lengthBytesUTF8"),stringToUTF8Array=a((e,t,r,_)=>{if(!(_>0))return 0;for(var s=r,o=r+_-1,u=0;u<e.length;++u){var l=e.codePointAt(u);if(l<=127){if(r>=o)break;t[r++]=l}else if(l<=2047){if(r+1>=o)break;t[r++]=192|l>>6,t[r++]=128|l&63}else if(l<=65535){if(r+2>=o)break;t[r++]=224|l>>12,t[r++]=128|l>>6&63,t[r++]=128|l&63}else{if(r+3>=o)break;t[r++]=240|l>>18,t[r++]=128|l>>12&63,t[r++]=128|l>>6&63,t[r++]=128|l&63,u++}}return t[r]=0,r-s},"stringToUTF8Array"),stringToUTF8=a((e,t,r)=>stringToUTF8Array(e,HEAPU8,t,r),"stringToUTF8"),stackAlloc=a(e=>__emscripten_stack_alloc(e),"stackAlloc"),stringToUTF8OnStack=a(e=>{var t=lengthBytesUTF8(e)+1,r=stackAlloc(t);return stringToUTF8(e,r,t),r},"stringToUTF8OnStack"),AsciiToString=a(e=>{for(var t="";;){var r=HEAPU8[e++];if(!r)return t;t+=String.fromCharCode(r)}},"AsciiToString"),stringToUTF16=a((e,t,r)=>{if(r??=2147483647,r<2)return 0;r-=2;for(var _=t,s=r<e.length*2?r/2:e.length,o=0;o<s;++o){var u=e.charCodeAt(o);LE_HEAP_STORE_I16((t>>1)*2,u),t+=2}return LE_HEAP_STORE_I16((t>>1)*2,0),t-_},"stringToUTF16");LE_ATOMICS_NATIVE_BYTE_ORDER=new Int8Array(new Int16Array([1]).buffer)[0]===1?[(e=>e),(e=>e),void 0,(e=>e)]:[(e=>e),(e=>((e&65280)<<8|(e&255)<<24)>>16),void 0,(e=>e>>24&255|e>>8&65280|(e&65280)<<8|(e&255)<<24)];function LE_HEAP_UPDATE(){HEAPU16.unsigned=(e=>e&65535),HEAPU32.unsigned=(e=>e>>>0)}if(a(LE_HEAP_UPDATE,"LE_HEAP_UPDATE"),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.setValue=setValue,Module.getValue=getValue,Module.UTF8ToString=UTF8ToString,Module.stringToUTF8=stringToUTF8,Module.lengthBytesUTF8=lengthBytesUTF8,Module.AsciiToString=AsciiToString,Module.stringToUTF16=stringToUTF16,Module.loadWebAssemblyModule=loadWebAssemblyModule,Module.LE_HEAP_STORE_I64=LE_HEAP_STORE_I64;var ASM_CONSTS={},_malloc,_calloc,_realloc,_free,_ts_range_edit,_ts_language_symbol_count,_ts_language_state_count,_ts_language_abi_version,_ts_language_name,_ts_language_field_count,_ts_language_next_state,_ts_language_symbol_name,_ts_language_symbol_for_name,_strncmp,_ts_language_symbol_type,_ts_language_field_name_for_id,_ts_lookahead_iterator_new,_ts_lookahead_iterator_delete,_ts_lookahead_iterator_reset_state,_ts_lookahead_iterator_reset,_ts_lookahead_iterator_next,_ts_lookahead_iterator_current_symbol,_ts_point_edit,_ts_parser_delete,_ts_parser_reset,_ts_parser_set_language,_ts_parser_set_included_ranges,_memcmp,_ts_query_new,_ts_query_delete,_iswspace,_iswalnum,_ts_query_copy,_ts_query_pattern_count,_ts_query_capture_count,_ts_query_string_count,_ts_query_capture_name_for_id,_ts_query_capture_quantifier_for_id,_ts_query_string_value_for_id,_ts_query_predicates_for_pattern,_ts_query_start_byte_for_pattern,_ts_query_end_byte_for_pattern,_ts_query_is_pattern_rooted,_ts_query_is_pattern_non_local,_ts_query_is_pattern_guaranteed_at_step,_ts_query_disable_capture,_ts_query_disable_pattern,_ts_tree_copy,_ts_tree_delete,_ts_init,_ts_parser_new_wasm,_ts_parser_enable_logger_wasm,_ts_parser_parse_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_edit_wasm,_ts_tree_included_ranges_wasm,_ts_tree_get_changed_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_type_id_wasm,_ts_tree_cursor_current_node_state_id_wasm,_ts_tree_cursor_current_node_is_named_wasm,_ts_tree_cursor_current_node_is_missing_wasm,_ts_tree_cursor_current_node_id_wasm,_ts_tree_cursor_start_position_wasm,_ts_tree_cursor_end_position_wasm,_ts_tree_cursor_start_index_wasm,_ts_tree_cursor_end_index_wasm,_ts_tree_cursor_current_field_id_wasm,_ts_tree_cursor_current_depth_wasm,_ts_tree_cursor_current_descendant_index_wasm,_ts_tree_cursor_current_node_wasm,_ts_node_symbol_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_start_point_wasm,_ts_node_end_point_wasm,_ts_node_start_index_wasm,_ts_node_end_index_wasm,_ts_node_to_string_wasm,_ts_node_children_wasm,_ts_node_named_children_wasm,_ts_node_descendants_of_type_wasm,_ts_node_is_named_wasm,_ts_node_has_changes_wasm,_ts_node_has_error_wasm,_ts_node_is_error_wasm,_ts_node_is_missing_wasm,_ts_node_is_extra_wasm,_ts_node_parse_state_wasm,_ts_node_next_parse_state_wasm,_ts_query_matches_wasm,_ts_query_captures_wasm,_memset,_memcpy,_memmove,_iswalpha,_iswblank,_iswdigit,_iswlower,_iswpunct,_iswupper,_iswxdigit,_memchr,_strlen,_strcmp,_strncat,_strncpy,_towlower,_towupper,_setThrew,__emscripten_stack_restore,__emscripten_stack_alloc,_emscripten_stack_get_current,___wasm_apply_data_relocs;function assignWasmExports(e){Module._malloc=_malloc=e.malloc,Module._calloc=_calloc=e.calloc,Module._realloc=_realloc=e.realloc,Module._free=_free=e.free,Module._ts_range_edit=_ts_range_edit=e.ts_range_edit,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_next_state=_ts_language_next_state=e.ts_language_next_state,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._ts_lookahead_iterator_new=_ts_lookahead_iterator_new=e.ts_lookahead_iterator_new,Module._ts_lookahead_iterator_delete=_ts_lookahead_iterator_delete=e.ts_lookahead_iterator_delete,Module._ts_lookahead_iterator_reset_state=_ts_lookahead_iterator_reset_state=e.ts_lookahead_iterator_reset_state,Module._ts_lookahead_iterator_reset=_ts_lookahead_iterator_reset=e.ts_lookahead_iterator_reset,Module._ts_lookahead_iterator_next=_ts_lookahead_iterator_next=e.ts_lookahead_iterator_next,Module._ts_lookahead_iterator_current_symbol=_ts_lookahead_iterator_current_symbol=e.ts_lookahead_iterator_current_symbol,Module._ts_point_edit=_ts_point_edit=e.ts_point_edit,Module._ts_parser_delete=_ts_parser_delete=e.ts_parser_delete,Module._ts_parser_reset=_ts_parser_reset=e.ts_parser_reset,Module._ts_parser_set_language=_ts_parser_set_language=e.ts_parser_set_language,Module._ts_parser_set_included_ranges=_ts_parser_set_included_ranges=e.ts_parser_set_included_ranges,Module._memcmp=_memcmp=e.memcmp,Module._ts_query_new=_ts_query_new=e.ts_query_new,Module._ts_query_delete=_ts_query_delete=e.ts_query_delete,Module._iswspace=_iswspace=e.iswspace,Module._iswalnum=_iswalnum=e.iswalnum,Module._ts_query_copy=_ts_query_copy=e.ts_query_copy,Module._ts_query_pattern_count=_ts_query_pattern_count=e.ts_query_pattern_count,Module._ts_query_capture_count=_ts_query_capture_count=e.ts_query_capture_count,Module._ts_query_string_count=_ts_query_string_count=e.ts_query_string_count,Module._ts_query_capture_name_for_id=_ts_query_capture_name_for_id=e.ts_query_capture_name_for_id,Module._ts_query_capture_quantifier_for_id=_ts_query_capture_quantifier_for_id=e.ts_query_capture_quantifier_for_id,Module._ts_query_string_value_for_id=_ts_query_string_value_for_id=e.ts_query_string_value_for_id,Module._ts_query_predicates_for_pattern=_ts_query_predicates_for_pattern=e.ts_query_predicates_for_pattern,Module._ts_query_start_byte_for_pattern=_ts_query_start_byte_for_pattern=e.ts_query_start_byte_for_pattern,Module._ts_query_end_byte_for_pattern=_ts_query_end_byte_for_pattern=e.ts_query_end_byte_for_pattern,Module._ts_query_is_pattern_rooted=_ts_query_is_pattern_rooted=e.ts_query_is_pattern_rooted,Module._ts_query_is_pattern_non_local=_ts_query_is_pattern_non_local=e.ts_query_is_pattern_non_local,Module._ts_query_is_pattern_guaranteed_at_step=_ts_query_is_pattern_guaranteed_at_step=e.ts_query_is_pattern_guaranteed_at_step,Module._ts_query_disable_capture=_ts_query_disable_capture=e.ts_query_disable_capture,Module._ts_query_disable_pattern=_ts_query_disable_pattern=e.ts_query_disable_pattern,Module._ts_tree_copy=_ts_tree_copy=e.ts_tree_copy,Module._ts_tree_delete=_ts_tree_delete=e.ts_tree_delete,Module._ts_init=_ts_init=e.ts_init,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_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_edit_wasm=_ts_tree_edit_wasm=e.ts_tree_edit_wasm,Module._ts_tree_included_ranges_wasm=_ts_tree_included_ranges_wasm=e.ts_tree_included_ranges_wasm,Module._ts_tree_get_changed_ranges_wasm=_ts_tree_get_changed_ranges_wasm=e.ts_tree_get_changed_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_type_id_wasm=_ts_tree_cursor_current_node_type_id_wasm=e.ts_tree_cursor_current_node_type_id_wasm,Module._ts_tree_cursor_current_node_state_id_wasm=_ts_tree_cursor_current_node_state_id_wasm=e.ts_tree_cursor_current_node_state_id_wasm,Module._ts_tree_cursor_current_node_is_named_wasm=_ts_tree_cursor_current_node_is_named_wasm=e.ts_tree_cursor_current_node_is_named_wasm,Module._ts_tree_cursor_current_node_is_missing_wasm=_ts_tree_cursor_current_node_is_missing_wasm=e.ts_tree_cursor_current_node_is_missing_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_start_index_wasm=_ts_tree_cursor_start_index_wasm=e.ts_tree_cursor_start_index_wasm,Module._ts_tree_cursor_end_index_wasm=_ts_tree_cursor_end_index_wasm=e.ts_tree_cursor_end_index_wasm,Module._ts_tree_cursor_current_field_id_wasm=_ts_tree_cursor_current_field_id_wasm=e.ts_tree_cursor_current_field_id_wasm,Module._ts_tree_cursor_current_depth_wasm=_ts_tree_cursor_current_depth_wasm=e.ts_tree_cursor_current_depth_wasm,Module._ts_tree_cursor_current_descendant_index_wasm=_ts_tree_cursor_current_descendant_index_wasm=e.ts_tree_cursor_current_descendant_index_wasm,Module._ts_tree_cursor_current_node_wasm=_ts_tree_cursor_current_node_wasm=e.ts_tree_cursor_current_node_wasm,Module._ts_node_symbol_wasm=_ts_node_symbol_wasm=e.ts_node_symbol_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_start_point_wasm=_ts_node_start_point_wasm=e.ts_node_start_point_wasm,Module._ts_node_end_point_wasm=_ts_node_end_point_wasm=e.ts_node_end_point_wasm,Module._ts_node_start_index_wasm=_ts_node_start_index_wasm=e.ts_node_start_index_wasm,Module._ts_node_end_index_wasm=_ts_node_end_index_wasm=e.ts_node_end_index_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._ts_node_is_named_wasm=_ts_node_is_named_wasm=e.ts_node_is_named_wasm,Module._ts_node_has_changes_wasm=_ts_node_has_changes_wasm=e.ts_node_has_changes_wasm,Module._ts_node_has_error_wasm=_ts_node_has_error_wasm=e.ts_node_has_error_wasm,Module._ts_node_is_error_wasm=_ts_node_is_error_wasm=e.ts_node_is_error_wasm,Module._ts_node_is_missing_wasm=_ts_node_is_missing_wasm=e.ts_node_is_missing_wasm,Module._ts_node_is_extra_wasm=_ts_node_is_extra_wasm=e.ts_node_is_extra_wasm,Module._ts_node_parse_state_wasm=_ts_node_parse_state_wasm=e.ts_node_parse_state_wasm,Module._ts_node_next_parse_state_wasm=_ts_node_next_parse_state_wasm=e.ts_node_next_parse_state_wasm,Module._ts_query_matches_wasm=_ts_query_matches_wasm=e.ts_query_matches_wasm,Module._ts_query_captures_wasm=_ts_query_captures_wasm=e.ts_query_captures_wasm,Module._memset=_memset=e.memset,Module._memcpy=_memcpy=e.memcpy,Module._memmove=_memmove=e.memmove,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._iswupper=_iswupper=e.iswupper,Module._iswxdigit=_iswxdigit=e.iswxdigit,Module._memchr=_memchr=e.memchr,Module._strlen=_strlen=e.strlen,Module._strcmp=_strcmp=e.strcmp,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}a(assignWasmExports,"assignWasmExports");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,_abort_js:__abort_js,emscripten_resize_heap:_emscripten_resize_heap,fd_close:_fd_close,fd_seek:_fd_seek,fd_write:_fd_write,memory:wasmMemory,tree_sitter_log_callback:_tree_sitter_log_callback,tree_sitter_parse_callback:_tree_sitter_parse_callback,tree_sitter_progress_callback:_tree_sitter_progress_callback,tree_sitter_query_progress_callback:_tree_sitter_query_progress_callback};function callMain(e=[]){var t=resolveGlobalSymbol("main").sym;if(t){e.unshift(thisProgram);var r=e.length,_=stackAlloc((r+1)*4),s=_;e.forEach(u=>{LE_HEAP_STORE_U32((s>>2)*4,stringToUTF8OnStack(u)),s+=4}),LE_HEAP_STORE_U32((s>>2)*4,0);try{var o=t(r,_);return exitJS(o,!0),o}catch(u){return handleException(u)}}}a(callMain,"callMain");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()}}a(t,"doRun"),Module.setStatus?(Module.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>Module.setStatus(""),1),t()},1)):t()}a(run,"run");var wasmExports;return wasmExports=await createWasm(),run(),runtimeInitialized?moduleRtn=Module:moduleRtn=new Promise((e,t)=>{readyPromiseResolve=e,readyPromiseReject=t}),moduleRtn}a(Ne,"Module");var ue=Ne;var re=null;async function Ee(e){if(re)return re;let{wasmModule:t,...r}=e??{};if(!t)return re??=await ue(r);let _=new Promise((s,o)=>{r.instantiateWasm=(u,l)=>(WebAssembly.instantiate(t,u).then(c=>{l(c,t)}).catch(o),{})});return re??=await Promise.race([ue(r),_])}a(Ee,"initializeBinding");function Ae(){return!!re}a(Ae,"checkModule");var d,se;function de(e){let t=n._ts_language_abi_version(e[0]);if(t!==se)throw new Error(`Incompatible language version 0x${(t>>>0).toString(16)}. Expected 0x${se.toString(16)}.`)}a(de,"assertSupportedLanguage");var Te,Ie=H(e=>{n._ts_parser_delete(e[0]),n._free(e[1])}),le=class{static{a(this,"Parser")}0=0;1=0;logCallback=null;language=null;static async init(t){he(await Ee(t)),d=n._ts_init(),se=n.getValue(d,"i32"),Te=n.getValue(d+m,"i32")}constructor(){this.initialize(),Ie?.register(this,[this[0],this[1]],this)}initialize(){if(!Ae())throw new Error("cannot construct a Parser before calling `init()`");n._ts_parser_new_wasm(),this[0]=n.getValue(d,"i32"),this[1]=n.getValue(d+m,"i32")}delete(){Ie?.unregister(this),n._ts_parser_delete(this[0]),n._free(this[1]),this[0]=0,this[1]=0}setLanguage(t){let r;if(!t)r=0,this.language=null;else if(t.constructor===Z)r=t[0],de(t),this.language=t;else throw new Error("Argument must be a Language");return n._ts_parser_set_language(this[0],r),this}parse(t,r,_){if(typeof t=="string")n.currentParseCallback=c=>t.slice(c);else if(typeof t=="function")n.currentParseCallback=t;else throw new Error("Argument must be a string or a function");_?.progressCallback?n.currentProgressCallback=_.progressCallback:n.currentProgressCallback=null,this.logCallback?(n.currentLogCallback=this.logCallback,n._ts_parser_enable_logger_wasm(this[0],1)):(n.currentLogCallback=null,n._ts_parser_enable_logger_wasm(this[0],0));let s=0,o=0;if(_?.includedRanges){s=_.includedRanges.length,o=n._calloc(s,j);let c=o;for(let y=0;y<s;y++)Pe(c,_.includedRanges[y]),c+=j}let u=n._ts_parser_parse_wasm(this[0],this[1],r?r[0]:0,o,s);if(!u)return n.currentParseCallback=null,n.currentLogCallback=null,n.currentProgressCallback=null,null;if(!this.language)throw new Error("Parser must have a language to parse");let l=new Y(F,u,this.language,n.currentParseCallback);return n.currentParseCallback=null,n.currentLogCallback=null,n.currentProgressCallback=null,l}reset(){n._ts_parser_reset(this[0])}getIncludedRanges(){n._ts_parser_included_ranges_wasm(this[0]);let t=n.getValue(d,"i32"),r=n.getValue(d+m,"i32"),_=new Array(t);if(t>0){let s=r;for(let o=0;o<t;o++)_[o]=J(s),s+=j;n._free(r)}return _}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}};var xe=1,Le=2,ke=/[\w-]+/g,Oe={Zero:0,ZeroOrOne:1,ZeroOrMore:2,One:3,OneOrMore:4},Se=a(e=>e.type==="capture","isCaptureStep"),me=a(e=>e.type==="string","isStringStep"),U={Syntax:1,NodeName:2,FieldName:3,CaptureName:4,PatternStructure:5},z=class e extends Error{constructor(r,_,s,o){super(e.formatMessage(r,_));this.kind=r;this.info=_;this.index=s;this.length=o;this.name="QueryError"}kind;info;index;length;static{a(this,"QueryError")}static formatMessage(r,_){switch(r){case U.NodeName:return`Bad node name '${_.word}'`;case U.FieldName:return`Bad field name '${_.word}'`;case U.CaptureName:return`Bad capture name @${_.word}`;case U.PatternStructure:return`Bad pattern structure at offset ${_.suffix}`;case U.Syntax:return`Bad syntax at offset ${_.suffix}`}}};function Ue(e,t,r,_){if(e.length!==3)throw new Error(`Wrong number of arguments to \`#${r}\` predicate. Expected 2, got ${e.length-1}`);if(!Se(e[1]))throw new Error(`First argument of \`#${r}\` predicate must be a capture. Got "${e[1].value}"`);let s=r==="eq?"||r==="any-eq?",o=!r.startsWith("any-");if(Se(e[2])){let u=e[1].name,l=e[2].name;_[t].push(c=>{let y=[],f=[];for(let v of c)v.name===u&&y.push(v.node),v.name===l&&f.push(v.node);let g=a((v,b,N)=>N?v.text===b.text:v.text!==b.text,"compare");return o?y.every(v=>f.some(b=>g(v,b,s))):y.some(v=>f.some(b=>g(v,b,s)))})}else{let u=e[1].name,l=e[2].value,c=a(f=>f.text===l,"matches"),y=a(f=>f.text!==l,"doesNotMatch");_[t].push(f=>{let g=[];for(let b of f)b.name===u&&g.push(b.node);let v=s?c:y;return o?g.every(v):g.some(v)})}}a(Ue,"parseAnyPredicate");function Ve(e,t,r,_){if(e.length!==3)throw new Error(`Wrong number of arguments to \`#${r}\` predicate. Expected 2, got ${e.length-1}.`);if(e[1].type!=="capture")throw new Error(`First argument of \`#${r}\` predicate must be a capture. Got "${e[1].value}".`);if(e[2].type!=="string")throw new Error(`Second argument of \`#${r}\` predicate must be a string. Got @${e[2].name}.`);let s=r==="match?"||r==="any-match?",o=!r.startsWith("any-"),u=e[1].name,l=new RegExp(e[2].value);_[t].push(c=>{let y=[];for(let g of c)g.name===u&&y.push(g.node.text);let f=a((g,v)=>v?l.test(g):!l.test(g),"test");return y.length===0?!s:o?y.every(g=>f(g,s)):y.some(g=>f(g,s))})}a(Ve,"parseMatchPredicate");function qe(e,t,r,_){if(e.length<2)throw new Error(`Wrong number of arguments to \`#${r}\` predicate. Expected at least 1. Got ${e.length-1}.`);if(e[1].type!=="capture")throw new Error(`First argument of \`#${r}\` predicate must be a capture. Got "${e[1].value}".`);let s=r==="any-of?",o=e[1].name,u=e.slice(2);if(!u.every(me))throw new Error(`Arguments to \`#${r}\` predicate must be strings.".`);let l=u.map(c=>c.value);_[t].push(c=>{let y=[];for(let f of c)f.name===o&&y.push(f.node.text);return y.length===0?!s:y.every(f=>l.includes(f))===s})}a(qe,"parseAnyOfPredicate");function De(e,t,r,_,s){if(e.length<2||e.length>3)throw new Error(`Wrong number of arguments to \`#${r}\` predicate. Expected 1 or 2. Got ${e.length-1}.`);if(!e.every(me))throw new Error(`Arguments to \`#${r}\` predicate must be strings.".`);let o=r==="is?"?_:s;o[t]||(o[t]={}),o[t][e[1].value]=e[2]?.value??null}a(De,"parseIsPredicate");function He(e,t,r){if(e.length<2||e.length>3)throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${e.length-1}.`);if(!e.every(me))throw new Error('Arguments to `#set!` predicate must be strings.".');r[t]||(r[t]={}),r[t][e[1].value]=e[2]?.value??null}a(He,"parseSetDirective");function We(e,t,r,_,s,o,u,l,c,y,f){if(t===xe){let g=_[r];o.push({type:"capture",name:g})}else if(t===Le)o.push({type:"string",value:s[r]});else if(o.length>0){if(o[0].type!=="string")throw new Error("Predicates must begin with a literal value");let g=o[0].value;switch(g){case"any-not-eq?":case"not-eq?":case"any-eq?":case"eq?":Ue(o,e,g,u);break;case"any-not-match?":case"not-match?":case"any-match?":case"match?":Ve(o,e,g,u);break;case"not-any-of?":case"any-of?":qe(o,e,g,u);break;case"is?":case"is-not?":De(o,e,g,y,f);break;case"set!":He(o,e,c);break;default:l[e].push({operator:g,operands:o.slice(1)})}o.length=0}}a(We,"parsePattern");var Re=H(e=>{n._ts_query_delete(e)}),ce=class{static{a(this,"Query")}0=0;exceededMatchLimit;textPredicates;captureNames;captureQuantifiers;predicates;setProperties;assertedProperties;refutedProperties;matchLimit;constructor(t,r){de(t);let _=n.lengthBytesUTF8(r),s=n._malloc(_+1);n.stringToUTF8(r,s,_+1);let o=n._ts_query_new(t[0],s,_,d,d+m);if(!o){let p=n.getValue(d+m,"i32"),A=n.getValue(d,"i32"),w=n.UTF8ToString(s,A).length,R=r.slice(w,w+100).split(`
5
- `)[0],M=R.match(ke)?.[0]??"";switch(n._free(s),p){case U.Syntax:throw new z(U.Syntax,{suffix:`${w}: '${R}'...`},w,0);case U.NodeName:throw new z(p,{word:M},w,M.length);case U.FieldName:throw new z(p,{word:M},w,M.length);case U.CaptureName:throw new z(p,{word:M},w,M.length);case U.PatternStructure:throw new z(p,{suffix:`${w}: '${R}'...`},w,0)}}let u=n._ts_query_string_count(o),l=n._ts_query_capture_count(o),c=n._ts_query_pattern_count(o),y=new Array(l),f=new Array(c),g=new Array(u);for(let p=0;p<l;p++){let A=n._ts_query_capture_name_for_id(o,p,d),w=n.getValue(d,"i32");y[p]=n.UTF8ToString(A,w)}for(let p=0;p<c;p++){let A=new Array(l);for(let w=0;w<l;w++){let R=n._ts_query_capture_quantifier_for_id(o,p,w);A[w]=R}f[p]=A}for(let p=0;p<u;p++){let A=n._ts_query_string_value_for_id(o,p,d),w=n.getValue(d,"i32");g[p]=n.UTF8ToString(A,w)}let v=new Array(c),b=new Array(c),N=new Array(c),x=new Array(c),V=new Array(c);for(let p=0;p<c;p++){let A=n._ts_query_predicates_for_pattern(o,p,d),w=n.getValue(d,"i32");x[p]=[],V[p]=[];let R=new Array,M=A;for(let L=0;L<w;L++){let W=n.getValue(M,"i32");M+=m;let T=n.getValue(M,"i32");M+=m,We(p,W,T,y,g,R,V,x,v,b,N)}Object.freeze(V[p]),Object.freeze(x[p]),Object.freeze(v[p]),Object.freeze(b[p]),Object.freeze(N[p])}n._free(s),this[0]=o,this.captureNames=y,this.captureQuantifiers=f,this.textPredicates=V,this.predicates=x,this.setProperties=v,this.assertedProperties=b,this.refutedProperties=N,this.exceededMatchLimit=!1,Re?.register(this,o,this)}delete(){Re?.unregister(this),n._ts_query_delete(this[0]),this[0]=0}matches(t,r={}){let _=r.startPosition??S,s=r.endPosition??S,o=r.startIndex??0,u=r.endIndex??0,l=r.startContainingPosition??S,c=r.endContainingPosition??S,y=r.startContainingIndex??0,f=r.endContainingIndex??0,g=r.matchLimit??4294967295,v=r.maxStartDepth??4294967295,b=r.progressCallback;if(typeof g!="number")throw new Error("Arguments must be numbers");if(this.matchLimit=g,u!==0&&o>u)throw new Error("`startIndex` cannot be greater than `endIndex`");if(s!==S&&(_.row>s.row||_.row===s.row&&_.column>s.column))throw new Error("`startPosition` cannot be greater than `endPosition`");if(f!==0&&y>f)throw new Error("`startContainingIndex` cannot be greater than `endContainingIndex`");if(c!==S&&(l.row>c.row||l.row===c.row&&l.column>c.column))throw new Error("`startContainingPosition` cannot be greater than `endContainingPosition`");b&&(n.currentQueryProgressCallback=b),h(t),n._ts_query_matches_wasm(this[0],t.tree[0],_.row,_.column,s.row,s.column,o,u,l.row,l.column,c.row,c.column,y,f,g,v);let N=n.getValue(d,"i32"),x=n.getValue(d+m,"i32"),V=n.getValue(d+2*m,"i32"),p=new Array(N);this.exceededMatchLimit=!!V;let A=0,w=x;for(let R=0;R<N;R++){let M=n.getValue(w,"i32");w+=m;let L=n.getValue(w,"i32");w+=m;let W=new Array(L);if(w=ie(this,t.tree,w,M,W),this.textPredicates[M].every(T=>T(W))){p[A]={patternIndex:M,captures:W};let T=this.setProperties[M];p[A].setProperties=T;let Q=this.assertedProperties[M];p[A].assertedProperties=Q;let G=this.refutedProperties[M];p[A].refutedProperties=G,A++}}return p.length=A,n._free(x),n.currentQueryProgressCallback=null,p}captures(t,r={}){let _=r.startPosition??S,s=r.endPosition??S,o=r.startIndex??0,u=r.endIndex??0,l=r.startContainingPosition??S,c=r.endContainingPosition??S,y=r.startContainingIndex??0,f=r.endContainingIndex??0,g=r.matchLimit??4294967295,v=r.maxStartDepth??4294967295,b=r.progressCallback;if(typeof g!="number")throw new Error("Arguments must be numbers");if(this.matchLimit=g,u!==0&&o>u)throw new Error("`startIndex` cannot be greater than `endIndex`");if(s!==S&&(_.row>s.row||_.row===s.row&&_.column>s.column))throw new Error("`startPosition` cannot be greater than `endPosition`");if(f!==0&&y>f)throw new Error("`startContainingIndex` cannot be greater than `endContainingIndex`");if(c!==S&&(l.row>c.row||l.row===c.row&&l.column>c.column))throw new Error("`startContainingPosition` cannot be greater than `endContainingPosition`");b&&(n.currentQueryProgressCallback=b),h(t),n._ts_query_captures_wasm(this[0],t.tree[0],_.row,_.column,s.row,s.column,o,u,l.row,l.column,c.row,c.column,y,f,g,v);let N=n.getValue(d,"i32"),x=n.getValue(d+m,"i32"),V=n.getValue(d+2*m,"i32"),p=new Array;this.exceededMatchLimit=!!V;let A=new Array,w=x;for(let R=0;R<N;R++){let M=n.getValue(w,"i32");w+=m;let L=n.getValue(w,"i32");w+=m;let W=n.getValue(w,"i32");if(w+=m,A.length=L,w=ie(this,t.tree,w,M,A),this.textPredicates[M].every(T=>T(A))){let T=A[W],Q=this.setProperties[M];T.setProperties=Q;let G=this.assertedProperties[M];T.assertedProperties=G;let ge=this.refutedProperties[M];T.refutedProperties=ge,p.push(T)}}return n._free(x),n.currentQueryProgressCallback=null,p}predicatesForPattern(t){return this.predicates[t]}disableCapture(t){let r=n.lengthBytesUTF8(t),_=n._malloc(r+1);n.stringToUTF8(t,_,r+1),n._ts_query_disable_capture(this[0],_,r),n._free(_)}disablePattern(t){if(t>=this.predicates.length)throw new Error(`Pattern index is ${t} but the pattern count is ${this.predicates.length}`);n._ts_query_disable_pattern(this[0],t)}didExceedMatchLimit(){return this.exceededMatchLimit}startIndexForPattern(t){if(t>=this.predicates.length)throw new Error(`Pattern index is ${t} but the pattern count is ${this.predicates.length}`);return n._ts_query_start_byte_for_pattern(this[0],t)}endIndexForPattern(t){if(t>=this.predicates.length)throw new Error(`Pattern index is ${t} but the pattern count is ${this.predicates.length}`);return n._ts_query_end_byte_for_pattern(this[0],t)}patternCount(){return n._ts_query_pattern_count(this[0])}captureIndexForName(t){return this.captureNames.indexOf(t)}isPatternRooted(t){return n._ts_query_is_pattern_rooted(this[0],t)===1}isPatternNonLocal(t){return n._ts_query_is_pattern_non_local(this[0],t)===1}isPatternGuaranteedAtStep(t){return n._ts_query_is_pattern_guaranteed_at_step(this[0],t)===1}};export{Oe as CaptureQuantifier,ae as Edit,se as LANGUAGE_VERSION,Z as Language,X as LookaheadIterator,Te as MIN_COMPATIBLE_VERSION,te as Node,le as Parser,ce as Query,Y as Tree,ee as TreeCursor};
3
+ ${l}`)}let o=s.clone();try{r=await WebAssembly.compileStreaming(s)}catch(l){console.error("wasm streaming compile failed:",l),console.error("falling back to ArrayBuffer instantiation"),r=new Uint8Array(await o.arrayBuffer())}}let _=await n.loadWebAssemblyModule(r,{loadAsync:!0});return Ee(_,{sync:!1})}static loadSync(t){let r=n.loadWebAssemblyModule(t,{loadAsync:!1});return Ee(r,{sync:!0})}};function Ee(e,{sync:t}){let r=Object.keys(e),_=r.find(o=>Ne.test(o)&&!o.includes("external_scanner_"));if(!_)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[_]();return new Z(F,s)}a(Ee,"loadFromWasmExports");async function xe(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.currentQueryProgressCallback=null,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_=a((e,t)=>{throw t},"quit_"),_scriptName=import.meta.url,scriptDirectory="";function locateFile(e){return Module.locateFile?Module.locateFile(e,scriptDirectory):scriptDirectory+e}a(locateFile,"locateFile");var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require("fs");_scriptName.startsWith("file:")&&(scriptDirectory=require("path").dirname(require("url").fileURLToPath(_scriptName))+"/"),readBinary=a(e=>{e=isFileURI(e)?new URL(e):e;var t=fs.readFileSync(e);return t},"readBinary"),readAsync=a(async(e,t=!0)=>{e=isFileURI(e)?new URL(e):e;var r=fs.readFileSync(e,t?void 0:"utf8");return r},"readAsync"),process.argv.length>1&&(thisProgram=process.argv[1].replace(/\\/g,"/")),arguments_=process.argv.slice(2),quit_=a((e,t)=>{throw process.exitCode=e,t},"quit_")}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){try{scriptDirectory=new URL(".",_scriptName).href}catch{}ENVIRONMENT_IS_WORKER&&(readBinary=a(e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)},"readBinary")),readAsync=a(async e=>{if(isFileURI(e))return new Promise((r,_)=>{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}_(s.status)},s.onerror=_,s.send(null)});var t=await fetch(e,{credentials:"same-origin"});if(t.ok)return t.arrayBuffer();throw new Error(t.status+" : "+t.url)},"readAsync")}var out=console.log.bind(console),err=console.error.bind(console),dynamicLibraries=[],wasmBinary,ABORT=!1,EXITSTATUS,isFileURI=a(e=>e.startsWith("file://"),"isFileURI"),readyPromiseResolve,readyPromiseReject,wasmMemory,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,HEAP64,HEAPU64,HEAP_DATA_VIEW,runtimeInitialized=!1;function updateMemoryViews(){var e=wasmMemory.buffer;Module.HEAP8=HEAP8=new Int8Array(e),Module.HEAP16=HEAP16=new Int16Array(e),Module.HEAPU8=HEAPU8=new Uint8Array(e),Module.HEAPU16=HEAPU16=new Uint16Array(e),Module.HEAP32=HEAP32=new Int32Array(e),Module.HEAPU32=HEAPU32=new Uint32Array(e),Module.HEAPF32=HEAPF32=new Float32Array(e),Module.HEAPF64=HEAPF64=new Float64Array(e),Module.HEAP64=HEAP64=new BigInt64Array(e),Module.HEAPU64=HEAPU64=new BigUint64Array(e),Module.HEAP_DATA_VIEW=HEAP_DATA_VIEW=new DataView(e),LE_HEAP_UPDATE()}a(updateMemoryViews,"updateMemoryViews");function initMemory(){if(Module.wasmMemory)wasmMemory=Module.wasmMemory;else{var e=Module.INITIAL_MEMORY||33554432;wasmMemory=new WebAssembly.Memory({initial:e/65536,maximum:32768})}updateMemoryViews()}a(initMemory,"initMemory");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)}a(preRun,"preRun");function initRuntime(){runtimeInitialized=!0,callRuntimeCallbacks(__RELOC_FUNCS__),wasmExports.__wasm_call_ctors(),callRuntimeCallbacks(onPostCtors)}a(initRuntime,"initRuntime");function preMain(){}a(preMain,"preMain");function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(onPostRuns)}a(postRun,"postRun");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}a(abort,"abort");var wasmBinaryFile;function findWasmBinary(){return Module.locateFile?locateFile("web-tree-sitter.wasm"):new URL("web-tree-sitter.wasm",import.meta.url).href}a(findWasmBinary,"findWasmBinary");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"}a(getBinarySync,"getBinarySync");async function getWasmBinary(e){if(!wasmBinary)try{var t=await readAsync(e);return new Uint8Array(t)}catch{}return getBinarySync(e)}a(getWasmBinary,"getWasmBinary");async function instantiateArrayBuffer(e,t){try{var r=await getWasmBinary(e),_=await WebAssembly.instantiate(r,t);return _}catch(s){err(`failed to asynchronously prepare wasm: ${s}`),abort(s)}}a(instantiateArrayBuffer,"instantiateArrayBuffer");async function instantiateAsync(e,t,r){if(!e&&!isFileURI(t)&&!ENVIRONMENT_IS_NODE)try{var _=fetch(t,{credentials:"same-origin"}),s=await WebAssembly.instantiateStreaming(_,r);return s}catch(o){err(`wasm streaming compile failed: ${o}`),err("falling back to ArrayBuffer instantiation")}return instantiateArrayBuffer(t,r)}a(instantiateAsync,"instantiateAsync");function getWasmImports(){return{env:wasmImports,wasi_snapshot_preview1:wasmImports,"GOT.mem":new Proxy(wasmImports,GOTHandler),"GOT.func":new Proxy(wasmImports,GOTHandler)}}a(getWasmImports,"getWasmImports");async function createWasm(){function e(o,l){wasmExports=o.exports,wasmExports=relocateExports(wasmExports,1024);var u=getDylinkMetadata(l);u.neededDynlibs&&(dynamicLibraries=u.neededDynlibs.concat(dynamicLibraries));let c={malloc:wasmExports.ts_scanner_malloc_wasm,calloc:wasmExports.ts_scanner_calloc_wasm,realloc:wasmExports.ts_scanner_realloc_wasm};return Object.assign(wasmImports,c),updateGOT(c,!0),mergeLibSymbols(wasmExports,"main"),LDSO.init(),loadDylibs(),__RELOC_FUNCS__.push(wasmExports.__wasm_apply_data_relocs),assignWasmExports(wasmExports),wasmExports}a(e,"receiveInstance");function t(o){return e(o.instance,o.module)}a(t,"receiveInstantiationResult");var r=getWasmImports();if(Module.instantiateWasm)return new Promise((o,l)=>{Module.instantiateWasm(r,(u,c)=>{o(e(u,c))})});wasmBinaryFile??=findWasmBinary();var _=await instantiateAsync(wasmBinary,wasmBinaryFile,r),s=t(_);return s}a(createWasm,"createWasm");class ExitStatus{static{a(this,"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}},LE_ATOMICS_NATIVE_BYTE_ORDER=[],LE_HEAP_LOAD_F32=a(e=>HEAP_DATA_VIEW.getFloat32(e,!0),"LE_HEAP_LOAD_F32"),LE_HEAP_LOAD_F64=a(e=>HEAP_DATA_VIEW.getFloat64(e,!0),"LE_HEAP_LOAD_F64"),LE_HEAP_LOAD_I16=a(e=>HEAP_DATA_VIEW.getInt16(e,!0),"LE_HEAP_LOAD_I16"),LE_HEAP_LOAD_I32=a(e=>HEAP_DATA_VIEW.getInt32(e,!0),"LE_HEAP_LOAD_I32"),LE_HEAP_LOAD_I64=a(e=>HEAP_DATA_VIEW.getBigInt64(e,!0),"LE_HEAP_LOAD_I64"),LE_HEAP_LOAD_U32=a(e=>HEAP_DATA_VIEW.getUint32(e,!0),"LE_HEAP_LOAD_U32"),LE_HEAP_STORE_F32=a((e,t)=>HEAP_DATA_VIEW.setFloat32(e,t,!0),"LE_HEAP_STORE_F32"),LE_HEAP_STORE_F64=a((e,t)=>HEAP_DATA_VIEW.setFloat64(e,t,!0),"LE_HEAP_STORE_F64"),LE_HEAP_STORE_I16=a((e,t)=>HEAP_DATA_VIEW.setInt16(e,t,!0),"LE_HEAP_STORE_I16"),LE_HEAP_STORE_I32=a((e,t)=>HEAP_DATA_VIEW.setInt32(e,t,!0),"LE_HEAP_STORE_I32"),LE_HEAP_STORE_I64=a((e,t)=>HEAP_DATA_VIEW.setBigInt64(e,t,!0),"LE_HEAP_STORE_I64"),LE_HEAP_STORE_U32=a((e,t)=>HEAP_DATA_VIEW.setUint32(e,t,!0),"LE_HEAP_STORE_U32"),callRuntimeCallbacks=a(e=>{for(;e.length>0;)e.shift()(Module)},"callRuntimeCallbacks"),onPostRuns=[],addOnPostRun=a(e=>onPostRuns.push(e),"addOnPostRun"),onPreRuns=[],addOnPreRun=a(e=>onPreRuns.push(e),"addOnPreRun"),UTF8Decoder=typeof TextDecoder<"u"?new TextDecoder:void 0,findStringEnd=a((e,t,r,_)=>{var s=t+r;if(_)return s;for(;e[t]&&!(t>=s);)++t;return t},"findStringEnd"),UTF8ArrayToString=a((e,t=0,r,_)=>{var s=findStringEnd(e,t,r,_);if(s-t>16&&e.buffer&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(t,s));for(var o="";t<s;){var l=e[t++];if(!(l&128)){o+=String.fromCharCode(l);continue}var u=e[t++]&63;if((l&224)==192){o+=String.fromCharCode((l&31)<<6|u);continue}var c=e[t++]&63;if((l&240)==224?l=(l&15)<<12|u<<6|c:l=(l&7)<<18|u<<12|c<<6|e[t++]&63,l<65536)o+=String.fromCharCode(l);else{var w=l-65536;o+=String.fromCharCode(55296|w>>10,56320|w&1023)}}return o},"UTF8ArrayToString"),getDylinkMetadata=a(e=>{var t=0,r=0;function _(){return e[t++]}a(_,"getU8");function s(){for(var q=0,$=1;;){var he=e[t++];if(q+=(he&127)*$,$*=128,!(he&128))break}return q}a(s,"getLEB");function o(){var q=s();return t+=q,UTF8ArrayToString(e,t-q,q)}a(o,"getString");function l(){for(var q=s(),$=[];q--;)$.push(o());return $}a(l,"getStringList");function u(q,$){if(q)throw new Error($)}if(a(u,"failIf"),e instanceof WebAssembly.Module){var c=WebAssembly.Module.customSections(e,"dylink.0");u(c.length===0,"need dylink section"),e=new Uint8Array(c[0]),r=e.length}else{var w=new Uint32Array(new Uint8Array(e.subarray(0,24)).buffer),f=w[0]==1836278016||w[0]==6386541;u(!f,"need to see wasm magic number"),u(e[8]!==0,"need the dylink section to be first"),t=9;var g=s();r=t+g;var v=o();u(v!=="dylink.0")}for(var b={neededDynlibs:[],tlsExports:new Set,weakImports:new Set,runtimePaths:[]},N=1,x=2,V=3,p=4,A=5,y=256,R=3,M=1;t<r;){var k=_(),H=s();if(k===N)b.memorySize=s(),b.memoryAlign=s(),b.tableSize=s(),b.tableAlign=s();else if(k===x)b.neededDynlibs=l();else if(k===V)for(var T=s();T--;){var B=o(),G=s();G&y&&b.tlsExports.add(B)}else if(k===p)for(var T=s();T--;){var fe=o(),B=o(),G=s();(G&R)==M&&b.weakImports.add(B)}else k===A?b.runtimePaths=l():t+=H}return b},"getDylinkMetadata");function getValue(e,t="i8"){switch(t.endsWith("*")&&(t="*"),t){case"i1":return HEAP8[e];case"i8":return HEAP8[e];case"i16":return LE_HEAP_LOAD_I16((e>>1)*2);case"i32":return LE_HEAP_LOAD_I32((e>>2)*4);case"i64":return LE_HEAP_LOAD_I64((e>>3)*8);case"float":return LE_HEAP_LOAD_F32((e>>2)*4);case"double":return LE_HEAP_LOAD_F64((e>>3)*8);case"*":return LE_HEAP_LOAD_U32((e>>2)*4);default:abort(`invalid type for getValue: ${t}`)}}a(getValue,"getValue");var newDSO=a((e,t,r)=>{var _={refcount:1/0,name:e,exports:r,global:!0};return LDSO.loadedLibsByName[e]=_,t!=null&&(LDSO.loadedLibsByHandle[t]=_),_},"newDSO"),LDSO={loadedLibsByName:{},loadedLibsByHandle:{},init(){newDSO("__main__",0,wasmImports)}},___heap_base=82496,alignMemory=a((e,t)=>Math.ceil(e/t)*t,"alignMemory"),getMemory=a(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},"getMemory"),isInternalSym=a(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__"),"isInternalSym"),uleb128EncodeWithLen=a(e=>{let t=e.length;return[t%128|128,t>>7,...e]},"uleb128EncodeWithLen"),wasmTypeCodes={i:127,p:127,j:126,f:125,d:124,e:111},generateTypePack=a(e=>uleb128EncodeWithLen(Array.from(e,t=>{var r=wasmTypeCodes[t];return r})),"generateTypePack"),convertJsFunctionToWasm=a((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),_=new WebAssembly.Module(r),s=new WebAssembly.Instance(_,{e:{f:e}}),o=s.exports.f;return o},"convertJsFunctionToWasm"),wasmTableMirror=[],wasmTable=new WebAssembly.Table({initial:53,element:"anyfunc"}),getWasmTableEntry=a(e=>{var t=wasmTableMirror[e];return t||(wasmTableMirror[e]=t=wasmTable.get(e)),t},"getWasmTableEntry"),updateTableMap=a((e,t)=>{if(functionsInTableMap)for(var r=e;r<e+t;r++){var _=getWasmTableEntry(r);_&&functionsInTableMap.set(_,r)}},"updateTableMap"),functionsInTableMap,getFunctionAddress=a(e=>(functionsInTableMap||(functionsInTableMap=new WeakMap,updateTableMap(0,wasmTable.length)),functionsInTableMap.get(e)||0),"getFunctionAddress"),freeTableIndexes=[],getEmptyTableSlot=a(()=>freeTableIndexes.length?freeTableIndexes.pop():wasmTable.grow(1),"getEmptyTableSlot"),setWasmTableEntry=a((e,t)=>{wasmTable.set(e,t),wasmTableMirror[e]=wasmTable.get(e)},"setWasmTableEntry"),addFunction=a((e,t)=>{var r=getFunctionAddress(e);if(r)return r;var _=getEmptyTableSlot();try{setWasmTableEntry(_,e)}catch(o){if(!(o instanceof TypeError))throw o;var s=convertJsFunctionToWasm(e,t);setWasmTableEntry(_,s)}return functionsInTableMap.set(e,_),_},"addFunction"),updateGOT=a((e,t)=>{for(var r in e)if(!isInternalSym(r)){var _=e[r];GOT[r]||=new WebAssembly.Global({value:"i32",mutable:!0}),(t||GOT[r].value==0)&&(typeof _=="function"?GOT[r].value=addFunction(_):typeof _=="number"?GOT[r].value=_:err(`unhandled export type for '${r}': ${typeof _}`))}},"updateGOT"),relocateExports=a((e,t,r)=>{var _={};for(var s in e){var o=e[s];typeof o=="object"&&(o=o.value),typeof o=="number"&&(o+=t),_[s]=o}return updateGOT(_,r),_},"relocateExports"),isSymbolDefined=a(e=>{var t=wasmImports[e];return!(!t||t.stub)},"isSymbolDefined"),dynCall=a((e,t,r=[],_=!1)=>{var s=getWasmTableEntry(t),o=s(...r);function l(u){return u}return a(l,"convert"),o},"dynCall"),stackSave=a(()=>_emscripten_stack_get_current(),"stackSave"),stackRestore=a(e=>__emscripten_stack_restore(e),"stackRestore"),createInvokeFunction=a(e=>(t,...r)=>{var _=stackSave();try{return dynCall(e,t,r)}catch(s){if(stackRestore(_),s!==s+0)throw s;if(_setThrew(1,0),e[0]=="j")return 0n}},"createInvokeFunction"),resolveGlobalSymbol=a((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}},"resolveGlobalSymbol"),onPostCtors=[],addOnPostCtor=a(e=>onPostCtors.push(e),"addOnPostCtor"),UTF8ToString=a((e,t,r)=>e?UTF8ArrayToString(HEAPU8,e,t,r):"","UTF8ToString"),loadWebAssemblyModule=a((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,LE_HEAP_STORE_U32((handle+12>>2)*4,memoryBase),LE_HEAP_STORE_I32((handle+16>>2)*4,metadata.memorySize),LE_HEAP_STORE_U32((handle+20>>2)*4,tableBase),LE_HEAP_STORE_I32((handle+24>>2)*4,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}a(resolveSymbol,"resolveSymbol");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 _;e[t]=(...s)=>(_||=resolveSymbol(t),_(...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(a(addEmAsm,"addEmAsm"),"__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)}a(addEmJs,"addEmJs");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(a(postInstantiation,"postInstantiation"),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 a(loadModule,"loadModule"),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())},"loadWebAssemblyModule"),mergeLibSymbols=a((e,t)=>{for(var[r,_]of Object.entries(e)){let s=a(l=>{isSymbolDefined(l)||(wasmImports[l]=_)},"setImport");s(r);let o="__main_argc_argv";r=="main"&&s(o),r==o&&s("main")}},"mergeLibSymbols"),asyncLoad=a(async e=>{var t=await readAsync(e);return new Uint8Array(t)},"asyncLoad");function loadDynamicLibrary(e,t={global:!0,nodelete:!0},r,_){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++,_&&(LDSO.loadedLibsByHandle[_]=s),t.loadAsync?Promise.resolve(!0):!0;s=newDSO(e,_,"loading"),s.refcount=t.nodelete?1/0:1,s.global=t.global;function o(){if(_){var c=LE_HEAP_LOAD_U32((_+28>>2)*4),w=LE_HEAP_LOAD_U32((_+32>>2)*4);if(c&&w){var f=HEAP8.slice(c,c+w);return t.loadAsync?Promise.resolve(f):f}}var g=locateFile(e);if(t.loadAsync)return asyncLoad(g);if(!readBinary)throw new Error(`${g}: file not found, and synchronous loading of external files is not available`);return readBinary(g)}a(o,"loadLibData");function l(){return t.loadAsync?o().then(c=>loadWebAssemblyModule(c,t,e,r,_)):loadWebAssemblyModule(o(),t,e,r,_)}a(l,"getExports");function u(c){s.global?mergeLibSymbols(c,e):r&&Object.assign(r,c),s.exports=c}return a(u,"moduleLoaded"),t.loadAsync?l().then(c=>(u(c),!0)):(u(l()),!0)}a(loadDynamicLibrary,"loadDynamicLibrary");var reportUndefinedSymbols=a(()=>{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}`)}},"reportUndefinedSymbols"),runDependencies=0,dependenciesFulfilled=null,removeRunDependency=a(e=>{if(runDependencies--,Module.monitorRunDependencies?.(runDependencies),runDependencies==0&&dependenciesFulfilled){var t=dependenciesFulfilled;dependenciesFulfilled=null,t()}},"removeRunDependency"),addRunDependency=a(e=>{runDependencies++,Module.monitorRunDependencies?.(runDependencies)},"addRunDependency"),loadDylibs=a(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")},"loadDylibs"),noExitRuntime=!0;function setValue(e,t,r="i8"){switch(r.endsWith("*")&&(r="*"),r){case"i1":HEAP8[e]=t;break;case"i8":HEAP8[e]=t;break;case"i16":LE_HEAP_STORE_I16((e>>1)*2,t);break;case"i32":LE_HEAP_STORE_I32((e>>2)*4,t);break;case"i64":LE_HEAP_STORE_I64((e>>3)*8,BigInt(t));break;case"float":LE_HEAP_STORE_F32((e>>2)*4,t);break;case"double":LE_HEAP_STORE_F64((e>>3)*8,t);break;case"*":LE_HEAP_STORE_U32((e>>2)*4,t);break;default:abort(`invalid type for setValue: ${r}`)}}a(setValue,"setValue");var ___memory_base=new WebAssembly.Global({value:"i32",mutable:!1},1024),___stack_high=82496,___stack_low=16960,___stack_pointer=new WebAssembly.Global({value:"i32",mutable:!0},82496),___table_base=new WebAssembly.Global({value:"i32",mutable:!1},1),__abort_js=a(()=>abort(""),"__abort_js");__abort_js.sig="v";var __emscripten_throw_longjmp=a(()=>{throw 1/0},"__emscripten_throw_longjmp");__emscripten_throw_longjmp.sig="v";var getHeapMax=a(()=>2147483648,"getHeapMax"),growMemory=a(e=>{var t=wasmMemory.buffer.byteLength,r=(e-t+65535)/65536|0;try{return wasmMemory.grow(r),updateMemoryViews(),1}catch{}},"growMemory"),_emscripten_resize_heap=a(e=>{var t=HEAPU8.length;e>>>=0;var r=getHeapMax();if(e>r)return!1;for(var _=1;_<=4;_*=2){var s=t*(1+0/_);s=Math.min(s,e+100663296);var o=Math.min(r,alignMemory(Math.max(e,s),65536)),l=growMemory(o);if(l)return!0}return!1},"_emscripten_resize_heap");_emscripten_resize_heap.sig="ip";var _fd_close=a(e=>52,"_fd_close");_fd_close.sig="ii";var INT53_MAX=9007199254740992,INT53_MIN=-9007199254740992,bigintToI53Checked=a(e=>e<INT53_MIN||e>INT53_MAX?NaN:Number(e),"bigintToI53Checked");function _fd_seek(e,t,r,_){return t=bigintToI53Checked(t),70}a(_fd_seek,"_fd_seek"),_fd_seek.sig="iijip";var printCharBuffers=[null,[],[]],printChar=a((e,t)=>{var r=printCharBuffers[e];t===0||t===10?((e===1?out:err)(UTF8ArrayToString(r)),r.length=0):r.push(t)},"printChar"),_fd_write=a((e,t,r,_)=>{for(var s=0,o=0;o<r;o++){var l=LE_HEAP_LOAD_U32((t>>2)*4),u=LE_HEAP_LOAD_U32((t+4>>2)*4);t+=8;for(var c=0;c<u;c++)printChar(e,HEAPU8[l+c]);s+=u}return LE_HEAP_STORE_U32((_>>2)*4,s),0},"_fd_write");_fd_write.sig="iippp";function _tree_sitter_log_callback(e,t){if(Module.currentLogCallback){let r=UTF8ToString(t);Module.currentLogCallback(r,e!==0)}}a(_tree_sitter_log_callback,"_tree_sitter_log_callback");function _tree_sitter_parse_callback(e,t,r,_,s){let l=Module.currentParseCallback(t,{row:r,column:_});typeof l=="string"?(setValue(s,l.length,"i32"),stringToUTF16(l,e,10240)):setValue(s,0,"i32")}a(_tree_sitter_parse_callback,"_tree_sitter_parse_callback");function _tree_sitter_progress_callback(e,t){return Module.currentProgressCallback?Module.currentProgressCallback({currentOffset:e,hasError:t!==0})===!0:!1}a(_tree_sitter_progress_callback,"_tree_sitter_progress_callback");function _tree_sitter_query_progress_callback(e){return Module.currentQueryProgressCallback?Module.currentQueryProgressCallback({currentOffset:e})===!0:!1}a(_tree_sitter_query_progress_callback,"_tree_sitter_query_progress_callback");var runtimeKeepaliveCounter=0,keepRuntimeAlive=a(()=>noExitRuntime||runtimeKeepaliveCounter>0,"keepRuntimeAlive"),_proc_exit=a(e=>{EXITSTATUS=e,keepRuntimeAlive()||(Module.onExit?.(e),ABORT=!0),quit_(e,new ExitStatus(e))},"_proc_exit");_proc_exit.sig="vi";var exitJS=a((e,t)=>{EXITSTATUS=e,_proc_exit(e)},"exitJS"),handleException=a(e=>{if(e instanceof ExitStatus||e=="unwind")return EXITSTATUS;quit_(1,e)},"handleException"),lengthBytesUTF8=a(e=>{for(var t=0,r=0;r<e.length;++r){var _=e.charCodeAt(r);_<=127?t++:_<=2047?t+=2:_>=55296&&_<=57343?(t+=4,++r):t+=3}return t},"lengthBytesUTF8"),stringToUTF8Array=a((e,t,r,_)=>{if(!(_>0))return 0;for(var s=r,o=r+_-1,l=0;l<e.length;++l){var u=e.codePointAt(l);if(u<=127){if(r>=o)break;t[r++]=u}else if(u<=2047){if(r+1>=o)break;t[r++]=192|u>>6,t[r++]=128|u&63}else if(u<=65535){if(r+2>=o)break;t[r++]=224|u>>12,t[r++]=128|u>>6&63,t[r++]=128|u&63}else{if(r+3>=o)break;t[r++]=240|u>>18,t[r++]=128|u>>12&63,t[r++]=128|u>>6&63,t[r++]=128|u&63,l++}}return t[r]=0,r-s},"stringToUTF8Array"),stringToUTF8=a((e,t,r)=>stringToUTF8Array(e,HEAPU8,t,r),"stringToUTF8"),stackAlloc=a(e=>__emscripten_stack_alloc(e),"stackAlloc"),stringToUTF8OnStack=a(e=>{var t=lengthBytesUTF8(e)+1,r=stackAlloc(t);return stringToUTF8(e,r,t),r},"stringToUTF8OnStack"),AsciiToString=a(e=>{for(var t="";;){var r=HEAPU8[e++];if(!r)return t;t+=String.fromCharCode(r)}},"AsciiToString"),stringToUTF16=a((e,t,r)=>{if(r??=2147483647,r<2)return 0;r-=2;for(var _=t,s=r<e.length*2?r/2:e.length,o=0;o<s;++o){var l=e.charCodeAt(o);LE_HEAP_STORE_I16((t>>1)*2,l),t+=2}return LE_HEAP_STORE_I16((t>>1)*2,0),t-_},"stringToUTF16");LE_ATOMICS_NATIVE_BYTE_ORDER=new Int8Array(new Int16Array([1]).buffer)[0]===1?[(e=>e),(e=>e),void 0,(e=>e)]:[(e=>e),(e=>((e&65280)<<8|(e&255)<<24)>>16),void 0,(e=>e>>24&255|e>>8&65280|(e&65280)<<8|(e&255)<<24)];function LE_HEAP_UPDATE(){HEAPU16.unsigned=(e=>e&65535),HEAPU32.unsigned=(e=>e>>>0)}if(a(LE_HEAP_UPDATE,"LE_HEAP_UPDATE"),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.setValue=setValue,Module.getValue=getValue,Module.UTF8ToString=UTF8ToString,Module.stringToUTF8=stringToUTF8,Module.lengthBytesUTF8=lengthBytesUTF8,Module.AsciiToString=AsciiToString,Module.stringToUTF16=stringToUTF16,Module.loadWebAssemblyModule=loadWebAssemblyModule,Module.LE_HEAP_STORE_I64=LE_HEAP_STORE_I64;var ASM_CONSTS={},_malloc,_calloc,_realloc,_free,_ts_range_edit,_ts_language_symbol_count,_ts_language_state_count,_ts_language_abi_version,_ts_language_name,_ts_language_field_count,_ts_language_next_state,_ts_language_symbol_name,_ts_language_symbol_for_name,_strncmp,_ts_language_symbol_type,_ts_language_field_name_for_id,_ts_lookahead_iterator_new,_ts_lookahead_iterator_delete,_ts_lookahead_iterator_reset_state,_ts_lookahead_iterator_reset,_ts_lookahead_iterator_next,_ts_lookahead_iterator_current_symbol,_ts_point_edit,_ts_parser_delete,_ts_parser_reset,_ts_parser_set_language,_ts_parser_set_included_ranges,_memcmp,_ts_query_new,_ts_query_delete,_iswspace,_iswalnum,_ts_query_copy,_ts_query_pattern_count,_ts_query_capture_count,_ts_query_string_count,_ts_query_capture_name_for_id,_ts_query_capture_quantifier_for_id,_ts_query_string_value_for_id,_ts_query_predicates_for_pattern,_ts_query_start_byte_for_pattern,_ts_query_end_byte_for_pattern,_ts_query_is_pattern_rooted,_ts_query_is_pattern_non_local,_ts_query_is_pattern_guaranteed_at_step,_ts_query_disable_capture,_ts_query_disable_pattern,_ts_tree_copy,_ts_tree_delete,_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_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_edit_wasm,_ts_tree_included_ranges_wasm,_ts_tree_get_changed_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_type_id_wasm,_ts_tree_cursor_current_node_state_id_wasm,_ts_tree_cursor_current_node_is_named_wasm,_ts_tree_cursor_current_node_is_missing_wasm,_ts_tree_cursor_current_node_id_wasm,_ts_tree_cursor_start_position_wasm,_ts_tree_cursor_end_position_wasm,_ts_tree_cursor_start_index_wasm,_ts_tree_cursor_end_index_wasm,_ts_tree_cursor_current_field_id_wasm,_ts_tree_cursor_current_depth_wasm,_ts_tree_cursor_current_descendant_index_wasm,_ts_tree_cursor_current_node_wasm,_ts_node_symbol_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_start_point_wasm,_ts_node_end_point_wasm,_ts_node_start_index_wasm,_ts_node_end_index_wasm,_ts_node_to_string_wasm,_ts_node_children_wasm,_ts_node_named_children_wasm,_ts_node_descendants_of_type_wasm,_ts_node_is_named_wasm,_ts_node_has_changes_wasm,_ts_node_has_error_wasm,_ts_node_is_error_wasm,_ts_node_is_missing_wasm,_ts_node_is_extra_wasm,_ts_node_parse_state_wasm,_ts_node_next_parse_state_wasm,_ts_query_matches_wasm,_ts_query_captures_wasm,_memset,_memcpy,_memmove,_iswalpha,_iswblank,_iswdigit,_iswlower,_iswpunct,_iswupper,_iswxdigit,_memchr,_strlen,_strcmp,_strncat,_strncpy,_towlower,_towupper,_setThrew,__emscripten_stack_restore,__emscripten_stack_alloc,_emscripten_stack_get_current,___wasm_apply_data_relocs;function assignWasmExports(e){Module._malloc=_malloc=e.malloc,Module._calloc=_calloc=e.calloc,Module._realloc=_realloc=e.realloc,Module._free=_free=e.free,Module._ts_range_edit=_ts_range_edit=e.ts_range_edit,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_next_state=_ts_language_next_state=e.ts_language_next_state,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._ts_lookahead_iterator_new=_ts_lookahead_iterator_new=e.ts_lookahead_iterator_new,Module._ts_lookahead_iterator_delete=_ts_lookahead_iterator_delete=e.ts_lookahead_iterator_delete,Module._ts_lookahead_iterator_reset_state=_ts_lookahead_iterator_reset_state=e.ts_lookahead_iterator_reset_state,Module._ts_lookahead_iterator_reset=_ts_lookahead_iterator_reset=e.ts_lookahead_iterator_reset,Module._ts_lookahead_iterator_next=_ts_lookahead_iterator_next=e.ts_lookahead_iterator_next,Module._ts_lookahead_iterator_current_symbol=_ts_lookahead_iterator_current_symbol=e.ts_lookahead_iterator_current_symbol,Module._ts_point_edit=_ts_point_edit=e.ts_point_edit,Module._ts_parser_delete=_ts_parser_delete=e.ts_parser_delete,Module._ts_parser_reset=_ts_parser_reset=e.ts_parser_reset,Module._ts_parser_set_language=_ts_parser_set_language=e.ts_parser_set_language,Module._ts_parser_set_included_ranges=_ts_parser_set_included_ranges=e.ts_parser_set_included_ranges,Module._memcmp=_memcmp=e.memcmp,Module._ts_query_new=_ts_query_new=e.ts_query_new,Module._ts_query_delete=_ts_query_delete=e.ts_query_delete,Module._iswspace=_iswspace=e.iswspace,Module._iswalnum=_iswalnum=e.iswalnum,Module._ts_query_copy=_ts_query_copy=e.ts_query_copy,Module._ts_query_pattern_count=_ts_query_pattern_count=e.ts_query_pattern_count,Module._ts_query_capture_count=_ts_query_capture_count=e.ts_query_capture_count,Module._ts_query_string_count=_ts_query_string_count=e.ts_query_string_count,Module._ts_query_capture_name_for_id=_ts_query_capture_name_for_id=e.ts_query_capture_name_for_id,Module._ts_query_capture_quantifier_for_id=_ts_query_capture_quantifier_for_id=e.ts_query_capture_quantifier_for_id,Module._ts_query_string_value_for_id=_ts_query_string_value_for_id=e.ts_query_string_value_for_id,Module._ts_query_predicates_for_pattern=_ts_query_predicates_for_pattern=e.ts_query_predicates_for_pattern,Module._ts_query_start_byte_for_pattern=_ts_query_start_byte_for_pattern=e.ts_query_start_byte_for_pattern,Module._ts_query_end_byte_for_pattern=_ts_query_end_byte_for_pattern=e.ts_query_end_byte_for_pattern,Module._ts_query_is_pattern_rooted=_ts_query_is_pattern_rooted=e.ts_query_is_pattern_rooted,Module._ts_query_is_pattern_non_local=_ts_query_is_pattern_non_local=e.ts_query_is_pattern_non_local,Module._ts_query_is_pattern_guaranteed_at_step=_ts_query_is_pattern_guaranteed_at_step=e.ts_query_is_pattern_guaranteed_at_step,Module._ts_query_disable_capture=_ts_query_disable_capture=e.ts_query_disable_capture,Module._ts_query_disable_pattern=_ts_query_disable_pattern=e.ts_query_disable_pattern,Module._ts_tree_copy=_ts_tree_copy=e.ts_tree_copy,Module._ts_tree_delete=_ts_tree_delete=e.ts_tree_delete,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_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_edit_wasm=_ts_tree_edit_wasm=e.ts_tree_edit_wasm,Module._ts_tree_included_ranges_wasm=_ts_tree_included_ranges_wasm=e.ts_tree_included_ranges_wasm,Module._ts_tree_get_changed_ranges_wasm=_ts_tree_get_changed_ranges_wasm=e.ts_tree_get_changed_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_type_id_wasm=_ts_tree_cursor_current_node_type_id_wasm=e.ts_tree_cursor_current_node_type_id_wasm,Module._ts_tree_cursor_current_node_state_id_wasm=_ts_tree_cursor_current_node_state_id_wasm=e.ts_tree_cursor_current_node_state_id_wasm,Module._ts_tree_cursor_current_node_is_named_wasm=_ts_tree_cursor_current_node_is_named_wasm=e.ts_tree_cursor_current_node_is_named_wasm,Module._ts_tree_cursor_current_node_is_missing_wasm=_ts_tree_cursor_current_node_is_missing_wasm=e.ts_tree_cursor_current_node_is_missing_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_start_index_wasm=_ts_tree_cursor_start_index_wasm=e.ts_tree_cursor_start_index_wasm,Module._ts_tree_cursor_end_index_wasm=_ts_tree_cursor_end_index_wasm=e.ts_tree_cursor_end_index_wasm,Module._ts_tree_cursor_current_field_id_wasm=_ts_tree_cursor_current_field_id_wasm=e.ts_tree_cursor_current_field_id_wasm,Module._ts_tree_cursor_current_depth_wasm=_ts_tree_cursor_current_depth_wasm=e.ts_tree_cursor_current_depth_wasm,Module._ts_tree_cursor_current_descendant_index_wasm=_ts_tree_cursor_current_descendant_index_wasm=e.ts_tree_cursor_current_descendant_index_wasm,Module._ts_tree_cursor_current_node_wasm=_ts_tree_cursor_current_node_wasm=e.ts_tree_cursor_current_node_wasm,Module._ts_node_symbol_wasm=_ts_node_symbol_wasm=e.ts_node_symbol_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_start_point_wasm=_ts_node_start_point_wasm=e.ts_node_start_point_wasm,Module._ts_node_end_point_wasm=_ts_node_end_point_wasm=e.ts_node_end_point_wasm,Module._ts_node_start_index_wasm=_ts_node_start_index_wasm=e.ts_node_start_index_wasm,Module._ts_node_end_index_wasm=_ts_node_end_index_wasm=e.ts_node_end_index_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._ts_node_is_named_wasm=_ts_node_is_named_wasm=e.ts_node_is_named_wasm,Module._ts_node_has_changes_wasm=_ts_node_has_changes_wasm=e.ts_node_has_changes_wasm,Module._ts_node_has_error_wasm=_ts_node_has_error_wasm=e.ts_node_has_error_wasm,Module._ts_node_is_error_wasm=_ts_node_is_error_wasm=e.ts_node_is_error_wasm,Module._ts_node_is_missing_wasm=_ts_node_is_missing_wasm=e.ts_node_is_missing_wasm,Module._ts_node_is_extra_wasm=_ts_node_is_extra_wasm=e.ts_node_is_extra_wasm,Module._ts_node_parse_state_wasm=_ts_node_parse_state_wasm=e.ts_node_parse_state_wasm,Module._ts_node_next_parse_state_wasm=_ts_node_next_parse_state_wasm=e.ts_node_next_parse_state_wasm,Module._ts_query_matches_wasm=_ts_query_matches_wasm=e.ts_query_matches_wasm,Module._ts_query_captures_wasm=_ts_query_captures_wasm=e.ts_query_captures_wasm,Module._memset=_memset=e.memset,Module._memcpy=_memcpy=e.memcpy,Module._memmove=_memmove=e.memmove,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._iswupper=_iswupper=e.iswupper,Module._iswxdigit=_iswxdigit=e.iswxdigit,Module._memchr=_memchr=e.memchr,Module._strlen=_strlen=e.strlen,Module._strcmp=_strcmp=e.strcmp,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}a(assignWasmExports,"assignWasmExports");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,_abort_js:__abort_js,_emscripten_throw_longjmp:__emscripten_throw_longjmp,emscripten_resize_heap:_emscripten_resize_heap,fd_close:_fd_close,fd_seek:_fd_seek,fd_write:_fd_write,invoke_i,invoke_ii,invoke_iii,invoke_iiii,invoke_iiiii,invoke_vi,invoke_vii,memory:wasmMemory,tree_sitter_log_callback:_tree_sitter_log_callback,tree_sitter_parse_callback:_tree_sitter_parse_callback,tree_sitter_progress_callback:_tree_sitter_progress_callback,tree_sitter_query_progress_callback:_tree_sitter_query_progress_callback};function invoke_vi(e,t){var r=stackSave();try{getWasmTableEntry(e)(t)}catch(_){if(stackRestore(r),_!==_+0)throw _;_setThrew(1,0)}}a(invoke_vi,"invoke_vi");function invoke_i(e){var t=stackSave();try{return getWasmTableEntry(e)()}catch(r){if(stackRestore(t),r!==r+0)throw r;_setThrew(1,0)}}a(invoke_i,"invoke_i");function invoke_ii(e,t){var r=stackSave();try{return getWasmTableEntry(e)(t)}catch(_){if(stackRestore(r),_!==_+0)throw _;_setThrew(1,0)}}a(invoke_ii,"invoke_ii");function invoke_iii(e,t,r){var _=stackSave();try{return getWasmTableEntry(e)(t,r)}catch(s){if(stackRestore(_),s!==s+0)throw s;_setThrew(1,0)}}a(invoke_iii,"invoke_iii");function invoke_vii(e,t,r){var _=stackSave();try{getWasmTableEntry(e)(t,r)}catch(s){if(stackRestore(_),s!==s+0)throw s;_setThrew(1,0)}}a(invoke_vii,"invoke_vii");function invoke_iiii(e,t,r,_){var s=stackSave();try{return getWasmTableEntry(e)(t,r,_)}catch(o){if(stackRestore(s),o!==o+0)throw o;_setThrew(1,0)}}a(invoke_iiii,"invoke_iiii");function invoke_iiiii(e,t,r,_,s){var o=stackSave();try{return getWasmTableEntry(e)(t,r,_,s)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}a(invoke_iiiii,"invoke_iiiii");function callMain(e=[]){var t=resolveGlobalSymbol("main").sym;if(t){e.unshift(thisProgram);var r=e.length,_=stackAlloc((r+1)*4),s=_;e.forEach(l=>{LE_HEAP_STORE_U32((s>>2)*4,stringToUTF8OnStack(l)),s+=4}),LE_HEAP_STORE_U32((s>>2)*4,0);try{var o=t(r,_);return exitJS(o,!0),o}catch(l){return handleException(l)}}}a(callMain,"callMain");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()}}a(t,"doRun"),Module.setStatus?(Module.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>Module.setStatus(""),1),t()},1)):t()}a(run,"run");var wasmExports;return wasmExports=await createWasm(),run(),runtimeInitialized?moduleRtn=Module:moduleRtn=new Promise((e,t)=>{readyPromiseResolve=e,readyPromiseReject=t}),moduleRtn}a(xe,"Module");var le=xe;var re=null;async function Ae(e){if(re)return re;let{wasmModule:t,...r}=e??{};if(!t)return re??=await le(r);let _=new Promise((s,o)=>{r.instantiateWasm=(l,u)=>(WebAssembly.instantiate(t,l).then(c=>{u(c,t)}).catch(o),{})});return re??=await Promise.race([le(r),_])}a(Ae,"initializeBinding");function Ie(){return!!re}a(Ie,"checkModule");var d,se;function de(e){let t=n._ts_language_abi_version(e[0]);if(t<ce||t>se)throw new Error(`Incompatible language version 0x${(t>>>0).toString(16)}. Expected 0x${se.toString(16)}.`)}a(de,"assertSupportedLanguage");var ce,Te=D(e=>{n._ts_parser_delete(e[0]),n._free(e[1])}),ue=class{static{a(this,"Parser")}0=0;1=0;logCallback=null;language=null;static async init(t){pe(await Ae(t)),d=n._ts_init(),se=n.getValue(d,"i32"),ce=n.getValue(d+m,"i32")}constructor(){this.initialize(),Te?.register(this,[this[0],this[1]],this)}initialize(){if(!Ie())throw new Error("cannot construct a Parser before calling `init()`");n._ts_parser_new_wasm(),this[0]=n.getValue(d,"i32"),this[1]=n.getValue(d+m,"i32")}delete(){Te?.unregister(this),n._ts_parser_delete(this[0]),n._free(this[1]),this[0]=0,this[1]=0}setLanguage(t){let r;if(!t)r=0,this.language=null;else if(t.constructor===Z)r=t[0],de(t),this.language=t;else throw new Error("Argument must be a Language");return n._ts_parser_set_language(this[0],r),this}parse(t,r,_){let s=ke(_?.maxMemoryBytes);if(typeof t=="string")n.currentParseCallback=o=>t.slice(o);else if(typeof t=="function")n.currentParseCallback=t;else throw new Error("Argument must be a string or a function");_?.progressCallback?n.currentProgressCallback=_.progressCallback:n.currentProgressCallback=null,this.logCallback?(n.currentLogCallback=this.logCallback,n._ts_parser_enable_logger_wasm(this[0],1)):(n.currentLogCallback=null,n._ts_parser_enable_logger_wasm(this[0],0));try{let o=s===void 0?Le(this[0],this[1],r?r[0]:0,_?.includedRanges):Oe(this[0],this[1],_?.includedRanges,s);if(!o)return null;if(!this.language)throw new Error("Parser must have a language to parse");return new Y(F,o,this.language,n.currentParseCallback)}finally{Ue()}}reset(){n._ts_parser_reset(this[0])}getIncludedRanges(){n._ts_parser_included_ranges_wasm(this[0]);let t=n.getValue(d,"i32"),r=n.getValue(d+m,"i32"),_=new Array(t);if(t>0){let s=r;for(let o=0;o<t;o++)_[o]=J(s),s+=j;n._free(r)}return _}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 ke(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}a(ke,"validateMemoryLimit");function Se(e){if(!e?.length)return[0,0];let t=n._calloc(e.length,j);if(!t)return[0,e.length];let r=t;for(let _ of e)ve(r,_),r+=j;return[t,e.length]}a(Se,"prepareRanges");function Le(e,t,r,_){let[s,o]=Se(_);return o&&!s?0:n._ts_parser_parse_wasm(e,t,r,s,o)}a(Le,"parseOrdinaryWasm");function Oe(e,t,r,_){if(!n.treeSitterSetMemoryLimit(_))return 0;let s=0;try{let[o,l]=Se(r);if(s=o,l&&!o)return 0;try{return n._ts_parser_parse_limited_wasm(e,t,o,l)}catch(u){throw n._ts_parser_abort_limited_wasm(),u}}finally{s&&n._free(s),n.treeSitterSetMemoryLimit(0)}}a(Oe,"parseLimitedWasm");function Ue(){n.currentParseCallback=null,n.currentLogCallback=null,n.currentProgressCallback=null}a(Ue,"clearCallbacks");var Ve=1,qe=2,We=/[\w-]+/g,De={Zero:0,ZeroOrOne:1,ZeroOrMore:2,One:3,OneOrMore:4},Re=a(e=>e.type==="capture","isCaptureStep"),ge=a(e=>e.type==="string","isStringStep"),U={Syntax:1,NodeName:2,FieldName:3,CaptureName:4,PatternStructure:5},z=class e extends Error{constructor(r,_,s,o){super(e.formatMessage(r,_));this.kind=r;this.info=_;this.index=s;this.length=o;this.name="QueryError"}kind;info;index;length;static{a(this,"QueryError")}static formatMessage(r,_){switch(r){case U.NodeName:return`Bad node name '${_.word}'`;case U.FieldName:return`Bad field name '${_.word}'`;case U.CaptureName:return`Bad capture name @${_.word}`;case U.PatternStructure:return`Bad pattern structure at offset ${_.suffix}`;case U.Syntax:return`Bad syntax at offset ${_.suffix}`}}};function He(e,t,r,_){if(e.length!==3)throw new Error(`Wrong number of arguments to \`#${r}\` predicate. Expected 2, got ${e.length-1}`);if(!Re(e[1]))throw new Error(`First argument of \`#${r}\` predicate must be a capture. Got "${e[1].value}"`);let s=r==="eq?"||r==="any-eq?",o=!r.startsWith("any-");if(Re(e[2])){let l=e[1].name,u=e[2].name;_[t].push(c=>{let w=[],f=[];for(let v of c)v.name===l&&w.push(v.node),v.name===u&&f.push(v.node);let g=a((v,b,N)=>N?v.text===b.text:v.text!==b.text,"compare");return o?w.every(v=>f.some(b=>g(v,b,s))):w.some(v=>f.some(b=>g(v,b,s)))})}else{let l=e[1].name,u=e[2].value,c=a(f=>f.text===u,"matches"),w=a(f=>f.text!==u,"doesNotMatch");_[t].push(f=>{let g=[];for(let b of f)b.name===l&&g.push(b.node);let v=s?c:w;return o?g.every(v):g.some(v)})}}a(He,"parseAnyPredicate");function Qe(e,t,r,_){if(e.length!==3)throw new Error(`Wrong number of arguments to \`#${r}\` predicate. Expected 2, got ${e.length-1}.`);if(e[1].type!=="capture")throw new Error(`First argument of \`#${r}\` predicate must be a capture. Got "${e[1].value}".`);if(e[2].type!=="string")throw new Error(`Second argument of \`#${r}\` predicate must be a string. Got @${e[2].name}.`);let s=r==="match?"||r==="any-match?",o=!r.startsWith("any-"),l=e[1].name,u=new RegExp(e[2].value);_[t].push(c=>{let w=[];for(let g of c)g.name===l&&w.push(g.node.text);let f=a((g,v)=>v?u.test(g):!u.test(g),"test");return w.length===0?!s:o?w.every(g=>f(g,s)):w.some(g=>f(g,s))})}a(Qe,"parseMatchPredicate");function Be(e,t,r,_){if(e.length<2)throw new Error(`Wrong number of arguments to \`#${r}\` predicate. Expected at least 1. Got ${e.length-1}.`);if(e[1].type!=="capture")throw new Error(`First argument of \`#${r}\` predicate must be a capture. Got "${e[1].value}".`);let s=r==="any-of?",o=e[1].name,l=e.slice(2);if(!l.every(ge))throw new Error(`Arguments to \`#${r}\` predicate must be strings.".`);let u=l.map(c=>c.value);_[t].push(c=>{let w=[];for(let f of c)f.name===o&&w.push(f.node.text);return w.length===0?!s:w.every(f=>u.includes(f))===s})}a(Be,"parseAnyOfPredicate");function Ge(e,t,r,_,s){if(e.length<2||e.length>3)throw new Error(`Wrong number of arguments to \`#${r}\` predicate. Expected 1 or 2. Got ${e.length-1}.`);if(!e.every(ge))throw new Error(`Arguments to \`#${r}\` predicate must be strings.".`);let o=r==="is?"?_:s;o[t]||(o[t]={}),o[t][e[1].value]=e[2]?.value??null}a(Ge,"parseIsPredicate");function $e(e,t,r){if(e.length<2||e.length>3)throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${e.length-1}.`);if(!e.every(ge))throw new Error('Arguments to `#set!` predicate must be strings.".');r[t]||(r[t]={}),r[t][e[1].value]=e[2]?.value??null}a($e,"parseSetDirective");function je(e,t,r,_,s,o,l,u,c,w,f){if(t===Ve){let g=_[r];o.push({type:"capture",name:g})}else if(t===qe)o.push({type:"string",value:s[r]});else if(o.length>0){if(o[0].type!=="string")throw new Error("Predicates must begin with a literal value");let g=o[0].value;switch(g){case"any-not-eq?":case"not-eq?":case"any-eq?":case"eq?":He(o,e,g,l);break;case"any-not-match?":case"not-match?":case"any-match?":case"match?":Qe(o,e,g,l);break;case"not-any-of?":case"any-of?":Be(o,e,g,l);break;case"is?":case"is-not?":Ge(o,e,g,w,f);break;case"set!":$e(o,e,c);break;default:u[e].push({operator:g,operands:o.slice(1)})}o.length=0}}a(je,"parsePattern");var Fe=D(e=>{n._ts_query_delete(e)}),me=class{static{a(this,"Query")}0=0;exceededMatchLimit;textPredicates;captureNames;captureQuantifiers;predicates;setProperties;assertedProperties;refutedProperties;matchLimit;constructor(t,r){de(t);let _=n.lengthBytesUTF8(r),s=n._malloc(_+1);n.stringToUTF8(r,s,_+1);let o=n._ts_query_new(t[0],s,_,d,d+m);if(!o){let p=n.getValue(d+m,"i32"),A=n.getValue(d,"i32"),y=n.UTF8ToString(s,A).length,R=r.slice(y,y+100).split(`
5
+ `)[0],M=R.match(We)?.[0]??"";switch(n._free(s),p){case U.Syntax:throw new z(U.Syntax,{suffix:`${y}: '${R}'...`},y,0);case U.NodeName:throw new z(p,{word:M},y,M.length);case U.FieldName:throw new z(p,{word:M},y,M.length);case U.CaptureName:throw new z(p,{word:M},y,M.length);case U.PatternStructure:throw new z(p,{suffix:`${y}: '${R}'...`},y,0)}}let l=n._ts_query_string_count(o),u=n._ts_query_capture_count(o),c=n._ts_query_pattern_count(o),w=new Array(u),f=new Array(c),g=new Array(l);for(let p=0;p<u;p++){let A=n._ts_query_capture_name_for_id(o,p,d),y=n.getValue(d,"i32");w[p]=n.UTF8ToString(A,y)}for(let p=0;p<c;p++){let A=new Array(u);for(let y=0;y<u;y++){let R=n._ts_query_capture_quantifier_for_id(o,p,y);A[y]=R}f[p]=A}for(let p=0;p<l;p++){let A=n._ts_query_string_value_for_id(o,p,d),y=n.getValue(d,"i32");g[p]=n.UTF8ToString(A,y)}let v=new Array(c),b=new Array(c),N=new Array(c),x=new Array(c),V=new Array(c);for(let p=0;p<c;p++){let A=n._ts_query_predicates_for_pattern(o,p,d),y=n.getValue(d,"i32");x[p]=[],V[p]=[];let R=new Array,M=A;for(let k=0;k<y;k++){let H=n.getValue(M,"i32");M+=m;let T=n.getValue(M,"i32");M+=m,je(p,H,T,w,g,R,V,x,v,b,N)}Object.freeze(V[p]),Object.freeze(x[p]),Object.freeze(v[p]),Object.freeze(b[p]),Object.freeze(N[p])}n._free(s),this[0]=o,this.captureNames=w,this.captureQuantifiers=f,this.textPredicates=V,this.predicates=x,this.setProperties=v,this.assertedProperties=b,this.refutedProperties=N,this.exceededMatchLimit=!1,Fe?.register(this,o,this)}delete(){Fe?.unregister(this),n._ts_query_delete(this[0]),this[0]=0}matches(t,r={}){let _=r.startPosition??S,s=r.endPosition??S,o=r.startIndex??0,l=r.endIndex??0,u=r.startContainingPosition??S,c=r.endContainingPosition??S,w=r.startContainingIndex??0,f=r.endContainingIndex??0,g=r.matchLimit??4294967295,v=r.maxStartDepth??4294967295,b=r.progressCallback;if(typeof g!="number")throw new Error("Arguments must be numbers");if(this.matchLimit=g,l!==0&&o>l)throw new Error("`startIndex` cannot be greater than `endIndex`");if(s!==S&&(_.row>s.row||_.row===s.row&&_.column>s.column))throw new Error("`startPosition` cannot be greater than `endPosition`");if(f!==0&&w>f)throw new Error("`startContainingIndex` cannot be greater than `endContainingIndex`");if(c!==S&&(u.row>c.row||u.row===c.row&&u.column>c.column))throw new Error("`startContainingPosition` cannot be greater than `endContainingPosition`");b&&(n.currentQueryProgressCallback=b),h(t),n._ts_query_matches_wasm(this[0],t.tree[0],_.row,_.column,s.row,s.column,o,l,u.row,u.column,c.row,c.column,w,f,g,v);let N=n.getValue(d,"i32"),x=n.getValue(d+m,"i32"),V=n.getValue(d+2*m,"i32"),p=new Array(N);this.exceededMatchLimit=!!V;let A=0,y=x;for(let R=0;R<N;R++){let M=n.getValue(y,"i32");y+=m;let k=n.getValue(y,"i32");y+=m;let H=new Array(k);if(y=ie(this,t.tree,y,M,H),this.textPredicates[M].every(T=>T(H))){p[A]={patternIndex:M,captures:H};let T=this.setProperties[M];p[A].setProperties=T;let B=this.assertedProperties[M];p[A].assertedProperties=B;let G=this.refutedProperties[M];p[A].refutedProperties=G,A++}}return p.length=A,n._ts_free_wasm(x),n.currentQueryProgressCallback=null,p}captures(t,r={}){let _=r.startPosition??S,s=r.endPosition??S,o=r.startIndex??0,l=r.endIndex??0,u=r.startContainingPosition??S,c=r.endContainingPosition??S,w=r.startContainingIndex??0,f=r.endContainingIndex??0,g=r.matchLimit??4294967295,v=r.maxStartDepth??4294967295,b=r.progressCallback;if(typeof g!="number")throw new Error("Arguments must be numbers");if(this.matchLimit=g,l!==0&&o>l)throw new Error("`startIndex` cannot be greater than `endIndex`");if(s!==S&&(_.row>s.row||_.row===s.row&&_.column>s.column))throw new Error("`startPosition` cannot be greater than `endPosition`");if(f!==0&&w>f)throw new Error("`startContainingIndex` cannot be greater than `endContainingIndex`");if(c!==S&&(u.row>c.row||u.row===c.row&&u.column>c.column))throw new Error("`startContainingPosition` cannot be greater than `endContainingPosition`");b&&(n.currentQueryProgressCallback=b),h(t),n._ts_query_captures_wasm(this[0],t.tree[0],_.row,_.column,s.row,s.column,o,l,u.row,u.column,c.row,c.column,w,f,g,v);let N=n.getValue(d,"i32"),x=n.getValue(d+m,"i32"),V=n.getValue(d+2*m,"i32"),p=new Array;this.exceededMatchLimit=!!V;let A=new Array,y=x;for(let R=0;R<N;R++){let M=n.getValue(y,"i32");y+=m;let k=n.getValue(y,"i32");y+=m;let H=n.getValue(y,"i32");if(y+=m,A.length=k,y=ie(this,t.tree,y,M,A),this.textPredicates[M].every(T=>T(A))){let T=A[H],B=this.setProperties[M];T.setProperties=B;let G=this.assertedProperties[M];T.assertedProperties=G;let fe=this.refutedProperties[M];T.refutedProperties=fe,p.push(T)}}return n._ts_free_wasm(x),n.currentQueryProgressCallback=null,p}predicatesForPattern(t){return this.predicates[t]}disableCapture(t){let r=n.lengthBytesUTF8(t),_=n._malloc(r+1);n.stringToUTF8(t,_,r+1),n._ts_query_disable_capture(this[0],_,r),n._free(_)}disablePattern(t){if(t>=this.predicates.length)throw new Error(`Pattern index is ${t} but the pattern count is ${this.predicates.length}`);n._ts_query_disable_pattern(this[0],t)}didExceedMatchLimit(){return this.exceededMatchLimit}startIndexForPattern(t){if(t>=this.predicates.length)throw new Error(`Pattern index is ${t} but the pattern count is ${this.predicates.length}`);return n._ts_query_start_byte_for_pattern(this[0],t)}endIndexForPattern(t){if(t>=this.predicates.length)throw new Error(`Pattern index is ${t} but the pattern count is ${this.predicates.length}`);return n._ts_query_end_byte_for_pattern(this[0],t)}patternCount(){return n._ts_query_pattern_count(this[0])}captureIndexForName(t){return this.captureNames.indexOf(t)}isPatternRooted(t){return n._ts_query_is_pattern_rooted(this[0],t)===1}isPatternNonLocal(t){return n._ts_query_is_pattern_non_local(this[0],t)===1}isPatternGuaranteedAtStep(t){return n._ts_query_is_pattern_guaranteed_at_step(this[0],t)===1}};export{De as CaptureQuantifier,ae as Edit,se as LANGUAGE_VERSION,Z as Language,X as LookaheadIterator,ce as MIN_COMPATIBLE_VERSION,te as Node,ue as Parser,me as Query,Y as Tree,ee as TreeCursor};
6
6
  //# sourceMappingURL=web-tree-sitter.js.map