@speclynx/apidom-traverse 2.11.0 → 2.12.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.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [2.12.0](https://github.com/speclynx/apidom/compare/v2.11.0...v2.12.0) (2026-02-18)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @speclynx/apidom-traverse
|
|
9
|
+
|
|
6
10
|
# [2.11.0](https://github.com/speclynx/apidom/compare/v2.10.3...v2.11.0) (2026-02-12)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @speclynx/apidom-traverse
|
|
@@ -11031,6 +11031,52 @@ var both = /*#__PURE__*/(0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["def
|
|
|
11031
11031
|
|
|
11032
11032
|
/***/ },
|
|
11033
11033
|
|
|
11034
|
+
/***/ 8138
|
|
11035
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
11036
|
+
|
|
11037
|
+
__webpack_require__.r(__webpack_exports__);
|
|
11038
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11039
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
11040
|
+
/* harmony export */ });
|
|
11041
|
+
/* harmony import */ var _internal_clone_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8575);
|
|
11042
|
+
/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8938);
|
|
11043
|
+
|
|
11044
|
+
|
|
11045
|
+
|
|
11046
|
+
/**
|
|
11047
|
+
* Creates a deep copy of the source that can be used in place of the source
|
|
11048
|
+
* object without retaining any references to it.
|
|
11049
|
+
* The source object may contain (nested) `Array`s and `Object`s,
|
|
11050
|
+
* `Number`s, `String`s, `Boolean`s and `Date`s.
|
|
11051
|
+
* `Function`s are assigned by reference rather than copied.
|
|
11052
|
+
*
|
|
11053
|
+
* Dispatches to a `clone` method if present.
|
|
11054
|
+
*
|
|
11055
|
+
* Note that if the source object has multiple nodes that share a reference,
|
|
11056
|
+
* the returned object will have the same structure, but the references will
|
|
11057
|
+
* be pointed to the location within the cloned value.
|
|
11058
|
+
*
|
|
11059
|
+
* @func
|
|
11060
|
+
* @memberOf R
|
|
11061
|
+
* @since v0.1.0
|
|
11062
|
+
* @category Object
|
|
11063
|
+
* @sig {*} -> {*}
|
|
11064
|
+
* @param {*} value The object or array to clone
|
|
11065
|
+
* @return {*} A deeply cloned copy of `val`
|
|
11066
|
+
* @example
|
|
11067
|
+
*
|
|
11068
|
+
* const objects = [{}, {}, {}];
|
|
11069
|
+
* const objectsClone = R.clone(objects);
|
|
11070
|
+
* objects === objectsClone; //=> false
|
|
11071
|
+
* objects[0] === objectsClone[0]; //=> false
|
|
11072
|
+
*/
|
|
11073
|
+
var clone = /*#__PURE__*/(0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function clone(value) {
|
|
11074
|
+
return value != null && typeof value.clone === 'function' ? value.clone() : (0,_internal_clone_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value, true);
|
|
11075
|
+
});
|
|
11076
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clone);
|
|
11077
|
+
|
|
11078
|
+
/***/ },
|
|
11079
|
+
|
|
11034
11080
|
/***/ 1323
|
|
11035
11081
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
11036
11082
|
|
|
@@ -11502,6 +11548,144 @@ function _checkForMethod(methodname, fn) {
|
|
|
11502
11548
|
|
|
11503
11549
|
/***/ },
|
|
11504
11550
|
|
|
11551
|
+
/***/ 8575
|
|
11552
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
11553
|
+
|
|
11554
|
+
__webpack_require__.r(__webpack_exports__);
|
|
11555
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11556
|
+
/* harmony export */ "default": () => (/* binding */ _clone)
|
|
11557
|
+
/* harmony export */ });
|
|
11558
|
+
/* harmony import */ var _cloneRegExp_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1254);
|
|
11559
|
+
/* harmony import */ var _type_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(963);
|
|
11560
|
+
|
|
11561
|
+
|
|
11562
|
+
|
|
11563
|
+
/**
|
|
11564
|
+
* Copies an object.
|
|
11565
|
+
*
|
|
11566
|
+
* @private
|
|
11567
|
+
* @param {*} value The value to be copied
|
|
11568
|
+
* @param {Boolean} deep Whether or not to perform deep cloning.
|
|
11569
|
+
* @return {*} The copied value.
|
|
11570
|
+
*/
|
|
11571
|
+
function _clone(value, deep, map) {
|
|
11572
|
+
map || (map = new _ObjectMap());
|
|
11573
|
+
|
|
11574
|
+
// this avoids the slower switch with a quick if decision removing some milliseconds in each run.
|
|
11575
|
+
if (_isPrimitive(value)) {
|
|
11576
|
+
return value;
|
|
11577
|
+
}
|
|
11578
|
+
var copy = function copy(copiedValue) {
|
|
11579
|
+
// Check for circular and same references on the object graph and return its corresponding clone.
|
|
11580
|
+
var cachedCopy = map.get(value);
|
|
11581
|
+
if (cachedCopy) {
|
|
11582
|
+
return cachedCopy;
|
|
11583
|
+
}
|
|
11584
|
+
map.set(value, copiedValue);
|
|
11585
|
+
for (var key in value) {
|
|
11586
|
+
if (Object.prototype.hasOwnProperty.call(value, key)) {
|
|
11587
|
+
copiedValue[key] = deep ? _clone(value[key], true, map) : value[key];
|
|
11588
|
+
}
|
|
11589
|
+
}
|
|
11590
|
+
return copiedValue;
|
|
11591
|
+
};
|
|
11592
|
+
switch ((0,_type_js__WEBPACK_IMPORTED_MODULE_1__["default"])(value)) {
|
|
11593
|
+
case 'Object':
|
|
11594
|
+
return copy(Object.create(Object.getPrototypeOf(value)));
|
|
11595
|
+
case 'Array':
|
|
11596
|
+
return copy(Array(value.length));
|
|
11597
|
+
case 'Date':
|
|
11598
|
+
return new Date(value.valueOf());
|
|
11599
|
+
case 'RegExp':
|
|
11600
|
+
return (0,_cloneRegExp_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value);
|
|
11601
|
+
case 'Int8Array':
|
|
11602
|
+
case 'Uint8Array':
|
|
11603
|
+
case 'Uint8ClampedArray':
|
|
11604
|
+
case 'Int16Array':
|
|
11605
|
+
case 'Uint16Array':
|
|
11606
|
+
case 'Int32Array':
|
|
11607
|
+
case 'Uint32Array':
|
|
11608
|
+
case 'Float32Array':
|
|
11609
|
+
case 'Float64Array':
|
|
11610
|
+
case 'BigInt64Array':
|
|
11611
|
+
case 'BigUint64Array':
|
|
11612
|
+
return value.slice();
|
|
11613
|
+
default:
|
|
11614
|
+
return value;
|
|
11615
|
+
}
|
|
11616
|
+
}
|
|
11617
|
+
function _isPrimitive(param) {
|
|
11618
|
+
var type = typeof param;
|
|
11619
|
+
return param == null || type != 'object' && type != 'function';
|
|
11620
|
+
}
|
|
11621
|
+
var _ObjectMap = /*#__PURE__*/function () {
|
|
11622
|
+
function _ObjectMap() {
|
|
11623
|
+
this.map = {};
|
|
11624
|
+
this.length = 0;
|
|
11625
|
+
}
|
|
11626
|
+
_ObjectMap.prototype.set = function (key, value) {
|
|
11627
|
+
var hashedKey = this.hash(key);
|
|
11628
|
+
var bucket = this.map[hashedKey];
|
|
11629
|
+
if (!bucket) {
|
|
11630
|
+
this.map[hashedKey] = bucket = [];
|
|
11631
|
+
}
|
|
11632
|
+
bucket.push([key, value]);
|
|
11633
|
+
this.length += 1;
|
|
11634
|
+
};
|
|
11635
|
+
_ObjectMap.prototype.hash = function (key) {
|
|
11636
|
+
var hashedKey = [];
|
|
11637
|
+
for (var value in key) {
|
|
11638
|
+
hashedKey.push(Object.prototype.toString.call(key[value]));
|
|
11639
|
+
}
|
|
11640
|
+
return hashedKey.join();
|
|
11641
|
+
};
|
|
11642
|
+
_ObjectMap.prototype.get = function (key) {
|
|
11643
|
+
/**
|
|
11644
|
+
* depending on the number of objects to be cloned is faster to just iterate over the items in the map just because the hash function is so costly,
|
|
11645
|
+
* on my tests this number is 180, anything above that using the hash function is faster.
|
|
11646
|
+
*/
|
|
11647
|
+
if (this.length <= 180) {
|
|
11648
|
+
for (var p in this.map) {
|
|
11649
|
+
var bucket = this.map[p];
|
|
11650
|
+
for (var i = 0; i < bucket.length; i += 1) {
|
|
11651
|
+
var element = bucket[i];
|
|
11652
|
+
if (element[0] === key) {
|
|
11653
|
+
return element[1];
|
|
11654
|
+
}
|
|
11655
|
+
}
|
|
11656
|
+
}
|
|
11657
|
+
return;
|
|
11658
|
+
}
|
|
11659
|
+
var hashedKey = this.hash(key);
|
|
11660
|
+
var bucket = this.map[hashedKey];
|
|
11661
|
+
if (!bucket) {
|
|
11662
|
+
return;
|
|
11663
|
+
}
|
|
11664
|
+
for (var i = 0; i < bucket.length; i += 1) {
|
|
11665
|
+
var element = bucket[i];
|
|
11666
|
+
if (element[0] === key) {
|
|
11667
|
+
return element[1];
|
|
11668
|
+
}
|
|
11669
|
+
}
|
|
11670
|
+
};
|
|
11671
|
+
return _ObjectMap;
|
|
11672
|
+
}();
|
|
11673
|
+
|
|
11674
|
+
/***/ },
|
|
11675
|
+
|
|
11676
|
+
/***/ 1254
|
|
11677
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
11678
|
+
|
|
11679
|
+
__webpack_require__.r(__webpack_exports__);
|
|
11680
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11681
|
+
/* harmony export */ "default": () => (/* binding */ _cloneRegExp)
|
|
11682
|
+
/* harmony export */ });
|
|
11683
|
+
function _cloneRegExp(pattern) {
|
|
11684
|
+
return new RegExp(pattern.source, pattern.flags ? pattern.flags : (pattern.global ? 'g' : '') + (pattern.ignoreCase ? 'i' : '') + (pattern.multiline ? 'm' : '') + (pattern.sticky ? 'y' : '') + (pattern.unicode ? 'u' : '') + (pattern.dotAll ? 's' : ''));
|
|
11685
|
+
}
|
|
11686
|
+
|
|
11687
|
+
/***/ },
|
|
11688
|
+
|
|
11505
11689
|
/***/ 7940
|
|
11506
11690
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
11507
11691
|
|
|
@@ -13867,20 +14051,22 @@ class ShallowCloneError extends _CloneError_mjs__WEBPACK_IMPORTED_MODULE_0__["de
|
|
|
13867
14051
|
|
|
13868
14052
|
__webpack_require__.r(__webpack_exports__);
|
|
13869
14053
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
13870
|
-
/* harmony export */ CloneError: () => (/* reexport safe */
|
|
13871
|
-
/* harmony export */ DeepCloneError: () => (/* reexport safe */
|
|
13872
|
-
/* harmony export */ ShallowCloneError: () => (/* reexport safe */
|
|
14054
|
+
/* harmony export */ CloneError: () => (/* reexport safe */ _errors_CloneError_mjs__WEBPACK_IMPORTED_MODULE_8__["default"]),
|
|
14055
|
+
/* harmony export */ DeepCloneError: () => (/* reexport safe */ _errors_DeepCloneError_mjs__WEBPACK_IMPORTED_MODULE_6__["default"]),
|
|
14056
|
+
/* harmony export */ ShallowCloneError: () => (/* reexport safe */ _errors_ShallowCloneError_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]),
|
|
13873
14057
|
/* harmony export */ cloneDeep: () => (/* binding */ cloneDeep),
|
|
13874
14058
|
/* harmony export */ cloneShallow: () => (/* binding */ cloneShallow)
|
|
13875
14059
|
/* harmony export */ });
|
|
13876
|
-
/* harmony import */ var
|
|
13877
|
-
/* harmony import */ var
|
|
13878
|
-
/* harmony import */ var
|
|
13879
|
-
/* harmony import */ var _predicates_index_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
13880
|
-
/* harmony import */ var
|
|
13881
|
-
/* harmony import */ var
|
|
13882
|
-
/* harmony import */ var
|
|
13883
|
-
/* harmony import */ var
|
|
14060
|
+
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8138);
|
|
14061
|
+
/* harmony import */ var _ObjectSlice_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8504);
|
|
14062
|
+
/* harmony import */ var _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6663);
|
|
14063
|
+
/* harmony import */ var _predicates_index_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8252);
|
|
14064
|
+
/* harmony import */ var _predicates_index_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5162);
|
|
14065
|
+
/* harmony import */ var _elements_SourceMap_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5810);
|
|
14066
|
+
/* harmony import */ var _errors_DeepCloneError_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5018);
|
|
14067
|
+
/* harmony import */ var _errors_ShallowCloneError_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3686);
|
|
14068
|
+
/* harmony import */ var _errors_CloneError_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(3772);
|
|
14069
|
+
|
|
13884
14070
|
|
|
13885
14071
|
|
|
13886
14072
|
|
|
@@ -13913,9 +14099,9 @@ const cloneDeepElement = (element, options) => {
|
|
|
13913
14099
|
} = element;
|
|
13914
14100
|
if (Array.isArray(content)) {
|
|
13915
14101
|
copy.content = content.map(el => cloneDeepElement(el, passThroughOptions));
|
|
13916
|
-
} else if ((0,
|
|
14102
|
+
} else if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_4__.isElement)(content)) {
|
|
13917
14103
|
copy.content = cloneDeepElement(content, passThroughOptions);
|
|
13918
|
-
} else if (content instanceof
|
|
14104
|
+
} else if (content instanceof _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]) {
|
|
13919
14105
|
copy.content = cloneDeepKeyValuePair(content, passThroughOptions);
|
|
13920
14106
|
} else {
|
|
13921
14107
|
copy.content = content;
|
|
@@ -13939,7 +14125,7 @@ const cloneDeepKeyValuePair = (kvp, options) => {
|
|
|
13939
14125
|
} = kvp;
|
|
13940
14126
|
const keyCopy = key !== undefined ? cloneDeepElement(key, passThroughOptions) : undefined;
|
|
13941
14127
|
const valueCopy = value !== undefined ? cloneDeepElement(value, passThroughOptions) : undefined;
|
|
13942
|
-
const copy = new
|
|
14128
|
+
const copy = new _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_2__["default"](keyCopy, valueCopy);
|
|
13943
14129
|
visited.set(kvp, copy);
|
|
13944
14130
|
return copy;
|
|
13945
14131
|
};
|
|
@@ -13955,7 +14141,7 @@ const cloneDeepObjectSlice = (slice, options) => {
|
|
|
13955
14141
|
return visited.get(slice);
|
|
13956
14142
|
}
|
|
13957
14143
|
const items = [...slice].map(element => cloneDeepElement(element, passThroughOptions));
|
|
13958
|
-
const copy = new
|
|
14144
|
+
const copy = new _ObjectSlice_mjs__WEBPACK_IMPORTED_MODULE_1__["default"](items);
|
|
13959
14145
|
visited.set(slice, copy);
|
|
13960
14146
|
return copy;
|
|
13961
14147
|
};
|
|
@@ -13966,16 +14152,16 @@ const cloneDeepObjectSlice = (slice, options) => {
|
|
|
13966
14152
|
* @public
|
|
13967
14153
|
*/
|
|
13968
14154
|
const cloneDeep = (value, options = {}) => {
|
|
13969
|
-
if (value instanceof
|
|
14155
|
+
if (value instanceof _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]) {
|
|
13970
14156
|
return cloneDeepKeyValuePair(value, options);
|
|
13971
14157
|
}
|
|
13972
|
-
if (value instanceof
|
|
14158
|
+
if (value instanceof _ObjectSlice_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]) {
|
|
13973
14159
|
return cloneDeepObjectSlice(value, options);
|
|
13974
14160
|
}
|
|
13975
|
-
if ((0,
|
|
14161
|
+
if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_4__.isElement)(value)) {
|
|
13976
14162
|
return cloneDeepElement(value, options);
|
|
13977
14163
|
}
|
|
13978
|
-
throw new
|
|
14164
|
+
throw new _errors_DeepCloneError_mjs__WEBPACK_IMPORTED_MODULE_6__["default"]("Value provided to cloneDeep function couldn't be cloned", {
|
|
13979
14165
|
value
|
|
13980
14166
|
});
|
|
13981
14167
|
};
|
|
@@ -13991,11 +14177,11 @@ const cloneShallowKeyValuePair = keyValuePair => {
|
|
|
13991
14177
|
key,
|
|
13992
14178
|
value
|
|
13993
14179
|
} = keyValuePair;
|
|
13994
|
-
return new
|
|
14180
|
+
return new _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_2__["default"](key, value);
|
|
13995
14181
|
};
|
|
13996
14182
|
const cloneShallowObjectSlice = objectSlice => {
|
|
13997
14183
|
const items = [...objectSlice];
|
|
13998
|
-
return new
|
|
14184
|
+
return new _ObjectSlice_mjs__WEBPACK_IMPORTED_MODULE_1__["default"](items);
|
|
13999
14185
|
};
|
|
14000
14186
|
const cloneShallowElement = element => {
|
|
14001
14187
|
const Ctor = element.constructor;
|
|
@@ -14007,17 +14193,20 @@ const cloneShallowElement = element => {
|
|
|
14007
14193
|
if (!element.isAttributesEmpty) {
|
|
14008
14194
|
copy.attributes = cloneDeep(element.attributes);
|
|
14009
14195
|
}
|
|
14010
|
-
if ((0,
|
|
14011
|
-
|
|
14196
|
+
if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_3__.hasElementSourceMap)(element)) {
|
|
14197
|
+
_elements_SourceMap_mjs__WEBPACK_IMPORTED_MODULE_5__["default"].transfer(element, copy);
|
|
14198
|
+
}
|
|
14199
|
+
if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_3__.hasElementStyle)(element)) {
|
|
14200
|
+
copy.style = (0,ramda__WEBPACK_IMPORTED_MODULE_0__["default"])(element.style);
|
|
14012
14201
|
}
|
|
14013
14202
|
const {
|
|
14014
14203
|
content
|
|
14015
14204
|
} = element;
|
|
14016
|
-
if ((0,
|
|
14205
|
+
if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_4__.isElement)(content)) {
|
|
14017
14206
|
copy.content = cloneShallowElement(content);
|
|
14018
14207
|
} else if (Array.isArray(content)) {
|
|
14019
14208
|
copy.content = [...content];
|
|
14020
|
-
} else if (content instanceof
|
|
14209
|
+
} else if (content instanceof _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]) {
|
|
14021
14210
|
copy.content = cloneShallowKeyValuePair(content);
|
|
14022
14211
|
} else {
|
|
14023
14212
|
copy.content = content;
|
|
@@ -14032,16 +14221,16 @@ const cloneShallowElement = element => {
|
|
|
14032
14221
|
* @public
|
|
14033
14222
|
*/
|
|
14034
14223
|
const cloneShallow = value => {
|
|
14035
|
-
if (value instanceof
|
|
14224
|
+
if (value instanceof _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]) {
|
|
14036
14225
|
return cloneShallowKeyValuePair(value);
|
|
14037
14226
|
}
|
|
14038
|
-
if (value instanceof
|
|
14227
|
+
if (value instanceof _ObjectSlice_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]) {
|
|
14039
14228
|
return cloneShallowObjectSlice(value);
|
|
14040
14229
|
}
|
|
14041
|
-
if ((0,
|
|
14230
|
+
if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_4__.isElement)(value)) {
|
|
14042
14231
|
return cloneShallowElement(value);
|
|
14043
14232
|
}
|
|
14044
|
-
throw new
|
|
14233
|
+
throw new _errors_ShallowCloneError_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]("Value provided to cloneShallow function couldn't be cloned", {
|
|
14045
14234
|
value
|
|
14046
14235
|
});
|
|
14047
14236
|
};
|
|
@@ -14524,6 +14713,7 @@ const isSourceMapElement = element => element instanceof _elements_SourceMap_mjs
|
|
|
14524
14713
|
__webpack_require__.r(__webpack_exports__);
|
|
14525
14714
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14526
14715
|
/* harmony export */ hasElementSourceMap: () => (/* binding */ hasElementSourceMap),
|
|
14716
|
+
/* harmony export */ hasElementStyle: () => (/* binding */ hasElementStyle),
|
|
14527
14717
|
/* harmony export */ includesClasses: () => (/* binding */ includesClasses),
|
|
14528
14718
|
/* harmony export */ includesSymbols: () => (/* binding */ includesSymbols),
|
|
14529
14719
|
/* harmony export */ isAnnotationElement: () => (/* reexport safe */ _elements_mjs__WEBPACK_IMPORTED_MODULE_1__.isAnnotationElement),
|
|
@@ -14548,6 +14738,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14548
14738
|
|
|
14549
14739
|
|
|
14550
14740
|
|
|
14741
|
+
/**
|
|
14742
|
+
* Checks if an element has format-specific style information.
|
|
14743
|
+
* @public
|
|
14744
|
+
*/
|
|
14745
|
+
const hasElementStyle = element => {
|
|
14746
|
+
return element.style !== undefined;
|
|
14747
|
+
};
|
|
14748
|
+
|
|
14551
14749
|
/**
|
|
14552
14750
|
* Checks if an element has complete source position information.
|
|
14553
14751
|
* Returns true only if all 6 position properties are numbers.
|
|
@@ -15084,6 +15282,12 @@ class Element {
|
|
|
15084
15282
|
*/
|
|
15085
15283
|
parent;
|
|
15086
15284
|
|
|
15285
|
+
/**
|
|
15286
|
+
* Format-specific style information for round-trip preservation.
|
|
15287
|
+
* Each format owns its own namespace (e.g., `yaml`, `json`).
|
|
15288
|
+
*/
|
|
15289
|
+
style;
|
|
15290
|
+
|
|
15087
15291
|
// ============================================================================
|
|
15088
15292
|
// Source Position (LSP-compatible, TextDocument-compatible, UTF-16 code units)
|
|
15089
15293
|
// web-tree-sitter automatically provides position data in UTF-16 code units.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.apidomTraverse=t():e.apidomTraverse=t()}(self,()=>(()=>{"use strict";var e={d:(t,r)=>{for(var s in r)e.o(r,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:r[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function s(e){return function t(s){return 0===arguments.length||r(s)?t:e.apply(this,arguments)}}function n(e){return function t(n,o){switch(arguments.length){case 0:return t;case 1:return r(n)?t:s(function(t){return e(n,t)});default:return r(n)&&r(o)?t:r(n)?s(function(t){return e(t,o)}):r(o)?s(function(t){return e(n,t)}):e(n,o)}}}function o(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}function i(e,t,r){for(var s=0,n=r.length;s<n;){if(e(t,r[s]))return!0;s+=1}return!1}function c(e,t){return Object.prototype.hasOwnProperty.call(t,e)}e.r(t),e.d(t,{Path:()=>me,cloneNode:()=>er,filter:()=>pr,find:()=>dr,findAtOffset:()=>gr,forEach:()=>yr,getNodeKeys:()=>rr,getNodePrimitiveType:()=>Kt,getNodeType:()=>Jt,getVisitFn:()=>nr,isNode:()=>Zt,mergeVisitors:()=>or,mergeVisitorsAsync:()=>ir,mutateNode:()=>tr,parents:()=>mr,reject:()=>fr,some:()=>hr,traverse:()=>lr,traverseAsync:()=>ur});const a="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var l=Object.prototype.toString;const u=function(){return"[object Arguments]"===l.call(arguments)?function(e){return"[object Arguments]"===l.call(e)}:function(e){return c("callee",e)}}();var p=!{toString:null}.propertyIsEnumerable("toString"),d=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],h=function(){return arguments.propertyIsEnumerable("length")}(),f=function(e,t){for(var r=0;r<e.length;){if(e[r]===t)return!0;r+=1}return!1},y="function"!=typeof Object.keys||h?s(function(e){if(Object(e)!==e)return[];var t,r,s=[],n=h&&u(e);for(t in e)!c(t,e)||n&&"length"===t||(s[s.length]=t);if(p)for(r=d.length-1;r>=0;)c(t=d[r],e)&&!f(s,t)&&(s[s.length]=t),r-=1;return s}):s(function(e){return Object(e)!==e?[]:Object.keys(e)});const m=y;const g=s(function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function x(e,t,r,s){var n=o(e);function c(e,t){return b(e,t,r.slice(),s.slice())}return!i(function(e,t){return!i(c,t,e)},o(t),n)}function b(e,t,r,s){if(a(e,t))return!0;var n=g(e);if(n!==g(t))return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(n){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===function(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!a(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!a(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var o=r.length-1;o>=0;){if(r[o]===e)return s[o]===t;o-=1}switch(n){case"Map":return e.size===t.size&&x(e.entries(),t.entries(),r.concat([e]),s.concat([t]));case"Set":return e.size===t.size&&x(e.values(),t.values(),r.concat([e]),s.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var i=m(e);if(i.length!==m(t).length)return!1;var l=r.concat([e]),u=s.concat([t]);for(o=i.length-1;o>=0;){var p=i[o];if(!c(p,t)||!b(t[p],e[p],l,u))return!1;o-=1}return!0}const w=n(function(e,t){return b(e,t,[],[])});const k=class{key;value;constructor(e,t){this.key=e,this.value=t}toValue(){return{key:this.key?.toValue(),value:this.value?.toValue()}}};class v{elements;constructor(e){this.elements=e??[]}toValue(){return this.elements.map(e=>({key:e.key?.toValue(),value:e.value?.toValue()}))}map(e,t){return this.elements.map(r=>{const s=r.value,n=r.key;if(void 0===s||void 0===n)throw new Error("MemberElement must have both key and value");return void 0!==t?e.call(t,s,n,r):e(s,n,r)})}filter(e,t){const r=this.elements.filter(r=>{const s=r.value,n=r.key;return void 0!==s&&void 0!==n&&(void 0!==t?e.call(t,s,n,r):e(s,n,r))});return new v(r)}reject(e,t){const r=[];for(const s of this.elements){const n=s.value,o=s.key;void 0!==n&&void 0!==o&&(e.call(t,n,o,s)||r.push(s))}return new v(r)}forEach(e,t){this.elements.forEach((r,s)=>{const n=r.value,o=r.key;void 0!==n&&void 0!==o&&(void 0!==t?e.call(t,n,o,r,s):e(n,o,r,s))})}find(e,t){return this.elements.find(r=>{const s=r.value,n=r.key;return void 0!==s&&void 0!==n&&(void 0!==t?e.call(t,s,n,r):e(s,n,r))})}keys(){return this.elements.map(e=>e.key?.toValue()).filter(e=>void 0!==e)}values(){return this.elements.map(e=>e.value?.toValue()).filter(e=>void 0!==e)}get length(){return this.elements.length}get isEmpty(){return 0===this.length}get first(){return this.elements[0]}get(e){return this.elements[e]}push(e){return this.elements.push(e),this}includesKey(e){return this.elements.some(t=>t.key?.equals(e))}[Symbol.iterator](){return this.elements[Symbol.iterator]()}}const A=v;class T{parent;startLine;startCharacter;startOffset;endLine;endCharacter;endOffset;_storedElement="element";_content;_meta;_attributes;constructor(e,t,r){void 0!==t&&(this.meta=t),void 0!==r&&(this.attributes=r),void 0!==e&&(this.content=e)}get element(){return this._storedElement}set element(e){this._storedElement=e}get content(){return this._content}set content(e){if(e instanceof T)this._content=e;else if(null!=e&&"string"!=typeof e&&"number"!=typeof e&&"boolean"!=typeof e&&"bigint"!=typeof e&&"symbol"!=typeof e)if(e instanceof k)this._content=e;else if(e instanceof A)this._content=e.elements;else if(Array.isArray(e))this._content=e.map(e=>this.refract(e));else{if("object"!=typeof e)throw new Error("Cannot set content to value of type "+typeof e);this._content=Object.entries(e).map(([e,t])=>new this.MemberElement(e,t))}else this._content=e}get meta(){if(!this._meta){if(this.isFrozen){const e=new this.ObjectElement;return e.freeze(),e}this._meta=new this.ObjectElement}return this._meta}set meta(e){e instanceof T?this._meta=e:this.meta.set(e??{})}get attributes(){if(!this._attributes){if(this.isFrozen){const e=new this.ObjectElement;return e.freeze(),e}this._attributes=new this.ObjectElement}return this._attributes}set attributes(e){e instanceof T?this._attributes=e:this.attributes.set(e??{})}get id(){return this.isFrozen?this.getMetaProperty("id",""):(this.hasMetaProperty("id")||this.setMetaProperty("id",""),this.meta.get("id"))}set id(e){this.setMetaProperty("id",e)}get classes(){return this.isFrozen?this.getMetaProperty("classes",[]):(this.hasMetaProperty("classes")||this.setMetaProperty("classes",[]),this.meta.get("classes"))}set classes(e){this.setMetaProperty("classes",e)}get links(){return this.isFrozen?this.getMetaProperty("links",[]):(this.hasMetaProperty("links")||this.setMetaProperty("links",[]),this.meta.get("links"))}set links(e){this.setMetaProperty("links",e)}get children(){const{_content:e}=this;if(Array.isArray(e))return e;if(e instanceof k){const t=[];return e.key&&t.push(e.key),e.value&&t.push(e.value),t}return e instanceof T?[e]:[]}get isFrozen(){return Object.isFrozen(this)}freeze(){if(!this.isFrozen){this._meta&&(this._meta.parent=this,this._meta.freeze()),this._attributes&&(this._attributes.parent=this,this._attributes.freeze());for(const e of this.children)e.parent=this,e.freeze();Array.isArray(this._content)&&Object.freeze(this._content),Object.freeze(this)}}toValue(){const{_content:e}=this;return e instanceof T||e instanceof k?e.toValue():Array.isArray(e)?e.map(e=>e.toValue()):e}equals(e){const t=e instanceof T?e.toValue():e;return w(this.toValue(),t)}primitive(){}set(e){return this.content=e,this}toRef(e){const t=this.id.toValue();if(""===t)throw new Error("Cannot create reference to an element without an ID");const r=new this.RefElement(t);return"string"==typeof e&&(r.path=this.refract(e)),r}getMetaProperty(e,t){if(!this.hasMetaProperty(e)){if(void 0===t)return;const e=this.refract(t);return e&&this.isFrozen&&e.freeze(),e}return this.meta.get(e)}setMetaProperty(e,t){this.meta.set(e,t)}hasMetaProperty(e){return!this.isMetaEmpty&&this.meta.hasKey(e)}get isMetaEmpty(){return void 0===this._meta||this.meta.isEmpty}getAttributesProperty(e,t){if(!this.hasAttributesProperty(e)){if(this.isFrozen){const e=this.refract(t);return e.freeze(),e}this.attributes.set(e,t)}return this.attributes.get(e)}setAttributesProperty(e,t){this.attributes.set(e,t)}hasAttributesProperty(e){return!this.isAttributesEmpty&&this.attributes.hasKey(e)}get isAttributesEmpty(){return void 0===this._attributes||this.attributes.isEmpty}}const S=T;const I=class extends S{constructor(e,t,r){super(e,t,r),this.element="string"}primitive(){return"string"}get length(){return this.content?.length??0}};class E extends S{constructor(e,t,r){super(e||[],t,r)}get length(){return this._content.length}get isEmpty(){return 0===this.length}get first(){return this._content[0]}get second(){return this._content[1]}get last(){return this._content.at(-1)}push(...e){for(const t of e)this._content.push(this.refract(t));return this}shift(){return this._content.shift()}unshift(e){this._content.unshift(this.refract(e))}includes(e){return this._content.some(t=>t.equals(e))}findElements(e,t){const r=t||{},s=!!r.recursive,n=void 0===r.results?[]:r.results;for(let t=0;t<this._content.length;t+=1){const r=this._content[t],o=r;s&&"function"==typeof o.findElements&&o.findElements(e,{results:n,recursive:s}),e(r,t,void 0)&&n.push(r)}return n}find(e){const t=this.findElements(e,{recursive:!0});return new this.ArrayElement(t)}findByElement(e){return this.find(t=>t.element===e)}findByClass(e){return this.find(t=>{const r=t.classes;return"function"==typeof r.includes&&r.includes(e)})}getById(e){return this.find(t=>t.id.toValue()===e).first}concat(e){return new(0,this.constructor)(this._content.concat(e._content))}[Symbol.iterator](){return this._content[Symbol.iterator]()}}const O=E;const C=class extends O{constructor(e,t,r){super(e||[],t,r),this.element="array"}primitive(){return"array"}get(e){return this._content[e]}getValue(e){const t=this.get(e);if(t)return t.toValue()}set(e,t){return"number"==typeof e&&void 0!==t?this._content[e]=this.refract(t):this.content=e,this}remove(e){return this._content.splice(e,1)[0]??null}map(e,t){return this._content.map(e,t)}flatMap(e,t){return this._content.flatMap(e,t)}compactMap(e,t){const r=[];for(const s of this._content){const n=e.call(t,s);n&&r.push(n)}return r}filter(e,t){const r=this._content.filter(e,t);return new this.constructor(r)}reject(e,t){const r=[];for(const s of this._content)e.call(t,s)||r.push(s);return new this.constructor(r)}reduce(e,t){let r,s;void 0!==t?(r=0,s=this.refract(t)):(r=1,s=this.first);for(let t=r;t<this.length;t+=1){const r=e(s,this._content[t],t,this);s=void 0===r?r:this.refract(r)}return s}forEach(e,t){this._content.forEach((r,s)=>{e.call(t,r,s)})}empty(){return new this.constructor([])}};const F=class extends S{constructor(e,t,r,s){super(new k,r,s),this.element="member",void 0!==e&&(this.key=e),arguments.length>=2&&(this.value=t)}primitive(){return"member"}get key(){return this._content.key}set key(e){this._content.key=this.refract(e)}get value(){return this._content.value}set value(e){this._content.value=void 0===e?void 0:this.refract(e)}};const M=class extends O{constructor(e,t,r){super(e||[],t,r),this.element="object"}primitive(){return"object"}toValue(){return this._content.reduce((e,t)=>(e[t.key.toValue()]=t.value?t.value.toValue():void 0,e),{})}get(e){const t=this.getMember(e);if(t)return t.value}getValue(e){const t=this.get(e);if(t)return t.toValue()}getMember(e){if(void 0!==e)return this._content.find(t=>t.key.toValue()===e)}remove(e){let t=null;return this.content=this._content.filter(r=>r.key.toValue()!==e||(t=r,!1)),t}getKey(e){const t=this.getMember(e);if(t)return t.key}set(e,t){if("string"==typeof e){const r=this.getMember(e);r?r.value=t:this._content.push(new F(e,t))}else if("object"==typeof e&&!Array.isArray(e))for(const t of Object.keys(e))this.set(t,e[t]);return this}keys(){return this._content.map(e=>e.key.toValue())}values(){return this._content.map(e=>e.value.toValue())}hasKey(e){return this._content.some(t=>t.key.equals(e))}items(){return this._content.map(e=>[e.key.toValue(),e.value.toValue()])}map(e,t){return this._content.map(r=>e.call(t,r.value,r.key,r))}compactMap(e,t){const r=[];return this.forEach((s,n,o)=>{const i=e.call(t,s,n,o);i&&r.push(i)}),r}filter(e,t){return new A(this._content).filter(e,t)}reject(e,t){const r=[];for(const s of this._content)e.call(t,s.value,s.key,s)||r.push(s);return new A(r)}forEach(e,t){this._content.forEach(r=>e.call(t,r.value,r.key,r))}reduce(e,t){let r,s;void 0!==t?(r=0,s=this.refract(t)):(r=1,s=this._content[0]?.value);for(let t=r;t<this._content.length;t+=1){const r=this._content[t],n=e(s,r.value,r.key,r,this);s=void 0===n?n:this.refract(n)}return s}empty(){return new this.constructor([])}};const D=e=>e instanceof S,j=e=>e instanceof I,B=e=>e instanceof C,N=e=>e instanceof M,P=e=>e instanceof F,q=function(){const e=_,t=L,r=this,s="parser.js: Parser(): ";r.ast=void 0,r.stats=void 0,r.trace=void 0,r.callbacks=[];let n,o,i,c,a,l,u,p=0,d=0,h=0,f=0,y=0,m=new function(){this.state=e.ACTIVE,this.phraseLength=0,this.refresh=()=>{this.state=e.ACTIVE,this.phraseLength=0}};r.parse=(g,x,w,k)=>{const v=`${s}parse(): `;p=0,d=0,h=0,f=0,y=0,n=void 0,o=void 0,i=void 0,c=void 0,m.refresh(),a=void 0,l=void 0,u=void 0,c=t.stringToChars(w),n=g.rules,o=g.udts;const A=x.toLowerCase();let T;for(const e in n)if(n.hasOwnProperty(e)&&A===n[e].lower){T=n[e].index;break}if(void 0===T)throw new Error(`${v}start rule name '${startRule}' not recognized`);(()=>{const e=`${s}initializeCallbacks(): `;let t,i;for(a=[],l=[],t=0;t<n.length;t+=1)a[t]=void 0;for(t=0;t<o.length;t+=1)l[t]=void 0;const c=[];for(t=0;t<n.length;t+=1)c.push(n[t].lower);for(t=0;t<o.length;t+=1)c.push(o[t].lower);for(const s in r.callbacks)if(r.callbacks.hasOwnProperty(s)){if(t=c.indexOf(s.toLowerCase()),t<0)throw new Error(`${e}syntax callback '${s}' not a rule or udt name`);if(i=r.callbacks[s]?r.callbacks[s]:void 0,"function"!=typeof i&&void 0!==i)throw new Error(`${e}syntax callback[${s}] must be function reference or falsy)`);t<n.length?a[t]=i:l[t-n.length]=i}})(),r.trace&&r.trace.init(n,o,c),r.stats&&r.stats.init(n,o),r.ast&&r.ast.init(n,o,c),u=k,i=[{type:e.RNM,index:T}],b(0,0),i=void 0;let S=!1;switch(m.state){case e.ACTIVE:throw new Error(`${v}final state should never be 'ACTIVE'`);case e.NOMATCH:S=!1;break;case e.EMPTY:case e.MATCH:S=m.phraseLength===c.length;break;default:throw new Error("unrecognized state")}return{success:S,state:m.state,stateName:e.idName(m.state),length:c.length,matched:m.phraseLength,maxMatched:y,maxTreeDepth:h,nodeHits:f}};const g=(t,r,n,o)=>{if(r.phraseLength>n){let e=`${s}opRNM(${t.name}): callback function error: `;throw e+=`sysData.phraseLength: ${r.phraseLength}`,e+=` must be <= remaining chars: ${n}`,new Error(e)}switch(r.state){case e.ACTIVE:if(!o)throw new Error(`${s}opRNM(${t.name}): callback function return error. ACTIVE state not allowed.`);break;case e.EMPTY:r.phraseLength=0;break;case e.MATCH:0===r.phraseLength&&(r.state=e.EMPTY);break;case e.NOMATCH:r.phraseLength=0;break;default:throw new Error(`${s}opRNM(${t.name}): callback function return error. Unrecognized return state: ${r.state}`)}},x=(t,a)=>{let d,h,f;const y=i[t],g=o[y.index];m.UdtIndex=g.index,p||(f=r.ast&&r.ast.udtDefined(y.index),f&&(h=n.length+y.index,d=r.ast.getLength(),r.ast.down(h,g.name)));const x=c.length-a;l[y.index](m,c,a,u),((t,r,n)=>{if(r.phraseLength>n){let e=`${s}opUDT(${t.name}): callback function error: `;throw e+=`sysData.phraseLength: ${r.phraseLength}`,e+=` must be <= remaining chars: ${n}`,new Error(e)}switch(r.state){case e.ACTIVE:throw new Error(`${s}opUDT(${t.name}) ACTIVE state return not allowed.`);case e.EMPTY:if(!t.empty)throw new Error(`${s}opUDT(${t.name}) may not return EMPTY.`);r.phraseLength=0;break;case e.MATCH:if(0===r.phraseLength){if(!t.empty)throw new Error(`${s}opUDT(${t.name}) may not return EMPTY.`);r.state=e.EMPTY}break;case e.NOMATCH:r.phraseLength=0;break;default:throw new Error(`${s}opUDT(${t.name}): callback function return error. Unrecognized return state: ${r.state}`)}})(g,m,x),p||f&&(m.state===e.NOMATCH?r.ast.setLength(d):r.ast.up(h,g.name,a,m.phraseLength))},b=(t,o)=>{const l=`${s}opExecute(): `,w=i[t];switch(f+=1,d>h&&(h=d),d+=1,m.refresh(),r.trace&&r.trace.down(w,o),w.type){case e.ALT:((t,r)=>{const s=i[t];for(let t=0;t<s.children.length&&(b(s.children[t],r),m.state===e.NOMATCH);t+=1);})(t,o);break;case e.CAT:((t,s)=>{let n,o,c,a;const l=i[t];r.ast&&(o=r.ast.getLength()),n=!0,c=s,a=0;for(let t=0;t<l.children.length;t+=1){if(b(l.children[t],c),m.state===e.NOMATCH){n=!1;break}c+=m.phraseLength,a+=m.phraseLength}n?(m.state=0===a?e.EMPTY:e.MATCH,m.phraseLength=a):(m.state=e.NOMATCH,m.phraseLength=0,r.ast&&r.ast.setLength(o))})(t,o);break;case e.REP:((t,s)=>{let n,o,a,l;const u=i[t];if(0===u.max)return m.state=e.EMPTY,void(m.phraseLength=0);for(o=s,a=0,l=0,r.ast&&(n=r.ast.getLength());!(o>=c.length)&&(b(t+1,o),m.state!==e.NOMATCH)&&m.state!==e.EMPTY&&(l+=1,a+=m.phraseLength,o+=m.phraseLength,l!==u.max););m.state===e.EMPTY||l>=u.min?(m.state=0===a?e.EMPTY:e.MATCH,m.phraseLength=a):(m.state=e.NOMATCH,m.phraseLength=0,r.ast&&r.ast.setLength(n))})(t,o);break;case e.RNM:((t,s)=>{let o,l,d;const h=i[t],f=n[h.index],y=a[f.index];if(p||(l=r.ast&&r.ast.ruleDefined(h.index),l&&(o=r.ast.getLength(),r.ast.down(h.index,n[h.index].name))),y){const t=c.length-s;y(m,c,s,u),g(f,m,t,!0),m.state===e.ACTIVE&&(d=i,i=f.opcodes,b(0,s),i=d,y(m,c,s,u),g(f,m,t,!1))}else d=i,i=f.opcodes,b(0,s,m),i=d;p||l&&(m.state===e.NOMATCH?r.ast.setLength(o):r.ast.up(h.index,f.name,s,m.phraseLength))})(t,o);break;case e.TRG:((t,r)=>{const s=i[t];m.state=e.NOMATCH,r<c.length&&s.min<=c[r]&&c[r]<=s.max&&(m.state=e.MATCH,m.phraseLength=1)})(t,o);break;case e.TBS:((t,r)=>{const s=i[t],n=s.string.length;if(m.state=e.NOMATCH,r+n<=c.length){for(let e=0;e<n;e+=1)if(c[r+e]!==s.string[e])return;m.state=e.MATCH,m.phraseLength=n}})(t,o);break;case e.TLS:((t,r)=>{let s;const n=i[t];m.state=e.NOMATCH;const o=n.string.length;if(0!==o){if(r+o<=c.length){for(let e=0;e<o;e+=1)if(s=c[r+e],s>=65&&s<=90&&(s+=32),s!==n.string[e])return;m.state=e.MATCH,m.phraseLength=o}}else m.state=e.EMPTY})(t,o);break;case e.UDT:x(t,o);break;case e.AND:((t,r)=>{switch(p+=1,b(t+1,r),p-=1,m.phraseLength=0,m.state){case e.EMPTY:case e.MATCH:m.state=e.EMPTY;break;case e.NOMATCH:m.state=e.NOMATCH;break;default:throw new Error(`opAND: invalid state ${m.state}`)}})(t,o);break;case e.NOT:((t,r)=>{switch(p+=1,b(t+1,r),p-=1,m.phraseLength=0,m.state){case e.EMPTY:case e.MATCH:m.state=e.NOMATCH;break;case e.NOMATCH:m.state=e.EMPTY;break;default:throw new Error(`opNOT: invalid state ${m.state}`)}})(t,o);break;default:throw new Error(`${l}unrecognized operator`)}p||o+m.phraseLength>y&&(y=o+m.phraseLength),r.stats&&r.stats.collect(w,m),r.trace&&r.trace.up(w,m.state,o,m.phraseLength),d-=1}},L={stringToChars:e=>[...e].map(e=>e.codePointAt(0)),charsToString:(e,t,r)=>{let s=e;for(;!(void 0===t||t<0);){if(void 0===r){s=e.slice(t);break}if(r<=0)return"";s=e.slice(t,t+r);break}return String.fromCodePoint(...s)}},_={ALT:1,CAT:2,REP:3,RNM:4,TRG:5,TBS:6,TLS:7,UDT:11,AND:12,NOT:13,ACTIVE:100,MATCH:101,EMPTY:102,NOMATCH:103,SEM_PRE:200,SEM_POST:201,SEM_OK:300,idName:e=>{switch(e){case _.ALT:return"ALT";case _.CAT:return"CAT";case _.REP:return"REP";case _.RNM:return"RNM";case _.TRG:return"TRG";case _.TBS:return"TBS";case _.TLS:return"TLS";case _.UDT:return"UDT";case _.AND:return"AND";case _.NOT:return"NOT";case _.ACTIVE:return"ACTIVE";case _.EMPTY:return"EMPTY";case _.MATCH:return"MATCH";case _.NOMATCH:return"NOMATCH";case _.SEM_PRE:return"SEM_PRE";case _.SEM_POST:return"SEM_POST";case _.SEM_OK:return"SEM_OK";default:return"UNRECOGNIZED STATE"}}};function U(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"json-pointer",lower:"json-pointer",index:0,isBkr:!1},this.rules[1]={name:"reference-token",lower:"reference-token",index:1,isBkr:!1},this.rules[2]={name:"unescaped",lower:"unescaped",index:2,isBkr:!1},this.rules[3]={name:"escaped",lower:"escaped",index:3,isBkr:!1},this.rules[4]={name:"array-location",lower:"array-location",index:4,isBkr:!1},this.rules[5]={name:"array-index",lower:"array-index",index:5,isBkr:!1},this.rules[6]={name:"array-dash",lower:"array-dash",index:6,isBkr:!1},this.rules[7]={name:"slash",lower:"slash",index:7,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:0,max:1/0},this.rules[0].opcodes[1]={type:2,children:[2,3]},this.rules[0].opcodes[2]={type:4,index:7},this.rules[0].opcodes[3]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:3,min:0,max:1/0},this.rules[1].opcodes[1]={type:1,children:[2,3]},this.rules[1].opcodes[2]={type:4,index:2},this.rules[1].opcodes[3]={type:4,index:3},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:1,children:[1,2,3]},this.rules[2].opcodes[1]={type:5,min:0,max:46},this.rules[2].opcodes[2]={type:5,min:48,max:125},this.rules[2].opcodes[3]={type:5,min:127,max:1114111},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:2,children:[1,2]},this.rules[3].opcodes[1]={type:7,string:[126]},this.rules[3].opcodes[2]={type:1,children:[3,4]},this.rules[3].opcodes[3]={type:7,string:[48]},this.rules[3].opcodes[4]={type:7,string:[49]},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:4,index:5},this.rules[4].opcodes[2]={type:4,index:6},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,2]},this.rules[5].opcodes[1]={type:6,string:[48]},this.rules[5].opcodes[2]={type:2,children:[3,4]},this.rules[5].opcodes[3]={type:5,min:49,max:57},this.rules[5].opcodes[4]={type:3,min:0,max:1/0},this.rules[5].opcodes[5]={type:5,min:48,max:57},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:7,string:[45]},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:7,string:[47]},this.toString=function(){let e="";return e+="; JavaScript Object Notation (JSON) Pointer ABNF syntax\n",e+="; https://datatracker.ietf.org/doc/html/rfc6901\n",e+="json-pointer = *( slash reference-token ) ; MODIFICATION: surrogate text rule used\n",e+="reference-token = *( unescaped / escaped )\n",e+="unescaped = %x00-2E / %x30-7D / %x7F-10FFFF\n",e+=" ; %x2F ('/') and %x7E ('~') are excluded from 'unescaped'\n",e+='escaped = "~" ( "0" / "1" )\n',e+=" ; representing '~' and '/', respectively\n",e+="\n",e+="; https://datatracker.ietf.org/doc/html/rfc6901#section-4\n",e+="array-location = array-index / array-dash\n",e+="array-index = %x30 / ( %x31-39 *(%x30-39) )\n",e+=' ; "0", or digits without a leading "0"\n',e+='array-dash = "-"\n',e+="\n",e+="; Surrogate named rules\n",e+='slash = "/"\n','; JavaScript Object Notation (JSON) Pointer ABNF syntax\n; https://datatracker.ietf.org/doc/html/rfc6901\njson-pointer = *( slash reference-token ) ; MODIFICATION: surrogate text rule used\nreference-token = *( unescaped / escaped )\nunescaped = %x00-2E / %x30-7D / %x7F-10FFFF\n ; %x2F (\'/\') and %x7E (\'~\') are excluded from \'unescaped\'\nescaped = "~" ( "0" / "1" )\n ; representing \'~\' and \'/\', respectively\n\n; https://datatracker.ietf.org/doc/html/rfc6901#section-4\narray-location = array-index / array-dash\narray-index = %x30 / ( %x31-39 *(%x30-39) )\n ; "0", or digits without a leading "0"\narray-dash = "-"\n\n; Surrogate named rules\nslash = "/"\n'}}class H extends Error{constructor(e,t=void 0){if(super(e,t),this.name=this.constructor.name,"string"==typeof e&&(this.message=e),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack,null!=t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"cause")&&!("cause"in this)){const{cause:e}=t;this.cause=e,e instanceof Error&&"stack"in e&&(this.stack=`${this.stack}\nCAUSE: ${e.stack}`)}if(null!=t&&"object"==typeof t){const{cause:e,...r}=t;Object.assign(this,r)}}}const G=H;new U;new U,new q,new U,new q,new U,new q,new U,new q;const $=e=>{if("string"!=typeof e&&"number"!=typeof e)throw new TypeError("Reference token must be a string or number");return String(e).replace(/~/g,"~0").replace(/\//g,"~1")};const R=class extends G{},z=e=>{if(!Array.isArray(e))throw new TypeError("Reference tokens must be a list of strings or numbers");try{return 0===e.length?"":`/${e.map(e=>{if("string"!=typeof e&&"number"!=typeof e)throw new TypeError("Reference token must be a string or number");return $(String(e))}).join("/")}`}catch(t){throw new R("Unexpected error during JSON Pointer compilation",{cause:t,referenceTokens:e})}};class V extends Error{constructor(e,t=void 0){if(super(e,t),this.name=this.constructor.name,"string"==typeof e&&(this.message=e),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack,null!=t&&"object"==typeof t&&Object.hasOwn(t,"cause")&&!("cause"in this)){const{cause:e}=t;this.cause=e,e instanceof Error&&"stack"in e&&(this.stack=`${this.stack}\nCAUSE: ${e.stack}`)}if(null!=t&&"object"==typeof t){const{cause:e,...r}=t;Object.assign(this,r)}}}const X=V;new function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"jsonpath-query",lower:"jsonpath-query",index:0,isBkr:!1},this.rules[1]={name:"segments",lower:"segments",index:1,isBkr:!1},this.rules[2]={name:"B",lower:"b",index:2,isBkr:!1},this.rules[3]={name:"S",lower:"s",index:3,isBkr:!1},this.rules[4]={name:"root-identifier",lower:"root-identifier",index:4,isBkr:!1},this.rules[5]={name:"selector",lower:"selector",index:5,isBkr:!1},this.rules[6]={name:"name-selector",lower:"name-selector",index:6,isBkr:!1},this.rules[7]={name:"string-literal",lower:"string-literal",index:7,isBkr:!1},this.rules[8]={name:"double-quoted",lower:"double-quoted",index:8,isBkr:!1},this.rules[9]={name:"single-quoted",lower:"single-quoted",index:9,isBkr:!1},this.rules[10]={name:"ESC",lower:"esc",index:10,isBkr:!1},this.rules[11]={name:"unescaped",lower:"unescaped",index:11,isBkr:!1},this.rules[12]={name:"escapable",lower:"escapable",index:12,isBkr:!1},this.rules[13]={name:"hexchar",lower:"hexchar",index:13,isBkr:!1},this.rules[14]={name:"non-surrogate",lower:"non-surrogate",index:14,isBkr:!1},this.rules[15]={name:"high-surrogate",lower:"high-surrogate",index:15,isBkr:!1},this.rules[16]={name:"low-surrogate",lower:"low-surrogate",index:16,isBkr:!1},this.rules[17]={name:"HEXDIG",lower:"hexdig",index:17,isBkr:!1},this.rules[18]={name:"wildcard-selector",lower:"wildcard-selector",index:18,isBkr:!1},this.rules[19]={name:"index-selector",lower:"index-selector",index:19,isBkr:!1},this.rules[20]={name:"int",lower:"int",index:20,isBkr:!1},this.rules[21]={name:"DIGIT1",lower:"digit1",index:21,isBkr:!1},this.rules[22]={name:"slice-selector",lower:"slice-selector",index:22,isBkr:!1},this.rules[23]={name:"start",lower:"start",index:23,isBkr:!1},this.rules[24]={name:"end",lower:"end",index:24,isBkr:!1},this.rules[25]={name:"step",lower:"step",index:25,isBkr:!1},this.rules[26]={name:"filter-selector",lower:"filter-selector",index:26,isBkr:!1},this.rules[27]={name:"logical-expr",lower:"logical-expr",index:27,isBkr:!1},this.rules[28]={name:"logical-or-expr",lower:"logical-or-expr",index:28,isBkr:!1},this.rules[29]={name:"logical-and-expr",lower:"logical-and-expr",index:29,isBkr:!1},this.rules[30]={name:"basic-expr",lower:"basic-expr",index:30,isBkr:!1},this.rules[31]={name:"paren-expr",lower:"paren-expr",index:31,isBkr:!1},this.rules[32]={name:"logical-not-op",lower:"logical-not-op",index:32,isBkr:!1},this.rules[33]={name:"test-expr",lower:"test-expr",index:33,isBkr:!1},this.rules[34]={name:"filter-query",lower:"filter-query",index:34,isBkr:!1},this.rules[35]={name:"rel-query",lower:"rel-query",index:35,isBkr:!1},this.rules[36]={name:"current-node-identifier",lower:"current-node-identifier",index:36,isBkr:!1},this.rules[37]={name:"comparison-expr",lower:"comparison-expr",index:37,isBkr:!1},this.rules[38]={name:"literal",lower:"literal",index:38,isBkr:!1},this.rules[39]={name:"comparable",lower:"comparable",index:39,isBkr:!1},this.rules[40]={name:"comparison-op",lower:"comparison-op",index:40,isBkr:!1},this.rules[41]={name:"singular-query",lower:"singular-query",index:41,isBkr:!1},this.rules[42]={name:"rel-singular-query",lower:"rel-singular-query",index:42,isBkr:!1},this.rules[43]={name:"abs-singular-query",lower:"abs-singular-query",index:43,isBkr:!1},this.rules[44]={name:"singular-query-segments",lower:"singular-query-segments",index:44,isBkr:!1},this.rules[45]={name:"name-segment",lower:"name-segment",index:45,isBkr:!1},this.rules[46]={name:"index-segment",lower:"index-segment",index:46,isBkr:!1},this.rules[47]={name:"number",lower:"number",index:47,isBkr:!1},this.rules[48]={name:"frac",lower:"frac",index:48,isBkr:!1},this.rules[49]={name:"exp",lower:"exp",index:49,isBkr:!1},this.rules[50]={name:"true",lower:"true",index:50,isBkr:!1},this.rules[51]={name:"false",lower:"false",index:51,isBkr:!1},this.rules[52]={name:"null",lower:"null",index:52,isBkr:!1},this.rules[53]={name:"function-name",lower:"function-name",index:53,isBkr:!1},this.rules[54]={name:"function-name-first",lower:"function-name-first",index:54,isBkr:!1},this.rules[55]={name:"function-name-char",lower:"function-name-char",index:55,isBkr:!1},this.rules[56]={name:"LCALPHA",lower:"lcalpha",index:56,isBkr:!1},this.rules[57]={name:"function-expr",lower:"function-expr",index:57,isBkr:!1},this.rules[58]={name:"function-argument",lower:"function-argument",index:58,isBkr:!1},this.rules[59]={name:"segment",lower:"segment",index:59,isBkr:!1},this.rules[60]={name:"child-segment",lower:"child-segment",index:60,isBkr:!1},this.rules[61]={name:"bracketed-selection",lower:"bracketed-selection",index:61,isBkr:!1},this.rules[62]={name:"member-name-shorthand",lower:"member-name-shorthand",index:62,isBkr:!1},this.rules[63]={name:"name-first",lower:"name-first",index:63,isBkr:!1},this.rules[64]={name:"name-char",lower:"name-char",index:64,isBkr:!1},this.rules[65]={name:"DIGIT",lower:"digit",index:65,isBkr:!1},this.rules[66]={name:"ALPHA",lower:"alpha",index:66,isBkr:!1},this.rules[67]={name:"descendant-segment",lower:"descendant-segment",index:67,isBkr:!1},this.rules[68]={name:"normalized-path",lower:"normalized-path",index:68,isBkr:!1},this.rules[69]={name:"normal-index-segment",lower:"normal-index-segment",index:69,isBkr:!1},this.rules[70]={name:"normal-selector",lower:"normal-selector",index:70,isBkr:!1},this.rules[71]={name:"normal-name-selector",lower:"normal-name-selector",index:71,isBkr:!1},this.rules[72]={name:"normal-single-quoted",lower:"normal-single-quoted",index:72,isBkr:!1},this.rules[73]={name:"normal-unescaped",lower:"normal-unescaped",index:73,isBkr:!1},this.rules[74]={name:"normal-escapable",lower:"normal-escapable",index:74,isBkr:!1},this.rules[75]={name:"normal-hexchar",lower:"normal-hexchar",index:75,isBkr:!1},this.rules[76]={name:"normal-HEXDIG",lower:"normal-hexdig",index:76,isBkr:!1},this.rules[77]={name:"normal-index-selector",lower:"normal-index-selector",index:77,isBkr:!1},this.rules[78]={name:"dot-prefix",lower:"dot-prefix",index:78,isBkr:!1},this.rules[79]={name:"double-dot-prefix",lower:"double-dot-prefix",index:79,isBkr:!1},this.rules[80]={name:"left-bracket",lower:"left-bracket",index:80,isBkr:!1},this.rules[81]={name:"right-bracket",lower:"right-bracket",index:81,isBkr:!1},this.rules[82]={name:"left-paren",lower:"left-paren",index:82,isBkr:!1},this.rules[83]={name:"right-paren",lower:"right-paren",index:83,isBkr:!1},this.rules[84]={name:"comma",lower:"comma",index:84,isBkr:!1},this.rules[85]={name:"colon",lower:"colon",index:85,isBkr:!1},this.rules[86]={name:"dquote",lower:"dquote",index:86,isBkr:!1},this.rules[87]={name:"squote",lower:"squote",index:87,isBkr:!1},this.rules[88]={name:"questionmark",lower:"questionmark",index:88,isBkr:!1},this.rules[89]={name:"disjunction",lower:"disjunction",index:89,isBkr:!1},this.rules[90]={name:"conjunction",lower:"conjunction",index:90,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:2,children:[1,2]},this.rules[0].opcodes[1]={type:4,index:4},this.rules[0].opcodes[2]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:3,min:0,max:1/0},this.rules[1].opcodes[1]={type:2,children:[2,3]},this.rules[1].opcodes[2]={type:4,index:3},this.rules[1].opcodes[3]={type:4,index:59},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[2].opcodes[1]={type:6,string:[32]},this.rules[2].opcodes[2]={type:6,string:[9]},this.rules[2].opcodes[3]={type:6,string:[10]},this.rules[2].opcodes[4]={type:6,string:[13]},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:0,max:1/0},this.rules[3].opcodes[1]={type:4,index:2},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:7,string:[36]},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,2,3,4,5]},this.rules[5].opcodes[1]={type:4,index:6},this.rules[5].opcodes[2]={type:4,index:18},this.rules[5].opcodes[3]={type:4,index:22},this.rules[5].opcodes[4]={type:4,index:19},this.rules[5].opcodes[5]={type:4,index:26},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:4,index:7},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,6]},this.rules[7].opcodes[1]={type:2,children:[2,3,5]},this.rules[7].opcodes[2]={type:4,index:86},this.rules[7].opcodes[3]={type:3,min:0,max:1/0},this.rules[7].opcodes[4]={type:4,index:8},this.rules[7].opcodes[5]={type:4,index:86},this.rules[7].opcodes[6]={type:2,children:[7,8,10]},this.rules[7].opcodes[7]={type:4,index:87},this.rules[7].opcodes[8]={type:3,min:0,max:1/0},this.rules[7].opcodes[9]={type:4,index:9},this.rules[7].opcodes[10]={type:4,index:87},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:1,children:[1,2,3,6]},this.rules[8].opcodes[1]={type:4,index:11},this.rules[8].opcodes[2]={type:6,string:[39]},this.rules[8].opcodes[3]={type:2,children:[4,5]},this.rules[8].opcodes[4]={type:4,index:10},this.rules[8].opcodes[5]={type:6,string:[34]},this.rules[8].opcodes[6]={type:2,children:[7,8]},this.rules[8].opcodes[7]={type:4,index:10},this.rules[8].opcodes[8]={type:4,index:12},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:1,children:[1,2,3,6]},this.rules[9].opcodes[1]={type:4,index:11},this.rules[9].opcodes[2]={type:6,string:[34]},this.rules[9].opcodes[3]={type:2,children:[4,5]},this.rules[9].opcodes[4]={type:4,index:10},this.rules[9].opcodes[5]={type:6,string:[39]},this.rules[9].opcodes[6]={type:2,children:[7,8]},this.rules[9].opcodes[7]={type:4,index:10},this.rules[9].opcodes[8]={type:4,index:12},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:6,string:[92]},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:1,children:[1,2,3,4,5]},this.rules[11].opcodes[1]={type:5,min:32,max:33},this.rules[11].opcodes[2]={type:5,min:35,max:38},this.rules[11].opcodes[3]={type:5,min:40,max:91},this.rules[11].opcodes[4]={type:5,min:93,max:55295},this.rules[11].opcodes[5]={type:5,min:57344,max:1114111},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8]},this.rules[12].opcodes[1]={type:6,string:[98]},this.rules[12].opcodes[2]={type:6,string:[102]},this.rules[12].opcodes[3]={type:6,string:[110]},this.rules[12].opcodes[4]={type:6,string:[114]},this.rules[12].opcodes[5]={type:6,string:[116]},this.rules[12].opcodes[6]={type:7,string:[47]},this.rules[12].opcodes[7]={type:7,string:[92]},this.rules[12].opcodes[8]={type:2,children:[9,10]},this.rules[12].opcodes[9]={type:6,string:[117]},this.rules[12].opcodes[10]={type:4,index:13},this.rules[13].opcodes=[],this.rules[13].opcodes[0]={type:1,children:[1,2]},this.rules[13].opcodes[1]={type:4,index:14},this.rules[13].opcodes[2]={type:2,children:[3,4,5,6]},this.rules[13].opcodes[3]={type:4,index:15},this.rules[13].opcodes[4]={type:7,string:[92]},this.rules[13].opcodes[5]={type:6,string:[117]},this.rules[13].opcodes[6]={type:4,index:16},this.rules[14].opcodes=[],this.rules[14].opcodes[0]={type:1,children:[1,11]},this.rules[14].opcodes[1]={type:2,children:[2,9]},this.rules[14].opcodes[2]={type:1,children:[3,4,5,6,7,8]},this.rules[14].opcodes[3]={type:4,index:65},this.rules[14].opcodes[4]={type:7,string:[97]},this.rules[14].opcodes[5]={type:7,string:[98]},this.rules[14].opcodes[6]={type:7,string:[99]},this.rules[14].opcodes[7]={type:7,string:[101]},this.rules[14].opcodes[8]={type:7,string:[102]},this.rules[14].opcodes[9]={type:3,min:3,max:3},this.rules[14].opcodes[10]={type:4,index:17},this.rules[14].opcodes[11]={type:2,children:[12,13,14]},this.rules[14].opcodes[12]={type:7,string:[100]},this.rules[14].opcodes[13]={type:5,min:48,max:55},this.rules[14].opcodes[14]={type:3,min:2,max:2},this.rules[14].opcodes[15]={type:4,index:17},this.rules[15].opcodes=[],this.rules[15].opcodes[0]={type:2,children:[1,2,7]},this.rules[15].opcodes[1]={type:7,string:[100]},this.rules[15].opcodes[2]={type:1,children:[3,4,5,6]},this.rules[15].opcodes[3]={type:7,string:[56]},this.rules[15].opcodes[4]={type:7,string:[57]},this.rules[15].opcodes[5]={type:7,string:[97]},this.rules[15].opcodes[6]={type:7,string:[98]},this.rules[15].opcodes[7]={type:3,min:2,max:2},this.rules[15].opcodes[8]={type:4,index:17},this.rules[16].opcodes=[],this.rules[16].opcodes[0]={type:2,children:[1,2,7]},this.rules[16].opcodes[1]={type:7,string:[100]},this.rules[16].opcodes[2]={type:1,children:[3,4,5,6]},this.rules[16].opcodes[3]={type:7,string:[99]},this.rules[16].opcodes[4]={type:7,string:[100]},this.rules[16].opcodes[5]={type:7,string:[101]},this.rules[16].opcodes[6]={type:7,string:[102]},this.rules[16].opcodes[7]={type:3,min:2,max:2},this.rules[16].opcodes[8]={type:4,index:17},this.rules[17].opcodes=[],this.rules[17].opcodes[0]={type:1,children:[1,2,3,4,5,6,7]},this.rules[17].opcodes[1]={type:4,index:65},this.rules[17].opcodes[2]={type:7,string:[97]},this.rules[17].opcodes[3]={type:7,string:[98]},this.rules[17].opcodes[4]={type:7,string:[99]},this.rules[17].opcodes[5]={type:7,string:[100]},this.rules[17].opcodes[6]={type:7,string:[101]},this.rules[17].opcodes[7]={type:7,string:[102]},this.rules[18].opcodes=[],this.rules[18].opcodes[0]={type:7,string:[42]},this.rules[19].opcodes=[],this.rules[19].opcodes[0]={type:4,index:20},this.rules[20].opcodes=[],this.rules[20].opcodes[0]={type:1,children:[1,2]},this.rules[20].opcodes[1]={type:7,string:[48]},this.rules[20].opcodes[2]={type:2,children:[3,5,6]},this.rules[20].opcodes[3]={type:3,min:0,max:1},this.rules[20].opcodes[4]={type:7,string:[45]},this.rules[20].opcodes[5]={type:4,index:21},this.rules[20].opcodes[6]={type:3,min:0,max:1/0},this.rules[20].opcodes[7]={type:4,index:65},this.rules[21].opcodes=[],this.rules[21].opcodes[0]={type:5,min:49,max:57},this.rules[22].opcodes=[],this.rules[22].opcodes[0]={type:2,children:[1,5,6,7,11]},this.rules[22].opcodes[1]={type:3,min:0,max:1},this.rules[22].opcodes[2]={type:2,children:[3,4]},this.rules[22].opcodes[3]={type:4,index:23},this.rules[22].opcodes[4]={type:4,index:3},this.rules[22].opcodes[5]={type:4,index:85},this.rules[22].opcodes[6]={type:4,index:3},this.rules[22].opcodes[7]={type:3,min:0,max:1},this.rules[22].opcodes[8]={type:2,children:[9,10]},this.rules[22].opcodes[9]={type:4,index:24},this.rules[22].opcodes[10]={type:4,index:3},this.rules[22].opcodes[11]={type:3,min:0,max:1},this.rules[22].opcodes[12]={type:2,children:[13,14]},this.rules[22].opcodes[13]={type:4,index:85},this.rules[22].opcodes[14]={type:3,min:0,max:1},this.rules[22].opcodes[15]={type:2,children:[16,17]},this.rules[22].opcodes[16]={type:4,index:3},this.rules[22].opcodes[17]={type:4,index:25},this.rules[23].opcodes=[],this.rules[23].opcodes[0]={type:4,index:20},this.rules[24].opcodes=[],this.rules[24].opcodes[0]={type:4,index:20},this.rules[25].opcodes=[],this.rules[25].opcodes[0]={type:4,index:20},this.rules[26].opcodes=[],this.rules[26].opcodes[0]={type:2,children:[1,2,3]},this.rules[26].opcodes[1]={type:4,index:88},this.rules[26].opcodes[2]={type:4,index:3},this.rules[26].opcodes[3]={type:4,index:27},this.rules[27].opcodes=[],this.rules[27].opcodes[0]={type:4,index:28},this.rules[28].opcodes=[],this.rules[28].opcodes[0]={type:2,children:[1,2]},this.rules[28].opcodes[1]={type:4,index:29},this.rules[28].opcodes[2]={type:3,min:0,max:1/0},this.rules[28].opcodes[3]={type:2,children:[4,5,6,7]},this.rules[28].opcodes[4]={type:4,index:3},this.rules[28].opcodes[5]={type:4,index:89},this.rules[28].opcodes[6]={type:4,index:3},this.rules[28].opcodes[7]={type:4,index:29},this.rules[29].opcodes=[],this.rules[29].opcodes[0]={type:2,children:[1,2]},this.rules[29].opcodes[1]={type:4,index:30},this.rules[29].opcodes[2]={type:3,min:0,max:1/0},this.rules[29].opcodes[3]={type:2,children:[4,5,6,7]},this.rules[29].opcodes[4]={type:4,index:3},this.rules[29].opcodes[5]={type:4,index:90},this.rules[29].opcodes[6]={type:4,index:3},this.rules[29].opcodes[7]={type:4,index:30},this.rules[30].opcodes=[],this.rules[30].opcodes[0]={type:1,children:[1,2,3]},this.rules[30].opcodes[1]={type:4,index:31},this.rules[30].opcodes[2]={type:4,index:37},this.rules[30].opcodes[3]={type:4,index:33},this.rules[31].opcodes=[],this.rules[31].opcodes[0]={type:2,children:[1,5,6,7,8,9]},this.rules[31].opcodes[1]={type:3,min:0,max:1},this.rules[31].opcodes[2]={type:2,children:[3,4]},this.rules[31].opcodes[3]={type:4,index:32},this.rules[31].opcodes[4]={type:4,index:3},this.rules[31].opcodes[5]={type:4,index:82},this.rules[31].opcodes[6]={type:4,index:3},this.rules[31].opcodes[7]={type:4,index:27},this.rules[31].opcodes[8]={type:4,index:3},this.rules[31].opcodes[9]={type:4,index:83},this.rules[32].opcodes=[],this.rules[32].opcodes[0]={type:7,string:[33]},this.rules[33].opcodes=[],this.rules[33].opcodes[0]={type:2,children:[1,5]},this.rules[33].opcodes[1]={type:3,min:0,max:1},this.rules[33].opcodes[2]={type:2,children:[3,4]},this.rules[33].opcodes[3]={type:4,index:32},this.rules[33].opcodes[4]={type:4,index:3},this.rules[33].opcodes[5]={type:1,children:[6,7]},this.rules[33].opcodes[6]={type:4,index:34},this.rules[33].opcodes[7]={type:4,index:57},this.rules[34].opcodes=[],this.rules[34].opcodes[0]={type:1,children:[1,2]},this.rules[34].opcodes[1]={type:4,index:35},this.rules[34].opcodes[2]={type:4,index:0},this.rules[35].opcodes=[],this.rules[35].opcodes[0]={type:2,children:[1,2]},this.rules[35].opcodes[1]={type:4,index:36},this.rules[35].opcodes[2]={type:4,index:1},this.rules[36].opcodes=[],this.rules[36].opcodes[0]={type:7,string:[64]},this.rules[37].opcodes=[],this.rules[37].opcodes[0]={type:2,children:[1,2,3,4,5]},this.rules[37].opcodes[1]={type:4,index:39},this.rules[37].opcodes[2]={type:4,index:3},this.rules[37].opcodes[3]={type:4,index:40},this.rules[37].opcodes[4]={type:4,index:3},this.rules[37].opcodes[5]={type:4,index:39},this.rules[38].opcodes=[],this.rules[38].opcodes[0]={type:1,children:[1,2,3,4,5]},this.rules[38].opcodes[1]={type:4,index:47},this.rules[38].opcodes[2]={type:4,index:7},this.rules[38].opcodes[3]={type:4,index:50},this.rules[38].opcodes[4]={type:4,index:51},this.rules[38].opcodes[5]={type:4,index:52},this.rules[39].opcodes=[],this.rules[39].opcodes[0]={type:1,children:[1,2,3]},this.rules[39].opcodes[1]={type:4,index:41},this.rules[39].opcodes[2]={type:4,index:57},this.rules[39].opcodes[3]={type:4,index:38},this.rules[40].opcodes=[],this.rules[40].opcodes[0]={type:1,children:[1,2,3,4,5,6]},this.rules[40].opcodes[1]={type:7,string:[61,61]},this.rules[40].opcodes[2]={type:7,string:[33,61]},this.rules[40].opcodes[3]={type:7,string:[60,61]},this.rules[40].opcodes[4]={type:7,string:[62,61]},this.rules[40].opcodes[5]={type:7,string:[60]},this.rules[40].opcodes[6]={type:7,string:[62]},this.rules[41].opcodes=[],this.rules[41].opcodes[0]={type:1,children:[1,2]},this.rules[41].opcodes[1]={type:4,index:42},this.rules[41].opcodes[2]={type:4,index:43},this.rules[42].opcodes=[],this.rules[42].opcodes[0]={type:2,children:[1,2]},this.rules[42].opcodes[1]={type:4,index:36},this.rules[42].opcodes[2]={type:4,index:44},this.rules[43].opcodes=[],this.rules[43].opcodes[0]={type:2,children:[1,2]},this.rules[43].opcodes[1]={type:4,index:4},this.rules[43].opcodes[2]={type:4,index:44},this.rules[44].opcodes=[],this.rules[44].opcodes[0]={type:3,min:0,max:1/0},this.rules[44].opcodes[1]={type:2,children:[2,3]},this.rules[44].opcodes[2]={type:4,index:3},this.rules[44].opcodes[3]={type:1,children:[4,5]},this.rules[44].opcodes[4]={type:4,index:45},this.rules[44].opcodes[5]={type:4,index:46},this.rules[45].opcodes=[],this.rules[45].opcodes[0]={type:1,children:[1,5]},this.rules[45].opcodes[1]={type:2,children:[2,3,4]},this.rules[45].opcodes[2]={type:4,index:80},this.rules[45].opcodes[3]={type:4,index:6},this.rules[45].opcodes[4]={type:4,index:81},this.rules[45].opcodes[5]={type:2,children:[6,7]},this.rules[45].opcodes[6]={type:4,index:78},this.rules[45].opcodes[7]={type:4,index:62},this.rules[46].opcodes=[],this.rules[46].opcodes[0]={type:2,children:[1,2,3]},this.rules[46].opcodes[1]={type:4,index:80},this.rules[46].opcodes[2]={type:4,index:19},this.rules[46].opcodes[3]={type:4,index:81},this.rules[47].opcodes=[],this.rules[47].opcodes[0]={type:2,children:[1,4,6]},this.rules[47].opcodes[1]={type:1,children:[2,3]},this.rules[47].opcodes[2]={type:4,index:20},this.rules[47].opcodes[3]={type:7,string:[45,48]},this.rules[47].opcodes[4]={type:3,min:0,max:1},this.rules[47].opcodes[5]={type:4,index:48},this.rules[47].opcodes[6]={type:3,min:0,max:1},this.rules[47].opcodes[7]={type:4,index:49},this.rules[48].opcodes=[],this.rules[48].opcodes[0]={type:2,children:[1,2]},this.rules[48].opcodes[1]={type:7,string:[46]},this.rules[48].opcodes[2]={type:3,min:1,max:1/0},this.rules[48].opcodes[3]={type:4,index:65},this.rules[49].opcodes=[],this.rules[49].opcodes[0]={type:2,children:[1,2,6]},this.rules[49].opcodes[1]={type:7,string:[101]},this.rules[49].opcodes[2]={type:3,min:0,max:1},this.rules[49].opcodes[3]={type:1,children:[4,5]},this.rules[49].opcodes[4]={type:7,string:[45]},this.rules[49].opcodes[5]={type:7,string:[43]},this.rules[49].opcodes[6]={type:3,min:1,max:1/0},this.rules[49].opcodes[7]={type:4,index:65},this.rules[50].opcodes=[],this.rules[50].opcodes[0]={type:6,string:[116,114,117,101]},this.rules[51].opcodes=[],this.rules[51].opcodes[0]={type:6,string:[102,97,108,115,101]},this.rules[52].opcodes=[],this.rules[52].opcodes[0]={type:6,string:[110,117,108,108]},this.rules[53].opcodes=[],this.rules[53].opcodes[0]={type:2,children:[1,2]},this.rules[53].opcodes[1]={type:4,index:54},this.rules[53].opcodes[2]={type:3,min:0,max:1/0},this.rules[53].opcodes[3]={type:4,index:55},this.rules[54].opcodes=[],this.rules[54].opcodes[0]={type:4,index:56},this.rules[55].opcodes=[],this.rules[55].opcodes[0]={type:1,children:[1,2,3]},this.rules[55].opcodes[1]={type:4,index:54},this.rules[55].opcodes[2]={type:7,string:[95]},this.rules[55].opcodes[3]={type:4,index:65},this.rules[56].opcodes=[],this.rules[56].opcodes[0]={type:5,min:97,max:122},this.rules[57].opcodes=[],this.rules[57].opcodes[0]={type:2,children:[1,2,3,4,13,14]},this.rules[57].opcodes[1]={type:4,index:53},this.rules[57].opcodes[2]={type:4,index:82},this.rules[57].opcodes[3]={type:4,index:3},this.rules[57].opcodes[4]={type:3,min:0,max:1},this.rules[57].opcodes[5]={type:2,children:[6,7]},this.rules[57].opcodes[6]={type:4,index:58},this.rules[57].opcodes[7]={type:3,min:0,max:1/0},this.rules[57].opcodes[8]={type:2,children:[9,10,11,12]},this.rules[57].opcodes[9]={type:4,index:3},this.rules[57].opcodes[10]={type:4,index:84},this.rules[57].opcodes[11]={type:4,index:3},this.rules[57].opcodes[12]={type:4,index:58},this.rules[57].opcodes[13]={type:4,index:3},this.rules[57].opcodes[14]={type:4,index:83},this.rules[58].opcodes=[],this.rules[58].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[58].opcodes[1]={type:4,index:27},this.rules[58].opcodes[2]={type:4,index:34},this.rules[58].opcodes[3]={type:4,index:57},this.rules[58].opcodes[4]={type:4,index:38},this.rules[59].opcodes=[],this.rules[59].opcodes[0]={type:1,children:[1,2]},this.rules[59].opcodes[1]={type:4,index:60},this.rules[59].opcodes[2]={type:4,index:67},this.rules[60].opcodes=[],this.rules[60].opcodes[0]={type:1,children:[1,2]},this.rules[60].opcodes[1]={type:4,index:61},this.rules[60].opcodes[2]={type:2,children:[3,4]},this.rules[60].opcodes[3]={type:4,index:78},this.rules[60].opcodes[4]={type:1,children:[5,6]},this.rules[60].opcodes[5]={type:4,index:18},this.rules[60].opcodes[6]={type:4,index:62},this.rules[61].opcodes=[],this.rules[61].opcodes[0]={type:2,children:[1,2,3,4,10,11]},this.rules[61].opcodes[1]={type:4,index:80},this.rules[61].opcodes[2]={type:4,index:3},this.rules[61].opcodes[3]={type:4,index:5},this.rules[61].opcodes[4]={type:3,min:0,max:1/0},this.rules[61].opcodes[5]={type:2,children:[6,7,8,9]},this.rules[61].opcodes[6]={type:4,index:3},this.rules[61].opcodes[7]={type:4,index:84},this.rules[61].opcodes[8]={type:4,index:3},this.rules[61].opcodes[9]={type:4,index:5},this.rules[61].opcodes[10]={type:4,index:3},this.rules[61].opcodes[11]={type:4,index:81},this.rules[62].opcodes=[],this.rules[62].opcodes[0]={type:2,children:[1,2]},this.rules[62].opcodes[1]={type:4,index:63},this.rules[62].opcodes[2]={type:3,min:0,max:1/0},this.rules[62].opcodes[3]={type:4,index:64},this.rules[63].opcodes=[],this.rules[63].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[63].opcodes[1]={type:4,index:66},this.rules[63].opcodes[2]={type:7,string:[95]},this.rules[63].opcodes[3]={type:5,min:128,max:55295},this.rules[63].opcodes[4]={type:5,min:57344,max:1114111},this.rules[64].opcodes=[],this.rules[64].opcodes[0]={type:1,children:[1,2]},this.rules[64].opcodes[1]={type:4,index:63},this.rules[64].opcodes[2]={type:4,index:65},this.rules[65].opcodes=[],this.rules[65].opcodes[0]={type:5,min:48,max:57},this.rules[66].opcodes=[],this.rules[66].opcodes[0]={type:1,children:[1,2]},this.rules[66].opcodes[1]={type:5,min:65,max:90},this.rules[66].opcodes[2]={type:5,min:97,max:122},this.rules[67].opcodes=[],this.rules[67].opcodes[0]={type:2,children:[1,2]},this.rules[67].opcodes[1]={type:4,index:79},this.rules[67].opcodes[2]={type:1,children:[3,4,5]},this.rules[67].opcodes[3]={type:4,index:61},this.rules[67].opcodes[4]={type:4,index:18},this.rules[67].opcodes[5]={type:4,index:62},this.rules[68].opcodes=[],this.rules[68].opcodes[0]={type:2,children:[1,2]},this.rules[68].opcodes[1]={type:4,index:4},this.rules[68].opcodes[2]={type:3,min:0,max:1/0},this.rules[68].opcodes[3]={type:4,index:69},this.rules[69].opcodes=[],this.rules[69].opcodes[0]={type:2,children:[1,2,3]},this.rules[69].opcodes[1]={type:4,index:80},this.rules[69].opcodes[2]={type:4,index:70},this.rules[69].opcodes[3]={type:4,index:81},this.rules[70].opcodes=[],this.rules[70].opcodes[0]={type:1,children:[1,2]},this.rules[70].opcodes[1]={type:4,index:71},this.rules[70].opcodes[2]={type:4,index:77},this.rules[71].opcodes=[],this.rules[71].opcodes[0]={type:2,children:[1,2,4]},this.rules[71].opcodes[1]={type:4,index:87},this.rules[71].opcodes[2]={type:3,min:0,max:1/0},this.rules[71].opcodes[3]={type:4,index:72},this.rules[71].opcodes[4]={type:4,index:87},this.rules[72].opcodes=[],this.rules[72].opcodes[0]={type:1,children:[1,2]},this.rules[72].opcodes[1]={type:4,index:73},this.rules[72].opcodes[2]={type:2,children:[3,4]},this.rules[72].opcodes[3]={type:4,index:10},this.rules[72].opcodes[4]={type:4,index:74},this.rules[73].opcodes=[],this.rules[73].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[73].opcodes[1]={type:5,min:32,max:38},this.rules[73].opcodes[2]={type:5,min:40,max:91},this.rules[73].opcodes[3]={type:5,min:93,max:55295},this.rules[73].opcodes[4]={type:5,min:57344,max:1114111},this.rules[74].opcodes=[],this.rules[74].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8]},this.rules[74].opcodes[1]={type:6,string:[98]},this.rules[74].opcodes[2]={type:6,string:[102]},this.rules[74].opcodes[3]={type:6,string:[110]},this.rules[74].opcodes[4]={type:6,string:[114]},this.rules[74].opcodes[5]={type:6,string:[116]},this.rules[74].opcodes[6]={type:7,string:[39]},this.rules[74].opcodes[7]={type:7,string:[92]},this.rules[74].opcodes[8]={type:2,children:[9,10]},this.rules[74].opcodes[9]={type:6,string:[117]},this.rules[74].opcodes[10]={type:4,index:75},this.rules[75].opcodes=[],this.rules[75].opcodes[0]={type:2,children:[1,2,3]},this.rules[75].opcodes[1]={type:7,string:[48]},this.rules[75].opcodes[2]={type:7,string:[48]},this.rules[75].opcodes[3]={type:1,children:[4,7,10,13]},this.rules[75].opcodes[4]={type:2,children:[5,6]},this.rules[75].opcodes[5]={type:7,string:[48]},this.rules[75].opcodes[6]={type:5,min:48,max:55},this.rules[75].opcodes[7]={type:2,children:[8,9]},this.rules[75].opcodes[8]={type:7,string:[48]},this.rules[75].opcodes[9]={type:6,string:[98]},this.rules[75].opcodes[10]={type:2,children:[11,12]},this.rules[75].opcodes[11]={type:7,string:[48]},this.rules[75].opcodes[12]={type:5,min:101,max:102},this.rules[75].opcodes[13]={type:2,children:[14,15]},this.rules[75].opcodes[14]={type:7,string:[49]},this.rules[75].opcodes[15]={type:4,index:76},this.rules[76].opcodes=[],this.rules[76].opcodes[0]={type:1,children:[1,2]},this.rules[76].opcodes[1]={type:4,index:65},this.rules[76].opcodes[2]={type:5,min:97,max:102},this.rules[77].opcodes=[],this.rules[77].opcodes[0]={type:1,children:[1,2]},this.rules[77].opcodes[1]={type:7,string:[48]},this.rules[77].opcodes[2]={type:2,children:[3,4]},this.rules[77].opcodes[3]={type:4,index:21},this.rules[77].opcodes[4]={type:3,min:0,max:1/0},this.rules[77].opcodes[5]={type:4,index:65},this.rules[78].opcodes=[],this.rules[78].opcodes[0]={type:7,string:[46]},this.rules[79].opcodes=[],this.rules[79].opcodes[0]={type:7,string:[46,46]},this.rules[80].opcodes=[],this.rules[80].opcodes[0]={type:7,string:[91]},this.rules[81].opcodes=[],this.rules[81].opcodes[0]={type:7,string:[93]},this.rules[82].opcodes=[],this.rules[82].opcodes[0]={type:7,string:[40]},this.rules[83].opcodes=[],this.rules[83].opcodes[0]={type:7,string:[41]},this.rules[84].opcodes=[],this.rules[84].opcodes[0]={type:7,string:[44]},this.rules[85].opcodes=[],this.rules[85].opcodes[0]={type:7,string:[58]},this.rules[86].opcodes=[],this.rules[86].opcodes[0]={type:6,string:[34]},this.rules[87].opcodes=[],this.rules[87].opcodes[0]={type:6,string:[39]},this.rules[88].opcodes=[],this.rules[88].opcodes[0]={type:7,string:[63]},this.rules[89].opcodes=[],this.rules[89].opcodes[0]={type:7,string:[124,124]},this.rules[90].opcodes=[],this.rules[90].opcodes[0]={type:7,string:[38,38]},this.toString=function(){let e="";return e+="; JSONPath: Query Expressions for JSON\n",e+="; https://www.rfc-editor.org/rfc/rfc9535\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.1.1\n",e+="jsonpath-query = root-identifier segments\n",e+="segments = *(S segment)\n",e+="\n",e+="B = %x20 / ; Space\n",e+=" %x09 / ; Horizontal tab\n",e+=" %x0A / ; Line feed or New line\n",e+=" %x0D ; Carriage return\n",e+="S = *B ; optional blank space\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.2.1\n",e+='root-identifier = "$"\n',e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3\n",e+="selector = name-selector /\n",e+=" wildcard-selector /\n",e+=" slice-selector /\n",e+=" index-selector /\n",e+=" filter-selector\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.1.1\n",e+="name-selector = string-literal\n",e+="\n",e+='string-literal = dquote *double-quoted dquote / ; "string", MODIFICATION: surrogate text rule used\n',e+=" squote *single-quoted squote ; 'string', MODIFICATION: surrogate text rule used\n",e+="\n",e+="double-quoted = unescaped /\n",e+=" %x27 / ; '\n",e+=' ESC %x22 / ; \\"\n',e+=" ESC escapable\n",e+="\n",e+="single-quoted = unescaped /\n",e+=' %x22 / ; "\n',e+=" ESC %x27 / ; \\'\n",e+=" ESC escapable\n",e+="\n",e+="ESC = %x5C ; \\ backslash\n",e+="\n",e+="unescaped = %x20-21 / ; see RFC 8259\n",e+=' ; omit 0x22 "\n',e+=" %x23-26 /\n",e+=" ; omit 0x27 '\n",e+=" %x28-5B /\n",e+=" ; omit 0x5C \\\n",e+=" %x5D-D7FF /\n",e+=" ; skip surrogate code points\n",e+=" %xE000-10FFFF\n",e+="\n",e+="escapable = %x62 / ; b BS backspace U+0008\n",e+=" %x66 / ; f FF form feed U+000C\n",e+=" %x6E / ; n LF line feed U+000A\n",e+=" %x72 / ; r CR carriage return U+000D\n",e+=" %x74 / ; t HT horizontal tab U+0009\n",e+=' "/" / ; / slash (solidus) U+002F\n',e+=' "\\" / ; \\ backslash (reverse solidus) U+005C\n',e+=" (%x75 hexchar) ; uXXXX U+XXXX\n",e+="\n",e+="hexchar = non-surrogate /\n",e+=' (high-surrogate "\\" %x75 low-surrogate)\n',e+='non-surrogate = ((DIGIT / "A"/"B"/"C" / "E"/"F") 3HEXDIG) /\n',e+=' ("D" %x30-37 2HEXDIG )\n',e+='high-surrogate = "D" ("8"/"9"/"A"/"B") 2HEXDIG\n',e+='low-surrogate = "D" ("C"/"D"/"E"/"F") 2HEXDIG\n',e+="\n",e+='HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"\n',e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.2.1\n",e+='wildcard-selector = "*"\n',e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.3.1\n",e+="index-selector = int ; decimal integer\n",e+="\n",e+='int = "0" /\n',e+=' (["-"] DIGIT1 *DIGIT) ; - optional\n',e+="DIGIT1 = %x31-39 ; 1-9 non-zero digit\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.4.1\n",e+="slice-selector = [start S] colon S [end S] [colon [S step ]] ; MODIFICATION: surrogate text rule used\n",e+="\n",e+="start = int ; included in selection\n",e+="end = int ; not included in selection\n",e+="step = int ; default: 1\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.5.1\n",e+="filter-selector = questionmark S logical-expr ; MODIFICATION: surrogate text rule used\n",e+="\n",e+="logical-expr = logical-or-expr\n",e+="logical-or-expr = logical-and-expr *(S disjunction S logical-and-expr) ; MODIFICATION: surrogate text rule used\n",e+=" ; disjunction\n",e+=" ; binds less tightly than conjunction\n",e+="logical-and-expr = basic-expr *(S conjunction S basic-expr) ; MODIFICATION: surrogate text rule used\n",e+=" ; conjunction\n",e+=" ; binds more tightly than disjunction\n",e+="\n",e+="basic-expr = paren-expr /\n",e+=" comparison-expr /\n",e+=" test-expr\n",e+="\n",e+="paren-expr = [logical-not-op S] left-paren S logical-expr S right-paren ; MODIFICATION: surrogate text rule used\n",e+=" ; parenthesized expression\n",e+='logical-not-op = "!" ; logical NOT operator\n',e+="\n",e+="test-expr = [logical-not-op S]\n",e+=" (filter-query / ; existence/non-existence\n",e+=" function-expr) ; LogicalType or NodesType\n",e+="filter-query = rel-query / jsonpath-query\n",e+="rel-query = current-node-identifier segments\n",e+='current-node-identifier = "@"\n',e+="\n",e+="comparison-expr = comparable S comparison-op S comparable\n",e+="literal = number / string-literal /\n",e+=" true / false / null\n",e+="comparable = singular-query / ; singular query value\n",e+=" function-expr / ; ValueType\n",e+=" literal\n",e+=" ; MODIFICATION: https://www.rfc-editor.org/errata/eid8352\n",e+='comparison-op = "==" / "!=" /\n',e+=' "<=" / ">=" /\n',e+=' "<" / ">"\n',e+="\n",e+="singular-query = rel-singular-query / abs-singular-query\n",e+="rel-singular-query = current-node-identifier singular-query-segments\n",e+="abs-singular-query = root-identifier singular-query-segments\n",e+="singular-query-segments = *(S (name-segment / index-segment))\n",e+="name-segment = (left-bracket name-selector right-bracket) / ; MODIFICATION: surrogate text rule used\n",e+=" (dot-prefix member-name-shorthand) ; MODIFICATION: surrogate text rule used\n",e+="index-segment = left-bracket index-selector right-bracket ; MODIFICATION: surrogate text rule used\n",e+="\n",e+='number = (int / "-0") [ frac ] [ exp ] ; decimal number\n',e+='frac = "." 1*DIGIT ; decimal fraction\n',e+='exp = "e" [ "-" / "+" ] 1*DIGIT ; decimal exponent\n',e+="true = %x74.72.75.65 ; true\n",e+="false = %x66.61.6c.73.65 ; false\n",e+="null = %x6e.75.6c.6c ; null\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.4\n",e+="function-name = function-name-first *function-name-char\n",e+="function-name-first = LCALPHA\n",e+='function-name-char = function-name-first / "_" / DIGIT\n',e+='LCALPHA = %x61-7A ; "a".."z"\n',e+="\n",e+="function-expr = function-name left-paren S [function-argument ; MODIFICATION: surrogate text rule used\n",e+=" *(S comma S function-argument)] S right-paren ; MODIFICATION: surrogate text rule used\n",e+="function-argument = logical-expr / ; MODIFICATION: https://www.rfc-editor.org/errata/eid8343\n",e+=" filter-query / ; (includes singular-query)\n",e+=" function-expr /\n",e+=" literal\n",e+="\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.5\n",e+="segment = child-segment / descendant-segment\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.5.1.1\n",e+="child-segment = bracketed-selection /\n",e+=" (dot-prefix ; MODIFICATION: surrogate text rule used\n",e+=" (wildcard-selector /\n",e+=" member-name-shorthand))\n",e+="\n",e+="bracketed-selection = left-bracket S selector *(S comma S selector) S right-bracket\n",e+=" ; MODIFICATION: surrogate text rule used\n",e+="\n",e+="member-name-shorthand = name-first *name-char\n",e+="name-first = ALPHA /\n",e+=' "_" /\n',e+=" %x80-D7FF /\n",e+=" ; skip surrogate code points\n",e+=" %xE000-10FFFF\n",e+="name-char = name-first / DIGIT\n",e+="\n",e+="DIGIT = %x30-39 ; 0-9\n",e+="ALPHA = %x41-5A / %x61-7A ; A-Z / a-z\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.5.2.1\n",e+="descendant-segment = double-dot-prefix (bracketed-selection / ; MODIFICATION: surrogate text rule used\n",e+=" wildcard-selector /\n",e+=" member-name-shorthand)\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#name-normalized-paths\n",e+="normalized-path = root-identifier *(normal-index-segment)\n",e+="normal-index-segment = left-bracket normal-selector right-bracket ; MODIFICATION: surrogate text rule used\n",e+="normal-selector = normal-name-selector / normal-index-selector\n",e+="normal-name-selector = squote *normal-single-quoted squote ; 'string', MODIFICATION: surrogate text rule used\n",e+="normal-single-quoted = normal-unescaped /\n",e+=" ESC normal-escapable\n",e+="normal-unescaped = ; omit %x0-1F control codes\n",e+=" %x20-26 /\n",e+=" ; omit 0x27 '\n",e+=" %x28-5B /\n",e+=" ; omit 0x5C \\\n",e+=" %x5D-D7FF /\n",e+=" ; skip surrogate code points\n",e+=" %xE000-10FFFF\n",e+="\n",e+="normal-escapable = %x62 / ; b BS backspace U+0008\n",e+=" %x66 / ; f FF form feed U+000C\n",e+=" %x6E / ; n LF line feed U+000A\n",e+=" %x72 / ; r CR carriage return U+000D\n",e+=" %x74 / ; t HT horizontal tab U+0009\n",e+=" \"'\" / ; ' apostrophe U+0027\n",e+=' "\\" / ; \\ backslash (reverse solidus) U+005C\n',e+=" (%x75 normal-hexchar)\n",e+=" ; certain values u00xx U+00XX\n",e+='normal-hexchar = "0" "0"\n',e+=" (\n",e+=' ("0" %x30-37) / ; "00"-"07"\n',e+=" ; omit U+0008-U+000A BS HT LF\n",e+=' ("0" %x62) / ; "0b"\n',e+=" ; omit U+000C-U+000D FF CR\n",e+=' ("0" %x65-66) / ; "0e"-"0f"\n',e+=' ("1" normal-HEXDIG)\n',e+=" )\n",e+='normal-HEXDIG = DIGIT / %x61-66 ; "0"-"9", "a"-"f"\n',e+='normal-index-selector = "0" / (DIGIT1 *DIGIT)\n',e+=" ; non-negative decimal integer\n",e+="\n",e+="; Surrogate named rules\n",e+='dot-prefix = "."\n',e+='double-dot-prefix = ".."\n',e+='left-bracket = "["\n',e+='right-bracket = "]"\n',e+='left-paren = "("\n',e+='right-paren = ")"\n',e+='comma = ","\n',e+='colon = ":"\n',e+='dquote = %x22 ; "\n',e+="squote = %x27 ; '\n",e+='questionmark = "?"\n',e+='disjunction = "||"\n',e+='conjunction = "&&"\n','; JSONPath: Query Expressions for JSON\n; https://www.rfc-editor.org/rfc/rfc9535\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.1.1\njsonpath-query = root-identifier segments\nsegments = *(S segment)\n\nB = %x20 / ; Space\n %x09 / ; Horizontal tab\n %x0A / ; Line feed or New line\n %x0D ; Carriage return\nS = *B ; optional blank space\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.2.1\nroot-identifier = "$"\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3\nselector = name-selector /\n wildcard-selector /\n slice-selector /\n index-selector /\n filter-selector\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.1.1\nname-selector = string-literal\n\nstring-literal = dquote *double-quoted dquote / ; "string", MODIFICATION: surrogate text rule used\n squote *single-quoted squote ; \'string\', MODIFICATION: surrogate text rule used\n\ndouble-quoted = unescaped /\n %x27 / ; \'\n ESC %x22 / ; \\"\n ESC escapable\n\nsingle-quoted = unescaped /\n %x22 / ; "\n ESC %x27 / ; \\\'\n ESC escapable\n\nESC = %x5C ; \\ backslash\n\nunescaped = %x20-21 / ; see RFC 8259\n ; omit 0x22 "\n %x23-26 /\n ; omit 0x27 \'\n %x28-5B /\n ; omit 0x5C \\\n %x5D-D7FF /\n ; skip surrogate code points\n %xE000-10FFFF\n\nescapable = %x62 / ; b BS backspace U+0008\n %x66 / ; f FF form feed U+000C\n %x6E / ; n LF line feed U+000A\n %x72 / ; r CR carriage return U+000D\n %x74 / ; t HT horizontal tab U+0009\n "/" / ; / slash (solidus) U+002F\n "\\" / ; \\ backslash (reverse solidus) U+005C\n (%x75 hexchar) ; uXXXX U+XXXX\n\nhexchar = non-surrogate /\n (high-surrogate "\\" %x75 low-surrogate)\nnon-surrogate = ((DIGIT / "A"/"B"/"C" / "E"/"F") 3HEXDIG) /\n ("D" %x30-37 2HEXDIG )\nhigh-surrogate = "D" ("8"/"9"/"A"/"B") 2HEXDIG\nlow-surrogate = "D" ("C"/"D"/"E"/"F") 2HEXDIG\n\nHEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.2.1\nwildcard-selector = "*"\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.3.1\nindex-selector = int ; decimal integer\n\nint = "0" /\n (["-"] DIGIT1 *DIGIT) ; - optional\nDIGIT1 = %x31-39 ; 1-9 non-zero digit\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.4.1\nslice-selector = [start S] colon S [end S] [colon [S step ]] ; MODIFICATION: surrogate text rule used\n\nstart = int ; included in selection\nend = int ; not included in selection\nstep = int ; default: 1\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.5.1\nfilter-selector = questionmark S logical-expr ; MODIFICATION: surrogate text rule used\n\nlogical-expr = logical-or-expr\nlogical-or-expr = logical-and-expr *(S disjunction S logical-and-expr) ; MODIFICATION: surrogate text rule used\n ; disjunction\n ; binds less tightly than conjunction\nlogical-and-expr = basic-expr *(S conjunction S basic-expr) ; MODIFICATION: surrogate text rule used\n ; conjunction\n ; binds more tightly than disjunction\n\nbasic-expr = paren-expr /\n comparison-expr /\n test-expr\n\nparen-expr = [logical-not-op S] left-paren S logical-expr S right-paren ; MODIFICATION: surrogate text rule used\n ; parenthesized expression\nlogical-not-op = "!" ; logical NOT operator\n\ntest-expr = [logical-not-op S]\n (filter-query / ; existence/non-existence\n function-expr) ; LogicalType or NodesType\nfilter-query = rel-query / jsonpath-query\nrel-query = current-node-identifier segments\ncurrent-node-identifier = "@"\n\ncomparison-expr = comparable S comparison-op S comparable\nliteral = number / string-literal /\n true / false / null\ncomparable = singular-query / ; singular query value\n function-expr / ; ValueType\n literal\n ; MODIFICATION: https://www.rfc-editor.org/errata/eid8352\ncomparison-op = "==" / "!=" /\n "<=" / ">=" /\n "<" / ">"\n\nsingular-query = rel-singular-query / abs-singular-query\nrel-singular-query = current-node-identifier singular-query-segments\nabs-singular-query = root-identifier singular-query-segments\nsingular-query-segments = *(S (name-segment / index-segment))\nname-segment = (left-bracket name-selector right-bracket) / ; MODIFICATION: surrogate text rule used\n (dot-prefix member-name-shorthand) ; MODIFICATION: surrogate text rule used\nindex-segment = left-bracket index-selector right-bracket ; MODIFICATION: surrogate text rule used\n\nnumber = (int / "-0") [ frac ] [ exp ] ; decimal number\nfrac = "." 1*DIGIT ; decimal fraction\nexp = "e" [ "-" / "+" ] 1*DIGIT ; decimal exponent\ntrue = %x74.72.75.65 ; true\nfalse = %x66.61.6c.73.65 ; false\nnull = %x6e.75.6c.6c ; null\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.4\nfunction-name = function-name-first *function-name-char\nfunction-name-first = LCALPHA\nfunction-name-char = function-name-first / "_" / DIGIT\nLCALPHA = %x61-7A ; "a".."z"\n\nfunction-expr = function-name left-paren S [function-argument ; MODIFICATION: surrogate text rule used\n *(S comma S function-argument)] S right-paren ; MODIFICATION: surrogate text rule used\nfunction-argument = logical-expr / ; MODIFICATION: https://www.rfc-editor.org/errata/eid8343\n filter-query / ; (includes singular-query)\n function-expr /\n literal\n\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.5\nsegment = child-segment / descendant-segment\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.5.1.1\nchild-segment = bracketed-selection /\n (dot-prefix ; MODIFICATION: surrogate text rule used\n (wildcard-selector /\n member-name-shorthand))\n\nbracketed-selection = left-bracket S selector *(S comma S selector) S right-bracket\n ; MODIFICATION: surrogate text rule used\n\nmember-name-shorthand = name-first *name-char\nname-first = ALPHA /\n "_" /\n %x80-D7FF /\n ; skip surrogate code points\n %xE000-10FFFF\nname-char = name-first / DIGIT\n\nDIGIT = %x30-39 ; 0-9\nALPHA = %x41-5A / %x61-7A ; A-Z / a-z\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.5.2.1\ndescendant-segment = double-dot-prefix (bracketed-selection / ; MODIFICATION: surrogate text rule used\n wildcard-selector /\n member-name-shorthand)\n\n; https://www.rfc-editor.org/rfc/rfc9535#name-normalized-paths\nnormalized-path = root-identifier *(normal-index-segment)\nnormal-index-segment = left-bracket normal-selector right-bracket ; MODIFICATION: surrogate text rule used\nnormal-selector = normal-name-selector / normal-index-selector\nnormal-name-selector = squote *normal-single-quoted squote ; \'string\', MODIFICATION: surrogate text rule used\nnormal-single-quoted = normal-unescaped /\n ESC normal-escapable\nnormal-unescaped = ; omit %x0-1F control codes\n %x20-26 /\n ; omit 0x27 \'\n %x28-5B /\n ; omit 0x5C \\\n %x5D-D7FF /\n ; skip surrogate code points\n %xE000-10FFFF\n\nnormal-escapable = %x62 / ; b BS backspace U+0008\n %x66 / ; f FF form feed U+000C\n %x6E / ; n LF line feed U+000A\n %x72 / ; r CR carriage return U+000D\n %x74 / ; t HT horizontal tab U+0009\n "\'" / ; \' apostrophe U+0027\n "\\" / ; \\ backslash (reverse solidus) U+005C\n (%x75 normal-hexchar)\n ; certain values u00xx U+00XX\nnormal-hexchar = "0" "0"\n (\n ("0" %x30-37) / ; "00"-"07"\n ; omit U+0008-U+000A BS HT LF\n ("0" %x62) / ; "0b"\n ; omit U+000C-U+000D FF CR\n ("0" %x65-66) / ; "0e"-"0f"\n ("1" normal-HEXDIG)\n )\nnormal-HEXDIG = DIGIT / %x61-66 ; "0"-"9", "a"-"f"\nnormal-index-selector = "0" / (DIGIT1 *DIGIT)\n ; non-negative decimal integer\n\n; Surrogate named rules\ndot-prefix = "."\ndouble-dot-prefix = ".."\nleft-bracket = "["\nright-bracket = "]"\nleft-paren = "("\nright-paren = ")"\ncomma = ","\ncolon = ":"\ndquote = %x22 ; "\nsquote = %x27 ; \'\nquestionmark = "?"\ndisjunction = "||"\nconjunction = "&&"\n'}};const W=class extends X{},Y=e=>{if(!Array.isArray(e))throw new W("Selectors must be an array, got: "+typeof e,{selectors:e});try{return`$${e.map(e=>{if("string"==typeof e)return`['${(e=>{if("string"!=typeof e)throw new TypeError("Selector must be a string");let t="";for(const r of e){const e=r.codePointAt(0);switch(e){case 8:t+="\\b";break;case 9:t+="\\t";break;case 10:t+="\\n";break;case 12:t+="\\f";break;case 13:t+="\\r";break;case 39:t+="\\'";break;case 92:t+="\\\\";break;default:t+=e<=31?`\\u${e.toString(16).padStart(4,"0")}`:r}}return t})(e)}']`;if("number"==typeof e){if(!Number.isSafeInteger(e)||e<0)throw new TypeError(`Index selector must be a non-negative safe integer, got: ${e}`);return`[${e}]`}throw new TypeError("Selector must be a string or non-negative integer, got: "+typeof e)}).join("")}`}catch(t){throw new W("Failed to compile normalized JSONPath",{cause:t,selectors:e})}},Q=(e,t,r,s)=>{const{realm:n}=e,{value:o}=r;if(n.isObject(t)&&n.hasProperty(t,o)){s(n.getProperty(t,o),o)}},J=(e,t,r,s)=>{const{realm:n}=e,{value:o}=r;if(!n.isArray(t))return;const i=n.getLength(t),c=((e,t)=>e>=0?e:t+e)(o,i);if(c>=0&&c<i){s(n.getElement(t,c),c)}},K=(e,t,r,s)=>{const{realm:n}=e;for(const[e,r]of n.entries(t))s(r,e)},Z=(e,t)=>e>=0?Math.min(e,t):Math.max(t+e,0),ee=(e,t,r,s)=>{const{realm:n}=e,{start:o,end:i,step:c}=r;if(!n.isArray(t))return;const a=((e,t,r,s)=>{const n=r??1;if(0===n)return null;let o,i;if(n>0){const r=0,n=s,c=null!==e?Z(e,s):r,a=null!==t?Z(t,s):n;o=Math.max(c,0),i=Math.min(a,s)}else{const r=s-1,n=-s-1,c=null!==e?e>=0?Math.min(e,s-1):Math.max(s+e,-1):r,a=null!==t?t>=0?Math.min(t,s-1):Math.max(s+t,-1):n;i=Math.min(c,s-1),o=Math.max(a,-1)}return{lower:o,upper:i,step:n}})(o,i,c,n.getLength(t));if(null===a)return;const{lower:l,upper:u,step:p}=a;if(p>0)for(let e=l;e<u;e+=p){s(n.getElement(t,e),e)}else for(let e=u;e>l;e+=p){s(n.getElement(t,e),e)}},te=(e,t,r,s)=>s.value,re=(e,t,r)=>{const{realm:s}=e,{selector:n}=r;switch(n.type){case"NameSelector":{const{value:e}=n;return s.isObject(t)&&s.hasProperty(t,e)?s.getProperty(t,e):void 0}case"IndexSelector":{const{value:e}=n;if(!s.isArray(t))return;const r=s.getLength(t),o=e>=0?e:r+e;return o>=0&&o<r?s.getElement(t,o):void 0}default:return}},se=(e,t,r,s)=>{const{selectors:n}=r;for(const r of n)ye(e,t,r,s)},ne=(e,t,r)=>{const s=[],n=e=>{s.push(e)},{selector:o}=r;switch(o.type){case"BracketedSelection":se(e,t,o,n);break;case"NameSelector":case"WildcardSelector":case"IndexSelector":case"SliceSelector":case"FilterSelector":ye(e,t,o,n)}return s},oe=(e,t,r,s)=>{let n=r;for(const t of s){const r=[];if("DescendantSegment"===t.type){const s=n=>{const{realm:o}=e,i=ne(e,n,t);r.push(...i);for(const[,e]of o.entries(n))s(e)};for(const e of n)s(e)}else for(const s of n){const n=ne(e,s,t);r.push(...n)}n=r}return n},ie=(e,t,r,s)=>{const{query:n}=s;let o;switch(n.type){case"RelQuery":o=((e,t,r,s)=>{const{segments:n}=s;return 0===n.length?[r]:oe(e,0,[r],n)})(e,0,r,n);break;case"JsonPathQuery":o=((e,t,r,s)=>{const{segments:n}=s;return 0===n.length?[t]:oe(e,0,[t],n)})(e,t,0,n);break;default:o=[]}return i=o,Object.defineProperty(i,"_isNodelist",{value:!0,enumerable:!1,writable:!1}),i;var i};let ce;const ae=(e,t,r,s)=>{const{name:n,arguments:o}=s,i=e.functions[n];if("function"!=typeof i)return;const c=o.map(s=>((e,t,r,s)=>{switch(s.type){case"Literal":case"RelSingularQuery":case"AbsSingularQuery":case"FunctionExpr":return le(e,t,r,s);case"FilterQuery":return ie(e,t,r,s);case"TestExpr":return"FilterQuery"===s.expression.type?ie(e,t,r,s.expression):"FunctionExpr"===s.expression.type?le(e,t,r,s.expression):ce(e,t,r,s);case"LogicalOrExpr":case"LogicalAndExpr":case"LogicalNotExpr":case"ComparisonExpr":return ce(e,t,r,s);default:return}})(e,t,r,s));return i(e.realm,...c)},le=(e,t,r,s)=>{switch(s.type){case"Literal":return te(e,t,r,s);case"RelSingularQuery":return((e,t,r,s)=>{let n=r;for(const t of s.segments)if(n=re(e,n,t),void 0===n)return;return n})(e,0,r,s);case"AbsSingularQuery":return((e,t,r,s)=>{let n=t;for(const t of s.segments)if(n=re(e,n,t),void 0===n)return;return n})(e,t,0,s);case"FunctionExpr":return ae(e,t,r,s);default:return}},ue=(e,t,r,s)=>{const{left:n,op:o,right:i}=s,c=le(e,t,r,n),a=le(e,t,r,i);return e.realm.compare(c,o,a)},pe=e=>Array.isArray(e),de=(e,t,r,s)=>{switch(s.type){case"LogicalOrExpr":return!!de(e,t,r,s.left)||de(e,t,r,s.right);case"LogicalAndExpr":return!!de(e,t,r,s.left)&&de(e,t,r,s.right);case"LogicalNotExpr":return!de(e,t,r,s.expression);case"TestExpr":{const{expression:n}=s;if("FilterQuery"===n.type){return ie(e,t,r,n).length>0}if("FunctionExpr"===n.type){const s=ae(e,t,r,n);return"boolean"==typeof s?s:void 0!==s&&(pe(s)?s.length>0:Boolean(s))}return!1}case"ComparisonExpr":return ue(e,t,r,s);default:return!1}};ce=de;const he=de,fe=(e,t,r,s)=>{const{realm:n,root:o}=e,{expression:i}=r;for(const[r,c]of n.entries(t)){he(e,o,c,i)&&s(c,r)}},ye=(e,t,r,s)=>{switch(r.type){case"NameSelector":Q(e,t,r,s);break;case"IndexSelector":J(e,t,r,s);break;case"WildcardSelector":K(e,t,r,s);break;case"SliceSelector":ee(e,t,r,s);break;case"FilterSelector":fe(e,t,r,s)}};new Map;class me{node;key;index;parent;parentPath;inList;#e=!1;#t=!1;#r=!1;#s=!1;#n;#o=!1;constructor(e,t,r,s,n){this.node=e,this.parent=t,this.parentPath=r,this.key=s,this.index=n&&"number"==typeof s?s:void 0,this.inList=n}get shouldSkip(){return this.#e}get shouldStop(){return this.#t}get removed(){return this.#r}isRoot(){return null===this.parentPath}get depth(){let e=0,t=this.parentPath;for(;null!==t;)e+=1,t=t.parentPath;return e}getAncestry(){const e=[];let t=this.parentPath;for(;null!==t;)e.push(t),t=t.parentPath;return e}getAncestorNodes(){return this.getAncestry().map(e=>e.node)}getPathKeys(){const e=[];let t=this;for(;null!==t&&void 0!==t.key;){const{key:r,parent:s,parentPath:n}=t;if(P(s)&&"value"===r){if(!j(s.key))throw new TypeError("MemberElement.key must be a StringElement");e.unshift(s.key.toValue())}else B(n?.node)&&"number"==typeof r&&e.unshift(r);t=t.parentPath}return e}formatPath(e="jsonpointer"){const t=this.getPathKeys();return 0===t.length?"jsonpath"===e?"$":"":"jsonpath"===e?Y(t):z(t)}findParent(e){let t=this.parentPath;for(;null!==t;){if(e(t))return t;t=t.parentPath}return null}find(e){return e(this)?this:this.findParent(e)}skip(){this.#e=!0}stop(){this.#t=!0}replaceWith(e){this.#o&&console.warn("Warning: replaceWith() called on a stale Path. This path belongs to a node whose visit has already completed. The replacement will have no effect. To replace a parent node, do so from the parent's own visitor."),this.#s=!0,this.#n=e,this.node=e}remove(){this.#o&&console.warn("Warning: remove() called on a stale Path. This path belongs to a node whose visit has already completed. The removal will have no effect. To remove a parent node, do so from the parent's own visitor."),this.#r=!0}_getReplacementNode(){return this.#n}_wasReplaced(){return this.#s}_reset(){this.#e=!1,this.#t=!1,this.#r=!1,this.#s=!1,this.#n=void 0}_markStale(){this.#o=!0}}class ge extends AggregateError{constructor(e,t,r){super(e,t,r),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const xe=ge;class be extends Error{static[Symbol.hasInstance](e){return super[Symbol.hasInstance](e)||Function.prototype[Symbol.hasInstance].call(xe,e)}constructor(e,t){super(e,t),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const we=be;const ke=class extends we{constructor(e,t){if(super(e,t),null!=t&&"object"==typeof t){const{cause:e,...r}=t;Object.assign(this,r)}}};function ve(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,r){return t.apply(this,arguments)};case 3:return function(e,r,s){return t.apply(this,arguments)};case 4:return function(e,r,s,n){return t.apply(this,arguments)};case 5:return function(e,r,s,n,o){return t.apply(this,arguments)};case 6:return function(e,r,s,n,o,i){return t.apply(this,arguments)};case 7:return function(e,r,s,n,o,i,c){return t.apply(this,arguments)};case 8:return function(e,r,s,n,o,i,c,a){return t.apply(this,arguments)};case 9:return function(e,r,s,n,o,i,c,a,l){return t.apply(this,arguments)};case 10:return function(e,r,s,n,o,i,c,a,l,u){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function Ae(e,t,s){return function(){for(var n=[],o=0,i=e,c=0,a=!1;c<t.length||o<arguments.length;){var l;c<t.length&&(!r(t[c])||o>=arguments.length)?l=t[c]:(l=arguments[o],o+=1),n[c]=l,r(l)?a=!0:i-=1,c+=1}return!a&&i<=0?s.apply(this,n):ve(Math.max(0,i),Ae(e,n,s))}}var Te=n(function(e,t){return 1===e?s(t):ve(e,Ae(e,[],t))});const Se=Te;function Ie(e){var t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t}const Ee=n(function(e,t){return e&&t});function Oe(e,t,r){for(var s=0,n=r.length;s<n;)t=e(t,r[s]),s+=1;return t}const Ce=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};const Fe=s(function(e){return!!Ce(e)||!!e&&("object"==typeof e&&(!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))});var Me="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function De(e,t,r){return function(s,n,o){if(Fe(o))return e(s,n,o);if(null==o)return n;if("function"==typeof o["fantasy-land/reduce"])return t(s,n,o,"fantasy-land/reduce");if(null!=o[Me])return r(s,n,o[Me]());if("function"==typeof o.next)return r(s,n,o);if("function"==typeof o.reduce)return t(s,n,o,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function je(e,t,r){for(var s=r.next();!s.done;)t=e(t,s.value),s=r.next();return t}function Be(e,t,r,s){return r[s](e,t)}const Ne=De(Oe,Be,je);function Pe(e,t,r){return function(){if(0===arguments.length)return r();var s=arguments[arguments.length-1];if(!Ce(s)){for(var n=0;n<e.length;){if("function"==typeof s[e[n]])return s[e[n]].apply(s,Array.prototype.slice.call(arguments,0,-1));n+=1}if(function(e){return null!=e&&"function"==typeof e["@@transducer/step"]}(s))return t.apply(null,Array.prototype.slice.call(arguments,0,-1))(s)}return r.apply(this,arguments)}}function qe(e,t){for(var r=0,s=t.length,n=Array(s);r<s;)n[r]=e(t[r]),r+=1;return n}const Le=function(){return this.xf["@@transducer/init"]()},_e=function(e){return this.xf["@@transducer/result"](e)};var Ue=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=Le,e.prototype["@@transducer/result"]=_e,e.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},e}();var He=n(Pe(["fantasy-land/map","map"],function(e){return function(t){return new Ue(e,t)}},function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return Se(t.length,function(){return e.call(this,t.apply(this,arguments))});case"[object Object]":return Oe(function(r,s){return r[s]=e(t[s]),r},{},m(t));default:return qe(e,t)}}));const Ge=He;const $e=n(function(e,t){return"function"==typeof t["fantasy-land/ap"]?t["fantasy-land/ap"](e):"function"==typeof e.ap?e.ap(t):"function"==typeof e?function(r){return e(r)(t(r))}:Ne(function(e,r){return function(e,t){var r;t=t||[];var s=(e=e||[]).length,n=t.length,o=[];for(r=0;r<s;)o[o.length]=e[r],r+=1;for(r=0;r<n;)o[o.length]=t[r],r+=1;return o}(e,Ge(r,t))},[],e)});var Re=n(function(e,t){var r=Se(e,t);return Se(e,function(){return Oe($e,Ge(r,arguments[0]),Array.prototype.slice.call(arguments,1))})});const ze=Re;var Ve=s(function(e){return ze(e.length,e)});const Xe=Ve;const We=n(function(e,t){return Ie(e)?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:Xe(Ee)(e,t)});function Ye(e,t){return function(){return t.call(this,e.apply(this,arguments))}}function Qe(e){return function t(o,i,c){switch(arguments.length){case 0:return t;case 1:return r(o)?t:n(function(t,r){return e(o,t,r)});case 2:return r(o)&&r(i)?t:r(o)?n(function(t,r){return e(t,i,r)}):r(i)?n(function(t,r){return e(o,t,r)}):s(function(t){return e(o,i,t)});default:return r(o)&&r(i)&&r(c)?t:r(o)&&r(i)?n(function(t,r){return e(t,r,c)}):r(o)&&r(c)?n(function(t,r){return e(t,i,r)}):r(i)&&r(c)?n(function(t,r){return e(o,t,r)}):r(o)?s(function(t){return e(t,i,c)}):r(i)?s(function(t){return e(o,t,c)}):r(c)?s(function(t){return e(o,i,t)}):e(o,i,c)}}}function Je(e,t,r){for(var s=0,n=r.length;s<n;){if((t=e["@@transducer/step"](t,r[s]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}s+=1}return e["@@transducer/result"](t)}var Ke=n(function(e,t){return ve(e.length,function(){return e.apply(t,arguments)})});const Ze=Ke;function et(e,t,r){for(var s=r.next();!s.done;){if((t=e["@@transducer/step"](t,s.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}s=r.next()}return e["@@transducer/result"](t)}function tt(e,t,r,s){return e["@@transducer/result"](r[s](Ze(e["@@transducer/step"],e),t))}const rt=De(Je,tt,et);var st=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}();var nt=Qe(function(e,t,r){return rt("function"==typeof e?function(e){return new st(e)}(e):e,t,r)});const ot=nt;function it(e,t){return function(){var r=arguments.length;if(0===r)return t();var s=arguments[r-1];return Ce(s)||"function"!=typeof s[e]?t.apply(this,arguments):s[e].apply(s,Array.prototype.slice.call(arguments,0,r-1))}}const ct=s(it("tail",Qe(it("slice",function(e,t,r){return Array.prototype.slice.call(r,e,t)}))(1,1/0)));function at(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return ve(arguments[0].length,ot(Ye,arguments[0],ct(arguments)))}function lt(e,t){return function(e,t,r){var s,n;if("function"==typeof e.indexOf)switch(typeof t){case"number":if(0===t){for(s=1/t;r<e.length;){if(0===(n=e[r])&&1/n===s)return r;r+=1}return-1}if(t!=t){for(;r<e.length;){if("number"==typeof(n=e[r])&&n!=n)return r;r+=1}return-1}return e.indexOf(t,r);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,r);case"object":if(null===t)return e.indexOf(t,r)}for(;r<e.length;){if(w(e[r],t))return r;r+=1}return-1}(t,e,0)>=0}function ut(e){return'"'+e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}var pt=function(e){return(e<10?"0":"")+e};const dt="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+pt(e.getUTCMonth()+1)+"-"+pt(e.getUTCDate())+"T"+pt(e.getUTCHours())+":"+pt(e.getUTCMinutes())+":"+pt(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};var ht=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=Le,e.prototype["@@transducer/result"]=_e,e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.xf["@@transducer/step"](e,t):e},e}();function ft(e){return function(t){return new ht(e,t)}}var yt=n(Pe(["fantasy-land/filter","filter"],ft,function(e,t){return r=t,"[object Object]"===Object.prototype.toString.call(r)?Oe(function(r,s){return e(t[s])&&(r[s]=t[s]),r},{},m(t)):function(e){return"[object Map]"===Object.prototype.toString.call(e)}(t)?function(e,t){for(var r=new Map,s=t.entries(),n=s.next();!n.done;)e(n.value[1])&&r.set(n.value[0],n.value[1]),n=s.next();return r}(e,t):function(e,t){for(var r=0,s=t.length,n=[];r<s;)e(t[r])&&(n[n.length]=t[r]),r+=1;return n}(e,t);var r}));const mt=yt;const gt=n(function(e,t){return mt((r=e,function(){return!r.apply(this,arguments)}),t);var r});function xt(e,t){var r=function(r){var s=t.concat([e]);return lt(r,s)?"<Circular>":xt(r,s)},s=function(e,t){return qe(function(t){return ut(t)+": "+r(e[t])},t.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+qe(r,e).join(", ")+"))";case"[object Array]":return"["+qe(r,e).concat(s(e,gt(function(e){return/^\d+$/.test(e)},m(e)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof e?"new Boolean("+r(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?r(NaN):ut(dt(e)))+")";case"[object Map]":return"new Map("+r(Array.from(e))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof e?"new Number("+r(e.valueOf())+")":1/e==-1/0?"-0":e.toString(10);case"[object Set]":return"new Set("+r(Array.from(e).sort())+")";case"[object String]":return"object"==typeof e?"new String("+r(e.valueOf())+")":ut(e);case"[object Undefined]":return"undefined";default:if("function"==typeof e.toString){var n=e.toString();if("[object Object]"!==n)return n}return"{"+s(e,m(e)).join(", ")+"}"}}const bt=s(function(e){return xt(e,[])});const wt=n(function(e,t){return e||t});const kt=n(function(e,t){return Ie(e)?function(){return e.apply(this,arguments)||t.apply(this,arguments)}:Xe(wt)(e,t)});const vt=Xe(s(function(e){return!e}))(w(null));const At=n(function(e,t){if(e===t)return t;function r(e,t){if(e>t!=t>e)return t>e?t:e}var s=r(e,t);if(void 0!==s)return s;var n=r(typeof e,typeof t);if(void 0!==n)return n===typeof e?e:t;var o=bt(e),i=r(o,bt(t));return void 0!==i&&i===o?e:t}),Tt=Number.isInteger||function(e){return(e|0)===e};const St=n(function(e,t){var r,s;if(null!=t)return Tt(e)?(s=t)[(r=e)<0?s.length+r:r]:t[e]});const It=n(function(e,t){return Ge(St(e),t)});const Et=s(function(e){return Se(ot(At,0,It("length",e)),function(){for(var t=0,r=e.length;t<r;){if(e[t].apply(this,arguments))return!0;t+=1}return!1})});var Ot=function(e,t){switch(arguments.length){case 0:return Ot;case 1:return function t(r){return 0===arguments.length?t:a(e,r)};default:return a(e,t)}};const Ct=Ot;const Ft=Se(1,at(g,Ct("GeneratorFunction")));const Mt=Se(1,at(g,Ct("AsyncFunction")));var Dt=Et([at(g,Ct("Function")),Ft,Mt]);function jt(e){return jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jt(e)}var Bt=Se(1,We(vt,kt(function(e){return"object"===jt(e)},Dt)));const Nt=Se(1,We(Bt,at(bt,w("[object Promise]"))));const Pt=e=>"number"==typeof e.startLine&&"number"==typeof e.startCharacter&&"number"==typeof e.startOffset&&"number"==typeof e.endLine&&"number"==typeof e.endCharacter&&"number"==typeof e.endOffset;class qt extends I{constructor(e,t,r){super(e,t,r),this.element="sourceMap"}static transfer(e,t){t.startLine=e.startLine,t.startCharacter=e.startCharacter,t.startOffset=e.startOffset,t.endLine=e.endLine,t.endCharacter=e.endCharacter,t.endOffset=e.endOffset}static from(e){const{startLine:t,startCharacter:r,startOffset:s,endLine:n,endCharacter:o,endOffset:i}=e;if("number"!=typeof t||"number"!=typeof r||"number"!=typeof s||"number"!=typeof n||"number"!=typeof o||"number"!=typeof i)return;const c="sm1:"+[t,r,s,n,o,i].map(_t).join("");const a=new qt(c);return a.startLine=t,a.startCharacter=r,a.startOffset=s,a.endLine=n,a.endCharacter=o,a.endOffset=i,a}applyTo(e){this.content&&([e.startLine,e.startCharacter,e.startOffset,e.endLine,e.endCharacter,e.endOffset]=function(e){const t=e.startsWith("sm1:")?e.slice(4):e,r=[];let s=0;for(let e=0;e<6;e++){const e=Ut(t,s);r.push(e.value),s=e.next}return r}(this.content))}}const Lt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function _t(e){let t=e>>>0,r="";do{let e=31&t;t>>>=5,0!==t&&(e|=32),r+=Lt[e]}while(0!==t);return r}function Ut(e,t=0){let r=0,s=0,n=t;for(;;){const t=e[n++],o=Lt.indexOf(t);if(-1===o)throw new Error(`Invalid Base64 VLQ char: ${t}`);if(r|=(31&o)<<s,s+=5,!!!(32&o))break}return{value:r>>>0,next:n}}const Ht=qt;const Gt=class extends ke{value;constructor(e,t){super(e,t),void 0!==t&&(this.value=t.value)}};const $t=class extends Gt{};const Rt=class extends Gt{},zt=(e,t)=>{const{visited:r=new WeakMap}=t,s={...t,visited:r};if(r.has(e))return r.get(e);const n=Yt(e);r.set(e,n);const{content:o}=e;return Array.isArray(o)?n.content=o.map(e=>zt(e,s)):D(o)?n.content=zt(o,s):n.content=o instanceof k?Vt(o,s):o,n},Vt=(e,t)=>{const{visited:r=new WeakMap}=t,s={...t,visited:r};if(r.has(e))return r.get(e);const{key:n,value:o}=e,i=void 0!==n?zt(n,s):void 0,c=void 0!==o?zt(o,s):void 0,a=new k(i,c);return r.set(e,a),a},Xt=(e,t={})=>{if(e instanceof k)return Vt(e,t);if(e instanceof A)return((e,t)=>{const{visited:r=new WeakMap}=t,s={...t,visited:r};if(r.has(e))return r.get(e);const n=[...e].map(e=>zt(e,s)),o=new A(n);return r.set(e,o),o})(e,t);if(D(e))return zt(e,t);throw new $t("Value provided to cloneDeep function couldn't be cloned",{value:e})};Xt.safe=e=>{try{return Xt(e)}catch{return e}};const Wt=e=>{const{key:t,value:r}=e;return new k(t,r)},Yt=e=>{const t=new(0,e.constructor);t.element=e.element,e.isMetaEmpty||(t.meta=Xt(e.meta)),e.isAttributesEmpty||(t.attributes=Xt(e.attributes)),Pt(e)&&Ht.transfer(e,t);const{content:r}=e;return D(r)?t.content=Yt(r):Array.isArray(r)?t.content=[...r]:t.content=r instanceof k?Wt(r):r,t},Qt=e=>{if(e instanceof k)return Wt(e);if(e instanceof A)return(e=>{const t=[...e];return new A(t)})(e);if(D(e))return Yt(e);throw new Rt("Value provided to cloneShallow function couldn't be cloned",{value:e})};Qt.safe=e=>{try{return Qt(e)}catch{return e}};const Jt=e=>{const t=e?.element;return void 0===t||"element"===t?"Element":`${t.charAt(0).toUpperCase()}${t.slice(1)}Element`},Kt=e=>{const t=e.primitive();return void 0===t||"element"===t?"Element":`${t.charAt(0).toUpperCase()}${t.slice(1)}Element`},Zt=e=>D(e),er=e=>Qt(e),tr=(e,t,r)=>{P(e)?e.value=r:Array.isArray(e)?e[t]=null===r?void 0:r:null===r?delete e[t]:e[t]=r},rr=e=>P(e)?["key","value"]:B(e)||N(e)?["content"]:[],sr=(e,t)=>{if(void 0!==e[t])return e[t];const r=t.length;for(const s in e){if(!s.includes("|"))continue;const n=s.indexOf(t);if(-1===n)continue;const o=0===n||"|"===s[n-1],i=n+r===s.length||"|"===s[n+r];if(o&&i)return e[s]}},nr=(e,t,r)=>{if(void 0===t)return null;const s=e,n=r?"leave":"enter",o=sr(s,t);if(!r&&"function"==typeof o)return o;if(null!=o){const e=o[n];if("function"==typeof e)return e}const i=s[n];if("function"==typeof i)return i;if(null!=i){const e=sr(i,t);if("function"==typeof e)return e}return null},or=(e,t={})=>{const{visitFnGetter:r=nr,nodeTypeGetter:s=Jt,exposeEdits:n=!1}=t,o=Symbol("internal-skip"),i=Symbol("break"),c=new Array(e.length).fill(o);return{enter(t){let a=t.node,l=!1;for(let u=0;u<e.length;u+=1)if(c[u]===o){const o=r(e[u],s(a),!1);if("function"==typeof o){const r=cr(t,a),s=o.call(e[u],r);if(Nt(s))throw new ke("Async visitor not supported in sync mode",{visitor:e[u],visitFn:o});if(r.shouldStop){c[u]=i;break}if(r.shouldSkip&&(c[u]=a),r.removed)return void t.remove();if(r._wasReplaced()){const e=r._getReplacementNode();if(!n)return t.replaceWith(e),e;a=e,l=!0}else if(void 0!==s){if(!n)return t.replaceWith(s),s;a=s,l=!0}}}if(l)return t.replaceWith(a),a},leave(t){const n=t.node;for(let a=0;a<e.length;a+=1)if(c[a]===o){const o=r(e[a],s(n),!0);if("function"==typeof o){const r=cr(t,n),s=o.call(e[a],r);if(Nt(s))throw new ke("Async visitor not supported in sync mode",{visitor:e[a],visitFn:o});if(r.shouldStop){c[a]=i;break}if(r.removed)return void t.remove();if(r._wasReplaced()){const e=r._getReplacementNode();return t.replaceWith(e),e}if(void 0!==s)return t.replaceWith(s),s}}else c[a]===n&&(c[a]=o)}}},ir=(e,t={})=>{const{visitFnGetter:r=nr,nodeTypeGetter:s=Jt,exposeEdits:n=!1}=t,o=Symbol("internal-skip"),i=Symbol("break"),c=new Array(e.length).fill(o);return{async enter(t){let a=t.node,l=!1;for(let u=0;u<e.length;u+=1)if(c[u]===o){const o=r(e[u],s(a),!1);if("function"==typeof o){const r=cr(t,a),s=await o.call(e[u],r);if(r.shouldStop){c[u]=i;break}if(r.shouldSkip&&(c[u]=a),r.removed)return void t.remove();if(r._wasReplaced()){const e=r._getReplacementNode();if(!n)return t.replaceWith(e),e;a=e,l=!0}else if(void 0!==s){if(!n)return t.replaceWith(s),s;a=s,l=!0}}}if(l)return t.replaceWith(a),a},async leave(t){const n=t.node;for(let a=0;a<e.length;a+=1)if(c[a]===o){const o=r(e[a],s(n),!0);if("function"==typeof o){const r=cr(t,n),s=await o.call(e[a],r);if(r.shouldStop){c[a]=i;break}if(r.removed)return void t.remove();if(r._wasReplaced()){const e=r._getReplacementNode();return t.replaceWith(e),e}if(void 0!==s)return t.replaceWith(s),s}}else c[a]===n&&(c[a]=o)}}};function cr(e,t){return new me(t,e.parent,e.parentPath,e.key,e.inList)}function*ar(e,t,r){const{keyMap:s,state:n,nodeTypeGetter:o,nodePredicate:i,nodeCloneFn:c,detectCycles:a,mutable:l,mutationFn:u}=r,p="function"==typeof s;let d,h,f=Array.isArray(e),y=[e],m=-1,g=[],x=e,b=null,w=null;const k=[];do{m+=1;const e=m===y.length;let r;const v=e&&0!==g.length;if(e){if(r=0===k.length?void 0:b?.key,x=h,h=k.pop(),w=b?.parentPath?.parentPath??null,v)if(l)for(const[e,t]of g)u(x,e,t);else if(f){x=x.slice();let e=0;for(const[t,r]of g){const s=t-e;null===r?(x.splice(s,1),e+=1):x[s]=r}}else{x=c(x);for(const[e,t]of g)x[e]=t}if(void 0!==d){m=d.index,y=d.keys,g=d.edits;const e=d.inArray;if(w=d.parentPath,d=d.prev,v&&!l){const t=e?m:y[m];g.push([t,x])}f=e}}else if(void 0!==h&&(r=f?m:y[m],x=h[r],void 0===x))continue;if(!Array.isArray(x)){if(!i(x))throw new ke(`Invalid AST Node: ${String(x)}`,{node:x});if(a&&k.includes(x))continue;b=new me(x,h,w,r,f);const s=nr(t,o(x),e);if(s){for(const[e,r]of Object.entries(n))t[e]=r;const o=yield{visitFn:s,path:b,isLeaving:e};if(b.shouldStop)break;if(b.shouldSkip&&!e)continue;if(b.removed){if(g.push([r,null]),!e)continue}else if(b._wasReplaced()){const t=b._getReplacementNode();if(g.push([r,t]),!e){if(!i(t))continue;x=t}}else if(void 0!==o&&(g.push([r,o]),!e)){if(!i(o))continue;x=o}b._markStale()}}if(!e){if(d={inArray:f,index:m,keys:y,edits:g,parentPath:w,prev:d},f=Array.isArray(x),f)y=x;else if(p)y=s(x);else{const e=o(x);y=void 0!==e?s[e]??[]:[]}m=-1,g=[],void 0!==h&&k.push(h),h=x,w=b}}while(void 0!==d);return 0!==g.length?g.at(-1)[1]:e}or[Symbol.for("nodejs.util.promisify.custom")]=ir;const lr=(e,t,r={})=>{const s=ar(e,t,{keyMap:r.keyMap??rr,state:r.state??{},nodeTypeGetter:r.nodeTypeGetter??Jt,nodePredicate:r.nodePredicate??Zt,nodeCloneFn:r.nodeCloneFn??er,detectCycles:r.detectCycles??!0,mutable:r.mutable??!1,mutationFn:r.mutationFn??tr});let n=s.next();for(;!n.done;){const e=n.value,r=e.visitFn.call(t,e.path);if(Nt(r))throw new ke("Async visitor not supported in sync mode",{visitor:t,visitFn:e.visitFn});n=s.next(r)}return n.value},ur=async(e,t,r={})=>{const s=ar(e,t,{keyMap:r.keyMap??rr,state:r.state??{},nodeTypeGetter:r.nodeTypeGetter??Jt,nodePredicate:r.nodePredicate??Zt,nodeCloneFn:r.nodeCloneFn??er,detectCycles:r.detectCycles??!0,mutable:r.mutable??!1,mutationFn:r.mutationFn??tr});let n=s.next();for(;!n.done;){const e=n.value,r=await e.visitFn.call(t,e.path);n=s.next(r)}return n.value};lr[Symbol.for("nodejs.util.promisify.custom")]=ur;const pr=(e,t)=>{const r=[];return lr(e,{enter(e){t(e.node)&&r.push(e.node)}}),r},dr=(e,t)=>{let r;return lr(e,{enter(e){t(e.node)&&(r=e.node,e.stop())}}),r},hr=(e,t)=>void 0!==dr(e,t),fr=(e,t)=>pr(e,e=>!t(e)),yr=(e,t)=>{let r,s;"function"==typeof t?(r=t,s=D):(r=t.callback??(()=>{}),s=t.predicate??D),lr(e,{enter(e){s(e.node)&&r(e.node)}})},mr=e=>{const t=new WeakMap;return lr(e,{enter(e){t.set(e.node,e.parentPath?.node)}}),t},gr=(e,t)=>{let r,s;"number"==typeof t?(r=t,s=!1):(r=t.offset??0,s=t.includeRightBound??!1);const n=[];return lr(e,{enter(e){const t=e.node;if(!Pt(t))return;const o=t.startOffset,i=t.endOffset;r>=o&&(r<i||s&&r<=i)?n.push(t):e.skip()}}),n.at(-1)};return me.prototype.traverse=function(e,t){return lr(this.node,e,t)},me.prototype.traverseAsync=function(e,t){return ur(this.node,e,t)},t})());
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.apidomTraverse=t():e.apidomTraverse=t()}(self,()=>(()=>{"use strict";var e={d:(t,r)=>{for(var s in r)e.o(r,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:r[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function s(e){return function t(s){return 0===arguments.length||r(s)?t:e.apply(this,arguments)}}function n(e){return function t(n,o){switch(arguments.length){case 0:return t;case 1:return r(n)?t:s(function(t){return e(n,t)});default:return r(n)&&r(o)?t:r(n)?s(function(t){return e(t,o)}):r(o)?s(function(t){return e(n,t)}):e(n,o)}}}function o(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}function i(e,t,r){for(var s=0,n=r.length;s<n;){if(e(t,r[s]))return!0;s+=1}return!1}function c(e,t){return Object.prototype.hasOwnProperty.call(t,e)}e.r(t),e.d(t,{Path:()=>me,cloneNode:()=>sr,filter:()=>fr,find:()=>yr,findAtOffset:()=>wr,forEach:()=>xr,getNodeKeys:()=>or,getNodePrimitiveType:()=>tr,getNodeType:()=>er,getVisitFn:()=>cr,isNode:()=>rr,mergeVisitors:()=>ar,mergeVisitorsAsync:()=>lr,mutateNode:()=>nr,parents:()=>br,reject:()=>gr,some:()=>mr,traverse:()=>dr,traverseAsync:()=>hr});const a="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var l=Object.prototype.toString;const u=function(){return"[object Arguments]"===l.call(arguments)?function(e){return"[object Arguments]"===l.call(e)}:function(e){return c("callee",e)}}();var p=!{toString:null}.propertyIsEnumerable("toString"),d=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],h=function(){return arguments.propertyIsEnumerable("length")}(),f=function(e,t){for(var r=0;r<e.length;){if(e[r]===t)return!0;r+=1}return!1},y="function"!=typeof Object.keys||h?s(function(e){if(Object(e)!==e)return[];var t,r,s=[],n=h&&u(e);for(t in e)!c(t,e)||n&&"length"===t||(s[s.length]=t);if(p)for(r=d.length-1;r>=0;)c(t=d[r],e)&&!f(s,t)&&(s[s.length]=t),r-=1;return s}):s(function(e){return Object(e)!==e?[]:Object.keys(e)});const m=y;const g=s(function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function x(e,t,r,s){var n=o(e);function c(e,t){return b(e,t,r.slice(),s.slice())}return!i(function(e,t){return!i(c,t,e)},o(t),n)}function b(e,t,r,s){if(a(e,t))return!0;var n=g(e);if(n!==g(t))return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(n){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===function(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!a(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!a(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var o=r.length-1;o>=0;){if(r[o]===e)return s[o]===t;o-=1}switch(n){case"Map":return e.size===t.size&&x(e.entries(),t.entries(),r.concat([e]),s.concat([t]));case"Set":return e.size===t.size&&x(e.values(),t.values(),r.concat([e]),s.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var i=m(e);if(i.length!==m(t).length)return!1;var l=r.concat([e]),u=s.concat([t]);for(o=i.length-1;o>=0;){var p=i[o];if(!c(p,t)||!b(t[p],e[p],l,u))return!1;o-=1}return!0}const w=n(function(e,t){return b(e,t,[],[])});const k=class{key;value;constructor(e,t){this.key=e,this.value=t}toValue(){return{key:this.key?.toValue(),value:this.value?.toValue()}}};class v{elements;constructor(e){this.elements=e??[]}toValue(){return this.elements.map(e=>({key:e.key?.toValue(),value:e.value?.toValue()}))}map(e,t){return this.elements.map(r=>{const s=r.value,n=r.key;if(void 0===s||void 0===n)throw new Error("MemberElement must have both key and value");return void 0!==t?e.call(t,s,n,r):e(s,n,r)})}filter(e,t){const r=this.elements.filter(r=>{const s=r.value,n=r.key;return void 0!==s&&void 0!==n&&(void 0!==t?e.call(t,s,n,r):e(s,n,r))});return new v(r)}reject(e,t){const r=[];for(const s of this.elements){const n=s.value,o=s.key;void 0!==n&&void 0!==o&&(e.call(t,n,o,s)||r.push(s))}return new v(r)}forEach(e,t){this.elements.forEach((r,s)=>{const n=r.value,o=r.key;void 0!==n&&void 0!==o&&(void 0!==t?e.call(t,n,o,r,s):e(n,o,r,s))})}find(e,t){return this.elements.find(r=>{const s=r.value,n=r.key;return void 0!==s&&void 0!==n&&(void 0!==t?e.call(t,s,n,r):e(s,n,r))})}keys(){return this.elements.map(e=>e.key?.toValue()).filter(e=>void 0!==e)}values(){return this.elements.map(e=>e.value?.toValue()).filter(e=>void 0!==e)}get length(){return this.elements.length}get isEmpty(){return 0===this.length}get first(){return this.elements[0]}get(e){return this.elements[e]}push(e){return this.elements.push(e),this}includesKey(e){return this.elements.some(t=>t.key?.equals(e))}[Symbol.iterator](){return this.elements[Symbol.iterator]()}}const A=v;class T{parent;style;startLine;startCharacter;startOffset;endLine;endCharacter;endOffset;_storedElement="element";_content;_meta;_attributes;constructor(e,t,r){void 0!==t&&(this.meta=t),void 0!==r&&(this.attributes=r),void 0!==e&&(this.content=e)}get element(){return this._storedElement}set element(e){this._storedElement=e}get content(){return this._content}set content(e){if(e instanceof T)this._content=e;else if(null!=e&&"string"!=typeof e&&"number"!=typeof e&&"boolean"!=typeof e&&"bigint"!=typeof e&&"symbol"!=typeof e)if(e instanceof k)this._content=e;else if(e instanceof A)this._content=e.elements;else if(Array.isArray(e))this._content=e.map(e=>this.refract(e));else{if("object"!=typeof e)throw new Error("Cannot set content to value of type "+typeof e);this._content=Object.entries(e).map(([e,t])=>new this.MemberElement(e,t))}else this._content=e}get meta(){if(!this._meta){if(this.isFrozen){const e=new this.ObjectElement;return e.freeze(),e}this._meta=new this.ObjectElement}return this._meta}set meta(e){e instanceof T?this._meta=e:this.meta.set(e??{})}get attributes(){if(!this._attributes){if(this.isFrozen){const e=new this.ObjectElement;return e.freeze(),e}this._attributes=new this.ObjectElement}return this._attributes}set attributes(e){e instanceof T?this._attributes=e:this.attributes.set(e??{})}get id(){return this.isFrozen?this.getMetaProperty("id",""):(this.hasMetaProperty("id")||this.setMetaProperty("id",""),this.meta.get("id"))}set id(e){this.setMetaProperty("id",e)}get classes(){return this.isFrozen?this.getMetaProperty("classes",[]):(this.hasMetaProperty("classes")||this.setMetaProperty("classes",[]),this.meta.get("classes"))}set classes(e){this.setMetaProperty("classes",e)}get links(){return this.isFrozen?this.getMetaProperty("links",[]):(this.hasMetaProperty("links")||this.setMetaProperty("links",[]),this.meta.get("links"))}set links(e){this.setMetaProperty("links",e)}get children(){const{_content:e}=this;if(Array.isArray(e))return e;if(e instanceof k){const t=[];return e.key&&t.push(e.key),e.value&&t.push(e.value),t}return e instanceof T?[e]:[]}get isFrozen(){return Object.isFrozen(this)}freeze(){if(!this.isFrozen){this._meta&&(this._meta.parent=this,this._meta.freeze()),this._attributes&&(this._attributes.parent=this,this._attributes.freeze());for(const e of this.children)e.parent=this,e.freeze();Array.isArray(this._content)&&Object.freeze(this._content),Object.freeze(this)}}toValue(){const{_content:e}=this;return e instanceof T||e instanceof k?e.toValue():Array.isArray(e)?e.map(e=>e.toValue()):e}equals(e){const t=e instanceof T?e.toValue():e;return w(this.toValue(),t)}primitive(){}set(e){return this.content=e,this}toRef(e){const t=this.id.toValue();if(""===t)throw new Error("Cannot create reference to an element without an ID");const r=new this.RefElement(t);return"string"==typeof e&&(r.path=this.refract(e)),r}getMetaProperty(e,t){if(!this.hasMetaProperty(e)){if(void 0===t)return;const e=this.refract(t);return e&&this.isFrozen&&e.freeze(),e}return this.meta.get(e)}setMetaProperty(e,t){this.meta.set(e,t)}hasMetaProperty(e){return!this.isMetaEmpty&&this.meta.hasKey(e)}get isMetaEmpty(){return void 0===this._meta||this.meta.isEmpty}getAttributesProperty(e,t){if(!this.hasAttributesProperty(e)){if(this.isFrozen){const e=this.refract(t);return e.freeze(),e}this.attributes.set(e,t)}return this.attributes.get(e)}setAttributesProperty(e,t){this.attributes.set(e,t)}hasAttributesProperty(e){return!this.isAttributesEmpty&&this.attributes.hasKey(e)}get isAttributesEmpty(){return void 0===this._attributes||this.attributes.isEmpty}}const S=T;const I=class extends S{constructor(e,t,r){super(e,t,r),this.element="string"}primitive(){return"string"}get length(){return this.content?.length??0}};class O extends S{constructor(e,t,r){super(e||[],t,r)}get length(){return this._content.length}get isEmpty(){return 0===this.length}get first(){return this._content[0]}get second(){return this._content[1]}get last(){return this._content.at(-1)}push(...e){for(const t of e)this._content.push(this.refract(t));return this}shift(){return this._content.shift()}unshift(e){this._content.unshift(this.refract(e))}includes(e){return this._content.some(t=>t.equals(e))}findElements(e,t){const r=t||{},s=!!r.recursive,n=void 0===r.results?[]:r.results;for(let t=0;t<this._content.length;t+=1){const r=this._content[t],o=r;s&&"function"==typeof o.findElements&&o.findElements(e,{results:n,recursive:s}),e(r,t,void 0)&&n.push(r)}return n}find(e){const t=this.findElements(e,{recursive:!0});return new this.ArrayElement(t)}findByElement(e){return this.find(t=>t.element===e)}findByClass(e){return this.find(t=>{const r=t.classes;return"function"==typeof r.includes&&r.includes(e)})}getById(e){return this.find(t=>t.id.toValue()===e).first}concat(e){return new(0,this.constructor)(this._content.concat(e._content))}[Symbol.iterator](){return this._content[Symbol.iterator]()}}const E=O;const C=class extends E{constructor(e,t,r){super(e||[],t,r),this.element="array"}primitive(){return"array"}get(e){return this._content[e]}getValue(e){const t=this.get(e);if(t)return t.toValue()}set(e,t){return"number"==typeof e&&void 0!==t?this._content[e]=this.refract(t):this.content=e,this}remove(e){return this._content.splice(e,1)[0]??null}map(e,t){return this._content.map(e,t)}flatMap(e,t){return this._content.flatMap(e,t)}compactMap(e,t){const r=[];for(const s of this._content){const n=e.call(t,s);n&&r.push(n)}return r}filter(e,t){const r=this._content.filter(e,t);return new this.constructor(r)}reject(e,t){const r=[];for(const s of this._content)e.call(t,s)||r.push(s);return new this.constructor(r)}reduce(e,t){let r,s;void 0!==t?(r=0,s=this.refract(t)):(r=1,s=this.first);for(let t=r;t<this.length;t+=1){const r=e(s,this._content[t],t,this);s=void 0===r?r:this.refract(r)}return s}forEach(e,t){this._content.forEach((r,s)=>{e.call(t,r,s)})}empty(){return new this.constructor([])}};const F=class extends S{constructor(e,t,r,s){super(new k,r,s),this.element="member",void 0!==e&&(this.key=e),arguments.length>=2&&(this.value=t)}primitive(){return"member"}get key(){return this._content.key}set key(e){this._content.key=this.refract(e)}get value(){return this._content.value}set value(e){this._content.value=void 0===e?void 0:this.refract(e)}};const M=class extends E{constructor(e,t,r){super(e||[],t,r),this.element="object"}primitive(){return"object"}toValue(){return this._content.reduce((e,t)=>(e[t.key.toValue()]=t.value?t.value.toValue():void 0,e),{})}get(e){const t=this.getMember(e);if(t)return t.value}getValue(e){const t=this.get(e);if(t)return t.toValue()}getMember(e){if(void 0!==e)return this._content.find(t=>t.key.toValue()===e)}remove(e){let t=null;return this.content=this._content.filter(r=>r.key.toValue()!==e||(t=r,!1)),t}getKey(e){const t=this.getMember(e);if(t)return t.key}set(e,t){if("string"==typeof e){const r=this.getMember(e);r?r.value=t:this._content.push(new F(e,t))}else if("object"==typeof e&&!Array.isArray(e))for(const t of Object.keys(e))this.set(t,e[t]);return this}keys(){return this._content.map(e=>e.key.toValue())}values(){return this._content.map(e=>e.value.toValue())}hasKey(e){return this._content.some(t=>t.key.equals(e))}items(){return this._content.map(e=>[e.key.toValue(),e.value.toValue()])}map(e,t){return this._content.map(r=>e.call(t,r.value,r.key,r))}compactMap(e,t){const r=[];return this.forEach((s,n,o)=>{const i=e.call(t,s,n,o);i&&r.push(i)}),r}filter(e,t){return new A(this._content).filter(e,t)}reject(e,t){const r=[];for(const s of this._content)e.call(t,s.value,s.key,s)||r.push(s);return new A(r)}forEach(e,t){this._content.forEach(r=>e.call(t,r.value,r.key,r))}reduce(e,t){let r,s;void 0!==t?(r=0,s=this.refract(t)):(r=1,s=this._content[0]?.value);for(let t=r;t<this._content.length;t+=1){const r=this._content[t],n=e(s,r.value,r.key,r,this);s=void 0===n?n:this.refract(n)}return s}empty(){return new this.constructor([])}};const j=e=>e instanceof S,D=e=>e instanceof I,B=e=>e instanceof C,N=e=>e instanceof M,P=e=>e instanceof F,q=function(){const e=_,t=L,r=this,s="parser.js: Parser(): ";r.ast=void 0,r.stats=void 0,r.trace=void 0,r.callbacks=[];let n,o,i,c,a,l,u,p=0,d=0,h=0,f=0,y=0,m=new function(){this.state=e.ACTIVE,this.phraseLength=0,this.refresh=()=>{this.state=e.ACTIVE,this.phraseLength=0}};r.parse=(g,x,w,k)=>{const v=`${s}parse(): `;p=0,d=0,h=0,f=0,y=0,n=void 0,o=void 0,i=void 0,c=void 0,m.refresh(),a=void 0,l=void 0,u=void 0,c=t.stringToChars(w),n=g.rules,o=g.udts;const A=x.toLowerCase();let T;for(const e in n)if(n.hasOwnProperty(e)&&A===n[e].lower){T=n[e].index;break}if(void 0===T)throw new Error(`${v}start rule name '${startRule}' not recognized`);(()=>{const e=`${s}initializeCallbacks(): `;let t,i;for(a=[],l=[],t=0;t<n.length;t+=1)a[t]=void 0;for(t=0;t<o.length;t+=1)l[t]=void 0;const c=[];for(t=0;t<n.length;t+=1)c.push(n[t].lower);for(t=0;t<o.length;t+=1)c.push(o[t].lower);for(const s in r.callbacks)if(r.callbacks.hasOwnProperty(s)){if(t=c.indexOf(s.toLowerCase()),t<0)throw new Error(`${e}syntax callback '${s}' not a rule or udt name`);if(i=r.callbacks[s]?r.callbacks[s]:void 0,"function"!=typeof i&&void 0!==i)throw new Error(`${e}syntax callback[${s}] must be function reference or falsy)`);t<n.length?a[t]=i:l[t-n.length]=i}})(),r.trace&&r.trace.init(n,o,c),r.stats&&r.stats.init(n,o),r.ast&&r.ast.init(n,o,c),u=k,i=[{type:e.RNM,index:T}],b(0,0),i=void 0;let S=!1;switch(m.state){case e.ACTIVE:throw new Error(`${v}final state should never be 'ACTIVE'`);case e.NOMATCH:S=!1;break;case e.EMPTY:case e.MATCH:S=m.phraseLength===c.length;break;default:throw new Error("unrecognized state")}return{success:S,state:m.state,stateName:e.idName(m.state),length:c.length,matched:m.phraseLength,maxMatched:y,maxTreeDepth:h,nodeHits:f}};const g=(t,r,n,o)=>{if(r.phraseLength>n){let e=`${s}opRNM(${t.name}): callback function error: `;throw e+=`sysData.phraseLength: ${r.phraseLength}`,e+=` must be <= remaining chars: ${n}`,new Error(e)}switch(r.state){case e.ACTIVE:if(!o)throw new Error(`${s}opRNM(${t.name}): callback function return error. ACTIVE state not allowed.`);break;case e.EMPTY:r.phraseLength=0;break;case e.MATCH:0===r.phraseLength&&(r.state=e.EMPTY);break;case e.NOMATCH:r.phraseLength=0;break;default:throw new Error(`${s}opRNM(${t.name}): callback function return error. Unrecognized return state: ${r.state}`)}},x=(t,a)=>{let d,h,f;const y=i[t],g=o[y.index];m.UdtIndex=g.index,p||(f=r.ast&&r.ast.udtDefined(y.index),f&&(h=n.length+y.index,d=r.ast.getLength(),r.ast.down(h,g.name)));const x=c.length-a;l[y.index](m,c,a,u),((t,r,n)=>{if(r.phraseLength>n){let e=`${s}opUDT(${t.name}): callback function error: `;throw e+=`sysData.phraseLength: ${r.phraseLength}`,e+=` must be <= remaining chars: ${n}`,new Error(e)}switch(r.state){case e.ACTIVE:throw new Error(`${s}opUDT(${t.name}) ACTIVE state return not allowed.`);case e.EMPTY:if(!t.empty)throw new Error(`${s}opUDT(${t.name}) may not return EMPTY.`);r.phraseLength=0;break;case e.MATCH:if(0===r.phraseLength){if(!t.empty)throw new Error(`${s}opUDT(${t.name}) may not return EMPTY.`);r.state=e.EMPTY}break;case e.NOMATCH:r.phraseLength=0;break;default:throw new Error(`${s}opUDT(${t.name}): callback function return error. Unrecognized return state: ${r.state}`)}})(g,m,x),p||f&&(m.state===e.NOMATCH?r.ast.setLength(d):r.ast.up(h,g.name,a,m.phraseLength))},b=(t,o)=>{const l=`${s}opExecute(): `,w=i[t];switch(f+=1,d>h&&(h=d),d+=1,m.refresh(),r.trace&&r.trace.down(w,o),w.type){case e.ALT:((t,r)=>{const s=i[t];for(let t=0;t<s.children.length&&(b(s.children[t],r),m.state===e.NOMATCH);t+=1);})(t,o);break;case e.CAT:((t,s)=>{let n,o,c,a;const l=i[t];r.ast&&(o=r.ast.getLength()),n=!0,c=s,a=0;for(let t=0;t<l.children.length;t+=1){if(b(l.children[t],c),m.state===e.NOMATCH){n=!1;break}c+=m.phraseLength,a+=m.phraseLength}n?(m.state=0===a?e.EMPTY:e.MATCH,m.phraseLength=a):(m.state=e.NOMATCH,m.phraseLength=0,r.ast&&r.ast.setLength(o))})(t,o);break;case e.REP:((t,s)=>{let n,o,a,l;const u=i[t];if(0===u.max)return m.state=e.EMPTY,void(m.phraseLength=0);for(o=s,a=0,l=0,r.ast&&(n=r.ast.getLength());!(o>=c.length)&&(b(t+1,o),m.state!==e.NOMATCH)&&m.state!==e.EMPTY&&(l+=1,a+=m.phraseLength,o+=m.phraseLength,l!==u.max););m.state===e.EMPTY||l>=u.min?(m.state=0===a?e.EMPTY:e.MATCH,m.phraseLength=a):(m.state=e.NOMATCH,m.phraseLength=0,r.ast&&r.ast.setLength(n))})(t,o);break;case e.RNM:((t,s)=>{let o,l,d;const h=i[t],f=n[h.index],y=a[f.index];if(p||(l=r.ast&&r.ast.ruleDefined(h.index),l&&(o=r.ast.getLength(),r.ast.down(h.index,n[h.index].name))),y){const t=c.length-s;y(m,c,s,u),g(f,m,t,!0),m.state===e.ACTIVE&&(d=i,i=f.opcodes,b(0,s),i=d,y(m,c,s,u),g(f,m,t,!1))}else d=i,i=f.opcodes,b(0,s,m),i=d;p||l&&(m.state===e.NOMATCH?r.ast.setLength(o):r.ast.up(h.index,f.name,s,m.phraseLength))})(t,o);break;case e.TRG:((t,r)=>{const s=i[t];m.state=e.NOMATCH,r<c.length&&s.min<=c[r]&&c[r]<=s.max&&(m.state=e.MATCH,m.phraseLength=1)})(t,o);break;case e.TBS:((t,r)=>{const s=i[t],n=s.string.length;if(m.state=e.NOMATCH,r+n<=c.length){for(let e=0;e<n;e+=1)if(c[r+e]!==s.string[e])return;m.state=e.MATCH,m.phraseLength=n}})(t,o);break;case e.TLS:((t,r)=>{let s;const n=i[t];m.state=e.NOMATCH;const o=n.string.length;if(0!==o){if(r+o<=c.length){for(let e=0;e<o;e+=1)if(s=c[r+e],s>=65&&s<=90&&(s+=32),s!==n.string[e])return;m.state=e.MATCH,m.phraseLength=o}}else m.state=e.EMPTY})(t,o);break;case e.UDT:x(t,o);break;case e.AND:((t,r)=>{switch(p+=1,b(t+1,r),p-=1,m.phraseLength=0,m.state){case e.EMPTY:case e.MATCH:m.state=e.EMPTY;break;case e.NOMATCH:m.state=e.NOMATCH;break;default:throw new Error(`opAND: invalid state ${m.state}`)}})(t,o);break;case e.NOT:((t,r)=>{switch(p+=1,b(t+1,r),p-=1,m.phraseLength=0,m.state){case e.EMPTY:case e.MATCH:m.state=e.NOMATCH;break;case e.NOMATCH:m.state=e.EMPTY;break;default:throw new Error(`opNOT: invalid state ${m.state}`)}})(t,o);break;default:throw new Error(`${l}unrecognized operator`)}p||o+m.phraseLength>y&&(y=o+m.phraseLength),r.stats&&r.stats.collect(w,m),r.trace&&r.trace.up(w,m.state,o,m.phraseLength),d-=1}},L={stringToChars:e=>[...e].map(e=>e.codePointAt(0)),charsToString:(e,t,r)=>{let s=e;for(;!(void 0===t||t<0);){if(void 0===r){s=e.slice(t);break}if(r<=0)return"";s=e.slice(t,t+r);break}return String.fromCodePoint(...s)}},_={ALT:1,CAT:2,REP:3,RNM:4,TRG:5,TBS:6,TLS:7,UDT:11,AND:12,NOT:13,ACTIVE:100,MATCH:101,EMPTY:102,NOMATCH:103,SEM_PRE:200,SEM_POST:201,SEM_OK:300,idName:e=>{switch(e){case _.ALT:return"ALT";case _.CAT:return"CAT";case _.REP:return"REP";case _.RNM:return"RNM";case _.TRG:return"TRG";case _.TBS:return"TBS";case _.TLS:return"TLS";case _.UDT:return"UDT";case _.AND:return"AND";case _.NOT:return"NOT";case _.ACTIVE:return"ACTIVE";case _.EMPTY:return"EMPTY";case _.MATCH:return"MATCH";case _.NOMATCH:return"NOMATCH";case _.SEM_PRE:return"SEM_PRE";case _.SEM_POST:return"SEM_POST";case _.SEM_OK:return"SEM_OK";default:return"UNRECOGNIZED STATE"}}};function U(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"json-pointer",lower:"json-pointer",index:0,isBkr:!1},this.rules[1]={name:"reference-token",lower:"reference-token",index:1,isBkr:!1},this.rules[2]={name:"unescaped",lower:"unescaped",index:2,isBkr:!1},this.rules[3]={name:"escaped",lower:"escaped",index:3,isBkr:!1},this.rules[4]={name:"array-location",lower:"array-location",index:4,isBkr:!1},this.rules[5]={name:"array-index",lower:"array-index",index:5,isBkr:!1},this.rules[6]={name:"array-dash",lower:"array-dash",index:6,isBkr:!1},this.rules[7]={name:"slash",lower:"slash",index:7,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:0,max:1/0},this.rules[0].opcodes[1]={type:2,children:[2,3]},this.rules[0].opcodes[2]={type:4,index:7},this.rules[0].opcodes[3]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:3,min:0,max:1/0},this.rules[1].opcodes[1]={type:1,children:[2,3]},this.rules[1].opcodes[2]={type:4,index:2},this.rules[1].opcodes[3]={type:4,index:3},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:1,children:[1,2,3]},this.rules[2].opcodes[1]={type:5,min:0,max:46},this.rules[2].opcodes[2]={type:5,min:48,max:125},this.rules[2].opcodes[3]={type:5,min:127,max:1114111},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:2,children:[1,2]},this.rules[3].opcodes[1]={type:7,string:[126]},this.rules[3].opcodes[2]={type:1,children:[3,4]},this.rules[3].opcodes[3]={type:7,string:[48]},this.rules[3].opcodes[4]={type:7,string:[49]},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:4,index:5},this.rules[4].opcodes[2]={type:4,index:6},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,2]},this.rules[5].opcodes[1]={type:6,string:[48]},this.rules[5].opcodes[2]={type:2,children:[3,4]},this.rules[5].opcodes[3]={type:5,min:49,max:57},this.rules[5].opcodes[4]={type:3,min:0,max:1/0},this.rules[5].opcodes[5]={type:5,min:48,max:57},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:7,string:[45]},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:7,string:[47]},this.toString=function(){let e="";return e+="; JavaScript Object Notation (JSON) Pointer ABNF syntax\n",e+="; https://datatracker.ietf.org/doc/html/rfc6901\n",e+="json-pointer = *( slash reference-token ) ; MODIFICATION: surrogate text rule used\n",e+="reference-token = *( unescaped / escaped )\n",e+="unescaped = %x00-2E / %x30-7D / %x7F-10FFFF\n",e+=" ; %x2F ('/') and %x7E ('~') are excluded from 'unescaped'\n",e+='escaped = "~" ( "0" / "1" )\n',e+=" ; representing '~' and '/', respectively\n",e+="\n",e+="; https://datatracker.ietf.org/doc/html/rfc6901#section-4\n",e+="array-location = array-index / array-dash\n",e+="array-index = %x30 / ( %x31-39 *(%x30-39) )\n",e+=' ; "0", or digits without a leading "0"\n',e+='array-dash = "-"\n',e+="\n",e+="; Surrogate named rules\n",e+='slash = "/"\n','; JavaScript Object Notation (JSON) Pointer ABNF syntax\n; https://datatracker.ietf.org/doc/html/rfc6901\njson-pointer = *( slash reference-token ) ; MODIFICATION: surrogate text rule used\nreference-token = *( unescaped / escaped )\nunescaped = %x00-2E / %x30-7D / %x7F-10FFFF\n ; %x2F (\'/\') and %x7E (\'~\') are excluded from \'unescaped\'\nescaped = "~" ( "0" / "1" )\n ; representing \'~\' and \'/\', respectively\n\n; https://datatracker.ietf.org/doc/html/rfc6901#section-4\narray-location = array-index / array-dash\narray-index = %x30 / ( %x31-39 *(%x30-39) )\n ; "0", or digits without a leading "0"\narray-dash = "-"\n\n; Surrogate named rules\nslash = "/"\n'}}class H extends Error{constructor(e,t=void 0){if(super(e,t),this.name=this.constructor.name,"string"==typeof e&&(this.message=e),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack,null!=t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"cause")&&!("cause"in this)){const{cause:e}=t;this.cause=e,e instanceof Error&&"stack"in e&&(this.stack=`${this.stack}\nCAUSE: ${e.stack}`)}if(null!=t&&"object"==typeof t){const{cause:e,...r}=t;Object.assign(this,r)}}}const G=H;new U;new U,new q,new U,new q,new U,new q,new U,new q;const R=e=>{if("string"!=typeof e&&"number"!=typeof e)throw new TypeError("Reference token must be a string or number");return String(e).replace(/~/g,"~0").replace(/\//g,"~1")};const $=class extends G{},z=e=>{if(!Array.isArray(e))throw new TypeError("Reference tokens must be a list of strings or numbers");try{return 0===e.length?"":`/${e.map(e=>{if("string"!=typeof e&&"number"!=typeof e)throw new TypeError("Reference token must be a string or number");return R(String(e))}).join("/")}`}catch(t){throw new $("Unexpected error during JSON Pointer compilation",{cause:t,referenceTokens:e})}};class V extends Error{constructor(e,t=void 0){if(super(e,t),this.name=this.constructor.name,"string"==typeof e&&(this.message=e),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack,null!=t&&"object"==typeof t&&Object.hasOwn(t,"cause")&&!("cause"in this)){const{cause:e}=t;this.cause=e,e instanceof Error&&"stack"in e&&(this.stack=`${this.stack}\nCAUSE: ${e.stack}`)}if(null!=t&&"object"==typeof t){const{cause:e,...r}=t;Object.assign(this,r)}}}const X=V;new function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"jsonpath-query",lower:"jsonpath-query",index:0,isBkr:!1},this.rules[1]={name:"segments",lower:"segments",index:1,isBkr:!1},this.rules[2]={name:"B",lower:"b",index:2,isBkr:!1},this.rules[3]={name:"S",lower:"s",index:3,isBkr:!1},this.rules[4]={name:"root-identifier",lower:"root-identifier",index:4,isBkr:!1},this.rules[5]={name:"selector",lower:"selector",index:5,isBkr:!1},this.rules[6]={name:"name-selector",lower:"name-selector",index:6,isBkr:!1},this.rules[7]={name:"string-literal",lower:"string-literal",index:7,isBkr:!1},this.rules[8]={name:"double-quoted",lower:"double-quoted",index:8,isBkr:!1},this.rules[9]={name:"single-quoted",lower:"single-quoted",index:9,isBkr:!1},this.rules[10]={name:"ESC",lower:"esc",index:10,isBkr:!1},this.rules[11]={name:"unescaped",lower:"unescaped",index:11,isBkr:!1},this.rules[12]={name:"escapable",lower:"escapable",index:12,isBkr:!1},this.rules[13]={name:"hexchar",lower:"hexchar",index:13,isBkr:!1},this.rules[14]={name:"non-surrogate",lower:"non-surrogate",index:14,isBkr:!1},this.rules[15]={name:"high-surrogate",lower:"high-surrogate",index:15,isBkr:!1},this.rules[16]={name:"low-surrogate",lower:"low-surrogate",index:16,isBkr:!1},this.rules[17]={name:"HEXDIG",lower:"hexdig",index:17,isBkr:!1},this.rules[18]={name:"wildcard-selector",lower:"wildcard-selector",index:18,isBkr:!1},this.rules[19]={name:"index-selector",lower:"index-selector",index:19,isBkr:!1},this.rules[20]={name:"int",lower:"int",index:20,isBkr:!1},this.rules[21]={name:"DIGIT1",lower:"digit1",index:21,isBkr:!1},this.rules[22]={name:"slice-selector",lower:"slice-selector",index:22,isBkr:!1},this.rules[23]={name:"start",lower:"start",index:23,isBkr:!1},this.rules[24]={name:"end",lower:"end",index:24,isBkr:!1},this.rules[25]={name:"step",lower:"step",index:25,isBkr:!1},this.rules[26]={name:"filter-selector",lower:"filter-selector",index:26,isBkr:!1},this.rules[27]={name:"logical-expr",lower:"logical-expr",index:27,isBkr:!1},this.rules[28]={name:"logical-or-expr",lower:"logical-or-expr",index:28,isBkr:!1},this.rules[29]={name:"logical-and-expr",lower:"logical-and-expr",index:29,isBkr:!1},this.rules[30]={name:"basic-expr",lower:"basic-expr",index:30,isBkr:!1},this.rules[31]={name:"paren-expr",lower:"paren-expr",index:31,isBkr:!1},this.rules[32]={name:"logical-not-op",lower:"logical-not-op",index:32,isBkr:!1},this.rules[33]={name:"test-expr",lower:"test-expr",index:33,isBkr:!1},this.rules[34]={name:"filter-query",lower:"filter-query",index:34,isBkr:!1},this.rules[35]={name:"rel-query",lower:"rel-query",index:35,isBkr:!1},this.rules[36]={name:"current-node-identifier",lower:"current-node-identifier",index:36,isBkr:!1},this.rules[37]={name:"comparison-expr",lower:"comparison-expr",index:37,isBkr:!1},this.rules[38]={name:"literal",lower:"literal",index:38,isBkr:!1},this.rules[39]={name:"comparable",lower:"comparable",index:39,isBkr:!1},this.rules[40]={name:"comparison-op",lower:"comparison-op",index:40,isBkr:!1},this.rules[41]={name:"singular-query",lower:"singular-query",index:41,isBkr:!1},this.rules[42]={name:"rel-singular-query",lower:"rel-singular-query",index:42,isBkr:!1},this.rules[43]={name:"abs-singular-query",lower:"abs-singular-query",index:43,isBkr:!1},this.rules[44]={name:"singular-query-segments",lower:"singular-query-segments",index:44,isBkr:!1},this.rules[45]={name:"name-segment",lower:"name-segment",index:45,isBkr:!1},this.rules[46]={name:"index-segment",lower:"index-segment",index:46,isBkr:!1},this.rules[47]={name:"number",lower:"number",index:47,isBkr:!1},this.rules[48]={name:"frac",lower:"frac",index:48,isBkr:!1},this.rules[49]={name:"exp",lower:"exp",index:49,isBkr:!1},this.rules[50]={name:"true",lower:"true",index:50,isBkr:!1},this.rules[51]={name:"false",lower:"false",index:51,isBkr:!1},this.rules[52]={name:"null",lower:"null",index:52,isBkr:!1},this.rules[53]={name:"function-name",lower:"function-name",index:53,isBkr:!1},this.rules[54]={name:"function-name-first",lower:"function-name-first",index:54,isBkr:!1},this.rules[55]={name:"function-name-char",lower:"function-name-char",index:55,isBkr:!1},this.rules[56]={name:"LCALPHA",lower:"lcalpha",index:56,isBkr:!1},this.rules[57]={name:"function-expr",lower:"function-expr",index:57,isBkr:!1},this.rules[58]={name:"function-argument",lower:"function-argument",index:58,isBkr:!1},this.rules[59]={name:"segment",lower:"segment",index:59,isBkr:!1},this.rules[60]={name:"child-segment",lower:"child-segment",index:60,isBkr:!1},this.rules[61]={name:"bracketed-selection",lower:"bracketed-selection",index:61,isBkr:!1},this.rules[62]={name:"member-name-shorthand",lower:"member-name-shorthand",index:62,isBkr:!1},this.rules[63]={name:"name-first",lower:"name-first",index:63,isBkr:!1},this.rules[64]={name:"name-char",lower:"name-char",index:64,isBkr:!1},this.rules[65]={name:"DIGIT",lower:"digit",index:65,isBkr:!1},this.rules[66]={name:"ALPHA",lower:"alpha",index:66,isBkr:!1},this.rules[67]={name:"descendant-segment",lower:"descendant-segment",index:67,isBkr:!1},this.rules[68]={name:"normalized-path",lower:"normalized-path",index:68,isBkr:!1},this.rules[69]={name:"normal-index-segment",lower:"normal-index-segment",index:69,isBkr:!1},this.rules[70]={name:"normal-selector",lower:"normal-selector",index:70,isBkr:!1},this.rules[71]={name:"normal-name-selector",lower:"normal-name-selector",index:71,isBkr:!1},this.rules[72]={name:"normal-single-quoted",lower:"normal-single-quoted",index:72,isBkr:!1},this.rules[73]={name:"normal-unescaped",lower:"normal-unescaped",index:73,isBkr:!1},this.rules[74]={name:"normal-escapable",lower:"normal-escapable",index:74,isBkr:!1},this.rules[75]={name:"normal-hexchar",lower:"normal-hexchar",index:75,isBkr:!1},this.rules[76]={name:"normal-HEXDIG",lower:"normal-hexdig",index:76,isBkr:!1},this.rules[77]={name:"normal-index-selector",lower:"normal-index-selector",index:77,isBkr:!1},this.rules[78]={name:"dot-prefix",lower:"dot-prefix",index:78,isBkr:!1},this.rules[79]={name:"double-dot-prefix",lower:"double-dot-prefix",index:79,isBkr:!1},this.rules[80]={name:"left-bracket",lower:"left-bracket",index:80,isBkr:!1},this.rules[81]={name:"right-bracket",lower:"right-bracket",index:81,isBkr:!1},this.rules[82]={name:"left-paren",lower:"left-paren",index:82,isBkr:!1},this.rules[83]={name:"right-paren",lower:"right-paren",index:83,isBkr:!1},this.rules[84]={name:"comma",lower:"comma",index:84,isBkr:!1},this.rules[85]={name:"colon",lower:"colon",index:85,isBkr:!1},this.rules[86]={name:"dquote",lower:"dquote",index:86,isBkr:!1},this.rules[87]={name:"squote",lower:"squote",index:87,isBkr:!1},this.rules[88]={name:"questionmark",lower:"questionmark",index:88,isBkr:!1},this.rules[89]={name:"disjunction",lower:"disjunction",index:89,isBkr:!1},this.rules[90]={name:"conjunction",lower:"conjunction",index:90,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:2,children:[1,2]},this.rules[0].opcodes[1]={type:4,index:4},this.rules[0].opcodes[2]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:3,min:0,max:1/0},this.rules[1].opcodes[1]={type:2,children:[2,3]},this.rules[1].opcodes[2]={type:4,index:3},this.rules[1].opcodes[3]={type:4,index:59},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[2].opcodes[1]={type:6,string:[32]},this.rules[2].opcodes[2]={type:6,string:[9]},this.rules[2].opcodes[3]={type:6,string:[10]},this.rules[2].opcodes[4]={type:6,string:[13]},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:0,max:1/0},this.rules[3].opcodes[1]={type:4,index:2},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:7,string:[36]},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,2,3,4,5]},this.rules[5].opcodes[1]={type:4,index:6},this.rules[5].opcodes[2]={type:4,index:18},this.rules[5].opcodes[3]={type:4,index:22},this.rules[5].opcodes[4]={type:4,index:19},this.rules[5].opcodes[5]={type:4,index:26},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:4,index:7},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,6]},this.rules[7].opcodes[1]={type:2,children:[2,3,5]},this.rules[7].opcodes[2]={type:4,index:86},this.rules[7].opcodes[3]={type:3,min:0,max:1/0},this.rules[7].opcodes[4]={type:4,index:8},this.rules[7].opcodes[5]={type:4,index:86},this.rules[7].opcodes[6]={type:2,children:[7,8,10]},this.rules[7].opcodes[7]={type:4,index:87},this.rules[7].opcodes[8]={type:3,min:0,max:1/0},this.rules[7].opcodes[9]={type:4,index:9},this.rules[7].opcodes[10]={type:4,index:87},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:1,children:[1,2,3,6]},this.rules[8].opcodes[1]={type:4,index:11},this.rules[8].opcodes[2]={type:6,string:[39]},this.rules[8].opcodes[3]={type:2,children:[4,5]},this.rules[8].opcodes[4]={type:4,index:10},this.rules[8].opcodes[5]={type:6,string:[34]},this.rules[8].opcodes[6]={type:2,children:[7,8]},this.rules[8].opcodes[7]={type:4,index:10},this.rules[8].opcodes[8]={type:4,index:12},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:1,children:[1,2,3,6]},this.rules[9].opcodes[1]={type:4,index:11},this.rules[9].opcodes[2]={type:6,string:[34]},this.rules[9].opcodes[3]={type:2,children:[4,5]},this.rules[9].opcodes[4]={type:4,index:10},this.rules[9].opcodes[5]={type:6,string:[39]},this.rules[9].opcodes[6]={type:2,children:[7,8]},this.rules[9].opcodes[7]={type:4,index:10},this.rules[9].opcodes[8]={type:4,index:12},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:6,string:[92]},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:1,children:[1,2,3,4,5]},this.rules[11].opcodes[1]={type:5,min:32,max:33},this.rules[11].opcodes[2]={type:5,min:35,max:38},this.rules[11].opcodes[3]={type:5,min:40,max:91},this.rules[11].opcodes[4]={type:5,min:93,max:55295},this.rules[11].opcodes[5]={type:5,min:57344,max:1114111},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8]},this.rules[12].opcodes[1]={type:6,string:[98]},this.rules[12].opcodes[2]={type:6,string:[102]},this.rules[12].opcodes[3]={type:6,string:[110]},this.rules[12].opcodes[4]={type:6,string:[114]},this.rules[12].opcodes[5]={type:6,string:[116]},this.rules[12].opcodes[6]={type:7,string:[47]},this.rules[12].opcodes[7]={type:7,string:[92]},this.rules[12].opcodes[8]={type:2,children:[9,10]},this.rules[12].opcodes[9]={type:6,string:[117]},this.rules[12].opcodes[10]={type:4,index:13},this.rules[13].opcodes=[],this.rules[13].opcodes[0]={type:1,children:[1,2]},this.rules[13].opcodes[1]={type:4,index:14},this.rules[13].opcodes[2]={type:2,children:[3,4,5,6]},this.rules[13].opcodes[3]={type:4,index:15},this.rules[13].opcodes[4]={type:7,string:[92]},this.rules[13].opcodes[5]={type:6,string:[117]},this.rules[13].opcodes[6]={type:4,index:16},this.rules[14].opcodes=[],this.rules[14].opcodes[0]={type:1,children:[1,11]},this.rules[14].opcodes[1]={type:2,children:[2,9]},this.rules[14].opcodes[2]={type:1,children:[3,4,5,6,7,8]},this.rules[14].opcodes[3]={type:4,index:65},this.rules[14].opcodes[4]={type:7,string:[97]},this.rules[14].opcodes[5]={type:7,string:[98]},this.rules[14].opcodes[6]={type:7,string:[99]},this.rules[14].opcodes[7]={type:7,string:[101]},this.rules[14].opcodes[8]={type:7,string:[102]},this.rules[14].opcodes[9]={type:3,min:3,max:3},this.rules[14].opcodes[10]={type:4,index:17},this.rules[14].opcodes[11]={type:2,children:[12,13,14]},this.rules[14].opcodes[12]={type:7,string:[100]},this.rules[14].opcodes[13]={type:5,min:48,max:55},this.rules[14].opcodes[14]={type:3,min:2,max:2},this.rules[14].opcodes[15]={type:4,index:17},this.rules[15].opcodes=[],this.rules[15].opcodes[0]={type:2,children:[1,2,7]},this.rules[15].opcodes[1]={type:7,string:[100]},this.rules[15].opcodes[2]={type:1,children:[3,4,5,6]},this.rules[15].opcodes[3]={type:7,string:[56]},this.rules[15].opcodes[4]={type:7,string:[57]},this.rules[15].opcodes[5]={type:7,string:[97]},this.rules[15].opcodes[6]={type:7,string:[98]},this.rules[15].opcodes[7]={type:3,min:2,max:2},this.rules[15].opcodes[8]={type:4,index:17},this.rules[16].opcodes=[],this.rules[16].opcodes[0]={type:2,children:[1,2,7]},this.rules[16].opcodes[1]={type:7,string:[100]},this.rules[16].opcodes[2]={type:1,children:[3,4,5,6]},this.rules[16].opcodes[3]={type:7,string:[99]},this.rules[16].opcodes[4]={type:7,string:[100]},this.rules[16].opcodes[5]={type:7,string:[101]},this.rules[16].opcodes[6]={type:7,string:[102]},this.rules[16].opcodes[7]={type:3,min:2,max:2},this.rules[16].opcodes[8]={type:4,index:17},this.rules[17].opcodes=[],this.rules[17].opcodes[0]={type:1,children:[1,2,3,4,5,6,7]},this.rules[17].opcodes[1]={type:4,index:65},this.rules[17].opcodes[2]={type:7,string:[97]},this.rules[17].opcodes[3]={type:7,string:[98]},this.rules[17].opcodes[4]={type:7,string:[99]},this.rules[17].opcodes[5]={type:7,string:[100]},this.rules[17].opcodes[6]={type:7,string:[101]},this.rules[17].opcodes[7]={type:7,string:[102]},this.rules[18].opcodes=[],this.rules[18].opcodes[0]={type:7,string:[42]},this.rules[19].opcodes=[],this.rules[19].opcodes[0]={type:4,index:20},this.rules[20].opcodes=[],this.rules[20].opcodes[0]={type:1,children:[1,2]},this.rules[20].opcodes[1]={type:7,string:[48]},this.rules[20].opcodes[2]={type:2,children:[3,5,6]},this.rules[20].opcodes[3]={type:3,min:0,max:1},this.rules[20].opcodes[4]={type:7,string:[45]},this.rules[20].opcodes[5]={type:4,index:21},this.rules[20].opcodes[6]={type:3,min:0,max:1/0},this.rules[20].opcodes[7]={type:4,index:65},this.rules[21].opcodes=[],this.rules[21].opcodes[0]={type:5,min:49,max:57},this.rules[22].opcodes=[],this.rules[22].opcodes[0]={type:2,children:[1,5,6,7,11]},this.rules[22].opcodes[1]={type:3,min:0,max:1},this.rules[22].opcodes[2]={type:2,children:[3,4]},this.rules[22].opcodes[3]={type:4,index:23},this.rules[22].opcodes[4]={type:4,index:3},this.rules[22].opcodes[5]={type:4,index:85},this.rules[22].opcodes[6]={type:4,index:3},this.rules[22].opcodes[7]={type:3,min:0,max:1},this.rules[22].opcodes[8]={type:2,children:[9,10]},this.rules[22].opcodes[9]={type:4,index:24},this.rules[22].opcodes[10]={type:4,index:3},this.rules[22].opcodes[11]={type:3,min:0,max:1},this.rules[22].opcodes[12]={type:2,children:[13,14]},this.rules[22].opcodes[13]={type:4,index:85},this.rules[22].opcodes[14]={type:3,min:0,max:1},this.rules[22].opcodes[15]={type:2,children:[16,17]},this.rules[22].opcodes[16]={type:4,index:3},this.rules[22].opcodes[17]={type:4,index:25},this.rules[23].opcodes=[],this.rules[23].opcodes[0]={type:4,index:20},this.rules[24].opcodes=[],this.rules[24].opcodes[0]={type:4,index:20},this.rules[25].opcodes=[],this.rules[25].opcodes[0]={type:4,index:20},this.rules[26].opcodes=[],this.rules[26].opcodes[0]={type:2,children:[1,2,3]},this.rules[26].opcodes[1]={type:4,index:88},this.rules[26].opcodes[2]={type:4,index:3},this.rules[26].opcodes[3]={type:4,index:27},this.rules[27].opcodes=[],this.rules[27].opcodes[0]={type:4,index:28},this.rules[28].opcodes=[],this.rules[28].opcodes[0]={type:2,children:[1,2]},this.rules[28].opcodes[1]={type:4,index:29},this.rules[28].opcodes[2]={type:3,min:0,max:1/0},this.rules[28].opcodes[3]={type:2,children:[4,5,6,7]},this.rules[28].opcodes[4]={type:4,index:3},this.rules[28].opcodes[5]={type:4,index:89},this.rules[28].opcodes[6]={type:4,index:3},this.rules[28].opcodes[7]={type:4,index:29},this.rules[29].opcodes=[],this.rules[29].opcodes[0]={type:2,children:[1,2]},this.rules[29].opcodes[1]={type:4,index:30},this.rules[29].opcodes[2]={type:3,min:0,max:1/0},this.rules[29].opcodes[3]={type:2,children:[4,5,6,7]},this.rules[29].opcodes[4]={type:4,index:3},this.rules[29].opcodes[5]={type:4,index:90},this.rules[29].opcodes[6]={type:4,index:3},this.rules[29].opcodes[7]={type:4,index:30},this.rules[30].opcodes=[],this.rules[30].opcodes[0]={type:1,children:[1,2,3]},this.rules[30].opcodes[1]={type:4,index:31},this.rules[30].opcodes[2]={type:4,index:37},this.rules[30].opcodes[3]={type:4,index:33},this.rules[31].opcodes=[],this.rules[31].opcodes[0]={type:2,children:[1,5,6,7,8,9]},this.rules[31].opcodes[1]={type:3,min:0,max:1},this.rules[31].opcodes[2]={type:2,children:[3,4]},this.rules[31].opcodes[3]={type:4,index:32},this.rules[31].opcodes[4]={type:4,index:3},this.rules[31].opcodes[5]={type:4,index:82},this.rules[31].opcodes[6]={type:4,index:3},this.rules[31].opcodes[7]={type:4,index:27},this.rules[31].opcodes[8]={type:4,index:3},this.rules[31].opcodes[9]={type:4,index:83},this.rules[32].opcodes=[],this.rules[32].opcodes[0]={type:7,string:[33]},this.rules[33].opcodes=[],this.rules[33].opcodes[0]={type:2,children:[1,5]},this.rules[33].opcodes[1]={type:3,min:0,max:1},this.rules[33].opcodes[2]={type:2,children:[3,4]},this.rules[33].opcodes[3]={type:4,index:32},this.rules[33].opcodes[4]={type:4,index:3},this.rules[33].opcodes[5]={type:1,children:[6,7]},this.rules[33].opcodes[6]={type:4,index:34},this.rules[33].opcodes[7]={type:4,index:57},this.rules[34].opcodes=[],this.rules[34].opcodes[0]={type:1,children:[1,2]},this.rules[34].opcodes[1]={type:4,index:35},this.rules[34].opcodes[2]={type:4,index:0},this.rules[35].opcodes=[],this.rules[35].opcodes[0]={type:2,children:[1,2]},this.rules[35].opcodes[1]={type:4,index:36},this.rules[35].opcodes[2]={type:4,index:1},this.rules[36].opcodes=[],this.rules[36].opcodes[0]={type:7,string:[64]},this.rules[37].opcodes=[],this.rules[37].opcodes[0]={type:2,children:[1,2,3,4,5]},this.rules[37].opcodes[1]={type:4,index:39},this.rules[37].opcodes[2]={type:4,index:3},this.rules[37].opcodes[3]={type:4,index:40},this.rules[37].opcodes[4]={type:4,index:3},this.rules[37].opcodes[5]={type:4,index:39},this.rules[38].opcodes=[],this.rules[38].opcodes[0]={type:1,children:[1,2,3,4,5]},this.rules[38].opcodes[1]={type:4,index:47},this.rules[38].opcodes[2]={type:4,index:7},this.rules[38].opcodes[3]={type:4,index:50},this.rules[38].opcodes[4]={type:4,index:51},this.rules[38].opcodes[5]={type:4,index:52},this.rules[39].opcodes=[],this.rules[39].opcodes[0]={type:1,children:[1,2,3]},this.rules[39].opcodes[1]={type:4,index:41},this.rules[39].opcodes[2]={type:4,index:57},this.rules[39].opcodes[3]={type:4,index:38},this.rules[40].opcodes=[],this.rules[40].opcodes[0]={type:1,children:[1,2,3,4,5,6]},this.rules[40].opcodes[1]={type:7,string:[61,61]},this.rules[40].opcodes[2]={type:7,string:[33,61]},this.rules[40].opcodes[3]={type:7,string:[60,61]},this.rules[40].opcodes[4]={type:7,string:[62,61]},this.rules[40].opcodes[5]={type:7,string:[60]},this.rules[40].opcodes[6]={type:7,string:[62]},this.rules[41].opcodes=[],this.rules[41].opcodes[0]={type:1,children:[1,2]},this.rules[41].opcodes[1]={type:4,index:42},this.rules[41].opcodes[2]={type:4,index:43},this.rules[42].opcodes=[],this.rules[42].opcodes[0]={type:2,children:[1,2]},this.rules[42].opcodes[1]={type:4,index:36},this.rules[42].opcodes[2]={type:4,index:44},this.rules[43].opcodes=[],this.rules[43].opcodes[0]={type:2,children:[1,2]},this.rules[43].opcodes[1]={type:4,index:4},this.rules[43].opcodes[2]={type:4,index:44},this.rules[44].opcodes=[],this.rules[44].opcodes[0]={type:3,min:0,max:1/0},this.rules[44].opcodes[1]={type:2,children:[2,3]},this.rules[44].opcodes[2]={type:4,index:3},this.rules[44].opcodes[3]={type:1,children:[4,5]},this.rules[44].opcodes[4]={type:4,index:45},this.rules[44].opcodes[5]={type:4,index:46},this.rules[45].opcodes=[],this.rules[45].opcodes[0]={type:1,children:[1,5]},this.rules[45].opcodes[1]={type:2,children:[2,3,4]},this.rules[45].opcodes[2]={type:4,index:80},this.rules[45].opcodes[3]={type:4,index:6},this.rules[45].opcodes[4]={type:4,index:81},this.rules[45].opcodes[5]={type:2,children:[6,7]},this.rules[45].opcodes[6]={type:4,index:78},this.rules[45].opcodes[7]={type:4,index:62},this.rules[46].opcodes=[],this.rules[46].opcodes[0]={type:2,children:[1,2,3]},this.rules[46].opcodes[1]={type:4,index:80},this.rules[46].opcodes[2]={type:4,index:19},this.rules[46].opcodes[3]={type:4,index:81},this.rules[47].opcodes=[],this.rules[47].opcodes[0]={type:2,children:[1,4,6]},this.rules[47].opcodes[1]={type:1,children:[2,3]},this.rules[47].opcodes[2]={type:4,index:20},this.rules[47].opcodes[3]={type:7,string:[45,48]},this.rules[47].opcodes[4]={type:3,min:0,max:1},this.rules[47].opcodes[5]={type:4,index:48},this.rules[47].opcodes[6]={type:3,min:0,max:1},this.rules[47].opcodes[7]={type:4,index:49},this.rules[48].opcodes=[],this.rules[48].opcodes[0]={type:2,children:[1,2]},this.rules[48].opcodes[1]={type:7,string:[46]},this.rules[48].opcodes[2]={type:3,min:1,max:1/0},this.rules[48].opcodes[3]={type:4,index:65},this.rules[49].opcodes=[],this.rules[49].opcodes[0]={type:2,children:[1,2,6]},this.rules[49].opcodes[1]={type:7,string:[101]},this.rules[49].opcodes[2]={type:3,min:0,max:1},this.rules[49].opcodes[3]={type:1,children:[4,5]},this.rules[49].opcodes[4]={type:7,string:[45]},this.rules[49].opcodes[5]={type:7,string:[43]},this.rules[49].opcodes[6]={type:3,min:1,max:1/0},this.rules[49].opcodes[7]={type:4,index:65},this.rules[50].opcodes=[],this.rules[50].opcodes[0]={type:6,string:[116,114,117,101]},this.rules[51].opcodes=[],this.rules[51].opcodes[0]={type:6,string:[102,97,108,115,101]},this.rules[52].opcodes=[],this.rules[52].opcodes[0]={type:6,string:[110,117,108,108]},this.rules[53].opcodes=[],this.rules[53].opcodes[0]={type:2,children:[1,2]},this.rules[53].opcodes[1]={type:4,index:54},this.rules[53].opcodes[2]={type:3,min:0,max:1/0},this.rules[53].opcodes[3]={type:4,index:55},this.rules[54].opcodes=[],this.rules[54].opcodes[0]={type:4,index:56},this.rules[55].opcodes=[],this.rules[55].opcodes[0]={type:1,children:[1,2,3]},this.rules[55].opcodes[1]={type:4,index:54},this.rules[55].opcodes[2]={type:7,string:[95]},this.rules[55].opcodes[3]={type:4,index:65},this.rules[56].opcodes=[],this.rules[56].opcodes[0]={type:5,min:97,max:122},this.rules[57].opcodes=[],this.rules[57].opcodes[0]={type:2,children:[1,2,3,4,13,14]},this.rules[57].opcodes[1]={type:4,index:53},this.rules[57].opcodes[2]={type:4,index:82},this.rules[57].opcodes[3]={type:4,index:3},this.rules[57].opcodes[4]={type:3,min:0,max:1},this.rules[57].opcodes[5]={type:2,children:[6,7]},this.rules[57].opcodes[6]={type:4,index:58},this.rules[57].opcodes[7]={type:3,min:0,max:1/0},this.rules[57].opcodes[8]={type:2,children:[9,10,11,12]},this.rules[57].opcodes[9]={type:4,index:3},this.rules[57].opcodes[10]={type:4,index:84},this.rules[57].opcodes[11]={type:4,index:3},this.rules[57].opcodes[12]={type:4,index:58},this.rules[57].opcodes[13]={type:4,index:3},this.rules[57].opcodes[14]={type:4,index:83},this.rules[58].opcodes=[],this.rules[58].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[58].opcodes[1]={type:4,index:27},this.rules[58].opcodes[2]={type:4,index:34},this.rules[58].opcodes[3]={type:4,index:57},this.rules[58].opcodes[4]={type:4,index:38},this.rules[59].opcodes=[],this.rules[59].opcodes[0]={type:1,children:[1,2]},this.rules[59].opcodes[1]={type:4,index:60},this.rules[59].opcodes[2]={type:4,index:67},this.rules[60].opcodes=[],this.rules[60].opcodes[0]={type:1,children:[1,2]},this.rules[60].opcodes[1]={type:4,index:61},this.rules[60].opcodes[2]={type:2,children:[3,4]},this.rules[60].opcodes[3]={type:4,index:78},this.rules[60].opcodes[4]={type:1,children:[5,6]},this.rules[60].opcodes[5]={type:4,index:18},this.rules[60].opcodes[6]={type:4,index:62},this.rules[61].opcodes=[],this.rules[61].opcodes[0]={type:2,children:[1,2,3,4,10,11]},this.rules[61].opcodes[1]={type:4,index:80},this.rules[61].opcodes[2]={type:4,index:3},this.rules[61].opcodes[3]={type:4,index:5},this.rules[61].opcodes[4]={type:3,min:0,max:1/0},this.rules[61].opcodes[5]={type:2,children:[6,7,8,9]},this.rules[61].opcodes[6]={type:4,index:3},this.rules[61].opcodes[7]={type:4,index:84},this.rules[61].opcodes[8]={type:4,index:3},this.rules[61].opcodes[9]={type:4,index:5},this.rules[61].opcodes[10]={type:4,index:3},this.rules[61].opcodes[11]={type:4,index:81},this.rules[62].opcodes=[],this.rules[62].opcodes[0]={type:2,children:[1,2]},this.rules[62].opcodes[1]={type:4,index:63},this.rules[62].opcodes[2]={type:3,min:0,max:1/0},this.rules[62].opcodes[3]={type:4,index:64},this.rules[63].opcodes=[],this.rules[63].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[63].opcodes[1]={type:4,index:66},this.rules[63].opcodes[2]={type:7,string:[95]},this.rules[63].opcodes[3]={type:5,min:128,max:55295},this.rules[63].opcodes[4]={type:5,min:57344,max:1114111},this.rules[64].opcodes=[],this.rules[64].opcodes[0]={type:1,children:[1,2]},this.rules[64].opcodes[1]={type:4,index:63},this.rules[64].opcodes[2]={type:4,index:65},this.rules[65].opcodes=[],this.rules[65].opcodes[0]={type:5,min:48,max:57},this.rules[66].opcodes=[],this.rules[66].opcodes[0]={type:1,children:[1,2]},this.rules[66].opcodes[1]={type:5,min:65,max:90},this.rules[66].opcodes[2]={type:5,min:97,max:122},this.rules[67].opcodes=[],this.rules[67].opcodes[0]={type:2,children:[1,2]},this.rules[67].opcodes[1]={type:4,index:79},this.rules[67].opcodes[2]={type:1,children:[3,4,5]},this.rules[67].opcodes[3]={type:4,index:61},this.rules[67].opcodes[4]={type:4,index:18},this.rules[67].opcodes[5]={type:4,index:62},this.rules[68].opcodes=[],this.rules[68].opcodes[0]={type:2,children:[1,2]},this.rules[68].opcodes[1]={type:4,index:4},this.rules[68].opcodes[2]={type:3,min:0,max:1/0},this.rules[68].opcodes[3]={type:4,index:69},this.rules[69].opcodes=[],this.rules[69].opcodes[0]={type:2,children:[1,2,3]},this.rules[69].opcodes[1]={type:4,index:80},this.rules[69].opcodes[2]={type:4,index:70},this.rules[69].opcodes[3]={type:4,index:81},this.rules[70].opcodes=[],this.rules[70].opcodes[0]={type:1,children:[1,2]},this.rules[70].opcodes[1]={type:4,index:71},this.rules[70].opcodes[2]={type:4,index:77},this.rules[71].opcodes=[],this.rules[71].opcodes[0]={type:2,children:[1,2,4]},this.rules[71].opcodes[1]={type:4,index:87},this.rules[71].opcodes[2]={type:3,min:0,max:1/0},this.rules[71].opcodes[3]={type:4,index:72},this.rules[71].opcodes[4]={type:4,index:87},this.rules[72].opcodes=[],this.rules[72].opcodes[0]={type:1,children:[1,2]},this.rules[72].opcodes[1]={type:4,index:73},this.rules[72].opcodes[2]={type:2,children:[3,4]},this.rules[72].opcodes[3]={type:4,index:10},this.rules[72].opcodes[4]={type:4,index:74},this.rules[73].opcodes=[],this.rules[73].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[73].opcodes[1]={type:5,min:32,max:38},this.rules[73].opcodes[2]={type:5,min:40,max:91},this.rules[73].opcodes[3]={type:5,min:93,max:55295},this.rules[73].opcodes[4]={type:5,min:57344,max:1114111},this.rules[74].opcodes=[],this.rules[74].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8]},this.rules[74].opcodes[1]={type:6,string:[98]},this.rules[74].opcodes[2]={type:6,string:[102]},this.rules[74].opcodes[3]={type:6,string:[110]},this.rules[74].opcodes[4]={type:6,string:[114]},this.rules[74].opcodes[5]={type:6,string:[116]},this.rules[74].opcodes[6]={type:7,string:[39]},this.rules[74].opcodes[7]={type:7,string:[92]},this.rules[74].opcodes[8]={type:2,children:[9,10]},this.rules[74].opcodes[9]={type:6,string:[117]},this.rules[74].opcodes[10]={type:4,index:75},this.rules[75].opcodes=[],this.rules[75].opcodes[0]={type:2,children:[1,2,3]},this.rules[75].opcodes[1]={type:7,string:[48]},this.rules[75].opcodes[2]={type:7,string:[48]},this.rules[75].opcodes[3]={type:1,children:[4,7,10,13]},this.rules[75].opcodes[4]={type:2,children:[5,6]},this.rules[75].opcodes[5]={type:7,string:[48]},this.rules[75].opcodes[6]={type:5,min:48,max:55},this.rules[75].opcodes[7]={type:2,children:[8,9]},this.rules[75].opcodes[8]={type:7,string:[48]},this.rules[75].opcodes[9]={type:6,string:[98]},this.rules[75].opcodes[10]={type:2,children:[11,12]},this.rules[75].opcodes[11]={type:7,string:[48]},this.rules[75].opcodes[12]={type:5,min:101,max:102},this.rules[75].opcodes[13]={type:2,children:[14,15]},this.rules[75].opcodes[14]={type:7,string:[49]},this.rules[75].opcodes[15]={type:4,index:76},this.rules[76].opcodes=[],this.rules[76].opcodes[0]={type:1,children:[1,2]},this.rules[76].opcodes[1]={type:4,index:65},this.rules[76].opcodes[2]={type:5,min:97,max:102},this.rules[77].opcodes=[],this.rules[77].opcodes[0]={type:1,children:[1,2]},this.rules[77].opcodes[1]={type:7,string:[48]},this.rules[77].opcodes[2]={type:2,children:[3,4]},this.rules[77].opcodes[3]={type:4,index:21},this.rules[77].opcodes[4]={type:3,min:0,max:1/0},this.rules[77].opcodes[5]={type:4,index:65},this.rules[78].opcodes=[],this.rules[78].opcodes[0]={type:7,string:[46]},this.rules[79].opcodes=[],this.rules[79].opcodes[0]={type:7,string:[46,46]},this.rules[80].opcodes=[],this.rules[80].opcodes[0]={type:7,string:[91]},this.rules[81].opcodes=[],this.rules[81].opcodes[0]={type:7,string:[93]},this.rules[82].opcodes=[],this.rules[82].opcodes[0]={type:7,string:[40]},this.rules[83].opcodes=[],this.rules[83].opcodes[0]={type:7,string:[41]},this.rules[84].opcodes=[],this.rules[84].opcodes[0]={type:7,string:[44]},this.rules[85].opcodes=[],this.rules[85].opcodes[0]={type:7,string:[58]},this.rules[86].opcodes=[],this.rules[86].opcodes[0]={type:6,string:[34]},this.rules[87].opcodes=[],this.rules[87].opcodes[0]={type:6,string:[39]},this.rules[88].opcodes=[],this.rules[88].opcodes[0]={type:7,string:[63]},this.rules[89].opcodes=[],this.rules[89].opcodes[0]={type:7,string:[124,124]},this.rules[90].opcodes=[],this.rules[90].opcodes[0]={type:7,string:[38,38]},this.toString=function(){let e="";return e+="; JSONPath: Query Expressions for JSON\n",e+="; https://www.rfc-editor.org/rfc/rfc9535\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.1.1\n",e+="jsonpath-query = root-identifier segments\n",e+="segments = *(S segment)\n",e+="\n",e+="B = %x20 / ; Space\n",e+=" %x09 / ; Horizontal tab\n",e+=" %x0A / ; Line feed or New line\n",e+=" %x0D ; Carriage return\n",e+="S = *B ; optional blank space\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.2.1\n",e+='root-identifier = "$"\n',e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3\n",e+="selector = name-selector /\n",e+=" wildcard-selector /\n",e+=" slice-selector /\n",e+=" index-selector /\n",e+=" filter-selector\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.1.1\n",e+="name-selector = string-literal\n",e+="\n",e+='string-literal = dquote *double-quoted dquote / ; "string", MODIFICATION: surrogate text rule used\n',e+=" squote *single-quoted squote ; 'string', MODIFICATION: surrogate text rule used\n",e+="\n",e+="double-quoted = unescaped /\n",e+=" %x27 / ; '\n",e+=' ESC %x22 / ; \\"\n',e+=" ESC escapable\n",e+="\n",e+="single-quoted = unescaped /\n",e+=' %x22 / ; "\n',e+=" ESC %x27 / ; \\'\n",e+=" ESC escapable\n",e+="\n",e+="ESC = %x5C ; \\ backslash\n",e+="\n",e+="unescaped = %x20-21 / ; see RFC 8259\n",e+=' ; omit 0x22 "\n',e+=" %x23-26 /\n",e+=" ; omit 0x27 '\n",e+=" %x28-5B /\n",e+=" ; omit 0x5C \\\n",e+=" %x5D-D7FF /\n",e+=" ; skip surrogate code points\n",e+=" %xE000-10FFFF\n",e+="\n",e+="escapable = %x62 / ; b BS backspace U+0008\n",e+=" %x66 / ; f FF form feed U+000C\n",e+=" %x6E / ; n LF line feed U+000A\n",e+=" %x72 / ; r CR carriage return U+000D\n",e+=" %x74 / ; t HT horizontal tab U+0009\n",e+=' "/" / ; / slash (solidus) U+002F\n',e+=' "\\" / ; \\ backslash (reverse solidus) U+005C\n',e+=" (%x75 hexchar) ; uXXXX U+XXXX\n",e+="\n",e+="hexchar = non-surrogate /\n",e+=' (high-surrogate "\\" %x75 low-surrogate)\n',e+='non-surrogate = ((DIGIT / "A"/"B"/"C" / "E"/"F") 3HEXDIG) /\n',e+=' ("D" %x30-37 2HEXDIG )\n',e+='high-surrogate = "D" ("8"/"9"/"A"/"B") 2HEXDIG\n',e+='low-surrogate = "D" ("C"/"D"/"E"/"F") 2HEXDIG\n',e+="\n",e+='HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"\n',e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.2.1\n",e+='wildcard-selector = "*"\n',e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.3.1\n",e+="index-selector = int ; decimal integer\n",e+="\n",e+='int = "0" /\n',e+=' (["-"] DIGIT1 *DIGIT) ; - optional\n',e+="DIGIT1 = %x31-39 ; 1-9 non-zero digit\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.4.1\n",e+="slice-selector = [start S] colon S [end S] [colon [S step ]] ; MODIFICATION: surrogate text rule used\n",e+="\n",e+="start = int ; included in selection\n",e+="end = int ; not included in selection\n",e+="step = int ; default: 1\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.5.1\n",e+="filter-selector = questionmark S logical-expr ; MODIFICATION: surrogate text rule used\n",e+="\n",e+="logical-expr = logical-or-expr\n",e+="logical-or-expr = logical-and-expr *(S disjunction S logical-and-expr) ; MODIFICATION: surrogate text rule used\n",e+=" ; disjunction\n",e+=" ; binds less tightly than conjunction\n",e+="logical-and-expr = basic-expr *(S conjunction S basic-expr) ; MODIFICATION: surrogate text rule used\n",e+=" ; conjunction\n",e+=" ; binds more tightly than disjunction\n",e+="\n",e+="basic-expr = paren-expr /\n",e+=" comparison-expr /\n",e+=" test-expr\n",e+="\n",e+="paren-expr = [logical-not-op S] left-paren S logical-expr S right-paren ; MODIFICATION: surrogate text rule used\n",e+=" ; parenthesized expression\n",e+='logical-not-op = "!" ; logical NOT operator\n',e+="\n",e+="test-expr = [logical-not-op S]\n",e+=" (filter-query / ; existence/non-existence\n",e+=" function-expr) ; LogicalType or NodesType\n",e+="filter-query = rel-query / jsonpath-query\n",e+="rel-query = current-node-identifier segments\n",e+='current-node-identifier = "@"\n',e+="\n",e+="comparison-expr = comparable S comparison-op S comparable\n",e+="literal = number / string-literal /\n",e+=" true / false / null\n",e+="comparable = singular-query / ; singular query value\n",e+=" function-expr / ; ValueType\n",e+=" literal\n",e+=" ; MODIFICATION: https://www.rfc-editor.org/errata/eid8352\n",e+='comparison-op = "==" / "!=" /\n',e+=' "<=" / ">=" /\n',e+=' "<" / ">"\n',e+="\n",e+="singular-query = rel-singular-query / abs-singular-query\n",e+="rel-singular-query = current-node-identifier singular-query-segments\n",e+="abs-singular-query = root-identifier singular-query-segments\n",e+="singular-query-segments = *(S (name-segment / index-segment))\n",e+="name-segment = (left-bracket name-selector right-bracket) / ; MODIFICATION: surrogate text rule used\n",e+=" (dot-prefix member-name-shorthand) ; MODIFICATION: surrogate text rule used\n",e+="index-segment = left-bracket index-selector right-bracket ; MODIFICATION: surrogate text rule used\n",e+="\n",e+='number = (int / "-0") [ frac ] [ exp ] ; decimal number\n',e+='frac = "." 1*DIGIT ; decimal fraction\n',e+='exp = "e" [ "-" / "+" ] 1*DIGIT ; decimal exponent\n',e+="true = %x74.72.75.65 ; true\n",e+="false = %x66.61.6c.73.65 ; false\n",e+="null = %x6e.75.6c.6c ; null\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.4\n",e+="function-name = function-name-first *function-name-char\n",e+="function-name-first = LCALPHA\n",e+='function-name-char = function-name-first / "_" / DIGIT\n',e+='LCALPHA = %x61-7A ; "a".."z"\n',e+="\n",e+="function-expr = function-name left-paren S [function-argument ; MODIFICATION: surrogate text rule used\n",e+=" *(S comma S function-argument)] S right-paren ; MODIFICATION: surrogate text rule used\n",e+="function-argument = logical-expr / ; MODIFICATION: https://www.rfc-editor.org/errata/eid8343\n",e+=" filter-query / ; (includes singular-query)\n",e+=" function-expr /\n",e+=" literal\n",e+="\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.5\n",e+="segment = child-segment / descendant-segment\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.5.1.1\n",e+="child-segment = bracketed-selection /\n",e+=" (dot-prefix ; MODIFICATION: surrogate text rule used\n",e+=" (wildcard-selector /\n",e+=" member-name-shorthand))\n",e+="\n",e+="bracketed-selection = left-bracket S selector *(S comma S selector) S right-bracket\n",e+=" ; MODIFICATION: surrogate text rule used\n",e+="\n",e+="member-name-shorthand = name-first *name-char\n",e+="name-first = ALPHA /\n",e+=' "_" /\n',e+=" %x80-D7FF /\n",e+=" ; skip surrogate code points\n",e+=" %xE000-10FFFF\n",e+="name-char = name-first / DIGIT\n",e+="\n",e+="DIGIT = %x30-39 ; 0-9\n",e+="ALPHA = %x41-5A / %x61-7A ; A-Z / a-z\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.5.2.1\n",e+="descendant-segment = double-dot-prefix (bracketed-selection / ; MODIFICATION: surrogate text rule used\n",e+=" wildcard-selector /\n",e+=" member-name-shorthand)\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#name-normalized-paths\n",e+="normalized-path = root-identifier *(normal-index-segment)\n",e+="normal-index-segment = left-bracket normal-selector right-bracket ; MODIFICATION: surrogate text rule used\n",e+="normal-selector = normal-name-selector / normal-index-selector\n",e+="normal-name-selector = squote *normal-single-quoted squote ; 'string', MODIFICATION: surrogate text rule used\n",e+="normal-single-quoted = normal-unescaped /\n",e+=" ESC normal-escapable\n",e+="normal-unescaped = ; omit %x0-1F control codes\n",e+=" %x20-26 /\n",e+=" ; omit 0x27 '\n",e+=" %x28-5B /\n",e+=" ; omit 0x5C \\\n",e+=" %x5D-D7FF /\n",e+=" ; skip surrogate code points\n",e+=" %xE000-10FFFF\n",e+="\n",e+="normal-escapable = %x62 / ; b BS backspace U+0008\n",e+=" %x66 / ; f FF form feed U+000C\n",e+=" %x6E / ; n LF line feed U+000A\n",e+=" %x72 / ; r CR carriage return U+000D\n",e+=" %x74 / ; t HT horizontal tab U+0009\n",e+=" \"'\" / ; ' apostrophe U+0027\n",e+=' "\\" / ; \\ backslash (reverse solidus) U+005C\n',e+=" (%x75 normal-hexchar)\n",e+=" ; certain values u00xx U+00XX\n",e+='normal-hexchar = "0" "0"\n',e+=" (\n",e+=' ("0" %x30-37) / ; "00"-"07"\n',e+=" ; omit U+0008-U+000A BS HT LF\n",e+=' ("0" %x62) / ; "0b"\n',e+=" ; omit U+000C-U+000D FF CR\n",e+=' ("0" %x65-66) / ; "0e"-"0f"\n',e+=' ("1" normal-HEXDIG)\n',e+=" )\n",e+='normal-HEXDIG = DIGIT / %x61-66 ; "0"-"9", "a"-"f"\n',e+='normal-index-selector = "0" / (DIGIT1 *DIGIT)\n',e+=" ; non-negative decimal integer\n",e+="\n",e+="; Surrogate named rules\n",e+='dot-prefix = "."\n',e+='double-dot-prefix = ".."\n',e+='left-bracket = "["\n',e+='right-bracket = "]"\n',e+='left-paren = "("\n',e+='right-paren = ")"\n',e+='comma = ","\n',e+='colon = ":"\n',e+='dquote = %x22 ; "\n',e+="squote = %x27 ; '\n",e+='questionmark = "?"\n',e+='disjunction = "||"\n',e+='conjunction = "&&"\n','; JSONPath: Query Expressions for JSON\n; https://www.rfc-editor.org/rfc/rfc9535\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.1.1\njsonpath-query = root-identifier segments\nsegments = *(S segment)\n\nB = %x20 / ; Space\n %x09 / ; Horizontal tab\n %x0A / ; Line feed or New line\n %x0D ; Carriage return\nS = *B ; optional blank space\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.2.1\nroot-identifier = "$"\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3\nselector = name-selector /\n wildcard-selector /\n slice-selector /\n index-selector /\n filter-selector\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.1.1\nname-selector = string-literal\n\nstring-literal = dquote *double-quoted dquote / ; "string", MODIFICATION: surrogate text rule used\n squote *single-quoted squote ; \'string\', MODIFICATION: surrogate text rule used\n\ndouble-quoted = unescaped /\n %x27 / ; \'\n ESC %x22 / ; \\"\n ESC escapable\n\nsingle-quoted = unescaped /\n %x22 / ; "\n ESC %x27 / ; \\\'\n ESC escapable\n\nESC = %x5C ; \\ backslash\n\nunescaped = %x20-21 / ; see RFC 8259\n ; omit 0x22 "\n %x23-26 /\n ; omit 0x27 \'\n %x28-5B /\n ; omit 0x5C \\\n %x5D-D7FF /\n ; skip surrogate code points\n %xE000-10FFFF\n\nescapable = %x62 / ; b BS backspace U+0008\n %x66 / ; f FF form feed U+000C\n %x6E / ; n LF line feed U+000A\n %x72 / ; r CR carriage return U+000D\n %x74 / ; t HT horizontal tab U+0009\n "/" / ; / slash (solidus) U+002F\n "\\" / ; \\ backslash (reverse solidus) U+005C\n (%x75 hexchar) ; uXXXX U+XXXX\n\nhexchar = non-surrogate /\n (high-surrogate "\\" %x75 low-surrogate)\nnon-surrogate = ((DIGIT / "A"/"B"/"C" / "E"/"F") 3HEXDIG) /\n ("D" %x30-37 2HEXDIG )\nhigh-surrogate = "D" ("8"/"9"/"A"/"B") 2HEXDIG\nlow-surrogate = "D" ("C"/"D"/"E"/"F") 2HEXDIG\n\nHEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.2.1\nwildcard-selector = "*"\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.3.1\nindex-selector = int ; decimal integer\n\nint = "0" /\n (["-"] DIGIT1 *DIGIT) ; - optional\nDIGIT1 = %x31-39 ; 1-9 non-zero digit\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.4.1\nslice-selector = [start S] colon S [end S] [colon [S step ]] ; MODIFICATION: surrogate text rule used\n\nstart = int ; included in selection\nend = int ; not included in selection\nstep = int ; default: 1\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.5.1\nfilter-selector = questionmark S logical-expr ; MODIFICATION: surrogate text rule used\n\nlogical-expr = logical-or-expr\nlogical-or-expr = logical-and-expr *(S disjunction S logical-and-expr) ; MODIFICATION: surrogate text rule used\n ; disjunction\n ; binds less tightly than conjunction\nlogical-and-expr = basic-expr *(S conjunction S basic-expr) ; MODIFICATION: surrogate text rule used\n ; conjunction\n ; binds more tightly than disjunction\n\nbasic-expr = paren-expr /\n comparison-expr /\n test-expr\n\nparen-expr = [logical-not-op S] left-paren S logical-expr S right-paren ; MODIFICATION: surrogate text rule used\n ; parenthesized expression\nlogical-not-op = "!" ; logical NOT operator\n\ntest-expr = [logical-not-op S]\n (filter-query / ; existence/non-existence\n function-expr) ; LogicalType or NodesType\nfilter-query = rel-query / jsonpath-query\nrel-query = current-node-identifier segments\ncurrent-node-identifier = "@"\n\ncomparison-expr = comparable S comparison-op S comparable\nliteral = number / string-literal /\n true / false / null\ncomparable = singular-query / ; singular query value\n function-expr / ; ValueType\n literal\n ; MODIFICATION: https://www.rfc-editor.org/errata/eid8352\ncomparison-op = "==" / "!=" /\n "<=" / ">=" /\n "<" / ">"\n\nsingular-query = rel-singular-query / abs-singular-query\nrel-singular-query = current-node-identifier singular-query-segments\nabs-singular-query = root-identifier singular-query-segments\nsingular-query-segments = *(S (name-segment / index-segment))\nname-segment = (left-bracket name-selector right-bracket) / ; MODIFICATION: surrogate text rule used\n (dot-prefix member-name-shorthand) ; MODIFICATION: surrogate text rule used\nindex-segment = left-bracket index-selector right-bracket ; MODIFICATION: surrogate text rule used\n\nnumber = (int / "-0") [ frac ] [ exp ] ; decimal number\nfrac = "." 1*DIGIT ; decimal fraction\nexp = "e" [ "-" / "+" ] 1*DIGIT ; decimal exponent\ntrue = %x74.72.75.65 ; true\nfalse = %x66.61.6c.73.65 ; false\nnull = %x6e.75.6c.6c ; null\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.4\nfunction-name = function-name-first *function-name-char\nfunction-name-first = LCALPHA\nfunction-name-char = function-name-first / "_" / DIGIT\nLCALPHA = %x61-7A ; "a".."z"\n\nfunction-expr = function-name left-paren S [function-argument ; MODIFICATION: surrogate text rule used\n *(S comma S function-argument)] S right-paren ; MODIFICATION: surrogate text rule used\nfunction-argument = logical-expr / ; MODIFICATION: https://www.rfc-editor.org/errata/eid8343\n filter-query / ; (includes singular-query)\n function-expr /\n literal\n\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.5\nsegment = child-segment / descendant-segment\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.5.1.1\nchild-segment = bracketed-selection /\n (dot-prefix ; MODIFICATION: surrogate text rule used\n (wildcard-selector /\n member-name-shorthand))\n\nbracketed-selection = left-bracket S selector *(S comma S selector) S right-bracket\n ; MODIFICATION: surrogate text rule used\n\nmember-name-shorthand = name-first *name-char\nname-first = ALPHA /\n "_" /\n %x80-D7FF /\n ; skip surrogate code points\n %xE000-10FFFF\nname-char = name-first / DIGIT\n\nDIGIT = %x30-39 ; 0-9\nALPHA = %x41-5A / %x61-7A ; A-Z / a-z\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.5.2.1\ndescendant-segment = double-dot-prefix (bracketed-selection / ; MODIFICATION: surrogate text rule used\n wildcard-selector /\n member-name-shorthand)\n\n; https://www.rfc-editor.org/rfc/rfc9535#name-normalized-paths\nnormalized-path = root-identifier *(normal-index-segment)\nnormal-index-segment = left-bracket normal-selector right-bracket ; MODIFICATION: surrogate text rule used\nnormal-selector = normal-name-selector / normal-index-selector\nnormal-name-selector = squote *normal-single-quoted squote ; \'string\', MODIFICATION: surrogate text rule used\nnormal-single-quoted = normal-unescaped /\n ESC normal-escapable\nnormal-unescaped = ; omit %x0-1F control codes\n %x20-26 /\n ; omit 0x27 \'\n %x28-5B /\n ; omit 0x5C \\\n %x5D-D7FF /\n ; skip surrogate code points\n %xE000-10FFFF\n\nnormal-escapable = %x62 / ; b BS backspace U+0008\n %x66 / ; f FF form feed U+000C\n %x6E / ; n LF line feed U+000A\n %x72 / ; r CR carriage return U+000D\n %x74 / ; t HT horizontal tab U+0009\n "\'" / ; \' apostrophe U+0027\n "\\" / ; \\ backslash (reverse solidus) U+005C\n (%x75 normal-hexchar)\n ; certain values u00xx U+00XX\nnormal-hexchar = "0" "0"\n (\n ("0" %x30-37) / ; "00"-"07"\n ; omit U+0008-U+000A BS HT LF\n ("0" %x62) / ; "0b"\n ; omit U+000C-U+000D FF CR\n ("0" %x65-66) / ; "0e"-"0f"\n ("1" normal-HEXDIG)\n )\nnormal-HEXDIG = DIGIT / %x61-66 ; "0"-"9", "a"-"f"\nnormal-index-selector = "0" / (DIGIT1 *DIGIT)\n ; non-negative decimal integer\n\n; Surrogate named rules\ndot-prefix = "."\ndouble-dot-prefix = ".."\nleft-bracket = "["\nright-bracket = "]"\nleft-paren = "("\nright-paren = ")"\ncomma = ","\ncolon = ":"\ndquote = %x22 ; "\nsquote = %x27 ; \'\nquestionmark = "?"\ndisjunction = "||"\nconjunction = "&&"\n'}};const W=class extends X{},Y=e=>{if(!Array.isArray(e))throw new W("Selectors must be an array, got: "+typeof e,{selectors:e});try{return`$${e.map(e=>{if("string"==typeof e)return`['${(e=>{if("string"!=typeof e)throw new TypeError("Selector must be a string");let t="";for(const r of e){const e=r.codePointAt(0);switch(e){case 8:t+="\\b";break;case 9:t+="\\t";break;case 10:t+="\\n";break;case 12:t+="\\f";break;case 13:t+="\\r";break;case 39:t+="\\'";break;case 92:t+="\\\\";break;default:t+=e<=31?`\\u${e.toString(16).padStart(4,"0")}`:r}}return t})(e)}']`;if("number"==typeof e){if(!Number.isSafeInteger(e)||e<0)throw new TypeError(`Index selector must be a non-negative safe integer, got: ${e}`);return`[${e}]`}throw new TypeError("Selector must be a string or non-negative integer, got: "+typeof e)}).join("")}`}catch(t){throw new W("Failed to compile normalized JSONPath",{cause:t,selectors:e})}},Q=(e,t,r,s)=>{const{realm:n}=e,{value:o}=r;if(n.isObject(t)&&n.hasProperty(t,o)){s(n.getProperty(t,o),o)}},J=(e,t,r,s)=>{const{realm:n}=e,{value:o}=r;if(!n.isArray(t))return;const i=n.getLength(t),c=((e,t)=>e>=0?e:t+e)(o,i);if(c>=0&&c<i){s(n.getElement(t,c),c)}},K=(e,t,r,s)=>{const{realm:n}=e;for(const[e,r]of n.entries(t))s(r,e)},Z=(e,t)=>e>=0?Math.min(e,t):Math.max(t+e,0),ee=(e,t,r,s)=>{const{realm:n}=e,{start:o,end:i,step:c}=r;if(!n.isArray(t))return;const a=((e,t,r,s)=>{const n=r??1;if(0===n)return null;let o,i;if(n>0){const r=0,n=s,c=null!==e?Z(e,s):r,a=null!==t?Z(t,s):n;o=Math.max(c,0),i=Math.min(a,s)}else{const r=s-1,n=-s-1,c=null!==e?e>=0?Math.min(e,s-1):Math.max(s+e,-1):r,a=null!==t?t>=0?Math.min(t,s-1):Math.max(s+t,-1):n;i=Math.min(c,s-1),o=Math.max(a,-1)}return{lower:o,upper:i,step:n}})(o,i,c,n.getLength(t));if(null===a)return;const{lower:l,upper:u,step:p}=a;if(p>0)for(let e=l;e<u;e+=p){s(n.getElement(t,e),e)}else for(let e=u;e>l;e+=p){s(n.getElement(t,e),e)}},te=(e,t,r,s)=>s.value,re=(e,t,r)=>{const{realm:s}=e,{selector:n}=r;switch(n.type){case"NameSelector":{const{value:e}=n;return s.isObject(t)&&s.hasProperty(t,e)?s.getProperty(t,e):void 0}case"IndexSelector":{const{value:e}=n;if(!s.isArray(t))return;const r=s.getLength(t),o=e>=0?e:r+e;return o>=0&&o<r?s.getElement(t,o):void 0}default:return}},se=(e,t,r,s)=>{const{selectors:n}=r;for(const r of n)ye(e,t,r,s)},ne=(e,t,r)=>{const s=[],n=e=>{s.push(e)},{selector:o}=r;switch(o.type){case"BracketedSelection":se(e,t,o,n);break;case"NameSelector":case"WildcardSelector":case"IndexSelector":case"SliceSelector":case"FilterSelector":ye(e,t,o,n)}return s},oe=(e,t,r,s)=>{let n=r;for(const t of s){const r=[];if("DescendantSegment"===t.type){const s=n=>{const{realm:o}=e,i=ne(e,n,t);r.push(...i);for(const[,e]of o.entries(n))s(e)};for(const e of n)s(e)}else for(const s of n){const n=ne(e,s,t);r.push(...n)}n=r}return n},ie=(e,t,r,s)=>{const{query:n}=s;let o;switch(n.type){case"RelQuery":o=((e,t,r,s)=>{const{segments:n}=s;return 0===n.length?[r]:oe(e,0,[r],n)})(e,0,r,n);break;case"JsonPathQuery":o=((e,t,r,s)=>{const{segments:n}=s;return 0===n.length?[t]:oe(e,0,[t],n)})(e,t,0,n);break;default:o=[]}return i=o,Object.defineProperty(i,"_isNodelist",{value:!0,enumerable:!1,writable:!1}),i;var i};let ce;const ae=(e,t,r,s)=>{const{name:n,arguments:o}=s,i=e.functions[n];if("function"!=typeof i)return;const c=o.map(s=>((e,t,r,s)=>{switch(s.type){case"Literal":case"RelSingularQuery":case"AbsSingularQuery":case"FunctionExpr":return le(e,t,r,s);case"FilterQuery":return ie(e,t,r,s);case"TestExpr":return"FilterQuery"===s.expression.type?ie(e,t,r,s.expression):"FunctionExpr"===s.expression.type?le(e,t,r,s.expression):ce(e,t,r,s);case"LogicalOrExpr":case"LogicalAndExpr":case"LogicalNotExpr":case"ComparisonExpr":return ce(e,t,r,s);default:return}})(e,t,r,s));return i(e.realm,...c)},le=(e,t,r,s)=>{switch(s.type){case"Literal":return te(e,t,r,s);case"RelSingularQuery":return((e,t,r,s)=>{let n=r;for(const t of s.segments)if(n=re(e,n,t),void 0===n)return;return n})(e,0,r,s);case"AbsSingularQuery":return((e,t,r,s)=>{let n=t;for(const t of s.segments)if(n=re(e,n,t),void 0===n)return;return n})(e,t,0,s);case"FunctionExpr":return ae(e,t,r,s);default:return}},ue=(e,t,r,s)=>{const{left:n,op:o,right:i}=s,c=le(e,t,r,n),a=le(e,t,r,i);return e.realm.compare(c,o,a)},pe=e=>Array.isArray(e),de=(e,t,r,s)=>{switch(s.type){case"LogicalOrExpr":return!!de(e,t,r,s.left)||de(e,t,r,s.right);case"LogicalAndExpr":return!!de(e,t,r,s.left)&&de(e,t,r,s.right);case"LogicalNotExpr":return!de(e,t,r,s.expression);case"TestExpr":{const{expression:n}=s;if("FilterQuery"===n.type){return ie(e,t,r,n).length>0}if("FunctionExpr"===n.type){const s=ae(e,t,r,n);return"boolean"==typeof s?s:void 0!==s&&(pe(s)?s.length>0:Boolean(s))}return!1}case"ComparisonExpr":return ue(e,t,r,s);default:return!1}};ce=de;const he=de,fe=(e,t,r,s)=>{const{realm:n,root:o}=e,{expression:i}=r;for(const[r,c]of n.entries(t)){he(e,o,c,i)&&s(c,r)}},ye=(e,t,r,s)=>{switch(r.type){case"NameSelector":Q(e,t,r,s);break;case"IndexSelector":J(e,t,r,s);break;case"WildcardSelector":K(e,t,r,s);break;case"SliceSelector":ee(e,t,r,s);break;case"FilterSelector":fe(e,t,r,s)}};new Map;class me{node;key;index;parent;parentPath;inList;#e=!1;#t=!1;#r=!1;#s=!1;#n;#o=!1;constructor(e,t,r,s,n){this.node=e,this.parent=t,this.parentPath=r,this.key=s,this.index=n&&"number"==typeof s?s:void 0,this.inList=n}get shouldSkip(){return this.#e}get shouldStop(){return this.#t}get removed(){return this.#r}isRoot(){return null===this.parentPath}get depth(){let e=0,t=this.parentPath;for(;null!==t;)e+=1,t=t.parentPath;return e}getAncestry(){const e=[];let t=this.parentPath;for(;null!==t;)e.push(t),t=t.parentPath;return e}getAncestorNodes(){return this.getAncestry().map(e=>e.node)}getPathKeys(){const e=[];let t=this;for(;null!==t&&void 0!==t.key;){const{key:r,parent:s,parentPath:n}=t;if(P(s)&&"value"===r){if(!D(s.key))throw new TypeError("MemberElement.key must be a StringElement");e.unshift(s.key.toValue())}else B(n?.node)&&"number"==typeof r&&e.unshift(r);t=t.parentPath}return e}formatPath(e="jsonpointer"){const t=this.getPathKeys();return 0===t.length?"jsonpath"===e?"$":"":"jsonpath"===e?Y(t):z(t)}findParent(e){let t=this.parentPath;for(;null!==t;){if(e(t))return t;t=t.parentPath}return null}find(e){return e(this)?this:this.findParent(e)}skip(){this.#e=!0}stop(){this.#t=!0}replaceWith(e){this.#o&&console.warn("Warning: replaceWith() called on a stale Path. This path belongs to a node whose visit has already completed. The replacement will have no effect. To replace a parent node, do so from the parent's own visitor."),this.#s=!0,this.#n=e,this.node=e}remove(){this.#o&&console.warn("Warning: remove() called on a stale Path. This path belongs to a node whose visit has already completed. The removal will have no effect. To remove a parent node, do so from the parent's own visitor."),this.#r=!0}_getReplacementNode(){return this.#n}_wasReplaced(){return this.#s}_reset(){this.#e=!1,this.#t=!1,this.#r=!1,this.#s=!1,this.#n=void 0}_markStale(){this.#o=!0}}class ge extends AggregateError{constructor(e,t,r){super(e,t,r),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const xe=ge;class be extends Error{static[Symbol.hasInstance](e){return super[Symbol.hasInstance](e)||Function.prototype[Symbol.hasInstance].call(xe,e)}constructor(e,t){super(e,t),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const we=be;const ke=class extends we{constructor(e,t){if(super(e,t),null!=t&&"object"==typeof t){const{cause:e,...r}=t;Object.assign(this,r)}}};function ve(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,r){return t.apply(this,arguments)};case 3:return function(e,r,s){return t.apply(this,arguments)};case 4:return function(e,r,s,n){return t.apply(this,arguments)};case 5:return function(e,r,s,n,o){return t.apply(this,arguments)};case 6:return function(e,r,s,n,o,i){return t.apply(this,arguments)};case 7:return function(e,r,s,n,o,i,c){return t.apply(this,arguments)};case 8:return function(e,r,s,n,o,i,c,a){return t.apply(this,arguments)};case 9:return function(e,r,s,n,o,i,c,a,l){return t.apply(this,arguments)};case 10:return function(e,r,s,n,o,i,c,a,l,u){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function Ae(e,t,s){return function(){for(var n=[],o=0,i=e,c=0,a=!1;c<t.length||o<arguments.length;){var l;c<t.length&&(!r(t[c])||o>=arguments.length)?l=t[c]:(l=arguments[o],o+=1),n[c]=l,r(l)?a=!0:i-=1,c+=1}return!a&&i<=0?s.apply(this,n):ve(Math.max(0,i),Ae(e,n,s))}}var Te=n(function(e,t){return 1===e?s(t):ve(e,Ae(e,[],t))});const Se=Te;function Ie(e){var t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t}const Oe=n(function(e,t){return e&&t});function Ee(e,t,r){for(var s=0,n=r.length;s<n;)t=e(t,r[s]),s+=1;return t}const Ce=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};const Fe=s(function(e){return!!Ce(e)||!!e&&("object"==typeof e&&(!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))});var Me="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function je(e,t,r){return function(s,n,o){if(Fe(o))return e(s,n,o);if(null==o)return n;if("function"==typeof o["fantasy-land/reduce"])return t(s,n,o,"fantasy-land/reduce");if(null!=o[Me])return r(s,n,o[Me]());if("function"==typeof o.next)return r(s,n,o);if("function"==typeof o.reduce)return t(s,n,o,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function De(e,t,r){for(var s=r.next();!s.done;)t=e(t,s.value),s=r.next();return t}function Be(e,t,r,s){return r[s](e,t)}const Ne=je(Ee,Be,De);function Pe(e,t,r){return function(){if(0===arguments.length)return r();var s=arguments[arguments.length-1];if(!Ce(s)){for(var n=0;n<e.length;){if("function"==typeof s[e[n]])return s[e[n]].apply(s,Array.prototype.slice.call(arguments,0,-1));n+=1}if(function(e){return null!=e&&"function"==typeof e["@@transducer/step"]}(s))return t.apply(null,Array.prototype.slice.call(arguments,0,-1))(s)}return r.apply(this,arguments)}}function qe(e,t){for(var r=0,s=t.length,n=Array(s);r<s;)n[r]=e(t[r]),r+=1;return n}const Le=function(){return this.xf["@@transducer/init"]()},_e=function(e){return this.xf["@@transducer/result"](e)};var Ue=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=Le,e.prototype["@@transducer/result"]=_e,e.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},e}();var He=n(Pe(["fantasy-land/map","map"],function(e){return function(t){return new Ue(e,t)}},function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return Se(t.length,function(){return e.call(this,t.apply(this,arguments))});case"[object Object]":return Ee(function(r,s){return r[s]=e(t[s]),r},{},m(t));default:return qe(e,t)}}));const Ge=He;const Re=n(function(e,t){return"function"==typeof t["fantasy-land/ap"]?t["fantasy-land/ap"](e):"function"==typeof e.ap?e.ap(t):"function"==typeof e?function(r){return e(r)(t(r))}:Ne(function(e,r){return function(e,t){var r;t=t||[];var s=(e=e||[]).length,n=t.length,o=[];for(r=0;r<s;)o[o.length]=e[r],r+=1;for(r=0;r<n;)o[o.length]=t[r],r+=1;return o}(e,Ge(r,t))},[],e)});var $e=n(function(e,t){var r=Se(e,t);return Se(e,function(){return Ee(Re,Ge(r,arguments[0]),Array.prototype.slice.call(arguments,1))})});const ze=$e;var Ve=s(function(e){return ze(e.length,e)});const Xe=Ve;const We=n(function(e,t){return Ie(e)?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:Xe(Oe)(e,t)});function Ye(e,t){return function(){return t.call(this,e.apply(this,arguments))}}function Qe(e){return function t(o,i,c){switch(arguments.length){case 0:return t;case 1:return r(o)?t:n(function(t,r){return e(o,t,r)});case 2:return r(o)&&r(i)?t:r(o)?n(function(t,r){return e(t,i,r)}):r(i)?n(function(t,r){return e(o,t,r)}):s(function(t){return e(o,i,t)});default:return r(o)&&r(i)&&r(c)?t:r(o)&&r(i)?n(function(t,r){return e(t,r,c)}):r(o)&&r(c)?n(function(t,r){return e(t,i,r)}):r(i)&&r(c)?n(function(t,r){return e(o,t,r)}):r(o)?s(function(t){return e(t,i,c)}):r(i)?s(function(t){return e(o,t,c)}):r(c)?s(function(t){return e(o,i,t)}):e(o,i,c)}}}function Je(e,t,r){for(var s=0,n=r.length;s<n;){if((t=e["@@transducer/step"](t,r[s]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}s+=1}return e["@@transducer/result"](t)}var Ke=n(function(e,t){return ve(e.length,function(){return e.apply(t,arguments)})});const Ze=Ke;function et(e,t,r){for(var s=r.next();!s.done;){if((t=e["@@transducer/step"](t,s.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}s=r.next()}return e["@@transducer/result"](t)}function tt(e,t,r,s){return e["@@transducer/result"](r[s](Ze(e["@@transducer/step"],e),t))}const rt=je(Je,tt,et);var st=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}();var nt=Qe(function(e,t,r){return rt("function"==typeof e?function(e){return new st(e)}(e):e,t,r)});const ot=nt;function it(e,t){return function(){var r=arguments.length;if(0===r)return t();var s=arguments[r-1];return Ce(s)||"function"!=typeof s[e]?t.apply(this,arguments):s[e].apply(s,Array.prototype.slice.call(arguments,0,r-1))}}const ct=s(it("tail",Qe(it("slice",function(e,t,r){return Array.prototype.slice.call(r,e,t)}))(1,1/0)));function at(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return ve(arguments[0].length,ot(Ye,arguments[0],ct(arguments)))}function lt(e,t){return function(e,t,r){var s,n;if("function"==typeof e.indexOf)switch(typeof t){case"number":if(0===t){for(s=1/t;r<e.length;){if(0===(n=e[r])&&1/n===s)return r;r+=1}return-1}if(t!=t){for(;r<e.length;){if("number"==typeof(n=e[r])&&n!=n)return r;r+=1}return-1}return e.indexOf(t,r);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,r);case"object":if(null===t)return e.indexOf(t,r)}for(;r<e.length;){if(w(e[r],t))return r;r+=1}return-1}(t,e,0)>=0}function ut(e){return'"'+e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}var pt=function(e){return(e<10?"0":"")+e};const dt="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+pt(e.getUTCMonth()+1)+"-"+pt(e.getUTCDate())+"T"+pt(e.getUTCHours())+":"+pt(e.getUTCMinutes())+":"+pt(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};var ht=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=Le,e.prototype["@@transducer/result"]=_e,e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.xf["@@transducer/step"](e,t):e},e}();function ft(e){return function(t){return new ht(e,t)}}var yt=n(Pe(["fantasy-land/filter","filter"],ft,function(e,t){return r=t,"[object Object]"===Object.prototype.toString.call(r)?Ee(function(r,s){return e(t[s])&&(r[s]=t[s]),r},{},m(t)):function(e){return"[object Map]"===Object.prototype.toString.call(e)}(t)?function(e,t){for(var r=new Map,s=t.entries(),n=s.next();!n.done;)e(n.value[1])&&r.set(n.value[0],n.value[1]),n=s.next();return r}(e,t):function(e,t){for(var r=0,s=t.length,n=[];r<s;)e(t[r])&&(n[n.length]=t[r]),r+=1;return n}(e,t);var r}));const mt=yt;const gt=n(function(e,t){return mt((r=e,function(){return!r.apply(this,arguments)}),t);var r});function xt(e,t){var r=function(r){var s=t.concat([e]);return lt(r,s)?"<Circular>":xt(r,s)},s=function(e,t){return qe(function(t){return ut(t)+": "+r(e[t])},t.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+qe(r,e).join(", ")+"))";case"[object Array]":return"["+qe(r,e).concat(s(e,gt(function(e){return/^\d+$/.test(e)},m(e)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof e?"new Boolean("+r(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?r(NaN):ut(dt(e)))+")";case"[object Map]":return"new Map("+r(Array.from(e))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof e?"new Number("+r(e.valueOf())+")":1/e==-1/0?"-0":e.toString(10);case"[object Set]":return"new Set("+r(Array.from(e).sort())+")";case"[object String]":return"object"==typeof e?"new String("+r(e.valueOf())+")":ut(e);case"[object Undefined]":return"undefined";default:if("function"==typeof e.toString){var n=e.toString();if("[object Object]"!==n)return n}return"{"+s(e,m(e)).join(", ")+"}"}}const bt=s(function(e){return xt(e,[])});const wt=n(function(e,t){return e||t});const kt=n(function(e,t){return Ie(e)?function(){return e.apply(this,arguments)||t.apply(this,arguments)}:Xe(wt)(e,t)});const vt=Xe(s(function(e){return!e}))(w(null));const At=n(function(e,t){if(e===t)return t;function r(e,t){if(e>t!=t>e)return t>e?t:e}var s=r(e,t);if(void 0!==s)return s;var n=r(typeof e,typeof t);if(void 0!==n)return n===typeof e?e:t;var o=bt(e),i=r(o,bt(t));return void 0!==i&&i===o?e:t}),Tt=Number.isInteger||function(e){return(e|0)===e};const St=n(function(e,t){var r,s;if(null!=t)return Tt(e)?(s=t)[(r=e)<0?s.length+r:r]:t[e]});const It=n(function(e,t){return Ge(St(e),t)});const Ot=s(function(e){return Se(ot(At,0,It("length",e)),function(){for(var t=0,r=e.length;t<r;){if(e[t].apply(this,arguments))return!0;t+=1}return!1})});var Et=function(e,t){switch(arguments.length){case 0:return Et;case 1:return function t(r){return 0===arguments.length?t:a(e,r)};default:return a(e,t)}};const Ct=Et;const Ft=Se(1,at(g,Ct("GeneratorFunction")));const Mt=Se(1,at(g,Ct("AsyncFunction")));var jt=Ot([at(g,Ct("Function")),Ft,Mt]);function Dt(e){return Dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dt(e)}var Bt=Se(1,We(vt,kt(function(e){return"object"===Dt(e)},jt)));const Nt=Se(1,We(Bt,at(bt,w("[object Promise]"))));function Pt(e,t,r){if(r||(r=new qt),function(e){var t=typeof e;return null==e||"object"!=t&&"function"!=t}(e))return e;var s,n=function(s){var n=r.get(e);if(n)return n;for(var o in r.set(e,s),e)Object.prototype.hasOwnProperty.call(e,o)&&(s[o]=t?Pt(e[o],!0,r):e[o]);return s};switch(g(e)){case"Object":return n(Object.create(Object.getPrototypeOf(e)));case"Array":return n(Array(e.length));case"Date":return new Date(e.valueOf());case"RegExp":return s=e,new RegExp(s.source,s.flags?s.flags:(s.global?"g":"")+(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.sticky?"y":"")+(s.unicode?"u":"")+(s.dotAll?"s":""));case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return e.slice();default:return e}}var qt=function(){function e(){this.map={},this.length=0}return e.prototype.set=function(e,t){var r=this.hash(e),s=this.map[r];s||(this.map[r]=s=[]),s.push([e,t]),this.length+=1},e.prototype.hash=function(e){var t=[];for(var r in e)t.push(Object.prototype.toString.call(e[r]));return t.join()},e.prototype.get=function(e){if(this.length<=180)for(var t in this.map)for(var r=this.map[t],s=0;s<r.length;s+=1){if((o=r[s])[0]===e)return o[1]}else{var n=this.hash(e);if(r=this.map[n])for(s=0;s<r.length;s+=1){var o;if((o=r[s])[0]===e)return o[1]}}},e}();const Lt=s(function(e){return null!=e&&"function"==typeof e.clone?e.clone():Pt(e,!0)});const _t=e=>"number"==typeof e.startLine&&"number"==typeof e.startCharacter&&"number"==typeof e.startOffset&&"number"==typeof e.endLine&&"number"==typeof e.endCharacter&&"number"==typeof e.endOffset;class Ut extends I{constructor(e,t,r){super(e,t,r),this.element="sourceMap"}static transfer(e,t){t.startLine=e.startLine,t.startCharacter=e.startCharacter,t.startOffset=e.startOffset,t.endLine=e.endLine,t.endCharacter=e.endCharacter,t.endOffset=e.endOffset}static from(e){const{startLine:t,startCharacter:r,startOffset:s,endLine:n,endCharacter:o,endOffset:i}=e;if("number"!=typeof t||"number"!=typeof r||"number"!=typeof s||"number"!=typeof n||"number"!=typeof o||"number"!=typeof i)return;const c="sm1:"+[t,r,s,n,o,i].map(Gt).join("");const a=new Ut(c);return a.startLine=t,a.startCharacter=r,a.startOffset=s,a.endLine=n,a.endCharacter=o,a.endOffset=i,a}applyTo(e){this.content&&([e.startLine,e.startCharacter,e.startOffset,e.endLine,e.endCharacter,e.endOffset]=function(e){const t=e.startsWith("sm1:")?e.slice(4):e,r=[];let s=0;for(let e=0;e<6;e++){const e=Rt(t,s);r.push(e.value),s=e.next}return r}(this.content))}}const Ht="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Gt(e){let t=e>>>0,r="";do{let e=31&t;t>>>=5,0!==t&&(e|=32),r+=Ht[e]}while(0!==t);return r}function Rt(e,t=0){let r=0,s=0,n=t;for(;;){const t=e[n++],o=Ht.indexOf(t);if(-1===o)throw new Error(`Invalid Base64 VLQ char: ${t}`);if(r|=(31&o)<<s,s+=5,!!!(32&o))break}return{value:r>>>0,next:n}}const $t=Ut;const zt=class extends ke{value;constructor(e,t){super(e,t),void 0!==t&&(this.value=t.value)}};const Vt=class extends zt{};const Xt=class extends zt{},Wt=(e,t)=>{const{visited:r=new WeakMap}=t,s={...t,visited:r};if(r.has(e))return r.get(e);const n=Kt(e);r.set(e,n);const{content:o}=e;return Array.isArray(o)?n.content=o.map(e=>Wt(e,s)):j(o)?n.content=Wt(o,s):n.content=o instanceof k?Yt(o,s):o,n},Yt=(e,t)=>{const{visited:r=new WeakMap}=t,s={...t,visited:r};if(r.has(e))return r.get(e);const{key:n,value:o}=e,i=void 0!==n?Wt(n,s):void 0,c=void 0!==o?Wt(o,s):void 0,a=new k(i,c);return r.set(e,a),a},Qt=(e,t={})=>{if(e instanceof k)return Yt(e,t);if(e instanceof A)return((e,t)=>{const{visited:r=new WeakMap}=t,s={...t,visited:r};if(r.has(e))return r.get(e);const n=[...e].map(e=>Wt(e,s)),o=new A(n);return r.set(e,o),o})(e,t);if(j(e))return Wt(e,t);throw new Vt("Value provided to cloneDeep function couldn't be cloned",{value:e})};Qt.safe=e=>{try{return Qt(e)}catch{return e}};const Jt=e=>{const{key:t,value:r}=e;return new k(t,r)},Kt=e=>{const t=new(0,e.constructor);t.element=e.element,e.isMetaEmpty||(t.meta=Qt(e.meta)),e.isAttributesEmpty||(t.attributes=Qt(e.attributes)),_t(e)&&$t.transfer(e,t),(e=>void 0!==e.style)(e)&&(t.style=Lt(e.style));const{content:r}=e;return j(r)?t.content=Kt(r):Array.isArray(r)?t.content=[...r]:t.content=r instanceof k?Jt(r):r,t},Zt=e=>{if(e instanceof k)return Jt(e);if(e instanceof A)return(e=>{const t=[...e];return new A(t)})(e);if(j(e))return Kt(e);throw new Xt("Value provided to cloneShallow function couldn't be cloned",{value:e})};Zt.safe=e=>{try{return Zt(e)}catch{return e}};const er=e=>{const t=e?.element;return void 0===t||"element"===t?"Element":`${t.charAt(0).toUpperCase()}${t.slice(1)}Element`},tr=e=>{const t=e.primitive();return void 0===t||"element"===t?"Element":`${t.charAt(0).toUpperCase()}${t.slice(1)}Element`},rr=e=>j(e),sr=e=>Zt(e),nr=(e,t,r)=>{P(e)?e.value=r:Array.isArray(e)?e[t]=null===r?void 0:r:null===r?delete e[t]:e[t]=r},or=e=>P(e)?["key","value"]:B(e)||N(e)?["content"]:[],ir=(e,t)=>{if(void 0!==e[t])return e[t];const r=t.length;for(const s in e){if(!s.includes("|"))continue;const n=s.indexOf(t);if(-1===n)continue;const o=0===n||"|"===s[n-1],i=n+r===s.length||"|"===s[n+r];if(o&&i)return e[s]}},cr=(e,t,r)=>{if(void 0===t)return null;const s=e,n=r?"leave":"enter",o=ir(s,t);if(!r&&"function"==typeof o)return o;if(null!=o){const e=o[n];if("function"==typeof e)return e}const i=s[n];if("function"==typeof i)return i;if(null!=i){const e=ir(i,t);if("function"==typeof e)return e}return null},ar=(e,t={})=>{const{visitFnGetter:r=cr,nodeTypeGetter:s=er,exposeEdits:n=!1}=t,o=Symbol("internal-skip"),i=Symbol("break"),c=new Array(e.length).fill(o);return{enter(t){let a=t.node,l=!1;for(let u=0;u<e.length;u+=1)if(c[u]===o){const o=r(e[u],s(a),!1);if("function"==typeof o){const r=ur(t,a),s=o.call(e[u],r);if(Nt(s))throw new ke("Async visitor not supported in sync mode",{visitor:e[u],visitFn:o});if(r.shouldStop){c[u]=i;break}if(r.shouldSkip&&(c[u]=a),r.removed)return void t.remove();if(r._wasReplaced()){const e=r._getReplacementNode();if(!n)return t.replaceWith(e),e;a=e,l=!0}else if(void 0!==s){if(!n)return t.replaceWith(s),s;a=s,l=!0}}}if(l)return t.replaceWith(a),a},leave(t){const n=t.node;for(let a=0;a<e.length;a+=1)if(c[a]===o){const o=r(e[a],s(n),!0);if("function"==typeof o){const r=ur(t,n),s=o.call(e[a],r);if(Nt(s))throw new ke("Async visitor not supported in sync mode",{visitor:e[a],visitFn:o});if(r.shouldStop){c[a]=i;break}if(r.removed)return void t.remove();if(r._wasReplaced()){const e=r._getReplacementNode();return t.replaceWith(e),e}if(void 0!==s)return t.replaceWith(s),s}}else c[a]===n&&(c[a]=o)}}},lr=(e,t={})=>{const{visitFnGetter:r=cr,nodeTypeGetter:s=er,exposeEdits:n=!1}=t,o=Symbol("internal-skip"),i=Symbol("break"),c=new Array(e.length).fill(o);return{async enter(t){let a=t.node,l=!1;for(let u=0;u<e.length;u+=1)if(c[u]===o){const o=r(e[u],s(a),!1);if("function"==typeof o){const r=ur(t,a),s=await o.call(e[u],r);if(r.shouldStop){c[u]=i;break}if(r.shouldSkip&&(c[u]=a),r.removed)return void t.remove();if(r._wasReplaced()){const e=r._getReplacementNode();if(!n)return t.replaceWith(e),e;a=e,l=!0}else if(void 0!==s){if(!n)return t.replaceWith(s),s;a=s,l=!0}}}if(l)return t.replaceWith(a),a},async leave(t){const n=t.node;for(let a=0;a<e.length;a+=1)if(c[a]===o){const o=r(e[a],s(n),!0);if("function"==typeof o){const r=ur(t,n),s=await o.call(e[a],r);if(r.shouldStop){c[a]=i;break}if(r.removed)return void t.remove();if(r._wasReplaced()){const e=r._getReplacementNode();return t.replaceWith(e),e}if(void 0!==s)return t.replaceWith(s),s}}else c[a]===n&&(c[a]=o)}}};function ur(e,t){return new me(t,e.parent,e.parentPath,e.key,e.inList)}function*pr(e,t,r){const{keyMap:s,state:n,nodeTypeGetter:o,nodePredicate:i,nodeCloneFn:c,detectCycles:a,mutable:l,mutationFn:u}=r,p="function"==typeof s;let d,h,f=Array.isArray(e),y=[e],m=-1,g=[],x=e,b=null,w=null;const k=[];do{m+=1;const e=m===y.length;let r;const v=e&&0!==g.length;if(e){if(r=0===k.length?void 0:b?.key,x=h,h=k.pop(),w=b?.parentPath?.parentPath??null,v)if(l)for(const[e,t]of g)u(x,e,t);else if(f){x=x.slice();let e=0;for(const[t,r]of g){const s=t-e;null===r?(x.splice(s,1),e+=1):x[s]=r}}else{x=c(x);for(const[e,t]of g)x[e]=t}if(void 0!==d){m=d.index,y=d.keys,g=d.edits;const e=d.inArray;if(w=d.parentPath,d=d.prev,v&&!l){const t=e?m:y[m];g.push([t,x])}f=e}}else if(void 0!==h&&(r=f?m:y[m],x=h[r],void 0===x))continue;if(!Array.isArray(x)){if(!i(x))throw new ke(`Invalid AST Node: ${String(x)}`,{node:x});if(a&&k.includes(x))continue;b=new me(x,h,w,r,f);const s=cr(t,o(x),e);if(s){for(const[e,r]of Object.entries(n))t[e]=r;const o=yield{visitFn:s,path:b,isLeaving:e};if(b.shouldStop)break;if(b.shouldSkip&&!e)continue;if(b.removed){if(g.push([r,null]),!e)continue}else if(b._wasReplaced()){const t=b._getReplacementNode();if(g.push([r,t]),!e){if(!i(t))continue;x=t}}else if(void 0!==o&&(g.push([r,o]),!e)){if(!i(o))continue;x=o}b._markStale()}}if(!e){if(d={inArray:f,index:m,keys:y,edits:g,parentPath:w,prev:d},f=Array.isArray(x),f)y=x;else if(p)y=s(x);else{const e=o(x);y=void 0!==e?s[e]??[]:[]}m=-1,g=[],void 0!==h&&k.push(h),h=x,w=b}}while(void 0!==d);return 0!==g.length?g.at(-1)[1]:e}ar[Symbol.for("nodejs.util.promisify.custom")]=lr;const dr=(e,t,r={})=>{const s=pr(e,t,{keyMap:r.keyMap??or,state:r.state??{},nodeTypeGetter:r.nodeTypeGetter??er,nodePredicate:r.nodePredicate??rr,nodeCloneFn:r.nodeCloneFn??sr,detectCycles:r.detectCycles??!0,mutable:r.mutable??!1,mutationFn:r.mutationFn??nr});let n=s.next();for(;!n.done;){const e=n.value,r=e.visitFn.call(t,e.path);if(Nt(r))throw new ke("Async visitor not supported in sync mode",{visitor:t,visitFn:e.visitFn});n=s.next(r)}return n.value},hr=async(e,t,r={})=>{const s=pr(e,t,{keyMap:r.keyMap??or,state:r.state??{},nodeTypeGetter:r.nodeTypeGetter??er,nodePredicate:r.nodePredicate??rr,nodeCloneFn:r.nodeCloneFn??sr,detectCycles:r.detectCycles??!0,mutable:r.mutable??!1,mutationFn:r.mutationFn??nr});let n=s.next();for(;!n.done;){const e=n.value,r=await e.visitFn.call(t,e.path);n=s.next(r)}return n.value};dr[Symbol.for("nodejs.util.promisify.custom")]=hr;const fr=(e,t)=>{const r=[];return dr(e,{enter(e){t(e.node)&&r.push(e.node)}}),r},yr=(e,t)=>{let r;return dr(e,{enter(e){t(e.node)&&(r=e.node,e.stop())}}),r},mr=(e,t)=>void 0!==yr(e,t),gr=(e,t)=>fr(e,e=>!t(e)),xr=(e,t)=>{let r,s;"function"==typeof t?(r=t,s=j):(r=t.callback??(()=>{}),s=t.predicate??j),dr(e,{enter(e){s(e.node)&&r(e.node)}})},br=e=>{const t=new WeakMap;return dr(e,{enter(e){t.set(e.node,e.parentPath?.node)}}),t},wr=(e,t)=>{let r,s;"number"==typeof t?(r=t,s=!1):(r=t.offset??0,s=t.includeRightBound??!1);const n=[];return dr(e,{enter(e){const t=e.node;if(!_t(t))return;const o=t.startOffset,i=t.endOffset;r>=o&&(r<i||s&&r<=i)?n.push(t):e.skip()}}),n.at(-1)};return me.prototype.traverse=function(e,t){return dr(this.node,e,t)},me.prototype.traverseAsync=function(e,t){return hr(this.node,e,t)},t})());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@speclynx/apidom-traverse",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.0",
|
|
4
4
|
"description": "Traversal and visitor utilities for walking and transforming ApiDOM structures.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"license": "Apache-2.0",
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@babel/runtime-corejs3": "^7.28.4",
|
|
45
|
-
"@speclynx/apidom-datamodel": "^2.
|
|
46
|
-
"@speclynx/apidom-error": "^2.
|
|
47
|
-
"@speclynx/apidom-json-path": "^2.
|
|
48
|
-
"@speclynx/apidom-json-pointer": "^2.
|
|
45
|
+
"@speclynx/apidom-datamodel": "^2.12.0",
|
|
46
|
+
"@speclynx/apidom-error": "^2.12.0",
|
|
47
|
+
"@speclynx/apidom-json-path": "^2.12.0",
|
|
48
|
+
"@speclynx/apidom-json-pointer": "^2.12.0",
|
|
49
49
|
"ramda-adjunct": "^6.0.0"
|
|
50
50
|
},
|
|
51
51
|
"files": [
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"README.md",
|
|
59
59
|
"CHANGELOG.md"
|
|
60
60
|
],
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "672efe907afef6ae5b547a8028db077297a0c52e"
|
|
62
62
|
}
|