From e8ab480687f0c9d0a0e1540d550d68e1545c0b68 Mon Sep 17 00:00:00 2001 From: Varun Gupta Date: Fri, 23 Feb 2018 03:13:14 +0530 Subject: [PATCH] Added native gaussian Blurring module(no dependencies) (#186) * Added Blur Module * Issue 177 fixing Blur module * blur module fixed info json * fixing blur module * Delete .DS_Store * add a native blurring solution Signed-off-by: tech4GT * fixed package.json Signed-off-by: tech4GT * delete .ds_store and update gitignore Signed-off-by: tech4GT --- .gitignore | 2 + dist/image-sequencer.js | 1089 +++++++++++++++++++++-------------- dist/image-sequencer.min.js | 2 +- examples/index.html | 1 + package.json | 2 +- src/Modules.js | 3 + src/modules/Blur/Blur.js | 85 +++ src/modules/Blur/Module.js | 58 ++ src/modules/Blur/info.json | 11 + 9 files changed, 805 insertions(+), 448 deletions(-) create mode 100644 src/modules/Blur/Blur.js create mode 100644 src/modules/Blur/Module.js create mode 100644 src/modules/Blur/info.json diff --git a/.gitignore b/.gitignore index d199d323..d7f18f2a 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,8 @@ node_modules/* # Optional REPL history .node_repl_history +.DS_Store + *.swp todo.txt test.js diff --git a/dist/image-sequencer.js b/dist/image-sequencer.js index ef6d70d9..ae243375 100755 --- a/dist/image-sequencer.js +++ b/dist/image-sequencer.js @@ -1,4 +1,4 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= this.charLength - this.charReceived) ? + this.charLength - this.charReceived : + buffer.length; + + // add the new bytes to the char buffer + buffer.copy(this.charBuffer, this.charReceived, 0, available); + this.charReceived += available; + + if (this.charReceived < this.charLength) { + // still not enough chars in this buffer? wait for more ... + return ''; + } + + // remove bytes belonging to the current character from the buffer + buffer = buffer.slice(available, buffer.length); + + // get the character that was split + charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); + + // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character + var charCode = charStr.charCodeAt(charStr.length - 1); + if (charCode >= 0xD800 && charCode <= 0xDBFF) { + this.charLength += this.surrogateSize; + charStr = ''; + continue; + } + this.charReceived = this.charLength = 0; + + // if there are no more bytes in this buffer, just emit our char + if (buffer.length === 0) { + return charStr; + } + break; + } + + // determine and set charLength / charReceived + this.detectIncompleteChar(buffer); + + var end = buffer.length; + if (this.charLength) { + // buffer the incomplete character bytes we got + buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); + end -= this.charReceived; + } + + charStr += buffer.toString(this.encoding, 0, end); + + var end = charStr.length - 1; + var charCode = charStr.charCodeAt(end); + // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character + if (charCode >= 0xD800 && charCode <= 0xDBFF) { + var size = this.surrogateSize; + this.charLength += size; + this.charReceived += size; + this.charBuffer.copy(this.charBuffer, size, 0, size); + buffer.copy(this.charBuffer, 0, 0, size); + return charStr.substring(0, end); + } + + // or just emit the charStr + return charStr; +}; + +// detectIncompleteChar determines if there is an incomplete UTF-8 character at +// the end of the given buffer. If so, it sets this.charLength to the byte +// length that character, and sets this.charReceived to the number of bytes +// that are available for this character. +StringDecoder.prototype.detectIncompleteChar = function(buffer) { + // determine how many bytes we have to check at the end of this buffer + var i = (buffer.length >= 3) ? 3 : buffer.length; + + // Figure out if one of the last i bytes of our buffer announces an + // incomplete char. + for (; i > 0; i--) { + var c = buffer[buffer.length - i]; + + // See http://en.wikipedia.org/wiki/UTF-8#Description + + // 110XXXXX + if (i == 1 && c >> 5 == 0x06) { + this.charLength = 2; + break; + } + + // 1110XXXX + if (i <= 2 && c >> 4 == 0x0E) { + this.charLength = 3; + break; + } + + // 11110XXX + if (i <= 3 && c >> 3 == 0x1E) { + this.charLength = 4; + break; + } + } + this.charReceived = i; +}; + +StringDecoder.prototype.end = function(buffer) { + var res = ''; + if (buffer && buffer.length) + res = this.write(buffer); + + if (this.charReceived) { + var cr = this.charReceived; + var buf = this.charBuffer; + var enc = this.encoding; + res += buf.slice(0, cr).toString(enc); + } + + return res; +}; + +function passThroughWrite(buffer) { + return buffer.toString(this.encoding); +} + +function utf16DetectIncompleteChar(buffer) { + this.charReceived = buffer.length % 2; + this.charLength = this.charReceived ? 2 : 0; +} + +function base64DetectIncompleteChar(buffer) { + this.charReceived = buffer.length % 3; + this.charLength = this.charReceived ? 3 : 0; +} + +},{"buffer":4}],37:[function(require,module,exports){ (function (global){ 'use strict'; @@ -7615,7 +7845,7 @@ var objectKeys = Object.keys || function (obj) { }; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"util/":130}],36:[function(require,module,exports){ +},{"util/":132}],38:[function(require,module,exports){ (function (process,Buffer){ 'use strict'; /* eslint camelcase: "off" */ @@ -8027,7 +8257,7 @@ Zlib.prototype._reset = function () { exports.Zlib = Zlib; }).call(this,require('_process'),require("buffer").Buffer) -},{"_process":93,"assert":35,"buffer":4,"pako/lib/zlib/constants":41,"pako/lib/zlib/deflate.js":43,"pako/lib/zlib/inflate.js":45,"pako/lib/zlib/zstream":49}],37:[function(require,module,exports){ +},{"_process":95,"assert":37,"buffer":4,"pako/lib/zlib/constants":43,"pako/lib/zlib/deflate.js":45,"pako/lib/zlib/inflate.js":47,"pako/lib/zlib/zstream":51}],39:[function(require,module,exports){ (function (process){ 'use strict'; @@ -8639,9 +8869,9 @@ util.inherits(DeflateRaw, Zlib); util.inherits(InflateRaw, Zlib); util.inherits(Unzip, Zlib); }).call(this,require('_process')) -},{"./binding":36,"_process":93,"assert":35,"buffer":4,"stream":105,"util":130}],38:[function(require,module,exports){ +},{"./binding":38,"_process":95,"assert":37,"buffer":4,"stream":109,"util":132}],40:[function(require,module,exports){ arguments[4][3][0].apply(exports,arguments) -},{"dup":3}],39:[function(require,module,exports){ +},{"dup":3}],41:[function(require,module,exports){ 'use strict'; @@ -8748,7 +8978,7 @@ exports.setTyped = function (on) { exports.setTyped(TYPED_OK); -},{}],40:[function(require,module,exports){ +},{}],42:[function(require,module,exports){ 'use strict'; // Note: adler32 takes 12% for level 0 and 2% for level 6. @@ -8801,7 +9031,7 @@ function adler32(adler, buf, len, pos) { module.exports = adler32; -},{}],41:[function(require,module,exports){ +},{}],43:[function(require,module,exports){ 'use strict'; // (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -8871,7 +9101,7 @@ module.exports = { //Z_NULL: null // Use -1 or null inline, depending on var type }; -},{}],42:[function(require,module,exports){ +},{}],44:[function(require,module,exports){ 'use strict'; // Note: we can't get significant speed boost here. @@ -8932,7 +9162,7 @@ function crc32(crc, buf, len, pos) { module.exports = crc32; -},{}],43:[function(require,module,exports){ +},{}],45:[function(require,module,exports){ 'use strict'; // (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -10808,7 +11038,7 @@ exports.deflatePrime = deflatePrime; exports.deflateTune = deflateTune; */ -},{"../utils/common":39,"./adler32":40,"./crc32":42,"./messages":47,"./trees":48}],44:[function(require,module,exports){ +},{"../utils/common":41,"./adler32":42,"./crc32":44,"./messages":49,"./trees":50}],46:[function(require,module,exports){ 'use strict'; // (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -11155,7 +11385,7 @@ module.exports = function inflate_fast(strm, start) { return; }; -},{}],45:[function(require,module,exports){ +},{}],47:[function(require,module,exports){ 'use strict'; // (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -12713,7 +12943,7 @@ exports.inflateSyncPoint = inflateSyncPoint; exports.inflateUndermine = inflateUndermine; */ -},{"../utils/common":39,"./adler32":40,"./crc32":42,"./inffast":44,"./inftrees":46}],46:[function(require,module,exports){ +},{"../utils/common":41,"./adler32":42,"./crc32":44,"./inffast":46,"./inftrees":48}],48:[function(require,module,exports){ 'use strict'; // (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -13058,7 +13288,7 @@ module.exports = function inflate_table(type, lens, lens_index, codes, table, ta return 0; }; -},{"../utils/common":39}],47:[function(require,module,exports){ +},{"../utils/common":41}],49:[function(require,module,exports){ 'use strict'; // (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -13092,7 +13322,7 @@ module.exports = { '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ }; -},{}],48:[function(require,module,exports){ +},{}],50:[function(require,module,exports){ 'use strict'; // (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -14314,7 +14544,7 @@ exports._tr_flush_block = _tr_flush_block; exports._tr_tally = _tr_tally; exports._tr_align = _tr_align; -},{"../utils/common":39}],49:[function(require,module,exports){ +},{"../utils/common":41}],51:[function(require,module,exports){ 'use strict'; // (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -14363,7 +14593,7 @@ function ZStream() { module.exports = ZStream; -},{}],50:[function(require,module,exports){ +},{}],52:[function(require,module,exports){ exports.read = function (buffer, offset, isLE, mLen, nBytes) { var e, m var eLen = nBytes * 8 - mLen - 1 @@ -14449,7 +14679,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { buffer[offset + i - d] |= s * 128 } -},{}],51:[function(require,module,exports){ +},{}],53:[function(require,module,exports){ if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { @@ -14474,7 +14704,7 @@ if (typeof Object.create === 'function') { } } -},{}],52:[function(require,module,exports){ +},{}],54:[function(require,module,exports){ "use strict" function iota(n) { @@ -14486,7 +14716,7 @@ function iota(n) { } module.exports = iota -},{}],53:[function(require,module,exports){ +},{}],55:[function(require,module,exports){ /*! * Determine if an object is a Buffer * @@ -14509,12 +14739,14 @@ function isSlowBuffer (obj) { return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) } -},{}],54:[function(require,module,exports){ +},{}],56:[function(require,module,exports){ +var toString = {}.toString; + module.exports = Array.isArray || function (arr) { - return Object.prototype.toString.call(arr) == '[object Array]'; + return toString.call(arr) == '[object Array]'; }; -},{}],55:[function(require,module,exports){ +},{}],57:[function(require,module,exports){ /*! * jQuery JavaScript Library v2.2.4 * http://jquery.com/ @@ -24330,7 +24562,7 @@ if ( !noGlobal ) { return jQuery; })); -},{}],56:[function(require,module,exports){ +},{}],58:[function(require,module,exports){ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); @@ -27056,7 +27288,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ ]) }); ; -},{}],57:[function(require,module,exports){ +},{}],59:[function(require,module,exports){ (function (global){ /** * @license @@ -44157,7 +44389,7 @@ return /******/ (function(modules) { // webpackBootstrap }.call(this)); }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],58:[function(require,module,exports){ +},{}],60:[function(require,module,exports){ (function (process){ var path = require('path'); var fs = require('fs'); @@ -44269,9 +44501,9 @@ mime.charsets = { module.exports = mime; }).call(this,require('_process')) -},{"./types.json":59,"_process":93,"fs":38,"path":70}],59:[function(require,module,exports){ +},{"./types.json":61,"_process":95,"fs":40,"path":72}],61:[function(require,module,exports){ module.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/bdoc":["bdoc"],"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":["mpd"],"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":[],"application/font-woff2":[],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"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","exe","dll","deb","dmg","iso","img","msi","msp","msm","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/raml+yaml":["raml"],"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.apple.pkpass":["pkpass"],"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-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"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.hydrostatix.sof-data":["sfd-hdstx"],"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-outlook":["msg"],"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.n-gage.symbian.install":["n-gage"],"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.wadl+xml":["wadl"],"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/wasm":["wasm"],"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":[],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":[],"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-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["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-pcf":["pcf"],"application/x-font-snf":["snf"],"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-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":[],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"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-msdos-program":[],"application/x-msdownload":["com","bat"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","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-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":[],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"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","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"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","rng"],"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/3gpp":[],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp3":[],"audio/mp4":["m4a","mp4a"],"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/wav":["wav"],"audio/wave":[],"audio/webm":["weba"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":[],"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-realaudio":[],"audio/x-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/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"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":[],"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-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":[],"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/gltf+json":["gltf"],"model/gltf-binary":["glb"],"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","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/hjson":["hjson"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/prs.lines.tag":["dsc"],"text/richtext":["rtx"],"text/rtf":[],"text/sgml":["sgml","sgm"],"text/slim":["slim","slm"],"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":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":[],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"text/xml":[],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/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"]} -},{}],60:[function(require,module,exports){ +},{}],62:[function(require,module,exports){ 'use strict' var ops = require('ndarray-ops') @@ -44354,7 +44586,7 @@ function ndfft(dir, x, y) { } module.exports = ndfft -},{"./lib/fft-matrix.js":61,"ndarray":66,"ndarray-ops":63,"typedarray-pool":124}],61:[function(require,module,exports){ +},{"./lib/fft-matrix.js":63,"ndarray":68,"ndarray-ops":65,"typedarray-pool":126}],63:[function(require,module,exports){ var bits = require('bit-twiddle') function fft(dir, nrows, ncols, buffer, x_ptr, y_ptr, scratch_ptr) { @@ -44573,7 +44805,7 @@ function fftBluestein(dir, nrows, ncols, buffer, x_ptr, y_ptr, scratch_ptr) { } } -},{"bit-twiddle":2}],62:[function(require,module,exports){ +},{"bit-twiddle":2}],64:[function(require,module,exports){ "use strict" module.exports = gaussBlur @@ -44619,7 +44851,7 @@ function gaussBlur(arr, sigma, wrap) { pool.freeDouble(im) return arr } -},{"cwise/lib/wrapper":12,"dup":14,"ndarray":66,"ndarray-fft":60,"ndarray-ops":63,"next-pow-2":67,"typedarray-pool":124}],63:[function(require,module,exports){ +},{"cwise/lib/wrapper":12,"dup":14,"ndarray":68,"ndarray-fft":62,"ndarray-ops":65,"next-pow-2":69,"typedarray-pool":126}],65:[function(require,module,exports){ "use strict" var compile = require("cwise-compiler") @@ -45082,7 +45314,7 @@ exports.equals = compile({ -},{"cwise-compiler":9}],64:[function(require,module,exports){ +},{"cwise-compiler":9}],66:[function(require,module,exports){ "use strict" var ndarray = require("ndarray") @@ -45105,10 +45337,10 @@ module.exports = function convert(arr, result) { return result } -},{"./doConvert.js":65,"ndarray":66}],65:[function(require,module,exports){ +},{"./doConvert.js":67,"ndarray":68}],67:[function(require,module,exports){ module.exports=require('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":true,"rvalue":false,"count":1},{"name":"_inline_1_arg1_","lvalue":false,"rvalue":true,"count":1},{"name":"_inline_1_arg2_","lvalue":false,"rvalue":true,"count":4}],"thisVars":[],"localVars":["_inline_1_i","_inline_1_v"]},"post":{"body":"{}","args":[],"thisVars":[],"localVars":[]},"funcName":"convert","blockSize":64}) -},{"cwise-compiler":9}],66:[function(require,module,exports){ +},{"cwise-compiler":9}],68:[function(require,module,exports){ var iota = require("iota-array") var isBuffer = require("is-buffer") @@ -45453,7 +45685,7 @@ function wrappedNDArrayCtor(data, shape, stride, offset) { module.exports = wrappedNDArrayCtor -},{"iota-array":52,"is-buffer":53}],67:[function(require,module,exports){ +},{"iota-array":54,"is-buffer":55}],69:[function(require,module,exports){ module.exports = function(v) { v += v === 0 --v @@ -45465,7 +45697,7 @@ module.exports = function(v) { return v + 1 } -},{}],68:[function(require,module,exports){ +},{}],70:[function(require,module,exports){ // (c) Dean McNamee , 2013. // // https://github.com/deanm/omggif @@ -46274,7 +46506,7 @@ function GifReaderLZWOutputIndexStream(code_stream, p, output, output_length) { // CommonJS. try { exports.GifWriter = GifWriter; exports.GifReader = GifReader } catch(e) {} -},{}],69:[function(require,module,exports){ +},{}],71:[function(require,module,exports){ (function (process){ /** * Pace @@ -46548,7 +46780,7 @@ function formatNumber(number, decimals, dec_point, thousands_sep) { } }).call(this,require('_process')) -},{"_process":93,"charm":5}],70:[function(require,module,exports){ +},{"_process":95,"charm":5}],72:[function(require,module,exports){ (function (process){ // Copyright Joyent, Inc. and other Node contributors. // @@ -46776,7 +47008,7 @@ var substr = 'ab'.substr(-1) === 'b' ; }).call(this,require('_process')) -},{"_process":93}],71:[function(require,module,exports){ +},{"_process":95}],73:[function(require,module,exports){ (function (Buffer){ 'use strict'; @@ -46972,7 +47204,7 @@ exports.dataToBitMap = function(data, bitmapInfo) { }; }).call(this,require("buffer").Buffer) -},{"./interlace":81,"buffer":4}],72:[function(require,module,exports){ +},{"./interlace":83,"buffer":4}],74:[function(require,module,exports){ (function (Buffer){ 'use strict'; @@ -47040,7 +47272,7 @@ module.exports = function(data, width, height, options) { }; }).call(this,require("buffer").Buffer) -},{"./constants":74,"buffer":4}],73:[function(require,module,exports){ +},{"./constants":76,"buffer":4}],75:[function(require,module,exports){ (function (process,Buffer){ 'use strict'; @@ -47253,7 +47485,7 @@ ChunkStream.prototype._process = function() { }; }).call(this,require('_process'),require("buffer").Buffer) -},{"_process":93,"buffer":4,"stream":105,"util":130}],74:[function(require,module,exports){ +},{"_process":95,"buffer":4,"stream":109,"util":132}],76:[function(require,module,exports){ 'use strict'; @@ -47289,7 +47521,7 @@ module.exports = { GAMMA_DIVISION: 100000 }; -},{}],75:[function(require,module,exports){ +},{}],77:[function(require,module,exports){ 'use strict'; var crcTable = []; @@ -47335,7 +47567,7 @@ CrcCalculator.crc32 = function(buf) { return crc ^ -1; }; -},{}],76:[function(require,module,exports){ +},{}],78:[function(require,module,exports){ (function (Buffer){ 'use strict'; @@ -47522,7 +47754,7 @@ module.exports = function(pxData, width, height, options, bpp) { }; }).call(this,require("buffer").Buffer) -},{"./paeth-predictor":85,"buffer":4}],77:[function(require,module,exports){ +},{"./paeth-predictor":87,"buffer":4}],79:[function(require,module,exports){ (function (Buffer){ 'use strict'; @@ -47551,7 +47783,7 @@ var FilterAsync = module.exports = function(bitmapInfo) { util.inherits(FilterAsync, ChunkStream); }).call(this,require("buffer").Buffer) -},{"./chunkstream":73,"./filter-parse":79,"buffer":4,"util":130}],78:[function(require,module,exports){ +},{"./chunkstream":75,"./filter-parse":81,"buffer":4,"util":132}],80:[function(require,module,exports){ (function (Buffer){ 'use strict'; @@ -47578,7 +47810,7 @@ exports.process = function(inBuffer, bitmapInfo) { return Buffer.concat(outBuffers); }; }).call(this,require("buffer").Buffer) -},{"./filter-parse":79,"./sync-reader":91,"buffer":4}],79:[function(require,module,exports){ +},{"./filter-parse":81,"./sync-reader":93,"buffer":4}],81:[function(require,module,exports){ (function (Buffer){ 'use strict'; @@ -47753,7 +47985,7 @@ Filter.prototype._reverseFilterLine = function(rawData) { }; }).call(this,require("buffer").Buffer) -},{"./interlace":81,"./paeth-predictor":85,"buffer":4}],80:[function(require,module,exports){ +},{"./interlace":83,"./paeth-predictor":87,"buffer":4}],82:[function(require,module,exports){ (function (Buffer){ 'use strict'; @@ -47846,7 +48078,7 @@ module.exports = function(indata, imageData) { }; }).call(this,require("buffer").Buffer) -},{"buffer":4}],81:[function(require,module,exports){ +},{"buffer":4}],83:[function(require,module,exports){ 'use strict'; // Adam 7 @@ -47934,7 +48166,7 @@ exports.getInterlaceIterator = function(width) { return (outerX * 4) + (outerY * width * 4); }; }; -},{}],82:[function(require,module,exports){ +},{}],84:[function(require,module,exports){ (function (Buffer){ 'use strict'; @@ -47983,7 +48215,7 @@ PackerAsync.prototype.pack = function(data, width, height, gamma) { }; }).call(this,require("buffer").Buffer) -},{"./constants":74,"./packer":84,"buffer":4,"stream":105,"util":130}],83:[function(require,module,exports){ +},{"./constants":76,"./packer":86,"buffer":4,"stream":109,"util":132}],85:[function(require,module,exports){ (function (Buffer){ 'use strict'; @@ -48035,7 +48267,7 @@ module.exports = function(metaData, opt) { }; }).call(this,require("buffer").Buffer) -},{"./constants":74,"./packer":84,"buffer":4,"zlib":37}],84:[function(require,module,exports){ +},{"./constants":76,"./packer":86,"buffer":4,"zlib":39}],86:[function(require,module,exports){ (function (Buffer){ 'use strict'; @@ -48130,7 +48362,7 @@ Packer.prototype.packIEND = function() { return this._packChunk(constants.TYPE_IEND, null); }; }).call(this,require("buffer").Buffer) -},{"./bitpacker":72,"./constants":74,"./crc":75,"./filter-pack":76,"buffer":4,"zlib":37}],85:[function(require,module,exports){ +},{"./bitpacker":74,"./constants":76,"./crc":77,"./filter-pack":78,"buffer":4,"zlib":39}],87:[function(require,module,exports){ 'use strict'; module.exports = function paethPredictor(left, above, upLeft) { @@ -48148,7 +48380,7 @@ module.exports = function paethPredictor(left, above, upLeft) { } return upLeft; }; -},{}],86:[function(require,module,exports){ +},{}],88:[function(require,module,exports){ 'use strict'; var util = require('util'); @@ -48260,7 +48492,7 @@ ParserAsync.prototype._complete = function(filteredData) { this.emit('parsed', normalisedBitmapData); }; -},{"./bitmapper":71,"./chunkstream":73,"./filter-parse-async":77,"./format-normaliser":80,"./parser":88,"util":130,"zlib":37}],87:[function(require,module,exports){ +},{"./bitmapper":73,"./chunkstream":75,"./filter-parse-async":79,"./format-normaliser":82,"./parser":90,"util":132,"zlib":39}],89:[function(require,module,exports){ (function (Buffer){ 'use strict'; @@ -48355,7 +48587,7 @@ module.exports = function(buffer, options) { }; }).call(this,require("buffer").Buffer) -},{"./bitmapper":71,"./filter-parse-sync":78,"./format-normaliser":80,"./parser":88,"./sync-reader":91,"buffer":4,"zlib":37}],88:[function(require,module,exports){ +},{"./bitmapper":73,"./filter-parse-sync":80,"./format-normaliser":82,"./parser":90,"./sync-reader":93,"buffer":4,"zlib":39}],90:[function(require,module,exports){ (function (Buffer){ 'use strict'; @@ -48649,7 +48881,7 @@ Parser.prototype._parseIEND = function(data) { }; }).call(this,require("buffer").Buffer) -},{"./constants":74,"./crc":75,"buffer":4}],89:[function(require,module,exports){ +},{"./constants":76,"./crc":77,"buffer":4}],91:[function(require,module,exports){ 'use strict'; @@ -48667,7 +48899,7 @@ exports.write = function(png) { return pack(png); }; -},{"./packer-sync":83,"./parser-sync":87}],90:[function(require,module,exports){ +},{"./packer-sync":85,"./parser-sync":89}],92:[function(require,module,exports){ (function (process,Buffer){ 'use strict'; @@ -48834,7 +49066,7 @@ PNG.prototype.adjustGamma = function() { }; }).call(this,require('_process'),require("buffer").Buffer) -},{"./packer-async":82,"./parser-async":86,"./png-sync":89,"_process":93,"buffer":4,"stream":105,"util":130}],91:[function(require,module,exports){ +},{"./packer-async":84,"./parser-async":88,"./png-sync":91,"_process":95,"buffer":4,"stream":109,"util":132}],93:[function(require,module,exports){ 'use strict'; var SyncReader = module.exports = function(buffer) { @@ -48887,16 +49119,16 @@ SyncReader.prototype.process = function() { }; -},{}],92:[function(require,module,exports){ +},{}],94:[function(require,module,exports){ (function (process){ 'use strict'; if (!process.version || process.version.indexOf('v0.') === 0 || process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { - module.exports = nextTick; + module.exports = { nextTick: nextTick }; } else { - module.exports = process.nextTick; + module.exports = process } function nextTick(fn, arg1, arg2, arg3) { @@ -48933,8 +49165,9 @@ function nextTick(fn, arg1, arg2, arg3) { } } + }).call(this,require('_process')) -},{"_process":93}],93:[function(require,module,exports){ +},{"_process":95}],95:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -49120,11 +49353,11 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],94:[function(require,module,exports){ -arguments[4][29][0].apply(exports,arguments) -},{"./_stream_readable":96,"./_stream_writable":98,"_process":93,"core-util-is":8,"dup":29,"inherits":51}],95:[function(require,module,exports){ +},{}],96:[function(require,module,exports){ arguments[4][30][0].apply(exports,arguments) -},{"./_stream_transform":97,"core-util-is":8,"dup":30,"inherits":51}],96:[function(require,module,exports){ +},{"./_stream_readable":98,"./_stream_writable":100,"_process":95,"core-util-is":8,"dup":30,"inherits":53}],97:[function(require,module,exports){ +arguments[4][31][0].apply(exports,arguments) +},{"./_stream_transform":99,"core-util-is":8,"dup":31,"inherits":53}],98:[function(require,module,exports){ (function (process){ // Copyright Joyent, Inc. and other Node contributors. // @@ -50110,7 +50343,7 @@ function indexOf (xs, x) { } }).call(this,require('_process')) -},{"_process":93,"buffer":4,"core-util-is":8,"events":15,"inherits":51,"isarray":54,"stream":105,"string_decoder/":121}],97:[function(require,module,exports){ +},{"_process":95,"buffer":4,"core-util-is":8,"events":15,"inherits":53,"isarray":101,"stream":109,"string_decoder/":102}],99:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -50322,7 +50555,7 @@ function done(stream, er) { return stream.push(null); } -},{"./_stream_duplex":94,"core-util-is":8,"inherits":51}],98:[function(require,module,exports){ +},{"./_stream_duplex":96,"core-util-is":8,"inherits":53}],100:[function(require,module,exports){ (function (process){ // Copyright Joyent, Inc. and other Node contributors. // @@ -50712,7 +50945,11 @@ function endWritable(stream, state, cb) { } }).call(this,require('_process')) -},{"./_stream_duplex":94,"_process":93,"buffer":4,"core-util-is":8,"inherits":51,"stream":105}],99:[function(require,module,exports){ +},{"./_stream_duplex":96,"_process":95,"buffer":4,"core-util-is":8,"inherits":53,"stream":109}],101:[function(require,module,exports){ +arguments[4][29][0].apply(exports,arguments) +},{"dup":29}],102:[function(require,module,exports){ +arguments[4][36][0].apply(exports,arguments) +},{"buffer":4,"dup":36}],103:[function(require,module,exports){ (function (process){ var Stream = require('stream'); // hack to fix a circular dependency issue when used with browserify exports = module.exports = require('./lib/_stream_readable.js'); @@ -50727,7 +50964,7 @@ if (!process.browser && process.env.READABLE_STREAM === 'disable') { } }).call(this,require('_process')) -},{"./lib/_stream_duplex.js":94,"./lib/_stream_passthrough.js":95,"./lib/_stream_readable.js":96,"./lib/_stream_transform.js":97,"./lib/_stream_writable.js":98,"_process":93,"stream":105}],100:[function(require,module,exports){ +},{"./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,"_process":95,"stream":109}],104:[function(require,module,exports){ /* eslint-disable node/no-deprecated-api */ var buffer = require('buffer') var Buffer = buffer.Buffer @@ -50791,7 +51028,7 @@ SafeBuffer.allocUnsafeSlow = function (size) { return buffer.SlowBuffer(size) } -},{"buffer":4}],101:[function(require,module,exports){ +},{"buffer":4}],105:[function(require,module,exports){ var encode = require('./lib/encoder'), decode = require('./lib/decoder'); @@ -50800,7 +51037,7 @@ module.exports = { decode: decode }; -},{"./lib/decoder":102,"./lib/encoder":103}],102:[function(require,module,exports){ +},{"./lib/decoder":106,"./lib/encoder":107}],106:[function(require,module,exports){ (function (Buffer){ /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- / /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ @@ -51783,7 +52020,7 @@ function decode(jpegData) { } }).call(this,require("buffer").Buffer) -},{"buffer":4}],103:[function(require,module,exports){ +},{"buffer":4}],107:[function(require,module,exports){ (function (Buffer){ /* Copyright (c) 2008, Adobe Systems Incorporated @@ -52553,7 +52790,7 @@ function getImageDataFromImage(idOrElement){ } }).call(this,require("buffer").Buffer) -},{"buffer":4}],104:[function(require,module,exports){ +},{"buffer":4}],108:[function(require,module,exports){ (function (Buffer){ 'use strict' @@ -52698,7 +52935,7 @@ module.exports = function savePixels (array, type, options) { } }).call(this,require("buffer").Buffer) -},{"buffer":4,"contentstream":7,"gif-encoder":26,"jpeg-js":101,"ndarray":66,"ndarray-ops":63,"pngjs-nozlib":90,"through":122}],105:[function(require,module,exports){ +},{"buffer":4,"contentstream":7,"gif-encoder":26,"jpeg-js":105,"ndarray":68,"ndarray-ops":65,"pngjs-nozlib":92,"through":124}],109:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -52827,17 +53064,10 @@ Stream.prototype.pipe = function(dest, options) { return dest; }; -},{"events":15,"inherits":51,"readable-stream/duplex.js":107,"readable-stream/passthrough.js":116,"readable-stream/readable.js":117,"readable-stream/transform.js":118,"readable-stream/writable.js":119}],106:[function(require,module,exports){ -var toString = {}.toString; - -module.exports = Array.isArray || function (arr) { - return toString.call(arr) == '[object Array]'; -}; - -},{}],107:[function(require,module,exports){ +},{"events":15,"inherits":53,"readable-stream/duplex.js":110,"readable-stream/passthrough.js":119,"readable-stream/readable.js":120,"readable-stream/transform.js":121,"readable-stream/writable.js":122}],110:[function(require,module,exports){ module.exports = require('./lib/_stream_duplex.js'); -},{"./lib/_stream_duplex.js":108}],108:[function(require,module,exports){ +},{"./lib/_stream_duplex.js":111}],111:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -52868,7 +53098,7 @@ module.exports = require('./lib/_stream_duplex.js'); /**/ -var processNextTick = require('process-nextick-args'); +var processNextTick = require('process-nextick-args').nextTick; /**/ /**/ @@ -52962,7 +53192,7 @@ function forEach(xs, f) { f(xs[i], i); } } -},{"./_stream_readable":110,"./_stream_writable":112,"core-util-is":8,"inherits":51,"process-nextick-args":92}],109:[function(require,module,exports){ +},{"./_stream_readable":113,"./_stream_writable":115,"core-util-is":8,"inherits":53,"process-nextick-args":94}],112:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -53010,7 +53240,7 @@ function PassThrough(options) { PassThrough.prototype._transform = function (chunk, encoding, cb) { cb(null, chunk); }; -},{"./_stream_transform":111,"core-util-is":8,"inherits":51}],110:[function(require,module,exports){ +},{"./_stream_transform":114,"core-util-is":8,"inherits":53}],113:[function(require,module,exports){ (function (process,global){ // Copyright Joyent, Inc. and other Node contributors. // @@ -53037,7 +53267,7 @@ PassThrough.prototype._transform = function (chunk, encoding, cb) { /**/ -var processNextTick = require('process-nextick-args'); +var processNextTick = require('process-nextick-args').nextTick; /**/ module.exports = Readable; @@ -53064,9 +53294,8 @@ var EElistenerCount = function (emitter, type) { var Stream = require('./internal/streams/stream'); /**/ -// TODO(bmeurer): Change this back to const once hole checks are -// properly optimized away early in Ignition+TurboFan. /**/ + var Buffer = require('safe-buffer').Buffer; var OurUint8Array = global.Uint8Array || function () {}; function _uint8ArrayToBuffer(chunk) { @@ -53075,6 +53304,7 @@ function _uint8ArrayToBuffer(chunk) { function _isUint8Array(obj) { return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; } + /**/ /**/ @@ -53103,15 +53333,13 @@ var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; function prependListener(emitter, event, fn) { // Sadly this is not cacheable as some libraries bundle their own // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') { - return emitter.prependListener(event, fn); - } else { - // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; - } + if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); + + // This is a hack to make sure that our error handler is attached before any + // userland ones. NEVER DO THIS. This is here only because this code needs + // to continue to work with older versions of Node.js that do not include + // the prependListener() method. The goal is to eventually remove this hack. + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; } function ReadableState(options, stream) { @@ -53119,17 +53347,26 @@ function ReadableState(options, stream) { options = options || {}; + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + var isDuplex = stream instanceof Duplex; + // object stream flag. Used to make read(n) ignore n and to // make all the buffer merging and length checks go away this.objectMode = !!options.objectMode; - if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; // the point at which it stops calling _read() to fill the buffer // Note: 0 is a valid value, means "don't call _read preemptively ever" var hwm = options.highWaterMark; + var readableHwm = options.readableHighWaterMark; var defaultHwm = this.objectMode ? 16 : 16 * 1024; - this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; + + if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; // cast to ints. this.highWaterMark = Math.floor(this.highWaterMark); @@ -53824,18 +54061,19 @@ function flow(stream) { // This is *not* part of the readable stream interface. // It is an ugly unfortunate mess of history. Readable.prototype.wrap = function (stream) { + var _this = this; + var state = this._readableState; var paused = false; - var self = this; stream.on('end', function () { debug('wrapped end'); if (state.decoder && !state.ended) { var chunk = state.decoder.end(); - if (chunk && chunk.length) self.push(chunk); + if (chunk && chunk.length) _this.push(chunk); } - self.push(null); + _this.push(null); }); stream.on('data', function (chunk) { @@ -53845,7 +54083,7 @@ Readable.prototype.wrap = function (stream) { // don't skip over falsy values in objectMode if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - var ret = self.push(chunk); + var ret = _this.push(chunk); if (!ret) { paused = true; stream.pause(); @@ -53866,12 +54104,12 @@ Readable.prototype.wrap = function (stream) { // proxy certain important events. for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], self.emit.bind(self, kProxyEvents[n])); + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); } // when we try to consume some more bytes, simply unpause the // underlying stream. - self._read = function (n) { + this._read = function (n) { debug('wrapped _read', n); if (paused) { paused = false; @@ -53879,7 +54117,7 @@ Readable.prototype.wrap = function (stream) { } }; - return self; + return this; }; // exposed for testing purposes only. @@ -54020,7 +54258,7 @@ function indexOf(xs, x) { return -1; } }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./_stream_duplex":108,"./internal/streams/BufferList":113,"./internal/streams/destroy":114,"./internal/streams/stream":115,"_process":93,"core-util-is":8,"events":15,"inherits":51,"isarray":106,"process-nextick-args":92,"safe-buffer":100,"string_decoder/":120,"util":3}],111:[function(require,module,exports){ +},{"./_stream_duplex":111,"./internal/streams/BufferList":116,"./internal/streams/destroy":117,"./internal/streams/stream":118,"_process":95,"core-util-is":8,"events":15,"inherits":53,"isarray":56,"process-nextick-args":94,"safe-buffer":104,"string_decoder/":123,"util":3}],114:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -54097,39 +54335,28 @@ util.inherits = require('inherits'); util.inherits(Transform, Duplex); -function TransformState(stream) { - this.afterTransform = function (er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; - this.writeencoding = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; +function afterTransform(er, data) { + var ts = this._transformState; ts.transforming = false; var cb = ts.writecb; if (!cb) { - return stream.emit('error', new Error('write callback called multiple times')); + return this.emit('error', new Error('write callback called multiple times')); } ts.writechunk = null; ts.writecb = null; - if (data !== null && data !== undefined) stream.push(data); + if (data != null) // single equals check for both `null` and `undefined` + this.push(data); cb(er); - var rs = stream._readableState; + var rs = this._readableState; rs.reading = false; if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); + this._read(rs.highWaterMark); } } @@ -54138,9 +54365,14 @@ function Transform(options) { Duplex.call(this, options); - this._transformState = new TransformState(this); - - var stream = this; + this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: false, + transforming: false, + writecb: null, + writechunk: null, + writeencoding: null + }; // start out asking for a readable event once data is transformed. this._readableState.needReadable = true; @@ -54157,11 +54389,19 @@ function Transform(options) { } // When the writable side finishes, then flush out anything remaining. - this.once('prefinish', function () { - if (typeof this._flush === 'function') this._flush(function (er, data) { - done(stream, er, data); - });else done(stream); - }); + this.on('prefinish', prefinish); +} + +function prefinish() { + var _this = this; + + if (typeof this._flush === 'function') { + this._flush(function (er, data) { + done(_this, er, data); + }); + } else { + done(this, null, null); + } } Transform.prototype.push = function (chunk, encoding) { @@ -54211,31 +54451,29 @@ Transform.prototype._read = function (n) { }; Transform.prototype._destroy = function (err, cb) { - var _this = this; + var _this2 = this; Duplex.prototype._destroy.call(this, err, function (err2) { cb(err2); - _this.emit('close'); + _this2.emit('close'); }); }; function done(stream, er, data) { if (er) return stream.emit('error', er); - if (data !== null && data !== undefined) stream.push(data); + if (data != null) // single equals check for both `null` and `undefined` + stream.push(data); // if there's nothing in the write buffer, then that means // that nothing more will ever be provided - var ws = stream._writableState; - var ts = stream._transformState; + if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0'); - if (ws.length) throw new Error('Calling transform done when ws.length != 0'); - - if (ts.transforming) throw new Error('Calling transform done when still transforming'); + if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming'); return stream.push(null); } -},{"./_stream_duplex":108,"core-util-is":8,"inherits":51}],112:[function(require,module,exports){ +},{"./_stream_duplex":111,"core-util-is":8,"inherits":53}],115:[function(require,module,exports){ (function (process,global){ // Copyright Joyent, Inc. and other Node contributors. // @@ -54266,7 +54504,7 @@ function done(stream, er, data) { /**/ -var processNextTick = require('process-nextick-args'); +var processNextTick = require('process-nextick-args').nextTick; /**/ module.exports = Writable; @@ -54318,6 +54556,7 @@ var Stream = require('./internal/streams/stream'); /**/ /**/ + var Buffer = require('safe-buffer').Buffer; var OurUint8Array = global.Uint8Array || function () {}; function _uint8ArrayToBuffer(chunk) { @@ -54326,6 +54565,7 @@ function _uint8ArrayToBuffer(chunk) { function _isUint8Array(obj) { return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; } + /**/ var destroyImpl = require('./internal/streams/destroy'); @@ -54339,18 +54579,27 @@ function WritableState(options, stream) { options = options || {}; + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + var isDuplex = stream instanceof Duplex; + // object stream flag to indicate whether or not this stream // contains buffers or objects. this.objectMode = !!options.objectMode; - if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; // the point at which write() starts returning false // Note: 0 is a valid value, means that we always return false if // the entire buffer is not flushed immediately on write() var hwm = options.highWaterMark; + var writableHwm = options.writableHighWaterMark; var defaultHwm = this.objectMode ? 16 : 16 * 1024; - this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; + + if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; // cast to ints. this.highWaterMark = Math.floor(this.highWaterMark); @@ -54464,6 +54713,7 @@ if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.protot Object.defineProperty(Writable, Symbol.hasInstance, { value: function (object) { if (realHasInstance.call(this, object)) return true; + if (this !== Writable) return false; return object && object._writableState instanceof WritableState; } @@ -54541,7 +54791,7 @@ function validChunk(stream, state, chunk, cb) { Writable.prototype.write = function (chunk, encoding, cb) { var state = this._writableState; var ret = false; - var isBuf = _isUint8Array(chunk) && !state.objectMode; + var isBuf = !state.objectMode && _isUint8Array(chunk); if (isBuf && !Buffer.isBuffer(chunk)) { chunk = _uint8ArrayToBuffer(chunk); @@ -54753,6 +55003,7 @@ function clearBuffer(stream, state) { } else { state.corkedRequestsFree = new CorkedRequest(state); } + state.bufferedRequestCount = 0; } else { // Slow case, write chunks one-by-one while (entry) { @@ -54763,6 +55014,7 @@ function clearBuffer(stream, state) { doWrite(stream, state, false, len, chunk, encoding, cb); entry = entry.next; + state.bufferedRequestCount--; // if we didn't call the onwrite immediately, then // it means that we need to wait until it does. // also, that means that the chunk and cb are currently @@ -54775,7 +55027,6 @@ function clearBuffer(stream, state) { if (entry === null) state.lastBufferedRequest = null; } - state.bufferedRequestCount = 0; state.bufferedRequest = entry; state.bufferProcessing = false; } @@ -54902,15 +55153,13 @@ Writable.prototype._destroy = function (err, cb) { cb(err); }; }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./_stream_duplex":108,"./internal/streams/destroy":114,"./internal/streams/stream":115,"_process":93,"core-util-is":8,"inherits":51,"process-nextick-args":92,"safe-buffer":100,"util-deprecate":127}],113:[function(require,module,exports){ +},{"./_stream_duplex":111,"./internal/streams/destroy":117,"./internal/streams/stream":118,"_process":95,"core-util-is":8,"inherits":53,"process-nextick-args":94,"safe-buffer":104,"util-deprecate":129}],116:[function(require,module,exports){ 'use strict'; -/**/ - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var Buffer = require('safe-buffer').Buffer; -/**/ +var util = require('util'); function copyBuffer(src, target, offset) { src.copy(target, offset); @@ -54977,12 +55226,19 @@ module.exports = function () { return BufferList; }(); -},{"safe-buffer":100}],114:[function(require,module,exports){ + +if (util && util.inspect && util.inspect.custom) { + module.exports.prototype[util.inspect.custom] = function () { + var obj = util.inspect({ length: this.length }); + return this.constructor.name + ' ' + obj; + }; +} +},{"safe-buffer":104,"util":3}],117:[function(require,module,exports){ 'use strict'; /**/ -var processNextTick = require('process-nextick-args'); +var processNextTick = require('process-nextick-args').nextTick; /**/ // undocumented cb() API, needed for core, not for public API @@ -54998,7 +55254,7 @@ function destroy(err, cb) { } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { processNextTick(emitErrorNT, this, err); } - return; + return this; } // we set destroyed to true before firing error callbacks in order @@ -55023,6 +55279,8 @@ function destroy(err, cb) { cb(err); } }); + + return this; } function undestroy() { @@ -55050,13 +55308,13 @@ module.exports = { destroy: destroy, undestroy: undestroy }; -},{"process-nextick-args":92}],115:[function(require,module,exports){ +},{"process-nextick-args":94}],118:[function(require,module,exports){ module.exports = require('events').EventEmitter; -},{"events":15}],116:[function(require,module,exports){ +},{"events":15}],119:[function(require,module,exports){ module.exports = require('./readable').PassThrough -},{"./readable":117}],117:[function(require,module,exports){ +},{"./readable":120}],120:[function(require,module,exports){ exports = module.exports = require('./lib/_stream_readable.js'); exports.Stream = exports; exports.Readable = exports; @@ -55065,13 +55323,13 @@ exports.Duplex = require('./lib/_stream_duplex.js'); exports.Transform = require('./lib/_stream_transform.js'); exports.PassThrough = require('./lib/_stream_passthrough.js'); -},{"./lib/_stream_duplex.js":108,"./lib/_stream_passthrough.js":109,"./lib/_stream_readable.js":110,"./lib/_stream_transform.js":111,"./lib/_stream_writable.js":112}],118:[function(require,module,exports){ +},{"./lib/_stream_duplex.js":111,"./lib/_stream_passthrough.js":112,"./lib/_stream_readable.js":113,"./lib/_stream_transform.js":114,"./lib/_stream_writable.js":115}],121:[function(require,module,exports){ module.exports = require('./readable').Transform -},{"./readable":117}],119:[function(require,module,exports){ +},{"./readable":120}],122:[function(require,module,exports){ module.exports = require('./lib/_stream_writable.js'); -},{"./lib/_stream_writable.js":112}],120:[function(require,module,exports){ +},{"./lib/_stream_writable.js":115}],123:[function(require,module,exports){ 'use strict'; var Buffer = require('safe-buffer').Buffer; @@ -55344,230 +55602,7 @@ function simpleWrite(buf) { function simpleEnd(buf) { return buf && buf.length ? this.write(buf) : ''; } -},{"safe-buffer":100}],121:[function(require,module,exports){ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var Buffer = require('buffer').Buffer; - -var isBufferEncoding = Buffer.isEncoding - || function(encoding) { - switch (encoding && encoding.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 true; - default: return false; - } - } - - -function assertEncoding(encoding) { - if (encoding && !isBufferEncoding(encoding)) { - throw new Error('Unknown encoding: ' + encoding); - } -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. CESU-8 is handled as part of the UTF-8 encoding. -// -// @TODO Handling all encodings inside a single object makes it very difficult -// to reason about this code, so it should be split up in the future. -// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code -// points as used by CESU-8. -var StringDecoder = exports.StringDecoder = function(encoding) { - this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); - assertEncoding(encoding); - switch (this.encoding) { - case 'utf8': - // CESU-8 represents each of Surrogate Pair by 3-bytes - this.surrogateSize = 3; - break; - case 'ucs2': - case 'utf16le': - // UTF-16 represents each of Surrogate Pair by 2-bytes - this.surrogateSize = 2; - this.detectIncompleteChar = utf16DetectIncompleteChar; - break; - case 'base64': - // Base-64 stores 3 bytes in 4 chars, and pads the remainder. - this.surrogateSize = 3; - this.detectIncompleteChar = base64DetectIncompleteChar; - break; - default: - this.write = passThroughWrite; - return; - } - - // Enough space to store all bytes of a single character. UTF-8 needs 4 - // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). - this.charBuffer = new Buffer(6); - // Number of bytes received for the current incomplete multi-byte character. - this.charReceived = 0; - // Number of bytes expected for the current incomplete multi-byte character. - this.charLength = 0; -}; - - -// write decodes the given buffer and returns it as JS string that is -// guaranteed to not contain any partial multi-byte characters. Any partial -// character found at the end of the buffer is buffered up, and will be -// returned when calling write again with the remaining bytes. -// -// Note: Converting a Buffer containing an orphan surrogate to a String -// currently works, but converting a String to a Buffer (via `new Buffer`, or -// Buffer#write) will replace incomplete surrogates with the unicode -// replacement character. See https://codereview.chromium.org/121173009/ . -StringDecoder.prototype.write = function(buffer) { - var charStr = ''; - // if our last write ended with an incomplete multibyte character - while (this.charLength) { - // determine how many remaining bytes this buffer has to offer for this char - var available = (buffer.length >= this.charLength - this.charReceived) ? - this.charLength - this.charReceived : - buffer.length; - - // add the new bytes to the char buffer - buffer.copy(this.charBuffer, this.charReceived, 0, available); - this.charReceived += available; - - if (this.charReceived < this.charLength) { - // still not enough chars in this buffer? wait for more ... - return ''; - } - - // remove bytes belonging to the current character from the buffer - buffer = buffer.slice(available, buffer.length); - - // get the character that was split - charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); - - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - var charCode = charStr.charCodeAt(charStr.length - 1); - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - this.charLength += this.surrogateSize; - charStr = ''; - continue; - } - this.charReceived = this.charLength = 0; - - // if there are no more bytes in this buffer, just emit our char - if (buffer.length === 0) { - return charStr; - } - break; - } - - // determine and set charLength / charReceived - this.detectIncompleteChar(buffer); - - var end = buffer.length; - if (this.charLength) { - // buffer the incomplete character bytes we got - buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); - end -= this.charReceived; - } - - charStr += buffer.toString(this.encoding, 0, end); - - var end = charStr.length - 1; - var charCode = charStr.charCodeAt(end); - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - var size = this.surrogateSize; - this.charLength += size; - this.charReceived += size; - this.charBuffer.copy(this.charBuffer, size, 0, size); - buffer.copy(this.charBuffer, 0, 0, size); - return charStr.substring(0, end); - } - - // or just emit the charStr - return charStr; -}; - -// detectIncompleteChar determines if there is an incomplete UTF-8 character at -// the end of the given buffer. If so, it sets this.charLength to the byte -// length that character, and sets this.charReceived to the number of bytes -// that are available for this character. -StringDecoder.prototype.detectIncompleteChar = function(buffer) { - // determine how many bytes we have to check at the end of this buffer - var i = (buffer.length >= 3) ? 3 : buffer.length; - - // Figure out if one of the last i bytes of our buffer announces an - // incomplete char. - for (; i > 0; i--) { - var c = buffer[buffer.length - i]; - - // See http://en.wikipedia.org/wiki/UTF-8#Description - - // 110XXXXX - if (i == 1 && c >> 5 == 0x06) { - this.charLength = 2; - break; - } - - // 1110XXXX - if (i <= 2 && c >> 4 == 0x0E) { - this.charLength = 3; - break; - } - - // 11110XXX - if (i <= 3 && c >> 3 == 0x1E) { - this.charLength = 4; - break; - } - } - this.charReceived = i; -}; - -StringDecoder.prototype.end = function(buffer) { - var res = ''; - if (buffer && buffer.length) - res = this.write(buffer); - - if (this.charReceived) { - var cr = this.charReceived; - var buf = this.charBuffer; - var enc = this.encoding; - res += buf.slice(0, cr).toString(enc); - } - - return res; -}; - -function passThroughWrite(buffer) { - return buffer.toString(this.encoding); -} - -function utf16DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 2; - this.charLength = this.charReceived ? 2 : 0; -} - -function base64DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 3; - this.charLength = this.charReceived ? 3 : 0; -} - -},{"buffer":4}],122:[function(require,module,exports){ +},{"safe-buffer":104}],124:[function(require,module,exports){ (function (process){ var Stream = require('stream') @@ -55679,7 +55714,7 @@ function through (write, end, opts) { }).call(this,require('_process')) -},{"_process":93,"stream":105}],123:[function(require,module,exports){ +},{"_process":95,"stream":109}],125:[function(require,module,exports){ exports.isatty = function () { return false; }; function ReadStream() { @@ -55692,7 +55727,7 @@ function WriteStream() { } exports.WriteStream = WriteStream; -},{}],124:[function(require,module,exports){ +},{}],126:[function(require,module,exports){ (function (global,Buffer){ 'use strict' @@ -55909,7 +55944,7 @@ exports.clearCache = function clearCache() { } } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer) -},{"bit-twiddle":2,"buffer":4,"dup":14}],125:[function(require,module,exports){ +},{"bit-twiddle":2,"buffer":4,"dup":14}],127:[function(require,module,exports){ "use strict" function unique_pred(list, compare) { @@ -55968,7 +56003,7 @@ function unique(list, compare, sorted) { module.exports = unique -},{}],126:[function(require,module,exports){ +},{}],128:[function(require,module,exports){ var mime = require('mime'); var fs = require('fs'); @@ -55978,7 +56013,7 @@ module.exports = function urifyNode (file) { return 'data:' + type + ';base64,' + data; }; -},{"fs":38,"mime":58}],127:[function(require,module,exports){ +},{"fs":40,"mime":60}],129:[function(require,module,exports){ (function (global){ /** @@ -56049,16 +56084,16 @@ function config (name) { } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],128:[function(require,module,exports){ -arguments[4][51][0].apply(exports,arguments) -},{"dup":51}],129:[function(require,module,exports){ +},{}],130:[function(require,module,exports){ +arguments[4][53][0].apply(exports,arguments) +},{"dup":53}],131:[function(require,module,exports){ module.exports = function isBuffer(arg) { return arg && typeof arg === 'object' && typeof arg.copy === 'function' && typeof arg.fill === 'function' && typeof arg.readUInt8 === 'function'; } -},{}],130:[function(require,module,exports){ +},{}],132:[function(require,module,exports){ (function (process,global){ // Copyright Joyent, Inc. and other Node contributors. // @@ -56648,7 +56683,7 @@ function hasOwnProperty(obj, prop) { } }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./support/isBuffer":129,"_process":93,"inherits":128}],131:[function(require,module,exports){ +},{"./support/isBuffer":131,"_process":95,"inherits":130}],133:[function(require,module,exports){ function AddStep(ref, image, name, o) { function addStep(image, name, o_) { @@ -56679,12 +56714,12 @@ function AddStep(ref, image, name, o) { } module.exports = AddStep; -},{}],132:[function(require,module,exports){ +},{}],134:[function(require,module,exports){ var fs = require('fs'); var getDirectories = function(rootDir, cb) { fs.readdir(rootDir, function(err, files) { var dirs = []; - if(typeof(files)=="undefined") { + if(typeof(files)=="undefined" || files.length == 0) { cb(dirs); return []; } @@ -56741,7 +56776,7 @@ module.exports = function ExportBin(dir = "./output/",ref,basic) { }); } -},{"data-uri-to-buffer":13,"fs":38}],133:[function(require,module,exports){ +},{"data-uri-to-buffer":13,"fs":40}],135:[function(require,module,exports){ function objTypeOf(object){ return Object.prototype.toString.call(object).split(" ")[1].slice(0,-1) } @@ -56907,7 +56942,7 @@ function formatInput(args,format,images) { } module.exports = formatInput; -},{}],134:[function(require,module,exports){ +},{}],136:[function(require,module,exports){ if (typeof window !== 'undefined') {window.$ = window.jQuery = require('jquery'); isBrowser = true} else {var isBrowser = false} @@ -57132,7 +57167,7 @@ ImageSequencer = function ImageSequencer(options) { } module.exports = ImageSequencer; -},{"./AddStep":131,"./ExportBin":132,"./FormatInput":133,"./InsertStep":135,"./LoadImage":136,"./Modules":137,"./ReplaceImage":138,"./Run":139,"./UserInterface":140,"fs":38,"jquery":55}],135:[function(require,module,exports){ +},{"./AddStep":133,"./ExportBin":134,"./FormatInput":135,"./InsertStep":137,"./LoadImage":138,"./Modules":139,"./ReplaceImage":140,"./Run":141,"./UserInterface":142,"fs":40,"jquery":57}],137:[function(require,module,exports){ function InsertStep(ref, image, index, name, o) { function insertStep(image, index, name, o_) { @@ -57166,7 +57201,7 @@ function InsertStep(ref, image, index, name, o) { } module.exports = InsertStep; -},{}],136:[function(require,module,exports){ +},{}],138:[function(require,module,exports){ // special module to load an image into the start of the sequence; used in the HTML UI function LoadImage(ref, name, src, main_callback) { function makeImage(datauri) { @@ -57273,7 +57308,7 @@ function LoadImage(ref, name, src, main_callback) { module.exports = LoadImage; -},{"urify":126}],137:[function(require,module,exports){ +},{"urify":128}],139:[function(require,module,exports){ /* * Core modules and their info files */ @@ -57307,10 +57342,13 @@ module.exports = { ], 'dynamic': [ require('./modules/Dynamic/Module'),require('./modules/Dynamic/info') + ], + 'blur': [ + require('./modules/Blur/Module'),require('./modules/Blur/info') ] } -},{"./modules/Brightness/Module":141,"./modules/Brightness/info":142,"./modules/Crop/Module":144,"./modules/Crop/info":145,"./modules/DecodeQr/Module":146,"./modules/DecodeQr/info":147,"./modules/Dynamic/Module":148,"./modules/Dynamic/info":149,"./modules/EdgeDetect/Module":151,"./modules/EdgeDetect/info":152,"./modules/FisheyeGl/Module":153,"./modules/FisheyeGl/info":154,"./modules/GreenChannel/Module":155,"./modules/GreenChannel/info":156,"./modules/Invert/Module":157,"./modules/Invert/info":158,"./modules/NdviRed/Module":159,"./modules/NdviRed/info":160,"./modules/SegmentedColormap/Module":161,"./modules/SegmentedColormap/info":163}],138:[function(require,module,exports){ +},{"./modules/Blur/Module":144,"./modules/Blur/info":145,"./modules/Brightness/Module":146,"./modules/Brightness/info":147,"./modules/Crop/Module":149,"./modules/Crop/info":150,"./modules/DecodeQr/Module":151,"./modules/DecodeQr/info":152,"./modules/Dynamic/Module":153,"./modules/Dynamic/info":154,"./modules/EdgeDetect/Module":156,"./modules/EdgeDetect/info":157,"./modules/FisheyeGl/Module":158,"./modules/FisheyeGl/info":159,"./modules/GreenChannel/Module":160,"./modules/GreenChannel/info":161,"./modules/Invert/Module":162,"./modules/Invert/info":163,"./modules/NdviRed/Module":164,"./modules/NdviRed/info":165,"./modules/SegmentedColormap/Module":166,"./modules/SegmentedColormap/info":168}],140:[function(require,module,exports){ function ReplaceImage(ref,selector,steps,options) { if(!ref.options.inBrowser) return false; // This isn't for Node.js var tempSequencer = ImageSequencer({ui: false}); @@ -57357,7 +57395,7 @@ function ReplaceImage(ref,selector,steps,options) { module.exports = ReplaceImage; -},{}],139:[function(require,module,exports){ +},{}],141:[function(require,module,exports){ function Run(ref, json_q, callback) { function drawStep(drawarray, pos) { @@ -57414,7 +57452,7 @@ function Run(ref, json_q, callback) { } module.exports = Run; -},{}],140:[function(require,module,exports){ +},{}],142:[function(require,module,exports){ /* * User Interface Handling Module */ @@ -57482,7 +57520,166 @@ module.exports = function UserInterface(events = {}) { } -},{}],141:[function(require,module,exports){ +},{}],143:[function(require,module,exports){ +module.exports = exports = function(pixels,blur){ + let kernel = kernelGenerator(blur,1) + kernel = flipKernel(kernel) + var oldpix = pixels + + for(let i=0;i{ + // return val.reduce((sumInner,valInner)=>{ + // return sumInner+valInner + // }) + // }) + // result = result.map(arr=>arr.map(val=>(val + 0.0)/(sum + 0.0))) + + // return result + + return [ + [2.0/159.0,4.0/159.0,5.0/159.0,4.0/159.0,2.0/159.0], + [4.0/159.0,9.0/159.0,12.0/159.0,9.0/159.0,4.0/159.0], + [5.0/159.0,12.0/159.0,15.0/159.0,12.0/159.0,5.0/159.0], + [4.0/159.0,9.0/159.0,12.0/159.0,9.0/159.0,4.0/159.0], + [2.0/159.0,4.0/159.0,5.0/159.0,4.0/159.0,2.0/159.0] + ] + } + function getNeighbouringPixelPositions(pixelPosition){ + let x = pixelPosition[0],y=pixelPosition[1] + let result = [] + for(let i=-2;i<=2;i++){ + let arr = [] + for(let j=-2;j<=2;j++){ + arr.push([x + i,y + j]) + } + result.push(arr) + } + return result +} + +function flipKernel(kernel){ + let result = [] + for(let i =kernel.length-1;i>=0;i--){ + let arr = [] + for(let j = kernel[i].length-1;j>=0;j--){ + arr.push(kernel[i][j]) + } + result.push(arr) + } + return result +} +} +},{}],144:[function(require,module,exports){ +/* +* Blur an Image +*/ +module.exports = function Blur(options,UI){ + options = options || {}; + options.title = "Blur"; + options.description = "Blur an Image"; + options.blur = options.blur || 2 + + //Tell the UI that a step has been set up + UI.onSetup(options.step); + var output; + + function draw(input,callback){ + + // Tell the UI that a step is being drawn + UI.onDraw(options.step); + + var step = this; + + function changePixel(r, g, b, a){ + return [r,g,b,a] + } + + function extraManipulation(pixels){ + pixels = require('./Blur')(pixels,options.blur) + return pixels + } + + function output(image,datauri,mimetype){ + + // This output is accessible by Image Sequencer + step.output = {src:datauri,format:mimetype}; + + // This output is accessible by UI + options.step.output = datauri; + + // Tell UI that step has been drawn. + UI.onComplete(options.step); + } + + return require('../_nomodule/PixelManipulation.js')(input, { + output: output, + changePixel: changePixel, + extraManipulation: extraManipulation, + format: input.format, + image: options.image, + callback: callback + }); + + } + return { + options: options, + draw: draw, + output: output, + UI: UI + } +} + +},{"../_nomodule/PixelManipulation.js":169,"./Blur":143}],145:[function(require,module,exports){ +module.exports={ + "name": "blur", + "description": "Blur an image by a given value", + "inputs": { + "blur": { + "type": "integer", + "desc": "amount of gaussian blur(Less blur gives more detail, typically 0-5)", + "default": 2 + } + } +} + +},{}],146:[function(require,module,exports){ /* * Changes the Image Brightness */ @@ -57541,7 +57738,7 @@ module.exports = function Brightness(options,UI){ UI: UI } } -},{"../_nomodule/PixelManipulation.js":164}],142:[function(require,module,exports){ +},{"../_nomodule/PixelManipulation.js":169}],147:[function(require,module,exports){ module.exports={ "name": "Brightness", "description": "Change the brightness of the image by given value", @@ -57553,7 +57750,7 @@ module.exports={ } } } -},{}],143:[function(require,module,exports){ +},{}],148:[function(require,module,exports){ (function (Buffer){ module.exports = function Crop(input,options,callback) { @@ -57599,7 +57796,7 @@ module.exports = function Crop(input,options,callback) { }; }).call(this,require("buffer").Buffer) -},{"buffer":4,"get-pixels":24,"save-pixels":104}],144:[function(require,module,exports){ +},{"buffer":4,"get-pixels":24,"save-pixels":108}],149:[function(require,module,exports){ /* * Image Cropping module * Usage: @@ -57660,7 +57857,7 @@ module.exports = function Crop(input,options,callback) { } } -},{"./Crop":143}],145:[function(require,module,exports){ +},{"./Crop":148}],150:[function(require,module,exports){ module.exports={ "name": "Crop", "description": "Crop image to given x, y, w, h", @@ -57689,7 +57886,7 @@ module.exports={ } } -},{}],146:[function(require,module,exports){ +},{}],151:[function(require,module,exports){ /* * Decodes QR from a given image. */ @@ -57745,7 +57942,7 @@ module.exports = function DoNothing(options,UI) { } } -},{"get-pixels":24,"jsqr":56}],147:[function(require,module,exports){ +},{"get-pixels":24,"jsqr":58}],152:[function(require,module,exports){ module.exports={ "name": "Decode QR", "inputs": { @@ -57757,7 +57954,7 @@ module.exports={ } } -},{}],148:[function(require,module,exports){ +},{}],153:[function(require,module,exports){ module.exports = function Dynamic(options,UI) { options = options || {}; @@ -57835,7 +58032,7 @@ module.exports = function Dynamic(options,UI) { } } -},{"../_nomodule/PixelManipulation.js":164}],149:[function(require,module,exports){ +},{"../_nomodule/PixelManipulation.js":169}],154:[function(require,module,exports){ module.exports={ "name": "Dynamic", "description": "A module which accepts JavaScript math expressions to produce each color channel based on the original image's color. See Infragrammar.", @@ -57863,7 +58060,7 @@ module.exports={ } } -},{}],150:[function(require,module,exports){ +},{}],155:[function(require,module,exports){ const _ = require('lodash') var pace = require('pace') @@ -58051,7 +58248,7 @@ function hysteresis(pixels){ -},{"lodash":57,"pace":69}],151:[function(require,module,exports){ +},{"lodash":59,"pace":71}],156:[function(require,module,exports){ /* * Detect Edges in an Image */ @@ -58105,7 +58302,7 @@ module.exports = function edgeDetect(options,UI) { extraManipulation: extraManipulation, format: input.format, image: options.image, - inBrowser: inBrowser, + inBrowser: options.inBrowser, callback: callback }); @@ -58118,7 +58315,7 @@ module.exports = function edgeDetect(options,UI) { UI: UI } } -},{"../_nomodule/PixelManipulation.js":164,"./EdgeUtils":150,"ndarray-gaussian-filter":62}],152:[function(require,module,exports){ +},{"../_nomodule/PixelManipulation.js":169,"./EdgeUtils":155,"ndarray-gaussian-filter":64}],157:[function(require,module,exports){ module.exports={ "name": "Detect Edges", "description": "this module detects edges using the Canny method, which first Gaussian blurs the image to reduce noise (amount of blur configurable in settings as `options.blur`), then applies a number of steps to highlight edges, resulting in a greyscale image where the brighter the pixel, the stronger the detected edge. Read more at: https://en.wikipedia.org/wiki/Canny_edge_detector", @@ -58140,7 +58337,7 @@ module.exports={ } } } -},{}],153:[function(require,module,exports){ +},{}],158:[function(require,module,exports){ /* * Resolves Fisheye Effect */ @@ -58224,7 +58421,7 @@ module.exports = function DoNothing(options,UI) { } } -},{"fisheyegl":16}],154:[function(require,module,exports){ +},{"fisheyegl":16}],159:[function(require,module,exports){ module.exports={ "name": "Fisheye GL", "inputs": { @@ -58290,7 +58487,7 @@ module.exports={ } } -},{}],155:[function(require,module,exports){ +},{}],160:[function(require,module,exports){ /* * Display only the green channel */ @@ -58346,14 +58543,14 @@ module.exports = function GreenChannel(options,UI) { } } -},{"../_nomodule/PixelManipulation.js":164}],156:[function(require,module,exports){ +},{"../_nomodule/PixelManipulation.js":169}],161:[function(require,module,exports){ module.exports={ "name": "Green Channel", "inputs": { } } -},{}],157:[function(require,module,exports){ +},{}],162:[function(require,module,exports){ /* * Invert the image */ @@ -58410,7 +58607,7 @@ module.exports = function Invert(options,UI) { } } -},{"../_nomodule/PixelManipulation.js":164}],158:[function(require,module,exports){ +},{"../_nomodule/PixelManipulation.js":169}],163:[function(require,module,exports){ module.exports={ "name": "Invert", "description": "Inverts the image.", @@ -58418,7 +58615,7 @@ module.exports={ } } -},{}],159:[function(require,module,exports){ +},{}],164:[function(require,module,exports){ /* * NDVI with red filter (blue channel is infrared) */ @@ -58475,14 +58672,14 @@ module.exports = function NdviRed(options,UI) { } } -},{"../_nomodule/PixelManipulation.js":164}],160:[function(require,module,exports){ +},{"../_nomodule/PixelManipulation.js":169}],165:[function(require,module,exports){ module.exports={ "name": "NDVI Red", "inputs": { } } -},{}],161:[function(require,module,exports){ +},{}],166:[function(require,module,exports){ module.exports = function SegmentedColormap(options,UI) { options = options || {}; @@ -58536,7 +58733,7 @@ module.exports = function SegmentedColormap(options,UI) { } } -},{"../_nomodule/PixelManipulation.js":164,"./SegmentedColormap":162}],162:[function(require,module,exports){ +},{"../_nomodule/PixelManipulation.js":169,"./SegmentedColormap":167}],167:[function(require,module,exports){ /* * Accepts a value from 0-255 and returns the new color-mapped pixel * from a lookup table, which can be specified as an array of [begin, end] @@ -58625,7 +58822,7 @@ var colormaps = { ]) } -},{}],163:[function(require,module,exports){ +},{}],168:[function(require,module,exports){ module.exports={ "name": "Segmented Colormap", "description": "Maps brightness values (average of red, green & blue) to a given color lookup table, made up of a set of one more color gradients.", @@ -58639,7 +58836,7 @@ module.exports={ } } -},{}],164:[function(require,module,exports){ +},{}],169:[function(require,module,exports){ (function (Buffer){ /* * General purpose per-pixel manipulation @@ -58716,4 +58913,4 @@ module.exports = function PixelManipulation(image, options) { }; }).call(this,require("buffer").Buffer) -},{"buffer":4,"get-pixels":24,"pace":69,"save-pixels":104}]},{},[134]); +},{"buffer":4,"get-pixels":24,"pace":71,"save-pixels":108}]},{},[136]); diff --git a/dist/image-sequencer.min.js b/dist/image-sequencer.min.js index dfef6c85..7b07aab9 100644 --- a/dist/image-sequencer.min.js +++ b/dist/image-sequencer.min.js @@ -1 +1 @@ -!function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(a)return a(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}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;o0?u-4:u;var c=0;for(t=0;t>16&255,s[c++]=r>>8&255,s[c++]=255&r;2===o?(r=i[e.charCodeAt(t)]<<2|i[e.charCodeAt(t+1)]>>4,s[c++]=255&r):1===o&&(r=i[e.charCodeAt(t)]<<10|i[e.charCodeAt(t+1)]<<4|i[e.charCodeAt(t+2)]>>2,s[c++]=r>>8&255,s[c++]=255&r);return s},n.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a="",o=[],s=0,u=n-i;su?u:s+16383));1===i?(t=e[n-1],a+=r[t>>2],a+=r[t<<4&63],a+="=="):2===i&&(t=(e[n-2]<<8)+e[n-1],a+=r[t>>10],a+=r[t>>4&63],a+=r[t<<2&63],a+="=");return o.push(a),o.join("")};for(var r=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function c(e,t,n){for(var i,a,o=[],s=t;s>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],2:[function(e,t,n){"use strict";"use restrict";function r(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}n.INT_BITS=32,n.INT_MAX=2147483647,n.INT_MIN=-1<<31,n.sign=function(e){return(e>0)-(e<0)},n.abs=function(e){var t=e>>31;return(e^t)-t},n.min=function(e,t){return t^(e^t)&-(e65535)<<4,t|=n=((e>>>=t)>255)<<3,t|=n=((e>>>=n)>15)<<2,(t|=n=((e>>>=n)>3)<<1)|(e>>>=n)>>1},n.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},n.popCount=function(e){return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},n.countTrailingZeros=r,n.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)+1},n.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},n.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var i=new Array(256);!function(e){for(var t=0;t<256;++t){var n=t,r=t,i=7;for(n>>>=1;n;n>>>=1)r<<=1,r|=1&n,--i;e[t]=r<>>8&255]<<16|i[e>>>16&255]<<8|i[e>>>24&255]},n.interleave2=function(e,t){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))<<1},n.deinterleave2=function(e,t){return(e=65535&((e=16711935&((e=252645135&((e=858993459&((e=e>>>t&1431655765)|e>>>1))|e>>>2))|e>>>4))|e>>>16))<<16>>16},n.interleave3=function(e,t,n){return e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2),(e|=(t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2))<<1)|(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<2},n.deinterleave3=function(e,t){return(e=1023&((e=4278190335&((e=251719695&((e=3272356035&((e=e>>>t&1227133513)|e>>>2))|e>>>4))|e>>>8))|e>>>16))<<22>>22},n.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},{}],3:[function(e,t,n){},{}],4:[function(e,t,n){"use strict";var r=e("base64-js"),i=e("ieee754");n.Buffer=s,n.SlowBuffer=function(e){+e!=e&&(e=0);return s.alloc(+e)},n.INSPECT_MAX_BYTES=50;var a=2147483647;function o(e){if(e>a)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=s.prototype,t}function s(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 c(e)}return u(e,t,n)}function u(e,t,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return P(e)?function(e,t,n){if(t<0||e.byteLength=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function p(e,t){if(s.isBuffer(e))return e.length;if(U(e)||P(e))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 O(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(e).length;default:if(r)return O(e).length;t=(""+t).toLowerCase(),r=!0}}function d(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(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),q(n=+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=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var a,o=1,s=e.length,u=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,u/=2,n/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(a=n;as&&(n=s-u),a=n;a>=0;a--){for(var f=!0,h=0;hi&&(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>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function k(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function E(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:l>223?3:l>191?2:1;if(i+f<=n)switch(f){case 1:l<128&&(c=l);break;case 2:128==(192&(a=e[i+1]))&&(u=(31&l)<<6|63&a)>127&&(c=u);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(u=(15&l)<<12|(63&a)<<6|63&o)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(u=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,f=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=f}return function(e){var t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return C(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return A(this,t,n);case"base64":return k(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}}.apply(this,arguments)},s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.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+=" ... ")),""},s.prototype.compare=function(e,t,n,r,i){if(!s.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 a=i-r,o=n-t,u=Math.min(a,o),l=this.slice(r,i),c=e.slice(t,n),f=0;f>>=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 m(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return y(this,e,t,n);case"latin1":case"binary":return _(this,e,t,n);case"base64":return b(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",a=t;an)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,r,i,a){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function L(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 R(e,t,n,r,a){return t=+t,n>>>=0,a||L(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,a){return t=+t,n>>>=0,a||L(e,0,n,8),i.write(e,t,n,r,52,8),n+8}s.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>>=0,t>>>=0,n||M(e,t,this.length);for(var r=this[e],i=1,a=0;++a>>=0,t>>>=0,n||M(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);for(var r=this[e],i=1,a=0;++a=(i*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},s.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||M(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||M(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||M(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a>>=0,n>>>=0,r)||I(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},s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);I(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);I(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},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},s.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=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=0;--i)e[i+t]=this[i+n];else if(a<1e3)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&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 F(e){return r.toByteArray(function(e){if((e=e.trim().replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function P(e){return e instanceof ArrayBuffer||null!=e&&null!=e.constructor&&"ArrayBuffer"===e.constructor.name&&"number"==typeof e.byteLength}function U(e){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(e)}function q(e){return e!=e}},{"base64-js":1,ieee754:50}],5:[function(e,t,n){(function(n){var r=e("tty"),i=e("./lib/encode"),a=e("stream").Stream,o=t.exports=function(){var e=null;function t(t){if(e)throw new Error("multiple inputs specified");e=t}var i=null;function a(e){if(i)throw new Error("multiple outputs specified");i=e}for(var o=0;o0&&this.down(t),e>0?this.right(e):e<0&&this.left(-e),this},s.prototype.up=function(e){return void 0===e&&(e=1),this.write(i("["+Math.floor(e)+"A")),this},s.prototype.down=function(e){return void 0===e&&(e=1),this.write(i("["+Math.floor(e)+"B")),this},s.prototype.right=function(e){return void 0===e&&(e=1),this.write(i("["+Math.floor(e)+"C")),this},s.prototype.left=function(e){return void 0===e&&(e=1),this.write(i("["+Math.floor(e)+"D")),this},s.prototype.column=function(e){return this.write(i("["+Math.floor(e)+"G")),this},s.prototype.push=function(e){return this.write(i(e?"7":"[s")),this},s.prototype.pop=function(e){return this.write(i(e?"8":"[u")),this},s.prototype.erase=function(e){return"end"===e||"$"===e?this.write(i("[K")):"start"===e||"^"===e?this.write(i("[1K")):"line"===e?this.write(i("[2K")):"down"===e?this.write(i("[J")):"up"===e?this.write(i("[1J")):"screen"===e?this.write(i("[1J")):this.emit("error",new Error("Unknown erase type: "+e)),this},s.prototype.display=function(e){var t={reset:0,bright:1,dim:2,underscore:4,blink:5,reverse:7,hidden:8}[e];return void 0===t&&this.emit("error",new Error("Unknown attribute: "+e)),this.write(i("["+t+"m")),this},s.prototype.foreground=function(e){if("number"==typeof e)(e<0||e>=256)&&this.emit("error",new Error("Color out of range: "+e)),this.write(i("[38;5;"+e+"m"));else{var t={black:30,red:31,green:32,yellow:33,blue:34,magenta:35,cyan:36,white:37}[e.toLowerCase()];t||this.emit("error",new Error("Unknown color: "+e)),this.write(i("["+t+"m"))}return this},s.prototype.background=function(e){if("number"==typeof e)(e<0||e>=256)&&this.emit("error",new Error("Color out of range: "+e)),this.write(i("[48;5;"+e+"m"));else{var t={black:40,red:41,green:42,yellow:43,blue:44,magenta:45,cyan:46,white:47}[e.toLowerCase()];t||this.emit("error",new Error("Unknown color: "+e)),this.write(i("["+t+"m"))}return this},s.prototype.cursor=function(e){return this.write(i(e?"[?25h":"[?25l")),this};var u=o.extractCodes=function(e){for(var t=[],n=-1,r=0;r=0&&t.push(e.slice(n,r)),n=r):n>=0&&r===e.length-1&&t.push(e.slice(n));return t}}).call(this,e("_process"))},{"./lib/encode":6,_process:93,stream:105,tty:123}],6:[function(e,t,n){(function(e){var n=(t.exports=function(t){return new e([27].concat(function e(t){return"string"==typeof t?t.split("").map(n):Array.isArray(t)?t.reduce(function(t,n){return t.concat(e(n))},[]):void 0}(t)))}).ord=function(e){return e.charCodeAt(0)}}).call(this,e("buffer").Buffer)},{buffer:4}],7:[function(e,t,n){(function(n){"use strict";var r=e("readable-stream").Readable,i=e("util");function a(e,t){if(!(this instanceof a))return new a(e,t);r.call(this,t),null!==e&&void 0!==e||(e=String(e)),this._obj=e}t.exports=a,i.inherits(a,r),a.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:4,"readable-stream":99,util:130}],8:[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":53}],9:[function(e,t,n){"use strict";var r=e("./lib/thunk.js");t.exports=function(e){var t=new function(){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};t.pre=e.pre,t.body=e.body,t.post=e.post;var n=e.args.slice(0);t.argTypes=n;for(var i=0;i0)throw new Error("cwise: pre() block may not reference array args");if(i0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===a)t.scalarArgs.push(i),t.shimArgs.push("scalar"+i);else if("index"===a){if(t.indexArgs.push(i),i0)throw new Error("cwise: pre() block may not reference array index");if(i0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===a){if(t.shapeArgs.push(i),in.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,r(t)}},{"./lib/thunk.js":11}],10:[function(e,t,n){"use strict";var r=e("uniq");function i(e,t,n){var r,i,a=e.length,o=t.arrayArgs.length,s=t.indexArgs.length>0,u=[],l=[],c=0,f=0;for(r=0;r0&&u.push("var "+l.join(",")),r=a-1;r>=0;--r)c=e[r],u.push(["for(i",r,"=0;i",r,"0&&u.push(["index[",f,"]-=s",f].join("")),u.push(["++index[",c,"]"].join(""))),u.push("}")}return u.join("\n")}function a(e,t,n){for(var r=e.body,i=[],a=[],o=0;o0&&w.push("shape=SS.slice(0)"),e.indexArgs.length>0){var y=new Array(n);for(u=0;u0&&m.push("var "+w.join(",")),u=0;u3&&m.push(a(e.pre,e,s));var k=a(e.body,e,s),E=function(e){for(var t=0,n=e[0].length;t0,l=[],c=0;c0;){"].join("")),l.push(["if(j",c,"<",s,"){"].join("")),l.push(["s",t[c],"=j",c].join("")),l.push(["j",c,"=0"].join("")),l.push(["}else{s",t[c],"=",s].join("")),l.push(["j",c,"-=",s,"}"].join("")),u&&l.push(["index[",t[c],"]=j",c].join(""));for(c=0;c3&&m.push(a(e.post,e,s)),e.debug&&console.log("-----Generated cwise routine for ",t,":\n"+m.join("\n")+"\n----------");var S=[e.funcName||"unnamed","_cwise_loop_",o[0].join("s"),"m",E,function(e){for(var t=new Array(e.length),n=!0,r=0;r0&&(n=n&&t[r]===t[r-1])}return n?t[0]:t.join("")}(s)].join("");return new Function(["function ",S,"(",v.join(","),"){",m.join("\n"),"} return ",S].join(""))()}},{uniq:125}],11:[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("")],u=[],l=[],c=0;c0&&(u.push("array"+e.arrayArgs[0]+".shape.length===array"+f+".shape.length+"+(Math.abs(e.arrayBlockIndices[0])-Math.abs(e.arrayBlockIndices[c]))),l.push("array"+e.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,e.arrayBlockIndices[0])+"]===array"+f+".shape[shapeIndex+"+Math.max(0,e.arrayBlockIndices[c])+"]"))}for(e.arrayArgs.length>1&&(t.push("if (!("+u.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 (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),t.push("}")),c=0;c0)return function(e,t){var n,r;for(n=new Array(e),r=0;r0&&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){if(!i(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var n,r,o,s;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(n=this._events[e]).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(a(n)){for(s=o;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(i(n=this._events[e]))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)}},{}],16:[function(e,t,n){var r=function(t){(t=t||{}).width=t.width||800,t.height=t.height||600;var n=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]},r=t.lens||{a:1,b:1,Fx:0,Fy:0,scale:1.5},i=t.fov||{x:1,y:1},a=t.image||"images/barrel-distortion.png",o=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 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"},{}],19:[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"},{}],20:[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"},{}],21:[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"},{}],22:[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"},{}],23:[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"},{}],24:[function(e,t,n){(function(n,r){"use strict";var i=e("path"),a=e("ndarray"),o=e("omggif").GifReader,s=(e("ndarray-pack"),e("through"),e("data-uri-to-buffer"));function u(e,t){var n;try{n=new o(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]),s=a(i,r);try{for(var u=0;u=0&&(this.dispose=e)},u.prototype.setRepeat=function(e){this.repeat=e},u.prototype.setTransparent=function(e){this.transparent=e},u.prototype.analyzeImage=function(e){this.setImagePixels(this.removeAlphaChannel(e)),this.analyzePixels()},u.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},u.prototype.outputImage=function(){this.writePixels()},u.prototype.addFrame=function(e){this.emit("frame#start"),this.analyzeImage(e),this.writeImageInfo(),this.outputImage(),this.emit("frame#stop")},u.prototype.finish=function(){this.emit("finish#start"),this.writeByte(59),this.emit("finish#stop")},u.prototype.setQuality=function(e){e<1&&(e=1),this.sample=e},u.prototype.writeHeader=function(){this.emit("writeHeader#start"),this.writeUTFBytes("GIF89a"),this.emit("writeHeader#stop")},u.prototype.analyzePixels=function(){var e=this.pixels.length/3;this.indexedPixels=new Uint8Array(e);var t=new a(this.pixels,this.sample);t.buildColormap(),this.colorTab=t.getColormap();for(var n=0,r=0;r>16,n=(65280&e)>>8,r=255&e,i=0,a=16777216,o=this.colorTab.length,s=0;s=0&&(t=7&dispose),t<<=2,this.writeByte(0|t|e),this.writeShort(this.delay),this.writeByte(this.transIndex),this.writeByte(0)},u.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)},u.prototype.writeLSD=function(){this.writeShort(this.width),this.writeShort(this.height),this.writeByte(240|this.palSize),this.writeByte(0),this.writeByte(0)},u.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)},u.prototype.writePalette=function(){this.writeBytes(this.colorTab);for(var e=768-this.colorTab.length,t=0;t>8&255)},u.prototype.writePixels=function(){new o(this.width,this.height,this.indexedPixels,this.colorDepth).encode(this)},u.prototype.stream=function(){return this},u.ByteCapacitor=s,t.exports=u}).call(this,e("buffer").Buffer)},{"./LZWEncoder.js":27,"./TypedNeuQuant.js":28,assert:35,buffer:4,events:15,"readable-stream":34,util:130}],27:[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){var u,l,c,f,h,p,d,g,v,m=Math.max(2,s),w=new Uint8Array(256),y=new Int32Array(a),_=new Int32Array(a),b=0,x=0,k=!1;function E(e,t){w[l++]=e,l>=254&&A(t)}function S(e){T(a),x=g+2,k=!0,M(g,e)}function T(e){for(var t=0;t0&&(e.writeByte(l),e.writeBytes(w,0,l),l=0)}function C(e){return(1<0?u|=e<=8;)E(255&u,t),u>>=8,b-=8;if((x>c||k)&&(k?(c=C(p=d),k=!1):c=++p==i?1<0;)E(255&u,t),u>>=8,b-=8;A(t)}}this.encode=function(n){n.writeByte(m),f=e*t,h=0,function(e,t){var n,o,s,u,f,h,m;for(k=!1,c=C(p=d=e),v=1+(g=1<=0){f=h-s,0===s&&(f=1);do{if((s-=f)<0&&(s+=h),y[s]===n){u=_[s];continue e}}while(y[s]>=0)}M(u,t),u=o,x<1<>c,h=u<>3)*(1<l;)u=A[p++],fl&&((s=n[h--])[0]-=u*(s[0]-r)/w,s[1]-=u*(s[1]-a)/w,s[2]-=u*(s[2]-o)/w)}function M(e,t,r){var a,u,p,d,g,v=~(1<<31),m=v,w=-1,y=w;for(a=0;a>s-o))>c,T[a]-=g,S[a]+=g<>3),e=0;e>p;for(T<=1&&(T=0),n=0;n=c&&(I-=c),n++,0===w&&(w=1),n%w==0)for(E-=E/f,(T=(S-=S/g)>>p)<=1&&(T=0),l=0;l>=o,n[e][1]>>=o,n[e][2]>>=o,n[e][3]=e}(),function(){var e,t,r,o,s,u,l=0,c=0;for(e=0;e>1,t=l+1;t>1,t=l+1;t<256;t++)E[t]=a}()},this.getColormap=function(){for(var e=[],t=[],r=0;r=0;)c=u?c=i:(c++,s<0&&(s=-s),(a=o[0]-e)<0&&(a=-a),(s+=a)=0&&((s=t-(o=n[f])[1])>=u?f=-1:(f--,s<0&&(s=-s),(a=o[0]-e)<0&&(a=-a),(s+=a)0)if(t.ended&&!a){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&a){s=new Error("stream.unshift() after end event");e.emit("error",s)}else!t.decoder||a||i||(r=t.decoder.write(r)),a||(t.reading=!1),t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,a?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&g(e)),function(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(function(){!function(e,t){var n=t.length;for(;!t.reading&&!t.flowing&&!t.ended&&t.lengtht.highWaterMark&&(t.highWaterMark=function(e){if(e>=p)e=p;else{e--;for(var t=1;t<32;t<<=1)e|=e>>t;e++}return e}(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function g(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(l("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(function(){v(e)}):v(e))}function v(e){l("emit readable"),e.emit("readable"),m(e)}function m(e){var t=e._readableState;if(l("flow",t.flowing),t.flowing)do{var n=e.read()}while(null!==n&&t.flowing)}function w(e,t){var n,r=t.buffer,a=t.length,o=!!t.decoder,s=!!t.objectMode;if(0===r.length)return null;if(0===a)n=null;else if(s)n=r.shift();else if(!e||e>=a)n=o?r.join(""):i.concat(r,a),r.length=0;else{if(e0)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"))}))}f.prototype.read=function(e){l("read",e);var t=this._readableState,n=e;if((!u.isNumber(e)||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return l("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?y(this):g(this),null;if(0===(e=d(e,t))&&t.ended)return 0===t.length&&y(this),null;var r,i=t.needReadable;return l("need readable",i),(0===t.length||t.length-e0?w(e,t):null,u.isNull(r)&&(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),u.isNull(r)||this.emit("data",r),r},f.prototype._read=function(e){this.emit("error",new Error("not implemented"))},f.prototype.pipe=function(e,t){var i=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,l("pipe count=%d opts=%j",o.pipesCount,t);var s=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?c:h;function u(e){l("onunpipe"),e===i&&h()}function c(){l("onend"),e.end()}o.endEmitted?n.nextTick(s):i.once("end",s),e.on("unpipe",u);var f=function(e){return function(){var t=e._readableState;l("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a.listenerCount(e,"data")&&(t.flowing=!0,m(e))}}(i);function h(){l("cleanup"),e.removeListener("close",g),e.removeListener("finish",v),e.removeListener("drain",f),e.removeListener("error",d),e.removeListener("unpipe",u),i.removeListener("end",c),i.removeListener("end",h),i.removeListener("data",p),!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f()}function p(t){l("ondata"),!1===e.write(t)&&(l("false write response, pause",i._readableState.awaitDrain),i._readableState.awaitDrain++,i.pause())}function d(t){l("onerror",t),w(),e.removeListener("error",d),0===a.listenerCount(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",v),w()}function v(){l("onfinish"),e.removeListener("close",g),w()}function w(){l("unpipe"),i.unpipe(e)}return e.on("drain",f),i.on("data",p),e._events&&e._events.error?r(e._events.error)?e._events.error.unshift(d):e._events.error=[d,e._events.error]:e.on("error",d),e.once("close",g),e.once("finish",v),e.emit("pipe",i),o.flowing||(l("pipe resume"),i.resume()),e},f.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;i1){for(var n=[],r=0;r=0;l--)if(c[l]!==f[l])return!1;for(l=c.length-1;l>=0;l--)if(u=c[l],!w(e[u],t[u],n,r))return!1;return!0}(e,t,n,o))}return n?e===t:e==t}function y(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function _(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function b(e,t,n,r){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&v(i,n,"Missing expected exception"+r);var o="string"==typeof r,s=!e&&a.isError(i),u=!e&&i&&!n;if((s&&o&&_(i,n)||u)&&v(i,n,"Got unwanted exception"+r),e&&i&&n&&!_(i,n)||!e&&i)throw i}f.AssertionError=function(e){var t;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=d(g((t=this).actual),128)+" "+t.operator+" "+d(g(t.expected),128),this.generatedMessage=!0);var n=e.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,n);else{var r=new Error;if(r.stack){var i=r.stack,a=p(n),o=i.indexOf("\n"+a);if(o>=0){var s=i.indexOf("\n",o+1);i=i.substring(s+1)}this.stack=i}}},a.inherits(f.AssertionError,Error),f.fail=v,f.ok=m,f.equal=function(e,t,n){e!=t&&v(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&v(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){w(e,t,!1)||v(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){w(e,t,!0)||v(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){w(e,t,!1)&&v(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){w(t,n,!0)&&v(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&v(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&v(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){b(!0,e,t,n)},f.doesNotThrow=function(e,t,n){b(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var x=Object.keys||function(e){var t=[];for(var n in e)o.call(e,n)&&t.push(n);return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":130}],36:[function(e,t,n){(function(t,r){"use strict";var i=e("assert"),a=e("pako/lib/zlib/zstream"),o=e("pako/lib/zlib/deflate.js"),s=e("pako/lib/zlib/inflate.js"),u=e("pako/lib/zlib/constants");for(var l in u)n[l]=u[l];n.NONE=0,n.DEFLATE=1,n.INFLATE=2,n.GZIP=3,n.GUNZIP=4,n.DEFLATERAW=5,n.INFLATERAW=6,n.UNZIP=7;function c(e){if("number"!=typeof e||en.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}c.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,i(this.init_done,"close before init"),i(this.mode<=n.UNZIP),this.mode===n.DEFLATE||this.mode===n.GZIP||this.mode===n.DEFLATERAW?o.deflateEnd(this.strm):this.mode!==n.INFLATE&&this.mode!==n.GUNZIP&&this.mode!==n.INFLATERAW&&this.mode!==n.UNZIP||s.inflateEnd(this.strm),this.mode=n.NONE,this.dictionary=null)},c.prototype.write=function(e,t,n,r,i,a,o){return this._write(!0,e,t,n,r,i,a,o)},c.prototype.writeSync=function(e,t,n,r,i,a,o){return this._write(!1,e,t,n,r,i,a,o)},c.prototype._write=function(e,a,o,s,u,l,c,f){if(i.equal(arguments.length,8),i(this.init_done,"write before init"),i(this.mode!==n.NONE,"already finalized"),i.equal(!1,this.write_in_progress,"write already in progress"),i.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,i.equal(!1,void 0===a,"must provide flush value"),this.write_in_progress=!0,a!==n.Z_NO_FLUSH&&a!==n.Z_PARTIAL_FLUSH&&a!==n.Z_SYNC_FLUSH&&a!==n.Z_FULL_FLUSH&&a!==n.Z_FINISH&&a!==n.Z_BLOCK)throw new Error("Invalid flush value");if(null==o&&(o=r.alloc(0),u=0,s=0),this.strm.avail_in=u,this.strm.input=o,this.strm.next_in=s,this.strm.avail_out=f,this.strm.output=l,this.strm.next_out=c,this.flush=a,!e)return this._process(),this._checkError()?this._afterSync():void 0;var h=this;return t.nextTick(function(){h._process(),h._after()}),this},c.prototype._afterSync=function(){var e=this.strm.avail_out,t=this.strm.avail_in;return this.write_in_progress=!1,[t,e]},c.prototype._process=function(){var e=null;switch(this.mode){case n.DEFLATE:case n.GZIP:case n.DEFLATERAW:this.err=o.deflate(this.strm,this.flush);break;case n.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===e)break;if(31!==this.strm.input[e]){this.mode=n.INFLATE;break}if(this.gzip_id_bytes_read=1,e++,1===this.strm.avail_in)break;case 1:if(null===e)break;139===this.strm.input[e]?(this.gzip_id_bytes_read=2,this.mode=n.GUNZIP):this.mode=n.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case n.INFLATE:case n.GUNZIP:case n.INFLATERAW:for(this.err=s.inflate(this.strm,this.flush),this.err===n.Z_NEED_DICT&&this.dictionary&&(this.err=s.inflateSetDictionary(this.strm,this.dictionary),this.err===n.Z_OK?this.err=s.inflate(this.strm,this.flush):this.err===n.Z_DATA_ERROR&&(this.err=n.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===n.GUNZIP&&this.err===n.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=s.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},c.prototype._checkError=function(){switch(this.err){case n.Z_OK:case n.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===n.Z_FINISH)return this._error("unexpected end of file"),!1;break;case n.Z_STREAM_END:break;case n.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},c.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,t=this.strm.avail_in;this.write_in_progress=!1,this.callback(t,e),this.pending_close&&this.close()}},c.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},c.prototype.init=function(e,t,r,a,o){i(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),i(e>=8&&e<=15,"invalid windowBits"),i(t>=-1&&t<=9,"invalid compression level"),i(r>=1&&r<=9,"invalid memlevel"),i(a===n.Z_FILTERED||a===n.Z_HUFFMAN_ONLY||a===n.Z_RLE||a===n.Z_FIXED||a===n.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(t,e,r,a,o),this._setDictionary()},c.prototype.params=function(){throw new Error("deflateParams Not supported")},c.prototype.reset=function(){this._reset(),this._setDictionary()},c.prototype._init=function(e,t,r,i,u){switch(this.level=e,this.windowBits=t,this.memLevel=r,this.strategy=i,this.flush=n.Z_NO_FLUSH,this.err=n.Z_OK,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=-1*this.windowBits),this.strm=new a,this.mode){case n.DEFLATE:case n.GZIP:case n.DEFLATERAW:this.err=o.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:this.err=s.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==n.Z_OK&&this._error("Init error"),this.dictionary=u,this.write_in_progress=!1,this.init_done=!0},c.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=n.Z_OK,this.mode){case n.DEFLATE:case n.DEFLATERAW:this.err=o.deflateSetDictionary(this.strm,this.dictionary)}this.err!==n.Z_OK&&this._error("Failed to set dictionary")}},c.prototype._reset=function(){switch(this.err=n.Z_OK,this.mode){case n.DEFLATE:case n.DEFLATERAW:case n.GZIP:this.err=o.deflateReset(this.strm);break;case n.INFLATE:case n.INFLATERAW:case n.GUNZIP:this.err=s.inflateReset(this.strm)}this.err!==n.Z_OK&&this._error("Failed to reset stream")},n.Zlib=c}).call(this,e("_process"),e("buffer").Buffer)},{_process:93,assert:35,buffer:4,"pako/lib/zlib/constants":41,"pako/lib/zlib/deflate.js":43,"pako/lib/zlib/inflate.js":45,"pako/lib/zlib/zstream":49}],37:[function(e,t,n){(function(t){"use strict";var r=e("buffer").Buffer,i=e("stream").Transform,a=e("./binding"),o=e("util"),s=e("assert").ok,u=e("buffer").kMaxLength,l="Cannot create final Buffer. It would be larger than 0x"+u.toString(16)+" bytes";a.Z_MIN_WINDOWBITS=8,a.Z_MAX_WINDOWBITS=15,a.Z_DEFAULT_WINDOWBITS=15,a.Z_MIN_CHUNK=64,a.Z_MAX_CHUNK=1/0,a.Z_DEFAULT_CHUNK=16384,a.Z_MIN_MEMLEVEL=1,a.Z_MAX_MEMLEVEL=9,a.Z_DEFAULT_MEMLEVEL=8,a.Z_MIN_LEVEL=-1,a.Z_MAX_LEVEL=9,a.Z_DEFAULT_LEVEL=a.Z_DEFAULT_COMPRESSION;for(var c=Object.keys(a),f=0;f=u?o=new RangeError(l):t=r.concat(i,a),i=[],e.close(),n(o,t)}e.on("error",function(t){e.removeListener("end",s),e.removeListener("readable",o),n(t)}),e.on("end",s),e.end(t),o()}function w(e,t){if("string"==typeof t&&(t=r.from(t)),!r.isBuffer(t))throw new TypeError("Not a string or buffer");var n=e._finishFlushFlag;return e._processChunk(t,n)}function y(e){if(!(this instanceof y))return new y(e);A.call(this,e,a.DEFLATE)}function _(e){if(!(this instanceof _))return new _(e);A.call(this,e,a.INFLATE)}function b(e){if(!(this instanceof b))return new b(e);A.call(this,e,a.GZIP)}function x(e){if(!(this instanceof x))return new x(e);A.call(this,e,a.GUNZIP)}function k(e){if(!(this instanceof k))return new k(e);A.call(this,e,a.DEFLATERAW)}function E(e){if(!(this instanceof E))return new E(e);A.call(this,e,a.INFLATERAW)}function S(e){if(!(this instanceof S))return new S(e);A.call(this,e,a.UNZIP)}function T(e){return e===a.Z_NO_FLUSH||e===a.Z_PARTIAL_FLUSH||e===a.Z_SYNC_FLUSH||e===a.Z_FULL_FLUSH||e===a.Z_FINISH||e===a.Z_BLOCK}function A(e,t){var o=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||n.Z_DEFAULT_CHUNK,i.call(this,e),e.flush&&!T(e.flush))throw new Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!T(e.finishFlush))throw new Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||a.Z_NO_FLUSH,this._finishFlushFlag=void 0!==e.finishFlush?e.finishFlush:a.Z_FINISH,e.chunkSize&&(e.chunkSizen.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBitsn.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.leveln.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLeveln.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._handle=new a.Zlib(t);var s=this;this._hadError=!1,this._handle.onerror=function(e,t){C(s),s._hadError=!0;var r=new Error(e);r.errno=t,r.code=n.codes[t],s.emit("error",r)};var u=n.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(u=e.level);var l=n.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(l=e.strategy),this._handle.init(e.windowBits||n.Z_DEFAULT_WINDOWBITS,u,e.memLevel||n.Z_DEFAULT_MEMLEVEL,l,e.dictionary),this._buffer=r.allocUnsafe(this._chunkSize),this._offset=0,this._level=u,this._strategy=l,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!o._handle},configurable:!0,enumerable:!0})}function C(e,n){n&&t.nextTick(n),e._handle&&(e._handle.close(),e._handle=null)}function j(e){e.emit("close")}Object.defineProperty(n,"codes",{enumerable:!0,value:Object.freeze(p),writable:!1}),n.Deflate=y,n.Inflate=_,n.Gzip=b,n.Gunzip=x,n.DeflateRaw=k,n.InflateRaw=E,n.Unzip=S,n.createDeflate=function(e){return new y(e)},n.createInflate=function(e){return new _(e)},n.createDeflateRaw=function(e){return new k(e)},n.createInflateRaw=function(e){return new E(e)},n.createGzip=function(e){return new b(e)},n.createGunzip=function(e){return new x(e)},n.createUnzip=function(e){return new S(e)},n.deflate=function(e,t,n){return"function"==typeof t&&(n=t,t={}),m(new y(t),e,n)},n.deflateSync=function(e,t){return w(new y(t),e)},n.gzip=function(e,t,n){return"function"==typeof t&&(n=t,t={}),m(new b(t),e,n)},n.gzipSync=function(e,t){return w(new b(t),e)},n.deflateRaw=function(e,t,n){return"function"==typeof t&&(n=t,t={}),m(new k(t),e,n)},n.deflateRawSync=function(e,t){return w(new k(t),e)},n.unzip=function(e,t,n){return"function"==typeof t&&(n=t,t={}),m(new S(t),e,n)},n.unzipSync=function(e,t){return w(new S(t),e)},n.inflate=function(e,t,n){return"function"==typeof t&&(n=t,t={}),m(new _(t),e,n)},n.inflateSync=function(e,t){return w(new _(t),e)},n.gunzip=function(e,t,n){return"function"==typeof t&&(n=t,t={}),m(new x(t),e,n)},n.gunzipSync=function(e,t){return w(new x(t),e)},n.inflateRaw=function(e,t,n){return"function"==typeof t&&(n=t,t={}),m(new E(t),e,n)},n.inflateRawSync=function(e,t){return w(new E(t),e)},o.inherits(A,i),A.prototype.params=function(e,r,i){if(en.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 o=this;this.flush(a.Z_SYNC_FLUSH,function(){s(o._handle,"zlib binding closed"),o._handle.params(e,r),o._hadError||(o._level=e,o._strategy=r,i&&i())})}else t.nextTick(i)},A.prototype.reset=function(){return s(this._handle,"zlib binding closed"),this._handle.reset()},A.prototype._flush=function(e){this._transform(r.alloc(0),"",e)},A.prototype.flush=function(e,n){var i=this,o=this._writableState;("function"==typeof e||void 0===e&&!n)&&(n=e,e=a.Z_FULL_FLUSH),o.ended?n&&t.nextTick(n):o.ending?n&&this.once("end",n):o.needDrain?n&&this.once("drain",function(){return i.flush(e,n)}):(this._flushFlag=e,this.write(r.alloc(0),"",n))},A.prototype.close=function(e){C(this,e),t.nextTick(j,this)},A.prototype._transform=function(e,t,n){var i,o=this._writableState,s=(o.ending||o.ended)&&(!e||o.length===e.length);return null===e||r.isBuffer(e)?this._handle?(s?i=this._finishFlushFlag:(i=this._flushFlag,e.length>=o.length&&(this._flushFlag=this._opts.flush||a.Z_NO_FLUSH)),void this._processChunk(e,i,n)):n(new Error("zlib binding closed")):n(new Error("invalid input"))},A.prototype._processChunk=function(e,t,n){var i=e&&e.length,a=this._chunkSize-this._offset,o=0,c=this,f="function"==typeof n;if(!f){var h,p=[],d=0;this.on("error",function(e){h=e}),s(this._handle,"zlib binding closed");do{var g=this._handle.writeSync(t,e,o,i,this._buffer,this._offset,a)}while(!this._hadError&&w(g[0],g[1]));if(this._hadError)throw h;if(d>=u)throw C(this),new RangeError(l);var v=r.concat(p,d);return C(this),v}s(this._handle,"zlib binding closed");var m=this._handle.write(t,e,o,i,this._buffer,this._offset,a);function w(u,l){if(this&&(this.buffer=null,this.callback=null),!c._hadError){var h=a-l;if(s(h>=0,"have should not go down"),h>0){var g=c._buffer.slice(c._offset,c._offset+h);c._offset+=h,f?c.push(g):(p.push(g),d+=g.length)}if((0===l||c._offset>=c._chunkSize)&&(a=c._chunkSize,c._offset=0,c._buffer=r.allocUnsafe(c._chunkSize)),0===l){if(o+=i-u,i=u,!f)return!0;var v=c._handle.write(t,e,o,i,c._buffer,c._offset,c._chunkSize);return v.callback=w,void(v.buffer=e)}if(!f)return!1;n()}}m.buffer=e,m.callback=w},o.inherits(y,A),o.inherits(_,A),o.inherits(b,A),o.inherits(x,A),o.inherits(k,A),o.inherits(E,A),o.inherits(S,A)}).call(this,e("_process"))},{"./binding":36,_process:93,assert:35,buffer:4,stream:105,util:130}],38:[function(e,t,n){arguments[4][3][0].apply(n,arguments)},{dup:3}],39:[function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}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)i(n,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 a={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>>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}},{}],41:[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}},{}],42:[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>>8^a[255&(e^t[s])];return-1^e}},{}],43:[function(e,t,n){"use strict";var r,i=e("../utils/common"),a=e("./trees"),o=e("./adler32"),s=e("./crc32"),u=e("./messages"),l=0,c=1,f=3,h=4,p=5,d=0,g=1,v=-2,m=-3,w=-5,y=-1,_=1,b=2,x=3,k=4,E=0,S=2,T=8,A=9,C=15,j=8,M=286,I=30,L=19,R=2*M+1,B=15,D=3,N=258,O=N+D+1,F=32,z=42,P=69,U=73,q=91,W=103,H=113,V=666,Z=1,G=2,Y=3,$=4,X=3;function K(e,t){return e.msg=u[t],t}function Q(e){return(e<<1)-(e>4?9:0)}function J(e){for(var t=e.length;--t>=0;)e[t]=0}function ee(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(i.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 te(e,t){a._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ee(e.strm)}function ne(e,t){e.pending_buf[e.pending++]=t}function re(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function ie(e,t){var n,r,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-O?e.strstart-(e.w_size-O):0,l=e.window,c=e.w_mask,f=e.prev,h=e.strstart+N,p=l[a+o-1],d=l[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(l[(n=t)+o]===d&&l[n+o-1]===p&&l[n]===l[a]&&l[++n]===l[a+1]){a+=2,n++;do{}while(l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&ao){if(e.match_start=t,o=r,r>=s)break;p=l[a+o-1],d=l[a+o]}}}while((t=f[t&c])>u&&0!=--i);return o<=e.lookahead?o:e.lookahead}function ae(e){var t,n,r,a,u,l,c,f,h,p,d=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=d+(d-O)){i.arraySet(e.window,e.window,d,d,0),e.match_start-=d,e.strstart-=d,e.block_start-=d,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=d?r-d:0}while(--n);t=n=d;do{r=e.prev[--t],e.prev[t]=r>=d?r-d:0}while(--n);a+=d}if(0===e.strm.avail_in)break;if(l=e.strm,c=e.window,f=e.strstart+e.lookahead,h=a,p=void 0,(p=l.avail_in)>h&&(p=h),n=0===p?0:(l.avail_in-=p,i.arraySet(c,l.input,l.next_in,p,f),1===l.state.wrap?l.adler=o(l.adler,c,p,f):2===l.state.wrap&&(l.adler=s(l.adler,c,p,f)),l.next_in+=p,l.total_in+=p,p),e.lookahead+=n,e.lookahead+e.insert>=D)for(u=e.strstart-e.insert,e.ins_h=e.window[u],e.ins_h=(e.ins_h<=D&&(e.ins_h=(e.ins_h<=D)if(r=a._tr_tally(e,e.strstart-e.match_start,e.match_length-D),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=D){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=D&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=D-1)),e.prev_length>=D&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-D,r=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-D),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<15&&(s=2,r-=16),a<1||a>A||n!==T||r<8||r>15||t<0||t>9||o<0||o>k)return K(e,v);8===r&&(r=9);var u=new function(){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=T,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 i.Buf16(2*R),this.dyn_dtree=new i.Buf16(2*(2*I+1)),this.bl_tree=new i.Buf16(2*(2*L+1)),J(this.dyn_ltree),J(this.dyn_dtree),J(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(B+1),this.heap=new i.Buf16(2*M+1),J(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*M+1),J(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};return e.state=u,u.strm=e,u.wrap=s,u.gzhead=null,u.w_bits=r,u.w_size=1<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ae(e),0===e.lookahead&&t===l)return Z;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,te(e,!1),0===e.strm.avail_out))return Z;if(e.strstart-e.block_start>=e.w_size-O&&(te(e,!1),0===e.strm.avail_out))return Z}return e.insert=0,t===h?(te(e,!0),0===e.strm.avail_out?Y:$):(e.strstart>e.block_start&&(te(e,!1),e.strm.avail_out),Z)}),new ue(4,4,8,4,oe),new ue(4,5,16,8,oe),new ue(4,6,32,32,oe),new ue(4,4,16,16,se),new ue(8,16,32,32,se),new ue(8,16,128,128,se),new ue(8,32,128,256,se),new ue(32,128,258,1024,se),new ue(32,258,258,4096,se)],n.deflateInit=function(e,t){return fe(e,t,T,C,j,E)},n.deflateInit2=fe,n.deflateReset=ce,n.deflateResetKeep=le,n.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?v:(e.state.gzhead=t,d):v},n.deflate=function(e,t){var n,i,o,u;if(!e||!e.state||t>p||t<0)return e?K(e,v):v;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===V&&t!==h)return K(e,0===e.avail_out?w:v);if(i.strm=e,n=i.last_flush,i.last_flush=t,i.status===z)if(2===i.wrap)e.adler=0,ne(i,31),ne(i,139),ne(i,8),i.gzhead?(ne(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),ne(i,255&i.gzhead.time),ne(i,i.gzhead.time>>8&255),ne(i,i.gzhead.time>>16&255),ne(i,i.gzhead.time>>24&255),ne(i,9===i.level?2:i.strategy>=b||i.level<2?4:0),ne(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(ne(i,255&i.gzhead.extra.length),ne(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=P):(ne(i,0),ne(i,0),ne(i,0),ne(i,0),ne(i,0),ne(i,9===i.level?2:i.strategy>=b||i.level<2?4:0),ne(i,X),i.status=H);else{var m=T+(i.w_bits-8<<4)<<8;m|=(i.strategy>=b||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(m|=F),m+=31-m%31,i.status=H,re(i,m),0!==i.strstart&&(re(i,e.adler>>>16),re(i,65535&e.adler)),e.adler=1}if(i.status===P)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),ee(e),o=i.pending,i.pending!==i.pending_buf_size));)ne(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=U)}else i.status=U;if(i.status===U)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),ee(e),o=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),0===u&&(i.gzindex=0,i.status=q)}else i.status=q;if(i.status===q)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),ee(e),o=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),0===u&&(i.status=W)}else i.status=W;if(i.status===W&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&ee(e),i.pending+2<=i.pending_buf_size&&(ne(i,255&e.adler),ne(i,e.adler>>8&255),e.adler=0,i.status=H)):i.status=H),0!==i.pending){if(ee(e),0===e.avail_out)return i.last_flush=-1,d}else if(0===e.avail_in&&Q(t)<=Q(n)&&t!==h)return K(e,w);if(i.status===V&&0!==e.avail_in)return K(e,w);if(0!==e.avail_in||0!==i.lookahead||t!==l&&i.status!==V){var y=i.strategy===b?function(e,t){for(var n;;){if(0===e.lookahead&&(ae(e),0===e.lookahead)){if(t===l)return Z;break}if(e.match_length=0,n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(te(e,!1),0===e.strm.avail_out))return Z}return e.insert=0,t===h?(te(e,!0),0===e.strm.avail_out?Y:$):e.last_lit&&(te(e,!1),0===e.strm.avail_out)?Z:G}(i,t):i.strategy===x?function(e,t){for(var n,r,i,o,s=e.window;;){if(e.lookahead<=N){if(ae(e),e.lookahead<=N&&t===l)return Z;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=D&&e.strstart>0&&(r=s[i=e.strstart-1])===s[++i]&&r===s[++i]&&r===s[++i]){o=e.strstart+N;do{}while(r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=D?(n=a._tr_tally(e,1,e.match_length-D),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(te(e,!1),0===e.strm.avail_out))return Z}return e.insert=0,t===h?(te(e,!0),0===e.strm.avail_out?Y:$):e.last_lit&&(te(e,!1),0===e.strm.avail_out)?Z:G}(i,t):r[i.level].func(i,t);if(y!==Y&&y!==$||(i.status=V),y===Z||y===Y)return 0===e.avail_out&&(i.last_flush=-1),d;if(y===G&&(t===c?a._tr_align(i):t!==p&&(a._tr_stored_block(i,0,0,!1),t===f&&(J(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),ee(e),0===e.avail_out))return i.last_flush=-1,d}return t!==h?d:i.wrap<=0?g:(2===i.wrap?(ne(i,255&e.adler),ne(i,e.adler>>8&255),ne(i,e.adler>>16&255),ne(i,e.adler>>24&255),ne(i,255&e.total_in),ne(i,e.total_in>>8&255),ne(i,e.total_in>>16&255),ne(i,e.total_in>>24&255)):(re(i,e.adler>>>16),re(i,65535&e.adler)),ee(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?d:g)},n.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==z&&t!==P&&t!==U&&t!==q&&t!==W&&t!==H&&t!==V?K(e,v):(e.state=null,t===H?K(e,m):d):v},n.deflateSetDictionary=function(e,t){var n,r,a,s,u,l,c,f,h=t.length;if(!e||!e.state)return v;if(2===(s=(n=e.state).wrap)||1===s&&n.status!==z||n.lookahead)return v;for(1===s&&(e.adler=o(e.adler,t,h,0)),n.wrap=0,h>=n.w_size&&(0===s&&(J(n.head),n.strstart=0,n.block_start=0,n.insert=0),f=new i.Buf8(n.w_size),i.arraySet(f,t,h-n.w_size,n.w_size,0),t=f,h=n.w_size),u=e.avail_in,l=e.next_in,c=e.input,e.avail_in=h,e.next_in=0,e.input=t,ae(n);n.lookahead>=D;){r=n.strstart,a=n.lookahead-(D-1);do{n.ins_h=(n.ins_h<>>=_=y>>>24,d-=_,0===(_=y>>>16&255))T[a++]=65535&y;else{if(!(16&_)){if(0==(64&_)){y=g[(65535&y)+(p&(1<<_)-1)];continue t}if(32&_){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}b=65535&y,(_&=15)&&(d<_&&(p+=S[r++]<>>=_,d-=_),d<15&&(p+=S[r++]<>>=_=y>>>24,d-=_,!(16&(_=y>>>16&255))){if(0==(64&_)){y=v[(65535&y)+(p&(1<<_)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(x=65535&y,d<(_&=15)&&(p+=S[r++]<u){e.msg="invalid distance too far back",n.mode=30;break e}if(p>>>=_,d-=_,x>(_=a-o)){if((_=x-_)>c&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(k=0,E=h,0===f){if(k+=l-_,_2;)T[a++]=E[k++],T[a++]=E[k++],T[a++]=E[k++],b-=3;b&&(T[a++]=E[k++],b>1&&(T[a++]=E[k++]))}else{k=a-x;do{T[a++]=T[k++],T[a++]=T[k++],T[a++]=T[k++],b-=3}while(b>2);b&&(T[a++]=T[k++],b>1&&(T[a++]=T[k++]))}break}}break}}while(r>3,p&=(1<<(d-=b<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function ie(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=x,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(ee),t.distcode=t.distdyn=new r.Buf32(te),t.sane=1,t.back=-1,d):m}function ae(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,ie(e)):m}function oe(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)?m:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,ae(e))):m}function se(e,t){var n,i;return e?(i=new function(){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 r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0},e.state=i,i.window=null,(n=oe(e,t))!==d&&(e.state=null),n):m}var ue,le,ce=!0;function fe(e){if(ce){var t;for(ue=new r.Buf32(512),le=new r.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(s(l,e.lens,0,288,ue,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(c,e.lens,0,32,le,0,e.work,{bits:5}),ce=!1}e.lencode=ue,e.lenbits=9,e.distcode=le,e.distbits=5}function he(e,t,n,i){var a,o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(r.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((a=o.wsize-o.wnext)>i&&(a=i),r.arraySet(o.window,t,n-i,a,o.wnext),(i-=a)?(r.arraySet(o.window,t,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=a(n.check,Ae,2,0),se=0,ue=0,n.mode=k;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&se)<<8)+(se>>8))%31){e.msg="incorrect header check",n.mode=K;break}if((15&se)!==b){e.msg="unknown compression method",n.mode=K;break}if(ue-=4,xe=8+(15&(se>>>=4)),0===n.wbits)n.wbits=xe;else if(xe>n.wbits){e.msg="invalid window size",n.mode=K;break}n.dmax=1<>8&1),512&n.flags&&(Ae[0]=255&se,Ae[1]=se>>>8&255,n.check=a(n.check,Ae,2,0)),se=0,ue=0,n.mode=E;case E:for(;ue<32;){if(0===ae)break e;ae--,se+=ee[ne++]<>>8&255,Ae[2]=se>>>16&255,Ae[3]=se>>>24&255,n.check=a(n.check,Ae,4,0)),se=0,ue=0,n.mode=S;case S:for(;ue<16;){if(0===ae)break e;ae--,se+=ee[ne++]<>8),512&n.flags&&(Ae[0]=255&se,Ae[1]=se>>>8&255,n.check=a(n.check,Ae,2,0)),se=0,ue=0,n.mode=T;case T:if(1024&n.flags){for(;ue<16;){if(0===ae)break e;ae--,se+=ee[ne++]<>>8&255,n.check=a(n.check,Ae,2,0)),se=0,ue=0}else n.head&&(n.head.extra=null);n.mode=A;case A:if(1024&n.flags&&((pe=n.length)>ae&&(pe=ae),pe&&(n.head&&(xe=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,ee,ne,pe,xe)),512&n.flags&&(n.check=a(n.check,ee,pe,ne)),ae-=pe,ne+=pe,n.length-=pe),n.length))break e;n.length=0,n.mode=C;case C:if(2048&n.flags){if(0===ae)break e;pe=0;do{xe=ee[ne+pe++],n.head&&xe&&n.length<65536&&(n.head.name+=String.fromCharCode(xe))}while(xe&&pe>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=R;break;case I:for(;ue<32;){if(0===ae)break e;ae--,se+=ee[ne++]<>>=7&ue,ue-=7&ue,n.mode=Y;break}for(;ue<3;){if(0===ae)break e;ae--,se+=ee[ne++]<>>=1)){case 0:n.mode=D;break;case 1:if(fe(n),n.mode=U,t===p){se>>>=2,ue-=2;break e}break;case 2:n.mode=F;break;case 3:e.msg="invalid block type",n.mode=K}se>>>=2,ue-=2;break;case D:for(se>>>=7&ue,ue-=7&ue;ue<32;){if(0===ae)break e;ae--,se+=ee[ne++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=K;break}if(n.length=65535&se,se=0,ue=0,n.mode=N,t===p)break e;case N:n.mode=O;case O:if(pe=n.length){if(pe>ae&&(pe=ae),pe>oe&&(pe=oe),0===pe)break e;r.arraySet(te,ee,ne,pe,ie),ae-=pe,ne+=pe,oe-=pe,ie+=pe,n.length-=pe;break}n.mode=R;break;case F:for(;ue<14;){if(0===ae)break e;ae--,se+=ee[ne++]<>>=5,ue-=5,n.ndist=1+(31&se),se>>>=5,ue-=5,n.ncode=4+(15&se),se>>>=4,ue-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=K;break}n.have=0,n.mode=z;case z:for(;n.have>>=3,ue-=3}for(;n.have<19;)n.lens[Ce[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,Ee={bits:n.lenbits},ke=s(u,n.lens,0,19,n.lencode,0,n.work,Ee),n.lenbits=Ee.bits,ke){e.msg="invalid code lengths set",n.mode=K;break}n.have=0,n.mode=P;case P:for(;n.have>>16&255,we=65535&Te,!((ve=Te>>>24)<=ue);){if(0===ae)break e;ae--,se+=ee[ne++]<>>=ve,ue-=ve,n.lens[n.have++]=we;else{if(16===we){for(Se=ve+2;ue>>=ve,ue-=ve,0===n.have){e.msg="invalid bit length repeat",n.mode=K;break}xe=n.lens[n.have-1],pe=3+(3&se),se>>>=2,ue-=2}else if(17===we){for(Se=ve+3;ue>>=ve)),se>>>=3,ue-=3}else{for(Se=ve+7;ue>>=ve)),se>>>=7,ue-=7}if(n.have+pe>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=K;break}for(;pe--;)n.lens[n.have++]=xe}}if(n.mode===K)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=K;break}if(n.lenbits=9,Ee={bits:n.lenbits},ke=s(l,n.lens,0,n.nlen,n.lencode,0,n.work,Ee),n.lenbits=Ee.bits,ke){e.msg="invalid literal/lengths set",n.mode=K;break}if(n.distbits=6,n.distcode=n.distdyn,Ee={bits:n.distbits},ke=s(c,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,Ee),n.distbits=Ee.bits,ke){e.msg="invalid distances set",n.mode=K;break}if(n.mode=U,t===p)break e;case U:n.mode=q;case q:if(ae>=6&&oe>=258){e.next_out=ie,e.avail_out=oe,e.next_in=ne,e.avail_in=ae,n.hold=se,n.bits=ue,o(e,ce),ie=e.next_out,te=e.output,oe=e.avail_out,ne=e.next_in,ee=e.input,ae=e.avail_in,se=n.hold,ue=n.bits,n.mode===R&&(n.back=-1);break}for(n.back=0;me=(Te=n.lencode[se&(1<>>16&255,we=65535&Te,!((ve=Te>>>24)<=ue);){if(0===ae)break e;ae--,se+=ee[ne++]<>ye)])>>>16&255,we=65535&Te,!(ye+(ve=Te>>>24)<=ue);){if(0===ae)break e;ae--,se+=ee[ne++]<>>=ye,ue-=ye,n.back+=ye}if(se>>>=ve,ue-=ve,n.back+=ve,n.length=we,0===me){n.mode=G;break}if(32&me){n.back=-1,n.mode=R;break}if(64&me){e.msg="invalid literal/length code",n.mode=K;break}n.extra=15&me,n.mode=W;case W:if(n.extra){for(Se=n.extra;ue>>=n.extra,ue-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=H;case H:for(;me=(Te=n.distcode[se&(1<>>16&255,we=65535&Te,!((ve=Te>>>24)<=ue);){if(0===ae)break e;ae--,se+=ee[ne++]<>ye)])>>>16&255,we=65535&Te,!(ye+(ve=Te>>>24)<=ue);){if(0===ae)break e;ae--,se+=ee[ne++]<>>=ye,ue-=ye,n.back+=ye}if(se>>>=ve,ue-=ve,n.back+=ve,64&me){e.msg="invalid distance code",n.mode=K;break}n.offset=we,n.extra=15&me,n.mode=V;case V:if(n.extra){for(Se=n.extra;ue>>=n.extra,ue-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=K;break}n.mode=Z;case Z:if(0===oe)break e;if(pe=ce-oe,n.offset>pe){if((pe=n.offset-pe)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=K;break}pe>n.wnext?(pe-=n.wnext,de=n.wsize-pe):de=n.wnext-pe,pe>n.length&&(pe=n.length),ge=n.window}else ge=te,de=ie-n.offset,pe=n.length;pe>oe&&(pe=oe),oe-=pe,n.length-=pe;do{te[ie++]=ge[de++]}while(--pe);0===n.length&&(n.mode=q);break;case G:if(0===oe)break e;te[ie++]=n.length,oe--,n.mode=q;break;case Y:if(n.wrap){for(;ue<32;){if(0===ae)break e;ae--,se|=ee[ne++]<=1&&0===D[T];T--);if(A>T&&(A=T),0===T)return l[c++]=20971520,l[c++]=20971520,h.bits=1,0;for(S=1;S0&&(0===e||1!==T))return-1;for(N[1]=0,k=1;k<15;k++)N[k+1]=N[k]+D[k];for(E=0;E852||2===e&&I>592)return 1;for(;;){y=k-j,f[E]w?(_=O[F+f[E]],b=R[B+f[E]]):(_=96,b=0),p=1<>j)+(d-=p)]=y<<24|_<<16|b|0}while(0!==d);for(p=1<>=1;if(0!==p?(L&=p-1,L+=p):L=0,E++,0==--D[k]){if(k===T)break;k=t[n+f[E]]}if(k>A&&(L&v)!==g){for(0===j&&(j=A),m+=S,M=1<<(C=k-j);C+j852||2===e&&I>592)return 1;l[g=L&v]=A<<24|C<<16|m-c|0}}return 0!==L&&(l[m+L]=k-j<<24|64<<16|0),h.bits=A,0}},{"../utils/common":39}],47:[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"}},{}],48:[function(e,t,n){"use strict";var r=e("../utils/common"),i=4,a=0,o=1,s=2;function u(e){for(var t=e.length;--t>=0;)e[t]=0}var l=0,c=1,f=2,h=29,p=256,d=p+1+h,g=30,v=19,m=2*d+1,w=15,y=16,_=7,b=256,x=16,k=17,E=18,S=[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],T=[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],A=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],C=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],j=new Array(2*(d+2));u(j);var M=new Array(2*g);u(M);var I=new Array(512);u(I);var L=new Array(256);u(L);var R=new Array(h);u(R);var B,D,N,O=new Array(g);function F(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 z(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function P(e){return e<256?I[e]:I[256+(e>>>7)]}function U(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function q(e,t,n){e.bi_valid>y-n?(e.bi_buf|=t<>y-e.bi_valid,e.bi_valid+=n-y):(e.bi_buf|=t<>>=1,n<<=1}while(--t>0);return n>>>1}function V(e,t,n){var r,i,a=new Array(w+1),o=0;for(r=1;r<=w;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]=H(a[s]++,s))}}function Z(e){var t;for(t=0;t8?U(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 Y(e,t,n,r){var i=2*t,a=2*n;return e[i]>1;n>=1;n--)$(e,a,n);i=u;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],$(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++,$(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,a,o,s,u=t.dyn_tree,l=t.max_code,c=t.stat_desc.static_tree,f=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,d=t.stat_desc.max_length,g=0;for(a=0;a<=w;a++)e.bl_count[a]=0;for(u[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;nd&&(a=d,g++),u[2*r+1]=a,r>l||(e.bl_count[a]++,o=0,r>=p&&(o=h[r-p]),s=u[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])>l||(u[2*i+1]!==a&&(e.opt_len+=(a-u[2*i+1])*u[2*i],u[2*i+1]=a),r--)}}(e,t),V(a,l,e.bl_count)}function Q(e,t,n){var r,i,a=-1,o=t[1],s=0,u=7,l=4;for(0===o&&(u=138,l=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=o,o=t[2*(r+1)+1],++s>=7;r0?(e.strm.data_type===s&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return a;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return o;for(t=32;t=3&&0===e.bl_tree[2*C[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),u=e.opt_len+3+7>>>3,(l=e.static_len+3+7>>>3)<=u&&(u=l)):u=l=n+5,n+4<=u&&-1!==t?te(e,t,n,r):e.strategy===i||l===u?(q(e,(c<<1)+(r?1:0),3),X(e,j,M)):(q(e,(f<<1)+(r?1:0),3),function(e,t,n,r){var i;for(q(e,t-257,5),q(e,n-1,5),q(e,r-4,4),i=0;i>>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*(L[n]+p+1)]++,e.dyn_dtree[2*P(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){q(e,c<<1,3),W(e,b,j),function(e){16===e.bi_valid?(U(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)}(e)}},{"../utils/common":39}],49:[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}},{}],50:[function(e,t,n){n.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,u=(1<>1,c=-7,f=n?i-1:0,h=n?-1:1,p=e[t+f];for(f+=h,a=p&(1<<-c)-1,p>>=-c,c+=s;c>0;a=256*a+e[t+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=256*o+e[t+f],f+=h,c-=8);if(0===a)a=1-l;else{if(a===u)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,r),a-=l}return(p?-1:1)*o*Math.pow(2,a-r)},n.write=function(e,t,n,r,i,a){var o,s,u,l=8*a-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=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*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(o++,u/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*u-1)*Math.pow(2,i),o+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[n+p]=255&s,p+=d,s/=256,i-=8);for(o=o<0;e[n+p]=255&o,p+=d,o/=256,l-=8);e[n+p-d]|=128*g}},{}],51:[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}},{}],52:[function(e,t,n){"use strict";t.exports=function(e){for(var t=new Array(e),n=0;n0&&t-1 in e)}h.fn=h.prototype={jquery:"2.2.4",constructor:h,selector:"",length:0,toArray:function(){return i.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:i.call(this)},pushStack:function(e){var t=h.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e){return h.each(this,e)},map:function(e){return this.pushStack(h.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(i.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=0},isPlainObject:function(e){var t;if("object"!==h.type(e)||e.nodeType||h.isWindow(e))return!1;if(e.constructor&&!c.call(e,"constructor")&&!c.call(e.constructor.prototype||{},"isPrototypeOf"))return!1;for(t in e);return void 0===t||c.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?u[l.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;(e=h.trim(e))&&(1===e.indexOf("use strict")?((t=r.createElement("script")).text=e,r.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(d,"ms-").replace(g,v)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,r=0;if(m(e))for(n=e.length;r+~]|"+O+")"+O+"*"),V=new RegExp("="+O+"*([^\\]'\"]*?)"+O+"*\\]","g"),Z=new RegExp(P),G=new RegExp("^"+F+"$"),Y={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+z),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),bool:new RegExp("^(?:"+N+")$","i"),needsContext:new RegExp("^"+O+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)","i")},$=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/[+~]/,ee=/'|\\/g,te=new RegExp("\\\\([\\da-f]{1,6}"+O+"?|("+O+")|.)","ig"),ne=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)},re=function(){h()};try{R.apply(M=B.call(b.childNodes),b.childNodes),M[b.childNodes.length].nodeType}catch(e){R={apply:M.length?function(e,t){L.apply(e,B.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function ie(e,t,r,i){var a,s,l,c,f,d,m,w,x=t&&t.ownerDocument,k=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==k&&9!==k&&11!==k)return r;if(!i&&((t?t.ownerDocument||t:b)!==p&&h(t),t=t||p,g)){if(11!==k&&(d=Q.exec(e)))if(a=d[1]){if(9===k){if(!(l=t.getElementById(a)))return r;if(l.id===a)return r.push(l),r}else if(x&&(l=x.getElementById(a))&&y(t,l)&&l.id===a)return r.push(l),r}else{if(d[2])return R.apply(r,t.getElementsByTagName(e)),r;if((a=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return R.apply(r,t.getElementsByClassName(a)),r}if(n.qsa&&!T[e+" "]&&(!v||!v.test(e))){if(1!==k)x=t,w=e;else if("object"!==t.nodeName.toLowerCase()){for((c=t.getAttribute("id"))?c=c.replace(ee,"\\$&"):t.setAttribute("id",c=_),s=(m=o(e)).length,f=G.test(c)?"#"+c:"[id='"+c+"']";s--;)m[s]=f+" "+ge(m[s]);w=m.join(","),x=J.test(e)&&pe(t.parentNode)||t}if(w)try{return R.apply(r,x.querySelectorAll(w)),r}catch(e){}finally{c===_&&t.removeAttribute("id")}}}return u(e.replace(q,"$1"),t,r,i)}function ae(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function oe(e){return e[_]=!0,e}function se(e){var t=p.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ue(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function le(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||C)-(~e.sourceIndex||C);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function ce(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function fe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function he(e){return oe(function(t){return t=+t,oe(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 pe(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=ie.support={},a=ie.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},h=ie.setDocument=function(e){var t,i,o=e?e.ownerDocument||e:b;return o!==p&&9===o.nodeType&&o.documentElement?(d=(p=o).documentElement,g=!a(p),(i=p.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=se(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=se(function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=K.test(p.getElementsByClassName),n.getById=se(function(e){return d.appendChild(e).id=_,!p.getElementsByName||!p.getElementsByName(_).length}),n.getById?(r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}},r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}}):(delete r.find.ID,r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.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},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},m=[],v=[],(n.qsa=K.test(p.querySelectorAll))&&(se(function(e){d.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+O+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+O+"*(?:value|"+N+")"),e.querySelectorAll("[id~="+_+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+_+"+*").length||v.push(".#.+[+~]")}),se(function(e){var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+O+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(n.matchesSelector=K.test(w=d.matches||d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&se(function(e){n.disconnectedMatch=w.call(e,"div"),w.call(e,"[s!='']:x"),m.push("!=",P)}),v=v.length&&new RegExp(v.join("|")),m=m.length&&new RegExp(m.join("|")),t=K.test(d.compareDocumentPosition),y=t||K.test(d.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},A=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===p||e.ownerDocument===b&&y(b,e)?-1:t===p||t.ownerDocument===b&&y(b,t)?1:c?D(c,e)-D(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,a=t.parentNode,o=[e],s=[t];if(!i||!a)return e===p?-1:t===p?1:i?-1:a?1:c?D(c,e)-D(c,t):0;if(i===a)return le(e,t);for(n=e;n=n.parentNode;)o.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;o[r]===s[r];)r++;return r?le(o[r],s[r]):o[r]===b?-1:s[r]===b?1:0},p):p},ie.matches=function(e,t){return ie(e,null,null,t)},ie.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&h(e),t=t.replace(V,"='$1']"),n.matchesSelector&&g&&!T[t+" "]&&(!m||!m.test(t))&&(!v||!v.test(t)))try{var r=w.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return ie(t,p,null,[e]).length>0},ie.contains=function(e,t){return(e.ownerDocument||e)!==p&&h(e),y(e,t)},ie.attr=function(e,t){(e.ownerDocument||e)!==p&&h(e);var i=r.attrHandle[t.toLowerCase()],a=i&&j.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==a?a:n.attributes||!g?e.getAttribute(t):(a=e.getAttributeNode(t))&&a.specified?a.value:null},ie.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ie.uniqueSort=function(e){var t,r=[],i=0,a=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(A),f){for(;t=e[a++];)t===e[a]&&(i=r.push(a));for(;i--;)e.splice(r[i],1)}return c=null,e},i=ie.getText=function(e){var t,n="",r=0,a=e.nodeType;if(a){if(1===a||9===a||11===a){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===a||4===a)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=ie.selectors={cacheLength:50,createPseudo:oe,match:Y,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(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===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]||ie.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]&&ie.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Y.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&Z.test(n)&&(t=o(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(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&E(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=ie.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(U," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},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,u){var l,c,f,h,p,d,g=a!==o?"nextSibling":"previousSibling",v=t.parentNode,m=s&&t.nodeName.toLowerCase(),w=!u&&!s,y=!1;if(v){if(a){for(;g;){for(h=t;h=h[g];)if(s?h.nodeName.toLowerCase()===m:1===h.nodeType)return!1;d=g="only"===e&&!d&&"nextSibling"}return!0}if(d=[o?v.firstChild:v.lastChild],o&&w){for(y=(p=(l=(c=(f=(h=v)[_]||(h[_]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]||[])[0]===x&&l[1])&&l[2],h=p&&v.childNodes[p];h=++p&&h&&h[g]||(y=p=0)||d.pop();)if(1===h.nodeType&&++y&&h===t){c[e]=[x,p,y];break}}else if(w&&(y=p=(l=(c=(f=(h=t)[_]||(h[_]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]||[])[0]===x&&l[1]),!1===y)for(;(h=++p&&h&&h[g]||(y=p=0)||d.pop())&&((s?h.nodeName.toLowerCase()!==m:1!==h.nodeType)||!++y||(w&&((c=(f=h[_]||(h[_]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]=[x,y]),h!==t)););return(y-=i)===r||y%r==0&&y/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||ie.error("unsupported pseudo: "+e);return i[_]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?oe(function(e,n){for(var r,a=i(e,t),o=a.length;o--;)e[r=D(e,a[o])]=!(n[r]=a[o])}):function(e){return i(e,0,n)}):i}},pseudos:{not:oe(function(e){var t=[],n=[],r=s(e.replace(q,"$1"));return r[_]?oe(function(e,t,n,i){for(var a,o=r(e,null,i,[]),s=e.length;s--;)(a=o[s])&&(e[s]=!(t[s]=a))}):function(e,i,a){return t[0]=e,r(t,null,a,n),t[0]=null,!n.pop()}}),has:oe(function(e){return function(t){return ie(e,t).length>0}}),contains:oe(function(e){return e=e.replace(te,ne),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:oe(function(e){return G.test(e||"")||ie.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=g?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===d},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.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!r.pseudos.empty(e)},header:function(e){return X.test(e.nodeName)},input:function(e){return $.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:he(function(){return[0]}),last:he(function(e,t){return[t-1]}),eq:he(function(e,t,n){return[n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:he(function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function we(e,t,n,r,i){for(var a,o=[],s=0,u=e.length,l=null!=t;s-1&&(a[l]=!(o[l]=f))}}else m=we(m===o?m.splice(d,m.length):m),i?i(null,o,m,u):R.apply(o,m)})}function _e(e){for(var t,n,i,a=e.length,o=r.relative[e[0].type],s=o||r.relative[" "],u=o?1:0,c=ve(function(e){return e===t},s,!0),f=ve(function(e){return D(t,e)>-1},s,!0),h=[function(e,n,r){var i=!o&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u1&&me(h),u>1&&ge(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(q,"$1"),n,u0,i=e.length>0,a=function(a,o,s,u,c){var f,d,v,m=0,w="0",y=a&&[],_=[],b=l,k=a||i&&r.find.TAG("*",c),E=x+=null==b?1:Math.random()||.1,S=k.length;for(c&&(l=o===p||o||c);w!==S&&null!=(f=k[w]);w++){if(i&&f){for(d=0,o||f.ownerDocument===p||(h(f),s=!g);v=e[d++];)if(v(f,o||p,s)){u.push(f);break}c&&(x=E)}n&&((f=!v&&f)&&m--,a&&y.push(f))}if(m+=w,n&&w!==m){for(d=0;v=t[d++];)v(y,_,o,s);if(a){if(m>0)for(;w--;)y[w]||_[w]||(_[w]=I.call(u));_=we(_)}R.apply(u,_),c&&!a&&_.length>0&&m+t.length>1&&ie.uniqueSort(u)}return c&&(x=E,l=b),y};return n?oe(a):a}(a,i))).selector=e}return s},u=ie.select=function(e,t,i,a){var u,l,c,f,h,p="function"==typeof e&&e,d=!a&&o(e=p.selector||e);if(i=i||[],1===d.length){if((l=d[0]=d[0].slice(0)).length>2&&"ID"===(c=l[0]).type&&n.getById&&9===t.nodeType&&g&&r.relative[l[1].type]){if(!(t=(r.find.ID(c.matches[0].replace(te,ne),t)||[])[0]))return i;p&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(u=Y.needsContext.test(e)?0:l.length;u--&&(c=l[u],!r.relative[f=c.type]);)if((h=r.find[f])&&(a=h(c.matches[0].replace(te,ne),J.test(l[0].type)&&pe(t.parentNode)||t))){if(l.splice(u,1),!(e=a.length&&ge(l)))return R.apply(i,a),i;break}}return(p||s(e,d))(a,t,!g,i,!t||J.test(e)&&pe(t.parentNode)||t),i},n.sortStable=_.split("").sort(A).join("")===_,n.detectDuplicates=!!f,h(),n.sortDetached=se(function(e){return 1&e.compareDocumentPosition(p.createElement("div"))}),se(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||ue("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&se(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ue("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),se(function(e){return null==e.getAttribute("disabled")})||ue(N,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),ie}(e);h.find=w,h.expr=w.selectors,h.expr[":"]=h.expr.pseudos,h.uniqueSort=h.unique=w.uniqueSort,h.text=w.getText,h.isXMLDoc=w.isXML,h.contains=w.contains;var y=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&h(e).is(n))break;r.push(e)}return r},_=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},b=h.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,k=/^.[^:#\[\.,]*$/;function E(e,t,n){if(h.isFunction(t))return h.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return h.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(k.test(t))return h.filter(t,e,n);t=h.filter(t,e)}return h.grep(e,function(e){return s.call(t,e)>-1!==n})}h.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?h.find.matchesSelector(r,e)?[r]:[]:h.find.matches(e,h.grep(t,function(e){return 1===e.nodeType}))},h.fn.extend({find:function(e){var t,n=this.length,r=[],i=this;if("string"!=typeof e)return this.pushStack(h(e).filter(function(){for(t=0;t1?h.unique(r):r)).selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(E(this,e||[],!1))},not:function(e){return this.pushStack(E(this,e||[],!0))},is:function(e){return!!E(this,"string"==typeof e&&b.test(e)?h(e):e||[],!1).length}});var S,T=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(h.fn.init=function(e,t,n){var i,a;if(!e)return this;if(n=n||S,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:T.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof h?t[0]:t,h.merge(this,h.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),x.test(i[1])&&h.isPlainObject(t))for(i in t)h.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(a=r.getElementById(i[2]))&&a.parentNode&&(this.length=1,this[0]=a),this.context=r,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):h.isFunction(e)?void 0!==n.ready?n.ready(e):e(h):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),h.makeArray(e,this))}).prototype=h.fn,S=h(r);var A=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};function j(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}h.fn.extend({has:function(e){var t=h(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&h.find.matchesSelector(n,e))){a.push(n);break}return this.pushStack(a.length>1?h.uniqueSort(a):a)},index:function(e){return e?"string"==typeof e?s.call(h(e),this[0]):s.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(h.uniqueSort(h.merge(this.get(),h(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),h.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return y(e,"parentNode")},parentsUntil:function(e,t,n){return y(e,"parentNode",n)},next:function(e){return j(e,"nextSibling")},prev:function(e){return j(e,"previousSibling")},nextAll:function(e){return y(e,"nextSibling")},prevAll:function(e){return y(e,"previousSibling")},nextUntil:function(e,t,n){return y(e,"nextSibling",n)},prevUntil:function(e,t,n){return y(e,"previousSibling",n)},siblings:function(e){return _((e.parentNode||{}).firstChild,e)},children:function(e){return _(e.firstChild)},contents:function(e){return e.contentDocument||h.merge([],e.childNodes)}},function(e,t){h.fn[e]=function(n,r){var i=h.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=h.filter(r,i)),this.length>1&&(C[e]||h.uniqueSort(i),A.test(e)&&i.reverse()),this.pushStack(i)}});var M,I=/\S+/g;function L(){r.removeEventListener("DOMContentLoaded",L),e.removeEventListener("load",L),h.ready()}h.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return h.each(e.match(I)||[],function(e,n){t[n]=!0}),t}(e):h.extend({},e);var t,n,r,i,a=[],o=[],s=-1,u=function(){for(i=e.once,r=t=!0;o.length;s=-1)for(n=o.shift();++s-1;)a.splice(n,1),n<=s&&s--}),this},has:function(e){return e?h.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=o=[],a=n="",this},disabled:function(){return!a},lock:function(){return i=o=[],n||(a=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],o.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},h.extend({Deferred:function(e){var t=[["resolve","done",h.Callbacks("once memory"),"resolved"],["reject","fail",h.Callbacks("once memory"),"rejected"],["notify","progress",h.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return h.Deferred(function(n){h.each(t,function(t,a){var o=h.isFunction(e[t])&&e[t];i[a[1]](function(){var e=o&&o.apply(this,arguments);e&&h.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?h.extend(e,r):r}},i={};return r.pipe=r.then,h.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,a=0,o=i.call(arguments),s=o.length,u=1!==s||e&&h.isFunction(e.promise)?s:0,l=1===u?e:h.Deferred(),c=function(e,n,r){return function(a){n[e]=this,r[e]=arguments.length>1?i.call(arguments):a,r===t?l.notifyWith(n,r):--u||l.resolveWith(n,r)}};if(s>1)for(t=new Array(s),n=new Array(s),r=new Array(s);a0||(M.resolveWith(r,[h]),h.fn.triggerHandler&&(h(r).triggerHandler("ready"),h(r).off("ready"))))}}),h.ready.promise=function(t){return M||(M=h.Deferred(),"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?e.setTimeout(h.ready):(r.addEventListener("DOMContentLoaded",L),e.addEventListener("load",L))),M.promise(t)},h.ready.promise();var R=function(e,t,n,r,i,a,o){var s=0,u=e.length,l=null==n;if("object"===h.type(n))for(s in i=!0,n)R(e,t,s,n[s],!0,a,o);else if(void 0!==r&&(i=!0,h.isFunction(r)||(o=!0),l&&(o?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(h(e),n)})),t))for(;s-1&&void 0!==n&&O.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){O.remove(this,e)})}}),h.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=N.get(e,t),n&&(!r||h.isArray(n)?r=N.access(e,t,h.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=h.queue(e,t),r=n.length,i=n.shift(),a=h._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete a.stop,i.call(e,function(){h.dequeue(e,t)},a)),!r&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return N.get(e,n)||N.access(e,n,{empty:h.Callbacks("once memory").add(function(){N.remove(e,[t+"queue",n])})})}}),h.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length",""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function X(e,t){var n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&h.nodeName(e,t)?h.merge([e],n):n}function K(e,t){for(var n=0,r=e.length;n-1)i&&i.push(a);else if(l=h.contains(a.ownerDocument,a),o=X(f.appendChild(a),"script"),l&&K(o),n)for(c=0;a=o[c++];)Y.test(a.type||"")&&n.push(a);return f}Q=r.createDocumentFragment().appendChild(r.createElement("div")),(J=r.createElement("input")).setAttribute("type","radio"),J.setAttribute("checked","checked"),J.setAttribute("name","t"),Q.appendChild(J),f.checkClone=Q.cloneNode(!0).cloneNode(!0).lastChild.checked,Q.innerHTML="",f.noCloneChecked=!!Q.cloneNode(!0).lastChild.defaultValue;var ne=/^key/,re=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ie=/^([^.]*)(?:\.(.+)|)/;function ae(){return!0}function oe(){return!1}function se(){try{return r.activeElement}catch(e){}}function ue(e,t,n,r,i,a){var o,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)ue(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=oe;else if(!i)return e;return 1===a&&(o=i,(i=function(e){return h().off(e),o.apply(this,arguments)}).guid=o.guid||(o.guid=h.guid++)),e.each(function(){h.event.add(this,t,i,r,n)})}h.event={global:{},add:function(e,t,n,r,i){var a,o,s,u,l,c,f,p,d,g,v,m=N.get(e);if(m)for(n.handler&&(n=(a=n).handler,i=a.selector),n.guid||(n.guid=h.guid++),(u=m.events)||(u=m.events={}),(o=m.handle)||(o=m.handle=function(t){return void 0!==h&&h.event.triggered!==t.type?h.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(I)||[""]).length;l--;)d=v=(s=ie.exec(t[l])||[])[1],g=(s[2]||"").split(".").sort(),d&&(f=h.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=h.event.special[d]||{},c=h.extend({type:d,origType:v,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&h.expr.match.needsContext.test(i),namespace:g.join(".")},a),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,g,o)||e.addEventListener&&e.addEventListener(d,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),h.event.global[d]=!0)},remove:function(e,t,n,r,i){var a,o,s,u,l,c,f,p,d,g,v,m=N.hasData(e)&&N.get(e);if(m&&(u=m.events)){for(l=(t=(t||"").match(I)||[""]).length;l--;)if(d=v=(s=ie.exec(t[l])||[])[1],g=(s[2]||"").split(".").sort(),d){for(f=h.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=a=p.length;a--;)c=p[a],!i&&v!==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,g,m.handle)||h.removeEvent(e,d,m.handle),delete u[d])}else for(d in u)h.event.remove(e,d+t[l],n,r,!0);h.isEmptyObject(u)&&N.remove(e,"handle events")}},dispatch:function(e){e=h.event.fix(e);var t,n,r,a,o,s,u=i.call(arguments),l=(N.get(this,"events")||{})[e.type]||[],c=h.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,e)){for(s=h.event.handlers.call(this,e,l),t=0;(a=s[t++])&&!e.isPropagationStopped();)for(e.currentTarget=a.elem,n=0;(o=a.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,void 0!==(r=((h.event.special[o.origType]||{}).handle||o.handler).apply(a.elem,u))&&!1===(e.result=r)&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,a,o=[],s=t.delegateCount,u=e.target;if(s&&u.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&(!0!==u.disabled||"click"!==e.type)){for(r=[],n=0;n-1:h.find(i,this,null,[u]).length),r[i]&&r.push(a);r.length&&o.push({elem:u,handlers:r})}return s]*)\/>/gi,ce=/\s*$/g;function de(e,t){return h.nodeName(e,"table")&&h.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ge(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function ve(e){var t=he.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function me(e,t){var n,r,i,a,o,s,u,l;if(1===t.nodeType){if(N.hasData(e)&&(a=N.access(e),o=N.set(t,a),l=a.events))for(i in delete o.handle,o.events={},l)for(n=0,r=l[i].length;n1&&"string"==typeof v&&!f.checkClone&&fe.test(v))return e.each(function(i){var a=e.eq(i);m&&(t[0]=v.call(this,i,a.html())),we(a,t,n,r)});if(d&&(o=(i=te(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(s=h.map(X(i,"script"),ge)).length;p")},clone:function(e,t,n){var r,i,a,o,s,u,l,c=e.cloneNode(!0),p=h.contains(e.ownerDocument,e);if(!(f.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||h.isXMLDoc(e)))for(o=X(c),r=0,i=(a=X(e)).length;r0&&K(o,!p&&X(e,"script")),c},cleanData:function(e){for(var t,n,r,i=h.event.special,a=0;void 0!==(n=e[a]);a++)if(B(n)){if(t=n[N.expando]){if(t.events)for(r in t.events)i[r]?h.event.remove(n,r):h.removeEvent(n,r,t.handle);n[N.expando]=void 0}n[O.expando]&&(n[O.expando]=void 0)}}}),h.fn.extend({domManip:we,detach:function(e){return ye(this,e,!0)},remove:function(e){return ye(this,e)},text:function(e){return R(this,function(e){return void 0===e?h.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 we(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||de(this,e).appendChild(e)})},prepend:function(){return we(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=de(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return we(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return we(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&&(h.cleanData(X(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return h.clone(this,e,t)})},html:function(e){return R(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&&!ce.test(e)&&!$[(G.exec(e)||["",""])[1].toLowerCase()]){e=h.htmlPrefilter(e);try{for(;n")).appendTo(t.documentElement))[0].contentDocument).write(),t.close(),n=xe(e,t),_e.detach()),be[e]=n),n}var Ee=/^margin/,Se=new RegExp("^("+U+")(?!px)[a-z%]+$","i"),Te=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Ae=function(e,t,n,r){var i,a,o={};for(a in t)o[a]=e.style[a],e.style[a]=t[a];for(a in i=n.apply(e,r||[]),t)e.style[a]=o[a];return i},Ce=r.documentElement;function je(e,t,n){var r,i,a,o,s=e.style;return""!==(o=(n=n||Te(e))?n.getPropertyValue(t)||n[t]:void 0)&&void 0!==o||h.contains(e.ownerDocument,e)||(o=h.style(e,t)),n&&!f.pixelMarginRight()&&Se.test(o)&&Ee.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 Me(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){var t,n,i,a,o=r.createElement("div"),s=r.createElement("div");function u(){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="",Ce.appendChild(o);var r=e.getComputedStyle(s);t="1%"!==r.top,a="2px"===r.marginLeft,n="4px"===r.width,s.style.marginRight="50%",i="4px"===r.marginRight,Ce.removeChild(o)}s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",f.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),h.extend(f,{pixelPosition:function(){return u(),t},boxSizingReliable:function(){return null==n&&u(),n},pixelMarginRight:function(){return null==n&&u(),i},reliableMarginLeft:function(){return null==n&&u(),a},reliableMarginRight:function(){var t,n=s.appendChild(r.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",Ce.appendChild(o),t=!parseFloat(e.getComputedStyle(n).marginRight),Ce.removeChild(o),s.removeChild(n),t}}))}();var Ie=/^(none|table(?!-c[ea]).+)/,Le={position:"absolute",visibility:"hidden",display:"block"},Re={letterSpacing:"0",fontWeight:"400"},Be=["Webkit","O","Moz","ms"],De=r.createElement("div").style;function Ne(e){if(e in De)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=Be.length;n--;)if((e=Be[n]+t)in De)return e}function Oe(e,t,n){var r=q.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Fe(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+=h.css(e,n+W[a],!0,i)),r?("content"===n&&(o-=h.css(e,"padding"+W[a],!0,i)),"margin"!==n&&(o-=h.css(e,"border"+W[a]+"Width",!0,i))):(o+=h.css(e,"padding"+W[a],!0,i),"padding"!==n&&(o+=h.css(e,"border"+W[a]+"Width",!0,i)));return o}function ze(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,a=Te(e),o="border-box"===h.css(e,"boxSizing",!1,a);if(i<=0||null==i){if(((i=je(e,t,a))<0||null==i)&&(i=e.style[t]),Se.test(i))return i;r=o&&(f.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+Fe(e,t,n||(o?"border":"content"),r,a)+"px"}function Pe(e,t){for(var n,r,i,a=[],o=0,s=e.length;o1)},show:function(){return Pe(this,!0)},hide:function(){return Pe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){H(this)?h(this).show():h(this).hide()})}}),h.Tween=Ue,Ue.prototype={constructor:Ue,init:function(e,t,n,r,i,a){this.elem=e,this.prop=n,this.easing=i||h.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=a||(h.cssNumber[n]?"":"px")},cur:function(){var e=Ue.propHooks[this.prop];return e&&e.get?e.get(this):Ue.propHooks._default.get(this)},run:function(e){var t,n=Ue.propHooks[this.prop];return this.options.duration?this.pos=t=h.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):Ue.propHooks._default.set(this),this}},Ue.prototype.init.prototype=Ue.prototype,Ue.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=h.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){h.fx.step[e.prop]?h.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[h.cssProps[e.prop]]&&!h.cssHooks[e.prop]?e.elem[e.prop]=e.now:h.style(e.elem,e.prop,e.now+e.unit)}}},Ue.propHooks.scrollTop=Ue.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},h.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},h.fx=Ue.prototype.init,h.fx.step={};var qe,We,He=/^(?:toggle|show|hide)$/,Ve=/queueHooks$/;function Ze(){return e.setTimeout(function(){qe=void 0}),qe=h.now()}function Ge(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=W[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function Ye(e,t,n){for(var r,i=($e.tweeners[t]||[]).concat($e.tweeners["*"]),a=0,o=i.length;a1)},removeAttr:function(e){return this.each(function(){h.removeAttr(this,e)})}}),h.extend({attr:function(e,t,n){var r,i,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return void 0===e.getAttribute?h.prop(e,t,n):(1===a&&h.isXMLDoc(e)||(t=t.toLowerCase(),i=h.attrHooks[t]||(h.expr.match.bool.test(t)?Xe:void 0)),void 0!==n?null===n?void h.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=h.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!f.radioValue&&"radio"===t&&h.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(I);if(a&&1===e.nodeType)for(;n=a[i++];)r=h.propFix[n]||n,h.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)}}),Xe={set:function(e,t,n){return!1===t?h.removeAttr(e,n):e.setAttribute(n,n),n}},h.each(h.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Ke[t]||h.find.attr;Ke[t]=function(e,t,r){var i,a;return r||(a=Ke[t],Ke[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,Ke[t]=a),i}});var Qe=/^(?:input|select|textarea|button)$/i,Je=/^(?:a|area)$/i;h.fn.extend({prop:function(e,t){return R(this,h.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[h.propFix[e]||e]})}}),h.extend({prop:function(e,t,n){var r,i,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&h.isXMLDoc(e)||(t=h.propFix[t]||t,i=h.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=h.find.attr(e,"tabindex");return t?parseInt(t,10):Qe.test(e.nodeName)||Je.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),f.optSelected||(h.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)}}),h.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){h.propFix[this.toLowerCase()]=this});var et=/[\t\r\n\f]/g;function tt(e){return e.getAttribute&&e.getAttribute("class")||""}h.fn.extend({addClass:function(e){var t,n,r,i,a,o,s,u=0;if(h.isFunction(e))return this.each(function(t){h(this).addClass(e.call(this,t,tt(this)))});if("string"==typeof e&&e)for(t=e.match(I)||[];n=this[u++];)if(i=tt(n),r=1===n.nodeType&&(" "+i+" ").replace(et," ")){for(o=0;a=t[o++];)r.indexOf(" "+a+" ")<0&&(r+=a+" ");i!==(s=h.trim(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,a,o,s,u=0;if(h.isFunction(e))return this.each(function(t){h(this).removeClass(e.call(this,t,tt(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(I)||[];n=this[u++];)if(i=tt(n),r=1===n.nodeType&&(" "+i+" ").replace(et," ")){for(o=0;a=t[o++];)for(;r.indexOf(" "+a+" ")>-1;)r=r.replace(" "+a+" "," ");i!==(s=h.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):h.isFunction(e)?this.each(function(n){h(this).toggleClass(e.call(this,n,tt(this),t),t)}):this.each(function(){var t,r,i,a;if("string"===n)for(r=0,i=h(this),a=e.match(I)||[];t=a[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||((t=tt(this))&&N.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":N.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+tt(n)+" ").replace(et," ").indexOf(t)>-1)return!0;return!1}});var nt=/\r/g,rt=/[\x20\t\r\n\f]+/g;h.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=h.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,h(this).val()):e)?i="":"number"==typeof i?i+="":h.isArray(i)&&(i=h.map(i,function(e){return null==e?"":e+""})),(t=h.valHooks[this.type]||h.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=h.valHooks[i.type]||h.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(nt,""):null==n?"":n:void 0}}),h.extend({valHooks:{option:{get:function(e){var t=h.find.attr(e,"value");return null!=t?t:h.trim(h.text(e)).replace(rt," ")}},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,u=i<0?s:a?i:0;u-1)&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),h.each(["radio","checkbox"],function(){h.valHooks[this]={set:function(e,t){if(h.isArray(t))return e.checked=h.inArray(h(e).val(),t)>-1}},f.checkOn||(h.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var it=/^(?:focusinfocus|focusoutblur)$/;h.extend(h.event,{trigger:function(t,n,i,a){var o,s,u,l,f,p,d,g=[i||r],v=c.call(t,"type")?t.type:t,m=c.call(t,"namespace")?t.namespace.split("."):[];if(s=u=i=i||r,3!==i.nodeType&&8!==i.nodeType&&!it.test(v+h.event.triggered)&&(v.indexOf(".")>-1&&(v=(m=v.split(".")).shift(),m.sort()),f=v.indexOf(":")<0&&"on"+v,(t=t[h.expando]?t:new h.Event(v,"object"==typeof t&&t)).isTrigger=a?2:3,t.namespace=m.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:h.makeArray(n,[t]),d=h.event.special[v]||{},a||!d.trigger||!1!==d.trigger.apply(i,n))){if(!a&&!d.noBubble&&!h.isWindow(i)){for(l=d.delegateType||v,it.test(l+v)||(s=s.parentNode);s;s=s.parentNode)g.push(s),u=s;u===(i.ownerDocument||r)&&g.push(u.defaultView||u.parentWindow||e)}for(o=0;(s=g[o++])&&!t.isPropagationStopped();)t.type=o>1?l:d.bindType||v,(p=(N.get(s,"events")||{})[t.type]&&N.get(s,"handle"))&&p.apply(s,n),(p=f&&s[f])&&p.apply&&B(s)&&(t.result=p.apply(s,n),!1===t.result&&t.preventDefault());return t.type=v,a||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(g.pop(),n)||!B(i)||f&&h.isFunction(i[v])&&!h.isWindow(i)&&((u=i[f])&&(i[f]=null),h.event.triggered=v,i[v](),h.event.triggered=void 0,u&&(i[f]=u)),t.result}},simulate:function(e,t,n){var r=h.extend(new h.Event,n,{type:e,isSimulated:!0});h.event.trigger(r,null,t)}}),h.fn.extend({trigger:function(e,t){return this.each(function(){h.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return h.event.trigger(e,t,n,!0)}}),h.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){h.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),h.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),f.focusin="onfocusin"in e,f.focusin||h.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){h.event.simulate(t,e.target,h.event.fix(e))};h.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=N.access(r,t);i||r.addEventListener(e,n,!0),N.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=N.access(r,t)-1;i?N.access(r,t,i):(r.removeEventListener(e,n,!0),N.remove(r,t))}}});var at=e.location,ot=h.now(),st=/\?/;h.parseJSON=function(e){return JSON.parse(e+"")},h.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||h.error("Invalid XML: "+t),n};var ut=/#.*$/,lt=/([?&])_=[^&]*/,ct=/^(.*?):[ \t]*([^\r\n]*)$/gm,ft=/^(?:GET|HEAD)$/,ht=/^\/\//,pt={},dt={},gt="*/".concat("*"),vt=r.createElement("a");function mt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,a=t.toLowerCase().match(I)||[];if(h.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 wt(e,t,n,r){var i={},a=e===dt;function o(s){var u;return i[s]=!0,h.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||a||i[l]?a?!(u=l):void 0:(t.dataTypes.unshift(l),o(l),!1)}),u}return o(t.dataTypes[0])||!i["*"]&&o("*")}function yt(e,t){var n,r,i=h.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&h.extend(!0,e,r),e}vt.href=at.href,h.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:at.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(at.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":gt,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":h.parseJSON,"text xml":h.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?yt(yt(e,h.ajaxSettings),t):yt(h.ajaxSettings,e)},ajaxPrefilter:mt(pt),ajaxTransport:mt(dt),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,a,o,s,u,l,c,f,p=h.ajaxSetup({},n),d=p.context||p,g=p.context&&(d.nodeType||d.jquery)?h(d):h.event,v=h.Deferred(),m=h.Callbacks("once memory"),w=p.statusCode||{},y={},_={},b=0,x="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!s)for(s={};t=ct.exec(o);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=_[n]=_[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)w[t]=[w[t],e[t]];else k.always(e[k.status]);return this},abort:function(e){var t=e||x;return i&&i.abort(t),E(0,t),this}};if(v.promise(k).complete=m.add,k.success=k.done,k.error=k.fail,p.url=((t||p.url||at.href)+"").replace(ut,"").replace(ht,at.protocol+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=h.trim(p.dataType||"*").toLowerCase().match(I)||[""],null==p.crossDomain){l=r.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=vt.protocol+"//"+vt.host!=l.protocol+"//"+l.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=h.param(p.data,p.traditional)),wt(pt,p,n,k),2===b)return k;for(f in(c=h.event&&p.global)&&0==h.active++&&h.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!ft.test(p.type),a=p.url,p.hasContent||(p.data&&(a=p.url+=(st.test(a)?"&":"?")+p.data,delete p.data),!1===p.cache&&(p.url=lt.test(a)?a.replace(lt,"$1_="+ot++):a+(st.test(a)?"&":"?")+"_="+ot++)),p.ifModified&&(h.lastModified[a]&&k.setRequestHeader("If-Modified-Since",h.lastModified[a]),h.etag[a]&&k.setRequestHeader("If-None-Match",h.etag[a])),(p.data&&p.hasContent&&!1!==p.contentType||n.contentType)&&k.setRequestHeader("Content-Type",p.contentType),k.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+gt+"; q=0.01":""):p.accepts["*"]),p.headers)k.setRequestHeader(f,p.headers[f]);if(p.beforeSend&&(!1===p.beforeSend.call(d,k,p)||2===b))return k.abort();for(f in x="abort",{success:1,error:1,complete:1})k[f](p[f]);if(i=wt(dt,p,n,k)){if(k.readyState=1,c&&g.trigger("ajaxSend",[k,p]),2===b)return k;p.async&&p.timeout>0&&(u=e.setTimeout(function(){k.abort("timeout")},p.timeout));try{b=1,i.send(y,E)}catch(e){if(!(b<2))throw e;E(-1,e)}}else E(-1,"No Transport");function E(t,n,r,s){var l,f,y,_,x,E=n;2!==b&&(b=2,u&&e.clearTimeout(u),i=void 0,o=s||"",k.readyState=t>0?4:0,l=t>=200&&t<300||304===t,r&&(_=function(e,t,n){for(var r,i,a,o,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)a=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){a=i;break}o||(o=i)}a=a||o}if(a)return a!==u[0]&&u.unshift(a),n[a]}(p,k,r)),_=function(e,t,n,r){var i,a,o,s,u,l={},c=e.dataTypes.slice();if(c[1])for(o in e.converters)l[o.toLowerCase()]=e.converters[o];for(a=c.shift();a;)if(e.responseFields[a]&&(n[e.responseFields[a]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=a,a=c.shift())if("*"===a)a=u;else if("*"!==u&&u!==a){if(!(o=l[u+" "+a]||l["* "+a]))for(i in l)if((s=i.split(" "))[1]===a&&(o=l[u+" "+s[0]]||l["* "+s[0]])){!0===o?o=l[i]:!0!==l[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 "+u+" to "+a}}}return{state:"success",data:t}}(p,_,k,l),l?(p.ifModified&&((x=k.getResponseHeader("Last-Modified"))&&(h.lastModified[a]=x),(x=k.getResponseHeader("etag"))&&(h.etag[a]=x)),204===t||"HEAD"===p.type?E="nocontent":304===t?E="notmodified":(E=_.state,f=_.data,l=!(y=_.error))):(y=E,!t&&E||(E="error",t<0&&(t=0))),k.status=t,k.statusText=(n||E)+"",l?v.resolveWith(d,[f,E,k]):v.rejectWith(d,[k,E,y]),k.statusCode(w),w=void 0,c&&g.trigger(l?"ajaxSuccess":"ajaxError",[k,p,l?f:y]),m.fireWith(d,[k,E]),c&&(g.trigger("ajaxComplete",[k,p]),--h.active||h.event.trigger("ajaxStop")))}return k},getJSON:function(e,t,n){return h.get(e,t,n,"json")},getScript:function(e,t){return h.get(e,void 0,t,"script")}}),h.each(["get","post"],function(e,t){h[t]=function(e,n,r,i){return h.isFunction(n)&&(i=i||r,r=n,n=void 0),h.ajax(h.extend({url:e,type:t,dataType:i,data:n,success:r},h.isPlainObject(e)&&e))}}),h._evalUrl=function(e){return h.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},h.fn.extend({wrapAll:function(e){var t;return h.isFunction(e)?this.each(function(t){h(this).wrapAll(e.call(this,t))}):(this[0]&&(t=h(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 h.isFunction(e)?this.each(function(t){h(this).wrapInner(e.call(this,t))}):this.each(function(){var t=h(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=h.isFunction(e);return this.each(function(n){h(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){h.nodeName(this,"body")||h(this).replaceWith(this.childNodes)}).end()}}),h.expr.filters.hidden=function(e){return!h.expr.filters.visible(e)},h.expr.filters.visible=function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0};var _t=/%20/g,bt=/\[\]$/,xt=/\r?\n/g,kt=/^(?:submit|button|image|reset|file)$/i,Et=/^(?:input|select|textarea|keygen)/i;function St(e,t,n,r){var i;if(h.isArray(t))h.each(t,function(t,i){n||bt.test(e)?r(e,i):St(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==h.type(t))r(e,t);else for(i in t)St(e+"["+i+"]",t[i],n,r)}h.param=function(e,t){var n,r=[],i=function(e,t){t=h.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=h.ajaxSettings&&h.ajaxSettings.traditional),h.isArray(e)||e.jquery&&!h.isPlainObject(e))h.each(e,function(){i(this.name,this.value)});else for(n in e)St(n,e[n],t,i);return r.join("&").replace(_t,"+")},h.fn.extend({serialize:function(){return h.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=h.prop(this,"elements");return e?h.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!h(this).is(":disabled")&&Et.test(this.nodeName)&&!kt.test(e)&&(this.checked||!Z.test(e))}).map(function(e,t){var n=h(this).val();return null==n?null:h.isArray(n)?h.map(n,function(e){return{name:t.name,value:e.replace(xt,"\r\n")}}):{name:t.name,value:n.replace(xt,"\r\n")}}).get()}}),h.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Tt={0:200,1223:204},At=h.ajaxSettings.xhr();f.cors=!!At&&"withCredentials"in At,f.ajax=At=!!At,h.ajaxTransport(function(t){var n,r;if(f.cors||At&&!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];for(o in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),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(Tt[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()}}}),h.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 h.globalEval(e),e}}}),h.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),h.ajaxTransport("script",function(e){var t,n;if(e.crossDomain)return{send:function(i,a){t=h(" diff --git a/package.json b/package.json index 3445e75c..d9f86f10 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "A modular JavaScript image manipulation library modeled on a storyboard.", "main": "src/ImageSequencer.js", "scripts": { - "debug": "node index.js -i ./examples/images/monarch.png -s", + "debug": "node ./index.js -i ./examples/images/monarch.png -s", "test": "tape test/**/*.js test/*.js | tap-spec; browserify test/modules/image-sequencer.js test/modules/chain.js test/modules/replace.js | tape-run --render=\"tap-spec\"" }, "repository": { diff --git a/src/Modules.js b/src/Modules.js index 09574c0c..b1e731c5 100644 --- a/src/Modules.js +++ b/src/Modules.js @@ -31,5 +31,8 @@ module.exports = { ], 'dynamic': [ require('./modules/Dynamic/Module'),require('./modules/Dynamic/info') + ], + 'blur': [ + require('./modules/Blur/Module'),require('./modules/Blur/info') ] } diff --git a/src/modules/Blur/Blur.js b/src/modules/Blur/Blur.js new file mode 100644 index 00000000..3039e10f --- /dev/null +++ b/src/modules/Blur/Blur.js @@ -0,0 +1,85 @@ +module.exports = exports = function(pixels,blur){ + let kernel = kernelGenerator(blur,1) + kernel = flipKernel(kernel) + var oldpix = pixels + + for(let i=0;i{ + // return val.reduce((sumInner,valInner)=>{ + // return sumInner+valInner + // }) + // }) + // result = result.map(arr=>arr.map(val=>(val + 0.0)/(sum + 0.0))) + + // return result + + return [ + [2.0/159.0,4.0/159.0,5.0/159.0,4.0/159.0,2.0/159.0], + [4.0/159.0,9.0/159.0,12.0/159.0,9.0/159.0,4.0/159.0], + [5.0/159.0,12.0/159.0,15.0/159.0,12.0/159.0,5.0/159.0], + [4.0/159.0,9.0/159.0,12.0/159.0,9.0/159.0,4.0/159.0], + [2.0/159.0,4.0/159.0,5.0/159.0,4.0/159.0,2.0/159.0] + ] + } + function getNeighbouringPixelPositions(pixelPosition){ + let x = pixelPosition[0],y=pixelPosition[1] + let result = [] + for(let i=-2;i<=2;i++){ + let arr = [] + for(let j=-2;j<=2;j++){ + arr.push([x + i,y + j]) + } + result.push(arr) + } + return result +} + +function flipKernel(kernel){ + let result = [] + for(let i =kernel.length-1;i>=0;i--){ + let arr = [] + for(let j = kernel[i].length-1;j>=0;j--){ + arr.push(kernel[i][j]) + } + result.push(arr) + } + return result +} +} \ No newline at end of file diff --git a/src/modules/Blur/Module.js b/src/modules/Blur/Module.js new file mode 100644 index 00000000..a909c6dd --- /dev/null +++ b/src/modules/Blur/Module.js @@ -0,0 +1,58 @@ +/* +* Blur an Image +*/ +module.exports = function Blur(options,UI){ + options = options || {}; + options.title = "Blur"; + options.description = "Blur an Image"; + options.blur = options.blur || 2 + + //Tell the UI that a step has been set up + UI.onSetup(options.step); + var output; + + function draw(input,callback){ + + // Tell the UI that a step is being drawn + UI.onDraw(options.step); + + var step = this; + + function changePixel(r, g, b, a){ + return [r,g,b,a] + } + + function extraManipulation(pixels){ + pixels = require('./Blur')(pixels,options.blur) + return pixels + } + + function output(image,datauri,mimetype){ + + // This output is accessible by Image Sequencer + step.output = {src:datauri,format:mimetype}; + + // This output is accessible by UI + options.step.output = datauri; + + // Tell UI that step has been drawn. + UI.onComplete(options.step); + } + + return require('../_nomodule/PixelManipulation.js')(input, { + output: output, + changePixel: changePixel, + extraManipulation: extraManipulation, + format: input.format, + image: options.image, + callback: callback + }); + + } + return { + options: options, + draw: draw, + output: output, + UI: UI + } +} diff --git a/src/modules/Blur/info.json b/src/modules/Blur/info.json new file mode 100644 index 00000000..ff16bf1c --- /dev/null +++ b/src/modules/Blur/info.json @@ -0,0 +1,11 @@ +{ + "name": "blur", + "description": "Blur an image by a given value", + "inputs": { + "blur": { + "type": "integer", + "desc": "amount of gaussian blur(Less blur gives more detail, typically 0-5)", + "default": 2 + } + } +}