-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathvirtualfs.js
More file actions
2 lines (2 loc) · 342 KB
/
virtualfs.js
File metadata and controls
2 lines (2 loc) · 342 KB
1
2
(()=>{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},t={};parcelRequire=function(e,r,n,o){var a,i="function"==typeof parcelRequire&&parcelRequire,s=void 0;function u(t,n){if(!r[t]){if(!e[t]){var o="function"==typeof parcelRequire&&parcelRequire;if(!n&&o)return o(t,!0);if(i)return i(t,!0);if(s&&"string"==typeof t)return s(t);var a=new Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}f.resolve=function(r){return e[t][1][r]||r},f.cache={};var c=r[t]=new u.Module(t);e[t][0].call(c.exports,f,c,c.exports,this)}return r[t].exports;function f(e){return u(f.resolve(e))}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=r,u.parent=i,u.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]};for(var c=0;c<n.length;c++)try{u(n[c])}catch(e){a||(a=e)}if(n.length){var f=u(n[n.length-1]);t=f}if(parcelRequire=u,a)throw a;return u}({b1ZG:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.promisify=n;function n(e){if("function"!=typeof e)throw new TypeError("Argument to promisify must be a function");var t=e["__ES6-PROMISIFY--CUSTOM-ARGUMENTS__"],r=n.Promise||Promise;if("function"!=typeof r)throw new Error("No Promise implementation found; do you need a polyfill?");return function(){for(var n=this,o=arguments.length,a=Array(o),i=0;i<o;i++)a[i]=arguments[i];return new r((function(r,o){a.push((function(e){if(e)return o(e);for(var n=arguments.length,a=Array(1<n?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];if(1===a.length||!t)return r(a[0]);var s={};a.forEach((function(e,r){var n=t[r];n&&(s[n]=e)})),r(s)})),e.apply(n,a)}))}}n.argumentNames="__ES6-PROMISIFY--CUSTOM-ARGUMENTS__",n.Promise=void 0},{}],pBGv:[function(e,t,r){var n,o,a=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{o="function"==typeof clearTimeout?clearTimeout:s}catch(e){o=s}}();var c,f=[],l=!1,h=-1;function p(){l&&c&&(l=!1,c.length?f=c.concat(f):h=-1,f.length&&d())}function d(){if(!l){var e=u(p);l=!0;for(var t=f.length;t;){for(c=f,f=[];++h<t;)c&&c[h].run();h=-1,t=f.length}c=null,l=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===s||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function v(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];f.push(new m(e,t)),1!==f.length||l||u(d)},m.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.env={},a.argv=[],a.version="",a.versions={},a.on=v,a.addListener=v,a.once=v,a.off=v,a.removeListener=v,a.removeAllListeners=v,a.emit=v,a.prependListener=v,a.prependOnceListener=v,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],UUq2:[function(e,t,r){e("process");var n=e("process");function o(e,t){for(var r=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;)e.unshift("..");return e}function a(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n<e.length;n++)t(e[n],n,e)&&r.push(e[n]);return r}r.resolve=function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var i=r>=0?arguments[r]:n.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");i&&(e=i+"/"+e,t="/"===i.charAt(0))}return(t?"/":"")+(e=o(a(e.split("/"),(function(e){return!!e})),!t).join("/"))||"."},r.normalize=function(e){var t=r.isAbsolute(e),n="/"===i(e,-1);return(e=o(a(e.split("/"),(function(e){return!!e})),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},r.isAbsolute=function(e){return"/"===e.charAt(0)},r.join=function(){var e=Array.prototype.slice.call(arguments,0);return r.normalize(a(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},r.relative=function(e,t){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=r.resolve(e).substr(1),t=r.resolve(t).substr(1);for(var o=n(e.split("/")),a=n(t.split("/")),i=Math.min(o.length,a.length),s=i,u=0;u<i;u++)if(o[u]!==a[u]){s=u;break}var c=[];for(u=s;u<o.length;u++)c.push("..");return(c=c.concat(a.slice(s))).join("/")},r.sep="/",r.delimiter=":",r.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,n=-1,o=!0,a=e.length-1;a>=1;--a)if(47===(t=e.charCodeAt(a))){if(!o){n=a;break}}else o=!1;return-1===n?r?"/":".":r&&1===n?"/":e.slice(0,n)},r.basename=function(e,t){var r=function(e){"string"!=typeof e&&(e+="");var t,r=0,n=-1,o=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!o){r=t+1;break}}else-1===n&&(o=!1,n=t+1);return-1===n?"":e.slice(r,n)}(e);return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},r.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,r=0,n=-1,o=!0,a=0,i=e.length-1;i>=0;--i){var s=e.charCodeAt(i);if(47!==s)-1===n&&(o=!1,n=i+1),46===s?-1===t?t=i:1!==a&&(a=1):-1!==t&&(a=-1);else if(!o){r=i+1;break}}return-1===t||-1===n||0===a||1===a&&t===n-1&&t===r+1?"":e.slice(t,n)};var i="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}},{process:"pBGv"}],UzoP:[function(e,t,r){e("process");e("process").cwd=function(){return"/"};var n=e("path"),o=Object.assign({},n);o.basename=function(e,t){var r=n.basename(e,t);return""===r?"/":r},o.normalize=function(e){return"/"===(e=n.normalize(e))?e:o.removeTrailing(e)},o.isNull=function(e){return-1!==(""+e).indexOf("\0")},o.addTrailing=function(e){return e.replace(/\/*$/,"/")},o.removeTrailing=function(e){return""===(e=e.replace(/\/*$/,""))?"/":e},t.exports=o},{path:"UUq2",process:"pBGv"}],iJA9:[function(e,t,r){var n="READ",o="WRITE",a="CREATE",i="EXCLUSIVE",s="TRUNCATE",u="APPEND";t.exports={FILE_SYSTEM_NAME:"local",FILE_STORE_NAME:"files",IDB_RO:"readonly",IDB_RW:"readwrite",WSQL_VERSION:"1",WSQL_SIZE:5242880,WSQL_DESC:"FileSystem Storage",NODE_TYPE_FILE:"FILE",NODE_TYPE_DIRECTORY:"DIRECTORY",NODE_TYPE_SYMBOLIC_LINK:"SYMLINK",NODE_TYPE_META:"META",DEFAULT_DIR_PERMISSIONS:493,DEFAULT_FILE_PERMISSIONS:420,FULL_READ_WRITE_EXEC_PERMISSIONS:511,READ_WRITE_PERMISSIONS:438,SYMLOOP_MAX:10,BINARY_MIME_TYPE:"application/octet-stream",JSON_MIME_TYPE:"application/json",ROOT_DIRECTORY_NAME:"/",FS_FORMAT:"FORMAT",FS_NOCTIME:"NOCTIME",FS_NOMTIME:"NOMTIME",FS_NODUPEIDCHECK:"FS_NODUPEIDCHECK",O_READ:n,O_WRITE:o,O_CREATE:a,O_EXCLUSIVE:i,O_TRUNCATE:s,O_APPEND:u,O_FLAGS:{r:[n],"r+":[n,o],w:[o,a,s],"w+":[o,n,a,s],wx:[o,a,i,s],"wx+":[o,n,a,i,s],a:[o,a,u],"a+":[o,n,a,u],ax:[o,a,i,u],"ax+":[o,n,a,i,u]},XATTR_CREATE:"CREATE",XATTR_REPLACE:"REPLACE",FS_READY:"READY",FS_PENDING:"PENDING",FS_ERROR:"ERROR",SUPER_NODE_ID:"00000000-0000-0000-0000-000000000000",STDIN:0,STDOUT:1,STDERR:2,FIRST_DESCRIPTOR:3,ENVIRONMENT:{TMP:"/tmp",PATH:""},fsConstants:{O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_DSYNC:4194304,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_FS_COPYFILE_EXCL:1,COPYFILE_EXCL:1}}},{}],yh9p:[function(e,t,r){"use strict";r.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=function(e){var t,r,n=c(e),i=n[0],s=n[1],u=new a((h=i,p=s,3*(h+p)/4-p)),f=0,l=s>0?i-4:i;var h,p;for(r=0;r<l;r+=4)t=o[e.charCodeAt(r)]<<18|o[e.charCodeAt(r+1)]<<12|o[e.charCodeAt(r+2)]<<6|o[e.charCodeAt(r+3)],u[f++]=t>>16&255,u[f++]=t>>8&255,u[f++]=255&t;return 2===s&&(t=o[e.charCodeAt(r)]<<2|o[e.charCodeAt(r+1)]>>4,u[f++]=255&t),1===s&&(t=o[e.charCodeAt(r)]<<10|o[e.charCodeAt(r+1)]<<4|o[e.charCodeAt(r+2)]>>2,u[f++]=t>>8&255,u[f++]=255&t),u},r.fromByteArray=function(e){for(var t,r=e.length,o=r%3,a=[],i=0,s=r-o;i<s;i+=16383)a.push(l(e,i,i+16383>s?s:i+16383));return 1===o?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),a.join("")};for(var n=[],o=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=i.length;s<u;++s)n[s]=i[s],o[i.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function f(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function l(e,t,r){for(var n,o=[],a=t;a<r;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(f(n));return o.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},{}],JgNJ:[function(e,t,r){r.read=function(e,t,r,n,o){var a,i,s=8*o-n-1,u=(1<<s)-1,c=u>>1,f=-7,l=r?o-1:0,h=r?-1:1,p=e[t+l];for(l+=h,a=p&(1<<-f)-1,p>>=-f,f+=s;f>0;a=256*a+e[t+l],l+=h,f-=8);for(i=a&(1<<-f)-1,a>>=-f,f+=n;f>0;i=256*i+e[t+l],l+=h,f-=8);if(0===a)a=1-c;else{if(a===u)return i?NaN:1/0*(p?-1:1);i+=Math.pow(2,n),a-=c}return(p?-1:1)*i*Math.pow(2,a-n)},r.write=function(e,t,r,n,o,a){var i,s,u,c=8*a-o-1,f=(1<<c)-1,l=f>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,i=f):(i=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-i))<1&&(i--,u*=2),(t+=i+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(i++,u/=2),i+l>=f?(s=0,i=f):i+l>=1?(s=(t*u-1)*Math.pow(2,o),i+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,o),i=0));o>=8;e[r+p]=255&s,p+=d,s/=256,o-=8);for(i=i<<o|s,c+=o;c>0;e[r+p]=255&i,p+=d,i/=256,c-=8);e[r+p-d]|=128*m}},{}],REa7:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],dskh:[function(e,t,r){var n=arguments[3],o=e("base64-js"),a=e("ieee754"),i=e("isarray");function s(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}function u(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(e,t){if(u()<t)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=f.prototype:(null===e&&(e=new f(t)),e.length=t),e}function f(e,t,r){if(!(f.TYPED_ARRAY_SUPPORT||this instanceof f))return new f(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return l(this,e,t,r)}function l(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?y(e,t,r,n):"string"==typeof t?m(e,t,r):g(e,t)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function p(e,t,r,n){return h(t),t<=0?c(e,t):void 0!==r?"string"==typeof n?c(e,t).fill(r,n):c(e,t).fill(r):c(e,t)}function d(e,t){if(h(t),e=c(e,t<0?0:0|E(t)),!f.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function m(e,t,r){if("string"==typeof r&&""!==r||(r="utf8"),!f.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|w(t,r),o=(e=c(e,n)).write(t,r);return o!==n&&(e=e.slice(0,o)),e}function v(e,t){var r=t.length<0?0:0|E(t.length);e=c(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function y(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n),f.TYPED_ARRAY_SUPPORT?(e=t).__proto__=f.prototype:e=v(e,t),e}function g(e,t){if(f.isBuffer(t)){var r=0|E(t.length);return 0===(e=c(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||re(t.length)?c(e,0):v(e,t);if("Buffer"===t.type&&i(t.data))return v(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function E(e){if(e>=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|e}function b(e){return+e!=e&&(e=0),f.alloc(+e)}function w(e,t){if(f.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return ee(e).length;default:if(n)return G(e).length;t=(""+t).toLowerCase(),n=!0}}function P(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return B(this,t,r);case"utf8":case"utf-8":return j(this,t,r);case"ascii":return L(this,t,r);case"latin1":case"binary":return k(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function O(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function S(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=f.from(t,n)),f.isBuffer(t))return 0===t.length?-1:R(e,t,r,n,o);if("number"==typeof t)return t&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):R(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function R(e,t,r,n,o){var a,i=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;i=2,s/=2,u/=2,r/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(o){var f=-1;for(a=r;a<s;a++)if(c(e,a)===c(t,-1===f?0:a-f)){if(-1===f&&(f=a),a-f+1===u)return f*i}else-1!==f&&(a-=a-f),f=-1}else for(r+u>s&&(r=s-u),a=r;a>=0;a--){for(var l=!0,h=0;h<u;h++)if(c(e,a+h)!==c(t,h)){l=!1;break}if(l)return a}return-1}function I(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var i=0;i<n;++i){var s=parseInt(t.substr(2*i,2),16);if(isNaN(s))return i;e[r+i]=s}return i}function A(e,t,r,n){return te(G(t,e.length-r),e,r,n)}function _(e,t,r,n){return te(W(t),e,r,n)}function T(e,t,r,n){return _(e,t,r,n)}function D(e,t,r,n){return te(ee(t),e,r,n)}function N(e,t,r,n){return te(Z(t,e.length-r),e,r,n)}function x(e,t,r){return 0===t&&r===e.length?o.fromByteArray(e):o.fromByteArray(e.slice(t,r))}function j(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var a,i,s,u,c=e[o],f=null,l=c>239?4:c>223?3:c>191?2:1;if(o+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(a=e[o+1]))&&(u=(31&c)<<6|63&a)>127&&(f=u);break;case 3:a=e[o+1],i=e[o+2],128==(192&a)&&128==(192&i)&&(u=(15&c)<<12|(63&a)<<6|63&i)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:a=e[o+1],i=e[o+2],s=e[o+3],128==(192&a)&&128==(192&i)&&128==(192&s)&&(u=(15&c)<<18|(63&a)<<12|(63&i)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),o+=l}return C(n)}r.Buffer=f,r.SlowBuffer=b,r.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:s(),r.kMaxLength=u(),f.poolSize=8192,f._augment=function(e){return e.__proto__=f.prototype,e},f.from=function(e,t,r){return l(null,e,t,r)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(e,t,r){return p(null,e,t,r)},f.allocUnsafe=function(e){return d(null,e)},f.allocUnsafeSlow=function(e){return d(null,e)},f.isBuffer=function(e){return!(null==e||!e._isBuffer)},f.compare=function(e,t){if(!f.isBuffer(e)||!f.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,o=0,a=Math.min(r,n);o<a;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},f.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return f.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=f.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var a=e[r];if(!f.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,o),o+=a.length}return n},f.byteLength=w,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)O(this,t,t+1);return this},f.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)O(this,t,t+3),O(this,t+1,t+2);return this},f.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)O(this,t,t+7),O(this,t+1,t+6),O(this,t+2,t+5),O(this,t+3,t+4);return this},f.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?j(this,0,e):P.apply(this,arguments)},f.prototype.equals=function(e){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===f.compare(this,e)},f.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},f.prototype.compare=function(e,t,r,n,o){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(o>>>=0)-(n>>>=0),i=(r>>>=0)-(t>>>=0),s=Math.min(a,i),u=this.slice(n,o),c=e.slice(t,r),l=0;l<s;++l)if(u[l]!==c[l]){a=u[l],i=c[l];break}return a<i?-1:i<a?1:0},f.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},f.prototype.indexOf=function(e,t,r){return S(this,e,t,r,!0)},f.prototype.lastIndexOf=function(e,t,r){return S(this,e,t,r,!1)},f.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return I(this,e,t,r);case"utf8":case"utf-8":return A(this,e,t,r);case"ascii":return _(this,e,t,r);case"latin1":case"binary":return T(this,e,t,r);case"base64":return D(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var F=4096;function C(e){var t=e.length;if(t<=F)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=F));return r}function L(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function k(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function B(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",a=t;a<r;++a)o+=J(e[a]);return o}function M(e,t,r){for(var n=e.slice(t,r),o="",a=0;a<n.length;a+=2)o+=String.fromCharCode(n[a]+256*n[a+1]);return o}function U(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function $(e,t,r,n,o,a){if(!f.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<a)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function q(e,t,r,n){t<0&&(t=65535+t+1);for(var o=0,a=Math.min(e.length-r,2);o<a;++o)e[r+o]=(t&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function Y(e,t,r,n){t<0&&(t=4294967295+t+1);for(var o=0,a=Math.min(e.length-r,4);o<a;++o)e[r+o]=t>>>8*(n?o:3-o)&255}function V(e,t,r,n,o,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function z(e,t,r,n,o){return o||V(e,0,r,4),a.write(e,t,r,n,23,4),r+4}function K(e,t,r,n,o){return o||V(e,0,r,8),a.write(e,t,r,n,52,8),r+8}f.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),f.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=f.prototype;else{var o=t-e;r=new f(o,void 0);for(var a=0;a<o;++a)r[a]=this[a+e]}return r},f.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||U(e,t,this.length);for(var n=this[e],o=1,a=0;++a<t&&(o*=256);)n+=this[e+a]*o;return n},f.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||U(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},f.prototype.readUInt8=function(e,t){return t||U(e,1,this.length),this[e]},f.prototype.readUInt16LE=function(e,t){return t||U(e,2,this.length),this[e]|this[e+1]<<8},f.prototype.readUInt16BE=function(e,t){return t||U(e,2,this.length),this[e]<<8|this[e+1]},f.prototype.readUInt32LE=function(e,t){return t||U(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},f.prototype.readUInt32BE=function(e,t){return t||U(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},f.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||U(e,t,this.length);for(var n=this[e],o=1,a=0;++a<t&&(o*=256);)n+=this[e+a]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},f.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||U(e,t,this.length);for(var n=t,o=1,a=this[e+--n];n>0&&(o*=256);)a+=this[e+--n]*o;return a>=(o*=128)&&(a-=Math.pow(2,8*t)),a},f.prototype.readInt8=function(e,t){return t||U(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},f.prototype.readInt16LE=function(e,t){t||U(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt16BE=function(e,t){t||U(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt32LE=function(e,t){return t||U(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},f.prototype.readInt32BE=function(e,t){return t||U(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},f.prototype.readFloatLE=function(e,t){return t||U(e,4,this.length),a.read(this,e,!0,23,4)},f.prototype.readFloatBE=function(e,t){return t||U(e,4,this.length),a.read(this,e,!1,23,4)},f.prototype.readDoubleLE=function(e,t){return t||U(e,8,this.length),a.read(this,e,!0,52,8)},f.prototype.readDoubleBE=function(e,t){return t||U(e,8,this.length),a.read(this,e,!1,52,8)},f.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||$(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,a=0;for(this[t]=255&e;++a<r&&(o*=256);)this[t+a]=e/o&255;return t+r},f.prototype.writeUIntBE=function(e,t,r,n){e=+e,t|=0,r|=0,n||$(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,a=1;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=e/a&255;return t+r},f.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||$(this,e,t,1,255,0),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},f.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||$(this,e,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):q(this,e,t,!0),t+2},f.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||$(this,e,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):q(this,e,t,!1),t+2},f.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||$(this,e,t,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):Y(this,e,t,!0),t+4},f.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||$(this,e,t,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Y(this,e,t,!1),t+4},f.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);$(this,e,t,r,o-1,-o)}var a=0,i=1,s=0;for(this[t]=255&e;++a<r&&(i*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/i>>0)-s&255;return t+r},f.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);$(this,e,t,r,o-1,-o)}var a=r-1,i=1,s=0;for(this[t+a]=255&e;--a>=0&&(i*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/i>>0)-s&255;return t+r},f.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||$(this,e,t,1,127,-128),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},f.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||$(this,e,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):q(this,e,t,!0),t+2},f.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||$(this,e,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):q(this,e,t,!1),t+2},f.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||$(this,e,t,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Y(this,e,t,!0),t+4},f.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||$(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Y(this,e,t,!1),t+4},f.prototype.writeFloatLE=function(e,t,r){return z(this,e,t,!0,r)},f.prototype.writeFloatBE=function(e,t,r){return z(this,e,t,!1,r)},f.prototype.writeDoubleLE=function(e,t,r){return K(this,e,t,!0,r)},f.prototype.writeDoubleBE=function(e,t,r){return K(this,e,t,!1,r)},f.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var o,a=n-r;if(this===e&&r<t&&t<n)for(o=a-1;o>=0;--o)e[o+t]=this[o+r];else if(a<1e3||!f.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+a),t);return a},f.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var a;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a<r;++a)this[a]=e;else{var i=f.isBuffer(e)?e:G(new f(e,n).toString()),s=i.length;for(a=0;a<r-t;++a)this[a+t]=i[a%s]}return this};var H=/[^+\/0-9A-Za-z-_]/g;function Q(e){if((e=X(e).replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function X(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function J(e){return e<16?"0"+e.toString(16):e.toString(16)}function G(e,t){var r;t=t||1/0;for(var n=e.length,o=null,a=[],i=0;i<n;++i){if((r=e.charCodeAt(i))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(i+1===n){(t-=3)>-1&&a.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&a.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function W(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function Z(e,t){for(var r,n,o,a=[],i=0;i<e.length&&!((t-=2)<0);++i)n=(r=e.charCodeAt(i))>>8,o=r%256,a.push(o),a.push(n);return a}function ee(e){return o.toByteArray(Q(e))}function te(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function re(e){return e!=e}},{"base64-js":"yh9p",ieee754:"JgNJ",isarray:"REa7",buffer:"dskh"}],QO4x:[function(e,t,r){e("buffer").Buffer;var n=e("buffer").Buffer,o=arguments[3],a=e("../constants.js").FILE_SYSTEM_NAME,i=e("../constants.js").FILE_STORE_NAME,s=e("../constants.js").IDB_RW,u=e("../constants.js").IDB_RO;function c(e,t){this.db=e,this.mode=t}function f(e){this.name=e||a,this.db=null}c.prototype._getObjectStore=function(){if(this.objectStore)return this.objectStore;var e=this.db.transaction(i,this.mode);return this.objectStore=e.objectStore(i),this.objectStore},c.prototype.clear=function(e){try{var t=this._getObjectStore().clear();t.onsuccess=function(){e()},t.onerror=function(t){t.preventDefault(),e(t.error)}}catch(t){e(t)}},c.prototype._get=function(e,t){try{var r=this._getObjectStore().get(e);r.onsuccess=function(e){var r=e.target.result;t(null,r)},r.onerror=function(e){e.preventDefault(),t(e.error)}}catch(e){t(e)}},c.prototype.getObject=function(e,t){this._get(e,t)},c.prototype.getBuffer=function(e,t){this._get(e,(function(e,r){if(e)return t(e);t(null,n.from(r))}))},c.prototype._put=function(e,t,r){try{var n=this._getObjectStore().put(t,e);n.onsuccess=function(e){var t=e.target.result;r(null,t)},n.onerror=function(e){e.preventDefault(),r(e.error)}}catch(e){r(e)}},c.prototype.putObject=function(e,t,r){this._put(e,t,r)},c.prototype.putBuffer=function(e,t,r){var n=t.buffer;this._put(e,n,r)},c.prototype.delete=function(e,t){try{var r=this._getObjectStore().delete(e);r.onsuccess=function(e){var r=e.target.result;t(null,r)},r.onerror=function(e){e.preventDefault(),t(e.error)}}catch(e){t(e)}},f.isSupported=function(){return!!(o.indexedDB||o.mozIndexedDB||o.webkitIndexedDB||o.msIndexedDB)},f.prototype.open=function(e){var t=this;if(t.db)return e();try{var r=(o.indexedDB||o.mozIndexedDB||o.webkitIndexedDB||o.msIndexedDB).open(t.name);r.onupgradeneeded=function(e){var t=e.target.result;t.objectStoreNames.contains(i)&&t.deleteObjectStore(i),t.createObjectStore(i)},r.onsuccess=function(r){t.db=r.target.result,e()},r.onerror=function(t){t.preventDefault(),e(t.error)}}catch(t){e(t)}},f.prototype.getReadOnlyContext=function(){return new c(this.db,u)},f.prototype.getReadWriteContext=function(){return new c(this.db,s)},t.exports=f},{"../constants.js":"iJA9",buffer:"dskh"}],u4Zs:[function(e,t,r){e("process");var n,o=e("process");n={},void 0!==o&&o.nextTick?(n.nextTick=o.nextTick,"undefined"!=typeof setImmediate?n.setImmediate=function(e){setImmediate(e)}:n.setImmediate=n.nextTick):"function"==typeof setImmediate?(n.nextTick=function(e){setImmediate(e)},n.setImmediate=n.nextTick):(n.nextTick=function(e){setTimeout(e,0)},n.setImmediate=n.nextTick),n.eachSeries=function(e,t,r){if(r=r||function(){},!e.length)return r();var n=0;!function o(){t(e[n],(function(t){t?(r(t),r=function(){}):(n+=1)>=e.length?r():o()}))}()},n.forEachSeries=n.eachSeries,void 0!==t&&t.exports?t.exports=n:root.async=n},{process:"pBGv"}],OWym:[function(e,t,r){var n,o=e("../constants.js").FILE_SYSTEM_NAME,a=e("../../lib/async.js").setImmediate,i=(n={},function(e){return Object.prototype.hasOwnProperty.call(n,e)||(n[e]={}),n[e]});function s(e,t){this.readOnly=t,this.objectStore=e}function u(e){this.name=e||o}s.prototype.clear=function(e){if(this.readOnly)a((function(){e("[MemoryContext] Error: write operation on read only context")}));else{var t=this.objectStore;Object.keys(t).forEach((function(e){delete t[e]})),a(e)}},s.prototype.getObject=s.prototype.getBuffer=function(e,t){var r=this;a((function(){t(null,r.objectStore[e])}))},s.prototype.putObject=s.prototype.putBuffer=function(e,t,r){this.readOnly?a((function(){r("[MemoryContext] Error: write operation on read only context")})):(this.objectStore[e]=t,a(r))},s.prototype.delete=function(e,t){this.readOnly?a((function(){t("[MemoryContext] Error: write operation on read only context")})):(delete this.objectStore[e],a(t))},u.isSupported=function(){return!0},u.prototype.open=function(e){this.db=i(this.name),a(e)},u.prototype.getReadOnlyContext=function(){return new s(this.db,!0)},u.prototype.getReadWriteContext=function(){return new s(this.db,!1)},t.exports=u},{"../constants.js":"iJA9","../../lib/async.js":"u4Zs"}],AiW7:[function(e,t,r){var n=e("./indexeddb.js"),o=e("./memory.js");t.exports={IndexedDB:n,Default:n,Memory:o}},{"./indexeddb.js":"QO4x","./memory.js":"OWym"}],p8GN:[function(e,t,r){var n={};["3:EACCES:permission denied","9:EBADF:bad file descriptor","10:EBUSY:resource busy or locked","18:EINVAL:invalid argument","27:ENOTDIR:not a directory","28:EISDIR:illegal operation on a directory","34:ENOENT:no such file or directory","47:EEXIST:file already exists","50:EPERM:operation not permitted","51:ELOOP:too many symbolic links encountered","53:ENOTEMPTY:directory not empty","55:EIO:i/o error","1000:ENOTMOUNTED:not mounted","1001:EFILESYSTEMERROR:missing super node, use 'FORMAT' flag to format filesystem.","1002:ENOATTR:attribute does not exist"].forEach((function(e){var t=+(e=e.split(":"))[0],r=e[1],o=e[2];function a(e,n){Error.call(this),this.name=r,this.code=r,this.errno=t,this.message=e||o,n&&(this.path=n),this.stack=new Error(this.message).stack}a.prototype=Object.create(Error.prototype),a.prototype.constructor=a,a.prototype.toString=function(){var e=this.path?", '"+this.path+"'":"";return this.name+": "+this.message+e},n[r]=n[t]=a})),t.exports=n},{}],QMiB:[function(e,t,r){"use strict";var n=e("../constants.js").ENVIRONMENT;t.exports=function(e){(e=e||{}).TMP=e.TMP||n.TMP,e.PATH=e.PATH||n.PATH,this.get=function(t){return e[t]},this.set=function(t,r){e[t]=r}}},{"../constants.js":"iJA9"}],bQx9:[function(e,t,r){t.exports=function(e,t){for(var r=[],o=0;o<e.length;o++){var a=t(e[o],o);n(a)?r.push.apply(r,a):r.push(a)}return r};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],D9yG:[function(e,t,r){"use strict";function n(e,t,r){e instanceof RegExp&&(e=o(e,r)),t instanceof RegExp&&(t=o(t,r));var n=a(e,t,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+e.length,n[1]),post:r.slice(n[1]+t.length)}}function o(e,t){var r=t.match(e);return r?r[0]:null}function a(e,t,r){var n,o,a,i,s,u=r.indexOf(e),c=r.indexOf(t,u+1),f=u;if(u>=0&&c>0){for(n=[],a=r.length;f>=0&&!s;)f==u?(n.push(f),u=r.indexOf(e,f+1)):1==n.length?s=[n.pop(),c]:((o=n.pop())<a&&(a=o,i=c),c=r.indexOf(t,f+1)),f=u<c&&u>=0?u:c;n.length&&(s=[a,i])}return s}t.exports=n,n.range=a},{}],dwXQ:[function(e,t,r){var n=e("concat-map"),o=e("balanced-match");t.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),y(function(e){return e.split("\\\\").join(a).split("\\{").join(i).split("\\}").join(s).split("\\,").join(u).split("\\.").join(c)}(e),!0).map(l)):[]};var a="\0SLASH"+Math.random()+"\0",i="\0OPEN"+Math.random()+"\0",s="\0CLOSE"+Math.random()+"\0",u="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0";function f(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function l(e){return e.split(a).join("\\").split(i).join("{").split(s).join("}").split(u).join(",").split(c).join(".")}function h(e){if(!e)return[""];var t=[],r=o("{","}",e);if(!r)return e.split(",");var n=r.pre,a=r.body,i=r.post,s=n.split(",");s[s.length-1]+="{"+a+"}";var u=h(i);return i.length&&(s[s.length-1]+=u.shift(),s.push.apply(s,u)),t.push.apply(t,s),t}function p(e){return"{"+e+"}"}function d(e){return/^-?0\d/.test(e)}function m(e,t){return e<=t}function v(e,t){return e>=t}function y(e,t){var r=[],a=o("{","}",e);if(!a||/\$$/.test(a.pre))return[e];var i,u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body),l=u||c,g=a.body.indexOf(",")>=0;if(!l&&!g)return a.post.match(/,.*\}/)?y(e=a.pre+"{"+a.body+s+a.post):[e];if(l)i=a.body.split(/\.\./);else if(1===(i=h(a.body)).length&&1===(i=y(i[0],!1).map(p)).length)return(w=a.post.length?y(a.post,!1):[""]).map((function(e){return a.pre+i[0]+e}));var E,b=a.pre,w=a.post.length?y(a.post,!1):[""];if(l){var P=f(i[0]),O=f(i[1]),S=Math.max(i[0].length,i[1].length),R=3==i.length?Math.abs(f(i[2])):1,I=m;O<P&&(R*=-1,I=v);var A=i.some(d);E=[];for(var _=P;I(_,O);_+=R){var T;if(c)"\\"===(T=String.fromCharCode(_))&&(T="");else if(T=String(_),A){var D=S-T.length;if(D>0){var N=new Array(D+1).join("0");T=_<0?"-"+N+T.slice(1):N+T}}E.push(T)}}else E=n(i,(function(e){return y(e,!1)}));for(var x=0;x<E.length;x++)for(var j=0;j<w.length;j++){var F=b+E[x]+w[j];(!t||l||F)&&r.push(F)}return r}},{"concat-map":"bQx9","balanced-match":"D9yG"}],NtKi:[function(e,t,r){t.exports=h,h.Minimatch=p;var n={sep:"/"};try{n=e("path")}catch(e){}var o=h.GLOBSTAR=p.GLOBSTAR={},a=e("brace-expansion"),i={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},s="[^/]",u=s+"*?",c="().*{}+?[]^$\\!".split("").reduce((function(e,t){return e[t]=!0,e}),{});var f=/\/+/;function l(e,t){e=e||{},t=t||{};var r={};return Object.keys(t).forEach((function(e){r[e]=t[e]})),Object.keys(e).forEach((function(t){r[t]=e[t]})),r}function h(e,t,r){if("string"!=typeof t)throw new TypeError("glob pattern string required");return r||(r={}),!(!r.nocomment&&"#"===t.charAt(0))&&(""===t.trim()?""===e:new p(t,r).match(e))}function p(e,t){if(!(this instanceof p))return new p(e,t);if("string"!=typeof e)throw new TypeError("glob pattern string required");t||(t={}),e=e.trim(),"/"!==n.sep&&(e=e.split(n.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function d(e,t){if(t||(t=this instanceof p?this.options:{}),void 0===(e=void 0===e?this.pattern:e))throw new TypeError("undefined pattern");return t.nobrace||!e.match(/\{.*\}/)?[e]:a(e)}h.filter=function(e,t){return t=t||{},function(r,n,o){return h(r,e,t)}},h.defaults=function(e){if(!e||!Object.keys(e).length)return h;var t=h,r=function(r,n,o){return t.minimatch(r,n,l(e,o))};return r.Minimatch=function(r,n){return new t.Minimatch(r,l(e,n))},r},p.defaults=function(e){return e&&Object.keys(e).length?h.defaults(e).Minimatch:p},p.prototype.debug=function(){},p.prototype.make=function(){if(!this._made){var e=this.pattern,t=this.options;if(t.nocomment||"#"!==e.charAt(0))if(e){this.parseNegate();var r=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error),this.debug(this.pattern,r),r=this.globParts=r.map((function(e){return e.split(f)})),this.debug(this.pattern,r),r=r.map((function(e,t,r){return e.map(this.parse,this)}),this),this.debug(this.pattern,r),r=r.filter((function(e){return-1===e.indexOf(!1)})),this.debug(this.pattern,r),this.set=r}else this.empty=!0;else this.comment=!0}},p.prototype.parseNegate=function(){var e=this.pattern,t=!1,r=0;if(!this.options.nonegate){for(var n=0,o=e.length;n<o&&"!"===e.charAt(n);n++)t=!t,r++;r&&(this.pattern=e.substr(r)),this.negate=t}},h.braceExpand=function(e,t){return d(e,t)},p.prototype.braceExpand=d,p.prototype.parse=function(e,t){if(e.length>65536)throw new TypeError("pattern is too long");var r=this.options;if(!r.noglobstar&&"**"===e)return o;if(""===e)return"";var n,a="",f=!!r.nocase,l=!1,h=[],p=[],d=!1,v=-1,y=-1,g="."===e.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",E=this;function b(){if(n){switch(n){case"*":a+=u,f=!0;break;case"?":a+=s,f=!0;break;default:a+="\\"+n}E.debug("clearStateChar %j %j",n,a),n=!1}}for(var w,P=0,O=e.length;P<O&&(w=e.charAt(P));P++)if(this.debug("%s\t%s %s %j",e,P,a,w),l&&c[w])a+="\\"+w,l=!1;else switch(w){case"/":return!1;case"\\":b(),l=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,P,a,w),d){this.debug(" in class"),"!"===w&&P===y+1&&(w="^"),a+=w;continue}E.debug("call clearStateChar %j",n),b(),n=w,r.noext&&b();continue;case"(":if(d){a+="(";continue}if(!n){a+="\\(";continue}h.push({type:n,start:P-1,reStart:a.length,open:i[n].open,close:i[n].close}),a+="!"===n?"(?:(?!(?:":"(?:",this.debug("plType %j %j",n,a),n=!1;continue;case")":if(d||!h.length){a+="\\)";continue}b(),f=!0;var S=h.pop();a+=S.close,"!"===S.type&&p.push(S),S.reEnd=a.length;continue;case"|":if(d||!h.length||l){a+="\\|",l=!1;continue}b(),a+="|";continue;case"[":if(b(),d){a+="\\"+w;continue}d=!0,y=P,v=a.length,a+=w;continue;case"]":if(P===y+1||!d){a+="\\"+w,l=!1;continue}if(d){var R=e.substring(y+1,P);try{RegExp("["+R+"]")}catch(e){var I=this.parse(R,m);a=a.substr(0,v)+"\\["+I[0]+"\\]",f=f||I[1],d=!1;continue}}f=!0,d=!1,a+=w;continue;default:b(),l?l=!1:!c[w]||"^"===w&&d||(a+="\\"),a+=w}for(d&&(R=e.substr(y+1),I=this.parse(R,m),a=a.substr(0,v)+"\\["+I[0],f=f||I[1]),S=h.pop();S;S=h.pop()){var A=a.slice(S.reStart+S.open.length);this.debug("setting tail",a,S),A=A.replace(/((?:\\{2}){0,64})(\\?)\|/g,(function(e,t,r){return r||(r="\\"),t+t+r+"|"})),this.debug("tail=%j\n %s",A,A,S,a);var _="*"===S.type?u:"?"===S.type?s:"\\"+S.type;f=!0,a=a.slice(0,S.reStart)+_+"\\("+A}b(),l&&(a+="\\\\");var T=!1;switch(a.charAt(0)){case".":case"[":case"(":T=!0}for(var D=p.length-1;D>-1;D--){var N=p[D],x=a.slice(0,N.reStart),j=a.slice(N.reStart,N.reEnd-8),F=a.slice(N.reEnd-8,N.reEnd),C=a.slice(N.reEnd);F+=C;var L=x.split("(").length-1,k=C;for(P=0;P<L;P++)k=k.replace(/\)[+*?]?/,"");var B="";""===(C=k)&&t!==m&&(B="$"),a=x+j+C+B+F}if(""!==a&&f&&(a="(?=.)"+a),T&&(a=g+a),t===m)return[a,f];if(!f)return function(e){return e.replace(/\\(.)/g,"$1")}(e);var M=r.nocase?"i":"";try{var U=new RegExp("^"+a+"$",M)}catch(e){return new RegExp("$.")}return U._glob=e,U._src=a,U};var m={};h.makeRe=function(e,t){return new p(e,t||{}).makeRe()},p.prototype.makeRe=function(){if(this.regexp||!1===this.regexp)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,r=t.noglobstar?u:t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",n=t.nocase?"i":"",a=e.map((function(e){return e.map((function(e){return e===o?r:"string"==typeof e?function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}(e):e._src})).join("\\/")})).join("|");a="^(?:"+a+")$",this.negate&&(a="^(?!"+a+").*$");try{this.regexp=new RegExp(a,n)}catch(e){this.regexp=!1}return this.regexp},h.match=function(e,t,r){var n=new p(t,r=r||{});return e=e.filter((function(e){return n.match(e)})),n.options.nonull&&!e.length&&e.push(t),e},p.prototype.match=function(e,t){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;var r=this.options;"/"!==n.sep&&(e=e.split(n.sep).join("/")),e=e.split(f),this.debug(this.pattern,"split",e);var o,a,i=this.set;for(this.debug(this.pattern,"set",i),a=e.length-1;a>=0&&!(o=e[a]);a--);for(a=0;a<i.length;a++){var s=i[a],u=e;if(r.matchBase&&1===s.length&&(u=[o]),this.matchOne(u,s,t))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate},p.prototype.matchOne=function(e,t,r){var n=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var a=0,i=0,s=e.length,u=t.length;a<s&&i<u;a++,i++){this.debug("matchOne loop");var c,f=t[i],l=e[a];if(this.debug(t,f,l),!1===f)return!1;if(f===o){this.debug("GLOBSTAR",[t,f,l]);var h=a,p=i+1;if(p===u){for(this.debug("** at the end");a<s;a++)if("."===e[a]||".."===e[a]||!n.dot&&"."===e[a].charAt(0))return!1;return!0}for(;h<s;){var d=e[h];if(this.debug("\nglobstar while",e,h,t,p,d),this.matchOne(e.slice(h),t.slice(p),r))return this.debug("globstar found match!",h,s,d),!0;if("."===d||".."===d||!n.dot&&"."===d.charAt(0)){this.debug("dot detected!",e,h,t,p);break}this.debug("globstar swallow a segment, and continue"),h++}return!(!r||(this.debug("\n>>> no match, partial?",e,h,t,p),h!==s))}if("string"==typeof f?(c=n.nocase?l.toLowerCase()===f.toLowerCase():l===f,this.debug("string match",f,l,c)):(c=l.match(f),this.debug("pattern match",f,l,c)),!c)return!1}if(a===s&&i===u)return!0;if(a===s)return r;if(i===u)return a===s-1&&""===e[a];throw new Error("wtf?")}},{path:"UUq2","brace-expansion":"dwXQ"}],D1Ra:[function(e,t,r){var n=e("es6-promisify").promisify,o=e("../path.js"),a=e("../errors.js"),i=e("./environment.js"),s=e("../../lib/async.js"),u=e("minimatch");function c(e,t){var r=this,s=new i((t=t||{}).env),u="/";Object.defineProperty(this,"fs",{get:function(){return e},enumerable:!0}),Object.defineProperty(this,"env",{get:function(){return s},enumerable:!0}),this.cd=function(t,r){t=o.resolve(u,t),e.stat(t,(function(e,n){e?r(new a.ENOTDIR(null,t)):"DIRECTORY"===n.type?(u=t,r()):r(new a.ENOTDIR(null,t))}))},this.pwd=function(){return u},this.promises={},["cd","exec","touch","cat","ls","rm","tempDir","mkdirp","find"].forEach((function(e){r.promises[e]=n(r[e].bind(r))}))}c.prototype.exec=function(e,t,r){var n=this.fs;"function"==typeof t&&(r=t,t=[]),t=t||[],r=r||function(){},e=o.resolve(this.pwd(),e),n.readFile(e,"utf8",(function(e,o){if(e)r(e);else try{new Function("fs","args","callback",o)(n,t,r)}catch(e){r(e)}}))},c.prototype.touch=function(e,t,r){var n=this.fs;"function"==typeof t&&(r=t,t={}),t=t||{},r=r||function(){},e=o.resolve(this.pwd(),e),n.stat(e,(function(o){var a;o?!0===t.updateOnly?r():(a=e,n.writeFile(a,"",r)):function(e){var o=Date.now(),a=t.date||o,i=t.date||o;n.utimes(e,a,i,r)}(e)}))},c.prototype.cat=function(e,t){var r=this,n=r.fs,i="";t=t||function(){},e?(e="string"==typeof e?[e]:e,s.eachSeries(e,(function(e,t){var a=o.resolve(r.pwd(),e);n.readFile(a,"utf8",(function(e,r){e?t(e):(i+=r+"\n",t())}))}),(function(e){e?t(e):t(null,i.replace(/\n$/,""))}))):t(new a.EINVAL("Missing files argument"))},c.prototype.ls=function(e,t,r){var n=this,i=n.fs;"function"==typeof t&&(r=t,t={}),t=t||{},r=r||function(){},e?function e(r,a){var u=o.resolve(n.pwd(),r),c=[];i.readdir(u,(function(r,n){r?a(r):s.eachSeries(n,(function(r,n){r=o.join(u,r),i.stat(r,(function(r,a){if(r)n(r);else{var i=a;t.recursive&&"DIRECTORY"===a.type?e(o.join(u,i.name),(function(e,t){e?n(e):(i.contents=t,c.push(i),n())})):(c.push(i),n())}}))}),(function(e){a(e,c)}))}))}(e,r):r(new a.EINVAL("Missing dir argument"))},c.prototype.rm=function(e,t,r){var n=this,i=n.fs;"function"==typeof t&&(r=t,t={}),t=t||{},r=r||function(){},e?function e(r,u){r=o.resolve(n.pwd(),r),i.stat(r,(function(n,c){n?u(n):"FILE"!==c.type?i.readdir(r,(function(n,c){n?u(n):0!==c.length?t.recursive?(c=c.map((function(e){return o.join(r,e)})),s.eachSeries(c,e,(function(e){e?u(e):i.rmdir(r,u)}))):u(new a.ENOTEMPTY(null,r)):i.rmdir(r,u)})):i.unlink(r,u)}))}(e,r):r(new a.EINVAL("Missing path argument"))},c.prototype.tempDir=function(e){var t=this.fs,r=this.env.get("TMP");e=e||function(){},t.mkdir(r,(function(){e(null,r)}))},c.prototype.mkdirp=function(e,t){var r=this.fs;t=t||function(){},e?"/"!==(e=o.resolve(this.pwd(),e))?function e(t,n){r.stat(t,(function(i,s){if(s){if(s.isDirectory())return void n();if(s.isFile())return void n(new a.ENOTDIR(null,t))}else{if(i&&"ENOENT"!==i.code)return void n(i);var u=o.dirname(t);"/"===u?r.mkdir(t,(function(e){e&&"EEXIST"!==e.code?n(e):n()})):e(u,(function(e){if(e)return n(e);r.mkdir(t,(function(e){e&&"EEXIST"!==e.code?n(e):n()}))}))}}))}(e,t):t():t(new a.EINVAL("Missing path argument"))},c.prototype.find=function(e,t,r){var n=this,i=n.fs;"function"==typeof t&&(r=t,t={}),r=r||function(){};var c=(t=t||{}).exec||function(e,t){t()},f=[];function l(e,r){var n,a,i=o.removeTrailing(e);!t.regex||t.regex.test(i)?t.name&&!u(o.basename(i),t.name)||t.path&&!u(o.dirname(i),t.path)?r():(a=r,c(n=e,(function(e){e?a(e):(f.push(n),a())}))):r()}function h(e,t){e=o.resolve(n.pwd(),e),i.readdir(e,(function(r,n){r?"ENOTDIR"===r.code?l(e,t):t(r):l(o.addTrailing(e),(function(r){r?t(r):(n=n.map((function(t){return o.join(e,t)})),s.eachSeries(n,h,(function(e){t(e,f)})))}))}))}e?i.stat(e,(function(t,n){t?r(t):n.isDirectory()?h(e,r):r(new a.ENOTDIR(null,e))})):r(new a.EINVAL("Missing path argument"))},t.exports=c},{"es6-promisify":"b1ZG","../path.js":"UzoP","../errors.js":"p8GN","./environment.js":"QMiB","../../lib/async.js":"u4Zs",minimatch:"NtKi"}],J4Qg:[function(e,t,r){var n=function(){};n.createInterface=function(e){var t={on:function(t,r){void 0===this[e]&&(this[e]={}),this[e].hasOwnProperty(t)||(this[e][t]=[]),this[e][t].push(r)},off:function(t,r){void 0!==this[e]&&this[e].hasOwnProperty(t)&&function(e,t){for(var r=t.length-1;r>=0;r--)t[r]===e&&t.splice(r,1)}(r,this[e][t])},trigger:function(t){if(void 0!==this[e]&&this[e].hasOwnProperty(t))for(var r=Array.prototype.slice.call(arguments,1),n=0;n<this[e][t].length;n++)this[e][t][n].apply(this[e][t][n],r)},removeAllListeners:function(t){if(void 0!==this[e]){var r=this;r[e][t].forEach((function(e){r.off(t,e)}))}}};return t};var o=n.createInterface("_handlers");n.prototype._on=o.on,n.prototype._off=o.off,n.prototype._trigger=o.trigger;var a=n.createInterface("handlers");n.prototype.on=function(){a.on.apply(this,arguments),Array.prototype.unshift.call(arguments,"on"),this._trigger.apply(this,arguments)},n.prototype.off=a.off,n.prototype.trigger=a.trigger,n.prototype.removeAllListeners=a.removeAllListeners,t.exports=n},{}],zBMa:[function(e,t,r){function n(e){return e.replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}t.exports={guid:function(){return n("xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx").toUpperCase()},nop:function(){},randomChars:function(e){return n("x".repeat(e=e||6))}}},{}],u7Jv:[function(e,t,r){var n=arguments[3];function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=e("./eventemitter.js"),i=e("../src/shared.js").guid;function s(e,t){var r=0;return function(){var n=Date.now();n-r>e&&(r=n,t.apply(this,arguments))}}function u(e,t){if(void 0!==e&&e||(e={}),"object"===o(t))for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}var c,f=void 0===(c=n)||void 0===c.localStorage?{getItem:function(){},setItem:function(){},removeItem:function(){}}:c.localStorage;function l(){var e=this,t=Date.now();this.origin=i(),this.lastMessage=t,this.receivedIDs={},this.previousValues={};var r=function(){e._onStorageEvent.apply(e,arguments)};"undefined"!=typeof document&&(document.attachEvent?document.attachEvent("onstorage",r):n.addEventListener("storage",r,!1))}l.prototype._transaction=function(e){var t=this,r=!1,n=!1,o=null;!function a(){if(!r){var i=Date.now(),s=0|f.getItem(d);if(s&&i-s<1e3)return n||(t._on("storage",a),n=!0),void(o=setTimeout(a,20));r=!0,f.setItem(d,i),e(),n&&t._off("storage",a),o&&clearTimeout(o),f.removeItem(d)}}()},l.prototype._cleanup_emit=s(100,(function(){this._transaction((function(){var e,t=Date.now()-m,r=0;try{e=JSON.parse(f.getItem(h)||"[]")}catch(t){e=[]}for(var n=e.length-1;n>=0;n--)e[n].timestamp<t&&(e.splice(n,1),r++);r>0&&f.setItem(h,JSON.stringify(e))}))})),l.prototype._cleanup_once=s(100,(function(){var e=this;e._transaction((function(){Date.now();var t,r,n=0;try{r=JSON.parse(f.getItem(p)||"{}")}catch(e){r={}}for(t in r)e._once_expired(t,r)&&(delete r[t],n++);n>0&&f.setItem(p,JSON.stringify(r))}))})),l.prototype._once_expired=function(e,t){if(!t)return!0;if(!t.hasOwnProperty(e))return!0;if("object"!==o(t[e]))return!0;var r=t[e].ttl||v,n=Date.now();return t[e].timestamp<n-r},l.prototype._localStorageChanged=function(e,t){if(e&&e.key)return e.key===t;var r=f.getItem(t);return r!==this.previousValues[t]&&(this.previousValues[t]=r,!0)},l.prototype._onStorageEvent=function(e){e=e||n.event;var t=this;this._localStorageChanged(e,h)&&this._transaction((function(){var e,r=Date.now(),n=f.getItem(h);try{e=JSON.parse(n||"[]")}catch(t){e=[]}for(var o=0;o<e.length;o++)if(e[o].origin!==t.origin&&!(e[o].timestamp<t.lastMessage)){if(e[o].id){if(t.receivedIDs.hasOwnProperty(e[o].id))continue;t.receivedIDs[e[o].id]=!0}t.trigger(e[o].name,e[o].payload)}t.lastMessage=r})),this._trigger("storage",e)},l.prototype._emit=function(e,t,r){if((r="string"==typeof r||"number"==typeof r?String(r):null)&&r.length){if(this.receivedIDs.hasOwnProperty(r))return;this.receivedIDs[r]=!0}var n={id:r,name:e,origin:this.origin,timestamp:Date.now(),payload:t},o=this;this._transaction((function(){var r=f.getItem(h)||"[]",a="[]"===r?"":",";r=[r.substring(0,r.length-1),a,JSON.stringify(n),"]"].join(""),f.setItem(h,r),o.trigger(e,t),setTimeout((function(){o._cleanup_emit()}),50)}))},l.prototype.emit=function(e,t){this._emit.apply(this,arguments),this._trigger("emit",e,t)},l.prototype.once=function(e,t,r){if(l.supported){var n=this;this._transaction((function(){var o;try{o=JSON.parse(f.getItem(p)||"{}")}catch(e){o={}}n._once_expired(e,o)&&(o[e]={},o[e].timestamp=Date.now(),"number"==typeof r&&(o[e].ttl=1e3*r),f.setItem(p,JSON.stringify(o)),t(),setTimeout((function(){n._cleanup_once()}),50))}))}},u(l.prototype,a.prototype),l.supported=void 0!==f;var h="intercom",p="intercom_once",d="intercom_lock",m=5e4,v=36e5;l.destroy=function(){f.removeItem(d),f.removeItem(h),f.removeItem(p)},l.getInstance=function(){var e;return function(){return e||(e=new l),e}}(),t.exports=l},{"./eventemitter.js":"J4Qg","../src/shared.js":"zBMa"}],VLEe:[function(e,t,r){var n=e("../lib/eventemitter.js"),o=e("./path.js"),a=e("../lib/intercom.js");function i(){n.call(this);var e,t,r=this,i=!1;function s(n){(t===n||i&&0===n.indexOf(e))&&r.trigger("change","change",n)}r.start=function(r,n,u){if(!t){if(o.isNull(r))throw new Error("Path must be a string without null bytes.");t=o.normalize(r),(i=!0===u)&&(e="/"===t?"/":t+"/"),a.getInstance().on("change",s)}},r.close=function(){a.getInstance().off("change",s),r.removeAllListeners("change")}}i.prototype=new n,i.prototype.constructor=i,t.exports=i},{"../lib/eventemitter.js":"J4Qg","./path.js":"UzoP","../lib/intercom.js":"u7Jv"}],ZECt:[function(e,t,r){var n=e("./constants.js").NODE_TYPE_FILE;t.exports=function(e,t){this.id=e,this.type=t||n}},{"./constants.js":"iJA9"}],osLK:[function(e,t,r){var n=e("./constants").FIRST_DESCRIPTOR,o={},a=function(e){return o[e]};t.exports={allocDescriptor:function(e){var t=function(){for(var e=n;a(e);)e++;return e}();return o[t]=e,t},releaseDescriptor:function(e){return delete o[e]},getOpenFileDescription:a}},{"./constants":"iJA9"}],KKNo:[function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=e("./constants"),a=o.NODE_TYPE_FILE,i=o.NODE_TYPE_DIRECTORY,s=o.NODE_TYPE_SYMBOLIC_LINK,u=o.DEFAULT_FILE_PERMISSIONS,c=o.DEFAULT_DIR_PERMISSIONS,f=e("./constants").fsConstants,l=f.S_IFREG,h=f.S_IFDIR,p=f.S_IFLNK;function d(e,t,r){if(e[t])return r();e.guid((function(n,o){if(n)return r(n);e[t]=o,r()}))}function m(e,t){switch(e){case i:return(t||c)|h;case s:return(t||u)|p;default:return(t||u)|l}}var v=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var r=Date.now();this.id=t.id,this.data=t.data,this.size=t.size||0,this.atime=t.atime||r,this.ctime=t.ctime||r,this.mtime=t.mtime||r,this.flags=t.flags||[],this.xattrs=t.xattrs||{},this.nlinks=t.nlinks||0,"string"==typeof t.type?this.type=t.type:"string"==typeof t.mode?this.type=t.mode:this.type=a,this.permissions=t.permissions||m(this.type),this.uid=t.uid||0,this.gid=t.gid||0}return t=e,r=[{key:"toJSON",value:function(){return{id:this.id,data:this.data,size:this.size,atime:this.atime,ctime:this.ctime,mtime:this.ctime,flags:this.flags,xattrs:this.xattrs,nlinks:this.nlinks,mode:this.type,permissions:this.permissions,uid:this.uid,gid:this.gid}}},{key:"mode",get:function(){return m(this.type,this.permissions)},set:function(e){this.permissions=e}}],r&&n(t.prototype,r),o&&n(t,o),e;var t,r,o}();t.exports.create=function(e,t){d(e,"id",(function(r){if(r)return t(r);d(e,"data",(function(r){if(r)return t(r);t(null,new v(e))}))}))}},{"./constants":"iJA9"}],XWaV:[function(e,t,r){var n=e("./errors.js"),o=e("./node");function a(e,t,r,n){this.path=e,this.id=t,this.flags=r,this.position=n}a.prototype.getNode=function(e,t){var r=this.id,a=this.path;e.getObject(r,(function(e,r){return e?t(e):r?void o.create(r,t):t(new n.EBADF("file descriptor refers to unknown node",a))}))},t.exports=a},{"./errors.js":"p8GN","./node":"KKNo"}],JEp0:[function(e,t,r){var n=e("./constants.js");function o(e){var t=Date.now();this.id=n.SUPER_NODE_ID,this.type=n.NODE_TYPE_META,this.atime=e.atime||t,this.ctime=e.ctime||t,this.mtime=e.mtime||t,this.rnode=e.rnode}o.create=function(e,t){e.guid((function(r,n){r?t(r):(e.rnode=e.rnode||n,t(null,new o(e)))}))},t.exports=o},{"./constants.js":"iJA9"}],dsCT:[function(e,t,r){"use strict";var n=e("./constants.js"),o=e("./path.js");function a(e){return new Date(Number(e))}function i(e,t,r){this.dev=r,this.node=t.id,this.type=t.type,this.size=t.size,this.nlinks=t.nlinks,this.atime=a(t.atime),this.mtime=a(t.mtime),this.ctime=a(t.ctime),this.atimeMs=t.atime,this.mtimeMs=t.mtime,this.ctimeMs=t.ctime,this.version=t.version,this.mode=t.mode,this.uid=t.uid,this.gid=t.gid,this.name=o.basename(e)}i.prototype.isFile=function(){return this.type===n.NODE_TYPE_FILE},i.prototype.isDirectory=function(){return this.type===n.NODE_TYPE_DIRECTORY},i.prototype.isSymbolicLink=function(){return this.type===n.NODE_TYPE_SYMBOLIC_LINK},i.prototype.isSocket=i.prototype.isFIFO=i.prototype.isCharacterDevice=i.prototype.isBlockDevice=function(){return!1},t.exports=i},{"./constants.js":"iJA9","./path.js":"UzoP"}],q4Wu:[function(e,t,r){"use strict";var n=e("./stats.js");function o(e,t,r){this.constructor=o,n.call(this,e,t,r)}o.prototype=n.prototype,t.exports=o},{"./stats.js":"dsCT"}],bsBG:[function(e,t,r){e("buffer").Buffer;var n=e("buffer").Buffer;function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=e("../path.js"),i=a.normalize,s=a.dirname,u=a.basename,c=a.isAbsolute,f=e("../shared.js"),l=e("../../lib/async.js"),h=e("../constants.js"),p=h.NODE_TYPE_FILE,d=h.NODE_TYPE_DIRECTORY,m=h.NODE_TYPE_SYMBOLIC_LINK,v=h.NODE_TYPE_META,y=h.FULL_READ_WRITE_EXEC_PERMISSIONS,g=h.ROOT_DIRECTORY_NAME,E=h.SUPER_NODE_ID,b=h.SYMLOOP_MAX,w=h.O_READ,P=h.O_WRITE,O=h.O_CREATE,S=h.O_EXCLUSIVE,R=h.O_APPEND,I=h.O_FLAGS,A=h.XATTR_CREATE,_=h.XATTR_REPLACE,T=h.FS_NOMTIME,D=h.FS_NOCTIME,N=e("../errors.js"),x=e("../directory-entry.js"),j=e("../open-files.js"),F=e("../open-file-description.js"),C=e("../super-node.js"),L=e("../node.js"),k=e("../dirent.js"),B=e("../stats.js");function M(e,t,r,n,o){var a=e.flags;a.includes(D)&&delete n.ctime,a.includes(T)&&delete n.mtime;var i=!1;function s(r){e.changes.push({event:"change",path:t}),o(r)}n.ctime&&(r.ctime=n.ctime,r.atime=n.ctime,i=!0),n.atime&&(r.atime=n.atime,i=!0),n.mtime&&(r.mtime=n.mtime,i=!0),i?e.putObject(r.id,r,s):s()}function U(e,t,r){if(!(t=i(t)))return r(new N.ENOENT("path is an empty string"));var n=u(t),o=s(t),a=0;function c(t,n){if(t)return r(t);var o=new C(n);o&&o.type===v&&o.rnode?e.getObject(o.rnode,f):r(new N.EFILESYSTEMERROR)}function f(e,t){e?r(e):t?L.create(t,r):r(new N.ENOENT)}function l(n,o){n?r(n):o.type===d&&o.data?e.getObject(o.data,h):r(new N.ENOTDIR("a component of the path prefix is not a directory",t))}function h(o,a){if(o)r(o);else if(Object.prototype.hasOwnProperty.call(a,n)){var i=a[n].id;e.getObject(i,p)}else r(new N.ENOENT(null,t))}function p(e,t){if(e)return r(e);L.create(t,y)}function y(f,h){var p;f?r(f):h.type===m?++a>b?r(new N.ELOOP(null,t)):(p=h.data,p=i(p),o=s(p),n=u(p),g===n?e.getObject(E,c):U(e,o,l)):r(null,h)}g===n?e.getObject(E,c):U(e,o,l)}function $(e,t,r,n,o,a,i){var s=r.xattrs;a===A&&Object.prototype.hasOwnProperty.call(s,n)?i(new N.EEXIST("attribute already exists",t)):a!==_||Object.prototype.hasOwnProperty.call(s,n)?(s[n]=o,e.putObject(r.id,r,(function(n){n?i(n):M(e,t,r,{ctime:Date.now()},i)}))):i(new N.ENOATTR(null,t))}function q(e,t,r){t=i(t);var n,o,a,c,f=u(t),l=s(t);function h(t,n){t?r(t):(a=n,e.getObject(a.data,p))}function p(t,o){t?r(t):(c=o,L.create({guid:e.guid,type:d},(function(t,o){t?r(t):((n=o).nlinks+=1,e.putObject(n.id,n,m))})))}function m(t){t?r(t):(o={},e.putObject(n.data,o,y))}function v(t){if(t)r(t);else{var n=Date.now();M(e,l,a,{mtime:n,ctime:n},r)}}function y(t){t?r(t):(c[f]=new x(n.id,d),e.putObject(a.data,c,v))}U(e,t,(function(n,o){!n&&o?r(new N.EEXIST(null,t)):!n||n instanceof N.ENOENT?U(e,l,h):r(n)}))}function Y(e,t,r){t=i(t);var n,o,a,c,f=u(t),l=s(t);function h(o,a){o?r(o):g===f?r(new N.EBUSY(null,t)):Object.prototype.hasOwnProperty.call(a,f)?(n=(c=a)[f].id,e.getObject(n,p)):r(new N.ENOENT(null,t))}function p(o,a){o?r(o):a.type!==d?r(new N.ENOTDIR(null,t)):(n=a,e.getObject(n.data,m))}function m(n,i){n?r(n):(o=i,Object.keys(o).length>0?r(new N.ENOTEMPTY(null,t)):(delete c[f],e.putObject(a.data,c,v)))}function v(t){if(t)r(t);else{var n=Date.now();M(e,l,a,{mtime:n,ctime:n},y)}}function y(t){t?r(t):e.delete(n.id,E)}function E(t){t?r(t):e.delete(n.data,r)}U(e,l,(function(t,n){t?r(t):(a=n,e.getObject(a.data,h))}))}function V(e,t,r,o,a){"function"==typeof o&&(a=o,o=null),t=i(t);var c,f,l,h,v,y=u(t),E=s(t),w=0;function R(r,n){r?a(r):n.type!==d?a(new N.ENOENT(null,t)):(c=n,e.getObject(c.data,I))}function I(n,i){n?a(n):(f=i,Object.prototype.hasOwnProperty.call(f,y)?r.includes(S)?a(new N.EEXIST("O_CREATE and O_EXCLUSIVE are set, and the named file exists",t)):(l=f[y]).type===d&&r.includes(P)?a(new N.EISDIR("the named file is a directory and O_WRITE is set",t)):e.getObject(l.id,A):r.includes(O)?L.create({guid:e.guid,type:p},(function(t,r){t?a(t):((h=r).nlinks+=1,o&&(h.mode=o),e.putObject(h.id,h,T))})):a(new N.ENOENT("O_CREATE is not set and the named file does not exist",t)))}function A(n,o){if(n)a(n);else{var c=o;c.type===m?++w>b?a(new N.ELOOP(null,t)):(f=c.data,f=i(f),E=s(f),y=u(f),g===y&&(r.includes(P)?a(new N.EISDIR("the named file is a directory and O_WRITE is set",t)):U(e,t,_)),U(e,E,R)):_(void 0,c)}var f}function _(e,t){e?a(e):a(null,h=t)}function T(t){t?a(t):(v=n.alloc(0),e.putBuffer(h.data,v,j))}function D(t){if(t)a(t);else{var r=Date.now();M(e,E,c,{mtime:r,ctime:r},F)}}function j(t){t?a(t):(f[y]=new x(h.id,p),e.putObject(c.data,f,D))}function F(e){e?a(e):a(null,h)}g===y?r.includes(P)?a(new N.EISDIR("the named file is a directory and O_WRITE is set",t)):U(e,t,_):U(e,E,R)}function z(e,t,r,o,a,i){var s;function u(e){e?i(e):i(null,a)}function c(r){if(r)i(r);else{var n=Date.now();M(e,t.path,s,{mtime:n,ctime:n},u)}}function f(t){t?i(t):e.putObject(s.id,s,c)}e.getObject(t.id,(function(u,c){if(u)i(u);else{s=c;var l=n.alloc(a);r.copy(l,0,o,o+a),t.position=a,s.size=a,s.version+=1,e.putBuffer(s.data,l,f)}}))}function K(e,t,r,o,a,i,s){var u,c;function f(e){e?s(e):s(null,a)}function l(r){if(r)s(r);else{var n=Date.now();M(e,t.path,u,{mtime:n,ctime:n},f)}}function h(t){t?s(t):e.putObject(u.id,u,l)}function p(f,l){if(f)s(f);else{if(!(c=l))return s(new N.EIO("Expected Buffer"));var p=null!=i?i:t.position,d=Math.max(c.length,p+a),m=n.alloc(d);c&&c.copy(m),r.copy(m,p,o,o+a),void 0===i&&(t.position+=a),u.size=d,u.version+=1,e.putBuffer(u.data,m,h)}}e.getObject(t.id,(function(t,r){t?s(t):(u=r,e.getBuffer(u.data,p))}))}function H(e,t,r,n,o,a,i){var s,u;function c(e,s){if(e)i(e);else{if(!(u=s))return i(new N.EIO("Expected Buffer"));var c=null!=a?a:t.position;o=c+o>r.length?o-c:o,u.copy(r,n,c,c+o),void 0===a&&(t.position+=o),i(null,o)}}e.getObject(t.id,(function(r,n){r?i(r):n.type===d?i(new N.EISDIR("the named file is a directory",t.path)):(s=n,e.getBuffer(s.data,c))}))}function Q(e,t,r){t.getNode(e,r)}function X(e,t,r){t=i(t);var n,o,a=u(t),c=s(t);function f(e,t){if(e)return r(e);L.create(t,r)}function l(n,i){n?r(n):(o=i,Object.prototype.hasOwnProperty.call(o,a)?e.getObject(o[a].id,f):r(new N.ENOENT("a component of the path does not name an existing file",t)))}g===a?U(e,t,r):U(e,c,(function(t,o){t?r(t):(n=o,e.getObject(n.data,l))}))}function J(e,t,r,n){t=i(t);var o=u(t),a=s(t);r=i(r);var c,f,l,h,p,m,v=u(r),y=s(r),g=Date.now();function E(t){t?n(t):M(e,r,m,{ctime:g},n)}function b(t,r){t?n(t):((m=r).nlinks+=1,e.putObject(m.id,m,E))}function w(t){t?n(t):e.getObject(p,b)}function P(t,r){t?n(t):(h=r,Object.prototype.hasOwnProperty.call(h,v)?n(new N.EEXIST("newpath resolves to an existing file",v)):(h[v]=f[o],p=h[v].id,e.putObject(l.data,h,w)))}function O(t,r){t?n(t):(l=r,e.getObject(l.data,P))}function S(t,r){t?n(t):(f=r,Object.prototype.hasOwnProperty.call(f,o)?f[o].type===d?n(new N.EPERM("oldpath refers to a directory")):U(e,y,O):n(new N.ENOENT("a component of either path prefix does not exist",o)))}U(e,a,(function(t,r){t?n(t):(c=r,e.getObject(c.data,S))}))}function G(e,t,r){t=i(t);var n,o,a,c=u(t),f=s(t);function l(t){t?r(t):(delete o[c],e.putObject(n.data,o,(function(t){if(t)r(t);else{var o=Date.now();M(e,f,n,{mtime:o,ctime:o},r)}})))}function h(t){t?r(t):e.delete(a.data,l)}function p(n,o){n?r(n):o.type===d?r(new N.EPERM("unlink not permitted on directories",c)):((a=o).nlinks-=1,a.nlinks<1?e.delete(a.id,h):e.putObject(a.id,a,(function(n){n?r(n):M(e,t,a,{ctime:Date.now()},l)})))}function m(t,n){t?r(t):(o=n,Object.prototype.hasOwnProperty.call(o,c)?e.getObject(o[c].id,p):r(new N.ENOENT("a component of the path does not name an existing file",c)))}U(e,f,(function(t,o){t?r(t):(n=o,e.getObject(n.data,m))}))}function W(e,t,r,o){var s,u,c,f;function h(i,s){if(i)o(i);else{u=s;var c=Object.keys(u);if(r.encoding){var f=c.map((function(e){return n.from(e)}));c="buffer"===r.encoding?f:f.map((function(e){return e.toString(r.encoding)}))}if(r.withFileTypes){var h=[];l.eachSeries(c,(function(o,i){var s,u,c,f=n.from(o,r.encoding).toString(),l=a.join(t,f);c=function(e,t){e&&i(e),t.name=o,h.push(t),i()},X(s=e,u=l,(function(e,t){if(e)c(e);else{var r=new k(u,t,s.name);c(null,r)}}))}),(function(e){o(e,h)}))}else o(null,c)}}t=i(t),"function"==typeof r&&(o=r,r={}),(c=r)?"function"==typeof c?c={encoding:f}:"string"==typeof c&&(c={encoding:c}):c={encoding:f},r=c,U(e,t,(function(r,n){r?o(r):n.type!==d?o(new N.ENOTDIR(null,t)):(s=n,e.getObject(s.data,h))}))}function Z(e,t,r,n){r=i(r);var o,f,l,h=u(r),p=s(r);function d(r,o){r?n(r):(f=o,Object.prototype.hasOwnProperty.call(f,h)?n(new N.EEXIST(null,h)):L.create({guid:e.guid,type:m},(function(r,o){r?n(r):((l=o).nlinks+=1,c(t)||(l.symlink_relpath=t,t=a.resolve(p,t)),l.size=t.length,l.data=t,e.putObject(l.id,l,y))})))}function v(t){if(t)n(t);else{var r=Date.now();M(e,p,o,{mtime:r,ctime:r},n)}}function y(t){t?n(t):(f[h]=new x(l.id,m),e.putObject(o.data,f,v))}g===h?n(new N.EEXIST(null,h)):U(e,p,(function(t,r){t?n(t):(o=r,e.getObject(o.data,d))}))}function ee(e,t,r,o){var a;function s(t,i){if(t)o(t);else{if(!i)return o(new N.EIO("Expected Buffer"));var s=n.alloc(r);i&&i.copy(s),e.putBuffer(a.data,s,c)}}function u(r){if(r)o(r);else{var n=Date.now();M(e,t,a,{mtime:n,ctime:n},o)}}function c(t){t?o(t):(a.size=r,a.version+=1,e.putObject(a.id,a,u))}t=i(t),r<0?o(new N.EINVAL("length cannot be negative")):U(e,t,(function(r,n){r?o(r):n.type===d?o(new N.EISDIR(null,t)):(a=n,e.getBuffer(a.data,s))}))}function te(e,t,r,o){var a;function i(t,i){if(t)o(t);else{var s;if(!i)return o(new N.EIO("Expected Buffer"));s=i?i.slice(0,r):n.alloc(r),e.putBuffer(a.data,s,u)}}function s(r){if(r)o(r);else{var n=Date.now();M(e,t.path,a,{mtime:n,ctime:n},o)}}function u(t){t?o(t):(a.size=r,a.version+=1,e.putObject(a.id,a,s))}r<0?o(new N.EINVAL("length cannot be negative")):t.getNode(e,(function(t,r){t?o(t):r.type===d?o(new N.EISDIR):(a=r,e.getBuffer(a.data,i))}))}function re(e){return Object.prototype.hasOwnProperty.call(I,e)?I[e]:null}function ne(e,t,r){return e?"function"==typeof e?e={encoding:t,flag:r}:"string"==typeof e&&(e={encoding:e,flag:r}):e={encoding:t,flag:r},e}function oe(e,t,r){!function(e,t,r){U(e,t=i(t),r)}(e,t,(function(n,o){if(n)r(n);else{var a=new B(t,o,e.name);r(null,a)}}))}function ae(e,t){if("number"==typeof e)return e;t(new N.EINVAL("Expected integer",e))}var ie=/^[0-7]+$/;function se(e){return e===e>>>0}function ue(e,t,r){return"function"==typeof t&&(r=t,t=void 0),se(e)?e&y:"number"==typeof e?(Number.isInteger(e),r(new N.EINVAL("mode not a valid an integer value",e)),!1):"string"==typeof e?ie.test(e)?parseInt(e,8)&y:(r(new N.EINVAL("mode not a valid octal string",e)),!1):void 0!==t?t:(r(new N.EINVAL("mode not valid",e)),!1)}function ce(e){return"number"==typeof e?e:"object"===o(e)&&"function"==typeof e.getTime?e.getTime():void 0}t.exports={appendFile:function(e,t,r,o,a){a=arguments[arguments.length-1];var i=re((o=ne(o,"utf8","a")).flag||"a");if(!i)return a(new N.EINVAL("flags is not valid",t));"number"==typeof(r=r||"")&&(r=""+r),"string"==typeof r&&"utf8"===o.encoding&&(r=n.from(r)),V(e,t,i,(function(n,o){if(n)return a(n);var s=new F(t,o.id,i,o.size),u=j.allocDescriptor(s);K(e,s,r,0,r.length,s.position,(function(e){if(j.releaseDescriptor(u),e)return a(e);a(null)}))}))},access:function(e,t,r,n){"function"==typeof r&&(n=r,r=h.fsConstants.F_OK),function(e,t,r,n){var o=h.fsConstants,a=o.F_OK,s=o.R_OK,u=o.W_OK,c=o.X_OK,f=o.S_IXUSR,l=o.S_IXGRP,p=o.S_IXOTH;U(e,t=i(t),(function(e,o){if(e)return n(e);if(r===a)return n(null);var i=ue(o.mode,n);return i?r&(s|u)||r&c&&i&(f|l|p)?n(null):void n(new N.EACCES("permission denied",t)):void 0}))}(e,t,r|=h.fsConstants.F_OK,n)},chown:function(e,t,r,n,o){return se(r)?se(n)?void function(e,t,r,n,o){t=i(t),U(e,t,(function(a,i){a?o(a):(i.uid=r,i.gid=n,M(e,t,i,{mtime:Date.now()},o))}))}(e,t,r,n,o):o(new N.EINVAL("gid must be a valid integer",n)):o(new N.EINVAL("uid must be a valid integer",r))},chmod:function(e,t,r,n){(r=ue(r,n))&&function(e,t,r,n){t=i(t),"number"!=typeof r?n(new N.EINVAL("mode must be number",t)):U(e,t,(function(o,a){o?n(o):(a.mode=r,M(e,t,a,{mtime:Date.now()},n))}))}(e,t,r,n)},close:function(e,t,r){j.getOpenFileDescription(t)?(j.releaseDescriptor(t),r(null)):r(new N.EBADF)},ensureRootDirectory:function(e,t){var r,n,o;function a(o){o?t(o):L.create({guid:e.guid,id:r.rnode,type:d},(function(r,o){r?t(r):((n=o).nlinks+=1,e.putObject(n.id,n,i))}))}function i(r){r?t(r):(o={},e.putObject(n.data,o,t))}e.getObject(E,(function(n,o){!n&&o?t():!n||n instanceof N.ENOENT?C.create({guid:e.guid},(function(n,o){n?t(n):(r=o,e.putObject(r.id,r,a))})):t(n)}))},exists:function(e,t,r){oe(e,t,(function(e){r(!e)}))},fchown:function(e,t,r,n,o){if(!se(r))return o(new N.EINVAL("uid must be a valid integer",r));if(!se(n))return o(new N.EINVAL("gid must be a valid integer",n));var a=j.getOpenFileDescription(t);a?a.flags.includes(P)?function(e,t,r,n,o){t.getNode(e,(function(a,i){a?o(a):(i.uid=r,i.gid=n,M(e,t.path,i,{mtime:Date.now()},o))}))}(e,a,r,n,o):o(new N.EBADF("descriptor does not permit writing")):o(new N.EBADF)},fchmod:function(e,t,r,n){if(r=ue(r,n)){var o=j.getOpenFileDescription(t);o?o.flags.includes(P)?function(e,t,r,n){"number"!=typeof r?n(new N.EINVAL("mode must be a number")):t.getNode(e,(function(o,a){o?n(o):(a.mode=r,M(e,t.path,a,{mtime:Date.now()},n))}))}(e,o,r,n):n(new N.EBADF("descriptor does not permit writing")):n(new N.EBADF)}},fgetxattr:function(e,t,r,n){var o=j.getOpenFileDescription(t);o?function(e,t,r,n){"string"!=typeof r?n(new N.EINVAL):r?t.getNode(e,(function(e,t){if(e)return n(e);var o=t.xattrs;Object.prototype.hasOwnProperty.call(o,r)?n(null,o[r]):n(new N.ENOATTR)})):n(new N.EINVAL("attribute name cannot be an empty string"))}(e,o,r,n):n(new N.EBADF)},fremovexattr:function(e,t,r,n){var o=j.getOpenFileDescription(t);o?o.flags.includes(P)?function(e,t,r,n){"string"!=typeof r?n(new N.EINVAL("attribute name must be a string")):r?t.getNode(e,(function(o,a){if(o)return n(o);var i=a.xattrs;Object.prototype.hasOwnProperty.call(i,r)?(delete i[r],e.putObject(a.id,a,(function(r){r?n(r):M(e,t.path,a,{ctime:Date.now()},n)}))):n(new N.ENOATTR)})):n(new N.EINVAL("attribute name cannot be an empty string"))}(e,o,r,n):n(new N.EBADF("descriptor does not permit writing")):n(new N.EBADF)},fsetxattr:function(e,t,r,n,o,a){"function"==typeof o&&(a=o,o=null);var i=j.getOpenFileDescription(t);i?i.flags.includes(P)?function(e,t,r,n,o,a){"string"!=typeof r?a(new N.EINVAL("attribute name must be a string")):r?null!==o&&o!==A&&o!==_?a(new N.EINVAL("invalid flag, must be null, XATTR_CREATE or XATTR_REPLACE")):t.getNode(e,(function(i,s){if(i)return a(i);$(e,t.path,s,r,n,o,a)})):a(new N.EINVAL("attribute name cannot be an empty string"))}(e,i,r,n,o,a):a(new N.EBADF("descriptor does not permit writing")):a(new N.EBADF)},fstat:function(e,t,r){var n=j.getOpenFileDescription(t);n?Q(e,n,(function(t,o){if(t)r(t);else{var a=new B(n.path,o,e.name);r(null,a)}})):r(new N.EBADF)},fsync:function(e,t,r){ae(t,r)===t&&(j.getOpenFileDescription(t)?r():r(new N.EBADF))},ftruncate:function(e,t,r,n){n=arguments[arguments.length-1],r=r||0;var o=j.getOpenFileDescription(t);if(o)if(o.flags.includes(P)){if(ae(r,n)!==r)return;te(e,o,r,n)}else n(new N.EBADF("descriptor does not permit writing"));else n(new N.EBADF)},futimes:function(e,t,r,n,o){var a=Date.now();r=ce(r||a),n=ce(n||a);var i=j.getOpenFileDescription(t);i?i.flags.includes(P)?function(e,t,r,n,o){"number"!=typeof r||"number"!=typeof n?o(new N.EINVAL("atime and mtime must be a number")):r<0||n<0?o(new N.EINVAL("atime and mtime must be positive integers")):t.getNode(e,(function(a,i){a?o(a):M(e,t.path,i,{atime:r,ctime:n,mtime:n},o)}))}(e,i,r,n,o):o(new N.EBADF("descriptor does not permit writing")):o(new N.EBADF)},getxattr:function(e,t,r,n){!function(e,t,r,n){t=i(t),"string"!=typeof r?n(new N.EINVAL("attribute name must be a string",t)):r?U(e,t,(function(e,o){if(e)return n(e);var a=o.xattrs;Object.prototype.hasOwnProperty.call(a,r)?n(null,a[r]):n(new N.ENOATTR(null,t))})):n(new N.EINVAL("attribute name cannot be an empty string",t))}(e,t,r,n)},link:function(e,t,r,n){J(e,t,r,n)},lseek:function(e,t,r,n,o){var a=j.getOpenFileDescription(t);a||o(new N.EBADF),"SET"===n?r<0?o(new N.EINVAL("resulting file offset would be negative")):(a.position=r,o(null,a.position)):"CUR"===n?a.position+r<0?o(new N.EINVAL("resulting file offset would be negative")):(a.position+=r,o(null,a.position)):"END"===n?Q(e,a,(function(e,t){e?o(e):t.size+r<0?o(new N.EINVAL("resulting file offset would be negative")):(a.position=t.size+r,o(null,a.position))})):o(new N.EINVAL("whence argument is not a proper value"))},lstat:function(e,t,r){X(e,t,(function(n,o){if(n)r(n);else{var a=new B(t,o,e.name);r(null,a)}}))},mkdir:function(e,t,r,n){if(arguments.length<4)n=r,r=y;else if(!(r=ue(r,y,n)))return;q(e,t,n)},mkdtemp:function(e,t,r,n){if(n=arguments[arguments.length-1],!t)return n(new Error("filename prefix is required"));var o=t+"-"+f.randomChars(6);q(e,o,(function(e){n(e,o)}))},mknod:function(e,t,r,n){!function(e,t,r,n){if(r!==d&&r!==p)return n(new N.EINVAL("type must be a directory or file",t));t=i(t);var o,a,c,f=u(t),l=s(t);function h(r,a){!r&&a?n(new N.EEXIST("path name already exists",t)):!r||r instanceof N.ENOENT?e.getObject(o.data,m):n(r)}function m(t,o){t?n(t):(a=o,L.create({guid:e.guid,type:r},(function(t,r){t?n(t):((c=r).nlinks+=1,e.putObject(c.id,c,y))})))}function v(t){if(t)n(t);else{var r=Date.now();M(e,l,c,{mtime:r,ctime:r},n)}}function y(t){t?n(t):(a[f]=new x(c.id,r),e.putObject(o.data,a,v))}U(e,l,(function(r,a){r?n(r):a.type!==d?n(new N.ENOTDIR("a component of the path prefix is not a directory",t)):(o=a,U(e,t,h))}))}(e,t,r,n)},open:function(e,t,r,n,o){if(arguments.length<5?(o=arguments[arguments.length-1],n=420):n=ue(n,y,o),!(r=re(r)))return o(new N.EINVAL("flags is not valid"),t);V(e,t,r,n,(function(e,n){if(e)o(e);else{var a;a=r.includes(R)?n.size:0;var i=new F(t,n.id,r,a),s=j.allocDescriptor(i);o(null,s)}}))},readdir:function(e,t,r,n){W(e,t,r,n)},read:function(e,t,r,n,o,a,i){n=void 0===n?0:n,o=void 0===o?r.length-n:o,i=arguments[arguments.length-1];var s=j.getOpenFileDescription(t);s?s.flags.includes(w)?H(e,s,r,n,o,a,(function(e,t){i(e,t||0,r)})):i(new N.EBADF("descriptor does not permit reading")):i(new N.EBADF)},readFile:function(e,t,r,o){o=arguments[arguments.length-1];var a=re((r=ne(r,null,"r")).flag||"r");if(!a)return o(new N.EINVAL("flags is not valid",t));V(e,t,a,(function(i,s){if(i)return o(i);var u=new F(t,s.id,a,0),c=j.allocDescriptor(u);function f(){j.releaseDescriptor(c)}Q(e,u,(function(a,i){if(a)return f(),o(a);var s=new B(u.path,i,e.name);if(s.isDirectory())return f(),o(new N.EISDIR("illegal operation on directory",t));var c=s.size,l=n.alloc(c);H(e,u,l,0,c,0,(function(e){if(f(),e)return o(e);var t;t="utf8"===r.encoding?l.toString("utf8"):l,o(null,t)}))}))}))},readlink:function(e,t,r){!function(e,t,r){t=i(t);var n,o,a=u(t),c=s(t);function f(t,n){t?r(t):(o=n,Object.prototype.hasOwnProperty.call(o,a)?e.getObject(o[a].id,l):r(new N.ENOENT("a component of the path does not name an existing file",a)))}function l(e,n){if(e)r(e);else if(n.type!==m)r(new N.EINVAL("path not a symbolic link",t));else{var o=n.symlink_relpath?n.symlink_relpath:n.data;r(null,o)}}U(e,c,(function(t,o){t?r(t):(n=o,e.getObject(n.data,f))}))}(e,t,r)},removexattr:function(e,t,r,n){!function(e,t,r,n){t=i(t),"string"!=typeof r?n(new N.EINVAL("attribute name must be a string",t)):r?U(e,t,(function(o,a){if(o)return n(o);var i=a.xattrs;Object.prototype.hasOwnProperty.call(i,r)?(delete i[r],e.putObject(a.id,a,(function(r){r?n(r):M(e,t,a,{ctime:Date.now()},n)}))):n(new N.ENOATTR(null,t))})):n(new N.EINVAL("attribute name cannot be an empty string",t))}(e,t,r,n)},rename:function(e,t,r,n){t=i(t),r=i(r);var o,s,u,c,f=a.dirname(t),l=a.dirname(r),h=a.basename(t),p=a.basename(r),m=Date.now();function v(t,o){t?n(t):M(e,r,o,{ctime:m},n)}function y(t){t?n(t):e.getObject(c[p].id,v)}function g(t){t?n(t):(o.id===u.id&&(s=c),delete s[h],e.putObject(o.data,s,y))}function E(t){t?n(t):(c[p]=s[h],e.putObject(u.data,c,g))}function b(t,o){t?n(t):(c=o,Object.prototype.hasOwnProperty.call(c,p)?Y(e,r,E):E())}function w(t,r){t?n(t):(u=r,e.getObject(u.data,b))}function P(t,r){t?n(t):(s=r,U(e,l,w))}function O(t,r){t?n(t):(o=r,e.getObject(r.data,P))}function S(r){r?n(r):G(e,t,n)}U(e,t,(function(o,a){o?n(o):a.type===d?U(e,f,O):J(e,t,r,S)}))},rmdir:function(e,t,r){Y(e,t,r)},setxattr:function(e,t,r,n,o,a){"function"==typeof o&&(a=o,o=null),function(e,t,r,n,o,a){t=i(t),"string"!=typeof r?a(new N.EINVAL("attribute name must be a string",t)):r?null!==o&&o!==A&&o!==_?a(new N.EINVAL("invalid flag, must be null, XATTR_CREATE or XATTR_REPLACE",t)):U(e,t,(function(i,s){if(i)return a(i);$(e,t,s,r,n,o,a)})):a(new N.EINVAL("attribute name cannot be an empty string",t))}(e,t,r,n,o,a)},stat:oe,symlink:function(e,t,r,n,o){Z(e,t,r,o=arguments[arguments.length-1])},truncate:function(e,t,r,n){ae(r=r||0,n=arguments[arguments.length-1])===r&&ee(e,t,r,n)},unlink:function(e,t,r){G(e,t,r)},utimes:function(e,t,r,n,o){var a=Date.now();!function(e,t,r,n,o){t=i(t),"number"!=typeof r||"number"!=typeof n?o(new N.EINVAL("atime and mtime must be number",t)):r<0||n<0?o(new N.EINVAL("atime and mtime must be positive integers",t)):U(e,t,(function(a,i){a?o(a):M(e,t,i,{atime:r,ctime:n,mtime:n},o)}))}(e,t,r=ce(r||a),n=ce(n||a),o)},writeFile:function(e,t,r,o,a){a=arguments[arguments.length-1];var i=re((o=ne(o,"utf8","w")).flag||"w");if(!i)return a(new N.EINVAL("flags is not valid",t));n.isBuffer(r)||("number"==typeof r&&(r=""+r),r="string"!=typeof(r=r||"")?n.from(r.toString()):n.from(r||"",o.encoding||"utf8")),V(e,t,i,(function(n,o){if(n)return a(n);var s=new F(t,o.id,i,0),u=j.allocDescriptor(s);z(e,s,r,0,r.length,(function(e){if(j.releaseDescriptor(u),e)return a(e);a(null)}))}))},write:function(e,t,r,n,o,a,i){i=arguments[arguments.length-1],n=void 0===n?0:n,o=void 0===o?r.length-n:o;var s=j.getOpenFileDescription(t);s?s.flags.includes(P)?r.length-n<o?i(new N.EIO("input buffer is too small")):K(e,s,r,n,o,a,i):i(new N.EBADF("descriptor does not permit writing")):i(new N.EBADF)}}},{"../path.js":"UzoP","../shared.js":"zBMa","../../lib/async.js":"u4Zs","../constants.js":"iJA9","../errors.js":"p8GN","../directory-entry.js":"ZECt","../open-files.js":"osLK","../open-file-description.js":"XWaV","../super-node.js":"JEp0","../node.js":"KKNo","../dirent.js":"q4Wu","../stats.js":"dsCT",buffer:"dskh"}],GMi4:[function(e,t,r){e("buffer").Buffer;var n=e("buffer").Buffer,o=e("es6-promisify").promisify,a=e("../path.js"),i=e("../providers/index.js"),s=e("../shell/shell.js"),u=e("../../lib/intercom.js"),c=e("../fs-watcher.js"),f=e("../errors.js"),l=e("../shared.js"),h=l.nop,p=l.guid,d=e("../constants.js"),m=d.fsConstants,v=d.FILE_SYSTEM_NAME,y=d.FS_FORMAT,g=d.FS_READY,E=d.FS_PENDING,b=d.FS_ERROR,w=d.FS_NODUPEIDCHECK,P=d.STDIN,O=d.STDOUT,S=d.STDERR,R=e("./implementation.js");function I(e){return"function"==typeof e?e:function(e){if(e)throw e}}function A(e){e&&console.error("Filer error: ",e)}function _(e,t,r){var o=e[t],i=function(e,t){return e?a.isNull(e)?new f.EINVAL("Path must be a string without null bytes.",e):t||a.isAbsolute(e)?void 0:new f.EINVAL("Path must be absolute.",e):new f.EINVAL("Path must be a string",e)}(o=function(e){return n.isBuffer(e)?e.toString():e}(o=function(e){if(!(e&&e.protocol&&e.pathname))return e;if("file:"!==e.protocol)throw new f.EINVAL("only file: URLs are supported for paths",e);for(var t=e.pathname,r=0;r<t.length;r++)if("%"===t[r]){var n=32|t.codePointAt(r+2);if("2"===t[r+1]&&102===n)throw new f.EINVAL("file: URLs must not include encoded / characters",e)}return decodeURIComponent(t)}(o)),r);if(i)throw i;e[t]=o}function T(e,t){t=t||A;var r=(e=e||{}).flags||[],n=e.guid?e.guid:p,l=e.provider||new i.Default(e.name||v),d=e.name||l.name,D=r.includes(y),N=this;N.readyState=E,N.name=d,N.error=null,N.stdin=P,N.stdout=O,N.stderr=S,N.constants=m,N.F_OK=m.F_OK,N.R_OK=m.R_OK,N.W_OK=m.W_OK,N.X_OK=m.X_OK,this.Shell=s.bind(void 0,this);var x=[];function j(e){return function(t){r.includes(w)?t(null,n()):function t(r){var o=n();e.getObject(o,(function(e,n){e?r(e):n?t(r):r(null,o)}))}(t)}}this.queueOrRun=function(e){var t;return g===N.readyState?e.call(N):b===N.readyState?t=new f.EFILESYSTEMERROR("unknown error"):x.push(e),t},this.watch=function(e,t,r){if(a.isNull(e))throw new Error("Path must be a string without null bytes.");"function"==typeof t&&(r=t,t={}),t=t||{},r=r||h;var n=new c;return n.start(e,!1,t.recursive),n.on("change",r),n},l.open((function(e){function n(e){function n(e){var t=l[e]();return t.name=d,t.flags=r,t.changes=[],t.guid=j(t),t.close=function(){var e=t.changes;!function(e){if(e.length){var t=u.getInstance();e.forEach((function(e){t.emit(e.event,e.path)}))}}(e),e.length=0},t}N.provider={openReadWriteContext:function(){return n("getReadWriteContext")},openReadOnlyContext:function(){return n("getReadOnlyContext")}},N.readyState=e?b:g,x.forEach(function(e){e.call(this)}.bind(N)),x=null,t(e,N)}if(e)return n(e);var o=l.getReadWriteContext();o.guid=j(o),D?o.clear((function(e){if(e)return n(e);R.ensureRootDirectory(o,n)})):R.ensureRootDirectory(o,n)})),T.prototype.promises={},[{name:"appendFile",promises:!0,absPathArgs:[0]},{name:"access",promises:!0,absPathArgs:[0]},{name:"chown",promises:!0,absPathArgs:[0]},{name:"chmod",promises:!0,absPathArgs:[0]},{name:"close"},{name:"exists",absPathArgs:[0]},{name:"fchown"},{name:"fchmod"},{name:"fgetxattr"},{name:"fremovexattr"},{name:"fsetxattr"},{name:"fstat"},{name:"fsync"},{name:"ftruncate"},{name:"futimes"},{name:"getxattr",promises:!0,absPathArgs:[0]},{name:"link",promises:!0,absPathArgs:[0,1]},{name:"lseek"},{name:"lstat",promises:!0},{name:"mkdir",promises:!0,absPathArgs:[0]},{name:"mkdtemp",promises:!0},{name:"mknod",promises:!0,absPathArgs:[0]},{name:"open",promises:!0,absPathArgs:[0]},{name:"readdir",promises:!0,absPathArgs:[0]},{name:"read"},{name:"readFile",promises:!0,absPathArgs:[0]},{name:"readlink",promises:!0,absPathArgs:[0]},{name:"removexattr",promises:!0,absPathArgs:[0]},{name:"rename",promises:!0,absPathArgs:[0,1]},{name:"rmdir",promises:!0,absPathArgs:[0]},{name:"setxattr",promises:!0,absPathArgs:[0]},{name:"stat",promises:!0,absPathArgs:[0]},{name:"symlink",promises:!0,relPathArgs:[0],absPathArgs:[1]},{name:"truncate",promises:!0,absPathArgs:[0]},{name:"unlink",promises:!0,absPathArgs:[0]},{name:"utimes",promises:!0,absPathArgs:[0]},{name:"writeFile",promises:!0,absPathArgs:[0]},{name:"write"}].forEach((function(e){var t=e.name,r=!0===e.promises;T.prototype[t]=function(){var r=this,n=Array.prototype.slice.call(arguments,0),o=n.length-1,a="function"!=typeof n[o],i=I(n[o]);e.absPathArgs&&e.absPathArgs.forEach((function(e){return _(n,e,!1)})),e.relPathArgs&&e.relPathArgs.forEach((function(e){return _(n,e,!0)}));var s=r.queueOrRun((function(){var e=r.provider.openReadWriteContext();if(b===r.readyState){var s=new f.EFILESYSTEMERROR("filesystem unavailable, operation canceled");return i.call(r,s)}function u(){e.close(),i.apply(r,arguments)}a?n.push(u):n[o]=u;var c=[e].concat(n);R[t].apply(null,c)}));s&&i(s)},r&&(T.prototype.promises[t]=o(T.prototype[t].bind(N)))}))}T.providers=i,t.exports=T},{"es6-promisify":"b1ZG","../path.js":"UzoP","../providers/index.js":"AiW7","../shell/shell.js":"D1Ra","../../lib/intercom.js":"u7Jv","../fs-watcher.js":"VLEe","../errors.js":"p8GN","../shared.js":"zBMa","../constants.js":"iJA9","./implementation.js":"bsBG",buffer:"dskh"}],iIhC:[function(e,t,r){"use strict";function n(e,t,r){return{dataPath:void 0,schemaPath:void 0,keyword:"absolutePath",params:{absolutePath:r},message:e,parentSchema:t}}function o(e,t,r){return n(e?"The provided value ".concat(JSON.stringify(r)," is not an absolute path!"):"A relative path is expected. However, the provided value ".concat(JSON.stringify(r)," is an absolute path!"),t,r)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=function(e){return e.addKeyword("absolutePath",{errors:!0,type:"string",compile:function(e,t){var r=function r(a){var i=!0;return a.includes("!")&&(r.errors=[n("The provided value ".concat(JSON.stringify(a)," contains exclamation mark (!) which is not allowed because it's reserved for loader syntax."),t,a)],i=!1),e===/^(?:[A-Za-z]:(\\|\/)|\\\\|\/)/.test(a)||(r.errors=[o(e,t,a)],i=!1),i};return r.errors=[],r}}),e};r.default=a},{}],GNtl:[function(e,t,r){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw a}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var i=function(){function e(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this._left=[],this._right=[]}return t=e,r=[{key:"left",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._left.push([e,t])}},{key:"right",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._right.push([e,t])}},{key:"format",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=n(e.getRangeValue(this._left,t),2),o=r[0],a=r[1],i=n(e.getRangeValue(this._right,!t),2),s=i[0],u=i[1];if(!Number.isFinite(o)&&!Number.isFinite(s))return"";var c=a?o+1:o;return c===(u?s-1:s)?"should be ".concat(t?"":"!","= ").concat(c):Number.isFinite(o)&&!Number.isFinite(s)?e.formatLeft(o,t,a):!Number.isFinite(o)&&Number.isFinite(s)?e.formatRight(s,t,u):e.formatRange(o,s,a,u,t)}}],o=[{key:"getOperator",value:function(e,t){return"left"===e?t?">":">=":t?"<":"<="}},{key:"formatRight",value:function(t,r,n){return!1===r?e.formatLeft(t,!r,!n):"should be ".concat(e.getOperator("right",n)," ").concat(t)}},{key:"formatLeft",value:function(t,r,n){return!1===r?e.formatRight(t,!r,!n):"should be ".concat(e.getOperator("left",n)," ").concat(t)}},{key:"formatRange",value:function(t,r,n,o,a){var i="should be";return i+=" ".concat(e.getOperator(a?"left":"right",a?n:!n)," ").concat(t," "),(i+=a?"and":"or")+" ".concat(e.getOperator(a?"right":"left",a?o:!o)," ").concat(r)}},{key:"getRangeValue",value:function(e,t){for(var r=t?1/0:-1/0,o=-1,a=t?function(e){return n(e,1)[0]<=r}:function(e){return n(e,1)[0]>=r},i=0;i<e.length;i++)if(a(e[i])){var s=n(e[i],1);r=s[0],o=i}return o>-1?e[o]:[1/0,!0]}}],r&&a(t.prototype,r),o&&a(t,o),e;var t,r,o}();t.exports=i},{}],SqDh:[function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=e("./Range");t.exports.stringHints=function(e,t){var r=[],a="string",i=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e);if(!t){var s=i.minLength,u=i.formatMinimum,c=i.formatExclusiveMaximum;i.minLength=i.maxLength,i.maxLength=s,i.formatMinimum=i.formatMaximum,i.formatMaximum=u,i.formatExclusiveMaximum=!i.formatExclusiveMinimum,i.formatExclusiveMinimum=!c}if("number"==typeof i.minLength)if(1===i.minLength)a="non-empty string";else{var f=Math.max(i.minLength-1,0);r.push("should be longer than ".concat(f," character").concat(f>1?"s":""))}if("number"==typeof i.maxLength)if(0===i.maxLength)a="empty string";else{var l=i.maxLength+1;r.push("should be shorter than ".concat(l," character").concat(l>1?"s":""))}return i.pattern&&r.push("should".concat(t?"":" not"," match pattern ").concat(JSON.stringify(i.pattern))),i.format&&r.push("should".concat(t?"":" not"," match format ").concat(JSON.stringify(i.format))),i.formatMinimum&&r.push("should be ".concat(i.formatExclusiveMinimum?">":">="," ").concat(JSON.stringify(i.formatMinimum))),i.formatMaximum&&r.push("should be ".concat(i.formatExclusiveMaximum?"<":"<="," ").concat(JSON.stringify(i.formatMaximum))),[a].concat(r)},t.exports.numberHints=function(e,t){var r=["integer"===e.type?"integer":"number"],n=new a;"number"==typeof e.minimum&&n.left(e.minimum),"number"==typeof e.exclusiveMinimum&&n.left(e.exclusiveMinimum,!0),"number"==typeof e.maximum&&n.right(e.maximum),"number"==typeof e.exclusiveMaximum&&n.right(e.exclusiveMaximum,!0);var o=n.format(t);return o&&r.push(o),"number"==typeof e.multipleOf&&r.push("should".concat(t?"":" not"," be multiple of ").concat(e.multipleOf)),r}},{"./Range":"GNtl"}],ySUA:[function(e,t,r){"use strict";function n(e){return function(e){if(Array.isArray(e))return c(e)}(e)||a(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e){return f(e)||a(e)||u(e)||s()}function a(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function i(e,t){return f(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw a}}return r}}(e,t)||u(e,t)||s()}function s(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e){if(Array.isArray(e))return e}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t){return!t||"object"!==b(t)&&"function"!=typeof t?d(e):t}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){var t="function"==typeof Map?new Map:void 0;return(m=function(e){if(null===e||!function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return v(e,arguments,E(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),g(r,e)})(e)}function v(e,t,r){return(v=y()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&g(o,r.prototype),o}).apply(null,arguments)}function y(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var w=e("./util/hints"),P=w.stringHints,O=w.numberHints,S={type:1,not:1,oneOf:1,anyOf:1,if:1,enum:1,const:1,instanceof:1,required:2,pattern:2,patternRequired:2,format:2,formatMinimum:2,formatMaximum:2,minimum:2,exclusiveMinimum:2,maximum:2,exclusiveMaximum:2,multipleOf:2,uniqueItems:2,contains:2,minLength:2,maxLength:2,minItems:2,maxItems:2,minProperties:2,maxProperties:2,dependencies:2,propertyNames:2,additionalItems:2,additionalProperties:2,absolutePath:2};function R(e,t){var r=e.reduce((function(e,r){return Math.max(e,t(r))}),0);return e.filter((function(e){return t(e)===r}))}function I(e,t){for(var r=e.length-1,n=function(t){return 0!==e[r].schemaPath.indexOf(t)};r>-1&&!t.every(n);)if("anyOf"===e[r].keyword||"oneOf"===e[r].keyword){var o=A(e[r]),a=I(e.slice(0,r),o.concat(e[r].schemaPath));r=a-1}else r-=1;return r+1}function A(e){var t=e.schema;return Array.isArray(t)?t.map((function(e){return e.$ref})).filter((function(e){return e})):[]}function _(e,t){return e.replace(/\n(?!$)/g,"\n".concat(t))}function T(e){return!!e.not}function D(e){return T(e)?D(e.not):e}function N(e){var t=D(e);return j(t)||F(t)||C(t)||M(t)||L(t)}function x(e){return"object"===b(e)&&null!==e}function j(e){return"number"===e.type||void 0!==e.minimum||void 0!==e.exclusiveMinimum||void 0!==e.maximum||void 0!==e.exclusiveMaximum||void 0!==e.multipleOf}function F(e){return"integer"===e.type||void 0!==e.minimum||void 0!==e.exclusiveMinimum||void 0!==e.maximum||void 0!==e.exclusiveMaximum||void 0!==e.multipleOf}function C(e){return"string"===e.type||void 0!==e.minLength||void 0!==e.maxLength||void 0!==e.pattern||void 0!==e.format||void 0!==e.formatMinimum||void 0!==e.formatMaximum}function L(e){return"boolean"===e.type}function k(e){return"array"===e.type||"number"==typeof e.minItems||"number"==typeof e.maxItems||void 0!==e.uniqueItems||void 0!==e.items||void 0!==e.additionalItems||void 0!==e.contains}function B(e){return"object"===e.type||void 0!==e.minProperties||void 0!==e.maxProperties||void 0!==e.required||void 0!==e.properties||void 0!==e.patternProperties||void 0!==e.additionalProperties||void 0!==e.dependencies||void 0!==e.propertyNames||void 0!==e.patternRequired}function M(e){return"null"===e.type}function U(e){return/^[aeiou]/i.test(e)?"an":"a"}function $(e){if(!e)return"";if(!e.type){if(j(e)||F(e))return" | should be any non-number";if(C(e))return" | should be any non-string";if(k(e))return" | should be any non-array";if(B(e))return" | should be any non-object"}return""}function q(e){return e.length>0?"(".concat(e.join(", "),")"):""}function Y(e,t){return j(e)||F(e)?O(e,t):C(e)?P(e,t):[]}var V=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(a,m(Error));var t,r=(t=a,function(){var e,r=E(t);if(y()){var n=E(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return p(this,e)});function a(e,t){var n,o,s,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(l(this,a),(n=r.call(this)).name="ValidationError",n.errors=e,n.schema=t,t.title&&(!u.name||!u.baseDataPath)){var c=t.title.match(/^(.+) (.+)$/);c&&(u.name||(o=i(c,2)[1]),u.baseDataPath||(s=i(c,3)[2]))}n.headerName=u.name||o||"Object",n.baseDataPath=u.baseDataPath||s||"configuration",n.postFormatter=u.postFormatter||null;var f="Invalid ".concat(n.baseDataPath," object. ").concat(n.headerName," has been initialized using ").concat(U(n.baseDataPath)," ").concat(n.baseDataPath," object that does not match the API schema.\n");return n.message="".concat(f).concat(n.formatValidationErrors(e)),Error.captureStackTrace(d(n),n.constructor),n}return function(e,t,r){t&&h(e.prototype,t),r&&h(e,r)}(a,[{key:"getSchemaPart",value:function(e){for(var t=e.split("/"),r=this.schema,n=1;n<t.length;n++){var o=r[t[n]];if(!o)break;r=o}return r}},{key:"formatSchema",value:function(e){var t=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=r,s=function(r,n){return n?a.includes(r)?"(recursive)":t.formatSchema(r,i,a.concat(e)):t.formatSchema(r,i,a)};if(T(e)&&!B(e)){if(N(e.not))return i=!r,s(e.not);var u=!e.not.not;return i=!r,u?(r?"":"non ")+s(e.not):s(e.not)}if(e.instanceof){var c=e.instanceof;return(Array.isArray(c)?c:[c]).map((function(e){return"Function"===e?"function":e})).join(" | ")}if(e.enum)return e.enum.map((function(e){return JSON.stringify(e)})).join(" | ");if(void 0!==e.const)return JSON.stringify(e.const);if(e.oneOf)return e.oneOf.map((function(e){return s(e,!0)})).join(" | ");if(e.anyOf)return e.anyOf.map((function(e){return s(e,!0)})).join(" | ");if(e.allOf)return e.allOf.map((function(e){return s(e,!0)})).join(" & ");if(e.if){var f=e.if,l=e.then,h=e.else;return"".concat(f?"if ".concat(s(f)):"").concat(l?" then ".concat(s(l)):"").concat(h?" else ".concat(s(h)):"")}if(e.$ref)return s(this.getSchemaPart(e.$ref),!0);if(j(e)||F(e)){var p=o(Y(e,r)),d=p[0],m=p.slice(1),v="".concat(d).concat(m.length>0?" ".concat(q(m)):"");return r?v:m.length>0?"non-".concat(d," | ").concat(v):"non-".concat(d)}if(C(e)){var y=o(Y(e,r)),g=y[0],E=y.slice(1),b="".concat(g).concat(E.length>0?" ".concat(q(E)):"");return r?b:"string"===b?"non-string":"non-string | ".concat(b)}if(L(e))return"".concat(r?"":"non-","boolean");if(k(e)){i=!0;var w=[];"number"==typeof e.minItems&&w.push("should not have fewer than ".concat(e.minItems," item").concat(e.minItems>1?"s":"")),"number"==typeof e.maxItems&&w.push("should not have more than ".concat(e.maxItems," item").concat(e.maxItems>1?"s":"")),e.uniqueItems&&w.push("should not have duplicate items");var P=void 0===e.additionalItems||Boolean(e.additionalItems),O="";return e.items?Array.isArray(e.items)&&e.items.length>0?(O="".concat(e.items.map((function(e){return s(e)})).join(", ")),P&&e.additionalItems&&x(e.additionalItems)&&Object.keys(e.additionalItems).length>0&&w.push("additional items should be ".concat(s(e.additionalItems)))):O=e.items&&Object.keys(e.items).length>0?"".concat(s(e.items)):"any":O="any",e.contains&&Object.keys(e.contains).length>0&&w.push("should contains at least one ".concat(this.formatSchema(e.contains)," item")),"[".concat(O).concat(P?", ...":"","]").concat(w.length>0?" (".concat(w.join(", "),")"):"")}if(B(e)){i=!0;var S=[];if("number"==typeof e.minProperties&&S.push("should not have fewer than ".concat(e.minProperties," ").concat(e.minProperties>1?"properties":"property")),"number"==typeof e.maxProperties&&S.push("should not have more than ".concat(e.maxProperties," ").concat(e.minProperties&&e.minProperties>1?"properties":"property")),e.patternProperties&&Object.keys(e.patternProperties).length>0){var R=Object.keys(e.patternProperties);S.push("additional property names should match pattern".concat(R.length>1?"s":""," ").concat(R.map((function(e){return JSON.stringify(e)})).join(" | ")))}var I=e.properties?Object.keys(e.properties):[],A=e.required?e.required:[],_=n(new Set([].concat(A).concat(I))).map((function(e){var t=A.includes(e);return"".concat(e).concat(t?"":"?")})).concat(void 0===e.additionalProperties||Boolean(e.additionalProperties)?e.additionalProperties&&x(e.additionalProperties)?["<key>: ".concat(s(e.additionalProperties))]:["…"]:[]).join(", "),D=e.dependencies,U=e.propertyNames,$=e.patternRequired;return D&&Object.keys(D).forEach((function(e){var t=D[e];Array.isArray(t)?S.push("should have ".concat(t.length>1?"properties":"property"," ").concat(t.map((function(e){return"'".concat(e,"'")})).join(", ")," when property '").concat(e,"' is present")):S.push("should be valid according to the schema ".concat(s(t)," when property '").concat(e,"' is present"))})),U&&Object.keys(U).length>0&&S.push("each property name should match format ".concat(JSON.stringify(e.propertyNames.format))),$&&$.length>0&&S.push("should have property matching pattern ".concat($.map((function(e){return JSON.stringify(e)})))),"object {".concat(_?" ".concat(_," "):"","}").concat(S.length>0?" (".concat(S.join(", "),")"):"")}return M(e)?"".concat(r?"":"non-","null"):Array.isArray(e.type)?"".concat(e.type.join(" | ")):JSON.stringify(e,null,2)}},{key:"getSchemaPartText",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!e)return"";if(Array.isArray(t))for(var o=0;o<t.length;o++){var a=e[t[o]];if(!a)break;e=a}for(;e.$ref;)e=this.getSchemaPart(e.$ref);var i="".concat(this.formatSchema(e,n)).concat(r?".":"");return e.description&&(i+="\n-> ".concat(e.description)),e.link&&(i+="\n-> Read more at ".concat(e.link)),i}},{key:"getSchemaPartDescription",value:function(e){if(!e)return"";for(;e.$ref;)e=this.getSchemaPart(e.$ref);var t="";return e.description&&(t+="\n-> ".concat(e.description)),e.link&&(t+="\n-> Read more at ".concat(e.link)),t}},{key:"formatValidationError",value:function(e){var t=this,r=e.keyword,n=e.dataPath,a="".concat(this.baseDataPath).concat(n);switch(r){case"type":var i=e.parentSchema;switch(e.params.type){case"number":case"string":case"boolean":case"null":return"".concat(a," should be a ").concat(this.getSchemaPartText(i,!1,!0));case"integer":return"".concat(a," should be an ").concat(this.getSchemaPartText(i,!1,!0));case"array":return"".concat(a," should be an array:\n").concat(this.getSchemaPartText(i));case"object":return"".concat(a," should be an object:\n").concat(this.getSchemaPartText(i));default:return"".concat(a," should be:\n").concat(this.getSchemaPartText(i))}case"instanceof":var s=e.parentSchema;return"".concat(a," should be an instance of ").concat(this.getSchemaPartText(s,!1,!0));case"pattern":var u=e.params,c=e.parentSchema,f=u.pattern;return"".concat(a," should match pattern ").concat(JSON.stringify(f)).concat($(c),".").concat(this.getSchemaPartDescription(c));case"format":var l=e.params,h=e.parentSchema,p=l.format;return"".concat(a," should match format ").concat(JSON.stringify(p)).concat($(h),".").concat(this.getSchemaPartDescription(h));case"formatMinimum":case"formatMaximum":var d=e.params,m=e.parentSchema,v=d.comparison,y=d.limit;return"".concat(a," should be ").concat(v," ").concat(JSON.stringify(y)).concat($(m),".").concat(this.getSchemaPartDescription(m));case"minimum":case"maximum":case"exclusiveMinimum":case"exclusiveMaximum":var g=e.parentSchema,E=e.params,b=E.comparison,w=E.limit,P=o(Y(g,!0)).slice(1);return 0===P.length&&P.push("should be ".concat(b," ").concat(w)),"".concat(a," ").concat(P.join(" ")).concat($(g),".").concat(this.getSchemaPartDescription(g));case"multipleOf":var O=e.params,T=e.parentSchema,D=O.multipleOf;return"".concat(a," should be multiple of ").concat(D).concat($(T),".").concat(this.getSchemaPartDescription(T));case"patternRequired":var x=e.params,j=e.parentSchema,F=x.missingPattern;return"".concat(a," should have property matching pattern ").concat(JSON.stringify(F)).concat($(j),".").concat(this.getSchemaPartDescription(j));case"minLength":var C=e.params,L=e.parentSchema,k=C.limit;if(1===k)return"".concat(a," should be a non-empty string").concat($(L),".").concat(this.getSchemaPartDescription(L));var M=k-1;return"".concat(a," should be longer than ").concat(M," character").concat(M>1?"s":"").concat($(L),".").concat(this.getSchemaPartDescription(L));case"minItems":var U=e.params,q=e.parentSchema,V=U.limit;return 1===V?"".concat(a," should be a non-empty array").concat($(q),".").concat(this.getSchemaPartDescription(q)):"".concat(a," should not have fewer than ").concat(V," items").concat($(q),".").concat(this.getSchemaPartDescription(q));case"minProperties":var z=e.params,K=e.parentSchema,H=z.limit;return 1===H?"".concat(a," should be a non-empty object").concat($(K),".").concat(this.getSchemaPartDescription(K)):"".concat(a," should not have fewer than ").concat(H," properties").concat($(K),".").concat(this.getSchemaPartDescription(K));case"maxLength":var Q=e.params,X=e.parentSchema,J=Q.limit+1;return"".concat(a," should be shorter than ").concat(J," character").concat(J>1?"s":"").concat($(X),".").concat(this.getSchemaPartDescription(X));case"maxItems":var G=e.params,W=e.parentSchema,Z=G.limit;return"".concat(a," should not have more than ").concat(Z," items").concat($(W),".").concat(this.getSchemaPartDescription(W));case"maxProperties":var ee=e.params,te=e.parentSchema,re=ee.limit;return"".concat(a," should not have more than ").concat(re," properties").concat($(te),".").concat(this.getSchemaPartDescription(te));case"uniqueItems":var ne=e.params,oe=e.parentSchema,ae=ne.i;return"".concat(a," should not contain the item '").concat(e.data[ae],"' twice").concat($(oe),".").concat(this.getSchemaPartDescription(oe));case"additionalItems":var ie=e.params,se=e.parentSchema,ue=ie.limit;return"".concat(a," should not have more than ").concat(ue," items").concat($(se),". These items are valid:\n").concat(this.getSchemaPartText(se));case"contains":var ce=e.parentSchema;return"".concat(a," should contains at least one ").concat(this.getSchemaPartText(ce,["contains"])," item").concat($(ce),".");case"required":var fe=e.parentSchema,le=e.params.missingProperty.replace(/^\./,""),he=fe&&Boolean(fe.properties&&fe.properties[le]);return"".concat(a," misses the property '").concat(le,"'").concat($(fe),".").concat(he?" Should be:\n".concat(this.getSchemaPartText(fe,["properties",le])):this.getSchemaPartDescription(fe));case"additionalProperties":var pe=e.params,de=e.parentSchema,me=pe.additionalProperty;return"".concat(a," has an unknown property '").concat(me,"'").concat($(de),". These properties are valid:\n").concat(this.getSchemaPartText(de));case"dependencies":var ve=e.params,ye=e.parentSchema,ge=ve.property,Ee=ve.deps.split(",").map((function(e){return"'".concat(e.trim(),"'")})).join(", ");return"".concat(a," should have properties ").concat(Ee," when property '").concat(ge,"' is present").concat($(ye),".").concat(this.getSchemaPartDescription(ye));case"propertyNames":var be=e.params,we=e.parentSchema,Pe=e.schema,Oe=be.propertyName;return"".concat(a," property name '").concat(Oe,"' is invalid").concat($(we),". Property names should be match format ").concat(JSON.stringify(Pe.format),".").concat(this.getSchemaPartDescription(we));case"enum":var Se=e.parentSchema;return Se&&Se.enum&&1===Se.enum.length?"".concat(a," should be ").concat(this.getSchemaPartText(Se,!1,!0)):"".concat(a," should be one of these:\n").concat(this.getSchemaPartText(Se));case"const":var Re=e.parentSchema;return"".concat(a," should be equal to constant ").concat(this.getSchemaPartText(Re,!1,!0));case"not":var Ie=B(e.parentSchema)?"\n".concat(this.getSchemaPartText(e.parentSchema)):"",Ae=this.getSchemaPartText(e.schema,!1,!1,!1);if(N(e.schema))return"".concat(a," should be any ").concat(Ae).concat(Ie,".");var _e=e.schema,Te=e.parentSchema;return"".concat(a," should not be ").concat(this.getSchemaPartText(_e,!1,!0)).concat(Te&&B(Te)?"\n".concat(this.getSchemaPartText(Te)):"");case"oneOf":case"anyOf":var De=e.parentSchema,Ne=e.children;if(Ne&&Ne.length>0){if(1===e.schema.length){var xe=Ne[Ne.length-1],je=Ne.slice(0,Ne.length-1);return this.formatValidationError(Object.assign({},xe,{children:je,parentSchema:Object.assign({},De,xe.parentSchema)}))}var Fe=function(e){var t=e;return t=R(t,(function(e){return e.dataPath?e.dataPath.length:0})),R(t,(function(e){return S[e.keyword]||2}))}(Ne);return 1===Fe.length?this.formatValidationError(Fe[0]):(Fe=function(e){for(var t=[],r=e.length-1;r>0;){var n=e[r];if("anyOf"===n.keyword||"oneOf"===n.keyword){var o=A(n),a=I(e.slice(0,r),o.concat(n.schemaPath));a!==r?(t.push(Object.assign({},n,{children:e.slice(a,r)})),r=a):t.push(n)}else t.push(n);r-=1}return 0===r&&t.push(e[r]),t.reverse()}(Fe),"".concat(a," should be one of these:\n").concat(this.getSchemaPartText(De),"\nDetails:\n").concat(Fe.map((function(e){return" * ".concat(_(t.formatValidationError(e)," "))})).join("\n")))}return"".concat(a," should be one of these:\n").concat(this.getSchemaPartText(De));case"if":var Ce=e.params,Le=e.parentSchema,ke=Ce.failingKeyword;return"".concat(a,' should match "').concat(ke,'" schema:\n').concat(this.getSchemaPartText(Le,[ke]));case"absolutePath":var Be=e.message,Me=e.parentSchema;return"".concat(a,": ").concat(Be).concat(this.getSchemaPartDescription(Me));default:var Ue=e.message,$e=e.parentSchema,qe=JSON.stringify(e,null,2);return"".concat(a," ").concat(Ue," (").concat(qe,").\n").concat(this.getSchemaPartText($e,!1))}}},{key:"formatValidationErrors",value:function(e){var t=this;return e.map((function(e){var r=t.formatValidationError(e);return t.postFormatter&&(r=t.postFormatter(r,e))," - ".concat(_(r," "))})).join("\n")}}]),a}(),z=V;r.default=z},{"./util/hints":"SqDh"}],wWOq:[function(e,t,r){var n,o,a;o=this,a=function(e){"use strict";function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,o=1;o<n;++o)t[o]=t[o].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(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){var n=t("[0-9]","[A-Fa-f]"),o=r(r("%[EFef]"+n+"%"+n+n+"%"+n+n)+"|"+r("%[89A-Fa-f]"+n+"%"+n+n)+"|"+r("%"+n+n)),a="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",i=t("[\\:\\/\\?\\#\\[\\]\\@]",a),s=e?"[\\uE000-\\uF8FF]":"[]",u=t("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),c=r("[A-Za-z]"+t("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),f=r(r(o+"|"+t(u,a,"[\\:]"))+"*"),l=(r(r("25[0-5]")+"|"+r("2[0-4][0-9]")+"|"+r("1[0-9][0-9]")+"|"+r("[1-9][0-9]")+"|[0-9]"),r(r("25[0-5]")+"|"+r("2[0-4][0-9]")+"|"+r("1[0-9][0-9]")+"|"+r("0?[1-9][0-9]")+"|0?0?[0-9]")),h=r(l+"\\."+l+"\\."+l+"\\."+l),p=r(n+"{1,4}"),d=r(r(p+"\\:"+p)+"|"+h),m=r(r(p+"\\:")+"{6}"+d),v=r("\\:\\:"+r(p+"\\:")+"{5}"+d),y=r(r(p)+"?\\:\\:"+r(p+"\\:")+"{4}"+d),g=r(r(r(p+"\\:")+"{0,1}"+p)+"?\\:\\:"+r(p+"\\:")+"{3}"+d),E=r(r(r(p+"\\:")+"{0,2}"+p)+"?\\:\\:"+r(p+"\\:")+"{2}"+d),b=r(r(r(p+"\\:")+"{0,3}"+p)+"?\\:\\:"+p+"\\:"+d),w=r(r(r(p+"\\:")+"{0,4}"+p)+"?\\:\\:"+d),P=r(r(r(p+"\\:")+"{0,5}"+p)+"?\\:\\:"+p),O=r(r(r(p+"\\:")+"{0,6}"+p)+"?\\:\\:"),S=r([m,v,y,g,E,b,w,P,O].join("|")),R=r(r(u+"|"+o)+"+"),I=(r(S+"\\%25"+R),r(S+r("\\%25|\\%(?!"+n+"{2})")+R)),A=r("[vV]"+n+"+\\."+t(u,a,"[\\:]")+"+"),_=r("\\["+r(I+"|"+S+"|"+A)+"\\]"),T=r(r(o+"|"+t(u,a))+"*"),D=r(_+"|"+h+"(?!"+T+")|"+T),N=r("[0-9]*"),x=r(r(f+"@")+"?"+D+r("\\:"+N)+"?"),j=r(o+"|"+t(u,a,"[\\:\\@]")),F=r(j+"*"),C=r(j+"+"),L=r(r(o+"|"+t(u,a,"[\\@]"))+"+"),k=r(r("\\/"+F)+"*"),B=r("\\/"+r(C+k)+"?"),M=r(L+k),U=r(C+k),$="(?!"+j+")",q=(r(k+"|"+B+"|"+M+"|"+U+"|"+$),r(r(j+"|"+t("[\\/\\?]",s))+"*")),Y=r(r(j+"|[\\/\\?]")+"*"),V=r(r("\\/\\/"+x+k)+"|"+B+"|"+U+"|"+$),z=r(c+"\\:"+V+r("\\?"+q)+"?"+r("\\#"+Y)+"?"),K=r(r("\\/\\/"+x+k)+"|"+B+"|"+M+"|"+$),H=r(K+r("\\?"+q)+"?"+r("\\#"+Y)+"?");return r(z+"|"+H),r(c+"\\:"+V+r("\\?"+q)+"?"),r(r("\\/\\/("+r("("+f+")@")+"?("+D+")"+r("\\:("+N+")")+"?)")+"?("+k+"|"+B+"|"+U+"|"+$+")"),r("\\?("+q+")"),r("\\#("+Y+")"),r(r("\\/\\/("+r("("+f+")@")+"?("+D+")"+r("\\:("+N+")")+"?)")+"?("+k+"|"+B+"|"+M+"|"+$+")"),r("\\?("+q+")"),r("\\#("+Y+")"),r(r("\\/\\/("+r("("+f+")@")+"?("+D+")"+r("\\:("+N+")")+"?)")+"?("+k+"|"+B+"|"+U+"|"+$+")"),r("\\?("+q+")"),r("\\#("+Y+")"),r("("+f+")@"),r("\\:("+N+")"),{NOT_SCHEME:new RegExp(t("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",u,a),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",u,a),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",u,a),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",u,a),"g"),NOT_QUERY:new RegExp(t("[^\\%]",u,a,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",u,a,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",u,a),"g"),UNRESERVED:new RegExp(u,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",u,i),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV4ADDRESS:new RegExp("^("+h+")$"),IPV6ADDRESS:new RegExp("^\\[?("+S+")"+r(r("\\%25|\\%(?!"+n+"{2})")+"("+R+")")+"?\\]?$")}}var i=a(!1),s=a(!0),u=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=2147483647,f=/^xn--/,l=/[^\0-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,m=String.fromCharCode;function v(e){throw new RangeError(p[e])}function y(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+function(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}((e=e.replace(h,".")).split("."),t).join(".")}function g(e){for(var t=[],r=0,n=e.length;r<n;){var o=e.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){var a=e.charCodeAt(r++);56320==(64512&a)?t.push(((1023&o)<<10)+(1023&a)+65536):(t.push(o),r--)}else t.push(o)}return t}var E=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},b=function(e,t,r){var n=0;for(e=r?d(e/700):e>>1,e+=d(e/t);e>455;n+=36)e=d(e/35);return d(n+36*e/(e+38))},w=function(e){var t,r=[],n=e.length,o=0,a=128,i=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var u=0;u<s;++u)e.charCodeAt(u)>=128&&v("not-basic"),r.push(e.charCodeAt(u));for(var f=s>0?s+1:0;f<n;){for(var l=o,h=1,p=36;;p+=36){f>=n&&v("invalid-input");var m=(t=e.charCodeAt(f++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:36;(m>=36||m>d((c-o)/h))&&v("overflow"),o+=m*h;var y=p<=i?1:p>=i+26?26:p-i;if(m<y)break;var g=36-y;h>d(c/g)&&v("overflow"),h*=g}var E=r.length+1;i=b(o-l,E,0==l),d(o/E)>c-a&&v("overflow"),a+=d(o/E),o%=E,r.splice(o++,0,a)}return String.fromCodePoint.apply(String,r)},P=function(e){var t=[],r=(e=g(e)).length,n=128,o=0,a=72,i=!0,s=!1,u=void 0;try{for(var f,l=e[Symbol.iterator]();!(i=(f=l.next()).done);i=!0){var h=f.value;h<128&&t.push(m(h))}}catch(e){s=!0,u=e}finally{try{!i&&l.return&&l.return()}finally{if(s)throw u}}var p=t.length,y=p;for(p&&t.push("-");y<r;){var w=c,P=!0,O=!1,S=void 0;try{for(var R,I=e[Symbol.iterator]();!(P=(R=I.next()).done);P=!0){var A=R.value;A>=n&&A<w&&(w=A)}}catch(e){O=!0,S=e}finally{try{!P&&I.return&&I.return()}finally{if(O)throw S}}var _=y+1;w-n>d((c-o)/_)&&v("overflow"),o+=(w-n)*_,n=w;var T=!0,D=!1,N=void 0;try{for(var x,j=e[Symbol.iterator]();!(T=(x=j.next()).done);T=!0){var F=x.value;if(F<n&&++o>c&&v("overflow"),F==n){for(var C=o,L=36;;L+=36){var k=L<=a?1:L>=a+26?26:L-a;if(C<k)break;var B=C-k,M=36-k;t.push(m(E(k+B%M,0))),C=d(B/M)}t.push(m(E(C,0))),a=b(o,_,y==p),o=0,++y}}}catch(e){D=!0,N=e}finally{try{!T&&j.return&&j.return()}finally{if(D)throw N}}++o,++n}return t.join("")},O=function(e){return y(e,(function(e){return l.test(e)?"xn--"+P(e):e}))},S=function(e){return y(e,(function(e){return f.test(e)?w(e.slice(4).toLowerCase()):e}))},R={};function I(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function A(e){for(var t="",r=0,n=e.length;r<n;){var o=parseInt(e.substr(r+1,2),16);if(o<128)t+=String.fromCharCode(o),r+=3;else if(o>=194&&o<224){if(n-r>=6){var a=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&o)<<6|63&a)}else t+=e.substr(r,6);r+=6}else if(o>=224){if(n-r>=9){var i=parseInt(e.substr(r+4,2),16),s=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function _(e,t){function r(e){var r=A(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,I).replace(t.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,I).replace(t.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,I).replace(t.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,I).replace(t.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,I).replace(t.PCT_ENCODED,o)),e}function T(e){return e.replace(/^0*(.*)/,"$1")||"0"}function D(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=u(r,2)[1];return n?n.split(".").map(T).join("."):e}function N(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=u(r,3),o=n[1],a=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),s=u(i,2),c=s[0],f=s[1],l=f?f.split(":").map(T):[],h=c.split(":").map(T),p=t.IPV4ADDRESS.test(h[h.length-1]),d=p?7:8,m=h.length-d,v=Array(d),y=0;y<d;++y)v[y]=l[y]||h[m+y]||"";p&&(v[d-1]=D(v[d-1],t));var g=v.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]).sort((function(e,t){return t.length-e.length}))[0],E=void 0;if(g&&g.length>1){var b=v.slice(0,g.index),w=v.slice(g.index+g.length);E=b.join(":")+"::"+w.join(":")}else E=v.join(":");return a&&(E+="%"+a),E}return e}var x=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,j=void 0==="".match(/(){0}/)[1];function F(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?s:i;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var o=e.match(x);if(o){j?(r.scheme=o[1],r.userinfo=o[3],r.host=o[4],r.port=parseInt(o[5],10),r.path=o[6]||"",r.query=o[7],r.fragment=o[8],isNaN(r.port)&&(r.port=o[5])):(r.scheme=o[1]||void 0,r.userinfo=-1!==e.indexOf("@")?o[3]:void 0,r.host=-1!==e.indexOf("//")?o[4]:void 0,r.port=parseInt(o[5],10),r.path=o[6]||"",r.query=-1!==e.indexOf("?")?o[7]:void 0,r.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),r.host&&(r.host=N(D(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var a=R[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||a&&a.unicodeSupport)_(r,n);else{if(r.host&&(t.domainHost||a&&a.domainHost))try{r.host=O(r.host.replace(n.PCT_ENCODED,A).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}_(r,i)}a&&a.parse&&a.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}var C=/^\.\.?\//,L=/^\/\.(\/|$)/,k=/^\/\.\.(\/|$)/,B=/^\/?(?:.|\n)*?(?=\/|$)/;function M(e){for(var t=[];e.length;)if(e.match(C))e=e.replace(C,"");else if(e.match(L))e=e.replace(L,"/");else if(e.match(k))e=e.replace(k,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(B);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function U(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?s:i,n=[],o=R[(t.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||o&&o.domainHost)try{e.host=t.iri?S(e.host):O(e.host.replace(r.PCT_ENCODED,A).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}_(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a,u,c,f=(a=e,u=!1!==t.iri?s:i,c=[],void 0!==a.userinfo&&(c.push(a.userinfo),c.push("@")),void 0!==a.host&&c.push(N(D(String(a.host),u),u).replace(u.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"==typeof a.port&&(c.push(":"),c.push(a.port.toString(10))),c.length?c.join(""):void 0);if(void 0!==f&&("suffix"!==t.reference&&n.push("//"),n.push(f),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var l=e.path;t.absolutePath||o&&o.absolutePath||(l=M(l)),void 0===f&&(l=l.replace(/^\/\//,"/%2F")),n.push(l)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function $(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=F(U(e,r),r),t=F(U(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=M(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=M(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=M(t.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)+t.path:n.path=t.path:n.path="/"+t.path,n.path=M(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function q(e,t){return e&&e.toString().replace(t&&t.iri?s.PCT_ENCODED:i.PCT_ENCODED,A)}var Y={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){return e.port!==("https"!==String(e.scheme).toLowerCase()?80:443)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},V={scheme:"https",domainHost:Y.domainHost,parse:Y.parse,serialize:Y.serialize},z={},K="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",H="[0-9A-Fa-f]",Q=r(r("%[EFef][0-9A-Fa-f]%"+H+H+"%"+H+H)+"|"+r("%[89A-Fa-f][0-9A-Fa-f]%"+H+H)+"|"+r("%"+H+H)),X=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),J=new RegExp(K,"g"),G=new RegExp(Q,"g"),W=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',X),"g"),Z=new RegExp(t("[^]",K,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),ee=Z;function te(e){var t=A(e);return t.match(J)?t:e}var re={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var o=!1,a={},i=r.query.split("&"),s=0,u=i.length;s<u;++s){var c=i[s].split("=");switch(c[0]){case"to":for(var f=c[1].split(","),l=0,h=f.length;l<h;++l)n.push(f[l]);break;case"subject":r.subject=q(c[1],t);break;case"body":r.body=q(c[1],t);break;default:o=!0,a[q(c[0],t)]=q(c[1],t)}}o&&(r.headers=a)}r.query=void 0;for(var p=0,d=n.length;p<d;++p){var m=n[p].split("@");if(m[0]=q(m[0]),t.unicodeSupport)m[1]=q(m[1],t).toLowerCase();else try{m[1]=O(q(m[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[p]=m.join("@")}return r},serialize:function(e,t){var r,n=e,a=null!=(r=e.to)?r instanceof Array?r:"number"!=typeof r.length||r.split||r.setInterval||r.call?[r]:Array.prototype.slice.call(r):[];if(a){for(var i=0,s=a.length;i<s;++i){var u=String(a[i]),c=u.lastIndexOf("@"),f=u.slice(0,c).replace(G,te).replace(G,o).replace(W,I),l=u.slice(c+1);try{l=t.iri?S(l):O(q(l,t).toLowerCase())}catch(e){n.error=n.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}a[i]=f+"@"+l}n.path=a.join(",")}var h=e.headers=e.headers||{};e.subject&&(h.subject=e.subject),e.body&&(h.body=e.body);var p=[];for(var d in h)h[d]!==z[d]&&p.push(d.replace(G,te).replace(G,o).replace(Z,I)+"="+h[d].replace(G,te).replace(G,o).replace(ee,I));return p.length&&(n.query=p.join("&")),n}},ne=/^([^\:]+)\:(.*)/,oe={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(ne),n=e;if(r){var o=t.scheme||n.scheme||"urn",a=r[1].toLowerCase(),i=r[2],s=o+":"+(t.nid||a),u=R[s];n.nid=a,n.nss=i,n.path=void 0,u&&(n=u.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,o=r+":"+(t.nid||n),a=R[o];a&&(e=a.serialize(e,t));var i=e,s=e.nss;return i.path=(n||t.nid)+":"+s,i}},ae=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ie={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(ae)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};R[Y.scheme]=Y,R[V.scheme]=V,R[re.scheme]=re,R[oe.scheme]=oe,R[ie.scheme]=ie,e.SCHEMES=R,e.pctEncChar=I,e.pctDecChars=A,e.parse=F,e.removeDotSegments=M,e.serialize=U,e.resolveComponents=$,e.resolve=function(e,t,r){var n=function(e,t){var r={scheme:"null"};if(t)for(var n in t)r[n]=t[n];return r}(0,r);return U($(F(e,n),F(t,n),n,!0),n)},e.normalize=function(e,t){return"string"==typeof e?e=U(F(e,t),t):"object"===n(e)&&(e=F(U(e,t),t)),e},e.equal=function(e,t,r){return"string"==typeof e?e=U(F(e,r),r):"object"===n(e)&&(e=U(e,r)),"string"==typeof t?t=U(F(t,r),r):"object"===n(t)&&(t=U(t,r)),e===t},e.escapeComponent=function(e,t){return e&&e.toString().replace(t&&t.iri?s.ESCAPE:i.ESCAPE,I)},e.unescapeComponent=q,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof r&&void 0!==t?a(r):"function"==typeof n&&n.amd?n(["exports"],a):a(o.URI=o.URI||{})},{}],dPQH:[function(e,t,r){"use strict";t.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,o,a;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(o=n;0!=o--;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(a=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,a[o]))return!1;for(o=n;0!=o--;){var i=a[o];if(!e(t[i],r[i]))return!1}return!0}return t!=t&&r!=r}},{}],rD0p:[function(e,t,r){"use strict";t.exports=function(e){for(var t,r=0,n=e.length,o=0;o<n;)r++,(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<n&&56320==(64512&(t=e.charCodeAt(o)))&&o++;return r}},{}],Q1F7:[function(e,t,r){"use strict";function n(e,t,r,n){var o=n?" !== ":" === ",a=n?" || ":" && ",i=n?"!":"",s=n?"":"!";switch(e){case"null":return t+o+"null";case"array":return i+"Array.isArray("+t+")";case"object":return"("+i+t+a+"typeof "+t+o+'"object"'+a+s+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+o+'"number"'+a+s+"("+t+" % 1)"+a+t+o+t+(r?a+i+"isFinite("+t+")":"")+")";case"number":return"(typeof "+t+o+'"'+e+'"'+(r?a+i+"isFinite("+t+")":"")+")";default:return"typeof "+t+o+'"'+e+'"'}}t.exports={copy:function(e,t){for(var r in t=t||{},e)t[r]=e[r];return t},checkDataType:n,checkDataTypes:function(e,t,r){if(1===e.length)return n(e[0],t,r,!0);var o="",i=a(e);for(var s in i.array&&i.object&&(o=i.null?"(":"(!"+t+" || ",o+="typeof "+t+' !== "object")',delete i.null,delete i.array,delete i.object),i.number&&delete i.integer,i)o+=(o?" && ":"")+n(s,t,r,!0);return o},coerceToTypes:function(e,t){if(Array.isArray(t)){for(var r=[],n=0;n<t.length;n++){var a=t[n];(o[a]||"array"===e&&"array"===a)&&(r[r.length]=a)}if(r.length)return r}else{if(o[t])return[t];if("array"===e&&"array"===t)return["array"]}},toHash:a,getProperty:u,escapeQuotes:c,equal:e("fast-deep-equal"),ucs2length:e("./ucs2length"),varOccurences:function(e,t){t+="[^0-9]";var r=e.match(new RegExp(t,"g"));return r?r.length:0},varReplace:function(e,t,r){return t+="([^0-9])",r=r.replace(/\$/g,"$$$$"),e.replace(new RegExp(t,"g"),r+"$1")},schemaHasRules:function(e,t){if("boolean"==typeof e)return!e;for(var r in e)if(t[r])return!0},schemaHasRulesExcept:function(e,t,r){if("boolean"==typeof e)return!e&&"not"!=r;for(var n in e)if(n!=r&&t[n])return!0},schemaUnknownRules:function(e,t){if("boolean"!=typeof e)for(var r in e)if(!t[r])return r},toQuotedString:f,getPathExpr:function(e,t,r,n){return p(e,r?"'/' + "+t+(n?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):n?"'[' + "+t+" + ']'":"'[\\'' + "+t+" + '\\']'")},getPath:function(e,t,r){return p(e,f(r?"/"+d(t):u(t)))},getData:function(e,t,r){var n,o,a,i;if(""===e)return"rootData";if("/"==e[0]){if(!l.test(e))throw new Error("Invalid JSON-pointer: "+e);o=e,a="rootData"}else{if(!(i=e.match(h)))throw new Error("Invalid JSON-pointer: "+e);if(n=+i[1],"#"==(o=i[2])){if(n>=t)throw new Error("Cannot access property/index "+n+" levels up, current level is "+t);return r[t-n]}if(n>t)throw new Error("Cannot access data "+n+" levels up, current level is "+t);if(a="data"+(t-n||""),!o)return a}for(var s=a,c=o.split("/"),f=0;f<c.length;f++){var p=c[f];p&&(s+=" && "+(a+=u(m(p))))}return s},unescapeFragment:function(e){return m(decodeURIComponent(e))},unescapeJsonPointer:m,escapeFragment:function(e){return encodeURIComponent(d(e))},escapeJsonPointer:d};var o=a(["string","number","integer","boolean","null"]);function a(e){for(var t={},r=0;r<e.length;r++)t[e[r]]=!0;return t}var i=/^[a-z$_][a-z$_0-9]*$/i,s=/'|\\/g;function u(e){return"number"==typeof e?"["+e+"]":i.test(e)?"."+e:"['"+c(e)+"']"}function c(e){return e.replace(s,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function f(e){return"'"+c(e)+"'"}var l=/^\/(?:[^~]|~0|~1)*$/,h=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function p(e,t){return'""'==e?t:(e+" + "+t).replace(/([^\\])' \+ '/g,"$1")}function d(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function m(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}},{"fast-deep-equal":"dPQH","./ucs2length":"rD0p"}],HHLG:[function(e,t,r){"use strict";var n=e("./util");t.exports=function(e){n.copy(e,this)}},{"./util":"Q1F7"}],uMRE:[function(e,t,r){"use strict";var n=t.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),o(t,"function"==typeof(r=t.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function o(e,t,r,a,i,s,u,c,f,l){if(a&&"object"==typeof a&&!Array.isArray(a)){for(var h in t(a,i,s,u,c,f,l),a){var p=a[h];if(Array.isArray(p)){if(h in n.arrayKeywords)for(var d=0;d<p.length;d++)o(e,t,r,p[d],i+"/"+h+"/"+d,s,i,h,a,d)}else if(h in n.propsKeywords){if(p&&"object"==typeof p)for(var m in p)o(e,t,r,p[m],i+"/"+h+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),s,i,h,a,m)}else(h in n.keywords||e.allKeys&&!(h in n.skipKeywords))&&o(e,t,r,p,i+"/"+h,s,i,h,a)}r(a,i,s,u,c,f,l)}}n.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},n.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},n.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},n.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},{}],w10T:[function(e,t,r){"use strict";var n=e("uri-js"),o=e("fast-deep-equal"),a=e("./util"),i=e("./schema_obj"),s=e("json-schema-traverse");function u(e,t,r){var n=this._refs[r];if("string"==typeof n){if(!this._refs[n])return u.call(this,e,t,n);n=this._refs[n]}if((n=n||this._schemas[r])instanceof i)return d(n.schema,this._opts.inlineRefs)?n.schema:n.validate||this._compile(n);var o,a,s,f=c.call(this,t,r);return f&&(o=f.schema,t=f.root,s=f.baseId),o instanceof i?a=o.validate||e.call(this,o.schema,t,void 0,s):void 0!==o&&(a=d(o,this._opts.inlineRefs)?o:e.call(this,o,t,void 0,s)),a}function c(e,t){var r=n.parse(t),o=g(r),a=y(this._getId(e.schema));if(0===Object.keys(e.schema).length||o!==a){var s=b(o),u=this._refs[s];if("string"==typeof u)return f.call(this,e,u,r);if(u instanceof i)u.validate||this._compile(u),e=u;else{if(!((u=this._schemas[s])instanceof i))return;if(u.validate||this._compile(u),s==b(t))return{schema:u,root:e,baseId:a};e=u}if(!e.schema)return;a=y(this._getId(e.schema))}return h.call(this,r,a,e.schema,e)}function f(e,t,r){var n=c.call(this,e,t);if(n){var o=n.schema,a=n.baseId;e=n.root;var i=this._getId(o);return i&&(a=w(a,i)),h.call(this,r,a,o,e)}}t.exports=u,u.normalizeId=b,u.fullPath=y,u.url=w,u.ids=function(e){var t=b(this._getId(e)),r={"":t},i={"":y(t,!1)},u={},c=this;return s(e,{allKeys:!0},(function(e,t,s,f,l,h,p){if(""!==t){var d=c._getId(e),m=r[f],v=i[f]+"/"+l;if(void 0!==p&&(v+="/"+("number"==typeof p?p:a.escapeFragment(p))),"string"==typeof d){d=m=b(m?n.resolve(m,d):d);var y=c._refs[d];if("string"==typeof y&&(y=c._refs[y]),y&&y.schema){if(!o(e,y.schema))throw new Error('id "'+d+'" resolves to more than one schema')}else if(d!=b(v))if("#"==d[0]){if(u[d]&&!o(e,u[d]))throw new Error('id "'+d+'" resolves to more than one schema');u[d]=e}else c._refs[d]=v}r[t]=m,i[t]=v}})),u},u.inlineRef=d,u.schema=c;var l=a.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function h(e,t,r,n){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var o=e.fragment.split("/"),i=1;i<o.length;i++){var s=o[i];if(s){if(void 0===(r=r[s=a.unescapeFragment(s)]))break;var u;if(!l[s]&&((u=this._getId(r))&&(t=w(t,u)),r.$ref)){var f=w(t,r.$ref),h=c.call(this,n,f);h&&(r=h.schema,n=h.root,t=h.baseId)}}}return void 0!==r&&r!==n.schema?{schema:r,root:n,baseId:t}:void 0}}var p=a.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function d(e,t){return!1!==t&&(void 0===t||!0===t?m(e):t?v(e)<=t:void 0)}function m(e){var t;if(Array.isArray(e)){for(var r=0;r<e.length;r++)if("object"==typeof(t=e[r])&&!m(t))return!1}else for(var n in e){if("$ref"==n)return!1;if("object"==typeof(t=e[n])&&!m(t))return!1}return!0}function v(e){var t,r=0;if(Array.isArray(e)){for(var n=0;n<e.length;n++)if("object"==typeof(t=e[n])&&(r+=v(t)),r==1/0)return 1/0}else for(var o in e){if("$ref"==o)return 1/0;if(p[o])r++;else if("object"==typeof(t=e[o])&&(r+=v(t)+1),r==1/0)return 1/0}return r}function y(e,t){return!1!==t&&(e=b(e)),g(n.parse(e))}function g(e){return n.serialize(e).split("#")[0]+"#"}var E=/#\/?$/;function b(e){return e?e.replace(E,""):""}function w(e,t){return t=b(t),n.resolve(e,t)}},{"uri-js":"wWOq","fast-deep-equal":"dPQH","./util":"Q1F7","./schema_obj":"HHLG","json-schema-traverse":"uMRE"}],OtNE:[function(e,t,r){"use strict";var n=e("./resolve");function o(e,t,r){this.message=r||o.message(e,t),this.missingRef=n.url(e,t),this.missingSchema=n.normalizeId(n.fullPath(this.missingRef))}function a(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}t.exports={Validation:a((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:a(o)},o.message=function(e,t){return"can't resolve reference "+t+" from id "+e}},{"./resolve":"w10T"}],Xb3N:[function(e,t,r){"use strict";t.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r,n="boolean"==typeof t.cycles&&t.cycles,o=t.cmp&&(r=t.cmp,function(e){return function(t,n){var o={key:t,value:e[t]},a={key:n,value:e[n]};return r(o,a)}}),a=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var r,i;if(Array.isArray(t)){for(i="[",r=0;r<t.length;r++)r&&(i+=","),i+=e(t[r])||"null";return i+"]"}if(null===t)return"null";if(-1!==a.indexOf(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=a.push(t)-1,u=Object.keys(t).sort(o&&o(t));for(i="",r=0;r<u.length;r++){var c=u[r],f=e(t[c]);f&&(i&&(i+=","),i+=JSON.stringify(c)+":"+f)}return a.splice(s,1),"{"+i+"}"}}(e)}},{}],yhC1:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n="",o=!0===e.schema.$async,a=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),i=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var u="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(u);e.logger.warn(u)}}if(e.isTop&&(n+=" var validate = ",o&&(e.async=!0,n+="async "),n+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",i&&(e.opts.sourceCode||e.opts.processCode)&&(n+=" /*# sourceURL="+i+" */ ")),"boolean"==typeof e.schema||!a&&!e.schema.$ref){var c=e.level,f=e.dataLevel,l=e.schema["false schema"],h=e.schemaPath+e.util.getProperty("false schema"),p=e.errSchemaPath+"/false schema",d=!e.opts.allErrors,m="data"+(f||""),v="valid"+c;if(!1===e.schema){e.isTop?d=!0:n+=" var "+v+" = false; ",(z=z||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'boolean schema is false' "),e.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";var y=n;n=z.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+y+"]); ":n+=" validate.errors = ["+y+"]; return false; ":n+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?n+=o?" return data; ":" validate.errors = null; return true; ":n+=" var "+v+" = true; ";return e.isTop&&(n+=" }; return validate; "),n}if(e.isTop){var g=e.isTop;if(c=e.level=0,f=e.dataLevel=0,m="data",e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var E="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(E);e.logger.warn(E)}n+=" var vErrors = null; ",n+=" var errors = 0; ",n+=" if (rootData === undefined) rootData = data; "}else{if(c=e.level,m="data"+((f=e.dataLevel)||""),i&&(e.baseId=e.resolve.url(e.baseId,i)),o&&!e.async)throw new Error("async schema in sync schema");n+=" var errs_"+c+" = errors;"}v="valid"+c,d=!e.opts.allErrors;var b="",w="",P=e.schema.type,O=Array.isArray(P);if(P&&e.opts.nullable&&!0===e.schema.nullable&&(O?-1==P.indexOf("null")&&(P=P.concat("null")):"null"!=P&&(P=[P,"null"],O=!0)),O&&1==P.length&&(P=P[0],O=!1),e.schema.$ref&&a){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(a=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(n+=" "+e.RULES.all.$comment.code(e,"$comment")),P){if(e.opts.coerceTypes)var S=e.util.coerceToTypes(e.opts.coerceTypes,P);var R=e.RULES.types[P];if(S||O||!0===R||R&&!G(R)){h=e.schemaPath+".type",p=e.errSchemaPath+"/type",h=e.schemaPath+".type",p=e.errSchemaPath+"/type";var I=O?"checkDataTypes":"checkDataType";if(n+=" if ("+e.util[I](P,m,e.opts.strictNumbers,!0)+") { ",S){var A="dataType"+c,_="coerced"+c;n+=" var "+A+" = typeof "+m+"; var "+_+" = undefined; ","array"==e.opts.coerceTypes&&(n+=" if ("+A+" == 'object' && Array.isArray("+m+") && "+m+".length == 1) { "+m+" = "+m+"[0]; "+A+" = typeof "+m+"; if ("+e.util.checkDataType(e.schema.type,m,e.opts.strictNumbers)+") "+_+" = "+m+"; } "),n+=" if ("+_+" !== undefined) ; ";var T=S;if(T)for(var D,N=-1,x=T.length-1;N<x;)"string"==(D=T[N+=1])?n+=" else if ("+A+" == 'number' || "+A+" == 'boolean') "+_+" = '' + "+m+"; else if ("+m+" === null) "+_+" = ''; ":"number"==D||"integer"==D?(n+=" else if ("+A+" == 'boolean' || "+m+" === null || ("+A+" == 'string' && "+m+" && "+m+" == +"+m+" ","integer"==D&&(n+=" && !("+m+" % 1)"),n+=")) "+_+" = +"+m+"; "):"boolean"==D?n+=" else if ("+m+" === 'false' || "+m+" === 0 || "+m+" === null) "+_+" = false; else if ("+m+" === 'true' || "+m+" === 1) "+_+" = true; ":"null"==D?n+=" else if ("+m+" === '' || "+m+" === 0 || "+m+" === false) "+_+" = null; ":"array"==e.opts.coerceTypes&&"array"==D&&(n+=" else if ("+A+" == 'string' || "+A+" == 'number' || "+A+" == 'boolean' || "+m+" == null) "+_+" = ["+m+"]; ");n+=" else { ",(z=z||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",n+=O?""+P.join(","):""+P,n+="' } ",!1!==e.opts.messages&&(n+=" , message: 'should be ",n+=O?""+P.join(","):""+P,n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ",y=n,n=z.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+y+"]); ":n+=" validate.errors = ["+y+"]; return false; ":n+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } if ("+_+" !== undefined) { ";var j=f?"data"+(f-1||""):"parentData";n+=" "+m+" = "+_+"; ",f||(n+="if ("+j+" !== undefined)"),n+=" "+j+"["+(f?e.dataPathArr[f]:"parentDataProperty")+"] = "+_+"; } "}else(z=z||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",n+=O?""+P.join(","):""+P,n+="' } ",!1!==e.opts.messages&&(n+=" , message: 'should be ",n+=O?""+P.join(","):""+P,n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ",y=n,n=z.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+y+"]); ":n+=" validate.errors = ["+y+"]; return false; ":n+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";n+=" } "}}if(e.schema.$ref&&!a)n+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",d&&(n+=" } if (errors === ",n+=g?"0":"errs_"+c,n+=") { ",w+="}");else{var F=e.RULES;if(F)for(var C=-1,L=F.length-1;C<L;)if(G(R=F[C+=1])){if(R.type&&(n+=" if ("+e.util.checkDataType(R.type,m,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==R.type&&e.schema.properties){l=e.schema.properties;var k=Object.keys(l);if(k)for(var B,M=-1,U=k.length-1;M<U;)if(void 0!==(Y=l[B=k[M+=1]]).default){var $=m+e.util.getProperty(B);if(e.compositeRule){if(e.opts.strictDefaults){if(E="default is ignored for: "+$,"log"!==e.opts.strictDefaults)throw new Error(E);e.logger.warn(E)}}else n+=" if ("+$+" === undefined ","empty"==e.opts.useDefaults&&(n+=" || "+$+" === null || "+$+" === '' "),n+=" ) "+$+" = ","shared"==e.opts.useDefaults?n+=" "+e.useDefault(Y.default)+" ":n+=" "+JSON.stringify(Y.default)+" ",n+="; "}}else if("array"==R.type&&Array.isArray(e.schema.items)){var q=e.schema.items;if(q){N=-1;for(var Y,V=q.length-1;N<V;)if(void 0!==(Y=q[N+=1]).default)if($=m+"["+N+"]",e.compositeRule){if(e.opts.strictDefaults){if(E="default is ignored for: "+$,"log"!==e.opts.strictDefaults)throw new Error(E);e.logger.warn(E)}}else n+=" if ("+$+" === undefined ","empty"==e.opts.useDefaults&&(n+=" || "+$+" === null || "+$+" === '' "),n+=" ) "+$+" = ","shared"==e.opts.useDefaults?n+=" "+e.useDefault(Y.default)+" ":n+=" "+JSON.stringify(Y.default)+" ",n+="; "}}var z,K=R.rules;if(K)for(var H,Q=-1,X=K.length-1;Q<X;)if(W(H=K[Q+=1])){var J=H.code(e,H.keyword,R.type);J&&(n+=" "+J+" ",d&&(b+="}"))}if(d&&(n+=" "+b+" ",b=""),R.type&&(n+=" } ",P&&P===R.type&&!S))n+=" else { ",h=e.schemaPath+".type",p=e.errSchemaPath+"/type",(z=z||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",n+=O?""+P.join(","):""+P,n+="' } ",!1!==e.opts.messages&&(n+=" , message: 'should be ",n+=O?""+P.join(","):""+P,n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ",y=n,n=z.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+y+"]); ":n+=" validate.errors = ["+y+"]; return false; ":n+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ";d&&(n+=" if (errors === ",n+=g?"0":"errs_"+c,n+=") { ",w+="}")}}function G(e){for(var t=e.rules,r=0;r<t.length;r++)if(W(t[r]))return!0}function W(t){return void 0!==e.schema[t.keyword]||t.implements&&function(t){for(var r=t.implements,n=0;n<r.length;n++)if(void 0!==e.schema[r[n]])return!0}(t)}return d&&(n+=" "+w+" "),g?(o?(n+=" if (errors === 0) return data; ",n+=" else throw new ValidationError(vErrors); "):(n+=" validate.errors = vErrors; ",n+=" return errors === 0; "),n+=" }; return validate;"):n+=" var "+v+" = errors === errs_"+c+";",n}},{}],qdYs:[function(e,t,r){"use strict";var n=e("./resolve"),o=e("./util"),a=e("./error_classes"),i=e("fast-json-stable-stringify"),s=e("../dotjs/validate"),u=o.ucs2length,c=e("fast-deep-equal"),f=a.Validation;function l(e,t,r){var n=p.call(this,e,t,r);return n>=0?{index:n,compiling:!0}:(n=this._compilations.length,this._compilations[n]={schema:e,root:t,baseId:r},{index:n,compiling:!1})}function h(e,t,r){var n=p.call(this,e,t,r);n>=0&&this._compilations.splice(n,1)}function p(e,t,r){for(var n=0;n<this._compilations.length;n++){var o=this._compilations[n];if(o.schema==e&&o.root==t&&o.baseId==r)return n}return-1}function d(e,t){return"var pattern"+e+" = new RegExp("+o.toQuotedString(t[e])+");"}function m(e){return"var default"+e+" = defaults["+e+"];"}function v(e,t){return void 0===t[e]?"":"var refVal"+e+" = refVal["+e+"];"}function y(e){return"var customRule"+e+" = customRules["+e+"];"}function g(e,t){if(!e.length)return"";for(var r="",n=0;n<e.length;n++)r+=t(n,e);return r}t.exports=function e(t,r,p,E){var b=this,w=this._opts,P=[void 0],O={},S=[],R={},I=[],A={},_=[];r=r||{schema:t,refVal:P,refs:O};var T=l.call(this,t,r,E),D=this._compilations[T.index];if(T.compiling)return D.callValidate=function e(){var t=D.validate,r=t.apply(this,arguments);return e.errors=t.errors,r};var N=this._formats,x=this.RULES;try{var j=C(t,r,p,E);D.validate=j;var F=D.callValidate;return F&&(F.schema=j.schema,F.errors=null,F.refs=j.refs,F.refVal=j.refVal,F.root=j.root,F.$async=j.$async,w.sourceCode&&(F.source=j.source)),j}finally{h.call(this,t,r,E)}function C(t,i,l,h){var p=!i||i&&i.schema==t;if(i.schema!=r.schema)return e.call(b,t,i,l,h);var E,R=!0===t.$async,A=s({isTop:!0,schema:t,isRoot:p,baseId:h,root:i,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:a.MissingRef,RULES:x,validate:s,util:o,resolve:n,resolveRef:L,usePattern:M,useDefault:U,useCustomRule:$,opts:w,formats:N,logger:b.logger,self:b});A=g(P,v)+g(S,d)+g(I,m)+g(_,y)+A,w.processCode&&(A=w.processCode(A,t));try{E=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",A)(b,x,N,r,P,I,_,c,u,f),P[0]=E}catch(e){throw b.logger.error("Error compiling schema, function code:",A),e}return E.schema=t,E.errors=null,E.refs=O,E.refVal=P,E.root=p?E:i,R&&(E.$async=!0),!0===w.sourceCode&&(E.source={code:A,patterns:S,defaults:I}),E}function L(t,o,a){o=n.url(t,o);var i,s,u=O[o];if(void 0!==u)return B(i=P[u],s="refVal["+u+"]");if(!a&&r.refs){var c=r.refs[o];if(void 0!==c)return B(i=r.refVal[c],s=k(o,i))}s=k(o);var f,l,h=n.call(b,C,r,o);if(void 0===h){var d=p&&p[o];d&&(h=n.inlineRef(d,w.inlineRefs)?d:e.call(b,d,r,p,t))}if(void 0!==h)return f=h,l=O[o],P[l]=f,B(h,s);!function(e){delete O[e]}(o)}function k(e,t){var r=P.length;return P[r]=t,O[e]=r,"refVal"+r}function B(e,t){return"object"==typeof e||"boolean"==typeof e?{code:t,schema:e,inline:!0}:{code:t,$async:e&&!!e.$async}}function M(e){var t=R[e];return void 0===t&&(t=R[e]=S.length,S[t]=e),"pattern"+t}function U(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return o.toQuotedString(e);case"object":if(null===e)return"null";var t=i(e),r=A[t];return void 0===r&&(r=A[t]=I.length,I[r]=e),"default"+r}}function $(e,t,r,n){if(!1!==b._opts.validateSchema){var o=e.definition.dependencies;if(o&&!o.every((function(e){return Object.prototype.hasOwnProperty.call(r,e)})))throw new Error("parent schema must have all required keywords: "+o.join(","));var a=e.definition.validateSchema;if(a&&!a(t)){var i="keyword schema is invalid: "+b.errorsText(a.errors);if("log"!=b._opts.validateSchema)throw new Error(i);b.logger.error(i)}}var s,u=e.definition.compile,c=e.definition.inline,f=e.definition.macro;if(u)s=u.call(b,t,r,n);else if(f)s=f.call(b,t,r,n),!1!==w.validateSchema&&b.validateSchema(s,!0);else if(c)s=c.call(b,n,e.keyword,t,r);else if(!(s=e.definition.validate))return;if(void 0===s)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var l=_.length;return _[l]=s,{code:"customRule"+l,validate:s}}}},{"./resolve":"w10T","./util":"Q1F7","./error_classes":"OtNE","fast-json-stable-stringify":"Xb3N","../dotjs/validate":"yhC1","fast-deep-equal":"dPQH"}],fXCy:[function(e,t,r){"use strict";var n=t.exports=function(){this._cache={}};n.prototype.put=function(e,t){this._cache[e]=t},n.prototype.get=function(e){return this._cache[e]},n.prototype.del=function(e){delete this._cache[e]},n.prototype.clear=function(){this._cache={}}},{}],dfAH:[function(e,t,r){"use strict";var n=e("./util"),o=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,a=[0,31,28,31,30,31,30,31,31,30,31,30,31],i=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,s=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,u=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,c=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,f=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,l=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,h=/^(?:\/(?:[^~/]|~0|~1)*)*$/,p=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,d=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function m(e){return e="full"==e?"full":"fast",n.copy(m[e])}function v(e){var t=e.match(o);if(!t)return!1;var r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&i<=(2==n&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:a[n])}function y(e,t){var r=e.match(i);if(!r)return!1;var n=r[1],o=r[2],a=r[3],s=r[5];return(n<=23&&o<=59&&a<=59||23==n&&59==o&&60==a)&&(!t||s)}t.exports=m,m.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":c,url:f,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:s,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:w,uuid:l,"json-pointer":h,"json-pointer-uri-fragment":p,"relative-json-pointer":d},m.full={date:v,time:y,"date-time":function(e){var t=e.split(g);return 2==t.length&&v(t[0])&&y(t[1],!0)},uri:function(e){return E.test(e)&&u.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":c,url:f,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:s,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:w,uuid:l,"json-pointer":h,"json-pointer-uri-fragment":p,"relative-json-pointer":d};var g=/t|\s/i;var E=/\/|:/;var b=/[^\\]\\Z/;function w(e){if(b.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},{"./util":"Q1F7"}],a2na:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n,o,a=" ",i=e.level,s=e.dataLevel,u=e.schema[t],c=e.errSchemaPath+"/"+t,f=!e.opts.allErrors,l="data"+(s||""),h="valid"+i;if("#"==u||"#/"==u)e.isRoot?(n=e.async,o="validate"):(n=!0===e.root.schema.$async,o="root.refVal[0]");else{var p=e.resolveRef(e.baseId,u,e.isRoot);if(void 0===p){var d=e.MissingRefError.message(e.baseId,u);if("fail"==e.opts.missingRefs){e.logger.error(d),(g=g||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { ref: '"+e.util.escapeQuotes(u)+"' } ",!1!==e.opts.messages&&(a+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(u)+"' "),e.opts.verbose&&(a+=" , schema: "+e.util.toQuotedString(u)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ";var m=a;a=g.pop(),!e.compositeRule&&f?e.async?a+=" throw new ValidationError(["+m+"]); ":a+=" validate.errors = ["+m+"]; return false; ":a+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",f&&(a+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,u,d);e.logger.warn(d),f&&(a+=" if (true) { ")}}else if(p.inline){var v=e.util.copy(e);v.level++;var y="valid"+v.level;v.schema=p.schema,v.schemaPath="",v.errSchemaPath=u,a+=" "+e.validate(v).replace(/validate\.schema/g,p.code)+" ",f&&(a+=" if ("+y+") { ")}else n=!0===p.$async||e.async&&!1!==p.$async,o=p.code}if(o){var g;(g=g||[]).push(a),a="",e.opts.passContext?a+=" "+o+".call(this, ":a+=" "+o+"( ",a+=" "+l+", (dataPath || '')",'""'!=e.errorPath&&(a+=" + "+e.errorPath);var E=a+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData) ";if(a=g.pop(),n){if(!e.async)throw new Error("async schema referenced by sync schema");f&&(a+=" var "+h+"; "),a+=" try { await "+E+"; ",f&&(a+=" "+h+" = true; "),a+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",f&&(a+=" "+h+" = false; "),a+=" } ",f&&(a+=" if ("+h+") { ")}else a+=" if (!"+E+") { if (vErrors === null) vErrors = "+o+".errors; else vErrors = vErrors.concat("+o+".errors); errors = vErrors.length; } ",f&&(a+=" else { ")}return a}},{}],hRgn:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n=" ",o=e.schema[t],a=e.schemaPath+e.util.getProperty(t),i=e.errSchemaPath+"/"+t,s=!e.opts.allErrors,u=e.util.copy(e),c="";u.level++;var f="valid"+u.level,l=u.baseId,h=!0,p=o;if(p)for(var d,m=-1,v=p.length-1;m<v;)d=p[m+=1],(e.opts.strictKeywords?"object"==typeof d&&Object.keys(d).length>0||!1===d:e.util.schemaHasRules(d,e.RULES.all))&&(h=!1,u.schema=d,u.schemaPath=a+"["+m+"]",u.errSchemaPath=i+"/"+m,n+=" "+e.validate(u)+" ",u.baseId=l,s&&(n+=" if ("+f+") { ",c+="}"));return s&&(n+=h?" if (true) { ":" "+c.slice(0,-1)+" "),n}},{}],lo6J:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n=" ",o=e.level,a=e.dataLevel,i=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,f="data"+(a||""),l="valid"+o,h="errs__"+o,p=e.util.copy(e),d="";p.level++;var m="valid"+p.level;if(i.every((function(t){return e.opts.strictKeywords?"object"==typeof t&&Object.keys(t).length>0||!1===t:e.util.schemaHasRules(t,e.RULES.all)}))){var v=p.baseId;n+=" var "+h+" = errors; var "+l+" = false; ";var y=e.compositeRule;e.compositeRule=p.compositeRule=!0;var g=i;if(g)for(var E,b=-1,w=g.length-1;b<w;)E=g[b+=1],p.schema=E,p.schemaPath=s+"["+b+"]",p.errSchemaPath=u+"/"+b,n+=" "+e.validate(p)+" ",p.baseId=v,n+=" "+l+" = "+l+" || "+m+"; if (!"+l+") { ",d+="}";e.compositeRule=p.compositeRule=y,n+=" "+d+" if (!"+l+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(n+=" } ")}else c&&(n+=" if (true) { ");return n}},{}],Kkzr:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n=" ",o=e.schema[t],a=e.errSchemaPath+"/"+t,i=(e.opts.allErrors,e.util.toQuotedString(o));return!0===e.opts.$comment?n+=" console.log("+i+");":"function"==typeof e.opts.$comment&&(n+=" self._opts.$comment("+i+", "+e.util.toQuotedString(a)+", validate.root.schema);"),n}},{}],U4sD:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n=" ",o=e.level,a=e.dataLevel,i=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,f="data"+(a||""),l="valid"+o,h=e.opts.$data&&i&&i.$data;h&&(n+=" var schema"+o+" = "+e.util.getData(i.$data,a,e.dataPathArr)+"; "),h||(n+=" var schema"+o+" = validate.schema"+s+";"),n+="var "+l+" = equal("+f+", schema"+o+"); if (!"+l+") { ";var p=p||[];p.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { allowedValue: schema"+o+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be equal to constant' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),n+=" } "):n+=" {} ";var d=n;return n=p.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+d+"]); ":n+=" validate.errors = ["+d+"]; return false; ":n+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" }",c&&(n+=" else { "),n}},{}],EypH:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n=" ",o=e.level,a=e.dataLevel,i=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,f="data"+(a||""),l="valid"+o,h="errs__"+o,p=e.util.copy(e);p.level++;var d="valid"+p.level,m="i"+o,v=p.dataLevel=e.dataLevel+1,y="data"+v,g=e.baseId,E=e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all);if(n+="var "+h+" = errors;var "+l+";",E){var b=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=i,p.schemaPath=s,p.errSchemaPath=u,n+=" var "+d+" = false; for (var "+m+" = 0; "+m+" < "+f+".length; "+m+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var w=f+"["+m+"]";p.dataPathArr[v]=m;var P=e.validate(p);p.baseId=g,e.util.varOccurences(P,y)<2?n+=" "+e.util.varReplace(P,y,w)+" ":n+=" var "+y+" = "+w+"; "+P+" ",n+=" if ("+d+") break; } ",e.compositeRule=p.compositeRule=b,n+=" if (!"+d+") {"}else n+=" if ("+f+".length == 0) {";var O=O||[];O.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should contain a valid item' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),n+=" } "):n+=" {} ";var S=n;return n=O.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+S+"]); ":n+=" validate.errors = ["+S+"]; return false; ":n+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { ",E&&(n+=" errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } "),e.opts.allErrors&&(n+=" } "),n}},{}],Cpp7:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n=" ",o=e.level,a=e.dataLevel,i=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,f="data"+(a||""),l="errs__"+o,h=e.util.copy(e),p="";h.level++;var d="valid"+h.level,m={},v={},y=e.opts.ownProperties;for(w in i)if("__proto__"!=w){var g=i[w],E=Array.isArray(g)?v:m;E[w]=g}n+="var "+l+" = errors;";var b=e.errorPath;for(var w in n+="var missing"+o+";",v)if((E=v[w]).length){if(n+=" if ( "+f+e.util.getProperty(w)+" !== undefined ",y&&(n+=" && Object.prototype.hasOwnProperty.call("+f+", '"+e.util.escapeQuotes(w)+"') "),c){n+=" && ( ";var P=E;if(P)for(var O=-1,S=P.length-1;O<S;)D=P[O+=1],O&&(n+=" || "),n+=" ( ( "+(F=f+(j=e.util.getProperty(D)))+" === undefined ",y&&(n+=" || ! Object.prototype.hasOwnProperty.call("+f+", '"+e.util.escapeQuotes(D)+"') "),n+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?D:j)+") ) ";n+=")) { ";var R="missing"+o,I="' + "+R+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(b,R,!0):b+" + "+R);var A=A||[];A.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+I+"', depsCount: "+E.length+", deps: '"+e.util.escapeQuotes(1==E.length?E[0]:E.join(", "))+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should have ",1==E.length?n+="property "+e.util.escapeQuotes(E[0]):n+="properties "+e.util.escapeQuotes(E.join(", ")),n+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),n+=" } "):n+=" {} ";var _=n;n=A.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+_+"]); ":n+=" validate.errors = ["+_+"]; return false; ":n+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{n+=" ) { ";var T=E;if(T)for(var D,N=-1,x=T.length-1;N<x;){D=T[N+=1];var j=e.util.getProperty(D),F=(I=e.util.escapeQuotes(D),f+j);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(b,D,e.opts.jsonPointers)),n+=" if ( "+F+" === undefined ",y&&(n+=" || ! Object.prototype.hasOwnProperty.call("+f+", '"+e.util.escapeQuotes(D)+"') "),n+=") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { property: '"+e.util.escapeQuotes(w)+"', missingProperty: '"+I+"', depsCount: "+E.length+", deps: '"+e.util.escapeQuotes(1==E.length?E[0]:E.join(", "))+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should have ",1==E.length?n+="property "+e.util.escapeQuotes(E[0]):n+="properties "+e.util.escapeQuotes(E.join(", ")),n+=" when property "+e.util.escapeQuotes(w)+" is present' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}n+=" } ",c&&(p+="}",n+=" else { ")}e.errorPath=b;var C=h.baseId;for(var w in m)g=m[w],(e.opts.strictKeywords?"object"==typeof g&&Object.keys(g).length>0||!1===g:e.util.schemaHasRules(g,e.RULES.all))&&(n+=" "+d+" = true; if ( "+f+e.util.getProperty(w)+" !== undefined ",y&&(n+=" && Object.prototype.hasOwnProperty.call("+f+", '"+e.util.escapeQuotes(w)+"') "),n+=") { ",h.schema=g,h.schemaPath=s+e.util.getProperty(w),h.errSchemaPath=u+"/"+e.util.escapeFragment(w),n+=" "+e.validate(h)+" ",h.baseId=C,n+=" } ",c&&(n+=" if ("+d+") { ",p+="}"));return c&&(n+=" "+p+" if ("+l+" == errors) {"),n}},{}],fqDY:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n=" ",o=e.level,a=e.dataLevel,i=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,f="data"+(a||""),l="valid"+o,h=e.opts.$data&&i&&i.$data;h&&(n+=" var schema"+o+" = "+e.util.getData(i.$data,a,e.dataPathArr)+"; ");var p="i"+o,d="schema"+o;h||(n+=" var "+d+" = validate.schema"+s+";"),n+="var "+l+";",h&&(n+=" if (schema"+o+" === undefined) "+l+" = true; else if (!Array.isArray(schema"+o+")) "+l+" = false; else {"),n+=l+" = false;for (var "+p+"=0; "+p+"<"+d+".length; "+p+"++) if (equal("+f+", "+d+"["+p+"])) { "+l+" = true; break; }",h&&(n+=" } "),n+=" if (!"+l+") { ";var m=m||[];m.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { allowedValues: schema"+o+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),n+=" } "):n+=" {} ";var v=n;return n=m.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" }",c&&(n+=" else { "),n}},{}],avoW:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n=" ",o=e.level,a=e.dataLevel,i=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,f="data"+(a||"");if(!1===e.opts.format)return c&&(n+=" if (true) { "),n;var l,h=e.opts.$data&&i&&i.$data;h?(n+=" var schema"+o+" = "+e.util.getData(i.$data,a,e.dataPathArr)+"; ",l="schema"+o):l=i;var p=e.opts.unknownFormats,d=Array.isArray(p);if(h)n+=" var "+(m="format"+o)+" = formats["+l+"]; var "+(v="isObject"+o)+" = typeof "+m+" == 'object' && !("+m+" instanceof RegExp) && "+m+".validate; var "+(y="formatType"+o)+" = "+v+" && "+m+".type || 'string'; if ("+v+") { ",e.async&&(n+=" var async"+o+" = "+m+".async; "),n+=" "+m+" = "+m+".validate; } if ( ",h&&(n+=" ("+l+" !== undefined && typeof "+l+" != 'string') || "),n+=" (","ignore"!=p&&(n+=" ("+l+" && !"+m+" ",d&&(n+=" && self._opts.unknownFormats.indexOf("+l+") == -1 "),n+=") || "),n+=" ("+m+" && "+y+" == '"+r+"' && !(typeof "+m+" == 'function' ? ",e.async?n+=" (async"+o+" ? await "+m+"("+f+") : "+m+"("+f+")) ":n+=" "+m+"("+f+") ",n+=" : "+m+".test("+f+"))))) {";else{var m;if(!(m=e.formats[i])){if("ignore"==p)return e.logger.warn('unknown format "'+i+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(n+=" if (true) { "),n;if(d&&p.indexOf(i)>=0)return c&&(n+=" if (true) { "),n;throw new Error('unknown format "'+i+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,y=(v="object"==typeof m&&!(m instanceof RegExp)&&m.validate)&&m.type||"string";if(v){var g=!0===m.async;m=m.validate}if(y!=r)return c&&(n+=" if (true) { "),n;if(g){if(!e.async)throw new Error("async format in sync schema");n+=" if (!(await "+(E="formats"+e.util.getProperty(i)+".validate")+"("+f+"))) { "}else{n+=" if (! ";var E="formats"+e.util.getProperty(i);v&&(E+=".validate"),n+="function"==typeof m?" "+E+"("+f+") ":" "+E+".test("+f+") ",n+=") { "}}var b=b||[];b.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { format: ",n+=h?""+l:""+e.util.toQuotedString(i),n+=" } ",!1!==e.opts.messages&&(n+=" , message: 'should match format \"",n+=h?"' + "+l+" + '":""+e.util.escapeQuotes(i),n+="\"' "),e.opts.verbose&&(n+=" , schema: ",n+=h?"validate.schema"+s:""+e.util.toQuotedString(i),n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),n+=" } "):n+=" {} ";var w=n;return n=b.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+w+"]); ":n+=" validate.errors = ["+w+"]; return false; ":n+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",c&&(n+=" else { "),n}},{}],JHQ3:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n=" ",o=e.level,a=e.dataLevel,i=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,f="data"+(a||""),l="valid"+o,h="errs__"+o,p=e.util.copy(e);p.level++;var d="valid"+p.level,m=e.schema.then,v=e.schema.else,y=void 0!==m&&(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0||!1===m:e.util.schemaHasRules(m,e.RULES.all)),g=void 0!==v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0||!1===v:e.util.schemaHasRules(v,e.RULES.all)),E=p.baseId;if(y||g){var b;p.createErrors=!1,p.schema=i,p.schemaPath=s,p.errSchemaPath=u,n+=" var "+h+" = errors; var "+l+" = true; ";var w=e.compositeRule;e.compositeRule=p.compositeRule=!0,n+=" "+e.validate(p)+" ",p.baseId=E,p.createErrors=!0,n+=" errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.compositeRule=p.compositeRule=w,y?(n+=" if ("+d+") { ",p.schema=e.schema.then,p.schemaPath=e.schemaPath+".then",p.errSchemaPath=e.errSchemaPath+"/then",n+=" "+e.validate(p)+" ",p.baseId=E,n+=" "+l+" = "+d+"; ",y&&g?n+=" var "+(b="ifClause"+o)+" = 'then'; ":b="'then'",n+=" } ",g&&(n+=" else { ")):n+=" if (!"+d+") { ",g&&(p.schema=e.schema.else,p.schemaPath=e.schemaPath+".else",p.errSchemaPath=e.errSchemaPath+"/else",n+=" "+e.validate(p)+" ",p.baseId=E,n+=" "+l+" = "+d+"; ",y&&g?n+=" var "+(b="ifClause"+o)+" = 'else'; ":b="'else'",n+=" } "),n+=" if (!"+l+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { failingKeyword: "+b+" } ",!1!==e.opts.messages&&(n+=" , message: 'should match \"' + "+b+" + '\" schema' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+=" } ",c&&(n+=" else { ")}else c&&(n+=" if (true) { ");return n}},{}],aiPb:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n=" ",o=e.level,a=e.dataLevel,i=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,f="data"+(a||""),l="valid"+o,h="errs__"+o,p=e.util.copy(e),d="";p.level++;var m="valid"+p.level,v="i"+o,y=p.dataLevel=e.dataLevel+1,g="data"+y,E=e.baseId;if(n+="var "+h+" = errors;var "+l+";",Array.isArray(i)){var b=e.schema.additionalItems;if(!1===b){n+=" "+l+" = "+f+".length <= "+i.length+"; ";var w=u;u=e.errSchemaPath+"/additionalItems",n+=" if (!"+l+") { ";var P=P||[];P.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+i.length+" } ",!1!==e.opts.messages&&(n+=" , message: 'should NOT have more than "+i.length+" items' "),e.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),n+=" } "):n+=" {} ";var O=n;n=P.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+O+"]); ":n+=" validate.errors = ["+O+"]; return false; ":n+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",u=w,c&&(d+="}",n+=" else { ")}var S=i;if(S)for(var R,I=-1,A=S.length-1;I<A;)if(R=S[I+=1],e.opts.strictKeywords?"object"==typeof R&&Object.keys(R).length>0||!1===R:e.util.schemaHasRules(R,e.RULES.all)){n+=" "+m+" = true; if ("+f+".length > "+I+") { ";var _=f+"["+I+"]";p.schema=R,p.schemaPath=s+"["+I+"]",p.errSchemaPath=u+"/"+I,p.errorPath=e.util.getPathExpr(e.errorPath,I,e.opts.jsonPointers,!0),p.dataPathArr[y]=I;var T=e.validate(p);p.baseId=E,e.util.varOccurences(T,g)<2?n+=" "+e.util.varReplace(T,g,_)+" ":n+=" var "+g+" = "+_+"; "+T+" ",n+=" } ",c&&(n+=" if ("+m+") { ",d+="}")}"object"==typeof b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))&&(p.schema=b,p.schemaPath=e.schemaPath+".additionalItems",p.errSchemaPath=e.errSchemaPath+"/additionalItems",n+=" "+m+" = true; if ("+f+".length > "+i.length+") { for (var "+v+" = "+i.length+"; "+v+" < "+f+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0),_=f+"["+v+"]",p.dataPathArr[y]=v,T=e.validate(p),p.baseId=E,e.util.varOccurences(T,g)<2?n+=" "+e.util.varReplace(T,g,_)+" ":n+=" var "+g+" = "+_+"; "+T+" ",c&&(n+=" if (!"+m+") break; "),n+=" } } ",c&&(n+=" if ("+m+") { ",d+="}"))}else(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all))&&(p.schema=i,p.schemaPath=s,p.errSchemaPath=u,n+=" for (var "+v+" = 0; "+v+" < "+f+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0),_=f+"["+v+"]",p.dataPathArr[y]=v,T=e.validate(p),p.baseId=E,e.util.varOccurences(T,g)<2?n+=" "+e.util.varReplace(T,g,_)+" ":n+=" var "+g+" = "+_+"; "+T+" ",c&&(n+=" if (!"+m+") break; "),n+=" }");return c&&(n+=" "+d+" if ("+h+" == errors) {"),n}},{}],UJAl:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n,o=" ",a=e.level,i=e.dataLevel,s=e.schema[t],u=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,f=!e.opts.allErrors,l="data"+(i||""),h=e.opts.$data&&s&&s.$data;h?(o+=" var schema"+a+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",n="schema"+a):n=s;var p="maximum"==t,d=p?"exclusiveMaximum":"exclusiveMinimum",m=e.schema[d],v=e.opts.$data&&m&&m.$data,y=p?"<":">",g=p?">":"<",E=void 0;if(!h&&"number"!=typeof s&&void 0!==s)throw new Error(t+" must be number");if(!v&&void 0!==m&&"number"!=typeof m&&"boolean"!=typeof m)throw new Error(d+" must be number or boolean");if(v){var b,w=e.util.getData(m.$data,i,e.dataPathArr),P="exclusive"+a,O="exclType"+a,S="exclIsNumber"+a,R="' + "+(A="op"+a)+" + '";o+=" var schemaExcl"+a+" = "+w+"; ",o+=" var "+P+"; var "+O+" = typeof "+(w="schemaExcl"+a)+"; if ("+O+" != 'boolean' && "+O+" != 'undefined' && "+O+" != 'number') { ",E=d,(b=b||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(E||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(o+=" , message: '"+d+" should be boolean' "),e.opts.verbose&&(o+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),o+=" } "):o+=" {} ";var I=o;o=b.pop(),!e.compositeRule&&f?e.async?o+=" throw new ValidationError(["+I+"]); ":o+=" validate.errors = ["+I+"]; return false; ":o+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else if ( ",h&&(o+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),o+=" "+O+" == 'number' ? ( ("+P+" = "+n+" === undefined || "+w+" "+y+"= "+n+") ? "+l+" "+g+"= "+w+" : "+l+" "+g+" "+n+" ) : ( ("+P+" = "+w+" === true) ? "+l+" "+g+"= "+n+" : "+l+" "+g+" "+n+" ) || "+l+" !== "+l+") { var op"+a+" = "+P+" ? '"+y+"' : '"+y+"='; ",void 0===s&&(E=d,c=e.errSchemaPath+"/"+d,n=w,h=v)}else if(R=y,(S="number"==typeof m)&&h){var A="'"+R+"'";o+=" if ( ",h&&(o+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),o+=" ( "+n+" === undefined || "+m+" "+y+"= "+n+" ? "+l+" "+g+"= "+m+" : "+l+" "+g+" "+n+" ) || "+l+" !== "+l+") { "}else S&&void 0===s?(P=!0,E=d,c=e.errSchemaPath+"/"+d,n=m,g+="="):(S&&(n=Math[p?"min":"max"](m,s)),m===(!S||n)?(P=!0,E=d,c=e.errSchemaPath+"/"+d,g+="="):(P=!1,R+="=")),A="'"+R+"'",o+=" if ( ",h&&(o+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),o+=" "+l+" "+g+" "+n+" || "+l+" !== "+l+") { ";return E=E||t,(b=b||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(E||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+A+", limit: "+n+", exclusive: "+P+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be "+R+" ",o+=h?"' + "+n:n+"'"),e.opts.verbose&&(o+=" , schema: ",o+=h?"validate.schema"+u:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),o+=" } "):o+=" {} ",I=o,o=b.pop(),!e.compositeRule&&f?e.async?o+=" throw new ValidationError(["+I+"]); ":o+=" validate.errors = ["+I+"]; return false; ":o+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",f&&(o+=" else { "),o}},{}],W8ih:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n,o=" ",a=e.level,i=e.dataLevel,s=e.schema[t],u=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,f=!e.opts.allErrors,l="data"+(i||""),h=e.opts.$data&&s&&s.$data;if(h?(o+=" var schema"+a+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",n="schema"+a):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");o+="if ( ",h&&(o+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),o+=" "+l+".length "+("maxItems"==t?">":"<")+" "+n+") { ";var p=t,d=d||[];d.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxItems"==t?"more":"fewer",o+=" than ",o+=h?"' + "+n+" + '":""+s,o+=" items' "),e.opts.verbose&&(o+=" , schema: ",o+=h?"validate.schema"+u:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),o+=" } "):o+=" {} ";var m=o;return o=d.pop(),!e.compositeRule&&f?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",f&&(o+=" else { "),o}},{}],fZGX:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n,o=" ",a=e.level,i=e.dataLevel,s=e.schema[t],u=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,f=!e.opts.allErrors,l="data"+(i||""),h=e.opts.$data&&s&&s.$data;if(h?(o+=" var schema"+a+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",n="schema"+a):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");var p="maxLength"==t?">":"<";o+="if ( ",h&&(o+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),!1===e.opts.unicode?o+=" "+l+".length ":o+=" ucs2length("+l+") ",o+=" "+p+" "+n+") { ";var d=t,m=m||[];m.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(d||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT be ",o+="maxLength"==t?"longer":"shorter",o+=" than ",o+=h?"' + "+n+" + '":""+s,o+=" characters' "),e.opts.verbose&&(o+=" , schema: ",o+=h?"validate.schema"+u:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),o+=" } "):o+=" {} ";var v=o;return o=m.pop(),!e.compositeRule&&f?e.async?o+=" throw new ValidationError(["+v+"]); ":o+=" validate.errors = ["+v+"]; return false; ":o+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",f&&(o+=" else { "),o}},{}],JAEr:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n,o=" ",a=e.level,i=e.dataLevel,s=e.schema[t],u=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,f=!e.opts.allErrors,l="data"+(i||""),h=e.opts.$data&&s&&s.$data;if(h?(o+=" var schema"+a+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",n="schema"+a):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");o+="if ( ",h&&(o+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),o+=" Object.keys("+l+").length "+("maxProperties"==t?">":"<")+" "+n+") { ";var p=t,d=d||[];d.push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have ",o+="maxProperties"==t?"more":"fewer",o+=" than ",o+=h?"' + "+n+" + '":""+s,o+=" properties' "),e.opts.verbose&&(o+=" , schema: ",o+=h?"validate.schema"+u:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),o+=" } "):o+=" {} ";var m=o;return o=d.pop(),!e.compositeRule&&f?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",f&&(o+=" else { "),o}},{}],oNPH:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n,o=" ",a=e.level,i=e.dataLevel,s=e.schema[t],u=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,f=!e.opts.allErrors,l="data"+(i||""),h=e.opts.$data&&s&&s.$data;if(h?(o+=" var schema"+a+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",n="schema"+a):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");o+="var division"+a+";if (",h&&(o+=" "+n+" !== undefined && ( typeof "+n+" != 'number' || "),o+=" (division"+a+" = "+l+" / "+n+", ",e.opts.multipleOfPrecision?o+=" Math.abs(Math.round(division"+a+") - division"+a+") > 1e-"+e.opts.multipleOfPrecision+" ":o+=" division"+a+" !== parseInt(division"+a+") ",o+=" ) ",h&&(o+=" ) "),o+=" ) { ";var p=p||[];p.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+n+" } ",!1!==e.opts.messages&&(o+=" , message: 'should be multiple of ",o+=h?"' + "+n:n+"'"),e.opts.verbose&&(o+=" , schema: ",o+=h?"validate.schema"+u:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),o+=" } "):o+=" {} ";var d=o;return o=p.pop(),!e.compositeRule&&f?e.async?o+=" throw new ValidationError(["+d+"]); ":o+=" validate.errors = ["+d+"]; return false; ":o+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",f&&(o+=" else { "),o}},{}],mmjm:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n=" ",o=e.level,a=e.dataLevel,i=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,f="data"+(a||""),l="errs__"+o,h=e.util.copy(e);h.level++;var p="valid"+h.level;if(e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){h.schema=i,h.schemaPath=s,h.errSchemaPath=u,n+=" var "+l+" = errors; ";var d,m=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.createErrors=!1,h.opts.allErrors&&(d=h.opts.allErrors,h.opts.allErrors=!1),n+=" "+e.validate(h)+" ",h.createErrors=!0,d&&(h.opts.allErrors=d),e.compositeRule=h.compositeRule=m,n+=" if ("+p+") { ";var v=v||[];v.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should NOT be valid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),n+=" } "):n+=" {} ";var y=n;n=v.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+y+"]); ":n+=" validate.errors = ["+y+"]; return false; ":n+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { errors = "+l+"; if (vErrors !== null) { if ("+l+") vErrors.length = "+l+"; else vErrors = null; } ",e.opts.allErrors&&(n+=" } ")}else n+=" var err = ",!1!==e.createErrors?(n+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should NOT be valid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(n+=" if (false) { ");return n}},{}],SSWF:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n=" ",o=e.level,a=e.dataLevel,i=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,f="data"+(a||""),l="valid"+o,h="errs__"+o,p=e.util.copy(e),d="";p.level++;var m="valid"+p.level,v=p.baseId,y="prevValid"+o,g="passingSchemas"+o;n+="var "+h+" = errors , "+y+" = false , "+l+" = false , "+g+" = null; ";var E=e.compositeRule;e.compositeRule=p.compositeRule=!0;var b=i;if(b)for(var w,P=-1,O=b.length-1;P<O;)w=b[P+=1],(e.opts.strictKeywords?"object"==typeof w&&Object.keys(w).length>0||!1===w:e.util.schemaHasRules(w,e.RULES.all))?(p.schema=w,p.schemaPath=s+"["+P+"]",p.errSchemaPath=u+"/"+P,n+=" "+e.validate(p)+" ",p.baseId=v):n+=" var "+m+" = true; ",P&&(n+=" if ("+m+" && "+y+") { "+l+" = false; "+g+" = ["+g+", "+P+"]; } else { ",d+="}"),n+=" if ("+m+") { "+l+" = "+y+" = true; "+g+" = "+P+"; }";return e.compositeRule=p.compositeRule=E,n+=d+"if (!"+l+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { passingSchemas: "+g+" } ",!1!==e.opts.messages&&(n+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+="} else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; }",e.opts.allErrors&&(n+=" } "),n}},{}],mGZS:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n,o=" ",a=e.level,i=e.dataLevel,s=e.schema[t],u=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,f=!e.opts.allErrors,l="data"+(i||""),h=e.opts.$data&&s&&s.$data;h?(o+=" var schema"+a+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",n="schema"+a):n=s,o+="if ( ",h&&(o+=" ("+n+" !== undefined && typeof "+n+" != 'string') || "),o+=" !"+(h?"(new RegExp("+n+"))":e.usePattern(s))+".test("+l+") ) { ";var p=p||[];p.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { pattern: ",o+=h?""+n:""+e.util.toQuotedString(s),o+=" } ",!1!==e.opts.messages&&(o+=" , message: 'should match pattern \"",o+=h?"' + "+n+" + '":""+e.util.escapeQuotes(s),o+="\"' "),e.opts.verbose&&(o+=" , schema: ",o+=h?"validate.schema"+u:""+e.util.toQuotedString(s),o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),o+=" } "):o+=" {} ";var d=o;return o=p.pop(),!e.compositeRule&&f?e.async?o+=" throw new ValidationError(["+d+"]); ":o+=" validate.errors = ["+d+"]; return false; ":o+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",f&&(o+=" else { "),o}},{}],jFnx:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n=" ",o=e.level,a=e.dataLevel,i=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,f="data"+(a||""),l="errs__"+o,h=e.util.copy(e),p="";h.level++;var d="valid"+h.level,m="key"+o,v="idx"+o,y=h.dataLevel=e.dataLevel+1,g="data"+y,E="dataProperties"+o,b=Object.keys(i||{}).filter(j),w=e.schema.patternProperties||{},P=Object.keys(w).filter(j),O=e.schema.additionalProperties,S=b.length||P.length,R=!1===O,I="object"==typeof O&&Object.keys(O).length,A=e.opts.removeAdditional,_=R||I||A,T=e.opts.ownProperties,D=e.baseId,N=e.schema.required;if(N&&(!e.opts.$data||!N.$data)&&N.length<e.opts.loopRequired)var x=e.util.toHash(N);function j(e){return"__proto__"!==e}if(n+="var "+l+" = errors;var "+d+" = true;",T&&(n+=" var "+E+" = undefined;"),_){if(n+=T?" "+E+" = "+E+" || Object.keys("+f+"); for (var "+v+"=0; "+v+"<"+E+".length; "+v+"++) { var "+m+" = "+E+"["+v+"]; ":" for (var "+m+" in "+f+") { ",S){if(n+=" var isAdditional"+o+" = !(false ",b.length)if(b.length>8)n+=" || validate.schema"+s+".hasOwnProperty("+m+") ";else{var F=b;if(F)for(var C=-1,L=F.length-1;C<L;)X=F[C+=1],n+=" || "+m+" == "+e.util.toQuotedString(X)+" "}if(P.length){var k=P;if(k)for(var B=-1,M=k.length-1;B<M;)ae=k[B+=1],n+=" || "+e.usePattern(ae)+".test("+m+") "}n+=" ); if (isAdditional"+o+") { "}if("all"==A)n+=" delete "+f+"["+m+"]; ";else{var U=e.errorPath,$="' + "+m+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers)),R)if(A)n+=" delete "+f+"["+m+"]; ";else{n+=" "+d+" = false; ";var q=u;u=e.errSchemaPath+"/additionalProperties",(re=re||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { additionalProperty: '"+$+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is an invalid additional property":n+="should NOT have additional properties",n+="' "),e.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),n+=" } "):n+=" {} ";var Y=n;n=re.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+Y+"]); ":n+=" validate.errors = ["+Y+"]; return false; ":n+=" var err = "+Y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u=q,c&&(n+=" break; ")}else if(I)if("failing"==A){n+=" var "+l+" = errors; ";var V=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.schema=O,h.schemaPath=e.schemaPath+".additionalProperties",h.errSchemaPath=e.errSchemaPath+"/additionalProperties",h.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var z=f+"["+m+"]";h.dataPathArr[y]=m;var K=e.validate(h);h.baseId=D,e.util.varOccurences(K,g)<2?n+=" "+e.util.varReplace(K,g,z)+" ":n+=" var "+g+" = "+z+"; "+K+" ",n+=" if (!"+d+") { errors = "+l+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+f+"["+m+"]; } ",e.compositeRule=h.compositeRule=V}else h.schema=O,h.schemaPath=e.schemaPath+".additionalProperties",h.errSchemaPath=e.errSchemaPath+"/additionalProperties",h.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers),z=f+"["+m+"]",h.dataPathArr[y]=m,K=e.validate(h),h.baseId=D,e.util.varOccurences(K,g)<2?n+=" "+e.util.varReplace(K,g,z)+" ":n+=" var "+g+" = "+z+"; "+K+" ",c&&(n+=" if (!"+d+") break; ");e.errorPath=U}S&&(n+=" } "),n+=" } ",c&&(n+=" if ("+d+") { ",p+="}")}var H=e.opts.useDefaults&&!e.compositeRule;if(b.length){var Q=b;if(Q)for(var X,J=-1,G=Q.length-1;J<G;){var W=i[X=Q[J+=1]];if(e.opts.strictKeywords?"object"==typeof W&&Object.keys(W).length>0||!1===W:e.util.schemaHasRules(W,e.RULES.all)){var Z=e.util.getProperty(X),ee=(z=f+Z,H&&void 0!==W.default);if(h.schema=W,h.schemaPath=s+Z,h.errSchemaPath=u+"/"+e.util.escapeFragment(X),h.errorPath=e.util.getPath(e.errorPath,X,e.opts.jsonPointers),h.dataPathArr[y]=e.util.toQuotedString(X),K=e.validate(h),h.baseId=D,e.util.varOccurences(K,g)<2){K=e.util.varReplace(K,g,z);var te=z}else te=g,n+=" var "+g+" = "+z+"; ";if(ee)n+=" "+K+" ";else{if(x&&x[X]){n+=" if ( "+te+" === undefined ",T&&(n+=" || ! Object.prototype.hasOwnProperty.call("+f+", '"+e.util.escapeQuotes(X)+"') "),n+=") { "+d+" = false; ",U=e.errorPath,q=u;var re,ne=e.util.escapeQuotes(X);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(U,X,e.opts.jsonPointers)),u=e.errSchemaPath+"/required",(re=re||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+ne+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+ne+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),n+=" } "):n+=" {} ",Y=n,n=re.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+Y+"]); ":n+=" validate.errors = ["+Y+"]; return false; ":n+=" var err = "+Y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u=q,e.errorPath=U,n+=" } else { "}else c?(n+=" if ( "+te+" === undefined ",T&&(n+=" || ! Object.prototype.hasOwnProperty.call("+f+", '"+e.util.escapeQuotes(X)+"') "),n+=") { "+d+" = true; } else { "):(n+=" if ("+te+" !== undefined ",T&&(n+=" && Object.prototype.hasOwnProperty.call("+f+", '"+e.util.escapeQuotes(X)+"') "),n+=" ) { ");n+=" "+K+" } "}}c&&(n+=" if ("+d+") { ",p+="}")}}if(P.length){var oe=P;if(oe)for(var ae,ie=-1,se=oe.length-1;ie<se;)W=w[ae=oe[ie+=1]],(e.opts.strictKeywords?"object"==typeof W&&Object.keys(W).length>0||!1===W:e.util.schemaHasRules(W,e.RULES.all))&&(h.schema=W,h.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ae),h.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ae),n+=T?" "+E+" = "+E+" || Object.keys("+f+"); for (var "+v+"=0; "+v+"<"+E+".length; "+v+"++) { var "+m+" = "+E+"["+v+"]; ":" for (var "+m+" in "+f+") { ",n+=" if ("+e.usePattern(ae)+".test("+m+")) { ",h.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers),z=f+"["+m+"]",h.dataPathArr[y]=m,K=e.validate(h),h.baseId=D,e.util.varOccurences(K,g)<2?n+=" "+e.util.varReplace(K,g,z)+" ":n+=" var "+g+" = "+z+"; "+K+" ",c&&(n+=" if (!"+d+") break; "),n+=" } ",c&&(n+=" else "+d+" = true; "),n+=" } ",c&&(n+=" if ("+d+") { ",p+="}"))}return c&&(n+=" "+p+" if ("+l+" == errors) {"),n}},{}],XxjR:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n=" ",o=e.level,a=e.dataLevel,i=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,f="data"+(a||""),l="errs__"+o,h=e.util.copy(e);h.level++;var p="valid"+h.level;if(n+="var "+l+" = errors;",e.opts.strictKeywords?"object"==typeof i&&Object.keys(i).length>0||!1===i:e.util.schemaHasRules(i,e.RULES.all)){h.schema=i,h.schemaPath=s,h.errSchemaPath=u;var d="key"+o,m="idx"+o,v="i"+o,y="' + "+d+" + '",g="data"+(h.dataLevel=e.dataLevel+1),E="dataProperties"+o,b=e.opts.ownProperties,w=e.baseId;b&&(n+=" var "+E+" = undefined; "),n+=b?" "+E+" = "+E+" || Object.keys("+f+"); for (var "+m+"=0; "+m+"<"+E+".length; "+m+"++) { var "+d+" = "+E+"["+m+"]; ":" for (var "+d+" in "+f+") { ",n+=" var startErrs"+o+" = errors; ";var P=d,O=e.compositeRule;e.compositeRule=h.compositeRule=!0;var S=e.validate(h);h.baseId=w,e.util.varOccurences(S,g)<2?n+=" "+e.util.varReplace(S,g,P)+" ":n+=" var "+g+" = "+P+"; "+S+" ",e.compositeRule=h.compositeRule=O,n+=" if (!"+p+") { for (var "+v+"=startErrs"+o+"; "+v+"<errors; "+v+"++) { vErrors["+v+"].propertyName = "+d+"; } var err = ",!1!==e.createErrors?(n+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { propertyName: '"+y+"' } ",!1!==e.opts.messages&&(n+=" , message: 'property name \\'"+y+"\\' is invalid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),c&&(n+=" break; "),n+=" } }"}return c&&(n+=" if ("+l+" == errors) {"),n}},{}],Dht1:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n=" ",o=e.level,a=e.dataLevel,i=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,f="data"+(a||""),l="valid"+o,h=e.opts.$data&&i&&i.$data;h&&(n+=" var schema"+o+" = "+e.util.getData(i.$data,a,e.dataPathArr)+"; ");var p="schema"+o;if(!h)if(i.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var d=[],m=i;if(m)for(var v,y=-1,g=m.length-1;y<g;){v=m[y+=1];var E=e.schema.properties[v];E&&(e.opts.strictKeywords?"object"==typeof E&&Object.keys(E).length>0||!1===E:e.util.schemaHasRules(E,e.RULES.all))||(d[d.length]=v)}}else d=i;if(h||d.length){var b=e.errorPath,w=h||d.length>=e.opts.loopRequired,P=e.opts.ownProperties;if(c)if(n+=" var missing"+o+"; ",w){h||(n+=" var "+p+" = validate.schema"+s+"; ");var O="' + "+(T="schema"+o+"["+(A="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(b,T,e.opts.jsonPointers)),n+=" var "+l+" = true; ",h&&(n+=" if (schema"+o+" === undefined) "+l+" = true; else if (!Array.isArray(schema"+o+")) "+l+" = false; else {"),n+=" for (var "+A+" = 0; "+A+" < "+p+".length; "+A+"++) { "+l+" = "+f+"["+p+"["+A+"]] !== undefined ",P&&(n+=" && Object.prototype.hasOwnProperty.call("+f+", "+p+"["+A+"]) "),n+="; if (!"+l+") break; } ",h&&(n+=" } "),n+=" if (!"+l+") { ",(R=R||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+O+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+O+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),n+=" } "):n+=" {} ";var S=n;n=R.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+S+"]); ":n+=" validate.errors = ["+S+"]; return false; ":n+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { "}else{n+=" if ( ";var R,I=d;if(I)for(var A=-1,_=I.length-1;A<_;)N=I[A+=1],A&&(n+=" || "),n+=" ( ( "+(C=f+(F=e.util.getProperty(N)))+" === undefined ",P&&(n+=" || ! Object.prototype.hasOwnProperty.call("+f+", '"+e.util.escapeQuotes(N)+"') "),n+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?N:F)+") ) ";n+=") { ",O="' + "+(T="missing"+o)+" + '",e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(b,T,!0):b+" + "+T),(R=R||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+O+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+O+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),n+=" } "):n+=" {} ",S=n,n=R.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+S+"]); ":n+=" validate.errors = ["+S+"]; return false; ":n+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { "}else if(w){var T;h||(n+=" var "+p+" = validate.schema"+s+"; "),O="' + "+(T="schema"+o+"["+(A="i"+o)+"]")+" + '",e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(b,T,e.opts.jsonPointers)),h&&(n+=" if ("+p+" && !Array.isArray("+p+")) { var err = ",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+O+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+O+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+p+" !== undefined) { "),n+=" for (var "+A+" = 0; "+A+" < "+p+".length; "+A+"++) { if ("+f+"["+p+"["+A+"]] === undefined ",P&&(n+=" || ! Object.prototype.hasOwnProperty.call("+f+", "+p+"["+A+"]) "),n+=") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+O+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+O+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",h&&(n+=" } ")}else{var D=d;if(D)for(var N,x=-1,j=D.length-1;x<j;){N=D[x+=1];var F=e.util.getProperty(N),C=(O=e.util.escapeQuotes(N),f+F);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(b,N,e.opts.jsonPointers)),n+=" if ( "+C+" === undefined ",P&&(n+=" || ! Object.prototype.hasOwnProperty.call("+f+", '"+e.util.escapeQuotes(N)+"') "),n+=") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+O+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+O+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=b}else c&&(n+=" if (true) {");return n}},{}],mmFQ:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n,o=" ",a=e.level,i=e.dataLevel,s=e.schema[t],u=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,f=!e.opts.allErrors,l="data"+(i||""),h="valid"+a,p=e.opts.$data&&s&&s.$data;if(p?(o+=" var schema"+a+" = "+e.util.getData(s.$data,i,e.dataPathArr)+"; ",n="schema"+a):n=s,(s||p)&&!1!==e.opts.uniqueItems){p&&(o+=" var "+h+"; if ("+n+" === false || "+n+" === undefined) "+h+" = true; else if (typeof "+n+" != 'boolean') "+h+" = false; else { "),o+=" var i = "+l+".length , "+h+" = true , j; if (i > 1) { ";var d=e.schema.items&&e.schema.items.type,m=Array.isArray(d);if(!d||"object"==d||"array"==d||m&&(d.indexOf("object")>=0||d.indexOf("array")>=0))o+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+l+"[i], "+l+"[j])) { "+h+" = false; break outer; } } } ";else{o+=" var itemIndices = {}, item; for (;i--;) { var item = "+l+"[i]; ";var v="checkDataType"+(m?"s":"");o+=" if ("+e.util[v](d,"item",e.opts.strictNumbers,!0)+") continue; ",m&&(o+=" if (typeof item == 'string') item = '\"' + item; "),o+=" if (typeof itemIndices[item] == 'number') { "+h+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}o+=" } ",p&&(o+=" } "),o+=" if (!"+h+") { ";var y=y||[];y.push(o),o="",!1!==e.createErrors?(o+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(o+=" , schema: ",o+=p?"validate.schema"+u:""+s,o+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),o+=" } "):o+=" {} ";var g=o;o=y.pop(),!e.compositeRule&&f?e.async?o+=" throw new ValidationError(["+g+"]); ":o+=" validate.errors = ["+g+"]; return false; ":o+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",f&&(o+=" else { ")}else f&&(o+=" if (true) { ");return o}},{}],Czyc:[function(e,t,r){"use strict";t.exports={$ref:e("./ref"),allOf:e("./allOf"),anyOf:e("./anyOf"),$comment:e("./comment"),const:e("./const"),contains:e("./contains"),dependencies:e("./dependencies"),enum:e("./enum"),format:e("./format"),if:e("./if"),items:e("./items"),maximum:e("./_limit"),minimum:e("./_limit"),maxItems:e("./_limitItems"),minItems:e("./_limitItems"),maxLength:e("./_limitLength"),minLength:e("./_limitLength"),maxProperties:e("./_limitProperties"),minProperties:e("./_limitProperties"),multipleOf:e("./multipleOf"),not:e("./not"),oneOf:e("./oneOf"),pattern:e("./pattern"),properties:e("./properties"),propertyNames:e("./propertyNames"),required:e("./required"),uniqueItems:e("./uniqueItems"),validate:e("./validate")}},{"./ref":"a2na","./allOf":"hRgn","./anyOf":"lo6J","./comment":"Kkzr","./const":"U4sD","./contains":"EypH","./dependencies":"Cpp7","./enum":"fqDY","./format":"avoW","./if":"JHQ3","./items":"aiPb","./_limit":"UJAl","./_limitItems":"W8ih","./_limitLength":"fZGX","./_limitProperties":"JAEr","./multipleOf":"oNPH","./not":"mmjm","./oneOf":"SSWF","./pattern":"mGZS","./properties":"jFnx","./propertyNames":"XxjR","./required":"Dht1","./uniqueItems":"mmFQ","./validate":"yhC1"}],vBP0:[function(e,t,r){"use strict";var n=e("../dotjs"),o=e("./util").toHash;t.exports=function(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],t=["type","$comment"];return e.all=o(t),e.types=o(["number","integer","string","array","object","boolean","null"]),e.forEach((function(r){r.rules=r.rules.map((function(r){var o;if("object"==typeof r){var a=Object.keys(r)[0];o=r[a],r=a,o.forEach((function(r){t.push(r),e.all[r]=!0}))}return t.push(r),e.all[r]={keyword:r,code:n[r],implements:o}})),e.all.$comment={keyword:"$comment",code:n.$comment},r.type&&(e.types[r.type]=r)})),e.keywords=o(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),e.custom={},e}},{"../dotjs":"Czyc","./util":"Q1F7"}],BunE:[function(e,t,r){"use strict";var n=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];t.exports=function(e,t){for(var r=0;r<t.length;r++){e=JSON.parse(JSON.stringify(e));var o,a=t[r].split("/"),i=e;for(o=1;o<a.length;o++)i=i[a[o]];for(o=0;o<n.length;o++){var s=n[o],u=i[s];u&&(i[s]={anyOf:[u,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e}},{}],mNRF:[function(e,t,r){"use strict";var n=e("./error_classes").MissingRef;t.exports=function e(t,r,o){var a=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof r&&(o=r,r=void 0);var i=s(t).then((function(){var e=a._addSchema(t,void 0,r);return e.validate||function(e){try{return a._compile(e)}catch(t){if(t instanceof n)return function(t){var o=t.missingSchema;if(c(o))throw new Error("Schema "+o+" is loaded but "+t.missingRef+" cannot be resolved");var i=a._loadingSchemas[o];return i||(i=a._loadingSchemas[o]=a._opts.loadSchema(o)).then(u,u),i.then((function(e){if(!c(o))return s(e).then((function(){c(o)||a.addSchema(e,o,void 0,r)}))})).then((function(){return function e(t){try{return a._compile(t)}catch(o){if(o instanceof n)return function(n){var o=n.missingSchema;if(c(o))throw new Error("Schema "+o+" is loaded but "+n.missingRef+" cannot be resolved");var i=a._loadingSchemas[o];return i||(i=a._loadingSchemas[o]=a._opts.loadSchema(o)).then(u,u),i.then((function(e){if(!c(o))return s(e).then((function(){c(o)||a.addSchema(e,o,void 0,r)}))})).then((function(){return e(t)}));function u(){delete a._loadingSchemas[o]}function c(e){return a._refs[e]||a._schemas[e]}}(o);throw o}}(e)}));function u(){delete a._loadingSchemas[o]}function c(e){return a._refs[e]||a._schemas[e]}}(t);throw t}}(e)}));return o&&i.then((function(e){o(null,e)}),o),i;function s(t){var r=t.$schema;return r&&!a.getSchema(r)?e.call(a,{$ref:r},!0):Promise.resolve()}}},{"./error_classes":"OtNE"}],Mzku:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n,o,a=" ",i=e.level,s=e.dataLevel,u=e.schema[t],c=e.schemaPath+e.util.getProperty(t),f=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,h="data"+(s||""),p="valid"+i,d="errs__"+i,m=e.opts.$data&&u&&u.$data;m?(a+=" var schema"+i+" = "+e.util.getData(u.$data,s,e.dataPathArr)+"; ",o="schema"+i):o=u;var v,y,g,E,b,w="definition"+i,P=this.definition,O="";if(m&&P.$data){b="keywordValidate"+i;var S=P.validateSchema;a+=" var "+w+" = RULES.custom['"+t+"'].definition; var "+b+" = "+w+".validate;"}else{if(!(E=e.useCustomRule(this,u,e.schema,e)))return;o="validate.schema"+c,b=E.code,v=P.compile,y=P.inline,g=P.macro}var R=b+".errors",I="i"+i,A="ruleErr"+i,_=P.async;if(_&&!e.async)throw new Error("async keyword in sync schema");if(y||g||(a+=R+" = null;"),a+="var "+d+" = errors;var "+p+";",m&&P.$data&&(O+="}",a+=" if ("+o+" === undefined) { "+p+" = true; } else { ",S&&(O+="}",a+=" "+p+" = "+w+".validateSchema("+o+"); if ("+p+") { ")),y)P.statements?a+=" "+E.validate+" ":a+=" "+p+" = "+E.validate+"; ";else if(g){var T=e.util.copy(e);O="",T.level++;var D="valid"+T.level;T.schema=E.validate,T.schemaPath="";var N=e.compositeRule;e.compositeRule=T.compositeRule=!0;var x=e.validate(T).replace(/validate\.schema/g,b);e.compositeRule=T.compositeRule=N,a+=" "+x}else{(L=L||[]).push(a),a="",a+=" "+b+".call( ",e.opts.passContext?a+="this":a+="self",v||!1===P.schema?a+=" , "+h+" ":a+=" , "+o+" , "+h+" , validate.schema"+e.schemaPath+" ",a+=" , (dataPath || '')",'""'!=e.errorPath&&(a+=" + "+e.errorPath);var j=s?"data"+(s-1||""):"parentData",F=s?e.dataPathArr[s]:"parentDataProperty",C=a+=" , "+j+" , "+F+" , rootData ) ";a=L.pop(),!1===P.errors?(a+=" "+p+" = ",_&&(a+="await "),a+=C+"; "):a+=_?" var "+(R="customErrors"+i)+" = null; try { "+p+" = await "+C+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+R+" = e.errors; else throw e; } ":" "+R+" = null; "+p+" = "+C+"; "}if(P.modifying&&(a+=" if ("+j+") "+h+" = "+j+"["+F+"];"),a+=""+O,P.valid)l&&(a+=" if (true) { ");else{var L;a+=" if ( ",void 0===P.valid?(a+=" !",a+=g?""+D:""+p):a+=" "+!P.valid+" ",a+=") { ",n=this.keyword,(L=L||[]).push(a),a="",(L=L||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: '"+(n||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(a+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var k=a;a=L.pop(),!e.compositeRule&&l?e.async?a+=" throw new ValidationError(["+k+"]); ":a+=" validate.errors = ["+k+"]; return false; ":a+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var B=a;a=L.pop(),y?P.errors?"full"!=P.errors&&(a+=" for (var "+I+"="+d+"; "+I+"<errors; "+I+"++) { var "+A+" = vErrors["+I+"]; if ("+A+".dataPath === undefined) "+A+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+A+".schemaPath === undefined) { "+A+'.schemaPath = "'+f+'"; } ',e.opts.verbose&&(a+=" "+A+".schema = "+o+"; "+A+".data = "+h+"; "),a+=" } "):!1===P.errors?a+=" "+B+" ":(a+=" if ("+d+" == errors) { "+B+" } else { for (var "+I+"="+d+"; "+I+"<errors; "+I+"++) { var "+A+" = vErrors["+I+"]; if ("+A+".dataPath === undefined) "+A+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+A+".schemaPath === undefined) { "+A+'.schemaPath = "'+f+'"; } ',e.opts.verbose&&(a+=" "+A+".schema = "+o+"; "+A+".data = "+h+"; "),a+=" } } "):g?(a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: '"+(n||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(a+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&l&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; ")):!1===P.errors?a+=" "+B+" ":(a+=" if (Array.isArray("+R+")) { if (vErrors === null) vErrors = "+R+"; else vErrors = vErrors.concat("+R+"); errors = vErrors.length; for (var "+I+"="+d+"; "+I+"<errors; "+I+"++) { var "+A+" = vErrors["+I+"]; if ("+A+".dataPath === undefined) "+A+".dataPath = (dataPath || '') + "+e.errorPath+"; "+A+'.schemaPath = "'+f+'"; ',e.opts.verbose&&(a+=" "+A+".schema = "+o+"; "+A+".data = "+h+"; "),a+=" } } else { "+B+" } "),a+=" } ",l&&(a+=" else { ")}return a}},{}],ve7q:[function(e,t,r){t.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}},{}],GIYw:[function(e,t,r){"use strict";var n=e("./refs/json-schema-draft-07.json");t.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:n.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:n.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}},{"./refs/json-schema-draft-07.json":"ve7q"}],UVv5:[function(e,t,r){"use strict";var n=/^[a-z_$][a-z0-9_$-]*$/i,o=e("./dotjs/custom"),a=e("./definition_schema");t.exports={add:function(e,t){var r=this.RULES;if(r.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!n.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(t){this.validateKeyword(t,!0);var a=t.type;if(Array.isArray(a))for(var i=0;i<a.length;i++)u(e,a[i],t);else u(e,a,t);var s=t.metaSchema;s&&(t.$data&&this._opts.$data&&(s={anyOf:[s,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),t.validateSchema=this.compile(s,!0))}function u(e,t,n){for(var a,i=0;i<r.length;i++){var s=r[i];if(s.type==t){a=s;break}}a||(a={type:t,rules:[]},r.push(a));var u={keyword:e,definition:n,custom:!0,code:o,implements:n.implements};a.rules.push(u),r.custom[e]=u}return r.keywords[e]=r.all[e]=!0,this},get:function(e){var t=this.RULES.custom[e];return t?t.definition:this.RULES.keywords[e]||!1},remove:function(e){var t=this.RULES;delete t.keywords[e],delete t.all[e],delete t.custom[e];for(var r=0;r<t.length;r++)for(var n=t[r].rules,o=0;o<n.length;o++)if(n[o].keyword==e){n.splice(o,1);break}return this},validate:function e(t,r){e.errors=null;var n=this._validateKeyword=this._validateKeyword||this.compile(a,!0);if(n(t))return!0;if(e.errors=n.errors,r)throw new Error("custom keyword definition is invalid: "+this.errorsText(n.errors));return!1}}},{"./dotjs/custom":"Mzku","./definition_schema":"GIYw"}],xbmT:[function(e,t,r){t.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON Schema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}},{}],hi5j:[function(e,t,r){"use strict";var n=e("./compile"),o=e("./compile/resolve"),a=e("./cache"),i=e("./compile/schema_obj"),s=e("fast-json-stable-stringify"),u=e("./compile/formats"),c=e("./compile/rules"),f=e("./data"),l=e("./compile/util");t.exports=y,y.prototype.validate=function(e,t){var r;if("string"==typeof e){if(!(r=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var n=this._addSchema(e);r=n.validate||this._compile(n)}var o=r(t);return!0!==r.$async&&(this.errors=r.errors),o},y.prototype.compile=function(e,t){var r=this._addSchema(e,void 0,t);return r.validate||this._compile(r)},y.prototype.addSchema=function(e,t,r,n){if(Array.isArray(e)){for(var a=0;a<e.length;a++)this.addSchema(e[a],void 0,r,n);return this}var i=this._getId(e);if(void 0!==i&&"string"!=typeof i)throw new Error("schema id must be string");return O(this,t=o.normalizeId(t||i)),this._schemas[t]=this._addSchema(e,r,n,!0),this},y.prototype.addMetaSchema=function(e,t,r){return this.addSchema(e,t,r,!0),this},y.prototype.validateSchema=function(e,t){var r=e.$schema;if(void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(!(r=r||this._opts.defaultMeta||function(e){var t=e._opts.meta;return e._opts.defaultMeta="object"==typeof t?e._getId(t)||t:e.getSchema(d)?d:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var n=this.validate(r,e);if(!n&&t){var o="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(o);this.logger.error(o)}return n},y.prototype.getSchema=function(e){var t=g(this,e);switch(typeof t){case"object":return t.validate||this._compile(t);case"string":return this.getSchema(t);case"undefined":return function(e,t){var r=o.schema.call(e,{schema:{}},t);if(r){var a=r.schema,s=r.root,u=r.baseId,c=n.call(e,a,s,void 0,u);return e._fragments[t]=new i({ref:t,fragment:!0,schema:a,root:s,baseId:u,validate:c}),c}}(this,e)}},y.prototype.removeSchema=function(e){if(e instanceof RegExp)return E(this,this._schemas,e),E(this,this._refs,e),this;switch(typeof e){case"undefined":return E(this,this._schemas),E(this,this._refs),this._cache.clear(),this;case"string":var t=g(this,e);return t&&this._cache.del(t.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var r=this._opts.serialize,n=r?r(e):e;this._cache.del(n);var a=this._getId(e);a&&(a=o.normalizeId(a),delete this._schemas[a],delete this._refs[a])}return this},y.prototype.addFormat=function(e,t){return"string"==typeof t&&(t=new RegExp(t)),this._formats[e]=t,this},y.prototype.errorsText=function(e,t){if(!(e=e||this.errors))return"No errors";for(var r=void 0===(t=t||{}).separator?", ":t.separator,n=void 0===t.dataVar?"data":t.dataVar,o="",a=0;a<e.length;a++){var i=e[a];i&&(o+=n+i.dataPath+" "+i.message+r)}return o.slice(0,-r.length)},y.prototype._addSchema=function(e,t,r,n){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var a=this._opts.serialize,s=a?a(e):e,u=this._cache.get(s);if(u)return u;n=n||!1!==this._opts.addUsedSchema;var c=o.normalizeId(this._getId(e));c&&n&&O(this,c);var f,l=!1!==this._opts.validateSchema&&!t;l&&!(f=c&&c==o.normalizeId(e.$schema))&&this.validateSchema(e,!0);var h=o.ids.call(this,e),p=new i({id:c,schema:e,localRefs:h,cacheKey:s,meta:r});return"#"!=c[0]&&n&&(this._refs[c]=p),this._cache.put(s,p),l&&f&&this.validateSchema(e,!0),p},y.prototype._compile=function(e,t){if(e.compiling)return e.validate=a,a.schema=e.schema,a.errors=null,a.root=t||a,!0===e.schema.$async&&(a.$async=!0),a;var r,o;e.compiling=!0,e.meta&&(r=this._opts,this._opts=this._metaOpts);try{o=n.call(this,e.schema,t,e.localRefs)}catch(t){throw delete e.validate,t}finally{e.compiling=!1,e.meta&&(this._opts=r)}return e.validate=o,e.refs=o.refs,e.refVal=o.refVal,e.root=o.root,o;function a(){var t=e.validate,r=t.apply(this,arguments);return a.errors=t.errors,r}},y.prototype.compileAsync=e("./compile/async");var h=e("./keyword");y.prototype.addKeyword=h.add,y.prototype.getKeyword=h.get,y.prototype.removeKeyword=h.remove,y.prototype.validateKeyword=h.validate;var p=e("./compile/error_classes");y.ValidationError=p.Validation,y.MissingRefError=p.MissingRef,y.$dataMetaSchema=f;var d="http://json-schema.org/draft-07/schema",m=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],v=["/properties"];function y(t){if(!(this instanceof y))return new y(t);t=this._opts=l.copy(t)||{},function(e){var t=e._opts.logger;if(!1===t)e.logger={log:S,warn:S,error:S};else{if(void 0===t&&(t=console),!("object"==typeof t&&t.log&&t.warn&&t.error))throw new Error("logger must implement log, warn and error methods");e.logger=t}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=u(t.format),this._cache=t.cache||new a,this._loadingSchemas={},this._compilations=[],this.RULES=c(),this._getId=function(e){switch(e.schemaId){case"auto":return P;case"id":return b;default:return w}}(t),t.loopRequired=t.loopRequired||1/0,"property"==t.errorDataPath&&(t._errorDataPathProperty=!0),void 0===t.serialize&&(t.serialize=s),this._metaOpts=function(e){for(var t=l.copy(e._opts),r=0;r<m.length;r++)delete t[m[r]];return t}(this),t.formats&&function(e){for(var t in e._opts.formats){var r=e._opts.formats[t];e.addFormat(t,r)}}(this),t.keywords&&function(e){for(var t in e._opts.keywords){var r=e._opts.keywords[t];e.addKeyword(t,r)}}(this),function(t){var r;if(t._opts.$data&&(r=e("./refs/data.json"),t.addMetaSchema(r,r.$id,!0)),!1!==t._opts.meta){var n=e("./refs/json-schema-draft-07.json");t._opts.$data&&(n=f(n,v)),t.addMetaSchema(n,d,!0),t._refs["http://json-schema.org/schema"]=d}}(this),"object"==typeof t.meta&&this.addMetaSchema(t.meta),t.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var t=e._opts.schemas;if(t)if(Array.isArray(t))e.addSchema(t);else for(var r in t)e.addSchema(t[r],r)}(this)}function g(e,t){return t=o.normalizeId(t),e._schemas[t]||e._refs[t]||e._fragments[t]}function E(e,t,r){for(var n in t){var o=t[n];o.meta||r&&!r.test(n)||(e._cache.del(o.cacheKey),delete t[n])}}function b(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function w(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function P(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function O(e,t){if(e._schemas[t]||e._refs[t])throw new Error('schema with key or id "'+t+'" already exists')}function S(){}},{"./compile":"qdYs","./compile/resolve":"w10T","./cache":"fXCy","./compile/schema_obj":"HHLG","fast-json-stable-stringify":"Xb3N","./compile/formats":"dfAH","./compile/rules":"vBP0","./data":"BunE","./compile/util":"Q1F7","./compile/async":"mNRF","./keyword":"UVv5","./compile/error_classes":"OtNE","./refs/data.json":"xbmT","./refs/json-schema-draft-07.json":"ve7q"}],dhP9:[function(e,t,r){e("buffer").Buffer;var n=e("buffer").Buffer,o={Object:Object,Array:Array,Function:Function,Number:Number,String:String,Date:Date,RegExp:RegExp};t.exports=function e(t){return void 0!==n&&(o.Buffer=n),"undefined"!=typeof Promise&&(o.Promise=Promise),e.definition={compile:function(e){if("string"==typeof e){var t=r(e);return function(e){return e instanceof t}}var n=e.map(r);return function(e){for(var t=0;t<n.length;t++)if(e instanceof n[t])return!0;return!1}},CONSTRUCTORS:o,metaSchema:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},t.addKeyword("instanceof",e.definition),t;function r(e){var t=o[e];if(t)return t;throw new Error('invalid "instanceof" keyword value '+e)}}},{buffer:"dskh"}],uBCt:[function(e,t,r){"use strict";t.exports=function e(t){return e.definition={type:"number",macro:function(e,t){var r=e[0],n=e[1],o=t.exclusiveRange;return function(e,t,r){if(void 0!==r&&"boolean"!=typeof r)throw new Error("Invalid schema for exclusiveRange keyword, should be boolean");if(e>t||r&&e==t)throw new Error("There are no numbers in range")}(r,n,o),!0===o?{exclusiveMinimum:r,exclusiveMaximum:n}:{minimum:r,maximum:n}},metaSchema:{type:"array",minItems:2,maxItems:2,items:{type:"number"}}},t.addKeyword("range",e.definition),t.addKeyword("exclusiveRange"),t}},{}],AtCq:[function(e,t,r){"use strict";t.exports=function e(t){return e.definition={type:"string",inline:function(e,t,r){return function(){try{if("object"==typeof r)return new RegExp(r.pattern,r.flags);var e=r.match(/^\/(.*)\/([gimuy]*)$/);if(e)return new RegExp(e[1],e[2]);throw new Error("cannot parse string into RegExp")}catch(e){throw console.error("regular expression",r,"is invalid"),e}}()+".test(data"+(e.dataLevel||"")+")"},metaSchema:{type:["string","object"],properties:{pattern:{type:"string"},flags:{type:"string"}},required:["pattern"],additionalProperties:!1}},t.addKeyword("regexp",e.definition),t}},{}],yoml:[function(e,t,r){"use strict";var n=["undefined","string","number","object","function","boolean","symbol"];t.exports=function e(t){return e.definition={inline:function(e,t,r){var n="data"+(e.dataLevel||"");return"string"==typeof r?"typeof "+n+' == "'+r+'"':(r="validate.schema"+e.schemaPath+"."+t)+".indexOf(typeof "+n+") >= 0"},metaSchema:{anyOf:[{type:"string",enum:n},{type:"array",items:{type:"string",enum:n}}]}},t.addKeyword("typeof",e.definition),t}},{}],FbE8:[function(e,t,r){"use strict";var n={},o={timestamp:function(){return Date.now()},datetime:function(){return(new Date).toISOString()},date:function(){return(new Date).toISOString().slice(0,10)},time:function(){return(new Date).toISOString().slice(11)},random:function(){return Math.random()},randomint:function(e){var t=e&&e.max||2;return function(){return Math.floor(Math.random()*t)}},seq:function(e){var t=e&&e.name||"";return n[t]=n[t]||0,function(){return n[t]++}}};t.exports=function e(t){return e.definition={compile:function(e,t,n){var o={};for(var a in e){var i=e[a],s=r("string"==typeof i?i:i.func);o[a]=s.length?s(i.args):s}return n.opts.useDefaults&&!n.compositeRule?function(t){for(var r in e)void 0!==t[r]&&("empty"!=n.opts.useDefaults||null!==t[r]&&""!==t[r])||(t[r]=o[r]());return!0}:function(){return!0}},DEFAULTS:o,metaSchema:{type:"object",additionalProperties:{type:["string","object"],additionalProperties:!1,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}}},t.addKeyword("dynamicDefaults",e.definition),t;function r(e){var t=o[e];if(t)return t;throw new Error('invalid "dynamicDefaults" keyword property value: '+e)}}},{}],CJDR:[function(e,t,r){"use strict";t.exports=function e(t){return e.definition={type:"object",macro:function(e,t){if(!e)return!0;var r=Object.keys(t.properties);return 0==r.length||{required:r}},metaSchema:{type:"boolean"},dependencies:["properties"]},t.addKeyword("allRequired",e.definition),t}},{}],n1DR:[function(e,t,r){"use strict";t.exports=function e(t){return e.definition={type:"object",macro:function(e){return 0==e.length||(1==e.length?{required:e}:{anyOf:e.map((function(e){return{required:[e]}}))})},metaSchema:{type:"array",items:{type:"string"}}},t.addKeyword("anyRequired",e.definition),t}},{}],XrCF:[function(e,t,r){"use strict";t.exports=function e(t){return e.definition={type:"object",macro:function(e){return 0==e.length||(1==e.length?{required:e}:{oneOf:e.map((function(e){return{required:[e]}}))})},metaSchema:{type:"array",items:{type:"string"}}},t.addKeyword("oneRequired",e.definition),t}},{}],MFGI:[function(e,t,r){"use strict";t.exports=function e(t){return e.definition={type:"object",macro:function(e){return 0==e.length||(1==e.length?{not:{required:e}}:{not:{anyOf:e.map((function(e){return{required:[e]}}))}})},metaSchema:{type:"array",items:{type:"string"}}},t.addKeyword("prohibited",e.definition),t}},{}],m7Ap:[function(e,t,r){"use strict";var n=["number","integer","string","boolean","null"];t.exports=function e(t){return e.definition={type:"array",compile:function(e,t,r){var o,a=r.util.equal,i=(o=t,e.map((function(e){var t=o.items&&o.items.properties,r=t&&t[e]&&t[e].type;return Array.isArray(r)?r.indexOf("object")<0&&r.indexOf("array")<0:n.indexOf(r)>=0})));return function(t){if(t.length>1)for(var r=0;r<e.length;r++){var n,o=e[r];if(i[r]){var s={};for(n=t.length;n--;)if(t[n]&&"object"==typeof t[n]){var u=t[n][o];if(!u||"object"!=typeof u){if("string"==typeof u&&(u='"'+u),s[u])return!1;s[u]=!0}}}else for(n=t.length;n--;)if(t[n]&&"object"==typeof t[n])for(var c=n;c--;)if(t[c]&&"object"==typeof t[c]&&a(t[n][o],t[c][o]))return!1}return!0}},metaSchema:{type:"array",items:{type:"string"}}},t.addKeyword("uniqueItemProperties",e.definition),t}},{}],R4Fp:[function(e,t,r){"use strict";t.exports={metaSchemaRef:function(e){var t=e._opts.defaultMeta;return"string"==typeof t?{$ref:t}:e.getSchema(n)?{$ref:n}:(console.warn("meta schema not defined"),{})}};var n="http://json-schema.org/draft-07/schema"},{}],kIuQ:[function(e,t,r){"use strict";var n=e("./_util");function o(e,t){for(var r=e.split("/"),n={},o=n,i=1;i<r.length;i++){var s=r[i],u=i==r.length-1;s=a(s);var c=o.properties={},f=void 0;if(/[0-9]+/.test(s)){var l=+s;for(f=o.items=[];l--;)f.push({})}o=u?t:{},c[s]=o,f&&f.push(o)}return n}function a(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}t.exports=function e(t){return e.definition={type:"object",macro:function(e){var t=[];for(var r in e)t.push(o(r,e[r]));return{allOf:t}},metaSchema:{type:"object",propertyNames:{type:"string",format:"json-pointer"},additionalProperties:n.metaSchemaRef(t)}},t.addKeyword("deepProperties",e.definition),t}},{"./_util":"R4Fp"}],KB8y:[function(e,t,r){"use strict";function n(e,t){var r="data"+(t||"");if(!e)return r;for(var n=r,o=e.split("/"),a=1;a<o.length;a++)n+=" && "+(r+=s(u(o[a])));return n}t.exports=function e(t){return e.definition={type:"object",inline:function(e,t,r){for(var o="",a=0;a<r.length;a++)a&&(o+=" && "),o+="("+n(r[a],e.dataLevel)+" !== undefined)";return o},metaSchema:{type:"array",items:{type:"string",format:"json-pointer"}}},t.addKeyword("deepRequired",e.definition),t};var o=/^[a-z$_][a-z$_0-9]*$/i,a=/^[0-9]+$/,i=/'|\\/g;function s(e){return a.test(e)?"["+e+"]":o.test(e)?"."+e:"['"+e.replace(i,"\\$&")+"']"}function u(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}},{}],KeB4:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n=" ",o=e.level,a=e.dataLevel,i=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,f="data"+(a||""),l="valid"+o;if(n+="var "+l+" = undefined;",!1===e.opts.format)return n+" "+l+" = true; ";var h=e.schema.format,p=e.opts.$data&&h.$data,d="";if(p)n+=" var "+(m="format"+o)+" = formats["+e.util.getData(h.$data,a,e.dataPathArr)+"] , "+(v="compare"+o)+" = "+m+" && "+m+".compare;";else{var m;if(!(m=e.formats[h])||!m.compare)return n+" "+l+" = true; ";var v="formats"+e.util.getProperty(h)+".compare"}var y,g,E="formatMaximum"==t,b="formatExclusive"+(E?"Maximum":"Minimum"),w=e.schema[b],P=e.opts.$data&&w&&w.$data,O=E?"<":">",S="result"+o,R=e.opts.$data&&i&&i.$data;if(R?(n+=" var schema"+o+" = "+e.util.getData(i.$data,a,e.dataPathArr)+"; ",y="schema"+o):y=i,P){var I=e.util.getData(w.$data,a,e.dataPathArr),A="exclusive"+o,_="' + "+(N="op"+o)+" + '";n+=" var schemaExcl"+o+" = "+I+"; ",n+=" if (typeof "+(I="schemaExcl"+o)+" != 'boolean' && "+I+" !== undefined) { "+l+" = false; ";var T=b;(g=g||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: '"+(T||"_formatExclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: '"+b+" should be boolean' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),n+=" } "):n+=" {} ";var D=n;n=g.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+D+"]); ":n+=" validate.errors = ["+D+"]; return false; ":n+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",c&&(d+="}",n+=" else { "),R&&(n+=" if ("+y+" === undefined) "+l+" = true; else if (typeof "+y+" != 'string') "+l+" = false; else { ",d+="}"),p&&(n+=" if (!"+v+") "+l+" = true; else { ",d+="}"),n+=" var "+S+" = "+v+"("+f+", ",n+=R?""+y:""+e.util.toQuotedString(i),n+=" ); if ("+S+" === undefined) "+l+" = false; var "+A+" = "+I+" === true; if ("+l+" === undefined) { "+l+" = "+A+" ? "+S+" "+O+" 0 : "+S+" "+O+"= 0; } if (!"+l+") var op"+o+" = "+A+" ? '"+O+"' : '"+O+"=';"}else{_=O,(A=!0===w)||(_+="=");var N="'"+_+"'";R&&(n+=" if ("+y+" === undefined) "+l+" = true; else if (typeof "+y+" != 'string') "+l+" = false; else { ",d+="}"),p&&(n+=" if (!"+v+") "+l+" = true; else { ",d+="}"),n+=" var "+S+" = "+v+"("+f+", ",n+=R?""+y:""+e.util.toQuotedString(i),n+=" ); if ("+S+" === undefined) "+l+" = false; if ("+l+" === undefined) "+l+" = "+S+" "+O,A||(n+="="),n+=" 0;"}return n+=d+"if (!"+l+") { ",T=t,(g=g||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: '"+(T||"_formatLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+N+", limit: ",n+=R?""+y:""+e.util.toQuotedString(i),n+=" , exclusive: "+A+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be "+_+' "',n+=R?"' + "+y+" + '":""+e.util.escapeQuotes(i),n+="\"' "),e.opts.verbose&&(n+=" , schema: ",n+=R?"validate.schema"+s:""+e.util.toQuotedString(i),n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),n+=" } "):n+=" {} ",D=n,n=g.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+D+"]); ":n+=" validate.errors = ["+D+"]; return false; ":n+=" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+"}"}},{}],mYD7:[function(e,t,r){"use strict";var n=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i,o=/t|\s/i,a={date:s,time:u,"date-time":function(e,t){if(e&&t){e=e.split(o),t=t.split(o);var r=s(e[0],t[0]);if(void 0!==r)return r||u(e[1],t[1])}}},i={type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};function s(e,t){if(e&&t)return e>t?1:e<t?-1:e===t?0:void 0}function u(e,t){if(e&&t&&(e=e.match(n),t=t.match(n),e&&t))return(e=e[1]+e[2]+e[3]+(e[4]||""))>(t=t[1]+t[2]+t[3]+(t[4]||""))?1:e<t?-1:e===t?0:void 0}t.exports=function(t){var r="format"+t;return function n(o){return n.definition={type:"string",inline:e("./dotjs/_formatLimit"),statements:!0,errors:"full",dependencies:["format"],metaSchema:{anyOf:[{type:"string"},i]}},o.addKeyword(r,n.definition),o.addKeyword("formatExclusive"+t,{dependencies:["format"+t],metaSchema:{anyOf:[{type:"boolean"},i]}}),function(e){var t=e._formats;for(var r in a){var n=t[r];("object"!=typeof n||n instanceof RegExp||!n.validate)&&(n=t[r]={validate:n}),n.compare||(n.compare=a[r])}}(o),o}}},{"./dotjs/_formatLimit":"KeB4"}],J927:[function(e,t,r){"use strict";t.exports=e("./_formatLimit")("Minimum")},{"./_formatLimit":"mYD7"}],dgLz:[function(e,t,r){"use strict";t.exports=e("./_formatLimit")("Maximum")},{"./_formatLimit":"mYD7"}],OTUE:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n=" ",o=e.level,a=e.dataLevel,i=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,f="data"+(a||""),l="valid"+o,h="key"+o,p="idx"+o,d="patternMatched"+o,m="dataProperties"+o,v="",y=e.opts.ownProperties;n+="var "+l+" = true;",y&&(n+=" var "+m+" = undefined;");var g=i;if(g)for(var E,b=-1,w=g.length-1;b<w;){E=g[b+=1],n+=" var "+d+" = false; ",n+=y?" "+m+" = "+m+" || Object.keys("+f+"); for (var "+p+"=0; "+p+"<"+m+".length; "+p+"++) { var "+h+" = "+m+"["+p+"]; ":" for (var "+h+" in "+f+") { ",n+=" "+d+" = "+e.usePattern(E)+".test("+h+"); if ("+d+") break; } ";var P=e.util.escapeQuotes(E);n+=" if (!"+d+") { "+l+" = false; var err = ",!1!==e.createErrors?(n+=" { keyword: 'patternRequired' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingPattern: '"+P+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should have property matching pattern \\'"+P+"\\'' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ",c&&(v+="}",n+=" else { ")}return n+""+v}},{}],u2zM:[function(e,t,r){"use strict";t.exports=function t(r){return t.definition={type:"object",inline:e("./dotjs/patternRequired"),statements:!0,errors:"full",metaSchema:{type:"array",items:{type:"string",format:"regex"},uniqueItems:!0}},r.addKeyword("patternRequired",t.definition),r}},{"./dotjs/patternRequired":"OTUE"}],mlCb:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n=" ",o=e.level,a=e.dataLevel,i=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,f="data"+(a||""),l="valid"+o,h="errs__"+o,p=e.util.copy(e),d="";p.level++;var m,v="valid"+p.level,y="ifPassed"+e.level,g=p.baseId;n+="var "+y+";";var E=i;if(E)for(var b,w=-1,P=E.length-1;w<P;){if(b=E[w+=1],w&&!m&&(n+=" if (!"+y+") { ",d+="}"),b.if&&(e.opts.strictKeywords?"object"==typeof b.if&&Object.keys(b.if).length>0:e.util.schemaHasRules(b.if,e.RULES.all))){n+=" var "+h+" = errors; ";var O=e.compositeRule;if(e.compositeRule=p.compositeRule=!0,p.createErrors=!1,p.schema=b.if,p.schemaPath=s+"["+w+"].if",p.errSchemaPath=u+"/"+w+"/if",n+=" "+e.validate(p)+" ",p.baseId=g,p.createErrors=!0,e.compositeRule=p.compositeRule=O,n+=" "+y+" = "+v+"; if ("+y+") { ","boolean"==typeof b.then){if(!1===b.then){(R=R||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'switch' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { caseIndex: "+w+" } ",!1!==e.opts.messages&&(n+=" , message: 'should pass \"switch\" keyword validation' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),n+=" } "):n+=" {} ";var S=n;n=R.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+S+"]); ":n+=" validate.errors = ["+S+"]; return false; ":n+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" var "+v+" = "+b.then+"; "}else p.schema=b.then,p.schemaPath=s+"["+w+"].then",p.errSchemaPath=u+"/"+w+"/then",n+=" "+e.validate(p)+" ",p.baseId=g;n+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } } "}else if(n+=" "+y+" = true; ","boolean"==typeof b.then){var R;if(!1===b.then)(R=R||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'switch' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { caseIndex: "+w+" } ",!1!==e.opts.messages&&(n+=" , message: 'should pass \"switch\" keyword validation' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),n+=" } "):n+=" {} ",S=n,n=R.pop(),!e.compositeRule&&c?e.async?n+=" throw new ValidationError(["+S+"]); ":n+=" validate.errors = ["+S+"]; return false; ":n+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";n+=" var "+v+" = "+b.then+"; "}else p.schema=b.then,p.schemaPath=s+"["+w+"].then",p.errSchemaPath=u+"/"+w+"/then",n+=" "+e.validate(p)+" ",p.baseId=g;m=b.continue}return n+(d+"var ")+l+" = "+v+";"}},{}],KC2b:[function(e,t,r){"use strict";var n=e("./_util");t.exports=function t(r){if(!r.RULES.keywords.switch||!r.RULES.keywords.if){var o=n.metaSchemaRef(r);return t.definition={inline:e("./dotjs/switch"),statements:!0,errors:"full",metaSchema:{type:"array",items:{required:["then"],properties:{if:o,then:{anyOf:[{type:"boolean"},o]},continue:{type:"boolean"}},additionalProperties:!1,dependencies:{continue:["if"]}}}},r.addKeyword("switch",t.definition),r}}},{"./_util":"R4Fp","./dotjs/switch":"mlCb"}],mwue:[function(e,t,r){"use strict";var n=e("./_util");t.exports=function e(t){if(!t._opts.$data)return console.warn("keyword select requires $data option"),t;var r=n.metaSchemaRef(t),o=[];return e.definition={validate:function e(t,r,n){if(void 0===n.selectCases)throw new Error('keyword "selectCases" is absent');var o=a(n,!1),i=o.cases[t];if(void 0===i&&(i=o.default),"boolean"==typeof i)return i;var s=i(r);return s||(e.errors=i.errors),s},$data:!0,metaSchema:{type:["string","number","boolean","null"]}},t.addKeyword("select",e.definition),t.addKeyword("selectCases",{compile:function(e,t){var r=a(t);for(var n in e)r.cases[n]=i(e[n]);return function(){return!0}},valid:!0,metaSchema:{type:"object",additionalProperties:r}}),t.addKeyword("selectDefault",{compile:function(e,t){return a(t).default=i(e),function(){return!0}},valid:!0,metaSchema:r}),t;function a(e,t){var r;return o.some((function(t){if(t.parentSchema===e)return r=t,!0})),r||!1===t||(r={parentSchema:e,cases:{},default:!0},o.push(r)),r}function i(e){return"boolean"==typeof e?e:t.compile(e)}}},{"./_util":"R4Fp"}],selR:[function(e,t,r){"use strict";t.exports=function e(t){var r={trimLeft:function(e){return e.replace(/^[\s]+/,"")},trimRight:function(e){return e.replace(/[\s]+$/,"")},trim:function(e){return e.trim()},toLowerCase:function(e){return e.toLowerCase()},toUpperCase:function(e){return e.toUpperCase()},toEnumCase:function(e,t){return t.hash[n(e)]||e}};return e.definition={type:"string",errors:!1,modifying:!0,valid:!0,compile:function(e,t){var o;if(-1!==e.indexOf("toEnumCase")){if(o={hash:{}},!t.enum)throw new Error('Missing enum. To use `transform:["toEnumCase"]`, `enum:[...]` is required.');for(var a=t.enum.length;a--;){var i=t.enum[a];if("string"==typeof i){var s=n(i);if(o.hash[s])throw new Error('Invalid enum uniqueness. To use `transform:["toEnumCase"]`, all values must be unique when case insensitive.');o.hash[s]=i}}}return function(t,n,a,i){if(a){for(var s=0,u=e.length;s<u;s++)t=r[e[s]](t,o);a[i]=t}}},metaSchema:{type:"array",items:{type:"string",enum:["trimLeft","trimRight","trim","toLowerCase","toUpperCase","toEnumCase"]}}},t.addKeyword("transform",e.definition),t;function n(e){return e.toLowerCase()}}},{}],KP4Q:[function(e,t,r){"use strict";t.exports={instanceof:e("./instanceof"),range:e("./range"),regexp:e("./regexp"),typeof:e("./typeof"),dynamicDefaults:e("./dynamicDefaults"),allRequired:e("./allRequired"),anyRequired:e("./anyRequired"),oneRequired:e("./oneRequired"),prohibited:e("./prohibited"),uniqueItemProperties:e("./uniqueItemProperties"),deepProperties:e("./deepProperties"),deepRequired:e("./deepRequired"),formatMinimum:e("./formatMinimum"),formatMaximum:e("./formatMaximum"),patternRequired:e("./patternRequired"),switch:e("./switch"),select:e("./select"),transform:e("./transform")}},{"./instanceof":"dhP9","./range":"uBCt","./regexp":"AtCq","./typeof":"yoml","./dynamicDefaults":"FbE8","./allRequired":"CJDR","./anyRequired":"n1DR","./oneRequired":"XrCF","./prohibited":"MFGI","./uniqueItemProperties":"m7Ap","./deepProperties":"kIuQ","./deepRequired":"KB8y","./formatMinimum":"J927","./formatMaximum":"dgLz","./patternRequired":"u2zM","./switch":"KC2b","./select":"mwue","./transform":"selR"}],n1A8:[function(e,t,r){"use strict";var n=e("./keywords");function o(e,t){if(Array.isArray(t)){for(var r=0;r<t.length;r++)a(t[r])(e);return e}if(t)return a(t)(e),e;for(t in n)a(t)(e);return e}function a(e){var t=n[e];if(!t)throw new Error("Unknown keyword "+e);return t}t.exports=o,o.get=a},{"./keywords":"KP4Q"}],STvH:[function(e,t,r){"use strict";function n(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||o(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(r,"__esModule",{value:!0}),r.validate=function(e,t,r){var o=[];if(Array.isArray(t)?((o=Array.from(t,(function(t){return h(e,t)}))).forEach((function(e,t){e.forEach((function e(r){r.dataPath="[".concat(t,"]").concat(r.dataPath),r.children&&r.children.forEach(e)}))})),o=o.reduce((function(e,t){return e.push.apply(e,n(t)),e}),[])):o=h(e,t),o.length>0)throw new s.default(o,e,r)},Object.defineProperty(r,"ValidationError",{enumerable:!0,get:function(){return s.default}});var i=u(e("./keywords/absolutePath")),s=u(e("./ValidationError"));function u(e){return e&&e.__esModule?e:{default:e}}var c=e("ajv"),f=e("ajv-keywords"),l=new c({allErrors:!0,verbose:!0,$data:!0});function h(e,t){var r=l.compile(e);return r(t)?[]:r.errors?function(e){var t,r=[],n=function(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=o(e))){var t=0,r=function(){};return{s:r,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,a,i=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw a}}}}(e);try{var a=function(){var e=t.value,n=e.dataPath,o=[];r=r.filter((function(e){return!e.dataPath.includes(n)||(e.children&&(o=o.concat(e.children.slice(0))),e.children=void 0,o.push(e),!1)})),o.length&&(e.children=o),r.push(e)};for(n.s();!(t=n.n()).done;)a()}catch(e){n.e(e)}finally{n.f()}return r}(r.errors):[]}f(l,["instanceof","formatMinimum","formatMaximum","patternRequired"]),(0,i.default)(l)},{"./keywords/absolutePath":"iIhC","./ValidationError":"ySUA",ajv:"hi5j","ajv-keywords":"n1A8"}],pA46:[function(e,t,r){"use strict";var n=e("./validate"),o=n.validate,a=n.ValidationError;t.exports={validate:o,ValidationError:a}},{"./validate":"STvH"}],t7hQ:[function(e,t,r){function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw a}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var a=e("schema-utils").validate;t.exports={validateOptions:function(e,t){a(t,e)},processOptions:function(e,t){for(var r={},o=0,a=Object.entries(t);o<a.length;o++){var i=n(a[o],2),s=i[0],u=i[1];r[s]=e[s],void 0===r[s]&&(r[s]=u.default),u.process&&(r[s]=u.process(r[s]))}return r}}},{"schema-utils":"pA46"}],uYXM:[function(e,t,r){t.exports={type:"object",properties:{filerDir:{type:"string"},shimsDir:{type:"string"},shimFs:{type:"boolean"},shimPath:{type:"boolean"},fsProvider:{type:"string"},fsProviderDir:{type:"string"}}}},{}],qUtu:[function(e,t,r){e("process");var n=e("process"),o=e("path"),a="<rootDir>",i=n.cwd();t.exports={filerDir:{process:function(e){return e?o.resolve(e.replace(a,i)):o.join(i,"node_modules","filer")}},shimsDir:{process:function(e){return e?o.resolve(e.replace(a,i)):o.join(i,"node_modules","filer","shims")}},fsProviderDir:{process:function(e){return e?o.resolve(e.replace(a,i)):o.join(i,"node_modules","filer","shims","providers")}},shimFs:{default:!0},shimPath:{default:!0},fsProvider:{default:"default"}}},{path:"UUq2",process:"pBGv"}],Ge14:[function(e,t,r){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=e("path"),i=e("./utils"),s="filer-webpack-plugin",u=e("./schema"),c=e("./processors");t.exports=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),i.validateOptions(t,u),this.options=i.processOptions(t,c)}return t=e,r=[{key:"apply",value:function(e){var t=this;e.hooks.normalModuleFactory.tap(s,(function(e){e.hooks.resolve.tap(s,(function(e){if("fsProvider"===e.request&&e.context===t.options.shimsDir)return t.resolveFsProvider(e);if(!e.context.startsWith(t.options.filerDir))switch(e.request){case"fs":if(!t.options.shimFs)return;return t.applyFsShim(e);case"path":if(!t.options.shimPath)return;return t.applyPathShim(e);default:return}}))}))}},{key:"resolveFsProvider",value:function(e){switch(this.options.fsProvider){case"default":e.request=a.join(this.options.fsProviderDir,"default.js");break;case"indexeddb":e.request=a.join(this.options.fsProviderDir,"indexeddb.js");break;case"memory":e.request=a.join(this.options.fsProviderDir,"memory.js");break;case"custom":e.request=a.join(this.options.fsProviderDir,"custom.js");break;default:throw new Error(["Invalid option for fsProvider.","fsProvider must be one of 'default', 'indexeddb', 'memory' or 'custom'.","If using a custom fsProvider, you must also provide the fsProviderDir option."].join(" "))}}},{key:"applyFsShim",value:function(e){e.request=a.join(this.options.shimsDir,"fs.js")}},{key:"applyPathShim",value:function(e){e.request=a.join(this.options.shimsDir,"path.js")}}],r&&o(t.prototype,r),f&&o(t,f),e;var t,r,f}()},{path:"UUq2","./utils":"t7hQ","./schema":"uYXM","./processors":"qUtu"}],Focm:[function(e,t,r){e("buffer").Buffer;var n=e("buffer").Buffer,o=null,a=null;t.exports=a={FileSystem:e("./filesystem/interface.js"),Buffer:n,Path:e("./path.js"),path:e("./path.js"),Errors:e("./errors.js"),Shell:e("./shell/shell.js"),FilerWebpackPlugin:e("./webpack-plugin")},Object.defineProperty(a,"fs",{enumerable:!0,get:function(){return o||(o=new a.FileSystem),o}})},{"./filesystem/interface.js":"GMi4","./path.js":"UzoP","./errors.js":"p8GN","./shell/shell.js":"D1Ra","./webpack-plugin":"Ge14",buffer:"dskh"}]},{},["Focm"]);var r={};r=function e(t,r,n){function o(i,s){if(!r[i]){if(!t[i]){var u=void 0;if(!s&&u)return u(i,!0);if(a)return a(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var f=r[i]={exports:{}};t[i][0].call(f.exports,(function(e){return o(t[i][1][e]||e)}),f,f.exports,e,t,r,n)}return r[i].exports}for(var a=void 0,i=0;i<n.length;i++)o(n[i]);return o}({1:[function(e,t,r){"use strict";r.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=function(e){var t,r,n,i=c(e),s=i[0],u=i[1],f=new a(3*(s+(n=u))/4-n),l=0,h=u>0?s-4:s;for(r=0;r<h;r+=4)t=o[e.charCodeAt(r)]<<18|o[e.charCodeAt(r+1)]<<12|o[e.charCodeAt(r+2)]<<6|o[e.charCodeAt(r+3)],f[l++]=t>>16&255,f[l++]=t>>8&255,f[l++]=255&t;return 2===u&&(t=o[e.charCodeAt(r)]<<2|o[e.charCodeAt(r+1)]>>4,f[l++]=255&t),1===u&&(t=o[e.charCodeAt(r)]<<10|o[e.charCodeAt(r+1)]<<4|o[e.charCodeAt(r+2)]>>2,f[l++]=t>>8&255,f[l++]=255&t),f},r.fromByteArray=function(e){for(var t,r=e.length,o=r%3,a=[],i=0,s=r-o;i<s;i+=16383)a.push(f(e,i,i+16383>s?s:i+16383));return 1===o?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),a.join("")};for(var n=[],o=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=i.length;s<u;++s)n[s]=i[s],o[i.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function f(e,t,r){for(var o,a,i=[],s=t;s<r;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),i.push(n[(a=o)>>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return i.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},{}],2:[function(e,t,r){(function(t){var n=e("base64-js"),o=e("ieee754");r.Buffer=t,r.SlowBuffer=function(e){return+e!=e&&(e=0),t.alloc(+e)},r.INSPECT_MAX_BYTES=50;var a=2147483647;function i(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=new Uint8Array(e);return r.__proto__=t.prototype,r}function t(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return s(e,t,r)}function s(e,r,n){if("string"==typeof e)return function(e,r){if("string"==typeof r&&""!==r||(r="utf8"),!t.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var n=0|h(e,r),o=i(n),a=o.write(e,r);return a!==n&&(o=o.slice(0,a)),o}(e,r);if(ArrayBuffer.isView(e))return f(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(M(e,ArrayBuffer)||e&&M(e.buffer,ArrayBuffer))return function(e,r,n){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(n||0))throw new RangeError('"length" is outside of buffer bounds');var o;return(o=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n)).__proto__=t.prototype,o}(e,r,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var o=e.valueOf&&e.valueOf();if(null!=o&&o!==e)return t.from(o,r,n);var a=function(e){if(t.isBuffer(e)){var r=0|l(e.length),n=i(r);return 0===n.length||e.copy(n,0,0,r),n}return void 0!==e.length?"number"!=typeof e.length||U(e.length)?i(0):f(e):"Buffer"===e.type&&Array.isArray(e.data)?f(e.data):void 0}(e);if(a)return a;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return t.from(e[Symbol.toPrimitive]("string"),r,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),i(e<0?0:0|l(e))}function f(e){for(var t=e.length<0?0:0|l(e.length),r=i(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function l(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function h(e,r){if(t.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||M(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,o=arguments.length>2&&!0===arguments[2];if(!o&&0===n)return 0;for(var a=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return L(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return k(e).length;default:if(a)return o?-1:L(e).length;r=(""+r).toLowerCase(),a=!0}}function p(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function d(e,r,n,o,a){if(0===e.length)return-1;if("string"==typeof n?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),U(n=+n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof r&&(r=t.from(r,o)),t.isBuffer(r))return 0===r.length?-1:m(e,r,n,o,a);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):m(e,[r],n,o,a);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,o){var a,i=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;i=2,s/=2,u/=2,r/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(o){var f=-1;for(a=r;a<s;a++)if(c(e,a)===c(t,-1===f?0:a-f)){if(-1===f&&(f=a),a-f+1===u)return f*i}else-1!==f&&(a-=a-f),f=-1}else for(r+u>s&&(r=s-u),a=r;a>=0;a--){for(var l=!0,h=0;h<u;h++)if(c(e,a+h)!==c(t,h)){l=!1;break}if(l)return a}return-1}function v(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var a=t.length;n>a/2&&(n=a/2);for(var i=0;i<n;++i){var s=parseInt(t.substr(2*i,2),16);if(U(s))return i;e[r+i]=s}return i}function y(e,t,r,n){return B(L(t,e.length-r),e,r,n)}function g(e,t,r,n){return B(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function E(e,t,r,n){return g(e,t,r,n)}function b(e,t,r,n){return B(k(t),e,r,n)}function w(e,t,r,n){return B(function(e,t){for(var r,n,o,a=[],i=0;i<e.length&&!((t-=2)<0);++i)n=(r=e.charCodeAt(i))>>8,o=r%256,a.push(o),a.push(n);return a}(t,e.length-r),e,r,n)}function P(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function O(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var a,i,s,u,c=e[o],f=null,l=c>239?4:c>223?3:c>191?2:1;if(o+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(a=e[o+1]))&&(u=(31&c)<<6|63&a)>127&&(f=u);break;case 3:a=e[o+1],i=e[o+2],128==(192&a)&&128==(192&i)&&(u=(15&c)<<12|(63&a)<<6|63&i)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:a=e[o+1],i=e[o+2],s=e[o+3],128==(192&a)&&128==(192&i)&&128==(192&s)&&(u=(15&c)<<18|(63&a)<<12|(63&i)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),o+=l}return function(e){var t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=S));return r}(n)}r.kMaxLength=a,t.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),t.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(t.prototype,"parent",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.buffer}}),Object.defineProperty(t.prototype,"offset",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),t.poolSize=8192,t.from=function(e,t,r){return s(e,t,r)},t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,t.alloc=function(e,t,r){return function(e,t,r){return u(e),e<=0?i(e):void 0!==t?"string"==typeof r?i(e).fill(t,r):i(e).fill(t):i(e)}(e,t,r)},t.allocUnsafe=function(e){return c(e)},t.allocUnsafeSlow=function(e){return c(e)},t.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==t.prototype},t.compare=function(e,r){if(M(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),M(r,Uint8Array)&&(r=t.from(r,r.offset,r.byteLength)),!t.isBuffer(e)||!t.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;for(var n=e.length,o=r.length,a=0,i=Math.min(n,o);a<i;++a)if(e[a]!==r[a]){n=e[a],o=r[a];break}return n<o?-1:o<n?1:0},t.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var o=t.allocUnsafe(r),a=0;for(n=0;n<e.length;++n){var i=e[n];if(M(i,Uint8Array)&&(i=t.from(i)),!t.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(o,a),a+=i.length}return o},t.byteLength=h,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)p(this,t,t+1);return this},t.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)p(this,t,t+3),p(this,t+1,t+2);return this},t.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)p(this,t,t+7),p(this,t+1,t+6),p(this,t+2,t+5),p(this,t+3,t+4);return this},t.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?O(this,0,e):function(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,r);case"utf8":case"utf-8":return O(this,t,r);case"ascii":return R(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return P(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},t.prototype.toLocaleString=t.prototype.toString,t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},t.prototype.compare=function(e,r,n,o,a){if(M(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),!t.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===o&&(o=0),void 0===a&&(a=this.length),r<0||n>e.length||o<0||a>this.length)throw new RangeError("out of range index");if(o>=a&&r>=n)return 0;if(o>=a)return-1;if(r>=n)return 1;if(this===e)return 0;for(var i=(a>>>=0)-(o>>>=0),s=(n>>>=0)-(r>>>=0),u=Math.min(i,s),c=this.slice(o,a),f=e.slice(r,n),l=0;l<u;++l)if(c[l]!==f[l]){i=c[l],s=f[l];break}return i<s?-1:s<i?1:0},t.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},t.prototype.indexOf=function(e,t,r){return d(this,e,t,r,!0)},t.prototype.lastIndexOf=function(e,t,r){return d(this,e,t,r,!1)},t.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return y(this,e,t,r);case"ascii":return g(this,e,t,r);case"latin1":case"binary":return E(this,e,t,r);case"base64":return b(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function R(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function I(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function A(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",a=t;a<r;++a)o+=C(e[a]);return o}function _(e,t,r){for(var n=e.slice(t,r),o="",a=0;a<n.length;a+=2)o+=String.fromCharCode(n[a]+256*n[a+1]);return o}function T(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function D(e,r,n,o,a,i){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>a||r<i)throw new RangeError('"value" argument is out of bounds');if(n+o>e.length)throw new RangeError("Index out of range")}function N(e,t,r,n,o,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function x(e,t,r,n,a){return t=+t,r>>>=0,a||N(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function j(e,t,r,n,a){return t=+t,r>>>=0,a||N(e,0,r,8),o.write(e,t,r,n,52,8),r+8}t.prototype.slice=function(e,r){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<e&&(r=e);var o=this.subarray(e,r);return o.__proto__=t.prototype,o},t.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);for(var n=this[e],o=1,a=0;++a<t&&(o*=256);)n+=this[e+a]*o;return n},t.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},t.prototype.readUInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),this[e]},t.prototype.readUInt16LE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]|this[e+1]<<8},t.prototype.readUInt16BE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]<<8|this[e+1]},t.prototype.readUInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},t.prototype.readUInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},t.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);for(var n=this[e],o=1,a=0;++a<t&&(o*=256);)n+=this[e+a]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},t.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);for(var n=t,o=1,a=this[e+--n];n>0&&(o*=256);)a+=this[e+--n]*o;return a>=(o*=128)&&(a-=Math.pow(2,8*t)),a},t.prototype.readInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},t.prototype.readInt16LE=function(e,t){e>>>=0,t||T(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt16BE=function(e,t){e>>>=0,t||T(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},t.prototype.readInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},t.prototype.readFloatLE=function(e,t){return e>>>=0,t||T(e,4,this.length),o.read(this,e,!0,23,4)},t.prototype.readFloatBE=function(e,t){return e>>>=0,t||T(e,4,this.length),o.read(this,e,!1,23,4)},t.prototype.readDoubleLE=function(e,t){return e>>>=0,t||T(e,8,this.length),o.read(this,e,!0,52,8)},t.prototype.readDoubleBE=function(e,t){return e>>>=0,t||T(e,8,this.length),o.read(this,e,!1,52,8)},t.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||D(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,a=0;for(this[t]=255&e;++a<r&&(o*=256);)this[t+a]=e/o&255;return t+r},t.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||D(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,a=1;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=e/a&255;return t+r},t.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,255,0),this[t]=255&e,t+1},t.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},t.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);D(this,e,t,r,o-1,-o)}var a=0,i=1,s=0;for(this[t]=255&e;++a<r&&(i*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/i>>0)-s&255;return t+r},t.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);D(this,e,t,r,o-1,-o)}var a=r-1,i=1,s=0;for(this[t+a]=255&e;--a>=0&&(i*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/i>>0)-s&255;return t+r},t.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},t.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},t.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeFloatLE=function(e,t,r){return x(this,e,t,!0,r)},t.prototype.writeFloatBE=function(e,t,r){return x(this,e,t,!1,r)},t.prototype.writeDoubleLE=function(e,t,r){return j(this,e,t,!0,r)},t.prototype.writeDoubleBE=function(e,t,r){return j(this,e,t,!1,r)},t.prototype.copy=function(e,r,n,o){if(!t.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),o||0===o||(o=this.length),r>=e.length&&(r=e.length),r||(r=0),o>0&&o<n&&(o=n),o===n)return 0;if(0===e.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-r<o-n&&(o=e.length-r+n);var a=o-n;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(r,n,o);else if(this===e&&n<r&&r<o)for(var i=a-1;i>=0;--i)e[i+r]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,o),r);return a},t.prototype.fill=function(e,r,n,o){if("string"==typeof e){if("string"==typeof r?(o=r,r=0,n=this.length):"string"==typeof n&&(o=n,n=this.length),void 0!==o&&"string"!=typeof o)throw new TypeError("encoding must be a string");if("string"==typeof o&&!t.isEncoding(o))throw new TypeError("Unknown encoding: "+o);if(1===e.length){var a=e.charCodeAt(0);("utf8"===o&&a<128||"latin1"===o)&&(e=a)}}else"number"==typeof e&&(e&=255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;var i;if(r>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=r;i<n;++i)this[i]=e;else{var s=t.isBuffer(e)?e:t.from(e,o),u=s.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-r;++i)this[i+r]=s[i%u]}return this};var F=/[^+\/0-9A-Za-z-_]/g;function C(e){return e<16?"0"+e.toString(16):e.toString(16)}function L(e,t){var r;t=t||1/0;for(var n=e.length,o=null,a=[],i=0;i<n;++i){if((r=e.charCodeAt(i))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(i+1===n){(t-=3)>-1&&a.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&a.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function k(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function M(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function U(e){return e!=e}}).call(this,e("buffer").Buffer)},{"base64-js":1,buffer:2,ieee754:3}],3:[function(e,t,r){r.read=function(e,t,r,n,o){var a,i,s=8*o-n-1,u=(1<<s)-1,c=u>>1,f=-7,l=r?o-1:0,h=r?-1:1,p=e[t+l];for(l+=h,a=p&(1<<-f)-1,p>>=-f,f+=s;f>0;a=256*a+e[t+l],l+=h,f-=8);for(i=a&(1<<-f)-1,a>>=-f,f+=n;f>0;i=256*i+e[t+l],l+=h,f-=8);if(0===a)a=1-c;else{if(a===u)return i?NaN:1/0*(p?-1:1);i+=Math.pow(2,n),a-=c}return(p?-1:1)*i*Math.pow(2,a-n)},r.write=function(e,t,r,n,o,a){var i,s,u,c=8*a-o-1,f=(1<<c)-1,l=f>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,i=f):(i=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-i))<1&&(i--,u*=2),(t+=i+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(i++,u/=2),i+l>=f?(s=0,i=f):i+l>=1?(s=(t*u-1)*Math.pow(2,o),i+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,o),i=0));o>=8;e[r+p]=255&s,p+=d,s/=256,o-=8);for(i=i<<o|s,c+=o;c>0;e[r+p]=255&i,p+=d,i/=256,c-=8);e[r+p-d]|=128*m}},{}],4:[function(e,t,r){(function(t){const n=e("base64-js"),o=e("ieee754"),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=t,r.SlowBuffer=function(e){return+e!=e&&(e=0),t.alloc(+e)},r.INSPECT_MAX_BYTES=50;const i=2147483647;function s(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');const r=new Uint8Array(e);return Object.setPrototypeOf(r,t.prototype),r}function t(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return u(e,t,r)}function u(e,r,n){if("string"==typeof e)return function(e,r){if("string"==typeof r&&""!==r||(r="utf8"),!t.isEncoding(r))throw new TypeError("Unknown encoding: "+r);const n=0|d(e,r);let o=s(n);const a=o.write(e,r);return a!==n&&(o=o.slice(0,a)),o}(e,r);if(ArrayBuffer.isView(e))return function(e){if(H(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return l(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(H(e,ArrayBuffer)||e&&H(e.buffer,ArrayBuffer))return h(e,r,n);if("undefined"!=typeof SharedArrayBuffer&&(H(e,SharedArrayBuffer)||e&&H(e.buffer,SharedArrayBuffer)))return h(e,r,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const o=e.valueOf&&e.valueOf();if(null!=o&&o!==e)return t.from(o,r,n);const a=function(e){if(t.isBuffer(e)){const t=0|p(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Q(e.length)?s(0):l(e):"Buffer"===e.type&&Array.isArray(e.data)?l(e.data):void 0}(e);if(a)return a;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return t.from(e[Symbol.toPrimitive]("string"),r,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return c(e),s(e<0?0:0|p(e))}function l(e){const t=e.length<0?0:0|p(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e,r,n){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(n||0))throw new RangeError('"length" is outside of buffer bounds');let o;return o=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n),Object.setPrototypeOf(o,t.prototype),o}function p(e){if(e>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function d(e,r){if(t.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||H(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,o=arguments.length>2&&!0===arguments[2];if(!o&&0===n)return 0;let a=!1;for(;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(a)return o?-1:V(e).length;r=(""+r).toLowerCase(),a=!0}}function m(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function v(e,r,n,o,a){if(0===e.length)return-1;if("string"==typeof n?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Q(n=+n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof r&&(r=t.from(r,o)),t.isBuffer(r))return 0===r.length?-1:y(e,r,n,o,a);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):y(e,[r],n,o,a);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,o){let a,i=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;i=2,s/=2,u/=2,r/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(o){let n=-1;for(a=r;a<s;a++)if(c(e,a)===c(t,-1===n?0:a-n)){if(-1===n&&(n=a),a-n+1===u)return n*i}else-1!==n&&(a-=a-n),n=-1}else for(r+u>s&&(r=s-u),a=r;a>=0;a--){let r=!0;for(let n=0;n<u;n++)if(c(e,a+n)!==c(t,n)){r=!1;break}if(r)return a}return-1}function g(e,t,r,n){r=Number(r)||0;const o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;const a=t.length;let i;for(n>a/2&&(n=a/2),i=0;i<n;++i){const n=parseInt(t.substr(2*i,2),16);if(Q(n))return i;e[r+i]=n}return i}function E(e,t,r,n){return K(V(t,e.length-r),e,r,n)}function b(e,t,r,n){return K(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function w(e,t,r,n){return K(z(t),e,r,n)}function P(e,t,r,n){return K(function(e,t){let r,n,o;const a=[];for(let i=0;i<e.length&&!((t-=2)<0);++i)r=e.charCodeAt(i),n=r>>8,o=r%256,a.push(o),a.push(n);return a}(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function S(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o<r;){const t=e[o];let a=null,i=t>239?4:t>223?3:t>191?2:1;if(o+i<=r){let r,n,s,u;switch(i){case 1:t<128&&(a=t);break;case 2:128==(192&(r=e[o+1]))&&(u=(31&t)<<6|63&r)>127&&(a=u);break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n)>2047&&(u<55296||u>57343)&&(a=u);break;case 4:r=e[o+1],n=e[o+2],s=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s)>65535&&u<1114112&&(a=u)}}null===a?(a=65533,i=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),o+=i}return function(e){const t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=R));return r}(n)}r.kMaxLength=i,t.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),t.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(t.prototype,"parent",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.buffer}}),Object.defineProperty(t.prototype,"offset",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.byteOffset}}),t.poolSize=8192,t.from=function(e,t,r){return u(e,t,r)},Object.setPrototypeOf(t.prototype,Uint8Array.prototype),Object.setPrototypeOf(t,Uint8Array),t.alloc=function(e,t,r){return function(e,t,r){return c(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},t.allocUnsafe=function(e){return f(e)},t.allocUnsafeSlow=function(e){return f(e)},t.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==t.prototype},t.compare=function(e,r){if(H(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),H(r,Uint8Array)&&(r=t.from(r,r.offset,r.byteLength)),!t.isBuffer(e)||!t.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;let n=e.length,o=r.length;for(let t=0,a=Math.min(n,o);t<a;++t)if(e[t]!==r[t]){n=e[t],o=r[t];break}return n<o?-1:o<n?1:0},t.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);let n;if(void 0===r)for(r=0,n=0;n<e.length;++n)r+=e[n].length;const o=t.allocUnsafe(r);let a=0;for(n=0;n<e.length;++n){let r=e[n];if(H(r,Uint8Array))a+r.length>o.length?(t.isBuffer(r)||(r=t.from(r)),r.copy(o,a)):Uint8Array.prototype.set.call(o,r,a);else{if(!t.isBuffer(r))throw new TypeError('"list" argument must be an Array of Buffers');r.copy(o,a)}a+=r.length}return o},t.byteLength=d,t.prototype._isBuffer=!0,t.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)m(this,t,t+1);return this},t.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},t.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},t.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?S(this,0,e):function(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return _(this,t,r);case"utf8":case"utf-8":return S(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return A(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},t.prototype.toLocaleString=t.prototype.toString,t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.prototype.inspect=function(){let e="";const t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},a&&(t.prototype[a]=t.prototype.inspect),t.prototype.compare=function(e,r,n,o,a){if(H(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),!t.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===o&&(o=0),void 0===a&&(a=this.length),r<0||n>e.length||o<0||a>this.length)throw new RangeError("out of range index");if(o>=a&&r>=n)return 0;if(o>=a)return-1;if(r>=n)return 1;if(this===e)return 0;let i=(a>>>=0)-(o>>>=0),s=(n>>>=0)-(r>>>=0);const u=Math.min(i,s),c=this.slice(o,a),f=e.slice(r,n);for(let e=0;e<u;++e)if(c[e]!==f[e]){i=c[e],s=f[e];break}return i<s?-1:s<i?1:0},t.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},t.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},t.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)},t.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let a=!1;for(;;)switch(n){case"hex":return g(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":case"latin1":case"binary":return b(this,e,t,r);case"base64":return w(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function I(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function A(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function _(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=t;n<r;++n)o+=X[e[n]];return o}function T(e,t,r){const n=e.slice(t,r);let o="";for(let e=0;e<n.length-1;e+=2)o+=String.fromCharCode(n[e]+256*n[e+1]);return o}function D(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,r,n,o,a,i){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>a||r<i)throw new RangeError('"value" argument is out of bounds');if(n+o>e.length)throw new RangeError("Index out of range")}function x(e,t,r,n,o){U(t,n,o,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a;let i=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,r}function j(e,t,r,n,o){U(t,n,o,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a>>=8,e[r+6]=a,a>>=8,e[r+5]=a,a>>=8,e[r+4]=a;let i=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=i,i>>=8,e[r+2]=i,i>>=8,e[r+1]=i,i>>=8,e[r]=i,r+8}function F(e,t,r,n,o,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(e,t,r,n,a){return t=+t,r>>>=0,a||F(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,a){return t=+t,r>>>=0,a||F(e,0,r,8),o.write(e,t,r,n,52,8),r+8}t.prototype.slice=function(e,r){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<e&&(r=e);const o=this.subarray(e,r);return Object.setPrototypeOf(o,t.prototype),o},t.prototype.readUintLE=t.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);let n=this[e],o=1,a=0;for(;++a<t&&(o*=256);)n+=this[e+a]*o;return n},t.prototype.readUintBE=t.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},t.prototype.readUint8=t.prototype.readUInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),this[e]},t.prototype.readUint16LE=t.prototype.readUInt16LE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]|this[e+1]<<8},t.prototype.readUint16BE=t.prototype.readUInt16BE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]<<8|this[e+1]},t.prototype.readUint32LE=t.prototype.readUInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},t.prototype.readUint32BE=t.prototype.readUInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},t.prototype.readBigUInt64LE=J((function(e){$(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),t.prototype.readBigUInt64BE=J((function(e){$(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),t.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);let n=this[e],o=1,a=0;for(;++a<t&&(o*=256);)n+=this[e+a]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},t.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);let n=t,o=1,a=this[e+--n];for(;n>0&&(o*=256);)a+=this[e+--n]*o;return a>=(o*=128)&&(a-=Math.pow(2,8*t)),a},t.prototype.readInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},t.prototype.readInt16LE=function(e,t){e>>>=0,t||D(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt16BE=function(e,t){e>>>=0,t||D(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},t.prototype.readInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},t.prototype.readBigInt64LE=J((function(e){$(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),t.prototype.readBigInt64BE=J((function(e){$(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),t.prototype.readFloatLE=function(e,t){return e>>>=0,t||D(e,4,this.length),o.read(this,e,!0,23,4)},t.prototype.readFloatBE=function(e,t){return e>>>=0,t||D(e,4,this.length),o.read(this,e,!1,23,4)},t.prototype.readDoubleLE=function(e,t){return e>>>=0,t||D(e,8,this.length),o.read(this,e,!0,52,8)},t.prototype.readDoubleBE=function(e,t){return e>>>=0,t||D(e,8,this.length),o.read(this,e,!1,52,8)},t.prototype.writeUintLE=t.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);let o=1,a=0;for(this[t]=255&e;++a<r&&(o*=256);)this[t+a]=e/o&255;return t+r},t.prototype.writeUintBE=t.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);let o=r-1,a=1;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=e/a&255;return t+r},t.prototype.writeUint8=t.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,255,0),this[t]=255&e,t+1},t.prototype.writeUint16LE=t.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeUint16BE=t.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeUint32LE=t.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},t.prototype.writeUint32BE=t.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeBigUInt64LE=J((function(e,t=0){return x(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),t.prototype.writeBigUInt64BE=J((function(e,t=0){return j(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),t.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let o=0,a=1,i=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===i&&0!==this[t+o-1]&&(i=1),this[t+o]=(e/a>>0)-i&255;return t+r},t.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let o=r-1,a=1,i=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===i&&0!==this[t+o+1]&&(i=1),this[t+o]=(e/a>>0)-i&255;return t+r},t.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},t.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},t.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeBigInt64LE=J((function(e,t=0){return x(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),t.prototype.writeBigInt64BE=J((function(e,t=0){return j(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),t.prototype.writeFloatLE=function(e,t,r){return C(this,e,t,!0,r)},t.prototype.writeFloatBE=function(e,t,r){return C(this,e,t,!1,r)},t.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},t.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},t.prototype.copy=function(e,r,n,o){if(!t.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),o||0===o||(o=this.length),r>=e.length&&(r=e.length),r||(r=0),o>0&&o<n&&(o=n),o===n)return 0;if(0===e.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-r<o-n&&(o=e.length-r+n);const a=o-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(r,n,o):Uint8Array.prototype.set.call(e,this.subarray(n,o),r),a},t.prototype.fill=function(e,r,n,o){if("string"==typeof e){if("string"==typeof r?(o=r,r=0,n=this.length):"string"==typeof n&&(o=n,n=this.length),void 0!==o&&"string"!=typeof o)throw new TypeError("encoding must be a string");if("string"==typeof o&&!t.isEncoding(o))throw new TypeError("Unknown encoding: "+o);if(1===e.length){const t=e.charCodeAt(0);("utf8"===o&&t<128||"latin1"===o)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;let a;if(r>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=r;a<n;++a)this[a]=e;else{const i=t.isBuffer(e)?e:t.from(e,o),s=i.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<n-r;++a)this[a+r]=i[a%s]}return this};const k={};function B(e,t,r){k[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function M(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function U(e,t,r,n,o,a){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let o;throw o=a>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(a+1)}${n}`:`>= -(2${n} ** ${8*(a+1)-1}${n}) and < 2 ** ${8*(a+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new k.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){$(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||q(t,e.length-(r+1))}(n,o,a)}function $(e,t){if("number"!=typeof e)throw new k.ERR_INVALID_ARG_TYPE(t,"number",e)}function q(e,t,r){if(Math.floor(e)!==e)throw $(e,r),new k.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new k.ERR_BUFFER_OUT_OF_BOUNDS;throw new k.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}B("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),B("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),B("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=M(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=M(o)),o+="n"),n+` It must be ${t}. Received ${o}`}),RangeError);const Y=/[^+\/0-9A-Za-z-_]/g;function V(e,t){let r;t=t||1/0;const n=e.length;let o=null;const a=[];for(let i=0;i<n;++i){if((r=e.charCodeAt(i))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(i+1===n){(t-=3)>-1&&a.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&a.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function z(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(Y,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function H(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Q(e){return e!=e}const X=function(){const e=new Array(256);for(let t=0;t<16;++t){const r=16*t;for(let n=0;n<16;++n)e[r+n]="0123456789abcdef"[t]+"0123456789abcdef"[n]}return e}();function J(e){return"undefined"==typeof BigInt?G:e}function G(){throw new Error("BigInt not supported")}}).call(this,e("buffer").Buffer)},{"base64-js":5,buffer:2,ieee754:6}],5:[function(e,t,r){"use strict";r.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=function(e){var t,r,n,i=c(e),s=i[0],u=i[1],f=new a(3*(s+(n=u))/4-n),l=0,h=u>0?s-4:s;for(r=0;r<h;r+=4)t=o[e.charCodeAt(r)]<<18|o[e.charCodeAt(r+1)]<<12|o[e.charCodeAt(r+2)]<<6|o[e.charCodeAt(r+3)],f[l++]=t>>16&255,f[l++]=t>>8&255,f[l++]=255&t;return 2===u&&(t=o[e.charCodeAt(r)]<<2|o[e.charCodeAt(r+1)]>>4,f[l++]=255&t),1===u&&(t=o[e.charCodeAt(r)]<<10|o[e.charCodeAt(r+1)]<<4|o[e.charCodeAt(r+2)]>>2,f[l++]=t>>8&255,f[l++]=255&t),f},r.fromByteArray=function(e){for(var t,r=e.length,o=r%3,a=[],i=0,s=r-o;i<s;i+=16383)a.push(f(e,i,i+16383>s?s:i+16383));return 1===o?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),a.join("")};for(var n=[],o=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=i.length;s<u;++s)n[s]=i[s],o[i.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function f(e,t,r){for(var o,a,i=[],s=t;s<r;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),i.push(n[(a=o)>>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return i.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},{}],6:[function(e,t,r){r.read=function(e,t,r,n,o){var a,i,s=8*o-n-1,u=(1<<s)-1,c=u>>1,f=-7,l=r?o-1:0,h=r?-1:1,p=e[t+l];for(l+=h,a=p&(1<<-f)-1,p>>=-f,f+=s;f>0;a=256*a+e[t+l],l+=h,f-=8);for(i=a&(1<<-f)-1,a>>=-f,f+=n;f>0;i=256*i+e[t+l],l+=h,f-=8);if(0===a)a=1-c;else{if(a===u)return i?NaN:1/0*(p?-1:1);i+=Math.pow(2,n),a-=c}return(p?-1:1)*i*Math.pow(2,a-n)},r.write=function(e,t,r,n,o,a){var i,s,u,c=8*a-o-1,f=(1<<c)-1,l=f>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,i=f):(i=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-i))<1&&(i--,u*=2),(t+=i+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(i++,u/=2),i+l>=f?(s=0,i=f):i+l>=1?(s=(t*u-1)*Math.pow(2,o),i+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,o),i=0));o>=8;e[r+p]=255&s,p+=d,s/=256,o-=8);for(i=i<<o|s,c+=o;c>0;e[r+p]=255&i,p+=d,i/=256,c-=8);e[r+p-d]|=128*m}},{}]},{},[4])(4);let n="browser";"undefined"!=typeof window?(window.globalObject=window,n="browser",window):"undefined"!=typeof self?(self.globalObject=self,self.import=importScripts,n="web-worker",self):void 0!==e&&(e.globalObject=e,n="nodejs. Not sure why you need virtual fs in node!");const o=new URLSearchParams(location.search);globalObject.Filer=t,globalObject.buffer=r,globalObject.virtualfs={urlParams:o,debugMode:o.get("debug"),env:n},console.log(`virtual fs started in debugMode:${virtualfs.debugMode} on environment: ${virtualfs.env}`);var a,i,s={},u=s={};function c(){throw new Error("setTimeout has not been defined")}function f(){throw new Error("clearTimeout has not been defined")}function l(e){if(a===setTimeout)return setTimeout(e,0);if((a===c||!a)&&setTimeout)return a=setTimeout,setTimeout(e,0);try{return a(e,0)}catch(t){try{return a.call(null,e,0)}catch(t){return a.call(this,e,0)}}}!function(){try{a="function"==typeof setTimeout?setTimeout:c}catch(e){a=c}try{i="function"==typeof clearTimeout?clearTimeout:f}catch(e){i=f}}();var h,p=[],d=!1,m=-1;function v(){d&&h&&(d=!1,h.length?p=h.concat(p):m=-1,p.length&&y())}function y(){if(!d){var e=l(v);d=!0;for(var t=p.length;t;){for(h=p,p=[];++m<t;)h&&h[m].run();m=-1,t=p.length}h=null,d=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===f||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function E(){}u.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];p.push(new g(e,t)),1!==p.length||d||l(y)},g.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=E,u.addListener=E,u.once=E,u.off=E,u.removeListener=E,u.removeAllListeners=E,u.emit=E,u.prependListener=E,u.prependOnceListener=E,u.listeners=function(e){return[]},u.binding=function(e){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(e){throw new Error("process.chdir is not supported")},u.umask=function(){return 0};var b;const w={ENOENT:"ENOENT",UNKNOWN:"UNKNOWN",OK:"OK",EOF:"EOF",EADDRINFO:"EADDRINFO",EACCES:"EACCES",EAGAIN:"EAGAIN",EADDRINUSE:"EADDRINUSE",EADDRNOTAVAIL:"EADDRNOTAVAIL",EAFNOSUPPORT:"EAFNOSUPPORT",EALREADY:"EALREADY",EBADF:"EBADF",EBUSY:"EBUSY",ECONNABORTED:"ECONNABORTED",ECONNREFUSED:"ECONNREFUSED",ECONNRESET:"ECONNRESET",EDESTADDRREQ:"EDESTADDRREQ",EFAULT:"EFAULT",EHOSTUNREACH:"EHOSTUNREACH",EINTR:"EINTR",EINVAL:"EINVAL",EISCONN:"EISCONN",EMFILE:"EMFILE",EMSGSIZE:"EMSGSIZE",ENETDOWN:"ENETDOWN",ENETUNREACH:"ENETUNREACH",ENFILE:"ENFILE",ENOBUFS:"ENOBUFS",ENOMEM:"ENOMEM",ENOTDIR:"ENOTDIR",EISDIR:"EISDIR",ENONET:"ENONET",ENOTCONN:"ENOTCONN",ENOTSOCK:"ENOTSOCK",ENOTSUP:"ENOTSUP",ENOSYS:"ENOSYS",EPIPE:"EPIPE",EPROTO:"EPROTO",EPROTONOSUPPORT:"EPROTONOSUPPORT",EPROTOTYPE:"EPROTOTYPE",ETIMEDOUT:"ETIMEDOUT",ECHARSET:"ECHARSET",EAIFAMNOSUPPORT:"EAIFAMNOSUPPORT",EAISERVICE:"EAISERVICE",EAISOCKTYPE:"EAISOCKTYPE",ESHUTDOWN:"ESHUTDOWN",EEXIST:"EEXIST",ESRCH:"ESRCH",ENAMETOOLONG:"ENAMETOOLONG",EPERM:"EPERM",ELOOP:"ELOOP",EXDEV:"EXDEV",ENOTEMPTY:"ENOTEMPTY",ENOSPC:"ENOSPC",EIO:"EIO",EROFS:"EROFS",ENODEV:"ENODEV",ESPIPE:"ESPIPE",ECANCELED:"ECANCELED"},P={ENOENT:w.ENOENT,EOF:w.EOF,EACCES:w.EACCES,EAGAIN:w.EAGAIN,EBADF:w.EBADF,EBUSY:w.EBUSY,EINVAL:w.EINVAL,EMFILE:w.EMFILE,ENFILE:w.ENFILE,ENOBUFS:w.ENOBUFS,ENOTDIR:w.ENOTDIR,EISDIR:w.EISDIR,ENOSYS:w.ENOSYS,ECHARSET:w.ECHARSET,EEXIST:w.EEXIST,ENAMETOOLONG:w.ENAMETOOLONG,EPERM:w.EPERM,ELOOP:w.ELOOP,EXDEV:w.EXDEV,ENOTEMPTY:w.ENOTEMPTY,ENOSPC:w.ENOSPC,EIO:w.EIO,EROFS:w.EROFS,ESPIPE:w.ESPIPE,ECANCELED:w.ECANCELED},O=[{errno:-2,code:w.ENOENT,description:"no such file or directory"},{errno:-1,code:w.UNKNOWN,description:"unknown error"},{errno:0,code:w.OK,description:"success"},{errno:1,code:w.EOF,description:"end of file"},{errno:2,code:w.EADDRINFO,description:"getaddrinfo error"},{errno:3,code:w.EACCES,description:"permission denied"},{errno:4,code:w.EAGAIN,description:"resource temporarily unavailable"},{errno:5,code:w.EADDRINUSE,description:"address already in use"},{errno:6,code:w.EADDRNOTAVAIL,description:"address not available"},{errno:7,code:w.EAFNOSUPPORT,description:"address family not supported"},{errno:8,code:w.EALREADY,description:"connection already in progress"},{errno:9,code:w.EBADF,description:"bad file descriptor"},{errno:10,code:w.EBUSY,description:"resource busy or locked"},{errno:11,code:w.ECONNABORTED,description:"software caused connection abort"},{errno:12,code:w.ECONNREFUSED,description:"connection refused"},{errno:13,code:w.ECONNRESET,description:"connection reset by peer"},{errno:14,code:w.EDESTADDRREQ,description:"destination address required"},{errno:15,code:w.EFAULT,description:"bad address in system call argument"},{errno:16,code:w.EHOSTUNREACH,description:"host is unreachable"},{errno:17,code:w.EINTR,description:"interrupted system call"},{errno:18,code:w.EINVAL,description:"invalid argument"},{errno:19,code:w.EISCONN,description:"socket is already connected"},{errno:20,code:w.EMFILE,description:"too many open files"},{errno:21,code:w.EMSGSIZE,description:"message/datagram too long"},{errno:22,code:w.ENETDOWN,description:"network is down"},{errno:23,code:w.ENETUNREACH,description:"network is unreachable"},{errno:24,code:w.ENFILE,description:"file table overflow"},{errno:25,code:w.ENOBUFS,description:"no buffer space available"},{errno:26,code:w.ENOMEM,description:"not enough memory/ high virtual memory usage"},{errno:27,code:w.ENOTDIR,description:"not a directory"},{errno:28,code:w.EISDIR,description:"illegal operation on a directory"},{errno:29,code:w.ENONET,description:"machine is not on the network"},{errno:31,code:w.ENOTCONN,description:"socket is not connected"},{errno:32,code:w.ENOTSOCK,description:"socket operation on non-socket"},{errno:33,code:w.ENOTSUP,description:"operation not supported on socket"},{errno:34,code:w.ENOENT,description:"no such file or directory"},{errno:35,code:w.ENOSYS,description:"function not implemented"},{errno:36,code:w.EPIPE,description:"broken pipe"},{errno:37,code:w.EPROTO,description:"protocol error"},{errno:38,code:w.EPROTONOSUPPORT,description:"protocol not supported"},{errno:39,code:w.EPROTOTYPE,description:"protocol wrong type for socket"},{errno:40,code:w.ETIMEDOUT,description:"connection timed out"},{errno:41,code:w.ECHARSET,description:"invalid Unicode character"},{errno:42,code:w.EAIFAMNOSUPPORT,description:"address family for hostname not supported"},{errno:44,code:w.EAISERVICE,description:"servname not supported for ai_socktype"},{errno:45,code:w.EAISOCKTYPE,description:"ai_socktype not supported"},{errno:46,code:w.ESHUTDOWN,description:"cannot send after transport endpoint shutdown"},{errno:47,code:w.EEXIST,description:"file already exists"},{errno:48,code:w.ESRCH,description:"no such process"},{errno:49,code:w.ENAMETOOLONG,description:"name too long"},{errno:50,code:w.EPERM,description:"operation not permitted"},{errno:51,code:w.ELOOP,description:"too many symbolic links encountered"},{errno:52,code:w.EXDEV,description:"cross-device link not permitted"},{errno:53,code:w.ENOTEMPTY,description:"directory not empty"},{errno:54,code:w.ENOSPC,description:"no space left on device"},{errno:55,code:w.EIO,description:"i/o error"},{errno:56,code:w.EROFS,description:"read-only file system"},{errno:57,code:w.ENODEV,description:"no such device"},{errno:58,code:w.ESPIPE,description:"invalid seek"},{errno:59,code:w.ECANCELED,description:"operation canceled"}];let S={},R={};O.forEach((function(e){S[e.errno]=e,R[e.code]=e}));const I={ERROR_CODES:w,FS_ERROR_CODES:P,ALL_ERRORS:O,ERRNO_TO_ERROR_MAP:S,CODE_TO_ERROR_MAP:R},A={};["3:EACCES:permission denied","9:EBADF:bad file descriptor","10:EBUSY:resource busy or locked","18:EINVAL:invalid argument","27:ENOTDIR:not a directory","28:EISDIR:illegal operation on a directory","34:ENOENT:no such file or directory","35:ENOSYS:function not implemented","47:EEXIST:file already exists","50:EPERM:operation not permitted","51:ELOOP:too many symbolic links encountered","53:ENOTEMPTY:directory not empty","55:EIO:i/o error","1000:ENOTMOUNTED:not mounted","1001:EFILESYSTEMERROR:missing super node, use 'FORMAT' flag to format filesystem.","1002:ENOATTR:attribute does not exist"].forEach((function(e){var t=+(e=e.split(":"))[0],r=e[1],n=e[2];function o(e,o){Error.call(this),this.name=r,this.code=r,this.errno=t,this.message=e||n,o&&(this.path=o),this.stack=new Error(this.message).stack}o.prototype=Object.create(Error.prototype),o.prototype.constructor=o,o.prototype.toString=function(){var e=this.path?", '"+this.path+"'":"";return this.name+": "+this.message+e},A[r]=A[t]=o}));var _,T,D=(b={Errors:A,ERR_CODES:I}).ERR_CODES,N=b.Errors,x=b.Errors;var j=(T={Constants:{MOUNT_DEVICE_NAME:"nativeFsAccess",KIND_FILE:"file",KIND_DIRECTORY:"directory",NODE_TYPE_FILE:"FILE",NODE_TYPE_DIRECTORY:"DIRECTORY",IDB_RW_TYPE:"readwrite",MOUNT_POINT_ROOT:"/mnt"}}).Constants;const F=function(e){let t,r;const n=new WeakMap,o=new WeakMap,a=new WeakMap,i=new WeakMap,s=new WeakMap;let u={get(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return o.get(e);if("objectStoreNames"===t)return e.objectStoreNames||a.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return f(e[t])},set:(e,t,r)=>(e[t]=r,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function c(e){var i,s;return"function"==typeof e?(s=e)!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(r||(r=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(s)?function(...e){return s.apply(l(this),e),f(n.get(this))}:function(...e){return f(s.apply(l(this),e))}:function(e,...t){const r=s.call(l(this),e,...t);return a.set(r,e.sort?e.sort():[e]),f(r)}:(e instanceof IDBTransaction&&function(e){if(o.has(e))return;const t=new Promise(((t,r)=>{const n=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",a),e.removeEventListener("abort",a)},o=()=>{t(),n()},a=()=>{r(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",o),e.addEventListener("error",a),e.addEventListener("abort",a)}));o.set(e,t)}(e),i=e,(t||(t=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((e=>i instanceof e))?new Proxy(e,u):e)}function f(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,r)=>{const n=()=>{e.removeEventListener("success",o),e.removeEventListener("error",a)},o=()=>{t(f(e.result)),n()},a=()=>{r(e.error),n()};e.addEventListener("success",o),e.addEventListener("error",a)}));return t.then((t=>{t instanceof IDBCursor&&n.set(t,e)})).catch((()=>{})),s.set(t,e),t}(e);if(i.has(e))return i.get(e);const t=c(e);return t!==e&&(i.set(e,t),s.set(t,e)),t}const l=e=>s.get(e),h=["get","getKey","getAll","getAllKeys","count"],p=["put","add","delete","clear"],d=new Map;function m(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(d.get(t))return d.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,o=p.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!o&&!h.includes(r))return;const a=async function(e,...t){const a=this.transaction(e,o?"readwrite":"readonly");let i=a.store;return n&&(i=i.index(t.shift())),(await Promise.all([i[r](...t),o&&a.done]))[0]};return d.set(t,a),a}return v=u,u={...v,get:(e,t,r)=>m(e,t)||v.get(e,t,r),has:(e,t)=>!!m(e,t)||v.has(e,t)},e.deleteDB=function(e,{blocked:t}={}){const r=indexedDB.deleteDatabase(e);return t&&r.addEventListener("blocked",(()=>t())),f(r).then((()=>{}))},e.openDB=function(e,t,{blocked:r,upgrade:n,blocking:o,terminated:a}={}){const i=indexedDB.open(e,t),s=f(i);return n&&i.addEventListener("upgradeneeded",(e=>{n(f(i.result),e.oldVersion,e.newVersion,f(i.transaction))})),r&&i.addEventListener("blocked",(()=>r())),s.then((e=>{a&&e.addEventListener("close",(()=>a())),o&&e.addEventListener("versionchange",(()=>o()))})).catch((()=>{})),s},e.unwrap=l,e.wrap=f,e;var v}({});var C={idb:F}.idb;const L="FS_ACCESS",k="MOUNT_POINTS";let B=null,M={};async function U(){B||(B=await C.openDB("PHOENIX_MOUNTS",1,{upgrade(e){e.createObjectStore(L)}}))}var $={MountPointsStore:{addMountPoint:async function(e,t){await U();const r=B.transaction(L,j.IDB_RW_TYPE),n=r.objectStore(L);M=await n.get(k)||{},M[e]=t,await n.put(M,k),await r.done},getMountPoints:function(){return M},refreshMountPoints:async function(){await U();const e=B.transaction(L,j.IDB_RW_TYPE),t=e.objectStore(L);return M=await t.get(k)||{},await e.done,M}}}.MountPointsStore,q=T.Constants;const Y="PHOENIX_MOUNT_POINT_CHANGED_NOTIFICATION";let V=null;function z(){V||("undefined"!=typeof BroadcastChannel?V=new BroadcastChannel(Y):console.warn("BroadcastChannel not supported. Mount point changes wont reflect across tabs."))}function K(e){return new Promise((t=>{let r=function(e){let t=[];const r=$.getMountPoints();for(const[n,o]of Object.entries(r))t.push(new Promise((t=>{const r=o.isSameEntry(e),a=o.resolve(e);Promise.all([r,a]).then((e=>{let r=e[0]||!1,o=e[1]||[];t({existingMountName:n,isSameEntry:r,subPath:o.join("/")})}))})));return t}(e);Promise.all(r).then((e=>{for(let r=0;r<e.length;r++){let n=e[r].existingMountName;if(e[r].isSameEntry)return void t(`${q.MOUNT_POINT_ROOT}/${n}`);if(e[r].subPath.length>=1)return void t(`${q.MOUNT_POINT_ROOT}/${n}/${e[r].subPath}`)}t(null)}))}))}function H(e){return new Promise((async(t,r)=>{let n=await K(e);if(n)t(n);else{let n=function(e){let t=e.name;const r=$.getMountPoints();if(!r[t])return t;for(let e=0;e<1e6;e++){let n=`${t}_${e}`;if(!r[n])return n}}(e);n?(await $.addMountPoint(n,e),t(`${q.MOUNT_POINT_ROOT}/${n}`)):r("Mount name not fount")}}))}async function Q(e,t,r,n){let o=t.length;if(r===o)return void n(null,e);let a=t[r],i=null,s=null;try{i=await e.getDirectoryHandle(a)}catch(e){}try{s=await e.getFileHandle(a)}catch(e){}if(s&&r===o-1)n(null,s);else if(i)Q(i,t,r+1,n);else{let e=t.join("/");n(new x.ENOENT("File/Dir does not exist: ",e))}}async function X(e,t){const r=e.split("/"),n=$.getMountPoints();(r.length<3||""!==r[0]||"mnt"!==r[1])&&t(new x.EINVAL("Cannot operate on path "+e));let o=n[r[2]];if(!o)return void t(new x.ENOENT("Path does not exist: ",e));let a=await async function(e){const t={mode:"read"};try{let r=await e.queryPermission(t);return"granted"===r?null:(r=await e.requestPermission(t),"granted"===r?null:new x.EACCES(`Dir permissions not granted ${e.name}`))}catch(t){return t.code===t.NOT_FOUND_ERR?new x.ENOENT(`Dir does not exist ${e.name}`,t):new x.EIO(`Phoenix fs could not read directory ${e.name}`,t)}}(o);a?t(a):Q(o,r,3,t)}z(),V.onmessage=async function(e){e.data===Y&&await $.refreshMountPoints()};var J=(_={Mounts:{mountNativeFolder:function(e,t){t||(t=e,e=null);let r=null,n=null;$.refreshMountPoints().then((()=>e||globalObject.showDirectoryPicker())).then((e=>H(e))).then((e=>r=e)).then((()=>(z(),void V.postMessage(Y)))).catch((function(e){n=new x.ENOTMOUNTED(e)})).finally((()=>{if(t)t(n,[r]);else if(n)throw new x.ENOTMOUNTED(n)}))},isMountPath:function(e){return"string"==typeof e&&!(!e||(e=globalObject.path.normalize(e))!==q.MOUNT_POINT_ROOT)},isMountSubPath:function(e){if("string"!=typeof e)return!1;let t="/mnt/";return!!(e&&(e=globalObject.path.normalize(e)).startsWith(t)&&e.length>t.length)},getHandleFromPath:X,getMountPoints:function(){return $.getMountPoints()},refreshMountPoints:function(){return $.refreshMountPoints()},getHandleFromPathIfPresent:async function(e){return new Promise((t=>{X(e,((e,r)=>{t(e?null:r)}))}))}}}).Mounts,G=b.Errors,W=T.Constants,Z=T.Constants;function ee(e){return null==e?null:new Date(Number(e))}function te(e,t,r){this.dev=r,this.node=t.id,this.type=t.type,this.size=t.size,this.nlinks=t.nlinks,this.atime=ee(t.atime),this.mtime=ee(t.mtime),this.ctime=ee(t.ctime),this.atimeMs=t.atime,this.mtimeMs=t.mtime,this.ctimeMs=t.ctime,this.version=t.version,this.mode=t.mode,this.name=globalObject.path.basename(e)}function re(e){switch(e.kind){case Z.KIND_FILE:return Z.NODE_TYPE_FILE;case Z.KIND_DIRECTORY:return Z.NODE_TYPE_DIRECTORY;default:return null}}te.prototype.isFile=function(){return this.type===Z.NODE_TYPE_FILE},te.prototype.isDirectory=function(){return this.type===Z.NODE_TYPE_DIRECTORY},te.prototype.isSymbolicLink=function(){return this.type===Z.NODE_TYPE_SYMBOLIC_LINK},te.prototype.isSocket=te.prototype.isFIFO=te.prototype.isCharacterDevice=te.prototype.isBlockDevice=function(){return!1};var ne={Utils:{createStatObject:async function(e,t){let r=await async function(e){let t=null,r={};switch(e.kind){case Z.KIND_FILE:return t=await e.getFile(),r.size=t.size,r.mtime=t.lastModified,r;case Z.KIND_DIRECTORY:default:return r}}(t);return new te(e,{type:re(t),size:r.size,mtime:r.mtime},Z.MOUNT_DEVICE_NAME)}}}.Utils;async function oe(e,t,r){try{let n=await async function(e,t){try{return await e.getDirectoryHandle(t),!0}catch(e){return!1}}(e,t);if(n)return void r(new G.EEXIST(`Folder ${t} already exists`));let o=await e.getDirectoryHandle(t,{create:!0});return r&&r(null),o}catch(e){throw r&&r(new G.EIO("Filer native fs function not yet supported.",e)),new G.EIO("Filer native fs function not yet supported.",e)}}async function ae(e,t,r){t=t||"utf-8";try{let n=await e.getFile(),o=await n.arrayBuffer();if(t===de)return void r(null,o,t);let a=function(e,t){try{return new TextDecoder(t).decode(e)}catch(e){return null}}(o,t);null!==a?r(null,a,t):r(new G.EIO(`Encoding ${t} no supported`))}catch(e){r(e)}}function ie(e,t,r){return e?"function"==typeof e?e={encoding:t,flag:r}:"string"==typeof e&&(e={encoding:e,flag:r}):e={encoding:t,flag:r},e}async function se(e,t,r,n,o){try{const r=await e.getFileHandle(t,{create:!0}),a=await r.createWritable();await a.write(n),await a.close(),o(null)}catch(e){o(e)}}async function ue(e,t){e=globalObject.path.normalize(e);let r=globalObject.path.dirname(e),n=globalObject.path.basename(e);J.getHandleFromPath(r,(async(e,r)=>{e?t(e):async function(e,t,r,n=!0){try{await e.removeEntry(t,{recursive:n}),r(null)}catch(e){r(e)}}(r,n,t)}))}async function ce(e,t,r){return new Promise((async(n,o)=>{e=globalObject.path.normalize(e);let a=globalObject.path.dirname(e),i=globalObject.path.basename(e),s=await J.getHandleFromPathIfPresent(e),u=await J.getHandleFromPathIfPresent(a);if(s&&s.kind===W.KIND_FILE)o(new G.EEXIST(`Destination file already exists: ${e}`));else if(s&&s.kind===W.KIND_DIRECTORY&&r===W.KIND_FILE){n({handle:await s.getFileHandle(t,{create:!0}),path:`${e}/${t}`})}else if(s&&s.kind===W.KIND_DIRECTORY&&r===W.KIND_DIRECTORY){if(await J.getHandleFromPathIfPresent(`${e}/${t}`))return void o(new G.EEXIST(`Copy destination already exists: ${e}/${t}`));n({handle:await s.getDirectoryHandle(t,{create:!0}),path:`${e}/${t}`})}else if(!s&&u&&u.kind===W.KIND_DIRECTORY&&r===W.KIND_FILE){n({handle:await u.getFileHandle(i,{create:!0}),path:`${a}/${i}`})}else if(!s&&u&&u.kind===W.KIND_DIRECTORY&&r===W.KIND_DIRECTORY){n({handle:await u.getDirectoryHandle(i,{create:!0}),path:`${a}/${i}`})}else o(new G.ENOENT(`Copy destination doesnt exist: ${e}`))}))}async function fe(e,t,r){try{r&&(t=await t.getFileHandle(r,{create:!0}));const n=await e.getFile(),o=await n.stream(),a=await t.createWritable();await o.pipeTo(a)}catch(e){throw console.error(`Error while copying ${t.name}/${r} : ${e}`),e}}async function le(e,t,r){let n=[];for await(const[o,a]of e.entries())if(a.kind===W.KIND_FILE)n.push(fe(a,t,o));else if(a.kind===W.KIND_DIRECTORY){const e=await oe(t,o);r&&e&&n.push(le(a,e,r))}await Promise.all(n)}async function he(e,t,r,n,o){try{let{handle:a,path:i}=await ce(t,r,W.KIND_DIRECTORY);await le(e,a,o),n(null,i)}catch(e){n(e)}}async function pe(e,t,r,n=!0){let o=globalObject.path.normalize(e),a=globalObject.path.basename(o);J.getHandleFromPath(o,(async(e,i)=>{if(e)r(e);else{if(i.kind===W.KIND_FILE)return async function(e,t,r,n){try{let{handle:o,path:a}=await ce(t,r,W.KIND_FILE);await fe(e,o),n(null,a)}catch(e){n(e)}}(i,t,a,r);if(i.kind===W.KIND_DIRECTORY)return he(i,t,a,r,n);r(new G.EIO(`Cannot copy src: ${o}`))}}))}const de="byte-array";var me={NativeFS:{mountNativeFolder:function(...e){J.mountNativeFolder(...e)},refreshMountPoints:function(){J.refreshMountPoints()},mkdir:function(e,t,r){arguments.length<3&&(r=t),e=globalObject.path.normalize(e);let n=globalObject.path.dirname(e),o=globalObject.path.basename(e);J.getHandleFromPath(n,((e,t)=>{e?r(e):t.kind===W.KIND_FILE?r(new G.ENOTDIR("Parent path is not a directory.")):oe(t,o,r)}))},readdir:function(e,t,r){if(e=globalObject.path.normalize(e),"function"==typeof t&&(r=t,t={}),e===W.MOUNT_POINT_ROOT){let e=Object.keys(J.getMountPoints());r(null,e)}else J.getHandleFromPath(e,((n,o)=>{n?r(n):o.kind===W.KIND_FILE?r(new G.ENOTDIR("Path is not a directory.")):async function(e,t,r,n){let o=[];try{for await(const[n,a]of t.entries()){let t=n;r.withFileTypes&&(t=await ne.createStatObject(globalObject.path.join(e,n),a)),o.push(t)}n&&n(null,o)}catch(e){e.code===e.NOT_FOUND_ERR?n(new G.ENOENT(`Dir does not exist ${t.name}`,e)):n(new G.EIO(`Phoenix fs could not read directory ${t.name}`,e))}}(e,o,t,r)}))},stat:function(e,t){e=globalObject.path.normalize(e),J.getHandleFromPath(e,((r,n)=>{r?t(r):ne.createStatObject(e,n).then((e=>{t(null,e)})).catch((e=>{t(e)}))}))},readFile:function(e,t,r){e=globalObject.path.normalize(e),r=arguments[arguments.length-1],t=ie(t,null,"r"),J.getHandleFromPath(e,((e,n)=>{e?r(e):n.kind===W.KIND_DIRECTORY?r(new G.EISDIR("Path is a directory.")):ae(n,t.encoding,r)}))},writeFile:function(e,t,r,n){n=arguments[arguments.length-1],r=ie(r,"utf8","w"),buffer.Buffer.isBuffer(t)||("number"==typeof t&&(t=""+t),t="string"!=typeof(t=t||"")?buffer.Buffer.from(t.toString()):buffer.Buffer.from(t||"",r.encoding||"utf8")),e=globalObject.path.normalize(e);let o=globalObject.path.dirname(e),a=globalObject.path.basename(e);J.getHandleFromPath(o,((e,o)=>{e?n(e):o.kind===W.KIND_FILE?n(new G.ENOTDIR("Parent path is not a directory.")):se(o,a,r.encoding,t,n)}))},unlink:ue,copy:pe,rename:async function(e,t,r){pe(e,t,(t=>{t?r(t):setTimeout((()=>{ue(e,r)}),0)}))},BYTE_ARRAY_ENCODING:de}}.NativeFS,ve=T.Constants,ye=_.Mounts;let ge=null,Ee=[];var be={};Te.Minimatch=De;var we=Te.cache=new function(){var e={},t=0;this.set=function(r,n){++t>=100&&(e={}),e[r]=n},this.get=function(t){return e[t]}}({max:100}),Pe=Te.GLOBSTAR=De.GLOBSTAR={},Oe=function(e){var t=(e=e.split(/[\/\\]/)).pop();return t||(t=e.pop()),t},Se="[^/]",Re="[^/]*?",Ie="().*{}+?[]^$\\!".split("").reduce((function(e,t){return e[t]=!0,e}),{});var Ae=/\/+/;function _e(e,t){e=e||{},t=t||{};var r={};return Object.keys(t).forEach((function(e){r[e]=t[e]})),Object.keys(e).forEach((function(t){r[t]=e[t]})),r}function Te(e,t,r){if("string"!=typeof t)throw new TypeError("glob pattern string required");return r||(r={}),!(!r.nocomment&&"#"===t.charAt(0))&&(""===t.trim()?""===e:new De(t,r).match(e))}function De(e,t){if(!(this instanceof De))return new De(e,t,we);if("string"!=typeof e)throw new TypeError("glob pattern string required");t||(t={});var r,n=(e=e.trim())+"\n"+(r=t,JSON.stringify(r)),o=Te.cache.get(n);if(o)return o;Te.cache.set(n,this),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}Te.monkeyPatch=function(){var e=Object.getOwnPropertyDescriptor(String.prototype,"match"),t=e.value;e.value=function(e){return e instanceof De?e.match(this):t.call(this,e)},Object.defineProperty(String.prototype,e)},Te.filter=function(e,t){return t=t||{},function(r,n,o){return Te(r,e,t)}},Te.defaults=function(e){if(!e||!Object.keys(e).length)return Te;var t=Te,r=function(r,n,o){return t.minimatch(r,n,_e(e,o))};return r.Minimatch=function(r,n){return new t.Minimatch(r,_e(e,n))},r},De.defaults=function(e){return e&&Object.keys(e).length?Te.defaults(e).Minimatch:De},De.prototype.make=function(){if(this._made)return;var e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();var r=this.globSet=this.braceExpand();t.debug&&console.error(this.pattern,r);r=this.globParts=r.map((function(e){return e.split(Ae)})),t.debug&&console.error(this.pattern,r);r=r.map((function(e,t,r){return e.map(this.parse,this)}),this),t.debug&&console.error(this.pattern,r);r=r.filter((function(e){return-1===e.indexOf(!1)})),t.debug&&console.error(this.pattern,r);this.set=r},De.prototype.parseNegate=function(){var e=this.pattern,t=!1,r=this.options,n=0;if(r.nonegate)return;for(var o=0,a=e.length;o<a&&"!"===e.charAt(o);o++)t=!t,n++;n&&(this.pattern=e.substr(n));this.negate=t},Te.braceExpand=function(e,t){return new De(e,t).braceExpand()},De.prototype.braceExpand=function e(t,r){if(r=r||this.options,void 0===(t=void 0===t?this.pattern:t))throw new Error("undefined pattern");if(r.nobrace||!t.match(/\{.*\}/))return[t];var n=!1;if("{"!==t.charAt(0)){for(var o=null,a=0,i=t.length;a<i;a++){if("\\"===(E=t.charAt(a)))n=!n;else if("{"===E&&!n){o=t.substr(0,a);break}}if(null===o)return[t];var s=e(t.substr(a),r);return s.map((function(e){return o+e}))}var u=t.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/);if(u){var c=e(t.substr(u[0].length),r),f=+u[1],l=+u[2],h=f>l?-1:1,p=[];for(a=f;a!=l+h;a+=h)for(var d=0,m=c.length;d<m;d++)p.push(a+c[d]);return p}a=1;var v=1,y=(p=[],"");n=!1;function g(){p.push(y),y=""}e:for(a=1,i=t.length;a<i;a++){var E=t.charAt(a);if(n)n=!1,y+="\\"+E;else switch(E){case"\\":n=!0;continue;case"{":v++,y+="{";continue;case"}":if(0===--v){g(),a++;break e}y+=E;continue;case",":1===v?g():y+=E;continue;default:y+=E;continue}}if(0!==v)return e("\\"+t,r);c=e(t.substr(a),r);var b=1===p.length;p=p.map((function(t){return e(t,r)})),p=p.reduce((function(e,t){return e.concat(t)})),b&&(p=p.map((function(e){return"{"+e+"}"})));var w=[];for(a=0,i=p.length;a<i;a++)for(d=0,m=c.length;d<m;d++)w.push(p[a]+c[d]);return w},De.prototype.parse=function(e,t){var r=this.options;if(!r.noglobstar&&"**"===e)return Pe;if(""===e)return"";var n,o,a,i="",s=!!r.nocase,u=!1,c=[],f=!1,l=-1,h=-1,p="."===e.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";function d(){if(o){switch(o){case"*":i+=Re,s=!0;break;case"?":i+=Se,s=!0;break;default:i+="\\"+o}o=!1}}for(var m,v=0,y=e.length;v<y&&(m=e.charAt(v));v++)if(r.debug&&console.error("%s\t%s %s %j",e,v,i,m),u&&Ie[m])i+="\\"+m,u=!1;else switch(m){case"/":return!1;case"\\":d(),u=!0;continue;case"?":case"*":case"+":case"@":case"!":if(r.debug&&console.error("%s\t%s %s %j <-- stateChar",e,v,i,m),f){"!"===m&&v===h+1&&(m="^"),i+=m;continue}d(),o=m,r.noext&&d();continue;case"(":if(f){i+="(";continue}if(!o){i+="\\(";continue}n=o,c.push({type:n,start:v-1,reStart:i.length}),i+="!"===o?"(?:(?!":"(?:",o=!1;continue;case")":if(f||!c.length){i+="\\)";continue}switch(s=!0,i+=")",n=c.pop().type){case"!":i+="[^/]*?)";break;case"?":case"+":case"*":i+=n}continue;case"|":if(f||!c.length||u){i+="\\|",u=!1;continue}i+="|";continue;case"[":if(d(),f){i+="\\"+m;continue}f=!0,h=v,l=i.length,i+=m;continue;case"]":if(v===h+1||!f){i+="\\"+m,u=!1;continue}s=!0,f=!1,i+=m;continue;default:d(),u?u=!1:!Ie[m]||"^"===m&&f||(i+="\\"),i+=m}if(f){var g=e.substr(h+1),E=this.parse(g,Ne);i=i.substr(0,l)+"\\["+E[0],s=s||E[1]}for(;a=c.pop();){var b=i.slice(a.reStart+3);b=b.replace(/((?:\\{2})*)(\\?)\|/g,(function(e,t,r){return r||(r="\\"),t+t+r+"|"}));var w="*"===a.type?Re:"?"===a.type?Se:"\\"+a.type;s=!0,i=i.slice(0,a.reStart)+w+"\\("+b}d(),u&&(i+="\\\\");var P=!1;switch(i.charAt(0)){case".":case"[":case"(":P=!0}""!==i&&s&&(i="(?=.)"+i);P&&(i=p+i);if(t===Ne)return[i,s];if(!s)return function(e){return e.replace(/\\(.)/g,"$1")}(e);var O=r.nocase?"i":"",S=new RegExp("^"+i+"$",O);return S._glob=e,S._src=i,S};var Ne={};Te.makeRe=function(e,t){return new De(e,t||{}).makeRe()},De.prototype.makeRe=function(){if(this.regexp||!1===this.regexp)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1;var t=this.options,r=t.noglobstar?Re:t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",n=t.nocase?"i":"",o=e.map((function(e){return e.map((function(e){return e===Pe?r:"string"==typeof e?function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}(e):e._src})).join("\\/")})).join("|");o="^(?:"+o+")$",this.negate&&(o="^(?!"+o+").*$");try{return this.regexp=new RegExp(o,n)}catch(e){return this.regexp=!1}},Te.match=function(e,t,r){var n=new De(t,r);return e=e.filter((function(e){return n.match(e)})),r.nonull&&!e.length&&e.push(t),e},De.prototype.match=function(e,t){if(this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;var r=this.options;e=e.split(Ae),r.debug&&console.error(this.pattern,"split",e);for(var n=this.set,o=0,a=n.length;o<a;o++){var i=n[o];if(this.matchOne(e,i,t))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate},De.prototype.matchOne=function(e,t,r){var n=this.options;n.debug&&console.error("matchOne",{this:this,file:e,pattern:t}),n.matchBase&&1===t.length&&(e=Oe(e.join("/")).split("/")),n.debug&&console.error("matchOne",e.length,t.length);for(var o=0,a=0,i=e.length,s=t.length;o<i&&a<s;o++,a++){n.debug&&console.error("matchOne loop");var u,c=t[a],f=e[o];if(n.debug&&console.error(t,c,f),!1===c)return!1;if(c===Pe){n.debug&&console.error("GLOBSTAR",[t,c,f]);var l=o,h=a+1;if(h===s){for(n.debug&&console.error("** at the end");o<i;o++)if("."===e[o]||".."===e[o]||!n.dot&&"."===e[o].charAt(0))return!1;return!0}e:for(;l<i;){var p=e[l];if(n.debug&&console.error("\nglobstar while",e,l,t,h,p),this.matchOne(e.slice(l),t.slice(h),r))return n.debug&&console.error("globstar found match!",l,i,p),!0;if("."===p||".."===p||!n.dot&&"."===p.charAt(0)){n.debug&&console.error("dot detected!",e,l,t,h);break e}n.debug&&console.error("globstar swallow a segment, and continue"),l++}return!(!r||l!==i)}if("string"==typeof c?(u=n.nocase?f.toLowerCase()===c.toLowerCase():f===c,n.debug&&console.error("string match",c,f,u)):(u=f.match(c),n.debug&&console.error("pattern match",c,f,u)),!u)return!1}if(o===i&&a===s)return!0;if(o===i)return r;if(a===s)return o===i-1&&""===e[o];throw new Error("wtf?")},be=function(e,t){var r={dot:!0,noext:!0};return"/"!==e[e.length-1]&&(r.matchBase=!0),Te(e,t=t.replace(/\*\*/g,"{*,**/**/**}"),r)};function xe(){ge||("undefined"!=typeof BroadcastChannel?ge=new BroadcastChannel("PHOENIX_WATCH_EVENT_NOTIFICATION"):console.warn("BroadcastChannel not supported. File system watch events across tabs wont be synced."))}function je(e,t){if(t&&t.length>0)for(const r of t)if(be(e,r))return!0;return!1}function Fe(e,t=!0){t&&function(e){xe(),ge.postMessage(e)}(e);for(const t of Ee)!t.callback||(r=t.path,n=e.path,globalObject.path.relative(r,n).startsWith(".."))||je(e.path,t.ignoreGlobList)||t.callback(e.event,e.parentDirPath,e.entryName,e.path);var r,n}function Ce(e,t){let r=globalObject.path;e=r.normalize(e),Fe({event:t,parentDirPath:r.normalize(`${r.dirname(e)}/`),entryName:r.basename(e),path:e})}xe(),ge.onmessage=async function(e){virtualfs.debugMode&&console.log("External fs watch event: ",e.data),Fe(e.data,!1)};var Le={FsWatch:{watch:function(e,t,r,n){r&&Ee.push({path:e,ignoreGlobList:t,callback:r}),n()},unwatch:function(e,t){Ee=Ee.filter((function(t){return t.path!==e})),t()},unwatchAll:function(e){Ee=[],e()},reportUnlinkEvent:function(e){Ce(e,"deleted")},reportChangeEvent:function(e){Ce(e,"changed")},reportCreateEvent:function(e){Ce(e,"created")}}}.FsWatch,ke=b.Errors;const Be=b.ERR_CODES.ERROR_CODES;async function Me(e){return new Promise((async(t,r)=>{fs.stat(e,(async(e,n)=>{e&&e.code===Be.ENOENT?t(null):e?r(e):t(n)}))}))}async function Ue(e){return new Promise((async(t,r)=>{fs.mkdir(e,(async e=>{e&&e.code!==Be.EEXIST?r(e):t()}))}))}async function $e(e,t){return new Promise((async(r,n)=>{fs.readFile(e,(async(e,o)=>{e?n(e):fs.writeFile(t,o,(function(e){e?n(e):r()}))}))}))}async function qe(e,t){let r=await async function(e){return new Promise((async(t,r)=>{fs.readdir(e,(async(e,n)=>{e?r(e):t(n)}))}))}(e);for(let n of r){let r=`${e}/${n}`,o=`${t}/${n}`;(await Me(r)).isFile()?await $e(r,o):(await Ue(o),await qe(r,o))}}async function Ye(e,t,r){try{let n=await Me(e);if(!n)return void r(new ke.EIO(`Cannot copy src: ${e}`));if(n.isFile()){let n=await async function(e,t){let r=await Me(t);if(!r){let n=globalObject.path.dirname(t),o=globalObject.path.basename(t);if(r=await Me(n),r&&r.isDirectory()){let t=`${n}/${o}`;return await $e(e,t),t}throw new ke.EIO(`_copyFile Cannot create destination file: ${t}`)}let n=globalObject.path.basename(e);if(r&&r.isDirectory()){let r=`${t}/${n}`;return await $e(e,r),r}throw r&&r.isFile()?new ke.EEXIST(`_copyFile Destination file already exists: ${t}`):new ke.EIO(`_copyFile Cannot copy file, unknown destination: ${e} to ${t}`)}(e,t);r(null,n)}else if(n.isDirectory()){let n=await async function(e,t){let r=await Me(t);if(r&&r.isFile())throw new ke.EEXIST(`Destination file already exists: ${t}`);if(r&&r.isDirectory()){let n=`${t}/${globalObject.path.basename(e)}`;if(r=await Me(n),r)throw new ke.EEXIST(`Destination folder already exists: ${n}`);return await Ue(n),await qe(e,n),n}return await Ue(t),await qe(e,t),t}(e,t);r(null,n)}}catch(n){r(new ke.EIO(`${n}: Cannot copy src: ${e} to ${t}`))}}var Ve={globalCopy:function(e,t,r){Ye(globalObject.path.normalize(e),globalObject.path.normalize(t),r)}}.globalCopy;let ze=null,Ke=null;function He(e,t,r,n,o){const a=ze.path.normalize(t).split("/");if(r=r||s.umask(),(o=o||0)>=a.length)return n(null);var i=a.slice(0,o+1).join("/")||"/";e.stat(i,(function(a){null===a?He(e,t,r,n,o+1):e.mkdir(i,r,(function(a){if(a&&"EEXIST"!==a.code)return n(a);He(e,t,r,n,o+1)}))}))}function Qe(e){for(let t=0;t<e.length;t++)if("function"==typeof e[t])return t;return-1}function Xe(e,t){const r=ze.path.relative(e,t);return r&&!r.startsWith("..")&&!ze.path.isAbsolute(r)}const Je={mountNativeFolder:async function(...e){return me.mountNativeFolder(...e)},readdir:function(...e){let t=e[0];return ye.isMountPath(t)||ye.isMountSubPath(t)?me.readdir(...e):ze.fs.readdir(...e)},stat:function(...e){let t=e[0];return ye.isMountSubPath(t)?me.stat(...e):ze.fs.stat(...e)},readFile:function(...e){let t=e[0];return ye.isMountSubPath(t)?me.readFile(...e):ze.fs.readFile(...e)},writeFile:function(...e){let t=e[0];let r=Qe(e);return-1!==r&&(e.originalCallback=e[r],e[r]=function(...r){(r.length>=1?r[0]:null)||Le.reportChangeEvent(t),e.originalCallback&&e.originalCallback(...r)}),ye.isMountSubPath(t)?me.writeFile(...e):ze.fs.writeFile(...e)},mkdir:function(...e){let t=e[0];let r=Qe(e);return-1!==r&&(e.originalCallback=e[r],e[r]=function(...r){(r.length>=1?r[0]:null)||Le.reportCreateEvent(t),e.originalCallback&&e.originalCallback(...r)}),ye.isMountSubPath(t)?me.mkdir(...e):ze.fs.mkdir(...e)},rename:function(e,t,r){function n(...n){(n.length>=1?n[0]:null)||(Le.reportUnlinkEvent(e),Le.reportCreateEvent(t)),r&&r(...n)}if(!Xe(e,t)){if(ye.isMountPath(e)||ye.isMountPath(t))throw new N.EPERM("Mount root directory cannot be deleted.");return ye.isMountSubPath(e)&&ye.isMountSubPath(t)?me.rename(e,t,n):ze.fs.rename(e,t,n)}n(new N.EINVAL(`Error renaming: ${t} cannot be a subpath of ${e}`))},unlink:function(e,t){function r(...r){(r.length>=1?r[0]:null)||Le.reportUnlinkEvent(e),t&&t(...r)}if(ye.isMountPath(e))r(new N.EPERM("Mount root directory cannot be deleted."));else{if(ye.isMountSubPath(e))return me.unlink(e,r);if("string"==typeof e)return Ke.rm(e,{recursive:!0},r);r(new N.EINVAL("Invalid arguments."))}},copy:function(e,t,r){function n(...e){(e.length>=1?e[0]:null)||Le.reportCreateEvent(t),r&&r(...e)}if(!Xe(e,t))return ye.isMountSubPath(e)&&ye.isMountSubPath(t)?me.copy(e,t,n):Ve(e,t,n);n(new N.EINVAL(`Error copying: ${t} cannot be a subpath of ${e}`))},showSaveDialog:function(){throw new N.ENOSYS("Phoenix fs showSaveDialog function not yet supported.")},watch:function(...e){return Le.watch(...e)},unwatch:function(...e){return Le.unwatch(...e)},unwatchAll:function(...e){return Le.unwatchAll(...e)},moveToTrash:function(){throw new N.ENOSYS("Phoenix fs moveToTrash function not yet supported.")},mkdirs:function(e,t,r,n){"boolean"!=typeof r&&(n=r,r=!1),"function"!=typeof n&&(n=function(){}),r?He(Je,e,t,n):Je.mkdir(e,t,n)},BYTE_ARRAY_ENCODING:me.BYTE_ARRAY_ENCODING,ERR_NOT_FOUND:D.ERROR_CODES.ENOENT,ERR_EISDIR:D.ERROR_CODES.EISDIR,ERR_EINVAL:D.ERROR_CODES.EINVAL,ERR_FILE_EXISTS:D.ERROR_CODES.EEXIST};Je.copyFile=Je.copy,Je.name="phoenixFS",(0,{initFsLib:function(e){ze=e,Ke=new ze.fs.Shell,globalObject.path=e.path,globalObject.fs=Je,Je.mkdirs(ve.MOUNT_POINT_ROOT),me.refreshMountPoints()}}.initFsLib)(t)})();
//# sourceMappingURL=virtualfs.js.map