@speclynx/apidom-ns-json-schema-draft-6 1.12.2 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/NOTICE +16 -7
- package/README.md +24 -24
- package/dist/apidom-ns-json-schema-draft-6.browser.js +1 -1
- package/package.json +11 -9
- package/src/elements/JSONSchema.cjs +14 -6
- package/src/elements/JSONSchema.mjs +14 -6
- package/src/elements/LinkDescription.cjs +4 -0
- package/src/elements/LinkDescription.mjs +4 -0
- package/src/index.cjs +8 -21
- package/src/index.mjs +2 -5
- package/src/predicates.cjs +4 -15
- package/src/predicates.mjs +2 -15
- package/src/refractor/index.cjs +38 -17
- package/src/refractor/index.mjs +33 -15
- package/src/refractor/inspect.cjs +47 -0
- package/src/refractor/inspect.mjs +39 -0
- package/src/refractor/plugins/replace-empty-element.cjs +28 -26
- package/src/refractor/plugins/replace-empty-element.mjs +14 -11
- package/src/refractor/specification.cjs +14 -2
- package/src/refractor/specification.mjs +14 -2
- package/src/refractor/toolbox.cjs +8 -3
- package/src/refractor/toolbox.mjs +6 -2
- package/src/refractor/visitors/json-schema/ExamplesVisitor.cjs +2 -3
- package/src/refractor/visitors/json-schema/ExamplesVisitor.mjs +2 -3
- package/src/refractor/visitors/json-schema/ItemsVisitor.cjs +3 -4
- package/src/refractor/visitors/json-schema/ItemsVisitor.mjs +3 -4
- package/src/refractor/visitors/json-schema/index.cjs +4 -3
- package/src/refractor/visitors/json-schema/index.mjs +4 -3
- package/src/refractor/visitors/json-schema/link-description/index.cjs +2 -0
- package/src/refractor/visitors/json-schema/link-description/index.mjs +2 -0
- package/types/apidom-ns-json-schema-draft-6.d.ts +90 -245
- package/src/refractor/registration.cjs +0 -13
- package/src/refractor/registration.mjs +0 -6
- package/src/traversal/visitor.cjs +0 -17
- package/src/traversal/visitor.mjs +0 -13
|
@@ -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.apidomNsJSONSchemaDraft6=t():e.apidomNsJSONSchemaDraft6=t()}(self,()=>(()=>{var e={88:(e,t,n)=>{var r=n(4700);e.exports=function(e){return r(this,e).get(e)}},155:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},195:(e,t,n)=>{var r=n(4882),s=n(8121),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return s(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},353:(e,t,n)=>{var r=n(1340),s=n(3934),i=n(8861),o=n(1182),c=n(8486),a=n(3142),u=n(5853),l=n(8666),h="[object Arguments]",f="[object Array]",p="[object Object]",m=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,d,y,v){var b=a(e),g=a(t),E=b?f:c(e),j=g?f:c(t),O=(E=E==h?p:E)==p,S=(j=j==h?p:j)==p,w=E==j;if(w&&u(e)){if(!u(t))return!1;b=!0,O=!1}if(w&&!O)return v||(v=new r),b||l(e)?s(e,t,n,d,y,v):i(e,t,E,n,d,y,v);if(!(1&n)){var x=O&&m.call(e,"__wrapped__"),A=S&&m.call(t,"__wrapped__");if(x||A){var k=x?e.value():e,P=A?t.value():t;return v||(v=new r),y(k,P,n,d,v)}}return!!w&&(v||(v=new r),o(e,t,n,d,y,v))}},358:(e,t,n)=>{var r=n(6137),s=n(3283),i=n(3142),o=n(5853),c=n(9632),a=n(8666),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),l=!n&&s(e),h=!n&&!l&&o(e),f=!n&&!l&&!h&&a(e),p=n||l||h||f,m=p?r(e.length,String):[],d=m.length;for(var y in e)!t&&!u.call(e,y)||p&&("length"==y||h&&("offset"==y||"parent"==y)||f&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||c(y,d))||m.push(y);return m}},393:(e,t,n)=>{var r=n(8244),s=n(7979),i=n(1211);e.exports=function(e){return r(e,i,s)}},394:e=>{e.exports=class{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};e._meta&&e._meta.length>0&&(t.meta=this.serialiseObject(e.meta)),e._attributes&&e._attributes.length>0&&(t.attributes=this.serialiseObject(e.attributes));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));t.element!==e.element&&(t.element=e.element),e.meta&&this.deserialiseObject(e.meta,t.meta),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={key:this.serialise(e.key)};return e.value&&(t.value=this.serialise(e.value)),t}if(e&&e.map){if(0===e.length)return;return e.map(this.serialise,this)}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(e.map)return e.map(this.deserialise,this)}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]))})}}},547:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},593:(e,t,n)=>{const r=n(8631);e.exports=class extends r{constructor(e,t,n){super(e||[],t,n),this.element="ref",this.path||(this.path="element")}get path(){return this.attributes.get("path")}set path(e){this.attributes.set("path",e)}}},674:(e,t,n)=>{var r=n(7379),s=n(5387),i=n(547),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&s(e.length)&&!!o[r(e)]}},986:(e,t,n)=>{var r=n(7379),s=n(547);e.exports=function(e){return"number"==typeof e||s(e)&&"[object Number]"==r(e)}},1112:(e,t,n)=>{var r=n(4497),s=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return s.call(t,e)?t[e]:void 0}},1129:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,s=e.length;++n<r;)e[s+n]=t[n];return e}},1182:(e,t,n)=>{var r=n(393),s=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,o,c){var a=1&n,u=r(e),l=u.length;if(l!=r(t).length&&!a)return!1;for(var h=l;h--;){var f=u[h];if(!(a?f in t:s.call(t,f)))return!1}var p=c.get(e),m=c.get(t);if(p&&m)return p==t&&m==e;var d=!0;c.set(e,t),c.set(t,e);for(var y=a;++h<l;){var v=e[f=u[h]],b=t[f];if(i)var g=a?i(b,v,f,t,e,c):i(v,b,f,e,t,c);if(!(void 0===g?v===b||o(v,b,n,i,c):g)){d=!1;break}y||(y="constructor"==f)}if(d&&!y){var E=e.constructor,j=t.constructor;E==j||!("constructor"in e)||!("constructor"in t)||"function"==typeof E&&E instanceof E&&"function"==typeof j&&j instanceof j||(d=!1)}return c.delete(e),c.delete(t),d}},1211:(e,t,n)=>{var r=n(358),s=n(195),i=n(6529);e.exports=function(e){return i(e)?r(e):s(e)}},1340:(e,t,n)=>{var r=n(1386),s=n(4103),i=n(1779),o=n(4162),c=n(7462),a=n(6638);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=s,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=c,u.prototype.set=a,e.exports=u},1386:(e,t,n)=>{var r=n(2393),s=n(2049),i=n(7144),o=n(7452),c=n(3964);function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=r,a.prototype.delete=s,a.prototype.get=i,a.prototype.has=o,a.prototype.set=c,e.exports=a},1517:e=>{e.exports=function(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}},1580:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},1623:(e,t,n)=>{var r=n(8942).Uint8Array;e.exports=r},1779:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},1877:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1950:(e,t,n)=>{var r=n(8942)["__core-js_shared__"];e.exports=r},2049:(e,t,n)=>{var r=n(7034),s=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():s.call(t,n,1),--this.size,!0)}},2306:(e,t,n)=>{e=n.nmd(e);var r=n(4967),s=t&&!t.nodeType&&t,i=s&&e&&!e.nodeType&&e,o=i&&i.exports===s&&r.process,c=function(){try{var e=i&&i.require&&i.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=c},2322:e=>{class t{constructor(e,t){this.key=e,this.value=t}clone(){const e=new t;return this.key&&(e.key=this.key.clone()),this.value&&(e.value=this.value.clone()),e}}e.exports=t},2393:e=>{e.exports=function(){this.__data__=[],this.size=0}},2536:(e,t,n)=>{const r=n(8631);e.exports=class extends r{constructor(e,t,n){super(e,t,n),this.element="number"}primitive(){return"number"}}},2555:(e,t,n)=>{const r=n(8631);e.exports=class extends r{constructor(e,t,n){super(e,t,n),this.element="boolean"}primitive(){return"boolean"}}},2563:(e,t,n)=>{var r=n(7379),s=n(547);e.exports=function(e){return!0===e||!1===e||s(e)&&"[object Boolean]"==r(e)}},3004:(e,t,n)=>{const r=n(8631);e.exports=class extends r{constructor(e,t,n){super(e||null,t,n),this.element="null"}primitive(){return"null"}set(){return new Error("Cannot set the value of null")}}},3103:(e,t,n)=>{var r=n(4715)(n(8942),"DataView");e.exports=r},3142:e=>{var t=Array.isArray;e.exports=t},3148:(e,t,n)=>{const r=n(394);e.exports=class extends r{serialise(e){if(!(e instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${e}\` is not an Element instance`);let t;e._attributes&&e.attributes.get("variable")&&(t=e.attributes.get("variable"));const n={element:e.element};e._meta&&e._meta.length>0&&(n.meta=this.serialiseObject(e.meta));const r="enum"===e.element||-1!==e.attributes.keys().indexOf("enumerations");if(r){const t=this.enumSerialiseAttributes(e);t&&(n.attributes=t)}else if(e._attributes&&e._attributes.length>0){let{attributes:r}=e;r.get("metadata")&&(r=r.clone(),r.set("meta",r.get("metadata")),r.remove("metadata")),"member"===e.element&&t&&(r=r.clone(),r.remove("variable")),r.length>0&&(n.attributes=this.serialiseObject(r))}if(r)n.content=this.enumSerialiseContent(e,n);else if(this[`${e.element}SerialiseContent`])n.content=this[`${e.element}SerialiseContent`](e,n);else if(void 0!==e.content){let r;t&&e.content.key?(r=e.content.clone(),r.key.attributes.set("variable",t),r=this.serialiseContent(r)):r=this.serialiseContent(e.content),this.shouldSerialiseContent(e,r)&&(n.content=r)}else this.shouldSerialiseContent(e,e.content)&&e instanceof this.namespace.elements.Array&&(n.content=[]);return n}shouldSerialiseContent(e,t){return"parseResult"===e.element||"httpRequest"===e.element||"httpResponse"===e.element||"category"===e.element||"link"===e.element||void 0!==t&&(!Array.isArray(t)||0!==t.length)}refSerialiseContent(e,t){return delete t.attributes,{href:e.toValue(),path:e.path.toValue()}}sourceMapSerialiseContent(e){return e.toValue()}dataStructureSerialiseContent(e){return[this.serialiseContent(e.content)]}enumSerialiseAttributes(e){const t=e.attributes.clone(),n=t.remove("enumerations")||new this.namespace.elements.Array([]),r=t.get("default");let s=t.get("samples")||new this.namespace.elements.Array([]);if(r&&r.content&&(r.content.attributes&&r.content.attributes.remove("typeAttributes"),t.set("default",new this.namespace.elements.Array([r.content]))),s.forEach(e=>{e.content&&e.content.element&&e.content.attributes.remove("typeAttributes")}),e.content&&0!==n.length&&s.unshift(e.content),s=s.map(e=>e instanceof this.namespace.elements.Array?[e]:new this.namespace.elements.Array([e.content])),s.length&&t.set("samples",s),t.length>0)return this.serialiseObject(t)}enumSerialiseContent(e){if(e._attributes){const t=e.attributes.get("enumerations");if(t&&t.length>0)return t.content.map(e=>{const t=e.clone();return t.attributes.remove("typeAttributes"),this.serialise(t)})}if(e.content){const t=e.content.clone();return t.attributes.remove("typeAttributes"),[this.serialise(t)]}return[]}deserialise(e){if("string"==typeof e)return new this.namespace.elements.String(e);if("number"==typeof e)return new this.namespace.elements.Number(e);if("boolean"==typeof e)return new this.namespace.elements.Boolean(e);if(null===e)return new this.namespace.elements.Null;if(Array.isArray(e))return new this.namespace.elements.Array(e.map(this.deserialise,this));const t=this.namespace.getElementClass(e.element),n=new t;n.element!==e.element&&(n.element=e.element),e.meta&&this.deserialiseObject(e.meta,n.meta),e.attributes&&this.deserialiseObject(e.attributes,n.attributes);const r=this.deserialiseContent(e.content);if(void 0===r&&null!==n.content||(n.content=r),"enum"===n.element){n.content&&n.attributes.set("enumerations",n.content);let e=n.attributes.get("samples");if(n.attributes.remove("samples"),e){const r=e;e=new this.namespace.elements.Array,r.forEach(r=>{r.forEach(r=>{const s=new t(r);s.element=n.element,e.push(s)})});const s=e.shift();n.content=s?s.content:void 0,n.attributes.set("samples",e)}else n.content=void 0;let r=n.attributes.get("default");if(r&&r.length>0){r=r.get(0);const e=new t(r);e.element=n.element,n.attributes.set("default",e)}}else if("dataStructure"===n.element&&Array.isArray(n.content))[n.content]=n.content;else if("category"===n.element){const e=n.attributes.get("meta");e&&(n.attributes.set("metadata",e),n.attributes.remove("meta"))}else"member"===n.element&&n.key&&n.key._attributes&&n.key._attributes.getValue("variable")&&(n.attributes.set("variable",n.key.attributes.get("variable")),n.key.attributes.remove("variable"));return n}serialiseContent(e){if(e instanceof this.namespace.elements.Element)return this.serialise(e);if(e instanceof this.namespace.KeyValuePair){const t={key:this.serialise(e.key)};return e.value&&(t.value=this.serialise(e.value)),t}return e&&e.map?e.map(this.serialise,this):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(e.map)return e.map(this.deserialise,this)}return e}shouldRefract(e){return!!(e._attributes&&e.attributes.keys().length||e._meta&&e.meta.keys().length)||"enum"!==e.element&&(e.element!==e.primitive()||"member"===e.element)}convertKeyToRefract(e,t){return this.shouldRefract(t)?this.serialise(t):"enum"===t.element?this.serialiseEnum(t):"array"===t.element?t.map(t=>this.shouldRefract(t)||"default"===e?this.serialise(t):"array"===t.element||"object"===t.element||"enum"===t.element?t.children.map(e=>this.serialise(e)):t.toValue()):"object"===t.element?(t.content||[]).map(this.serialise,this):t.toValue()}serialiseEnum(e){return e.children.map(e=>this.serialise(e))}serialiseObject(e){const t={};return e.forEach((e,n)=>{if(e){const r=n.toValue();t[r]=this.convertKeyToRefract(r,e)}}),t}deserialiseObject(e,t){Object.keys(e).forEach(n=>{t.set(n,this.deserialise(e[n]))})}}},3212:(e,t,n)=>{var r=n(8250),s=n(1877),i=n(8006);function o(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}o.prototype.add=o.prototype.push=s,o.prototype.has=i,e.exports=o},3283:(e,t,n)=>{var r=n(6027),s=n(547),i=Object.prototype,o=i.hasOwnProperty,c=i.propertyIsEnumerable,a=r(function(){return arguments}())?r:function(e){return s(e)&&o.call(e,"callee")&&!c.call(e,"callee")};e.exports=a},3305:(e,t,n)=>{var r=n(4497);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},3311:(e,t,n)=>{const r=n(1517),s=n(4123);class i extends s{map(e,t){return this.elements.map(n=>e.bind(t)(n.value,n.key,n))}filter(e,t){return new i(this.elements.filter(n=>e.bind(t)(n.value,n.key,n)))}reject(e,t){return this.filter(r(e.bind(t)))}forEach(e,t){return this.elements.forEach((n,r)=>{e.bind(t)(n.value,n.key,n,r)})}keys(){return this.map((e,t)=>t.toValue())}values(){return this.map(e=>e.toValue())}}e.exports=i},3655:(e,t,n)=>{var r=n(7379),s=n(1580);e.exports=function(e){if(!s(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},3766:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},3934:(e,t,n)=>{var r=n(3212),s=n(6465),i=n(5568);e.exports=function(e,t,n,o,c,a){var u=1&n,l=e.length,h=t.length;if(l!=h&&!(u&&h>l))return!1;var f=a.get(e),p=a.get(t);if(f&&p)return f==t&&p==e;var m=-1,d=!0,y=2&n?new r:void 0;for(a.set(e,t),a.set(t,e);++m<l;){var v=e[m],b=t[m];if(o)var g=u?o(b,v,m,t,e,a):o(v,b,m,e,t,a);if(void 0!==g){if(g)continue;d=!1;break}if(y){if(!s(t,function(e,t){if(!i(y,t)&&(v===e||c(v,e,n,o,a)))return y.push(t)})){d=!1;break}}else if(v!==b&&!c(v,b,n,o,a)){d=!1;break}}return a.delete(e),a.delete(t),d}},3964:(e,t,n)=>{var r=n(7034);e.exports=function(e,t){var n=this.__data__,s=r(n,e);return s<0?(++this.size,n.push([e,t])):n[s][1]=t,this}},4066:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},4103:(e,t,n)=>{var r=n(1386);e.exports=function(){this.__data__=new r,this.size=0}},4123:(e,t,n)=>{const r=n(1517);function s(e){return"string"==typeof e?t=>t.element===e:e.constructor&&e.extend?t=>t instanceof e:e}class i{constructor(e){this.elements=e||[]}toValue(){return this.elements.map(e=>e.toValue())}map(e,t){return this.elements.map(e,t)}flatMap(e,t){return this.map(e,t).reduce((e,t)=>e.concat(t),[])}compactMap(e,t){const n=[];return this.forEach(r=>{const s=e.bind(t)(r);s&&n.push(s)}),n}filter(e,t){return e=s(e),new i(this.elements.filter(e,t))}reject(e,t){return e=s(e),new i(this.elements.filter(r(e),t))}find(e,t){return e=s(e),this.elements.find(e,t)}forEach(e,t){this.elements.forEach(e,t)}reduce(e,t){return this.elements.reduce(e,t)}includes(e){return this.elements.some(t=>t.equals(e))}shift(){return this.elements.shift()}unshift(e){this.elements.unshift(this.refract(e))}push(e){return this.elements.push(this.refract(e)),this}add(e){this.push(e)}get(e){return this.elements[e]}getValue(e){const t=this.elements[e];if(t)return t.toValue()}get length(){return this.elements.length}get isEmpty(){return 0===this.elements.length}get first(){return this.elements[0]}}"undefined"!=typeof Symbol&&(i.prototype[Symbol.iterator]=function(){return this.elements[Symbol.iterator]()}),e.exports=i},4162:e=>{e.exports=function(e){return this.__data__.get(e)}},4497:(e,t,n)=>{var r=n(4715)(Object,"create");e.exports=r},4512:(e,t,n)=>{var r=n(4715)(n(8942),"Set");e.exports=r},4687:(e,t,n)=>{var r=n(353),s=n(547);e.exports=function e(t,n,i,o,c){return t===n||(null==t||null==n||!s(t)&&!s(n)?t!=t&&n!=n:r(t,n,i,o,e,c))}},4700:(e,t,n)=>{var r=n(9067);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},4715:(e,t,n)=>{var r=n(9624),s=n(155);e.exports=function(e,t){var n=s(e,t);return r(n)?n:void 0}},4732:(e,t,n)=>{var r=n(4700);e.exports=function(e){return r(this,e).has(e)}},4759:(e,t,n)=>{var r,s=n(1950),i=(r=/[^.]+$/.exec(s&&s.keys&&s.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},4772:e=>{e.exports=function(){return!1}},4882:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},4967:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},5071:(e,t,n)=>{var r=n(4497);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},5098:(e,t,n)=>{var r=n(3305),s=n(9361),i=n(1112),o=n(5276),c=n(5071);function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=r,a.prototype.delete=s,a.prototype.get=i,a.prototype.has=o,a.prototype.set=c,e.exports=a},5276:(e,t,n)=>{var r=n(4497),s=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:s.call(t,e)}},5387:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},5568:e=>{e.exports=function(e,t){return e.has(t)}},5642:(e,t,n)=>{const r=n(1517),s=n(1580),i=n(9796),o=n(7309),c=n(3311);e.exports=class extends i{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}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(s(e))return Object.keys(e).forEach(t=>{this.set(t,e[t])}),this;const n=e,r=this.getMember(n);return r?r.value=t:this.content.push(new o(n,t)),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.bind(t)(n.value,n.key,n))}compactMap(e,t){const n=[];return this.forEach((r,s,i)=>{const o=e.bind(t)(r,s,i);o&&n.push(o)}),n}filter(e,t){return new c(this.content).filter(e,t)}reject(e,t){return this.filter(r(e),t)}forEach(e,t){return this.content.forEach(n=>e.bind(t)(n.value,n.key,n))}}},5650:(e,t,n)=>{var r=n(8942).Symbol;e.exports=r},5681:(e,t,n)=>{var r=n(4700);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},5735:(e,t,n)=>{const r=n(9310),s=n(8138),i=n(986),o=n(2563),c=n(1580),a=n(394),u=n(7547);class l{constructor(e){this.elementMap={},this.elementDetection=[],this.Element=u.Element,this.KeyValuePair=u.KeyValuePair,e&&e.noDefault||this.useDefault(),this._attributeElementKeys=[],this._attributeElementArrayKeys=[]}use(e){return e.namespace&&e.namespace({base:this}),e.load&&e.load({base:this}),this}useDefault(){return this.register("null",u.NullElement).register("string",u.StringElement).register("number",u.NumberElement).register("boolean",u.BooleanElement).register("array",u.ArrayElement).register("object",u.ObjectElement).register("member",u.MemberElement).register("ref",u.RefElement).register("link",u.LinkElement),this.detect(r,u.NullElement,!1).detect(s,u.StringElement,!1).detect(i,u.NumberElement,!1).detect(o,u.BooleanElement,!1).detect(Array.isArray,u.ArrayElement,!1).detect(c,u.ObjectElement,!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(let n=0;n<this.elementDetection.length;n+=1){const r=this.elementDetection[n][0],s=this.elementDetection[n][1];if(r(e)){t=new s(e);break}}return t}getElementClass(e){const t=this.elementMap[e];return void 0===t?this.Element:t}fromRefract(e){return this.serialiser.deserialise(e)}toRefract(e){return this.serialiser.serialise(e)}get elements(){return void 0===this._elements&&(this._elements={Element:this.Element},Object.keys(this.elementMap).forEach(e=>{const t=e[0].toUpperCase()+e.substr(1);this._elements[t]=this.elementMap[e]})),this._elements}get serialiser(){return new a(this)}}a.prototype.Namespace=l,e.exports=l},5853:(e,t,n)=>{e=n.nmd(e);var r=n(8942),s=n(4772),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,c=o&&o.exports===i?r.Buffer:void 0,a=(c?c.isBuffer:void 0)||s;e.exports=a},5894:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},6027:(e,t,n)=>{var r=n(7379),s=n(547);e.exports=function(e){return s(e)&&"[object Arguments]"==r(e)}},6137:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},6285:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},6343:(e,t,n)=>{var r=n(4687);e.exports=function(e,t){return r(e,t)}},6465:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},6529:(e,t,n)=>{var r=n(3655),s=n(5387);e.exports=function(e){return null!=e&&s(e.length)&&!r(e)}},6638:(e,t,n)=>{var r=n(1386),s=n(9770),i=n(8250);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!s||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(o)}return n.set(e,t),this.size=n.size,this}},7034:(e,t,n)=>{var r=n(6285);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},7144:(e,t,n)=>{var r=n(7034);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},7309:(e,t,n)=>{const r=n(2322),s=n(8631);e.exports=class extends s{constructor(e,t,n,s){super(new r,n,s),this.element="member",this.key=e,this.value=t}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=this.refract(e)}}},7379:(e,t,n)=>{var r=n(5650),s=n(8870),i=n(9005),o=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?s(e):i(e)}},7452:(e,t,n)=>{var r=n(7034);e.exports=function(e){return r(this.__data__,e)>-1}},7462:e=>{e.exports=function(e){return this.__data__.has(e)}},7547:(e,t,n)=>{const r=n(8631),s=n(3004),i=n(8712),o=n(2536),c=n(2555),a=n(9796),u=n(7309),l=n(5642),h=n(9620),f=n(593),p=n(4123),m=n(3311),d=n(2322);function y(e){if(e instanceof r)return e;if("string"==typeof e)return new i(e);if("number"==typeof e)return new o(e);if("boolean"==typeof e)return new c(e);if(null===e)return new s;if(Array.isArray(e))return new a(e.map(y));if("object"==typeof e){return new l(e)}return e}r.prototype.ObjectElement=l,r.prototype.RefElement=f,r.prototype.MemberElement=u,r.prototype.refract=y,p.prototype.refract=y,e.exports={Element:r,NullElement:s,StringElement:i,NumberElement:o,BooleanElement:c,ArrayElement:a,MemberElement:u,ObjectElement:l,LinkElement:h,RefElement:f,refract:y,ArraySlice:p,ObjectSlice:m,KeyValuePair:d}},7979:(e,t,n)=>{var r=n(9847),s=n(9306),i=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,c=o?function(e){return null==e?[]:(e=Object(e),r(o(e),function(t){return i.call(e,t)}))}:s;e.exports=c},8006:e=>{e.exports=function(e){return this.__data__.has(e)}},8121:(e,t,n)=>{var r=n(3766)(Object.keys,Object);e.exports=r},8138:(e,t,n)=>{var r=n(7379),s=n(3142),i=n(547);e.exports=function(e){return"string"==typeof e||!s(e)&&i(e)&&"[object String]"==r(e)}},8244:(e,t,n)=>{var r=n(1129),s=n(3142);e.exports=function(e,t,n){var i=t(e);return s(e)?i:r(i,n(e))}},8250:(e,t,n)=>{var r=n(9753),s=n(5681),i=n(88),o=n(4732),c=n(9068);function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=r,a.prototype.delete=s,a.prototype.get=i,a.prototype.has=o,a.prototype.set=c,e.exports=a},8326:(e,t,n)=>{const r=n(5735),s=n(7547);t.g$=r,t.KeyValuePair=n(2322),t.G6=s.ArraySlice,t.ot=s.ObjectSlice,t.Hg=s.Element,t.Om=s.StringElement,t.kT=s.NumberElement,t.bd=s.BooleanElement,t.Os=s.NullElement,t.wE=s.ArrayElement,t.Sh=s.ObjectElement,t.Pr=s.MemberElement,t.sI=s.RefElement,t.Ft=s.LinkElement,t.e=s.refract,n(394),n(3148)},8486:(e,t,n)=>{var r=n(3103),s=n(9770),i=n(9413),o=n(4512),c=n(9270),a=n(7379),u=n(4066),l="[object Map]",h="[object Promise]",f="[object Set]",p="[object WeakMap]",m="[object DataView]",d=u(r),y=u(s),v=u(i),b=u(o),g=u(c),E=a;(r&&E(new r(new ArrayBuffer(1)))!=m||s&&E(new s)!=l||i&&E(i.resolve())!=h||o&&E(new o)!=f||c&&E(new c)!=p)&&(E=function(e){var t=a(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case d:return m;case y:return l;case v:return h;case b:return f;case g:return p}return t}),e.exports=E},8631:(e,t,n)=>{const r=n(6343),s=n(2322),i=n(4123);class o{constructor(e,t,n){t&&(this.meta=t),n&&(this.attributes=n),this.content=e}freeze(){Object.isFrozen(this)||(this._meta&&(this.meta.parent=this,this.meta.freeze()),this._attributes&&(this.attributes.parent=this,this.attributes.freeze()),this.children.forEach(e=>{e.parent=this,e.freeze()},this),this.content&&Array.isArray(this.content)&&Object.freeze(this.content),Object.freeze(this))}primitive(){}clone(){const e=new this.constructor;return e.element=this.element,this.meta.length&&(e._meta=this.meta.clone()),this.attributes.length&&(e._attributes=this.attributes.clone()),this.content?this.content.clone?e.content=this.content.clone():Array.isArray(this.content)?e.content=this.content.map(e=>e.clone()):e.content=this.content:e.content=this.content,e}toValue(){return this.content instanceof o?this.content.toValue():this.content instanceof s?{key:this.content.key.toValue(),value:this.content.value?this.content.value.toValue():void 0}:this.content&&this.content.map?this.content.map(e=>e.toValue(),this):this.content}toRef(e){if(""===this.id.toValue())throw Error("Cannot create reference to an element that does not contain an ID");const t=new this.RefElement(this.id.toValue());return e&&(t.path=e),t}findRecursive(...e){if(arguments.length>1&&!this.isFrozen)throw new Error("Cannot find recursive with multiple element names without first freezing the element. Call `element.freeze()`");const t=e.pop();let n=new i;const r=(e,t)=>(e.push(t),e),o=(e,n)=>{n.element===t&&e.push(n);const i=n.findRecursive(t);return i&&i.reduce(r,e),n.content instanceof s&&(n.content.key&&o(e,n.content.key),n.content.value&&o(e,n.content.value)),e};return this.content&&(this.content.element&&o(n,this.content),Array.isArray(this.content)&&this.content.reduce(o,n)),e.isEmpty||(n=n.filter(t=>{let n=t.parents.map(e=>e.element);for(const t in e){const r=e[t],s=n.indexOf(r);if(-1===s)return!1;n=n.splice(0,s)}return!0})),n}set(e){return this.content=e,this}equals(e){return r(this.toValue(),e)}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)}get element(){return this._storedElement||"element"}set element(e){this._storedElement=e}get content(){return this._content}set content(e){if(e instanceof o)this._content=e;else if(e instanceof i)this.content=e.elements;else if("string"==typeof e||"number"==typeof e||"boolean"==typeof e||"null"===e||null==e)this._content=e;else if(e instanceof s)this._content=e;else if(Array.isArray(e))this._content=e.map(this.refract);else{if("object"!=typeof e)throw new Error("Cannot set content to given value");this._content=Object.keys(e).map(t=>new this.MemberElement(t,e[t]))}}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 this.ObjectElement?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 this.ObjectElement?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 title(){return this.getMetaProperty("title","")}set title(e){this.setMetaProperty("title",e)}get description(){return this.getMetaProperty("description","")}set description(e){this.setMetaProperty("description",e)}get links(){return this.getMetaProperty("links",[])}set links(e){this.setMetaProperty("links",e)}get isFrozen(){return Object.isFrozen(this)}get parents(){let{parent:e}=this;const t=new i;for(;e;)t.push(e),e=e.parent;return t}get children(){if(Array.isArray(this.content))return new i(this.content);if(this.content instanceof s){const e=new i([this.content.key]);return this.content.value&&e.push(this.content.value),e}return this.content instanceof o?new i([this.content]):new i}get recursiveChildren(){const e=new i;return this.children.forEach(t=>{e.push(t),t.recursiveChildren.forEach(t=>{e.push(t)})}),e}}e.exports=o},8666:(e,t,n)=>{var r=n(674),s=n(9460),i=n(2306),o=i&&i.isTypedArray,c=o?s(o):r;e.exports=c},8712:(e,t,n)=>{const r=n(8631);e.exports=class extends r{constructor(e,t,n){super(e,t,n),this.element="string"}primitive(){return"string"}get length(){return this.content.length}}},8861:(e,t,n)=>{var r=n(5650),s=n(1623),i=n(6285),o=n(3934),c=n(5894),a=n(9828),u=r?r.prototype:void 0,l=u?u.valueOf:void 0;e.exports=function(e,t,n,r,u,h,f){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!h(new s(e),new s(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=c;case"[object Set]":var m=1&r;if(p||(p=a),e.size!=t.size&&!m)return!1;var d=f.get(e);if(d)return d==t;r|=2,f.set(e,t);var y=o(p(e),p(t),r,u,h,f);return f.delete(e),y;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},8870:(e,t,n)=>{var r=n(5650),s=Object.prototype,i=s.hasOwnProperty,o=s.toString,c=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch(e){}var s=o.call(e);return r&&(t?e[c]=n:delete e[c]),s}},8942:(e,t,n)=>{var r=n(4967),s="object"==typeof self&&self&&self.Object===Object&&self,i=r||s||Function("return this")();e.exports=i},9005:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9067:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},9068:(e,t,n)=>{var r=n(4700);e.exports=function(e,t){var n=r(this,e),s=n.size;return n.set(e,t),this.size+=n.size==s?0:1,this}},9270:(e,t,n)=>{var r=n(4715)(n(8942),"WeakMap");e.exports=r},9306:e=>{e.exports=function(){return[]}},9310:e=>{e.exports=function(e){return null===e}},9361:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},9413:(e,t,n)=>{var r=n(4715)(n(8942),"Promise");e.exports=r},9460:e=>{e.exports=function(e){return function(t){return e(t)}}},9620:(e,t,n)=>{const r=n(8631);e.exports=class extends r{constructor(e,t,n){super(e||[],t,n),this.element="link"}get relation(){return this.attributes.get("relation")}set relation(e){this.attributes.set("relation",e)}get href(){return this.attributes.get("href")}set href(e){this.attributes.set("href",e)}}},9624:(e,t,n)=>{var r=n(3655),s=n(4759),i=n(1580),o=n(4066),c=/^\[object .+?Constructor\]$/,a=Function.prototype,u=Object.prototype,l=a.toString,h=u.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||s(e))&&(r(e)?f:c).test(o(e))}},9632:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},9753:(e,t,n)=>{var r=n(5098),s=n(1386),i=n(9770);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||s),string:new r}}},9770:(e,t,n)=>{var r=n(4715)(n(8942),"Map");e.exports=r},9796:(e,t,n)=>{const r=n(1517),s=n(8631),i=n(4123);class o extends s{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()}getIndex(e){return this.content[e]}set(e,t){return this.content[e]=this.refract(t),this}remove(e){const t=this.content.splice(e,1);return t.length?t[0]:null}map(e,t){return this.content.map(e,t)}flatMap(e,t){return this.map(e,t).reduce((e,t)=>e.concat(t),[])}compactMap(e,t){const n=[];return this.forEach(r=>{const s=e.bind(t)(r);s&&n.push(s)}),n}filter(e,t){return new i(this.content.filter(e,t))}reject(e,t){return this.filter(r(e),t)}reduce(e,t){let n,r;void 0!==t?(n=0,r=this.refract(t)):(n=1,r="object"===this.primitive()?this.first.value:this.first);for(let t=n;t<this.length;t+=1){const n=this.content[t];r="object"===this.primitive()?this.refract(e(r,n.value,n.key,n,this)):this.refract(e(r,n,t,this))}return r}forEach(e,t){this.content.forEach((n,r)=>{e.bind(t)(n,this.refract(r))})}shift(){return this.content.shift()}unshift(e){this.content.unshift(this.refract(e))}push(e){return this.content.push(this.refract(e)),this}add(e){this.push(e)}findElements(e,t){const n=t||{},r=!!n.recursive,s=void 0===n.results?[]:n.results;return this.forEach((t,n,i)=>{r&&void 0!==t.findElements&&t.findElements(e,{results:s,recursive:r}),e(t,n,i)&&s.push(t)}),s}find(e){return new i(this.findElements(e,{recursive:!0}))}findByElement(e){return this.find(t=>t.element===e)}findByClass(e){return this.find(t=>t.classes.includes(e))}getById(e){return this.find(t=>t.id.toValue()===e).first}includes(e){return this.content.some(t=>t.equals(e))}contains(e){return this.includes(e)}empty(){return new this.constructor([])}"fantasy-land/empty"(){return this.empty()}concat(e){return new this.constructor(this.content.concat(e.content))}"fantasy-land/concat"(e){return this.concat(e)}"fantasy-land/map"(e){return new this.constructor(this.map(e))}"fantasy-land/chain"(e){return this.map(t=>e(t),this).reduce((e,t)=>e.concat(t),this.empty())}"fantasy-land/filter"(e){return new this.constructor(this.content.filter(e))}"fantasy-land/reduce"(e,t){return this.content.reduce(e,t)}get length(){return this.content.length}get isEmpty(){return 0===this.content.length}get first(){return this.getIndex(0)}get second(){return this.getIndex(1)}get last(){return this.getIndex(this.length-1)}}o.empty=function(){return new this},o["fantasy-land/empty"]=o.empty,"undefined"!=typeof Symbol&&(o.prototype[Symbol.iterator]=function(){return this.content[Symbol.iterator]()}),e.exports=o},9828:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},9847:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,s=0,i=[];++n<r;){var o=e[n];t(o,n,e)&&(i[s++]=o)}return i}}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r](i,i.exports,n),i.loaded=!0,i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var r={};return(()=>{"use strict";n.r(r),n.d(r,{AlternatingVisitor:()=>Js,FallbackVisitor:()=>vr,FixedFieldsVisitor:()=>Gr,ItemsVisitor:()=>pi,JSONReferenceElement:()=>Rn,JSONSchemaDraft6MediaTypes:()=>_e,JSONSchemaElement:()=>Qs,JSONSchemaVisitor:()=>fi,LinkDescriptionElement:()=>ei,LinkDescriptionVisitor:()=>di,MapVisitor:()=>is,MediaElement:()=>Dn,ParentSchemaAwareVisitor:()=>Ur,PatternedFieldsVisitor:()=>ss,SpecificationVisitor:()=>Lr,Visitor:()=>yr,createRefractor:()=>Oi,default:()=>ti,getNodeType:()=>Ks,isArrayElement:()=>ae,isBooleanElement:()=>oe,isElement:()=>ne,isJSONReferenceElement:()=>Wr,isJSONReferenceLikeElement:()=>Qr,isJSONSchemaElement:()=>bi,isLinkDescriptionElement:()=>gi,isLinkElement:()=>le,isMediaElement:()=>Hr,isMemberElement:()=>ue,isNullElement:()=>ie,isNumberElement:()=>se,isObjectElement:()=>ce,isRefElement:()=>he,isStringElement:()=>re,keyMap:()=>vi,mediaTypes:()=>Me,refract:()=>Si,refractorPluginReplaceEmptyElement:()=>si,specificationObj:()=>yi});var e={};n.r(e),n.d(e,{hasElementSourceMap:()=>ve,includesClasses:()=>ge,includesSymbols:()=>be,isAnnotationElement:()=>fe,isArrayElement:()=>ae,isBooleanElement:()=>oe,isCommentElement:()=>pe,isElement:()=>ne,isLinkElement:()=>le,isMemberElement:()=>ue,isNullElement:()=>ie,isNumberElement:()=>se,isObjectElement:()=>ce,isParseResultElement:()=>me,isPrimitiveElement:()=>ye,isRefElement:()=>he,isSourceMapElement:()=>de,isStringElement:()=>re});var t={};n.r(t),n.d(t,{isJSONReferenceElement:()=>Wr,isJSONSchemaElement:()=>Kr,isLinkDescriptionElement:()=>Xr,isMediaElement:()=>Hr});var s={};n.r(s),n.d(s,{isJSONReferenceElement:()=>Wr,isJSONSchemaElement:()=>bi,isLinkDescriptionElement:()=>gi,isMediaElement:()=>Hr});var i=n(8326);function o(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function c(e){return function t(n){return 0===arguments.length||o(n)?t:e.apply(this,arguments)}}function a(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return o(n)?t:c(function(t){return e(n,t)});default:return o(n)&&o(r)?t:o(n)?c(function(t){return e(t,r)}):o(r)?c(function(t){return e(n,t)}):e(n,r)}}}const u=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};function l(e,t,n){return function(){if(0===arguments.length)return n();var r=arguments[arguments.length-1];if(!u(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 h(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}const f=function(){return this.xf["@@transducer/init"]()},p=function(e){return this.xf["@@transducer/result"](e)};var m=function(){function e(e,t){this.xf=t,this.f=e,this.all=!0}return e.prototype["@@transducer/init"]=f,e.prototype["@@transducer/result"]=function(e){return this.all&&(e=this.xf["@@transducer/step"](e,!0)),this.xf["@@transducer/result"](e)},e.prototype["@@transducer/step"]=function(e,t){return this.f(t)||(this.all=!1,e=h(this.xf["@@transducer/step"](e,!1))),e},e}();function d(e){return function(t){return new m(e,t)}}const y=a(l(["all"],d,function(e,t){for(var n=0;n<t.length;){if(!e(t[n]))return!1;n+=1}return!0}));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 b(e,t,n){return function(){for(var r=[],s=0,i=e,c=0,a=!1;c<t.length||s<arguments.length;){var u;c<t.length&&(!o(t[c])||s>=arguments.length)?u=t[c]:(u=arguments[s],s+=1),r[c]=u,o(u)?a=!0:i-=1,c+=1}return!a&&i<=0?n.apply(this,r):v(Math.max(0,i),b(e,r,n))}}const g=a(function(e,t){return 1===e?c(t):v(e,b(e,[],t))});const E=c(function(e){return g(e.length,function(t,n){var r=Array.prototype.slice.call(arguments,0);return r[0]=n,r[1]=t,e.apply(this,r)})});function j(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function O(e,t,n){for(var r=0,s=n.length;r<s;){if(e(t,n[r]))return!0;r+=1}return!1}function S(e,t){return Object.prototype.hasOwnProperty.call(t,e)}const w="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var x=Object.prototype.toString;const A=function(){return"[object Arguments]"===x.call(arguments)?function(e){return"[object Arguments]"===x.call(e)}:function(e){return S("callee",e)}}();var k=!{toString:null}.propertyIsEnumerable("toString"),P=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],_=function(){return arguments.propertyIsEnumerable("length")}(),M=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},N="function"!=typeof Object.keys||_?c(function(e){if(Object(e)!==e)return[];var t,n,r=[],s=_&&A(e);for(t in e)!S(t,e)||s&&"length"===t||(r[r.length]=t);if(k)for(n=P.length-1;n>=0;)S(t=P[n],e)&&!M(r,t)&&(r[r.length]=t),n-=1;return r}):c(function(e){return Object(e)!==e?[]:Object.keys(e)});const T=N;const F=c(function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function $(e,t,n,r){var s=j(e);function i(e,t){return V(e,t,n.slice(),r.slice())}return!O(function(e,t){return!O(i,t,e)},j(t),s)}function V(e,t,n,r){if(w(e,t))return!0;var s,i,o=F(e);if(o!==F(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||!w(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!w(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&&$(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&$(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=T(e);if(a.length!==T(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(!S(h,t)||!V(t[h],e[h],u,l))return!1;c-=1}return!0}const R=a(function(e,t){return V(e,t,[],[])});function I(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(R(e[n],t))return n;n+=1}return-1}(t,e,0)>=0}const D=E(a(I));class C extends i.Om{constructor(e,t,n){super(e,t,n),this.element="annotation"}get code(){return this.attributes.get("code")}set code(e){this.attributes.set("code",e)}}const J=C;class B extends i.Om{constructor(e,t,n){super(e,t,n),this.element="comment"}}const q=B;const z=c(function(e){return function(){return e}});const L=z(void 0);const G=R(L());class U extends i.wE{constructor(e,t,n){super(e,t,n),this.element="parseResult"}get api(){return this.children.filter(e=>e.classes.contains("api")).first}get results(){return this.children.filter(e=>e.classes.contains("result"))}get result(){return this.results.first}get annotations(){return this.children.filter(e=>"annotation"===e.element)}get warnings(){return this.children.filter(e=>"annotation"===e.element&&e.classes.contains("warning"))}get errors(){return this.children.filter(e=>"annotation"===e.element&&e.classes.contains("error"))}get isEmpty(){return this.children.reject(e=>"annotation"===e.element).isEmpty}replaceResult(e){const{result:t}=this;if(G(t))return!1;const n=this.content.findIndex(e=>e===t);return-1!==n&&(this.content[n]=e,!0)}}const K=U;class W extends i.wE{constructor(e,t,n){super(e,t,n),this.element="sourceMap"}get positionStart(){return this.children.filter(e=>e.classes.contains("position")).get(0)}get positionEnd(){return this.children.filter(e=>e.classes.contains("position")).get(1)}set position(e){if(void 0===e)return;const t=new i.wE([e.start.row,e.start.column,e.start.char]),n=new i.wE([e.end.row,e.end.column,e.end.char]);t.classes.push("position"),n.classes.push("position"),this.push(t).push(n)}}const H=W,X=(e,t)=>"object"==typeof t&&null!==t&&e in t&&"function"==typeof t[e],Y=e=>"object"==typeof e&&null!=e&&"_storedElement"in e&&"string"==typeof e._storedElement&&"_content"in e,Z=(e,t)=>"object"==typeof t&&null!==t&&"primitive"in t&&("function"==typeof t.primitive&&t.primitive()===e),Q=(e,t)=>"object"==typeof t&&null!==t&&"classes"in t&&(Array.isArray(t.classes)||t.classes instanceof i.wE)&&t.classes.includes(e),ee=(e,t)=>"object"==typeof t&&null!==t&&"element"in t&&t.element===e,te=e=>e({hasMethod:X,hasBasicElementProps:Y,primitiveEq:Z,isElementType:ee,hasClass:Q}),ne=te(({hasBasicElementProps:e,primitiveEq:t})=>n=>n instanceof i.Hg||e(n)&&t(void 0,n)),re=te(({hasBasicElementProps:e,primitiveEq:t})=>n=>n instanceof i.Om||e(n)&&t("string",n)),se=te(({hasBasicElementProps:e,primitiveEq:t})=>n=>n instanceof i.kT||e(n)&&t("number",n)),ie=te(({hasBasicElementProps:e,primitiveEq:t})=>n=>n instanceof i.Os||e(n)&&t("null",n)),oe=te(({hasBasicElementProps:e,primitiveEq:t})=>n=>n instanceof i.bd||e(n)&&t("boolean",n)),ce=te(({hasBasicElementProps:e,primitiveEq:t,hasMethod:n})=>r=>r instanceof i.Sh||e(r)&&t("object",r)&&n("keys",r)&&n("values",r)&&n("items",r)),ae=te(({hasBasicElementProps:e,primitiveEq:t,hasMethod:n})=>r=>r instanceof i.wE&&!(r instanceof i.Sh)||e(r)&&t("array",r)&&n("push",r)&&n("unshift",r)&&n("map",r)&&n("reduce",r)),ue=te(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof i.Pr||e(r)&&t("member",r)&&n(void 0,r)),le=te(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof i.Ft||e(r)&&t("link",r)&&n(void 0,r)),he=te(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof i.sI||e(r)&&t("ref",r)&&n(void 0,r)),fe=te(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof J||e(r)&&t("annotation",r)&&n("array",r)),pe=te(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof q||e(r)&&t("comment",r)&&n("string",r)),me=te(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof K||e(r)&&t("parseResult",r)&&n("array",r)),de=te(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof H||e(r)&&t("sourceMap",r)&&n("array",r)),ye=e=>ee("object",e)||ee("array",e)||ee("boolean",e)||ee("number",e)||ee("string",e)||ee("null",e)||ee("member",e),ve=e=>de(e.meta.get("sourceMap")),be=(e,t)=>{if(0===e.length)return!0;const n=t.attributes.get("symbols");return!!ae(n)&&y(D(n.toValue()),e)},ge=(e,t)=>0===e.length||y(D(t.classes.toValue()),e);function Ee(e,t){return t[e<0?t.length+e:e]}const je=c(function(e){return Ee(-1,e)});class Oe 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 Se=Oe;class we extends Error{static[Symbol.hasInstance](e){return super[Symbol.hasInstance](e)||Function.prototype[Symbol.hasInstance].call(Se,e)}constructor(e,t){super(e,t),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const xe=we;const Ae=class extends xe{};const ke=class extends Ae{};const Pe=class extends Array{unknownMediaType="application/octet-stream";filterByFormat(){throw new ke("filterByFormat method in MediaTypes class is not yet implemented.")}findBy(){throw new ke("findBy method in MediaTypes class is not yet implemented.")}latest(){throw new ke("latest method in MediaTypes class is not yet implemented.")}};class _e extends Pe{filterByFormat(e="generic"){const t="generic"===e?"schema;version":e;return this.filter(e=>e.includes(t))}findBy(e="draft-06",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 je(this.filterByFormat(e))}}const Me=new _e("application/schema;version=draft-06","application/schema+json;version=draft-06","application/schema+yaml;version=draft-06");function Ne(e){return function t(n,r,s){switch(arguments.length){case 0:return t;case 1:return o(n)?t:a(function(t,r){return e(n,t,r)});case 2:return o(n)&&o(r)?t:o(n)?a(function(t,n){return e(t,r,n)}):o(r)?a(function(t,r){return e(n,t,r)}):c(function(t){return e(n,r,t)});default:return o(n)&&o(r)&&o(s)?t:o(n)&&o(r)?a(function(t,n){return e(t,n,s)}):o(n)&&o(s)?a(function(t,n){return e(t,r,n)}):o(r)&&o(s)?a(function(t,r){return e(n,t,r)}):o(n)?c(function(t){return e(t,r,s)}):o(r)?c(function(t){return e(n,t,s)}):o(s)?c(function(t){return e(n,r,t)}):e(n,r,s)}}}function Te(e){return"[object Object]"===Object.prototype.toString.call(e)}const Fe=Ne(function(e,t,n){var r,s={};for(r in n=n||{},t=t||{})S(r,t)&&(s[r]=S(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)S(r,n)&&!S(r,s)&&(s[r]=n[r]);return s});const $e=Ne(function e(t,n,r){return Fe(function(n,r,s){return Te(r)&&Te(s)?e(t,r,s):t(n,r,s)},n,r)});const Ve=a(function(e,t){return $e(function(e,t,n){return n},e,t)});const Re=a(function(e,t){return null==t||t!=t?e:t}),Ie=Number.isInteger||function(e){return(e|0)===e};const De=function(e,t){if(null!=t)return Ie(e)?Ee(e,t):t[e]};const Ce=a(De);const Je=Ne(function(e,t,n){return Re(e,Ce(t,n))});function Be(e,t){for(var n=t,r=0;r<e.length;r+=1){if(null==n)return;var s=e[r];n=Ie(s)?Ee(s,n):n[s]}return n}const qe=a(Be);function ze(e,t){return function(){var n=arguments.length;if(0===n)return t();var r=arguments[n-1];return u(r)||"function"!=typeof r[e]?t.apply(this,arguments):r[e].apply(r,Array.prototype.slice.call(arguments,0,n-1))}}const Le=Ne(ze("slice",function(e,t,n){return Array.prototype.slice.call(n,e,t)}));const Ge=Le(0,-1);const Ue=a(function(e,t){return v(e.length,function(){return e.apply(t,arguments)})});const Ke=a(function(e,t){return e.apply(this,t)});function We(e,t,n){for(var r=0,s=n.length;r<s;)t=e(t,n[r]),r+=1;return t}function He(e){return"[object String]"===Object.prototype.toString.call(e)}const Xe=c(function(e){return!!u(e)||!!e&&("object"==typeof e&&(!He(e)&&(0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))});var Ye="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function Ze(e,t,n){return function(r,s,i){if(Xe(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[Ye])return n(r,s,i[Ye]());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 Qe(e,t,n){for(var r=n.next();!r.done;)t=e(t,r.value),r=n.next();return t}function et(e,t,n,r){return n[r](e,t)}const tt=Ze(We,et,Qe);function nt(e,t){for(var n=0,r=t.length,s=Array(r);n<r;)s[n]=e(t[n]),n+=1;return s}var rt=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=f,e.prototype["@@transducer/result"]=p,e.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},e}();const st=a(l(["fantasy-land/map","map"],function(e){return function(t){return new rt(e,t)}},function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return g(t.length,function(){return e.call(this,t.apply(this,arguments))});case"[object Object]":return We(function(n,r){return n[r]=e(t[r]),n},{},T(t));default:return nt(e,t)}}));const it=a(function(e,t){return"function"==typeof t["fantasy-land/ap"]?t["fantasy-land/ap"](e):"function"==typeof e.ap?e.ap(t):"function"==typeof e?function(n){return e(n)(t(n))}:tt(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,st(n,t))},[],e)});const ot=a(function(e,t){var n=g(e,t);return g(e,function(){return We(it,st(n,arguments[0]),Array.prototype.slice.call(arguments,1))})});const ct=c(function(e){return ot(e.length,e)});const at=ct(c(function(e){return!e}));function ut(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 lt=function(e){return(e<10?"0":"")+e};const ht="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+lt(e.getUTCMonth()+1)+"-"+lt(e.getUTCDate())+"T"+lt(e.getUTCHours())+":"+lt(e.getUTCMinutes())+":"+lt(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};var ft=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=f,e.prototype["@@transducer/result"]=p,e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.xf["@@transducer/step"](e,t):e},e}();function pt(e){return function(t){return new ft(e,t)}}var mt=a(l(["fantasy-land/filter","filter"],pt,function(e,t){return Te(t)?We(function(n,r){return e(t[r])&&(n[r]=t[r]),n},{},T(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 dt=mt;const yt=a(function(e,t){return dt((n=e,function(){return!n.apply(this,arguments)}),t);var n});function vt(e,t){var n=function(n){var r=t.concat([e]);return I(n,r)?"<Circular>":vt(n,r)},r=function(e,t){return nt(function(t){return ut(t)+": "+n(e[t])},t.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+nt(n,e).join(", ")+"))";case"[object Array]":return"["+nt(n,e).concat(r(e,yt(function(e){return/^\d+$/.test(e)},T(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):ut(ht(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())+")":ut(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,T(e)).join(", ")+"}"}}const bt=c(function(e){return vt(e,[])});const gt=a(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=bt(e),o=n(i,bt(t));return void 0!==o&&o===i?e:t});const Et=a(function(e,t){return st(Ce(e),t)});function jt(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)}function Ot(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 St(e,t,n,r){return e["@@transducer/result"](n[r](Ue(e["@@transducer/step"],e),t))}const wt=Ze(jt,St,Ot);var xt=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 At=Ne(function(e,t,n){return wt("function"==typeof e?new xt(e):e,t,n)});const kt=c(function(e){return g(At(gt,0,Et("length",e)),function(){for(var t=0,n=e.length;t<n;){if(e[t].apply(this,arguments))return!0;t+=1}return!1})});function Pt(e,t){return function(){return t.call(this,e.apply(this,arguments))}}const _t=c(ze("tail",Le(1,1/0)));function Mt(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return v(arguments[0].length,At(Pt,arguments[0],_t(arguments)))}var Nt=function(e,t){switch(arguments.length){case 0:return Nt;case 1:return function t(n){return 0===arguments.length?t:w(e,n)};default:return w(e,t)}};const Tt=Nt;const Ft=g(1,Mt(F,Tt("GeneratorFunction")));const $t=g(1,Mt(F,Tt("AsyncFunction")));const Vt=kt([Mt(F,Tt("Function")),Ft,$t]);const Rt=at(Vt);function It(e){var t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t}const Dt=a(function(e,t){return e&&t});const Ct=a(function(e,t){return It(e)?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:ct(Dt)(e,t)});var Jt=c(function(e){return null!=e&&"function"==typeof e["fantasy-land/empty"]?e["fantasy-land/empty"]():null!=e&&null!=e.constructor&&"function"==typeof e.constructor["fantasy-land/empty"]?e.constructor["fantasy-land/empty"]():null!=e&&"function"==typeof e.empty?e.empty():null!=e&&null!=e.constructor&&"function"==typeof e.constructor.empty?e.constructor.empty():e==Set||e instanceof Set?new Set:e==Map||e instanceof Map?new Map:u(e)?[]:He(e)?"":Te(e)?{}:A(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 Bt=Jt;const qt=c(function(e){return null!=e&&R(e,Bt(e))});const zt=g(1,Vt(Array.isArray)?Array.isArray:Mt(F,Tt("Array")));const Lt=Ct(zt,qt);const Gt=g(3,function(e,t,n){var r=qe(e,n),s=qe(Ge(e),n);if(!Rt(r)&&!Lt(e)){var i=Ue(r,s);return Ke(i,t)}});const Ut=Ne(function(e,t,n){return e(Be(t,n))});const Kt=R(null);const Wt=at(Kt);function Ht(e){return Ht="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},Ht(e)}const Xt=function(e){return"object"===Ht(e)};const Yt=g(1,Ct(Wt,Xt));var Zt=Mt(F,Tt("Object")),Qt=Mt(bt,R(bt(Object))),en=Ut(Ct(Vt,Qt),["constructor"]);const tn=g(1,function(e){if(!Yt(e)||!Zt(e))return!1;var t=Object.getPrototypeOf(e);return!!Kt(t)||en(t)});class nn extends i.g${constructor(){super(),this.register("annotation",J),this.register("comment",q),this.register("parseResult",K),this.register("sourceMap",H)}}const rn=new nn,sn=e=>{const t=new nn;return tn(e)&&t.use(e),t},on=rn,cn=()=>({predicates:{...e},namespace:on});const an=g(1,Mt(F,Tt("String")));const un=class extends xe{constructor(e,t){if(super(e,t),null!=t&&"object"==typeof t){const{cause:e,...n}=t;Object.assign(this,n)}}},ln=(e,t,n)=>{const r=e[t];if(null!=r){if(!n&&"function"==typeof r)return r;const e=n?r.leave:r.enter;if("function"==typeof e)return e}else{const r=n?e.leave:e.enter;if(null!=r){if("function"==typeof r)return r;const e=r[t];if("function"==typeof e)return e}}return null},hn={},fn=e=>e?.type,pn=e=>"string"==typeof fn(e),mn=e=>Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e)),dn=(e,{visitFnGetter:t=ln,nodeTypeGetter:n=fn,breakSymbol:r=hn,deleteNodeSymbol:s=null,skipVisitingNodeSymbol:i=!1,exposeEdits:o=!1}={})=>{const c=Symbol("skip"),a=new Array(e.length).fill(c);return{enter(u,l,h,f,p,m){let d=u,y=!1;const v={...m,replaceWith(e,t){m.replaceWith(e,t),d=e}};for(let u=0;u<e.length;u+=1)if(a[u]===c){const c=t(e[u],n(d),!1);if("function"==typeof c){const t=c.call(e[u],d,l,h,f,p,v);if("function"==typeof t?.then)throw new un("Async visitor not supported in sync mode",{visitor:e[u],visitFn:c});if(t===i)a[u]=d;else if(t===r)a[u]=r;else{if(t===s)return t;if(void 0!==t){if(!o)return t;d=t,y=!0}}}}return y?d:void 0},leave(s,o,u,l,h,f){let p=s;const m={...f,replaceWith(e,t){f.replaceWith(e,t),p=e}};for(let s=0;s<e.length;s+=1)if(a[s]===c){const c=t(e[s],n(p),!0);if("function"==typeof c){const t=c.call(e[s],p,o,u,l,h,m);if("function"==typeof t?.then)throw new un("Async visitor not supported in sync mode",{visitor:e[s],visitFn:c});if(t===r)a[s]=r;else if(void 0!==t&&t!==i)return t}}else a[s]===p&&(a[s]=c)}}};dn[Symbol.for("nodejs.util.promisify.custom")]=(e,{visitFnGetter:t=ln,nodeTypeGetter:n=fn,breakSymbol:r=hn,deleteNodeSymbol:s=null,skipVisitingNodeSymbol:i=!1,exposeEdits:o=!1}={})=>{const c=Symbol("skip"),a=new Array(e.length).fill(c);return{async enter(u,l,h,f,p,m){let d=u,y=!1;const v={...m,replaceWith(e,t){m.replaceWith(e,t),d=e}};for(let u=0;u<e.length;u+=1)if(a[u]===c){const c=t(e[u],n(d),!1);if("function"==typeof c){const t=await c.call(e[u],d,l,h,f,p,v);if(t===i)a[u]=d;else if(t===r)a[u]=r;else{if(t===s)return t;if(void 0!==t){if(!o)return t;d=t,y=!0}}}}return y?d:void 0},async leave(s,o,u,l,h,f){let p=s;const m={...f,replaceWith(e,t){f.replaceWith(e,t),p=e}};for(let s=0;s<e.length;s+=1)if(a[s]===c){const c=t(e[s],n(p),!0);if("function"==typeof c){const t=await c.call(e[s],p,o,u,l,h,m);if(t===r)a[s]=r;else if(void 0!==t&&t!==i)return t}}else a[s]===p&&(a[s]=c)}}};const yn=(e,t,{keyMap:n=null,state:r={},breakSymbol:s=hn,deleteNodeSymbol:i=null,skipVisitingNodeSymbol:o=!1,visitFnGetter:c=ln,nodeTypeGetter:a=fn,nodePredicate:u=pn,nodeCloneFn:l=mn,detectCycles:h=!0}={})=>{const f=n||{};let p,m,d=Array.isArray(e),y=[e],v=-1,b=[],g=e;const E=[],j=[];do{v+=1;const e=v===y.length;let n;const O=e&&0!==b.length;if(e){if(n=0===j.length?void 0:E.pop(),g=m,m=j.pop(),O)if(d){g=g.slice();let e=0;for(const[t,n]of b){const r=t-e;n===i?(g.splice(r,1),e+=1):g[r]=n}}else{g=l(g);for(const[e,t]of b)g[e]=t}v=p.index,y=p.keys,b=p.edits,d=p.inArray,p=p.prev}else if(m!==i&&void 0!==m){if(n=d?v:y[v],g=m[n],g===i||void 0===g)continue;E.push(n)}let S;if(!Array.isArray(g)){if(!u(g))throw new un(`Invalid AST Node: ${String(g)}`,{node:g});if(h&&j.includes(g)){E.pop();continue}const i=c(t,a(g),e);if(i){for(const[e,n]of Object.entries(r))t[e]=n;const s={replaceWith(t,r){"function"==typeof r?r(t,g,n,m,E,j):m&&(m[n]=t),e||(g=t)}};S=i.call(t,g,n,m,E,j,s)}if("function"==typeof S?.then)throw new un("Async visitor not supported in sync mode",{visitor:t,visitFn:i});if(S===s)break;if(S===o){if(!e){E.pop();continue}}else if(void 0!==S&&(b.push([n,S]),!e)){if(!u(S)){E.pop();continue}g=S}}void 0===S&&O&&b.push([n,g]),e||(p={inArray:d,index:v,keys:y,edits:b,prev:p},d=Array.isArray(g),y=d?g:f[a(g)]??[],v=-1,b=[],m!==i&&void 0!==m&&j.push(m),m=g)}while(void 0!==p);return 0!==b.length?b.at(-1)[1]:e};yn[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,{keyMap:n=null,state:r={},breakSymbol:s=hn,deleteNodeSymbol:i=null,skipVisitingNodeSymbol:o=!1,visitFnGetter:c=ln,nodeTypeGetter:a=fn,nodePredicate:u=pn,nodeCloneFn:l=mn,detectCycles:h=!0}={})=>{const f=n||{};let p,m,d=Array.isArray(e),y=[e],v=-1,b=[],g=e;const E=[],j=[];do{v+=1;const e=v===y.length;let n;const O=e&&0!==b.length;if(e){if(n=0===j.length?void 0:E.pop(),g=m,m=j.pop(),O)if(d){g=g.slice();let e=0;for(const[t,n]of b){const r=t-e;n===i?(g.splice(r,1),e+=1):g[r]=n}}else{g=l(g);for(const[e,t]of b)g[e]=t}v=p.index,y=p.keys,b=p.edits,d=p.inArray,p=p.prev}else if(m!==i&&void 0!==m){if(n=d?v:y[v],g=m[n],g===i||void 0===g)continue;E.push(n)}let S;if(!Array.isArray(g)){if(!u(g))throw new un(`Invalid AST Node: ${String(g)}`,{node:g});if(h&&j.includes(g)){E.pop();continue}const i=c(t,a(g),e);if(i){for(const[e,n]of Object.entries(r))t[e]=n;const s={replaceWith(t,r){"function"==typeof r?r(t,g,n,m,E,j):m&&(m[n]=t),e||(g=t)}};S=await i.call(t,g,n,m,E,j,s)}if(S===s)break;if(S===o){if(!e){E.pop();continue}}else if(void 0!==S&&(b.push([n,S]),!e)){if(!u(S)){E.pop();continue}g=S}}void 0===S&&O&&b.push([n,g]),e||(p={inArray:d,index:v,keys:y,edits:b,prev:p},d=Array.isArray(g),y=d?g:f[a(g)]??[],v=-1,b=[],m!==i&&void 0!==m&&j.push(m),m=g)}while(void 0!==p);return 0!==b.length?b.at(-1)[1]:e};const vn=class extends un{value;constructor(e,t){super(e,t),void 0!==t&&(this.value=t.value)}};const bn=class extends vn{};const gn=class extends vn{},En=(e,t={})=>{const{visited:n=new WeakMap}=t,r={...t,visited:n};if(n.has(e))return n.get(e);if(e instanceof i.KeyValuePair){const{key:t,value:s}=e,o=ne(t)?En(t,r):t,c=ne(s)?En(s,r):s,a=new i.KeyValuePair(o,c);return n.set(e,a),a}if(e instanceof i.ot){const t=e=>En(e,r),s=[...e].map(t),o=new i.ot(s);return n.set(e,o),o}if(e instanceof i.G6){const t=e=>En(e,r),s=[...e].map(t),o=new i.G6(s);return n.set(e,o),o}if(ne(e)){const t=Sn(e);if(n.set(e,t),e.content)if(ne(e.content))t.content=En(e.content,r);else if(e.content instanceof i.KeyValuePair)t.content=En(e.content,r);else if(Array.isArray(e.content)){const n=e=>En(e,r);t.content=e.content.map(n)}else t.content=e.content;else t.content=e.content;return t}throw new bn("Value provided to cloneDeep function couldn't be cloned",{value:e})};En.safe=e=>{try{return En(e)}catch{return e}};const jn=e=>{const{key:t,value:n}=e;return new i.KeyValuePair(t,n)},On=e=>{const t=new e.constructor;if(t.element=e.element,e.meta.length>0&&(t._meta=En(e.meta)),e.attributes.length>0&&(t._attributes=En(e.attributes)),ne(e.content)){const n=e.content;t.content=On(n)}else Array.isArray(e.content)?t.content=[...e.content]:e.content instanceof i.KeyValuePair?t.content=jn(e.content):t.content=e.content;return t},Sn=e=>{if(e instanceof i.KeyValuePair)return jn(e);if(e instanceof i.ot)return(e=>{const t=[...e];return new i.ot(t)})(e);if(e instanceof i.G6)return(e=>{const t=[...e];return new i.G6(t)})(e);if(ne(e))return On(e);throw new gn("Value provided to cloneShallow function couldn't be cloned",{value:e})};Sn.safe=e=>{try{return Sn(e)}catch{return e}};const wn=e=>ce(e)?"ObjectElement":ae(e)?"ArrayElement":ue(e)?"MemberElement":re(e)?"StringElement":oe(e)?"BooleanElement":se(e)?"NumberElement":ie(e)?"NullElement":le(e)?"LinkElement":he(e)?"RefElement":void 0,xn=e=>ne(e)?Sn(e):mn(e),An=Mt(wn,an),kn={ObjectElement:["content"],ArrayElement:["content"],MemberElement:["key","value"],StringElement:[],BooleanElement:[],NumberElement:[],NullElement:[],RefElement:[],LinkElement:[],Annotation:[],Comment:[],ParseResultElement:["content"],SourceMap:["content"]};const Pn=(e,t,{keyMap:n=kn,...r}={})=>yn(e,t,{keyMap:n,nodeTypeGetter:wn,nodePredicate:An,nodeCloneFn:xn,...r});Pn[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,{keyMap:n=kn,...r}={})=>yn[Symbol.for("nodejs.util.promisify.custom")](e,t,{keyMap:n,nodeTypeGetter:wn,nodePredicate:An,nodeCloneFn:xn,...r});const _n={toolboxCreator:cn,visitorOptions:{nodeTypeGetter:wn,exposeEdits:!0}},Mn=(e,t,n={})=>{if(0===t.length)return e;const r=Ve(_n,n),{toolboxCreator:s,visitorOptions:i}=r,o=s(),c=t.map(e=>e(o)),a=dn(c.map(Je({},"visitor")),{...i});c.forEach(Gt(["pre"],[]));const u=Pn(e,a,i);return c.forEach(Gt(["post"],[])),u};Mn[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,n={})=>{if(0===t.length)return e;const r=Ve(_n,n),{toolboxCreator:s,visitorOptions:i}=r,o=s(),c=t.map(e=>e(o)),a=dn[Symbol.for("nodejs.util.promisify.custom")],u=Pn[Symbol.for("nodejs.util.promisify.custom")],l=a(c.map(Je({},"visitor")),{...i});await Promise.allSettled(c.map(Gt(["pre"],[])));const h=await u(e,l,i);return await Promise.allSettled(c.map(Gt(["post"],[]))),h};const Nn=(e,{Type:t,plugins:n=[]})=>{const r=new t(e);return ne(e)&&(e.meta.length>0&&(r.meta=En(e.meta)),e.attributes.length>0&&(r.attributes=En(e.attributes))),Mn(r,n,{toolboxCreator:cn,visitorOptions:{nodeTypeGetter:wn}})},Tn=e=>(t,n={})=>Nn(t,{...n,Type:e});i.Sh.refract=Tn(i.Sh),i.wE.refract=Tn(i.wE),i.Om.refract=Tn(i.Om),i.bd.refract=Tn(i.bd),i.Os.refract=Tn(i.Os),i.kT.refract=Tn(i.kT),i.Ft.refract=Tn(i.Ft),i.sI.refract=Tn(i.sI),J.refract=Tn(J),q.refract=Tn(q),K.refract=Tn(K),H.refract=Tn(H);class Fn extends i.Sh{constructor(e,t,n){super(e,t,n),this.element="JSONSchemaDraft4"}get idProp(){return this.get("id")}set idProp(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 items(){return this.get("items")}set items(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 links(){return this.get("links")}set links(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 $n=Fn;class Vn extends i.Sh{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 Rn=Vn;class In extends i.Sh{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 Dn=In;class Cn extends i.Sh{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 Jn=Cn;const Bn=a(function(e,t){return We(function(n,r){return n[r]=e(t[r],r,t),n},{},T(t))});const qn=c(function(e){return null==e});var zn=a(function(e,t){if(0===e.length||qn(t))return!1;for(var n=t,r=0;r<e.length;){if(qn(n)||!S(e[r],n))return!1;n=n[e[r]],r+=1}return!0});const Ln=zn;var Gn=a(function(e,t){return Ln([e],t)});const Un=Gn;const Kn=Ne(function(e,t,n){return e(Ce(t,n))});const Wn=c(function(e){return g(e.length,e)});const Hn=a(function(e,t){return g(e+1,function(){var n=arguments[e];if(null!=n&&It(n[t]))return n[t].apply(n,Array.prototype.slice.call(arguments,0,e));throw new TypeError(bt(n)+' does not have a method named "'+t+'"')})});const Xn=Hn(1,"split");var Yn=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=f,e.prototype["@@transducer/result"]=p,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 Zn(e){return function(t){return new Yn(e,t)}}const Qn=a(l(["dropWhile"],Zn,function(e,t){for(var n=0,r=t.length;n<r&&e(t[n]);)n+=1;return Le(n,1/0,t)}));const er=Hn(1,"join");const tr=Wn(function(e,t){return Mt(Xn(""),Qn(D(e)),er(""))(t)}),nr=(e,t)=>{const n=Re(e,t);return Bn(e=>{if(tn(e)&&Un("$ref",e)&&Kn(an,"$ref",e)){const t=qe(["$ref"],e),r=tr("#/",t);return qe(r.split("/"),n)}return tn(e)?nr(e,n):e},e)};const rr=function(){return!0},sr=e=>"string"==typeof e?.type?e.type:wn(e),ir={EphemeralObject:["content"],EphemeralArray:["content"],...kn},or=(e,t,{keyMap:n=ir,...r}={})=>Pn(e,t,{keyMap:n,nodeTypeGetter:sr,nodePredicate:rr,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...r});or[Symbol.for("nodejs.util.promisify.custom")]=async(e,{keyMap:t=ir,...n}={})=>Pn[Symbol.for("nodejs.util.promisify.custom")](e,visitor,{keyMap:t,nodeTypeGetter:sr,nodePredicate:rr,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...n});const cr=class{type="EphemeralArray";content=[];reference=void 0;constructor(e){this.content=e,this.reference=[]}toReference(){return this.reference}toArray(){return this.reference.push(...this.content),this.reference}};const ar=class{type="EphemeralObject";content=[];reference=void 0;constructor(e){this.content=e,this.reference={}}toReference(){return this.reference}toObject(){return Object.assign(this.reference,Object.fromEntries(this.content))}};class ur{ObjectElement={enter:e=>{if(this.references.has(e))return this.references.get(e).toReference();const t=new ar(e.content);return this.references.set(e,t),t}};EphemeralObject={leave:e=>e.toObject()};MemberElement={enter:e=>[e.key,e.value]};ArrayElement={enter:e=>{if(this.references.has(e))return this.references.get(e).toReference();const t=new cr(e.content);return this.references.set(e,t),t}};EphemeralArray={leave:e=>e.toArray()};references=new WeakMap;BooleanElement(e){return e.toValue()}NumberElement(e){return e.toValue()}StringElement(e){return e.toValue()}NullElement(){return null}RefElement(e,...t){const n=t[3];return"EphemeralObject"===n[n.length-1]?.type?Symbol.for("delete-node"):String(e.toValue())}LinkElement(e){return re(e.href)?e.href.toValue():""}}const lr=e=>ne(e)?re(e)||se(e)||oe(e)||ie(e)?e.toValue():or(e,new ur):e,hr=e=>{const t=e.meta.length>0?En(e.meta):void 0,n=e.attributes.length>0?En(e.attributes):void 0;return new e.constructor(void 0,t,n)},fr=(e,t)=>t.clone&&t.isMergeableElement(e)?mr(hr(e),e,t):e,pr={clone:!0,isMergeableElement:e=>ce(e)||ae(e),arrayElementMerge:(e,t,n)=>e.concat(t)["fantasy-land/map"](e=>fr(e,n)),objectElementMerge:(e,t,n)=>{const r=ce(e)?hr(e):hr(t);return ce(e)&&e.forEach((e,t,s)=>{const i=Sn(s);i.value=fr(e,n),r.content.push(i)}),t.forEach((t,s,i)=>{const o=lr(s);let c;if(ce(e)&&e.hasKey(o)&&n.isMergeableElement(t)){const r=e.get(o);c=Sn(i),c.value=((e,t)=>{if("function"!=typeof t.customMerge)return mr;const n=t.customMerge(e,t);return"function"==typeof n?n:mr})(s,n)(r,t,n)}else c=Sn(i),c.value=fr(t,n);r.remove(o),r.content.push(c)}),r},customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0},mr=(e,t,n)=>{const r={...pr,...n};r.isMergeableElement=r.isMergeableElement??pr.isMergeableElement,r.arrayElementMerge=r.arrayElementMerge??pr.arrayElementMerge,r.objectElementMerge=r.objectElementMerge??pr.objectElementMerge;const s=ae(t);if(!(s===ae(e)))return fr(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=>En(e):e.customMetaMerge)(r)(e.meta,t.meta),i.attributes=(e=>"function"!=typeof e.customAttributesMerge?e=>En(e):e.customAttributesMerge)(r)(e.attributes,t.attributes),i};mr.all=(e,t)=>{if(!Array.isArray(e))throw new TypeError("First argument of deepmerge should be an array.");return 0===e.length?new i.Sh:e.reduce((e,n)=>mr(e,n,t),hr(e[0]))};const dr=mr;const yr=class{element;constructor(e){Object.assign(this,e)}copyMetaAndAttributes(e,t){(e.meta.length>0||t.meta.length>0)&&(t.meta=dr(t.meta,e.meta),ve(e)&&t.meta.set("sourceMap",e.meta.get("sourceMap"))),(e.attributes.length>0||e.meta.length>0)&&(t.attributes=dr(t.attributes,e.attributes))}};const vr=class extends yr{enter(e){return this.element=En(e),hn}},br=(e,t,n=[])=>{const r=Object.getOwnPropertyDescriptors(t);for(let e of n)delete r[e];Object.defineProperties(e,r)},gr=(e,t=[e])=>{const n=Object.getPrototypeOf(e);return null===n?t:gr(n,[...t,n])},Er=(e,t,n=[])=>{var r;const s=null!==(r=((...e)=>{if(0===e.length)return;let t;const n=e.map(e=>gr(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=gr(s);for(let t of e){let e=gr(t);for(let t=e.length-1;t>=0;t--){let r=e[t];-1===o.indexOf(r)&&(br(i,r,["constructor",...n]),o.push(r))}}return i.constructor=t,i},jr=e=>e.filter((t,n)=>e.indexOf(t)==n),Or=(e,t)=>{const n=t.map(e=>gr(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++}},Sr=(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(Or(n,e)||{},n),defineProperty(){throw new Error("Cannot define new properties on Proxies created by ts-mixer")},has:(n,r)=>void 0!==Or(r,e)||void 0!==t[r],get:(n,r)=>(Or(r,e)||t)[r],set(t,n,r){const s=Or(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)))}),wr=null,xr="copy",Ar="copy",kr="deep",Pr=new WeakMap,_r=e=>Pr.get(e),Mr=(e,t)=>{var n,r;const s=jr([...Object.getOwnPropertyNames(e),...Object.getOwnPropertyNames(t)]),i={};for(let o of s)i[o]=jr([...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},Nr=(e,t)=>{var n,r,s,i;return{property:Mr(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:Mr(null!==(s=null==e?void 0:e.method)&&void 0!==s?s:{},null!==(i=null==t?void 0:t.method)&&void 0!==i?i:{})}},Tr=(e,t)=>{var n,r,s,i,o,c;return{class:jr([...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:Nr(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:Nr(null!==(o=null==e?void 0:e.instance)&&void 0!==o?o:{},null!==(c=null==t?void 0:t.instance)&&void 0!==c?c:{})}},Fr=new Map,$r=(...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=[...gr(e.prototype).map(e=>e.constructor),...null!==(t=_r(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=>Fr.get(e)).filter(e=>!!e);return 0==t.length?{}:1==t.length?t[0]:t.reduce((e,t)=>Tr(e,t))},Vr=e=>{let t=Fr.get(e);return t||(t={},Fr.set(e,t)),t};function Rr(...e){var t,n,r;const s=e.map(e=>e.prototype),i=wr;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)br(this,new n(...t));null!==i&&"function"==typeof this[i]&&this[i].apply(this,t)}var c,a;o.prototype="copy"===Ar?Er(s,o):(c=s,a=o,Sr([...c,{constructor:a}])),Object.setPrototypeOf(o,"copy"===xr?Er(e,null,["prototype"]):Sr(e,Function.prototype));let u=o;if("none"!==kr){const s="deep"===kr?$r(...e):((...e)=>{const t=e.map(e=>Vr(e));return 0===t.length?{}:1===t.length?t[0]:t.reduce((e,t)=>Tr(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)}Ir(null!==(n=null==s?void 0:s.static)&&void 0!==n?n:{},u),Ir(null!==(r=null==s?void 0:s.instance)&&void 0!==r?r:{},u.prototype)}var l,h;return l=u,h=e,Pr.set(l,h),u}const Ir=(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 Dr=c(function(e){return g(At(gt,0,Et("length",e)),function(){for(var t=0,n=e.length;t<n;){if(!e[t].apply(this,arguments))return!1;t+=1}return!0})});const Cr=c(function(e){return!qt(e)});const Jr=a(function(e,t){return e||t});var Br=at(g(1,Ct(Wt,a(function(e,t){return It(e)?function(){return e.apply(this,arguments)||t.apply(this,arguments)}:ct(Jr)(e,t)})(Xt,Vt))));const qr=Dr([an,Br,Cr]);const zr=a(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});const Lr=class extends yr{specObj;passingOptionsNames=["specObj","parent"];constructor({specObj:e,...t}){super({...t}),this.specObj=e}retrievePassingOptions(){return zr(this.passingOptionsNames,this)}retrieveFixedFields(e){const t=qe(["visitors",...e,"fixedFields"],this.specObj);return"object"==typeof t&&null!==t?Object.keys(t):[]}retrieveVisitor(e){return Ut(Vt,["visitors",...e],this.specObj)?qe(["visitors",...e],this.specObj):qe(["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 vr&&r?.constructor===vr?En(t):(Pn(t,r,n),r.element)}};const Gr=class extends Lr{specPath;ignoredFields;constructor({specPath:e,ignoredFields:t,...n}){super({...n}),this.specPath=e,this.ignoredFields=t||[]}ObjectElement(e){const t=this.specPath(e),n=this.retrieveFixedFields(t);return e.forEach((e,r,s)=>{if(re(r)&&n.includes(lr(r))&&!this.ignoredFields.includes(lr(r))){const n=this.toRefractedElement([...t,"fixedFields",lr(r)],e),o=new i.Pr(En(r),n);this.copyMetaAndAttributes(s,o),o.classes.push("fixed-field"),this.element.content.push(o)}else this.ignoredFields.includes(lr(r))||this.element.content.push(En(s))}),this.copyMetaAndAttributes(e,this.element),hn}};const Ur=class{parent;constructor({parent:e}){this.parent=e}},Kr=te(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof $n||e(r)&&t("JSONSchemaDraft4",r)&&n("object",r)),Wr=te(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof Rn||e(r)&&t("JSONReference",r)&&n("object",r)),Hr=te(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof Dn||e(r)&&t("media",r)&&n("object",r)),Xr=te(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof Jn||e(r)&&t("linkDescription",r)&&n("object",r));class Yr extends(Rr(Gr,Ur,vr)){constructor(e){super(e),this.element=new $n,this.specPath=z(["document","objects","JSONSchema"])}get defaultDialectIdentifier(){return"http://json-schema.org/draft-04/schema#"}ObjectElement(e){return this.handleDialectIdentifier(e),this.handleSchemaIdentifier(e),this.parent=this.element,Gr.prototype.ObjectElement.call(this,e)}handleDialectIdentifier(e){if(G(this.parent)&&!re(e.get("$schema")))this.element.setMetaProperty("inheritedDialectIdentifier",this.defaultDialectIdentifier);else if(Kr(this.parent)&&!re(e.get("$schema"))){const e=Re(lr(this.parent.meta.get("inheritedDialectIdentifier")),lr(this.parent.$schema));this.element.setMetaProperty("inheritedDialectIdentifier",e)}}handleSchemaIdentifier(e,t="id"){const n=void 0!==this.parent?En(this.parent.getMetaProperty("ancestorsSchemaIdentifiers",[])):new i.wE,r=lr(e.get(t));qr(r)&&n.push(r),this.element.setMetaProperty("ancestorsSchemaIdentifiers",n)}}const Zr=Yr,Qr=e=>ce(e)&&e.hasKey("$ref");class es extends(Rr(Lr,Ur,vr)){ObjectElement(e){const t=Qr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"];return this.element=this.toRefractedElement(t,e),hn}ArrayElement(e){return this.element=new i.wE,this.element.classes.push("json-schema-items"),e.forEach(e=>{const t=Qr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],n=this.toRefractedElement(t,e);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),hn}}const ts=es;const ns=class extends vr{ArrayElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-required"),t}};const rs=function(){return!1};const ss=class extends Lr{specPath;ignoredFields;fieldPatternPredicate=rs;constructor({specPath:e,ignoredFields:t,fieldPatternPredicate:n,...r}){super({...r}),this.specPath=e,this.ignoredFields=t||[],"function"==typeof n&&(this.fieldPatternPredicate=n)}ObjectElement(e){return e.forEach((e,t,n)=>{if(!this.ignoredFields.includes(lr(t))&&this.fieldPatternPredicate(lr(t))){const r=this.specPath(e),s=this.toRefractedElement(r,e),o=new i.Pr(En(t),s);this.copyMetaAndAttributes(n,o),o.classes.push("patterned-field"),this.element.content.push(o)}else this.ignoredFields.includes(lr(t))||this.element.content.push(En(n))}),this.copyMetaAndAttributes(e,this.element),hn}};const is=class extends ss{constructor(e){super(e),this.fieldPatternPredicate=qr}};class os extends(Rr(is,Ur,vr)){constructor(e){super(e),this.element=new i.Sh,this.element.classes.push("json-schema-properties"),this.specPath=e=>Qr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}const cs=os;class as extends(Rr(is,Ur,vr)){constructor(e){super(e),this.element=new i.Sh,this.element.classes.push("json-schema-patternProperties"),this.specPath=e=>Qr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}const us=as;class ls extends(Rr(is,Ur,vr)){constructor(e){super(e),this.element=new i.Sh,this.element.classes.push("json-schema-dependencies"),this.specPath=e=>Qr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}const hs=ls;const fs=class extends vr{ArrayElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-enum"),t}};const ps=class extends vr{StringElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-type"),t}ArrayElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-type"),t}};class ms extends(Rr(Lr,Ur,vr)){constructor(e){super(e),this.element=new i.wE,this.element.classes.push("json-schema-allOf")}ArrayElement(e){return e.forEach(e=>{const t=Qr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],n=this.toRefractedElement(t,e);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),hn}}const ds=ms;class ys extends(Rr(Lr,Ur,vr)){constructor(e){super(e),this.element=new i.wE,this.element.classes.push("json-schema-anyOf")}ArrayElement(e){return e.forEach(e=>{const t=Qr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],n=this.toRefractedElement(t,e);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),hn}}const vs=ys;class bs extends(Rr(Lr,Ur,vr)){constructor(e){super(e),this.element=new i.wE,this.element.classes.push("json-schema-oneOf")}ArrayElement(e){return e.forEach(e=>{const t=Qr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],n=this.toRefractedElement(t,e);this.element.push(n)}),this.copyMetaAndAttributes(e,this.element),hn}}const gs=bs;class Es extends(Rr(is,Ur,vr)){constructor(e){super(e),this.element=new i.Sh,this.element.classes.push("json-schema-definitions"),this.specPath=e=>Qr(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}const js=Es;class Os extends(Rr(Lr,Ur,vr)){constructor(e){super(e),this.element=new i.wE,this.element.classes.push("json-schema-links")}ArrayElement(e){return e.forEach(e=>{const t=this.toRefractedElement(["document","objects","LinkDescription"],e);this.element.push(t)}),this.copyMetaAndAttributes(e,this.element),hn}}const Ss=Os;class ws extends(Rr(Gr,vr)){constructor(e){super(e),this.element=new Rn,this.specPath=z(["document","objects","JSONReference"])}ObjectElement(e){const t=Gr.prototype.ObjectElement.call(this,e);return re(this.element.$ref)&&this.element.classes.push("reference-element"),t}}const xs=ws;const As=class extends vr{StringElement(e){const t=this.enter(e);return this.element.classes.push("reference-value"),t}};const ks=Ne(function(e,t,n){return g(Math.max(e.length,t.length,n.length),function(){return e.apply(this,arguments)?t.apply(this,arguments):n.apply(this,arguments)})});const Ps=c(function(e){return function(t,n){return e(t,n)?-1:e(n,t)?1:0}});var _s=a(function(e,t){return Array.prototype.slice.call(t,0).sort(e)});const Ms=_s;const Ns=c(function(e){return Ee(0,e)});const Ts=c(h);const Fs=at(qn);const $s=Ct(zt,Cr);function Vs(e){return function(e){if(Array.isArray(e))return Rs(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 Rs(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)?Rs(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 Rs(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 Is=Mt(Ms(Ps(function(e,t){return e.length>t.length})),Ns,Ce("length")),Ds=Wn(function(e,t,n){var r=n.apply(void 0,Vs(e));return Fs(r)?Ts(r):t});const Cs=ks($s,function(e){var t=Is(e);return g(t,function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return At(Ds(n),void 0,e)})},L);const Js=class extends Lr{alternator;constructor({alternator:e,...t}){super({...t}),this.alternator=e}enter(e){const t=this.alternator.map(({predicate:e,specPath:t})=>ks(e,z(t),L)),n=Cs(t)(e);return this.element=this.toRefractedElement(n,e),hn}};const Bs=class extends Js{constructor(e){super(e),this.alternator=[{predicate:Qr,specPath:["document","objects","JSONReference"]},{predicate:rr,specPath:["document","objects","JSONSchema"]}]}};class qs extends(Rr(Gr,vr)){constructor(e){super(e),this.element=new Dn,this.specPath=z(["document","objects","Media"])}}const zs=qs;class Ls extends(Rr(Gr,vr)){constructor(e){super(e),this.element=new Jn,this.specPath=z(["document","objects","LinkDescription"])}}const Gs=Ls,Us={visitors:{value:vr,JSONSchemaOrJSONReferenceVisitor:Bs,document:{objects:{JSONSchema:{$visitor:Zr,fixedFields:{id:{$ref:"#/visitors/value"},$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:Bs,items:ts,maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:ns,properties:cs,additionalProperties:Bs,patternProperties:us,dependencies:hs,enum:fs,type:ps,allOf:ds,anyOf:vs,oneOf:gs,not:Bs,definitions:js,title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},format:{$ref:"#/visitors/value"},base:{$ref:"#/visitors/value"},links:Ss,media:{$ref:"#/visitors/document/objects/Media"},readOnly:{$ref:"#/visitors/value"}}},JSONReference:{$visitor:xs,fixedFields:{$ref:As}},Media:{$visitor:zs,fixedFields:{binaryEncoding:{$ref:"#/visitors/value"},type:{$ref:"#/visitors/value"}}},LinkDescription:{$visitor:Gs,fixedFields:{href:{$ref:"#/visitors/value"},rel:{$ref:"#/visitors/value"},title:{$ref:"#/visitors/value"},targetSchema:Bs,mediaType:{$ref:"#/visitors/value"},method:{$ref:"#/visitors/value"},encType:{$ref:"#/visitors/value"},schema:Bs}}}}}},Ks=e=>{if(ne(e))return`${e.element.charAt(0).toUpperCase()+e.element.slice(1)}Element`},Ws={JSONSchemaDraft4Element:["content"],JSONReferenceElement:["content"],MediaElement:["content"],LinkDescriptionElement:["content"],...kn},Hs={namespace:e=>{const{base:t}=e;return t.register("jSONSchemaDraft4",$n),t.register("jSONReference",Rn),t.register("media",Dn),t.register("linkDescription",Jn),t}},Xs=()=>{const e=sn(Hs);return{predicates:{...t,isStringElement:re},namespace:e}},Ys=(e,{specPath:t=["visitors","document","objects","JSONSchema","$visitor"],plugins:n=[],specificationObj:r=Us}={})=>{const s=(0,i.e)(e),o=nr(r),c=new(qe(t,o))({specObj:o});return Pn(s,c),Mn(c.element,n,{toolboxCreator:Xs,visitorOptions:{keyMap:Ws,nodeTypeGetter:Ks}})},Zs=e=>(t,n={})=>Ys(t,{specPath:e,...n});$n.refract=Zs(["visitors","document","objects","JSONSchema","$visitor"]),Rn.refract=Zs(["visitors","document","objects","JSONReference","$visitor"]),Dn.refract=Zs(["visitors","document","objects","Media","$visitor"]),Jn.refract=Zs(["visitors","document","objects","LinkDescription","$visitor"]);const Qs=class extends $n{constructor(e,t,n){super(e,t,n),this.element="JSONSchemaDraft6"}get idProp(){throw new Ae("id keyword from Core vocabulary has been renamed to $id.")}set idProp(e){throw new Ae("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 containsProp(){return this.get("contains")}set containsProp(e){this.set("contains",e)}get items(){return this.get("items")}set items(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 ei=class extends Jn{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 Ae("schema keyword from Hyper-Schema vocabulary has been renamed to submissionSchema.")}set schema(e){throw new Ae("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 Ae("method keyword from Hyper-Schema vocabulary has been removed.")}set method(e){throw new Ae("method keyword from Hyper-Schema vocabulary has been removed.")}get encType(){throw new Ae("encType keyword from Hyper-Schema vocabulary has been renamed to submissionEncType.")}set encType(e){throw new Ae("encType keyword from Hyper-Schema vocabulary has been renamed to submissionEncType.")}get submissionEncType(){return this.get("submissionEncType")}set submissionEncType(e){this.set("submissionEncType",e)}},ti={namespace:e=>{const{base:t}=e;return t.register("jSONSchemaDraft6",Qs),t.register("jSONReference",Rn),t.register("media",Dn),t.register("linkDescription",ei),t}},ni={JSONSchemaDraft6Element:{additionalItems:(...e)=>new Qs(...e),items:(...e)=>new Qs(...e),contains:(...e)=>new Qs(...e),required(...e){const t=new i.wE(...e);return t.classes.push("json-schema-required"),t},properties(...e){const t=new i.Sh(...e);return t.classes.push("json-schema-properties"),t},additionalProperties:(...e)=>new Qs(...e),patternProperties(...e){const t=new i.Sh(...e);return t.classes.push("json-schema-patternProperties"),t},dependencies(...e){const t=new i.Sh(...e);return t.classes.push("json-schema-dependencies"),t},propertyNames:(...e)=>new Qs(...e),enum(...e){const t=new i.wE(...e);return t.classes.push("json-schema-enum"),t},allOf(...e){const t=new i.wE(...e);return t.classes.push("json-schema-allOf"),t},anyOf(...e){const t=new i.wE(...e);return t.classes.push("json-schema-anyOf"),t},oneOf(...e){const t=new i.wE(...e);return t.classes.push("json-schema-oneOf"),t},not:(...e)=>new Qs(...e),definitions(...e){const t=new i.Sh(...e);return t.classes.push("json-schema-definitions"),t},examples(...e){const t=new i.wE(...e);return t.classes.push("json-schema-examples"),t},links(...e){const t=new i.wE(...e);return t.classes.push("json-schema-links"),t},media:(...e)=>new Dn(...e)},LinkDescriptionElement:{hrefSchema:(...e)=>new Qs(...e),targetSchema:(...e)=>new Qs(...e),submissionSchema:(...e)=>new Qs(...e)},"json-schema-properties":{"[key: *]":function(...e){return new Qs(...e)}},"json-schema-patternProperties":{"[key: *]":function(...e){return new Qs(...e)}},"json-schema-dependencies":{"[key: *]":function(...e){return new Qs(...e)}},"json-schema-allOf":{"<*>":function(...e){return new Qs(...e)}},"json-schema-anyOf":{"<*>":function(...e){return new Qs(...e)}},"json-schema-oneOf":{"<*>":function(...e){return new Qs(...e)}},"json-schema-definitions":{"[key: *]":function(...e){return new Qs(...e)}},"json-schema-links":{"<*>":function(...e){return new ei(...e)}}},ri=(e,t)=>{const n=Ks(e),r=ni[n]||ni[lr(e.classes.first)];return void 0===r?void 0:Object.hasOwn(r,"[key: *]")?r["[key: *]"]:r[t]},si=()=>()=>({visitor:{StringElement(e,t,n,r,s){if(!(e=>re(e)&&ge(["yaml-e-node","yaml-e-scalar"],e))(e))return;const i=[...s,n].filter(ne),o=i.at(-1);let c,a;return ae(o)?(a=e,c=ri(o,"<*>")):ue(o)&&(a=i.at(-2),c=ri(a,lr(o.key))),"function"==typeof c?c.call({context:a},void 0,En(e.meta),En(e.attributes)):void 0}}});var ii=Ne(function e(t,n,r){if(0===t.length)return n;var s=t[0];if(t.length>1){var i=De(s,r);(qn(i)||"object"!=typeof i)&&(i=Ie(t[1])?[]:{}),n=e(Array.prototype.slice.call(t,1),n,i)}return function(e,t,n){if(Ie(e)&&u(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 oi=ii;const ci=Ne(function(e,t,n){var r=Array.prototype.slice.call(n,0);return r.splice(e,t),r});var ai=Ne(function(e,t,n){return oi([e],t,n)});const ui=ai;var li=a(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(Ie(e)&&u(t))return ci(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(Ie(e)&&u(t))return[].concat(t);var n={};for(var r in t)n[r]=t[r];return n}(r,n):ui(r,e(s,n[r]),n)}});const hi=li;const fi=class extends Zr{constructor(e){super(e),this.element=new Qs}get defaultDialectIdentifier(){return"http://json-schema.org/draft-06/schema#"}BooleanElement(e){const t=this.enter(e);return this.element.classes.push("boolean-json-schema"),t}handleSchemaIdentifier(e,t="$id"){return super.handleSchemaIdentifier(e,t)}};const pi=class extends ts{BooleanElement(e){return this.element=this.toRefractedElement(["document","objects","JSONSchema"],e),hn}};const mi=class extends vr{ArrayElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-examples"),t}};const di=class extends Gs{constructor(e){super(e),this.element=new ei}},yi=Mt(oi(["visitors","document","objects","JSONSchema","$visitor"],fi),hi(["visitors","document","objects","JSONSchema","fixedFields","id"]),oi(["visitors","document","objects","JSONSchema","fixedFields","$id"],Us.visitors.value),oi(["visitors","document","objects","JSONSchema","fixedFields","contains"],Us.visitors.JSONSchemaOrJSONReferenceVisitor),oi(["visitors","document","objects","JSONSchema","fixedFields","items"],pi),oi(["visitors","document","objects","JSONSchema","fixedFields","propertyNames"],Us.visitors.JSONSchemaOrJSONReferenceVisitor),oi(["visitors","document","objects","JSONSchema","fixedFields","const"],Us.visitors.value),oi(["visitors","document","objects","JSONSchema","fixedFields","examples"],mi),oi(["visitors","document","objects","LinkDescription","$visitor"],di),oi(["visitors","document","objects","LinkDescription","fixedFields","hrefSchema"],Us.visitors.JSONSchemaOrJSONReferenceVisitor),hi(["visitors","document","objects","LinkDescription","fixedFields","schema"]),oi(["visitors","document","objects","LinkDescription","fixedFields","submissionSchema"],Us.visitors.JSONSchemaOrJSONReferenceVisitor),hi(["visitors","document","objects","LinkDescription","fixedFields","method"]),hi(["visitors","document","objects","LinkDescription","fixedFields","encType"]),oi(["visitors","document","objects","LinkDescription","fixedFields","submissionEncType"],Us.visitors.value))(Us),vi={JSONSchemaDraft6Element:["content"],JSONReferenceElement:["content"],MediaElement:["content"],LinkDescriptionElement:["content"],...kn},bi=te(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof Qs||e(r)&&t("JSONSchemaDraft6",r)&&n("object",r)),gi=te(({hasBasicElementProps:e,isElementType:t,primitiveEq:n})=>r=>r instanceof ei||e(r)&&t("linkDescription",r)&&n("object",r)),Ei=()=>{const e=sn(ti);return{predicates:{...s,isStringElement:re},namespace:e}},ji=(e,{specPath:t=["visitors","document","objects","JSONSchema","$visitor"],plugins:n=[],specificationObj:r=yi}={})=>{const s=(0,i.e)(e),o=nr(r),c=new(qe(t,o))({specObj:o});return Pn(s,c),Mn(c.element,n,{toolboxCreator:Ei,visitorOptions:{keyMap:vi,nodeTypeGetter:Ks}})},Oi=e=>(t,n={})=>ji(t,{specPath:e,...n}),Si=ji})(),r})());
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.apidomNsJSONSchemaDraft6=t():e.apidomNsJSONSchemaDraft6=t()}(self,()=>(()=>{"use strict";var e={d:(t,s)=>{for(var n in s)e.o(s,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:s[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{AlternatingVisitor:()=>Fr,FallbackVisitor:()=>ws,FixedFieldsVisitor:()=>dn,ItemsVisitor:()=>wi,JSONReferenceElement:()=>It,JSONSchemaDraft6MediaTypes:()=>m,JSONSchemaElement:()=>Lr,JSONSchemaVisitor:()=>vi,LinkDescriptionElement:()=>_r,LinkDescriptionVisitor:()=>ki,MapVisitor:()=>Bn,MediaElement:()=>Tt,ParentSchemaAwareVisitor:()=>$n,PatternedFieldsVisitor:()=>Dn,SpecificationVisitor:()=>hn,Visitor:()=>vs,default:()=>qr,isJSONReferenceElement:()=>Kn,isJSONReferenceLikeElement:()=>er,isJSONSchemaElement:()=>Ei,isLinkDescriptionElement:()=>Ai,isMediaElement:()=>Zn,mediaTypes:()=>f,refract:()=>Fi,refractJSONSchema:()=>Ti,refractLinkDescription:()=>Mi,refractorPluginReplaceEmptyElement:()=>Hr,specificationObj:()=>Si});var s={};function n(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function r(e){return function t(s){return 0===arguments.length||n(s)?t:e.apply(this,arguments)}}function i(e,t){return t[e<0?t.length+e:e]}e.r(s),e.d(s,{isJSONReferenceElement:()=>Kn,isJSONSchemaElement:()=>Ei,isLinkDescriptionElement:()=>Ai,isMediaElement:()=>Zn});const o=r(function(e){return i(-1,e)});class c extends AggregateError{constructor(e,t,s){super(e,t,s),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const a=c;class l extends Error{static[Symbol.hasInstance](e){return super[Symbol.hasInstance](e)||Function.prototype[Symbol.hasInstance].call(a,e)}constructor(e,t){super(e,t),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const u=l;const 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-06",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-06","application/schema+json;version=draft-06","application/schema+yaml;version=draft-06");function y(e,t,s){for(var n=0,r=s.length;n<r;)t=e(t,s[n]),n+=1;return t}function g(e){return function t(s,i){switch(arguments.length){case 0:return t;case 1:return n(s)?t:r(function(t){return e(s,t)});default:return n(s)&&n(i)?t:n(s)?r(function(t){return e(t,i)}):n(i)?r(function(t){return e(s,t)}):e(s,i)}}}function x(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var b=Object.prototype.toString;const v=function(){return"[object Arguments]"===b.call(arguments)?function(e){return"[object Arguments]"===b.call(e)}:function(e){return x("callee",e)}}();var w=!{toString:null}.propertyIsEnumerable("toString"),O=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],k=function(){return arguments.propertyIsEnumerable("length")}(),S=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||k?r(function(e){if(Object(e)!==e)return[];var t,s,n=[],r=k&&v(e);for(t in e)!x(t,e)||r&&"length"===t||(n[n.length]=t);if(w)for(s=O.length-1;s>=0;)x(t=O[s],e)&&!S(n,t)&&(n[n.length]=t),s-=1;return n}):r(function(e){return Object(e)!==e?[]:Object.keys(e)});const A=E;const j=g(function(e,t){return y(function(s,n){return s[n]=e(t[n],n,t),s},{},A(t))});const I=r(function(e){return null==e});var T=g(function(e,t){if(0===e.length||I(t))return!1;for(var s=t,n=0;n<e.length;){if(I(s)||!x(e[n],s))return!1;s=s[e[n]],n+=1}return!0});const M=T;var F=g(function(e,t){return M([e],t)});const N=F;function C(e){return function t(s,i,o){switch(arguments.length){case 0:return t;case 1:return n(s)?t:g(function(t,n){return e(s,t,n)});case 2:return n(s)&&n(i)?t:n(s)?g(function(t,s){return e(t,i,s)}):n(i)?g(function(t,n){return e(s,t,n)}):r(function(t){return e(s,i,t)});default:return n(s)&&n(i)&&n(o)?t:n(s)&&n(i)?g(function(t,s){return e(t,s,o)}):n(s)&&n(o)?g(function(t,s){return e(t,i,s)}):n(i)&&n(o)?g(function(t,n){return e(s,t,n)}):n(s)?r(function(t){return e(t,i,o)}):n(i)?r(function(t){return e(s,t,o)}):n(o)?r(function(t){return e(s,i,t)}):e(s,i,o)}}}const P=Number.isInteger||function(e){return(e|0)===e};const D=function(e,t){if(null!=t)return P(e)?i(e,t):t[e]};const B=g(D);const $=C(function(e,t,s){return e(B(t,s))});function L(e,t){for(var s=t,n=0;n<e.length;n+=1){if(null==s)return;var r=e[n];s=P(r)?i(r,s):s[r]}return s}const _=g(L);function q(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,s){return t.apply(this,arguments)};case 3:return function(e,s,n){return t.apply(this,arguments)};case 4:return function(e,s,n,r){return t.apply(this,arguments)};case 5:return function(e,s,n,r,i){return t.apply(this,arguments)};case 6:return function(e,s,n,r,i,o){return t.apply(this,arguments)};case 7:return function(e,s,n,r,i,o,c){return t.apply(this,arguments)};case 8:return function(e,s,n,r,i,o,c,a){return t.apply(this,arguments)};case 9:return function(e,s,n,r,i,o,c,a,l){return t.apply(this,arguments)};case 10:return function(e,s,n,r,i,o,c,a,l,u){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function R(e,t){return function(){return t.call(this,e.apply(this,arguments))}}const U=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};function H(e){return"[object String]"===Object.prototype.toString.call(e)}const V=r(function(e){return!!U(e)||!!e&&("object"==typeof e&&(!H(e)&&(0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))});var J="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function G(e,t,s){return function(n,r,i){if(V(i))return e(n,r,i);if(null==i)return r;if("function"==typeof i["fantasy-land/reduce"])return t(n,r,i,"fantasy-land/reduce");if(null!=i[J])return s(n,r,i[J]());if("function"==typeof i.next)return s(n,r,i);if("function"==typeof i.reduce)return t(n,r,i,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function z(e,t,s){for(var n=0,r=s.length;n<r;){if((t=e["@@transducer/step"](t,s[n]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n+=1}return e["@@transducer/result"](t)}const X=g(function(e,t){return q(e.length,function(){return e.apply(t,arguments)})});function W(e,t,s){for(var n=s.next();!n.done;){if((t=e["@@transducer/step"](t,n.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n=s.next()}return e["@@transducer/result"](t)}function Y(e,t,s,n){return e["@@transducer/result"](s[n](X(e["@@transducer/step"],e),t))}const K=G(z,Y,W);var Z=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}();const Q=C(function(e,t,s){return K("function"==typeof e?new Z(e):e,t,s)});function ee(e,t){return function(){var s=arguments.length;if(0===s)return t();var n=arguments[s-1];return U(n)||"function"!=typeof n[e]?t.apply(this,arguments):n[e].apply(n,Array.prototype.slice.call(arguments,0,s-1))}}const te=C(ee("slice",function(e,t,s){return Array.prototype.slice.call(s,e,t)}));const se=r(ee("tail",te(1,1/0)));function ne(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return q(arguments[0].length,Q(R,arguments[0],se(arguments)))}const re=r(function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});const ie="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var oe=function(e,t){switch(arguments.length){case 0:return oe;case 1:return function t(s){return 0===arguments.length?t:ie(e,s)};default:return ie(e,t)}};const ce=oe;function ae(e){for(var t,s=[];!(t=e.next()).done;)s.push(t.value);return s}function le(e,t,s){for(var n=0,r=s.length;n<r;){if(e(t,s[n]))return!0;n+=1}return!1}function ue(e,t,s,n){var r=ae(e);function i(e,t){return pe(e,t,s.slice(),n.slice())}return!le(function(e,t){return!le(i,t,e)},ae(t),r)}function pe(e,t,s,n){if(ie(e,t))return!0;var r,i,o=re(e);if(o!==re(t))return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(o){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(r=e.constructor,null==(i=String(r).match(/^function (\w*)/))?"":i[1]))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!ie(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!ie(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var c=s.length-1;c>=0;){if(s[c]===e)return n[c]===t;c-=1}switch(o){case"Map":return e.size===t.size&&ue(e.entries(),t.entries(),s.concat([e]),n.concat([t]));case"Set":return e.size===t.size&&ue(e.values(),t.values(),s.concat([e]),n.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var a=A(e);if(a.length!==A(t).length)return!1;var l=s.concat([e]),u=n.concat([t]);for(c=a.length-1;c>=0;){var p=a[c];if(!x(p,t)||!pe(t[p],e[p],l,u))return!1;c-=1}return!0}const he=g(function(e,t){return pe(e,t,[],[])});function de(e,t){return function(e,t,s){var n,r;if("function"==typeof e.indexOf)switch(typeof t){case"number":if(0===t){for(n=1/t;s<e.length;){if(0===(r=e[s])&&1/r===n)return s;s+=1}return-1}if(t!=t){for(;s<e.length;){if("number"==typeof(r=e[s])&&r!=r)return s;s+=1}return-1}return e.indexOf(t,s);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,s);case"object":if(null===t)return e.indexOf(t,s)}for(;s<e.length;){if(he(e[s],t))return s;s+=1}return-1}(t,e,0)>=0}function me(e,t){for(var s=0,n=t.length,r=Array(n);s<n;)r[s]=e(t[s]),s+=1;return r}function fe(e){return'"'+e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}var ye=function(e){return(e<10?"0":"")+e};const ge="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+ye(e.getUTCMonth()+1)+"-"+ye(e.getUTCDate())+"T"+ye(e.getUTCHours())+":"+ye(e.getUTCMinutes())+":"+ye(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function xe(e,t,s){return function(){if(0===arguments.length)return s();var n=arguments[arguments.length-1];if(!U(n)){for(var r=0;r<e.length;){if("function"==typeof n[e[r]])return n[e[r]].apply(n,Array.prototype.slice.call(arguments,0,-1));r+=1}if(function(e){return null!=e&&"function"==typeof e["@@transducer/step"]}(n))return t.apply(null,Array.prototype.slice.call(arguments,0,-1))(n)}return s.apply(this,arguments)}}function be(e){return"[object Object]"===Object.prototype.toString.call(e)}const ve=function(){return this.xf["@@transducer/init"]()},we=function(e){return this.xf["@@transducer/result"](e)};var Oe=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=ve,e.prototype["@@transducer/result"]=we,e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.xf["@@transducer/step"](e,t):e},e}();function ke(e){return function(t){return new Oe(e,t)}}var Se=g(xe(["fantasy-land/filter","filter"],ke,function(e,t){return be(t)?y(function(s,n){return e(t[n])&&(s[n]=t[n]),s},{},A(t)):(s=t,"[object Map]"===Object.prototype.toString.call(s)?function(e,t){for(var s=new Map,n=t.entries(),r=n.next();!r.done;)e(r.value[1])&&s.set(r.value[0],r.value[1]),r=n.next();return s}(e,t):function(e,t){for(var s=0,n=t.length,r=[];s<n;)e(t[s])&&(r[r.length]=t[s]),s+=1;return r}(e,t));var s}));const Ee=Se;const Ae=g(function(e,t){return Ee((s=e,function(){return!s.apply(this,arguments)}),t);var s});function je(e,t){var s=function(s){var n=t.concat([e]);return de(s,n)?"<Circular>":je(s,n)},n=function(e,t){return me(function(t){return fe(t)+": "+s(e[t])},t.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+me(s,e).join(", ")+"))";case"[object Array]":return"["+me(s,e).concat(n(e,Ae(function(e){return/^\d+$/.test(e)},A(e)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof e?"new Boolean("+s(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?s(NaN):fe(ge(e)))+")";case"[object Map]":return"new Map("+s(Array.from(e))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof e?"new Number("+s(e.valueOf())+")":1/e==-1/0?"-0":e.toString(10);case"[object Set]":return"new Set("+s(Array.from(e).sort())+")";case"[object String]":return"object"==typeof e?"new String("+s(e.valueOf())+")":fe(e);case"[object Undefined]":return"undefined";default:if("function"==typeof e.toString){var r=e.toString();if("[object Object]"!==r)return r}return"{"+n(e,A(e)).join(", ")+"}"}}const Ie=r(function(e){return je(e,[])});const Te=C(function(e,t,s){return e(L(t,s))});function Me(e){var t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t}const Fe=g(function(e,t){return e&&t});function Ne(e,t,s){for(var n=s.next();!n.done;)t=e(t,n.value),n=s.next();return t}function Ce(e,t,s,n){return s[n](e,t)}const Pe=G(y,Ce,Ne);var De=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=ve,e.prototype["@@transducer/result"]=we,e.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},e}();const Be=function(e){return function(t){return new De(e,t)}};function $e(e,t,s){return function(){for(var r=[],i=0,o=e,c=0,a=!1;c<t.length||i<arguments.length;){var l;c<t.length&&(!n(t[c])||i>=arguments.length)?l=t[c]:(l=arguments[i],i+=1),r[c]=l,n(l)?a=!0:o-=1,c+=1}return!a&&o<=0?s.apply(this,r):q(Math.max(0,o),$e(e,r,s))}}const Le=g(function(e,t){return 1===e?r(t):q(e,$e(e,[],t))});const _e=g(xe(["fantasy-land/map","map"],Be,function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return Le(t.length,function(){return e.call(this,t.apply(this,arguments))});case"[object Object]":return y(function(s,n){return s[n]=e(t[n]),s},{},A(t));default:return me(e,t)}}));const qe=g(function(e,t){return"function"==typeof t["fantasy-land/ap"]?t["fantasy-land/ap"](e):"function"==typeof e.ap?e.ap(t):"function"==typeof e?function(s){return e(s)(t(s))}:Pe(function(e,s){return function(e,t){var s;t=t||[];var n=(e=e||[]).length,r=t.length,i=[];for(s=0;s<n;)i[i.length]=e[s],s+=1;for(s=0;s<r;)i[i.length]=t[s],s+=1;return i}(e,_e(s,t))},[],e)});const Re=g(function(e,t){var s=Le(e,t);return Le(e,function(){return y(qe,_e(s,arguments[0]),Array.prototype.slice.call(arguments,1))})});const Ue=r(function(e){return Re(e.length,e)});const He=g(function(e,t){return Me(e)?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:Ue(Fe)(e,t)});const Ve=he(null);const Je=Ue(r(function(e){return!e}));const Ge=Je(Ve);function ze(e){return ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ze(e)}const Xe=function(e){return"object"===ze(e)};const We=Le(1,He(Ge,Xe));const Ye=g(function(e,t){if(e===t)return t;function s(e,t){if(e>t!=t>e)return t>e?t:e}var n=s(e,t);if(void 0!==n)return n;var r=s(typeof e,typeof t);if(void 0!==r)return r===typeof e?e:t;var i=Ie(e),o=s(i,Ie(t));return void 0!==o&&o===i?e:t});const Ke=g(function(e,t){return _e(B(e),t)});const Ze=r(function(e){return Le(Q(Ye,0,Ke("length",e)),function(){for(var t=0,s=e.length;t<s;){if(e[t].apply(this,arguments))return!0;t+=1}return!1})});const Qe=Le(1,ne(re,ce("GeneratorFunction")));const et=Le(1,ne(re,ce("AsyncFunction")));const tt=Ze([ne(re,ce("Function")),Qe,et]);var st=ne(re,ce("Object")),nt=ne(Ie,he(Ie(Object))),rt=Te(He(tt,nt),["constructor"]);const it=Le(1,function(e){if(!We(e)||!st(e))return!1;var t=Object.getPrototypeOf(e);return!!Ve(t)||rt(t)});const ot=Le(1,ne(re,ce("String")));const ct=r(function(e){return Le(e.length,e)});const at=g(function(e,t){return Le(e+1,function(){var s=arguments[e];if(null!=s&&Me(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 lt=at(1,"split");var ut=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=ve,e.prototype["@@transducer/result"]=we,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 pt(e){return function(t){return new ut(e,t)}}const ht=g(xe(["dropWhile"],pt,function(e,t){for(var s=0,n=t.length;s<n&&e(t[s]);)s+=1;return te(s,1/0,t)}));const dt=at(1,"join");const mt=r(function(e){return Le(e.length,function(t,s){var n=Array.prototype.slice.call(arguments,0);return n[0]=s,n[1]=t,e.apply(this,n)})})(g(de));const ft=ct(function(e,t){return ne(lt(""),ht(mt(e)),dt(""))(t)}),yt=new WeakMap,gt=e=>{if(yt.has(e))return yt.get(e);const t={},s=(e,n,r)=>("string"==typeof e.element&&(t[e.element]=e.$visitor?[...r,"$visitor"]:r),j((e,t)=>{const i=[...r,t];if(it(e)&&N("$ref",e)&&$(ot,"$ref",e)){const t=_(["$ref"],e),s=ft("#/",t);return _(s.split("/"),n)}return it(e)?s(e,n,i):e},e)),n=s(e,e,[]);return n.elementMap=t,yt.set(e,n),n};const xt=class{key;value;constructor(e,t){this.key=e,this.value=t}toValue(){return{key:this.key?.toValue(),value:this.value?.toValue()}}};class bt{elements;constructor(e){this.elements=e??[]}toValue(){return this.elements.map(e=>({key:e.key?.toValue(),value:e.value?.toValue()}))}map(e,t){return this.elements.map(s=>{const n=s.value,r=s.key;if(void 0===n||void 0===r)throw new Error("MemberElement must have both key and value");return void 0!==t?e.call(t,n,r,s):e(n,r,s)})}filter(e,t){const s=this.elements.filter(s=>{const n=s.value,r=s.key;return void 0!==n&&void 0!==r&&(void 0!==t?e.call(t,n,r,s):e(n,r,s))});return new bt(s)}reject(e,t){const s=[];for(const n of this.elements){const r=n.value,i=n.key;void 0!==r&&void 0!==i&&(e.call(t,r,i,n)||s.push(n))}return new bt(s)}forEach(e,t){this.elements.forEach((s,n)=>{const r=s.value,i=s.key;void 0!==r&&void 0!==i&&(void 0!==t?e.call(t,r,i,s,n):e(r,i,s,n))})}find(e,t){return this.elements.find(s=>{const n=s.value,r=s.key;return void 0!==n&&void 0!==r&&(void 0!==t?e.call(t,n,r,s):e(n,r,s))})}keys(){return this.elements.map(e=>e.key?.toValue()).filter(e=>void 0!==e)}values(){return this.elements.map(e=>e.value?.toValue()).filter(e=>void 0!==e)}get length(){return this.elements.length}get isEmpty(){return 0===this.length}get first(){return this.elements[0]}get(e){return this.elements[e]}push(e){return this.elements.push(e),this}includesKey(e){return this.elements.some(t=>t.key?.equals(e))}[Symbol.iterator](){return this.elements[Symbol.iterator]()}}const vt=bt;class wt{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 wt)this._content=e;else if(null!=e&&"string"!=typeof e&&"number"!=typeof e&&"boolean"!=typeof e&&"bigint"!=typeof e&&"symbol"!=typeof e)if(e instanceof xt)this._content=e;else if(e instanceof vt)this._content=e.elements;else if(Array.isArray(e))this._content=e.map(e=>this.refract(e));else{if("object"!=typeof e)throw new Error("Cannot set content to value of type "+typeof e);this._content=Object.entries(e).map(([e,t])=>new this.MemberElement(e,t))}else this._content=e}get meta(){if(!this._meta){if(this.isFrozen){const e=new this.ObjectElement;return e.freeze(),e}this._meta=new this.ObjectElement}return this._meta}set meta(e){e instanceof wt?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 wt?this._attributes=e:this.attributes.set(e??{})}get id(){return this.getMetaProperty("id","")}set id(e){this.setMetaProperty("id",e)}get classes(){return this.getMetaProperty("classes",[])}set classes(e){this.setMetaProperty("classes",e)}get links(){return this.getMetaProperty("links",[])}set links(e){this.setMetaProperty("links",e)}get children(){const{_content:e}=this;if(Array.isArray(e))return e;if(e instanceof xt){const t=[];return e.key&&t.push(e.key),e.value&&t.push(e.value),t}return e instanceof wt?[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 wt||e instanceof xt?e.toValue():Array.isArray(e)?e.map(e=>e.toValue()):e}equals(e){return he(this.toValue(),e)}primitive(){}set(e){return this.content=e,this}toRef(e){const t=this.id.toValue();if(""===t)throw new Error("Cannot create reference to an element without an ID");const s=new this.RefElement(t);return"string"==typeof e&&(s.path=this.refract(e)),s}getMetaProperty(e,t){if(!this.meta.hasKey(e)){if(this.isFrozen){const e=this.refract(t);return e.freeze(),e}this.meta.set(e,t)}return this.meta.get(e)}setMetaProperty(e,t){this.meta.set(e,t)}hasMetaProperty(e){return!this.isMetaEmpty&&this.meta.hasKey(e)}get isMetaEmpty(){return void 0===this._meta||this.meta.isEmpty}getAttributesProperty(e,t){if(!this.hasAttributesProperty(e)){if(this.isFrozen){const e=this.refract(t);return e.freeze(),e}this.attributes.set(e,t)}return this.attributes.get(e)}setAttributesProperty(e,t){this.attributes.set(e,t)}hasAttributesProperty(e){return!this.isAttributesEmpty&&this.attributes.hasKey(e)}get isAttributesEmpty(){return void 0===this._attributes||this.attributes.isEmpty}}const Ot=wt;class kt extends Ot{constructor(e,t,s){super(e||[],t,s)}get length(){return this._content.length}get isEmpty(){return 0===this.length}get first(){return this._content[0]}get second(){return this._content[1]}get last(){return this._content.at(-1)}push(...e){for(const t of e)this._content.push(this.refract(t));return this}shift(){return this._content.shift()}unshift(e){this._content.unshift(this.refract(e))}includes(e){return this._content.some(t=>t.equals(e))}findElements(e,t){const s=t||{},n=!!s.recursive,r=void 0===s.results?[]:s.results;for(let t=0;t<this._content.length;t+=1){const s=this._content[t],i=s;n&&"function"==typeof i.findElements&&i.findElements(e,{results:r,recursive:n}),e(s,t,void 0)&&r.push(s)}return r}find(e){const t=this.findElements(e,{recursive:!0});return new this.ArrayElement(t)}findByElement(e){return this.find(t=>t.element===e)}findByClass(e){return this.find(t=>{const s=t.classes;return"function"==typeof s.includes&&s.includes(e)})}getById(e){return this.find(t=>t.id.toValue()===e).first}concat(e){return new(0,this.constructor)(this._content.concat(e._content))}[Symbol.iterator](){return this._content[Symbol.iterator]()}}const St=kt;const Et=class extends Ot{constructor(e,t,s,n){super(new xt,s,n),this.element="member",void 0!==e&&(this.key=e),arguments.length>=2&&(this.value=t)}primitive(){return"member"}get key(){return this._content.key}set key(e){this._content.key=this.refract(e)}get value(){return this._content.value}set value(e){this._content.value=void 0===e?void 0:this.refract(e)}};const At=class extends St{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 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(s=>e.call(t,s.value,s.key,s))}compactMap(e,t){const s=[];return this.forEach((n,r,i)=>{const o=e.call(t,n,r,i);o&&s.push(o)}),s}filter(e,t){return new vt(this._content).filter(e,t)}reject(e,t){const s=[];for(const n of this._content)e.call(t,n.value,n.key,n)||s.push(n);return new vt(s)}forEach(e,t){this._content.forEach(s=>e.call(t,s.value,s.key,s))}reduce(e,t){let s,n;void 0!==t?(s=0,n=this.refract(t)):(s=1,n=this._content[0]?.value);for(let t=s;t<this._content.length;t+=1){const s=this._content[t],r=e(n,s.value,s.key,s,this);n=void 0===r?r:this.refract(r)}return n}empty(){return new this.constructor([])}};const jt=class extends At{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 It=class extends At{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 Tt=class extends At{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 Mt=class extends At{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 Ft=class extends Ot{constructor(e,t,s){super(e,t,s),this.element="string"}primitive(){return"string"}get length(){return this.content?.length??0}};const Nt=class extends Ot{constructor(e,t,s){super(e,t,s),this.element="number"}primitive(){return"number"}};const Ct=class extends Ot{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 Pt=class extends Ot{constructor(e,t,s){super(e,t,s),this.element="boolean"}primitive(){return"boolean"}};const Dt=class extends St{constructor(e,t,s){super(e||[],t,s),this.element="array"}primitive(){return"array"}get(e){return this._content[e]}getValue(e){const t=this.get(e);if(t)return t.toValue()}set(e,t){return"number"==typeof e&&void 0!==t?this._content[e]=this.refract(t):this.content=e,this}remove(e){return this._content.splice(e,1)[0]??null}map(e,t){return this._content.map(e,t)}flatMap(e,t){return this._content.flatMap(e,t)}compactMap(e,t){const s=[];for(const n of this._content){const r=e.call(t,n);r&&s.push(r)}return s}filter(e,t){const s=this._content.filter(e,t);return new this.constructor(s)}reject(e,t){const s=[];for(const n of this._content)e.call(t,n)||s.push(n);return new this.constructor(s)}reduce(e,t){let s,n;void 0!==t?(s=0,n=this.refract(t)):(s=1,n=this.first);for(let t=s;t<this.length;t+=1){const s=e(n,this._content[t],t,this);n=void 0===s?s:this.refract(s)}return n}forEach(e,t){this._content.forEach((s,n)=>{e.call(t,s,n)})}empty(){return new this.constructor([])}},Bt=e=>e instanceof Ot,$t=e=>e instanceof Ft,Lt=e=>e instanceof Nt,_t=e=>e instanceof Ct,qt=e=>e instanceof Pt,Rt=e=>e instanceof Dt,Ut=e=>e instanceof At,Ht=e=>e instanceof Et,Vt=e=>"number"==typeof e.startLine&&"number"==typeof e.startCharacter&&"number"==typeof e.startOffset&&"number"==typeof e.endLine&&"number"==typeof e.endCharacter&&"number"==typeof e.endOffset,Jt=(e,t)=>0===t.length||!!Bt(e)&&(!e.isMetaEmpty&&(!!e.hasMetaProperty("classes")&&t.every(t=>e.classes.includes(t))));class Gt extends Ft{constructor(e,t,s){super(e,t,s),this.element="sourceMap"}static transfer(e,t){t.startLine=e.startLine,t.startCharacter=e.startCharacter,t.startOffset=e.startOffset,t.endLine=e.endLine,t.endCharacter=e.endCharacter,t.endOffset=e.endOffset}static from(e){const{startLine:t,startCharacter:s,startOffset:n,endLine:r,endCharacter:i,endOffset:o}=e;if("number"!=typeof t||"number"!=typeof s||"number"!=typeof n||"number"!=typeof r||"number"!=typeof i||"number"!=typeof o)return;const c="sm1:"+[t,s,n,r,i,o].map(Xt).join("");const a=new Gt(c);return a.startLine=t,a.startCharacter=s,a.startOffset=n,a.endLine=r,a.endCharacter=i,a.endOffset=o,a}applyTo(e){this.content&&([e.startLine,e.startCharacter,e.startOffset,e.endLine,e.endCharacter,e.endOffset]=function(e){const t=e.startsWith("sm1:")?e.slice(4):e,s=[];let n=0;for(let e=0;e<6;e++){const e=Wt(t,n);s.push(e.value),n=e.next}return s}(this.content))}}const zt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Xt(e){let t=e>>>0,s="";do{let e=31&t;t>>>=5,0!==t&&(e|=32),s+=zt[e]}while(0!==t);return s}function Wt(e,t=0){let s=0,n=0,r=t;for(;;){const t=e[r++],i=zt.indexOf(t);if(-1===i)throw new Error(`Invalid Base64 VLQ char: ${t}`);if(s|=(31&i)<<n,n+=5,!!!(32&i))break}return{value:s>>>0,next:r}}const Yt=Gt;const Kt=class extends u{constructor(e,t){if(super(e,t),null!=t&&"object"==typeof t){const{cause:e,...s}=t;Object.assign(this,s)}}};const Zt=class extends Kt{value;constructor(e,t){super(e,t),void 0!==t&&(this.value=t.value)}};const Qt=class extends Zt{};const es=class extends Zt{},ts=(e,t)=>{const{visited:s=new WeakMap}=t,n={...t,visited:s};if(s.has(e))return s.get(e);const r=is(e);s.set(e,r);const{content:i}=e;return Array.isArray(i)?r.content=i.map(e=>ts(e,n)):Bt(i)?r.content=ts(i,n):r.content=i instanceof xt?ss(i,n):i,r},ss=(e,t)=>{const{visited:s=new WeakMap}=t,n={...t,visited:s};if(s.has(e))return s.get(e);const{key:r,value:i}=e,o=void 0!==r?ts(r,n):void 0,c=void 0!==i?ts(i,n):void 0,a=new xt(o,c);return s.set(e,a),a},ns=(e,t={})=>{if(e instanceof xt)return ss(e,t);if(e instanceof vt)return((e,t)=>{const{visited:s=new WeakMap}=t,n={...t,visited:s};if(s.has(e))return s.get(e);const r=[...e].map(e=>ts(e,n)),i=new vt(r);return s.set(e,i),i})(e,t);if(Bt(e))return ts(e,t);throw new Qt("Value provided to cloneDeep function couldn't be cloned",{value:e})};ns.safe=e=>{try{return ns(e)}catch{return e}};const rs=e=>{const{key:t,value:s}=e;return new xt(t,s)},is=e=>{const t=new(0,e.constructor);t.element=e.element,e.isMetaEmpty||(t.meta=ns(e.meta)),e.isAttributesEmpty||(t.attributes=ns(e.attributes)),Vt(e)&&Yt.transfer(e,t);const{content:s}=e;return Bt(s)?t.content=is(s):Array.isArray(s)?t.content=[...s]:t.content=s instanceof xt?rs(s):s,t},os=e=>{if(e instanceof xt)return rs(e);if(e instanceof vt)return(e=>{const t=[...e];return new vt(t)})(e);if(Bt(e))return is(e);throw new es("Value provided to cloneShallow function couldn't be cloned",{value:e})};os.safe=e=>{try{return os(e)}catch{return e}};const cs=class extends Ot{constructor(e,t,s){super(e||[],t,s),this.element="link"}get relation(){if(this.hasAttributesProperty("relation"))return this.attributes.get("relation")}set relation(e){this.attributes.set("relation",e)}get href(){if(this.hasAttributesProperty("href"))return this.attributes.get("href")}set href(e){this.attributes.set("href",e)}};const as=class extends Ot{constructor(e,t,s){super(e||[],t,s),this.element="ref",this.path||(this.path="element")}get path(){if(this.hasAttributesProperty("path"))return this.attributes.get("path")}set path(e){this.attributes.set("path",e)}};const ls=class extends Ft{constructor(e,t,s){super(e,t,s),this.element="annotation"}get code(){if(this.hasAttributesProperty("code"))return this.attributes.get("code")}set code(e){this.attributes.set("code",e)}};const us=class extends Ft{constructor(e,t,s){super(e,t,s),this.element="comment"}};const ps=class extends Dt{constructor(e,t,s){super(e,t,s),this.element="parseResult"}get api(){return this.filter(e=>Jt(e,["api"])).first}get results(){return this.filter(e=>Jt(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&&Jt(e,["warning"]))}get errors(){return this.filter(e=>"annotation"===e.element&&Jt(e,["error"]))}get isEmpty(){return 0===this.reject(e=>"annotation"===e.element).length}replaceResult(e){const{result:t}=this;if(void 0===t)return!1;const s=this._content,n=s.findIndex(e=>e===t);return-1!==n&&(s[n]=e,!0)}},hs=e=>e instanceof cs,ds=e=>e instanceof as,ms=e=>{if(!Bt(e))return e;if($t(e)||Lt(e)||qt(e)||_t(e))return e.toValue();const t=new WeakMap,s=e=>{if(!Bt(e))return e;if(Ut(e)){if(t.has(e))return t.get(e);const n={};return t.set(e,n),e.forEach((e,t)=>{const r=s(t),i=s(e);"string"==typeof r&&(n[r]=i)}),n}if(Rt(e)){if(t.has(e))return t.get(e);const n=[];return t.set(e,n),e.forEach(e=>n.push(s(e))),n}return ds(e)?String(e.toValue()):hs(e)?$t(e.href)?e.href.toValue():"":e.toValue()};return s(e)},fs=e=>{const t=e.isMetaEmpty?void 0:ns(e.meta),s=e.isAttributesEmpty?void 0:ns(e.attributes);return new e.constructor(void 0,t,s)},ys=(e,t)=>t.clone&&t.isMergeableElement(e)?xs(fs(e),e,t):e,gs={clone:!0,isMergeableElement:e=>Ut(e)||Rt(e),arrayElementMerge:(e,t,s)=>new(0,e.constructor)(e.concat(t).map(e=>ys(e,s))),objectElementMerge:(e,t,s)=>{const n=Ut(e)?fs(e):fs(t);return Ut(e)&&e.forEach((e,t,r)=>{const i=os(r);i.value=ys(e,s),n.content.push(i)}),t.forEach((t,r,i)=>{const o=ms(r);let c;if(Ut(e)&&e.hasKey(o)&&s.isMergeableElement(t)){const n=e.get(o);c=os(i),c.value=((e,t)=>{if("function"!=typeof t.customMerge)return xs;const s=t.customMerge(e,t);return"function"==typeof s?s:xs})(r,s)(n,t,s)}else c=os(i),c.value=ys(t,s);n.remove(o),n.content.push(c)}),n},customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0},xs=(e,t,s)=>{const n={...gs,...s};n.isMergeableElement=n.isMergeableElement??gs.isMergeableElement,n.arrayElementMerge=n.arrayElementMerge??gs.arrayElementMerge,n.objectElementMerge=n.objectElementMerge??gs.objectElementMerge;const r=Rt(t);if(!(r===Rt(e)))return ys(t,n);const i=r&&"function"==typeof n.arrayElementMerge?n.arrayElementMerge(e,t,n):n.objectElementMerge(e,t,n);return i.meta=(e=>"function"!=typeof e.customMetaMerge?e=>ns(e):e.customMetaMerge)(n)(e.meta,t.meta),i.attributes=(e=>"function"!=typeof e.customAttributesMerge?e=>ns(e):e.customAttributesMerge)(n)(e.attributes,t.attributes),i};xs.all=(e,t)=>{if(!Array.isArray(e))throw new TypeError("First argument of deepmerge should be an array.");return 0===e.length?new At:e.reduce((e,s)=>xs(e,s,t),fs(e[0]))};const bs=xs;const vs=class{element;constructor(e){Object.assign(this,e)}copyMetaAndAttributes(e,t){if(!e.isMetaEmpty||!t.isMetaEmpty){const s=t.isMetaEmpty?new At:t.meta,n=e.isMetaEmpty?new At:e.meta;t.meta=bs(s,n)}if(!e.isAttributesEmpty||!t.isAttributesEmpty){const s=t.isAttributesEmpty?new At:t.attributes,n=e.isAttributesEmpty?new At:e.attributes;t.attributes=bs(s,n)}Yt.transfer(e,t)}};const ws=class extends vs{enter(e){this.element=ns(e.node),e.stop()}};const Os=r(function(e){return function(){return e}});const ks=g(function(e,t){return null==t||t!=t?e:t});const Ss=Os(void 0);const Es=he(Ss());const As=r(function(e){return Le(Q(Ye,0,Ke("length",e)),function(){for(var t=0,s=e.length;t<s;){if(!e[t].apply(this,arguments))return!1;t+=1}return!0})});var js=r(function(e){return null!=e&&"function"==typeof e["fantasy-land/empty"]?e["fantasy-land/empty"]():null!=e&&null!=e.constructor&&"function"==typeof e.constructor["fantasy-land/empty"]?e.constructor["fantasy-land/empty"]():null!=e&&"function"==typeof e.empty?e.empty():null!=e&&null!=e.constructor&&"function"==typeof e.constructor.empty?e.constructor.empty():e==Set||e instanceof Set?new Set:e==Map||e instanceof Map?new Map:U(e)?[]:H(e)?"":be(e)?{}:v(e)?function(){return arguments}():function(e){var t=Object.prototype.toString.call(e);return"[object Uint8ClampedArray]"===t||"[object Int8Array]"===t||"[object Uint8Array]"===t||"[object Int16Array]"===t||"[object Uint16Array]"===t||"[object Int32Array]"===t||"[object Uint32Array]"===t||"[object Float32Array]"===t||"[object Float64Array]"===t||"[object BigInt64Array]"===t||"[object BigUint64Array]"===t}(e)?e.constructor.from(""):void 0});const Is=js;const Ts=r(function(e){return null!=e&&he(e,Is(e))});const Ms=r(function(e){return!Ts(e)});const Fs=g(function(e,t){return e||t});const Ns=Le(1,He(Ge,g(function(e,t){return Me(e)?function(){return e.apply(this,arguments)||t.apply(this,arguments)}:Ue(Fs)(e,t)})(Xe,tt)));var Cs=Je(Ns);const Ps=As([ot,Cs,Ms]);const Ds=g(function(e,t){for(var s={},n=0;n<e.length;)e[n]in t&&(s[e[n]]=t[e[n]]),n+=1;return s}),Bs=function(){const e=Ls,t=$s,s=this,n="parser.js: Parser(): ";s.ast=void 0,s.stats=void 0,s.trace=void 0,s.callbacks=[];let r,i,o,c,a,l,u,p=0,h=0,d=0,m=0,f=0,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 O=`${n}parse(): `;p=0,h=0,d=0,m=0,f=0,r=void 0,i=void 0,o=void 0,c=void 0,y.refresh(),a=void 0,l=void 0,u=void 0,c=t.stringToChars(v),r=g.rules,i=g.udts;const k=x.toLowerCase();let S;for(const e in r)if(r.hasOwnProperty(e)&&k===r[e].lower){S=r[e].index;break}if(void 0===S)throw new Error(`${O}start rule name '${startRule}' not recognized`);(()=>{const e=`${n}initializeCallbacks(): `;let t,o;for(a=[],l=[],t=0;t<r.length;t+=1)a[t]=void 0;for(t=0;t<i.length;t+=1)l[t]=void 0;const c=[];for(t=0;t<r.length;t+=1)c.push(r[t].lower);for(t=0;t<i.length;t+=1)c.push(i[t].lower);for(const n in s.callbacks)if(s.callbacks.hasOwnProperty(n)){if(t=c.indexOf(n.toLowerCase()),t<0)throw new Error(`${e}syntax callback '${n}' not a rule or udt name`);if(o=s.callbacks[n]?s.callbacks[n]:void 0,"function"!=typeof o&&void 0!==o)throw new Error(`${e}syntax callback[${n}] must be function reference or falsy)`);t<r.length?a[t]=o:l[t-r.length]=o}})(),s.trace&&s.trace.init(r,i,c),s.stats&&s.stats.init(r,i),s.ast&&s.ast.init(r,i,c),u=w,o=[{type:e.RNM,index:S}],b(0,0),o=void 0;let E=!1;switch(y.state){case e.ACTIVE:throw new Error(`${O}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,r,i)=>{if(s.phraseLength>r){let e=`${n}opRNM(${t.name}): callback function error: `;throw e+=`sysData.phraseLength: ${s.phraseLength}`,e+=` must be <= remaining chars: ${r}`,new Error(e)}switch(s.state){case e.ACTIVE:if(!i)throw new Error(`${n}opRNM(${t.name}): callback function return error. ACTIVE state not allowed.`);break;case e.EMPTY:s.phraseLength=0;break;case e.MATCH:0===s.phraseLength&&(s.state=e.EMPTY);break;case e.NOMATCH:s.phraseLength=0;break;default:throw new Error(`${n}opRNM(${t.name}): callback function return error. Unrecognized return state: ${s.state}`)}},x=(t,a)=>{let h,d,m;const f=o[t],g=i[f.index];y.UdtIndex=g.index,p||(m=s.ast&&s.ast.udtDefined(f.index),m&&(d=r.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,r)=>{if(s.phraseLength>r){let e=`${n}opUDT(${t.name}): callback function error: `;throw e+=`sysData.phraseLength: ${s.phraseLength}`,e+=` must be <= remaining chars: ${r}`,new Error(e)}switch(s.state){case e.ACTIVE:throw new Error(`${n}opUDT(${t.name}) ACTIVE state return not allowed.`);case e.EMPTY:if(!t.empty)throw new Error(`${n}opUDT(${t.name}) may not return EMPTY.`);s.phraseLength=0;break;case e.MATCH:if(0===s.phraseLength){if(!t.empty)throw new Error(`${n}opUDT(${t.name}) may not return EMPTY.`);s.state=e.EMPTY}break;case e.NOMATCH:s.phraseLength=0;break;default:throw new Error(`${n}opUDT(${t.name}): callback function return error. Unrecognized return state: ${s.state}`)}})(g,y,x),p||m&&(y.state===e.NOMATCH?s.ast.setLength(h):s.ast.up(d,g.name,a,y.phraseLength))},b=(t,i)=>{const l=`${n}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 n=o[t];for(let t=0;t<n.children.length&&(b(n.children[t],s),y.state===e.NOMATCH);t+=1);})(t,i);break;case e.CAT:((t,n)=>{let r,i,c,a;const l=o[t];s.ast&&(i=s.ast.getLength()),r=!0,c=n,a=0;for(let t=0;t<l.children.length;t+=1){if(b(l.children[t],c),y.state===e.NOMATCH){r=!1;break}c+=y.phraseLength,a+=y.phraseLength}r?(y.state=0===a?e.EMPTY:e.MATCH,y.phraseLength=a):(y.state=e.NOMATCH,y.phraseLength=0,s.ast&&s.ast.setLength(i))})(t,i);break;case e.REP:((t,n)=>{let r,i,a,l;const u=o[t];if(0===u.max)return y.state=e.EMPTY,void(y.phraseLength=0);for(i=n,a=0,l=0,s.ast&&(r=s.ast.getLength());!(i>=c.length)&&(b(t+1,i),y.state!==e.NOMATCH)&&y.state!==e.EMPTY&&(l+=1,a+=y.phraseLength,i+=y.phraseLength,l!==u.max););y.state===e.EMPTY||l>=u.min?(y.state=0===a?e.EMPTY:e.MATCH,y.phraseLength=a):(y.state=e.NOMATCH,y.phraseLength=0,s.ast&&s.ast.setLength(r))})(t,i);break;case e.RNM:((t,n)=>{let i,l,h;const d=o[t],m=r[d.index],f=a[m.index];if(p||(l=s.ast&&s.ast.ruleDefined(d.index),l&&(i=s.ast.getLength(),s.ast.down(d.index,r[d.index].name))),f){const t=c.length-n;f(y,c,n,u),g(m,y,t,!0),y.state===e.ACTIVE&&(h=o,o=m.opcodes,b(0,n),o=h,f(y,c,n,u),g(m,y,t,!1))}else h=o,o=m.opcodes,b(0,n,y),o=h;p||l&&(y.state===e.NOMATCH?s.ast.setLength(i):s.ast.up(d.index,m.name,n,y.phraseLength))})(t,i);break;case e.TRG:((t,s)=>{const n=o[t];y.state=e.NOMATCH,s<c.length&&n.min<=c[s]&&c[s]<=n.max&&(y.state=e.MATCH,y.phraseLength=1)})(t,i);break;case e.TBS:((t,s)=>{const n=o[t],r=n.string.length;if(y.state=e.NOMATCH,s+r<=c.length){for(let e=0;e<r;e+=1)if(c[s+e]!==n.string[e])return;y.state=e.MATCH,y.phraseLength=r}})(t,i);break;case e.TLS:((t,s)=>{let n;const r=o[t];y.state=e.NOMATCH;const i=r.string.length;if(0!==i){if(s+i<=c.length){for(let e=0;e<i;e+=1)if(n=c[s+e],n>=65&&n<=90&&(n+=32),n!==r.string[e])return;y.state=e.MATCH,y.phraseLength=i}}else y.state=e.EMPTY})(t,i);break;case e.UDT:x(t,i);break;case e.AND:((t,s)=>{switch(p+=1,b(t+1,s),p-=1,y.phraseLength=0,y.state){case e.EMPTY:case e.MATCH:y.state=e.EMPTY;break;case e.NOMATCH:y.state=e.NOMATCH;break;default:throw new Error(`opAND: invalid state ${y.state}`)}})(t,i);break;case e.NOT:((t,s)=>{switch(p+=1,b(t+1,s),p-=1,y.phraseLength=0,y.state){case e.EMPTY:case e.MATCH:y.state=e.NOMATCH;break;case e.NOMATCH:y.state=e.EMPTY;break;default:throw new Error(`opNOT: invalid state ${y.state}`)}})(t,i);break;default:throw new Error(`${l}unrecognized operator`)}p||i+y.phraseLength>f&&(f=i+y.phraseLength),s.stats&&s.stats.collect(v,y),s.trace&&s.trace.up(v,y.state,i,y.phraseLength),h-=1}},$s={stringToChars:e=>[...e].map(e=>e.codePointAt(0)),charsToString:(e,t,s)=>{let n=e;for(;!(void 0===t||t<0);){if(void 0===s){n=e.slice(t);break}if(s<=0)return"";n=e.slice(t,t+s);break}return String.fromCodePoint(...n)}},Ls={ALT:1,CAT:2,REP:3,RNM:4,TRG:5,TBS:6,TLS:7,UDT:11,AND:12,NOT:13,ACTIVE:100,MATCH:101,EMPTY:102,NOMATCH:103,SEM_PRE:200,SEM_POST:201,SEM_OK:300,idName:e=>{switch(e){case Ls.ALT:return"ALT";case Ls.CAT:return"CAT";case Ls.REP:return"REP";case Ls.RNM:return"RNM";case Ls.TRG:return"TRG";case Ls.TBS:return"TBS";case Ls.TLS:return"TLS";case Ls.UDT:return"UDT";case Ls.AND:return"AND";case Ls.NOT:return"NOT";case Ls.ACTIVE:return"ACTIVE";case Ls.EMPTY:return"EMPTY";case Ls.MATCH:return"MATCH";case Ls.NOMATCH:return"NOMATCH";case Ls.SEM_PRE:return"SEM_PRE";case Ls.SEM_POST:return"SEM_POST";case Ls.SEM_OK:return"SEM_OK";default:return"UNRECOGNIZED STATE"}}};function _s(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"json-pointer",lower:"json-pointer",index:0,isBkr:!1},this.rules[1]={name:"reference-token",lower:"reference-token",index:1,isBkr:!1},this.rules[2]={name:"unescaped",lower:"unescaped",index:2,isBkr:!1},this.rules[3]={name:"escaped",lower:"escaped",index:3,isBkr:!1},this.rules[4]={name:"array-location",lower:"array-location",index:4,isBkr:!1},this.rules[5]={name:"array-index",lower:"array-index",index:5,isBkr:!1},this.rules[6]={name:"array-dash",lower:"array-dash",index:6,isBkr:!1},this.rules[7]={name:"slash",lower:"slash",index:7,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:0,max:1/0},this.rules[0].opcodes[1]={type:2,children:[2,3]},this.rules[0].opcodes[2]={type:4,index:7},this.rules[0].opcodes[3]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:3,min:0,max:1/0},this.rules[1].opcodes[1]={type:1,children:[2,3]},this.rules[1].opcodes[2]={type:4,index:2},this.rules[1].opcodes[3]={type:4,index:3},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:1,children:[1,2,3]},this.rules[2].opcodes[1]={type:5,min:0,max:46},this.rules[2].opcodes[2]={type:5,min:48,max:125},this.rules[2].opcodes[3]={type:5,min:127,max:1114111},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:2,children:[1,2]},this.rules[3].opcodes[1]={type:7,string:[126]},this.rules[3].opcodes[2]={type:1,children:[3,4]},this.rules[3].opcodes[3]={type:7,string:[48]},this.rules[3].opcodes[4]={type:7,string:[49]},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:4,index:5},this.rules[4].opcodes[2]={type:4,index:6},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,2]},this.rules[5].opcodes[1]={type:6,string:[48]},this.rules[5].opcodes[2]={type:2,children:[3,4]},this.rules[5].opcodes[3]={type:5,min:49,max:57},this.rules[5].opcodes[4]={type:3,min:0,max:1/0},this.rules[5].opcodes[5]={type:5,min:48,max:57},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:7,string:[45]},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:7,string:[47]},this.toString=function(){let e="";return e+="; JavaScript Object Notation (JSON) Pointer ABNF syntax\n",e+="; https://datatracker.ietf.org/doc/html/rfc6901\n",e+="json-pointer = *( slash reference-token ) ; MODIFICATION: surrogate text rule used\n",e+="reference-token = *( unescaped / escaped )\n",e+="unescaped = %x00-2E / %x30-7D / %x7F-10FFFF\n",e+=" ; %x2F ('/') and %x7E ('~') are excluded from 'unescaped'\n",e+='escaped = "~" ( "0" / "1" )\n',e+=" ; representing '~' and '/', respectively\n",e+="\n",e+="; https://datatracker.ietf.org/doc/html/rfc6901#section-4\n",e+="array-location = array-index / array-dash\n",e+="array-index = %x30 / ( %x31-39 *(%x30-39) )\n",e+=' ; "0", or digits without a leading "0"\n',e+='array-dash = "-"\n',e+="\n",e+="; Surrogate named rules\n",e+='slash = "/"\n','; JavaScript Object Notation (JSON) Pointer ABNF syntax\n; https://datatracker.ietf.org/doc/html/rfc6901\njson-pointer = *( slash reference-token ) ; MODIFICATION: surrogate text rule used\nreference-token = *( unescaped / escaped )\nunescaped = %x00-2E / %x30-7D / %x7F-10FFFF\n ; %x2F (\'/\') and %x7E (\'~\') are excluded from \'unescaped\'\nescaped = "~" ( "0" / "1" )\n ; representing \'~\' and \'/\', respectively\n\n; https://datatracker.ietf.org/doc/html/rfc6901#section-4\narray-location = array-index / array-dash\narray-index = %x30 / ( %x31-39 *(%x30-39) )\n ; "0", or digits without a leading "0"\narray-dash = "-"\n\n; Surrogate named rules\nslash = "/"\n'}}class qs extends Error{constructor(e,t=void 0){if(super(e,t),this.name=this.constructor.name,"string"==typeof e&&(this.message=e),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack,null!=t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"cause")&&!("cause"in this)){const{cause:e}=t;this.cause=e,e instanceof Error&&"stack"in e&&(this.stack=`${this.stack}\nCAUSE: ${e.stack}`)}if(null!=t&&"object"==typeof t){const{cause:e,...s}=t;Object.assign(this,s)}}}const Rs=qs;new _s;new _s,new Bs,new _s,new Bs,new _s,new Bs,new _s,new Bs;const Us=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 Hs=class extends Rs{},Vs=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 Us(String(e))}).join("/")}`}catch(t){throw new Hs("Unexpected error during JSON Pointer compilation",{cause:t,referenceTokens:e})}};class Js extends Error{constructor(e,t=void 0){if(super(e,t),this.name=this.constructor.name,"string"==typeof e&&(this.message=e),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack,null!=t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"cause")&&!("cause"in this)){const{cause:e}=t;this.cause=e,e instanceof Error&&"stack"in e&&(this.stack=`${this.stack}\nCAUSE: ${e.stack}`)}if(null!=t&&"object"==typeof t){const{cause:e,...s}=t;Object.assign(this,s)}}}const Gs=Js;new function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"jsonpath-query",lower:"jsonpath-query",index:0,isBkr:!1},this.rules[1]={name:"segments",lower:"segments",index:1,isBkr:!1},this.rules[2]={name:"B",lower:"b",index:2,isBkr:!1},this.rules[3]={name:"S",lower:"s",index:3,isBkr:!1},this.rules[4]={name:"root-identifier",lower:"root-identifier",index:4,isBkr:!1},this.rules[5]={name:"selector",lower:"selector",index:5,isBkr:!1},this.rules[6]={name:"name-selector",lower:"name-selector",index:6,isBkr:!1},this.rules[7]={name:"string-literal",lower:"string-literal",index:7,isBkr:!1},this.rules[8]={name:"double-quoted",lower:"double-quoted",index:8,isBkr:!1},this.rules[9]={name:"single-quoted",lower:"single-quoted",index:9,isBkr:!1},this.rules[10]={name:"ESC",lower:"esc",index:10,isBkr:!1},this.rules[11]={name:"unescaped",lower:"unescaped",index:11,isBkr:!1},this.rules[12]={name:"escapable",lower:"escapable",index:12,isBkr:!1},this.rules[13]={name:"hexchar",lower:"hexchar",index:13,isBkr:!1},this.rules[14]={name:"non-surrogate",lower:"non-surrogate",index:14,isBkr:!1},this.rules[15]={name:"high-surrogate",lower:"high-surrogate",index:15,isBkr:!1},this.rules[16]={name:"low-surrogate",lower:"low-surrogate",index:16,isBkr:!1},this.rules[17]={name:"HEXDIG",lower:"hexdig",index:17,isBkr:!1},this.rules[18]={name:"wildcard-selector",lower:"wildcard-selector",index:18,isBkr:!1},this.rules[19]={name:"index-selector",lower:"index-selector",index:19,isBkr:!1},this.rules[20]={name:"int",lower:"int",index:20,isBkr:!1},this.rules[21]={name:"DIGIT1",lower:"digit1",index:21,isBkr:!1},this.rules[22]={name:"slice-selector",lower:"slice-selector",index:22,isBkr:!1},this.rules[23]={name:"start",lower:"start",index:23,isBkr:!1},this.rules[24]={name:"end",lower:"end",index:24,isBkr:!1},this.rules[25]={name:"step",lower:"step",index:25,isBkr:!1},this.rules[26]={name:"filter-selector",lower:"filter-selector",index:26,isBkr:!1},this.rules[27]={name:"logical-expr",lower:"logical-expr",index:27,isBkr:!1},this.rules[28]={name:"logical-or-expr",lower:"logical-or-expr",index:28,isBkr:!1},this.rules[29]={name:"logical-and-expr",lower:"logical-and-expr",index:29,isBkr:!1},this.rules[30]={name:"basic-expr",lower:"basic-expr",index:30,isBkr:!1},this.rules[31]={name:"paren-expr",lower:"paren-expr",index:31,isBkr:!1},this.rules[32]={name:"logical-not-op",lower:"logical-not-op",index:32,isBkr:!1},this.rules[33]={name:"test-expr",lower:"test-expr",index:33,isBkr:!1},this.rules[34]={name:"filter-query",lower:"filter-query",index:34,isBkr:!1},this.rules[35]={name:"rel-query",lower:"rel-query",index:35,isBkr:!1},this.rules[36]={name:"current-node-identifier",lower:"current-node-identifier",index:36,isBkr:!1},this.rules[37]={name:"comparison-expr",lower:"comparison-expr",index:37,isBkr:!1},this.rules[38]={name:"literal",lower:"literal",index:38,isBkr:!1},this.rules[39]={name:"comparable",lower:"comparable",index:39,isBkr:!1},this.rules[40]={name:"comparison-op",lower:"comparison-op",index:40,isBkr:!1},this.rules[41]={name:"singular-query",lower:"singular-query",index:41,isBkr:!1},this.rules[42]={name:"rel-singular-query",lower:"rel-singular-query",index:42,isBkr:!1},this.rules[43]={name:"abs-singular-query",lower:"abs-singular-query",index:43,isBkr:!1},this.rules[44]={name:"singular-query-segments",lower:"singular-query-segments",index:44,isBkr:!1},this.rules[45]={name:"name-segment",lower:"name-segment",index:45,isBkr:!1},this.rules[46]={name:"index-segment",lower:"index-segment",index:46,isBkr:!1},this.rules[47]={name:"number",lower:"number",index:47,isBkr:!1},this.rules[48]={name:"frac",lower:"frac",index:48,isBkr:!1},this.rules[49]={name:"exp",lower:"exp",index:49,isBkr:!1},this.rules[50]={name:"true",lower:"true",index:50,isBkr:!1},this.rules[51]={name:"false",lower:"false",index:51,isBkr:!1},this.rules[52]={name:"null",lower:"null",index:52,isBkr:!1},this.rules[53]={name:"function-name",lower:"function-name",index:53,isBkr:!1},this.rules[54]={name:"function-name-first",lower:"function-name-first",index:54,isBkr:!1},this.rules[55]={name:"function-name-char",lower:"function-name-char",index:55,isBkr:!1},this.rules[56]={name:"LCALPHA",lower:"lcalpha",index:56,isBkr:!1},this.rules[57]={name:"function-expr",lower:"function-expr",index:57,isBkr:!1},this.rules[58]={name:"function-argument",lower:"function-argument",index:58,isBkr:!1},this.rules[59]={name:"segment",lower:"segment",index:59,isBkr:!1},this.rules[60]={name:"child-segment",lower:"child-segment",index:60,isBkr:!1},this.rules[61]={name:"bracketed-selection",lower:"bracketed-selection",index:61,isBkr:!1},this.rules[62]={name:"member-name-shorthand",lower:"member-name-shorthand",index:62,isBkr:!1},this.rules[63]={name:"name-first",lower:"name-first",index:63,isBkr:!1},this.rules[64]={name:"name-char",lower:"name-char",index:64,isBkr:!1},this.rules[65]={name:"DIGIT",lower:"digit",index:65,isBkr:!1},this.rules[66]={name:"ALPHA",lower:"alpha",index:66,isBkr:!1},this.rules[67]={name:"descendant-segment",lower:"descendant-segment",index:67,isBkr:!1},this.rules[68]={name:"normalized-path",lower:"normalized-path",index:68,isBkr:!1},this.rules[69]={name:"normal-index-segment",lower:"normal-index-segment",index:69,isBkr:!1},this.rules[70]={name:"normal-selector",lower:"normal-selector",index:70,isBkr:!1},this.rules[71]={name:"normal-name-selector",lower:"normal-name-selector",index:71,isBkr:!1},this.rules[72]={name:"normal-single-quoted",lower:"normal-single-quoted",index:72,isBkr:!1},this.rules[73]={name:"normal-unescaped",lower:"normal-unescaped",index:73,isBkr:!1},this.rules[74]={name:"normal-escapable",lower:"normal-escapable",index:74,isBkr:!1},this.rules[75]={name:"normal-hexchar",lower:"normal-hexchar",index:75,isBkr:!1},this.rules[76]={name:"normal-HEXDIG",lower:"normal-hexdig",index:76,isBkr:!1},this.rules[77]={name:"normal-index-selector",lower:"normal-index-selector",index:77,isBkr:!1},this.rules[78]={name:"dot-prefix",lower:"dot-prefix",index:78,isBkr:!1},this.rules[79]={name:"double-dot-prefix",lower:"double-dot-prefix",index:79,isBkr:!1},this.rules[80]={name:"left-bracket",lower:"left-bracket",index:80,isBkr:!1},this.rules[81]={name:"right-bracket",lower:"right-bracket",index:81,isBkr:!1},this.rules[82]={name:"left-paren",lower:"left-paren",index:82,isBkr:!1},this.rules[83]={name:"right-paren",lower:"right-paren",index:83,isBkr:!1},this.rules[84]={name:"comma",lower:"comma",index:84,isBkr:!1},this.rules[85]={name:"colon",lower:"colon",index:85,isBkr:!1},this.rules[86]={name:"dquote",lower:"dquote",index:86,isBkr:!1},this.rules[87]={name:"squote",lower:"squote",index:87,isBkr:!1},this.rules[88]={name:"questionmark",lower:"questionmark",index:88,isBkr:!1},this.rules[89]={name:"disjunction",lower:"disjunction",index:89,isBkr:!1},this.rules[90]={name:"conjunction",lower:"conjunction",index:90,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:2,children:[1,2]},this.rules[0].opcodes[1]={type:4,index:4},this.rules[0].opcodes[2]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:3,min:0,max:1/0},this.rules[1].opcodes[1]={type:2,children:[2,3]},this.rules[1].opcodes[2]={type:4,index:3},this.rules[1].opcodes[3]={type:4,index:59},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[2].opcodes[1]={type:6,string:[32]},this.rules[2].opcodes[2]={type:6,string:[9]},this.rules[2].opcodes[3]={type:6,string:[10]},this.rules[2].opcodes[4]={type:6,string:[13]},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:0,max:1/0},this.rules[3].opcodes[1]={type:4,index:2},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:7,string:[36]},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,2,3,4,5]},this.rules[5].opcodes[1]={type:4,index:6},this.rules[5].opcodes[2]={type:4,index:18},this.rules[5].opcodes[3]={type:4,index:22},this.rules[5].opcodes[4]={type:4,index:19},this.rules[5].opcodes[5]={type:4,index:26},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:4,index:7},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,6]},this.rules[7].opcodes[1]={type:2,children:[2,3,5]},this.rules[7].opcodes[2]={type:4,index:86},this.rules[7].opcodes[3]={type:3,min:0,max:1/0},this.rules[7].opcodes[4]={type:4,index:8},this.rules[7].opcodes[5]={type:4,index:86},this.rules[7].opcodes[6]={type:2,children:[7,8,10]},this.rules[7].opcodes[7]={type:4,index:87},this.rules[7].opcodes[8]={type:3,min:0,max:1/0},this.rules[7].opcodes[9]={type:4,index:9},this.rules[7].opcodes[10]={type:4,index:87},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:1,children:[1,2,3,6]},this.rules[8].opcodes[1]={type:4,index:11},this.rules[8].opcodes[2]={type:6,string:[39]},this.rules[8].opcodes[3]={type:2,children:[4,5]},this.rules[8].opcodes[4]={type:4,index:10},this.rules[8].opcodes[5]={type:6,string:[34]},this.rules[8].opcodes[6]={type:2,children:[7,8]},this.rules[8].opcodes[7]={type:4,index:10},this.rules[8].opcodes[8]={type:4,index:12},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:1,children:[1,2,3,6]},this.rules[9].opcodes[1]={type:4,index:11},this.rules[9].opcodes[2]={type:6,string:[34]},this.rules[9].opcodes[3]={type:2,children:[4,5]},this.rules[9].opcodes[4]={type:4,index:10},this.rules[9].opcodes[5]={type:6,string:[39]},this.rules[9].opcodes[6]={type:2,children:[7,8]},this.rules[9].opcodes[7]={type:4,index:10},this.rules[9].opcodes[8]={type:4,index:12},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:6,string:[92]},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:1,children:[1,2,3,4,5]},this.rules[11].opcodes[1]={type:5,min:32,max:33},this.rules[11].opcodes[2]={type:5,min:35,max:38},this.rules[11].opcodes[3]={type:5,min:40,max:91},this.rules[11].opcodes[4]={type:5,min:93,max:55295},this.rules[11].opcodes[5]={type:5,min:57344,max:1114111},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8]},this.rules[12].opcodes[1]={type:6,string:[98]},this.rules[12].opcodes[2]={type:6,string:[102]},this.rules[12].opcodes[3]={type:6,string:[110]},this.rules[12].opcodes[4]={type:6,string:[114]},this.rules[12].opcodes[5]={type:6,string:[116]},this.rules[12].opcodes[6]={type:7,string:[47]},this.rules[12].opcodes[7]={type:7,string:[92]},this.rules[12].opcodes[8]={type:2,children:[9,10]},this.rules[12].opcodes[9]={type:6,string:[117]},this.rules[12].opcodes[10]={type:4,index:13},this.rules[13].opcodes=[],this.rules[13].opcodes[0]={type:1,children:[1,2]},this.rules[13].opcodes[1]={type:4,index:14},this.rules[13].opcodes[2]={type:2,children:[3,4,5,6]},this.rules[13].opcodes[3]={type:4,index:15},this.rules[13].opcodes[4]={type:7,string:[92]},this.rules[13].opcodes[5]={type:6,string:[117]},this.rules[13].opcodes[6]={type:4,index:16},this.rules[14].opcodes=[],this.rules[14].opcodes[0]={type:1,children:[1,11]},this.rules[14].opcodes[1]={type:2,children:[2,9]},this.rules[14].opcodes[2]={type:1,children:[3,4,5,6,7,8]},this.rules[14].opcodes[3]={type:4,index:65},this.rules[14].opcodes[4]={type:7,string:[97]},this.rules[14].opcodes[5]={type:7,string:[98]},this.rules[14].opcodes[6]={type:7,string:[99]},this.rules[14].opcodes[7]={type:7,string:[101]},this.rules[14].opcodes[8]={type:7,string:[102]},this.rules[14].opcodes[9]={type:3,min:3,max:3},this.rules[14].opcodes[10]={type:4,index:17},this.rules[14].opcodes[11]={type:2,children:[12,13,14]},this.rules[14].opcodes[12]={type:7,string:[100]},this.rules[14].opcodes[13]={type:5,min:48,max:55},this.rules[14].opcodes[14]={type:3,min:2,max:2},this.rules[14].opcodes[15]={type:4,index:17},this.rules[15].opcodes=[],this.rules[15].opcodes[0]={type:2,children:[1,2,7]},this.rules[15].opcodes[1]={type:7,string:[100]},this.rules[15].opcodes[2]={type:1,children:[3,4,5,6]},this.rules[15].opcodes[3]={type:7,string:[56]},this.rules[15].opcodes[4]={type:7,string:[57]},this.rules[15].opcodes[5]={type:7,string:[97]},this.rules[15].opcodes[6]={type:7,string:[98]},this.rules[15].opcodes[7]={type:3,min:2,max:2},this.rules[15].opcodes[8]={type:4,index:17},this.rules[16].opcodes=[],this.rules[16].opcodes[0]={type:2,children:[1,2,7]},this.rules[16].opcodes[1]={type:7,string:[100]},this.rules[16].opcodes[2]={type:1,children:[3,4,5,6]},this.rules[16].opcodes[3]={type:7,string:[99]},this.rules[16].opcodes[4]={type:7,string:[100]},this.rules[16].opcodes[5]={type:7,string:[101]},this.rules[16].opcodes[6]={type:7,string:[102]},this.rules[16].opcodes[7]={type:3,min:2,max:2},this.rules[16].opcodes[8]={type:4,index:17},this.rules[17].opcodes=[],this.rules[17].opcodes[0]={type:1,children:[1,2,3,4,5,6,7]},this.rules[17].opcodes[1]={type:4,index:65},this.rules[17].opcodes[2]={type:7,string:[97]},this.rules[17].opcodes[3]={type:7,string:[98]},this.rules[17].opcodes[4]={type:7,string:[99]},this.rules[17].opcodes[5]={type:7,string:[100]},this.rules[17].opcodes[6]={type:7,string:[101]},this.rules[17].opcodes[7]={type:7,string:[102]},this.rules[18].opcodes=[],this.rules[18].opcodes[0]={type:7,string:[42]},this.rules[19].opcodes=[],this.rules[19].opcodes[0]={type:4,index:20},this.rules[20].opcodes=[],this.rules[20].opcodes[0]={type:1,children:[1,2]},this.rules[20].opcodes[1]={type:7,string:[48]},this.rules[20].opcodes[2]={type:2,children:[3,5,6]},this.rules[20].opcodes[3]={type:3,min:0,max:1},this.rules[20].opcodes[4]={type:7,string:[45]},this.rules[20].opcodes[5]={type:4,index:21},this.rules[20].opcodes[6]={type:3,min:0,max:1/0},this.rules[20].opcodes[7]={type:4,index:65},this.rules[21].opcodes=[],this.rules[21].opcodes[0]={type:5,min:49,max:57},this.rules[22].opcodes=[],this.rules[22].opcodes[0]={type:2,children:[1,5,6,7,11]},this.rules[22].opcodes[1]={type:3,min:0,max:1},this.rules[22].opcodes[2]={type:2,children:[3,4]},this.rules[22].opcodes[3]={type:4,index:23},this.rules[22].opcodes[4]={type:4,index:3},this.rules[22].opcodes[5]={type:4,index:85},this.rules[22].opcodes[6]={type:4,index:3},this.rules[22].opcodes[7]={type:3,min:0,max:1},this.rules[22].opcodes[8]={type:2,children:[9,10]},this.rules[22].opcodes[9]={type:4,index:24},this.rules[22].opcodes[10]={type:4,index:3},this.rules[22].opcodes[11]={type:3,min:0,max:1},this.rules[22].opcodes[12]={type:2,children:[13,14]},this.rules[22].opcodes[13]={type:4,index:85},this.rules[22].opcodes[14]={type:3,min:0,max:1},this.rules[22].opcodes[15]={type:2,children:[16,17]},this.rules[22].opcodes[16]={type:4,index:3},this.rules[22].opcodes[17]={type:4,index:25},this.rules[23].opcodes=[],this.rules[23].opcodes[0]={type:4,index:20},this.rules[24].opcodes=[],this.rules[24].opcodes[0]={type:4,index:20},this.rules[25].opcodes=[],this.rules[25].opcodes[0]={type:4,index:20},this.rules[26].opcodes=[],this.rules[26].opcodes[0]={type:2,children:[1,2,3]},this.rules[26].opcodes[1]={type:4,index:88},this.rules[26].opcodes[2]={type:4,index:3},this.rules[26].opcodes[3]={type:4,index:27},this.rules[27].opcodes=[],this.rules[27].opcodes[0]={type:4,index:28},this.rules[28].opcodes=[],this.rules[28].opcodes[0]={type:2,children:[1,2]},this.rules[28].opcodes[1]={type:4,index:29},this.rules[28].opcodes[2]={type:3,min:0,max:1/0},this.rules[28].opcodes[3]={type:2,children:[4,5,6,7]},this.rules[28].opcodes[4]={type:4,index:3},this.rules[28].opcodes[5]={type:4,index:89},this.rules[28].opcodes[6]={type:4,index:3},this.rules[28].opcodes[7]={type:4,index:29},this.rules[29].opcodes=[],this.rules[29].opcodes[0]={type:2,children:[1,2]},this.rules[29].opcodes[1]={type:4,index:30},this.rules[29].opcodes[2]={type:3,min:0,max:1/0},this.rules[29].opcodes[3]={type:2,children:[4,5,6,7]},this.rules[29].opcodes[4]={type:4,index:3},this.rules[29].opcodes[5]={type:4,index:90},this.rules[29].opcodes[6]={type:4,index:3},this.rules[29].opcodes[7]={type:4,index:30},this.rules[30].opcodes=[],this.rules[30].opcodes[0]={type:1,children:[1,2,3]},this.rules[30].opcodes[1]={type:4,index:31},this.rules[30].opcodes[2]={type:4,index:37},this.rules[30].opcodes[3]={type:4,index:33},this.rules[31].opcodes=[],this.rules[31].opcodes[0]={type:2,children:[1,5,6,7,8,9]},this.rules[31].opcodes[1]={type:3,min:0,max:1},this.rules[31].opcodes[2]={type:2,children:[3,4]},this.rules[31].opcodes[3]={type:4,index:32},this.rules[31].opcodes[4]={type:4,index:3},this.rules[31].opcodes[5]={type:4,index:82},this.rules[31].opcodes[6]={type:4,index:3},this.rules[31].opcodes[7]={type:4,index:27},this.rules[31].opcodes[8]={type:4,index:3},this.rules[31].opcodes[9]={type:4,index:83},this.rules[32].opcodes=[],this.rules[32].opcodes[0]={type:7,string:[33]},this.rules[33].opcodes=[],this.rules[33].opcodes[0]={type:2,children:[1,5]},this.rules[33].opcodes[1]={type:3,min:0,max:1},this.rules[33].opcodes[2]={type:2,children:[3,4]},this.rules[33].opcodes[3]={type:4,index:32},this.rules[33].opcodes[4]={type:4,index:3},this.rules[33].opcodes[5]={type:1,children:[6,7]},this.rules[33].opcodes[6]={type:4,index:34},this.rules[33].opcodes[7]={type:4,index:57},this.rules[34].opcodes=[],this.rules[34].opcodes[0]={type:1,children:[1,2]},this.rules[34].opcodes[1]={type:4,index:35},this.rules[34].opcodes[2]={type:4,index:0},this.rules[35].opcodes=[],this.rules[35].opcodes[0]={type:2,children:[1,2]},this.rules[35].opcodes[1]={type:4,index:36},this.rules[35].opcodes[2]={type:4,index:1},this.rules[36].opcodes=[],this.rules[36].opcodes[0]={type:7,string:[64]},this.rules[37].opcodes=[],this.rules[37].opcodes[0]={type:2,children:[1,2,3,4,5]},this.rules[37].opcodes[1]={type:4,index:39},this.rules[37].opcodes[2]={type:4,index:3},this.rules[37].opcodes[3]={type:4,index:40},this.rules[37].opcodes[4]={type:4,index:3},this.rules[37].opcodes[5]={type:4,index:39},this.rules[38].opcodes=[],this.rules[38].opcodes[0]={type:1,children:[1,2,3,4,5]},this.rules[38].opcodes[1]={type:4,index:47},this.rules[38].opcodes[2]={type:4,index:7},this.rules[38].opcodes[3]={type:4,index:50},this.rules[38].opcodes[4]={type:4,index:51},this.rules[38].opcodes[5]={type:4,index:52},this.rules[39].opcodes=[],this.rules[39].opcodes[0]={type:1,children:[1,2,3]},this.rules[39].opcodes[1]={type:4,index:41},this.rules[39].opcodes[2]={type:4,index:57},this.rules[39].opcodes[3]={type:4,index:38},this.rules[40].opcodes=[],this.rules[40].opcodes[0]={type:1,children:[1,2,3,4,5,6]},this.rules[40].opcodes[1]={type:7,string:[61,61]},this.rules[40].opcodes[2]={type:7,string:[33,61]},this.rules[40].opcodes[3]={type:7,string:[60,61]},this.rules[40].opcodes[4]={type:7,string:[62,61]},this.rules[40].opcodes[5]={type:7,string:[60]},this.rules[40].opcodes[6]={type:7,string:[62]},this.rules[41].opcodes=[],this.rules[41].opcodes[0]={type:1,children:[1,2]},this.rules[41].opcodes[1]={type:4,index:42},this.rules[41].opcodes[2]={type:4,index:43},this.rules[42].opcodes=[],this.rules[42].opcodes[0]={type:2,children:[1,2]},this.rules[42].opcodes[1]={type:4,index:36},this.rules[42].opcodes[2]={type:4,index:44},this.rules[43].opcodes=[],this.rules[43].opcodes[0]={type:2,children:[1,2]},this.rules[43].opcodes[1]={type:4,index:4},this.rules[43].opcodes[2]={type:4,index:44},this.rules[44].opcodes=[],this.rules[44].opcodes[0]={type:3,min:0,max:1/0},this.rules[44].opcodes[1]={type:2,children:[2,3]},this.rules[44].opcodes[2]={type:4,index:3},this.rules[44].opcodes[3]={type:1,children:[4,5]},this.rules[44].opcodes[4]={type:4,index:45},this.rules[44].opcodes[5]={type:4,index:46},this.rules[45].opcodes=[],this.rules[45].opcodes[0]={type:1,children:[1,5]},this.rules[45].opcodes[1]={type:2,children:[2,3,4]},this.rules[45].opcodes[2]={type:4,index:80},this.rules[45].opcodes[3]={type:4,index:6},this.rules[45].opcodes[4]={type:4,index:81},this.rules[45].opcodes[5]={type:2,children:[6,7]},this.rules[45].opcodes[6]={type:4,index:78},this.rules[45].opcodes[7]={type:4,index:62},this.rules[46].opcodes=[],this.rules[46].opcodes[0]={type:2,children:[1,2,3]},this.rules[46].opcodes[1]={type:4,index:80},this.rules[46].opcodes[2]={type:4,index:19},this.rules[46].opcodes[3]={type:4,index:81},this.rules[47].opcodes=[],this.rules[47].opcodes[0]={type:2,children:[1,4,6]},this.rules[47].opcodes[1]={type:1,children:[2,3]},this.rules[47].opcodes[2]={type:4,index:20},this.rules[47].opcodes[3]={type:7,string:[45,48]},this.rules[47].opcodes[4]={type:3,min:0,max:1},this.rules[47].opcodes[5]={type:4,index:48},this.rules[47].opcodes[6]={type:3,min:0,max:1},this.rules[47].opcodes[7]={type:4,index:49},this.rules[48].opcodes=[],this.rules[48].opcodes[0]={type:2,children:[1,2]},this.rules[48].opcodes[1]={type:7,string:[46]},this.rules[48].opcodes[2]={type:3,min:1,max:1/0},this.rules[48].opcodes[3]={type:4,index:65},this.rules[49].opcodes=[],this.rules[49].opcodes[0]={type:2,children:[1,2,6]},this.rules[49].opcodes[1]={type:7,string:[101]},this.rules[49].opcodes[2]={type:3,min:0,max:1},this.rules[49].opcodes[3]={type:1,children:[4,5]},this.rules[49].opcodes[4]={type:7,string:[45]},this.rules[49].opcodes[5]={type:7,string:[43]},this.rules[49].opcodes[6]={type:3,min:1,max:1/0},this.rules[49].opcodes[7]={type:4,index:65},this.rules[50].opcodes=[],this.rules[50].opcodes[0]={type:6,string:[116,114,117,101]},this.rules[51].opcodes=[],this.rules[51].opcodes[0]={type:6,string:[102,97,108,115,101]},this.rules[52].opcodes=[],this.rules[52].opcodes[0]={type:6,string:[110,117,108,108]},this.rules[53].opcodes=[],this.rules[53].opcodes[0]={type:2,children:[1,2]},this.rules[53].opcodes[1]={type:4,index:54},this.rules[53].opcodes[2]={type:3,min:0,max:1/0},this.rules[53].opcodes[3]={type:4,index:55},this.rules[54].opcodes=[],this.rules[54].opcodes[0]={type:4,index:56},this.rules[55].opcodes=[],this.rules[55].opcodes[0]={type:1,children:[1,2,3]},this.rules[55].opcodes[1]={type:4,index:54},this.rules[55].opcodes[2]={type:7,string:[95]},this.rules[55].opcodes[3]={type:4,index:65},this.rules[56].opcodes=[],this.rules[56].opcodes[0]={type:5,min:97,max:122},this.rules[57].opcodes=[],this.rules[57].opcodes[0]={type:2,children:[1,2,3,4,13,14]},this.rules[57].opcodes[1]={type:4,index:53},this.rules[57].opcodes[2]={type:4,index:82},this.rules[57].opcodes[3]={type:4,index:3},this.rules[57].opcodes[4]={type:3,min:0,max:1},this.rules[57].opcodes[5]={type:2,children:[6,7]},this.rules[57].opcodes[6]={type:4,index:58},this.rules[57].opcodes[7]={type:3,min:0,max:1/0},this.rules[57].opcodes[8]={type:2,children:[9,10,11,12]},this.rules[57].opcodes[9]={type:4,index:3},this.rules[57].opcodes[10]={type:4,index:84},this.rules[57].opcodes[11]={type:4,index:3},this.rules[57].opcodes[12]={type:4,index:58},this.rules[57].opcodes[13]={type:4,index:3},this.rules[57].opcodes[14]={type:4,index:83},this.rules[58].opcodes=[],this.rules[58].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[58].opcodes[1]={type:4,index:27},this.rules[58].opcodes[2]={type:4,index:34},this.rules[58].opcodes[3]={type:4,index:57},this.rules[58].opcodes[4]={type:4,index:38},this.rules[59].opcodes=[],this.rules[59].opcodes[0]={type:1,children:[1,2]},this.rules[59].opcodes[1]={type:4,index:60},this.rules[59].opcodes[2]={type:4,index:67},this.rules[60].opcodes=[],this.rules[60].opcodes[0]={type:1,children:[1,2]},this.rules[60].opcodes[1]={type:4,index:61},this.rules[60].opcodes[2]={type:2,children:[3,4]},this.rules[60].opcodes[3]={type:4,index:78},this.rules[60].opcodes[4]={type:1,children:[5,6]},this.rules[60].opcodes[5]={type:4,index:18},this.rules[60].opcodes[6]={type:4,index:62},this.rules[61].opcodes=[],this.rules[61].opcodes[0]={type:2,children:[1,2,3,4,10,11]},this.rules[61].opcodes[1]={type:4,index:80},this.rules[61].opcodes[2]={type:4,index:3},this.rules[61].opcodes[3]={type:4,index:5},this.rules[61].opcodes[4]={type:3,min:0,max:1/0},this.rules[61].opcodes[5]={type:2,children:[6,7,8,9]},this.rules[61].opcodes[6]={type:4,index:3},this.rules[61].opcodes[7]={type:4,index:84},this.rules[61].opcodes[8]={type:4,index:3},this.rules[61].opcodes[9]={type:4,index:5},this.rules[61].opcodes[10]={type:4,index:3},this.rules[61].opcodes[11]={type:4,index:81},this.rules[62].opcodes=[],this.rules[62].opcodes[0]={type:2,children:[1,2]},this.rules[62].opcodes[1]={type:4,index:63},this.rules[62].opcodes[2]={type:3,min:0,max:1/0},this.rules[62].opcodes[3]={type:4,index:64},this.rules[63].opcodes=[],this.rules[63].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[63].opcodes[1]={type:4,index:66},this.rules[63].opcodes[2]={type:7,string:[95]},this.rules[63].opcodes[3]={type:5,min:128,max:55295},this.rules[63].opcodes[4]={type:5,min:57344,max:1114111},this.rules[64].opcodes=[],this.rules[64].opcodes[0]={type:1,children:[1,2]},this.rules[64].opcodes[1]={type:4,index:63},this.rules[64].opcodes[2]={type:4,index:65},this.rules[65].opcodes=[],this.rules[65].opcodes[0]={type:5,min:48,max:57},this.rules[66].opcodes=[],this.rules[66].opcodes[0]={type:1,children:[1,2]},this.rules[66].opcodes[1]={type:5,min:65,max:90},this.rules[66].opcodes[2]={type:5,min:97,max:122},this.rules[67].opcodes=[],this.rules[67].opcodes[0]={type:2,children:[1,2]},this.rules[67].opcodes[1]={type:4,index:79},this.rules[67].opcodes[2]={type:1,children:[3,4,5]},this.rules[67].opcodes[3]={type:4,index:61},this.rules[67].opcodes[4]={type:4,index:18},this.rules[67].opcodes[5]={type:4,index:62},this.rules[68].opcodes=[],this.rules[68].opcodes[0]={type:2,children:[1,2]},this.rules[68].opcodes[1]={type:4,index:4},this.rules[68].opcodes[2]={type:3,min:0,max:1/0},this.rules[68].opcodes[3]={type:4,index:69},this.rules[69].opcodes=[],this.rules[69].opcodes[0]={type:2,children:[1,2,3]},this.rules[69].opcodes[1]={type:4,index:80},this.rules[69].opcodes[2]={type:4,index:70},this.rules[69].opcodes[3]={type:4,index:81},this.rules[70].opcodes=[],this.rules[70].opcodes[0]={type:1,children:[1,2]},this.rules[70].opcodes[1]={type:4,index:71},this.rules[70].opcodes[2]={type:4,index:77},this.rules[71].opcodes=[],this.rules[71].opcodes[0]={type:2,children:[1,2,4]},this.rules[71].opcodes[1]={type:4,index:87},this.rules[71].opcodes[2]={type:3,min:0,max:1/0},this.rules[71].opcodes[3]={type:4,index:72},this.rules[71].opcodes[4]={type:4,index:87},this.rules[72].opcodes=[],this.rules[72].opcodes[0]={type:1,children:[1,2]},this.rules[72].opcodes[1]={type:4,index:73},this.rules[72].opcodes[2]={type:2,children:[3,4]},this.rules[72].opcodes[3]={type:4,index:10},this.rules[72].opcodes[4]={type:4,index:74},this.rules[73].opcodes=[],this.rules[73].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[73].opcodes[1]={type:5,min:32,max:38},this.rules[73].opcodes[2]={type:5,min:40,max:91},this.rules[73].opcodes[3]={type:5,min:93,max:55295},this.rules[73].opcodes[4]={type:5,min:57344,max:1114111},this.rules[74].opcodes=[],this.rules[74].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8]},this.rules[74].opcodes[1]={type:6,string:[98]},this.rules[74].opcodes[2]={type:6,string:[102]},this.rules[74].opcodes[3]={type:6,string:[110]},this.rules[74].opcodes[4]={type:6,string:[114]},this.rules[74].opcodes[5]={type:6,string:[116]},this.rules[74].opcodes[6]={type:7,string:[39]},this.rules[74].opcodes[7]={type:7,string:[92]},this.rules[74].opcodes[8]={type:2,children:[9,10]},this.rules[74].opcodes[9]={type:6,string:[117]},this.rules[74].opcodes[10]={type:4,index:75},this.rules[75].opcodes=[],this.rules[75].opcodes[0]={type:2,children:[1,2,3]},this.rules[75].opcodes[1]={type:7,string:[48]},this.rules[75].opcodes[2]={type:7,string:[48]},this.rules[75].opcodes[3]={type:1,children:[4,7,10,13]},this.rules[75].opcodes[4]={type:2,children:[5,6]},this.rules[75].opcodes[5]={type:7,string:[48]},this.rules[75].opcodes[6]={type:5,min:48,max:55},this.rules[75].opcodes[7]={type:2,children:[8,9]},this.rules[75].opcodes[8]={type:7,string:[48]},this.rules[75].opcodes[9]={type:6,string:[98]},this.rules[75].opcodes[10]={type:2,children:[11,12]},this.rules[75].opcodes[11]={type:7,string:[48]},this.rules[75].opcodes[12]={type:5,min:101,max:102},this.rules[75].opcodes[13]={type:2,children:[14,15]},this.rules[75].opcodes[14]={type:7,string:[49]},this.rules[75].opcodes[15]={type:4,index:76},this.rules[76].opcodes=[],this.rules[76].opcodes[0]={type:1,children:[1,2]},this.rules[76].opcodes[1]={type:4,index:65},this.rules[76].opcodes[2]={type:5,min:97,max:102},this.rules[77].opcodes=[],this.rules[77].opcodes[0]={type:1,children:[1,2]},this.rules[77].opcodes[1]={type:7,string:[48]},this.rules[77].opcodes[2]={type:2,children:[3,4]},this.rules[77].opcodes[3]={type:4,index:21},this.rules[77].opcodes[4]={type:3,min:0,max:1/0},this.rules[77].opcodes[5]={type:4,index:65},this.rules[78].opcodes=[],this.rules[78].opcodes[0]={type:7,string:[46]},this.rules[79].opcodes=[],this.rules[79].opcodes[0]={type:7,string:[46,46]},this.rules[80].opcodes=[],this.rules[80].opcodes[0]={type:7,string:[91]},this.rules[81].opcodes=[],this.rules[81].opcodes[0]={type:7,string:[93]},this.rules[82].opcodes=[],this.rules[82].opcodes[0]={type:7,string:[40]},this.rules[83].opcodes=[],this.rules[83].opcodes[0]={type:7,string:[41]},this.rules[84].opcodes=[],this.rules[84].opcodes[0]={type:7,string:[44]},this.rules[85].opcodes=[],this.rules[85].opcodes[0]={type:7,string:[58]},this.rules[86].opcodes=[],this.rules[86].opcodes[0]={type:6,string:[34]},this.rules[87].opcodes=[],this.rules[87].opcodes[0]={type:6,string:[39]},this.rules[88].opcodes=[],this.rules[88].opcodes[0]={type:7,string:[63]},this.rules[89].opcodes=[],this.rules[89].opcodes[0]={type:7,string:[124,124]},this.rules[90].opcodes=[],this.rules[90].opcodes[0]={type:7,string:[38,38]},this.toString=function(){let e="";return e+="; JSONPath: Query Expressions for JSON\n",e+="; https://www.rfc-editor.org/rfc/rfc9535\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.1.1\n",e+="jsonpath-query = root-identifier segments\n",e+="segments = *(S segment)\n",e+="\n",e+="B = %x20 / ; Space\n",e+=" %x09 / ; Horizontal tab\n",e+=" %x0A / ; Line feed or New line\n",e+=" %x0D ; Carriage return\n",e+="S = *B ; optional blank space\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.2.1\n",e+='root-identifier = "$"\n',e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3\n",e+="selector = name-selector /\n",e+=" wildcard-selector /\n",e+=" slice-selector /\n",e+=" index-selector /\n",e+=" filter-selector\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.1.1\n",e+="name-selector = string-literal\n",e+="\n",e+='string-literal = dquote *double-quoted dquote / ; "string", MODIFICATION: surrogate text rule used\n',e+=" squote *single-quoted squote ; 'string', MODIFICATION: surrogate text rule used\n",e+="\n",e+="double-quoted = unescaped /\n",e+=" %x27 / ; '\n",e+=' ESC %x22 / ; \\"\n',e+=" ESC escapable\n",e+="\n",e+="single-quoted = unescaped /\n",e+=' %x22 / ; "\n',e+=" ESC %x27 / ; \\'\n",e+=" ESC escapable\n",e+="\n",e+="ESC = %x5C ; \\ backslash\n",e+="\n",e+="unescaped = %x20-21 / ; see RFC 8259\n",e+=' ; omit 0x22 "\n',e+=" %x23-26 /\n",e+=" ; omit 0x27 '\n",e+=" %x28-5B /\n",e+=" ; omit 0x5C \\\n",e+=" %x5D-D7FF /\n",e+=" ; skip surrogate code points\n",e+=" %xE000-10FFFF\n",e+="\n",e+="escapable = %x62 / ; b BS backspace U+0008\n",e+=" %x66 / ; f FF form feed U+000C\n",e+=" %x6E / ; n LF line feed U+000A\n",e+=" %x72 / ; r CR carriage return U+000D\n",e+=" %x74 / ; t HT horizontal tab U+0009\n",e+=' "/" / ; / slash (solidus) U+002F\n',e+=' "\\" / ; \\ backslash (reverse solidus) U+005C\n',e+=" (%x75 hexchar) ; uXXXX U+XXXX\n",e+="\n",e+="hexchar = non-surrogate /\n",e+=' (high-surrogate "\\" %x75 low-surrogate)\n',e+='non-surrogate = ((DIGIT / "A"/"B"/"C" / "E"/"F") 3HEXDIG) /\n',e+=' ("D" %x30-37 2HEXDIG )\n',e+='high-surrogate = "D" ("8"/"9"/"A"/"B") 2HEXDIG\n',e+='low-surrogate = "D" ("C"/"D"/"E"/"F") 2HEXDIG\n',e+="\n",e+='HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"\n',e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.2.1\n",e+='wildcard-selector = "*"\n',e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.3.1\n",e+="index-selector = int ; decimal integer\n",e+="\n",e+='int = "0" /\n',e+=' (["-"] DIGIT1 *DIGIT) ; - optional\n',e+="DIGIT1 = %x31-39 ; 1-9 non-zero digit\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.4.1\n",e+="slice-selector = [start S] colon S [end S] [colon [S step ]] ; MODIFICATION: surrogate text rule used\n",e+="\n",e+="start = int ; included in selection\n",e+="end = int ; not included in selection\n",e+="step = int ; default: 1\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.5.1\n",e+="filter-selector = questionmark S logical-expr ; MODIFICATION: surrogate text rule used\n",e+="\n",e+="logical-expr = logical-or-expr\n",e+="logical-or-expr = logical-and-expr *(S disjunction S logical-and-expr) ; MODIFICATION: surrogate text rule used\n",e+=" ; disjunction\n",e+=" ; binds less tightly than conjunction\n",e+="logical-and-expr = basic-expr *(S conjunction S basic-expr) ; MODIFICATION: surrogate text rule used\n",e+=" ; conjunction\n",e+=" ; binds more tightly than disjunction\n",e+="\n",e+="basic-expr = paren-expr /\n",e+=" comparison-expr /\n",e+=" test-expr\n",e+="\n",e+="paren-expr = [logical-not-op S] left-paren S logical-expr S right-paren ; MODIFICATION: surrogate text rule used\n",e+=" ; parenthesized expression\n",e+='logical-not-op = "!" ; logical NOT operator\n',e+="\n",e+="test-expr = [logical-not-op S]\n",e+=" (filter-query / ; existence/non-existence\n",e+=" function-expr) ; LogicalType or NodesType\n",e+="filter-query = rel-query / jsonpath-query\n",e+="rel-query = current-node-identifier segments\n",e+='current-node-identifier = "@"\n',e+="\n",e+="comparison-expr = comparable S comparison-op S comparable\n",e+="literal = number / string-literal /\n",e+=" true / false / null\n",e+="comparable = singular-query / ; singular query value\n",e+=" function-expr / ; ValueType\n",e+=" literal\n",e+=" ; MODIFICATION: https://www.rfc-editor.org/errata/eid8352\n",e+='comparison-op = "==" / "!=" /\n',e+=' "<=" / ">=" /\n',e+=' "<" / ">"\n',e+="\n",e+="singular-query = rel-singular-query / abs-singular-query\n",e+="rel-singular-query = current-node-identifier singular-query-segments\n",e+="abs-singular-query = root-identifier singular-query-segments\n",e+="singular-query-segments = *(S (name-segment / index-segment))\n",e+="name-segment = (left-bracket name-selector right-bracket) / ; MODIFICATION: surrogate text rule used\n",e+=" (dot-prefix member-name-shorthand) ; MODIFICATION: surrogate text rule used\n",e+="index-segment = left-bracket index-selector right-bracket ; MODIFICATION: surrogate text rule used\n",e+="\n",e+='number = (int / "-0") [ frac ] [ exp ] ; decimal number\n',e+='frac = "." 1*DIGIT ; decimal fraction\n',e+='exp = "e" [ "-" / "+" ] 1*DIGIT ; decimal exponent\n',e+="true = %x74.72.75.65 ; true\n",e+="false = %x66.61.6c.73.65 ; false\n",e+="null = %x6e.75.6c.6c ; null\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.4\n",e+="function-name = function-name-first *function-name-char\n",e+="function-name-first = LCALPHA\n",e+='function-name-char = function-name-first / "_" / DIGIT\n',e+='LCALPHA = %x61-7A ; "a".."z"\n',e+="\n",e+="function-expr = function-name left-paren S [function-argument ; MODIFICATION: surrogate text rule used\n",e+=" *(S comma S function-argument)] S right-paren ; MODIFICATION: surrogate text rule used\n",e+="function-argument = logical-expr / ; MODIFICATION: https://www.rfc-editor.org/errata/eid8343\n",e+=" filter-query / ; (includes singular-query)\n",e+=" function-expr /\n",e+=" literal\n",e+="\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.5\n",e+="segment = child-segment / descendant-segment\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.5.1.1\n",e+="child-segment = bracketed-selection /\n",e+=" (dot-prefix ; MODIFICATION: surrogate text rule used\n",e+=" (wildcard-selector /\n",e+=" member-name-shorthand))\n",e+="\n",e+="bracketed-selection = left-bracket S selector *(S comma S selector) S right-bracket\n",e+=" ; MODIFICATION: surrogate text rule used\n",e+="\n",e+="member-name-shorthand = name-first *name-char\n",e+="name-first = ALPHA /\n",e+=' "_" /\n',e+=" %x80-D7FF /\n",e+=" ; skip surrogate code points\n",e+=" %xE000-10FFFF\n",e+="name-char = name-first / DIGIT\n",e+="\n",e+="DIGIT = %x30-39 ; 0-9\n",e+="ALPHA = %x41-5A / %x61-7A ; A-Z / a-z\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#section-2.5.2.1\n",e+="descendant-segment = double-dot-prefix (bracketed-selection / ; MODIFICATION: surrogate text rule used\n",e+=" wildcard-selector /\n",e+=" member-name-shorthand)\n",e+="\n",e+="; https://www.rfc-editor.org/rfc/rfc9535#name-normalized-paths\n",e+="normalized-path = root-identifier *(normal-index-segment)\n",e+="normal-index-segment = left-bracket normal-selector right-bracket ; MODIFICATION: surrogate text rule used\n",e+="normal-selector = normal-name-selector / normal-index-selector\n",e+="normal-name-selector = squote *normal-single-quoted squote ; 'string', MODIFICATION: surrogate text rule used\n",e+="normal-single-quoted = normal-unescaped /\n",e+=" ESC normal-escapable\n",e+="normal-unescaped = ; omit %x0-1F control codes\n",e+=" %x20-26 /\n",e+=" ; omit 0x27 '\n",e+=" %x28-5B /\n",e+=" ; omit 0x5C \\\n",e+=" %x5D-D7FF /\n",e+=" ; skip surrogate code points\n",e+=" %xE000-10FFFF\n",e+="\n",e+="normal-escapable = %x62 / ; b BS backspace U+0008\n",e+=" %x66 / ; f FF form feed U+000C\n",e+=" %x6E / ; n LF line feed U+000A\n",e+=" %x72 / ; r CR carriage return U+000D\n",e+=" %x74 / ; t HT horizontal tab U+0009\n",e+=" \"'\" / ; ' apostrophe U+0027\n",e+=' "\\" / ; \\ backslash (reverse solidus) U+005C\n',e+=" (%x75 normal-hexchar)\n",e+=" ; certain values u00xx U+00XX\n",e+='normal-hexchar = "0" "0"\n',e+=" (\n",e+=' ("0" %x30-37) / ; "00"-"07"\n',e+=" ; omit U+0008-U+000A BS HT LF\n",e+=' ("0" %x62) / ; "0b"\n',e+=" ; omit U+000C-U+000D FF CR\n",e+=' ("0" %x65-66) / ; "0e"-"0f"\n',e+=' ("1" normal-HEXDIG)\n',e+=" )\n",e+='normal-HEXDIG = DIGIT / %x61-66 ; "0"-"9", "a"-"f"\n',e+='normal-index-selector = "0" / (DIGIT1 *DIGIT)\n',e+=" ; non-negative decimal integer\n",e+="\n",e+="; Surrogate named rules\n",e+='dot-prefix = "."\n',e+='double-dot-prefix = ".."\n',e+='left-bracket = "["\n',e+='right-bracket = "]"\n',e+='left-paren = "("\n',e+='right-paren = ")"\n',e+='comma = ","\n',e+='colon = ":"\n',e+='dquote = %x22 ; "\n',e+="squote = %x27 ; '\n",e+='questionmark = "?"\n',e+='disjunction = "||"\n',e+='conjunction = "&&"\n','; JSONPath: Query Expressions for JSON\n; https://www.rfc-editor.org/rfc/rfc9535\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.1.1\njsonpath-query = root-identifier segments\nsegments = *(S segment)\n\nB = %x20 / ; Space\n %x09 / ; Horizontal tab\n %x0A / ; Line feed or New line\n %x0D ; Carriage return\nS = *B ; optional blank space\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.2.1\nroot-identifier = "$"\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3\nselector = name-selector /\n wildcard-selector /\n slice-selector /\n index-selector /\n filter-selector\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.1.1\nname-selector = string-literal\n\nstring-literal = dquote *double-quoted dquote / ; "string", MODIFICATION: surrogate text rule used\n squote *single-quoted squote ; \'string\', MODIFICATION: surrogate text rule used\n\ndouble-quoted = unescaped /\n %x27 / ; \'\n ESC %x22 / ; \\"\n ESC escapable\n\nsingle-quoted = unescaped /\n %x22 / ; "\n ESC %x27 / ; \\\'\n ESC escapable\n\nESC = %x5C ; \\ backslash\n\nunescaped = %x20-21 / ; see RFC 8259\n ; omit 0x22 "\n %x23-26 /\n ; omit 0x27 \'\n %x28-5B /\n ; omit 0x5C \\\n %x5D-D7FF /\n ; skip surrogate code points\n %xE000-10FFFF\n\nescapable = %x62 / ; b BS backspace U+0008\n %x66 / ; f FF form feed U+000C\n %x6E / ; n LF line feed U+000A\n %x72 / ; r CR carriage return U+000D\n %x74 / ; t HT horizontal tab U+0009\n "/" / ; / slash (solidus) U+002F\n "\\" / ; \\ backslash (reverse solidus) U+005C\n (%x75 hexchar) ; uXXXX U+XXXX\n\nhexchar = non-surrogate /\n (high-surrogate "\\" %x75 low-surrogate)\nnon-surrogate = ((DIGIT / "A"/"B"/"C" / "E"/"F") 3HEXDIG) /\n ("D" %x30-37 2HEXDIG )\nhigh-surrogate = "D" ("8"/"9"/"A"/"B") 2HEXDIG\nlow-surrogate = "D" ("C"/"D"/"E"/"F") 2HEXDIG\n\nHEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.2.1\nwildcard-selector = "*"\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.3.1\nindex-selector = int ; decimal integer\n\nint = "0" /\n (["-"] DIGIT1 *DIGIT) ; - optional\nDIGIT1 = %x31-39 ; 1-9 non-zero digit\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.4.1\nslice-selector = [start S] colon S [end S] [colon [S step ]] ; MODIFICATION: surrogate text rule used\n\nstart = int ; included in selection\nend = int ; not included in selection\nstep = int ; default: 1\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.3.5.1\nfilter-selector = questionmark S logical-expr ; MODIFICATION: surrogate text rule used\n\nlogical-expr = logical-or-expr\nlogical-or-expr = logical-and-expr *(S disjunction S logical-and-expr) ; MODIFICATION: surrogate text rule used\n ; disjunction\n ; binds less tightly than conjunction\nlogical-and-expr = basic-expr *(S conjunction S basic-expr) ; MODIFICATION: surrogate text rule used\n ; conjunction\n ; binds more tightly than disjunction\n\nbasic-expr = paren-expr /\n comparison-expr /\n test-expr\n\nparen-expr = [logical-not-op S] left-paren S logical-expr S right-paren ; MODIFICATION: surrogate text rule used\n ; parenthesized expression\nlogical-not-op = "!" ; logical NOT operator\n\ntest-expr = [logical-not-op S]\n (filter-query / ; existence/non-existence\n function-expr) ; LogicalType or NodesType\nfilter-query = rel-query / jsonpath-query\nrel-query = current-node-identifier segments\ncurrent-node-identifier = "@"\n\ncomparison-expr = comparable S comparison-op S comparable\nliteral = number / string-literal /\n true / false / null\ncomparable = singular-query / ; singular query value\n function-expr / ; ValueType\n literal\n ; MODIFICATION: https://www.rfc-editor.org/errata/eid8352\ncomparison-op = "==" / "!=" /\n "<=" / ">=" /\n "<" / ">"\n\nsingular-query = rel-singular-query / abs-singular-query\nrel-singular-query = current-node-identifier singular-query-segments\nabs-singular-query = root-identifier singular-query-segments\nsingular-query-segments = *(S (name-segment / index-segment))\nname-segment = (left-bracket name-selector right-bracket) / ; MODIFICATION: surrogate text rule used\n (dot-prefix member-name-shorthand) ; MODIFICATION: surrogate text rule used\nindex-segment = left-bracket index-selector right-bracket ; MODIFICATION: surrogate text rule used\n\nnumber = (int / "-0") [ frac ] [ exp ] ; decimal number\nfrac = "." 1*DIGIT ; decimal fraction\nexp = "e" [ "-" / "+" ] 1*DIGIT ; decimal exponent\ntrue = %x74.72.75.65 ; true\nfalse = %x66.61.6c.73.65 ; false\nnull = %x6e.75.6c.6c ; null\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.4\nfunction-name = function-name-first *function-name-char\nfunction-name-first = LCALPHA\nfunction-name-char = function-name-first / "_" / DIGIT\nLCALPHA = %x61-7A ; "a".."z"\n\nfunction-expr = function-name left-paren S [function-argument ; MODIFICATION: surrogate text rule used\n *(S comma S function-argument)] S right-paren ; MODIFICATION: surrogate text rule used\nfunction-argument = logical-expr / ; MODIFICATION: https://www.rfc-editor.org/errata/eid8343\n filter-query / ; (includes singular-query)\n function-expr /\n literal\n\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.5\nsegment = child-segment / descendant-segment\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.5.1.1\nchild-segment = bracketed-selection /\n (dot-prefix ; MODIFICATION: surrogate text rule used\n (wildcard-selector /\n member-name-shorthand))\n\nbracketed-selection = left-bracket S selector *(S comma S selector) S right-bracket\n ; MODIFICATION: surrogate text rule used\n\nmember-name-shorthand = name-first *name-char\nname-first = ALPHA /\n "_" /\n %x80-D7FF /\n ; skip surrogate code points\n %xE000-10FFFF\nname-char = name-first / DIGIT\n\nDIGIT = %x30-39 ; 0-9\nALPHA = %x41-5A / %x61-7A ; A-Z / a-z\n\n; https://www.rfc-editor.org/rfc/rfc9535#section-2.5.2.1\ndescendant-segment = double-dot-prefix (bracketed-selection / ; MODIFICATION: surrogate text rule used\n wildcard-selector /\n member-name-shorthand)\n\n; https://www.rfc-editor.org/rfc/rfc9535#name-normalized-paths\nnormalized-path = root-identifier *(normal-index-segment)\nnormal-index-segment = left-bracket normal-selector right-bracket ; MODIFICATION: surrogate text rule used\nnormal-selector = normal-name-selector / normal-index-selector\nnormal-name-selector = squote *normal-single-quoted squote ; \'string\', MODIFICATION: surrogate text rule used\nnormal-single-quoted = normal-unescaped /\n ESC normal-escapable\nnormal-unescaped = ; omit %x0-1F control codes\n %x20-26 /\n ; omit 0x27 \'\n %x28-5B /\n ; omit 0x5C \\\n %x5D-D7FF /\n ; skip surrogate code points\n %xE000-10FFFF\n\nnormal-escapable = %x62 / ; b BS backspace U+0008\n %x66 / ; f FF form feed U+000C\n %x6E / ; n LF line feed U+000A\n %x72 / ; r CR carriage return U+000D\n %x74 / ; t HT horizontal tab U+0009\n "\'" / ; \' apostrophe U+0027\n "\\" / ; \\ backslash (reverse solidus) U+005C\n (%x75 normal-hexchar)\n ; certain values u00xx U+00XX\nnormal-hexchar = "0" "0"\n (\n ("0" %x30-37) / ; "00"-"07"\n ; omit U+0008-U+000A BS HT LF\n ("0" %x62) / ; "0b"\n ; omit U+000C-U+000D FF CR\n ("0" %x65-66) / ; "0e"-"0f"\n ("1" normal-HEXDIG)\n )\nnormal-HEXDIG = DIGIT / %x61-66 ; "0"-"9", "a"-"f"\nnormal-index-selector = "0" / (DIGIT1 *DIGIT)\n ; non-negative decimal integer\n\n; Surrogate named rules\ndot-prefix = "."\ndouble-dot-prefix = ".."\nleft-bracket = "["\nright-bracket = "]"\nleft-paren = "("\nright-paren = ")"\ncomma = ","\ncolon = ":"\ndquote = %x22 ; "\nsquote = %x27 ; \'\nquestionmark = "?"\ndisjunction = "||"\nconjunction = "&&"\n'}};const zs=e=>{if("string"!=typeof e)throw new TypeError("Selector must be a string");let t="";for(const s of e){const e=s.codePointAt(0);switch(e){case 8:t+="\\b";break;case 9:t+="\\t";break;case 10:t+="\\n";break;case 12:t+="\\f";break;case 13:t+="\\r";break;case 39:t+="\\'";break;case 92:t+="\\\\";break;default:t+=e<=31?`\\u${e.toString(16).padStart(4,"0")}`:s}}return t};const Xs=class extends Gs{},Ws=e=>{if(!Array.isArray(e))throw new Xs("Selectors must be an array, got: "+typeof e,{selectors:e});try{return`$${e.map(e=>{if("string"==typeof e)return`['${zs(e)}']`;if("number"==typeof e){if(!Number.isSafeInteger(e)||e<0)throw new TypeError(`Index selector must be a non-negative safe integer, got: ${e}`);return`[${e}]`}throw new TypeError("Selector must be a string or non-negative integer, got: "+typeof e)}).join("")}`}catch(t){throw new Xs("Failed to compile normalized JSONPath",{cause:t,selectors:e})}};class Ys{node;key;index;parent;parentPath;inList;#e=!1;#t=!1;#s=!1;#n=!1;#r;#i=!1;constructor(e,t,s,n,r){this.node=e,this.parent=t,this.parentPath=s,this.key=n,this.index=r&&"number"==typeof n?n:void 0,this.inList=r}get shouldSkip(){return this.#e}get shouldStop(){return this.#t}get removed(){return this.#s}isRoot(){return null===this.parentPath}get depth(){let e=0,t=this.parentPath;for(;null!==t;)e+=1,t=t.parentPath;return e}getAncestry(){const e=[];let t=this.parentPath;for(;null!==t;)e.push(t),t=t.parentPath;return e}getAncestorNodes(){return this.getAncestry().map(e=>e.node)}getPathKeys(){const e=[];let t=this;for(;null!==t&&void 0!==t.key;)e.unshift(t.key),t=t.parentPath;return e}formatPath(e="jsonpointer"){const t=this.getPathKeys();return 0===t.length?"jsonpath"===e?"$":"":"jsonpath"===e?Ws(t):Vs(t)}findParent(e){let t=this.parentPath;for(;null!==t;){if(e(t))return t;t=t.parentPath}return null}find(e){return e(this)?this:this.findParent(e)}skip(){this.#e=!0}stop(){this.#t=!0}replaceWith(e){this.#i&&console.warn("Warning: replaceWith() called on a stale Path. This path belongs to a node whose visit has already completed. The replacement will have no effect. To replace a parent node, do so from the parent's own visitor."),this.#n=!0,this.#r=e,this.node=e}remove(){this.#i&&console.warn("Warning: remove() called on a stale Path. This path belongs to a node whose visit has already completed. The removal will have no effect. To remove a parent node, do so from the parent's own visitor."),this.#s=!0}_getReplacementNode(){return this.#r}_wasReplaced(){return this.#n}_reset(){this.#e=!1,this.#t=!1,this.#s=!1,this.#n=!1,this.#r=void 0}_markStale(){this.#i=!0}}const Ks=Le(1,He(Ns,ne(Ie,he("[object Promise]")))),Zs=e=>{const t=e?.element;return void 0===t||"element"===t?"Element":`${t.charAt(0).toUpperCase()}${t.slice(1)}Element`},Qs=e=>Bt(e),en=e=>os(e),tn=(e,t,s)=>{Ht(e)?e.value=s:Array.isArray(e)?e[t]=null===s?void 0:s:null===s?delete e[t]:e[t]=s},sn=e=>Ht(e)?["key","value"]:Rt(e)||Ut(e)?["content"]:[],nn=(e,t)=>{if(void 0!==e[t])return e[t];const s=t.length;for(const n in e){if(!n.includes("|"))continue;const r=n.indexOf(t);if(-1===r)continue;const i=0===r||"|"===n[r-1],o=r+s===n.length||"|"===n[r+s];if(i&&o)return e[n]}},rn=(e,t,s)=>{if(void 0===t)return null;const n=e,r=s?"leave":"enter",i=nn(n,t);if(!s&&"function"==typeof i)return i;if(null!=i){const e=i[r];if("function"==typeof e)return e}const o=n[r];if("function"==typeof o)return o;if(null!=o){const e=nn(o,t);if("function"==typeof e)return e}return null},on=(e,t={})=>{const{visitFnGetter:s=rn,nodeTypeGetter:n=Zs,exposeEdits:r=!1}=t,i=Symbol("internal-skip"),o=Symbol("break"),c=new Array(e.length).fill(i);return{enter(t){let a=t.node,l=!1;for(let u=0;u<e.length;u+=1)if(c[u]===i){const i=s(e[u],n(a),!1);if("function"==typeof i){const s=an(t,a),n=i.call(e[u],s);if(Ks(n))throw new Kt("Async visitor not supported in sync mode",{visitor:e[u],visitFn:i});if(s.shouldStop){c[u]=o;break}if(s.shouldSkip&&(c[u]=a),s.removed)return void t.remove();if(s._wasReplaced()){const e=s._getReplacementNode();if(!r)return t.replaceWith(e),e;a=e,l=!0}else if(void 0!==n){if(!r)return t.replaceWith(n),n;a=n,l=!0}}}if(l)return t.replaceWith(a),a},leave(t){const r=t.node;for(let a=0;a<e.length;a+=1)if(c[a]===i){const i=s(e[a],n(r),!0);if("function"==typeof i){const s=an(t,r),n=i.call(e[a],s);if(Ks(n))throw new Kt("Async visitor not supported in sync mode",{visitor:e[a],visitFn:i});if(s.shouldStop){c[a]=o;break}if(s.removed)return void t.remove();if(s._wasReplaced()){const e=s._getReplacementNode();return t.replaceWith(e),e}if(void 0!==n)return t.replaceWith(n),n}}else c[a]===r&&(c[a]=i)}}},cn=(e,t={})=>{const{visitFnGetter:s=rn,nodeTypeGetter:n=Zs,exposeEdits:r=!1}=t,i=Symbol("internal-skip"),o=Symbol("break"),c=new Array(e.length).fill(i);return{async enter(t){let a=t.node,l=!1;for(let u=0;u<e.length;u+=1)if(c[u]===i){const i=s(e[u],n(a),!1);if("function"==typeof i){const s=an(t,a),n=await i.call(e[u],s);if(s.shouldStop){c[u]=o;break}if(s.shouldSkip&&(c[u]=a),s.removed)return void t.remove();if(s._wasReplaced()){const e=s._getReplacementNode();if(!r)return t.replaceWith(e),e;a=e,l=!0}else if(void 0!==n){if(!r)return t.replaceWith(n),n;a=n,l=!0}}}if(l)return t.replaceWith(a),a},async leave(t){const r=t.node;for(let a=0;a<e.length;a+=1)if(c[a]===i){const i=s(e[a],n(r),!0);if("function"==typeof i){const s=an(t,r),n=await i.call(e[a],s);if(s.shouldStop){c[a]=o;break}if(s.removed)return void t.remove();if(s._wasReplaced()){const e=s._getReplacementNode();return t.replaceWith(e),e}if(void 0!==n)return t.replaceWith(n),n}}else c[a]===r&&(c[a]=i)}}};function an(e,t){return new Ys(t,e.parent,e.parentPath,e.key,e.inList)}function*ln(e,t,s){const{keyMap:n,state:r,nodeTypeGetter:i,nodePredicate:o,nodeCloneFn:c,detectCycles:a,mutable:l,mutationFn:u}=s,p="function"==typeof n;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 O=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,O)if(l)for(const[e,t]of g)u(x,e,t);else if(m){x=x.slice();let e=0;for(const[t,s]of g){const n=t-e;null===s?(x.splice(n,1),e+=1):x[n]=s}}else{x=c(x);for(const[e,t]of g)x[e]=t}if(void 0!==h){y=h.index,f=h.keys,g=h.edits;const e=h.inArray;if(v=h.parentPath,h=h.prev,O&&!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 Kt(`Invalid AST Node: ${String(x)}`,{node:x});if(a&&w.includes(x))continue;b=new Ys(x,d,v,s,m);const n=rn(t,i(x),e);if(n){for(const[e,s]of Object.entries(r))t[e]=s;const i=yield{visitFn:n,path:b,isLeaving:e};if(b.shouldStop)break;if(b.shouldSkip&&!e)continue;if(b.removed){if(g.push([s,null]),!e)continue}else if(b._wasReplaced()){const t=b._getReplacementNode();if(g.push([s,t]),!e){if(!o(t))continue;x=t}}else if(void 0!==i&&(g.push([s,i]),!e)){if(!o(i))continue;x=i}b._markStale()}}if(!e){if(h={inArray:m,index:y,keys:f,edits:g,parentPath:v,prev:h},m=Array.isArray(x),m)f=x;else if(p)f=n(x);else{const e=i(x);f=void 0!==e?n[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}on[Symbol.for("nodejs.util.promisify.custom")]=cn;const un=(e,t,s={})=>{const n=ln(e,t,{keyMap:s.keyMap??sn,state:s.state??{},nodeTypeGetter:s.nodeTypeGetter??Zs,nodePredicate:s.nodePredicate??Qs,nodeCloneFn:s.nodeCloneFn??en,detectCycles:s.detectCycles??!0,mutable:s.mutable??!1,mutationFn:s.mutationFn??tn});let r=n.next();for(;!r.done;){const e=r.value,s=e.visitFn.call(t,e.path);if(Ks(s))throw new Kt("Async visitor not supported in sync mode",{visitor:t,visitFn:e.visitFn});r=n.next(s)}return r.value},pn=async(e,t,s={})=>{const n=ln(e,t,{keyMap:s.keyMap??sn,state:s.state??{},nodeTypeGetter:s.nodeTypeGetter??Zs,nodePredicate:s.nodePredicate??Qs,nodeCloneFn:s.nodeCloneFn??en,detectCycles:s.detectCycles??!0,mutable:s.mutable??!1,mutationFn:s.mutationFn??tn});let r=n.next();for(;!r.done;){const e=r.value,s=await e.visitFn.call(t,e.path);r=n.next(s)}return r.value};un[Symbol.for("nodejs.util.promisify.custom")]=pn,Ys.prototype.traverse=function(e,t){return un(this.node,e,t)},Ys.prototype.traverseAsync=function(e,t){return pn(this.node,e,t)};const hn=class extends vs{specObj;passingOptionsNames=["specObj","parent"];constructor({specObj:e,...t}){super({...t}),this.specObj=e}retrievePassingOptions(){return Ds(this.passingOptionsNames,this)}retrieveFixedFields(e){const t=_(["visitors",...e,"fixedFields"],this.specObj);return"object"==typeof t&&null!==t?Object.keys(t):[]}retrieveVisitor(e){return Te(tt,["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 n=this.retrieveVisitorInstance(e,s);return n instanceof ws&&n?.constructor===ws?ns(t):(un(t,n,s),n.element)}};const dn=class extends hn{specPath;ignoredFields;constructor({specPath:e,ignoredFields:t,...s}){super({...s}),this.specPath=e,this.ignoredFields=t||[]}ObjectElement(e){const t=e.node,s=this.specPath(t),n=this.retrieveFixedFields(s);t.forEach((e,t,r)=>{const i=ms(t);if($t(t)&&n.includes(i)&&!this.ignoredFields.includes(i)){const n=this.toRefractedElement([...s,"fixedFields",i],e),o=new Et(ns(t),n);this.copyMetaAndAttributes(r,o),o.classes.push("fixed-field"),this.element.content.push(o)}else this.ignoredFields.includes(i)||this.element.content.push(ns(r))}),this.copyMetaAndAttributes(t,this.element),e.stop()}},mn=(e,t,s=[])=>{const n=Object.getOwnPropertyDescriptors(t);for(let e of s)delete n[e];Object.defineProperties(e,n)},fn=(e,t=[e])=>{const s=Object.getPrototypeOf(e);return null===s?t:fn(s,[...t,s])},yn=(e,t,s=[])=>{var n;const r=null!==(n=((...e)=>{if(0===e.length)return;let t;const s=e.map(e=>fn(e));for(;s.every(e=>e.length>0);){const e=s.map(e=>e.pop()),n=e[0];if(!e.every(e=>e===n))break;t=n}return t})(...e))&&void 0!==n?n:Object.prototype,i=Object.create(r),o=fn(r);for(let t of e){let e=fn(t);for(let t=e.length-1;t>=0;t--){let n=e[t];-1===o.indexOf(n)&&(mn(i,n,["constructor",...s]),o.push(n))}}return i.constructor=t,i},gn=e=>e.filter((t,s)=>e.indexOf(t)==s),xn=(e,t)=>{const s=t.map(e=>fn(e));let n=0,r=!0;for(;r;){r=!1;for(let i=t.length-1;i>=0;i--){const t=s[i][n];if(null!=t&&(r=!0,null!=Object.getOwnPropertyDescriptor(t,e)))return s[i][0]}n++}},bn=(e,t=Object.prototype)=>new Proxy({},{getPrototypeOf:()=>t,setPrototypeOf(){throw Error("Cannot set prototype of Proxies created by ts-mixer")},getOwnPropertyDescriptor:(t,s)=>Object.getOwnPropertyDescriptor(xn(s,e)||{},s),defineProperty(){throw new Error("Cannot define new properties on Proxies created by ts-mixer")},has:(s,n)=>void 0!==xn(n,e)||void 0!==t[n],get:(s,n)=>(xn(n,e)||t)[n],set(t,s,n){const r=xn(s,e);if(void 0===r)throw new Error("Cannot set new properties on Proxies created by ts-mixer");return r[s]=n,!0},deleteProperty(){throw new Error("Cannot delete properties on Proxies created by ts-mixer")},ownKeys:()=>e.map(Object.getOwnPropertyNames).reduce((e,t)=>t.concat(e.filter(e=>t.indexOf(e)<0)))}),vn=null,wn="copy",On="copy",kn="deep",Sn=new WeakMap,En=e=>Sn.get(e),An=(e,t)=>{var s,n;const r=gn([...Object.getOwnPropertyNames(e),...Object.getOwnPropertyNames(t)]),i={};for(let o of r)i[o]=gn([...null!==(s=null==e?void 0:e[o])&&void 0!==s?s:[],...null!==(n=null==t?void 0:t[o])&&void 0!==n?n:[]]);return i},jn=(e,t)=>{var s,n,r,i;return{property:An(null!==(s=null==e?void 0:e.property)&&void 0!==s?s:{},null!==(n=null==t?void 0:t.property)&&void 0!==n?n:{}),method:An(null!==(r=null==e?void 0:e.method)&&void 0!==r?r:{},null!==(i=null==t?void 0:t.method)&&void 0!==i?i:{})}},In=(e,t)=>{var s,n,r,i,o,c;return{class:gn([...null!==(s=null==e?void 0:e.class)&&void 0!==s?s:[],...null!==(n=null==t?void 0:t.class)&&void 0!==n?n:[]]),static:jn(null!==(r=null==e?void 0:e.static)&&void 0!==r?r:{},null!==(i=null==t?void 0:t.static)&&void 0!==i?i:{}),instance:jn(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,Mn=(...e)=>{const t=((...e)=>{var t;const s=new Set,n=new Set([...e]);for(;n.size>0;)for(let e of n){const r=[...fn(e.prototype).map(e=>e.constructor),...null!==(t=En(e))&&void 0!==t?t:[]].filter(e=>!s.has(e));for(let e of r)n.add(e);s.add(e),n.delete(e)}return[...s]})(...e).map(e=>Tn.get(e)).filter(e=>!!e);return 0==t.length?{}:1==t.length?t[0]:t.reduce((e,t)=>In(e,t))},Fn=e=>{let t=Tn.get(e);return t||(t={},Tn.set(e,t)),t};function Nn(...e){var t,s,n;const r=e.map(e=>e.prototype),i=vn;if(null!==i){const e=r.map(e=>e[i]).filter(e=>"function"==typeof e),t=function(...t){for(let s of e)s.apply(this,t)},s={[i]:t};r.push(s)}function o(...t){for(const s of e)mn(this,new s(...t));null!==i&&"function"==typeof this[i]&&this[i].apply(this,t)}var c,a;o.prototype="copy"===On?yn(r,o):(c=r,a=o,bn([...c,{constructor:a}])),Object.setPrototypeOf(o,"copy"===wn?yn(e,null,["prototype"]):bn(e,Function.prototype));let l=o;if("none"!==kn){const r="deep"===kn?Mn(...e):((...e)=>{const t=e.map(e=>Fn(e));return 0===t.length?{}:1===t.length?t[0]:t.reduce((e,t)=>In(e,t))})(...e);for(let e of null!==(t=null==r?void 0:r.class)&&void 0!==t?t:[]){const t=e(l);t&&(l=t)}Cn(null!==(s=null==r?void 0:r.static)&&void 0!==s?s:{},l),Cn(null!==(n=null==r?void 0:r.instance)&&void 0!==n?n:{},l.prototype)}var u,p;return u=l,p=e,Sn.set(u,p),l}const Cn=(e,t)=>{const s=e.property,n=e.method;if(s)for(let e in s)for(let n of s[e])n(t,e);if(n)for(let e in n)for(let s of n[e])s(t,e,Object.getOwnPropertyDescriptor(t,e))};const Pn=function(){return!1};const Dn=class extends hn{specPath;ignoredFields;fieldPatternPredicate=Pn;constructor({specPath:e,ignoredFields:t,fieldPatternPredicate:s,...n}){super({...n}),this.specPath=e,this.ignoredFields=t||[],"function"==typeof s&&(this.fieldPatternPredicate=s)}ObjectElement(e){const t=e.node;t.forEach((e,t,s)=>{const n=ms(t);if(!this.ignoredFields.includes(n)&&this.fieldPatternPredicate(n)){const n=this.specPath(e),r=this.toRefractedElement(n,e),i=new Et(ns(t),r);this.copyMetaAndAttributes(s,i),i.classes.push("patterned-field"),this.element.content.push(i)}else this.ignoredFields.includes(n)||this.element.content.push(ns(s))}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const Bn=class extends Dn{constructor(e){super(e),this.fieldPatternPredicate=Ps}};const $n=class{parent;constructor({parent:e}){this.parent=e}},Ln=Nn(dn,$n,ws),_n=Nn(dn,ws),qn=Nn(dn,ws),Rn=Nn(dn,ws),Un=Nn(hn,$n,ws),Hn=Nn(hn,$n,ws),Vn=Nn(hn,$n,ws),Jn=Nn(hn,$n,ws),Gn=Nn(hn,$n,ws),zn=Nn(Bn,$n,ws),Xn=Nn(Bn,$n,ws),Wn=Nn(Bn,$n,ws),Yn=Nn(Bn,$n,ws),Kn=e=>e instanceof It,Zn=e=>e instanceof Tt;const Qn=class extends Ln{constructor(e){super(e),this.element=new jt,this.specPath=Os(["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,dn.prototype.ObjectElement.call(this,e)}handleDialectIdentifier(e){if(Es(this.parent)&&!$t(e.get("$schema")))this.element.meta.set("inheritedDialectIdentifier",this.defaultDialectIdentifier);else if(this.parent instanceof jt&&!$t(e.get("$schema"))){const e=ks(ms(this.parent.meta.get("inheritedDialectIdentifier")),ms(this.parent.$schema));this.element.meta.set("inheritedDialectIdentifier",e)}}handleSchemaIdentifier(e,t="id"){const s=void 0!==this.parent?ns(this.parent.meta.get("ancestorsSchemaIdentifiers")??new Dt):new Dt,n=ms(e.get(t));Ps(n)&&s.push(n),this.element.meta.set("ancestorsSchemaIdentifiers",s)}},er=e=>Ut(e)&&e.hasKey("$ref");const tr=class extends Jn{ObjectElement(e){const t=e.node,s=er(t)?["document","objects","JSONReference"]:["document","objects","JSONSchema"];this.element=this.toRefractedElement(s,t),e.stop()}ArrayElement(e){const t=e.node;this.element=new Dt,this.element.classes.push("json-schema-items"),t.forEach(e=>{const t=er(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const sr=class extends ws{ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-required")}};const nr=class extends Yn{constructor(e){super(e),this.element=new At,this.element.classes.push("json-schema-properties"),this.specPath=e=>er(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const rr=class extends Wn{constructor(e){super(e),this.element=new At,this.element.classes.push("json-schema-patternProperties"),this.specPath=e=>er(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const ir=class extends Xn{constructor(e){super(e),this.element=new At,this.element.classes.push("json-schema-dependencies"),this.specPath=e=>er(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const or=class extends ws{ArrayElement(e){super.enter(e),this.element.classes.push("json-schema-enum")}};const cr=class extends ws{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 ar=class extends Un{constructor(e){super(e),this.element=new Dt,this.element.classes.push("json-schema-allOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=er(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const lr=class extends Hn{constructor(e){super(e),this.element=new Dt,this.element.classes.push("json-schema-anyOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=er(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const ur=class extends Vn{constructor(e){super(e),this.element=new Dt,this.element.classes.push("json-schema-oneOf")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=er(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],s=this.toRefractedElement(t,e);this.element.push(s)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const pr=class extends zn{constructor(e){super(e),this.element=new At,this.element.classes.push("json-schema-definitions"),this.specPath=e=>er(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};const hr=class extends Gn{constructor(e){super(e),this.element=new Dt,this.element.classes.push("json-schema-links")}ArrayElement(e){const t=e.node;t.forEach(e=>{const t=this.toRefractedElement(["document","objects","LinkDescription"],e);this.element.push(t)}),this.copyMetaAndAttributes(t,this.element),e.stop()}};const dr=class extends _n{constructor(e){super(e),this.element=new It,this.specPath=Os(["document","objects","JSONReference"])}ObjectElement(e){dn.prototype.ObjectElement.call(this,e),$t(this.element.$ref)&&this.element.classes.push("reference-element")}};const mr=class extends ws{StringElement(e){super.enter(e),this.element.classes.push("reference-value")}};const fr=function(){return!0};const yr=C(function(e,t,s){return Le(Math.max(e.length,t.length,s.length),function(){return e.apply(this,arguments)?t.apply(this,arguments):s.apply(this,arguments)})});const gr=r(function(e){return function(t,s){return e(t,s)?-1:e(s,t)?1:0}});var xr=g(function(e,t){return Array.prototype.slice.call(t,0).sort(e)});const br=xr;const vr=r(function(e){return i(0,e)});function wr(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}const Or=r(wr);const kr=Je(I);const Sr=Le(1,tt(Array.isArray)?Array.isArray:ne(re,ce("Array")));const Er=He(Sr,Ms);function Ar(e){return function(e){if(Array.isArray(e))return jr(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 jr(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)?jr(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 jr(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,n=Array(t);s<t;s++)n[s]=e[s];return n}var Ir=ne(br(gr(function(e,t){return e.length>t.length})),vr,B("length")),Tr=ct(function(e,t,s){var n=s.apply(void 0,Ar(e));return kr(n)?Or(n):t});const Mr=yr(Er,function(e){var t=Ir(e);return Le(t,function(){for(var t=arguments.length,s=new Array(t),n=0;n<t;n++)s[n]=arguments[n];return Q(Tr(s),void 0,e)})},Ss);const Fr=class extends hn{alternator;constructor({alternator:e,...t}){super({...t}),this.alternator=e}enter(e){const t=e.node,s=this.alternator.map(({predicate:e,specPath:t})=>yr(e,Os(t),Ss)),n=Mr(s)(t);this.element=this.toRefractedElement(n,t),e.stop()}};const Nr=class extends Fr{constructor(e){super(e),this.alternator=[{predicate:er,specPath:["document","objects","JSONReference"]},{predicate:fr,specPath:["document","objects","JSONSchema"]}]}};const Cr=class extends Rn{constructor(e){super(e),this.element=new Tt,this.specPath=Os(["document","objects","Media"])}};const Pr=class extends qn{constructor(e){super(e),this.element=new Mt,this.specPath=Os(["document","objects","LinkDescription"])}},Dr={visitors:{value:ws,JSONSchemaOrJSONReferenceVisitor:Nr,document:{objects:{JSONSchema:{element:"jSONSchemaDraft4",$visitor:Qn,fixedFields:{id:{$visitor:ws,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:Nr,items:{$visitor:tr,alias:"itemsField"},maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:sr,properties:nr,additionalProperties:Nr,patternProperties:rr,dependencies:ir,enum:or,type:cr,allOf:ar,anyOf:lr,oneOf:ur,not:Nr,definitions:pr,title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},format:{$ref:"#/visitors/value"},base:{$ref:"#/visitors/value"},links:{$visitor:hr,alias:"linksField"},media:{$ref:"#/visitors/document/objects/Media"},readOnly:{$ref:"#/visitors/value"}}},JSONReference:{element:"jSONReference",$visitor:dr,fixedFields:{$ref:mr}},Media:{element:"media",$visitor:Cr,fixedFields:{binaryEncoding:{$ref:"#/visitors/value"},type:{$ref:"#/visitors/value"}}},LinkDescription:{element:"linkDescription",$visitor:Pr,fixedFields:{href:{$ref:"#/visitors/value"},rel:{$ref:"#/visitors/value"},title:{$ref:"#/visitors/value"},targetSchema:Nr,mediaType:{$ref:"#/visitors/value"},method:{$ref:"#/visitors/value"},encType:{$ref:"#/visitors/value"},schema:Nr}}}}}},Br=gt(Dr),$r=e=>Object.entries(e).map(([e,t])=>it(t)?{name:e,...t}:{name:e,$visitor:t});Object.defineProperty(jt,"fixedFields",{get:()=>$r(Br.visitors.document.objects.JSONSchema.fixedFields),enumerable:!0}),Object.defineProperty(It,"fixedFields",{get:()=>$r(Br.visitors.document.objects.JSONReference.fixedFields),enumerable:!0}),Object.defineProperty(Tt,"fixedFields",{get:()=>$r(Br.visitors.document.objects.Media.fixedFields),enumerable:!0}),Object.defineProperty(Mt,"fixedFields",{get:()=>$r(Br.visitors.document.objects.LinkDescription.fixedFields),enumerable:!0});const Lr=class extends jt{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 _r=class extends Mt{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)}},qr={namespace:e=>{const{base:t}=e;return t.register("jSONSchemaDraft6",Lr),t.register("jSONReference",It),t.register("media",Tt),t.register("linkDescription",_r),t}},Rr={JSONSchemaDraft6Element:{additionalItems:(...e)=>new Lr(...e),items:(...e)=>new Lr(...e),contains:(...e)=>new Lr(...e),required(...e){const t=new Dt(...e);return t.classes.push("json-schema-required"),t},properties(...e){const t=new At(...e);return t.classes.push("json-schema-properties"),t},additionalProperties:(...e)=>new Lr(...e),patternProperties(...e){const t=new At(...e);return t.classes.push("json-schema-patternProperties"),t},dependencies(...e){const t=new At(...e);return t.classes.push("json-schema-dependencies"),t},propertyNames:(...e)=>new Lr(...e),enum(...e){const t=new Dt(...e);return t.classes.push("json-schema-enum"),t},allOf(...e){const t=new Dt(...e);return t.classes.push("json-schema-allOf"),t},anyOf(...e){const t=new Dt(...e);return t.classes.push("json-schema-anyOf"),t},oneOf(...e){const t=new Dt(...e);return t.classes.push("json-schema-oneOf"),t},not:(...e)=>new Lr(...e),definitions(...e){const t=new At(...e);return t.classes.push("json-schema-definitions"),t},examples(...e){const t=new Dt(...e);return t.classes.push("json-schema-examples"),t},links(...e){const t=new Dt(...e);return t.classes.push("json-schema-links"),t},media:(...e)=>new Tt(...e)},LinkDescriptionElement:{hrefSchema:(...e)=>new Lr(...e),targetSchema:(...e)=>new Lr(...e),submissionSchema:(...e)=>new Lr(...e)},"json-schema-properties":{"[key: *]":function(...e){return new Lr(...e)}},"json-schema-patternProperties":{"[key: *]":function(...e){return new Lr(...e)}},"json-schema-dependencies":{"[key: *]":function(...e){return new Lr(...e)}},"json-schema-allOf":{"<*>":function(...e){return new Lr(...e)}},"json-schema-anyOf":{"<*>":function(...e){return new Lr(...e)}},"json-schema-oneOf":{"<*>":function(...e){return new Lr(...e)}},"json-schema-definitions":{"[key: *]":function(...e){return new Lr(...e)}},"json-schema-links":{"<*>":function(...e){return new _r(...e)}}},Ur=(e,t)=>{const s=Zs(e),n=Rr[s]||Rr[ms(e.classes.first)];return void 0===n?void 0:Object.hasOwn(n,"[key: *]")?n["[key: *]"]:n[t]},Hr=()=>()=>({visitor:{StringElement(e){const t=e.node;if(!(e=>$t(e)&&Jt(e,["yaml-e-node","yaml-e-scalar"]))(t))return;const s=e.getAncestorNodes().reverse().filter(Bt),n=s.at(-1);let r,i;if(Rt(n)?(i=t,r=Ur(n,"<*>")):Ht(n)&&(i=s.at(-2),r=Ur(i,ms(n.key))),"function"!=typeof r)return;const o=r.call({context:i},void 0,ns(t.meta),ns(t.attributes));Yt.transfer(t,o),e.replaceWith(o)}}});const Vr=C(function(e,t,s){var n,r={};for(n in s=s||{},t=t||{})x(n,t)&&(r[n]=x(n,s)?e(n,t[n],s[n]):t[n]);for(n in s)x(n,s)&&!x(n,r)&&(r[n]=s[n]);return r});const Jr=C(function e(t,s,n){return Vr(function(s,n,r){return be(n)&&be(r)?e(t,n,r):t(s,n,r)},s,n)});const Gr=g(function(e,t){return Jr(function(e,t,s){return s},e,t)});const zr=C(function(e,t,s){return ks(e,B(t,s))});const Xr=te(0,-1);const Wr=g(function(e,t){return e.apply(this,t)});const Yr=Je(tt);const Kr=He(Sr,Ts);const Zr=Le(3,function(e,t,s){var n=_(e,s),r=_(Xr(e),s);if(!Yr(n)&&!Kr(e)){var i=X(n,r);return Wr(i,t)}});const Qr=class{namespace;constructor(e){this.namespace=e||new this.Namespace}serialise(e){if(!(e instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${e}\` is not an Element instance`);const t={element:e.element};if(e.isMetaEmpty||(t.meta=this.serialiseObject(e.meta)),e.isAttributesEmpty||(t.attributes=this.serialiseObject(e.attributes)),!(e instanceof Yt)){const s=Yt.from(e);s&&(t.meta||(t.meta={}),t.meta.__mappings__=this.serialise(s))}const s=this.serialiseContent(e.content);return void 0!==s&&(t.content=s),t}deserialise(e){if(!e.element)throw new Error("Given value is not an object containing an element name");const t=new(this.namespace.getElementClass(e.element));let s;t.element!==e.element&&(t.element=e.element);let n=e.meta;if(e.meta?.__mappings__){const{__mappings__:t,...r}=e.meta;s=t,n=Object.keys(r).length>0?r:void 0}if(n&&this.deserialiseObject(n,t.meta),s){this.deserialise(s).applyTo(t)}e.attributes&&this.deserialiseObject(e.attributes,t.attributes);const r=this.deserialiseContent(e.content);return void 0===r&&null!==t.content||(t.content=r),t}serialiseContent(e){if(e instanceof this.namespace.elements.Element)return this.serialise(e);if(e instanceof this.namespace.KeyValuePair){const t=e,s={key:this.serialise(t.key)};return t.value&&(s.value=this.serialise(t.value)),s}if(e&&Array.isArray(e)){if(0===e.length)return;return e.map(e=>this.serialise(e))}return e}deserialiseContent(e){if(e){if(e.element)return this.deserialise(e);if(e.key){const t=new this.namespace.KeyValuePair(this.deserialise(e.key));return e.value&&(t.value=this.deserialise(e.value)),t}if(Array.isArray(e))return e.map(e=>this.deserialise(e))}return e}serialiseObject(e){const t={};if(e.forEach((e,s)=>{e&&(t[s.toValue()]=this.serialise(e))}),0!==Object.keys(t).length)return t}deserialiseObject(e,t){Object.keys(e).forEach(s=>{t.set(s,this.deserialise(e[s]))})}},ei=e=>null===e,ti=e=>"string"==typeof e,si=e=>"number"==typeof e,ni=e=>"boolean"==typeof e,ri=e=>null!==e&&"object"==typeof e;class ii{elementMap={};elementDetection=[];Element;KeyValuePair;_elements;_attributeElementKeys=[];_attributeElementArrayKeys=[];constructor(e){this.Element=Ot,this.KeyValuePair=xt,e&&e.noDefault||this.useDefault()}use(e){return e.namespace&&e.namespace({base:this}),e.load&&e.load({base:this}),this}useDefault(){return this.register("null",Ct).register("string",Ft).register("number",Nt).register("boolean",Pt).register("array",Dt).register("object",At).register("member",Et).register("ref",as).register("link",cs).register("sourceMap",Yt),this.detect(ei,Ct,!1).detect(ti,Ft,!1).detect(si,Nt,!1).detect(ni,Pt,!1).detect(Array.isArray,Dt,!1).detect(ri,At,!1),this}register(e,t){return this._elements=void 0,this.elementMap[e]=t,this}unregister(e){return this._elements=void 0,delete this.elementMap[e],this}detect(e,t,s){return void 0===s||s?this.elementDetection.unshift([e,t]):this.elementDetection.push([e,t]),this}toElement(e){if(e instanceof this.Element)return e;let t;for(const[s,n]of this.elementDetection)if(s(e)){t=new n(e);break}return t}getElementClass(e){const t=this.elementMap[e];return void 0===t?this.Element:t}fromRefract(e){return this.serialiser.deserialise(e)}toRefract(e){return this.serialiser.serialise(e)}get elements(){return void 0===this._elements&&(this._elements={Element:this.Element},Object.keys(this.elementMap).forEach(e=>{const t=e[0].toUpperCase()+e.substring(1);this._elements[t]=this.elementMap[e]})),this._elements}get serialiser(){return new Qr(this)}}Qr.prototype.Namespace=ii;const oi=ii,ci=new oi,ai={isElement:Bt,isStringElement:$t,isNumberElement:Lt,isNullElement:_t,isBooleanElement:qt,isArrayElement:Rt,isObjectElement:Ut,isMemberElement:Ht,isPrimitiveElement:e=>Ut(e)&&"object"===e.element||Rt(e)&&"array"===e.element||qt(e)&&"boolean"===e.element||Lt(e)&&"number"===e.element||$t(e)&&"string"===e.element||_t(e)&&"null"===e.element||Ht(e)&&"member"===e.element,isLinkElement:hs,isRefElement:ds,isAnnotationElement:e=>e instanceof ls,isCommentElement:e=>e instanceof us,isParseResultElement:e=>e instanceof ps,isSourceMapElement:e=>e instanceof Yt,hasElementSourceMap:Vt,includesSymbols:(e,t)=>{if(0===t.length)return!0;if(!e.hasAttributesProperty("symbols"))return!1;const s=e.attributes.get("symbols");return!!Rt(s)&&t.every(e=>s.includes(e))},includesClasses:Jt},li={toolboxCreator:()=>({predicates:ai,namespace:ci}),visitorOptions:{exposeEdits:!0}},ui=(e,t,s={})=>{if(0===t.length)return e;const n=Gr(li,s),{toolboxCreator:r,visitorOptions:i}=n,o=r(),c=t.map(e=>e(o)),a=on(c.map(zr({},"visitor")),i);c.forEach(Zr(["pre"],[]));const l=un(e,a);return c.forEach(Zr(["post"],[])),l};function pi(e){return void 0===e?new Ct:hi(e)}function hi(e){if(e instanceof Ot)return e;if("string"==typeof e)return new Ft(e);if("number"==typeof e)return new Nt(e);if("boolean"==typeof e)return new Pt(e);if(null===e)return new Ct;if(Array.isArray(e))return new Dt(e.map(pi));if("object"==typeof e)return new At(e);throw new Error("Cannot refract value of type "+typeof e)}ui[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,s={})=>{if(0===t.length)return e;const n=Gr(li,s),{toolboxCreator:r,visitorOptions:i}=n,o=r(),c=t.map(e=>e(o)),a=cn(c.map(zr({},"visitor")),i);await Promise.allSettled(c.map(Zr(["pre"],[])));const l=await pn(e,a);return await Promise.allSettled(c.map(Zr(["post"],[]))),l},Ot.prototype.ObjectElement=At,Ot.prototype.ArrayElement=Dt,Ot.prototype.RefElement=as,Ot.prototype.MemberElement=Et,Ot.prototype.refract=hi;var di=C(function e(t,s,n){if(0===t.length)return s;var r=t[0];if(t.length>1){var i=D(r,n);(I(i)||"object"!=typeof i)&&(i=P(t[1])?[]:{}),s=e(Array.prototype.slice.call(t,1),s,i)}return function(e,t,s){if(P(e)&&U(s)){var n=e<0?s.length+e:e,r=[].concat(s);return r[n]=t,r}var i={};for(var o in s)i[o]=s[o];return i[e]=t,i}(r,s,n)});const mi=di;const fi=C(function(e,t,s){var n=Array.prototype.slice.call(s,0);return n.splice(e,t),n});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(P(e)&&U(t))return fi(e,1,t);var s={};for(var n in t)s[n]=t[n];return delete s[e],s}(t[0],s);default:var n=t[0],r=Array.prototype.slice.call(t,1);return null==s[n]?function(e,t){if(P(e)&&U(t))return[].concat(t);var s={};for(var n in t)s[n]=t[n];return s}(n,s):gi(n,e(r,s[n]),s)}});const bi=xi;const vi=class extends Qn{constructor(e){super(e),this.element=new Lr}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 tr{BooleanElement(e){this.element=this.toRefractedElement(["document","objects","JSONSchema"],e.node),e.stop()}};const Oi=class extends ws{ArrayElement(e){this.enter(e),this.element.classes.push("json-schema-examples")}};const ki=class extends Pr{constructor(e){super(e),this.element=new _r}},Si=ne(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:Dr.visitors.JSONSchemaOrJSONReferenceVisitor,alias:"containsField"}),mi(["visitors","document","objects","JSONSchema","fixedFields","items"],{$visitor:wi,alias:"itemsField"}),mi(["visitors","document","objects","JSONSchema","fixedFields","propertyNames"],Dr.visitors.JSONSchemaOrJSONReferenceVisitor),mi(["visitors","document","objects","JSONSchema","fixedFields","const"],{$ref:"#/visitors/value"}),mi(["visitors","document","objects","JSONSchema","fixedFields","examples"],Oi),mi(["visitors","document","objects","LinkDescription","$visitor"],ki),mi(["visitors","document","objects","LinkDescription","fixedFields","hrefSchema"],Dr.visitors.JSONSchemaOrJSONReferenceVisitor),bi(["visitors","document","objects","LinkDescription","fixedFields","schema"]),mi(["visitors","document","objects","LinkDescription","fixedFields","submissionSchema"],Dr.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"}))(Dr),Ei=e=>e instanceof Lr,Ai=e=>e instanceof _r,ji=()=>{const e=new oi,t={...s,isStringElement:$t};return e.use(qr),{predicates:t,namespace:e}},Ii=(e,{element:t="jSONSchemaDraft6",plugins:s=[],specificationObj:n=Si}={})=>{const r=hi(e),i=gt(n),o=i.elementMap[t];if(!o)throw new Error(`Unknown element type: "${t}"`);const c=new(_(o,i))({specObj:i});return un(r,c),ui(c.element,s,{toolboxCreator:ji})},Ti=(e,t={})=>Ii(e,{...t,element:"jSONSchemaDraft6"}),Mi=(e,t={})=>Ii(e,{...t,element:"linkDescription"}),Fi=Ii;return t})());
|