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