jocly
Version:
Board games 3D/2D UI and AI web library
2 lines • 73.8 kB
JavaScript
"use strict";function _typeof(e){"@babel/helpers - typeof";return(_typeof="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)}!function(e){if("object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Jocly=e()}}(function(){return function(){function e(t,r,n){function o(a,s){if(!r[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(i)return i(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var l=r[a]={exports:{}};t[a][0].call(l.exports,function(e){return o(t[a][1][e]||e)},l,l.exports,e,t,r,n)}return r[a].exports}for(var i="function"==typeof require&&require,a=0;a<n.length;a++)o(n[a]);return o}return e}()({1:[function(e,t,r){function n(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 o(e){var t=n(e),r=t[0],o=t[1];return 3*(r+o)/4-o}function i(e,t,r){return 3*(t+r)/4-r}function a(e){var t,r,o=n(e),a=o[0],s=o[1],u=new p(i(e,a,s)),f=0,l=s>0?a-4:a;for(r=0;r<l;r+=4)t=c[e.charCodeAt(r)]<<18|c[e.charCodeAt(r+1)]<<12|c[e.charCodeAt(r+2)]<<6|c[e.charCodeAt(r+3)],u[f++]=t>>16&255,u[f++]=t>>8&255,u[f++]=255&t;return 2===s&&(t=c[e.charCodeAt(r)]<<2|c[e.charCodeAt(r+1)]>>4,u[f++]=255&t),1===s&&(t=c[e.charCodeAt(r)]<<10|c[e.charCodeAt(r+1)]<<4|c[e.charCodeAt(r+2)]>>2,u[f++]=t>>8&255,u[f++]=255&t),u}function s(e){return l[e>>18&63]+l[e>>12&63]+l[e>>6&63]+l[63&e]}function u(e,t,r){for(var n,o=[],i=t;i<r;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(s(n));return o.join("")}function f(e){for(var t,r=e.length,n=r%3,o=[],i=0,a=r-n;i<a;i+=16383)o.push(u(e,i,i+16383>a?a:i+16383));return 1===n?(t=e[r-1],o.push(l[t>>2]+l[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],o.push(l[t>>10]+l[t>>4&63]+l[t<<2&63]+"=")),o.join("")}r.byteLength=o,r.toByteArray=a,r.fromByteArray=f;for(var l=[],c=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,g=d.length;h<g;++h)l[h]=d[h],c[d.charCodeAt(h)]=h;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63},{}],2:[function(e,t,r){},{}],3:[function(e,t,r){(function(t){(function(){function t(e){if(e>G)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,n.prototype),t}function n(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 s(e)}return o(e,t,r)}function o(e,t,r){if("string"==typeof e)return u(e,t);if(ArrayBuffer.isView(e))return l(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(N(e,ArrayBuffer)||e&&N(e.buffer,ArrayBuffer))return c(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(N(e,SharedArrayBuffer)||e&&N(e.buffer,SharedArrayBuffer)))return c(e,t,r);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 n.from(o,t,r);var i=p(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return n.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+_typeof(e))}function i(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 a(e,r,n){return i(e),e<=0?t(e):void 0!==r?"string"==typeof n?t(e).fill(r,n):t(e).fill(r):t(e)}function s(e){return i(e),t(e<0?0:0|d(e))}function u(e,r){if("string"==typeof r&&""!==r||(r="utf8"),!n.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var o=0|g(e,r),i=t(o),a=i.write(e,r);return a!==o&&(i=i.slice(0,a)),i}function f(e){for(var r=e.length<0?0:0|d(e.length),n=t(r),o=0;o<r;o+=1)n[o]=255&e[o];return n}function l(e){if(N(e,Uint8Array)){var t=new Uint8Array(e);return c(t.buffer,t.byteOffset,t.byteLength)}return f(e)}function c(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var o;return o=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(o,n.prototype),o}function p(e){if(n.isBuffer(e)){var r=0|d(e.length),o=t(r);return 0===o.length?o:(e.copy(o,0,0,r),o)}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?t(0):f(e):"Buffer"===e.type&&Array.isArray(e.data)?f(e.data):void 0}function d(e){if(e>=G)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+G.toString(16)+" bytes");return 0|e}function h(e){return+e!=e&&(e=0),n.alloc(+e)}function g(e,t){if(n.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||N(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 r=e.length,o=arguments.length>2&&!0===arguments[2];if(!o&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(e).length;default:if(i)return o?-1:D(e).length;t=(""+t).toLowerCase(),i=!0}}function y(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,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return j(this,t,r);case"latin1":case"binary":return L(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,o,i){if(0===e.length)return-1;if("string"==typeof r?(o=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,J(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=n.from(t,o)),n.isBuffer(t))return 0===t.length?-1:b(e,t,r,o,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,o,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,o){function i(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=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;a=2,s/=2,u/=2,r/=2}var f;if(o){var l=-1;for(f=r;f<s;f++)if(i(e,f)===i(t,-1===l?0:f-l)){if(-1===l&&(l=f),f-l+1===u)return l*a}else-1!==l&&(f-=f-l),l=-1}else for(r+u>s&&(r=s-u),f=r;f>=0;f--){for(var c=!0,p=0;p<u;p++)if(i(e,f+p)!==i(t,p)){c=!1;break}if(c)return f}return-1}function w(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=t.length;n>i/2&&(n=i/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(J(s))return a;e[r+a]=s}return a}function E(e,t,r,n){return z(D(t,e.length-r),e,r,n)}function x(e,t,r,n){return z(F(t),e,r,n)}function k(e,t,r,n){return z(q(t),e,r,n)}function O(e,t,r,n){return z(K(t,e.length-r),e,r,n)}function S(e,t,r){return 0===t&&r===e.length?W.fromByteArray(e):W.fromByteArray(e.slice(t,r))}function A(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i=e[o],a=null,s=i>239?4:i>223?3:i>191?2:1;if(o+s<=r){var u,f,l,c;switch(s){case 1:i<128&&(a=i);break;case 2:u=e[o+1],128==(192&u)&&(c=(31&i)<<6|63&u)>127&&(a=c);break;case 3:u=e[o+1],f=e[o+2],128==(192&u)&&128==(192&f)&&(c=(15&i)<<12|(63&u)<<6|63&f)>2047&&(c<55296||c>57343)&&(a=c);break;case 4:u=e[o+1],f=e[o+2],l=e[o+3],128==(192&u)&&128==(192&f)&&128==(192&l)&&(c=(15&i)<<18|(63&u)<<12|(63&f)<<6|63&l)>65535&&c<1114112&&(a=c)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),o+=s}return _(n)}function _(e){var t=e.length;if(t<=Z)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=Z));return r}function j(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 L(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 R(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=t;i<r;++i)o+=X[e[i]];return o}function U(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length-1;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function M(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 P(e,t,r,o,i,a){if(!n.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(r+o>e.length)throw new RangeError("Index out of range")}function C(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function T(e,t,r,n,o){return t=+t,r>>>=0,o||C(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),$.write(e,t,r,n,23,4),r+4}function I(e,t,r,n,o){return t=+t,r>>>=0,o||C(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),$.write(e,t,r,n,52,8),r+8}function B(e){if(e=e.split("=")[0],e=e.trim().replace(H,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function D(e,t){t=t||1/0;for(var r,n=e.length,o=null,i=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.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;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function F(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function K(e,t){for(var r,n,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}function q(e){return W.toByteArray(B(e))}function z(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 N(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!==e}var W=e("base64-js"),$=e("ieee754"),Y="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=n,r.SlowBuffer=h,r.INSPECT_MAX_BYTES=50;var G=2147483647;r.kMaxLength=G,n.TYPED_ARRAY_SUPPORT=function(){try{var 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}}(),n.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(n.prototype,"parent",{enumerable:!0,get:function(){if(n.isBuffer(this))return this.buffer}}),Object.defineProperty(n.prototype,"offset",{enumerable:!0,get:function(){if(n.isBuffer(this))return this.byteOffset}}),n.poolSize=8192,n.from=function(e,t,r){return o(e,t,r)},Object.setPrototypeOf(n.prototype,Uint8Array.prototype),Object.setPrototypeOf(n,Uint8Array),n.alloc=function(e,t,r){return a(e,t,r)},n.allocUnsafe=function(e){return s(e)},n.allocUnsafeSlow=function(e){return s(e)},n.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==n.prototype},n.compare=function(e,t){if(N(e,Uint8Array)&&(e=n.from(e,e.offset,e.byteLength)),N(t,Uint8Array)&&(t=n.from(t,t.offset,t.byteLength)),!n.isBuffer(e)||!n.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,o=t.length,i=0,a=Math.min(r,o);i<a;++i)if(e[i]!==t[i]){r=e[i],o=t[i];break}return r<o?-1:o<r?1:0},n.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}},n.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return n.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var o=n.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var a=e[r];if(N(a,Uint8Array))i+a.length>o.length?n.from(a).copy(o,i):Uint8Array.prototype.set.call(o,a,i);else{if(!n.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(o,i)}i+=a.length}return o},n.byteLength=g,n.prototype._isBuffer=!0,n.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)m(this,t,t+1);return this},n.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)m(this,t,t+3),m(this,t+1,t+2);return this},n.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)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},n.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?A(this,0,e):y.apply(this,arguments)},n.prototype.toLocaleString=n.prototype.toString,n.prototype.equals=function(e){if(!n.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===n.compare(this,e)},n.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+">"},Y&&(n.prototype[Y]=n.prototype.inspect),n.prototype.compare=function(e,t,r,o,i){if(N(e,Uint8Array)&&(e=n.from(e,e.offset,e.byteLength)),!n.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+_typeof(e));if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===o&&(o=0),void 0===i&&(i=this.length),t<0||r>e.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&t>=r)return 0;if(o>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,o>>>=0,i>>>=0,this===e)return 0;for(var a=i-o,s=r-t,u=Math.min(a,s),f=this.slice(o,i),l=e.slice(t,r),c=0;c<u;++c)if(f[c]!==l[c]){a=f[c],s=l[c];break}return a<s?-1:s<a?1:0},n.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},n.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},n.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)},n.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 i=!1;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":case"latin1":case"binary":return x(this,e,t,r);case"base64":return k(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;n.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var o=this.subarray(e,t);return Object.setPrototypeOf(o,n.prototype),o},n.prototype.readUintLE=n.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},n.prototype.readUintBE=n.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},n.prototype.readUint8=n.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},n.prototype.readUint16LE=n.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},n.prototype.readUint16BE=n.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},n.prototype.readUint32LE=n.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},n.prototype.readUint32BE=n.prototype.readUInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},n.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},n.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},n.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},n.prototype.readInt16LE=function(e,t){e>>>=0,t||M(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt16BE=function(e,t){e>>>=0,t||M(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},n.prototype.readInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},n.prototype.readFloatLE=function(e,t){return e>>>=0,t||M(e,4,this.length),$.read(this,e,!0,23,4)},n.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),$.read(this,e,!1,23,4)},n.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),$.read(this,e,!0,52,8)},n.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),$.read(this,e,!1,52,8)},n.prototype.writeUintLE=n.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){P(this,e,t,r,Math.pow(2,8*r)-1,0)}var o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},n.prototype.writeUintBE=n.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){P(this,e,t,r,Math.pow(2,8*r)-1,0)}var o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},n.prototype.writeUint8=n.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,255,0),this[t]=255&e,t+1},n.prototype.writeUint16LE=n.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},n.prototype.writeUint16BE=n.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},n.prototype.writeUint32LE=n.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(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},n.prototype.writeUint32BE=n.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(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},n.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);P(this,e,t,r,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<r&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+r},n.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);P(this,e,t,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+r},n.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},n.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},n.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},n.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(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},n.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(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},n.prototype.writeFloatLE=function(e,t,r){return T(this,e,t,!0,r)},n.prototype.writeFloatBE=function(e,t,r){return T(this,e,t,!1,r)},n.prototype.writeDoubleLE=function(e,t,r){return I(this,e,t,!0,r)},n.prototype.writeDoubleBE=function(e,t,r){return I(this,e,t,!1,r)},n.prototype.copy=function(e,t,r,o){if(!n.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),o||0===o||(o=this.length),t>=e.length&&(t=e.length),t||(t=0),o>0&&o<r&&(o=r),o===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("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-t<o-r&&(o=e.length-t+r);var i=o-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,o):Uint8Array.prototype.set.call(e,this.subarray(r,o),t),i},n.prototype.fill=function(e,t,r,o){if("string"==typeof e){if("string"==typeof t?(o=t,t=0,r=this.length):"string"==typeof r&&(o=r,r=this.length),void 0!==o&&"string"!=typeof o)throw new TypeError("encoding must be a string");if("string"==typeof o&&!n.isEncoding(o))throw new TypeError("Unknown encoding: "+o);if(1===e.length){var i=e.charCodeAt(0);("utf8"===o&&i<128||"latin1"===o)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a<r;++a)this[a]=e;else{var s=n.isBuffer(e)?e:n.from(e,o),u=s.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<r-t;++a)this[a+t]=s[a%u]}return this};var H=/[^+/0-9A-Za-z-_]/g,X=function(){for(var e=new Array(256),t=0;t<16;++t)for(var r=16*t,n=0;n<16;++n)e[r+n]="0123456789abcdef"[t]+"0123456789abcdef"[n];return e}()}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":1,buffer:3,ieee754:4}],4:[function(e,t,r){r.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,f=u>>1,l=-7,c=r?o-1:0,p=r?-1:1,d=e[t+c];for(c+=p,i=d&(1<<-l)-1,d>>=-l,l+=s;l>0;i=256*i+e[t+c],c+=p,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+e[t+c],c+=p,l-=8);if(0===i)i=1-f;else{if(i===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),i-=f}return(d?-1:1)*a*Math.pow(2,i-n)},r.write=function(e,t,r,n,o,i){var a,s,u,f=8*i-o-1,l=(1<<f)-1,c=l>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:i-1,h=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+c>=1?p/u:p*Math.pow(2,1-c),t*u>=2&&(a++,u/=2),a+c>=l?(s=0,a=l):a+c>=1?(s=(t*u-1)*Math.pow(2,o),a+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,o),a=0));o>=8;e[r+d]=255&s,d+=h,s/=256,o-=8);for(a=a<<o|s,f+=o;f>0;e[r+d]=255&a,d+=h,a/=256,f-=8);e[r+d-h]|=128*g}},{}],5:[function(e,t,r){function n(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function a(e){if(p===clearTimeout)return clearTimeout(e);if((p===o||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function s(){y&&h&&(y=!1,h.length?g=h.concat(g):m=-1,g.length&&u())}function u(){if(!y){var e=i(s);y=!0;for(var t=g.length;t;){for(h=g,g=[];++m<t;)h&&h[m].run();m=-1,t=g.length}h=null,y=!1,a(e)}}function f(e,t){this.fun=e,this.array=t}function l(){}var c,p,d=t.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:n}catch(e){c=n}try{p="function"==typeof clearTimeout?clearTimeout:o}catch(e){p=o}}();var h,g=[],y=!1,m=-1;d.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];g.push(new f(e,t)),1!==g.length||y||i(u)},f.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=l,d.addListener=l,d.once=l,d.off=l,d.removeListener=l,d.removeAllListeners=l,d.emit=l,d.prependListener=l,d.prependOnceListener=l,d.listeners=function(e){return[]},d.binding=function(e){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(e){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},{}],6:[function(e,t,r){(function(r,n,o,i,a,s,u,f){(function(){!function(){function i(e){return ht?Symbol():"@@"+e}function a(e,t){lt||(t=t.replace(pt?/file:\/\/\//g:/file:\/\//g,""));var r,n=(e.message||e)+"\n "+t;r=mt&&e.fileName?new Error(n,e.fileName,e.lineNumber):new Error(n);var o=e.originalErr?e.originalErr.stack:e.stack;return r.stack=ct?n+"\n "+o:o,r.originalErr=e.originalErr||e,r}function s(e,t){throw new RangeError('Unable to resolve "'+e+'" to '+t)}function u(e,t){e=e.trim();var r=t&&t.substr(0,t.indexOf(":")+1),n=e[0],o=e[1];if("/"===n&&"/"===o)return r||s(e,t),r+e;if("."===n&&("/"===o||"."===o&&("/"===e[2]||2===e.length&&(e+="/"))||1===e.length&&(e+="/"))||"/"===n){var i,a=!r||"/"!==t[r.length];if(a?(void 0===t&&s(e,t),i=t):i="/"===t[r.length+1]?"file:"!==r?(i=t.substr(r.length+2)).substr(i.indexOf("/")+1):t.substr(8):t.substr(r.length+1),"/"===n){if(!a)return t.substr(0,t.length-i.length-1)+e;s(e,t)}for(var u=i.substr(0,i.lastIndexOf("/")+1)+e,f=[],l=-1,c=0;c<u.length;c++)if(-1===l)if("."!==u[c])l=c;else{if("."!==u[c+1]||"/"!==u[c+2]&&c+2!==u.length){if("/"!==u[c+1]&&c+1!==u.length){l=c;continue}c+=1}else f.pop(),c+=2;a&&0===f.length&&s(e,t)}else"/"===u[c]&&(f.push(u.substring(l,c+1)),l=-1);return-1!==l&&f.push(u.substr(l)),t.substr(0,t.length-i.length)+f.join("")}return-1!==e.indexOf(":")?ct&&":"===e[1]&&"\\"===e[2]&&e[0].match(/[a-z]/i)?"file:///"+e.replace(/\\/g,"/"):e:void 0}function l(e){if(e.values)return e.values();if("undefined"==typeof Symbol||!Symbol.iterator)throw new Error("Symbol.iterator not supported in this browser");var t={};return t[Symbol.iterator]=function(){var t=Object.keys(e),r=0;return{next:function(){return r<t.length?{value:e[t[r++]],done:!1}:{value:void 0,done:!0}}}},t}function c(){this.registry=new h}function p(e){if(!(e instanceof g))throw new TypeError("Module instantiation did not return a valid namespace object.");return e}function d(e){if(void 0===e)throw new RangeError("No resolution found.");return e}function h(){this[xt]={}}function g(e){Object.defineProperty(this,kt,{value:e}),Object.keys(e).forEach(y,this)}function y(e){Object.defineProperty(this,e,{enumerable:!0,get:function(){return this[kt][e]}})}function m(){c.call(this);var e=this.registry.delete;this.registry.delete=function(r){var n=e.call(this,r);return t.hasOwnProperty(r)&&!t[r].linkRecord&&(delete t[r],n=!0),n};var t={};this[Ot]={lastRegister:void 0,records:t},this.trace=!1}function v(e,t,r){return e.records[t]={key:t,registration:r,module:void 0,importerSetters:void 0,loadError:void 0,evalError:void 0,linkRecord:{instantiatePromise:void 0,dependencies:void 0,execute:void 0,executingRequire:!1,moduleObj:void 0,setters:void 0,depsInstantiatePromise:void 0,dependencyInstantiations:void 0}}}function b(e,t,r,n,o){var i=n[t];if(i)return Promise.resolve(i);var a=o.records[t];return a&&!a.module?a.loadError?Promise.reject(a.loadError):E(e,a,a.linkRecord,n,o):e.resolve(t,r).then(function(t){if(i=n[t])return i;if((a=o.records[t])&&!a.module||(a=v(o,t,a&&a.registration)),a.loadError)return Promise.reject(a.loadError);var r=a.linkRecord;return r?E(e,a,r,n,o):a})}function w(e,t,r){return function(){var e=r.lastRegister;return e?(r.lastRegister=void 0,t.registration=e,!0):!!t.registration}}function E(e,t,r,n,o){return r.instantiatePromise||(r.instantiatePromise=(t.registration?Promise.resolve():Promise.resolve().then(function(){return o.lastRegister=void 0,e[St](t.key,e[St].length>1&&w(e,t,o))})).then(function(i){if(void 0!==i){if(!(i instanceof g))throw new TypeError("Instantiate did not return a valid Module object.");return delete o.records[t.key],e.trace&&k(e,t,r),n[t.key]=i}var a=t.registration;if(t.registration=void 0,!a)throw new TypeError("Module instantiation did not call an anonymous or correctly named System.register.");return r.dependencies=a[0],t.importerSetters=[],r.moduleObj={},a[2]?(r.moduleObj.default=r.moduleObj.__useDefault={},r.executingRequire=a[1],r.execute=a[2]):O(e,t,r,a[1]),t}).catch(function(e){throw t.linkRecord=void 0,t.loadError=t.loadError||a(e,"Instantiating "+t.key)}))}function x(e,t,r,n,o,i){return e.resolve(t,r).then(function(r){i&&(i[t]=r);var a=o.records[r],s=n[r];if(s&&(!a||a.module&&s!==a.module))return s;if(a&&a.loadError)throw a.loadError;(!a||!s&&a.module)&&(a=v(o,r,a&&a.registration));var u=a.linkRecord;return u?E(e,a,u,n,o):a})}function k(e,t,r){e.loads=e.loads||{},e.loads[t.key]={key:t.key,deps:r.dependencies,dynamicDeps:[],depMap:r.depMap||{}}}function O(e,t,r,n){var o=r.moduleObj,i=t.importerSetters,a=!1,s=n.call(dt,function(e,t){if("object"==_typeof(e)){var r=!1;for(var n in e)t=e[n],"__useDefault"===n||n in o&&o[n]===t||(r=!0,o[n]=t);if(!1===r)return t}else{if((a||e in o)&&o[e]===t)return t;o[e]=t}for(var s=0;s<i.length;s++)i[s](o);return t},new _(e,t.key));r.setters=s.setters,r.execute=s.execute,s.exports&&(r.moduleObj=o=s.exports,a=!0)}function S(e,t,r,n,o){if(r.depsInstantiatePromise)return r.depsInstantiatePromise;for(var i=Array(r.dependencies.length),s=0;s<r.dependencies.length;s++)i[s]=x(e,r.dependencies[s],t.key,n,o,e.trace&&r.depMap||(r.depMap={}));var u=Promise.all(i).then(function(e){if(r.dependencyInstantiations=e,r.setters)for(var n=0;n<e.length;n++){var o=r.setters[n];if(o){var i=e[n];if(i instanceof g)o(i);else{if(i.loadError)throw i.loadError;o(i.module||i.linkRecord.moduleObj),i.importerSetters&&i.importerSetters.push(o)}}}return t});return e.trace&&(u=u.then(function(){return k(e,t,r),t})),(u=u.catch(function(e){throw r.depsInstantiatePromise=void 0,a(e,"Loading "+t.key)})).catch(function(){}),r.depsInstantiatePromise=u}function A(e,t,r,n,o){return new Promise(function(r,i){function a(t){var r=t.linkRecord;r&&-1===u.indexOf(t)&&(u.push(t),f++,S(e,t,r,n,o).then(s,i))}function s(e){f--
;var t=e.linkRecord;if(t)for(var n=0;n<t.dependencies.length;n++){var o=t.dependencyInstantiations[n];o instanceof g||a(o)}0===f&&r()}var u=[],f=0;a(t)})}function _(e,t){this.loader=e,this.key=this.id=t,this.meta={url:t}}function j(e,t,r,n,o,i){if(t.module)return t.module;if(t.evalError)throw t.evalError;if(i&&-1!==i.indexOf(t))return t.linkRecord.moduleObj;var a=R(e,t,r,n,o,r.setters?[]:i||[]);if(a)throw a;return t.module}function L(e,t,r,n,o,i,a){return function(s){for(var u=0;u<r.length;u++)if(r[u]===s){var f,l=n[u];return f=l instanceof g?l:j(e,l,l.linkRecord,o,i,a),"__useDefault"in f?f.__useDefault:f}throw new Error("Module "+s+" not declared as a System.registerDynamic dependency of "+t)}}function R(e,t,r,n,o,i){i.push(t);var s;if(r.setters)for(var u,f,l=0;l<r.dependencies.length;l++)if(!((u=r.dependencyInstantiations[l])instanceof g)&&((f=u.linkRecord)&&-1===i.indexOf(u)&&(s=u.evalError?u.evalError:R(e,u,f,n,o,f.setters?i:[])),s))return t.linkRecord=void 0,t.evalError=a(s,"Evaluating "+t.key),t.evalError;if(r.execute)if(r.setters)s=U(r.execute);else{var c={id:t.key},p=r.moduleObj;Object.defineProperty(c,"exports",{configurable:!0,set:function(e){p.default=p.__useDefault=e},get:function(){return p.__useDefault}});var d=L(e,t.key,r.dependencies,r.dependencyInstantiations,n,o,i);if(!r.executingRequire)for(l=0;l<r.dependencies.length;l++)d(r.dependencies[l]);s=M(r.execute,d,p.default,c),c.exports!==p.__useDefault&&(p.default=p.__useDefault=c.exports);var h=p.default;if(h&&h.__esModule)for(var y in h)Object.hasOwnProperty.call(h,y)&&(p[y]=h[y])}if(t.linkRecord=void 0,s)return t.evalError=a(s,"Evaluating "+t.key);if(n[t.key]=t.module=new g(r.moduleObj),!r.setters){if(t.importerSetters)for(l=0;l<t.importerSetters.length;l++)t.importerSetters[l](t.module);t.importerSetters=void 0}}function U(e){try{e.call(At)}catch(e){return e}}function M(e,t,r,n){try{var o=e.call(dt,t,r,n);void 0!==o&&(n.exports=o)}catch(e){return e}}function P(){}function C(e){return e instanceof g?e:new g(e&&e.__esModule?e:{default:e,__useDefault:e})}function T(e){return void 0===_t&&(_t="undefined"!=typeof Symbol&&!!Symbol.toStringTag),e instanceof g||_t&&"[object Module]"==Object.prototype.toString.call(e)}function I(e,t){(t||this.warnings&&"undefined"!=typeof console&&console.warn)&&console.warn(e)}function B(e,t,r){var n=new Uint8Array(t);return 0===n[0]&&97===n[1]&&115===n[2]?WebAssembly.compile(t).then(function(t){var n=[],o=[],i={};return WebAssembly.Module.imports&&WebAssembly.Module.imports(t).forEach(function(e){var t=e.module;o.push(function(e){i[t]=e}),-1===n.indexOf(t)&&n.push(t)}),e.register(n,function(e){return{setters:o,execute:function(){e(new WebAssembly.Instance(t,i).exports)}}}),r(),!0}):Promise.resolve(!1)}function D(e,t){if("."===e[0])throw new Error("Node module "+e+" can't be loaded as it is not a package require.");if(!jt){var r=this._nodeRequire("module"),n=decodeURI(t.substr(pt?8:7));(jt=new r(n)).paths=r._nodeModulePaths(n)}return jt.require(e)}function F(e,t){for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function K(e,t){for(var r in t)Object.hasOwnProperty.call(t,r)&&void 0===e[r]&&(e[r]=t[r]);return e}function q(e,t,r){for(var n in t)if(Object.hasOwnProperty.call(t,n)){var o=t[n];void 0===e[n]?e[n]=o:o instanceof Array&&e[n]instanceof Array?e[n]=[].concat(r?o:e[n]).concat(r?e[n]:o):"object"==_typeof(o)&&null!==o&&"object"==_typeof(e[n])?e[n]=(r?K:F)(F({},e[n]),o):r||(e[n]=o)}}function z(e){if(Ct||Tt){var t=document.createElement("link");Ct?(t.rel="preload",t.as="script"):t.rel="prefetch",t.href=e,document.head.appendChild(t)}else(new Image).src=e}function N(e,t,r){try{importScripts(e)}catch(e){r(e)}t()}function J(e,t,r,n,o){function i(){n(),s()}function a(t){s(),o(new Error("Fetching "+e))}function s(){for(var e=0;e<It.length;e++)if(It[e].err===a){It.splice(e,1);break}u.removeEventListener("load",i,!1),u.removeEventListener("error",a,!1),document.head.removeChild(u)}if(e=e.replace(/#/g,"%23"),Pt)return N(e,n,o);var u=document.createElement("script");u.type="text/javascript",u.charset="utf-8",u.async=!0,t&&(u.crossOrigin=t),r&&(u.integrity=r),u.addEventListener("load",i,!1),u.addEventListener("error",a,!1),u.src=e,document.head.appendChild(u)}function W(e,t){for(var r=e.split(".");r.length;)t=t[r.shift()];return t}function $(e,t,r){var n=G(t,r);if(n){var o=t[n]+r.substr(n.length),i=u(o,ft);return void 0!==i?i:e+o}return-1!==r.indexOf(":")?r:e+r}function Y(e){var t=this.name;if(t.substr(0,e.length)===e&&(t.length===e.length||"/"===t[e.length]||"/"===e[e.length-1]||":"===e[e.length-1])){var r=e.split("/").length;r>this.len&&(this.match=e,this.len=r)}}function G(e,t){if(Object.hasOwnProperty.call(e,t))return t;var r={name:t,match:void 0,len:0};return Object.keys(e).forEach(Y,r),r.match}function Z(e,t,r,n){if("file:///"===e.substr(0,8)){if(qt)return H(e,t,r,n);throw new Error("Unable to fetch file URLs in this environment.")}e=e.replace(/#/g,"%23");var o={headers:{Accept:"application/x-es-module, */*"}};return r&&(o.integrity=r),t&&("string"==typeof t&&(o.headers.Authorization=t),o.credentials="include"),fetch(e,o).then(function(e){if(e.ok)return n?e.arrayBuffer():e.text();throw new Error("Fetch error: "+e.status+" "+e.statusText)})}function H(e,t,r,n){return new Promise(function(r,o){function i(){r(n?s.response:s.responseText)}function a(){o(new Error("XHR error: "+(s.status?" ("+s.status+(s.statusText?" "+s.statusText:"")+")":"")+" loading "+e))}e=e.replace(/#/g,"%23");var s=new XMLHttpRequest;n&&(s.responseType="arraybuffer"),s.onreadystatechange=function(){4===s.readyState&&(0==s.status?s.response?i():(s.addEventListener("error",a),s.addEventListener("load",i)):200===s.status?i():a())},s.open("GET",e,!0),s.setRequestHeader&&(s.setRequestHeader("Accept","application/x-es-module, */*"),t&&("string"==typeof t&&s.setRequestHeader("Authorization",t),s.withCredentials=!0)),s.send(null)})}function X(t,r,n,o){return"file:///"!=t.substr(0,8)?Promise.reject(new Error('Unable to fetch "'+t+'". Only file URLs of the form file:/// supported running in Node.')):(Dt=Dt||e("fs"),t=pt?t.replace(/\//g,"\\").substr(8):t.substr(7),new Promise(function(e,r){Dt.readFile(t,function(t,n){if(t)return r(t);if(o)e(n);else{var i=n+"";"\ufeff"===i[0]&&(i=i.substr(1)),e(i)}})}))}function V(){throw new Error("No fetch method is defined for this environment.")}function Q(){return{pluginKey:void 0,pluginArgument:void 0,pluginModule:void 0,packageKey:void 0,packageConfig:void 0,load:void 0}}function ee(e,t,r){var n=Q();if(r){var o;t.pluginFirst?-1!==(o=r.lastIndexOf("!"))&&(n.pluginArgument=n.pluginKey=r.substr(0,o)):-1!==(o=r.indexOf("!"))&&(n.pluginArgument=n.pluginKey=r.substr(o+1)),n.packageKey=G(t.packages,r),n.packageKey&&(n.packageConfig=t.packages[n.packageKey])}return n}function te(e,t){var r=this[Ut],n=Q(),o=ee(this,r,t),i=this;return Promise.resolve().then(function(){var r=e.lastIndexOf("#?");if(-1===r)return Promise.resolve(e);var n=Ee.call(i,e.substr(r+2));return xe.call(i,n,t,!0).then(function(t){return t?e.substr(0,r):"@empty"})}).then(function(e){var a=fe(r.pluginFirst,e);return a?(n.pluginKey=a.plugin,Promise.all([ae.call(i,r,a.argument,o&&o.pluginArgument||t,n,o,!0),i.resolve(a.plugin,t)]).then(function(e){if(n.pluginArgument=e[0],n.pluginKey=e[1],n.pluginArgument===n.pluginKey)throw new Error("Plugin "+n.pluginArgument+" cannot load itself, make sure it is excluded from any wildcard meta configuration via a custom loader: false rule.");return le(r.pluginFirst,e[0],e[1])})):ae.call(i,r,e,o&&o.pluginArgument||t,n,o,!1)}).then(function(e){return ke.call(i,e,t,o)}).then(function(e){return ue.call(i,r,e,n),n.pluginKey||!n.load.loader?e:i.resolve(n.load.loader,e).then(function(t){return n.pluginKey=t,n.pluginArgument=e,e})}).then(function(e){return i[Mt][e]=n,e})}function re(e,t){var r=fe(e.pluginFirst,t);if(r){var n=re.call(this,e,r.plugin);return le(e.pluginFirst,oe.call(this,e,r.argument,void 0,!1,!1),n)}return oe.call(this,e,t,void 0,!1,!1)}function ne(e,t){var r=this[Ut],n=Q(),o=o||ee(this,r,t),i=fe(r.pluginFirst,e);return i?(n.pluginKey=ne.call(this,i.plugin,t),le(r.pluginFirst,ie.call(this,r,i.argument,o.pluginArgument||t,n,o,!!n.pluginKey),n.pluginKey)):ie.call(this,r,e,o.pluginArgument||t,n,o,!!n.pluginKey)}function oe(e,t,r,n,o){var i=u(t,r||ft);if(i)return $(e.baseURL,e.paths,i);if(n){var a=G(e.map,t);if(a&&(t=e.map[a]+t.substr(a.length),i=u(t,ft)))return $(e.baseURL,e.paths,i)}if(this.registry.has(t))return t;if("@node/"===t.substr(0,6))return t;var s=o&&"/"!==t[t.length-1],f=$(e.baseURL,e.paths,s?t+"/":t);return s?f.substr(0,f.length-1):f}function ie(e,t,r,n,o,i){if(o&&o.packageConfig&&"."!==t[0]){var a=o.packageConfig.map,s=a&&G(a,t);if(s&&"string"==typeof a[s]){var u=he(this,e,o.packageConfig,o.packageKey,s,t,n,i);if(u)return u}}var f=oe.call(this,e,t,r,!0,!0),l=ve(e,f);if(n.packageKey=l&&l.packageKey||G(e.packages,f),!n.packageKey)return f;if(-1!==e.packageConfigKeys.indexOf(f))return n.packageKey=void 0,f;n.packageConfig=e.packages[n.packageKey]||(e.packages[n.packageKey]=Le());var c=f.substr(n.packageKey.length+1);return pe(this,e,n.packageConfig,n.packageKey,c,n,i)}function ae(e,t,r,n,o,i){var a=this;return Lt.then(function(){if(o&&o.packageConfig&&"./"!==t.substr(0,2)){var r=o.packageConfig.map,s=r&&G(r,t);if(s)return ye(a,e,o.packageConfig,o.packageKey,s,t,n,i)}return Lt}).then(function(o){if(o)return o;var s=oe.call(a,e,t,r,!0,!0),u=ve(e,s);return n.packageKey=u&&u.packageKey||G(e.packages,s),n.packageKey?-1!==e.packageConfigKeys.indexOf(s)?(n.packageKey=void 0,n.load=se(),n.load.format="json",n.load.loader="",Promise.resolve(s)):(n.packageConfig=e.packages[n.packageKey]||(e.packages[n.packageKey]=Le()),(u&&!n.packageConfig.configured?be(a,e,u.configPath,n):Lt).then(function(){var t=s.substr(n.packageKey.length+1);return ge(a,e,n.packageConfig,n.packageKey,t,n,i)})):Promise.resolve(s)})}function se(){return{extension:"",deps:void 0,format:void 0,loader:void 0,scriptLoad:void 0,globals:void 0,nonce:void 0,integrity:void 0,sourceMap:void 0,exports:void 0,encapsulateGlobal:!1,crossOrigin:void 0,cjsRequireDetection:!0,cjsDeferDepsExecute:!1,esModule:!1}}function ue(e,t,r){r.load=r.load||se();var n,o=0;for(var i in e.meta)if(-1!==(n=i.indexOf("*"))&&i.substr(0,n)===t.substr(0,n)&&i.substr(n+1)===t.substr(t.length-i.length+n+1)){var a=i.split("/").length;a>o&&(o=a),q(r.load,e.meta[i],o!==a)}if(e.meta[t]&&q(r.load,e.meta[t],!1),r.packageKey){var s=t.substr(r.packageKey.length+1),u={};r.packageConfig.meta&&(o=0,we(r.packageConfig.meta,s,function(e,t,r){r>o&&(o=r),q(u,t,r&&o>r)}),q(r.load,u,!1)),!r.packageConfig.format||r.pluginKey||r.load.loader||(r.load.format=r.load.format||r.packageConfig.format)}}function fe(e,t){var r,n,o=e?t.indexOf("!"):t.lastIndexOf("!");if(-1!==o)return e?(r=t.substr(o+1),n=t.substr(0,o)):(r=t.substr(0,o),n=t.substr(o+1)||r.substr(r.lastIndexOf(".")+1)),{argument:r,plugin:n}}function le(e,t,r){return e?r+"!"+t:t+"!"+r}function ce(e,t,r,n,o){if(!n||!t.defaultExtension||"/"===n[n.length-1]||o)return n;var i=!1;if(t.meta&&we(t.meta,n,function(e,t,r){if(0===r||e.lastIndexOf("*")!==e.length-1)return i=!0}),!i&&e.meta&&we(e.meta,r+"/"+n,function(e,t,r){if(0===r||e.lastIndexOf("*")!==e.length-1)return i=!0}),i)return n;var a="."+t.defaultExtension;return n.substr(n.length-a.length)!==a?n+a:n}function pe(e,t,r,n,o,i,a){if(!o){if(!r.main)return n;o="./"===r.main.substr(0,2)?r.main.substr(2):r.main}if(r.map){var s="./"+o,u=G(r.map,s);if(u||(s="./"+ce(t,r,n,o,a))!="./"+o&&(u=G(r.map,s)),u){var f=he(e,t,r,n,u,s,i,a);if(f)return f}}return n+"/"+ce(t,r,n,o,a)}function de(e,t,r){return!(t.substr(0,e.length)===e&&r.length>e.length)}function he(e,t,r,n,o,i,a,s){"/"===i[i.length-1]&&(i=i.substr(0,i.length-1));var u=r.map[o];if("object"==_typeof(u))throw new Error("Synchronous conditional normalization not supported sync normalizing "+o+" in "+n);if(de(o,u,i)&&"string"==typeof u)return ie.call(e,t,u+i.substr(o.length),n+"/",a,a,s)}function ge(e,t,r,n,o,i,a){if(!o){if(!r.main)return Promise.resolve(n);o="./"===r.main.substr(0,2)?r.main.substr(2):r.main}var s,u;return r.map&&(s="./"+o,(u=G(r.map,s))||(s="./"+ce(t,r,n,o,a))!="./"+o&&(u=G(r.map,s))),(u?ye(e,t,r,n,u,s,i,a):Lt).then(function(e){return e?Promise.resolve(e):Promise.resolve(n+"/"+ce(t,r,n,o,a))})}function ye(e,t,r,n,o,i,a,s){"/"===i[i.length-1]&&(i=i.substr(0,i.length-1));var u=r.map[o];if("string"==typeof u)return de(o,u,i)?ae.call(e,t,u+i.substr(o.length),n+"/",a,a,s).then(function(t){return ke.call(e,t,n+"/",a)}):Lt;var f=[],l=[];for(var c in u){var p=Ee(c);l.push({condition:p,map:u[c]}),f.push(m.prototype.import.call(e,p.module,n))}return Promise.all(f).then(function(e){for(var t=0;t<l.length;t++){var r=l[t].condition,n=W(r.prop,"__useDefault"in e[t]?e[t].__useDefault:e[t]);if(!r.negate&&n||r.negate&&!n)return l[t].map}}).then(function(r){if(r)return de(o,r,i)?ae.call(e,t,r+i.substr(o.length),n+"/",a,a,s).then(function(t){return ke.call(e,t,n+"/",a)}):Lt})}function me(e){var t=e.lastIndexOf("*"),r=Math.max(t+1,e.lastIndexOf("/"));return{length:r,regEx:new RegExp("^("+e.substr(0,r).replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,"[^\\/]+")+")(\\/|$)"),wildcard:-1!==t}}function ve(e,t){for(var r,n,o=!1,i=0;i<e.packageConfigPaths.length;i++){var a=e.packageConfigPaths[i],s=Nt[a]||(Nt[a]=me(a));if(!(t.length<s.length)){var u=t.match(s.regEx);!u||r&&(o&&s.wildcard||!(r.length<u[1].length))||(r=u[1],o=!s.wildcard,n=r+a.substr(s.length))}}if(r)return{packageKey:r,configPath:n}}function be(e,t,r,n,o){var i=e.pluginLoader||e;return-1===t.packageConfigKeys.indexOf(r)&&t.packageConfigKeys.push(r),i.import(r).then(function(e){Re(n.packageConfig,e,n.packageKey,!0,t),n.packageConfig.configured=!0}).catch(function(e){throw a(e,"Unable to fetch package configuration file "+r)})}function we(e,t,r){var n;for(var o in e){var i="./"===o.substr(0,2)?"./":"";if(i&&(o=o.substr(2)),-1!==(n=o.indexOf("*"))&&o.substr(0,n)===t.substr(0,n)&&o.substr(n+1)===t.substr(t.length-o.length+n+1)&&r(o,e[i+o],o.split("/").length))return}var a=e[t]&&Object.hasOwnProperty.call(e,t)?e[t]:e["./"+t];a&&r(a,a,0)}function Ee(e){var t,r,n,o=e.lastIndexOf("|");return-1!==o?(t=e.substr(o+1),r=e.substr(0,o),"~"===t[0]&&(n=!0,t=t.substr(1))):(n="~"===e[0],t="default",r=e.substr(n),-1!==Jt.indexOf(r)&&(t=r,r=null)),{module:r||"@system-env",prop:t,negate:n}}function xe(e,t,r){return m.prototype.import.call(this,e.module,t).then(function(t){var n=W(e.prop,t);if(r&&"boolean"!=typeof n)throw new TypeError("Condition did not resolve to a boolean.");return e.negate?!n:n})}function ke(e,t,r){var n=e.match(Wt);if(!n)return Promise.resolve(e);var o=Ee.call(this,n[0].substr(2,n[0].length-3));return xe.call(this,o,t,!1).then(function(r){if("string"!=typeof r)throw new TypeError("The condition value for "+e+" doesn't resolve to a string.");if(-1!==r.indexOf("/"))throw new TypeError("Unabled to interpolate conditional "+e+(t?" in "+t:"")+"\n\tThe condition value "+r+' cannot contain a "/" separator.');return e.replace(Wt,r)})}function Oe(e,t,r){for(var n=0;n<$t.length;n++){var o=$t[n];t[o]&&Lr[o.substr(0,o.length-6)]&&r(t[o])}}function Se(e,t){var r={};for(var n in e){var o=e[n];t>1?o instanceof Array?r[n]=[].concat(o):"object"==_typeof(o)?r[n]=Se(o,t-1):"packageConfig"!==n&&(r[n]=o):r[n]=o}return r}function Ae(e,t){var r=e[t];return r instanceof Array?e[t].concat([]):"object"==_typeof(r)?Se(r,3):e[t]}function _e(e){if(e){if(-1!==Rr.indexOf(e))return Ae(this[Ut],e);throw new Error('"'+e+'" is not a valid configuration name. Must be one of '+Rr.join(", ")+".")}for(var t={},r=0;r<Rr.length;r++){var n=Rr[r],o=Ae(this[Ut],n);void 0!==o&&(t[n]=o)}return t}function je(e,t){var r=this,n=this[Ut];if("warnings"in e&&(n.warnings=e.warnings),"wasm"in e&&(n.wasm="undefined"!=typeof WebAssembly&&e.wasm),("production"in e||"build"in e)&&st.call(r,!!e.production,!!(e.build||Lr&&Lr.build)),!t){var o;Oe(r,e,function(e){o=o||e.baseURL}),(o=o||e.baseURL)&&(n.baseURL=u(o,ft)||u("./"+o,ft),"/"!==n.baseURL[n.baseURL.length-1]&&(n.baseURL+="/")),e.paths&&F(n.paths,e.paths),Oe(r,e,function(e){e.paths&&F(n.paths,e.paths)});for(var i in n.paths)-1!==n.paths[i].indexOf("*")&&(I.call(n,"Path config "+i+" -> "+n.paths[i]+" is no longer supported as wildcards are deprecated."),delete n.paths[i])}if(e.defaultJSExtensions&&I.call(n,"The defaultJSExtensions configuration option is deprecated.\n Use packages defaultExtension instead.",!0),"boolean"==typeof e.pluginFirst&&(n.pluginFirst=e.pluginFirst),e.map)for(var i in e.map){var a=e.map[i];if("string"==typeof a){var s=oe.call(r,n,a,void 0,!1,!1);"/"===s[s.length-1]&&":"!==i[i.length-1]&&"/"!==i[i.length-1]&&(s=s.substr(0,s.length-1)),n.map[i]=s}else{y=(y=oe.call(r,n,"/"!==i[i.length-1]?i+"/":i,void 0,!0,!0)).substr(0,y.length-1);var f=n.packages[y];f||((f=n.packages[y]=Le()).defaultExtension=""),Re(f,{map:a},y,!1,n)}}if(e.packageConfigPaths){for(var l=[],c=0;c<e.packageConfigPaths.length;c++){var p=e.packageConfigPaths[c],d=Math.max(p.lastIndexOf("*")+1,p.lastIndexOf("/")),h=oe.call(r,n,p.substr(0,d),void 0,!1,!1);l[c]=h+p.substr(d)}n.packageConfigPaths=l}if(e.bundles)for(var i in e.bundles){for(var g=[],c=0;c<e.bundles[i].length;c++)g.push(r.normalizeSync(e.bundles[i][c]));n.bundles[i]=g}if(e.packages)for(var i in e.packages){if(i.match(/^([^\/]+:)?\/\/$/))throw new TypeError('"'+i+'" is not a valid package name.');var y=oe.call(r,n,"/"!==i[i.length-1]?i+"/":i,void 0,!0,!0);y=y.substr(0,y.length-1),Re(n.packages[y]=n.packages[y]||Le(),e.packages[i],y,!1,n)}if(e.depCache)for(var i in e.depCache)n.depCache[r.normalizeSync(i)]=[].concat(e.depCache[i]);if(e.meta)for(var i in e.meta)if("*"===i[0])F(n.meta[i]=n.meta[i]||{},e.meta[i]);else{var m=oe.call(r,n,i,void 0,!0,!0);F(n.meta[m]=n.meta[m]||{},e.meta[i])}"transpiler"in e&&(n.transpiler=e.transpiler);for(var v in e)-1===Rr.indexOf(v)&&-1===$t.indexOf(v)&&(r[v]=e[v]);Oe(r,e,function(e){r.config(e,!0)})}function Le(){return{defaultExtension:void 0,main:void 0,format:void