@gsc-basic/components 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -0
- package/dist/es/index.js +48 -30
- package/dist/es/node_modules/@codemirror/autocomplete/dist/index.js +15 -15
- package/dist/es/node_modules/@codemirror/commands/dist/index.js +31 -25
- package/dist/es/node_modules/@codemirror/lang-java/dist/index.js +3 -3
- package/dist/es/node_modules/@codemirror/lang-javascript/dist/index.js +8 -8
- package/dist/es/node_modules/@codemirror/lang-json/dist/index.js +1 -1
- package/dist/es/node_modules/@codemirror/lang-python/dist/index.js +1 -1
- package/dist/es/node_modules/@codemirror/lang-sql/dist/index.js +6 -6
- package/dist/es/node_modules/@codemirror/lang-xml/dist/index.js +3 -3
- package/dist/es/node_modules/@codemirror/lang-yaml/dist/index.js +1 -1
- package/dist/es/node_modules/@codemirror/language/dist/index.js +77 -77
- package/dist/es/node_modules/@codemirror/lint/dist/index.js +7 -7
- package/dist/es/node_modules/@codemirror/search/dist/index.js +432 -465
- package/dist/es/node_modules/@codemirror/state/dist/index.js +272 -268
- package/dist/es/node_modules/@codemirror/view/dist/index.js +1732 -1647
- package/dist/es/node_modules/@lezer/common/dist/index.js +191 -190
- package/dist/es/node_modules/@lezer/lr/dist/index.js +5 -3
- package/dist/es/node_modules/@tanstack/devtools-event-client/dist/esm/plugin.js +178 -0
- package/dist/es/node_modules/@tanstack/form-core/dist/esm/EventClient.js +13 -0
- package/dist/es/node_modules/@tanstack/form-core/dist/esm/FieldApi.js +406 -0
- package/dist/es/node_modules/@tanstack/form-core/dist/esm/FormApi.js +772 -0
- package/dist/es/node_modules/@tanstack/form-core/dist/esm/ValidationLogic.js +55 -0
- package/dist/es/node_modules/@tanstack/form-core/dist/esm/metaHelper.js +109 -0
- package/dist/es/node_modules/@tanstack/form-core/dist/esm/standardSchemaValidator.js +45 -0
- package/dist/es/node_modules/@tanstack/form-core/dist/esm/utils.js +213 -0
- package/dist/es/node_modules/@tanstack/pacer-lite/dist/lite-throttler.js +29 -0
- package/dist/es/node_modules/@tanstack/store/dist/esm/derived.js +74 -0
- package/dist/es/node_modules/@tanstack/store/dist/esm/scheduler.js +79 -0
- package/dist/es/node_modules/@tanstack/store/dist/esm/store.js +21 -0
- package/dist/es/node_modules/@tanstack/store/dist/esm/types.js +6 -0
- package/dist/es/node_modules/@tanstack/table-core/build/lib/index.js +1885 -0
- package/dist/es/node_modules/@tanstack/vue-form/dist/esm/useField.js +38 -0
- package/dist/es/node_modules/@tanstack/vue-form/dist/esm/useForm.js +33 -0
- package/dist/es/node_modules/@tanstack/vue-store/dist/esm/index.js +48 -0
- package/dist/es/node_modules/@tanstack/vue-table/build/lib/index.js +159 -0
- package/dist/es/node_modules/@vueuse/core/dist/index.js +1 -1
- package/dist/es/node_modules/codemirror/dist/index.js +3 -3
- package/dist/es/src/Button/index.js +6 -0
- package/dist/es/src/Button/src/Button.css +1 -0
- package/dist/es/src/Button/src/Button.vue.js +41 -0
- package/dist/es/src/Button/src/Button2.css +1 -0
- package/dist/es/src/CodeEditor/src/index.css +1 -1
- package/dist/es/src/CodeEditor/src/index.vue.js +54 -51
- package/dist/es/src/CodeEditor/src/index2.css +1 -1
- package/dist/es/src/ConfigProvider/index.js +1 -2
- package/dist/es/src/ConfigProvider/src/useGlobalConfig.js +9 -9
- package/dist/es/src/Form/index.js +6 -0
- package/dist/es/src/Form/src/Form.css +1 -0
- package/dist/es/src/Form/src/Form.vue.js +208 -0
- package/dist/es/src/Form/src/styles/form.css +1 -0
- package/dist/es/src/Grid/index.js +6 -0
- package/dist/es/src/Grid/src/Grid.css +1 -0
- package/dist/es/src/Grid/src/Grid.vue.js +180 -0
- package/dist/es/src/Grid/src/components/ActionBar.css +1 -0
- package/dist/es/src/Grid/src/components/ActionBar.vue.js +65 -0
- package/dist/es/src/Grid/src/components/CellEditor.css +1 -0
- package/dist/es/src/Grid/src/components/CellEditor.vue.js +132 -0
- package/dist/es/src/Grid/src/components/CellEditor2.css +1 -0
- package/dist/es/src/Grid/src/components/ColumnFilter.css +1 -0
- package/dist/es/src/Grid/src/components/ColumnFilter.vue.js +72 -0
- package/dist/es/src/Grid/src/components/ColumnSettings.css +1 -0
- package/dist/es/src/Grid/src/components/ColumnSettings.vue.js +109 -0
- package/dist/es/src/Grid/src/components/DataTable.css +1 -0
- package/dist/es/src/Grid/src/components/DataTable.vue.js +556 -0
- package/dist/es/src/Grid/src/components/Pager.css +1 -0
- package/dist/es/src/Grid/src/components/Pager.vue.js +64 -0
- package/dist/es/src/Grid/src/components/QueryBar.css +1 -0
- package/dist/es/src/Grid/src/components/QueryBar.vue.js +156 -0
- package/dist/es/src/Grid/src/composables/useCellEditor.js +20 -0
- package/dist/es/src/Grid/src/composables/useGridTable.js +213 -0
- package/dist/es/src/Grid/src/styles/table.css +1 -0
- package/dist/es/src/Overlay/index.js +61 -0
- package/dist/es/src/Overlay/src/Message.css +1 -0
- package/dist/es/src/Overlay/src/Message.vue.js +36 -0
- package/dist/es/src/Overlay/src/Message2.css +1 -0
- package/dist/es/src/Overlay/src/Modal.css +1 -0
- package/dist/es/src/Overlay/src/Modal.vue.js +67 -0
- package/dist/es/src/Overlay/src/Modal2.css +1 -0
- package/dist/es/src/Overlay/src/Notice.css +1 -0
- package/dist/es/src/Overlay/src/Notice.vue.js +37 -0
- package/dist/es/src/Overlay/src/Notice2.css +1 -0
- package/dist/es/src/ScaleScreen/src/index.vue.js +2 -2
- package/dist/es/src/VideoBackground/src/index.vue.js +8 -8
- package/dist/es/src/index.js +35 -19
- package/dist/es/src/locale/lang/en-US.js +40 -0
- package/dist/es/src/locale/lang/ja-JP.js +42 -2
- package/dist/es/src/locale/lang/zh-CN.js +42 -2
- package/dist/es/src/styles/tokens.css +1 -1
- package/dist/lib/index.js +1 -1
- package/dist/lib/node_modules/@codemirror/commands/dist/index.js +1 -1
- package/dist/lib/node_modules/@codemirror/language/dist/index.js +1 -1
- package/dist/lib/node_modules/@codemirror/search/dist/index.js +2 -2
- package/dist/lib/node_modules/@codemirror/state/dist/index.js +4 -4
- package/dist/lib/node_modules/@codemirror/view/dist/index.js +5 -5
- package/dist/lib/node_modules/@lezer/common/dist/index.js +1 -1
- package/dist/lib/node_modules/@lezer/lr/dist/index.js +1 -1
- package/dist/lib/node_modules/@tanstack/devtools-event-client/dist/esm/plugin.js +1 -0
- package/dist/lib/node_modules/@tanstack/form-core/dist/esm/EventClient.js +1 -0
- package/dist/lib/node_modules/@tanstack/form-core/dist/esm/FieldApi.js +1 -0
- package/dist/lib/node_modules/@tanstack/form-core/dist/esm/FormApi.js +1 -0
- package/dist/lib/node_modules/@tanstack/form-core/dist/esm/ValidationLogic.js +1 -0
- package/dist/lib/node_modules/@tanstack/form-core/dist/esm/metaHelper.js +1 -0
- package/dist/lib/node_modules/@tanstack/form-core/dist/esm/standardSchemaValidator.js +1 -0
- package/dist/lib/node_modules/@tanstack/form-core/dist/esm/utils.js +1 -0
- package/dist/lib/node_modules/@tanstack/pacer-lite/dist/lite-throttler.js +1 -0
- package/dist/lib/node_modules/@tanstack/store/dist/esm/derived.js +1 -0
- package/dist/lib/node_modules/@tanstack/store/dist/esm/scheduler.js +1 -0
- package/dist/lib/node_modules/@tanstack/store/dist/esm/store.js +1 -0
- package/dist/lib/node_modules/@tanstack/store/dist/esm/types.js +1 -0
- package/dist/lib/node_modules/@tanstack/table-core/build/lib/index.js +4 -0
- package/dist/lib/node_modules/@tanstack/vue-form/dist/esm/useField.js +1 -0
- package/dist/lib/node_modules/@tanstack/vue-form/dist/esm/useForm.js +1 -0
- package/dist/lib/node_modules/@tanstack/vue-store/dist/esm/index.js +1 -0
- package/dist/lib/node_modules/@tanstack/vue-table/build/lib/index.js +1 -0
- package/dist/lib/src/Button/index.js +1 -0
- package/dist/lib/src/Button/src/Button.css +1 -0
- package/dist/lib/src/Button/src/Button.vue.js +1 -0
- package/dist/lib/src/Button/src/Button2.css +1 -0
- package/dist/lib/src/CodeEditor/src/index.css +1 -1
- package/dist/lib/src/CodeEditor/src/index.vue.js +1 -1
- package/dist/lib/src/CodeEditor/src/index2.css +1 -1
- package/dist/lib/src/ConfigProvider/index.js +1 -1
- package/dist/lib/src/Form/index.js +1 -0
- package/dist/lib/src/Form/src/Form.css +1 -0
- package/dist/lib/src/Form/src/Form.vue.js +1 -0
- package/dist/lib/src/Form/src/styles/form.css +1 -0
- package/dist/lib/src/Grid/index.js +1 -0
- package/dist/lib/src/Grid/src/Grid.css +1 -0
- package/dist/lib/src/Grid/src/Grid.vue.js +1 -0
- package/dist/lib/src/Grid/src/components/ActionBar.css +1 -0
- package/dist/lib/src/Grid/src/components/ActionBar.vue.js +1 -0
- package/dist/lib/src/Grid/src/components/CellEditor.css +1 -0
- package/dist/lib/src/Grid/src/components/CellEditor.vue.js +1 -0
- package/dist/lib/src/Grid/src/components/CellEditor2.css +1 -0
- package/dist/lib/src/Grid/src/components/ColumnFilter.css +1 -0
- package/dist/lib/src/Grid/src/components/ColumnFilter.vue.js +1 -0
- package/dist/lib/src/Grid/src/components/ColumnSettings.css +1 -0
- package/dist/lib/src/Grid/src/components/ColumnSettings.vue.js +1 -0
- package/dist/lib/src/Grid/src/components/DataTable.css +1 -0
- package/dist/lib/src/Grid/src/components/DataTable.vue.js +1 -0
- package/dist/lib/src/Grid/src/components/Pager.css +1 -0
- package/dist/lib/src/Grid/src/components/Pager.vue.js +1 -0
- package/dist/lib/src/Grid/src/components/QueryBar.css +1 -0
- package/dist/lib/src/Grid/src/components/QueryBar.vue.js +1 -0
- package/dist/lib/src/Grid/src/composables/useCellEditor.js +1 -0
- package/dist/lib/src/Grid/src/composables/useGridTable.js +1 -0
- package/dist/lib/src/Grid/src/styles/table.css +1 -0
- package/dist/lib/src/Overlay/index.js +1 -0
- package/dist/lib/src/Overlay/src/Message.css +1 -0
- package/dist/lib/src/Overlay/src/Message.vue.js +1 -0
- package/dist/lib/src/Overlay/src/Message2.css +1 -0
- package/dist/lib/src/Overlay/src/Modal.css +1 -0
- package/dist/lib/src/Overlay/src/Modal.vue.js +1 -0
- package/dist/lib/src/Overlay/src/Modal2.css +1 -0
- package/dist/lib/src/Overlay/src/Notice.css +1 -0
- package/dist/lib/src/Overlay/src/Notice.vue.js +1 -0
- package/dist/lib/src/Overlay/src/Notice2.css +1 -0
- package/dist/lib/src/index.js +1 -1
- package/dist/lib/src/locale/lang/en-US.js +1 -1
- package/dist/lib/src/locale/lang/ja-JP.js +1 -1
- package/dist/lib/src/locale/lang/zh-CN.js +1 -1
- package/dist/lib/src/styles/tokens.css +1 -1
- package/package.json +11 -8
|
@@ -43,9 +43,9 @@ k.isolate = new k({ deserialize: (l) => {
|
|
|
43
43
|
k.contextHash = new k({ perNode: !0 });
|
|
44
44
|
k.lookAhead = new k({ perNode: !0 });
|
|
45
45
|
k.mounted = new k({ perNode: !0 });
|
|
46
|
-
class
|
|
47
|
-
constructor(e, t, r) {
|
|
48
|
-
this.tree = e, this.overlay = t, this.parser = r;
|
|
46
|
+
class V {
|
|
47
|
+
constructor(e, t, r, i = !1) {
|
|
48
|
+
this.tree = e, this.overlay = t, this.parser = r, this.bracketed = i;
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
51
|
@internal
|
|
@@ -175,8 +175,8 @@ class ae {
|
|
|
175
175
|
let s = n(r);
|
|
176
176
|
if (s) {
|
|
177
177
|
i || (i = Object.assign({}, r.props));
|
|
178
|
-
let h = s[1],
|
|
179
|
-
|
|
178
|
+
let h = s[1], u = s[0];
|
|
179
|
+
u.combine && u.id in i && (h = u.combine(i[u.id], h)), i[u.id] = h;
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
t.push(i ? new j(r.name, i, r.id, r.flags) : r);
|
|
@@ -184,12 +184,12 @@ class ae {
|
|
|
184
184
|
return new ae(t);
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
-
const
|
|
188
|
-
var
|
|
187
|
+
const Q = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap();
|
|
188
|
+
var _;
|
|
189
189
|
(function(l) {
|
|
190
|
-
l[l.ExcludeBuffers = 1] = "ExcludeBuffers", l[l.IncludeAnonymous = 2] = "IncludeAnonymous", l[l.IgnoreMounts = 4] = "IgnoreMounts", l[l.IgnoreOverlays = 8] = "IgnoreOverlays";
|
|
191
|
-
})(
|
|
192
|
-
class
|
|
190
|
+
l[l.ExcludeBuffers = 1] = "ExcludeBuffers", l[l.IncludeAnonymous = 2] = "IncludeAnonymous", l[l.IgnoreMounts = 4] = "IgnoreMounts", l[l.IgnoreOverlays = 8] = "IgnoreOverlays", l[l.EnterBracketed = 16] = "EnterBracketed";
|
|
191
|
+
})(_ || (_ = {}));
|
|
192
|
+
class P {
|
|
193
193
|
/**
|
|
194
194
|
Construct a new tree. See also [`Tree.build`](#common.Tree^build).
|
|
195
195
|
*/
|
|
@@ -204,7 +204,7 @@ class O {
|
|
|
204
204
|
@internal
|
|
205
205
|
*/
|
|
206
206
|
toString() {
|
|
207
|
-
let e =
|
|
207
|
+
let e = V.get(this);
|
|
208
208
|
if (e && !e.overlay)
|
|
209
209
|
return e.tree.toString();
|
|
210
210
|
let t = "";
|
|
@@ -228,8 +228,8 @@ class O {
|
|
|
228
228
|
[`moveTo`](#common.TreeCursor.moveTo).
|
|
229
229
|
*/
|
|
230
230
|
cursorAt(e, t = 0, r = 0) {
|
|
231
|
-
let i =
|
|
232
|
-
return n.moveTo(e, t),
|
|
231
|
+
let i = Q.get(this) || this.topNode, n = new te(i);
|
|
232
|
+
return n.moveTo(e, t), Q.set(this, n._tree), n;
|
|
233
233
|
}
|
|
234
234
|
/**
|
|
235
235
|
Get a [syntax node](#common.SyntaxNode) object for the top of the
|
|
@@ -250,8 +250,8 @@ class O {
|
|
|
250
250
|
[`resolveInner`](#common.Tree.resolveInner) instead.
|
|
251
251
|
*/
|
|
252
252
|
resolve(e, t = 0) {
|
|
253
|
-
let r =
|
|
254
|
-
return
|
|
253
|
+
let r = $(Q.get(this) || this.topNode, e, t, !1);
|
|
254
|
+
return Q.set(this, r), r;
|
|
255
255
|
}
|
|
256
256
|
/**
|
|
257
257
|
Like [`resolve`](#common.Tree.resolve), but will enter
|
|
@@ -261,7 +261,7 @@ class O {
|
|
|
261
261
|
the host trees).
|
|
262
262
|
*/
|
|
263
263
|
resolveInner(e, t = 0) {
|
|
264
|
-
let r =
|
|
264
|
+
let r = $(fe.get(this) || this.topNode, e, t, !0);
|
|
265
265
|
return fe.set(this, r), r;
|
|
266
266
|
}
|
|
267
267
|
/**
|
|
@@ -282,16 +282,16 @@ class O {
|
|
|
282
282
|
not have its children iterated over (or `leave` called).
|
|
283
283
|
*/
|
|
284
284
|
iterate(e) {
|
|
285
|
-
let { enter: t, leave: r, from: i = 0, to: n = this.length } = e, s = e.mode || 0, h = (s &
|
|
286
|
-
for (let
|
|
285
|
+
let { enter: t, leave: r, from: i = 0, to: n = this.length } = e, s = e.mode || 0, h = (s & _.IncludeAnonymous) > 0;
|
|
286
|
+
for (let u = this.cursor(s | _.IncludeAnonymous); ; ) {
|
|
287
287
|
let C = !1;
|
|
288
|
-
if (
|
|
289
|
-
if (
|
|
288
|
+
if (u.from <= n && u.to >= i && (!h && u.type.isAnonymous || t(u) !== !1)) {
|
|
289
|
+
if (u.firstChild())
|
|
290
290
|
continue;
|
|
291
291
|
C = !0;
|
|
292
292
|
}
|
|
293
|
-
for (; C && r && (h || !
|
|
294
|
-
if (!
|
|
293
|
+
for (; C && r && (h || !u.type.isAnonymous) && r(u), !u.nextSibling(); ) {
|
|
294
|
+
if (!u.parent())
|
|
295
295
|
return;
|
|
296
296
|
C = !0;
|
|
297
297
|
}
|
|
@@ -322,7 +322,7 @@ class O {
|
|
|
322
322
|
[`NodeType.none`](#common.NodeType^none).
|
|
323
323
|
*/
|
|
324
324
|
balance(e = {}) {
|
|
325
|
-
return this.children.length <= 8 ? this : se(j.none, this.children, this.positions, 0, this.children.length, 0, this.length, (t, r, i) => new
|
|
325
|
+
return this.children.length <= 8 ? this : se(j.none, this.children, this.positions, 0, this.children.length, 0, this.length, (t, r, i) => new P(this.type, t, r, i, this.propValues), e.makeTree || ((t, r, i) => new P(j.none, t, r, i)));
|
|
326
326
|
}
|
|
327
327
|
/**
|
|
328
328
|
Build a tree from a postfix-ordered buffer of node information,
|
|
@@ -332,7 +332,7 @@ class O {
|
|
|
332
332
|
return we(e);
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
|
-
|
|
335
|
+
P.empty = new P(j.none, [], [], 0);
|
|
336
336
|
class ie {
|
|
337
337
|
constructor(e, t) {
|
|
338
338
|
this.buffer = e, this.index = t;
|
|
@@ -359,7 +359,7 @@ class ie {
|
|
|
359
359
|
return new ie(this.buffer, this.index);
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
|
-
class
|
|
362
|
+
class M {
|
|
363
363
|
/**
|
|
364
364
|
Create a tree buffer.
|
|
365
365
|
*/
|
|
@@ -398,7 +398,7 @@ class W {
|
|
|
398
398
|
*/
|
|
399
399
|
findChild(e, t, r, i, n) {
|
|
400
400
|
let { buffer: s } = this, h = -1;
|
|
401
|
-
for (let
|
|
401
|
+
for (let u = e; u != t && !(pe(n, i, s[u + 1], s[u + 2]) && (h = u, r > 0)); u = s[u + 3])
|
|
402
402
|
;
|
|
403
403
|
return h;
|
|
404
404
|
}
|
|
@@ -407,12 +407,12 @@ class W {
|
|
|
407
407
|
*/
|
|
408
408
|
slice(e, t, r) {
|
|
409
409
|
let i = this.buffer, n = new Uint16Array(t - e), s = 0;
|
|
410
|
-
for (let h = e,
|
|
411
|
-
n[
|
|
412
|
-
let C = n[
|
|
413
|
-
n[
|
|
410
|
+
for (let h = e, u = 0; h < t; ) {
|
|
411
|
+
n[u++] = i[h++], n[u++] = i[h++] - r;
|
|
412
|
+
let C = n[u++] = i[h++] - r;
|
|
413
|
+
n[u++] = i[h++] - e, s = Math.max(s, C);
|
|
414
414
|
}
|
|
415
|
-
return new
|
|
415
|
+
return new M(n, s, this.set);
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
418
|
function pe(l, e, t, r) {
|
|
@@ -431,14 +431,14 @@ function pe(l, e, t, r) {
|
|
|
431
431
|
return !0;
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function $(l, e, t, r) {
|
|
435
435
|
for (var i; l.from == l.to || (t < 1 ? l.from >= e : l.from > e) || (t > -1 ? l.to <= e : l.to < e); ) {
|
|
436
436
|
let s = !r && l instanceof z && l.index < 0 ? null : l.parent;
|
|
437
437
|
if (!s)
|
|
438
438
|
return l;
|
|
439
439
|
l = s;
|
|
440
440
|
}
|
|
441
|
-
let n = r ? 0 :
|
|
441
|
+
let n = r ? 0 : _.IgnoreOverlays;
|
|
442
442
|
if (r)
|
|
443
443
|
for (let s = l, h = s.parent; h; s = h, h = s.parent)
|
|
444
444
|
s instanceof z && s.index < 0 && ((i = h.enter(e, t, n)) === null || i === void 0 ? void 0 : i.from) != s.from && (l = h);
|
|
@@ -461,10 +461,10 @@ class de {
|
|
|
461
461
|
return ue(this, e, t, r);
|
|
462
462
|
}
|
|
463
463
|
resolve(e, t = 0) {
|
|
464
|
-
return
|
|
464
|
+
return $(this, e, t, !1);
|
|
465
465
|
}
|
|
466
466
|
resolveInner(e, t = 0) {
|
|
467
|
-
return
|
|
467
|
+
return $(this, e, t, !0);
|
|
468
468
|
}
|
|
469
469
|
matchContext(e) {
|
|
470
470
|
return ee(this.parent, e);
|
|
@@ -500,26 +500,27 @@ class z extends de {
|
|
|
500
500
|
return this.from + this._tree.length;
|
|
501
501
|
}
|
|
502
502
|
nextChild(e, t, r, i, n = 0) {
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
503
|
+
var s;
|
|
504
|
+
for (let h = this; ; ) {
|
|
505
|
+
for (let { children: u, positions: C } = h._tree, v = t > 0 ? u.length : -1; e != v; e += t) {
|
|
506
|
+
let p = u[e], x = C[e] + h.from;
|
|
507
|
+
if (!(!(n & _.EnterBracketed && p instanceof P && ((s = V.get(p)) === null || s === void 0 ? void 0 : s.overlay) === null && (x >= r || x + p.length <= r)) && !pe(i, r, x, x + p.length))) {
|
|
508
|
+
if (p instanceof M) {
|
|
509
|
+
if (n & _.ExcludeBuffers)
|
|
509
510
|
continue;
|
|
510
|
-
let
|
|
511
|
-
if (
|
|
512
|
-
return new
|
|
513
|
-
} else if (n &
|
|
514
|
-
let
|
|
515
|
-
if (!(n &
|
|
516
|
-
return new z(
|
|
517
|
-
let
|
|
518
|
-
return n &
|
|
511
|
+
let N = p.findChild(0, p.buffer.length, t, r - x, i);
|
|
512
|
+
if (N > -1)
|
|
513
|
+
return new O(new be(h, p, e, x), null, N);
|
|
514
|
+
} else if (n & _.IncludeAnonymous || !p.type.isAnonymous || ne(p)) {
|
|
515
|
+
let N;
|
|
516
|
+
if (!(n & _.IgnoreMounts) && (N = V.get(p)) && !N.overlay)
|
|
517
|
+
return new z(N.tree, x, e, h);
|
|
518
|
+
let S = new z(p, x, e, h);
|
|
519
|
+
return n & _.IncludeAnonymous || !S.type.isAnonymous ? S : S.nextChild(t < 0 ? p.children.length - 1 : 0, t, r, i, n);
|
|
519
520
|
}
|
|
520
521
|
}
|
|
521
522
|
}
|
|
522
|
-
if (n &
|
|
523
|
+
if (n & _.IncludeAnonymous || !h.type.isAnonymous || (h.index >= 0 ? e = h.index + t : e = t < 0 ? -1 : h._parent._tree.children.length, h = h._parent, !h))
|
|
523
524
|
return null;
|
|
524
525
|
}
|
|
525
526
|
}
|
|
@@ -564,10 +565,10 @@ class z extends de {
|
|
|
564
565
|
}
|
|
565
566
|
enter(e, t, r = 0) {
|
|
566
567
|
let i;
|
|
567
|
-
if (!(r &
|
|
568
|
-
let n = e - this.from;
|
|
569
|
-
for (let { from:
|
|
570
|
-
if ((t > 0
|
|
568
|
+
if (!(r & _.IgnoreOverlays) && (i = V.get(this._tree)) && i.overlay) {
|
|
569
|
+
let n = e - this.from, s = r & _.EnterBracketed && i.bracketed;
|
|
570
|
+
for (let { from: h, to: u } of i.overlay)
|
|
571
|
+
if ((t > 0 || s ? h <= n : h < n) && (t < 0 || s ? u >= n : u > n))
|
|
571
572
|
return new z(i.tree, i.overlay[0].from + this.from, -1, this);
|
|
572
573
|
}
|
|
573
574
|
return this.nextChild(0, 1, e, t, r);
|
|
@@ -640,12 +641,12 @@ function ee(l, e, t = e.length - 1) {
|
|
|
640
641
|
}
|
|
641
642
|
return !0;
|
|
642
643
|
}
|
|
643
|
-
class
|
|
644
|
+
class be {
|
|
644
645
|
constructor(e, t, r, i) {
|
|
645
646
|
this.parent = e, this.buffer = t, this.index = r, this.start = i;
|
|
646
647
|
}
|
|
647
648
|
}
|
|
648
|
-
class
|
|
649
|
+
class O extends de {
|
|
649
650
|
get name() {
|
|
650
651
|
return this.type.name;
|
|
651
652
|
}
|
|
@@ -660,7 +661,7 @@ class E extends de {
|
|
|
660
661
|
}
|
|
661
662
|
child(e, t, r) {
|
|
662
663
|
let { buffer: i } = this.context, n = i.findChild(this.index + 4, i.buffer[this.index + 3], e, t - this.context.start, r);
|
|
663
|
-
return n < 0 ? null : new
|
|
664
|
+
return n < 0 ? null : new O(this.context, this, n);
|
|
664
665
|
}
|
|
665
666
|
get firstChild() {
|
|
666
667
|
return this.child(
|
|
@@ -698,10 +699,10 @@ class E extends de {
|
|
|
698
699
|
return this.type.prop(e);
|
|
699
700
|
}
|
|
700
701
|
enter(e, t, r = 0) {
|
|
701
|
-
if (r &
|
|
702
|
+
if (r & _.ExcludeBuffers)
|
|
702
703
|
return null;
|
|
703
704
|
let { buffer: i } = this.context, n = i.findChild(this.index + 4, i.buffer[this.index + 3], t > 0 ? 1 : -1, e - this.context.start, t);
|
|
704
|
-
return n < 0 ? null : new
|
|
705
|
+
return n < 0 ? null : new O(this.context, this, n);
|
|
705
706
|
}
|
|
706
707
|
get parent() {
|
|
707
708
|
return this._parent || this.context.parent.nextSignificantParent();
|
|
@@ -717,11 +718,11 @@ class E extends de {
|
|
|
717
718
|
}
|
|
718
719
|
get nextSibling() {
|
|
719
720
|
let { buffer: e } = this.context, t = e.buffer[this.index + 3];
|
|
720
|
-
return t < (this._parent ? e.buffer[this._parent.index + 3] : e.buffer.length) ? new
|
|
721
|
+
return t < (this._parent ? e.buffer[this._parent.index + 3] : e.buffer.length) ? new O(this.context, this._parent, t) : this.externalSibling(1);
|
|
721
722
|
}
|
|
722
723
|
get prevSibling() {
|
|
723
724
|
let { buffer: e } = this.context, t = this._parent ? this._parent.index + 4 : 0;
|
|
724
|
-
return this.index == t ? this.externalSibling(-1) : new
|
|
725
|
+
return this.index == t ? this.externalSibling(-1) : new O(this.context, this._parent, e.findChild(
|
|
725
726
|
t,
|
|
726
727
|
this.index,
|
|
727
728
|
-1,
|
|
@@ -739,7 +740,7 @@ class E extends de {
|
|
|
739
740
|
let s = r.buffer[this.index + 1];
|
|
740
741
|
e.push(r.slice(i, n, s)), t.push(0);
|
|
741
742
|
}
|
|
742
|
-
return new
|
|
743
|
+
return new P(this.type, e, t, this.to - this.from);
|
|
743
744
|
}
|
|
744
745
|
/**
|
|
745
746
|
@internal
|
|
@@ -757,9 +758,9 @@ function ce(l) {
|
|
|
757
758
|
(s.from > t.from || s.to < t.to) && (t = s, e = n);
|
|
758
759
|
}
|
|
759
760
|
let r = t instanceof z && t.index < 0 ? null : t.parent, i = l.slice();
|
|
760
|
-
return r ? i[e] = r : i.splice(e, 1), new
|
|
761
|
+
return r ? i[e] = r : i.splice(e, 1), new ye(i, t);
|
|
761
762
|
}
|
|
762
|
-
class
|
|
763
|
+
class ye {
|
|
763
764
|
constructor(e, t) {
|
|
764
765
|
this.heads = e, this.node = t;
|
|
765
766
|
}
|
|
@@ -774,10 +775,10 @@ function me(l, e, t) {
|
|
|
774
775
|
let s = n.parent;
|
|
775
776
|
(i || (i = [r])).push(s.resolve(e, t)), n = s;
|
|
776
777
|
} else {
|
|
777
|
-
let s =
|
|
778
|
+
let s = V.get(n.tree);
|
|
778
779
|
if (s && s.overlay && s.overlay[0].from <= e && s.overlay[s.overlay.length - 1].to >= e) {
|
|
779
780
|
let h = new z(s.tree, s.overlay[0].from + n.from, -1, n);
|
|
780
|
-
(i || (i = [r])).push(
|
|
781
|
+
(i || (i = [r])).push($(h, e, t, !1));
|
|
781
782
|
}
|
|
782
783
|
}
|
|
783
784
|
return i ? ce(i) : r;
|
|
@@ -793,7 +794,7 @@ class te {
|
|
|
793
794
|
@internal
|
|
794
795
|
*/
|
|
795
796
|
constructor(e, t = 0) {
|
|
796
|
-
if (this.
|
|
797
|
+
if (this.buffer = null, this.stack = [], this.index = 0, this.bufferNode = null, this.mode = t & ~_.EnterBracketed, e instanceof z)
|
|
797
798
|
this.yieldNode(e);
|
|
798
799
|
else {
|
|
799
800
|
this._tree = e.context.parent, this.buffer = e.context;
|
|
@@ -884,17 +885,17 @@ class te {
|
|
|
884
885
|
set to false.
|
|
885
886
|
*/
|
|
886
887
|
enter(e, t, r = this.mode) {
|
|
887
|
-
return this.buffer ? r &
|
|
888
|
+
return this.buffer ? r & _.ExcludeBuffers ? !1 : this.enterChild(1, e, t) : this.yield(this._tree.enter(e, t, r));
|
|
888
889
|
}
|
|
889
890
|
/**
|
|
890
891
|
Move to the node's parent node, if this isn't the top node.
|
|
891
892
|
*/
|
|
892
893
|
parent() {
|
|
893
894
|
if (!this.buffer)
|
|
894
|
-
return this.yieldNode(this.mode &
|
|
895
|
+
return this.yieldNode(this.mode & _.IncludeAnonymous ? this._tree._parent : this._tree.parent);
|
|
895
896
|
if (this.stack.length)
|
|
896
897
|
return this.yieldBuf(this.stack.pop());
|
|
897
|
-
let e = this.mode &
|
|
898
|
+
let e = this.mode & _.IncludeAnonymous ? this.buffer.parent : this.buffer.parent.nextSignificantParent();
|
|
898
899
|
return this.buffer = null, this.yieldNode(e);
|
|
899
900
|
}
|
|
900
901
|
/**
|
|
@@ -951,7 +952,7 @@ class te {
|
|
|
951
952
|
if (t > -1)
|
|
952
953
|
for (let n = t + e, s = e < 0 ? -1 : r._tree.children.length; n != s; n += e) {
|
|
953
954
|
let h = r._tree.children[n];
|
|
954
|
-
if (this.mode &
|
|
955
|
+
if (this.mode & _.IncludeAnonymous || h instanceof M || !h.type.isAnonymous || ne(h))
|
|
955
956
|
return !1;
|
|
956
957
|
}
|
|
957
958
|
return !0;
|
|
@@ -1022,8 +1023,8 @@ class te {
|
|
|
1022
1023
|
i = this.stack[--n];
|
|
1023
1024
|
}
|
|
1024
1025
|
for (let i = r; i < this.stack.length; i++)
|
|
1025
|
-
t = new
|
|
1026
|
-
return this.bufferNode = new
|
|
1026
|
+
t = new O(this.buffer, t, this.stack[i]);
|
|
1027
|
+
return this.bufferNode = new O(this.buffer, t, this.index);
|
|
1027
1028
|
}
|
|
1028
1029
|
/**
|
|
1029
1030
|
Get the [tree](#common.Tree) that represents the current node, if
|
|
@@ -1081,187 +1082,187 @@ class te {
|
|
|
1081
1082
|
}
|
|
1082
1083
|
}
|
|
1083
1084
|
function ne(l) {
|
|
1084
|
-
return l.children.some((e) => e instanceof
|
|
1085
|
+
return l.children.some((e) => e instanceof M || !e.type.isAnonymous || ne(e));
|
|
1085
1086
|
}
|
|
1086
1087
|
function we(l) {
|
|
1087
1088
|
var e;
|
|
1088
|
-
let { buffer: t, nodeSet: r, maxBufferLength: i = 1024, reused: n = [], minRepeatType: s = r.types.length } = l, h = Array.isArray(t) ? new ie(t, t.length) : t,
|
|
1089
|
-
function
|
|
1090
|
-
let { id: a, start:
|
|
1089
|
+
let { buffer: t, nodeSet: r, maxBufferLength: i = 1024, reused: n = [], minRepeatType: s = r.types.length } = l, h = Array.isArray(t) ? new ie(t, t.length) : t, u = r.types, C = 0, v = 0;
|
|
1090
|
+
function p(c, b, f, m, d, w) {
|
|
1091
|
+
let { id: a, start: o, end: g, size: y } = h, A = v, W = C;
|
|
1091
1092
|
if (y < 0)
|
|
1092
1093
|
if (h.next(), y == -1) {
|
|
1093
1094
|
let R = n[a];
|
|
1094
|
-
f.push(R),
|
|
1095
|
+
f.push(R), m.push(o - c);
|
|
1095
1096
|
return;
|
|
1096
1097
|
} else if (y == -3) {
|
|
1097
1098
|
C = a;
|
|
1098
1099
|
return;
|
|
1099
1100
|
} else if (y == -4) {
|
|
1100
|
-
|
|
1101
|
+
v = a;
|
|
1101
1102
|
return;
|
|
1102
1103
|
} else
|
|
1103
1104
|
throw new RangeError(`Unrecognized record size: ${y}`);
|
|
1104
|
-
let J =
|
|
1105
|
-
if (g -
|
|
1106
|
-
let R = new Uint16Array(D.size - D.skip),
|
|
1107
|
-
for (; h.pos >
|
|
1108
|
-
|
|
1109
|
-
|
|
1105
|
+
let J = u[a], q, D, le = o - c;
|
|
1106
|
+
if (g - o <= i && (D = Y(h.pos - b, d))) {
|
|
1107
|
+
let R = new Uint16Array(D.size - D.skip), I = h.pos - D.size, E = R.length;
|
|
1108
|
+
for (; h.pos > I; )
|
|
1109
|
+
E = G(D.start, R, E);
|
|
1110
|
+
q = new M(R, g - D.start, r), le = D.start - c;
|
|
1110
1111
|
} else {
|
|
1111
1112
|
let R = h.pos - y;
|
|
1112
1113
|
h.next();
|
|
1113
|
-
let
|
|
1114
|
+
let I = [], E = [], F = a >= s ? a : -1, H = 0, K = g;
|
|
1114
1115
|
for (; h.pos > R; )
|
|
1115
|
-
F >= 0 && h.id == F && h.size >= 0 ? (h.end <=
|
|
1116
|
-
if (F >= 0 && H > 0 && H <
|
|
1117
|
-
let he =
|
|
1118
|
-
|
|
1116
|
+
F >= 0 && h.id == F && h.size >= 0 ? (h.end <= K - i && (S(I, E, o, H, h.end, K, F, A, W), H = I.length, K = h.end), h.next()) : w > 2500 ? x(o, R, I, E) : p(o, R, I, E, F, w + 1);
|
|
1117
|
+
if (F >= 0 && H > 0 && H < I.length && S(I, E, o, H, o, K, F, A, W), I.reverse(), E.reverse(), F > -1 && H > 0) {
|
|
1118
|
+
let he = N(J, W);
|
|
1119
|
+
q = se(J, I, E, 0, I.length, 0, g - o, he, he);
|
|
1119
1120
|
} else
|
|
1120
|
-
|
|
1121
|
+
q = L(J, I, E, g - o, A - g, W);
|
|
1121
1122
|
}
|
|
1122
|
-
f.push(
|
|
1123
|
+
f.push(q), m.push(le);
|
|
1123
1124
|
}
|
|
1124
|
-
function
|
|
1125
|
-
let
|
|
1126
|
-
for (; h.pos >
|
|
1127
|
-
let { id:
|
|
1128
|
-
if (
|
|
1125
|
+
function x(c, b, f, m) {
|
|
1126
|
+
let d = [], w = 0, a = -1;
|
|
1127
|
+
for (; h.pos > b; ) {
|
|
1128
|
+
let { id: o, start: g, end: y, size: A } = h;
|
|
1129
|
+
if (A > 4)
|
|
1129
1130
|
h.next();
|
|
1130
1131
|
else {
|
|
1131
1132
|
if (a > -1 && g < a)
|
|
1132
1133
|
break;
|
|
1133
|
-
a < 0 && (a = y - i),
|
|
1134
|
+
a < 0 && (a = y - i), d.push(o, g, y), w++, h.next();
|
|
1134
1135
|
}
|
|
1135
1136
|
}
|
|
1136
|
-
if (
|
|
1137
|
-
let
|
|
1138
|
-
for (let y =
|
|
1139
|
-
|
|
1140
|
-
f.push(new
|
|
1137
|
+
if (w) {
|
|
1138
|
+
let o = new Uint16Array(w * 4), g = d[d.length - 2];
|
|
1139
|
+
for (let y = d.length - 3, A = 0; y >= 0; y -= 3)
|
|
1140
|
+
o[A++] = d[y], o[A++] = d[y + 1] - g, o[A++] = d[y + 2] - g, o[A++] = A;
|
|
1141
|
+
f.push(new M(o, d[2] - g, r)), m.push(g - c);
|
|
1141
1142
|
}
|
|
1142
1143
|
}
|
|
1143
|
-
function
|
|
1144
|
-
return (f,
|
|
1145
|
-
let
|
|
1146
|
-
if (a >= 0 && (
|
|
1147
|
-
if (!a &&
|
|
1148
|
-
return
|
|
1149
|
-
(g =
|
|
1144
|
+
function N(c, b) {
|
|
1145
|
+
return (f, m, d) => {
|
|
1146
|
+
let w = 0, a = f.length - 1, o, g;
|
|
1147
|
+
if (a >= 0 && (o = f[a]) instanceof P) {
|
|
1148
|
+
if (!a && o.type == c && o.length == d)
|
|
1149
|
+
return o;
|
|
1150
|
+
(g = o.prop(k.lookAhead)) && (w = m[a] + o.length + g);
|
|
1150
1151
|
}
|
|
1151
|
-
return
|
|
1152
|
+
return L(c, f, m, d, w, b);
|
|
1152
1153
|
};
|
|
1153
1154
|
}
|
|
1154
|
-
function
|
|
1155
|
-
let y = [],
|
|
1156
|
-
for (; c.length >
|
|
1157
|
-
y.push(c.pop()),
|
|
1158
|
-
c.push(
|
|
1155
|
+
function S(c, b, f, m, d, w, a, o, g) {
|
|
1156
|
+
let y = [], A = [];
|
|
1157
|
+
for (; c.length > m; )
|
|
1158
|
+
y.push(c.pop()), A.push(b.pop() + f - d);
|
|
1159
|
+
c.push(L(r.types[a], y, A, w - d, o - w, g)), b.push(d - f);
|
|
1159
1160
|
}
|
|
1160
|
-
function
|
|
1161
|
-
if (
|
|
1162
|
-
let
|
|
1163
|
-
a = a ? [
|
|
1161
|
+
function L(c, b, f, m, d, w, a) {
|
|
1162
|
+
if (w) {
|
|
1163
|
+
let o = [k.contextHash, w];
|
|
1164
|
+
a = a ? [o].concat(a) : [o];
|
|
1164
1165
|
}
|
|
1165
|
-
if (
|
|
1166
|
-
let
|
|
1167
|
-
a = a ? [
|
|
1166
|
+
if (d > 25) {
|
|
1167
|
+
let o = [k.lookAhead, d];
|
|
1168
|
+
a = a ? [o].concat(a) : [o];
|
|
1168
1169
|
}
|
|
1169
|
-
return new
|
|
1170
|
+
return new P(c, b, f, m, a);
|
|
1170
1171
|
}
|
|
1171
|
-
function Y(c,
|
|
1172
|
-
let f = h.fork(),
|
|
1172
|
+
function Y(c, b) {
|
|
1173
|
+
let f = h.fork(), m = 0, d = 0, w = 0, a = f.end - i, o = { size: 0, start: 0, skip: 0 };
|
|
1173
1174
|
e: for (let g = f.pos - c; f.pos > g; ) {
|
|
1174
1175
|
let y = f.size;
|
|
1175
|
-
if (f.id ==
|
|
1176
|
-
|
|
1176
|
+
if (f.id == b && y >= 0) {
|
|
1177
|
+
o.size = m, o.start = d, o.skip = w, w += 4, m += 4, f.next();
|
|
1177
1178
|
continue;
|
|
1178
1179
|
}
|
|
1179
|
-
let
|
|
1180
|
-
if (y < 0 ||
|
|
1180
|
+
let A = f.pos - y;
|
|
1181
|
+
if (y < 0 || A < g || f.start < a)
|
|
1181
1182
|
break;
|
|
1182
|
-
let
|
|
1183
|
-
for (f.next(); f.pos >
|
|
1183
|
+
let W = f.id >= s ? 4 : 0, J = f.start;
|
|
1184
|
+
for (f.next(); f.pos > A; ) {
|
|
1184
1185
|
if (f.size < 0)
|
|
1185
1186
|
if (f.size == -3 || f.size == -4)
|
|
1186
|
-
|
|
1187
|
+
W += 4;
|
|
1187
1188
|
else
|
|
1188
1189
|
break e;
|
|
1189
|
-
else f.id >= s && (
|
|
1190
|
+
else f.id >= s && (W += 4);
|
|
1190
1191
|
f.next();
|
|
1191
1192
|
}
|
|
1192
|
-
|
|
1193
|
+
d = J, m += y, w += W;
|
|
1193
1194
|
}
|
|
1194
|
-
return (
|
|
1195
|
+
return (b < 0 || m == c) && (o.size = m, o.start = d, o.skip = w), o.size > 4 ? o : void 0;
|
|
1195
1196
|
}
|
|
1196
|
-
function G(c,
|
|
1197
|
-
let { id:
|
|
1198
|
-
if (h.next(), a >= 0 &&
|
|
1199
|
-
let
|
|
1197
|
+
function G(c, b, f) {
|
|
1198
|
+
let { id: m, start: d, end: w, size: a } = h;
|
|
1199
|
+
if (h.next(), a >= 0 && m < s) {
|
|
1200
|
+
let o = f;
|
|
1200
1201
|
if (a > 4) {
|
|
1201
1202
|
let g = h.pos - (a - 4);
|
|
1202
1203
|
for (; h.pos > g; )
|
|
1203
|
-
f = G(c,
|
|
1204
|
+
f = G(c, b, f);
|
|
1204
1205
|
}
|
|
1205
|
-
|
|
1206
|
-
} else a == -3 ? C =
|
|
1206
|
+
b[--f] = o, b[--f] = w - c, b[--f] = d - c, b[--f] = m;
|
|
1207
|
+
} else a == -3 ? C = m : a == -4 && (v = m);
|
|
1207
1208
|
return f;
|
|
1208
1209
|
}
|
|
1209
|
-
let T = [],
|
|
1210
|
+
let T = [], B = [];
|
|
1210
1211
|
for (; h.pos > 0; )
|
|
1211
|
-
|
|
1212
|
-
let U = (e = l.length) !== null && e !== void 0 ? e : T.length ?
|
|
1213
|
-
return new
|
|
1212
|
+
p(l.start || 0, l.bufferStart || 0, T, B, -1, 0);
|
|
1213
|
+
let U = (e = l.length) !== null && e !== void 0 ? e : T.length ? B[0] + T[0].length : 0;
|
|
1214
|
+
return new P(u[l.topID], T.reverse(), B.reverse(), U);
|
|
1214
1215
|
}
|
|
1215
1216
|
const oe = /* @__PURE__ */ new WeakMap();
|
|
1216
|
-
function
|
|
1217
|
-
if (!l.isAnonymous || e instanceof
|
|
1217
|
+
function X(l, e) {
|
|
1218
|
+
if (!l.isAnonymous || e instanceof M || e.type != l)
|
|
1218
1219
|
return 1;
|
|
1219
1220
|
let t = oe.get(e);
|
|
1220
1221
|
if (t == null) {
|
|
1221
1222
|
t = 1;
|
|
1222
1223
|
for (let r of e.children) {
|
|
1223
|
-
if (r.type != l || !(r instanceof
|
|
1224
|
+
if (r.type != l || !(r instanceof P)) {
|
|
1224
1225
|
t = 1;
|
|
1225
1226
|
break;
|
|
1226
1227
|
}
|
|
1227
|
-
t +=
|
|
1228
|
+
t += X(l, r);
|
|
1228
1229
|
}
|
|
1229
1230
|
oe.set(e, t);
|
|
1230
1231
|
}
|
|
1231
1232
|
return t;
|
|
1232
1233
|
}
|
|
1233
|
-
function se(l, e, t, r, i, n, s, h,
|
|
1234
|
+
function se(l, e, t, r, i, n, s, h, u) {
|
|
1234
1235
|
let C = 0;
|
|
1235
|
-
for (let
|
|
1236
|
-
C +=
|
|
1237
|
-
let
|
|
1236
|
+
for (let S = r; S < i; S++)
|
|
1237
|
+
C += X(l, e[S]);
|
|
1238
|
+
let v = Math.ceil(
|
|
1238
1239
|
C * 1.5 / 8
|
|
1239
1240
|
/* Balance.BranchFactor */
|
|
1240
|
-
),
|
|
1241
|
-
function
|
|
1242
|
-
for (let
|
|
1243
|
-
let U =
|
|
1244
|
-
for (
|
|
1245
|
-
let f =
|
|
1246
|
-
if (
|
|
1241
|
+
), p = [], x = [];
|
|
1242
|
+
function N(S, L, Y, G, T) {
|
|
1243
|
+
for (let B = Y; B < G; ) {
|
|
1244
|
+
let U = B, c = L[B], b = X(l, S[B]);
|
|
1245
|
+
for (B++; B < G; B++) {
|
|
1246
|
+
let f = X(l, S[B]);
|
|
1247
|
+
if (b + f >= v)
|
|
1247
1248
|
break;
|
|
1248
|
-
|
|
1249
|
+
b += f;
|
|
1249
1250
|
}
|
|
1250
|
-
if (
|
|
1251
|
-
if (
|
|
1252
|
-
let f =
|
|
1253
|
-
|
|
1251
|
+
if (B == U + 1) {
|
|
1252
|
+
if (b > v) {
|
|
1253
|
+
let f = S[U];
|
|
1254
|
+
N(f.children, f.positions, 0, f.children.length, L[U] + T);
|
|
1254
1255
|
continue;
|
|
1255
1256
|
}
|
|
1256
|
-
|
|
1257
|
+
p.push(S[U]);
|
|
1257
1258
|
} else {
|
|
1258
|
-
let f =
|
|
1259
|
-
|
|
1259
|
+
let f = L[B - 1] + S[B - 1].length - c;
|
|
1260
|
+
p.push(se(l, S, L, U, B, c, f, null, u));
|
|
1260
1261
|
}
|
|
1261
|
-
|
|
1262
|
+
x.push(c + T - n);
|
|
1262
1263
|
}
|
|
1263
1264
|
}
|
|
1264
|
-
return
|
|
1265
|
+
return N(e, t, r, i, 0), (h || u)(p, x, s);
|
|
1265
1266
|
}
|
|
1266
1267
|
class Se {
|
|
1267
1268
|
constructor() {
|
|
@@ -1279,13 +1280,13 @@ class Se {
|
|
|
1279
1280
|
Set the value for this syntax node.
|
|
1280
1281
|
*/
|
|
1281
1282
|
set(e, t) {
|
|
1282
|
-
e instanceof
|
|
1283
|
+
e instanceof O ? this.setBuffer(e.context.buffer, e.index, t) : e instanceof z && this.map.set(e.tree, t);
|
|
1283
1284
|
}
|
|
1284
1285
|
/**
|
|
1285
1286
|
Retrieve value for this syntax node, if it exists in the map.
|
|
1286
1287
|
*/
|
|
1287
1288
|
get(e) {
|
|
1288
|
-
return e instanceof
|
|
1289
|
+
return e instanceof O ? this.getBuffer(e.context.buffer, e.index) : e instanceof z ? this.map.get(e.tree) : void 0;
|
|
1289
1290
|
}
|
|
1290
1291
|
/**
|
|
1291
1292
|
Set the value for the node that a cursor currently points to.
|
|
@@ -1350,22 +1351,22 @@ class re {
|
|
|
1350
1351
|
if (!t.length)
|
|
1351
1352
|
return e;
|
|
1352
1353
|
let i = [], n = 1, s = e.length ? e[0] : null;
|
|
1353
|
-
for (let h = 0,
|
|
1354
|
-
let
|
|
1355
|
-
if (
|
|
1356
|
-
for (; s && s.from <
|
|
1357
|
-
let
|
|
1358
|
-
if (
|
|
1359
|
-
let
|
|
1360
|
-
|
|
1354
|
+
for (let h = 0, u = 0, C = 0; ; h++) {
|
|
1355
|
+
let v = h < t.length ? t[h] : null, p = v ? v.fromA : 1e9;
|
|
1356
|
+
if (p - u >= r)
|
|
1357
|
+
for (; s && s.from < p; ) {
|
|
1358
|
+
let x = s;
|
|
1359
|
+
if (u >= x.from || p <= x.to || C) {
|
|
1360
|
+
let N = Math.max(x.from, u) - C, S = Math.min(x.to, p) - C;
|
|
1361
|
+
x = N >= S ? null : new re(N, S, x.tree, x.offset + C, h > 0, !!v);
|
|
1361
1362
|
}
|
|
1362
|
-
if (
|
|
1363
|
+
if (x && i.push(x), s.to > p)
|
|
1363
1364
|
break;
|
|
1364
1365
|
s = n < e.length ? e[n++] : null;
|
|
1365
1366
|
}
|
|
1366
|
-
if (!
|
|
1367
|
+
if (!v)
|
|
1367
1368
|
break;
|
|
1368
|
-
|
|
1369
|
+
u = v.toA, C = v.toA - v.toB;
|
|
1369
1370
|
}
|
|
1370
1371
|
return i;
|
|
1371
1372
|
}
|
|
@@ -1416,15 +1417,15 @@ class ke {
|
|
|
1416
1417
|
new k({ perNode: !0 });
|
|
1417
1418
|
export {
|
|
1418
1419
|
Ce as DefaultBufferLength,
|
|
1419
|
-
|
|
1420
|
-
|
|
1420
|
+
_ as IterMode,
|
|
1421
|
+
V as MountedTree,
|
|
1421
1422
|
k as NodeProp,
|
|
1422
1423
|
ae as NodeSet,
|
|
1423
1424
|
j as NodeType,
|
|
1424
1425
|
Se as NodeWeakMap,
|
|
1425
1426
|
_e as Parser,
|
|
1426
|
-
|
|
1427
|
-
|
|
1427
|
+
P as Tree,
|
|
1428
|
+
M as TreeBuffer,
|
|
1428
1429
|
te as TreeCursor,
|
|
1429
1430
|
re as TreeFragment
|
|
1430
1431
|
};
|