version bump and build for npm, also test for SourceMap HTTP header

master
Evan Wallace 10 years ago
parent acf3a860f1
commit 636b1b28e4

2
.gitignore vendored

@ -5,3 +5,5 @@ amd-test/script.map
browserify-test/compiled.js
browserify-test/script.js
browserify-test/script.map
header-test/script.js
header-test/script.map

@ -2,86 +2,86 @@
* Support for source maps in V8 stack traces
* https://github.com/evanw/node-source-map-support
*/
(this.define||function(H,N){this.sourceMapSupport=N()})("browser-source-map-support",function(H){(function k(s,p,e){function r(h,c){if(!p[h]){if(!s[h]){var g="function"==typeof require&&require;if(!c&&g)return g(h,!0);if(u)return u(h,!0);throw Error("Cannot find module '"+h+"'");}g=p[h]={exports:{}};s[h][0].call(g.exports,function(c){var a=s[h][1][c];return r(a?a:c)},g,g.exports,k,s,p,e)}return p[h].exports}for(var u="function"==typeof require&&require,A=0;A<e.length;A++)r(e[A]);return r})({1:[function(k,
s,p){H=k("./source-map-support")},{"./source-map-support":18}],2:[function(k,s,p){},{}],3:[function(k,s,p){function e(f,n,K){if(!(this instanceof e))return new e(f,n,K);var b=typeof f;if("base64"===n&&"string"===b)for(f=f.trim?f.trim():f.replace(/^\s+|\s+$/g,"");0!==f.length%4;)f+="=";var a;if("number"===b)a=v(f);else if("string"===b)a=e.byteLength(f,n);else if("object"===b)a=v(f.length);else throw Error("First argument needs to be a number, array or string.");var d;e._useTypedArrays?d=e._augment(new Uint8Array(a)):
(d=this,d.length=a,d._isBuffer=!0);if(e._useTypedArrays&&"number"===typeof f.byteLength)d._set(f);else{var l=f;if(x(l)||e.isBuffer(l)||l&&"object"===typeof l&&"number"===typeof l.length)for(n=0;n<a;n++)e.isBuffer(f)?d[n]=f.readUInt8(n):d[n]=f[n];else if("string"===b)d.write(f,0,n);else if("number"===b&&!e._useTypedArrays&&!K)for(n=0;n<a;n++)d[n]=0}return d}function r(f,n,b){var a="";for(b=Math.min(f.length,b);n<b;n++)a+=String.fromCharCode(f[n]);return a}function u(f,n,b,a){a||(q("boolean"===typeof b,
"missing or invalid endian"),q(void 0!==n&&null!==n,"missing offset"),q(n+1<f.length,"Trying to read beyond buffer length"));a=f.length;if(!(n>=a))return b?(b=f[n],n+1<a&&(b|=f[n+1]<<8)):(b=f[n]<<8,n+1<a&&(b|=f[n+1])),b}function A(f,n,b,a){a||(q("boolean"===typeof b,"missing or invalid endian"),q(void 0!==n&&null!==n,"missing offset"),q(n+3<f.length,"Trying to read beyond buffer length"));a=f.length;if(!(n>=a)){var d;b?(n+2<a&&(d=f[n+2]<<16),n+1<a&&(d|=f[n+1]<<8),d|=f[n],n+3<a&&(d+=f[n+3]<<24>>>0)):
(n+1<a&&(d=f[n+1]<<16),n+2<a&&(d|=f[n+2]<<8),n+3<a&&(d|=f[n+3]),d+=f[n]<<24>>>0);return d}}function h(f,n,b,a){a||(q("boolean"===typeof b,"missing or invalid endian"),q(void 0!==n&&null!==n,"missing offset"),q(n+1<f.length,"Trying to read beyond buffer length"));if(!(n>=f.length))return f=u(f,n,b,!0),f&32768?-1*(65535-f+1):f}function c(f,n,b,a){a||(q("boolean"===typeof b,"missing or invalid endian"),q(void 0!==n&&null!==n,"missing offset"),q(n+3<f.length,"Trying to read beyond buffer length"));if(!(n>=
f.length))return f=A(f,n,b,!0),f&2147483648?-1*(4294967295-f+1):f}function g(f,n,b,a){a||(q("boolean"===typeof b,"missing or invalid endian"),q(n+3<f.length,"Trying to read beyond buffer length"));return F.read(f,n,b,23,4)}function m(f,n,b,a){a||(q("boolean"===typeof b,"missing or invalid endian"),q(n+7<f.length,"Trying to read beyond buffer length"));return F.read(f,n,b,52,8)}function a(f,n,b,a,d){d||(q(void 0!==n&&null!==n,"missing value"),q("boolean"===typeof a,"missing or invalid endian"),q(void 0!==
b&&null!==b,"missing offset"),q(b+1<f.length,"trying to write beyond buffer length"),I(n,65535));var l=f.length;if(!(b>=l))for(d=0,l=Math.min(l-b,2);d<l;d++)f[b+d]=(n&255<<8*(a?d:1-d))>>>8*(a?d:1-d)}function b(f,n,b,a,d){d||(q(void 0!==n&&null!==n,"missing value"),q("boolean"===typeof a,"missing or invalid endian"),q(void 0!==b&&null!==b,"missing offset"),q(b+3<f.length,"trying to write beyond buffer length"),I(n,4294967295));var l=f.length;if(!(b>=l))for(d=0,l=Math.min(l-b,4);d<l;d++)f[b+d]=n>>>
8*(a?d:3-d)&255}function d(f,n,b,d,l){l||(q(void 0!==n&&null!==n,"missing value"),q("boolean"===typeof d,"missing or invalid endian"),q(void 0!==b&&null!==b,"missing offset"),q(b+1<f.length,"Trying to write beyond buffer length"),J(n,32767,-32768));b>=f.length||(0<=n?a(f,n,b,d,l):a(f,65535+n+1,b,d,l))}function y(f,n,a,d,l){l||(q(void 0!==n&&null!==n,"missing value"),q("boolean"===typeof d,"missing or invalid endian"),q(void 0!==a&&null!==a,"missing offset"),q(a+3<f.length,"Trying to write beyond buffer length"),
J(n,2147483647,-2147483648));a>=f.length||(0<=n?b(f,n,a,d,l):b(f,4294967295+n+1,a,d,l))}function C(f,b,a,d,l){l||(q(void 0!==b&&null!==b,"missing value"),q("boolean"===typeof d,"missing or invalid endian"),q(void 0!==a&&null!==a,"missing offset"),q(a+3<f.length,"Trying to write beyond buffer length"),L(b,3.4028234663852886E38,-3.4028234663852886E38));a>=f.length||F.write(f,b,a,d,23,4)}function z(f,b,a,d,l){l||(q(void 0!==b&&null!==b,"missing value"),q("boolean"===typeof d,"missing or invalid endian"),
q(void 0!==a&&null!==a,"missing offset"),q(a+7<f.length,"Trying to write beyond buffer length"),L(b,1.7976931348623157E308,-1.7976931348623157E308));a>=f.length||F.write(f,b,a,d,52,8)}function B(f,b,a){if("number"!==typeof f)return a;f=~~f;if(f>=b)return b;if(0<=f)return f;f+=b;return 0<=f?f:0}function v(f){f=~~Math.ceil(+f);return 0>f?0:f}function x(f){return(Array.isArray||function(f){return"[object Array]"===Object.prototype.toString.call(f)})(f)}function D(f){return 16>f?"0"+f.toString(16):f.toString(16)}
function l(f){for(var b=[],a=0;a<f.length;a++){var d=f.charCodeAt(a);if(127>=d)b.push(f.charCodeAt(a));else{var l=a;55296<=d&&57343>=d&&a++;d=encodeURIComponent(f.slice(l,a+1)).substr(1).split("%");for(l=0;l<d.length;l++)b.push(parseInt(d[l],16))}}return b}function w(f){for(var b=[],a=0;a<f.length;a++)b.push(f.charCodeAt(a)&255);return b}function E(f,b,a,d){for(var l=0;l<d&&!(l+a>=b.length||l>=f.length);l++)b[l+a]=f[l];return l}function M(f){try{return decodeURIComponent(f)}catch(b){return String.fromCharCode(65533)}}
function I(f,b){q("number"===typeof f,"cannot write a non-number as a number");q(0<=f,"specified a negative value for writing an unsigned value");q(f<=b,"value is larger than maximum value for type");q(Math.floor(f)===f,"value has a fractional component")}function J(f,b,a){q("number"===typeof f,"cannot write a non-number as a number");q(f<=b,"value larger than maximum allowed value");q(f>=a,"value smaller than minimum allowed value");q(Math.floor(f)===f,"value has a fractional component")}function L(f,
b,a){q("number"===typeof f,"cannot write a non-number as a number");q(f<=b,"value larger than maximum allowed value");q(f>=a,"value smaller than minimum allowed value")}function q(f,b){if(!f)throw Error(b||"Failed assertion");}var G=k("base64-js"),F=k("ieee754");p.Buffer=e;p.SlowBuffer=e;p.INSPECT_MAX_BYTES=50;e.poolSize=8192;e._useTypedArrays=function(){try{var f=new ArrayBuffer(0),b=new Uint8Array(f);b.foo=function(){return 42};return 42===b.foo()&&"function"===typeof b.subarray}catch(a){return!1}}();
e.isEncoding=function(f){switch(String(f).toLowerCase()){case "hex":case "utf8":case "utf-8":case "ascii":case "binary":case "base64":case "raw":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return!0;default:return!1}};e.isBuffer=function(f){return!(null===f||void 0===f||!f._isBuffer)};e.byteLength=function(f,b){var a;f+="";switch(b||"utf8"){case "hex":a=f.length/2;break;case "utf8":case "utf-8":a=l(f).length;break;case "ascii":case "binary":case "raw":a=f.length;break;case "base64":a=G.toByteArray(f).length;
break;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":a=2*f.length;break;default:throw Error("Unknown encoding");}return a};e.concat=function(f,b){q(x(f),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array.");if(0===f.length)return new e(0);if(1===f.length)return f[0];var a;if("number"!==typeof b)for(a=b=0;a<f.length;a++)b+=f[a].length;var d=new e(b),l=0;for(a=0;a<f.length;a++){var c=f[a];c.copy(d,l);l+=c.length}return d};e.prototype.write=function(f,b,a,d){if(isFinite(b))isFinite(a)||
(d=a,a=void 0);else{var c=d;d=b;b=a;a=c}b=Number(b)||0;c=this.length-b;a?(a=Number(a),a>c&&(a=c)):a=c;d=String(d||"utf8").toLowerCase();switch(d){case "hex":b=Number(b)||0;d=this.length-b;a?(a=Number(a),a>d&&(a=d)):a=d;d=f.length;q(0===d%2,"Invalid hex string");a>d/2&&(a=d/2);for(d=0;d<a;d++)c=parseInt(f.substr(2*d,2),16),q(!isNaN(c),"Invalid hex string"),this[b+d]=c;e._charsWritten=2*d;f=d;break;case "utf8":case "utf-8":f=e._charsWritten=E(l(f),this,b,a);break;case "ascii":f=e._charsWritten=E(w(f),
this,b,a);break;case "binary":f=e._charsWritten=E(w(f),this,b,a);break;case "base64":f=e._charsWritten=E(G.toByteArray(f),this,b,a);break;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":d=e;for(var g,m=[],h=0;h<f.length;h++)g=f.charCodeAt(h),c=g>>8,g%=256,m.push(g),m.push(c);f=d._charsWritten=E(m,this,b,a);break;default:throw Error("Unknown encoding");}return f};e.prototype.toString=function(f,b,a){f=String(f||"utf8").toLowerCase();b=Number(b)||0;a=void 0!==a?Number(a):a=this.length;if(a===
b)return"";switch(f){case "hex":f=b;b=this.length;if(!f||0>f)f=0;if(!a||0>a||a>b)a=b;for(b="";f<a;f++)b+=D(this[f]);a=b;break;case "utf8":case "utf-8":var d=b;b=f="";for(a=Math.min(this.length,a);d<a;d++)127>=this[d]?(f+=M(b)+String.fromCharCode(this[d]),b=""):b+="%"+this[d].toString(16);a=f+M(b);break;case "ascii":a=r(this,b,a);break;case "binary":a=r(this,b,a);break;case "base64":f=b;a=0===f&&a===this.length?G.fromByteArray(this):G.fromByteArray(this.slice(f,a));break;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":a=
this.slice(b,a);f="";for(b=0;b<a.length;b+=2)f+=String.fromCharCode(a[b]+256*a[b+1]);a=f;break;default:throw Error("Unknown encoding");}return a};e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};e.prototype.copy=function(a,b,d,l){d||(d=0);l||0===l||(l=this.length);b||(b=0);if(l!==d&&0!==a.length&&0!==this.length)if(q(l>=d,"sourceEnd < sourceStart"),q(0<=b&&b<a.length,"targetStart out of bounds"),q(0<=d&&d<this.length,"sourceStart out of bounds"),
q(0<=l&&l<=this.length,"sourceEnd out of bounds"),l>this.length&&(l=this.length),a.length-b<l-d&&(l=a.length-b+d),l-=d,100>l||!e._useTypedArrays)for(var c=0;c<l;c++)a[c+b]=this[c+d];else a._set(this.subarray(d,d+l),b)};e.prototype.slice=function(b,a){var d=this.length;b=B(b,d,0);a=B(a,d,d);if(e._useTypedArrays)return e._augment(this.subarray(b,a));for(var d=a-b,l=new e(d,void 0,!0),c=0;c<d;c++)l[c]=this[c+b];return l};e.prototype.get=function(b){console.log(".get() is deprecated. Access using array indexes instead.");
return this.readUInt8(b)};e.prototype.set=function(b,a){console.log(".set() is deprecated. Access using array indexes instead.");return this.writeUInt8(b,a)};e.prototype.readUInt8=function(b,a){a||(q(void 0!==b&&null!==b,"missing offset"),q(b<this.length,"Trying to read beyond buffer length"));if(!(b>=this.length))return this[b]};e.prototype.readUInt16LE=function(b,a){return u(this,b,!0,a)};e.prototype.readUInt16BE=function(b,a){return u(this,b,!1,a)};e.prototype.readUInt32LE=function(b,a){return A(this,
b,!0,a)};e.prototype.readUInt32BE=function(b,a){return A(this,b,!1,a)};e.prototype.readInt8=function(b,a){a||(q(void 0!==b&&null!==b,"missing offset"),q(b<this.length,"Trying to read beyond buffer length"));if(!(b>=this.length))return this[b]&128?-1*(255-this[b]+1):this[b]};e.prototype.readInt16LE=function(b,a){return h(this,b,!0,a)};e.prototype.readInt16BE=function(b,a){return h(this,b,!1,a)};e.prototype.readInt32LE=function(b,a){return c(this,b,!0,a)};e.prototype.readInt32BE=function(b,a){return c(this,
b,!1,a)};e.prototype.readFloatLE=function(b,a){return g(this,b,!0,a)};e.prototype.readFloatBE=function(b,a){return g(this,b,!1,a)};e.prototype.readDoubleLE=function(b,a){return m(this,b,!0,a)};e.prototype.readDoubleBE=function(b,a){return m(this,b,!1,a)};e.prototype.writeUInt8=function(b,a,d){d||(q(void 0!==b&&null!==b,"missing value"),q(void 0!==a&&null!==a,"missing offset"),q(a<this.length,"trying to write beyond buffer length"),I(b,255));a>=this.length||(this[a]=b)};e.prototype.writeUInt16LE=function(b,
d,l){a(this,b,d,!0,l)};e.prototype.writeUInt16BE=function(b,d,l){a(this,b,d,!1,l)};e.prototype.writeUInt32LE=function(a,d,l){b(this,a,d,!0,l)};e.prototype.writeUInt32BE=function(a,d,l){b(this,a,d,!1,l)};e.prototype.writeInt8=function(b,a,d){d||(q(void 0!==b&&null!==b,"missing value"),q(void 0!==a&&null!==a,"missing offset"),q(a<this.length,"Trying to write beyond buffer length"),J(b,127,-128));a>=this.length||(0<=b?this.writeUInt8(b,a,d):this.writeUInt8(255+b+1,a,d))};e.prototype.writeInt16LE=function(b,
a,l){d(this,b,a,!0,l)};e.prototype.writeInt16BE=function(b,a,l){d(this,b,a,!1,l)};e.prototype.writeInt32LE=function(b,a,d){y(this,b,a,!0,d)};e.prototype.writeInt32BE=function(b,a,d){y(this,b,a,!1,d)};e.prototype.writeFloatLE=function(b,a,d){C(this,b,a,!0,d)};e.prototype.writeFloatBE=function(b,a,d){C(this,b,a,!1,d)};e.prototype.writeDoubleLE=function(b,a,d){z(this,b,a,!0,d)};e.prototype.writeDoubleBE=function(b,a,d){z(this,b,a,!1,d)};e.prototype.fill=function(b,a,d){b||(b=0);a||(a=0);d||(d=this.length);
"string"===typeof b&&(b=b.charCodeAt(0));q("number"===typeof b&&!isNaN(b),"value is not a number");q(d>=a,"end < start");if(d!==a&&0!==this.length)for(q(0<=a&&a<this.length,"start out of bounds"),q(0<=d&&d<=this.length,"end out of bounds");a<d;a++)this[a]=b};e.prototype.inspect=function(){for(var b=[],a=this.length,d=0;d<a;d++)if(b[d]=D(this[d]),d===p.INSPECT_MAX_BYTES){b[d+1]="...";break}return"<Buffer "+b.join(" ")+">"};e.prototype.toArrayBuffer=function(){if("undefined"!==typeof Uint8Array){if(e._useTypedArrays)return(new e(this)).buffer;
for(var b=new Uint8Array(this.length),a=0,d=b.length;a<d;a+=1)b[a]=this[a];return b.buffer}throw Error("Buffer.toArrayBuffer not supported in this browser");};var t=e.prototype;e._augment=function(b){b._isBuffer=!0;b._get=b.get;b._set=b.set;b.get=t.get;b.set=t.set;b.write=t.write;b.toString=t.toString;b.toLocaleString=t.toString;b.toJSON=t.toJSON;b.copy=t.copy;b.slice=t.slice;b.readUInt8=t.readUInt8;b.readUInt16LE=t.readUInt16LE;b.readUInt16BE=t.readUInt16BE;b.readUInt32LE=t.readUInt32LE;b.readUInt32BE=
t.readUInt32BE;b.readInt8=t.readInt8;b.readInt16LE=t.readInt16LE;b.readInt16BE=t.readInt16BE;b.readInt32LE=t.readInt32LE;b.readInt32BE=t.readInt32BE;b.readFloatLE=t.readFloatLE;b.readFloatBE=t.readFloatBE;b.readDoubleLE=t.readDoubleLE;b.readDoubleBE=t.readDoubleBE;b.writeUInt8=t.writeUInt8;b.writeUInt16LE=t.writeUInt16LE;b.writeUInt16BE=t.writeUInt16BE;b.writeUInt32LE=t.writeUInt32LE;b.writeUInt32BE=t.writeUInt32BE;b.writeInt8=t.writeInt8;b.writeInt16LE=t.writeInt16LE;b.writeInt16BE=t.writeInt16BE;
b.writeInt32LE=t.writeInt32LE;b.writeInt32BE=t.writeInt32BE;b.writeFloatLE=t.writeFloatLE;b.writeFloatBE=t.writeFloatBE;b.writeDoubleLE=t.writeDoubleLE;b.writeDoubleBE=t.writeDoubleBE;b.fill=t.fill;b.inspect=t.inspect;b.toArrayBuffer=t.toArrayBuffer;return b}},{"base64-js":4,ieee754:5}],4:[function(k,s,p){(function(e){function r(a){a=a.charCodeAt(0);if(a===k)return 62;if(a===h)return 63;if(a<c)return-1;if(a<c+10)return a-c+52;if(a<m+26)return a-m;if(a<g+26)return a-g+26}var u="undefined"!==typeof Uint8Array?
Uint8Array:Array,k=43,h=47,c=48,g=97,m=65;s.exports.toByteArray=function(a){function b(b){h[e++]=b}var d,c,g,m,h;if(0<a.length%4)throw Error("Invalid string. Length must be a multiple of 4");d=a.length;m="="===a.charAt(d-2)?2:"="===a.charAt(d-1)?1:0;h=new u(3*a.length/4-m);c=0<m?a.length-4:a.length;var e=0;for(d=0;d<c;d+=4)g=r(a.charAt(d))<<18|r(a.charAt(d+1))<<12|r(a.charAt(d+2))<<6|r(a.charAt(d+3)),b((g&16711680)>>16),b((g&65280)>>8),b(g&255);2===m?(g=r(a.charAt(d))<<2|r(a.charAt(d+1))>>4,b(g&255)):
1===m&&(g=r(a.charAt(d))<<10|r(a.charAt(d+1))<<4|r(a.charAt(d+2))>>2,b(g>>8&255),b(g&255));return h};s.exports.fromByteArray=function(a){var b,d=a.length%3,c="",g,m;b=0;for(m=a.length-d;b<m;b+=3)g=(a[b]<<16)+(a[b+1]<<8)+a[b+2],g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>18&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>12&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>6&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&
63),c+=g;switch(d){case 1:g=a[a.length-1];c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g<<4&63);c+="==";break;case 2:g=(a[a.length-2]<<8)+a[a.length-1],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>10),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>4&63),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g<<
2&63),c+="="}return c}})()},{}],5:[function(k,s,p){p.read=function(e,r,u,k,h){var c;c=8*h-k-1;var g=(1<<c)-1,m=g>>1,a=-7;h=u?h-1:0;var b=u?-1:1,d=e[r+h];h+=b;u=d&(1<<-a)-1;d>>=-a;for(a+=c;0<a;u=256*u+e[r+h],h+=b,a-=8);c=u&(1<<-a)-1;u>>=-a;for(a+=k;0<a;c=256*c+e[r+h],h+=b,a-=8);if(0===u)u=1-m;else{if(u===g)return c?NaN:Infinity*(d?-1:1);c+=Math.pow(2,k);u-=m}return(d?-1:1)*c*Math.pow(2,u-k)};p.write=function(e,r,u,k,h,c){var g,m=8*c-h-1,a=(1<<m)-1,b=a>>1,d=23===h?Math.pow(2,-24)-Math.pow(2,-77):0;
c=k?0:c-1;var y=k?1:-1,C=0>r||0===r&&0>1/r?1:0;r=Math.abs(r);isNaN(r)||Infinity===r?(r=isNaN(r)?1:0,k=a):(k=Math.floor(Math.log(r)/Math.LN2),1>r*(g=Math.pow(2,-k))&&(k--,g*=2),r=1<=k+b?r+d/g:r+d*Math.pow(2,1-b),2<=r*g&&(k++,g/=2),k+b>=a?(r=0,k=a):1<=k+b?(r=(r*g-1)*Math.pow(2,h),k+=b):(r=r*Math.pow(2,b-1)*Math.pow(2,h),k=0));for(;8<=h;e[u+c]=r&255,c+=y,r/=256,h-=8);k=k<<h|r;for(m+=h;0<m;e[u+c]=k&255,c+=y,k/=256,m-=8);e[u+c-y]|=128*C}},{}],6:[function(k,s,p){function e(){}k=s.exports={};k.nextTick=
function(){if("undefined"!==typeof window&&window.setImmediate)return function(e){return window.setImmediate(e)};if("undefined"!==typeof window&&window.postMessage&&window.addEventListener){var e=[];window.addEventListener("message",function(k){var p=k.source;p!==window&&null!==p||"process-tick"!==k.data||(k.stopPropagation(),0<e.length&&e.shift()())},!0);return function(k){e.push(k);window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}();k.title="browser";k.browser=!0;k.env=
{};k.argv=[];k.on=e;k.once=e;k.off=e;k.emit=e;k.binding=function(e){throw Error("process.binding is not supported");};k.cwd=function(){return"/"};k.chdir=function(e){throw Error("process.chdir is not supported");}},{}],7:[function(k,s,p){(function(e){function k(c,g){for(var m=0,a=c.length-1;0<=a;a--){var b=c[a];"."===b?c.splice(a,1):".."===b?(c.splice(a,1),m++):m&&(c.splice(a,1),m--)}if(g)for(;m--;m)c.unshift("..");return c}function u(c,g){if(c.filter)return c.filter(g);for(var m=[],a=0;a<c.length;a++)g(c[a],
a,c)&&m.push(c[a]);return m}var s=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;p.resolve=function(){for(var c="",g=!1,m=arguments.length-1;-1<=m&&!g;m--){var a=0<=m?arguments[m]:e.cwd();if("string"!==typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(c=a+"/"+c,g="/"===a.charAt(0))}c=k(u(c.split("/"),function(b){return!!b}),!g).join("/");return(g?"/":"")+c||"."};p.normalize=function(c){var g=p.isAbsolute(c),m="/"===h(c,-1);(c=k(u(c.split("/"),function(a){return!!a}),
!g).join("/"))||g||(c=".");c&&m&&(c+="/");return(g?"/":"")+c};p.isAbsolute=function(c){return"/"===c.charAt(0)};p.join=function(){var c=Array.prototype.slice.call(arguments,0);return p.normalize(u(c,function(c,m){if("string"!==typeof c)throw new TypeError("Arguments to path.join must be strings");return c}).join("/"))};p.relative=function(c,g){function m(b){for(var a=0;a<b.length&&""===b[a];a++);for(var d=b.length-1;0<=d&&""===b[d];d--);return a>d?[]:b.slice(a,d-a+1)}c=p.resolve(c).substr(1);g=p.resolve(g).substr(1);
for(var a=m(c.split("/")),b=m(g.split("/")),d=Math.min(a.length,b.length),e=d,h=0;h<d;h++)if(a[h]!==b[h]){e=h;break}d=[];for(h=e;h<a.length;h++)d.push("..");d=d.concat(b.slice(e));return d.join("/")};p.sep="/";p.delimiter=":";p.dirname=function(c){var g=s.exec(c).slice(1);c=g[0];g=g[1];if(!c&&!g)return".";g&&(g=g.substr(0,g.length-1));return c+g};p.basename=function(c,g){var m=s.exec(c).slice(1)[2];g&&m.substr(-1*g.length)===g&&(m=m.substr(0,m.length-g.length));return m};p.extname=function(c){return s.exec(c).slice(1)[3]};
var h="b"==="ab".substr(-1)?function(c,g,m){return c.substr(g,m)}:function(c,g,m){0>g&&(g=c.length+g);return c.substr(g,m)}}).call(this,k("node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"))},{"node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":6}],8:[function(k,s,p){p.SourceMapGenerator=k("./source-map/source-map-generator").SourceMapGenerator;p.SourceMapConsumer=k("./source-map/source-map-consumer").SourceMapConsumer;
p.SourceNode=k("./source-map/source-node").SourceNode},{"./source-map/source-map-consumer":13,"./source-map/source-map-generator":14,"./source-map/source-node":15}],9:[function(k,s,p){if("function"!==typeof e)var e=k("amdefine")(s,k);e(function(e,k,p){function h(){this._array=[];this._set={}}var c=e("./util");h.fromArray=function(c,m){for(var a=new h,b=0,d=c.length;b<d;b++)a.add(c[b],m);return a};h.prototype.add=function(g,m){var a=this.has(g),b=this._array.length;a&&!m||this._array.push(g);a||(this._set[c.toSetString(g)]=
b)};h.prototype.has=function(g){return Object.prototype.hasOwnProperty.call(this._set,c.toSetString(g))};h.prototype.indexOf=function(g){if(this.has(g))return this._set[c.toSetString(g)];throw Error('"'+g+'" is not in the set.');};h.prototype.at=function(c){if(0<=c&&c<this._array.length)return this._array[c];throw Error("No element indexed by "+c);};h.prototype.toArray=function(){return this._array.slice()};k.ArraySet=h})},{"./util":16,amdefine:17}],10:[function(k,s,p){if("function"!==typeof e)var e=
k("amdefine")(s,k);e(function(e,k,p){var h=e("./base64");k.encode=function(c){var g="",m=0>c?(-c<<1)+1:(c<<1)+0;do c=m&31,m>>>=5,0<m&&(c|=32),g+=h.encode(c);while(0<m);return g};k.decode=function(c){var g=0,m=c.length,a=0,b=0,d,e;do{if(g>=m)throw Error("Expected more digits in base 64 VLQ value.");e=h.decode(c.charAt(g++));d=!!(e&32);e&=31;a+=e<<b;b+=5}while(d);m=a>>1;return{value:1===(a&1)?-m:m,rest:c.slice(g)}}})},{"./base64":11,amdefine:17}],11:[function(k,s,p){if("function"!==typeof e)var e=k("amdefine")(s,
k);e(function(e,k,p){var h={},c={};"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("").forEach(function(g,e){h[g]=e;c[e]=g});k.encode=function(g){if(g in c)return c[g];throw new TypeError("Must be between 0 and 63: "+g);};k.decode=function(c){if(c in h)return h[c];throw new TypeError("Not a valid base 64 digit: "+c);}})},{amdefine:17}],12:[function(k,s,p){if("function"!==typeof e)var e=k("amdefine")(s,k);e(function(e,k,p){function h(c,g,e,a,b){var d=Math.floor((g-c)/2)+c,
k=b(e,a[d],!0);return 0===k?a[d]:0<k?1<g-d?h(d,g,e,a,b):a[d]:1<d-c?h(c,d,e,a,b):0>c?null:a[c]}k.search=function(c,g,e){return 0<g.length?h(-1,g.length,c,g,e):null}})},{amdefine:17}],13:[function(k,s,p){if("function"!==typeof e)var e=k("amdefine")(s,k);e(function(e,k,p){function h(b){var a=b;"string"===typeof b&&(a=JSON.parse(b.replace(/^\)\]\}'/,"")));b=c.getArg(a,"version");var e=c.getArg(a,"sources"),g=c.getArg(a,"names",[]),h=c.getArg(a,"sourceRoot",null),k=c.getArg(a,"sourcesContent",null),v=
c.getArg(a,"mappings"),a=c.getArg(a,"file",null);if(b!=this._version)throw Error("Unsupported version: "+b);this._names=m.fromArray(g,!0);this._sources=m.fromArray(e,!0);this.sourceRoot=h;this.sourcesContent=k;this._mappings=v;this.file=a}var c=e("./util"),g=e("./binary-search"),m=e("./array-set").ArraySet,a=e("./base64-vlq");h.fromSourceMap=function(b){var a=Object.create(h.prototype);a._names=m.fromArray(b._names.toArray(),!0);a._sources=m.fromArray(b._sources.toArray(),!0);a.sourceRoot=b._sourceRoot;
a.sourcesContent=b._generateSourcesContent(a._sources.toArray(),a.sourceRoot);a.file=b._file;a.__generatedMappings=b._mappings.slice().sort(c.compareByGeneratedPositions);a.__originalMappings=b._mappings.slice().sort(c.compareByOriginalPositions);return a};h.prototype._version=3;Object.defineProperty(h.prototype,"sources",{get:function(){return this._sources.toArray().map(function(b){return this.sourceRoot?c.join(this.sourceRoot,b):b},this)}});h.prototype.__generatedMappings=null;Object.defineProperty(h.prototype,
"_generatedMappings",{get:function(){this.__generatedMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,this.sourceRoot));return this.__generatedMappings}});h.prototype.__originalMappings=null;Object.defineProperty(h.prototype,"_originalMappings",{get:function(){this.__originalMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,this.sourceRoot));return this.__originalMappings}});h.prototype._parseMappings=
function(b,d){for(var e=1,g=0,h=0,m=0,k=0,x=0,p=/^[,;]/,l=b,w;0<l.length;)if(";"===l.charAt(0))e++,l=l.slice(1),g=0;else if(","===l.charAt(0))l=l.slice(1);else{w={};w.generatedLine=e;l=a.decode(l);w.generatedColumn=g+l.value;g=w.generatedColumn;l=l.rest;if(0<l.length&&!p.test(l.charAt(0))){l=a.decode(l);w.source=this._sources.at(k+l.value);k+=l.value;l=l.rest;if(0===l.length||p.test(l.charAt(0)))throw Error("Found a source, but no line and column");l=a.decode(l);w.originalLine=h+l.value;h=w.originalLine;
w.originalLine+=1;l=l.rest;if(0===l.length||p.test(l.charAt(0)))throw Error("Found a source and line, but no column");l=a.decode(l);w.originalColumn=m+l.value;m=w.originalColumn;l=l.rest;0<l.length&&!p.test(l.charAt(0))&&(l=a.decode(l),w.name=this._names.at(x+l.value),x+=l.value,l=l.rest)}this.__generatedMappings.push(w);"number"===typeof w.originalLine&&this.__originalMappings.push(w)}this.__generatedMappings.sort(c.compareByGeneratedPositions);this.__originalMappings.sort(c.compareByOriginalPositions)};
h.prototype._findMapping=function(b,a,c,e,h){if(0>=b[c])throw new TypeError("Line must be greater than or equal to 1, got "+b[c]);if(0>b[e])throw new TypeError("Column must be greater than or equal to 0, got "+b[e]);return g.search(b,a,h)};h.prototype.originalPositionFor=function(b){b={generatedLine:c.getArg(b,"line"),generatedColumn:c.getArg(b,"column")};if(b=this._findMapping(b,this._generatedMappings,"generatedLine","generatedColumn",c.compareByGeneratedPositions)){var a=c.getArg(b,"source",null);
a&&this.sourceRoot&&(a=c.join(this.sourceRoot,a));return{source:a,line:c.getArg(b,"originalLine",null),column:c.getArg(b,"originalColumn",null),name:c.getArg(b,"name",null)}}return{source:null,line:null,column:null,name:null}};h.prototype.sourceContentFor=function(b){if(!this.sourcesContent)return null;this.sourceRoot&&(b=c.relative(this.sourceRoot,b));if(this._sources.has(b))return this.sourcesContent[this._sources.indexOf(b)];var a;if(this.sourceRoot&&(a=c.urlParse(this.sourceRoot))){var e=b.replace(/^file:\/\//,
"");if("file"==a.scheme&&this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];if((!a.path||"/"==a.path)&&this._sources.has("/"+b))return this.sourcesContent[this._sources.indexOf("/"+b)]}throw Error('"'+b+'" is not in the SourceMap.');};h.prototype.generatedPositionFor=function(b){b={source:c.getArg(b,"source"),originalLine:c.getArg(b,"line"),originalColumn:c.getArg(b,"column")};this.sourceRoot&&(b.source=c.relative(this.sourceRoot,b.source));return(b=this._findMapping(b,this._originalMappings,
"originalLine","originalColumn",c.compareByOriginalPositions))?{line:c.getArg(b,"generatedLine",null),column:c.getArg(b,"generatedColumn",null)}:{line:null,column:null}};h.GENERATED_ORDER=1;h.ORIGINAL_ORDER=2;h.prototype.eachMapping=function(b,a,e){a=a||null;switch(e||h.GENERATED_ORDER){case h.GENERATED_ORDER:e=this._generatedMappings;break;case h.ORIGINAL_ORDER:e=this._originalMappings;break;default:throw Error("Unknown order of iteration.");}var g=this.sourceRoot;e.map(function(b){var a=b.source;
a&&g&&(a=c.join(g,a));return{source:a,generatedLine:b.generatedLine,generatedColumn:b.generatedColumn,originalLine:b.originalLine,originalColumn:b.originalColumn,name:b.name}}).forEach(b,a)};k.SourceMapConsumer=h})},{"./array-set":9,"./base64-vlq":10,"./binary-search":12,"./util":16,amdefine:17}],14:[function(k,s,p){if("function"!==typeof e)var e=k("amdefine")(s,k);e(function(e,k,p){function h(a){this._file=g.getArg(a,"file");this._sourceRoot=g.getArg(a,"sourceRoot",null);this._sources=new m;this._names=
new m;this._mappings=[];this._sourcesContents=null}var c=e("./base64-vlq"),g=e("./util"),m=e("./array-set").ArraySet;h.prototype._version=3;h.fromSourceMap=function(a){var b=a.sourceRoot,d=new h({file:a.file,sourceRoot:b});a.eachMapping(function(a){var c={generated:{line:a.generatedLine,column:a.generatedColumn}};a.source&&(c.source=a.source,b&&(c.source=g.relative(b,c.source)),c.original={line:a.originalLine,column:a.originalColumn},a.name&&(c.name=a.name));d.addMapping(c)});a.sources.forEach(function(b){var c=
a.sourceContentFor(b);c&&d.setSourceContent(b,c)});return d};h.prototype.addMapping=function(a){var b=g.getArg(a,"generated"),d=g.getArg(a,"original",null),c=g.getArg(a,"source",null);a=g.getArg(a,"name",null);this._validateMapping(b,d,c,a);c&&!this._sources.has(c)&&this._sources.add(c);a&&!this._names.has(a)&&this._names.add(a);this._mappings.push({generatedLine:b.line,generatedColumn:b.column,originalLine:null!=d&&d.line,originalColumn:null!=d&&d.column,source:c,name:a})};h.prototype.setSourceContent=
function(a,b){var d=a;this._sourceRoot&&(d=g.relative(this._sourceRoot,d));null!==b?(this._sourcesContents||(this._sourcesContents={}),this._sourcesContents[g.toSetString(d)]=b):(delete this._sourcesContents[g.toSetString(d)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))};h.prototype.applySourceMap=function(a,b){b||(b=a.file);var d=this._sourceRoot;d&&(b=g.relative(d,b));var c=new m,e=new m;this._mappings.forEach(function(h){if(h.source===b&&h.originalLine){var m=a.originalPositionFor({line:h.originalLine,
column:h.originalColumn});null!==m.source&&(h.source=d?g.relative(d,m.source):m.source,h.originalLine=m.line,h.originalColumn=m.column,null!==m.name&&null!==h.name&&(h.name=m.name))}(m=h.source)&&!c.has(m)&&c.add(m);(h=h.name)&&!e.has(h)&&e.add(h)},this);this._sources=c;this._names=e;a.sources.forEach(function(b){var c=a.sourceContentFor(b);c&&(d&&(b=g.relative(d,b)),this.setSourceContent(b,c))},this)};h.prototype._validateMapping=function(a,b,d,c){if(!(a&&"line"in a&&"column"in a&&0<a.line&&0<=a.column&&
!b&&!d&&!c||a&&"line"in a&&"column"in a&&b&&"line"in b&&"column"in b&&0<a.line&&0<=a.column&&0<b.line&&0<=b.column&&d))throw Error("Invalid mapping: "+JSON.stringify({generated:a,source:d,original:b,name:c}));};h.prototype._serializeMappings=function(){var a=0,b=1,d=0,e=0,h=0,m=0,k="",v;this._mappings.sort(g.compareByGeneratedPositions);for(var x=0,p=this._mappings.length;x<p;x++){v=this._mappings[x];if(v.generatedLine!==b)for(a=0;v.generatedLine!==b;)k+=";",b++;else if(0<x){if(!g.compareByGeneratedPositions(v,
this._mappings[x-1]))continue;k+=","}k+=c.encode(v.generatedColumn-a);a=v.generatedColumn;v.source&&(k+=c.encode(this._sources.indexOf(v.source)-m),m=this._sources.indexOf(v.source),k+=c.encode(v.originalLine-1-e),e=v.originalLine-1,k+=c.encode(v.originalColumn-d),d=v.originalColumn,v.name&&(k+=c.encode(this._names.indexOf(v.name)-h),h=this._names.indexOf(v.name)))}return k};h.prototype._generateSourcesContent=function(a,b){return a.map(function(a){if(!this._sourcesContents)return null;b&&(a=g.relative(b,
a));a=g.toSetString(a);return Object.prototype.hasOwnProperty.call(this._sourcesContents,a)?this._sourcesContents[a]:null},this)};h.prototype.toJSON=function(){var a={version:this._version,file:this._file,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};this._sourceRoot&&(a.sourceRoot=this._sourceRoot);this._sourcesContents&&(a.sourcesContent=this._generateSourcesContent(a.sources,a.sourceRoot));return a};h.prototype.toString=function(){return JSON.stringify(this)};
k.SourceMapGenerator=h})},{"./array-set":9,"./base64-vlq":10,"./util":16,amdefine:17}],15:[function(k,s,p){if("function"!==typeof e)var e=k("amdefine")(s,k);e(function(e,k,p){function h(c,a,b,d,e){this.children=[];this.sourceContents={};this.line=void 0===c?null:c;this.column=void 0===a?null:a;this.source=void 0===b?null:b;this.name=void 0===e?null:e;null!=d&&this.add(d)}var c=e("./source-map-generator").SourceMapGenerator,g=e("./util");h.fromStringWithSourceMap=function(c,a){function b(b,a){null===
b||void 0===b.source?d.add(a):d.add(new h(b.originalLine,b.originalColumn,b.source,a,b.name))}var d=new h,e=c.split("\n"),g=1,k=0,p=null;a.eachMapping(function(a){if(null===p){for(;g<a.generatedLine;)d.add(e.shift()+"\n"),g++;if(k<a.generatedColumn){var c=e[0];d.add(c.substr(0,a.generatedColumn));e[0]=c.substr(a.generatedColumn);k=a.generatedColumn}}else{if(g<a.generatedLine){var h="";do h+=e.shift()+"\n",g++,k=0;while(g<a.generatedLine);k<a.generatedColumn&&(c=e[0],h+=c.substr(0,a.generatedColumn),
e[0]=c.substr(a.generatedColumn),k=a.generatedColumn)}else c=e[0],h=c.substr(0,a.generatedColumn-k),e[0]=c.substr(a.generatedColumn-k),k=a.generatedColumn;b(p,h)}p=a},this);b(p,e.join("\n"));a.sources.forEach(function(b){var c=a.sourceContentFor(b);c&&d.setSourceContent(b,c)});return d};h.prototype.add=function(c){if(Array.isArray(c))c.forEach(function(a){this.add(a)},this);else if(c instanceof h||"string"===typeof c)c&&this.children.push(c);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+
c);return this};h.prototype.prepend=function(c){if(Array.isArray(c))for(var a=c.length-1;0<=a;a--)this.prepend(c[a]);else if(c instanceof h||"string"===typeof c)this.children.unshift(c);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+c);return this};h.prototype.walk=function(c){for(var a,b=0,d=this.children.length;b<d;b++)a=this.children[b],a instanceof h?a.walk(c):""!==a&&c(a,{source:this.source,line:this.line,column:this.column,name:this.name})};
h.prototype.join=function(c){var a,b,d=this.children.length;if(0<d){a=[];for(b=0;b<d-1;b++)a.push(this.children[b]),a.push(c);a.push(this.children[b]);this.children=a}return this};h.prototype.replaceRight=function(c,a){var b=this.children[this.children.length-1];b instanceof h?b.replaceRight(c,a):"string"===typeof b?this.children[this.children.length-1]=b.replace(c,a):this.children.push("".replace(c,a));return this};h.prototype.setSourceContent=function(c,a){this.sourceContents[g.toSetString(c)]=
a};h.prototype.walkSourceContents=function(c){for(var a=0,b=this.children.length;a<b;a++)this.children[a]instanceof h&&this.children[a].walkSourceContents(c);for(var d=Object.keys(this.sourceContents),a=0,b=d.length;a<b;a++)c(g.fromSetString(d[a]),this.sourceContents[d[a]])};h.prototype.toString=function(){var c="";this.walk(function(a){c+=a});return c};h.prototype.toStringWithSourceMap=function(e){var a="",b=1,d=0,g=new c(e),h=!1,k=null,p=null,v=null,x=null;this.walk(function(c,l){a+=c;null!==l.source&&
null!==l.line&&null!==l.column?(k===l.source&&p===l.line&&v===l.column&&x===l.name||g.addMapping({source:l.source,original:{line:l.line,column:l.column},generated:{line:b,column:d},name:l.name}),k=l.source,p=l.line,v=l.column,x=l.name,h=!0):h&&(g.addMapping({generated:{line:b,column:d}}),k=null,h=!1);c.split("").forEach(function(a){"\n"===a?(b++,d=0):d++})});this.walkSourceContents(function(b,a){g.setSourceContent(b,a)});return{code:a,map:g}};k.SourceNode=h})},{"./source-map-generator":14,"./util":16,
amdefine:17}],16:[function(k,s,p){if("function"!==typeof e)var e=k("amdefine")(s,k);e(function(e,k,p){function h(b){return(b=b.match(m))?{scheme:b[1],auth:b[3],host:b[4],port:b[6],path:b[7]}:null}function c(b){var a=b.scheme+"://";b.auth&&(a+=b.auth+"@");b.host&&(a+=b.host);b.port&&(a+=":"+b.port);b.path&&(a+=b.path);return a}function g(a,d){var c=a||"",e=d||"";return(c>e)-(c<e)}k.getArg=function(a,d,c){if(d in a)return a[d];if(3===arguments.length)return c;throw Error('"'+d+'" is a required argument.');
};var m=/([\w+\-.]+):\/\/((\w+:\w+)@)?([\w.]+)?(:(\d+))?(\S+)?/,a=/^data:.+\,.+/;k.urlParse=h;k.urlGenerate=c;k.join=function(b,d){var e;return d.match(m)||d.match(a)?d:"/"===d.charAt(0)&&(e=h(b))?(e.path=d,c(e)):b.replace(/\/$/,"")+"/"+d};k.toSetString=function(a){return"$"+a};k.fromSetString=function(a){return a.substr(1)};k.relative=function(a,d){a=a.replace(/\/$/,"");var c=h(a);return"/"==d.charAt(0)&&c&&"/"==c.path?d.slice(1):0===d.indexOf(a+"/")?d.substr(a.length+1):d};k.compareByOriginalPositions=
function(a,d,c){var e;return(e=g(a.source,d.source))||(e=a.originalLine-d.originalLine)||(e=a.originalColumn-d.originalColumn)||c||(e=g(a.name,d.name))?e:(e=a.generatedLine-d.generatedLine)?e:a.generatedColumn-d.generatedColumn};k.compareByGeneratedPositions=function(a,d,c){var e;return(e=a.generatedLine-d.generatedLine)||(e=a.generatedColumn-d.generatedColumn)||c||(e=g(a.source,d.source))||(e=a.originalLine-d.originalLine)?e:(e=a.originalColumn-d.originalColumn)?e:g(a.name,d.name)}})},{amdefine:17}],
17:[function(k,s,p){(function(e,p){s.exports=function(u,s){function h(a,b){var d;if(a&&"."===a.charAt(0)&&b){d=b.split("/");d=d.slice(0,d.length-1);var c=d=d.concat(a.split("/")),e,g;for(e=0;c[e];e+=1)if(g=c[e],"."===g)c.splice(e,1),e-=1;else if(".."===g)if(1!==e||".."!==c[2]&&".."!==c[0])0<e&&(c.splice(e-1,2),e-=2);else break;a=d.join("/")}return a}function c(a){return function(b){return h(b,a)}}function g(a){function b(c){d[a]=c}b.fromText=function(a,b){throw Error("amdefine does not implement load.fromText");
};return b}function m(a,b,c){var e,g,h;if(a)g=d[a]={},h={id:a,uri:p,exports:g},e=z(s,g,h,a);else{if(y)throw Error("amdefine with no module ID cannot be called more than once per file.");y=!0;g=u.exports;h=u;e=z(s,g,h,u.id)}b&&(b=b.map(function(a){return e(a)}));b="function"===typeof c?c.apply(h.exports,b):c;void 0!==b&&(h.exports=b,a&&(d[a]=h.exports))}function a(a,c,d){Array.isArray(a)?(d=c,c=a,a=void 0):"string"!==typeof a&&(d=a,a=c=void 0);c&&!Array.isArray(c)&&(d=c,c=void 0);c||(c=["require",
"exports","module"]);a?b[a]=[a,c,d]:m(a,c,d)}var b={},d={},y=!1,C=k("path"),z,B;z=function(a,b,c,d){function g(h,k){if("string"===typeof h)return B(a,b,c,h,d);h=h.map(function(e){return B(a,b,c,e,d)});e.nextTick(function(){k.apply(null,h)})}g.toUrl=function(a){return 0===a.indexOf(".")?h(a,C.dirname(c.filename)):a};return g};s=s||function(){return u.require.apply(u,arguments)};B=function(a,e,k,l,w){var p=l.indexOf("!"),r=l;if(-1===p){l=h(l,w);if("require"===l)return z(a,e,k,w);if("exports"===l)return e;
if("module"===l)return k;if(d.hasOwnProperty(l))return d[l];if(b[l])return m.apply(null,b[l]),d[l];if(a)return a(r);throw Error("No module with ID: "+l);}r=l.substring(0,p);l=l.substring(p+1,l.length);p=B(a,e,k,r,w);l=p.normalize?p.normalize(l,c(w)):h(l,w);d[l]||p.load(l,z(a,e,k,w),g(l),{});return d[l]};a.require=function(a){if(d[a])return d[a];if(b[a])return m.apply(null,b[a]),d[a]};a.amd={};return a}}).call(this,k("node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"),
"/node_modules/source-map/node_modules/amdefine/amdefine.js")},{"node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":6,path:7}],18:[function(k,s,p){(function(e,r){function s(a){if(a in x)return x[a];try{if("undefined"!==typeof window){var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);var c=4===b.readyState?b.responseText:null}else c=z.readFileSync(a,"utf8")}catch(d){c=null}return x[a]=c}function A(a,b){if(!a)return b;var c=C.dirname(a),d=/^\w+:\/\/[^\/]*/.exec(c),
d=d?d[0]:"";return d+C.resolve(c.slice(d.length),b)}function h(a){var b=s(a),b=/\/\/[#@]\s*sourceMappingURL=(.*)\s*$/m.exec(b);if(!b)return null;b=b[1];"data:application/json;base64,"==b.slice(0,29).toLowerCase()?(a=(new r(b.slice(29),"base64")).toString(),b=null):(b=A(a,b),a=s(b,"utf8"));return a?{url:b,map:a}:null}function c(a){var b=D[a.source];if(!b){var c=h(a.source);c&&(b=D[a.source]={url:c.url,map:new y(c.map)},b.map.sourcesContent&&b.map.sources.forEach(function(a,c){var d=b.map.sourcesContent[c];
if(d){var e=A(b.url,a);x[e]=d}}))}return b&&(c=b.map.originalPositionFor(a),null!==c.source)?(c.source=A(b.url,c.source),c):a}function g(a){var b=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(a);return b?(a=c({source:b[2],line:b[3],column:b[4]-1}),"eval at "+b[1]+" ("+a.source+":"+a.line+":"+(a.column+1)+")"):(b=/^eval at ([^(]+) \((.+)\)$/.exec(a))?"eval at "+b[1]+" ("+g(b[2])+")":a}function m(a){var b=a.getFileName()||a.getScriptNameOrSourceURL();if(b){var d=c({source:b,line:a.getLineNumber(),column:a.getColumnNumber()-
1});return{__proto__:a,getFileName:function(){return d.source},getLineNumber:function(){return d.line},getColumnNumber:function(){return d.column+1},getScriptNameOrSourceURL:function(){return d.source}}}var e=a.isEval()&&a.getEvalOrigin();return e?(e=g(e),{__proto__:a,getEvalOrigin:function(){return e}}):a}function a(a,b){v&&(x={},D={});return a+b.map(function(a){return"\n at "+m(a)}).join("")}function b(a){var b=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(a.stack);if(b){a=b[1];var c=+b[2],b=+b[3],
d=x[a];!d&&z.existsSync(a)&&(d=z.readFileSync(a,"utf8"));if(d&&(d=d.split(/(?:\r\n|\r|\n)/)[c-1]))return"\n"+a+":"+c+"\n"+d+"\n"+Array(b).join(" ")+"^"}return null}function d(a){if(a&&a.stack){var c=b(a);null!==c&&console.log(c);console.log(a.stack)}else console.log("Uncaught exception:",a);e.exit(1)}var y=k("source-map").SourceMapConsumer,C=k("path"),z=k("fs"),B=!1,v=!1,x={},D={};p.wrapCallSite=m;p.getErrorSource=b;p.mapSourcePosition=c;p.retrieveSourceMap=h;p.install=function(b){if(!B){B=!0;Error.prepareStackTrace=
a;b=b||{};var c="handleUncaughtExceptions"in b?b.handleUncaughtExceptions:!0;v="emptyCacheBetweenOperations"in b?b.emptyCacheBetweenOperations:!1;b.retrieveFile&&(s=b.retrieveFile);b.retrieveSourceMap&&(h=b.retrieveSourceMap);if(c&&"undefined"===typeof window)e.on("uncaughtException",d)}}}).call(this,k("node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"),k("buffer").Buffer)},{"node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":6,
buffer:3,fs:2,path:7,"source-map":8}]},{},[1]);return H});
(this.define||function(H,N){this.sourceMapSupport=N()})("browser-source-map-support",function(H){(function k(s,l,e){function q(g,c){if(!l[g]){if(!s[g]){var f="function"==typeof require&&require;if(!c&&f)return f(g,!0);if(t)return t(g,!0);throw Error("Cannot find module '"+g+"'");}f=l[g]={exports:{}};s[g][0].call(f.exports,function(c){var a=s[g][1][c];return q(a?a:c)},f,f.exports,k,s,l,e)}return l[g].exports}for(var t="function"==typeof require&&require,E=0;E<e.length;E++)q(e[E]);return q})({1:[function(k,
s,l){H=k("./source-map-support")},{"./source-map-support":18}],2:[function(k,s,l){},{}],3:[function(k,s,l){function e(h,n,K){if(!(this instanceof e))return new e(h,n,K);var b=typeof h;if("base64"===n&&"string"===b)for(h=h.trim?h.trim():h.replace(/^\s+|\s+$/g,"");0!==h.length%4;)h+="=";var a;if("number"===b)a=v(h);else if("string"===b)a=e.byteLength(h,n);else if("object"===b)a=v(h.length);else throw Error("First argument needs to be a number, array or string.");var d;e._useTypedArrays?d=e._augment(new Uint8Array(a)):
(d=this,d.length=a,d._isBuffer=!0);if(e._useTypedArrays&&"number"===typeof h.byteLength)d._set(h);else{var c=h;if(x(c)||e.isBuffer(c)||c&&"object"===typeof c&&"number"===typeof c.length)for(n=0;n<a;n++)e.isBuffer(h)?d[n]=h.readUInt8(n):d[n]=h[n];else if("string"===b)d.write(h,0,n);else if("number"===b&&!e._useTypedArrays&&!K)for(n=0;n<a;n++)d[n]=0}return d}function q(h,n,b){var a="";for(b=Math.min(h.length,b);n<b;n++)a+=String.fromCharCode(h[n]);return a}function t(h,n,b,a){a||(p("boolean"===typeof b,
"missing or invalid endian"),p(void 0!==n&&null!==n,"missing offset"),p(n+1<h.length,"Trying to read beyond buffer length"));a=h.length;if(!(n>=a))return b?(b=h[n],n+1<a&&(b|=h[n+1]<<8)):(b=h[n]<<8,n+1<a&&(b|=h[n+1])),b}function E(h,n,b,a){a||(p("boolean"===typeof b,"missing or invalid endian"),p(void 0!==n&&null!==n,"missing offset"),p(n+3<h.length,"Trying to read beyond buffer length"));a=h.length;if(!(n>=a)){var d;b?(n+2<a&&(d=h[n+2]<<16),n+1<a&&(d|=h[n+1]<<8),d|=h[n],n+3<a&&(d+=h[n+3]<<24>>>0)):
(n+1<a&&(d=h[n+1]<<16),n+2<a&&(d|=h[n+2]<<8),n+3<a&&(d|=h[n+3]),d+=h[n]<<24>>>0);return d}}function g(h,n,b,a){a||(p("boolean"===typeof b,"missing or invalid endian"),p(void 0!==n&&null!==n,"missing offset"),p(n+1<h.length,"Trying to read beyond buffer length"));if(!(n>=h.length))return h=t(h,n,b,!0),h&32768?-1*(65535-h+1):h}function c(h,n,b,a){a||(p("boolean"===typeof b,"missing or invalid endian"),p(void 0!==n&&null!==n,"missing offset"),p(n+3<h.length,"Trying to read beyond buffer length"));if(!(n>=
h.length))return h=E(h,n,b,!0),h&2147483648?-1*(4294967295-h+1):h}function f(h,n,b,a){a||(p("boolean"===typeof b,"missing or invalid endian"),p(n+3<h.length,"Trying to read beyond buffer length"));return F.read(h,n,b,23,4)}function m(h,n,b,a){a||(p("boolean"===typeof b,"missing or invalid endian"),p(n+7<h.length,"Trying to read beyond buffer length"));return F.read(h,n,b,52,8)}function a(h,n,b,a,d){d||(p(void 0!==n&&null!==n,"missing value"),p("boolean"===typeof a,"missing or invalid endian"),p(void 0!==
b&&null!==b,"missing offset"),p(b+1<h.length,"trying to write beyond buffer length"),I(n,65535));var c=h.length;if(!(b>=c))for(d=0,c=Math.min(c-b,2);d<c;d++)h[b+d]=(n&255<<8*(a?d:1-d))>>>8*(a?d:1-d)}function b(h,n,b,a,d){d||(p(void 0!==n&&null!==n,"missing value"),p("boolean"===typeof a,"missing or invalid endian"),p(void 0!==b&&null!==b,"missing offset"),p(b+3<h.length,"trying to write beyond buffer length"),I(n,4294967295));var c=h.length;if(!(b>=c))for(d=0,c=Math.min(c-b,4);d<c;d++)h[b+d]=n>>>
8*(a?d:3-d)&255}function d(h,n,b,d,c){c||(p(void 0!==n&&null!==n,"missing value"),p("boolean"===typeof d,"missing or invalid endian"),p(void 0!==b&&null!==b,"missing offset"),p(b+1<h.length,"Trying to write beyond buffer length"),J(n,32767,-32768));b>=h.length||(0<=n?a(h,n,b,d,c):a(h,65535+n+1,b,d,c))}function z(h,n,a,d,c){c||(p(void 0!==n&&null!==n,"missing value"),p("boolean"===typeof d,"missing or invalid endian"),p(void 0!==a&&null!==a,"missing offset"),p(a+3<h.length,"Trying to write beyond buffer length"),
J(n,2147483647,-2147483648));a>=h.length||(0<=n?b(h,n,a,d,c):b(h,4294967295+n+1,a,d,c))}function D(h,b,a,d,c){c||(p(void 0!==b&&null!==b,"missing value"),p("boolean"===typeof d,"missing or invalid endian"),p(void 0!==a&&null!==a,"missing offset"),p(a+3<h.length,"Trying to write beyond buffer length"),L(b,3.4028234663852886E38,-3.4028234663852886E38));a>=h.length||F.write(h,b,a,d,23,4)}function A(h,b,a,d,c){c||(p(void 0!==b&&null!==b,"missing value"),p("boolean"===typeof d,"missing or invalid endian"),
p(void 0!==a&&null!==a,"missing offset"),p(a+7<h.length,"Trying to write beyond buffer length"),L(b,1.7976931348623157E308,-1.7976931348623157E308));a>=h.length||F.write(h,b,a,d,52,8)}function B(h,b,a){if("number"!==typeof h)return a;h=~~h;if(h>=b)return b;if(0<=h)return h;h+=b;return 0<=h?h:0}function v(h){h=~~Math.ceil(+h);return 0>h?0:h}function x(h){return(Array.isArray||function(h){return"[object Array]"===Object.prototype.toString.call(h)})(h)}function C(h){return 16>h?"0"+h.toString(16):h.toString(16)}
function r(h){for(var b=[],a=0;a<h.length;a++){var d=h.charCodeAt(a);if(127>=d)b.push(h.charCodeAt(a));else{var c=a;55296<=d&&57343>=d&&a++;d=encodeURIComponent(h.slice(c,a+1)).substr(1).split("%");for(c=0;c<d.length;c++)b.push(parseInt(d[c],16))}}return b}function w(h){for(var b=[],a=0;a<h.length;a++)b.push(h.charCodeAt(a)&255);return b}function y(h,b,a,d){for(var c=0;c<d&&!(c+a>=b.length||c>=h.length);c++)b[c+a]=h[c];return c}function M(h){try{return decodeURIComponent(h)}catch(b){return String.fromCharCode(65533)}}
function I(h,b){p("number"===typeof h,"cannot write a non-number as a number");p(0<=h,"specified a negative value for writing an unsigned value");p(h<=b,"value is larger than maximum value for type");p(Math.floor(h)===h,"value has a fractional component")}function J(h,b,a){p("number"===typeof h,"cannot write a non-number as a number");p(h<=b,"value larger than maximum allowed value");p(h>=a,"value smaller than minimum allowed value");p(Math.floor(h)===h,"value has a fractional component")}function L(h,
b,a){p("number"===typeof h,"cannot write a non-number as a number");p(h<=b,"value larger than maximum allowed value");p(h>=a,"value smaller than minimum allowed value")}function p(h,b){if(!h)throw Error(b||"Failed assertion");}var G=k("base64-js"),F=k("ieee754");l.Buffer=e;l.SlowBuffer=e;l.INSPECT_MAX_BYTES=50;e.poolSize=8192;e._useTypedArrays=function(){try{var h=new ArrayBuffer(0),b=new Uint8Array(h);b.foo=function(){return 42};return 42===b.foo()&&"function"===typeof b.subarray}catch(a){return!1}}();
e.isEncoding=function(h){switch(String(h).toLowerCase()){case "hex":case "utf8":case "utf-8":case "ascii":case "binary":case "base64":case "raw":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return!0;default:return!1}};e.isBuffer=function(h){return!(null===h||void 0===h||!h._isBuffer)};e.byteLength=function(h,b){var a;h+="";switch(b||"utf8"){case "hex":a=h.length/2;break;case "utf8":case "utf-8":a=r(h).length;break;case "ascii":case "binary":case "raw":a=h.length;break;case "base64":a=G.toByteArray(h).length;
break;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":a=2*h.length;break;default:throw Error("Unknown encoding");}return a};e.concat=function(h,b){p(x(h),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array.");if(0===h.length)return new e(0);if(1===h.length)return h[0];var a;if("number"!==typeof b)for(a=b=0;a<h.length;a++)b+=h[a].length;var d=new e(b),c=0;for(a=0;a<h.length;a++){var f=h[a];f.copy(d,c);c+=f.length}return d};e.prototype.write=function(h,b,a,d){if(isFinite(b))isFinite(a)||
(d=a,a=void 0);else{var c=d;d=b;b=a;a=c}b=Number(b)||0;c=this.length-b;a?(a=Number(a),a>c&&(a=c)):a=c;d=String(d||"utf8").toLowerCase();switch(d){case "hex":b=Number(b)||0;d=this.length-b;a?(a=Number(a),a>d&&(a=d)):a=d;d=h.length;p(0===d%2,"Invalid hex string");a>d/2&&(a=d/2);for(d=0;d<a;d++)c=parseInt(h.substr(2*d,2),16),p(!isNaN(c),"Invalid hex string"),this[b+d]=c;e._charsWritten=2*d;h=d;break;case "utf8":case "utf-8":h=e._charsWritten=y(r(h),this,b,a);break;case "ascii":h=e._charsWritten=y(w(h),
this,b,a);break;case "binary":h=e._charsWritten=y(w(h),this,b,a);break;case "base64":h=e._charsWritten=y(G.toByteArray(h),this,b,a);break;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":for(var f,c=[],m=0;m<h.length;m++)f=h.charCodeAt(m),d=f>>8,f%=256,c.push(f),c.push(d);h=e._charsWritten=y(c,this,b,a);break;default:throw Error("Unknown encoding");}return h};e.prototype.toString=function(h,a,b){h=String(h||"utf8").toLowerCase();a=Number(a)||0;b=void 0!==b?Number(b):b=this.length;if(b===a)return"";
switch(h){case "hex":h=a;a=this.length;if(!h||0>h)h=0;if(!b||0>b||b>a)b=a;for(a="";h<b;h++)a+=C(this[h]);b=a;break;case "utf8":case "utf-8":var d=a;a=h="";for(b=Math.min(this.length,b);d<b;d++)127>=this[d]?(h+=M(a)+String.fromCharCode(this[d]),a=""):a+="%"+this[d].toString(16);b=h+M(a);break;case "ascii":b=q(this,a,b);break;case "binary":b=q(this,a,b);break;case "base64":h=a;b=0===h&&b===this.length?G.fromByteArray(this):G.fromByteArray(this.slice(h,b));break;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":b=
this.slice(a,b);h="";for(a=0;a<b.length;a+=2)h+=String.fromCharCode(b[a]+256*b[a+1]);b=h;break;default:throw Error("Unknown encoding");}return b};e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};e.prototype.copy=function(a,b,d,c){d||(d=0);c||0===c||(c=this.length);b||(b=0);if(c!==d&&0!==a.length&&0!==this.length)if(p(c>=d,"sourceEnd < sourceStart"),p(0<=b&&b<a.length,"targetStart out of bounds"),p(0<=d&&d<this.length,"sourceStart out of bounds"),
p(0<=c&&c<=this.length,"sourceEnd out of bounds"),c>this.length&&(c=this.length),a.length-b<c-d&&(c=a.length-b+d),c-=d,100>c||!e._useTypedArrays)for(var f=0;f<c;f++)a[f+b]=this[f+d];else a._set(this.subarray(d,d+c),b)};e.prototype.slice=function(b,a){var d=this.length;b=B(b,d,0);a=B(a,d,d);if(e._useTypedArrays)return e._augment(this.subarray(b,a));for(var d=a-b,c=new e(d,void 0,!0),f=0;f<d;f++)c[f]=this[f+b];return c};e.prototype.get=function(b){console.log(".get() is deprecated. Access using array indexes instead.");
return this.readUInt8(b)};e.prototype.set=function(b,a){console.log(".set() is deprecated. Access using array indexes instead.");return this.writeUInt8(b,a)};e.prototype.readUInt8=function(b,a){a||(p(void 0!==b&&null!==b,"missing offset"),p(b<this.length,"Trying to read beyond buffer length"));if(!(b>=this.length))return this[b]};e.prototype.readUInt16LE=function(b,a){return t(this,b,!0,a)};e.prototype.readUInt16BE=function(b,a){return t(this,b,!1,a)};e.prototype.readUInt32LE=function(b,a){return E(this,
b,!0,a)};e.prototype.readUInt32BE=function(b,a){return E(this,b,!1,a)};e.prototype.readInt8=function(b,a){a||(p(void 0!==b&&null!==b,"missing offset"),p(b<this.length,"Trying to read beyond buffer length"));if(!(b>=this.length))return this[b]&128?-1*(255-this[b]+1):this[b]};e.prototype.readInt16LE=function(b,a){return g(this,b,!0,a)};e.prototype.readInt16BE=function(b,a){return g(this,b,!1,a)};e.prototype.readInt32LE=function(b,a){return c(this,b,!0,a)};e.prototype.readInt32BE=function(b,a){return c(this,
b,!1,a)};e.prototype.readFloatLE=function(b,a){return f(this,b,!0,a)};e.prototype.readFloatBE=function(b,a){return f(this,b,!1,a)};e.prototype.readDoubleLE=function(b,a){return m(this,b,!0,a)};e.prototype.readDoubleBE=function(b,a){return m(this,b,!1,a)};e.prototype.writeUInt8=function(b,a,d){d||(p(void 0!==b&&null!==b,"missing value"),p(void 0!==a&&null!==a,"missing offset"),p(a<this.length,"trying to write beyond buffer length"),I(b,255));a>=this.length||(this[a]=b)};e.prototype.writeUInt16LE=function(b,
d,c){a(this,b,d,!0,c)};e.prototype.writeUInt16BE=function(b,d,c){a(this,b,d,!1,c)};e.prototype.writeUInt32LE=function(a,d,c){b(this,a,d,!0,c)};e.prototype.writeUInt32BE=function(a,d,c){b(this,a,d,!1,c)};e.prototype.writeInt8=function(b,a,d){d||(p(void 0!==b&&null!==b,"missing value"),p(void 0!==a&&null!==a,"missing offset"),p(a<this.length,"Trying to write beyond buffer length"),J(b,127,-128));a>=this.length||(0<=b?this.writeUInt8(b,a,d):this.writeUInt8(255+b+1,a,d))};e.prototype.writeInt16LE=function(b,
a,c){d(this,b,a,!0,c)};e.prototype.writeInt16BE=function(b,a,c){d(this,b,a,!1,c)};e.prototype.writeInt32LE=function(b,a,d){z(this,b,a,!0,d)};e.prototype.writeInt32BE=function(b,a,d){z(this,b,a,!1,d)};e.prototype.writeFloatLE=function(b,a,d){D(this,b,a,!0,d)};e.prototype.writeFloatBE=function(b,a,d){D(this,b,a,!1,d)};e.prototype.writeDoubleLE=function(b,a,d){A(this,b,a,!0,d)};e.prototype.writeDoubleBE=function(b,a,d){A(this,b,a,!1,d)};e.prototype.fill=function(b,a,d){b||(b=0);a||(a=0);d||(d=this.length);
"string"===typeof b&&(b=b.charCodeAt(0));p("number"===typeof b&&!isNaN(b),"value is not a number");p(d>=a,"end < start");if(d!==a&&0!==this.length)for(p(0<=a&&a<this.length,"start out of bounds"),p(0<=d&&d<=this.length,"end out of bounds");a<d;a++)this[a]=b};e.prototype.inspect=function(){for(var b=[],a=this.length,d=0;d<a;d++)if(b[d]=C(this[d]),d===l.INSPECT_MAX_BYTES){b[d+1]="...";break}return"<Buffer "+b.join(" ")+">"};e.prototype.toArrayBuffer=function(){if("undefined"!==typeof Uint8Array){if(e._useTypedArrays)return(new e(this)).buffer;
for(var b=new Uint8Array(this.length),a=0,d=b.length;a<d;a+=1)b[a]=this[a];return b.buffer}throw Error("Buffer.toArrayBuffer not supported in this browser");};var u=e.prototype;e._augment=function(b){b._isBuffer=!0;b._get=b.get;b._set=b.set;b.get=u.get;b.set=u.set;b.write=u.write;b.toString=u.toString;b.toLocaleString=u.toString;b.toJSON=u.toJSON;b.copy=u.copy;b.slice=u.slice;b.readUInt8=u.readUInt8;b.readUInt16LE=u.readUInt16LE;b.readUInt16BE=u.readUInt16BE;b.readUInt32LE=u.readUInt32LE;b.readUInt32BE=
u.readUInt32BE;b.readInt8=u.readInt8;b.readInt16LE=u.readInt16LE;b.readInt16BE=u.readInt16BE;b.readInt32LE=u.readInt32LE;b.readInt32BE=u.readInt32BE;b.readFloatLE=u.readFloatLE;b.readFloatBE=u.readFloatBE;b.readDoubleLE=u.readDoubleLE;b.readDoubleBE=u.readDoubleBE;b.writeUInt8=u.writeUInt8;b.writeUInt16LE=u.writeUInt16LE;b.writeUInt16BE=u.writeUInt16BE;b.writeUInt32LE=u.writeUInt32LE;b.writeUInt32BE=u.writeUInt32BE;b.writeInt8=u.writeInt8;b.writeInt16LE=u.writeInt16LE;b.writeInt16BE=u.writeInt16BE;
b.writeInt32LE=u.writeInt32LE;b.writeInt32BE=u.writeInt32BE;b.writeFloatLE=u.writeFloatLE;b.writeFloatBE=u.writeFloatBE;b.writeDoubleLE=u.writeDoubleLE;b.writeDoubleBE=u.writeDoubleBE;b.fill=u.fill;b.inspect=u.inspect;b.toArrayBuffer=u.toArrayBuffer;return b}},{"base64-js":4,ieee754:5}],4:[function(k,s,l){(function(e){function q(a){a=a.charCodeAt(0);if(a===k)return 62;if(a===g)return 63;if(a<c)return-1;if(a<c+10)return a-c+52;if(a<m+26)return a-m;if(a<f+26)return a-f+26}var t="undefined"!==typeof Uint8Array?
Uint8Array:Array,k=43,g=47,c=48,f=97,m=65;e.toByteArray=function(a){function b(b){g[e++]=b}var d,c,f,m,g;if(0<a.length%4)throw Error("Invalid string. Length must be a multiple of 4");d=a.length;m="="===a.charAt(d-2)?2:"="===a.charAt(d-1)?1:0;g=new t(3*a.length/4-m);c=0<m?a.length-4:a.length;var e=0;for(d=0;d<c;d+=4)f=q(a.charAt(d))<<18|q(a.charAt(d+1))<<12|q(a.charAt(d+2))<<6|q(a.charAt(d+3)),b((f&16711680)>>16),b((f&65280)>>8),b(f&255);2===m?(f=q(a.charAt(d))<<2|q(a.charAt(d+1))>>4,b(f&255)):1===
m&&(f=q(a.charAt(d))<<10|q(a.charAt(d+1))<<4|q(a.charAt(d+2))>>2,b(f>>8&255),b(f&255));return g};e.fromByteArray=function(a){var b,d=a.length%3,c="",f,m;b=0;for(m=a.length-d;b<m;b+=3)f=(a[b]<<16)+(a[b+1]<<8)+a[b+2],f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>18&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>12&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>6&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f&
63),c+=f;switch(d){case 1:f=a[a.length-1];c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f<<4&63);c+="==";break;case 2:f=(a[a.length-2]<<8)+a[a.length-1],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>10),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>4&63),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f<<
2&63),c+="="}return c}})("undefined"===typeof l?this.base64js={}:l)},{}],5:[function(k,s,l){l.read=function(e,q,t,k,g){var c;c=8*g-k-1;var f=(1<<c)-1,m=f>>1,a=-7;g=t?g-1:0;var b=t?-1:1,d=e[q+g];g+=b;t=d&(1<<-a)-1;d>>=-a;for(a+=c;0<a;t=256*t+e[q+g],g+=b,a-=8);c=t&(1<<-a)-1;t>>=-a;for(a+=k;0<a;c=256*c+e[q+g],g+=b,a-=8);if(0===t)t=1-m;else{if(t===f)return c?NaN:Infinity*(d?-1:1);c+=Math.pow(2,k);t-=m}return(d?-1:1)*c*Math.pow(2,t-k)};l.write=function(e,q,t,k,g,c){var f,m=8*c-g-1,a=(1<<m)-1,b=a>>1,d=
23===g?Math.pow(2,-24)-Math.pow(2,-77):0;c=k?0:c-1;var z=k?1:-1,D=0>q||0===q&&0>1/q?1:0;q=Math.abs(q);isNaN(q)||Infinity===q?(q=isNaN(q)?1:0,k=a):(k=Math.floor(Math.log(q)/Math.LN2),1>q*(f=Math.pow(2,-k))&&(k--,f*=2),q=1<=k+b?q+d/f:q+d*Math.pow(2,1-b),2<=q*f&&(k++,f/=2),k+b>=a?(q=0,k=a):1<=k+b?(q=(q*f-1)*Math.pow(2,g),k+=b):(q=q*Math.pow(2,b-1)*Math.pow(2,g),k=0));for(;8<=g;e[t+c]=q&255,c+=z,q/=256,g-=8);k=k<<g|q;for(m+=g;0<m;e[t+c]=k&255,c+=z,k/=256,m-=8);e[t+c-z]|=128*D}},{}],6:[function(k,s,l){function e(){}
k=s.exports={};k.nextTick=function(){if("undefined"!==typeof window&&window.setImmediate)return function(e){return window.setImmediate(e)};if("undefined"!==typeof window&&window.postMessage&&window.addEventListener){var e=[];window.addEventListener("message",function(k){var l=k.source;l!==window&&null!==l||"process-tick"!==k.data||(k.stopPropagation(),0<e.length&&e.shift()())},!0);return function(k){e.push(k);window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}();k.title="browser";
k.browser=!0;k.env={};k.argv=[];k.on=e;k.once=e;k.off=e;k.emit=e;k.binding=function(e){throw Error("process.binding is not supported");};k.cwd=function(){return"/"};k.chdir=function(e){throw Error("process.chdir is not supported");}},{}],7:[function(k,s,l){(function(e){function k(c,f){for(var m=0,a=c.length-1;0<=a;a--){var b=c[a];"."===b?c.splice(a,1):".."===b?(c.splice(a,1),m++):m&&(c.splice(a,1),m--)}if(f)for(;m--;m)c.unshift("..");return c}function t(c,f){if(c.filter)return c.filter(f);for(var m=
[],a=0;a<c.length;a++)f(c[a],a,c)&&m.push(c[a]);return m}var s=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;l.resolve=function(){for(var c="",f=!1,m=arguments.length-1;-1<=m&&!f;m--){var a=0<=m?arguments[m]:e.cwd();if("string"!==typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(c=a+"/"+c,f="/"===a.charAt(0))}c=k(t(c.split("/"),function(b){return!!b}),!f).join("/");return(f?"/":"")+c||"."};l.normalize=function(c){var f=l.isAbsolute(c),m="/"===g(c,-1);
(c=k(t(c.split("/"),function(a){return!!a}),!f).join("/"))||f||(c=".");c&&m&&(c+="/");return(f?"/":"")+c};l.isAbsolute=function(c){return"/"===c.charAt(0)};l.join=function(){var c=Array.prototype.slice.call(arguments,0);return l.normalize(t(c,function(c,m){if("string"!==typeof c)throw new TypeError("Arguments to path.join must be strings");return c}).join("/"))};l.relative=function(c,f){function m(b){for(var a=0;a<b.length&&""===b[a];a++);for(var d=b.length-1;0<=d&&""===b[d];d--);return a>d?[]:b.slice(a,
d-a+1)}c=l.resolve(c).substr(1);f=l.resolve(f).substr(1);for(var a=m(c.split("/")),b=m(f.split("/")),d=Math.min(a.length,b.length),e=d,g=0;g<d;g++)if(a[g]!==b[g]){e=g;break}d=[];for(g=e;g<a.length;g++)d.push("..");d=d.concat(b.slice(e));return d.join("/")};l.sep="/";l.delimiter=":";l.dirname=function(c){var f=s.exec(c).slice(1);c=f[0];f=f[1];if(!c&&!f)return".";f&&(f=f.substr(0,f.length-1));return c+f};l.basename=function(c,f){var m=s.exec(c).slice(1)[2];f&&m.substr(-1*f.length)===f&&(m=m.substr(0,
m.length-f.length));return m};l.extname=function(c){return s.exec(c).slice(1)[3]};var g="b"==="ab".substr(-1)?function(c,f,m){return c.substr(f,m)}:function(c,f,m){0>f&&(f=c.length+f);return c.substr(f,m)}}).call(this,k("node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"))},{"node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":6}],8:[function(k,s,l){l.SourceMapGenerator=k("./source-map/source-map-generator").SourceMapGenerator;
l.SourceMapConsumer=k("./source-map/source-map-consumer").SourceMapConsumer;l.SourceNode=k("./source-map/source-node").SourceNode},{"./source-map/source-map-consumer":13,"./source-map/source-map-generator":14,"./source-map/source-node":15}],9:[function(k,s,l){if("function"!==typeof e)var e=k("amdefine")(s,k);e(function(e,k,l){function g(){this._array=[];this._set={}}var c=e("./util");g.fromArray=function(c,m){for(var a=new g,b=0,d=c.length;b<d;b++)a.add(c[b],m);return a};g.prototype.add=function(f,
m){var a=this.has(f),b=this._array.length;a&&!m||this._array.push(f);a||(this._set[c.toSetString(f)]=b)};g.prototype.has=function(f){return Object.prototype.hasOwnProperty.call(this._set,c.toSetString(f))};g.prototype.indexOf=function(f){if(this.has(f))return this._set[c.toSetString(f)];throw Error('"'+f+'" is not in the set.');};g.prototype.at=function(c){if(0<=c&&c<this._array.length)return this._array[c];throw Error("No element indexed by "+c);};g.prototype.toArray=function(){return this._array.slice()};
k.ArraySet=g})},{"./util":16,amdefine:17}],10:[function(k,s,l){if("function"!==typeof e)var e=k("amdefine")(s,k);e(function(e,k,l){var g=e("./base64");k.encode=function(c){var f="",e=0>c?(-c<<1)+1:(c<<1)+0;do c=e&31,e>>>=5,0<e&&(c|=32),f+=g.encode(c);while(0<e);return f};k.decode=function(c){var f=0,e=c.length,a=0,b=0,d,k;do{if(f>=e)throw Error("Expected more digits in base 64 VLQ value.");k=g.decode(c.charAt(f++));d=!!(k&32);k&=31;a+=k<<b;b+=5}while(d);e=a>>1;return{value:1===(a&1)?-e:e,rest:c.slice(f)}}})},
{"./base64":11,amdefine:17}],11:[function(k,s,l){if("function"!==typeof e)var e=k("amdefine")(s,k);e(function(e,k,l){var g={},c={};"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("").forEach(function(f,e){g[f]=e;c[e]=f});k.encode=function(f){if(f in c)return c[f];throw new TypeError("Must be between 0 and 63: "+f);};k.decode=function(c){if(c in g)return g[c];throw new TypeError("Not a valid base 64 digit: "+c);}})},{amdefine:17}],12:[function(k,s,l){if("function"!==typeof e)var e=
k("amdefine")(s,k);e(function(e,k,l){function g(c,f,e,a,b){var d=Math.floor((f-c)/2)+c,k=b(e,a[d],!0);return 0===k?a[d]:0<k?1<f-d?g(d,f,e,a,b):a[d]:1<d-c?g(c,d,e,a,b):0>c?null:a[c]}k.search=function(c,f,e){return 0<f.length?g(-1,f.length,c,f,e):null}})},{amdefine:17}],13:[function(k,s,l){if("function"!==typeof e)var e=k("amdefine")(s,k);e(function(e,k,l){function g(b){var a=b;"string"===typeof b&&(a=JSON.parse(b.replace(/^\)\]\}'/,"")));b=c.getArg(a,"version");var f=c.getArg(a,"sources"),e=c.getArg(a,
"names",[]),g=c.getArg(a,"sourceRoot",null),k=c.getArg(a,"sourcesContent",null),v=c.getArg(a,"mappings"),a=c.getArg(a,"file",null);if(b!=this._version)throw Error("Unsupported version: "+b);this._names=m.fromArray(e,!0);this._sources=m.fromArray(f,!0);this.sourceRoot=g;this.sourcesContent=k;this._mappings=v;this.file=a}var c=e("./util"),f=e("./binary-search"),m=e("./array-set").ArraySet,a=e("./base64-vlq");g.fromSourceMap=function(b){var a=Object.create(g.prototype);a._names=m.fromArray(b._names.toArray(),
!0);a._sources=m.fromArray(b._sources.toArray(),!0);a.sourceRoot=b._sourceRoot;a.sourcesContent=b._generateSourcesContent(a._sources.toArray(),a.sourceRoot);a.file=b._file;a.__generatedMappings=b._mappings.slice().sort(c.compareByGeneratedPositions);a.__originalMappings=b._mappings.slice().sort(c.compareByOriginalPositions);return a};g.prototype._version=3;Object.defineProperty(g.prototype,"sources",{get:function(){return this._sources.toArray().map(function(b){return this.sourceRoot?c.join(this.sourceRoot,
b):b},this)}});g.prototype.__generatedMappings=null;Object.defineProperty(g.prototype,"_generatedMappings",{get:function(){this.__generatedMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,this.sourceRoot));return this.__generatedMappings}});g.prototype.__originalMappings=null;Object.defineProperty(g.prototype,"_originalMappings",{get:function(){this.__originalMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,
this.sourceRoot));return this.__originalMappings}});g.prototype._parseMappings=function(b,d){for(var f=1,e=0,g=0,m=0,k=0,x=0,l=/^[,;]/,r=b,w;0<r.length;)if(";"===r.charAt(0))f++,r=r.slice(1),e=0;else if(","===r.charAt(0))r=r.slice(1);else{w={};w.generatedLine=f;r=a.decode(r);w.generatedColumn=e+r.value;e=w.generatedColumn;r=r.rest;if(0<r.length&&!l.test(r.charAt(0))){r=a.decode(r);w.source=this._sources.at(k+r.value);k+=r.value;r=r.rest;if(0===r.length||l.test(r.charAt(0)))throw Error("Found a source, but no line and column");
r=a.decode(r);w.originalLine=g+r.value;g=w.originalLine;w.originalLine+=1;r=r.rest;if(0===r.length||l.test(r.charAt(0)))throw Error("Found a source and line, but no column");r=a.decode(r);w.originalColumn=m+r.value;m=w.originalColumn;r=r.rest;0<r.length&&!l.test(r.charAt(0))&&(r=a.decode(r),w.name=this._names.at(x+r.value),x+=r.value,r=r.rest)}this.__generatedMappings.push(w);"number"===typeof w.originalLine&&this.__originalMappings.push(w)}this.__generatedMappings.sort(c.compareByGeneratedPositions);
this.__originalMappings.sort(c.compareByOriginalPositions)};g.prototype._findMapping=function(b,a,c,e,g){if(0>=b[c])throw new TypeError("Line must be greater than or equal to 1, got "+b[c]);if(0>b[e])throw new TypeError("Column must be greater than or equal to 0, got "+b[e]);return f.search(b,a,g)};g.prototype.originalPositionFor=function(b){b={generatedLine:c.getArg(b,"line"),generatedColumn:c.getArg(b,"column")};if(b=this._findMapping(b,this._generatedMappings,"generatedLine","generatedColumn",
c.compareByGeneratedPositions)){var a=c.getArg(b,"source",null);a&&this.sourceRoot&&(a=c.join(this.sourceRoot,a));return{source:a,line:c.getArg(b,"originalLine",null),column:c.getArg(b,"originalColumn",null),name:c.getArg(b,"name",null)}}return{source:null,line:null,column:null,name:null}};g.prototype.sourceContentFor=function(b){if(!this.sourcesContent)return null;this.sourceRoot&&(b=c.relative(this.sourceRoot,b));if(this._sources.has(b))return this.sourcesContent[this._sources.indexOf(b)];var a;
if(this.sourceRoot&&(a=c.urlParse(this.sourceRoot))){var f=b.replace(/^file:\/\//,"");if("file"==a.scheme&&this._sources.has(f))return this.sourcesContent[this._sources.indexOf(f)];if((!a.path||"/"==a.path)&&this._sources.has("/"+b))return this.sourcesContent[this._sources.indexOf("/"+b)]}throw Error('"'+b+'" is not in the SourceMap.');};g.prototype.generatedPositionFor=function(b){b={source:c.getArg(b,"source"),originalLine:c.getArg(b,"line"),originalColumn:c.getArg(b,"column")};this.sourceRoot&&
(b.source=c.relative(this.sourceRoot,b.source));return(b=this._findMapping(b,this._originalMappings,"originalLine","originalColumn",c.compareByOriginalPositions))?{line:c.getArg(b,"generatedLine",null),column:c.getArg(b,"generatedColumn",null)}:{line:null,column:null}};g.GENERATED_ORDER=1;g.ORIGINAL_ORDER=2;g.prototype.eachMapping=function(b,a,f){a=a||null;switch(f||g.GENERATED_ORDER){case g.GENERATED_ORDER:f=this._generatedMappings;break;case g.ORIGINAL_ORDER:f=this._originalMappings;break;default:throw Error("Unknown order of iteration.");
}var e=this.sourceRoot;f.map(function(b){var a=b.source;a&&e&&(a=c.join(e,a));return{source:a,generatedLine:b.generatedLine,generatedColumn:b.generatedColumn,originalLine:b.originalLine,originalColumn:b.originalColumn,name:b.name}}).forEach(b,a)};k.SourceMapConsumer=g})},{"./array-set":9,"./base64-vlq":10,"./binary-search":12,"./util":16,amdefine:17}],14:[function(k,s,l){if("function"!==typeof e)var e=k("amdefine")(s,k);e(function(e,k,l){function g(a){this._file=f.getArg(a,"file");this._sourceRoot=
f.getArg(a,"sourceRoot",null);this._sources=new m;this._names=new m;this._mappings=[];this._sourcesContents=null}var c=e("./base64-vlq"),f=e("./util"),m=e("./array-set").ArraySet;g.prototype._version=3;g.fromSourceMap=function(a){var b=a.sourceRoot,d=new g({file:a.file,sourceRoot:b});a.eachMapping(function(a){var c={generated:{line:a.generatedLine,column:a.generatedColumn}};a.source&&(c.source=a.source,b&&(c.source=f.relative(b,c.source)),c.original={line:a.originalLine,column:a.originalColumn},a.name&&
(c.name=a.name));d.addMapping(c)});a.sources.forEach(function(b){var c=a.sourceContentFor(b);c&&d.setSourceContent(b,c)});return d};g.prototype.addMapping=function(a){var b=f.getArg(a,"generated"),d=f.getArg(a,"original",null),c=f.getArg(a,"source",null);a=f.getArg(a,"name",null);this._validateMapping(b,d,c,a);c&&!this._sources.has(c)&&this._sources.add(c);a&&!this._names.has(a)&&this._names.add(a);this._mappings.push({generatedLine:b.line,generatedColumn:b.column,originalLine:null!=d&&d.line,originalColumn:null!=
d&&d.column,source:c,name:a})};g.prototype.setSourceContent=function(a,b){var d=a;this._sourceRoot&&(d=f.relative(this._sourceRoot,d));null!==b?(this._sourcesContents||(this._sourcesContents={}),this._sourcesContents[f.toSetString(d)]=b):(delete this._sourcesContents[f.toSetString(d)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))};g.prototype.applySourceMap=function(a,b){b||(b=a.file);var d=this._sourceRoot;d&&(b=f.relative(d,b));var c=new m,e=new m;this._mappings.forEach(function(g){if(g.source===
b&&g.originalLine){var k=a.originalPositionFor({line:g.originalLine,column:g.originalColumn});null!==k.source&&(g.source=d?f.relative(d,k.source):k.source,g.originalLine=k.line,g.originalColumn=k.column,null!==k.name&&null!==g.name&&(g.name=k.name))}(k=g.source)&&!c.has(k)&&c.add(k);(g=g.name)&&!e.has(g)&&e.add(g)},this);this._sources=c;this._names=e;a.sources.forEach(function(b){var c=a.sourceContentFor(b);c&&(d&&(b=f.relative(d,b)),this.setSourceContent(b,c))},this)};g.prototype._validateMapping=
function(a,b,d,c){if(!(a&&"line"in a&&"column"in a&&0<a.line&&0<=a.column&&!b&&!d&&!c||a&&"line"in a&&"column"in a&&b&&"line"in b&&"column"in b&&0<a.line&&0<=a.column&&0<b.line&&0<=b.column&&d))throw Error("Invalid mapping: "+JSON.stringify({generated:a,source:d,original:b,name:c}));};g.prototype._serializeMappings=function(){var a=0,b=1,d=0,e=0,g=0,k=0,m="",v;this._mappings.sort(f.compareByGeneratedPositions);for(var x=0,l=this._mappings.length;x<l;x++){v=this._mappings[x];if(v.generatedLine!==b)for(a=
0;v.generatedLine!==b;)m+=";",b++;else if(0<x){if(!f.compareByGeneratedPositions(v,this._mappings[x-1]))continue;m+=","}m+=c.encode(v.generatedColumn-a);a=v.generatedColumn;v.source&&(m+=c.encode(this._sources.indexOf(v.source)-k),k=this._sources.indexOf(v.source),m+=c.encode(v.originalLine-1-e),e=v.originalLine-1,m+=c.encode(v.originalColumn-d),d=v.originalColumn,v.name&&(m+=c.encode(this._names.indexOf(v.name)-g),g=this._names.indexOf(v.name)))}return m};g.prototype._generateSourcesContent=function(a,
b){return a.map(function(a){if(!this._sourcesContents)return null;b&&(a=f.relative(b,a));a=f.toSetString(a);return Object.prototype.hasOwnProperty.call(this._sourcesContents,a)?this._sourcesContents[a]:null},this)};g.prototype.toJSON=function(){var a={version:this._version,file:this._file,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};this._sourceRoot&&(a.sourceRoot=this._sourceRoot);this._sourcesContents&&(a.sourcesContent=this._generateSourcesContent(a.sources,
a.sourceRoot));return a};g.prototype.toString=function(){return JSON.stringify(this)};k.SourceMapGenerator=g})},{"./array-set":9,"./base64-vlq":10,"./util":16,amdefine:17}],15:[function(k,s,l){if("function"!==typeof e)var e=k("amdefine")(s,k);e(function(e,k,l){function g(c,a,b,d,e){this.children=[];this.sourceContents={};this.line=void 0===c?null:c;this.column=void 0===a?null:a;this.source=void 0===b?null:b;this.name=void 0===e?null:e;null!=d&&this.add(d)}var c=e("./source-map-generator").SourceMapGenerator,
f=e("./util");g.fromStringWithSourceMap=function(c,a){function b(b,a){null===b||void 0===b.source?d.add(a):d.add(new g(b.originalLine,b.originalColumn,b.source,a,b.name))}var d=new g,e=c.split("\n"),f=1,k=0,l=null;a.eachMapping(function(a){if(null===l){for(;f<a.generatedLine;)d.add(e.shift()+"\n"),f++;if(k<a.generatedColumn){var c=e[0];d.add(c.substr(0,a.generatedColumn));e[0]=c.substr(a.generatedColumn);k=a.generatedColumn}}else{if(f<a.generatedLine){var g="";do g+=e.shift()+"\n",f++,k=0;while(f<
a.generatedLine);k<a.generatedColumn&&(c=e[0],g+=c.substr(0,a.generatedColumn),e[0]=c.substr(a.generatedColumn),k=a.generatedColumn)}else c=e[0],g=c.substr(0,a.generatedColumn-k),e[0]=c.substr(a.generatedColumn-k),k=a.generatedColumn;b(l,g)}l=a},this);b(l,e.join("\n"));a.sources.forEach(function(b){var c=a.sourceContentFor(b);c&&d.setSourceContent(b,c)});return d};g.prototype.add=function(c){if(Array.isArray(c))c.forEach(function(a){this.add(a)},this);else if(c instanceof g||"string"===typeof c)c&&
this.children.push(c);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+c);return this};g.prototype.prepend=function(c){if(Array.isArray(c))for(var a=c.length-1;0<=a;a--)this.prepend(c[a]);else if(c instanceof g||"string"===typeof c)this.children.unshift(c);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+c);return this};g.prototype.walk=function(c){for(var a,b=0,d=this.children.length;b<d;b++)a=
this.children[b],a instanceof g?a.walk(c):""!==a&&c(a,{source:this.source,line:this.line,column:this.column,name:this.name})};g.prototype.join=function(c){var a,b,d=this.children.length;if(0<d){a=[];for(b=0;b<d-1;b++)a.push(this.children[b]),a.push(c);a.push(this.children[b]);this.children=a}return this};g.prototype.replaceRight=function(c,a){var b=this.children[this.children.length-1];b instanceof g?b.replaceRight(c,a):"string"===typeof b?this.children[this.children.length-1]=b.replace(c,a):this.children.push("".replace(c,
a));return this};g.prototype.setSourceContent=function(c,a){this.sourceContents[f.toSetString(c)]=a};g.prototype.walkSourceContents=function(c){for(var a=0,b=this.children.length;a<b;a++)this.children[a]instanceof g&&this.children[a].walkSourceContents(c);for(var d=Object.keys(this.sourceContents),a=0,b=d.length;a<b;a++)c(f.fromSetString(d[a]),this.sourceContents[d[a]])};g.prototype.toString=function(){var c="";this.walk(function(a){c+=a});return c};g.prototype.toStringWithSourceMap=function(e){var a=
"",b=1,d=0,f=new c(e),g=!1,k=null,l=null,v=null,x=null;this.walk(function(c,e){a+=c;null!==e.source&&null!==e.line&&null!==e.column?(k===e.source&&l===e.line&&v===e.column&&x===e.name||f.addMapping({source:e.source,original:{line:e.line,column:e.column},generated:{line:b,column:d},name:e.name}),k=e.source,l=e.line,v=e.column,x=e.name,g=!0):g&&(f.addMapping({generated:{line:b,column:d}}),k=null,g=!1);c.split("").forEach(function(a){"\n"===a?(b++,d=0):d++})});this.walkSourceContents(function(b,a){f.setSourceContent(b,
a)});return{code:a,map:f}};k.SourceNode=g})},{"./source-map-generator":14,"./util":16,amdefine:17}],16:[function(k,s,l){if("function"!==typeof e)var e=k("amdefine")(s,k);e(function(e,k,l){function g(b){return(b=b.match(m))?{scheme:b[1],auth:b[3],host:b[4],port:b[6],path:b[7]}:null}function c(b){var a=b.scheme+"://";b.auth&&(a+=b.auth+"@");b.host&&(a+=b.host);b.port&&(a+=":"+b.port);b.path&&(a+=b.path);return a}function f(a,c){var e=a||"",f=c||"";return(e>f)-(e<f)}k.getArg=function(a,c,e){if(c in a)return a[c];
if(3===arguments.length)return e;throw Error('"'+c+'" is a required argument.');};var m=/([\w+\-.]+):\/\/((\w+:\w+)@)?([\w.]+)?(:(\d+))?(\S+)?/,a=/^data:.+\,.+/;k.urlParse=g;k.urlGenerate=c;k.join=function(b,d){var e;return d.match(m)||d.match(a)?d:"/"===d.charAt(0)&&(e=g(b))?(e.path=d,c(e)):b.replace(/\/$/,"")+"/"+d};k.toSetString=function(a){return"$"+a};k.fromSetString=function(a){return a.substr(1)};k.relative=function(a,c){a=a.replace(/\/$/,"");var e=g(a);return"/"==c.charAt(0)&&e&&"/"==e.path?
c.slice(1):0===c.indexOf(a+"/")?c.substr(a.length+1):c};k.compareByOriginalPositions=function(a,c,e){var g;return(g=f(a.source,c.source))||(g=a.originalLine-c.originalLine)||(g=a.originalColumn-c.originalColumn)||e||(g=f(a.name,c.name))?g:(g=a.generatedLine-c.generatedLine)?g:a.generatedColumn-c.generatedColumn};k.compareByGeneratedPositions=function(a,c,e){var g;return(g=a.generatedLine-c.generatedLine)||(g=a.generatedColumn-c.generatedColumn)||e||(g=f(a.source,c.source))||(g=a.originalLine-c.originalLine)?
g:(g=a.originalColumn-c.originalColumn)?g:f(a.name,c.name)}})},{amdefine:17}],17:[function(k,s,l){(function(e,l){s.exports=function(t,s){function g(a,b){var c;if(a&&"."===a.charAt(0)&&b){c=b.split("/");c=c.slice(0,c.length-1);var d=c=c.concat(a.split("/")),e,f;for(e=0;d[e];e+=1)if(f=d[e],"."===f)d.splice(e,1),e-=1;else if(".."===f)if(1!==e||".."!==d[2]&&".."!==d[0])0<e&&(d.splice(e-1,2),e-=2);else break;a=c.join("/")}return a}function c(a){return function(b){return g(b,a)}}function f(a){function b(c){d[a]=
c}b.fromText=function(a,b){throw Error("amdefine does not implement load.fromText");};return b}function m(a,b,c){var e,f,g;if(a)f=d[a]={},g={id:a,uri:l,exports:f},e=A(s,f,g,a);else{if(z)throw Error("amdefine with no module ID cannot be called more than once per file.");z=!0;f=t.exports;g=t;e=A(s,f,g,t.id)}b&&(b=b.map(function(a){return e(a)}));b="function"===typeof c?c.apply(g.exports,b):c;void 0!==b&&(g.exports=b,a&&(d[a]=g.exports))}function a(a,c,d){Array.isArray(a)?(d=c,c=a,a=void 0):"string"!==
typeof a&&(d=a,a=c=void 0);c&&!Array.isArray(c)&&(d=c,c=void 0);c||(c=["require","exports","module"]);a?b[a]=[a,c,d]:m(a,c,d)}var b={},d={},z=!1,D=k("path"),A,B;A=function(a,b,c,d){function f(g,k){if("string"===typeof g)return B(a,b,c,g,d);g=g.map(function(e){return B(a,b,c,e,d)});e.nextTick(function(){k.apply(null,g)})}f.toUrl=function(a){return 0===a.indexOf(".")?g(a,D.dirname(c.filename)):a};return f};s=s||function(){return t.require.apply(t,arguments)};B=function(a,e,k,l,w){var y=l.indexOf("!"),
q=l;if(-1===y){l=g(l,w);if("require"===l)return A(a,e,k,w);if("exports"===l)return e;if("module"===l)return k;if(d.hasOwnProperty(l))return d[l];if(b[l])return m.apply(null,b[l]),d[l];if(a)return a(q);throw Error("No module with ID: "+l);}q=l.substring(0,y);l=l.substring(y+1,l.length);y=B(a,e,k,q,w);l=y.normalize?y.normalize(l,c(w)):g(l,w);d[l]||y.load(l,A(a,e,k,w),f(l),{});return d[l]};a.require=function(a){if(d[a])return d[a];if(b[a])return m.apply(null,b[a]),d[a]};a.amd={};return a}}).call(this,
k("node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"),"/node_modules/source-map/node_modules/amdefine/amdefine.js")},{"node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":6,path:7}],18:[function(k,s,l){(function(e,q){function t(){return"undefined"!==typeof window}function s(a){if(a in C)return C[a];try{if(t()){var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);var c=4===b.readyState?b.responseText:null}else c=
B.readFileSync(a,"utf8")}catch(d){c=null}return C[a]=c}function g(a,b){if(!a)return b;var c=A.dirname(a),d=/^\w+:\/\/[^\/]*/.exec(c),d=d?d[0]:"";return d+A.resolve(c.slice(d.length),b)}function c(a){var b;a:{if(t()&&(b=new XMLHttpRequest,b.open("GET",a,!1),b.send(null),b=b.getResponseHeader("SourceMap")||b.getResponseHeader("X-SourceMap")))break a;b=s(a);b=(b=/\/\/[#@]\s*sourceMappingURL=(.*)\s*$/m.exec(b))?b[1]:null}if(!b)return null;"data:application/json;base64,"==b.slice(0,29).toLowerCase()?(a=
(new q(b.slice(29),"base64")).toString(),b=null):(b=g(a,b),a=s(b,"utf8"));return a?{url:b,map:a}:null}function f(a){var b=r[a.source];if(!b){var d=c(a.source);d&&(b=r[a.source]={url:d.url,map:new D(d.map)},b.map.sourcesContent&&b.map.sources.forEach(function(a,c){var d=b.map.sourcesContent[c];if(d){var e=g(b.url,a);C[e]=d}}))}return b&&(d=b.map.originalPositionFor(a),null!==d.source)?(d.source=g(b.url,d.source),d):a}function m(a){var b=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(a);return b?(a=
f({source:b[2],line:b[3],column:b[4]-1}),"eval at "+b[1]+" ("+a.source+":"+a.line+":"+(a.column+1)+")"):(b=/^eval at ([^(]+) \((.+)\)$/.exec(a))?"eval at "+b[1]+" ("+m(b[2])+")":a}function a(a){var b=a.getFileName()||a.getScriptNameOrSourceURL();if(b){var c=f({source:b,line:a.getLineNumber(),column:a.getColumnNumber()-1});return{__proto__:a,getFileName:function(){return c.source},getLineNumber:function(){return c.line},getColumnNumber:function(){return c.column+1},getScriptNameOrSourceURL:function(){return c.source}}}var d=
a.isEval()&&a.getEvalOrigin();return d?(d=m(d),{__proto__:a,getEvalOrigin:function(){return d}}):a}function b(b,c){x&&(C={},r={});return b+c.map(function(b){return"\n at "+a(b)}).join("")}function d(a){var b=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(a.stack);if(b){a=b[1];var c=+b[2],b=+b[3],d=C[a];!d&&B.existsSync(a)&&(d=B.readFileSync(a,"utf8"));if(d&&(d=d.split(/(?:\r\n|\r|\n)/)[c-1]))return"\n"+a+":"+c+"\n"+d+"\n"+Array(b).join(" ")+"^"}return null}function z(a){if(a&&a.stack){var b=d(a);null!==
b&&console.log(b);console.log(a.stack)}else console.log("Uncaught exception:",a);e.exit(1)}var D=k("source-map").SourceMapConsumer,A=k("path"),B=k("fs"),v=!1,x=!1,C={},r={};l.wrapCallSite=a;l.getErrorSource=d;l.mapSourcePosition=f;l.retrieveSourceMap=c;l.install=function(a){if(!v){v=!0;Error.prepareStackTrace=b;a=a||{};var d="handleUncaughtExceptions"in a?a.handleUncaughtExceptions:!0;x="emptyCacheBetweenOperations"in a?a.emptyCacheBetweenOperations:!1;a.retrieveFile&&(s=a.retrieveFile);a.retrieveSourceMap&&
(c=a.retrieveSourceMap);if(d&&!t())e.on("uncaughtException",z)}}}).call(this,k("node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"),k("buffer").Buffer)},{"node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":6,buffer:3,fs:2,path:7,"source-map":8}]},{},[1]);return H});

