@speclynx/apidom-ns-openapi-2 2.13.1 → 3.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.
@@ -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.apidomNsOpenApi2=t():e.apidomNsOpenApi2=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,{AlternatingVisitor:()=>sc,BaseAlternatingVisitor:()=>hc,BaseFixedFieldsVisitor:()=>lc,BaseMapVisitor:()=>pc,BaseMixedFieldsVisitor:()=>dc,BasePatternedFieldsVisitor:()=>uc,BaseSpecificationVisitor:()=>ac,ContactElement:()=>wi,DefinitionsElement:()=>Ni,ExampleElement:()=>Ii,ExternalDocumentationElement:()=>Si,FallbackVisitor:()=>Go,FixedFieldsVisitor:()=>Zo,HeaderElement:()=>Mi,HeadersElement:()=>Fi,InfoElement:()=>xi,ItemsElement:()=>ki,JSONReferenceElement:()=>D,LicenseElement:()=>bi,MapVisitor:()=>tc,MixedFieldsVisitor:()=>cc,MixedFieldsVisitorBase:()=>oc,OpenAPIMediaTypes:()=>mi,OperationConsumesElement:()=>Gi,OperationElement:()=>Oi,OperationParametersElement:()=>Xi,OperationProducesElement:()=>Wi,OperationSchemesElement:()=>Yi,OperationSecurityElement:()=>Zi,OperationTagsElement:()=>to,ParameterElement:()=>Pi,ParametersDefinitionsElement:()=>_i,PathItemElement:()=>Ei,PathItemParametersElement:()=>no,PathsElement:()=>vi,PatternedFieldsVisitor:()=>ec,ReferenceElement:()=>$i,ResponseElement:()=>Ai,ResponsesDefinitionsElement:()=>qi,ResponsesElement:()=>ji,SchemaElement:()=>Di,ScopesElement:()=>Li,SecurityDefinitionsElement:()=>Ri,SecurityRequirementElement:()=>Hi,SecuritySchemeElement:()=>Bi,SpecificationVisitor:()=>zo,SwaggerConsumesElement:()=>co,SwaggerElement:()=>gi,SwaggerProducesElement:()=>lo,SwaggerSchemesElement:()=>io,SwaggerSecurityElement:()=>po,SwaggerTagsElement:()=>mo,SwaggerVersionElement:()=>yi,TagElement:()=>Ti,Visitor:()=>Vo,XmlElement:()=>Ci,default:()=>Ui,isContactElement:()=>Mc,isDefinitionsElement:()=>Wc,isExampleElement:()=>Lc,isExternalDocumentationElement:()=>$c,isHeaderElement:()=>Hc,isHeadersElement:()=>Bc,isInfoElement:()=>Ac,isItemsElement:()=>_c,isJSONReferenceElement:()=>C,isJSONReferenceLikeElement:()=>J,isLicenseElement:()=>Fc,isOperationElement:()=>Cc,isParameterElement:()=>Nc,isParametersDefinitionsElement:()=>Kc,isPathItemElement:()=>Dc,isPathsElement:()=>Tc,isReferenceElement:()=>Vc,isReferenceLikeElement:()=>Qo,isResponseElement:()=>Rc,isResponsesDefinitionsElement:()=>Xc,isResponsesElement:()=>qc,isSchemaElement:()=>Gc,isScopesElement:()=>Qc,isSecurityDefinitionsElement:()=>Jc,isSecurityRequirementElement:()=>Zc,isSecuritySchemeElement:()=>Yc,isSwaggerElement:()=>Ic,isSwaggerExtension:()=>Yo,isSwaggerVersionElement:()=>jc,isTagElement:()=>Uc,isXmlElement:()=>zc,mediaTypes:()=>fi,refract:()=>bl,refractContact:()=>Ka,refractDefinitions:()=>dl,refractExample:()=>cl,refractExternalDocumentation:()=>tl,refractHeader:()=>al,refractHeaders:()=>ol,refractInfo:()=>Wa,refractItems:()=>nl,refractLicense:()=>Ya,refractOperation:()=>el,refractParameter:()=>sl,refractParametersDefinitions:()=>ml,refractPathItem:()=>Za,refractPaths:()=>Qa,refractReference:()=>ul,refractResponse:()=>il,refractResponses:()=>rl,refractResponsesDefinitions:()=>fl,refractSchema:()=>pl,refractScopes:()=>xl,refractSecurityDefinitions:()=>gl,refractSecurityRequirement:()=>wl,refractSecurityScheme:()=>yl,refractSwagger:()=>Ja,refractTag:()=>ll,refractXml:()=>hl,refractorPluginReplaceEmptyElement:()=>yo,specificationObj:()=>Ga});var s={};e.r(s),e.d(s,{isReferenceLikeElement:()=>Qo,isSwaggerExtension:()=>Yo});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){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 c(e){for(var t,s=[];!(t=e.next()).done;)s.push(t.value);return s}function a(e,t,s){for(var n=0,r=s.length;n<r;){if(e(t,s[n]))return!0;n+=1}return!1}function l(e,t){return Object.prototype.hasOwnProperty.call(t,e)}e.r(n),e.d(n,{isContactElement:()=>Mc,isDefinitionsElement:()=>Wc,isExampleElement:()=>Lc,isExternalDocumentationElement:()=>$c,isHeaderElement:()=>Hc,isHeadersElement:()=>Bc,isInfoElement:()=>Ac,isItemsElement:()=>_c,isLicenseElement:()=>Fc,isOperationElement:()=>Cc,isParameterElement:()=>Nc,isParametersDefinitionsElement:()=>Kc,isPathItemElement:()=>Dc,isPathsElement:()=>Tc,isReferenceElement:()=>Vc,isResponseElement:()=>Rc,isResponsesDefinitionsElement:()=>Xc,isResponsesElement:()=>qc,isSchemaElement:()=>Gc,isScopesElement:()=>Qc,isSecurityDefinitionsElement:()=>Jc,isSecurityRequirementElement:()=>Zc,isSecuritySchemeElement:()=>Yc,isSwaggerElement:()=>Ic,isSwaggerVersionElement:()=>jc,isTagElement:()=>Uc,isXmlElement:()=>zc});const u="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var p=Object.prototype.toString;const h=function(){return"[object Arguments]"===p.call(arguments)?function(e){return"[object Arguments]"===p.call(e)}:function(e){return l("callee",e)}}();var d=!{toString:null}.propertyIsEnumerable("toString"),m=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],f=function(){return arguments.propertyIsEnumerable("length")}(),g=function(e,t){for(var s=0;s<e.length;){if(e[s]===t)return!0;s+=1}return!1},y="function"!=typeof Object.keys||f?i(function(e){if(Object(e)!==e)return[];var t,s,n=[],r=f&&h(e);for(t in e)!l(t,e)||r&&"length"===t||(n[n.length]=t);if(d)for(s=m.length-1;s>=0;)l(t=m[s],e)&&!g(n,t)&&(n[n.length]=t),s-=1;return n}):i(function(e){return Object(e)!==e?[]:Object.keys(e)});const x=y;const w=i(function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function b(e,t,s,n){var r=c(e);function i(e,t){return v(e,t,s.slice(),n.slice())}return!a(function(e,t){return!a(i,t,e)},c(t),r)}function v(e,t,s,n){if(u(e,t))return!0;var r=w(e);if(r!==w(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(r){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===function(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!u(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!u(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 i=s.length-1;i>=0;){if(s[i]===e)return n[i]===t;i-=1}switch(r){case"Map":return e.size===t.size&&b(e.entries(),t.entries(),s.concat([e]),n.concat([t]));case"Set":return e.size===t.size&&b(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 o=x(e);if(o.length!==x(t).length)return!1;var c=s.concat([e]),a=n.concat([t]);for(i=o.length-1;i>=0;){var p=o[i];if(!l(p,t)||!v(t[p],e[p],c,a))return!1;i-=1}return!0}const E=o(function(e,t){return v(e,t,[],[])});const O=class{key;value;constructor(e,t){this.key=e,this.value=t}toValue(){return{key:this.key?.toValue(),value:this.value?.toValue()}}};class S{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 S(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 S(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 P=S;class k{parent;style;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 k)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 O)this._content=e;else if(e instanceof P)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 k?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 k?this._attributes=e:this.attributes.set(e??{})}get id(){return this.isFrozen?this.getMetaProperty("id",""):(this.hasMetaProperty("id")||this.setMetaProperty("id",""),this.meta.get("id"))}set id(e){this.setMetaProperty("id",e)}get classes(){return this.isFrozen?this.getMetaProperty("classes",[]):(this.hasMetaProperty("classes")||this.setMetaProperty("classes",[]),this.meta.get("classes"))}set classes(e){this.setMetaProperty("classes",e)}get links(){return this.isFrozen?this.getMetaProperty("links",[]):(this.hasMetaProperty("links")||this.setMetaProperty("links",[]),this.meta.get("links"))}set links(e){this.setMetaProperty("links",e)}get children(){const{_content:e}=this;if(Array.isArray(e))return e;if(e instanceof O){const t=[];return e.key&&t.push(e.key),e.value&&t.push(e.value),t}return e instanceof k?[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 k||e instanceof O?e.toValue():Array.isArray(e)?e.map(e=>e.toValue()):e}equals(e){const t=e instanceof k?e.toValue():e;return E(this.toValue(),t)}primitive(){}set(e){return this.content=e,this}toRef(e){const t=this.id.toValue();if(""===t)throw new Error("Cannot create reference to an element without an ID");const s=new this.RefElement(t);return"string"==typeof e&&(s.path=this.refract(e)),s}getMetaProperty(e,t){if(!this.hasMetaProperty(e)){if(void 0===t)return;const e=this.refract(t);return e&&this.isFrozen&&e.freeze(),e}return this.meta.get(e)}setMetaProperty(e,t){this.meta.set(e,t)}hasMetaProperty(e){return!this.isMetaEmpty&&this.meta.hasKey(e)}get isMetaEmpty(){return void 0===this._meta||this.meta.isEmpty}getAttributesProperty(e,t){if(!this.hasAttributesProperty(e)){if(this.isFrozen){const e=this.refract(t);return e.freeze(),e}this.attributes.set(e,t)}return this.attributes.get(e)}setAttributesProperty(e,t){this.attributes.set(e,t)}hasAttributesProperty(e){return!this.isAttributesEmpty&&this.attributes.hasKey(e)}get isAttributesEmpty(){return void 0===this._attributes||this.attributes.isEmpty}}const I=k;class j extends I{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 A=j;const F=class extends I{constructor(e,t,s,n){super(new O,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 M=class extends A{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 F(e,t))}else if("object"==typeof e&&!Array.isArray(e))for(const t of Object.keys(e))this.set(t,e[t]);return this}keys(){return this._content.map(e=>e.key.toValue())}values(){return this._content.map(e=>e.value.toValue())}hasKey(e){return this._content.some(t=>t.key.equals(e))}items(){return this._content.map(e=>[e.key.toValue(),e.value.toValue()])}map(e,t){return this._content.map(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 P(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 P(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 T=class extends M{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 D=class extends M{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 C=e=>e instanceof D;const $=class extends I{constructor(e,t,s){super(e,t,s),this.element="string"}primitive(){return"string"}get length(){return this.content?.length??0}};const N=class extends I{constructor(e,t,s){super(e,t,s),this.element="number"}primitive(){return"number"}};const _=class extends I{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 q=class extends I{constructor(e,t,s){super(e,t,s),this.element="boolean"}primitive(){return"boolean"}};const R=class extends A{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([])}},B=e=>e instanceof I,L=e=>e instanceof $,H=e=>e instanceof N,U=e=>e instanceof _,V=e=>e instanceof q,G=e=>e instanceof R,z=e=>e instanceof M,X=e=>e instanceof F,J=e=>z(e)&&e.hasKey("$ref");function W(e,t,s){for(var n=0,r=s.length;n<r;)t=e(t,s[n]),n+=1;return t}var K=o(function(e,t){return W(function(s,n){return s[n]=e(t[n],n,t),s},{},x(t))});const Y=K;const Q=i(function(e){return null==e});var Z=o(function(e,t){if(0===e.length||Q(t))return!1;for(var s=t,n=0;n<e.length;){if(Q(s)||!l(e[n],s))return!1;s=s[e[n]],n+=1}return!0});const ee=Z;var te=o(function(e,t){return ee([e],t)});const se=te;function ne(e){return function t(s,n,c){switch(arguments.length){case 0:return t;case 1:return r(s)?t:o(function(t,n){return e(s,t,n)});case 2:return r(s)&&r(n)?t:r(s)?o(function(t,s){return e(t,n,s)}):r(n)?o(function(t,n){return e(s,t,n)}):i(function(t){return e(s,n,t)});default:return r(s)&&r(n)&&r(c)?t:r(s)&&r(n)?o(function(t,s){return e(t,s,c)}):r(s)&&r(c)?o(function(t,s){return e(t,n,s)}):r(n)&&r(c)?o(function(t,n){return e(s,t,n)}):r(s)?i(function(t){return e(t,n,c)}):r(n)?i(function(t){return e(s,t,c)}):r(c)?i(function(t){return e(s,n,t)}):e(s,n,c)}}}const re=Number.isInteger||function(e){return(e|0)===e};function ie(e,t){return t[e<0?t.length+e:e]}const oe=o(function(e,t){if(null!=t)return re(e)?ie(e,t):t[e]});const ce=ne(function(e,t,s){return e(oe(t,s))});function ae(e,t){for(var s=t,n=0;n<e.length;n+=1){if(null==s)return;var r=e[n];s=re(r)?ie(r,s):s[r]}return s}const le=o(ae);function ue(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 pe(e,t){return function(){return t.call(this,e.apply(this,arguments))}}const he=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};function de(e){return"[object String]"===Object.prototype.toString.call(e)}const me=i(function(e){return!!he(e)||!!e&&("object"==typeof e&&(!de(e)&&(0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))});var fe="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function ge(e,t,s){return function(n,r,i){if(me(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[fe])return s(n,r,i[fe]());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 ye(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)}var xe=o(function(e,t){return ue(e.length,function(){return e.apply(t,arguments)})});const we=xe;function be(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 ve(e,t,s,n){return e["@@transducer/result"](s[n](we(e["@@transducer/step"],e),t))}const Ee=ge(ye,ve,be);var Oe=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 Se=ne(function(e,t,s){return Ee("function"==typeof e?new Oe(e):e,t,s)});function Pe(e,t){return function(){var s=arguments.length;if(0===s)return t();var n=arguments[s-1];return he(n)||"function"!=typeof n[e]?t.apply(this,arguments):n[e].apply(n,Array.prototype.slice.call(arguments,0,s-1))}}const ke=ne(Pe("slice",function(e,t,s){return Array.prototype.slice.call(s,e,t)}));const Ie=i(Pe("tail",ke(1,1/0)));function je(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return ue(arguments[0].length,Se(pe,arguments[0],Ie(arguments)))}var Ae=function(e,t){switch(arguments.length){case 0:return Ae;case 1:return function t(s){return 0===arguments.length?t:u(e,s)};default:return u(e,t)}};const Fe=Ae;function Me(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(E(e[s],t))return s;s+=1}return-1}(t,e,0)>=0}function Te(e,t){for(var s=0,n=t.length,r=Array(n);s<n;)r[s]=e(t[s]),s+=1;return r}function De(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 Ce=function(e){return(e<10?"0":"")+e};const $e="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+Ce(e.getUTCMonth()+1)+"-"+Ce(e.getUTCDate())+"T"+Ce(e.getUTCHours())+":"+Ce(e.getUTCMinutes())+":"+Ce(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function Ne(e,t,s){return function(){if(0===arguments.length)return s();var n=arguments[arguments.length-1];if(!he(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 _e(e){return"[object Object]"===Object.prototype.toString.call(e)}const qe=function(){return this.xf["@@transducer/init"]()},Re=function(e){return this.xf["@@transducer/result"](e)};var Be=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=qe,e.prototype["@@transducer/result"]=Re,e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.xf["@@transducer/step"](e,t):e},e}();function Le(e){return function(t){return new Be(e,t)}}var He=o(Ne(["fantasy-land/filter","filter"],Le,function(e,t){return _e(t)?W(function(s,n){return e(t[n])&&(s[n]=t[n]),s},{},x(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 Ue=He;const Ve=o(function(e,t){return Ue((s=e,function(){return!s.apply(this,arguments)}),t);var s});function Ge(e,t){var s=function(s){var n=t.concat([e]);return Me(s,n)?"<Circular>":Ge(s,n)},n=function(e,t){return Te(function(t){return De(t)+": "+s(e[t])},t.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+Te(s,e).join(", ")+"))";case"[object Array]":return"["+Te(s,e).concat(n(e,Ve(function(e){return/^\d+$/.test(e)},x(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):De($e(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())+")":De(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,x(e)).join(", ")+"}"}}const ze=i(function(e){return Ge(e,[])});const Xe=ne(function(e,t,s){return e(ae(t,s))});function Je(e){var t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t}const We=o(function(e,t){return e&&t});function Ke(e,t,s){for(var n=s.next();!n.done;)t=e(t,n.value),n=s.next();return t}function Ye(e,t,s,n){return s[n](e,t)}const Qe=ge(W,Ye,Ke);var Ze=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=qe,e.prototype["@@transducer/result"]=Re,e.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},e}();const et=function(e){return function(t){return new Ze(e,t)}};function tt(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):ue(Math.max(0,o),tt(e,n,s))}}var st=o(function(e,t){return 1===e?i(t):ue(e,tt(e,[],t))});const nt=st;var rt=o(Ne(["fantasy-land/map","map"],et,function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return nt(t.length,function(){return e.call(this,t.apply(this,arguments))});case"[object Object]":return W(function(s,n){return s[n]=e(t[n]),s},{},x(t));default:return Te(e,t)}}));const it=rt;const ot=o(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))}:Qe(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,it(s,t))},[],e)});var ct=o(function(e,t){var s=nt(e,t);return nt(e,function(){return W(ot,it(s,arguments[0]),Array.prototype.slice.call(arguments,1))})});const at=ct;var lt=i(function(e){return at(e.length,e)});const ut=lt;const pt=o(function(e,t){return Je(e)?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:ut(We)(e,t)});const ht=E(null);const dt=ut(i(function(e){return!e}));const mt=dt(ht);function ft(e){return ft="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},ft(e)}const gt=function(e){return"object"===ft(e)};const yt=nt(1,pt(mt,gt));const xt=o(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=ze(e),o=s(i,ze(t));return void 0!==o&&o===i?e:t});const wt=o(function(e,t){return it(oe(e),t)});const bt=i(function(e){return nt(Se(xt,0,wt("length",e)),function(){for(var t=0,s=e.length;t<s;){if(e[t].apply(this,arguments))return!0;t+=1}return!1})});const vt=nt(1,je(w,Fe("GeneratorFunction")));const Et=nt(1,je(w,Fe("AsyncFunction")));const Ot=bt([je(w,Fe("Function")),vt,Et]);var St=je(w,Fe("Object")),Pt=je(ze,E(ze(Object))),kt=Xe(pt(Ot,Pt),["constructor"]);const It=nt(1,function(e){if(!yt(e)||!St(e))return!1;var t=Object.getPrototypeOf(e);return!!ht(t)||kt(t)});const jt=nt(1,je(w,Fe("String")));var At=i(function(e){return nt(e.length,e)});const Ft=At;const Mt=o(function(e,t){return nt(e+1,function(){var s=arguments[e];if(null!=s&&Je(s[t]))return s[t].apply(s,Array.prototype.slice.call(arguments,0,e));throw new TypeError(ze(s)+' does not have a method named "'+t+'"')})});const Tt=Mt(1,"split");var Dt=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=qe,e.prototype["@@transducer/result"]=Re,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 Ct(e){return function(t){return new Dt(e,t)}}const $t=o(Ne(["dropWhile"],Ct,function(e,t){for(var s=0,n=t.length;s<n&&e(t[s]);)s+=1;return ke(s,1/0,t)}));const Nt=Mt(1,"join");var _t=i(function(e){return nt(e.length,function(t,s){var n=Array.prototype.slice.call(arguments,0);return n[0]=s,n[1]=t,e.apply(this,n)})});const qt=_t(o(Me));const Rt=Ft(function(e,t){return je(Tt(""),$t(qt(e)),Nt(""))(t)}),Bt=new WeakMap,Lt=e=>{if(Bt.has(e))return Bt.get(e);const t={},s=(e,n,r)=>("string"==typeof e.element&&(t[e.element]=e.$visitor?[...r,"$visitor"]:r),Y((e,t)=>{const i=[...r,t];if(It(e)&&se("$ref",e)&&ce(jt,"$ref",e)){const t=le(["$ref"],e),s=Rt("#/",t),r=le(s.split("/"),n),{$ref:i,...o}=e;return Object.keys(o).length>0&&It(r)?{...r,...o}:r}return It(e)?s(e,n,i):e},e)),n=s(e,e,[]);return n.elementMap=t,Bt.set(e,n),n};const Ht=class extends M{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 Ut=class extends M{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)}};function Vt(e){return new RegExp(e.source,e.flags?e.flags:(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.sticky?"y":"")+(e.unicode?"u":"")+(e.dotAll?"s":""))}function Gt(e,t,s){if(s||(s=new zt),function(e){var t=typeof e;return null==e||"object"!=t&&"function"!=t}(e))return e;var n=function(n){var r=s.get(e);if(r)return r;for(var i in s.set(e,n),e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=t?Gt(e[i],!0,s):e[i]);return n};switch(w(e)){case"Object":return n(Object.create(Object.getPrototypeOf(e)));case"Array":return n(Array(e.length));case"Date":return new Date(e.valueOf());case"RegExp":return Vt(e);case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return e.slice();default:return e}}var zt=function(){function e(){this.map={},this.length=0}return e.prototype.set=function(e,t){var s=this.hash(e),n=this.map[s];n||(this.map[s]=n=[]),n.push([e,t]),this.length+=1},e.prototype.hash=function(e){var t=[];for(var s in e)t.push(Object.prototype.toString.call(e[s]));return t.join()},e.prototype.get=function(e){if(this.length<=180)for(var t in this.map)for(var s=this.map[t],n=0;n<s.length;n+=1){if((i=s[n])[0]===e)return i[1]}else{var r=this.hash(e);if(s=this.map[r])for(n=0;n<s.length;n+=1){var i;if((i=s[n])[0]===e)return i[1]}}},e}();const Xt=i(function(e){return null!=e&&"function"==typeof e.clone?e.clone():Gt(e,!0)}),Jt=e=>void 0!==e.style,Wt=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,Kt=(e,t)=>0===t.length||!!B(e)&&(!e.isMetaEmpty&&(!!e.hasMetaProperty("classes")&&t.every(t=>e.classes.includes(t))));class Yt extends ${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(Zt).join("");const a=new Yt(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=es(t,n);s.push(e.value),n=e.next}return s}(this.content))}}const Qt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Zt(e){let t=e>>>0,s="";do{let e=31&t;t>>>=5,0!==t&&(e|=32),s+=Qt[e]}while(0!==t);return s}function es(e,t=0){let s=0,n=0,r=t;for(;;){const t=e[r++],i=Qt.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 ts=Yt;class ss 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 ns=ss;class rs extends Error{static[Symbol.hasInstance](e){return super[Symbol.hasInstance](e)||Function.prototype[Symbol.hasInstance].call(ns,e)}constructor(e,t){super(e,t),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const is=rs;const os=class extends is{constructor(e,t){if(super(e,t),null!=t&&"object"==typeof t){const{cause:e,...s}=t;Object.assign(this,s)}}};const cs=class extends os{value;constructor(e,t){super(e,t),void 0!==t&&(this.value=t.value)}};const as=class extends cs{};const ls=class extends cs{},us=(e,t)=>{const{visited:s=new WeakMap}=t,n={...t,visited:s};if(s.has(e))return s.get(e);const r=ms(e);s.set(e,r);const{content:i}=e;return Array.isArray(i)?r.content=i.map(e=>us(e,n)):B(i)?r.content=us(i,n):r.content=i instanceof O?ps(i,n):i,r},ps=(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?us(r,n):void 0,c=void 0!==i?us(i,n):void 0,a=new O(o,c);return s.set(e,a),a},hs=(e,t={})=>{if(e instanceof O)return ps(e,t);if(e instanceof P)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=>us(e,n)),i=new P(r);return s.set(e,i),i})(e,t);if(B(e))return us(e,t);throw new as("Value provided to cloneDeep function couldn't be cloned",{value:e})};hs.safe=e=>{try{return hs(e)}catch{return e}};const ds=e=>{const{key:t,value:s}=e;return new O(t,s)},ms=e=>{const t=new(0,e.constructor);t.element=e.element,e.isMetaEmpty||(t.meta=hs(e.meta)),e.isAttributesEmpty||(t.attributes=hs(e.attributes)),Wt(e)&&ts.transfer(e,t),Jt(e)&&(t.style=Xt(e.style));const{content:s}=e;return B(s)?t.content=ms(s):Array.isArray(s)?t.content=[...s]:t.content=s instanceof O?ds(s):s,t},fs=e=>{if(e instanceof O)return ds(e);if(e instanceof P)return(e=>{const t=[...e];return new P(t)})(e);if(B(e))return ms(e);throw new ls("Value provided to cloneShallow function couldn't be cloned",{value:e})};fs.safe=e=>{try{return fs(e)}catch{return e}};const gs=class extends I{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 ys=class extends I{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 xs=class extends ${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 ws=class extends ${constructor(e,t,s){super(e,t,s),this.element="comment"}};const bs=class extends R{constructor(e,t,s){super(e,t,s),this.element="parseResult"}get api(){return this.filter(e=>Kt(e,["api"])).first}get results(){return this.filter(e=>Kt(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&&Kt(e,["warning"]))}get errors(){return this.filter(e=>"annotation"===e.element&&Kt(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)}},vs=e=>e instanceof gs,Es=e=>e instanceof ys,Os=e=>{if(!B(e))return e;if(L(e)||H(e)||V(e)||U(e))return e.toValue();const t=new WeakMap,s=e=>{if(!B(e))return e;if(z(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(G(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 Es(e)?String(e.toValue()):vs(e)?L(e.href)?e.href.toValue():"":e.toValue()};return s(e)},Ss=e=>{const t=e.isMetaEmpty?void 0:hs(e.meta),s=e.isAttributesEmpty?void 0:hs(e.attributes);return new e.constructor(void 0,t,s)},Ps=(e,t)=>t.clone&&t.isMergeableElement(e)?Is(Ss(e),e,t):e,ks={clone:!0,isMergeableElement:e=>z(e)||G(e),arrayElementMerge:(e,t,s)=>new(0,e.constructor)(e.concat(t).map(e=>Ps(e,s))),objectElementMerge:(e,t,s)=>{const n=z(e)?Ss(e):Ss(t);return z(e)&&e.forEach((e,t,r)=>{const i=fs(r);i.value=Ps(e,s),n.content.push(i)}),t.forEach((t,r,i)=>{const o=Os(r);let c;if(z(e)&&e.hasKey(o)&&s.isMergeableElement(t)){const n=e.get(o);c=fs(i),c.value=((e,t)=>{if("function"!=typeof t.customMerge)return Is;const s=t.customMerge(e,t);return"function"==typeof s?s:Is})(r,s)(n,t,s)}else c=fs(i),c.value=Ps(t,s);n.remove(o),n.content.push(c)}),n},customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0},Is=(e,t,s)=>{const n={...ks,...s};n.isMergeableElement=n.isMergeableElement??ks.isMergeableElement,n.arrayElementMerge=n.arrayElementMerge??ks.arrayElementMerge,n.objectElementMerge=n.objectElementMerge??ks.objectElementMerge;const r=G(t);if(!(r===G(e)))return Ps(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=>hs(e):e.customMetaMerge)(n)(e.meta,t.meta),i.attributes=(e=>"function"!=typeof e.customAttributesMerge?e=>hs(e):e.customAttributesMerge)(n)(e.attributes,t.attributes),i};Is.all=(e,t)=>{if(!Array.isArray(e))throw new TypeError("First argument of deepmerge should be an array.");return 0===e.length?new M:e.reduce((e,s)=>Is(e,s,t),Ss(e[0]))};const js=Is;class As extends M{constructor(e,t,s){super(e,t,s),this.element="__styles__"}static transfer(e,t){t.style=e.style}static from(e){if(e.style)return new As(e.style)}applyTo(e){e.style=this.toValue()}}const Fs=As;const Ms=class{element;constructor(e){Object.assign(this,e)}copyMetaAndAttributes(e,t){if(!e.isMetaEmpty||!t.isMetaEmpty){const s=t.isMetaEmpty?new M:t.meta,n=e.isMetaEmpty?new M:e.meta;t.meta=js(s,n)}if(!e.isAttributesEmpty||!t.isAttributesEmpty){const s=t.isAttributesEmpty?new M:t.attributes,n=e.isAttributesEmpty?new M:e.attributes;t.attributes=js(s,n)}ts.transfer(e,t),Fs.transfer(e,t)}};const Ts=class extends Ms{enter(e){this.element=hs(e.node),e.stop()}};const Ds=i(function(e){return function(){return e}});const Cs=o(function(e,t){return null==t||t!=t?e:t});const $s=Ds(void 0);const Ns=E($s());const _s=i(function(e){return nt(Se(xt,0,wt("length",e)),function(){for(var t=0,s=e.length;t<s;){if(!e[t].apply(this,arguments))return!1;t+=1}return!0})});var qs=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:he(e)?[]:de(e)?"":_e(e)?{}:h(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 Rs=qs;const Bs=i(function(e){return null!=e&&E(e,Rs(e))});const Ls=i(function(e){return!Bs(e)});const Hs=o(function(e,t){return e||t});const Us=nt(1,pt(mt,o(function(e,t){return Je(e)?function(){return e.apply(this,arguments)||t.apply(this,arguments)}:ut(Hs)(e,t)})(gt,Ot)));var Vs=dt(Us);const Gs=_s([jt,Vs,Ls]);const zs=o(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}),Xs=function(){const e=Ws,t=Js,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,m=0,f=0,g=new function(){this.state=e.ACTIVE,this.phraseLength=0,this.refresh=()=>{this.state=e.ACTIVE,this.phraseLength=0}};s.parse=(y,x,b,v)=>{const E=`${n}parse(): `;p=0,h=0,d=0,m=0,f=0,r=void 0,i=void 0,o=void 0,c=void 0,g.refresh(),a=void 0,l=void 0,u=void 0,c=t.stringToChars(b),r=y.rules,i=y.udts;const O=x.toLowerCase();let S;for(const e in r)if(r.hasOwnProperty(e)&&O===r[e].lower){S=r[e].index;break}if(void 0===S)throw new Error(`${E}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:S}],w(0,0),o=void 0;let P=!1;switch(g.state){case e.ACTIVE:throw new Error(`${E}final state should never be 'ACTIVE'`);case e.NOMATCH:P=!1;break;case e.EMPTY:case e.MATCH:P=g.phraseLength===c.length;break;default:throw new Error("unrecognized state")}return{success:P,state:g.state,stateName:e.idName(g.state),length:c.length,matched:g.phraseLength,maxMatched:f,maxTreeDepth:d,nodeHits:m}};const y=(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,m;const f=o[t],y=i[f.index];g.UdtIndex=y.index,p||(m=s.ast&&s.ast.udtDefined(f.index),m&&(d=r.length+f.index,h=s.ast.getLength(),s.ast.down(d,y.name)));const x=c.length-a;l[f.index](g,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}`)}})(y,g,x),p||m&&(g.state===e.NOMATCH?s.ast.setLength(h):s.ast.up(d,y.name,a,g.phraseLength))},w=(t,i)=>{const l=`${n}opExecute(): `,b=o[t];switch(m+=1,h>d&&(d=h),h+=1,g.refresh(),s.trace&&s.trace.down(b,i),b.type){case e.ALT:((t,s)=>{const n=o[t];for(let t=0;t<n.children.length&&(w(n.children[t],s),g.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(w(l.children[t],c),g.state===e.NOMATCH){r=!1;break}c+=g.phraseLength,a+=g.phraseLength}r?(g.state=0===a?e.EMPTY:e.MATCH,g.phraseLength=a):(g.state=e.NOMATCH,g.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 g.state=e.EMPTY,void(g.phraseLength=0);for(i=n,a=0,l=0,s.ast&&(r=s.ast.getLength());!(i>=c.length)&&(w(t+1,i),g.state!==e.NOMATCH)&&g.state!==e.EMPTY&&(l+=1,a+=g.phraseLength,i+=g.phraseLength,l!==u.max););g.state===e.EMPTY||l>=u.min?(g.state=0===a?e.EMPTY:e.MATCH,g.phraseLength=a):(g.state=e.NOMATCH,g.phraseLength=0,s.ast&&s.ast.setLength(r))})(t,i);break;case e.RNM:((t,n)=>{let i,l,h;const d=o[t],m=r[d.index],f=a[m.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))),f){const t=c.length-n;f(g,c,n,u),y(m,g,t,!0),g.state===e.ACTIVE&&(h=o,o=m.opcodes,w(0,n),o=h,f(g,c,n,u),y(m,g,t,!1))}else h=o,o=m.opcodes,w(0,n,g),o=h;p||l&&(g.state===e.NOMATCH?s.ast.setLength(i):s.ast.up(d.index,m.name,n,g.phraseLength))})(t,i);break;case e.TRG:((t,s)=>{const n=o[t];g.state=e.NOMATCH,s<c.length&&n.min<=c[s]&&c[s]<=n.max&&(g.state=e.MATCH,g.phraseLength=1)})(t,i);break;case e.TBS:((t,s)=>{const n=o[t],r=n.string.length;if(g.state=e.NOMATCH,s+r<=c.length){for(let e=0;e<r;e+=1)if(c[s+e]!==n.string[e])return;g.state=e.MATCH,g.phraseLength=r}})(t,i);break;case e.TLS:((t,s)=>{let n;const r=o[t];g.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;g.state=e.MATCH,g.phraseLength=i}}else g.state=e.EMPTY})(t,i);break;case e.UDT:x(t,i);break;case e.AND:((t,s)=>{switch(p+=1,w(t+1,s),p-=1,g.phraseLength=0,g.state){case e.EMPTY:case e.MATCH:g.state=e.EMPTY;break;case e.NOMATCH:g.state=e.NOMATCH;break;default:throw new Error(`opAND: invalid state ${g.state}`)}})(t,i);break;case e.NOT:((t,s)=>{switch(p+=1,w(t+1,s),p-=1,g.phraseLength=0,g.state){case e.EMPTY:case e.MATCH:g.state=e.NOMATCH;break;case e.NOMATCH:g.state=e.EMPTY;break;default:throw new Error(`opNOT: invalid state ${g.state}`)}})(t,i);break;default:throw new Error(`${l}unrecognized operator`)}p||i+g.phraseLength>f&&(f=i+g.phraseLength),s.stats&&s.stats.collect(b,g),s.trace&&s.trace.up(b,g.state,i,g.phraseLength),h-=1}},Js={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)}},Ws={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 Ws.ALT:return"ALT";case Ws.CAT:return"CAT";case Ws.REP:return"REP";case Ws.RNM:return"RNM";case Ws.TRG:return"TRG";case Ws.TBS:return"TBS";case Ws.TLS:return"TLS";case Ws.UDT:return"UDT";case Ws.AND:return"AND";case Ws.NOT:return"NOT";case Ws.ACTIVE:return"ACTIVE";case Ws.EMPTY:return"EMPTY";case Ws.MATCH:return"MATCH";case Ws.NOMATCH:return"NOMATCH";case Ws.SEM_PRE:return"SEM_PRE";case Ws.SEM_POST:return"SEM_POST";case Ws.SEM_OK:return"SEM_OK";default:return"UNRECOGNIZED STATE"}}};function Ks(){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 Ys 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 Qs=Ys;new Ks;new Ks,new Xs,new Ks,new Xs,new Ks,new Xs,new Ks,new Xs;const Zs=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 en=class extends Qs{},tn=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 Zs(String(e))}).join("/")}`}catch(t){throw new en("Unexpected error during JSON Pointer compilation",{cause:t,referenceTokens:e})}};class sn extends Error{constructor(e,t=void 0){if(super(e,t),this.name=this.constructor.name,"string"==typeof e&&(this.message=e),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack,null!=t&&"object"==typeof t&&Object.hasOwn(t,"cause")&&!("cause"in this)){const{cause:e}=t;this.cause=e,e instanceof Error&&"stack"in e&&(this.stack=`${this.stack}\nCAUSE: ${e.stack}`)}if(null!=t&&"object"==typeof t){const{cause:e,...s}=t;Object.assign(this,s)}}}const nn=sn;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 rn=class extends nn{},on=e=>{if(!Array.isArray(e))throw new rn("Selectors must be an array, got: "+typeof e,{selectors:e});try{return`$${e.map(e=>{if("string"==typeof e)return`['${(e=>{if("string"!=typeof e)throw new TypeError("Selector must be a string");let t="";for(const 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})(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 rn("Failed to compile normalized JSONPath",{cause:t,selectors:e})}},cn=(e,t,s,n)=>{const{realm:r}=e,{value:i}=s;if(r.isObject(t)&&r.hasProperty(t,i)){n(r.getProperty(t,i),i)}},an=(e,t,s,n)=>{const{realm:r}=e,{value:i}=s;if(!r.isArray(t))return;const o=r.getLength(t),c=((e,t)=>e>=0?e:t+e)(i,o);if(c>=0&&c<o){n(r.getElement(t,c),c)}},ln=(e,t,s,n)=>{const{realm:r}=e;for(const[e,s]of r.entries(t))n(s,e)},un=(e,t)=>e>=0?Math.min(e,t):Math.max(t+e,0),pn=(e,t,s,n)=>{const{realm:r}=e,{start:i,end:o,step:c}=s;if(!r.isArray(t))return;const a=((e,t,s,n)=>{const r=s??1;if(0===r)return null;let i,o;if(r>0){const s=0,r=n,c=null!==e?un(e,n):s,a=null!==t?un(t,n):r;i=Math.max(c,0),o=Math.min(a,n)}else{const s=n-1,r=-n-1,c=null!==e?e>=0?Math.min(e,n-1):Math.max(n+e,-1):s,a=null!==t?t>=0?Math.min(t,n-1):Math.max(n+t,-1):r;o=Math.min(c,n-1),i=Math.max(a,-1)}return{lower:i,upper:o,step:r}})(i,o,c,r.getLength(t));if(null===a)return;const{lower:l,upper:u,step:p}=a;if(p>0)for(let e=l;e<u;e+=p){n(r.getElement(t,e),e)}else for(let e=u;e>l;e+=p){n(r.getElement(t,e),e)}},hn=(e,t,s,n)=>n.value,dn=(e,t,s)=>{const{realm:n}=e,{selector:r}=s;switch(r.type){case"NameSelector":{const{value:e}=r;return n.isObject(t)&&n.hasProperty(t,e)?n.getProperty(t,e):void 0}case"IndexSelector":{const{value:e}=r;if(!n.isArray(t))return;const s=n.getLength(t),i=e>=0?e:s+e;return i>=0&&i<s?n.getElement(t,i):void 0}default:return}},mn=(e,t,s,n)=>{const{selectors:r}=s;for(const s of r)kn(e,t,s,n)},fn=(e,t,s)=>{const n=[],r=e=>{n.push(e)},{selector:i}=s;switch(i.type){case"BracketedSelection":mn(e,t,i,r);break;case"NameSelector":case"WildcardSelector":case"IndexSelector":case"SliceSelector":case"FilterSelector":kn(e,t,i,r)}return n},gn=(e,t,s,n)=>{let r=s;for(const t of n){const s=[];if("DescendantSegment"===t.type){const n=r=>{const{realm:i}=e,o=fn(e,r,t);s.push(...o);for(const[,e]of i.entries(r))n(e)};for(const e of r)n(e)}else for(const n of r){const r=fn(e,n,t);s.push(...r)}r=s}return r},yn=(e,t,s,n)=>{const{query:r}=n;let i;switch(r.type){case"RelQuery":i=((e,t,s,n)=>{const{segments:r}=n;return 0===r.length?[s]:gn(e,0,[s],r)})(e,0,s,r);break;case"JsonPathQuery":i=((e,t,s,n)=>{const{segments:r}=n;return 0===r.length?[t]:gn(e,0,[t],r)})(e,t,0,r);break;default:i=[]}return o=i,Object.defineProperty(o,"_isNodelist",{value:!0,enumerable:!1,writable:!1}),o;var o};let xn;const wn=(e,t,s,n)=>{const{name:r,arguments:i}=n,o=e.functions[r];if("function"!=typeof o)return;const c=i.map(n=>((e,t,s,n)=>{switch(n.type){case"Literal":case"RelSingularQuery":case"AbsSingularQuery":case"FunctionExpr":return bn(e,t,s,n);case"FilterQuery":return yn(e,t,s,n);case"TestExpr":return"FilterQuery"===n.expression.type?yn(e,t,s,n.expression):"FunctionExpr"===n.expression.type?bn(e,t,s,n.expression):xn(e,t,s,n);case"LogicalOrExpr":case"LogicalAndExpr":case"LogicalNotExpr":case"ComparisonExpr":return xn(e,t,s,n);default:return}})(e,t,s,n));return o(e.realm,...c)},bn=(e,t,s,n)=>{switch(n.type){case"Literal":return hn(e,t,s,n);case"RelSingularQuery":return((e,t,s,n)=>{let r=s;for(const t of n.segments)if(r=dn(e,r,t),void 0===r)return;return r})(e,0,s,n);case"AbsSingularQuery":return((e,t,s,n)=>{let r=t;for(const t of n.segments)if(r=dn(e,r,t),void 0===r)return;return r})(e,t,0,n);case"FunctionExpr":return wn(e,t,s,n);default:return}},vn=(e,t,s,n)=>{const{left:r,op:i,right:o}=n,c=bn(e,t,s,r),a=bn(e,t,s,o);return e.realm.compare(c,i,a)},En=e=>Array.isArray(e),On=(e,t,s,n)=>{switch(n.type){case"LogicalOrExpr":return!!On(e,t,s,n.left)||On(e,t,s,n.right);case"LogicalAndExpr":return!!On(e,t,s,n.left)&&On(e,t,s,n.right);case"LogicalNotExpr":return!On(e,t,s,n.expression);case"TestExpr":{const{expression:r}=n;if("FilterQuery"===r.type){return yn(e,t,s,r).length>0}if("FunctionExpr"===r.type){const n=wn(e,t,s,r);return"boolean"==typeof n?n:void 0!==n&&(En(n)?n.length>0:Boolean(n))}return!1}case"ComparisonExpr":return vn(e,t,s,n);default:return!1}};xn=On;const Sn=On,Pn=(e,t,s,n)=>{const{realm:r,root:i}=e,{expression:o}=s;for(const[s,c]of r.entries(t)){Sn(e,i,c,o)&&n(c,s)}},kn=(e,t,s,n)=>{switch(s.type){case"NameSelector":cn(e,t,s,n);break;case"IndexSelector":an(e,t,s,n);break;case"WildcardSelector":ln(e,t,s,n);break;case"SliceSelector":pn(e,t,s,n);break;case"FilterSelector":Pn(e,t,s,n)}};new Map;class In{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;){const{key:s,parent:n,parentPath:r}=t;if(X(n)&&"value"===s){if(!L(n.key))throw new TypeError("MemberElement.key must be a StringElement");e.unshift(n.key.toValue())}else G(r?.node)&&"number"==typeof s&&e.unshift(s);t=t.parentPath}return e}formatPath(e="jsonpointer"){const t=this.getPathKeys();return 0===t.length?"jsonpath"===e?"$":"":"jsonpath"===e?on(t):tn(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}}const jn=nt(1,pt(Us,je(ze,E("[object Promise]")))),An=e=>{const t=e?.element;return void 0===t||"element"===t?"Element":`${t.charAt(0).toUpperCase()}${t.slice(1)}Element`},Fn=e=>B(e),Mn=e=>fs(e),Tn=(e,t,s)=>{X(e)?e.value=s:Array.isArray(e)?e[t]=null===s?void 0:s:null===s?delete e[t]:e[t]=s},Dn=e=>X(e)?["key","value"]:G(e)||z(e)?["content"]:[],Cn=(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]}},$n=(e,t,s)=>{if(void 0===t)return null;const n=e,r=s?"leave":"enter",i=Cn(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=Cn(o,t);if("function"==typeof e)return e}return null},Nn=(e,t={})=>{const{visitFnGetter:s=$n,nodeTypeGetter:n=An,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=qn(t,a),n=i.call(e[u],s);if(jn(n))throw new os("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=qn(t,r),n=i.call(e[a],s);if(jn(n))throw new os("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)}}},_n=(e,t={})=>{const{visitFnGetter:s=$n,nodeTypeGetter:n=An,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=qn(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=qn(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 qn(e,t){return new In(t,e.parent,e.parentPath,e.key,e.inList)}function*Rn(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,m=Array.isArray(e),f=[e],g=-1,y=[],x=e,w=null,b=null;const v=[];do{g+=1;const e=g===f.length;let s;const E=e&&0!==y.length;if(e){if(s=0===v.length?void 0:w?.key,x=d,d=v.pop(),b=w?.parentPath?.parentPath??null,E)if(l)for(const[e,t]of y)u(x,e,t);else if(m){x=x.slice();let e=0;for(const[t,s]of y){const n=t-e;null===s?(x.splice(n,1),e+=1):x[n]=s}}else{x=c(x);for(const[e,t]of y)x[e]=t}if(void 0!==h){g=h.index,f=h.keys,y=h.edits;const e=h.inArray;if(b=h.parentPath,h=h.prev,E&&!l){const t=e?g:f[g];y.push([t,x])}m=e}}else if(void 0!==d&&(s=m?g:f[g],x=d[s],void 0===x))continue;if(!Array.isArray(x)){if(!o(x))throw new os(`Invalid AST Node: ${String(x)}`,{node:x});if(a&&v.includes(x))continue;w=new In(x,d,b,s,m);const n=$n(t,i(x),e);if(n){for(const[e,s]of Object.entries(r))t[e]=s;const i=yield{visitFn:n,path:w,isLeaving:e};if(w.shouldStop)break;if(w.shouldSkip&&!e)continue;if(w.removed){if(y.push([s,null]),!e)continue}else if(w._wasReplaced()){const t=w._getReplacementNode();if(y.push([s,t]),!e){if(!o(t))continue;x=t}}else if(void 0!==i&&(y.push([s,i]),!e)){if(!o(i))continue;x=i}w._markStale()}}if(!e){if(h={inArray:m,index:g,keys:f,edits:y,parentPath:b,prev:h},m=Array.isArray(x),m)f=x;else if(p)f=n(x);else{const e=i(x);f=void 0!==e?n[e]??[]:[]}g=-1,y=[],void 0!==d&&v.push(d),d=x,b=w}}while(void 0!==h);return 0!==y.length?y.at(-1)[1]:e}Nn[Symbol.for("nodejs.util.promisify.custom")]=_n;const Bn=(e,t,s={})=>{const n=Rn(e,t,{keyMap:s.keyMap??Dn,state:s.state??{},nodeTypeGetter:s.nodeTypeGetter??An,nodePredicate:s.nodePredicate??Fn,nodeCloneFn:s.nodeCloneFn??Mn,detectCycles:s.detectCycles??!0,mutable:s.mutable??!1,mutationFn:s.mutationFn??Tn});let r=n.next();for(;!r.done;){const e=r.value,s=e.visitFn.call(t,e.path);if(jn(s))throw new os("Async visitor not supported in sync mode",{visitor:t,visitFn:e.visitFn});r=n.next(s)}return r.value},Ln=async(e,t,s={})=>{const n=Rn(e,t,{keyMap:s.keyMap??Dn,state:s.state??{},nodeTypeGetter:s.nodeTypeGetter??An,nodePredicate:s.nodePredicate??Fn,nodeCloneFn:s.nodeCloneFn??Mn,detectCycles:s.detectCycles??!0,mutable:s.mutable??!1,mutationFn:s.mutationFn??Tn});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};Bn[Symbol.for("nodejs.util.promisify.custom")]=Ln,In.prototype.traverse=function(e,t){return Bn(this.node,e,t)},In.prototype.traverseAsync=function(e,t){return Ln(this.node,e,t)};const Hn=class extends Ms{specObj;passingOptionsNames=["specObj","parent"];constructor({specObj:e,...t}){super({...t}),this.specObj=e}retrievePassingOptions(){return zs(this.passingOptionsNames,this)}retrieveFixedFields(e){const t=le(["visitors",...e,"fixedFields"],this.specObj);return"object"==typeof t&&null!==t?Object.keys(t):[]}retrieveVisitor(e){return Xe(Ot,["visitors",...e],this.specObj)?le(["visitors",...e],this.specObj):le(["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 Ts&&n?.constructor===Ts?hs(t):(Bn(t,n,s),n.element)}};const Un=class extends Hn{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=Os(t);if(L(t)&&n.includes(i)&&!this.ignoredFields.includes(i)){const n=this.toRefractedElement([...s,"fixedFields",i],e),o=new F(hs(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(hs(r))}),this.copyMetaAndAttributes(t,this.element),e.stop()}},Vn=(e,t,s=[])=>{const n=Object.getOwnPropertyDescriptors(t);for(let e of s)delete n[e];Object.defineProperties(e,n)},Gn=(e,t=[e])=>{const s=Object.getPrototypeOf(e);return null===s?t:Gn(s,[...t,s])},zn=(e,t,s=[])=>{var n;const r=null!==(n=((...e)=>{if(0===e.length)return;let t;const s=e.map(e=>Gn(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=Gn(r);for(let t of e){let e=Gn(t);for(let t=e.length-1;t>=0;t--){let n=e[t];-1===o.indexOf(n)&&(Vn(i,n,["constructor",...s]),o.push(n))}}return i.constructor=t,i},Xn=e=>e.filter((t,s)=>e.indexOf(t)==s),Jn=(e,t)=>{const s=t.map(e=>Gn(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++}},Wn=(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(Jn(s,e)||{},s),defineProperty(){throw new Error("Cannot define new properties on Proxies created by ts-mixer")},has:(s,n)=>void 0!==Jn(n,e)||void 0!==t[n],get:(s,n)=>(Jn(n,e)||t)[n],set(t,s,n){const r=Jn(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)))}),Kn=null,Yn="copy",Qn="copy",Zn="deep",er=new WeakMap,tr=e=>er.get(e),sr=(e,t)=>{var s,n;const r=Xn([...Object.getOwnPropertyNames(e),...Object.getOwnPropertyNames(t)]),i={};for(let o of r)i[o]=Xn([...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},nr=(e,t)=>{var s,n,r,i;return{property:sr(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:sr(null!==(r=null==e?void 0:e.method)&&void 0!==r?r:{},null!==(i=null==t?void 0:t.method)&&void 0!==i?i:{})}},rr=(e,t)=>{var s,n,r,i,o,c;return{class:Xn([...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:nr(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:nr(null!==(o=null==e?void 0:e.instance)&&void 0!==o?o:{},null!==(c=null==t?void 0:t.instance)&&void 0!==c?c:{})}},ir=new Map,or=(...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=[...Gn(e.prototype).map(e=>e.constructor),...null!==(t=tr(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=>ir.get(e)).filter(e=>!!e);return 0==t.length?{}:1==t.length?t[0]:t.reduce((e,t)=>rr(e,t))},cr=e=>{let t=ir.get(e);return t||(t={},ir.set(e,t)),t};function ar(...e){var t,s,n;const r=e.map(e=>e.prototype),i=Kn;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)Vn(this,new s(...t));null!==i&&"function"==typeof this[i]&&this[i].apply(this,t)}var c,a;o.prototype="copy"===Qn?zn(r,o):(c=r,a=o,Wn([...c,{constructor:a}])),Object.setPrototypeOf(o,"copy"===Yn?zn(e,null,["prototype"]):Wn(e,Function.prototype));let l=o;if("none"!==Zn){const r="deep"===Zn?or(...e):((...e)=>{const t=e.map(e=>cr(e));return 0===t.length?{}:1===t.length?t[0]:t.reduce((e,t)=>rr(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)}lr(null!==(s=null==r?void 0:r.static)&&void 0!==s?s:{},l),lr(null!==(n=null==r?void 0:r.instance)&&void 0!==n?n:{},l.prototype)}var u,p;return u=l,p=e,er.set(u,p),l}const lr=(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 ur=function(){return!1};const pr=class extends Hn{specPath;ignoredFields;fieldPatternPredicate=ur;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=Os(t);if(!this.ignoredFields.includes(n)&&this.fieldPatternPredicate(n)){const n=this.specPath(e),r=this.toRefractedElement(n,e),i=new F(hs(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(hs(s))}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const hr=class extends pr{constructor(e){super(e),this.fieldPatternPredicate=Gs}};const dr=class{parent;constructor({parent:e}){this.parent=e}},mr=ar(Un,dr,Ts),fr=ar(Un,Ts),gr=ar(Un,Ts),yr=ar(Un,Ts),xr=ar(Hn,dr,Ts),wr=ar(Hn,dr,Ts),br=ar(Hn,dr,Ts),vr=ar(Hn,dr,Ts),Er=ar(Hn,dr,Ts),Or=ar(hr,dr,Ts),Sr=ar(hr,dr,Ts),Pr=ar(hr,dr,Ts),kr=ar(hr,dr,Ts);const Ir=class extends mr{constructor(e){super(e),this.element=new T,this.specPath=Ds(["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,Un.prototype.ObjectElement.call(this,e)}handleDialectIdentifier(e){if(Ns(this.parent)&&!L(e.get("$schema")))this.element.meta.set("inheritedDialectIdentifier",this.defaultDialectIdentifier);else if(this.parent instanceof T&&!L(e.get("$schema"))){const e=Cs(Os(this.parent.meta.get("inheritedDialectIdentifier")),Os(this.parent.$schema));this.element.meta.set("inheritedDialectIdentifier",e)}}handleSchemaIdentifier(e,t="id"){const s=void 0!==this.parent?hs(this.parent.meta.get("ancestorsSchemaIdentifiers")??new R):new R,n=Os(e.get(t));Gs(n)&&s.push(n),this.element.meta.set("ancestorsSchemaIdentifiers",s)}};const jr=class extends vr{ObjectElement(e){const t=e.node,s=J(t)?["document","objects","JSONReference"]:["document","objects","JSONSchema"];this.element=this.toRefractedElement(s,t),e.stop()}ArrayElement(e){const t=e.node;this.element=new R,this.element.classes.push("json-schema-items"),t.forEach(e=>{const t=J(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Ar=class extends Ts{ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-required")}};const Fr=class extends kr{constructor(e){super(e),this.element=new M,this.element.classes.push("json-schema-properties"),this.specPath=e=>J(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const Mr=class extends Pr{constructor(e){super(e),this.element=new M,this.element.classes.push("json-schema-patternProperties"),this.specPath=e=>J(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const Tr=class extends Sr{constructor(e){super(e),this.element=new M,this.element.classes.push("json-schema-dependencies"),this.specPath=e=>J(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const Dr=class extends Ts{ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-enum")}};const Cr=class extends Ts{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 xr{constructor(e){super(e),this.element=new R,this.element.classes.push("json-schema-allOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=J(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Nr=class extends wr{constructor(e){super(e),this.element=new R,this.element.classes.push("json-schema-anyOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=J(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 br{constructor(e){super(e),this.element=new R,this.element.classes.push("json-schema-oneOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=J(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 Or{constructor(e){super(e),this.element=new M,this.element.classes.push("json-schema-definitions"),this.specPath=e=>J(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const Rr=class extends Er{constructor(e){super(e),this.element=new R,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 Br=class extends fr{constructor(e){super(e),this.element=new D,this.specPath=Ds(["document","objects","JSONReference"])}ObjectElement(e){Un.prototype.ObjectElement.call(this,e),L(this.element.$ref)&&this.element.classes.push("reference-element")}};const Lr=class extends Ts{StringElement(e){super.enter(e),this.element.classes.push("reference-value")}};const Hr=function(){return!0};const Ur=ne(function(e,t,s){return nt(Math.max(e.length,t.length,s.length),function(){return e.apply(this,arguments)?t.apply(this,arguments):s.apply(this,arguments)})});const Vr=i(function(e){return function(t,s){return e(t,s)?-1:e(s,t)?1:0}});var Gr=o(function(e,t){return Array.prototype.slice.call(t,0).sort(e)});const zr=Gr;const Xr=i(function(e){return ie(0,e)});function Jr(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}const Wr=i(Jr);const Kr=dt(Q);const Yr=nt(1,Ot(Array.isArray)?Array.isArray:je(w,Fe("Array")));const Qr=pt(Yr,Ls);function Zr(e){return function(e){if(Array.isArray(e))return ei(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 ei(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)?ei(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 ei(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 ti=je(zr(Vr(function(e,t){return e.length>t.length})),Xr,oe("length")),si=Ft(function(e,t,s){var n=s.apply(void 0,Zr(e));return Kr(n)?Wr(n):t});const ni=Ur(Qr,function(e){var t=ti(e);return nt(t,function(){for(var t=arguments.length,s=new Array(t),n=0;n<t;n++)s[n]=arguments[n];return Se(si(s),void 0,e)})},$s);const ri=class extends Hn{alternator;constructor({alternator:e,...t}){super({...t}),this.alternator=e}enter(e){const t=e.node,s=this.alternator.map(({predicate:e,specPath:t})=>Ur(e,Ds(t),$s)),n=ni(s)(t);this.element=this.toRefractedElement(n,t),e.stop()}};const ii=class extends ri{constructor(e){super(e),this.alternator=[{predicate:J,specPath:["document","objects","JSONReference"]},{predicate:Hr,specPath:["document","objects","JSONSchema"]}]}};const oi=class extends yr{constructor(e){super(e),this.element=new Ht,this.specPath=Ds(["document","objects","Media"])}};const ci={visitors:{value:Ts,JSONSchemaOrJSONReferenceVisitor:ii,document:{objects:{JSONSchema:{element:"jSONSchemaDraft4",$visitor:Ir,fixedFields:{id:{$ref:"#/visitors/value",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:ii,items:{$visitor:jr,alias:"itemsField"},maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:Ar,properties:Fr,additionalProperties:ii,patternProperties:Mr,dependencies:Tr,enum:Dr,type:Cr,allOf:$r,anyOf:Nr,oneOf:_r,not:ii,definitions:qr,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:Br,fixedFields:{$ref:Lr}},Media:{element:"media",$visitor:oi,fixedFields:{binaryEncoding:{$ref:"#/visitors/value"},type:{$ref:"#/visitors/value"}}},LinkDescription:{element:"linkDescription",$visitor:class extends gr{constructor(e){super(e),this.element=new Ut,this.specPath=Ds(["document","objects","LinkDescription"])}},fixedFields:{href:{$ref:"#/visitors/value"},rel:{$ref:"#/visitors/value"},title:{$ref:"#/visitors/value"},targetSchema:ii,mediaType:{$ref:"#/visitors/value"},method:{$ref:"#/visitors/value"},encType:{$ref:"#/visitors/value"},schema:ii}}}}}},ai=Lt(ci),li=e=>Object.entries(e).map(([e,t])=>It(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(T,"fixedFields",{get:()=>li(ai.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(D,"fixedFields",{get:()=>li(ai.visitors.document.objects.JSONReference.fixedFields),enumerable:!0}),Object.defineProperty(Ht,"fixedFields",{get:()=>li(ai.visitors.document.objects.Media.fixedFields),enumerable:!0}),Object.defineProperty(Ut,"fixedFields",{get:()=>li(ai.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const ui=i(function(e){return ie(-1,e)});const pi=class extends is{};const hi=class extends pi{};const di=class extends Array{unknownMediaType="application/octet-stream";filterByFormat(){throw new hi("filterByFormat method in MediaTypes class is not yet implemented.")}findBy(){throw new hi("findBy method in MediaTypes class is not yet implemented.")}latest(){throw new hi("latest method in MediaTypes class is not yet implemented.")}};class mi extends di{filterByFormat(e="generic"){const t="generic"===e?"openapi;version":e;return this.filter(e=>e.includes(t))}findBy(e="2.0",t="generic"){const s="generic"===t?`vnd.oai.openapi;version=${e}`:`vnd.oai.openapi+${t};version=${e}`;return this.find(e=>e.includes(s))||this.unknownMediaType}latest(e="generic"){return ui(this.filterByFormat(e))}}const fi=new mi("application/vnd.oai.openapi;version=2.0","application/vnd.oai.openapi+json;version=2.0","application/vnd.oai.openapi+yaml;version=2.0");const gi=class extends M{constructor(e,t,s){super(e,t,s),this.element="swagger",this.classes.push("api")}get swagger(){return this.get("swagger")}set swagger(e){this.set("swagger",e)}get info(){return this.get("info")}set info(e){this.set("info",e)}get host(){return this.get("host")}set host(e){this.set("host",e)}get basePath(){return this.get("basePath")}set basePath(e){this.set("basePath",e)}get schemes(){return this.get("schemes")}set schemes(e){this.set("schemes",e)}get consumes(){return this.get("consumes")}set consumes(e){this.set("consumes",e)}get produces(){return this.get("produces")}set produces(e){this.set("produces",e)}get paths(){return this.get("paths")}set paths(e){this.set("paths",e)}get definitions(){return this.get("definitions")}set definitions(e){this.set("definitions",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}get responses(){return this.get("responses")}set responses(e){this.set("responses",e)}get securityDefinitions(){return this.get("securityDefinitions")}set securityDefinitions(e){this.set("securityDefinitions",e)}get security(){return this.get("security")}set security(e){this.set("security",e)}get tags(){return this.get("tags")}set tags(e){this.set("tags",e)}get externalDocs(){return this.get("externalDocs")}set externalDocs(e){this.set("externalDocs",e)}};const yi=class extends ${constructor(e,t,s){super(e,t,s),this.element="swaggerVersion",this.classes.push("spec-version"),this.classes.push("version")}};const xi=class extends M{constructor(e,t,s){super(e,t,s),this.element="info",this.classes.push("info")}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 termsOfService(){return this.get("termsOfService")}set termsOfService(e){this.set("termsOfService",e)}get contact(){return this.get("contact")}set contact(e){this.set("contact",e)}get license(){return this.get("license")}set license(e){this.set("license",e)}get version(){return this.get("version")}set version(e){this.set("version",e)}};const wi=class extends M{constructor(e,t,s){super(e,t,s),this.element="contact"}get name(){return this.get("name")}set name(e){this.set("name",e)}get url(){return this.get("url")}set url(e){this.set("url",e)}get email(){return this.get("email")}set email(e){this.set("email",e)}};const bi=class extends M{constructor(e,t,s){super(e,t,s),this.element="license"}get name(){return this.get("name")}set name(e){this.set("name",e)}get url(){return this.get("url")}set url(e){this.set("url",e)}};const vi=class extends M{constructor(e,t,s){super(e,t,s),this.element="paths"}};const Ei=class extends M{constructor(e,t,s){super(e,t,s),this.element="pathItem"}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}get getField(){return this.get("get")}set getField(e){this.set("get",e)}get put(){return this.get("put")}set put(e){this.set("put",e)}get post(){return this.get("post")}set post(e){this.set("post",e)}get deleteField(){return this.get("delete")}set deleteField(e){this.set("delete",e)}get options(){return this.get("options")}set options(e){this.set("options",e)}get head(){return this.get("head")}set head(e){this.set("head",e)}get patch(){return this.get("patch")}set patch(e){this.set("patch",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}};const Oi=class extends M{constructor(e,t,s){super(e,t,s),this.element="operation"}get tags(){return this.get("tags")}set tags(e){this.set("tags",e)}get summary(){return this.get("summary")}set summary(e){this.set("summary",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}set externalDocs(e){this.set("externalDocs",e)}get externalDocs(){return this.get("externalDocs")}get operationId(){return this.get("operationId")}set operationId(e){this.set("operationId",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}get responses(){return this.get("responses")}set responses(e){this.set("responses",e)}get schemes(){return this.get("schemes")}set schemes(e){this.set("schemes",e)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new q(!1)}set deprecated(e){this.set("deprecated",e)}get security(){return this.get("security")}set security(e){this.set("security",e)}};const Si=class extends M{constructor(e,t,s){super(e,t,s),this.element="externalDocumentation"}get description(){return this.get("description")}set description(e){this.set("description",e)}get url(){return this.get("url")}set url(e){this.set("url",e)}};const Pi=class extends T{constructor(e,t,s){super(e,t,s),this.element="parameter",this.classes.push("json-schema-draft-4")}get idField(){throw new pi("idField getter in Parameter class is not not supported.")}set idField(e){throw new pi("idField setter in Parameter class is not not supported.")}get $schema(){throw new pi("$schema getter in Parameter class is not not supported.")}set $schema(e){throw new pi("$schema setter in Parameter class is not not supported.")}get additionalItems(){throw new pi("additionalItems getter in Parameter class is not not supported.")}set additionalItems(e){throw new pi("additionalItems setter in Parameter class is not not supported.")}get itemsField(){return this.get("items")}set itemsField(e){this.set("items",e)}get maxProperties(){throw new pi("maxProperties getter in Parameter class is not not supported.")}set maxProperties(e){throw new pi("maxProperties setter in Parameter class is not not supported.")}get minProperties(){throw new pi("minProperties getter in Parameter class is not not supported.")}set minProperties(e){throw new pi("minProperties setter in Parameter class is not not supported.")}get required(){return this.get("required")}set required(e){this.set("required",e)}get properties(){throw new pi("properties getter in Parameter class is not not supported.")}set properties(e){throw new pi("properties setter in Parameter class is not not supported.")}get additionalProperties(){throw new pi("additionalProperties getter in Parameter class is not not supported.")}set additionalProperties(e){throw new pi("additionalProperties setter in Parameter class is not not supported.")}get patternProperties(){throw new pi("patternProperties getter in Parameter class is not not supported.")}set patternProperties(e){throw new pi("patternProperties setter in Parameter class is not not supported.")}get dependencies(){throw new pi("dependencies getter in Parameter class is not not supported.")}set dependencies(e){throw new pi("dependencies setter in Parameter class is not not supported.")}get type(){return this.get("type")}set type(e){this.set("type",e)}get allOf(){throw new pi("allOf getter in Parameter class is not not supported.")}set allOf(e){throw new pi("allOf setter in Parameter class is not not supported.")}get anyOf(){throw new pi("anyOf getter in Parameter class is not not supported.")}set anyOf(e){throw new pi("anyOf setter in Parameter class is not not supported.")}get oneOf(){throw new pi("oneOf getter in Parameter class is not not supported.")}set oneOf(e){throw new pi("oneOf setter in Parameter class is not not supported.")}get not(){throw new pi("not getter in Parameter class is not not supported.")}set not(e){throw new pi("not setter in Parameter class is not not supported.")}get definitions(){throw new pi("definitions getter in Parameter class is not not supported.")}set definitions(e){throw new pi("definitions setter in Parameter class is not not supported.")}get title(){throw new pi("title getter in Parameter class is not not supported.")}set title(e){throw new pi("title setter in Parameter class is not not supported.")}get description(){return this.get("description")}set description(e){this.set("description",e)}get format(){return this.get("format")}set format(e){this.set("format",e)}get base(){throw new pi("base getter in Parameter class is not not supported.")}set base(e){throw new pi("base setter in Parameter class is not not supported.")}get linksField(){throw new pi("linksField getter in Parameter class is not not supported.")}set linksField(e){throw new pi("linksField setter in Parameter class is not not supported.")}get media(){throw new pi("media getter in Parameter class is not not supported.")}set media(e){throw new pi("media setter in Parameter class is not not supported.")}get readOnly(){throw new pi("readOnly getter in Parameter class is not not supported.")}set readOnly(e){throw new pi("readOnly setter in Parameter class is not not supported.")}get name(){return this.get("name")}set name(e){this.set("name",e)}get in(){return this.get("in")}set in(e){this.set("in",e)}get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}};const ki=class extends T{constructor(e,t,s){super(e,t,s),this.element="items",this.classes.push("json-schema-draft-4")}get idField(){throw new pi("idField getter in Items class is not not supported.")}set idField(e){throw new pi("idField setter in Items class is not not supported.")}get $schema(){throw new pi("$schema getter in Items class is not not supported.")}set $schema(e){throw new pi("$schema setter in Items class is not not supported.")}get additionalItems(){throw new pi("additionalItems getter in Items class is not not supported.")}set additionalItems(e){throw new pi("additionalItems setter in Items class is not not supported.")}get itemsField(){return this.get("items")}set itemsField(e){this.set("items",e)}get maxProperties(){throw new pi("maxProperties getter in Items class is not not supported.")}set maxProperties(e){throw new pi("maxProperties setter in Items class is not not supported.")}get minProperties(){throw new pi("minProperties getter in Items class is not not supported.")}set minProperties(e){throw new pi("minProperties setter in Items class is not not supported.")}get required(){throw new pi("required getter in Items class is not not supported.")}set required(e){throw new pi("required setter in Items class is not not supported.")}get properties(){throw new pi("properties getter in Items class is not not supported.")}set properties(e){throw new pi("properties setter in Items class is not not supported.")}get additionalProperties(){throw new pi("additionalProperties getter in Items class is not not supported.")}set additionalProperties(e){throw new pi("additionalProperties setter in Items class is not not supported.")}get patternProperties(){throw new pi("patternProperties getter in Items class is not not supported.")}set patternProperties(e){throw new pi("patternProperties setter in Items class is not not supported.")}get dependencies(){throw new pi("dependencies getter in Items class is not not supported.")}set dependencies(e){throw new pi("dependencies setter in Items class is not not supported.")}get type(){return this.get("type")}set type(e){this.set("type",e)}get allOf(){throw new pi("allOf getter in Items class is not not supported.")}set allOf(e){throw new pi("allOf setter in Items class is not not supported.")}get anyOf(){throw new pi("anyOf getter in Items class is not not supported.")}set anyOf(e){throw new pi("anyOf setter in Items class is not not supported.")}get oneOf(){throw new pi("oneOf getter in Items class is not not supported.")}set oneOf(e){throw new pi("oneOf setter in Items class is not not supported.")}get not(){throw new pi("not getter in Items class is not not supported.")}set not(e){throw new pi("not setter in Items class is not not supported.")}get definitions(){throw new pi("definitions getter in Items class is not not supported.")}set definitions(e){throw new pi("definitions setter in Items class is not not supported.")}get title(){throw new pi("title getter in Items class is not not supported.")}set title(e){throw new pi("title setter in Items class is not not supported.")}get description(){throw new pi("description getter in Items class is not not supported.")}set description(e){throw new pi("description setter in Items class is not not supported.")}get base(){throw new pi("base getter in Items class is not not supported.")}set base(e){throw new pi("base setter in Items class is not not supported.")}get linksField(){throw new pi("linksField getter in Items class is not not supported.")}set linksField(e){throw new pi("linksField setter in Items class is not not supported.")}get media(){throw new pi("media getter in Items class is not not supported.")}set media(e){throw new pi("media setter in Items class is not not supported.")}get readOnly(){throw new pi("readOnly getter in Items class is not not supported.")}set readOnly(e){throw new pi("readOnly setter in Items class is not not supported.")}};const Ii=class extends M{constructor(e,t,s){super(e,t,s),this.element="example"}};const ji=class extends M{constructor(e,t,s){super(e,t,s),this.element="responses"}get default(){return this.get("default")}set default(e){this.set("default",e)}};const Ai=class extends M{constructor(e,t,s){super(e,t,s),this.element="response"}get description(){return this.get("description")}set description(e){this.set("description",e)}get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}get headers(){return this.get("headers")}set headers(e){this.set("headers",e)}get examples(){return this.get("examples")}set examples(e){this.set("examples",e)}};const Fi=class extends M{constructor(e,t,s){super(e,t,s),this.element="headers"}};const Mi=class extends T{constructor(e,t,s){super(e,t,s),this.element="header",this.classes.push("json-schema-draft-4")}get idField(){throw new pi("idField getter in Header class is not not supported.")}set idField(e){throw new pi("idField setter in Header class is not not supported.")}get $schema(){throw new pi("$schema getter in Header class is not not supported.")}set $schema(e){throw new pi("$schema setter in Header class is not not supported.")}get additionalItems(){throw new pi("additionalItems getter in Header class is not not supported.")}set additionalItems(e){throw new pi("additionalItems setter in Header class is not not supported.")}get itemsField(){return this.get("items")}set itemsField(e){this.set("items",e)}get maxProperties(){throw new pi("maxProperties getter in Header class is not not supported.")}set maxProperties(e){throw new pi("maxProperties setter in Header class is not not supported.")}get minProperties(){throw new pi("minProperties getter in Header class is not not supported.")}set minProperties(e){throw new pi("minProperties setter in Header class is not not supported.")}get required(){throw new pi("required getter in Header class is not not supported.")}set required(e){throw new pi("required setter in Header class is not not supported.")}get properties(){throw new pi("properties getter in Header class is not not supported.")}set properties(e){throw new pi("properties setter in Header class is not not supported.")}get additionalProperties(){throw new pi("additionalProperties getter in Header class is not not supported.")}set additionalProperties(e){throw new pi("additionalProperties setter in Header class is not not supported.")}get patternProperties(){throw new pi("patternProperties getter in Header class is not not supported.")}set patternProperties(e){throw new pi("patternProperties setter in Header class is not not supported.")}get dependencies(){throw new pi("dependencies getter in Header class is not not supported.")}set dependencies(e){throw new pi("dependencies setter in Header class is not not supported.")}get type(){return this.get("type")}set type(e){this.set("type",e)}get allOf(){throw new pi("allOf getter in Header class is not not supported.")}set allOf(e){throw new pi("allOf setter in Header class is not not supported.")}get anyOf(){throw new pi("anyOf getter in Header class is not not supported.")}set anyOf(e){throw new pi("anyOf setter in Header class is not not supported.")}get oneOf(){throw new pi("oneOf getter in Header class is not not supported.")}set oneOf(e){throw new pi("oneOf setter in Header class is not not supported.")}get not(){throw new pi("not getter in Header class is not not supported.")}set not(e){throw new pi("not setter in Header class is not not supported.")}get definitions(){throw new pi("definitions getter in Header class is not not supported.")}set definitions(e){throw new pi("definitions setter in Header class is not not supported.")}get title(){throw new pi("title getter in Header class is not not supported.")}set title(e){throw new pi("title setter in Header class is not not supported.")}get base(){throw new pi("base getter in Header class is not not supported.")}set base(e){throw new pi("base setter in Header class is not not supported.")}get linksField(){throw new pi("linksField getter in Header class is not not supported.")}set linksField(e){throw new pi("linksField setter in Header class is not not supported.")}get media(){throw new pi("media getter in Header class is not not supported.")}set media(e){throw new pi("media setter in Header class is not not supported.")}get readOnly(){throw new pi("readOnly getter in Header class is not not supported.")}set readOnly(e){throw new pi("readOnly setter in Header class is not not supported.")}};const Ti=class extends M{constructor(e,t,s){super(e,t,s),this.element="tag"}get name(){return this.get("name")}set name(e){this.set("name",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get externalDocs(){return this.get("externalDocs")}set externalDocs(e){this.set("externalDocs",e)}};const Di=class extends T{constructor(e,t,s){super(e,t,s),this.element="schema",this.classes.push("json-schema-draft-4")}get idField(){throw new pi("idField getter in Schema class is not not supported.")}set idField(e){throw new pi("idField setter in Schema class is not not supported.")}get $schema(){throw new pi("$schema getter in Schema class is not not supported.")}set $schema(e){throw new pi("$schema setter in Schema class is not not supported.")}get additionalItems(){throw new pi("additionalItems getter in Schema class is not not supported.")}set additionalItems(e){throw new pi("additionalItems setter in Schema class is not not supported.")}get patternProperties(){throw new pi("patternProperties getter in Schema class is not not supported.")}set patternProperties(e){throw new pi("patternProperties setter in Schema class is not not supported.")}get dependencies(){throw new pi("dependencies getter in Schema class is not not supported.")}set dependencies(e){throw new pi("dependencies setter in Schema class is not not supported.")}get anyOf(){throw new pi("anyOf getter in Schema class is not not supported.")}set anyOf(e){throw new pi("anyOf setter in Schema class is not not supported.")}get oneOf(){throw new pi("oneOf getter in Schema class is not not supported.")}set oneOf(e){throw new pi("oneOf setter in Schema class is not not supported.")}get not(){throw new pi("not getter in Schema class is not not supported.")}set not(e){throw new pi("not setter in Schema class is not not supported.")}get definitions(){throw new pi("definitions getter in Schema class is not not supported.")}set definitions(e){throw new pi("definitions setter in Schema class is not not supported.")}get base(){throw new pi("base getter in Schema class is not not supported.")}set base(e){throw new pi("base setter in Schema class is not not supported.")}get linksField(){throw new pi("linksField getter in Schema class is not not supported.")}set linksField(e){throw new pi("linksField setter in Schema class is not not supported.")}get media(){throw new pi("media getter in Schema class is not not supported.")}set media(e){throw new pi("media setter in Schema class is not not supported.")}get xml(){return this.get("xml")}set xml(e){this.set("xml",e)}get discriminator(){return this.get("discriminator")}set discriminator(e){this.set("discriminator",e)}get readOnly(){return this.get("readOnly")}set readOnly(e){this.set("readOnly",e)}get externalDocs(){return this.get("externalDocs")}set externalDocs(e){this.set("externalDocs",e)}get example(){return this.get("example")}set example(e){this.set("example",e)}};const Ci=class extends M{constructor(e,t,s){super(e,t,s),this.element="xml"}get name(){return this.get("name")}set name(e){this.set("name",e)}get namespace(){return this.get("namespace")}set namespace(e){this.set("namespace",e)}get prefix(){return this.get("prefix")}set prefix(e){this.set("prefix",e)}get attribute(){return this.get("attribute")}set attribute(e){this.set("attribute",e)}get wrapped(){return this.get("wrapped")}set wrapped(e){this.set("wrapped",e)}};const $i=class extends M{constructor(e,t,s){super(e,t,s),this.element="reference",this.classes.push("openapi-reference")}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}};const Ni=class extends M{constructor(e,t,s){super(e,t,s),this.element="definitions"}};const _i=class extends M{constructor(e,t,s){super(e,t,s),this.element="parametersDefinitions"}};const qi=class extends M{constructor(e,t,s){super(e,t,s),this.element="responsesDefinitions"}};const Ri=class extends M{constructor(e,t,s){super(e,t,s),this.element="securityDefinitions"}};const Bi=class extends M{constructor(e,t,s){super(e,t,s),this.element="securityScheme"}get type(){return this.get("type")}set type(e){this.set("type",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get name(){return this.get("name")}set name(e){this.set("name",e)}get in(){return this.get("in")}set in(e){this.set("in",e)}get flow(){return this.get("flow")}set flow(e){this.set("flow",e)}get authorizationUrl(){return this.get("authorizationUrl")}set authorizationUrl(e){this.set("authorizationUrl",e)}get tokenUrl(){return this.get("tokenUrl")}set tokenUrl(e){this.set("tokenUrl",e)}get scopes(){return this.get("scopes")}set scopes(e){this.set("scopes",e)}};const Li=class extends M{constructor(e,t,s){super(e,t,s),this.element="scopes"}};const Hi=class extends M{constructor(e,t,s){super(e,t,s),this.element="securityRequirement"}},Ui={namespace:e=>{const{base:t}=e;return t.register("swagger",gi),t.register("swaggerVersion",yi),t.register("info",xi),t.register("contact",wi),t.register("license",bi),t.register("paths",vi),t.register("pathItem",Ei),t.register("operation",Oi),t.register("externalDocumentation",Si),t.register("parameter",Pi),t.register("items",ki),t.register("responses",ji),t.register("response",Ai),t.register("headers",Fi),t.register("example",Ii),t.register("header",Mi),t.register("tag",Ti),t.register("reference",$i),t.register("schema",Di),t.register("xml",Ci),t.register("definitions",Ni),t.register("parametersDefinitions",_i),t.register("responsesDefinitions",qi),t.register("securityDefinitions",Ri),t.register("securityScheme",Bi),t.register("scopes",Li),t.register("securityRequirement",Hi),t}};class Vi extends R{static primaryClass="operation-consumes";constructor(e,t,s){super(e,t,s),this.classes.push(Vi.primaryClass)}}const Gi=Vi;class zi extends R{static primaryClass="operation-parameters";constructor(e,t,s){super(e,t,s),this.classes.push(zi.primaryClass),this.classes.push("parameters")}}const Xi=zi;class Ji extends R{static primaryClass="operation-produces";constructor(e,t,s){super(e,t,s),this.classes.push(Ji.primaryClass)}}const Wi=Ji;class Ki extends R{static primaryClass="operation-schemes";constructor(e,t,s){super(e,t,s),this.classes.push(Ki.primaryClass)}}const Yi=Ki;class Qi extends R{static primaryClass="operation-security";constructor(e,t,s){super(e,t,s),this.classes.push(Qi.primaryClass),this.classes.push("security")}}const Zi=Qi;class eo extends R{static primaryClass="operation-tags";constructor(e,t,s){super(e,t,s),this.classes.push(eo.primaryClass),this.classes.push("tags")}}const to=eo;class so extends R{static primaryClass="path-item-parameters";constructor(e,t,s){super(e,t,s),this.classes.push(so.primaryClass),this.classes.push("parameters")}}const no=so;class ro extends R{static primaryClass="swagger-schemes";constructor(e,t,s){super(e,t,s),this.classes.push(ro.primaryClass)}}const io=ro;class oo extends R{static primaryClass="swagger-consumes";constructor(e,t,s){super(e,t,s),this.classes.push(oo.primaryClass)}}const co=oo;class ao extends R{static primaryClass="swagger-produces";constructor(e,t,s){super(e,t,s),this.classes.push(ao.primaryClass)}}const lo=ao;class uo extends R{static primaryClass="swagger-security";constructor(e,t,s){super(e,t,s),this.classes.push(uo.primaryClass),this.classes.push("security")}}const po=uo;class ho extends R{static primaryClass="swagger-tags";constructor(e,t,s){super(e,t,s),this.classes.push(ho.primaryClass)}}const mo=ho,fo={SwaggerElement:{info:(...e)=>new xi(...e),schemes:(...e)=>new io(...e),consumes:(...e)=>new co(...e),produces:(...e)=>new lo(...e),paths:(...e)=>new vi(...e),definitions:(...e)=>new Ni(...e),parameters:(...e)=>new _i(...e),responses:(...e)=>new qi(...e),securityDefinitions:(...e)=>new Ri(...e),security:(...e)=>new po(...e),tags:(...e)=>new mo(...e),externalDocs:(...e)=>new Si(...e)},InfoElement:{contact:(...e)=>new wi(...e),license:(...e)=>new bi(...e)},PathsElement:{"[key: *]":function(...e){return new Ei(...e)}},PathItemElement:{get:(...e)=>new Oi(...e),put:(...e)=>new Oi(...e),post:(...e)=>new Oi(...e),delete:(...e)=>new Oi(...e),options:(...e)=>new Oi(...e),head:(...e)=>new Oi(...e),patch:(...e)=>new Oi(...e),parameters:(...e)=>new no(...e)},OperationElement:{tags:(...e)=>new to(...e),externalDocs:(...e)=>new Si(...e),consumes:(...e)=>new Gi(...e),produces:(...e)=>new Wi(...e),parameters:(...e)=>new Xi(...e),responses:(...e)=>new ji(...e),schemes:(...e)=>new Yi(...e),security:(...e)=>new Zi(...e)},ParameterElement:{schema:(...e)=>new Di(...e),items:(...e)=>new ki(...e)},ItemsElement:{items:(...e)=>new ki(...e)},ResponsesElement:{"[key: *]":function(...e){return new Ai(...e)}},ResponseElement:{schema:(...e)=>new Di(...e),headers:(...e)=>new Fi(...e),examples:(...e)=>new Ii(...e)},HeadersElement:{"[key: *]":function(...e){return new Mi(...e)}},HeaderElement:{items:(...e)=>new ki(...e)},TagElement:{externalDocs:(...e)=>new Si(...e)},SchemaElement:{items:(...e)=>new Di(...e),allOf(...e){const t=new R(...e);return t.classes.push("json-schema-allOf"),t},properties(...e){const t=new M(...e);return t.classes.push("json-schema-properties"),t},additionalProperties:(...e)=>new Di(...e),xml:(...e)=>new Ci(...e),externalDocs:(...e)=>new Si(...e)},DefinitionsElement:{"[key: *]":function(...e){return new Di(...e)}},ParametersDefinitionsElement:{"[key: *]":function(...e){return new Pi(...e)}},ResponsesDefinitionsElement:{"[key: *]":function(...e){return new Ai(...e)}},SecurityDefinitionsElement:{"[key: *]":function(...e){return new Bi(...e)}},SecuritySchemeElement:{scopes:(...e)=>new Li(...e)},SecurityRequirementElement:{"[key: *]":function(...e){return new R(...e)}},[Xi.primaryClass]:{"<*>":function(...e){return new Pi(...e)}},[Zi.primaryClass]:{"<*>":function(...e){return new Hi(...e)}},[no.primaryClass]:{"<*>":function(...e){return new Pi(...e)}},[po.primaryClass]:{"<*>":function(...e){return new Hi(...e)}},[mo.primaryClass]:{"<*>":function(...e){return new Ti(...e)}},"json-schema-properties":{"[key: *]":function(...e){return new Di(...e)}},"json-schema-allOf":{"<*>":function(...e){return new Di(...e)}}},go=(e,t)=>{const s=An(e),n=fo[s]||fo[Os(e.classes.first)];return void 0===n?void 0:Object.hasOwn(n,"[key: *]")?n["[key: *]"]:n[t]},yo=()=>()=>({visitor:{StringElement(e){const t=e.node;if(!(e=>L(e)&&Kt(e,["yaml-e-node","yaml-e-scalar"]))(t))return;const s=e.getAncestorNodes().reverse().filter(B),n=s.at(-1);let r,i;if(G(n)?(i=t,r=go(n,"<*>")):X(n)&&(i=s.at(-2),r=go(i,Os(n.key))),"function"!=typeof r)return;const o=r.call({context:i},void 0,hs(t.meta),hs(t.attributes));ts.transfer(t,o),Fs.transfer(t,o),e.replaceWith(o)}}});var xo=ne(function(e,t,s){var n,r={};for(n in s=s||{},t=t||{})l(n,t)&&(r[n]=l(n,s)?e(n,t[n],s[n]):t[n]);for(n in s)l(n,s)&&!l(n,r)&&(r[n]=s[n]);return r});const wo=xo;var bo=ne(function e(t,s,n){return wo(function(s,n,r){return _e(n)&&_e(r)?e(t,n,r):t(s,n,r)},s,n)});const vo=bo;const Eo=o(function(e,t){return vo(function(e,t,s){return s},e,t)});const Oo=ne(function(e,t,s){return Cs(e,oe(t,s))});const So=ke(0,-1);var Po=o(function(e,t){return e.apply(this,t)});const ko=Po;const Io=dt(Ot);const jo=pt(Yr,Bs);const Ao=nt(3,function(e,t,s){var n=le(e,s),r=le(So(e),s);if(!Io(n)&&!jo(e)){var i=we(n,r);return ko(i,t)}});const Fo=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 ts)){const s=ts.from(e);s&&(t.meta||(t.meta={}),t.meta.__mappings__=this.serialise(s))}if(!(e instanceof Fs)){const s=Fs.from(e);s&&(t.meta||(t.meta={}),t.meta.__styles__=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,n;t.element!==e.element&&(t.element=e.element);let r=e.meta;if(e.meta?.__mappings__||e.meta?.__styles__){const{__mappings__:t,__styles__:i,...o}=e.meta;s=t,n=i,r=Object.keys(o).length>0?o:void 0}if(r&&this.deserialiseObject(r,t.meta),s){this.deserialise(s).applyTo(t)}if(n){this.deserialise(n).applyTo(t)}e.attributes&&this.deserialiseObject(e.attributes,t.attributes);const i=this.deserialiseContent(e.content);return void 0===i&&null!==t.content||(t.content=i),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]))})}},Mo=e=>null===e,To=e=>"string"==typeof e,Do=e=>"number"==typeof e,Co=e=>"boolean"==typeof e,$o=e=>null!==e&&"object"==typeof e;class No{elementMap={};elementDetection=[];Element;KeyValuePair;_elements;_attributeElementKeys=[];_attributeElementArrayKeys=[];constructor(e){this.Element=I,this.KeyValuePair=O,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",_).register("string",$).register("number",N).register("boolean",q).register("array",R).register("object",M).register("member",F).register("ref",ys).register("link",gs).register("sourceMap",ts),this.detect(Mo,_,!1).detect(To,$,!1).detect(Do,N,!1).detect(Co,q,!1).detect(Array.isArray,R,!1).detect($o,M,!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 Fo(this)}}Fo.prototype.Namespace=No;const _o=No,qo=new _o,Ro={isElement:B,isStringElement:L,isNumberElement:H,isNullElement:U,isBooleanElement:V,isArrayElement:G,isObjectElement:z,isMemberElement:X,isPrimitiveElement:e=>z(e)&&"object"===e.element||G(e)&&"array"===e.element||V(e)&&"boolean"===e.element||H(e)&&"number"===e.element||L(e)&&"string"===e.element||U(e)&&"null"===e.element||X(e)&&"member"===e.element,isLinkElement:vs,isRefElement:Es,isAnnotationElement:e=>e instanceof xs,isCommentElement:e=>e instanceof ws,isParseResultElement:e=>e instanceof bs,isSourceMapElement:e=>e instanceof ts,hasElementStyle:Jt,hasElementSourceMap:Wt,includesSymbols:(e,t)=>{if(0===t.length)return!0;if(!e.hasAttributesProperty("symbols"))return!1;const s=e.attributes.get("symbols");return!!G(s)&&t.every(e=>s.includes(e))},includesClasses:Kt},Bo={toolboxCreator:()=>({predicates:Ro,namespace:qo}),visitorOptions:{exposeEdits:!0}},Lo=(e,t,s={})=>{if(0===t.length)return e;const n=Eo(Bo,s),{toolboxCreator:r,visitorOptions:i}=n,o=r(),c=t.map(e=>e(o)),a=Nn(c.map(Oo({},"visitor")),i);c.forEach(Ao(["pre"],[]));const l=Bn(e,a);return c.forEach(Ao(["post"],[])),l};function Ho(e){return void 0===e?new _:Uo(e)}function Uo(e){if(e instanceof I)return e;if("string"==typeof e)return new $(e);if("number"==typeof e)return new N(e);if("boolean"==typeof e)return new q(e);if(null===e)return new _;if(Array.isArray(e))return new R(e.map(Ho));if("object"==typeof e)return new M(e);throw new Error("Cannot refract value of type "+typeof e)}Lo[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,s={})=>{if(0===t.length)return e;const n=Eo(Bo,s),{toolboxCreator:r,visitorOptions:i}=n,o=r(),c=t.map(e=>e(o)),a=_n(c.map(Oo({},"visitor")),i);await Promise.allSettled(c.map(Ao(["pre"],[])));const l=await Ln(e,a);return await Promise.allSettled(c.map(Ao(["post"],[]))),l},I.prototype.ObjectElement=M,I.prototype.ArrayElement=R,I.prototype.RefElement=ys,I.prototype.MemberElement=F,I.prototype.refract=Uo;const Vo=class{element;constructor(e={}){Object.assign(this,e)}copyMetaAndAttributes(e,t){if(!e.isMetaEmpty||!t.isMetaEmpty){const s=t.isMetaEmpty?new M:t.meta,n=e.isMetaEmpty?new M:e.meta;t.meta=js(s,n)}if(!e.isAttributesEmpty||!t.isAttributesEmpty){const s=t.isAttributesEmpty?new M:t.attributes,n=e.isAttributesEmpty?new M:e.attributes;t.attributes=js(s,n)}ts.transfer(e,t),Fs.transfer(e,t)}};const Go=class extends Vo{enter(e){this.element=hs(e.node),e.stop()}};const zo=class extends Vo{specObj;passingOptionsNames=["specObj"];constructor({specObj:e,...t}){super({...t}),this.specObj=e}retrievePassingOptions(){return zs(this.passingOptionsNames,this)}retrieveFixedFields(e){const t=le(["visitors",...e,"fixedFields"],this.specObj);return"object"==typeof t&&null!==t?Object.keys(t):[]}retrieveVisitor(e){return Xe(Ot,["visitors",...e],this.specObj)?le(["visitors",...e],this.specObj):le(["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 Go&&n?.constructor===Go?hs(t):(Bn(t,n),n.element)}};var Xo=function(){function e(e,t){this.xf=t,this.n=e,this.i=0}return e.prototype["@@transducer/init"]=qe,e.prototype["@@transducer/result"]=Re,e.prototype["@@transducer/step"]=function(e,t){this.i+=1;var s=0===this.n?e:this.xf["@@transducer/step"](e,t);return this.n>=0&&this.i>=this.n?Jr(s):s},e}();function Jo(e){return function(t){return new Xo(e,t)}}const Wo=o(Ne(["take"],Jo,function(e,t){return ke(0,e<0?1/0:e,t)}));const Ko=o(function(e,t){return E(Wo(e.length,t),e)}),Yo=e=>L(e.key)&&Ko("x-",Os(e.key)),Qo=e=>z(e)&&e.hasKey("$ref");const Zo=class extends zo{specPath;ignoredFields;canSupportSpecificationExtensions=!0;specificationExtensionPredicate=Yo;constructor({specPath:e,ignoredFields:t,canSupportSpecificationExtensions:s,specificationExtensionPredicate:n,...r}){super({...r}),this.specPath=e,this.ignoredFields=t||[],"boolean"==typeof s&&(this.canSupportSpecificationExtensions=s),"function"==typeof n&&(this.specificationExtensionPredicate=n)}ObjectElement(e){const t=e.node,s=this.specPath(t),n=this.retrieveFixedFields(s);t.forEach((e,t,r)=>{const i=Os(t);if(L(t)&&n.includes(i)&&!this.ignoredFields.includes(i)){const n=this.toRefractedElement([...s,"fixedFields",i],e),o=new F(hs(t),n);this.copyMetaAndAttributes(r,o),o.classes.push("fixed-field"),this.element.content.push(o)}else if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(r)){const e=this.toRefractedElement(["document","extension"],r);this.element.content.push(e)}else this.ignoredFields.includes(i)||this.element.content.push(hs(r))}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const ec=class extends zo{specPath;ignoredFields;fieldPatternPredicate=ur;canSupportSpecificationExtensions=!1;specificationExtensionPredicate=Yo;constructor({specPath:e,ignoredFields:t,fieldPatternPredicate:s,canSupportSpecificationExtensions:n,specificationExtensionPredicate:r,...i}){super({...i}),this.specPath=e,this.ignoredFields=t||[],"function"==typeof s&&(this.fieldPatternPredicate=s),"boolean"==typeof n&&(this.canSupportSpecificationExtensions=n),"function"==typeof r&&(this.specificationExtensionPredicate=r)}ObjectElement(e){const t=e.node;t.forEach((e,t,s)=>{const n=Os(t);if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(s)){const e=this.toRefractedElement(["document","extension"],s);this.element.content.push(e)}else if(!this.ignoredFields.includes(n)&&this.fieldPatternPredicate(n)){const n=this.specPath(e),r=this.toRefractedElement(n,e),i=new F(hs(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(hs(s))}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const tc=class extends ec{constructor(e){super(e),this.fieldPatternPredicate=Gs}};const sc=class extends zo{alternator;constructor({alternator:e,...t}){super({...t}),this.alternator=e||[]}enter(e){const t=e.node,s=this.alternator.map(({predicate:e,specPath:t})=>Ur(e,Ds(t),$s)),n=ni(s)(t);this.element=this.toRefractedElement(n,t),e.stop()}};function nc(e,t,s){var n,r=typeof e;switch(r){case"string":case"number":return 0===e&&1/e==-1/0?!!s._items["-0"]||(t&&(s._items["-0"]=!0),!1):null!==s._nativeSet?t?(n=s._nativeSet.size,s._nativeSet.add(e),s._nativeSet.size===n):s._nativeSet.has(e):r in s._items?e in s._items[r]||(t&&(s._items[r][e]=!0),!1):(t&&(s._items[r]={},s._items[r][e]=!0),!1);case"boolean":if(r in s._items){var i=e?1:0;return!!s._items[r][i]||(t&&(s._items[r][i]=!0),!1)}return t&&(s._items[r]=e?[!1,!0]:[!0,!1]),!1;case"function":return null!==s._nativeSet?t?(n=s._nativeSet.size,s._nativeSet.add(e),s._nativeSet.size===n):s._nativeSet.has(e):r in s._items?!!Me(e,s._items[r])||(t&&s._items[r].push(e),!1):(t&&(s._items[r]=[e]),!1);case"undefined":return!!s._items[r]||(t&&(s._items[r]=!0),!1);case"object":if(null===e)return!!s._items.null||(t&&(s._items.null=!0),!1);default:return(r=Object.prototype.toString.call(e))in s._items?!!Me(e,s._items[r])||(t&&s._items[r].push(e),!1):(t&&(s._items[r]=[e]),!1)}}const rc=function(){function e(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}return e.prototype.add=function(e){return!nc(e,!0,this)},e.prototype.has=function(e){return nc(e,!1,this)},e}();const ic=o(function(e,t){for(var s=[],n=0,r=e.length,i=t.length,o=new rc,c=0;c<i;c+=1)o.add(t[c]);for(;n<r;)o.add(e[n])&&(s[s.length]=e[n]),n+=1;return s}),oc=ar(Zo,ec);const cc=class extends oc{specPathFixedFields;specPathPatternedFields;constructor({specPathFixedFields:e,specPathPatternedFields:t,...s}){super({...s}),this.specPathFixedFields=e,this.specPathPatternedFields=t}ObjectElement(e){const t=e.node,{specPath:s,ignoredFields:n}=this;try{this.specPath=this.specPathFixedFields;const s=this.retrieveFixedFields(this.specPath(t));this.ignoredFields=[...n,...ic(t.keys(),s)],Zo.prototype.ObjectElement.call(this,e),this.specPath=this.specPathPatternedFields,this.ignoredFields=s,ec.prototype.ObjectElement.call(this,e);const r=t.keys();this.element.content.sort((e,t)=>r.indexOf(Os(e.key))-r.indexOf(Os(t.key)))}catch(e){throw this.specPath=s,e}e.stop()}},ac=ar(zo,Go),lc=ar(Zo,Go),uc=ar(ec,Go),pc=ar(tc,Go),hc=ar(sc,Go),dc=ar(cc,Go);const mc=class extends lc{constructor(e){super(e),this.element=new gi,this.specPath=Ds(["document","objects","Swagger"]),this.canSupportSpecificationExtensions=!0}};const fc=class extends ac{StringElement(e){const t=e.node,s=new yi(Os(t));this.copyMetaAndAttributes(t,s),this.element=s,e.stop()}};const gc=class extends Go{StringElement(e){super.enter(e),this.element.classes.push("swagger-host")}};const yc=class extends Go{StringElement(e){super.enter(e),this.element.classes.push("swagger-base-path")}};const xc=class extends Go{constructor(e){super(e),this.element=new io}ArrayElement(e){const t=e.node;this.element=this.element.concat(hs(t)),e.stop()}};const wc=class extends Go{constructor(e){super(e),this.element=new co}ArrayElement(e){const t=e.node;this.element=this.element.concat(hs(t)),e.stop()}};const bc=class extends Go{constructor(e){super(e),this.element=new lo}ArrayElement(e){const t=e.node;this.element=this.element.concat(hs(t)),e.stop()}};const vc=class extends ac{constructor(e){super(e),this.element=new po}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","SecurityRequirement"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Ec=class extends ac{constructor(e){super(e),this.element=new mo}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","Tag"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Oc=class extends lc{constructor(e){super(e),this.element=new xi,this.specPath=Ds(["document","objects","Info"]),this.canSupportSpecificationExtensions=!0}};const Sc=class extends Go{StringElement(e){super.enter(e),this.element.classes.push("api-version"),this.element.classes.push("version")}};const Pc=class extends lc{constructor(e){super(e),this.element=new wi,this.specPath=Ds(["document","objects","Contact"]),this.canSupportSpecificationExtensions=!0}};const kc=class extends lc{constructor(e){super(e),this.element=new bi,this.specPath=Ds(["document","objects","License"]),this.canSupportSpecificationExtensions=!0}},Ic=e=>e instanceof gi,jc=e=>e instanceof yi,Ac=e=>e instanceof xi,Fc=e=>e instanceof bi,Mc=e=>e instanceof wi,Tc=e=>e instanceof vi,Dc=e=>e instanceof Ei,Cc=e=>e instanceof Oi,$c=e=>e instanceof Si,Nc=e=>e instanceof Pi,_c=e=>e instanceof ki,qc=e=>e instanceof ji,Rc=e=>e instanceof Ai,Bc=e=>e instanceof Fi,Lc=e=>e instanceof Ii,Hc=e=>e instanceof Mi,Uc=e=>e instanceof Ti,Vc=e=>e instanceof $i,Gc=e=>e instanceof Di,zc=e=>e instanceof Ci,Xc=e=>e instanceof qi,Jc=e=>e instanceof Ri,Wc=e=>e instanceof Ni,Kc=e=>e instanceof _i,Yc=e=>e instanceof Bi,Qc=e=>e instanceof Li,Zc=e=>e instanceof Hi;const ea=class extends uc{element;constructor(e){super(e),this.element=new vi,this.specPath=Ds(["document","objects","PathItem"]),this.canSupportSpecificationExtensions=!0,this.fieldPatternPredicate=Hr}ObjectElement(e){uc.prototype.ObjectElement.call(this,e),this.element.filter(Dc).forEach((e,t)=>{t.classes.push("openapi-path-template"),t.classes.push("path-template"),e.meta.set("path",hs(t))})}};const ta=class extends lc{constructor(e){super(e),this.element=new Ei,this.specPath=Ds(["document","objects","PathItem"])}ObjectElement(e){lc.prototype.ObjectElement.call(this,e),this.element.filter(Cc).forEach((e,t)=>{const s=hs(t);s.content=Os(s).toUpperCase(),e.meta.set("http-method",s)}),L(this.element.$ref)&&this.element.classes.push("reference-element")}};const sa=class extends Go{StringElement(e){super.enter(e),this.element.classes.push("reference-value")}};const na=class extends ac{constructor(e){super(e),this.element=new no}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=Qo(e)?["document","objects","Reference"]:["document","objects","Parameter"],s=this.toRefractedElement(t,e);Vc(s)&&s.meta.set("referenced-element","parameter"),this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const ra=class extends lc{constructor(e){super(e),this.element=new Oi,this.specPath=Ds(["document","objects","Operation"])}};const ia=class extends Go{constructor(e){super(e),this.element=new to}ArrayElement(e){const t=e.node;this.element=this.element.concat(hs(t)),e.stop()}};const oa=class extends Go{constructor(e){super(e),this.element=new Gi}ArrayElement(e){const t=e.node;this.element=this.element.concat(hs(t)),e.stop()}};const ca=class extends Go{constructor(e){super(e),this.element=new Wi}ArrayElement(e){const t=e.node;this.element=this.element.concat(hs(t)),e.stop()}};const aa=class extends ac{constructor(e){super(e),this.element=new Xi}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=Qo(e)?["document","objects","Reference"]:["document","objects","Parameter"],s=this.toRefractedElement(t,e);Vc(s)&&s.meta.set("referenced-element","parameter"),this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const la=class extends Go{constructor(e){super(e),this.element=new Yi}ArrayElement(e){const t=e.node;this.element=this.element.concat(hs(t)),e.stop()}};const ua=class extends ac{constructor(e){super(e),this.element=new Zi}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","SecurityRequirement"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const pa=class extends lc{constructor(e){super(e),this.element=new Si,this.specPath=Ds(["document","objects","ExternalDocumentation"]),this.canSupportSpecificationExtensions=!0}};const ha=class extends lc{constructor(e){super(e),this.element=new Pi,this.specPath=Ds(["document","objects","Parameter"]),this.canSupportSpecificationExtensions=!0}};const da=class extends lc{specPath;canSupportSpecificationExtensions;constructor(e){super(e),this.element=new ki,this.specPath=Ds(["document","objects","Items"]),this.canSupportSpecificationExtensions=!0}};const ma=o(function(e,t){if(s=e,"[object RegExp]"!==Object.prototype.toString.call(s))throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+ze(e));var s;return Vt(e).test(t)});function fa(e){return"[object Number]"===Object.prototype.toString.call(e)}var ga=o(function(e,t){if(!fa(e)||!fa(t))throw new TypeError("Both arguments to range must be numbers");for(var s=e<t?Math.ceil(t-e):0,n=Array(s),r=0;r<s;)n[r]=r+e,r+=1;return n});const ya=ga;const xa=class extends dc{constructor(e){super(e),this.element=new ji,this.specPathFixedFields=Ds(["document","objects","Responses"]),this.canSupportSpecificationExtensions=!0,this.specPathPatternedFields=e=>Qo(e)?["document","objects","Reference"]:["document","objects","Response"],this.fieldPatternPredicate=ma(new RegExp(`^(1XX|2XX|3XX|4XX|5XX|${ya(100,600).join("|")})$`))}ObjectElement(e){dc.prototype.ObjectElement.call(this,e),this.element.filter(Vc).forEach(e=>{e.meta.set("referenced-element","response")}),this.element.filter(Rc).forEach((e,t)=>{const s=hs(t);this.fieldPatternPredicate(Os(s))&&e.meta.set("http-status-code",s)})}};const wa=class extends hc{constructor(e){super(e),this.alternator=[{predicate:Qo,specPath:["document","objects","Reference"]},{predicate:Hr,specPath:["document","objects","Response"]}]}ObjectElement(e){sc.prototype.enter.call(this,e),Vc(this.element)?this.element.meta.set("referenced-element","response"):Rc(this.element)&&this.element.meta.set("http-status-code","default")}};const ba=class extends lc{constructor(e){super(e),this.element=new Ai,this.specPath=Ds(["document","objects","Response"]),this.canSupportSpecificationExtensions=!0}};const va=class extends pc{constructor(e){super(e),this.element=new Fi,this.specPath=Ds(["document","objects","Header"]),this.canSupportSpecificationExtensions=!1}};const Ea=class extends pc{constructor(e){super(e),this.element=new Ii,this.specPath=Ds(["value"]),this.canSupportSpecificationExtensions=!1}};const Oa=class extends lc{constructor(e){super(e),this.element=new Mi,this.specPath=Ds(["document","objects","Header"]),this.canSupportSpecificationExtensions=!0}};const Sa=class extends lc{constructor(e){super(e),this.element=new Ti,this.specPath=Ds(["document","objects","Tag"]),this.canSupportSpecificationExtensions=!0}};const Pa=class extends lc{constructor(e){super(e),this.element=new $i,this.specPath=Ds(["document","objects","Reference"]),this.canSupportSpecificationExtensions=!1}ObjectElement(e){lc.prototype.ObjectElement.call(this,e),L(this.element.$ref)&&this.element.classes.push("reference-element")}};const ka=class extends Go{StringElement(e){super.enter(e),this.element.classes.push("reference-value")}};const Ia=class extends lc{constructor(e){super(e),this.element=new Di,this.specPath=Ds(["document","objects","Schema"]),this.canSupportSpecificationExtensions=!0}},ja=ci.visitors.document.objects.JSONSchema.fixedFields.allOf;const Aa=class extends ja{ArrayElement(e){ja.prototype.ArrayElement.call(this,e),this.element.filter(C).forEach(e=>{e.meta.set("referenced-element","schema")})}};const Fa=class extends jr{ObjectElement(e){jr.prototype.ObjectElement.call(this,e),C(this.element)&&this.element.meta.set("referenced-element","schema")}ArrayElement(e){jr.prototype.ArrayElement.call(this,e),this.element.filter(C).forEach(e=>{e.meta.set("referenced-element","schema")})}},Ma=ci.visitors.document.objects.JSONSchema.fixedFields.properties;const Ta=class extends Ma{ObjectElement(e){Ma.prototype.ObjectElement.call(this,e),this.element.filter(C).forEach(e=>{e.meta.set("referenced-element","schema")})}},Da=ci.visitors.JSONSchemaOrJSONReferenceVisitor;const Ca=class extends Da{ObjectElement(e){Da.prototype.enter.call(this,e),C(this.element)&&this.element.meta.set("referenced-element","schema")}};const $a=class extends lc{constructor(e){super(e),this.element=new Ci,this.specPath=Ds(["document","objects","XML"]),this.canSupportSpecificationExtensions=!0}};const Na=class extends pc{constructor(e){super(e),this.element=new Ni,this.specPath=e=>J(e)?["document","objects","JSONReference"]:["document","objects","Schema"]}ObjectElement(e){pc.prototype.ObjectElement.call(this,e),this.element.filter(C).forEach(e=>{e.meta.set("referenced-element","schema")})}};const _a=class extends pc{constructor(e){super(e),this.element=new qi,this.specPath=Ds(["document","objects","Response"])}};const qa=class extends pc{constructor(e){super(e),this.element=new _i,this.specPath=Ds(["document","objects","Parameter"])}};const Ra=class extends pc{element;constructor(e){super(e),this.element=new Ri,this.specPath=Ds(["document","objects","SecurityScheme"])}};const Ba=class extends lc{constructor(e){super(e),this.element=new Bi,this.specPath=Ds(["document","objects","SecurityScheme"]),this.canSupportSpecificationExtensions=!0}};const La=class extends pc{constructor(e){super(e),this.element=new Li,this.specPath=Ds(["value"]),this.canSupportSpecificationExtensions=!0}};const Ha=class extends pc{constructor(e){super(e),this.element=new Hi,this.specPath=Ds(["value"])}};const Ua=class extends zo{MemberElement(e){this.element=hs(e.node),this.element.classes.push("specification-extension"),e.stop()}},{fixedFields:Va}=ci.visitors.document.objects.JSONSchema,Ga={visitors:{value:Go,document:{objects:{JSONReference:ci.visitors.document.objects.JSONReference,JSONSchema:{$ref:"#/visitors/document/objects/Schema"},Swagger:{$visitor:mc,element:"swagger",fixedFields:{swagger:fc,info:{$ref:"#/visitors/document/objects/Info"},host:gc,basePath:yc,schemes:xc,consumes:wc,produces:bc,paths:{$ref:"#/visitors/document/objects/Paths"},definitions:{$ref:"#/visitors/document/objects/Definitions"},parameters:{$ref:"#/visitors/document/objects/ParametersDefinitions"},responses:{$ref:"#/visitors/document/objects/ResponsesDefinitions"},securityDefinitions:{$ref:"#/visitors/document/objects/SecurityDefinitions"},security:vc,tags:Ec,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Info:{$visitor:Oc,element:"info",fixedFields:{title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},termsOfService:{$ref:"#/visitors/value"},contact:{$ref:"#/visitors/document/objects/Contact"},license:{$ref:"#/visitors/document/objects/License"},version:Sc}},Contact:{$visitor:Pc,element:"contact",fixedFields:{name:{$ref:"#/visitors/value"},url:{$ref:"#/visitors/value"},email:{$ref:"#/visitors/value"}}},License:{$visitor:kc,element:"license",fixedFields:{name:{$ref:"#/visitors/value"},url:{$ref:"#/visitors/value"}}},Paths:{$visitor:ea,element:"paths"},PathItem:{$visitor:ta,element:"pathItem",fixedFields:{$ref:sa,get:{$ref:"#/visitors/document/objects/Operation"},put:{$ref:"#/visitors/document/objects/Operation"},post:{$ref:"#/visitors/document/objects/Operation"},delete:{$ref:"#/visitors/document/objects/Operation"},options:{$ref:"#/visitors/document/objects/Operation"},head:{$ref:"#/visitors/document/objects/Operation"},patch:{$ref:"#/visitors/document/objects/Operation"},parameters:na}},Operation:{$visitor:ra,element:"operation",fixedFields:{tags:ia,summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},operationId:{$ref:"#/visitors/value"},consumes:oa,produces:ca,parameters:aa,responses:{$ref:"#/visitors/document/objects/Responses"},schemes:la,deprecated:{$ref:"#/visitors/value"},security:ua}},ExternalDocumentation:{$visitor:pa,element:"externalDocumentation",fixedFields:{description:{$ref:"#/visitors/value"},url:{$ref:"#/visitors/value"}}},Parameter:{$visitor:ha,element:"parameter",fixedFields:{name:{$ref:"#/visitors/value"},in:{$ref:"#/visitors/value"},description:Va.description,required:Va.required,schema:Ca,type:Va.type,format:Va.format,items:{$visitor:da,alias:"itemsField"},collectionFormat:{$ref:"#/visitors/value"},default:Va.default,maximum:Va.maximum,exclusiveMaximum:Va.exclusiveMaximum,minimum:Va.minimum,exclusiveMinimum:Va.exclusiveMinimum,maxLength:Va.maxLength,minLength:Va.minLength,pattern:Va.pattern,maxItems:Va.maxItems,minItems:Va.minItems,uniqueItems:Va.uniqueItems,enum:Va.enum,multipleOf:Va.multipleOf}},Items:{$visitor:da,element:"items",fixedFields:{type:Va.type,format:Va.format,items:{$visitor:da,alias:"itemsField"},collectionFormat:{$ref:"#/visitors/value"},default:Va.default,maximum:Va.maximum,exclusiveMaximum:Va.exclusiveMaximum,minimum:Va.minimum,exclusiveMinimum:Va.exclusiveMinimum,maxLength:Va.maxLength,minLength:Va.minLength,pattern:Va.pattern,maxItems:Va.maxItems,minItems:Va.minItems,uniqueItems:Va.uniqueItems,enum:Va.enum,multipleOf:Va.multipleOf}},Responses:{$visitor:xa,element:"responses",fixedFields:{default:wa}},Response:{$visitor:ba,element:"response",fixedFields:{description:{$ref:"#/visitors/value"},schema:Ca,headers:{$ref:"#/visitors/document/objects/Headers"},examples:{$ref:"#/visitors/document/objects/Example"}}},Headers:{$visitor:va,element:"headers"},Example:{$visitor:Ea,element:"example"},Header:{$visitor:Oa,element:"header",fixedFields:{description:Va.description,type:Va.type,format:Va.format,items:{$visitor:da,alias:"itemsField"},collectionFormat:{$ref:"#/visitors/value"},default:Va.default,maximum:Va.maximum,exclusiveMaximum:Va.exclusiveMaximum,minimum:Va.minimum,exclusiveMinimum:Va.exclusiveMinimum,maxLength:Va.maxLength,minLength:Va.minLength,pattern:Va.pattern,maxItems:Va.maxItems,minItems:Va.minItems,uniqueItems:Va.uniqueItems,enum:Va.enum,multipleOf:Va.multipleOf}},Tag:{$visitor:Sa,element:"tag",fixedFields:{name:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Reference:{$visitor:Pa,element:"reference",fixedFields:{$ref:ka}},Schema:{$visitor:Ia,element:"schema",fixedFields:{format:Va.format,title:Va.title,description:Va.description,default:Va.default,multipleOf:Va.multipleOf,maximum:Va.maximum,exclusiveMaximum:Va.exclusiveMaximum,minimum:Va.minimum,exclusiveMinimum:Va.exclusiveMinimum,maxLength:Va.maxLength,minLength:Va.minLength,pattern:Va.pattern,maxItems:Va.maxItems,minItems:Va.minItems,uniqueItems:Va.uniqueItems,maxProperties:Va.maxProperties,minProperties:Va.minProperties,required:Va.required,enum:Va.enum,type:Va.type,readOnly:Va.readOnly,items:Fa,allOf:Aa,properties:Ta,additionalProperties:Ca,discriminator:{$ref:"#/visitors/value"},xml:{$ref:"#/visitors/document/objects/XML"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},example:{$ref:"#/visitors/value"}}},XML:{$visitor:$a,element:"xml",fixedFields:{name:{$ref:"#/visitors/value"},namespace:{$ref:"#/visitors/value"},prefix:{$ref:"#/visitors/value"},attribute:{$ref:"#/visitors/value"},wrapped:{$ref:"#/visitors/value"}}},Definitions:{$visitor:Na,element:"definitions"},ParametersDefinitions:{$visitor:qa,element:"parametersDefinitions"},ResponsesDefinitions:{$visitor:_a,element:"responsesDefinitions"},SecurityDefinitions:{$visitor:Ra,element:"securityDefinitions"},SecurityScheme:{$visitor:Ba,element:"securityScheme",fixedFields:{type:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},name:{$ref:"#/visitors/value"},in:{$ref:"#/visitors/value"},flow:{$ref:"#/visitors/value"},authorizationUrl:{$ref:"#/visitors/value"},token:{$ref:"#/visitors/value"},scopes:{$ref:"#/visitors/document/objects/Scopes"}}},Scopes:{$visitor:La,element:"scopes"},SecurityRequirement:{$visitor:Ha,element:"securityRequirement"}},extension:{$visitor:Ua}}}},za=()=>{const e=new _o,t={...s,...n,isStringElement:L};return e.use(Ui),{predicates:t,namespace:e}},Xa=(e,{element:t="swagger",plugins:s=[],specificationObj:n=Ga}={})=>{const r=Uo(e),i=Lt(n),o=i.elementMap[t];if(!o)throw new Error(`Unknown element type: "${t}"`);const c=new(le(o,i))({specObj:i});return Bn(r,c),Lo(c.element,s,{toolboxCreator:za})},Ja=(e,t={})=>Xa(e,{...t,element:"swagger"}),Wa=(e,t={})=>Xa(e,{...t,element:"info"}),Ka=(e,t={})=>Xa(e,{...t,element:"contact"}),Ya=(e,t={})=>Xa(e,{...t,element:"license"}),Qa=(e,t={})=>Xa(e,{...t,element:"paths"}),Za=(e,t={})=>Xa(e,{...t,element:"pathItem"}),el=(e,t={})=>Xa(e,{...t,element:"operation"}),tl=(e,t={})=>Xa(e,{...t,element:"externalDocumentation"}),sl=(e,t={})=>Xa(e,{...t,element:"parameter"}),nl=(e,t={})=>Xa(e,{...t,element:"items"}),rl=(e,t={})=>Xa(e,{...t,element:"responses"}),il=(e,t={})=>Xa(e,{...t,element:"response"}),ol=(e,t={})=>Xa(e,{...t,element:"headers"}),cl=(e,t={})=>Xa(e,{...t,element:"example"}),al=(e,t={})=>Xa(e,{...t,element:"header"}),ll=(e,t={})=>Xa(e,{...t,element:"tag"}),ul=(e,t={})=>Xa(e,{...t,element:"reference"}),pl=(e,t={})=>Xa(e,{...t,element:"schema"}),hl=(e,t={})=>Xa(e,{...t,element:"xml"}),dl=(e,t={})=>Xa(e,{...t,element:"definitions"}),ml=(e,t={})=>Xa(e,{...t,element:"parametersDefinitions"}),fl=(e,t={})=>Xa(e,{...t,element:"responsesDefinitions"}),gl=(e,t={})=>Xa(e,{...t,element:"securityDefinitions"}),yl=(e,t={})=>Xa(e,{...t,element:"securityScheme"}),xl=(e,t={})=>Xa(e,{...t,element:"scopes"}),wl=(e,t={})=>Xa(e,{...t,element:"securityRequirement"}),bl=Xa;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.apidomNsOpenApi2=t():e.apidomNsOpenApi2=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,{AlternatingVisitor:()=>mc,BaseAlternatingVisitor:()=>Sc,BaseFixedFieldsVisitor:()=>vc,BaseMapVisitor:()=>Oc,BaseMixedFieldsVisitor:()=>Pc,BasePatternedFieldsVisitor:()=>Ec,BaseSpecificationVisitor:()=>bc,ContactElement:()=>no,DefinitionsElement:()=>vo,ExampleElement:()=>po,ExternalDocumentationElement:()=>ao,FallbackVisitor:()=>nc,FixedFieldsVisitor:()=>pc,HeaderElement:()=>go,HeadersElement:()=>fo,InfoElement:()=>so,ItemsElement:()=>uo,JSONReferenceElement:()=>H,LicenseElement:()=>ro,MapVisitor:()=>dc,MixedFieldsVisitor:()=>wc,MixedFieldsVisitorBase:()=>xc,OpenAPIMediaTypes:()=>Qi,OperationConsumesElement:()=>Fo,OperationElement:()=>co,OperationParametersElement:()=>Do,OperationProducesElement:()=>Co,OperationSchemesElement:()=>No,OperationSecurityElement:()=>Ro,OperationTagsElement:()=>Bo,ParameterElement:()=>lo,ParametersDefinitionsElement:()=>Eo,PathItemElement:()=>oo,PathItemParametersElement:()=>Ho,PathsElement:()=>io,PatternedFieldsVisitor:()=>hc,ReferenceElement:()=>bo,ResponseElement:()=>mo,ResponsesDefinitionsElement:()=>Oo,ResponsesElement:()=>ho,SchemaElement:()=>xo,ScopesElement:()=>ko,SecurityDefinitionsElement:()=>So,SecurityRequirementElement:()=>jo,SecuritySchemeElement:()=>Po,SpecificationVisitor:()=>rc,SwaggerConsumesElement:()=>Go,SwaggerElement:()=>eo,SwaggerProducesElement:()=>Xo,SwaggerSchemesElement:()=>Vo,SwaggerSecurityElement:()=>Ko,SwaggerTagsElement:()=>Qo,SwaggerVersionElement:()=>to,TagElement:()=>yo,Visitor:()=>sc,XmlElement:()=>wo,default:()=>Ao,isContactElement:()=>Uc,isDefinitionsElement:()=>ca,isExampleElement:()=>Zc,isExternalDocumentationElement:()=>Jc,isHeaderElement:()=>ea,isHeadersElement:()=>Qc,isInfoElement:()=>Lc,isItemsElement:()=>Wc,isJSONReferenceElement:()=>G,isJSONReferenceLikeElement:()=>ae,isLicenseElement:()=>Hc,isOperationElement:()=>Gc,isParameterElement:()=>Xc,isParametersDefinitionsElement:()=>aa,isPathItemElement:()=>zc,isPathsElement:()=>Vc,isReferenceElement:()=>sa,isReferenceLikeElement:()=>uc,isResponseElement:()=>Yc,isResponsesDefinitionsElement:()=>ia,isResponsesElement:()=>Kc,isSchemaElement:()=>na,isScopesElement:()=>ua,isSecurityDefinitionsElement:()=>oa,isSecurityRequirementElement:()=>pa,isSecuritySchemeElement:()=>la,isSwaggerElement:()=>qc,isSwaggerExtension:()=>lc,isSwaggerVersionElement:()=>Bc,isTagElement:()=>ta,isXmlElement:()=>ra,mediaTypes:()=>Zi,refract:()=>Dl,refractContact:()=>al,refractDefinitions:()=>Pl,refractExample:()=>wl,refractExternalDocumentation:()=>dl,refractHeader:()=>bl,refractHeaders:()=>xl,refractInfo:()=>cl,refractItems:()=>fl,refractJSONReference:()=>Ji,refractLicense:()=>ll,refractOperation:()=>hl,refractParameter:()=>ml,refractParametersDefinitions:()=>kl,refractPathItem:()=>pl,refractPaths:()=>ul,refractReference:()=>El,refractResponse:()=>yl,refractResponses:()=>gl,refractResponsesDefinitions:()=>jl,refractSchema:()=>Ol,refractScopes:()=>Fl,refractSecurityDefinitions:()=>Al,refractSecurityRequirement:()=>Ml,refractSecurityScheme:()=>Il,refractSwagger:()=>ol,refractTag:()=>vl,refractXml:()=>Sl,refractorPluginReplaceEmptyElement:()=>tc,specificationObj:()=>nl});var s={};e.r(s),e.d(s,{isJSONReferenceElement:()=>G,isJSONSchemaElement:()=>z,isLinkDescriptionElement:()=>X,isMediaElement:()=>J});var n={};e.r(n),e.d(n,{isJSONReferenceLikeElement:()=>ae});var r={};e.r(r),e.d(r,{isReferenceLikeElement:()=>uc,isSwaggerExtension:()=>lc});var i={};function o(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function c(e){return function t(s){return 0===arguments.length||o(s)?t:e.apply(this,arguments)}}function a(e){return function t(s,n){switch(arguments.length){case 0:return t;case 1:return o(s)?t:c(function(t){return e(s,t)});default:return o(s)&&o(n)?t:o(s)?c(function(t){return e(t,n)}):o(n)?c(function(t){return e(s,t)}):e(s,n)}}}function l(e){for(var t,s=[];!(t=e.next()).done;)s.push(t.value);return s}function u(e,t,s){for(var n=0,r=s.length;n<r;){if(e(t,s[n]))return!0;n+=1}return!1}function p(e,t){return Object.prototype.hasOwnProperty.call(t,e)}e.r(i),e.d(i,{isContactElement:()=>Uc,isDefinitionsElement:()=>ca,isExampleElement:()=>Zc,isExternalDocumentationElement:()=>Jc,isHeaderElement:()=>ea,isHeadersElement:()=>Qc,isInfoElement:()=>Lc,isItemsElement:()=>Wc,isLicenseElement:()=>Hc,isOperationElement:()=>Gc,isParameterElement:()=>Xc,isParametersDefinitionsElement:()=>aa,isPathItemElement:()=>zc,isPathsElement:()=>Vc,isReferenceElement:()=>sa,isResponseElement:()=>Yc,isResponsesDefinitionsElement:()=>ia,isResponsesElement:()=>Kc,isSchemaElement:()=>na,isScopesElement:()=>ua,isSecurityDefinitionsElement:()=>oa,isSecurityRequirementElement:()=>pa,isSecuritySchemeElement:()=>la,isSwaggerElement:()=>qc,isSwaggerVersionElement:()=>Bc,isTagElement:()=>ta,isXmlElement:()=>ra});const h="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var d=Object.prototype.toString;const m=function(){return"[object Arguments]"===d.call(arguments)?function(e){return"[object Arguments]"===d.call(e)}:function(e){return p("callee",e)}}();var f=!{toString:null}.propertyIsEnumerable("toString"),g=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],y=function(){return arguments.propertyIsEnumerable("length")}(),x=function(e,t){for(var s=0;s<e.length;){if(e[s]===t)return!0;s+=1}return!1},w="function"!=typeof Object.keys||y?c(function(e){if(Object(e)!==e)return[];var t,s,n=[],r=y&&m(e);for(t in e)!p(t,e)||r&&"length"===t||(n[n.length]=t);if(f)for(s=g.length-1;s>=0;)p(t=g[s],e)&&!x(n,t)&&(n[n.length]=t),s-=1;return n}):c(function(e){return Object(e)!==e?[]:Object.keys(e)});const b=w;const v=c(function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function E(e,t,s,n){var r=l(e);function i(e,t){return O(e,t,s.slice(),n.slice())}return!u(function(e,t){return!u(i,t,e)},l(t),r)}function O(e,t,s,n){if(h(e,t))return!0;var r=v(e);if(r!==v(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(r){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===function(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!h(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!h(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 i=s.length-1;i>=0;){if(s[i]===e)return n[i]===t;i-=1}switch(r){case"Map":return e.size===t.size&&E(e.entries(),t.entries(),s.concat([e]),n.concat([t]));case"Set":return e.size===t.size&&E(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 o=b(e);if(o.length!==b(t).length)return!1;var c=s.concat([e]),a=n.concat([t]);for(i=o.length-1;i>=0;){var l=o[i];if(!p(l,t)||!O(t[l],e[l],c,a))return!1;i-=1}return!0}const S=a(function(e,t){return O(e,t,[],[])});function P(e){return new RegExp(e.source,e.flags?e.flags:(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.sticky?"y":"")+(e.unicode?"u":"")+(e.dotAll?"s":""))}function k(e,t,s){if(s||(s=new j),function(e){var t=typeof e;return null==e||"object"!=t&&"function"!=t}(e))return e;var n=function(n){var r=s.get(e);if(r)return r;for(var i in s.set(e,n),e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=t?k(e[i],!0,s):e[i]);return n};switch(v(e)){case"Object":return n(Object.create(Object.getPrototypeOf(e)));case"Array":return n(Array(e.length));case"Date":return new Date(e.valueOf());case"RegExp":return P(e);case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return e.slice();default:return e}}var j=function(){function e(){this.map={},this.length=0}return e.prototype.set=function(e,t){var s=this.hash(e),n=this.map[s];n||(this.map[s]=n=[]),n.push([e,t]),this.length+=1},e.prototype.hash=function(e){var t=[];for(var s in e)t.push(Object.prototype.toString.call(e[s]));return t.join()},e.prototype.get=function(e){if(this.length<=180)for(var t in this.map)for(var s=this.map[t],n=0;n<s.length;n+=1){if((i=s[n])[0]===e)return i[1]}else{var r=this.hash(e);if(s=this.map[r])for(n=0;n<s.length;n+=1){var i;if((i=s[n])[0]===e)return i[1]}}},e}();const A=c(function(e){return null!=e&&"function"==typeof e.clone?e.clone():k(e,!0)});class I{get(e){return this[e]}set(e,t){this[e]=t}hasKey(e){return Object.hasOwn(this,e)}keys(){return Object.keys(this)}remove(e){delete this[e]}get isEmpty(){return 0===Object.keys(this).length}get isFrozen(){return Object.isFrozen(this)}freeze(){for(const e of Object.values(this))e instanceof this.Element?e.freeze():(Array.isArray(e)||null!==e&&"object"==typeof e)&&Object.freeze(e);Object.freeze(this)}cloneShallow(){const e=new I;return Object.assign(e,this),e}merge(e){const t=this.cloneShallow();for(const[s,n]of Object.entries(e)){const e=t.get(s);Array.isArray(e)&&Array.isArray(n)?t.set(s,[...e,...n]):t.set(s,n)}return t}cloneDeep(){const e=new I;for(const[t,s]of Object.entries(this))s instanceof this.Element?e.set(t,this.cloneDeepElement(s)):e.set(t,A(s));return e}}const F=I;const M=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 T=D,C=Object.freeze(new F);class ${parent;style;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 M)this._content=e;else if(e instanceof T)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)return C;this._meta=new F}return this._meta}set meta(e){if(e instanceof F)this._meta=e;else if(e&&"object"==typeof e){const t=new F;Object.assign(t,e),this._meta=t}}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(){if(!this.hasMetaProperty("id")){if(this.isFrozen)return"";this.setMetaProperty("id","")}return this.meta.get("id")}set id(e){this.setMetaProperty("id",e)}get classes(){if(!this.hasMetaProperty("classes")){if(this.isFrozen)return[];this.setMetaProperty("classes",[])}return this.meta.get("classes")}set classes(e){this.setMetaProperty("classes",e)}get links(){if(!this.hasMetaProperty("links")){if(this.isFrozen){const e=new this.ArrayElement;return e.freeze(),e}this.setMetaProperty("links",new this.ArrayElement)}return this.meta.get("links")}set links(e){this.setMetaProperty("links",e)}get children(){const{_content:e}=this;if(Array.isArray(e))return e;if(e instanceof M){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.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 M?e.toValue():Array.isArray(e)?e.map(e=>e.toValue()):e}equals(e){const t=e instanceof $?e.toValue():e;return S(this.toValue(),t)}primitive(){}set(e){return this.content=e,this}toRef(e){const t=this.id;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){return this.hasMetaProperty(e)?this.meta.get(e):t}setMetaProperty(e,t){this.meta.set(e,t)}hasMetaProperty(e){return void 0!==this._meta&&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 N=$;class _ extends N{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===e).first}concat(e){return new(0,this.constructor)(this._content.concat(e._content))}[Symbol.iterator](){return this._content[Symbol.iterator]()}}const R=_;const q=class extends N{constructor(e,t,s,n){super(new M,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 B=class extends R{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 q(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 T(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 T(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 L=class extends B{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 B{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 U=class extends B{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 V=class extends B{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=e=>e instanceof L,G=e=>e instanceof H,J=e=>e instanceof U,X=e=>e instanceof V;const W=class extends N{constructor(e,t,s){super(e,t,s),this.element="string"}primitive(){return"string"}get length(){return this.content?.length??0}};const K=class extends N{constructor(e,t,s){super(e,t,s),this.element="number"}primitive(){return"number"}};const Y=class extends N{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 Q=class extends N{constructor(e,t,s){super(e,t,s),this.element="boolean"}primitive(){return"boolean"}};const Z=class extends R{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([])}},ee=e=>e instanceof N,te=e=>e instanceof W,se=e=>e instanceof K,ne=e=>e instanceof Y,re=e=>e instanceof Q,ie=e=>e instanceof Z,oe=e=>e instanceof B,ce=e=>e instanceof q,ae=e=>oe(e)&&e.hasKey("$ref");function le(e,t,s){for(var n=0,r=s.length;n<r;)t=e(t,s[n]),n+=1;return t}var ue=a(function(e,t){return le(function(s,n){return s[n]=e(t[n],n,t),s},{},b(t))});const pe=ue;const he=c(function(e){return null==e});var de=a(function(e,t){if(0===e.length||he(t))return!1;for(var s=t,n=0;n<e.length;){if(he(s)||!p(e[n],s))return!1;s=s[e[n]],n+=1}return!0});const me=de;var fe=a(function(e,t){return me([e],t)});const ge=fe;function ye(e){return function t(s,n,r){switch(arguments.length){case 0:return t;case 1:return o(s)?t:a(function(t,n){return e(s,t,n)});case 2:return o(s)&&o(n)?t:o(s)?a(function(t,s){return e(t,n,s)}):o(n)?a(function(t,n){return e(s,t,n)}):c(function(t){return e(s,n,t)});default:return o(s)&&o(n)&&o(r)?t:o(s)&&o(n)?a(function(t,s){return e(t,s,r)}):o(s)&&o(r)?a(function(t,s){return e(t,n,s)}):o(n)&&o(r)?a(function(t,n){return e(s,t,n)}):o(s)?c(function(t){return e(t,n,r)}):o(n)?c(function(t){return e(s,t,r)}):o(r)?c(function(t){return e(s,n,t)}):e(s,n,r)}}}const xe=Number.isInteger||function(e){return(e|0)===e};function we(e,t){return t[e<0?t.length+e:e]}const be=a(function(e,t){if(null!=t)return xe(e)?we(e,t):t[e]});const ve=ye(function(e,t,s){return e(be(t,s))});function Ee(e,t){for(var s=t,n=0;n<e.length;n+=1){if(null==s)return;var r=e[n];s=xe(r)?we(r,s):s[r]}return s}const Oe=a(Ee);function Se(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 Pe(e,t){return function(){return t.call(this,e.apply(this,arguments))}}const ke=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 Ae=c(function(e){return!!ke(e)||!!e&&("object"==typeof e&&(!je(e)&&(0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))});var Ie="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function Fe(e,t,s){return function(n,r,i){if(Ae(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[Ie])return s(n,r,i[Ie]());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 Me(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)}var De=a(function(e,t){return Se(e.length,function(){return e.apply(t,arguments)})});const Te=De;function Ce(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 $e(e,t,s,n){return e["@@transducer/result"](s[n](Te(e["@@transducer/step"],e),t))}const Ne=Fe(Me,$e,Ce);var _e=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 Re=ye(function(e,t,s){return Ne("function"==typeof e?new _e(e):e,t,s)});function qe(e,t){return function(){var s=arguments.length;if(0===s)return t();var n=arguments[s-1];return ke(n)||"function"!=typeof n[e]?t.apply(this,arguments):n[e].apply(n,Array.prototype.slice.call(arguments,0,s-1))}}const Be=ye(qe("slice",function(e,t,s){return Array.prototype.slice.call(s,e,t)}));const Le=c(qe("tail",Be(1,1/0)));function He(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return Se(arguments[0].length,Re(Pe,arguments[0],Le(arguments)))}var Ue=function(e,t){switch(arguments.length){case 0:return Ue;case 1:return function t(s){return 0===arguments.length?t:h(e,s)};default:return h(e,t)}};const Ve=Ue;function ze(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(S(e[s],t))return s;s+=1}return-1}(t,e,0)>=0}function Ge(e,t){for(var s=0,n=t.length,r=Array(n);s<n;)r[s]=e(t[s]),s+=1;return r}function Je(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 Xe=function(e){return(e<10?"0":"")+e};const We="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+Xe(e.getUTCMonth()+1)+"-"+Xe(e.getUTCDate())+"T"+Xe(e.getUTCHours())+":"+Xe(e.getUTCMinutes())+":"+Xe(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function Ke(e,t,s){return function(){if(0===arguments.length)return s();var n=arguments[arguments.length-1];if(!ke(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 Ye(e){return"[object Object]"===Object.prototype.toString.call(e)}const Qe=function(){return this.xf["@@transducer/init"]()},Ze=function(e){return this.xf["@@transducer/result"](e)};var et=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=Qe,e.prototype["@@transducer/result"]=Ze,e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.xf["@@transducer/step"](e,t):e},e}();function tt(e){return function(t){return new et(e,t)}}var st=a(Ke(["fantasy-land/filter","filter"],tt,function(e,t){return Ye(t)?le(function(s,n){return e(t[n])&&(s[n]=t[n]),s},{},b(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 nt=st;const rt=a(function(e,t){return nt((s=e,function(){return!s.apply(this,arguments)}),t);var s});function it(e,t){var s=function(s){var n=t.concat([e]);return ze(s,n)?"<Circular>":it(s,n)},n=function(e,t){return Ge(function(t){return Je(t)+": "+s(e[t])},t.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+Ge(s,e).join(", ")+"))";case"[object Array]":return"["+Ge(s,e).concat(n(e,rt(function(e){return/^\d+$/.test(e)},b(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):Je(We(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())+")":Je(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,b(e)).join(", ")+"}"}}const ot=c(function(e){return it(e,[])});const ct=ye(function(e,t,s){return e(Ee(t,s))});function at(e){var t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t}const lt=a(function(e,t){return e&&t});function ut(e,t,s){for(var n=s.next();!n.done;)t=e(t,n.value),n=s.next();return t}function pt(e,t,s,n){return s[n](e,t)}const ht=Fe(le,pt,ut);var dt=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=Qe,e.prototype["@@transducer/result"]=Ze,e.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},e}();const mt=function(e){return function(t){return new dt(e,t)}};function ft(e,t,s){return function(){for(var n=[],r=0,i=e,c=0,a=!1;c<t.length||r<arguments.length;){var l;c<t.length&&(!o(t[c])||r>=arguments.length)?l=t[c]:(l=arguments[r],r+=1),n[c]=l,o(l)?a=!0:i-=1,c+=1}return!a&&i<=0?s.apply(this,n):Se(Math.max(0,i),ft(e,n,s))}}var gt=a(function(e,t){return 1===e?c(t):Se(e,ft(e,[],t))});const yt=gt;var xt=a(Ke(["fantasy-land/map","map"],mt,function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return yt(t.length,function(){return e.call(this,t.apply(this,arguments))});case"[object Object]":return le(function(s,n){return s[n]=e(t[n]),s},{},b(t));default:return Ge(e,t)}}));const wt=xt;const bt=a(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))}:ht(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,wt(s,t))},[],e)});var vt=a(function(e,t){var s=yt(e,t);return yt(e,function(){return le(bt,wt(s,arguments[0]),Array.prototype.slice.call(arguments,1))})});const Et=vt;var Ot=c(function(e){return Et(e.length,e)});const St=Ot;const Pt=a(function(e,t){return at(e)?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:St(lt)(e,t)});const kt=S(null);const jt=St(c(function(e){return!e}));const At=jt(kt);function It(e){return It="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},It(e)}const Ft=function(e){return"object"===It(e)};const Mt=yt(1,Pt(At,Ft));const Dt=a(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=ot(e),o=s(i,ot(t));return void 0!==o&&o===i?e:t});const Tt=a(function(e,t){return wt(be(e),t)});const Ct=c(function(e){return yt(Re(Dt,0,Tt("length",e)),function(){for(var t=0,s=e.length;t<s;){if(e[t].apply(this,arguments))return!0;t+=1}return!1})});const $t=yt(1,He(v,Ve("GeneratorFunction")));const Nt=yt(1,He(v,Ve("AsyncFunction")));const _t=Ct([He(v,Ve("Function")),$t,Nt]);var Rt=He(v,Ve("Object")),qt=He(ot,S(ot(Object))),Bt=ct(Pt(_t,qt),["constructor"]);const Lt=yt(1,function(e){if(!Mt(e)||!Rt(e))return!1;var t=Object.getPrototypeOf(e);return!!kt(t)||Bt(t)});const Ht=yt(1,He(v,Ve("String")));var Ut=c(function(e){return yt(e.length,e)});const Vt=Ut;const zt=a(function(e,t){return yt(e+1,function(){var s=arguments[e];if(null!=s&&at(s[t]))return s[t].apply(s,Array.prototype.slice.call(arguments,0,e));throw new TypeError(ot(s)+' does not have a method named "'+t+'"')})});const Gt=zt(1,"split");var Jt=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=Qe,e.prototype["@@transducer/result"]=Ze,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 Xt(e){return function(t){return new Jt(e,t)}}const Wt=a(Ke(["dropWhile"],Xt,function(e,t){for(var s=0,n=t.length;s<n&&e(t[s]);)s+=1;return Be(s,1/0,t)}));const Kt=zt(1,"join");var Yt=c(function(e){return yt(e.length,function(t,s){var n=Array.prototype.slice.call(arguments,0);return n[0]=s,n[1]=t,e.apply(this,n)})});const Qt=Yt(a(ze));const Zt=Vt(function(e,t){return He(Gt(""),Wt(Qt(e)),Kt(""))(t)}),es=new WeakMap,ts=e=>{if(es.has(e))return es.get(e);const t={},s=(e,n,r)=>("string"==typeof e.element&&(t[e.element]=e.$visitor?[...r,"$visitor"]:r),pe((e,t)=>{const i=[...r,t];if(Lt(e)&&ge("$ref",e)&&ve(Ht,"$ref",e)){const t=Oe(["$ref"],e),s=Zt("#/",t),r=Oe(s.split("/"),n),{$ref:i,...o}=e;return Object.keys(o).length>0&&Lt(r)?{...r,...o}:r}return Lt(e)?s(e,n,i):e},e)),n=s(e,e,[]);return n.elementMap=t,es.set(e,n),n},ss=e=>void 0!==e.style,ns=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,rs=(e,t)=>0===t.length||!!ee(e)&&(!e.isMetaEmpty&&(!!e.hasMetaProperty("classes")&&t.every(t=>e.classes.includes(t))));class is extends W{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(cs).join("");const a=new is(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=as(t,n);s.push(e.value),n=e.next}return s}(this.content))}}const os="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function cs(e){let t=e>>>0,s="";do{let e=31&t;t>>>=5,0!==t&&(e|=32),s+=os[e]}while(0!==t);return s}function as(e,t=0){let s=0,n=0,r=t;for(;;){const t=e[r++],i=os.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 ls=is;class us 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 ps=us;class hs extends Error{static[Symbol.hasInstance](e){return super[Symbol.hasInstance](e)||Function.prototype[Symbol.hasInstance].call(ps,e)}constructor(e,t){super(e,t),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const ds=hs;const ms=class extends ds{constructor(e,t){if(super(e,t),null!=t&&"object"==typeof t){const{cause:e,...s}=t;Object.assign(this,s)}}};const fs=class extends ms{value;constructor(e,t){super(e,t),void 0!==t&&(this.value=t.value)}};const gs=class extends fs{};const ys=class extends fs{},xs=(e,t)=>{const{visited:s=new WeakMap}=t,n={...t,visited:s};if(s.has(e))return s.get(e);const r=Es(e);s.set(e,r);const{content:i}=e;return Array.isArray(i)?r.content=i.map(e=>xs(e,n)):ee(i)?r.content=xs(i,n):r.content=i instanceof M?ws(i,n):i,r},ws=(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?xs(r,n):void 0,c=void 0!==i?xs(i,n):void 0,a=new M(o,c);return s.set(e,a),a},bs=(e,t={})=>{if(e instanceof M)return ws(e,t);if(e instanceof T)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=>xs(e,n)),i=new T(r);return s.set(e,i),i})(e,t);if(ee(e))return xs(e,t);throw new gs("Value provided to cloneDeep function couldn't be cloned",{value:e})};bs.safe=e=>{try{return bs(e)}catch{return e}};const vs=e=>{const{key:t,value:s}=e;return new M(t,s)},Es=e=>{const t=new(0,e.constructor);t.element=e.element,e.isMetaEmpty||(t.meta=e.meta.cloneDeep()),e.isAttributesEmpty||(t.attributes=bs(e.attributes)),ns(e)&&ls.transfer(e,t),ss(e)&&(t.style=A(e.style));const{content:s}=e;return ee(s)?t.content=Es(s):Array.isArray(s)?t.content=[...s]:t.content=s instanceof M?vs(s):s,t},Os=e=>{if(e instanceof M)return vs(e);if(e instanceof T)return(e=>{const t=[...e];return new T(t)})(e);if(ee(e))return Es(e);throw new ys("Value provided to cloneShallow function couldn't be cloned",{value:e})};Os.safe=e=>{try{return Os(e)}catch{return e}};const Ss=class extends N{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 Ps=class extends N{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 ks=class extends W{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 js=class extends W{constructor(e,t,s){super(e,t,s),this.element="comment"}};const As=class extends Z{constructor(e,t,s){super(e,t,s),this.element="parseResult"}get api(){return this.filter(e=>rs(e,["api"])).first}get results(){return this.filter(e=>rs(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&&rs(e,["warning"]))}get errors(){return this.filter(e=>"annotation"===e.element&&rs(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)}},Is=e=>e instanceof Ss,Fs=e=>e instanceof Ps,Ms=e=>{if(!ee(e))return e;if(te(e)||se(e)||re(e)||ne(e))return e.toValue();const t=new WeakMap,s=e=>{if(!ee(e))return e;if(oe(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(ie(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 Fs(e)?String(e.toValue()):Is(e)?te(e.href)?e.href.toValue():"":e.toValue()};return s(e)},Ds=e=>{const t=e.isMetaEmpty?void 0:e.meta.cloneDeep(),s=e.isAttributesEmpty?void 0:bs(e.attributes);return new e.constructor(void 0,t,s)},Ts=(e,t)=>t.clone&&t.isMergeableElement(e)?$s(Ds(e),e,t):e,Cs={clone:!0,isMergeableElement:e=>oe(e)||ie(e),arrayElementMerge:(e,t,s)=>new(0,e.constructor)(e.concat(t).map(e=>Ts(e,s))),objectElementMerge:(e,t,s)=>{const n=oe(e)?Ds(e):Ds(t);return oe(e)&&e.forEach((e,t,r)=>{const i=Os(r);i.value=Ts(e,s),n.content.push(i)}),t.forEach((t,r,i)=>{const o=Ms(r);let c;if(oe(e)&&e.hasKey(o)&&s.isMergeableElement(t)){const n=e.get(o);c=Os(i),c.value=((e,t)=>{if("function"!=typeof t.customMerge)return $s;const s=t.customMerge(e,t);return"function"==typeof s?s:$s})(r,s)(n,t,s)}else c=Os(i),c.value=Ts(t,s);n.remove(o),n.content.push(c)}),n},customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0},$s=(e,t,s)=>{const n={...Cs,...s};n.isMergeableElement=n.isMergeableElement??Cs.isMergeableElement,n.arrayElementMerge=n.arrayElementMerge??Cs.arrayElementMerge,n.objectElementMerge=n.objectElementMerge??Cs.objectElementMerge;const r=ie(t);if(!(r===ie(e)))return Ts(t,n);const i=r&&"function"==typeof n.arrayElementMerge?n.arrayElementMerge(e,t,n):n.objectElementMerge(e,t,n);return e.isMetaEmpty||t.isMetaEmpty?e.isMetaEmpty?t.isMetaEmpty||(i.meta=t.meta.cloneDeep()):i.meta=e.meta.cloneDeep():i.meta=(e=>"function"!=typeof e.customMetaMerge?e=>e.cloneDeep():e.customMetaMerge)(n)(e.meta,t.meta),e.isAttributesEmpty||t.isAttributesEmpty?e.isAttributesEmpty?t.isAttributesEmpty||(i.attributes=bs(t.attributes)):i.attributes=bs(e.attributes):i.attributes=(e=>"function"!=typeof e.customAttributesMerge?e=>bs(e):e.customAttributesMerge)(n)(e.attributes,t.attributes),i};$s.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,s)=>$s(e,s,t),Ds(e[0]))};const Ns=$s;class _s extends B{constructor(e,t,s){super(e,t,s),this.element="__styles__"}static transfer(e,t){t.style=e.style}static from(e){if(e.style)return new _s(e.style)}applyTo(e){e.style=this.toValue()}}const Rs=_s;const qs=class{element;consume=!1;consumeSafe=!1;constructor(e){Object.assign(this,e)}copyMetaAndAttributes(e,t){e.isMetaEmpty||t.isMetaEmpty?e.isMetaEmpty||(t.meta=e.meta.cloneDeep()):t.meta=t.meta.merge(e.meta),e.isAttributesEmpty||t.isAttributesEmpty?e.isAttributesEmpty||(t.attributes=bs(e.attributes)):t.attributes=Ns(t.attributes,e.attributes),ls.transfer(e,t),Rs.transfer(e,t)}};const Bs=class extends qs{enter(e){this.element=this.consume?e.node:bs(e.node),e.stop()}};const Ls=c(function(e){return function(){return e}});const Hs=a(function(e,t){return null==t||t!=t?e:t});const Us=Ls(void 0);const Vs=S(Us());const zs=c(function(e){return yt(Re(Dt,0,Tt("length",e)),function(){for(var t=0,s=e.length;t<s;){if(!e[t].apply(this,arguments))return!1;t+=1}return!0})});var Gs=c(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:ke(e)?[]:je(e)?"":Ye(e)?{}:m(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 Js=Gs;const Xs=c(function(e){return null!=e&&S(e,Js(e))});const Ws=c(function(e){return!Xs(e)});const Ks=a(function(e,t){return e||t});const Ys=yt(1,Pt(At,a(function(e,t){return at(e)?function(){return e.apply(this,arguments)||t.apply(this,arguments)}:St(Ks)(e,t)})(Ft,_t)));var Qs=jt(Ys);const Zs=zs([Ht,Qs,Ws]);const en=a(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}),tn=function(){const e=nn,t=sn,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,m=0,f=0,g=new function(){this.state=e.ACTIVE,this.phraseLength=0,this.refresh=()=>{this.state=e.ACTIVE,this.phraseLength=0}};s.parse=(y,x,b,v)=>{const E=`${n}parse(): `;p=0,h=0,d=0,m=0,f=0,r=void 0,i=void 0,o=void 0,c=void 0,g.refresh(),a=void 0,l=void 0,u=void 0,c=t.stringToChars(b),r=y.rules,i=y.udts;const O=x.toLowerCase();let S;for(const e in r)if(r.hasOwnProperty(e)&&O===r[e].lower){S=r[e].index;break}if(void 0===S)throw new Error(`${E}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:S}],w(0,0),o=void 0;let P=!1;switch(g.state){case e.ACTIVE:throw new Error(`${E}final state should never be 'ACTIVE'`);case e.NOMATCH:P=!1;break;case e.EMPTY:case e.MATCH:P=g.phraseLength===c.length;break;default:throw new Error("unrecognized state")}return{success:P,state:g.state,stateName:e.idName(g.state),length:c.length,matched:g.phraseLength,maxMatched:f,maxTreeDepth:d,nodeHits:m}};const y=(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,m;const f=o[t],y=i[f.index];g.UdtIndex=y.index,p||(m=s.ast&&s.ast.udtDefined(f.index),m&&(d=r.length+f.index,h=s.ast.getLength(),s.ast.down(d,y.name)));const x=c.length-a;l[f.index](g,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}`)}})(y,g,x),p||m&&(g.state===e.NOMATCH?s.ast.setLength(h):s.ast.up(d,y.name,a,g.phraseLength))},w=(t,i)=>{const l=`${n}opExecute(): `,b=o[t];switch(m+=1,h>d&&(d=h),h+=1,g.refresh(),s.trace&&s.trace.down(b,i),b.type){case e.ALT:((t,s)=>{const n=o[t];for(let t=0;t<n.children.length&&(w(n.children[t],s),g.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(w(l.children[t],c),g.state===e.NOMATCH){r=!1;break}c+=g.phraseLength,a+=g.phraseLength}r?(g.state=0===a?e.EMPTY:e.MATCH,g.phraseLength=a):(g.state=e.NOMATCH,g.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 g.state=e.EMPTY,void(g.phraseLength=0);for(i=n,a=0,l=0,s.ast&&(r=s.ast.getLength());!(i>=c.length)&&(w(t+1,i),g.state!==e.NOMATCH)&&g.state!==e.EMPTY&&(l+=1,a+=g.phraseLength,i+=g.phraseLength,l!==u.max););g.state===e.EMPTY||l>=u.min?(g.state=0===a?e.EMPTY:e.MATCH,g.phraseLength=a):(g.state=e.NOMATCH,g.phraseLength=0,s.ast&&s.ast.setLength(r))})(t,i);break;case e.RNM:((t,n)=>{let i,l,h;const d=o[t],m=r[d.index],f=a[m.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))),f){const t=c.length-n;f(g,c,n,u),y(m,g,t,!0),g.state===e.ACTIVE&&(h=o,o=m.opcodes,w(0,n),o=h,f(g,c,n,u),y(m,g,t,!1))}else h=o,o=m.opcodes,w(0,n,g),o=h;p||l&&(g.state===e.NOMATCH?s.ast.setLength(i):s.ast.up(d.index,m.name,n,g.phraseLength))})(t,i);break;case e.TRG:((t,s)=>{const n=o[t];g.state=e.NOMATCH,s<c.length&&n.min<=c[s]&&c[s]<=n.max&&(g.state=e.MATCH,g.phraseLength=1)})(t,i);break;case e.TBS:((t,s)=>{const n=o[t],r=n.string.length;if(g.state=e.NOMATCH,s+r<=c.length){for(let e=0;e<r;e+=1)if(c[s+e]!==n.string[e])return;g.state=e.MATCH,g.phraseLength=r}})(t,i);break;case e.TLS:((t,s)=>{let n;const r=o[t];g.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;g.state=e.MATCH,g.phraseLength=i}}else g.state=e.EMPTY})(t,i);break;case e.UDT:x(t,i);break;case e.AND:((t,s)=>{switch(p+=1,w(t+1,s),p-=1,g.phraseLength=0,g.state){case e.EMPTY:case e.MATCH:g.state=e.EMPTY;break;case e.NOMATCH:g.state=e.NOMATCH;break;default:throw new Error(`opAND: invalid state ${g.state}`)}})(t,i);break;case e.NOT:((t,s)=>{switch(p+=1,w(t+1,s),p-=1,g.phraseLength=0,g.state){case e.EMPTY:case e.MATCH:g.state=e.NOMATCH;break;case e.NOMATCH:g.state=e.EMPTY;break;default:throw new Error(`opNOT: invalid state ${g.state}`)}})(t,i);break;default:throw new Error(`${l}unrecognized operator`)}p||i+g.phraseLength>f&&(f=i+g.phraseLength),s.stats&&s.stats.collect(b,g),s.trace&&s.trace.up(b,g.state,i,g.phraseLength),h-=1}},sn={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)}},nn={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 nn.ALT:return"ALT";case nn.CAT:return"CAT";case nn.REP:return"REP";case nn.RNM:return"RNM";case nn.TRG:return"TRG";case nn.TBS:return"TBS";case nn.TLS:return"TLS";case nn.UDT:return"UDT";case nn.AND:return"AND";case nn.NOT:return"NOT";case nn.ACTIVE:return"ACTIVE";case nn.EMPTY:return"EMPTY";case nn.MATCH:return"MATCH";case nn.NOMATCH:return"NOMATCH";case nn.SEM_PRE:return"SEM_PRE";case nn.SEM_POST:return"SEM_POST";case nn.SEM_OK:return"SEM_OK";default:return"UNRECOGNIZED STATE"}}};function rn(){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 on 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 cn=on;new rn;new rn,new tn,new rn,new tn,new rn,new tn,new rn,new tn;const an=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 ln=class extends cn{},un=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 an(String(e))}).join("/")}`}catch(t){throw new ln("Unexpected error during JSON Pointer compilation",{cause:t,referenceTokens:e})}};class pn extends Error{constructor(e,t=void 0){if(super(e,t),this.name=this.constructor.name,"string"==typeof e&&(this.message=e),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack,null!=t&&"object"==typeof t&&Object.hasOwn(t,"cause")&&!("cause"in this)){const{cause:e}=t;this.cause=e,e instanceof Error&&"stack"in e&&(this.stack=`${this.stack}\nCAUSE: ${e.stack}`)}if(null!=t&&"object"==typeof t){const{cause:e,...s}=t;Object.assign(this,s)}}}const hn=pn;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 dn=class extends hn{},mn=e=>{if(!Array.isArray(e))throw new dn("Selectors must be an array, got: "+typeof e,{selectors:e});try{return`$${e.map(e=>{if("string"==typeof e)return`['${(e=>{if("string"!=typeof e)throw new TypeError("Selector must be a string");let t="";for(const 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})(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 dn("Failed to compile normalized JSONPath",{cause:t,selectors:e})}},fn=(e,t,s,n)=>{const{realm:r}=e,{value:i}=s;if(r.isObject(t)&&r.hasProperty(t,i)){n(r.getProperty(t,i),i)}},gn=(e,t,s,n)=>{const{realm:r}=e,{value:i}=s;if(!r.isArray(t))return;const o=r.getLength(t),c=((e,t)=>e>=0?e:t+e)(i,o);if(c>=0&&c<o){n(r.getElement(t,c),c)}},yn=(e,t,s,n)=>{const{realm:r}=e;for(const[e,s]of r.entries(t))n(s,e)},xn=(e,t)=>e>=0?Math.min(e,t):Math.max(t+e,0),wn=(e,t,s,n)=>{const{realm:r}=e,{start:i,end:o,step:c}=s;if(!r.isArray(t))return;const a=((e,t,s,n)=>{const r=s??1;if(0===r)return null;let i,o;if(r>0){const s=0,r=n,c=null!==e?xn(e,n):s,a=null!==t?xn(t,n):r;i=Math.max(c,0),o=Math.min(a,n)}else{const s=n-1,r=-n-1,c=null!==e?e>=0?Math.min(e,n-1):Math.max(n+e,-1):s,a=null!==t?t>=0?Math.min(t,n-1):Math.max(n+t,-1):r;o=Math.min(c,n-1),i=Math.max(a,-1)}return{lower:i,upper:o,step:r}})(i,o,c,r.getLength(t));if(null===a)return;const{lower:l,upper:u,step:p}=a;if(p>0)for(let e=l;e<u;e+=p){n(r.getElement(t,e),e)}else for(let e=u;e>l;e+=p){n(r.getElement(t,e),e)}},bn=(e,t,s,n)=>n.value,vn=(e,t,s)=>{const{realm:n}=e,{selector:r}=s;switch(r.type){case"NameSelector":{const{value:e}=r;return n.isObject(t)&&n.hasProperty(t,e)?n.getProperty(t,e):void 0}case"IndexSelector":{const{value:e}=r;if(!n.isArray(t))return;const s=n.getLength(t),i=e>=0?e:s+e;return i>=0&&i<s?n.getElement(t,i):void 0}default:return}},En=(e,t,s,n)=>{const{selectors:r}=s;for(const s of r)Cn(e,t,s,n)},On=(e,t,s)=>{const n=[],r=e=>{n.push(e)},{selector:i}=s;switch(i.type){case"BracketedSelection":En(e,t,i,r);break;case"NameSelector":case"WildcardSelector":case"IndexSelector":case"SliceSelector":case"FilterSelector":Cn(e,t,i,r)}return n},Sn=(e,t,s,n)=>{let r=s;for(const t of n){const s=[];if("DescendantSegment"===t.type){const n=r=>{const{realm:i}=e,o=On(e,r,t);s.push(...o);for(const[,e]of i.entries(r))n(e)};for(const e of r)n(e)}else for(const n of r){const r=On(e,n,t);s.push(...r)}r=s}return r},Pn=(e,t,s,n)=>{const{query:r}=n;let i;switch(r.type){case"RelQuery":i=((e,t,s,n)=>{const{segments:r}=n;return 0===r.length?[s]:Sn(e,0,[s],r)})(e,0,s,r);break;case"JsonPathQuery":i=((e,t,s,n)=>{const{segments:r}=n;return 0===r.length?[t]:Sn(e,0,[t],r)})(e,t,0,r);break;default:i=[]}return o=i,Object.defineProperty(o,"_isNodelist",{value:!0,enumerable:!1,writable:!1}),o;var o};let kn;const jn=(e,t,s,n)=>{const{name:r,arguments:i}=n,o=e.functions[r];if("function"!=typeof o)return;const c=i.map(n=>((e,t,s,n)=>{switch(n.type){case"Literal":case"RelSingularQuery":case"AbsSingularQuery":case"FunctionExpr":return An(e,t,s,n);case"FilterQuery":return Pn(e,t,s,n);case"TestExpr":return"FilterQuery"===n.expression.type?Pn(e,t,s,n.expression):"FunctionExpr"===n.expression.type?An(e,t,s,n.expression):kn(e,t,s,n);case"LogicalOrExpr":case"LogicalAndExpr":case"LogicalNotExpr":case"ComparisonExpr":return kn(e,t,s,n);default:return}})(e,t,s,n));return o(e.realm,...c)},An=(e,t,s,n)=>{switch(n.type){case"Literal":return bn(e,t,s,n);case"RelSingularQuery":return((e,t,s,n)=>{let r=s;for(const t of n.segments)if(r=vn(e,r,t),void 0===r)return;return r})(e,0,s,n);case"AbsSingularQuery":return((e,t,s,n)=>{let r=t;for(const t of n.segments)if(r=vn(e,r,t),void 0===r)return;return r})(e,t,0,n);case"FunctionExpr":return jn(e,t,s,n);default:return}},In=(e,t,s,n)=>{const{left:r,op:i,right:o}=n,c=An(e,t,s,r),a=An(e,t,s,o);return e.realm.compare(c,i,a)},Fn=e=>Array.isArray(e),Mn=(e,t,s,n)=>{switch(n.type){case"LogicalOrExpr":return!!Mn(e,t,s,n.left)||Mn(e,t,s,n.right);case"LogicalAndExpr":return!!Mn(e,t,s,n.left)&&Mn(e,t,s,n.right);case"LogicalNotExpr":return!Mn(e,t,s,n.expression);case"TestExpr":{const{expression:r}=n;if("FilterQuery"===r.type){return Pn(e,t,s,r).length>0}if("FunctionExpr"===r.type){const n=jn(e,t,s,r);return"boolean"==typeof n?n:void 0!==n&&(Fn(n)?n.length>0:Boolean(n))}return!1}case"ComparisonExpr":return In(e,t,s,n);default:return!1}};kn=Mn;const Dn=Mn,Tn=(e,t,s,n)=>{const{realm:r,root:i}=e,{expression:o}=s;for(const[s,c]of r.entries(t)){Dn(e,i,c,o)&&n(c,s)}},Cn=(e,t,s,n)=>{switch(s.type){case"NameSelector":fn(e,t,s,n);break;case"IndexSelector":gn(e,t,s,n);break;case"WildcardSelector":yn(e,t,s,n);break;case"SliceSelector":wn(e,t,s,n);break;case"FilterSelector":Tn(e,t,s,n)}};new Map;class $n{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;){const{key:s,parent:n,parentPath:r}=t;if(ce(n)&&"value"===s){if(!te(n.key))throw new TypeError("MemberElement.key must be a StringElement");e.unshift(n.key.toValue())}else ie(r?.node)&&"number"==typeof s&&e.unshift(s);t=t.parentPath}return e}formatPath(e="jsonpointer"){const t=this.getPathKeys();return 0===t.length?"jsonpath"===e?"$":"":"jsonpath"===e?mn(t):un(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}}const Nn=yt(1,Pt(Ys,He(ot,S("[object Promise]")))),_n=e=>{const t=e?.element;return void 0===t||"element"===t?"Element":`${t.charAt(0).toUpperCase()}${t.slice(1)}Element`},Rn=e=>ee(e),qn=e=>Os(e),Bn=(e,t,s)=>{ce(e)?e.value=s:Array.isArray(e)?e[t]=null===s?void 0:s:null===s?delete e[t]:e[t]=s},Ln=e=>ce(e)?["key","value"]:ie(e)||oe(e)?["content"]:[],Hn=(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]}},Un=(e,t,s)=>{if(void 0===t)return null;const n=e,r=s?"leave":"enter",i=Hn(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=Hn(o,t);if("function"==typeof e)return e}return null},Vn=(e,t={})=>{const{visitFnGetter:s=Un,nodeTypeGetter:n=_n,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=Gn(t,a),n=i.call(e[u],s);if(Nn(n))throw new ms("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=Gn(t,r),n=i.call(e[a],s);if(Nn(n))throw new ms("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)}}},zn=(e,t={})=>{const{visitFnGetter:s=Un,nodeTypeGetter:n=_n,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=Gn(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=Gn(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 Gn(e,t){return new $n(t,e.parent,e.parentPath,e.key,e.inList)}function*Jn(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,m=Array.isArray(e),f=[e],g=-1,y=[],x=e,w=null,b=null;const v=[];do{g+=1;const e=g===f.length;let s;const E=e&&0!==y.length;if(e){if(s=0===v.length?void 0:w?.key,x=d,d=v.pop(),b=w?.parentPath?.parentPath??null,E)if(l)for(const[e,t]of y)u(x,e,t);else if(m){x=x.slice();let e=0;for(const[t,s]of y){const n=t-e;null===s?(x.splice(n,1),e+=1):x[n]=s}}else{x=c(x);for(const[e,t]of y)x[e]=t}if(void 0!==h){g=h.index,f=h.keys,y=h.edits;const e=h.inArray;if(b=h.parentPath,h=h.prev,E&&!l){const t=e?g:f[g];y.push([t,x])}m=e}}else if(void 0!==d&&(s=m?g:f[g],x=d[s],void 0===x))continue;if(!Array.isArray(x)){if(!o(x))throw new ms(`Invalid AST Node: ${String(x)}`,{node:x});if(a&&v.includes(x))continue;w=new $n(x,d,b,s,m);const n=Un(t,i(x),e);if(n){for(const[e,s]of Object.entries(r))t[e]=s;const i=yield{visitFn:n,path:w,isLeaving:e};if(w.shouldStop)break;if(w.shouldSkip&&!e)continue;if(w.removed){if(y.push([s,null]),!e)continue}else if(w._wasReplaced()){const t=w._getReplacementNode();if(y.push([s,t]),!e){if(!o(t))continue;x=t}}else if(void 0!==i&&(y.push([s,i]),!e)){if(!o(i))continue;x=i}w._markStale()}}if(!e){if(h={inArray:m,index:g,keys:f,edits:y,parentPath:b,prev:h},m=Array.isArray(x),m)f=x;else if(p)f=n(x);else{const e=i(x);f=void 0!==e?n[e]??[]:[]}g=-1,y=[],void 0!==d&&v.push(d),d=x,b=w}}while(void 0!==h);return 0!==y.length?y.at(-1)[1]:e}Vn[Symbol.for("nodejs.util.promisify.custom")]=zn;const Xn=(e,t,s={})=>{const n=Jn(e,t,{keyMap:s.keyMap??Ln,state:s.state??{},nodeTypeGetter:s.nodeTypeGetter??_n,nodePredicate:s.nodePredicate??Rn,nodeCloneFn:s.nodeCloneFn??qn,detectCycles:s.detectCycles??!0,mutable:s.mutable??!1,mutationFn:s.mutationFn??Bn});let r=n.next();for(;!r.done;){const e=r.value,s=e.visitFn.call(t,e.path);if(Nn(s))throw new ms("Async visitor not supported in sync mode",{visitor:t,visitFn:e.visitFn});r=n.next(s)}return r.value},Wn=async(e,t,s={})=>{const n=Jn(e,t,{keyMap:s.keyMap??Ln,state:s.state??{},nodeTypeGetter:s.nodeTypeGetter??_n,nodePredicate:s.nodePredicate??Rn,nodeCloneFn:s.nodeCloneFn??qn,detectCycles:s.detectCycles??!0,mutable:s.mutable??!1,mutationFn:s.mutationFn??Bn});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};Xn[Symbol.for("nodejs.util.promisify.custom")]=Wn,$n.prototype.traverse=function(e,t){return Xn(this.node,e,t)},$n.prototype.traverseAsync=function(e,t){return Wn(this.node,e,t)};const Kn=class extends qs{specObj;passingOptionsNames=["specObj","parent","consume"];constructor({specObj:e,...t}){super({...t}),this.specObj=e}retrievePassingOptions(){return en(this.passingOptionsNames,this)}retrieveFixedFields(e){const t=Oe(["visitors",...e,"fixedFields"],this.specObj);return"object"==typeof t&&null!==t?Object.keys(t):[]}retrieveVisitor(e){return ct(_t,["visitors",...e],this.specObj)?Oe(["visitors",...e],this.specObj):Oe(["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 Bs&&n?.constructor===Bs?this.consume?t:bs(t):(Xn(t,n,s),n.element)}};const Yn=class extends Kn{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=Ms(t);if(te(t)&&n.includes(i)&&!this.ignoredFields.includes(i)){const n=this.toRefractedElement([...s,"fixedFields",i],e),o=new q(this.consume?t:bs(t),n);this.copyMetaAndAttributes(r,o),this.element.content.push(o),this.consume&&this.consumeSafe&&!r.isFrozen&&(r.value=void 0)}else this.ignoredFields.includes(i)||this.element.content.push(this.consume?r:bs(r))}),this.copyMetaAndAttributes(t,this.element),e.stop()}},Qn=(e,t,s=[])=>{const n=Object.getOwnPropertyDescriptors(t);for(let e of s)delete n[e];Object.defineProperties(e,n)},Zn=(e,t=[e])=>{const s=Object.getPrototypeOf(e);return null===s?t:Zn(s,[...t,s])},er=(e,t,s=[])=>{var n;const r=null!==(n=((...e)=>{if(0===e.length)return;let t;const s=e.map(e=>Zn(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=Zn(r);for(let t of e){let e=Zn(t);for(let t=e.length-1;t>=0;t--){let n=e[t];-1===o.indexOf(n)&&(Qn(i,n,["constructor",...s]),o.push(n))}}return i.constructor=t,i},tr=e=>e.filter((t,s)=>e.indexOf(t)==s),sr=(e,t)=>{const s=t.map(e=>Zn(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++}},nr=(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(sr(s,e)||{},s),defineProperty(){throw new Error("Cannot define new properties on Proxies created by ts-mixer")},has:(s,n)=>void 0!==sr(n,e)||void 0!==t[n],get:(s,n)=>(sr(n,e)||t)[n],set(t,s,n){const r=sr(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)))}),rr=null,ir="copy",or="copy",cr="deep",ar=new WeakMap,lr=e=>ar.get(e),ur=(e,t)=>{var s,n;const r=tr([...Object.getOwnPropertyNames(e),...Object.getOwnPropertyNames(t)]),i={};for(let o of r)i[o]=tr([...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},pr=(e,t)=>{var s,n,r,i;return{property:ur(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:ur(null!==(r=null==e?void 0:e.method)&&void 0!==r?r:{},null!==(i=null==t?void 0:t.method)&&void 0!==i?i:{})}},hr=(e,t)=>{var s,n,r,i,o,c;return{class:tr([...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:pr(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:pr(null!==(o=null==e?void 0:e.instance)&&void 0!==o?o:{},null!==(c=null==t?void 0:t.instance)&&void 0!==c?c:{})}},dr=new Map,mr=(...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=[...Zn(e.prototype).map(e=>e.constructor),...null!==(t=lr(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=>dr.get(e)).filter(e=>!!e);return 0==t.length?{}:1==t.length?t[0]:t.reduce((e,t)=>hr(e,t))},fr=e=>{let t=dr.get(e);return t||(t={},dr.set(e,t)),t};function gr(...e){var t,s,n;const r=e.map(e=>e.prototype),i=rr;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)Qn(this,new s(...t));null!==i&&"function"==typeof this[i]&&this[i].apply(this,t)}var c,a;o.prototype="copy"===or?er(r,o):(c=r,a=o,nr([...c,{constructor:a}])),Object.setPrototypeOf(o,"copy"===ir?er(e,null,["prototype"]):nr(e,Function.prototype));let l=o;if("none"!==cr){const r="deep"===cr?mr(...e):((...e)=>{const t=e.map(e=>fr(e));return 0===t.length?{}:1===t.length?t[0]:t.reduce((e,t)=>hr(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)}yr(null!==(s=null==r?void 0:r.static)&&void 0!==s?s:{},l),yr(null!==(n=null==r?void 0:r.instance)&&void 0!==n?n:{},l.prototype)}var u,p;return u=l,p=e,ar.set(u,p),l}const yr=(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 xr=function(){return!1};const wr=class extends Kn{specPath;ignoredFields;fieldPatternPredicate=xr;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=Ms(t);if(!this.ignoredFields.includes(n)&&this.fieldPatternPredicate(n)){const n=this.specPath(e),r=this.toRefractedElement(n,e),i=new q(this.consume?t:bs(t),r);this.copyMetaAndAttributes(s,i),i.classes.push("patterned-field"),this.element.content.push(i),this.consume&&this.consumeSafe&&!s.isFrozen&&(s.value=void 0)}else this.ignoredFields.includes(n)||this.element.content.push(this.consume?s:bs(s))}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const br=class extends wr{constructor(e){super(e),this.fieldPatternPredicate=Zs}};const vr=class{parent;constructor({parent:e}){this.parent=e}},Er=gr(Yn,vr,Bs),Or=gr(Yn,Bs),Sr=gr(Yn,Bs),Pr=gr(Yn,Bs),kr=gr(Kn,vr,Bs),jr=gr(Kn,vr,Bs),Ar=gr(Kn,vr,Bs),Ir=gr(Kn,vr,Bs),Fr=gr(Kn,vr,Bs),Mr=gr(br,vr,Bs),Dr=gr(br,vr,Bs),Tr=gr(br,vr,Bs),Cr=gr(br,vr,Bs);const $r=class extends Er{constructor(e){super(e),this.element=new L,this.consumeSafe=!0,this.specPath=Ls(["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,Yn.prototype.ObjectElement.call(this,e)}handleDialectIdentifier(e){if(Vs(this.parent)&&!te(e.get("$schema")))this.element.meta.set("inheritedDialectIdentifier",this.defaultDialectIdentifier);else if(z(this.parent)&&!te(e.get("$schema"))){const e=Hs(this.parent.meta.get("inheritedDialectIdentifier"),Ms(this.parent.$schema));this.element.meta.set("inheritedDialectIdentifier",e)}}handleSchemaIdentifier(e,t="id"){const s=void 0!==this.parent?[...this.parent.meta.get("ancestorsSchemaIdentifiers")??[]]:[],n=Ms(e.get(t));Zs(n)&&s.push(n),this.element.meta.set("ancestorsSchemaIdentifiers",s)}};const Nr=class extends Ir{ObjectElement(e){const t=e.node,s=ae(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=ae(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 Bs{ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-required")}};const Rr=class extends Cr{constructor(e){super(e),this.element=new B,this.element.classes.push("json-schema-properties"),this.specPath=e=>ae(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const qr=class extends Tr{constructor(e){super(e),this.element=new B,this.element.classes.push("json-schema-patternProperties"),this.specPath=e=>ae(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const Br=class extends Dr{constructor(e){super(e),this.element=new B,this.element.classes.push("json-schema-dependencies"),this.specPath=e=>ae(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const Lr=class extends Bs{ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-enum")}};const Hr=class extends Bs{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 Ur=class extends kr{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=ae(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Vr=class extends jr{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=ae(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const zr=class extends Ar{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=ae(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Gr=class extends Mr{constructor(e){super(e),this.element=new B,this.element.classes.push("json-schema-definitions"),this.specPath=e=>ae(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const Jr=class extends Fr{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 Xr=class extends Or{constructor(e){super(e),this.element=new H,this.specPath=Ls(["document","objects","JSONReference"])}ObjectElement(e){Yn.prototype.ObjectElement.call(this,e),te(this.element.$ref)&&this.element.classes.push("reference-element")}};const Wr=class extends Bs{StringElement(e){super.enter(e),this.element.classes.push("reference-value")}};const Kr=function(){return!0};const Yr=ye(function(e,t,s){return yt(Math.max(e.length,t.length,s.length),function(){return e.apply(this,arguments)?t.apply(this,arguments):s.apply(this,arguments)})});const Qr=c(function(e){return function(t,s){return e(t,s)?-1:e(s,t)?1:0}});var Zr=a(function(e,t){return Array.prototype.slice.call(t,0).sort(e)});const ei=Zr;const ti=c(function(e){return we(0,e)});function si(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}const ni=c(si);const ri=jt(he);const ii=yt(1,_t(Array.isArray)?Array.isArray:He(v,Ve("Array")));const oi=Pt(ii,Ws);function ci(e){return function(e){if(Array.isArray(e))return ai(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 ai(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)?ai(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 ai(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 li=He(ei(Qr(function(e,t){return e.length>t.length})),ti,be("length")),ui=Vt(function(e,t,s){var n=s.apply(void 0,ci(e));return ri(n)?ni(n):t});const pi=Yr(oi,function(e){var t=li(e);return yt(t,function(){for(var t=arguments.length,s=new Array(t),n=0;n<t;n++)s[n]=arguments[n];return Re(ui(s),void 0,e)})},Us);const hi=class extends Kn{alternator;constructor({alternator:e,...t}){super({...t}),this.alternator=e}enter(e){const t=e.node,s=this.alternator.map(({predicate:e,specPath:t})=>Yr(e,Ls(t),Us)),n=pi(s)(t);this.element=this.toRefractedElement(n,t),e.stop()}};const di=class extends hi{constructor(e){super(e),this.alternator=[{predicate:ae,specPath:["document","objects","JSONReference"]},{predicate:Kr,specPath:["document","objects","JSONSchema"]}]}};const mi=class extends Pr{constructor(e){super(e),this.element=new U,this.specPath=Ls(["document","objects","Media"])}};const fi={visitors:{value:Bs,JSONSchemaOrJSONReferenceVisitor:di,document:{objects:{JSONSchema:{element:"jSONSchemaDraft4",$visitor:$r,fixedFields:{id:{$ref:"#/visitors/value",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:di,items:{$visitor:Nr,alias:"itemsField"},maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:_r,properties:Rr,additionalProperties:di,patternProperties:qr,dependencies:Br,enum:Lr,type:Hr,allOf:Ur,anyOf:Vr,oneOf:zr,not:di,definitions:Gr,title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},format:{$ref:"#/visitors/value"},base:{$ref:"#/visitors/value"},links:{$visitor:Jr,alias:"linksField"},media:{$ref:"#/visitors/document/objects/Media"},readOnly:{$ref:"#/visitors/value"}}},JSONReference:{element:"jSONReference",$visitor:Xr,fixedFields:{$ref:Wr}},Media:{element:"media",$visitor:mi,fixedFields:{binaryEncoding:{$ref:"#/visitors/value"},type:{$ref:"#/visitors/value"}}},LinkDescription:{element:"linkDescription",$visitor:class extends Sr{constructor(e){super(e),this.element=new V,this.specPath=Ls(["document","objects","LinkDescription"])}},fixedFields:{href:{$ref:"#/visitors/value"},rel:{$ref:"#/visitors/value"},title:{$ref:"#/visitors/value"},targetSchema:di,mediaType:{$ref:"#/visitors/value"},method:{$ref:"#/visitors/value"},encType:{$ref:"#/visitors/value"},schema:di}}}}}},gi=ts(fi),yi=e=>Object.entries(e).map(([e,t])=>Lt(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(L,"fixedFields",{get:()=>yi(gi.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(H,"fixedFields",{get:()=>yi(gi.visitors.document.objects.JSONReference.fixedFields),enumerable:!0}),Object.defineProperty(U,"fixedFields",{get:()=>yi(gi.visitors.document.objects.Media.fixedFields),enumerable:!0}),Object.defineProperty(V,"fixedFields",{get:()=>yi(gi.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});var xi=ye(function(e,t,s){var n,r={};for(n in s=s||{},t=t||{})p(n,t)&&(r[n]=p(n,s)?e(n,t[n],s[n]):t[n]);for(n in s)p(n,s)&&!p(n,r)&&(r[n]=s[n]);return r});const wi=xi;var bi=ye(function e(t,s,n){return wi(function(s,n,r){return Ye(n)&&Ye(r)?e(t,n,r):t(s,n,r)},s,n)});const vi=bi;const Ei=a(function(e,t){return vi(function(e,t,s){return s},e,t)});const Oi=ye(function(e,t,s){return Hs(e,be(t,s))});const Si=Be(0,-1);var Pi=a(function(e,t){return e.apply(this,t)});const ki=Pi;const ji=jt(_t);const Ai=Pt(ii,Xs);const Ii=yt(3,function(e,t,s){var n=Oe(e,s),r=Oe(Si(e),s);if(!ji(n)&&!Ai(e)){var i=Te(n,r);return ki(i,t)}});const Fi=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){const s=this.serialiseMeta(e);s&&(t.meta=s.meta,s.rawKeys.length>0&&(t.__meta_raw__=s.rawKeys))}if(e.isAttributesEmpty||(t.attributes=this.serialiseObject(e.attributes)),!(e instanceof ls)){const s=ls.from(e);s&&(t.meta||(t.meta={}),t.meta.__mappings__=this.serialise(s))}if(!(e instanceof Rs)){const s=Rs.from(e);s&&(t.meta||(t.meta={}),t.meta.__styles__=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,n;t.element!==e.element&&(t.element=e.element);let r=e.meta;if(e.meta?.__mappings__||e.meta?.__styles__){const{__mappings__:t,__styles__:i,...o}=e.meta;s=t,n=i,r=Object.keys(o).length>0?o:void 0}const i=e.__meta_raw__?new Set(e.__meta_raw__):void 0;if(r)for(const[e,s]of Object.entries(r)){const n=this.deserialise(s);t.setMetaProperty(e,i?.has(e)?n.toValue():n)}if(s){this.deserialise(s).applyTo(t)}if(n){this.deserialise(n).applyTo(t)}e.attributes&&this.deserialiseObject(e.attributes,t.attributes);const o=this.deserialiseContent(e.content);return void 0===o&&null!==t.content||(t.content=o),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}serialiseMeta(e){const t={},s=[];let n=!1;for(const[r,i]of Object.entries(e.meta))if(i instanceof this.namespace.elements.Element)t[r]=this.serialise(i),n=!0;else if(void 0!==i){const o=e.refract(i);t[r]=this.serialise(o),s.push(r),n=!0}return n?{meta:t,rawKeys:s}:void 0}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]))})}},Mi=e=>null===e,Di=e=>"string"==typeof e,Ti=e=>"number"==typeof e,Ci=e=>"boolean"==typeof e,$i=e=>null!==e&&"object"==typeof e;class Ni{elementMap={};elementDetection=[];Element;KeyValuePair;_elements;_attributeElementKeys=[];_attributeElementArrayKeys=[];constructor(e){this.Element=N,this.KeyValuePair=M,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",W).register("number",K).register("boolean",Q).register("array",Z).register("object",B).register("member",q).register("ref",Ps).register("link",Ss).register("sourceMap",ls),this.detect(Mi,Y,!1).detect(Di,W,!1).detect(Ti,K,!1).detect(Ci,Q,!1).detect(Array.isArray,Z,!1).detect($i,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,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 Fi(this)}}Fi.prototype.Namespace=Ni;const _i=Ni,Ri=new _i,qi={isElement:ee,isStringElement:te,isNumberElement:se,isNullElement:ne,isBooleanElement:re,isArrayElement:ie,isObjectElement:oe,isMemberElement:ce,isPrimitiveElement:e=>oe(e)&&"object"===e.element||ie(e)&&"array"===e.element||re(e)&&"boolean"===e.element||se(e)&&"number"===e.element||te(e)&&"string"===e.element||ne(e)&&"null"===e.element||ce(e)&&"member"===e.element,isLinkElement:Is,isRefElement:Fs,isAnnotationElement:e=>e instanceof ks,isCommentElement:e=>e instanceof js,isParseResultElement:e=>e instanceof As,isSourceMapElement:e=>e instanceof ls,hasElementStyle:ss,hasElementSourceMap:ns,includesSymbols:(e,t)=>{if(0===t.length)return!0;if(!e.hasAttributesProperty("symbols"))return!1;const s=e.attributes.get("symbols");return!!ie(s)&&t.every(e=>s.includes(e))},includesClasses:rs},Bi={toolboxCreator:()=>({predicates:qi,namespace:Ri}),visitorOptions:{exposeEdits:!0}},Li=(e,t,s={})=>{if(0===t.length)return e;const n=Ei(Bi,s),{toolboxCreator:r,visitorOptions:i}=n,o=r(),c=t.map(e=>e(o)),a=Vn(c.map(Oi({},"visitor")),i);c.forEach(Ii(["pre"],[]));const l=Xn(e,a);return c.forEach(Ii(["post"],[])),l};function Hi(e){return void 0===e?new Y:Ui(e)}function Ui(e){if(e instanceof N)return e;if("string"==typeof e)return new W(e);if("number"==typeof e)return new K(e);if("boolean"==typeof e)return new Q(e);if(null===e)return new Y;if(Array.isArray(e))return new Z(e.map(Hi));if("object"==typeof e)return new B(e);throw new Error("Cannot refract value of type "+typeof e)}Li[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,s={})=>{if(0===t.length)return e;const n=Ei(Bi,s),{toolboxCreator:r,visitorOptions:i}=n,o=r(),c=t.map(e=>e(o)),a=zn(c.map(Oi({},"visitor")),i);await Promise.allSettled(c.map(Ii(["pre"],[])));const l=await Wn(e,a);return await Promise.allSettled(c.map(Ii(["post"],[]))),l},N.prototype.ObjectElement=B,N.prototype.ArrayElement=Z,N.prototype.RefElement=Ps,N.prototype.MemberElement=q,N.prototype.refract=Ui,F.prototype.Element=N,F.prototype.cloneDeepElement=e=>bs(e);const Vi={namespace:e=>{const{base:t}=e;return t.register("jSONSchemaDraft4",L),t.register("jSONReference",H),t.register("media",U),t.register("linkDescription",V),t}},zi=()=>{const e=new _i,t={...n,...s,isStringElement:te};return e.use(Vi),{predicates:t,namespace:e}},Gi=(e,{element:t="jSONSchemaDraft4",plugins:s=[],specificationObj:n=fi,consume:r=!1}={})=>{const i=Ui(e),o=ts(n),c=o.elementMap[t];if(!c)throw new Error(`Unknown element type: "${t}"`);const a=new(Oe(c,o))({specObj:o,consume:r});return Xn(i,a),Li(a.element,s,{toolboxCreator:zi})},Ji=(e,t={})=>Gi(e,{...t,element:"jSONReference"});const Xi=c(function(e){return we(-1,e)});const Wi=class extends ds{};const Ki=class extends Wi{};const Yi=class extends Array{unknownMediaType="application/octet-stream";filterByFormat(){throw new Ki("filterByFormat method in MediaTypes class is not yet implemented.")}findBy(){throw new Ki("findBy method in MediaTypes class is not yet implemented.")}latest(){throw new Ki("latest method in MediaTypes class is not yet implemented.")}};class Qi extends Yi{filterByFormat(e="generic"){const t="generic"===e?"openapi;version":e;return this.filter(e=>e.includes(t))}findBy(e="2.0",t="generic"){const s="generic"===t?`vnd.oai.openapi;version=${e}`:`vnd.oai.openapi+${t};version=${e}`;return this.find(e=>e.includes(s))||this.unknownMediaType}latest(e="generic"){return Xi(this.filterByFormat(e))}}const Zi=new Qi("application/vnd.oai.openapi;version=2.0","application/vnd.oai.openapi+json;version=2.0","application/vnd.oai.openapi+yaml;version=2.0");const eo=class extends B{constructor(e,t,s){super(e,t,s),this.element="swagger",this.classes.push("api")}get swagger(){return this.get("swagger")}set swagger(e){this.set("swagger",e)}get info(){return this.get("info")}set info(e){this.set("info",e)}get host(){return this.get("host")}set host(e){this.set("host",e)}get basePath(){return this.get("basePath")}set basePath(e){this.set("basePath",e)}get schemes(){return this.get("schemes")}set schemes(e){this.set("schemes",e)}get consumes(){return this.get("consumes")}set consumes(e){this.set("consumes",e)}get produces(){return this.get("produces")}set produces(e){this.set("produces",e)}get paths(){return this.get("paths")}set paths(e){this.set("paths",e)}get definitions(){return this.get("definitions")}set definitions(e){this.set("definitions",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}get responses(){return this.get("responses")}set responses(e){this.set("responses",e)}get securityDefinitions(){return this.get("securityDefinitions")}set securityDefinitions(e){this.set("securityDefinitions",e)}get security(){return this.get("security")}set security(e){this.set("security",e)}get tags(){return this.get("tags")}set tags(e){this.set("tags",e)}get externalDocs(){return this.get("externalDocs")}set externalDocs(e){this.set("externalDocs",e)}};const to=class extends W{constructor(e,t,s){super(e,t,s),this.element="swaggerVersion",this.classes.push("spec-version"),this.classes.push("version")}};const so=class extends B{constructor(e,t,s){super(e,t,s),this.element="info",this.classes.push("info")}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 termsOfService(){return this.get("termsOfService")}set termsOfService(e){this.set("termsOfService",e)}get contact(){return this.get("contact")}set contact(e){this.set("contact",e)}get license(){return this.get("license")}set license(e){this.set("license",e)}get version(){return this.get("version")}set version(e){this.set("version",e)}};const no=class extends B{constructor(e,t,s){super(e,t,s),this.element="contact"}get name(){return this.get("name")}set name(e){this.set("name",e)}get url(){return this.get("url")}set url(e){this.set("url",e)}get email(){return this.get("email")}set email(e){this.set("email",e)}};const ro=class extends B{constructor(e,t,s){super(e,t,s),this.element="license"}get name(){return this.get("name")}set name(e){this.set("name",e)}get url(){return this.get("url")}set url(e){this.set("url",e)}};const io=class extends B{constructor(e,t,s){super(e,t,s),this.element="paths"}};const oo=class extends B{constructor(e,t,s){super(e,t,s),this.element="pathItem"}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}get getField(){return this.get("get")}set getField(e){this.set("get",e)}get put(){return this.get("put")}set put(e){this.set("put",e)}get post(){return this.get("post")}set post(e){this.set("post",e)}get deleteField(){return this.get("delete")}set deleteField(e){this.set("delete",e)}get options(){return this.get("options")}set options(e){this.set("options",e)}get head(){return this.get("head")}set head(e){this.set("head",e)}get patch(){return this.get("patch")}set patch(e){this.set("patch",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}};const co=class extends B{constructor(e,t,s){super(e,t,s),this.element="operation"}get tags(){return this.get("tags")}set tags(e){this.set("tags",e)}get summary(){return this.get("summary")}set summary(e){this.set("summary",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}set externalDocs(e){this.set("externalDocs",e)}get externalDocs(){return this.get("externalDocs")}get operationId(){return this.get("operationId")}set operationId(e){this.set("operationId",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}get responses(){return this.get("responses")}set responses(e){this.set("responses",e)}get schemes(){return this.get("schemes")}set schemes(e){this.set("schemes",e)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new Q(!1)}set deprecated(e){this.set("deprecated",e)}get security(){return this.get("security")}set security(e){this.set("security",e)}};const ao=class extends B{constructor(e,t,s){super(e,t,s),this.element="externalDocumentation"}get description(){return this.get("description")}set description(e){this.set("description",e)}get url(){return this.get("url")}set url(e){this.set("url",e)}};const lo=class extends L{constructor(e,t,s){super(e,t,s),this.element="parameter",this.classes.push("json-schema-draft-4")}get idField(){throw new Wi("idField getter in Parameter class is not not supported.")}set idField(e){throw new Wi("idField setter in Parameter class is not not supported.")}get $schema(){throw new Wi("$schema getter in Parameter class is not not supported.")}set $schema(e){throw new Wi("$schema setter in Parameter class is not not supported.")}get additionalItems(){throw new Wi("additionalItems getter in Parameter class is not not supported.")}set additionalItems(e){throw new Wi("additionalItems setter in Parameter class is not not supported.")}get itemsField(){return this.get("items")}set itemsField(e){this.set("items",e)}get maxProperties(){throw new Wi("maxProperties getter in Parameter class is not not supported.")}set maxProperties(e){throw new Wi("maxProperties setter in Parameter class is not not supported.")}get minProperties(){throw new Wi("minProperties getter in Parameter class is not not supported.")}set minProperties(e){throw new Wi("minProperties setter in Parameter class is not not supported.")}get required(){return this.get("required")}set required(e){this.set("required",e)}get properties(){throw new Wi("properties getter in Parameter class is not not supported.")}set properties(e){throw new Wi("properties setter in Parameter class is not not supported.")}get additionalProperties(){throw new Wi("additionalProperties getter in Parameter class is not not supported.")}set additionalProperties(e){throw new Wi("additionalProperties setter in Parameter class is not not supported.")}get patternProperties(){throw new Wi("patternProperties getter in Parameter class is not not supported.")}set patternProperties(e){throw new Wi("patternProperties setter in Parameter class is not not supported.")}get dependencies(){throw new Wi("dependencies getter in Parameter class is not not supported.")}set dependencies(e){throw new Wi("dependencies setter in Parameter class is not not supported.")}get type(){return this.get("type")}set type(e){this.set("type",e)}get allOf(){throw new Wi("allOf getter in Parameter class is not not supported.")}set allOf(e){throw new Wi("allOf setter in Parameter class is not not supported.")}get anyOf(){throw new Wi("anyOf getter in Parameter class is not not supported.")}set anyOf(e){throw new Wi("anyOf setter in Parameter class is not not supported.")}get oneOf(){throw new Wi("oneOf getter in Parameter class is not not supported.")}set oneOf(e){throw new Wi("oneOf setter in Parameter class is not not supported.")}get not(){throw new Wi("not getter in Parameter class is not not supported.")}set not(e){throw new Wi("not setter in Parameter class is not not supported.")}get definitions(){throw new Wi("definitions getter in Parameter class is not not supported.")}set definitions(e){throw new Wi("definitions setter in Parameter class is not not supported.")}get title(){throw new Wi("title getter in Parameter class is not not supported.")}set title(e){throw new Wi("title setter in Parameter class is not not supported.")}get description(){return this.get("description")}set description(e){this.set("description",e)}get format(){return this.get("format")}set format(e){this.set("format",e)}get base(){throw new Wi("base getter in Parameter class is not not supported.")}set base(e){throw new Wi("base setter in Parameter class is not not supported.")}get linksField(){throw new Wi("linksField getter in Parameter class is not not supported.")}set linksField(e){throw new Wi("linksField setter in Parameter class is not not supported.")}get media(){throw new Wi("media getter in Parameter class is not not supported.")}set media(e){throw new Wi("media setter in Parameter class is not not supported.")}get readOnly(){throw new Wi("readOnly getter in Parameter class is not not supported.")}set readOnly(e){throw new Wi("readOnly setter in Parameter class is not not supported.")}get name(){return this.get("name")}set name(e){this.set("name",e)}get in(){return this.get("in")}set in(e){this.set("in",e)}get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}};const uo=class extends L{constructor(e,t,s){super(e,t,s),this.element="items",this.classes.push("json-schema-draft-4")}get idField(){throw new Wi("idField getter in Items class is not not supported.")}set idField(e){throw new Wi("idField setter in Items class is not not supported.")}get $schema(){throw new Wi("$schema getter in Items class is not not supported.")}set $schema(e){throw new Wi("$schema setter in Items class is not not supported.")}get additionalItems(){throw new Wi("additionalItems getter in Items class is not not supported.")}set additionalItems(e){throw new Wi("additionalItems setter in Items class is not not supported.")}get itemsField(){return this.get("items")}set itemsField(e){this.set("items",e)}get maxProperties(){throw new Wi("maxProperties getter in Items class is not not supported.")}set maxProperties(e){throw new Wi("maxProperties setter in Items class is not not supported.")}get minProperties(){throw new Wi("minProperties getter in Items class is not not supported.")}set minProperties(e){throw new Wi("minProperties setter in Items class is not not supported.")}get required(){throw new Wi("required getter in Items class is not not supported.")}set required(e){throw new Wi("required setter in Items class is not not supported.")}get properties(){throw new Wi("properties getter in Items class is not not supported.")}set properties(e){throw new Wi("properties setter in Items class is not not supported.")}get additionalProperties(){throw new Wi("additionalProperties getter in Items class is not not supported.")}set additionalProperties(e){throw new Wi("additionalProperties setter in Items class is not not supported.")}get patternProperties(){throw new Wi("patternProperties getter in Items class is not not supported.")}set patternProperties(e){throw new Wi("patternProperties setter in Items class is not not supported.")}get dependencies(){throw new Wi("dependencies getter in Items class is not not supported.")}set dependencies(e){throw new Wi("dependencies setter in Items class is not not supported.")}get type(){return this.get("type")}set type(e){this.set("type",e)}get allOf(){throw new Wi("allOf getter in Items class is not not supported.")}set allOf(e){throw new Wi("allOf setter in Items class is not not supported.")}get anyOf(){throw new Wi("anyOf getter in Items class is not not supported.")}set anyOf(e){throw new Wi("anyOf setter in Items class is not not supported.")}get oneOf(){throw new Wi("oneOf getter in Items class is not not supported.")}set oneOf(e){throw new Wi("oneOf setter in Items class is not not supported.")}get not(){throw new Wi("not getter in Items class is not not supported.")}set not(e){throw new Wi("not setter in Items class is not not supported.")}get definitions(){throw new Wi("definitions getter in Items class is not not supported.")}set definitions(e){throw new Wi("definitions setter in Items class is not not supported.")}get title(){throw new Wi("title getter in Items class is not not supported.")}set title(e){throw new Wi("title setter in Items class is not not supported.")}get description(){throw new Wi("description getter in Items class is not not supported.")}set description(e){throw new Wi("description setter in Items class is not not supported.")}get base(){throw new Wi("base getter in Items class is not not supported.")}set base(e){throw new Wi("base setter in Items class is not not supported.")}get linksField(){throw new Wi("linksField getter in Items class is not not supported.")}set linksField(e){throw new Wi("linksField setter in Items class is not not supported.")}get media(){throw new Wi("media getter in Items class is not not supported.")}set media(e){throw new Wi("media setter in Items class is not not supported.")}get readOnly(){throw new Wi("readOnly getter in Items class is not not supported.")}set readOnly(e){throw new Wi("readOnly setter in Items class is not not supported.")}};const po=class extends B{constructor(e,t,s){super(e,t,s),this.element="example"}};const ho=class extends B{constructor(e,t,s){super(e,t,s),this.element="responses"}get default(){return this.get("default")}set default(e){this.set("default",e)}};const mo=class extends B{constructor(e,t,s){super(e,t,s),this.element="response"}get description(){return this.get("description")}set description(e){this.set("description",e)}get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}get headers(){return this.get("headers")}set headers(e){this.set("headers",e)}get examples(){return this.get("examples")}set examples(e){this.set("examples",e)}};const fo=class extends B{constructor(e,t,s){super(e,t,s),this.element="headers"}};const go=class extends L{constructor(e,t,s){super(e,t,s),this.element="header",this.classes.push("json-schema-draft-4")}get idField(){throw new Wi("idField getter in Header class is not not supported.")}set idField(e){throw new Wi("idField setter in Header class is not not supported.")}get $schema(){throw new Wi("$schema getter in Header class is not not supported.")}set $schema(e){throw new Wi("$schema setter in Header class is not not supported.")}get additionalItems(){throw new Wi("additionalItems getter in Header class is not not supported.")}set additionalItems(e){throw new Wi("additionalItems setter in Header class is not not supported.")}get itemsField(){return this.get("items")}set itemsField(e){this.set("items",e)}get maxProperties(){throw new Wi("maxProperties getter in Header class is not not supported.")}set maxProperties(e){throw new Wi("maxProperties setter in Header class is not not supported.")}get minProperties(){throw new Wi("minProperties getter in Header class is not not supported.")}set minProperties(e){throw new Wi("minProperties setter in Header class is not not supported.")}get required(){throw new Wi("required getter in Header class is not not supported.")}set required(e){throw new Wi("required setter in Header class is not not supported.")}get properties(){throw new Wi("properties getter in Header class is not not supported.")}set properties(e){throw new Wi("properties setter in Header class is not not supported.")}get additionalProperties(){throw new Wi("additionalProperties getter in Header class is not not supported.")}set additionalProperties(e){throw new Wi("additionalProperties setter in Header class is not not supported.")}get patternProperties(){throw new Wi("patternProperties getter in Header class is not not supported.")}set patternProperties(e){throw new Wi("patternProperties setter in Header class is not not supported.")}get dependencies(){throw new Wi("dependencies getter in Header class is not not supported.")}set dependencies(e){throw new Wi("dependencies setter in Header class is not not supported.")}get type(){return this.get("type")}set type(e){this.set("type",e)}get allOf(){throw new Wi("allOf getter in Header class is not not supported.")}set allOf(e){throw new Wi("allOf setter in Header class is not not supported.")}get anyOf(){throw new Wi("anyOf getter in Header class is not not supported.")}set anyOf(e){throw new Wi("anyOf setter in Header class is not not supported.")}get oneOf(){throw new Wi("oneOf getter in Header class is not not supported.")}set oneOf(e){throw new Wi("oneOf setter in Header class is not not supported.")}get not(){throw new Wi("not getter in Header class is not not supported.")}set not(e){throw new Wi("not setter in Header class is not not supported.")}get definitions(){throw new Wi("definitions getter in Header class is not not supported.")}set definitions(e){throw new Wi("definitions setter in Header class is not not supported.")}get title(){throw new Wi("title getter in Header class is not not supported.")}set title(e){throw new Wi("title setter in Header class is not not supported.")}get base(){throw new Wi("base getter in Header class is not not supported.")}set base(e){throw new Wi("base setter in Header class is not not supported.")}get linksField(){throw new Wi("linksField getter in Header class is not not supported.")}set linksField(e){throw new Wi("linksField setter in Header class is not not supported.")}get media(){throw new Wi("media getter in Header class is not not supported.")}set media(e){throw new Wi("media setter in Header class is not not supported.")}get readOnly(){throw new Wi("readOnly getter in Header class is not not supported.")}set readOnly(e){throw new Wi("readOnly setter in Header class is not not supported.")}};const yo=class extends B{constructor(e,t,s){super(e,t,s),this.element="tag"}get name(){return this.get("name")}set name(e){this.set("name",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get externalDocs(){return this.get("externalDocs")}set externalDocs(e){this.set("externalDocs",e)}};const xo=class extends L{constructor(e,t,s){super(e,t,s),this.element="schema",this.classes.push("json-schema-draft-4")}get idField(){throw new Wi("idField getter in Schema class is not not supported.")}set idField(e){throw new Wi("idField setter in Schema class is not not supported.")}get $schema(){throw new Wi("$schema getter in Schema class is not not supported.")}set $schema(e){throw new Wi("$schema setter in Schema class is not not supported.")}get additionalItems(){throw new Wi("additionalItems getter in Schema class is not not supported.")}set additionalItems(e){throw new Wi("additionalItems setter in Schema class is not not supported.")}get patternProperties(){throw new Wi("patternProperties getter in Schema class is not not supported.")}set patternProperties(e){throw new Wi("patternProperties setter in Schema class is not not supported.")}get dependencies(){throw new Wi("dependencies getter in Schema class is not not supported.")}set dependencies(e){throw new Wi("dependencies setter in Schema class is not not supported.")}get anyOf(){throw new Wi("anyOf getter in Schema class is not not supported.")}set anyOf(e){throw new Wi("anyOf setter in Schema class is not not supported.")}get oneOf(){throw new Wi("oneOf getter in Schema class is not not supported.")}set oneOf(e){throw new Wi("oneOf setter in Schema class is not not supported.")}get not(){throw new Wi("not getter in Schema class is not not supported.")}set not(e){throw new Wi("not setter in Schema class is not not supported.")}get definitions(){throw new Wi("definitions getter in Schema class is not not supported.")}set definitions(e){throw new Wi("definitions setter in Schema class is not not supported.")}get base(){throw new Wi("base getter in Schema class is not not supported.")}set base(e){throw new Wi("base setter in Schema class is not not supported.")}get linksField(){throw new Wi("linksField getter in Schema class is not not supported.")}set linksField(e){throw new Wi("linksField setter in Schema class is not not supported.")}get media(){throw new Wi("media getter in Schema class is not not supported.")}set media(e){throw new Wi("media setter in Schema class is not not supported.")}get xml(){return this.get("xml")}set xml(e){this.set("xml",e)}get discriminator(){return this.get("discriminator")}set discriminator(e){this.set("discriminator",e)}get readOnly(){return this.get("readOnly")}set readOnly(e){this.set("readOnly",e)}get externalDocs(){return this.get("externalDocs")}set externalDocs(e){this.set("externalDocs",e)}get example(){return this.get("example")}set example(e){this.set("example",e)}};const wo=class extends B{constructor(e,t,s){super(e,t,s),this.element="xml"}get name(){return this.get("name")}set name(e){this.set("name",e)}get namespace(){return this.get("namespace")}set namespace(e){this.set("namespace",e)}get prefix(){return this.get("prefix")}set prefix(e){this.set("prefix",e)}get attribute(){return this.get("attribute")}set attribute(e){this.set("attribute",e)}get wrapped(){return this.get("wrapped")}set wrapped(e){this.set("wrapped",e)}};const bo=class extends B{constructor(e,t,s){super(e,t,s),this.element="reference",this.classes.push("openapi-reference")}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}};const vo=class extends B{constructor(e,t,s){super(e,t,s),this.element="definitions"}};const Eo=class extends B{constructor(e,t,s){super(e,t,s),this.element="parametersDefinitions"}};const Oo=class extends B{constructor(e,t,s){super(e,t,s),this.element="responsesDefinitions"}};const So=class extends B{constructor(e,t,s){super(e,t,s),this.element="securityDefinitions"}};const Po=class extends B{constructor(e,t,s){super(e,t,s),this.element="securityScheme"}get type(){return this.get("type")}set type(e){this.set("type",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get name(){return this.get("name")}set name(e){this.set("name",e)}get in(){return this.get("in")}set in(e){this.set("in",e)}get flow(){return this.get("flow")}set flow(e){this.set("flow",e)}get authorizationUrl(){return this.get("authorizationUrl")}set authorizationUrl(e){this.set("authorizationUrl",e)}get tokenUrl(){return this.get("tokenUrl")}set tokenUrl(e){this.set("tokenUrl",e)}get scopes(){return this.get("scopes")}set scopes(e){this.set("scopes",e)}};const ko=class extends B{constructor(e,t,s){super(e,t,s),this.element="scopes"}};const jo=class extends B{constructor(e,t,s){super(e,t,s),this.element="securityRequirement"}},Ao={namespace:e=>{const{base:t}=e;return t.register("swagger",eo),t.register("swaggerVersion",to),t.register("info",so),t.register("contact",no),t.register("license",ro),t.register("paths",io),t.register("pathItem",oo),t.register("operation",co),t.register("externalDocumentation",ao),t.register("parameter",lo),t.register("items",uo),t.register("responses",ho),t.register("response",mo),t.register("headers",fo),t.register("example",po),t.register("header",go),t.register("tag",yo),t.register("reference",bo),t.register("schema",xo),t.register("xml",wo),t.register("definitions",vo),t.register("parametersDefinitions",Eo),t.register("responsesDefinitions",Oo),t.register("securityDefinitions",So),t.register("securityScheme",Po),t.register("scopes",ko),t.register("securityRequirement",jo),t}};class Io extends Z{static primaryClass="operation-consumes";constructor(e,t,s){super(e,t,s),this.classes.push(Io.primaryClass)}}const Fo=Io;class Mo extends Z{static primaryClass="operation-parameters";constructor(e,t,s){super(e,t,s),this.classes.push(Mo.primaryClass),this.classes.push("parameters")}}const Do=Mo;class To extends Z{static primaryClass="operation-produces";constructor(e,t,s){super(e,t,s),this.classes.push(To.primaryClass)}}const Co=To;class $o extends Z{static primaryClass="operation-schemes";constructor(e,t,s){super(e,t,s),this.classes.push($o.primaryClass)}}const No=$o;class _o extends Z{static primaryClass="operation-security";constructor(e,t,s){super(e,t,s),this.classes.push(_o.primaryClass),this.classes.push("security")}}const Ro=_o;class qo extends Z{static primaryClass="operation-tags";constructor(e,t,s){super(e,t,s),this.classes.push(qo.primaryClass),this.classes.push("tags")}}const Bo=qo;class Lo extends Z{static primaryClass="path-item-parameters";constructor(e,t,s){super(e,t,s),this.classes.push(Lo.primaryClass),this.classes.push("parameters")}}const Ho=Lo;class Uo extends Z{static primaryClass="swagger-schemes";constructor(e,t,s){super(e,t,s),this.classes.push(Uo.primaryClass)}}const Vo=Uo;class zo extends Z{static primaryClass="swagger-consumes";constructor(e,t,s){super(e,t,s),this.classes.push(zo.primaryClass)}}const Go=zo;class Jo extends Z{static primaryClass="swagger-produces";constructor(e,t,s){super(e,t,s),this.classes.push(Jo.primaryClass)}}const Xo=Jo;class Wo extends Z{static primaryClass="swagger-security";constructor(e,t,s){super(e,t,s),this.classes.push(Wo.primaryClass),this.classes.push("security")}}const Ko=Wo;class Yo extends Z{static primaryClass="swagger-tags";constructor(e,t,s){super(e,t,s),this.classes.push(Yo.primaryClass)}}const Qo=Yo,Zo={SwaggerElement:{info:(...e)=>new so(...e),schemes:(...e)=>new Vo(...e),consumes:(...e)=>new Go(...e),produces:(...e)=>new Xo(...e),paths:(...e)=>new io(...e),definitions:(...e)=>new vo(...e),parameters:(...e)=>new Eo(...e),responses:(...e)=>new Oo(...e),securityDefinitions:(...e)=>new So(...e),security:(...e)=>new Ko(...e),tags:(...e)=>new Qo(...e),externalDocs:(...e)=>new ao(...e)},InfoElement:{contact:(...e)=>new no(...e),license:(...e)=>new ro(...e)},PathsElement:{"[key: *]":function(...e){return new oo(...e)}},PathItemElement:{get:(...e)=>new co(...e),put:(...e)=>new co(...e),post:(...e)=>new co(...e),delete:(...e)=>new co(...e),options:(...e)=>new co(...e),head:(...e)=>new co(...e),patch:(...e)=>new co(...e),parameters:(...e)=>new Ho(...e)},OperationElement:{tags:(...e)=>new Bo(...e),externalDocs:(...e)=>new ao(...e),consumes:(...e)=>new Fo(...e),produces:(...e)=>new Co(...e),parameters:(...e)=>new Do(...e),responses:(...e)=>new ho(...e),schemes:(...e)=>new No(...e),security:(...e)=>new Ro(...e)},ParameterElement:{schema:(...e)=>new xo(...e),items:(...e)=>new uo(...e)},ItemsElement:{items:(...e)=>new uo(...e)},ResponsesElement:{"[key: *]":function(...e){return new mo(...e)}},ResponseElement:{schema:(...e)=>new xo(...e),headers:(...e)=>new fo(...e),examples:(...e)=>new po(...e)},HeadersElement:{"[key: *]":function(...e){return new go(...e)}},HeaderElement:{items:(...e)=>new uo(...e)},TagElement:{externalDocs:(...e)=>new ao(...e)},SchemaElement:{items:(...e)=>new xo(...e),allOf(...e){const t=new Z(...e);return t.classes.push("json-schema-allOf"),t},properties(...e){const t=new B(...e);return t.classes.push("json-schema-properties"),t},additionalProperties:(...e)=>new xo(...e),xml:(...e)=>new wo(...e),externalDocs:(...e)=>new ao(...e)},DefinitionsElement:{"[key: *]":function(...e){return new xo(...e)}},ParametersDefinitionsElement:{"[key: *]":function(...e){return new lo(...e)}},ResponsesDefinitionsElement:{"[key: *]":function(...e){return new mo(...e)}},SecurityDefinitionsElement:{"[key: *]":function(...e){return new Po(...e)}},SecuritySchemeElement:{scopes:(...e)=>new ko(...e)},SecurityRequirementElement:{"[key: *]":function(...e){return new Z(...e)}},[Do.primaryClass]:{"<*>":function(...e){return new lo(...e)}},[Ro.primaryClass]:{"<*>":function(...e){return new jo(...e)}},[Ho.primaryClass]:{"<*>":function(...e){return new lo(...e)}},[Ko.primaryClass]:{"<*>":function(...e){return new jo(...e)}},[Qo.primaryClass]:{"<*>":function(...e){return new yo(...e)}},"json-schema-properties":{"[key: *]":function(...e){return new xo(...e)}},"json-schema-allOf":{"<*>":function(...e){return new xo(...e)}}},ec=(e,t)=>{const s=_n(e),n=e.isMetaEmpty?void 0:e.classes.at(0),r=Zo[s]||Zo[n];return void 0===r?void 0:Object.hasOwn(r,"[key: *]")?r["[key: *]"]:r[t]},tc=()=>()=>({visitor:{StringElement(e){const t=e.node;if(!(e=>te(e)&&rs(e,["yaml-e-node","yaml-e-scalar"]))(t))return;const s=e.getAncestorNodes().reverse().filter(ee),n=s.at(-1);let r,i;if(ie(n)?(i=t,r=ec(n,"<*>")):ce(n)&&(i=s.at(-2),r=ec(i,Ms(n.key))),"function"!=typeof r)return;const o=r.call({context:i},void 0,t.isMetaEmpty?void 0:t.meta.cloneDeep(),t.isAttributesEmpty?void 0:bs(t.attributes));ls.transfer(t,o),Rs.transfer(t,o),e.replaceWith(o)}}});const sc=class{element;consume=!1;consumeSafe=!1;constructor(e={}){Object.assign(this,e)}copyMetaAndAttributes(e,t){e.isMetaEmpty||t.isMetaEmpty?e.isMetaEmpty||(t.meta=e.meta.cloneDeep()):t.meta=t.meta.merge(e.meta),e.isAttributesEmpty||t.isAttributesEmpty?e.isAttributesEmpty||(t.attributes=bs(e.attributes)):t.attributes=Ns(t.attributes,e.attributes),ls.transfer(e,t),Rs.transfer(e,t)}};const nc=class extends sc{enter(e){this.element=this.consume?e.node:bs(e.node),e.stop()}};const rc=class extends sc{specObj;passingOptionsNames=["specObj","consume"];constructor({specObj:e,...t}){super({...t}),this.specObj=e}retrievePassingOptions(){return en(this.passingOptionsNames,this)}retrieveFixedFields(e){const t=Oe(["visitors",...e,"fixedFields"],this.specObj);return"object"==typeof t&&null!==t?Object.keys(t):[]}retrieveVisitor(e){return ct(_t,["visitors",...e],this.specObj)?Oe(["visitors",...e],this.specObj):Oe(["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 nc&&n?.constructor===nc?this.consume?t:bs(t):(Xn(t,n),n.element)}};var ic=function(){function e(e,t){this.xf=t,this.n=e,this.i=0}return e.prototype["@@transducer/init"]=Qe,e.prototype["@@transducer/result"]=Ze,e.prototype["@@transducer/step"]=function(e,t){this.i+=1;var s=0===this.n?e:this.xf["@@transducer/step"](e,t);return this.n>=0&&this.i>=this.n?si(s):s},e}();function oc(e){return function(t){return new ic(e,t)}}const cc=a(Ke(["take"],oc,function(e,t){return Be(0,e<0?1/0:e,t)}));const ac=a(function(e,t){return S(cc(e.length,t),e)}),lc=e=>te(e.key)&&ac("x-",Ms(e.key)),uc=e=>oe(e)&&e.hasKey("$ref");const pc=class extends rc{specPath;ignoredFields;canSupportSpecificationExtensions=!0;specificationExtensionPredicate=lc;constructor({specPath:e,ignoredFields:t,canSupportSpecificationExtensions:s,specificationExtensionPredicate:n,...r}){super({...r}),this.specPath=e,this.ignoredFields=t||[],"boolean"==typeof s&&(this.canSupportSpecificationExtensions=s),"function"==typeof n&&(this.specificationExtensionPredicate=n)}ObjectElement(e){const t=e.node,s=this.specPath(t),n=this.retrieveFixedFields(s);t.forEach((e,t,r)=>{const i=Ms(t);if(te(t)&&n.includes(i)&&!this.ignoredFields.includes(i)){const n=this.toRefractedElement([...s,"fixedFields",i],e),o=new q(this.consume?t:bs(t),n);this.copyMetaAndAttributes(r,o),this.element.content.push(o),this.consume&&this.consumeSafe&&!r.isFrozen&&(r.value=void 0)}else if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(r)){const e=this.toRefractedElement(["document","extension"],r);this.element.content.push(e),this.consume&&this.consumeSafe&&!r.isFrozen&&(r.value=void 0)}else this.ignoredFields.includes(i)||this.element.content.push(this.consume?r:bs(r))}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const hc=class extends rc{specPath;ignoredFields;fieldPatternPredicate=xr;canSupportSpecificationExtensions=!1;specificationExtensionPredicate=lc;constructor({specPath:e,ignoredFields:t,fieldPatternPredicate:s,canSupportSpecificationExtensions:n,specificationExtensionPredicate:r,...i}){super({...i}),this.specPath=e,this.ignoredFields=t||[],"function"==typeof s&&(this.fieldPatternPredicate=s),"boolean"==typeof n&&(this.canSupportSpecificationExtensions=n),"function"==typeof r&&(this.specificationExtensionPredicate=r)}ObjectElement(e){const t=e.node;t.forEach((e,t,s)=>{const n=Ms(t);if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(s)){const e=this.toRefractedElement(["document","extension"],s);this.element.content.push(e)}else if(!this.ignoredFields.includes(n)&&this.fieldPatternPredicate(n)){const n=this.specPath(e),r=this.toRefractedElement(n,e),i=new q(this.consume?t:bs(t),r);this.copyMetaAndAttributes(s,i),i.classes.push("patterned-field"),this.element.content.push(i),this.consume&&this.consumeSafe&&!s.isFrozen&&(s.value=void 0)}else this.ignoredFields.includes(n)||this.element.content.push(this.consume?s:bs(s))}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const dc=class extends hc{constructor(e){super(e),this.fieldPatternPredicate=Zs}};const mc=class extends rc{alternator;constructor({alternator:e,...t}){super({...t}),this.alternator=e||[]}enter(e){const t=e.node,s=this.alternator.map(({predicate:e,specPath:t})=>Yr(e,Ls(t),Us)),n=pi(s)(t);this.element=this.toRefractedElement(n,t),e.stop()}};function fc(e,t,s){var n,r=typeof e;switch(r){case"string":case"number":return 0===e&&1/e==-1/0?!!s._items["-0"]||(t&&(s._items["-0"]=!0),!1):null!==s._nativeSet?t?(n=s._nativeSet.size,s._nativeSet.add(e),s._nativeSet.size===n):s._nativeSet.has(e):r in s._items?e in s._items[r]||(t&&(s._items[r][e]=!0),!1):(t&&(s._items[r]={},s._items[r][e]=!0),!1);case"boolean":if(r in s._items){var i=e?1:0;return!!s._items[r][i]||(t&&(s._items[r][i]=!0),!1)}return t&&(s._items[r]=e?[!1,!0]:[!0,!1]),!1;case"function":return null!==s._nativeSet?t?(n=s._nativeSet.size,s._nativeSet.add(e),s._nativeSet.size===n):s._nativeSet.has(e):r in s._items?!!ze(e,s._items[r])||(t&&s._items[r].push(e),!1):(t&&(s._items[r]=[e]),!1);case"undefined":return!!s._items[r]||(t&&(s._items[r]=!0),!1);case"object":if(null===e)return!!s._items.null||(t&&(s._items.null=!0),!1);default:return(r=Object.prototype.toString.call(e))in s._items?!!ze(e,s._items[r])||(t&&s._items[r].push(e),!1):(t&&(s._items[r]=[e]),!1)}}const gc=function(){function e(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}return e.prototype.add=function(e){return!fc(e,!0,this)},e.prototype.has=function(e){return fc(e,!1,this)},e}();const yc=a(function(e,t){for(var s=[],n=0,r=e.length,i=t.length,o=new gc,c=0;c<i;c+=1)o.add(t[c]);for(;n<r;)o.add(e[n])&&(s[s.length]=e[n]),n+=1;return s}),xc=gr(pc,hc);const wc=class extends xc{specPathFixedFields;specPathPatternedFields;constructor({specPathFixedFields:e,specPathPatternedFields:t,...s}){super({...s}),this.specPathFixedFields=e,this.specPathPatternedFields=t}ObjectElement(e){const t=e.node,{specPath:s,ignoredFields:n}=this;try{this.specPath=this.specPathFixedFields;const s=this.retrieveFixedFields(this.specPath(t));this.ignoredFields=[...n,...yc(t.keys(),s)],pc.prototype.ObjectElement.call(this,e),this.specPath=this.specPathPatternedFields,this.ignoredFields=s,hc.prototype.ObjectElement.call(this,e);const r=t.keys();this.element.content.sort((e,t)=>r.indexOf(Ms(e.key))-r.indexOf(Ms(t.key)))}catch(e){throw this.specPath=s,e}e.stop()}},bc=gr(rc,nc),vc=gr(pc,nc),Ec=gr(hc,nc),Oc=gr(dc,nc),Sc=gr(mc,nc),Pc=gr(wc,nc);const kc=class extends vc{constructor(e){super(e),this.element=new eo,this.consumeSafe=!0,this.specPath=Ls(["document","objects","Swagger"]),this.canSupportSpecificationExtensions=!0}};const jc=class extends bc{StringElement(e){const t=e.node,s=new to(Ms(t));this.copyMetaAndAttributes(t,s),this.element=s,e.stop()}};const Ac=class extends nc{StringElement(e){super.enter(e),this.element.classes.push("swagger-host")}};const Ic=class extends nc{StringElement(e){super.enter(e),this.element.classes.push("swagger-base-path")}};const Fc=class extends nc{constructor(e){super(e),this.element=new Vo}ArrayElement(e){const t=e.node;this.element=this.element.concat(bs(t)),e.stop()}};const Mc=class extends nc{constructor(e){super(e),this.element=new Go}ArrayElement(e){const t=e.node;this.element=this.element.concat(bs(t)),e.stop()}};const Dc=class extends nc{constructor(e){super(e),this.element=new Xo}ArrayElement(e){const t=e.node;this.element=this.element.concat(bs(t)),e.stop()}};const Tc=class extends bc{constructor(e){super(e),this.element=new Ko}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","SecurityRequirement"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Cc=class extends bc{constructor(e){super(e),this.element=new Qo}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","Tag"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const $c=class extends vc{constructor(e){super(e),this.element=new so,this.specPath=Ls(["document","objects","Info"]),this.canSupportSpecificationExtensions=!0}};const Nc=class extends nc{StringElement(e){super.enter(e),this.element.classes.push("api-version"),this.element.classes.push("version")}};const _c=class extends vc{constructor(e){super(e),this.element=new no,this.specPath=Ls(["document","objects","Contact"]),this.canSupportSpecificationExtensions=!0}};const Rc=class extends vc{constructor(e){super(e),this.element=new ro,this.specPath=Ls(["document","objects","License"]),this.canSupportSpecificationExtensions=!0}},qc=e=>e instanceof eo,Bc=e=>e instanceof to,Lc=e=>e instanceof so,Hc=e=>e instanceof ro,Uc=e=>e instanceof no,Vc=e=>e instanceof io,zc=e=>e instanceof oo,Gc=e=>e instanceof co,Jc=e=>e instanceof ao,Xc=e=>e instanceof lo,Wc=e=>e instanceof uo,Kc=e=>e instanceof ho,Yc=e=>e instanceof mo,Qc=e=>e instanceof fo,Zc=e=>e instanceof po,ea=e=>e instanceof go,ta=e=>e instanceof yo,sa=e=>e instanceof bo,na=e=>e instanceof xo,ra=e=>e instanceof wo,ia=e=>e instanceof Oo,oa=e=>e instanceof So,ca=e=>e instanceof vo,aa=e=>e instanceof Eo,la=e=>e instanceof Po,ua=e=>e instanceof ko,pa=e=>e instanceof jo;const ha=class extends Ec{element;constructor(e){super(e),this.element=new io,this.consumeSafe=!0,this.specPath=Ls(["document","objects","PathItem"]),this.canSupportSpecificationExtensions=!0,this.fieldPatternPredicate=Kr}ObjectElement(e){Ec.prototype.ObjectElement.call(this,e),this.element.filter(zc).forEach((e,t)=>{t.classes.push("openapi-path-template"),t.classes.push("path-template"),e.meta.set("path",bs(t))})}};const da=class extends vc{constructor(e){super(e),this.element=new oo,this.consumeSafe=!0,this.specPath=Ls(["document","objects","PathItem"])}ObjectElement(e){vc.prototype.ObjectElement.call(this,e),this.element.filter(Gc).forEach((e,t)=>{const s=bs(t);s.content=Ms(s).toUpperCase(),e.meta.set("http-method",s)}),te(this.element.$ref)&&this.element.classes.push("reference-element")}};const ma=class extends nc{StringElement(e){super.enter(e),this.element.classes.push("reference-value")}};const fa=class extends bc{constructor(e){super(e),this.element=new Ho}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=uc(e)?["document","objects","Reference"]:["document","objects","Parameter"],s=this.toRefractedElement(t,e);sa(s)&&s.meta.set("referenced-element","parameter"),this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const ga=class extends vc{constructor(e){super(e),this.element=new co,this.specPath=Ls(["document","objects","Operation"])}};const ya=class extends nc{constructor(e){super(e),this.element=new Bo}ArrayElement(e){const t=e.node;this.element=this.element.concat(bs(t)),e.stop()}};const xa=class extends nc{constructor(e){super(e),this.element=new Fo}ArrayElement(e){const t=e.node;this.element=this.element.concat(bs(t)),e.stop()}};const wa=class extends nc{constructor(e){super(e),this.element=new Co}ArrayElement(e){const t=e.node;this.element=this.element.concat(bs(t)),e.stop()}};const ba=class extends bc{constructor(e){super(e),this.element=new Do}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=uc(e)?["document","objects","Reference"]:["document","objects","Parameter"],s=this.toRefractedElement(t,e);sa(s)&&s.meta.set("referenced-element","parameter"),this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const va=class extends nc{constructor(e){super(e),this.element=new No}ArrayElement(e){const t=e.node;this.element=this.element.concat(bs(t)),e.stop()}};const Ea=class extends bc{constructor(e){super(e),this.element=new Ro}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","SecurityRequirement"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Oa=class extends vc{constructor(e){super(e),this.element=new ao,this.specPath=Ls(["document","objects","ExternalDocumentation"]),this.canSupportSpecificationExtensions=!0}};const Sa=class extends vc{constructor(e){super(e),this.element=new lo,this.specPath=Ls(["document","objects","Parameter"]),this.canSupportSpecificationExtensions=!0}};const Pa=class extends vc{specPath;canSupportSpecificationExtensions;constructor(e){super(e),this.element=new uo,this.specPath=Ls(["document","objects","Items"]),this.canSupportSpecificationExtensions=!0}};const ka=a(function(e,t){if(s=e,"[object RegExp]"!==Object.prototype.toString.call(s))throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+ot(e));var s;return P(e).test(t)});function ja(e){return"[object Number]"===Object.prototype.toString.call(e)}var Aa=a(function(e,t){if(!ja(e)||!ja(t))throw new TypeError("Both arguments to range must be numbers");for(var s=e<t?Math.ceil(t-e):0,n=Array(s),r=0;r<s;)n[r]=r+e,r+=1;return n});const Ia=Aa;const Fa=class extends Pc{constructor(e){super(e),this.element=new ho,this.specPathFixedFields=Ls(["document","objects","Responses"]),this.canSupportSpecificationExtensions=!0,this.specPathPatternedFields=e=>uc(e)?["document","objects","Reference"]:["document","objects","Response"],this.fieldPatternPredicate=ka(new RegExp(`^(1XX|2XX|3XX|4XX|5XX|${Ia(100,600).join("|")})$`))}ObjectElement(e){Pc.prototype.ObjectElement.call(this,e),this.element.filter(sa).forEach(e=>{e.meta.set("referenced-element","response")}),this.element.filter(Yc).forEach((e,t)=>{const s=bs(t);this.fieldPatternPredicate(Ms(s))&&e.meta.set("http-status-code",s)})}};const Ma=class extends Sc{constructor(e){super(e),this.alternator=[{predicate:uc,specPath:["document","objects","Reference"]},{predicate:Kr,specPath:["document","objects","Response"]}]}ObjectElement(e){mc.prototype.enter.call(this,e),sa(this.element)?this.element.meta.set("referenced-element","response"):Yc(this.element)&&this.element.meta.set("http-status-code","default")}};const Da=class extends vc{constructor(e){super(e),this.element=new mo,this.specPath=Ls(["document","objects","Response"]),this.canSupportSpecificationExtensions=!0}};const Ta=class extends Oc{constructor(e){super(e),this.element=new fo,this.specPath=Ls(["document","objects","Header"]),this.canSupportSpecificationExtensions=!1}};const Ca=class extends Oc{constructor(e){super(e),this.element=new po,this.specPath=Ls(["value"]),this.canSupportSpecificationExtensions=!1}};const $a=class extends vc{constructor(e){super(e),this.element=new go,this.specPath=Ls(["document","objects","Header"]),this.canSupportSpecificationExtensions=!0}};const Na=class extends vc{constructor(e){super(e),this.element=new yo,this.specPath=Ls(["document","objects","Tag"]),this.canSupportSpecificationExtensions=!0}};const _a=class extends vc{constructor(e){super(e),this.element=new bo,this.specPath=Ls(["document","objects","Reference"]),this.canSupportSpecificationExtensions=!1}ObjectElement(e){vc.prototype.ObjectElement.call(this,e),te(this.element.$ref)&&this.element.classes.push("reference-element")}};const Ra=class extends nc{StringElement(e){super.enter(e),this.element.classes.push("reference-value")}};const qa=class extends vc{constructor(e){super(e),this.element=new xo,this.specPath=Ls(["document","objects","Schema"]),this.canSupportSpecificationExtensions=!0}},Ba=fi.visitors.document.objects.JSONSchema.fixedFields.allOf;const La=class extends Ba{ArrayElement(e){Ba.prototype.ArrayElement.call(this,e),this.element.filter(G).forEach(e=>{e.meta.set("referenced-element","schema")})}};const Ha=class extends Nr{ObjectElement(e){Nr.prototype.ObjectElement.call(this,e),G(this.element)&&this.element.meta.set("referenced-element","schema")}ArrayElement(e){Nr.prototype.ArrayElement.call(this,e),this.element.filter(G).forEach(e=>{e.meta.set("referenced-element","schema")})}},Ua=fi.visitors.document.objects.JSONSchema.fixedFields.properties;const Va=class extends Ua{ObjectElement(e){Ua.prototype.ObjectElement.call(this,e),this.element.filter(G).forEach(e=>{e.meta.set("referenced-element","schema")})}},za=fi.visitors.JSONSchemaOrJSONReferenceVisitor;const Ga=class extends za{ObjectElement(e){za.prototype.enter.call(this,e),G(this.element)&&this.element.meta.set("referenced-element","schema")}};const Ja=class extends vc{constructor(e){super(e),this.element=new wo,this.specPath=Ls(["document","objects","XML"]),this.canSupportSpecificationExtensions=!0}};const Xa=class extends Oc{constructor(e){super(e),this.element=new vo,this.specPath=e=>ae(e)?["document","objects","JSONReference"]:["document","objects","Schema"]}ObjectElement(e){Oc.prototype.ObjectElement.call(this,e),this.element.filter(G).forEach(e=>{e.meta.set("referenced-element","schema")})}};const Wa=class extends Oc{constructor(e){super(e),this.element=new Oo,this.specPath=Ls(["document","objects","Response"])}};const Ka=class extends Oc{constructor(e){super(e),this.element=new Eo,this.specPath=Ls(["document","objects","Parameter"])}};const Ya=class extends Oc{element;constructor(e){super(e),this.element=new So,this.specPath=Ls(["document","objects","SecurityScheme"])}};const Qa=class extends vc{constructor(e){super(e),this.element=new Po,this.specPath=Ls(["document","objects","SecurityScheme"]),this.canSupportSpecificationExtensions=!0}};const Za=class extends Oc{constructor(e){super(e),this.element=new ko,this.specPath=Ls(["value"]),this.canSupportSpecificationExtensions=!0}};const el=class extends Oc{constructor(e){super(e),this.element=new jo,this.specPath=Ls(["value"])}};const tl=class extends rc{MemberElement(e){this.element=bs(e.node),this.element.classes.push("specification-extension"),e.stop()}},{fixedFields:sl}=fi.visitors.document.objects.JSONSchema,nl={visitors:{value:nc,document:{objects:{JSONReference:fi.visitors.document.objects.JSONReference,JSONSchema:{$ref:"#/visitors/document/objects/Schema"},Swagger:{$visitor:kc,element:"swagger",fixedFields:{swagger:jc,info:{$ref:"#/visitors/document/objects/Info"},host:Ac,basePath:Ic,schemes:Fc,consumes:Mc,produces:Dc,paths:{$ref:"#/visitors/document/objects/Paths"},definitions:{$ref:"#/visitors/document/objects/Definitions"},parameters:{$ref:"#/visitors/document/objects/ParametersDefinitions"},responses:{$ref:"#/visitors/document/objects/ResponsesDefinitions"},securityDefinitions:{$ref:"#/visitors/document/objects/SecurityDefinitions"},security:Tc,tags:Cc,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Info:{$visitor:$c,element:"info",fixedFields:{title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},termsOfService:{$ref:"#/visitors/value"},contact:{$ref:"#/visitors/document/objects/Contact"},license:{$ref:"#/visitors/document/objects/License"},version:Nc}},Contact:{$visitor:_c,element:"contact",fixedFields:{name:{$ref:"#/visitors/value"},url:{$ref:"#/visitors/value"},email:{$ref:"#/visitors/value"}}},License:{$visitor:Rc,element:"license",fixedFields:{name:{$ref:"#/visitors/value"},url:{$ref:"#/visitors/value"}}},Paths:{$visitor:ha,element:"paths"},PathItem:{$visitor:da,element:"pathItem",fixedFields:{$ref:ma,get:{$ref:"#/visitors/document/objects/Operation"},put:{$ref:"#/visitors/document/objects/Operation"},post:{$ref:"#/visitors/document/objects/Operation"},delete:{$ref:"#/visitors/document/objects/Operation"},options:{$ref:"#/visitors/document/objects/Operation"},head:{$ref:"#/visitors/document/objects/Operation"},patch:{$ref:"#/visitors/document/objects/Operation"},parameters:fa}},Operation:{$visitor:ga,element:"operation",fixedFields:{tags:ya,summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},operationId:{$ref:"#/visitors/value"},consumes:xa,produces:wa,parameters:ba,responses:{$ref:"#/visitors/document/objects/Responses"},schemes:va,deprecated:{$ref:"#/visitors/value"},security:Ea}},ExternalDocumentation:{$visitor:Oa,element:"externalDocumentation",fixedFields:{description:{$ref:"#/visitors/value"},url:{$ref:"#/visitors/value"}}},Parameter:{$visitor:Sa,element:"parameter",fixedFields:{name:{$ref:"#/visitors/value"},in:{$ref:"#/visitors/value"},description:sl.description,required:sl.required,schema:Ga,type:sl.type,format:sl.format,items:{$visitor:Pa,alias:"itemsField"},collectionFormat:{$ref:"#/visitors/value"},default:sl.default,maximum:sl.maximum,exclusiveMaximum:sl.exclusiveMaximum,minimum:sl.minimum,exclusiveMinimum:sl.exclusiveMinimum,maxLength:sl.maxLength,minLength:sl.minLength,pattern:sl.pattern,maxItems:sl.maxItems,minItems:sl.minItems,uniqueItems:sl.uniqueItems,enum:sl.enum,multipleOf:sl.multipleOf}},Items:{$visitor:Pa,element:"items",fixedFields:{type:sl.type,format:sl.format,items:{$visitor:Pa,alias:"itemsField"},collectionFormat:{$ref:"#/visitors/value"},default:sl.default,maximum:sl.maximum,exclusiveMaximum:sl.exclusiveMaximum,minimum:sl.minimum,exclusiveMinimum:sl.exclusiveMinimum,maxLength:sl.maxLength,minLength:sl.minLength,pattern:sl.pattern,maxItems:sl.maxItems,minItems:sl.minItems,uniqueItems:sl.uniqueItems,enum:sl.enum,multipleOf:sl.multipleOf}},Responses:{$visitor:Fa,element:"responses",fixedFields:{default:Ma}},Response:{$visitor:Da,element:"response",fixedFields:{description:{$ref:"#/visitors/value"},schema:Ga,headers:{$ref:"#/visitors/document/objects/Headers"},examples:{$ref:"#/visitors/document/objects/Example"}}},Headers:{$visitor:Ta,element:"headers"},Example:{$visitor:Ca,element:"example"},Header:{$visitor:$a,element:"header",fixedFields:{description:sl.description,type:sl.type,format:sl.format,items:{$visitor:Pa,alias:"itemsField"},collectionFormat:{$ref:"#/visitors/value"},default:sl.default,maximum:sl.maximum,exclusiveMaximum:sl.exclusiveMaximum,minimum:sl.minimum,exclusiveMinimum:sl.exclusiveMinimum,maxLength:sl.maxLength,minLength:sl.minLength,pattern:sl.pattern,maxItems:sl.maxItems,minItems:sl.minItems,uniqueItems:sl.uniqueItems,enum:sl.enum,multipleOf:sl.multipleOf}},Tag:{$visitor:Na,element:"tag",fixedFields:{name:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Reference:{$visitor:_a,element:"reference",fixedFields:{$ref:Ra}},Schema:{$visitor:qa,element:"schema",fixedFields:{format:sl.format,title:sl.title,description:sl.description,default:sl.default,multipleOf:sl.multipleOf,maximum:sl.maximum,exclusiveMaximum:sl.exclusiveMaximum,minimum:sl.minimum,exclusiveMinimum:sl.exclusiveMinimum,maxLength:sl.maxLength,minLength:sl.minLength,pattern:sl.pattern,maxItems:sl.maxItems,minItems:sl.minItems,uniqueItems:sl.uniqueItems,maxProperties:sl.maxProperties,minProperties:sl.minProperties,required:sl.required,enum:sl.enum,type:sl.type,readOnly:sl.readOnly,items:Ha,allOf:La,properties:Va,additionalProperties:Ga,discriminator:{$ref:"#/visitors/value"},xml:{$ref:"#/visitors/document/objects/XML"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},example:{$ref:"#/visitors/value"}}},XML:{$visitor:Ja,element:"xml",fixedFields:{name:{$ref:"#/visitors/value"},namespace:{$ref:"#/visitors/value"},prefix:{$ref:"#/visitors/value"},attribute:{$ref:"#/visitors/value"},wrapped:{$ref:"#/visitors/value"}}},Definitions:{$visitor:Xa,element:"definitions"},ParametersDefinitions:{$visitor:Ka,element:"parametersDefinitions"},ResponsesDefinitions:{$visitor:Wa,element:"responsesDefinitions"},SecurityDefinitions:{$visitor:Ya,element:"securityDefinitions"},SecurityScheme:{$visitor:Qa,element:"securityScheme",fixedFields:{type:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},name:{$ref:"#/visitors/value"},in:{$ref:"#/visitors/value"},flow:{$ref:"#/visitors/value"},authorizationUrl:{$ref:"#/visitors/value"},token:{$ref:"#/visitors/value"},scopes:{$ref:"#/visitors/document/objects/Scopes"}}},Scopes:{$visitor:Za,element:"scopes"},SecurityRequirement:{$visitor:el,element:"securityRequirement"}},extension:{$visitor:tl}}}},rl=()=>{const e=new _i,t={...r,...i,isStringElement:te};return e.use(Ao),{predicates:t,namespace:e}},il=(e,{element:t="swagger",plugins:s=[],specificationObj:n=nl,consume:r=!1}={})=>{const i=Ui(e),o=ts(n),c=o.elementMap[t];if(!c)throw new Error(`Unknown element type: "${t}"`);const a=new(Oe(c,o))({specObj:o,consume:r});return Xn(i,a),Li(a.element,s,{toolboxCreator:rl})},ol=(e,t={})=>il(e,{...t,element:"swagger"}),cl=(e,t={})=>il(e,{...t,element:"info"}),al=(e,t={})=>il(e,{...t,element:"contact"}),ll=(e,t={})=>il(e,{...t,element:"license"}),ul=(e,t={})=>il(e,{...t,element:"paths"}),pl=(e,t={})=>il(e,{...t,element:"pathItem"}),hl=(e,t={})=>il(e,{...t,element:"operation"}),dl=(e,t={})=>il(e,{...t,element:"externalDocumentation"}),ml=(e,t={})=>il(e,{...t,element:"parameter"}),fl=(e,t={})=>il(e,{...t,element:"items"}),gl=(e,t={})=>il(e,{...t,element:"responses"}),yl=(e,t={})=>il(e,{...t,element:"response"}),xl=(e,t={})=>il(e,{...t,element:"headers"}),wl=(e,t={})=>il(e,{...t,element:"example"}),bl=(e,t={})=>il(e,{...t,element:"header"}),vl=(e,t={})=>il(e,{...t,element:"tag"}),El=(e,t={})=>il(e,{...t,element:"reference"}),Ol=(e,t={})=>il(e,{...t,element:"schema"}),Sl=(e,t={})=>il(e,{...t,element:"xml"}),Pl=(e,t={})=>il(e,{...t,element:"definitions"}),kl=(e,t={})=>il(e,{...t,element:"parametersDefinitions"}),jl=(e,t={})=>il(e,{...t,element:"responsesDefinitions"}),Al=(e,t={})=>il(e,{...t,element:"securityDefinitions"}),Il=(e,t={})=>il(e,{...t,element:"securityScheme"}),Fl=(e,t={})=>il(e,{...t,element:"scopes"}),Ml=(e,t={})=>il(e,{...t,element:"securityRequirement"}),Dl=il;return t})());