mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-11 19:00:00 +01:00
1 line
418 KiB
JavaScript
1 line
418 KiB
JavaScript
!function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[o]={exports:{}};t[o][0].call(c.exports,function(e){var n=t[o][1][e];return i(n||e)},c,c.exports,e,t,n,r)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,n){function r(e,t){return h.isUndefined(t)?""+t:h.isNumber(t)&&!isFinite(t)?t.toString():h.isFunction(t)||h.isRegExp(t)?t.toString():t}function i(e,t){return h.isString(e)?e.length<t?e:e.slice(0,t):e}function a(e){return i(JSON.stringify(e.actual,r),128)+" "+e.operator+" "+i(JSON.stringify(e.expected,r),128)}function o(e,t,n,r,i){throw new m.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function s(e,t){e||o(e,!0,t,"==",m.ok)}function l(e,t){if(e===t)return!0;if(h.isBuffer(e)&&h.isBuffer(t)){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return h.isDate(e)&&h.isDate(t)?e.getTime()===t.getTime():h.isRegExp(e)&&h.isRegExp(t)?e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase:h.isObject(e)||h.isObject(t)?c(e,t):e==t}function u(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function c(e,t){if(h.isNullOrUndefined(e)||h.isNullOrUndefined(t))return!1;if(e.prototype!==t.prototype)return!1;if(h.isPrimitive(e)||h.isPrimitive(t))return e===t;var n=u(e),r=u(t);if(n&&!r||!n&&r)return!1;if(n)return e=d.call(e),t=d.call(t),l(e,t);var i,a,o=v(e),s=v(t);if(o.length!=s.length)return!1;for(o.sort(),s.sort(),a=o.length-1;a>=0;a--)if(o[a]!=s[a])return!1;for(a=o.length-1;a>=0;a--)if(i=o[a],!l(e[i],t[i]))return!1;return!0}function f(e,t){return!(!e||!t)&&("[object RegExp]"==Object.prototype.toString.call(t)?t.test(e):e instanceof t||!0===t.call({},e))}function p(e,t,n,r){var i;h.isString(n)&&(r=n,n=null);try{t()}catch(e){i=e}if(r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&o(i,n,"Missing expected exception"+r),!e&&f(i,n)&&o(i,n,"Got unwanted exception"+r),e&&i&&n&&!f(i,n)||!e&&i)throw i}var h=e("util/"),d=Array.prototype.slice,g=Object.prototype.hasOwnProperty,m=t.exports=s;m.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=a(this),this.generatedMessage=!0);var t=e.stackStartFunction||o;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=t.name,s=r.indexOf("\n"+i);if(s>=0){var l=r.indexOf("\n",s+1);r=r.substring(l+1)}this.stack=r}}},h.inherits(m.AssertionError,Error),m.fail=o,m.ok=s,m.equal=function(e,t,n){e!=t&&o(e,t,n,"==",m.equal)},m.notEqual=function(e,t,n){e==t&&o(e,t,n,"!=",m.notEqual)},m.deepEqual=function(e,t,n){l(e,t)||o(e,t,n,"deepEqual",m.deepEqual)},m.notDeepEqual=function(e,t,n){l(e,t)&&o(e,t,n,"notDeepEqual",m.notDeepEqual)},m.strictEqual=function(e,t,n){e!==t&&o(e,t,n,"===",m.strictEqual)},m.notStrictEqual=function(e,t,n){e===t&&o(e,t,n,"!==",m.notStrictEqual)},m.throws=function(e,t,n){p.apply(this,[!0].concat(d.call(arguments)))},m.doesNotThrow=function(e,t){p.apply(this,[!1].concat(d.call(arguments)))},m.ifError=function(e){if(e)throw e};var v=Object.keys||function(e){var t=[];for(var n in e)g.call(e,n)&&t.push(n);return t}},{"util/":119}],2:[function(e,t,n){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return o[e>>18&63]+o[e>>12&63]+o[e>>6&63]+o[63&e]}function a(e,t,n){for(var r,a=[],o=t;o<n;o+=3)r=(e[o]<<16)+(e[o+1]<<8)+e[o+2],a.push(i(r));return a.join("")}n.byteLength=function(e){return 3*e.length/4-r(e)},n.toByteArray=function(e){var t,n,i,a,o,u,c=e.length;o=r(e),u=new l(3*c/4-o),i=o>0?c-4:c;var f=0;for(t=0,n=0;t<i;t+=4,n+=3)a=s[e.charCodeAt(t)]<<18|s[e.charCodeAt(t+1)]<<12|s[e.charCodeAt(t+2)]<<6|s[e.charCodeAt(t+3)],u[f++]=a>>16&255,u[f++]=a>>8&255,u[f++]=255&a;return 2===o?(a=s[e.charCodeAt(t)]<<2|s[e.charCodeAt(t+1)]>>4,u[f++]=255&a):1===o&&(a=s[e.charCodeAt(t)]<<10|s[e.charCodeAt(t+1)]<<4|s[e.charCodeAt(t+2)]>>2,u[f++]=a>>8&255,u[f++]=255&a),u},n.fromByteArray=function(e){for(var t,n=e.length,r=n%3,i="",s=[],l=0,u=n-r;l<u;l+=16383)s.push(a(e,l,l+16383>u?u:l+16383));return 1===r?(t=e[n-1],i+=o[t>>2],i+=o[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=o[t>>10],i+=o[t>>4&63],i+=o[t<<2&63],i+="="),s.push(i),s.join("")};for(var o=[],s=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,f=u.length;c<f;++c)o[c]=u[c],s[u.charCodeAt(c)]=c;s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63},{}],3:[function(e,t,n){},{}],4:[function(e,t,n){(function(t,r){function i(e){if(e<n.DEFLATE||e>n.UNZIP)throw new TypeError("Bad argument");this.mode=e,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function a(e,t){for(var n=0;n<e.length;n++)this[t+n]=e[n]}var o=e("pako/lib/zlib/messages"),s=e("pako/lib/zlib/zstream"),l=e("pako/lib/zlib/deflate.js"),u=e("pako/lib/zlib/inflate.js"),c=e("pako/lib/zlib/constants");for(var f in c)n[f]=c[f];n.NONE=0,n.DEFLATE=1,n.INFLATE=2,n.GZIP=3,n.GUNZIP=4,n.DEFLATERAW=5,n.INFLATERAW=6,n.UNZIP=7,i.prototype.init=function(e,t,r,i,a){switch(this.windowBits=e,this.level=t,this.memLevel=r,this.strategy=i,this.mode!==n.GZIP&&this.mode!==n.GUNZIP||(this.windowBits+=16),this.mode===n.UNZIP&&(this.windowBits+=32),this.mode!==n.DEFLATERAW&&this.mode!==n.INFLATERAW||(this.windowBits=-this.windowBits),this.strm=new s,this.mode){case n.DEFLATE:case n.GZIP:case n.DEFLATERAW:o=l.deflateInit2(this.strm,this.level,n.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case n.INFLATE:case n.GUNZIP:case n.INFLATERAW:case n.UNZIP:var o=u.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}o===n.Z_OK?(this.write_in_progress=!1,this.init_done=!0):this._error(o)},i.prototype.params=function(){throw new Error("deflateParams Not supported")},i.prototype._writeCheck=function(){if(!this.init_done)throw new Error("write before init");if(this.mode===n.NONE)throw new Error("already finalized");if(this.write_in_progress)throw new Error("write already in progress");if(this.pending_close)throw new Error("close is pending")},i.prototype.write=function(e,n,r,i,a,o,s){this._writeCheck(),this.write_in_progress=!0;var l=this;return t.nextTick(function(){l.write_in_progress=!1;var t=l._write(e,n,r,i,a,o,s);l.callback(t[0],t[1]),l.pending_close&&l.close()}),this},i.prototype.writeSync=function(e,t,n,r,i,a,o){return this._writeCheck(),this._write(e,t,n,r,i,a,o)},i.prototype._write=function(e,t,i,o,s,c,f){if(this.write_in_progress=!0,e!==n.Z_NO_FLUSH&&e!==n.Z_PARTIAL_FLUSH&&e!==n.Z_SYNC_FLUSH&&e!==n.Z_FULL_FLUSH&&e!==n.Z_FINISH&&e!==n.Z_BLOCK)throw new Error("Invalid flush value");null==t&&(t=new r(0),o=0,i=0),s._set?s.set=s._set:s.set=a;var p=this.strm;switch(p.avail_in=o,p.input=t,p.next_in=i,p.avail_out=f,p.output=s,p.next_out=c,this.mode){case n.DEFLATE:case n.GZIP:case n.DEFLATERAW:h=l.deflate(p,e);break;case n.UNZIP:case n.INFLATE:case n.GUNZIP:case n.INFLATERAW:var h=u.inflate(p,e);break;default:throw new Error("Unknown mode "+this.mode)}return h!==n.Z_STREAM_END&&h!==n.Z_OK&&this._error(h),this.write_in_progress=!1,[p.avail_in,p.avail_out]},i.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,this.mode===n.DEFLATE||this.mode===n.GZIP||this.mode===n.DEFLATERAW?l.deflateEnd(this.strm):u.inflateEnd(this.strm),this.mode=n.NONE)},i.prototype.reset=function(){switch(this.mode){case n.DEFLATE:case n.DEFLATERAW:e=l.deflateReset(this.strm);break;case n.INFLATE:case n.INFLATERAW:var e=u.inflateReset(this.strm)}e!==n.Z_OK&&this._error(e)},i.prototype._error=function(e){this.onerror(o[e]+": "+this.strm.msg,e),this.write_in_progress=!1,this.pending_close&&this.close()},n.Zlib=i}).call(this,e("_process"),e("buffer").Buffer)},{_process:94,buffer:7,"pako/lib/zlib/constants":62,"pako/lib/zlib/deflate.js":64,"pako/lib/zlib/inflate.js":66,"pako/lib/zlib/messages":68,"pako/lib/zlib/zstream":70}],5:[function(e,t,n){(function(t,r){function i(e,t,n){function i(){for(var t;null!==(t=e.read());)o.push(t),s+=t.length;e.once("readable",i)}function a(){var t=r.concat(o,s);o=[],n(null,t),e.close()}var o=[],s=0;e.on("error",function(t){e.removeListener("end",a),e.removeListener("readable",i),n(t)}),e.on("end",a),e.end(t),i()}function a(e,t){if("string"==typeof t&&(t=new r(t)),!r.isBuffer(t))throw new TypeError("Not a string or buffer");var n=g.Z_FINISH;return e._processChunk(t,n)}function o(e){if(!(this instanceof o))return new o(e);h.call(this,e,g.DEFLATE)}function s(e){if(!(this instanceof s))return new s(e);h.call(this,e,g.INFLATE)}function l(e){if(!(this instanceof l))return new l(e);h.call(this,e,g.GZIP)}function u(e){if(!(this instanceof u))return new u(e);h.call(this,e,g.GUNZIP)}function c(e){if(!(this instanceof c))return new c(e);h.call(this,e,g.DEFLATERAW)}function f(e){if(!(this instanceof f))return new f(e);h.call(this,e,g.INFLATERAW)}function p(e){if(!(this instanceof p))return new p(e);h.call(this,e,g.UNZIP)}function h(e,t){if(this._opts=e=e||{},this._chunkSize=e.chunkSize||n.Z_DEFAULT_CHUNK,d.call(this,e),e.flush&&e.flush!==g.Z_NO_FLUSH&&e.flush!==g.Z_PARTIAL_FLUSH&&e.flush!==g.Z_SYNC_FLUSH&&e.flush!==g.Z_FULL_FLUSH&&e.flush!==g.Z_FINISH&&e.flush!==g.Z_BLOCK)throw new Error("Invalid flush flag: "+e.flush);if(this._flushFlag=e.flush||g.Z_NO_FLUSH,e.chunkSize&&(e.chunkSize<n.Z_MIN_CHUNK||e.chunkSize>n.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<n.Z_MIN_WINDOWBITS||e.windowBits>n.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<n.Z_MIN_LEVEL||e.level>n.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<n.Z_MIN_MEMLEVEL||e.memLevel>n.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=n.Z_FILTERED&&e.strategy!=n.Z_HUFFMAN_ONLY&&e.strategy!=n.Z_RLE&&e.strategy!=n.Z_FIXED&&e.strategy!=n.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!r.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new g.Zlib(t);var i=this;this._hadError=!1,this._binding.onerror=function(e,t){i._binding=null,i._hadError=!0;var r=new Error(e);r.errno=t,r.code=n.codes[t],i.emit("error",r)};var a=n.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(a=e.level);var o=n.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(o=e.strategy),this._binding.init(e.windowBits||n.Z_DEFAULT_WINDOWBITS,a,e.memLevel||n.Z_DEFAULT_MEMLEVEL,o,e.dictionary),this._buffer=new r(this._chunkSize),this._offset=0,this._closed=!1,this._level=a,this._strategy=o,this.once("end",this.close)}var d=e("_stream_transform"),g=e("./binding"),m=e("util"),v=e("assert").ok;g.Z_MIN_WINDOWBITS=8,g.Z_MAX_WINDOWBITS=15,g.Z_DEFAULT_WINDOWBITS=15,g.Z_MIN_CHUNK=64,g.Z_MAX_CHUNK=1/0,g.Z_DEFAULT_CHUNK=16384,g.Z_MIN_MEMLEVEL=1,g.Z_MAX_MEMLEVEL=9,g.Z_DEFAULT_MEMLEVEL=8,g.Z_MIN_LEVEL=-1,g.Z_MAX_LEVEL=9,g.Z_DEFAULT_LEVEL=g.Z_DEFAULT_COMPRESSION,Object.keys(g).forEach(function(e){e.match(/^Z/)&&(n[e]=g[e])}),n.codes={Z_OK:g.Z_OK,Z_STREAM_END:g.Z_STREAM_END,Z_NEED_DICT:g.Z_NEED_DICT,Z_ERRNO:g.Z_ERRNO,Z_STREAM_ERROR:g.Z_STREAM_ERROR,Z_DATA_ERROR:g.Z_DATA_ERROR,Z_MEM_ERROR:g.Z_MEM_ERROR,Z_BUF_ERROR:g.Z_BUF_ERROR,Z_VERSION_ERROR:g.Z_VERSION_ERROR},Object.keys(n.codes).forEach(function(e){n.codes[n.codes[e]]=e}),n.Deflate=o,n.Inflate=s,n.Gzip=l,n.Gunzip=u,n.DeflateRaw=c,n.InflateRaw=f,n.Unzip=p,n.createDeflate=function(e){return new o(e)},n.createInflate=function(e){return new s(e)},n.createDeflateRaw=function(e){return new c(e)},n.createInflateRaw=function(e){return new f(e)},n.createGzip=function(e){return new l(e)},n.createGunzip=function(e){return new u(e)},n.createUnzip=function(e){return new p(e)},n.deflate=function(e,t,n){return"function"==typeof t&&(n=t,t={}),i(new o(t),e,n)},n.deflateSync=function(e,t){return a(new o(t),e)},n.gzip=function(e,t,n){return"function"==typeof t&&(n=t,t={}),i(new l(t),e,n)},n.gzipSync=function(e,t){return a(new l(t),e)},n.deflateRaw=function(e,t,n){return"function"==typeof t&&(n=t,t={}),i(new c(t),e,n)},n.deflateRawSync=function(e,t){return a(new c(t),e)},n.unzip=function(e,t,n){return"function"==typeof t&&(n=t,t={}),i(new p(t),e,n)},n.unzipSync=function(e,t){return a(new p(t),e)},n.inflate=function(e,t,n){return"function"==typeof t&&(n=t,t={}),i(new s(t),e,n)},n.inflateSync=function(e,t){return a(new s(t),e)},n.gunzip=function(e,t,n){return"function"==typeof t&&(n=t,t={}),i(new u(t),e,n)},n.gunzipSync=function(e,t){return a(new u(t),e)},n.inflateRaw=function(e,t,n){return"function"==typeof t&&(n=t,t={}),i(new f(t),e,n)},n.inflateRawSync=function(e,t){return a(new f(t),e)},m.inherits(h,d),h.prototype.params=function(e,r,i){if(e<n.Z_MIN_LEVEL||e>n.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(r!=n.Z_FILTERED&&r!=n.Z_HUFFMAN_ONLY&&r!=n.Z_RLE&&r!=n.Z_FIXED&&r!=n.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+r);if(this._level!==e||this._strategy!==r){var a=this;this.flush(g.Z_SYNC_FLUSH,function(){a._binding.params(e,r),a._hadError||(a._level=e,a._strategy=r,i&&i())})}else t.nextTick(i)},h.prototype.reset=function(){return this._binding.reset()},h.prototype._flush=function(e){this._transform(new r(0),"",e)},h.prototype.flush=function(e,n){var i=this._writableState;if(("function"==typeof e||void 0===e&&!n)&&(n=e,e=g.Z_FULL_FLUSH),i.ended)n&&t.nextTick(n);else if(i.ending)n&&this.once("end",n);else if(i.needDrain){var a=this;this.once("drain",function(){a.flush(n)})}else this._flushFlag=e,this.write(new r(0),"",n)},h.prototype.close=function(e){if(e&&t.nextTick(e),!this._closed){this._closed=!0,this._binding.close();var n=this;t.nextTick(function(){n.emit("close")})}},h.prototype._transform=function(e,t,n){var i,a=this._writableState,o=(a.ending||a.ended)&&(!e||a.length===e.length);if(null===!e&&!r.isBuffer(e))return n(new Error("invalid input"));o?i=g.Z_FINISH:(i=this._flushFlag,e.length>=a.length&&(this._flushFlag=this._opts.flush||g.Z_NO_FLUSH));this._processChunk(e,i,n)},h.prototype._processChunk=function(e,t,n){function i(c,h){if(!l._hadError){var d=o-h;if(v(d>=0,"have should not go down"),d>0){var g=l._buffer.slice(l._offset,l._offset+d);l._offset+=d,u?l.push(g):(f.push(g),p+=g.length)}if((0===h||l._offset>=l._chunkSize)&&(o=l._chunkSize,l._offset=0,l._buffer=new r(l._chunkSize)),0===h){if(s+=a-c,a=c,!u)return!0;var m=l._binding.write(t,e,s,a,l._buffer,l._offset,l._chunkSize);return m.callback=i,void(m.buffer=e)}if(!u)return!1;n()}}var a=e&&e.length,o=this._chunkSize-this._offset,s=0,l=this,u="function"==typeof n;if(!u){var c,f=[],p=0;this.on("error",function(e){c=e});do{var h=this._binding.writeSync(t,e,s,a,this._buffer,this._offset,o)}while(!this._hadError&&i(h[0],h[1]));if(this._hadError)throw c;var d=r.concat(f,p);return this.close(),d}var g=this._binding.write(t,e,s,a,this._buffer,this._offset,o);g.buffer=e,g.callback=i},m.inherits(o,h),m.inherits(s,h),m.inherits(l,h),m.inherits(u,h),m.inherits(c,h),m.inherits(f,h),m.inherits(p,h)}).call(this,e("_process"),e("buffer").Buffer)},{"./binding":4,_process:94,_stream_transform:105,assert:1,buffer:7,util:119}],6:[function(e,t,n){arguments[4][3][0].apply(n,arguments)},{dup:3}],7:[function(e,t,n){(function(t){"use strict";function r(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,t){if(r()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=a.prototype:(null===e&&(e=new a(t)),e.length=t),e}function a(e,t,n){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return u(this,e)}return o(this,e,t,n)}function o(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?p(e,t,n,r):"string"==typeof t?c(e,t,n):h(e,t)}function s(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function l(e,t,n,r){return s(t),t<=0?i(e,t):void 0!==n?"string"==typeof r?i(e,t).fill(n,r):i(e,t).fill(n):i(e,t)}function u(e,t){if(s(t),e=i(e,t<0?0:0|d(t)),!a.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function c(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!a.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|g(t,n),o=(e=i(e,r)).write(t,n);return o!==r&&(e=e.slice(0,o)),e}function f(e,t){var n=t.length<0?0:0|d(t.length);e=i(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),a.TYPED_ARRAY_SUPPORT?(e=t).__proto__=a.prototype:e=f(e,t),e}function h(e,t){if(a.isBuffer(t)){var n=0|d(t.length);return 0===(e=i(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||Y(t.length)?i(e,0):f(e,t);if("Buffer"===t.type&&Q(t.data))return f(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function d(e){if(e>=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function g(e,t){if(a.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(r)return H(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return R(this,t,n);case"latin1":case"binary":return M(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function w(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if("number"==typeof t)return t&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){function a(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,n/=2}var u;if(i){var c=-1;for(u=n;u<s;u++)if(a(e,u)===a(t,-1===c?0:u-c)){if(-1===c&&(c=u),u-c+1===l)return c*o}else-1!==c&&(u-=u-c),c=-1}else for(n+l>s&&(n=s-l),u=n;u>=0;u--){for(var f=!0,p=0;p<l;p++)if(a(e,u+p)!==a(t,p)){f=!1;break}if(f)return u}return-1}function y(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[n+o]=s}return o}function _(e,t,n,r){return Z(H(t,e.length-n),e,n,r)}function x(e,t,n,r){return Z(V(t),e,n,r)}function k(e,t,n,r){return x(e,t,n,r)}function E(e,t,n,r){return Z(G(t),e,n,r)}function T(e,t,n,r){return Z(W(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?X.fromByteArray(e):X.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a=e[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=n){var l,u,c,f;switch(s){case 1:a<128&&(o=a);break;case 2:128==(192&(l=e[i+1]))&&(f=(31&a)<<6|63&l)>127&&(o=f);break;case 3:l=e[i+1],u=e[i+2],128==(192&l)&&128==(192&u)&&(f=(15&a)<<12|(63&l)<<6|63&u)>2047&&(f<55296||f>57343)&&(o=f);break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],128==(192&l)&&128==(192&u)&&128==(192&c)&&(f=(15&a)<<18|(63&l)<<12|(63&u)<<6|63&c)>65535&&f<1114112&&(o=f)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return C(r)}function C(e){var t=e.length;if(t<=J)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=J));return n}function R(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function M(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function L(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=t;a<n;++a)i+=q(e[a]);return i}function j(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function I(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function B(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i<a;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function N(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i<a;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function P(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function O(e,t,n,r,i){return i||P(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),$.write(e,t,n,r,23,4),n+4}function z(e,t,n,r,i){return i||P(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),$.write(e,t,n,r,52,8),n+8}function F(e){if((e=U(e).replace(K,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function U(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function q(e){return e<16?"0"+e.toString(16):e.toString(16)}function H(e,t){t=t||1/0;for(var n,r=e.length,i=null,a=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function V(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function W(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)r=(n=e.charCodeAt(o))>>8,i=n%256,a.push(i),a.push(r);return a}function G(e){return X.toByteArray(F(e))}function Z(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Y(e){return e!==e}var X=e("base64-js"),$=e("ieee754"),Q=e("isarray");n.Buffer=a,n.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},n.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),n.kMaxLength=r(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,n){return o(null,e,t,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,n){return l(null,e,t,n)},a.allocUnsafe=function(e){return u(null,e)},a.allocUnsafeSlow=function(e){return u(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},a.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}},a.concat=function(e,t){if(!Q(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=a.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},a.byteLength=g,a.prototype._isBuffer=!0,a.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)v(this,t,t+1);return this},a.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)v(this,t,t+3),v(this,t+1,t+2);return this},a.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)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},a.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?A(this,0,e):m.apply(this,arguments)},a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},a.prototype.compare=function(e,t,n,r,i){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,s=n-t,l=Math.min(o,s),u=this.slice(r,i),c=e.slice(t,n),f=0;f<l;++f)if(u[f]!==c[f]){o=u[f],s=c[f];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},a.prototype.indexOf=function(e,t,n){return w(this,e,t,n,!0)},a.prototype.lastIndexOf=function(e,t,n){return w(this,e,t,n,!1)},a.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return k(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var J=4096;a.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r;if(a.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=a.prototype;else{var i=t-e;r=new a(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+e]}return r},a.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},a.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},a.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),$.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),$.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),$.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),$.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||D(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},a.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||D(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<n&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,n){return O(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return O(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return z(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return z(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},a.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=a.isBuffer(e)?e:H(new a(e,r).toString()),l=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%l]}return this};var K=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":2,ieee754:46,isarray:8}],8:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],9:[function(e,t,n){(function(t){"use strict";var r=e("buffer"),i=r.Buffer,a=r.SlowBuffer,o=r.kMaxLength||2147483647;n.alloc=function(e,t,n){if("function"==typeof i.alloc)return i.alloc(e,t,n);if("number"==typeof n)throw new TypeError("encoding must not be number");if("number"!=typeof e)throw new TypeError("size must be a number");if(e>o)throw new RangeError("size is too large");var r=n,a=t;void 0===a&&(r=void 0,a=0);var s=new i(e);if("string"==typeof a)for(var l=new i(a,r),u=l.length,c=-1;++c<e;)s[c]=l[c%u];else s.fill(a);return s},n.allocUnsafe=function(e){if("function"==typeof i.allocUnsafe)return i.allocUnsafe(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>o)throw new RangeError("size is too large");return new i(e)},n.from=function(e,n,r){if("function"==typeof i.from&&(!t.Uint8Array||Uint8Array.from!==i.from))return i.from(e,n,r);if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("string"==typeof e)return new i(e,n);if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer){var a=n;if(1===arguments.length)return new i(e);void 0===a&&(a=0);var o=r;if(void 0===o&&(o=e.byteLength-a),a>=e.byteLength)throw new RangeError("'offset' is out of bounds");if(o>e.byteLength-a)throw new RangeError("'length' is out of bounds");return new i(e.slice(a,a+o))}if(i.isBuffer(e)){var s=new i(e.length);return e.copy(s,0,0,e.length),s}if(e){if(Array.isArray(e)||"undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return new i(e);if("Buffer"===e.type&&Array.isArray(e.data))return new i(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},n.allocUnsafeSlow=function(e){if("function"==typeof i.allocUnsafeSlow)return i.allocUnsafeSlow(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>=o)throw new RangeError("size is too large");return new a(e)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{buffer:7}],10:[function(e,t,n){(function(n){"use strict";function r(e,t){if(!(this instanceof r))return new r(e,t);i.call(this,t),null!==e&&void 0!==e||(e=String(e)),this._obj=e}var i=e("readable-stream").Readable,a=e("util");t.exports=r,a.inherits(r,i),r.prototype._read=function(e){var t=this._obj;"string"==typeof t?this.push(new n(t)):n.isBuffer(t)?this.push(t):this.push(new n(JSON.stringify(t))),this.push(null)}}).call(this,e("buffer").Buffer)},{buffer:7,"readable-stream":17,util:119}],11:[function(e,t,n){t.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},{}],12:[function(e,t,n){(function(n){function r(e){if(!(this instanceof r))return new r(e);s.call(this,e),l.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",i)}function i(){this.allowHalfOpen||this._writableState.ended||n.nextTick(this.end.bind(this))}t.exports=r;var a=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t},o=e("core-util-is");o.inherits=e("inherits");var s=e("./_stream_readable"),l=e("./_stream_writable");o.inherits(r,s),function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}(a(l.prototype),function(e){r.prototype[e]||(r.prototype[e]=l.prototype[e])})}).call(this,e("_process"))},{"./_stream_readable":14,"./_stream_writable":16,_process:94,"core-util-is":19,inherits:47}],13:[function(e,t,n){function r(e){if(!(this instanceof r))return new r(e);i.call(this,e)}t.exports=r;var i=e("./_stream_transform"),a=e("core-util-is");a.inherits=e("inherits"),a.inherits(r,i),r.prototype._transform=function(e,t,n){n(null,e)}},{"./_stream_transform":15,"core-util-is":19,inherits:47}],14:[function(e,t,n){(function(n){function r(t,n){var r=(t=t||{}).highWaterMark;this.highWaterMark=r||0===r?r:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!t.objectMode,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(C||(C=e("string_decoder/").StringDecoder),this.decoder=new C(t.encoding),this.encoding=t.encoding)}function i(e){if(!(this instanceof i))return new i(e);this._readableState=new r(e,this),this.readable=!0,S.call(this)}function a(e,t,n,r,i){var a=u(t,n);if(a)e.emit("error",a);else if(null===n||void 0===n)t.reading=!1,t.ended||c(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else!t.decoder||i||r||(n=t.decoder.write(n)),t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):(t.reading=!1,t.buffer.push(n)),t.needReadable&&f(e),h(e,t);else i||(t.reading=!1);return o(t)}function o(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function s(e){if(e>=R)e=R;else{e--;for(var t=1;t<32;t<<=1)e|=e>>t;e++}return e}function l(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:null===e||isNaN(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:e<=0?0:(e>t.highWaterMark&&(t.highWaterMark=s(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function u(e,t){var n=null;return E.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function c(e,t){if(t.decoder&&!t.ended){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.length>0?f(e):y(e)}function f(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,t.sync?n.nextTick(function(){p(e)}):p(e))}function p(e){e.emit("readable")}function h(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(function(){d(e,t)}))}function d(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function g(e){return function(){var t=e._readableState;t.awaitDrain--,0===t.awaitDrain&&m(e)}}function m(e){function t(e,t,i){!1===e.write(n)&&r.awaitDrain++}var n,r=e._readableState;for(r.awaitDrain=0;r.pipesCount&&null!==(n=e.read());)if(1===r.pipesCount?t(r.pipes):_(r.pipes,t),e.emit("data",n),r.awaitDrain>0)return;if(0===r.pipesCount)return r.flowing=!1,void(T.listenerCount(e,"data")>0&&w(e));r.ranOut=!0}function v(){this._readableState.ranOut&&(this._readableState.ranOut=!1,m(this))}function w(e,t){if(e._readableState.flowing)throw new Error("Cannot switch to old mode now.");var r=t||!1,i=!1;e.readable=!0,e.pipe=S.prototype.pipe,e.on=e.addListener=S.prototype.on,e.on("readable",function(){i=!0;for(var t;!r&&null!==(t=e.read());)e.emit("data",t);null===t&&(i=!1,e._readableState.needReadable=!0)}),e.pause=function(){r=!0,this.emit("pause")},e.resume=function(){r=!1,i?n.nextTick(function(){e.emit("readable")}):this.read(0),this.emit("resume")},e.emit("readable")}function b(e,t){var n,r=t.buffer,i=t.length,a=!!t.decoder,o=!!t.objectMode;if(0===r.length)return null;if(0===i)n=null;else if(o)n=r.shift();else if(!e||e>=i)n=a?r.join(""):E.concat(r,i),r.length=0;else if(e<r[0].length)n=(c=r[0]).slice(0,e),r[0]=c.slice(e);else if(e===r[0].length)n=r.shift();else{n=a?"":new E(e);for(var s=0,l=0,u=r.length;l<u&&s<e;l++){var c=r[0],f=Math.min(e-s,c.length);a?n+=c.slice(0,f):c.copy(n,s,0,f),f<c.length?r[0]=c.slice(f):r.shift(),s+=f}}return n}function y(e){var t=e._readableState;if(t.length>0)throw new Error("endReadable called on non-empty stream");!t.endEmitted&&t.calledRead&&(t.ended=!0,n.nextTick(function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}))}function _(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function x(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}t.exports=i;var k=e("isarray"),E=e("buffer").Buffer;i.ReadableState=r;var T=e("events").EventEmitter;T.listenerCount||(T.listenerCount=function(e,t){return e.listeners(t).length});var S=e("stream"),A=e("core-util-is");A.inherits=e("inherits");var C;A.inherits(i,S),i.prototype.push=function(e,t){var n=this._readableState;return"string"!=typeof e||n.objectMode||(t=t||n.defaultEncoding)!==n.encoding&&(e=new E(e,t),t=""),a(this,n,e,t,!1)},i.prototype.unshift=function(e){return a(this,this._readableState,e,"",!0)},i.prototype.setEncoding=function(t){C||(C=e("string_decoder/").StringDecoder),this._readableState.decoder=new C(t),this._readableState.encoding=t};var R=8388608;i.prototype.read=function(e){var t=this._readableState;t.calledRead=!0;var n,r=e;if(("number"!=typeof e||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return f(this),null;if(0===(e=l(e,t))&&t.ended)return n=null,t.length>0&&t.decoder&&(n=b(e,t),t.length-=n.length),0===t.length&&y(this),n;var i=t.needReadable;return t.length-e<=t.highWaterMark&&(i=!0),(t.ended||t.reading)&&(i=!1),i&&(t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),i&&!t.reading&&(e=l(r,t)),null===(n=e>0?b(e,t):null)&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),t.ended&&!t.endEmitted&&0===t.length&&y(this),n},i.prototype._read=function(e){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(e,t){function r(e){e===c&&a()}function i(){e.end()}function a(){e.removeListener("close",s),e.removeListener("finish",l),e.removeListener("drain",h),e.removeListener("error",o),e.removeListener("unpipe",r),c.removeListener("end",i),c.removeListener("end",a),e._writableState&&!e._writableState.needDrain||h()}function o(t){u(),e.removeListener("error",o),0===T.listenerCount(e,"error")&&e.emit("error",t)}function s(){e.removeListener("finish",l),u()}function l(){e.removeListener("close",s),u()}function u(){c.unpipe(e)}var c=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=e;break;case 1:f.pipes=[f.pipes,e];break;default:f.pipes.push(e)}f.pipesCount+=1;var p=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?i:a;f.endEmitted?n.nextTick(p):c.once("end",p),e.on("unpipe",r);var h=g(c);return e.on("drain",h),e._events&&e._events.error?k(e._events.error)?e._events.error.unshift(o):e._events.error=[o,e._events.error]:e.on("error",o),e.once("close",s),e.once("finish",l),e.emit("pipe",c),f.flowing||(this.on("readable",v),f.flowing=!0,n.nextTick(function(){m(c)})),e},i.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,this.removeListener("readable",v),t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,this.removeListener("readable",v),t.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}return-1===(i=x(t.pipes,e))?this:(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},i.prototype.on=function(e,t){var n=S.prototype.on.call(this,e,t);if("data"!==e||this._readableState.flowing||w(this),"readable"===e&&this.readable){var r=this._readableState;r.readableListening||(r.readableListening=!0,r.emittedReadable=!1,r.needReadable=!0,r.reading?r.length&&f(this):this.read(0))}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){w(this),this.read(0),this.emit("resume")},i.prototype.pause=function(){w(this,!0),this.emit("pause")},i.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;e.on("end",function(){if(t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)}),e.on("data",function(i){t.decoder&&(i=t.decoder.write(i)),(!t.objectMode||null!==i&&void 0!==i)&&(t.objectMode||i&&i.length)&&(r.push(i)||(n=!0,e.pause()))});for(var i in e)"function"==typeof e[i]&&void 0===this[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));return _(["error","close","destroy","pause","resume"],function(t){e.on(t,r.emit.bind(r,t))}),r._read=function(t){n&&(n=!1,e.resume())},r},i._fromList=b}).call(this,e("_process"))},{_process:94,buffer:7,"core-util-is":19,events:24,inherits:47,isarray:11,stream:111,"string_decoder/":18}],15:[function(e,t,n){function r(e,t){this.afterTransform=function(e,n){return i(t,e,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function i(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!==n&&void 0!==n&&e.push(n),i&&i(t);var a=e._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&e._read(a.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);s.call(this,e);this._transformState=new r(e,this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("finish",function(){"function"==typeof this._flush?this._flush(function(e){o(t,e)}):o(t)})}function o(e,t){if(t)return e.emit("error",t);var n=e._writableState,r=(e._readableState,e._transformState);if(n.length)throw new Error("calling transform done when ws.length != 0");if(r.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}t.exports=a;var s=e("./_stream_duplex"),l=e("core-util-is");l.inherits=e("inherits"),l.inherits(a,s),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,n){throw new Error("not implemented")},a.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0}},{"./_stream_duplex":12,"core-util-is":19,inherits:47}],16:[function(e,t,n){(function(n){function r(e,t,n){this.chunk=e,this.encoding=t,this.callback=n}function i(e,t){var n=(e=e||{}).highWaterMark;this.highWaterMark=n||0===n?n:16384,this.objectMode=!!e.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var r=!1===e.decodeStrings;this.decodeStrings=!r,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){h(t,e)},this.writecb=null,this.writelen=0,this.buffer=[],this.errorEmitted=!1}function a(t){var n=e("./_stream_duplex");if(!(this instanceof a||this instanceof n))return new a(t);this._writableState=new i(t,this),this.writable=!0,x.call(this)}function o(e,t,r){var i=new Error("write after end");e.emit("error",i),n.nextTick(function(){r(i)})}function s(e,t,r,i){var a=!0;if(!y.isBuffer(r)&&"string"!=typeof r&&null!==r&&void 0!==r&&!t.objectMode){var o=new TypeError("Invalid non-string/buffer chunk");e.emit("error",o),n.nextTick(function(){i(o)}),a=!1}return a}function l(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=new y(t,n)),t}function u(e,t,n,i,a){n=l(t,n,i),y.isBuffer(n)&&(i="buffer");var o=t.objectMode?1:n.length;t.length+=o;var s=t.length<t.highWaterMark;return s||(t.needDrain=!0),t.writing?t.buffer.push(new r(n,i,a)):c(e,t,o,n,i,a),s}function c(e,t,n,r,i,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,e._write(r,i,t.onwrite),t.sync=!1}function f(e,t,r,i,a){r?n.nextTick(function(){a(i)}):a(i),e._writableState.errorEmitted=!0,e.emit("error",i)}function p(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function h(e,t){var r=e._writableState,i=r.sync,a=r.writecb;if(p(r),t)f(e,r,i,t,a);else{var o=v(e,r);o||r.bufferProcessing||!r.buffer.length||m(e,r),i?n.nextTick(function(){d(e,r,o,a)}):d(e,r,o,a)}}function d(e,t,n,r){n||g(e,t),r(),n&&w(e,t)}function g(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function m(e,t){t.bufferProcessing=!0;for(var n=0;n<t.buffer.length;n++){var r=t.buffer[n],i=r.chunk,a=r.encoding,o=r.callback;if(c(e,t,t.objectMode?1:i.length,i,a,o),t.writing){n++;break}}t.bufferProcessing=!1,n<t.buffer.length?t.buffer=t.buffer.slice(n):t.buffer.length=0}function v(e,t){return t.ending&&0===t.length&&!t.finished&&!t.writing}function w(e,t){var n=v(e,t);return n&&(t.finished=!0,e.emit("finish")),n}function b(e,t,r){t.ending=!0,w(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r)),t.ended=!0}t.exports=a;var y=e("buffer").Buffer;a.WritableState=i;var _=e("core-util-is");_.inherits=e("inherits");var x=e("stream");_.inherits(a,x),a.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},a.prototype.write=function(e,t,n){var r=this._writableState,i=!1;return"function"==typeof t&&(n=t,t=null),y.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=function(){}),r.ended?o(this,0,n):s(this,r,e,n)&&(i=u(this,r,e,t,n)),i},a.prototype._write=function(e,t,n){n(new Error("not implemented"))},a.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),void 0!==e&&null!==e&&this.write(e,t),r.ending||r.finished||b(this,r,n)}}).call(this,e("_process"))},{"./_stream_duplex":12,_process:94,buffer:7,"core-util-is":19,inherits:47,stream:111}],17:[function(e,t,n){(function(r){var i=e("stream");(n=t.exports=e("./lib/_stream_readable.js")).Stream=i,n.Readable=n,n.Writable=e("./lib/_stream_writable.js"),n.Duplex=e("./lib/_stream_duplex.js"),n.Transform=e("./lib/_stream_transform.js"),n.PassThrough=e("./lib/_stream_passthrough.js"),r.browser||"disable"!==r.env.READABLE_STREAM||(t.exports=e("stream"))}).call(this,e("_process"))},{"./lib/_stream_duplex.js":12,"./lib/_stream_passthrough.js":13,"./lib/_stream_readable.js":14,"./lib/_stream_transform.js":15,"./lib/_stream_writable.js":16,_process:94,stream:111}],18:[function(e,t,n){function r(e){if(e&&!l(e))throw new Error("Unknown encoding: "+e)}function i(e){return e.toString(this.encoding)}function a(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function o(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var s=e("buffer").Buffer,l=s.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},u=n.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),r(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=a;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=o;break;default:return void(this.write=i)}this.charBuffer=new s(6),this.charReceived=0,this.charLength=0};u.prototype.write=function(e){for(var t="";this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";if(e=e.slice(n,e.length),!((i=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);r=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,r),r-=this.charReceived);var r=(t+=e.toString(this.encoding,0,r)).length-1,i=t.charCodeAt(r);if(i>=55296&&i<=56319){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),e.copy(this.charBuffer,0,0,a),t.substring(0,r)}return t},u.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},u.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t}},{buffer:7}],19:[function(e,t,n){(function(e){function t(e){return Object.prototype.toString.call(e)}n.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},n.isBoolean=function(e){return"boolean"==typeof e},n.isNull=function(e){return null===e},n.isNullOrUndefined=function(e){return null==e},n.isNumber=function(e){return"number"==typeof e},n.isString=function(e){return"string"==typeof e},n.isSymbol=function(e){return"symbol"==typeof e},n.isUndefined=function(e){return void 0===e},n.isRegExp=function(e){return"[object RegExp]"===t(e)},n.isObject=function(e){return"object"==typeof e&&null!==e},n.isDate=function(e){return"[object Date]"===t(e)},n.isError=function(e){return"[object Error]"===t(e)||e instanceof Error},n.isFunction=function(e){return"function"==typeof e},n.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},n.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":49}],20:[function(e,t,n){"use strict";function r(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1}var i=e("./lib/thunk.js");t.exports=function(e){var t=new r;t.pre=e.pre,t.body=e.body,t.post=e.post;var n=e.args.slice(0);t.argTypes=n;for(var a=0;a<n.length;++a){var o=n[a];if("array"===o||"object"==typeof o&&o.blockIndices){if(t.argTypes[a]="array",t.arrayArgs.push(a),t.arrayBlockIndices.push(o.blockIndices?o.blockIndices:0),t.shimArgs.push("array"+a),a<t.pre.args.length&&t.pre.args[a].count>0)throw new Error("cwise: pre() block may not reference array args");if(a<t.post.args.length&&t.post.args[a].count>0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===o)t.scalarArgs.push(a),t.shimArgs.push("scalar"+a);else if("index"===o){if(t.indexArgs.push(a),a<t.pre.args.length&&t.pre.args[a].count>0)throw new Error("cwise: pre() block may not reference array index");if(a<t.body.args.length&&t.body.args[a].lvalue)throw new Error("cwise: body() block may not write to array index");if(a<t.post.args.length&&t.post.args[a].count>0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===o){if(t.shapeArgs.push(a),a<t.pre.args.length&&t.pre.args[a].lvalue)throw new Error("cwise: pre() block may not write to array shape");if(a<t.body.args.length&&t.body.args[a].lvalue)throw new Error("cwise: body() block may not write to array shape");if(a<t.post.args.length&&t.post.args[a].lvalue)throw new Error("cwise: post() block may not write to array shape")}else{if("object"!=typeof o||!o.offset)throw new Error("cwise: Unknown argument type "+n[a]);t.argTypes[a]="offset",t.offsetArgs.push({array:o.array,offset:o.offset}),t.offsetArgIndex.push(a)}}if(t.arrayArgs.length<=0)throw new Error("cwise: No array arguments specified");if(t.pre.args.length>n.length)throw new Error("cwise: Too many arguments in pre() block");if(t.body.args.length>n.length)throw new Error("cwise: Too many arguments in body() block");if(t.post.args.length>n.length)throw new Error("cwise: Too many arguments in post() block");return t.debug=!!e.printCode||!!e.debug,t.funcName=e.funcName||"cwise",t.blockSize=e.blockSize||64,i(t)}},{"./lib/thunk.js":22}],21:[function(e,t,n){"use strict";function r(e,t,n){var r,i,a=e.length,o=t.arrayArgs.length,s=t.indexArgs.length>0,l=[],u=[],c=0,f=0;for(r=0;r<a;++r)u.push(["i",r,"=0"].join(""));for(i=0;i<o;++i)for(r=0;r<a;++r)f=c,c=e[r],0===r?u.push(["d",i,"s",r,"=t",i,"p",c].join("")):u.push(["d",i,"s",r,"=(t",i,"p",c,"-s",f,"*t",i,"p",f,")"].join(""));for(l.push("var "+u.join(",")),r=a-1;r>=0;--r)c=e[r],l.push(["for(i",r,"=0;i",r,"<s",c,";++i",r,"){"].join(""));for(l.push(n),r=0;r<a;++r){for(f=c,c=e[r],i=0;i<o;++i)l.push(["p",i,"+=d",i,"s",r].join(""));s&&(r>0&&l.push(["index[",f,"]-=s",f].join("")),l.push(["++index[",c,"]"].join(""))),l.push("}")}return l.join("\n")}function i(e,t,n,i){for(var a=t.length,o=n.arrayArgs.length,s=n.blockSize,l=n.indexArgs.length>0,u=[],c=0;c<o;++c)u.push(["var offset",c,"=p",c].join(""));for(c=e;c<a;++c)u.push(["for(var j"+c+"=SS[",t[c],"]|0;j",c,">0;){"].join("")),u.push(["if(j",c,"<",s,"){"].join("")),u.push(["s",t[c],"=j",c].join("")),u.push(["j",c,"=0"].join("")),u.push(["}else{s",t[c],"=",s].join("")),u.push(["j",c,"-=",s,"}"].join("")),l&&u.push(["index[",t[c],"]=j",c].join(""));for(c=0;c<o;++c){for(var f=["offset"+c],p=e;p<a;++p)f.push(["j",p,"*t",c,"p",t[p]].join(""));u.push(["p",c,"=(",f.join("+"),")"].join(""))}u.push(r(t,n,i));for(c=e;c<a;++c)u.push("}");return u.join("\n")}function a(e){for(var t=0,n=e[0].length;t<n;){for(var r=1;r<e.length;++r)if(e[r][t]!==e[0][t])return t;++t}return t}function o(e,t,n){for(var r=e.body,i=[],a=[],o=0;o<e.args.length;++o){var s=e.args[o];if(!(s.count<=0)){var l=new RegExp(s.name,"g"),u="",c=t.arrayArgs.indexOf(o);switch(t.argTypes[o]){case"offset":var f=t.offsetArgIndex.indexOf(o);c=t.offsetArgs[f].array,u="+q"+f;case"array":u="p"+c+u;var p="l"+o,h="a"+c;if(0===t.arrayBlockIndices[c])1===s.count?"generic"===n[c]?s.lvalue?(i.push(["var ",p,"=",h,".get(",u,")"].join("")),r=r.replace(l,p),a.push([h,".set(",u,",",p,")"].join(""))):r=r.replace(l,[h,".get(",u,")"].join("")):r=r.replace(l,[h,"[",u,"]"].join("")):"generic"===n[c]?(i.push(["var ",p,"=",h,".get(",u,")"].join("")),r=r.replace(l,p),s.lvalue&&a.push([h,".set(",u,",",p,")"].join(""))):(i.push(["var ",p,"=",h,"[",u,"]"].join("")),r=r.replace(l,p),s.lvalue&&a.push([h,"[",u,"]=",p].join("")));else{for(var d=[s.name],g=[u],m=0;m<Math.abs(t.arrayBlockIndices[c]);m++)d.push("\\s*\\[([^\\]]+)\\]"),g.push("$"+(m+1)+"*t"+c+"b"+m);if(l=new RegExp(d.join(""),"g"),u=g.join("+"),"generic"===n[c])throw new Error("cwise: Generic arrays not supported in combination with blocks!");r=r.replace(l,[h,"[",u,"]"].join(""))}break;case"scalar":r=r.replace(l,"Y"+t.scalarArgs.indexOf(o));break;case"index":r=r.replace(l,"index");break;case"shape":r=r.replace(l,"shape")}}}return[i.join("\n"),r,a.join("\n")].join("\n").trim()}function s(e){for(var t=new Array(e.length),n=!0,r=0;r<e.length;++r){var i=e[r],a=i.match(/\d+/);a=a?a[0]:"",0===i.charAt(0)?t[r]="u"+i.charAt(1)+a:t[r]=i.charAt(0)+a,r>0&&(n=n&&t[r]===t[r-1])}return n?t[0]:t.join("")}var l=e("uniq");t.exports=function(e,t){for(var n=t[1].length-Math.abs(e.arrayBlockIndices[0])|0,u=new Array(e.arrayArgs.length),c=new Array(e.arrayArgs.length),f=0;f<e.arrayArgs.length;++f)c[f]=t[2*f],u[f]=t[2*f+1];for(var p=[],h=[],d=[],g=[],m=[],f=0;f<e.arrayArgs.length;++f){e.arrayBlockIndices[f]<0?(d.push(0),g.push(n),p.push(n),h.push(n+e.arrayBlockIndices[f])):(d.push(e.arrayBlockIndices[f]),g.push(e.arrayBlockIndices[f]+n),p.push(0),h.push(e.arrayBlockIndices[f]));for(var v=[],w=0;w<u[f].length;w++)d[f]<=u[f][w]&&u[f][w]<g[f]&&v.push(u[f][w]-d[f]);m.push(v)}for(var b=["SS"],y=["'use strict'"],_=[],w=0;w<n;++w)_.push(["s",w,"=SS[",w,"]"].join(""));for(f=0;f<e.arrayArgs.length;++f){for(b.push("a"+f),b.push("t"+f),b.push("p"+f),w=0;w<n;++w)_.push(["t",f,"p",w,"=t",f,"[",d[f]+w,"]"].join(""));for(w=0;w<Math.abs(e.arrayBlockIndices[f]);++w)_.push(["t",f,"b",w,"=t",f,"[",p[f]+w,"]"].join(""))}for(f=0;f<e.scalarArgs.length;++f)b.push("Y"+f);if(e.shapeArgs.length>0&&_.push("shape=SS.slice(0)"),e.indexArgs.length>0){for(var x=new Array(n),f=0;f<n;++f)x[f]="0";_.push(["index=[",x.join(","),"]"].join(""))}for(f=0;f<e.offsetArgs.length;++f){for(var k=e.offsetArgs[f],E=[],w=0;w<k.offset.length;++w)0!==k.offset[w]&&(1===k.offset[w]?E.push(["t",k.array,"p",w].join("")):E.push([k.offset[w],"*t",k.array,"p",w].join("")));0===E.length?_.push("q"+f+"=0"):_.push(["q",f,"=",E.join("+")].join(""))}var T=l([].concat(e.pre.thisVars).concat(e.body.thisVars).concat(e.post.thisVars));_=_.concat(T),y.push("var "+_.join(","));for(f=0;f<e.arrayArgs.length;++f)y.push("p"+f+"|=0");e.pre.body.length>3&&y.push(o(e.pre,e,c));var S=o(e.body,e,c),A=a(m);A<n?y.push(i(A,m[0],e,S)):y.push(r(m[0],e,S)),e.post.body.length>3&&y.push(o(e.post,e,c)),e.debug&&console.log("-----Generated cwise routine for ",t,":\n"+y.join("\n")+"\n----------");var C=[e.funcName||"unnamed","_cwise_loop_",u[0].join("s"),"m",A,s(c)].join("");return new Function(["function ",C,"(",b.join(","),"){",y.join("\n"),"} return ",C].join(""))()}},{uniq:114}],22:[function(e,t,n){"use strict";var r=e("./compile.js");t.exports=function(e){var t=["'use strict'","var CACHED={}"],n=[],i=e.funcName+"_cwise_thunk";t.push(["return function ",i,"(",e.shimArgs.join(","),"){"].join(""));for(var a=[],o=[],s=[["array",e.arrayArgs[0],".shape.slice(",Math.max(0,e.arrayBlockIndices[0]),e.arrayBlockIndices[0]<0?","+e.arrayBlockIndices[0]+")":")"].join("")],l=[],u=[],c=0;c<e.arrayArgs.length;++c){var f=e.arrayArgs[c];n.push(["t",f,"=array",f,".dtype,","r",f,"=array",f,".order"].join("")),a.push("t"+f),a.push("r"+f),o.push("t"+f),o.push("r"+f+".join()"),s.push("array"+f+".data"),s.push("array"+f+".stride"),s.push("array"+f+".offset|0"),c>0&&(l.push("array"+e.arrayArgs[0]+".shape.length===array"+f+".shape.length+"+(Math.abs(e.arrayBlockIndices[0])-Math.abs(e.arrayBlockIndices[c]))),u.push("array"+e.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,e.arrayBlockIndices[0])+"]===array"+f+".shape[shapeIndex+"+Math.max(0,e.arrayBlockIndices[c])+"]"))}e.arrayArgs.length>1&&(t.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),t.push("for(var shapeIndex=array"+e.arrayArgs[0]+".shape.length-"+Math.abs(e.arrayBlockIndices[0])+"; shapeIndex--\x3e0;) {"),t.push("if (!("+u.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),t.push("}"));for(c=0;c<e.scalarArgs.length;++c)s.push("scalar"+e.scalarArgs[c]);return n.push(["type=[",o.join(","),"].join()"].join("")),n.push("proc=CACHED[type]"),t.push("var "+n.join(",")),t.push(["if(!proc){","CACHED[type]=proc=compile([",a.join(","),"])}","return proc(",s.join(","),")}"].join("")),e.debug&&console.log("-----Generated thunk:\n"+t.join("\n")+"\n----------"),new Function("compile",t.join("\n"))(r.bind(void 0,e))}},{"./compile.js":21}],23:[function(e,t,n){(function(e){"use strict";t.exports=function(t){if(!/^data\:/i.test(t))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');var n=(t=t.replace(/\r?\n/g,"")).indexOf(",");if(-1===n||n<=4)throw new TypeError("malformed data: URI");for(var r=t.substring(5,n).split(";"),i=r[0]||"text/plain",a=i,o=!1,s="",l=1;l<r.length;l++)"base64"==r[l]?o=!0:(a+=";"+r[l],0==r[l].indexOf("charset=")&&(s=r[l].substring(8)));r[0]||s.length||(a+=";charset=US-ASCII",s="US-ASCII");var u=unescape(t.substring(n+1)),c=new e(u,o?"base64":"ascii");return c.type=i,c.typeFull=a,c.charset=s,c}}).call(this,e("buffer").Buffer)},{buffer:7}],24:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function a(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!a(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,a,l,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(n=this._events[e],s(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(o(n))for(a=Array.prototype.slice.call(arguments,1),r=(u=n.slice()).length,l=0;l<r;l++)u[l].apply(this,a);return!0},r.prototype.addListener=function(e,t){var n;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(n=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},r.prototype.removeListener=function(e,t){var n,r,a,s;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],a=n.length,r=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(s=a;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){r=s;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],i(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},{}],25:[function(e,t,n){var r=function(t){function n(e,t){if(h.hasOwnProperty(e))return h[e];var n=new XMLHttpRequest;if(t)n.addEventListener("readystatechange",function(){4===n.readyState&&(200===n.status?t(null,n.responseText):t(new Error("fail to load!")))}),n.open("GET",e,!0),n.send(null);else if(n.open("GET",e,!1),n.send(null),200==n.status)return n.responseText}function r(e,t,n,r){return r=r||e.createTexture(),e.bindTexture(e.TEXTURE_2D,r),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),n&&n(null,r),r}function i(e,n,i){var a=e.createTexture(),s=new Image;return s.addEventListener("load",function(){r(e,s,i,a),t.width=s.width,t.height=s.height,o(t.width,t.height)}),s.src=n,a}function a(e,n){function r(o){a||(a=o);var s=o-a;a=o,t.runner(s),n&&n(),!0===e&&i(r)}var i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame;if(!0===e){if(!i)throw new Error("do not support 'requestAnimationFram'");i(r)}else i(r);var a=null}function o(e,t){p.viewport(0,0,e,t),p.canvas.width=e,p.canvas.height=t}function s(e,n){S=i(p,e,function(){a(t.animate,n)})}(t=t||{}).width=t.width||800,t.height=t.height||600;var l=t.model||{vertex:[-1,-1,0,1,-1,0,1,1,0,-1,1,0],indices:[0,1,2,0,2,3,2,1,0,3,2,0],textureCoords:[0,0,1,0,1,1,0,1]},u=t.lens||{a:1,b:1,Fx:0,Fy:0,scale:1.5},c=t.fov||{x:1,y:1},f=t.image||"images/barrel-distortion.png",p=function(e){var t=document.querySelector(e);if(null==t)throw new Error("there is no canvas on this page");for(var n=["webgl","experimental-webgl","webkit-3d","moz-webgl"],r=0;r<n.length;++r){var i;try{i=t.getContext(n[r],{preserveDrawingBuffer:!0})}catch(e){continue}if(i)return i}throw new Error("WebGL is not supported!")}(t.selector||"#canvas"),h=e("./shaders"),d=n(t.vertexSrc||"vertex"),g=n(t.fragmentSrc||"fragment3"),m=function(e,t,n){function r(t){if(!e.getShaderParameter(t,e.COMPILE_STATUS))throw new Error(e.getShaderInfoLog(t))}var i=e.createShader(e.VERTEX_SHADER);e.shaderSource(i,t),e.compileShader(i),r(i);var a=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(a,n),e.compileShader(a),r(a);var o=e.createProgram();return e.attachShader(o,i),e.attachShader(o,a),e.linkProgram(o),o}(p,d,g);p.useProgram(m);var v,w,b,y=p.getAttribLocation(m,"aVertexPosition"),_=p.getAttribLocation(m,"aTextureCoord"),x=p.getUniformLocation(m,"uSampler"),k=p.getUniformLocation(m,"uLensS"),E=p.getUniformLocation(m,"uLensF"),T=p.getUniformLocation(m,"uFov");v=p.createBuffer(),p.bindBuffer(p.ARRAY_BUFFER,v),p.bufferData(p.ARRAY_BUFFER,new Float32Array(l.vertex),p.STATIC_DRAW),p.bindBuffer(p.ARRAY_BUFFER,null),w=p.createBuffer(),p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,w),p.bufferData(p.ELEMENT_ARRAY_BUFFER,new Uint16Array(l.indices),p.STATIC_DRAW),p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,null),b=p.createBuffer(),p.bindBuffer(p.ARRAY_BUFFER,b),p.bufferData(p.ARRAY_BUFFER,new Float32Array(l.textureCoords),p.STATIC_DRAW),p.bindBuffer(p.ARRAY_BUFFER,null),t.runner=t.runner||function(e){p.clearColor(0,0,0,1),p.enable(p.DEPTH_TEST),p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT),p.enableVertexAttribArray(y),p.bindBuffer(p.ARRAY_BUFFER,v),p.vertexAttribPointer(y,3,p.FLOAT,!1,0,0),p.enableVertexAttribArray(_),p.bindBuffer(p.ARRAY_BUFFER,b),p.vertexAttribPointer(_,2,p.FLOAT,!1,0,0),p.activeTexture(p.TEXTURE0),p.bindTexture(p.TEXTURE_2D,S),p.uniform1i(x,0),p.uniform3fv(k,[u.a,u.b,u.scale]),p.uniform2fv(E,[u.Fx,u.Fy]),p.uniform2fv(T,[c.x,c.y]),p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,w),p.drawElements(p.TRIANGLES,l.indices.length,p.UNSIGNED_SHORT,0)};var S;return s(f),{options:t,gl:p,lens:u,fov:c,run:a,getImage:function(e){var t=new Image;return t.src=p.canvas.toDataURL(e||"image/jpeg"),t},setImage:s}};"undefined"!=typeof document?window.FisheyeGl=r:t.exports=r},{"./shaders":26}],26:[function(e,t,n){t.exports={fragment:e("./shaders/fragment.glfs"),fragment2:e("./shaders/fragment2.glfs"),fragment3:e("./shaders/fragment3.glfs"),method1:e("./shaders/method1.glfs"),method2:e("./shaders/method2.glfs"),vertex:e("./shaders/vertex.glvs")}},{"./shaders/fragment.glfs":27,"./shaders/fragment2.glfs":28,"./shaders/fragment3.glfs":29,"./shaders/method1.glfs":30,"./shaders/method2.glfs":31,"./shaders/vertex.glvs":32}],27:[function(e,t,n){t.exports="#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec4 uLens;\nuniform vec2 uFov;\nuniform sampler2D uSampler;\nvarying vec3 vPosition;\nvarying vec2 vTextureCoord;\nvec2 GLCoord2TextureCoord(vec2 glCoord) {\n\treturn glCoord * vec2(1.0, -1.0)/ 2.0 + vec2(0.5, 0.5);\n}\nvoid main(void){\n\tfloat scale = uLens.w;\n\tfloat F = uLens.z;\n\t\n\tfloat L = length(vec3(vPosition.xy/scale, F));\n\tvec2 vMapping = vPosition.xy * F / L;\n\tvMapping = vMapping * uLens.xy;\n\tvMapping = GLCoord2TextureCoord(vMapping/scale);\n\tvec4 texture = texture2D(uSampler, vMapping);\n\tif(vMapping.x > 0.99 || vMapping.x < 0.01 || vMapping.y > 0.99 || vMapping.y < 0.01){\n\t\ttexture = vec4(0.0, 0.0, 0.0, 1.0);\n\t} \n\tgl_FragColor = texture;\n}\n"},{}],28:[function(e,t,n){t.exports="#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec4 uLens;\nuniform vec2 uFov;\nuniform sampler2D uSampler;\nvarying vec3 vPosition;\nvarying vec2 vTextureCoord;\nvec2 TextureCoord2GLCoord(vec2 textureCoord) {\n\treturn (textureCoord - vec2(0.5, 0.5)) * 2.0;\n}\nvec2 GLCoord2TextureCoord(vec2 glCoord) {\n\treturn glCoord / 2.0 + vec2(0.5, 0.5);\n}\nvoid main(void){\n\tfloat correctionRadius = 0.5;\n\tfloat distance = sqrt(vPosition.x * vPosition.x + vPosition.y * vPosition.y) / correctionRadius;\n\tfloat theta = 1.0;\n\tif(distance != 0.0){\n\t\ttheta = atan(distance);\n\t}\n\tvec2 vMapping = theta * vPosition.xy;\n\tvMapping = GLCoord2TextureCoord(vMapping);\n\t\t\n\tvec4 texture = texture2D(uSampler, vMapping);\n\tif(vMapping.x > 0.99 || vMapping.x < 0.01 || vMapping.y > 0.99 || vMapping.y < 0.01){\n\t\ttexture = vec4(0.0, 0.0, 0.0, 1.0);\n\t} \n\tgl_FragColor = texture;\n}\n"},{}],29:[function(e,t,n){t.exports="#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec3 uLensS;\nuniform vec2 uLensF;\nuniform vec2 uFov;\nuniform sampler2D uSampler;\nvarying vec3 vPosition;\nvarying vec2 vTextureCoord;\nvec2 GLCoord2TextureCoord(vec2 glCoord) {\n\treturn glCoord * vec2(1.0, -1.0)/ 2.0 + vec2(0.5, 0.5);\n}\nvoid main(void){\n\tfloat scale = uLensS.z;\n\tvec3 vPos = vPosition;\n\tfloat Fx = uLensF.x;\n\tfloat Fy = uLensF.y;\n\tvec2 vMapping = vPos.xy;\n\tvMapping.x = vMapping.x + ((pow(vPos.y, 2.0)/scale)*vPos.x/scale)*-Fx;\n\tvMapping.y = vMapping.y + ((pow(vPos.x, 2.0)/scale)*vPos.y/scale)*-Fy;\n\tvMapping = vMapping * uLensS.xy;\n\tvMapping = GLCoord2TextureCoord(vMapping/scale);\n\tvec4 texture = texture2D(uSampler, vMapping);\n\tif(vMapping.x > 0.99 || vMapping.x < 0.01 || vMapping.y > 0.99 || vMapping.y < 0.01){\n\t\ttexture = vec4(0.0, 0.0, 0.0, 1.0);\n\t}\n\tgl_FragColor = texture;\n}\n"},{}],30:[function(e,t,n){t.exports="#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec4 uLens;\nuniform vec2 uFov;\nuniform sampler2D uSampler;\nvarying vec3 vPosition;\nvarying vec2 vTextureCoord;\nvec2 TextureCoord2GLCoord(vec2 textureCoord) {\n\treturn (textureCoord - vec2(0.5, 0.5)) * 2.0;\n}\nvec2 GLCoord2TextureCoord(vec2 glCoord) {\n\treturn glCoord / 2.0 + vec2(0.5, 0.5);\n}\nvoid main(void){\n\tvec2 vMapping = vec2(vTextureCoord.x, 1.0 - vTextureCoord.y);\n\tvMapping = TextureCoord2GLCoord(vMapping);\n\t//TODO insert Code\n\tfloat F = uLens.x/ uLens.w;\n\tfloat seta = length(vMapping) / F;\n\tvMapping = sin(seta) * F / length(vMapping) * vMapping;\n\tvMapping *= uLens.w * 1.414;\n\tvMapping = GLCoord2TextureCoord(vMapping);\n\tvec4 texture = texture2D(uSampler, vMapping);\n\tif(vMapping.x > 0.99 || vMapping.x < 0.01 || vMapping.y > 0.99 || vMapping.y < 0.01){\n\t\ttexture = vec4(0.0, 0.0, 0.0, 1.0);\n\t} \n\tgl_FragColor = texture;\n}\n"},{}],31:[function(e,t,n){t.exports="#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec4 uLens;\nuniform vec2 uFov;\nuniform sampler2D uSampler;\nvarying vec3 vPosition;\nvarying vec2 vTextureCoord;\nvec2 TextureCoord2GLCoord(vec2 textureCoord) {\n\treturn (textureCoord - vec2(0.5, 0.5)) * 2.0;\n}\nvec2 GLCoord2TextureCoord(vec2 glCoord) {\n\treturn glCoord / 2.0 + vec2(0.5, 0.5);\n}\nvoid main(void){\n\tvec2 vMapping = vec2(vTextureCoord.x, 1.0 - vTextureCoord.y);\n\tvMapping = TextureCoord2GLCoord(vMapping);\n\t//TOD insert Code\n\tfloat F = uLens.x/ uLens.w;\n\tfloat seta = length(vMapping) / F;\n\tvMapping = sin(seta) * F / length(vMapping) * vMapping;\n\tvMapping *= uLens.w * 1.414;\n\tvMapping = GLCoord2TextureCoord(vMapping);\n\tvec4 texture = texture2D(uSampler, vMapping);\n\tif(vMapping.x > 0.99 || vMapping.x < 0.01 || vMapping.y > 0.99 || vMapping.y < 0.01){\n\t\ttexture = vec4(0.0, 0.0, 0.0, 1.0);\n\t} \n\tgl_FragColor = texture;\n}\n"},{}],32:[function(e,t,n){t.exports="#ifdef GL_ES\nprecision highp float;\n#endif\nattribute vec3 aVertexPosition;\nattribute vec2 aTextureCoord;\nvarying vec3 vPosition;\nvarying vec2 vTextureCoord;\nvoid main(void){\n\tvPosition = aVertexPosition;\n\tvTextureCoord = aTextureCoord;\n\tgl_Position = vec4(vPosition,1.0);\n}\n"},{}],33:[function(e,t,n){(function(n,r){"use strict";function i(e,t){var n=new Image;n.crossOrigin="Anonymous",n.onload=function(){var e=document.createElement("canvas");e.width=n.width,e.height=n.height;var r=e.getContext("2d");r.drawImage(n,0,0);var i=r.getImageData(0,0,n.width,n.height);t(null,c(new Uint8Array(i.data),[n.width,n.height,4],[4,4*n.width,1],0))},n.onerror=function(e){t(e)},n.src=e}function a(e,t){var n;try{n=new f(e)}catch(e){return void t(e)}if(n.numFrames()>0){var r=[n.numFrames(),n.height,n.width,4],i=new Uint8Array(r[0]*r[1]*r[2]*r[3]),a=c(i,r);try{for(var o=0;o<n.numFrames();++o)n.decodeAndBlitFrameRGBA(o,i.subarray(a.index(o,0,0,0),a.index(o+1,0,0,0)))}catch(e){return void t(e)}t(null,a.transpose(0,2,1))}else{var r=[n.height,n.width,4],i=new Uint8Array(r[0]*r[1]*r[2]),a=c(i,r);try{n.decodeAndBlitFrameRGBA(0,i)}catch(e){return void t(e)}t(null,a.transpose(1,0))}}function o(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.overrideMimeType&&n.overrideMimeType("application/binary"),n.onerror=function(e){t(e)},n.onload=function(){4===n.readyState&&a(new Uint8Array(n.response),t)},n.send()}function s(e){if(void 0===e[0]){for(var t=e.length,n=new Uint8Array(t),r=0;r<t;++r)n[r]=e.get(r);return n}return new Uint8Array(e)}function l(e,t){r.nextTick(function(){try{var n=p(e);n?a(s(n),t):t(new Error("Error parsing data URI"))}catch(e){t(e)}})}var u=e("path"),c=e("ndarray"),f=e("omggif").GifReader,p=(e("ndarray-pack"),e("through"),e("data-uri-to-buffer"));t.exports=function(e,t,r){r||(r=t,t="");var a=u.extname(e);switch(t||a.toUpperCase()){case".GIF":o(e,r);break;default:n.isBuffer(e)&&(e="data:"+t+";base64,"+e.toString("base64")),0===e.indexOf("data:image/gif;")?l(e,r):i(e,r)}}}).call(this,{isBuffer:e("../is-buffer/index.js")},e("_process"))},{"../is-buffer/index.js":49,_process:94,"data-uri-to-buffer":34,ndarray:58,"ndarray-pack":56,omggif:59,path:71,through:113}],34:[function(e,t,n){(function(e){t.exports=function(t){if(!/^data\:/i.test(t))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');var n=(t=t.replace(/\r?\n/g,"")).indexOf(",");if(-1===n||n<=4)throw new TypeError("malformed data: URI");for(var r=t.substring(5,n).split(";"),i=!1,a="US-ASCII",o=0;o<r.length;o++)"base64"==r[o]?i=!0:0==r[o].indexOf("charset=")&&(a=r[o].substring(8));var s=unescape(t.substring(n+1)),l=new e(s,i?"base64":"ascii");return l.type=r[0]||"text/plain",l.charset=a,l}}).call(this,e("buffer").Buffer)},{buffer:7}],35:[function(e,t,n){(function(n){function r(e){a.call(this,e),this.okayToPush=!0,this.resetData()}function i(e,t,n){function i(){o.flushData()}var a=(n=n||{}).highWaterMark;r.call(this,{highWaterMark:a||0===a?a:65536}),this.width=~~e,this.height=~~t,this.transparent=null,this.transIndex=0,this.repeat=-1,this.delay=0,this.pixels=null,this.indexedPixels=null,this.colorDepth=null,this.colorTab=null,this.usedEntry=[],this.palSize=7,this.dispose=-1,this.firstFrame=!0,this.sample=10;var o=this;this.on("writeHeader#stop",i),this.on("frame#stop",i),this.on("finish#stop",function(){i(),o.push(null)})}e("assert"),e("events").EventEmitter;var a=e("readable-stream"),o=e("util"),s=e("./TypedNeuQuant.js"),l=e("./LZWEncoder.js");o.inherits(r,a),r.prototype._read=function(){this.okayToPush=!0},r.prototype.resetData=function(){this.data=[]},r.prototype.flushData=function(){if(!this.okayToPush){var e=new Error("GIF memory limit exceeded. Please `read` from GIF before writing additional frames/information.");return this.emit("error",e)}var t=new n(this.data);this.resetData(),this.okayToPush=this.push(t)},r.prototype.writeByte=function(e){this.data.push(e)},r.prototype.writeUTFBytes=function(e){for(var t=e.length,n=0;n<t;n++)this.writeByte(e.charCodeAt(n))},r.prototype.writeBytes=function(e,t,n){for(var r=n||e.length,i=t||0;i<r;i++)this.writeByte(e[i])},o.inherits(i,r),i.prototype.setDelay=function(e){this.delay=Math.round(e/10)},i.prototype.setFrameRate=function(e){this.delay=Math.round(100/e)},i.prototype.setDispose=function(e){e>=0&&(this.dispose=e)},i.prototype.setRepeat=function(e){this.repeat=e},i.prototype.setTransparent=function(e){this.transparent=e},i.prototype.analyzeImage=function(e){this.setImagePixels(this.removeAlphaChannel(e)),this.analyzePixels()},i.prototype.writeImageInfo=function(){this.firstFrame&&(this.writeLSD(),this.writePalette(),this.repeat>=0&&this.writeNetscapeExt()),this.writeGraphicCtrlExt(),this.writeImageDesc(),this.firstFrame||this.writePalette(),this.firstFrame=!1},i.prototype.outputImage=function(){this.writePixels()},i.prototype.addFrame=function(e){this.emit("frame#start"),this.analyzeImage(e),this.writeImageInfo(),this.outputImage(),this.emit("frame#stop")},i.prototype.finish=function(){this.emit("finish#start"),this.writeByte(59),this.emit("finish#stop")},i.prototype.setQuality=function(e){e<1&&(e=1),this.sample=e},i.prototype.writeHeader=function(){this.emit("writeHeader#start"),this.writeUTFBytes("GIF89a"),this.emit("writeHeader#stop")},i.prototype.analyzePixels=function(){var e=this.pixels.length/3;this.indexedPixels=new Uint8Array(e);var t=new s(this.pixels,this.sample);t.buildColormap(),this.colorTab=t.getColormap();for(var n=0,r=0;r<e;r++){var i=t.lookupRGB(255&this.pixels[n++],255&this.pixels[n++],255&this.pixels[n++]);this.usedEntry[i]=!0,this.indexedPixels[r]=i}this.pixels=null,this.colorDepth=8,this.palSize=7,null!==this.transparent&&(this.transIndex=this.findClosest(this.transparent))},i.prototype.findClosest=function(e){if(null===this.colorTab)return-1;for(var t=(16711680&e)>>16,n=(65280&e)>>8,r=255&e,i=0,a=16777216,o=this.colorTab.length,s=0;s<o;){var l=t-(255&this.colorTab[s++]),u=n-(255&this.colorTab[s++]),c=r-(255&this.colorTab[s]),f=l*l+u*u+c*c,p=s/3;this.usedEntry[p]&&f<a&&(a=f,i=p),s++}return i},i.prototype.removeAlphaChannel=function(e){for(var t=this.width,n=this.height,r=new Uint8Array(t*n*3),i=0,a=0;a<n;a++)for(var o=0;o<t;o++){var s=a*t*4+4*o;r[i++]=e[s],r[i++]=e[s+1],r[i++]=e[s+2]}return r},i.prototype.setImagePixels=function(e){this.pixels=e},i.prototype.writeGraphicCtrlExt=function(){this.writeByte(33),this.writeByte(249),this.writeByte(4);var e,t;null===this.transparent?(e=0,t=0):(e=1,t=2),this.dispose>=0&&(t=7&dispose),t<<=2,this.writeByte(0|t|e),this.writeShort(this.delay),this.writeByte(this.transIndex),this.writeByte(0)},i.prototype.writeImageDesc=function(){this.writeByte(44),this.writeShort(0),this.writeShort(0),this.writeShort(this.width),this.writeShort(this.height),this.firstFrame?this.writeByte(0):this.writeByte(128|this.palSize)},i.prototype.writeLSD=function(){this.writeShort(this.width),this.writeShort(this.height),this.writeByte(240|this.palSize),this.writeByte(0),this.writeByte(0)},i.prototype.writeNetscapeExt=function(){this.writeByte(33),this.writeByte(255),this.writeByte(11),this.writeUTFBytes("NETSCAPE2.0"),this.writeByte(3),this.writeByte(1),this.writeShort(this.repeat),this.writeByte(0)},i.prototype.writePalette=function(){this.writeBytes(this.colorTab);for(var e=768-this.colorTab.length,t=0;t<e;t++)this.writeByte(0)},i.prototype.writeShort=function(e){this.writeByte(255&e),this.writeByte(e>>8&255)},i.prototype.writePixels=function(){new l(this.width,this.height,this.indexedPixels,this.colorDepth).encode(this)},i.prototype.stream=function(){return this},i.ByteCapacitor=r,t.exports=i}).call(this,e("buffer").Buffer)},{"./LZWEncoder.js":36,"./TypedNeuQuant.js":37,assert:1,buffer:7,events:24,"readable-stream":44,util:119}],36:[function(e,t,n){var r=-1,i=12,a=5003,o=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];t.exports=function(e,t,n,s){function l(e,t){S[v++]=e,v>=254&&p(t)}function u(e){c(a),M=k+2,L=!0,g(k,e)}function c(e){for(var t=0;t<e;++t)A[t]=-1}function f(e,t){var n,o,s,l,f,p,m;for(L=!1,w=h(_=x=e),E=1+(k=1<<e-1),M=k+2,v=0,l=d(),m=0,n=a;n<65536;n*=2)++m;m=8-m,c(p=a),g(k,t);e:for(;(o=d())!=r;)if(n=(o<<i)+l,s=o<<m^l,A[s]!==n){if(A[s]>=0){f=p-s,0===s&&(f=1);do{if((s-=f)<0&&(s+=p),A[s]===n){l=C[s];continue e}}while(A[s]>=0)}g(l,t),l=o,M<1<<i?(C[s]=M++,A[s]=n):u(t)}else l=C[s];g(l,t),g(E,t)}function p(e){v>0&&(e.writeByte(v),e.writeBytes(S,0,v),v=0)}function h(e){return(1<<e)-1}function d(){return 0===b?r:(--b,255&n[y++])}function g(e,t){for(m&=o[R],R>0?m|=e<<R:m=e,R+=_;R>=8;)l(255&m,t),m>>=8,R-=8;if((M>w||L)&&(L?(w=h(_=x),L=!1):w=++_==i?1<<i:h(_)),e==E){for(;R>0;)l(255&m,t),m>>=8,R-=8;p(t)}}var m,v,w,b,y,_,x,k,E,T=Math.max(2,s),S=new Uint8Array(256),A=new Int32Array(a),C=new Int32Array(a),R=0,M=0,L=!1;this.encode=function(n){n.writeByte(T),b=e*t,y=0,f(T+1,n),n.writeByte(0)}}},{}],37:[function(e,t,n){var r=100,i=256,a=i-1,o=4,s=16,l=1<<s,u=10,c=10,f=l>>c,p=l<<u-c,h=6,d=(i>>3)*(1<<h),g=30,m=1024,v=256,w=1<<18,b=499,y=491,_=487,x=503,k=3*x;t.exports=function(e,t){function n(){M=[],L=new Int32Array(256),j=new Int32Array(i),I=new Int32Array(i),D=new Int32Array(i>>3);var e,t;for(e=0;e<i;e++)t=(e<<o+8)/i,M[e]=new Float64Array([t,t,t,0]),I[e]=l/i,j[e]=0}function E(){for(var e=0;e<i;e++)M[e][0]>>=o,M[e][1]>>=o,M[e][2]>>=o,M[e][3]=e}function T(e,t,n,r,i){M[t][0]-=e*(M[t][0]-n)/m,M[t][1]-=e*(M[t][1]-r)/m,M[t][2]-=e*(M[t][2]-i)/m}function S(e,t,n,r,a){for(var o,s,l=Math.abs(t-e),u=Math.min(t+e,i),c=t+1,f=t-1,p=1;c<u||f>l;)s=D[p++],c<u&&((o=M[c++])[0]-=s*(o[0]-n)/w,o[1]-=s*(o[1]-r)/w,o[2]-=s*(o[2]-a)/w),f>l&&((o=M[f--])[0]-=s*(o[0]-n)/w,o[1]-=s*(o[1]-r)/w,o[2]-=s*(o[2]-a)/w)}function A(e,t,n){var r,a,l,h,d,g=~(1<<31),m=g,v=-1,w=v;for(r=0;r<i;r++)a=M[r],(l=Math.abs(a[0]-e)+Math.abs(a[1]-t)+Math.abs(a[2]-n))<g&&(g=l,v=r),(h=l-(j[r]>>s-o))<m&&(m=h,w=r),d=I[r]>>c,I[r]-=d,j[r]+=d<<u;return I[v]+=f,j[v]-=p,w}function C(){var e,t,n,r,o,s,l=0,u=0;for(e=0;e<i;e++){for(o=e,s=(n=M[e])[1],t=e+1;t<i;t++)(r=M[t])[1]<s&&(o=t,s=r[1]);if(r=M[o],e!=o&&(t=r[0],r[0]=n[0],n[0]=t,t=r[1],r[1]=n[1],n[1]=t,t=r[2],r[2]=n[2],n[2]=t,t=r[3],r[3]=n[3],n[3]=t),s!=l){for(L[l]=u+e>>1,t=l+1;t<s;t++)L[t]=e;l=s,u=e}}for(L[l]=u+a>>1,t=l+1;t<256;t++)L[t]=a}function R(){var n,i=e.length,a=30+(t-1)/3,s=i/(3*t),l=~~(s/r),u=m,c=d,f=c>>h;for(f<=1&&(f=0),n=0;n<f;n++)D[n]=u*((f*f-n*n)*v/(f*f));var p;i<k?(t=1,p=3):p=i%b!=0?3*b:i%y!=0?3*y:i%_!=0?3*_:3*x;var w,E,C,R,M=0;for(n=0;n<s;)if(w=(255&e[M])<<o,E=(255&e[M+1])<<o,C=(255&e[M+2])<<o,R=A(w,E,C),T(u,R,w,E,C),0!==f&&S(f,R,w,E,C),(M+=p)>=i&&(M-=i),n++,0===l&&(l=1),n%l==0)for(u-=u/a,(f=(c-=c/g)>>h)<=1&&(f=0),R=0;R<f;R++)D[R]=u*((f*f-R*R)*v/(f*f))}var M,L,j,I,D;this.buildColormap=function(){n(),R(),E(),C()},this.getColormap=function(){for(var e=[],t=[],n=0;n<i;n++)t[M[n][3]]=n;for(var r=0,a=0;a<i;a++){var o=t[a];e[r++]=M[o][0],e[r++]=M[o][1],e[r++]=M[o][2]}return e},this.lookupRGB=function(e,t,n){for(var r,a,o,s=1e3,l=-1,u=L[t],c=u-1;u<i||c>=0;)u<i&&((o=(a=M[u])[1]-t)>=s?u=i:(u++,o<0&&(o=-o),(r=a[0]-e)<0&&(r=-r),(o+=r)<s&&((r=a[2]-n)<0&&(r=-r),(o+=r)<s&&(s=o,l=a[3])))),c>=0&&((o=t-(a=M[c])[1])>=s?c=-1:(c--,o<0&&(o=-o),(r=a[0]-e)<0&&(r=-r),(o+=r)<s&&((r=a[2]-n)<0&&(r=-r),(o+=r)<s&&(s=o,l=a[3]))));return l}}},{}],38:[function(e,t,n){arguments[4][11][0].apply(n,arguments)},{dup:11}],39:[function(e,t,n){arguments[4][12][0].apply(n,arguments)},{"./_stream_readable":41,"./_stream_writable":43,_process:94,"core-util-is":19,dup:12,inherits:47}],40:[function(e,t,n){arguments[4][13][0].apply(n,arguments)},{"./_stream_transform":42,"core-util-is":19,dup:13,inherits:47}],41:[function(e,t,n){(function(n){function r(t,n){var r=e("./_stream_duplex"),i=(t=t||{}).highWaterMark,a=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:a,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!t.objectMode,n instanceof r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(C||(C=e("string_decoder/").StringDecoder),this.decoder=new C(t.encoding),this.encoding=t.encoding)}function i(t){e("./_stream_duplex");if(!(this instanceof i))return new i(t);this._readableState=new r(t,this),this.readable=!0,S.call(this)}function a(e,t,n,r,i){var a=u(t,n);if(a)e.emit("error",a);else if(A.isNullOrUndefined(n))t.reading=!1,t.ended||c(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else!t.decoder||i||r||(n=t.decoder.write(n)),i||(t.reading=!1),t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&f(e)),h(e,t);else i||(t.reading=!1);return o(t)}function o(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function s(e){if(e>=M)e=M;else{e--;for(var t=1;t<32;t<<=1)e|=e>>t;e++}return e}function l(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:isNaN(e)||A.isNull(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:e<=0?0:(e>t.highWaterMark&&(t.highWaterMark=s(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function u(e,t){var n=null;return A.isBuffer(t)||A.isString(t)||A.isNullOrUndefined(t)||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function c(e,t){if(t.decoder&&!t.ended){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,f(e)}function f(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(R("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(function(){p(e)}):p(e))}function p(e){R("emit readable"),e.emit("readable"),w(e)}function h(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(function(){d(e,t)}))}function d(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(R("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function g(e){return function(){var t=e._readableState;R("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&T.listenerCount(e,"data")&&(t.flowing=!0,w(e))}}function m(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(function(){v(e,t)}))}function v(e,t){t.resumeScheduled=!1,e.emit("resume"),w(e),t.flowing&&!t.reading&&e.read(0)}function w(e){var t=e._readableState;if(R("flow",t.flowing),t.flowing)do{var n=e.read()}while(null!==n&&t.flowing)}function b(e,t){var n,r=t.buffer,i=t.length,a=!!t.decoder,o=!!t.objectMode;if(0===r.length)return null;if(0===i)n=null;else if(o)n=r.shift();else if(!e||e>=i)n=a?r.join(""):E.concat(r,i),r.length=0;else if(e<r[0].length)n=(c=r[0]).slice(0,e),r[0]=c.slice(e);else if(e===r[0].length)n=r.shift();else{n=a?"":new E(e);for(var s=0,l=0,u=r.length;l<u&&s<e;l++){var c=r[0],f=Math.min(e-s,c.length);a?n+=c.slice(0,f):c.copy(n,s,0,f),f<c.length?r[0]=c.slice(f):r.shift(),s+=f}}return n}function y(e){var t=e._readableState;if(t.length>0)throw new Error("endReadable called on non-empty stream");t.endEmitted||(t.ended=!0,n.nextTick(function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}))}function _(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function x(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}t.exports=i;var k=e("isarray"),E=e("buffer").Buffer;i.ReadableState=r;var T=e("events").EventEmitter;T.listenerCount||(T.listenerCount=function(e,t){return e.listeners(t).length});var S=e("stream"),A=e("core-util-is");A.inherits=e("inherits");var C,R=e("util");R=R&&R.debuglog?R.debuglog("stream"):function(){},A.inherits(i,S),i.prototype.push=function(e,t){var n=this._readableState;return A.isString(e)&&!n.objectMode&&(t=t||n.defaultEncoding)!==n.encoding&&(e=new E(e,t),t=""),a(this,n,e,t,!1)},i.prototype.unshift=function(e){return a(this,this._readableState,e,"",!0)},i.prototype.setEncoding=function(t){return C||(C=e("string_decoder/").StringDecoder),this._readableState.decoder=new C(t),this._readableState.encoding=t,this};var M=8388608;i.prototype.read=function(e){R("read",e);var t=this._readableState,n=e;if((!A.isNumber(e)||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return R("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?y(this):f(this),null;if(0===(e=l(e,t))&&t.ended)return 0===t.length&&y(this),null;var r=t.needReadable;R("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&R("length less than watermark",r=!0),(t.ended||t.reading)&&R("reading or ended",r=!1),r&&(R("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),r&&!t.reading&&(e=l(n,t));var i;return i=e>0?b(e,t):null,A.isNull(i)&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),n!==e&&t.ended&&0===t.length&&y(this),A.isNull(i)||this.emit("data",i),i},i.prototype._read=function(e){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(e,t){function r(e){R("onunpipe"),e===f&&a()}function i(){R("onend"),e.end()}function a(){R("cleanup"),e.removeListener("close",l),e.removeListener("finish",u),e.removeListener("drain",d),e.removeListener("error",s),e.removeListener("unpipe",r),f.removeListener("end",i),f.removeListener("end",a),f.removeListener("data",o),!p.awaitDrain||e._writableState&&!e._writableState.needDrain||d()}function o(t){R("ondata"),!1===e.write(t)&&(R("false write response, pause",f._readableState.awaitDrain),f._readableState.awaitDrain++,f.pause())}function s(t){R("onerror",t),c(),e.removeListener("error",s),0===T.listenerCount(e,"error")&&e.emit("error",t)}function l(){e.removeListener("finish",u),c()}function u(){R("onfinish"),e.removeListener("close",l),c()}function c(){R("unpipe"),f.unpipe(e)}var f=this,p=this._readableState;switch(p.pipesCount){case 0:p.pipes=e;break;case 1:p.pipes=[p.pipes,e];break;default:p.pipes.push(e)}p.pipesCount+=1,R("pipe count=%d opts=%j",p.pipesCount,t);var h=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?i:a;p.endEmitted?n.nextTick(h):f.once("end",h),e.on("unpipe",r);var d=g(f);return e.on("drain",d),f.on("data",o),e._events&&e._events.error?k(e._events.error)?e._events.error.unshift(s):e._events.error=[s,e._events.error]:e.on("error",s),e.once("close",l),e.once("finish",u),e.emit("pipe",f),p.flowing||(R("pipe resume"),f.resume()),e},i.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}return-1===(i=x(t.pipes,e))?this:(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},i.prototype.on=function(e,t){var r=S.prototype.on.call(this,e,t);if("data"===e&&!1!==this._readableState.flowing&&this.resume(),"readable"===e&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&f(this);else{var a=this;n.nextTick(function(){R("readable nexttick read 0"),a.read(0)})}}return r},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var e=this._readableState;return e.flowing||(R("resume"),e.flowing=!0,e.reading||(R("resume read 0"),this.read(0)),m(this,e)),this},i.prototype.pause=function(){return R("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(R("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;e.on("end",function(){if(R("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)}),e.on("data",function(i){R("wrapped data"),t.decoder&&(i=t.decoder.write(i)),i&&(t.objectMode||i.length)&&(r.push(i)||(n=!0,e.pause()))});for(var i in e)A.isFunction(e[i])&&A.isUndefined(this[i])&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));return _(["error","close","destroy","pause","resume"],function(t){e.on(t,r.emit.bind(r,t))}),r._read=function(t){R("wrapped _read",t),n&&(n=!1,e.resume())},r},i._fromList=b}).call(this,e("_process"))},{"./_stream_duplex":39,_process:94,buffer:7,"core-util-is":19,events:24,inherits:47,isarray:38,stream:111,"string_decoder/":45,util:3}],42:[function(e,t,n){function r(e,t){this.afterTransform=function(e,n){return i(t,e,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function i(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,l.isNullOrUndefined(n)||e.push(n),i&&i(t);var a=e._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&e._read(a.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);s.call(this,e),this._transformState=new r(e,this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){l.isFunction(this._flush)?this._flush(function(e){o(t,e)}):o(t)})}function o(e,t){if(t)return e.emit("error",t);var n=e._writableState,r=e._transformState;if(n.length)throw new Error("calling transform done when ws.length != 0");if(r.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}t.exports=a;var s=e("./_stream_duplex"),l=e("core-util-is");l.inherits=e("inherits"),l.inherits(a,s),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,n){throw new Error("not implemented")},a.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;l.isNull(t.writechunk)||!t.writecb||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))}},{"./_stream_duplex":39,"core-util-is":19,inherits:47}],43:[function(e,t,n){(function(n){function r(e,t,n){this.chunk=e,this.encoding=t,this.callback=n}function i(t,n){var r=e("./_stream_duplex"),i=(t=t||{}).highWaterMark,a=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:a,this.objectMode=!!t.objectMode,n instanceof r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var o=!1===t.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){h(n,e)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function a(t){var n=e("./_stream_duplex");if(!(this instanceof a||this instanceof n))return new a(t);this._writableState=new i(t,this),this.writable=!0,k.call(this)}function o(e,t,r){var i=new Error("write after end");e.emit("error",i),n.nextTick(function(){r(i)})}function s(e,t,r,i){var a=!0;if(!(x.isBuffer(r)||x.isString(r)||x.isNullOrUndefined(r)||t.objectMode)){var o=new TypeError("Invalid non-string/buffer chunk");e.emit("error",o),n.nextTick(function(){i(o)}),a=!1}return a}function l(e,t,n){return!e.objectMode&&!1!==e.decodeStrings&&x.isString(t)&&(t=new _(t,n)),t}function u(e,t,n,i,a){n=l(t,n,i),x.isBuffer(n)&&(i="buffer");var o=t.objectMode?1:n.length;t.length+=o;var s=t.length<t.highWaterMark;return s||(t.needDrain=!0),t.writing||t.corked?t.buffer.push(new r(n,i,a)):c(e,t,!1,o,n,i,a),s}function c(e,t,n,r,i,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function f(e,t,r,i,a){r?n.nextTick(function(){t.pendingcb--,a(i)}):(t.pendingcb--,a(i)),e._writableState.errorEmitted=!0,e.emit("error",i)}function p(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function h(e,t){var r=e._writableState,i=r.sync,a=r.writecb;if(p(r),t)f(e,r,i,t,a);else{var o=v(e,r);o||r.corked||r.bufferProcessing||!r.buffer.length||m(e,r),i?n.nextTick(function(){d(e,r,o,a)}):d(e,r,o,a)}}function d(e,t,n,r){n||g(e,t),t.pendingcb--,r(),b(e,t)}function g(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function m(e,t){if(t.bufferProcessing=!0,e._writev&&t.buffer.length>1){for(var n=[],r=0;r<t.buffer.length;r++)n.push(t.buffer[r].callback);t.pendingcb++,c(e,t,!0,t.length,t.buffer,"",function(e){for(var r=0;r<n.length;r++)t.pendingcb--,n[r](e)}),t.buffer=[]}else{for(r=0;r<t.buffer.length;r++){var i=t.buffer[r],a=i.chunk,o=i.encoding,s=i.callback,l=t.objectMode?1:a.length;if(c(e,t,!1,l,a,o,s),t.writing){r++;break}}r<t.buffer.length?t.buffer=t.buffer.slice(r):t.buffer.length=0}t.bufferProcessing=!1}function v(e,t){return t.ending&&0===t.length&&!t.finished&&!t.writing}function w(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function b(e,t){var n=v(e,t);return n&&(0===t.pendingcb?(w(e,t),t.finished=!0,e.emit("finish")):w(e,t)),n}function y(e,t,r){t.ending=!0,b(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r)),t.ended=!0}t.exports=a;var _=e("buffer").Buffer;a.WritableState=i;var x=e("core-util-is");x.inherits=e("inherits");var k=e("stream");x.inherits(a,k),a.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},a.prototype.write=function(e,t,n){var r=this._writableState,i=!1;return x.isFunction(t)&&(n=t,t=null),x.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),x.isFunction(n)||(n=function(){}),r.ended?o(this,0,n):s(this,r,e,n)&&(r.pendingcb++,i=u(this,r,e,t,n)),i},a.prototype.cork=function(){this._writableState.corked++},a.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.buffer.length||m(this,e))},a.prototype._write=function(e,t,n){n(new Error("not implemented"))},a.prototype._writev=null,a.prototype.end=function(e,t,n){var r=this._writableState;x.isFunction(e)?(n=e,e=null,t=null):x.isFunction(t)&&(n=t,t=null),x.isNullOrUndefined(e)||this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||y(this,r,n)}}).call(this,e("_process"))},{"./_stream_duplex":39,_process:94,buffer:7,"core-util-is":19,inherits:47,stream:111}],44:[function(e,t,n){(function(r){(n=t.exports=e("./lib/_stream_readable.js")).Stream=e("stream"),n.Readable=n,n.Writable=e("./lib/_stream_writable.js"),n.Duplex=e("./lib/_stream_duplex.js"),n.Transform=e("./lib/_stream_transform.js"),n.PassThrough=e("./lib/_stream_passthrough.js"),r.browser||"disable"!==r.env.READABLE_STREAM||(t.exports=e("stream"))}).call(this,e("_process"))},{"./lib/_stream_duplex.js":39,"./lib/_stream_passthrough.js":40,"./lib/_stream_readable.js":41,"./lib/_stream_transform.js":42,"./lib/_stream_writable.js":43,_process:94,stream:111}],45:[function(e,t,n){arguments[4][18][0].apply(n,arguments)},{buffer:7,dup:18}],46:[function(e,t,n){n.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,l=(1<<s)-1,u=l>>1,c=-7,f=n?i-1:0,p=n?-1:1,h=e[t+f];for(f+=p,a=h&(1<<-c)-1,h>>=-c,c+=s;c>0;a=256*a+e[t+f],f+=p,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=256*o+e[t+f],f+=p,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,r),a-=u}return(h?-1:1)*o*Math.pow(2,a-r)},n.write=function(e,t,n,r,i,a){var o,s,l,u=8*a-i-1,c=(1<<u)-1,f=c>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:a-1,d=r?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,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+f>=1?p/l:p*Math.pow(2,1-f))*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*l-1)*Math.pow(2,i),o+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[n+h]=255&s,h+=d,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;e[n+h]=255&o,h+=d,o/=256,u-=8);e[n+h-d]|=128*g}},{}],47:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],48:[function(e,t,n){"use strict";t.exports=function(e){for(var t=new Array(e),n=0;n<e;++n)t[n]=n;return t}},{}],49:[function(e,t,n){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function i(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}t.exports=function(e){return null!=e&&(r(e)||i(e)||!!e._isBuffer)}},{}],50:[function(e,t,n){arguments[4][8][0].apply(n,arguments)},{dup:8}],51:[function(e,t,n){!function(e,n){"object"==typeof t&&"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=!!e&&"length"in e&&e.length,n=re.type(e);return"function"!==n&&!re.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e,t,n){if(re.isFunction(t))return re.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return re.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(he.test(t))return re.filter(t,e,n);t=re.filter(t,e)}return re.grep(e,function(e){return J.call(t,e)>-1!==n})}function i(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function a(e){var t={};return re.each(e.match(we)||[],function(e,n){t[n]=!0}),t}function o(){Y.removeEventListener("DOMContentLoaded",o),e.removeEventListener("load",o),re.ready()}function s(){this.expando=re.expando+s.uid++}function l(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Te,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Ee.test(n)?re.parseJSON(n):n)}catch(e){}ke.set(e,t,n)}else n=void 0;return n}function u(e,t,n,r){var i,a=1,o=20,s=r?function(){return r.cur()}:function(){return re.css(e,t,"")},l=s(),u=n&&n[3]||(re.cssNumber[t]?"":"px"),c=(re.cssNumber[t]||"px"!==u&&+l)&&Ae.exec(re.css(e,t));if(c&&c[3]!==u){u=u||c[3],n=n||[],c=+l||1;do{c/=a=a||".5",re.style(e,t,c+u)}while(a!==(a=s()/l)&&1!==a&&--o)}return n&&(c=+c||+l||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=u,r.start=c,r.end=i)),i}function c(e,t){var n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&re.nodeName(e,t)?re.merge([e],n):n}function f(e,t){for(var n=0,r=e.length;n<r;n++)xe.set(e[n],"globalEval",!t||xe.get(t[n],"globalEval"))}function p(e,t,n,r,i){for(var a,o,s,l,u,p,h=t.createDocumentFragment(),d=[],g=0,m=e.length;g<m;g++)if((a=e[g])||0===a)if("object"===re.type(a))re.merge(d,a.nodeType?[a]:a);else if(De.test(a)){for(o=o||h.appendChild(t.createElement("div")),s=(Le.exec(a)||["",""])[1].toLowerCase(),l=Ie[s]||Ie._default,o.innerHTML=l[1]+re.htmlPrefilter(a)+l[2],p=l[0];p--;)o=o.lastChild;re.merge(d,o.childNodes),(o=h.firstChild).textContent=""}else d.push(t.createTextNode(a));for(h.textContent="",g=0;a=d[g++];)if(r&&re.inArray(a,r)>-1)i&&i.push(a);else if(u=re.contains(a.ownerDocument,a),o=c(h.appendChild(a),"script"),u&&f(o),n)for(p=0;a=o[p++];)je.test(a.type||"")&&n.push(a);return h}function h(){return!0}function d(){return!1}function g(){try{return Y.activeElement}catch(e){}}function m(e,t,n,r,i,a){var o,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)m(e,s,n,r,t[s],a);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=d;else if(!i)return e;return 1===a&&(o=i,(i=function(e){return re().off(e),o.apply(this,arguments)}).guid=o.guid||(o.guid=re.guid++)),e.each(function(){re.event.add(this,t,i,r,n)})}function v(e,t){return re.nodeName(e,"table")&&re.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function w(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function b(e){var t=Ue.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function y(e,t){var n,r,i,a,o,s,l,u;if(1===t.nodeType){if(xe.hasData(e)&&(a=xe.access(e),o=xe.set(t,a),u=a.events)){delete o.handle,o.events={};for(i in u)for(n=0,r=u[i].length;n<r;n++)re.event.add(t,i,u[i][n])}ke.hasData(e)&&(s=ke.access(e),l=re.extend({},s),ke.set(t,l))}}function _(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Me.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function x(e,t,n,r){t=$.apply([],t);var i,a,o,s,l,u,f=0,h=e.length,d=h-1,g=t[0],m=re.isFunction(g);if(m||h>1&&"string"==typeof g&&!ne.checkClone&&Fe.test(g))return e.each(function(i){var a=e.eq(i);m&&(t[0]=g.call(this,i,a.html())),x(a,t,n,r)});if(h&&(i=p(t,e[0].ownerDocument,!1,e,r),a=i.firstChild,1===i.childNodes.length&&(i=a),a||r)){for(s=(o=re.map(c(i,"script"),w)).length;f<h;f++)l=i,f!==d&&(l=re.clone(l,!0,!0),s&&re.merge(o,c(l,"script"))),n.call(e[f],l,f);if(s)for(u=o[o.length-1].ownerDocument,re.map(o,b),f=0;f<s;f++)l=o[f],je.test(l.type||"")&&!xe.access(l,"globalEval")&&re.contains(u,l)&&(l.src?re._evalUrl&&re._evalUrl(l.src):re.globalEval(l.textContent.replace(qe,"")))}return e}function k(e,t,n){for(var r,i=t?re.filter(t,e):e,a=0;null!=(r=i[a]);a++)n||1!==r.nodeType||re.cleanData(c(r)),r.parentNode&&(n&&re.contains(r.ownerDocument,r)&&f(c(r,"script")),r.parentNode.removeChild(r));return e}function E(e,t){var n=re(t.createElement(e)).appendTo(t.body),r=re.css(n[0],"display");return n.detach(),r}function T(e){var t=Y,n=Ve[e];return n||("none"!==(n=E(e,t))&&n||((t=(He=(He||re("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement))[0].contentDocument).write(),t.close(),n=E(e,t),He.detach()),Ve[e]=n),n}function S(e,t,n){var r,i,a,o,s=e.style;return n=n||Ze(e),""!==(o=n?n.getPropertyValue(t)||n[t]:void 0)&&void 0!==o||re.contains(e.ownerDocument,e)||(o=re.style(e,t)),n&&!ne.pixelMarginRight()&&Ge.test(o)&&We.test(t)&&(r=s.width,i=s.minWidth,a=s.maxWidth,s.minWidth=s.maxWidth=s.width=o,o=n.width,s.width=r,s.minWidth=i,s.maxWidth=a),void 0!==o?o+"":o}function A(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}function C(e){if(e in et)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=Ke.length;n--;)if((e=Ke[n]+t)in et)return e}function R(e,t,n){var r=Ae.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function M(e,t,n,r,i){for(var a=n===(r?"border":"content")?4:"width"===t?1:0,o=0;a<4;a+=2)"margin"===n&&(o+=re.css(e,n+Ce[a],!0,i)),r?("content"===n&&(o-=re.css(e,"padding"+Ce[a],!0,i)),"margin"!==n&&(o-=re.css(e,"border"+Ce[a]+"Width",!0,i))):(o+=re.css(e,"padding"+Ce[a],!0,i),"padding"!==n&&(o+=re.css(e,"border"+Ce[a]+"Width",!0,i)));return o}function L(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,a=Ze(e),o="border-box"===re.css(e,"boxSizing",!1,a);if(i<=0||null==i){if(((i=S(e,t,a))<0||null==i)&&(i=e.style[t]),Ge.test(i))return i;r=o&&(ne.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+M(e,t,n||(o?"border":"content"),r,a)+"px"}function j(e,t){for(var n,r,i,a=[],o=0,s=e.length;o<s;o++)(r=e[o]).style&&(a[o]=xe.get(r,"olddisplay"),n=r.style.display,t?(a[o]||"none"!==n||(r.style.display=""),""===r.style.display&&Re(r)&&(a[o]=xe.access(r,"olddisplay",T(r.nodeName)))):(i=Re(r),"none"===n&&i||xe.set(r,"olddisplay",i?n:re.css(r,"display"))));for(o=0;o<s;o++)(r=e[o]).style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?a[o]||"":"none"));return e}function I(e,t,n,r,i){return new I.prototype.init(e,t,n,r,i)}function D(){return e.setTimeout(function(){tt=void 0}),tt=re.now()}function B(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=Ce[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function N(e,t,n){for(var r,i=(O.tweeners[t]||[]).concat(O.tweeners["*"]),a=0,o=i.length;a<o;a++)if(r=i[a].call(n,t,e))return r}function P(e,t){var n,r,i,a,o;for(n in e)if(r=re.camelCase(n),i=t[r],a=e[n],re.isArray(a)&&(i=a[1],a=e[n]=a[0]),n!==r&&(e[r]=a,delete e[n]),(o=re.cssHooks[r])&&"expand"in o){a=o.expand(a),delete e[r];for(n in a)n in e||(e[n]=a[n],t[n]=i)}else t[r]=i}function O(e,t,n){var r,i,a=0,o=O.prefilters.length,s=re.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;for(var t=tt||D(),n=Math.max(0,u.startTime+u.duration-t),r=1-(n/u.duration||0),a=0,o=u.tweens.length;a<o;a++)u.tweens[a].run(r);return s.notifyWith(e,[u,r,n]),r<1&&o?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:re.extend({},t),opts:re.extend(!0,{specialEasing:{},easing:re.easing._default},n),originalProperties:t,originalOptions:n,startTime:tt||D(),duration:n.duration,tweens:[],createTween:function(t,n){var r=re.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)u.tweens[n].run(1);return t?(s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u,t])):s.rejectWith(e,[u,t]),this}}),c=u.props;for(P(c,u.opts.specialEasing);a<o;a++)if(r=O.prefilters[a].call(u,e,c,u.opts))return re.isFunction(r.stop)&&(re._queueHooks(u.elem,u.opts.queue).stop=re.proxy(r.stop,r)),r;return re.map(c,N,u),re.isFunction(u.opts.start)&&u.opts.start.call(e,u),re.fx.timer(re.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function z(e){return e.getAttribute&&e.getAttribute("class")||""}function F(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,a=t.toLowerCase().match(we)||[];if(re.isFunction(n))for(;r=a[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function U(e,t,n,r){function i(s){var l;return a[s]=!0,re.each(e[s]||[],function(e,s){var u=s(t,n,r);return"string"!=typeof u||o||a[u]?o?!(l=u):void 0:(t.dataTypes.unshift(u),i(u),!1)}),l}var a={},o=e===kt;return i(t.dataTypes[0])||!a["*"]&&i("*")}function q(e,t){var n,r,i=re.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&re.extend(!0,e,r),e}function H(e,t,n){for(var r,i,a,o,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){l.unshift(i);break}if(l[0]in n)a=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){a=i;break}o||(o=i)}a=a||o}if(a)return a!==l[0]&&l.unshift(a),n[a]}function V(e,t,n,r){var i,a,o,s,l,u={},c=e.dataTypes.slice();if(c[1])for(o in e.converters)u[o.toLowerCase()]=e.converters[o];for(a=c.shift();a;)if(e.responseFields[a]&&(n[e.responseFields[a]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=a,a=c.shift())if("*"===a)a=l;else if("*"!==l&&l!==a){if(!(o=u[l+" "+a]||u["* "+a]))for(i in u)if((s=i.split(" "))[1]===a&&(o=u[l+" "+s[0]]||u["* "+s[0]])){!0===o?o=u[i]:!0!==u[i]&&(a=s[0],c.unshift(s[1]));break}if(!0!==o)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+l+" to "+a}}}return{state:"success",data:t}}function W(e,t,n,r){var i;if(re.isArray(t))re.each(t,function(t,i){n||At.test(e)?r(e,i):W(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==re.type(t))r(e,t);else for(i in t)W(e+"["+i+"]",t[i],n,r)}function G(e){return re.isWindow(e)?e:9===e.nodeType&&e.defaultView}var Z=[],Y=e.document,X=Z.slice,$=Z.concat,Q=Z.push,J=Z.indexOf,K={},ee=K.toString,te=K.hasOwnProperty,ne={},re=function(e,t){return new re.fn.init(e,t)},ie=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ae=/^-ms-/,oe=/-([\da-z])/gi,se=function(e,t){return t.toUpperCase()};re.fn=re.prototype={jquery:"2.2.4",constructor:re,selector:"",length:0,toArray:function(){return X.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:X.call(this)},pushStack:function(e){var t=re.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e){return re.each(this,e)},map:function(e){return this.pushStack(re.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(X.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:Q,sort:Z.sort,splice:Z.splice},re.extend=re.fn.extend=function(){var e,t,n,r,i,a,o=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof o&&(u=o,o=arguments[s]||{},s++),"object"==typeof o||re.isFunction(o)||(o={}),s===l&&(o=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)n=o[t],o!==(r=e[t])&&(u&&r&&(re.isPlainObject(r)||(i=re.isArray(r)))?(i?(i=!1,a=n&&re.isArray(n)?n:[]):a=n&&re.isPlainObject(n)?n:{},o[t]=re.extend(u,a,r)):void 0!==r&&(o[t]=r));return o},re.extend({expando:"jQuery"+("2.2.4"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===re.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=e&&e.toString();return!re.isArray(e)&&t-parseFloat(t)+1>=0},isPlainObject:function(e){var t;if("object"!==re.type(e)||e.nodeType||re.isWindow(e))return!1;if(e.constructor&&!te.call(e,"constructor")&&!te.call(e.constructor.prototype||{},"isPrototypeOf"))return!1;for(t in e);return void 0===t||te.call(e,t)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?K[ee.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;(e=re.trim(e))&&(1===e.indexOf("use strict")?((t=Y.createElement("script")).text=e,Y.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(ae,"ms-").replace(oe,se)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var r,i=0;if(n(e))for(r=e.length;i<r&&!1!==t.call(e[i],i,e[i]);i++);else for(i in e)if(!1===t.call(e[i],i,e[i]))break;return e},trim:function(e){return null==e?"":(e+"").replace(ie,"")},makeArray:function(e,t){var r=t||[];return null!=e&&(n(Object(e))?re.merge(r,"string"==typeof e?[e]:e):Q.call(r,e)),r},inArray:function(e,t,n){return null==t?-1:J.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,a=e.length,o=!n;i<a;i++)!t(e[i],i)!==o&&r.push(e[i]);return r},map:function(e,t,r){var i,a,o=0,s=[];if(n(e))for(i=e.length;o<i;o++)null!=(a=t(e[o],o,r))&&s.push(a);else for(o in e)null!=(a=t(e[o],o,r))&&s.push(a);return $.apply([],s)},guid:1,proxy:function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),re.isFunction(e))return r=X.call(arguments,2),i=function(){return e.apply(t||this,r.concat(X.call(arguments)))},i.guid=e.guid=e.guid||re.guid++,i},now:Date.now,support:ne}),"function"==typeof Symbol&&(re.fn[Symbol.iterator]=Z[Symbol.iterator]),re.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){K["[object "+t+"]"]=t.toLowerCase()});var le=function(e){function t(e,t,n,r){var i,a,o,s,u,f,p,h,d=t&&t.ownerDocument,g=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==g&&9!==g&&11!==g)return n;if(!r&&((t?t.ownerDocument||t:O)!==M&&R(t),t=t||M,j)){if(11!==g&&(f=ge.exec(e)))if(i=f[1]){if(9===g){if(!(o=t.getElementById(i)))return n;if(o.id===i)return n.push(o),n}else if(d&&(o=d.getElementById(i))&&N(t,o)&&o.id===i)return n.push(o),n}else{if(f[2])return $.apply(n,t.getElementsByTagName(e)),n;if((i=f[3])&&b.getElementsByClassName&&t.getElementsByClassName)return $.apply(n,t.getElementsByClassName(i)),n}if(b.qsa&&!H[e+" "]&&(!I||!I.test(e))){if(1!==g)d=t,h=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(ve,"\\$&"):t.setAttribute("id",s=P),a=(p=k(e)).length,u=ce.test(s)?"#"+s:"[id='"+s+"']";a--;)p[a]=u+" "+c(p[a]);h=p.join(","),d=me.test(e)&&l(t.parentNode)||t}if(h)try{return $.apply(n,d.querySelectorAll(h)),n}catch(e){}finally{s===P&&t.removeAttribute("id")}}}return T(e.replace(ae,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>y.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[P]=!0,e}function i(e){var t=M.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function a(e,t){for(var n=e.split("|"),r=n.length;r--;)y.attrHandle[n[r]]=t}function o(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||W)-(~e.sourceIndex||W);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return r(function(t){return t=+t,r(function(n,r){for(var i,a=e([],n.length,t),o=a.length;o--;)n[i=a[o]]&&(n[i]=!(r[i]=n[i]))})})}function l(e){return e&&void 0!==e.getElementsByTagName&&e}function u(){}function c(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function f(e,t,n){var r=t.dir,i=n&&"parentNode"===r,a=F++;return t.first?function(t,n,a){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,a)}:function(t,n,o){var s,l,u,c=[z,a];if(o){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,o))return!0}else for(;t=t[r];)if(1===t.nodeType||i){if(u=t[P]||(t[P]={}),l=u[t.uniqueID]||(u[t.uniqueID]={}),(s=l[r])&&s[0]===z&&s[1]===a)return c[2]=s[2];if(l[r]=c,c[2]=e(t,n,o))return!0}}}function p(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function h(e,n,r){for(var i=0,a=n.length;i<a;i++)t(e,n[i],r);return r}function d(e,t,n,r,i){for(var a,o=[],s=0,l=e.length,u=null!=t;s<l;s++)(a=e[s])&&(n&&!n(a,r,i)||(o.push(a),u&&t.push(s)));return o}function g(e,t,n,i,a,o){return i&&!i[P]&&(i=g(i)),a&&!a[P]&&(a=g(a,o)),r(function(r,o,s,l){var u,c,f,p=[],g=[],m=o.length,v=r||h(t||"*",s.nodeType?[s]:s,[]),w=!e||!r&&t?v:d(v,p,e,s,l),b=n?a||(r?e:m||i)?[]:o:w;if(n&&n(w,b,s,l),i)for(u=d(b,g),i(u,[],s,l),c=u.length;c--;)(f=u[c])&&(b[g[c]]=!(w[g[c]]=f));if(r){if(a||e){if(a){for(u=[],c=b.length;c--;)(f=b[c])&&u.push(w[c]=f);a(null,b=[],u,l)}for(c=b.length;c--;)(f=b[c])&&(u=a?J(r,f):p[c])>-1&&(r[u]=!(o[u]=f))}}else b=d(b===o?b.splice(m,b.length):b),a?a(null,o,b,l):$.apply(o,b)})}function m(e){for(var t,n,r,i=e.length,a=y.relative[e[0].type],o=a||y.relative[" "],s=a?1:0,l=f(function(e){return e===t},o,!0),u=f(function(e){return J(t,e)>-1},o,!0),h=[function(e,n,r){var i=!a&&(r||n!==S)||((t=n).nodeType?l(e,n,r):u(e,n,r));return t=null,i}];s<i;s++)if(n=y.relative[e[s].type])h=[f(p(h),n)];else{if((n=y.filter[e[s].type].apply(null,e[s].matches))[P]){for(r=++s;r<i&&!y.relative[e[r].type];r++);return g(s>1&&p(h),s>1&&c(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ae,"$1"),n,s<r&&m(e.slice(s,r)),r<i&&m(e=e.slice(r)),r<i&&c(e))}h.push(n)}return p(h)}function v(e,n){var i=n.length>0,a=e.length>0,o=function(r,o,s,l,u){var c,f,p,h=0,g="0",m=r&&[],v=[],w=S,b=r||a&&y.find.TAG("*",u),_=z+=null==w?1:Math.random()||.1,x=b.length;for(u&&(S=o===M||o||u);g!==x&&null!=(c=b[g]);g++){if(a&&c){for(f=0,o||c.ownerDocument===M||(R(c),s=!j);p=e[f++];)if(p(c,o||M,s)){l.push(c);break}u&&(z=_)}i&&((c=!p&&c)&&h--,r&&m.push(c))}if(h+=g,i&&g!==h){for(f=0;p=n[f++];)p(m,v,o,s);if(r){if(h>0)for(;g--;)m[g]||v[g]||(v[g]=Y.call(l));v=d(v)}$.apply(l,v),u&&!r&&v.length>0&&h+n.length>1&&t.uniqueSort(l)}return u&&(z=_,S=w),m};return i?r(o):o}var w,b,y,_,x,k,E,T,S,A,C,R,M,L,j,I,D,B,N,P="sizzle"+1*new Date,O=e.document,z=0,F=0,U=n(),q=n(),H=n(),V=function(e,t){return e===t&&(C=!0),0},W=1<<31,G={}.hasOwnProperty,Z=[],Y=Z.pop,X=Z.push,$=Z.push,Q=Z.slice,J=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ee="[\\x20\\t\\r\\n\\f]",te="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ne="\\["+ee+"*("+te+")(?:"+ee+"*([*^$|!~]?=)"+ee+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+te+"))|)"+ee+"*\\]",re=":("+te+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ne+")*)|.*)\\)|)",ie=new RegExp(ee+"+","g"),ae=new RegExp("^"+ee+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ee+"+$","g"),oe=new RegExp("^"+ee+"*,"+ee+"*"),se=new RegExp("^"+ee+"*([>+~]|"+ee+")"+ee+"*"),le=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),ue=new RegExp(re),ce=new RegExp("^"+te+"$"),fe={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,he=/^h\d$/i,de=/^[^{]+\{\s*\[native \w/,ge=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,me=/[+~]/,ve=/'|\\/g,we=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),be=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},ye=function(){R()};try{$.apply(Z=Q.call(O.childNodes),O.childNodes),Z[O.childNodes.length].nodeType}catch(e){$={apply:Z.length?function(e,t){X.apply(e,Q.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}b=t.support={},x=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},R=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:O;return r!==M&&9===r.nodeType&&r.documentElement?(M=r,L=M.documentElement,j=!x(M),(n=M.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",ye,!1):n.attachEvent&&n.attachEvent("onunload",ye)),b.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByTagName=i(function(e){return e.appendChild(M.createComment("")),!e.getElementsByTagName("*").length}),b.getElementsByClassName=de.test(M.getElementsByClassName),b.getById=i(function(e){return L.appendChild(e).id=P,!M.getElementsByName||!M.getElementsByName(P).length}),b.getById?(y.find.ID=function(e,t){if(void 0!==t.getElementById&&j){var n=t.getElementById(e);return n?[n]:[]}},y.filter.ID=function(e){var t=e.replace(we,be);return function(e){return e.getAttribute("id")===t}}):(delete y.find.ID,y.filter.ID=function(e){var t=e.replace(we,be);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),y.find.TAG=b.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):b.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,a=t.getElementsByTagName(e);if("*"===e){for(;n=a[i++];)1===n.nodeType&&r.push(n);return r}return a},y.find.CLASS=b.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&j)return t.getElementsByClassName(e)},D=[],I=[],(b.qsa=de.test(M.querySelectorAll))&&(i(function(e){L.appendChild(e).innerHTML="<a id='"+P+"'></a><select id='"+P+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&I.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||I.push("\\["+ee+"*(?:value|"+K+")"),e.querySelectorAll("[id~="+P+"-]").length||I.push("~="),e.querySelectorAll(":checked").length||I.push(":checked"),e.querySelectorAll("a#"+P+"+*").length||I.push(".#.+[+~]")}),i(function(e){var t=M.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&I.push("name"+ee+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||I.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),I.push(",.*:")})),(b.matchesSelector=de.test(B=L.matches||L.webkitMatchesSelector||L.mozMatchesSelector||L.oMatchesSelector||L.msMatchesSelector))&&i(function(e){b.disconnectedMatch=B.call(e,"div"),B.call(e,"[s!='']:x"),D.push("!=",re)}),I=I.length&&new RegExp(I.join("|")),D=D.length&&new RegExp(D.join("|")),t=de.test(L.compareDocumentPosition),N=t||de.test(L.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},V=t?function(e,t){if(e===t)return C=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!b.sortDetached&&t.compareDocumentPosition(e)===n?e===M||e.ownerDocument===O&&N(O,e)?-1:t===M||t.ownerDocument===O&&N(O,t)?1:A?J(A,e)-J(A,t):0:4&n?-1:1)}:function(e,t){if(e===t)return C=!0,0;var n,r=0,i=e.parentNode,a=t.parentNode,s=[e],l=[t];if(!i||!a)return e===M?-1:t===M?1:i?-1:a?1:A?J(A,e)-J(A,t):0;if(i===a)return o(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;s[r]===l[r];)r++;return r?o(s[r],l[r]):s[r]===O?-1:l[r]===O?1:0},M):M},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==M&&R(e),n=n.replace(le,"='$1']"),b.matchesSelector&&j&&!H[n+" "]&&(!D||!D.test(n))&&(!I||!I.test(n)))try{var r=B.call(e,n);if(r||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,M,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==M&&R(e),N(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==M&&R(e);var n=y.attrHandle[t.toLowerCase()],r=n&&G.call(y.attrHandle,t.toLowerCase())?n(e,t,!j):void 0;return void 0!==r?r:b.attributes||!j?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(C=!b.detectDuplicates,A=!b.sortStable&&e.slice(0),e.sort(V),C){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return A=null,e},_=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=_(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=_(t);return n},(y=t.selectors={cacheLength:50,createPseudo:r,match:fe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(we,be),e[3]=(e[3]||e[4]||e[5]||"").replace(we,be),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ue.test(n)&&(t=k(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(we,be).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=U[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&U(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var a=t.attr(i,e);return null==a?"!="===n:!n||(a+="","="===n?a===r:"!="===n?a!==r:"^="===n?r&&0===a.indexOf(r):"*="===n?r&&a.indexOf(r)>-1:"$="===n?r&&a.slice(-r.length)===r:"~="===n?(" "+a.replace(ie," ")+" ").indexOf(r)>-1:"|="===n&&(a===r||a.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var a="nth"!==e.slice(0,3),o="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,f,p,h,d,g=a!==o?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),w=!l&&!s,b=!1;if(m){if(a){for(;g;){for(p=t;p=p[g];)if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;d=g="only"===e&&!d&&"nextSibling"}return!0}if(d=[o?m.firstChild:m.lastChild],o&&w){for(b=(h=(u=(c=(f=(p=m)[P]||(p[P]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===z&&u[1])&&u[2],p=h&&m.childNodes[h];p=++h&&p&&p[g]||(b=h=0)||d.pop();)if(1===p.nodeType&&++b&&p===t){c[e]=[z,h,b];break}}else if(w&&(b=h=(u=(c=(f=(p=t)[P]||(p[P]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===z&&u[1]),!1===b)for(;(p=++h&&p&&p[g]||(b=h=0)||d.pop())&&((s?p.nodeName.toLowerCase()!==v:1!==p.nodeType)||!++b||(w&&((c=(f=p[P]||(p[P]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[z,b]),p!==t)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,n){var i,a=y.pseudos[e]||y.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return a[P]?a(n):a.length>1?(i=[e,e,"",n],y.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=a(e,n),o=i.length;o--;)e[r=J(e,i[o])]=!(t[r]=i[o])}):function(e){return a(e,0,i)}):a}},pseudos:{not:r(function(e){var t=[],n=[],i=E(e.replace(ae,"$1"));return i[P]?r(function(e,t,n,r){for(var a,o=i(e,null,r,[]),s=e.length;s--;)(a=o[s])&&(e[s]=!(t[s]=a))}):function(e,r,a){return t[0]=e,i(t,null,a,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(we,be),function(t){return(t.textContent||t.innerText||_(t)).indexOf(e)>-1}}),lang:r(function(e){return ce.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(we,be).toLowerCase(),function(t){var n;do{if(n=j?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===L},focus:function(e){return e===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!y.pseudos.empty(e)},header:function(e){return he.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:s(function(){return[0]}),last:s(function(e,t){return[t-1]}),eq:s(function(e,t,n){return[n<0?n+t:n]}),even:s(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:s(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:s(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:s(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=y.pseudos.eq;for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})y.pseudos[w]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}(w);for(w in{submit:!0,reset:!0})y.pseudos[w]=function(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}(w);return u.prototype=y.filters=y.pseudos,y.setFilters=new u,k=t.tokenize=function(e,n){var r,i,a,o,s,l,u,c=q[e+" "];if(c)return n?0:c.slice(0);for(s=e,l=[],u=y.preFilter;s;){r&&!(i=oe.exec(s))||(i&&(s=s.slice(i[0].length)||s),l.push(a=[])),r=!1,(i=se.exec(s))&&(r=i.shift(),a.push({value:r,type:i[0].replace(ae," ")}),s=s.slice(r.length));for(o in y.filter)!(i=fe[o].exec(s))||u[o]&&!(i=u[o](i))||(r=i.shift(),a.push({value:r,type:o,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):q(e,l).slice(0)},E=t.compile=function(e,t){var n,r=[],i=[],a=H[e+" "];if(!a){for(t||(t=k(e)),n=t.length;n--;)(a=m(t[n]))[P]?r.push(a):i.push(a);(a=H(e,v(i,r))).selector=e}return a},T=t.select=function(e,t,n,r){var i,a,o,s,u,f="function"==typeof e&&e,p=!r&&k(e=f.selector||e);if(n=n||[],1===p.length){if((a=p[0]=p[0].slice(0)).length>2&&"ID"===(o=a[0]).type&&b.getById&&9===t.nodeType&&j&&y.relative[a[1].type]){if(!(t=(y.find.ID(o.matches[0].replace(we,be),t)||[])[0]))return n;f&&(t=t.parentNode),e=e.slice(a.shift().value.length)}for(i=fe.needsContext.test(e)?0:a.length;i--&&(o=a[i],!y.relative[s=o.type]);)if((u=y.find[s])&&(r=u(o.matches[0].replace(we,be),me.test(a[0].type)&&l(t.parentNode)||t))){if(a.splice(i,1),!(e=r.length&&c(a)))return $.apply(n,r),n;break}}return(f||E(e,p))(r,t,!j,n,!t||me.test(e)&&l(t.parentNode)||t),n},b.sortStable=P.split("").sort(V).join("")===P,b.detectDuplicates=!!C,R(),b.sortDetached=i(function(e){return 1&e.compareDocumentPosition(M.createElement("div"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||a("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),b.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||a("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||a(K,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);re.find=le,re.expr=le.selectors,re.expr[":"]=re.expr.pseudos,re.uniqueSort=re.unique=le.uniqueSort,re.text=le.getText,re.isXMLDoc=le.isXML,re.contains=le.contains;var ue=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&re(e).is(n))break;r.push(e)}return r},ce=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},fe=re.expr.match.needsContext,pe=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,he=/^.[^:#\[\.,]*$/;re.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?re.find.matchesSelector(r,e)?[r]:[]:re.find.matches(e,re.grep(t,function(e){return 1===e.nodeType}))},re.fn.extend({find:function(e){var t,n=this.length,r=[],i=this;if("string"!=typeof e)return this.pushStack(re(e).filter(function(){for(t=0;t<n;t++)if(re.contains(i[t],this))return!0}));for(t=0;t<n;t++)re.find(e,i[t],r);return r=this.pushStack(n>1?re.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&fe.test(e)?re(e):e||[],!1).length}});var de,ge=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(re.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||de,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ge.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof re?t[0]:t,re.merge(this,re.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:Y,!0)),pe.test(r[1])&&re.isPlainObject(t))for(r in t)re.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=Y.getElementById(r[2]))&&i.parentNode&&(this.length=1,this[0]=i),this.context=Y,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):re.isFunction(e)?void 0!==n.ready?n.ready(e):e(re):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),re.makeArray(e,this))}).prototype=re.fn,de=re(Y);var me=/^(?:parents|prev(?:Until|All))/,ve={children:!0,contents:!0,next:!0,prev:!0};re.fn.extend({has:function(e){var t=re(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(re.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,r=0,i=this.length,a=[],o=fe.test(e)||"string"!=typeof e?re(e,t||this.context):0;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(o?o.index(n)>-1:1===n.nodeType&&re.find.matchesSelector(n,e))){a.push(n);break}return this.pushStack(a.length>1?re.uniqueSort(a):a)},index:function(e){return e?"string"==typeof e?J.call(re(e),this[0]):J.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(re.uniqueSort(re.merge(this.get(),re(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),re.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ue(e,"parentNode")},parentsUntil:function(e,t,n){return ue(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return ue(e,"nextSibling")},prevAll:function(e){return ue(e,"previousSibling")},nextUntil:function(e,t,n){return ue(e,"nextSibling",n)},prevUntil:function(e,t,n){return ue(e,"previousSibling",n)},siblings:function(e){return ce((e.parentNode||{}).firstChild,e)},children:function(e){return ce(e.firstChild)},contents:function(e){return e.contentDocument||re.merge([],e.childNodes)}},function(e,t){re.fn[e]=function(n,r){var i=re.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=re.filter(r,i)),this.length>1&&(ve[e]||re.uniqueSort(i),me.test(e)&&i.reverse()),this.pushStack(i)}});var we=/\S+/g;re.Callbacks=function(e){e="string"==typeof e?a(e):re.extend({},e);var t,n,r,i,o=[],s=[],l=-1,u=function(){for(i=e.once,r=t=!0;s.length;l=-1)for(n=s.shift();++l<o.length;)!1===o[l].apply(n[0],n[1])&&e.stopOnFalse&&(l=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},c={add:function(){return o&&(n&&!t&&(l=o.length-1,s.push(n)),function t(n){re.each(n,function(n,r){re.isFunction(r)?e.unique&&c.has(r)||o.push(r):r&&r.length&&"string"!==re.type(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return re.each(arguments,function(e,t){for(var n;(n=re.inArray(t,o,n))>-1;)o.splice(n,1),n<=l&&l--}),this},has:function(e){return e?re.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=s=[],n||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],s.push(n),t||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},re.extend({Deferred:function(e){var t=[["resolve","done",re.Callbacks("once memory"),"resolved"],["reject","fail",re.Callbacks("once memory"),"rejected"],["notify","progress",re.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return re.Deferred(function(n){re.each(t,function(t,a){var o=re.isFunction(e[t])&&e[t];i[a[1]](function(){var e=o&&o.apply(this,arguments);e&&re.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[a[0]+"With"](this===r?n.promise():this,o?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?re.extend(e,r):r}},i={};return r.pipe=r.then,re.each(t,function(e,a){var o=a[2],s=a[3];r[a[1]]=o.add,s&&o.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[a[0]]=function(){return i[a[0]+"With"](this===i?r:this,arguments),this},i[a[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,a=X.call(arguments),o=a.length,s=1!==o||e&&re.isFunction(e.promise)?o:0,l=1===s?e:re.Deferred(),u=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?X.call(arguments):i,r===t?l.notifyWith(n,r):--s||l.resolveWith(n,r)}};if(o>1)for(t=new Array(o),n=new Array(o),r=new Array(o);i<o;i++)a[i]&&re.isFunction(a[i].promise)?a[i].promise().progress(u(i,n,t)).done(u(i,r,a)).fail(l.reject):--s;return s||l.resolveWith(r,a),l.promise()}});var be;re.fn.ready=function(e){return re.ready.promise().done(e),this},re.extend({isReady:!1,readyWait:1,holdReady:function(e){e?re.readyWait++:re.ready(!0)},ready:function(e){(!0===e?--re.readyWait:re.isReady)||(re.isReady=!0,!0!==e&&--re.readyWait>0||(be.resolveWith(Y,[re]),re.fn.triggerHandler&&(re(Y).triggerHandler("ready"),re(Y).off("ready"))))}}),re.ready.promise=function(t){return be||(be=re.Deferred(),"complete"===Y.readyState||"loading"!==Y.readyState&&!Y.documentElement.doScroll?e.setTimeout(re.ready):(Y.addEventListener("DOMContentLoaded",o),e.addEventListener("load",o))),be.promise(t)},re.ready.promise();var ye=function(e,t,n,r,i,a,o){var s=0,l=e.length,u=null==n;if("object"===re.type(n)){i=!0;for(s in n)ye(e,t,s,n[s],!0,a,o)}else if(void 0!==r&&(i=!0,re.isFunction(r)||(o=!0),u&&(o?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(re(e),n)})),t))for(;s<l;s++)t(e[s],n,o?r:r.call(e[s],s,t(e[s],n)));return i?e:u?t.call(e):l?t(e[0],n):a},_e=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};s.uid=1,s.prototype={register:function(e,t){var n=t||{};return e.nodeType?e[this.expando]=n:Object.defineProperty(e,this.expando,{value:n,writable:!0,configurable:!0}),e[this.expando]},cache:function(e){if(!_e(e))return{};var t=e[this.expando];return t||(t={},_e(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[t]=n;else for(r in t)i[r]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][t]},access:function(e,t,n){var r;return void 0===t||t&&"string"==typeof t&&void 0===n?void 0!==(r=this.get(e,t))?r:this.get(e,re.camelCase(t)):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r,i,a=e[this.expando];if(void 0!==a){if(void 0===t)this.register(e);else{re.isArray(t)?r=t.concat(t.map(re.camelCase)):(i=re.camelCase(t),r=t in a?[t,i]:(r=i)in a?[r]:r.match(we)||[]),n=r.length;for(;n--;)delete a[r[n]]}(void 0===t||re.isEmptyObject(a))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!re.isEmptyObject(t)}};var xe=new s,ke=new s,Ee=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Te=/[A-Z]/g;re.extend({hasData:function(e){return ke.hasData(e)||xe.hasData(e)},data:function(e,t,n){return ke.access(e,t,n)},removeData:function(e,t){ke.remove(e,t)},_data:function(e,t,n){return xe.access(e,t,n)},_removeData:function(e,t){xe.remove(e,t)}}),re.fn.extend({data:function(e,t){var n,r,i,a=this[0],o=a&&a.attributes;if(void 0===e){if(this.length&&(i=ke.get(a),1===a.nodeType&&!xe.get(a,"hasDataAttrs"))){for(n=o.length;n--;)o[n]&&0===(r=o[n].name).indexOf("data-")&&(r=re.camelCase(r.slice(5)),l(a,r,i[r]));xe.set(a,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){ke.set(this,e)}):ye(this,function(t){var n,r;if(a&&void 0===t){if(void 0!==(n=ke.get(a,e)||ke.get(a,e.replace(Te,"-$&").toLowerCase())))return n;if(r=re.camelCase(e),void 0!==(n=ke.get(a,r)))return n;if(void 0!==(n=l(a,r,void 0)))return n}else r=re.camelCase(e),this.each(function(){var n=ke.get(this,r);ke.set(this,r,t),e.indexOf("-")>-1&&void 0!==n&&ke.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){ke.remove(this,e)})}}),re.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=xe.get(e,t),n&&(!r||re.isArray(n)?r=xe.access(e,t,re.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=re.queue(e,t),r=n.length,i=n.shift(),a=re._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete a.stop,i.call(e,function(){re.dequeue(e,t)},a)),!r&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return xe.get(e,n)||xe.access(e,n,{empty:re.Callbacks("once memory").add(function(){xe.remove(e,[t+"queue",n])})})}}),re.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?re.queue(this[0],e):void 0===t?this:this.each(function(){var n=re.queue(this,e,t);re._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&re.dequeue(this,e)})},dequeue:function(e){return this.each(function(){re.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=re.Deferred(),a=this,o=this.length,s=function(){--r||i.resolveWith(a,[a])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";o--;)(n=xe.get(a[o],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var Se=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ae=new RegExp("^(?:([+-])=|)("+Se+")([a-z%]*)$","i"),Ce=["Top","Right","Bottom","Left"],Re=function(e,t){return e=t||e,"none"===re.css(e,"display")||!re.contains(e.ownerDocument,e)},Me=/^(?:checkbox|radio)$/i,Le=/<([\w:-]+)/,je=/^$|\/(?:java|ecma)script/i,Ie={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ie.optgroup=Ie.option,Ie.tbody=Ie.tfoot=Ie.colgroup=Ie.caption=Ie.thead,Ie.th=Ie.td;var De=/<|&#?\w+;/;!function(){var e=Y.createDocumentFragment().appendChild(Y.createElement("div")),t=Y.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),ne.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",ne.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var Be=/^key/,Ne=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Pe=/^([^.]*)(?:\.(.+)|)/;re.event={global:{},add:function(e,t,n,r,i){var a,o,s,l,u,c,f,p,h,d,g,m=xe.get(e);if(m)for(n.handler&&(n=(a=n).handler,i=a.selector),n.guid||(n.guid=re.guid++),(l=m.events)||(l=m.events={}),(o=m.handle)||(o=m.handle=function(t){return void 0!==re&&re.event.triggered!==t.type?re.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(we)||[""]).length;u--;)h=g=(s=Pe.exec(t[u])||[])[1],d=(s[2]||"").split(".").sort(),h&&(f=re.event.special[h]||{},h=(i?f.delegateType:f.bindType)||h,f=re.event.special[h]||{},c=re.extend({type:h,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&re.expr.match.needsContext.test(i),namespace:d.join(".")},a),(p=l[h])||((p=l[h]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,d,o)||e.addEventListener&&e.addEventListener(h,o)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),re.event.global[h]=!0)},remove:function(e,t,n,r,i){var a,o,s,l,u,c,f,p,h,d,g,m=xe.hasData(e)&&xe.get(e);if(m&&(l=m.events)){for(u=(t=(t||"").match(we)||[""]).length;u--;)if(s=Pe.exec(t[u])||[],h=g=s[1],d=(s[2]||"").split(".").sort(),h){for(f=re.event.special[h]||{},p=l[h=(r?f.delegateType:f.bindType)||h]||[],s=s[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=a=p.length;a--;)c=p[a],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(a,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));o&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,d,m.handle)||re.removeEvent(e,h,m.handle),delete l[h])}else for(h in l)re.event.remove(e,h+t[u],n,r,!0);re.isEmptyObject(l)&&xe.remove(e,"handle events")}},dispatch:function(e){e=re.event.fix(e);var t,n,r,i,a,o=[],s=X.call(arguments),l=(xe.get(this,"events")||{})[e.type]||[],u=re.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,e)){for(o=re.event.handlers.call(this,e,l),t=0;(i=o[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(a=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(a.namespace)||(e.handleObj=a,e.data=a.data,void 0!==(r=((re.event.special[a.origType]||{}).handle||a.handler).apply(i.elem,s))&&!1===(e.result=r)&&(e.preventDefault(),e.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,a,o=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==e.type)){for(r=[],n=0;n<s;n++)void 0===r[i=(a=t[n]).selector+" "]&&(r[i]=a.needsContext?re(i,this).index(l)>-1:re.find(i,this,null,[l]).length),r[i]&&r.push(a);r.length&&o.push({elem:l,handlers:r})}return s<t.length&&o.push({elem:this,handlers:t.slice(s)}),o},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,a=t.button;return null==e.pageX&&null!=t.clientX&&(r=(n=e.target.ownerDocument||Y).documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||void 0===a||(e.which=1&a?1:2&a?3:4&a?2:0),e}},fix:function(e){if(e[re.expando])return e;var t,n,r,i=e.type,a=e,o=this.fixHooks[i];for(o||(this.fixHooks[i]=o=Ne.test(i)?this.mouseHooks:Be.test(i)?this.keyHooks:{}),r=o.props?this.props.concat(o.props):this.props,e=new re.Event(a),t=r.length;t--;)e[n=r[t]]=a[n];return e.target||(e.target=Y),3===e.target.nodeType&&(e.target=e.target.parentNode),o.filter?o.filter(e,a):e},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==g()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===g()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&re.nodeName(this,"input"))return this.click(),!1},_default:function(e){return re.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},re.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},re.Event=function(e,t){if(!(this instanceof re.Event))return new re.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?h:d):this.type=e,t&&re.extend(this,t),this.timeStamp=e&&e.timeStamp||re.now(),this[re.expando]=!0},re.Event.prototype={constructor:re.Event,isDefaultPrevented:d,isPropagationStopped:d,isImmediatePropagationStopped:d,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=h,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=h,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=h,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},re.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){re.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,a=e.handleObj;return i&&(i===r||re.contains(r,i))||(e.type=a.origType,n=a.handler.apply(this,arguments),e.type=t),n}}}),re.fn.extend({on:function(e,t,n,r){return m(this,e,t,n,r)},one:function(e,t,n,r){return m(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,re(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=d),this.each(function(){re.event.remove(this,e,n,t)})}});var Oe=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ze=/<script|<style|<link/i,Fe=/checked\s*(?:[^=]|=\s*.checked.)/i,Ue=/^true\/(.*)/,qe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;re.extend({htmlPrefilter:function(e){return e.replace(Oe,"<$1></$2>")},clone:function(e,t,n){var r,i,a,o,s=e.cloneNode(!0),l=re.contains(e.ownerDocument,e);if(!(ne.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||re.isXMLDoc(e)))for(o=c(s),r=0,i=(a=c(e)).length;r<i;r++)_(a[r],o[r]);if(t)if(n)for(a=a||c(e),o=o||c(s),r=0,i=a.length;r<i;r++)y(a[r],o[r]);else y(e,s);return(o=c(s,"script")).length>0&&f(o,!l&&c(e,"script")),s},cleanData:function(e){for(var t,n,r,i=re.event.special,a=0;void 0!==(n=e[a]);a++)if(_e(n)){if(t=n[xe.expando]){if(t.events)for(r in t.events)i[r]?re.event.remove(n,r):re.removeEvent(n,r,t.handle);n[xe.expando]=void 0}n[ke.expando]&&(n[ke.expando]=void 0)}}}),re.fn.extend({domManip:x,detach:function(e){return k(this,e,!0)},remove:function(e){return k(this,e)},text:function(e){return ye(this,function(e){return void 0===e?re.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return x(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||v(this,e).appendChild(e)})},prepend:function(){return x(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=v(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return x(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return x(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(re.cleanData(c(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return re.clone(this,e,t)})},html:function(e){return ye(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ze.test(e)&&!Ie[(Le.exec(e)||["",""])[1].toLowerCase()]){e=re.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(re.cleanData(c(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return x(this,arguments,function(t){var n=this.parentNode;re.inArray(this,e)<0&&(re.cleanData(c(this)),n&&n.replaceChild(t,this))},e)}}),re.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){re.fn[e]=function(e){for(var n,r=[],i=re(e),a=i.length-1,o=0;o<=a;o++)n=o===a?this:this.clone(!0),re(i[o])[t](n),Q.apply(r,n.get());return this.pushStack(r)}});var He,Ve={HTML:"block",BODY:"block"},We=/^margin/,Ge=new RegExp("^("+Se+")(?!px)[a-z%]+$","i"),Ze=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Ye=function(e,t,n,r){var i,a,o={};for(a in t)o[a]=e.style[a],e.style[a]=t[a];i=n.apply(e,r||[]);for(a in t)e.style[a]=o[a];return i},Xe=Y.documentElement;!function(){function t(){s.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",Xe.appendChild(o);var t=e.getComputedStyle(s);n="1%"!==t.top,a="2px"===t.marginLeft,r="4px"===t.width,s.style.marginRight="50%",i="4px"===t.marginRight,Xe.removeChild(o)}var n,r,i,a,o=Y.createElement("div"),s=Y.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",ne.clearCloneStyle="content-box"===s.style.backgroundClip,o.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",o.appendChild(s),re.extend(ne,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return null==r&&t(),r},pixelMarginRight:function(){return null==r&&t(),i},reliableMarginLeft:function(){return null==r&&t(),a},reliableMarginRight:function(){var t,n=s.appendChild(Y.createElement("div"));return n.style.cssText=s.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",n.style.marginRight=n.style.width="0",s.style.width="1px",Xe.appendChild(o),t=!parseFloat(e.getComputedStyle(n).marginRight),Xe.removeChild(o),s.removeChild(n),t}}))}();var $e=/^(none|table(?!-c[ea]).+)/,Qe={position:"absolute",visibility:"hidden",display:"block"},Je={letterSpacing:"0",fontWeight:"400"},Ke=["Webkit","O","Moz","ms"],et=Y.createElement("div").style;re.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=S(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,a,o,s=re.camelCase(t),l=e.style;if(t=re.cssProps[s]||(re.cssProps[s]=C(s)||s),o=re.cssHooks[t]||re.cssHooks[s],void 0===n)return o&&"get"in o&&void 0!==(i=o.get(e,!1,r))?i:l[t];"string"==(a=typeof n)&&(i=Ae.exec(n))&&i[1]&&(n=u(e,t,i),a="number"),null!=n&&n===n&&("number"===a&&(n+=i&&i[3]||(re.cssNumber[s]?"":"px")),ne.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),o&&"set"in o&&void 0===(n=o.set(e,n,r))||(l[t]=n))}},css:function(e,t,n,r){var i,a,o,s=re.camelCase(t);return t=re.cssProps[s]||(re.cssProps[s]=C(s)||s),(o=re.cssHooks[t]||re.cssHooks[s])&&"get"in o&&(i=o.get(e,!0,n)),void 0===i&&(i=S(e,t,r)),"normal"===i&&t in Je&&(i=Je[t]),""===n||n?(a=parseFloat(i),!0===n||isFinite(a)?a||0:i):i}}),re.each(["height","width"],function(e,t){re.cssHooks[t]={get:function(e,n,r){if(n)return $e.test(re.css(e,"display"))&&0===e.offsetWidth?Ye(e,Qe,function(){return L(e,t,r)}):L(e,t,r)},set:function(e,n,r){var i,a=r&&Ze(e),o=r&&M(e,t,r,"border-box"===re.css(e,"boxSizing",!1,a),a);return o&&(i=Ae.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=re.css(e,t)),R(0,n,o)}}}),re.cssHooks.marginLeft=A(ne.reliableMarginLeft,function(e,t){if(t)return(parseFloat(S(e,"marginLeft"))||e.getBoundingClientRect().left-Ye(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),re.cssHooks.marginRight=A(ne.reliableMarginRight,function(e,t){if(t)return Ye(e,{display:"inline-block"},S,[e,"marginRight"])}),re.each({margin:"",padding:"",border:"Width"},function(e,t){re.cssHooks[e+t]={expand:function(n){for(var r=0,i={},a="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Ce[r]+t]=a[r]||a[r-2]||a[0];return i}},We.test(e)||(re.cssHooks[e+t].set=R)}),re.fn.extend({css:function(e,t){return ye(this,function(e,t,n){var r,i,a={},o=0;if(re.isArray(t)){for(r=Ze(e),i=t.length;o<i;o++)a[t[o]]=re.css(e,t[o],!1,r);return a}return void 0!==n?re.style(e,t,n):re.css(e,t)},e,t,arguments.length>1)},show:function(){return j(this,!0)},hide:function(){return j(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Re(this)?re(this).show():re(this).hide()})}}),re.Tween=I,I.prototype={constructor:I,init:function(e,t,n,r,i,a){this.elem=e,this.prop=n,this.easing=i||re.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=a||(re.cssNumber[n]?"":"px")},cur:function(){var e=I.propHooks[this.prop];return e&&e.get?e.get(this):I.propHooks._default.get(this)},run:function(e){var t,n=I.propHooks[this.prop];return this.options.duration?this.pos=t=re.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):I.propHooks._default.set(this),this}},I.prototype.init.prototype=I.prototype,I.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=re.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){re.fx.step[e.prop]?re.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[re.cssProps[e.prop]]&&!re.cssHooks[e.prop]?e.elem[e.prop]=e.now:re.style(e.elem,e.prop,e.now+e.unit)}}},I.propHooks.scrollTop=I.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},re.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},re.fx=I.prototype.init,re.fx.step={};var tt,nt,rt=/^(?:toggle|show|hide)$/,it=/queueHooks$/;re.Animation=re.extend(O,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return u(n.elem,e,Ae.exec(t),n),n}]},tweener:function(e,t){re.isFunction(e)?(t=e,e=["*"]):e=e.match(we);for(var n,r=0,i=e.length;r<i;r++)n=e[r],O.tweeners[n]=O.tweeners[n]||[],O.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,a,o,s,l,u,c=this,f={},p=e.style,h=e.nodeType&&Re(e),d=xe.get(e,"fxshow");n.queue||(null==(s=re._queueHooks(e,"fx")).unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,c.always(function(){c.always(function(){s.unqueued--,re.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===("none"===(u=re.css(e,"display"))?xe.get(e,"olddisplay")||T(e.nodeName):u)&&"none"===re.css(e,"float")&&(p.display="inline-block")),n.overflow&&(p.overflow="hidden",c.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],rt.exec(i)){if(delete t[r],a=a||"toggle"===i,i===(h?"hide":"show")){if("show"!==i||!d||void 0===d[r])continue;h=!0}f[r]=d&&d[r]||re.style(e,r)}else u=void 0;if(re.isEmptyObject(f))"inline"===("none"===u?T(e.nodeName):u)&&(p.display=u);else{d?"hidden"in d&&(h=d.hidden):d=xe.access(e,"fxshow",{}),a&&(d.hidden=!h),h?re(e).show():c.done(function(){re(e).hide()}),c.done(function(){var t;xe.remove(e,"fxshow");for(t in f)re.style(e,t,f[t])});for(r in f)o=N(h?d[r]:0,r,c),r in d||(d[r]=o.start,h&&(o.end=o.start,o.start="width"===r||"height"===r?1:0))}}],prefilter:function(e,t){t?O.prefilters.unshift(e):O.prefilters.push(e)}}),re.speed=function(e,t,n){var r=e&&"object"==typeof e?re.extend({},e):{complete:n||!n&&t||re.isFunction(e)&&e,duration:e,easing:n&&t||t&&!re.isFunction(t)&&t};return r.duration=re.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in re.fx.speeds?re.fx.speeds[r.duration]:re.fx.speeds._default,null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){re.isFunction(r.old)&&r.old.call(this),r.queue&&re.dequeue(this,r.queue)},r},re.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Re).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=re.isEmptyObject(e),a=re.speed(t,n,r),o=function(){var t=O(this,re.extend({},e),a);(i||xe.get(this,"finish"))&&t.stop(!0)};return o.finish=o,i||!1===a.queue?this.each(o):this.queue(a.queue,o)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",a=re.timers,o=xe.get(this);if(i)o[i]&&o[i].stop&&r(o[i]);else for(i in o)o[i]&&o[i].stop&&it.test(i)&&r(o[i]);for(i=a.length;i--;)a[i].elem!==this||null!=e&&a[i].queue!==e||(a[i].anim.stop(n),t=!1,a.splice(i,1));!t&&n||re.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=xe.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],a=re.timers,o=r?r.length:0;for(n.finish=!0,re.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=a.length;t--;)a[t].elem===this&&a[t].queue===e&&(a[t].anim.stop(!0),a.splice(t,1));for(t=0;t<o;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),re.each(["toggle","show","hide"],function(e,t){var n=re.fn[t];re.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(B(t,!0),e,r,i)}}),re.each({slideDown:B("show"),slideUp:B("hide"),slideToggle:B("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){re.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),re.timers=[],re.fx.tick=function(){var e,t=0,n=re.timers;for(tt=re.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||re.fx.stop(),tt=void 0},re.fx.timer=function(e){re.timers.push(e),e()?re.fx.start():re.timers.pop()},re.fx.interval=13,re.fx.start=function(){nt||(nt=e.setInterval(re.fx.tick,re.fx.interval))},re.fx.stop=function(){e.clearInterval(nt),nt=null},re.fx.speeds={slow:600,fast:200,_default:400},re.fn.delay=function(t,n){return t=re.fx?re.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},function(){var e=Y.createElement("input"),t=Y.createElement("select"),n=t.appendChild(Y.createElement("option"));e.type="checkbox",ne.checkOn=""!==e.value,ne.optSelected=n.selected,t.disabled=!0,ne.optDisabled=!n.disabled,(e=Y.createElement("input")).value="t",e.type="radio",ne.radioValue="t"===e.value}();var at,ot=re.expr.attrHandle;re.fn.extend({attr:function(e,t){return ye(this,re.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){re.removeAttr(this,e)})}}),re.extend({attr:function(e,t,n){var r,i,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return void 0===e.getAttribute?re.prop(e,t,n):(1===a&&re.isXMLDoc(e)||(t=t.toLowerCase(),i=re.attrHooks[t]||(re.expr.match.bool.test(t)?at:void 0)),void 0!==n?null===n?void re.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=re.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!ne.radioValue&&"radio"===t&&re.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,a=t&&t.match(we);if(a&&1===e.nodeType)for(;n=a[i++];)r=re.propFix[n]||n,re.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)}}),at={set:function(e,t,n){return!1===t?re.removeAttr(e,n):e.setAttribute(n,n),n}},re.each(re.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ot[t]||re.find.attr;ot[t]=function(e,t,r){var i,a;return r||(a=ot[t],ot[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,ot[t]=a),i}});var st=/^(?:input|select|textarea|button)$/i,lt=/^(?:a|area)$/i;re.fn.extend({prop:function(e,t){return ye(this,re.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[re.propFix[e]||e]})}}),re.extend({prop:function(e,t,n){var r,i,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&re.isXMLDoc(e)||(t=re.propFix[t]||t,i=re.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=re.find.attr(e,"tabindex");return t?parseInt(t,10):st.test(e.nodeName)||lt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),ne.optSelected||(re.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),re.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){re.propFix[this.toLowerCase()]=this});var ut=/[\t\r\n\f]/g;re.fn.extend({addClass:function(e){var t,n,r,i,a,o,s,l=0;if(re.isFunction(e))return this.each(function(t){re(this).addClass(e.call(this,t,z(this)))});if("string"==typeof e&&e)for(t=e.match(we)||[];n=this[l++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(ut," ")){for(o=0;a=t[o++];)r.indexOf(" "+a+" ")<0&&(r+=a+" ");i!==(s=re.trim(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,a,o,s,l=0;if(re.isFunction(e))return this.each(function(t){re(this).removeClass(e.call(this,t,z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(we)||[];n=this[l++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(ut," ")){for(o=0;a=t[o++];)for(;r.indexOf(" "+a+" ")>-1;)r=r.replace(" "+a+" "," ");i!==(s=re.trim(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):re.isFunction(e)?this.each(function(n){re(this).toggleClass(e.call(this,n,z(this),t),t)}):this.each(function(){var t,r,i,a;if("string"===n)for(r=0,i=re(this),a=e.match(we)||[];t=a[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||((t=z(this))&&xe.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":xe.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+z(n)+" ").replace(ut," ").indexOf(t)>-1)return!0;return!1}});var ct=/\r/g,ft=/[\x20\t\r\n\f]+/g;re.fn.extend({val:function(e){var t,n,r,i=this[0];if(arguments.length)return r=re.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,re(this).val()):e)?i="":"number"==typeof i?i+="":re.isArray(i)&&(i=re.map(i,function(e){return null==e?"":e+""})),(t=re.valHooks[this.type]||re.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=re.valHooks[i.type]||re.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(ct,""):null==n?"":n}}),re.extend({valHooks:{option:{get:function(e){var t=re.find.attr(e,"value");return null!=t?t:re.trim(re.text(e)).replace(ft," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,a="select-one"===e.type||i<0,o=a?null:[],s=a?i+1:r.length,l=i<0?s:a?i:0;l<s;l++)if(((n=r[l]).selected||l===i)&&(ne.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!re.nodeName(n.parentNode,"optgroup"))){if(t=re(n).val(),a)return t;o.push(t)}return o},set:function(e,t){for(var n,r,i=e.options,a=re.makeArray(t),o=i.length;o--;)((r=i[o]).selected=re.inArray(re.valHooks.option.get(r),a)>-1)&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),re.each(["radio","checkbox"],function(){re.valHooks[this]={set:function(e,t){if(re.isArray(t))return e.checked=re.inArray(re(e).val(),t)>-1}},ne.checkOn||(re.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var pt=/^(?:focusinfocus|focusoutblur)$/;re.extend(re.event,{trigger:function(t,n,r,i){var a,o,s,l,u,c,f,p=[r||Y],h=te.call(t,"type")?t.type:t,d=te.call(t,"namespace")?t.namespace.split("."):[];if(o=s=r=r||Y,3!==r.nodeType&&8!==r.nodeType&&!pt.test(h+re.event.triggered)&&(h.indexOf(".")>-1&&(h=(d=h.split(".")).shift(),d.sort()),u=h.indexOf(":")<0&&"on"+h,t=t[re.expando]?t:new re.Event(h,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=d.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:re.makeArray(n,[t]),f=re.event.special[h]||{},i||!f.trigger||!1!==f.trigger.apply(r,n))){if(!i&&!f.noBubble&&!re.isWindow(r)){for(l=f.delegateType||h,pt.test(l+h)||(o=o.parentNode);o;o=o.parentNode)p.push(o),s=o;s===(r.ownerDocument||Y)&&p.push(s.defaultView||s.parentWindow||e)}for(a=0;(o=p[a++])&&!t.isPropagationStopped();)t.type=a>1?l:f.bindType||h,(c=(xe.get(o,"events")||{})[t.type]&&xe.get(o,"handle"))&&c.apply(o,n),(c=u&&o[u])&&c.apply&&_e(o)&&(t.result=c.apply(o,n),!1===t.result&&t.preventDefault());return t.type=h,i||t.isDefaultPrevented()||f._default&&!1!==f._default.apply(p.pop(),n)||!_e(r)||u&&re.isFunction(r[h])&&!re.isWindow(r)&&((s=r[u])&&(r[u]=null),re.event.triggered=h,r[h](),re.event.triggered=void 0,s&&(r[u]=s)),t.result}},simulate:function(e,t,n){var r=re.extend(new re.Event,n,{type:e,isSimulated:!0});re.event.trigger(r,null,t)}}),re.fn.extend({trigger:function(e,t){return this.each(function(){re.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return re.event.trigger(e,t,n,!0)}}),re.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){re.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),re.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ne.focusin="onfocusin"in e,ne.focusin||re.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){re.event.simulate(t,e.target,re.event.fix(e))};re.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=xe.access(r,t);i||r.addEventListener(e,n,!0),xe.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=xe.access(r,t)-1;i?xe.access(r,t,i):(r.removeEventListener(e,n,!0),xe.remove(r,t))}}});var ht=e.location,dt=re.now(),gt=/\?/;re.parseJSON=function(e){return JSON.parse(e+"")},re.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||re.error("Invalid XML: "+t),n};var mt=/#.*$/,vt=/([?&])_=[^&]*/,wt=/^(.*?):[ \t]*([^\r\n]*)$/gm,bt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,yt=/^(?:GET|HEAD)$/,_t=/^\/\//,xt={},kt={},Et="*/".concat("*"),Tt=Y.createElement("a");Tt.href=ht.href,re.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ht.href,type:"GET",isLocal:bt.test(ht.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Et,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":re.parseJSON,"text xml":re.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?q(q(e,re.ajaxSettings),t):q(re.ajaxSettings,e)},ajaxPrefilter:F(xt),ajaxTransport:F(kt),ajax:function(t,n){function r(t,n,r,s){var u,f,w,b,_,k=n;2!==y&&(y=2,l&&e.clearTimeout(l),i=void 0,o=s||"",x.readyState=t>0?4:0,u=t>=200&&t<300||304===t,r&&(b=H(p,x,r)),b=V(p,b,x,u),u?(p.ifModified&&((_=x.getResponseHeader("Last-Modified"))&&(re.lastModified[a]=_),(_=x.getResponseHeader("etag"))&&(re.etag[a]=_)),204===t||"HEAD"===p.type?k="nocontent":304===t?k="notmodified":(k=b.state,f=b.data,u=!(w=b.error))):(w=k,!t&&k||(k="error",t<0&&(t=0))),x.status=t,x.statusText=(n||k)+"",u?g.resolveWith(h,[f,k,x]):g.rejectWith(h,[x,k,w]),x.statusCode(v),v=void 0,c&&d.trigger(u?"ajaxSuccess":"ajaxError",[x,p,u?f:w]),m.fireWith(h,[x,k]),c&&(d.trigger("ajaxComplete",[x,p]),--re.active||re.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,a,o,s,l,u,c,f,p=re.ajaxSetup({},n),h=p.context||p,d=p.context&&(h.nodeType||h.jquery)?re(h):re.event,g=re.Deferred(),m=re.Callbacks("once memory"),v=p.statusCode||{},w={},b={},y=0,_="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(2===y){if(!s)for(s={};t=wt.exec(o);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===y?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return y||(e=b[n]=b[n]||e,w[e]=t),this},overrideMimeType:function(e){return y||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(y<2)for(t in e)v[t]=[v[t],e[t]];else x.always(e[x.status]);return this},abort:function(e){var t=e||_;return i&&i.abort(t),r(0,t),this}};if(g.promise(x).complete=m.add,x.success=x.done,x.error=x.fail,p.url=((t||p.url||ht.href)+"").replace(mt,"").replace(_t,ht.protocol+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=re.trim(p.dataType||"*").toLowerCase().match(we)||[""],null==p.crossDomain){u=Y.createElement("a");try{u.href=p.url,u.href=u.href,p.crossDomain=Tt.protocol+"//"+Tt.host!=u.protocol+"//"+u.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=re.param(p.data,p.traditional)),U(xt,p,n,x),2===y)return x;(c=re.event&&p.global)&&0==re.active++&&re.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!yt.test(p.type),a=p.url,p.hasContent||(p.data&&(a=p.url+=(gt.test(a)?"&":"?")+p.data,delete p.data),!1===p.cache&&(p.url=vt.test(a)?a.replace(vt,"$1_="+dt++):a+(gt.test(a)?"&":"?")+"_="+dt++)),p.ifModified&&(re.lastModified[a]&&x.setRequestHeader("If-Modified-Since",re.lastModified[a]),re.etag[a]&&x.setRequestHeader("If-None-Match",re.etag[a])),(p.data&&p.hasContent&&!1!==p.contentType||n.contentType)&&x.setRequestHeader("Content-Type",p.contentType),x.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Et+"; q=0.01":""):p.accepts["*"]);for(f in p.headers)x.setRequestHeader(f,p.headers[f]);if(p.beforeSend&&(!1===p.beforeSend.call(h,x,p)||2===y))return x.abort();_="abort";for(f in{success:1,error:1,complete:1})x[f](p[f]);if(i=U(kt,p,n,x)){if(x.readyState=1,c&&d.trigger("ajaxSend",[x,p]),2===y)return x;p.async&&p.timeout>0&&(l=e.setTimeout(function(){x.abort("timeout")},p.timeout));try{y=1,i.send(w,r)}catch(e){if(!(y<2))throw e;r(-1,e)}}else r(-1,"No Transport");return x},getJSON:function(e,t,n){return re.get(e,t,n,"json")},getScript:function(e,t){return re.get(e,void 0,t,"script")}}),re.each(["get","post"],function(e,t){re[t]=function(e,n,r,i){return re.isFunction(n)&&(i=i||r,r=n,n=void 0),re.ajax(re.extend({url:e,type:t,dataType:i,data:n,success:r},re.isPlainObject(e)&&e))}}),re._evalUrl=function(e){return re.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},re.fn.extend({wrapAll:function(e){var t;return re.isFunction(e)?this.each(function(t){re(this).wrapAll(e.call(this,t))}):(this[0]&&(t=re(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return re.isFunction(e)?this.each(function(t){re(this).wrapInner(e.call(this,t))}):this.each(function(){var t=re(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=re.isFunction(e);return this.each(function(n){re(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){re.nodeName(this,"body")||re(this).replaceWith(this.childNodes)}).end()}}),re.expr.filters.hidden=function(e){return!re.expr.filters.visible(e)},re.expr.filters.visible=function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0};var St=/%20/g,At=/\[\]$/,Ct=/\r?\n/g,Rt=/^(?:submit|button|image|reset|file)$/i,Mt=/^(?:input|select|textarea|keygen)/i;re.param=function(e,t){var n,r=[],i=function(e,t){t=re.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=re.ajaxSettings&&re.ajaxSettings.traditional),re.isArray(e)||e.jquery&&!re.isPlainObject(e))re.each(e,function(){i(this.name,this.value)});else for(n in e)W(n,e[n],t,i);return r.join("&").replace(St,"+")},re.fn.extend({serialize:function(){return re.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=re.prop(this,"elements");return e?re.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!re(this).is(":disabled")&&Mt.test(this.nodeName)&&!Rt.test(e)&&(this.checked||!Me.test(e))}).map(function(e,t){var n=re(this).val();return null==n?null:re.isArray(n)?re.map(n,function(e){return{name:t.name,value:e.replace(Ct,"\r\n")}}):{name:t.name,value:n.replace(Ct,"\r\n")}}).get()}}),re.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Lt={0:200,1223:204},jt=re.ajaxSettings.xhr();ne.cors=!!jt&&"withCredentials"in jt,ne.ajax=jt=!!jt,re.ajaxTransport(function(t){var n,r;if(ne.cors||jt&&!t.crossDomain)return{send:function(i,a){var o,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)s[o]=t.xhrFields[o];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(o in i)s.setRequestHeader(o,i[o]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?a(0,"error"):a(s.status,s.statusText):a(Lt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),re.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return re.globalEval(e),e}}}),re.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),re.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=re("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),Y.head.appendChild(t[0])},abort:function(){n&&n()}}}});var It=[],Dt=/(=)\?(?=&|$)|\?\?/;re.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=It.pop()||re.expando+"_"+dt++;return this[e]=!0,e}}),re.ajaxPrefilter("json jsonp",function(t,n,r){var i,a,o,s=!1!==t.jsonp&&(Dt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dt.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=re.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Dt,"$1"+i):!1!==t.jsonp&&(t.url+=(gt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return o||re.error(i+" was not called"),o[0]},t.dataTypes[0]="json",a=e[i],e[i]=function(){o=arguments},r.always(function(){void 0===a?re(e).removeProp(i):e[i]=a,t[i]&&(t.jsonpCallback=n.jsonpCallback,It.push(i)),o&&re.isFunction(a)&&a(o[0]),o=a=void 0}),"script"}),re.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||Y;var r=pe.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=p([e],t,i),i&&i.length&&re(i).remove(),re.merge([],r.childNodes))};var Bt=re.fn.load;re.fn.load=function(e,t,n){if("string"!=typeof e&&Bt)return Bt.apply(this,arguments);var r,i,a,o=this,s=e.indexOf(" ");return s>-1&&(r=re.trim(e.slice(s)),e=e.slice(0,s)),re.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),o.length>0&&re.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){a=arguments,o.html(r?re("<div>").append(re.parseHTML(e)).find(r):e)}).always(n&&function(e,t){o.each(function(){n.apply(this,a||[e.responseText,t,e])})}),this},re.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){re.fn[t]=function(e){return this.on(t,e)}}),re.expr.filters.animated=function(e){return re.grep(re.timers,function(t){return e===t.elem}).length},re.offset={setOffset:function(e,t,n){var r,i,a,o,s,l,u=re.css(e,"position"),c=re(e),f={};"static"===u&&(e.style.position="relative"),s=c.offset(),a=re.css(e,"top"),l=re.css(e,"left"),("absolute"===u||"fixed"===u)&&(a+l).indexOf("auto")>-1?(o=(r=c.position()).top,i=r.left):(o=parseFloat(a)||0,i=parseFloat(l)||0),re.isFunction(t)&&(t=t.call(e,n,re.extend({},s))),null!=t.top&&(f.top=t.top-s.top+o),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},re.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){re.offset.setOffset(this,e,t)});var t,n,r=this[0],i={top:0,left:0},a=r&&r.ownerDocument;if(a)return t=a.documentElement,re.contains(t,r)?(i=r.getBoundingClientRect(),n=G(a),{top:i.top+n.pageYOffset-t.clientTop,left:i.left+n.pageXOffset-t.clientLeft}):i},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===re.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),re.nodeName(e[0],"html")||(r=e.offset()),r.top+=re.css(e[0],"borderTopWidth",!0),r.left+=re.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-re.css(n,"marginTop",!0),left:t.left-r.left-re.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===re.css(e,"position");)e=e.offsetParent;return e||Xe})}}),re.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;re.fn[e]=function(r){return ye(this,function(e,r,i){var a=G(e);if(void 0===i)return a?a[t]:e[r];a?a.scrollTo(n?a.pageXOffset:i,n?i:a.pageYOffset):e[r]=i},e,r,arguments.length)}}),re.each(["top","left"],function(e,t){re.cssHooks[t]=A(ne.pixelPosition,function(e,n){if(n)return n=S(e,t),Ge.test(n)?re(e).position()[t]+"px":n})}),re.each({Height:"height",Width:"width"},function(e,t){re.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){re.fn[r]=function(r,i){var a=arguments.length&&(n||"boolean"!=typeof r),o=n||(!0===r||!0===i?"margin":"border");return ye(this,function(t,n,r){var i;return re.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?re.css(t,n,o):re.style(t,n,r,o)},t,a?r:void 0,a,null)}})}),re.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},size:function(){return this.length}}),re.fn.andSelf=re.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return re});var Nt=e.jQuery,Pt=e.$;return re.noConflict=function(t){return e.$===re&&(e.$=Pt),t&&e.jQuery===re&&(e.jQuery=Nt),re},t||(e.jQuery=e.$=re),re})},{}],52:[function(e,t,n){!function(e,r){"object"==typeof n&&"object"==typeof t?t.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof n?n.jsQR=r():e.jsQR=r()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){var t="";if(null!=e&&void 0!=e)for(var n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}function i(e,t,n){var r=c(e,t,n),i=o.locate(r);if(!i)return null;var a=s.extract(r,i);return a?l.decode(a):null}var a=n(1),o=n(3),s=n(4),l=n(9),u=n(2),c=a.binarize;t.binarizeImage=c;var f=o.locate;t.locateQRInBinaryImage=f;var p=s.extract;t.extractQRFromBinaryImage=p,t.decodeQR=function(e){return r(l.decode(e))},t.createBitMatrix=function(e,t){return new u.BitMatrix(e,t)},t.decodeQRFromImage=function(e,t,n){return r(i(e,t,n))},t.decodeQRFromImageAsByteArray=i},function(e,t,n){"use strict";function r(e,t,n,r,i){for(var a=new Array(n),l=0;l<n;l++)a[l]=new Array(t);for(var c=0;c<n;c++){var f=c<<o,p=i-s;f>p&&(f=p);for(var h=0;h<t;h++){var d=h<<o,g=r-s;d>g&&(d=g);for(var m=0,v=255,w=0,b=0,y=f*r+d;b<s;b++,y+=r){for(x=0;x<s;x++){var _=255&e[y+x];m+=_,_<v&&(v=_),_>w&&(w=_)}if(w-v>u)for(b++,y+=r;b<s;b++,y+=r)for(var x=0;x<s;x++)m+=255&e[y+x]}var k=m>>2*o;if(w-v<=u&&(k=v>>1,c>0&&h>0)){var E=a[c-1][h]+2*a[c][h-1]+a[c-1][h-1]>>2;v<E&&(k=E)}a[c][h]=k}}return a}function i(e,t,n,r,i,l){function u(e,t,n){return e<t?t:e>n?n:e}for(var c=a.BitMatrix.createEmpty(r,i),f=0;f<n;f++){var p=f<<o,h=i-s;p>h&&(p=h);for(var d=0;d<t;d++){var g=d<<o,m=r-s;g>m&&(g=m);for(var v=u(d,2,t-3),w=u(f,2,n-3),b=0,y=-2;y<=2;y++){var _=l[w+y];b+=_[v-2],b+=_[v-1],b+=_[v],b+=_[v+1],b+=_[v+2]}!function(e,t,n,r,i){for(var a=n*i+t,o=0;o<s;o++,a+=i)for(var l=0;l<s;l++){var u=255&e[a+l];c.set(t+l,n+o,u<=r)}}(e,g,p,b/25,r)}}return c}var a=n(2),o=3,s=1<<o,l=s-1,u=24;t.binarize=function(e,t,n){if(e.length!==t*n*4)throw new Error("Binarizer data.length != width * height * 4");for(var a=new Array(t*n),s=0;s<t;s++)for(var u=0;u<n;u++){var c=4*(u*t+s),f=.2126*e[c]+.7152*e[c+1]+.0722*e[c+2];a[u*t+s]=f}var p=t>>o;0!=(t&l)&&p++;var h=n>>o;return 0!=(n&l)&&h++,i(a,p,h,t,n,r(a,p,h,t,n))}},function(e,t){"use strict";var n=function(){function e(e,t){this.width=t,this.height=e.length/t,this.data=e}return e.createEmpty=function(t,n){for(var r=new Array(t*n),i=0;i<r.length;i++)r[i]=!1;return new e(r,t)},e.prototype.get=function(e,t){return this.data[t*this.width+e]},e.prototype.set=function(e,t,n){this.data[t*this.width+e]=n},e.prototype.copyBit=function(e,t,n){return this.get(e,t)?n<<1|1:n<<1},e.prototype.setRegion=function(e,t,n,r){for(var i=e+n,a=t+r,o=t;o<a;o++)for(var s=e;s<i;s++)this.set(s,o,!0)},e.prototype.mirror=function(){for(var e=0;e<this.width;e++)for(var t=e+1;t<this.height;t++)this.get(e,t)!=this.get(t,e)&&(this.set(e,t,!this.get(e,t)),this.set(t,e,!this.get(t,e)))},e}();t.BitMatrix=n},function(e,t){"use strict";function n(e){for(var t=0,n=0;n<5;n++){var r=e[n];if(0===r)return!1;t+=r}if(t<7)return!1;var i=(t<<c)/7,a=i/2;return Math.abs(i-(e[0]<<c))<a&&Math.abs(i-(e[1]<<c))<a&&Math.abs(3*i-(e[2]<<c))<3*a&&Math.abs(i-(e[3]<<c))<a&&Math.abs(i-(e[4]<<c))<a}function r(e,t){var n=t-e[4]-e[3]-e[2]/2;return n!==n?null:n}function i(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}function a(e,t,n){var r=t.x,i=t.y;return(n.x-r)*(e.y-i)-(n.y-i)*(e.x-r)}function o(e){var t,n,r,o=i(e[0],e[1]),s=i(e[1],e[2]),l=i(e[0],e[2]);if(s>=o&&s>=l?(n=e[0],t=e[1],r=e[2]):l>=s&&l>=o?(n=e[1],t=e[0],r=e[2]):(n=e[2],t=e[0],r=e[1]),a(t,n,r)<0){var u=t;t=r,r=u}return{bottomLeft:{x:t.x,y:t.y},topLeft:{x:n.x,y:n.y},topRight:{x:r.x,y:r.y}}}var s=2,l=3,u=57,c=8,f=function(){function e(e,t,n,r){this.x=e,this.y=t,this.estimatedModuleSize=n,this.count=null==r?1:r}return e.prototype.aboutEquals=function(e,t,n){if(Math.abs(t-this.y)<=e&&Math.abs(n-this.x)<=e){var r=Math.abs(e-this.estimatedModuleSize);return r<=1||r<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(t,n,r){var i=this.count+1;return new e((this.count*this.x+n)/i,(this.count*this.y+t)/i,(this.count*this.estimatedModuleSize+r)/i,i)},e}();t.locate=function(e){function t(t,n){return t=Math.floor(t),n=Math.floor(n),e.get(t,n)}function i(r,i,a,o){for(var s=e.height,l=e.width,u=[0,0,0,0,0],c=0;r-c>=0&&t(i-c,r-c);)u[2]++,c++;if(r-c<0||i-c<0)return!1;for(;r-c>=0&&i-c>=0&&!t(i-c,r-c)&&u[1]<=a;)u[1]++,c++;if(r-c<0||i-c<0||u[1]>a)return!1;for(;r-c>=0&&i-c>=0&&t(i-c,r-c)&&u[0]<=a;)u[0]++,c++;if(u[0]>a)return!1;for(c=1;r+c<s&&i+c<l&&t(i+c,r+c);)u[2]++,c++;if(r+c>=s||i+c>=l)return!1;for(;r+c<s&&i+c<l&&!t(i+c,r+c)&&u[3]<a;)u[3]++,c++;if(r+c>=s||i+c>=l||u[3]>=a)return!1;for(;r+c<s&&i+c<l&&t(i+c,r+c)&&u[4]<a;)u[4]++,c++;if(u[4]>=a)return!1;var f=u[0]+u[1]+u[2]+u[3]+u[4];return Math.abs(f-o)<2*o&&n(u)}function a(i,a,o,s){for(var l=e.height,u=[0,0,0,0,0],c=i;c>=0&&t(a,c);)u[2]++,c--;if(c<0)return null;for(;c>=0&&!t(a,c)&&u[1]<=o;)u[1]++,c--;if(c<0||u[1]>o)return null;for(;c>=0&&t(a,c)&&u[0]<=o;)u[0]++,c--;if(u[0]>o)return null;for(c=i+1;c<l&&t(a,c);)u[2]++,c++;if(c==l)return null;for(;c<l&&!t(a,c)&&u[3]<o;)u[3]++,c++;if(c==l||u[3]>=o)return null;for(;c<l&&t(a,c)&&u[4]<o;)u[4]++,c++;if(u[4]>=o)return null;var f=u[0]+u[1]+u[2]+u[3]+u[4];return 5*Math.abs(f-s)>=2*s?null:n(u)?r(u,c):null}function c(){var e=0,t=0,n=d.length;if(d.forEach(function(n){n.count>=s&&(e++,t+=n.estimatedModuleSize)}),e<3)return!1;for(var r=t/n,i=0,a=0;a<n;a++){var o=d[a];i+=Math.abs(o.estimatedModuleSize-r)}return i<=.05*t}function p(i,a,o,s){for(var l=e.width,u=[0,0,0,0,0],c=i;c>=0&&t(c,a);)u[2]++,c--;if(c<0)return null;for(;c>=0&&!t(c,a)&&u[1]<=o;)u[1]++,c--;if(c<0||u[1]>o)return null;for(;c>=0&&t(c,a)&&u[0]<=o;)u[0]++,c--;if(u[0]>o)return null;for(c=i+1;c<l&&t(c,a);)u[2]++,c++;if(c==l)return null;for(;c<l&&!t(c,a)&&u[3]<o;)u[3]++,c++;if(c==l||u[3]>=o)return null;for(;c<l&&t(c,a)&&u[4]<o;)u[4]++,c++;if(u[4]>=o)return null;var f=u[0]+u[1]+u[2]+u[3]+u[4];return 5*Math.abs(f-s)>=s?null:n(u)?r(u,c):null}function h(e,t,n,o){var s=e[0]+e[1]+e[2]+e[3]+e[4],l=r(e,n);if(null==l)return!1;var u=a(t,Math.floor(l),e[2],s);if(null!=u&&null!=(l=p(Math.floor(l),Math.floor(u),e[2],s))&&(!o||i(Math.floor(u),Math.floor(l),e[2],s))){for(var c=s/7,h=!1,g=0;g<d.length;g++){var m=d[g];if(m.aboutEquals(c,u,l)){d.splice(g,1,m.combineEstimate(u,l,c)),h=!0;break}}if(!h){var v=new f(l,u,c);d.push(v)}return!0}return!1}var d=[],g=!1,m=e.height,v=e.width,w=Math.floor(3*m/(4*u));w<l&&(w=l);for(var b=!1,y=[0,0,0,0,0],_=w-1;_<m&&!b;_+=w){y=[0,0,0,0,0];for(var x=0,k=0;k<v;k++)if(t(k,_))1==(1&x)&&x++,y[x]++;else if(0==(1&x))if(4===x)if(n(y)){if(!(T=h(y,_,k,!1))){y=[y[2],y[3],y[4],1,0],x=3;continue}if(w=2,g)b=c();else{var E=function(){if(d.length<=1)return 0;var e=null;return d.forEach(function(t){if(t.count>=s){if(null!=e)return g=!0,Math.floor(Math.abs(e.x-t.x)-Math.abs(e.y-t.y))/2;e=t}}),0}();E>y[2]&&(_+=E-y[2]-w,k=v-1)}y=[0,0,0,0,0],x=0}else y=[y[2],y[3],y[4],1,0],x=3;else y[++x]++;else y[x]++;if(n(y)){var T=h(y,_,v,!1);T&&(w=y[0],g&&(b=c()))}}var S=function(){var e=d.length;if(e<3)return null;if(e>3){var t=0,n=0;d.forEach(function(e){var r=e.estimatedModuleSize;t+=r,n+=r*r});var r=t/e,i=Math.sqrt(n/e-r*r);d.sort(function(e,t){var n=Math.abs(t.estimatedModuleSize-r),i=Math.abs(e.estimatedModuleSize-r);return n<i?-1:n==i?0:1});for(var a=Math.max(.2*r,i),o=0;o<d.length&&d.length>3;o++){var s=d[o];Math.abs(s.estimatedModuleSize-r)>a&&(d.splice(o,1),o--)}}return d.length>3&&(t=0,d.forEach(function(e){t+=e.estimatedModuleSize}),r=t/d.length,d.sort(function(e,t){if(t.count===e.count){var n=Math.abs(t.estimatedModuleSize-r),i=Math.abs(e.estimatedModuleSize-r);return n<i?1:n==i?0:-1}return t.count-e.count}),d=d.slice(0,3)),[d[0],d[1],d[2]]}();return S?o(S):null}},function(e,t,n){"use strict";function r(e,t,n){for(var r=!0,i=0;i<n.length&&r;i+=2){var a=Math.floor(n[i]),o=Math.floor(n[i+1]);if(a<-1||a>e||o<-1||o>t)throw new Error;r=!1,-1==a?(n[i]=0,r=!0):a==e&&(n[i]=e-1,r=!0),-1==o?(n[i+1]=0,r=!0):o==t&&(n[i+1]=t-1,r=!0)}r=!0;for(i=n.length-2;i>=0&&r;i-=2){var a=Math.floor(n[i]),o=Math.floor(n[i+1]);if(a<-1||a>e||o<-1||o>t)throw new Error;r=!1,-1==a?(n[i]=0,r=!0):a==e&&(n[i]=e-1,r=!0),-1==o?(n[i+1]=0,r=!0):o==t&&(n[i+1]=t-1,r=!0)}return n}function i(e,t,n){if(t<=0)return null;for(var i=v.BitMatrix.createEmpty(t,t),a=new Array(t<<1),o=0;o<t;o++){for(var s=a.length,l=o+.5,u=0;u<s;u+=2)a[u]=.5+(u>>1),a[u+1]=l;a=g.transformPoints(n,a);try{var c=r(e.width,e.height,a)}catch(e){return null}for(u=0;u<s;u+=2)i.set(u>>1,o,e.get(Math.floor(c[u]),Math.floor(c[u+1])))}return i}function a(e,t,n,r,i){var a,o,s,l,u=i-3.5;return null!=r?(a=r.x,o=r.y,s=l=u-3):(a=t.x-e.x+n.x,o=t.y-e.y+n.y,s=l=u),g.quadrilateralToQuadrilateral(3.5,3.5,u,3.5,s,l,3.5,u,e.x,e.y,t.x,t.y,a,o,n.x,n.y)}function o(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))}function s(e,t,n,r,i){t=Math.floor(t),n=Math.floor(n);var a=Math.floor(r*e),o=Math.max(0,t-a),s=Math.min(i.width,t+a);if(s-o<3*e)return null;var l=Math.max(0,n-a),u=Math.min(i.height-1,n+a);return d.findAlignment(o,l,s-o,u-l,e,i)}function l(e,t,n,r){var i=7+(Math.round(o(e.x,e.y,t.x,t.y)/r)+Math.round(o(e.x,e.y,n.x,n.y)/r)>>1);switch(3&i){case 0:i++;break;case 2:i--}return i}function u(e){if(e%4!=1)return null;var t=e-17>>2;return t<1||t>40?null:m.getVersionForNumber(t)}function c(e,t,n,r,i){e=Math.floor(e),t=Math.floor(t),n=Math.floor(n),r=Math.floor(r);var a=Math.abs(r-t)>Math.abs(n-e);if(a){var s=e;e=t,t=s,s=n,n=r,r=s}for(var l=Math.abs(n-e),u=Math.abs(r-t),c=-l>>1,f=e<n?1:-1,p=t<r?1:-1,h=0,d=n+f,g=e,m=t;g!=d;g+=f){var v=a?m:g,w=a?g:m;if(1==h===i.get(v,w)){if(2==h)return o(g,m,e,t);h++}if((c+=u)>0){if(m==r)break;m+=p,c-=l}}return 2==h?o(n+f,r,e,t):NaN}function f(e,t,n,r,i){var a=c(e,t,n,r,i),o=1,s=e-(n-e);s<0?(o=e/(e-s),s=0):s>=i.width&&(o=(i.width-1-e)/(s-e),s=i.width-1);var l=t-(r-t)*o;return o=1,l<0?(o=t/(t-l),l=0):l>=i.height&&(o=(i.height-1-t)/(l-t),l=i.height-1),s=e+(s-e)*o,(a+=c(e,t,s,l,i))-1}function p(e,t,n){var r=f(e.x,e.y,t.x,t.y,n),i=f(t.x,t.y,e.x,e.y,n);return w.isNaN(r)?i/7:w.isNaN(i)?r/7:(r+i)/14}function h(e,t,n,r){return(p(e,t,r)+p(e,n,r))/2}var d=n(5),g=n(7),m=n(8),v=n(2),w=n(6);t.extract=function(e,t){var n=h(t.topLeft,t.topRight,t.bottomLeft,e);if(n<1)return null;var r=l(t.topLeft,t.topRight,t.bottomLeft,n);if(!r)return null;var o=u(r);if(null==o)return null;var c=o.getDimensionForVersion()-7,f=null;if(o.alignmentPatternCenters.length>0)for(var p=t.topRight.x-t.topLeft.x+t.bottomLeft.x,d=t.topRight.y-t.topLeft.y+t.bottomLeft.y,g=1-3/c,m=t.topLeft.x+g*(p-t.topLeft.x),v=t.topLeft.y+g*(d-t.topLeft.y),w=4;w<=16&&!(f=s(n,m,v,w,e));w<<=1);return i(e,r,a(t.topLeft,t.topRight,t.bottomLeft,f,r))}},function(e,t,n){"use strict";function r(e,t,n,r){if(Math.abs(n-e.y)<=t&&Math.abs(r-e.x)<=t){var i=Math.abs(t-e.estimatedModuleSize);return i<=1||i<=e.estimatedModuleSize}return!1}function i(e,t,n,r){return{x:(e.x+n)/2,y:(e.y+t)/2,estimatedModuleSize:(e.estimatedModuleSize+r)/2}}function a(e,t){for(var n=t/2,r=0;r<3;r++)if(Math.abs(t-e[r])>=n)return!1;return!0}function o(e,t){var n=t-e[2]-e[1]/2;return l.isNaN(n)?null:n}function s(e,t,n,r,i,s){for(var l=s.height,u=[0,0,0],c=e;c>=0&&s.get(t,c)&&u[1]<=n;)u[1]++,c--;if(c<0||u[1]>n)return null;for(;c>=0&&!s.get(t,c)&&u[0]<=n;)u[0]++,c--;if(u[0]>n)return null;for(c=e+1;c<l&&s.get(t,c)&&u[1]<=n;)u[1]++,c++;if(c==l||u[1]>n)return null;for(;c<l&&!s.get(t,c)&&u[2]<=n;)u[2]++,c++;if(u[2]>n)return null;var f=u[0]+u[1]+u[2];return 5*Math.abs(f-r)>=2*r?null:a(u,i)?o(u,c):null}var l=n(6);t.findAlignment=function(e,t,n,l,u,c){function f(e,t,n,a){var l=e[0]+e[1]+e[2],u=o(e,n);if(null==u)return null;var f=s(t,Math.floor(u),2*e[1],l,a,c);if(null!=f){var h=(e[0]+e[1]+e[2])/3;for(var d in p){var g=p[d];if(r(g,h,f,u))return i(g,f,u,h)}var m={x:u,y:f,estimatedModuleSize:h};p.push(m)}return null}for(var p=[],h=e+n,d=t+(l>>1),g=[0,0,0],m=0;m<l;m++){var v=d+(0==(1&m)?m+1>>1:-(m+1>>1));g[0]=0,g[1]=0,g[2]=0;for(var w=e;w<h&&!c.get(w,v);)w++;for(var b=0;w<h;){if(c.get(w,v))if(1==b)g[b]++;else if(2==b){if(a(g,u)&&null!=(y=f(g,v,w,u)))return y;g[0]=g[2],g[1]=1,g[2]=0,b=1}else g[++b]++;else 1==b&&b++,g[b]++;w++}if(a(g,u)){var y=f(g,v,u,h);if(null!=y)return y}}return 0!=p.length?p[0]:null}},function(e,t){"use strict";var n=[0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4];t.numBitsDiffering=function(e,t){return e^=t,n[15&e]+n[e>>4&15]+n[e>>8&15]+n[e>>12&15]+n[e>>16&15]+n[e>>20&15]+n[e>>24&15]+n[e>>28&15]},t.isNaN=function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e!==+e}},function(e,t){"use strict";function n(e,t,n,r,i,a,o,s){var l=e-n+i-o,u=t-r+a-s;if(0==l&&0==u)return{a11:n-e,a21:i-n,a31:e,a12:r-t,a22:a-r,a32:t,a13:0,a23:0,a33:1};var c=n-i,f=o-i,p=r-a,h=s-a,d=c*h-f*p,g=(l*h-f*u)/d,m=(c*u-l*p)/d;return{a11:n-e+g*n,a21:o-e+m*o,a31:e,a12:r-t+g*r,a22:s-t+m*s,a32:t,a13:g,a23:m,a33:1}}function r(e){return{a11:e.a22*e.a33-e.a23*e.a32,a21:e.a23*e.a31-e.a21*e.a33,a31:e.a21*e.a32-e.a22*e.a31,a12:e.a13*e.a32-e.a12*e.a33,a22:e.a11*e.a33-e.a13*e.a31,a32:e.a12*e.a31-e.a11*e.a32,a13:e.a12*e.a23-e.a13*e.a22,a23:e.a13*e.a21-e.a11*e.a23,a33:e.a11*e.a22-e.a12*e.a21}}function i(e,t){return{a11:e.a11*t.a11+e.a21*t.a12+e.a31*t.a13,a21:e.a11*t.a21+e.a21*t.a22+e.a31*t.a23,a31:e.a11*t.a31+e.a21*t.a32+e.a31*t.a33,a12:e.a12*t.a11+e.a22*t.a12+e.a32*t.a13,a22:e.a12*t.a21+e.a22*t.a22+e.a32*t.a23,a32:e.a12*t.a31+e.a22*t.a32+e.a32*t.a33,a13:e.a13*t.a11+e.a23*t.a12+e.a33*t.a13,a23:e.a13*t.a21+e.a23*t.a22+e.a33*t.a23,a33:e.a13*t.a31+e.a23*t.a32+e.a33*t.a33}}function a(e,t,i,a,o,s,l,u){return r(n(e,t,i,a,o,s,l,u))}t.transformPoints=function(e,t){for(var n=t.length,r=e.a11,i=e.a12,a=e.a13,o=e.a21,s=e.a22,l=e.a23,u=e.a31,c=e.a32,f=e.a33,p=0;p<n;p+=2){var h=t[p],d=t[p+1],g=a*h+l*d+f;t[p]=(r*h+o*d+u)/g,t[p+1]=(i*h+s*d+c)/g}return t},t.quadrilateralToQuadrilateral=function(e,t,r,o,s,l,u,c,f,p,h,d,g,m,v,w){var b=a(e,t,r,o,s,l,u,c);return i(n(f,p,h,d,g,m,v,w),b)}},function(e,t,n){"use strict";function r(e){if(e<1||e>40)throw new Error("Invalid version number "+e);return u[e-1]}var i=n(6),a=[31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017],o=function(){return function(e,t){this.count=e,this.dataCodewords=t}}(),s=function(){function e(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.ecCodewordsPerBlock=e,this.ecBlocks=t}return e.prototype.getNumBlocks=function(){return this.ecBlocks.reduce(function(e,t){return e+t.count},0)},e.prototype.getTotalECCodewords=function(){return this.ecCodewordsPerBlock*this.getNumBlocks()},e}(),l=function(){function e(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];this.versionNumber=e,this.alignmentPatternCenters=t,this.ecBlocks=n;var i=0,a=this.ecBlocks[0].ecCodewordsPerBlock;this.ecBlocks[0].ecBlocks.forEach(function(e){i+=e.count*(e.dataCodewords+a)}),this.totalCodewords=i}return e.prototype.getDimensionForVersion=function(){return 17+4*this.versionNumber},e.prototype.getECBlocksForLevel=function(e){return this.ecBlocks[e.ordinal]},e.decodeVersionInformation=function(e){for(var t=1/0,n=0,o=0;o<a.length;o++){var s=a[o];if(s==e)return r(o+7);var l=i.numBitsDiffering(e,s);l<t&&(n=o+7,t=l)}return t<=3?r(n):null},e}();t.Version=l;var u=[new l(1,[],new s(7,new o(1,19)),new s(10,new o(1,16)),new s(13,new o(1,13)),new s(17,new o(1,9))),new l(2,[6,18],new s(10,new o(1,34)),new s(16,new o(1,28)),new s(22,new o(1,22)),new s(28,new o(1,16))),new l(3,[6,22],new s(15,new o(1,55)),new s(26,new o(1,44)),new s(18,new o(2,17)),new s(22,new o(2,13))),new l(4,[6,26],new s(20,new o(1,80)),new s(18,new o(2,32)),new s(26,new o(2,24)),new s(16,new o(4,9))),new l(5,[6,30],new s(26,new o(1,108)),new s(24,new o(2,43)),new s(18,new o(2,15),new o(2,16)),new s(22,new o(2,11),new o(2,12))),new l(6,[6,34],new s(18,new o(2,68)),new s(16,new o(4,27)),new s(24,new o(4,19)),new s(28,new o(4,15))),new l(7,[6,22,38],new s(20,new o(2,78)),new s(18,new o(4,31)),new s(18,new o(2,14),new o(4,15)),new s(26,new o(4,13),new o(1,14))),new l(8,[6,24,42],new s(24,new o(2,97)),new s(22,new o(2,38),new o(2,39)),new s(22,new o(4,18),new o(2,19)),new s(26,new o(4,14),new o(2,15))),new l(9,[6,26,46],new s(30,new o(2,116)),new s(22,new o(3,36),new o(2,37)),new s(20,new o(4,16),new o(4,17)),new s(24,new o(4,12),new o(4,13))),new l(10,[6,28,50],new s(18,new o(2,68),new o(2,69)),new s(26,new o(4,43),new o(1,44)),new s(24,new o(6,19),new o(2,20)),new s(28,new o(6,15),new o(2,16))),new l(11,[6,30,54],new s(20,new o(4,81)),new s(30,new o(1,50),new o(4,51)),new s(28,new o(4,22),new o(4,23)),new s(24,new o(3,12),new o(8,13))),new l(12,[6,32,58],new s(24,new o(2,92),new o(2,93)),new s(22,new o(6,36),new o(2,37)),new s(26,new o(4,20),new o(6,21)),new s(28,new o(7,14),new o(4,15))),new l(13,[6,34,62],new s(26,new o(4,107)),new s(22,new o(8,37),new o(1,38)),new s(24,new o(8,20),new o(4,21)),new s(22,new o(12,11),new o(4,12))),new l(14,[6,26,46,66],new s(30,new o(3,115),new o(1,116)),new s(24,new o(4,40),new o(5,41)),new s(20,new o(11,16),new o(5,17)),new s(24,new o(11,12),new o(5,13))),new l(15,[6,26,48,70],new s(22,new o(5,87),new o(1,88)),new s(24,new o(5,41),new o(5,42)),new s(30,new o(5,24),new o(7,25)),new s(24,new o(11,12),new o(7,13))),new l(16,[6,26,50,74],new s(24,new o(5,98),new o(1,99)),new s(28,new o(7,45),new o(3,46)),new s(24,new o(15,19),new o(2,20)),new s(30,new o(3,15),new o(13,16))),new l(17,[6,30,54,78],new s(28,new o(1,107),new o(5,108)),new s(28,new o(10,46),new o(1,47)),new s(28,new o(1,22),new o(15,23)),new s(28,new o(2,14),new o(17,15))),new l(18,[6,30,56,82],new s(30,new o(5,120),new o(1,121)),new s(26,new o(9,43),new o(4,44)),new s(28,new o(17,22),new o(1,23)),new s(28,new o(2,14),new o(19,15))),new l(19,[6,30,58,86],new s(28,new o(3,113),new o(4,114)),new s(26,new o(3,44),new o(11,45)),new s(26,new o(17,21),new o(4,22)),new s(26,new o(9,13),new o(16,14))),new l(20,[6,34,62,90],new s(28,new o(3,107),new o(5,108)),new s(26,new o(3,41),new o(13,42)),new s(30,new o(15,24),new o(5,25)),new s(28,new o(15,15),new o(10,16))),new l(21,[6,28,50,72,94],new s(28,new o(4,116),new o(4,117)),new s(26,new o(17,42)),new s(28,new o(17,22),new o(6,23)),new s(30,new o(19,16),new o(6,17))),new l(22,[6,26,50,74,98],new s(28,new o(2,111),new o(7,112)),new s(28,new o(17,46)),new s(30,new o(7,24),new o(16,25)),new s(24,new o(34,13))),new l(23,[6,30,54,74,102],new s(30,new o(4,121),new o(5,122)),new s(28,new o(4,47),new o(14,48)),new s(30,new o(11,24),new o(14,25)),new s(30,new o(16,15),new o(14,16))),new l(24,[6,28,54,80,106],new s(30,new o(6,117),new o(4,118)),new s(28,new o(6,45),new o(14,46)),new s(30,new o(11,24),new o(16,25)),new s(30,new o(30,16),new o(2,17))),new l(25,[6,32,58,84,110],new s(26,new o(8,106),new o(4,107)),new s(28,new o(8,47),new o(13,48)),new s(30,new o(7,24),new o(22,25)),new s(30,new o(22,15),new o(13,16))),new l(26,[6,30,58,86,114],new s(28,new o(10,114),new o(2,115)),new s(28,new o(19,46),new o(4,47)),new s(28,new o(28,22),new o(6,23)),new s(30,new o(33,16),new o(4,17))),new l(27,[6,34,62,90,118],new s(30,new o(8,122),new o(4,123)),new s(28,new o(22,45),new o(3,46)),new s(30,new o(8,23),new o(26,24)),new s(30,new o(12,15),new o(28,16))),new l(28,[6,26,50,74,98,122],new s(30,new o(3,117),new o(10,118)),new s(28,new o(3,45),new o(23,46)),new s(30,new o(4,24),new o(31,25)),new s(30,new o(11,15),new o(31,16))),new l(29,[6,30,54,78,102,126],new s(30,new o(7,116),new o(7,117)),new s(28,new o(21,45),new o(7,46)),new s(30,new o(1,23),new o(37,24)),new s(30,new o(19,15),new o(26,16))),new l(30,[6,26,52,78,104,130],new s(30,new o(5,115),new o(10,116)),new s(28,new o(19,47),new o(10,48)),new s(30,new o(15,24),new o(25,25)),new s(30,new o(23,15),new o(25,16))),new l(31,[6,30,56,82,108,134],new s(30,new o(13,115),new o(3,116)),new s(28,new o(2,46),new o(29,47)),new s(30,new o(42,24),new o(1,25)),new s(30,new o(23,15),new o(28,16))),new l(32,[6,34,60,86,112,138],new s(30,new o(17,115)),new s(28,new o(10,46),new o(23,47)),new s(30,new o(10,24),new o(35,25)),new s(30,new o(19,15),new o(35,16))),new l(33,[6,30,58,86,114,142],new s(30,new o(17,115),new o(1,116)),new s(28,new o(14,46),new o(21,47)),new s(30,new o(29,24),new o(19,25)),new s(30,new o(11,15),new o(46,16))),new l(34,[6,34,62,90,118,146],new s(30,new o(13,115),new o(6,116)),new s(28,new o(14,46),new o(23,47)),new s(30,new o(44,24),new o(7,25)),new s(30,new o(59,16),new o(1,17))),new l(35,[6,30,54,78,102,126,150],new s(30,new o(12,121),new o(7,122)),new s(28,new o(12,47),new o(26,48)),new s(30,new o(39,24),new o(14,25)),new s(30,new o(22,15),new o(41,16))),new l(36,[6,24,50,76,102,128,154],new s(30,new o(6,121),new o(14,122)),new s(28,new o(6,47),new o(34,48)),new s(30,new o(46,24),new o(10,25)),new s(30,new o(2,15),new o(64,16))),new l(37,[6,28,54,80,106,132,158],new s(30,new o(17,122),new o(4,123)),new s(28,new o(29,46),new o(14,47)),new s(30,new o(49,24),new o(10,25)),new s(30,new o(24,15),new o(46,16))),new l(38,[6,32,58,84,110,136,162],new s(30,new o(4,122),new o(18,123)),new s(28,new o(13,46),new o(32,47)),new s(30,new o(48,24),new o(14,25)),new s(30,new o(42,15),new o(32,16))),new l(39,[6,26,54,82,110,138,166],new s(30,new o(20,117),new o(4,118)),new s(28,new o(40,47),new o(7,48)),new s(30,new o(43,24),new o(22,25)),new s(30,new o(10,15),new o(67,16))),new l(40,[6,30,58,86,114,142,170],new s(30,new o(19,118),new o(6,119)),new s(28,new o(18,47),new o(31,48)),new s(30,new o(34,24),new o(34,25)),new s(30,new o(20,15),new o(61,16)))];t.getVersionForNumber=r},function(e,t,n){"use strict";function r(e){for(var t=e.getDimensionForVersion(),n=new Array(t*t),r=0;r<n.length;r++)n[r]=!1;var i=new h.BitMatrix(n,t);i.setRegion(0,0,9,9),i.setRegion(t-8,0,8,9),i.setRegion(0,t-8,9,8);for(var a=e.alignmentPatternCenters.length,o=0;o<a;o++)for(var r=e.alignmentPatternCenters[o]-2,s=0;s<a;s++)0==o&&(0==s||s==a-1)||o==a-1&&0==s||i.setRegion(e.alignmentPatternCenters[s]-2,r,5,5);return i.setRegion(6,9,1,t-17),i.setRegion(9,6,t-17,1),e.versionNumber>6&&(i.setRegion(t-11,0,3,6),i.setRegion(0,t-11,6,3)),i}function i(e,t,n){for(var i=y[n.dataMask],a=e.height,o=r(t),s=!0,l=[],u=0,c=0,f=0,p=a-1;p>0;p-=2){6==p&&p--;for(var h=0;h<a;h++)for(var d=s?a-1-h:h,g=0;g<2;g++)o.get(p-g,d)||(f++,c<<=1,e.get(p-g,d)!==i(d,p-g)&&(c|=1),8==f&&(l[u++]=255&c,f=0,c=0));s=!s}return u!=t.totalCodewords?null:l}function a(e){var t=e.height,n=t-17>>2;if(n<=6)return v.getVersionForNumber(n);for(var r=0,i=t-11,a=5;a>=0;a--)for(s=t-9;s>=i;s--)r=e.copyBit(s,a,r);var o=v.Version.decodeVersionInformation(r);if(null!=o&&o.getDimensionForVersion()==t)return o;r=0;for(var s=5;s>=0;s--)for(a=t-9;a>=i;a--)r=e.copyBit(s,a,r);return null!=(o=v.Version.decodeVersionInformation(r))&&o.getDimensionForVersion()==t?o:null}function o(e){return{errorCorrectionLevel:_[e>>3&3],dataMask:7&e}}function s(e,t){for(var n=1/0,r=0,i=0;i<b.length;i++){var a=b[i],s=a[0];if(s==e||s==t)return o(a[1]);var l=g.numBitsDiffering(e,s);l<n&&(r=a[1],n=l),e!=t&&(l=g.numBitsDiffering(t,s))<n&&(r=a[1],n=l)}return n<=3?o(r):null}function l(e,t){var n=s(e,t);return n||s(e^w,t^w)}function u(e){for(var t=0,n=0;n<6;n++)t=e.copyBit(n,8,t);t=e.copyBit(7,8,t),t=e.copyBit(8,8,t),t=e.copyBit(8,7,t);for(o=5;o>=0;o--)t=e.copyBit(8,o,t);for(var r=e.height,i=0,a=r-7,o=r-1;o>=a;o--)i=e.copyBit(8,o,i);for(n=r-8;n<r;n++)i=e.copyBit(n,8,i);var s=l(t,i);return null!=s?s:null}function c(e,t,n){if(e.length!=t.totalCodewords)throw new Error("Invalid number of codewords for version; got "+e.length+" expected "+t.totalCodewords);var r=t.getECBlocksForLevel(n),i=0,a=r.ecBlocks;a.forEach(function(e){i+=e.count});var o=new Array(i),s=0;a.forEach(function(e){for(var t=0;t<e.count;t++){var n=e.dataCodewords,i=r.ecCodewordsPerBlock+n;o[s++]={numDataCodewords:n,codewords:new Array(i)}}});for(var l=o[0].codewords.length,u=o.length-1;u>=0&&o[u].codewords.length!=l;)u--;u++;for(var c=l-r.ecCodewordsPerBlock,f=0,p=0;p<c;p++)for(d=0;d<s;d++)o[d].codewords[p]=e[f++];for(d=u;d<s;d++)o[d].codewords[c]=e[f++];for(var h=o[0].codewords.length,p=c;p<h;p++)for(var d=0;d<s;d++){var g=d<u?p:p+1;o[d].codewords[g]=e[f++]}return o}function f(e,t){for(var n=new m.ReedSolomonDecoder,r=e.length,i=new Array(r),a=0;a<r;a++)i[a]=255&e[a];var o=e.length-t;if(!n.decode(i,o))return!1;for(a=0;a<t;a++)e[a]=i[a];return!0}function p(e){var t=a(e);if(!t)return null;var n=u(e);if(!n)return null;var r=n.errorCorrectionLevel,o=i(e,t,n);if(!o)return null;var s=c(o,t,r),l=0;s.forEach(function(e){l+=e.numDataCodewords});for(var p=new Array(l),h=0,g=0,m=s;g<m.length;g++){var v=m[g],w=v.codewords,b=v.numDataCodewords;if(!f(w,b))return null;for(var y=0;y<b;y++)p[h++]=w[y]}return d.decodeQRdata(p,t.versionNumber,r.name)}var h=n(2),d=n(10),g=n(6),m=n(12),v=n(8),w=21522,b=[[21522,0],[20773,1],[24188,2],[23371,3],[17913,4],[16590,5],[20375,6],[19104,7],[30660,8],[29427,9],[32170,10],[30877,11],[26159,12],[25368,13],[27713,14],[26998,15],[5769,16],[5054,17],[7399,18],[6608,19],[1890,20],[597,21],[3340,22],[2107,23],[13663,24],[12392,25],[16177,26],[14854,27],[9396,28],[8579,29],[11994,30],[11245,31]],y=[function(e,t){return 0==(e+t&1)},function(e,t){return 0==(1&e)},function(e,t){return t%3==0},function(e,t){return(e+t)%3==0},function(e,t){return 0==((e>>1)+t/3&1)},function(e,t){return(e*t&1)+e*t%3==0},function(e,t){return 0==((e*t&1)+e*t%3&1)},function(e,t){return 0==((e+t&1)+e*t%3&1)}],_=[{ordinal:1,bits:0,name:"M"},{ordinal:0,bits:1,name:"L"},{ordinal:3,bits:2,name:"H"},{ordinal:2,bits:3,name:"Q"}];t.decode=function(e){if(null==e)return null;var t=p(e);return t||(e.mirror(),p(e))}},function(e,t,n){"use strict";function r(e){var t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];if(e>=t.length)throw new Error("Could not decode alphanumeric char");return t[e].charCodeAt(0)}function i(e){switch(e){case 0:return p;case 1:return h;case 2:return d;case 3:return g;case 4:return m;case 5:return b;case 7:return v;case 8:return w;case 9:return y;case 13:return _;default:throw new Error("Couldn't decode mode from byte array")}}function a(e){var t=e.readBits(8);if(0==(128&t))return 127&t;if(128==(192&t))return(63&t)<<8|e.readBits(8);if(192==(224&t))return(31&t)<<16|e.readBits(16);throw new Error("Bad ECI bits starting with byte "+t)}function o(e,t,n){if(13*n>e.available())return!1;for(var r=new Array(2*n),i=0;n>0;){var a=e.readBits(13),o=Math.floor(a/96)<<8|a%96;o+=o<959?41377:42657,r[i]=o>>8&255,r[i+1]=255&o,i+=2,n--}return t.val=r,!0}function s(e,t,n){for(;n>=3;){if(e.available()<10)return!1;var i=e.readBits(10);if(i>=1e3)return!1;t.val.push(r(Math.floor(i/100))),t.val.push(r(Math.floor(i/10)%10)),t.val.push(r(i%10)),n-=3}if(2==n){if(e.available()<7)return!1;var a=e.readBits(7);if(a>=100)return!1;t.val.push(r(Math.floor(a/10))),t.val.push(r(a%10))}else if(1==n){if(e.available()<4)return!1;var o=e.readBits(4);if(o>=10)return!1;t.val.push(r(o))}return!0}function l(e,t,n,i){for(var a=t.val.length;n>1;){if(e.available()<11)return!1;var o=e.readBits(11);t.val.push(r(Math.floor(o/45))),t.val.push(r(o%45)),n-=2}if(1==n){if(e.available()<6)return!1;t.val.push(r(e.readBits(6)))}if(i)for(var s=a;s<t.val.length;s++)t.val[s]=="%".charCodeAt(0)&&(s<t.val.length-1&&t.val[s+1]=="%".charCodeAt(0)?t.val=t.val.slice(0,s+1).concat(t.val.slice(s+2)):t.val[s]=29);return!0}function u(e,t,n){if(n<<3>e.available())return!1;for(var r=new Array(n),i=0;i<n;i++)r[i]=e.readBits(8);return Array.prototype.push.apply(t.val,r),!0}var c=n(11),f=function(){function e(e,t){this.characterCountBitsForVersions=e,this.bits=t}return e.prototype.getCharacterCountBits=function(e){if(null==this.characterCountBitsForVersions)throw new Error("Character count doesn't apply to this mode");var t;return t=e<=9?0:e<=26?1:2,this.characterCountBitsForVersions[t]},e}(),p=new f([0,0,0],0),h=new f([10,12,14],1),d=new f([9,11,13],2),g=new f([0,0,0],3),m=new f([8,16,16],4),v=new f(null,7),w=new f([8,10,12],8),b=new f(null,5),y=new f(null,9),_=new f([8,10,12],13),x=1;t.decodeQRdata=function(e,t,n){for(var r,f=new c.BitStream(e),k={val:[]},E=!1;r!=p;)if((r=f.available()<4?p:i(f.readBits(4)))!=p)if(r==b||r==y)E=!0;else if(r==g){if(f.available()<16)return null;f.readBits(8),f.readBits(8)}else if(r==v){var T=a(f);if(T<0||T>30)return null}else if(r==_){var S=f.readBits(4),A=f.readBits(r.getCharacterCountBits(t));if(S==x&&!o(f,k,A))return null}else{var C=f.readBits(r.getCharacterCountBits(t));if(r==h){if(!s(f,k,C))return null}else if(r==d){if(!l(f,k,C,E))return null}else if(r==m){if(!u(f,k,C))return null}else if(r!=w)return null}return k.val}},function(e,t){"use strict";var n=function(){function e(e){this.byteOffset=0,this.bitOffset=0,this.bytes=e}return e.prototype.readBits=function(e){if(e<1||e>32||e>this.available())throw new Error("Cannot read "+e.toString()+" bits");var t=0;if(this.bitOffset>0){var n=8-this.bitOffset,r=e<n?e:n,i=255>>8-r<<(a=n-r);t=(this.bytes[this.byteOffset]&i)>>a,e-=r,this.bitOffset+=r,8==this.bitOffset&&(this.bitOffset=0,this.byteOffset++)}if(e>0){for(;e>=8;)t=t<<8|255&this.bytes[this.byteOffset],this.byteOffset++,e-=8;if(e>0){var a=8-e,i=255>>a<<a;t=t<<e|(this.bytes[this.byteOffset]&i)>>a,this.bitOffset+=e}}return t},e.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},e}();t.BitStream=n},function(e,t){"use strict";var n=function(){function e(){this.field=new i(285,256,0)}return e.prototype.decode=function(e,t){for(var n=new r(this.field,e),a=new Array(t),o=!0,s=0;s<t;s++){var l=n.evaluateAt(this.field.exp(s+this.field.generatorBase));a[a.length-1-s]=l,0!=l&&(o=!1)}if(o)return!0;var u=new r(this.field,a),c=this.runEuclideanAlgorithm(this.field.buildMonomial(t,1),u,t);if(null==c)return!1;var f=c[0],p=this.findErrorLocations(f);if(null==p)return!1;for(var h=c[1],d=this.findErrorMagnitudes(h,p),s=0;s<p.length;s++){var g=e.length-1-this.field.log(p[s]);if(g<0)return!1;e[g]=i.addOrSubtract(e[g],d[s])}return!0},e.prototype.runEuclideanAlgorithm=function(e,t,n){if(e.degree()<t.degree()){var r=e;e=t,t=r}for(var i=e,a=t,o=this.field.zero,s=this.field.one;a.degree()>=n/2;){var l=i,u=o;if(i=a,o=s,i.isZero())return null;a=l;for(var c=this.field.zero,f=i.getCoefficient(i.degree()),p=this.field.inverse(f);a.degree()>=i.degree()&&!a.isZero();){var h=a.degree()-i.degree(),d=this.field.multiply(a.getCoefficient(a.degree()),p);c=c.addOrSubtract(this.field.buildMonomial(h,d)),a=a.addOrSubtract(i.multiplyByMonomial(h,d))}if(s=c.multiplyPoly(o).addOrSubtract(u),a.degree()>=i.degree())return null}var g=s.getCoefficient(0);if(0==g)return null;var m=this.field.inverse(g);return[s.multiply(m),a.multiply(m)]},e.prototype.findErrorLocations=function(e){var t=e.degree();if(1==t)return[e.getCoefficient(1)];for(var n=new Array(t),r=0,i=1;i<this.field.size&&r<t;i++)0==e.evaluateAt(i)&&(n[r]=this.field.inverse(i),r++);return r!=t?null:n},e.prototype.findErrorMagnitudes=function(e,t){for(var n=t.length,r=new Array(n),i=0;i<n;i++){for(var a=this.field.inverse(t[i]),o=1,s=0;s<n;s++)if(i!=s){var l=this.field.multiply(t[s],a),u=0==(1&l)?1|l:-2&l;o=this.field.multiply(o,u)}r[i]=this.field.multiply(e.evaluateAt(a),this.field.inverse(o)),0!=this.field.generatorBase&&(r[i]=this.field.multiply(r[i],a))}return r},e}();t.ReedSolomonDecoder=n;var r=function(){function e(e,t){if(0==t.length)throw new Error("No coefficients.");this.field=e;var n=t.length;if(n>1&&0==t[0]){for(var r=1;r<n&&0==t[r];)r++;if(r==n)this.coefficients=e.zero.coefficients;else{this.coefficients=new Array(n-r);for(var i=0;i<this.coefficients.length;i++)this.coefficients[i]=t[r+i]}}else this.coefficients=t}return e.prototype.evaluateAt=function(e){var t=0;if(0==e)return this.getCoefficient(0);var n=this.coefficients.length;if(1==e)return this.coefficients.forEach(function(e){t=i.addOrSubtract(t,e)}),t;t=this.coefficients[0];for(var r=1;r<n;r++)t=i.addOrSubtract(this.field.multiply(e,t),this.coefficients[r]);return t},e.prototype.getCoefficient=function(e){return this.coefficients[this.coefficients.length-1-e]},e.prototype.degree=function(){return this.coefficients.length-1},e.prototype.isZero=function(){return 0==this.coefficients[0]},e.prototype.addOrSubtract=function(t){if(this.isZero())return t;if(t.isZero())return this;var n=this.coefficients,r=t.coefficients;if(n.length>r.length){var a=n;n=r,r=a}for(var o=new Array(r.length),s=r.length-n.length,l=0;l<s;l++)o[l]=r[l];for(l=s;l<r.length;l++)o[l]=i.addOrSubtract(n[l-s],r[l]);return new e(this.field,o)},e.prototype.multiply=function(t){if(0==t)return this.field.zero;if(1==t)return this;for(var n=this.coefficients.length,r=new Array(n),i=0;i<n;i++)r[i]=this.field.multiply(this.coefficients[i],t);return new e(this.field,r)},e.prototype.multiplyPoly=function(t){if(this.isZero()||t.isZero())return this.field.zero;for(var n=this.coefficients,r=n.length,a=t.coefficients,o=a.length,s=new Array(r+o-1),l=0;l<r;l++)for(var u=n[l],c=0;c<o;c++)s[l+c]=i.addOrSubtract(s[l+c],this.field.multiply(u,a[c]));return new e(this.field,s)},e.prototype.multiplyByMonomial=function(t,n){if(t<0)throw new Error("Invalid degree less than 0");if(0==n)return this.field.zero;for(var r=this.coefficients.length,i=new Array(r+t),a=0;a<r;a++)i[a]=this.field.multiply(this.coefficients[a],n);return new e(this.field,i)},e}(),i=function(){function e(e,t,n){this.INITIALIZATION_THRESHOLD=0,this.initialized=!1,this.primitive=e,this.size=t,this.generatorBase=n,t<=this.INITIALIZATION_THRESHOLD&&this.initialize()}return e.prototype.initialize=function(){this.expTable=new Array(this.size),this.logTable=new Array(this.size);for(var e=1,t=0;t<this.size;t++)this.expTable[t]=e,(e<<=1)>=this.size&&(e^=this.primitive,e&=this.size-1);for(t=0;t<this.size-1;t++)this.logTable[this.expTable[t]]=t;this.zero=new r(this,[0]),this.one=new r(this,[1]),this.initialized=!0},e.addOrSubtract=function(e,t){return e^t},e.prototype.checkInit=function(){this.initialized||this.initialize()},e.prototype.multiply=function(e,t){return this.checkInit(),0==e||0==t?0:this.expTable[(this.logTable[e]+this.logTable[t])%(this.size-1)]},e.prototype.exp=function(e){return this.checkInit(),this.expTable[e]},e.prototype.log=function(e){if(this.checkInit(),0==e)throw new Error("Can't take log(0)");return this.logTable[e]},e.prototype.inverse=function(e){if(this.checkInit(),0==e)throw new Error("Can't invert 0");return this.expTable[this.size-this.logTable[e]-1]},e.prototype.buildMonomial=function(e,t){if(this.checkInit(),e<0)throw new Error("Invalid monomial degree less than 0");if(0==t)return this.zero;var n=new Array(e+1);return n[0]=t,new r(this,n)},e}()}])})},{}],53:[function(e,t,n){(function(n){function r(){this.types=Object.create(null),this.extensions=Object.create(null)}e("path");var i=e("fs");r.prototype.define=function(e){for(var t in e){for(var r=e[t],i=0;i<r.length;i++)n.env.DEBUG_MIME&&this.types[r]&&console.warn(this._loading.replace(/.*\//,""),'changes "'+r[i]+'" extension type from '+this.types[r]+" to "+t),this.types[r[i]]=t;this.extensions[t]||(this.extensions[t]=r[0])}},r.prototype.load=function(e){this._loading=e;var t={};i.readFileSync(e,"ascii").split(/[\r\n]+/).forEach(function(e){var n=e.replace(/\s*#.*|^\s*|\s*$/g,"").split(/\s+/);t[n.shift()]=n}),this.define(t),this._loading=null},r.prototype.lookup=function(e,t){var n=e.replace(/.*[\.\/\\]/,"").toLowerCase();return this.types[n]||t||this.default_type},r.prototype.extension=function(e){var t=e.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase();return this.extensions[t]};var a=new r;a.define(e("./types.json")),a.default_type=a.lookup("bin"),a.Mime=r,a.charsets={lookup:function(e,t){return/^text\//.test(e)?"UTF-8":t}},t.exports=a}).call(this,e("_process"))},{"./types.json":54,_process:94,fs:6,path:71}],54:[function(e,t,n){t.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mdp"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":["woff"],"application/font-woff2":["woff2"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/prs.cww":["cww"],"application/pskc+xml":["pskcxml"],"application/rdf+xml":["rdf"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/voicexml+xml":["vxml"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["dmg"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-otf":["otf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-ttf":["ttf","ttc"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["iso"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdownload":["exe","dll","com","bat","msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","wmz","emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-nzb":["nzb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-research-info-systems":["ris"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt"],"application/x-xfig":["fig"],"application/x-xliff+xml":["xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"application/xaml+xml":["xaml"],"application/xcap-diff+xml":["xdf"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xml":["xml","xsl","xsd"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp4":["mp4a","m4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/webm":["weba"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-wav":["wav"],"audio/xm":["xm"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"font/opentype":["otf"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jpeg":["jpeg","jpg","jpe"],"image/ktx":["ktx"],"image/png":["png"],"image/prs.btif":["btif"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/tiff":["tiff","tif"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/webp":["webp"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["ico"],"image/x-mrsid-image":["sid"],"image/x-pcx":["pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/rfc822":["eml","mime"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.vtu":["vtu"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["x3db","x3dbz"],"model/x3d+vrml":["x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee"],"text/css":["css"],"text/csv":["csv"],"text/hjson":["hjson"],"text/html":["html","htm"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/prs.lines.tag":["dsc"],"text/richtext":["rtx"],"text/sgml":["sgml","sgm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/vtt":["vtt"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["markdown","md","mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-pascal":["p","pas"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/webm":["webm"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}},{}],55:[function(e,t,n){"use strict";function r(e){if(!e)return s;for(var t=0;t<e.args.length;++t){var n=e.args[t];e.args[t]=0===t?{name:n,lvalue:!0,rvalue:!!e.rvalue,count:e.count||1}:{name:n,lvalue:!1,rvalue:!0,count:1}}return e.thisVars||(e.thisVars=[]),e.localVars||(e.localVars=[]),e}function i(e){return o({args:e.args,pre:r(e.pre),body:r(e.body),post:r(e.proc),funcName:e.funcName})}function a(e){for(var t=[],n=0;n<e.args.length;++n)t.push("a"+n);return new Function("P",["return function ",e.funcName,"_ndarrayops(",t.join(","),") {P(",t.join(","),");return a0}"].join(""))(i(e))}var o=e("cwise-compiler"),s={body:"",args:[],thisVars:[],localVars:[]},l={add:"+",sub:"-",mul:"*",div:"/",mod:"%",band:"&",bor:"|",bxor:"^",lshift:"<<",rshift:">>",rrshift:">>>"};!function(){for(var e in l){var t=l[e];n[e]=a({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+t+"c"},funcName:e}),n[e+"eq"]=a({args:["array","array"],body:{args:["a","b"],body:"a"+t+"=b"},rvalue:!0,funcName:e+"eq"}),n[e+"s"]=a({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+t+"s"},funcName:e+"s"}),n[e+"seq"]=a({args:["array","scalar"],body:{args:["a","s"],body:"a"+t+"=s"},rvalue:!0,funcName:e+"seq"})}}();var u={not:"!",bnot:"~",neg:"-",recip:"1.0/"};!function(){for(var e in u){var t=u[e];n[e]=a({args:["array","array"],body:{args:["a","b"],body:"a="+t+"b"},funcName:e}),n[e+"eq"]=a({args:["array"],body:{args:["a"],body:"a="+t+"a"},rvalue:!0,count:2,funcName:e+"eq"})}}();var c={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};!function(){for(var e in c){var t=c[e];n[e]=a({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+t+"c"},funcName:e}),n[e+"s"]=a({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+t+"s"},funcName:e+"s"}),n[e+"eq"]=a({args:["array","array"],body:{args:["a","b"],body:"a=a"+t+"b"},rvalue:!0,count:2,funcName:e+"eq"}),n[e+"seq"]=a({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+t+"s"},rvalue:!0,count:2,funcName:e+"seq"})}}();var f=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];!function(){for(var e=0;e<f.length;++e){var t=f[e];n[t]=a({args:["array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b)",thisVars:["this_f"]},funcName:t}),n[t+"eq"]=a({args:["array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a"],body:"a=this_f(a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"eq"})}}();var p=["max","min","atan2","pow"];!function(){for(var e=0;e<p.length;++e){var t=p[e];n[t]=a({args:["array","array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(b,c)",thisVars:["this_f"]},funcName:t}),n[t+"s"]=a({args:["array","array","scalar"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(b,c)",thisVars:["this_f"]},funcName:t+"s"}),n[t+"eq"]=a({args:["array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(a,b)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"eq"}),n[t+"seq"]=a({args:["array","scalar"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(a,b)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"seq"})}}();var h=["atan2","pow"];!function(){for(var e=0;e<h.length;++e){var t=h[e];n[t+"op"]=a({args:["array","array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(c,b)",thisVars:["this_f"]},funcName:t+"op"}),n[t+"ops"]=a({args:["array","array","scalar"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(c,b)",thisVars:["this_f"]},funcName:t+"ops"}),n[t+"opeq"]=a({args:["array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b,a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"opeq"}),n[t+"opseq"]=a({args:["array","scalar"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b,a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"opseq"})}}(),n.any=o({args:["array"],pre:s,body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"if(a){return true}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return false"},funcName:"any"}),n.all=o({args:["array"],pre:s,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1}],body:"if(!x){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"all"}),n.sum=o({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"this_s+=a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"sum"}),n.prod=o({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=1"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"this_s*=a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"prod"}),n.norm2squared=o({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:2}],body:"this_s+=a*a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm2squared"}),n.norm2=o({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:2}],body:"this_s+=a*a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return Math.sqrt(this_s)"},funcName:"norm2"}),n.norminf=o({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:4}],body:"if(-a>this_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),n.norm1=o({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),n.sup=o({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),n.inf=o({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_<this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),n.argmin=o({args:["index","array","shape"],pre:{body:"{this_v=Infinity;this_i=_inline_0_arg2_.slice(0)}",args:[{name:"_inline_0_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_i","this_v"],localVars:[]},body:{body:"{if(_inline_1_arg1_<this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),n.argmax=o({args:["index","array","shape"],pre:{body:"{this_v=-Infinity;this_i=_inline_0_arg2_.slice(0)}",args:[{name:"_inline_0_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_i","this_v"],localVars:[]},body:{body:"{if(_inline_1_arg1_>this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),n.random=a({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),n.assign=a({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),n.assigns=a({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),n.equals=o({args:["array","array"],pre:s,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})},{"cwise-compiler":20}],56:[function(e,t,n){"use strict";var r=e("ndarray"),i=e("./doConvert.js");t.exports=function(e,t){for(var n=[],a=e,o=1;Array.isArray(a);)n.push(a.length),o*=a.length,a=a[0];return 0===n.length?r():(t||(t=r(new Float64Array(o),n)),i(t,e),t)}},{"./doConvert.js":57,ndarray:58}],57:[function(e,t,n){t.exports=e("cwise-compiler")({args:["array","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}",args:[{name:"_inline_1_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:4}],thisVars:[],localVars:["_inline_1_i","_inline_1_v"]},post:{body:"{}",args:[],thisVars:[],localVars:[]},funcName:"convert",blockSize:64})},{"cwise-compiler":20}],58:[function(e,t,n){function r(e,t){return e[0]-t[0]}function i(){var e,t=this.stride,n=new Array(t.length);for(e=0;e<n.length;++e)n[e]=[Math.abs(t[e]),e];n.sort(r);var i=new Array(n.length);for(e=0;e<i.length;++e)i[e]=n[e][1];return i}function a(e,t){var n=["View",t,"d",e].join("");t<0&&(n="View_Nil"+e);var r="generic"===e;if(-1===t){a="function "+n+"(a){this.data=a;};var proto="+n+".prototype;proto.dtype='"+e+"';proto.index=function(){return -1};proto.size=0;proto.dimension=-1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function(){return new "+n+"(this.data);};proto.get=proto.set=function(){};proto.pick=function(){return null};return function construct_"+n+"(a){return new "+n+"(a);}";return(w=new Function(a))()}if(0===t){a="function "+n+"(a,d) {this.data = a;this.offset = d};var proto="+n+".prototype;proto.dtype='"+e+"';proto.index=function(){return this.offset};proto.dimension=0;proto.size=1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function "+n+"_copy() {return new "+n+"(this.data,this.offset)};proto.pick=function "+n+"_pick(){return TrivialArray(this.data);};proto.valueOf=proto.get=function "+n+"_get(){return "+(r?"this.data.get(this.offset)":"this.data[this.offset]")+"};proto.set=function "+n+"_set(v){return "+(r?"this.data.set(this.offset,v)":"this.data[this.offset]=v")+"};return function construct_"+n+"(a,b,c,d){return new "+n+"(a,d)}";return(w=new Function("TrivialArray",a))(c[e][0])}var a=["'use strict'"],o=s(t),l=o.map(function(e){return"i"+e}),u="this.offset+"+o.map(function(e){return"this.stride["+e+"]*i"+e}).join("+"),f=o.map(function(e){return"b"+e}).join(","),p=o.map(function(e){return"c"+e}).join(",");a.push("function "+n+"(a,"+f+","+p+",d){this.data=a","this.shape=["+f+"]","this.stride=["+p+"]","this.offset=d|0}","var proto="+n+".prototype","proto.dtype='"+e+"'","proto.dimension="+t),a.push("Object.defineProperty(proto,'size',{get:function "+n+"_size(){return "+o.map(function(e){return"this.shape["+e+"]"}).join("*"),"}})"),1===t?a.push("proto.order=[0]"):(a.push("Object.defineProperty(proto,'order',{get:"),t<4?(a.push("function "+n+"_order(){"),2===t?a.push("return (Math.abs(this.stride[0])>Math.abs(this.stride[1]))?[1,0]:[0,1]}})"):3===t&&a.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):a.push("ORDER})")),a.push("proto.set=function "+n+"_set("+l.join(",")+",v){"),r?a.push("return this.data.set("+u+",v)}"):a.push("return this.data["+u+"]=v}"),a.push("proto.get=function "+n+"_get("+l.join(",")+"){"),r?a.push("return this.data.get("+u+")}"):a.push("return this.data["+u+"]}"),a.push("proto.index=function "+n+"_index(",l.join(),"){return "+u+"}"),a.push("proto.hi=function "+n+"_hi("+l.join(",")+"){return new "+n+"(this.data,"+o.map(function(e){return["(typeof i",e,"!=='number'||i",e,"<0)?this.shape[",e,"]:i",e,"|0"].join("")}).join(",")+","+o.map(function(e){return"this.stride["+e+"]"}).join(",")+",this.offset)}");var h=o.map(function(e){return"a"+e+"=this.shape["+e+"]"}),d=o.map(function(e){return"c"+e+"=this.stride["+e+"]"});a.push("proto.lo=function "+n+"_lo("+l.join(",")+"){var b=this.offset,d=0,"+h.join(",")+","+d.join(","));for(v=0;v<t;++v)a.push("if(typeof i"+v+"==='number'&&i"+v+">=0){d=i"+v+"|0;b+=c"+v+"*d;a"+v+"-=d}");a.push("return new "+n+"(this.data,"+o.map(function(e){return"a"+e}).join(",")+","+o.map(function(e){return"c"+e}).join(",")+",b)}"),a.push("proto.step=function "+n+"_step("+l.join(",")+"){var "+o.map(function(e){return"a"+e+"=this.shape["+e+"]"}).join(",")+","+o.map(function(e){return"b"+e+"=this.stride["+e+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(v=0;v<t;++v)a.push("if(typeof i"+v+"==='number'){d=i"+v+"|0;if(d<0){c+=b"+v+"*(a"+v+"-1);a"+v+"=ceil(-a"+v+"/d)}else{a"+v+"=ceil(a"+v+"/d)}b"+v+"*=d}");a.push("return new "+n+"(this.data,"+o.map(function(e){return"a"+e}).join(",")+","+o.map(function(e){return"b"+e}).join(",")+",c)}");for(var g=new Array(t),m=new Array(t),v=0;v<t;++v)g[v]="a[i"+v+"]",m[v]="b[i"+v+"]";a.push("proto.transpose=function "+n+"_transpose("+l+"){"+l.map(function(e,t){return e+"=("+e+"===undefined?"+t+":"+e+"|0)"}).join(";"),"var a=this.shape,b=this.stride;return new "+n+"(this.data,"+g.join(",")+","+m.join(",")+",this.offset)}"),a.push("proto.pick=function "+n+"_pick("+l+"){var a=[],b=[],c=this.offset");for(v=0;v<t;++v)a.push("if(typeof i"+v+"==='number'&&i"+v+">=0){c=(c+this.stride["+v+"]*i"+v+")|0}else{a.push(this.shape["+v+"]);b.push(this.stride["+v+"])}");a.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),a.push("return function construct_"+n+"(data,shape,stride,offset){return new "+n+"(data,"+o.map(function(e){return"shape["+e+"]"}).join(",")+","+o.map(function(e){return"stride["+e+"]"}).join(",")+",offset)}");var w=new Function("CTOR_LIST","ORDER",a.join("\n"));return w(c[e],i)}function o(e){if(l(e))return"buffer";if(u)switch(Object.prototype.toString.call(e)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object Uint8ClampedArray]":return"uint8_clamped"}return Array.isArray(e)?"array":"generic"}var s=e("iota-array"),l=e("is-buffer"),u="undefined"!=typeof Float64Array,c={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],buffer:[],generic:[]};t.exports=function(e,t,n,r){if(void 0===e)return(p=c.array[0])([]);"number"==typeof e&&(e=[e]),void 0===t&&(t=[e.length]);var i=t.length;if(void 0===n){n=new Array(i);for(var s=i-1,l=1;s>=0;--s)n[s]=l,l*=t[s]}if(void 0===r)for(r=0,s=0;s<i;++s)n[s]<0&&(r-=(t[s]-1)*n[s]);for(var u=o(e),f=c[u];f.length<=i+1;)f.push(a(u,f.length-1));var p=f[i+1];return p(e,t,n,r)}},{"iota-array":48,"is-buffer":49}],59:[function(e,t,n){function r(e,t,n,r){function i(n){for(;p>=n;)e[t++]=255&h,h>>=8,p-=8,t===o+256&&(e[o]=255,o=t++)}function a(e){h|=e<<p,p+=f,i(8)}e[t++]=n;var o=t++,s=1<<n,l=s-1,u=s+1,c=u+1,f=n+1,p=0,h=0,d=r[0]&l,g={};a(s);for(var m=1,v=r.length;m<v;++m){var w=r[m]&l,b=d<<8|w,y=g[b];if(void 0===y){for(h|=d<<p,p+=f;p>=8;)e[t++]=255&h,h>>=8,p-=8,t===o+256&&(e[o]=255,o=t++);4096===c?(a(s),c=u+1,f=n+1,g={}):(c>=1<<f&&++f,g[b]=c++),d=w}else d=y}return a(d),a(u),i(1),o+1===t?e[o]=0:(e[o]=t-o-1,e[t++]=0),t}function i(e,t,n,r){for(var i=e[t++],a=1<<i,o=a+1,s=o+1,l=i+1,u=(1<<l)-1,c=0,f=0,p=0,h=e[t++],d=new Int32Array(4096),g=null;;){for(;c<16&&0!==h;)f|=e[t++]<<c,c+=8,1===h?h=e[t++]:--h;if(c<l)break;var m=f&u;if(f>>=l,c-=l,m!==a){if(m===o)break;for(var v=m<s?m:g,w=0,b=v;b>a;)b=d[b]>>8,++w;var y=b;if(p+w+(v!==m?1:0)>r)return void console.log("Warning, gif stream longer than expected.");n[p++]=y;var _=p+=w;for(v!==m&&(n[p++]=y),b=v;w--;)b=d[b],n[--_]=255&b,b>>=8;null!==g&&s<4096&&(d[s++]=g<<8|y,s>=u+1&&l<12&&(++l,u=u<<1|1)),g=m}else s=o+1,u=(1<<(l=i+1))-1,g=null}return p!==r&&console.log("Warning, gif stream shorter than expected."),n}try{n.GifWriter=function(e,t,n,i){function a(e){var t=e.length;if(t<2||t>256||t&t-1)throw"Invalid code/color length, must be power of 2 and 2 .. 256.";return t}var o=0,s=void 0===(i=void 0===i?{}:i).loop?null:i.loop,l=void 0===i.palette?null:i.palette;if(t<=0||n<=0||t>65535||n>65535)throw"Width/Height invalid.";e[o++]=71,e[o++]=73,e[o++]=70,e[o++]=56,e[o++]=57,e[o++]=97;var u=0,c=0;if(null!==l){for(var f=a(l);f>>=1;)++u;if(f=1<<u,--u,void 0!==i.background){if((c=i.background)>=f)throw"Background index out of range.";if(0===c)throw"Background index explicitly passed as 0."}}if(e[o++]=255&t,e[o++]=t>>8&255,e[o++]=255&n,e[o++]=n>>8&255,e[o++]=(null!==l?128:0)|u,e[o++]=c,e[o++]=0,null!==l)for(var p=0,h=l.length;p<h;++p){var d=l[p];e[o++]=d>>16&255,e[o++]=d>>8&255,e[o++]=255&d}if(null!==s){if(s<0||s>65535)throw"Loop count invalid.";e[o++]=33,e[o++]=255,e[o++]=11,e[o++]=78,e[o++]=69,e[o++]=84,e[o++]=83,e[o++]=67,e[o++]=65,e[o++]=80,e[o++]=69,e[o++]=50,e[o++]=46,e[o++]=48,e[o++]=3,e[o++]=1,e[o++]=255&s,e[o++]=s>>8&255,e[o++]=0}var g=!1;this.addFrame=function(t,n,i,s,u,c){if(!0===g&&(--o,g=!1),c=void 0===c?{}:c,t<0||n<0||t>65535||n>65535)throw"x/y invalid.";if(i<=0||s<=0||i>65535||s>65535)throw"Width/Height invalid.";if(u.length<i*s)throw"Not enough pixels for the frame size.";var f=!0,p=c.palette;if(void 0!==p&&null!==p||(f=!1,p=l),void 0===p||null===p)throw"Must supply either a local or global palette.";for(var h=a(p),d=0;h>>=1;)++d;h=1<<d;var m=void 0===c.delay?0:c.delay,v=void 0===c.disposal?0:c.disposal;if(v<0||v>3)throw"Disposal out of range.";var w=!1,b=0;if(void 0!==c.transparent&&null!==c.transparent&&(w=!0,(b=c.transparent)<0||b>=h))throw"Transparent color index.";if((0!==v||w||0!==m)&&(e[o++]=33,e[o++]=249,e[o++]=4,e[o++]=v<<2|(!0===w?1:0),e[o++]=255&m,e[o++]=m>>8&255,e[o++]=b,e[o++]=0),e[o++]=44,e[o++]=255&t,e[o++]=t>>8&255,e[o++]=255&n,e[o++]=n>>8&255,e[o++]=255&i,e[o++]=i>>8&255,e[o++]=255&s,e[o++]=s>>8&255,e[o++]=!0===f?128|d-1:0,!0===f)for(var y=0,_=p.length;y<_;++y){var x=p[y];e[o++]=x>>16&255,e[o++]=x>>8&255,e[o++]=255&x}o=r(e,o,d<2?2:d,u)},this.end=function(){return!1===g&&(e[o++]=59,g=!0),o}},n.GifReader=function(e){var t=0;if(71!==e[t++]||73!==e[t++]||70!==e[t++]||56!==e[t++]||56!=(e[t++]+1&253)||97!==e[t++])throw"Invalid GIF 87a/89a header.";var n=e[t++]|e[t++]<<8,r=e[t++]|e[t++]<<8,a=e[t++],o=a>>7,s=1<<1+(7&a);e[t++];e[t++];var l=null;o&&(l=t,t+=3*s);var u=!0,c=[],f=0,p=null,h=0,d=null;for(this.width=n,this.height=r;u&&t<e.length;)switch(e[t++]){case 33:switch(e[t++]){case 255:if(11!==e[t]||78==e[t+1]&&69==e[t+2]&&84==e[t+3]&&83==e[t+4]&&67==e[t+5]&&65==e[t+6]&&80==e[t+7]&&69==e[t+8]&&50==e[t+9]&&46==e[t+10]&&48==e[t+11]&&3==e[t+12]&&1==e[t+13]&&0==e[t+16])t+=14,d=e[t++]|e[t++]<<8,t++;else for(t+=12;0!==(S=e[t++]);)t+=S;break;case 249:if(4!==e[t++]||0!==e[t+4])throw"Invalid graphics extension block.";var g=e[t++];f=e[t++]|e[t++]<<8,p=e[t++],0==(1&g)&&(p=null),h=g>>2&7,t++;break;case 254:for(;0!==(S=e[t++]);)t+=S;break;default:throw"Unknown graphic control label: 0x"+e[t-1].toString(16)}break;case 44:var m=e[t++]|e[t++]<<8,v=e[t++]|e[t++]<<8,w=e[t++]|e[t++]<<8,b=e[t++]|e[t++]<<8,y=e[t++],_=y>>6&1,x=1<<1+(7&y),k=l,E=!1;y>>7&&(E=!0,k=t,t+=3*x);var T=t;for(t++;;){var S=e[t++];if(0===S)break;t+=S}c.push({x:m,y:v,width:w,height:b,has_local_palette:E,palette_offset:k,data_offset:T,data_length:t-T,transparent_index:p,interlaced:!!_,delay:f,disposal:h});break;case 59:u=!1;break;default:throw"Unknown gif block: 0x"+e[t-1].toString(16)}this.numFrames=function(){return c.length},this.loopCount=function(){return d},this.frameInfo=function(e){if(e<0||e>=c.length)throw"Frame index out of range.";return c[e]},this.decodeAndBlitFrameBGRA=function(t,r){var a=this.frameInfo(t),o=a.width*a.height,s=new Uint8Array(o);i(e,a.data_offset,s,o);var l=a.palette_offset,u=a.transparent_index;null===u&&(u=256);var c=a.width,f=n-c,p=c,h=4*(a.y*n+a.x),d=4*((a.y+a.height)*n+a.x),g=h,m=4*f;!0===a.interlaced&&(m+=4*n*7);for(var v=8,w=0,b=s.length;w<b;++w){var y=s[w];if(0===p&&(p=c,(g+=m)>=d&&(m=4*f+4*n*(v-1),g=h+(c+f)*(v<<1),v>>=1)),y===u)g+=4;else{var _=e[l+3*y],x=e[l+3*y+1],k=e[l+3*y+2];r[g++]=k,r[g++]=x,r[g++]=_,r[g++]=255}--p}},this.decodeAndBlitFrameRGBA=function(t,r){var a=this.frameInfo(t),o=a.width*a.height,s=new Uint8Array(o);i(e,a.data_offset,s,o);var l=a.palette_offset,u=a.transparent_index;null===u&&(u=256);var c=a.width,f=n-c,p=c,h=4*(a.y*n+a.x),d=4*((a.y+a.height)*n+a.x),g=h,m=4*f;!0===a.interlaced&&(m+=4*n*7);for(var v=8,w=0,b=s.length;w<b;++w){var y=s[w];if(0===p&&(p=c,(g+=m)>=d&&(m=4*f+4*n*(v-1),g=h+(c+f)*(v<<1),v>>=1)),y===u)g+=4;else{var _=e[l+3*y],x=e[l+3*y+1],k=e[l+3*y+2];r[g++]=_,r[g++]=x,r[g++]=k,r[g++]=255}--p}}}}catch(e){}},{}],60:[function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;n.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){var t,n,r,i,a,o;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(o=new Uint8Array(r),i=0,t=0,n=e.length;t<n;t++)a=e[t],o.set(a,i),i+=a.length;return o}},a={arraySet:function(e,t,n,r,i){for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,i)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,a))},n.setTyped(r)},{}],61:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;0!==n;){n-=o=n>2e3?2e3:n;do{a=a+(i=i+t[r++]|0)|0}while(--o);i%=65521,a%=65521}return i|a<<16|0}},{}],62:[function(e,t,n){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],63:[function(e,t,n){"use strict";var r=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var a=r,o=i+n;e^=-1;for(var s=i;s<o;s++)e=e>>>8^a[255&(e^t[s])];return-1^e}},{}],64:[function(e,t,n){"use strict";function r(e,t){return e.msg=C[t],t}function i(e){return(e<<1)-(e>4?9:0)}function a(e){for(var t=e.length;--t>=0;)e[t]=0}function o(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(E.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function s(e,t){T._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,o(e.strm)}function l(e,t){e.pending_buf[e.pending++]=t}function u(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function c(e,t,n,r){var i=e.avail_in;return i>r&&(i=r),0===i?0:(e.avail_in-=i,E.arraySet(t,e.input,e.next_in,i,n),1===e.state.wrap?e.adler=S(e.adler,t,i,n):2===e.state.wrap&&(e.adler=A(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function f(e,t){var n,r,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-re?e.strstart-(e.w_size-re):0,u=e.window,c=e.w_mask,f=e.prev,p=e.strstart+ne,h=u[a+o-1],d=u[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(n=t,u[n+o]===d&&u[n+o-1]===h&&u[n]===u[a]&&u[++n]===u[a+1]){a+=2,n++;do{}while(u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&a<p);if(r=ne-(p-a),a=p-ne,r>o){if(e.match_start=t,o=r,r>=s)break;h=u[a+o-1],d=u[a+o]}}}while((t=f[t&c])>l&&0!=--i);return o<=e.lookahead?o:e.lookahead}function p(e){var t,n,r,i,a,o=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=o+(o-re)){E.arraySet(e.window,e.window,o,o,0),e.match_start-=o,e.strstart-=o,e.block_start-=o,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=o?r-o:0}while(--n);t=n=o;do{r=e.prev[--t],e.prev[t]=r>=o?r-o:0}while(--n);i+=o}if(0===e.strm.avail_in)break;if(n=c(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=n,e.lookahead+e.insert>=te)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+te-1])&e.hash_mask,e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<te)););}while(e.lookahead<re&&0!==e.strm.avail_in)}function h(e,t){for(var n,r;;){if(e.lookahead<re){if(p(e),e.lookahead<re&&t===R)return pe;if(0===e.lookahead)break}if(n=0,e.lookahead>=te&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+te-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-re&&(e.match_length=f(e,n)),e.match_length>=te)if(r=T._tr_tally(e,e.strstart-e.match_start,e.match_length-te),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=te){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+te-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=T._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(s(e,!1),0===e.strm.avail_out))return pe}return e.insert=e.strstart<te-1?e.strstart:te-1,t===j?(s(e,!0),0===e.strm.avail_out?de:ge):e.last_lit&&(s(e,!1),0===e.strm.avail_out)?pe:he}function d(e,t){for(var n,r,i;;){if(e.lookahead<re){if(p(e),e.lookahead<re&&t===R)return pe;if(0===e.lookahead)break}if(n=0,e.lookahead>=te&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+te-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=te-1,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-re&&(e.match_length=f(e,n),e.match_length<=5&&(e.strategy===F||e.match_length===te&&e.strstart-e.match_start>4096)&&(e.match_length=te-1)),e.prev_length>=te&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-te,r=T._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-te),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+te-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=te-1,e.strstart++,r&&(s(e,!1),0===e.strm.avail_out))return pe}else if(e.match_available){if((r=T._tr_tally(e,0,e.window[e.strstart-1]))&&s(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return pe}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=T._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<te-1?e.strstart:te-1,t===j?(s(e,!0),0===e.strm.avail_out?de:ge):e.last_lit&&(s(e,!1),0===e.strm.avail_out)?pe:he}function g(e,t){for(var n,r,i,a,o=e.window;;){if(e.lookahead<=ne){if(p(e),e.lookahead<=ne&&t===R)return pe;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=te&&e.strstart>0&&(i=e.strstart-1,(r=o[i])===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+ne;do{}while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);e.match_length=ne-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=te?(n=T._tr_tally(e,1,e.match_length-te),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=T._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(s(e,!1),0===e.strm.avail_out))return pe}return e.insert=0,t===j?(s(e,!0),0===e.strm.avail_out?de:ge):e.last_lit&&(s(e,!1),0===e.strm.avail_out)?pe:he}function m(e,t){for(var n;;){if(0===e.lookahead&&(p(e),0===e.lookahead)){if(t===R)return pe;break}if(e.match_length=0,n=T._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(s(e,!1),0===e.strm.avail_out))return pe}return e.insert=0,t===j?(s(e,!0),0===e.strm.avail_out?de:ge):e.last_lit&&(s(e,!1),0===e.strm.avail_out)?pe:he}function v(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function w(e){e.window_size=2*e.w_size,a(e.head),e.max_lazy_match=k[e.level].max_lazy,e.good_match=k[e.level].good_length,e.nice_match=k[e.level].nice_length,e.max_chain_length=k[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=te-1,e.match_available=0,e.ins_h=0}function b(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=G,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new E.Buf16(2*K),this.dyn_dtree=new E.Buf16(2*(2*Q+1)),this.bl_tree=new E.Buf16(2*(2*J+1)),a(this.dyn_ltree),a(this.dyn_dtree),a(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new E.Buf16(ee+1),this.heap=new E.Buf16(2*$+1),a(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new E.Buf16(2*$+1),a(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function y(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=W,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?ae:ce,e.adler=2===t.wrap?0:1,t.last_flush=R,T._tr_init(t),D):r(e,N)}function _(e){var t=y(e);return t===D&&w(e.state),t}function x(e,t,n,i,a,o){if(!e)return N;var s=1;if(t===z&&(t=6),i<0?(s=0,i=-i):i>15&&(s=2,i-=16),a<1||a>Z||n!==G||i<8||i>15||t<0||t>9||o<0||o>H)return r(e,N);8===i&&(i=9);var l=new b;return e.state=l,l.strm=e,l.wrap=s,l.gzhead=null,l.w_bits=i,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=a+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+te-1)/te),l.window=new E.Buf8(2*l.w_size),l.head=new E.Buf16(l.hash_size),l.prev=new E.Buf16(l.w_size),l.lit_bufsize=1<<a+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new E.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=t,l.strategy=o,l.method=n,_(e)}var k,E=e("../utils/common"),T=e("./trees"),S=e("./adler32"),A=e("./crc32"),C=e("./messages"),R=0,M=1,L=3,j=4,I=5,D=0,B=1,N=-2,P=-3,O=-5,z=-1,F=1,U=2,q=3,H=4,V=0,W=2,G=8,Z=9,Y=15,X=8,$=286,Q=30,J=19,K=2*$+1,ee=15,te=3,ne=258,re=ne+te+1,ie=32,ae=42,oe=69,se=73,le=91,ue=103,ce=113,fe=666,pe=1,he=2,de=3,ge=4,me=3;k=[new v(0,0,0,0,function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(p(e),0===e.lookahead&&t===R)return pe;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,s(e,!1),0===e.strm.avail_out))return pe;if(e.strstart-e.block_start>=e.w_size-re&&(s(e,!1),0===e.strm.avail_out))return pe}return e.insert=0,t===j?(s(e,!0),0===e.strm.avail_out?de:ge):(e.strstart>e.block_start&&(s(e,!1),e.strm.avail_out),pe)}),new v(4,4,8,4,h),new v(4,5,16,8,h),new v(4,6,32,32,h),new v(4,4,16,16,d),new v(8,16,32,32,d),new v(8,16,128,128,d),new v(8,32,128,256,d),new v(32,128,258,1024,d),new v(32,258,258,4096,d)],n.deflateInit=function(e,t){return x(e,t,G,Y,X,V)},n.deflateInit2=x,n.deflateReset=_,n.deflateResetKeep=y,n.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?N:(e.state.gzhead=t,D):N},n.deflate=function(e,t){var n,s,c,f;if(!e||!e.state||t>I||t<0)return e?r(e,N):N;if(s=e.state,!e.output||!e.input&&0!==e.avail_in||s.status===fe&&t!==j)return r(e,0===e.avail_out?O:N);if(s.strm=e,n=s.last_flush,s.last_flush=t,s.status===ae)if(2===s.wrap)e.adler=0,l(s,31),l(s,139),l(s,8),s.gzhead?(l(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),l(s,255&s.gzhead.time),l(s,s.gzhead.time>>8&255),l(s,s.gzhead.time>>16&255),l(s,s.gzhead.time>>24&255),l(s,9===s.level?2:s.strategy>=U||s.level<2?4:0),l(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(l(s,255&s.gzhead.extra.length),l(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(e.adler=A(e.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=oe):(l(s,0),l(s,0),l(s,0),l(s,0),l(s,0),l(s,9===s.level?2:s.strategy>=U||s.level<2?4:0),l(s,me),s.status=ce);else{var p=G+(s.w_bits-8<<4)<<8;p|=(s.strategy>=U||s.level<2?0:s.level<6?1:6===s.level?2:3)<<6,0!==s.strstart&&(p|=ie),p+=31-p%31,s.status=ce,u(s,p),0!==s.strstart&&(u(s,e.adler>>>16),u(s,65535&e.adler)),e.adler=1}if(s.status===oe)if(s.gzhead.extra){for(c=s.pending;s.gzindex<(65535&s.gzhead.extra.length)&&(s.pending!==s.pending_buf_size||(s.gzhead.hcrc&&s.pending>c&&(e.adler=A(e.adler,s.pending_buf,s.pending-c,c)),o(e),c=s.pending,s.pending!==s.pending_buf_size));)l(s,255&s.gzhead.extra[s.gzindex]),s.gzindex++;s.gzhead.hcrc&&s.pending>c&&(e.adler=A(e.adler,s.pending_buf,s.pending-c,c)),s.gzindex===s.gzhead.extra.length&&(s.gzindex=0,s.status=se)}else s.status=se;if(s.status===se)if(s.gzhead.name){c=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>c&&(e.adler=A(e.adler,s.pending_buf,s.pending-c,c)),o(e),c=s.pending,s.pending===s.pending_buf_size)){f=1;break}f=s.gzindex<s.gzhead.name.length?255&s.gzhead.name.charCodeAt(s.gzindex++):0,l(s,f)}while(0!==f);s.gzhead.hcrc&&s.pending>c&&(e.adler=A(e.adler,s.pending_buf,s.pending-c,c)),0===f&&(s.gzindex=0,s.status=le)}else s.status=le;if(s.status===le)if(s.gzhead.comment){c=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>c&&(e.adler=A(e.adler,s.pending_buf,s.pending-c,c)),o(e),c=s.pending,s.pending===s.pending_buf_size)){f=1;break}f=s.gzindex<s.gzhead.comment.length?255&s.gzhead.comment.charCodeAt(s.gzindex++):0,l(s,f)}while(0!==f);s.gzhead.hcrc&&s.pending>c&&(e.adler=A(e.adler,s.pending_buf,s.pending-c,c)),0===f&&(s.status=ue)}else s.status=ue;if(s.status===ue&&(s.gzhead.hcrc?(s.pending+2>s.pending_buf_size&&o(e),s.pending+2<=s.pending_buf_size&&(l(s,255&e.adler),l(s,e.adler>>8&255),e.adler=0,s.status=ce)):s.status=ce),0!==s.pending){if(o(e),0===e.avail_out)return s.last_flush=-1,D}else if(0===e.avail_in&&i(t)<=i(n)&&t!==j)return r(e,O);if(s.status===fe&&0!==e.avail_in)return r(e,O);if(0!==e.avail_in||0!==s.lookahead||t!==R&&s.status!==fe){var h=s.strategy===U?m(s,t):s.strategy===q?g(s,t):k[s.level].func(s,t);if(h!==de&&h!==ge||(s.status=fe),h===pe||h===de)return 0===e.avail_out&&(s.last_flush=-1),D;if(h===he&&(t===M?T._tr_align(s):t!==I&&(T._tr_stored_block(s,0,0,!1),t===L&&(a(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),o(e),0===e.avail_out))return s.last_flush=-1,D}return t!==j?D:s.wrap<=0?B:(2===s.wrap?(l(s,255&e.adler),l(s,e.adler>>8&255),l(s,e.adler>>16&255),l(s,e.adler>>24&255),l(s,255&e.total_in),l(s,e.total_in>>8&255),l(s,e.total_in>>16&255),l(s,e.total_in>>24&255)):(u(s,e.adler>>>16),u(s,65535&e.adler)),o(e),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?D:B)},n.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==ae&&t!==oe&&t!==se&&t!==le&&t!==ue&&t!==ce&&t!==fe?r(e,N):(e.state=null,t===ce?r(e,P):D):N},n.deflateSetDictionary=function(e,t){var n,r,i,o,s,l,u,c,f=t.length;if(!e||!e.state)return N;if(n=e.state,2===(o=n.wrap)||1===o&&n.status!==ae||n.lookahead)return N;for(1===o&&(e.adler=S(e.adler,t,f,0)),n.wrap=0,f>=n.w_size&&(0===o&&(a(n.head),n.strstart=0,n.block_start=0,n.insert=0),c=new E.Buf8(n.w_size),E.arraySet(c,t,f-n.w_size,n.w_size,0),t=c,f=n.w_size),s=e.avail_in,l=e.next_in,u=e.input,e.avail_in=f,e.next_in=0,e.input=t,p(n);n.lookahead>=te;){r=n.strstart,i=n.lookahead-(te-1);do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+te-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++}while(--i);n.strstart=r,n.lookahead=te-1,p(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=te-1,n.match_available=0,e.next_in=l,e.input=u,e.avail_in=s,n.wrap=o,D},n.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":60,"./adler32":61,"./crc32":63,"./messages":68,"./trees":69}],65:[function(e,t,n){"use strict";t.exports=function(e,t){var n,r,i,a,o,s,l,u,c,f,p,h,d,g,m,v,w,b,y,_,x,k,E,T,S;n=e.state,r=e.next_in,T=e.input,i=r+(e.avail_in-5),a=e.next_out,S=e.output,o=a-(t-e.avail_out),s=a+(e.avail_out-257),l=n.dmax,u=n.wsize,c=n.whave,f=n.wnext,p=n.window,h=n.hold,d=n.bits,g=n.lencode,m=n.distcode,v=(1<<n.lenbits)-1,w=(1<<n.distbits)-1;e:do{d<15&&(h+=T[r++]<<d,d+=8,h+=T[r++]<<d,d+=8),b=g[h&v];t:for(;;){if(y=b>>>24,h>>>=y,d-=y,0===(y=b>>>16&255))S[a++]=65535&b;else{if(!(16&y)){if(0==(64&y)){b=g[(65535&b)+(h&(1<<y)-1)];continue t}if(32&y){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}_=65535&b,(y&=15)&&(d<y&&(h+=T[r++]<<d,d+=8),_+=h&(1<<y)-1,h>>>=y,d-=y),d<15&&(h+=T[r++]<<d,d+=8,h+=T[r++]<<d,d+=8),b=m[h&w];n:for(;;){if(y=b>>>24,h>>>=y,d-=y,!(16&(y=b>>>16&255))){if(0==(64&y)){b=m[(65535&b)+(h&(1<<y)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(x=65535&b,y&=15,d<y&&(h+=T[r++]<<d,(d+=8)<y&&(h+=T[r++]<<d,d+=8)),(x+=h&(1<<y)-1)>l){e.msg="invalid distance too far back",n.mode=30;break e}if(h>>>=y,d-=y,y=a-o,x>y){if((y=x-y)>c&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(k=0,E=p,0===f){if(k+=u-y,y<_){_-=y;do{S[a++]=p[k++]}while(--y);k=a-x,E=S}}else if(f<y){if(k+=u+f-y,(y-=f)<_){_-=y;do{S[a++]=p[k++]}while(--y);if(k=0,f<_){_-=y=f;do{S[a++]=p[k++]}while(--y);k=a-x,E=S}}}else if(k+=f-y,y<_){_-=y;do{S[a++]=p[k++]}while(--y);k=a-x,E=S}for(;_>2;)S[a++]=E[k++],S[a++]=E[k++],S[a++]=E[k++],_-=3;_&&(S[a++]=E[k++],_>1&&(S[a++]=E[k++]))}else{k=a-x;do{S[a++]=S[k++],S[a++]=S[k++],S[a++]=S[k++],_-=3}while(_>2);_&&(S[a++]=S[k++],_>1&&(S[a++]=S[k++]))}break}}break}}while(r<i&&a<s);r-=_=d>>3,h&=(1<<(d-=_<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r<i?i-r+5:5-(r-i),e.avail_out=a<s?s-a+257:257-(a-s),n.hold=h,n.bits=d}},{}],66:[function(e,t,n){"use strict";function r(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function i(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new h.Buf16(320),this.work=new h.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=j,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new h.Buf32(ce),t.distcode=t.distdyn=new h.Buf32(fe),t.sane=1,t.back=-1,E):A}function o(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,a(e)):A}function s(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?A:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,o(e))):A}function l(e,t){var n,r;return e?(r=new i,e.state=r,r.window=null,(n=s(e,t))!==E&&(e.state=null),n):A}function u(e){if(he){var t;for(f=new h.Buf32(512),p=new h.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(v(b,e.lens,0,288,f,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;v(y,e.lens,0,32,p,0,e.work,{bits:5}),he=!1}e.lencode=f,e.lenbits=9,e.distcode=p,e.distbits=5}function c(e,t,n,r){var i,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new h.Buf8(a.wsize)),r>=a.wsize?(h.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((i=a.wsize-a.wnext)>r&&(i=r),h.arraySet(a.window,t,n-r,i,a.wnext),(r-=i)?(h.arraySet(a.window,t,n-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0}var f,p,h=e("../utils/common"),d=e("./adler32"),g=e("./crc32"),m=e("./inffast"),v=e("./inftrees"),w=0,b=1,y=2,_=4,x=5,k=6,E=0,T=1,S=2,A=-2,C=-3,R=-4,M=-5,L=8,j=1,I=2,D=3,B=4,N=5,P=6,O=7,z=8,F=9,U=10,q=11,H=12,V=13,W=14,G=15,Z=16,Y=17,X=18,$=19,Q=20,J=21,K=22,ee=23,te=24,ne=25,re=26,ie=27,ae=28,oe=29,se=30,le=31,ue=32,ce=852,fe=592,pe=15,he=!0;n.inflateReset=o,n.inflateReset2=s,n.inflateResetKeep=a,n.inflateInit=function(e){return l(e,pe)},n.inflateInit2=l,n.inflate=function(e,t){var n,i,a,o,s,l,f,p,ce,fe,pe,he,de,ge,me,ve,we,be,ye,_e,xe,ke,Ee,Te,Se=0,Ae=new h.Buf8(4),Ce=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return A;(n=e.state).mode===H&&(n.mode=V),s=e.next_out,a=e.output,f=e.avail_out,o=e.next_in,i=e.input,l=e.avail_in,p=n.hold,ce=n.bits,fe=l,pe=f,ke=E;e:for(;;)switch(n.mode){case j:if(0===n.wrap){n.mode=V;break}for(;ce<16;){if(0===l)break e;l--,p+=i[o++]<<ce,ce+=8}if(2&n.wrap&&35615===p){n.check=0,Ae[0]=255&p,Ae[1]=p>>>8&255,n.check=g(n.check,Ae,2,0),p=0,ce=0,n.mode=I;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&p)<<8)+(p>>8))%31){e.msg="incorrect header check",n.mode=se;break}if((15&p)!==L){e.msg="unknown compression method",n.mode=se;break}if(p>>>=4,ce-=4,xe=8+(15&p),0===n.wbits)n.wbits=xe;else if(xe>n.wbits){e.msg="invalid window size",n.mode=se;break}n.dmax=1<<xe,e.adler=n.check=1,n.mode=512&p?U:H,p=0,ce=0;break;case I:for(;ce<16;){if(0===l)break e;l--,p+=i[o++]<<ce,ce+=8}if(n.flags=p,(255&n.flags)!==L){e.msg="unknown compression method",n.mode=se;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=se;break}n.head&&(n.head.text=p>>8&1),512&n.flags&&(Ae[0]=255&p,Ae[1]=p>>>8&255,n.check=g(n.check,Ae,2,0)),p=0,ce=0,n.mode=D;case D:for(;ce<32;){if(0===l)break e;l--,p+=i[o++]<<ce,ce+=8}n.head&&(n.head.time=p),512&n.flags&&(Ae[0]=255&p,Ae[1]=p>>>8&255,Ae[2]=p>>>16&255,Ae[3]=p>>>24&255,n.check=g(n.check,Ae,4,0)),p=0,ce=0,n.mode=B;case B:for(;ce<16;){if(0===l)break e;l--,p+=i[o++]<<ce,ce+=8}n.head&&(n.head.xflags=255&p,n.head.os=p>>8),512&n.flags&&(Ae[0]=255&p,Ae[1]=p>>>8&255,n.check=g(n.check,Ae,2,0)),p=0,ce=0,n.mode=N;case N:if(1024&n.flags){for(;ce<16;){if(0===l)break e;l--,p+=i[o++]<<ce,ce+=8}n.length=p,n.head&&(n.head.extra_len=p),512&n.flags&&(Ae[0]=255&p,Ae[1]=p>>>8&255,n.check=g(n.check,Ae,2,0)),p=0,ce=0}else n.head&&(n.head.extra=null);n.mode=P;case P:if(1024&n.flags&&((he=n.length)>l&&(he=l),he&&(n.head&&(xe=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),h.arraySet(n.head.extra,i,o,he,xe)),512&n.flags&&(n.check=g(n.check,i,he,o)),l-=he,o+=he,n.length-=he),n.length))break e;n.length=0,n.mode=O;case O:if(2048&n.flags){if(0===l)break e;he=0;do{xe=i[o+he++],n.head&&xe&&n.length<65536&&(n.head.name+=String.fromCharCode(xe))}while(xe&&he<l);if(512&n.flags&&(n.check=g(n.check,i,he,o)),l-=he,o+=he,xe)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=z;case z:if(4096&n.flags){if(0===l)break e;he=0;do{xe=i[o+he++],n.head&&xe&&n.length<65536&&(n.head.comment+=String.fromCharCode(xe))}while(xe&&he<l);if(512&n.flags&&(n.check=g(n.check,i,he,o)),l-=he,o+=he,xe)break e}else n.head&&(n.head.comment=null);n.mode=F;case F:if(512&n.flags){for(;ce<16;){if(0===l)break e;l--,p+=i[o++]<<ce,ce+=8}if(p!==(65535&n.check)){e.msg="header crc mismatch",n.mode=se;break}p=0,ce=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=H;break;case U:for(;ce<32;){if(0===l)break e;l--,p+=i[o++]<<ce,ce+=8}e.adler=n.check=r(p),p=0,ce=0,n.mode=q;case q:if(0===n.havedict)return e.next_out=s,e.avail_out=f,e.next_in=o,e.avail_in=l,n.hold=p,n.bits=ce,S;e.adler=n.check=1,n.mode=H;case H:if(t===x||t===k)break e;case V:if(n.last){p>>>=7&ce,ce-=7&ce,n.mode=ie;break}for(;ce<3;){if(0===l)break e;l--,p+=i[o++]<<ce,ce+=8}switch(n.last=1&p,p>>>=1,ce-=1,3&p){case 0:n.mode=W;break;case 1:if(u(n),n.mode=Q,t===k){p>>>=2,ce-=2;break e}break;case 2:n.mode=Y;break;case 3:e.msg="invalid block type",n.mode=se}p>>>=2,ce-=2;break;case W:for(p>>>=7&ce,ce-=7&ce;ce<32;){if(0===l)break e;l--,p+=i[o++]<<ce,ce+=8}if((65535&p)!=(p>>>16^65535)){e.msg="invalid stored block lengths",n.mode=se;break}if(n.length=65535&p,p=0,ce=0,n.mode=G,t===k)break e;case G:n.mode=Z;case Z:if(he=n.length){if(he>l&&(he=l),he>f&&(he=f),0===he)break e;h.arraySet(a,i,o,he,s),l-=he,o+=he,f-=he,s+=he,n.length-=he;break}n.mode=H;break;case Y:for(;ce<14;){if(0===l)break e;l--,p+=i[o++]<<ce,ce+=8}if(n.nlen=257+(31&p),p>>>=5,ce-=5,n.ndist=1+(31&p),p>>>=5,ce-=5,n.ncode=4+(15&p),p>>>=4,ce-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=se;break}n.have=0,n.mode=X;case X:for(;n.have<n.ncode;){for(;ce<3;){if(0===l)break e;l--,p+=i[o++]<<ce,ce+=8}n.lens[Ce[n.have++]]=7&p,p>>>=3,ce-=3}for(;n.have<19;)n.lens[Ce[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,Ee={bits:n.lenbits},ke=v(w,n.lens,0,19,n.lencode,0,n.work,Ee),n.lenbits=Ee.bits,ke){e.msg="invalid code lengths set",n.mode=se;break}n.have=0,n.mode=$;case $:for(;n.have<n.nlen+n.ndist;){for(;Se=n.lencode[p&(1<<n.lenbits)-1],me=Se>>>24,ve=Se>>>16&255,we=65535&Se,!(me<=ce);){if(0===l)break e;l--,p+=i[o++]<<ce,ce+=8}if(we<16)p>>>=me,ce-=me,n.lens[n.have++]=we;else{if(16===we){for(Te=me+2;ce<Te;){if(0===l)break e;l--,p+=i[o++]<<ce,ce+=8}if(p>>>=me,ce-=me,0===n.have){e.msg="invalid bit length repeat",n.mode=se;break}xe=n.lens[n.have-1],he=3+(3&p),p>>>=2,ce-=2}else if(17===we){for(Te=me+3;ce<Te;){if(0===l)break e;l--,p+=i[o++]<<ce,ce+=8}ce-=me,xe=0,he=3+(7&(p>>>=me)),p>>>=3,ce-=3}else{for(Te=me+7;ce<Te;){if(0===l)break e;l--,p+=i[o++]<<ce,ce+=8}ce-=me,xe=0,he=11+(127&(p>>>=me)),p>>>=7,ce-=7}if(n.have+he>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=se;break}for(;he--;)n.lens[n.have++]=xe}}if(n.mode===se)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=se;break}if(n.lenbits=9,Ee={bits:n.lenbits},ke=v(b,n.lens,0,n.nlen,n.lencode,0,n.work,Ee),n.lenbits=Ee.bits,ke){e.msg="invalid literal/lengths set",n.mode=se;break}if(n.distbits=6,n.distcode=n.distdyn,Ee={bits:n.distbits},ke=v(y,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,Ee),n.distbits=Ee.bits,ke){e.msg="invalid distances set",n.mode=se;break}if(n.mode=Q,t===k)break e;case Q:n.mode=J;case J:if(l>=6&&f>=258){e.next_out=s,e.avail_out=f,e.next_in=o,e.avail_in=l,n.hold=p,n.bits=ce,m(e,pe),s=e.next_out,a=e.output,f=e.avail_out,o=e.next_in,i=e.input,l=e.avail_in,p=n.hold,ce=n.bits,n.mode===H&&(n.back=-1);break}for(n.back=0;Se=n.lencode[p&(1<<n.lenbits)-1],me=Se>>>24,ve=Se>>>16&255,we=65535&Se,!(me<=ce);){if(0===l)break e;l--,p+=i[o++]<<ce,ce+=8}if(ve&&0==(240&ve)){for(be=me,ye=ve,_e=we;Se=n.lencode[_e+((p&(1<<be+ye)-1)>>be)],me=Se>>>24,ve=Se>>>16&255,we=65535&Se,!(be+me<=ce);){if(0===l)break e;l--,p+=i[o++]<<ce,ce+=8}p>>>=be,ce-=be,n.back+=be}if(p>>>=me,ce-=me,n.back+=me,n.length=we,0===ve){n.mode=re;break}if(32&ve){n.back=-1,n.mode=H;break}if(64&ve){e.msg="invalid literal/length code",n.mode=se;break}n.extra=15&ve,n.mode=K;case K:if(n.extra){for(Te=n.extra;ce<Te;){if(0===l)break e;l--,p+=i[o++]<<ce,ce+=8}n.length+=p&(1<<n.extra)-1,p>>>=n.extra,ce-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=ee;case ee:for(;Se=n.distcode[p&(1<<n.distbits)-1],me=Se>>>24,ve=Se>>>16&255,we=65535&Se,!(me<=ce);){if(0===l)break e;l--,p+=i[o++]<<ce,ce+=8}if(0==(240&ve)){for(be=me,ye=ve,_e=we;Se=n.distcode[_e+((p&(1<<be+ye)-1)>>be)],me=Se>>>24,ve=Se>>>16&255,we=65535&Se,!(be+me<=ce);){if(0===l)break e;l--,p+=i[o++]<<ce,ce+=8}p>>>=be,ce-=be,n.back+=be}if(p>>>=me,ce-=me,n.back+=me,64&ve){e.msg="invalid distance code",n.mode=se;break}n.offset=we,n.extra=15&ve,n.mode=te;case te:if(n.extra){for(Te=n.extra;ce<Te;){if(0===l)break e;l--,p+=i[o++]<<ce,ce+=8}n.offset+=p&(1<<n.extra)-1,p>>>=n.extra,ce-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=se;break}n.mode=ne;case ne:if(0===f)break e;if(he=pe-f,n.offset>he){if((he=n.offset-he)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=se;break}he>n.wnext?(he-=n.wnext,de=n.wsize-he):de=n.wnext-he,he>n.length&&(he=n.length),ge=n.window}else ge=a,de=s-n.offset,he=n.length;he>f&&(he=f),f-=he,n.length-=he;do{a[s++]=ge[de++]}while(--he);0===n.length&&(n.mode=J);break;case re:if(0===f)break e;a[s++]=n.length,f--,n.mode=J;break;case ie:if(n.wrap){for(;ce<32;){if(0===l)break e;l--,p|=i[o++]<<ce,ce+=8}if(pe-=f,e.total_out+=pe,n.total+=pe,pe&&(e.adler=n.check=n.flags?g(n.check,a,pe,s-pe):d(n.check,a,pe,s-pe)),pe=f,(n.flags?p:r(p))!==n.check){e.msg="incorrect data check",n.mode=se;break}p=0,ce=0}n.mode=ae;case ae:if(n.wrap&&n.flags){for(;ce<32;){if(0===l)break e;l--,p+=i[o++]<<ce,ce+=8}if(p!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=se;break}p=0,ce=0}n.mode=oe;case oe:ke=T;break e;case se:ke=C;break e;case le:return R;case ue:default:return A}return e.next_out=s,e.avail_out=f,e.next_in=o,e.avail_in=l,n.hold=p,n.bits=ce,(n.wsize||pe!==e.avail_out&&n.mode<se&&(n.mode<ie||t!==_))&&c(e,e.output,e.next_out,pe-e.avail_out)?(n.mode=le,R):(fe-=e.avail_in,pe-=e.avail_out,e.total_in+=fe,e.total_out+=pe,n.total+=pe,n.wrap&&pe&&(e.adler=n.check=n.flags?g(n.check,a,pe,e.next_out-pe):d(n.check,a,pe,e.next_out-pe)),e.data_type=n.bits+(n.last?64:0)+(n.mode===H?128:0)+(n.mode===Q||n.mode===G?256:0),(0===fe&&0===pe||t===_)&&ke===E&&(ke=M),ke)},n.inflateEnd=function(e){if(!e||!e.state)return A;var t=e.state;return t.window&&(t.window=null),e.state=null,E},n.inflateGetHeader=function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?A:(n.head=t,t.done=!1,E):A},n.inflateSetDictionary=function(e,t){var n,r,i=t.length;return e&&e.state?0!==(n=e.state).wrap&&n.mode!==q?A:n.mode===q&&(r=1,(r=d(r,t,i,0))!==n.check)?C:c(e,t,i,i)?(n.mode=le,R):(n.havedict=1,E):A},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":60,"./adler32":61,"./crc32":63,"./inffast":65,"./inftrees":67}],67:[function(e,t,n){"use strict";var r=e("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],o=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,n,l,u,c,f,p){var h,d,g,m,v,w,b,y,_,x=p.bits,k=0,E=0,T=0,S=0,A=0,C=0,R=0,M=0,L=0,j=0,I=null,D=0,B=new r.Buf16(16),N=new r.Buf16(16),P=null,O=0;for(k=0;k<=15;k++)B[k]=0;for(E=0;E<l;E++)B[t[n+E]]++;for(A=x,S=15;S>=1&&0===B[S];S--);if(A>S&&(A=S),0===S)return u[c++]=20971520,u[c++]=20971520,p.bits=1,0;for(T=1;T<S&&0===B[T];T++);for(A<T&&(A=T),M=1,k=1;k<=15;k++)if(M<<=1,(M-=B[k])<0)return-1;if(M>0&&(0===e||1!==S))return-1;for(N[1]=0,k=1;k<15;k++)N[k+1]=N[k]+B[k];for(E=0;E<l;E++)0!==t[n+E]&&(f[N[t[n+E]]++]=E);if(0===e?(I=P=f,w=19):1===e?(I=i,D-=257,P=a,O-=257,w=256):(I=o,P=s,w=-1),j=0,E=0,k=T,v=c,C=A,R=0,g=-1,L=1<<A,m=L-1,1===e&&L>852||2===e&&L>592)return 1;for(;;){0,b=k-R,f[E]<w?(y=0,_=f[E]):f[E]>w?(y=P[O+f[E]],_=I[D+f[E]]):(y=96,_=0),h=1<<k-R,T=d=1<<C;do{u[v+(j>>R)+(d-=h)]=b<<24|y<<16|_|0}while(0!==d);for(h=1<<k-1;j&h;)h>>=1;if(0!==h?(j&=h-1,j+=h):j=0,E++,0==--B[k]){if(k===S)break;k=t[n+f[E]]}if(k>A&&(j&m)!==g){for(0===R&&(R=A),v+=T,M=1<<(C=k-R);C+R<S&&!((M-=B[C+R])<=0);)C++,M<<=1;if(L+=1<<C,1===e&&L>852||2===e&&L>592)return 1;u[g=j&m]=A<<24|C<<16|v-c|0}}return 0!==j&&(u[v+j]=k-R<<24|64<<16|0),p.bits=A,0}},{"../utils/common":60}],68:[function(e,t,n){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],69:[function(e,t,n){"use strict";function r(e){for(var t=e.length;--t>=0;)e[t]=0}function i(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function a(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function o(e){return e<256?te[e]:te[256+(e>>>7)]}function s(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function l(e,t,n){e.bi_valid>H-n?(e.bi_buf|=t<<e.bi_valid&65535,s(e,e.bi_buf),e.bi_buf=t>>H-e.bi_valid,e.bi_valid+=n-H):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function u(e,t,n){l(e,n[2*t],n[2*t+1])}function c(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function f(e){16===e.bi_valid?(s(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}function p(e,t){var n,r,i,a,o,s,l=t.dyn_tree,u=t.max_code,c=t.stat_desc.static_tree,f=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,d=t.stat_desc.max_length,g=0;for(a=0;a<=q;a++)e.bl_count[a]=0;for(l[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<U;n++)(a=l[2*l[2*(r=e.heap[n])+1]+1]+1)>d&&(a=d,g++),l[2*r+1]=a,r>u||(e.bl_count[a]++,o=0,r>=h&&(o=p[r-h]),s=l[2*r],e.opt_len+=s*(a+o),f&&(e.static_len+=s*(c[2*r+1]+o)));if(0!==g){do{for(a=d-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[d]--,g-=2}while(g>0);for(a=d;0!==a;a--)for(r=e.bl_count[a];0!==r;)(i=e.heap[--n])>u||(l[2*i+1]!==a&&(e.opt_len+=(a-l[2*i+1])*l[2*i],l[2*i+1]=a),r--)}}function h(e,t,n){var r,i,a=new Array(q+1),o=0;for(r=1;r<=q;r++)a[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=c(a[s]++,s))}}function d(){var e,t,n,r,a,o=new Array(q+1);for(n=0,r=0;r<N-1;r++)for(re[r]=n,e=0;e<1<<X[r];e++)ne[n++]=r;for(ne[n-1]=r,a=0,r=0;r<16;r++)for(ie[r]=a,e=0;e<1<<$[r];e++)te[a++]=r;for(a>>=7;r<z;r++)for(ie[r]=a<<7,e=0;e<1<<$[r]-7;e++)te[256+a++]=r;for(t=0;t<=q;t++)o[t]=0;for(e=0;e<=143;)K[2*e+1]=8,e++,o[8]++;for(;e<=255;)K[2*e+1]=9,e++,o[9]++;for(;e<=279;)K[2*e+1]=7,e++,o[7]++;for(;e<=287;)K[2*e+1]=8,e++,o[8]++;for(h(K,O+1,o),e=0;e<z;e++)ee[2*e+1]=5,ee[2*e]=c(e,5);ae=new i(K,X,P+1,O,q),oe=new i(ee,$,0,z,q),se=new i(new Array(0),Q,0,F,V)}function g(e){var t;for(t=0;t<O;t++)e.dyn_ltree[2*t]=0;for(t=0;t<z;t++)e.dyn_dtree[2*t]=0;for(t=0;t<F;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*W]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function m(e){e.bi_valid>8?s(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function v(e,t,n,r){m(e),r&&(s(e,n),s(e,~n)),C.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}function w(e,t,n,r){var i=2*t,a=2*n;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]}function b(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&w(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!w(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function y(e,t,n){var r,i,a,s,c=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],i=e.pending_buf[e.l_buf+c],c++,0===r?u(e,i,t):(u(e,(a=ne[i])+P+1,t),0!==(s=X[a])&&l(e,i-=re[a],s),u(e,a=o(--r),n),0!==(s=$[a])&&l(e,r-=ie[a],s))}while(c<e.last_lit);u(e,W,t)}function _(e,t){var n,r,i,a=t.dyn_tree,o=t.stat_desc.static_tree,s=t.stat_desc.has_stree,l=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=U,n=0;n<l;n++)0!==a[2*n]?(e.heap[++e.heap_len]=u=n,e.depth[n]=0):a[2*n+1]=0;for(;e.heap_len<2;)a[2*(i=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=o[2*i+1]);for(t.max_code=u,n=e.heap_len>>1;n>=1;n--)b(e,a,n);i=l;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],b(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,a[2*i]=a[2*n]+a[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,a[2*n+1]=a[2*r+1]=i,e.heap[1]=i++,b(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],p(e,t),h(a,u,e.bl_count)}function x(e,t,n){var r,i,a=-1,o=t[1],s=0,l=7,u=4;for(0===o&&(l=138,u=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=o,o=t[2*(r+1)+1],++s<l&&i===o||(s<u?e.bl_tree[2*i]+=s:0!==i?(i!==a&&e.bl_tree[2*i]++,e.bl_tree[2*G]++):s<=10?e.bl_tree[2*Z]++:e.bl_tree[2*Y]++,s=0,a=i,0===o?(l=138,u=3):i===o?(l=6,u=3):(l=7,u=4))}function k(e,t,n){var r,i,a=-1,o=t[1],s=0,c=7,f=4;for(0===o&&(c=138,f=3),r=0;r<=n;r++)if(i=o,o=t[2*(r+1)+1],!(++s<c&&i===o)){if(s<f)do{u(e,i,e.bl_tree)}while(0!=--s);else 0!==i?(i!==a&&(u(e,i,e.bl_tree),s--),u(e,G,e.bl_tree),l(e,s-3,2)):s<=10?(u(e,Z,e.bl_tree),l(e,s-3,3)):(u(e,Y,e.bl_tree),l(e,s-11,7));s=0,a=i,0===o?(c=138,f=3):i===o?(c=6,f=3):(c=7,f=4)}}function E(e){var t;for(x(e,e.dyn_ltree,e.l_desc.max_code),x(e,e.dyn_dtree,e.d_desc.max_code),_(e,e.bl_desc),t=F-1;t>=3&&0===e.bl_tree[2*J[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}function T(e,t,n,r){var i;for(l(e,t-257,5),l(e,n-1,5),l(e,r-4,4),i=0;i<r;i++)l(e,e.bl_tree[2*J[i]+1],3);k(e,e.dyn_ltree,t-1),k(e,e.dyn_dtree,n-1)}function S(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return M;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return L;for(t=32;t<P;t++)if(0!==e.dyn_ltree[2*t])return L;return M}function A(e,t,n,r){l(e,(I<<1)+(r?1:0),3),v(e,t,n,!0)}var C=e("../utils/common"),R=4,M=0,L=1,j=2,I=0,D=1,B=2,N=29,P=256,O=P+1+N,z=30,F=19,U=2*O+1,q=15,H=16,V=7,W=256,G=16,Z=17,Y=18,X=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],$=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Q=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],J=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],K=new Array(2*(O+2));r(K);var ee=new Array(2*z);r(ee);var te=new Array(512);r(te);var ne=new Array(256);r(ne);var re=new Array(N);r(re);var ie=new Array(z);r(ie);var ae,oe,se,le=!1;n._tr_init=function(e){le||(d(),le=!0),e.l_desc=new a(e.dyn_ltree,ae),e.d_desc=new a(e.dyn_dtree,oe),e.bl_desc=new a(e.bl_tree,se),e.bi_buf=0,e.bi_valid=0,g(e)},n._tr_stored_block=A,n._tr_flush_block=function(e,t,n,r){var i,a,o=0;e.level>0?(e.strm.data_type===j&&(e.strm.data_type=S(e)),_(e,e.l_desc),_(e,e.d_desc),o=E(e),i=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=i&&(i=a)):i=a=n+5,n+4<=i&&-1!==t?A(e,t,n,r):e.strategy===R||a===i?(l(e,(D<<1)+(r?1:0),3),y(e,K,ee)):(l(e,(B<<1)+(r?1:0),3),T(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),y(e,e.dyn_ltree,e.dyn_dtree)),g(e),r&&m(e)},n._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(ne[n]+P+1)]++,e.dyn_dtree[2*o(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){l(e,D<<1,3),u(e,W,K),f(e)}},{"../utils/common":60}],70:[function(e,t,n){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],71:[function(e,t,n){(function(e){function t(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a=function(e){return i.exec(e).slice(1)};n.resolve=function(){for(var n="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o=a>=0?arguments[a]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(n=o+"/"+n,i="/"===o.charAt(0))}return n=t(r(n.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(e){var i=n.isAbsolute(e),a="/"===o(e,-1);return(e=t(r(e.split("/"),function(e){return!!e}),!i).join("/"))||i||(e="."),e&&a&&(e+="/"),(i?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var i=r(e.split("/")),a=r(t.split("/")),o=Math.min(i.length,a.length),s=o,l=0;l<o;l++)if(i[l]!==a[l]){s=l;break}for(var u=[],l=s;l<i.length;l++)u.push("..");return(u=u.concat(a.slice(s))).join("/")},n.sep="/",n.delimiter=":",n.dirname=function(e){var t=a(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},n.basename=function(e,t){var n=a(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},n.extname=function(e){return a(e)[3]};var o="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,e("_process"))},{_process:94}],72:[function(e,t,n){(function(t){"use strict";function r(e,t){function n(){if(i===e.length)throw new Error("Ran out of data");var n=e[i];i++;var a,o,s,l,u,c,f,p;switch(t){default:throw new Error("unrecognised depth");case 16:f=e[i],i++,r.push((n<<8)+f);break;case 4:f=15&n,p=n>>4,r.push(p,f);break;case 2:u=3&n,c=n>>2&3,f=n>>4&3,p=n>>6&3,r.push(p,f,c,u);break;case 1:a=1&n,o=n>>1&1,s=n>>2&1,l=n>>3&1,u=n>>4&1,c=n>>5&1,f=n>>6&1,p=n>>7&1,r.push(p,f,c,u,l,s,o,a)}}var r=[],i=0;return{get:function(e){for(;r.length<e;)n();var t=r.slice(0,e);return r=r.slice(e),t},resetAfterLine:function(){r.length=0},end:function(){if(i!==e.length)throw new Error("extra data found")}}}function i(e,t,n,r,i,a){for(var o=e.width,l=e.height,u=e.index,c=0;c<l;c++)for(var f=0;f<o;f++){for(var p=n(f,c,u),h=0;h<4;h++){var d=s[r][h];if(h===i.length)throw new Error("Ran out of data");t[p+h]=255!==d?i[d+a]:255}a+=r}return a}function a(e,t,n,r,i,a){for(var o=e.width,l=e.height,u=e.index,c=0;c<l;c++){for(var f=0;f<o;f++)for(var p=i.get(r),h=n(f,c,u),d=0;d<4;d++){var g=s[r][d];t[h+d]=255!==g?p[g]:a}i.resetAfterLine()}}var o=e("./interlace"),s={1:{0:0,1:0,2:0,3:255},2:{0:0,1:0,2:0,3:1},3:{0:0,1:1,2:2,3:255},4:{0:0,1:1,2:2,3:3}};n.dataToBitMap=function(e,n){var s=n.width,l=n.height,u=n.depth,c=n.bpp,f=n.interlace;if(8!==u)var p=r(e,u);var h;h=u<=8?new t(s*l*4):new Uint16Array(s*l*4);var d,g,m=Math.pow(2,u)-1,v=0;if(f)d=o.getImagePasses(s,l),g=o.getInterlaceIterator(s,l);else{var w=0;g=function(){var e=w;return w+=4,e},d=[{width:s,height:l}]}for(var b=0;b<d.length;b++)8===u?v=i(d[b],h,g,c,e,v):a(d[b],h,g,c,p,m);if(8===u){if(v!==e.length)throw new Error("extra data found")}else p.end();return h}}).call(this,e("buffer").Buffer)},{"./interlace":82,buffer:7}],73:[function(e,t,n){(function(n){"use strict";var r=e("./constants");t.exports=function(e,t,i,a){var o=a.colorType===r.COLORTYPE_COLOR_ALPHA;if(a.inputHasAlpha&&o)return e;if(!a.inputHasAlpha&&!o)return e;var s=o?4:3,l=new n(t*i*s),u=a.inputHasAlpha?4:3,c=0,f=0,p=a.bgColor||{};void 0===p.red&&(p.red=255),void 0===p.green&&(p.green=255),void 0===p.blue&&(p.blue=255);for(var h=0;h<i;h++)for(var d=0;d<t;d++){var g,m=e[c],v=e[c+1],w=e[c+2];a.inputHasAlpha?(g=e[c+3],o||(g/=255,m=Math.min(Math.max(Math.round((1-g)*p.red+g*m),0),255),v=Math.min(Math.max(Math.round((1-g)*p.green+g*v),0),255),w=Math.min(Math.max(Math.round((1-g)*p.blue+g*w),0),255))):g=255,l[f]=m,l[f+1]=v,l[f+2]=w,o&&(l[f+3]=g),c+=u,f+=s}return l}}).call(this,e("buffer").Buffer)},{"./constants":75,buffer:7}],74:[function(e,t,n){(function(n,r){"use strict";var i=e("util"),a=e("stream"),o=t.exports=function(){a.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding="utf8",this.writable=!0};i.inherits(o,a),o.prototype.read=function(e,t){this._reads.push({length:Math.abs(e),allowLess:e<0,func:t}),n.nextTick(function(){this._process(),this._paused&&this._reads.length>0&&(this._paused=!1,this.emit("drain"))}.bind(this))},o.prototype.write=function(e,t){if(!this.writable)return this.emit("error",new Error("Stream not writable")),!1;var n;return n=r.isBuffer(e)?e:new r(e,t||this._encoding),this._buffers.push(n),this._buffered+=n.length,this._process(),this._reads&&0===this._reads.length&&(this._paused=!0),this.writable&&!this._paused},o.prototype.end=function(e,t){e&&this.write(e,t),this.writable=!1,this._buffers&&(0===this._buffers.length?this._end():(this._buffers.push(null),this._process()))},o.prototype.destroySoon=o.prototype.end,o.prototype._end=function(){this._reads.length>0&&this.emit("error",new Error("There are some read requests waitng on finished stream")),this.destroy()},o.prototype.destroy=function(){this._buffers&&(this.writable=!1,this._reads=null,this._buffers=null,this.emit("close"))},o.prototype._processReadAllowingLess=function(e){this._reads.shift();var t=this._buffers[0];t.length>e.length?(this._buffered-=e.length,this._buffers[0]=t.slice(e.length),e.func.call(this,t.slice(0,e.length))):(this._buffered-=t.length,this._buffers.shift(),e.func.call(this,t))},o.prototype._processRead=function(e){this._reads.shift();for(var t=0,n=0,i=new r(e.length);t<e.length;){var a=this._buffers[n++],o=Math.min(a.length,e.length-t);a.copy(i,t,0,o),t+=o,o!==a.length&&(this._buffers[--n]=a.slice(o))}n>0&&this._buffers.splice(0,n),this._buffered-=e.length,e.func.call(this,i)},o.prototype._process=function(){try{for(;this._buffered>0&&this._reads&&this._reads.length>0;){var e=this._reads[0];if(e.allowLess)this._processReadAllowingLess(e);else{if(!(this._buffered>=e.length))break;this._processRead(e)}}this._buffers&&this._buffers.length>0&&null===this._buffers[0]&&this._end()}catch(e){this.emit("error",e)}}}).call(this,e("_process"),e("buffer").Buffer)},{_process:94,buffer:7,stream:111,util:119}],75:[function(e,t,n){"use strict";t.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}},{}],76:[function(e,t,n){"use strict";var r=[];!function(){for(var e=0;e<256;e++){for(var t=e,n=0;n<8;n++)1&t?t=3988292384^t>>>1:t>>>=1;r[e]=t}}();var i=t.exports=function(){this._crc=-1};i.prototype.write=function(e){for(var t=0;t<e.length;t++)this._crc=r[255&(this._crc^e[t])]^this._crc>>>8;return!0},i.prototype.crc32=function(){return-1^this._crc},i.crc32=function(e){for(var t=-1,n=0;n<e.length;n++)t=r[255&(t^e[n])]^t>>>8;return-1^t}},{}],77:[function(e,t,n){(function(n){"use strict";var r=e("./paeth-predictor"),i={0:function(e,t,n,r,i){e.copy(r,i,t,t+n)},1:function(e,t,n,r,i,a){for(var o=0;o<n;o++){var s=o>=a?e[t+o-a]:0,l=e[t+o]-s;r[i+o]=l}},2:function(e,t,n,r,i){for(var a=0;a<n;a++){var o=t>0?e[t+a-n]:0,s=e[t+a]-o;r[i+a]=s}},3:function(e,t,n,r,i,a){for(var o=0;o<n;o++){var s=o>=a?e[t+o-a]:0,l=t>0?e[t+o-n]:0,u=e[t+o]-(s+l>>1);r[i+o]=u}},4:function(e,t,n,i,a,o){for(var s=0;s<n;s++){var l=s>=o?e[t+s-o]:0,u=t>0?e[t+s-n]:0,c=t>0&&s>=o?e[t+s-(n+o)]:0,f=e[t+s]-r(l,u,c);i[a+s]=f}}},a={0:function(e,t,n){for(var r=0,i=t+n,a=t;a<i;a++)r+=Math.abs(e[a]);return r},1:function(e,t,n,r){for(var i=0,a=0;a<n;a++){var o=a>=r?e[t+a-r]:0,s=e[t+a]-o;i+=Math.abs(s)}return i},2:function(e,t,n){for(var r=0,i=t+n,a=t;a<i;a++){var o=t>0?e[a-n]:0,s=e[a]-o;r+=Math.abs(s)}return r},3:function(e,t,n,r){for(var i=0,a=0;a<n;a++){var o=a>=r?e[t+a-r]:0,s=t>0?e[t+a-n]:0,l=e[t+a]-(o+s>>1);i+=Math.abs(l)}return i},4:function(e,t,n,i){for(var a=0,o=0;o<n;o++){var s=o>=i?e[t+o-i]:0,l=t>0?e[t+o-n]:0,u=t>0&&o>=i?e[t+o-(n+i)]:0,c=e[t+o]-r(s,l,u);a+=Math.abs(c)}return a}};t.exports=function(e,t,r,o,s){var l;if("filterType"in o&&-1!==o.filterType){if("number"!=typeof o.filterType)throw new Error("unrecognised filter types");l=[o.filterType]}else l=[0,1,2,3,4];for(var u=t*s,c=0,f=0,p=new n((u+1)*r),h=l[0],d=0;d<r;d++){if(l.length>1)for(var g=1/0,m=0;m<l.length;m++){var v=a[l[m]](e,f,u,s);v<g&&(h=l[m],g=v)}p[c]=h,c++,i[h](e,f,u,p,c,s),c+=u,f+=u}return p}}).call(this,e("buffer").Buffer)},{"./paeth-predictor":86,buffer:7}],78:[function(e,t,n){(function(n){"use strict";var r=e("util"),i=e("./chunkstream"),a=e("./filter-parse"),o=t.exports=function(e){i.call(this);var t=[],r=this;this._filter=new a(e,{read:this.read.bind(this),write:function(e){t.push(e)},complete:function(){r.emit("complete",n.concat(t))}}),this._filter.start()};r.inherits(o,i)}).call(this,e("buffer").Buffer)},{"./chunkstream":74,"./filter-parse":80,buffer:7,util:119}],79:[function(e,t,n){(function(t){"use strict";var r=e("./sync-reader"),i=e("./filter-parse");n.process=function(e,n){var a=[],o=new r(e);return new i(n,{read:o.read.bind(o),write:function(e){a.push(e)},complete:function(){}}).start(),o.process(),t.concat(a)}}).call(this,e("buffer").Buffer)},{"./filter-parse":80,"./sync-reader":92,buffer:7}],80:[function(e,t,n){(function(n){"use strict";function r(e,t,n){var r=e*t;return 8!==n&&(r=Math.ceil(r/(8/n))),r}var i=e("./interlace"),a=e("./paeth-predictor"),o=t.exports=function(e,t){var n=e.width,a=e.height,o=e.interlace,s=e.bpp,l=e.depth;if(this.read=t.read,this.write=t.write,this.complete=t.complete,this._imageIndex=0,this._images=[],o)for(var u=i.getImagePasses(n,a),c=0;c<u.length;c++)this._images.push({byteWidth:r(u[c].width,s,l),height:u[c].height,lineIndex:0});else this._images.push({byteWidth:r(n,s,l),height:a,lineIndex:0});this._xComparison=8===l?s:16===l?2*s:1};o.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))},o.prototype._unFilterType1=function(e,t,n){for(var r=this._xComparison,i=r-1,a=0;a<n;a++){var o=e[1+a],s=a>i?t[a-r]:0;t[a]=o+s}},o.prototype._unFilterType2=function(e,t,n){for(var r=this._lastLine,i=0;i<n;i++){var a=e[1+i],o=r?r[i]:0;t[i]=a+o}},o.prototype._unFilterType3=function(e,t,n){for(var r=this._xComparison,i=r-1,a=this._lastLine,o=0;o<n;o++){var s=e[1+o],l=a?a[o]:0,u=o>i?t[o-r]:0,c=Math.floor((u+l)/2);t[o]=s+c}},o.prototype._unFilterType4=function(e,t,n){for(var r=this._xComparison,i=r-1,o=this._lastLine,s=0;s<n;s++){var l=e[1+s],u=o?o[s]:0,c=s>i?t[s-r]:0,f=s>i&&o?o[s-r]:0,p=a(c,u,f);t[s]=l+p}},o.prototype._reverseFilterLine=function(e){var t,r=e[0],i=this._images[this._imageIndex],a=i.byteWidth;if(0===r)t=e.slice(1,a+1);else switch(t=new n(a),r){case 1:this._unFilterType1(e,t,a);break;case 2:this._unFilterType2(e,t,a);break;case 3:this._unFilterType3(e,t,a);break;case 4:this._unFilterType4(e,t,a);break;default:throw new Error("Unrecognised filter type - "+r)}this.write(t),i.lineIndex++,i.lineIndex>=i.height?(this._lastLine=null,this._imageIndex++,i=this._images[this._imageIndex]):this._lastLine=t,i?this.read(i.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}}).call(this,e("buffer").Buffer)},{"./interlace":82,"./paeth-predictor":86,buffer:7}],81:[function(e,t,n){(function(e){"use strict";function n(e,t,n,r,i){for(var a=0,o=0;o<r;o++)for(var s=0;s<n;s++){var l=i[e[a]];if(!l)throw new Error("index "+e[a]+" not in palette");for(var u=0;u<4;u++)t[a+u]=l[u];a+=4}}function r(e,t,n,r,i){for(var a=0,o=0;o<r;o++)for(var s=0;s<n;s++){var l=!1;if(1===i.length?i[0]===e[a]&&(l=!0):i[0]===e[a]&&i[1]===e[a+1]&&i[2]===e[a+2]&&(l=!0),l)for(var u=0;u<4;u++)t[a+u]=0;a+=4}}function i(e,t,n,r,i){for(var a=Math.pow(2,i)-1,o=0,s=0;s<r;s++)for(var l=0;l<n;l++){for(var u=0;u<4;u++)t[o+u]=Math.floor(255*e[o+u]/a+.5);o+=4}}t.exports=function(t,a){var o=a.depth,s=a.width,l=a.height,u=a.colorType,c=a.transColor,f=a.palette,p=t;return 3===u?n(t,p,s,l,f):(c&&r(t,p,s,l,c),8!==o&&(16===o&&(p=new e(s*l*4)),i(t,p,s,l,o))),p}}).call(this,e("buffer").Buffer)},{buffer:7}],82:[function(e,t,n){"use strict";var r=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];n.getImagePasses=function(e,t){for(var n=[],i=e%8,a=t%8,o=(e-i)/8,s=(t-a)/8,l=0;l<r.length;l++){for(var u=r[l],c=o*u.x.length,f=s*u.y.length,p=0;p<u.x.length&&u.x[p]<i;p++)c++;for(p=0;p<u.y.length&&u.y[p]<a;p++)f++;c>0&&f>0&&n.push({width:c,height:f,index:l})}return n},n.getInterlaceIterator=function(e){return function(t,n,i){var a=t%r[i].x.length,o=(t-a)/r[i].x.length*8+r[i].x[a],s=n%r[i].y.length;return 4*o+((n-s)/r[i].y.length*8+r[i].y[s])*e*4}}},{}],83:[function(e,t,n){(function(n){"use strict";var r=e("util"),i=e("stream"),a=e("./constants"),o=e("./packer"),s=t.exports=function(e){i.call(this);var t=e||{};this._packer=new o(t),this._deflate=this._packer.createDeflate(),this.readable=!0};r.inherits(s,i),s.prototype.pack=function(e,t,r,i){this.emit("data",new n(a.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(t,r)),i&&this.emit("data",this._packer.packGAMA(i));var o=this._packer.filterData(e,t,r);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",function(e){this.emit("data",this._packer.packIDAT(e))}.bind(this)),this._deflate.on("end",function(){this.emit("data",this._packer.packIEND()),this.emit("end")}.bind(this)),this._deflate.end(o)}}).call(this,e("buffer").Buffer)},{"./constants":75,"./packer":85,buffer:7,stream:111,util:119}],84:[function(e,t,n){(function(n){"use strict";var r=!0,i=e("zlib");i.deflateSync||(r=!1);var a=e("./constants"),o=e("./packer");t.exports=function(e,t){if(!r)throw new Error("To use the sync capability of this library in old node versions, please also add a dependency on node-zlb-backport");var s=new o(t||{}),l=[];l.push(new n(a.PNG_SIGNATURE)),l.push(s.packIHDR(e.width,e.height)),e.gamma&&l.push(s.packGAMA(e.gamma));var u=s.filterData(e.data,e.width,e.height),c=i.deflateSync(u,s.getDeflateOptions());if(u=null,!c||!c.length)throw new Error("bad png - invalid compressed data response");return l.push(s.packIDAT(c)),l.push(s.packIEND()),n.concat(l)}}).call(this,e("buffer").Buffer)},{"./constants":75,"./packer":85,buffer:7,zlib:5}],85:[function(e,t,n){(function(n){"use strict";var r=e("./constants"),i=e("./crc"),a=e("./bitpacker"),o=e("./filter-pack"),s=e("zlib"),l=t.exports=function(e){if(this._options=e,e.deflateChunkSize=e.deflateChunkSize||32768,e.deflateLevel=null!=e.deflateLevel?e.deflateLevel:9,e.deflateStrategy=null!=e.deflateStrategy?e.deflateStrategy:3,e.inputHasAlpha=null==e.inputHasAlpha||e.inputHasAlpha,e.deflateFactory=e.deflateFactory||s.createDeflate,e.bitDepth=e.bitDepth||8,e.colorType="number"==typeof e.colorType?e.colorType:r.COLORTYPE_COLOR_ALPHA,e.colorType!==r.COLORTYPE_COLOR&&e.colorType!==r.COLORTYPE_COLOR_ALPHA)throw new Error("option color type:"+e.colorType+" is not supported at present");if(8!==e.bitDepth)throw new Error("option bit depth:"+e.bitDepth+" is not supported at present")};l.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}},l.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())},l.prototype.filterData=function(e,t,n){var i=a(e,t,n,this._options),s=r.COLORTYPE_TO_BPP_MAP[this._options.colorType];return o(i,t,n,this._options,s)},l.prototype._packChunk=function(e,t){var r=t?t.length:0,a=new n(r+12);return a.writeUInt32BE(r,0),a.writeUInt32BE(e,4),t&&t.copy(a,8),a.writeInt32BE(i.crc32(a.slice(4,a.length-4)),a.length-4),a},l.prototype.packGAMA=function(e){var t=new n(4);return t.writeUInt32BE(Math.floor(e*r.GAMMA_DIVISION),0),this._packChunk(r.TYPE_gAMA,t)},l.prototype.packIHDR=function(e,t){var i=new n(13);return i.writeUInt32BE(e,0),i.writeUInt32BE(t,4),i[8]=this._options.bitDepth,i[9]=this._options.colorType,i[10]=0,i[11]=0,i[12]=0,this._packChunk(r.TYPE_IHDR,i)},l.prototype.packIDAT=function(e){return this._packChunk(r.TYPE_IDAT,e)},l.prototype.packIEND=function(){return this._packChunk(r.TYPE_IEND,null)}}).call(this,e("buffer").Buffer)},{"./bitpacker":73,"./constants":75,"./crc":76,"./filter-pack":77,buffer:7,zlib:5}],86:[function(e,t,n){"use strict";t.exports=function(e,t,n){var r=e+t-n,i=Math.abs(r-e),a=Math.abs(r-t),o=Math.abs(r-n);return i<=a&&i<=o?e:a<=o?t:n}},{}],87:[function(e,t,n){"use strict";var r=e("util"),i=e("zlib"),a=e("./chunkstream"),o=e("./filter-parse-async"),s=e("./parser"),l=e("./bitmapper"),u=e("./format-normaliser"),c=t.exports=function(e){a.call(this),this._parser=new s(e,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this)}),this._options=e,this.writable=!0,this._parser.start()};r.inherits(c,a),c.prototype._handleError=function(e){this.emit("error",e),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy&&this._inflate.destroy(),this.errord=!0},c.prototype._inflateData=function(e){this._inflate||(this._inflate=i.createInflate(),this._inflate.on("error",this.emit.bind(this,"error")),this._filter.on("complete",this._complete.bind(this)),this._inflate.pipe(this._filter)),this._inflate.write(e)},c.prototype._handleMetaData=function(e){this.emit("metadata",e),this._bitmapInfo=Object.create(e),this._filter=new o(this._bitmapInfo)},c.prototype._handleTransColor=function(e){this._bitmapInfo.transColor=e},c.prototype._handlePalette=function(e){this._bitmapInfo.palette=e},c.prototype._finished=function(){this.errord||(this._inflate?this._inflate.end():this.emit("error","No Inflate block"),this.destroySoon())},c.prototype._complete=function(e){if(!this.errord){try{var t=l.dataToBitMap(e,this._bitmapInfo),n=u(t,this._bitmapInfo);t=null}catch(e){return void this._handleError(e)}this.emit("parsed",n)}}},{"./bitmapper":72,"./chunkstream":74,"./filter-parse-async":78,"./format-normaliser":81,"./parser":89,util:119,zlib:5}],88:[function(e,t,n){(function(n){"use strict";var r=!0,i=e("zlib");i.deflateSync||(r=!1);var a=e("./sync-reader"),o=e("./filter-parse-sync"),s=e("./parser"),l=e("./bitmapper"),u=e("./format-normaliser");t.exports=function(e,t){if(!r)throw new Error("To use the sync capability of this library in old node versions, please also add a dependency on node-zlb-backport");var c,f,p,h=[],d=new a(e);if(new s(t,{read:d.read.bind(d),error:function(e){c=e},metadata:function(e){f=e},gamma:function(e){p=e},palette:function(e){f.palette=e},transColor:function(e){f.transColor=e},inflateData:function(e){h.push(e)}}).start(),d.process(),c)throw c;var g=n.concat(h);h.length=0;var m=i.inflateSync(g);if(g=null,!m||!m.length)throw new Error("bad png - invalid inflate data response");var v=o.process(m,f);g=null;var w=l.dataToBitMap(v,f);v=null;var b=u(w,f);return f.data=b,f.gamma=p||0,f}}).call(this,e("buffer").Buffer)},{"./bitmapper":72,"./filter-parse-sync":79,"./format-normaliser":81,"./parser":89,"./sync-reader":92,buffer:7,zlib:5}],89:[function(e,t,n){(function(n){"use strict";var r=e("./constants"),i=e("./crc"),a=t.exports=function(e,t){this._options=e,e.checkCRC=!1!==e.checkCRC,this._hasIHDR=!1,this._hasIEND=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[r.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[r.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[r.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[r.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[r.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[r.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=t.read,this.error=t.error,this.metadata=t.metadata,this.gamma=t.gamma,this.transColor=t.transColor,this.palette=t.palette,this.parsed=t.parsed,this.inflateData=t.inflateData,this.inflateData=t.inflateData,this.finished=t.finished};a.prototype.start=function(){this.read(r.PNG_SIGNATURE.length,this._parseSignature.bind(this))},a.prototype._parseSignature=function(e){for(var t=r.PNG_SIGNATURE,n=0;n<t.length;n++)if(e[n]!==t[n])return void this.error(new Error("Invalid file signature"));this.read(8,this._parseChunkBegin.bind(this))},a.prototype._parseChunkBegin=function(e){for(var t=e.readUInt32BE(0),a=e.readUInt32BE(4),o="",s=4;s<8;s++)o+=String.fromCharCode(e[s]);var l=Boolean(32&e[4]);if(this._hasIHDR||a===r.TYPE_IHDR){if(this._crc=new i,this._crc.write(new n(o)),this._chunks[a])return this._chunks[a](t);l?this.read(t+4,this._skipChunk.bind(this)):this.error(new Error("Unsupported critical chunk type "+o))}else this.error(new Error("Expected IHDR on beggining"))},a.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))},a.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))},a.prototype._parseChunkEnd=function(e){var t=e.readInt32BE(0),n=this._crc.crc32();this._options.checkCRC&&n!==t?this.error(new Error("Crc error - "+t+" - "+n)):this._hasIEND||this.read(8,this._parseChunkBegin.bind(this))},a.prototype._handleIHDR=function(e){this.read(e,this._parseIHDR.bind(this))},a.prototype._parseIHDR=function(e){this._crc.write(e);var t=e.readUInt32BE(0),n=e.readUInt32BE(4),i=e[8],a=e[9],o=e[10],s=e[11],l=e[12];if(8===i||4===i||2===i||1===i||16===i)if(a in r.COLORTYPE_TO_BPP_MAP)if(0===o)if(0===s)if(0===l||1===l){this._colorType=a;var u=r.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:t,height:n,depth:i,interlace:Boolean(l),palette:Boolean(a&r.COLORTYPE_PALETTE),color:Boolean(a&r.COLORTYPE_COLOR),alpha:Boolean(a&r.COLORTYPE_ALPHA),bpp:u,colorType:a}),this._handleChunkEnd()}else this.error(new Error("Unsupported interlace method"));else this.error(new Error("Unsupported filter method"));else this.error(new Error("Unsupported compression method"));else this.error(new Error("Unsupported color type"));else this.error(new Error("Unsupported bit depth "+i))},a.prototype._handlePLTE=function(e){this.read(e,this._parsePLTE.bind(this))},a.prototype._parsePLTE=function(e){this._crc.write(e);for(var t=Math.floor(e.length/3),n=0;n<t;n++)this._palette.push([e[3*n],e[3*n+1],e[3*n+2],255]);this.palette(this._palette),this._handleChunkEnd()},a.prototype._handleTRNS=function(e){this.read(e,this._parseTRNS.bind(this))},a.prototype._parseTRNS=function(e){if(this._crc.write(e),this._colorType===r.COLORTYPE_PALETTE_COLOR){if(0===this._palette.length)return void this.error(new Error("Transparency chunk must be after palette"));if(e.length>this._palette.length)return void this.error(new Error("More transparent colors than palette size"));for(var t=0;t<e.length;t++)this._palette[t][3]=e[t];this.palette(this._palette)}this._colorType===r.COLORTYPE_GRAYSCALE&&this.transColor([e.readUInt16BE(0)]),this._colorType===r.COLORTYPE_COLOR&&this.transColor([e.readUInt16BE(0),e.readUInt16BE(2),e.readUInt16BE(4)]),this._handleChunkEnd()},a.prototype._handleGAMA=function(e){this.read(e,this._parseGAMA.bind(this))},a.prototype._parseGAMA=function(e){this._crc.write(e),this.gamma(e.readUInt32BE(0)/r.GAMMA_DIVISION),this._handleChunkEnd()},a.prototype._handleIDAT=function(e){this.read(-e,this._parseIDAT.bind(this,e))},a.prototype._parseIDAT=function(e,t){if(this._crc.write(t),this._colorType===r.COLORTYPE_PALETTE_COLOR&&0===this._palette.length)throw new Error("Expected palette not found");this.inflateData(t);var n=e-t.length;n>0?this._handleIDAT(n):this._handleChunkEnd()},a.prototype._handleIEND=function(e){this.read(e,this._parseIEND.bind(this))},a.prototype._parseIEND=function(e){this._crc.write(e),this._hasIEND=!0,this._handleChunkEnd(),this.finished&&this.finished()}}).call(this,e("buffer").Buffer)},{"./constants":75,"./crc":76,buffer:7}],90:[function(e,t,n){"use strict";var r=e("./parser-sync"),i=e("./packer-sync");n.read=function(e,t){return r(e,t||{})},n.write=function(e){return i(e)}},{"./packer-sync":84,"./parser-sync":88}],91:[function(e,t,n){(function(t,r){"use strict";var i=e("util"),a=e("stream"),o=e("./parser-async"),s=e("./packer-async"),l=e("./png-sync"),u=n.PNG=function(e){a.call(this),e=e||{},this.width=e.width||0,this.height=e.height||0,this.data=this.width>0&&this.height>0?new r(4*this.width*this.height):null,e.fill&&this.data&&this.data.fill(0),this.gamma=0,this.readable=this.writable=!0,this._parser=new o(e),this._parser.on("error",this.emit.bind(this,"error")),this._parser.on("close",this._handleClose.bind(this)),this._parser.on("metadata",this._metadata.bind(this)),this._parser.on("gamma",this._gamma.bind(this)),this._parser.on("parsed",function(e){this.data=e,this.emit("parsed",e)}.bind(this)),this._packer=new s(e),this._packer.on("data",this.emit.bind(this,"data")),this._packer.on("end",this.emit.bind(this,"end")),this._parser.on("close",this._handleClose.bind(this)),this._packer.on("error",this.emit.bind(this,"error"))};i.inherits(u,a),u.sync=l,u.prototype.pack=function(){return this.data&&this.data.length?(t.nextTick(function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}.bind(this)),this):(this.emit("error","No data provided"),this)},u.prototype.parse=function(e,t){if(t){var n,r;n=function(e){this.removeListener("error",r),this.data=e,t(null,this)}.bind(this),r=function(e){this.removeListener("parsed",n),t(e,null)}.bind(this),this.once("parsed",n),this.once("error",r)}return this.end(e),this},u.prototype.write=function(e){return this._parser.write(e),!0},u.prototype.end=function(e){this._parser.end(e)},u.prototype._metadata=function(e){this.width=e.width,this.height=e.height,this.emit("metadata",e)},u.prototype._gamma=function(e){this.gamma=e},u.prototype._handleClose=function(){this._parser.writable||this._packer.readable||this.emit("close")},u.bitblt=function(e,t,n,r,i,a,o,s){if(n>e.width||r>e.height||n+i>e.width||r+a>e.height)throw new Error("bitblt reading outside image");if(o>t.width||s>t.height||o+i>t.width||s+a>t.height)throw new Error("bitblt writing outside image");for(var l=0;l<a;l++)e.data.copy(t.data,(s+l)*t.width+o<<2,(r+l)*e.width+n<<2,(r+l)*e.width+n+i<<2)},u.prototype.bitblt=function(e,t,n,r,i,a,o){return u.bitblt(this,e,t,n,r,i,a,o),this},u.adjustGamma=function(e){if(e.gamma){for(var t=0;t<e.height;t++)for(var n=0;n<e.width;n++)for(var r=e.width*t+n<<2,i=0;i<3;i++){var a=e.data[r+i]/255;a=Math.pow(a,1/2.2/e.gamma),e.data[r+i]=Math.round(255*a)}e.gamma=0}},u.prototype.adjustGamma=function(){u.adjustGamma(this)}}).call(this,e("_process"),e("buffer").Buffer)},{"./packer-async":83,"./parser-async":87,"./png-sync":90,_process:94,buffer:7,stream:111,util:119}],92:[function(e,t,n){"use strict";var r=t.exports=function(e){this._buffer=e,this._reads=[]};r.prototype.read=function(e,t){this._reads.push({length:Math.abs(e),allowLess:e<0,func:t})},r.prototype.process=function(){for(;this._reads.length>0&&this._buffer.length;){var e=this._reads[0];if(!this._buffer.length||!(this._buffer.length>=e.length||e.allowLess))break;this._reads.shift();var t=this._buffer;this._buffer=t.slice(e.length),e.func.call(this,t.slice(0,e.length))}return this._reads.length>0?new Error("There are some read requests waitng on finished stream"):this._buffer.length>0?new Error("unrecognised content at end of stream"):void 0}},{}],93:[function(e,t,n){(function(e){"use strict";!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports=function(t,n,r,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,n)});case 3:return e.nextTick(function(){t.call(null,n,r)});case 4:return e.nextTick(function(){t.call(null,n,r,i)});default:for(a=new Array(s-1),o=0;o<a.length;)a[o++]=arguments[o];return e.nextTick(function(){t.apply(null,a)})}}:t.exports=e.nextTick}).call(this,e("_process"))},{_process:94}],94:[function(e,t,n){function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(f===setTimeout)return setTimeout(e,0);if((f===r||!f)&&setTimeout)return f=setTimeout,setTimeout(e,0);try{return f(e,0)}catch(t){try{return f.call(null,e,0)}catch(t){return f.call(this,e,0)}}}function o(e){if(p===clearTimeout)return clearTimeout(e);if((p===i||!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(){m&&d&&(m=!1,d.length?g=d.concat(g):v=-1,g.length&&l())}function l(){if(!m){var e=a(s);m=!0;for(var t=g.length;t;){for(d=g,g=[];++v<t;)d&&d[v].run();v=-1,t=g.length}d=null,m=!1,o(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var f,p,h=t.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:r}catch(e){f=r}try{p="function"==typeof clearTimeout?clearTimeout:i}catch(e){p=i}}();var d,g=[],m=!1,v=-1;h.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];g.push(new u(e,t)),1!==g.length||m||a(l)},u.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.prependListener=c,h.prependOnceListener=c,h.listeners=function(e){return[]},h.binding=function(e){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(e){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},{}],95:[function(e,t,n){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":96}],96:[function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);u.call(this,e),c.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",i)}function i(){this.allowHalfOpen||this._writableState.ended||s(a,this)}function a(e){e.end()}var o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=r;var s=e("process-nextick-args"),l=e("core-util-is");l.inherits=e("inherits");var u=e("./_stream_readable"),c=e("./_stream_writable");l.inherits(r,u);for(var f=o(c.prototype),p=0;p<f.length;p++){var h=f[p];r.prototype[h]||(r.prototype[h]=c.prototype[h])}},{"./_stream_readable":98,"./_stream_writable":100,"core-util-is":19,inherits:47,"process-nextick-args":93}],97:[function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);i.call(this,e)}t.exports=r;var i=e("./_stream_transform"),a=e("core-util-is");a.inherits=e("inherits"),a.inherits(r,i),r.prototype._transform=function(e,t,n){n(null,e)}},{"./_stream_transform":99,"core-util-is":19,inherits:47}],98:[function(e,t,n){(function(n){"use strict";function r(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?M(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function i(t,n){C=C||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,n instanceof C&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var r=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.buffer=new z,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(O||(O=e("string_decoder/").StringDecoder),this.decoder=new O(t.encoding),this.encoding=t.encoding)}function a(t){if(C=C||e("./_stream_duplex"),!(this instanceof a))return new a(t);this._readableState=new i(t,this),this.readable=!0,t&&"function"==typeof t.read&&(this._read=t.read),j.call(this)}function o(e,t,n,r,i){var a=c(t,n);if(a)e.emit("error",a);else if(null===n)t.reading=!1,f(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var o=new Error("stream.push() after EOF");e.emit("error",o)}else if(t.endEmitted&&i){var l=new Error("stream.unshift() after end event");e.emit("error",l)}else{var u;!t.decoder||i||r||(n=t.decoder.write(n),u=!t.objectMode&&0===n.length),i||(t.reading=!1),u||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&p(e))),d(e,t)}else i||(t.reading=!1);return s(t)}function s(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function l(e){return e>=U?e=U:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function u(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=l(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function c(e,t){var n=null;return I.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function f(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,p(e)}}function p(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(P("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?R(h,e):h(e))}function h(e){P("emit readable"),e.emit("readable"),y(e)}function d(e,t){t.readingMore||(t.readingMore=!0,R(g,e,t))}function g(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(P("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function m(e){return function(){var t=e._readableState;P("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&L(e,"data")&&(t.flowing=!0,y(e))}}function v(e){P("readable nexttick read 0"),e.read(0)}function w(e,t){t.resumeScheduled||(t.resumeScheduled=!0,R(b,e,t))}function b(e,t){t.reading||(P("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),y(e),t.flowing&&!t.reading&&e.read(0)}function y(e){var t=e._readableState;for(P("flow",t.flowing);t.flowing&&null!==e.read(););}function _(e,t){if(0===t.length)return null;var n;return t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=x(e,t.buffer,t.decoder),n}function x(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?k(e,t):E(e,t),r}function k(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(o===a.length?i+=a:i+=a.slice(0,e),0===(e-=o)){o===a.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++r}return t.length-=r,i}function E(e,t){var n=D.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(a.copy(n,n.length-e,0,o),0===(e-=o)){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i}return t.length-=i,n}function T(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,R(S,t,e))}function S(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function A(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}t.exports=a;var C,R=e("process-nextick-args"),M=e("isarray");a.ReadableState=i;e("events").EventEmitter;var L=function(e,t){return e.listeners(t).length},j=e("./internal/streams/stream"),I=e("buffer").Buffer,D=e("buffer-shims"),B=e("core-util-is");B.inherits=e("inherits");var N=e("util"),P=void 0;P=N&&N.debuglog?N.debuglog("stream"):function(){};var O,z=e("./internal/streams/BufferList");B.inherits(a,j);var F=["error","close","destroy","pause","resume"];a.prototype.push=function(e,t){var n=this._readableState;return n.objectMode||"string"!=typeof e||(t=t||n.defaultEncoding)!==n.encoding&&(e=D.from(e,t),t=""),o(this,n,e,t,!1)},a.prototype.unshift=function(e){return o(this,this._readableState,e,"",!0)},a.prototype.isPaused=function(){return!1===this._readableState.flowing},a.prototype.setEncoding=function(t){return O||(O=e("string_decoder/").StringDecoder),this._readableState.decoder=new O(t),this._readableState.encoding=t,this};var U=8388608;a.prototype.read=function(e){P("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return P("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?T(this):p(this),null;if(0===(e=u(e,t))&&t.ended)return 0===t.length&&T(this),null;var r=t.needReadable;P("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&P("length less than watermark",r=!0),t.ended||t.reading?P("reading or ended",r=!1):r&&(P("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=u(n,t)));var i;return null===(i=e>0?_(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&T(this)),null!==i&&this.emit("data",i),i},a.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},a.prototype.pipe=function(e,t){function i(e){P("onunpipe"),e===p&&o()}function a(){P("onend"),e.end()}function o(){P("cleanup"),e.removeListener("close",u),e.removeListener("finish",c),e.removeListener("drain",g),e.removeListener("error",l),e.removeListener("unpipe",i),p.removeListener("end",a),p.removeListener("end",o),p.removeListener("data",s),v=!0,!h.awaitDrain||e._writableState&&!e._writableState.needDrain||g()}function s(t){P("ondata"),w=!1,!1!==e.write(t)||w||((1===h.pipesCount&&h.pipes===e||h.pipesCount>1&&-1!==A(h.pipes,e))&&!v&&(P("false write response, pause",p._readableState.awaitDrain),p._readableState.awaitDrain++,w=!0),p.pause())}function l(t){P("onerror",t),f(),e.removeListener("error",l),0===L(e,"error")&&e.emit("error",t)}function u(){e.removeListener("finish",c),f()}function c(){P("onfinish"),e.removeListener("close",u),f()}function f(){P("unpipe"),p.unpipe(e)}var p=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=e;break;case 1:h.pipes=[h.pipes,e];break;default:h.pipes.push(e)}h.pipesCount+=1,P("pipe count=%d opts=%j",h.pipesCount,t);var d=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?a:o;h.endEmitted?R(d):p.once("end",d),e.on("unpipe",i);var g=m(p);e.on("drain",g);var v=!1,w=!1;return p.on("data",s),r(e,"error",l),e.once("close",u),e.once("finish",c),e.emit("pipe",p),h.flowing||(P("pipe resume"),p.resume()),e},a.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}var a=A(t.pipes,e);return-1===a?this:(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},a.prototype.on=function(e,t){var n=j.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&p(this):R(v,this))}return n},a.prototype.addListener=a.prototype.on,a.prototype.resume=function(){var e=this._readableState;return e.flowing||(P("resume"),e.flowing=!0,w(this,e)),this},a.prototype.pause=function(){return P("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(P("pause"),this._readableState.flowing=!1,this.emit("pause")),this},a.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;e.on("end",function(){if(P("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)}),e.on("data",function(i){P("wrapped data"),t.decoder&&(i=t.decoder.write(i)),(!t.objectMode||null!==i&&void 0!==i)&&(t.objectMode||i&&i.length)&&(r.push(i)||(n=!0,e.pause()))});for(var i in e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<F.length;a++)e.on(F[a],r.emit.bind(r,F[a]));return r._read=function(t){P("wrapped _read",t),n&&(n=!1,e.resume())},r},a._fromList=_}).call(this,e("_process"))},{"./_stream_duplex":96,"./internal/streams/BufferList":101,"./internal/streams/stream":102,_process:94,buffer:7,"buffer-shims":9,"core-util-is":19,events:24,inherits:47,isarray:50,"process-nextick-args":93,"string_decoder/":112,util:3}],99:[function(e,t,n){"use strict";function r(e){this.afterTransform=function(t,n){return i(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function i(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!==n&&void 0!==n&&e.push(n),i(t);var a=e._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&e._read(a.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);s.call(this,e),this._transformState=new r(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(e,n){o(t,e,n)}):o(t)})}function o(e,t,n){if(t)return e.emit("error",t);null!==n&&void 0!==n&&e.push(n);var r=e._writableState,i=e._transformState;if(r.length)throw new Error("Calling transform done when ws.length != 0");if(i.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}t.exports=a;var s=e("./_stream_duplex"),l=e("core-util-is");l.inherits=e("inherits"),l.inherits(a,s),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0}},{"./_stream_duplex":96,"core-util-is":19,inherits:47}],100:[function(e,t,n){(function(n){"use strict";function r(){}function i(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function a(t,n){k=k||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,n instanceof k&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var r=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){d(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new x(this)}function o(t){if(k=k||e("./_stream_duplex"),!(L.call(o,this)||this instanceof k))return new o(t);this._writableState=new a(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev)),C.call(this)}function s(e,t){var n=new Error("write after end");e.emit("error",n),E(t,n)}function l(e,t,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),E(r,a),i=!1),i}function u(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=M.from(t,n)),t}function c(e,t,n,r,a,o){n||(r=u(t,r,a),R.isBuffer(r)&&(a="buffer"));var s=t.objectMode?1:r.length;t.length+=s;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest=new i(r,a,o),c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else f(e,t,!1,s,r,a,o);return l}function f(e,t,n,r,i,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function p(e,t,n,r,i){--t.pendingcb,n?E(i,r):i(r),e._writableState.errorEmitted=!0,e.emit("error",r)}function h(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function d(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(h(n),t)p(e,n,r,t,i);else{var a=w(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||v(e,n),r?T(g,e,n,a,i):g(e,n,a,i)}}function g(e,t,n,r){n||m(e,t),t.pendingcb--,r(),y(e,t)}function m(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function v(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),a=t.corkedRequestsFree;a.entry=n;for(var o=0;n;)i[o]=n,n=n.next,o+=1;f(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new x(t)}else{for(;n;){var s=n.chunk,l=n.encoding,u=n.callback;if(f(e,t,!1,t.objectMode?1:s.length,s,l,u),n=n.next,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=n,t.bufferProcessing=!1}function w(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function b(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function y(e,t){var n=w(t);return n&&(0===t.pendingcb?(b(e,t),t.finished=!0,e.emit("finish")):b(e,t)),n}function _(e,t,n){t.ending=!0,y(e,t),n&&(t.finished?E(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function x(e){var t=this;this.next=null,this.entry=null,this.finish=function(n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}t.exports=o;var k,E=e("process-nextick-args"),T=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?setImmediate:E;o.WritableState=a;var S=e("core-util-is");S.inherits=e("inherits");var A={deprecate:e("util-deprecate")},C=e("./internal/streams/stream"),R=e("buffer").Buffer,M=e("buffer-shims");S.inherits(o,C),a.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(a.prototype,"buffer",{get:A.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var L;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(L=Function.prototype[Symbol.hasInstance],Object.defineProperty(o,Symbol.hasInstance,{value:function(e){return!!L.call(this,e)||e&&e._writableState instanceof a}})):L=function(e){return e instanceof this},o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},o.prototype.write=function(e,t,n){var i=this._writableState,a=!1,o=R.isBuffer(e);return"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=r),i.ended?s(this,n):(o||l(this,i,e,n))&&(i.pendingcb++,a=c(this,i,o,e,t,n)),a},o.prototype.cork=function(){this._writableState.corked++},o.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||v(this,e))},o.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},o.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},o.prototype._writev=null,o.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||_(this,r,n)}}).call(this,e("_process"))},{"./_stream_duplex":96,"./internal/streams/stream":102,_process:94,buffer:7,"buffer-shims":9,"core-util-is":19,inherits:47,"process-nextick-args":93,"util-deprecate":116}],101:[function(e,t,n){"use strict";function r(){this.head=null,this.tail=null,this.length=0}e("buffer").Buffer;var i=e("buffer-shims");t.exports=r,r.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},r.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},r.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},r.prototype.clear=function(){this.head=this.tail=null,this.length=0},r.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},r.prototype.concat=function(e){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var t=i.allocUnsafe(e>>>0),n=this.head,r=0;n;)n.data.copy(t,r),r+=n.data.length,n=n.next;return t}},{buffer:7,"buffer-shims":9}],102:[function(e,t,n){t.exports=e("events").EventEmitter},{events:24}],103:[function(e,t,n){t.exports=e("./readable").PassThrough},{"./readable":104}],104:[function(e,t,n){(n=t.exports=e("./lib/_stream_readable.js")).Stream=n,n.Readable=n,n.Writable=e("./lib/_stream_writable.js"),n.Duplex=e("./lib/_stream_duplex.js"),n.Transform=e("./lib/_stream_transform.js"),n.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":96,"./lib/_stream_passthrough.js":97,"./lib/_stream_readable.js":98,"./lib/_stream_transform.js":99,"./lib/_stream_writable.js":100}],105:[function(e,t,n){t.exports=e("./readable").Transform},{"./readable":104}],106:[function(e,t,n){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":100}],107:[function(e,t,n){var r=e("./lib/encoder"),i=e("./lib/decoder");t.exports={encode:r,decode:i}},{"./lib/decoder":108,"./lib/encoder":109}],108:[function(e,t,n){(function(e){var n=function(){"use strict";function e(){}function t(e,t){for(var n,r,i=0,a=[],o=16;o>0&&!e[o-1];)o--;a.push({children:[],index:0});var s,l=a[0];for(n=0;n<o;n++){for(r=0;r<e[n];r++){for((l=a.pop()).children[l.index]=t[i];l.index>0;)l=a.pop();for(l.index++,a.push(l);a.length<=n;)a.push(s={children:[],index:0}),l.children[l.index]=s.children,l=s;i++}n+1<o&&(a.push(s={children:[],index:0}),l.children[l.index]=s.children,l=s)}return a[0].children}function n(e,t,n,r,i,o,s,l,u){function c(){if(T>0)return T--,E>>T&1;if(255==(E=e[t++])){var n=e[t++];if(n)throw"unexpected marker: "+(E<<8|n).toString(16)}return T=7,E>>>7}function f(e){for(var t,n=e;null!==(t=c());){if("number"==typeof(n=n[t]))return n;if("object"!=typeof n)throw"invalid huffman sequence"}return null}function p(e){for(var t=0;e>0;){var n=c();if(null===n)return;t=t<<1|n,e--}return t}function h(e){var t=p(e);return t>=1<<e-1?t:t+(-1<<e)+1}n.precision,n.samplesPerLine,n.scanLines;var d,g,m,v,w,b,y,_=n.mcusPerLine,x=n.progressive,k=(n.maxH,n.maxV,t),E=0,T=0,S=0,A=0,C=r.length;y=x?0===o?0===l?function(e,t){var n=f(e.huffmanTableDC),r=0===n?0:h(n)<<u;t[0]=e.pred+=r}:function(e,t){t[0]|=c()<<u}:0===l?function(e,t){if(S>0)S--;else for(var n=o,r=s;n<=r;){var i=f(e.huffmanTableAC),l=15&i,c=i>>4;if(0!==l)t[a[n+=c]]=h(l)*(1<<u),n++;else{if(c<15){S=p(c)+(1<<c)-1;break}n+=16}}}:function(e,t){for(var n=o,r=s,i=0;n<=r;){var l=a[n];switch(A){case 0:var g=f(e.huffmanTableAC),m=15&g,i=g>>4;if(0===m)i<15?(S=p(i)+(1<<i),A=4):(i=16,A=1);else{if(1!==m)throw"invalid ACn encoding";d=h(m),A=i?2:3}continue;case 1:case 2:t[l]?t[l]+=c()<<u:0==--i&&(A=2==A?3:0);break;case 3:t[l]?t[l]+=c()<<u:(t[l]=d<<u,A=0);break;case 4:t[l]&&(t[l]+=c()<<u)}n++}4===A&&0==--S&&(A=0)}:function(e,t){var n=f(e.huffmanTableDC),r=0===n?0:h(n);t[0]=e.pred+=r;for(var i=1;i<64;){var o=f(e.huffmanTableAC),s=15&o,l=o>>4;if(0!==s)t[a[i+=l]]=h(s),i++;else{if(l<15)break;i+=16}}};var R,M,L=0;M=1==C?r[0].blocksPerLine*r[0].blocksPerColumn:_*n.mcusPerColumn,i||(i=M);for(var j,I;L<M;){for(m=0;m<C;m++)r[m].pred=0;if(S=0,1==C)for(g=r[0],b=0;b<i;b++)!function(e,t,n){var r=n/e.blocksPerLine|0,i=n%e.blocksPerLine;t(e,e.blocks[r][i])}(g,y,L),L++;else for(b=0;b<i;b++){for(m=0;m<C;m++)for(j=(g=r[m]).h,I=g.v,v=0;v<I;v++)for(w=0;w<j;w++)!function(e,t,n,r,i){var a=n%_,o=(n/_|0)*e.v+r,s=a*e.h+i;t(e,e.blocks[o][s])}(g,y,L,v,w);if(++L===M)break}if(T=0,(R=e[t]<<8|e[t+1])<65280)throw"marker was not found";if(!(R>=65488&&R<=65495))break;t+=2}return t-k}function r(e,t){for(var n,r,i=[],a=t.blocksPerLine,d=t.blocksPerColumn,g=a<<3,m=new Int32Array(64),v=new Uint8Array(64),w=0;w<d;w++){var b=w<<3;for(n=0;n<8;n++)i.push(new Uint8Array(g));for(var y=0;y<a;y++){!function(e,n,r){var i,a,d,g,m,v,w,b,y,_,x=t.quantizationTable,k=r;for(_=0;_<64;_++)k[_]=e[_]*x[_];for(_=0;_<8;++_){var E=8*_;0!=k[1+E]||0!=k[2+E]||0!=k[3+E]||0!=k[4+E]||0!=k[5+E]||0!=k[6+E]||0!=k[7+E]?(i=p*k[0+E]+128>>8,a=p*k[4+E]+128>>8,d=k[2+E],g=k[6+E],m=h*(k[1+E]-k[7+E])+128>>8,b=h*(k[1+E]+k[7+E])+128>>8,v=k[3+E]<<4,w=k[5+E]<<4,y=i-a+1>>1,i=i+a+1>>1,a=y,y=d*f+g*c+128>>8,d=d*c-g*f+128>>8,g=y,y=m-w+1>>1,m=m+w+1>>1,w=y,y=b+v+1>>1,v=b-v+1>>1,b=y,y=i-g+1>>1,i=i+g+1>>1,g=y,y=a-d+1>>1,a=a+d+1>>1,d=y,y=m*u+b*l+2048>>12,m=m*l-b*u+2048>>12,b=y,y=v*s+w*o+2048>>12,v=v*o-w*s+2048>>12,w=y,k[0+E]=i+b,k[7+E]=i-b,k[1+E]=a+w,k[6+E]=a-w,k[2+E]=d+v,k[5+E]=d-v,k[3+E]=g+m,k[4+E]=g-m):(y=p*k[0+E]+512>>10,k[0+E]=y,k[1+E]=y,k[2+E]=y,k[3+E]=y,k[4+E]=y,k[5+E]=y,k[6+E]=y,k[7+E]=y)}for(_=0;_<8;++_){var T=_;0!=k[8+T]||0!=k[16+T]||0!=k[24+T]||0!=k[32+T]||0!=k[40+T]||0!=k[48+T]||0!=k[56+T]?(i=p*k[0+T]+2048>>12,a=p*k[32+T]+2048>>12,d=k[16+T],g=k[48+T],m=h*(k[8+T]-k[56+T])+2048>>12,b=h*(k[8+T]+k[56+T])+2048>>12,v=k[24+T],w=k[40+T],y=i-a+1>>1,i=i+a+1>>1,a=y,y=d*f+g*c+2048>>12,d=d*c-g*f+2048>>12,g=y,y=m-w+1>>1,m=m+w+1>>1,w=y,y=b+v+1>>1,v=b-v+1>>1,b=y,y=i-g+1>>1,i=i+g+1>>1,g=y,y=a-d+1>>1,a=a+d+1>>1,d=y,y=m*u+b*l+2048>>12,m=m*l-b*u+2048>>12,b=y,y=v*s+w*o+2048>>12,v=v*o-w*s+2048>>12,w=y,k[0+T]=i+b,k[56+T]=i-b,k[8+T]=a+w,k[48+T]=a-w,k[16+T]=d+v,k[40+T]=d-v,k[24+T]=g+m,k[32+T]=g-m):(y=p*r[_+0]+8192>>14,k[0+T]=y,k[8+T]=y,k[16+T]=y,k[24+T]=y,k[32+T]=y,k[40+T]=y,k[48+T]=y,k[56+T]=y)}for(_=0;_<64;++_){var S=128+(k[_]+8>>4);n[_]=S<0?0:S>255?255:S}}(t.blocks[w][y],v,m);var _=0,x=y<<3;for(r=0;r<8;r++){var k=i[b+r];for(n=0;n<8;n++)k[x+n]=v[_++]}}}return i}function i(e){return e<0?0:e>255?255:e}var a=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),o=4017,s=799,l=3406,u=2276,c=1567,f=3784,p=5793,h=2896;return e.prototype={load:function(e){var t=new XMLHttpRequest;t.open("GET",e,!0),t.responseType="arraybuffer",t.onload=function(){var e=new Uint8Array(t.response||t.mozResponseArrayBuffer);this.parse(e),this.onload&&this.onload()}.bind(this),t.send(null)},parse:function(e){function i(){var t=e[l]<<8|e[l+1];return l+=2,t}var o,s,l=0,u=(e.length,null),c=null,f=[],p=[],h=[],d=[],g=i();if(65496!=g)throw"SOI not found";for(g=i();65497!=g;){var m;switch(g){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var v=function(){var t=i(),n=e.subarray(l,l+t-2);return l+=n.length,n}();65504===g&&74===v[0]&&70===v[1]&&73===v[2]&&70===v[3]&&0===v[4]&&(u={version:{major:v[5],minor:v[6]},densityUnits:v[7],xDensity:v[8]<<8|v[9],yDensity:v[10]<<8|v[11],thumbWidth:v[12],thumbHeight:v[13],thumbData:v.subarray(14,14+3*v[12]*v[13])}),65518===g&&65===v[0]&&100===v[1]&&111===v[2]&&98===v[3]&&101===v[4]&&0===v[5]&&(c={version:v[6],flags0:v[7]<<8|v[8],flags1:v[9]<<8|v[10],transformCode:v[11]});break;case 65499:for(var w=i()+l-2;l<w;){var b=e[l++],y=new Int32Array(64);if(b>>4==0)for(m=0;m<64;m++)y[_=a[m]]=e[l++];else{if(b>>4!=1)throw"DQT: invalid table spec";for(m=0;m<64;m++){var _=a[m];y[_]=i()}}f[15&b]=y}break;case 65472:case 65473:case 65474:i(),(o={}).extended=65473===g,o.progressive=65474===g,o.precision=e[l++],o.scanLines=i(),o.samplesPerLine=i(),o.components={},o.componentsOrder=[];var x,k=e[l++];for(z=0;z<k;z++){x=e[l];var E=e[l+1]>>4,T=15&e[l+1],S=e[l+2];o.componentsOrder.push(x),o.components[x]={h:E,v:T,quantizationTable:f[S]},l+=3}!function(e){var t,n,r=0,i=0;for(n in e.components)e.components.hasOwnProperty(n)&&(r<(t=e.components[n]).h&&(r=t.h),i<t.v&&(i=t.v));var a=Math.ceil(e.samplesPerLine/8/r),o=Math.ceil(e.scanLines/8/i);for(n in e.components)if(e.components.hasOwnProperty(n)){t=e.components[n];for(var s=Math.ceil(Math.ceil(e.samplesPerLine/8)*t.h/r),l=Math.ceil(Math.ceil(e.scanLines/8)*t.v/i),u=a*t.h,c=o*t.v,f=[],p=0;p<c;p++){for(var h=[],d=0;d<u;d++)h.push(new Int32Array(64));f.push(h)}t.blocksPerLine=s,t.blocksPerColumn=l,t.blocks=f}e.maxH=r,e.maxV=i,e.mcusPerLine=a,e.mcusPerColumn=o}(o),p.push(o);break;case 65476:var A=i();for(z=2;z<A;){var C=e[l++],R=new Uint8Array(16),M=0;for(m=0;m<16;m++,l++)M+=R[m]=e[l];var L=new Uint8Array(M);for(m=0;m<M;m++,l++)L[m]=e[l];z+=17+M,(C>>4==0?d:h)[15&C]=t(R,L)}break;case 65501:i(),s=i();break;case 65498:i();var j=e[l++],I=[];for(z=0;z<j;z++){F=o.components[e[l++]];var D=e[l++];F.huffmanTableDC=d[D>>4],F.huffmanTableAC=h[15&D],I.push(F)}var B=e[l++],N=e[l++],P=e[l++],O=n(e,l,o,I,s,B,N,P>>4,15&P);l+=O;break;default:if(255==e[l-3]&&e[l-2]>=192&&e[l-2]<=254){l-=3;break}throw"unknown JPEG marker "+g.toString(16)}g=i()}if(1!=p.length)throw"only single frame JPEGs supported";this.width=o.samplesPerLine,this.height=o.scanLines,this.jfif=u,this.adobe=c,this.components=[];for(var z=0;z<o.componentsOrder.length;z++){var F=o.components[o.componentsOrder[z]];this.components.push({lines:r(0,F),scaleX:F.h/o.maxH,scaleY:F.v/o.maxV})}},getData:function(e,t){var n,r,a,o,s,l,u,c,f,p,h,d,g,m,v,w,b,y,_,x,k,E=this.width/e,T=this.height/t,S=0,A=e*t*this.components.length,C=new Uint8Array(A);switch(this.components.length){case 1:for(n=this.components[0],p=0;p<t;p++)for(s=n.lines[0|p*n.scaleY*T],f=0;f<e;f++)h=s[0|f*n.scaleX*E],C[S++]=h;break;case 2:for(n=this.components[0],r=this.components[1],p=0;p<t;p++)for(s=n.lines[0|p*n.scaleY*T],l=r.lines[0|p*r.scaleY*T],f=0;f<e;f++)h=s[0|f*n.scaleX*E],C[S++]=h,h=l[0|f*r.scaleX*E],C[S++]=h;break;case 3:for(k=!0,this.adobe&&this.adobe.transformCode?k=!0:void 0!==this.colorTransform&&(k=!!this.colorTransform),n=this.components[0],r=this.components[1],a=this.components[2],p=0;p<t;p++)for(s=n.lines[0|p*n.scaleY*T],l=r.lines[0|p*r.scaleY*T],u=a.lines[0|p*a.scaleY*T],f=0;f<e;f++)k?(h=s[0|f*n.scaleX*E],d=l[0|f*r.scaleX*E],y=i(h+1.402*((g=u[0|f*a.scaleX*E])-128)),_=i(h-.3441363*(d-128)-.71413636*(g-128)),x=i(h+1.772*(d-128))):(y=s[0|f*n.scaleX*E],_=l[0|f*r.scaleX*E],x=u[0|f*a.scaleX*E]),C[S++]=y,C[S++]=_,C[S++]=x;break;case 4:if(!this.adobe)throw"Unsupported color mode (4 components)";for(k=!1,this.adobe&&this.adobe.transformCode?k=!0:void 0!==this.colorTransform&&(k=!!this.colorTransform),n=this.components[0],r=this.components[1],a=this.components[2],o=this.components[3],p=0;p<t;p++)for(s=n.lines[0|p*n.scaleY*T],l=r.lines[0|p*r.scaleY*T],u=a.lines[0|p*a.scaleY*T],c=o.lines[0|p*o.scaleY*T],f=0;f<e;f++)k?(h=s[0|f*n.scaleX*E],d=l[0|f*r.scaleX*E],g=u[0|f*a.scaleX*E],m=c[0|f*o.scaleX*E],v=255-i(h+1.402*(g-128)),w=255-i(h-.3441363*(d-128)-.71413636*(g-128)),b=255-i(h+1.772*(d-128))):(v=s[0|f*n.scaleX*E],w=l[0|f*r.scaleX*E],b=u[0|f*a.scaleX*E],m=c[0|f*o.scaleX*E]),C[S++]=v,C[S++]=w,C[S++]=b,C[S++]=m;break;default:throw"Unsupported color mode"}return C},copyToImageData:function(e){var t,n,r,a,o,s,l,u,c,f=e.width,p=e.height,h=e.data,d=this.getData(f,p),g=0,m=0;switch(this.components.length){case 1:for(n=0;n<p;n++)for(t=0;t<f;t++)r=d[g++],h[m++]=r,h[m++]=r,h[m++]=r,h[m++]=255;break;case 3:for(n=0;n<p;n++)for(t=0;t<f;t++)l=d[g++],u=d[g++],c=d[g++],h[m++]=l,h[m++]=u,h[m++]=c,h[m++]=255;break;case 4:for(n=0;n<p;n++)for(t=0;t<f;t++)o=d[g++],s=d[g++],r=d[g++],l=255-i(o*(1-(a=d[g++])/255)+a),u=255-i(s*(1-a/255)+a),c=255-i(r*(1-a/255)+a),h[m++]=l,h[m++]=u,h[m++]=c,h[m++]=255;break;default:throw"Unsupported color mode"}}},e}();t.exports=function(t){var r=new Uint8Array(t),i=new n;i.parse(r);for(var a=i.getData(i.width,i.height),o=new e(i.width*i.height*4),s=0,l=0;l<o.length;l++)o[l+(l/3|0)]=a[s++],l%4==3&&(o[l]=255);return{data:o,width:i.width,height:i.height}}}).call(this,e("buffer").Buffer)},{buffer:7}],109:[function(e,t,n){(function(e){function n(t){function n(e){for(var t=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],n=0;n<64;n++){var r=E((t[n]*e+50)/100);r<1?r=1:r>255&&(r=255),T[U[n]]=r}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],a=0;a<64;a++){var o=E((i[a]*e+50)/100);o<1?o=1:o>255&&(o=255),S[U[a]]=o}for(var s=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],l=0,u=0;u<8;u++)for(var c=0;c<8;c++)A[l]=1/(T[U[l]]*s[u]*s[c]*8),C[l]=1/(S[U[l]]*s[u]*s[c]*8),l++}function r(e,t){for(var n=0,r=0,i=new Array,a=1;a<=16;a++){for(var o=1;o<=e[a];o++)i[t[r]]=[],i[t[r]][0]=n,i[t[r]][1]=a,r++,n++;n*=2}return i}function i(){b=r(q,H),y=r(G,Z),_=r(V,W),x=r(Y,X)}function a(){for(var e=1,t=2,n=1;n<=15;n++){for(var r=e;r<t;r++)M[32767+r]=n,R[32767+r]=[],R[32767+r][1]=n,R[32767+r][0]=r;for(var i=-(t-1);i<=-e;i++)M[32767+i]=n,R[32767+i]=[],R[32767+i][1]=n,R[32767+i][0]=t-1+i;e<<=1,t<<=1}}function o(){for(var e=0;e<256;e++)F[e]=19595*e,F[e+256>>0]=38470*e,F[e+512>>0]=7471*e+32768,F[e+768>>0]=-11059*e,F[e+1024>>0]=-21709*e,F[e+1280>>0]=32768*e+8421375,F[e+1536>>0]=-27439*e,F[e+1792>>0]=-5329*e}function s(e){for(var t=e[0],n=e[1]-1;n>=0;)t&1<<n&&(D|=1<<B),n--,--B<0&&(255==D?(l(255),l(0)):l(D),B=7,D=0)}function l(e){I.push(e)}function u(e){l(e>>8&255),l(255&e)}function c(e,t){var n,r,i,a,o,s,l,u,c,f=0;for(c=0;c<8;++c){n=e[f],r=e[f+1],i=e[f+2],a=e[f+3],o=e[f+4],s=e[f+5],l=e[f+6];var p=n+(u=e[f+7]),h=n-u,d=r+l,g=r-l,m=i+s,v=i-s,w=a+o,b=a-o,y=p+w,_=p-w,x=d+m,k=d-m;e[f]=y+x,e[f+4]=y-x;var E=.707106781*(k+_);e[f+2]=_+E,e[f+6]=_-E;var T=.382683433*((y=b+v)-(k=g+h)),S=.5411961*y+T,A=1.306562965*k+T,C=.707106781*(x=v+g),R=h+C,M=h-C;e[f+5]=M+S,e[f+3]=M-S,e[f+1]=R+A,e[f+7]=R-A,f+=8}for(f=0,c=0;c<8;++c){n=e[f],r=e[f+8],i=e[f+16],a=e[f+24],o=e[f+32],s=e[f+40],l=e[f+48];var j=n+(u=e[f+56]),I=n-u,D=r+l,B=r-l,N=i+s,P=i-s,O=a+o,z=a-o,F=j+O,U=j-O,q=D+N,H=D-N;e[f]=F+q,e[f+32]=F-q;var V=.707106781*(H+U);e[f+16]=U+V,e[f+48]=U-V;var W=.382683433*((F=z+P)-(H=B+I)),G=.5411961*F+W,Z=1.306562965*H+W,Y=.707106781*(q=P+B),X=I+Y,$=I-Y;e[f+40]=$+G,e[f+24]=$-G,e[f+8]=X+Z,e[f+56]=X-Z,f++}var Q;for(c=0;c<64;++c)Q=e[c]*t[c],L[c]=Q>0?Q+.5|0:Q-.5|0;return L}function f(){u(65504),u(16),l(74),l(70),l(73),l(70),l(0),l(1),l(1),l(0),u(1),u(1),l(0),l(0)}function p(e,t){u(65472),u(17),l(8),u(t),u(e),l(3),l(1),l(17),l(0),l(2),l(17),l(1),l(3),l(17),l(1)}function h(){u(65499),u(132),l(0);for(var e=0;e<64;e++)l(T[e]);l(1);for(var t=0;t<64;t++)l(S[t])}function d(){u(65476),u(418),l(0);for(var e=0;e<16;e++)l(q[e+1]);for(var t=0;t<=11;t++)l(H[t]);l(16);for(var n=0;n<16;n++)l(V[n+1]);for(var r=0;r<=161;r++)l(W[r]);l(1);for(var i=0;i<16;i++)l(G[i+1]);for(var a=0;a<=11;a++)l(Z[a]);l(17);for(var o=0;o<16;o++)l(Y[o+1]);for(var s=0;s<=161;s++)l(X[s])}function g(){u(65498),u(12),l(3),l(1),l(0),l(2),l(17),l(3),l(17),l(0),l(63),l(0)}function m(e,t,n,r,i){var a,o=i[0],l=i[240];for(var u=c(e,t),f=0;f<64;++f)j[U[f]]=u[f];var p=j[0]-n;n=j[0],0==p?s(r[0]):(s(r[M[a=32767+p]]),s(R[a]));for(var h=63;h>0&&0==j[h];h--);if(0==h)return s(o),n;for(var d,g=1;g<=h;){for(var m=g;0==j[g]&&g<=h;++g);var v=g-m;if(v>=16){d=v>>4;for(var w=1;w<=d;++w)s(l);v&=15}a=32767+j[g],s(i[(v<<4)+M[a]]),s(R[a]),g++}return 63!=h&&s(o),n}function v(){for(var e=String.fromCharCode,t=0;t<256;t++)z[t]=e(t)}function w(e){if(e<=0&&(e=1),e>100&&(e=100),k!=e){n(e<50?Math.floor(5e3/e):Math.floor(200-2*e)),k=e}}Math.round;var b,y,_,x,k,E=Math.floor,T=new Array(64),S=new Array(64),A=new Array(64),C=new Array(64),R=new Array(65535),M=new Array(65535),L=new Array(64),j=new Array(64),I=[],D=0,B=7,N=new Array(64),P=new Array(64),O=new Array(64),z=new Array(256),F=new Array(2048),U=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],q=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],H=[0,1,2,3,4,5,6,7,8,9,10,11],V=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],W=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],G=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],Z=[0,1,2,3,4,5,6,7,8,9,10,11],Y=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],X=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];this.encode=function(t,n){(new Date).getTime();n&&w(n),I=new Array,D=0,B=7,u(65496),f(),h(),p(t.width,t.height),d(),g();var r=0,i=0,a=0;D=0,B=7,this.encode.displayName="_encode_";for(var o,l,c,v,k,E,T,S,R,M=t.data,L=t.width,j=t.height,z=4*L,U=0;U<j;){for(o=0;o<z;){for(E=k=z*U+o,T=-1,S=0,R=0;R<64;R++)E=k+(S=R>>3)*z+(T=4*(7&R)),U+S>=j&&(E-=z*(U+1+S-j)),o+T>=z&&(E-=o+T-z+4),l=M[E++],c=M[E++],v=M[E++],N[R]=(F[l]+F[c+256>>0]+F[v+512>>0]>>16)-128,P[R]=(F[l+768>>0]+F[c+1024>>0]+F[v+1280>>0]>>16)-128,O[R]=(F[l+1280>>0]+F[c+1536>>0]+F[v+1792>>0]>>16)-128;r=m(N,A,r,b,_),i=m(P,C,i,y,x),a=m(O,C,a,y,x),o+=32}U+=8}if(B>=0){var q=[];q[1]=B+1,q[0]=(1<<B+1)-1,s(q)}return u(65497),new e(I)},function(){(new Date).getTime();t||(t=50),v(),i(),a(),o(),w(t);(new Date).getTime()}()}t.exports=function(e,t){return void 0===t&&(t=50),{data:new n(t).encode(e,t),width:e.width,height:e.height}}}).call(this,e("buffer").Buffer)},{buffer:7}],110:[function(e,t,n){(function(n){"use strict";function r(e,t,n){if(4===e.shape.length)return r(e.pick(n),t,0);if(3===e.shape.length)if(3===e.shape[2])c.assign(u(t,[e.shape[0],e.shape[1],3],[4,4*e.shape[0],1]),e),c.assigns(u(t,[e.shape[0]*e.shape[1]],[4],3),255);else if(4===e.shape[2])c.assign(u(t,[e.shape[0],e.shape[1],4],[4,4*e.shape[0],1]),e);else{if(1!==e.shape[2])return new Error("Incompatible array shape");c.assign(u(t,[e.shape[0],e.shape[1],3],[4,4*e.shape[0],1]),u(e.data,[e.shape[0],e.shape[1],3],[e.stride[0],e.stride[1],0],e.offset)),c.assigns(u(t,[e.shape[0]*e.shape[1]],[4],3),255)}else{if(2!==e.shape.length)return new Error("Incompatible array shape");c.assign(u(t,[e.shape[0],e.shape[1],3],[4,4*e.shape[0],1]),u(e.data,[e.shape[0],e.shape[1],3],[e.stride[0],e.stride[1],0],e.offset)),c.assigns(u(t,[e.shape[0]*e.shape[1]],[4],3),255)}return t}function i(e){var t=f();return t.emit("error",e),t}var a=e("contentstream"),o=e("gif-encoder"),s=e("jpeg-js"),l=e("pngjs-nozlib").PNG,u=e("ndarray"),c=e("ndarray-ops"),f=e("through");t.exports=function(e,t,u){switch(u=u||{},t.toUpperCase()){case"JPG":case".JPG":case"JPEG":case".JPEG":case"JPE":case".JPE":var c=e.shape[0],f=e.shape[1],p={data:g=r(e,g=new n(c*f*4)),width:c,height:f},h=s.encode(p,u.quality);return new a(h.data);case"GIF":case".GIF":var d=4===e.shape.length?e.shape[0]:1,c=4===e.shape.length?e.shape[1]:e.shape[0],f=4===e.shape.length?e.shape[2]:e.shape[1],g=new n(c*f*4),m=new o(c,f);m.writeHeader();for(var v=0;v<d;v++)g=r(e,g,v),m.addFrame(g);return m.finish(),m;case"PNG":case".PNG":var w=new l({width:e.shape[0],height:e.shape[1]});return"Error"==typeof(g=r(e,w.data))?i(g):(w.data=g,w.pack());case"CANVAS":var b=document.createElement("canvas"),y=b.getContext("2d");b.width=e.shape[0],b.height=e.shape[1];var _=y.getImageData(0,0,b.width,b.height);return"Error"==typeof(g=r(e,g=_.data))?i(g):(y.putImageData(_,0,0),b);default:return i(new Error("Unsupported file type: "+t))}}}).call(this,e("buffer").Buffer)},{buffer:7,contentstream:10,"gif-encoder":35,"jpeg-js":107,ndarray:58,"ndarray-ops":55,"pngjs-nozlib":91,through:113}],111:[function(e,t,n){function r(){i.call(this)}t.exports=r;var i=e("events").EventEmitter;e("inherits")(r,i),r.Readable=e("readable-stream/readable.js"),r.Writable=e("readable-stream/writable.js"),r.Duplex=e("readable-stream/duplex.js"),r.Transform=e("readable-stream/transform.js"),r.PassThrough=e("readable-stream/passthrough.js"),r.Stream=r,r.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&u.pause&&u.pause()}function r(){u.readable&&u.resume&&u.resume()}function a(){c||(c=!0,e.end())}function o(){c||(c=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(l(),0===i.listenerCount(this,"error"))throw e}function l(){u.removeListener("data",n),e.removeListener("drain",r),u.removeListener("end",a),u.removeListener("close",o),u.removeListener("error",s),e.removeListener("error",s),u.removeListener("end",l),u.removeListener("close",l),e.removeListener("close",l)}var u=this;u.on("data",n),e.on("drain",r),e._isStdio||t&&!1===t.end||(u.on("end",a),u.on("close",o));var c=!1;return u.on("error",s),e.on("error",s),u.on("end",l),u.on("close",l),e.on("close",l),e.emit("pipe",u),e}},{events:24,inherits:47,"readable-stream/duplex.js":95,"readable-stream/passthrough.js":103,"readable-stream/readable.js":104,"readable-stream/transform.js":105,"readable-stream/writable.js":106}],112:[function(e,t,n){"use strict";function r(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function i(e){var t=r(e);if("string"!=typeof t&&(m.isEncoding===w||!w(e)))throw new Error("Unknown encoding: "+e);return t||e}function a(e){this.encoding=i(e);var t;switch(this.encoding){case"utf16le":this.text=c,this.end=f,t=4;break;case"utf8":this.fillLast=u,t=4;break;case"base64":this.text=p,this.end=h,t=3;break;default:return this.write=d,void(this.end=g)}this.lastNeed=0,this.lastTotal=0,this.lastChar=v.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:-1}function s(e,t,n){var r=t.length-1;if(r<n)return 0;var i=o(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n?0:(i=o(t[r]))>=0?(i>0&&(e.lastNeed=i-2),i):--r<n?0:(i=o(t[r]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}function l(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"<22>".repeat(n);if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"<22>".repeat(n+1);if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"<22>".repeat(n+2)}}function u(e){var t=this.lastTotal-this.lastNeed,n=l(this,e,t);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function f(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function p(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function g(e){return e&&e.length?this.write(e):""}var m=e("buffer").Buffer,v=e("buffer-shims"),w=m.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};n.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},a.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"<22>".repeat(this.lastTotal-this.lastNeed):t},a.prototype.text=function(e,t){var n=s(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{buffer:7,"buffer-shims":9}],113:[function(e,t,n){(function(r){function i(e,t,n){function i(){for(;u.length&&!f.paused;){var e=u.shift();if(null===e)return f.emit("end");f.emit("data",e)}}function o(){f.writable=!1,t.call(f),!f.readable&&f.autoDestroy&&f.destroy()}e=e||function(e){this.queue(e)},t=t||function(){this.queue(null)};var s=!1,l=!1,u=[],c=!1,f=new a;return f.readable=f.writable=!0,f.paused=!1,f.autoDestroy=!(n&&!1===n.autoDestroy),f.write=function(t){return e.call(this,t),!f.paused},f.queue=f.push=function(e){return c?f:(null===e&&(c=!0),u.push(e),i(),f)},f.on("end",function(){f.readable=!1,!f.writable&&f.autoDestroy&&r.nextTick(function(){f.destroy()})}),f.end=function(e){if(!s)return s=!0,arguments.length&&f.write(e),o(),f},f.destroy=function(){if(!l)return l=!0,s=!0,u.length=0,f.writable=f.readable=!1,f.emit("close"),f},f.pause=function(){if(!f.paused)return f.paused=!0,f},f.resume=function(){return f.paused&&(f.paused=!1,f.emit("resume")),i(),f.paused||f.emit("drain"),f},f}var a=e("stream");n=t.exports=i,i.through=i}).call(this,e("_process"))},{_process:94,stream:111}],114:[function(e,t,n){"use strict";function r(e,t){for(var n=1,r=e.length,i=e[0],a=e[0],o=1;o<r;++o)if(a=i,i=e[o],t(i,a)){if(o===n){n++;continue}e[n++]=i}return e.length=n,e}function i(e){for(var t=1,n=e.length,r=e[0],i=e[0],a=1;a<n;++a,i=r)if(i=r,(r=e[a])!==i){if(a===t){t++;continue}e[t++]=r}return e.length=t,e}t.exports=function(e,t,n){return 0===e.length?e:t?(n||e.sort(t),r(e,t)):(n||e.sort(),i(e))}},{}],115:[function(e,t,n){var r=e("mime"),i=e("fs");t.exports=function(e){return"data:"+r.lookup(e)+";base64,"+i.readFileSync(e,"base64")}},{fs:6,mime:53}],116:[function(e,t,n){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(e){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],117:[function(e,t,n){arguments[4][47][0].apply(n,arguments)},{dup:47}],118:[function(e,t,n){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],119:[function(e,t,n){(function(t,r){function i(e,t){var r={seen:[],stylize:o};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),g(t)?r.showHidden=t:t&&n._extend(r,t),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=a),l(r,e,r.depth)}function a(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function o(e,t){return e}function s(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function l(e,t,r){if(e.customInspect&&t&&E(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(r,e);return w(i)||(i=l(e,i,r)),i}var a=u(e,t);if(a)return a;var o=Object.keys(t),g=s(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),k(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return c(t);if(0===o.length){if(E(t)){var m=t.name?": "+t.name:"";return e.stylize("[Function"+m+"]","special")}if(y(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(x(t))return e.stylize(Date.prototype.toString.call(t),"date");if(k(t))return c(t)}var v="",b=!1,_=["{","}"];if(d(t)&&(b=!0,_=["[","]"]),E(t)&&(v=" [Function"+(t.name?": "+t.name:"")+"]"),y(t)&&(v=" "+RegExp.prototype.toString.call(t)),x(t)&&(v=" "+Date.prototype.toUTCString.call(t)),k(t)&&(v=" "+c(t)),0===o.length&&(!b||0==t.length))return _[0]+v+_[1];if(r<0)return y(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var T;return T=b?f(e,t,r,g,o):o.map(function(n){return p(e,t,r,g,n,b)}),e.seen.pop(),h(T,v,_)}function u(e,t){if(b(t))return e.stylize("undefined","undefined");if(w(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return v(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,n,r,i){for(var a=[],o=0,s=t.length;o<s;++o)C(t,String(o))?a.push(p(e,t,n,r,String(o),!0)):a.push("");return i.forEach(function(i){i.match(/^\d+$/)||a.push(p(e,t,n,r,i,!0))}),a}function p(e,t,n,r,i,a){var o,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),C(r,i)||(o="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=m(n)?l(e,u.value,null):l(e,u.value,n-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),b(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function h(e,t,n){var r=0;return e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function d(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function m(e){return null===e}function v(e){return"number"==typeof e}function w(e){return"string"==typeof e}function b(e){return void 0===e}function y(e){return _(e)&&"[object RegExp]"===T(e)}function _(e){return"object"==typeof e&&null!==e}function x(e){return _(e)&&"[object Date]"===T(e)}function k(e){return _(e)&&("[object Error]"===T(e)||e instanceof Error)}function E(e){return"function"==typeof e}function T(e){return Object.prototype.toString.call(e)}function S(e){return e<10?"0"+e.toString(10):e.toString(10)}function A(){var e=new Date,t=[S(e.getHours()),S(e.getMinutes()),S(e.getSeconds())].join(":");return[e.getDate(),j[e.getMonth()],t].join(" ")}function C(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var R=/%[sdj%]/g;n.format=function(e){if(!w(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(i(arguments[n]));return t.join(" ")}for(var n=1,r=arguments,a=r.length,o=String(e).replace(R,function(e){if("%%"===e)return"%";if(n>=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n<a;s=r[++n])m(s)||!_(s)?o+=" "+s:o+=" "+i(s);return o},n.deprecate=function(e,i){if(b(r.process))return function(){return n.deprecate(e,i).apply(this,arguments)};if(!0===t.noDeprecation)return e;var a=!1;return function(){if(!a){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),a=!0}return e.apply(this,arguments)}};var M,L={};n.debuglog=function(e){if(b(M)&&(M=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!L[e])if(new RegExp("\\b"+e+"\\b","i").test(M)){var r=t.pid;L[e]=function(){var t=n.format.apply(n,arguments);console.error("%s %d: %s",e,r,t)}}else L[e]=function(){};return L[e]},n.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=d,n.isBoolean=g,n.isNull=m,n.isNullOrUndefined=function(e){return null==e},n.isNumber=v,n.isString=w,n.isSymbol=function(e){return"symbol"==typeof e},n.isUndefined=b,n.isRegExp=y,n.isObject=_,n.isDate=x,n.isError=k,n.isFunction=E,n.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},n.isBuffer=e("./support/isBuffer");var j=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];n.log=function(){console.log("%s - %s",A(),n.format.apply(n,arguments))},n.inherits=e("inherits"),n._extend=function(e,t){if(!t||!_(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":118,_process:94,inherits:117}],120:[function(e,t,n){t.exports=function(e,t,n,r){!function(t,n,r){var i=e.copy(r);i.number=e.options.sequencerCounter++,i.name=r.name||n,i.selector=r.selector||"ismod-"+n,i.container=r.container||e.options.selector,i.image=t,i.inBrowser=e.options.inBrowser,i.step={name:i.name,ID:i.number,imageName:i.image,inBrowser:e.options.inBrowser,ui:e.options.ui,options:i};var a=e.events,o=e.modules[n][0](i,a);e.images[t].steps.push(o)}(t,n,r)}},{}],121:[function(e,t,n){var r=e("fs"),i=function(e,t){r.readdir(e,function(n,i){var a=[];if(void 0===i)return t(a),[];for(var o=0;o<i.length;++o){var s=i[o];if("."!==s[0]){var l=e+"/"+s;r.stat(l,function(e,n){if(n.isDirectory()&&a.push(this.file),i.length===this.index+1)return t(a)}.bind({index:o,file:s}))}}})};t.exports=function(t="./output/",n){if(t="/"==t[t.length-1]?t:t+"/",n.options.inBrowser)return!1;r.access(t,function(e){e&&r.mkdir(t,function(){})}),i(t,function(i){var a=1;for(var o in i)if(null!=i[o].match(/^sequencer(.*)$/)){var s=parseInt(i[o].match(/^sequencer(.*)$/)[1]);a=s>=a?s+1:a}r.mkdir(t+"sequencer"+a,function(){var i=t+"sequencer"+a+"/";for(var o in n.images){var s=n.images[o].steps;for(var l in s){var u=s[l].output.src,c=s[l].output.format,f=e("data-uri-to-buffer")(u);r.writeFile(i+o+"_"+l+"."+c,f,function(){})}}})})}},{"data-uri-to-buffer":23,fs:6}],122:[function(e,t,n){function r(e){return Object.prototype.toString.call(e).split(" ")[1].slice(0,-1)}function i(e){return"Array"==r(e)?e[0]:e}function a(e){return"Array"==r(e)?e:[e]}function o(e){if("Array"==r(e))return e.slice();if("Object"==r(e)){var t={};for(var n in e)t[n]=o(e[n]);return t}return e}t.exports=function(e,t,n){n=[];for(var s in this.images)n.push(s);var l={},u=t;if("+"==t?t=["o_string_a","string_a","o_object"]:"-"==t?t=["o_string_a","number_a"]:"^"==t?t=["o_string_a","number","string","o_object"]:"r"==t?t=["o_string_a","o_number"]:"l"==t&&(t=["o_string","string","o_function"]),"o_object"==t[t.length-1]?"Object"!=r(e[e.length-1])&&e.push({}):"o_number"==t[t.length-1]?"number"!=typeof e[e.length-1]&&"Object"!=r(e[0])&&e.push(1):"o_function"==t[t.length-1]&&"Function"!=r(e[e.length-1])&&"Object"!=r(e[0])&&e.push(function(){}),"o_string_a"==t[0]){if(e.length==t.length-1){var c=!1;for(var f in e){if(!t[parseInt(f)+1].includes(typeof i(e[f]))){c=!1;break}c=!0}c&&e.splice(0,0,o(n))}}else if("o_string"==t[0]&&"l"==u&&2==e.length&&"string"==typeof e[0]){for(var p=1;this.images.hasOwnProperty("image"+p);)p++;e.splice(0,0,"image"+p)}if(e.length==t.length)for(var f in t)"_a"==t[f].substr(t[f].length-2,2)&&(e[f]=a(e[f]));if(1==e.length){if(l=o(e[0]),"r"!=u&&"l"!=u)for(var h in l)l[h]=a(l[h])}else if("r"==u)for(var h in e[0])l[e[0][h]]=e[1];else if("l"==u)(l={images:{},callback:e[2]}).images[e[0]]=e[1];else for(var h in e[0]){if(l[s=e[0][h]]=[],"+"==u)for(var d in e[1])l[s].push({name:e[1][d],o:e[2]});if("-"==u&&(l[s]=e[1]),"^"==u){var g=this.images[s].steps.length,m=e[1];(m=m==g?m:m%g)<0&&(m+=g+1),l[s].push({index:m,name:e[2],o:e[3]})}}if("l"==u){l.loadedimages=[];for(var f in l.images)l.loadedimages.push(f)}return l}},{}],123:[function(e,t,n){if("undefined"!=typeof window)window.$=window.jQuery=e("jquery"),r=!0;else var r=!1;ImageSequencer=function(t){function n(e){return Object.prototype.toString.call(e).split(" ")[1].slice(0,-1)}function i(e){if("Array"==n(e))return e.slice();if("Object"==n(e)){var t={};for(var r in e)t[r]=i(e[r]);return t}return e}function a(e,t){t>0&&(thisStep=u[e].steps[t],thisStep.UI.onRemove(thisStep.options.step),u[e].steps.splice(t,1))}function o(){function t(n){if(n!=s.length){var i=s[n];e("./LoadImage")(r,i,o.images[i],function(){t(++n)})}else o.callback.call(u)}var n=[],r=this;for(var a in arguments)n.push(i(arguments[a]));var o=l.call(this,n,"l");c.push({method:"loadImages",json_q:i(o)});var s=this.copy(o.loadedimages),u={name:"ImageSequencer Wrapper",sequencer:this,addSteps:this.addSteps,removeSteps:this.removeSteps,insertSteps:this.insertSteps,run:this.run,UI:this.UI,setUI:this.setUI,images:s};t(0)}(t=t||{}).inBrowser=t.inBrowser||r,t.sequencerCounter=0;var s=e("./Modules"),l=e("./FormatInput"),u={},c=[],f=e("./UserInterface")();e("fs");return{name:"ImageSequencer",options:t,inputlog:c,modules:s,images:u,events:f,loadImages:o,loadImage:o,addSteps:function(){var t="ImageSequencer"==this.name?this:this.sequencer,n="ImageSequencer"==this.name?[]:[this.images],r={};for(var a in arguments)n.push(i(arguments[a]));r=l.call(t,n,"+"),c.push({method:"addSteps",json_q:i(r)});for(var o in r)for(var s in r[o])e("./AddStep")(t,o,r[o][s].name,r[o][s].o);return this},removeSteps:function(e,t){var n,r={},o="ImageSequencer"==this.name?this:this.sequencer,s="ImageSequencer"==this.name?[]:[this.images];for(var u in arguments)s.push(i(arguments[u]));var f=l.call(o,s,"-");c.push({method:"removeSteps",json_q:i(f)});for(var p in f){n=f[p].sort(function(e,t){return t-e}),r[p]=n[n.length-1];for(var h in n)a(p,n[h])}return this},insertSteps:function(t,n,r,a){var o={},s="ImageSequencer"==this.name?this:this.sequencer,u="ImageSequencer"==this.name?[]:[this.images];for(var f in arguments)u.push(arguments[f]);var p=l.call(s,u,"^");c.push({method:"insertSteps",json_q:i(p)});for(var h in p){var d=p[h];d=d.sort(function(e,t){return t.index-e.index});for(var g in d)e("./InsertStep")(s,h,d[g].index,d[g].name,d[g].o);o[h]=d[d.length-1].index}return this},replaceImage:function(t,n,r){return r=r||{},e("./ReplaceImage")(this,t,n)},run:function(t,r){var a="ImageSequencer"==this.name?this:this.sequencer,o="ImageSequencer"==this.name?[]:[this.images];for(var s in arguments)o.push(i(arguments[s]));var u=function(){};for(var s in o)"Function"==n(o[s])&&(u=o.splice(s,1)[0]);var c=l.call(a,o,"r");return e("./Run")(a,c,u),!0},setUI:function(t){this.events=e("./UserInterface")(t)},exportBin:function(t){return e("./ExportBin")(t,this)},modulesInfo:function(e){var t={};if("load-image"==e)return{};if(0==arguments.length)for(var n in s)t[n]=s[n][1];else t=s[e][1];return t},log:function(e,n){"none"!=t.ui&&(1==arguments.length?console.log(arguments[0]):2==arguments.length&&console.log(e,n))},objTypeOf:n,copy:i}},t.exports=ImageSequencer},{"./AddStep":120,"./ExportBin":121,"./FormatInput":122,"./InsertStep":124,"./LoadImage":125,"./Modules":126,"./ReplaceImage":127,"./Run":128,"./UserInterface":129,fs:6,jquery:51}],124:[function(e,t,n){t.exports=function(e,t,n,r,i){!function(t,n,r,i){var a=e.copy(i);a.number=e.options.sequencerCounter++,a.name=i.name||r,a.selector=i.selector||"ismod-"+r,a.container=i.container||e.options.selector,a.image=t,-1==n&&(n=e.images[t].steps.length),a.step={name:a.name,description:a.description,url:a.url,ID:a.number,imageName:a.image,inBrowser:e.options.inBrowser,ui:e.options.ui,options:a};var o=e.events,s=e.modules[r][0](a,o);e.images[t].steps.splice(n,0,s)}(t,n,r,i)}},{}],125:[function(e,t,n){t.exports=function(t,n,r,i){function a(e){return{src:e,format:e.split(":")[1].split(";")[0].split("/")[1]}}function o(n,r){var i;if(n.match(/^data:/i))r(i=n);else if(!t.options.inBrowser&&n.match(/^https?:\/\//i))e(n.match(/^(https?):\/\//i)[1]).get(n,function(e){var t="",n=e.headers["content-type"];e.setEncoding("base64"),e.on("data",function(e){t+=e}),e.on("end",function(){r("data:"+n+";base64,"+t)})});else if(t.options.inBrowser){var a=n.split(".").pop(),o=document.createElement("img"),s=document.createElement("canvas"),l=s.getContext("2d");o.onload=function(){s.width=o.naturalWidth,s.height=o.naturalHeight,l.drawImage(o,0,0),i=s.toDataURL(a),r(i)},o.src=n}else i=e("urify")(n),r(i)}return function(e,n){var r={name:"load-image",description:"This initial step loads and displays the original image without any modifications.",ID:t.options.sequencerCounter++,imageName:e,inBrowser:t.options.inBrowser,ui:t.options.ui},s={src:n,steps:[{options:{id:r.ID,name:"load-image",description:"This initial step loads and displays the original image without any modifications.",title:"Load Image",step:r},UI:t.events,draw:function(){return UI.onDraw(options.step),1==arguments.length?(this.output=o(arguments[0]),options.step.output=this.output,UI.onComplete(options.step),!0):2==arguments.length&&(this.output=o(arguments[0]),options.step.output=this.output,arguments[1](),UI.onComplete(options.step),!0)}}]};o(n,function(n){var r=a(n);t.images[e]=s;var o=t.images[e].steps[0];return o.output=r,o.options.step.output=o.output.src,o.UI.onSetup(o.options.step),o.UI.onDraw(o.options.step),o.UI.onComplete(o.options.step),i(),!0})}(n,r)}},{urify:115}],126:[function(e,t,n){t.exports={"green-channel":[e("./modules/GreenChannel/Module"),e("./modules/GreenChannel/info")],"ndvi-red":[e("./modules/NdviRed/Module"),e("./modules/NdviRed/info")],invert:[e("./modules/Invert/Module"),e("./modules/Invert/info")],crop:[e("./modules/Crop/Module"),e("./modules/Crop/info")],"segmented-colormap":[e("./modules/SegmentedColormap/Module"),e("./modules/SegmentedColormap/info")],"decode-qr":[e("./modules/DecodeQr/Module"),e("./modules/DecodeQr/info")],"fisheye-gl":[e("./modules/FisheyeGl/Module"),e("./modules/FisheyeGl/info")],dynamic:[e("./modules/Dynamic/Module"),e("./modules/Dynamic/info")]}},{"./modules/Crop/Module":131,"./modules/Crop/info":132,"./modules/DecodeQr/Module":133,"./modules/DecodeQr/info":134,"./modules/Dynamic/Module":135,"./modules/Dynamic/info":136,"./modules/FisheyeGl/Module":137,"./modules/FisheyeGl/info":138,"./modules/GreenChannel/Module":139,"./modules/GreenChannel/info":140,"./modules/Invert/Module":141,"./modules/Invert/info":142,"./modules/NdviRed/Module":143,"./modules/NdviRed/info":144,"./modules/SegmentedColormap/Module":145,"./modules/SegmentedColormap/info":147}],127:[function(e,t,n){t.exports=function(e,t,n,r){if(!e.options.inBrowser)return!1;for(var i=e,a=document.querySelectorAll(t),o=[],s=0;s<a.length;s++)a[s]instanceof HTMLImageElement&&o.push(a[s]);for(var s in o){var l=o[s],u=o[s].src,c=u.split(".").pop(),f=new XMLHttpRequest;f.open("GET",u,!0),f.responseType="arraybuffer",f.onload=function(e){var t=new Uint8Array(this.response),n=String.fromCharCode.apply(null,t),r=btoa(n);p("data:image/"+c+";base64,"+r)},"data:image/"!=u.substr(0,11).toLowerCase()?f.send():p(u);function p(e){i.loadImage("default",e).addSteps("default",n).run(function(e){l.src=e})}}}},{}],128:[function(e,t,n){t.exports=function(e,t,n){function r(t,i){if(i==t.length&&void 0!==t[i-1]&&(s=t[i-1].image,"Function"==e.objTypeOf(n))){var a=e.images[s].steps,o=a[a.length-1].output.src;return n(o),!0}if(void 0!==t[i]){var s=t[i].image,l=t[i].i,u=e.images[s].steps[l-1].output;e.images[s].steps[l].draw(e.copy(u),function(){r(t,++i)})}}return function(t){var n=[];for(var i in t)for(var a=e.images[i].steps.length,o=t[i],s=0;s<a-o;s++)n.push({image:i,i:o+s});r(n,0)}(t=function(t){for(var n in t)0==t[n]&&1==e.images[n].steps.length?delete t[n]:0==t[n]&&t[n]++;for(var n in t)for(var r=e.images[n].steps[t[n]-1];void 0===r||void 0===r.output;)r=e.images[n].steps[--t[n]-1];return t}(t))}},{}],129:[function(e,t,n){t.exports=function(e={}){return e.onSetup=e.onSetup||function(e){0==e.ui||(e.inBrowser?console.log('Added Step "'+e.name+'" to "'+e.imageName+'".'):console.log("[36m%s[0m",'Added Step "'+e.name+'" to "'+e.imageName+'".'))},e.onDraw=e.onDraw||function(e){0==e.ui||(e.inBrowser?console.log('Drawing Step "'+e.name+'" on "'+e.imageName+'".'):console.log("[33m%s[0m",'Drawing Step "'+e.name+'" on "'+e.imageName+'".'))},e.onComplete=e.onComplete||function(e){0==e.ui||(e.inBrowser?console.log('Drawn Step "'+e.name+'" on "'+e.imageName+'".'):console.log("[32m%s[0m",'Drawn Step "'+e.name+'" on "'+e.imageName+'".'))},e.onRemove=e.onRemove||function(e){0==e.ui||(e.inBrowser?console.log('Removing Step "'+e.name+'" of "'+e.imageName+'".'):console.log("[31m%s[0m",'Removing Step "'+e.name+'" of "'+e.imageName+'".'))},e}},{}],130:[function(e,t,n){(function(n){t.exports=function(t,r,i){var a=e("get-pixels"),o=e("save-pixels");r.x=parseInt(r.x)||0,r.y=parseInt(r.y)||0,a(t.src,function(e,a){r.w=parseInt(r.w)||Math.floor(.5*a.shape[0]),r.h=parseInt(r.h)||Math.floor(.5*a.shape[1]);for(var s=r.x,l=r.y,u=r.w,c=r.h,f=a.shape[0],p=new Uint8Array(4*u*c),h=l;h<l+c;h++)p.set(a.data.slice(4*h*f+s,4*h*f+s+4*u),4*u*(h-l));a.data=p,a.shape=[u,c,4],a.stride[1]=4*u,r.format=t.format;var d=[],g=0,m=o(a,r.format);m.on("data",function(e){g+=e.length,d.push(e)}),m.on("end",function(){var e=n.concat(d,g).toString("base64"),t="data:image/"+r.format+";base64,"+e;i(t,r.format)})})}}).call(this,e("buffer").Buffer)},{buffer:7,"get-pixels":33,"save-pixels":110}],131:[function(e,t,n){t.exports=function(t,n){(t=t||{}).title="Crop Image",n.onSetup(t.step);return{options:t,draw:function(r,i){n.onDraw(t.step);var a=this;e("./Crop")(r,t,function(e,r){a.output={src:e,format:r},t.step.output=e,n.onComplete(t.step),i()})},output:void 0,UI:n}}},{"./Crop":130}],132:[function(e,t,n){t.exports={name:"Crop",description:"Crop image to given x, y, w, h",url:"https://github.com/publiclab/image-sequencer/tree/master/MODULES.md",inputs:{x:{type:"integer",desc:"X-position (measured from left) from where cropping starts",default:0},y:{type:"integer",desc:"Y-position (measured from top) from where cropping starts",default:0},w:{type:"integer",desc:"Width of crop",default:"(50%)"},h:{type:"integer",desc:"Height of crop",default:"(50%)"}}}},{}],133:[function(e,t,n){t.exports=function(t,n){(t=t||{}).title="Decode QR Code",n.onSetup(t.step);var r=e("jsqr"),i=e("get-pixels");return{options:t,draw:function(e,a){n.onDraw(t.step);var o=this;i(e.src,function(i,s){if(i)throw i;var l=s.shape[0],u=s.shape[1],c=r.decodeQRFromImage(s.data,l,u);o.output=e,o.output.data=c,a(),t.step.output=e.src,t.step.qrval=c,n.onComplete(t.step)})},output:void 0,UI:n}}},{"get-pixels":33,jsqr:52}],134:[function(e,t,n){t.exports={name:"Decode QR",inputs:{},outputs:{qrval:{type:"text"}}}},{}],135:[function(require,module,exports){module.exports=function Dynamic(options,UI){function draw(input,callback){function generator(expression){var func="f = function (r, g, b, a) { var R = r, G = g, B = b, A = a;";func+="return ",func=func+expression+"}";var f;return eval(func),f}function changePixel(e,t,n,r){return[options.red_function(e,t,n,r),options.green_function(e,t,n,r),options.blue_function(e,t,n,r),options.alpha_function(e,t,n,r)]}function output(e,t,n){step.output={src:t,format:n},options.step.output=t,UI.onComplete(options.step)}UI.onDraw(options.step);var step=this;options.monochrome=options.monochrome||"(R+G+B)/3";var channels=["red","green","blue","alpha"];return channels.forEach(function(e){options.hasOwnProperty(e)?options[e+"_function"]=generator(options[e]):"alpha"===e?options.alpha_function=function(){return 255}:options[e+"_function"]=generator(options.monochrome)}),require("../_nomodule/PixelManipulation.js")(input,{output:output,changePixel:changePixel,format:input.format,image:options.image,callback:callback})}options=options||{},options.title="Dynamic",UI.onSetup(options.step);var output;return{options:options,draw:draw,output:output,UI:UI}}},{"../_nomodule/PixelManipulation.js":148}],136:[function(e,t,n){t.exports={name:"Dynamic",inputs:{red:{type:"input",desc:"Expression to return for red channel with R, G, B, and A inputs",default:"r"},green:{type:"input",desc:"Expression to return for green channel with R, G, B, and A inputs",default:"g"},blue:{type:"input",desc:"Expression to return for blue channel with R, G, B, and A inputs",default:"b"},"monochrome (fallback)":{type:"input",desc:"Expression to return with R, G, B, and A inputs; fallback for other channels if none provided",default:"r + g + b"}}}},{}],137:[function(e,t,n){t.exports=function(t,n){(t=t||{}).title="Fisheye GL";return n.onSetup(t.step),e("fisheyegl"),{options:t,draw:function(e,r){n.onDraw(t.step);var i=this;if(t.inBrowser){if(document.querySelector("#image-sequencer-canvas"))var a=document.querySelector("#image-sequencer-canvas");else(a=document.createElement("canvas")).style.display="none",a.setAttribute("id","image-sequencer-canvas"),document.body.append(a);distorter=FisheyeGl({selector:"#image-sequencer-canvas"}),t.a=parseFloat(t.a)||distorter.lens.a,t.b=parseFloat(t.b)||distorter.lens.b,t.Fx=parseFloat(t.Fx)||distorter.lens.Fx,t.Fy=parseFloat(t.Fy)||distorter.lens.Fy,t.scale=parseFloat(t.scale)||distorter.lens.scale,t.x=parseFloat(t.x)||distorter.fov.x,t.y=parseFloat(t.y)||distorter.fov.y,distorter.lens.a=t.a,distorter.lens.b=t.b,distorter.lens.Fx=t.Fx,distorter.lens.Fy=t.Fy,distorter.lens.scale=t.scale,distorter.fov.x=t.x,distorter.fov.y=t.y,distorter.setImage(e.src,function(){i.output={src:a.toDataURL(),format:e.format},t.step.output=i.output.src,r(),n.onComplete(t.step)})}else this.output=e,r()},output:void 0,UI:n}}},{fisheyegl:25}],138:[function(e,t,n){t.exports={name:"Fisheye GL",inputs:{a:{type:"float",desc:"a parameter",default:1,min:1,max:4},b:{type:"float",desc:"b parameter",default:1,min:1,max:4},Fx:{type:"float",desc:"Fx parameter",default:0,min:0,max:4},Fy:{type:"float",desc:"Fy parameter",default:0,min:0,max:4},scale:{type:"float",desc:"Image Scaling",default:1.5,min:0,max:20},x:{type:"float",desc:"FOV x parameter",default:1.5,min:0,max:20},y:{type:"float",desc:"FOV y parameter",default:1.5,min:0,max:20},fragmentSrc:{type:"PATH",desc:"Patht to a WebGL fragment shader file",default:"(inbuilt)"},vertexSrc:{type:"PATH",desc:"Patht to a WebGL vertex shader file",default:"(inbuilt)"}}}},{}],139:[function(e,t,n){t.exports=function(t,n){(t=t||{}).title="Green channel only",t.description="Displays only the green channel of an image",n.onSetup(t.step);return{options:t,draw:function(r,i){n.onDraw(t.step);var a=this;return e("../_nomodule/PixelManipulation.js")(r,{output:function(e,r,i){a.output={src:r,format:i},t.step.output=r,n.onComplete(t.step)},changePixel:function(e,t,n,r){return[0,t,0,r]},format:r.format,image:t.image,callback:i})},output:void 0,UI:n}}},{"../_nomodule/PixelManipulation.js":148}],140:[function(e,t,n){t.exports={name:"Green Channel",inputs:{}}},{}],141:[function(e,t,n){t.exports=function(t,n){(t=t||{}).title="Invert Colors",t.description="Inverts the colors of the image",n.onSetup(t.step);return{options:t,draw:function(r,i){n.onDraw(t.step);var a=this;return e("../_nomodule/PixelManipulation.js")(r,{output:function(e,r,i){a.output={src:r,format:i},t.step.output=r,n.onComplete(t.step)},changePixel:function(e,t,n,r){return[255-e,255-t,255-n,r]},format:r.format,image:t.image,callback:i})},output:void 0,UI:n}}},{"../_nomodule/PixelManipulation.js":148}],142:[function(e,t,n){t.exports={name:"Invert",description:"Inverts the image.",inputs:{}}},{}],143:[function(e,t,n){t.exports=function(t,n){(t=t||{}).title="NDVI for red-filtered cameras (blue is infrared)",n.onSetup(t.step);return{options:t,draw:function(r,i){n.onDraw(t.step);var a=this;return e("../_nomodule/PixelManipulation.js")(r,{output:function(e,r,i){a.output={src:r,format:i},t.step.output=r,n.onComplete(t.step)},changePixel:function(e,t,n,r){var i=255*((n-e)/(1*n+e)+1)/2;return[i,i,i,r]},format:r.format,image:t.image,callback:i})},output:void 0,UI:n}}},{"../_nomodule/PixelManipulation.js":148}],144:[function(e,t,n){t.exports={name:"NDVI Red",inputs:{}}},{}],145:[function(e,t,n){t.exports=function(t,n){(t=t||{}).title="Segmented Colormap",n.onSetup(t.step);return{options:t,draw:function(r,i){n.onDraw(t.step);var a=this;return e("../_nomodule/PixelManipulation.js")(r,{output:function(e,r,i){a.output={src:r,format:i},t.step.output=r,n.onComplete(t.step)},changePixel:function(n,r,i,a){var o=(n+r+i)/3,s=e("./SegmentedColormap")(o,t);return[s[0],s[1],s[2],255]},format:r.format,image:t.image,callback:i})},output:void 0,UI:n}}},{"../_nomodule/PixelManipulation.js":148,"./SegmentedColormap":146}],146:[function(e,t,n){function r(e){return function(t){var n,r,i,a,o,s,l,u,c,f,p,h,d,g;if(p=[0,0],s=p[0],l=p[1],h=[e[0][0],1],i=h[0],a=h[1],t<i)return s;for(n=u=0,f=e.length;u<f;n=++u){if(d=e[n],o=d[0],s=d[1],l=d[2],i=o,n===e.length-1){a=1;break}if(a=e[n+1][0],o<=t&&t<a)break}for(r=[],n=c=0,g=s.length;0<=g?c<g:c>g;n=0<=g?++c:--c)r[n]=(t-i)/(a-i)*(l[n]-s[n])+s[n];return r}}t.exports=function(e,t){return t.colormap=t.colormap||i.default,"object"==typeof t.colormap?colormapFunction=r(t.colormap):i.hasOwnProperty(t.colormap)?colormapFunction=i[t.colormap]:colormapFunction=i.default,colormapFunction(e/255)};var i={greyscale:r([[0,[0,0,0],[255,255,255]],[1,[255,255,255],[255,255,255]]]),default:r([[0,[0,0,255],[0,255,0]],[.25,[0,255,0],[255,255,0]],[.5,[0,255,255],[255,255,0]],[.75,[255,255,0],[255,0,0]]]),ndvi:r([[0,[0,0,255],[38,195,195]],[.5,[0,150,0],[255,255,0]],[.75,[255,255,0],[255,50,50]]]),stretched:r([[0,[0,0,255],[0,0,255]],[.1,[0,0,255],[38,195,195]],[.5,[0,150,0],[255,255,0]],[.7,[255,255,0],[255,50,50]],[.9,[255,50,50],[255,50,50]]]),fastie:r([[0,[255,255,255],[0,0,0]],[.167,[0,0,0],[255,255,255]],[.33,[255,255,255],[0,0,0]],[.5,[0,0,0],[140,140,255]],[.55,[140,140,255],[0,255,0]],[.63,[0,255,0],[255,255,0]],[.75,[255,255,0],[255,0,0]],[.95,[255,0,0],[255,0,255]]])}},{}],147:[function(e,t,n){t.exports={name:"Segmented Colormap",inputs:{colormap:{type:"select",desc:"Name of the Colormap",default:"default",values:["default","greyscale","stretched","fastie"]}}}},{}],148:[function(e,t,n){(function(n){t.exports=function(t,r){(r=r||{}).changePixel=r.changePixel||function(e,t,n,r){return[e,t,n,r]};var i=e("get-pixels"),a=e("save-pixels");i(t.src,function(e,t){if(e)console.log("Bad image path");else{for(var i=0;i<t.shape[0];i++)for(var o=0;o<t.shape[1];o++){var s=r.changePixel(t.get(i,o,0),t.get(i,o,1),t.get(i,o,2),t.get(i,o,3));t.set(i,o,0,s[0]),t.set(i,o,1,s[1]),t.set(i,o,2,s[2]),t.set(i,o,3,s[3])}var l=[],u=0,c=a(t,r.format,{quality:100});c.on("data",function(e){u+=e.length,l.push(e)}),c.on("end",function(){var e=n.concat(l,u).toString("base64"),t="data:image/"+r.format+";base64,"+e;r.output&&r.output(r.image,t,r.format),r.callback&&r.callback()})}})}}).call(this,e("buffer").Buffer)},{buffer:7,"get-pixels":33,"save-pixels":110}]},{},[123]); |