@ -4,9 +4,14 @@ var fs = require('fs');
var querystring = require('querystring');
var child_process = require('child_process');
function run(command, callback) {
console.log(command);
child_process.exec(command, callback);
}
// Use browserify to package up source-map-support.js
fs.writeFileSync('.temp.js', 'sourceMapSupport = require("./source-map-support");');
child_process.exec('node_modules/browserify/bin/cmd.js .temp.js', function(error, stdout) {
run('node_modules/browserify/bin/cmd.js .temp.js', function(error, stdout) {
if (error) throw error;
// Wrap the code so it works both as a normal <script> module and as an AMD module
@ -29,7 +34,7 @@ child_process.exec('node_modules/browserify/bin/cmd.js .temp.js', function(error
output_format: 'text',
js_code: code
}));
child_process.exec('curl -d @.temp.js "http://closure-compiler.appspot.com/compile"', function(error, stdout) {
run('curl -d @.temp.js "http://closure-compiler.appspot.com/compile"', function(error, stdout) {
if (error) throw error;
var code = header + '\n' + stdout;
fs.unlinkSync('.temp.js');
@ -39,19 +44,26 @@ child_process.exec('node_modules/browserify/bin/cmd.js .temp.js', function(error
});
// Build the AMD test
child_process.exec('node_modules/coffee-script/bin/coffee --map --compile amd-test/script.coffee', function(error) {
run('node_modules/coffee-script/bin/coffee --map --compile amd-test/script.coffee', function(error) {
if (error) throw error;
});
// Build the browserify test
child_process.exec('node_modules/coffee-script/bin/coffee --map --compile browserify-test/script.coffee', function(error) {
run('node_modules/coffee-script/bin/coffee --map --compile browserify-test/script.coffee', function(error) {
if (error) throw error;
child_process.exec('node_modules/browserify/bin/cmd.js --debug browserify-test/script.js > browserify-test/compiled.js', function(error) {
run('node_modules/browserify/bin/cmd.js --debug browserify-test/script.js > browserify-test/compiled.js', function(error) {
if (error) throw error;
})
});
// Build the browser test
child_process.exec('node_modules/coffee-script/bin/coffee --map --compile browser-test/script.coffee', function(error) {
run('node_modules/coffee-script/bin/coffee --map --compile browser-test/script.coffee', function(error) {
if (error) throw error;
});
// Build the header test
run('node_modules/coffee-script/bin/coffee --map --compile header-test/script.coffee', function(error) {
if (error) throw error;
var contents = fs.readFileSync('header-test/script.js', 'utf8');
fs.writeFileSync('header-test/script.js', contents.replace(/\/\/# sourceMappingURL=.*/g, ''))
});

@ -0,0 +1,6 @@
<p>
Make sure to run build.js, then run server.js and visit <a href="http://localhost:1337/">http://localhost:1337/</a>.
This test should say either "Test failed" or "Test passed":
</p>
<script src="browser-source-map-support.js"></script>
<script src="script.js"></script>

@ -0,0 +1,12 @@
sourceMapSupport.install()
foo = -> throw new Error 'foo'
try
foo()
catch e
if /\bscript\.coffee\b/.test e.stack
document.body.appendChild document.createTextNode 'Test passed'
else
document.body.appendChild document.createTextNode 'Test failed'
console.log e.stack

@ -0,0 +1,45 @@
var fs = require('fs');
var http = require('http');
http.createServer(function(req, res) {
switch (req.url) {
case '/':
case '/index.html': {
res.writeHead(200, { 'Content-Type': 'text/html' });
res.end(fs.readFileSync('index.html', 'utf8'));
break;
}
case '/browser-source-map-support.js': {
res.writeHead(200, { 'Content-Type': 'text/javascript' });
res.end(fs.readFileSync('../browser-source-map-support.js', 'utf8'));
break;
}
case '/script.js': {
res.writeHead(200, { 'Content-Type': 'text/javascript', 'SourceMap': 'script-source-map.map' });
res.end(fs.readFileSync('script.js', 'utf8'));
break;
}
case '/script-source-map.map': {
res.writeHead(200, { 'Content-Type': 'application/json' });
res.end(fs.readFileSync('script.map', 'utf8'));
break;
}
case '/header-test/script.coffee': {
res.writeHead(200, { 'Content-Type': 'text/x-coffeescript' });
res.end(fs.readFileSync('script.coffee', 'utf8'));
break;
}
default: {
res.writeHead(404, { 'Content-Type': 'text/html' });
res.end('404 not found');
break;
}
}
}).listen(1337, '127.0.0.1');
console.log('Server running at http://127.0.0.1:1337/');

@ -1,7 +1,7 @@
{
"name": "source-map-support",
"description": "Fixes stack traces for files with source maps",
"version": "0.2.6",
"version": "0.2.7",
"main": "./source-map-support.js",
"scripts": {
"test": "node_modules/mocha/bin/mocha"

@ -68,10 +68,10 @@ function retrieveSourceMapURL(source) {
if (sourceMapHeader) {
return sourceMapHeader;
}
} else {
fileData = retrieveFile(source);
}
// Get the URL of the source map
fileData = retrieveFile(source);
var match = /\/\/[#@]\s*sourceMappingURL=(.*)\s*$/m.exec(fileData);
if (!match) return null;
return match[1];

Loading…
Cancel
Save