@speclynx/apidom-ns-json-schema-2020-12 2.0.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [2.1.0](https://github.com/speclynx/apidom/compare/v2.0.1...v2.1.0) (2026-01-17)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @speclynx/apidom-ns-json-schema-2020-12
|
|
9
|
+
|
|
6
10
|
## [2.0.1](https://github.com/speclynx/apidom/compare/v2.0.0...v2.0.1) (2026-01-14)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @speclynx/apidom-ns-json-schema-2020-12
|
|
@@ -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.apidomNsJSONSchema202012=t():e.apidomNsJSONSchema202012=t()}(self,()=>(()=>{"use strict";var e={d:(t,n)=>{for(var s in n)e.o(n,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:n[s]})},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,{$defsVisitor:()=>Yr,$refVisitor:()=>Gr,$vocabularyVisitor:()=>Kr,AllOfVisitor:()=>Zr,AlternatingVisitor:()=>pr,AnyOfVisitor:()=>ei,BaseSchemaArrayVisitor:()=>Qr,BaseSchemaMapVisitor:()=>Xr,DependentRequiredVisitor:()=>oi,DependentSchemasVisitor:()=>ni,FallbackVisitor:()=>On,FixedFieldsVisitor:()=>Zn,ItemsVisitor:()=>si,JSONSchema202012MediaTypes:()=>f,JSONSchemaElement:()=>hi,JSONSchemaVisitor:()=>Ci,LinkDescriptionElement:()=>mi,LinkDescriptionVisitor:()=>qi,MapVisitor:()=>Os,OneOfVisitor:()=>ti,ParentSchemaAwareVisitor:()=>ws,PatternPropertiesVisitor:()=>ii,PatternedFieldsVisitor:()=>js,PrefixItemsVisitor:()=>Li,PropertiesVisitor:()=>ri,SpecificationVisitor:()=>Yn,Visitor:()=>jn,default:()=>di,isJSONSchemaElement:()=>Wi,isLinkDescriptionElement:()=>zi,mediaTypes:()=>p,refract:()=>Qi,refractJSONSchema:()=>Ki,refractLinkDescription:()=>Gi,refractorPluginReplaceEmptyElement:()=>yi,specificationObj:()=>Bi});var n={};function s(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function r(e){return function t(n){return 0===arguments.length||s(n)?t:e.apply(this,arguments)}}function i(e,t){return t[e<0?t.length+e:e]}e.r(n),e.d(n,{isJSONSchemaElement:()=>Wi,isLinkDescriptionElement:()=>zi});const o=r(function(e){return i(-1,e)});class c extends AggregateError{constructor(e,t,n){super(e,t,n),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const a=c;class u extends Error{static[Symbol.hasInstance](e){return super[Symbol.hasInstance](e)||Function.prototype[Symbol.hasInstance].call(a,e)}constructor(e,t){super(e,t),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const l=u;const h=class extends l{};const m=class extends h{};const d=class extends Array{unknownMediaType="application/octet-stream";filterByFormat(){throw new m("filterByFormat method in MediaTypes class is not yet implemented.")}findBy(){throw new m("findBy method in MediaTypes class is not yet implemented.")}latest(){throw new m("latest method in MediaTypes class is not yet implemented.")}};class f extends d{filterByFormat(e="generic"){const t="generic"===e?"schema;version":e;return this.filter(e=>e.includes(t))}findBy(e="2020-12",t="generic"){const n="generic"===t?`schema;version=${e}`:`schema+${t};version=${e}`;return this.find(e=>e.includes(n))||this.unknownMediaType}latest(e="generic"){return o(this.filterByFormat(e))}}const p=new f("application/schema;version=2020-12","application/schema+json;version=2020-12","application/schema+yaml;version=2020-12");function y(e,t,n){for(var s=0,r=n.length;s<r;)t=e(t,n[s]),s+=1;return t}function v(e){return function t(n,i){switch(arguments.length){case 0:return t;case 1:return s(n)?t:r(function(t){return e(n,t)});default:return s(n)&&s(i)?t:s(n)?r(function(t){return e(t,i)}):s(i)?r(function(t){return e(n,t)}):e(n,i)}}}function g(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var b=Object.prototype.toString;const S=function(){return"[object Arguments]"===b.call(arguments)?function(e){return"[object Arguments]"===b.call(e)}:function(e){return g("callee",e)}}();var j=!{toString:null}.propertyIsEnumerable("toString"),O=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],w=function(){return arguments.propertyIsEnumerable("length")}(),x=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},E="function"!=typeof Object.keys||w?r(function(e){if(Object(e)!==e)return[];var t,n,s=[],r=w&&S(e);for(t in e)!g(t,e)||r&&"length"===t||(s[s.length]=t);if(j)for(n=O.length-1;n>=0;)g(t=O[n],e)&&!x(s,t)&&(s[s.length]=t),n-=1;return s}):r(function(e){return Object(e)!==e?[]:Object.keys(e)});const k=E;const A=v(function(e,t){return y(function(n,s){return n[s]=e(t[s],s,t),n},{},k(t))});const N=r(function(e){return null==e});var F=v(function(e,t){if(0===e.length||N(t))return!1;for(var n=t,s=0;s<e.length;){if(N(n)||!g(e[s],n))return!1;n=n[e[s]],s+=1}return!0});const P=F;var $=v(function(e,t){return P([e],t)});const M=$;function J(e){return function t(n,i,o){switch(arguments.length){case 0:return t;case 1:return s(n)?t:v(function(t,s){return e(n,t,s)});case 2:return s(n)&&s(i)?t:s(n)?v(function(t,n){return e(t,i,n)}):s(i)?v(function(t,s){return e(n,t,s)}):r(function(t){return e(n,i,t)});default:return s(n)&&s(i)&&s(o)?t:s(n)&&s(i)?v(function(t,n){return e(t,n,o)}):s(n)&&s(o)?v(function(t,n){return e(t,i,n)}):s(i)&&s(o)?v(function(t,s){return e(n,t,s)}):s(n)?r(function(t){return e(t,i,o)}):s(i)?r(function(t){return e(n,t,o)}):s(o)?r(function(t){return e(n,i,t)}):e(n,i,o)}}}const _=Number.isInteger||function(e){return(e|0)===e};const R=function(e,t){if(null!=t)return _(e)?i(e,t):t[e]};const T=v(R);const D=J(function(e,t,n){return e(T(t,n))});function I(e,t){for(var n=t,s=0;s<e.length;s+=1){if(null==n)return;var r=e[s];n=_(r)?i(r,n):n[r]}return n}const V=v(I);function C(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,s){return t.apply(this,arguments)};case 4:return function(e,n,s,r){return t.apply(this,arguments)};case 5:return function(e,n,s,r,i){return t.apply(this,arguments)};case 6:return function(e,n,s,r,i,o){return t.apply(this,arguments)};case 7:return function(e,n,s,r,i,o,c){return t.apply(this,arguments)};case 8:return function(e,n,s,r,i,o,c,a){return t.apply(this,arguments)};case 9:return function(e,n,s,r,i,o,c,a,u){return t.apply(this,arguments)};case 10:return function(e,n,s,r,i,o,c,a,u,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function L(e,t){return function(){return t.call(this,e.apply(this,arguments))}}const q=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};function B(e){return"[object String]"===Object.prototype.toString.call(e)}const W=r(function(e){return!!q(e)||!!e&&("object"==typeof e&&(!B(e)&&(0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))});var z="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function U(e,t,n){return function(s,r,i){if(W(i))return e(s,r,i);if(null==i)return r;if("function"==typeof i["fantasy-land/reduce"])return t(s,r,i,"fantasy-land/reduce");if(null!=i[z])return n(s,r,i[z]());if("function"==typeof i.next)return n(s,r,i);if("function"==typeof i.reduce)return t(s,r,i,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function H(e,t,n){for(var s=0,r=n.length;s<r;){if((t=e["@@transducer/step"](t,n[s]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}s+=1}return e["@@transducer/result"](t)}const K=v(function(e,t){return C(e.length,function(){return e.apply(t,arguments)})});function G(e,t,n){for(var s=n.next();!s.done;){if((t=e["@@transducer/step"](t,s.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}s=n.next()}return e["@@transducer/result"](t)}function Q(e,t,n,s){return e["@@transducer/result"](n[s](K(e["@@transducer/step"],e),t))}const X=U(H,Q,G);var Y=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 Z=J(function(e,t,n){return X("function"==typeof e?new Y(e):e,t,n)});function ee(e,t){return function(){var n=arguments.length;if(0===n)return t();var s=arguments[n-1];return q(s)||"function"!=typeof s[e]?t.apply(this,arguments):s[e].apply(s,Array.prototype.slice.call(arguments,0,n-1))}}const te=J(ee("slice",function(e,t,n){return Array.prototype.slice.call(n,e,t)}));const ne=r(ee("tail",te(1,1/0)));function se(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return C(arguments[0].length,Z(L,arguments[0],ne(arguments)))}const re=r(function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});const ie="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var oe=function(e,t){switch(arguments.length){case 0:return oe;case 1:return function t(n){return 0===arguments.length?t:ie(e,n)};default:return ie(e,t)}};const ce=oe;function ae(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function ue(e,t,n){for(var s=0,r=n.length;s<r;){if(e(t,n[s]))return!0;s+=1}return!1}function le(e,t,n,s){var r=ae(e);function i(e,t){return he(e,t,n.slice(),s.slice())}return!ue(function(e,t){return!ue(i,t,e)},ae(t),r)}function he(e,t,n,s){if(ie(e,t))return!0;var r,i,o=re(e);if(o!==re(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||!ie(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!ie(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var c=n.length-1;c>=0;){if(n[c]===e)return s[c]===t;c-=1}switch(o){case"Map":return e.size===t.size&&le(e.entries(),t.entries(),n.concat([e]),s.concat([t]));case"Set":return e.size===t.size&&le(e.values(),t.values(),n.concat([e]),s.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=k(e);if(a.length!==k(t).length)return!1;var u=n.concat([e]),l=s.concat([t]);for(c=a.length-1;c>=0;){var h=a[c];if(!g(h,t)||!he(t[h],e[h],u,l))return!1;c-=1}return!0}const me=v(function(e,t){return he(e,t,[],[])});function de(e,t){return function(e,t,n){var s,r;if("function"==typeof e.indexOf)switch(typeof t){case"number":if(0===t){for(s=1/t;n<e.length;){if(0===(r=e[n])&&1/r===s)return n;n+=1}return-1}if(t!=t){for(;n<e.length;){if("number"==typeof(r=e[n])&&r!=r)return n;n+=1}return-1}return e.indexOf(t,n);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,n);case"object":if(null===t)return e.indexOf(t,n)}for(;n<e.length;){if(me(e[n],t))return n;n+=1}return-1}(t,e,0)>=0}function fe(e,t){for(var n=0,s=t.length,r=Array(s);n<s;)r[n]=e(t[n]),n+=1;return r}function pe(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 ye=function(e){return(e<10?"0":"")+e};const ve="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+ye(e.getUTCMonth()+1)+"-"+ye(e.getUTCDate())+"T"+ye(e.getUTCHours())+":"+ye(e.getUTCMinutes())+":"+ye(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function ge(e,t,n){return function(){if(0===arguments.length)return n();var s=arguments[arguments.length-1];if(!q(s)){for(var r=0;r<e.length;){if("function"==typeof s[e[r]])return s[e[r]].apply(s,Array.prototype.slice.call(arguments,0,-1));r+=1}if(function(e){return null!=e&&"function"==typeof e["@@transducer/step"]}(s))return t.apply(null,Array.prototype.slice.call(arguments,0,-1))(s)}return n.apply(this,arguments)}}function be(e){return"[object Object]"===Object.prototype.toString.call(e)}const Se=function(){return this.xf["@@transducer/init"]()},je=function(e){return this.xf["@@transducer/result"](e)};var Oe=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=Se,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 we(e){return function(t){return new Oe(e,t)}}var xe=v(ge(["fantasy-land/filter","filter"],we,function(e,t){return be(t)?y(function(n,s){return e(t[s])&&(n[s]=t[s]),n},{},k(t)):(n=t,"[object Map]"===Object.prototype.toString.call(n)?function(e,t){for(var n=new Map,s=t.entries(),r=s.next();!r.done;)e(r.value[1])&&n.set(r.value[0],r.value[1]),r=s.next();return n}(e,t):function(e,t){for(var n=0,s=t.length,r=[];n<s;)e(t[n])&&(r[r.length]=t[n]),n+=1;return r}(e,t));var n}));const Ee=xe;const ke=v(function(e,t){return Ee((n=e,function(){return!n.apply(this,arguments)}),t);var n});function Ae(e,t){var n=function(n){var s=t.concat([e]);return de(n,s)?"<Circular>":Ae(n,s)},s=function(e,t){return fe(function(t){return pe(t)+": "+n(e[t])},t.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+fe(n,e).join(", ")+"))";case"[object Array]":return"["+fe(n,e).concat(s(e,ke(function(e){return/^\d+$/.test(e)},k(e)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof e?"new Boolean("+n(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?n(NaN):pe(ve(e)))+")";case"[object Map]":return"new Map("+n(Array.from(e))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof e?"new Number("+n(e.valueOf())+")":1/e==-1/0?"-0":e.toString(10);case"[object Set]":return"new Set("+n(Array.from(e).sort())+")";case"[object String]":return"object"==typeof e?"new String("+n(e.valueOf())+")":pe(e);case"[object Undefined]":return"undefined";default:if("function"==typeof e.toString){var r=e.toString();if("[object Object]"!==r)return r}return"{"+s(e,k(e)).join(", ")+"}"}}const Ne=r(function(e){return Ae(e,[])});const Fe=J(function(e,t,n){return e(I(t,n))});function Pe(e){var t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t}const $e=v(function(e,t){return e&&t});function Me(e,t,n){for(var s=n.next();!s.done;)t=e(t,s.value),s=n.next();return t}function Je(e,t,n,s){return n[s](e,t)}const _e=U(y,Je,Me);var Re=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=Se,e.prototype["@@transducer/result"]=je,e.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},e}();const Te=function(e){return function(t){return new Re(e,t)}};function De(e,t,n){return function(){for(var r=[],i=0,o=e,c=0,a=!1;c<t.length||i<arguments.length;){var u;c<t.length&&(!s(t[c])||i>=arguments.length)?u=t[c]:(u=arguments[i],i+=1),r[c]=u,s(u)?a=!0:o-=1,c+=1}return!a&&o<=0?n.apply(this,r):C(Math.max(0,o),De(e,r,n))}}const Ie=v(function(e,t){return 1===e?r(t):C(e,De(e,[],t))});const Ve=v(ge(["fantasy-land/map","map"],Te,function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return Ie(t.length,function(){return e.call(this,t.apply(this,arguments))});case"[object Object]":return y(function(n,s){return n[s]=e(t[s]),n},{},k(t));default:return fe(e,t)}}));const Ce=v(function(e,t){return"function"==typeof t["fantasy-land/ap"]?t["fantasy-land/ap"](e):"function"==typeof e.ap?e.ap(t):"function"==typeof e?function(n){return e(n)(t(n))}:_e(function(e,n){return function(e,t){var n;t=t||[];var s=(e=e||[]).length,r=t.length,i=[];for(n=0;n<s;)i[i.length]=e[n],n+=1;for(n=0;n<r;)i[i.length]=t[n],n+=1;return i}(e,Ve(n,t))},[],e)});const Le=v(function(e,t){var n=Ie(e,t);return Ie(e,function(){return y(Ce,Ve(n,arguments[0]),Array.prototype.slice.call(arguments,1))})});const qe=r(function(e){return Le(e.length,e)});const Be=v(function(e,t){return Pe(e)?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:qe($e)(e,t)});const We=me(null);const ze=qe(r(function(e){return!e}));const Ue=ze(We);function He(e){return He="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},He(e)}const Ke=function(e){return"object"===He(e)};const Ge=Ie(1,Be(Ue,Ke));const Qe=v(function(e,t){if(e===t)return t;function n(e,t){if(e>t!=t>e)return t>e?t:e}var s=n(e,t);if(void 0!==s)return s;var r=n(typeof e,typeof t);if(void 0!==r)return r===typeof e?e:t;var i=Ne(e),o=n(i,Ne(t));return void 0!==o&&o===i?e:t});const Xe=v(function(e,t){return Ve(T(e),t)});const Ye=r(function(e){return Ie(Z(Qe,0,Xe("length",e)),function(){for(var t=0,n=e.length;t<n;){if(e[t].apply(this,arguments))return!0;t+=1}return!1})});const Ze=Ie(1,se(re,ce("GeneratorFunction")));const et=Ie(1,se(re,ce("AsyncFunction")));const tt=Ye([se(re,ce("Function")),Ze,et]);var nt=se(re,ce("Object")),st=se(Ne,me(Ne(Object))),rt=Fe(Be(tt,st),["constructor"]);const it=Ie(1,function(e){if(!Ge(e)||!nt(e))return!1;var t=Object.getPrototypeOf(e);return!!We(t)||rt(t)});const ot=Ie(1,se(re,ce("String")));const ct=r(function(e){return Ie(e.length,e)});const at=v(function(e,t){return Ie(e+1,function(){var n=arguments[e];if(null!=n&&Pe(n[t]))return n[t].apply(n,Array.prototype.slice.call(arguments,0,e));throw new TypeError(Ne(n)+' does not have a method named "'+t+'"')})});const ut=at(1,"split");var lt=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=Se,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 ht(e){return function(t){return new lt(e,t)}}const mt=v(ge(["dropWhile"],ht,function(e,t){for(var n=0,s=t.length;n<s&&e(t[n]);)n+=1;return te(n,1/0,t)}));const dt=at(1,"join");const ft=r(function(e){return Ie(e.length,function(t,n){var s=Array.prototype.slice.call(arguments,0);return s[0]=n,s[1]=t,e.apply(this,s)})})(v(de));const pt=ct(function(e,t){return se(ut(""),mt(ft(e)),dt(""))(t)}),yt=new WeakMap,vt=e=>{if(yt.has(e))return yt.get(e);const t={},n=(e,s,r)=>("string"==typeof e.element&&(t[e.element]=e.$visitor?[...r,"$visitor"]:r),A((e,t)=>{const i=[...r,t];if(it(e)&&M("$ref",e)&&D(ot,"$ref",e)){const t=V(["$ref"],e),n=pt("#/",t);return V(n.split("/"),s)}return it(e)?n(e,s,i):e},e)),s=n(e,e,[]);return s.elementMap=t,yt.set(e,s),s};const gt=class{key;value;constructor(e,t){this.key=e,this.value=t}toValue(){return{key:this.key?.toValue(),value:this.value?.toValue()}}};class bt{elements;constructor(e){this.elements=e??[]}toValue(){return this.elements.map(e=>({key:e.key?.toValue(),value:e.value?.toValue()}))}map(e,t){return this.elements.map(n=>{const s=n.value,r=n.key;if(void 0===s||void 0===r)throw new Error("MemberElement must have both key and value");return void 0!==t?e.call(t,s,r,n):e(s,r,n)})}filter(e,t){const n=this.elements.filter(n=>{const s=n.value,r=n.key;return void 0!==s&&void 0!==r&&(void 0!==t?e.call(t,s,r,n):e(s,r,n))});return new bt(n)}reject(e,t){const n=[];for(const s of this.elements){const r=s.value,i=s.key;void 0!==r&&void 0!==i&&(e.call(t,r,i,s)||n.push(s))}return new bt(n)}forEach(e,t){this.elements.forEach((n,s)=>{const r=n.value,i=n.key;void 0!==r&&void 0!==i&&(void 0!==t?e.call(t,r,i,n,s):e(r,i,n,s))})}find(e,t){return this.elements.find(n=>{const s=n.value,r=n.key;return void 0!==s&&void 0!==r&&(void 0!==t?e.call(t,s,r,n):e(s,r,n))})}keys(){return this.elements.map(e=>e.key?.toValue()).filter(e=>void 0!==e)}values(){return this.elements.map(e=>e.value?.toValue()).filter(e=>void 0!==e)}get length(){return this.elements.length}get isEmpty(){return 0===this.length}get first(){return this.elements[0]}get(e){return this.elements[e]}push(e){return this.elements.push(e),this}includesKey(e){return this.elements.some(t=>t.key?.equals(e))}[Symbol.iterator](){return this.elements[Symbol.iterator]()}}const St=bt;class jt{parent;startLine;startCharacter;startOffset;endLine;endCharacter;endOffset;_storedElement="element";_content;_meta;_attributes;constructor(e,t,n){void 0!==t&&(this.meta=t),void 0!==n&&(this.attributes=n),void 0!==e&&(this.content=e)}get element(){return this._storedElement}set element(e){this._storedElement=e}get content(){return this._content}set content(e){if(e instanceof jt)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 gt)this._content=e;else if(e instanceof St)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 jt?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 jt?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 gt){const t=[];return e.key&&t.push(e.key),e.value&&t.push(e.value),t}return e instanceof jt?[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 jt||e instanceof gt?e.toValue():Array.isArray(e)?e.map(e=>e.toValue()):e}equals(e){return me(this.toValue(),e)}primitive(){}set(e){return this.content=e,this}toRef(e){const t=this.id.toValue();if(""===t)throw new Error("Cannot create reference to an element without an ID");const n=new this.RefElement(t);return"string"==typeof e&&(n.path=this.refract(e)),n}getMetaProperty(e,t){if(!this.meta.hasKey(e)){if(this.isFrozen){const e=this.refract(t);return e.freeze(),e}this.meta.set(e,t)}return this.meta.get(e)}setMetaProperty(e,t){this.meta.set(e,t)}hasMetaProperty(e){return!this.isMetaEmpty&&this.meta.hasKey(e)}get isMetaEmpty(){return void 0===this._meta||this.meta.isEmpty}getAttributesProperty(e,t){if(!this.hasAttributesProperty(e)){if(this.isFrozen){const e=this.refract(t);return e.freeze(),e}this.attributes.set(e,t)}return this.attributes.get(e)}setAttributesProperty(e,t){this.attributes.set(e,t)}hasAttributesProperty(e){return!this.isAttributesEmpty&&this.attributes.hasKey(e)}get isAttributesEmpty(){return void 0===this._attributes||this.attributes.isEmpty}}const Ot=jt;class wt extends Ot{constructor(e,t,n){super(e||[],t,n)}get length(){return this._content.length}get isEmpty(){return 0===this.length}get first(){return this._content[0]}get second(){return this._content[1]}get last(){return this._content.at(-1)}push(...e){for(const t of e)this._content.push(this.refract(t));return this}shift(){return this._content.shift()}unshift(e){this._content.unshift(this.refract(e))}includes(e){return this._content.some(t=>t.equals(e))}findElements(e,t){const n=t||{},s=!!n.recursive,r=void 0===n.results?[]:n.results;for(let t=0;t<this._content.length;t+=1){const n=this._content[t],i=n;s&&"function"==typeof i.findElements&&i.findElements(e,{results:r,recursive:s}),e(n,t,void 0)&&r.push(n)}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 n=t.classes;return"function"==typeof n.includes&&n.includes(e)})}getById(e){return this.find(t=>t.id.toValue()===e).first}concat(e){return new(0,this.constructor)(this._content.concat(e._content))}[Symbol.iterator](){return this._content[Symbol.iterator]()}}const xt=wt;const Et=class extends Ot{constructor(e,t,n,s){super(new gt,n,s),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 kt=class extends xt{constructor(e,t,n){super(e||[],t,n),this.element="object"}primitive(){return"object"}toValue(){return this._content.reduce((e,t)=>(e[t.key.toValue()]=t.value?t.value.toValue():void 0,e),{})}get(e){const t=this.getMember(e);if(t)return t.value}getValue(e){const t=this.get(e);if(t)return t.toValue()}getMember(e){if(void 0!==e)return this._content.find(t=>t.key.toValue()===e)}remove(e){let t=null;return this.content=this._content.filter(n=>n.key.toValue()!==e||(t=n,!1)),t}getKey(e){const t=this.getMember(e);if(t)return t.key}set(e,t){if("string"==typeof e){const n=this.getMember(e);n?n.value=t:this._content.push(new Et(e,t))}else if("object"==typeof e&&!Array.isArray(e))for(const t of Object.keys(e))this.set(t,e[t]);return this}keys(){return this._content.map(e=>e.key.toValue())}values(){return this._content.map(e=>e.value.toValue())}hasKey(e){return this._content.some(t=>t.key.equals(e))}items(){return this._content.map(e=>[e.key.toValue(),e.value.toValue()])}map(e,t){return this._content.map(n=>e.call(t,n.value,n.key,n))}compactMap(e,t){const n=[];return this.forEach((s,r,i)=>{const o=e.call(t,s,r,i);o&&n.push(o)}),n}filter(e,t){return new St(this._content).filter(e,t)}reject(e,t){const n=[];for(const s of this._content)e.call(t,s.value,s.key,s)||n.push(s);return new St(n)}forEach(e,t){this._content.forEach(n=>e.call(t,n.value,n.key,n))}reduce(e,t){let n,s;void 0!==t?(n=0,s=this.refract(t)):(n=1,s=this._content[0]?.value);for(let t=n;t<this._content.length;t+=1){const n=this._content[t],r=e(s,n.value,n.key,n,this);s=void 0===r?r:this.refract(r)}return s}empty(){return new this.constructor([])}};const At=class extends kt{constructor(e,t,n){super(e,t,n),this.element="JSONSchemaDraft4"}get idField(){return this.get("id")}set idField(e){this.set("id",e)}get $schema(){return this.get("$schema")}set $schema(e){this.set("$schema",e)}get multipleOf(){return this.get("multipleOf")}set multipleOf(e){this.set("multipleOf",e)}get maximum(){return this.get("maximum")}set maximum(e){this.set("maximum",e)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(e){this.set("exclusiveMaximum",e)}get minimum(){return this.get("minimum")}set minimum(e){this.set("minimum",e)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(e){this.set("exclusiveMinimum",e)}get maxLength(){return this.get("maxLength")}set maxLength(e){this.set("maxLength",e)}get minLength(){return this.get("minLength")}set minLength(e){this.set("minLength",e)}get pattern(){return this.get("pattern")}set pattern(e){this.set("pattern",e)}get additionalItems(){return this.get("additionalItems")}set additionalItems(e){this.set("additionalItems",e)}get itemsField(){return this.get("items")}set itemsField(e){this.set("items",e)}get maxItems(){return this.get("maxItems")}set maxItems(e){this.set("maxItems",e)}get minItems(){return this.get("minItems")}set minItems(e){this.set("minItems",e)}get uniqueItems(){return this.get("uniqueItems")}set uniqueItems(e){this.set("uniqueItems",e)}get maxProperties(){return this.get("maxProperties")}set maxProperties(e){this.set("maxProperties",e)}get minProperties(){return this.get("minProperties")}set minProperties(e){this.set("minProperties",e)}get required(){return this.get("required")}set required(e){this.set("required",e)}get properties(){return this.get("properties")}set properties(e){this.set("properties",e)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(e){this.set("additionalProperties",e)}get patternProperties(){return this.get("patternProperties")}set patternProperties(e){this.set("patternProperties",e)}get dependencies(){return this.get("dependencies")}set dependencies(e){this.set("dependencies",e)}get enum(){return this.get("enum")}set enum(e){this.set("enum",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}get allOf(){return this.get("allOf")}set allOf(e){this.set("allOf",e)}get anyOf(){return this.get("anyOf")}set anyOf(e){this.set("anyOf",e)}get oneOf(){return this.get("oneOf")}set oneOf(e){this.set("oneOf",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get definitions(){return this.get("definitions")}set definitions(e){this.set("definitions",e)}get title(){return this.get("title")}set title(e){this.set("title",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get default(){return this.get("default")}set default(e){this.set("default",e)}get format(){return this.get("format")}set format(e){this.set("format",e)}get base(){return this.get("base")}set base(e){this.set("base",e)}get linksField(){return this.get("links")}set linksField(e){this.set("links",e)}get media(){return this.get("media")}set media(e){this.set("media",e)}get readOnly(){return this.get("readOnly")}set readOnly(e){this.set("readOnly",e)}};const Nt=class extends kt{constructor(e,t,n){super(e,t,n),this.element="JSONReference",this.classes.push("json-reference")}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}};const Ft=class extends kt{constructor(e,t,n){super(e,t,n),this.element="media"}get binaryEncoding(){return this.get("binaryEncoding")}set binaryEncoding(e){this.set("binaryEncoding",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}};const Pt=class extends kt{constructor(e,t,n){super(e,t,n),this.element="linkDescription"}get href(){return this.get("href")}set href(e){this.set("href",e)}get rel(){return this.get("rel")}set rel(e){this.set("rel",e)}get title(){return this.get("title")}set title(e){this.set("title",e)}get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get mediaType(){return this.get("mediaType")}set mediaType(e){this.set("mediaType",e)}get method(){return this.get("method")}set method(e){this.set("method",e)}get encType(){return this.get("encType")}set encType(e){this.set("encType",e)}get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}};const $t=class extends Ot{constructor(e,t,n){super(e,t,n),this.element="string"}primitive(){return"string"}get length(){return this.content?.length??0}};const Mt=class extends Ot{constructor(e,t,n){super(e,t,n),this.element="number"}primitive(){return"number"}};const Jt=class extends Ot{constructor(e,t,n){super(e??null,t,n),this.element="null"}primitive(){return"null"}set(e){throw new Error("Cannot set the value of null")}};const _t=class extends Ot{constructor(e,t,n){super(e,t,n),this.element="boolean"}primitive(){return"boolean"}};const Rt=class extends xt{constructor(e,t,n){super(e||[],t,n),this.element="array"}primitive(){return"array"}get(e){return this._content[e]}getValue(e){const t=this.get(e);if(t)return t.toValue()}set(e,t){return"number"==typeof e&&void 0!==t?this._content[e]=this.refract(t):this.content=e,this}remove(e){return this._content.splice(e,1)[0]??null}map(e,t){return this._content.map(e,t)}flatMap(e,t){return this._content.flatMap(e,t)}compactMap(e,t){const n=[];for(const s of this._content){const r=e.call(t,s);r&&n.push(r)}return n}filter(e,t){const n=this._content.filter(e,t);return new this.constructor(n)}reject(e,t){const n=[];for(const s of this._content)e.call(t,s)||n.push(s);return new this.constructor(n)}reduce(e,t){let n,s;void 0!==t?(n=0,s=this.refract(t)):(n=1,s=this.first);for(let t=n;t<this.length;t+=1){const n=e(s,this._content[t],t,this);s=void 0===n?n:this.refract(n)}return s}forEach(e,t){this._content.forEach((n,s)=>{e.call(t,n,s)})}empty(){return new this.constructor([])}},Tt=e=>e instanceof Ot,Dt=e=>e instanceof $t,It=e=>e instanceof Mt,Vt=e=>e instanceof Jt,Ct=e=>e instanceof _t,Lt=e=>e instanceof Rt,qt=e=>e instanceof kt,Bt=e=>e instanceof Et,Wt=e=>"number"==typeof e.startLine&&"number"==typeof e.startCharacter&&"number"==typeof e.startOffset&&"number"==typeof e.endLine&&"number"==typeof e.endCharacter&&"number"==typeof e.endOffset,zt=(e,t)=>0===t.length||!!Tt(e)&&(!e.isMetaEmpty&&(!!e.hasMetaProperty("classes")&&t.every(t=>e.classes.includes(t))));class Ut extends $t{constructor(e,t,n){super(e,t,n),this.element="sourceMap"}static transfer(e,t){t.startLine=e.startLine,t.startCharacter=e.startCharacter,t.startOffset=e.startOffset,t.endLine=e.endLine,t.endCharacter=e.endCharacter,t.endOffset=e.endOffset}static from(e){const{startLine:t,startCharacter:n,startOffset:s,endLine:r,endCharacter:i,endOffset:o}=e;if("number"!=typeof t||"number"!=typeof n||"number"!=typeof s||"number"!=typeof r||"number"!=typeof i||"number"!=typeof o)return;const c="sm1:"+[t,n,s,r,i,o].map(Kt).join("");const a=new Ut(c);return a.startLine=t,a.startCharacter=n,a.startOffset=s,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,n=[];let s=0;for(let e=0;e<6;e++){const e=Gt(t,s);n.push(e.value),s=e.next}return n}(this.content))}}const Ht="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Kt(e){let t=e>>>0,n="";do{let e=31&t;t>>>=5,0!==t&&(e|=32),n+=Ht[e]}while(0!==t);return n}function Gt(e,t=0){let n=0,s=0,r=t;for(;;){const t=e[r++],i=Ht.indexOf(t);if(-1===i)throw new Error(`Invalid Base64 VLQ char: ${t}`);if(n|=(31&i)<<s,s+=5,!!!(32&i))break}return{value:n>>>0,next:r}}const Qt=Ut;const Xt=class extends l{constructor(e,t){if(super(e,t),null!=t&&"object"==typeof t){const{cause:e,...n}=t;Object.assign(this,n)}}};const Yt=class extends Xt{value;constructor(e,t){super(e,t),void 0!==t&&(this.value=t.value)}};const Zt=class extends Yt{};const en=class extends Yt{},tn=(e,t)=>{const{visited:n=new WeakMap}=t,s={...t,visited:n};if(n.has(e))return n.get(e);const r=on(e);n.set(e,r);const{content:i}=e;return Array.isArray(i)?r.content=i.map(e=>tn(e,s)):Tt(i)?r.content=tn(i,s):r.content=i instanceof gt?nn(i,s):i,r},nn=(e,t)=>{const{visited:n=new WeakMap}=t,s={...t,visited:n};if(n.has(e))return n.get(e);const{key:r,value:i}=e,o=void 0!==r?tn(r,s):void 0,c=void 0!==i?tn(i,s):void 0,a=new gt(o,c);return n.set(e,a),a},sn=(e,t={})=>{if(e instanceof gt)return nn(e,t);if(e instanceof St)return((e,t)=>{const{visited:n=new WeakMap}=t,s={...t,visited:n};if(n.has(e))return n.get(e);const r=[...e].map(e=>tn(e,s)),i=new St(r);return n.set(e,i),i})(e,t);if(Tt(e))return tn(e,t);throw new Zt("Value provided to cloneDeep function couldn't be cloned",{value:e})};sn.safe=e=>{try{return sn(e)}catch{return e}};const rn=e=>{const{key:t,value:n}=e;return new gt(t,n)},on=e=>{const t=new(0,e.constructor);t.element=e.element,e.isMetaEmpty||(t.meta=sn(e.meta)),e.isAttributesEmpty||(t.attributes=sn(e.attributes)),Wt(e)&&Qt.transfer(e,t);const{content:n}=e;return Tt(n)?t.content=on(n):Array.isArray(n)?t.content=[...n]:t.content=n instanceof gt?rn(n):n,t},cn=e=>{if(e instanceof gt)return rn(e);if(e instanceof St)return(e=>{const t=[...e];return new St(t)})(e);if(Tt(e))return on(e);throw new en("Value provided to cloneShallow function couldn't be cloned",{value:e})};cn.safe=e=>{try{return cn(e)}catch{return e}};const an=class extends Ot{constructor(e,t,n){super(e||[],t,n),this.element="link"}get relation(){if(this.hasAttributesProperty("relation"))return this.attributes.get("relation")}set relation(e){this.attributes.set("relation",e)}get href(){if(this.hasAttributesProperty("href"))return this.attributes.get("href")}set href(e){this.attributes.set("href",e)}};const un=class extends Ot{constructor(e,t,n){super(e||[],t,n),this.element="ref",this.path||(this.path="element")}get path(){if(this.hasAttributesProperty("path"))return this.attributes.get("path")}set path(e){this.attributes.set("path",e)}};const ln=class extends $t{constructor(e,t,n){super(e,t,n),this.element="annotation"}get code(){if(this.hasAttributesProperty("code"))return this.attributes.get("code")}set code(e){this.attributes.set("code",e)}};const hn=class extends $t{constructor(e,t,n){super(e,t,n),this.element="comment"}};const mn=class extends Rt{constructor(e,t,n){super(e,t,n),this.element="parseResult"}get api(){return this.filter(e=>zt(e,["api"])).first}get results(){return this.filter(e=>zt(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&&zt(e,["warning"]))}get errors(){return this.filter(e=>"annotation"===e.element&&zt(e,["error"]))}get isEmpty(){return 0===this.reject(e=>"annotation"===e.element).length}replaceResult(e){const{result:t}=this;if(void 0===t)return!1;const n=this._content,s=n.findIndex(e=>e===t);return-1!==s&&(n[s]=e,!0)}},dn=e=>e instanceof an,fn=e=>e instanceof un,pn=e=>{if(!Tt(e))return e;if(Dt(e)||It(e)||Ct(e)||Vt(e))return e.toValue();const t=new WeakMap,n=e=>{if(!Tt(e))return e;if(qt(e)){if(t.has(e))return t.get(e);const s={};return t.set(e,s),e.forEach((e,t)=>{const r=n(t),i=n(e);"string"==typeof r&&(s[r]=i)}),s}if(Lt(e)){if(t.has(e))return t.get(e);const s=[];return t.set(e,s),e.forEach(e=>s.push(n(e))),s}return fn(e)?String(e.toValue()):dn(e)?Dt(e.href)?e.href.toValue():"":e.toValue()};return n(e)},yn=e=>{const t=e.isMetaEmpty?void 0:sn(e.meta),n=e.isAttributesEmpty?void 0:sn(e.attributes);return new e.constructor(void 0,t,n)},vn=(e,t)=>t.clone&&t.isMergeableElement(e)?bn(yn(e),e,t):e,gn={clone:!0,isMergeableElement:e=>qt(e)||Lt(e),arrayElementMerge:(e,t,n)=>new(0,e.constructor)(e.concat(t).map(e=>vn(e,n))),objectElementMerge:(e,t,n)=>{const s=qt(e)?yn(e):yn(t);return qt(e)&&e.forEach((e,t,r)=>{const i=cn(r);i.value=vn(e,n),s.content.push(i)}),t.forEach((t,r,i)=>{const o=pn(r);let c;if(qt(e)&&e.hasKey(o)&&n.isMergeableElement(t)){const s=e.get(o);c=cn(i),c.value=((e,t)=>{if("function"!=typeof t.customMerge)return bn;const n=t.customMerge(e,t);return"function"==typeof n?n:bn})(r,n)(s,t,n)}else c=cn(i),c.value=vn(t,n);s.remove(o),s.content.push(c)}),s},customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0},bn=(e,t,n)=>{const s={...gn,...n};s.isMergeableElement=s.isMergeableElement??gn.isMergeableElement,s.arrayElementMerge=s.arrayElementMerge??gn.arrayElementMerge,s.objectElementMerge=s.objectElementMerge??gn.objectElementMerge;const r=Lt(t);if(!(r===Lt(e)))return vn(t,s);const i=r&&"function"==typeof s.arrayElementMerge?s.arrayElementMerge(e,t,s):s.objectElementMerge(e,t,s);return i.meta=(e=>"function"!=typeof e.customMetaMerge?e=>sn(e):e.customMetaMerge)(s)(e.meta,t.meta),i.attributes=(e=>"function"!=typeof e.customAttributesMerge?e=>sn(e):e.customAttributesMerge)(s)(e.attributes,t.attributes),i};bn.all=(e,t)=>{if(!Array.isArray(e))throw new TypeError("First argument of deepmerge should be an array.");return 0===e.length?new kt:e.reduce((e,n)=>bn(e,n,t),yn(e[0]))};const Sn=bn;const jn=class{element;constructor(e){Object.assign(this,e)}copyMetaAndAttributes(e,t){if(!e.isMetaEmpty||!t.isMetaEmpty){const n=t.isMetaEmpty?new kt:t.meta,s=e.isMetaEmpty?new kt:e.meta;t.meta=Sn(n,s)}if(!e.isAttributesEmpty||!t.isAttributesEmpty){const n=t.isAttributesEmpty?new kt:t.attributes,s=e.isAttributesEmpty?new kt:e.attributes;t.attributes=Sn(n,s)}Qt.transfer(e,t)}};const On=class extends jn{enter(e){this.element=sn(e.node),e.stop()}};const wn=r(function(e){return function(){return e}});const xn=v(function(e,t){return null==t||t!=t?e:t});const En=wn(void 0);const kn=me(En());const An=r(function(e){return Ie(Z(Qe,0,Xe("length",e)),function(){for(var t=0,n=e.length;t<n;){if(!e[t].apply(this,arguments))return!1;t+=1}return!0})});var Nn=r(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:q(e)?[]:B(e)?"":be(e)?{}:S(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 Fn=Nn;const Pn=r(function(e){return null!=e&&me(e,Fn(e))});const $n=r(function(e){return!Pn(e)});const Mn=v(function(e,t){return e||t});const Jn=Ie(1,Be(Ue,v(function(e,t){return Pe(e)?function(){return e.apply(this,arguments)||t.apply(this,arguments)}:qe(Mn)(e,t)})(Ke,tt)));var _n=ze(Jn);const Rn=An([ot,_n,$n]);const Tn=v(function(e,t){for(var n={},s=0;s<e.length;)e[s]in t&&(n[e[s]]=t[e[s]]),s+=1;return n});class Dn{node;key;index;parent;parentPath;inList;#e=!1;#t=!1;#n=!1;#s=!1;#r;#i=!1;constructor(e,t,n,s,r){this.node=e,this.parent=t,this.parentPath=n,this.key=s,this.index=r&&"number"==typeof s?s:void 0,this.inList=r}get shouldSkip(){return this.#e}get shouldStop(){return this.#t}get removed(){return this.#n}isRoot(){return null===this.parentPath}get depth(){let e=0,t=this.parentPath;for(;null!==t;)e+=1,t=t.parentPath;return e}getAncestry(){const e=[];let t=this.parentPath;for(;null!==t;)e.push(t),t=t.parentPath;return e}getAncestorNodes(){return this.getAncestry().map(e=>e.node)}getPathKeys(){const e=[];let t=this;for(;null!==t&&void 0!==t.key;)e.unshift(t.key),t=t.parentPath;return e}findParent(e){let t=this.parentPath;for(;null!==t;){if(e(t))return t;t=t.parentPath}return null}find(e){return e(this)?this:this.findParent(e)}skip(){this.#e=!0}stop(){this.#t=!0}replaceWith(e){this.#i&&console.warn("Warning: replaceWith() called on a stale Path. This path belongs to a node whose visit has already completed. The replacement will have no effect. To replace a parent node, do so from the parent's own visitor."),this.#s=!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.#n=!0}_getReplacementNode(){return this.#r}_wasReplaced(){return this.#s}_reset(){this.#e=!1,this.#t=!1,this.#n=!1,this.#s=!1,this.#r=void 0}_markStale(){this.#i=!0}}const In=Ie(1,Be(Jn,se(Ne,me("[object Promise]")))),Vn=e=>{const t=e?.element;return void 0===t||"element"===t?"Element":`${t.charAt(0).toUpperCase()}${t.slice(1)}Element`},Cn=e=>Tt(e),Ln=e=>cn(e),qn=(e,t,n)=>{Bt(e)?e.value=n:Array.isArray(e)?e[t]=null===n?void 0:n:null===n?delete e[t]:e[t]=n},Bn=e=>Bt(e)?["key","value"]:Lt(e)||qt(e)?["content"]:[],Wn=(e,t)=>{if(void 0!==e[t])return e[t];const n=t.length;for(const s in e){if(!s.includes("|"))continue;const r=s.indexOf(t);if(-1===r)continue;const i=0===r||"|"===s[r-1],o=r+n===s.length||"|"===s[r+n];if(i&&o)return e[s]}},zn=(e,t,n)=>{if(void 0===t)return null;const s=e,r=n?"leave":"enter",i=Wn(s,t);if(!n&&"function"==typeof i)return i;if(null!=i){const e=i[r];if("function"==typeof e)return e}const o=s[r];if("function"==typeof o)return o;if(null!=o){const e=Wn(o,t);if("function"==typeof e)return e}return null},Un=(e,t={})=>{const{visitFnGetter:n=zn,nodeTypeGetter:s=Vn,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,u=!1;for(let l=0;l<e.length;l+=1)if(c[l]===i){const i=n(e[l],s(a),!1);if("function"==typeof i){const n=Kn(t,a),s=i.call(e[l],n);if(In(s))throw new Xt("Async visitor not supported in sync mode",{visitor:e[l],visitFn:i});if(n.shouldStop){c[l]=o;break}if(n.shouldSkip&&(c[l]=a),n.removed)return void t.remove();if(n._wasReplaced()){const e=n._getReplacementNode();if(!r)return t.replaceWith(e),e;a=e,u=!0}else if(void 0!==s){if(!r)return t.replaceWith(s),s;a=s,u=!0}}}if(u)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=n(e[a],s(r),!0);if("function"==typeof i){const n=Kn(t,r),s=i.call(e[a],n);if(In(s))throw new Xt("Async visitor not supported in sync mode",{visitor:e[a],visitFn:i});if(n.shouldStop){c[a]=o;break}if(n.removed)return void t.remove();if(n._wasReplaced()){const e=n._getReplacementNode();return t.replaceWith(e),e}if(void 0!==s)return t.replaceWith(s),s}}else c[a]===r&&(c[a]=i)}}},Hn=(e,t={})=>{const{visitFnGetter:n=zn,nodeTypeGetter:s=Vn,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,u=!1;for(let l=0;l<e.length;l+=1)if(c[l]===i){const i=n(e[l],s(a),!1);if("function"==typeof i){const n=Kn(t,a),s=await i.call(e[l],n);if(n.shouldStop){c[l]=o;break}if(n.shouldSkip&&(c[l]=a),n.removed)return void t.remove();if(n._wasReplaced()){const e=n._getReplacementNode();if(!r)return t.replaceWith(e),e;a=e,u=!0}else if(void 0!==s){if(!r)return t.replaceWith(s),s;a=s,u=!0}}}if(u)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=n(e[a],s(r),!0);if("function"==typeof i){const n=Kn(t,r),s=await i.call(e[a],n);if(n.shouldStop){c[a]=o;break}if(n.removed)return void t.remove();if(n._wasReplaced()){const e=n._getReplacementNode();return t.replaceWith(e),e}if(void 0!==s)return t.replaceWith(s),s}}else c[a]===r&&(c[a]=i)}}};function Kn(e,t){return new Dn(t,e.parent,e.parentPath,e.key,e.inList)}function*Gn(e,t,n){const{keyMap:s,state:r,nodeTypeGetter:i,nodePredicate:o,nodeCloneFn:c,detectCycles:a,mutable:u,mutationFn:l}=n,h="function"==typeof s;let m,d,f=Array.isArray(e),p=[e],y=-1,v=[],g=e,b=null,S=null;const j=[];do{y+=1;const e=y===p.length;let n;const O=e&&0!==v.length;if(e){if(n=0===j.length?void 0:b?.key,g=d,d=j.pop(),S=b?.parentPath?.parentPath??null,O)if(u)for(const[e,t]of v)l(g,e,t);else if(f){g=g.slice();let e=0;for(const[t,n]of v){const s=t-e;null===n?(g.splice(s,1),e+=1):g[s]=n}}else{g=c(g);for(const[e,t]of v)g[e]=t}if(void 0!==m){y=m.index,p=m.keys,v=m.edits;const e=m.inArray;if(S=m.parentPath,m=m.prev,O&&!u){const t=e?y:p[y];v.push([t,g])}f=e}}else if(void 0!==d&&(n=f?y:p[y],g=d[n],void 0===g))continue;if(!Array.isArray(g)){if(!o(g))throw new Xt(`Invalid AST Node: ${String(g)}`,{node:g});if(a&&j.includes(g))continue;b=new Dn(g,d,S,n,f);const s=zn(t,i(g),e);if(s){for(const[e,n]of Object.entries(r))t[e]=n;const i=yield{visitFn:s,path:b,isLeaving:e};if(b.shouldStop)break;if(b.shouldSkip&&!e)continue;if(b.removed){if(v.push([n,null]),!e)continue}else if(b._wasReplaced()){const t=b._getReplacementNode();if(v.push([n,t]),!e){if(!o(t))continue;g=t}}else if(void 0!==i&&(v.push([n,i]),!e)){if(!o(i))continue;g=i}b._markStale()}}if(!e){if(m={inArray:f,index:y,keys:p,edits:v,parentPath:S,prev:m},f=Array.isArray(g),f)p=g;else if(h)p=s(g);else{const e=i(g);p=void 0!==e?s[e]??[]:[]}y=-1,v=[],void 0!==d&&j.push(d),d=g,S=b}}while(void 0!==m);return 0!==v.length?v.at(-1)[1]:e}Un[Symbol.for("nodejs.util.promisify.custom")]=Hn;const Qn=(e,t,n={})=>{const s=Gn(e,t,{keyMap:n.keyMap??Bn,state:n.state??{},nodeTypeGetter:n.nodeTypeGetter??Vn,nodePredicate:n.nodePredicate??Cn,nodeCloneFn:n.nodeCloneFn??Ln,detectCycles:n.detectCycles??!0,mutable:n.mutable??!1,mutationFn:n.mutationFn??qn});let r=s.next();for(;!r.done;){const e=r.value,n=e.visitFn.call(t,e.path);if(In(n))throw new Xt("Async visitor not supported in sync mode",{visitor:t,visitFn:e.visitFn});r=s.next(n)}return r.value},Xn=async(e,t,n={})=>{const s=Gn(e,t,{keyMap:n.keyMap??Bn,state:n.state??{},nodeTypeGetter:n.nodeTypeGetter??Vn,nodePredicate:n.nodePredicate??Cn,nodeCloneFn:n.nodeCloneFn??Ln,detectCycles:n.detectCycles??!0,mutable:n.mutable??!1,mutationFn:n.mutationFn??qn});let r=s.next();for(;!r.done;){const e=r.value,n=await e.visitFn.call(t,e.path);r=s.next(n)}return r.value};Qn[Symbol.for("nodejs.util.promisify.custom")]=Xn,Dn.prototype.traverse=function(e,t){return Qn(this.node,e,t)},Dn.prototype.traverseAsync=function(e,t){return Xn(this.node,e,t)};const Yn=class extends jn{specObj;passingOptionsNames=["specObj","parent"];constructor({specObj:e,...t}){super({...t}),this.specObj=e}retrievePassingOptions(){return Tn(this.passingOptionsNames,this)}retrieveFixedFields(e){const t=V(["visitors",...e,"fixedFields"],this.specObj);return"object"==typeof t&&null!==t?Object.keys(t):[]}retrieveVisitor(e){return Fe(tt,["visitors",...e],this.specObj)?V(["visitors",...e],this.specObj):V(["visitors",...e,"$visitor"],this.specObj)}retrieveVisitorInstance(e,t={}){const n=this.retrievePassingOptions();return new(this.retrieveVisitor(e))({...n,...t})}toRefractedElement(e,t,n={}){const s=this.retrieveVisitorInstance(e,n);return s instanceof On&&s?.constructor===On?sn(t):(Qn(t,s,n),s.element)}};const Zn=class extends Yn{specPath;ignoredFields;constructor({specPath:e,ignoredFields:t,...n}){super({...n}),this.specPath=e,this.ignoredFields=t||[]}ObjectElement(e){const t=e.node,n=this.specPath(t),s=this.retrieveFixedFields(n);t.forEach((e,t,r)=>{const i=pn(t);if(Dt(t)&&s.includes(i)&&!this.ignoredFields.includes(i)){const s=this.toRefractedElement([...n,"fixedFields",i],e),o=new Et(sn(t),s);this.copyMetaAndAttributes(r,o),o.classes.push("fixed-field"),this.element.content.push(o)}else this.ignoredFields.includes(i)||this.element.content.push(sn(r))}),this.copyMetaAndAttributes(t,this.element),e.stop()}},es=(e,t,n=[])=>{const s=Object.getOwnPropertyDescriptors(t);for(let e of n)delete s[e];Object.defineProperties(e,s)},ts=(e,t=[e])=>{const n=Object.getPrototypeOf(e);return null===n?t:ts(n,[...t,n])},ns=(e,t,n=[])=>{var s;const r=null!==(s=((...e)=>{if(0===e.length)return;let t;const n=e.map(e=>ts(e));for(;n.every(e=>e.length>0);){const e=n.map(e=>e.pop()),s=e[0];if(!e.every(e=>e===s))break;t=s}return t})(...e))&&void 0!==s?s:Object.prototype,i=Object.create(r),o=ts(r);for(let t of e){let e=ts(t);for(let t=e.length-1;t>=0;t--){let s=e[t];-1===o.indexOf(s)&&(es(i,s,["constructor",...n]),o.push(s))}}return i.constructor=t,i},ss=e=>e.filter((t,n)=>e.indexOf(t)==n),rs=(e,t)=>{const n=t.map(e=>ts(e));let s=0,r=!0;for(;r;){r=!1;for(let i=t.length-1;i>=0;i--){const t=n[i][s];if(null!=t&&(r=!0,null!=Object.getOwnPropertyDescriptor(t,e)))return n[i][0]}s++}},is=(e,t=Object.prototype)=>new Proxy({},{getPrototypeOf:()=>t,setPrototypeOf(){throw Error("Cannot set prototype of Proxies created by ts-mixer")},getOwnPropertyDescriptor:(t,n)=>Object.getOwnPropertyDescriptor(rs(n,e)||{},n),defineProperty(){throw new Error("Cannot define new properties on Proxies created by ts-mixer")},has:(n,s)=>void 0!==rs(s,e)||void 0!==t[s],get:(n,s)=>(rs(s,e)||t)[s],set(t,n,s){const r=rs(n,e);if(void 0===r)throw new Error("Cannot set new properties on Proxies created by ts-mixer");return r[n]=s,!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)))}),os=null,cs="copy",as="copy",us="deep",ls=new WeakMap,hs=e=>ls.get(e),ms=(e,t)=>{var n,s;const r=ss([...Object.getOwnPropertyNames(e),...Object.getOwnPropertyNames(t)]),i={};for(let o of r)i[o]=ss([...null!==(n=null==e?void 0:e[o])&&void 0!==n?n:[],...null!==(s=null==t?void 0:t[o])&&void 0!==s?s:[]]);return i},ds=(e,t)=>{var n,s,r,i;return{property:ms(null!==(n=null==e?void 0:e.property)&&void 0!==n?n:{},null!==(s=null==t?void 0:t.property)&&void 0!==s?s:{}),method:ms(null!==(r=null==e?void 0:e.method)&&void 0!==r?r:{},null!==(i=null==t?void 0:t.method)&&void 0!==i?i:{})}},fs=(e,t)=>{var n,s,r,i,o,c;return{class:ss([...null!==(n=null==e?void 0:e.class)&&void 0!==n?n:[],...null!==(s=null==t?void 0:t.class)&&void 0!==s?s:[]]),static:ds(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:ds(null!==(o=null==e?void 0:e.instance)&&void 0!==o?o:{},null!==(c=null==t?void 0:t.instance)&&void 0!==c?c:{})}},ps=new Map,ys=(...e)=>{const t=((...e)=>{var t;const n=new Set,s=new Set([...e]);for(;s.size>0;)for(let e of s){const r=[...ts(e.prototype).map(e=>e.constructor),...null!==(t=hs(e))&&void 0!==t?t:[]].filter(e=>!n.has(e));for(let e of r)s.add(e);n.add(e),s.delete(e)}return[...n]})(...e).map(e=>ps.get(e)).filter(e=>!!e);return 0==t.length?{}:1==t.length?t[0]:t.reduce((e,t)=>fs(e,t))},vs=e=>{let t=ps.get(e);return t||(t={},ps.set(e,t)),t};function gs(...e){var t,n,s;const r=e.map(e=>e.prototype),i=os;if(null!==i){const e=r.map(e=>e[i]).filter(e=>"function"==typeof e),t=function(...t){for(let n of e)n.apply(this,t)},n={[i]:t};r.push(n)}function o(...t){for(const n of e)es(this,new n(...t));null!==i&&"function"==typeof this[i]&&this[i].apply(this,t)}var c,a;o.prototype="copy"===as?ns(r,o):(c=r,a=o,is([...c,{constructor:a}])),Object.setPrototypeOf(o,"copy"===cs?ns(e,null,["prototype"]):is(e,Function.prototype));let u=o;if("none"!==us){const r="deep"===us?ys(...e):((...e)=>{const t=e.map(e=>vs(e));return 0===t.length?{}:1===t.length?t[0]:t.reduce((e,t)=>fs(e,t))})(...e);for(let e of null!==(t=null==r?void 0:r.class)&&void 0!==t?t:[]){const t=e(u);t&&(u=t)}bs(null!==(n=null==r?void 0:r.static)&&void 0!==n?n:{},u),bs(null!==(s=null==r?void 0:r.instance)&&void 0!==s?s:{},u.prototype)}var l,h;return l=u,h=e,ls.set(l,h),u}const bs=(e,t)=>{const n=e.property,s=e.method;if(n)for(let e in n)for(let s of n[e])s(t,e);if(s)for(let e in s)for(let n of s[e])n(t,e,Object.getOwnPropertyDescriptor(t,e))};const Ss=function(){return!1};const js=class extends Yn{specPath;ignoredFields;fieldPatternPredicate=Ss;constructor({specPath:e,ignoredFields:t,fieldPatternPredicate:n,...s}){super({...s}),this.specPath=e,this.ignoredFields=t||[],"function"==typeof n&&(this.fieldPatternPredicate=n)}ObjectElement(e){const t=e.node;t.forEach((e,t,n)=>{const s=pn(t);if(!this.ignoredFields.includes(s)&&this.fieldPatternPredicate(s)){const s=this.specPath(e),r=this.toRefractedElement(s,e),i=new Et(sn(t),r);this.copyMetaAndAttributes(n,i),i.classes.push("patterned-field"),this.element.content.push(i)}else this.ignoredFields.includes(s)||this.element.content.push(sn(n))}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Os=class extends js{constructor(e){super(e),this.fieldPatternPredicate=Rn}};const ws=class{parent;constructor({parent:e}){this.parent=e}},xs=gs(Zn,ws,On),Es=gs(Zn,On),ks=gs(Zn,On),As=gs(Zn,On),Ns=gs(Yn,ws,On),Fs=gs(Yn,ws,On),Ps=gs(Yn,ws,On),$s=gs(Yn,ws,On),Ms=gs(Yn,ws,On),Js=gs(Os,ws,On),_s=gs(Os,ws,On),Rs=gs(Os,ws,On),Ts=gs(Os,ws,On);const Ds=class extends xs{constructor(e){super(e),this.element=new At,this.specPath=wn(["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,Zn.prototype.ObjectElement.call(this,e)}handleDialectIdentifier(e){if(kn(this.parent)&&!Dt(e.get("$schema")))this.element.meta.set("inheritedDialectIdentifier",this.defaultDialectIdentifier);else if(this.parent instanceof At&&!Dt(e.get("$schema"))){const e=xn(pn(this.parent.meta.get("inheritedDialectIdentifier")),pn(this.parent.$schema));this.element.meta.set("inheritedDialectIdentifier",e)}}handleSchemaIdentifier(e,t="id"){const n=void 0!==this.parent?sn(this.parent.meta.get("ancestorsSchemaIdentifiers")??new Rt):new Rt,s=pn(e.get(t));Rn(s)&&n.push(s),this.element.meta.set("ancestorsSchemaIdentifiers",n)}},Is=e=>qt(e)&&e.hasKey("$ref");const Vs=class extends $s{ObjectElement(e){const t=e.node,n=Is(t)?["document","objects","JSONReference"]:["document","objects","JSONSchema"];this.element=this.toRefractedElement(n,t),e.stop()}ArrayElement(e){const t=e.node;this.element=new Rt,this.element.classes.push("json-schema-items"),t.forEach(e=>{const t=Is(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],n=this.toRefractedElement(t,e);this.element.push(n)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Cs=class extends On{ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-required")}};const Ls=class extends Ts{constructor(e){super(e),this.element=new kt,this.element.classes.push("json-schema-properties"),this.specPath=e=>Is(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const qs=class extends Rs{constructor(e){super(e),this.element=new kt,this.element.classes.push("json-schema-patternProperties"),this.specPath=e=>Is(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const Bs=class extends _s{constructor(e){super(e),this.element=new kt,this.element.classes.push("json-schema-dependencies"),this.specPath=e=>Is(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const Ws=class extends On{ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-enum")}};const zs=class extends On{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 Us=class extends Ns{constructor(e){super(e),this.element=new Rt,this.element.classes.push("json-schema-allOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=Is(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],n=this.toRefractedElement(t,e);this.element.push(n)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Hs=class extends Fs{constructor(e){super(e),this.element=new Rt,this.element.classes.push("json-schema-anyOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=Is(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],n=this.toRefractedElement(t,e);this.element.push(n)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Ks=class extends Ps{constructor(e){super(e),this.element=new Rt,this.element.classes.push("json-schema-oneOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=Is(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],n=this.toRefractedElement(t,e);this.element.push(n)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Gs=class extends Js{constructor(e){super(e),this.element=new kt,this.element.classes.push("json-schema-definitions"),this.specPath=e=>Is(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const Qs=class extends Ms{constructor(e){super(e),this.element=new Rt,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 Xs=class extends Es{constructor(e){super(e),this.element=new Nt,this.specPath=wn(["document","objects","JSONReference"])}ObjectElement(e){Zn.prototype.ObjectElement.call(this,e),Dt(this.element.$ref)&&this.element.classes.push("reference-element")}};const Ys=class extends On{StringElement(e){super.enter(e),this.element.classes.push("reference-value")}};const Zs=function(){return!0};const er=J(function(e,t,n){return Ie(Math.max(e.length,t.length,n.length),function(){return e.apply(this,arguments)?t.apply(this,arguments):n.apply(this,arguments)})});const tr=r(function(e){return function(t,n){return e(t,n)?-1:e(n,t)?1:0}});var nr=v(function(e,t){return Array.prototype.slice.call(t,0).sort(e)});const sr=nr;const rr=r(function(e){return i(0,e)});function ir(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}const or=r(ir);const cr=ze(N);const ar=Ie(1,tt(Array.isArray)?Array.isArray:se(re,ce("Array")));const ur=Be(ar,$n);function lr(e){return function(e){if(Array.isArray(e))return hr(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 hr(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hr(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 hr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,s=Array(t);n<t;n++)s[n]=e[n];return s}var mr=se(sr(tr(function(e,t){return e.length>t.length})),rr,T("length")),dr=ct(function(e,t,n){var s=n.apply(void 0,lr(e));return cr(s)?or(s):t});const fr=er(ur,function(e){var t=mr(e);return Ie(t,function(){for(var t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];return Z(dr(n),void 0,e)})},En);const pr=class extends Yn{alternator;constructor({alternator:e,...t}){super({...t}),this.alternator=e}enter(e){const t=e.node,n=this.alternator.map(({predicate:e,specPath:t})=>er(e,wn(t),En)),s=fr(n)(t);this.element=this.toRefractedElement(s,t),e.stop()}};const yr=class extends pr{constructor(e){super(e),this.alternator=[{predicate:Is,specPath:["document","objects","JSONReference"]},{predicate:Zs,specPath:["document","objects","JSONSchema"]}]}};const vr=class extends As{constructor(e){super(e),this.element=new Ft,this.specPath=wn(["document","objects","Media"])}};const gr=class extends ks{constructor(e){super(e),this.element=new Pt,this.specPath=wn(["document","objects","LinkDescription"])}},br={visitors:{value:On,JSONSchemaOrJSONReferenceVisitor:yr,document:{objects:{JSONSchema:{element:"jSONSchemaDraft4",$visitor:Ds,fixedFields:{id:{$visitor:On,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:yr,items:{$visitor:Vs,alias:"itemsField"},maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:Cs,properties:Ls,additionalProperties:yr,patternProperties:qs,dependencies:Bs,enum:Ws,type:zs,allOf:Us,anyOf:Hs,oneOf:Ks,not:yr,definitions:Gs,title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},format:{$ref:"#/visitors/value"},base:{$ref:"#/visitors/value"},links:{$visitor:Qs,alias:"linksField"},media:{$ref:"#/visitors/document/objects/Media"},readOnly:{$ref:"#/visitors/value"}}},JSONReference:{element:"jSONReference",$visitor:Xs,fixedFields:{$ref:Ys}},Media:{element:"media",$visitor:vr,fixedFields:{binaryEncoding:{$ref:"#/visitors/value"},type:{$ref:"#/visitors/value"}}},LinkDescription:{element:"linkDescription",$visitor:gr,fixedFields:{href:{$ref:"#/visitors/value"},rel:{$ref:"#/visitors/value"},title:{$ref:"#/visitors/value"},targetSchema:yr,mediaType:{$ref:"#/visitors/value"},method:{$ref:"#/visitors/value"},encType:{$ref:"#/visitors/value"},schema:yr}}}}}},Sr=vt(br),jr=e=>Object.entries(e).map(([e,t])=>it(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(At,"fixedFields",{get:()=>jr(Sr.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(Nt,"fixedFields",{get:()=>jr(Sr.visitors.document.objects.JSONReference.fixedFields),enumerable:!0}),Object.defineProperty(Ft,"fixedFields",{get:()=>jr(Sr.visitors.document.objects.Media.fixedFields),enumerable:!0}),Object.defineProperty(Pt,"fixedFields",{get:()=>jr(Sr.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const Or=class extends At{constructor(e,t,n){super(e,t,n),this.element="JSONSchemaDraft6"}get idField(){throw new h("id keyword from Core vocabulary has been renamed to $id.")}set idField(e){throw new h("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 wr=class extends Pt{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 h("schema keyword from Hyper-Schema vocabulary has been renamed to submissionSchema.")}set schema(e){throw new h("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 h("method keyword from Hyper-Schema vocabulary has been removed.")}set method(e){throw new h("method keyword from Hyper-Schema vocabulary has been removed.")}get encType(){throw new h("encType keyword from Hyper-Schema vocabulary has been renamed to submissionEncType.")}set encType(e){throw new h("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 xr=J(function e(t,n,s){if(0===t.length)return n;var r=t[0];if(t.length>1){var i=R(r,s);(N(i)||"object"!=typeof i)&&(i=_(t[1])?[]:{}),n=e(Array.prototype.slice.call(t,1),n,i)}return function(e,t,n){if(_(e)&&q(n)){var s=e<0?n.length+e:e,r=[].concat(n);return r[s]=t,r}var i={};for(var o in n)i[o]=n[o];return i[e]=t,i}(r,n,s)});const Er=xr;const kr=J(function(e,t,n){var s=Array.prototype.slice.call(n,0);return s.splice(e,t),s});var Ar=J(function(e,t,n){return Er([e],t,n)});const Nr=Ar;var Fr=v(function e(t,n){if(null==n)return n;switch(t.length){case 0:return n;case 1:return function(e,t){if(null==t)return t;if(_(e)&&q(t))return kr(e,1,t);var n={};for(var s in t)n[s]=t[s];return delete n[e],n}(t[0],n);default:var s=t[0],r=Array.prototype.slice.call(t,1);return null==n[s]?function(e,t){if(_(e)&&q(t))return[].concat(t);var n={};for(var s in t)n[s]=t[s];return n}(s,n):Nr(s,e(r,n[s]),n)}});const Pr=Fr;const $r=class extends Ds{constructor(e){super(e),this.element=new Or}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 Mr=class extends Vs{BooleanElement(e){this.element=this.toRefractedElement(["document","objects","JSONSchema"],e.node),e.stop()}};const Jr=class extends On{ArrayElement(e){this.enter(e),this.element.classes.push("json-schema-examples")}};const _r=class extends gr{constructor(e){super(e),this.element=new wr}},Rr=se(Er(["visitors","document","objects","JSONSchema","element"],"jSONSchemaDraft6"),Er(["visitors","document","objects","JSONSchema","$visitor"],$r),Pr(["visitors","document","objects","JSONSchema","fixedFields","id"]),Er(["visitors","document","objects","JSONSchema","fixedFields","$id"],{$ref:"#/visitors/value"}),Er(["visitors","document","objects","JSONSchema","fixedFields","contains"],{$visitor:br.visitors.JSONSchemaOrJSONReferenceVisitor,alias:"containsField"}),Er(["visitors","document","objects","JSONSchema","fixedFields","items"],{$visitor:Mr,alias:"itemsField"}),Er(["visitors","document","objects","JSONSchema","fixedFields","propertyNames"],br.visitors.JSONSchemaOrJSONReferenceVisitor),Er(["visitors","document","objects","JSONSchema","fixedFields","const"],{$ref:"#/visitors/value"}),Er(["visitors","document","objects","JSONSchema","fixedFields","examples"],Jr),Er(["visitors","document","objects","LinkDescription","$visitor"],_r),Er(["visitors","document","objects","LinkDescription","fixedFields","hrefSchema"],br.visitors.JSONSchemaOrJSONReferenceVisitor),Pr(["visitors","document","objects","LinkDescription","fixedFields","schema"]),Er(["visitors","document","objects","LinkDescription","fixedFields","submissionSchema"],br.visitors.JSONSchemaOrJSONReferenceVisitor),Pr(["visitors","document","objects","LinkDescription","fixedFields","method"]),Pr(["visitors","document","objects","LinkDescription","fixedFields","encType"]),Er(["visitors","document","objects","LinkDescription","fixedFields","submissionEncType"],{$ref:"#/visitors/value"}))(br),Tr=vt(Rr),Dr=e=>Object.entries(e).map(([e,t])=>it(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(Or,"fixedFields",{get:()=>Dr(Tr.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(wr,"fixedFields",{get:()=>Dr(Tr.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const Ir=class extends Or{constructor(e,t,n){super(e,t,n),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 h('media keyword from Hyper-Schema vocabulary has been moved to validation vocabulary as "contentMediaType" / "contentEncoding"')}set media(e){throw new h('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 Vr=class extends wr{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 h("mediaType keyword from Hyper-Schema vocabulary has been renamed to targetMediaType.")}set mediaType(e){throw new h("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 h("submissionEncType keyword from Hyper-Schema vocabulary has been renamed to submissionMediaType.")}set submissionEncType(e){throw new h("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 Cr=class extends $r{constructor(e){super(e),this.element=new Ir}get defaultDialectIdentifier(){return"http://json-schema.org/draft-07/schema#"}};const Lr=class extends _r{constructor(e){super(e),this.element=new Vr}},qr=se(Er(["visitors","document","objects","JSONSchema","element"],"jSONSchemaDraft7"),Er(["visitors","document","objects","JSONSchema","$visitor"],Cr),Er(["visitors","document","objects","JSONSchema","fixedFields","$comment"],Rr.visitors.value),Er(["visitors","document","objects","JSONSchema","fixedFields","if"],Rr.visitors.JSONSchemaOrJSONReferenceVisitor),Er(["visitors","document","objects","JSONSchema","fixedFields","then"],Rr.visitors.JSONSchemaOrJSONReferenceVisitor),Er(["visitors","document","objects","JSONSchema","fixedFields","else"],Rr.visitors.JSONSchemaOrJSONReferenceVisitor),Pr(["visitors","document","objects","JSONSchema","fixedFields","media"]),Er(["visitors","document","objects","JSONSchema","fixedFields","contentEncoding"],Rr.visitors.value),Er(["visitors","document","objects","JSONSchema","fixedFields","contentMediaType"],Rr.visitors.value),Er(["visitors","document","objects","JSONSchema","fixedFields","writeOnly"],Rr.visitors.value),Er(["visitors","document","objects","LinkDescription","$visitor"],Lr),Er(["visitors","document","objects","LinkDescription","fixedFields","anchor"],Rr.visitors.value),Er(["visitors","document","objects","LinkDescription","fixedFields","anchorPointer"],Rr.visitors.value),Pr(["visitors","document","objects","LinkDescription","fixedFields","mediaType"]),Er(["visitors","document","objects","LinkDescription","fixedFields","targetMediaType"],Rr.visitors.value),Er(["visitors","document","objects","LinkDescription","fixedFields","targetHints"],Rr.visitors.value),Er(["visitors","document","objects","LinkDescription","fixedFields","description"],Rr.visitors.value),Er(["visitors","document","objects","LinkDescription","fixedFields","$comment"],Rr.visitors.value),Er(["visitors","document","objects","LinkDescription","fixedFields","headerSchema"],Rr.visitors.JSONSchemaOrJSONReferenceVisitor),Pr(["visitors","document","objects","LinkDescription","fixedFields","submissionEncType"]),Er(["visitors","document","objects","LinkDescription","fixedFields","submissionMediaType"],Rr.visitors.value))(Rr),Br=vt(qr),Wr=e=>Object.entries(e).map(([e,t])=>it(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(Ir,"fixedFields",{get:()=>Wr(Br.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(Vr,"fixedFields",{get:()=>Wr(Br.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const zr=class extends Ir{constructor(e,t,n){super(e,t,n),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 h("definitions keyword from Validation vocabulary has been renamed to $defs.")}set definitions(e){throw new h("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 h("dependencies keyword from Validation vocabulary has been renamed to dependentSchemas.")}set dependencies(e){throw new h("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 Ur=class extends Vr{constructor(e,t,n){super(e,t,n),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 Hr=class extends Cr{constructor(e){super(e),this.element=new zr}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,Zn.prototype.ObjectElement.call(this,e),Dt(this.element.$ref)&&(this.element.classes.push("reference-element"),this.element.meta.set("referenced-element","schema"))}};const Kr=class extends On{ObjectElement(e){this.enter(e),this.element.classes.push("json-schema-$vocabulary")}};const Gr=class extends On{StringElement(e){this.enter(e),this.element.classes.push("reference-value")}},Qr=gs(Yn,ws,On),Xr=gs(Os,ws,On);const Yr=class extends Xr{constructor(e){super(e),this.element=new kt,this.element.classes.push("json-schema-$defs"),this.specPath=wn(["document","objects","JSONSchema"])}};const Zr=class extends Qr{constructor(e){super(e),this.element=new Rt,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 ei=class extends Qr{constructor(e){super(e),this.element=new Rt,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 ti=class extends Qr{constructor(e){super(e),this.element=new Rt,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 ni=class extends Xr{constructor(e){super(e),this.element=new kt,this.element.classes.push("json-schema-dependentSchemas"),this.specPath=wn(["document","objects","JSONSchema"])}};const si=class extends Qr{ObjectElement(e){this.element=this.toRefractedElement(["document","objects","JSONSchema"],e.node),e.stop()}ArrayElement(e){const t=e.node;this.element=new Rt,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 ri=class extends Xr{constructor(e){super(e),this.element=new kt,this.element.classes.push("json-schema-properties"),this.specPath=wn(["document","objects","JSONSchema"])}};const ii=class extends Xr{constructor(e){super(e),this.element=new kt,this.element.classes.push("json-schema-patternProperties"),this.specPath=wn(["document","objects","JSONSchema"])}};const oi=class extends On{ObjectElement(e){this.enter(e),this.element.classes.push("json-schema-dependentRequired")}};const ci=class extends Lr{constructor(e){super(e),this.element=new Ur}},ai=se(Er(["visitors","document","objects","JSONSchema","element"],"jSONSchema201909"),Er(["visitors","document","objects","JSONSchema","$visitor"],Hr),Er(["visitors","document","objects","JSONSchema","fixedFields","$vocabulary"],Kr),Er(["visitors","document","objects","JSONSchema","fixedFields","$anchor"],qr.visitors.value),Er(["visitors","document","objects","JSONSchema","fixedFields","$recursiveAnchor"],qr.visitors.value),Er(["visitors","document","objects","JSONSchema","fixedFields","$recursiveRef"],qr.visitors.value),Pr(["visitors","document","objects","JSONReference","$visitor"]),Er(["visitors","document","objects","JSONSchema","fixedFields","$ref"],Gr),Pr(["visitors","document","objects","JSONSchema","fixedFields","definitions"]),Er(["visitors","document","objects","JSONSchema","fixedFields","$defs"],Yr),Er(["visitors","document","objects","JSONSchema","fixedFields","allOf"],Zr),Er(["visitors","document","objects","JSONSchema","fixedFields","anyOf"],ei),Er(["visitors","document","objects","JSONSchema","fixedFields","oneOf"],ti),Er(["visitors","document","objects","JSONSchema","fixedFields","not"],Hr),Er(["visitors","document","objects","JSONSchema","fixedFields","if"],Hr),Er(["visitors","document","objects","JSONSchema","fixedFields","then"],Hr),Er(["visitors","document","objects","JSONSchema","fixedFields","else"],Hr),Pr(["visitors","document","objects","JSONSchema","fixedFields","dependencies"]),Er(["visitors","document","objects","JSONSchema","fixedFields","dependentSchemas"],ni),Er(["visitors","document","objects","JSONSchema","fixedFields","items"],{$visitor:si,alias:"itemsField"}),Er(["visitors","document","objects","JSONSchema","fixedFields","contains"],Hr),Er(["visitors","document","objects","JSONSchema","fixedFields","properties"],ri),Er(["visitors","document","objects","JSONSchema","fixedFields","patternProperties"],ii),Er(["visitors","document","objects","JSONSchema","fixedFields","additionalProperties"],Hr),Er(["visitors","document","objects","JSONSchema","fixedFields","additionalItems"],Hr),Er(["visitors","document","objects","JSONSchema","fixedFields","propertyNames"],Hr),Er(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedItems"],Hr),Er(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedProperties"],Hr),Er(["visitors","document","objects","JSONSchema","fixedFields","maxContains"],qr.visitors.value),Er(["visitors","document","objects","JSONSchema","fixedFields","minContains"],qr.visitors.value),Er(["visitors","document","objects","JSONSchema","fixedFields","dependentRequired"],oi),Er(["visitors","document","objects","JSONSchema","fixedFields","deprecated"],qr.visitors.value),Er(["visitors","document","objects","JSONSchema","fixedFields","contentSchema"],Hr),Er(["visitors","document","objects","LinkDescription","element"],"linkDescription"),Er(["visitors","document","objects","LinkDescription","$visitor"],ci),Er(["visitors","document","objects","LinkDescription","fixedFields","targetSchema"],Hr),Er(["visitors","document","objects","LinkDescription","fixedFields","hrefSchema"],Hr),Er(["visitors","document","objects","LinkDescription","fixedFields","headerSchema"],Hr),Er(["visitors","document","objects","LinkDescription","fixedFields","submissionSchema"],Hr))(qr),ui=vt(ai),li=e=>Object.entries(e).map(([e,t])=>it(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(zr,"fixedFields",{get:()=>li(ui.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(Ur,"fixedFields",{get:()=>li(ui.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const hi=class extends zr{constructor(e,t,n){super(e,t,n),this.element="JSONSchema202012"}get $dynamicAnchor(){return this.get("$dynamicAnchor")}set $dynamicAnchor(e){this.set("$dynamicAnchor",e)}get $recursiveAnchor(){throw new h("$recursiveAnchor keyword from Core vocabulary has been renamed to $dynamicAnchor.")}set $recursiveAnchor(e){throw new h("$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 h("$recursiveRef keyword from Core vocabulary has been renamed to $dynamicRef.")}set $recursiveRef(e){throw new h("$recursiveRef keyword from Core vocabulary has been renamed to $dynamicRef.")}get prefixItems(){return this.get("prefixItems")}set prefixItems(e){this.set("prefixItems",e)}};const mi=class extends Ur{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)}},di={namespace:e=>{const{base:t}=e;return t.register("jSONSchema202012",hi),t.register("linkDescription",mi),t}},fi={JSONSchema202012Element:{prefixItems(...e){const t=new Rt(...e);return t.classes.push("json-schema-prefixItems"),t},items:(...e)=>new hi(...e),contains:(...e)=>new hi(...e),required(...e){const t=new Rt(...e);return t.classes.push("json-schema-required"),t},properties(...e){const t=new kt(...e);return t.classes.push("json-schema-properties"),t},additionalProperties:(...e)=>new hi(...e),patternProperties(...e){const t=new kt(...e);return t.classes.push("json-schema-patternProperties"),t},dependentSchemas(...e){const t=new kt(...e);return t.classes.push("json-schema-dependentSchemas"),t},propertyNames:(...e)=>new hi(...e),enum(...e){const t=new Rt(...e);return t.classes.push("json-schema-enum"),t},allOf(...e){const t=new Rt(...e);return t.classes.push("json-schema-allOf"),t},anyOf(...e){const t=new Rt(...e);return t.classes.push("json-schema-anyOf"),t},oneOf(...e){const t=new Rt(...e);return t.classes.push("json-schema-oneOf"),t},if:(...e)=>new hi(...e),then:(...e)=>new hi(...e),else:(...e)=>new hi(...e),not:(...e)=>new hi(...e),$defs(...e){const t=new kt(...e);return t.classes.push("json-schema-$defs"),t},examples(...e){const t=new Rt(...e);return t.classes.push("json-schema-examples"),t},links(...e){const t=new Rt(...e);return t.classes.push("json-schema-links"),t},$vocabulary(...e){const t=new kt(...e);return t.classes.push("json-schema-$vocabulary"),t},unevaluatedItems:(...e)=>new hi(...e),unevaluatedProperties:(...e)=>new hi(...e),$dependentRequired(...e){const t=new kt(...e);return t.classes.push("json-schema-$dependentRequired"),t},contentSchema:(...e)=>new hi(...e),type(...e){const t=new Rt(...e);return t.classes.push("json-schema-type"),t}},LinkDescriptionElement:{hrefSchema:(...e)=>new hi(...e),targetSchema:(...e)=>new hi(...e),submissionSchema:(...e)=>new hi(...e),templatePointers:(...e)=>new kt(...e),templateRequired:(...e)=>new Rt(...e),targetHints:(...e)=>new kt(...e),headerSchema:(...e)=>new hi(...e)},"json-schema-prefixItems":{"<*>":function(...e){return new hi(...e)}},"json-schema-properties":{"[key: *]":function(...e){return new hi(...e)}},"json-schema-patternProperties":{"[key: *]":function(...e){return new hi(...e)}},"json-schema-dependentSchemas":{"[key: *]":function(...e){return new hi(...e)}},"json-schema-allOf":{"<*>":function(...e){return new hi(...e)}},"json-schema-anyOf":{"<*>":function(...e){return new hi(...e)}},"json-schema-oneOf":{"<*>":function(...e){return new hi(...e)}},"json-schema-$defs":{"[key: *]":function(...e){return new hi(...e)}},"json-schema-links":{"<*>":function(...e){return new mi(...e)}}},pi=(e,t)=>{const n=Vn(e),s=fi[n]||fi[pn(e.classes.first)];return void 0===s?void 0:Object.hasOwn(s,"[key: *]")?s["[key: *]"]:s[t]},yi=()=>()=>({visitor:{StringElement(e){const t=e.node;if(!(e=>Dt(e)&&zt(e,["yaml-e-node","yaml-e-scalar"]))(t))return;const n=e.getAncestorNodes().reverse().filter(Tt),s=n.at(-1);let r,i;if(Lt(s)?(i=t,r=pi(s,"<*>")):Bt(s)&&(i=n.at(-2),r=pi(i,pn(s.key))),"function"!=typeof r)return;const o=r.call({context:i},void 0,sn(t.meta),sn(t.attributes));Qt.transfer(t,o),e.replaceWith(o)}}});const vi=J(function(e,t,n){var s,r={};for(s in n=n||{},t=t||{})g(s,t)&&(r[s]=g(s,n)?e(s,t[s],n[s]):t[s]);for(s in n)g(s,n)&&!g(s,r)&&(r[s]=n[s]);return r});const gi=J(function e(t,n,s){return vi(function(n,s,r){return be(s)&&be(r)?e(t,s,r):t(n,s,r)},n,s)});const bi=v(function(e,t){return gi(function(e,t,n){return n},e,t)});const Si=J(function(e,t,n){return xn(e,T(t,n))});const ji=te(0,-1);const Oi=v(function(e,t){return e.apply(this,t)});const wi=ze(tt);const xi=Be(ar,Pn);const Ei=Ie(3,function(e,t,n){var s=V(e,n),r=V(ji(e),n);if(!wi(s)&&!xi(e)){var i=K(s,r);return Oi(i,t)}});const ki=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 Qt)){const n=Qt.from(e);n&&(t.meta||(t.meta={}),t.meta.__mappings__=this.serialise(n))}const n=this.serialiseContent(e.content);return void 0!==n&&(t.content=n),t}deserialise(e){if(!e.element)throw new Error("Given value is not an object containing an element name");const t=new(this.namespace.getElementClass(e.element));let n;t.element!==e.element&&(t.element=e.element);let s=e.meta;if(e.meta?.__mappings__){const{__mappings__:t,...r}=e.meta;n=t,s=Object.keys(r).length>0?r:void 0}if(s&&this.deserialiseObject(s,t.meta),n){this.deserialise(n).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,n={key:this.serialise(t.key)};return t.value&&(n.value=this.serialise(t.value)),n}if(e&&Array.isArray(e)){if(0===e.length)return;return e.map(e=>this.serialise(e))}return e}deserialiseContent(e){if(e){if(e.element)return this.deserialise(e);if(e.key){const t=new this.namespace.KeyValuePair(this.deserialise(e.key));return e.value&&(t.value=this.deserialise(e.value)),t}if(Array.isArray(e))return e.map(e=>this.deserialise(e))}return e}serialiseObject(e){const t={};if(e.forEach((e,n)=>{e&&(t[n.toValue()]=this.serialise(e))}),0!==Object.keys(t).length)return t}deserialiseObject(e,t){Object.keys(e).forEach(n=>{t.set(n,this.deserialise(e[n]))})}},Ai=e=>null===e,Ni=e=>"string"==typeof e,Fi=e=>"number"==typeof e,Pi=e=>"boolean"==typeof e,$i=e=>null!==e&&"object"==typeof e;class Mi{elementMap={};elementDetection=[];Element;KeyValuePair;_elements;_attributeElementKeys=[];_attributeElementArrayKeys=[];constructor(e){this.Element=Ot,this.KeyValuePair=gt,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",Jt).register("string",$t).register("number",Mt).register("boolean",_t).register("array",Rt).register("object",kt).register("member",Et).register("ref",un).register("link",an).register("sourceMap",Qt),this.detect(Ai,Jt,!1).detect(Ni,$t,!1).detect(Fi,Mt,!1).detect(Pi,_t,!1).detect(Array.isArray,Rt,!1).detect($i,kt,!1),this}register(e,t){return this._elements=void 0,this.elementMap[e]=t,this}unregister(e){return this._elements=void 0,delete this.elementMap[e],this}detect(e,t,n){return void 0===n||n?this.elementDetection.unshift([e,t]):this.elementDetection.push([e,t]),this}toElement(e){if(e instanceof this.Element)return e;let t;for(const[n,s]of this.elementDetection)if(n(e)){t=new s(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 ki(this)}}ki.prototype.Namespace=Mi;const Ji=Mi,_i=new Ji,Ri={isElement:Tt,isStringElement:Dt,isNumberElement:It,isNullElement:Vt,isBooleanElement:Ct,isArrayElement:Lt,isObjectElement:qt,isMemberElement:Bt,isPrimitiveElement:e=>qt(e)&&"object"===e.element||Lt(e)&&"array"===e.element||Ct(e)&&"boolean"===e.element||It(e)&&"number"===e.element||Dt(e)&&"string"===e.element||Vt(e)&&"null"===e.element||Bt(e)&&"member"===e.element,isLinkElement:dn,isRefElement:fn,isAnnotationElement:e=>e instanceof ln,isCommentElement:e=>e instanceof hn,isParseResultElement:e=>e instanceof mn,isSourceMapElement:e=>e instanceof Qt,hasElementSourceMap:Wt,includesSymbols:(e,t)=>{if(0===t.length)return!0;if(!e.hasAttributesProperty("symbols"))return!1;const n=e.attributes.get("symbols");return!!Lt(n)&&t.every(e=>n.includes(e))},includesClasses:zt},Ti={toolboxCreator:()=>({predicates:Ri,namespace:_i}),visitorOptions:{exposeEdits:!0}},Di=(e,t,n={})=>{if(0===t.length)return e;const s=bi(Ti,n),{toolboxCreator:r,visitorOptions:i}=s,o=r(),c=t.map(e=>e(o)),a=Un(c.map(Si({},"visitor")),i);c.forEach(Ei(["pre"],[]));const u=Qn(e,a);return c.forEach(Ei(["post"],[])),u};function Ii(e){return void 0===e?new Jt:Vi(e)}function Vi(e){if(e instanceof Ot)return e;if("string"==typeof e)return new $t(e);if("number"==typeof e)return new Mt(e);if("boolean"==typeof e)return new _t(e);if(null===e)return new Jt;if(Array.isArray(e))return new Rt(e.map(Ii));if("object"==typeof e)return new kt(e);throw new Error("Cannot refract value of type "+typeof e)}Di[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,n={})=>{if(0===t.length)return e;const s=bi(Ti,n),{toolboxCreator:r,visitorOptions:i}=s,o=r(),c=t.map(e=>e(o)),a=Hn(c.map(Si({},"visitor")),i);await Promise.allSettled(c.map(Ei(["pre"],[])));const u=await Xn(e,a);return await Promise.allSettled(c.map(Ei(["post"],[]))),u},Ot.prototype.ObjectElement=kt,Ot.prototype.ArrayElement=Rt,Ot.prototype.RefElement=un,Ot.prototype.MemberElement=Et,Ot.prototype.refract=Vi;const Ci=class extends Hr{constructor(e){super(e),this.element=new hi}get defaultDialectIdentifier(){return"https://json-schema.org/draft/2020-12/schema"}};const Li=class extends Qr{constructor(e){super(e),this.element=new Rt,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 qi=class extends ci{constructor(e){super(e),this.element=new mi}},Bi=se(Er(["visitors","document","objects","JSONSchema","element"],"jSONSchema202012"),Er(["visitors","document","objects","JSONSchema","$visitor"],Ci),Pr(["visitors","document","objects","JSONSchema","fixedFields","$recursiveAnchor"]),Er(["visitors","document","objects","JSONSchema","fixedFields","$dynamicAnchor"],ai.visitors.value),Pr(["visitors","document","objects","JSONSchema","fixedFields","$recursiveRef"]),Er(["visitors","document","objects","JSONSchema","fixedFields","$dynamicRef"],ai.visitors.value),Er(["visitors","document","objects","JSONSchema","fixedFields","not"],Ci),Er(["visitors","document","objects","JSONSchema","fixedFields","if"],Ci),Er(["visitors","document","objects","JSONSchema","fixedFields","then"],Ci),Er(["visitors","document","objects","JSONSchema","fixedFields","else"],Ci),Er(["visitors","document","objects","JSONSchema","fixedFields","prefixItems"],Li),Er(["visitors","document","objects","JSONSchema","fixedFields","items"],Ci),Er(["visitors","document","objects","JSONSchema","fixedFields","contains"],Ci),Er(["visitors","document","objects","JSONSchema","fixedFields","additionalProperties"],Ci),Pr(["visitors","document","objects","JSONSchema","fixedFields","additionalItems"]),Er(["visitors","document","objects","JSONSchema","fixedFields","propertyNames"],Ci),Er(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedItems"],Ci),Er(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedProperties"],Ci),Er(["visitors","document","objects","JSONSchema","fixedFields","contentSchema"],Ci),Er(["visitors","document","objects","LinkDescription","element"],"linkDescription"),Er(["visitors","document","objects","LinkDescription","$visitor"],qi),Er(["visitors","document","objects","LinkDescription","fixedFields","targetSchema"],Ci),Er(["visitors","document","objects","LinkDescription","fixedFields","hrefSchema"],Ci),Er(["visitors","document","objects","LinkDescription","fixedFields","headerSchema"],Ci),Er(["visitors","document","objects","LinkDescription","fixedFields","submissionSchema"],Ci))(ai),Wi=e=>e instanceof hi,zi=e=>e instanceof mi,Ui=()=>{const e=new Ji,t={...n,isStringElement:Dt};return e.use(di),{predicates:t,namespace:e}},Hi=(e,{element:t="jSONSchema202012",plugins:n=[],specificationObj:s=Bi}={})=>{const r=Vi(e),i=vt(s),o=i.elementMap[t];if(!o)throw new Error(`Unknown element type: "${t}"`);const c=new(V(o,i))({specObj:i});return Qn(r,c),Di(c.element,n,{toolboxCreator:Ui})},Ki=(e,t={})=>Hi(e,{...t,element:"jSONSchema202012"}),Gi=(e,t={})=>Hi(e,{...t,element:"linkDescription"}),Qi=Hi;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.apidomNsJSONSchema202012=t():e.apidomNsJSONSchema202012=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,{$defsVisitor:()=>hi,$refVisitor:()=>li,$vocabularyVisitor:()=>ai,AllOfVisitor:()=>pi,AlternatingVisitor:()=>Nr,AnyOfVisitor:()=>mi,BaseSchemaArrayVisitor:()=>ui,BaseSchemaMapVisitor:()=>di,DependentRequiredVisitor:()=>vi,DependentSchemasVisitor:()=>yi,FallbackVisitor:()=>Ss,FixedFieldsVisitor:()=>pn,ItemsVisitor:()=>gi,JSONSchema202012MediaTypes:()=>m,JSONSchemaElement:()=>ki,JSONSchemaVisitor:()=>eo,LinkDescriptionElement:()=>Ei,LinkDescriptionVisitor:()=>so,MapVisitor:()=>$n,OneOfVisitor:()=>fi,ParentSchemaAwareVisitor:()=>Jn,PatternPropertiesVisitor:()=>bi,PatternedFieldsVisitor:()=>Dn,PrefixItemsVisitor:()=>to,PropertiesVisitor:()=>xi,SpecificationVisitor:()=>hn,Visitor:()=>vs,default:()=>Ai,isJSONSchemaElement:()=>ro,isLinkDescriptionElement:()=>io,mediaTypes:()=>f,refract:()=>uo,refractJSONSchema:()=>ao,refractLinkDescription:()=>lo,refractorPluginReplaceEmptyElement:()=>Ii,specificationObj:()=>no});var s={};function n(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function r(e){return function t(s){return 0===arguments.length||n(s)?t:e.apply(this,arguments)}}function i(e,t){return t[e<0?t.length+e:e]}e.r(s),e.d(s,{isJSONSchemaElement:()=>ro,isLinkDescriptionElement:()=>io});const o=r(function(e){return i(-1,e)});class c 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 a=c;class l extends Error{static[Symbol.hasInstance](e){return super[Symbol.hasInstance](e)||Function.prototype[Symbol.hasInstance].call(a,e)}constructor(e,t){super(e,t),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const u=l;const d=class extends u{};const h=class extends d{};const p=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 m extends p{filterByFormat(e="generic"){const t="generic"===e?"schema;version":e;return this.filter(e=>e.includes(t))}findBy(e="2020-12",t="generic"){const s="generic"===t?`schema;version=${e}`:`schema+${t};version=${e}`;return this.find(e=>e.includes(s))||this.unknownMediaType}latest(e="generic"){return o(this.filterByFormat(e))}}const f=new m("application/schema;version=2020-12","application/schema+json;version=2020-12","application/schema+yaml;version=2020-12");function y(e,t,s){for(var n=0,r=s.length;n<r;)t=e(t,s[n]),n+=1;return t}function g(e){return function t(s,i){switch(arguments.length){case 0:return t;case 1:return n(s)?t:r(function(t){return e(s,t)});default:return n(s)&&n(i)?t:n(s)?r(function(t){return e(t,i)}):n(i)?r(function(t){return e(s,t)}):e(s,i)}}}function x(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var b=Object.prototype.toString;const v=function(){return"[object Arguments]"===b.call(arguments)?function(e){return"[object Arguments]"===b.call(e)}:function(e){return x("callee",e)}}();var S=!{toString:null}.propertyIsEnumerable("toString"),w=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],O=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},k="function"!=typeof Object.keys||O?r(function(e){if(Object(e)!==e)return[];var t,s,n=[],r=O&&v(e);for(t in e)!x(t,e)||r&&"length"===t||(n[n.length]=t);if(S)for(s=w.length-1;s>=0;)x(t=w[s],e)&&!j(n,t)&&(n[n.length]=t),s-=1;return n}):r(function(e){return Object(e)!==e?[]:Object.keys(e)});const E=k;const A=g(function(e,t){return y(function(s,n){return s[n]=e(t[n],n,t),s},{},E(t))});const F=r(function(e){return null==e});var N=g(function(e,t){if(0===e.length||F(t))return!1;for(var s=t,n=0;n<e.length;){if(F(s)||!x(e[n],s))return!1;s=s[e[n]],n+=1}return!0});const I=N;var T=g(function(e,t){return I([e],t)});const M=T;function P(e){return function t(s,i,o){switch(arguments.length){case 0:return t;case 1:return n(s)?t:g(function(t,n){return e(s,t,n)});case 2:return n(s)&&n(i)?t:n(s)?g(function(t,s){return e(t,i,s)}):n(i)?g(function(t,n){return e(s,t,n)}):r(function(t){return e(s,i,t)});default:return n(s)&&n(i)&&n(o)?t:n(s)&&n(i)?g(function(t,s){return e(t,s,o)}):n(s)&&n(o)?g(function(t,s){return e(t,i,s)}):n(i)&&n(o)?g(function(t,n){return e(s,t,n)}):n(s)?r(function(t){return e(t,i,o)}):n(i)?r(function(t){return e(s,t,o)}):n(o)?r(function(t){return e(s,i,t)}):e(s,i,o)}}}const C=Number.isInteger||function(e){return(e|0)===e};const D=function(e,t){if(null!=t)return C(e)?i(e,t):t[e]};const $=g(D);const J=P(function(e,t,s){return e($(t,s))});function L(e,t){for(var s=t,n=0;n<e.length;n+=1){if(null==s)return;var r=e[n];s=C(r)?i(r,s):s[r]}return s}const B=g(L);function q(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 R(e,t){return function(){return t.call(this,e.apply(this,arguments))}}const _=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};function V(e){return"[object String]"===Object.prototype.toString.call(e)}const H=r(function(e){return!!_(e)||!!e&&("object"==typeof e&&(!V(e)&&(0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))});var U="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function G(e,t,s){return function(n,r,i){if(H(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[U])return s(n,r,i[U]());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 z(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 X=g(function(e,t){return q(e.length,function(){return e.apply(t,arguments)})});function W(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 Y(e,t,s,n){return e["@@transducer/result"](s[n](X(e["@@transducer/step"],e),t))}const K=G(z,Y,W);var Z=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 Q=P(function(e,t,s){return K("function"==typeof e?new Z(e):e,t,s)});function ee(e,t){return function(){var s=arguments.length;if(0===s)return t();var n=arguments[s-1];return _(n)||"function"!=typeof n[e]?t.apply(this,arguments):n[e].apply(n,Array.prototype.slice.call(arguments,0,s-1))}}const te=P(ee("slice",function(e,t,s){return Array.prototype.slice.call(s,e,t)}));const se=r(ee("tail",te(1,1/0)));function ne(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return q(arguments[0].length,Q(R,arguments[0],se(arguments)))}const re=r(function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});const ie="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var oe=function(e,t){switch(arguments.length){case 0:return oe;case 1:return function t(s){return 0===arguments.length?t:ie(e,s)};default:return ie(e,t)}};const ce=oe;function ae(e){for(var t,s=[];!(t=e.next()).done;)s.push(t.value);return s}function le(e,t,s){for(var n=0,r=s.length;n<r;){if(e(t,s[n]))return!0;n+=1}return!1}function ue(e,t,s,n){var r=ae(e);function i(e,t){return de(e,t,s.slice(),n.slice())}return!le(function(e,t){return!le(i,t,e)},ae(t),r)}function de(e,t,s,n){if(ie(e,t))return!0;var r,i,o=re(e);if(o!==re(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||!ie(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!ie(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&&ue(e.entries(),t.entries(),s.concat([e]),n.concat([t]));case"Set":return e.size===t.size&&ue(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=E(e);if(a.length!==E(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(!x(d,t)||!de(t[d],e[d],l,u))return!1;c-=1}return!0}const he=g(function(e,t){return de(e,t,[],[])});function pe(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(he(e[s],t))return s;s+=1}return-1}(t,e,0)>=0}function me(e,t){for(var s=0,n=t.length,r=Array(n);s<n;)r[s]=e(t[s]),s+=1;return r}function fe(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 ye=function(e){return(e<10?"0":"")+e};const ge="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+ye(e.getUTCMonth()+1)+"-"+ye(e.getUTCDate())+"T"+ye(e.getUTCHours())+":"+ye(e.getUTCMinutes())+":"+ye(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function xe(e,t,s){return function(){if(0===arguments.length)return s();var n=arguments[arguments.length-1];if(!_(n)){for(var r=0;r<e.length;){if("function"==typeof n[e[r]])return n[e[r]].apply(n,Array.prototype.slice.call(arguments,0,-1));r+=1}if(function(e){return null!=e&&"function"==typeof e["@@transducer/step"]}(n))return t.apply(null,Array.prototype.slice.call(arguments,0,-1))(n)}return s.apply(this,arguments)}}function be(e){return"[object Object]"===Object.prototype.toString.call(e)}const ve=function(){return this.xf["@@transducer/init"]()},Se=function(e){return this.xf["@@transducer/result"](e)};var we=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=ve,e.prototype["@@transducer/result"]=Se,e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.xf["@@transducer/step"](e,t):e},e}();function Oe(e){return function(t){return new we(e,t)}}var je=g(xe(["fantasy-land/filter","filter"],Oe,function(e,t){return be(t)?y(function(s,n){return e(t[n])&&(s[n]=t[n]),s},{},E(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 ke=je;const Ee=g(function(e,t){return ke((s=e,function(){return!s.apply(this,arguments)}),t);var s});function Ae(e,t){var s=function(s){var n=t.concat([e]);return pe(s,n)?"<Circular>":Ae(s,n)},n=function(e,t){return me(function(t){return fe(t)+": "+s(e[t])},t.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+me(s,e).join(", ")+"))";case"[object Array]":return"["+me(s,e).concat(n(e,Ee(function(e){return/^\d+$/.test(e)},E(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):fe(ge(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())+")":fe(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,E(e)).join(", ")+"}"}}const Fe=r(function(e){return Ae(e,[])});const Ne=P(function(e,t,s){return e(L(t,s))});function Ie(e){var t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t}const Te=g(function(e,t){return e&&t});function Me(e,t,s){for(var n=s.next();!n.done;)t=e(t,n.value),n=s.next();return t}function Pe(e,t,s,n){return s[n](e,t)}const Ce=G(y,Pe,Me);var De=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=ve,e.prototype["@@transducer/result"]=Se,e.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},e}();const $e=function(e){return function(t){return new De(e,t)}};function Je(e,t,s){return function(){for(var r=[],i=0,o=e,c=0,a=!1;c<t.length||i<arguments.length;){var l;c<t.length&&(!n(t[c])||i>=arguments.length)?l=t[c]:(l=arguments[i],i+=1),r[c]=l,n(l)?a=!0:o-=1,c+=1}return!a&&o<=0?s.apply(this,r):q(Math.max(0,o),Je(e,r,s))}}const Le=g(function(e,t){return 1===e?r(t):q(e,Je(e,[],t))});const Be=g(xe(["fantasy-land/map","map"],$e,function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return Le(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},{},E(t));default:return me(e,t)}}));const qe=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))}:Ce(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,Be(s,t))},[],e)});const Re=g(function(e,t){var s=Le(e,t);return Le(e,function(){return y(qe,Be(s,arguments[0]),Array.prototype.slice.call(arguments,1))})});const _e=r(function(e){return Re(e.length,e)});const Ve=g(function(e,t){return Ie(e)?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:_e(Te)(e,t)});const He=he(null);const Ue=_e(r(function(e){return!e}));const Ge=Ue(He);function ze(e){return ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ze(e)}const Xe=function(e){return"object"===ze(e)};const We=Le(1,Ve(Ge,Xe));const Ye=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=Fe(e),o=s(i,Fe(t));return void 0!==o&&o===i?e:t});const Ke=g(function(e,t){return Be($(e),t)});const Ze=r(function(e){return Le(Q(Ye,0,Ke("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 Qe=Le(1,ne(re,ce("GeneratorFunction")));const et=Le(1,ne(re,ce("AsyncFunction")));const tt=Ze([ne(re,ce("Function")),Qe,et]);var st=ne(re,ce("Object")),nt=ne(Fe,he(Fe(Object))),rt=Ne(Ve(tt,nt),["constructor"]);const it=Le(1,function(e){if(!We(e)||!st(e))return!1;var t=Object.getPrototypeOf(e);return!!He(t)||rt(t)});const ot=Le(1,ne(re,ce("String")));const ct=r(function(e){return Le(e.length,e)});const at=g(function(e,t){return Le(e+1,function(){var s=arguments[e];if(null!=s&&Ie(s[t]))return s[t].apply(s,Array.prototype.slice.call(arguments,0,e));throw new TypeError(Fe(s)+' does not have a method named "'+t+'"')})});const lt=at(1,"split");var ut=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=ve,e.prototype["@@transducer/result"]=Se,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 ut(e,t)}}const ht=g(xe(["dropWhile"],dt,function(e,t){for(var s=0,n=t.length;s<n&&e(t[s]);)s+=1;return te(s,1/0,t)}));const pt=at(1,"join");const mt=r(function(e){return Le(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(pe));const ft=ct(function(e,t){return ne(lt(""),ht(mt(e)),pt(""))(t)}),yt=new WeakMap,gt=e=>{if(yt.has(e))return yt.get(e);const t={},s=(e,n,r)=>("string"==typeof e.element&&(t[e.element]=e.$visitor?[...r,"$visitor"]:r),A((e,t)=>{const i=[...r,t];if(it(e)&&M("$ref",e)&&J(ot,"$ref",e)){const t=B(["$ref"],e),s=ft("#/",t);return B(s.split("/"),n)}return it(e)?s(e,n,i):e},e)),n=s(e,e,[]);return n.elementMap=t,yt.set(e,n),n};const xt=class{key;value;constructor(e,t){this.key=e,this.value=t}toValue(){return{key:this.key?.toValue(),value:this.value?.toValue()}}};class bt{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 bt(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 bt(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 vt=bt;class St{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 St)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 xt)this._content=e;else if(e instanceof vt)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 St?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 St?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 xt){const t=[];return e.key&&t.push(e.key),e.value&&t.push(e.value),t}return e instanceof St?[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 St||e instanceof xt?e.toValue():Array.isArray(e)?e.map(e=>e.toValue()):e}equals(e){return he(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 wt=St;class Ot extends wt{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 jt=Ot;const kt=class extends wt{constructor(e,t,s,n){super(new xt,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 Et=class extends jt{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 kt(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 vt(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 vt(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 At=class extends Et{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 Ft=class extends Et{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 Nt=class extends Et{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 It=class extends Et{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 Tt=class extends wt{constructor(e,t,s){super(e,t,s),this.element="string"}primitive(){return"string"}get length(){return this.content?.length??0}};const Mt=class extends wt{constructor(e,t,s){super(e,t,s),this.element="number"}primitive(){return"number"}};const Pt=class extends wt{constructor(e,t,s){super(e??null,t,s),this.element="null"}primitive(){return"null"}set(e){throw new Error("Cannot set the value of null")}};const Ct=class extends wt{constructor(e,t,s){super(e,t,s),this.element="boolean"}primitive(){return"boolean"}};const Dt=class extends jt{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([])}},$t=e=>e instanceof wt,Jt=e=>e instanceof Tt,Lt=e=>e instanceof Mt,Bt=e=>e instanceof Pt,qt=e=>e instanceof Ct,Rt=e=>e instanceof Dt,_t=e=>e instanceof Et,Vt=e=>e instanceof kt,Ht=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,Ut=(e,t)=>0===t.length||!!$t(e)&&(!e.isMetaEmpty&&(!!e.hasMetaProperty("classes")&&t.every(t=>e.classes.includes(t))));class Gt extends Tt{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(Xt).join("");const a=new Gt(c);return a.startLine=t,a.startCharacter=s,a.startOffset=n,a.endLine=r,a.endCharacter=i,a.endOffset=o,a}applyTo(e){this.content&&([e.startLine,e.startCharacter,e.startOffset,e.endLine,e.endCharacter,e.endOffset]=function(e){const t=e.startsWith("sm1:")?e.slice(4):e,s=[];let n=0;for(let e=0;e<6;e++){const e=Wt(t,n);s.push(e.value),n=e.next}return s}(this.content))}}const zt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Xt(e){let t=e>>>0,s="";do{let e=31&t;t>>>=5,0!==t&&(e|=32),s+=zt[e]}while(0!==t);return s}function Wt(e,t=0){let s=0,n=0,r=t;for(;;){const t=e[r++],i=zt.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 Yt=Gt;const Kt=class extends u{constructor(e,t){if(super(e,t),null!=t&&"object"==typeof t){const{cause:e,...s}=t;Object.assign(this,s)}}};const Zt=class extends Kt{value;constructor(e,t){super(e,t),void 0!==t&&(this.value=t.value)}};const Qt=class extends Zt{};const es=class extends Zt{},ts=(e,t)=>{const{visited:s=new WeakMap}=t,n={...t,visited:s};if(s.has(e))return s.get(e);const r=is(e);s.set(e,r);const{content:i}=e;return Array.isArray(i)?r.content=i.map(e=>ts(e,n)):$t(i)?r.content=ts(i,n):r.content=i instanceof xt?ss(i,n):i,r},ss=(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?ts(r,n):void 0,c=void 0!==i?ts(i,n):void 0,a=new xt(o,c);return s.set(e,a),a},ns=(e,t={})=>{if(e instanceof xt)return ss(e,t);if(e instanceof vt)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=>ts(e,n)),i=new vt(r);return s.set(e,i),i})(e,t);if($t(e))return ts(e,t);throw new Qt("Value provided to cloneDeep function couldn't be cloned",{value:e})};ns.safe=e=>{try{return ns(e)}catch{return e}};const rs=e=>{const{key:t,value:s}=e;return new xt(t,s)},is=e=>{const t=new(0,e.constructor);t.element=e.element,e.isMetaEmpty||(t.meta=ns(e.meta)),e.isAttributesEmpty||(t.attributes=ns(e.attributes)),Ht(e)&&Yt.transfer(e,t);const{content:s}=e;return $t(s)?t.content=is(s):Array.isArray(s)?t.content=[...s]:t.content=s instanceof xt?rs(s):s,t},os=e=>{if(e instanceof xt)return rs(e);if(e instanceof vt)return(e=>{const t=[...e];return new vt(t)})(e);if($t(e))return is(e);throw new es("Value provided to cloneShallow function couldn't be cloned",{value:e})};os.safe=e=>{try{return os(e)}catch{return e}};const cs=class extends wt{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 as=class extends wt{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 ls=class extends Tt{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 us=class extends Tt{constructor(e,t,s){super(e,t,s),this.element="comment"}};const ds=class extends Dt{constructor(e,t,s){super(e,t,s),this.element="parseResult"}get api(){return this.filter(e=>Ut(e,["api"])).first}get results(){return this.filter(e=>Ut(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&&Ut(e,["warning"]))}get errors(){return this.filter(e=>"annotation"===e.element&&Ut(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)}},hs=e=>e instanceof cs,ps=e=>e instanceof as,ms=e=>{if(!$t(e))return e;if(Jt(e)||Lt(e)||qt(e)||Bt(e))return e.toValue();const t=new WeakMap,s=e=>{if(!$t(e))return e;if(_t(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(Rt(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 ps(e)?String(e.toValue()):hs(e)?Jt(e.href)?e.href.toValue():"":e.toValue()};return s(e)},fs=e=>{const t=e.isMetaEmpty?void 0:ns(e.meta),s=e.isAttributesEmpty?void 0:ns(e.attributes);return new e.constructor(void 0,t,s)},ys=(e,t)=>t.clone&&t.isMergeableElement(e)?xs(fs(e),e,t):e,gs={clone:!0,isMergeableElement:e=>_t(e)||Rt(e),arrayElementMerge:(e,t,s)=>new(0,e.constructor)(e.concat(t).map(e=>ys(e,s))),objectElementMerge:(e,t,s)=>{const n=_t(e)?fs(e):fs(t);return _t(e)&&e.forEach((e,t,r)=>{const i=os(r);i.value=ys(e,s),n.content.push(i)}),t.forEach((t,r,i)=>{const o=ms(r);let c;if(_t(e)&&e.hasKey(o)&&s.isMergeableElement(t)){const n=e.get(o);c=os(i),c.value=((e,t)=>{if("function"!=typeof t.customMerge)return xs;const s=t.customMerge(e,t);return"function"==typeof s?s:xs})(r,s)(n,t,s)}else c=os(i),c.value=ys(t,s);n.remove(o),n.content.push(c)}),n},customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0},xs=(e,t,s)=>{const n={...gs,...s};n.isMergeableElement=n.isMergeableElement??gs.isMergeableElement,n.arrayElementMerge=n.arrayElementMerge??gs.arrayElementMerge,n.objectElementMerge=n.objectElementMerge??gs.objectElementMerge;const r=Rt(t);if(!(r===Rt(e)))return ys(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=>ns(e):e.customMetaMerge)(n)(e.meta,t.meta),i.attributes=(e=>"function"!=typeof e.customAttributesMerge?e=>ns(e):e.customAttributesMerge)(n)(e.attributes,t.attributes),i};xs.all=(e,t)=>{if(!Array.isArray(e))throw new TypeError("First argument of deepmerge should be an array.");return 0===e.length?new Et:e.reduce((e,s)=>xs(e,s,t),fs(e[0]))};const bs=xs;const vs=class{element;constructor(e){Object.assign(this,e)}copyMetaAndAttributes(e,t){if(!e.isMetaEmpty||!t.isMetaEmpty){const s=t.isMetaEmpty?new Et:t.meta,n=e.isMetaEmpty?new Et:e.meta;t.meta=bs(s,n)}if(!e.isAttributesEmpty||!t.isAttributesEmpty){const s=t.isAttributesEmpty?new Et:t.attributes,n=e.isAttributesEmpty?new Et:e.attributes;t.attributes=bs(s,n)}Yt.transfer(e,t)}};const Ss=class extends vs{enter(e){this.element=ns(e.node),e.stop()}};const ws=r(function(e){return function(){return e}});const Os=g(function(e,t){return null==t||t!=t?e:t});const js=ws(void 0);const ks=he(js());const Es=r(function(e){return Le(Q(Ye,0,Ke("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 As=r(function(e){return null!=e&&"function"==typeof e["fantasy-land/empty"]?e["fantasy-land/empty"]():null!=e&&null!=e.constructor&&"function"==typeof e.constructor["fantasy-land/empty"]?e.constructor["fantasy-land/empty"]():null!=e&&"function"==typeof e.empty?e.empty():null!=e&&null!=e.constructor&&"function"==typeof e.constructor.empty?e.constructor.empty():e==Set||e instanceof Set?new Set:e==Map||e instanceof Map?new Map:_(e)?[]:V(e)?"":be(e)?{}:v(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 Fs=As;const Ns=r(function(e){return null!=e&&he(e,Fs(e))});const Is=r(function(e){return!Ns(e)});const Ts=g(function(e,t){return e||t});const Ms=Le(1,Ve(Ge,g(function(e,t){return Ie(e)?function(){return e.apply(this,arguments)||t.apply(this,arguments)}:_e(Ts)(e,t)})(Xe,tt)));var Ps=Ue(Ms);const Cs=Es([ot,Ps,Is]);const Ds=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}),$s=function(){const e=Ls,t=Js,s=this,n="parser.js: Parser(): ";s.ast=void 0,s.stats=void 0,s.trace=void 0,s.callbacks=[];let r,i,o,c,a,l,u,d=0,h=0,p=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,h=0,p=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 O=x.toLowerCase();let j;for(const e in r)if(r.hasOwnProperty(e)&&O===r[e].lower){j=r[e].index;break}if(void 0===j)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:j}],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:p,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 h,p,m;const f=o[t],g=i[f.index];y.UdtIndex=g.index,d||(m=s.ast&&s.ast.udtDefined(f.index),m&&(p=r.length+f.index,h=s.ast.getLength(),s.ast.down(p,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(h):s.ast.up(p,g.name,a,y.phraseLength))},b=(t,i)=>{const l=`${n}opExecute(): `,v=o[t];switch(m+=1,h>p&&(p=h),h+=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,h;const p=o[t],m=r[p.index],f=a[m.index];if(d||(l=s.ast&&s.ast.ruleDefined(p.index),l&&(i=s.ast.getLength(),s.ast.down(p.index,r[p.index].name))),f){const t=c.length-n;f(y,c,n,u),g(m,y,t,!0),y.state===e.ACTIVE&&(h=o,o=m.opcodes,b(0,n),o=h,f(y,c,n,u),g(m,y,t,!1))}else h=o,o=m.opcodes,b(0,n,y),o=h;d||l&&(y.state===e.NOMATCH?s.ast.setLength(i):s.ast.up(p.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),h-=1}},Js={stringToChars:e=>[...e].map(e=>e.codePointAt(0)),charsToString:(e,t,s)=>{let n=e;for(;!(void 0===t||t<0);){if(void 0===s){n=e.slice(t);break}if(s<=0)return"";n=e.slice(t,t+s);break}return String.fromCodePoint(...n)}},Ls={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 Ls.ALT:return"ALT";case Ls.CAT:return"CAT";case Ls.REP:return"REP";case Ls.RNM:return"RNM";case Ls.TRG:return"TRG";case Ls.TBS:return"TBS";case Ls.TLS:return"TLS";case Ls.UDT:return"UDT";case Ls.AND:return"AND";case Ls.NOT:return"NOT";case Ls.ACTIVE:return"ACTIVE";case Ls.EMPTY:return"EMPTY";case Ls.MATCH:return"MATCH";case Ls.NOMATCH:return"NOMATCH";case Ls.SEM_PRE:return"SEM_PRE";case Ls.SEM_POST:return"SEM_POST";case Ls.SEM_OK:return"SEM_OK";default:return"UNRECOGNIZED STATE"}}};function Bs(){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 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 Rs=qs;new Bs;new Bs,new $s,new Bs,new $s,new Bs,new $s,new Bs,new $s;const _s=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 Vs=class extends Rs{},Hs=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 _s(String(e))}).join("/")}`}catch(t){throw new Vs("Unexpected error during JSON Pointer compilation",{cause:t,referenceTokens:e})}};class Us extends Error{constructor(e,t=void 0){if(super(e,t),this.name=this.constructor.name,"string"==typeof e&&(this.message=e),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack,null!=t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"cause")&&!("cause"in this)){const{cause:e}=t;this.cause=e,e instanceof Error&&"stack"in e&&(this.stack=`${this.stack}\nCAUSE: ${e.stack}`)}if(null!=t&&"object"==typeof t){const{cause:e,...s}=t;Object.assign(this,s)}}}const Gs=Us;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 zs=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 Xs=class extends Gs{},Ws=e=>{if(!Array.isArray(e))throw new Xs("Selectors must be an array, got: "+typeof e,{selectors:e});try{return`$${e.map(e=>{if("string"==typeof e)return`['${zs(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 Xs("Failed to compile normalized JSONPath",{cause:t,selectors:e})}};class Ys{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?Ws(t):Hs(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 Ks=Le(1,Ve(Ms,ne(Fe,he("[object Promise]")))),Zs=e=>{const t=e?.element;return void 0===t||"element"===t?"Element":`${t.charAt(0).toUpperCase()}${t.slice(1)}Element`},Qs=e=>$t(e),en=e=>os(e),tn=(e,t,s)=>{Vt(e)?e.value=s:Array.isArray(e)?e[t]=null===s?void 0:s:null===s?delete e[t]:e[t]=s},sn=e=>Vt(e)?["key","value"]:Rt(e)||_t(e)?["content"]:[],nn=(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]}},rn=(e,t,s)=>{if(void 0===t)return null;const n=e,r=s?"leave":"enter",i=nn(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=nn(o,t);if("function"==typeof e)return e}return null},on=(e,t={})=>{const{visitFnGetter:s=rn,nodeTypeGetter:n=Zs,exposeEdits:r=!1}=t,i=Symbol("internal-skip"),o=Symbol("break"),c=new Array(e.length).fill(i);return{enter(t){let a=t.node,l=!1;for(let u=0;u<e.length;u+=1)if(c[u]===i){const i=s(e[u],n(a),!1);if("function"==typeof i){const s=an(t,a),n=i.call(e[u],s);if(Ks(n))throw new Kt("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=an(t,r),n=i.call(e[a],s);if(Ks(n))throw new Kt("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)}}},cn=(e,t={})=>{const{visitFnGetter:s=rn,nodeTypeGetter:n=Zs,exposeEdits:r=!1}=t,i=Symbol("internal-skip"),o=Symbol("break"),c=new Array(e.length).fill(i);return{async enter(t){let a=t.node,l=!1;for(let u=0;u<e.length;u+=1)if(c[u]===i){const i=s(e[u],n(a),!1);if("function"==typeof i){const s=an(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=an(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 an(e,t){return new Ys(t,e.parent,e.parentPath,e.key,e.inList)}function*ln(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 h,p,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=p,p=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!==h){y=h.index,f=h.keys,g=h.edits;const e=h.inArray;if(v=h.parentPath,h=h.prev,w&&!l){const t=e?y:f[y];g.push([t,x])}m=e}}else if(void 0!==p&&(s=m?y:f[y],x=p[s],void 0===x))continue;if(!Array.isArray(x)){if(!o(x))throw new Kt(`Invalid AST Node: ${String(x)}`,{node:x});if(a&&S.includes(x))continue;b=new Ys(x,p,v,s,m);const n=rn(t,i(x),e);if(n){for(const[e,s]of Object.entries(r))t[e]=s;const i=yield{visitFn:n,path:b,isLeaving:e};if(b.shouldStop)break;if(b.shouldSkip&&!e)continue;if(b.removed){if(g.push([s,null]),!e)continue}else if(b._wasReplaced()){const t=b._getReplacementNode();if(g.push([s,t]),!e){if(!o(t))continue;x=t}}else if(void 0!==i&&(g.push([s,i]),!e)){if(!o(i))continue;x=i}b._markStale()}}if(!e){if(h={inArray:m,index:y,keys:f,edits:g,parentPath:v,prev:h},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!==p&&S.push(p),p=x,v=b}}while(void 0!==h);return 0!==g.length?g.at(-1)[1]:e}on[Symbol.for("nodejs.util.promisify.custom")]=cn;const un=(e,t,s={})=>{const n=ln(e,t,{keyMap:s.keyMap??sn,state:s.state??{},nodeTypeGetter:s.nodeTypeGetter??Zs,nodePredicate:s.nodePredicate??Qs,nodeCloneFn:s.nodeCloneFn??en,detectCycles:s.detectCycles??!0,mutable:s.mutable??!1,mutationFn:s.mutationFn??tn});let r=n.next();for(;!r.done;){const e=r.value,s=e.visitFn.call(t,e.path);if(Ks(s))throw new Kt("Async visitor not supported in sync mode",{visitor:t,visitFn:e.visitFn});r=n.next(s)}return r.value},dn=async(e,t,s={})=>{const n=ln(e,t,{keyMap:s.keyMap??sn,state:s.state??{},nodeTypeGetter:s.nodeTypeGetter??Zs,nodePredicate:s.nodePredicate??Qs,nodeCloneFn:s.nodeCloneFn??en,detectCycles:s.detectCycles??!0,mutable:s.mutable??!1,mutationFn:s.mutationFn??tn});let r=n.next();for(;!r.done;){const e=r.value,s=await e.visitFn.call(t,e.path);r=n.next(s)}return r.value};un[Symbol.for("nodejs.util.promisify.custom")]=dn,Ys.prototype.traverse=function(e,t){return un(this.node,e,t)},Ys.prototype.traverseAsync=function(e,t){return dn(this.node,e,t)};const hn=class extends vs{specObj;passingOptionsNames=["specObj","parent"];constructor({specObj:e,...t}){super({...t}),this.specObj=e}retrievePassingOptions(){return Ds(this.passingOptionsNames,this)}retrieveFixedFields(e){const t=B(["visitors",...e,"fixedFields"],this.specObj);return"object"==typeof t&&null!==t?Object.keys(t):[]}retrieveVisitor(e){return Ne(tt,["visitors",...e],this.specObj)?B(["visitors",...e],this.specObj):B(["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 Ss&&n?.constructor===Ss?ns(t):(un(t,n,s),n.element)}};const pn=class extends hn{specPath;ignoredFields;constructor({specPath:e,ignoredFields:t,...s}){super({...s}),this.specPath=e,this.ignoredFields=t||[]}ObjectElement(e){const t=e.node,s=this.specPath(t),n=this.retrieveFixedFields(s);t.forEach((e,t,r)=>{const i=ms(t);if(Jt(t)&&n.includes(i)&&!this.ignoredFields.includes(i)){const n=this.toRefractedElement([...s,"fixedFields",i],e),o=new kt(ns(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(ns(r))}),this.copyMetaAndAttributes(t,this.element),e.stop()}},mn=(e,t,s=[])=>{const n=Object.getOwnPropertyDescriptors(t);for(let e of s)delete n[e];Object.defineProperties(e,n)},fn=(e,t=[e])=>{const s=Object.getPrototypeOf(e);return null===s?t:fn(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=>fn(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=fn(r);for(let t of e){let e=fn(t);for(let t=e.length-1;t>=0;t--){let n=e[t];-1===o.indexOf(n)&&(mn(i,n,["constructor",...s]),o.push(n))}}return i.constructor=t,i},gn=e=>e.filter((t,s)=>e.indexOf(t)==s),xn=(e,t)=>{const s=t.map(e=>fn(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++}},bn=(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(xn(s,e)||{},s),defineProperty(){throw new Error("Cannot define new properties on Proxies created by ts-mixer")},has:(s,n)=>void 0!==xn(n,e)||void 0!==t[n],get:(s,n)=>(xn(n,e)||t)[n],set(t,s,n){const r=xn(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)))}),vn=null,Sn="copy",wn="copy",On="deep",jn=new WeakMap,kn=e=>jn.get(e),En=(e,t)=>{var s,n;const r=gn([...Object.getOwnPropertyNames(e),...Object.getOwnPropertyNames(t)]),i={};for(let o of r)i[o]=gn([...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},An=(e,t)=>{var s,n,r,i;return{property:En(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:En(null!==(r=null==e?void 0:e.method)&&void 0!==r?r:{},null!==(i=null==t?void 0:t.method)&&void 0!==i?i:{})}},Fn=(e,t)=>{var s,n,r,i,o,c;return{class:gn([...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:An(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:An(null!==(o=null==e?void 0:e.instance)&&void 0!==o?o:{},null!==(c=null==t?void 0:t.instance)&&void 0!==c?c:{})}},Nn=new Map,In=(...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=[...fn(e.prototype).map(e=>e.constructor),...null!==(t=kn(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=>Nn.get(e)).filter(e=>!!e);return 0==t.length?{}:1==t.length?t[0]:t.reduce((e,t)=>Fn(e,t))},Tn=e=>{let t=Nn.get(e);return t||(t={},Nn.set(e,t)),t};function Mn(...e){var t,s,n;const r=e.map(e=>e.prototype),i=vn;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)mn(this,new s(...t));null!==i&&"function"==typeof this[i]&&this[i].apply(this,t)}var c,a;o.prototype="copy"===wn?yn(r,o):(c=r,a=o,bn([...c,{constructor:a}])),Object.setPrototypeOf(o,"copy"===Sn?yn(e,null,["prototype"]):bn(e,Function.prototype));let l=o;if("none"!==On){const r="deep"===On?In(...e):((...e)=>{const t=e.map(e=>Tn(e));return 0===t.length?{}:1===t.length?t[0]:t.reduce((e,t)=>Fn(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)}Pn(null!==(s=null==r?void 0:r.static)&&void 0!==s?s:{},l),Pn(null!==(n=null==r?void 0:r.instance)&&void 0!==n?n:{},l.prototype)}var u,d;return u=l,d=e,jn.set(u,d),l}const Pn=(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 Cn=function(){return!1};const Dn=class extends hn{specPath;ignoredFields;fieldPatternPredicate=Cn;constructor({specPath:e,ignoredFields:t,fieldPatternPredicate:s,...n}){super({...n}),this.specPath=e,this.ignoredFields=t||[],"function"==typeof s&&(this.fieldPatternPredicate=s)}ObjectElement(e){const t=e.node;t.forEach((e,t,s)=>{const n=ms(t);if(!this.ignoredFields.includes(n)&&this.fieldPatternPredicate(n)){const n=this.specPath(e),r=this.toRefractedElement(n,e),i=new kt(ns(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(ns(s))}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const $n=class extends Dn{constructor(e){super(e),this.fieldPatternPredicate=Cs}};const Jn=class{parent;constructor({parent:e}){this.parent=e}},Ln=Mn(pn,Jn,Ss),Bn=Mn(pn,Ss),qn=Mn(pn,Ss),Rn=Mn(pn,Ss),_n=Mn(hn,Jn,Ss),Vn=Mn(hn,Jn,Ss),Hn=Mn(hn,Jn,Ss),Un=Mn(hn,Jn,Ss),Gn=Mn(hn,Jn,Ss),zn=Mn($n,Jn,Ss),Xn=Mn($n,Jn,Ss),Wn=Mn($n,Jn,Ss),Yn=Mn($n,Jn,Ss);const Kn=class extends Ln{constructor(e){super(e),this.element=new At,this.specPath=ws(["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,pn.prototype.ObjectElement.call(this,e)}handleDialectIdentifier(e){if(ks(this.parent)&&!Jt(e.get("$schema")))this.element.meta.set("inheritedDialectIdentifier",this.defaultDialectIdentifier);else if(this.parent instanceof At&&!Jt(e.get("$schema"))){const e=Os(ms(this.parent.meta.get("inheritedDialectIdentifier")),ms(this.parent.$schema));this.element.meta.set("inheritedDialectIdentifier",e)}}handleSchemaIdentifier(e,t="id"){const s=void 0!==this.parent?ns(this.parent.meta.get("ancestorsSchemaIdentifiers")??new Dt):new Dt,n=ms(e.get(t));Cs(n)&&s.push(n),this.element.meta.set("ancestorsSchemaIdentifiers",s)}},Zn=e=>_t(e)&&e.hasKey("$ref");const Qn=class extends Un{ObjectElement(e){const t=e.node,s=Zn(t)?["document","objects","JSONReference"]:["document","objects","JSONSchema"];this.element=this.toRefractedElement(s,t),e.stop()}ArrayElement(e){const t=e.node;this.element=new Dt,this.element.classes.push("json-schema-items"),t.forEach(e=>{const t=Zn(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const er=class extends Ss{ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-required")}};const tr=class extends Yn{constructor(e){super(e),this.element=new Et,this.element.classes.push("json-schema-properties"),this.specPath=e=>Zn(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const sr=class extends Wn{constructor(e){super(e),this.element=new Et,this.element.classes.push("json-schema-patternProperties"),this.specPath=e=>Zn(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const nr=class extends Xn{constructor(e){super(e),this.element=new Et,this.element.classes.push("json-schema-dependencies"),this.specPath=e=>Zn(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const rr=class extends Ss{ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-enum")}};const ir=class extends Ss{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 or=class extends _n{constructor(e){super(e),this.element=new Dt,this.element.classes.push("json-schema-allOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=Zn(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const cr=class extends Vn{constructor(e){super(e),this.element=new Dt,this.element.classes.push("json-schema-anyOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=Zn(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 Hn{constructor(e){super(e),this.element=new Dt,this.element.classes.push("json-schema-oneOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=Zn(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const lr=class extends zn{constructor(e){super(e),this.element=new Et,this.element.classes.push("json-schema-definitions"),this.specPath=e=>Zn(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const ur=class extends Gn{constructor(e){super(e),this.element=new Dt,this.element.classes.push("json-schema-links")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","LinkDescription"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const dr=class extends Bn{constructor(e){super(e),this.element=new Ft,this.specPath=ws(["document","objects","JSONReference"])}ObjectElement(e){pn.prototype.ObjectElement.call(this,e),Jt(this.element.$ref)&&this.element.classes.push("reference-element")}};const hr=class extends Ss{StringElement(e){super.enter(e),this.element.classes.push("reference-value")}};const pr=function(){return!0};const mr=P(function(e,t,s){return Le(Math.max(e.length,t.length,s.length),function(){return e.apply(this,arguments)?t.apply(this,arguments):s.apply(this,arguments)})});const fr=r(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 gr=yr;const xr=r(function(e){return i(0,e)});function br(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}const vr=r(br);const Sr=Ue(F);const wr=Le(1,tt(Array.isArray)?Array.isArray:ne(re,ce("Array")));const Or=Ve(wr,Is);function jr(e){return function(e){if(Array.isArray(e))return kr(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 kr(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)?kr(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 kr(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 Er=ne(gr(fr(function(e,t){return e.length>t.length})),xr,$("length")),Ar=ct(function(e,t,s){var n=s.apply(void 0,jr(e));return Sr(n)?vr(n):t});const Fr=mr(Or,function(e){var t=Er(e);return Le(t,function(){for(var t=arguments.length,s=new Array(t),n=0;n<t;n++)s[n]=arguments[n];return Q(Ar(s),void 0,e)})},js);const Nr=class extends hn{alternator;constructor({alternator:e,...t}){super({...t}),this.alternator=e}enter(e){const t=e.node,s=this.alternator.map(({predicate:e,specPath:t})=>mr(e,ws(t),js)),n=Fr(s)(t);this.element=this.toRefractedElement(n,t),e.stop()}};const Ir=class extends Nr{constructor(e){super(e),this.alternator=[{predicate:Zn,specPath:["document","objects","JSONReference"]},{predicate:pr,specPath:["document","objects","JSONSchema"]}]}};const Tr=class extends Rn{constructor(e){super(e),this.element=new Nt,this.specPath=ws(["document","objects","Media"])}};const Mr=class extends qn{constructor(e){super(e),this.element=new It,this.specPath=ws(["document","objects","LinkDescription"])}},Pr={visitors:{value:Ss,JSONSchemaOrJSONReferenceVisitor:Ir,document:{objects:{JSONSchema:{element:"jSONSchemaDraft4",$visitor:Kn,fixedFields:{id:{$visitor:Ss,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:Ir,items:{$visitor:Qn,alias:"itemsField"},maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:er,properties:tr,additionalProperties:Ir,patternProperties:sr,dependencies:nr,enum:rr,type:ir,allOf:or,anyOf:cr,oneOf:ar,not:Ir,definitions:lr,title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},format:{$ref:"#/visitors/value"},base:{$ref:"#/visitors/value"},links:{$visitor:ur,alias:"linksField"},media:{$ref:"#/visitors/document/objects/Media"},readOnly:{$ref:"#/visitors/value"}}},JSONReference:{element:"jSONReference",$visitor:dr,fixedFields:{$ref:hr}},Media:{element:"media",$visitor:Tr,fixedFields:{binaryEncoding:{$ref:"#/visitors/value"},type:{$ref:"#/visitors/value"}}},LinkDescription:{element:"linkDescription",$visitor:Mr,fixedFields:{href:{$ref:"#/visitors/value"},rel:{$ref:"#/visitors/value"},title:{$ref:"#/visitors/value"},targetSchema:Ir,mediaType:{$ref:"#/visitors/value"},method:{$ref:"#/visitors/value"},encType:{$ref:"#/visitors/value"},schema:Ir}}}}}},Cr=gt(Pr),Dr=e=>Object.entries(e).map(([e,t])=>it(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(At,"fixedFields",{get:()=>Dr(Cr.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(Ft,"fixedFields",{get:()=>Dr(Cr.visitors.document.objects.JSONReference.fixedFields),enumerable:!0}),Object.defineProperty(Nt,"fixedFields",{get:()=>Dr(Cr.visitors.document.objects.Media.fixedFields),enumerable:!0}),Object.defineProperty(It,"fixedFields",{get:()=>Dr(Cr.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const $r=class extends At{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 Jr=class extends It{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 Lr=P(function e(t,s,n){if(0===t.length)return s;var r=t[0];if(t.length>1){var i=D(r,n);(F(i)||"object"!=typeof i)&&(i=C(t[1])?[]:{}),s=e(Array.prototype.slice.call(t,1),s,i)}return function(e,t,s){if(C(e)&&_(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 Br=Lr;const qr=P(function(e,t,s){var n=Array.prototype.slice.call(s,0);return n.splice(e,t),n});var Rr=P(function(e,t,s){return Br([e],t,s)});const _r=Rr;var Vr=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(C(e)&&_(t))return qr(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(C(e)&&_(t))return[].concat(t);var s={};for(var n in t)s[n]=t[n];return s}(n,s):_r(n,e(r,s[n]),s)}});const Hr=Vr;const Ur=class extends Kn{constructor(e){super(e),this.element=new $r}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 Gr=class extends Qn{BooleanElement(e){this.element=this.toRefractedElement(["document","objects","JSONSchema"],e.node),e.stop()}};const zr=class extends Ss{ArrayElement(e){this.enter(e),this.element.classes.push("json-schema-examples")}};const Xr=class extends Mr{constructor(e){super(e),this.element=new Jr}},Wr=ne(Br(["visitors","document","objects","JSONSchema","element"],"jSONSchemaDraft6"),Br(["visitors","document","objects","JSONSchema","$visitor"],Ur),Hr(["visitors","document","objects","JSONSchema","fixedFields","id"]),Br(["visitors","document","objects","JSONSchema","fixedFields","$id"],{$ref:"#/visitors/value"}),Br(["visitors","document","objects","JSONSchema","fixedFields","contains"],{$visitor:Pr.visitors.JSONSchemaOrJSONReferenceVisitor,alias:"containsField"}),Br(["visitors","document","objects","JSONSchema","fixedFields","items"],{$visitor:Gr,alias:"itemsField"}),Br(["visitors","document","objects","JSONSchema","fixedFields","propertyNames"],Pr.visitors.JSONSchemaOrJSONReferenceVisitor),Br(["visitors","document","objects","JSONSchema","fixedFields","const"],{$ref:"#/visitors/value"}),Br(["visitors","document","objects","JSONSchema","fixedFields","examples"],zr),Br(["visitors","document","objects","LinkDescription","$visitor"],Xr),Br(["visitors","document","objects","LinkDescription","fixedFields","hrefSchema"],Pr.visitors.JSONSchemaOrJSONReferenceVisitor),Hr(["visitors","document","objects","LinkDescription","fixedFields","schema"]),Br(["visitors","document","objects","LinkDescription","fixedFields","submissionSchema"],Pr.visitors.JSONSchemaOrJSONReferenceVisitor),Hr(["visitors","document","objects","LinkDescription","fixedFields","method"]),Hr(["visitors","document","objects","LinkDescription","fixedFields","encType"]),Br(["visitors","document","objects","LinkDescription","fixedFields","submissionEncType"],{$ref:"#/visitors/value"}))(Pr),Yr=gt(Wr),Kr=e=>Object.entries(e).map(([e,t])=>it(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty($r,"fixedFields",{get:()=>Kr(Yr.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(Jr,"fixedFields",{get:()=>Kr(Yr.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const Zr=class extends $r{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 Qr=class extends Jr{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 ei=class extends Ur{constructor(e){super(e),this.element=new Zr}get defaultDialectIdentifier(){return"http://json-schema.org/draft-07/schema#"}};const ti=class extends Xr{constructor(e){super(e),this.element=new Qr}},si=ne(Br(["visitors","document","objects","JSONSchema","element"],"jSONSchemaDraft7"),Br(["visitors","document","objects","JSONSchema","$visitor"],ei),Br(["visitors","document","objects","JSONSchema","fixedFields","$comment"],Wr.visitors.value),Br(["visitors","document","objects","JSONSchema","fixedFields","if"],Wr.visitors.JSONSchemaOrJSONReferenceVisitor),Br(["visitors","document","objects","JSONSchema","fixedFields","then"],Wr.visitors.JSONSchemaOrJSONReferenceVisitor),Br(["visitors","document","objects","JSONSchema","fixedFields","else"],Wr.visitors.JSONSchemaOrJSONReferenceVisitor),Hr(["visitors","document","objects","JSONSchema","fixedFields","media"]),Br(["visitors","document","objects","JSONSchema","fixedFields","contentEncoding"],Wr.visitors.value),Br(["visitors","document","objects","JSONSchema","fixedFields","contentMediaType"],Wr.visitors.value),Br(["visitors","document","objects","JSONSchema","fixedFields","writeOnly"],Wr.visitors.value),Br(["visitors","document","objects","LinkDescription","$visitor"],ti),Br(["visitors","document","objects","LinkDescription","fixedFields","anchor"],Wr.visitors.value),Br(["visitors","document","objects","LinkDescription","fixedFields","anchorPointer"],Wr.visitors.value),Hr(["visitors","document","objects","LinkDescription","fixedFields","mediaType"]),Br(["visitors","document","objects","LinkDescription","fixedFields","targetMediaType"],Wr.visitors.value),Br(["visitors","document","objects","LinkDescription","fixedFields","targetHints"],Wr.visitors.value),Br(["visitors","document","objects","LinkDescription","fixedFields","description"],Wr.visitors.value),Br(["visitors","document","objects","LinkDescription","fixedFields","$comment"],Wr.visitors.value),Br(["visitors","document","objects","LinkDescription","fixedFields","headerSchema"],Wr.visitors.JSONSchemaOrJSONReferenceVisitor),Hr(["visitors","document","objects","LinkDescription","fixedFields","submissionEncType"]),Br(["visitors","document","objects","LinkDescription","fixedFields","submissionMediaType"],Wr.visitors.value))(Wr),ni=gt(si),ri=e=>Object.entries(e).map(([e,t])=>it(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(Zr,"fixedFields",{get:()=>ri(ni.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(Qr,"fixedFields",{get:()=>ri(ni.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const ii=class extends Zr{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 oi=class extends Qr{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 ci=class extends ei{constructor(e){super(e),this.element=new ii}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,pn.prototype.ObjectElement.call(this,e),Jt(this.element.$ref)&&(this.element.classes.push("reference-element"),this.element.meta.set("referenced-element","schema"))}};const ai=class extends Ss{ObjectElement(e){this.enter(e),this.element.classes.push("json-schema-$vocabulary")}};const li=class extends Ss{StringElement(e){this.enter(e),this.element.classes.push("reference-value")}},ui=Mn(hn,Jn,Ss),di=Mn($n,Jn,Ss);const hi=class extends di{constructor(e){super(e),this.element=new Et,this.element.classes.push("json-schema-$defs"),this.specPath=ws(["document","objects","JSONSchema"])}};const pi=class extends ui{constructor(e){super(e),this.element=new Dt,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 mi=class extends ui{constructor(e){super(e),this.element=new Dt,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 fi=class extends ui{constructor(e){super(e),this.element=new Dt,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 di{constructor(e){super(e),this.element=new Et,this.element.classes.push("json-schema-dependentSchemas"),this.specPath=ws(["document","objects","JSONSchema"])}};const gi=class extends ui{ObjectElement(e){this.element=this.toRefractedElement(["document","objects","JSONSchema"],e.node),e.stop()}ArrayElement(e){const t=e.node;this.element=new Dt,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 xi=class extends di{constructor(e){super(e),this.element=new Et,this.element.classes.push("json-schema-properties"),this.specPath=ws(["document","objects","JSONSchema"])}};const bi=class extends di{constructor(e){super(e),this.element=new Et,this.element.classes.push("json-schema-patternProperties"),this.specPath=ws(["document","objects","JSONSchema"])}};const vi=class extends Ss{ObjectElement(e){this.enter(e),this.element.classes.push("json-schema-dependentRequired")}};const Si=class extends ti{constructor(e){super(e),this.element=new oi}},wi=ne(Br(["visitors","document","objects","JSONSchema","element"],"jSONSchema201909"),Br(["visitors","document","objects","JSONSchema","$visitor"],ci),Br(["visitors","document","objects","JSONSchema","fixedFields","$vocabulary"],ai),Br(["visitors","document","objects","JSONSchema","fixedFields","$anchor"],si.visitors.value),Br(["visitors","document","objects","JSONSchema","fixedFields","$recursiveAnchor"],si.visitors.value),Br(["visitors","document","objects","JSONSchema","fixedFields","$recursiveRef"],si.visitors.value),Hr(["visitors","document","objects","JSONReference","$visitor"]),Br(["visitors","document","objects","JSONSchema","fixedFields","$ref"],li),Hr(["visitors","document","objects","JSONSchema","fixedFields","definitions"]),Br(["visitors","document","objects","JSONSchema","fixedFields","$defs"],hi),Br(["visitors","document","objects","JSONSchema","fixedFields","allOf"],pi),Br(["visitors","document","objects","JSONSchema","fixedFields","anyOf"],mi),Br(["visitors","document","objects","JSONSchema","fixedFields","oneOf"],fi),Br(["visitors","document","objects","JSONSchema","fixedFields","not"],ci),Br(["visitors","document","objects","JSONSchema","fixedFields","if"],ci),Br(["visitors","document","objects","JSONSchema","fixedFields","then"],ci),Br(["visitors","document","objects","JSONSchema","fixedFields","else"],ci),Hr(["visitors","document","objects","JSONSchema","fixedFields","dependencies"]),Br(["visitors","document","objects","JSONSchema","fixedFields","dependentSchemas"],yi),Br(["visitors","document","objects","JSONSchema","fixedFields","items"],{$visitor:gi,alias:"itemsField"}),Br(["visitors","document","objects","JSONSchema","fixedFields","contains"],ci),Br(["visitors","document","objects","JSONSchema","fixedFields","properties"],xi),Br(["visitors","document","objects","JSONSchema","fixedFields","patternProperties"],bi),Br(["visitors","document","objects","JSONSchema","fixedFields","additionalProperties"],ci),Br(["visitors","document","objects","JSONSchema","fixedFields","additionalItems"],ci),Br(["visitors","document","objects","JSONSchema","fixedFields","propertyNames"],ci),Br(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedItems"],ci),Br(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedProperties"],ci),Br(["visitors","document","objects","JSONSchema","fixedFields","maxContains"],si.visitors.value),Br(["visitors","document","objects","JSONSchema","fixedFields","minContains"],si.visitors.value),Br(["visitors","document","objects","JSONSchema","fixedFields","dependentRequired"],vi),Br(["visitors","document","objects","JSONSchema","fixedFields","deprecated"],si.visitors.value),Br(["visitors","document","objects","JSONSchema","fixedFields","contentSchema"],ci),Br(["visitors","document","objects","LinkDescription","element"],"linkDescription"),Br(["visitors","document","objects","LinkDescription","$visitor"],Si),Br(["visitors","document","objects","LinkDescription","fixedFields","targetSchema"],ci),Br(["visitors","document","objects","LinkDescription","fixedFields","hrefSchema"],ci),Br(["visitors","document","objects","LinkDescription","fixedFields","headerSchema"],ci),Br(["visitors","document","objects","LinkDescription","fixedFields","submissionSchema"],ci))(si),Oi=gt(wi),ji=e=>Object.entries(e).map(([e,t])=>it(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(ii,"fixedFields",{get:()=>ji(Oi.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(oi,"fixedFields",{get:()=>ji(Oi.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const ki=class extends ii{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 Ei=class extends oi{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)}},Ai={namespace:e=>{const{base:t}=e;return t.register("jSONSchema202012",ki),t.register("linkDescription",Ei),t}},Fi={JSONSchema202012Element:{prefixItems(...e){const t=new Dt(...e);return t.classes.push("json-schema-prefixItems"),t},items:(...e)=>new ki(...e),contains:(...e)=>new ki(...e),required(...e){const t=new Dt(...e);return t.classes.push("json-schema-required"),t},properties(...e){const t=new Et(...e);return t.classes.push("json-schema-properties"),t},additionalProperties:(...e)=>new ki(...e),patternProperties(...e){const t=new Et(...e);return t.classes.push("json-schema-patternProperties"),t},dependentSchemas(...e){const t=new Et(...e);return t.classes.push("json-schema-dependentSchemas"),t},propertyNames:(...e)=>new ki(...e),enum(...e){const t=new Dt(...e);return t.classes.push("json-schema-enum"),t},allOf(...e){const t=new Dt(...e);return t.classes.push("json-schema-allOf"),t},anyOf(...e){const t=new Dt(...e);return t.classes.push("json-schema-anyOf"),t},oneOf(...e){const t=new Dt(...e);return t.classes.push("json-schema-oneOf"),t},if:(...e)=>new ki(...e),then:(...e)=>new ki(...e),else:(...e)=>new ki(...e),not:(...e)=>new ki(...e),$defs(...e){const t=new Et(...e);return t.classes.push("json-schema-$defs"),t},examples(...e){const t=new Dt(...e);return t.classes.push("json-schema-examples"),t},links(...e){const t=new Dt(...e);return t.classes.push("json-schema-links"),t},$vocabulary(...e){const t=new Et(...e);return t.classes.push("json-schema-$vocabulary"),t},unevaluatedItems:(...e)=>new ki(...e),unevaluatedProperties:(...e)=>new ki(...e),$dependentRequired(...e){const t=new Et(...e);return t.classes.push("json-schema-$dependentRequired"),t},contentSchema:(...e)=>new ki(...e),type(...e){const t=new Dt(...e);return t.classes.push("json-schema-type"),t}},LinkDescriptionElement:{hrefSchema:(...e)=>new ki(...e),targetSchema:(...e)=>new ki(...e),submissionSchema:(...e)=>new ki(...e),templatePointers:(...e)=>new Et(...e),templateRequired:(...e)=>new Dt(...e),targetHints:(...e)=>new Et(...e),headerSchema:(...e)=>new ki(...e)},"json-schema-prefixItems":{"<*>":function(...e){return new ki(...e)}},"json-schema-properties":{"[key: *]":function(...e){return new ki(...e)}},"json-schema-patternProperties":{"[key: *]":function(...e){return new ki(...e)}},"json-schema-dependentSchemas":{"[key: *]":function(...e){return new ki(...e)}},"json-schema-allOf":{"<*>":function(...e){return new ki(...e)}},"json-schema-anyOf":{"<*>":function(...e){return new ki(...e)}},"json-schema-oneOf":{"<*>":function(...e){return new ki(...e)}},"json-schema-$defs":{"[key: *]":function(...e){return new ki(...e)}},"json-schema-links":{"<*>":function(...e){return new Ei(...e)}}},Ni=(e,t)=>{const s=Zs(e),n=Fi[s]||Fi[ms(e.classes.first)];return void 0===n?void 0:Object.hasOwn(n,"[key: *]")?n["[key: *]"]:n[t]},Ii=()=>()=>({visitor:{StringElement(e){const t=e.node;if(!(e=>Jt(e)&&Ut(e,["yaml-e-node","yaml-e-scalar"]))(t))return;const s=e.getAncestorNodes().reverse().filter($t),n=s.at(-1);let r,i;if(Rt(n)?(i=t,r=Ni(n,"<*>")):Vt(n)&&(i=s.at(-2),r=Ni(i,ms(n.key))),"function"!=typeof r)return;const o=r.call({context:i},void 0,ns(t.meta),ns(t.attributes));Yt.transfer(t,o),e.replaceWith(o)}}});const Ti=P(function(e,t,s){var n,r={};for(n in s=s||{},t=t||{})x(n,t)&&(r[n]=x(n,s)?e(n,t[n],s[n]):t[n]);for(n in s)x(n,s)&&!x(n,r)&&(r[n]=s[n]);return r});const Mi=P(function e(t,s,n){return Ti(function(s,n,r){return be(n)&&be(r)?e(t,n,r):t(s,n,r)},s,n)});const Pi=g(function(e,t){return Mi(function(e,t,s){return s},e,t)});const Ci=P(function(e,t,s){return Os(e,$(t,s))});const Di=te(0,-1);const $i=g(function(e,t){return e.apply(this,t)});const Ji=Ue(tt);const Li=Ve(wr,Ns);const Bi=Le(3,function(e,t,s){var n=B(e,s),r=B(Di(e),s);if(!Ji(n)&&!Li(e)){var i=X(n,r);return $i(i,t)}});const qi=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 Yt)){const s=Yt.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]))})}},Ri=e=>null===e,_i=e=>"string"==typeof e,Vi=e=>"number"==typeof e,Hi=e=>"boolean"==typeof e,Ui=e=>null!==e&&"object"==typeof e;class Gi{elementMap={};elementDetection=[];Element;KeyValuePair;_elements;_attributeElementKeys=[];_attributeElementArrayKeys=[];constructor(e){this.Element=wt,this.KeyValuePair=xt,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",Pt).register("string",Tt).register("number",Mt).register("boolean",Ct).register("array",Dt).register("object",Et).register("member",kt).register("ref",as).register("link",cs).register("sourceMap",Yt),this.detect(Ri,Pt,!1).detect(_i,Tt,!1).detect(Vi,Mt,!1).detect(Hi,Ct,!1).detect(Array.isArray,Dt,!1).detect(Ui,Et,!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 qi(this)}}qi.prototype.Namespace=Gi;const zi=Gi,Xi=new zi,Wi={isElement:$t,isStringElement:Jt,isNumberElement:Lt,isNullElement:Bt,isBooleanElement:qt,isArrayElement:Rt,isObjectElement:_t,isMemberElement:Vt,isPrimitiveElement:e=>_t(e)&&"object"===e.element||Rt(e)&&"array"===e.element||qt(e)&&"boolean"===e.element||Lt(e)&&"number"===e.element||Jt(e)&&"string"===e.element||Bt(e)&&"null"===e.element||Vt(e)&&"member"===e.element,isLinkElement:hs,isRefElement:ps,isAnnotationElement:e=>e instanceof ls,isCommentElement:e=>e instanceof us,isParseResultElement:e=>e instanceof ds,isSourceMapElement:e=>e instanceof Yt,hasElementSourceMap:Ht,includesSymbols:(e,t)=>{if(0===t.length)return!0;if(!e.hasAttributesProperty("symbols"))return!1;const s=e.attributes.get("symbols");return!!Rt(s)&&t.every(e=>s.includes(e))},includesClasses:Ut},Yi={toolboxCreator:()=>({predicates:Wi,namespace:Xi}),visitorOptions:{exposeEdits:!0}},Ki=(e,t,s={})=>{if(0===t.length)return e;const n=Pi(Yi,s),{toolboxCreator:r,visitorOptions:i}=n,o=r(),c=t.map(e=>e(o)),a=on(c.map(Ci({},"visitor")),i);c.forEach(Bi(["pre"],[]));const l=un(e,a);return c.forEach(Bi(["post"],[])),l};function Zi(e){return void 0===e?new Pt:Qi(e)}function Qi(e){if(e instanceof wt)return e;if("string"==typeof e)return new Tt(e);if("number"==typeof e)return new Mt(e);if("boolean"==typeof e)return new Ct(e);if(null===e)return new Pt;if(Array.isArray(e))return new Dt(e.map(Zi));if("object"==typeof e)return new Et(e);throw new Error("Cannot refract value of type "+typeof e)}Ki[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,s={})=>{if(0===t.length)return e;const n=Pi(Yi,s),{toolboxCreator:r,visitorOptions:i}=n,o=r(),c=t.map(e=>e(o)),a=cn(c.map(Ci({},"visitor")),i);await Promise.allSettled(c.map(Bi(["pre"],[])));const l=await dn(e,a);return await Promise.allSettled(c.map(Bi(["post"],[]))),l},wt.prototype.ObjectElement=Et,wt.prototype.ArrayElement=Dt,wt.prototype.RefElement=as,wt.prototype.MemberElement=kt,wt.prototype.refract=Qi;const eo=class extends ci{constructor(e){super(e),this.element=new ki}get defaultDialectIdentifier(){return"https://json-schema.org/draft/2020-12/schema"}};const to=class extends ui{constructor(e){super(e),this.element=new Dt,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 so=class extends Si{constructor(e){super(e),this.element=new Ei}},no=ne(Br(["visitors","document","objects","JSONSchema","element"],"jSONSchema202012"),Br(["visitors","document","objects","JSONSchema","$visitor"],eo),Hr(["visitors","document","objects","JSONSchema","fixedFields","$recursiveAnchor"]),Br(["visitors","document","objects","JSONSchema","fixedFields","$dynamicAnchor"],wi.visitors.value),Hr(["visitors","document","objects","JSONSchema","fixedFields","$recursiveRef"]),Br(["visitors","document","objects","JSONSchema","fixedFields","$dynamicRef"],wi.visitors.value),Br(["visitors","document","objects","JSONSchema","fixedFields","not"],eo),Br(["visitors","document","objects","JSONSchema","fixedFields","if"],eo),Br(["visitors","document","objects","JSONSchema","fixedFields","then"],eo),Br(["visitors","document","objects","JSONSchema","fixedFields","else"],eo),Br(["visitors","document","objects","JSONSchema","fixedFields","prefixItems"],to),Br(["visitors","document","objects","JSONSchema","fixedFields","items"],eo),Br(["visitors","document","objects","JSONSchema","fixedFields","contains"],eo),Br(["visitors","document","objects","JSONSchema","fixedFields","additionalProperties"],eo),Hr(["visitors","document","objects","JSONSchema","fixedFields","additionalItems"]),Br(["visitors","document","objects","JSONSchema","fixedFields","propertyNames"],eo),Br(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedItems"],eo),Br(["visitors","document","objects","JSONSchema","fixedFields","unevaluatedProperties"],eo),Br(["visitors","document","objects","JSONSchema","fixedFields","contentSchema"],eo),Br(["visitors","document","objects","LinkDescription","element"],"linkDescription"),Br(["visitors","document","objects","LinkDescription","$visitor"],so),Br(["visitors","document","objects","LinkDescription","fixedFields","targetSchema"],eo),Br(["visitors","document","objects","LinkDescription","fixedFields","hrefSchema"],eo),Br(["visitors","document","objects","LinkDescription","fixedFields","headerSchema"],eo),Br(["visitors","document","objects","LinkDescription","fixedFields","submissionSchema"],eo))(wi),ro=e=>e instanceof ki,io=e=>e instanceof Ei,oo=()=>{const e=new zi,t={...s,isStringElement:Jt};return e.use(Ai),{predicates:t,namespace:e}},co=(e,{element:t="jSONSchema202012",plugins:s=[],specificationObj:n=no}={})=>{const r=Qi(e),i=gt(n),o=i.elementMap[t];if(!o)throw new Error(`Unknown element type: "${t}"`);const c=new(B(o,i))({specObj:i});return un(r,c),Ki(c.element,s,{toolboxCreator:oo})},ao=(e,t={})=>co(e,{...t,element:"jSONSchema202012"}),lo=(e,t={})=>co(e,{...t,element:"linkDescription"}),uo=co;return t})());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@speclynx/apidom-ns-json-schema-2020-12",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "JSON Schema 2020-12 namespace for ApiDOM.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"license": "Apache-2.0",
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@babel/runtime-corejs3": "^7.28.4",
|
|
46
|
-
"@speclynx/apidom-core": "^2.0
|
|
47
|
-
"@speclynx/apidom-datamodel": "^2.0
|
|
48
|
-
"@speclynx/apidom-error": "^2.0
|
|
49
|
-
"@speclynx/apidom-ns-json-schema-2019-09": "^2.0
|
|
50
|
-
"@speclynx/apidom-traverse": "^2.0
|
|
46
|
+
"@speclynx/apidom-core": "^2.1.0",
|
|
47
|
+
"@speclynx/apidom-datamodel": "^2.1.0",
|
|
48
|
+
"@speclynx/apidom-error": "^2.1.0",
|
|
49
|
+
"@speclynx/apidom-ns-json-schema-2019-09": "^2.1.0",
|
|
50
|
+
"@speclynx/apidom-traverse": "^2.1.0",
|
|
51
51
|
"ramda": "~0.32.0",
|
|
52
52
|
"ramda-adjunct": "^6.0.0",
|
|
53
53
|
"ts-mixer": "^6.0.4"
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"README.md",
|
|
63
63
|
"CHANGELOG.md"
|
|
64
64
|
],
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "dd02cfbbe82b0a31c6e7c444cec140e740e1c6e9"
|
|
66
66
|
}
|