@hyperjump/json-schema-core
Advanced tools
Comparing version 0.27.0 to 0.28.0
@@ -1,9 +0,3 @@ | ||
define(["exports"],(function(e){"use strict";var r=function(e,r){return function t(){null==r&&(r=e.length);var n=[].slice.call(arguments);return n.length>=r?e.apply(this,n):function(){return t.apply(this,n.concat([].slice.call(arguments)))}}};var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e,r){return e(r={exports:{}},r.exports),r.exports}var o=n((function(e,r){var n,o;n="object"==typeof window&&window||t,o={},n.PubSub?(o=n.PubSub,console.warn("PubSub already loaded, using existing version")):(n.PubSub=o,function(e){var r={},t=-1,n="*";function o(e){var r;for(r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!0;return!1}function a(e){return function(){throw e}}function i(e,r,t){try{e(r,t)}catch(e){setTimeout(a(e),0)}}function s(e,r,t){e(r,t)}function c(e,t,n,o){var a,c=r[t],u=o?s:i;if(Object.prototype.hasOwnProperty.call(r,t))for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&u(c[a],e,n)}function u(e,r,t){return function(){var o=String(e),a=o.lastIndexOf(".");for(c(e,e,r,t);-1!==a;)a=(o=o.substr(0,a)).lastIndexOf("."),c(e,o,r,t);c(e,n,r,t)}}function l(e){var t=String(e);return Boolean(Object.prototype.hasOwnProperty.call(r,t)&&o(r[t]))}function p(e){for(var r=String(e),t=l(r)||l(n),o=r.lastIndexOf(".");!t&&-1!==o;)o=(r=r.substr(0,o)).lastIndexOf("."),t=l(r);return t}function f(e,r,t,n){var o=u(e="symbol"==typeof e?e.toString():e,r,n);return!!p(e)&&(!0===t?o():setTimeout(o,0),!0)}e.publish=function(r,t){return f(r,t,!1,e.immediateExceptions)},e.publishSync=function(r,t){return f(r,t,!0,e.immediateExceptions)},e.subscribe=function(e,n){if("function"!=typeof n)return!1;e="symbol"==typeof e?e.toString():e,Object.prototype.hasOwnProperty.call(r,e)||(r[e]={});var o="uid_"+String(++t);return r[e][o]=n,o},e.subscribeAll=function(r){return e.subscribe(n,r)},e.subscribeOnce=function(r,t){var n=e.subscribe(r,(function(){e.unsubscribe(n),t.apply(this,arguments)}));return e},e.clearAllSubscriptions=function(){r={}},e.clearSubscriptions=function(e){var t;for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&delete r[t]},e.countSubscriptions=function(e){var t,n,o=0;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)){for(n in r[t])o++;break}return o},e.getSubscriptions=function(e){var t,n=[];for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&n.push(t);return n},e.unsubscribe=function(t){var n,o,a,i=function(e){var t;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e))return!0;return!1},s="string"==typeof t&&(Object.prototype.hasOwnProperty.call(r,t)||i(t)),c=!s&&"string"==typeof t,u="function"==typeof t,l=!1;if(!s){for(n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(o=r[n],c&&o[t]){delete o[t],l=t;break}if(u)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&o[a]===t&&(delete o[a],l=!0)}return l}e.clearSubscriptions(t)}}(o)),void 0!==e&&e.exports&&(r=e.exports=o),r.PubSub=o,e.exports=r=o}));o.PubSub;var a,i=n((function(e,r){ | ||
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ | ||
!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var n=r.length-1,o=1;o<n;++o)r[o]=r[o].slice(1,-1);return r[n]=r[n].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,r){var t=e;if(r)for(var n in r)t[n]=r[n];return t}function s(e){var n="[A-Za-z]",o="[0-9]",a=r(o,"[A-Fa-f]"),i=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=r("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=r(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t(n+r(n,o,"[\\+\\-\\.]")+"*"),t(t(i+"|"+r(l,s,"[\\:]"))+"*");var p=t(t("25[0-5]")+"|"+t("2[0-4]"+o)+"|"+t("1"+o+o)+"|"+t("0?[1-9]"+o)+"|0?0?"+o),f=t(p+"\\."+p+"\\."+p+"\\."+p),d=t(a+"{1,4}"),h=t(t(d+"\\:"+d)+"|"+f),v=t(t(d+"\\:")+"{6}"+h),y=t("\\:\\:"+t(d+"\\:")+"{5}"+h),m=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+h),g=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+h),b=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+h),w=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+h),E=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+h),S=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),C=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),O=t([v,y,m,g,b,w,E,S,C].join("|")),A=t(t(l+"|"+i)+"+");t("[vV]"+a+"+\\."+r(l,s,"[\\:]")+"+"),t(t(i+"|"+r(l,s))+"*");var I=t(i+"|"+r(l,s,"[\\:\\@]"));return t(t(i+"|"+r(l,s,"[\\@]"))+"+"),t(t(I+"|"+r("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(r("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+O+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+A+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,r){var t=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)},f=2147483647,d=36,h=1,v=26,y=38,m=700,g=72,b=128,w="-",E=/^xn--/,S=/[^\0-\x7E]/,C=/[\x2E\u3002\uFF0E\uFF61]/g,O={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=d-h,I=Math.floor,j=String.fromCharCode;function T(e){throw new RangeError(O[e])}function x(e,r){for(var t=[],n=e.length;n--;)t[n]=r(e[n]);return t}function P(e,r){var t=e.split("@"),n="";return t.length>1&&(n=t[0]+"@",e=t[1]),n+x((e=e.replace(C,".")).split("."),r).join(".")}function $(e){for(var r=[],t=0,n=e.length;t<n;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<n){var a=e.charCodeAt(t++);56320==(64512&a)?r.push(((1023&o)<<10)+(1023&a)+65536):(r.push(o),t--)}else r.push(o)}return r}var D=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:d},R=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},N=function(e,r,t){var n=0;for(e=t?I(e/m):e>>1,e+=I(e/r);e>A*v>>1;n+=d)e=I(e/A);return I(n+(A+1)*e/(e+y))},_=function(e){var r=[],t=e.length,n=0,o=b,a=g,i=e.lastIndexOf(w);i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&T("not-basic"),r.push(e.charCodeAt(s));for(var c=i>0?i+1:0;c<t;){for(var u=n,l=1,p=d;;p+=d){c>=t&&T("invalid-input");var y=D(e.charCodeAt(c++));(y>=d||y>I((f-n)/l))&&T("overflow"),n+=y*l;var m=p<=a?h:p>=a+v?v:p-a;if(y<m)break;var E=d-m;l>I(f/E)&&T("overflow"),l*=E}var S=r.length+1;a=N(n-u,S,0==u),I(n/S)>f-o&&T("overflow"),o+=I(n/S),n%=S,r.splice(n++,0,o)}return String.fromCodePoint.apply(String,r)},F=function(e){var r=[],t=(e=$(e)).length,n=b,o=0,a=g,i=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var p=u.value;p<128&&r.push(j(p))}}catch(e){s=!0,c=e}finally{try{!i&&l.return&&l.return()}finally{if(s)throw c}}var y=r.length,m=y;for(y&&r.push(w);m<t;){var E=f,S=!0,C=!1,O=void 0;try{for(var A,x=e[Symbol.iterator]();!(S=(A=x.next()).done);S=!0){var P=A.value;P>=n&&P<E&&(E=P)}}catch(e){C=!0,O=e}finally{try{!S&&x.return&&x.return()}finally{if(C)throw O}}var D=m+1;E-n>I((f-o)/D)&&T("overflow"),o+=(E-n)*D,n=E;var _=!0,F=!1,k=void 0;try{for(var U,q=e[Symbol.iterator]();!(_=(U=q.next()).done);_=!0){var L=U.value;if(L<n&&++o>f&&T("overflow"),L==n){for(var z=o,H=d;;H+=d){var V=H<=a?h:H>=a+v?v:H-a;if(z<V)break;var M=z-V,K=d-V;r.push(j(R(V+M%K,0))),z=I(M/K)}r.push(j(R(z,0))),a=N(o,D,m==y),o=0,++m}}}catch(e){F=!0,k=e}finally{try{!_&&q.return&&q.return()}finally{if(F)throw k}}++o,++n}return r.join("")},k=function(e){return P(e,(function(e){return E.test(e)?_(e.slice(4).toLowerCase()):e}))},U=function(e){return P(e,(function(e){return S.test(e)?"xn--"+F(e):e}))},q={version:"2.1.0",ucs2:{decode:$,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:_,encode:F,toASCII:U,toUnicode:k},L={};function z(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function H(e){for(var r="",t=0,n=e.length;t<n;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(n-t>=6){var a=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(n-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function V(e,r){function t(e){var t=H(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,z).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,z).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,z).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,z).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,z).replace(r.PCT_ENCODED,o)),e}function M(e){return e.replace(/^0*(.*)/,"$1")||"0"}function K(e,r){var t=e.match(r.IPV4ADDRESS)||[],n=l(t,2)[1];return n?n.split(".").map(M).join("."):e}function Z(e,r){var t=e.match(r.IPV6ADDRESS)||[],n=l(t,3),o=n[1],a=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],p=u?u.split(":").map(M):[],f=c.split(":").map(M),d=r.IPV4ADDRESS.test(f[f.length-1]),h=d?7:8,v=f.length-h,y=Array(h),m=0;m<h;++m)y[m]=p[m]||f[v+m]||"";d&&(y[h-1]=K(y[h-1],r));var g=y.reduce((function(e,r,t){if(!r||"0"===r){var n=e[e.length-1];n&&n.index+n.length===t?n.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(g&&g.length>1){var w=y.slice(0,g.index),E=y.slice(g.index+g.length);b=w.join(":")+"::"+E.join(":")}else b=y.join(":");return a&&(b+="%"+a),b}return e}var J=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,B=void 0==="".match(/(){0}/)[1];function G(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},n=!1!==r.iri?u:c;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(J);if(o){B?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=Z(K(t.host,n),n)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var a=L[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)V(t,n);else{if(t.host&&(r.domainHost||a&&a.domainHost))try{t.host=q.toASCII(t.host.replace(n.PCT_ENCODED,H).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}V(t,c)}a&&a.parse&&a.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function W(e,r){var t=!1!==r.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(Z(K(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function re(e){for(var r=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(ee);if(!t)throw new Error("Unexpected dot segment condition");var n=t[0];e=e.slice(n.length),r.push(n)}return r.join("")}function te(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?u:c,n=[],o=L[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?q.toUnicode(e.host):q.toASCII(e.host.replace(t.PCT_ENCODED,H).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}V(e,t),"suffix"!==r.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=W(e,r);if(void 0!==a&&("suffix"!==r.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=re(i)),void 0===a&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=G(te(e,t),t),r=G(te(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(n.scheme=r.scheme,n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(r.path?("/"===r.path.charAt(0)?n.path=re(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:n.path=r.path:n.path="/"+r.path,n.path=re(n.path)),n.query=r.query):(n.path=e.path,void 0!==r.query?n.query=r.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=r.fragment,n}function oe(e,r,t){var n=i({scheme:"null"},t);return te(ne(G(e,n),G(r,n),n,!0),n)}function ae(e,r){return"string"==typeof e?e=te(G(e,r),r):"object"===n(e)&&(e=G(te(e,r),r)),e}function ie(e,r,t){return"string"==typeof e?e=te(G(e,t),t):"object"===n(e)&&(e=te(e,t)),"string"==typeof r?r=te(G(r,t),t):"object"===n(r)&&(r=te(r,t)),e===r}function se(e,r){return e&&e.toString().replace(r&&r.iri?u.ESCAPE:c.ESCAPE,z)}function ce(e,r){return e&&e.toString().replace(r&&r.iri?u.PCT_ENCODED:c.PCT_ENCODED,H)}var ue={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=pe(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),n=l(t,2),o=n[0],a=n[1];e.path=o&&"/"!==o?o:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},de={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},he={},ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",me=t(t("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+t("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+t("%"+ye+ye)),ge="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ee=new RegExp(ve,"g"),Se=new RegExp(me,"g"),Ce=new RegExp(r("[^]",ge,"[\\.]",'[\\"]',be),"g"),Oe=new RegExp(r("[^]",ve,we),"g"),Ae=Oe;function Ie(e){var r=H(e);return r.match(Ee)?r:e}var je={scheme:"mailto",parse:function(e,r){var t=e,n=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,a={},i=t.query.split("&"),s=0,c=i.length;s<c;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),p=0,f=l.length;p<f;++p)n.push(l[p]);break;case"subject":t.subject=ce(u[1],r);break;case"body":t.body=ce(u[1],r);break;default:o=!0,a[ce(u[0],r)]=ce(u[1],r)}}o&&(t.headers=a)}t.query=void 0;for(var d=0,h=n.length;d<h;++d){var v=n[d].split("@");if(v[0]=ce(v[0]),r.unicodeSupport)v[1]=ce(v[1],r).toLowerCase();else try{v[1]=q.toASCII(ce(v[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[d]=v.join("@")}return t},serialize:function(e,r){var t=e,n=a(e.to);if(n){for(var i=0,s=n.length;i<s;++i){var c=String(n[i]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(Se,Ie).replace(Se,o).replace(Ce,z),p=c.slice(u+1);try{p=r.iri?q.toUnicode(p):q.toASCII(ce(p,r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=l+"@"+p}t.path=n.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var d=[];for(var h in f)f[h]!==he[h]&&d.push(h.replace(Se,Ie).replace(Se,o).replace(Oe,z)+"="+f[h].replace(Se,Ie).replace(Se,o).replace(Ae,z));return d.length&&(t.query=d.join("&")),t}},Te=/^([^\:]+)\:(.*)/,xe={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(Te),n=e;if(t){var o=r.scheme||n.scheme||"urn",a=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||a),c=L[s];n.nid=a,n.nss=i,n.path=void 0,c&&(n=c.parse(n,r))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",n=e.nid,o=t+":"+(r.nid||n),a=L[o];a&&(e=a.serialize(e,r));var i=e,s=e.nss;return i.path=(n||r.nid)+":"+s,i}},Pe=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,$e={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match(Pe)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};L[ue.scheme]=ue,L[le.scheme]=le,L[fe.scheme]=fe,L[de.scheme]=de,L[je.scheme]=je,L[xe.scheme]=xe,L[$e.scheme]=$e,e.SCHEMES=L,e.pctEncChar=z,e.pctDecChars=H,e.parse=G,e.removeDotSegments=re,e.serialize=te,e.resolveComponents=ne,e.resolve=oe,e.normalize=ae,e.equal=ie,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(r)}));(a=i)&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")&&a.default;const s={null:e=>null===e,boolean:e=>"boolean"==typeof e,object:e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,array:e=>Array.isArray(e),number:e=>"number"==typeof e,integer:e=>Number.isInteger(e),string:e=>"string"==typeof e};var c={jsonTypeOf:(e,r)=>s[r](e),resolveUrl:(e,r)=>{const t=i.resolve(e,r,{iri:!0});if(i.resolve(e,"",{iri:!0})&&"file"===i.parse(t).scheme&&"file"!==i.parse(e).scheme)throw Error(`Can't access file '${t}' resource from network context '${e}'`);return t},urlFragment:e=>i.unescapeComponent(i.parse(e).fragment)||"",pathRelative:(e,r)=>{if(e===r)return"";let t=1;const n=e.length-1,o=r.length-t,a=n<o?n:o;let i=-1,s=0;for(;s<a;s++){const n=e.charCodeAt(s+1);if(n!==r.charCodeAt(t+s))break;47===n&&(i=s)}if(o>a){if(47===r.charCodeAt(t+s))return r.slice(t+s+1);if(0===s)return r.slice(t+s)}n>a&&(47===e.charCodeAt(s+1)?i=s:0===a&&(i=0));let c="";for(s=i+2;s<=e.length;++s)s!==e.length&&47!==e.charCodeAt(s)||(c+=0===c.length?"..":"/..");return t+=i,c.length>0?`${c}${r.slice(t,r.length)}`:(47===r.charCodeAt(t)&&++t,r.slice(t,r.length))}};const u=e=>{if(e.length>0&&"/"!==e[0])throw Error("Invalid JSON Pointer");return e.split("/").slice(1).map(y)},l=(e,r,t,n)=>{if(0===e.length)return t;if(e.length>1){const o=e.shift();return{...r,[o]:l(e,g(r,o,n),t,h(o,n))}}if(Array.isArray(r)){const n=[...r];return n[m(r,e[0])]=t,n}return"object"==typeof r&&null!==r?{...r,[e[0]]:t}:g(r,e[0],n)},p=(e,r,t,n)=>{if(0!==e.length)if(1!==e.length||b(r)){const o=e.shift();p(e,g(r,o,n),t,h(o,n))}else{r[m(r,e[0])]=t}},f=(e,r,t)=>{if(0!=e.length){if(e.length>1){const n=e.shift(),o=g(r,n,t);return{...r,[n]:f(e,o,h(n,t))}}if(Array.isArray(r))return r.filter(((r,t)=>t!=e[0]));if("object"==typeof r&&null!==r){const{[e[0]]:t,...n}=r;return n}return g(r,e[0],t)}},d=(e,r,t)=>{if(0!==e.length)if(e.length>1){const n=e.shift(),o=g(r,n,t);d(e,o,h(n,t))}else Array.isArray(r)?r.splice(e[0],1):"object"==typeof r&&null!==r?delete r[e[0]]:g(r,e[0],t)},h=r(((e,r)=>r+"/"+v(e))),v=e=>e.toString().replace(/~/g,"~0").replace(/\//g,"~1"),y=e=>e.toString().replace(/~1/g,"/").replace(/~0/g,"~"),m=(e,r)=>Array.isArray(e)&&"-"===r?e.length:r,g=(e,r,t="")=>{if(void 0===e)throw TypeError(`Value at '${t}' is undefined and does not have property '${r}'`);if(null===e)throw TypeError(`Value at '${t}' is null and does not have property '${r}'`);if(b(e))throw TypeError(`Value at '${t}' is a ${typeof e} and does not have property '${r}'`);return e[m(e,r)]},b=e=>null===e||"object"!=typeof e;var w={nil:"",append:h,get:(e,r)=>{const t=u(e),n=e=>t.reduce((([e,r],t)=>[g(e,t,r),h(t,r)]),[e,""])[0];return void 0===r?n:n(r)},set:(e,t,n)=>{const o=u(e),a=r(((e,r)=>l(o,e,r,"")));return void 0===t?a:a(t,n)},assign:(e,t,n)=>{const o=u(e),a=r(((e,r)=>p(o,e,r,"")));return void 0===t?a:a(t,n)},unset:(e,r)=>{const t=u(e),n=e=>f(t,e,"");return void 0===r?n:n(r)},remove:(e,r)=>{const t=u(e),n=e=>d(t,e,"");return void 0===r?n:n(r)}};w.nil,w.append,w.get,w.set,w.assign,w.unset,w.remove;const E=Symbol("$__value"),S=Symbol("$__href");var C={cons:(e,r)=>Object.freeze({[S]:e,[E]:r}),isReference:e=>e&&void 0!==e[S],href:e=>e[S],value:e=>e[E]};const{resolveUrl:O,jsonTypeOf:A}=c,I=Object.freeze({id:"",pointer:"",instance:void 0,value:void 0}),j=e=>C.isReference(e.value)?C.value(e.value):e.value,T=r(((e,r)=>A(j(e),r))),x=(e,r)=>Object.freeze({...r,pointer:w.append(e,r.pointer),value:j(r)[e]}),P=r(((e,r)=>j(r).map(((t,n,o,a)=>e(x(n,r),n,o,a))))),$=r(((e,r)=>j(r).map(((e,t,n,o)=>x(t,r))).filter(((r,t,n,o)=>e(r,t,n,o))))),D=r(((e,r,t)=>j(t).reduce(((r,n,o)=>e(r,x(o,t),o)),r))),R=r(((e,r)=>j(r).every(((t,n,o,a)=>e(x(n,r),n,o,a))))),N=r(((e,r)=>j(r).some(((t,n,o,a)=>e(x(n,r),n,o,a)))));var _={nil:I,cons:(e,r="")=>Object.freeze({...I,id:O(r,""),instance:e,value:e}),uri:e=>`${e.id}#${encodeURI(e.pointer)}`,value:j,has:(e,r)=>e in j(r),typeOf:T,step:x,entries:e=>Object.keys(j(e)).map((r=>[r,x(r,e)])),keys:e=>Object.keys(j(e)),map:P,filter:$,reduce:D,every:R,some:N,length:e=>j(e).length},F=async e=>Object.entries(await e),k=r((async(e,r)=>(await r).map(e))),U=r((async(e,r,t)=>(await t).reduce((async(r,t)=>e(await r,t)),r))),q=r((async(e,r,t={})=>U((async(r,t)=>await e(t)?r.concat([t]):r),[],r,t))),L=r((async(e,r)=>{const t=await k(e,r);return(await Promise.all(t)).some((e=>e))})),z=r((async(e,r)=>{const t=await k(e,r);return(await Promise.all(t)).every((e=>e))})),H=r(((e,r)=>e.reduce((async(e,r)=>r(await e)),r))),V={entries:F,map:k,filter:q,reduce:U,some:L,every:z,pipeline:H,all:e=>Promise.all(e),allValues:e=>H([F,U((async(e,[r,t])=>(e[r]=await t,e)),{})],e)};V.entries,V.map,V.filter,V.reduce,V.some,V.every,V.pipeline,V.all,V.allValues;var M=fetch,K=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,Z=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,J=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,B=/\\([\u000b\u0020-\u00ff])/g,G=/([\\"])/g,W=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,Q=function(e){if(!e)throw new TypeError("argument string is required");var r="object"==typeof e?function(e){var r;"function"==typeof e.getHeader?r=e.getHeader("content-type"):"object"==typeof e.headers&&(r=e.headers&&e.headers["content-type"]);if("string"!=typeof r)throw new TypeError("content-type header is missing from object");return r}(e):e;if("string"!=typeof r)throw new TypeError("argument string is required to be a string");var t=r.indexOf(";"),n=-1!==t?r.substr(0,t).trim():r.trim();if(!W.test(n))throw new TypeError("invalid media type");var o=new X(n.toLowerCase());if(-1!==t){var a,i,s;for(K.lastIndex=t;i=K.exec(r);){if(i.index!==t)throw new TypeError("invalid parameter format");t+=i[0].length,a=i[1].toLowerCase(),'"'===(s=i[2])[0]&&(s=s.substr(1,s.length-2).replace(B,"$1")),o.parameters[a]=s}if(t!==r.length)throw new TypeError("invalid parameter format")}return o}; | ||
/*! | ||
* content-type | ||
* Copyright(c) 2015 Douglas Christopher Wilson | ||
* MIT Licensed | ||
*/function Y(e){var r=String(e);if(J.test(r))return r;if(r.length>0&&!Z.test(r))throw new TypeError("invalid parameter value");return'"'+r.replace(G,"\\$1")+'"'}function X(e){this.parameters=Object.create(null),this.type=e}var ee={format:function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var r=e.parameters,t=e.type;if(!t||!W.test(t))throw new TypeError("invalid type");var n=t;if(r&&"object"==typeof r)for(var o,a=Object.keys(r).sort(),i=0;i<a.length;i++){if(o=a[i],!J.test(o))throw new TypeError("invalid parameter name");n+="; "+o+"="+Y(r[o])}return n},parse:Q};const re={};var te={addPlugin:(e,r)=>{re[e]=r},parse:e=>{const r=ee.parse(e.headers.get("content-type")).type;if(!(r in re))throw Error(`${e.url} is not a schema. Found a document with media type: ${r}`);return re[r].parse(e)},getContentType:e=>{for(const r in re)if(re[r].matcher(e))return r;return"application/octet-stream"}};const{jsonTypeOf:ne,resolveUrl:oe,urlFragment:ae,pathRelative:ie}=c,se="https://json-schema.org/draft/2019-09/vocab/core",ce="https://json-schema.org/draft/2020-12/vocab/core",ue={},le={},pe=(e,r)=>{const t=le[e];return ue[t]?.[r]},fe={},de={},he=(e,r="",t="")=>{e=JSON.parse(JSON.stringify(e));const n=oe(r,""),o=oe(e.$schema||t,"");if(!o)throw Error("Couldn't determine schema dialect");if(delete e.$schema,!(o in le))if(!0===e?.$vocabulary?.[se]&&o===ve(e,n,se)[0])le[o]=se;else if(!0===e?.$vocabulary?.[ce]&&o===ve(e,n,ce)[0])le[o]=ce;else if(o===ve(e,n,o)[0])le[o]=o;else{if(!(o in fe))throw Error(`Couldn't determine JSON Schema version for dialect: '${o}'`);{const e=fe[o];!0===e.vocabulary[se]?le[o]=se:!0===e.vocabulary[ce]?le[o]=ce:le[o]=le[e.dialectId]}}const[a,i]=ve(e,n,le[o]);if(!a)throw Error("Couldn't determine an identifier for the schema");const s=pe(o,"baseToken");delete e[s],n&&(de[n]=a);const c=pe(o,"anchorToken");i&&s===c&&(e[c]=c!==s?encodeURI(i):`#${encodeURI(i)}`);const u={},l=pe(o,"recursiveAnchorToken");let p;!0===e[l]&&(u[""]=`${a}#`,e[c]="",delete e[l]);const f=pe(o,"vocabularyToken");ne(e[f],"object")?(p=e[f],delete e[f]):p={[le[o]]:!0};const d={"":""};return fe[a]={id:a,dialectId:o,schema:ye(e,a,o,w.nil,d,u),anchors:d,dynamicAnchors:u,vocabulary:p,validated:!1},a},ve=(e,r,t)=>{const n=ue[t]?.baseToken,o=oe(r,e[n]||"");return[oe(o,""),ae(o)]},ye=(e,r,t,n,o,a)=>{if(ne(e,"object")){const i="string"==typeof e.$schema?oe(e.$schema,""):t,s=pe(i,"embeddedToken"),c=pe(i,"anchorToken");if("string"==typeof e[s]&&(s!==c||"#"!==e[s][0])){const n=oe(r,e[s]);return e[pe(i,"baseToken")]=n,he(e,n,t),C.cons(e[s],e)}const u=pe(t,"anchorToken"),l=pe(t,"dynamicAnchorToken");"string"==typeof e[l]&&(a[e[l]]=`${r}#${encodeURI(n)}`,o[e[l]]=n,delete e[l]);const p=pe(t,"embeddedToken");if("string"==typeof e[u]){const r=u!==p?e[u]:e[u].slice(1);o[r]=n,delete e[u]}const f=pe(t,"jrefToken");if("string"==typeof e[f])return C.cons(e[f],e);for(const i in e)e[i]=ye(e[i],r,t,w.append(i,n),o,a);return e}return Array.isArray(e)?e.map(((e,i)=>ye(e,r,t,w.append(i,n),o,a))):e},me=e=>fe[de[e]]||fe[e],ge=Object.freeze({id:"",dialectId:void 0,vocabulary:{},pointer:w.nil,schema:void 0,value:void 0,anchors:{},dynamicAnchors:{},validated:!0}),be=async(e,r=ge)=>{const t=oe(Se(r),e),n=oe(t,""),o=ae(t);if(!(e=>e in fe||e in de)(n)){const e=await M(n,{headers:{Accept:"application/schema+json"}});if(e.status>=400)throw await e.text(),Error(`Failed to retrieve schema with id: ${n}`);he(await te.parse(e),n)}const a=me(n),i="/"!==o[0]?Ee(a,o):o,s=Object.freeze({...a,pointer:i,value:w.get(i,a.schema)});return we(s)},we=e=>C.isReference(e.value)?be(C.href(e.value),e):e,Ee=(e,r)=>{if(!(r in e.anchors))throw Error(`No such anchor '${encodeURI(e.id)}#${encodeURI(r)}'`);return e.anchors[r]},Se=e=>`${e.id}#${encodeURI(e.pointer)}`,Ce=e=>C.isReference(e.value)?C.value(e.value):e.value,Oe=(e,r)=>{const t=me(r.id),n=Object.freeze({...r,pointer:w.append(e,r.pointer),value:Ce(r)[e],validated:t.validated});return we(n)},Ae=r(((e,r)=>V.pipeline([Ce,V.map((async(t,n)=>e(await Oe(n,r),n))),V.all],r))),Ie={parentId:"",parentDialect:"",includeEmbedded:!0},je=(e,r)=>{if(r.startsWith("file://")){const t=e.slice(7,e.lastIndexOf("/"));return""===e?"":ie(t,r.slice(7))}return r};var Te={setConfig:(e,r,t)=>{ue[e]||(ue[e]={}),ue[e][r]=t},getConfig:pe,add:he,get:be,markValidated:e=>{fe[e].validated=!0},uri:Se,value:Ce,getAnchorPointer:Ee,typeOf:(e,r)=>ne(Ce(e),r),has:(e,r)=>e in Ce(r),step:Oe,keys:e=>Object.keys(Ce(e)),entries:e=>V.pipeline([Ce,Object.keys,V.map((async r=>[r,await Oe(r,e)])),V.all],e),map:Ae,length:e=>Ce(e).length,toSchema:(e,r={})=>{const t={...Ie,...r},n=JSON.parse(JSON.stringify(e.schema,((r,n)=>{if(!C.isReference(n))return n;const o=C.value(n),a="string"==typeof o.$schema?oe(o.$schema,""):e.dialectId,i=pe(a,"embeddedToken");return!t.includeEmbedded&&i in o?void 0:C.value(n)}))),o=pe(e.dialectId,"dynamicAnchorToken");Object.entries(e.dynamicAnchors).forEach((([e,r])=>{const t=ae(r);w.assign(t,n,{[o]:e,...w.get(t,n)})}));const a=pe(e.dialectId,"anchorToken");Object.entries(e.anchors).filter((([e])=>""!==e)).forEach((([e,r])=>{w.assign(r,n,{[a]:e,...w.get(r,n)})}));const i=pe(e.dialectId,"baseToken"),s=je(t.parentId,e.id),c=t.parentDialect===e.dialectId?"":e.dialectId;return{...s&&{[i]:s},...c&&{$schema:c},...n}}};Te.setConfig,Te.getConfig,Te.add,Te.get,Te.markValidated,Te.uri,Te.value,Te.getAnchorPointer,Te.typeOf,Te.has,Te.step,Te.keys,Te.entries,Te.map,Te.length,Te.toSchema;class xe extends Error{constructor(e){super("Invalid Schema"),this.name=this.constructor.name,this.output=e}}var Pe=xe;var $e={compile:e=>Te.value(e),interpret:()=>!0};const{resolveUrl:De}=c,Re="FLAG",Ne="BASIC",_e="DETAILED",Fe="VERBOSE";let ke=_e,Ue=!0;te.addPlugin("application/schema+json",{parse:async e=>await e.json(),matcher:e=>e.endsWith(".schema.json")});const qe=async e=>{const r={metaData:{}};return{ast:r,schemaUri:await Je(e,r)}},Le=r((({ast:e,schemaUri:r},t,n=Re)=>{if(![Re,Ne,_e,Fe].includes(n))throw Error(`The '${n}' error format is not supported`);const a=[],i=o.subscribe("result",ze(n,a));return Ge(r,t,e,{}),o.unsubscribe(i),a[0]})),ze=(e,r)=>{const t=[];return(n,o)=>{if("result"===n){const{keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a}=o,i={keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a,errors:[]};t.push(i)}else if("result.start"===n)t.push(n);else if("result.end"===n){const n=t.pop();for(;"result.start"!==t[t.length-1];){const r=t.pop(),o=[r];e===Ne&&(o.push(...r.errors),delete r.errors),(e===Fe||e!==Re&&!r.valid)&&n.errors.unshift(...o)}t[t.length-1]=n,r[0]=n}}},He={},Ve=e=>He[e]||$e,Me=e=>e in He,Ke={},Ze={},Je=async(e,r)=>{if(e=await Be(e),!Me(`${e.dialectId}#validate`)){const r=await Te.get(e.dialectId);(Te.getConfig(r.id,"mandatoryVocabularies")||[]).forEach((e=>{if(!r.vocabulary[e])throw Error(`Vocabulary '${e}' must be explicitly declared and required`)})),Object.entries(r.vocabulary).forEach((([e,t])=>{if(e in Ke)Object.entries(Ke[e]).forEach((([e,t])=>{((e,r)=>{He[e]={collectEvaluatedItems:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&new Set,collectEvaluatedProperties:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&[],...r}})(`${r.id}#${e}`,t)}));else if(t)throw Error(`Missing required vocabulary: ${e}`)}))}if(Ue&&!e.validated){if(Te.markValidated(e.id),!(e.dialectId in Ze)){const r=await Te.get(e.dialectId),t=await qe(r);Ze[r.id]=Le(t)}const r=_.cons(e.schema,e.id),t=Ze[e.dialectId](r,ke);if(!t.valid)throw new Pe(t)}return e.id in r.metaData||(r.metaData[e.id]={id:e.id,dynamicAnchors:e.dynamicAnchors,anchors:e.anchors}),Ve(`${e.dialectId}#validate`).compile(e,r)},Be=async e=>Te.typeOf(e,"string")?Be(await Te.get(Te.value(e),e)):e,Ge=(e,r,t,n)=>{const o=We(e,t),a=De(e,"");return Ve(o).interpret(e,r,t,{...t.metaData[a].dynamicAnchors,...n})},We=(e,r)=>{if(!(e in r))throw Error(`No schema found at ${e}`);return r[e][0]};var Qe={validate:async(e,r,t)=>{const n=await qe(e),o=(e,r)=>Le(n,_.cons(e),r);return void 0===r?o:o(r,t)},compile:qe,interpret:Le,setMetaOutputFormat:e=>{ke=e},setShouldMetaValidate:e=>{Ue=e},FLAG:Re,BASIC:Ne,DETAILED:_e,VERBOSE:Fe,add:(e,r="",t="")=>{const n=Te.add(e,r,t);delete Ze[n]},getKeyword:Ve,hasKeyword:Me,defineVocabulary:(e,r)=>{Ke[e]=r},compileSchema:Je,interpretSchema:Ge,collectEvaluatedProperties:(e,r,t,n,o)=>{const a=We(e,t);return Ve(a).collectEvaluatedProperties(e,r,t,n,o)},collectEvaluatedItems:(e,r,t,n,o)=>{const a=We(e,t);return Ve(a).collectEvaluatedItems(e,r,t,n,o)},addMediaTypePlugin:te.addPlugin};var Ye={compile:async(e,r)=>{const t=Te.uri(e);if(!(t in r)){r[t]=!1;const n=Te.value(e);if(!["object","boolean"].includes(typeof n))throw Error(`No schema found at '${Te.uri(e)}'`);r[t]=[`${e.dialectId}#validate`,Te.uri(e),"boolean"==typeof n?n:await V.pipeline([Te.entries,V.map((([r,t])=>[`${e.dialectId}#${r}`,t])),V.filter((([r])=>r!==`${e.dialectId}#validate`)),V.map((async([t,n])=>{const o=await Qe.getKeyword(t).compile(n,r,e);return[t,Te.uri(n),o]})),V.all],e)]}return t},interpret:(e,r,t,n)=>{const[a,i,s]=t[e];o.publishSync("result.start");const c="boolean"==typeof s?s:s.every((([e,a,i])=>{o.publishSync("result.start");const s=Qe.getKeyword(e).interpret(i,r,t,n);return o.publishSync("result",{keyword:e,absoluteKeywordLocation:a,instanceLocation:_.uri(r),valid:s,ast:i}),o.publishSync("result.end"),s}));return o.publishSync("result",{keyword:a,absoluteKeywordLocation:i,instanceLocation:_.uri(r),valid:c,ast:e}),o.publishSync("result.end"),c},collectEvaluatedProperties:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&[]:a.filter((([e])=>!o||!e.endsWith("#unevaluatedProperties"))).reduce(((e,[o,,a])=>{const i=e&&Qe.getKeyword(o).collectEvaluatedProperties(a,r,t,n);return!1!==i&&[...e,...i]}),[])},collectEvaluatedItems:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&new Set:a.filter((([e])=>!o||!e.endsWith("#unevaluatedItems"))).reduce(((e,[o,,a])=>{const i=!1!==e&&Qe.getKeyword(o).collectEvaluatedItems(a,r,t,n);return!1!==i&&new Set([...e,...i])}),new Set)}},Xe={metaData:$e,validate:Ye},er={Core:Qe,Schema:Te,Instance:_,Reference:C,Keywords:Xe,InvalidSchemaError:Pe},rr=er.Core,tr=er.Schema,nr=er.Instance,or=er.Reference,ar=er.Keywords,ir=er.InvalidSchemaError;e.Core=rr,e.Instance=nr,e.InvalidSchemaError=ir,e.Keywords=ar,e.Reference=or,e.Schema=tr,e.default=er,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
define(["exports"],(function(e){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=function(e,r){return function t(){null==r&&(r=e.length);var n=[].slice.call(arguments);return n.length>=r?e.apply(this,n):function(){return t.apply(this,n.concat([].slice.call(arguments)))}}};var n={exports:{}};!function(e,t){!function(r,n){var o={};r.PubSub?(o=r.PubSub,console.warn("PubSub already loaded, using existing version")):(r.PubSub=o,function(e){var r={},t=-1,n="*";function o(e){var r;for(r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!0;return!1}function a(e){return function(){throw e}}function i(e,r,t){try{e(r,t)}catch(e){setTimeout(a(e),0)}}function s(e,r,t){e(r,t)}function c(e,t,n,o){var a,c=r[t],u=o?s:i;if(Object.prototype.hasOwnProperty.call(r,t))for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&u(c[a],e,n)}function u(e,r,t){return function(){var o=String(e),a=o.lastIndexOf(".");for(c(e,e,r,t);-1!==a;)a=(o=o.substr(0,a)).lastIndexOf("."),c(e,o,r,t);c(e,n,r,t)}}function l(e){var t=String(e);return Boolean(Object.prototype.hasOwnProperty.call(r,t)&&o(r[t]))}function p(e){for(var r=String(e),t=l(r)||l(n),o=r.lastIndexOf(".");!t&&-1!==o;)o=(r=r.substr(0,o)).lastIndexOf("."),t=l(r);return t}function f(e,r,t,n){var o=u(e="symbol"==typeof e?e.toString():e,r,n);return!!p(e)&&(!0===t?o():setTimeout(o,0),!0)}e.publish=function(r,t){return f(r,t,!1,e.immediateExceptions)},e.publishSync=function(r,t){return f(r,t,!0,e.immediateExceptions)},e.subscribe=function(e,n){if("function"!=typeof n)return!1;e="symbol"==typeof e?e.toString():e,Object.prototype.hasOwnProperty.call(r,e)||(r[e]={});var o="uid_"+String(++t);return r[e][o]=n,o},e.subscribeAll=function(r){return e.subscribe(n,r)},e.subscribeOnce=function(r,t){var n=e.subscribe(r,(function(){e.unsubscribe(n),t.apply(this,arguments)}));return e},e.clearAllSubscriptions=function(){r={}},e.clearSubscriptions=function(e){var t;for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&delete r[t]},e.countSubscriptions=function(e){var t,n,o=0;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)){for(n in r[t])o++;break}return o},e.getSubscriptions=function(e){var t,n=[];for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&n.push(t);return n},e.unsubscribe=function(t){var n,o,a,i=function(e){var t;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e))return!0;return!1},s="string"==typeof t&&(Object.prototype.hasOwnProperty.call(r,t)||i(t)),c=!s&&"string"==typeof t,u="function"==typeof t,l=!1;if(!s){for(n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(o=r[n],c&&o[t]){delete o[t],l=t;break}if(u)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&o[a]===t&&(delete o[a],l=!0)}return l}e.clearSubscriptions(t)}}(o)),void 0!==e&&e.exports&&(t=e.exports=o),t.PubSub=o,e.exports=t=o}("object"==typeof window&&window||r)}(n,n.exports);var o={exports:{}}; | ||
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */!function(e,r){!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var n=r.length-1,o=1;o<n;++o)r[o]=r[o].slice(1,-1);return r[n]=r[n].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,r){var t=e;if(r)for(var n in r)t[n]=r[n];return t}function s(e){var n="[A-Za-z]",o="[0-9]",a=r(o,"[A-Fa-f]"),i=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=r("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=r(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t(n+r(n,o,"[\\+\\-\\.]")+"*"),t(t(i+"|"+r(l,s,"[\\:]"))+"*");var p=t(t("25[0-5]")+"|"+t("2[0-4]"+o)+"|"+t("1"+o+o)+"|"+t("0?[1-9]"+o)+"|0?0?"+o),f=t(p+"\\."+p+"\\."+p+"\\."+p),d=t(a+"{1,4}"),h=t(t(d+"\\:"+d)+"|"+f),v=t(t(d+"\\:")+"{6}"+h),y=t("\\:\\:"+t(d+"\\:")+"{5}"+h),m=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+h),g=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+h),b=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+h),w=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+h),E=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+h),S=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),O=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),C=t([v,y,m,g,b,w,E,S,O].join("|")),A=t(t(l+"|"+i)+"+");t("[vV]"+a+"+\\."+r(l,s,"[\\:]")+"+"),t(t(i+"|"+r(l,s))+"*");var I=t(i+"|"+r(l,s,"[\\:\\@]"));return t(t(i+"|"+r(l,s,"[\\@]"))+"+"),t(t(I+"|"+r("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(r("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+C+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+A+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,r){var t=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)},f=2147483647,d=36,h=1,v=26,y=38,m=700,g=72,b=128,w="-",E=/^xn--/,S=/[^\0-\x7E]/,O=/[\x2E\u3002\uFF0E\uFF61]/g,C={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=d-h,I=Math.floor,j=String.fromCharCode;function T(e){throw new RangeError(C[e])}function x(e,r){for(var t=[],n=e.length;n--;)t[n]=r(e[n]);return t}function $(e,r){var t=e.split("@"),n="";return t.length>1&&(n=t[0]+"@",e=t[1]),n+x((e=e.replace(O,".")).split("."),r).join(".")}function D(e){for(var r=[],t=0,n=e.length;t<n;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<n){var a=e.charCodeAt(t++);56320==(64512&a)?r.push(((1023&o)<<10)+(1023&a)+65536):(r.push(o),t--)}else r.push(o)}return r}var P=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:d},N=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},R=function(e,r,t){var n=0;for(e=t?I(e/m):e>>1,e+=I(e/r);e>A*v>>1;n+=d)e=I(e/A);return I(n+(A+1)*e/(e+y))},F=function(e){var r=[],t=e.length,n=0,o=b,a=g,i=e.lastIndexOf(w);i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&T("not-basic"),r.push(e.charCodeAt(s));for(var c=i>0?i+1:0;c<t;){for(var u=n,l=1,p=d;;p+=d){c>=t&&T("invalid-input");var y=P(e.charCodeAt(c++));(y>=d||y>I((f-n)/l))&&T("overflow"),n+=y*l;var m=p<=a?h:p>=a+v?v:p-a;if(y<m)break;var E=d-m;l>I(f/E)&&T("overflow"),l*=E}var S=r.length+1;a=R(n-u,S,0==u),I(n/S)>f-o&&T("overflow"),o+=I(n/S),n%=S,r.splice(n++,0,o)}return String.fromCodePoint.apply(String,r)},_=function(e){var r=[],t=(e=D(e)).length,n=b,o=0,a=g,i=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var p=u.value;p<128&&r.push(j(p))}}catch(e){s=!0,c=e}finally{try{!i&&l.return&&l.return()}finally{if(s)throw c}}var y=r.length,m=y;for(y&&r.push(w);m<t;){var E=f,S=!0,O=!1,C=void 0;try{for(var A,x=e[Symbol.iterator]();!(S=(A=x.next()).done);S=!0){var $=A.value;$>=n&&$<E&&(E=$)}}catch(e){O=!0,C=e}finally{try{!S&&x.return&&x.return()}finally{if(O)throw C}}var P=m+1;E-n>I((f-o)/P)&&T("overflow"),o+=(E-n)*P,n=E;var F=!0,_=!1,U=void 0;try{for(var k,q=e[Symbol.iterator]();!(F=(k=q.next()).done);F=!0){var z=k.value;if(z<n&&++o>f&&T("overflow"),z==n){for(var L=o,H=d;;H+=d){var V=H<=a?h:H>=a+v?v:H-a;if(L<V)break;var M=L-V,K=d-V;r.push(j(N(V+M%K,0))),L=I(M/K)}r.push(j(N(L,0))),a=R(o,P,m==y),o=0,++m}}}catch(e){_=!0,U=e}finally{try{!F&&q.return&&q.return()}finally{if(_)throw U}}++o,++n}return r.join("")},U=function(e){return $(e,(function(e){return E.test(e)?F(e.slice(4).toLowerCase()):e}))},k=function(e){return $(e,(function(e){return S.test(e)?"xn--"+_(e):e}))},q={version:"2.1.0",ucs2:{decode:D,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:F,encode:_,toASCII:k,toUnicode:U},z={};function L(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function H(e){for(var r="",t=0,n=e.length;t<n;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(n-t>=6){var a=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(n-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function V(e,r){function t(e){var t=H(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,L).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,L).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,L).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,L).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,L).replace(r.PCT_ENCODED,o)),e}function M(e){return e.replace(/^0*(.*)/,"$1")||"0"}function K(e,r){var t=e.match(r.IPV4ADDRESS)||[],n=l(t,2)[1];return n?n.split(".").map(M).join("."):e}function Z(e,r){var t=e.match(r.IPV6ADDRESS)||[],n=l(t,3),o=n[1],a=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],p=u?u.split(":").map(M):[],f=c.split(":").map(M),d=r.IPV4ADDRESS.test(f[f.length-1]),h=d?7:8,v=f.length-h,y=Array(h),m=0;m<h;++m)y[m]=p[m]||f[v+m]||"";d&&(y[h-1]=K(y[h-1],r));var g=y.reduce((function(e,r,t){if(!r||"0"===r){var n=e[e.length-1];n&&n.index+n.length===t?n.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(g&&g.length>1){var w=y.slice(0,g.index),E=y.slice(g.index+g.length);b=w.join(":")+"::"+E.join(":")}else b=y.join(":");return a&&(b+="%"+a),b}return e}var J=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,B=void 0==="".match(/(){0}/)[1];function W(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},n=!1!==r.iri?u:c;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(J);if(o){B?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=Z(K(t.host,n),n)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var a=z[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)V(t,n);else{if(t.host&&(r.domainHost||a&&a.domainHost))try{t.host=q.toASCII(t.host.replace(n.PCT_ENCODED,H).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}V(t,c)}a&&a.parse&&a.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function G(e,r){var t=!1!==r.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(Z(K(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function re(e){for(var r=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(ee);if(!t)throw new Error("Unexpected dot segment condition");var n=t[0];e=e.slice(n.length),r.push(n)}return r.join("")}function te(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?u:c,n=[],o=z[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?q.toUnicode(e.host):q.toASCII(e.host.replace(t.PCT_ENCODED,H).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}V(e,t),"suffix"!==r.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=G(e,r);if(void 0!==a&&("suffix"!==r.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=re(i)),void 0===a&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=W(te(e,t),t),r=W(te(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(n.scheme=r.scheme,n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(r.path?("/"===r.path.charAt(0)?n.path=re(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:n.path=r.path:n.path="/"+r.path,n.path=re(n.path)),n.query=r.query):(n.path=e.path,void 0!==r.query?n.query=r.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=r.fragment,n}function oe(e,r,t){var n=i({scheme:"null"},t);return te(ne(W(e,n),W(r,n),n,!0),n)}function ae(e,r){return"string"==typeof e?e=te(W(e,r),r):"object"===n(e)&&(e=W(te(e,r),r)),e}function ie(e,r,t){return"string"==typeof e?e=te(W(e,t),t):"object"===n(e)&&(e=te(e,t)),"string"==typeof r?r=te(W(r,t),t):"object"===n(r)&&(r=te(r,t)),e===r}function se(e,r){return e&&e.toString().replace(r&&r.iri?u.ESCAPE:c.ESCAPE,L)}function ce(e,r){return e&&e.toString().replace(r&&r.iri?u.PCT_ENCODED:c.PCT_ENCODED,H)}var ue={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=pe(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),n=l(t,2),o=n[0],a=n[1];e.path=o&&"/"!==o?o:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},de={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},he={},ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",me=t(t("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+t("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+t("%"+ye+ye)),ge="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ee=new RegExp(ve,"g"),Se=new RegExp(me,"g"),Oe=new RegExp(r("[^]",ge,"[\\.]",'[\\"]',be),"g"),Ce=new RegExp(r("[^]",ve,we),"g"),Ae=Ce;function Ie(e){var r=H(e);return r.match(Ee)?r:e}var je={scheme:"mailto",parse:function(e,r){var t=e,n=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,a={},i=t.query.split("&"),s=0,c=i.length;s<c;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),p=0,f=l.length;p<f;++p)n.push(l[p]);break;case"subject":t.subject=ce(u[1],r);break;case"body":t.body=ce(u[1],r);break;default:o=!0,a[ce(u[0],r)]=ce(u[1],r)}}o&&(t.headers=a)}t.query=void 0;for(var d=0,h=n.length;d<h;++d){var v=n[d].split("@");if(v[0]=ce(v[0]),r.unicodeSupport)v[1]=ce(v[1],r).toLowerCase();else try{v[1]=q.toASCII(ce(v[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[d]=v.join("@")}return t},serialize:function(e,r){var t=e,n=a(e.to);if(n){for(var i=0,s=n.length;i<s;++i){var c=String(n[i]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(Se,Ie).replace(Se,o).replace(Oe,L),p=c.slice(u+1);try{p=r.iri?q.toUnicode(p):q.toASCII(ce(p,r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=l+"@"+p}t.path=n.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var d=[];for(var h in f)f[h]!==he[h]&&d.push(h.replace(Se,Ie).replace(Se,o).replace(Ce,L)+"="+f[h].replace(Se,Ie).replace(Se,o).replace(Ae,L));return d.length&&(t.query=d.join("&")),t}},Te=/^([^\:]+)\:(.*)/,xe={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(Te),n=e;if(t){var o=r.scheme||n.scheme||"urn",a=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||a),c=z[s];n.nid=a,n.nss=i,n.path=void 0,c&&(n=c.parse(n,r))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",n=e.nid,o=t+":"+(r.nid||n),a=z[o];a&&(e=a.serialize(e,r));var i=e,s=e.nss;return i.path=(n||r.nid)+":"+s,i}},$e=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,De={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match($e)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};z[ue.scheme]=ue,z[le.scheme]=le,z[fe.scheme]=fe,z[de.scheme]=de,z[je.scheme]=je,z[xe.scheme]=xe,z[De.scheme]=De,e.SCHEMES=z,e.pctEncChar=L,e.pctDecChars=H,e.parse=W,e.removeDotSegments=re,e.serialize=te,e.resolveComponents=ne,e.resolve=oe,e.normalize=ae,e.equal=ie,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(r)}(0,o.exports);const a=o.exports,i={null:e=>null===e,boolean:e=>"boolean"==typeof e,object:e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,array:e=>Array.isArray(e),number:e=>"number"==typeof e,integer:e=>Number.isInteger(e),string:e=>"string"==typeof e};var s={jsonTypeOf:(e,r)=>i[r](e),resolveUrl:(e,r)=>{const t=a.resolve(e,r,{iri:!0});if(a.resolve(e,"",{iri:!0})&&"file"===a.parse(t).scheme&&"file"!==a.parse(e).scheme)throw Error(`Can't access file '${t}' resource from network context '${e}'`);return t},urlFragment:e=>a.unescapeComponent(a.parse(e).fragment)||"",pathRelative:(e,r)=>{if(e===r)return"";let t=1;const n=e.length-1,o=r.length-t,a=n<o?n:o;let i=-1,s=0;for(;s<a;s++){const n=e.charCodeAt(s+1);if(n!==r.charCodeAt(t+s))break;47===n&&(i=s)}if(o>a){if(47===r.charCodeAt(t+s))return r.slice(t+s+1);if(0===s)return r.slice(t+s)}n>a&&(47===e.charCodeAt(s+1)?i=s:0===a&&(i=0));let c="";for(s=i+2;s<=e.length;++s)s!==e.length&&47!==e.charCodeAt(s)||(c+=0===c.length?"..":"/..");return t+=i,c.length>0?`${c}${r.slice(t,r.length)}`:(47===r.charCodeAt(t)&&++t,r.slice(t,r.length))}};const c=t,u=e=>{if(e.length>0&&"/"!==e[0])throw Error("Invalid JSON Pointer");return e.split("/").slice(1).map(y)},l=(e,r,t,n)=>{if(0===e.length)return t;if(e.length>1){const o=e.shift();return{...r,[o]:l(e,g(r,o,n),t,h(o,n))}}if(Array.isArray(r)){const n=[...r];return n[m(r,e[0])]=t,n}return"object"==typeof r&&null!==r?{...r,[e[0]]:t}:g(r,e[0],n)},p=(e,r,t,n)=>{if(0!==e.length)if(1!==e.length||b(r)){const o=e.shift();p(e,g(r,o,n),t,h(o,n))}else{r[m(r,e[0])]=t}},f=(e,r,t)=>{if(0!=e.length){if(e.length>1){const n=e.shift(),o=g(r,n,t);return{...r,[n]:f(e,o,h(n,t))}}if(Array.isArray(r))return r.filter(((r,t)=>t!=e[0]));if("object"==typeof r&&null!==r){const{[e[0]]:t,...n}=r;return n}return g(r,e[0],t)}},d=(e,r,t)=>{if(0!==e.length)if(e.length>1){const n=e.shift(),o=g(r,n,t);d(e,o,h(n,t))}else Array.isArray(r)?r.splice(e[0],1):"object"==typeof r&&null!==r?delete r[e[0]]:g(r,e[0],t)},h=c(((e,r)=>r+"/"+v(e))),v=e=>e.toString().replace(/~/g,"~0").replace(/\//g,"~1"),y=e=>e.toString().replace(/~1/g,"/").replace(/~0/g,"~"),m=(e,r)=>Array.isArray(e)&&"-"===r?e.length:r,g=(e,r,t="")=>{if(void 0===e)throw TypeError(`Value at '${t}' is undefined and does not have property '${r}'`);if(null===e)throw TypeError(`Value at '${t}' is null and does not have property '${r}'`);if(b(e))throw TypeError(`Value at '${t}' is a ${typeof e} and does not have property '${r}'`);return e[m(e,r)]},b=e=>null===e||"object"!=typeof e;var w={nil:"",append:h,get:(e,r)=>{const t=u(e),n=e=>t.reduce((([e,r],t)=>[g(e,t,r),h(t,r)]),[e,""])[0];return void 0===r?n:n(r)},set:(e,r,t)=>{const n=u(e),o=c(((e,r)=>l(n,e,r,"")));return void 0===r?o:o(r,t)},assign:(e,r,t)=>{const n=u(e),o=c(((e,r)=>p(n,e,r,"")));return void 0===r?o:o(r,t)},unset:(e,r)=>{const t=u(e),n=e=>f(t,e,"");return void 0===r?n:n(r)},remove:(e,r)=>{const t=u(e),n=e=>d(t,e,"");return void 0===r?n:n(r)}};const E=Symbol("$__value"),S=Symbol("$__href");var O={cons:(e,r)=>Object.freeze({[S]:e,[E]:r}),isReference:e=>e&&void 0!==e[S],href:e=>e[S],value:e=>e[E]};const C=w,A=t,{resolveUrl:I,jsonTypeOf:j}=s,T=O,x=Object.freeze({id:"",pointer:"",instance:void 0,value:void 0}),$=e=>T.isReference(e.value)?T.value(e.value):e.value,D=A(((e,r)=>j($(e),r))),P=(e,r)=>Object.freeze({...r,pointer:C.append(e,r.pointer),value:$(r)[e]}),N=A(((e,r)=>$(r).map(((t,n,o,a)=>e(P(n,r),n,o,a))))),R=A(((e,r)=>$(r).forEach(((t,n,o,a)=>e(P(n,r),n,o,a))))),F=A(((e,r)=>$(r).map(((e,t,n,o)=>P(t,r))).filter(((r,t,n,o)=>e(r,t,n,o))))),_=A(((e,r,t)=>$(t).reduce(((r,n,o)=>e(r,P(o,t),o)),r))),U=A(((e,r)=>$(r).every(((t,n,o,a)=>e(P(n,r),n,o,a))))),k=A(((e,r)=>$(r).some(((t,n,o,a)=>e(P(n,r),n,o,a)))));var q={nil:x,cons:(e,r="")=>Object.freeze({...x,id:I(r,""),instance:e,value:e}),get:(e,r=x)=>{if(!e.startsWith("#"))throw Error(`No JSON document found at '${e.split("#")[0]}'`);return Object.freeze({...r,pointer:e.substr(1)})},uri:e=>`${e.id}#${encodeURI(e.pointer)}`,value:$,has:(e,r)=>e in $(r),typeOf:D,length:e=>$(e).length,step:P,entries:e=>Object.keys($(e)).map((r=>[r,P(r,e)])),keys:e=>Object.keys($(e)),map:N,forEach:R,filter:F,reduce:_,every:U,some:k},z=async e=>Object.entries(await e);var L=t((async(e,r)=>(await r).map(e)));var H=t((async(e,r,t)=>(await t).reduce((async(r,t)=>e(await r,t)),r)));const V=H;var M=t((async(e,r,t={})=>V((async(r,t)=>await e(t)?r.concat([t]):r),[],r,t)));const K=L;var Z=t((async(e,r)=>{const t=await K(e,r);return(await Promise.all(t)).some((e=>e))}));const J=L;var B=t((async(e,r)=>{const t=await J(e,r);return(await Promise.all(t)).every((e=>e))}));var W=t(((e,r)=>e.reduce((async(e,r)=>r(await e)),r)));const G=W,Q=z,Y=H;var X={entries:z,map:L,filter:M,reduce:H,some:Z,every:B,pipeline:W,all:e=>Promise.all(e),allValues:e=>G([Q,Y((async(e,[r,t])=>(e[r]=await t,e)),{})],e)},ee=fetch,re={},te=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,ne=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,oe=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,ae=/\\([\u000b\u0020-\u00ff])/g,ie=/([\\"])/g,se=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function ce(e){var r=String(e);if(oe.test(r))return r;if(r.length>0&&!ne.test(r))throw new TypeError("invalid parameter value");return'"'+r.replace(ie,"\\$1")+'"'}function ue(e){this.parameters=Object.create(null),this.type=e}re.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var r=e.parameters,t=e.type;if(!t||!se.test(t))throw new TypeError("invalid type");var n=t;if(r&&"object"==typeof r)for(var o,a=Object.keys(r).sort(),i=0;i<a.length;i++){if(o=a[i],!oe.test(o))throw new TypeError("invalid parameter name");n+="; "+o+"="+ce(r[o])}return n},re.parse=function(e){if(!e)throw new TypeError("argument string is required");var r="object"==typeof e?function(e){var r;"function"==typeof e.getHeader?r=e.getHeader("content-type"):"object"==typeof e.headers&&(r=e.headers&&e.headers["content-type"]);if("string"!=typeof r)throw new TypeError("content-type header is missing from object");return r}(e):e;if("string"!=typeof r)throw new TypeError("argument string is required to be a string");var t=r.indexOf(";"),n=-1!==t?r.substr(0,t).trim():r.trim();if(!se.test(n))throw new TypeError("invalid media type");var o=new ue(n.toLowerCase());if(-1!==t){var a,i,s;for(te.lastIndex=t;i=te.exec(r);){if(i.index!==t)throw new TypeError("invalid parameter format");t+=i[0].length,a=i[1].toLowerCase(),'"'===(s=i[2])[0]&&(s=s.substr(1,s.length-2).replace(ae,"$1")),o.parameters[a]=s}if(t!==r.length)throw new TypeError("invalid parameter format")}return o};const le=re,pe={};var fe={addPlugin:(e,r)=>{pe[e]=r},parse:e=>{const r=le.parse(e.headers.get("content-type"));if(!(r.type in pe))throw Error(`${e.url} is not a schema. Found a document with media type: ${r.type}`);return pe[r.type].parse(e,r.parameters)},getContentType:e=>{for(const r in pe)if(pe[r].matcher(e))return r;return"application/octet-stream"}};const de=t,he=X,ve=w,{jsonTypeOf:ye,resolveUrl:me,urlFragment:ge,pathRelative:be}=s,we=ee,Ee=O,Se=fe,Oe="https://json-schema.org/draft/2019-09/vocab/core",Ce="https://json-schema.org/draft/2020-12/vocab/core",Ae={},Ie={},je=(e,r)=>{const t=Ie[e];return Ae[t]?.[r]},Te={},xe={},$e=(e,r="",t="")=>{e=JSON.parse(JSON.stringify(e));const n=me(r,""),o=me(e.$schema||t,"");if(!o)throw Error("Couldn't determine schema dialect");if(delete e.$schema,!(o in Ie))if(!0===e?.$vocabulary?.[Oe]&&o===De(e,n,Oe)[0])Ie[o]=Oe;else if(!0===e?.$vocabulary?.[Ce]&&o===De(e,n,Ce)[0])Ie[o]=Ce;else{const e=Te[o];if(!e)throw Error(`Couldn't determine JSON Schema version for dialect: '${o}'`);!0===e.vocabulary[Oe]?Ie[o]=Oe:!0===e.vocabulary[Ce]?Ie[o]=Ce:Ie[o]=Ie[e.dialectId]}const[a,i]=De(e,n,Ie[o]);if(!a)throw Error("Couldn't determine an identifier for the schema");const s=je(o,"baseToken");delete e[s],n&&(xe[n]=a);const c=je(o,"anchorToken");i&&s===c&&(e[c]=c!==s?encodeURI(i):`#${encodeURI(i)}`);const u={},l=je(o,"recursiveAnchorToken");let p;!0===e[l]&&(u[""]=`${a}#`,e[c]="",delete e[l]);const f=je(o,"vocabularyToken");ye(e[f],"object")?(p=e[f],delete e[f]):p={[Ie[o]]:!0};const d={"":""};return Te[a]={id:a,dialectId:o,schema:Pe(e,a,o,ve.nil,d,u),anchors:d,dynamicAnchors:u,vocabulary:p,validated:!1},a},De=(e,r,t)=>{const n=Ae[t]?.baseToken,o=me(r,e[n]||"");return[me(o,""),ge(o)]},Pe=(e,r,t,n,o,a)=>{if(ye(e,"object")){const i="string"==typeof e.$schema?me(e.$schema,""):t,s=je(i,"embeddedToken"),c=je(i,"anchorToken");if("string"==typeof e[s]&&(s!==c||"#"!==e[s][0])){const n=me(r,e[s]);return e[je(i,"baseToken")]=n,$e(e,n,t),Ee.cons(e[s],e)}const u=je(t,"anchorToken"),l=je(t,"dynamicAnchorToken");"string"==typeof e[l]&&(a[e[l]]=`${r}#${encodeURI(n)}`,o[e[l]]=n,delete e[l]);const p=je(t,"embeddedToken");if("string"==typeof e[u]){const r=u!==p?e[u]:e[u].slice(1);o[r]=n,delete e[u]}const f=je(t,"jrefToken");if("string"==typeof e[f])return Ee.cons(e[f],e);for(const i in e)e[i]=Pe(e[i],r,t,ve.append(i,n),o,a);return e}return Array.isArray(e)?e.map(((e,i)=>Pe(e,r,t,ve.append(i,n),o,a))):e},Ne=e=>Te[xe[e]]||Te[e],Re=Object.freeze({id:"",dialectId:void 0,vocabulary:{},pointer:ve.nil,schema:void 0,value:void 0,anchors:{},dynamicAnchors:{},validated:!0}),Fe=async(e,r=Re)=>{const t=me(ke(r),e),n=me(t,""),o=ge(t);if(!(e=>e in Te||e in xe)(n)){const e=await we(n,{headers:{Accept:"application/schema+json"}});if(e.status>=400)throw await e.text(),Error(`Failed to retrieve schema with id: ${n}`);const[r,t]=await Se.parse(e),o=me(r.$schema,"")||t;n===o||o in Ie||await Fe(o),$e(r,n)}const a=Ne(n),i="/"!==o[0]?Ue(a,o):o,s=Object.freeze({...a,pointer:i,value:ve.get(i,a.schema)});return _e(s)},_e=e=>Ee.isReference(e.value)?Fe(Ee.href(e.value),e):e,Ue=(e,r)=>{if(!(r in e.anchors))throw Error(`No such anchor '${encodeURI(e.id)}#${encodeURI(r)}'`);return e.anchors[r]},ke=e=>`${e.id}#${encodeURI(e.pointer)}`,qe=e=>Ee.isReference(e.value)?Ee.value(e.value):e.value,ze=(e,r)=>{const t=Ne(r.id),n=Object.freeze({...r,pointer:ve.append(e,r.pointer),value:qe(r)[e],validated:t.validated});return _e(n)},Le=de(((e,r)=>he.pipeline([qe,he.map((async(t,n)=>e(await ze(n,r),n))),he.all],r))),He={parentId:"",parentDialect:"",includeEmbedded:!0},Ve=(e,r)=>{if(r.startsWith("file://")){const t=e.slice(7,e.lastIndexOf("/"));return""===e?"":be(t,r.slice(7))}return r};var Me={setConfig:(e,r,t)=>{Ie[e]=e,Ae[e]||(Ae[e]={}),Ae[e][r]=t},getConfig:je,add:$e,get:Fe,markValidated:e=>{Te[e].validated=!0},uri:ke,value:qe,getAnchorPointer:Ue,typeOf:(e,r)=>ye(qe(e),r),has:(e,r)=>e in qe(r),step:ze,keys:e=>Object.keys(qe(e)),entries:e=>he.pipeline([qe,Object.keys,he.map((async r=>[r,await ze(r,e)])),he.all],e),map:Le,length:e=>qe(e).length,toSchema:(e,r={})=>{const t={...He,...r},n=JSON.parse(JSON.stringify(e.schema,((r,n)=>{if(!Ee.isReference(n))return n;const o=Ee.value(n),a="string"==typeof o.$schema?me(o.$schema,""):e.dialectId,i=je(a,"embeddedToken");return!t.includeEmbedded&&i in o?void 0:Ee.value(n)}))),o=je(e.dialectId,"dynamicAnchorToken");Object.entries(e.dynamicAnchors).forEach((([e,r])=>{const t=ge(r);ve.assign(t,n,{[o]:e,...ve.get(t,n)})}));const a=je(e.dialectId,"anchorToken");Object.entries(e.anchors).filter((([e])=>""!==e)).forEach((([e,r])=>{ve.assign(r,n,{[a]:e,...ve.get(r,n)})}));const i=je(e.dialectId,"baseToken"),s=Ve(t.parentId,e.id),c=t.parentDialect===e.dialectId?"":e.dialectId;return{...s&&{[i]:s},...c&&{$schema:c},...n}}};class Ke extends Error{constructor(e){super("Invalid Schema"),this.name=this.constructor.name,this.output=e}}var Ze=Ke;const Je=Me;var Be={compile:e=>Je.value(e),interpret:()=>!0};const We=t,Ge=n.exports,{resolveUrl:Qe}=s,Ye=q,Xe=Me,er=Ze,rr=fe,tr=Be,nr="FLAG",or="BASIC",ar="DETAILED",ir="VERBOSE";let sr=ar,cr=!0;rr.addPlugin("application/schema+json",{parse:async(e,r)=>[await e.json(),r.schema||r.profile],matcher:e=>e.endsWith(".schema.json")});const ur=async e=>{const r={metaData:{}};return{ast:r,schemaUri:await mr(e,r)}},lr=We((({ast:e,schemaUri:r},t,n=nr)=>{if(![nr,or,ar,ir].includes(n))throw Error(`The '${n}' error format is not supported`);const o=[],a=Ge.subscribe("result",pr(n,o));return br(r,t,e,{}),Ge.unsubscribe(a),o[0]})),pr=(e,r)=>{const t=[];return(n,o)=>{if("result"===n){const{keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a}=o,i={keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a,errors:[]};t.push(i)}else if("result.start"===n)t.push(n);else if("result.end"===n){const n=t.pop();for(;"result.start"!==t[t.length-1];){const r=t.pop(),o=[r];e===or&&(o.push(...r.errors),delete r.errors),(e===ir||e!==nr&&!r.valid)&&n.errors.unshift(...o)}t[t.length-1]=n,r[0]=n}}},fr={},dr=e=>fr[e]||tr,hr=e=>e in fr,vr={},yr={},mr=async(e,r)=>{if(e=await gr(e),!hr(`${e.dialectId}#validate`)){const r=await Xe.get(e.dialectId);(Xe.getConfig(r.id,"mandatoryVocabularies")||[]).forEach((e=>{if(!r.vocabulary[e])throw Error(`Vocabulary '${e}' must be explicitly declared and required`)})),Object.entries(r.vocabulary).forEach((([e,t])=>{if(e in vr)Object.entries(vr[e]).forEach((([e,t])=>{((e,r)=>{fr[e]={collectEvaluatedItems:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&new Set,collectEvaluatedProperties:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&[],...r}})(`${r.id}#${e}`,t)}));else if(t)throw Error(`Missing required vocabulary: ${e}`)}))}if(cr&&!e.validated){if(Xe.markValidated(e.id),!(e.dialectId in yr)){const r=await Xe.get(e.dialectId),t=await ur(r);yr[r.id]=lr(t)}const r=Ye.cons(e.schema,e.id),t=yr[e.dialectId](r,sr);if(!t.valid)throw new er(t)}return e.id in r.metaData||(r.metaData[e.id]={id:e.id,dynamicAnchors:e.dynamicAnchors,anchors:e.anchors}),dr(`${e.dialectId}#validate`).compile(e,r)},gr=async e=>Xe.typeOf(e,"string")?gr(await Xe.get(Xe.value(e),e)):e,br=(e,r,t,n)=>{const o=wr(e,t),a=Qe(e,"");return dr(o).interpret(e,r,t,{...t.metaData[a].dynamicAnchors,...n})},wr=(e,r)=>{if(!(e in r))throw Error(`No schema found at ${e}`);return r[e][0]};var Er={validate:async(e,r,t)=>{const n=await ur(e),o=(e,r)=>lr(n,Ye.cons(e),r);return void 0===r?o:o(r,t)},compile:ur,interpret:lr,setMetaOutputFormat:e=>{sr=e},setShouldMetaValidate:e=>{cr=e},FLAG:nr,BASIC:or,DETAILED:ar,VERBOSE:ir,add:(e,r="",t="")=>{const n=Xe.add(e,r,t);delete yr[n]},getKeyword:dr,hasKeyword:hr,defineVocabulary:(e,r)=>{vr[e]=r},compileSchema:mr,interpretSchema:br,collectEvaluatedProperties:(e,r,t,n,o)=>{const a=wr(e,t);return dr(a).collectEvaluatedProperties(e,r,t,n,o)},collectEvaluatedItems:(e,r,t,n,o)=>{const a=wr(e,t);return dr(a).collectEvaluatedItems(e,r,t,n,o)},addMediaTypePlugin:rr.addPlugin};const Sr=X,Or=n.exports,Cr=Er,Ar=q,Ir=Me;var jr={compile:async(e,r)=>{const t=Ir.uri(e);if(!(t in r)){r[t]=!1;const n=Ir.value(e);if(!["object","boolean"].includes(typeof n))throw Error(`No schema found at '${Ir.uri(e)}'`);r[t]=[`${e.dialectId}#validate`,Ir.uri(e),"boolean"==typeof n?n:await Sr.pipeline([Ir.entries,Sr.map((([r,t])=>[`${e.dialectId}#${r}`,t])),Sr.filter((([r])=>r!==`${e.dialectId}#validate`)),Sr.map((async([t,n])=>{const o=await Cr.getKeyword(t).compile(n,r,e);return[t,Ir.uri(n),o]})),Sr.all],e)]}return t},interpret:(e,r,t,n)=>{const[o,a,i]=t[e];Or.publishSync("result.start");const s="boolean"==typeof i?i:i.every((([e,o,a])=>{Or.publishSync("result.start");const i=Cr.getKeyword(e).interpret(a,r,t,n);return Or.publishSync("result",{keyword:e,absoluteKeywordLocation:o,instanceLocation:Ar.uri(r),valid:i,ast:a}),Or.publishSync("result.end"),i}));return Or.publishSync("result",{keyword:o,absoluteKeywordLocation:a,instanceLocation:Ar.uri(r),valid:s,ast:e}),Or.publishSync("result.end"),s},collectEvaluatedProperties:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&[]:a.filter((([e])=>!o||!e.endsWith("#unevaluatedProperties"))).reduce(((e,[o,,a])=>{const i=e&&Cr.getKeyword(o).collectEvaluatedProperties(a,r,t,n);return!1!==i&&[...e,...i]}),[])},collectEvaluatedItems:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&new Set:a.filter((([e])=>!o||!e.endsWith("#unevaluatedItems"))).reduce(((e,[o,,a])=>{const i=!1!==e&&Cr.getKeyword(o).collectEvaluatedItems(a,r,t,n);return!1!==i&&new Set([...e,...i])}),new Set)}};var Tr={Core:Er,Schema:Me,Instance:q,Reference:O,Keywords:{metaData:Be,validate:jr},InvalidSchemaError:Ze};e.default=Tr,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=json-schema-core-amd.min.js.map |
@@ -1,9 +0,3 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=function(e,r){return function t(){null==r&&(r=e.length);var n=[].slice.call(arguments);return n.length>=r?e.apply(this,n):function(){return t.apply(this,n.concat([].slice.call(arguments)))}}};var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,r){return e(r={exports:{}},r.exports),r.exports}var n=t((function(e,t){var n,o;n="object"==typeof window&&window||r,o={},n.PubSub?(o=n.PubSub,console.warn("PubSub already loaded, using existing version")):(n.PubSub=o,function(e){var r={},t=-1,n="*";function o(e){var r;for(r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!0;return!1}function a(e){return function(){throw e}}function i(e,r,t){try{e(r,t)}catch(e){setTimeout(a(e),0)}}function s(e,r,t){e(r,t)}function c(e,t,n,o){var a,c=r[t],u=o?s:i;if(Object.prototype.hasOwnProperty.call(r,t))for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&u(c[a],e,n)}function u(e,r,t){return function(){var o=String(e),a=o.lastIndexOf(".");for(c(e,e,r,t);-1!==a;)a=(o=o.substr(0,a)).lastIndexOf("."),c(e,o,r,t);c(e,n,r,t)}}function l(e){var t=String(e);return Boolean(Object.prototype.hasOwnProperty.call(r,t)&&o(r[t]))}function p(e){for(var r=String(e),t=l(r)||l(n),o=r.lastIndexOf(".");!t&&-1!==o;)o=(r=r.substr(0,o)).lastIndexOf("."),t=l(r);return t}function f(e,r,t,n){var o=u(e="symbol"==typeof e?e.toString():e,r,n);return!!p(e)&&(!0===t?o():setTimeout(o,0),!0)}e.publish=function(r,t){return f(r,t,!1,e.immediateExceptions)},e.publishSync=function(r,t){return f(r,t,!0,e.immediateExceptions)},e.subscribe=function(e,n){if("function"!=typeof n)return!1;e="symbol"==typeof e?e.toString():e,Object.prototype.hasOwnProperty.call(r,e)||(r[e]={});var o="uid_"+String(++t);return r[e][o]=n,o},e.subscribeAll=function(r){return e.subscribe(n,r)},e.subscribeOnce=function(r,t){var n=e.subscribe(r,(function(){e.unsubscribe(n),t.apply(this,arguments)}));return e},e.clearAllSubscriptions=function(){r={}},e.clearSubscriptions=function(e){var t;for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&delete r[t]},e.countSubscriptions=function(e){var t,n,o=0;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)){for(n in r[t])o++;break}return o},e.getSubscriptions=function(e){var t,n=[];for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&n.push(t);return n},e.unsubscribe=function(t){var n,o,a,i=function(e){var t;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e))return!0;return!1},s="string"==typeof t&&(Object.prototype.hasOwnProperty.call(r,t)||i(t)),c=!s&&"string"==typeof t,u="function"==typeof t,l=!1;if(!s){for(n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(o=r[n],c&&o[t]){delete o[t],l=t;break}if(u)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&o[a]===t&&(delete o[a],l=!0)}return l}e.clearSubscriptions(t)}}(o)),void 0!==e&&e.exports&&(t=e.exports=o),t.PubSub=o,e.exports=t=o}));n.PubSub;var o,a=t((function(e,r){ | ||
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ | ||
!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var n=r.length-1,o=1;o<n;++o)r[o]=r[o].slice(1,-1);return r[n]=r[n].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,r){var t=e;if(r)for(var n in r)t[n]=r[n];return t}function s(e){var n="[A-Za-z]",o="[0-9]",a=r(o,"[A-Fa-f]"),i=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=r("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=r(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t(n+r(n,o,"[\\+\\-\\.]")+"*"),t(t(i+"|"+r(l,s,"[\\:]"))+"*");var p=t(t("25[0-5]")+"|"+t("2[0-4]"+o)+"|"+t("1"+o+o)+"|"+t("0?[1-9]"+o)+"|0?0?"+o),f=t(p+"\\."+p+"\\."+p+"\\."+p),d=t(a+"{1,4}"),h=t(t(d+"\\:"+d)+"|"+f),v=t(t(d+"\\:")+"{6}"+h),y=t("\\:\\:"+t(d+"\\:")+"{5}"+h),m=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+h),g=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+h),b=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+h),w=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+h),E=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+h),S=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),C=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),O=t([v,y,m,g,b,w,E,S,C].join("|")),A=t(t(l+"|"+i)+"+");t("[vV]"+a+"+\\."+r(l,s,"[\\:]")+"+"),t(t(i+"|"+r(l,s))+"*");var I=t(i+"|"+r(l,s,"[\\:\\@]"));return t(t(i+"|"+r(l,s,"[\\@]"))+"+"),t(t(I+"|"+r("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(r("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+O+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+A+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,r){var t=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)},f=2147483647,d=36,h=1,v=26,y=38,m=700,g=72,b=128,w="-",E=/^xn--/,S=/[^\0-\x7E]/,C=/[\x2E\u3002\uFF0E\uFF61]/g,O={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=d-h,I=Math.floor,j=String.fromCharCode;function T(e){throw new RangeError(O[e])}function x(e,r){for(var t=[],n=e.length;n--;)t[n]=r(e[n]);return t}function P(e,r){var t=e.split("@"),n="";return t.length>1&&(n=t[0]+"@",e=t[1]),n+x((e=e.replace(C,".")).split("."),r).join(".")}function $(e){for(var r=[],t=0,n=e.length;t<n;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<n){var a=e.charCodeAt(t++);56320==(64512&a)?r.push(((1023&o)<<10)+(1023&a)+65536):(r.push(o),t--)}else r.push(o)}return r}var D=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:d},R=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},N=function(e,r,t){var n=0;for(e=t?I(e/m):e>>1,e+=I(e/r);e>A*v>>1;n+=d)e=I(e/A);return I(n+(A+1)*e/(e+y))},_=function(e){var r=[],t=e.length,n=0,o=b,a=g,i=e.lastIndexOf(w);i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&T("not-basic"),r.push(e.charCodeAt(s));for(var c=i>0?i+1:0;c<t;){for(var u=n,l=1,p=d;;p+=d){c>=t&&T("invalid-input");var y=D(e.charCodeAt(c++));(y>=d||y>I((f-n)/l))&&T("overflow"),n+=y*l;var m=p<=a?h:p>=a+v?v:p-a;if(y<m)break;var E=d-m;l>I(f/E)&&T("overflow"),l*=E}var S=r.length+1;a=N(n-u,S,0==u),I(n/S)>f-o&&T("overflow"),o+=I(n/S),n%=S,r.splice(n++,0,o)}return String.fromCodePoint.apply(String,r)},F=function(e){var r=[],t=(e=$(e)).length,n=b,o=0,a=g,i=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var p=u.value;p<128&&r.push(j(p))}}catch(e){s=!0,c=e}finally{try{!i&&l.return&&l.return()}finally{if(s)throw c}}var y=r.length,m=y;for(y&&r.push(w);m<t;){var E=f,S=!0,C=!1,O=void 0;try{for(var A,x=e[Symbol.iterator]();!(S=(A=x.next()).done);S=!0){var P=A.value;P>=n&&P<E&&(E=P)}}catch(e){C=!0,O=e}finally{try{!S&&x.return&&x.return()}finally{if(C)throw O}}var D=m+1;E-n>I((f-o)/D)&&T("overflow"),o+=(E-n)*D,n=E;var _=!0,F=!1,k=void 0;try{for(var U,q=e[Symbol.iterator]();!(_=(U=q.next()).done);_=!0){var L=U.value;if(L<n&&++o>f&&T("overflow"),L==n){for(var z=o,H=d;;H+=d){var V=H<=a?h:H>=a+v?v:H-a;if(z<V)break;var M=z-V,K=d-V;r.push(j(R(V+M%K,0))),z=I(M/K)}r.push(j(R(z,0))),a=N(o,D,m==y),o=0,++m}}}catch(e){F=!0,k=e}finally{try{!_&&q.return&&q.return()}finally{if(F)throw k}}++o,++n}return r.join("")},k=function(e){return P(e,(function(e){return E.test(e)?_(e.slice(4).toLowerCase()):e}))},U=function(e){return P(e,(function(e){return S.test(e)?"xn--"+F(e):e}))},q={version:"2.1.0",ucs2:{decode:$,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:_,encode:F,toASCII:U,toUnicode:k},L={};function z(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function H(e){for(var r="",t=0,n=e.length;t<n;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(n-t>=6){var a=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(n-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function V(e,r){function t(e){var t=H(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,z).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,z).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,z).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,z).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,z).replace(r.PCT_ENCODED,o)),e}function M(e){return e.replace(/^0*(.*)/,"$1")||"0"}function K(e,r){var t=e.match(r.IPV4ADDRESS)||[],n=l(t,2)[1];return n?n.split(".").map(M).join("."):e}function Z(e,r){var t=e.match(r.IPV6ADDRESS)||[],n=l(t,3),o=n[1],a=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],p=u?u.split(":").map(M):[],f=c.split(":").map(M),d=r.IPV4ADDRESS.test(f[f.length-1]),h=d?7:8,v=f.length-h,y=Array(h),m=0;m<h;++m)y[m]=p[m]||f[v+m]||"";d&&(y[h-1]=K(y[h-1],r));var g=y.reduce((function(e,r,t){if(!r||"0"===r){var n=e[e.length-1];n&&n.index+n.length===t?n.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(g&&g.length>1){var w=y.slice(0,g.index),E=y.slice(g.index+g.length);b=w.join(":")+"::"+E.join(":")}else b=y.join(":");return a&&(b+="%"+a),b}return e}var J=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,B=void 0==="".match(/(){0}/)[1];function G(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},n=!1!==r.iri?u:c;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(J);if(o){B?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=Z(K(t.host,n),n)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var a=L[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)V(t,n);else{if(t.host&&(r.domainHost||a&&a.domainHost))try{t.host=q.toASCII(t.host.replace(n.PCT_ENCODED,H).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}V(t,c)}a&&a.parse&&a.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function W(e,r){var t=!1!==r.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(Z(K(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function re(e){for(var r=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(ee);if(!t)throw new Error("Unexpected dot segment condition");var n=t[0];e=e.slice(n.length),r.push(n)}return r.join("")}function te(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?u:c,n=[],o=L[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?q.toUnicode(e.host):q.toASCII(e.host.replace(t.PCT_ENCODED,H).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}V(e,t),"suffix"!==r.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=W(e,r);if(void 0!==a&&("suffix"!==r.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=re(i)),void 0===a&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=G(te(e,t),t),r=G(te(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(n.scheme=r.scheme,n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(r.path?("/"===r.path.charAt(0)?n.path=re(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:n.path=r.path:n.path="/"+r.path,n.path=re(n.path)),n.query=r.query):(n.path=e.path,void 0!==r.query?n.query=r.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=r.fragment,n}function oe(e,r,t){var n=i({scheme:"null"},t);return te(ne(G(e,n),G(r,n),n,!0),n)}function ae(e,r){return"string"==typeof e?e=te(G(e,r),r):"object"===n(e)&&(e=G(te(e,r),r)),e}function ie(e,r,t){return"string"==typeof e?e=te(G(e,t),t):"object"===n(e)&&(e=te(e,t)),"string"==typeof r?r=te(G(r,t),t):"object"===n(r)&&(r=te(r,t)),e===r}function se(e,r){return e&&e.toString().replace(r&&r.iri?u.ESCAPE:c.ESCAPE,z)}function ce(e,r){return e&&e.toString().replace(r&&r.iri?u.PCT_ENCODED:c.PCT_ENCODED,H)}var ue={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=pe(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),n=l(t,2),o=n[0],a=n[1];e.path=o&&"/"!==o?o:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},de={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},he={},ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",me=t(t("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+t("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+t("%"+ye+ye)),ge="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ee=new RegExp(ve,"g"),Se=new RegExp(me,"g"),Ce=new RegExp(r("[^]",ge,"[\\.]",'[\\"]',be),"g"),Oe=new RegExp(r("[^]",ve,we),"g"),Ae=Oe;function Ie(e){var r=H(e);return r.match(Ee)?r:e}var je={scheme:"mailto",parse:function(e,r){var t=e,n=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,a={},i=t.query.split("&"),s=0,c=i.length;s<c;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),p=0,f=l.length;p<f;++p)n.push(l[p]);break;case"subject":t.subject=ce(u[1],r);break;case"body":t.body=ce(u[1],r);break;default:o=!0,a[ce(u[0],r)]=ce(u[1],r)}}o&&(t.headers=a)}t.query=void 0;for(var d=0,h=n.length;d<h;++d){var v=n[d].split("@");if(v[0]=ce(v[0]),r.unicodeSupport)v[1]=ce(v[1],r).toLowerCase();else try{v[1]=q.toASCII(ce(v[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[d]=v.join("@")}return t},serialize:function(e,r){var t=e,n=a(e.to);if(n){for(var i=0,s=n.length;i<s;++i){var c=String(n[i]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(Se,Ie).replace(Se,o).replace(Ce,z),p=c.slice(u+1);try{p=r.iri?q.toUnicode(p):q.toASCII(ce(p,r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=l+"@"+p}t.path=n.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var d=[];for(var h in f)f[h]!==he[h]&&d.push(h.replace(Se,Ie).replace(Se,o).replace(Oe,z)+"="+f[h].replace(Se,Ie).replace(Se,o).replace(Ae,z));return d.length&&(t.query=d.join("&")),t}},Te=/^([^\:]+)\:(.*)/,xe={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(Te),n=e;if(t){var o=r.scheme||n.scheme||"urn",a=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||a),c=L[s];n.nid=a,n.nss=i,n.path=void 0,c&&(n=c.parse(n,r))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",n=e.nid,o=t+":"+(r.nid||n),a=L[o];a&&(e=a.serialize(e,r));var i=e,s=e.nss;return i.path=(n||r.nid)+":"+s,i}},Pe=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,$e={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match(Pe)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};L[ue.scheme]=ue,L[le.scheme]=le,L[fe.scheme]=fe,L[de.scheme]=de,L[je.scheme]=je,L[xe.scheme]=xe,L[$e.scheme]=$e,e.SCHEMES=L,e.pctEncChar=z,e.pctDecChars=H,e.parse=G,e.removeDotSegments=re,e.serialize=te,e.resolveComponents=ne,e.resolve=oe,e.normalize=ae,e.equal=ie,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(r)}));(o=a)&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")&&o.default;const i={null:e=>null===e,boolean:e=>"boolean"==typeof e,object:e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,array:e=>Array.isArray(e),number:e=>"number"==typeof e,integer:e=>Number.isInteger(e),string:e=>"string"==typeof e};var s={jsonTypeOf:(e,r)=>i[r](e),resolveUrl:(e,r)=>{const t=a.resolve(e,r,{iri:!0});if(a.resolve(e,"",{iri:!0})&&"file"===a.parse(t).scheme&&"file"!==a.parse(e).scheme)throw Error(`Can't access file '${t}' resource from network context '${e}'`);return t},urlFragment:e=>a.unescapeComponent(a.parse(e).fragment)||"",pathRelative:(e,r)=>{if(e===r)return"";let t=1;const n=e.length-1,o=r.length-t,a=n<o?n:o;let i=-1,s=0;for(;s<a;s++){const n=e.charCodeAt(s+1);if(n!==r.charCodeAt(t+s))break;47===n&&(i=s)}if(o>a){if(47===r.charCodeAt(t+s))return r.slice(t+s+1);if(0===s)return r.slice(t+s)}n>a&&(47===e.charCodeAt(s+1)?i=s:0===a&&(i=0));let c="";for(s=i+2;s<=e.length;++s)s!==e.length&&47!==e.charCodeAt(s)||(c+=0===c.length?"..":"/..");return t+=i,c.length>0?`${c}${r.slice(t,r.length)}`:(47===r.charCodeAt(t)&&++t,r.slice(t,r.length))}};const c=e=>{if(e.length>0&&"/"!==e[0])throw Error("Invalid JSON Pointer");return e.split("/").slice(1).map(v)},u=(e,r,t,n)=>{if(0===e.length)return t;if(e.length>1){const o=e.shift();return{...r,[o]:u(e,m(r,o,n),t,d(o,n))}}if(Array.isArray(r)){const n=[...r];return n[y(r,e[0])]=t,n}return"object"==typeof r&&null!==r?{...r,[e[0]]:t}:m(r,e[0],n)},l=(e,r,t,n)=>{if(0!==e.length)if(1!==e.length||g(r)){const o=e.shift();l(e,m(r,o,n),t,d(o,n))}else{r[y(r,e[0])]=t}},p=(e,r,t)=>{if(0!=e.length){if(e.length>1){const n=e.shift(),o=m(r,n,t);return{...r,[n]:p(e,o,d(n,t))}}if(Array.isArray(r))return r.filter(((r,t)=>t!=e[0]));if("object"==typeof r&&null!==r){const{[e[0]]:t,...n}=r;return n}return m(r,e[0],t)}},f=(e,r,t)=>{if(0!==e.length)if(e.length>1){const n=e.shift(),o=m(r,n,t);f(e,o,d(n,t))}else Array.isArray(r)?r.splice(e[0],1):"object"==typeof r&&null!==r?delete r[e[0]]:m(r,e[0],t)},d=e(((e,r)=>r+"/"+h(e))),h=e=>e.toString().replace(/~/g,"~0").replace(/\//g,"~1"),v=e=>e.toString().replace(/~1/g,"/").replace(/~0/g,"~"),y=(e,r)=>Array.isArray(e)&&"-"===r?e.length:r,m=(e,r,t="")=>{if(void 0===e)throw TypeError(`Value at '${t}' is undefined and does not have property '${r}'`);if(null===e)throw TypeError(`Value at '${t}' is null and does not have property '${r}'`);if(g(e))throw TypeError(`Value at '${t}' is a ${typeof e} and does not have property '${r}'`);return e[y(e,r)]},g=e=>null===e||"object"!=typeof e;var b={nil:"",append:d,get:(e,r)=>{const t=c(e),n=e=>t.reduce((([e,r],t)=>[m(e,t,r),d(t,r)]),[e,""])[0];return void 0===r?n:n(r)},set:(r,t,n)=>{const o=c(r),a=e(((e,r)=>u(o,e,r,"")));return void 0===t?a:a(t,n)},assign:(r,t,n)=>{const o=c(r),a=e(((e,r)=>l(o,e,r,"")));return void 0===t?a:a(t,n)},unset:(e,r)=>{const t=c(e),n=e=>p(t,e,"");return void 0===r?n:n(r)},remove:(e,r)=>{const t=c(e),n=e=>f(t,e,"");return void 0===r?n:n(r)}};b.nil,b.append,b.get,b.set,b.assign,b.unset,b.remove;const w=Symbol("$__value"),E=Symbol("$__href");var S={cons:(e,r)=>Object.freeze({[E]:e,[w]:r}),isReference:e=>e&&void 0!==e[E],href:e=>e[E],value:e=>e[w]};const{resolveUrl:C,jsonTypeOf:O}=s,A=Object.freeze({id:"",pointer:"",instance:void 0,value:void 0}),I=e=>S.isReference(e.value)?S.value(e.value):e.value,j=e(((e,r)=>O(I(e),r))),T=(e,r)=>Object.freeze({...r,pointer:b.append(e,r.pointer),value:I(r)[e]}),x=e(((e,r)=>I(r).map(((t,n,o,a)=>e(T(n,r),n,o,a))))),P=e(((e,r)=>I(r).map(((e,t,n,o)=>T(t,r))).filter(((r,t,n,o)=>e(r,t,n,o))))),$=e(((e,r,t)=>I(t).reduce(((r,n,o)=>e(r,T(o,t),o)),r))),D=e(((e,r)=>I(r).every(((t,n,o,a)=>e(T(n,r),n,o,a))))),R=e(((e,r)=>I(r).some(((t,n,o,a)=>e(T(n,r),n,o,a)))));var N={nil:A,cons:(e,r="")=>Object.freeze({...A,id:C(r,""),instance:e,value:e}),uri:e=>`${e.id}#${encodeURI(e.pointer)}`,value:I,has:(e,r)=>e in I(r),typeOf:j,step:T,entries:e=>Object.keys(I(e)).map((r=>[r,T(r,e)])),keys:e=>Object.keys(I(e)),map:x,filter:P,reduce:$,every:D,some:R,length:e=>I(e).length},_=async e=>Object.entries(await e),F=e((async(e,r)=>(await r).map(e))),k=e((async(e,r,t)=>(await t).reduce((async(r,t)=>e(await r,t)),r))),U=e((async(e,r,t={})=>k((async(r,t)=>await e(t)?r.concat([t]):r),[],r,t))),q=e((async(e,r)=>{const t=await F(e,r);return(await Promise.all(t)).some((e=>e))})),L=e((async(e,r)=>{const t=await F(e,r);return(await Promise.all(t)).every((e=>e))})),z=e(((e,r)=>e.reduce((async(e,r)=>r(await e)),r))),H={entries:_,map:F,filter:U,reduce:k,some:q,every:L,pipeline:z,all:e=>Promise.all(e),allValues:e=>z([_,k((async(e,[r,t])=>(e[r]=await t,e)),{})],e)};H.entries,H.map,H.filter,H.reduce,H.some,H.every,H.pipeline,H.all,H.allValues;var V=fetch,M=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,K=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,Z=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,J=/\\([\u000b\u0020-\u00ff])/g,B=/([\\"])/g,G=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,W=function(e){if(!e)throw new TypeError("argument string is required");var r="object"==typeof e?function(e){var r;"function"==typeof e.getHeader?r=e.getHeader("content-type"):"object"==typeof e.headers&&(r=e.headers&&e.headers["content-type"]);if("string"!=typeof r)throw new TypeError("content-type header is missing from object");return r}(e):e;if("string"!=typeof r)throw new TypeError("argument string is required to be a string");var t=r.indexOf(";"),n=-1!==t?r.substr(0,t).trim():r.trim();if(!G.test(n))throw new TypeError("invalid media type");var o=new Y(n.toLowerCase());if(-1!==t){var a,i,s;for(M.lastIndex=t;i=M.exec(r);){if(i.index!==t)throw new TypeError("invalid parameter format");t+=i[0].length,a=i[1].toLowerCase(),'"'===(s=i[2])[0]&&(s=s.substr(1,s.length-2).replace(J,"$1")),o.parameters[a]=s}if(t!==r.length)throw new TypeError("invalid parameter format")}return o}; | ||
/*! | ||
* content-type | ||
* Copyright(c) 2015 Douglas Christopher Wilson | ||
* MIT Licensed | ||
*/function Q(e){var r=String(e);if(Z.test(r))return r;if(r.length>0&&!K.test(r))throw new TypeError("invalid parameter value");return'"'+r.replace(B,"\\$1")+'"'}function Y(e){this.parameters=Object.create(null),this.type=e}var X={format:function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var r=e.parameters,t=e.type;if(!t||!G.test(t))throw new TypeError("invalid type");var n=t;if(r&&"object"==typeof r)for(var o,a=Object.keys(r).sort(),i=0;i<a.length;i++){if(o=a[i],!Z.test(o))throw new TypeError("invalid parameter name");n+="; "+o+"="+Q(r[o])}return n},parse:W};const ee={};var re={addPlugin:(e,r)=>{ee[e]=r},parse:e=>{const r=X.parse(e.headers.get("content-type")).type;if(!(r in ee))throw Error(`${e.url} is not a schema. Found a document with media type: ${r}`);return ee[r].parse(e)},getContentType:e=>{for(const r in ee)if(ee[r].matcher(e))return r;return"application/octet-stream"}};const{jsonTypeOf:te,resolveUrl:ne,urlFragment:oe,pathRelative:ae}=s,ie="https://json-schema.org/draft/2019-09/vocab/core",se="https://json-schema.org/draft/2020-12/vocab/core",ce={},ue={},le=(e,r)=>{const t=ue[e];return ce[t]?.[r]},pe={},fe={},de=(e,r="",t="")=>{e=JSON.parse(JSON.stringify(e));const n=ne(r,""),o=ne(e.$schema||t,"");if(!o)throw Error("Couldn't determine schema dialect");if(delete e.$schema,!(o in ue))if(!0===e?.$vocabulary?.[ie]&&o===he(e,n,ie)[0])ue[o]=ie;else if(!0===e?.$vocabulary?.[se]&&o===he(e,n,se)[0])ue[o]=se;else if(o===he(e,n,o)[0])ue[o]=o;else{if(!(o in pe))throw Error(`Couldn't determine JSON Schema version for dialect: '${o}'`);{const e=pe[o];!0===e.vocabulary[ie]?ue[o]=ie:!0===e.vocabulary[se]?ue[o]=se:ue[o]=ue[e.dialectId]}}const[a,i]=he(e,n,ue[o]);if(!a)throw Error("Couldn't determine an identifier for the schema");const s=le(o,"baseToken");delete e[s],n&&(fe[n]=a);const c=le(o,"anchorToken");i&&s===c&&(e[c]=c!==s?encodeURI(i):`#${encodeURI(i)}`);const u={},l=le(o,"recursiveAnchorToken");let p;!0===e[l]&&(u[""]=`${a}#`,e[c]="",delete e[l]);const f=le(o,"vocabularyToken");te(e[f],"object")?(p=e[f],delete e[f]):p={[ue[o]]:!0};const d={"":""};return pe[a]={id:a,dialectId:o,schema:ve(e,a,o,b.nil,d,u),anchors:d,dynamicAnchors:u,vocabulary:p,validated:!1},a},he=(e,r,t)=>{const n=ce[t]?.baseToken,o=ne(r,e[n]||"");return[ne(o,""),oe(o)]},ve=(e,r,t,n,o,a)=>{if(te(e,"object")){const i="string"==typeof e.$schema?ne(e.$schema,""):t,s=le(i,"embeddedToken"),c=le(i,"anchorToken");if("string"==typeof e[s]&&(s!==c||"#"!==e[s][0])){const n=ne(r,e[s]);return e[le(i,"baseToken")]=n,de(e,n,t),S.cons(e[s],e)}const u=le(t,"anchorToken"),l=le(t,"dynamicAnchorToken");"string"==typeof e[l]&&(a[e[l]]=`${r}#${encodeURI(n)}`,o[e[l]]=n,delete e[l]);const p=le(t,"embeddedToken");if("string"==typeof e[u]){const r=u!==p?e[u]:e[u].slice(1);o[r]=n,delete e[u]}const f=le(t,"jrefToken");if("string"==typeof e[f])return S.cons(e[f],e);for(const i in e)e[i]=ve(e[i],r,t,b.append(i,n),o,a);return e}return Array.isArray(e)?e.map(((e,i)=>ve(e,r,t,b.append(i,n),o,a))):e},ye=e=>pe[fe[e]]||pe[e],me=Object.freeze({id:"",dialectId:void 0,vocabulary:{},pointer:b.nil,schema:void 0,value:void 0,anchors:{},dynamicAnchors:{},validated:!0}),ge=async(e,r=me)=>{const t=ne(Ee(r),e),n=ne(t,""),o=oe(t);if(!(e=>e in pe||e in fe)(n)){const e=await V(n,{headers:{Accept:"application/schema+json"}});if(e.status>=400)throw await e.text(),Error(`Failed to retrieve schema with id: ${n}`);de(await re.parse(e),n)}const a=ye(n),i="/"!==o[0]?we(a,o):o,s=Object.freeze({...a,pointer:i,value:b.get(i,a.schema)});return be(s)},be=e=>S.isReference(e.value)?ge(S.href(e.value),e):e,we=(e,r)=>{if(!(r in e.anchors))throw Error(`No such anchor '${encodeURI(e.id)}#${encodeURI(r)}'`);return e.anchors[r]},Ee=e=>`${e.id}#${encodeURI(e.pointer)}`,Se=e=>S.isReference(e.value)?S.value(e.value):e.value,Ce=(e,r)=>{const t=ye(r.id),n=Object.freeze({...r,pointer:b.append(e,r.pointer),value:Se(r)[e],validated:t.validated});return be(n)},Oe=e(((e,r)=>H.pipeline([Se,H.map((async(t,n)=>e(await Ce(n,r),n))),H.all],r))),Ae={parentId:"",parentDialect:"",includeEmbedded:!0},Ie=(e,r)=>{if(r.startsWith("file://")){const t=e.slice(7,e.lastIndexOf("/"));return""===e?"":ae(t,r.slice(7))}return r};var je={setConfig:(e,r,t)=>{ce[e]||(ce[e]={}),ce[e][r]=t},getConfig:le,add:de,get:ge,markValidated:e=>{pe[e].validated=!0},uri:Ee,value:Se,getAnchorPointer:we,typeOf:(e,r)=>te(Se(e),r),has:(e,r)=>e in Se(r),step:Ce,keys:e=>Object.keys(Se(e)),entries:e=>H.pipeline([Se,Object.keys,H.map((async r=>[r,await Ce(r,e)])),H.all],e),map:Oe,length:e=>Se(e).length,toSchema:(e,r={})=>{const t={...Ae,...r},n=JSON.parse(JSON.stringify(e.schema,((r,n)=>{if(!S.isReference(n))return n;const o=S.value(n),a="string"==typeof o.$schema?ne(o.$schema,""):e.dialectId,i=le(a,"embeddedToken");return!t.includeEmbedded&&i in o?void 0:S.value(n)}))),o=le(e.dialectId,"dynamicAnchorToken");Object.entries(e.dynamicAnchors).forEach((([e,r])=>{const t=oe(r);b.assign(t,n,{[o]:e,...b.get(t,n)})}));const a=le(e.dialectId,"anchorToken");Object.entries(e.anchors).filter((([e])=>""!==e)).forEach((([e,r])=>{b.assign(r,n,{[a]:e,...b.get(r,n)})}));const i=le(e.dialectId,"baseToken"),s=Ie(t.parentId,e.id),c=t.parentDialect===e.dialectId?"":e.dialectId;return{...s&&{[i]:s},...c&&{$schema:c},...n}}};je.setConfig,je.getConfig,je.add,je.get,je.markValidated,je.uri,je.value,je.getAnchorPointer,je.typeOf,je.has,je.step,je.keys,je.entries,je.map,je.length,je.toSchema;class Te extends Error{constructor(e){super("Invalid Schema"),this.name=this.constructor.name,this.output=e}}var xe=Te;var Pe={compile:e=>je.value(e),interpret:()=>!0};const{resolveUrl:$e}=s,De="FLAG",Re="BASIC",Ne="DETAILED",_e="VERBOSE";let Fe=Ne,ke=!0;re.addPlugin("application/schema+json",{parse:async e=>await e.json(),matcher:e=>e.endsWith(".schema.json")});const Ue=async e=>{const r={metaData:{}};return{ast:r,schemaUri:await Ze(e,r)}},qe=e((({ast:e,schemaUri:r},t,o=De)=>{if(![De,Re,Ne,_e].includes(o))throw Error(`The '${o}' error format is not supported`);const a=[],i=n.subscribe("result",Le(o,a));return Be(r,t,e,{}),n.unsubscribe(i),a[0]})),Le=(e,r)=>{const t=[];return(n,o)=>{if("result"===n){const{keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a}=o,i={keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a,errors:[]};t.push(i)}else if("result.start"===n)t.push(n);else if("result.end"===n){const n=t.pop();for(;"result.start"!==t[t.length-1];){const r=t.pop(),o=[r];e===Re&&(o.push(...r.errors),delete r.errors),(e===_e||e!==De&&!r.valid)&&n.errors.unshift(...o)}t[t.length-1]=n,r[0]=n}}},ze={},He=e=>ze[e]||Pe,Ve=e=>e in ze,Me={},Ke={},Ze=async(e,r)=>{if(e=await Je(e),!Ve(`${e.dialectId}#validate`)){const r=await je.get(e.dialectId);(je.getConfig(r.id,"mandatoryVocabularies")||[]).forEach((e=>{if(!r.vocabulary[e])throw Error(`Vocabulary '${e}' must be explicitly declared and required`)})),Object.entries(r.vocabulary).forEach((([e,t])=>{if(e in Me)Object.entries(Me[e]).forEach((([e,t])=>{((e,r)=>{ze[e]={collectEvaluatedItems:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&new Set,collectEvaluatedProperties:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&[],...r}})(`${r.id}#${e}`,t)}));else if(t)throw Error(`Missing required vocabulary: ${e}`)}))}if(ke&&!e.validated){if(je.markValidated(e.id),!(e.dialectId in Ke)){const r=await je.get(e.dialectId),t=await Ue(r);Ke[r.id]=qe(t)}const r=N.cons(e.schema,e.id),t=Ke[e.dialectId](r,Fe);if(!t.valid)throw new xe(t)}return e.id in r.metaData||(r.metaData[e.id]={id:e.id,dynamicAnchors:e.dynamicAnchors,anchors:e.anchors}),He(`${e.dialectId}#validate`).compile(e,r)},Je=async e=>je.typeOf(e,"string")?Je(await je.get(je.value(e),e)):e,Be=(e,r,t,n)=>{const o=Ge(e,t),a=$e(e,"");return He(o).interpret(e,r,t,{...t.metaData[a].dynamicAnchors,...n})},Ge=(e,r)=>{if(!(e in r))throw Error(`No schema found at ${e}`);return r[e][0]};var We={validate:async(e,r,t)=>{const n=await Ue(e),o=(e,r)=>qe(n,N.cons(e),r);return void 0===r?o:o(r,t)},compile:Ue,interpret:qe,setMetaOutputFormat:e=>{Fe=e},setShouldMetaValidate:e=>{ke=e},FLAG:De,BASIC:Re,DETAILED:Ne,VERBOSE:_e,add:(e,r="",t="")=>{const n=je.add(e,r,t);delete Ke[n]},getKeyword:He,hasKeyword:Ve,defineVocabulary:(e,r)=>{Me[e]=r},compileSchema:Ze,interpretSchema:Be,collectEvaluatedProperties:(e,r,t,n,o)=>{const a=Ge(e,t);return He(a).collectEvaluatedProperties(e,r,t,n,o)},collectEvaluatedItems:(e,r,t,n,o)=>{const a=Ge(e,t);return He(a).collectEvaluatedItems(e,r,t,n,o)},addMediaTypePlugin:re.addPlugin};var Qe={compile:async(e,r)=>{const t=je.uri(e);if(!(t in r)){r[t]=!1;const n=je.value(e);if(!["object","boolean"].includes(typeof n))throw Error(`No schema found at '${je.uri(e)}'`);r[t]=[`${e.dialectId}#validate`,je.uri(e),"boolean"==typeof n?n:await H.pipeline([je.entries,H.map((([r,t])=>[`${e.dialectId}#${r}`,t])),H.filter((([r])=>r!==`${e.dialectId}#validate`)),H.map((async([t,n])=>{const o=await We.getKeyword(t).compile(n,r,e);return[t,je.uri(n),o]})),H.all],e)]}return t},interpret:(e,r,t,o)=>{const[a,i,s]=t[e];n.publishSync("result.start");const c="boolean"==typeof s?s:s.every((([e,a,i])=>{n.publishSync("result.start");const s=We.getKeyword(e).interpret(i,r,t,o);return n.publishSync("result",{keyword:e,absoluteKeywordLocation:a,instanceLocation:N.uri(r),valid:s,ast:i}),n.publishSync("result.end"),s}));return n.publishSync("result",{keyword:a,absoluteKeywordLocation:i,instanceLocation:N.uri(r),valid:c,ast:e}),n.publishSync("result.end"),c},collectEvaluatedProperties:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&[]:a.filter((([e])=>!o||!e.endsWith("#unevaluatedProperties"))).reduce(((e,[o,,a])=>{const i=e&&We.getKeyword(o).collectEvaluatedProperties(a,r,t,n);return!1!==i&&[...e,...i]}),[])},collectEvaluatedItems:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&new Set:a.filter((([e])=>!o||!e.endsWith("#unevaluatedItems"))).reduce(((e,[o,,a])=>{const i=!1!==e&&We.getKeyword(o).collectEvaluatedItems(a,r,t,n);return!1!==i&&new Set([...e,...i])}),new Set)}},Ye={metaData:Pe,validate:Qe},Xe={Core:We,Schema:je,Instance:N,Reference:S,Keywords:Ye,InvalidSchemaError:xe},er=Xe.Core,rr=Xe.Schema,tr=Xe.Instance,nr=Xe.Reference,or=Xe.Keywords,ar=Xe.InvalidSchemaError;exports.Core=er,exports.Instance=tr,exports.InvalidSchemaError=ar,exports.Keywords=or,exports.Reference=nr,exports.Schema=rr,exports.default=Xe; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r=function(e,r){return function t(){null==r&&(r=e.length);var n=[].slice.call(arguments);return n.length>=r?e.apply(this,n):function(){return t.apply(this,n.concat([].slice.call(arguments)))}}};var t={exports:{}};!function(r,t){!function(e,n){var o={};e.PubSub?(o=e.PubSub,console.warn("PubSub already loaded, using existing version")):(e.PubSub=o,function(e){var r={},t=-1,n="*";function o(e){var r;for(r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!0;return!1}function a(e){return function(){throw e}}function i(e,r,t){try{e(r,t)}catch(e){setTimeout(a(e),0)}}function s(e,r,t){e(r,t)}function c(e,t,n,o){var a,c=r[t],u=o?s:i;if(Object.prototype.hasOwnProperty.call(r,t))for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&u(c[a],e,n)}function u(e,r,t){return function(){var o=String(e),a=o.lastIndexOf(".");for(c(e,e,r,t);-1!==a;)a=(o=o.substr(0,a)).lastIndexOf("."),c(e,o,r,t);c(e,n,r,t)}}function l(e){var t=String(e);return Boolean(Object.prototype.hasOwnProperty.call(r,t)&&o(r[t]))}function p(e){for(var r=String(e),t=l(r)||l(n),o=r.lastIndexOf(".");!t&&-1!==o;)o=(r=r.substr(0,o)).lastIndexOf("."),t=l(r);return t}function f(e,r,t,n){var o=u(e="symbol"==typeof e?e.toString():e,r,n);return!!p(e)&&(!0===t?o():setTimeout(o,0),!0)}e.publish=function(r,t){return f(r,t,!1,e.immediateExceptions)},e.publishSync=function(r,t){return f(r,t,!0,e.immediateExceptions)},e.subscribe=function(e,n){if("function"!=typeof n)return!1;e="symbol"==typeof e?e.toString():e,Object.prototype.hasOwnProperty.call(r,e)||(r[e]={});var o="uid_"+String(++t);return r[e][o]=n,o},e.subscribeAll=function(r){return e.subscribe(n,r)},e.subscribeOnce=function(r,t){var n=e.subscribe(r,(function(){e.unsubscribe(n),t.apply(this,arguments)}));return e},e.clearAllSubscriptions=function(){r={}},e.clearSubscriptions=function(e){var t;for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&delete r[t]},e.countSubscriptions=function(e){var t,n,o=0;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)){for(n in r[t])o++;break}return o},e.getSubscriptions=function(e){var t,n=[];for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&n.push(t);return n},e.unsubscribe=function(t){var n,o,a,i=function(e){var t;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e))return!0;return!1},s="string"==typeof t&&(Object.prototype.hasOwnProperty.call(r,t)||i(t)),c=!s&&"string"==typeof t,u="function"==typeof t,l=!1;if(!s){for(n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(o=r[n],c&&o[t]){delete o[t],l=t;break}if(u)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&o[a]===t&&(delete o[a],l=!0)}return l}e.clearSubscriptions(t)}}(o)),void 0!==r&&r.exports&&(t=r.exports=o),t.PubSub=o,r.exports=t=o}("object"==typeof window&&window||e)}(t,t.exports);var n={exports:{}}; | ||
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var n=r.length-1,o=1;o<n;++o)r[o]=r[o].slice(1,-1);return r[n]=r[n].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,r){var t=e;if(r)for(var n in r)t[n]=r[n];return t}function s(e){var n="[A-Za-z]",o="[0-9]",a=r(o,"[A-Fa-f]"),i=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=r("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=r(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t(n+r(n,o,"[\\+\\-\\.]")+"*"),t(t(i+"|"+r(l,s,"[\\:]"))+"*");var p=t(t("25[0-5]")+"|"+t("2[0-4]"+o)+"|"+t("1"+o+o)+"|"+t("0?[1-9]"+o)+"|0?0?"+o),f=t(p+"\\."+p+"\\."+p+"\\."+p),d=t(a+"{1,4}"),h=t(t(d+"\\:"+d)+"|"+f),v=t(t(d+"\\:")+"{6}"+h),y=t("\\:\\:"+t(d+"\\:")+"{5}"+h),m=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+h),g=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+h),b=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+h),w=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+h),E=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+h),S=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),O=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),C=t([v,y,m,g,b,w,E,S,O].join("|")),A=t(t(l+"|"+i)+"+");t("[vV]"+a+"+\\."+r(l,s,"[\\:]")+"+"),t(t(i+"|"+r(l,s))+"*");var I=t(i+"|"+r(l,s,"[\\:\\@]"));return t(t(i+"|"+r(l,s,"[\\@]"))+"+"),t(t(I+"|"+r("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(r("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+C+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+A+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,r){var t=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)},f=2147483647,d=36,h=1,v=26,y=38,m=700,g=72,b=128,w="-",E=/^xn--/,S=/[^\0-\x7E]/,O=/[\x2E\u3002\uFF0E\uFF61]/g,C={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=d-h,I=Math.floor,j=String.fromCharCode;function T(e){throw new RangeError(C[e])}function x(e,r){for(var t=[],n=e.length;n--;)t[n]=r(e[n]);return t}function $(e,r){var t=e.split("@"),n="";return t.length>1&&(n=t[0]+"@",e=t[1]),n+x((e=e.replace(O,".")).split("."),r).join(".")}function D(e){for(var r=[],t=0,n=e.length;t<n;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<n){var a=e.charCodeAt(t++);56320==(64512&a)?r.push(((1023&o)<<10)+(1023&a)+65536):(r.push(o),t--)}else r.push(o)}return r}var P=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:d},N=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},R=function(e,r,t){var n=0;for(e=t?I(e/m):e>>1,e+=I(e/r);e>A*v>>1;n+=d)e=I(e/A);return I(n+(A+1)*e/(e+y))},F=function(e){var r=[],t=e.length,n=0,o=b,a=g,i=e.lastIndexOf(w);i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&T("not-basic"),r.push(e.charCodeAt(s));for(var c=i>0?i+1:0;c<t;){for(var u=n,l=1,p=d;;p+=d){c>=t&&T("invalid-input");var y=P(e.charCodeAt(c++));(y>=d||y>I((f-n)/l))&&T("overflow"),n+=y*l;var m=p<=a?h:p>=a+v?v:p-a;if(y<m)break;var E=d-m;l>I(f/E)&&T("overflow"),l*=E}var S=r.length+1;a=R(n-u,S,0==u),I(n/S)>f-o&&T("overflow"),o+=I(n/S),n%=S,r.splice(n++,0,o)}return String.fromCodePoint.apply(String,r)},_=function(e){var r=[],t=(e=D(e)).length,n=b,o=0,a=g,i=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var p=u.value;p<128&&r.push(j(p))}}catch(e){s=!0,c=e}finally{try{!i&&l.return&&l.return()}finally{if(s)throw c}}var y=r.length,m=y;for(y&&r.push(w);m<t;){var E=f,S=!0,O=!1,C=void 0;try{for(var A,x=e[Symbol.iterator]();!(S=(A=x.next()).done);S=!0){var $=A.value;$>=n&&$<E&&(E=$)}}catch(e){O=!0,C=e}finally{try{!S&&x.return&&x.return()}finally{if(O)throw C}}var P=m+1;E-n>I((f-o)/P)&&T("overflow"),o+=(E-n)*P,n=E;var F=!0,_=!1,U=void 0;try{for(var k,q=e[Symbol.iterator]();!(F=(k=q.next()).done);F=!0){var z=k.value;if(z<n&&++o>f&&T("overflow"),z==n){for(var L=o,H=d;;H+=d){var V=H<=a?h:H>=a+v?v:H-a;if(L<V)break;var M=L-V,K=d-V;r.push(j(N(V+M%K,0))),L=I(M/K)}r.push(j(N(L,0))),a=R(o,P,m==y),o=0,++m}}}catch(e){_=!0,U=e}finally{try{!F&&q.return&&q.return()}finally{if(_)throw U}}++o,++n}return r.join("")},U=function(e){return $(e,(function(e){return E.test(e)?F(e.slice(4).toLowerCase()):e}))},k=function(e){return $(e,(function(e){return S.test(e)?"xn--"+_(e):e}))},q={version:"2.1.0",ucs2:{decode:D,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:F,encode:_,toASCII:k,toUnicode:U},z={};function L(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function H(e){for(var r="",t=0,n=e.length;t<n;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(n-t>=6){var a=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(n-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function V(e,r){function t(e){var t=H(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,L).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,L).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,L).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,L).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,L).replace(r.PCT_ENCODED,o)),e}function M(e){return e.replace(/^0*(.*)/,"$1")||"0"}function K(e,r){var t=e.match(r.IPV4ADDRESS)||[],n=l(t,2)[1];return n?n.split(".").map(M).join("."):e}function Z(e,r){var t=e.match(r.IPV6ADDRESS)||[],n=l(t,3),o=n[1],a=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],p=u?u.split(":").map(M):[],f=c.split(":").map(M),d=r.IPV4ADDRESS.test(f[f.length-1]),h=d?7:8,v=f.length-h,y=Array(h),m=0;m<h;++m)y[m]=p[m]||f[v+m]||"";d&&(y[h-1]=K(y[h-1],r));var g=y.reduce((function(e,r,t){if(!r||"0"===r){var n=e[e.length-1];n&&n.index+n.length===t?n.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(g&&g.length>1){var w=y.slice(0,g.index),E=y.slice(g.index+g.length);b=w.join(":")+"::"+E.join(":")}else b=y.join(":");return a&&(b+="%"+a),b}return e}var J=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,B=void 0==="".match(/(){0}/)[1];function W(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},n=!1!==r.iri?u:c;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(J);if(o){B?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=Z(K(t.host,n),n)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var a=z[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)V(t,n);else{if(t.host&&(r.domainHost||a&&a.domainHost))try{t.host=q.toASCII(t.host.replace(n.PCT_ENCODED,H).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}V(t,c)}a&&a.parse&&a.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function G(e,r){var t=!1!==r.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(Z(K(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function re(e){for(var r=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(ee);if(!t)throw new Error("Unexpected dot segment condition");var n=t[0];e=e.slice(n.length),r.push(n)}return r.join("")}function te(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?u:c,n=[],o=z[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?q.toUnicode(e.host):q.toASCII(e.host.replace(t.PCT_ENCODED,H).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}V(e,t),"suffix"!==r.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=G(e,r);if(void 0!==a&&("suffix"!==r.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=re(i)),void 0===a&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=W(te(e,t),t),r=W(te(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(n.scheme=r.scheme,n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(r.path?("/"===r.path.charAt(0)?n.path=re(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:n.path=r.path:n.path="/"+r.path,n.path=re(n.path)),n.query=r.query):(n.path=e.path,void 0!==r.query?n.query=r.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=r.fragment,n}function oe(e,r,t){var n=i({scheme:"null"},t);return te(ne(W(e,n),W(r,n),n,!0),n)}function ae(e,r){return"string"==typeof e?e=te(W(e,r),r):"object"===n(e)&&(e=W(te(e,r),r)),e}function ie(e,r,t){return"string"==typeof e?e=te(W(e,t),t):"object"===n(e)&&(e=te(e,t)),"string"==typeof r?r=te(W(r,t),t):"object"===n(r)&&(r=te(r,t)),e===r}function se(e,r){return e&&e.toString().replace(r&&r.iri?u.ESCAPE:c.ESCAPE,L)}function ce(e,r){return e&&e.toString().replace(r&&r.iri?u.PCT_ENCODED:c.PCT_ENCODED,H)}var ue={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=pe(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),n=l(t,2),o=n[0],a=n[1];e.path=o&&"/"!==o?o:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},de={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},he={},ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",me=t(t("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+t("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+t("%"+ye+ye)),ge="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ee=new RegExp(ve,"g"),Se=new RegExp(me,"g"),Oe=new RegExp(r("[^]",ge,"[\\.]",'[\\"]',be),"g"),Ce=new RegExp(r("[^]",ve,we),"g"),Ae=Ce;function Ie(e){var r=H(e);return r.match(Ee)?r:e}var je={scheme:"mailto",parse:function(e,r){var t=e,n=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,a={},i=t.query.split("&"),s=0,c=i.length;s<c;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),p=0,f=l.length;p<f;++p)n.push(l[p]);break;case"subject":t.subject=ce(u[1],r);break;case"body":t.body=ce(u[1],r);break;default:o=!0,a[ce(u[0],r)]=ce(u[1],r)}}o&&(t.headers=a)}t.query=void 0;for(var d=0,h=n.length;d<h;++d){var v=n[d].split("@");if(v[0]=ce(v[0]),r.unicodeSupport)v[1]=ce(v[1],r).toLowerCase();else try{v[1]=q.toASCII(ce(v[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[d]=v.join("@")}return t},serialize:function(e,r){var t=e,n=a(e.to);if(n){for(var i=0,s=n.length;i<s;++i){var c=String(n[i]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(Se,Ie).replace(Se,o).replace(Oe,L),p=c.slice(u+1);try{p=r.iri?q.toUnicode(p):q.toASCII(ce(p,r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=l+"@"+p}t.path=n.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var d=[];for(var h in f)f[h]!==he[h]&&d.push(h.replace(Se,Ie).replace(Se,o).replace(Ce,L)+"="+f[h].replace(Se,Ie).replace(Se,o).replace(Ae,L));return d.length&&(t.query=d.join("&")),t}},Te=/^([^\:]+)\:(.*)/,xe={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(Te),n=e;if(t){var o=r.scheme||n.scheme||"urn",a=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||a),c=z[s];n.nid=a,n.nss=i,n.path=void 0,c&&(n=c.parse(n,r))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",n=e.nid,o=t+":"+(r.nid||n),a=z[o];a&&(e=a.serialize(e,r));var i=e,s=e.nss;return i.path=(n||r.nid)+":"+s,i}},$e=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,De={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match($e)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};z[ue.scheme]=ue,z[le.scheme]=le,z[fe.scheme]=fe,z[de.scheme]=de,z[je.scheme]=je,z[xe.scheme]=xe,z[De.scheme]=De,e.SCHEMES=z,e.pctEncChar=L,e.pctDecChars=H,e.parse=W,e.removeDotSegments=re,e.serialize=te,e.resolveComponents=ne,e.resolve=oe,e.normalize=ae,e.equal=ie,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(n.exports);const o=n.exports,a={null:e=>null===e,boolean:e=>"boolean"==typeof e,object:e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,array:e=>Array.isArray(e),number:e=>"number"==typeof e,integer:e=>Number.isInteger(e),string:e=>"string"==typeof e};var i={jsonTypeOf:(e,r)=>a[r](e),resolveUrl:(e,r)=>{const t=o.resolve(e,r,{iri:!0});if(o.resolve(e,"",{iri:!0})&&"file"===o.parse(t).scheme&&"file"!==o.parse(e).scheme)throw Error(`Can't access file '${t}' resource from network context '${e}'`);return t},urlFragment:e=>o.unescapeComponent(o.parse(e).fragment)||"",pathRelative:(e,r)=>{if(e===r)return"";let t=1;const n=e.length-1,o=r.length-t,a=n<o?n:o;let i=-1,s=0;for(;s<a;s++){const n=e.charCodeAt(s+1);if(n!==r.charCodeAt(t+s))break;47===n&&(i=s)}if(o>a){if(47===r.charCodeAt(t+s))return r.slice(t+s+1);if(0===s)return r.slice(t+s)}n>a&&(47===e.charCodeAt(s+1)?i=s:0===a&&(i=0));let c="";for(s=i+2;s<=e.length;++s)s!==e.length&&47!==e.charCodeAt(s)||(c+=0===c.length?"..":"/..");return t+=i,c.length>0?`${c}${r.slice(t,r.length)}`:(47===r.charCodeAt(t)&&++t,r.slice(t,r.length))}};const s=r,c=e=>{if(e.length>0&&"/"!==e[0])throw Error("Invalid JSON Pointer");return e.split("/").slice(1).map(v)},u=(e,r,t,n)=>{if(0===e.length)return t;if(e.length>1){const o=e.shift();return{...r,[o]:u(e,m(r,o,n),t,d(o,n))}}if(Array.isArray(r)){const n=[...r];return n[y(r,e[0])]=t,n}return"object"==typeof r&&null!==r?{...r,[e[0]]:t}:m(r,e[0],n)},l=(e,r,t,n)=>{if(0!==e.length)if(1!==e.length||g(r)){const o=e.shift();l(e,m(r,o,n),t,d(o,n))}else{r[y(r,e[0])]=t}},p=(e,r,t)=>{if(0!=e.length){if(e.length>1){const n=e.shift(),o=m(r,n,t);return{...r,[n]:p(e,o,d(n,t))}}if(Array.isArray(r))return r.filter(((r,t)=>t!=e[0]));if("object"==typeof r&&null!==r){const{[e[0]]:t,...n}=r;return n}return m(r,e[0],t)}},f=(e,r,t)=>{if(0!==e.length)if(e.length>1){const n=e.shift(),o=m(r,n,t);f(e,o,d(n,t))}else Array.isArray(r)?r.splice(e[0],1):"object"==typeof r&&null!==r?delete r[e[0]]:m(r,e[0],t)},d=s(((e,r)=>r+"/"+h(e))),h=e=>e.toString().replace(/~/g,"~0").replace(/\//g,"~1"),v=e=>e.toString().replace(/~1/g,"/").replace(/~0/g,"~"),y=(e,r)=>Array.isArray(e)&&"-"===r?e.length:r,m=(e,r,t="")=>{if(void 0===e)throw TypeError(`Value at '${t}' is undefined and does not have property '${r}'`);if(null===e)throw TypeError(`Value at '${t}' is null and does not have property '${r}'`);if(g(e))throw TypeError(`Value at '${t}' is a ${typeof e} and does not have property '${r}'`);return e[y(e,r)]},g=e=>null===e||"object"!=typeof e;var b={nil:"",append:d,get:(e,r)=>{const t=c(e),n=e=>t.reduce((([e,r],t)=>[m(e,t,r),d(t,r)]),[e,""])[0];return void 0===r?n:n(r)},set:(e,r,t)=>{const n=c(e),o=s(((e,r)=>u(n,e,r,"")));return void 0===r?o:o(r,t)},assign:(e,r,t)=>{const n=c(e),o=s(((e,r)=>l(n,e,r,"")));return void 0===r?o:o(r,t)},unset:(e,r)=>{const t=c(e),n=e=>p(t,e,"");return void 0===r?n:n(r)},remove:(e,r)=>{const t=c(e),n=e=>f(t,e,"");return void 0===r?n:n(r)}};const w=Symbol("$__value"),E=Symbol("$__href");var S={cons:(e,r)=>Object.freeze({[E]:e,[w]:r}),isReference:e=>e&&void 0!==e[E],href:e=>e[E],value:e=>e[w]};const O=b,C=r,{resolveUrl:A,jsonTypeOf:I}=i,j=S,T=Object.freeze({id:"",pointer:"",instance:void 0,value:void 0}),x=e=>j.isReference(e.value)?j.value(e.value):e.value,$=C(((e,r)=>I(x(e),r))),D=(e,r)=>Object.freeze({...r,pointer:O.append(e,r.pointer),value:x(r)[e]}),P=C(((e,r)=>x(r).map(((t,n,o,a)=>e(D(n,r),n,o,a))))),N=C(((e,r)=>x(r).forEach(((t,n,o,a)=>e(D(n,r),n,o,a))))),R=C(((e,r)=>x(r).map(((e,t,n,o)=>D(t,r))).filter(((r,t,n,o)=>e(r,t,n,o))))),F=C(((e,r,t)=>x(t).reduce(((r,n,o)=>e(r,D(o,t),o)),r))),_=C(((e,r)=>x(r).every(((t,n,o,a)=>e(D(n,r),n,o,a))))),U=C(((e,r)=>x(r).some(((t,n,o,a)=>e(D(n,r),n,o,a)))));var k={nil:T,cons:(e,r="")=>Object.freeze({...T,id:A(r,""),instance:e,value:e}),get:(e,r=T)=>{if(!e.startsWith("#"))throw Error(`No JSON document found at '${e.split("#")[0]}'`);return Object.freeze({...r,pointer:e.substr(1)})},uri:e=>`${e.id}#${encodeURI(e.pointer)}`,value:x,has:(e,r)=>e in x(r),typeOf:$,length:e=>x(e).length,step:D,entries:e=>Object.keys(x(e)).map((r=>[r,D(r,e)])),keys:e=>Object.keys(x(e)),map:P,forEach:N,filter:R,reduce:F,every:_,some:U},q=async e=>Object.entries(await e);var z=r((async(e,r)=>(await r).map(e)));var L=r((async(e,r,t)=>(await t).reduce((async(r,t)=>e(await r,t)),r)));const H=L;var V=r((async(e,r,t={})=>H((async(r,t)=>await e(t)?r.concat([t]):r),[],r,t)));const M=z;var K=r((async(e,r)=>{const t=await M(e,r);return(await Promise.all(t)).some((e=>e))}));const Z=z;var J=r((async(e,r)=>{const t=await Z(e,r);return(await Promise.all(t)).every((e=>e))}));var B=r(((e,r)=>e.reduce((async(e,r)=>r(await e)),r)));const W=B,G=q,Q=L;var Y={entries:q,map:z,filter:V,reduce:L,some:K,every:J,pipeline:B,all:e=>Promise.all(e),allValues:e=>W([G,Q((async(e,[r,t])=>(e[r]=await t,e)),{})],e)},X=fetch,ee={},re=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,te=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,ne=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,oe=/\\([\u000b\u0020-\u00ff])/g,ae=/([\\"])/g,ie=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function se(e){var r=String(e);if(ne.test(r))return r;if(r.length>0&&!te.test(r))throw new TypeError("invalid parameter value");return'"'+r.replace(ae,"\\$1")+'"'}function ce(e){this.parameters=Object.create(null),this.type=e}ee.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var r=e.parameters,t=e.type;if(!t||!ie.test(t))throw new TypeError("invalid type");var n=t;if(r&&"object"==typeof r)for(var o,a=Object.keys(r).sort(),i=0;i<a.length;i++){if(o=a[i],!ne.test(o))throw new TypeError("invalid parameter name");n+="; "+o+"="+se(r[o])}return n},ee.parse=function(e){if(!e)throw new TypeError("argument string is required");var r="object"==typeof e?function(e){var r;"function"==typeof e.getHeader?r=e.getHeader("content-type"):"object"==typeof e.headers&&(r=e.headers&&e.headers["content-type"]);if("string"!=typeof r)throw new TypeError("content-type header is missing from object");return r}(e):e;if("string"!=typeof r)throw new TypeError("argument string is required to be a string");var t=r.indexOf(";"),n=-1!==t?r.substr(0,t).trim():r.trim();if(!ie.test(n))throw new TypeError("invalid media type");var o=new ce(n.toLowerCase());if(-1!==t){var a,i,s;for(re.lastIndex=t;i=re.exec(r);){if(i.index!==t)throw new TypeError("invalid parameter format");t+=i[0].length,a=i[1].toLowerCase(),'"'===(s=i[2])[0]&&(s=s.substr(1,s.length-2).replace(oe,"$1")),o.parameters[a]=s}if(t!==r.length)throw new TypeError("invalid parameter format")}return o};const ue=ee,le={};var pe={addPlugin:(e,r)=>{le[e]=r},parse:e=>{const r=ue.parse(e.headers.get("content-type"));if(!(r.type in le))throw Error(`${e.url} is not a schema. Found a document with media type: ${r.type}`);return le[r.type].parse(e,r.parameters)},getContentType:e=>{for(const r in le)if(le[r].matcher(e))return r;return"application/octet-stream"}};const fe=r,de=Y,he=b,{jsonTypeOf:ve,resolveUrl:ye,urlFragment:me,pathRelative:ge}=i,be=X,we=S,Ee=pe,Se="https://json-schema.org/draft/2019-09/vocab/core",Oe="https://json-schema.org/draft/2020-12/vocab/core",Ce={},Ae={},Ie=(e,r)=>{const t=Ae[e];return Ce[t]?.[r]},je={},Te={},xe=(e,r="",t="")=>{e=JSON.parse(JSON.stringify(e));const n=ye(r,""),o=ye(e.$schema||t,"");if(!o)throw Error("Couldn't determine schema dialect");if(delete e.$schema,!(o in Ae))if(!0===e?.$vocabulary?.[Se]&&o===$e(e,n,Se)[0])Ae[o]=Se;else if(!0===e?.$vocabulary?.[Oe]&&o===$e(e,n,Oe)[0])Ae[o]=Oe;else{const e=je[o];if(!e)throw Error(`Couldn't determine JSON Schema version for dialect: '${o}'`);!0===e.vocabulary[Se]?Ae[o]=Se:!0===e.vocabulary[Oe]?Ae[o]=Oe:Ae[o]=Ae[e.dialectId]}const[a,i]=$e(e,n,Ae[o]);if(!a)throw Error("Couldn't determine an identifier for the schema");const s=Ie(o,"baseToken");delete e[s],n&&(Te[n]=a);const c=Ie(o,"anchorToken");i&&s===c&&(e[c]=c!==s?encodeURI(i):`#${encodeURI(i)}`);const u={},l=Ie(o,"recursiveAnchorToken");let p;!0===e[l]&&(u[""]=`${a}#`,e[c]="",delete e[l]);const f=Ie(o,"vocabularyToken");ve(e[f],"object")?(p=e[f],delete e[f]):p={[Ae[o]]:!0};const d={"":""};return je[a]={id:a,dialectId:o,schema:De(e,a,o,he.nil,d,u),anchors:d,dynamicAnchors:u,vocabulary:p,validated:!1},a},$e=(e,r,t)=>{const n=Ce[t]?.baseToken,o=ye(r,e[n]||"");return[ye(o,""),me(o)]},De=(e,r,t,n,o,a)=>{if(ve(e,"object")){const i="string"==typeof e.$schema?ye(e.$schema,""):t,s=Ie(i,"embeddedToken"),c=Ie(i,"anchorToken");if("string"==typeof e[s]&&(s!==c||"#"!==e[s][0])){const n=ye(r,e[s]);return e[Ie(i,"baseToken")]=n,xe(e,n,t),we.cons(e[s],e)}const u=Ie(t,"anchorToken"),l=Ie(t,"dynamicAnchorToken");"string"==typeof e[l]&&(a[e[l]]=`${r}#${encodeURI(n)}`,o[e[l]]=n,delete e[l]);const p=Ie(t,"embeddedToken");if("string"==typeof e[u]){const r=u!==p?e[u]:e[u].slice(1);o[r]=n,delete e[u]}const f=Ie(t,"jrefToken");if("string"==typeof e[f])return we.cons(e[f],e);for(const i in e)e[i]=De(e[i],r,t,he.append(i,n),o,a);return e}return Array.isArray(e)?e.map(((e,i)=>De(e,r,t,he.append(i,n),o,a))):e},Pe=e=>je[Te[e]]||je[e],Ne=Object.freeze({id:"",dialectId:void 0,vocabulary:{},pointer:he.nil,schema:void 0,value:void 0,anchors:{},dynamicAnchors:{},validated:!0}),Re=async(e,r=Ne)=>{const t=ye(Ue(r),e),n=ye(t,""),o=me(t);if(!(e=>e in je||e in Te)(n)){const e=await be(n,{headers:{Accept:"application/schema+json"}});if(e.status>=400)throw await e.text(),Error(`Failed to retrieve schema with id: ${n}`);const[r,t]=await Ee.parse(e),o=ye(r.$schema,"")||t;n===o||o in Ae||await Re(o),xe(r,n)}const a=Pe(n),i="/"!==o[0]?_e(a,o):o,s=Object.freeze({...a,pointer:i,value:he.get(i,a.schema)});return Fe(s)},Fe=e=>we.isReference(e.value)?Re(we.href(e.value),e):e,_e=(e,r)=>{if(!(r in e.anchors))throw Error(`No such anchor '${encodeURI(e.id)}#${encodeURI(r)}'`);return e.anchors[r]},Ue=e=>`${e.id}#${encodeURI(e.pointer)}`,ke=e=>we.isReference(e.value)?we.value(e.value):e.value,qe=(e,r)=>{const t=Pe(r.id),n=Object.freeze({...r,pointer:he.append(e,r.pointer),value:ke(r)[e],validated:t.validated});return Fe(n)},ze=fe(((e,r)=>de.pipeline([ke,de.map((async(t,n)=>e(await qe(n,r),n))),de.all],r))),Le={parentId:"",parentDialect:"",includeEmbedded:!0},He=(e,r)=>{if(r.startsWith("file://")){const t=e.slice(7,e.lastIndexOf("/"));return""===e?"":ge(t,r.slice(7))}return r};var Ve={setConfig:(e,r,t)=>{Ae[e]=e,Ce[e]||(Ce[e]={}),Ce[e][r]=t},getConfig:Ie,add:xe,get:Re,markValidated:e=>{je[e].validated=!0},uri:Ue,value:ke,getAnchorPointer:_e,typeOf:(e,r)=>ve(ke(e),r),has:(e,r)=>e in ke(r),step:qe,keys:e=>Object.keys(ke(e)),entries:e=>de.pipeline([ke,Object.keys,de.map((async r=>[r,await qe(r,e)])),de.all],e),map:ze,length:e=>ke(e).length,toSchema:(e,r={})=>{const t={...Le,...r},n=JSON.parse(JSON.stringify(e.schema,((r,n)=>{if(!we.isReference(n))return n;const o=we.value(n),a="string"==typeof o.$schema?ye(o.$schema,""):e.dialectId,i=Ie(a,"embeddedToken");return!t.includeEmbedded&&i in o?void 0:we.value(n)}))),o=Ie(e.dialectId,"dynamicAnchorToken");Object.entries(e.dynamicAnchors).forEach((([e,r])=>{const t=me(r);he.assign(t,n,{[o]:e,...he.get(t,n)})}));const a=Ie(e.dialectId,"anchorToken");Object.entries(e.anchors).filter((([e])=>""!==e)).forEach((([e,r])=>{he.assign(r,n,{[a]:e,...he.get(r,n)})}));const i=Ie(e.dialectId,"baseToken"),s=He(t.parentId,e.id),c=t.parentDialect===e.dialectId?"":e.dialectId;return{...s&&{[i]:s},...c&&{$schema:c},...n}}};class Me extends Error{constructor(e){super("Invalid Schema"),this.name=this.constructor.name,this.output=e}}var Ke=Me;const Ze=Ve;var Je={compile:e=>Ze.value(e),interpret:()=>!0};const Be=r,We=t.exports,{resolveUrl:Ge}=i,Qe=k,Ye=Ve,Xe=Ke,er=pe,rr=Je,tr="FLAG",nr="BASIC",or="DETAILED",ar="VERBOSE";let ir=or,sr=!0;er.addPlugin("application/schema+json",{parse:async(e,r)=>[await e.json(),r.schema||r.profile],matcher:e=>e.endsWith(".schema.json")});const cr=async e=>{const r={metaData:{}};return{ast:r,schemaUri:await yr(e,r)}},ur=Be((({ast:e,schemaUri:r},t,n=tr)=>{if(![tr,nr,or,ar].includes(n))throw Error(`The '${n}' error format is not supported`);const o=[],a=We.subscribe("result",lr(n,o));return gr(r,t,e,{}),We.unsubscribe(a),o[0]})),lr=(e,r)=>{const t=[];return(n,o)=>{if("result"===n){const{keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a}=o,i={keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a,errors:[]};t.push(i)}else if("result.start"===n)t.push(n);else if("result.end"===n){const n=t.pop();for(;"result.start"!==t[t.length-1];){const r=t.pop(),o=[r];e===nr&&(o.push(...r.errors),delete r.errors),(e===ar||e!==tr&&!r.valid)&&n.errors.unshift(...o)}t[t.length-1]=n,r[0]=n}}},pr={},fr=e=>pr[e]||rr,dr=e=>e in pr,hr={},vr={},yr=async(e,r)=>{if(e=await mr(e),!dr(`${e.dialectId}#validate`)){const r=await Ye.get(e.dialectId);(Ye.getConfig(r.id,"mandatoryVocabularies")||[]).forEach((e=>{if(!r.vocabulary[e])throw Error(`Vocabulary '${e}' must be explicitly declared and required`)})),Object.entries(r.vocabulary).forEach((([e,t])=>{if(e in hr)Object.entries(hr[e]).forEach((([e,t])=>{((e,r)=>{pr[e]={collectEvaluatedItems:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&new Set,collectEvaluatedProperties:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&[],...r}})(`${r.id}#${e}`,t)}));else if(t)throw Error(`Missing required vocabulary: ${e}`)}))}if(sr&&!e.validated){if(Ye.markValidated(e.id),!(e.dialectId in vr)){const r=await Ye.get(e.dialectId),t=await cr(r);vr[r.id]=ur(t)}const r=Qe.cons(e.schema,e.id),t=vr[e.dialectId](r,ir);if(!t.valid)throw new Xe(t)}return e.id in r.metaData||(r.metaData[e.id]={id:e.id,dynamicAnchors:e.dynamicAnchors,anchors:e.anchors}),fr(`${e.dialectId}#validate`).compile(e,r)},mr=async e=>Ye.typeOf(e,"string")?mr(await Ye.get(Ye.value(e),e)):e,gr=(e,r,t,n)=>{const o=br(e,t),a=Ge(e,"");return fr(o).interpret(e,r,t,{...t.metaData[a].dynamicAnchors,...n})},br=(e,r)=>{if(!(e in r))throw Error(`No schema found at ${e}`);return r[e][0]};var wr={validate:async(e,r,t)=>{const n=await cr(e),o=(e,r)=>ur(n,Qe.cons(e),r);return void 0===r?o:o(r,t)},compile:cr,interpret:ur,setMetaOutputFormat:e=>{ir=e},setShouldMetaValidate:e=>{sr=e},FLAG:tr,BASIC:nr,DETAILED:or,VERBOSE:ar,add:(e,r="",t="")=>{const n=Ye.add(e,r,t);delete vr[n]},getKeyword:fr,hasKeyword:dr,defineVocabulary:(e,r)=>{hr[e]=r},compileSchema:yr,interpretSchema:gr,collectEvaluatedProperties:(e,r,t,n,o)=>{const a=br(e,t);return fr(a).collectEvaluatedProperties(e,r,t,n,o)},collectEvaluatedItems:(e,r,t,n,o)=>{const a=br(e,t);return fr(a).collectEvaluatedItems(e,r,t,n,o)},addMediaTypePlugin:er.addPlugin};const Er=Y,Sr=t.exports,Or=wr,Cr=k,Ar=Ve;var Ir={compile:async(e,r)=>{const t=Ar.uri(e);if(!(t in r)){r[t]=!1;const n=Ar.value(e);if(!["object","boolean"].includes(typeof n))throw Error(`No schema found at '${Ar.uri(e)}'`);r[t]=[`${e.dialectId}#validate`,Ar.uri(e),"boolean"==typeof n?n:await Er.pipeline([Ar.entries,Er.map((([r,t])=>[`${e.dialectId}#${r}`,t])),Er.filter((([r])=>r!==`${e.dialectId}#validate`)),Er.map((async([t,n])=>{const o=await Or.getKeyword(t).compile(n,r,e);return[t,Ar.uri(n),o]})),Er.all],e)]}return t},interpret:(e,r,t,n)=>{const[o,a,i]=t[e];Sr.publishSync("result.start");const s="boolean"==typeof i?i:i.every((([e,o,a])=>{Sr.publishSync("result.start");const i=Or.getKeyword(e).interpret(a,r,t,n);return Sr.publishSync("result",{keyword:e,absoluteKeywordLocation:o,instanceLocation:Cr.uri(r),valid:i,ast:a}),Sr.publishSync("result.end"),i}));return Sr.publishSync("result",{keyword:o,absoluteKeywordLocation:a,instanceLocation:Cr.uri(r),valid:s,ast:e}),Sr.publishSync("result.end"),s},collectEvaluatedProperties:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&[]:a.filter((([e])=>!o||!e.endsWith("#unevaluatedProperties"))).reduce(((e,[o,,a])=>{const i=e&&Or.getKeyword(o).collectEvaluatedProperties(a,r,t,n);return!1!==i&&[...e,...i]}),[])},collectEvaluatedItems:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&new Set:a.filter((([e])=>!o||!e.endsWith("#unevaluatedItems"))).reduce(((e,[o,,a])=>{const i=!1!==e&&Or.getKeyword(o).collectEvaluatedItems(a,r,t,n);return!1!==i&&new Set([...e,...i])}),new Set)}};var jr={Core:wr,Schema:Ve,Instance:k,Reference:S,Keywords:{metaData:Je,validate:Ir},InvalidSchemaError:Ke};exports.default=jr; | ||
//# sourceMappingURL=json-schema-core-cjs.min.js.map |
@@ -1,9 +0,3 @@ | ||
var e=function(e,r){return function t(){null==r&&(r=e.length);var n=[].slice.call(arguments);return n.length>=r?e.apply(this,n):function(){return t.apply(this,n.concat([].slice.call(arguments)))}}};var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,r){return e(r={exports:{}},r.exports),r.exports}var n=t((function(e,t){var n,o;n="object"==typeof window&&window||r,o={},n.PubSub?(o=n.PubSub,console.warn("PubSub already loaded, using existing version")):(n.PubSub=o,function(e){var r={},t=-1,n="*";function o(e){var r;for(r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!0;return!1}function a(e){return function(){throw e}}function i(e,r,t){try{e(r,t)}catch(e){setTimeout(a(e),0)}}function s(e,r,t){e(r,t)}function c(e,t,n,o){var a,c=r[t],u=o?s:i;if(Object.prototype.hasOwnProperty.call(r,t))for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&u(c[a],e,n)}function u(e,r,t){return function(){var o=String(e),a=o.lastIndexOf(".");for(c(e,e,r,t);-1!==a;)a=(o=o.substr(0,a)).lastIndexOf("."),c(e,o,r,t);c(e,n,r,t)}}function l(e){var t=String(e);return Boolean(Object.prototype.hasOwnProperty.call(r,t)&&o(r[t]))}function p(e){for(var r=String(e),t=l(r)||l(n),o=r.lastIndexOf(".");!t&&-1!==o;)o=(r=r.substr(0,o)).lastIndexOf("."),t=l(r);return t}function f(e,r,t,n){var o=u(e="symbol"==typeof e?e.toString():e,r,n);return!!p(e)&&(!0===t?o():setTimeout(o,0),!0)}e.publish=function(r,t){return f(r,t,!1,e.immediateExceptions)},e.publishSync=function(r,t){return f(r,t,!0,e.immediateExceptions)},e.subscribe=function(e,n){if("function"!=typeof n)return!1;e="symbol"==typeof e?e.toString():e,Object.prototype.hasOwnProperty.call(r,e)||(r[e]={});var o="uid_"+String(++t);return r[e][o]=n,o},e.subscribeAll=function(r){return e.subscribe(n,r)},e.subscribeOnce=function(r,t){var n=e.subscribe(r,(function(){e.unsubscribe(n),t.apply(this,arguments)}));return e},e.clearAllSubscriptions=function(){r={}},e.clearSubscriptions=function(e){var t;for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&delete r[t]},e.countSubscriptions=function(e){var t,n,o=0;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)){for(n in r[t])o++;break}return o},e.getSubscriptions=function(e){var t,n=[];for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&n.push(t);return n},e.unsubscribe=function(t){var n,o,a,i=function(e){var t;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e))return!0;return!1},s="string"==typeof t&&(Object.prototype.hasOwnProperty.call(r,t)||i(t)),c=!s&&"string"==typeof t,u="function"==typeof t,l=!1;if(!s){for(n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(o=r[n],c&&o[t]){delete o[t],l=t;break}if(u)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&o[a]===t&&(delete o[a],l=!0)}return l}e.clearSubscriptions(t)}}(o)),void 0!==e&&e.exports&&(t=e.exports=o),t.PubSub=o,e.exports=t=o}));n.PubSub;var o,a=t((function(e,r){ | ||
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ | ||
!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var n=r.length-1,o=1;o<n;++o)r[o]=r[o].slice(1,-1);return r[n]=r[n].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,r){var t=e;if(r)for(var n in r)t[n]=r[n];return t}function s(e){var n="[A-Za-z]",o="[0-9]",a=r(o,"[A-Fa-f]"),i=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=r("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=r(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t(n+r(n,o,"[\\+\\-\\.]")+"*"),t(t(i+"|"+r(l,s,"[\\:]"))+"*");var p=t(t("25[0-5]")+"|"+t("2[0-4]"+o)+"|"+t("1"+o+o)+"|"+t("0?[1-9]"+o)+"|0?0?"+o),f=t(p+"\\."+p+"\\."+p+"\\."+p),d=t(a+"{1,4}"),h=t(t(d+"\\:"+d)+"|"+f),v=t(t(d+"\\:")+"{6}"+h),y=t("\\:\\:"+t(d+"\\:")+"{5}"+h),m=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+h),g=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+h),b=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+h),w=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+h),E=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+h),S=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),C=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),O=t([v,y,m,g,b,w,E,S,C].join("|")),A=t(t(l+"|"+i)+"+");t("[vV]"+a+"+\\."+r(l,s,"[\\:]")+"+"),t(t(i+"|"+r(l,s))+"*");var I=t(i+"|"+r(l,s,"[\\:\\@]"));return t(t(i+"|"+r(l,s,"[\\@]"))+"+"),t(t(I+"|"+r("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(r("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+O+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+A+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,r){var t=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)},f=2147483647,d=36,h=1,v=26,y=38,m=700,g=72,b=128,w="-",E=/^xn--/,S=/[^\0-\x7E]/,C=/[\x2E\u3002\uFF0E\uFF61]/g,O={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=d-h,I=Math.floor,T=String.fromCharCode;function j(e){throw new RangeError(O[e])}function x(e,r){for(var t=[],n=e.length;n--;)t[n]=r(e[n]);return t}function P(e,r){var t=e.split("@"),n="";return t.length>1&&(n=t[0]+"@",e=t[1]),n+x((e=e.replace(C,".")).split("."),r).join(".")}function $(e){for(var r=[],t=0,n=e.length;t<n;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<n){var a=e.charCodeAt(t++);56320==(64512&a)?r.push(((1023&o)<<10)+(1023&a)+65536):(r.push(o),t--)}else r.push(o)}return r}var D=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:d},R=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},N=function(e,r,t){var n=0;for(e=t?I(e/m):e>>1,e+=I(e/r);e>A*v>>1;n+=d)e=I(e/A);return I(n+(A+1)*e/(e+y))},F=function(e){var r=[],t=e.length,n=0,o=b,a=g,i=e.lastIndexOf(w);i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&j("not-basic"),r.push(e.charCodeAt(s));for(var c=i>0?i+1:0;c<t;){for(var u=n,l=1,p=d;;p+=d){c>=t&&j("invalid-input");var y=D(e.charCodeAt(c++));(y>=d||y>I((f-n)/l))&&j("overflow"),n+=y*l;var m=p<=a?h:p>=a+v?v:p-a;if(y<m)break;var E=d-m;l>I(f/E)&&j("overflow"),l*=E}var S=r.length+1;a=N(n-u,S,0==u),I(n/S)>f-o&&j("overflow"),o+=I(n/S),n%=S,r.splice(n++,0,o)}return String.fromCodePoint.apply(String,r)},_=function(e){var r=[],t=(e=$(e)).length,n=b,o=0,a=g,i=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var p=u.value;p<128&&r.push(T(p))}}catch(e){s=!0,c=e}finally{try{!i&&l.return&&l.return()}finally{if(s)throw c}}var y=r.length,m=y;for(y&&r.push(w);m<t;){var E=f,S=!0,C=!1,O=void 0;try{for(var A,x=e[Symbol.iterator]();!(S=(A=x.next()).done);S=!0){var P=A.value;P>=n&&P<E&&(E=P)}}catch(e){C=!0,O=e}finally{try{!S&&x.return&&x.return()}finally{if(C)throw O}}var D=m+1;E-n>I((f-o)/D)&&j("overflow"),o+=(E-n)*D,n=E;var F=!0,_=!1,k=void 0;try{for(var U,q=e[Symbol.iterator]();!(F=(U=q.next()).done);F=!0){var L=U.value;if(L<n&&++o>f&&j("overflow"),L==n){for(var z=o,H=d;;H+=d){var V=H<=a?h:H>=a+v?v:H-a;if(z<V)break;var M=z-V,K=d-V;r.push(T(R(V+M%K,0))),z=I(M/K)}r.push(T(R(z,0))),a=N(o,D,m==y),o=0,++m}}}catch(e){_=!0,k=e}finally{try{!F&&q.return&&q.return()}finally{if(_)throw k}}++o,++n}return r.join("")},k=function(e){return P(e,(function(e){return E.test(e)?F(e.slice(4).toLowerCase()):e}))},U=function(e){return P(e,(function(e){return S.test(e)?"xn--"+_(e):e}))},q={version:"2.1.0",ucs2:{decode:$,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:F,encode:_,toASCII:U,toUnicode:k},L={};function z(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function H(e){for(var r="",t=0,n=e.length;t<n;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(n-t>=6){var a=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(n-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function V(e,r){function t(e){var t=H(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,z).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,z).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,z).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,z).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,z).replace(r.PCT_ENCODED,o)),e}function M(e){return e.replace(/^0*(.*)/,"$1")||"0"}function K(e,r){var t=e.match(r.IPV4ADDRESS)||[],n=l(t,2)[1];return n?n.split(".").map(M).join("."):e}function Z(e,r){var t=e.match(r.IPV6ADDRESS)||[],n=l(t,3),o=n[1],a=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],p=u?u.split(":").map(M):[],f=c.split(":").map(M),d=r.IPV4ADDRESS.test(f[f.length-1]),h=d?7:8,v=f.length-h,y=Array(h),m=0;m<h;++m)y[m]=p[m]||f[v+m]||"";d&&(y[h-1]=K(y[h-1],r));var g=y.reduce((function(e,r,t){if(!r||"0"===r){var n=e[e.length-1];n&&n.index+n.length===t?n.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(g&&g.length>1){var w=y.slice(0,g.index),E=y.slice(g.index+g.length);b=w.join(":")+"::"+E.join(":")}else b=y.join(":");return a&&(b+="%"+a),b}return e}var J=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,B=void 0==="".match(/(){0}/)[1];function G(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},n=!1!==r.iri?u:c;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(J);if(o){B?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=Z(K(t.host,n),n)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var a=L[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)V(t,n);else{if(t.host&&(r.domainHost||a&&a.domainHost))try{t.host=q.toASCII(t.host.replace(n.PCT_ENCODED,H).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}V(t,c)}a&&a.parse&&a.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function W(e,r){var t=!1!==r.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(Z(K(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function re(e){for(var r=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(ee);if(!t)throw new Error("Unexpected dot segment condition");var n=t[0];e=e.slice(n.length),r.push(n)}return r.join("")}function te(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?u:c,n=[],o=L[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?q.toUnicode(e.host):q.toASCII(e.host.replace(t.PCT_ENCODED,H).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}V(e,t),"suffix"!==r.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=W(e,r);if(void 0!==a&&("suffix"!==r.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=re(i)),void 0===a&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=G(te(e,t),t),r=G(te(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(n.scheme=r.scheme,n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(r.path?("/"===r.path.charAt(0)?n.path=re(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:n.path=r.path:n.path="/"+r.path,n.path=re(n.path)),n.query=r.query):(n.path=e.path,void 0!==r.query?n.query=r.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=r.fragment,n}function oe(e,r,t){var n=i({scheme:"null"},t);return te(ne(G(e,n),G(r,n),n,!0),n)}function ae(e,r){return"string"==typeof e?e=te(G(e,r),r):"object"===n(e)&&(e=G(te(e,r),r)),e}function ie(e,r,t){return"string"==typeof e?e=te(G(e,t),t):"object"===n(e)&&(e=te(e,t)),"string"==typeof r?r=te(G(r,t),t):"object"===n(r)&&(r=te(r,t)),e===r}function se(e,r){return e&&e.toString().replace(r&&r.iri?u.ESCAPE:c.ESCAPE,z)}function ce(e,r){return e&&e.toString().replace(r&&r.iri?u.PCT_ENCODED:c.PCT_ENCODED,H)}var ue={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=pe(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),n=l(t,2),o=n[0],a=n[1];e.path=o&&"/"!==o?o:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},de={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},he={},ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",me=t(t("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+t("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+t("%"+ye+ye)),ge="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ee=new RegExp(ve,"g"),Se=new RegExp(me,"g"),Ce=new RegExp(r("[^]",ge,"[\\.]",'[\\"]',be),"g"),Oe=new RegExp(r("[^]",ve,we),"g"),Ae=Oe;function Ie(e){var r=H(e);return r.match(Ee)?r:e}var Te={scheme:"mailto",parse:function(e,r){var t=e,n=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,a={},i=t.query.split("&"),s=0,c=i.length;s<c;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),p=0,f=l.length;p<f;++p)n.push(l[p]);break;case"subject":t.subject=ce(u[1],r);break;case"body":t.body=ce(u[1],r);break;default:o=!0,a[ce(u[0],r)]=ce(u[1],r)}}o&&(t.headers=a)}t.query=void 0;for(var d=0,h=n.length;d<h;++d){var v=n[d].split("@");if(v[0]=ce(v[0]),r.unicodeSupport)v[1]=ce(v[1],r).toLowerCase();else try{v[1]=q.toASCII(ce(v[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[d]=v.join("@")}return t},serialize:function(e,r){var t=e,n=a(e.to);if(n){for(var i=0,s=n.length;i<s;++i){var c=String(n[i]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(Se,Ie).replace(Se,o).replace(Ce,z),p=c.slice(u+1);try{p=r.iri?q.toUnicode(p):q.toASCII(ce(p,r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=l+"@"+p}t.path=n.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var d=[];for(var h in f)f[h]!==he[h]&&d.push(h.replace(Se,Ie).replace(Se,o).replace(Oe,z)+"="+f[h].replace(Se,Ie).replace(Se,o).replace(Ae,z));return d.length&&(t.query=d.join("&")),t}},je=/^([^\:]+)\:(.*)/,xe={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(je),n=e;if(t){var o=r.scheme||n.scheme||"urn",a=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||a),c=L[s];n.nid=a,n.nss=i,n.path=void 0,c&&(n=c.parse(n,r))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",n=e.nid,o=t+":"+(r.nid||n),a=L[o];a&&(e=a.serialize(e,r));var i=e,s=e.nss;return i.path=(n||r.nid)+":"+s,i}},Pe=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,$e={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match(Pe)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};L[ue.scheme]=ue,L[le.scheme]=le,L[fe.scheme]=fe,L[de.scheme]=de,L[Te.scheme]=Te,L[xe.scheme]=xe,L[$e.scheme]=$e,e.SCHEMES=L,e.pctEncChar=z,e.pctDecChars=H,e.parse=G,e.removeDotSegments=re,e.serialize=te,e.resolveComponents=ne,e.resolve=oe,e.normalize=ae,e.equal=ie,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(r)}));(o=a)&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")&&o.default;const i={null:e=>null===e,boolean:e=>"boolean"==typeof e,object:e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,array:e=>Array.isArray(e),number:e=>"number"==typeof e,integer:e=>Number.isInteger(e),string:e=>"string"==typeof e};var s={jsonTypeOf:(e,r)=>i[r](e),resolveUrl:(e,r)=>{const t=a.resolve(e,r,{iri:!0});if(a.resolve(e,"",{iri:!0})&&"file"===a.parse(t).scheme&&"file"!==a.parse(e).scheme)throw Error(`Can't access file '${t}' resource from network context '${e}'`);return t},urlFragment:e=>a.unescapeComponent(a.parse(e).fragment)||"",pathRelative:(e,r)=>{if(e===r)return"";let t=1;const n=e.length-1,o=r.length-t,a=n<o?n:o;let i=-1,s=0;for(;s<a;s++){const n=e.charCodeAt(s+1);if(n!==r.charCodeAt(t+s))break;47===n&&(i=s)}if(o>a){if(47===r.charCodeAt(t+s))return r.slice(t+s+1);if(0===s)return r.slice(t+s)}n>a&&(47===e.charCodeAt(s+1)?i=s:0===a&&(i=0));let c="";for(s=i+2;s<=e.length;++s)s!==e.length&&47!==e.charCodeAt(s)||(c+=0===c.length?"..":"/..");return t+=i,c.length>0?`${c}${r.slice(t,r.length)}`:(47===r.charCodeAt(t)&&++t,r.slice(t,r.length))}};const c=e=>{if(e.length>0&&"/"!==e[0])throw Error("Invalid JSON Pointer");return e.split("/").slice(1).map(v)},u=(e,r,t,n)=>{if(0===e.length)return t;if(e.length>1){const o=e.shift();return{...r,[o]:u(e,m(r,o,n),t,d(o,n))}}if(Array.isArray(r)){const n=[...r];return n[y(r,e[0])]=t,n}return"object"==typeof r&&null!==r?{...r,[e[0]]:t}:m(r,e[0],n)},l=(e,r,t,n)=>{if(0!==e.length)if(1!==e.length||g(r)){const o=e.shift();l(e,m(r,o,n),t,d(o,n))}else{r[y(r,e[0])]=t}},p=(e,r,t)=>{if(0!=e.length){if(e.length>1){const n=e.shift(),o=m(r,n,t);return{...r,[n]:p(e,o,d(n,t))}}if(Array.isArray(r))return r.filter(((r,t)=>t!=e[0]));if("object"==typeof r&&null!==r){const{[e[0]]:t,...n}=r;return n}return m(r,e[0],t)}},f=(e,r,t)=>{if(0!==e.length)if(e.length>1){const n=e.shift(),o=m(r,n,t);f(e,o,d(n,t))}else Array.isArray(r)?r.splice(e[0],1):"object"==typeof r&&null!==r?delete r[e[0]]:m(r,e[0],t)},d=e(((e,r)=>r+"/"+h(e))),h=e=>e.toString().replace(/~/g,"~0").replace(/\//g,"~1"),v=e=>e.toString().replace(/~1/g,"/").replace(/~0/g,"~"),y=(e,r)=>Array.isArray(e)&&"-"===r?e.length:r,m=(e,r,t="")=>{if(void 0===e)throw TypeError(`Value at '${t}' is undefined and does not have property '${r}'`);if(null===e)throw TypeError(`Value at '${t}' is null and does not have property '${r}'`);if(g(e))throw TypeError(`Value at '${t}' is a ${typeof e} and does not have property '${r}'`);return e[y(e,r)]},g=e=>null===e||"object"!=typeof e;var b={nil:"",append:d,get:(e,r)=>{const t=c(e),n=e=>t.reduce((([e,r],t)=>[m(e,t,r),d(t,r)]),[e,""])[0];return void 0===r?n:n(r)},set:(r,t,n)=>{const o=c(r),a=e(((e,r)=>u(o,e,r,"")));return void 0===t?a:a(t,n)},assign:(r,t,n)=>{const o=c(r),a=e(((e,r)=>l(o,e,r,"")));return void 0===t?a:a(t,n)},unset:(e,r)=>{const t=c(e),n=e=>p(t,e,"");return void 0===r?n:n(r)},remove:(e,r)=>{const t=c(e),n=e=>f(t,e,"");return void 0===r?n:n(r)}};b.nil,b.append,b.get,b.set,b.assign,b.unset,b.remove;const w=Symbol("$__value"),E=Symbol("$__href");var S={cons:(e,r)=>Object.freeze({[E]:e,[w]:r}),isReference:e=>e&&void 0!==e[E],href:e=>e[E],value:e=>e[w]};const{resolveUrl:C,jsonTypeOf:O}=s,A=Object.freeze({id:"",pointer:"",instance:void 0,value:void 0}),I=e=>S.isReference(e.value)?S.value(e.value):e.value,T=e(((e,r)=>O(I(e),r))),j=(e,r)=>Object.freeze({...r,pointer:b.append(e,r.pointer),value:I(r)[e]}),x=e(((e,r)=>I(r).map(((t,n,o,a)=>e(j(n,r),n,o,a))))),P=e(((e,r)=>I(r).map(((e,t,n,o)=>j(t,r))).filter(((r,t,n,o)=>e(r,t,n,o))))),$=e(((e,r,t)=>I(t).reduce(((r,n,o)=>e(r,j(o,t),o)),r))),D=e(((e,r)=>I(r).every(((t,n,o,a)=>e(j(n,r),n,o,a))))),R=e(((e,r)=>I(r).some(((t,n,o,a)=>e(j(n,r),n,o,a)))));var N={nil:A,cons:(e,r="")=>Object.freeze({...A,id:C(r,""),instance:e,value:e}),uri:e=>`${e.id}#${encodeURI(e.pointer)}`,value:I,has:(e,r)=>e in I(r),typeOf:T,step:j,entries:e=>Object.keys(I(e)).map((r=>[r,j(r,e)])),keys:e=>Object.keys(I(e)),map:x,filter:P,reduce:$,every:D,some:R,length:e=>I(e).length},F=async e=>Object.entries(await e),_=e((async(e,r)=>(await r).map(e))),k=e((async(e,r,t)=>(await t).reduce((async(r,t)=>e(await r,t)),r))),U=e((async(e,r,t={})=>k((async(r,t)=>await e(t)?r.concat([t]):r),[],r,t))),q=e((async(e,r)=>{const t=await _(e,r);return(await Promise.all(t)).some((e=>e))})),L=e((async(e,r)=>{const t=await _(e,r);return(await Promise.all(t)).every((e=>e))})),z=e(((e,r)=>e.reduce((async(e,r)=>r(await e)),r))),H={entries:F,map:_,filter:U,reduce:k,some:q,every:L,pipeline:z,all:e=>Promise.all(e),allValues:e=>z([F,k((async(e,[r,t])=>(e[r]=await t,e)),{})],e)};H.entries,H.map,H.filter,H.reduce,H.some,H.every,H.pipeline,H.all,H.allValues;var V=fetch,M=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,K=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,Z=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,J=/\\([\u000b\u0020-\u00ff])/g,B=/([\\"])/g,G=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,W=function(e){if(!e)throw new TypeError("argument string is required");var r="object"==typeof e?function(e){var r;"function"==typeof e.getHeader?r=e.getHeader("content-type"):"object"==typeof e.headers&&(r=e.headers&&e.headers["content-type"]);if("string"!=typeof r)throw new TypeError("content-type header is missing from object");return r}(e):e;if("string"!=typeof r)throw new TypeError("argument string is required to be a string");var t=r.indexOf(";"),n=-1!==t?r.substr(0,t).trim():r.trim();if(!G.test(n))throw new TypeError("invalid media type");var o=new Y(n.toLowerCase());if(-1!==t){var a,i,s;for(M.lastIndex=t;i=M.exec(r);){if(i.index!==t)throw new TypeError("invalid parameter format");t+=i[0].length,a=i[1].toLowerCase(),'"'===(s=i[2])[0]&&(s=s.substr(1,s.length-2).replace(J,"$1")),o.parameters[a]=s}if(t!==r.length)throw new TypeError("invalid parameter format")}return o}; | ||
/*! | ||
* content-type | ||
* Copyright(c) 2015 Douglas Christopher Wilson | ||
* MIT Licensed | ||
*/function Q(e){var r=String(e);if(Z.test(r))return r;if(r.length>0&&!K.test(r))throw new TypeError("invalid parameter value");return'"'+r.replace(B,"\\$1")+'"'}function Y(e){this.parameters=Object.create(null),this.type=e}var X={format:function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var r=e.parameters,t=e.type;if(!t||!G.test(t))throw new TypeError("invalid type");var n=t;if(r&&"object"==typeof r)for(var o,a=Object.keys(r).sort(),i=0;i<a.length;i++){if(o=a[i],!Z.test(o))throw new TypeError("invalid parameter name");n+="; "+o+"="+Q(r[o])}return n},parse:W};const ee={};var re={addPlugin:(e,r)=>{ee[e]=r},parse:e=>{const r=X.parse(e.headers.get("content-type")).type;if(!(r in ee))throw Error(`${e.url} is not a schema. Found a document with media type: ${r}`);return ee[r].parse(e)},getContentType:e=>{for(const r in ee)if(ee[r].matcher(e))return r;return"application/octet-stream"}};const{jsonTypeOf:te,resolveUrl:ne,urlFragment:oe,pathRelative:ae}=s,ie="https://json-schema.org/draft/2019-09/vocab/core",se="https://json-schema.org/draft/2020-12/vocab/core",ce={},ue={},le=(e,r)=>{const t=ue[e];return ce[t]?.[r]},pe={},fe={},de=(e,r="",t="")=>{e=JSON.parse(JSON.stringify(e));const n=ne(r,""),o=ne(e.$schema||t,"");if(!o)throw Error("Couldn't determine schema dialect");if(delete e.$schema,!(o in ue))if(!0===e?.$vocabulary?.[ie]&&o===he(e,n,ie)[0])ue[o]=ie;else if(!0===e?.$vocabulary?.[se]&&o===he(e,n,se)[0])ue[o]=se;else if(o===he(e,n,o)[0])ue[o]=o;else{if(!(o in pe))throw Error(`Couldn't determine JSON Schema version for dialect: '${o}'`);{const e=pe[o];!0===e.vocabulary[ie]?ue[o]=ie:!0===e.vocabulary[se]?ue[o]=se:ue[o]=ue[e.dialectId]}}const[a,i]=he(e,n,ue[o]);if(!a)throw Error("Couldn't determine an identifier for the schema");const s=le(o,"baseToken");delete e[s],n&&(fe[n]=a);const c=le(o,"anchorToken");i&&s===c&&(e[c]=c!==s?encodeURI(i):`#${encodeURI(i)}`);const u={},l=le(o,"recursiveAnchorToken");let p;!0===e[l]&&(u[""]=`${a}#`,e[c]="",delete e[l]);const f=le(o,"vocabularyToken");te(e[f],"object")?(p=e[f],delete e[f]):p={[ue[o]]:!0};const d={"":""};return pe[a]={id:a,dialectId:o,schema:ve(e,a,o,b.nil,d,u),anchors:d,dynamicAnchors:u,vocabulary:p,validated:!1},a},he=(e,r,t)=>{const n=ce[t]?.baseToken,o=ne(r,e[n]||"");return[ne(o,""),oe(o)]},ve=(e,r,t,n,o,a)=>{if(te(e,"object")){const i="string"==typeof e.$schema?ne(e.$schema,""):t,s=le(i,"embeddedToken"),c=le(i,"anchorToken");if("string"==typeof e[s]&&(s!==c||"#"!==e[s][0])){const n=ne(r,e[s]);return e[le(i,"baseToken")]=n,de(e,n,t),S.cons(e[s],e)}const u=le(t,"anchorToken"),l=le(t,"dynamicAnchorToken");"string"==typeof e[l]&&(a[e[l]]=`${r}#${encodeURI(n)}`,o[e[l]]=n,delete e[l]);const p=le(t,"embeddedToken");if("string"==typeof e[u]){const r=u!==p?e[u]:e[u].slice(1);o[r]=n,delete e[u]}const f=le(t,"jrefToken");if("string"==typeof e[f])return S.cons(e[f],e);for(const i in e)e[i]=ve(e[i],r,t,b.append(i,n),o,a);return e}return Array.isArray(e)?e.map(((e,i)=>ve(e,r,t,b.append(i,n),o,a))):e},ye=e=>pe[fe[e]]||pe[e],me=Object.freeze({id:"",dialectId:void 0,vocabulary:{},pointer:b.nil,schema:void 0,value:void 0,anchors:{},dynamicAnchors:{},validated:!0}),ge=async(e,r=me)=>{const t=ne(Ee(r),e),n=ne(t,""),o=oe(t);if(!(e=>e in pe||e in fe)(n)){const e=await V(n,{headers:{Accept:"application/schema+json"}});if(e.status>=400)throw await e.text(),Error(`Failed to retrieve schema with id: ${n}`);de(await re.parse(e),n)}const a=ye(n),i="/"!==o[0]?we(a,o):o,s=Object.freeze({...a,pointer:i,value:b.get(i,a.schema)});return be(s)},be=e=>S.isReference(e.value)?ge(S.href(e.value),e):e,we=(e,r)=>{if(!(r in e.anchors))throw Error(`No such anchor '${encodeURI(e.id)}#${encodeURI(r)}'`);return e.anchors[r]},Ee=e=>`${e.id}#${encodeURI(e.pointer)}`,Se=e=>S.isReference(e.value)?S.value(e.value):e.value,Ce=(e,r)=>{const t=ye(r.id),n=Object.freeze({...r,pointer:b.append(e,r.pointer),value:Se(r)[e],validated:t.validated});return be(n)},Oe=e(((e,r)=>H.pipeline([Se,H.map((async(t,n)=>e(await Ce(n,r),n))),H.all],r))),Ae={parentId:"",parentDialect:"",includeEmbedded:!0},Ie=(e,r)=>{if(r.startsWith("file://")){const t=e.slice(7,e.lastIndexOf("/"));return""===e?"":ae(t,r.slice(7))}return r};var Te={setConfig:(e,r,t)=>{ce[e]||(ce[e]={}),ce[e][r]=t},getConfig:le,add:de,get:ge,markValidated:e=>{pe[e].validated=!0},uri:Ee,value:Se,getAnchorPointer:we,typeOf:(e,r)=>te(Se(e),r),has:(e,r)=>e in Se(r),step:Ce,keys:e=>Object.keys(Se(e)),entries:e=>H.pipeline([Se,Object.keys,H.map((async r=>[r,await Ce(r,e)])),H.all],e),map:Oe,length:e=>Se(e).length,toSchema:(e,r={})=>{const t={...Ae,...r},n=JSON.parse(JSON.stringify(e.schema,((r,n)=>{if(!S.isReference(n))return n;const o=S.value(n),a="string"==typeof o.$schema?ne(o.$schema,""):e.dialectId,i=le(a,"embeddedToken");return!t.includeEmbedded&&i in o?void 0:S.value(n)}))),o=le(e.dialectId,"dynamicAnchorToken");Object.entries(e.dynamicAnchors).forEach((([e,r])=>{const t=oe(r);b.assign(t,n,{[o]:e,...b.get(t,n)})}));const a=le(e.dialectId,"anchorToken");Object.entries(e.anchors).filter((([e])=>""!==e)).forEach((([e,r])=>{b.assign(r,n,{[a]:e,...b.get(r,n)})}));const i=le(e.dialectId,"baseToken"),s=Ie(t.parentId,e.id),c=t.parentDialect===e.dialectId?"":e.dialectId;return{...s&&{[i]:s},...c&&{$schema:c},...n}}};Te.setConfig,Te.getConfig,Te.add,Te.get,Te.markValidated,Te.uri,Te.value,Te.getAnchorPointer,Te.typeOf,Te.has,Te.step,Te.keys,Te.entries,Te.map,Te.length,Te.toSchema;class je extends Error{constructor(e){super("Invalid Schema"),this.name=this.constructor.name,this.output=e}}var xe=je;var Pe={compile:e=>Te.value(e),interpret:()=>!0};const{resolveUrl:$e}=s,De="FLAG",Re="BASIC",Ne="DETAILED",Fe="VERBOSE";let _e=Ne,ke=!0;re.addPlugin("application/schema+json",{parse:async e=>await e.json(),matcher:e=>e.endsWith(".schema.json")});const Ue=async e=>{const r={metaData:{}};return{ast:r,schemaUri:await Ze(e,r)}},qe=e((({ast:e,schemaUri:r},t,o=De)=>{if(![De,Re,Ne,Fe].includes(o))throw Error(`The '${o}' error format is not supported`);const a=[],i=n.subscribe("result",Le(o,a));return Be(r,t,e,{}),n.unsubscribe(i),a[0]})),Le=(e,r)=>{const t=[];return(n,o)=>{if("result"===n){const{keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a}=o,i={keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a,errors:[]};t.push(i)}else if("result.start"===n)t.push(n);else if("result.end"===n){const n=t.pop();for(;"result.start"!==t[t.length-1];){const r=t.pop(),o=[r];e===Re&&(o.push(...r.errors),delete r.errors),(e===Fe||e!==De&&!r.valid)&&n.errors.unshift(...o)}t[t.length-1]=n,r[0]=n}}},ze={},He=e=>ze[e]||Pe,Ve=e=>e in ze,Me={},Ke={},Ze=async(e,r)=>{if(e=await Je(e),!Ve(`${e.dialectId}#validate`)){const r=await Te.get(e.dialectId);(Te.getConfig(r.id,"mandatoryVocabularies")||[]).forEach((e=>{if(!r.vocabulary[e])throw Error(`Vocabulary '${e}' must be explicitly declared and required`)})),Object.entries(r.vocabulary).forEach((([e,t])=>{if(e in Me)Object.entries(Me[e]).forEach((([e,t])=>{((e,r)=>{ze[e]={collectEvaluatedItems:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&new Set,collectEvaluatedProperties:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&[],...r}})(`${r.id}#${e}`,t)}));else if(t)throw Error(`Missing required vocabulary: ${e}`)}))}if(ke&&!e.validated){if(Te.markValidated(e.id),!(e.dialectId in Ke)){const r=await Te.get(e.dialectId),t=await Ue(r);Ke[r.id]=qe(t)}const r=N.cons(e.schema,e.id),t=Ke[e.dialectId](r,_e);if(!t.valid)throw new xe(t)}return e.id in r.metaData||(r.metaData[e.id]={id:e.id,dynamicAnchors:e.dynamicAnchors,anchors:e.anchors}),He(`${e.dialectId}#validate`).compile(e,r)},Je=async e=>Te.typeOf(e,"string")?Je(await Te.get(Te.value(e),e)):e,Be=(e,r,t,n)=>{const o=Ge(e,t),a=$e(e,"");return He(o).interpret(e,r,t,{...t.metaData[a].dynamicAnchors,...n})},Ge=(e,r)=>{if(!(e in r))throw Error(`No schema found at ${e}`);return r[e][0]};var We={validate:async(e,r,t)=>{const n=await Ue(e),o=(e,r)=>qe(n,N.cons(e),r);return void 0===r?o:o(r,t)},compile:Ue,interpret:qe,setMetaOutputFormat:e=>{_e=e},setShouldMetaValidate:e=>{ke=e},FLAG:De,BASIC:Re,DETAILED:Ne,VERBOSE:Fe,add:(e,r="",t="")=>{const n=Te.add(e,r,t);delete Ke[n]},getKeyword:He,hasKeyword:Ve,defineVocabulary:(e,r)=>{Me[e]=r},compileSchema:Ze,interpretSchema:Be,collectEvaluatedProperties:(e,r,t,n,o)=>{const a=Ge(e,t);return He(a).collectEvaluatedProperties(e,r,t,n,o)},collectEvaluatedItems:(e,r,t,n,o)=>{const a=Ge(e,t);return He(a).collectEvaluatedItems(e,r,t,n,o)},addMediaTypePlugin:re.addPlugin};var Qe={compile:async(e,r)=>{const t=Te.uri(e);if(!(t in r)){r[t]=!1;const n=Te.value(e);if(!["object","boolean"].includes(typeof n))throw Error(`No schema found at '${Te.uri(e)}'`);r[t]=[`${e.dialectId}#validate`,Te.uri(e),"boolean"==typeof n?n:await H.pipeline([Te.entries,H.map((([r,t])=>[`${e.dialectId}#${r}`,t])),H.filter((([r])=>r!==`${e.dialectId}#validate`)),H.map((async([t,n])=>{const o=await We.getKeyword(t).compile(n,r,e);return[t,Te.uri(n),o]})),H.all],e)]}return t},interpret:(e,r,t,o)=>{const[a,i,s]=t[e];n.publishSync("result.start");const c="boolean"==typeof s?s:s.every((([e,a,i])=>{n.publishSync("result.start");const s=We.getKeyword(e).interpret(i,r,t,o);return n.publishSync("result",{keyword:e,absoluteKeywordLocation:a,instanceLocation:N.uri(r),valid:s,ast:i}),n.publishSync("result.end"),s}));return n.publishSync("result",{keyword:a,absoluteKeywordLocation:i,instanceLocation:N.uri(r),valid:c,ast:e}),n.publishSync("result.end"),c},collectEvaluatedProperties:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&[]:a.filter((([e])=>!o||!e.endsWith("#unevaluatedProperties"))).reduce(((e,[o,,a])=>{const i=e&&We.getKeyword(o).collectEvaluatedProperties(a,r,t,n);return!1!==i&&[...e,...i]}),[])},collectEvaluatedItems:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&new Set:a.filter((([e])=>!o||!e.endsWith("#unevaluatedItems"))).reduce(((e,[o,,a])=>{const i=!1!==e&&We.getKeyword(o).collectEvaluatedItems(a,r,t,n);return!1!==i&&new Set([...e,...i])}),new Set)}},Ye={metaData:Pe,validate:Qe},Xe={Core:We,Schema:Te,Instance:N,Reference:S,Keywords:Ye,InvalidSchemaError:xe},er=Xe.Core,rr=Xe.Schema,tr=Xe.Instance,nr=Xe.Reference,or=Xe.Keywords,ar=Xe.InvalidSchemaError;export{er as Core,tr as Instance,ar as InvalidSchemaError,or as Keywords,nr as Reference,rr as Schema,Xe as default}; | ||
var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r=function(e,r){return function t(){null==r&&(r=e.length);var n=[].slice.call(arguments);return n.length>=r?e.apply(this,n):function(){return t.apply(this,n.concat([].slice.call(arguments)))}}};var t,n,o={exports:{}};t=o,n=o.exports,function(e,r){var o={};e.PubSub?(o=e.PubSub,console.warn("PubSub already loaded, using existing version")):(e.PubSub=o,function(e){var r={},t=-1,n="*";function o(e){var r;for(r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!0;return!1}function a(e){return function(){throw e}}function i(e,r,t){try{e(r,t)}catch(e){setTimeout(a(e),0)}}function s(e,r,t){e(r,t)}function c(e,t,n,o){var a,c=r[t],u=o?s:i;if(Object.prototype.hasOwnProperty.call(r,t))for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&u(c[a],e,n)}function u(e,r,t){return function(){var o=String(e),a=o.lastIndexOf(".");for(c(e,e,r,t);-1!==a;)a=(o=o.substr(0,a)).lastIndexOf("."),c(e,o,r,t);c(e,n,r,t)}}function l(e){var t=String(e);return Boolean(Object.prototype.hasOwnProperty.call(r,t)&&o(r[t]))}function p(e){for(var r=String(e),t=l(r)||l(n),o=r.lastIndexOf(".");!t&&-1!==o;)o=(r=r.substr(0,o)).lastIndexOf("."),t=l(r);return t}function f(e,r,t,n){var o=u(e="symbol"==typeof e?e.toString():e,r,n);return!!p(e)&&(!0===t?o():setTimeout(o,0),!0)}e.publish=function(r,t){return f(r,t,!1,e.immediateExceptions)},e.publishSync=function(r,t){return f(r,t,!0,e.immediateExceptions)},e.subscribe=function(e,n){if("function"!=typeof n)return!1;e="symbol"==typeof e?e.toString():e,Object.prototype.hasOwnProperty.call(r,e)||(r[e]={});var o="uid_"+String(++t);return r[e][o]=n,o},e.subscribeAll=function(r){return e.subscribe(n,r)},e.subscribeOnce=function(r,t){var n=e.subscribe(r,(function(){e.unsubscribe(n),t.apply(this,arguments)}));return e},e.clearAllSubscriptions=function(){r={}},e.clearSubscriptions=function(e){var t;for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&delete r[t]},e.countSubscriptions=function(e){var t,n,o=0;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)){for(n in r[t])o++;break}return o},e.getSubscriptions=function(e){var t,n=[];for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&n.push(t);return n},e.unsubscribe=function(t){var n,o,a,i=function(e){var t;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e))return!0;return!1},s="string"==typeof t&&(Object.prototype.hasOwnProperty.call(r,t)||i(t)),c=!s&&"string"==typeof t,u="function"==typeof t,l=!1;if(!s){for(n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(o=r[n],c&&o[t]){delete o[t],l=t;break}if(u)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&o[a]===t&&(delete o[a],l=!0)}return l}e.clearSubscriptions(t)}}(o)),void 0!==t&&t.exports&&(n=t.exports=o),n.PubSub=o,t.exports=n=o}("object"==typeof window&&window||e);var a={exports:{}}; | ||
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var n=r.length-1,o=1;o<n;++o)r[o]=r[o].slice(1,-1);return r[n]=r[n].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,r){var t=e;if(r)for(var n in r)t[n]=r[n];return t}function s(e){var n="[A-Za-z]",o="[0-9]",a=r(o,"[A-Fa-f]"),i=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=r("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=r(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t(n+r(n,o,"[\\+\\-\\.]")+"*"),t(t(i+"|"+r(l,s,"[\\:]"))+"*");var p=t(t("25[0-5]")+"|"+t("2[0-4]"+o)+"|"+t("1"+o+o)+"|"+t("0?[1-9]"+o)+"|0?0?"+o),f=t(p+"\\."+p+"\\."+p+"\\."+p),d=t(a+"{1,4}"),h=t(t(d+"\\:"+d)+"|"+f),v=t(t(d+"\\:")+"{6}"+h),y=t("\\:\\:"+t(d+"\\:")+"{5}"+h),m=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+h),g=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+h),b=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+h),w=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+h),E=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+h),S=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),O=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),C=t([v,y,m,g,b,w,E,S,O].join("|")),A=t(t(l+"|"+i)+"+");t("[vV]"+a+"+\\."+r(l,s,"[\\:]")+"+"),t(t(i+"|"+r(l,s))+"*");var I=t(i+"|"+r(l,s,"[\\:\\@]"));return t(t(i+"|"+r(l,s,"[\\@]"))+"+"),t(t(I+"|"+r("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(r("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+C+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+A+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,r){var t=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)},f=2147483647,d=36,h=1,v=26,y=38,m=700,g=72,b=128,w="-",E=/^xn--/,S=/[^\0-\x7E]/,O=/[\x2E\u3002\uFF0E\uFF61]/g,C={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=d-h,I=Math.floor,T=String.fromCharCode;function j(e){throw new RangeError(C[e])}function x(e,r){for(var t=[],n=e.length;n--;)t[n]=r(e[n]);return t}function $(e,r){var t=e.split("@"),n="";return t.length>1&&(n=t[0]+"@",e=t[1]),n+x((e=e.replace(O,".")).split("."),r).join(".")}function D(e){for(var r=[],t=0,n=e.length;t<n;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<n){var a=e.charCodeAt(t++);56320==(64512&a)?r.push(((1023&o)<<10)+(1023&a)+65536):(r.push(o),t--)}else r.push(o)}return r}var P=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:d},N=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},R=function(e,r,t){var n=0;for(e=t?I(e/m):e>>1,e+=I(e/r);e>A*v>>1;n+=d)e=I(e/A);return I(n+(A+1)*e/(e+y))},F=function(e){var r=[],t=e.length,n=0,o=b,a=g,i=e.lastIndexOf(w);i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&j("not-basic"),r.push(e.charCodeAt(s));for(var c=i>0?i+1:0;c<t;){for(var u=n,l=1,p=d;;p+=d){c>=t&&j("invalid-input");var y=P(e.charCodeAt(c++));(y>=d||y>I((f-n)/l))&&j("overflow"),n+=y*l;var m=p<=a?h:p>=a+v?v:p-a;if(y<m)break;var E=d-m;l>I(f/E)&&j("overflow"),l*=E}var S=r.length+1;a=R(n-u,S,0==u),I(n/S)>f-o&&j("overflow"),o+=I(n/S),n%=S,r.splice(n++,0,o)}return String.fromCodePoint.apply(String,r)},_=function(e){var r=[],t=(e=D(e)).length,n=b,o=0,a=g,i=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var p=u.value;p<128&&r.push(T(p))}}catch(e){s=!0,c=e}finally{try{!i&&l.return&&l.return()}finally{if(s)throw c}}var y=r.length,m=y;for(y&&r.push(w);m<t;){var E=f,S=!0,O=!1,C=void 0;try{for(var A,x=e[Symbol.iterator]();!(S=(A=x.next()).done);S=!0){var $=A.value;$>=n&&$<E&&(E=$)}}catch(e){O=!0,C=e}finally{try{!S&&x.return&&x.return()}finally{if(O)throw C}}var P=m+1;E-n>I((f-o)/P)&&j("overflow"),o+=(E-n)*P,n=E;var F=!0,_=!1,U=void 0;try{for(var k,q=e[Symbol.iterator]();!(F=(k=q.next()).done);F=!0){var z=k.value;if(z<n&&++o>f&&j("overflow"),z==n){for(var L=o,H=d;;H+=d){var V=H<=a?h:H>=a+v?v:H-a;if(L<V)break;var M=L-V,K=d-V;r.push(T(N(V+M%K,0))),L=I(M/K)}r.push(T(N(L,0))),a=R(o,P,m==y),o=0,++m}}}catch(e){_=!0,U=e}finally{try{!F&&q.return&&q.return()}finally{if(_)throw U}}++o,++n}return r.join("")},U=function(e){return $(e,(function(e){return E.test(e)?F(e.slice(4).toLowerCase()):e}))},k=function(e){return $(e,(function(e){return S.test(e)?"xn--"+_(e):e}))},q={version:"2.1.0",ucs2:{decode:D,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:F,encode:_,toASCII:k,toUnicode:U},z={};function L(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function H(e){for(var r="",t=0,n=e.length;t<n;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(n-t>=6){var a=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(n-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function V(e,r){function t(e){var t=H(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,L).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,L).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,L).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,L).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,L).replace(r.PCT_ENCODED,o)),e}function M(e){return e.replace(/^0*(.*)/,"$1")||"0"}function K(e,r){var t=e.match(r.IPV4ADDRESS)||[],n=l(t,2)[1];return n?n.split(".").map(M).join("."):e}function Z(e,r){var t=e.match(r.IPV6ADDRESS)||[],n=l(t,3),o=n[1],a=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],p=u?u.split(":").map(M):[],f=c.split(":").map(M),d=r.IPV4ADDRESS.test(f[f.length-1]),h=d?7:8,v=f.length-h,y=Array(h),m=0;m<h;++m)y[m]=p[m]||f[v+m]||"";d&&(y[h-1]=K(y[h-1],r));var g=y.reduce((function(e,r,t){if(!r||"0"===r){var n=e[e.length-1];n&&n.index+n.length===t?n.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(g&&g.length>1){var w=y.slice(0,g.index),E=y.slice(g.index+g.length);b=w.join(":")+"::"+E.join(":")}else b=y.join(":");return a&&(b+="%"+a),b}return e}var J=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,B=void 0==="".match(/(){0}/)[1];function W(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},n=!1!==r.iri?u:c;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(J);if(o){B?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=Z(K(t.host,n),n)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var a=z[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)V(t,n);else{if(t.host&&(r.domainHost||a&&a.domainHost))try{t.host=q.toASCII(t.host.replace(n.PCT_ENCODED,H).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}V(t,c)}a&&a.parse&&a.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function G(e,r){var t=!1!==r.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(Z(K(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function re(e){for(var r=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(ee);if(!t)throw new Error("Unexpected dot segment condition");var n=t[0];e=e.slice(n.length),r.push(n)}return r.join("")}function te(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?u:c,n=[],o=z[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?q.toUnicode(e.host):q.toASCII(e.host.replace(t.PCT_ENCODED,H).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}V(e,t),"suffix"!==r.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=G(e,r);if(void 0!==a&&("suffix"!==r.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=re(i)),void 0===a&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=W(te(e,t),t),r=W(te(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(n.scheme=r.scheme,n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(r.path?("/"===r.path.charAt(0)?n.path=re(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:n.path=r.path:n.path="/"+r.path,n.path=re(n.path)),n.query=r.query):(n.path=e.path,void 0!==r.query?n.query=r.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=r.fragment,n}function oe(e,r,t){var n=i({scheme:"null"},t);return te(ne(W(e,n),W(r,n),n,!0),n)}function ae(e,r){return"string"==typeof e?e=te(W(e,r),r):"object"===n(e)&&(e=W(te(e,r),r)),e}function ie(e,r,t){return"string"==typeof e?e=te(W(e,t),t):"object"===n(e)&&(e=te(e,t)),"string"==typeof r?r=te(W(r,t),t):"object"===n(r)&&(r=te(r,t)),e===r}function se(e,r){return e&&e.toString().replace(r&&r.iri?u.ESCAPE:c.ESCAPE,L)}function ce(e,r){return e&&e.toString().replace(r&&r.iri?u.PCT_ENCODED:c.PCT_ENCODED,H)}var ue={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=pe(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),n=l(t,2),o=n[0],a=n[1];e.path=o&&"/"!==o?o:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},de={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},he={},ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",me=t(t("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+t("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+t("%"+ye+ye)),ge="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ee=new RegExp(ve,"g"),Se=new RegExp(me,"g"),Oe=new RegExp(r("[^]",ge,"[\\.]",'[\\"]',be),"g"),Ce=new RegExp(r("[^]",ve,we),"g"),Ae=Ce;function Ie(e){var r=H(e);return r.match(Ee)?r:e}var Te={scheme:"mailto",parse:function(e,r){var t=e,n=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,a={},i=t.query.split("&"),s=0,c=i.length;s<c;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),p=0,f=l.length;p<f;++p)n.push(l[p]);break;case"subject":t.subject=ce(u[1],r);break;case"body":t.body=ce(u[1],r);break;default:o=!0,a[ce(u[0],r)]=ce(u[1],r)}}o&&(t.headers=a)}t.query=void 0;for(var d=0,h=n.length;d<h;++d){var v=n[d].split("@");if(v[0]=ce(v[0]),r.unicodeSupport)v[1]=ce(v[1],r).toLowerCase();else try{v[1]=q.toASCII(ce(v[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[d]=v.join("@")}return t},serialize:function(e,r){var t=e,n=a(e.to);if(n){for(var i=0,s=n.length;i<s;++i){var c=String(n[i]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(Se,Ie).replace(Se,o).replace(Oe,L),p=c.slice(u+1);try{p=r.iri?q.toUnicode(p):q.toASCII(ce(p,r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=l+"@"+p}t.path=n.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var d=[];for(var h in f)f[h]!==he[h]&&d.push(h.replace(Se,Ie).replace(Se,o).replace(Ce,L)+"="+f[h].replace(Se,Ie).replace(Se,o).replace(Ae,L));return d.length&&(t.query=d.join("&")),t}},je=/^([^\:]+)\:(.*)/,xe={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(je),n=e;if(t){var o=r.scheme||n.scheme||"urn",a=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||a),c=z[s];n.nid=a,n.nss=i,n.path=void 0,c&&(n=c.parse(n,r))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",n=e.nid,o=t+":"+(r.nid||n),a=z[o];a&&(e=a.serialize(e,r));var i=e,s=e.nss;return i.path=(n||r.nid)+":"+s,i}},$e=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,De={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match($e)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};z[ue.scheme]=ue,z[le.scheme]=le,z[fe.scheme]=fe,z[de.scheme]=de,z[Te.scheme]=Te,z[xe.scheme]=xe,z[De.scheme]=De,e.SCHEMES=z,e.pctEncChar=L,e.pctDecChars=H,e.parse=W,e.removeDotSegments=re,e.serialize=te,e.resolveComponents=ne,e.resolve=oe,e.normalize=ae,e.equal=ie,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(a.exports);const i=a.exports,s={null:e=>null===e,boolean:e=>"boolean"==typeof e,object:e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,array:e=>Array.isArray(e),number:e=>"number"==typeof e,integer:e=>Number.isInteger(e),string:e=>"string"==typeof e};var c={jsonTypeOf:(e,r)=>s[r](e),resolveUrl:(e,r)=>{const t=i.resolve(e,r,{iri:!0});if(i.resolve(e,"",{iri:!0})&&"file"===i.parse(t).scheme&&"file"!==i.parse(e).scheme)throw Error(`Can't access file '${t}' resource from network context '${e}'`);return t},urlFragment:e=>i.unescapeComponent(i.parse(e).fragment)||"",pathRelative:(e,r)=>{if(e===r)return"";let t=1;const n=e.length-1,o=r.length-t,a=n<o?n:o;let i=-1,s=0;for(;s<a;s++){const n=e.charCodeAt(s+1);if(n!==r.charCodeAt(t+s))break;47===n&&(i=s)}if(o>a){if(47===r.charCodeAt(t+s))return r.slice(t+s+1);if(0===s)return r.slice(t+s)}n>a&&(47===e.charCodeAt(s+1)?i=s:0===a&&(i=0));let c="";for(s=i+2;s<=e.length;++s)s!==e.length&&47!==e.charCodeAt(s)||(c+=0===c.length?"..":"/..");return t+=i,c.length>0?`${c}${r.slice(t,r.length)}`:(47===r.charCodeAt(t)&&++t,r.slice(t,r.length))}};const u=r,l=e=>{if(e.length>0&&"/"!==e[0])throw Error("Invalid JSON Pointer");return e.split("/").slice(1).map(m)},p=(e,r,t,n)=>{if(0===e.length)return t;if(e.length>1){const o=e.shift();return{...r,[o]:p(e,b(r,o,n),t,v(o,n))}}if(Array.isArray(r)){const n=[...r];return n[g(r,e[0])]=t,n}return"object"==typeof r&&null!==r?{...r,[e[0]]:t}:b(r,e[0],n)},f=(e,r,t,n)=>{if(0!==e.length)if(1!==e.length||w(r)){const o=e.shift();f(e,b(r,o,n),t,v(o,n))}else{r[g(r,e[0])]=t}},d=(e,r,t)=>{if(0!=e.length){if(e.length>1){const n=e.shift(),o=b(r,n,t);return{...r,[n]:d(e,o,v(n,t))}}if(Array.isArray(r))return r.filter(((r,t)=>t!=e[0]));if("object"==typeof r&&null!==r){const{[e[0]]:t,...n}=r;return n}return b(r,e[0],t)}},h=(e,r,t)=>{if(0!==e.length)if(e.length>1){const n=e.shift(),o=b(r,n,t);h(e,o,v(n,t))}else Array.isArray(r)?r.splice(e[0],1):"object"==typeof r&&null!==r?delete r[e[0]]:b(r,e[0],t)},v=u(((e,r)=>r+"/"+y(e))),y=e=>e.toString().replace(/~/g,"~0").replace(/\//g,"~1"),m=e=>e.toString().replace(/~1/g,"/").replace(/~0/g,"~"),g=(e,r)=>Array.isArray(e)&&"-"===r?e.length:r,b=(e,r,t="")=>{if(void 0===e)throw TypeError(`Value at '${t}' is undefined and does not have property '${r}'`);if(null===e)throw TypeError(`Value at '${t}' is null and does not have property '${r}'`);if(w(e))throw TypeError(`Value at '${t}' is a ${typeof e} and does not have property '${r}'`);return e[g(e,r)]},w=e=>null===e||"object"!=typeof e;var E={nil:"",append:v,get:(e,r)=>{const t=l(e),n=e=>t.reduce((([e,r],t)=>[b(e,t,r),v(t,r)]),[e,""])[0];return void 0===r?n:n(r)},set:(e,r,t)=>{const n=l(e),o=u(((e,r)=>p(n,e,r,"")));return void 0===r?o:o(r,t)},assign:(e,r,t)=>{const n=l(e),o=u(((e,r)=>f(n,e,r,"")));return void 0===r?o:o(r,t)},unset:(e,r)=>{const t=l(e),n=e=>d(t,e,"");return void 0===r?n:n(r)},remove:(e,r)=>{const t=l(e),n=e=>h(t,e,"");return void 0===r?n:n(r)}};const S=Symbol("$__value"),O=Symbol("$__href");var C={cons:(e,r)=>Object.freeze({[O]:e,[S]:r}),isReference:e=>e&&void 0!==e[O],href:e=>e[O],value:e=>e[S]};const A=E,I=r,{resolveUrl:T,jsonTypeOf:j}=c,x=C,$=Object.freeze({id:"",pointer:"",instance:void 0,value:void 0}),D=e=>x.isReference(e.value)?x.value(e.value):e.value,P=I(((e,r)=>j(D(e),r))),N=(e,r)=>Object.freeze({...r,pointer:A.append(e,r.pointer),value:D(r)[e]}),R=I(((e,r)=>D(r).map(((t,n,o,a)=>e(N(n,r),n,o,a))))),F=I(((e,r)=>D(r).forEach(((t,n,o,a)=>e(N(n,r),n,o,a))))),_=I(((e,r)=>D(r).map(((e,t,n,o)=>N(t,r))).filter(((r,t,n,o)=>e(r,t,n,o))))),U=I(((e,r,t)=>D(t).reduce(((r,n,o)=>e(r,N(o,t),o)),r))),k=I(((e,r)=>D(r).every(((t,n,o,a)=>e(N(n,r),n,o,a))))),q=I(((e,r)=>D(r).some(((t,n,o,a)=>e(N(n,r),n,o,a)))));var z={nil:$,cons:(e,r="")=>Object.freeze({...$,id:T(r,""),instance:e,value:e}),get:(e,r=$)=>{if(!e.startsWith("#"))throw Error(`No JSON document found at '${e.split("#")[0]}'`);return Object.freeze({...r,pointer:e.substr(1)})},uri:e=>`${e.id}#${encodeURI(e.pointer)}`,value:D,has:(e,r)=>e in D(r),typeOf:P,length:e=>D(e).length,step:N,entries:e=>Object.keys(D(e)).map((r=>[r,N(r,e)])),keys:e=>Object.keys(D(e)),map:R,forEach:F,filter:_,reduce:U,every:k,some:q},L=async e=>Object.entries(await e);var H=r((async(e,r)=>(await r).map(e)));var V=r((async(e,r,t)=>(await t).reduce((async(r,t)=>e(await r,t)),r)));const M=V;var K=r((async(e,r,t={})=>M((async(r,t)=>await e(t)?r.concat([t]):r),[],r,t)));const Z=H;var J=r((async(e,r)=>{const t=await Z(e,r);return(await Promise.all(t)).some((e=>e))}));const B=H;var W=r((async(e,r)=>{const t=await B(e,r);return(await Promise.all(t)).every((e=>e))}));var G=r(((e,r)=>e.reduce((async(e,r)=>r(await e)),r)));const Q=G,Y=L,X=V;var ee={entries:L,map:H,filter:K,reduce:V,some:J,every:W,pipeline:G,all:e=>Promise.all(e),allValues:e=>Q([Y,X((async(e,[r,t])=>(e[r]=await t,e)),{})],e)},re=fetch,te={},ne=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,oe=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,ae=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,ie=/\\([\u000b\u0020-\u00ff])/g,se=/([\\"])/g,ce=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function ue(e){var r=String(e);if(ae.test(r))return r;if(r.length>0&&!oe.test(r))throw new TypeError("invalid parameter value");return'"'+r.replace(se,"\\$1")+'"'}function le(e){this.parameters=Object.create(null),this.type=e}te.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var r=e.parameters,t=e.type;if(!t||!ce.test(t))throw new TypeError("invalid type");var n=t;if(r&&"object"==typeof r)for(var o,a=Object.keys(r).sort(),i=0;i<a.length;i++){if(o=a[i],!ae.test(o))throw new TypeError("invalid parameter name");n+="; "+o+"="+ue(r[o])}return n},te.parse=function(e){if(!e)throw new TypeError("argument string is required");var r="object"==typeof e?function(e){var r;"function"==typeof e.getHeader?r=e.getHeader("content-type"):"object"==typeof e.headers&&(r=e.headers&&e.headers["content-type"]);if("string"!=typeof r)throw new TypeError("content-type header is missing from object");return r}(e):e;if("string"!=typeof r)throw new TypeError("argument string is required to be a string");var t=r.indexOf(";"),n=-1!==t?r.substr(0,t).trim():r.trim();if(!ce.test(n))throw new TypeError("invalid media type");var o=new le(n.toLowerCase());if(-1!==t){var a,i,s;for(ne.lastIndex=t;i=ne.exec(r);){if(i.index!==t)throw new TypeError("invalid parameter format");t+=i[0].length,a=i[1].toLowerCase(),'"'===(s=i[2])[0]&&(s=s.substr(1,s.length-2).replace(ie,"$1")),o.parameters[a]=s}if(t!==r.length)throw new TypeError("invalid parameter format")}return o};const pe=te,fe={};var de={addPlugin:(e,r)=>{fe[e]=r},parse:e=>{const r=pe.parse(e.headers.get("content-type"));if(!(r.type in fe))throw Error(`${e.url} is not a schema. Found a document with media type: ${r.type}`);return fe[r.type].parse(e,r.parameters)},getContentType:e=>{for(const r in fe)if(fe[r].matcher(e))return r;return"application/octet-stream"}};const he=r,ve=ee,ye=E,{jsonTypeOf:me,resolveUrl:ge,urlFragment:be,pathRelative:we}=c,Ee=re,Se=C,Oe=de,Ce="https://json-schema.org/draft/2019-09/vocab/core",Ae="https://json-schema.org/draft/2020-12/vocab/core",Ie={},Te={},je=(e,r)=>{const t=Te[e];return Ie[t]?.[r]},xe={},$e={},De=(e,r="",t="")=>{e=JSON.parse(JSON.stringify(e));const n=ge(r,""),o=ge(e.$schema||t,"");if(!o)throw Error("Couldn't determine schema dialect");if(delete e.$schema,!(o in Te))if(!0===e?.$vocabulary?.[Ce]&&o===Pe(e,n,Ce)[0])Te[o]=Ce;else if(!0===e?.$vocabulary?.[Ae]&&o===Pe(e,n,Ae)[0])Te[o]=Ae;else{const e=xe[o];if(!e)throw Error(`Couldn't determine JSON Schema version for dialect: '${o}'`);!0===e.vocabulary[Ce]?Te[o]=Ce:!0===e.vocabulary[Ae]?Te[o]=Ae:Te[o]=Te[e.dialectId]}const[a,i]=Pe(e,n,Te[o]);if(!a)throw Error("Couldn't determine an identifier for the schema");const s=je(o,"baseToken");delete e[s],n&&($e[n]=a);const c=je(o,"anchorToken");i&&s===c&&(e[c]=c!==s?encodeURI(i):`#${encodeURI(i)}`);const u={},l=je(o,"recursiveAnchorToken");let p;!0===e[l]&&(u[""]=`${a}#`,e[c]="",delete e[l]);const f=je(o,"vocabularyToken");me(e[f],"object")?(p=e[f],delete e[f]):p={[Te[o]]:!0};const d={"":""};return xe[a]={id:a,dialectId:o,schema:Ne(e,a,o,ye.nil,d,u),anchors:d,dynamicAnchors:u,vocabulary:p,validated:!1},a},Pe=(e,r,t)=>{const n=Ie[t]?.baseToken,o=ge(r,e[n]||"");return[ge(o,""),be(o)]},Ne=(e,r,t,n,o,a)=>{if(me(e,"object")){const i="string"==typeof e.$schema?ge(e.$schema,""):t,s=je(i,"embeddedToken"),c=je(i,"anchorToken");if("string"==typeof e[s]&&(s!==c||"#"!==e[s][0])){const n=ge(r,e[s]);return e[je(i,"baseToken")]=n,De(e,n,t),Se.cons(e[s],e)}const u=je(t,"anchorToken"),l=je(t,"dynamicAnchorToken");"string"==typeof e[l]&&(a[e[l]]=`${r}#${encodeURI(n)}`,o[e[l]]=n,delete e[l]);const p=je(t,"embeddedToken");if("string"==typeof e[u]){const r=u!==p?e[u]:e[u].slice(1);o[r]=n,delete e[u]}const f=je(t,"jrefToken");if("string"==typeof e[f])return Se.cons(e[f],e);for(const i in e)e[i]=Ne(e[i],r,t,ye.append(i,n),o,a);return e}return Array.isArray(e)?e.map(((e,i)=>Ne(e,r,t,ye.append(i,n),o,a))):e},Re=e=>xe[$e[e]]||xe[e],Fe=Object.freeze({id:"",dialectId:void 0,vocabulary:{},pointer:ye.nil,schema:void 0,value:void 0,anchors:{},dynamicAnchors:{},validated:!0}),_e=async(e,r=Fe)=>{const t=ge(qe(r),e),n=ge(t,""),o=be(t);if(!(e=>e in xe||e in $e)(n)){const e=await Ee(n,{headers:{Accept:"application/schema+json"}});if(e.status>=400)throw await e.text(),Error(`Failed to retrieve schema with id: ${n}`);const[r,t]=await Oe.parse(e),o=ge(r.$schema,"")||t;n===o||o in Te||await _e(o),De(r,n)}const a=Re(n),i="/"!==o[0]?ke(a,o):o,s=Object.freeze({...a,pointer:i,value:ye.get(i,a.schema)});return Ue(s)},Ue=e=>Se.isReference(e.value)?_e(Se.href(e.value),e):e,ke=(e,r)=>{if(!(r in e.anchors))throw Error(`No such anchor '${encodeURI(e.id)}#${encodeURI(r)}'`);return e.anchors[r]},qe=e=>`${e.id}#${encodeURI(e.pointer)}`,ze=e=>Se.isReference(e.value)?Se.value(e.value):e.value,Le=(e,r)=>{const t=Re(r.id),n=Object.freeze({...r,pointer:ye.append(e,r.pointer),value:ze(r)[e],validated:t.validated});return Ue(n)},He=he(((e,r)=>ve.pipeline([ze,ve.map((async(t,n)=>e(await Le(n,r),n))),ve.all],r))),Ve={parentId:"",parentDialect:"",includeEmbedded:!0},Me=(e,r)=>{if(r.startsWith("file://")){const t=e.slice(7,e.lastIndexOf("/"));return""===e?"":we(t,r.slice(7))}return r};var Ke={setConfig:(e,r,t)=>{Te[e]=e,Ie[e]||(Ie[e]={}),Ie[e][r]=t},getConfig:je,add:De,get:_e,markValidated:e=>{xe[e].validated=!0},uri:qe,value:ze,getAnchorPointer:ke,typeOf:(e,r)=>me(ze(e),r),has:(e,r)=>e in ze(r),step:Le,keys:e=>Object.keys(ze(e)),entries:e=>ve.pipeline([ze,Object.keys,ve.map((async r=>[r,await Le(r,e)])),ve.all],e),map:He,length:e=>ze(e).length,toSchema:(e,r={})=>{const t={...Ve,...r},n=JSON.parse(JSON.stringify(e.schema,((r,n)=>{if(!Se.isReference(n))return n;const o=Se.value(n),a="string"==typeof o.$schema?ge(o.$schema,""):e.dialectId,i=je(a,"embeddedToken");return!t.includeEmbedded&&i in o?void 0:Se.value(n)}))),o=je(e.dialectId,"dynamicAnchorToken");Object.entries(e.dynamicAnchors).forEach((([e,r])=>{const t=be(r);ye.assign(t,n,{[o]:e,...ye.get(t,n)})}));const a=je(e.dialectId,"anchorToken");Object.entries(e.anchors).filter((([e])=>""!==e)).forEach((([e,r])=>{ye.assign(r,n,{[a]:e,...ye.get(r,n)})}));const i=je(e.dialectId,"baseToken"),s=Me(t.parentId,e.id),c=t.parentDialect===e.dialectId?"":e.dialectId;return{...s&&{[i]:s},...c&&{$schema:c},...n}}};class Ze extends Error{constructor(e){super("Invalid Schema"),this.name=this.constructor.name,this.output=e}}var Je=Ze;const Be=Ke;var We={compile:e=>Be.value(e),interpret:()=>!0};const Ge=r,Qe=o.exports,{resolveUrl:Ye}=c,Xe=z,er=Ke,rr=Je,tr=de,nr=We,or="FLAG",ar="BASIC",ir="DETAILED",sr="VERBOSE";let cr=ir,ur=!0;tr.addPlugin("application/schema+json",{parse:async(e,r)=>[await e.json(),r.schema||r.profile],matcher:e=>e.endsWith(".schema.json")});const lr=async e=>{const r={metaData:{}};return{ast:r,schemaUri:await gr(e,r)}},pr=Ge((({ast:e,schemaUri:r},t,n=or)=>{if(![or,ar,ir,sr].includes(n))throw Error(`The '${n}' error format is not supported`);const o=[],a=Qe.subscribe("result",fr(n,o));return wr(r,t,e,{}),Qe.unsubscribe(a),o[0]})),fr=(e,r)=>{const t=[];return(n,o)=>{if("result"===n){const{keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a}=o,i={keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a,errors:[]};t.push(i)}else if("result.start"===n)t.push(n);else if("result.end"===n){const n=t.pop();for(;"result.start"!==t[t.length-1];){const r=t.pop(),o=[r];e===ar&&(o.push(...r.errors),delete r.errors),(e===sr||e!==or&&!r.valid)&&n.errors.unshift(...o)}t[t.length-1]=n,r[0]=n}}},dr={},hr=e=>dr[e]||nr,vr=e=>e in dr,yr={},mr={},gr=async(e,r)=>{if(e=await br(e),!vr(`${e.dialectId}#validate`)){const r=await er.get(e.dialectId);(er.getConfig(r.id,"mandatoryVocabularies")||[]).forEach((e=>{if(!r.vocabulary[e])throw Error(`Vocabulary '${e}' must be explicitly declared and required`)})),Object.entries(r.vocabulary).forEach((([e,t])=>{if(e in yr)Object.entries(yr[e]).forEach((([e,t])=>{((e,r)=>{dr[e]={collectEvaluatedItems:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&new Set,collectEvaluatedProperties:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&[],...r}})(`${r.id}#${e}`,t)}));else if(t)throw Error(`Missing required vocabulary: ${e}`)}))}if(ur&&!e.validated){if(er.markValidated(e.id),!(e.dialectId in mr)){const r=await er.get(e.dialectId),t=await lr(r);mr[r.id]=pr(t)}const r=Xe.cons(e.schema,e.id),t=mr[e.dialectId](r,cr);if(!t.valid)throw new rr(t)}return e.id in r.metaData||(r.metaData[e.id]={id:e.id,dynamicAnchors:e.dynamicAnchors,anchors:e.anchors}),hr(`${e.dialectId}#validate`).compile(e,r)},br=async e=>er.typeOf(e,"string")?br(await er.get(er.value(e),e)):e,wr=(e,r,t,n)=>{const o=Er(e,t),a=Ye(e,"");return hr(o).interpret(e,r,t,{...t.metaData[a].dynamicAnchors,...n})},Er=(e,r)=>{if(!(e in r))throw Error(`No schema found at ${e}`);return r[e][0]};var Sr={validate:async(e,r,t)=>{const n=await lr(e),o=(e,r)=>pr(n,Xe.cons(e),r);return void 0===r?o:o(r,t)},compile:lr,interpret:pr,setMetaOutputFormat:e=>{cr=e},setShouldMetaValidate:e=>{ur=e},FLAG:or,BASIC:ar,DETAILED:ir,VERBOSE:sr,add:(e,r="",t="")=>{const n=er.add(e,r,t);delete mr[n]},getKeyword:hr,hasKeyword:vr,defineVocabulary:(e,r)=>{yr[e]=r},compileSchema:gr,interpretSchema:wr,collectEvaluatedProperties:(e,r,t,n,o)=>{const a=Er(e,t);return hr(a).collectEvaluatedProperties(e,r,t,n,o)},collectEvaluatedItems:(e,r,t,n,o)=>{const a=Er(e,t);return hr(a).collectEvaluatedItems(e,r,t,n,o)},addMediaTypePlugin:tr.addPlugin};const Or=ee,Cr=o.exports,Ar=Sr,Ir=z,Tr=Ke;var jr={compile:async(e,r)=>{const t=Tr.uri(e);if(!(t in r)){r[t]=!1;const n=Tr.value(e);if(!["object","boolean"].includes(typeof n))throw Error(`No schema found at '${Tr.uri(e)}'`);r[t]=[`${e.dialectId}#validate`,Tr.uri(e),"boolean"==typeof n?n:await Or.pipeline([Tr.entries,Or.map((([r,t])=>[`${e.dialectId}#${r}`,t])),Or.filter((([r])=>r!==`${e.dialectId}#validate`)),Or.map((async([t,n])=>{const o=await Ar.getKeyword(t).compile(n,r,e);return[t,Tr.uri(n),o]})),Or.all],e)]}return t},interpret:(e,r,t,n)=>{const[o,a,i]=t[e];Cr.publishSync("result.start");const s="boolean"==typeof i?i:i.every((([e,o,a])=>{Cr.publishSync("result.start");const i=Ar.getKeyword(e).interpret(a,r,t,n);return Cr.publishSync("result",{keyword:e,absoluteKeywordLocation:o,instanceLocation:Ir.uri(r),valid:i,ast:a}),Cr.publishSync("result.end"),i}));return Cr.publishSync("result",{keyword:o,absoluteKeywordLocation:a,instanceLocation:Ir.uri(r),valid:s,ast:e}),Cr.publishSync("result.end"),s},collectEvaluatedProperties:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&[]:a.filter((([e])=>!o||!e.endsWith("#unevaluatedProperties"))).reduce(((e,[o,,a])=>{const i=e&&Ar.getKeyword(o).collectEvaluatedProperties(a,r,t,n);return!1!==i&&[...e,...i]}),[])},collectEvaluatedItems:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&new Set:a.filter((([e])=>!o||!e.endsWith("#unevaluatedItems"))).reduce(((e,[o,,a])=>{const i=!1!==e&&Ar.getKeyword(o).collectEvaluatedItems(a,r,t,n);return!1!==i&&new Set([...e,...i])}),new Set)}};var xr={Core:Sr,Schema:Ke,Instance:z,Reference:C,Keywords:{metaData:We,validate:jr},InvalidSchemaError:Je};export{xr as default}; | ||
//# sourceMappingURL=json-schema-core-esm.min.js.map |
@@ -1,9 +0,3 @@ | ||
var JSC=function(e){"use strict";var r=function(e,r){return function t(){null==r&&(r=e.length);var n=[].slice.call(arguments);return n.length>=r?e.apply(this,n):function(){return t.apply(this,n.concat([].slice.call(arguments)))}}};var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e,r){return e(r={exports:{}},r.exports),r.exports}var o=n((function(e,r){var n,o;n="object"==typeof window&&window||t,o={},n.PubSub?(o=n.PubSub,console.warn("PubSub already loaded, using existing version")):(n.PubSub=o,function(e){var r={},t=-1,n="*";function o(e){var r;for(r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!0;return!1}function a(e){return function(){throw e}}function i(e,r,t){try{e(r,t)}catch(e){setTimeout(a(e),0)}}function s(e,r,t){e(r,t)}function c(e,t,n,o){var a,c=r[t],u=o?s:i;if(Object.prototype.hasOwnProperty.call(r,t))for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&u(c[a],e,n)}function u(e,r,t){return function(){var o=String(e),a=o.lastIndexOf(".");for(c(e,e,r,t);-1!==a;)a=(o=o.substr(0,a)).lastIndexOf("."),c(e,o,r,t);c(e,n,r,t)}}function l(e){var t=String(e);return Boolean(Object.prototype.hasOwnProperty.call(r,t)&&o(r[t]))}function p(e){for(var r=String(e),t=l(r)||l(n),o=r.lastIndexOf(".");!t&&-1!==o;)o=(r=r.substr(0,o)).lastIndexOf("."),t=l(r);return t}function f(e,r,t,n){var o=u(e="symbol"==typeof e?e.toString():e,r,n);return!!p(e)&&(!0===t?o():setTimeout(o,0),!0)}e.publish=function(r,t){return f(r,t,!1,e.immediateExceptions)},e.publishSync=function(r,t){return f(r,t,!0,e.immediateExceptions)},e.subscribe=function(e,n){if("function"!=typeof n)return!1;e="symbol"==typeof e?e.toString():e,Object.prototype.hasOwnProperty.call(r,e)||(r[e]={});var o="uid_"+String(++t);return r[e][o]=n,o},e.subscribeAll=function(r){return e.subscribe(n,r)},e.subscribeOnce=function(r,t){var n=e.subscribe(r,(function(){e.unsubscribe(n),t.apply(this,arguments)}));return e},e.clearAllSubscriptions=function(){r={}},e.clearSubscriptions=function(e){var t;for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&delete r[t]},e.countSubscriptions=function(e){var t,n,o=0;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)){for(n in r[t])o++;break}return o},e.getSubscriptions=function(e){var t,n=[];for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&n.push(t);return n},e.unsubscribe=function(t){var n,o,a,i=function(e){var t;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e))return!0;return!1},s="string"==typeof t&&(Object.prototype.hasOwnProperty.call(r,t)||i(t)),c=!s&&"string"==typeof t,u="function"==typeof t,l=!1;if(!s){for(n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(o=r[n],c&&o[t]){delete o[t],l=t;break}if(u)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&o[a]===t&&(delete o[a],l=!0)}return l}e.clearSubscriptions(t)}}(o)),void 0!==e&&e.exports&&(r=e.exports=o),r.PubSub=o,e.exports=r=o}));o.PubSub;var a,i=n((function(e,r){ | ||
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ | ||
!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var n=r.length-1,o=1;o<n;++o)r[o]=r[o].slice(1,-1);return r[n]=r[n].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,r){var t=e;if(r)for(var n in r)t[n]=r[n];return t}function s(e){var n="[A-Za-z]",o="[0-9]",a=r(o,"[A-Fa-f]"),i=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=r("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=r(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t(n+r(n,o,"[\\+\\-\\.]")+"*"),t(t(i+"|"+r(l,s,"[\\:]"))+"*");var p=t(t("25[0-5]")+"|"+t("2[0-4]"+o)+"|"+t("1"+o+o)+"|"+t("0?[1-9]"+o)+"|0?0?"+o),f=t(p+"\\."+p+"\\."+p+"\\."+p),d=t(a+"{1,4}"),h=t(t(d+"\\:"+d)+"|"+f),v=t(t(d+"\\:")+"{6}"+h),y=t("\\:\\:"+t(d+"\\:")+"{5}"+h),m=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+h),g=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+h),b=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+h),w=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+h),E=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+h),S=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),C=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),O=t([v,y,m,g,b,w,E,S,C].join("|")),A=t(t(l+"|"+i)+"+");t("[vV]"+a+"+\\."+r(l,s,"[\\:]")+"+"),t(t(i+"|"+r(l,s))+"*");var I=t(i+"|"+r(l,s,"[\\:\\@]"));return t(t(i+"|"+r(l,s,"[\\@]"))+"+"),t(t(I+"|"+r("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(r("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+O+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+A+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,r){var t=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)},f=2147483647,d=36,h=1,v=26,y=38,m=700,g=72,b=128,w="-",E=/^xn--/,S=/[^\0-\x7E]/,C=/[\x2E\u3002\uFF0E\uFF61]/g,O={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=d-h,I=Math.floor,j=String.fromCharCode;function T(e){throw new RangeError(O[e])}function x(e,r){for(var t=[],n=e.length;n--;)t[n]=r(e[n]);return t}function P(e,r){var t=e.split("@"),n="";return t.length>1&&(n=t[0]+"@",e=t[1]),n+x((e=e.replace(C,".")).split("."),r).join(".")}function $(e){for(var r=[],t=0,n=e.length;t<n;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<n){var a=e.charCodeAt(t++);56320==(64512&a)?r.push(((1023&o)<<10)+(1023&a)+65536):(r.push(o),t--)}else r.push(o)}return r}var D=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:d},R=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},N=function(e,r,t){var n=0;for(e=t?I(e/m):e>>1,e+=I(e/r);e>A*v>>1;n+=d)e=I(e/A);return I(n+(A+1)*e/(e+y))},_=function(e){var r=[],t=e.length,n=0,o=b,a=g,i=e.lastIndexOf(w);i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&T("not-basic"),r.push(e.charCodeAt(s));for(var c=i>0?i+1:0;c<t;){for(var u=n,l=1,p=d;;p+=d){c>=t&&T("invalid-input");var y=D(e.charCodeAt(c++));(y>=d||y>I((f-n)/l))&&T("overflow"),n+=y*l;var m=p<=a?h:p>=a+v?v:p-a;if(y<m)break;var E=d-m;l>I(f/E)&&T("overflow"),l*=E}var S=r.length+1;a=N(n-u,S,0==u),I(n/S)>f-o&&T("overflow"),o+=I(n/S),n%=S,r.splice(n++,0,o)}return String.fromCodePoint.apply(String,r)},F=function(e){var r=[],t=(e=$(e)).length,n=b,o=0,a=g,i=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var p=u.value;p<128&&r.push(j(p))}}catch(e){s=!0,c=e}finally{try{!i&&l.return&&l.return()}finally{if(s)throw c}}var y=r.length,m=y;for(y&&r.push(w);m<t;){var E=f,S=!0,C=!1,O=void 0;try{for(var A,x=e[Symbol.iterator]();!(S=(A=x.next()).done);S=!0){var P=A.value;P>=n&&P<E&&(E=P)}}catch(e){C=!0,O=e}finally{try{!S&&x.return&&x.return()}finally{if(C)throw O}}var D=m+1;E-n>I((f-o)/D)&&T("overflow"),o+=(E-n)*D,n=E;var _=!0,F=!1,k=void 0;try{for(var U,q=e[Symbol.iterator]();!(_=(U=q.next()).done);_=!0){var L=U.value;if(L<n&&++o>f&&T("overflow"),L==n){for(var z=o,H=d;;H+=d){var V=H<=a?h:H>=a+v?v:H-a;if(z<V)break;var M=z-V,K=d-V;r.push(j(R(V+M%K,0))),z=I(M/K)}r.push(j(R(z,0))),a=N(o,D,m==y),o=0,++m}}}catch(e){F=!0,k=e}finally{try{!_&&q.return&&q.return()}finally{if(F)throw k}}++o,++n}return r.join("")},k=function(e){return P(e,(function(e){return E.test(e)?_(e.slice(4).toLowerCase()):e}))},U=function(e){return P(e,(function(e){return S.test(e)?"xn--"+F(e):e}))},q={version:"2.1.0",ucs2:{decode:$,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:_,encode:F,toASCII:U,toUnicode:k},L={};function z(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function H(e){for(var r="",t=0,n=e.length;t<n;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(n-t>=6){var a=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(n-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function V(e,r){function t(e){var t=H(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,z).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,z).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,z).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,z).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,z).replace(r.PCT_ENCODED,o)),e}function M(e){return e.replace(/^0*(.*)/,"$1")||"0"}function K(e,r){var t=e.match(r.IPV4ADDRESS)||[],n=l(t,2)[1];return n?n.split(".").map(M).join("."):e}function Z(e,r){var t=e.match(r.IPV6ADDRESS)||[],n=l(t,3),o=n[1],a=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],p=u?u.split(":").map(M):[],f=c.split(":").map(M),d=r.IPV4ADDRESS.test(f[f.length-1]),h=d?7:8,v=f.length-h,y=Array(h),m=0;m<h;++m)y[m]=p[m]||f[v+m]||"";d&&(y[h-1]=K(y[h-1],r));var g=y.reduce((function(e,r,t){if(!r||"0"===r){var n=e[e.length-1];n&&n.index+n.length===t?n.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(g&&g.length>1){var w=y.slice(0,g.index),E=y.slice(g.index+g.length);b=w.join(":")+"::"+E.join(":")}else b=y.join(":");return a&&(b+="%"+a),b}return e}var J=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,B=void 0==="".match(/(){0}/)[1];function G(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},n=!1!==r.iri?u:c;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(J);if(o){B?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=Z(K(t.host,n),n)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var a=L[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)V(t,n);else{if(t.host&&(r.domainHost||a&&a.domainHost))try{t.host=q.toASCII(t.host.replace(n.PCT_ENCODED,H).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}V(t,c)}a&&a.parse&&a.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function W(e,r){var t=!1!==r.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(Z(K(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function re(e){for(var r=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(ee);if(!t)throw new Error("Unexpected dot segment condition");var n=t[0];e=e.slice(n.length),r.push(n)}return r.join("")}function te(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?u:c,n=[],o=L[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?q.toUnicode(e.host):q.toASCII(e.host.replace(t.PCT_ENCODED,H).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}V(e,t),"suffix"!==r.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=W(e,r);if(void 0!==a&&("suffix"!==r.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=re(i)),void 0===a&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=G(te(e,t),t),r=G(te(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(n.scheme=r.scheme,n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(r.path?("/"===r.path.charAt(0)?n.path=re(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:n.path=r.path:n.path="/"+r.path,n.path=re(n.path)),n.query=r.query):(n.path=e.path,void 0!==r.query?n.query=r.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=r.fragment,n}function oe(e,r,t){var n=i({scheme:"null"},t);return te(ne(G(e,n),G(r,n),n,!0),n)}function ae(e,r){return"string"==typeof e?e=te(G(e,r),r):"object"===n(e)&&(e=G(te(e,r),r)),e}function ie(e,r,t){return"string"==typeof e?e=te(G(e,t),t):"object"===n(e)&&(e=te(e,t)),"string"==typeof r?r=te(G(r,t),t):"object"===n(r)&&(r=te(r,t)),e===r}function se(e,r){return e&&e.toString().replace(r&&r.iri?u.ESCAPE:c.ESCAPE,z)}function ce(e,r){return e&&e.toString().replace(r&&r.iri?u.PCT_ENCODED:c.PCT_ENCODED,H)}var ue={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=pe(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),n=l(t,2),o=n[0],a=n[1];e.path=o&&"/"!==o?o:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},de={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},he={},ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",me=t(t("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+t("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+t("%"+ye+ye)),ge="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ee=new RegExp(ve,"g"),Se=new RegExp(me,"g"),Ce=new RegExp(r("[^]",ge,"[\\.]",'[\\"]',be),"g"),Oe=new RegExp(r("[^]",ve,we),"g"),Ae=Oe;function Ie(e){var r=H(e);return r.match(Ee)?r:e}var je={scheme:"mailto",parse:function(e,r){var t=e,n=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,a={},i=t.query.split("&"),s=0,c=i.length;s<c;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),p=0,f=l.length;p<f;++p)n.push(l[p]);break;case"subject":t.subject=ce(u[1],r);break;case"body":t.body=ce(u[1],r);break;default:o=!0,a[ce(u[0],r)]=ce(u[1],r)}}o&&(t.headers=a)}t.query=void 0;for(var d=0,h=n.length;d<h;++d){var v=n[d].split("@");if(v[0]=ce(v[0]),r.unicodeSupport)v[1]=ce(v[1],r).toLowerCase();else try{v[1]=q.toASCII(ce(v[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[d]=v.join("@")}return t},serialize:function(e,r){var t=e,n=a(e.to);if(n){for(var i=0,s=n.length;i<s;++i){var c=String(n[i]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(Se,Ie).replace(Se,o).replace(Ce,z),p=c.slice(u+1);try{p=r.iri?q.toUnicode(p):q.toASCII(ce(p,r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=l+"@"+p}t.path=n.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var d=[];for(var h in f)f[h]!==he[h]&&d.push(h.replace(Se,Ie).replace(Se,o).replace(Oe,z)+"="+f[h].replace(Se,Ie).replace(Se,o).replace(Ae,z));return d.length&&(t.query=d.join("&")),t}},Te=/^([^\:]+)\:(.*)/,xe={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(Te),n=e;if(t){var o=r.scheme||n.scheme||"urn",a=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||a),c=L[s];n.nid=a,n.nss=i,n.path=void 0,c&&(n=c.parse(n,r))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",n=e.nid,o=t+":"+(r.nid||n),a=L[o];a&&(e=a.serialize(e,r));var i=e,s=e.nss;return i.path=(n||r.nid)+":"+s,i}},Pe=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,$e={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match(Pe)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};L[ue.scheme]=ue,L[le.scheme]=le,L[fe.scheme]=fe,L[de.scheme]=de,L[je.scheme]=je,L[xe.scheme]=xe,L[$e.scheme]=$e,e.SCHEMES=L,e.pctEncChar=z,e.pctDecChars=H,e.parse=G,e.removeDotSegments=re,e.serialize=te,e.resolveComponents=ne,e.resolve=oe,e.normalize=ae,e.equal=ie,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(r)}));(a=i)&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")&&a.default;const s={null:e=>null===e,boolean:e=>"boolean"==typeof e,object:e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,array:e=>Array.isArray(e),number:e=>"number"==typeof e,integer:e=>Number.isInteger(e),string:e=>"string"==typeof e};var c={jsonTypeOf:(e,r)=>s[r](e),resolveUrl:(e,r)=>{const t=i.resolve(e,r,{iri:!0});if(i.resolve(e,"",{iri:!0})&&"file"===i.parse(t).scheme&&"file"!==i.parse(e).scheme)throw Error(`Can't access file '${t}' resource from network context '${e}'`);return t},urlFragment:e=>i.unescapeComponent(i.parse(e).fragment)||"",pathRelative:(e,r)=>{if(e===r)return"";let t=1;const n=e.length-1,o=r.length-t,a=n<o?n:o;let i=-1,s=0;for(;s<a;s++){const n=e.charCodeAt(s+1);if(n!==r.charCodeAt(t+s))break;47===n&&(i=s)}if(o>a){if(47===r.charCodeAt(t+s))return r.slice(t+s+1);if(0===s)return r.slice(t+s)}n>a&&(47===e.charCodeAt(s+1)?i=s:0===a&&(i=0));let c="";for(s=i+2;s<=e.length;++s)s!==e.length&&47!==e.charCodeAt(s)||(c+=0===c.length?"..":"/..");return t+=i,c.length>0?`${c}${r.slice(t,r.length)}`:(47===r.charCodeAt(t)&&++t,r.slice(t,r.length))}};const u=e=>{if(e.length>0&&"/"!==e[0])throw Error("Invalid JSON Pointer");return e.split("/").slice(1).map(y)},l=(e,r,t,n)=>{if(0===e.length)return t;if(e.length>1){const o=e.shift();return{...r,[o]:l(e,g(r,o,n),t,h(o,n))}}if(Array.isArray(r)){const n=[...r];return n[m(r,e[0])]=t,n}return"object"==typeof r&&null!==r?{...r,[e[0]]:t}:g(r,e[0],n)},p=(e,r,t,n)=>{if(0!==e.length)if(1!==e.length||b(r)){const o=e.shift();p(e,g(r,o,n),t,h(o,n))}else{r[m(r,e[0])]=t}},f=(e,r,t)=>{if(0!=e.length){if(e.length>1){const n=e.shift(),o=g(r,n,t);return{...r,[n]:f(e,o,h(n,t))}}if(Array.isArray(r))return r.filter(((r,t)=>t!=e[0]));if("object"==typeof r&&null!==r){const{[e[0]]:t,...n}=r;return n}return g(r,e[0],t)}},d=(e,r,t)=>{if(0!==e.length)if(e.length>1){const n=e.shift(),o=g(r,n,t);d(e,o,h(n,t))}else Array.isArray(r)?r.splice(e[0],1):"object"==typeof r&&null!==r?delete r[e[0]]:g(r,e[0],t)},h=r(((e,r)=>r+"/"+v(e))),v=e=>e.toString().replace(/~/g,"~0").replace(/\//g,"~1"),y=e=>e.toString().replace(/~1/g,"/").replace(/~0/g,"~"),m=(e,r)=>Array.isArray(e)&&"-"===r?e.length:r,g=(e,r,t="")=>{if(void 0===e)throw TypeError(`Value at '${t}' is undefined and does not have property '${r}'`);if(null===e)throw TypeError(`Value at '${t}' is null and does not have property '${r}'`);if(b(e))throw TypeError(`Value at '${t}' is a ${typeof e} and does not have property '${r}'`);return e[m(e,r)]},b=e=>null===e||"object"!=typeof e;var w={nil:"",append:h,get:(e,r)=>{const t=u(e),n=e=>t.reduce((([e,r],t)=>[g(e,t,r),h(t,r)]),[e,""])[0];return void 0===r?n:n(r)},set:(e,t,n)=>{const o=u(e),a=r(((e,r)=>l(o,e,r,"")));return void 0===t?a:a(t,n)},assign:(e,t,n)=>{const o=u(e),a=r(((e,r)=>p(o,e,r,"")));return void 0===t?a:a(t,n)},unset:(e,r)=>{const t=u(e),n=e=>f(t,e,"");return void 0===r?n:n(r)},remove:(e,r)=>{const t=u(e),n=e=>d(t,e,"");return void 0===r?n:n(r)}};w.nil,w.append,w.get,w.set,w.assign,w.unset,w.remove;const E=Symbol("$__value"),S=Symbol("$__href");var C={cons:(e,r)=>Object.freeze({[S]:e,[E]:r}),isReference:e=>e&&void 0!==e[S],href:e=>e[S],value:e=>e[E]};const{resolveUrl:O,jsonTypeOf:A}=c,I=Object.freeze({id:"",pointer:"",instance:void 0,value:void 0}),j=e=>C.isReference(e.value)?C.value(e.value):e.value,T=r(((e,r)=>A(j(e),r))),x=(e,r)=>Object.freeze({...r,pointer:w.append(e,r.pointer),value:j(r)[e]}),P=r(((e,r)=>j(r).map(((t,n,o,a)=>e(x(n,r),n,o,a))))),$=r(((e,r)=>j(r).map(((e,t,n,o)=>x(t,r))).filter(((r,t,n,o)=>e(r,t,n,o))))),D=r(((e,r,t)=>j(t).reduce(((r,n,o)=>e(r,x(o,t),o)),r))),R=r(((e,r)=>j(r).every(((t,n,o,a)=>e(x(n,r),n,o,a))))),N=r(((e,r)=>j(r).some(((t,n,o,a)=>e(x(n,r),n,o,a)))));var _={nil:I,cons:(e,r="")=>Object.freeze({...I,id:O(r,""),instance:e,value:e}),uri:e=>`${e.id}#${encodeURI(e.pointer)}`,value:j,has:(e,r)=>e in j(r),typeOf:T,step:x,entries:e=>Object.keys(j(e)).map((r=>[r,x(r,e)])),keys:e=>Object.keys(j(e)),map:P,filter:$,reduce:D,every:R,some:N,length:e=>j(e).length},F=async e=>Object.entries(await e),k=r((async(e,r)=>(await r).map(e))),U=r((async(e,r,t)=>(await t).reduce((async(r,t)=>e(await r,t)),r))),q=r((async(e,r,t={})=>U((async(r,t)=>await e(t)?r.concat([t]):r),[],r,t))),L=r((async(e,r)=>{const t=await k(e,r);return(await Promise.all(t)).some((e=>e))})),z=r((async(e,r)=>{const t=await k(e,r);return(await Promise.all(t)).every((e=>e))})),H=r(((e,r)=>e.reduce((async(e,r)=>r(await e)),r))),V={entries:F,map:k,filter:q,reduce:U,some:L,every:z,pipeline:H,all:e=>Promise.all(e),allValues:e=>H([F,U((async(e,[r,t])=>(e[r]=await t,e)),{})],e)};V.entries,V.map,V.filter,V.reduce,V.some,V.every,V.pipeline,V.all,V.allValues;var M=fetch,K=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,Z=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,J=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,B=/\\([\u000b\u0020-\u00ff])/g,G=/([\\"])/g,W=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,Q=function(e){if(!e)throw new TypeError("argument string is required");var r="object"==typeof e?function(e){var r;"function"==typeof e.getHeader?r=e.getHeader("content-type"):"object"==typeof e.headers&&(r=e.headers&&e.headers["content-type"]);if("string"!=typeof r)throw new TypeError("content-type header is missing from object");return r}(e):e;if("string"!=typeof r)throw new TypeError("argument string is required to be a string");var t=r.indexOf(";"),n=-1!==t?r.substr(0,t).trim():r.trim();if(!W.test(n))throw new TypeError("invalid media type");var o=new X(n.toLowerCase());if(-1!==t){var a,i,s;for(K.lastIndex=t;i=K.exec(r);){if(i.index!==t)throw new TypeError("invalid parameter format");t+=i[0].length,a=i[1].toLowerCase(),'"'===(s=i[2])[0]&&(s=s.substr(1,s.length-2).replace(B,"$1")),o.parameters[a]=s}if(t!==r.length)throw new TypeError("invalid parameter format")}return o}; | ||
/*! | ||
* content-type | ||
* Copyright(c) 2015 Douglas Christopher Wilson | ||
* MIT Licensed | ||
*/function Y(e){var r=String(e);if(J.test(r))return r;if(r.length>0&&!Z.test(r))throw new TypeError("invalid parameter value");return'"'+r.replace(G,"\\$1")+'"'}function X(e){this.parameters=Object.create(null),this.type=e}var ee={format:function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var r=e.parameters,t=e.type;if(!t||!W.test(t))throw new TypeError("invalid type");var n=t;if(r&&"object"==typeof r)for(var o,a=Object.keys(r).sort(),i=0;i<a.length;i++){if(o=a[i],!J.test(o))throw new TypeError("invalid parameter name");n+="; "+o+"="+Y(r[o])}return n},parse:Q};const re={};var te={addPlugin:(e,r)=>{re[e]=r},parse:e=>{const r=ee.parse(e.headers.get("content-type")).type;if(!(r in re))throw Error(`${e.url} is not a schema. Found a document with media type: ${r}`);return re[r].parse(e)},getContentType:e=>{for(const r in re)if(re[r].matcher(e))return r;return"application/octet-stream"}};const{jsonTypeOf:ne,resolveUrl:oe,urlFragment:ae,pathRelative:ie}=c,se="https://json-schema.org/draft/2019-09/vocab/core",ce="https://json-schema.org/draft/2020-12/vocab/core",ue={},le={},pe=(e,r)=>{const t=le[e];return ue[t]?.[r]},fe={},de={},he=(e,r="",t="")=>{e=JSON.parse(JSON.stringify(e));const n=oe(r,""),o=oe(e.$schema||t,"");if(!o)throw Error("Couldn't determine schema dialect");if(delete e.$schema,!(o in le))if(!0===e?.$vocabulary?.[se]&&o===ve(e,n,se)[0])le[o]=se;else if(!0===e?.$vocabulary?.[ce]&&o===ve(e,n,ce)[0])le[o]=ce;else if(o===ve(e,n,o)[0])le[o]=o;else{if(!(o in fe))throw Error(`Couldn't determine JSON Schema version for dialect: '${o}'`);{const e=fe[o];!0===e.vocabulary[se]?le[o]=se:!0===e.vocabulary[ce]?le[o]=ce:le[o]=le[e.dialectId]}}const[a,i]=ve(e,n,le[o]);if(!a)throw Error("Couldn't determine an identifier for the schema");const s=pe(o,"baseToken");delete e[s],n&&(de[n]=a);const c=pe(o,"anchorToken");i&&s===c&&(e[c]=c!==s?encodeURI(i):`#${encodeURI(i)}`);const u={},l=pe(o,"recursiveAnchorToken");let p;!0===e[l]&&(u[""]=`${a}#`,e[c]="",delete e[l]);const f=pe(o,"vocabularyToken");ne(e[f],"object")?(p=e[f],delete e[f]):p={[le[o]]:!0};const d={"":""};return fe[a]={id:a,dialectId:o,schema:ye(e,a,o,w.nil,d,u),anchors:d,dynamicAnchors:u,vocabulary:p,validated:!1},a},ve=(e,r,t)=>{const n=ue[t]?.baseToken,o=oe(r,e[n]||"");return[oe(o,""),ae(o)]},ye=(e,r,t,n,o,a)=>{if(ne(e,"object")){const i="string"==typeof e.$schema?oe(e.$schema,""):t,s=pe(i,"embeddedToken"),c=pe(i,"anchorToken");if("string"==typeof e[s]&&(s!==c||"#"!==e[s][0])){const n=oe(r,e[s]);return e[pe(i,"baseToken")]=n,he(e,n,t),C.cons(e[s],e)}const u=pe(t,"anchorToken"),l=pe(t,"dynamicAnchorToken");"string"==typeof e[l]&&(a[e[l]]=`${r}#${encodeURI(n)}`,o[e[l]]=n,delete e[l]);const p=pe(t,"embeddedToken");if("string"==typeof e[u]){const r=u!==p?e[u]:e[u].slice(1);o[r]=n,delete e[u]}const f=pe(t,"jrefToken");if("string"==typeof e[f])return C.cons(e[f],e);for(const i in e)e[i]=ye(e[i],r,t,w.append(i,n),o,a);return e}return Array.isArray(e)?e.map(((e,i)=>ye(e,r,t,w.append(i,n),o,a))):e},me=e=>fe[de[e]]||fe[e],ge=Object.freeze({id:"",dialectId:void 0,vocabulary:{},pointer:w.nil,schema:void 0,value:void 0,anchors:{},dynamicAnchors:{},validated:!0}),be=async(e,r=ge)=>{const t=oe(Se(r),e),n=oe(t,""),o=ae(t);if(!(e=>e in fe||e in de)(n)){const e=await M(n,{headers:{Accept:"application/schema+json"}});if(e.status>=400)throw await e.text(),Error(`Failed to retrieve schema with id: ${n}`);he(await te.parse(e),n)}const a=me(n),i="/"!==o[0]?Ee(a,o):o,s=Object.freeze({...a,pointer:i,value:w.get(i,a.schema)});return we(s)},we=e=>C.isReference(e.value)?be(C.href(e.value),e):e,Ee=(e,r)=>{if(!(r in e.anchors))throw Error(`No such anchor '${encodeURI(e.id)}#${encodeURI(r)}'`);return e.anchors[r]},Se=e=>`${e.id}#${encodeURI(e.pointer)}`,Ce=e=>C.isReference(e.value)?C.value(e.value):e.value,Oe=(e,r)=>{const t=me(r.id),n=Object.freeze({...r,pointer:w.append(e,r.pointer),value:Ce(r)[e],validated:t.validated});return we(n)},Ae=r(((e,r)=>V.pipeline([Ce,V.map((async(t,n)=>e(await Oe(n,r),n))),V.all],r))),Ie={parentId:"",parentDialect:"",includeEmbedded:!0},je=(e,r)=>{if(r.startsWith("file://")){const t=e.slice(7,e.lastIndexOf("/"));return""===e?"":ie(t,r.slice(7))}return r};var Te={setConfig:(e,r,t)=>{ue[e]||(ue[e]={}),ue[e][r]=t},getConfig:pe,add:he,get:be,markValidated:e=>{fe[e].validated=!0},uri:Se,value:Ce,getAnchorPointer:Ee,typeOf:(e,r)=>ne(Ce(e),r),has:(e,r)=>e in Ce(r),step:Oe,keys:e=>Object.keys(Ce(e)),entries:e=>V.pipeline([Ce,Object.keys,V.map((async r=>[r,await Oe(r,e)])),V.all],e),map:Ae,length:e=>Ce(e).length,toSchema:(e,r={})=>{const t={...Ie,...r},n=JSON.parse(JSON.stringify(e.schema,((r,n)=>{if(!C.isReference(n))return n;const o=C.value(n),a="string"==typeof o.$schema?oe(o.$schema,""):e.dialectId,i=pe(a,"embeddedToken");return!t.includeEmbedded&&i in o?void 0:C.value(n)}))),o=pe(e.dialectId,"dynamicAnchorToken");Object.entries(e.dynamicAnchors).forEach((([e,r])=>{const t=ae(r);w.assign(t,n,{[o]:e,...w.get(t,n)})}));const a=pe(e.dialectId,"anchorToken");Object.entries(e.anchors).filter((([e])=>""!==e)).forEach((([e,r])=>{w.assign(r,n,{[a]:e,...w.get(r,n)})}));const i=pe(e.dialectId,"baseToken"),s=je(t.parentId,e.id),c=t.parentDialect===e.dialectId?"":e.dialectId;return{...s&&{[i]:s},...c&&{$schema:c},...n}}};Te.setConfig,Te.getConfig,Te.add,Te.get,Te.markValidated,Te.uri,Te.value,Te.getAnchorPointer,Te.typeOf,Te.has,Te.step,Te.keys,Te.entries,Te.map,Te.length,Te.toSchema;class xe extends Error{constructor(e){super("Invalid Schema"),this.name=this.constructor.name,this.output=e}}var Pe=xe;var $e={compile:e=>Te.value(e),interpret:()=>!0};const{resolveUrl:De}=c,Re="FLAG",Ne="BASIC",_e="DETAILED",Fe="VERBOSE";let ke=_e,Ue=!0;te.addPlugin("application/schema+json",{parse:async e=>await e.json(),matcher:e=>e.endsWith(".schema.json")});const qe=async e=>{const r={metaData:{}};return{ast:r,schemaUri:await Je(e,r)}},Le=r((({ast:e,schemaUri:r},t,n=Re)=>{if(![Re,Ne,_e,Fe].includes(n))throw Error(`The '${n}' error format is not supported`);const a=[],i=o.subscribe("result",ze(n,a));return Ge(r,t,e,{}),o.unsubscribe(i),a[0]})),ze=(e,r)=>{const t=[];return(n,o)=>{if("result"===n){const{keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a}=o,i={keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a,errors:[]};t.push(i)}else if("result.start"===n)t.push(n);else if("result.end"===n){const n=t.pop();for(;"result.start"!==t[t.length-1];){const r=t.pop(),o=[r];e===Ne&&(o.push(...r.errors),delete r.errors),(e===Fe||e!==Re&&!r.valid)&&n.errors.unshift(...o)}t[t.length-1]=n,r[0]=n}}},He={},Ve=e=>He[e]||$e,Me=e=>e in He,Ke={},Ze={},Je=async(e,r)=>{if(e=await Be(e),!Me(`${e.dialectId}#validate`)){const r=await Te.get(e.dialectId);(Te.getConfig(r.id,"mandatoryVocabularies")||[]).forEach((e=>{if(!r.vocabulary[e])throw Error(`Vocabulary '${e}' must be explicitly declared and required`)})),Object.entries(r.vocabulary).forEach((([e,t])=>{if(e in Ke)Object.entries(Ke[e]).forEach((([e,t])=>{((e,r)=>{He[e]={collectEvaluatedItems:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&new Set,collectEvaluatedProperties:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&[],...r}})(`${r.id}#${e}`,t)}));else if(t)throw Error(`Missing required vocabulary: ${e}`)}))}if(Ue&&!e.validated){if(Te.markValidated(e.id),!(e.dialectId in Ze)){const r=await Te.get(e.dialectId),t=await qe(r);Ze[r.id]=Le(t)}const r=_.cons(e.schema,e.id),t=Ze[e.dialectId](r,ke);if(!t.valid)throw new Pe(t)}return e.id in r.metaData||(r.metaData[e.id]={id:e.id,dynamicAnchors:e.dynamicAnchors,anchors:e.anchors}),Ve(`${e.dialectId}#validate`).compile(e,r)},Be=async e=>Te.typeOf(e,"string")?Be(await Te.get(Te.value(e),e)):e,Ge=(e,r,t,n)=>{const o=We(e,t),a=De(e,"");return Ve(o).interpret(e,r,t,{...t.metaData[a].dynamicAnchors,...n})},We=(e,r)=>{if(!(e in r))throw Error(`No schema found at ${e}`);return r[e][0]};var Qe={validate:async(e,r,t)=>{const n=await qe(e),o=(e,r)=>Le(n,_.cons(e),r);return void 0===r?o:o(r,t)},compile:qe,interpret:Le,setMetaOutputFormat:e=>{ke=e},setShouldMetaValidate:e=>{Ue=e},FLAG:Re,BASIC:Ne,DETAILED:_e,VERBOSE:Fe,add:(e,r="",t="")=>{const n=Te.add(e,r,t);delete Ze[n]},getKeyword:Ve,hasKeyword:Me,defineVocabulary:(e,r)=>{Ke[e]=r},compileSchema:Je,interpretSchema:Ge,collectEvaluatedProperties:(e,r,t,n,o)=>{const a=We(e,t);return Ve(a).collectEvaluatedProperties(e,r,t,n,o)},collectEvaluatedItems:(e,r,t,n,o)=>{const a=We(e,t);return Ve(a).collectEvaluatedItems(e,r,t,n,o)},addMediaTypePlugin:te.addPlugin};var Ye={compile:async(e,r)=>{const t=Te.uri(e);if(!(t in r)){r[t]=!1;const n=Te.value(e);if(!["object","boolean"].includes(typeof n))throw Error(`No schema found at '${Te.uri(e)}'`);r[t]=[`${e.dialectId}#validate`,Te.uri(e),"boolean"==typeof n?n:await V.pipeline([Te.entries,V.map((([r,t])=>[`${e.dialectId}#${r}`,t])),V.filter((([r])=>r!==`${e.dialectId}#validate`)),V.map((async([t,n])=>{const o=await Qe.getKeyword(t).compile(n,r,e);return[t,Te.uri(n),o]})),V.all],e)]}return t},interpret:(e,r,t,n)=>{const[a,i,s]=t[e];o.publishSync("result.start");const c="boolean"==typeof s?s:s.every((([e,a,i])=>{o.publishSync("result.start");const s=Qe.getKeyword(e).interpret(i,r,t,n);return o.publishSync("result",{keyword:e,absoluteKeywordLocation:a,instanceLocation:_.uri(r),valid:s,ast:i}),o.publishSync("result.end"),s}));return o.publishSync("result",{keyword:a,absoluteKeywordLocation:i,instanceLocation:_.uri(r),valid:c,ast:e}),o.publishSync("result.end"),c},collectEvaluatedProperties:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&[]:a.filter((([e])=>!o||!e.endsWith("#unevaluatedProperties"))).reduce(((e,[o,,a])=>{const i=e&&Qe.getKeyword(o).collectEvaluatedProperties(a,r,t,n);return!1!==i&&[...e,...i]}),[])},collectEvaluatedItems:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&new Set:a.filter((([e])=>!o||!e.endsWith("#unevaluatedItems"))).reduce(((e,[o,,a])=>{const i=!1!==e&&Qe.getKeyword(o).collectEvaluatedItems(a,r,t,n);return!1!==i&&new Set([...e,...i])}),new Set)}},Xe={metaData:$e,validate:Ye},er={Core:Qe,Schema:Te,Instance:_,Reference:C,Keywords:Xe,InvalidSchemaError:Pe},rr=er.Core,tr=er.Schema,nr=er.Instance,or=er.Reference,ar=er.Keywords,ir=er.InvalidSchemaError;return e.Core=rr,e.Instance=nr,e.InvalidSchemaError=ir,e.Keywords=ar,e.Reference=or,e.Schema=tr,e.default=er,Object.defineProperty(e,"__esModule",{value:!0}),e}({}); | ||
var JSC=function(e){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=function(e,r){return function t(){null==r&&(r=e.length);var n=[].slice.call(arguments);return n.length>=r?e.apply(this,n):function(){return t.apply(this,n.concat([].slice.call(arguments)))}}};var n={exports:{}};!function(e,t){!function(r,n){var o={};r.PubSub?(o=r.PubSub,console.warn("PubSub already loaded, using existing version")):(r.PubSub=o,function(e){var r={},t=-1,n="*";function o(e){var r;for(r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!0;return!1}function a(e){return function(){throw e}}function i(e,r,t){try{e(r,t)}catch(e){setTimeout(a(e),0)}}function s(e,r,t){e(r,t)}function c(e,t,n,o){var a,c=r[t],u=o?s:i;if(Object.prototype.hasOwnProperty.call(r,t))for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&u(c[a],e,n)}function u(e,r,t){return function(){var o=String(e),a=o.lastIndexOf(".");for(c(e,e,r,t);-1!==a;)a=(o=o.substr(0,a)).lastIndexOf("."),c(e,o,r,t);c(e,n,r,t)}}function l(e){var t=String(e);return Boolean(Object.prototype.hasOwnProperty.call(r,t)&&o(r[t]))}function p(e){for(var r=String(e),t=l(r)||l(n),o=r.lastIndexOf(".");!t&&-1!==o;)o=(r=r.substr(0,o)).lastIndexOf("."),t=l(r);return t}function f(e,r,t,n){var o=u(e="symbol"==typeof e?e.toString():e,r,n);return!!p(e)&&(!0===t?o():setTimeout(o,0),!0)}e.publish=function(r,t){return f(r,t,!1,e.immediateExceptions)},e.publishSync=function(r,t){return f(r,t,!0,e.immediateExceptions)},e.subscribe=function(e,n){if("function"!=typeof n)return!1;e="symbol"==typeof e?e.toString():e,Object.prototype.hasOwnProperty.call(r,e)||(r[e]={});var o="uid_"+String(++t);return r[e][o]=n,o},e.subscribeAll=function(r){return e.subscribe(n,r)},e.subscribeOnce=function(r,t){var n=e.subscribe(r,(function(){e.unsubscribe(n),t.apply(this,arguments)}));return e},e.clearAllSubscriptions=function(){r={}},e.clearSubscriptions=function(e){var t;for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&delete r[t]},e.countSubscriptions=function(e){var t,n,o=0;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)){for(n in r[t])o++;break}return o},e.getSubscriptions=function(e){var t,n=[];for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&n.push(t);return n},e.unsubscribe=function(t){var n,o,a,i=function(e){var t;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e))return!0;return!1},s="string"==typeof t&&(Object.prototype.hasOwnProperty.call(r,t)||i(t)),c=!s&&"string"==typeof t,u="function"==typeof t,l=!1;if(!s){for(n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(o=r[n],c&&o[t]){delete o[t],l=t;break}if(u)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&o[a]===t&&(delete o[a],l=!0)}return l}e.clearSubscriptions(t)}}(o)),void 0!==e&&e.exports&&(t=e.exports=o),t.PubSub=o,e.exports=t=o}("object"==typeof window&&window||r)}(n,n.exports);var o={exports:{}}; | ||
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */!function(e,r){!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var n=r.length-1,o=1;o<n;++o)r[o]=r[o].slice(1,-1);return r[n]=r[n].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,r){var t=e;if(r)for(var n in r)t[n]=r[n];return t}function s(e){var n="[A-Za-z]",o="[0-9]",a=r(o,"[A-Fa-f]"),i=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=r("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=r(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t(n+r(n,o,"[\\+\\-\\.]")+"*"),t(t(i+"|"+r(l,s,"[\\:]"))+"*");var p=t(t("25[0-5]")+"|"+t("2[0-4]"+o)+"|"+t("1"+o+o)+"|"+t("0?[1-9]"+o)+"|0?0?"+o),f=t(p+"\\."+p+"\\."+p+"\\."+p),d=t(a+"{1,4}"),h=t(t(d+"\\:"+d)+"|"+f),v=t(t(d+"\\:")+"{6}"+h),y=t("\\:\\:"+t(d+"\\:")+"{5}"+h),m=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+h),g=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+h),b=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+h),w=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+h),E=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+h),S=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),O=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),C=t([v,y,m,g,b,w,E,S,O].join("|")),A=t(t(l+"|"+i)+"+");t("[vV]"+a+"+\\."+r(l,s,"[\\:]")+"+"),t(t(i+"|"+r(l,s))+"*");var I=t(i+"|"+r(l,s,"[\\:\\@]"));return t(t(i+"|"+r(l,s,"[\\@]"))+"+"),t(t(I+"|"+r("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(r("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+C+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+A+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,r){var t=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)},f=2147483647,d=36,h=1,v=26,y=38,m=700,g=72,b=128,w="-",E=/^xn--/,S=/[^\0-\x7E]/,O=/[\x2E\u3002\uFF0E\uFF61]/g,C={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=d-h,I=Math.floor,j=String.fromCharCode;function T(e){throw new RangeError(C[e])}function x(e,r){for(var t=[],n=e.length;n--;)t[n]=r(e[n]);return t}function $(e,r){var t=e.split("@"),n="";return t.length>1&&(n=t[0]+"@",e=t[1]),n+x((e=e.replace(O,".")).split("."),r).join(".")}function D(e){for(var r=[],t=0,n=e.length;t<n;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<n){var a=e.charCodeAt(t++);56320==(64512&a)?r.push(((1023&o)<<10)+(1023&a)+65536):(r.push(o),t--)}else r.push(o)}return r}var P=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:d},N=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},R=function(e,r,t){var n=0;for(e=t?I(e/m):e>>1,e+=I(e/r);e>A*v>>1;n+=d)e=I(e/A);return I(n+(A+1)*e/(e+y))},F=function(e){var r=[],t=e.length,n=0,o=b,a=g,i=e.lastIndexOf(w);i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&T("not-basic"),r.push(e.charCodeAt(s));for(var c=i>0?i+1:0;c<t;){for(var u=n,l=1,p=d;;p+=d){c>=t&&T("invalid-input");var y=P(e.charCodeAt(c++));(y>=d||y>I((f-n)/l))&&T("overflow"),n+=y*l;var m=p<=a?h:p>=a+v?v:p-a;if(y<m)break;var E=d-m;l>I(f/E)&&T("overflow"),l*=E}var S=r.length+1;a=R(n-u,S,0==u),I(n/S)>f-o&&T("overflow"),o+=I(n/S),n%=S,r.splice(n++,0,o)}return String.fromCodePoint.apply(String,r)},_=function(e){var r=[],t=(e=D(e)).length,n=b,o=0,a=g,i=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var p=u.value;p<128&&r.push(j(p))}}catch(e){s=!0,c=e}finally{try{!i&&l.return&&l.return()}finally{if(s)throw c}}var y=r.length,m=y;for(y&&r.push(w);m<t;){var E=f,S=!0,O=!1,C=void 0;try{for(var A,x=e[Symbol.iterator]();!(S=(A=x.next()).done);S=!0){var $=A.value;$>=n&&$<E&&(E=$)}}catch(e){O=!0,C=e}finally{try{!S&&x.return&&x.return()}finally{if(O)throw C}}var P=m+1;E-n>I((f-o)/P)&&T("overflow"),o+=(E-n)*P,n=E;var F=!0,_=!1,U=void 0;try{for(var k,q=e[Symbol.iterator]();!(F=(k=q.next()).done);F=!0){var z=k.value;if(z<n&&++o>f&&T("overflow"),z==n){for(var L=o,H=d;;H+=d){var V=H<=a?h:H>=a+v?v:H-a;if(L<V)break;var M=L-V,K=d-V;r.push(j(N(V+M%K,0))),L=I(M/K)}r.push(j(N(L,0))),a=R(o,P,m==y),o=0,++m}}}catch(e){_=!0,U=e}finally{try{!F&&q.return&&q.return()}finally{if(_)throw U}}++o,++n}return r.join("")},U=function(e){return $(e,(function(e){return E.test(e)?F(e.slice(4).toLowerCase()):e}))},k=function(e){return $(e,(function(e){return S.test(e)?"xn--"+_(e):e}))},q={version:"2.1.0",ucs2:{decode:D,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:F,encode:_,toASCII:k,toUnicode:U},z={};function L(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function H(e){for(var r="",t=0,n=e.length;t<n;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(n-t>=6){var a=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(n-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function V(e,r){function t(e){var t=H(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,L).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,L).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,L).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,L).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,L).replace(r.PCT_ENCODED,o)),e}function M(e){return e.replace(/^0*(.*)/,"$1")||"0"}function K(e,r){var t=e.match(r.IPV4ADDRESS)||[],n=l(t,2)[1];return n?n.split(".").map(M).join("."):e}function Z(e,r){var t=e.match(r.IPV6ADDRESS)||[],n=l(t,3),o=n[1],a=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],p=u?u.split(":").map(M):[],f=c.split(":").map(M),d=r.IPV4ADDRESS.test(f[f.length-1]),h=d?7:8,v=f.length-h,y=Array(h),m=0;m<h;++m)y[m]=p[m]||f[v+m]||"";d&&(y[h-1]=K(y[h-1],r));var g=y.reduce((function(e,r,t){if(!r||"0"===r){var n=e[e.length-1];n&&n.index+n.length===t?n.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(g&&g.length>1){var w=y.slice(0,g.index),E=y.slice(g.index+g.length);b=w.join(":")+"::"+E.join(":")}else b=y.join(":");return a&&(b+="%"+a),b}return e}var J=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,B=void 0==="".match(/(){0}/)[1];function W(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},n=!1!==r.iri?u:c;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(J);if(o){B?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=Z(K(t.host,n),n)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var a=z[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)V(t,n);else{if(t.host&&(r.domainHost||a&&a.domainHost))try{t.host=q.toASCII(t.host.replace(n.PCT_ENCODED,H).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}V(t,c)}a&&a.parse&&a.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function G(e,r){var t=!1!==r.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(Z(K(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function re(e){for(var r=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(ee);if(!t)throw new Error("Unexpected dot segment condition");var n=t[0];e=e.slice(n.length),r.push(n)}return r.join("")}function te(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?u:c,n=[],o=z[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?q.toUnicode(e.host):q.toASCII(e.host.replace(t.PCT_ENCODED,H).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}V(e,t),"suffix"!==r.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=G(e,r);if(void 0!==a&&("suffix"!==r.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=re(i)),void 0===a&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=W(te(e,t),t),r=W(te(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(n.scheme=r.scheme,n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(r.path?("/"===r.path.charAt(0)?n.path=re(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:n.path=r.path:n.path="/"+r.path,n.path=re(n.path)),n.query=r.query):(n.path=e.path,void 0!==r.query?n.query=r.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=r.fragment,n}function oe(e,r,t){var n=i({scheme:"null"},t);return te(ne(W(e,n),W(r,n),n,!0),n)}function ae(e,r){return"string"==typeof e?e=te(W(e,r),r):"object"===n(e)&&(e=W(te(e,r),r)),e}function ie(e,r,t){return"string"==typeof e?e=te(W(e,t),t):"object"===n(e)&&(e=te(e,t)),"string"==typeof r?r=te(W(r,t),t):"object"===n(r)&&(r=te(r,t)),e===r}function se(e,r){return e&&e.toString().replace(r&&r.iri?u.ESCAPE:c.ESCAPE,L)}function ce(e,r){return e&&e.toString().replace(r&&r.iri?u.PCT_ENCODED:c.PCT_ENCODED,H)}var ue={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=pe(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),n=l(t,2),o=n[0],a=n[1];e.path=o&&"/"!==o?o:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},de={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},he={},ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",me=t(t("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+t("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+t("%"+ye+ye)),ge="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ee=new RegExp(ve,"g"),Se=new RegExp(me,"g"),Oe=new RegExp(r("[^]",ge,"[\\.]",'[\\"]',be),"g"),Ce=new RegExp(r("[^]",ve,we),"g"),Ae=Ce;function Ie(e){var r=H(e);return r.match(Ee)?r:e}var je={scheme:"mailto",parse:function(e,r){var t=e,n=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,a={},i=t.query.split("&"),s=0,c=i.length;s<c;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),p=0,f=l.length;p<f;++p)n.push(l[p]);break;case"subject":t.subject=ce(u[1],r);break;case"body":t.body=ce(u[1],r);break;default:o=!0,a[ce(u[0],r)]=ce(u[1],r)}}o&&(t.headers=a)}t.query=void 0;for(var d=0,h=n.length;d<h;++d){var v=n[d].split("@");if(v[0]=ce(v[0]),r.unicodeSupport)v[1]=ce(v[1],r).toLowerCase();else try{v[1]=q.toASCII(ce(v[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[d]=v.join("@")}return t},serialize:function(e,r){var t=e,n=a(e.to);if(n){for(var i=0,s=n.length;i<s;++i){var c=String(n[i]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(Se,Ie).replace(Se,o).replace(Oe,L),p=c.slice(u+1);try{p=r.iri?q.toUnicode(p):q.toASCII(ce(p,r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=l+"@"+p}t.path=n.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var d=[];for(var h in f)f[h]!==he[h]&&d.push(h.replace(Se,Ie).replace(Se,o).replace(Ce,L)+"="+f[h].replace(Se,Ie).replace(Se,o).replace(Ae,L));return d.length&&(t.query=d.join("&")),t}},Te=/^([^\:]+)\:(.*)/,xe={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(Te),n=e;if(t){var o=r.scheme||n.scheme||"urn",a=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||a),c=z[s];n.nid=a,n.nss=i,n.path=void 0,c&&(n=c.parse(n,r))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",n=e.nid,o=t+":"+(r.nid||n),a=z[o];a&&(e=a.serialize(e,r));var i=e,s=e.nss;return i.path=(n||r.nid)+":"+s,i}},$e=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,De={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match($e)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};z[ue.scheme]=ue,z[le.scheme]=le,z[fe.scheme]=fe,z[de.scheme]=de,z[je.scheme]=je,z[xe.scheme]=xe,z[De.scheme]=De,e.SCHEMES=z,e.pctEncChar=L,e.pctDecChars=H,e.parse=W,e.removeDotSegments=re,e.serialize=te,e.resolveComponents=ne,e.resolve=oe,e.normalize=ae,e.equal=ie,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(r)}(0,o.exports);const a=o.exports,i={null:e=>null===e,boolean:e=>"boolean"==typeof e,object:e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,array:e=>Array.isArray(e),number:e=>"number"==typeof e,integer:e=>Number.isInteger(e),string:e=>"string"==typeof e};var s={jsonTypeOf:(e,r)=>i[r](e),resolveUrl:(e,r)=>{const t=a.resolve(e,r,{iri:!0});if(a.resolve(e,"",{iri:!0})&&"file"===a.parse(t).scheme&&"file"!==a.parse(e).scheme)throw Error(`Can't access file '${t}' resource from network context '${e}'`);return t},urlFragment:e=>a.unescapeComponent(a.parse(e).fragment)||"",pathRelative:(e,r)=>{if(e===r)return"";let t=1;const n=e.length-1,o=r.length-t,a=n<o?n:o;let i=-1,s=0;for(;s<a;s++){const n=e.charCodeAt(s+1);if(n!==r.charCodeAt(t+s))break;47===n&&(i=s)}if(o>a){if(47===r.charCodeAt(t+s))return r.slice(t+s+1);if(0===s)return r.slice(t+s)}n>a&&(47===e.charCodeAt(s+1)?i=s:0===a&&(i=0));let c="";for(s=i+2;s<=e.length;++s)s!==e.length&&47!==e.charCodeAt(s)||(c+=0===c.length?"..":"/..");return t+=i,c.length>0?`${c}${r.slice(t,r.length)}`:(47===r.charCodeAt(t)&&++t,r.slice(t,r.length))}};const c=t,u=e=>{if(e.length>0&&"/"!==e[0])throw Error("Invalid JSON Pointer");return e.split("/").slice(1).map(y)},l=(e,r,t,n)=>{if(0===e.length)return t;if(e.length>1){const o=e.shift();return{...r,[o]:l(e,g(r,o,n),t,h(o,n))}}if(Array.isArray(r)){const n=[...r];return n[m(r,e[0])]=t,n}return"object"==typeof r&&null!==r?{...r,[e[0]]:t}:g(r,e[0],n)},p=(e,r,t,n)=>{if(0!==e.length)if(1!==e.length||b(r)){const o=e.shift();p(e,g(r,o,n),t,h(o,n))}else{r[m(r,e[0])]=t}},f=(e,r,t)=>{if(0!=e.length){if(e.length>1){const n=e.shift(),o=g(r,n,t);return{...r,[n]:f(e,o,h(n,t))}}if(Array.isArray(r))return r.filter(((r,t)=>t!=e[0]));if("object"==typeof r&&null!==r){const{[e[0]]:t,...n}=r;return n}return g(r,e[0],t)}},d=(e,r,t)=>{if(0!==e.length)if(e.length>1){const n=e.shift(),o=g(r,n,t);d(e,o,h(n,t))}else Array.isArray(r)?r.splice(e[0],1):"object"==typeof r&&null!==r?delete r[e[0]]:g(r,e[0],t)},h=c(((e,r)=>r+"/"+v(e))),v=e=>e.toString().replace(/~/g,"~0").replace(/\//g,"~1"),y=e=>e.toString().replace(/~1/g,"/").replace(/~0/g,"~"),m=(e,r)=>Array.isArray(e)&&"-"===r?e.length:r,g=(e,r,t="")=>{if(void 0===e)throw TypeError(`Value at '${t}' is undefined and does not have property '${r}'`);if(null===e)throw TypeError(`Value at '${t}' is null and does not have property '${r}'`);if(b(e))throw TypeError(`Value at '${t}' is a ${typeof e} and does not have property '${r}'`);return e[m(e,r)]},b=e=>null===e||"object"!=typeof e;var w={nil:"",append:h,get:(e,r)=>{const t=u(e),n=e=>t.reduce((([e,r],t)=>[g(e,t,r),h(t,r)]),[e,""])[0];return void 0===r?n:n(r)},set:(e,r,t)=>{const n=u(e),o=c(((e,r)=>l(n,e,r,"")));return void 0===r?o:o(r,t)},assign:(e,r,t)=>{const n=u(e),o=c(((e,r)=>p(n,e,r,"")));return void 0===r?o:o(r,t)},unset:(e,r)=>{const t=u(e),n=e=>f(t,e,"");return void 0===r?n:n(r)},remove:(e,r)=>{const t=u(e),n=e=>d(t,e,"");return void 0===r?n:n(r)}};const E=Symbol("$__value"),S=Symbol("$__href");var O={cons:(e,r)=>Object.freeze({[S]:e,[E]:r}),isReference:e=>e&&void 0!==e[S],href:e=>e[S],value:e=>e[E]};const C=w,A=t,{resolveUrl:I,jsonTypeOf:j}=s,T=O,x=Object.freeze({id:"",pointer:"",instance:void 0,value:void 0}),$=e=>T.isReference(e.value)?T.value(e.value):e.value,D=A(((e,r)=>j($(e),r))),P=(e,r)=>Object.freeze({...r,pointer:C.append(e,r.pointer),value:$(r)[e]}),N=A(((e,r)=>$(r).map(((t,n,o,a)=>e(P(n,r),n,o,a))))),R=A(((e,r)=>$(r).forEach(((t,n,o,a)=>e(P(n,r),n,o,a))))),F=A(((e,r)=>$(r).map(((e,t,n,o)=>P(t,r))).filter(((r,t,n,o)=>e(r,t,n,o))))),_=A(((e,r,t)=>$(t).reduce(((r,n,o)=>e(r,P(o,t),o)),r))),U=A(((e,r)=>$(r).every(((t,n,o,a)=>e(P(n,r),n,o,a))))),k=A(((e,r)=>$(r).some(((t,n,o,a)=>e(P(n,r),n,o,a)))));var q={nil:x,cons:(e,r="")=>Object.freeze({...x,id:I(r,""),instance:e,value:e}),get:(e,r=x)=>{if(!e.startsWith("#"))throw Error(`No JSON document found at '${e.split("#")[0]}'`);return Object.freeze({...r,pointer:e.substr(1)})},uri:e=>`${e.id}#${encodeURI(e.pointer)}`,value:$,has:(e,r)=>e in $(r),typeOf:D,length:e=>$(e).length,step:P,entries:e=>Object.keys($(e)).map((r=>[r,P(r,e)])),keys:e=>Object.keys($(e)),map:N,forEach:R,filter:F,reduce:_,every:U,some:k},z=async e=>Object.entries(await e);var L=t((async(e,r)=>(await r).map(e)));var H=t((async(e,r,t)=>(await t).reduce((async(r,t)=>e(await r,t)),r)));const V=H;var M=t((async(e,r,t={})=>V((async(r,t)=>await e(t)?r.concat([t]):r),[],r,t)));const K=L;var Z=t((async(e,r)=>{const t=await K(e,r);return(await Promise.all(t)).some((e=>e))}));const J=L;var B=t((async(e,r)=>{const t=await J(e,r);return(await Promise.all(t)).every((e=>e))}));var W=t(((e,r)=>e.reduce((async(e,r)=>r(await e)),r)));const G=W,Q=z,Y=H;var X={entries:z,map:L,filter:M,reduce:H,some:Z,every:B,pipeline:W,all:e=>Promise.all(e),allValues:e=>G([Q,Y((async(e,[r,t])=>(e[r]=await t,e)),{})],e)},ee=fetch,re={},te=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,ne=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,oe=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,ae=/\\([\u000b\u0020-\u00ff])/g,ie=/([\\"])/g,se=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function ce(e){var r=String(e);if(oe.test(r))return r;if(r.length>0&&!ne.test(r))throw new TypeError("invalid parameter value");return'"'+r.replace(ie,"\\$1")+'"'}function ue(e){this.parameters=Object.create(null),this.type=e}re.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var r=e.parameters,t=e.type;if(!t||!se.test(t))throw new TypeError("invalid type");var n=t;if(r&&"object"==typeof r)for(var o,a=Object.keys(r).sort(),i=0;i<a.length;i++){if(o=a[i],!oe.test(o))throw new TypeError("invalid parameter name");n+="; "+o+"="+ce(r[o])}return n},re.parse=function(e){if(!e)throw new TypeError("argument string is required");var r="object"==typeof e?function(e){var r;"function"==typeof e.getHeader?r=e.getHeader("content-type"):"object"==typeof e.headers&&(r=e.headers&&e.headers["content-type"]);if("string"!=typeof r)throw new TypeError("content-type header is missing from object");return r}(e):e;if("string"!=typeof r)throw new TypeError("argument string is required to be a string");var t=r.indexOf(";"),n=-1!==t?r.substr(0,t).trim():r.trim();if(!se.test(n))throw new TypeError("invalid media type");var o=new ue(n.toLowerCase());if(-1!==t){var a,i,s;for(te.lastIndex=t;i=te.exec(r);){if(i.index!==t)throw new TypeError("invalid parameter format");t+=i[0].length,a=i[1].toLowerCase(),'"'===(s=i[2])[0]&&(s=s.substr(1,s.length-2).replace(ae,"$1")),o.parameters[a]=s}if(t!==r.length)throw new TypeError("invalid parameter format")}return o};const le=re,pe={};var fe={addPlugin:(e,r)=>{pe[e]=r},parse:e=>{const r=le.parse(e.headers.get("content-type"));if(!(r.type in pe))throw Error(`${e.url} is not a schema. Found a document with media type: ${r.type}`);return pe[r.type].parse(e,r.parameters)},getContentType:e=>{for(const r in pe)if(pe[r].matcher(e))return r;return"application/octet-stream"}};const de=t,he=X,ve=w,{jsonTypeOf:ye,resolveUrl:me,urlFragment:ge,pathRelative:be}=s,we=ee,Ee=O,Se=fe,Oe="https://json-schema.org/draft/2019-09/vocab/core",Ce="https://json-schema.org/draft/2020-12/vocab/core",Ae={},Ie={},je=(e,r)=>{const t=Ie[e];return Ae[t]?.[r]},Te={},xe={},$e=(e,r="",t="")=>{e=JSON.parse(JSON.stringify(e));const n=me(r,""),o=me(e.$schema||t,"");if(!o)throw Error("Couldn't determine schema dialect");if(delete e.$schema,!(o in Ie))if(!0===e?.$vocabulary?.[Oe]&&o===De(e,n,Oe)[0])Ie[o]=Oe;else if(!0===e?.$vocabulary?.[Ce]&&o===De(e,n,Ce)[0])Ie[o]=Ce;else{const e=Te[o];if(!e)throw Error(`Couldn't determine JSON Schema version for dialect: '${o}'`);!0===e.vocabulary[Oe]?Ie[o]=Oe:!0===e.vocabulary[Ce]?Ie[o]=Ce:Ie[o]=Ie[e.dialectId]}const[a,i]=De(e,n,Ie[o]);if(!a)throw Error("Couldn't determine an identifier for the schema");const s=je(o,"baseToken");delete e[s],n&&(xe[n]=a);const c=je(o,"anchorToken");i&&s===c&&(e[c]=c!==s?encodeURI(i):`#${encodeURI(i)}`);const u={},l=je(o,"recursiveAnchorToken");let p;!0===e[l]&&(u[""]=`${a}#`,e[c]="",delete e[l]);const f=je(o,"vocabularyToken");ye(e[f],"object")?(p=e[f],delete e[f]):p={[Ie[o]]:!0};const d={"":""};return Te[a]={id:a,dialectId:o,schema:Pe(e,a,o,ve.nil,d,u),anchors:d,dynamicAnchors:u,vocabulary:p,validated:!1},a},De=(e,r,t)=>{const n=Ae[t]?.baseToken,o=me(r,e[n]||"");return[me(o,""),ge(o)]},Pe=(e,r,t,n,o,a)=>{if(ye(e,"object")){const i="string"==typeof e.$schema?me(e.$schema,""):t,s=je(i,"embeddedToken"),c=je(i,"anchorToken");if("string"==typeof e[s]&&(s!==c||"#"!==e[s][0])){const n=me(r,e[s]);return e[je(i,"baseToken")]=n,$e(e,n,t),Ee.cons(e[s],e)}const u=je(t,"anchorToken"),l=je(t,"dynamicAnchorToken");"string"==typeof e[l]&&(a[e[l]]=`${r}#${encodeURI(n)}`,o[e[l]]=n,delete e[l]);const p=je(t,"embeddedToken");if("string"==typeof e[u]){const r=u!==p?e[u]:e[u].slice(1);o[r]=n,delete e[u]}const f=je(t,"jrefToken");if("string"==typeof e[f])return Ee.cons(e[f],e);for(const i in e)e[i]=Pe(e[i],r,t,ve.append(i,n),o,a);return e}return Array.isArray(e)?e.map(((e,i)=>Pe(e,r,t,ve.append(i,n),o,a))):e},Ne=e=>Te[xe[e]]||Te[e],Re=Object.freeze({id:"",dialectId:void 0,vocabulary:{},pointer:ve.nil,schema:void 0,value:void 0,anchors:{},dynamicAnchors:{},validated:!0}),Fe=async(e,r=Re)=>{const t=me(ke(r),e),n=me(t,""),o=ge(t);if(!(e=>e in Te||e in xe)(n)){const e=await we(n,{headers:{Accept:"application/schema+json"}});if(e.status>=400)throw await e.text(),Error(`Failed to retrieve schema with id: ${n}`);const[r,t]=await Se.parse(e),o=me(r.$schema,"")||t;n===o||o in Ie||await Fe(o),$e(r,n)}const a=Ne(n),i="/"!==o[0]?Ue(a,o):o,s=Object.freeze({...a,pointer:i,value:ve.get(i,a.schema)});return _e(s)},_e=e=>Ee.isReference(e.value)?Fe(Ee.href(e.value),e):e,Ue=(e,r)=>{if(!(r in e.anchors))throw Error(`No such anchor '${encodeURI(e.id)}#${encodeURI(r)}'`);return e.anchors[r]},ke=e=>`${e.id}#${encodeURI(e.pointer)}`,qe=e=>Ee.isReference(e.value)?Ee.value(e.value):e.value,ze=(e,r)=>{const t=Ne(r.id),n=Object.freeze({...r,pointer:ve.append(e,r.pointer),value:qe(r)[e],validated:t.validated});return _e(n)},Le=de(((e,r)=>he.pipeline([qe,he.map((async(t,n)=>e(await ze(n,r),n))),he.all],r))),He={parentId:"",parentDialect:"",includeEmbedded:!0},Ve=(e,r)=>{if(r.startsWith("file://")){const t=e.slice(7,e.lastIndexOf("/"));return""===e?"":be(t,r.slice(7))}return r};var Me={setConfig:(e,r,t)=>{Ie[e]=e,Ae[e]||(Ae[e]={}),Ae[e][r]=t},getConfig:je,add:$e,get:Fe,markValidated:e=>{Te[e].validated=!0},uri:ke,value:qe,getAnchorPointer:Ue,typeOf:(e,r)=>ye(qe(e),r),has:(e,r)=>e in qe(r),step:ze,keys:e=>Object.keys(qe(e)),entries:e=>he.pipeline([qe,Object.keys,he.map((async r=>[r,await ze(r,e)])),he.all],e),map:Le,length:e=>qe(e).length,toSchema:(e,r={})=>{const t={...He,...r},n=JSON.parse(JSON.stringify(e.schema,((r,n)=>{if(!Ee.isReference(n))return n;const o=Ee.value(n),a="string"==typeof o.$schema?me(o.$schema,""):e.dialectId,i=je(a,"embeddedToken");return!t.includeEmbedded&&i in o?void 0:Ee.value(n)}))),o=je(e.dialectId,"dynamicAnchorToken");Object.entries(e.dynamicAnchors).forEach((([e,r])=>{const t=ge(r);ve.assign(t,n,{[o]:e,...ve.get(t,n)})}));const a=je(e.dialectId,"anchorToken");Object.entries(e.anchors).filter((([e])=>""!==e)).forEach((([e,r])=>{ve.assign(r,n,{[a]:e,...ve.get(r,n)})}));const i=je(e.dialectId,"baseToken"),s=Ve(t.parentId,e.id),c=t.parentDialect===e.dialectId?"":e.dialectId;return{...s&&{[i]:s},...c&&{$schema:c},...n}}};class Ke extends Error{constructor(e){super("Invalid Schema"),this.name=this.constructor.name,this.output=e}}var Ze=Ke;const Je=Me;var Be={compile:e=>Je.value(e),interpret:()=>!0};const We=t,Ge=n.exports,{resolveUrl:Qe}=s,Ye=q,Xe=Me,er=Ze,rr=fe,tr=Be,nr="FLAG",or="BASIC",ar="DETAILED",ir="VERBOSE";let sr=ar,cr=!0;rr.addPlugin("application/schema+json",{parse:async(e,r)=>[await e.json(),r.schema||r.profile],matcher:e=>e.endsWith(".schema.json")});const ur=async e=>{const r={metaData:{}};return{ast:r,schemaUri:await mr(e,r)}},lr=We((({ast:e,schemaUri:r},t,n=nr)=>{if(![nr,or,ar,ir].includes(n))throw Error(`The '${n}' error format is not supported`);const o=[],a=Ge.subscribe("result",pr(n,o));return br(r,t,e,{}),Ge.unsubscribe(a),o[0]})),pr=(e,r)=>{const t=[];return(n,o)=>{if("result"===n){const{keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a}=o,i={keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a,errors:[]};t.push(i)}else if("result.start"===n)t.push(n);else if("result.end"===n){const n=t.pop();for(;"result.start"!==t[t.length-1];){const r=t.pop(),o=[r];e===or&&(o.push(...r.errors),delete r.errors),(e===ir||e!==nr&&!r.valid)&&n.errors.unshift(...o)}t[t.length-1]=n,r[0]=n}}},fr={},dr=e=>fr[e]||tr,hr=e=>e in fr,vr={},yr={},mr=async(e,r)=>{if(e=await gr(e),!hr(`${e.dialectId}#validate`)){const r=await Xe.get(e.dialectId);(Xe.getConfig(r.id,"mandatoryVocabularies")||[]).forEach((e=>{if(!r.vocabulary[e])throw Error(`Vocabulary '${e}' must be explicitly declared and required`)})),Object.entries(r.vocabulary).forEach((([e,t])=>{if(e in vr)Object.entries(vr[e]).forEach((([e,t])=>{((e,r)=>{fr[e]={collectEvaluatedItems:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&new Set,collectEvaluatedProperties:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&[],...r}})(`${r.id}#${e}`,t)}));else if(t)throw Error(`Missing required vocabulary: ${e}`)}))}if(cr&&!e.validated){if(Xe.markValidated(e.id),!(e.dialectId in yr)){const r=await Xe.get(e.dialectId),t=await ur(r);yr[r.id]=lr(t)}const r=Ye.cons(e.schema,e.id),t=yr[e.dialectId](r,sr);if(!t.valid)throw new er(t)}return e.id in r.metaData||(r.metaData[e.id]={id:e.id,dynamicAnchors:e.dynamicAnchors,anchors:e.anchors}),dr(`${e.dialectId}#validate`).compile(e,r)},gr=async e=>Xe.typeOf(e,"string")?gr(await Xe.get(Xe.value(e),e)):e,br=(e,r,t,n)=>{const o=wr(e,t),a=Qe(e,"");return dr(o).interpret(e,r,t,{...t.metaData[a].dynamicAnchors,...n})},wr=(e,r)=>{if(!(e in r))throw Error(`No schema found at ${e}`);return r[e][0]};var Er={validate:async(e,r,t)=>{const n=await ur(e),o=(e,r)=>lr(n,Ye.cons(e),r);return void 0===r?o:o(r,t)},compile:ur,interpret:lr,setMetaOutputFormat:e=>{sr=e},setShouldMetaValidate:e=>{cr=e},FLAG:nr,BASIC:or,DETAILED:ar,VERBOSE:ir,add:(e,r="",t="")=>{const n=Xe.add(e,r,t);delete yr[n]},getKeyword:dr,hasKeyword:hr,defineVocabulary:(e,r)=>{vr[e]=r},compileSchema:mr,interpretSchema:br,collectEvaluatedProperties:(e,r,t,n,o)=>{const a=wr(e,t);return dr(a).collectEvaluatedProperties(e,r,t,n,o)},collectEvaluatedItems:(e,r,t,n,o)=>{const a=wr(e,t);return dr(a).collectEvaluatedItems(e,r,t,n,o)},addMediaTypePlugin:rr.addPlugin};const Sr=X,Or=n.exports,Cr=Er,Ar=q,Ir=Me;var jr={compile:async(e,r)=>{const t=Ir.uri(e);if(!(t in r)){r[t]=!1;const n=Ir.value(e);if(!["object","boolean"].includes(typeof n))throw Error(`No schema found at '${Ir.uri(e)}'`);r[t]=[`${e.dialectId}#validate`,Ir.uri(e),"boolean"==typeof n?n:await Sr.pipeline([Ir.entries,Sr.map((([r,t])=>[`${e.dialectId}#${r}`,t])),Sr.filter((([r])=>r!==`${e.dialectId}#validate`)),Sr.map((async([t,n])=>{const o=await Cr.getKeyword(t).compile(n,r,e);return[t,Ir.uri(n),o]})),Sr.all],e)]}return t},interpret:(e,r,t,n)=>{const[o,a,i]=t[e];Or.publishSync("result.start");const s="boolean"==typeof i?i:i.every((([e,o,a])=>{Or.publishSync("result.start");const i=Cr.getKeyword(e).interpret(a,r,t,n);return Or.publishSync("result",{keyword:e,absoluteKeywordLocation:o,instanceLocation:Ar.uri(r),valid:i,ast:a}),Or.publishSync("result.end"),i}));return Or.publishSync("result",{keyword:o,absoluteKeywordLocation:a,instanceLocation:Ar.uri(r),valid:s,ast:e}),Or.publishSync("result.end"),s},collectEvaluatedProperties:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&[]:a.filter((([e])=>!o||!e.endsWith("#unevaluatedProperties"))).reduce(((e,[o,,a])=>{const i=e&&Cr.getKeyword(o).collectEvaluatedProperties(a,r,t,n);return!1!==i&&[...e,...i]}),[])},collectEvaluatedItems:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&new Set:a.filter((([e])=>!o||!e.endsWith("#unevaluatedItems"))).reduce(((e,[o,,a])=>{const i=!1!==e&&Cr.getKeyword(o).collectEvaluatedItems(a,r,t,n);return!1!==i&&new Set([...e,...i])}),new Set)}};var Tr={Core:Er,Schema:Me,Instance:q,Reference:O,Keywords:{metaData:Be,validate:jr},InvalidSchemaError:Ze};return e.default=Tr,Object.defineProperty(e,"__esModule",{value:!0}),e}({}); | ||
//# sourceMappingURL=json-schema-core-iife.min.js.map |
@@ -1,9 +0,3 @@ | ||
System.register("JSC",[],(function(e){"use strict";return{execute:function(){var r=function(e,r){return function t(){null==r&&(r=e.length);var n=[].slice.call(arguments);return n.length>=r?e.apply(this,n):function(){return t.apply(this,n.concat([].slice.call(arguments)))}}};var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e,r){return e(r={exports:{}},r.exports),r.exports}var o=n((function(e,r){var n,o;n="object"==typeof window&&window||t,o={},n.PubSub?(o=n.PubSub,console.warn("PubSub already loaded, using existing version")):(n.PubSub=o,function(e){var r={},t=-1,n="*";function o(e){var r;for(r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!0;return!1}function a(e){return function(){throw e}}function i(e,r,t){try{e(r,t)}catch(e){setTimeout(a(e),0)}}function s(e,r,t){e(r,t)}function c(e,t,n,o){var a,c=r[t],u=o?s:i;if(Object.prototype.hasOwnProperty.call(r,t))for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&u(c[a],e,n)}function u(e,r,t){return function(){var o=String(e),a=o.lastIndexOf(".");for(c(e,e,r,t);-1!==a;)a=(o=o.substr(0,a)).lastIndexOf("."),c(e,o,r,t);c(e,n,r,t)}}function l(e){var t=String(e);return Boolean(Object.prototype.hasOwnProperty.call(r,t)&&o(r[t]))}function p(e){for(var r=String(e),t=l(r)||l(n),o=r.lastIndexOf(".");!t&&-1!==o;)o=(r=r.substr(0,o)).lastIndexOf("."),t=l(r);return t}function f(e,r,t,n){var o=u(e="symbol"==typeof e?e.toString():e,r,n);return!!p(e)&&(!0===t?o():setTimeout(o,0),!0)}e.publish=function(r,t){return f(r,t,!1,e.immediateExceptions)},e.publishSync=function(r,t){return f(r,t,!0,e.immediateExceptions)},e.subscribe=function(e,n){if("function"!=typeof n)return!1;e="symbol"==typeof e?e.toString():e,Object.prototype.hasOwnProperty.call(r,e)||(r[e]={});var o="uid_"+String(++t);return r[e][o]=n,o},e.subscribeAll=function(r){return e.subscribe(n,r)},e.subscribeOnce=function(r,t){var n=e.subscribe(r,(function(){e.unsubscribe(n),t.apply(this,arguments)}));return e},e.clearAllSubscriptions=function(){r={}},e.clearSubscriptions=function(e){var t;for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&delete r[t]},e.countSubscriptions=function(e){var t,n,o=0;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)){for(n in r[t])o++;break}return o},e.getSubscriptions=function(e){var t,n=[];for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&n.push(t);return n},e.unsubscribe=function(t){var n,o,a,i=function(e){var t;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e))return!0;return!1},s="string"==typeof t&&(Object.prototype.hasOwnProperty.call(r,t)||i(t)),c=!s&&"string"==typeof t,u="function"==typeof t,l=!1;if(!s){for(n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(o=r[n],c&&o[t]){delete o[t],l=t;break}if(u)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&o[a]===t&&(delete o[a],l=!0)}return l}e.clearSubscriptions(t)}}(o)),void 0!==e&&e.exports&&(r=e.exports=o),r.PubSub=o,e.exports=r=o}));o.PubSub;var a,i=n((function(e,r){ | ||
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ | ||
!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var n=r.length-1,o=1;o<n;++o)r[o]=r[o].slice(1,-1);return r[n]=r[n].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,r){var t=e;if(r)for(var n in r)t[n]=r[n];return t}function s(e){var n="[A-Za-z]",o="[0-9]",a=r(o,"[A-Fa-f]"),i=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=r("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=r(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t(n+r(n,o,"[\\+\\-\\.]")+"*"),t(t(i+"|"+r(l,s,"[\\:]"))+"*");var p=t(t("25[0-5]")+"|"+t("2[0-4]"+o)+"|"+t("1"+o+o)+"|"+t("0?[1-9]"+o)+"|0?0?"+o),f=t(p+"\\."+p+"\\."+p+"\\."+p),d=t(a+"{1,4}"),h=t(t(d+"\\:"+d)+"|"+f),v=t(t(d+"\\:")+"{6}"+h),y=t("\\:\\:"+t(d+"\\:")+"{5}"+h),m=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+h),g=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+h),b=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+h),w=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+h),E=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+h),S=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),C=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),O=t([v,y,m,g,b,w,E,S,C].join("|")),A=t(t(l+"|"+i)+"+");t("[vV]"+a+"+\\."+r(l,s,"[\\:]")+"+"),t(t(i+"|"+r(l,s))+"*");var I=t(i+"|"+r(l,s,"[\\:\\@]"));return t(t(i+"|"+r(l,s,"[\\@]"))+"+"),t(t(I+"|"+r("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(r("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+O+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+A+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,r){var t=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)},f=2147483647,d=36,h=1,v=26,y=38,m=700,g=72,b=128,w="-",E=/^xn--/,S=/[^\0-\x7E]/,C=/[\x2E\u3002\uFF0E\uFF61]/g,O={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=d-h,I=Math.floor,T=String.fromCharCode;function j(e){throw new RangeError(O[e])}function x(e,r){for(var t=[],n=e.length;n--;)t[n]=r(e[n]);return t}function P(e,r){var t=e.split("@"),n="";return t.length>1&&(n=t[0]+"@",e=t[1]),n+x((e=e.replace(C,".")).split("."),r).join(".")}function $(e){for(var r=[],t=0,n=e.length;t<n;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<n){var a=e.charCodeAt(t++);56320==(64512&a)?r.push(((1023&o)<<10)+(1023&a)+65536):(r.push(o),t--)}else r.push(o)}return r}var D=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:d},R=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},N=function(e,r,t){var n=0;for(e=t?I(e/m):e>>1,e+=I(e/r);e>A*v>>1;n+=d)e=I(e/A);return I(n+(A+1)*e/(e+y))},F=function(e){var r=[],t=e.length,n=0,o=b,a=g,i=e.lastIndexOf(w);i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&j("not-basic"),r.push(e.charCodeAt(s));for(var c=i>0?i+1:0;c<t;){for(var u=n,l=1,p=d;;p+=d){c>=t&&j("invalid-input");var y=D(e.charCodeAt(c++));(y>=d||y>I((f-n)/l))&&j("overflow"),n+=y*l;var m=p<=a?h:p>=a+v?v:p-a;if(y<m)break;var E=d-m;l>I(f/E)&&j("overflow"),l*=E}var S=r.length+1;a=N(n-u,S,0==u),I(n/S)>f-o&&j("overflow"),o+=I(n/S),n%=S,r.splice(n++,0,o)}return String.fromCodePoint.apply(String,r)},_=function(e){var r=[],t=(e=$(e)).length,n=b,o=0,a=g,i=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var p=u.value;p<128&&r.push(T(p))}}catch(e){s=!0,c=e}finally{try{!i&&l.return&&l.return()}finally{if(s)throw c}}var y=r.length,m=y;for(y&&r.push(w);m<t;){var E=f,S=!0,C=!1,O=void 0;try{for(var A,x=e[Symbol.iterator]();!(S=(A=x.next()).done);S=!0){var P=A.value;P>=n&&P<E&&(E=P)}}catch(e){C=!0,O=e}finally{try{!S&&x.return&&x.return()}finally{if(C)throw O}}var D=m+1;E-n>I((f-o)/D)&&j("overflow"),o+=(E-n)*D,n=E;var F=!0,_=!1,k=void 0;try{for(var U,q=e[Symbol.iterator]();!(F=(U=q.next()).done);F=!0){var L=U.value;if(L<n&&++o>f&&j("overflow"),L==n){for(var z=o,H=d;;H+=d){var V=H<=a?h:H>=a+v?v:H-a;if(z<V)break;var M=z-V,K=d-V;r.push(T(R(V+M%K,0))),z=I(M/K)}r.push(T(R(z,0))),a=N(o,D,m==y),o=0,++m}}}catch(e){_=!0,k=e}finally{try{!F&&q.return&&q.return()}finally{if(_)throw k}}++o,++n}return r.join("")},k=function(e){return P(e,(function(e){return E.test(e)?F(e.slice(4).toLowerCase()):e}))},U=function(e){return P(e,(function(e){return S.test(e)?"xn--"+_(e):e}))},q={version:"2.1.0",ucs2:{decode:$,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:F,encode:_,toASCII:U,toUnicode:k},L={};function z(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function H(e){for(var r="",t=0,n=e.length;t<n;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(n-t>=6){var a=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(n-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function V(e,r){function t(e){var t=H(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,z).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,z).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,z).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,z).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,z).replace(r.PCT_ENCODED,o)),e}function M(e){return e.replace(/^0*(.*)/,"$1")||"0"}function K(e,r){var t=e.match(r.IPV4ADDRESS)||[],n=l(t,2)[1];return n?n.split(".").map(M).join("."):e}function Z(e,r){var t=e.match(r.IPV6ADDRESS)||[],n=l(t,3),o=n[1],a=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],p=u?u.split(":").map(M):[],f=c.split(":").map(M),d=r.IPV4ADDRESS.test(f[f.length-1]),h=d?7:8,v=f.length-h,y=Array(h),m=0;m<h;++m)y[m]=p[m]||f[v+m]||"";d&&(y[h-1]=K(y[h-1],r));var g=y.reduce((function(e,r,t){if(!r||"0"===r){var n=e[e.length-1];n&&n.index+n.length===t?n.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(g&&g.length>1){var w=y.slice(0,g.index),E=y.slice(g.index+g.length);b=w.join(":")+"::"+E.join(":")}else b=y.join(":");return a&&(b+="%"+a),b}return e}var J=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,B=void 0==="".match(/(){0}/)[1];function G(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},n=!1!==r.iri?u:c;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(J);if(o){B?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=Z(K(t.host,n),n)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var a=L[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)V(t,n);else{if(t.host&&(r.domainHost||a&&a.domainHost))try{t.host=q.toASCII(t.host.replace(n.PCT_ENCODED,H).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}V(t,c)}a&&a.parse&&a.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function W(e,r){var t=!1!==r.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(Z(K(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function re(e){for(var r=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(ee);if(!t)throw new Error("Unexpected dot segment condition");var n=t[0];e=e.slice(n.length),r.push(n)}return r.join("")}function te(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?u:c,n=[],o=L[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?q.toUnicode(e.host):q.toASCII(e.host.replace(t.PCT_ENCODED,H).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}V(e,t),"suffix"!==r.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=W(e,r);if(void 0!==a&&("suffix"!==r.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=re(i)),void 0===a&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=G(te(e,t),t),r=G(te(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(n.scheme=r.scheme,n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(r.path?("/"===r.path.charAt(0)?n.path=re(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:n.path=r.path:n.path="/"+r.path,n.path=re(n.path)),n.query=r.query):(n.path=e.path,void 0!==r.query?n.query=r.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=r.fragment,n}function oe(e,r,t){var n=i({scheme:"null"},t);return te(ne(G(e,n),G(r,n),n,!0),n)}function ae(e,r){return"string"==typeof e?e=te(G(e,r),r):"object"===n(e)&&(e=G(te(e,r),r)),e}function ie(e,r,t){return"string"==typeof e?e=te(G(e,t),t):"object"===n(e)&&(e=te(e,t)),"string"==typeof r?r=te(G(r,t),t):"object"===n(r)&&(r=te(r,t)),e===r}function se(e,r){return e&&e.toString().replace(r&&r.iri?u.ESCAPE:c.ESCAPE,z)}function ce(e,r){return e&&e.toString().replace(r&&r.iri?u.PCT_ENCODED:c.PCT_ENCODED,H)}var ue={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=pe(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),n=l(t,2),o=n[0],a=n[1];e.path=o&&"/"!==o?o:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},de={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},he={},ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",me=t(t("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+t("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+t("%"+ye+ye)),ge="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ee=new RegExp(ve,"g"),Se=new RegExp(me,"g"),Ce=new RegExp(r("[^]",ge,"[\\.]",'[\\"]',be),"g"),Oe=new RegExp(r("[^]",ve,we),"g"),Ae=Oe;function Ie(e){var r=H(e);return r.match(Ee)?r:e}var Te={scheme:"mailto",parse:function(e,r){var t=e,n=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,a={},i=t.query.split("&"),s=0,c=i.length;s<c;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),p=0,f=l.length;p<f;++p)n.push(l[p]);break;case"subject":t.subject=ce(u[1],r);break;case"body":t.body=ce(u[1],r);break;default:o=!0,a[ce(u[0],r)]=ce(u[1],r)}}o&&(t.headers=a)}t.query=void 0;for(var d=0,h=n.length;d<h;++d){var v=n[d].split("@");if(v[0]=ce(v[0]),r.unicodeSupport)v[1]=ce(v[1],r).toLowerCase();else try{v[1]=q.toASCII(ce(v[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[d]=v.join("@")}return t},serialize:function(e,r){var t=e,n=a(e.to);if(n){for(var i=0,s=n.length;i<s;++i){var c=String(n[i]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(Se,Ie).replace(Se,o).replace(Ce,z),p=c.slice(u+1);try{p=r.iri?q.toUnicode(p):q.toASCII(ce(p,r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=l+"@"+p}t.path=n.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var d=[];for(var h in f)f[h]!==he[h]&&d.push(h.replace(Se,Ie).replace(Se,o).replace(Oe,z)+"="+f[h].replace(Se,Ie).replace(Se,o).replace(Ae,z));return d.length&&(t.query=d.join("&")),t}},je=/^([^\:]+)\:(.*)/,xe={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(je),n=e;if(t){var o=r.scheme||n.scheme||"urn",a=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||a),c=L[s];n.nid=a,n.nss=i,n.path=void 0,c&&(n=c.parse(n,r))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",n=e.nid,o=t+":"+(r.nid||n),a=L[o];a&&(e=a.serialize(e,r));var i=e,s=e.nss;return i.path=(n||r.nid)+":"+s,i}},Pe=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,$e={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match(Pe)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};L[ue.scheme]=ue,L[le.scheme]=le,L[fe.scheme]=fe,L[de.scheme]=de,L[Te.scheme]=Te,L[xe.scheme]=xe,L[$e.scheme]=$e,e.SCHEMES=L,e.pctEncChar=z,e.pctDecChars=H,e.parse=G,e.removeDotSegments=re,e.serialize=te,e.resolveComponents=ne,e.resolve=oe,e.normalize=ae,e.equal=ie,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(r)}));(a=i)&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")&&a.default;const s={null:e=>null===e,boolean:e=>"boolean"==typeof e,object:e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,array:e=>Array.isArray(e),number:e=>"number"==typeof e,integer:e=>Number.isInteger(e),string:e=>"string"==typeof e};var c={jsonTypeOf:(e,r)=>s[r](e),resolveUrl:(e,r)=>{const t=i.resolve(e,r,{iri:!0});if(i.resolve(e,"",{iri:!0})&&"file"===i.parse(t).scheme&&"file"!==i.parse(e).scheme)throw Error(`Can't access file '${t}' resource from network context '${e}'`);return t},urlFragment:e=>i.unescapeComponent(i.parse(e).fragment)||"",pathRelative:(e,r)=>{if(e===r)return"";let t=1;const n=e.length-1,o=r.length-t,a=n<o?n:o;let i=-1,s=0;for(;s<a;s++){const n=e.charCodeAt(s+1);if(n!==r.charCodeAt(t+s))break;47===n&&(i=s)}if(o>a){if(47===r.charCodeAt(t+s))return r.slice(t+s+1);if(0===s)return r.slice(t+s)}n>a&&(47===e.charCodeAt(s+1)?i=s:0===a&&(i=0));let c="";for(s=i+2;s<=e.length;++s)s!==e.length&&47!==e.charCodeAt(s)||(c+=0===c.length?"..":"/..");return t+=i,c.length>0?`${c}${r.slice(t,r.length)}`:(47===r.charCodeAt(t)&&++t,r.slice(t,r.length))}};const u=e=>{if(e.length>0&&"/"!==e[0])throw Error("Invalid JSON Pointer");return e.split("/").slice(1).map(y)},l=(e,r,t,n)=>{if(0===e.length)return t;if(e.length>1){const o=e.shift();return{...r,[o]:l(e,g(r,o,n),t,h(o,n))}}if(Array.isArray(r)){const n=[...r];return n[m(r,e[0])]=t,n}return"object"==typeof r&&null!==r?{...r,[e[0]]:t}:g(r,e[0],n)},p=(e,r,t,n)=>{if(0!==e.length)if(1!==e.length||b(r)){const o=e.shift();p(e,g(r,o,n),t,h(o,n))}else{r[m(r,e[0])]=t}},f=(e,r,t)=>{if(0!=e.length){if(e.length>1){const n=e.shift(),o=g(r,n,t);return{...r,[n]:f(e,o,h(n,t))}}if(Array.isArray(r))return r.filter(((r,t)=>t!=e[0]));if("object"==typeof r&&null!==r){const{[e[0]]:t,...n}=r;return n}return g(r,e[0],t)}},d=(e,r,t)=>{if(0!==e.length)if(e.length>1){const n=e.shift(),o=g(r,n,t);d(e,o,h(n,t))}else Array.isArray(r)?r.splice(e[0],1):"object"==typeof r&&null!==r?delete r[e[0]]:g(r,e[0],t)},h=r(((e,r)=>r+"/"+v(e))),v=e=>e.toString().replace(/~/g,"~0").replace(/\//g,"~1"),y=e=>e.toString().replace(/~1/g,"/").replace(/~0/g,"~"),m=(e,r)=>Array.isArray(e)&&"-"===r?e.length:r,g=(e,r,t="")=>{if(void 0===e)throw TypeError(`Value at '${t}' is undefined and does not have property '${r}'`);if(null===e)throw TypeError(`Value at '${t}' is null and does not have property '${r}'`);if(b(e))throw TypeError(`Value at '${t}' is a ${typeof e} and does not have property '${r}'`);return e[m(e,r)]},b=e=>null===e||"object"!=typeof e;var w={nil:"",append:h,get:(e,r)=>{const t=u(e),n=e=>t.reduce((([e,r],t)=>[g(e,t,r),h(t,r)]),[e,""])[0];return void 0===r?n:n(r)},set:(e,t,n)=>{const o=u(e),a=r(((e,r)=>l(o,e,r,"")));return void 0===t?a:a(t,n)},assign:(e,t,n)=>{const o=u(e),a=r(((e,r)=>p(o,e,r,"")));return void 0===t?a:a(t,n)},unset:(e,r)=>{const t=u(e),n=e=>f(t,e,"");return void 0===r?n:n(r)},remove:(e,r)=>{const t=u(e),n=e=>d(t,e,"");return void 0===r?n:n(r)}};w.nil,w.append,w.get,w.set,w.assign,w.unset,w.remove;const E=Symbol("$__value"),S=Symbol("$__href");var C={cons:(e,r)=>Object.freeze({[S]:e,[E]:r}),isReference:e=>e&&void 0!==e[S],href:e=>e[S],value:e=>e[E]};const{resolveUrl:O,jsonTypeOf:A}=c,I=Object.freeze({id:"",pointer:"",instance:void 0,value:void 0}),T=e=>C.isReference(e.value)?C.value(e.value):e.value,j=r(((e,r)=>A(T(e),r))),x=(e,r)=>Object.freeze({...r,pointer:w.append(e,r.pointer),value:T(r)[e]}),P=r(((e,r)=>T(r).map(((t,n,o,a)=>e(x(n,r),n,o,a))))),$=r(((e,r)=>T(r).map(((e,t,n,o)=>x(t,r))).filter(((r,t,n,o)=>e(r,t,n,o))))),D=r(((e,r,t)=>T(t).reduce(((r,n,o)=>e(r,x(o,t),o)),r))),R=r(((e,r)=>T(r).every(((t,n,o,a)=>e(x(n,r),n,o,a))))),N=r(((e,r)=>T(r).some(((t,n,o,a)=>e(x(n,r),n,o,a)))));var F={nil:I,cons:(e,r="")=>Object.freeze({...I,id:O(r,""),instance:e,value:e}),uri:e=>`${e.id}#${encodeURI(e.pointer)}`,value:T,has:(e,r)=>e in T(r),typeOf:j,step:x,entries:e=>Object.keys(T(e)).map((r=>[r,x(r,e)])),keys:e=>Object.keys(T(e)),map:P,filter:$,reduce:D,every:R,some:N,length:e=>T(e).length},_=async e=>Object.entries(await e),k=r((async(e,r)=>(await r).map(e))),U=r((async(e,r,t)=>(await t).reduce((async(r,t)=>e(await r,t)),r))),q=r((async(e,r,t={})=>U((async(r,t)=>await e(t)?r.concat([t]):r),[],r,t))),L=r((async(e,r)=>{const t=await k(e,r);return(await Promise.all(t)).some((e=>e))})),z=r((async(e,r)=>{const t=await k(e,r);return(await Promise.all(t)).every((e=>e))})),H=r(((e,r)=>e.reduce((async(e,r)=>r(await e)),r))),V={entries:_,map:k,filter:q,reduce:U,some:L,every:z,pipeline:H,all:e=>Promise.all(e),allValues:e=>H([_,U((async(e,[r,t])=>(e[r]=await t,e)),{})],e)};V.entries,V.map,V.filter,V.reduce,V.some,V.every,V.pipeline,V.all,V.allValues;var M=fetch,K=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,Z=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,J=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,B=/\\([\u000b\u0020-\u00ff])/g,G=/([\\"])/g,W=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,Q=function(e){if(!e)throw new TypeError("argument string is required");var r="object"==typeof e?function(e){var r;"function"==typeof e.getHeader?r=e.getHeader("content-type"):"object"==typeof e.headers&&(r=e.headers&&e.headers["content-type"]);if("string"!=typeof r)throw new TypeError("content-type header is missing from object");return r}(e):e;if("string"!=typeof r)throw new TypeError("argument string is required to be a string");var t=r.indexOf(";"),n=-1!==t?r.substr(0,t).trim():r.trim();if(!W.test(n))throw new TypeError("invalid media type");var o=new X(n.toLowerCase());if(-1!==t){var a,i,s;for(K.lastIndex=t;i=K.exec(r);){if(i.index!==t)throw new TypeError("invalid parameter format");t+=i[0].length,a=i[1].toLowerCase(),'"'===(s=i[2])[0]&&(s=s.substr(1,s.length-2).replace(B,"$1")),o.parameters[a]=s}if(t!==r.length)throw new TypeError("invalid parameter format")}return o}; | ||
/*! | ||
* content-type | ||
* Copyright(c) 2015 Douglas Christopher Wilson | ||
* MIT Licensed | ||
*/function Y(e){var r=String(e);if(J.test(r))return r;if(r.length>0&&!Z.test(r))throw new TypeError("invalid parameter value");return'"'+r.replace(G,"\\$1")+'"'}function X(e){this.parameters=Object.create(null),this.type=e}var ee={format:function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var r=e.parameters,t=e.type;if(!t||!W.test(t))throw new TypeError("invalid type");var n=t;if(r&&"object"==typeof r)for(var o,a=Object.keys(r).sort(),i=0;i<a.length;i++){if(o=a[i],!J.test(o))throw new TypeError("invalid parameter name");n+="; "+o+"="+Y(r[o])}return n},parse:Q};const re={};var te={addPlugin:(e,r)=>{re[e]=r},parse:e=>{const r=ee.parse(e.headers.get("content-type")).type;if(!(r in re))throw Error(`${e.url} is not a schema. Found a document with media type: ${r}`);return re[r].parse(e)},getContentType:e=>{for(const r in re)if(re[r].matcher(e))return r;return"application/octet-stream"}};const{jsonTypeOf:ne,resolveUrl:oe,urlFragment:ae,pathRelative:ie}=c,se="https://json-schema.org/draft/2019-09/vocab/core",ce="https://json-schema.org/draft/2020-12/vocab/core",ue={},le={},pe=(e,r)=>{const t=le[e];return ue[t]?.[r]},fe={},de={},he=(e,r="",t="")=>{e=JSON.parse(JSON.stringify(e));const n=oe(r,""),o=oe(e.$schema||t,"");if(!o)throw Error("Couldn't determine schema dialect");if(delete e.$schema,!(o in le))if(!0===e?.$vocabulary?.[se]&&o===ve(e,n,se)[0])le[o]=se;else if(!0===e?.$vocabulary?.[ce]&&o===ve(e,n,ce)[0])le[o]=ce;else if(o===ve(e,n,o)[0])le[o]=o;else{if(!(o in fe))throw Error(`Couldn't determine JSON Schema version for dialect: '${o}'`);{const e=fe[o];!0===e.vocabulary[se]?le[o]=se:!0===e.vocabulary[ce]?le[o]=ce:le[o]=le[e.dialectId]}}const[a,i]=ve(e,n,le[o]);if(!a)throw Error("Couldn't determine an identifier for the schema");const s=pe(o,"baseToken");delete e[s],n&&(de[n]=a);const c=pe(o,"anchorToken");i&&s===c&&(e[c]=c!==s?encodeURI(i):`#${encodeURI(i)}`);const u={},l=pe(o,"recursiveAnchorToken");let p;!0===e[l]&&(u[""]=`${a}#`,e[c]="",delete e[l]);const f=pe(o,"vocabularyToken");ne(e[f],"object")?(p=e[f],delete e[f]):p={[le[o]]:!0};const d={"":""};return fe[a]={id:a,dialectId:o,schema:ye(e,a,o,w.nil,d,u),anchors:d,dynamicAnchors:u,vocabulary:p,validated:!1},a},ve=(e,r,t)=>{const n=ue[t]?.baseToken,o=oe(r,e[n]||"");return[oe(o,""),ae(o)]},ye=(e,r,t,n,o,a)=>{if(ne(e,"object")){const i="string"==typeof e.$schema?oe(e.$schema,""):t,s=pe(i,"embeddedToken"),c=pe(i,"anchorToken");if("string"==typeof e[s]&&(s!==c||"#"!==e[s][0])){const n=oe(r,e[s]);return e[pe(i,"baseToken")]=n,he(e,n,t),C.cons(e[s],e)}const u=pe(t,"anchorToken"),l=pe(t,"dynamicAnchorToken");"string"==typeof e[l]&&(a[e[l]]=`${r}#${encodeURI(n)}`,o[e[l]]=n,delete e[l]);const p=pe(t,"embeddedToken");if("string"==typeof e[u]){const r=u!==p?e[u]:e[u].slice(1);o[r]=n,delete e[u]}const f=pe(t,"jrefToken");if("string"==typeof e[f])return C.cons(e[f],e);for(const i in e)e[i]=ye(e[i],r,t,w.append(i,n),o,a);return e}return Array.isArray(e)?e.map(((e,i)=>ye(e,r,t,w.append(i,n),o,a))):e},me=e=>fe[de[e]]||fe[e],ge=Object.freeze({id:"",dialectId:void 0,vocabulary:{},pointer:w.nil,schema:void 0,value:void 0,anchors:{},dynamicAnchors:{},validated:!0}),be=async(e,r=ge)=>{const t=oe(Se(r),e),n=oe(t,""),o=ae(t);if(!(e=>e in fe||e in de)(n)){const e=await M(n,{headers:{Accept:"application/schema+json"}});if(e.status>=400)throw await e.text(),Error(`Failed to retrieve schema with id: ${n}`);he(await te.parse(e),n)}const a=me(n),i="/"!==o[0]?Ee(a,o):o,s=Object.freeze({...a,pointer:i,value:w.get(i,a.schema)});return we(s)},we=e=>C.isReference(e.value)?be(C.href(e.value),e):e,Ee=(e,r)=>{if(!(r in e.anchors))throw Error(`No such anchor '${encodeURI(e.id)}#${encodeURI(r)}'`);return e.anchors[r]},Se=e=>`${e.id}#${encodeURI(e.pointer)}`,Ce=e=>C.isReference(e.value)?C.value(e.value):e.value,Oe=(e,r)=>{const t=me(r.id),n=Object.freeze({...r,pointer:w.append(e,r.pointer),value:Ce(r)[e],validated:t.validated});return we(n)},Ae=r(((e,r)=>V.pipeline([Ce,V.map((async(t,n)=>e(await Oe(n,r),n))),V.all],r))),Ie={parentId:"",parentDialect:"",includeEmbedded:!0},Te=(e,r)=>{if(r.startsWith("file://")){const t=e.slice(7,e.lastIndexOf("/"));return""===e?"":ie(t,r.slice(7))}return r};var je={setConfig:(e,r,t)=>{ue[e]||(ue[e]={}),ue[e][r]=t},getConfig:pe,add:he,get:be,markValidated:e=>{fe[e].validated=!0},uri:Se,value:Ce,getAnchorPointer:Ee,typeOf:(e,r)=>ne(Ce(e),r),has:(e,r)=>e in Ce(r),step:Oe,keys:e=>Object.keys(Ce(e)),entries:e=>V.pipeline([Ce,Object.keys,V.map((async r=>[r,await Oe(r,e)])),V.all],e),map:Ae,length:e=>Ce(e).length,toSchema:(e,r={})=>{const t={...Ie,...r},n=JSON.parse(JSON.stringify(e.schema,((r,n)=>{if(!C.isReference(n))return n;const o=C.value(n),a="string"==typeof o.$schema?oe(o.$schema,""):e.dialectId,i=pe(a,"embeddedToken");return!t.includeEmbedded&&i in o?void 0:C.value(n)}))),o=pe(e.dialectId,"dynamicAnchorToken");Object.entries(e.dynamicAnchors).forEach((([e,r])=>{const t=ae(r);w.assign(t,n,{[o]:e,...w.get(t,n)})}));const a=pe(e.dialectId,"anchorToken");Object.entries(e.anchors).filter((([e])=>""!==e)).forEach((([e,r])=>{w.assign(r,n,{[a]:e,...w.get(r,n)})}));const i=pe(e.dialectId,"baseToken"),s=Te(t.parentId,e.id),c=t.parentDialect===e.dialectId?"":e.dialectId;return{...s&&{[i]:s},...c&&{$schema:c},...n}}};je.setConfig,je.getConfig,je.add,je.get,je.markValidated,je.uri,je.value,je.getAnchorPointer,je.typeOf,je.has,je.step,je.keys,je.entries,je.map,je.length,je.toSchema;class xe extends Error{constructor(e){super("Invalid Schema"),this.name=this.constructor.name,this.output=e}}var Pe=xe;var $e={compile:e=>je.value(e),interpret:()=>!0};const{resolveUrl:De}=c,Re="FLAG",Ne="BASIC",Fe="DETAILED",_e="VERBOSE";let ke=Fe,Ue=!0;te.addPlugin("application/schema+json",{parse:async e=>await e.json(),matcher:e=>e.endsWith(".schema.json")});const qe=async e=>{const r={metaData:{}};return{ast:r,schemaUri:await Je(e,r)}},Le=r((({ast:e,schemaUri:r},t,n=Re)=>{if(![Re,Ne,Fe,_e].includes(n))throw Error(`The '${n}' error format is not supported`);const a=[],i=o.subscribe("result",ze(n,a));return Ge(r,t,e,{}),o.unsubscribe(i),a[0]})),ze=(e,r)=>{const t=[];return(n,o)=>{if("result"===n){const{keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a}=o,i={keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a,errors:[]};t.push(i)}else if("result.start"===n)t.push(n);else if("result.end"===n){const n=t.pop();for(;"result.start"!==t[t.length-1];){const r=t.pop(),o=[r];e===Ne&&(o.push(...r.errors),delete r.errors),(e===_e||e!==Re&&!r.valid)&&n.errors.unshift(...o)}t[t.length-1]=n,r[0]=n}}},He={},Ve=e=>He[e]||$e,Me=e=>e in He,Ke={},Ze={},Je=async(e,r)=>{if(e=await Be(e),!Me(`${e.dialectId}#validate`)){const r=await je.get(e.dialectId);(je.getConfig(r.id,"mandatoryVocabularies")||[]).forEach((e=>{if(!r.vocabulary[e])throw Error(`Vocabulary '${e}' must be explicitly declared and required`)})),Object.entries(r.vocabulary).forEach((([e,t])=>{if(e in Ke)Object.entries(Ke[e]).forEach((([e,t])=>{((e,r)=>{He[e]={collectEvaluatedItems:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&new Set,collectEvaluatedProperties:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&[],...r}})(`${r.id}#${e}`,t)}));else if(t)throw Error(`Missing required vocabulary: ${e}`)}))}if(Ue&&!e.validated){if(je.markValidated(e.id),!(e.dialectId in Ze)){const r=await je.get(e.dialectId),t=await qe(r);Ze[r.id]=Le(t)}const r=F.cons(e.schema,e.id),t=Ze[e.dialectId](r,ke);if(!t.valid)throw new Pe(t)}return e.id in r.metaData||(r.metaData[e.id]={id:e.id,dynamicAnchors:e.dynamicAnchors,anchors:e.anchors}),Ve(`${e.dialectId}#validate`).compile(e,r)},Be=async e=>je.typeOf(e,"string")?Be(await je.get(je.value(e),e)):e,Ge=(e,r,t,n)=>{const o=We(e,t),a=De(e,"");return Ve(o).interpret(e,r,t,{...t.metaData[a].dynamicAnchors,...n})},We=(e,r)=>{if(!(e in r))throw Error(`No schema found at ${e}`);return r[e][0]};var Qe={validate:async(e,r,t)=>{const n=await qe(e),o=(e,r)=>Le(n,F.cons(e),r);return void 0===r?o:o(r,t)},compile:qe,interpret:Le,setMetaOutputFormat:e=>{ke=e},setShouldMetaValidate:e=>{Ue=e},FLAG:Re,BASIC:Ne,DETAILED:Fe,VERBOSE:_e,add:(e,r="",t="")=>{const n=je.add(e,r,t);delete Ze[n]},getKeyword:Ve,hasKeyword:Me,defineVocabulary:(e,r)=>{Ke[e]=r},compileSchema:Je,interpretSchema:Ge,collectEvaluatedProperties:(e,r,t,n,o)=>{const a=We(e,t);return Ve(a).collectEvaluatedProperties(e,r,t,n,o)},collectEvaluatedItems:(e,r,t,n,o)=>{const a=We(e,t);return Ve(a).collectEvaluatedItems(e,r,t,n,o)},addMediaTypePlugin:te.addPlugin};var Ye={compile:async(e,r)=>{const t=je.uri(e);if(!(t in r)){r[t]=!1;const n=je.value(e);if(!["object","boolean"].includes(typeof n))throw Error(`No schema found at '${je.uri(e)}'`);r[t]=[`${e.dialectId}#validate`,je.uri(e),"boolean"==typeof n?n:await V.pipeline([je.entries,V.map((([r,t])=>[`${e.dialectId}#${r}`,t])),V.filter((([r])=>r!==`${e.dialectId}#validate`)),V.map((async([t,n])=>{const o=await Qe.getKeyword(t).compile(n,r,e);return[t,je.uri(n),o]})),V.all],e)]}return t},interpret:(e,r,t,n)=>{const[a,i,s]=t[e];o.publishSync("result.start");const c="boolean"==typeof s?s:s.every((([e,a,i])=>{o.publishSync("result.start");const s=Qe.getKeyword(e).interpret(i,r,t,n);return o.publishSync("result",{keyword:e,absoluteKeywordLocation:a,instanceLocation:F.uri(r),valid:s,ast:i}),o.publishSync("result.end"),s}));return o.publishSync("result",{keyword:a,absoluteKeywordLocation:i,instanceLocation:F.uri(r),valid:c,ast:e}),o.publishSync("result.end"),c},collectEvaluatedProperties:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&[]:a.filter((([e])=>!o||!e.endsWith("#unevaluatedProperties"))).reduce(((e,[o,,a])=>{const i=e&&Qe.getKeyword(o).collectEvaluatedProperties(a,r,t,n);return!1!==i&&[...e,...i]}),[])},collectEvaluatedItems:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&new Set:a.filter((([e])=>!o||!e.endsWith("#unevaluatedItems"))).reduce(((e,[o,,a])=>{const i=!1!==e&&Qe.getKeyword(o).collectEvaluatedItems(a,r,t,n);return!1!==i&&new Set([...e,...i])}),new Set)}},Xe={metaData:$e,validate:Ye},er=e("default",{Core:Qe,Schema:je,Instance:F,Reference:C,Keywords:Xe,InvalidSchemaError:Pe});e("Core",er.Core),e("Schema",er.Schema),e("Instance",er.Instance),e("Reference",er.Reference),e("Keywords",er.Keywords),e("InvalidSchemaError",er.InvalidSchemaError)}}})); | ||
System.register("JSC",[],(function(e){"use strict";return{execute:function(){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=function(e,r){return function t(){null==r&&(r=e.length);var n=[].slice.call(arguments);return n.length>=r?e.apply(this,n):function(){return t.apply(this,n.concat([].slice.call(arguments)))}}};var n={exports:{}};!function(e,t){!function(r,n){var o={};r.PubSub?(o=r.PubSub,console.warn("PubSub already loaded, using existing version")):(r.PubSub=o,function(e){var r={},t=-1,n="*";function o(e){var r;for(r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!0;return!1}function a(e){return function(){throw e}}function i(e,r,t){try{e(r,t)}catch(e){setTimeout(a(e),0)}}function s(e,r,t){e(r,t)}function c(e,t,n,o){var a,c=r[t],u=o?s:i;if(Object.prototype.hasOwnProperty.call(r,t))for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&u(c[a],e,n)}function u(e,r,t){return function(){var o=String(e),a=o.lastIndexOf(".");for(c(e,e,r,t);-1!==a;)a=(o=o.substr(0,a)).lastIndexOf("."),c(e,o,r,t);c(e,n,r,t)}}function l(e){var t=String(e);return Boolean(Object.prototype.hasOwnProperty.call(r,t)&&o(r[t]))}function p(e){for(var r=String(e),t=l(r)||l(n),o=r.lastIndexOf(".");!t&&-1!==o;)o=(r=r.substr(0,o)).lastIndexOf("."),t=l(r);return t}function f(e,r,t,n){var o=u(e="symbol"==typeof e?e.toString():e,r,n);return!!p(e)&&(!0===t?o():setTimeout(o,0),!0)}e.publish=function(r,t){return f(r,t,!1,e.immediateExceptions)},e.publishSync=function(r,t){return f(r,t,!0,e.immediateExceptions)},e.subscribe=function(e,n){if("function"!=typeof n)return!1;e="symbol"==typeof e?e.toString():e,Object.prototype.hasOwnProperty.call(r,e)||(r[e]={});var o="uid_"+String(++t);return r[e][o]=n,o},e.subscribeAll=function(r){return e.subscribe(n,r)},e.subscribeOnce=function(r,t){var n=e.subscribe(r,(function(){e.unsubscribe(n),t.apply(this,arguments)}));return e},e.clearAllSubscriptions=function(){r={}},e.clearSubscriptions=function(e){var t;for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&delete r[t]},e.countSubscriptions=function(e){var t,n,o=0;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)){for(n in r[t])o++;break}return o},e.getSubscriptions=function(e){var t,n=[];for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&n.push(t);return n},e.unsubscribe=function(t){var n,o,a,i=function(e){var t;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e))return!0;return!1},s="string"==typeof t&&(Object.prototype.hasOwnProperty.call(r,t)||i(t)),c=!s&&"string"==typeof t,u="function"==typeof t,l=!1;if(!s){for(n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(o=r[n],c&&o[t]){delete o[t],l=t;break}if(u)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&o[a]===t&&(delete o[a],l=!0)}return l}e.clearSubscriptions(t)}}(o)),void 0!==e&&e.exports&&(t=e.exports=o),t.PubSub=o,e.exports=t=o}("object"==typeof window&&window||r)}(n,n.exports);var o={exports:{}}; | ||
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */!function(e,r){!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var n=r.length-1,o=1;o<n;++o)r[o]=r[o].slice(1,-1);return r[n]=r[n].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,r){var t=e;if(r)for(var n in r)t[n]=r[n];return t}function s(e){var n="[A-Za-z]",o="[0-9]",a=r(o,"[A-Fa-f]"),i=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=r("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=r(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t(n+r(n,o,"[\\+\\-\\.]")+"*"),t(t(i+"|"+r(l,s,"[\\:]"))+"*");var p=t(t("25[0-5]")+"|"+t("2[0-4]"+o)+"|"+t("1"+o+o)+"|"+t("0?[1-9]"+o)+"|0?0?"+o),f=t(p+"\\."+p+"\\."+p+"\\."+p),d=t(a+"{1,4}"),h=t(t(d+"\\:"+d)+"|"+f),v=t(t(d+"\\:")+"{6}"+h),y=t("\\:\\:"+t(d+"\\:")+"{5}"+h),m=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+h),g=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+h),b=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+h),w=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+h),E=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+h),S=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),C=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),O=t([v,y,m,g,b,w,E,S,C].join("|")),A=t(t(l+"|"+i)+"+");t("[vV]"+a+"+\\."+r(l,s,"[\\:]")+"+"),t(t(i+"|"+r(l,s))+"*");var I=t(i+"|"+r(l,s,"[\\:\\@]"));return t(t(i+"|"+r(l,s,"[\\@]"))+"+"),t(t(I+"|"+r("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(r("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+O+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+A+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,r){var t=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)},f=2147483647,d=36,h=1,v=26,y=38,m=700,g=72,b=128,w="-",E=/^xn--/,S=/[^\0-\x7E]/,C=/[\x2E\u3002\uFF0E\uFF61]/g,O={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=d-h,I=Math.floor,T=String.fromCharCode;function j(e){throw new RangeError(O[e])}function x(e,r){for(var t=[],n=e.length;n--;)t[n]=r(e[n]);return t}function $(e,r){var t=e.split("@"),n="";return t.length>1&&(n=t[0]+"@",e=t[1]),n+x((e=e.replace(C,".")).split("."),r).join(".")}function D(e){for(var r=[],t=0,n=e.length;t<n;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<n){var a=e.charCodeAt(t++);56320==(64512&a)?r.push(((1023&o)<<10)+(1023&a)+65536):(r.push(o),t--)}else r.push(o)}return r}var P=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:d},N=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},R=function(e,r,t){var n=0;for(e=t?I(e/m):e>>1,e+=I(e/r);e>A*v>>1;n+=d)e=I(e/A);return I(n+(A+1)*e/(e+y))},F=function(e){var r=[],t=e.length,n=0,o=b,a=g,i=e.lastIndexOf(w);i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&j("not-basic"),r.push(e.charCodeAt(s));for(var c=i>0?i+1:0;c<t;){for(var u=n,l=1,p=d;;p+=d){c>=t&&j("invalid-input");var y=P(e.charCodeAt(c++));(y>=d||y>I((f-n)/l))&&j("overflow"),n+=y*l;var m=p<=a?h:p>=a+v?v:p-a;if(y<m)break;var E=d-m;l>I(f/E)&&j("overflow"),l*=E}var S=r.length+1;a=R(n-u,S,0==u),I(n/S)>f-o&&j("overflow"),o+=I(n/S),n%=S,r.splice(n++,0,o)}return String.fromCodePoint.apply(String,r)},_=function(e){var r=[],t=(e=D(e)).length,n=b,o=0,a=g,i=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var p=u.value;p<128&&r.push(T(p))}}catch(e){s=!0,c=e}finally{try{!i&&l.return&&l.return()}finally{if(s)throw c}}var y=r.length,m=y;for(y&&r.push(w);m<t;){var E=f,S=!0,C=!1,O=void 0;try{for(var A,x=e[Symbol.iterator]();!(S=(A=x.next()).done);S=!0){var $=A.value;$>=n&&$<E&&(E=$)}}catch(e){C=!0,O=e}finally{try{!S&&x.return&&x.return()}finally{if(C)throw O}}var P=m+1;E-n>I((f-o)/P)&&j("overflow"),o+=(E-n)*P,n=E;var F=!0,_=!1,U=void 0;try{for(var k,q=e[Symbol.iterator]();!(F=(k=q.next()).done);F=!0){var z=k.value;if(z<n&&++o>f&&j("overflow"),z==n){for(var L=o,H=d;;H+=d){var V=H<=a?h:H>=a+v?v:H-a;if(L<V)break;var M=L-V,K=d-V;r.push(T(N(V+M%K,0))),L=I(M/K)}r.push(T(N(L,0))),a=R(o,P,m==y),o=0,++m}}}catch(e){_=!0,U=e}finally{try{!F&&q.return&&q.return()}finally{if(_)throw U}}++o,++n}return r.join("")},U=function(e){return $(e,(function(e){return E.test(e)?F(e.slice(4).toLowerCase()):e}))},k=function(e){return $(e,(function(e){return S.test(e)?"xn--"+_(e):e}))},q={version:"2.1.0",ucs2:{decode:D,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:F,encode:_,toASCII:k,toUnicode:U},z={};function L(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function H(e){for(var r="",t=0,n=e.length;t<n;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(n-t>=6){var a=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(n-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function V(e,r){function t(e){var t=H(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,L).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,L).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,L).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,L).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,L).replace(r.PCT_ENCODED,o)),e}function M(e){return e.replace(/^0*(.*)/,"$1")||"0"}function K(e,r){var t=e.match(r.IPV4ADDRESS)||[],n=l(t,2)[1];return n?n.split(".").map(M).join("."):e}function Z(e,r){var t=e.match(r.IPV6ADDRESS)||[],n=l(t,3),o=n[1],a=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],p=u?u.split(":").map(M):[],f=c.split(":").map(M),d=r.IPV4ADDRESS.test(f[f.length-1]),h=d?7:8,v=f.length-h,y=Array(h),m=0;m<h;++m)y[m]=p[m]||f[v+m]||"";d&&(y[h-1]=K(y[h-1],r));var g=y.reduce((function(e,r,t){if(!r||"0"===r){var n=e[e.length-1];n&&n.index+n.length===t?n.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(g&&g.length>1){var w=y.slice(0,g.index),E=y.slice(g.index+g.length);b=w.join(":")+"::"+E.join(":")}else b=y.join(":");return a&&(b+="%"+a),b}return e}var J=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,B=void 0==="".match(/(){0}/)[1];function W(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},n=!1!==r.iri?u:c;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(J);if(o){B?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=Z(K(t.host,n),n)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var a=z[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)V(t,n);else{if(t.host&&(r.domainHost||a&&a.domainHost))try{t.host=q.toASCII(t.host.replace(n.PCT_ENCODED,H).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}V(t,c)}a&&a.parse&&a.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function G(e,r){var t=!1!==r.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(Z(K(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function re(e){for(var r=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(ee);if(!t)throw new Error("Unexpected dot segment condition");var n=t[0];e=e.slice(n.length),r.push(n)}return r.join("")}function te(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?u:c,n=[],o=z[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?q.toUnicode(e.host):q.toASCII(e.host.replace(t.PCT_ENCODED,H).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}V(e,t),"suffix"!==r.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=G(e,r);if(void 0!==a&&("suffix"!==r.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=re(i)),void 0===a&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=W(te(e,t),t),r=W(te(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(n.scheme=r.scheme,n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(r.path?("/"===r.path.charAt(0)?n.path=re(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:n.path=r.path:n.path="/"+r.path,n.path=re(n.path)),n.query=r.query):(n.path=e.path,void 0!==r.query?n.query=r.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=r.fragment,n}function oe(e,r,t){var n=i({scheme:"null"},t);return te(ne(W(e,n),W(r,n),n,!0),n)}function ae(e,r){return"string"==typeof e?e=te(W(e,r),r):"object"===n(e)&&(e=W(te(e,r),r)),e}function ie(e,r,t){return"string"==typeof e?e=te(W(e,t),t):"object"===n(e)&&(e=te(e,t)),"string"==typeof r?r=te(W(r,t),t):"object"===n(r)&&(r=te(r,t)),e===r}function se(e,r){return e&&e.toString().replace(r&&r.iri?u.ESCAPE:c.ESCAPE,L)}function ce(e,r){return e&&e.toString().replace(r&&r.iri?u.PCT_ENCODED:c.PCT_ENCODED,H)}var ue={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=pe(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),n=l(t,2),o=n[0],a=n[1];e.path=o&&"/"!==o?o:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},de={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},he={},ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",me=t(t("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+t("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+t("%"+ye+ye)),ge="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ee=new RegExp(ve,"g"),Se=new RegExp(me,"g"),Ce=new RegExp(r("[^]",ge,"[\\.]",'[\\"]',be),"g"),Oe=new RegExp(r("[^]",ve,we),"g"),Ae=Oe;function Ie(e){var r=H(e);return r.match(Ee)?r:e}var Te={scheme:"mailto",parse:function(e,r){var t=e,n=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,a={},i=t.query.split("&"),s=0,c=i.length;s<c;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),p=0,f=l.length;p<f;++p)n.push(l[p]);break;case"subject":t.subject=ce(u[1],r);break;case"body":t.body=ce(u[1],r);break;default:o=!0,a[ce(u[0],r)]=ce(u[1],r)}}o&&(t.headers=a)}t.query=void 0;for(var d=0,h=n.length;d<h;++d){var v=n[d].split("@");if(v[0]=ce(v[0]),r.unicodeSupport)v[1]=ce(v[1],r).toLowerCase();else try{v[1]=q.toASCII(ce(v[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[d]=v.join("@")}return t},serialize:function(e,r){var t=e,n=a(e.to);if(n){for(var i=0,s=n.length;i<s;++i){var c=String(n[i]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(Se,Ie).replace(Se,o).replace(Ce,L),p=c.slice(u+1);try{p=r.iri?q.toUnicode(p):q.toASCII(ce(p,r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=l+"@"+p}t.path=n.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var d=[];for(var h in f)f[h]!==he[h]&&d.push(h.replace(Se,Ie).replace(Se,o).replace(Oe,L)+"="+f[h].replace(Se,Ie).replace(Se,o).replace(Ae,L));return d.length&&(t.query=d.join("&")),t}},je=/^([^\:]+)\:(.*)/,xe={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(je),n=e;if(t){var o=r.scheme||n.scheme||"urn",a=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||a),c=z[s];n.nid=a,n.nss=i,n.path=void 0,c&&(n=c.parse(n,r))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",n=e.nid,o=t+":"+(r.nid||n),a=z[o];a&&(e=a.serialize(e,r));var i=e,s=e.nss;return i.path=(n||r.nid)+":"+s,i}},$e=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,De={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match($e)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};z[ue.scheme]=ue,z[le.scheme]=le,z[fe.scheme]=fe,z[de.scheme]=de,z[Te.scheme]=Te,z[xe.scheme]=xe,z[De.scheme]=De,e.SCHEMES=z,e.pctEncChar=L,e.pctDecChars=H,e.parse=W,e.removeDotSegments=re,e.serialize=te,e.resolveComponents=ne,e.resolve=oe,e.normalize=ae,e.equal=ie,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(r)}(0,o.exports);const a=o.exports,i={null:e=>null===e,boolean:e=>"boolean"==typeof e,object:e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,array:e=>Array.isArray(e),number:e=>"number"==typeof e,integer:e=>Number.isInteger(e),string:e=>"string"==typeof e};var s={jsonTypeOf:(e,r)=>i[r](e),resolveUrl:(e,r)=>{const t=a.resolve(e,r,{iri:!0});if(a.resolve(e,"",{iri:!0})&&"file"===a.parse(t).scheme&&"file"!==a.parse(e).scheme)throw Error(`Can't access file '${t}' resource from network context '${e}'`);return t},urlFragment:e=>a.unescapeComponent(a.parse(e).fragment)||"",pathRelative:(e,r)=>{if(e===r)return"";let t=1;const n=e.length-1,o=r.length-t,a=n<o?n:o;let i=-1,s=0;for(;s<a;s++){const n=e.charCodeAt(s+1);if(n!==r.charCodeAt(t+s))break;47===n&&(i=s)}if(o>a){if(47===r.charCodeAt(t+s))return r.slice(t+s+1);if(0===s)return r.slice(t+s)}n>a&&(47===e.charCodeAt(s+1)?i=s:0===a&&(i=0));let c="";for(s=i+2;s<=e.length;++s)s!==e.length&&47!==e.charCodeAt(s)||(c+=0===c.length?"..":"/..");return t+=i,c.length>0?`${c}${r.slice(t,r.length)}`:(47===r.charCodeAt(t)&&++t,r.slice(t,r.length))}};const c=t,u=e=>{if(e.length>0&&"/"!==e[0])throw Error("Invalid JSON Pointer");return e.split("/").slice(1).map(y)},l=(e,r,t,n)=>{if(0===e.length)return t;if(e.length>1){const o=e.shift();return{...r,[o]:l(e,g(r,o,n),t,h(o,n))}}if(Array.isArray(r)){const n=[...r];return n[m(r,e[0])]=t,n}return"object"==typeof r&&null!==r?{...r,[e[0]]:t}:g(r,e[0],n)},p=(e,r,t,n)=>{if(0!==e.length)if(1!==e.length||b(r)){const o=e.shift();p(e,g(r,o,n),t,h(o,n))}else{r[m(r,e[0])]=t}},f=(e,r,t)=>{if(0!=e.length){if(e.length>1){const n=e.shift(),o=g(r,n,t);return{...r,[n]:f(e,o,h(n,t))}}if(Array.isArray(r))return r.filter(((r,t)=>t!=e[0]));if("object"==typeof r&&null!==r){const{[e[0]]:t,...n}=r;return n}return g(r,e[0],t)}},d=(e,r,t)=>{if(0!==e.length)if(e.length>1){const n=e.shift(),o=g(r,n,t);d(e,o,h(n,t))}else Array.isArray(r)?r.splice(e[0],1):"object"==typeof r&&null!==r?delete r[e[0]]:g(r,e[0],t)},h=c(((e,r)=>r+"/"+v(e))),v=e=>e.toString().replace(/~/g,"~0").replace(/\//g,"~1"),y=e=>e.toString().replace(/~1/g,"/").replace(/~0/g,"~"),m=(e,r)=>Array.isArray(e)&&"-"===r?e.length:r,g=(e,r,t="")=>{if(void 0===e)throw TypeError(`Value at '${t}' is undefined and does not have property '${r}'`);if(null===e)throw TypeError(`Value at '${t}' is null and does not have property '${r}'`);if(b(e))throw TypeError(`Value at '${t}' is a ${typeof e} and does not have property '${r}'`);return e[m(e,r)]},b=e=>null===e||"object"!=typeof e;var w={nil:"",append:h,get:(e,r)=>{const t=u(e),n=e=>t.reduce((([e,r],t)=>[g(e,t,r),h(t,r)]),[e,""])[0];return void 0===r?n:n(r)},set:(e,r,t)=>{const n=u(e),o=c(((e,r)=>l(n,e,r,"")));return void 0===r?o:o(r,t)},assign:(e,r,t)=>{const n=u(e),o=c(((e,r)=>p(n,e,r,"")));return void 0===r?o:o(r,t)},unset:(e,r)=>{const t=u(e),n=e=>f(t,e,"");return void 0===r?n:n(r)},remove:(e,r)=>{const t=u(e),n=e=>d(t,e,"");return void 0===r?n:n(r)}};const E=Symbol("$__value"),S=Symbol("$__href");var C={cons:(e,r)=>Object.freeze({[S]:e,[E]:r}),isReference:e=>e&&void 0!==e[S],href:e=>e[S],value:e=>e[E]};const O=w,A=t,{resolveUrl:I,jsonTypeOf:T}=s,j=C,x=Object.freeze({id:"",pointer:"",instance:void 0,value:void 0}),$=e=>j.isReference(e.value)?j.value(e.value):e.value,D=A(((e,r)=>T($(e),r))),P=(e,r)=>Object.freeze({...r,pointer:O.append(e,r.pointer),value:$(r)[e]}),N=A(((e,r)=>$(r).map(((t,n,o,a)=>e(P(n,r),n,o,a))))),R=A(((e,r)=>$(r).forEach(((t,n,o,a)=>e(P(n,r),n,o,a))))),F=A(((e,r)=>$(r).map(((e,t,n,o)=>P(t,r))).filter(((r,t,n,o)=>e(r,t,n,o))))),_=A(((e,r,t)=>$(t).reduce(((r,n,o)=>e(r,P(o,t),o)),r))),U=A(((e,r)=>$(r).every(((t,n,o,a)=>e(P(n,r),n,o,a))))),k=A(((e,r)=>$(r).some(((t,n,o,a)=>e(P(n,r),n,o,a)))));var q={nil:x,cons:(e,r="")=>Object.freeze({...x,id:I(r,""),instance:e,value:e}),get:(e,r=x)=>{if(!e.startsWith("#"))throw Error(`No JSON document found at '${e.split("#")[0]}'`);return Object.freeze({...r,pointer:e.substr(1)})},uri:e=>`${e.id}#${encodeURI(e.pointer)}`,value:$,has:(e,r)=>e in $(r),typeOf:D,length:e=>$(e).length,step:P,entries:e=>Object.keys($(e)).map((r=>[r,P(r,e)])),keys:e=>Object.keys($(e)),map:N,forEach:R,filter:F,reduce:_,every:U,some:k},z=async e=>Object.entries(await e);var L=t((async(e,r)=>(await r).map(e)));var H=t((async(e,r,t)=>(await t).reduce((async(r,t)=>e(await r,t)),r)));const V=H;var M=t((async(e,r,t={})=>V((async(r,t)=>await e(t)?r.concat([t]):r),[],r,t)));const K=L;var Z=t((async(e,r)=>{const t=await K(e,r);return(await Promise.all(t)).some((e=>e))}));const J=L;var B=t((async(e,r)=>{const t=await J(e,r);return(await Promise.all(t)).every((e=>e))}));var W=t(((e,r)=>e.reduce((async(e,r)=>r(await e)),r)));const G=W,Q=z,Y=H;var X={entries:z,map:L,filter:M,reduce:H,some:Z,every:B,pipeline:W,all:e=>Promise.all(e),allValues:e=>G([Q,Y((async(e,[r,t])=>(e[r]=await t,e)),{})],e)},ee=fetch,re={},te=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,ne=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,oe=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,ae=/\\([\u000b\u0020-\u00ff])/g,ie=/([\\"])/g,se=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function ce(e){var r=String(e);if(oe.test(r))return r;if(r.length>0&&!ne.test(r))throw new TypeError("invalid parameter value");return'"'+r.replace(ie,"\\$1")+'"'}function ue(e){this.parameters=Object.create(null),this.type=e}re.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var r=e.parameters,t=e.type;if(!t||!se.test(t))throw new TypeError("invalid type");var n=t;if(r&&"object"==typeof r)for(var o,a=Object.keys(r).sort(),i=0;i<a.length;i++){if(o=a[i],!oe.test(o))throw new TypeError("invalid parameter name");n+="; "+o+"="+ce(r[o])}return n},re.parse=function(e){if(!e)throw new TypeError("argument string is required");var r="object"==typeof e?function(e){var r;"function"==typeof e.getHeader?r=e.getHeader("content-type"):"object"==typeof e.headers&&(r=e.headers&&e.headers["content-type"]);if("string"!=typeof r)throw new TypeError("content-type header is missing from object");return r}(e):e;if("string"!=typeof r)throw new TypeError("argument string is required to be a string");var t=r.indexOf(";"),n=-1!==t?r.substr(0,t).trim():r.trim();if(!se.test(n))throw new TypeError("invalid media type");var o=new ue(n.toLowerCase());if(-1!==t){var a,i,s;for(te.lastIndex=t;i=te.exec(r);){if(i.index!==t)throw new TypeError("invalid parameter format");t+=i[0].length,a=i[1].toLowerCase(),'"'===(s=i[2])[0]&&(s=s.substr(1,s.length-2).replace(ae,"$1")),o.parameters[a]=s}if(t!==r.length)throw new TypeError("invalid parameter format")}return o};const le=re,pe={};var fe={addPlugin:(e,r)=>{pe[e]=r},parse:e=>{const r=le.parse(e.headers.get("content-type"));if(!(r.type in pe))throw Error(`${e.url} is not a schema. Found a document with media type: ${r.type}`);return pe[r.type].parse(e,r.parameters)},getContentType:e=>{for(const r in pe)if(pe[r].matcher(e))return r;return"application/octet-stream"}};const de=t,he=X,ve=w,{jsonTypeOf:ye,resolveUrl:me,urlFragment:ge,pathRelative:be}=s,we=ee,Ee=C,Se=fe,Ce="https://json-schema.org/draft/2019-09/vocab/core",Oe="https://json-schema.org/draft/2020-12/vocab/core",Ae={},Ie={},Te=(e,r)=>{const t=Ie[e];return Ae[t]?.[r]},je={},xe={},$e=(e,r="",t="")=>{e=JSON.parse(JSON.stringify(e));const n=me(r,""),o=me(e.$schema||t,"");if(!o)throw Error("Couldn't determine schema dialect");if(delete e.$schema,!(o in Ie))if(!0===e?.$vocabulary?.[Ce]&&o===De(e,n,Ce)[0])Ie[o]=Ce;else if(!0===e?.$vocabulary?.[Oe]&&o===De(e,n,Oe)[0])Ie[o]=Oe;else{const e=je[o];if(!e)throw Error(`Couldn't determine JSON Schema version for dialect: '${o}'`);!0===e.vocabulary[Ce]?Ie[o]=Ce:!0===e.vocabulary[Oe]?Ie[o]=Oe:Ie[o]=Ie[e.dialectId]}const[a,i]=De(e,n,Ie[o]);if(!a)throw Error("Couldn't determine an identifier for the schema");const s=Te(o,"baseToken");delete e[s],n&&(xe[n]=a);const c=Te(o,"anchorToken");i&&s===c&&(e[c]=c!==s?encodeURI(i):`#${encodeURI(i)}`);const u={},l=Te(o,"recursiveAnchorToken");let p;!0===e[l]&&(u[""]=`${a}#`,e[c]="",delete e[l]);const f=Te(o,"vocabularyToken");ye(e[f],"object")?(p=e[f],delete e[f]):p={[Ie[o]]:!0};const d={"":""};return je[a]={id:a,dialectId:o,schema:Pe(e,a,o,ve.nil,d,u),anchors:d,dynamicAnchors:u,vocabulary:p,validated:!1},a},De=(e,r,t)=>{const n=Ae[t]?.baseToken,o=me(r,e[n]||"");return[me(o,""),ge(o)]},Pe=(e,r,t,n,o,a)=>{if(ye(e,"object")){const i="string"==typeof e.$schema?me(e.$schema,""):t,s=Te(i,"embeddedToken"),c=Te(i,"anchorToken");if("string"==typeof e[s]&&(s!==c||"#"!==e[s][0])){const n=me(r,e[s]);return e[Te(i,"baseToken")]=n,$e(e,n,t),Ee.cons(e[s],e)}const u=Te(t,"anchorToken"),l=Te(t,"dynamicAnchorToken");"string"==typeof e[l]&&(a[e[l]]=`${r}#${encodeURI(n)}`,o[e[l]]=n,delete e[l]);const p=Te(t,"embeddedToken");if("string"==typeof e[u]){const r=u!==p?e[u]:e[u].slice(1);o[r]=n,delete e[u]}const f=Te(t,"jrefToken");if("string"==typeof e[f])return Ee.cons(e[f],e);for(const i in e)e[i]=Pe(e[i],r,t,ve.append(i,n),o,a);return e}return Array.isArray(e)?e.map(((e,i)=>Pe(e,r,t,ve.append(i,n),o,a))):e},Ne=e=>je[xe[e]]||je[e],Re=Object.freeze({id:"",dialectId:void 0,vocabulary:{},pointer:ve.nil,schema:void 0,value:void 0,anchors:{},dynamicAnchors:{},validated:!0}),Fe=async(e,r=Re)=>{const t=me(ke(r),e),n=me(t,""),o=ge(t);if(!(e=>e in je||e in xe)(n)){const e=await we(n,{headers:{Accept:"application/schema+json"}});if(e.status>=400)throw await e.text(),Error(`Failed to retrieve schema with id: ${n}`);const[r,t]=await Se.parse(e),o=me(r.$schema,"")||t;n===o||o in Ie||await Fe(o),$e(r,n)}const a=Ne(n),i="/"!==o[0]?Ue(a,o):o,s=Object.freeze({...a,pointer:i,value:ve.get(i,a.schema)});return _e(s)},_e=e=>Ee.isReference(e.value)?Fe(Ee.href(e.value),e):e,Ue=(e,r)=>{if(!(r in e.anchors))throw Error(`No such anchor '${encodeURI(e.id)}#${encodeURI(r)}'`);return e.anchors[r]},ke=e=>`${e.id}#${encodeURI(e.pointer)}`,qe=e=>Ee.isReference(e.value)?Ee.value(e.value):e.value,ze=(e,r)=>{const t=Ne(r.id),n=Object.freeze({...r,pointer:ve.append(e,r.pointer),value:qe(r)[e],validated:t.validated});return _e(n)},Le=de(((e,r)=>he.pipeline([qe,he.map((async(t,n)=>e(await ze(n,r),n))),he.all],r))),He={parentId:"",parentDialect:"",includeEmbedded:!0},Ve=(e,r)=>{if(r.startsWith("file://")){const t=e.slice(7,e.lastIndexOf("/"));return""===e?"":be(t,r.slice(7))}return r};var Me={setConfig:(e,r,t)=>{Ie[e]=e,Ae[e]||(Ae[e]={}),Ae[e][r]=t},getConfig:Te,add:$e,get:Fe,markValidated:e=>{je[e].validated=!0},uri:ke,value:qe,getAnchorPointer:Ue,typeOf:(e,r)=>ye(qe(e),r),has:(e,r)=>e in qe(r),step:ze,keys:e=>Object.keys(qe(e)),entries:e=>he.pipeline([qe,Object.keys,he.map((async r=>[r,await ze(r,e)])),he.all],e),map:Le,length:e=>qe(e).length,toSchema:(e,r={})=>{const t={...He,...r},n=JSON.parse(JSON.stringify(e.schema,((r,n)=>{if(!Ee.isReference(n))return n;const o=Ee.value(n),a="string"==typeof o.$schema?me(o.$schema,""):e.dialectId,i=Te(a,"embeddedToken");return!t.includeEmbedded&&i in o?void 0:Ee.value(n)}))),o=Te(e.dialectId,"dynamicAnchorToken");Object.entries(e.dynamicAnchors).forEach((([e,r])=>{const t=ge(r);ve.assign(t,n,{[o]:e,...ve.get(t,n)})}));const a=Te(e.dialectId,"anchorToken");Object.entries(e.anchors).filter((([e])=>""!==e)).forEach((([e,r])=>{ve.assign(r,n,{[a]:e,...ve.get(r,n)})}));const i=Te(e.dialectId,"baseToken"),s=Ve(t.parentId,e.id),c=t.parentDialect===e.dialectId?"":e.dialectId;return{...s&&{[i]:s},...c&&{$schema:c},...n}}};class Ke extends Error{constructor(e){super("Invalid Schema"),this.name=this.constructor.name,this.output=e}}var Ze=Ke;const Je=Me;var Be={compile:e=>Je.value(e),interpret:()=>!0};const We=t,Ge=n.exports,{resolveUrl:Qe}=s,Ye=q,Xe=Me,er=Ze,rr=fe,tr=Be,nr="FLAG",or="BASIC",ar="DETAILED",ir="VERBOSE";let sr=ar,cr=!0;rr.addPlugin("application/schema+json",{parse:async(e,r)=>[await e.json(),r.schema||r.profile],matcher:e=>e.endsWith(".schema.json")});const ur=async e=>{const r={metaData:{}};return{ast:r,schemaUri:await mr(e,r)}},lr=We((({ast:e,schemaUri:r},t,n=nr)=>{if(![nr,or,ar,ir].includes(n))throw Error(`The '${n}' error format is not supported`);const o=[],a=Ge.subscribe("result",pr(n,o));return br(r,t,e,{}),Ge.unsubscribe(a),o[0]})),pr=(e,r)=>{const t=[];return(n,o)=>{if("result"===n){const{keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a}=o,i={keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a,errors:[]};t.push(i)}else if("result.start"===n)t.push(n);else if("result.end"===n){const n=t.pop();for(;"result.start"!==t[t.length-1];){const r=t.pop(),o=[r];e===or&&(o.push(...r.errors),delete r.errors),(e===ir||e!==nr&&!r.valid)&&n.errors.unshift(...o)}t[t.length-1]=n,r[0]=n}}},fr={},dr=e=>fr[e]||tr,hr=e=>e in fr,vr={},yr={},mr=async(e,r)=>{if(e=await gr(e),!hr(`${e.dialectId}#validate`)){const r=await Xe.get(e.dialectId);(Xe.getConfig(r.id,"mandatoryVocabularies")||[]).forEach((e=>{if(!r.vocabulary[e])throw Error(`Vocabulary '${e}' must be explicitly declared and required`)})),Object.entries(r.vocabulary).forEach((([e,t])=>{if(e in vr)Object.entries(vr[e]).forEach((([e,t])=>{((e,r)=>{fr[e]={collectEvaluatedItems:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&new Set,collectEvaluatedProperties:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&[],...r}})(`${r.id}#${e}`,t)}));else if(t)throw Error(`Missing required vocabulary: ${e}`)}))}if(cr&&!e.validated){if(Xe.markValidated(e.id),!(e.dialectId in yr)){const r=await Xe.get(e.dialectId),t=await ur(r);yr[r.id]=lr(t)}const r=Ye.cons(e.schema,e.id),t=yr[e.dialectId](r,sr);if(!t.valid)throw new er(t)}return e.id in r.metaData||(r.metaData[e.id]={id:e.id,dynamicAnchors:e.dynamicAnchors,anchors:e.anchors}),dr(`${e.dialectId}#validate`).compile(e,r)},gr=async e=>Xe.typeOf(e,"string")?gr(await Xe.get(Xe.value(e),e)):e,br=(e,r,t,n)=>{const o=wr(e,t),a=Qe(e,"");return dr(o).interpret(e,r,t,{...t.metaData[a].dynamicAnchors,...n})},wr=(e,r)=>{if(!(e in r))throw Error(`No schema found at ${e}`);return r[e][0]};var Er={validate:async(e,r,t)=>{const n=await ur(e),o=(e,r)=>lr(n,Ye.cons(e),r);return void 0===r?o:o(r,t)},compile:ur,interpret:lr,setMetaOutputFormat:e=>{sr=e},setShouldMetaValidate:e=>{cr=e},FLAG:nr,BASIC:or,DETAILED:ar,VERBOSE:ir,add:(e,r="",t="")=>{const n=Xe.add(e,r,t);delete yr[n]},getKeyword:dr,hasKeyword:hr,defineVocabulary:(e,r)=>{vr[e]=r},compileSchema:mr,interpretSchema:br,collectEvaluatedProperties:(e,r,t,n,o)=>{const a=wr(e,t);return dr(a).collectEvaluatedProperties(e,r,t,n,o)},collectEvaluatedItems:(e,r,t,n,o)=>{const a=wr(e,t);return dr(a).collectEvaluatedItems(e,r,t,n,o)},addMediaTypePlugin:rr.addPlugin};const Sr=X,Cr=n.exports,Or=Er,Ar=q,Ir=Me;var Tr={compile:async(e,r)=>{const t=Ir.uri(e);if(!(t in r)){r[t]=!1;const n=Ir.value(e);if(!["object","boolean"].includes(typeof n))throw Error(`No schema found at '${Ir.uri(e)}'`);r[t]=[`${e.dialectId}#validate`,Ir.uri(e),"boolean"==typeof n?n:await Sr.pipeline([Ir.entries,Sr.map((([r,t])=>[`${e.dialectId}#${r}`,t])),Sr.filter((([r])=>r!==`${e.dialectId}#validate`)),Sr.map((async([t,n])=>{const o=await Or.getKeyword(t).compile(n,r,e);return[t,Ir.uri(n),o]})),Sr.all],e)]}return t},interpret:(e,r,t,n)=>{const[o,a,i]=t[e];Cr.publishSync("result.start");const s="boolean"==typeof i?i:i.every((([e,o,a])=>{Cr.publishSync("result.start");const i=Or.getKeyword(e).interpret(a,r,t,n);return Cr.publishSync("result",{keyword:e,absoluteKeywordLocation:o,instanceLocation:Ar.uri(r),valid:i,ast:a}),Cr.publishSync("result.end"),i}));return Cr.publishSync("result",{keyword:o,absoluteKeywordLocation:a,instanceLocation:Ar.uri(r),valid:s,ast:e}),Cr.publishSync("result.end"),s},collectEvaluatedProperties:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&[]:a.filter((([e])=>!o||!e.endsWith("#unevaluatedProperties"))).reduce(((e,[o,,a])=>{const i=e&&Or.getKeyword(o).collectEvaluatedProperties(a,r,t,n);return!1!==i&&[...e,...i]}),[])},collectEvaluatedItems:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&new Set:a.filter((([e])=>!o||!e.endsWith("#unevaluatedItems"))).reduce(((e,[o,,a])=>{const i=!1!==e&&Or.getKeyword(o).collectEvaluatedItems(a,r,t,n);return!1!==i&&new Set([...e,...i])}),new Set)}};e("default",{Core:Er,Schema:Me,Instance:q,Reference:C,Keywords:{metaData:Be,validate:Tr},InvalidSchemaError:Ze})}}})); | ||
//# sourceMappingURL=json-schema-core-system.min.js.map |
@@ -1,9 +0,3 @@ | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).JSC={})}(this,(function(e){"use strict";var r=function(e,r){return function t(){null==r&&(r=e.length);var n=[].slice.call(arguments);return n.length>=r?e.apply(this,n):function(){return t.apply(this,n.concat([].slice.call(arguments)))}}};var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e,r){return e(r={exports:{}},r.exports),r.exports}var o=n((function(e,r){var n,o;n="object"==typeof window&&window||t,o={},n.PubSub?(o=n.PubSub,console.warn("PubSub already loaded, using existing version")):(n.PubSub=o,function(e){var r={},t=-1,n="*";function o(e){var r;for(r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!0;return!1}function a(e){return function(){throw e}}function i(e,r,t){try{e(r,t)}catch(e){setTimeout(a(e),0)}}function s(e,r,t){e(r,t)}function c(e,t,n,o){var a,c=r[t],u=o?s:i;if(Object.prototype.hasOwnProperty.call(r,t))for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&u(c[a],e,n)}function u(e,r,t){return function(){var o=String(e),a=o.lastIndexOf(".");for(c(e,e,r,t);-1!==a;)a=(o=o.substr(0,a)).lastIndexOf("."),c(e,o,r,t);c(e,n,r,t)}}function l(e){var t=String(e);return Boolean(Object.prototype.hasOwnProperty.call(r,t)&&o(r[t]))}function p(e){for(var r=String(e),t=l(r)||l(n),o=r.lastIndexOf(".");!t&&-1!==o;)o=(r=r.substr(0,o)).lastIndexOf("."),t=l(r);return t}function f(e,r,t,n){var o=u(e="symbol"==typeof e?e.toString():e,r,n);return!!p(e)&&(!0===t?o():setTimeout(o,0),!0)}e.publish=function(r,t){return f(r,t,!1,e.immediateExceptions)},e.publishSync=function(r,t){return f(r,t,!0,e.immediateExceptions)},e.subscribe=function(e,n){if("function"!=typeof n)return!1;e="symbol"==typeof e?e.toString():e,Object.prototype.hasOwnProperty.call(r,e)||(r[e]={});var o="uid_"+String(++t);return r[e][o]=n,o},e.subscribeAll=function(r){return e.subscribe(n,r)},e.subscribeOnce=function(r,t){var n=e.subscribe(r,(function(){e.unsubscribe(n),t.apply(this,arguments)}));return e},e.clearAllSubscriptions=function(){r={}},e.clearSubscriptions=function(e){var t;for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&delete r[t]},e.countSubscriptions=function(e){var t,n,o=0;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)){for(n in r[t])o++;break}return o},e.getSubscriptions=function(e){var t,n=[];for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&n.push(t);return n},e.unsubscribe=function(t){var n,o,a,i=function(e){var t;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e))return!0;return!1},s="string"==typeof t&&(Object.prototype.hasOwnProperty.call(r,t)||i(t)),c=!s&&"string"==typeof t,u="function"==typeof t,l=!1;if(!s){for(n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(o=r[n],c&&o[t]){delete o[t],l=t;break}if(u)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&o[a]===t&&(delete o[a],l=!0)}return l}e.clearSubscriptions(t)}}(o)),void 0!==e&&e.exports&&(r=e.exports=o),r.PubSub=o,e.exports=r=o}));o.PubSub;var a,i=n((function(e,r){ | ||
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ | ||
!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var n=r.length-1,o=1;o<n;++o)r[o]=r[o].slice(1,-1);return r[n]=r[n].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,r){var t=e;if(r)for(var n in r)t[n]=r[n];return t}function s(e){var n="[A-Za-z]",o="[0-9]",a=r(o,"[A-Fa-f]"),i=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=r("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=r(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t(n+r(n,o,"[\\+\\-\\.]")+"*"),t(t(i+"|"+r(l,s,"[\\:]"))+"*");var p=t(t("25[0-5]")+"|"+t("2[0-4]"+o)+"|"+t("1"+o+o)+"|"+t("0?[1-9]"+o)+"|0?0?"+o),f=t(p+"\\."+p+"\\."+p+"\\."+p),d=t(a+"{1,4}"),h=t(t(d+"\\:"+d)+"|"+f),v=t(t(d+"\\:")+"{6}"+h),y=t("\\:\\:"+t(d+"\\:")+"{5}"+h),m=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+h),g=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+h),b=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+h),w=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+h),E=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+h),S=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),C=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),O=t([v,y,m,g,b,w,E,S,C].join("|")),A=t(t(l+"|"+i)+"+");t("[vV]"+a+"+\\."+r(l,s,"[\\:]")+"+"),t(t(i+"|"+r(l,s))+"*");var I=t(i+"|"+r(l,s,"[\\:\\@]"));return t(t(i+"|"+r(l,s,"[\\@]"))+"+"),t(t(I+"|"+r("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(r("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+O+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+A+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,r){var t=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)},f=2147483647,d=36,h=1,v=26,y=38,m=700,g=72,b=128,w="-",E=/^xn--/,S=/[^\0-\x7E]/,C=/[\x2E\u3002\uFF0E\uFF61]/g,O={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=d-h,I=Math.floor,T=String.fromCharCode;function j(e){throw new RangeError(O[e])}function x(e,r){for(var t=[],n=e.length;n--;)t[n]=r(e[n]);return t}function P(e,r){var t=e.split("@"),n="";return t.length>1&&(n=t[0]+"@",e=t[1]),n+x((e=e.replace(C,".")).split("."),r).join(".")}function $(e){for(var r=[],t=0,n=e.length;t<n;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<n){var a=e.charCodeAt(t++);56320==(64512&a)?r.push(((1023&o)<<10)+(1023&a)+65536):(r.push(o),t--)}else r.push(o)}return r}var D=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:d},R=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},N=function(e,r,t){var n=0;for(e=t?I(e/m):e>>1,e+=I(e/r);e>A*v>>1;n+=d)e=I(e/A);return I(n+(A+1)*e/(e+y))},_=function(e){var r=[],t=e.length,n=0,o=b,a=g,i=e.lastIndexOf(w);i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&j("not-basic"),r.push(e.charCodeAt(s));for(var c=i>0?i+1:0;c<t;){for(var u=n,l=1,p=d;;p+=d){c>=t&&j("invalid-input");var y=D(e.charCodeAt(c++));(y>=d||y>I((f-n)/l))&&j("overflow"),n+=y*l;var m=p<=a?h:p>=a+v?v:p-a;if(y<m)break;var E=d-m;l>I(f/E)&&j("overflow"),l*=E}var S=r.length+1;a=N(n-u,S,0==u),I(n/S)>f-o&&j("overflow"),o+=I(n/S),n%=S,r.splice(n++,0,o)}return String.fromCodePoint.apply(String,r)},F=function(e){var r=[],t=(e=$(e)).length,n=b,o=0,a=g,i=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var p=u.value;p<128&&r.push(T(p))}}catch(e){s=!0,c=e}finally{try{!i&&l.return&&l.return()}finally{if(s)throw c}}var y=r.length,m=y;for(y&&r.push(w);m<t;){var E=f,S=!0,C=!1,O=void 0;try{for(var A,x=e[Symbol.iterator]();!(S=(A=x.next()).done);S=!0){var P=A.value;P>=n&&P<E&&(E=P)}}catch(e){C=!0,O=e}finally{try{!S&&x.return&&x.return()}finally{if(C)throw O}}var D=m+1;E-n>I((f-o)/D)&&j("overflow"),o+=(E-n)*D,n=E;var _=!0,F=!1,k=void 0;try{for(var U,q=e[Symbol.iterator]();!(_=(U=q.next()).done);_=!0){var L=U.value;if(L<n&&++o>f&&j("overflow"),L==n){for(var z=o,H=d;;H+=d){var V=H<=a?h:H>=a+v?v:H-a;if(z<V)break;var M=z-V,K=d-V;r.push(T(R(V+M%K,0))),z=I(M/K)}r.push(T(R(z,0))),a=N(o,D,m==y),o=0,++m}}}catch(e){F=!0,k=e}finally{try{!_&&q.return&&q.return()}finally{if(F)throw k}}++o,++n}return r.join("")},k=function(e){return P(e,(function(e){return E.test(e)?_(e.slice(4).toLowerCase()):e}))},U=function(e){return P(e,(function(e){return S.test(e)?"xn--"+F(e):e}))},q={version:"2.1.0",ucs2:{decode:$,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:_,encode:F,toASCII:U,toUnicode:k},L={};function z(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function H(e){for(var r="",t=0,n=e.length;t<n;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(n-t>=6){var a=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(n-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function V(e,r){function t(e){var t=H(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,z).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,z).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,z).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,z).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,z).replace(r.PCT_ENCODED,o)),e}function M(e){return e.replace(/^0*(.*)/,"$1")||"0"}function K(e,r){var t=e.match(r.IPV4ADDRESS)||[],n=l(t,2)[1];return n?n.split(".").map(M).join("."):e}function Z(e,r){var t=e.match(r.IPV6ADDRESS)||[],n=l(t,3),o=n[1],a=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],p=u?u.split(":").map(M):[],f=c.split(":").map(M),d=r.IPV4ADDRESS.test(f[f.length-1]),h=d?7:8,v=f.length-h,y=Array(h),m=0;m<h;++m)y[m]=p[m]||f[v+m]||"";d&&(y[h-1]=K(y[h-1],r));var g=y.reduce((function(e,r,t){if(!r||"0"===r){var n=e[e.length-1];n&&n.index+n.length===t?n.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(g&&g.length>1){var w=y.slice(0,g.index),E=y.slice(g.index+g.length);b=w.join(":")+"::"+E.join(":")}else b=y.join(":");return a&&(b+="%"+a),b}return e}var J=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,B=void 0==="".match(/(){0}/)[1];function G(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},n=!1!==r.iri?u:c;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(J);if(o){B?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=Z(K(t.host,n),n)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var a=L[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)V(t,n);else{if(t.host&&(r.domainHost||a&&a.domainHost))try{t.host=q.toASCII(t.host.replace(n.PCT_ENCODED,H).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}V(t,c)}a&&a.parse&&a.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function W(e,r){var t=!1!==r.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(Z(K(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function re(e){for(var r=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(ee);if(!t)throw new Error("Unexpected dot segment condition");var n=t[0];e=e.slice(n.length),r.push(n)}return r.join("")}function te(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?u:c,n=[],o=L[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?q.toUnicode(e.host):q.toASCII(e.host.replace(t.PCT_ENCODED,H).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}V(e,t),"suffix"!==r.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=W(e,r);if(void 0!==a&&("suffix"!==r.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=re(i)),void 0===a&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=G(te(e,t),t),r=G(te(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(n.scheme=r.scheme,n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(r.path?("/"===r.path.charAt(0)?n.path=re(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:n.path=r.path:n.path="/"+r.path,n.path=re(n.path)),n.query=r.query):(n.path=e.path,void 0!==r.query?n.query=r.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=r.fragment,n}function oe(e,r,t){var n=i({scheme:"null"},t);return te(ne(G(e,n),G(r,n),n,!0),n)}function ae(e,r){return"string"==typeof e?e=te(G(e,r),r):"object"===n(e)&&(e=G(te(e,r),r)),e}function ie(e,r,t){return"string"==typeof e?e=te(G(e,t),t):"object"===n(e)&&(e=te(e,t)),"string"==typeof r?r=te(G(r,t),t):"object"===n(r)&&(r=te(r,t)),e===r}function se(e,r){return e&&e.toString().replace(r&&r.iri?u.ESCAPE:c.ESCAPE,z)}function ce(e,r){return e&&e.toString().replace(r&&r.iri?u.PCT_ENCODED:c.PCT_ENCODED,H)}var ue={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=pe(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),n=l(t,2),o=n[0],a=n[1];e.path=o&&"/"!==o?o:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},de={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},he={},ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",me=t(t("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+t("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+t("%"+ye+ye)),ge="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ee=new RegExp(ve,"g"),Se=new RegExp(me,"g"),Ce=new RegExp(r("[^]",ge,"[\\.]",'[\\"]',be),"g"),Oe=new RegExp(r("[^]",ve,we),"g"),Ae=Oe;function Ie(e){var r=H(e);return r.match(Ee)?r:e}var Te={scheme:"mailto",parse:function(e,r){var t=e,n=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,a={},i=t.query.split("&"),s=0,c=i.length;s<c;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),p=0,f=l.length;p<f;++p)n.push(l[p]);break;case"subject":t.subject=ce(u[1],r);break;case"body":t.body=ce(u[1],r);break;default:o=!0,a[ce(u[0],r)]=ce(u[1],r)}}o&&(t.headers=a)}t.query=void 0;for(var d=0,h=n.length;d<h;++d){var v=n[d].split("@");if(v[0]=ce(v[0]),r.unicodeSupport)v[1]=ce(v[1],r).toLowerCase();else try{v[1]=q.toASCII(ce(v[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[d]=v.join("@")}return t},serialize:function(e,r){var t=e,n=a(e.to);if(n){for(var i=0,s=n.length;i<s;++i){var c=String(n[i]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(Se,Ie).replace(Se,o).replace(Ce,z),p=c.slice(u+1);try{p=r.iri?q.toUnicode(p):q.toASCII(ce(p,r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=l+"@"+p}t.path=n.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var d=[];for(var h in f)f[h]!==he[h]&&d.push(h.replace(Se,Ie).replace(Se,o).replace(Oe,z)+"="+f[h].replace(Se,Ie).replace(Se,o).replace(Ae,z));return d.length&&(t.query=d.join("&")),t}},je=/^([^\:]+)\:(.*)/,xe={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(je),n=e;if(t){var o=r.scheme||n.scheme||"urn",a=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||a),c=L[s];n.nid=a,n.nss=i,n.path=void 0,c&&(n=c.parse(n,r))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",n=e.nid,o=t+":"+(r.nid||n),a=L[o];a&&(e=a.serialize(e,r));var i=e,s=e.nss;return i.path=(n||r.nid)+":"+s,i}},Pe=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,$e={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match(Pe)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};L[ue.scheme]=ue,L[le.scheme]=le,L[fe.scheme]=fe,L[de.scheme]=de,L[Te.scheme]=Te,L[xe.scheme]=xe,L[$e.scheme]=$e,e.SCHEMES=L,e.pctEncChar=z,e.pctDecChars=H,e.parse=G,e.removeDotSegments=re,e.serialize=te,e.resolveComponents=ne,e.resolve=oe,e.normalize=ae,e.equal=ie,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(r)}));(a=i)&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")&&a.default;const s={null:e=>null===e,boolean:e=>"boolean"==typeof e,object:e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,array:e=>Array.isArray(e),number:e=>"number"==typeof e,integer:e=>Number.isInteger(e),string:e=>"string"==typeof e};var c={jsonTypeOf:(e,r)=>s[r](e),resolveUrl:(e,r)=>{const t=i.resolve(e,r,{iri:!0});if(i.resolve(e,"",{iri:!0})&&"file"===i.parse(t).scheme&&"file"!==i.parse(e).scheme)throw Error(`Can't access file '${t}' resource from network context '${e}'`);return t},urlFragment:e=>i.unescapeComponent(i.parse(e).fragment)||"",pathRelative:(e,r)=>{if(e===r)return"";let t=1;const n=e.length-1,o=r.length-t,a=n<o?n:o;let i=-1,s=0;for(;s<a;s++){const n=e.charCodeAt(s+1);if(n!==r.charCodeAt(t+s))break;47===n&&(i=s)}if(o>a){if(47===r.charCodeAt(t+s))return r.slice(t+s+1);if(0===s)return r.slice(t+s)}n>a&&(47===e.charCodeAt(s+1)?i=s:0===a&&(i=0));let c="";for(s=i+2;s<=e.length;++s)s!==e.length&&47!==e.charCodeAt(s)||(c+=0===c.length?"..":"/..");return t+=i,c.length>0?`${c}${r.slice(t,r.length)}`:(47===r.charCodeAt(t)&&++t,r.slice(t,r.length))}};const u=e=>{if(e.length>0&&"/"!==e[0])throw Error("Invalid JSON Pointer");return e.split("/").slice(1).map(y)},l=(e,r,t,n)=>{if(0===e.length)return t;if(e.length>1){const o=e.shift();return{...r,[o]:l(e,g(r,o,n),t,h(o,n))}}if(Array.isArray(r)){const n=[...r];return n[m(r,e[0])]=t,n}return"object"==typeof r&&null!==r?{...r,[e[0]]:t}:g(r,e[0],n)},p=(e,r,t,n)=>{if(0!==e.length)if(1!==e.length||b(r)){const o=e.shift();p(e,g(r,o,n),t,h(o,n))}else{r[m(r,e[0])]=t}},f=(e,r,t)=>{if(0!=e.length){if(e.length>1){const n=e.shift(),o=g(r,n,t);return{...r,[n]:f(e,o,h(n,t))}}if(Array.isArray(r))return r.filter(((r,t)=>t!=e[0]));if("object"==typeof r&&null!==r){const{[e[0]]:t,...n}=r;return n}return g(r,e[0],t)}},d=(e,r,t)=>{if(0!==e.length)if(e.length>1){const n=e.shift(),o=g(r,n,t);d(e,o,h(n,t))}else Array.isArray(r)?r.splice(e[0],1):"object"==typeof r&&null!==r?delete r[e[0]]:g(r,e[0],t)},h=r(((e,r)=>r+"/"+v(e))),v=e=>e.toString().replace(/~/g,"~0").replace(/\//g,"~1"),y=e=>e.toString().replace(/~1/g,"/").replace(/~0/g,"~"),m=(e,r)=>Array.isArray(e)&&"-"===r?e.length:r,g=(e,r,t="")=>{if(void 0===e)throw TypeError(`Value at '${t}' is undefined and does not have property '${r}'`);if(null===e)throw TypeError(`Value at '${t}' is null and does not have property '${r}'`);if(b(e))throw TypeError(`Value at '${t}' is a ${typeof e} and does not have property '${r}'`);return e[m(e,r)]},b=e=>null===e||"object"!=typeof e;var w={nil:"",append:h,get:(e,r)=>{const t=u(e),n=e=>t.reduce((([e,r],t)=>[g(e,t,r),h(t,r)]),[e,""])[0];return void 0===r?n:n(r)},set:(e,t,n)=>{const o=u(e),a=r(((e,r)=>l(o,e,r,"")));return void 0===t?a:a(t,n)},assign:(e,t,n)=>{const o=u(e),a=r(((e,r)=>p(o,e,r,"")));return void 0===t?a:a(t,n)},unset:(e,r)=>{const t=u(e),n=e=>f(t,e,"");return void 0===r?n:n(r)},remove:(e,r)=>{const t=u(e),n=e=>d(t,e,"");return void 0===r?n:n(r)}};w.nil,w.append,w.get,w.set,w.assign,w.unset,w.remove;const E=Symbol("$__value"),S=Symbol("$__href");var C={cons:(e,r)=>Object.freeze({[S]:e,[E]:r}),isReference:e=>e&&void 0!==e[S],href:e=>e[S],value:e=>e[E]};const{resolveUrl:O,jsonTypeOf:A}=c,I=Object.freeze({id:"",pointer:"",instance:void 0,value:void 0}),T=e=>C.isReference(e.value)?C.value(e.value):e.value,j=r(((e,r)=>A(T(e),r))),x=(e,r)=>Object.freeze({...r,pointer:w.append(e,r.pointer),value:T(r)[e]}),P=r(((e,r)=>T(r).map(((t,n,o,a)=>e(x(n,r),n,o,a))))),$=r(((e,r)=>T(r).map(((e,t,n,o)=>x(t,r))).filter(((r,t,n,o)=>e(r,t,n,o))))),D=r(((e,r,t)=>T(t).reduce(((r,n,o)=>e(r,x(o,t),o)),r))),R=r(((e,r)=>T(r).every(((t,n,o,a)=>e(x(n,r),n,o,a))))),N=r(((e,r)=>T(r).some(((t,n,o,a)=>e(x(n,r),n,o,a)))));var _={nil:I,cons:(e,r="")=>Object.freeze({...I,id:O(r,""),instance:e,value:e}),uri:e=>`${e.id}#${encodeURI(e.pointer)}`,value:T,has:(e,r)=>e in T(r),typeOf:j,step:x,entries:e=>Object.keys(T(e)).map((r=>[r,x(r,e)])),keys:e=>Object.keys(T(e)),map:P,filter:$,reduce:D,every:R,some:N,length:e=>T(e).length},F=async e=>Object.entries(await e),k=r((async(e,r)=>(await r).map(e))),U=r((async(e,r,t)=>(await t).reduce((async(r,t)=>e(await r,t)),r))),q=r((async(e,r,t={})=>U((async(r,t)=>await e(t)?r.concat([t]):r),[],r,t))),L=r((async(e,r)=>{const t=await k(e,r);return(await Promise.all(t)).some((e=>e))})),z=r((async(e,r)=>{const t=await k(e,r);return(await Promise.all(t)).every((e=>e))})),H=r(((e,r)=>e.reduce((async(e,r)=>r(await e)),r))),V={entries:F,map:k,filter:q,reduce:U,some:L,every:z,pipeline:H,all:e=>Promise.all(e),allValues:e=>H([F,U((async(e,[r,t])=>(e[r]=await t,e)),{})],e)};V.entries,V.map,V.filter,V.reduce,V.some,V.every,V.pipeline,V.all,V.allValues;var M=fetch,K=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,Z=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,J=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,B=/\\([\u000b\u0020-\u00ff])/g,G=/([\\"])/g,W=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,Q=function(e){if(!e)throw new TypeError("argument string is required");var r="object"==typeof e?function(e){var r;"function"==typeof e.getHeader?r=e.getHeader("content-type"):"object"==typeof e.headers&&(r=e.headers&&e.headers["content-type"]);if("string"!=typeof r)throw new TypeError("content-type header is missing from object");return r}(e):e;if("string"!=typeof r)throw new TypeError("argument string is required to be a string");var t=r.indexOf(";"),n=-1!==t?r.substr(0,t).trim():r.trim();if(!W.test(n))throw new TypeError("invalid media type");var o=new X(n.toLowerCase());if(-1!==t){var a,i,s;for(K.lastIndex=t;i=K.exec(r);){if(i.index!==t)throw new TypeError("invalid parameter format");t+=i[0].length,a=i[1].toLowerCase(),'"'===(s=i[2])[0]&&(s=s.substr(1,s.length-2).replace(B,"$1")),o.parameters[a]=s}if(t!==r.length)throw new TypeError("invalid parameter format")}return o}; | ||
/*! | ||
* content-type | ||
* Copyright(c) 2015 Douglas Christopher Wilson | ||
* MIT Licensed | ||
*/function Y(e){var r=String(e);if(J.test(r))return r;if(r.length>0&&!Z.test(r))throw new TypeError("invalid parameter value");return'"'+r.replace(G,"\\$1")+'"'}function X(e){this.parameters=Object.create(null),this.type=e}var ee={format:function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var r=e.parameters,t=e.type;if(!t||!W.test(t))throw new TypeError("invalid type");var n=t;if(r&&"object"==typeof r)for(var o,a=Object.keys(r).sort(),i=0;i<a.length;i++){if(o=a[i],!J.test(o))throw new TypeError("invalid parameter name");n+="; "+o+"="+Y(r[o])}return n},parse:Q};const re={};var te={addPlugin:(e,r)=>{re[e]=r},parse:e=>{const r=ee.parse(e.headers.get("content-type")).type;if(!(r in re))throw Error(`${e.url} is not a schema. Found a document with media type: ${r}`);return re[r].parse(e)},getContentType:e=>{for(const r in re)if(re[r].matcher(e))return r;return"application/octet-stream"}};const{jsonTypeOf:ne,resolveUrl:oe,urlFragment:ae,pathRelative:ie}=c,se="https://json-schema.org/draft/2019-09/vocab/core",ce="https://json-schema.org/draft/2020-12/vocab/core",ue={},le={},pe=(e,r)=>{const t=le[e];return ue[t]?.[r]},fe={},de={},he=(e,r="",t="")=>{e=JSON.parse(JSON.stringify(e));const n=oe(r,""),o=oe(e.$schema||t,"");if(!o)throw Error("Couldn't determine schema dialect");if(delete e.$schema,!(o in le))if(!0===e?.$vocabulary?.[se]&&o===ve(e,n,se)[0])le[o]=se;else if(!0===e?.$vocabulary?.[ce]&&o===ve(e,n,ce)[0])le[o]=ce;else if(o===ve(e,n,o)[0])le[o]=o;else{if(!(o in fe))throw Error(`Couldn't determine JSON Schema version for dialect: '${o}'`);{const e=fe[o];!0===e.vocabulary[se]?le[o]=se:!0===e.vocabulary[ce]?le[o]=ce:le[o]=le[e.dialectId]}}const[a,i]=ve(e,n,le[o]);if(!a)throw Error("Couldn't determine an identifier for the schema");const s=pe(o,"baseToken");delete e[s],n&&(de[n]=a);const c=pe(o,"anchorToken");i&&s===c&&(e[c]=c!==s?encodeURI(i):`#${encodeURI(i)}`);const u={},l=pe(o,"recursiveAnchorToken");let p;!0===e[l]&&(u[""]=`${a}#`,e[c]="",delete e[l]);const f=pe(o,"vocabularyToken");ne(e[f],"object")?(p=e[f],delete e[f]):p={[le[o]]:!0};const d={"":""};return fe[a]={id:a,dialectId:o,schema:ye(e,a,o,w.nil,d,u),anchors:d,dynamicAnchors:u,vocabulary:p,validated:!1},a},ve=(e,r,t)=>{const n=ue[t]?.baseToken,o=oe(r,e[n]||"");return[oe(o,""),ae(o)]},ye=(e,r,t,n,o,a)=>{if(ne(e,"object")){const i="string"==typeof e.$schema?oe(e.$schema,""):t,s=pe(i,"embeddedToken"),c=pe(i,"anchorToken");if("string"==typeof e[s]&&(s!==c||"#"!==e[s][0])){const n=oe(r,e[s]);return e[pe(i,"baseToken")]=n,he(e,n,t),C.cons(e[s],e)}const u=pe(t,"anchorToken"),l=pe(t,"dynamicAnchorToken");"string"==typeof e[l]&&(a[e[l]]=`${r}#${encodeURI(n)}`,o[e[l]]=n,delete e[l]);const p=pe(t,"embeddedToken");if("string"==typeof e[u]){const r=u!==p?e[u]:e[u].slice(1);o[r]=n,delete e[u]}const f=pe(t,"jrefToken");if("string"==typeof e[f])return C.cons(e[f],e);for(const i in e)e[i]=ye(e[i],r,t,w.append(i,n),o,a);return e}return Array.isArray(e)?e.map(((e,i)=>ye(e,r,t,w.append(i,n),o,a))):e},me=e=>fe[de[e]]||fe[e],ge=Object.freeze({id:"",dialectId:void 0,vocabulary:{},pointer:w.nil,schema:void 0,value:void 0,anchors:{},dynamicAnchors:{},validated:!0}),be=async(e,r=ge)=>{const t=oe(Se(r),e),n=oe(t,""),o=ae(t);if(!(e=>e in fe||e in de)(n)){const e=await M(n,{headers:{Accept:"application/schema+json"}});if(e.status>=400)throw await e.text(),Error(`Failed to retrieve schema with id: ${n}`);he(await te.parse(e),n)}const a=me(n),i="/"!==o[0]?Ee(a,o):o,s=Object.freeze({...a,pointer:i,value:w.get(i,a.schema)});return we(s)},we=e=>C.isReference(e.value)?be(C.href(e.value),e):e,Ee=(e,r)=>{if(!(r in e.anchors))throw Error(`No such anchor '${encodeURI(e.id)}#${encodeURI(r)}'`);return e.anchors[r]},Se=e=>`${e.id}#${encodeURI(e.pointer)}`,Ce=e=>C.isReference(e.value)?C.value(e.value):e.value,Oe=(e,r)=>{const t=me(r.id),n=Object.freeze({...r,pointer:w.append(e,r.pointer),value:Ce(r)[e],validated:t.validated});return we(n)},Ae=r(((e,r)=>V.pipeline([Ce,V.map((async(t,n)=>e(await Oe(n,r),n))),V.all],r))),Ie={parentId:"",parentDialect:"",includeEmbedded:!0},Te=(e,r)=>{if(r.startsWith("file://")){const t=e.slice(7,e.lastIndexOf("/"));return""===e?"":ie(t,r.slice(7))}return r};var je={setConfig:(e,r,t)=>{ue[e]||(ue[e]={}),ue[e][r]=t},getConfig:pe,add:he,get:be,markValidated:e=>{fe[e].validated=!0},uri:Se,value:Ce,getAnchorPointer:Ee,typeOf:(e,r)=>ne(Ce(e),r),has:(e,r)=>e in Ce(r),step:Oe,keys:e=>Object.keys(Ce(e)),entries:e=>V.pipeline([Ce,Object.keys,V.map((async r=>[r,await Oe(r,e)])),V.all],e),map:Ae,length:e=>Ce(e).length,toSchema:(e,r={})=>{const t={...Ie,...r},n=JSON.parse(JSON.stringify(e.schema,((r,n)=>{if(!C.isReference(n))return n;const o=C.value(n),a="string"==typeof o.$schema?oe(o.$schema,""):e.dialectId,i=pe(a,"embeddedToken");return!t.includeEmbedded&&i in o?void 0:C.value(n)}))),o=pe(e.dialectId,"dynamicAnchorToken");Object.entries(e.dynamicAnchors).forEach((([e,r])=>{const t=ae(r);w.assign(t,n,{[o]:e,...w.get(t,n)})}));const a=pe(e.dialectId,"anchorToken");Object.entries(e.anchors).filter((([e])=>""!==e)).forEach((([e,r])=>{w.assign(r,n,{[a]:e,...w.get(r,n)})}));const i=pe(e.dialectId,"baseToken"),s=Te(t.parentId,e.id),c=t.parentDialect===e.dialectId?"":e.dialectId;return{...s&&{[i]:s},...c&&{$schema:c},...n}}};je.setConfig,je.getConfig,je.add,je.get,je.markValidated,je.uri,je.value,je.getAnchorPointer,je.typeOf,je.has,je.step,je.keys,je.entries,je.map,je.length,je.toSchema;class xe extends Error{constructor(e){super("Invalid Schema"),this.name=this.constructor.name,this.output=e}}var Pe=xe;var $e={compile:e=>je.value(e),interpret:()=>!0};const{resolveUrl:De}=c,Re="FLAG",Ne="BASIC",_e="DETAILED",Fe="VERBOSE";let ke=_e,Ue=!0;te.addPlugin("application/schema+json",{parse:async e=>await e.json(),matcher:e=>e.endsWith(".schema.json")});const qe=async e=>{const r={metaData:{}};return{ast:r,schemaUri:await Je(e,r)}},Le=r((({ast:e,schemaUri:r},t,n=Re)=>{if(![Re,Ne,_e,Fe].includes(n))throw Error(`The '${n}' error format is not supported`);const a=[],i=o.subscribe("result",ze(n,a));return Ge(r,t,e,{}),o.unsubscribe(i),a[0]})),ze=(e,r)=>{const t=[];return(n,o)=>{if("result"===n){const{keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a}=o,i={keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a,errors:[]};t.push(i)}else if("result.start"===n)t.push(n);else if("result.end"===n){const n=t.pop();for(;"result.start"!==t[t.length-1];){const r=t.pop(),o=[r];e===Ne&&(o.push(...r.errors),delete r.errors),(e===Fe||e!==Re&&!r.valid)&&n.errors.unshift(...o)}t[t.length-1]=n,r[0]=n}}},He={},Ve=e=>He[e]||$e,Me=e=>e in He,Ke={},Ze={},Je=async(e,r)=>{if(e=await Be(e),!Me(`${e.dialectId}#validate`)){const r=await je.get(e.dialectId);(je.getConfig(r.id,"mandatoryVocabularies")||[]).forEach((e=>{if(!r.vocabulary[e])throw Error(`Vocabulary '${e}' must be explicitly declared and required`)})),Object.entries(r.vocabulary).forEach((([e,t])=>{if(e in Ke)Object.entries(Ke[e]).forEach((([e,t])=>{((e,r)=>{He[e]={collectEvaluatedItems:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&new Set,collectEvaluatedProperties:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&[],...r}})(`${r.id}#${e}`,t)}));else if(t)throw Error(`Missing required vocabulary: ${e}`)}))}if(Ue&&!e.validated){if(je.markValidated(e.id),!(e.dialectId in Ze)){const r=await je.get(e.dialectId),t=await qe(r);Ze[r.id]=Le(t)}const r=_.cons(e.schema,e.id),t=Ze[e.dialectId](r,ke);if(!t.valid)throw new Pe(t)}return e.id in r.metaData||(r.metaData[e.id]={id:e.id,dynamicAnchors:e.dynamicAnchors,anchors:e.anchors}),Ve(`${e.dialectId}#validate`).compile(e,r)},Be=async e=>je.typeOf(e,"string")?Be(await je.get(je.value(e),e)):e,Ge=(e,r,t,n)=>{const o=We(e,t),a=De(e,"");return Ve(o).interpret(e,r,t,{...t.metaData[a].dynamicAnchors,...n})},We=(e,r)=>{if(!(e in r))throw Error(`No schema found at ${e}`);return r[e][0]};var Qe={validate:async(e,r,t)=>{const n=await qe(e),o=(e,r)=>Le(n,_.cons(e),r);return void 0===r?o:o(r,t)},compile:qe,interpret:Le,setMetaOutputFormat:e=>{ke=e},setShouldMetaValidate:e=>{Ue=e},FLAG:Re,BASIC:Ne,DETAILED:_e,VERBOSE:Fe,add:(e,r="",t="")=>{const n=je.add(e,r,t);delete Ze[n]},getKeyword:Ve,hasKeyword:Me,defineVocabulary:(e,r)=>{Ke[e]=r},compileSchema:Je,interpretSchema:Ge,collectEvaluatedProperties:(e,r,t,n,o)=>{const a=We(e,t);return Ve(a).collectEvaluatedProperties(e,r,t,n,o)},collectEvaluatedItems:(e,r,t,n,o)=>{const a=We(e,t);return Ve(a).collectEvaluatedItems(e,r,t,n,o)},addMediaTypePlugin:te.addPlugin};var Ye={compile:async(e,r)=>{const t=je.uri(e);if(!(t in r)){r[t]=!1;const n=je.value(e);if(!["object","boolean"].includes(typeof n))throw Error(`No schema found at '${je.uri(e)}'`);r[t]=[`${e.dialectId}#validate`,je.uri(e),"boolean"==typeof n?n:await V.pipeline([je.entries,V.map((([r,t])=>[`${e.dialectId}#${r}`,t])),V.filter((([r])=>r!==`${e.dialectId}#validate`)),V.map((async([t,n])=>{const o=await Qe.getKeyword(t).compile(n,r,e);return[t,je.uri(n),o]})),V.all],e)]}return t},interpret:(e,r,t,n)=>{const[a,i,s]=t[e];o.publishSync("result.start");const c="boolean"==typeof s?s:s.every((([e,a,i])=>{o.publishSync("result.start");const s=Qe.getKeyword(e).interpret(i,r,t,n);return o.publishSync("result",{keyword:e,absoluteKeywordLocation:a,instanceLocation:_.uri(r),valid:s,ast:i}),o.publishSync("result.end"),s}));return o.publishSync("result",{keyword:a,absoluteKeywordLocation:i,instanceLocation:_.uri(r),valid:c,ast:e}),o.publishSync("result.end"),c},collectEvaluatedProperties:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&[]:a.filter((([e])=>!o||!e.endsWith("#unevaluatedProperties"))).reduce(((e,[o,,a])=>{const i=e&&Qe.getKeyword(o).collectEvaluatedProperties(a,r,t,n);return!1!==i&&[...e,...i]}),[])},collectEvaluatedItems:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&new Set:a.filter((([e])=>!o||!e.endsWith("#unevaluatedItems"))).reduce(((e,[o,,a])=>{const i=!1!==e&&Qe.getKeyword(o).collectEvaluatedItems(a,r,t,n);return!1!==i&&new Set([...e,...i])}),new Set)}},Xe={metaData:$e,validate:Ye},er={Core:Qe,Schema:je,Instance:_,Reference:C,Keywords:Xe,InvalidSchemaError:Pe},rr=er.Core,tr=er.Schema,nr=er.Instance,or=er.Reference,ar=er.Keywords,ir=er.InvalidSchemaError;e.Core=rr,e.Instance=nr,e.InvalidSchemaError=ir,e.Keywords=ar,e.Reference=or,e.Schema=tr,e.default=er,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).JSC={})}(this,(function(e){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=function(e,r){return function t(){null==r&&(r=e.length);var n=[].slice.call(arguments);return n.length>=r?e.apply(this,n):function(){return t.apply(this,n.concat([].slice.call(arguments)))}}};var n={exports:{}};!function(e,t){!function(r,n){var o={};r.PubSub?(o=r.PubSub,console.warn("PubSub already loaded, using existing version")):(r.PubSub=o,function(e){var r={},t=-1,n="*";function o(e){var r;for(r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!0;return!1}function a(e){return function(){throw e}}function i(e,r,t){try{e(r,t)}catch(e){setTimeout(a(e),0)}}function s(e,r,t){e(r,t)}function c(e,t,n,o){var a,c=r[t],u=o?s:i;if(Object.prototype.hasOwnProperty.call(r,t))for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&u(c[a],e,n)}function u(e,r,t){return function(){var o=String(e),a=o.lastIndexOf(".");for(c(e,e,r,t);-1!==a;)a=(o=o.substr(0,a)).lastIndexOf("."),c(e,o,r,t);c(e,n,r,t)}}function l(e){var t=String(e);return Boolean(Object.prototype.hasOwnProperty.call(r,t)&&o(r[t]))}function p(e){for(var r=String(e),t=l(r)||l(n),o=r.lastIndexOf(".");!t&&-1!==o;)o=(r=r.substr(0,o)).lastIndexOf("."),t=l(r);return t}function f(e,r,t,n){var o=u(e="symbol"==typeof e?e.toString():e,r,n);return!!p(e)&&(!0===t?o():setTimeout(o,0),!0)}e.publish=function(r,t){return f(r,t,!1,e.immediateExceptions)},e.publishSync=function(r,t){return f(r,t,!0,e.immediateExceptions)},e.subscribe=function(e,n){if("function"!=typeof n)return!1;e="symbol"==typeof e?e.toString():e,Object.prototype.hasOwnProperty.call(r,e)||(r[e]={});var o="uid_"+String(++t);return r[e][o]=n,o},e.subscribeAll=function(r){return e.subscribe(n,r)},e.subscribeOnce=function(r,t){var n=e.subscribe(r,(function(){e.unsubscribe(n),t.apply(this,arguments)}));return e},e.clearAllSubscriptions=function(){r={}},e.clearSubscriptions=function(e){var t;for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&delete r[t]},e.countSubscriptions=function(e){var t,n,o=0;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)){for(n in r[t])o++;break}return o},e.getSubscriptions=function(e){var t,n=[];for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e)&&n.push(t);return n},e.unsubscribe=function(t){var n,o,a,i=function(e){var t;for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&0===t.indexOf(e))return!0;return!1},s="string"==typeof t&&(Object.prototype.hasOwnProperty.call(r,t)||i(t)),c=!s&&"string"==typeof t,u="function"==typeof t,l=!1;if(!s){for(n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(o=r[n],c&&o[t]){delete o[t],l=t;break}if(u)for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&o[a]===t&&(delete o[a],l=!0)}return l}e.clearSubscriptions(t)}}(o)),void 0!==e&&e.exports&&(t=e.exports=o),t.PubSub=o,e.exports=t=o}("object"==typeof window&&window||r)}(n,n.exports);var o={exports:{}}; | ||
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */!function(e,r){!function(e){function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var n=r.length-1,o=1;o<n;++o)r[o]=r[o].slice(1,-1);return r[n]=r[n].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,r){var t=e;if(r)for(var n in r)t[n]=r[n];return t}function s(e){var n="[A-Za-z]",o="[0-9]",a=r(o,"[A-Fa-f]"),i=t(t("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+t("%[89A-Fa-f]"+a+"%"+a+a)+"|"+t("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=r("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=r(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");t(n+r(n,o,"[\\+\\-\\.]")+"*"),t(t(i+"|"+r(l,s,"[\\:]"))+"*");var p=t(t("25[0-5]")+"|"+t("2[0-4]"+o)+"|"+t("1"+o+o)+"|"+t("0?[1-9]"+o)+"|0?0?"+o),f=t(p+"\\."+p+"\\."+p+"\\."+p),d=t(a+"{1,4}"),h=t(t(d+"\\:"+d)+"|"+f),v=t(t(d+"\\:")+"{6}"+h),y=t("\\:\\:"+t(d+"\\:")+"{5}"+h),m=t(t(d)+"?\\:\\:"+t(d+"\\:")+"{4}"+h),g=t(t(t(d+"\\:")+"{0,1}"+d)+"?\\:\\:"+t(d+"\\:")+"{3}"+h),b=t(t(t(d+"\\:")+"{0,2}"+d)+"?\\:\\:"+t(d+"\\:")+"{2}"+h),w=t(t(t(d+"\\:")+"{0,3}"+d)+"?\\:\\:"+d+"\\:"+h),E=t(t(t(d+"\\:")+"{0,4}"+d)+"?\\:\\:"+h),S=t(t(t(d+"\\:")+"{0,5}"+d)+"?\\:\\:"+d),O=t(t(t(d+"\\:")+"{0,6}"+d)+"?\\:\\:"),C=t([v,y,m,g,b,w,E,S,O].join("|")),A=t(t(l+"|"+i)+"+");t("[vV]"+a+"+\\."+r(l,s,"[\\:]")+"+"),t(t(i+"|"+r(l,s))+"*");var I=t(i+"|"+r(l,s,"[\\:\\@]"));return t(t(i+"|"+r(l,s,"[\\@]"))+"+"),t(t(I+"|"+r("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(r("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+C+")"+t(t("\\%25|\\%(?!"+a+"{2})")+"("+A+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,r){var t=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)},f=2147483647,d=36,h=1,v=26,y=38,m=700,g=72,b=128,w="-",E=/^xn--/,S=/[^\0-\x7E]/,O=/[\x2E\u3002\uFF0E\uFF61]/g,C={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=d-h,I=Math.floor,T=String.fromCharCode;function j(e){throw new RangeError(C[e])}function x(e,r){for(var t=[],n=e.length;n--;)t[n]=r(e[n]);return t}function $(e,r){var t=e.split("@"),n="";return t.length>1&&(n=t[0]+"@",e=t[1]),n+x((e=e.replace(O,".")).split("."),r).join(".")}function D(e){for(var r=[],t=0,n=e.length;t<n;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<n){var a=e.charCodeAt(t++);56320==(64512&a)?r.push(((1023&o)<<10)+(1023&a)+65536):(r.push(o),t--)}else r.push(o)}return r}var P=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:d},N=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},R=function(e,r,t){var n=0;for(e=t?I(e/m):e>>1,e+=I(e/r);e>A*v>>1;n+=d)e=I(e/A);return I(n+(A+1)*e/(e+y))},F=function(e){var r=[],t=e.length,n=0,o=b,a=g,i=e.lastIndexOf(w);i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&j("not-basic"),r.push(e.charCodeAt(s));for(var c=i>0?i+1:0;c<t;){for(var u=n,l=1,p=d;;p+=d){c>=t&&j("invalid-input");var y=P(e.charCodeAt(c++));(y>=d||y>I((f-n)/l))&&j("overflow"),n+=y*l;var m=p<=a?h:p>=a+v?v:p-a;if(y<m)break;var E=d-m;l>I(f/E)&&j("overflow"),l*=E}var S=r.length+1;a=R(n-u,S,0==u),I(n/S)>f-o&&j("overflow"),o+=I(n/S),n%=S,r.splice(n++,0,o)}return String.fromCodePoint.apply(String,r)},_=function(e){var r=[],t=(e=D(e)).length,n=b,o=0,a=g,i=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var p=u.value;p<128&&r.push(T(p))}}catch(e){s=!0,c=e}finally{try{!i&&l.return&&l.return()}finally{if(s)throw c}}var y=r.length,m=y;for(y&&r.push(w);m<t;){var E=f,S=!0,O=!1,C=void 0;try{for(var A,x=e[Symbol.iterator]();!(S=(A=x.next()).done);S=!0){var $=A.value;$>=n&&$<E&&(E=$)}}catch(e){O=!0,C=e}finally{try{!S&&x.return&&x.return()}finally{if(O)throw C}}var P=m+1;E-n>I((f-o)/P)&&j("overflow"),o+=(E-n)*P,n=E;var F=!0,_=!1,U=void 0;try{for(var k,q=e[Symbol.iterator]();!(F=(k=q.next()).done);F=!0){var z=k.value;if(z<n&&++o>f&&j("overflow"),z==n){for(var L=o,H=d;;H+=d){var V=H<=a?h:H>=a+v?v:H-a;if(L<V)break;var M=L-V,K=d-V;r.push(T(N(V+M%K,0))),L=I(M/K)}r.push(T(N(L,0))),a=R(o,P,m==y),o=0,++m}}}catch(e){_=!0,U=e}finally{try{!F&&q.return&&q.return()}finally{if(_)throw U}}++o,++n}return r.join("")},U=function(e){return $(e,(function(e){return E.test(e)?F(e.slice(4).toLowerCase()):e}))},k=function(e){return $(e,(function(e){return S.test(e)?"xn--"+_(e):e}))},q={version:"2.1.0",ucs2:{decode:D,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:F,encode:_,toASCII:k,toUnicode:U},z={};function L(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function H(e){for(var r="",t=0,n=e.length;t<n;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(n-t>=6){var a=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(n-t>=9){var i=parseInt(e.substr(t+4,2),16),s=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function V(e,r){function t(e){var t=H(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,L).replace(r.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,L).replace(r.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,L).replace(r.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,L).replace(r.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,L).replace(r.PCT_ENCODED,o)),e}function M(e){return e.replace(/^0*(.*)/,"$1")||"0"}function K(e,r){var t=e.match(r.IPV4ADDRESS)||[],n=l(t,2)[1];return n?n.split(".").map(M).join("."):e}function Z(e,r){var t=e.match(r.IPV6ADDRESS)||[],n=l(t,3),o=n[1],a=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=l(i,2),c=s[0],u=s[1],p=u?u.split(":").map(M):[],f=c.split(":").map(M),d=r.IPV4ADDRESS.test(f[f.length-1]),h=d?7:8,v=f.length-h,y=Array(h),m=0;m<h;++m)y[m]=p[m]||f[v+m]||"";d&&(y[h-1]=K(y[h-1],r));var g=y.reduce((function(e,r,t){if(!r||"0"===r){var n=e[e.length-1];n&&n.index+n.length===t?n.length++:e.push({index:t,length:1})}return e}),[]).sort((function(e,r){return r.length-e.length}))[0],b=void 0;if(g&&g.length>1){var w=y.slice(0,g.index),E=y.slice(g.index+g.length);b=w.join(":")+"::"+E.join(":")}else b=y.join(":");return a&&(b+="%"+a),b}return e}var J=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,B=void 0==="".match(/(){0}/)[1];function W(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={},n=!1!==r.iri?u:c;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(J);if(o){B?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||void 0,t.userinfo=-1!==e.indexOf("@")?o[3]:void 0,t.host=-1!==e.indexOf("//")?o[4]:void 0,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=-1!==e.indexOf("?")?o[7]:void 0,t.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),t.host&&(t.host=Z(K(t.host,n),n)),void 0!==t.scheme||void 0!==t.userinfo||void 0!==t.host||void 0!==t.port||t.path||void 0!==t.query?void 0===t.scheme?t.reference="relative":void 0===t.fragment?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var a=z[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)V(t,n);else{if(t.host&&(r.domainHost||a&&a.domainHost))try{t.host=q.toASCII(t.host.replace(n.PCT_ENCODED,H).toLowerCase())}catch(e){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+e}V(t,c)}a&&a.parse&&a.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function G(e,r){var t=!1!==r.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(Z(K(String(e.host),t),t).replace(t.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function re(e){for(var r=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(X))e=e.replace(X,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(ee);if(!t)throw new Error("Unexpected dot segment condition");var n=t[0];e=e.slice(n.length),r.push(n)}return r.join("")}function te(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.iri?u:c,n=[],o=z[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?q.toUnicode(e.host):q.toASCII(e.host.replace(t.PCT_ENCODED,H).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+t}V(e,t),"suffix"!==r.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=G(e,r);if(void 0!==a&&("suffix"!==r.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=re(i)),void 0===a&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=W(te(e,t),t),r=W(te(r,t),t)),!(t=t||{}).tolerant&&r.scheme?(n.scheme=r.scheme,n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(n.userinfo=r.userinfo,n.host=r.host,n.port=r.port,n.path=re(r.path||""),n.query=r.query):(r.path?("/"===r.path.charAt(0)?n.path=re(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:n.path=r.path:n.path="/"+r.path,n.path=re(n.path)),n.query=r.query):(n.path=e.path,void 0!==r.query?n.query=r.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=r.fragment,n}function oe(e,r,t){var n=i({scheme:"null"},t);return te(ne(W(e,n),W(r,n),n,!0),n)}function ae(e,r){return"string"==typeof e?e=te(W(e,r),r):"object"===n(e)&&(e=W(te(e,r),r)),e}function ie(e,r,t){return"string"==typeof e?e=te(W(e,t),t):"object"===n(e)&&(e=te(e,t)),"string"==typeof r?r=te(W(r,t),t):"object"===n(r)&&(r=te(r,t)),e===r}function se(e,r){return e&&e.toString().replace(r&&r.iri?u.ESCAPE:c.ESCAPE,L)}function ce(e,r){return e&&e.toString().replace(r&&r.iri?u.PCT_ENCODED:c.PCT_ENCODED,H)}var ue={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){var t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var fe={scheme:"ws",domainHost:!0,parse:function(e,r){var t=e;return t.secure=pe(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(e,r){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var t=e.resourceName.split("?"),n=l(t,2),o=n[0],a=n[1];e.path=o&&"/"!==o?o:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},de={scheme:"wss",domainHost:fe.domainHost,parse:fe.parse,serialize:fe.serialize},he={},ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",me=t(t("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+t("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+t("%"+ye+ye)),ge="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ee=new RegExp(ve,"g"),Se=new RegExp(me,"g"),Oe=new RegExp(r("[^]",ge,"[\\.]",'[\\"]',be),"g"),Ce=new RegExp(r("[^]",ve,we),"g"),Ae=Ce;function Ie(e){var r=H(e);return r.match(Ee)?r:e}var Te={scheme:"mailto",parse:function(e,r){var t=e,n=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var o=!1,a={},i=t.query.split("&"),s=0,c=i.length;s<c;++s){var u=i[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),p=0,f=l.length;p<f;++p)n.push(l[p]);break;case"subject":t.subject=ce(u[1],r);break;case"body":t.body=ce(u[1],r);break;default:o=!0,a[ce(u[0],r)]=ce(u[1],r)}}o&&(t.headers=a)}t.query=void 0;for(var d=0,h=n.length;d<h;++d){var v=n[d].split("@");if(v[0]=ce(v[0]),r.unicodeSupport)v[1]=ce(v[1],r).toLowerCase();else try{v[1]=q.toASCII(ce(v[1],r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[d]=v.join("@")}return t},serialize:function(e,r){var t=e,n=a(e.to);if(n){for(var i=0,s=n.length;i<s;++i){var c=String(n[i]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(Se,Ie).replace(Se,o).replace(Oe,L),p=c.slice(u+1);try{p=r.iri?q.toUnicode(p):q.toASCII(ce(p,r).toLowerCase())}catch(e){t.error=t.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=l+"@"+p}t.path=n.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var d=[];for(var h in f)f[h]!==he[h]&&d.push(h.replace(Se,Ie).replace(Se,o).replace(Ce,L)+"="+f[h].replace(Se,Ie).replace(Se,o).replace(Ae,L));return d.length&&(t.query=d.join("&")),t}},je=/^([^\:]+)\:(.*)/,xe={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(je),n=e;if(t){var o=r.scheme||n.scheme||"urn",a=t[1].toLowerCase(),i=t[2],s=o+":"+(r.nid||a),c=z[s];n.nid=a,n.nss=i,n.path=void 0,c&&(n=c.parse(n,r))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,r){var t=r.scheme||e.scheme||"urn",n=e.nid,o=t+":"+(r.nid||n),a=z[o];a&&(e=a.serialize(e,r));var i=e,s=e.nss;return i.path=(n||r.nid)+":"+s,i}},$e=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,De={scheme:"urn:uuid",parse:function(e,r){var t=e;return t.uuid=t.nss,t.nss=void 0,r.tolerant||t.uuid&&t.uuid.match($e)||(t.error=t.error||"UUID is not valid."),t},serialize:function(e,r){var t=e;return t.nss=(e.uuid||"").toLowerCase(),t}};z[ue.scheme]=ue,z[le.scheme]=le,z[fe.scheme]=fe,z[de.scheme]=de,z[Te.scheme]=Te,z[xe.scheme]=xe,z[De.scheme]=De,e.SCHEMES=z,e.pctEncChar=L,e.pctDecChars=H,e.parse=W,e.removeDotSegments=re,e.serialize=te,e.resolveComponents=ne,e.resolve=oe,e.normalize=ae,e.equal=ie,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(r)}(0,o.exports);const a=o.exports,i={null:e=>null===e,boolean:e=>"boolean"==typeof e,object:e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,array:e=>Array.isArray(e),number:e=>"number"==typeof e,integer:e=>Number.isInteger(e),string:e=>"string"==typeof e};var s={jsonTypeOf:(e,r)=>i[r](e),resolveUrl:(e,r)=>{const t=a.resolve(e,r,{iri:!0});if(a.resolve(e,"",{iri:!0})&&"file"===a.parse(t).scheme&&"file"!==a.parse(e).scheme)throw Error(`Can't access file '${t}' resource from network context '${e}'`);return t},urlFragment:e=>a.unescapeComponent(a.parse(e).fragment)||"",pathRelative:(e,r)=>{if(e===r)return"";let t=1;const n=e.length-1,o=r.length-t,a=n<o?n:o;let i=-1,s=0;for(;s<a;s++){const n=e.charCodeAt(s+1);if(n!==r.charCodeAt(t+s))break;47===n&&(i=s)}if(o>a){if(47===r.charCodeAt(t+s))return r.slice(t+s+1);if(0===s)return r.slice(t+s)}n>a&&(47===e.charCodeAt(s+1)?i=s:0===a&&(i=0));let c="";for(s=i+2;s<=e.length;++s)s!==e.length&&47!==e.charCodeAt(s)||(c+=0===c.length?"..":"/..");return t+=i,c.length>0?`${c}${r.slice(t,r.length)}`:(47===r.charCodeAt(t)&&++t,r.slice(t,r.length))}};const c=t,u=e=>{if(e.length>0&&"/"!==e[0])throw Error("Invalid JSON Pointer");return e.split("/").slice(1).map(y)},l=(e,r,t,n)=>{if(0===e.length)return t;if(e.length>1){const o=e.shift();return{...r,[o]:l(e,g(r,o,n),t,h(o,n))}}if(Array.isArray(r)){const n=[...r];return n[m(r,e[0])]=t,n}return"object"==typeof r&&null!==r?{...r,[e[0]]:t}:g(r,e[0],n)},p=(e,r,t,n)=>{if(0!==e.length)if(1!==e.length||b(r)){const o=e.shift();p(e,g(r,o,n),t,h(o,n))}else{r[m(r,e[0])]=t}},f=(e,r,t)=>{if(0!=e.length){if(e.length>1){const n=e.shift(),o=g(r,n,t);return{...r,[n]:f(e,o,h(n,t))}}if(Array.isArray(r))return r.filter(((r,t)=>t!=e[0]));if("object"==typeof r&&null!==r){const{[e[0]]:t,...n}=r;return n}return g(r,e[0],t)}},d=(e,r,t)=>{if(0!==e.length)if(e.length>1){const n=e.shift(),o=g(r,n,t);d(e,o,h(n,t))}else Array.isArray(r)?r.splice(e[0],1):"object"==typeof r&&null!==r?delete r[e[0]]:g(r,e[0],t)},h=c(((e,r)=>r+"/"+v(e))),v=e=>e.toString().replace(/~/g,"~0").replace(/\//g,"~1"),y=e=>e.toString().replace(/~1/g,"/").replace(/~0/g,"~"),m=(e,r)=>Array.isArray(e)&&"-"===r?e.length:r,g=(e,r,t="")=>{if(void 0===e)throw TypeError(`Value at '${t}' is undefined and does not have property '${r}'`);if(null===e)throw TypeError(`Value at '${t}' is null and does not have property '${r}'`);if(b(e))throw TypeError(`Value at '${t}' is a ${typeof e} and does not have property '${r}'`);return e[m(e,r)]},b=e=>null===e||"object"!=typeof e;var w={nil:"",append:h,get:(e,r)=>{const t=u(e),n=e=>t.reduce((([e,r],t)=>[g(e,t,r),h(t,r)]),[e,""])[0];return void 0===r?n:n(r)},set:(e,r,t)=>{const n=u(e),o=c(((e,r)=>l(n,e,r,"")));return void 0===r?o:o(r,t)},assign:(e,r,t)=>{const n=u(e),o=c(((e,r)=>p(n,e,r,"")));return void 0===r?o:o(r,t)},unset:(e,r)=>{const t=u(e),n=e=>f(t,e,"");return void 0===r?n:n(r)},remove:(e,r)=>{const t=u(e),n=e=>d(t,e,"");return void 0===r?n:n(r)}};const E=Symbol("$__value"),S=Symbol("$__href");var O={cons:(e,r)=>Object.freeze({[S]:e,[E]:r}),isReference:e=>e&&void 0!==e[S],href:e=>e[S],value:e=>e[E]};const C=w,A=t,{resolveUrl:I,jsonTypeOf:T}=s,j=O,x=Object.freeze({id:"",pointer:"",instance:void 0,value:void 0}),$=e=>j.isReference(e.value)?j.value(e.value):e.value,D=A(((e,r)=>T($(e),r))),P=(e,r)=>Object.freeze({...r,pointer:C.append(e,r.pointer),value:$(r)[e]}),N=A(((e,r)=>$(r).map(((t,n,o,a)=>e(P(n,r),n,o,a))))),R=A(((e,r)=>$(r).forEach(((t,n,o,a)=>e(P(n,r),n,o,a))))),F=A(((e,r)=>$(r).map(((e,t,n,o)=>P(t,r))).filter(((r,t,n,o)=>e(r,t,n,o))))),_=A(((e,r,t)=>$(t).reduce(((r,n,o)=>e(r,P(o,t),o)),r))),U=A(((e,r)=>$(r).every(((t,n,o,a)=>e(P(n,r),n,o,a))))),k=A(((e,r)=>$(r).some(((t,n,o,a)=>e(P(n,r),n,o,a)))));var q={nil:x,cons:(e,r="")=>Object.freeze({...x,id:I(r,""),instance:e,value:e}),get:(e,r=x)=>{if(!e.startsWith("#"))throw Error(`No JSON document found at '${e.split("#")[0]}'`);return Object.freeze({...r,pointer:e.substr(1)})},uri:e=>`${e.id}#${encodeURI(e.pointer)}`,value:$,has:(e,r)=>e in $(r),typeOf:D,length:e=>$(e).length,step:P,entries:e=>Object.keys($(e)).map((r=>[r,P(r,e)])),keys:e=>Object.keys($(e)),map:N,forEach:R,filter:F,reduce:_,every:U,some:k},z=async e=>Object.entries(await e);var L=t((async(e,r)=>(await r).map(e)));var H=t((async(e,r,t)=>(await t).reduce((async(r,t)=>e(await r,t)),r)));const V=H;var M=t((async(e,r,t={})=>V((async(r,t)=>await e(t)?r.concat([t]):r),[],r,t)));const K=L;var Z=t((async(e,r)=>{const t=await K(e,r);return(await Promise.all(t)).some((e=>e))}));const J=L;var B=t((async(e,r)=>{const t=await J(e,r);return(await Promise.all(t)).every((e=>e))}));var W=t(((e,r)=>e.reduce((async(e,r)=>r(await e)),r)));const G=W,Q=z,Y=H;var X={entries:z,map:L,filter:M,reduce:H,some:Z,every:B,pipeline:W,all:e=>Promise.all(e),allValues:e=>G([Q,Y((async(e,[r,t])=>(e[r]=await t,e)),{})],e)},ee=fetch,re={},te=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,ne=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,oe=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,ae=/\\([\u000b\u0020-\u00ff])/g,ie=/([\\"])/g,se=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function ce(e){var r=String(e);if(oe.test(r))return r;if(r.length>0&&!ne.test(r))throw new TypeError("invalid parameter value");return'"'+r.replace(ie,"\\$1")+'"'}function ue(e){this.parameters=Object.create(null),this.type=e}re.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var r=e.parameters,t=e.type;if(!t||!se.test(t))throw new TypeError("invalid type");var n=t;if(r&&"object"==typeof r)for(var o,a=Object.keys(r).sort(),i=0;i<a.length;i++){if(o=a[i],!oe.test(o))throw new TypeError("invalid parameter name");n+="; "+o+"="+ce(r[o])}return n},re.parse=function(e){if(!e)throw new TypeError("argument string is required");var r="object"==typeof e?function(e){var r;"function"==typeof e.getHeader?r=e.getHeader("content-type"):"object"==typeof e.headers&&(r=e.headers&&e.headers["content-type"]);if("string"!=typeof r)throw new TypeError("content-type header is missing from object");return r}(e):e;if("string"!=typeof r)throw new TypeError("argument string is required to be a string");var t=r.indexOf(";"),n=-1!==t?r.substr(0,t).trim():r.trim();if(!se.test(n))throw new TypeError("invalid media type");var o=new ue(n.toLowerCase());if(-1!==t){var a,i,s;for(te.lastIndex=t;i=te.exec(r);){if(i.index!==t)throw new TypeError("invalid parameter format");t+=i[0].length,a=i[1].toLowerCase(),'"'===(s=i[2])[0]&&(s=s.substr(1,s.length-2).replace(ae,"$1")),o.parameters[a]=s}if(t!==r.length)throw new TypeError("invalid parameter format")}return o};const le=re,pe={};var fe={addPlugin:(e,r)=>{pe[e]=r},parse:e=>{const r=le.parse(e.headers.get("content-type"));if(!(r.type in pe))throw Error(`${e.url} is not a schema. Found a document with media type: ${r.type}`);return pe[r.type].parse(e,r.parameters)},getContentType:e=>{for(const r in pe)if(pe[r].matcher(e))return r;return"application/octet-stream"}};const de=t,he=X,ve=w,{jsonTypeOf:ye,resolveUrl:me,urlFragment:ge,pathRelative:be}=s,we=ee,Ee=O,Se=fe,Oe="https://json-schema.org/draft/2019-09/vocab/core",Ce="https://json-schema.org/draft/2020-12/vocab/core",Ae={},Ie={},Te=(e,r)=>{const t=Ie[e];return Ae[t]?.[r]},je={},xe={},$e=(e,r="",t="")=>{e=JSON.parse(JSON.stringify(e));const n=me(r,""),o=me(e.$schema||t,"");if(!o)throw Error("Couldn't determine schema dialect");if(delete e.$schema,!(o in Ie))if(!0===e?.$vocabulary?.[Oe]&&o===De(e,n,Oe)[0])Ie[o]=Oe;else if(!0===e?.$vocabulary?.[Ce]&&o===De(e,n,Ce)[0])Ie[o]=Ce;else{const e=je[o];if(!e)throw Error(`Couldn't determine JSON Schema version for dialect: '${o}'`);!0===e.vocabulary[Oe]?Ie[o]=Oe:!0===e.vocabulary[Ce]?Ie[o]=Ce:Ie[o]=Ie[e.dialectId]}const[a,i]=De(e,n,Ie[o]);if(!a)throw Error("Couldn't determine an identifier for the schema");const s=Te(o,"baseToken");delete e[s],n&&(xe[n]=a);const c=Te(o,"anchorToken");i&&s===c&&(e[c]=c!==s?encodeURI(i):`#${encodeURI(i)}`);const u={},l=Te(o,"recursiveAnchorToken");let p;!0===e[l]&&(u[""]=`${a}#`,e[c]="",delete e[l]);const f=Te(o,"vocabularyToken");ye(e[f],"object")?(p=e[f],delete e[f]):p={[Ie[o]]:!0};const d={"":""};return je[a]={id:a,dialectId:o,schema:Pe(e,a,o,ve.nil,d,u),anchors:d,dynamicAnchors:u,vocabulary:p,validated:!1},a},De=(e,r,t)=>{const n=Ae[t]?.baseToken,o=me(r,e[n]||"");return[me(o,""),ge(o)]},Pe=(e,r,t,n,o,a)=>{if(ye(e,"object")){const i="string"==typeof e.$schema?me(e.$schema,""):t,s=Te(i,"embeddedToken"),c=Te(i,"anchorToken");if("string"==typeof e[s]&&(s!==c||"#"!==e[s][0])){const n=me(r,e[s]);return e[Te(i,"baseToken")]=n,$e(e,n,t),Ee.cons(e[s],e)}const u=Te(t,"anchorToken"),l=Te(t,"dynamicAnchorToken");"string"==typeof e[l]&&(a[e[l]]=`${r}#${encodeURI(n)}`,o[e[l]]=n,delete e[l]);const p=Te(t,"embeddedToken");if("string"==typeof e[u]){const r=u!==p?e[u]:e[u].slice(1);o[r]=n,delete e[u]}const f=Te(t,"jrefToken");if("string"==typeof e[f])return Ee.cons(e[f],e);for(const i in e)e[i]=Pe(e[i],r,t,ve.append(i,n),o,a);return e}return Array.isArray(e)?e.map(((e,i)=>Pe(e,r,t,ve.append(i,n),o,a))):e},Ne=e=>je[xe[e]]||je[e],Re=Object.freeze({id:"",dialectId:void 0,vocabulary:{},pointer:ve.nil,schema:void 0,value:void 0,anchors:{},dynamicAnchors:{},validated:!0}),Fe=async(e,r=Re)=>{const t=me(ke(r),e),n=me(t,""),o=ge(t);if(!(e=>e in je||e in xe)(n)){const e=await we(n,{headers:{Accept:"application/schema+json"}});if(e.status>=400)throw await e.text(),Error(`Failed to retrieve schema with id: ${n}`);const[r,t]=await Se.parse(e),o=me(r.$schema,"")||t;n===o||o in Ie||await Fe(o),$e(r,n)}const a=Ne(n),i="/"!==o[0]?Ue(a,o):o,s=Object.freeze({...a,pointer:i,value:ve.get(i,a.schema)});return _e(s)},_e=e=>Ee.isReference(e.value)?Fe(Ee.href(e.value),e):e,Ue=(e,r)=>{if(!(r in e.anchors))throw Error(`No such anchor '${encodeURI(e.id)}#${encodeURI(r)}'`);return e.anchors[r]},ke=e=>`${e.id}#${encodeURI(e.pointer)}`,qe=e=>Ee.isReference(e.value)?Ee.value(e.value):e.value,ze=(e,r)=>{const t=Ne(r.id),n=Object.freeze({...r,pointer:ve.append(e,r.pointer),value:qe(r)[e],validated:t.validated});return _e(n)},Le=de(((e,r)=>he.pipeline([qe,he.map((async(t,n)=>e(await ze(n,r),n))),he.all],r))),He={parentId:"",parentDialect:"",includeEmbedded:!0},Ve=(e,r)=>{if(r.startsWith("file://")){const t=e.slice(7,e.lastIndexOf("/"));return""===e?"":be(t,r.slice(7))}return r};var Me={setConfig:(e,r,t)=>{Ie[e]=e,Ae[e]||(Ae[e]={}),Ae[e][r]=t},getConfig:Te,add:$e,get:Fe,markValidated:e=>{je[e].validated=!0},uri:ke,value:qe,getAnchorPointer:Ue,typeOf:(e,r)=>ye(qe(e),r),has:(e,r)=>e in qe(r),step:ze,keys:e=>Object.keys(qe(e)),entries:e=>he.pipeline([qe,Object.keys,he.map((async r=>[r,await ze(r,e)])),he.all],e),map:Le,length:e=>qe(e).length,toSchema:(e,r={})=>{const t={...He,...r},n=JSON.parse(JSON.stringify(e.schema,((r,n)=>{if(!Ee.isReference(n))return n;const o=Ee.value(n),a="string"==typeof o.$schema?me(o.$schema,""):e.dialectId,i=Te(a,"embeddedToken");return!t.includeEmbedded&&i in o?void 0:Ee.value(n)}))),o=Te(e.dialectId,"dynamicAnchorToken");Object.entries(e.dynamicAnchors).forEach((([e,r])=>{const t=ge(r);ve.assign(t,n,{[o]:e,...ve.get(t,n)})}));const a=Te(e.dialectId,"anchorToken");Object.entries(e.anchors).filter((([e])=>""!==e)).forEach((([e,r])=>{ve.assign(r,n,{[a]:e,...ve.get(r,n)})}));const i=Te(e.dialectId,"baseToken"),s=Ve(t.parentId,e.id),c=t.parentDialect===e.dialectId?"":e.dialectId;return{...s&&{[i]:s},...c&&{$schema:c},...n}}};class Ke extends Error{constructor(e){super("Invalid Schema"),this.name=this.constructor.name,this.output=e}}var Ze=Ke;const Je=Me;var Be={compile:e=>Je.value(e),interpret:()=>!0};const We=t,Ge=n.exports,{resolveUrl:Qe}=s,Ye=q,Xe=Me,er=Ze,rr=fe,tr=Be,nr="FLAG",or="BASIC",ar="DETAILED",ir="VERBOSE";let sr=ar,cr=!0;rr.addPlugin("application/schema+json",{parse:async(e,r)=>[await e.json(),r.schema||r.profile],matcher:e=>e.endsWith(".schema.json")});const ur=async e=>{const r={metaData:{}};return{ast:r,schemaUri:await mr(e,r)}},lr=We((({ast:e,schemaUri:r},t,n=nr)=>{if(![nr,or,ar,ir].includes(n))throw Error(`The '${n}' error format is not supported`);const o=[],a=Ge.subscribe("result",pr(n,o));return br(r,t,e,{}),Ge.unsubscribe(a),o[0]})),pr=(e,r)=>{const t=[];return(n,o)=>{if("result"===n){const{keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a}=o,i={keyword:e,absoluteKeywordLocation:r,instanceLocation:n,valid:a,errors:[]};t.push(i)}else if("result.start"===n)t.push(n);else if("result.end"===n){const n=t.pop();for(;"result.start"!==t[t.length-1];){const r=t.pop(),o=[r];e===or&&(o.push(...r.errors),delete r.errors),(e===ir||e!==nr&&!r.valid)&&n.errors.unshift(...o)}t[t.length-1]=n,r[0]=n}}},fr={},dr=e=>fr[e]||tr,hr=e=>e in fr,vr={},yr={},mr=async(e,r)=>{if(e=await gr(e),!hr(`${e.dialectId}#validate`)){const r=await Xe.get(e.dialectId);(Xe.getConfig(r.id,"mandatoryVocabularies")||[]).forEach((e=>{if(!r.vocabulary[e])throw Error(`Vocabulary '${e}' must be explicitly declared and required`)})),Object.entries(r.vocabulary).forEach((([e,t])=>{if(e in vr)Object.entries(vr[e]).forEach((([e,t])=>{((e,r)=>{fr[e]={collectEvaluatedItems:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&new Set,collectEvaluatedProperties:(e,t,n,o,a)=>r.interpret(e,t,n,o,a)&&[],...r}})(`${r.id}#${e}`,t)}));else if(t)throw Error(`Missing required vocabulary: ${e}`)}))}if(cr&&!e.validated){if(Xe.markValidated(e.id),!(e.dialectId in yr)){const r=await Xe.get(e.dialectId),t=await ur(r);yr[r.id]=lr(t)}const r=Ye.cons(e.schema,e.id),t=yr[e.dialectId](r,sr);if(!t.valid)throw new er(t)}return e.id in r.metaData||(r.metaData[e.id]={id:e.id,dynamicAnchors:e.dynamicAnchors,anchors:e.anchors}),dr(`${e.dialectId}#validate`).compile(e,r)},gr=async e=>Xe.typeOf(e,"string")?gr(await Xe.get(Xe.value(e),e)):e,br=(e,r,t,n)=>{const o=wr(e,t),a=Qe(e,"");return dr(o).interpret(e,r,t,{...t.metaData[a].dynamicAnchors,...n})},wr=(e,r)=>{if(!(e in r))throw Error(`No schema found at ${e}`);return r[e][0]};var Er={validate:async(e,r,t)=>{const n=await ur(e),o=(e,r)=>lr(n,Ye.cons(e),r);return void 0===r?o:o(r,t)},compile:ur,interpret:lr,setMetaOutputFormat:e=>{sr=e},setShouldMetaValidate:e=>{cr=e},FLAG:nr,BASIC:or,DETAILED:ar,VERBOSE:ir,add:(e,r="",t="")=>{const n=Xe.add(e,r,t);delete yr[n]},getKeyword:dr,hasKeyword:hr,defineVocabulary:(e,r)=>{vr[e]=r},compileSchema:mr,interpretSchema:br,collectEvaluatedProperties:(e,r,t,n,o)=>{const a=wr(e,t);return dr(a).collectEvaluatedProperties(e,r,t,n,o)},collectEvaluatedItems:(e,r,t,n,o)=>{const a=wr(e,t);return dr(a).collectEvaluatedItems(e,r,t,n,o)},addMediaTypePlugin:rr.addPlugin};const Sr=X,Or=n.exports,Cr=Er,Ar=q,Ir=Me;var Tr={compile:async(e,r)=>{const t=Ir.uri(e);if(!(t in r)){r[t]=!1;const n=Ir.value(e);if(!["object","boolean"].includes(typeof n))throw Error(`No schema found at '${Ir.uri(e)}'`);r[t]=[`${e.dialectId}#validate`,Ir.uri(e),"boolean"==typeof n?n:await Sr.pipeline([Ir.entries,Sr.map((([r,t])=>[`${e.dialectId}#${r}`,t])),Sr.filter((([r])=>r!==`${e.dialectId}#validate`)),Sr.map((async([t,n])=>{const o=await Cr.getKeyword(t).compile(n,r,e);return[t,Ir.uri(n),o]})),Sr.all],e)]}return t},interpret:(e,r,t,n)=>{const[o,a,i]=t[e];Or.publishSync("result.start");const s="boolean"==typeof i?i:i.every((([e,o,a])=>{Or.publishSync("result.start");const i=Cr.getKeyword(e).interpret(a,r,t,n);return Or.publishSync("result",{keyword:e,absoluteKeywordLocation:o,instanceLocation:Ar.uri(r),valid:i,ast:a}),Or.publishSync("result.end"),i}));return Or.publishSync("result",{keyword:o,absoluteKeywordLocation:a,instanceLocation:Ar.uri(r),valid:s,ast:e}),Or.publishSync("result.end"),s},collectEvaluatedProperties:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&[]:a.filter((([e])=>!o||!e.endsWith("#unevaluatedProperties"))).reduce(((e,[o,,a])=>{const i=e&&Cr.getKeyword(o).collectEvaluatedProperties(a,r,t,n);return!1!==i&&[...e,...i]}),[])},collectEvaluatedItems:(e,r,t,n,o=!1)=>{const a=t[e][2];return"boolean"==typeof a?!!a&&new Set:a.filter((([e])=>!o||!e.endsWith("#unevaluatedItems"))).reduce(((e,[o,,a])=>{const i=!1!==e&&Cr.getKeyword(o).collectEvaluatedItems(a,r,t,n);return!1!==i&&new Set([...e,...i])}),new Set)}};var jr={Core:Er,Schema:Me,Instance:q,Reference:O,Keywords:{metaData:Be,validate:Tr},InvalidSchemaError:Ze};e.default=jr,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=json-schema-core-umd.min.js.map |
@@ -69,3 +69,3 @@ import type { Schema, SchemaDocument, SchemaObject, Anchors } from "./schema"; | ||
export type MediaTypePlugin = { | ||
parse: (response: Response) => Promise<SchemaDocument>; | ||
parse: (response: Response, mediaTypeParameters: { [parameter: string]: string }) => Promise<[SchemaObject, string | undefined]>; | ||
matcher: (path: string) => boolean; | ||
@@ -72,0 +72,0 @@ }; |
@@ -17,3 +17,6 @@ const curry = require("just-curry-it"); | ||
MediaTypes.addPlugin("application/schema+json", { | ||
parse: async (response) => await response.json(), | ||
parse: async (response, contentTypeParameters) => [ | ||
await response.json(), | ||
contentTypeParameters.schema || contentTypeParameters.profile | ||
], | ||
matcher: (path) => path.endsWith(".schema.json") | ||
@@ -20,0 +23,0 @@ }); |
@@ -7,3 +7,4 @@ import type { JsonType } from "./common"; | ||
nil: JsonDocument<undefined>; | ||
cons: (instance: Json, id?: string) => JsonDocument<typeof instance>; | ||
cons: (instance: Json, id?: string) => JsonDocument; | ||
get: (uri: string, context?: Instance) => Instance; | ||
uri: (doc: JsonDocument) => string; | ||
@@ -37,2 +38,7 @@ value: <A extends Json>(doc: JsonDocument<A>) => A; | ||
); | ||
forEach: ( | ||
(fn: ForEachFn, doc: JsonDocument<Json[]>) => void | ||
) & ( | ||
(fn: ForEachFn) => (doc: JsonDocument<Json[]>) => void | ||
); | ||
filter: ( | ||
@@ -64,2 +70,3 @@ (fn: FilterFn, doc: JsonDocument<Json[]>) => JsonDocument[] | ||
type MapFn<A> = (element: JsonDocument, index: number) => A; | ||
type ForEachFn = (element: JsonDocument, index: number) => void; | ||
type FilterFn = (element: JsonDocument, index: number) => boolean; | ||
@@ -66,0 +73,0 @@ type ReduceFn<A> = (accumulator: A, currentValue: JsonDocument, index: number) => A; |
@@ -9,2 +9,11 @@ const JsonPointer = require("@hyperjump/json-pointer"); | ||
const cons = (instance, id = "") => Object.freeze({ ...nil, id: resolveUrl(id, ""), instance, value: instance }); | ||
const get = (url, instance = nil) => { | ||
if (!url.startsWith("#")) { | ||
throw Error(`No JSON document found at '${url.split("#")[0]}'`); | ||
} | ||
return Object.freeze({ ...instance, pointer: url.substr(1) }); | ||
}; | ||
const uri = (doc) => `${doc.id}#${encodeURI(doc.pointer)}`; | ||
@@ -29,2 +38,5 @@ const value = (doc) => Reference.isReference(doc.value) ? Reference.value(doc.value) : doc.value; | ||
const forEach = curry((fn, doc) => value(doc) | ||
.forEach((item, ndx, array, thisArg) => fn(step(ndx, doc), ndx, array, thisArg))); | ||
const filter = curry((fn, doc) => value(doc) | ||
@@ -45,2 +57,5 @@ .map((item, ndx, array, thisArg) => step(ndx, doc, array, thisArg)) | ||
module.exports = { nil, cons, uri, value, has, typeOf, step, entries, keys, map, filter, reduce, every, some, length }; | ||
module.exports = { | ||
nil, cons, get, uri, value, has, typeOf, length, | ||
step, entries, keys, map, forEach, filter, reduce, every, some | ||
}; |
@@ -11,7 +11,7 @@ const contentTypeParser = require("content-type"); | ||
const parse = (response) => { | ||
const contentType = contentTypeParser.parse(response.headers.get("content-type")).type; | ||
if (!(contentType in mediaTypePlugins)) { | ||
throw Error(`${response.url} is not a schema. Found a document with media type: ${contentType}`); | ||
const contentType = contentTypeParser.parse(response.headers.get("content-type")); | ||
if (!(contentType.type in mediaTypePlugins)) { | ||
throw Error(`${response.url} is not a schema. Found a document with media type: ${contentType.type}`); | ||
} | ||
return mediaTypePlugins[contentType].parse(response); | ||
return mediaTypePlugins[contentType.type].parse(response, contentType.parameters); | ||
}; | ||
@@ -18,0 +18,0 @@ |
@@ -18,2 +18,4 @@ const curry = require("just-curry-it"); | ||
const setConfig = (jsonSchemaVersion, key, value) => { | ||
dialectJsonSchemaVersion[jsonSchemaVersion] = jsonSchemaVersion; | ||
if (!config[jsonSchemaVersion]) { | ||
@@ -45,15 +47,16 @@ config[jsonSchemaVersion] = {}; | ||
// JSON Schema version | ||
// Determine JSON Schema version | ||
if (!(dialectId in dialectJsonSchemaVersion)) { | ||
if (schema?.$vocabulary?.[core201909Id] === true && dialectId === getSchemaIdentifier(schema, externalId, core201909Id)[0]) { | ||
// Self describing 2019-09 meta-schema | ||
dialectJsonSchemaVersion[dialectId] = core201909Id; | ||
} else if (schema?.$vocabulary?.[core202012Id] === true && dialectId === getSchemaIdentifier(schema, externalId, core202012Id)[0]) { | ||
// Self describing 2020-12 meta-schema | ||
dialectJsonSchemaVersion[dialectId] = core202012Id; | ||
} else if (dialectId === getSchemaIdentifier(schema, externalId, dialectId)[0]) { | ||
dialectJsonSchemaVersion[dialectId] = dialectId; | ||
} else if (!(dialectId in schemaStore)) { | ||
throw Error(`Couldn't determine JSON Schema version for dialect: '${dialectId}'`); | ||
} else { | ||
// Need to look at meta-schema to determine version | ||
const metaSchema = schemaStore[dialectId]; | ||
if (metaSchema.vocabulary[core201909Id] === true) { | ||
if (!metaSchema) { | ||
throw Error(`Couldn't determine JSON Schema version for dialect: '${dialectId}'`); | ||
} else if (metaSchema.vocabulary[core201909Id] === true) { | ||
dialectJsonSchemaVersion[dialectId] = core201909Id; | ||
@@ -63,2 +66,3 @@ } else if (metaSchema.vocabulary[core202012Id] === true) { | ||
} else { | ||
// Assume the jsonSchemaVersion is the meta-schema's dialectId (non-standard behavior) | ||
dialectJsonSchemaVersion[dialectId] = dialectJsonSchemaVersion[metaSchema.dialectId]; | ||
@@ -202,3 +206,11 @@ } | ||
add(await MediaTypes.parse(response), id); | ||
const [schema, defaultDialectId] = await MediaTypes.parse(response); | ||
// Make sure the meta-schema is loaded if this isn't a known dialect | ||
const dialectId = resolveUrl(schema.$schema, "") || defaultDialectId; | ||
if (id !== dialectId && !(dialectId in dialectJsonSchemaVersion)) { | ||
await get(dialectId); | ||
} | ||
add(schema, id); | ||
} | ||
@@ -205,0 +217,0 @@ |
{ | ||
"name": "@hyperjump/json-schema-core", | ||
"version": "0.27.0", | ||
"version": "0.28.0", | ||
"description": "A framework for building JSON Schema tools", | ||
@@ -37,22 +37,22 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@rollup/plugin-commonjs": "^11.0.2", | ||
"@rollup/plugin-node-resolve": "^7.1.1", | ||
"@types/chai": "^4.2.22", | ||
"@types/mocha": "^9.0.0", | ||
"@types/nock": "^11.1.0", | ||
"@typescript-eslint/eslint-plugin": "^4.32.0", | ||
"@typescript-eslint/parser": "^4.32.0", | ||
"chai": "^4.3.4", | ||
"eslint": "^7.32.0", | ||
"eslint-import-resolver-node": "^0.3.6", | ||
"eslint-import-resolver-typescript": "^2.5.0", | ||
"eslint-plugin-import": "^2.24.2", | ||
"mocha": "^9.1.2", | ||
"nock": "^13.1.3", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.57.0", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"ts-node": "^10.2.1", | ||
"typescript": "^4.4.3", | ||
"yaml": "^2.1.1" | ||
"@rollup/plugin-commonjs": "*", | ||
"@rollup/plugin-node-resolve": "*", | ||
"@types/chai": "*", | ||
"@types/mocha": "*", | ||
"@types/nock": "*", | ||
"@typescript-eslint/eslint-plugin": "*", | ||
"@typescript-eslint/parser": "*", | ||
"chai": "*", | ||
"eslint": "*", | ||
"eslint-import-resolver-node": "*", | ||
"eslint-import-resolver-typescript": "*", | ||
"eslint-plugin-import": "*", | ||
"mocha": "*", | ||
"nock": "*", | ||
"rimraf": "*", | ||
"rollup": "*", | ||
"rollup-plugin-terser": "*", | ||
"ts-node": "*", | ||
"typescript": "*", | ||
"yaml": "*" | ||
}, | ||
@@ -64,5 +64,5 @@ "dependencies": { | ||
"node-fetch": "^2.6.5", | ||
"pubsub-js": "^1.9.1", | ||
"pubsub-js": "^1.9.4", | ||
"uri-js": "^4.4.1" | ||
} | ||
} |
@@ -208,10 +208,14 @@ # Hyperjump - JSON Schema Core | ||
* parse: (response: Response) => string -- Given a fetch Response object, | ||
parse the body of the request | ||
* matcher: (path) => boolean -- Given a filesystem path, return whether or | ||
not the file should be considered a member of this media type | ||
* parse: (response: Response, mediaTypeParameters: object) => [SchemaObject, string] | ||
Given a fetch Response object, parse the body of the request. Return the | ||
parsed schema and an optional default dialectId. | ||
* matcher: (path) => boolean | ||
Given a filesystem path, return whether or not the file should be | ||
considered a member of this media type. | ||
```javascript | ||
Core.addMediaTypePlugin("application/schema+yaml", { | ||
parse: async (response) => Yaml.parse(await response.text()), | ||
parse: async (response) => [Yaml.parse(await response.text()), undefined], | ||
matcher: (path) => path.endsWith(".schema.yaml") | ||
@@ -218,0 +222,0 @@ }); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3356292
53
794
18043
Updatedpubsub-js@^1.9.4