@speclynx/apidom-ns-openapi-2 6.1.0 → 6.1.1

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