@speclynx/apidom-ns-arazzo-1 2.1.0 → 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.
- package/CHANGELOG.md +4 -0
- package/dist/apidom-ns-arazzo-1.browser.js +13994 -11414
- package/dist/apidom-ns-arazzo-1.browser.min.js +1 -1
- package/package.json +6 -6
|
@@ -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.apidomNsArazzo1=t():e.apidomNsArazzo1=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,{ArazzoElement:()=>L,ArazzoMediaTypes:()=>f,ArazzoSpecification1Element:()=>V,BaseFixedFieldsFallbackVisitor:()=>Ro,BaseMapFallbackVisitor:()=>Bo,BaseSpecificationFallbackVisitor:()=>Do,ComponentsElement:()=>U,ComponentsFailureActionsElement:()=>ac,ComponentsInputsElement:()=>uc,ComponentsParametersElement:()=>pc,ComponentsSuccessActionsElement:()=>mc,CriterionElement:()=>G,CriterionExpressionTypeElement:()=>W,FailureActionCriteriaElement:()=>yc,FailureActionElement:()=>X,FallbackVisitor:()=>ko,FixedFieldsVisitor:()=>Mo,InfoElement:()=>K,JSONSchemaElement:()=>qi,MapVisitor:()=>$o,ParameterElement:()=>_i,PatternedFieldsVisitor:()=>No,PayloadReplacementElement:()=>zi,RequestBodyElement:()=>Hi,RequestBodyReplacementsElement:()=>xc,ReusableElement:()=>Vi,SourceDescriptionElement:()=>Ui,SourceDescriptionsElement:()=>_o,SpecificationExtensionVisitor:()=>Ya,SpecificationVisitor:()=>Ao,StepDependsOnElement:()=>vc,StepElement:()=>Gi,StepOnFailureElement:()=>wc,StepOnSuccessElement:()=>Oc,StepOutputsElement:()=>Ac,StepParametersElement:()=>Fc,StepSuccessCriteriaElement:()=>Pc,SuccessActionCriteriaElement:()=>Tc,SuccessActionElement:()=>Wi,Visitor:()=>Oo,WorkflowDependsOnElement:()=>Qo,WorkflowElement:()=>Xi,WorkflowFailureActionsElement:()=>Nc,WorkflowOutputsElement:()=>Dc,WorkflowParametersElement:()=>Bc,WorkflowStepsElement:()=>sc,WorkflowSuccessActionsElement:()=>ic,WorkflowsElement:()=>Vo,default:()=>Ki,isArazzoElement:()=>Jc,isArazzoSpecification1Element:()=>Lc,isArazzoSpecificationExtension:()=>Co,isComponentsElement:()=>qc,isComponentsFailureActionsElement:()=>ea,isComponentsInputsElement:()=>ta,isComponentsParametersElement:()=>sa,isComponentsSuccessActionsElement:()=>na,isCriterionElement:()=>_c,isCriterionExpressionTypeElement:()=>zc,isFailureActionCriteriaElement:()=>ra,isFailureActionElement:()=>Hc,isInfoElement:()=>Vc,isJSONSchemaElement:()=>oc,isParameterElement:()=>Uc,isPayloadReplacementElement:()=>Gc,isRequestBodyElement:()=>Wc,isRequestBodyReplacementsElement:()=>ia,isReusableElement:()=>Xc,isSourceDescriptionElement:()=>Kc,isSourceDescriptionsElement:()=>oa,isStepDependsOnElement:()=>ca,isStepElement:()=>Yc,isStepOnFailureElement:()=>aa,isStepOnSuccessElement:()=>la,isStepOutputsElement:()=>ua,isStepParametersElement:()=>da,isStepSuccessCriteriaElement:()=>pa,isSuccessActionCriteriaElement:()=>ha,isSuccessActionElement:()=>Zc,isWorkflowDependsOnElement:()=>ma,isWorkflowElement:()=>Qc,isWorkflowFailureActionsElement:()=>fa,isWorkflowOutputsElement:()=>ya,isWorkflowParametersElement:()=>ga,isWorkflowStepsElement:()=>ba,isWorkflowSuccessActionsElement:()=>va,isWorkflowsElement:()=>xa,mediaTypes:()=>y,refract:()=>xl,refractArazzo:()=>sl,refractArazzoSpecification1:()=>nl,refractComponents:()=>rl,refractCriterion:()=>il,refractCriterionExpressionType:()=>ol,refractFailureAction:()=>cl,refractInfo:()=>al,refractJSONSchema:()=>ll,refractParameter:()=>ul,refractPayloadReplacement:()=>dl,refractRequestBody:()=>pl,refractReusable:()=>hl,refractSourceDescription:()=>ml,refractStep:()=>fl,refractSuccessAction:()=>yl,refractWorkflow:()=>gl,refractorPluginReplaceEmptyElement:()=>Qi,specificationObj:()=>Qa});var s={};e.r(s),e.d(s,{isArazzoSpecificationExtension:()=>Co,isReusableLikeElement:()=>To});var n={};function r(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function i(e){return function t(s){return 0===arguments.length||r(s)?t:e.apply(this,arguments)}}function o(e,t){return t[e<0?t.length+e:e]}e.r(n),e.d(n,{isArazzoElement:()=>Jc,isArazzoSpecification1Element:()=>Lc,isComponentsElement:()=>qc,isComponentsFailureActionsElement:()=>ea,isComponentsInputsElement:()=>ta,isComponentsParametersElement:()=>sa,isComponentsSuccessActionsElement:()=>na,isCriterionElement:()=>_c,isCriterionExpressionTypeElement:()=>zc,isFailureActionCriteriaElement:()=>ra,isFailureActionElement:()=>Hc,isInfoElement:()=>Vc,isJSONSchemaElement:()=>oc,isParameterElement:()=>Uc,isPayloadReplacementElement:()=>Gc,isRequestBodyElement:()=>Wc,isRequestBodyReplacementsElement:()=>ia,isReusableElement:()=>Xc,isSourceDescriptionElement:()=>Kc,isSourceDescriptionsElement:()=>oa,isStepDependsOnElement:()=>ca,isStepElement:()=>Yc,isStepOnFailureElement:()=>aa,isStepOnSuccessElement:()=>la,isStepOutputsElement:()=>ua,isStepParametersElement:()=>da,isStepSuccessCriteriaElement:()=>pa,isSuccessActionCriteriaElement:()=>ha,isSuccessActionElement:()=>Zc,isWorkflowDependsOnElement:()=>ma,isWorkflowElement:()=>Qc,isWorkflowFailureActionsElement:()=>fa,isWorkflowOutputsElement:()=>ya,isWorkflowParametersElement:()=>ga,isWorkflowStepsElement:()=>ba,isWorkflowSuccessActionsElement:()=>va,isWorkflowsElement:()=>xa});const c=i(function(e){return o(-1,e)});class a extends AggregateError{constructor(e,t,s){super(e,t,s),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const l=a;class u extends Error{static[Symbol.hasInstance](e){return super[Symbol.hasInstance](e)||Function.prototype[Symbol.hasInstance].call(l,e)}constructor(e,t){super(e,t),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const d=u;const p=class extends d{};const h=class extends p{};const m=class extends Array{unknownMediaType="application/octet-stream";filterByFormat(){throw new h("filterByFormat method in MediaTypes class is not yet implemented.")}findBy(){throw new h("findBy method in MediaTypes class is not yet implemented.")}latest(){throw new h("latest method in MediaTypes class is not yet implemented.")}};class f extends m{filterByFormat(e="generic"){const t="generic"===e?"workflows;version":e;return this.filter(e=>e.includes(t))}findBy(e="1.0.1",t="generic"){const s="generic"===t?`vnd.oai.workflows;version=${e}`:`vnd.oai.workflows+${t};version=${e}`;return this.find(e=>e.includes(s))||this.unknownMediaType}latest(e="generic"){return c(this.filterByFormat(e))}}const y=new f("application/vnd.oai.workflows;version=1.0.0","application/vnd.oai.workflows+json;version=1.0.0","application/vnd.oai.workflows+yaml;version=1.0.0","application/vnd.oai.workflows;version=1.0.1","application/vnd.oai.workflows+json;version=1.0.1","application/vnd.oai.workflows+yaml;version=1.0.1");function g(e){return function t(s,n){switch(arguments.length){case 0:return t;case 1:return r(s)?t:i(function(t){return e(s,t)});default:return r(s)&&r(n)?t:r(s)?i(function(t){return e(t,n)}):r(n)?i(function(t){return e(s,t)}):e(s,n)}}}function x(e){for(var t,s=[];!(t=e.next()).done;)s.push(t.value);return s}function b(e,t,s){for(var n=0,r=s.length;n<r;){if(e(t,s[n]))return!0;n+=1}return!1}function v(e,t){return Object.prototype.hasOwnProperty.call(t,e)}const S="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var w=Object.prototype.toString;const E=function(){return"[object Arguments]"===w.call(arguments)?function(e){return"[object Arguments]"===w.call(e)}:function(e){return v("callee",e)}}();var O=!{toString:null}.propertyIsEnumerable("toString"),k=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],A=function(){return arguments.propertyIsEnumerable("length")}(),j=function(e,t){for(var s=0;s<e.length;){if(e[s]===t)return!0;s+=1}return!1},F="function"!=typeof Object.keys||A?i(function(e){if(Object(e)!==e)return[];var t,s,n=[],r=A&&E(e);for(t in e)!v(t,e)||r&&"length"===t||(n[n.length]=t);if(O)for(s=k.length-1;s>=0;)v(t=k[s],e)&&!j(n,t)&&(n[n.length]=t),s-=1;return n}):i(function(e){return Object(e)!==e?[]:Object.keys(e)});const I=F;const P=i(function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function C(e,t,s,n){var r=x(e);function i(e,t){return T(e,t,s.slice(),n.slice())}return!b(function(e,t){return!b(i,t,e)},x(t),r)}function T(e,t,s,n){if(S(e,t))return!0;var r,i,o=P(e);if(o!==P(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||!S(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!S(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var c=s.length-1;c>=0;){if(s[c]===e)return n[c]===t;c-=1}switch(o){case"Map":return e.size===t.size&&C(e.entries(),t.entries(),s.concat([e]),n.concat([t]));case"Set":return e.size===t.size&&C(e.values(),t.values(),s.concat([e]),n.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var a=I(e);if(a.length!==I(t).length)return!1;var l=s.concat([e]),u=n.concat([t]);for(c=a.length-1;c>=0;){var d=a[c];if(!v(d,t)||!T(t[d],e[d],l,u))return!1;c-=1}return!0}const M=g(function(e,t){return T(e,t,[],[])});const N=class{key;value;constructor(e,t){this.key=e,this.value=t}toValue(){return{key:this.key?.toValue(),value:this.value?.toValue()}}};class ${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)}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)}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 D=$;class R{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 R)this._content=e;else if(null!=e&&"string"!=typeof e&&"number"!=typeof e&&"boolean"!=typeof e&&"bigint"!=typeof e&&"symbol"!=typeof e)if(e instanceof N)this._content=e;else if(e instanceof D)this._content=e.elements;else if(Array.isArray(e))this._content=e.map(e=>this.refract(e));else{if("object"!=typeof e)throw new Error("Cannot set content to value of type "+typeof e);this._content=Object.entries(e).map(([e,t])=>new this.MemberElement(e,t))}else this._content=e}get meta(){if(!this._meta){if(this.isFrozen){const e=new this.ObjectElement;return e.freeze(),e}this._meta=new this.ObjectElement}return this._meta}set meta(e){e instanceof R?this._meta=e:this.meta.set(e??{})}get attributes(){if(!this._attributes){if(this.isFrozen){const e=new this.ObjectElement;return e.freeze(),e}this._attributes=new this.ObjectElement}return this._attributes}set attributes(e){e instanceof R?this._attributes=e:this.attributes.set(e??{})}get id(){return this.getMetaProperty("id","")}set id(e){this.setMetaProperty("id",e)}get classes(){return this.getMetaProperty("classes",[])}set classes(e){this.setMetaProperty("classes",e)}get links(){return this.getMetaProperty("links",[])}set links(e){this.setMetaProperty("links",e)}get children(){const{_content:e}=this;if(Array.isArray(e))return e;if(e instanceof N){const t=[];return e.key&&t.push(e.key),e.value&&t.push(e.value),t}return e instanceof R?[e]:[]}get isFrozen(){return Object.isFrozen(this)}freeze(){if(!this.isFrozen){this._meta&&(this._meta.parent=this,this._meta.freeze()),this._attributes&&(this._attributes.parent=this,this._attributes.freeze());for(const e of this.children)e.parent=this,e.freeze();Array.isArray(this._content)&&Object.freeze(this._content),Object.freeze(this)}}toValue(){const{_content:e}=this;return e instanceof R||e instanceof N?e.toValue():Array.isArray(e)?e.map(e=>e.toValue()):e}equals(e){return M(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 B=R;const J=class extends B{constructor(e,t,s){super(e,t,s),this.element="string"}primitive(){return"string"}get length(){return this.content?.length??0}};const L=class extends J{constructor(e,t,s){super(e,t,s),this.element="arazzo",this.classes.push("spec-version"),this.classes.push("version")}};class q extends B{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 _=q;const z=class extends B{constructor(e,t,s,n){super(new N,s,n),this.element="member",void 0!==e&&(this.key=e),arguments.length>=2&&(this.value=t)}primitive(){return"member"}get key(){return this._content.key}set key(e){this._content.key=this.refract(e)}get value(){return this._content.value}set value(e){this._content.value=void 0===e?void 0:this.refract(e)}};const H=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 z(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 D(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 D(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 V=class extends H{constructor(e,t,s){super(e,t,s),this.element="arazzoSpecification1",this.classes.push("api"),this.classes.push("arazzo")}get arazzo(){return this.get("arazzo")}set arazzo(e){this.set("arazzo",e)}get info(){return this.get("info")}set info(e){this.set("info",e)}get sourceDescriptions(){return this.get("sourceDescriptions")}set sourceDescriptions(e){this.set("sourceDescriptions",e)}get workflows(){return this.get("workflows")}set workflows(e){this.set("workflows",e)}get components(){return this.get("components")}set components(e){this.set("components",e)}};const U=class extends H{constructor(e,t,s){super(e,t,s),this.element="components"}get inputs(){return this.get("inputs")}set inputs(e){this.set("inputs",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}get successActions(){return this.get("successActions")}set successActions(e){this.set("successActions",e)}get failureActions(){return this.get("failureActions")}set failureActions(e){this.set("failureActions",e)}};const G=class extends H{constructor(e,t,s){super(e,t,s),this.element="criterion"}get context(){return this.get("context")}set context(e){this.set("context",e)}get condition(){return this.get("condition")}set condition(e){this.set("condition",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}};const W=class extends H{constructor(e,t,s){super(e,t,s),this.element="criterionExpressionType"}get type(){return this.get("type")}set type(e){this.set("type",e)}get version(){return this.get("version")}set version(e){this.set("version",e)}};const X=class extends H{constructor(e,t,s){super(e,t,s),this.element="failureAction"}get name(){return this.get("name")}set name(e){this.set("name",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}get workflowId(){return this.get("workflowId")}set workflowId(e){this.set("workflowId",e)}get stepId(){return this.get("stepId")}set stepId(e){this.set("stepId",e)}get retryAfter(){return this.get("retryAfter")}set retryAfter(e){this.set("retryAfter",e)}get retryLimit(){return this.get("retryLimit")}set retryLimit(e){this.set("retryLimit",e)}get criteria(){return this.get("criteria")}set criteria(e){this.set("criteria",e)}};const K=class extends H{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 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)}get version(){return this.get("version")}set version(e){this.set("version",e)}};function Y(e,t,s){for(var n=0,r=s.length;n<r;)t=e(t,s[n]),n+=1;return t}const Z=g(function(e,t){return Y(function(s,n){return s[n]=e(t[n],n,t),s},{},I(t))});const Q=i(function(e){return null==e});var ee=g(function(e,t){if(0===e.length||Q(t))return!1;for(var s=t,n=0;n<e.length;){if(Q(s)||!v(e[n],s))return!1;s=s[e[n]],n+=1}return!0});const te=ee;var se=g(function(e,t){return te([e],t)});const ne=se;function re(e){return function t(s,n,o){switch(arguments.length){case 0:return t;case 1:return r(s)?t:g(function(t,n){return e(s,t,n)});case 2:return r(s)&&r(n)?t:r(s)?g(function(t,s){return e(t,n,s)}):r(n)?g(function(t,n){return e(s,t,n)}):i(function(t){return e(s,n,t)});default:return r(s)&&r(n)&&r(o)?t:r(s)&&r(n)?g(function(t,s){return e(t,s,o)}):r(s)&&r(o)?g(function(t,s){return e(t,n,s)}):r(n)&&r(o)?g(function(t,n){return e(s,t,n)}):r(s)?i(function(t){return e(t,n,o)}):r(n)?i(function(t){return e(s,t,o)}):r(o)?i(function(t){return e(s,n,t)}):e(s,n,o)}}}const ie=Number.isInteger||function(e){return(e|0)===e};const oe=function(e,t){if(null!=t)return ie(e)?o(e,t):t[e]};const ce=g(oe);const ae=re(function(e,t,s){return e(ce(t,s))});function le(e,t){for(var s=t,n=0;n<e.length;n+=1){if(null==s)return;var r=e[n];s=ie(r)?o(r,s):s[r]}return s}const ue=g(le);function de(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,s){return t.apply(this,arguments)};case 3:return function(e,s,n){return t.apply(this,arguments)};case 4:return function(e,s,n,r){return t.apply(this,arguments)};case 5:return function(e,s,n,r,i){return t.apply(this,arguments)};case 6:return function(e,s,n,r,i,o){return t.apply(this,arguments)};case 7:return function(e,s,n,r,i,o,c){return t.apply(this,arguments)};case 8:return function(e,s,n,r,i,o,c,a){return t.apply(this,arguments)};case 9:return function(e,s,n,r,i,o,c,a,l){return t.apply(this,arguments)};case 10:return function(e,s,n,r,i,o,c,a,l,u){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function pe(e,t){return function(){return t.call(this,e.apply(this,arguments))}}const he=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};function me(e){return"[object String]"===Object.prototype.toString.call(e)}const fe=i(function(e){return!!he(e)||!!e&&("object"==typeof e&&(!me(e)&&(0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))});var ye="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function ge(e,t,s){return function(n,r,i){if(fe(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[ye])return s(n,r,i[ye]());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 xe(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 be=g(function(e,t){return de(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 Se(e,t,s,n){return e["@@transducer/result"](s[n](be(e["@@transducer/step"],e),t))}const we=ge(xe,Se,ve);var Ee=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 Oe=re(function(e,t,s){return we("function"==typeof e?new Ee(e):e,t,s)});function ke(e,t){return function(){var s=arguments.length;if(0===s)return t();var n=arguments[s-1];return he(n)||"function"!=typeof n[e]?t.apply(this,arguments):n[e].apply(n,Array.prototype.slice.call(arguments,0,s-1))}}const Ae=re(ke("slice",function(e,t,s){return Array.prototype.slice.call(s,e,t)}));const je=i(ke("tail",Ae(1,1/0)));function Fe(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return de(arguments[0].length,Oe(pe,arguments[0],je(arguments)))}var Ie=function(e,t){switch(arguments.length){case 0:return Ie;case 1:return function t(s){return 0===arguments.length?t:S(e,s)};default:return S(e,t)}};const Pe=Ie;function Ce(e,t){return function(e,t,s){var n,r;if("function"==typeof e.indexOf)switch(typeof t){case"number":if(0===t){for(n=1/t;s<e.length;){if(0===(r=e[s])&&1/r===n)return s;s+=1}return-1}if(t!=t){for(;s<e.length;){if("number"==typeof(r=e[s])&&r!=r)return s;s+=1}return-1}return e.indexOf(t,s);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,s);case"object":if(null===t)return e.indexOf(t,s)}for(;s<e.length;){if(M(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 Me(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 Ne=function(e){return(e<10?"0":"")+e};const $e="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+Ne(e.getUTCMonth()+1)+"-"+Ne(e.getUTCDate())+"T"+Ne(e.getUTCHours())+":"+Ne(e.getUTCMinutes())+":"+Ne(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function De(e,t,s){return function(){if(0===arguments.length)return s();var n=arguments[arguments.length-1];if(!he(n)){for(var r=0;r<e.length;){if("function"==typeof n[e[r]])return n[e[r]].apply(n,Array.prototype.slice.call(arguments,0,-1));r+=1}if(function(e){return null!=e&&"function"==typeof e["@@transducer/step"]}(n))return t.apply(null,Array.prototype.slice.call(arguments,0,-1))(n)}return s.apply(this,arguments)}}function Re(e){return"[object Object]"===Object.prototype.toString.call(e)}const Be=function(){return this.xf["@@transducer/init"]()},Je=function(e){return this.xf["@@transducer/result"](e)};var Le=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=Be,e.prototype["@@transducer/result"]=Je,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 Le(e,t)}}var _e=g(De(["fantasy-land/filter","filter"],qe,function(e,t){return Re(t)?Y(function(s,n){return e(t[n])&&(s[n]=t[n]),s},{},I(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 ze=_e;const He=g(function(e,t){return ze((s=e,function(){return!s.apply(this,arguments)}),t);var s});function Ve(e,t){var s=function(s){var n=t.concat([e]);return Ce(s,n)?"<Circular>":Ve(s,n)},n=function(e,t){return Te(function(t){return Me(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,He(function(e){return/^\d+$/.test(e)},I(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):Me($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())+")":Me(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,I(e)).join(", ")+"}"}}const Ue=i(function(e){return Ve(e,[])});const Ge=re(function(e,t,s){return e(le(t,s))});function We(e){var t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t}const Xe=g(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 Ze=ge(Y,Ye,Ke);var Qe=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=Be,e.prototype["@@transducer/result"]=Je,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 Qe(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):de(Math.max(0,o),tt(e,n,s))}}const st=g(function(e,t){return 1===e?i(t):de(e,tt(e,[],t))});const nt=g(De(["fantasy-land/map","map"],et,function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return st(t.length,function(){return e.call(this,t.apply(this,arguments))});case"[object Object]":return Y(function(s,n){return s[n]=e(t[n]),s},{},I(t));default:return Te(e,t)}}));const rt=g(function(e,t){return"function"==typeof t["fantasy-land/ap"]?t["fantasy-land/ap"](e):"function"==typeof e.ap?e.ap(t):"function"==typeof e?function(s){return e(s)(t(s))}:Ze(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,nt(s,t))},[],e)});const it=g(function(e,t){var s=st(e,t);return st(e,function(){return Y(rt,nt(s,arguments[0]),Array.prototype.slice.call(arguments,1))})});const ot=i(function(e){return it(e.length,e)});const ct=g(function(e,t){return We(e)?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:ot(Xe)(e,t)});const at=M(null);const lt=ot(i(function(e){return!e}));const ut=lt(at);function dt(e){return dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dt(e)}const pt=function(e){return"object"===dt(e)};const ht=st(1,ct(ut,pt));const mt=g(function(e,t){if(e===t)return t;function s(e,t){if(e>t!=t>e)return t>e?t:e}var n=s(e,t);if(void 0!==n)return n;var r=s(typeof e,typeof t);if(void 0!==r)return r===typeof e?e:t;var i=Ue(e),o=s(i,Ue(t));return void 0!==o&&o===i?e:t});const ft=g(function(e,t){return nt(ce(e),t)});const yt=i(function(e){return st(Oe(mt,0,ft("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 gt=st(1,Fe(P,Pe("GeneratorFunction")));const xt=st(1,Fe(P,Pe("AsyncFunction")));const bt=yt([Fe(P,Pe("Function")),gt,xt]);var vt=Fe(P,Pe("Object")),St=Fe(Ue,M(Ue(Object))),wt=Ge(ct(bt,St),["constructor"]);const Et=st(1,function(e){if(!ht(e)||!vt(e))return!1;var t=Object.getPrototypeOf(e);return!!at(t)||wt(t)});const Ot=st(1,Fe(P,Pe("String")));const kt=i(function(e){return st(e.length,e)});const At=g(function(e,t){return st(e+1,function(){var s=arguments[e];if(null!=s&&We(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 jt=At(1,"split");var Ft=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=Be,e.prototype["@@transducer/result"]=Je,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 It(e){return function(t){return new Ft(e,t)}}const Pt=g(De(["dropWhile"],It,function(e,t){for(var s=0,n=t.length;s<n&&e(t[s]);)s+=1;return Ae(s,1/0,t)}));const Ct=At(1,"join");const Tt=i(function(e){return st(e.length,function(t,s){var n=Array.prototype.slice.call(arguments,0);return n[0]=s,n[1]=t,e.apply(this,n)})})(g(Ce));const Mt=kt(function(e,t){return Fe(jt(""),Pt(Tt(e)),Ct(""))(t)}),Nt=new WeakMap,$t=e=>{if(Nt.has(e))return Nt.get(e);const t={},s=(e,n,r)=>("string"==typeof e.element&&(t[e.element]=e.$visitor?[...r,"$visitor"]:r),Z((e,t)=>{const i=[...r,t];if(Et(e)&&ne("$ref",e)&&ae(Ot,"$ref",e)){const t=ue(["$ref"],e),s=Mt("#/",t);return ue(s.split("/"),n)}return Et(e)?s(e,n,i):e},e)),n=s(e,e,[]);return n.elementMap=t,Nt.set(e,n),n};const Dt=class extends H{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 Rt=class extends H{constructor(e,t,s){super(e,t,s),this.element="JSONReference",this.classes.push("json-reference")}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}};const Bt=class extends H{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 Jt=class extends H{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)}};const Lt=class extends B{constructor(e,t,s){super(e,t,s),this.element="number"}primitive(){return"number"}};const qt=class extends B{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 _t=class extends B{constructor(e,t,s){super(e,t,s),this.element="boolean"}primitive(){return"boolean"}};const zt=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([])}},Ht=e=>e instanceof B,Vt=e=>e instanceof J,Ut=e=>e instanceof Lt,Gt=e=>e instanceof qt,Wt=e=>e instanceof _t,Xt=e=>e instanceof zt,Kt=e=>e instanceof H,Yt=e=>e instanceof z,Zt=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,Qt=(e,t)=>0===t.length||!!Ht(e)&&(!e.isMetaEmpty&&(!!e.hasMetaProperty("classes")&&t.every(t=>e.classes.includes(t))));class es extends J{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(ss).join("");const a=new es(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=ns(t,n);s.push(e.value),n=e.next}return s}(this.content))}}const ts="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function ss(e){let t=e>>>0,s="";do{let e=31&t;t>>>=5,0!==t&&(e|=32),s+=ts[e]}while(0!==t);return s}function ns(e,t=0){let s=0,n=0,r=t;for(;;){const t=e[r++],i=ts.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 rs=es;const is=class extends d{constructor(e,t){if(super(e,t),null!=t&&"object"==typeof t){const{cause:e,...s}=t;Object.assign(this,s)}}};const os=class extends is{value;constructor(e,t){super(e,t),void 0!==t&&(this.value=t.value)}};const cs=class extends os{};const as=class extends os{},ls=(e,t)=>{const{visited:s=new WeakMap}=t,n={...t,visited:s};if(s.has(e))return s.get(e);const r=hs(e);s.set(e,r);const{content:i}=e;return Array.isArray(i)?r.content=i.map(e=>ls(e,n)):Ht(i)?r.content=ls(i,n):r.content=i instanceof N?us(i,n):i,r},us=(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?ls(r,n):void 0,c=void 0!==i?ls(i,n):void 0,a=new N(o,c);return s.set(e,a),a},ds=(e,t={})=>{if(e instanceof N)return us(e,t);if(e instanceof D)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=>ls(e,n)),i=new D(r);return s.set(e,i),i})(e,t);if(Ht(e))return ls(e,t);throw new cs("Value provided to cloneDeep function couldn't be cloned",{value:e})};ds.safe=e=>{try{return ds(e)}catch{return e}};const ps=e=>{const{key:t,value:s}=e;return new N(t,s)},hs=e=>{const t=new(0,e.constructor);t.element=e.element,e.isMetaEmpty||(t.meta=ds(e.meta)),e.isAttributesEmpty||(t.attributes=ds(e.attributes)),Zt(e)&&rs.transfer(e,t);const{content:s}=e;return Ht(s)?t.content=hs(s):Array.isArray(s)?t.content=[...s]:t.content=s instanceof N?ps(s):s,t},ms=e=>{if(e instanceof N)return ps(e);if(e instanceof D)return(e=>{const t=[...e];return new D(t)})(e);if(Ht(e))return hs(e);throw new as("Value provided to cloneShallow function couldn't be cloned",{value:e})};ms.safe=e=>{try{return ms(e)}catch{return e}};const fs=class extends B{constructor(e,t,s){super(e||[],t,s),this.element="link"}get relation(){if(this.hasAttributesProperty("relation"))return this.attributes.get("relation")}set relation(e){this.attributes.set("relation",e)}get href(){if(this.hasAttributesProperty("href"))return this.attributes.get("href")}set href(e){this.attributes.set("href",e)}};const ys=class extends B{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 gs=class extends J{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 xs=class extends J{constructor(e,t,s){super(e,t,s),this.element="comment"}};const bs=class extends zt{constructor(e,t,s){super(e,t,s),this.element="parseResult"}get api(){return this.filter(e=>Qt(e,["api"])).first}get results(){return this.filter(e=>Qt(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&&Qt(e,["warning"]))}get errors(){return this.filter(e=>"annotation"===e.element&&Qt(e,["error"]))}get isEmpty(){return 0===this.reject(e=>"annotation"===e.element).length}replaceResult(e){const{result:t}=this;if(void 0===t)return!1;const s=this._content,n=s.findIndex(e=>e===t);return-1!==n&&(s[n]=e,!0)}},vs=e=>e instanceof fs,Ss=e=>e instanceof ys,ws=e=>{if(!Ht(e))return e;if(Vt(e)||Ut(e)||Wt(e)||Gt(e))return e.toValue();const t=new WeakMap,s=e=>{if(!Ht(e))return e;if(Kt(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(Xt(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 Ss(e)?String(e.toValue()):vs(e)?Vt(e.href)?e.href.toValue():"":e.toValue()};return s(e)},Es=e=>{const t=e.isMetaEmpty?void 0:ds(e.meta),s=e.isAttributesEmpty?void 0:ds(e.attributes);return new e.constructor(void 0,t,s)},Os=(e,t)=>t.clone&&t.isMergeableElement(e)?As(Es(e),e,t):e,ks={clone:!0,isMergeableElement:e=>Kt(e)||Xt(e),arrayElementMerge:(e,t,s)=>new(0,e.constructor)(e.concat(t).map(e=>Os(e,s))),objectElementMerge:(e,t,s)=>{const n=Kt(e)?Es(e):Es(t);return Kt(e)&&e.forEach((e,t,r)=>{const i=ms(r);i.value=Os(e,s),n.content.push(i)}),t.forEach((t,r,i)=>{const o=ws(r);let c;if(Kt(e)&&e.hasKey(o)&&s.isMergeableElement(t)){const n=e.get(o);c=ms(i),c.value=((e,t)=>{if("function"!=typeof t.customMerge)return As;const s=t.customMerge(e,t);return"function"==typeof s?s:As})(r,s)(n,t,s)}else c=ms(i),c.value=Os(t,s);n.remove(o),n.content.push(c)}),n},customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0},As=(e,t,s)=>{const n={...ks,...s};n.isMergeableElement=n.isMergeableElement??ks.isMergeableElement,n.arrayElementMerge=n.arrayElementMerge??ks.arrayElementMerge,n.objectElementMerge=n.objectElementMerge??ks.objectElementMerge;const r=Xt(t);if(!(r===Xt(e)))return Os(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=>ds(e):e.customMetaMerge)(n)(e.meta,t.meta),i.attributes=(e=>"function"!=typeof e.customAttributesMerge?e=>ds(e):e.customAttributesMerge)(n)(e.attributes,t.attributes),i};As.all=(e,t)=>{if(!Array.isArray(e))throw new TypeError("First argument of deepmerge should be an array.");return 0===e.length?new H:e.reduce((e,s)=>As(e,s,t),Es(e[0]))};const js=As;const Fs=class{element;constructor(e){Object.assign(this,e)}copyMetaAndAttributes(e,t){if(!e.isMetaEmpty||!t.isMetaEmpty){const s=t.isMetaEmpty?new H:t.meta,n=e.isMetaEmpty?new H:e.meta;t.meta=js(s,n)}if(!e.isAttributesEmpty||!t.isAttributesEmpty){const s=t.isAttributesEmpty?new H:t.attributes,n=e.isAttributesEmpty?new H:e.attributes;t.attributes=js(s,n)}rs.transfer(e,t)}};const Is=class extends Fs{enter(e){this.element=ds(e.node),e.stop()}};const Ps=i(function(e){return function(){return e}});const Cs=g(function(e,t){return null==t||t!=t?e:t});const Ts=Ps(void 0);const Ms=M(Ts());const Ns=i(function(e){return st(Oe(mt,0,ft("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 $s=i(function(e){return null!=e&&"function"==typeof e["fantasy-land/empty"]?e["fantasy-land/empty"]():null!=e&&null!=e.constructor&&"function"==typeof e.constructor["fantasy-land/empty"]?e.constructor["fantasy-land/empty"]():null!=e&&"function"==typeof e.empty?e.empty():null!=e&&null!=e.constructor&&"function"==typeof e.constructor.empty?e.constructor.empty():e==Set||e instanceof Set?new Set:e==Map||e instanceof Map?new Map:he(e)?[]:me(e)?"":Re(e)?{}:E(e)?function(){return arguments}():function(e){var t=Object.prototype.toString.call(e);return"[object Uint8ClampedArray]"===t||"[object Int8Array]"===t||"[object Uint8Array]"===t||"[object Int16Array]"===t||"[object Uint16Array]"===t||"[object Int32Array]"===t||"[object Uint32Array]"===t||"[object Float32Array]"===t||"[object Float64Array]"===t||"[object BigInt64Array]"===t||"[object BigUint64Array]"===t}(e)?e.constructor.from(""):void 0});const Ds=$s;const Rs=i(function(e){return null!=e&&M(e,Ds(e))});const Bs=i(function(e){return!Rs(e)});const Js=g(function(e,t){return e||t});const Ls=st(1,ct(ut,g(function(e,t){return We(e)?function(){return e.apply(this,arguments)||t.apply(this,arguments)}:ot(Js)(e,t)})(pt,bt)));var qs=lt(Ls);const _s=Ns([Ot,qs,Bs]);const zs=g(function(e,t){for(var s={},n=0;n<e.length;)e[n]in t&&(s[e[n]]=t[e[n]]),n+=1;return s}),Hs=function(){const e=Us,t=Vs,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,d=0,p=0,h=0,m=0,f=0,y=new function(){this.state=e.ACTIVE,this.phraseLength=0,this.refresh=()=>{this.state=e.ACTIVE,this.phraseLength=0}};s.parse=(g,x,v,S)=>{const w=`${n}parse(): `;d=0,p=0,h=0,m=0,f=0,r=void 0,i=void 0,o=void 0,c=void 0,y.refresh(),a=void 0,l=void 0,u=void 0,c=t.stringToChars(v),r=g.rules,i=g.udts;const E=x.toLowerCase();let O;for(const e in r)if(r.hasOwnProperty(e)&&E===r[e].lower){O=r[e].index;break}if(void 0===O)throw new Error(`${w}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=S,o=[{type:e.RNM,index:O}],b(0,0),o=void 0;let k=!1;switch(y.state){case e.ACTIVE:throw new Error(`${w}final state should never be 'ACTIVE'`);case e.NOMATCH:k=!1;break;case e.EMPTY:case e.MATCH:k=y.phraseLength===c.length;break;default:throw new Error("unrecognized state")}return{success:k,state:y.state,stateName:e.idName(y.state),length:c.length,matched:y.phraseLength,maxMatched:f,maxTreeDepth:h,nodeHits:m}};const g=(t,s,r,i)=>{if(s.phraseLength>r){let e=`${n}opRNM(${t.name}): callback function error: `;throw e+=`sysData.phraseLength: ${s.phraseLength}`,e+=` must be <= remaining chars: ${r}`,new Error(e)}switch(s.state){case e.ACTIVE:if(!i)throw new Error(`${n}opRNM(${t.name}): callback function return error. ACTIVE state not allowed.`);break;case e.EMPTY:s.phraseLength=0;break;case e.MATCH:0===s.phraseLength&&(s.state=e.EMPTY);break;case e.NOMATCH:s.phraseLength=0;break;default:throw new Error(`${n}opRNM(${t.name}): callback function return error. Unrecognized return state: ${s.state}`)}},x=(t,a)=>{let p,h,m;const f=o[t],g=i[f.index];y.UdtIndex=g.index,d||(m=s.ast&&s.ast.udtDefined(f.index),m&&(h=r.length+f.index,p=s.ast.getLength(),s.ast.down(h,g.name)));const x=c.length-a;l[f.index](y,c,a,u),((t,s,r)=>{if(s.phraseLength>r){let e=`${n}opUDT(${t.name}): callback function error: `;throw e+=`sysData.phraseLength: ${s.phraseLength}`,e+=` must be <= remaining chars: ${r}`,new Error(e)}switch(s.state){case e.ACTIVE:throw new Error(`${n}opUDT(${t.name}) ACTIVE state return not allowed.`);case e.EMPTY:if(!t.empty)throw new Error(`${n}opUDT(${t.name}) may not return EMPTY.`);s.phraseLength=0;break;case e.MATCH:if(0===s.phraseLength){if(!t.empty)throw new Error(`${n}opUDT(${t.name}) may not return EMPTY.`);s.state=e.EMPTY}break;case e.NOMATCH:s.phraseLength=0;break;default:throw new Error(`${n}opUDT(${t.name}): callback function return error. Unrecognized return state: ${s.state}`)}})(g,y,x),d||m&&(y.state===e.NOMATCH?s.ast.setLength(p):s.ast.up(h,g.name,a,y.phraseLength))},b=(t,i)=>{const l=`${n}opExecute(): `,v=o[t];switch(m+=1,p>h&&(h=p),p+=1,y.refresh(),s.trace&&s.trace.down(v,i),v.type){case e.ALT:((t,s)=>{const n=o[t];for(let t=0;t<n.children.length&&(b(n.children[t],s),y.state===e.NOMATCH);t+=1);})(t,i);break;case e.CAT:((t,n)=>{let r,i,c,a;const l=o[t];s.ast&&(i=s.ast.getLength()),r=!0,c=n,a=0;for(let t=0;t<l.children.length;t+=1){if(b(l.children[t],c),y.state===e.NOMATCH){r=!1;break}c+=y.phraseLength,a+=y.phraseLength}r?(y.state=0===a?e.EMPTY:e.MATCH,y.phraseLength=a):(y.state=e.NOMATCH,y.phraseLength=0,s.ast&&s.ast.setLength(i))})(t,i);break;case e.REP:((t,n)=>{let r,i,a,l;const u=o[t];if(0===u.max)return y.state=e.EMPTY,void(y.phraseLength=0);for(i=n,a=0,l=0,s.ast&&(r=s.ast.getLength());!(i>=c.length)&&(b(t+1,i),y.state!==e.NOMATCH)&&y.state!==e.EMPTY&&(l+=1,a+=y.phraseLength,i+=y.phraseLength,l!==u.max););y.state===e.EMPTY||l>=u.min?(y.state=0===a?e.EMPTY:e.MATCH,y.phraseLength=a):(y.state=e.NOMATCH,y.phraseLength=0,s.ast&&s.ast.setLength(r))})(t,i);break;case e.RNM:((t,n)=>{let i,l,p;const h=o[t],m=r[h.index],f=a[m.index];if(d||(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(y,c,n,u),g(m,y,t,!0),y.state===e.ACTIVE&&(p=o,o=m.opcodes,b(0,n),o=p,f(y,c,n,u),g(m,y,t,!1))}else p=o,o=m.opcodes,b(0,n,y),o=p;d||l&&(y.state===e.NOMATCH?s.ast.setLength(i):s.ast.up(h.index,m.name,n,y.phraseLength))})(t,i);break;case e.TRG:((t,s)=>{const n=o[t];y.state=e.NOMATCH,s<c.length&&n.min<=c[s]&&c[s]<=n.max&&(y.state=e.MATCH,y.phraseLength=1)})(t,i);break;case e.TBS:((t,s)=>{const n=o[t],r=n.string.length;if(y.state=e.NOMATCH,s+r<=c.length){for(let e=0;e<r;e+=1)if(c[s+e]!==n.string[e])return;y.state=e.MATCH,y.phraseLength=r}})(t,i);break;case e.TLS:((t,s)=>{let n;const r=o[t];y.state=e.NOMATCH;const i=r.string.length;if(0!==i){if(s+i<=c.length){for(let e=0;e<i;e+=1)if(n=c[s+e],n>=65&&n<=90&&(n+=32),n!==r.string[e])return;y.state=e.MATCH,y.phraseLength=i}}else y.state=e.EMPTY})(t,i);break;case e.UDT:x(t,i);break;case e.AND:((t,s)=>{switch(d+=1,b(t+1,s),d-=1,y.phraseLength=0,y.state){case e.EMPTY:case e.MATCH:y.state=e.EMPTY;break;case e.NOMATCH:y.state=e.NOMATCH;break;default:throw new Error(`opAND: invalid state ${y.state}`)}})(t,i);break;case e.NOT:((t,s)=>{switch(d+=1,b(t+1,s),d-=1,y.phraseLength=0,y.state){case e.EMPTY:case e.MATCH:y.state=e.NOMATCH;break;case e.NOMATCH:y.state=e.EMPTY;break;default:throw new Error(`opNOT: invalid state ${y.state}`)}})(t,i);break;default:throw new Error(`${l}unrecognized operator`)}d||i+y.phraseLength>f&&(f=i+y.phraseLength),s.stats&&s.stats.collect(v,y),s.trace&&s.trace.up(v,y.state,i,y.phraseLength),p-=1}},Vs={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)}},Us={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 Us.ALT:return"ALT";case Us.CAT:return"CAT";case Us.REP:return"REP";case Us.RNM:return"RNM";case Us.TRG:return"TRG";case Us.TBS:return"TBS";case Us.TLS:return"TLS";case Us.UDT:return"UDT";case Us.AND:return"AND";case Us.NOT:return"NOT";case Us.ACTIVE:return"ACTIVE";case Us.EMPTY:return"EMPTY";case Us.MATCH:return"MATCH";case Us.NOMATCH:return"NOMATCH";case Us.SEM_PRE:return"SEM_PRE";case Us.SEM_POST:return"SEM_POST";case Us.SEM_OK:return"SEM_OK";default:return"UNRECOGNIZED STATE"}}};function Gs(){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 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.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 Xs=Ws;new Gs;new Gs,new Hs,new Gs,new Hs,new Gs,new Hs,new Gs,new Hs;const Ks=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 Ys=class extends Xs{},Zs=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 Ks(String(e))}).join("/")}`}catch(t){throw new Ys("Unexpected error during JSON Pointer compilation",{cause:t,referenceTokens:e})}};class Qs 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 en=Qs;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 tn=e=>{if("string"!=typeof e)throw new TypeError("Selector must be a string");let t="";for(const s of e){const e=s.codePointAt(0);switch(e){case 8:t+="\\b";break;case 9:t+="\\t";break;case 10:t+="\\n";break;case 12:t+="\\f";break;case 13:t+="\\r";break;case 39:t+="\\'";break;case 92:t+="\\\\";break;default:t+=e<=31?`\\u${e.toString(16).padStart(4,"0")}`:s}}return t};const sn=class extends en{},nn=e=>{if(!Array.isArray(e))throw new sn("Selectors must be an array, got: "+typeof e,{selectors:e});try{return`$${e.map(e=>{if("string"==typeof e)return`['${tn(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 sn("Failed to compile normalized JSONPath",{cause:t,selectors:e})}};class rn{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?nn(t):Zs(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 on=st(1,ct(Ls,Fe(Ue,M("[object Promise]")))),cn=e=>{const t=e?.element;return void 0===t||"element"===t?"Element":`${t.charAt(0).toUpperCase()}${t.slice(1)}Element`},an=e=>Ht(e),ln=e=>ms(e),un=(e,t,s)=>{Yt(e)?e.value=s:Array.isArray(e)?e[t]=null===s?void 0:s:null===s?delete e[t]:e[t]=s},dn=e=>Yt(e)?["key","value"]:Xt(e)||Kt(e)?["content"]:[],pn=(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]}},hn=(e,t,s)=>{if(void 0===t)return null;const n=e,r=s?"leave":"enter",i=pn(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=pn(o,t);if("function"==typeof e)return e}return null},mn=(e,t={})=>{const{visitFnGetter:s=hn,nodeTypeGetter:n=cn,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=yn(t,a),n=i.call(e[u],s);if(on(n))throw new is("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=yn(t,r),n=i.call(e[a],s);if(on(n))throw new is("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=hn,nodeTypeGetter:n=cn,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=yn(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=yn(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 yn(e,t){return new rn(t,e.parent,e.parentPath,e.key,e.inList)}function*gn(e,t,s){const{keyMap:n,state:r,nodeTypeGetter:i,nodePredicate:o,nodeCloneFn:c,detectCycles:a,mutable:l,mutationFn:u}=s,d="function"==typeof n;let p,h,m=Array.isArray(e),f=[e],y=-1,g=[],x=e,b=null,v=null;const S=[];do{y+=1;const e=y===f.length;let s;const w=e&&0!==g.length;if(e){if(s=0===S.length?void 0:b?.key,x=h,h=S.pop(),v=b?.parentPath?.parentPath??null,w)if(l)for(const[e,t]of g)u(x,e,t);else if(m){x=x.slice();let e=0;for(const[t,s]of g){const n=t-e;null===s?(x.splice(n,1),e+=1):x[n]=s}}else{x=c(x);for(const[e,t]of g)x[e]=t}if(void 0!==p){y=p.index,f=p.keys,g=p.edits;const e=p.inArray;if(v=p.parentPath,p=p.prev,w&&!l){const t=e?y:f[y];g.push([t,x])}m=e}}else if(void 0!==h&&(s=m?y:f[y],x=h[s],void 0===x))continue;if(!Array.isArray(x)){if(!o(x))throw new is(`Invalid AST Node: ${String(x)}`,{node:x});if(a&&S.includes(x))continue;b=new rn(x,h,v,s,m);const n=hn(t,i(x),e);if(n){for(const[e,s]of Object.entries(r))t[e]=s;const i=yield{visitFn:n,path:b,isLeaving:e};if(b.shouldStop)break;if(b.shouldSkip&&!e)continue;if(b.removed){if(g.push([s,null]),!e)continue}else if(b._wasReplaced()){const t=b._getReplacementNode();if(g.push([s,t]),!e){if(!o(t))continue;x=t}}else if(void 0!==i&&(g.push([s,i]),!e)){if(!o(i))continue;x=i}b._markStale()}}if(!e){if(p={inArray:m,index:y,keys:f,edits:g,parentPath:v,prev:p},m=Array.isArray(x),m)f=x;else if(d)f=n(x);else{const e=i(x);f=void 0!==e?n[e]??[]:[]}y=-1,g=[],void 0!==h&&S.push(h),h=x,v=b}}while(void 0!==p);return 0!==g.length?g.at(-1)[1]:e}mn[Symbol.for("nodejs.util.promisify.custom")]=fn;const xn=(e,t,s={})=>{const n=gn(e,t,{keyMap:s.keyMap??dn,state:s.state??{},nodeTypeGetter:s.nodeTypeGetter??cn,nodePredicate:s.nodePredicate??an,nodeCloneFn:s.nodeCloneFn??ln,detectCycles:s.detectCycles??!0,mutable:s.mutable??!1,mutationFn:s.mutationFn??un});let r=n.next();for(;!r.done;){const e=r.value,s=e.visitFn.call(t,e.path);if(on(s))throw new is("Async visitor not supported in sync mode",{visitor:t,visitFn:e.visitFn});r=n.next(s)}return r.value},bn=async(e,t,s={})=>{const n=gn(e,t,{keyMap:s.keyMap??dn,state:s.state??{},nodeTypeGetter:s.nodeTypeGetter??cn,nodePredicate:s.nodePredicate??an,nodeCloneFn:s.nodeCloneFn??ln,detectCycles:s.detectCycles??!0,mutable:s.mutable??!1,mutationFn:s.mutationFn??un});let r=n.next();for(;!r.done;){const e=r.value,s=await e.visitFn.call(t,e.path);r=n.next(s)}return r.value};xn[Symbol.for("nodejs.util.promisify.custom")]=bn,rn.prototype.traverse=function(e,t){return xn(this.node,e,t)},rn.prototype.traverseAsync=function(e,t){return bn(this.node,e,t)};const vn=class extends Fs{specObj;passingOptionsNames=["specObj","parent"];constructor({specObj:e,...t}){super({...t}),this.specObj=e}retrievePassingOptions(){return zs(this.passingOptionsNames,this)}retrieveFixedFields(e){const t=ue(["visitors",...e,"fixedFields"],this.specObj);return"object"==typeof t&&null!==t?Object.keys(t):[]}retrieveVisitor(e){return Ge(bt,["visitors",...e],this.specObj)?ue(["visitors",...e],this.specObj):ue(["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 Is&&n?.constructor===Is?ds(t):(xn(t,n,s),n.element)}};const Sn=class extends vn{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=ws(t);if(Vt(t)&&n.includes(i)&&!this.ignoredFields.includes(i)){const n=this.toRefractedElement([...s,"fixedFields",i],e),o=new z(ds(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(ds(r))}),this.copyMetaAndAttributes(t,this.element),e.stop()}},wn=(e,t,s=[])=>{const n=Object.getOwnPropertyDescriptors(t);for(let e of s)delete n[e];Object.defineProperties(e,n)},En=(e,t=[e])=>{const s=Object.getPrototypeOf(e);return null===s?t:En(s,[...t,s])},On=(e,t,s=[])=>{var n;const r=null!==(n=((...e)=>{if(0===e.length)return;let t;const s=e.map(e=>En(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=En(r);for(let t of e){let e=En(t);for(let t=e.length-1;t>=0;t--){let n=e[t];-1===o.indexOf(n)&&(wn(i,n,["constructor",...s]),o.push(n))}}return i.constructor=t,i},kn=e=>e.filter((t,s)=>e.indexOf(t)==s),An=(e,t)=>{const s=t.map(e=>En(e));let n=0,r=!0;for(;r;){r=!1;for(let i=t.length-1;i>=0;i--){const t=s[i][n];if(null!=t&&(r=!0,null!=Object.getOwnPropertyDescriptor(t,e)))return s[i][0]}n++}},jn=(e,t=Object.prototype)=>new Proxy({},{getPrototypeOf:()=>t,setPrototypeOf(){throw Error("Cannot set prototype of Proxies created by ts-mixer")},getOwnPropertyDescriptor:(t,s)=>Object.getOwnPropertyDescriptor(An(s,e)||{},s),defineProperty(){throw new Error("Cannot define new properties on Proxies created by ts-mixer")},has:(s,n)=>void 0!==An(n,e)||void 0!==t[n],get:(s,n)=>(An(n,e)||t)[n],set(t,s,n){const r=An(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)))}),Fn=null,In="copy",Pn="copy",Cn="deep",Tn=new WeakMap,Mn=e=>Tn.get(e),Nn=(e,t)=>{var s,n;const r=kn([...Object.getOwnPropertyNames(e),...Object.getOwnPropertyNames(t)]),i={};for(let o of r)i[o]=kn([...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},$n=(e,t)=>{var s,n,r,i;return{property:Nn(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:Nn(null!==(r=null==e?void 0:e.method)&&void 0!==r?r:{},null!==(i=null==t?void 0:t.method)&&void 0!==i?i:{})}},Dn=(e,t)=>{var s,n,r,i,o,c;return{class:kn([...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:$n(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:$n(null!==(o=null==e?void 0:e.instance)&&void 0!==o?o:{},null!==(c=null==t?void 0:t.instance)&&void 0!==c?c:{})}},Rn=new Map,Bn=(...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=[...En(e.prototype).map(e=>e.constructor),...null!==(t=Mn(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=>Rn.get(e)).filter(e=>!!e);return 0==t.length?{}:1==t.length?t[0]:t.reduce((e,t)=>Dn(e,t))},Jn=e=>{let t=Rn.get(e);return t||(t={},Rn.set(e,t)),t};function Ln(...e){var t,s,n;const r=e.map(e=>e.prototype),i=Fn;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)wn(this,new s(...t));null!==i&&"function"==typeof this[i]&&this[i].apply(this,t)}var c,a;o.prototype="copy"===Pn?On(r,o):(c=r,a=o,jn([...c,{constructor:a}])),Object.setPrototypeOf(o,"copy"===In?On(e,null,["prototype"]):jn(e,Function.prototype));let l=o;if("none"!==Cn){const r="deep"===Cn?Bn(...e):((...e)=>{const t=e.map(e=>Jn(e));return 0===t.length?{}:1===t.length?t[0]:t.reduce((e,t)=>Dn(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)}qn(null!==(s=null==r?void 0:r.static)&&void 0!==s?s:{},l),qn(null!==(n=null==r?void 0:r.instance)&&void 0!==n?n:{},l.prototype)}var u,d;return u=l,d=e,Tn.set(u,d),l}const qn=(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 _n=function(){return!1};const zn=class extends vn{specPath;ignoredFields;fieldPatternPredicate=_n;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=ws(t);if(!this.ignoredFields.includes(n)&&this.fieldPatternPredicate(n)){const n=this.specPath(e),r=this.toRefractedElement(n,e),i=new z(ds(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(ds(s))}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Hn=class extends zn{constructor(e){super(e),this.fieldPatternPredicate=_s}};const Vn=class{parent;constructor({parent:e}){this.parent=e}},Un=Ln(Sn,Vn,Is),Gn=Ln(Sn,Is),Wn=Ln(Sn,Is),Xn=Ln(Sn,Is),Kn=Ln(vn,Vn,Is),Yn=Ln(vn,Vn,Is),Zn=Ln(vn,Vn,Is),Qn=Ln(vn,Vn,Is),er=Ln(vn,Vn,Is),tr=Ln(Hn,Vn,Is),sr=Ln(Hn,Vn,Is),nr=Ln(Hn,Vn,Is),rr=Ln(Hn,Vn,Is);const ir=class extends Un{constructor(e){super(e),this.element=new Dt,this.specPath=Ps(["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,Sn.prototype.ObjectElement.call(this,e)}handleDialectIdentifier(e){if(Ms(this.parent)&&!Vt(e.get("$schema")))this.element.meta.set("inheritedDialectIdentifier",this.defaultDialectIdentifier);else if(this.parent instanceof Dt&&!Vt(e.get("$schema"))){const e=Cs(ws(this.parent.meta.get("inheritedDialectIdentifier")),ws(this.parent.$schema));this.element.meta.set("inheritedDialectIdentifier",e)}}handleSchemaIdentifier(e,t="id"){const s=void 0!==this.parent?ds(this.parent.meta.get("ancestorsSchemaIdentifiers")??new zt):new zt,n=ws(e.get(t));_s(n)&&s.push(n),this.element.meta.set("ancestorsSchemaIdentifiers",s)}},or=e=>Kt(e)&&e.hasKey("$ref");const cr=class extends Qn{ObjectElement(e){const t=e.node,s=or(t)?["document","objects","JSONReference"]:["document","objects","JSONSchema"];this.element=this.toRefractedElement(s,t),e.stop()}ArrayElement(e){const t=e.node;this.element=new zt,this.element.classes.push("json-schema-items"),t.forEach(e=>{const t=or(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 Is{ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-required")}};const lr=class extends rr{constructor(e){super(e),this.element=new H,this.element.classes.push("json-schema-properties"),this.specPath=e=>or(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const ur=class extends nr{constructor(e){super(e),this.element=new H,this.element.classes.push("json-schema-patternProperties"),this.specPath=e=>or(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const dr=class extends sr{constructor(e){super(e),this.element=new H,this.element.classes.push("json-schema-dependencies"),this.specPath=e=>or(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const pr=class extends Is{ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-enum")}};const hr=class extends Is{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 mr=class extends Kn{constructor(e){super(e),this.element=new zt,this.element.classes.push("json-schema-allOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=or(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 Yn{constructor(e){super(e),this.element=new zt,this.element.classes.push("json-schema-anyOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=or(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const yr=class extends Zn{constructor(e){super(e),this.element=new zt,this.element.classes.push("json-schema-oneOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=or(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const gr=class extends tr{constructor(e){super(e),this.element=new H,this.element.classes.push("json-schema-definitions"),this.specPath=e=>or(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const xr=class extends er{constructor(e){super(e),this.element=new zt,this.element.classes.push("json-schema-links")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","LinkDescription"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const br=class extends Gn{constructor(e){super(e),this.element=new Rt,this.specPath=Ps(["document","objects","JSONReference"])}ObjectElement(e){Sn.prototype.ObjectElement.call(this,e),Vt(this.element.$ref)&&this.element.classes.push("reference-element")}};const vr=class extends Is{StringElement(e){super.enter(e),this.element.classes.push("reference-value")}};const Sr=function(){return!0};const wr=re(function(e,t,s){return st(Math.max(e.length,t.length,s.length),function(){return e.apply(this,arguments)?t.apply(this,arguments):s.apply(this,arguments)})});const Er=i(function(e){return function(t,s){return e(t,s)?-1:e(s,t)?1:0}});var Or=g(function(e,t){return Array.prototype.slice.call(t,0).sort(e)});const kr=Or;const Ar=i(function(e){return o(0,e)});function jr(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}const Fr=i(jr);const Ir=lt(Q);const Pr=st(1,bt(Array.isArray)?Array.isArray:Fe(P,Pe("Array")));const Cr=ct(Pr,Bs);function Tr(e){return function(e){if(Array.isArray(e))return Mr(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 Mr(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)?Mr(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 Mr(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 Nr=Fe(kr(Er(function(e,t){return e.length>t.length})),Ar,ce("length")),$r=kt(function(e,t,s){var n=s.apply(void 0,Tr(e));return Ir(n)?Fr(n):t});const Dr=wr(Cr,function(e){var t=Nr(e);return st(t,function(){for(var t=arguments.length,s=new Array(t),n=0;n<t;n++)s[n]=arguments[n];return Oe($r(s),void 0,e)})},Ts);const Rr=class extends vn{alternator;constructor({alternator:e,...t}){super({...t}),this.alternator=e}enter(e){const t=e.node,s=this.alternator.map(({predicate:e,specPath:t})=>wr(e,Ps(t),Ts)),n=Dr(s)(t);this.element=this.toRefractedElement(n,t),e.stop()}};const Br=class extends Rr{constructor(e){super(e),this.alternator=[{predicate:or,specPath:["document","objects","JSONReference"]},{predicate:Sr,specPath:["document","objects","JSONSchema"]}]}};const Jr=class extends Xn{constructor(e){super(e),this.element=new Bt,this.specPath=Ps(["document","objects","Media"])}};const Lr=class extends Wn{constructor(e){super(e),this.element=new Jt,this.specPath=Ps(["document","objects","LinkDescription"])}},qr={visitors:{value:Is,JSONSchemaOrJSONReferenceVisitor:Br,document:{objects:{JSONSchema:{element:"jSONSchemaDraft4",$visitor:ir,fixedFields:{id:{$visitor:Is,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:Br,items:{$visitor:cr,alias:"itemsField"},maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:ar,properties:lr,additionalProperties:Br,patternProperties:ur,dependencies:dr,enum:pr,type:hr,allOf:mr,anyOf:fr,oneOf:yr,not:Br,definitions:gr,title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},format:{$ref:"#/visitors/value"},base:{$ref:"#/visitors/value"},links:{$visitor:xr,alias:"linksField"},media:{$ref:"#/visitors/document/objects/Media"},readOnly:{$ref:"#/visitors/value"}}},JSONReference:{element:"jSONReference",$visitor:br,fixedFields:{$ref:vr}},Media:{element:"media",$visitor:Jr,fixedFields:{binaryEncoding:{$ref:"#/visitors/value"},type:{$ref:"#/visitors/value"}}},LinkDescription:{element:"linkDescription",$visitor:Lr,fixedFields:{href:{$ref:"#/visitors/value"},rel:{$ref:"#/visitors/value"},title:{$ref:"#/visitors/value"},targetSchema:Br,mediaType:{$ref:"#/visitors/value"},method:{$ref:"#/visitors/value"},encType:{$ref:"#/visitors/value"},schema:Br}}}}}},_r=$t(qr),zr=e=>Object.entries(e).map(([e,t])=>Et(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(Dt,"fixedFields",{get:()=>zr(_r.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(Rt,"fixedFields",{get:()=>zr(_r.visitors.document.objects.JSONReference.fixedFields),enumerable:!0}),Object.defineProperty(Bt,"fixedFields",{get:()=>zr(_r.visitors.document.objects.Media.fixedFields),enumerable:!0}),Object.defineProperty(Jt,"fixedFields",{get:()=>zr(_r.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const Hr=class extends Dt{constructor(e,t,s){super(e,t,s),this.element="JSONSchemaDraft6"}get idField(){throw new p("id keyword from Core vocabulary has been renamed to $id.")}set idField(e){throw new p("id keyword from Core vocabulary has been renamed to $id.")}get $id(){return this.get("$id")}set $id(e){this.set("$id",e)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(e){this.set("exclusiveMaximum",e)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(e){this.set("exclusiveMinimum",e)}get containsField(){return this.get("contains")}set containsField(e){this.set("contains",e)}get itemsField(){return this.get("items")}set itemsField(e){this.set("items",e)}get propertyNames(){return this.get("propertyNames")}set propertyNames(e){this.set("propertyNames",e)}get const(){return this.get("const")}set const(e){this.set("const",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get examples(){return this.get("examples")}set examples(e){this.set("examples",e)}};const Vr=class extends Jt{get hrefSchema(){return this.get("hrefSchema")}set hrefSchema(e){this.set("hrefSchema",e)}get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get schema(){throw new p("schema keyword from Hyper-Schema vocabulary has been renamed to submissionSchema.")}set schema(e){throw new p("schema keyword from Hyper-Schema vocabulary has been renamed to submissionSchema.")}get submissionSchema(){return this.get("submissionSchema")}set submissionSchema(e){this.set("submissionSchema",e)}get method(){throw new p("method keyword from Hyper-Schema vocabulary has been removed.")}set method(e){throw new p("method keyword from Hyper-Schema vocabulary has been removed.")}get encType(){throw new p("encType keyword from Hyper-Schema vocabulary has been renamed to submissionEncType.")}set encType(e){throw new p("encType keyword from Hyper-Schema vocabulary has been renamed to submissionEncType.")}get submissionEncType(){return this.get("submissionEncType")}set submissionEncType(e){this.set("submissionEncType",e)}};var Ur=re(function e(t,s,n){if(0===t.length)return s;var r=t[0];if(t.length>1){var i=oe(r,n);(Q(i)||"object"!=typeof i)&&(i=ie(t[1])?[]:{}),s=e(Array.prototype.slice.call(t,1),s,i)}return function(e,t,s){if(ie(e)&&he(s)){var n=e<0?s.length+e:e,r=[].concat(s);return r[n]=t,r}var i={};for(var o in s)i[o]=s[o];return i[e]=t,i}(r,s,n)});const Gr=Ur;const Wr=re(function(e,t,s){var n=Array.prototype.slice.call(s,0);return n.splice(e,t),n});var Xr=re(function(e,t,s){return Gr([e],t,s)});const Kr=Xr;var Yr=g(function e(t,s){if(null==s)return s;switch(t.length){case 0:return s;case 1:return function(e,t){if(null==t)return t;if(ie(e)&&he(t))return Wr(e,1,t);var s={};for(var n in t)s[n]=t[n];return delete s[e],s}(t[0],s);default:var n=t[0],r=Array.prototype.slice.call(t,1);return null==s[n]?function(e,t){if(ie(e)&&he(t))return[].concat(t);var s={};for(var n in t)s[n]=t[n];return s}(n,s):Kr(n,e(r,s[n]),s)}});const Zr=Yr;const Qr=class extends ir{constructor(e){super(e),this.element=new Hr}get defaultDialectIdentifier(){return"http://json-schema.org/draft-06/schema#"}BooleanElement(e){this.enter(e),this.element.classes.push("boolean-json-schema")}handleSchemaIdentifier(e,t="$id"){return super.handleSchemaIdentifier(e,t)}};const ei=class extends cr{BooleanElement(e){this.element=this.toRefractedElement(["document","objects","JSONSchema"],e.node),e.stop()}};const ti=class extends Is{ArrayElement(e){this.enter(e),this.element.classes.push("json-schema-examples")}};const si=class extends Lr{constructor(e){super(e),this.element=new Vr}},ni=Fe(Gr(["visitors","document","objects","JSONSchema","element"],"jSONSchemaDraft6"),Gr(["visitors","document","objects","JSONSchema","$visitor"],Qr),Zr(["visitors","document","objects","JSONSchema","fixedFields","id"]),Gr(["visitors","document","objects","JSONSchema","fixedFields","$id"],{$ref:"#/visitors/value"}),Gr(["visitors","document","objects","JSONSchema","fixedFields","contains"],{$visitor:qr.visitors.JSONSchemaOrJSONReferenceVisitor,alias:"containsField"}),Gr(["visitors","document","objects","JSONSchema","fixedFields","items"],{$visitor:ei,alias:"itemsField"}),Gr(["visitors","document","objects","JSONSchema","fixedFields","propertyNames"],qr.visitors.JSONSchemaOrJSONReferenceVisitor),Gr(["visitors","document","objects","JSONSchema","fixedFields","const"],{$ref:"#/visitors/value"}),Gr(["visitors","document","objects","JSONSchema","fixedFields","examples"],ti),Gr(["visitors","document","objects","LinkDescription","$visitor"],si),Gr(["visitors","document","objects","LinkDescription","fixedFields","hrefSchema"],qr.visitors.JSONSchemaOrJSONReferenceVisitor),Zr(["visitors","document","objects","LinkDescription","fixedFields","schema"]),Gr(["visitors","document","objects","LinkDescription","fixedFields","submissionSchema"],qr.visitors.JSONSchemaOrJSONReferenceVisitor),Zr(["visitors","document","objects","LinkDescription","fixedFields","method"]),Zr(["visitors","document","objects","LinkDescription","fixedFields","encType"]),Gr(["visitors","document","objects","LinkDescription","fixedFields","submissionEncType"],{$ref:"#/visitors/value"}))(qr),ri=$t(ni),ii=e=>Object.entries(e).map(([e,t])=>Et(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(Hr,"fixedFields",{get:()=>ii(ri.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(Vr,"fixedFields",{get:()=>ii(ri.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const oi=class extends Hr{constructor(e,t,s){super(e,t,s),this.element="JSONSchemaDraft7"}get $comment(){return this.get("$comment")}set $comment(e){this.set("$comment",e)}get itemsField(){return this.get("items")}set itemsField(e){this.set("items",e)}get if(){return this.get("if")}set if(e){this.set("if",e)}get then(){return this.get("then")}set then(e){this.set("then",e)}get else(){return this.get("else")}set else(e){this.set("else",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get contentEncoding(){return this.get("contentEncoding")}set contentEncoding(e){this.set("contentEncoding",e)}get contentMediaType(){return this.get("contentMediaType")}set contentMediaType(e){this.set("contentMediaType",e)}get media(){throw new p('media keyword from Hyper-Schema vocabulary has been moved to validation vocabulary as "contentMediaType" / "contentEncoding"')}set media(e){throw new p('media keyword from Hyper-Schema vocabulary has been moved to validation vocabulary as "contentMediaType" / "contentEncoding"')}get writeOnly(){return this.get("writeOnly")}set writeOnly(e){this.set("writeOnly",e)}};const ci=class extends Vr{get anchor(){return this.get("anchor")}set anchor(e){this.set("anchor",e)}get anchorPointer(){return this.get("anchorPointer")}set anchorPointer(e){this.set("anchorPointer",e)}get templatePointers(){return this.get("templatePointers")}set templatePointers(e){this.set("templatePointers",e)}get templateRequired(){return this.get("templateRequired")}set templateRequired(e){this.set("templateRequired",e)}get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get mediaType(){throw new p("mediaType keyword from Hyper-Schema vocabulary has been renamed to targetMediaType.")}set mediaType(e){throw new p("mediaType keyword from Hyper-Schema vocabulary has been renamed to targetMediaType.")}get targetMediaType(){return this.get("targetMediaType")}set targetMediaType(e){this.set("targetMediaType",e)}get targetHints(){return this.get("targetHints")}set targetHints(e){this.set("targetHints",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get $comment(){return this.get("$comment")}set $comment(e){this.set("$comment",e)}get hrefSchema(){return this.get("hrefSchema")}set hrefSchema(e){this.set("hrefSchema",e)}get headerSchema(){return this.get("headerSchema")}set headerSchema(e){this.set("headerSchema",e)}get submissionSchema(){return this.get("submissionSchema")}set submissionSchema(e){this.set("submissionSchema",e)}get submissionEncType(){throw new p("submissionEncType keyword from Hyper-Schema vocabulary has been renamed to submissionMediaType.")}set submissionEncType(e){throw new p("submissionEncType keyword from Hyper-Schema vocabulary has been renamed to submissionMediaType.")}get submissionMediaType(){return this.get("submissionMediaType")}set submissionMediaType(e){this.set("submissionMediaType",e)}};const ai=class extends Qr{constructor(e){super(e),this.element=new oi}get defaultDialectIdentifier(){return"http://json-schema.org/draft-07/schema#"}};const li=class extends si{constructor(e){super(e),this.element=new ci}},ui=Fe(Gr(["visitors","document","objects","JSONSchema","element"],"jSONSchemaDraft7"),Gr(["visitors","document","objects","JSONSchema","$visitor"],ai),Gr(["visitors","document","objects","JSONSchema","fixedFields","$comment"],ni.visitors.value),Gr(["visitors","document","objects","JSONSchema","fixedFields","if"],ni.visitors.JSONSchemaOrJSONReferenceVisitor),Gr(["visitors","document","objects","JSONSchema","fixedFields","then"],ni.visitors.JSONSchemaOrJSONReferenceVisitor),Gr(["visitors","document","objects","JSONSchema","fixedFields","else"],ni.visitors.JSONSchemaOrJSONReferenceVisitor),Zr(["visitors","document","objects","JSONSchema","fixedFields","media"]),Gr(["visitors","document","objects","JSONSchema","fixedFields","contentEncoding"],ni.visitors.value),Gr(["visitors","document","objects","JSONSchema","fixedFields","contentMediaType"],ni.visitors.value),Gr(["visitors","document","objects","JSONSchema","fixedFields","writeOnly"],ni.visitors.value),Gr(["visitors","document","objects","LinkDescription","$visitor"],li),Gr(["visitors","document","objects","LinkDescription","fixedFields","anchor"],ni.visitors.value),Gr(["visitors","document","objects","LinkDescription","fixedFields","anchorPointer"],ni.visitors.value),Zr(["visitors","document","objects","LinkDescription","fixedFields","mediaType"]),Gr(["visitors","document","objects","LinkDescription","fixedFields","targetMediaType"],ni.visitors.value),Gr(["visitors","document","objects","LinkDescription","fixedFields","targetHints"],ni.visitors.value),Gr(["visitors","document","objects","LinkDescription","fixedFields","description"],ni.visitors.value),Gr(["visitors","document","objects","LinkDescription","fixedFields","$comment"],ni.visitors.value),Gr(["visitors","document","objects","LinkDescription","fixedFields","headerSchema"],ni.visitors.JSONSchemaOrJSONReferenceVisitor),Zr(["visitors","document","objects","LinkDescription","fixedFields","submissionEncType"]),Gr(["visitors","document","objects","LinkDescription","fixedFields","submissionMediaType"],ni.visitors.value))(ni),di=$t(ui),pi=e=>Object.entries(e).map(([e,t])=>Et(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(oi,"fixedFields",{get:()=>pi(di.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(ci,"fixedFields",{get:()=>pi(di.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const hi=class extends oi{constructor(e,t,s){super(e,t,s),this.element="JSONSchema201909"}get $vocabulary(){return this.get("$vocabulary")}set $vocabulary(e){this.set("$vocabulary",e)}get $anchor(){return this.get("$anchor")}set $anchor(e){this.set("$anchor",e)}get $recursiveAnchor(){return this.get("$recursiveAnchor")}set $recursiveAnchor(e){this.set("$recursiveAnchor",e)}get $recursiveRef(){return this.get("$recursiveRef")}set $recursiveRef(e){this.set("$recursiveRef",e)}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}get $defs(){return this.get("$defs")}set $defs(e){this.set("$defs",e)}get definitions(){throw new p("definitions keyword from Validation vocabulary has been renamed to $defs.")}set definitions(e){throw new p("definitions keyword from Validation vocabulary has been renamed to $defs.")}get not(){return this.get("not")}set not(e){this.set("not",e)}get if(){return this.get("if")}set if(e){this.set("if",e)}get then(){return this.get("then")}set then(e){this.set("then",e)}get else(){return this.get("else")}set else(e){this.set("else",e)}get dependentSchemas(){return this.get("dependentSchemas")}set dependentSchemas(e){this.set("dependentSchemas",e)}get dependencies(){throw new p("dependencies keyword from Validation vocabulary has been renamed to dependentSchemas.")}set dependencies(e){throw new p("dependencies keyword from Validation vocabulary has been renamed to dependentSchemas.")}get itemsField(){return this.get("items")}set itemsField(e){this.set("items",e)}get contains(){return this.get("contains")}set contains(e){this.set("contains",e)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(e){this.set("additionalProperties",e)}get additionalItems(){return this.get("additionalItems")}set additionalItems(e){this.set("additionalItems",e)}get propertyNames(){return this.get("propertyNames")}set propertyNames(e){this.set("propertyNames",e)}get unevaluatedItems(){return this.get("unevaluatedItems")}set unevaluatedItems(e){this.set("unevaluatedItems",e)}get unevaluatedProperties(){return this.get("unevaluatedProperties")}set unevaluatedProperties(e){this.set("unevaluatedProperties",e)}get maxContains(){return this.get("maxContains")}set maxContains(e){this.set("maxContains",e)}get minContains(){return this.get("minContains")}set minContains(e){this.set("minContains",e)}get dependentRequired(){return this.get("dependentRequired")}set dependentRequired(e){this.set("dependentRequired",e)}get deprecated(){return this.get("deprecated")}set deprecated(e){this.set("deprecated",e)}get contentSchema(){return this.get("contentSchema")}set contentSchema(e){this.set("contentSchema",e)}};const mi=class extends ci{constructor(e,t,s){super(e,t,s),this.element="linkDescription"}get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get hrefSchema(){return this.get("hrefSchema")}set hrefSchema(e){this.set("hrefSchema",e)}get headerSchema(){return this.get("headerSchema")}set headerSchema(e){this.set("headerSchema",e)}get submissionSchema(){return this.get("submissionSchema")}set submissionSchema(e){this.set("submissionSchema",e)}};const fi=class extends ai{constructor(e){super(e),this.element=new hi}get defaultDialectIdentifier(){return"https://json-schema.org/draft/2019-09/schema"}ObjectElement(e){const t=e.node;this.handleDialectIdentifier(t),this.handleSchemaIdentifier(t),this.parent=this.element,Sn.prototype.ObjectElement.call(this,e),Vt(this.element.$ref)&&(this.element.classes.push("reference-element"),this.element.meta.set("referenced-element","schema"))}};const yi=class extends Is{ObjectElement(e){this.enter(e),this.element.classes.push("json-schema-$vocabulary")}};const gi=class extends Is{StringElement(e){this.enter(e),this.element.classes.push("reference-value")}},xi=Ln(vn,Vn,Is),bi=Ln(Hn,Vn,Is);const vi=class extends bi{constructor(e){super(e),this.element=new H,this.element.classes.push("json-schema-$defs"),this.specPath=Ps(["document","objects","JSONSchema"])}};const Si=class extends xi{constructor(e){super(e),this.element=new zt,this.element.classes.push("json-schema-allOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","JSONSchema"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const wi=class extends xi{constructor(e){super(e),this.element=new zt,this.element.classes.push("json-schema-anyOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","JSONSchema"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Ei=class extends xi{constructor(e){super(e),this.element=new zt,this.element.classes.push("json-schema-oneOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","JSONSchema"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Oi=class extends bi{constructor(e){super(e),this.element=new H,this.element.classes.push("json-schema-dependentSchemas"),this.specPath=Ps(["document","objects","JSONSchema"])}};const ki=class extends xi{ObjectElement(e){this.element=this.toRefractedElement(["document","objects","JSONSchema"],e.node),e.stop()}ArrayElement(e){const t=e.node;this.element=new zt,this.element.classes.push("json-schema-items"),t.forEach(e=>{const t=this.toRefractedElement(["document","objects","JSONSchema"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}BooleanElement(e){this.element=this.toRefractedElement(["document","objects","JSONSchema"],e.node),e.stop()}};const Ai=class extends bi{constructor(e){super(e),this.element=new H,this.element.classes.push("json-schema-properties"),this.specPath=Ps(["document","objects","JSONSchema"])}};const ji=class extends bi{constructor(e){super(e),this.element=new H,this.element.classes.push("json-schema-patternProperties"),this.specPath=Ps(["document","objects","JSONSchema"])}};const Fi=class extends Is{ObjectElement(e){this.enter(e),this.element.classes.push("json-schema-dependentRequired")}};const Ii=class extends li{constructor(e){super(e),this.element=new mi}},Pi=Fe(Gr(["visitors","document","objects","JSONSchema","element"],"jSONSchema201909"),Gr(["visitors","document","objects","JSONSchema","$visitor"],fi),Gr(["visitors","document","objects","JSONSchema","fixedFields","$vocabulary"],yi),Gr(["visitors","document","objects","JSONSchema","fixedFields","$anchor"],ui.visitors.value),Gr(["visitors","document","objects","JSONSchema","fixedFields","$recursiveAnchor"],ui.visitors.value),Gr(["visitors","document","objects","JSONSchema","fixedFields","$recursiveRef"],ui.visitors.value),Zr(["visitors","document","objects","JSONReference","$visitor"]),Gr(["visitors","document","objects","JSONSchema","fixedFields","$ref"],gi),Zr(["visitors","document","objects","JSONSchema","fixedFields","definitions"]),Gr(["visitors","document","objects","JSONSchema","fixedFields","$defs"],vi),Gr(["visitors","document","objects","JSONSchema","fixedFields","allOf"],Si),Gr(["visitors","document","objects","JSONSchema","fixedFields","anyOf"],wi),Gr(["visitors","document","objects","JSONSchema","fixedFields","oneOf"],Ei),Gr(["visitors","document","objects","JSONSchema","fixedFields","not"],fi),Gr(["visitors","document","objects","JSONSchema","fixedFields","if"],fi),Gr(["visitors","document","objects","JSONSchema","fixedFields","then"],fi),Gr(["visitors","document","objects","JSONSchema","fixedFields","else"],fi),Zr(["visitors","document","objects","JSONSchema","fixedFields","dependencies"]),Gr(["visitors","document","objects","JSONSchema","fixedFields","dependentSchemas"],Oi),Gr(["visitors","document","objects","JSONSchema","fixedFields","items"],{$visitor:ki,alias:"itemsField"}),Gr(["visitors","document","objects","JSONSchema","fixedFields","contains"],fi),Gr(["visitors","document","objects","JSONSchema","fixedFields","properties"],Ai),Gr(["visitors","document","objects","JSONSchema","fixedFields","patternProperties"],ji),Gr(["visitors","document","objects","JSONSchema","fixedFields","additionalProperties"],fi),Gr(["visitors","document","objects","JSONSchema","fixedFields","additionalItems"],fi),Gr(["visitors","document","objects","JSONSchema","fixedFields","propertyNames"],fi),Gr(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedItems"],fi),Gr(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedProperties"],fi),Gr(["visitors","document","objects","JSONSchema","fixedFields","maxContains"],ui.visitors.value),Gr(["visitors","document","objects","JSONSchema","fixedFields","minContains"],ui.visitors.value),Gr(["visitors","document","objects","JSONSchema","fixedFields","dependentRequired"],Fi),Gr(["visitors","document","objects","JSONSchema","fixedFields","deprecated"],ui.visitors.value),Gr(["visitors","document","objects","JSONSchema","fixedFields","contentSchema"],fi),Gr(["visitors","document","objects","LinkDescription","element"],"linkDescription"),Gr(["visitors","document","objects","LinkDescription","$visitor"],Ii),Gr(["visitors","document","objects","LinkDescription","fixedFields","targetSchema"],fi),Gr(["visitors","document","objects","LinkDescription","fixedFields","hrefSchema"],fi),Gr(["visitors","document","objects","LinkDescription","fixedFields","headerSchema"],fi),Gr(["visitors","document","objects","LinkDescription","fixedFields","submissionSchema"],fi))(ui),Ci=$t(Pi),Ti=e=>Object.entries(e).map(([e,t])=>Et(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(hi,"fixedFields",{get:()=>Ti(Ci.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(mi,"fixedFields",{get:()=>Ti(Ci.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const Mi=class extends hi{constructor(e,t,s){super(e,t,s),this.element="JSONSchema202012"}get $dynamicAnchor(){return this.get("$dynamicAnchor")}set $dynamicAnchor(e){this.set("$dynamicAnchor",e)}get $recursiveAnchor(){throw new p("$recursiveAnchor keyword from Core vocabulary has been renamed to $dynamicAnchor.")}set $recursiveAnchor(e){throw new p("$recursiveAnchor keyword from Core vocabulary has been renamed to $dynamicAnchor.")}get $dynamicRef(){return this.get("$dynamicRef")}set $dynamicRef(e){this.set("$dynamicRef",e)}get $recursiveRef(){throw new p("$recursiveRef keyword from Core vocabulary has been renamed to $dynamicRef.")}set $recursiveRef(e){throw new p("$recursiveRef keyword from Core vocabulary has been renamed to $dynamicRef.")}get prefixItems(){return this.get("prefixItems")}set prefixItems(e){this.set("prefixItems",e)}};const Ni=class extends mi{get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get hrefSchema(){return this.get("hrefSchema")}set hrefSchema(e){this.set("hrefSchema",e)}get headerSchema(){return this.get("headerSchema")}set headerSchema(e){this.set("headerSchema",e)}get submissionSchema(){return this.get("submissionSchema")}set submissionSchema(e){this.set("submissionSchema",e)}};const $i=class extends fi{constructor(e){super(e),this.element=new Mi}get defaultDialectIdentifier(){return"https://json-schema.org/draft/2020-12/schema"}};const Di=class extends xi{constructor(e){super(e),this.element=new zt,this.element.classes.push("json-schema-prefixItems")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","JSONSchema"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Ri=class extends Ii{constructor(e){super(e),this.element=new Ni}},Bi=Fe(Gr(["visitors","document","objects","JSONSchema","element"],"jSONSchema202012"),Gr(["visitors","document","objects","JSONSchema","$visitor"],$i),Zr(["visitors","document","objects","JSONSchema","fixedFields","$recursiveAnchor"]),Gr(["visitors","document","objects","JSONSchema","fixedFields","$dynamicAnchor"],Pi.visitors.value),Zr(["visitors","document","objects","JSONSchema","fixedFields","$recursiveRef"]),Gr(["visitors","document","objects","JSONSchema","fixedFields","$dynamicRef"],Pi.visitors.value),Gr(["visitors","document","objects","JSONSchema","fixedFields","not"],$i),Gr(["visitors","document","objects","JSONSchema","fixedFields","if"],$i),Gr(["visitors","document","objects","JSONSchema","fixedFields","then"],$i),Gr(["visitors","document","objects","JSONSchema","fixedFields","else"],$i),Gr(["visitors","document","objects","JSONSchema","fixedFields","prefixItems"],Di),Gr(["visitors","document","objects","JSONSchema","fixedFields","items"],$i),Gr(["visitors","document","objects","JSONSchema","fixedFields","contains"],$i),Gr(["visitors","document","objects","JSONSchema","fixedFields","additionalProperties"],$i),Zr(["visitors","document","objects","JSONSchema","fixedFields","additionalItems"]),Gr(["visitors","document","objects","JSONSchema","fixedFields","propertyNames"],$i),Gr(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedItems"],$i),Gr(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedProperties"],$i),Gr(["visitors","document","objects","JSONSchema","fixedFields","contentSchema"],$i),Gr(["visitors","document","objects","LinkDescription","element"],"linkDescription"),Gr(["visitors","document","objects","LinkDescription","$visitor"],Ri),Gr(["visitors","document","objects","LinkDescription","fixedFields","targetSchema"],$i),Gr(["visitors","document","objects","LinkDescription","fixedFields","hrefSchema"],$i),Gr(["visitors","document","objects","LinkDescription","fixedFields","headerSchema"],$i),Gr(["visitors","document","objects","LinkDescription","fixedFields","submissionSchema"],$i))(Pi),Ji=$t(Bi),Li=e=>Object.entries(e).map(([e,t])=>Et(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(Mi,"fixedFields",{get:()=>Li(Ji.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(Ni,"fixedFields",{get:()=>Li(Ji.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const qi=class extends Mi{};const _i=class extends H{constructor(e,t,s){super(e,t,s),this.element="parameter"}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 value(){return this.get("value")}set value(e){this.set("value",e)}};const zi=class extends H{constructor(e,t,s){super(e,t,s),this.element="payloadReplacement"}get target(){return this.get("target")}set target(e){this.set("target",e)}get value(){return this.get("value")}set value(e){this.set("value",e)}};const Hi=class extends H{constructor(e,t,s){super(e,t,s),this.element="requestBody"}get contentType(){return this.get("contentType")}set contentType(e){this.set("contentType",e)}get payload(){return this.get("payload")}set payload(e){this.set("payload",e)}get replacements(){return this.get("replacements")}set replacements(e){this.set("replacements",e)}};const Vi=class extends H{constructor(e,t,s){super(e,t,s),this.element="reusable",this.classes.push("arazzo-reference")}get reference(){return this.get("reference")}set reference(e){this.set("reference",e)}get value(){return this.get("value")}set value(e){this.set("value",e)}};const Ui=class extends H{constructor(e,t,s){super(e,t,s),this.element="sourceDescription"}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 type(){return this.get("type")}set type(e){this.set("type",e)}};const Gi=class extends H{constructor(e,t,s){super(e,t,s),this.element="step"}get description(){return this.get("description")}set description(e){this.set("description",e)}get stepId(){return this.get("stepId")}set stepId(e){this.set("stepId",e)}get operationId(){return this.get("operationId")}set operationId(e){this.set("operationId",e)}get operationPath(){return this.get("operationPath")}set operationPath(e){this.set("operationPath",e)}get workflowId(){return this.get("workflowId")}set workflowId(e){this.set("workflowId",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}get requestBody(){return this.get("requestBody")}set requestBody(e){this.set("requestBody",e)}get successCriteria(){return this.get("successCriteria")}set successCriteria(e){this.set("successCriteria",e)}get onSuccess(){return this.get("onSuccess")}set onSuccess(e){this.set("onSuccess",e)}get onFailure(){return this.get("onFailure")}set onFailure(e){this.set("onFailure",e)}get outputs(){return this.get("outputs")}set outputs(e){this.set("outputs",e)}};const Wi=class extends H{constructor(e,t,s){super(e,t,s),this.element="successAction"}get name(){return this.get("name")}set name(e){this.set("name",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}get workflowId(){return this.get("workflowId")}set workflowId(e){this.set("workflowId",e)}get stepId(){return this.get("stepId")}set stepId(e){this.set("stepId",e)}get criteria(){return this.get("criteria")}set criteria(e){this.set("criteria",e)}};const Xi=class extends H{constructor(e,t,s){super(e,t,s),this.element="workflow"}get workflowId(){return this.get("workflowId")}set workflowId(e){this.set("workflowId",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)}get inputs(){return this.get("inputs")}set inputs(e){this.set("inputs",e)}get dependsOn(){return this.get("dependsOn")}set dependsOn(e){this.set("dependsOn",e)}get steps(){return this.get("steps")}set steps(e){this.set("steps",e)}get successActions(){return this.get("successActions")}set successActions(e){this.set("successActions",e)}get failureActions(){return this.get("failureActions")}set failureActions(e){this.set("failureActions",e)}get outputs(){return this.get("outputs")}set outputs(e){this.set("outputs",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}},Ki={namespace:e=>{const{base:t}=e;return t.register("arazzo",L),t.register("arazzoSpecification1",V),t.register("components",U),t.register("criterion",G),t.register("criterionExpressionType",W),t.register("failureAction",X),t.register("info",K),t.register("parameter",_i),t.register("payloadReplacement",zi),t.register("requestBody",Hi),t.register("reusable",Vi),t.register("sourceDescription",Ui),t.register("step",Gi),t.register("successAction",Wi),t.register("workflow",Xi),t.register("jSONSchema202012",qi),t}},Yi={ArazzoSpecification1Element:{info:(e,t,s)=>new K(e,t,s)}},Zi=(e,t)=>{const s=cn(e),n=Yi[s]||Yi[ws(e.classes.first)];if(void 0!==n)return Object.hasOwn(n,"[key: *]")?n["[key: *]"]:n[t]},Qi=()=>()=>({visitor:{StringElement(e){const t=e.node;if(!(e=>Vt(e)&&Qt(e,["yaml-e-node","yaml-e-scalar"]))(t))return;const s=e.getAncestorNodes().filter(Ht),n=s.at(0);let r,i;if(Xt(n)?(i=t,r=Zi(n,"<*>")):Yt(n)&&(i=s.at(1),r=Zi(i,ws(n.key))),"function"!=typeof r)return;const o=r(void 0,ds(t.meta),ds(t.attributes));rs.transfer(t,o),e.replaceWith(o)}}});const eo=re(function(e,t,s){var n,r={};for(n in s=s||{},t=t||{})v(n,t)&&(r[n]=v(n,s)?e(n,t[n],s[n]):t[n]);for(n in s)v(n,s)&&!v(n,r)&&(r[n]=s[n]);return r});const to=re(function e(t,s,n){return eo(function(s,n,r){return Re(n)&&Re(r)?e(t,n,r):t(s,n,r)},s,n)});const so=g(function(e,t){return to(function(e,t,s){return s},e,t)});const no=re(function(e,t,s){return Cs(e,ce(t,s))});const ro=Ae(0,-1);const io=g(function(e,t){return e.apply(this,t)});const oo=lt(bt);const co=ct(Pr,Rs);const ao=st(3,function(e,t,s){var n=ue(e,s),r=ue(ro(e),s);if(!oo(n)&&!co(e)){var i=be(n,r);return io(i,t)}});const lo=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 rs)){const s=rs.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]))})}},uo=e=>null===e,po=e=>"string"==typeof e,ho=e=>"number"==typeof e,mo=e=>"boolean"==typeof e,fo=e=>null!==e&&"object"==typeof e;class yo{elementMap={};elementDetection=[];Element;KeyValuePair;_elements;_attributeElementKeys=[];_attributeElementArrayKeys=[];constructor(e){this.Element=B,this.KeyValuePair=N,e&&e.noDefault||this.useDefault()}use(e){return e.namespace&&e.namespace({base:this}),e.load&&e.load({base:this}),this}useDefault(){return this.register("null",qt).register("string",J).register("number",Lt).register("boolean",_t).register("array",zt).register("object",H).register("member",z).register("ref",ys).register("link",fs).register("sourceMap",rs),this.detect(uo,qt,!1).detect(po,J,!1).detect(ho,Lt,!1).detect(mo,_t,!1).detect(Array.isArray,zt,!1).detect(fo,H,!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 lo(this)}}lo.prototype.Namespace=yo;const go=yo,xo=new go,bo={isElement:Ht,isStringElement:Vt,isNumberElement:Ut,isNullElement:Gt,isBooleanElement:Wt,isArrayElement:Xt,isObjectElement:Kt,isMemberElement:Yt,isPrimitiveElement:e=>Kt(e)&&"object"===e.element||Xt(e)&&"array"===e.element||Wt(e)&&"boolean"===e.element||Ut(e)&&"number"===e.element||Vt(e)&&"string"===e.element||Gt(e)&&"null"===e.element||Yt(e)&&"member"===e.element,isLinkElement:vs,isRefElement:Ss,isAnnotationElement:e=>e instanceof gs,isCommentElement:e=>e instanceof xs,isParseResultElement:e=>e instanceof bs,isSourceMapElement:e=>e instanceof rs,hasElementSourceMap:Zt,includesSymbols:(e,t)=>{if(0===t.length)return!0;if(!e.hasAttributesProperty("symbols"))return!1;const s=e.attributes.get("symbols");return!!Xt(s)&&t.every(e=>s.includes(e))},includesClasses:Qt},vo={toolboxCreator:()=>({predicates:bo,namespace:xo}),visitorOptions:{exposeEdits:!0}},So=(e,t,s={})=>{if(0===t.length)return e;const n=so(vo,s),{toolboxCreator:r,visitorOptions:i}=n,o=r(),c=t.map(e=>e(o)),a=mn(c.map(no({},"visitor")),i);c.forEach(ao(["pre"],[]));const l=xn(e,a);return c.forEach(ao(["post"],[])),l};function wo(e){return void 0===e?new qt:Eo(e)}function Eo(e){if(e instanceof B)return e;if("string"==typeof e)return new J(e);if("number"==typeof e)return new Lt(e);if("boolean"==typeof e)return new _t(e);if(null===e)return new qt;if(Array.isArray(e))return new zt(e.map(wo));if("object"==typeof e)return new H(e);throw new Error("Cannot refract value of type "+typeof e)}So[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,s={})=>{if(0===t.length)return e;const n=so(vo,s),{toolboxCreator:r,visitorOptions:i}=n,o=r(),c=t.map(e=>e(o)),a=fn(c.map(no({},"visitor")),i);await Promise.allSettled(c.map(ao(["pre"],[])));const l=await bn(e,a);return await Promise.allSettled(c.map(ao(["post"],[]))),l},B.prototype.ObjectElement=H,B.prototype.ArrayElement=zt,B.prototype.RefElement=ys,B.prototype.MemberElement=z,B.prototype.refract=Eo;const Oo=class{element;constructor(e={}){Object.assign(this,e)}copyMetaAndAttributes(e,t){if(!e.isMetaEmpty||!t.isMetaEmpty){const s=t.isMetaEmpty?new H:t.meta,n=e.isMetaEmpty?new H:e.meta;t.meta=js(s,n)}if(!e.isAttributesEmpty||!t.isAttributesEmpty){const s=t.isAttributesEmpty?new H:t.attributes,n=e.isAttributesEmpty?new H:e.attributes;t.attributes=js(s,n)}rs.transfer(e,t)}};const ko=class extends Oo{enter(e){this.element=ds(e.node),e.stop()}};const Ao=class extends Oo{specObj;passingOptionsNames=["specObj"];constructor({specObj:e,...t}){super({...t}),this.specObj=e}retrievePassingOptions(){return zs(this.passingOptionsNames,this)}retrieveFixedFields(e){const t=ue(["visitors",...e,"fixedFields"],this.specObj);return"object"==typeof t&&null!==t?Object.keys(t):[]}retrieveVisitor(e){return Ge(bt,["visitors",...e],this.specObj)?ue(["visitors",...e],this.specObj):ue(["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 ko&&n?.constructor===ko?ds(t):(xn(t,n,s),n.element)}};var jo=function(){function e(e,t){this.xf=t,this.n=e,this.i=0}return e.prototype["@@transducer/init"]=Be,e.prototype["@@transducer/result"]=Je,e.prototype["@@transducer/step"]=function(e,t){this.i+=1;var s=0===this.n?e:this.xf["@@transducer/step"](e,t);return this.n>=0&&this.i>=this.n?jr(s):s},e}();function Fo(e){return function(t){return new jo(e,t)}}const Io=g(De(["take"],Fo,function(e,t){return Ae(0,e<0?1/0:e,t)}));const Po=g(function(e,t){return M(Io(e.length,t),e)}),Co=e=>Vt(e.key)&&Po("x-",ws(e.key)),To=e=>Kt(e)&&e.hasKey("reference");const Mo=class extends Ao{specPath;ignoredFields;canSupportSpecificationExtensions=!0;specificationExtensionPredicate=Co;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)=>{if(Vt(t)&&n.includes(ws(t))&&!this.ignoredFields.includes(ws(t))){const n=this.toRefractedElement([...s,"fixedFields",ws(t)],e),i=new z(ds(t),n);this.copyMetaAndAttributes(r,i),i.classes.push("fixed-field"),this.element.push(i)}else if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(r)){const e=this.toRefractedElement(["document","extension"],r);this.element.push(e)}else this.ignoredFields.includes(ws(t))||this.element.push(ds(r))}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const No=class extends Ao{specPath;ignoredFields;fieldPatternPredicate=_n;canSupportSpecificationExtensions=!1;specificationExtensionPredicate=Co;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)=>{if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(s)){const e=this.toRefractedElement(["document","extension"],s);this.element.push(e)}else if(!this.ignoredFields.includes(ws(t))&&this.fieldPatternPredicate(ws(t))){const n=this.specPath(e),r=this.toRefractedElement(n,e),i=new z(ds(t),r);this.copyMetaAndAttributes(s,i),i.classes.push("patterned-field"),this.element.push(i)}else this.ignoredFields.includes(ws(t))||this.element.push(ds(s))}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const $o=class extends No{constructor(e){super(e),this.fieldPatternPredicate=_s}},Do=Ln(Ao,ko),Ro=Ln(Mo,ko),Bo=Ln($o,ko);const Jo=class extends Ro{element;specPath;canSupportSpecificationExtensions;constructor(e){super(e),this.element=new V,this.specPath=Ps(["document","objects","ArazzoSpecification"]),this.canSupportSpecificationExtensions=!0}ObjectElement(e){return Mo.prototype.ObjectElement.call(this,e)}};const Lo=class extends Do{StringElement(e){const t=e.node,s=new L(ws(t));this.copyMetaAndAttributes(t,s),this.element=s,e.stop()}};class qo extends zt{static primaryClass="source-descriptions";constructor(e,t,s){super(e,t,s),this.classes.push(qo.primaryClass)}}const _o=qo;const zo=class extends Do{element;constructor(e){super(e),this.element=new _o}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","SourceDescription"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};class Ho extends zt{static primaryClass="workflows";constructor(e,t,s){super(e,t,s),this.classes.push(Ho.primaryClass)}}const Vo=Ho;const Uo=class extends Do{element;constructor(e){super(e),this.element=new Vo}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","Workflow"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Go=class extends Ro{constructor(e){super(e),this.element=new K,this.specPath=Ps(["document","objects","Info"]),this.canSupportSpecificationExtensions=!0}};const Wo=class extends ko{StringElement(e){super.enter(e),this.element.classes.push("arazzo-version"),this.element.classes.push("version")}};const Xo=class extends Ro{constructor(e){super(e),this.element=new Ui,this.specPath=Ps(["document","objects","SourceDescription"]),this.canSupportSpecificationExtensions=!0}};const Ko=class extends ko{StringElement(e){super.enter(e),this.element.classes.push("source-description-url")}};const Yo=class extends Ro{constructor(e){super(e),this.element=new Xi,this.specPath=Ps(["document","objects","Workflow"]),this.canSupportSpecificationExtensions=!0}};class Zo extends zt{static primaryClass="workflow-depends-on";constructor(e,t,s){super(e,t,s),this.classes.push(Zo.primaryClass)}}const Qo=Zo;const ec=class extends Do{element;constructor(e){super(e),this.element=new Qo}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["value"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};class tc extends zt{static primaryClass="workflow-steps";constructor(e,t,s){super(e,t,s),this.classes.push(tc.primaryClass)}}const sc=tc;const nc=class extends Do{constructor(e){super(e),this.element=new sc}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","Step"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};class rc extends zt{static primaryClass="workflow-success-actions";constructor(e,t,s){super(e,t,s),this.classes.push(rc.primaryClass)}}const ic=rc,oc=e=>e instanceof Mi;class cc extends H{static primaryClass="components-failure-actions";constructor(e,t,s){super(e,t,s),this.classes.push(cc.primaryClass)}}const ac=cc;class lc extends H{static primaryClass="components-inputs";constructor(e,t,s){super(e,t,s),this.classes.push(lc.primaryClass)}}const uc=lc;class dc extends H{static primaryClass="components-parameters";constructor(e,t,s){super(e,t,s),this.classes.push(dc.primaryClass),this.classes.push("parameters")}}const pc=dc;class hc extends H{static primaryClass="components-success-actions";constructor(e,t,s){super(e,t,s),this.classes.push(hc.primaryClass)}}const mc=hc;class fc extends zt{static primaryClass="failure-action-criteria";constructor(e,t,s){super(e,t,s),this.classes.push(fc.primaryClass),this.classes.push("criteria")}}const yc=fc;class gc extends zt{static primaryClass="request-body-replacements";constructor(e,t,s){super(e,t,s),this.classes.push(gc.primaryClass)}}const xc=gc;class bc extends zt{static primaryClass="step-depends-on";constructor(e,t,s){super(e,t,s),this.classes.push(bc.primaryClass)}}const vc=bc;class Sc extends zt{static primaryClass="step-on-failure";constructor(e,t,s){super(e,t,s),this.classes.push(Sc.primaryClass)}}const wc=Sc;class Ec extends zt{static primaryClass="step-on-success";constructor(e,t,s){super(e,t,s),this.classes.push(Ec.primaryClass)}}const Oc=Ec;class kc extends H{static primaryClass="step-outputs";constructor(e,t,s){super(e,t,s),this.classes.push(kc.primaryClass)}}const Ac=kc;class jc extends zt{static primaryClass="step-parameters";constructor(e,t,s){super(e,t,s),this.classes.push(jc.primaryClass),this.classes.push("parameters")}}const Fc=jc;class Ic extends zt{static primaryClass="step-success-criteria";constructor(e,t,s){super(e,t,s),this.classes.push(Ic.primaryClass),this.classes.push("criteria")}}const Pc=Ic;class Cc extends zt{static primaryClass="success-action-criteria";constructor(e,t,s){super(e,t,s),this.classes.push(Cc.primaryClass),this.classes.push("criteria")}}const Tc=Cc;class Mc extends zt{static primaryClass="workflow-failure-actions";constructor(e,t,s){super(e,t,s),this.classes.push(Mc.primaryClass)}}const Nc=Mc;class $c extends H{static primaryClass="workflow-outputs";constructor(e,t,s){super(e,t,s),this.classes.push($c.primaryClass)}}const Dc=$c;class Rc extends zt{static primaryClass="workflow-parameters";constructor(e,t,s){super(e,t,s),this.classes.push(Rc.primaryClass),this.classes.push("parameters")}}const Bc=Rc,Jc=e=>e instanceof L,Lc=e=>e instanceof V,qc=e=>e instanceof U,_c=e=>e instanceof G,zc=e=>e instanceof W,Hc=e=>e instanceof X,Vc=e=>e instanceof K,Uc=e=>e instanceof _i,Gc=e=>e instanceof zi,Wc=e=>e instanceof Hi,Xc=e=>e instanceof Vi,Kc=e=>e instanceof Ui,Yc=e=>e instanceof Gi,Zc=e=>e instanceof Wi,Qc=e=>e instanceof Xi,ea=e=>e instanceof ac,ta=e=>e instanceof uc,sa=e=>e instanceof pc,na=e=>e instanceof mc,ra=e=>e instanceof yc,ia=e=>e instanceof xc,oa=e=>e instanceof _o,ca=e=>e instanceof vc,aa=e=>e instanceof wc,la=e=>e instanceof Oc,ua=e=>e instanceof Ac,da=e=>e instanceof Fc,pa=e=>e instanceof Pc,ha=e=>e instanceof Tc,ma=e=>e instanceof Qo,fa=e=>e instanceof Nc,ya=e=>e instanceof Dc,ga=e=>e instanceof Bc,xa=e=>e instanceof Vo,ba=e=>e instanceof sc,va=e=>e instanceof ic;const Sa=class extends Do{constructor(e){super(e),this.element=new ic}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=To(e)?["document","objects","Reusable"]:["document","objects","SuccessAction"],s=this.toRefractedElement(t,e);Xc(s)&&s.meta.set("referenced-element","successAction"),this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const wa=class extends Do{constructor(e){super(e),this.element=new Nc}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=To(e)?["document","objects","Reusable"]:["document","objects","FailureAction"],s=this.toRefractedElement(t,e);Xc(s)&&s.meta.set("referenced-element","failureAction"),this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Ea=class extends Bo{constructor(e){super(e),this.element=new Dc,this.specPath=Ps(["value"])}};const Oa=class extends Do{constructor(e){super(e),this.element=new Bc}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=To(e)?["document","objects","Reusable"]:["document","objects","Parameter"],s=this.toRefractedElement(t,e);Xc(s)&&s.meta.set("referenced-element","parameter"),this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const ka=class extends Ro{constructor(e){super(e),this.element=new Gi,this.specPath=Ps(["document","objects","Step"]),this.canSupportSpecificationExtensions=!0}};const Aa=class extends Do{constructor(e){super(e),this.element=new Fc}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=To(e)?["document","objects","Reusable"]:["document","objects","Parameter"],s=this.toRefractedElement(t,e);Xc(s)&&s.meta.set("referenced-element","parameter"),this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const ja=class extends Do{constructor(e){super(e),this.element=new Pc}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","Criterion"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Fa=class extends Do{constructor(e){super(e),this.element=new Oc}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=To(e)?["document","objects","Reusable"]:["document","objects","SuccessAction"],s=this.toRefractedElement(t,e);Xc(s)&&s.meta.set("referenced-element","successAction"),this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Ia=class extends Do{constructor(e){super(e),this.element=new wc}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=To(e)?["document","objects","Reusable"]:["document","objects","FailureAction"],s=this.toRefractedElement(t,e);Xc(s)&&s.meta.set("referenced-element","failureAction"),this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Pa=class extends Bo{constructor(e){super(e),this.element=new Ac,this.specPath=Ps(["value"])}};const Ca=class extends Ro{constructor(e){super(e),this.element=new _i,this.specPath=Ps(["document","objects","Parameter"]),this.canSupportSpecificationExtensions=!0}};const Ta=class extends Ro{constructor(e){super(e),this.element=new Wi,this.specPath=Ps(["document","objects","SuccessAction"]),this.canSupportSpecificationExtensions=!0}};const Ma=class extends Do{element;constructor(e){super(e),this.element=new Tc}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","Criterion"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Na=class extends Ro{constructor(e){super(e),this.element=new X,this.specPath=Ps(["document","objects","FailureAction"]),this.canSupportSpecificationExtensions=!0}};const $a=class extends Do{element;constructor(e){super(e),this.element=new yc}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","Criterion"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Da=class extends Ro{constructor(e){super(e),this.element=new U,this.specPath=Ps(["document","objects","Components"]),this.canSupportSpecificationExtensions=!0}};const Ra=class extends Bo{constructor(e){super(e),this.element=new uc,this.specPath=Ps(["document","objects","JSONSchema"]),this.fieldPatternPredicate=e=>/^[a-zA-Z0-9.\-_]+$/.test(String(e))}};const Ba=class extends Bo{constructor(e){super(e),this.element=new pc,this.specPath=Ps(["document","objects","Parameter"]),this.fieldPatternPredicate=e=>/^[a-zA-Z0-9.\-_]+$/.test(String(e))}};const Ja=class extends Bo{constructor(e){super(e),this.element=new mc,this.specPath=Ps(["document","objects","SuccessAction"]),this.fieldPatternPredicate=e=>/^[a-zA-Z0-9.\-_]+$/.test(String(e))}};const La=class extends Bo{constructor(e){super(e),this.element=new ac,this.specPath=Ps(["document","objects","FailureAction"]),this.fieldPatternPredicate=e=>/^[a-zA-Z0-9.\-_]+$/.test(String(e))}};const qa=class extends Ro{constructor(e){super(e),this.element=new Vi,this.specPath=Ps(["document","objects","Reusable"]),this.canSupportSpecificationExtensions=!1}ObjectElement(e){const t=Mo.prototype.ObjectElement.call(this,e);return Vt(this.element.reference)&&this.element.classes.push("reference-element"),t}};const _a=class extends ko{StringElement(e){super.enter(e),this.element.classes.push("reference-value")}};const za=class extends Ro{constructor(e){super(e),this.element=new G,this.specPath=Ps(["document","objects","Criterion"]),this.canSupportSpecificationExtensions=!0}};const Ha=class extends Do{ObjectElement(e){const t=e.node;return this.toRefractedElement(["document","objects","CriterionExpressionType"],t)}};const Va=class extends Ro{constructor(e){super(e),this.element=new W,this.specPath=Ps(["document","objects","CriterionExpressionType"]),this.canSupportSpecificationExtensions=!0}};const Ua=class extends ko{StringElement(e){super.enter(e),this.element.classes.push("version")}};const Ga=class extends Ro{constructor(e){super(e),this.element=new Hi,this.specPath=Ps(["document","objects","RequestBody"]),this.canSupportSpecificationExtensions=!0}};const Wa=class extends Do{element;constructor(e){super(e),this.element=new xc}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","PayloadReplacement"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Xa=class extends Ro{constructor(e){super(e),this.element=new zi,this.specPath=Ps(["document","objects","PayloadReplacement"]),this.canSupportSpecificationExtensions=!0}};const Ka=class extends $i{constructor(e){super(e),this.element=new qi}};const Ya=class extends Ao{MemberElement(e){const t=e.node;this.element=ds(t),this.element.classes.push("specification-extension"),e.stop()}},{JSONSchema:{fixedFields:Za}}=Bi.visitors.document.objects,Qa={visitors:{value:ko,document:{objects:{ArazzoSpecification:{element:"arazzoSpecification1",$visitor:Jo,fixedFields:{arazzo:{element:"arazzo",$visitor:Lo},info:{$ref:"#/visitors/document/objects/Info"},sourceDescriptions:zo,workflows:Uo,components:{$ref:"#/visitors/document/objects/Components"}}},Info:{element:"info",$visitor:Go,fixedFields:{title:{$ref:"#/visitors/value"},summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},version:Wo}},SourceDescription:{element:"sourceDescription",$visitor:Xo,fixedFields:{name:{$ref:"#/visitors/value"},url:Ko,type:{$ref:"#/visitors/value"}}},Workflow:{element:"workflow",$visitor:Yo,fixedFields:{workflowId:{$ref:"#/visitors/value"},summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},inputs:Ka,dependsOn:ec,steps:nc,successActions:Sa,failureActions:wa,outputs:Ea,parameters:Oa}},Step:{element:"step",$visitor:ka,fixedFields:{description:{$ref:"#/visitors/value"},stepId:{$ref:"#/visitors/value"},operationId:{$ref:"#/visitors/value"},operationPath:{$ref:"#/visitors/value"},workflowId:{$ref:"#/visitors/value"},parameters:Aa,requestBody:{$ref:"#/visitors/document/objects/RequestBody"},successCriteria:ja,onSuccess:Fa,onFailure:Ia,outputs:Pa}},Parameter:{element:"parameter",$visitor:Ca,fixedFields:{name:{$ref:"#/visitors/value"},in:{$ref:"#/visitors/value"},value:{$ref:"#/visitors/value"}}},SuccessAction:{element:"successAction",$visitor:Ta,fixedFields:{name:{$ref:"#/visitors/value"},type:{$ref:"#/visitors/value"},workflowId:{$ref:"#/visitors/value"},stepId:{$ref:"#/visitors/value"},criteria:Ma}},FailureAction:{element:"failureAction",$visitor:Na,fixedFields:{name:{$ref:"#/visitors/value"},type:{$ref:"#/visitors/value"},workflowId:{$ref:"#/visitors/value"},stepId:{$ref:"#/visitors/value"},retryAfter:{$ref:"#/visitors/value"},retryLimit:{$ref:"#/visitors/value"},criteria:$a}},Components:{element:"components",$visitor:Da,fixedFields:{inputs:Ra,parameters:Ba,successActions:Ja,failureActions:La}},Reusable:{element:"reusable",$visitor:qa,fixedFields:{reference:_a,value:{$ref:"#/visitors/value"}}},Criterion:{element:"criterion",$visitor:za,fixedFields:{context:{$ref:"#/visitors/value"},condition:{$ref:"#/visitors/value"},type:Ha}},CriterionExpressionType:{element:"criterionExpressionType",$visitor:Va,fixedFields:{type:{$ref:"#/visitors/value"},version:Ua}},RequestBody:{element:"requestBody",$visitor:Ga,fixedFields:{contentType:{$ref:"#/visitors/value"},payload:{$ref:"#/visitors/value"},replacements:Wa}},PayloadReplacement:{element:"payloadReplacement",$visitor:Xa,fixedFields:{target:{$ref:"#/visitors/value"},value:{$ref:"#/visitors/value"}}},JSONSchema:{element:"jSONSchema202012",$visitor:Ka,fixedFields:{...Za}}},extension:{$visitor:Ya}}}},el=()=>{const e=new go,t={...s,...n,isStringElement:Vt};return e.use(Ki),{predicates:t,namespace:e}},tl=(e,{element:t="arazzoSpecification1",plugins:s=[],specificationObj:n=Qa}={})=>{const r=Eo(e),i=$t(n),o=i.elementMap[t];if(!o)throw new Error(`Unknown element type: "${t}"`);const c=new(ue(o,i))({specObj:i});return xn(r,c),So(c.element,s,{toolboxCreator:el})},sl=(e,t={})=>tl(e,{...t,element:"arazzo"}),nl=(e,t={})=>tl(e,{...t,element:"arazzoSpecification1"}),rl=(e,t={})=>tl(e,{...t,element:"components"}),il=(e,t={})=>tl(e,{...t,element:"criterion"}),ol=(e,t={})=>tl(e,{...t,element:"criterionExpressionType"}),cl=(e,t={})=>tl(e,{...t,element:"failureAction"}),al=(e,t={})=>tl(e,{...t,element:"info"}),ll=(e,t={})=>tl(e,{...t,element:"jSONSchema202012"}),ul=(e,t={})=>tl(e,{...t,element:"parameter"}),dl=(e,t={})=>tl(e,{...t,element:"payloadReplacement"}),pl=(e,t={})=>tl(e,{...t,element:"requestBody"}),hl=(e,t={})=>tl(e,{...t,element:"reusable"}),ml=(e,t={})=>tl(e,{...t,element:"sourceDescription"}),fl=(e,t={})=>tl(e,{...t,element:"step"}),yl=(e,t={})=>tl(e,{...t,element:"successAction"}),gl=(e,t={})=>tl(e,{...t,element:"workflow"}),xl=tl;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.apidomNsArazzo1=t():e.apidomNsArazzo1=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,{ArazzoElement:()=>J,ArazzoMediaTypes:()=>f,ArazzoSpecification1Element:()=>V,BaseFixedFieldsFallbackVisitor:()=>hc,BaseMapFallbackVisitor:()=>mc,BaseSpecificationFallbackVisitor:()=>dc,ComponentsElement:()=>U,ComponentsFailureActionsElement:()=>Bc,ComponentsInputsElement:()=>Jc,ComponentsParametersElement:()=>_c,ComponentsSuccessActionsElement:()=>Hc,CriterionElement:()=>G,CriterionExpressionTypeElement:()=>W,FailureActionCriteriaElement:()=>Uc,FailureActionElement:()=>X,FallbackVisitor:()=>tc,FixedFieldsVisitor:()=>lc,InfoElement:()=>K,JSONSchemaElement:()=>fo,MapVisitor:()=>pc,ParameterElement:()=>yo,PatternedFieldsVisitor:()=>uc,PayloadReplacementElement:()=>go,RequestBodyElement:()=>xo,RequestBodyReplacementsElement:()=>Wc,ReusableElement:()=>bo,SourceDescriptionElement:()=>vo,SourceDescriptionsElement:()=>xc,SpecificationExtensionVisitor:()=>jl,SpecificationVisitor:()=>sc,StepDependsOnElement:()=>Kc,StepElement:()=>So,StepOnFailureElement:()=>Qc,StepOnSuccessElement:()=>ea,StepOutputsElement:()=>sa,StepParametersElement:()=>ra,StepSuccessCriteriaElement:()=>oa,SuccessActionCriteriaElement:()=>aa,SuccessActionElement:()=>wo,Visitor:()=>ec,WorkflowDependsOnElement:()=>Ic,WorkflowElement:()=>Eo,WorkflowFailureActionsElement:()=>ua,WorkflowOutputsElement:()=>da,WorkflowParametersElement:()=>ma,WorkflowStepsElement:()=>Mc,WorkflowSuccessActionsElement:()=>$c,WorkflowsElement:()=>Sc,default:()=>Oo,isArazzoElement:()=>fa,isArazzoSpecification1Element:()=>ya,isArazzoSpecificationExtension:()=>cc,isComponentsElement:()=>ga,isComponentsFailureActionsElement:()=>Pa,isComponentsInputsElement:()=>Ca,isComponentsParametersElement:()=>Ma,isComponentsSuccessActionsElement:()=>Ta,isCriterionElement:()=>xa,isCriterionExpressionTypeElement:()=>ba,isFailureActionCriteriaElement:()=>Na,isFailureActionElement:()=>va,isInfoElement:()=>Sa,isJSONSchemaElement:()=>Dc,isParameterElement:()=>wa,isPayloadReplacementElement:()=>Ea,isRequestBodyElement:()=>Oa,isRequestBodyReplacementsElement:()=>$a,isReusableElement:()=>ka,isSourceDescriptionElement:()=>Aa,isSourceDescriptionsElement:()=>Da,isStepDependsOnElement:()=>Ra,isStepElement:()=>ja,isStepOnFailureElement:()=>Ba,isStepOnSuccessElement:()=>La,isStepOutputsElement:()=>Ja,isStepParametersElement:()=>qa,isStepSuccessCriteriaElement:()=>_a,isSuccessActionCriteriaElement:()=>za,isSuccessActionElement:()=>Fa,isWorkflowDependsOnElement:()=>Ha,isWorkflowElement:()=>Ia,isWorkflowFailureActionsElement:()=>Va,isWorkflowOutputsElement:()=>Ua,isWorkflowParametersElement:()=>Ga,isWorkflowStepsElement:()=>Xa,isWorkflowSuccessActionsElement:()=>Ka,isWorkflowsElement:()=>Wa,mediaTypes:()=>y,refract:()=>Wl,refractArazzo:()=>Ml,refractArazzoSpecification1:()=>Tl,refractComponents:()=>Nl,refractCriterion:()=>$l,refractCriterionExpressionType:()=>Dl,refractFailureAction:()=>Rl,refractInfo:()=>Bl,refractJSONSchema:()=>Ll,refractParameter:()=>Jl,refractPayloadReplacement:()=>ql,refractRequestBody:()=>_l,refractReusable:()=>zl,refractSourceDescription:()=>Hl,refractStep:()=>Vl,refractSuccessAction:()=>Ul,refractWorkflow:()=>Gl,refractorPluginReplaceEmptyElement:()=>jo,specificationObj:()=>Il});var s={};e.r(s),e.d(s,{isArazzoSpecificationExtension:()=>cc,isReusableLikeElement:()=>ac});var n={};function r(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function i(e){return function t(s){return 0===arguments.length||r(s)?t:e.apply(this,arguments)}}function o(e,t){return t[e<0?t.length+e:e]}e.r(n),e.d(n,{isArazzoElement:()=>fa,isArazzoSpecification1Element:()=>ya,isComponentsElement:()=>ga,isComponentsFailureActionsElement:()=>Pa,isComponentsInputsElement:()=>Ca,isComponentsParametersElement:()=>Ma,isComponentsSuccessActionsElement:()=>Ta,isCriterionElement:()=>xa,isCriterionExpressionTypeElement:()=>ba,isFailureActionCriteriaElement:()=>Na,isFailureActionElement:()=>va,isInfoElement:()=>Sa,isJSONSchemaElement:()=>Dc,isParameterElement:()=>wa,isPayloadReplacementElement:()=>Ea,isRequestBodyElement:()=>Oa,isRequestBodyReplacementsElement:()=>$a,isReusableElement:()=>ka,isSourceDescriptionElement:()=>Aa,isSourceDescriptionsElement:()=>Da,isStepDependsOnElement:()=>Ra,isStepElement:()=>ja,isStepOnFailureElement:()=>Ba,isStepOnSuccessElement:()=>La,isStepOutputsElement:()=>Ja,isStepParametersElement:()=>qa,isStepSuccessCriteriaElement:()=>_a,isSuccessActionCriteriaElement:()=>za,isSuccessActionElement:()=>Fa,isWorkflowDependsOnElement:()=>Ha,isWorkflowElement:()=>Ia,isWorkflowFailureActionsElement:()=>Va,isWorkflowOutputsElement:()=>Ua,isWorkflowParametersElement:()=>Ga,isWorkflowStepsElement:()=>Xa,isWorkflowSuccessActionsElement:()=>Ka,isWorkflowsElement:()=>Wa});const c=i(function(e){return o(-1,e)});class a extends AggregateError{constructor(e,t,s){super(e,t,s),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const l=a;class u extends Error{static[Symbol.hasInstance](e){return super[Symbol.hasInstance](e)||Function.prototype[Symbol.hasInstance].call(l,e)}constructor(e,t){super(e,t),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const p=u;const d=class extends p{};const h=class extends d{};const m=class extends Array{unknownMediaType="application/octet-stream";filterByFormat(){throw new h("filterByFormat method in MediaTypes class is not yet implemented.")}findBy(){throw new h("findBy method in MediaTypes class is not yet implemented.")}latest(){throw new h("latest method in MediaTypes class is not yet implemented.")}};class f extends m{filterByFormat(e="generic"){const t="generic"===e?"workflows;version":e;return this.filter(e=>e.includes(t))}findBy(e="1.0.1",t="generic"){const s="generic"===t?`vnd.oai.workflows;version=${e}`:`vnd.oai.workflows+${t};version=${e}`;return this.find(e=>e.includes(s))||this.unknownMediaType}latest(e="generic"){return c(this.filterByFormat(e))}}const y=new f("application/vnd.oai.workflows;version=1.0.0","application/vnd.oai.workflows+json;version=1.0.0","application/vnd.oai.workflows+yaml;version=1.0.0","application/vnd.oai.workflows;version=1.0.1","application/vnd.oai.workflows+json;version=1.0.1","application/vnd.oai.workflows+yaml;version=1.0.1");function g(e){return function t(s,n){switch(arguments.length){case 0:return t;case 1:return r(s)?t:i(function(t){return e(s,t)});default:return r(s)&&r(n)?t:r(s)?i(function(t){return e(t,n)}):r(n)?i(function(t){return e(s,t)}):e(s,n)}}}function x(e){for(var t,s=[];!(t=e.next()).done;)s.push(t.value);return s}function b(e,t,s){for(var n=0,r=s.length;n<r;){if(e(t,s[n]))return!0;n+=1}return!1}function v(e,t){return Object.prototype.hasOwnProperty.call(t,e)}const S="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var w=Object.prototype.toString;const E=function(){return"[object Arguments]"===w.call(arguments)?function(e){return"[object Arguments]"===w.call(e)}:function(e){return v("callee",e)}}();var O=!{toString:null}.propertyIsEnumerable("toString"),k=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],A=function(){return arguments.propertyIsEnumerable("length")}(),j=function(e,t){for(var s=0;s<e.length;){if(e[s]===t)return!0;s+=1}return!1},F="function"!=typeof Object.keys||A?i(function(e){if(Object(e)!==e)return[];var t,s,n=[],r=A&&E(e);for(t in e)!v(t,e)||r&&"length"===t||(n[n.length]=t);if(O)for(s=k.length-1;s>=0;)v(t=k[s],e)&&!j(n,t)&&(n[n.length]=t),s-=1;return n}):i(function(e){return Object(e)!==e?[]:Object.keys(e)});const I=F;const P=i(function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function C(e,t,s,n){var r=x(e);function i(e,t){return M(e,t,s.slice(),n.slice())}return!b(function(e,t){return!b(i,t,e)},x(t),r)}function M(e,t,s,n){if(S(e,t))return!0;var r=P(e);if(r!==P(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||!S(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!S(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&&C(e.entries(),t.entries(),s.concat([e]),n.concat([t]));case"Set":return e.size===t.size&&C(e.values(),t.values(),s.concat([e]),n.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var o=I(e);if(o.length!==I(t).length)return!1;var c=s.concat([e]),a=n.concat([t]);for(i=o.length-1;i>=0;){var l=o[i];if(!v(l,t)||!M(t[l],e[l],c,a))return!1;i-=1}return!0}const T=g(function(e,t){return M(e,t,[],[])});const N=class{key;value;constructor(e,t){this.key=e,this.value=t}toValue(){return{key:this.key?.toValue(),value:this.value?.toValue()}}};class ${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)}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)}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 D=$;class R{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 R)this._content=e;else if(null!=e&&"string"!=typeof e&&"number"!=typeof e&&"boolean"!=typeof e&&"bigint"!=typeof e&&"symbol"!=typeof e)if(e instanceof N)this._content=e;else if(e instanceof D)this._content=e.elements;else if(Array.isArray(e))this._content=e.map(e=>this.refract(e));else{if("object"!=typeof e)throw new Error("Cannot set content to value of type "+typeof e);this._content=Object.entries(e).map(([e,t])=>new this.MemberElement(e,t))}else this._content=e}get meta(){if(!this._meta){if(this.isFrozen){const e=new this.ObjectElement;return e.freeze(),e}this._meta=new this.ObjectElement}return this._meta}set meta(e){e instanceof R?this._meta=e:this.meta.set(e??{})}get attributes(){if(!this._attributes){if(this.isFrozen){const e=new this.ObjectElement;return e.freeze(),e}this._attributes=new this.ObjectElement}return this._attributes}set attributes(e){e instanceof R?this._attributes=e:this.attributes.set(e??{})}get id(){return this.getMetaProperty("id","")}set id(e){this.setMetaProperty("id",e)}get classes(){return this.getMetaProperty("classes",[])}set classes(e){this.setMetaProperty("classes",e)}get links(){return this.getMetaProperty("links",[])}set links(e){this.setMetaProperty("links",e)}get children(){const{_content:e}=this;if(Array.isArray(e))return e;if(e instanceof N){const t=[];return e.key&&t.push(e.key),e.value&&t.push(e.value),t}return e instanceof R?[e]:[]}get isFrozen(){return Object.isFrozen(this)}freeze(){if(!this.isFrozen){this._meta&&(this._meta.parent=this,this._meta.freeze()),this._attributes&&(this._attributes.parent=this,this._attributes.freeze());for(const e of this.children)e.parent=this,e.freeze();Array.isArray(this._content)&&Object.freeze(this._content),Object.freeze(this)}}toValue(){const{_content:e}=this;return e instanceof R||e instanceof N?e.toValue():Array.isArray(e)?e.map(e=>e.toValue()):e}equals(e){const t=e instanceof R?e.toValue():e;return T(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 B=R;const L=class extends B{constructor(e,t,s){super(e,t,s),this.element="string"}primitive(){return"string"}get length(){return this.content?.length??0}};const J=class extends L{constructor(e,t,s){super(e,t,s),this.element="arazzo",this.classes.push("spec-version"),this.classes.push("version")}};class q extends B{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 _=q;const z=class extends B{constructor(e,t,s,n){super(new N,s,n),this.element="member",void 0!==e&&(this.key=e),arguments.length>=2&&(this.value=t)}primitive(){return"member"}get key(){return this._content.key}set key(e){this._content.key=this.refract(e)}get value(){return this._content.value}set value(e){this._content.value=void 0===e?void 0:this.refract(e)}};const H=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 z(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 D(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 D(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 V=class extends H{constructor(e,t,s){super(e,t,s),this.element="arazzoSpecification1",this.classes.push("api"),this.classes.push("arazzo")}get arazzo(){return this.get("arazzo")}set arazzo(e){this.set("arazzo",e)}get info(){return this.get("info")}set info(e){this.set("info",e)}get sourceDescriptions(){return this.get("sourceDescriptions")}set sourceDescriptions(e){this.set("sourceDescriptions",e)}get workflows(){return this.get("workflows")}set workflows(e){this.set("workflows",e)}get components(){return this.get("components")}set components(e){this.set("components",e)}};const U=class extends H{constructor(e,t,s){super(e,t,s),this.element="components"}get inputs(){return this.get("inputs")}set inputs(e){this.set("inputs",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}get successActions(){return this.get("successActions")}set successActions(e){this.set("successActions",e)}get failureActions(){return this.get("failureActions")}set failureActions(e){this.set("failureActions",e)}};const G=class extends H{constructor(e,t,s){super(e,t,s),this.element="criterion"}get context(){return this.get("context")}set context(e){this.set("context",e)}get condition(){return this.get("condition")}set condition(e){this.set("condition",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}};const W=class extends H{constructor(e,t,s){super(e,t,s),this.element="criterionExpressionType"}get type(){return this.get("type")}set type(e){this.set("type",e)}get version(){return this.get("version")}set version(e){this.set("version",e)}};const X=class extends H{constructor(e,t,s){super(e,t,s),this.element="failureAction"}get name(){return this.get("name")}set name(e){this.set("name",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}get workflowId(){return this.get("workflowId")}set workflowId(e){this.set("workflowId",e)}get stepId(){return this.get("stepId")}set stepId(e){this.set("stepId",e)}get retryAfter(){return this.get("retryAfter")}set retryAfter(e){this.set("retryAfter",e)}get retryLimit(){return this.get("retryLimit")}set retryLimit(e){this.set("retryLimit",e)}get criteria(){return this.get("criteria")}set criteria(e){this.set("criteria",e)}};const K=class extends H{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 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)}get version(){return this.get("version")}set version(e){this.set("version",e)}};function Y(e,t,s){for(var n=0,r=s.length;n<r;)t=e(t,s[n]),n+=1;return t}var Q=g(function(e,t){return Y(function(s,n){return s[n]=e(t[n],n,t),s},{},I(t))});const Z=Q;const ee=i(function(e){return null==e});var te=g(function(e,t){if(0===e.length||ee(t))return!1;for(var s=t,n=0;n<e.length;){if(ee(s)||!v(e[n],s))return!1;s=s[e[n]],n+=1}return!0});const se=te;var ne=g(function(e,t){return se([e],t)});const re=ne;function ie(e){return function t(s,n,o){switch(arguments.length){case 0:return t;case 1:return r(s)?t:g(function(t,n){return e(s,t,n)});case 2:return r(s)&&r(n)?t:r(s)?g(function(t,s){return e(t,n,s)}):r(n)?g(function(t,n){return e(s,t,n)}):i(function(t){return e(s,n,t)});default:return r(s)&&r(n)&&r(o)?t:r(s)&&r(n)?g(function(t,s){return e(t,s,o)}):r(s)&&r(o)?g(function(t,s){return e(t,n,s)}):r(n)&&r(o)?g(function(t,n){return e(s,t,n)}):r(s)?i(function(t){return e(t,n,o)}):r(n)?i(function(t){return e(s,t,o)}):r(o)?i(function(t){return e(s,n,t)}):e(s,n,o)}}}const oe=Number.isInteger||function(e){return(e|0)===e};const ce=function(e,t){if(null!=t)return oe(e)?o(e,t):t[e]};const ae=g(ce);const le=ie(function(e,t,s){return e(ae(t,s))});function ue(e,t){for(var s=t,n=0;n<e.length;n+=1){if(null==s)return;var r=e[n];s=oe(r)?o(r,s):s[r]}return s}const pe=g(ue);function de(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 he(e,t){return function(){return t.call(this,e.apply(this,arguments))}}const me=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};function fe(e){return"[object String]"===Object.prototype.toString.call(e)}const ye=i(function(e){return!!me(e)||!!e&&("object"==typeof e&&(!fe(e)&&(0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))});var ge="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function xe(e,t,s){return function(n,r,i){if(ye(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[ge])return s(n,r,i[ge]());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 be(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 ve=g(function(e,t){return de(e.length,function(){return e.apply(t,arguments)})});const Se=ve;function we(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 Ee(e,t,s,n){return e["@@transducer/result"](s[n](Se(e["@@transducer/step"],e),t))}const Oe=xe(be,Ee,we);var ke=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 Ae=ie(function(e,t,s){return Oe("function"==typeof e?new ke(e):e,t,s)});function je(e,t){return function(){var s=arguments.length;if(0===s)return t();var n=arguments[s-1];return me(n)||"function"!=typeof n[e]?t.apply(this,arguments):n[e].apply(n,Array.prototype.slice.call(arguments,0,s-1))}}const Fe=ie(je("slice",function(e,t,s){return Array.prototype.slice.call(s,e,t)}));const Ie=i(je("tail",Fe(1,1/0)));function Pe(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return de(arguments[0].length,Ae(he,arguments[0],Ie(arguments)))}var Ce=function(e,t){switch(arguments.length){case 0:return Ce;case 1:return function t(s){return 0===arguments.length?t:S(e,s)};default:return S(e,t)}};const Me=Ce;function Te(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(T(e[s],t))return s;s+=1}return-1}(t,e,0)>=0}function Ne(e,t){for(var s=0,n=t.length,r=Array(n);s<n;)r[s]=e(t[s]),s+=1;return r}function $e(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 De=function(e){return(e<10?"0":"")+e};const Re="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+De(e.getUTCMonth()+1)+"-"+De(e.getUTCDate())+"T"+De(e.getUTCHours())+":"+De(e.getUTCMinutes())+":"+De(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function Be(e,t,s){return function(){if(0===arguments.length)return s();var n=arguments[arguments.length-1];if(!me(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 Le(e){return"[object Object]"===Object.prototype.toString.call(e)}const Je=function(){return this.xf["@@transducer/init"]()},qe=function(e){return this.xf["@@transducer/result"](e)};var _e=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=Je,e.prototype["@@transducer/result"]=qe,e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.xf["@@transducer/step"](e,t):e},e}();function ze(e){return function(t){return new _e(e,t)}}var He=g(Be(["fantasy-land/filter","filter"],ze,function(e,t){return Le(t)?Y(function(s,n){return e(t[n])&&(s[n]=t[n]),s},{},I(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 Ve=He;const Ue=g(function(e,t){return Ve((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 Te(s,n)?"<Circular>":Ge(s,n)},n=function(e,t){return Ne(function(t){return $e(t)+": "+s(e[t])},t.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+Ne(s,e).join(", ")+"))";case"[object Array]":return"["+Ne(s,e).concat(n(e,Ue(function(e){return/^\d+$/.test(e)},I(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):$e(Re(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())+")":$e(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,I(e)).join(", ")+"}"}}const We=i(function(e){return Ge(e,[])});const Xe=ie(function(e,t,s){return e(ue(t,s))});function Ke(e){var t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t}const Ye=g(function(e,t){return e&&t});function Qe(e,t,s){for(var n=s.next();!n.done;)t=e(t,n.value),n=s.next();return t}function Ze(e,t,s,n){return s[n](e,t)}const et=xe(Y,Ze,Qe);var tt=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=Je,e.prototype["@@transducer/result"]=qe,e.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},e}();const st=function(e){return function(t){return new tt(e,t)}};function nt(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):de(Math.max(0,o),nt(e,n,s))}}var rt=g(function(e,t){return 1===e?i(t):de(e,nt(e,[],t))});const it=rt;var ot=g(Be(["fantasy-land/map","map"],st,function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return it(t.length,function(){return e.call(this,t.apply(this,arguments))});case"[object Object]":return Y(function(s,n){return s[n]=e(t[n]),s},{},I(t));default:return Ne(e,t)}}));const ct=ot;const at=g(function(e,t){return"function"==typeof t["fantasy-land/ap"]?t["fantasy-land/ap"](e):"function"==typeof e.ap?e.ap(t):"function"==typeof e?function(s){return e(s)(t(s))}:et(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,ct(s,t))},[],e)});var lt=g(function(e,t){var s=it(e,t);return it(e,function(){return Y(at,ct(s,arguments[0]),Array.prototype.slice.call(arguments,1))})});const ut=lt;var pt=i(function(e){return ut(e.length,e)});const dt=pt;const ht=g(function(e,t){return Ke(e)?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:dt(Ye)(e,t)});const mt=T(null);const ft=dt(i(function(e){return!e}));const yt=ft(mt);function gt(e){return gt="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},gt(e)}const xt=function(e){return"object"===gt(e)};const bt=it(1,ht(yt,xt));const vt=g(function(e,t){if(e===t)return t;function s(e,t){if(e>t!=t>e)return t>e?t:e}var n=s(e,t);if(void 0!==n)return n;var r=s(typeof e,typeof t);if(void 0!==r)return r===typeof e?e:t;var i=We(e),o=s(i,We(t));return void 0!==o&&o===i?e:t});const St=g(function(e,t){return ct(ae(e),t)});const wt=i(function(e){return it(Ae(vt,0,St("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 Et=it(1,Pe(P,Me("GeneratorFunction")));const Ot=it(1,Pe(P,Me("AsyncFunction")));const kt=wt([Pe(P,Me("Function")),Et,Ot]);var At=Pe(P,Me("Object")),jt=Pe(We,T(We(Object))),Ft=Xe(ht(kt,jt),["constructor"]);const It=it(1,function(e){if(!bt(e)||!At(e))return!1;var t=Object.getPrototypeOf(e);return!!mt(t)||Ft(t)});const Pt=it(1,Pe(P,Me("String")));var Ct=i(function(e){return it(e.length,e)});const Mt=Ct;const Tt=g(function(e,t){return it(e+1,function(){var s=arguments[e];if(null!=s&&Ke(s[t]))return s[t].apply(s,Array.prototype.slice.call(arguments,0,e));throw new TypeError(We(s)+' does not have a method named "'+t+'"')})});const Nt=Tt(1,"split");var $t=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=Je,e.prototype["@@transducer/result"]=qe,e.prototype["@@transducer/step"]=function(e,t){if(this.f){if(this.f(t))return e;this.f=null}return this.xf["@@transducer/step"](e,t)},e}();function Dt(e){return function(t){return new $t(e,t)}}const Rt=g(Be(["dropWhile"],Dt,function(e,t){for(var s=0,n=t.length;s<n&&e(t[s]);)s+=1;return Fe(s,1/0,t)}));const Bt=Tt(1,"join");var Lt=i(function(e){return it(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 Jt=Lt(g(Te));const qt=Mt(function(e,t){return Pe(Nt(""),Rt(Jt(e)),Bt(""))(t)}),_t=new WeakMap,zt=e=>{if(_t.has(e))return _t.get(e);const t={},s=(e,n,r)=>("string"==typeof e.element&&(t[e.element]=e.$visitor?[...r,"$visitor"]:r),Z((e,t)=>{const i=[...r,t];if(It(e)&&re("$ref",e)&&le(Pt,"$ref",e)){const t=pe(["$ref"],e),s=qt("#/",t);return pe(s.split("/"),n)}return It(e)?s(e,n,i):e},e)),n=s(e,e,[]);return n.elementMap=t,_t.set(e,n),n};const Ht=class extends H{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 Vt=class extends H{constructor(e,t,s){super(e,t,s),this.element="JSONReference",this.classes.push("json-reference")}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}};const Ut=class extends H{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 Gt=class extends H{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)}};const Wt=class extends B{constructor(e,t,s){super(e,t,s),this.element="number"}primitive(){return"number"}};const Xt=class extends B{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 Kt=class extends B{constructor(e,t,s){super(e,t,s),this.element="boolean"}primitive(){return"boolean"}};const Yt=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([])}},Qt=e=>e instanceof B,Zt=e=>e instanceof L,es=e=>e instanceof Wt,ts=e=>e instanceof Xt,ss=e=>e instanceof Kt,ns=e=>e instanceof Yt,rs=e=>e instanceof H,is=e=>e instanceof z,os=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,cs=(e,t)=>0===t.length||!!Qt(e)&&(!e.isMetaEmpty&&(!!e.hasMetaProperty("classes")&&t.every(t=>e.classes.includes(t))));class as extends L{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(us).join("");const a=new as(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=ps(t,n);s.push(e.value),n=e.next}return s}(this.content))}}const ls="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function us(e){let t=e>>>0,s="";do{let e=31&t;t>>>=5,0!==t&&(e|=32),s+=ls[e]}while(0!==t);return s}function ps(e,t=0){let s=0,n=0,r=t;for(;;){const t=e[r++],i=ls.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 ds=as;const hs=class extends p{constructor(e,t){if(super(e,t),null!=t&&"object"==typeof t){const{cause:e,...s}=t;Object.assign(this,s)}}};const ms=class extends hs{value;constructor(e,t){super(e,t),void 0!==t&&(this.value=t.value)}};const fs=class extends ms{};const ys=class extends ms{},gs=(e,t)=>{const{visited:s=new WeakMap}=t,n={...t,visited:s};if(s.has(e))return s.get(e);const r=Ss(e);s.set(e,r);const{content:i}=e;return Array.isArray(i)?r.content=i.map(e=>gs(e,n)):Qt(i)?r.content=gs(i,n):r.content=i instanceof N?xs(i,n):i,r},xs=(e,t)=>{const{visited:s=new WeakMap}=t,n={...t,visited:s};if(s.has(e))return s.get(e);const{key:r,value:i}=e,o=void 0!==r?gs(r,n):void 0,c=void 0!==i?gs(i,n):void 0,a=new N(o,c);return s.set(e,a),a},bs=(e,t={})=>{if(e instanceof N)return xs(e,t);if(e instanceof D)return((e,t)=>{const{visited:s=new WeakMap}=t,n={...t,visited:s};if(s.has(e))return s.get(e);const r=[...e].map(e=>gs(e,n)),i=new D(r);return s.set(e,i),i})(e,t);if(Qt(e))return gs(e,t);throw new fs("Value provided to cloneDeep function couldn't be cloned",{value:e})};bs.safe=e=>{try{return bs(e)}catch{return e}};const vs=e=>{const{key:t,value:s}=e;return new N(t,s)},Ss=e=>{const t=new(0,e.constructor);t.element=e.element,e.isMetaEmpty||(t.meta=bs(e.meta)),e.isAttributesEmpty||(t.attributes=bs(e.attributes)),os(e)&&ds.transfer(e,t);const{content:s}=e;return Qt(s)?t.content=Ss(s):Array.isArray(s)?t.content=[...s]:t.content=s instanceof N?vs(s):s,t},ws=e=>{if(e instanceof N)return vs(e);if(e instanceof D)return(e=>{const t=[...e];return new D(t)})(e);if(Qt(e))return Ss(e);throw new ys("Value provided to cloneShallow function couldn't be cloned",{value:e})};ws.safe=e=>{try{return ws(e)}catch{return e}};const Es=class extends B{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 Os=class extends B{constructor(e,t,s){super(e||[],t,s),this.element="ref",this.path||(this.path="element")}get path(){if(this.hasAttributesProperty("path"))return this.attributes.get("path")}set path(e){this.attributes.set("path",e)}};const ks=class extends L{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 As=class extends L{constructor(e,t,s){super(e,t,s),this.element="comment"}};const js=class extends Yt{constructor(e,t,s){super(e,t,s),this.element="parseResult"}get api(){return this.filter(e=>cs(e,["api"])).first}get results(){return this.filter(e=>cs(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&&cs(e,["warning"]))}get errors(){return this.filter(e=>"annotation"===e.element&&cs(e,["error"]))}get isEmpty(){return 0===this.reject(e=>"annotation"===e.element).length}replaceResult(e){const{result:t}=this;if(void 0===t)return!1;const s=this._content,n=s.findIndex(e=>e===t);return-1!==n&&(s[n]=e,!0)}},Fs=e=>e instanceof Es,Is=e=>e instanceof Os,Ps=e=>{if(!Qt(e))return e;if(Zt(e)||es(e)||ss(e)||ts(e))return e.toValue();const t=new WeakMap,s=e=>{if(!Qt(e))return e;if(rs(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(ns(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 Is(e)?String(e.toValue()):Fs(e)?Zt(e.href)?e.href.toValue():"":e.toValue()};return s(e)},Cs=e=>{const t=e.isMetaEmpty?void 0:bs(e.meta),s=e.isAttributesEmpty?void 0:bs(e.attributes);return new e.constructor(void 0,t,s)},Ms=(e,t)=>t.clone&&t.isMergeableElement(e)?Ns(Cs(e),e,t):e,Ts={clone:!0,isMergeableElement:e=>rs(e)||ns(e),arrayElementMerge:(e,t,s)=>new(0,e.constructor)(e.concat(t).map(e=>Ms(e,s))),objectElementMerge:(e,t,s)=>{const n=rs(e)?Cs(e):Cs(t);return rs(e)&&e.forEach((e,t,r)=>{const i=ws(r);i.value=Ms(e,s),n.content.push(i)}),t.forEach((t,r,i)=>{const o=Ps(r);let c;if(rs(e)&&e.hasKey(o)&&s.isMergeableElement(t)){const n=e.get(o);c=ws(i),c.value=((e,t)=>{if("function"!=typeof t.customMerge)return Ns;const s=t.customMerge(e,t);return"function"==typeof s?s:Ns})(r,s)(n,t,s)}else c=ws(i),c.value=Ms(t,s);n.remove(o),n.content.push(c)}),n},customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0},Ns=(e,t,s)=>{const n={...Ts,...s};n.isMergeableElement=n.isMergeableElement??Ts.isMergeableElement,n.arrayElementMerge=n.arrayElementMerge??Ts.arrayElementMerge,n.objectElementMerge=n.objectElementMerge??Ts.objectElementMerge;const r=ns(t);if(!(r===ns(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=>bs(e):e.customMetaMerge)(n)(e.meta,t.meta),i.attributes=(e=>"function"!=typeof e.customAttributesMerge?e=>bs(e):e.customAttributesMerge)(n)(e.attributes,t.attributes),i};Ns.all=(e,t)=>{if(!Array.isArray(e))throw new TypeError("First argument of deepmerge should be an array.");return 0===e.length?new H:e.reduce((e,s)=>Ns(e,s,t),Cs(e[0]))};const $s=Ns;const Ds=class{element;constructor(e){Object.assign(this,e)}copyMetaAndAttributes(e,t){if(!e.isMetaEmpty||!t.isMetaEmpty){const s=t.isMetaEmpty?new H:t.meta,n=e.isMetaEmpty?new H:e.meta;t.meta=$s(s,n)}if(!e.isAttributesEmpty||!t.isAttributesEmpty){const s=t.isAttributesEmpty?new H:t.attributes,n=e.isAttributesEmpty?new H:e.attributes;t.attributes=$s(s,n)}ds.transfer(e,t)}};const Rs=class extends Ds{enter(e){this.element=bs(e.node),e.stop()}};const Bs=i(function(e){return function(){return e}});const Ls=g(function(e,t){return null==t||t!=t?e:t});const Js=Bs(void 0);const qs=T(Js());const _s=i(function(e){return it(Ae(vt,0,St("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 zs=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:me(e)?[]:fe(e)?"":Le(e)?{}:E(e)?function(){return arguments}():function(e){var t=Object.prototype.toString.call(e);return"[object Uint8ClampedArray]"===t||"[object Int8Array]"===t||"[object Uint8Array]"===t||"[object Int16Array]"===t||"[object Uint16Array]"===t||"[object Int32Array]"===t||"[object Uint32Array]"===t||"[object Float32Array]"===t||"[object Float64Array]"===t||"[object BigInt64Array]"===t||"[object BigUint64Array]"===t}(e)?e.constructor.from(""):void 0});const Hs=zs;const Vs=i(function(e){return null!=e&&T(e,Hs(e))});const Us=i(function(e){return!Vs(e)});const Gs=g(function(e,t){return e||t});const Ws=it(1,ht(yt,g(function(e,t){return Ke(e)?function(){return e.apply(this,arguments)||t.apply(this,arguments)}:dt(Gs)(e,t)})(xt,kt)));var Xs=ft(Ws);const Ks=_s([Pt,Xs,Us]);const Ys=g(function(e,t){for(var s={},n=0;n<e.length;)e[n]in t&&(s[e[n]]=t[e[n]]),n+=1;return s}),Qs=function(){const e=en,t=Zs,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,y=new function(){this.state=e.ACTIVE,this.phraseLength=0,this.refresh=()=>{this.state=e.ACTIVE,this.phraseLength=0}};s.parse=(g,x,v,S)=>{const w=`${n}parse(): `;p=0,d=0,h=0,m=0,f=0,r=void 0,i=void 0,o=void 0,c=void 0,y.refresh(),a=void 0,l=void 0,u=void 0,c=t.stringToChars(v),r=g.rules,i=g.udts;const E=x.toLowerCase();let O;for(const e in r)if(r.hasOwnProperty(e)&&E===r[e].lower){O=r[e].index;break}if(void 0===O)throw new Error(`${w}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=S,o=[{type:e.RNM,index:O}],b(0,0),o=void 0;let k=!1;switch(y.state){case e.ACTIVE:throw new Error(`${w}final state should never be 'ACTIVE'`);case e.NOMATCH:k=!1;break;case e.EMPTY:case e.MATCH:k=y.phraseLength===c.length;break;default:throw new Error("unrecognized state")}return{success:k,state:y.state,stateName:e.idName(y.state),length:c.length,matched:y.phraseLength,maxMatched:f,maxTreeDepth:h,nodeHits:m}};const g=(t,s,r,i)=>{if(s.phraseLength>r){let e=`${n}opRNM(${t.name}): callback function error: `;throw e+=`sysData.phraseLength: ${s.phraseLength}`,e+=` must be <= remaining chars: ${r}`,new Error(e)}switch(s.state){case e.ACTIVE:if(!i)throw new Error(`${n}opRNM(${t.name}): callback function return error. ACTIVE state not allowed.`);break;case e.EMPTY:s.phraseLength=0;break;case e.MATCH:0===s.phraseLength&&(s.state=e.EMPTY);break;case e.NOMATCH:s.phraseLength=0;break;default:throw new Error(`${n}opRNM(${t.name}): callback function return error. Unrecognized return state: ${s.state}`)}},x=(t,a)=>{let d,h,m;const f=o[t],g=i[f.index];y.UdtIndex=g.index,p||(m=s.ast&&s.ast.udtDefined(f.index),m&&(h=r.length+f.index,d=s.ast.getLength(),s.ast.down(h,g.name)));const x=c.length-a;l[f.index](y,c,a,u),((t,s,r)=>{if(s.phraseLength>r){let e=`${n}opUDT(${t.name}): callback function error: `;throw e+=`sysData.phraseLength: ${s.phraseLength}`,e+=` must be <= remaining chars: ${r}`,new Error(e)}switch(s.state){case e.ACTIVE:throw new Error(`${n}opUDT(${t.name}) ACTIVE state return not allowed.`);case e.EMPTY:if(!t.empty)throw new Error(`${n}opUDT(${t.name}) may not return EMPTY.`);s.phraseLength=0;break;case e.MATCH:if(0===s.phraseLength){if(!t.empty)throw new Error(`${n}opUDT(${t.name}) may not return EMPTY.`);s.state=e.EMPTY}break;case e.NOMATCH:s.phraseLength=0;break;default:throw new Error(`${n}opUDT(${t.name}): callback function return error. Unrecognized return state: ${s.state}`)}})(g,y,x),p||m&&(y.state===e.NOMATCH?s.ast.setLength(d):s.ast.up(h,g.name,a,y.phraseLength))},b=(t,i)=>{const l=`${n}opExecute(): `,v=o[t];switch(m+=1,d>h&&(h=d),d+=1,y.refresh(),s.trace&&s.trace.down(v,i),v.type){case e.ALT:((t,s)=>{const n=o[t];for(let t=0;t<n.children.length&&(b(n.children[t],s),y.state===e.NOMATCH);t+=1);})(t,i);break;case e.CAT:((t,n)=>{let r,i,c,a;const l=o[t];s.ast&&(i=s.ast.getLength()),r=!0,c=n,a=0;for(let t=0;t<l.children.length;t+=1){if(b(l.children[t],c),y.state===e.NOMATCH){r=!1;break}c+=y.phraseLength,a+=y.phraseLength}r?(y.state=0===a?e.EMPTY:e.MATCH,y.phraseLength=a):(y.state=e.NOMATCH,y.phraseLength=0,s.ast&&s.ast.setLength(i))})(t,i);break;case e.REP:((t,n)=>{let r,i,a,l;const u=o[t];if(0===u.max)return y.state=e.EMPTY,void(y.phraseLength=0);for(i=n,a=0,l=0,s.ast&&(r=s.ast.getLength());!(i>=c.length)&&(b(t+1,i),y.state!==e.NOMATCH)&&y.state!==e.EMPTY&&(l+=1,a+=y.phraseLength,i+=y.phraseLength,l!==u.max););y.state===e.EMPTY||l>=u.min?(y.state=0===a?e.EMPTY:e.MATCH,y.phraseLength=a):(y.state=e.NOMATCH,y.phraseLength=0,s.ast&&s.ast.setLength(r))})(t,i);break;case e.RNM:((t,n)=>{let i,l,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(y,c,n,u),g(m,y,t,!0),y.state===e.ACTIVE&&(d=o,o=m.opcodes,b(0,n),o=d,f(y,c,n,u),g(m,y,t,!1))}else d=o,o=m.opcodes,b(0,n,y),o=d;p||l&&(y.state===e.NOMATCH?s.ast.setLength(i):s.ast.up(h.index,m.name,n,y.phraseLength))})(t,i);break;case e.TRG:((t,s)=>{const n=o[t];y.state=e.NOMATCH,s<c.length&&n.min<=c[s]&&c[s]<=n.max&&(y.state=e.MATCH,y.phraseLength=1)})(t,i);break;case e.TBS:((t,s)=>{const n=o[t],r=n.string.length;if(y.state=e.NOMATCH,s+r<=c.length){for(let e=0;e<r;e+=1)if(c[s+e]!==n.string[e])return;y.state=e.MATCH,y.phraseLength=r}})(t,i);break;case e.TLS:((t,s)=>{let n;const r=o[t];y.state=e.NOMATCH;const i=r.string.length;if(0!==i){if(s+i<=c.length){for(let e=0;e<i;e+=1)if(n=c[s+e],n>=65&&n<=90&&(n+=32),n!==r.string[e])return;y.state=e.MATCH,y.phraseLength=i}}else y.state=e.EMPTY})(t,i);break;case e.UDT:x(t,i);break;case e.AND:((t,s)=>{switch(p+=1,b(t+1,s),p-=1,y.phraseLength=0,y.state){case e.EMPTY:case e.MATCH:y.state=e.EMPTY;break;case e.NOMATCH:y.state=e.NOMATCH;break;default:throw new Error(`opAND: invalid state ${y.state}`)}})(t,i);break;case e.NOT:((t,s)=>{switch(p+=1,b(t+1,s),p-=1,y.phraseLength=0,y.state){case e.EMPTY:case e.MATCH:y.state=e.NOMATCH;break;case e.NOMATCH:y.state=e.EMPTY;break;default:throw new Error(`opNOT: invalid state ${y.state}`)}})(t,i);break;default:throw new Error(`${l}unrecognized operator`)}p||i+y.phraseLength>f&&(f=i+y.phraseLength),s.stats&&s.stats.collect(v,y),s.trace&&s.trace.up(v,y.state,i,y.phraseLength),d-=1}},Zs={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)}},en={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 en.ALT:return"ALT";case en.CAT:return"CAT";case en.REP:return"REP";case en.RNM:return"RNM";case en.TRG:return"TRG";case en.TBS:return"TBS";case en.TLS:return"TLS";case en.UDT:return"UDT";case en.AND:return"AND";case en.NOT:return"NOT";case en.ACTIVE:return"ACTIVE";case en.EMPTY:return"EMPTY";case en.MATCH:return"MATCH";case en.NOMATCH:return"NOMATCH";case en.SEM_PRE:return"SEM_PRE";case en.SEM_POST:return"SEM_POST";case en.SEM_OK:return"SEM_OK";default:return"UNRECOGNIZED STATE"}}};function tn(){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 sn extends Error{constructor(e,t=void 0){if(super(e,t),this.name=this.constructor.name,"string"==typeof e&&(this.message=e),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack,null!=t&&"object"==typeof t&&Object.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 nn=sn;new tn;new tn,new Qs,new tn,new Qs,new tn,new Qs,new tn,new Qs;const rn=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 on=class extends nn{},cn=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 rn(String(e))}).join("/")}`}catch(t){throw new on("Unexpected error during JSON Pointer compilation",{cause:t,referenceTokens:e})}};class an 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 ln=an;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 un=class extends ln{},pn=e=>{if(!Array.isArray(e))throw new un("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 un("Failed to compile normalized JSONPath",{cause:t,selectors:e})}},dn=(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)}},hn=(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)}},mn=(e,t,s,n)=>{const{realm:r}=e;for(const[e,s]of r.entries(t))n(s,e)},fn=(e,t)=>e>=0?Math.min(e,t):Math.max(t+e,0),yn=(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?fn(e,n):s,a=null!==t?fn(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)}},gn=(e,t,s,n)=>n.value,xn=(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}},bn=(e,t,s,n)=>{const{selectors:r}=s;for(const s of r)Cn(e,t,s,n)},vn=(e,t,s)=>{const n=[],r=e=>{n.push(e)},{selector:i}=s;switch(i.type){case"BracketedSelection":bn(e,t,i,r);break;case"NameSelector":case"WildcardSelector":case"IndexSelector":case"SliceSelector":case"FilterSelector":Cn(e,t,i,r)}return n},Sn=(e,t,s,n)=>{let r=s;for(const t of n){const s=[];if("DescendantSegment"===t.type){const n=r=>{const{realm:i}=e,o=vn(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=vn(e,n,t);s.push(...r)}r=s}return r},wn=(e,t,s,n)=>{const{query:r}=n;let i;switch(r.type){case"RelQuery":i=((e,t,s,n)=>{const{segments:r}=n;return 0===r.length?[s]:Sn(e,0,[s],r)})(e,0,s,r);break;case"JsonPathQuery":i=((e,t,s,n)=>{const{segments:r}=n;return 0===r.length?[t]:Sn(e,0,[t],r)})(e,t,0,r);break;default:i=[]}return o=i,Object.defineProperty(o,"_isNodelist",{value:!0,enumerable:!1,writable:!1}),o;var o};let En;const On=(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 kn(e,t,s,n);case"FilterQuery":return wn(e,t,s,n);case"TestExpr":return"FilterQuery"===n.expression.type?wn(e,t,s,n.expression):"FunctionExpr"===n.expression.type?kn(e,t,s,n.expression):En(e,t,s,n);case"LogicalOrExpr":case"LogicalAndExpr":case"LogicalNotExpr":case"ComparisonExpr":return En(e,t,s,n);default:return}})(e,t,s,n));return o(e.realm,...c)},kn=(e,t,s,n)=>{switch(n.type){case"Literal":return gn(e,t,s,n);case"RelSingularQuery":return((e,t,s,n)=>{let r=s;for(const t of n.segments)if(r=xn(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=xn(e,r,t),void 0===r)return;return r})(e,t,0,n);case"FunctionExpr":return On(e,t,s,n);default:return}},An=(e,t,s,n)=>{const{left:r,op:i,right:o}=n,c=kn(e,t,s,r),a=kn(e,t,s,o);return e.realm.compare(c,i,a)},jn=e=>Array.isArray(e),Fn=(e,t,s,n)=>{switch(n.type){case"LogicalOrExpr":return!!Fn(e,t,s,n.left)||Fn(e,t,s,n.right);case"LogicalAndExpr":return!!Fn(e,t,s,n.left)&&Fn(e,t,s,n.right);case"LogicalNotExpr":return!Fn(e,t,s,n.expression);case"TestExpr":{const{expression:r}=n;if("FilterQuery"===r.type){return wn(e,t,s,r).length>0}if("FunctionExpr"===r.type){const n=On(e,t,s,r);return"boolean"==typeof n?n:void 0!==n&&(jn(n)?n.length>0:Boolean(n))}return!1}case"ComparisonExpr":return An(e,t,s,n);default:return!1}};En=Fn;const In=Fn,Pn=(e,t,s,n)=>{const{realm:r,root:i}=e,{expression:o}=s;for(const[s,c]of r.entries(t)){In(e,i,c,o)&&n(c,s)}},Cn=(e,t,s,n)=>{switch(s.type){case"NameSelector":dn(e,t,s,n);break;case"IndexSelector":hn(e,t,s,n);break;case"WildcardSelector":mn(e,t,s,n);break;case"SliceSelector":yn(e,t,s,n);break;case"FilterSelector":Pn(e,t,s,n)}};new Map;class Mn{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?pn(t):cn(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 Tn=it(1,ht(Ws,Pe(We,T("[object Promise]")))),Nn=e=>{const t=e?.element;return void 0===t||"element"===t?"Element":`${t.charAt(0).toUpperCase()}${t.slice(1)}Element`},$n=e=>Qt(e),Dn=e=>ws(e),Rn=(e,t,s)=>{is(e)?e.value=s:Array.isArray(e)?e[t]=null===s?void 0:s:null===s?delete e[t]:e[t]=s},Bn=e=>is(e)?["key","value"]:ns(e)||rs(e)?["content"]:[],Ln=(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=Ln(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=Ln(o,t);if("function"==typeof e)return e}return null},qn=(e,t={})=>{const{visitFnGetter:s=Jn,nodeTypeGetter:n=Nn,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=zn(t,a),n=i.call(e[u],s);if(Tn(n))throw new hs("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=zn(t,r),n=i.call(e[a],s);if(Tn(n))throw new hs("Async visitor not supported in sync mode",{visitor:e[a],visitFn:i});if(s.shouldStop){c[a]=o;break}if(s.removed)return void t.remove();if(s._wasReplaced()){const e=s._getReplacementNode();return t.replaceWith(e),e}if(void 0!==n)return t.replaceWith(n),n}}else c[a]===r&&(c[a]=i)}}},_n=(e,t={})=>{const{visitFnGetter:s=Jn,nodeTypeGetter:n=Nn,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=zn(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=zn(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 zn(e,t){return new Mn(t,e.parent,e.parentPath,e.key,e.inList)}function*Hn(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],y=-1,g=[],x=e,b=null,v=null;const S=[];do{y+=1;const e=y===f.length;let s;const w=e&&0!==g.length;if(e){if(s=0===S.length?void 0:b?.key,x=h,h=S.pop(),v=b?.parentPath?.parentPath??null,w)if(l)for(const[e,t]of g)u(x,e,t);else if(m){x=x.slice();let e=0;for(const[t,s]of g){const n=t-e;null===s?(x.splice(n,1),e+=1):x[n]=s}}else{x=c(x);for(const[e,t]of g)x[e]=t}if(void 0!==d){y=d.index,f=d.keys,g=d.edits;const e=d.inArray;if(v=d.parentPath,d=d.prev,w&&!l){const t=e?y:f[y];g.push([t,x])}m=e}}else if(void 0!==h&&(s=m?y:f[y],x=h[s],void 0===x))continue;if(!Array.isArray(x)){if(!o(x))throw new hs(`Invalid AST Node: ${String(x)}`,{node:x});if(a&&S.includes(x))continue;b=new Mn(x,h,v,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:b,isLeaving:e};if(b.shouldStop)break;if(b.shouldSkip&&!e)continue;if(b.removed){if(g.push([s,null]),!e)continue}else if(b._wasReplaced()){const t=b._getReplacementNode();if(g.push([s,t]),!e){if(!o(t))continue;x=t}}else if(void 0!==i&&(g.push([s,i]),!e)){if(!o(i))continue;x=i}b._markStale()}}if(!e){if(d={inArray:m,index:y,keys:f,edits:g,parentPath:v,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]??[]:[]}y=-1,g=[],void 0!==h&&S.push(h),h=x,v=b}}while(void 0!==d);return 0!==g.length?g.at(-1)[1]:e}qn[Symbol.for("nodejs.util.promisify.custom")]=_n;const Vn=(e,t,s={})=>{const n=Hn(e,t,{keyMap:s.keyMap??Bn,state:s.state??{},nodeTypeGetter:s.nodeTypeGetter??Nn,nodePredicate:s.nodePredicate??$n,nodeCloneFn:s.nodeCloneFn??Dn,detectCycles:s.detectCycles??!0,mutable:s.mutable??!1,mutationFn:s.mutationFn??Rn});let r=n.next();for(;!r.done;){const e=r.value,s=e.visitFn.call(t,e.path);if(Tn(s))throw new hs("Async visitor not supported in sync mode",{visitor:t,visitFn:e.visitFn});r=n.next(s)}return r.value},Un=async(e,t,s={})=>{const n=Hn(e,t,{keyMap:s.keyMap??Bn,state:s.state??{},nodeTypeGetter:s.nodeTypeGetter??Nn,nodePredicate:s.nodePredicate??$n,nodeCloneFn:s.nodeCloneFn??Dn,detectCycles:s.detectCycles??!0,mutable:s.mutable??!1,mutationFn:s.mutationFn??Rn});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};Vn[Symbol.for("nodejs.util.promisify.custom")]=Un,Mn.prototype.traverse=function(e,t){return Vn(this.node,e,t)},Mn.prototype.traverseAsync=function(e,t){return Un(this.node,e,t)};const Gn=class extends Ds{specObj;passingOptionsNames=["specObj","parent"];constructor({specObj:e,...t}){super({...t}),this.specObj=e}retrievePassingOptions(){return Ys(this.passingOptionsNames,this)}retrieveFixedFields(e){const t=pe(["visitors",...e,"fixedFields"],this.specObj);return"object"==typeof t&&null!==t?Object.keys(t):[]}retrieveVisitor(e){return Xe(kt,["visitors",...e],this.specObj)?pe(["visitors",...e],this.specObj):pe(["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 Rs&&n?.constructor===Rs?bs(t):(Vn(t,n,s),n.element)}};const Wn=class extends Gn{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=Ps(t);if(Zt(t)&&n.includes(i)&&!this.ignoredFields.includes(i)){const n=this.toRefractedElement([...s,"fixedFields",i],e),o=new z(bs(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(bs(r))}),this.copyMetaAndAttributes(t,this.element),e.stop()}},Xn=(e,t,s=[])=>{const n=Object.getOwnPropertyDescriptors(t);for(let e of s)delete n[e];Object.defineProperties(e,n)},Kn=(e,t=[e])=>{const s=Object.getPrototypeOf(e);return null===s?t:Kn(s,[...t,s])},Yn=(e,t,s=[])=>{var n;const r=null!==(n=((...e)=>{if(0===e.length)return;let t;const s=e.map(e=>Kn(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=Kn(r);for(let t of e){let e=Kn(t);for(let t=e.length-1;t>=0;t--){let n=e[t];-1===o.indexOf(n)&&(Xn(i,n,["constructor",...s]),o.push(n))}}return i.constructor=t,i},Qn=e=>e.filter((t,s)=>e.indexOf(t)==s),Zn=(e,t)=>{const s=t.map(e=>Kn(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++}},er=(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(Zn(s,e)||{},s),defineProperty(){throw new Error("Cannot define new properties on Proxies created by ts-mixer")},has:(s,n)=>void 0!==Zn(n,e)||void 0!==t[n],get:(s,n)=>(Zn(n,e)||t)[n],set(t,s,n){const r=Zn(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)))}),tr=null,sr="copy",nr="copy",rr="deep",ir=new WeakMap,or=e=>ir.get(e),cr=(e,t)=>{var s,n;const r=Qn([...Object.getOwnPropertyNames(e),...Object.getOwnPropertyNames(t)]),i={};for(let o of r)i[o]=Qn([...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},ar=(e,t)=>{var s,n,r,i;return{property:cr(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:cr(null!==(r=null==e?void 0:e.method)&&void 0!==r?r:{},null!==(i=null==t?void 0:t.method)&&void 0!==i?i:{})}},lr=(e,t)=>{var s,n,r,i,o,c;return{class:Qn([...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:ar(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:ar(null!==(o=null==e?void 0:e.instance)&&void 0!==o?o:{},null!==(c=null==t?void 0:t.instance)&&void 0!==c?c:{})}},ur=new Map,pr=(...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=[...Kn(e.prototype).map(e=>e.constructor),...null!==(t=or(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=>ur.get(e)).filter(e=>!!e);return 0==t.length?{}:1==t.length?t[0]:t.reduce((e,t)=>lr(e,t))},dr=e=>{let t=ur.get(e);return t||(t={},ur.set(e,t)),t};function hr(...e){var t,s,n;const r=e.map(e=>e.prototype),i=tr;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)Xn(this,new s(...t));null!==i&&"function"==typeof this[i]&&this[i].apply(this,t)}var c,a;o.prototype="copy"===nr?Yn(r,o):(c=r,a=o,er([...c,{constructor:a}])),Object.setPrototypeOf(o,"copy"===sr?Yn(e,null,["prototype"]):er(e,Function.prototype));let l=o;if("none"!==rr){const r="deep"===rr?pr(...e):((...e)=>{const t=e.map(e=>dr(e));return 0===t.length?{}:1===t.length?t[0]:t.reduce((e,t)=>lr(e,t))})(...e);for(let e of null!==(t=null==r?void 0:r.class)&&void 0!==t?t:[]){const t=e(l);t&&(l=t)}mr(null!==(s=null==r?void 0:r.static)&&void 0!==s?s:{},l),mr(null!==(n=null==r?void 0:r.instance)&&void 0!==n?n:{},l.prototype)}var u,p;return u=l,p=e,ir.set(u,p),l}const mr=(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 fr=function(){return!1};const yr=class extends Gn{specPath;ignoredFields;fieldPatternPredicate=fr;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=Ps(t);if(!this.ignoredFields.includes(n)&&this.fieldPatternPredicate(n)){const n=this.specPath(e),r=this.toRefractedElement(n,e),i=new z(bs(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(bs(s))}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const gr=class extends yr{constructor(e){super(e),this.fieldPatternPredicate=Ks}};const xr=class{parent;constructor({parent:e}){this.parent=e}},br=hr(Wn,xr,Rs),vr=hr(Wn,Rs),Sr=hr(Wn,Rs),wr=hr(Wn,Rs),Er=hr(Gn,xr,Rs),Or=hr(Gn,xr,Rs),kr=hr(Gn,xr,Rs),Ar=hr(Gn,xr,Rs),jr=hr(Gn,xr,Rs),Fr=hr(gr,xr,Rs),Ir=hr(gr,xr,Rs),Pr=hr(gr,xr,Rs),Cr=hr(gr,xr,Rs);const Mr=class extends br{constructor(e){super(e),this.element=new Ht,this.specPath=Bs(["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,Wn.prototype.ObjectElement.call(this,e)}handleDialectIdentifier(e){if(qs(this.parent)&&!Zt(e.get("$schema")))this.element.meta.set("inheritedDialectIdentifier",this.defaultDialectIdentifier);else if(this.parent instanceof Ht&&!Zt(e.get("$schema"))){const e=Ls(Ps(this.parent.meta.get("inheritedDialectIdentifier")),Ps(this.parent.$schema));this.element.meta.set("inheritedDialectIdentifier",e)}}handleSchemaIdentifier(e,t="id"){const s=void 0!==this.parent?bs(this.parent.meta.get("ancestorsSchemaIdentifiers")??new Yt):new Yt,n=Ps(e.get(t));Ks(n)&&s.push(n),this.element.meta.set("ancestorsSchemaIdentifiers",s)}},Tr=e=>rs(e)&&e.hasKey("$ref");const Nr=class extends Ar{ObjectElement(e){const t=e.node,s=Tr(t)?["document","objects","JSONReference"]:["document","objects","JSONSchema"];this.element=this.toRefractedElement(s,t),e.stop()}ArrayElement(e){const t=e.node;this.element=new Yt,this.element.classes.push("json-schema-items"),t.forEach(e=>{const t=Tr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const $r=class extends Rs{ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-required")}};const Dr=class extends Cr{constructor(e){super(e),this.element=new H,this.element.classes.push("json-schema-properties"),this.specPath=e=>Tr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const Rr=class extends Pr{constructor(e){super(e),this.element=new H,this.element.classes.push("json-schema-patternProperties"),this.specPath=e=>Tr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const Br=class extends Ir{constructor(e){super(e),this.element=new H,this.element.classes.push("json-schema-dependencies"),this.specPath=e=>Tr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const Lr=class extends Rs{ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-enum")}};const Jr=class extends Rs{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 qr=class extends Er{constructor(e){super(e),this.element=new Yt,this.element.classes.push("json-schema-allOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=Tr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const _r=class extends Or{constructor(e){super(e),this.element=new Yt,this.element.classes.push("json-schema-anyOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=Tr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const zr=class extends kr{constructor(e){super(e),this.element=new Yt,this.element.classes.push("json-schema-oneOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=Tr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Hr=class extends Fr{constructor(e){super(e),this.element=new H,this.element.classes.push("json-schema-definitions"),this.specPath=e=>Tr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const Vr=class extends jr{constructor(e){super(e),this.element=new Yt,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 Ur=class extends vr{constructor(e){super(e),this.element=new Vt,this.specPath=Bs(["document","objects","JSONReference"])}ObjectElement(e){Wn.prototype.ObjectElement.call(this,e),Zt(this.element.$ref)&&this.element.classes.push("reference-element")}};const Gr=class extends Rs{StringElement(e){super.enter(e),this.element.classes.push("reference-value")}};const Wr=function(){return!0};const Xr=ie(function(e,t,s){return it(Math.max(e.length,t.length,s.length),function(){return e.apply(this,arguments)?t.apply(this,arguments):s.apply(this,arguments)})});const Kr=i(function(e){return function(t,s){return e(t,s)?-1:e(s,t)?1:0}});var Yr=g(function(e,t){return Array.prototype.slice.call(t,0).sort(e)});const Qr=Yr;const Zr=i(function(e){return o(0,e)});function ei(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}const ti=i(ei);const si=ft(ee);const ni=it(1,kt(Array.isArray)?Array.isArray:Pe(P,Me("Array")));const ri=ht(ni,Us);function ii(e){return function(e){if(Array.isArray(e))return oi(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 oi(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)?oi(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 oi(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 ci=Pe(Qr(Kr(function(e,t){return e.length>t.length})),Zr,ae("length")),ai=Mt(function(e,t,s){var n=s.apply(void 0,ii(e));return si(n)?ti(n):t});const li=Xr(ri,function(e){var t=ci(e);return it(t,function(){for(var t=arguments.length,s=new Array(t),n=0;n<t;n++)s[n]=arguments[n];return Ae(ai(s),void 0,e)})},Js);const ui=class extends Gn{alternator;constructor({alternator:e,...t}){super({...t}),this.alternator=e}enter(e){const t=e.node,s=this.alternator.map(({predicate:e,specPath:t})=>Xr(e,Bs(t),Js)),n=li(s)(t);this.element=this.toRefractedElement(n,t),e.stop()}};const pi=class extends ui{constructor(e){super(e),this.alternator=[{predicate:Tr,specPath:["document","objects","JSONReference"]},{predicate:Wr,specPath:["document","objects","JSONSchema"]}]}};const di=class extends wr{constructor(e){super(e),this.element=new Ut,this.specPath=Bs(["document","objects","Media"])}};const hi=class extends Sr{constructor(e){super(e),this.element=new Gt,this.specPath=Bs(["document","objects","LinkDescription"])}},mi={visitors:{value:Rs,JSONSchemaOrJSONReferenceVisitor:pi,document:{objects:{JSONSchema:{element:"jSONSchemaDraft4",$visitor:Mr,fixedFields:{id:{$visitor:Rs,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:pi,items:{$visitor:Nr,alias:"itemsField"},maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:$r,properties:Dr,additionalProperties:pi,patternProperties:Rr,dependencies:Br,enum:Lr,type:Jr,allOf:qr,anyOf:_r,oneOf:zr,not:pi,definitions:Hr,title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},format:{$ref:"#/visitors/value"},base:{$ref:"#/visitors/value"},links:{$visitor:Vr,alias:"linksField"},media:{$ref:"#/visitors/document/objects/Media"},readOnly:{$ref:"#/visitors/value"}}},JSONReference:{element:"jSONReference",$visitor:Ur,fixedFields:{$ref:Gr}},Media:{element:"media",$visitor:di,fixedFields:{binaryEncoding:{$ref:"#/visitors/value"},type:{$ref:"#/visitors/value"}}},LinkDescription:{element:"linkDescription",$visitor:hi,fixedFields:{href:{$ref:"#/visitors/value"},rel:{$ref:"#/visitors/value"},title:{$ref:"#/visitors/value"},targetSchema:pi,mediaType:{$ref:"#/visitors/value"},method:{$ref:"#/visitors/value"},encType:{$ref:"#/visitors/value"},schema:pi}}}}}},fi=zt(mi),yi=e=>Object.entries(e).map(([e,t])=>It(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(Ht,"fixedFields",{get:()=>yi(fi.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(Vt,"fixedFields",{get:()=>yi(fi.visitors.document.objects.JSONReference.fixedFields),enumerable:!0}),Object.defineProperty(Ut,"fixedFields",{get:()=>yi(fi.visitors.document.objects.Media.fixedFields),enumerable:!0}),Object.defineProperty(Gt,"fixedFields",{get:()=>yi(fi.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const gi=class extends Ht{constructor(e,t,s){super(e,t,s),this.element="JSONSchemaDraft6"}get idField(){throw new d("id keyword from Core vocabulary has been renamed to $id.")}set idField(e){throw new d("id keyword from Core vocabulary has been renamed to $id.")}get $id(){return this.get("$id")}set $id(e){this.set("$id",e)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(e){this.set("exclusiveMaximum",e)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(e){this.set("exclusiveMinimum",e)}get containsField(){return this.get("contains")}set containsField(e){this.set("contains",e)}get itemsField(){return this.get("items")}set itemsField(e){this.set("items",e)}get propertyNames(){return this.get("propertyNames")}set propertyNames(e){this.set("propertyNames",e)}get const(){return this.get("const")}set const(e){this.set("const",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get examples(){return this.get("examples")}set examples(e){this.set("examples",e)}};const xi=class extends Gt{get hrefSchema(){return this.get("hrefSchema")}set hrefSchema(e){this.set("hrefSchema",e)}get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get schema(){throw new d("schema keyword from Hyper-Schema vocabulary has been renamed to submissionSchema.")}set schema(e){throw new d("schema keyword from Hyper-Schema vocabulary has been renamed to submissionSchema.")}get submissionSchema(){return this.get("submissionSchema")}set submissionSchema(e){this.set("submissionSchema",e)}get method(){throw new d("method keyword from Hyper-Schema vocabulary has been removed.")}set method(e){throw new d("method keyword from Hyper-Schema vocabulary has been removed.")}get encType(){throw new d("encType keyword from Hyper-Schema vocabulary has been renamed to submissionEncType.")}set encType(e){throw new d("encType keyword from Hyper-Schema vocabulary has been renamed to submissionEncType.")}get submissionEncType(){return this.get("submissionEncType")}set submissionEncType(e){this.set("submissionEncType",e)}};var bi=ie(function e(t,s,n){if(0===t.length)return s;var r=t[0];if(t.length>1){var i=ce(r,n);(ee(i)||"object"!=typeof i)&&(i=oe(t[1])?[]:{}),s=e(Array.prototype.slice.call(t,1),s,i)}return function(e,t,s){if(oe(e)&&me(s)){var n=e<0?s.length+e:e,r=[].concat(s);return r[n]=t,r}var i={};for(var o in s)i[o]=s[o];return i[e]=t,i}(r,s,n)});const vi=bi;const Si=ie(function(e,t,s){var n=Array.prototype.slice.call(s,0);return n.splice(e,t),n});var wi=ie(function(e,t,s){return vi([e],t,s)});const Ei=wi;var Oi=g(function e(t,s){if(null==s)return s;switch(t.length){case 0:return s;case 1:return function(e,t){if(null==t)return t;if(oe(e)&&me(t))return Si(e,1,t);var s={};for(var n in t)s[n]=t[n];return delete s[e],s}(t[0],s);default:var n=t[0],r=Array.prototype.slice.call(t,1);return null==s[n]?function(e,t){if(oe(e)&&me(t))return[].concat(t);var s={};for(var n in t)s[n]=t[n];return s}(n,s):Ei(n,e(r,s[n]),s)}});const ki=Oi;const Ai=class extends Mr{constructor(e){super(e),this.element=new gi}get defaultDialectIdentifier(){return"http://json-schema.org/draft-06/schema#"}BooleanElement(e){this.enter(e),this.element.classes.push("boolean-json-schema")}handleSchemaIdentifier(e,t="$id"){return super.handleSchemaIdentifier(e,t)}};const ji=class extends Nr{BooleanElement(e){this.element=this.toRefractedElement(["document","objects","JSONSchema"],e.node),e.stop()}};const Fi=class extends Rs{ArrayElement(e){this.enter(e),this.element.classes.push("json-schema-examples")}};const Ii=class extends hi{constructor(e){super(e),this.element=new xi}},Pi=Pe(vi(["visitors","document","objects","JSONSchema","element"],"jSONSchemaDraft6"),vi(["visitors","document","objects","JSONSchema","$visitor"],Ai),ki(["visitors","document","objects","JSONSchema","fixedFields","id"]),vi(["visitors","document","objects","JSONSchema","fixedFields","$id"],{$ref:"#/visitors/value"}),vi(["visitors","document","objects","JSONSchema","fixedFields","contains"],{$visitor:mi.visitors.JSONSchemaOrJSONReferenceVisitor,alias:"containsField"}),vi(["visitors","document","objects","JSONSchema","fixedFields","items"],{$visitor:ji,alias:"itemsField"}),vi(["visitors","document","objects","JSONSchema","fixedFields","propertyNames"],mi.visitors.JSONSchemaOrJSONReferenceVisitor),vi(["visitors","document","objects","JSONSchema","fixedFields","const"],{$ref:"#/visitors/value"}),vi(["visitors","document","objects","JSONSchema","fixedFields","examples"],Fi),vi(["visitors","document","objects","LinkDescription","$visitor"],Ii),vi(["visitors","document","objects","LinkDescription","fixedFields","hrefSchema"],mi.visitors.JSONSchemaOrJSONReferenceVisitor),ki(["visitors","document","objects","LinkDescription","fixedFields","schema"]),vi(["visitors","document","objects","LinkDescription","fixedFields","submissionSchema"],mi.visitors.JSONSchemaOrJSONReferenceVisitor),ki(["visitors","document","objects","LinkDescription","fixedFields","method"]),ki(["visitors","document","objects","LinkDescription","fixedFields","encType"]),vi(["visitors","document","objects","LinkDescription","fixedFields","submissionEncType"],{$ref:"#/visitors/value"}))(mi),Ci=zt(Pi),Mi=e=>Object.entries(e).map(([e,t])=>It(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(gi,"fixedFields",{get:()=>Mi(Ci.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(xi,"fixedFields",{get:()=>Mi(Ci.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const Ti=class extends gi{constructor(e,t,s){super(e,t,s),this.element="JSONSchemaDraft7"}get $comment(){return this.get("$comment")}set $comment(e){this.set("$comment",e)}get itemsField(){return this.get("items")}set itemsField(e){this.set("items",e)}get if(){return this.get("if")}set if(e){this.set("if",e)}get then(){return this.get("then")}set then(e){this.set("then",e)}get else(){return this.get("else")}set else(e){this.set("else",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get contentEncoding(){return this.get("contentEncoding")}set contentEncoding(e){this.set("contentEncoding",e)}get contentMediaType(){return this.get("contentMediaType")}set contentMediaType(e){this.set("contentMediaType",e)}get media(){throw new d('media keyword from Hyper-Schema vocabulary has been moved to validation vocabulary as "contentMediaType" / "contentEncoding"')}set media(e){throw new d('media keyword from Hyper-Schema vocabulary has been moved to validation vocabulary as "contentMediaType" / "contentEncoding"')}get writeOnly(){return this.get("writeOnly")}set writeOnly(e){this.set("writeOnly",e)}};const Ni=class extends xi{get anchor(){return this.get("anchor")}set anchor(e){this.set("anchor",e)}get anchorPointer(){return this.get("anchorPointer")}set anchorPointer(e){this.set("anchorPointer",e)}get templatePointers(){return this.get("templatePointers")}set templatePointers(e){this.set("templatePointers",e)}get templateRequired(){return this.get("templateRequired")}set templateRequired(e){this.set("templateRequired",e)}get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get mediaType(){throw new d("mediaType keyword from Hyper-Schema vocabulary has been renamed to targetMediaType.")}set mediaType(e){throw new d("mediaType keyword from Hyper-Schema vocabulary has been renamed to targetMediaType.")}get targetMediaType(){return this.get("targetMediaType")}set targetMediaType(e){this.set("targetMediaType",e)}get targetHints(){return this.get("targetHints")}set targetHints(e){this.set("targetHints",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get $comment(){return this.get("$comment")}set $comment(e){this.set("$comment",e)}get hrefSchema(){return this.get("hrefSchema")}set hrefSchema(e){this.set("hrefSchema",e)}get headerSchema(){return this.get("headerSchema")}set headerSchema(e){this.set("headerSchema",e)}get submissionSchema(){return this.get("submissionSchema")}set submissionSchema(e){this.set("submissionSchema",e)}get submissionEncType(){throw new d("submissionEncType keyword from Hyper-Schema vocabulary has been renamed to submissionMediaType.")}set submissionEncType(e){throw new d("submissionEncType keyword from Hyper-Schema vocabulary has been renamed to submissionMediaType.")}get submissionMediaType(){return this.get("submissionMediaType")}set submissionMediaType(e){this.set("submissionMediaType",e)}};const $i=class extends Ai{constructor(e){super(e),this.element=new Ti}get defaultDialectIdentifier(){return"http://json-schema.org/draft-07/schema#"}};const Di=class extends Ii{constructor(e){super(e),this.element=new Ni}},Ri=Pe(vi(["visitors","document","objects","JSONSchema","element"],"jSONSchemaDraft7"),vi(["visitors","document","objects","JSONSchema","$visitor"],$i),vi(["visitors","document","objects","JSONSchema","fixedFields","$comment"],Pi.visitors.value),vi(["visitors","document","objects","JSONSchema","fixedFields","if"],Pi.visitors.JSONSchemaOrJSONReferenceVisitor),vi(["visitors","document","objects","JSONSchema","fixedFields","then"],Pi.visitors.JSONSchemaOrJSONReferenceVisitor),vi(["visitors","document","objects","JSONSchema","fixedFields","else"],Pi.visitors.JSONSchemaOrJSONReferenceVisitor),ki(["visitors","document","objects","JSONSchema","fixedFields","media"]),vi(["visitors","document","objects","JSONSchema","fixedFields","contentEncoding"],Pi.visitors.value),vi(["visitors","document","objects","JSONSchema","fixedFields","contentMediaType"],Pi.visitors.value),vi(["visitors","document","objects","JSONSchema","fixedFields","writeOnly"],Pi.visitors.value),vi(["visitors","document","objects","LinkDescription","$visitor"],Di),vi(["visitors","document","objects","LinkDescription","fixedFields","anchor"],Pi.visitors.value),vi(["visitors","document","objects","LinkDescription","fixedFields","anchorPointer"],Pi.visitors.value),ki(["visitors","document","objects","LinkDescription","fixedFields","mediaType"]),vi(["visitors","document","objects","LinkDescription","fixedFields","targetMediaType"],Pi.visitors.value),vi(["visitors","document","objects","LinkDescription","fixedFields","targetHints"],Pi.visitors.value),vi(["visitors","document","objects","LinkDescription","fixedFields","description"],Pi.visitors.value),vi(["visitors","document","objects","LinkDescription","fixedFields","$comment"],Pi.visitors.value),vi(["visitors","document","objects","LinkDescription","fixedFields","headerSchema"],Pi.visitors.JSONSchemaOrJSONReferenceVisitor),ki(["visitors","document","objects","LinkDescription","fixedFields","submissionEncType"]),vi(["visitors","document","objects","LinkDescription","fixedFields","submissionMediaType"],Pi.visitors.value))(Pi),Bi=zt(Ri),Li=e=>Object.entries(e).map(([e,t])=>It(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(Ti,"fixedFields",{get:()=>Li(Bi.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(Ni,"fixedFields",{get:()=>Li(Bi.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const Ji=class extends Ti{constructor(e,t,s){super(e,t,s),this.element="JSONSchema201909"}get $vocabulary(){return this.get("$vocabulary")}set $vocabulary(e){this.set("$vocabulary",e)}get $anchor(){return this.get("$anchor")}set $anchor(e){this.set("$anchor",e)}get $recursiveAnchor(){return this.get("$recursiveAnchor")}set $recursiveAnchor(e){this.set("$recursiveAnchor",e)}get $recursiveRef(){return this.get("$recursiveRef")}set $recursiveRef(e){this.set("$recursiveRef",e)}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}get $defs(){return this.get("$defs")}set $defs(e){this.set("$defs",e)}get definitions(){throw new d("definitions keyword from Validation vocabulary has been renamed to $defs.")}set definitions(e){throw new d("definitions keyword from Validation vocabulary has been renamed to $defs.")}get not(){return this.get("not")}set not(e){this.set("not",e)}get if(){return this.get("if")}set if(e){this.set("if",e)}get then(){return this.get("then")}set then(e){this.set("then",e)}get else(){return this.get("else")}set else(e){this.set("else",e)}get dependentSchemas(){return this.get("dependentSchemas")}set dependentSchemas(e){this.set("dependentSchemas",e)}get dependencies(){throw new d("dependencies keyword from Validation vocabulary has been renamed to dependentSchemas.")}set dependencies(e){throw new d("dependencies keyword from Validation vocabulary has been renamed to dependentSchemas.")}get itemsField(){return this.get("items")}set itemsField(e){this.set("items",e)}get contains(){return this.get("contains")}set contains(e){this.set("contains",e)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(e){this.set("additionalProperties",e)}get additionalItems(){return this.get("additionalItems")}set additionalItems(e){this.set("additionalItems",e)}get propertyNames(){return this.get("propertyNames")}set propertyNames(e){this.set("propertyNames",e)}get unevaluatedItems(){return this.get("unevaluatedItems")}set unevaluatedItems(e){this.set("unevaluatedItems",e)}get unevaluatedProperties(){return this.get("unevaluatedProperties")}set unevaluatedProperties(e){this.set("unevaluatedProperties",e)}get maxContains(){return this.get("maxContains")}set maxContains(e){this.set("maxContains",e)}get minContains(){return this.get("minContains")}set minContains(e){this.set("minContains",e)}get dependentRequired(){return this.get("dependentRequired")}set dependentRequired(e){this.set("dependentRequired",e)}get deprecated(){return this.get("deprecated")}set deprecated(e){this.set("deprecated",e)}get contentSchema(){return this.get("contentSchema")}set contentSchema(e){this.set("contentSchema",e)}};const qi=class extends Ni{constructor(e,t,s){super(e,t,s),this.element="linkDescription"}get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get hrefSchema(){return this.get("hrefSchema")}set hrefSchema(e){this.set("hrefSchema",e)}get headerSchema(){return this.get("headerSchema")}set headerSchema(e){this.set("headerSchema",e)}get submissionSchema(){return this.get("submissionSchema")}set submissionSchema(e){this.set("submissionSchema",e)}};const _i=class extends $i{constructor(e){super(e),this.element=new Ji}get defaultDialectIdentifier(){return"https://json-schema.org/draft/2019-09/schema"}ObjectElement(e){const t=e.node;this.handleDialectIdentifier(t),this.handleSchemaIdentifier(t),this.parent=this.element,Wn.prototype.ObjectElement.call(this,e),Zt(this.element.$ref)&&(this.element.classes.push("reference-element"),this.element.meta.set("referenced-element","schema"))}};const zi=class extends Rs{ObjectElement(e){this.enter(e),this.element.classes.push("json-schema-$vocabulary")}};const Hi=class extends Rs{StringElement(e){this.enter(e),this.element.classes.push("reference-value")}},Vi=hr(Gn,xr,Rs),Ui=hr(gr,xr,Rs);const Gi=class extends Ui{constructor(e){super(e),this.element=new H,this.element.classes.push("json-schema-$defs"),this.specPath=Bs(["document","objects","JSONSchema"])}};const Wi=class extends Vi{constructor(e){super(e),this.element=new Yt,this.element.classes.push("json-schema-allOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","JSONSchema"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Xi=class extends Vi{constructor(e){super(e),this.element=new Yt,this.element.classes.push("json-schema-anyOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","JSONSchema"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Ki=class extends Vi{constructor(e){super(e),this.element=new Yt,this.element.classes.push("json-schema-oneOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","JSONSchema"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Yi=class extends Ui{constructor(e){super(e),this.element=new H,this.element.classes.push("json-schema-dependentSchemas"),this.specPath=Bs(["document","objects","JSONSchema"])}};const Qi=class extends Vi{ObjectElement(e){this.element=this.toRefractedElement(["document","objects","JSONSchema"],e.node),e.stop()}ArrayElement(e){const t=e.node;this.element=new Yt,this.element.classes.push("json-schema-items"),t.forEach(e=>{const t=this.toRefractedElement(["document","objects","JSONSchema"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}BooleanElement(e){this.element=this.toRefractedElement(["document","objects","JSONSchema"],e.node),e.stop()}};const Zi=class extends Ui{constructor(e){super(e),this.element=new H,this.element.classes.push("json-schema-properties"),this.specPath=Bs(["document","objects","JSONSchema"])}};const eo=class extends Ui{constructor(e){super(e),this.element=new H,this.element.classes.push("json-schema-patternProperties"),this.specPath=Bs(["document","objects","JSONSchema"])}};const to=class extends Rs{ObjectElement(e){this.enter(e),this.element.classes.push("json-schema-dependentRequired")}};const so=class extends Di{constructor(e){super(e),this.element=new qi}},no=Pe(vi(["visitors","document","objects","JSONSchema","element"],"jSONSchema201909"),vi(["visitors","document","objects","JSONSchema","$visitor"],_i),vi(["visitors","document","objects","JSONSchema","fixedFields","$vocabulary"],zi),vi(["visitors","document","objects","JSONSchema","fixedFields","$anchor"],Ri.visitors.value),vi(["visitors","document","objects","JSONSchema","fixedFields","$recursiveAnchor"],Ri.visitors.value),vi(["visitors","document","objects","JSONSchema","fixedFields","$recursiveRef"],Ri.visitors.value),ki(["visitors","document","objects","JSONReference","$visitor"]),vi(["visitors","document","objects","JSONSchema","fixedFields","$ref"],Hi),ki(["visitors","document","objects","JSONSchema","fixedFields","definitions"]),vi(["visitors","document","objects","JSONSchema","fixedFields","$defs"],Gi),vi(["visitors","document","objects","JSONSchema","fixedFields","allOf"],Wi),vi(["visitors","document","objects","JSONSchema","fixedFields","anyOf"],Xi),vi(["visitors","document","objects","JSONSchema","fixedFields","oneOf"],Ki),vi(["visitors","document","objects","JSONSchema","fixedFields","not"],_i),vi(["visitors","document","objects","JSONSchema","fixedFields","if"],_i),vi(["visitors","document","objects","JSONSchema","fixedFields","then"],_i),vi(["visitors","document","objects","JSONSchema","fixedFields","else"],_i),ki(["visitors","document","objects","JSONSchema","fixedFields","dependencies"]),vi(["visitors","document","objects","JSONSchema","fixedFields","dependentSchemas"],Yi),vi(["visitors","document","objects","JSONSchema","fixedFields","items"],{$visitor:Qi,alias:"itemsField"}),vi(["visitors","document","objects","JSONSchema","fixedFields","contains"],_i),vi(["visitors","document","objects","JSONSchema","fixedFields","properties"],Zi),vi(["visitors","document","objects","JSONSchema","fixedFields","patternProperties"],eo),vi(["visitors","document","objects","JSONSchema","fixedFields","additionalProperties"],_i),vi(["visitors","document","objects","JSONSchema","fixedFields","additionalItems"],_i),vi(["visitors","document","objects","JSONSchema","fixedFields","propertyNames"],_i),vi(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedItems"],_i),vi(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedProperties"],_i),vi(["visitors","document","objects","JSONSchema","fixedFields","maxContains"],Ri.visitors.value),vi(["visitors","document","objects","JSONSchema","fixedFields","minContains"],Ri.visitors.value),vi(["visitors","document","objects","JSONSchema","fixedFields","dependentRequired"],to),vi(["visitors","document","objects","JSONSchema","fixedFields","deprecated"],Ri.visitors.value),vi(["visitors","document","objects","JSONSchema","fixedFields","contentSchema"],_i),vi(["visitors","document","objects","LinkDescription","element"],"linkDescription"),vi(["visitors","document","objects","LinkDescription","$visitor"],so),vi(["visitors","document","objects","LinkDescription","fixedFields","targetSchema"],_i),vi(["visitors","document","objects","LinkDescription","fixedFields","hrefSchema"],_i),vi(["visitors","document","objects","LinkDescription","fixedFields","headerSchema"],_i),vi(["visitors","document","objects","LinkDescription","fixedFields","submissionSchema"],_i))(Ri),ro=zt(no),io=e=>Object.entries(e).map(([e,t])=>It(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(Ji,"fixedFields",{get:()=>io(ro.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(qi,"fixedFields",{get:()=>io(ro.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const oo=class extends Ji{constructor(e,t,s){super(e,t,s),this.element="JSONSchema202012"}get $dynamicAnchor(){return this.get("$dynamicAnchor")}set $dynamicAnchor(e){this.set("$dynamicAnchor",e)}get $recursiveAnchor(){throw new d("$recursiveAnchor keyword from Core vocabulary has been renamed to $dynamicAnchor.")}set $recursiveAnchor(e){throw new d("$recursiveAnchor keyword from Core vocabulary has been renamed to $dynamicAnchor.")}get $dynamicRef(){return this.get("$dynamicRef")}set $dynamicRef(e){this.set("$dynamicRef",e)}get $recursiveRef(){throw new d("$recursiveRef keyword from Core vocabulary has been renamed to $dynamicRef.")}set $recursiveRef(e){throw new d("$recursiveRef keyword from Core vocabulary has been renamed to $dynamicRef.")}get prefixItems(){return this.get("prefixItems")}set prefixItems(e){this.set("prefixItems",e)}};const co=class extends qi{get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get hrefSchema(){return this.get("hrefSchema")}set hrefSchema(e){this.set("hrefSchema",e)}get headerSchema(){return this.get("headerSchema")}set headerSchema(e){this.set("headerSchema",e)}get submissionSchema(){return this.get("submissionSchema")}set submissionSchema(e){this.set("submissionSchema",e)}};const ao=class extends _i{constructor(e){super(e),this.element=new oo}get defaultDialectIdentifier(){return"https://json-schema.org/draft/2020-12/schema"}};const lo=class extends Vi{constructor(e){super(e),this.element=new Yt,this.element.classes.push("json-schema-prefixItems")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","JSONSchema"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const uo=class extends so{constructor(e){super(e),this.element=new co}},po=Pe(vi(["visitors","document","objects","JSONSchema","element"],"jSONSchema202012"),vi(["visitors","document","objects","JSONSchema","$visitor"],ao),ki(["visitors","document","objects","JSONSchema","fixedFields","$recursiveAnchor"]),vi(["visitors","document","objects","JSONSchema","fixedFields","$dynamicAnchor"],no.visitors.value),ki(["visitors","document","objects","JSONSchema","fixedFields","$recursiveRef"]),vi(["visitors","document","objects","JSONSchema","fixedFields","$dynamicRef"],no.visitors.value),vi(["visitors","document","objects","JSONSchema","fixedFields","not"],ao),vi(["visitors","document","objects","JSONSchema","fixedFields","if"],ao),vi(["visitors","document","objects","JSONSchema","fixedFields","then"],ao),vi(["visitors","document","objects","JSONSchema","fixedFields","else"],ao),vi(["visitors","document","objects","JSONSchema","fixedFields","prefixItems"],lo),vi(["visitors","document","objects","JSONSchema","fixedFields","items"],ao),vi(["visitors","document","objects","JSONSchema","fixedFields","contains"],ao),vi(["visitors","document","objects","JSONSchema","fixedFields","additionalProperties"],ao),ki(["visitors","document","objects","JSONSchema","fixedFields","additionalItems"]),vi(["visitors","document","objects","JSONSchema","fixedFields","propertyNames"],ao),vi(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedItems"],ao),vi(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedProperties"],ao),vi(["visitors","document","objects","JSONSchema","fixedFields","contentSchema"],ao),vi(["visitors","document","objects","LinkDescription","element"],"linkDescription"),vi(["visitors","document","objects","LinkDescription","$visitor"],uo),vi(["visitors","document","objects","LinkDescription","fixedFields","targetSchema"],ao),vi(["visitors","document","objects","LinkDescription","fixedFields","hrefSchema"],ao),vi(["visitors","document","objects","LinkDescription","fixedFields","headerSchema"],ao),vi(["visitors","document","objects","LinkDescription","fixedFields","submissionSchema"],ao))(no),ho=zt(po),mo=e=>Object.entries(e).map(([e,t])=>It(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(oo,"fixedFields",{get:()=>mo(ho.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(co,"fixedFields",{get:()=>mo(ho.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const fo=class extends oo{};const yo=class extends H{constructor(e,t,s){super(e,t,s),this.element="parameter"}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 value(){return this.get("value")}set value(e){this.set("value",e)}};const go=class extends H{constructor(e,t,s){super(e,t,s),this.element="payloadReplacement"}get target(){return this.get("target")}set target(e){this.set("target",e)}get value(){return this.get("value")}set value(e){this.set("value",e)}};const xo=class extends H{constructor(e,t,s){super(e,t,s),this.element="requestBody"}get contentType(){return this.get("contentType")}set contentType(e){this.set("contentType",e)}get payload(){return this.get("payload")}set payload(e){this.set("payload",e)}get replacements(){return this.get("replacements")}set replacements(e){this.set("replacements",e)}};const bo=class extends H{constructor(e,t,s){super(e,t,s),this.element="reusable",this.classes.push("arazzo-reference")}get reference(){return this.get("reference")}set reference(e){this.set("reference",e)}get value(){return this.get("value")}set value(e){this.set("value",e)}};const vo=class extends H{constructor(e,t,s){super(e,t,s),this.element="sourceDescription"}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 type(){return this.get("type")}set type(e){this.set("type",e)}};const So=class extends H{constructor(e,t,s){super(e,t,s),this.element="step"}get description(){return this.get("description")}set description(e){this.set("description",e)}get stepId(){return this.get("stepId")}set stepId(e){this.set("stepId",e)}get operationId(){return this.get("operationId")}set operationId(e){this.set("operationId",e)}get operationPath(){return this.get("operationPath")}set operationPath(e){this.set("operationPath",e)}get workflowId(){return this.get("workflowId")}set workflowId(e){this.set("workflowId",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}get requestBody(){return this.get("requestBody")}set requestBody(e){this.set("requestBody",e)}get successCriteria(){return this.get("successCriteria")}set successCriteria(e){this.set("successCriteria",e)}get onSuccess(){return this.get("onSuccess")}set onSuccess(e){this.set("onSuccess",e)}get onFailure(){return this.get("onFailure")}set onFailure(e){this.set("onFailure",e)}get outputs(){return this.get("outputs")}set outputs(e){this.set("outputs",e)}};const wo=class extends H{constructor(e,t,s){super(e,t,s),this.element="successAction"}get name(){return this.get("name")}set name(e){this.set("name",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}get workflowId(){return this.get("workflowId")}set workflowId(e){this.set("workflowId",e)}get stepId(){return this.get("stepId")}set stepId(e){this.set("stepId",e)}get criteria(){return this.get("criteria")}set criteria(e){this.set("criteria",e)}};const Eo=class extends H{constructor(e,t,s){super(e,t,s),this.element="workflow"}get workflowId(){return this.get("workflowId")}set workflowId(e){this.set("workflowId",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)}get inputs(){return this.get("inputs")}set inputs(e){this.set("inputs",e)}get dependsOn(){return this.get("dependsOn")}set dependsOn(e){this.set("dependsOn",e)}get steps(){return this.get("steps")}set steps(e){this.set("steps",e)}get successActions(){return this.get("successActions")}set successActions(e){this.set("successActions",e)}get failureActions(){return this.get("failureActions")}set failureActions(e){this.set("failureActions",e)}get outputs(){return this.get("outputs")}set outputs(e){this.set("outputs",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}},Oo={namespace:e=>{const{base:t}=e;return t.register("arazzo",J),t.register("arazzoSpecification1",V),t.register("components",U),t.register("criterion",G),t.register("criterionExpressionType",W),t.register("failureAction",X),t.register("info",K),t.register("parameter",yo),t.register("payloadReplacement",go),t.register("requestBody",xo),t.register("reusable",bo),t.register("sourceDescription",vo),t.register("step",So),t.register("successAction",wo),t.register("workflow",Eo),t.register("jSONSchema202012",fo),t}},ko={ArazzoSpecification1Element:{info:(e,t,s)=>new K(e,t,s)}},Ao=(e,t)=>{const s=Nn(e),n=ko[s]||ko[Ps(e.classes.first)];if(void 0!==n)return Object.hasOwn(n,"[key: *]")?n["[key: *]"]:n[t]},jo=()=>()=>({visitor:{StringElement(e){const t=e.node;if(!(e=>Zt(e)&&cs(e,["yaml-e-node","yaml-e-scalar"]))(t))return;const s=e.getAncestorNodes().filter(Qt),n=s.at(0);let r,i;if(ns(n)?(i=t,r=Ao(n,"<*>")):is(n)&&(i=s.at(1),r=Ao(i,Ps(n.key))),"function"!=typeof r)return;const o=r(void 0,bs(t.meta),bs(t.attributes));ds.transfer(t,o),e.replaceWith(o)}}});var Fo=ie(function(e,t,s){var n,r={};for(n in s=s||{},t=t||{})v(n,t)&&(r[n]=v(n,s)?e(n,t[n],s[n]):t[n]);for(n in s)v(n,s)&&!v(n,r)&&(r[n]=s[n]);return r});const Io=Fo;var Po=ie(function e(t,s,n){return Io(function(s,n,r){return Le(n)&&Le(r)?e(t,n,r):t(s,n,r)},s,n)});const Co=Po;const Mo=g(function(e,t){return Co(function(e,t,s){return s},e,t)});const To=ie(function(e,t,s){return Ls(e,ae(t,s))});const No=Fe(0,-1);var $o=g(function(e,t){return e.apply(this,t)});const Do=$o;const Ro=ft(kt);const Bo=ht(ni,Vs);const Lo=it(3,function(e,t,s){var n=pe(e,s),r=pe(No(e),s);if(!Ro(n)&&!Bo(e)){var i=Se(n,r);return Do(i,t)}});const Jo=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 ds)){const s=ds.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]))})}},qo=e=>null===e,_o=e=>"string"==typeof e,zo=e=>"number"==typeof e,Ho=e=>"boolean"==typeof e,Vo=e=>null!==e&&"object"==typeof e;class Uo{elementMap={};elementDetection=[];Element;KeyValuePair;_elements;_attributeElementKeys=[];_attributeElementArrayKeys=[];constructor(e){this.Element=B,this.KeyValuePair=N,e&&e.noDefault||this.useDefault()}use(e){return e.namespace&&e.namespace({base:this}),e.load&&e.load({base:this}),this}useDefault(){return this.register("null",Xt).register("string",L).register("number",Wt).register("boolean",Kt).register("array",Yt).register("object",H).register("member",z).register("ref",Os).register("link",Es).register("sourceMap",ds),this.detect(qo,Xt,!1).detect(_o,L,!1).detect(zo,Wt,!1).detect(Ho,Kt,!1).detect(Array.isArray,Yt,!1).detect(Vo,H,!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 Jo(this)}}Jo.prototype.Namespace=Uo;const Go=Uo,Wo=new Go,Xo={isElement:Qt,isStringElement:Zt,isNumberElement:es,isNullElement:ts,isBooleanElement:ss,isArrayElement:ns,isObjectElement:rs,isMemberElement:is,isPrimitiveElement:e=>rs(e)&&"object"===e.element||ns(e)&&"array"===e.element||ss(e)&&"boolean"===e.element||es(e)&&"number"===e.element||Zt(e)&&"string"===e.element||ts(e)&&"null"===e.element||is(e)&&"member"===e.element,isLinkElement:Fs,isRefElement:Is,isAnnotationElement:e=>e instanceof ks,isCommentElement:e=>e instanceof As,isParseResultElement:e=>e instanceof js,isSourceMapElement:e=>e instanceof ds,hasElementSourceMap:os,includesSymbols:(e,t)=>{if(0===t.length)return!0;if(!e.hasAttributesProperty("symbols"))return!1;const s=e.attributes.get("symbols");return!!ns(s)&&t.every(e=>s.includes(e))},includesClasses:cs},Ko={toolboxCreator:()=>({predicates:Xo,namespace:Wo}),visitorOptions:{exposeEdits:!0}},Yo=(e,t,s={})=>{if(0===t.length)return e;const n=Mo(Ko,s),{toolboxCreator:r,visitorOptions:i}=n,o=r(),c=t.map(e=>e(o)),a=qn(c.map(To({},"visitor")),i);c.forEach(Lo(["pre"],[]));const l=Vn(e,a);return c.forEach(Lo(["post"],[])),l};function Qo(e){return void 0===e?new Xt:Zo(e)}function Zo(e){if(e instanceof B)return e;if("string"==typeof e)return new L(e);if("number"==typeof e)return new Wt(e);if("boolean"==typeof e)return new Kt(e);if(null===e)return new Xt;if(Array.isArray(e))return new Yt(e.map(Qo));if("object"==typeof e)return new H(e);throw new Error("Cannot refract value of type "+typeof e)}Yo[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,s={})=>{if(0===t.length)return e;const n=Mo(Ko,s),{toolboxCreator:r,visitorOptions:i}=n,o=r(),c=t.map(e=>e(o)),a=_n(c.map(To({},"visitor")),i);await Promise.allSettled(c.map(Lo(["pre"],[])));const l=await Un(e,a);return await Promise.allSettled(c.map(Lo(["post"],[]))),l},B.prototype.ObjectElement=H,B.prototype.ArrayElement=Yt,B.prototype.RefElement=Os,B.prototype.MemberElement=z,B.prototype.refract=Zo;const ec=class{element;constructor(e={}){Object.assign(this,e)}copyMetaAndAttributes(e,t){if(!e.isMetaEmpty||!t.isMetaEmpty){const s=t.isMetaEmpty?new H:t.meta,n=e.isMetaEmpty?new H:e.meta;t.meta=$s(s,n)}if(!e.isAttributesEmpty||!t.isAttributesEmpty){const s=t.isAttributesEmpty?new H:t.attributes,n=e.isAttributesEmpty?new H:e.attributes;t.attributes=$s(s,n)}ds.transfer(e,t)}};const tc=class extends ec{enter(e){this.element=bs(e.node),e.stop()}};const sc=class extends ec{specObj;passingOptionsNames=["specObj"];constructor({specObj:e,...t}){super({...t}),this.specObj=e}retrievePassingOptions(){return Ys(this.passingOptionsNames,this)}retrieveFixedFields(e){const t=pe(["visitors",...e,"fixedFields"],this.specObj);return"object"==typeof t&&null!==t?Object.keys(t):[]}retrieveVisitor(e){return Xe(kt,["visitors",...e],this.specObj)?pe(["visitors",...e],this.specObj):pe(["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 tc&&n?.constructor===tc?bs(t):(Vn(t,n,s),n.element)}};var nc=function(){function e(e,t){this.xf=t,this.n=e,this.i=0}return e.prototype["@@transducer/init"]=Je,e.prototype["@@transducer/result"]=qe,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?ei(s):s},e}();function rc(e){return function(t){return new nc(e,t)}}const ic=g(Be(["take"],rc,function(e,t){return Fe(0,e<0?1/0:e,t)}));const oc=g(function(e,t){return T(ic(e.length,t),e)}),cc=e=>Zt(e.key)&&oc("x-",Ps(e.key)),ac=e=>rs(e)&&e.hasKey("reference");const lc=class extends sc{specPath;ignoredFields;canSupportSpecificationExtensions=!0;specificationExtensionPredicate=cc;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)=>{if(Zt(t)&&n.includes(Ps(t))&&!this.ignoredFields.includes(Ps(t))){const n=this.toRefractedElement([...s,"fixedFields",Ps(t)],e),i=new z(bs(t),n);this.copyMetaAndAttributes(r,i),i.classes.push("fixed-field"),this.element.push(i)}else if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(r)){const e=this.toRefractedElement(["document","extension"],r);this.element.push(e)}else this.ignoredFields.includes(Ps(t))||this.element.push(bs(r))}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const uc=class extends sc{specPath;ignoredFields;fieldPatternPredicate=fr;canSupportSpecificationExtensions=!1;specificationExtensionPredicate=cc;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)=>{if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(s)){const e=this.toRefractedElement(["document","extension"],s);this.element.push(e)}else if(!this.ignoredFields.includes(Ps(t))&&this.fieldPatternPredicate(Ps(t))){const n=this.specPath(e),r=this.toRefractedElement(n,e),i=new z(bs(t),r);this.copyMetaAndAttributes(s,i),i.classes.push("patterned-field"),this.element.push(i)}else this.ignoredFields.includes(Ps(t))||this.element.push(bs(s))}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const pc=class extends uc{constructor(e){super(e),this.fieldPatternPredicate=Ks}},dc=hr(sc,tc),hc=hr(lc,tc),mc=hr(pc,tc);const fc=class extends hc{element;specPath;canSupportSpecificationExtensions;constructor(e){super(e),this.element=new V,this.specPath=Bs(["document","objects","ArazzoSpecification"]),this.canSupportSpecificationExtensions=!0}ObjectElement(e){return lc.prototype.ObjectElement.call(this,e)}};const yc=class extends dc{StringElement(e){const t=e.node,s=new J(Ps(t));this.copyMetaAndAttributes(t,s),this.element=s,e.stop()}};class gc extends Yt{static primaryClass="source-descriptions";constructor(e,t,s){super(e,t,s),this.classes.push(gc.primaryClass)}}const xc=gc;const bc=class extends dc{element;constructor(e){super(e),this.element=new xc}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","SourceDescription"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};class vc extends Yt{static primaryClass="workflows";constructor(e,t,s){super(e,t,s),this.classes.push(vc.primaryClass)}}const Sc=vc;const wc=class extends dc{element;constructor(e){super(e),this.element=new Sc}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","Workflow"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Ec=class extends hc{constructor(e){super(e),this.element=new K,this.specPath=Bs(["document","objects","Info"]),this.canSupportSpecificationExtensions=!0}};const Oc=class extends tc{StringElement(e){super.enter(e),this.element.classes.push("arazzo-version"),this.element.classes.push("version")}};const kc=class extends hc{constructor(e){super(e),this.element=new vo,this.specPath=Bs(["document","objects","SourceDescription"]),this.canSupportSpecificationExtensions=!0}};const Ac=class extends tc{StringElement(e){super.enter(e),this.element.classes.push("source-description-url")}};const jc=class extends hc{constructor(e){super(e),this.element=new Eo,this.specPath=Bs(["document","objects","Workflow"]),this.canSupportSpecificationExtensions=!0}};class Fc extends Yt{static primaryClass="workflow-depends-on";constructor(e,t,s){super(e,t,s),this.classes.push(Fc.primaryClass)}}const Ic=Fc;const Pc=class extends dc{element;constructor(e){super(e),this.element=new Ic}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["value"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};class Cc extends Yt{static primaryClass="workflow-steps";constructor(e,t,s){super(e,t,s),this.classes.push(Cc.primaryClass)}}const Mc=Cc;const Tc=class extends dc{constructor(e){super(e),this.element=new Mc}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","Step"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};class Nc extends Yt{static primaryClass="workflow-success-actions";constructor(e,t,s){super(e,t,s),this.classes.push(Nc.primaryClass)}}const $c=Nc,Dc=e=>e instanceof oo;class Rc extends H{static primaryClass="components-failure-actions";constructor(e,t,s){super(e,t,s),this.classes.push(Rc.primaryClass)}}const Bc=Rc;class Lc extends H{static primaryClass="components-inputs";constructor(e,t,s){super(e,t,s),this.classes.push(Lc.primaryClass)}}const Jc=Lc;class qc extends H{static primaryClass="components-parameters";constructor(e,t,s){super(e,t,s),this.classes.push(qc.primaryClass),this.classes.push("parameters")}}const _c=qc;class zc extends H{static primaryClass="components-success-actions";constructor(e,t,s){super(e,t,s),this.classes.push(zc.primaryClass)}}const Hc=zc;class Vc extends Yt{static primaryClass="failure-action-criteria";constructor(e,t,s){super(e,t,s),this.classes.push(Vc.primaryClass),this.classes.push("criteria")}}const Uc=Vc;class Gc extends Yt{static primaryClass="request-body-replacements";constructor(e,t,s){super(e,t,s),this.classes.push(Gc.primaryClass)}}const Wc=Gc;class Xc extends Yt{static primaryClass="step-depends-on";constructor(e,t,s){super(e,t,s),this.classes.push(Xc.primaryClass)}}const Kc=Xc;class Yc extends Yt{static primaryClass="step-on-failure";constructor(e,t,s){super(e,t,s),this.classes.push(Yc.primaryClass)}}const Qc=Yc;class Zc extends Yt{static primaryClass="step-on-success";constructor(e,t,s){super(e,t,s),this.classes.push(Zc.primaryClass)}}const ea=Zc;class ta extends H{static primaryClass="step-outputs";constructor(e,t,s){super(e,t,s),this.classes.push(ta.primaryClass)}}const sa=ta;class na extends Yt{static primaryClass="step-parameters";constructor(e,t,s){super(e,t,s),this.classes.push(na.primaryClass),this.classes.push("parameters")}}const ra=na;class ia extends Yt{static primaryClass="step-success-criteria";constructor(e,t,s){super(e,t,s),this.classes.push(ia.primaryClass),this.classes.push("criteria")}}const oa=ia;class ca extends Yt{static primaryClass="success-action-criteria";constructor(e,t,s){super(e,t,s),this.classes.push(ca.primaryClass),this.classes.push("criteria")}}const aa=ca;class la extends Yt{static primaryClass="workflow-failure-actions";constructor(e,t,s){super(e,t,s),this.classes.push(la.primaryClass)}}const ua=la;class pa extends H{static primaryClass="workflow-outputs";constructor(e,t,s){super(e,t,s),this.classes.push(pa.primaryClass)}}const da=pa;class ha extends Yt{static primaryClass="workflow-parameters";constructor(e,t,s){super(e,t,s),this.classes.push(ha.primaryClass),this.classes.push("parameters")}}const ma=ha,fa=e=>e instanceof J,ya=e=>e instanceof V,ga=e=>e instanceof U,xa=e=>e instanceof G,ba=e=>e instanceof W,va=e=>e instanceof X,Sa=e=>e instanceof K,wa=e=>e instanceof yo,Ea=e=>e instanceof go,Oa=e=>e instanceof xo,ka=e=>e instanceof bo,Aa=e=>e instanceof vo,ja=e=>e instanceof So,Fa=e=>e instanceof wo,Ia=e=>e instanceof Eo,Pa=e=>e instanceof Bc,Ca=e=>e instanceof Jc,Ma=e=>e instanceof _c,Ta=e=>e instanceof Hc,Na=e=>e instanceof Uc,$a=e=>e instanceof Wc,Da=e=>e instanceof xc,Ra=e=>e instanceof Kc,Ba=e=>e instanceof Qc,La=e=>e instanceof ea,Ja=e=>e instanceof sa,qa=e=>e instanceof ra,_a=e=>e instanceof oa,za=e=>e instanceof aa,Ha=e=>e instanceof Ic,Va=e=>e instanceof ua,Ua=e=>e instanceof da,Ga=e=>e instanceof ma,Wa=e=>e instanceof Sc,Xa=e=>e instanceof Mc,Ka=e=>e instanceof $c;const Ya=class extends dc{constructor(e){super(e),this.element=new $c}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=ac(e)?["document","objects","Reusable"]:["document","objects","SuccessAction"],s=this.toRefractedElement(t,e);ka(s)&&s.meta.set("referenced-element","successAction"),this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Qa=class extends dc{constructor(e){super(e),this.element=new ua}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=ac(e)?["document","objects","Reusable"]:["document","objects","FailureAction"],s=this.toRefractedElement(t,e);ka(s)&&s.meta.set("referenced-element","failureAction"),this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Za=class extends mc{constructor(e){super(e),this.element=new da,this.specPath=Bs(["value"])}};const el=class extends dc{constructor(e){super(e),this.element=new ma}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=ac(e)?["document","objects","Reusable"]:["document","objects","Parameter"],s=this.toRefractedElement(t,e);ka(s)&&s.meta.set("referenced-element","parameter"),this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const tl=class extends hc{constructor(e){super(e),this.element=new So,this.specPath=Bs(["document","objects","Step"]),this.canSupportSpecificationExtensions=!0}};const sl=class extends dc{constructor(e){super(e),this.element=new ra}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=ac(e)?["document","objects","Reusable"]:["document","objects","Parameter"],s=this.toRefractedElement(t,e);ka(s)&&s.meta.set("referenced-element","parameter"),this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const nl=class extends dc{constructor(e){super(e),this.element=new oa}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","Criterion"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const rl=class extends dc{constructor(e){super(e),this.element=new ea}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=ac(e)?["document","objects","Reusable"]:["document","objects","SuccessAction"],s=this.toRefractedElement(t,e);ka(s)&&s.meta.set("referenced-element","successAction"),this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const il=class extends dc{constructor(e){super(e),this.element=new Qc}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=ac(e)?["document","objects","Reusable"]:["document","objects","FailureAction"],s=this.toRefractedElement(t,e);ka(s)&&s.meta.set("referenced-element","failureAction"),this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const ol=class extends mc{constructor(e){super(e),this.element=new sa,this.specPath=Bs(["value"])}};const cl=class extends hc{constructor(e){super(e),this.element=new yo,this.specPath=Bs(["document","objects","Parameter"]),this.canSupportSpecificationExtensions=!0}};const al=class extends hc{constructor(e){super(e),this.element=new wo,this.specPath=Bs(["document","objects","SuccessAction"]),this.canSupportSpecificationExtensions=!0}};const ll=class extends dc{element;constructor(e){super(e),this.element=new aa}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","Criterion"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const ul=class extends hc{constructor(e){super(e),this.element=new X,this.specPath=Bs(["document","objects","FailureAction"]),this.canSupportSpecificationExtensions=!0}};const pl=class extends dc{element;constructor(e){super(e),this.element=new Uc}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","Criterion"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const dl=class extends hc{constructor(e){super(e),this.element=new U,this.specPath=Bs(["document","objects","Components"]),this.canSupportSpecificationExtensions=!0}};const hl=class extends mc{constructor(e){super(e),this.element=new Jc,this.specPath=Bs(["document","objects","JSONSchema"]),this.fieldPatternPredicate=e=>/^[a-zA-Z0-9.\-_]+$/.test(String(e))}};const ml=class extends mc{constructor(e){super(e),this.element=new _c,this.specPath=Bs(["document","objects","Parameter"]),this.fieldPatternPredicate=e=>/^[a-zA-Z0-9.\-_]+$/.test(String(e))}};const fl=class extends mc{constructor(e){super(e),this.element=new Hc,this.specPath=Bs(["document","objects","SuccessAction"]),this.fieldPatternPredicate=e=>/^[a-zA-Z0-9.\-_]+$/.test(String(e))}};const yl=class extends mc{constructor(e){super(e),this.element=new Bc,this.specPath=Bs(["document","objects","FailureAction"]),this.fieldPatternPredicate=e=>/^[a-zA-Z0-9.\-_]+$/.test(String(e))}};const gl=class extends hc{constructor(e){super(e),this.element=new bo,this.specPath=Bs(["document","objects","Reusable"]),this.canSupportSpecificationExtensions=!1}ObjectElement(e){const t=lc.prototype.ObjectElement.call(this,e);return Zt(this.element.reference)&&this.element.classes.push("reference-element"),t}};const xl=class extends tc{StringElement(e){super.enter(e),this.element.classes.push("reference-value")}};const bl=class extends hc{constructor(e){super(e),this.element=new G,this.specPath=Bs(["document","objects","Criterion"]),this.canSupportSpecificationExtensions=!0}};const vl=class extends dc{ObjectElement(e){const t=e.node;return this.toRefractedElement(["document","objects","CriterionExpressionType"],t)}};const Sl=class extends hc{constructor(e){super(e),this.element=new W,this.specPath=Bs(["document","objects","CriterionExpressionType"]),this.canSupportSpecificationExtensions=!0}};const wl=class extends tc{StringElement(e){super.enter(e),this.element.classes.push("version")}};const El=class extends hc{constructor(e){super(e),this.element=new xo,this.specPath=Bs(["document","objects","RequestBody"]),this.canSupportSpecificationExtensions=!0}};const Ol=class extends dc{element;constructor(e){super(e),this.element=new Wc}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","PayloadReplacement"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const kl=class extends hc{constructor(e){super(e),this.element=new go,this.specPath=Bs(["document","objects","PayloadReplacement"]),this.canSupportSpecificationExtensions=!0}};const Al=class extends ao{constructor(e){super(e),this.element=new fo}};const jl=class extends sc{MemberElement(e){const t=e.node;this.element=bs(t),this.element.classes.push("specification-extension"),e.stop()}},{JSONSchema:{fixedFields:Fl}}=po.visitors.document.objects,Il={visitors:{value:tc,document:{objects:{ArazzoSpecification:{element:"arazzoSpecification1",$visitor:fc,fixedFields:{arazzo:{element:"arazzo",$visitor:yc},info:{$ref:"#/visitors/document/objects/Info"},sourceDescriptions:bc,workflows:wc,components:{$ref:"#/visitors/document/objects/Components"}}},Info:{element:"info",$visitor:Ec,fixedFields:{title:{$ref:"#/visitors/value"},summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},version:Oc}},SourceDescription:{element:"sourceDescription",$visitor:kc,fixedFields:{name:{$ref:"#/visitors/value"},url:Ac,type:{$ref:"#/visitors/value"}}},Workflow:{element:"workflow",$visitor:jc,fixedFields:{workflowId:{$ref:"#/visitors/value"},summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},inputs:Al,dependsOn:Pc,steps:Tc,successActions:Ya,failureActions:Qa,outputs:Za,parameters:el}},Step:{element:"step",$visitor:tl,fixedFields:{description:{$ref:"#/visitors/value"},stepId:{$ref:"#/visitors/value"},operationId:{$ref:"#/visitors/value"},operationPath:{$ref:"#/visitors/value"},workflowId:{$ref:"#/visitors/value"},parameters:sl,requestBody:{$ref:"#/visitors/document/objects/RequestBody"},successCriteria:nl,onSuccess:rl,onFailure:il,outputs:ol}},Parameter:{element:"parameter",$visitor:cl,fixedFields:{name:{$ref:"#/visitors/value"},in:{$ref:"#/visitors/value"},value:{$ref:"#/visitors/value"}}},SuccessAction:{element:"successAction",$visitor:al,fixedFields:{name:{$ref:"#/visitors/value"},type:{$ref:"#/visitors/value"},workflowId:{$ref:"#/visitors/value"},stepId:{$ref:"#/visitors/value"},criteria:ll}},FailureAction:{element:"failureAction",$visitor:ul,fixedFields:{name:{$ref:"#/visitors/value"},type:{$ref:"#/visitors/value"},workflowId:{$ref:"#/visitors/value"},stepId:{$ref:"#/visitors/value"},retryAfter:{$ref:"#/visitors/value"},retryLimit:{$ref:"#/visitors/value"},criteria:pl}},Components:{element:"components",$visitor:dl,fixedFields:{inputs:hl,parameters:ml,successActions:fl,failureActions:yl}},Reusable:{element:"reusable",$visitor:gl,fixedFields:{reference:xl,value:{$ref:"#/visitors/value"}}},Criterion:{element:"criterion",$visitor:bl,fixedFields:{context:{$ref:"#/visitors/value"},condition:{$ref:"#/visitors/value"},type:vl}},CriterionExpressionType:{element:"criterionExpressionType",$visitor:Sl,fixedFields:{type:{$ref:"#/visitors/value"},version:wl}},RequestBody:{element:"requestBody",$visitor:El,fixedFields:{contentType:{$ref:"#/visitors/value"},payload:{$ref:"#/visitors/value"},replacements:Ol}},PayloadReplacement:{element:"payloadReplacement",$visitor:kl,fixedFields:{target:{$ref:"#/visitors/value"},value:{$ref:"#/visitors/value"}}},JSONSchema:{element:"jSONSchema202012",$visitor:Al,fixedFields:{...Fl}}},extension:{$visitor:jl}}}},Pl=()=>{const e=new Go,t={...s,...n,isStringElement:Zt};return e.use(Oo),{predicates:t,namespace:e}},Cl=(e,{element:t="arazzoSpecification1",plugins:s=[],specificationObj:n=Il}={})=>{const r=Zo(e),i=zt(n),o=i.elementMap[t];if(!o)throw new Error(`Unknown element type: "${t}"`);const c=new(pe(o,i))({specObj:i});return Vn(r,c),Yo(c.element,s,{toolboxCreator:Pl})},Ml=(e,t={})=>Cl(e,{...t,element:"arazzo"}),Tl=(e,t={})=>Cl(e,{...t,element:"arazzoSpecification1"}),Nl=(e,t={})=>Cl(e,{...t,element:"components"}),$l=(e,t={})=>Cl(e,{...t,element:"criterion"}),Dl=(e,t={})=>Cl(e,{...t,element:"criterionExpressionType"}),Rl=(e,t={})=>Cl(e,{...t,element:"failureAction"}),Bl=(e,t={})=>Cl(e,{...t,element:"info"}),Ll=(e,t={})=>Cl(e,{...t,element:"jSONSchema202012"}),Jl=(e,t={})=>Cl(e,{...t,element:"parameter"}),ql=(e,t={})=>Cl(e,{...t,element:"payloadReplacement"}),_l=(e,t={})=>Cl(e,{...t,element:"requestBody"}),zl=(e,t={})=>Cl(e,{...t,element:"reusable"}),Hl=(e,t={})=>Cl(e,{...t,element:"sourceDescription"}),Vl=(e,t={})=>Cl(e,{...t,element:"step"}),Ul=(e,t={})=>Cl(e,{...t,element:"successAction"}),Gl=(e,t={})=>Cl(e,{...t,element:"workflow"}),Wl=Cl;return t})());
|