@speclynx/apidom-ns-json-schema-draft-4 2.0.1 → 2.1.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.1.0](https://github.com/speclynx/apidom/compare/v2.0.1...v2.1.0) (2026-01-17)
7
+
8
+ **Note:** Version bump only for package @speclynx/apidom-ns-json-schema-draft-4
9
+
6
10
  ## [2.0.1](https://github.com/speclynx/apidom/compare/v2.0.0...v2.0.1) (2026-01-14)
7
11
 
8
12
  **Note:** Version bump only for package @speclynx/apidom-ns-json-schema-draft-4
@@ -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.apidomNsJSONSchemaDraft4=t():e.apidomNsJSONSchemaDraft4=t()}(self,()=>(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},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={};e.r(t),e.d(t,{AllOfVisitorBase:()=>ts,AlternatingVisitor:()=>zs,AnyOfVisitorBase:()=>ns,DefinitionsVisitorBase:()=>os,DependenciesVisitorBase:()=>cs,FallbackVisitor:()=>yr,FixedFieldsVisitor:()=>xr,ItemsVisitor:()=>ys,ItemsVisitorBase:()=>ss,JSONReferenceElement:()=>W,JSONReferenceVisitorBase:()=>Yr,JSONSchemaDraft4MediaTypes:()=>d,JSONSchemaElement:()=>q,JSONSchemaVisitor:()=>ms,JSONSchemaVisitorBase:()=>Xr,LinkDescriptionElement:()=>U,LinkDescriptionVisitor:()=>Gs,LinkDescriptionVisitorBase:()=>Zr,LinksVisitorBase:()=>is,MapVisitor:()=>Hr,MediaElement:()=>z,MediaVisitorBase:()=>es,OneOfVisitorBase:()=>rs,ParentSchemaAwareVisitor:()=>Qr,PatternPropertiesVisitorBase:()=>as,PatternedFieldsVisitor:()=>Gr,PropertiesVisitorBase:()=>us,SpecificationVisitor:()=>Ar,Visitor:()=>dr,default:()=>K,isJSONReferenceElement:()=>fs,isJSONReferenceLikeElement:()=>ds,isJSONSchemaElement:()=>ls,isLinkDescriptionElement:()=>ps,isMediaElement:()=>hs,mediaTypes:()=>y,refract:()=>ni,refractJSONReference:()=>Zs,refractJSONSchema:()=>Ys,refractLinkDescription:()=>ti,refractMedia:()=>ei,refractorPluginReplaceEmptyElement:()=>un,specificationObj:()=>Hs});var n={};e.r(n),e.d(n,{isJSONReferenceElement:()=>fs,isJSONSchemaElement:()=>ls,isLinkDescriptionElement:()=>ps,isMediaElement:()=>hs});var r={};function s(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function i(e){return function t(n){return 0===arguments.length||s(n)?t:e.apply(this,arguments)}}function o(e,t){return t[e<0?t.length+e:e]}e.r(r),e.d(r,{isJSONReferenceLikeElement:()=>ds});const c=i(function(e){return o(-1,e)});class a extends AggregateError{constructor(e,t,n){super(e,t,n),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const u=a;class l extends Error{static[Symbol.hasInstance](e){return super[Symbol.hasInstance](e)||Function.prototype[Symbol.hasInstance].call(u,e)}constructor(e,t){super(e,t),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const f=l;const h=class extends f{};const p=class extends h{};const m=class extends Array{unknownMediaType="application/octet-stream";filterByFormat(){throw new p("filterByFormat method in MediaTypes class is not yet implemented.")}findBy(){throw new p("findBy method in MediaTypes class is not yet implemented.")}latest(){throw new p("latest method in MediaTypes class is not yet implemented.")}};class d extends m{filterByFormat(e="generic"){const t="generic"===e?"schema;version":e;return this.filter(e=>e.includes(t))}findBy(e="draft-04",t="generic"){const n="generic"===t?`schema;version=${e}`:`schema+${t};version=${e}`;return this.find(e=>e.includes(n))||this.unknownMediaType}latest(e="generic"){return c(this.filterByFormat(e))}}const y=new d("application/schema;version=draft-04","application/schema+json;version=draft-04","application/schema+yaml;version=draft-04");function g(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return s(n)?t:i(function(t){return e(n,t)});default:return s(n)&&s(r)?t:s(n)?i(function(t){return e(t,r)}):s(r)?i(function(t){return e(n,t)}):e(n,r)}}}function v(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function b(e,t,n){for(var r=0,s=n.length;r<s;){if(e(t,n[r]))return!0;r+=1}return!1}function O(e,t){return Object.prototype.hasOwnProperty.call(t,e)}const w="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var j=Object.prototype.toString;const E=function(){return"[object Arguments]"===j.call(arguments)?function(e){return"[object Arguments]"===j.call(e)}:function(e){return O("callee",e)}}();var S=!{toString:null}.propertyIsEnumerable("toString"),A=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],x=function(){return arguments.propertyIsEnumerable("length")}(),k=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},P="function"!=typeof Object.keys||x?i(function(e){if(Object(e)!==e)return[];var t,n,r=[],s=x&&E(e);for(t in e)!O(t,e)||s&&"length"===t||(r[r.length]=t);if(S)for(n=A.length-1;n>=0;)O(t=A[n],e)&&!k(r,t)&&(r[r.length]=t),n-=1;return r}):i(function(e){return Object(e)!==e?[]:Object.keys(e)});const M=P;const _=i(function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function N(e,t,n,r){var s=v(e);function i(e,t){return F(e,t,n.slice(),r.slice())}return!b(function(e,t){return!b(i,t,e)},v(t),s)}function F(e,t,n,r){if(w(e,t))return!0;var s,i,o=_(e);if(o!==_(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(o){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(s=e.constructor,null==(i=String(s).match(/^function (\w*)/))?"":i[1]))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!w(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!w(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 c=n.length-1;c>=0;){if(n[c]===e)return r[c]===t;c-=1}switch(o){case"Map":return e.size===t.size&&N(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&N(e.values(),t.values(),n.concat([e]),r.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 a=M(e);if(a.length!==M(t).length)return!1;var u=n.concat([e]),l=r.concat([t]);for(c=a.length-1;c>=0;){var f=a[c];if(!O(f,t)||!F(t[f],e[f],u,l))return!1;c-=1}return!0}const V=g(function(e,t){return F(e,t,[],[])});const $=class{key;value;constructor(e,t){this.key=e,this.value=t}toValue(){return{key:this.key?.toValue(),value:this.value?.toValue()}}};class C{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(n=>{const r=n.value,s=n.key;if(void 0===r||void 0===s)throw new Error("MemberElement must have both key and value");return void 0!==t?e.call(t,r,s,n):e(r,s,n)})}filter(e,t){const n=this.elements.filter(n=>{const r=n.value,s=n.key;return void 0!==r&&void 0!==s&&(void 0!==t?e.call(t,r,s,n):e(r,s,n))});return new C(n)}reject(e,t){const n=[];for(const r of this.elements){const s=r.value,i=r.key;void 0!==s&&void 0!==i&&(e.call(t,s,i,r)||n.push(r))}return new C(n)}forEach(e,t){this.elements.forEach((n,r)=>{const s=n.value,i=n.key;void 0!==s&&void 0!==i&&(void 0!==t?e.call(t,s,i,n,r):e(s,i,n,r))})}find(e,t){return this.elements.find(n=>{const r=n.value,s=n.key;return void 0!==r&&void 0!==s&&(void 0!==t?e.call(t,r,s,n):e(r,s,n))})}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 I=C;class R{parent;startLine;startCharacter;startOffset;endLine;endCharacter;endOffset;_storedElement="element";_content;_meta;_attributes;constructor(e,t,n){void 0!==t&&(this.meta=t),void 0!==n&&(this.attributes=n),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 R)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 $)this._content=e;else if(e instanceof I)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 R?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 R?this._attributes=e:this.attributes.set(e??{})}get id(){return this.getMetaProperty("id","")}set id(e){this.setMetaProperty("id",e)}get classes(){return this.getMetaProperty("classes",[])}set classes(e){this.setMetaProperty("classes",e)}get links(){return this.getMetaProperty("links",[])}set links(e){this.setMetaProperty("links",e)}get children(){const{_content:e}=this;if(Array.isArray(e))return e;if(e instanceof $){const t=[];return e.key&&t.push(e.key),e.value&&t.push(e.value),t}return e instanceof R?[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 R||e instanceof $?e.toValue():Array.isArray(e)?e.map(e=>e.toValue()):e}equals(e){return V(this.toValue(),e)}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 n=new this.RefElement(t);return"string"==typeof e&&(n.path=this.refract(e)),n}getMetaProperty(e,t){if(!this.meta.hasKey(e)){if(this.isFrozen){const e=this.refract(t);return e.freeze(),e}this.meta.set(e,t)}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 D=R;class T extends D{constructor(e,t,n){super(e||[],t,n)}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 n=t||{},r=!!n.recursive,s=void 0===n.results?[]:n.results;for(let t=0;t<this._content.length;t+=1){const n=this._content[t],i=n;r&&"function"==typeof i.findElements&&i.findElements(e,{results:s,recursive:r}),e(n,t,void 0)&&s.push(n)}return s}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 n=t.classes;return"function"==typeof n.includes&&n.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 J=T;const L=class extends D{constructor(e,t,n,r){super(new $,n,r),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 B=class extends J{constructor(e,t,n){super(e||[],t,n),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(n=>n.key.toValue()!==e||(t=n,!1)),t}getKey(e){const t=this.getMember(e);if(t)return t.key}set(e,t){if("string"==typeof e){const n=this.getMember(e);n?n.value=t:this._content.push(new L(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(n=>e.call(t,n.value,n.key,n))}compactMap(e,t){const n=[];return this.forEach((r,s,i)=>{const o=e.call(t,r,s,i);o&&n.push(o)}),n}filter(e,t){return new I(this._content).filter(e,t)}reject(e,t){const n=[];for(const r of this._content)e.call(t,r.value,r.key,r)||n.push(r);return new I(n)}forEach(e,t){this._content.forEach(n=>e.call(t,n.value,n.key,n))}reduce(e,t){let n,r;void 0!==t?(n=0,r=this.refract(t)):(n=1,r=this._content[0]?.value);for(let t=n;t<this._content.length;t+=1){const n=this._content[t],s=e(r,n.value,n.key,n,this);r=void 0===s?s:this.refract(s)}return r}empty(){return new this.constructor([])}};const q=class extends B{constructor(e,t,n){super(e,t,n),this.element="JSONSchemaDraft4"}get idField(){return this.get("id")}set idField(e){this.set("id",e)}get $schema(){return this.get("$schema")}set $schema(e){this.set("$schema",e)}get multipleOf(){return this.get("multipleOf")}set multipleOf(e){this.set("multipleOf",e)}get maximum(){return this.get("maximum")}set maximum(e){this.set("maximum",e)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(e){this.set("exclusiveMaximum",e)}get minimum(){return this.get("minimum")}set minimum(e){this.set("minimum",e)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(e){this.set("exclusiveMinimum",e)}get maxLength(){return this.get("maxLength")}set maxLength(e){this.set("maxLength",e)}get minLength(){return this.get("minLength")}set minLength(e){this.set("minLength",e)}get pattern(){return this.get("pattern")}set pattern(e){this.set("pattern",e)}get additionalItems(){return this.get("additionalItems")}set additionalItems(e){this.set("additionalItems",e)}get itemsField(){return this.get("items")}set itemsField(e){this.set("items",e)}get maxItems(){return this.get("maxItems")}set maxItems(e){this.set("maxItems",e)}get minItems(){return this.get("minItems")}set minItems(e){this.set("minItems",e)}get uniqueItems(){return this.get("uniqueItems")}set uniqueItems(e){this.set("uniqueItems",e)}get maxProperties(){return this.get("maxProperties")}set maxProperties(e){this.set("maxProperties",e)}get minProperties(){return this.get("minProperties")}set minProperties(e){this.set("minProperties",e)}get required(){return this.get("required")}set required(e){this.set("required",e)}get properties(){return this.get("properties")}set properties(e){this.set("properties",e)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(e){this.set("additionalProperties",e)}get patternProperties(){return this.get("patternProperties")}set patternProperties(e){this.set("patternProperties",e)}get dependencies(){return this.get("dependencies")}set dependencies(e){this.set("dependencies",e)}get enum(){return this.get("enum")}set enum(e){this.set("enum",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}get allOf(){return this.get("allOf")}set allOf(e){this.set("allOf",e)}get anyOf(){return this.get("anyOf")}set anyOf(e){this.set("anyOf",e)}get oneOf(){return this.get("oneOf")}set oneOf(e){this.set("oneOf",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get definitions(){return this.get("definitions")}set definitions(e){this.set("definitions",e)}get title(){return this.get("title")}set title(e){this.set("title",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get default(){return this.get("default")}set default(e){this.set("default",e)}get format(){return this.get("format")}set format(e){this.set("format",e)}get base(){return this.get("base")}set base(e){this.set("base",e)}get linksField(){return this.get("links")}set linksField(e){this.set("links",e)}get media(){return this.get("media")}set media(e){this.set("media",e)}get readOnly(){return this.get("readOnly")}set readOnly(e){this.set("readOnly",e)}};const W=class extends B{constructor(e,t,n){super(e,t,n),this.element="JSONReference",this.classes.push("json-reference")}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}};const z=class extends B{constructor(e,t,n){super(e,t,n),this.element="media"}get binaryEncoding(){return this.get("binaryEncoding")}set binaryEncoding(e){this.set("binaryEncoding",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}};const U=class extends B{constructor(e,t,n){super(e,t,n),this.element="linkDescription"}get href(){return this.get("href")}set href(e){this.set("href",e)}get rel(){return this.get("rel")}set rel(e){this.set("rel",e)}get title(){return this.get("title")}set title(e){this.set("title",e)}get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get mediaType(){return this.get("mediaType")}set mediaType(e){this.set("mediaType",e)}get method(){return this.get("method")}set method(e){this.set("method",e)}get encType(){return this.get("encType")}set encType(e){this.set("encType",e)}get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}},K={namespace:e=>{const{base:t}=e;return t.register("jSONSchemaDraft4",q),t.register("jSONReference",W),t.register("media",z),t.register("linkDescription",U),t}};const G=class extends D{constructor(e,t,n){super(e,t,n),this.element="string"}primitive(){return"string"}get length(){return this.content?.length??0}};const H=class extends D{constructor(e,t,n){super(e,t,n),this.element="number"}primitive(){return"number"}};const Q=class extends D{constructor(e,t,n){super(e??null,t,n),this.element="null"}primitive(){return"null"}set(e){throw new Error("Cannot set the value of null")}};const X=class extends D{constructor(e,t,n){super(e,t,n),this.element="boolean"}primitive(){return"boolean"}};const Y=class extends J{constructor(e,t,n){super(e||[],t,n),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 n=[];for(const r of this._content){const s=e.call(t,r);s&&n.push(s)}return n}filter(e,t){const n=this._content.filter(e,t);return new this.constructor(n)}reject(e,t){const n=[];for(const r of this._content)e.call(t,r)||n.push(r);return new this.constructor(n)}reduce(e,t){let n,r;void 0!==t?(n=0,r=this.refract(t)):(n=1,r=this.first);for(let t=n;t<this.length;t+=1){const n=e(r,this._content[t],t,this);r=void 0===n?n:this.refract(n)}return r}forEach(e,t){this._content.forEach((n,r)=>{e.call(t,n,r)})}empty(){return new this.constructor([])}},Z=e=>e instanceof D,ee=e=>e instanceof G,te=e=>e instanceof H,ne=e=>e instanceof Q,re=e=>e instanceof X,se=e=>e instanceof Y,ie=e=>e instanceof B,oe=e=>e instanceof L,ce=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,ae=(e,t)=>0===t.length||!!Z(e)&&(!e.isMetaEmpty&&(!!e.hasMetaProperty("classes")&&t.every(t=>e.classes.includes(t))));class ue extends G{constructor(e,t,n){super(e,t,n),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:n,startOffset:r,endLine:s,endCharacter:i,endOffset:o}=e;if("number"!=typeof t||"number"!=typeof n||"number"!=typeof r||"number"!=typeof s||"number"!=typeof i||"number"!=typeof o)return;const c="sm1:"+[t,n,r,s,i,o].map(fe).join("");const a=new ue(c);return a.startLine=t,a.startCharacter=n,a.startOffset=r,a.endLine=s,a.endCharacter=i,a.endOffset=o,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,n=[];let r=0;for(let e=0;e<6;e++){const e=he(t,r);n.push(e.value),r=e.next}return n}(this.content))}}const le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function fe(e){let t=e>>>0,n="";do{let e=31&t;t>>>=5,0!==t&&(e|=32),n+=le[e]}while(0!==t);return n}function he(e,t=0){let n=0,r=0,s=t;for(;;){const t=e[s++],i=le.indexOf(t);if(-1===i)throw new Error(`Invalid Base64 VLQ char: ${t}`);if(n|=(31&i)<<r,r+=5,!!!(32&i))break}return{value:n>>>0,next:s}}const pe=ue;const me=class extends f{constructor(e,t){if(super(e,t),null!=t&&"object"==typeof t){const{cause:e,...n}=t;Object.assign(this,n)}}};const de=class extends me{value;constructor(e,t){super(e,t),void 0!==t&&(this.value=t.value)}};const ye=class extends de{};const ge=class extends de{},ve=(e,t)=>{const{visited:n=new WeakMap}=t,r={...t,visited:n};if(n.has(e))return n.get(e);const s=je(e);n.set(e,s);const{content:i}=e;return Array.isArray(i)?s.content=i.map(e=>ve(e,r)):Z(i)?s.content=ve(i,r):s.content=i instanceof $?be(i,r):i,s},be=(e,t)=>{const{visited:n=new WeakMap}=t,r={...t,visited:n};if(n.has(e))return n.get(e);const{key:s,value:i}=e,o=void 0!==s?ve(s,r):void 0,c=void 0!==i?ve(i,r):void 0,a=new $(o,c);return n.set(e,a),a},Oe=(e,t={})=>{if(e instanceof $)return be(e,t);if(e instanceof I)return((e,t)=>{const{visited:n=new WeakMap}=t,r={...t,visited:n};if(n.has(e))return n.get(e);const s=[...e].map(e=>ve(e,r)),i=new I(s);return n.set(e,i),i})(e,t);if(Z(e))return ve(e,t);throw new ye("Value provided to cloneDeep function couldn't be cloned",{value:e})};Oe.safe=e=>{try{return Oe(e)}catch{return e}};const we=e=>{const{key:t,value:n}=e;return new $(t,n)},je=e=>{const t=new(0,e.constructor);t.element=e.element,e.isMetaEmpty||(t.meta=Oe(e.meta)),e.isAttributesEmpty||(t.attributes=Oe(e.attributes)),ce(e)&&pe.transfer(e,t);const{content:n}=e;return Z(n)?t.content=je(n):Array.isArray(n)?t.content=[...n]:t.content=n instanceof $?we(n):n,t},Ee=e=>{if(e instanceof $)return we(e);if(e instanceof I)return(e=>{const t=[...e];return new I(t)})(e);if(Z(e))return je(e);throw new ge("Value provided to cloneShallow function couldn't be cloned",{value:e})};Ee.safe=e=>{try{return Ee(e)}catch{return e}};const Se=class extends D{constructor(e,t,n){super(e||[],t,n),this.element="link"}get relation(){if(this.hasAttributesProperty("relation"))return this.attributes.get("relation")}set relation(e){this.attributes.set("relation",e)}get href(){if(this.hasAttributesProperty("href"))return this.attributes.get("href")}set href(e){this.attributes.set("href",e)}};const Ae=class extends D{constructor(e,t,n){super(e||[],t,n),this.element="ref",this.path||(this.path="element")}get path(){if(this.hasAttributesProperty("path"))return this.attributes.get("path")}set path(e){this.attributes.set("path",e)}};const xe=class extends G{constructor(e,t,n){super(e,t,n),this.element="annotation"}get code(){if(this.hasAttributesProperty("code"))return this.attributes.get("code")}set code(e){this.attributes.set("code",e)}};const ke=class extends G{constructor(e,t,n){super(e,t,n),this.element="comment"}};const Pe=class extends Y{constructor(e,t,n){super(e,t,n),this.element="parseResult"}get api(){return this.filter(e=>ae(e,["api"])).first}get results(){return this.filter(e=>ae(e,["result"]))}get result(){return this.results.first}get annotations(){return this.filter(e=>"annotation"===e.element)}get warnings(){return this.filter(e=>"annotation"===e.element&&ae(e,["warning"]))}get errors(){return this.filter(e=>"annotation"===e.element&&ae(e,["error"]))}get isEmpty(){return 0===this.reject(e=>"annotation"===e.element).length}replaceResult(e){const{result:t}=this;if(void 0===t)return!1;const n=this._content,r=n.findIndex(e=>e===t);return-1!==r&&(n[r]=e,!0)}},Me=e=>e instanceof Se,_e=e=>e instanceof Ae,Ne=e=>{if(!Z(e))return e;if(ee(e)||te(e)||re(e)||ne(e))return e.toValue();const t=new WeakMap,n=e=>{if(!Z(e))return e;if(ie(e)){if(t.has(e))return t.get(e);const r={};return t.set(e,r),e.forEach((e,t)=>{const s=n(t),i=n(e);"string"==typeof s&&(r[s]=i)}),r}if(se(e)){if(t.has(e))return t.get(e);const r=[];return t.set(e,r),e.forEach(e=>r.push(n(e))),r}return _e(e)?String(e.toValue()):Me(e)?ee(e.href)?e.href.toValue():"":e.toValue()};return n(e)};class Fe{node;key;index;parent;parentPath;inList;#e=!1;#t=!1;#n=!1;#r=!1;#s;#i=!1;constructor(e,t,n,r,s){this.node=e,this.parent=t,this.parentPath=n,this.key=r,this.index=s&&"number"==typeof r?r:void 0,this.inList=s}get shouldSkip(){return this.#e}get shouldStop(){return this.#t}get removed(){return this.#n}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;)e.unshift(t.key),t=t.parentPath;return e}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.#i&&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.#r=!0,this.#s=e,this.node=e}remove(){this.#i&&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.#n=!0}_getReplacementNode(){return this.#s}_wasReplaced(){return this.#r}_reset(){this.#e=!1,this.#t=!1,this.#n=!1,this.#r=!1,this.#s=void 0}_markStale(){this.#i=!0}}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,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,s){return t.apply(this,arguments)};case 5:return function(e,n,r,s,i){return t.apply(this,arguments)};case 6:return function(e,n,r,s,i,o){return t.apply(this,arguments)};case 7:return function(e,n,r,s,i,o,c){return t.apply(this,arguments)};case 8:return function(e,n,r,s,i,o,c,a){return t.apply(this,arguments)};case 9:return function(e,n,r,s,i,o,c,a,u){return t.apply(this,arguments)};case 10:return function(e,n,r,s,i,o,c,a,u,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function $e(e,t,n){return function(){for(var r=[],i=0,o=e,c=0,a=!1;c<t.length||i<arguments.length;){var u;c<t.length&&(!s(t[c])||i>=arguments.length)?u=t[c]:(u=arguments[i],i+=1),r[c]=u,s(u)?a=!0:o-=1,c+=1}return!a&&o<=0?n.apply(this,r):Ve(Math.max(0,o),$e(e,r,n))}}const Ce=g(function(e,t){return 1===e?i(t):Ve(e,$e(e,[],t))});function Ie(e){var t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t}const Re=g(function(e,t){return e&&t});function De(e,t,n){for(var r=0,s=n.length;r<s;)t=e(t,n[r]),r+=1;return t}const Te=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};function Je(e){return"[object String]"===Object.prototype.toString.call(e)}const Le=i(function(e){return!!Te(e)||!!e&&("object"==typeof e&&(!Je(e)&&(0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))});var Be="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function qe(e,t,n){return function(r,s,i){if(Le(i))return e(r,s,i);if(null==i)return s;if("function"==typeof i["fantasy-land/reduce"])return t(r,s,i,"fantasy-land/reduce");if(null!=i[Be])return n(r,s,i[Be]());if("function"==typeof i.next)return n(r,s,i);if("function"==typeof i.reduce)return t(r,s,i,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function We(e,t,n){for(var r=n.next();!r.done;)t=e(t,r.value),r=n.next();return t}function ze(e,t,n,r){return n[r](e,t)}const Ue=qe(De,ze,We);function Ke(e,t,n){return function(){if(0===arguments.length)return n();var r=arguments[arguments.length-1];if(!Te(r)){for(var s=0;s<e.length;){if("function"==typeof r[e[s]])return r[e[s]].apply(r,Array.prototype.slice.call(arguments,0,-1));s+=1}if(function(e){return null!=e&&"function"==typeof e["@@transducer/step"]}(r))return t.apply(null,Array.prototype.slice.call(arguments,0,-1))(r)}return n.apply(this,arguments)}}function Ge(e,t){for(var n=0,r=t.length,s=Array(r);n<r;)s[n]=e(t[n]),n+=1;return s}const He=function(){return this.xf["@@transducer/init"]()},Qe=function(e){return this.xf["@@transducer/result"](e)};var Xe=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=He,e.prototype["@@transducer/result"]=Qe,e.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},e}();const Ye=g(Ke(["fantasy-land/map","map"],function(e){return function(t){return new Xe(e,t)}},function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return Ce(t.length,function(){return e.call(this,t.apply(this,arguments))});case"[object Object]":return De(function(n,r){return n[r]=e(t[r]),n},{},M(t));default:return Ge(e,t)}}));const Ze=g(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(n){return e(n)(t(n))}:Ue(function(e,n){return function(e,t){var n;t=t||[];var r=(e=e||[]).length,s=t.length,i=[];for(n=0;n<r;)i[i.length]=e[n],n+=1;for(n=0;n<s;)i[i.length]=t[n],n+=1;return i}(e,Ye(n,t))},[],e)});const et=g(function(e,t){var n=Ce(e,t);return Ce(e,function(){return De(Ze,Ye(n,arguments[0]),Array.prototype.slice.call(arguments,1))})});const tt=i(function(e){return et(e.length,e)});const nt=g(function(e,t){return Ie(e)?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:tt(Re)(e,t)});function rt(e,t){return function(){return t.call(this,e.apply(this,arguments))}}function st(e){return function t(n,r,o){switch(arguments.length){case 0:return t;case 1:return s(n)?t:g(function(t,r){return e(n,t,r)});case 2:return s(n)&&s(r)?t:s(n)?g(function(t,n){return e(t,r,n)}):s(r)?g(function(t,r){return e(n,t,r)}):i(function(t){return e(n,r,t)});default:return s(n)&&s(r)&&s(o)?t:s(n)&&s(r)?g(function(t,n){return e(t,n,o)}):s(n)&&s(o)?g(function(t,n){return e(t,r,n)}):s(r)&&s(o)?g(function(t,r){return e(n,t,r)}):s(n)?i(function(t){return e(t,r,o)}):s(r)?i(function(t){return e(n,t,o)}):s(o)?i(function(t){return e(n,r,t)}):e(n,r,o)}}}function it(e,t,n){for(var r=0,s=n.length;r<s;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}const ot=g(function(e,t){return Ve(e.length,function(){return e.apply(t,arguments)})});function ct(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function at(e,t,n,r){return e["@@transducer/result"](n[r](ot(e["@@transducer/step"],e),t))}const ut=qe(it,at,ct);var lt=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}();const ft=st(function(e,t,n){return ut("function"==typeof e?new lt(e):e,t,n)});function ht(e,t){return function(){var n=arguments.length;if(0===n)return t();var r=arguments[n-1];return Te(r)||"function"!=typeof r[e]?t.apply(this,arguments):r[e].apply(r,Array.prototype.slice.call(arguments,0,n-1))}}const pt=st(ht("slice",function(e,t,n){return Array.prototype.slice.call(n,e,t)}));const mt=i(ht("tail",pt(1,1/0)));function dt(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return Ve(arguments[0].length,ft(rt,arguments[0],mt(arguments)))}function yt(e,t){return function(e,t,n){var r,s;if("function"==typeof e.indexOf)switch(typeof t){case"number":if(0===t){for(r=1/t;n<e.length;){if(0===(s=e[n])&&1/s===r)return n;n+=1}return-1}if(t!=t){for(;n<e.length;){if("number"==typeof(s=e[n])&&s!=s)return n;n+=1}return-1}return e.indexOf(t,n);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,n);case"object":if(null===t)return e.indexOf(t,n)}for(;n<e.length;){if(V(e[n],t))return n;n+=1}return-1}(t,e,0)>=0}function gt(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 vt=function(e){return(e<10?"0":"")+e};const bt="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+vt(e.getUTCMonth()+1)+"-"+vt(e.getUTCDate())+"T"+vt(e.getUTCHours())+":"+vt(e.getUTCMinutes())+":"+vt(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function Ot(e){return"[object Object]"===Object.prototype.toString.call(e)}var wt=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=He,e.prototype["@@transducer/result"]=Qe,e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.xf["@@transducer/step"](e,t):e},e}();function jt(e){return function(t){return new wt(e,t)}}var Et=g(Ke(["fantasy-land/filter","filter"],jt,function(e,t){return Ot(t)?De(function(n,r){return e(t[r])&&(n[r]=t[r]),n},{},M(t)):(n=t,"[object Map]"===Object.prototype.toString.call(n)?function(e,t){for(var n=new Map,r=t.entries(),s=r.next();!s.done;)e(s.value[1])&&n.set(s.value[0],s.value[1]),s=r.next();return n}(e,t):function(e,t){for(var n=0,r=t.length,s=[];n<r;)e(t[n])&&(s[s.length]=t[n]),n+=1;return s}(e,t));var n}));const St=Et;const At=g(function(e,t){return St((n=e,function(){return!n.apply(this,arguments)}),t);var n});function xt(e,t){var n=function(n){var r=t.concat([e]);return yt(n,r)?"<Circular>":xt(n,r)},r=function(e,t){return Ge(function(t){return gt(t)+": "+n(e[t])},t.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+Ge(n,e).join(", ")+"))";case"[object Array]":return"["+Ge(n,e).concat(r(e,At(function(e){return/^\d+$/.test(e)},M(e)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof e?"new Boolean("+n(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?n(NaN):gt(bt(e)))+")";case"[object Map]":return"new Map("+n(Array.from(e))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof e?"new Number("+n(e.valueOf())+")":1/e==-1/0?"-0":e.toString(10);case"[object Set]":return"new Set("+n(Array.from(e).sort())+")";case"[object String]":return"object"==typeof e?"new String("+n(e.valueOf())+")":gt(e);case"[object Undefined]":return"undefined";default:if("function"==typeof e.toString){var s=e.toString();if("[object Object]"!==s)return s}return"{"+r(e,M(e)).join(", ")+"}"}}const kt=i(function(e){return xt(e,[])});const Pt=g(function(e,t){return e||t});const Mt=g(function(e,t){return Ie(e)?function(){return e.apply(this,arguments)||t.apply(this,arguments)}:tt(Pt)(e,t)});const _t=tt(i(function(e){return!e}));const Nt=V(null);const Ft=_t(Nt);const Vt=g(function(e,t){if(e===t)return t;function n(e,t){if(e>t!=t>e)return t>e?t:e}var r=n(e,t);if(void 0!==r)return r;var s=n(typeof e,typeof t);if(void 0!==s)return s===typeof e?e:t;var i=kt(e),o=n(i,kt(t));return void 0!==o&&o===i?e:t}),$t=Number.isInteger||function(e){return(e|0)===e};const Ct=g(function(e,t){if(null!=t)return $t(e)?o(e,t):t[e]});const It=g(function(e,t){return Ye(Ct(e),t)});const Rt=i(function(e){return Ce(ft(Vt,0,It("length",e)),function(){for(var t=0,n=e.length;t<n;){if(e[t].apply(this,arguments))return!0;t+=1}return!1})});var Dt=function(e,t){switch(arguments.length){case 0:return Dt;case 1:return function t(n){return 0===arguments.length?t:w(e,n)};default:return w(e,t)}};const Tt=Dt;const Jt=Ce(1,dt(_,Tt("GeneratorFunction")));const Lt=Ce(1,dt(_,Tt("AsyncFunction")));const Bt=Rt([dt(_,Tt("Function")),Jt,Lt]);function qt(e){return qt="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},qt(e)}const Wt=function(e){return"object"===qt(e)};const zt=Ce(1,nt(Ft,Mt(Wt,Bt)));const Ut=Ce(1,nt(zt,dt(kt,V("[object Promise]")))),Kt=e=>{const t=e?.element;return void 0===t||"element"===t?"Element":`${t.charAt(0).toUpperCase()}${t.slice(1)}Element`},Gt=e=>Z(e),Ht=e=>Ee(e),Qt=(e,t,n)=>{oe(e)?e.value=n:Array.isArray(e)?e[t]=null===n?void 0:n:null===n?delete e[t]:e[t]=n},Xt=e=>oe(e)?["key","value"]:se(e)||ie(e)?["content"]:[],Yt=(e,t)=>{if(void 0!==e[t])return e[t];const n=t.length;for(const r in e){if(!r.includes("|"))continue;const s=r.indexOf(t);if(-1===s)continue;const i=0===s||"|"===r[s-1],o=s+n===r.length||"|"===r[s+n];if(i&&o)return e[r]}},Zt=(e,t,n)=>{if(void 0===t)return null;const r=e,s=n?"leave":"enter",i=Yt(r,t);if(!n&&"function"==typeof i)return i;if(null!=i){const e=i[s];if("function"==typeof e)return e}const o=r[s];if("function"==typeof o)return o;if(null!=o){const e=Yt(o,t);if("function"==typeof e)return e}return null},en=(e,t={})=>{const{visitFnGetter:n=Zt,nodeTypeGetter:r=Kt,exposeEdits:s=!1}=t,i=Symbol("internal-skip"),o=Symbol("break"),c=new Array(e.length).fill(i);return{enter(t){let a=t.node,u=!1;for(let l=0;l<e.length;l+=1)if(c[l]===i){const i=n(e[l],r(a),!1);if("function"==typeof i){const n=nn(t,a),r=i.call(e[l],n);if(Ut(r))throw new me("Async visitor not supported in sync mode",{visitor:e[l],visitFn:i});if(n.shouldStop){c[l]=o;break}if(n.shouldSkip&&(c[l]=a),n.removed)return void t.remove();if(n._wasReplaced()){const e=n._getReplacementNode();if(!s)return t.replaceWith(e),e;a=e,u=!0}else if(void 0!==r){if(!s)return t.replaceWith(r),r;a=r,u=!0}}}if(u)return t.replaceWith(a),a},leave(t){const s=t.node;for(let a=0;a<e.length;a+=1)if(c[a]===i){const i=n(e[a],r(s),!0);if("function"==typeof i){const n=nn(t,s),r=i.call(e[a],n);if(Ut(r))throw new me("Async visitor not supported in sync mode",{visitor:e[a],visitFn:i});if(n.shouldStop){c[a]=o;break}if(n.removed)return void t.remove();if(n._wasReplaced()){const e=n._getReplacementNode();return t.replaceWith(e),e}if(void 0!==r)return t.replaceWith(r),r}}else c[a]===s&&(c[a]=i)}}},tn=(e,t={})=>{const{visitFnGetter:n=Zt,nodeTypeGetter:r=Kt,exposeEdits:s=!1}=t,i=Symbol("internal-skip"),o=Symbol("break"),c=new Array(e.length).fill(i);return{async enter(t){let a=t.node,u=!1;for(let l=0;l<e.length;l+=1)if(c[l]===i){const i=n(e[l],r(a),!1);if("function"==typeof i){const n=nn(t,a),r=await i.call(e[l],n);if(n.shouldStop){c[l]=o;break}if(n.shouldSkip&&(c[l]=a),n.removed)return void t.remove();if(n._wasReplaced()){const e=n._getReplacementNode();if(!s)return t.replaceWith(e),e;a=e,u=!0}else if(void 0!==r){if(!s)return t.replaceWith(r),r;a=r,u=!0}}}if(u)return t.replaceWith(a),a},async leave(t){const s=t.node;for(let a=0;a<e.length;a+=1)if(c[a]===i){const i=n(e[a],r(s),!0);if("function"==typeof i){const n=nn(t,s),r=await i.call(e[a],n);if(n.shouldStop){c[a]=o;break}if(n.removed)return void t.remove();if(n._wasReplaced()){const e=n._getReplacementNode();return t.replaceWith(e),e}if(void 0!==r)return t.replaceWith(r),r}}else c[a]===s&&(c[a]=i)}}};function nn(e,t){return new Fe(t,e.parent,e.parentPath,e.key,e.inList)}function*rn(e,t,n){const{keyMap:r,state:s,nodeTypeGetter:i,nodePredicate:o,nodeCloneFn:c,detectCycles:a,mutable:u,mutationFn:l}=n,f="function"==typeof r;let h,p,m=Array.isArray(e),d=[e],y=-1,g=[],v=e,b=null,O=null;const w=[];do{y+=1;const e=y===d.length;let n;const j=e&&0!==g.length;if(e){if(n=0===w.length?void 0:b?.key,v=p,p=w.pop(),O=b?.parentPath?.parentPath??null,j)if(u)for(const[e,t]of g)l(v,e,t);else if(m){v=v.slice();let e=0;for(const[t,n]of g){const r=t-e;null===n?(v.splice(r,1),e+=1):v[r]=n}}else{v=c(v);for(const[e,t]of g)v[e]=t}if(void 0!==h){y=h.index,d=h.keys,g=h.edits;const e=h.inArray;if(O=h.parentPath,h=h.prev,j&&!u){const t=e?y:d[y];g.push([t,v])}m=e}}else if(void 0!==p&&(n=m?y:d[y],v=p[n],void 0===v))continue;if(!Array.isArray(v)){if(!o(v))throw new me(`Invalid AST Node: ${String(v)}`,{node:v});if(a&&w.includes(v))continue;b=new Fe(v,p,O,n,m);const r=Zt(t,i(v),e);if(r){for(const[e,n]of Object.entries(s))t[e]=n;const i=yield{visitFn:r,path:b,isLeaving:e};if(b.shouldStop)break;if(b.shouldSkip&&!e)continue;if(b.removed){if(g.push([n,null]),!e)continue}else if(b._wasReplaced()){const t=b._getReplacementNode();if(g.push([n,t]),!e){if(!o(t))continue;v=t}}else if(void 0!==i&&(g.push([n,i]),!e)){if(!o(i))continue;v=i}b._markStale()}}if(!e){if(h={inArray:m,index:y,keys:d,edits:g,parentPath:O,prev:h},m=Array.isArray(v),m)d=v;else if(f)d=r(v);else{const e=i(v);d=void 0!==e?r[e]??[]:[]}y=-1,g=[],void 0!==p&&w.push(p),p=v,O=b}}while(void 0!==h);return 0!==g.length?g.at(-1)[1]:e}en[Symbol.for("nodejs.util.promisify.custom")]=tn;const sn=(e,t,n={})=>{const r=rn(e,t,{keyMap:n.keyMap??Xt,state:n.state??{},nodeTypeGetter:n.nodeTypeGetter??Kt,nodePredicate:n.nodePredicate??Gt,nodeCloneFn:n.nodeCloneFn??Ht,detectCycles:n.detectCycles??!0,mutable:n.mutable??!1,mutationFn:n.mutationFn??Qt});let s=r.next();for(;!s.done;){const e=s.value,n=e.visitFn.call(t,e.path);if(Ut(n))throw new me("Async visitor not supported in sync mode",{visitor:t,visitFn:e.visitFn});s=r.next(n)}return s.value},on=async(e,t,n={})=>{const r=rn(e,t,{keyMap:n.keyMap??Xt,state:n.state??{},nodeTypeGetter:n.nodeTypeGetter??Kt,nodePredicate:n.nodePredicate??Gt,nodeCloneFn:n.nodeCloneFn??Ht,detectCycles:n.detectCycles??!0,mutable:n.mutable??!1,mutationFn:n.mutationFn??Qt});let s=r.next();for(;!s.done;){const e=s.value,n=await e.visitFn.call(t,e.path);s=r.next(n)}return s.value};sn[Symbol.for("nodejs.util.promisify.custom")]=on,Fe.prototype.traverse=function(e,t){return sn(this.node,e,t)},Fe.prototype.traverseAsync=function(e,t){return on(this.node,e,t)};const cn={JSONSchemaDraft4Element:{additionalItems:(...e)=>new q(...e),items:(...e)=>new q(...e),required(...e){const t=new Y(...e);return t.classes.push("json-schema-required"),t},properties(...e){const t=new B(...e);return t.classes.push("json-schema-properties"),t},additionalProperties:(...e)=>new q(...e),patternProperties(...e){const t=new B(...e);return t.classes.push("json-schema-patternProperties"),t},dependencies(...e){const t=new B(...e);return t.classes.push("json-schema-dependencies"),t},enum(...e){const t=new Y(...e);return t.classes.push("json-schema-enum"),t},allOf(...e){const t=new Y(...e);return t.classes.push("json-schema-allOf"),t},anyOf(...e){const t=new Y(...e);return t.classes.push("json-schema-anyOf"),t},oneOf(...e){const t=new Y(...e);return t.classes.push("json-schema-oneOf"),t},not:(...e)=>new q(...e),definitions(...e){const t=new B(...e);return t.classes.push("json-schema-definitions"),t},links(...e){const t=new Y(...e);return t.classes.push("json-schema-links"),t},media:(...e)=>new z(...e)},LinkDescriptionElement:{targetSchema:(...e)=>new q(...e),schema:(...e)=>new q(...e)},"json-schema-properties":{"[key: *]":function(...e){return new q(...e)}},"json-schema-patternProperties":{"[key: *]":function(...e){return new q(...e)}},"json-schema-dependencies":{"[key: *]":function(...e){return new q(...e)}},"json-schema-allOf":{"<*>":function(...e){return new q(...e)}},"json-schema-anyOf":{"<*>":function(...e){return new q(...e)}},"json-schema-oneOf":{"<*>":function(...e){return new q(...e)}},"json-schema-definitions":{"[key: *]":function(...e){return new q(...e)}},"json-schema-links":{"<*>":function(...e){return new U(...e)}}},an=(e,t)=>{const n=Kt(e),r=cn[n]||cn[Ne(e.classes.first)];return void 0===r?void 0:Object.hasOwn(r,"[key: *]")?r["[key: *]"]:r[t]},un=()=>()=>({visitor:{StringElement(e){const t=e.node;if(!(e=>ee(e)&&ae(e,["yaml-e-node","yaml-e-scalar"]))(t))return;const n=e.getAncestorNodes().reverse().filter(Z),r=n.at(-1);let s,i;if(se(r)?(i=t,s=an(r,"<*>")):oe(r)&&(i=n.at(-2),s=an(i,Ne(r.key))),"function"!=typeof s)return;const o=s.call({context:i},void 0,Oe(t.meta),Oe(t.attributes));pe.transfer(t,o),e.replaceWith(o)}}});const ln=g(function(e,t){return De(function(n,r){return n[r]=e(t[r],r,t),n},{},M(t))});const fn=i(function(e){return null==e});var hn=g(function(e,t){if(0===e.length||fn(t))return!1;for(var n=t,r=0;r<e.length;){if(fn(n)||!O(e[r],n))return!1;n=n[e[r]],r+=1}return!0});const pn=hn;var mn=g(function(e,t){return pn([e],t)});const dn=mn;const yn=st(function(e,t,n){return e(Ct(t,n))});function gn(e,t){for(var n=t,r=0;r<e.length;r+=1){if(null==n)return;var s=e[r];n=$t(s)?o(s,n):n[s]}return n}const vn=g(gn);const bn=st(function(e,t,n){return e(gn(t,n))});const On=Ce(1,nt(Ft,Wt));var wn=dt(_,Tt("Object")),jn=dt(kt,V(kt(Object))),En=bn(nt(Bt,jn),["constructor"]);const Sn=Ce(1,function(e){if(!On(e)||!wn(e))return!1;var t=Object.getPrototypeOf(e);return!!Nt(t)||En(t)});const An=Ce(1,dt(_,Tt("String")));const xn=i(function(e){return Ce(e.length,e)});const kn=g(function(e,t){return Ce(e+1,function(){var n=arguments[e];if(null!=n&&Ie(n[t]))return n[t].apply(n,Array.prototype.slice.call(arguments,0,e));throw new TypeError(kt(n)+' does not have a method named "'+t+'"')})});const Pn=kn(1,"split");var Mn=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=He,e.prototype["@@transducer/result"]=Qe,e.prototype["@@transducer/step"]=function(e,t){if(this.f){if(this.f(t))return e;this.f=null}return this.xf["@@transducer/step"](e,t)},e}();function _n(e){return function(t){return new Mn(e,t)}}const Nn=g(Ke(["dropWhile"],_n,function(e,t){for(var n=0,r=t.length;n<r&&e(t[n]);)n+=1;return pt(n,1/0,t)}));const Fn=kn(1,"join");const Vn=i(function(e){return Ce(e.length,function(t,n){var r=Array.prototype.slice.call(arguments,0);return r[0]=n,r[1]=t,e.apply(this,r)})})(g(yt));const $n=xn(function(e,t){return dt(Pn(""),Nn(Vn(e)),Fn(""))(t)}),Cn=new WeakMap;const In=st(function(e,t,n){var r,s={};for(r in n=n||{},t=t||{})O(r,t)&&(s[r]=O(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)O(r,n)&&!O(r,s)&&(s[r]=n[r]);return s});const Rn=st(function e(t,n,r){return In(function(n,r,s){return Ot(r)&&Ot(s)?e(t,r,s):t(n,r,s)},n,r)});const Dn=g(function(e,t){return Rn(function(e,t,n){return n},e,t)});const Tn=g(function(e,t){return null==t||t!=t?e:t});const Jn=st(function(e,t,n){return Tn(e,Ct(t,n))});const Ln=pt(0,-1);const Bn=g(function(e,t){return e.apply(this,t)});const qn=_t(Bt);var Wn=i(function(e){return null!=e&&"function"==typeof e["fantasy-land/empty"]?e["fantasy-land/empty"]():null!=e&&null!=e.constructor&&"function"==typeof e.constructor["fantasy-land/empty"]?e.constructor["fantasy-land/empty"]():null!=e&&"function"==typeof e.empty?e.empty():null!=e&&null!=e.constructor&&"function"==typeof e.constructor.empty?e.constructor.empty():e==Set||e instanceof Set?new Set:e==Map||e instanceof Map?new Map:Te(e)?[]:Je(e)?"":Ot(e)?{}:E(e)?function(){return arguments}():function(e){var t=Object.prototype.toString.call(e);return"[object Uint8ClampedArray]"===t||"[object Int8Array]"===t||"[object Uint8Array]"===t||"[object Int16Array]"===t||"[object Uint16Array]"===t||"[object Int32Array]"===t||"[object Uint32Array]"===t||"[object Float32Array]"===t||"[object Float64Array]"===t||"[object BigInt64Array]"===t||"[object BigUint64Array]"===t}(e)?e.constructor.from(""):void 0});const zn=Wn;const Un=i(function(e){return null!=e&&V(e,zn(e))});const Kn=Ce(1,Bt(Array.isArray)?Array.isArray:dt(_,Tt("Array")));const Gn=nt(Kn,Un);const Hn=Ce(3,function(e,t,n){var r=vn(e,n),s=vn(Ln(e),n);if(!qn(r)&&!Gn(e)){var i=ot(r,s);return Bn(i,t)}});const Qn=class{namespace;constructor(e){this.namespace=e||new this.Namespace}serialise(e){if(!(e instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${e}\` is not an Element instance`);const t={element:e.element};if(e.isMetaEmpty||(t.meta=this.serialiseObject(e.meta)),e.isAttributesEmpty||(t.attributes=this.serialiseObject(e.attributes)),!(e instanceof pe)){const n=pe.from(e);n&&(t.meta||(t.meta={}),t.meta.__mappings__=this.serialise(n))}const n=this.serialiseContent(e.content);return void 0!==n&&(t.content=n),t}deserialise(e){if(!e.element)throw new Error("Given value is not an object containing an element name");const t=new(this.namespace.getElementClass(e.element));let n;t.element!==e.element&&(t.element=e.element);let r=e.meta;if(e.meta?.__mappings__){const{__mappings__:t,...s}=e.meta;n=t,r=Object.keys(s).length>0?s:void 0}if(r&&this.deserialiseObject(r,t.meta),n){this.deserialise(n).applyTo(t)}e.attributes&&this.deserialiseObject(e.attributes,t.attributes);const s=this.deserialiseContent(e.content);return void 0===s&&null!==t.content||(t.content=s),t}serialiseContent(e){if(e instanceof this.namespace.elements.Element)return this.serialise(e);if(e instanceof this.namespace.KeyValuePair){const t=e,n={key:this.serialise(t.key)};return t.value&&(n.value=this.serialise(t.value)),n}if(e&&Array.isArray(e)){if(0===e.length)return;return e.map(e=>this.serialise(e))}return e}deserialiseContent(e){if(e){if(e.element)return this.deserialise(e);if(e.key){const t=new this.namespace.KeyValuePair(this.deserialise(e.key));return e.value&&(t.value=this.deserialise(e.value)),t}if(Array.isArray(e))return e.map(e=>this.deserialise(e))}return e}serialiseObject(e){const t={};if(e.forEach((e,n)=>{e&&(t[n.toValue()]=this.serialise(e))}),0!==Object.keys(t).length)return t}deserialiseObject(e,t){Object.keys(e).forEach(n=>{t.set(n,this.deserialise(e[n]))})}},Xn=e=>null===e,Yn=e=>"string"==typeof e,Zn=e=>"number"==typeof e,er=e=>"boolean"==typeof e,tr=e=>null!==e&&"object"==typeof e;class nr{elementMap={};elementDetection=[];Element;KeyValuePair;_elements;_attributeElementKeys=[];_attributeElementArrayKeys=[];constructor(e){this.Element=D,this.KeyValuePair=$,e&&e.noDefault||this.useDefault()}use(e){return e.namespace&&e.namespace({base:this}),e.load&&e.load({base:this}),this}useDefault(){return this.register("null",Q).register("string",G).register("number",H).register("boolean",X).register("array",Y).register("object",B).register("member",L).register("ref",Ae).register("link",Se).register("sourceMap",pe),this.detect(Xn,Q,!1).detect(Yn,G,!1).detect(Zn,H,!1).detect(er,X,!1).detect(Array.isArray,Y,!1).detect(tr,B,!1),this}register(e,t){return this._elements=void 0,this.elementMap[e]=t,this}unregister(e){return this._elements=void 0,delete this.elementMap[e],this}detect(e,t,n){return void 0===n||n?this.elementDetection.unshift([e,t]):this.elementDetection.push([e,t]),this}toElement(e){if(e instanceof this.Element)return e;let t;for(const[n,r]of this.elementDetection)if(n(e)){t=new r(e);break}return t}getElementClass(e){const t=this.elementMap[e];return void 0===t?this.Element:t}fromRefract(e){return this.serialiser.deserialise(e)}toRefract(e){return this.serialiser.serialise(e)}get elements(){return void 0===this._elements&&(this._elements={Element:this.Element},Object.keys(this.elementMap).forEach(e=>{const t=e[0].toUpperCase()+e.substring(1);this._elements[t]=this.elementMap[e]})),this._elements}get serialiser(){return new Qn(this)}}Qn.prototype.Namespace=nr;const rr=nr,sr=new rr,ir={isElement:Z,isStringElement:ee,isNumberElement:te,isNullElement:ne,isBooleanElement:re,isArrayElement:se,isObjectElement:ie,isMemberElement:oe,isPrimitiveElement:e=>ie(e)&&"object"===e.element||se(e)&&"array"===e.element||re(e)&&"boolean"===e.element||te(e)&&"number"===e.element||ee(e)&&"string"===e.element||ne(e)&&"null"===e.element||oe(e)&&"member"===e.element,isLinkElement:Me,isRefElement:_e,isAnnotationElement:e=>e instanceof xe,isCommentElement:e=>e instanceof ke,isParseResultElement:e=>e instanceof Pe,isSourceMapElement:e=>e instanceof pe,hasElementSourceMap:ce,includesSymbols:(e,t)=>{if(0===t.length)return!0;if(!e.hasAttributesProperty("symbols"))return!1;const n=e.attributes.get("symbols");return!!se(n)&&t.every(e=>n.includes(e))},includesClasses:ae},or={toolboxCreator:()=>({predicates:ir,namespace:sr}),visitorOptions:{exposeEdits:!0}},cr=(e,t,n={})=>{if(0===t.length)return e;const r=Dn(or,n),{toolboxCreator:s,visitorOptions:i}=r,o=s(),c=t.map(e=>e(o)),a=en(c.map(Jn({},"visitor")),i);c.forEach(Hn(["pre"],[]));const u=sn(e,a);return c.forEach(Hn(["post"],[])),u};function ar(e){return void 0===e?new Q:ur(e)}function ur(e){if(e instanceof D)return e;if("string"==typeof e)return new G(e);if("number"==typeof e)return new H(e);if("boolean"==typeof e)return new X(e);if(null===e)return new Q;if(Array.isArray(e))return new Y(e.map(ar));if("object"==typeof e)return new B(e);throw new Error("Cannot refract value of type "+typeof e)}cr[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,n={})=>{if(0===t.length)return e;const r=Dn(or,n),{toolboxCreator:s,visitorOptions:i}=r,o=s(),c=t.map(e=>e(o)),a=tn(c.map(Jn({},"visitor")),i);await Promise.allSettled(c.map(Hn(["pre"],[])));const u=await on(e,a);return await Promise.allSettled(c.map(Hn(["post"],[]))),u},D.prototype.ObjectElement=B,D.prototype.ArrayElement=Y,D.prototype.RefElement=Ae,D.prototype.MemberElement=L,D.prototype.refract=ur;const lr=e=>{const t=e.isMetaEmpty?void 0:Oe(e.meta),n=e.isAttributesEmpty?void 0:Oe(e.attributes);return new e.constructor(void 0,t,n)},fr=(e,t)=>t.clone&&t.isMergeableElement(e)?pr(lr(e),e,t):e,hr={clone:!0,isMergeableElement:e=>ie(e)||se(e),arrayElementMerge:(e,t,n)=>new(0,e.constructor)(e.concat(t).map(e=>fr(e,n))),objectElementMerge:(e,t,n)=>{const r=ie(e)?lr(e):lr(t);return ie(e)&&e.forEach((e,t,s)=>{const i=Ee(s);i.value=fr(e,n),r.content.push(i)}),t.forEach((t,s,i)=>{const o=Ne(s);let c;if(ie(e)&&e.hasKey(o)&&n.isMergeableElement(t)){const r=e.get(o);c=Ee(i),c.value=((e,t)=>{if("function"!=typeof t.customMerge)return pr;const n=t.customMerge(e,t);return"function"==typeof n?n:pr})(s,n)(r,t,n)}else c=Ee(i),c.value=fr(t,n);r.remove(o),r.content.push(c)}),r},customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0},pr=(e,t,n)=>{const r={...hr,...n};r.isMergeableElement=r.isMergeableElement??hr.isMergeableElement,r.arrayElementMerge=r.arrayElementMerge??hr.arrayElementMerge,r.objectElementMerge=r.objectElementMerge??hr.objectElementMerge;const s=se(t);if(!(s===se(e)))return fr(t,r);const i=s&&"function"==typeof r.arrayElementMerge?r.arrayElementMerge(e,t,r):r.objectElementMerge(e,t,r);return i.meta=(e=>"function"!=typeof e.customMetaMerge?e=>Oe(e):e.customMetaMerge)(r)(e.meta,t.meta),i.attributes=(e=>"function"!=typeof e.customAttributesMerge?e=>Oe(e):e.customAttributesMerge)(r)(e.attributes,t.attributes),i};pr.all=(e,t)=>{if(!Array.isArray(e))throw new TypeError("First argument of deepmerge should be an array.");return 0===e.length?new B:e.reduce((e,n)=>pr(e,n,t),lr(e[0]))};const mr=pr;const dr=class{element;constructor(e){Object.assign(this,e)}copyMetaAndAttributes(e,t){if(!e.isMetaEmpty||!t.isMetaEmpty){const n=t.isMetaEmpty?new B:t.meta,r=e.isMetaEmpty?new B:e.meta;t.meta=mr(n,r)}if(!e.isAttributesEmpty||!t.isAttributesEmpty){const n=t.isAttributesEmpty?new B:t.attributes,r=e.isAttributesEmpty?new B:e.attributes;t.attributes=mr(n,r)}pe.transfer(e,t)}};const yr=class extends dr{enter(e){this.element=Oe(e.node),e.stop()}};const gr=i(function(e){return function(){return e}});const vr=gr(void 0);const br=V(vr());const Or=i(function(e){return Ce(ft(Vt,0,It("length",e)),function(){for(var t=0,n=e.length;t<n;){if(!e[t].apply(this,arguments))return!1;t+=1}return!0})});const wr=i(function(e){return!Un(e)});var jr=_t(zt);const Er=Or([An,jr,wr]);const Sr=g(function(e,t){for(var n={},r=0;r<e.length;)e[r]in t&&(n[e[r]]=t[e[r]]),r+=1;return n});const Ar=class extends dr{specObj;passingOptionsNames=["specObj","parent"];constructor({specObj:e,...t}){super({...t}),this.specObj=e}retrievePassingOptions(){return Sr(this.passingOptionsNames,this)}retrieveFixedFields(e){const t=vn(["visitors",...e,"fixedFields"],this.specObj);return"object"==typeof t&&null!==t?Object.keys(t):[]}retrieveVisitor(e){return bn(Bt,["visitors",...e],this.specObj)?vn(["visitors",...e],this.specObj):vn(["visitors",...e,"$visitor"],this.specObj)}retrieveVisitorInstance(e,t={}){const n=this.retrievePassingOptions();return new(this.retrieveVisitor(e))({...n,...t})}toRefractedElement(e,t,n={}){const r=this.retrieveVisitorInstance(e,n);return r instanceof yr&&r?.constructor===yr?Oe(t):(sn(t,r,n),r.element)}};const xr=class extends Ar{specPath;ignoredFields;constructor({specPath:e,ignoredFields:t,...n}){super({...n}),this.specPath=e,this.ignoredFields=t||[]}ObjectElement(e){const t=e.node,n=this.specPath(t),r=this.retrieveFixedFields(n);t.forEach((e,t,s)=>{const i=Ne(t);if(ee(t)&&r.includes(i)&&!this.ignoredFields.includes(i)){const r=this.toRefractedElement([...n,"fixedFields",i],e),o=new L(Oe(t),r);this.copyMetaAndAttributes(s,o),o.classes.push("fixed-field"),this.element.content.push(o)}else this.ignoredFields.includes(i)||this.element.content.push(Oe(s))}),this.copyMetaAndAttributes(t,this.element),e.stop()}},kr=(e,t,n=[])=>{const r=Object.getOwnPropertyDescriptors(t);for(let e of n)delete r[e];Object.defineProperties(e,r)},Pr=(e,t=[e])=>{const n=Object.getPrototypeOf(e);return null===n?t:Pr(n,[...t,n])},Mr=(e,t,n=[])=>{var r;const s=null!==(r=((...e)=>{if(0===e.length)return;let t;const n=e.map(e=>Pr(e));for(;n.every(e=>e.length>0);){const e=n.map(e=>e.pop()),r=e[0];if(!e.every(e=>e===r))break;t=r}return t})(...e))&&void 0!==r?r:Object.prototype,i=Object.create(s),o=Pr(s);for(let t of e){let e=Pr(t);for(let t=e.length-1;t>=0;t--){let r=e[t];-1===o.indexOf(r)&&(kr(i,r,["constructor",...n]),o.push(r))}}return i.constructor=t,i},_r=e=>e.filter((t,n)=>e.indexOf(t)==n),Nr=(e,t)=>{const n=t.map(e=>Pr(e));let r=0,s=!0;for(;s;){s=!1;for(let i=t.length-1;i>=0;i--){const t=n[i][r];if(null!=t&&(s=!0,null!=Object.getOwnPropertyDescriptor(t,e)))return n[i][0]}r++}},Fr=(e,t=Object.prototype)=>new Proxy({},{getPrototypeOf:()=>t,setPrototypeOf(){throw Error("Cannot set prototype of Proxies created by ts-mixer")},getOwnPropertyDescriptor:(t,n)=>Object.getOwnPropertyDescriptor(Nr(n,e)||{},n),defineProperty(){throw new Error("Cannot define new properties on Proxies created by ts-mixer")},has:(n,r)=>void 0!==Nr(r,e)||void 0!==t[r],get:(n,r)=>(Nr(r,e)||t)[r],set(t,n,r){const s=Nr(n,e);if(void 0===s)throw new Error("Cannot set new properties on Proxies created by ts-mixer");return s[n]=r,!0},deleteProperty(){throw new Error("Cannot delete properties on Proxies created by ts-mixer")},ownKeys:()=>e.map(Object.getOwnPropertyNames).reduce((e,t)=>t.concat(e.filter(e=>t.indexOf(e)<0)))}),Vr=null,$r="copy",Cr="copy",Ir="deep",Rr=new WeakMap,Dr=e=>Rr.get(e),Tr=(e,t)=>{var n,r;const s=_r([...Object.getOwnPropertyNames(e),...Object.getOwnPropertyNames(t)]),i={};for(let o of s)i[o]=_r([...null!==(n=null==e?void 0:e[o])&&void 0!==n?n:[],...null!==(r=null==t?void 0:t[o])&&void 0!==r?r:[]]);return i},Jr=(e,t)=>{var n,r,s,i;return{property:Tr(null!==(n=null==e?void 0:e.property)&&void 0!==n?n:{},null!==(r=null==t?void 0:t.property)&&void 0!==r?r:{}),method:Tr(null!==(s=null==e?void 0:e.method)&&void 0!==s?s:{},null!==(i=null==t?void 0:t.method)&&void 0!==i?i:{})}},Lr=(e,t)=>{var n,r,s,i,o,c;return{class:_r([...null!==(n=null==e?void 0:e.class)&&void 0!==n?n:[],...null!==(r=null==t?void 0:t.class)&&void 0!==r?r:[]]),static:Jr(null!==(s=null==e?void 0:e.static)&&void 0!==s?s:{},null!==(i=null==t?void 0:t.static)&&void 0!==i?i:{}),instance:Jr(null!==(o=null==e?void 0:e.instance)&&void 0!==o?o:{},null!==(c=null==t?void 0:t.instance)&&void 0!==c?c:{})}},Br=new Map,qr=(...e)=>{const t=((...e)=>{var t;const n=new Set,r=new Set([...e]);for(;r.size>0;)for(let e of r){const s=[...Pr(e.prototype).map(e=>e.constructor),...null!==(t=Dr(e))&&void 0!==t?t:[]].filter(e=>!n.has(e));for(let e of s)r.add(e);n.add(e),r.delete(e)}return[...n]})(...e).map(e=>Br.get(e)).filter(e=>!!e);return 0==t.length?{}:1==t.length?t[0]:t.reduce((e,t)=>Lr(e,t))},Wr=e=>{let t=Br.get(e);return t||(t={},Br.set(e,t)),t};function zr(...e){var t,n,r;const s=e.map(e=>e.prototype),i=Vr;if(null!==i){const e=s.map(e=>e[i]).filter(e=>"function"==typeof e),t=function(...t){for(let n of e)n.apply(this,t)},n={[i]:t};s.push(n)}function o(...t){for(const n of e)kr(this,new n(...t));null!==i&&"function"==typeof this[i]&&this[i].apply(this,t)}var c,a;o.prototype="copy"===Cr?Mr(s,o):(c=s,a=o,Fr([...c,{constructor:a}])),Object.setPrototypeOf(o,"copy"===$r?Mr(e,null,["prototype"]):Fr(e,Function.prototype));let u=o;if("none"!==Ir){const s="deep"===Ir?qr(...e):((...e)=>{const t=e.map(e=>Wr(e));return 0===t.length?{}:1===t.length?t[0]:t.reduce((e,t)=>Lr(e,t))})(...e);for(let e of null!==(t=null==s?void 0:s.class)&&void 0!==t?t:[]){const t=e(u);t&&(u=t)}Ur(null!==(n=null==s?void 0:s.static)&&void 0!==n?n:{},u),Ur(null!==(r=null==s?void 0:s.instance)&&void 0!==r?r:{},u.prototype)}var l,f;return l=u,f=e,Rr.set(l,f),u}const Ur=(e,t)=>{const n=e.property,r=e.method;if(n)for(let e in n)for(let r of n[e])r(t,e);if(r)for(let e in r)for(let n of r[e])n(t,e,Object.getOwnPropertyDescriptor(t,e))};const Kr=function(){return!1};const Gr=class extends Ar{specPath;ignoredFields;fieldPatternPredicate=Kr;constructor({specPath:e,ignoredFields:t,fieldPatternPredicate:n,...r}){super({...r}),this.specPath=e,this.ignoredFields=t||[],"function"==typeof n&&(this.fieldPatternPredicate=n)}ObjectElement(e){const t=e.node;t.forEach((e,t,n)=>{const r=Ne(t);if(!this.ignoredFields.includes(r)&&this.fieldPatternPredicate(r)){const r=this.specPath(e),s=this.toRefractedElement(r,e),i=new L(Oe(t),s);this.copyMetaAndAttributes(n,i),i.classes.push("patterned-field"),this.element.content.push(i)}else this.ignoredFields.includes(r)||this.element.content.push(Oe(n))}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Hr=class extends Gr{constructor(e){super(e),this.fieldPatternPredicate=Er}};const Qr=class{parent;constructor({parent:e}){this.parent=e}},Xr=zr(xr,Qr,yr),Yr=zr(xr,yr),Zr=zr(xr,yr),es=zr(xr,yr),ts=zr(Ar,Qr,yr),ns=zr(Ar,Qr,yr),rs=zr(Ar,Qr,yr),ss=zr(Ar,Qr,yr),is=zr(Ar,Qr,yr),os=zr(Hr,Qr,yr),cs=zr(Hr,Qr,yr),as=zr(Hr,Qr,yr),us=zr(Hr,Qr,yr),ls=e=>e instanceof q,fs=e=>e instanceof W,hs=e=>e instanceof z,ps=e=>e instanceof U;const ms=class extends Xr{constructor(e){super(e),this.element=new q,this.specPath=gr(["document","objects","JSONSchema"])}get defaultDialectIdentifier(){return"http://json-schema.org/draft-04/schema#"}ObjectElement(e){const t=e.node;return this.handleDialectIdentifier(t),this.handleSchemaIdentifier(t),this.parent=this.element,xr.prototype.ObjectElement.call(this,e)}handleDialectIdentifier(e){if(br(this.parent)&&!ee(e.get("$schema")))this.element.meta.set("inheritedDialectIdentifier",this.defaultDialectIdentifier);else if(ls(this.parent)&&!ee(e.get("$schema"))){const e=Tn(Ne(this.parent.meta.get("inheritedDialectIdentifier")),Ne(this.parent.$schema));this.element.meta.set("inheritedDialectIdentifier",e)}}handleSchemaIdentifier(e,t="id"){const n=void 0!==this.parent?Oe(this.parent.meta.get("ancestorsSchemaIdentifiers")??new Y):new Y,r=Ne(e.get(t));Er(r)&&n.push(r),this.element.meta.set("ancestorsSchemaIdentifiers",n)}},ds=e=>ie(e)&&e.hasKey("$ref");const ys=class extends ss{ObjectElement(e){const t=e.node,n=ds(t)?["document","objects","JSONReference"]:["document","objects","JSONSchema"];this.element=this.toRefractedElement(n,t),e.stop()}ArrayElement(e){const t=e.node;this.element=new Y,this.element.classes.push("json-schema-items"),t.forEach(e=>{const t=ds(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],n=this.toRefractedElement(t,e);this.element.push(n)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const gs=class extends yr{ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-required")}};const vs=class extends us{constructor(e){super(e),this.element=new B,this.element.classes.push("json-schema-properties"),this.specPath=e=>ds(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const bs=class extends as{constructor(e){super(e),this.element=new B,this.element.classes.push("json-schema-patternProperties"),this.specPath=e=>ds(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const Os=class extends cs{constructor(e){super(e),this.element=new B,this.element.classes.push("json-schema-dependencies"),this.specPath=e=>ds(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const ws=class extends yr{ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-enum")}};const js=class extends yr{StringElement(e){super.enter(e),this.element.classes.push("json-schema-type")}ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-type")}};const Es=class extends ts{constructor(e){super(e),this.element=new Y,this.element.classes.push("json-schema-allOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=ds(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],n=this.toRefractedElement(t,e);this.element.push(n)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Ss=class extends ns{constructor(e){super(e),this.element=new Y,this.element.classes.push("json-schema-anyOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=ds(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],n=this.toRefractedElement(t,e);this.element.push(n)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const As=class extends rs{constructor(e){super(e),this.element=new Y,this.element.classes.push("json-schema-oneOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=ds(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],n=this.toRefractedElement(t,e);this.element.push(n)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const xs=class extends os{constructor(e){super(e),this.element=new B,this.element.classes.push("json-schema-definitions"),this.specPath=e=>ds(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const ks=class extends is{constructor(e){super(e),this.element=new Y,this.element.classes.push("json-schema-links")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","LinkDescription"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Ps=class extends Yr{constructor(e){super(e),this.element=new W,this.specPath=gr(["document","objects","JSONReference"])}ObjectElement(e){xr.prototype.ObjectElement.call(this,e),ee(this.element.$ref)&&this.element.classes.push("reference-element")}};const Ms=class extends yr{StringElement(e){super.enter(e),this.element.classes.push("reference-value")}};const _s=function(){return!0};const Ns=st(function(e,t,n){return Ce(Math.max(e.length,t.length,n.length),function(){return e.apply(this,arguments)?t.apply(this,arguments):n.apply(this,arguments)})});const Fs=i(function(e){return function(t,n){return e(t,n)?-1:e(n,t)?1:0}});var Vs=g(function(e,t){return Array.prototype.slice.call(t,0).sort(e)});const $s=Vs;const Cs=i(function(e){return o(0,e)});function Is(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}const Rs=i(Is);const Ds=_t(fn);const Ts=nt(Kn,wr);function Js(e){return function(e){if(Array.isArray(e))return Ls(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Ls(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ls(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ls(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Bs=dt($s(Fs(function(e,t){return e.length>t.length})),Cs,Ct("length")),qs=xn(function(e,t,n){var r=n.apply(void 0,Js(e));return Ds(r)?Rs(r):t});const Ws=Ns(Ts,function(e){var t=Bs(e);return Ce(t,function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ft(qs(n),void 0,e)})},vr);const zs=class extends Ar{alternator;constructor({alternator:e,...t}){super({...t}),this.alternator=e}enter(e){const t=e.node,n=this.alternator.map(({predicate:e,specPath:t})=>Ns(e,gr(t),vr)),r=Ws(n)(t);this.element=this.toRefractedElement(r,t),e.stop()}};const Us=class extends zs{constructor(e){super(e),this.alternator=[{predicate:ds,specPath:["document","objects","JSONReference"]},{predicate:_s,specPath:["document","objects","JSONSchema"]}]}};const Ks=class extends es{constructor(e){super(e),this.element=new z,this.specPath=gr(["document","objects","Media"])}};const Gs=class extends Zr{constructor(e){super(e),this.element=new U,this.specPath=gr(["document","objects","LinkDescription"])}},Hs={visitors:{value:yr,JSONSchemaOrJSONReferenceVisitor:Us,document:{objects:{JSONSchema:{element:"jSONSchemaDraft4",$visitor:ms,fixedFields:{id:{$visitor:yr,alias:"idField"},$schema:{$ref:"#/visitors/value"},multipleOf:{$ref:"#/visitors/value"},maximum:{$ref:"#/visitors/value"},exclusiveMaximum:{$ref:"#/visitors/value"},minimum:{$ref:"#/visitors/value"},exclusiveMinimum:{$ref:"#/visitors/value"},maxLength:{$ref:"#/visitors/value"},minLength:{$ref:"#/visitors/value"},pattern:{$ref:"#/visitors/value"},additionalItems:Us,items:{$visitor:ys,alias:"itemsField"},maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:gs,properties:vs,additionalProperties:Us,patternProperties:bs,dependencies:Os,enum:ws,type:js,allOf:Es,anyOf:Ss,oneOf:As,not:Us,definitions:xs,title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},format:{$ref:"#/visitors/value"},base:{$ref:"#/visitors/value"},links:{$visitor:ks,alias:"linksField"},media:{$ref:"#/visitors/document/objects/Media"},readOnly:{$ref:"#/visitors/value"}}},JSONReference:{element:"jSONReference",$visitor:Ps,fixedFields:{$ref:Ms}},Media:{element:"media",$visitor:Ks,fixedFields:{binaryEncoding:{$ref:"#/visitors/value"},type:{$ref:"#/visitors/value"}}},LinkDescription:{element:"linkDescription",$visitor:Gs,fixedFields:{href:{$ref:"#/visitors/value"},rel:{$ref:"#/visitors/value"},title:{$ref:"#/visitors/value"},targetSchema:Us,mediaType:{$ref:"#/visitors/value"},method:{$ref:"#/visitors/value"},encType:{$ref:"#/visitors/value"},schema:Us}}}}}},Qs=()=>{const e=new rr,t={...r,...n,isStringElement:ee};return e.use(K),{predicates:t,namespace:e}},Xs=(e,{element:t="jSONSchemaDraft4",plugins:n=[],specificationObj:r=Hs}={})=>{const s=ur(e),i=(e=>{if(Cn.has(e))return Cn.get(e);const t={},n=(e,r,s)=>("string"==typeof e.element&&(t[e.element]=e.$visitor?[...s,"$visitor"]:s),ln((e,t)=>{const i=[...s,t];if(Sn(e)&&dn("$ref",e)&&yn(An,"$ref",e)){const t=vn(["$ref"],e),n=$n("#/",t);return vn(n.split("/"),r)}return Sn(e)?n(e,r,i):e},e)),r=n(e,e,[]);return r.elementMap=t,Cn.set(e,r),r})(r),o=i.elementMap[t];if(!o)throw new Error(`Unknown element type: "${t}"`);const c=new(vn(o,i))({specObj:i});return sn(s,c),cr(c.element,n,{toolboxCreator:Qs})},Ys=(e,t={})=>Xs(e,{...t,element:"jSONSchemaDraft4"}),Zs=(e,t={})=>Xs(e,{...t,element:"jSONReference"}),ei=(e,t={})=>Xs(e,{...t,element:"media"}),ti=(e,t={})=>Xs(e,{...t,element:"linkDescription"}),ni=Xs;return 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.apidomNsJSONSchemaDraft4=t():e.apidomNsJSONSchemaDraft4=t()}(self,()=>(()=>{"use strict";var e={d:(t,s)=>{for(var n in s)e.o(s,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:s[n]})},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={};e.r(t),e.d(t,{AllOfVisitorBase:()=>mr,AlternatingVisitor:()=>ii,AnyOfVisitorBase:()=>yr,DefinitionsVisitorBase:()=>wr,DependenciesVisitorBase:()=>vr,FallbackVisitor:()=>Mn,FixedFieldsVisitor:()=>$n,ItemsVisitor:()=>Mr,ItemsVisitorBase:()=>xr,JSONReferenceElement:()=>H,JSONReferenceVisitorBase:()=>hr,JSONSchemaDraft4MediaTypes:()=>m,JSONSchemaElement:()=>U,JSONSchemaVisitor:()=>Ir,JSONSchemaVisitorBase:()=>pr,LinkDescriptionElement:()=>J,LinkDescriptionVisitor:()=>ai,LinkDescriptionVisitorBase:()=>dr,LinksVisitorBase:()=>br,MapVisitor:()=>lr,MediaElement:()=>G,MediaVisitorBase:()=>fr,OneOfVisitorBase:()=>gr,ParentSchemaAwareVisitor:()=>ur,PatternPropertiesVisitorBase:()=>kr,PatternedFieldsVisitor:()=>ar,PropertiesVisitorBase:()=>Or,SpecificationVisitor:()=>Ln,Visitor:()=>Tn,default:()=>z,isJSONReferenceElement:()=>Sr,isJSONReferenceLikeElement:()=>Tr,isJSONSchemaElement:()=>Er,isLinkDescriptionElement:()=>jr,isMediaElement:()=>Ar,mediaTypes:()=>y,refract:()=>yi,refractJSONReference:()=>di,refractJSONSchema:()=>hi,refractLinkDescription:()=>mi,refractMedia:()=>fi,refractorPluginReplaceEmptyElement:()=>ks,specificationObj:()=>li});var s={};e.r(s),e.d(s,{isJSONReferenceElement:()=>Sr,isJSONSchemaElement:()=>Er,isLinkDescriptionElement:()=>jr,isMediaElement:()=>Ar});var n={};function r(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function i(e){return function t(s){return 0===arguments.length||r(s)?t:e.apply(this,arguments)}}function o(e,t){return t[e<0?t.length+e:e]}e.r(n),e.d(n,{isJSONReferenceLikeElement:()=>Tr});const c=i(function(e){return o(-1,e)});class a extends AggregateError{constructor(e,t,s){super(e,t,s),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const l=a;class u extends Error{static[Symbol.hasInstance](e){return super[Symbol.hasInstance](e)||Function.prototype[Symbol.hasInstance].call(l,e)}constructor(e,t){super(e,t),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const p=u;const h=class extends p{};const d=class extends h{};const f=class extends Array{unknownMediaType="application/octet-stream";filterByFormat(){throw new d("filterByFormat method in MediaTypes class is not yet implemented.")}findBy(){throw new d("findBy method in MediaTypes class is not yet implemented.")}latest(){throw new d("latest method in MediaTypes class is not yet implemented.")}};class m extends f{filterByFormat(e="generic"){const t="generic"===e?"schema;version":e;return this.filter(e=>e.includes(t))}findBy(e="draft-04",t="generic"){const s="generic"===t?`schema;version=${e}`:`schema+${t};version=${e}`;return this.find(e=>e.includes(s))||this.unknownMediaType}latest(e="generic"){return c(this.filterByFormat(e))}}const y=new m("application/schema;version=draft-04","application/schema+json;version=draft-04","application/schema+yaml;version=draft-04");function g(e){return function t(s,n){switch(arguments.length){case 0:return t;case 1:return r(s)?t:i(function(t){return e(s,t)});default:return r(s)&&r(n)?t:r(s)?i(function(t){return e(t,n)}):r(n)?i(function(t){return e(s,t)}):e(s,n)}}}function x(e){for(var t,s=[];!(t=e.next()).done;)s.push(t.value);return s}function b(e,t,s){for(var n=0,r=s.length;n<r;){if(e(t,s[n]))return!0;n+=1}return!1}function w(e,t){return Object.prototype.hasOwnProperty.call(t,e)}const v="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var k=Object.prototype.toString;const O=function(){return"[object Arguments]"===k.call(arguments)?function(e){return"[object Arguments]"===k.call(e)}:function(e){return w("callee",e)}}();var E=!{toString:null}.propertyIsEnumerable("toString"),S=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],A=function(){return arguments.propertyIsEnumerable("length")}(),j=function(e,t){for(var s=0;s<e.length;){if(e[s]===t)return!0;s+=1}return!1},I="function"!=typeof Object.keys||A?i(function(e){if(Object(e)!==e)return[];var t,s,n=[],r=A&&O(e);for(t in e)!w(t,e)||r&&"length"===t||(n[n.length]=t);if(E)for(s=S.length-1;s>=0;)w(t=S[s],e)&&!j(n,t)&&(n[n.length]=t),s-=1;return n}):i(function(e){return Object(e)!==e?[]:Object.keys(e)});const T=I;const M=i(function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function C(e,t,s,n){var r=x(e);function i(e,t){return F(e,t,s.slice(),n.slice())}return!b(function(e,t){return!b(i,t,e)},x(t),r)}function F(e,t,s,n){if(v(e,t))return!0;var r,i,o=M(e);if(o!==M(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(o){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(r=e.constructor,null==(i=String(r).match(/^function (\w*)/))?"":i[1]))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!v(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!v(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 c=s.length-1;c>=0;){if(s[c]===e)return n[c]===t;c-=1}switch(o){case"Map":return e.size===t.size&&C(e.entries(),t.entries(),s.concat([e]),n.concat([t]));case"Set":return e.size===t.size&&C(e.values(),t.values(),s.concat([e]),n.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 a=T(e);if(a.length!==T(t).length)return!1;var l=s.concat([e]),u=n.concat([t]);for(c=a.length-1;c>=0;){var p=a[c];if(!w(p,t)||!F(t[p],e[p],l,u))return!1;c-=1}return!0}const P=g(function(e,t){return F(e,t,[],[])});const N=class{key;value;constructor(e,t){this.key=e,this.value=t}toValue(){return{key:this.key?.toValue(),value:this.value?.toValue()}}};class D{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(s=>{const n=s.value,r=s.key;if(void 0===n||void 0===r)throw new Error("MemberElement must have both key and value");return void 0!==t?e.call(t,n,r,s):e(n,r,s)})}filter(e,t){const s=this.elements.filter(s=>{const n=s.value,r=s.key;return void 0!==n&&void 0!==r&&(void 0!==t?e.call(t,n,r,s):e(n,r,s))});return new D(s)}reject(e,t){const s=[];for(const n of this.elements){const r=n.value,i=n.key;void 0!==r&&void 0!==i&&(e.call(t,r,i,n)||s.push(n))}return new D(s)}forEach(e,t){this.elements.forEach((s,n)=>{const r=s.value,i=s.key;void 0!==r&&void 0!==i&&(void 0!==t?e.call(t,r,i,s,n):e(r,i,s,n))})}find(e,t){return this.elements.find(s=>{const n=s.value,r=s.key;return void 0!==n&&void 0!==r&&(void 0!==t?e.call(t,n,r,s):e(n,r,s))})}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 B=D;class _{parent;startLine;startCharacter;startOffset;endLine;endCharacter;endOffset;_storedElement="element";_content;_meta;_attributes;constructor(e,t,s){void 0!==t&&(this.meta=t),void 0!==s&&(this.attributes=s),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 _)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 N)this._content=e;else if(e instanceof B)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 _?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 _?this._attributes=e:this.attributes.set(e??{})}get id(){return this.getMetaProperty("id","")}set id(e){this.setMetaProperty("id",e)}get classes(){return this.getMetaProperty("classes",[])}set classes(e){this.setMetaProperty("classes",e)}get links(){return this.getMetaProperty("links",[])}set links(e){this.setMetaProperty("links",e)}get children(){const{_content:e}=this;if(Array.isArray(e))return e;if(e instanceof N){const t=[];return e.key&&t.push(e.key),e.value&&t.push(e.value),t}return e instanceof _?[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 _||e instanceof N?e.toValue():Array.isArray(e)?e.map(e=>e.toValue()):e}equals(e){return P(this.toValue(),e)}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 s=new this.RefElement(t);return"string"==typeof e&&(s.path=this.refract(e)),s}getMetaProperty(e,t){if(!this.meta.hasKey(e)){if(this.isFrozen){const e=this.refract(t);return e.freeze(),e}this.meta.set(e,t)}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 q=_;class L extends q{constructor(e,t,s){super(e||[],t,s)}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 s=t||{},n=!!s.recursive,r=void 0===s.results?[]:s.results;for(let t=0;t<this._content.length;t+=1){const s=this._content[t],i=s;n&&"function"==typeof i.findElements&&i.findElements(e,{results:r,recursive:n}),e(s,t,void 0)&&r.push(s)}return r}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 s=t.classes;return"function"==typeof s.includes&&s.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 $=L;const R=class extends q{constructor(e,t,s,n){super(new N,s,n),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 V=class extends ${constructor(e,t,s){super(e||[],t,s),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(s=>s.key.toValue()!==e||(t=s,!1)),t}getKey(e){const t=this.getMember(e);if(t)return t.key}set(e,t){if("string"==typeof e){const s=this.getMember(e);s?s.value=t:this._content.push(new R(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(s=>e.call(t,s.value,s.key,s))}compactMap(e,t){const s=[];return this.forEach((n,r,i)=>{const o=e.call(t,n,r,i);o&&s.push(o)}),s}filter(e,t){return new B(this._content).filter(e,t)}reject(e,t){const s=[];for(const n of this._content)e.call(t,n.value,n.key,n)||s.push(n);return new B(s)}forEach(e,t){this._content.forEach(s=>e.call(t,s.value,s.key,s))}reduce(e,t){let s,n;void 0!==t?(s=0,n=this.refract(t)):(s=1,n=this._content[0]?.value);for(let t=s;t<this._content.length;t+=1){const s=this._content[t],r=e(n,s.value,s.key,s,this);n=void 0===r?r:this.refract(r)}return n}empty(){return new this.constructor([])}};const U=class extends V{constructor(e,t,s){super(e,t,s),this.element="JSONSchemaDraft4"}get idField(){return this.get("id")}set idField(e){this.set("id",e)}get $schema(){return this.get("$schema")}set $schema(e){this.set("$schema",e)}get multipleOf(){return this.get("multipleOf")}set multipleOf(e){this.set("multipleOf",e)}get maximum(){return this.get("maximum")}set maximum(e){this.set("maximum",e)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(e){this.set("exclusiveMaximum",e)}get minimum(){return this.get("minimum")}set minimum(e){this.set("minimum",e)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(e){this.set("exclusiveMinimum",e)}get maxLength(){return this.get("maxLength")}set maxLength(e){this.set("maxLength",e)}get minLength(){return this.get("minLength")}set minLength(e){this.set("minLength",e)}get pattern(){return this.get("pattern")}set pattern(e){this.set("pattern",e)}get additionalItems(){return this.get("additionalItems")}set additionalItems(e){this.set("additionalItems",e)}get itemsField(){return this.get("items")}set itemsField(e){this.set("items",e)}get maxItems(){return this.get("maxItems")}set maxItems(e){this.set("maxItems",e)}get minItems(){return this.get("minItems")}set minItems(e){this.set("minItems",e)}get uniqueItems(){return this.get("uniqueItems")}set uniqueItems(e){this.set("uniqueItems",e)}get maxProperties(){return this.get("maxProperties")}set maxProperties(e){this.set("maxProperties",e)}get minProperties(){return this.get("minProperties")}set minProperties(e){this.set("minProperties",e)}get required(){return this.get("required")}set required(e){this.set("required",e)}get properties(){return this.get("properties")}set properties(e){this.set("properties",e)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(e){this.set("additionalProperties",e)}get patternProperties(){return this.get("patternProperties")}set patternProperties(e){this.set("patternProperties",e)}get dependencies(){return this.get("dependencies")}set dependencies(e){this.set("dependencies",e)}get enum(){return this.get("enum")}set enum(e){this.set("enum",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}get allOf(){return this.get("allOf")}set allOf(e){this.set("allOf",e)}get anyOf(){return this.get("anyOf")}set anyOf(e){this.set("anyOf",e)}get oneOf(){return this.get("oneOf")}set oneOf(e){this.set("oneOf",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get definitions(){return this.get("definitions")}set definitions(e){this.set("definitions",e)}get title(){return this.get("title")}set title(e){this.set("title",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get default(){return this.get("default")}set default(e){this.set("default",e)}get format(){return this.get("format")}set format(e){this.set("format",e)}get base(){return this.get("base")}set base(e){this.set("base",e)}get linksField(){return this.get("links")}set linksField(e){this.set("links",e)}get media(){return this.get("media")}set media(e){this.set("media",e)}get readOnly(){return this.get("readOnly")}set readOnly(e){this.set("readOnly",e)}};const H=class extends V{constructor(e,t,s){super(e,t,s),this.element="JSONReference",this.classes.push("json-reference")}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}};const G=class extends V{constructor(e,t,s){super(e,t,s),this.element="media"}get binaryEncoding(){return this.get("binaryEncoding")}set binaryEncoding(e){this.set("binaryEncoding",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}};const J=class extends V{constructor(e,t,s){super(e,t,s),this.element="linkDescription"}get href(){return this.get("href")}set href(e){this.set("href",e)}get rel(){return this.get("rel")}set rel(e){this.set("rel",e)}get title(){return this.get("title")}set title(e){this.set("title",e)}get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get mediaType(){return this.get("mediaType")}set mediaType(e){this.set("mediaType",e)}get method(){return this.get("method")}set method(e){this.set("method",e)}get encType(){return this.get("encType")}set encType(e){this.set("encType",e)}get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}},z={namespace:e=>{const{base:t}=e;return t.register("jSONSchemaDraft4",U),t.register("jSONReference",H),t.register("media",G),t.register("linkDescription",J),t}};const X=class extends q{constructor(e,t,s){super(e,t,s),this.element="string"}primitive(){return"string"}get length(){return this.content?.length??0}};const W=class extends q{constructor(e,t,s){super(e,t,s),this.element="number"}primitive(){return"number"}};const Y=class extends q{constructor(e,t,s){super(e??null,t,s),this.element="null"}primitive(){return"null"}set(e){throw new Error("Cannot set the value of null")}};const K=class extends q{constructor(e,t,s){super(e,t,s),this.element="boolean"}primitive(){return"boolean"}};const Z=class extends ${constructor(e,t,s){super(e||[],t,s),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 s=[];for(const n of this._content){const r=e.call(t,n);r&&s.push(r)}return s}filter(e,t){const s=this._content.filter(e,t);return new this.constructor(s)}reject(e,t){const s=[];for(const n of this._content)e.call(t,n)||s.push(n);return new this.constructor(s)}reduce(e,t){let s,n;void 0!==t?(s=0,n=this.refract(t)):(s=1,n=this.first);for(let t=s;t<this.length;t+=1){const s=e(n,this._content[t],t,this);n=void 0===s?s:this.refract(s)}return n}forEach(e,t){this._content.forEach((s,n)=>{e.call(t,s,n)})}empty(){return new this.constructor([])}},Q=e=>e instanceof q,ee=e=>e instanceof X,te=e=>e instanceof W,se=e=>e instanceof Y,ne=e=>e instanceof K,re=e=>e instanceof Z,ie=e=>e instanceof V,oe=e=>e instanceof R,ce=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,ae=(e,t)=>0===t.length||!!Q(e)&&(!e.isMetaEmpty&&(!!e.hasMetaProperty("classes")&&t.every(t=>e.classes.includes(t))));class le extends X{constructor(e,t,s){super(e,t,s),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:s,startOffset:n,endLine:r,endCharacter:i,endOffset:o}=e;if("number"!=typeof t||"number"!=typeof s||"number"!=typeof n||"number"!=typeof r||"number"!=typeof i||"number"!=typeof o)return;const c="sm1:"+[t,s,n,r,i,o].map(pe).join("");const a=new le(c);return a.startLine=t,a.startCharacter=s,a.startOffset=n,a.endLine=r,a.endCharacter=i,a.endOffset=o,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,s=[];let n=0;for(let e=0;e<6;e++){const e=he(t,n);s.push(e.value),n=e.next}return s}(this.content))}}const ue="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function pe(e){let t=e>>>0,s="";do{let e=31&t;t>>>=5,0!==t&&(e|=32),s+=ue[e]}while(0!==t);return s}function he(e,t=0){let s=0,n=0,r=t;for(;;){const t=e[r++],i=ue.indexOf(t);if(-1===i)throw new Error(`Invalid Base64 VLQ char: ${t}`);if(s|=(31&i)<<n,n+=5,!!!(32&i))break}return{value:s>>>0,next:r}}const de=le;const fe=class extends p{constructor(e,t){if(super(e,t),null!=t&&"object"==typeof t){const{cause:e,...s}=t;Object.assign(this,s)}}};const me=class extends fe{value;constructor(e,t){super(e,t),void 0!==t&&(this.value=t.value)}};const ye=class extends me{};const ge=class extends me{},xe=(e,t)=>{const{visited:s=new WeakMap}=t,n={...t,visited:s};if(s.has(e))return s.get(e);const r=ke(e);s.set(e,r);const{content:i}=e;return Array.isArray(i)?r.content=i.map(e=>xe(e,n)):Q(i)?r.content=xe(i,n):r.content=i instanceof N?be(i,n):i,r},be=(e,t)=>{const{visited:s=new WeakMap}=t,n={...t,visited:s};if(s.has(e))return s.get(e);const{key:r,value:i}=e,o=void 0!==r?xe(r,n):void 0,c=void 0!==i?xe(i,n):void 0,a=new N(o,c);return s.set(e,a),a},we=(e,t={})=>{if(e instanceof N)return be(e,t);if(e instanceof B)return((e,t)=>{const{visited:s=new WeakMap}=t,n={...t,visited:s};if(s.has(e))return s.get(e);const r=[...e].map(e=>xe(e,n)),i=new B(r);return s.set(e,i),i})(e,t);if(Q(e))return xe(e,t);throw new ye("Value provided to cloneDeep function couldn't be cloned",{value:e})};we.safe=e=>{try{return we(e)}catch{return e}};const ve=e=>{const{key:t,value:s}=e;return new N(t,s)},ke=e=>{const t=new(0,e.constructor);t.element=e.element,e.isMetaEmpty||(t.meta=we(e.meta)),e.isAttributesEmpty||(t.attributes=we(e.attributes)),ce(e)&&de.transfer(e,t);const{content:s}=e;return Q(s)?t.content=ke(s):Array.isArray(s)?t.content=[...s]:t.content=s instanceof N?ve(s):s,t},Oe=e=>{if(e instanceof N)return ve(e);if(e instanceof B)return(e=>{const t=[...e];return new B(t)})(e);if(Q(e))return ke(e);throw new ge("Value provided to cloneShallow function couldn't be cloned",{value:e})};Oe.safe=e=>{try{return Oe(e)}catch{return e}};const Ee=class extends q{constructor(e,t,s){super(e||[],t,s),this.element="link"}get relation(){if(this.hasAttributesProperty("relation"))return this.attributes.get("relation")}set relation(e){this.attributes.set("relation",e)}get href(){if(this.hasAttributesProperty("href"))return this.attributes.get("href")}set href(e){this.attributes.set("href",e)}};const Se=class extends q{constructor(e,t,s){super(e||[],t,s),this.element="ref",this.path||(this.path="element")}get path(){if(this.hasAttributesProperty("path"))return this.attributes.get("path")}set path(e){this.attributes.set("path",e)}};const Ae=class extends X{constructor(e,t,s){super(e,t,s),this.element="annotation"}get code(){if(this.hasAttributesProperty("code"))return this.attributes.get("code")}set code(e){this.attributes.set("code",e)}};const je=class extends X{constructor(e,t,s){super(e,t,s),this.element="comment"}};const Ie=class extends Z{constructor(e,t,s){super(e,t,s),this.element="parseResult"}get api(){return this.filter(e=>ae(e,["api"])).first}get results(){return this.filter(e=>ae(e,["result"]))}get result(){return this.results.first}get annotations(){return this.filter(e=>"annotation"===e.element)}get warnings(){return this.filter(e=>"annotation"===e.element&&ae(e,["warning"]))}get errors(){return this.filter(e=>"annotation"===e.element&&ae(e,["error"]))}get isEmpty(){return 0===this.reject(e=>"annotation"===e.element).length}replaceResult(e){const{result:t}=this;if(void 0===t)return!1;const s=this._content,n=s.findIndex(e=>e===t);return-1!==n&&(s[n]=e,!0)}},Te=e=>e instanceof Ee,Me=e=>e instanceof Se,Ce=e=>{if(!Q(e))return e;if(ee(e)||te(e)||ne(e)||se(e))return e.toValue();const t=new WeakMap,s=e=>{if(!Q(e))return e;if(ie(e)){if(t.has(e))return t.get(e);const n={};return t.set(e,n),e.forEach((e,t)=>{const r=s(t),i=s(e);"string"==typeof r&&(n[r]=i)}),n}if(re(e)){if(t.has(e))return t.get(e);const n=[];return t.set(e,n),e.forEach(e=>n.push(s(e))),n}return Me(e)?String(e.toValue()):Te(e)?ee(e.href)?e.href.toValue():"":e.toValue()};return s(e)},Fe=function(){const e=Ne,t=Pe,s=this,n="parser.js: Parser(): ";s.ast=void 0,s.stats=void 0,s.trace=void 0,s.callbacks=[];let r,i,o,c,a,l,u,p=0,h=0,d=0,f=0,m=0,y=new function(){this.state=e.ACTIVE,this.phraseLength=0,this.refresh=()=>{this.state=e.ACTIVE,this.phraseLength=0}};s.parse=(g,x,w,v)=>{const k=`${n}parse(): `;p=0,h=0,d=0,f=0,m=0,r=void 0,i=void 0,o=void 0,c=void 0,y.refresh(),a=void 0,l=void 0,u=void 0,c=t.stringToChars(w),r=g.rules,i=g.udts;const O=x.toLowerCase();let E;for(const e in r)if(r.hasOwnProperty(e)&&O===r[e].lower){E=r[e].index;break}if(void 0===E)throw new Error(`${k}start rule name '${startRule}' not recognized`);(()=>{const e=`${n}initializeCallbacks(): `;let t,o;for(a=[],l=[],t=0;t<r.length;t+=1)a[t]=void 0;for(t=0;t<i.length;t+=1)l[t]=void 0;const c=[];for(t=0;t<r.length;t+=1)c.push(r[t].lower);for(t=0;t<i.length;t+=1)c.push(i[t].lower);for(const n in s.callbacks)if(s.callbacks.hasOwnProperty(n)){if(t=c.indexOf(n.toLowerCase()),t<0)throw new Error(`${e}syntax callback '${n}' not a rule or udt name`);if(o=s.callbacks[n]?s.callbacks[n]:void 0,"function"!=typeof o&&void 0!==o)throw new Error(`${e}syntax callback[${n}] must be function reference or falsy)`);t<r.length?a[t]=o:l[t-r.length]=o}})(),s.trace&&s.trace.init(r,i,c),s.stats&&s.stats.init(r,i),s.ast&&s.ast.init(r,i,c),u=v,o=[{type:e.RNM,index:E}],b(0,0),o=void 0;let S=!1;switch(y.state){case e.ACTIVE:throw new Error(`${k}final state should never be 'ACTIVE'`);case e.NOMATCH:S=!1;break;case e.EMPTY:case e.MATCH:S=y.phraseLength===c.length;break;default:throw new Error("unrecognized state")}return{success:S,state:y.state,stateName:e.idName(y.state),length:c.length,matched:y.phraseLength,maxMatched:m,maxTreeDepth:d,nodeHits:f}};const g=(t,s,r,i)=>{if(s.phraseLength>r){let e=`${n}opRNM(${t.name}): callback function error: `;throw e+=`sysData.phraseLength: ${s.phraseLength}`,e+=` must be <= remaining chars: ${r}`,new Error(e)}switch(s.state){case e.ACTIVE:if(!i)throw new Error(`${n}opRNM(${t.name}): callback function return error. ACTIVE state not allowed.`);break;case e.EMPTY:s.phraseLength=0;break;case e.MATCH:0===s.phraseLength&&(s.state=e.EMPTY);break;case e.NOMATCH:s.phraseLength=0;break;default:throw new Error(`${n}opRNM(${t.name}): callback function return error. Unrecognized return state: ${s.state}`)}},x=(t,a)=>{let h,d,f;const m=o[t],g=i[m.index];y.UdtIndex=g.index,p||(f=s.ast&&s.ast.udtDefined(m.index),f&&(d=r.length+m.index,h=s.ast.getLength(),s.ast.down(d,g.name)));const x=c.length-a;l[m.index](y,c,a,u),((t,s,r)=>{if(s.phraseLength>r){let e=`${n}opUDT(${t.name}): callback function error: `;throw e+=`sysData.phraseLength: ${s.phraseLength}`,e+=` must be <= remaining chars: ${r}`,new Error(e)}switch(s.state){case e.ACTIVE:throw new Error(`${n}opUDT(${t.name}) ACTIVE state return not allowed.`);case e.EMPTY:if(!t.empty)throw new Error(`${n}opUDT(${t.name}) may not return EMPTY.`);s.phraseLength=0;break;case e.MATCH:if(0===s.phraseLength){if(!t.empty)throw new Error(`${n}opUDT(${t.name}) may not return EMPTY.`);s.state=e.EMPTY}break;case e.NOMATCH:s.phraseLength=0;break;default:throw new Error(`${n}opUDT(${t.name}): callback function return error. Unrecognized return state: ${s.state}`)}})(g,y,x),p||f&&(y.state===e.NOMATCH?s.ast.setLength(h):s.ast.up(d,g.name,a,y.phraseLength))},b=(t,i)=>{const l=`${n}opExecute(): `,w=o[t];switch(f+=1,h>d&&(d=h),h+=1,y.refresh(),s.trace&&s.trace.down(w,i),w.type){case e.ALT:((t,s)=>{const n=o[t];for(let t=0;t<n.children.length&&(b(n.children[t],s),y.state===e.NOMATCH);t+=1);})(t,i);break;case e.CAT:((t,n)=>{let r,i,c,a;const l=o[t];s.ast&&(i=s.ast.getLength()),r=!0,c=n,a=0;for(let t=0;t<l.children.length;t+=1){if(b(l.children[t],c),y.state===e.NOMATCH){r=!1;break}c+=y.phraseLength,a+=y.phraseLength}r?(y.state=0===a?e.EMPTY:e.MATCH,y.phraseLength=a):(y.state=e.NOMATCH,y.phraseLength=0,s.ast&&s.ast.setLength(i))})(t,i);break;case e.REP:((t,n)=>{let r,i,a,l;const u=o[t];if(0===u.max)return y.state=e.EMPTY,void(y.phraseLength=0);for(i=n,a=0,l=0,s.ast&&(r=s.ast.getLength());!(i>=c.length)&&(b(t+1,i),y.state!==e.NOMATCH)&&y.state!==e.EMPTY&&(l+=1,a+=y.phraseLength,i+=y.phraseLength,l!==u.max););y.state===e.EMPTY||l>=u.min?(y.state=0===a?e.EMPTY:e.MATCH,y.phraseLength=a):(y.state=e.NOMATCH,y.phraseLength=0,s.ast&&s.ast.setLength(r))})(t,i);break;case e.RNM:((t,n)=>{let i,l,h;const d=o[t],f=r[d.index],m=a[f.index];if(p||(l=s.ast&&s.ast.ruleDefined(d.index),l&&(i=s.ast.getLength(),s.ast.down(d.index,r[d.index].name))),m){const t=c.length-n;m(y,c,n,u),g(f,y,t,!0),y.state===e.ACTIVE&&(h=o,o=f.opcodes,b(0,n),o=h,m(y,c,n,u),g(f,y,t,!1))}else h=o,o=f.opcodes,b(0,n,y),o=h;p||l&&(y.state===e.NOMATCH?s.ast.setLength(i):s.ast.up(d.index,f.name,n,y.phraseLength))})(t,i);break;case e.TRG:((t,s)=>{const n=o[t];y.state=e.NOMATCH,s<c.length&&n.min<=c[s]&&c[s]<=n.max&&(y.state=e.MATCH,y.phraseLength=1)})(t,i);break;case e.TBS:((t,s)=>{const n=o[t],r=n.string.length;if(y.state=e.NOMATCH,s+r<=c.length){for(let e=0;e<r;e+=1)if(c[s+e]!==n.string[e])return;y.state=e.MATCH,y.phraseLength=r}})(t,i);break;case e.TLS:((t,s)=>{let n;const r=o[t];y.state=e.NOMATCH;const i=r.string.length;if(0!==i){if(s+i<=c.length){for(let e=0;e<i;e+=1)if(n=c[s+e],n>=65&&n<=90&&(n+=32),n!==r.string[e])return;y.state=e.MATCH,y.phraseLength=i}}else y.state=e.EMPTY})(t,i);break;case e.UDT:x(t,i);break;case e.AND:((t,s)=>{switch(p+=1,b(t+1,s),p-=1,y.phraseLength=0,y.state){case e.EMPTY:case e.MATCH:y.state=e.EMPTY;break;case e.NOMATCH:y.state=e.NOMATCH;break;default:throw new Error(`opAND: invalid state ${y.state}`)}})(t,i);break;case e.NOT:((t,s)=>{switch(p+=1,b(t+1,s),p-=1,y.phraseLength=0,y.state){case e.EMPTY:case e.MATCH:y.state=e.NOMATCH;break;case e.NOMATCH:y.state=e.EMPTY;break;default:throw new Error(`opNOT: invalid state ${y.state}`)}})(t,i);break;default:throw new Error(`${l}unrecognized operator`)}p||i+y.phraseLength>m&&(m=i+y.phraseLength),s.stats&&s.stats.collect(w,y),s.trace&&s.trace.up(w,y.state,i,y.phraseLength),h-=1}},Pe={stringToChars:e=>[...e].map(e=>e.codePointAt(0)),charsToString:(e,t,s)=>{let n=e;for(;!(void 0===t||t<0);){if(void 0===s){n=e.slice(t);break}if(s<=0)return"";n=e.slice(t,t+s);break}return String.fromCodePoint(...n)}},Ne={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 Ne.ALT:return"ALT";case Ne.CAT:return"CAT";case Ne.REP:return"REP";case Ne.RNM:return"RNM";case Ne.TRG:return"TRG";case Ne.TBS:return"TBS";case Ne.TLS:return"TLS";case Ne.UDT:return"UDT";case Ne.AND:return"AND";case Ne.NOT:return"NOT";case Ne.ACTIVE:return"ACTIVE";case Ne.EMPTY:return"EMPTY";case Ne.MATCH:return"MATCH";case Ne.NOMATCH:return"NOMATCH";case Ne.SEM_PRE:return"SEM_PRE";case Ne.SEM_POST:return"SEM_POST";case Ne.SEM_OK:return"SEM_OK";default:return"UNRECOGNIZED STATE"}}};function De(){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 Be 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,...s}=t;Object.assign(this,s)}}}const _e=Be;new De;new De,new Fe,new De,new Fe,new De,new Fe,new De,new Fe;const qe=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 Le=class extends _e{},$e=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 qe(String(e))}).join("/")}`}catch(t){throw new Le("Unexpected error during JSON Pointer compilation",{cause:t,referenceTokens:e})}};class Re 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,...s}=t;Object.assign(this,s)}}}const Ve=Re;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 Ue=e=>{if("string"!=typeof e)throw new TypeError("Selector must be a string");let t="";for(const s of e){const e=s.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")}`:s}}return t};const He=class extends Ve{},Ge=e=>{if(!Array.isArray(e))throw new He("Selectors must be an array, got: "+typeof e,{selectors:e});try{return`$${e.map(e=>{if("string"==typeof e)return`['${Ue(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 He("Failed to compile normalized JSONPath",{cause:t,selectors:e})}};class Je{node;key;index;parent;parentPath;inList;#e=!1;#t=!1;#s=!1;#n=!1;#r;#i=!1;constructor(e,t,s,n,r){this.node=e,this.parent=t,this.parentPath=s,this.key=n,this.index=r&&"number"==typeof n?n:void 0,this.inList=r}get shouldSkip(){return this.#e}get shouldStop(){return this.#t}get removed(){return this.#s}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;)e.unshift(t.key),t=t.parentPath;return e}formatPath(e="jsonpointer"){const t=this.getPathKeys();return 0===t.length?"jsonpath"===e?"$":"":"jsonpath"===e?Ge(t):$e(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.#i&&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.#n=!0,this.#r=e,this.node=e}remove(){this.#i&&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.#s=!0}_getReplacementNode(){return this.#r}_wasReplaced(){return this.#n}_reset(){this.#e=!1,this.#t=!1,this.#s=!1,this.#n=!1,this.#r=void 0}_markStale(){this.#i=!0}}function ze(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,s){return t.apply(this,arguments)};case 3:return function(e,s,n){return t.apply(this,arguments)};case 4:return function(e,s,n,r){return t.apply(this,arguments)};case 5:return function(e,s,n,r,i){return t.apply(this,arguments)};case 6:return function(e,s,n,r,i,o){return t.apply(this,arguments)};case 7:return function(e,s,n,r,i,o,c){return t.apply(this,arguments)};case 8:return function(e,s,n,r,i,o,c,a){return t.apply(this,arguments)};case 9:return function(e,s,n,r,i,o,c,a,l){return t.apply(this,arguments)};case 10:return function(e,s,n,r,i,o,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 Xe(e,t,s){return function(){for(var n=[],i=0,o=e,c=0,a=!1;c<t.length||i<arguments.length;){var l;c<t.length&&(!r(t[c])||i>=arguments.length)?l=t[c]:(l=arguments[i],i+=1),n[c]=l,r(l)?a=!0:o-=1,c+=1}return!a&&o<=0?s.apply(this,n):ze(Math.max(0,o),Xe(e,n,s))}}const We=g(function(e,t){return 1===e?i(t):ze(e,Xe(e,[],t))});function Ye(e){var t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t}const Ke=g(function(e,t){return e&&t});function Ze(e,t,s){for(var n=0,r=s.length;n<r;)t=e(t,s[n]),n+=1;return t}const Qe=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};function et(e){return"[object String]"===Object.prototype.toString.call(e)}const tt=i(function(e){return!!Qe(e)||!!e&&("object"==typeof e&&(!et(e)&&(0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))});var st="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function nt(e,t,s){return function(n,r,i){if(tt(i))return e(n,r,i);if(null==i)return r;if("function"==typeof i["fantasy-land/reduce"])return t(n,r,i,"fantasy-land/reduce");if(null!=i[st])return s(n,r,i[st]());if("function"==typeof i.next)return s(n,r,i);if("function"==typeof i.reduce)return t(n,r,i,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function rt(e,t,s){for(var n=s.next();!n.done;)t=e(t,n.value),n=s.next();return t}function it(e,t,s,n){return s[n](e,t)}const ot=nt(Ze,it,rt);function ct(e,t,s){return function(){if(0===arguments.length)return s();var n=arguments[arguments.length-1];if(!Qe(n)){for(var r=0;r<e.length;){if("function"==typeof n[e[r]])return n[e[r]].apply(n,Array.prototype.slice.call(arguments,0,-1));r+=1}if(function(e){return null!=e&&"function"==typeof e["@@transducer/step"]}(n))return t.apply(null,Array.prototype.slice.call(arguments,0,-1))(n)}return s.apply(this,arguments)}}function at(e,t){for(var s=0,n=t.length,r=Array(n);s<n;)r[s]=e(t[s]),s+=1;return r}const lt=function(){return this.xf["@@transducer/init"]()},ut=function(e){return this.xf["@@transducer/result"](e)};var pt=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=lt,e.prototype["@@transducer/result"]=ut,e.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},e}();const ht=g(ct(["fantasy-land/map","map"],function(e){return function(t){return new pt(e,t)}},function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return We(t.length,function(){return e.call(this,t.apply(this,arguments))});case"[object Object]":return Ze(function(s,n){return s[n]=e(t[n]),s},{},T(t));default:return at(e,t)}}));const dt=g(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(s){return e(s)(t(s))}:ot(function(e,s){return function(e,t){var s;t=t||[];var n=(e=e||[]).length,r=t.length,i=[];for(s=0;s<n;)i[i.length]=e[s],s+=1;for(s=0;s<r;)i[i.length]=t[s],s+=1;return i}(e,ht(s,t))},[],e)});const ft=g(function(e,t){var s=We(e,t);return We(e,function(){return Ze(dt,ht(s,arguments[0]),Array.prototype.slice.call(arguments,1))})});const mt=i(function(e){return ft(e.length,e)});const yt=g(function(e,t){return Ye(e)?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:mt(Ke)(e,t)});function gt(e,t){return function(){return t.call(this,e.apply(this,arguments))}}function xt(e){return function t(s,n,o){switch(arguments.length){case 0:return t;case 1:return r(s)?t:g(function(t,n){return e(s,t,n)});case 2:return r(s)&&r(n)?t:r(s)?g(function(t,s){return e(t,n,s)}):r(n)?g(function(t,n){return e(s,t,n)}):i(function(t){return e(s,n,t)});default:return r(s)&&r(n)&&r(o)?t:r(s)&&r(n)?g(function(t,s){return e(t,s,o)}):r(s)&&r(o)?g(function(t,s){return e(t,n,s)}):r(n)&&r(o)?g(function(t,n){return e(s,t,n)}):r(s)?i(function(t){return e(t,n,o)}):r(n)?i(function(t){return e(s,t,o)}):r(o)?i(function(t){return e(s,n,t)}):e(s,n,o)}}}function bt(e,t,s){for(var n=0,r=s.length;n<r;){if((t=e["@@transducer/step"](t,s[n]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n+=1}return e["@@transducer/result"](t)}const wt=g(function(e,t){return ze(e.length,function(){return e.apply(t,arguments)})});function vt(e,t,s){for(var n=s.next();!n.done;){if((t=e["@@transducer/step"](t,n.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n=s.next()}return e["@@transducer/result"](t)}function kt(e,t,s,n){return e["@@transducer/result"](s[n](wt(e["@@transducer/step"],e),t))}const Ot=nt(bt,kt,vt);var Et=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}();const St=xt(function(e,t,s){return Ot("function"==typeof e?new Et(e):e,t,s)});function At(e,t){return function(){var s=arguments.length;if(0===s)return t();var n=arguments[s-1];return Qe(n)||"function"!=typeof n[e]?t.apply(this,arguments):n[e].apply(n,Array.prototype.slice.call(arguments,0,s-1))}}const jt=xt(At("slice",function(e,t,s){return Array.prototype.slice.call(s,e,t)}));const It=i(At("tail",jt(1,1/0)));function Tt(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return ze(arguments[0].length,St(gt,arguments[0],It(arguments)))}function Mt(e,t){return function(e,t,s){var n,r;if("function"==typeof e.indexOf)switch(typeof t){case"number":if(0===t){for(n=1/t;s<e.length;){if(0===(r=e[s])&&1/r===n)return s;s+=1}return-1}if(t!=t){for(;s<e.length;){if("number"==typeof(r=e[s])&&r!=r)return s;s+=1}return-1}return e.indexOf(t,s);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,s);case"object":if(null===t)return e.indexOf(t,s)}for(;s<e.length;){if(P(e[s],t))return s;s+=1}return-1}(t,e,0)>=0}function Ct(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 Ft=function(e){return(e<10?"0":"")+e};const Pt="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+Ft(e.getUTCMonth()+1)+"-"+Ft(e.getUTCDate())+"T"+Ft(e.getUTCHours())+":"+Ft(e.getUTCMinutes())+":"+Ft(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function Nt(e){return"[object Object]"===Object.prototype.toString.call(e)}var Dt=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=lt,e.prototype["@@transducer/result"]=ut,e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.xf["@@transducer/step"](e,t):e},e}();function Bt(e){return function(t){return new Dt(e,t)}}var _t=g(ct(["fantasy-land/filter","filter"],Bt,function(e,t){return Nt(t)?Ze(function(s,n){return e(t[n])&&(s[n]=t[n]),s},{},T(t)):(s=t,"[object Map]"===Object.prototype.toString.call(s)?function(e,t){for(var s=new Map,n=t.entries(),r=n.next();!r.done;)e(r.value[1])&&s.set(r.value[0],r.value[1]),r=n.next();return s}(e,t):function(e,t){for(var s=0,n=t.length,r=[];s<n;)e(t[s])&&(r[r.length]=t[s]),s+=1;return r}(e,t));var s}));const qt=_t;const Lt=g(function(e,t){return qt((s=e,function(){return!s.apply(this,arguments)}),t);var s});function $t(e,t){var s=function(s){var n=t.concat([e]);return Mt(s,n)?"<Circular>":$t(s,n)},n=function(e,t){return at(function(t){return Ct(t)+": "+s(e[t])},t.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+at(s,e).join(", ")+"))";case"[object Array]":return"["+at(s,e).concat(n(e,Lt(function(e){return/^\d+$/.test(e)},T(e)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof e?"new Boolean("+s(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?s(NaN):Ct(Pt(e)))+")";case"[object Map]":return"new Map("+s(Array.from(e))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof e?"new Number("+s(e.valueOf())+")":1/e==-1/0?"-0":e.toString(10);case"[object Set]":return"new Set("+s(Array.from(e).sort())+")";case"[object String]":return"object"==typeof e?"new String("+s(e.valueOf())+")":Ct(e);case"[object Undefined]":return"undefined";default:if("function"==typeof e.toString){var r=e.toString();if("[object Object]"!==r)return r}return"{"+n(e,T(e)).join(", ")+"}"}}const Rt=i(function(e){return $t(e,[])});const Vt=g(function(e,t){return e||t});const Ut=g(function(e,t){return Ye(e)?function(){return e.apply(this,arguments)||t.apply(this,arguments)}:mt(Vt)(e,t)});const Ht=mt(i(function(e){return!e}));const Gt=P(null);const Jt=Ht(Gt);const zt=g(function(e,t){if(e===t)return t;function s(e,t){if(e>t!=t>e)return t>e?t:e}var n=s(e,t);if(void 0!==n)return n;var r=s(typeof e,typeof t);if(void 0!==r)return r===typeof e?e:t;var i=Rt(e),o=s(i,Rt(t));return void 0!==o&&o===i?e:t}),Xt=Number.isInteger||function(e){return(e|0)===e};const Wt=g(function(e,t){if(null!=t)return Xt(e)?o(e,t):t[e]});const Yt=g(function(e,t){return ht(Wt(e),t)});const Kt=i(function(e){return We(St(zt,0,Yt("length",e)),function(){for(var t=0,s=e.length;t<s;){if(e[t].apply(this,arguments))return!0;t+=1}return!1})});var Zt=function(e,t){switch(arguments.length){case 0:return Zt;case 1:return function t(s){return 0===arguments.length?t:v(e,s)};default:return v(e,t)}};const Qt=Zt;const es=We(1,Tt(M,Qt("GeneratorFunction")));const ts=We(1,Tt(M,Qt("AsyncFunction")));const ss=Kt([Tt(M,Qt("Function")),es,ts]);function ns(e){return ns="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},ns(e)}const rs=function(e){return"object"===ns(e)};const is=We(1,yt(Jt,Ut(rs,ss)));const os=We(1,yt(is,Tt(Rt,P("[object Promise]")))),cs=e=>{const t=e?.element;return void 0===t||"element"===t?"Element":`${t.charAt(0).toUpperCase()}${t.slice(1)}Element`},as=e=>Q(e),ls=e=>Oe(e),us=(e,t,s)=>{oe(e)?e.value=s:Array.isArray(e)?e[t]=null===s?void 0:s:null===s?delete e[t]:e[t]=s},ps=e=>oe(e)?["key","value"]:re(e)||ie(e)?["content"]:[],hs=(e,t)=>{if(void 0!==e[t])return e[t];const s=t.length;for(const n in e){if(!n.includes("|"))continue;const r=n.indexOf(t);if(-1===r)continue;const i=0===r||"|"===n[r-1],o=r+s===n.length||"|"===n[r+s];if(i&&o)return e[n]}},ds=(e,t,s)=>{if(void 0===t)return null;const n=e,r=s?"leave":"enter",i=hs(n,t);if(!s&&"function"==typeof i)return i;if(null!=i){const e=i[r];if("function"==typeof e)return e}const o=n[r];if("function"==typeof o)return o;if(null!=o){const e=hs(o,t);if("function"==typeof e)return e}return null},fs=(e,t={})=>{const{visitFnGetter:s=ds,nodeTypeGetter:n=cs,exposeEdits:r=!1}=t,i=Symbol("internal-skip"),o=Symbol("break"),c=new Array(e.length).fill(i);return{enter(t){let a=t.node,l=!1;for(let u=0;u<e.length;u+=1)if(c[u]===i){const i=s(e[u],n(a),!1);if("function"==typeof i){const s=ys(t,a),n=i.call(e[u],s);if(os(n))throw new fe("Async visitor not supported in sync mode",{visitor:e[u],visitFn:i});if(s.shouldStop){c[u]=o;break}if(s.shouldSkip&&(c[u]=a),s.removed)return void t.remove();if(s._wasReplaced()){const e=s._getReplacementNode();if(!r)return t.replaceWith(e),e;a=e,l=!0}else if(void 0!==n){if(!r)return t.replaceWith(n),n;a=n,l=!0}}}if(l)return t.replaceWith(a),a},leave(t){const r=t.node;for(let a=0;a<e.length;a+=1)if(c[a]===i){const i=s(e[a],n(r),!0);if("function"==typeof i){const s=ys(t,r),n=i.call(e[a],s);if(os(n))throw new fe("Async visitor not supported in sync mode",{visitor:e[a],visitFn:i});if(s.shouldStop){c[a]=o;break}if(s.removed)return void t.remove();if(s._wasReplaced()){const e=s._getReplacementNode();return t.replaceWith(e),e}if(void 0!==n)return t.replaceWith(n),n}}else c[a]===r&&(c[a]=i)}}},ms=(e,t={})=>{const{visitFnGetter:s=ds,nodeTypeGetter:n=cs,exposeEdits:r=!1}=t,i=Symbol("internal-skip"),o=Symbol("break"),c=new Array(e.length).fill(i);return{async enter(t){let a=t.node,l=!1;for(let u=0;u<e.length;u+=1)if(c[u]===i){const i=s(e[u],n(a),!1);if("function"==typeof i){const s=ys(t,a),n=await i.call(e[u],s);if(s.shouldStop){c[u]=o;break}if(s.shouldSkip&&(c[u]=a),s.removed)return void t.remove();if(s._wasReplaced()){const e=s._getReplacementNode();if(!r)return t.replaceWith(e),e;a=e,l=!0}else if(void 0!==n){if(!r)return t.replaceWith(n),n;a=n,l=!0}}}if(l)return t.replaceWith(a),a},async leave(t){const r=t.node;for(let a=0;a<e.length;a+=1)if(c[a]===i){const i=s(e[a],n(r),!0);if("function"==typeof i){const s=ys(t,r),n=await i.call(e[a],s);if(s.shouldStop){c[a]=o;break}if(s.removed)return void t.remove();if(s._wasReplaced()){const e=s._getReplacementNode();return t.replaceWith(e),e}if(void 0!==n)return t.replaceWith(n),n}}else c[a]===r&&(c[a]=i)}}};function ys(e,t){return new Je(t,e.parent,e.parentPath,e.key,e.inList)}function*gs(e,t,s){const{keyMap:n,state:r,nodeTypeGetter:i,nodePredicate:o,nodeCloneFn:c,detectCycles:a,mutable:l,mutationFn:u}=s,p="function"==typeof n;let h,d,f=Array.isArray(e),m=[e],y=-1,g=[],x=e,b=null,w=null;const v=[];do{y+=1;const e=y===m.length;let s;const k=e&&0!==g.length;if(e){if(s=0===v.length?void 0:b?.key,x=d,d=v.pop(),w=b?.parentPath?.parentPath??null,k)if(l)for(const[e,t]of g)u(x,e,t);else if(f){x=x.slice();let e=0;for(const[t,s]of g){const n=t-e;null===s?(x.splice(n,1),e+=1):x[n]=s}}else{x=c(x);for(const[e,t]of g)x[e]=t}if(void 0!==h){y=h.index,m=h.keys,g=h.edits;const e=h.inArray;if(w=h.parentPath,h=h.prev,k&&!l){const t=e?y:m[y];g.push([t,x])}f=e}}else if(void 0!==d&&(s=f?y:m[y],x=d[s],void 0===x))continue;if(!Array.isArray(x)){if(!o(x))throw new fe(`Invalid AST Node: ${String(x)}`,{node:x});if(a&&v.includes(x))continue;b=new Je(x,d,w,s,f);const n=ds(t,i(x),e);if(n){for(const[e,s]of Object.entries(r))t[e]=s;const i=yield{visitFn:n,path:b,isLeaving:e};if(b.shouldStop)break;if(b.shouldSkip&&!e)continue;if(b.removed){if(g.push([s,null]),!e)continue}else if(b._wasReplaced()){const t=b._getReplacementNode();if(g.push([s,t]),!e){if(!o(t))continue;x=t}}else if(void 0!==i&&(g.push([s,i]),!e)){if(!o(i))continue;x=i}b._markStale()}}if(!e){if(h={inArray:f,index:y,keys:m,edits:g,parentPath:w,prev:h},f=Array.isArray(x),f)m=x;else if(p)m=n(x);else{const e=i(x);m=void 0!==e?n[e]??[]:[]}y=-1,g=[],void 0!==d&&v.push(d),d=x,w=b}}while(void 0!==h);return 0!==g.length?g.at(-1)[1]:e}fs[Symbol.for("nodejs.util.promisify.custom")]=ms;const xs=(e,t,s={})=>{const n=gs(e,t,{keyMap:s.keyMap??ps,state:s.state??{},nodeTypeGetter:s.nodeTypeGetter??cs,nodePredicate:s.nodePredicate??as,nodeCloneFn:s.nodeCloneFn??ls,detectCycles:s.detectCycles??!0,mutable:s.mutable??!1,mutationFn:s.mutationFn??us});let r=n.next();for(;!r.done;){const e=r.value,s=e.visitFn.call(t,e.path);if(os(s))throw new fe("Async visitor not supported in sync mode",{visitor:t,visitFn:e.visitFn});r=n.next(s)}return r.value},bs=async(e,t,s={})=>{const n=gs(e,t,{keyMap:s.keyMap??ps,state:s.state??{},nodeTypeGetter:s.nodeTypeGetter??cs,nodePredicate:s.nodePredicate??as,nodeCloneFn:s.nodeCloneFn??ls,detectCycles:s.detectCycles??!0,mutable:s.mutable??!1,mutationFn:s.mutationFn??us});let r=n.next();for(;!r.done;){const e=r.value,s=await e.visitFn.call(t,e.path);r=n.next(s)}return r.value};xs[Symbol.for("nodejs.util.promisify.custom")]=bs,Je.prototype.traverse=function(e,t){return xs(this.node,e,t)},Je.prototype.traverseAsync=function(e,t){return bs(this.node,e,t)};const ws={JSONSchemaDraft4Element:{additionalItems:(...e)=>new U(...e),items:(...e)=>new U(...e),required(...e){const t=new Z(...e);return t.classes.push("json-schema-required"),t},properties(...e){const t=new V(...e);return t.classes.push("json-schema-properties"),t},additionalProperties:(...e)=>new U(...e),patternProperties(...e){const t=new V(...e);return t.classes.push("json-schema-patternProperties"),t},dependencies(...e){const t=new V(...e);return t.classes.push("json-schema-dependencies"),t},enum(...e){const t=new Z(...e);return t.classes.push("json-schema-enum"),t},allOf(...e){const t=new Z(...e);return t.classes.push("json-schema-allOf"),t},anyOf(...e){const t=new Z(...e);return t.classes.push("json-schema-anyOf"),t},oneOf(...e){const t=new Z(...e);return t.classes.push("json-schema-oneOf"),t},not:(...e)=>new U(...e),definitions(...e){const t=new V(...e);return t.classes.push("json-schema-definitions"),t},links(...e){const t=new Z(...e);return t.classes.push("json-schema-links"),t},media:(...e)=>new G(...e)},LinkDescriptionElement:{targetSchema:(...e)=>new U(...e),schema:(...e)=>new U(...e)},"json-schema-properties":{"[key: *]":function(...e){return new U(...e)}},"json-schema-patternProperties":{"[key: *]":function(...e){return new U(...e)}},"json-schema-dependencies":{"[key: *]":function(...e){return new U(...e)}},"json-schema-allOf":{"<*>":function(...e){return new U(...e)}},"json-schema-anyOf":{"<*>":function(...e){return new U(...e)}},"json-schema-oneOf":{"<*>":function(...e){return new U(...e)}},"json-schema-definitions":{"[key: *]":function(...e){return new U(...e)}},"json-schema-links":{"<*>":function(...e){return new J(...e)}}},vs=(e,t)=>{const s=cs(e),n=ws[s]||ws[Ce(e.classes.first)];return void 0===n?void 0:Object.hasOwn(n,"[key: *]")?n["[key: *]"]:n[t]},ks=()=>()=>({visitor:{StringElement(e){const t=e.node;if(!(e=>ee(e)&&ae(e,["yaml-e-node","yaml-e-scalar"]))(t))return;const s=e.getAncestorNodes().reverse().filter(Q),n=s.at(-1);let r,i;if(re(n)?(i=t,r=vs(n,"<*>")):oe(n)&&(i=s.at(-2),r=vs(i,Ce(n.key))),"function"!=typeof r)return;const o=r.call({context:i},void 0,we(t.meta),we(t.attributes));de.transfer(t,o),e.replaceWith(o)}}});const Os=g(function(e,t){return Ze(function(s,n){return s[n]=e(t[n],n,t),s},{},T(t))});const Es=i(function(e){return null==e});var Ss=g(function(e,t){if(0===e.length||Es(t))return!1;for(var s=t,n=0;n<e.length;){if(Es(s)||!w(e[n],s))return!1;s=s[e[n]],n+=1}return!0});const As=Ss;var js=g(function(e,t){return As([e],t)});const Is=js;const Ts=xt(function(e,t,s){return e(Wt(t,s))});function Ms(e,t){for(var s=t,n=0;n<e.length;n+=1){if(null==s)return;var r=e[n];s=Xt(r)?o(r,s):s[r]}return s}const Cs=g(Ms);const Fs=xt(function(e,t,s){return e(Ms(t,s))});const Ps=We(1,yt(Jt,rs));var Ns=Tt(M,Qt("Object")),Ds=Tt(Rt,P(Rt(Object))),Bs=Fs(yt(ss,Ds),["constructor"]);const _s=We(1,function(e){if(!Ps(e)||!Ns(e))return!1;var t=Object.getPrototypeOf(e);return!!Gt(t)||Bs(t)});const qs=We(1,Tt(M,Qt("String")));const Ls=i(function(e){return We(e.length,e)});const $s=g(function(e,t){return We(e+1,function(){var s=arguments[e];if(null!=s&&Ye(s[t]))return s[t].apply(s,Array.prototype.slice.call(arguments,0,e));throw new TypeError(Rt(s)+' does not have a method named "'+t+'"')})});const Rs=$s(1,"split");var Vs=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=lt,e.prototype["@@transducer/result"]=ut,e.prototype["@@transducer/step"]=function(e,t){if(this.f){if(this.f(t))return e;this.f=null}return this.xf["@@transducer/step"](e,t)},e}();function Us(e){return function(t){return new Vs(e,t)}}const Hs=g(ct(["dropWhile"],Us,function(e,t){for(var s=0,n=t.length;s<n&&e(t[s]);)s+=1;return jt(s,1/0,t)}));const Gs=$s(1,"join");const Js=i(function(e){return We(e.length,function(t,s){var n=Array.prototype.slice.call(arguments,0);return n[0]=s,n[1]=t,e.apply(this,n)})})(g(Mt));const zs=Ls(function(e,t){return Tt(Rs(""),Hs(Js(e)),Gs(""))(t)}),Xs=new WeakMap;const Ws=xt(function(e,t,s){var n,r={};for(n in s=s||{},t=t||{})w(n,t)&&(r[n]=w(n,s)?e(n,t[n],s[n]):t[n]);for(n in s)w(n,s)&&!w(n,r)&&(r[n]=s[n]);return r});const Ys=xt(function e(t,s,n){return Ws(function(s,n,r){return Nt(n)&&Nt(r)?e(t,n,r):t(s,n,r)},s,n)});const Ks=g(function(e,t){return Ys(function(e,t,s){return s},e,t)});const Zs=g(function(e,t){return null==t||t!=t?e:t});const Qs=xt(function(e,t,s){return Zs(e,Wt(t,s))});const en=jt(0,-1);const tn=g(function(e,t){return e.apply(this,t)});const sn=Ht(ss);var nn=i(function(e){return null!=e&&"function"==typeof e["fantasy-land/empty"]?e["fantasy-land/empty"]():null!=e&&null!=e.constructor&&"function"==typeof e.constructor["fantasy-land/empty"]?e.constructor["fantasy-land/empty"]():null!=e&&"function"==typeof e.empty?e.empty():null!=e&&null!=e.constructor&&"function"==typeof e.constructor.empty?e.constructor.empty():e==Set||e instanceof Set?new Set:e==Map||e instanceof Map?new Map:Qe(e)?[]:et(e)?"":Nt(e)?{}:O(e)?function(){return arguments}():function(e){var t=Object.prototype.toString.call(e);return"[object Uint8ClampedArray]"===t||"[object Int8Array]"===t||"[object Uint8Array]"===t||"[object Int16Array]"===t||"[object Uint16Array]"===t||"[object Int32Array]"===t||"[object Uint32Array]"===t||"[object Float32Array]"===t||"[object Float64Array]"===t||"[object BigInt64Array]"===t||"[object BigUint64Array]"===t}(e)?e.constructor.from(""):void 0});const rn=nn;const on=i(function(e){return null!=e&&P(e,rn(e))});const cn=We(1,ss(Array.isArray)?Array.isArray:Tt(M,Qt("Array")));const an=yt(cn,on);const ln=We(3,function(e,t,s){var n=Cs(e,s),r=Cs(en(e),s);if(!sn(n)&&!an(e)){var i=wt(n,r);return tn(i,t)}});const un=class{namespace;constructor(e){this.namespace=e||new this.Namespace}serialise(e){if(!(e instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${e}\` is not an Element instance`);const t={element:e.element};if(e.isMetaEmpty||(t.meta=this.serialiseObject(e.meta)),e.isAttributesEmpty||(t.attributes=this.serialiseObject(e.attributes)),!(e instanceof de)){const s=de.from(e);s&&(t.meta||(t.meta={}),t.meta.__mappings__=this.serialise(s))}const s=this.serialiseContent(e.content);return void 0!==s&&(t.content=s),t}deserialise(e){if(!e.element)throw new Error("Given value is not an object containing an element name");const t=new(this.namespace.getElementClass(e.element));let s;t.element!==e.element&&(t.element=e.element);let n=e.meta;if(e.meta?.__mappings__){const{__mappings__:t,...r}=e.meta;s=t,n=Object.keys(r).length>0?r:void 0}if(n&&this.deserialiseObject(n,t.meta),s){this.deserialise(s).applyTo(t)}e.attributes&&this.deserialiseObject(e.attributes,t.attributes);const r=this.deserialiseContent(e.content);return void 0===r&&null!==t.content||(t.content=r),t}serialiseContent(e){if(e instanceof this.namespace.elements.Element)return this.serialise(e);if(e instanceof this.namespace.KeyValuePair){const t=e,s={key:this.serialise(t.key)};return t.value&&(s.value=this.serialise(t.value)),s}if(e&&Array.isArray(e)){if(0===e.length)return;return e.map(e=>this.serialise(e))}return e}deserialiseContent(e){if(e){if(e.element)return this.deserialise(e);if(e.key){const t=new this.namespace.KeyValuePair(this.deserialise(e.key));return e.value&&(t.value=this.deserialise(e.value)),t}if(Array.isArray(e))return e.map(e=>this.deserialise(e))}return e}serialiseObject(e){const t={};if(e.forEach((e,s)=>{e&&(t[s.toValue()]=this.serialise(e))}),0!==Object.keys(t).length)return t}deserialiseObject(e,t){Object.keys(e).forEach(s=>{t.set(s,this.deserialise(e[s]))})}},pn=e=>null===e,hn=e=>"string"==typeof e,dn=e=>"number"==typeof e,fn=e=>"boolean"==typeof e,mn=e=>null!==e&&"object"==typeof e;class yn{elementMap={};elementDetection=[];Element;KeyValuePair;_elements;_attributeElementKeys=[];_attributeElementArrayKeys=[];constructor(e){this.Element=q,this.KeyValuePair=N,e&&e.noDefault||this.useDefault()}use(e){return e.namespace&&e.namespace({base:this}),e.load&&e.load({base:this}),this}useDefault(){return this.register("null",Y).register("string",X).register("number",W).register("boolean",K).register("array",Z).register("object",V).register("member",R).register("ref",Se).register("link",Ee).register("sourceMap",de),this.detect(pn,Y,!1).detect(hn,X,!1).detect(dn,W,!1).detect(fn,K,!1).detect(Array.isArray,Z,!1).detect(mn,V,!1),this}register(e,t){return this._elements=void 0,this.elementMap[e]=t,this}unregister(e){return this._elements=void 0,delete this.elementMap[e],this}detect(e,t,s){return void 0===s||s?this.elementDetection.unshift([e,t]):this.elementDetection.push([e,t]),this}toElement(e){if(e instanceof this.Element)return e;let t;for(const[s,n]of this.elementDetection)if(s(e)){t=new n(e);break}return t}getElementClass(e){const t=this.elementMap[e];return void 0===t?this.Element:t}fromRefract(e){return this.serialiser.deserialise(e)}toRefract(e){return this.serialiser.serialise(e)}get elements(){return void 0===this._elements&&(this._elements={Element:this.Element},Object.keys(this.elementMap).forEach(e=>{const t=e[0].toUpperCase()+e.substring(1);this._elements[t]=this.elementMap[e]})),this._elements}get serialiser(){return new un(this)}}un.prototype.Namespace=yn;const gn=yn,xn=new gn,bn={isElement:Q,isStringElement:ee,isNumberElement:te,isNullElement:se,isBooleanElement:ne,isArrayElement:re,isObjectElement:ie,isMemberElement:oe,isPrimitiveElement:e=>ie(e)&&"object"===e.element||re(e)&&"array"===e.element||ne(e)&&"boolean"===e.element||te(e)&&"number"===e.element||ee(e)&&"string"===e.element||se(e)&&"null"===e.element||oe(e)&&"member"===e.element,isLinkElement:Te,isRefElement:Me,isAnnotationElement:e=>e instanceof Ae,isCommentElement:e=>e instanceof je,isParseResultElement:e=>e instanceof Ie,isSourceMapElement:e=>e instanceof de,hasElementSourceMap:ce,includesSymbols:(e,t)=>{if(0===t.length)return!0;if(!e.hasAttributesProperty("symbols"))return!1;const s=e.attributes.get("symbols");return!!re(s)&&t.every(e=>s.includes(e))},includesClasses:ae},wn={toolboxCreator:()=>({predicates:bn,namespace:xn}),visitorOptions:{exposeEdits:!0}},vn=(e,t,s={})=>{if(0===t.length)return e;const n=Ks(wn,s),{toolboxCreator:r,visitorOptions:i}=n,o=r(),c=t.map(e=>e(o)),a=fs(c.map(Qs({},"visitor")),i);c.forEach(ln(["pre"],[]));const l=xs(e,a);return c.forEach(ln(["post"],[])),l};function kn(e){return void 0===e?new Y:On(e)}function On(e){if(e instanceof q)return e;if("string"==typeof e)return new X(e);if("number"==typeof e)return new W(e);if("boolean"==typeof e)return new K(e);if(null===e)return new Y;if(Array.isArray(e))return new Z(e.map(kn));if("object"==typeof e)return new V(e);throw new Error("Cannot refract value of type "+typeof e)}vn[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,s={})=>{if(0===t.length)return e;const n=Ks(wn,s),{toolboxCreator:r,visitorOptions:i}=n,o=r(),c=t.map(e=>e(o)),a=ms(c.map(Qs({},"visitor")),i);await Promise.allSettled(c.map(ln(["pre"],[])));const l=await bs(e,a);return await Promise.allSettled(c.map(ln(["post"],[]))),l},q.prototype.ObjectElement=V,q.prototype.ArrayElement=Z,q.prototype.RefElement=Se,q.prototype.MemberElement=R,q.prototype.refract=On;const En=e=>{const t=e.isMetaEmpty?void 0:we(e.meta),s=e.isAttributesEmpty?void 0:we(e.attributes);return new e.constructor(void 0,t,s)},Sn=(e,t)=>t.clone&&t.isMergeableElement(e)?jn(En(e),e,t):e,An={clone:!0,isMergeableElement:e=>ie(e)||re(e),arrayElementMerge:(e,t,s)=>new(0,e.constructor)(e.concat(t).map(e=>Sn(e,s))),objectElementMerge:(e,t,s)=>{const n=ie(e)?En(e):En(t);return ie(e)&&e.forEach((e,t,r)=>{const i=Oe(r);i.value=Sn(e,s),n.content.push(i)}),t.forEach((t,r,i)=>{const o=Ce(r);let c;if(ie(e)&&e.hasKey(o)&&s.isMergeableElement(t)){const n=e.get(o);c=Oe(i),c.value=((e,t)=>{if("function"!=typeof t.customMerge)return jn;const s=t.customMerge(e,t);return"function"==typeof s?s:jn})(r,s)(n,t,s)}else c=Oe(i),c.value=Sn(t,s);n.remove(o),n.content.push(c)}),n},customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0},jn=(e,t,s)=>{const n={...An,...s};n.isMergeableElement=n.isMergeableElement??An.isMergeableElement,n.arrayElementMerge=n.arrayElementMerge??An.arrayElementMerge,n.objectElementMerge=n.objectElementMerge??An.objectElementMerge;const r=re(t);if(!(r===re(e)))return Sn(t,n);const i=r&&"function"==typeof n.arrayElementMerge?n.arrayElementMerge(e,t,n):n.objectElementMerge(e,t,n);return i.meta=(e=>"function"!=typeof e.customMetaMerge?e=>we(e):e.customMetaMerge)(n)(e.meta,t.meta),i.attributes=(e=>"function"!=typeof e.customAttributesMerge?e=>we(e):e.customAttributesMerge)(n)(e.attributes,t.attributes),i};jn.all=(e,t)=>{if(!Array.isArray(e))throw new TypeError("First argument of deepmerge should be an array.");return 0===e.length?new V:e.reduce((e,s)=>jn(e,s,t),En(e[0]))};const In=jn;const Tn=class{element;constructor(e){Object.assign(this,e)}copyMetaAndAttributes(e,t){if(!e.isMetaEmpty||!t.isMetaEmpty){const s=t.isMetaEmpty?new V:t.meta,n=e.isMetaEmpty?new V:e.meta;t.meta=In(s,n)}if(!e.isAttributesEmpty||!t.isAttributesEmpty){const s=t.isAttributesEmpty?new V:t.attributes,n=e.isAttributesEmpty?new V:e.attributes;t.attributes=In(s,n)}de.transfer(e,t)}};const Mn=class extends Tn{enter(e){this.element=we(e.node),e.stop()}};const Cn=i(function(e){return function(){return e}});const Fn=Cn(void 0);const Pn=P(Fn());const Nn=i(function(e){return We(St(zt,0,Yt("length",e)),function(){for(var t=0,s=e.length;t<s;){if(!e[t].apply(this,arguments))return!1;t+=1}return!0})});const Dn=i(function(e){return!on(e)});var Bn=Ht(is);const _n=Nn([qs,Bn,Dn]);const qn=g(function(e,t){for(var s={},n=0;n<e.length;)e[n]in t&&(s[e[n]]=t[e[n]]),n+=1;return s});const Ln=class extends Tn{specObj;passingOptionsNames=["specObj","parent"];constructor({specObj:e,...t}){super({...t}),this.specObj=e}retrievePassingOptions(){return qn(this.passingOptionsNames,this)}retrieveFixedFields(e){const t=Cs(["visitors",...e,"fixedFields"],this.specObj);return"object"==typeof t&&null!==t?Object.keys(t):[]}retrieveVisitor(e){return Fs(ss,["visitors",...e],this.specObj)?Cs(["visitors",...e],this.specObj):Cs(["visitors",...e,"$visitor"],this.specObj)}retrieveVisitorInstance(e,t={}){const s=this.retrievePassingOptions();return new(this.retrieveVisitor(e))({...s,...t})}toRefractedElement(e,t,s={}){const n=this.retrieveVisitorInstance(e,s);return n instanceof Mn&&n?.constructor===Mn?we(t):(xs(t,n,s),n.element)}};const $n=class extends Ln{specPath;ignoredFields;constructor({specPath:e,ignoredFields:t,...s}){super({...s}),this.specPath=e,this.ignoredFields=t||[]}ObjectElement(e){const t=e.node,s=this.specPath(t),n=this.retrieveFixedFields(s);t.forEach((e,t,r)=>{const i=Ce(t);if(ee(t)&&n.includes(i)&&!this.ignoredFields.includes(i)){const n=this.toRefractedElement([...s,"fixedFields",i],e),o=new R(we(t),n);this.copyMetaAndAttributes(r,o),o.classes.push("fixed-field"),this.element.content.push(o)}else this.ignoredFields.includes(i)||this.element.content.push(we(r))}),this.copyMetaAndAttributes(t,this.element),e.stop()}},Rn=(e,t,s=[])=>{const n=Object.getOwnPropertyDescriptors(t);for(let e of s)delete n[e];Object.defineProperties(e,n)},Vn=(e,t=[e])=>{const s=Object.getPrototypeOf(e);return null===s?t:Vn(s,[...t,s])},Un=(e,t,s=[])=>{var n;const r=null!==(n=((...e)=>{if(0===e.length)return;let t;const s=e.map(e=>Vn(e));for(;s.every(e=>e.length>0);){const e=s.map(e=>e.pop()),n=e[0];if(!e.every(e=>e===n))break;t=n}return t})(...e))&&void 0!==n?n:Object.prototype,i=Object.create(r),o=Vn(r);for(let t of e){let e=Vn(t);for(let t=e.length-1;t>=0;t--){let n=e[t];-1===o.indexOf(n)&&(Rn(i,n,["constructor",...s]),o.push(n))}}return i.constructor=t,i},Hn=e=>e.filter((t,s)=>e.indexOf(t)==s),Gn=(e,t)=>{const s=t.map(e=>Vn(e));let n=0,r=!0;for(;r;){r=!1;for(let i=t.length-1;i>=0;i--){const t=s[i][n];if(null!=t&&(r=!0,null!=Object.getOwnPropertyDescriptor(t,e)))return s[i][0]}n++}},Jn=(e,t=Object.prototype)=>new Proxy({},{getPrototypeOf:()=>t,setPrototypeOf(){throw Error("Cannot set prototype of Proxies created by ts-mixer")},getOwnPropertyDescriptor:(t,s)=>Object.getOwnPropertyDescriptor(Gn(s,e)||{},s),defineProperty(){throw new Error("Cannot define new properties on Proxies created by ts-mixer")},has:(s,n)=>void 0!==Gn(n,e)||void 0!==t[n],get:(s,n)=>(Gn(n,e)||t)[n],set(t,s,n){const r=Gn(s,e);if(void 0===r)throw new Error("Cannot set new properties on Proxies created by ts-mixer");return r[s]=n,!0},deleteProperty(){throw new Error("Cannot delete properties on Proxies created by ts-mixer")},ownKeys:()=>e.map(Object.getOwnPropertyNames).reduce((e,t)=>t.concat(e.filter(e=>t.indexOf(e)<0)))}),zn=null,Xn="copy",Wn="copy",Yn="deep",Kn=new WeakMap,Zn=e=>Kn.get(e),Qn=(e,t)=>{var s,n;const r=Hn([...Object.getOwnPropertyNames(e),...Object.getOwnPropertyNames(t)]),i={};for(let o of r)i[o]=Hn([...null!==(s=null==e?void 0:e[o])&&void 0!==s?s:[],...null!==(n=null==t?void 0:t[o])&&void 0!==n?n:[]]);return i},er=(e,t)=>{var s,n,r,i;return{property:Qn(null!==(s=null==e?void 0:e.property)&&void 0!==s?s:{},null!==(n=null==t?void 0:t.property)&&void 0!==n?n:{}),method:Qn(null!==(r=null==e?void 0:e.method)&&void 0!==r?r:{},null!==(i=null==t?void 0:t.method)&&void 0!==i?i:{})}},tr=(e,t)=>{var s,n,r,i,o,c;return{class:Hn([...null!==(s=null==e?void 0:e.class)&&void 0!==s?s:[],...null!==(n=null==t?void 0:t.class)&&void 0!==n?n:[]]),static:er(null!==(r=null==e?void 0:e.static)&&void 0!==r?r:{},null!==(i=null==t?void 0:t.static)&&void 0!==i?i:{}),instance:er(null!==(o=null==e?void 0:e.instance)&&void 0!==o?o:{},null!==(c=null==t?void 0:t.instance)&&void 0!==c?c:{})}},sr=new Map,nr=(...e)=>{const t=((...e)=>{var t;const s=new Set,n=new Set([...e]);for(;n.size>0;)for(let e of n){const r=[...Vn(e.prototype).map(e=>e.constructor),...null!==(t=Zn(e))&&void 0!==t?t:[]].filter(e=>!s.has(e));for(let e of r)n.add(e);s.add(e),n.delete(e)}return[...s]})(...e).map(e=>sr.get(e)).filter(e=>!!e);return 0==t.length?{}:1==t.length?t[0]:t.reduce((e,t)=>tr(e,t))},rr=e=>{let t=sr.get(e);return t||(t={},sr.set(e,t)),t};function ir(...e){var t,s,n;const r=e.map(e=>e.prototype),i=zn;if(null!==i){const e=r.map(e=>e[i]).filter(e=>"function"==typeof e),t=function(...t){for(let s of e)s.apply(this,t)},s={[i]:t};r.push(s)}function o(...t){for(const s of e)Rn(this,new s(...t));null!==i&&"function"==typeof this[i]&&this[i].apply(this,t)}var c,a;o.prototype="copy"===Wn?Un(r,o):(c=r,a=o,Jn([...c,{constructor:a}])),Object.setPrototypeOf(o,"copy"===Xn?Un(e,null,["prototype"]):Jn(e,Function.prototype));let l=o;if("none"!==Yn){const r="deep"===Yn?nr(...e):((...e)=>{const t=e.map(e=>rr(e));return 0===t.length?{}:1===t.length?t[0]:t.reduce((e,t)=>tr(e,t))})(...e);for(let e of null!==(t=null==r?void 0:r.class)&&void 0!==t?t:[]){const t=e(l);t&&(l=t)}or(null!==(s=null==r?void 0:r.static)&&void 0!==s?s:{},l),or(null!==(n=null==r?void 0:r.instance)&&void 0!==n?n:{},l.prototype)}var u,p;return u=l,p=e,Kn.set(u,p),l}const or=(e,t)=>{const s=e.property,n=e.method;if(s)for(let e in s)for(let n of s[e])n(t,e);if(n)for(let e in n)for(let s of n[e])s(t,e,Object.getOwnPropertyDescriptor(t,e))};const cr=function(){return!1};const ar=class extends Ln{specPath;ignoredFields;fieldPatternPredicate=cr;constructor({specPath:e,ignoredFields:t,fieldPatternPredicate:s,...n}){super({...n}),this.specPath=e,this.ignoredFields=t||[],"function"==typeof s&&(this.fieldPatternPredicate=s)}ObjectElement(e){const t=e.node;t.forEach((e,t,s)=>{const n=Ce(t);if(!this.ignoredFields.includes(n)&&this.fieldPatternPredicate(n)){const n=this.specPath(e),r=this.toRefractedElement(n,e),i=new R(we(t),r);this.copyMetaAndAttributes(s,i),i.classes.push("patterned-field"),this.element.content.push(i)}else this.ignoredFields.includes(n)||this.element.content.push(we(s))}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const lr=class extends ar{constructor(e){super(e),this.fieldPatternPredicate=_n}};const ur=class{parent;constructor({parent:e}){this.parent=e}},pr=ir($n,ur,Mn),hr=ir($n,Mn),dr=ir($n,Mn),fr=ir($n,Mn),mr=ir(Ln,ur,Mn),yr=ir(Ln,ur,Mn),gr=ir(Ln,ur,Mn),xr=ir(Ln,ur,Mn),br=ir(Ln,ur,Mn),wr=ir(lr,ur,Mn),vr=ir(lr,ur,Mn),kr=ir(lr,ur,Mn),Or=ir(lr,ur,Mn),Er=e=>e instanceof U,Sr=e=>e instanceof H,Ar=e=>e instanceof G,jr=e=>e instanceof J;const Ir=class extends pr{constructor(e){super(e),this.element=new U,this.specPath=Cn(["document","objects","JSONSchema"])}get defaultDialectIdentifier(){return"http://json-schema.org/draft-04/schema#"}ObjectElement(e){const t=e.node;return this.handleDialectIdentifier(t),this.handleSchemaIdentifier(t),this.parent=this.element,$n.prototype.ObjectElement.call(this,e)}handleDialectIdentifier(e){if(Pn(this.parent)&&!ee(e.get("$schema")))this.element.meta.set("inheritedDialectIdentifier",this.defaultDialectIdentifier);else if(Er(this.parent)&&!ee(e.get("$schema"))){const e=Zs(Ce(this.parent.meta.get("inheritedDialectIdentifier")),Ce(this.parent.$schema));this.element.meta.set("inheritedDialectIdentifier",e)}}handleSchemaIdentifier(e,t="id"){const s=void 0!==this.parent?we(this.parent.meta.get("ancestorsSchemaIdentifiers")??new Z):new Z,n=Ce(e.get(t));_n(n)&&s.push(n),this.element.meta.set("ancestorsSchemaIdentifiers",s)}},Tr=e=>ie(e)&&e.hasKey("$ref");const Mr=class extends xr{ObjectElement(e){const t=e.node,s=Tr(t)?["document","objects","JSONReference"]:["document","objects","JSONSchema"];this.element=this.toRefractedElement(s,t),e.stop()}ArrayElement(e){const t=e.node;this.element=new Z,this.element.classes.push("json-schema-items"),t.forEach(e=>{const t=Tr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Cr=class extends Mn{ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-required")}};const Fr=class extends Or{constructor(e){super(e),this.element=new V,this.element.classes.push("json-schema-properties"),this.specPath=e=>Tr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const Pr=class extends kr{constructor(e){super(e),this.element=new V,this.element.classes.push("json-schema-patternProperties"),this.specPath=e=>Tr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const Nr=class extends vr{constructor(e){super(e),this.element=new V,this.element.classes.push("json-schema-dependencies"),this.specPath=e=>Tr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const Dr=class extends Mn{ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-enum")}};const Br=class extends Mn{StringElement(e){super.enter(e),this.element.classes.push("json-schema-type")}ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-type")}};const _r=class extends mr{constructor(e){super(e),this.element=new Z,this.element.classes.push("json-schema-allOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=Tr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const qr=class extends yr{constructor(e){super(e),this.element=new Z,this.element.classes.push("json-schema-anyOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=Tr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Lr=class extends gr{constructor(e){super(e),this.element=new Z,this.element.classes.push("json-schema-oneOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=Tr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const $r=class extends wr{constructor(e){super(e),this.element=new V,this.element.classes.push("json-schema-definitions"),this.specPath=e=>Tr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const Rr=class extends br{constructor(e){super(e),this.element=new Z,this.element.classes.push("json-schema-links")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","LinkDescription"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Vr=class extends hr{constructor(e){super(e),this.element=new H,this.specPath=Cn(["document","objects","JSONReference"])}ObjectElement(e){$n.prototype.ObjectElement.call(this,e),ee(this.element.$ref)&&this.element.classes.push("reference-element")}};const Ur=class extends Mn{StringElement(e){super.enter(e),this.element.classes.push("reference-value")}};const Hr=function(){return!0};const Gr=xt(function(e,t,s){return We(Math.max(e.length,t.length,s.length),function(){return e.apply(this,arguments)?t.apply(this,arguments):s.apply(this,arguments)})});const Jr=i(function(e){return function(t,s){return e(t,s)?-1:e(s,t)?1:0}});var zr=g(function(e,t){return Array.prototype.slice.call(t,0).sort(e)});const Xr=zr;const Wr=i(function(e){return o(0,e)});function Yr(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}const Kr=i(Yr);const Zr=Ht(Es);const Qr=yt(cn,Dn);function ei(e){return function(e){if(Array.isArray(e))return ti(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ti(e,t);var s={}.toString.call(e).slice(8,-1);return"Object"===s&&e.constructor&&(s=e.constructor.name),"Map"===s||"Set"===s?Array.from(e):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?ti(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ti(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,n=Array(t);s<t;s++)n[s]=e[s];return n}var si=Tt(Xr(Jr(function(e,t){return e.length>t.length})),Wr,Wt("length")),ni=Ls(function(e,t,s){var n=s.apply(void 0,ei(e));return Zr(n)?Kr(n):t});const ri=Gr(Qr,function(e){var t=si(e);return We(t,function(){for(var t=arguments.length,s=new Array(t),n=0;n<t;n++)s[n]=arguments[n];return St(ni(s),void 0,e)})},Fn);const ii=class extends Ln{alternator;constructor({alternator:e,...t}){super({...t}),this.alternator=e}enter(e){const t=e.node,s=this.alternator.map(({predicate:e,specPath:t})=>Gr(e,Cn(t),Fn)),n=ri(s)(t);this.element=this.toRefractedElement(n,t),e.stop()}};const oi=class extends ii{constructor(e){super(e),this.alternator=[{predicate:Tr,specPath:["document","objects","JSONReference"]},{predicate:Hr,specPath:["document","objects","JSONSchema"]}]}};const ci=class extends fr{constructor(e){super(e),this.element=new G,this.specPath=Cn(["document","objects","Media"])}};const ai=class extends dr{constructor(e){super(e),this.element=new J,this.specPath=Cn(["document","objects","LinkDescription"])}},li={visitors:{value:Mn,JSONSchemaOrJSONReferenceVisitor:oi,document:{objects:{JSONSchema:{element:"jSONSchemaDraft4",$visitor:Ir,fixedFields:{id:{$visitor:Mn,alias:"idField"},$schema:{$ref:"#/visitors/value"},multipleOf:{$ref:"#/visitors/value"},maximum:{$ref:"#/visitors/value"},exclusiveMaximum:{$ref:"#/visitors/value"},minimum:{$ref:"#/visitors/value"},exclusiveMinimum:{$ref:"#/visitors/value"},maxLength:{$ref:"#/visitors/value"},minLength:{$ref:"#/visitors/value"},pattern:{$ref:"#/visitors/value"},additionalItems:oi,items:{$visitor:Mr,alias:"itemsField"},maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:Cr,properties:Fr,additionalProperties:oi,patternProperties:Pr,dependencies:Nr,enum:Dr,type:Br,allOf:_r,anyOf:qr,oneOf:Lr,not:oi,definitions:$r,title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},format:{$ref:"#/visitors/value"},base:{$ref:"#/visitors/value"},links:{$visitor:Rr,alias:"linksField"},media:{$ref:"#/visitors/document/objects/Media"},readOnly:{$ref:"#/visitors/value"}}},JSONReference:{element:"jSONReference",$visitor:Vr,fixedFields:{$ref:Ur}},Media:{element:"media",$visitor:ci,fixedFields:{binaryEncoding:{$ref:"#/visitors/value"},type:{$ref:"#/visitors/value"}}},LinkDescription:{element:"linkDescription",$visitor:ai,fixedFields:{href:{$ref:"#/visitors/value"},rel:{$ref:"#/visitors/value"},title:{$ref:"#/visitors/value"},targetSchema:oi,mediaType:{$ref:"#/visitors/value"},method:{$ref:"#/visitors/value"},encType:{$ref:"#/visitors/value"},schema:oi}}}}}},ui=()=>{const e=new gn,t={...n,...s,isStringElement:ee};return e.use(z),{predicates:t,namespace:e}},pi=(e,{element:t="jSONSchemaDraft4",plugins:s=[],specificationObj:n=li}={})=>{const r=On(e),i=(e=>{if(Xs.has(e))return Xs.get(e);const t={},s=(e,n,r)=>("string"==typeof e.element&&(t[e.element]=e.$visitor?[...r,"$visitor"]:r),Os((e,t)=>{const i=[...r,t];if(_s(e)&&Is("$ref",e)&&Ts(qs,"$ref",e)){const t=Cs(["$ref"],e),s=zs("#/",t);return Cs(s.split("/"),n)}return _s(e)?s(e,n,i):e},e)),n=s(e,e,[]);return n.elementMap=t,Xs.set(e,n),n})(n),o=i.elementMap[t];if(!o)throw new Error(`Unknown element type: "${t}"`);const c=new(Cs(o,i))({specObj:i});return xs(r,c),vn(c.element,s,{toolboxCreator:ui})},hi=(e,t={})=>pi(e,{...t,element:"jSONSchemaDraft4"}),di=(e,t={})=>pi(e,{...t,element:"jSONReference"}),fi=(e,t={})=>pi(e,{...t,element:"media"}),mi=(e,t={})=>pi(e,{...t,element:"linkDescription"}),yi=pi;return t})());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@speclynx/apidom-ns-json-schema-draft-4",
3
- "version": "2.0.1",
3
+ "version": "2.1.0",
4
4
  "description": "JSON Schema Draft 4 namespace for ApiDOM.",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -43,9 +43,9 @@
43
43
  "license": "Apache-2.0",
44
44
  "dependencies": {
45
45
  "@babel/runtime-corejs3": "^7.28.4",
46
- "@speclynx/apidom-core": "^2.0.1",
47
- "@speclynx/apidom-datamodel": "^2.0.1",
48
- "@speclynx/apidom-traverse": "^2.0.1",
46
+ "@speclynx/apidom-core": "^2.1.0",
47
+ "@speclynx/apidom-datamodel": "^2.1.0",
48
+ "@speclynx/apidom-traverse": "^2.1.0",
49
49
  "ramda": "~0.32.0",
50
50
  "ramda-adjunct": "^6.0.0",
51
51
  "ts-mixer": "^6.0.4"
@@ -60,5 +60,5 @@
60
60
  "README.md",
61
61
  "CHANGELOG.md"
62
62
  ],
63
- "gitHead": "6a9caf87f445f76ffd69afa760990ffa784bc82d"
63
+ "gitHead": "dd02cfbbe82b0a31c6e7c444cec140e740e1c6e9"
64
64
  }