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