filer/dist/filer.min.js

6 lines
142 KiB
JavaScript

/*! filer 0.0.6 2014-05-21 */
(function(t,e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Filer||(t.Filer=e())})(this,function(){var t,e,n;(function(r){function i(t,e){return w.call(t,e)}function o(t,e){var n,r,i,o,s,a,c,u,f,l,h=e&&e.split("/"),p=m.map,d=p&&p["*"]||{};if(t&&"."===t.charAt(0))if(e){for(h=h.slice(0,h.length-1),t=h.concat(t.split("/")),u=0;t.length>u;u+=1)if(l=t[u],"."===l)t.splice(u,1),u-=1;else if(".."===l){if(1===u&&(".."===t[2]||".."===t[0]))break;u>0&&(t.splice(u-1,2),u-=2)}t=t.join("/")}else 0===t.indexOf("./")&&(t=t.substring(2));if((h||d)&&p){for(n=t.split("/"),u=n.length;u>0;u-=1){if(r=n.slice(0,u).join("/"),h)for(f=h.length;f>0;f-=1)if(i=p[h.slice(0,f).join("/")],i&&(i=i[r])){o=i,s=u;break}if(o)break;!a&&d&&d[r]&&(a=d[r],c=u)}!o&&a&&(o=a,s=c),o&&(n.splice(0,s,o),t=n.join("/"))}return t}function s(t,e){return function(){return p.apply(r,E.call(arguments,0).concat([t,e]))}}function a(t){return function(e){return o(e,t)}}function c(t){return function(e){y[t]=e}}function u(t){if(i(v,t)){var e=v[t];delete v[t],b[t]=!0,h.apply(r,e)}if(!i(y,t)&&!i(b,t))throw Error("No "+t);return y[t]}function f(t){var e,n=t?t.indexOf("!"):-1;return n>-1&&(e=t.substring(0,n),t=t.substring(n+1,t.length)),[e,t]}function l(t){return function(){return m&&m.config&&m.config[t]||{}}}var h,p,d,g,y={},v={},m={},b={},w=Object.prototype.hasOwnProperty,E=[].slice;d=function(t,e){var n,r=f(t),i=r[0];return t=r[1],i&&(i=o(i,e),n=u(i)),i?t=n&&n.normalize?n.normalize(t,a(e)):o(t,e):(t=o(t,e),r=f(t),i=r[0],t=r[1],i&&(n=u(i))),{f:i?i+"!"+t:t,n:t,pr:i,p:n}},g={require:function(t){return s(t)},exports:function(t){var e=y[t];return e!==void 0?e:y[t]={}},module:function(t){return{id:t,uri:"",exports:y[t],config:l(t)}}},h=function(t,e,n,o){var a,f,l,h,p,m,w=[];if(o=o||t,"function"==typeof n){for(e=!e.length&&n.length?["require","exports","module"]:e,p=0;e.length>p;p+=1)if(h=d(e[p],o),f=h.f,"require"===f)w[p]=g.require(t);else if("exports"===f)w[p]=g.exports(t),m=!0;else if("module"===f)a=w[p]=g.module(t);else if(i(y,f)||i(v,f)||i(b,f))w[p]=u(f);else{if(!h.p)throw Error(t+" missing "+f);h.p.load(h.n,s(o,!0),c(f),{}),w[p]=y[f]}l=n.apply(y[t],w),t&&(a&&a.exports!==r&&a.exports!==y[t]?y[t]=a.exports:l===r&&m||(y[t]=l))}else t&&(y[t]=n)},t=e=p=function(t,e,n,i,o){return"string"==typeof t?g[t]?g[t](e):u(d(t,e).f):(t.splice||(m=t,e.splice?(t=e,e=n,n=null):t=r),e=e||function(){},"function"==typeof n&&(n=i,i=o),i?h(r,t,e,n):setTimeout(function(){h(r,t,e,n)},4),p)},p.config=function(t){return m=t,m.deps&&p(m.deps,m.callback),p},n=function(t,e,n){e.splice||(n=e,e=[]),i(y,t)||i(v,t)||(v[t]=[t,e,n])},n.amd={jQuery:!0}})(),n("build/almond",function(){}),n("nodash",["require"],function(){function t(t,e){return p.call(t,e)}function e(t){return null==t?0:t.length===+t.length?t.length:y(t).length}function n(t){return t}function r(t,e,n){var r,i;if(null!=t)if(u&&t.forEach===u)t.forEach(e,n);else if(t.length===+t.length){for(r=0,i=t.length;i>r;r++)if(e.call(n,t[r],r,t)===g)return}else{var o=o(t);for(r=0,i=o.length;i>r;r++)if(e.call(n,t[o[r]],o[r],t)===g)return}}function i(t,e,i){e||(e=n);var o=!1;return null==t?o:l&&t.some===l?t.some(e,i):(r(t,function(t,n,r){return o||(o=e.call(i,t,n,r))?g:void 0}),!!o)}function o(t,e){return null==t?!1:f&&t.indexOf===f?-1!=t.indexOf(e):i(t,function(t){return t===e})}function s(t){this.value=t}function a(t){return t&&"object"==typeof t&&!Array.isArray(t)&&p.call(t,"__wrapped__")?t:new s(t)}var c=Array.prototype,u=c.forEach,f=c.indexOf,l=c.some,h=Object.prototype,p=h.hasOwnProperty,d=Object.keys,g={},y=d||function(e){if(e!==Object(e))throw new TypeError("Invalid object");var n=[];for(var r in e)t(e,r)&&n.push(r);return n};return s.prototype.has=function(e){return t(this.value,e)},s.prototype.contains=function(t){return o(this.value,t)},s.prototype.size=function(){return e(this.value)},a}),n("src/path",[],function(){function t(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function e(){for(var e="",n=!1,r=arguments.length-1;r>=-1&&!n;r--){var i=r>=0?arguments[r]:"/";"string"==typeof i&&i&&(e=i+"/"+e,n="/"===i.charAt(0))}return e=t(e.split("/").filter(function(t){return!!t}),!n).join("/"),(n?"/":"")+e||"."}function n(e){var n="/"===e.charAt(0);return"/"===e.substr(-1),e=t(e.split("/").filter(function(t){return!!t}),!n).join("/"),e||n||(e="."),(n?"/":"")+e}function r(){var t=Array.prototype.slice.call(arguments,0);return n(t.filter(function(t){return t&&"string"==typeof t}).join("/"))}function i(t,e){function n(t){for(var e=0;t.length>e&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=exports.resolve(t).substr(1),e=exports.resolve(e).substr(1);for(var r=n(t.split("/")),i=n(e.split("/")),o=Math.min(r.length,i.length),s=o,a=0;o>a;a++)if(r[a]!==i[a]){s=a;break}for(var c=[],a=s;r.length>a;a++)c.push("..");return c=c.concat(i.slice(s)),c.join("/")}function o(t){var e=l(t),n=e[0],r=e[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."}function s(t,e){var n=l(t)[2];return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),""===n?"/":n}function a(t){return l(t)[3]}function c(t){return"/"===t.charAt(0)?!0:!1}function u(t){return-1!==(""+t).indexOf("\0")?!0:!1}var f=/^(\/?)([\s\S]+\/(?!$)|\/)?((?:\.{1,2}$|[\s\S]+?)?(\.[^.\/]*)?)$/,l=function(t){var e=f.exec(t);return[e[1]||"",e[2]||"",e[3]||"",e[4]||""]};return{normalize:n,resolve:e,join:r,relative:i,sep:"/",delimiter:":",dirname:o,basename:s,extname:a,isAbsolute:c,isNull:u}});var r=r||function(t,e){var n={},r=n.lib={},i=r.Base=function(){function t(){}return{extend:function(e){t.prototype=this;var n=new t;return e&&n.mixIn(e),n.$super=this,n},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.$super.extend(this)}}}(),o=r.WordArray=i.extend({init:function(t,n){t=this.words=t||[],this.sigBytes=n!=e?n:4*t.length},toString:function(t){return(t||a).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,t=t.sigBytes;if(this.clamp(),r%4)for(var i=0;t>i;i++)e[r+i>>>2]|=(255&n[i>>>2]>>>24-8*(i%4))<<24-8*((r+i)%4);else if(n.length>65535)for(i=0;t>i;i+=4)e[r+i>>>2]=n[i>>>2];else e.push.apply(e,n);return this.sigBytes+=t,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-8*(n%4),e.length=t.ceil(n/4)},clone:function(){var t=i.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var n=[],r=0;e>r;r+=4)n.push(0|4294967296*t.random());return o.create(n,e)}}),s=n.enc={},a=s.Hex={stringify:function(t){for(var e=t.words,t=t.sigBytes,n=[],r=0;t>r;r++){var i=255&e[r>>>2]>>>24-8*(r%4);n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,n=[],r=0;e>r;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-4*(r%8);return o.create(n,e/2)}},c=s.Latin1={stringify:function(t){for(var e=t.words,t=t.sigBytes,n=[],r=0;t>r;r++)n.push(String.fromCharCode(255&e[r>>>2]>>>24-8*(r%4)));return n.join("")},parse:function(t){for(var e=t.length,n=[],r=0;e>r;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-8*(r%4);return o.create(n,e)}},u=s.Utf8={stringify:function(t){try{return decodeURIComponent(escape(c.stringify(t)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(t){return c.parse(unescape(encodeURIComponent(t)))}},f=r.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=o.create(),this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=u.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n=this._data,r=n.words,i=n.sigBytes,s=this.blockSize,a=i/(4*s),a=e?t.ceil(a):t.max((0|a)-this._minBufferSize,0),e=a*s,i=t.min(4*e,i);if(e){for(var c=0;e>c;c+=s)this._doProcessBlock(r,c);c=r.splice(0,e),n.sigBytes-=i}return o.create(c,i)},clone:function(){var t=i.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});r.Hasher=f.extend({init:function(){this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize(),this._hash},clone:function(){var t=f.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:16,_createHelper:function(t){return function(e,n){return t.create(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return l.HMAC.create(t,n).finalize(e)}}});var l=n.algo={};return n}(Math);(function(t){var e=r,n=e.lib,i=n.WordArray,n=n.Hasher,o=e.algo,s=[],a=[];(function(){function e(e){for(var n=t.sqrt(e),r=2;n>=r;r++)if(!(e%r))return!1;return!0}function n(t){return 0|4294967296*(t-(0|t))}for(var r=2,i=0;64>i;)e(r)&&(8>i&&(s[i]=n(t.pow(r,.5))),a[i]=n(t.pow(r,1/3)),i++),r++})();var c=[],o=o.SHA256=n.extend({_doReset:function(){this._hash=i.create(s.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],s=n[3],u=n[4],f=n[5],l=n[6],h=n[7],p=0;64>p;p++){if(16>p)c[p]=0|t[e+p];else{var d=c[p-15],g=c[p-2];c[p]=((d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3)+c[p-7]+((g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10)+c[p-16]}d=h+((u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25))+(u&f^~u&l)+a[p]+c[p],g=((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+(r&i^r&o^i&o),h=l,l=f,f=u,u=0|s+d,s=o,o=i,i=r,r=0|d+g}n[0]=0|n[0]+r,n[1]=0|n[1]+i,n[2]=0|n[2]+o,n[3]=0|n[3]+s,n[4]=0|n[4]+u,n[5]=0|n[5]+f,n[6]=0|n[6]+l,n[7]=0|n[7]+h},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;e[r>>>5]|=128<<24-r%32,e[(r+64>>>9<<4)+15]=n,t.sigBytes=4*e.length,this._process()}});e.SHA256=n._createHelper(o),e.HmacSHA256=n._createHmacHelper(o)})(Math),n("crypto-js/rollups/sha256",function(){}),n("src/shared",["require","crypto-js/rollups/sha256"],function(t){function e(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=0|16*Math.random(),n="x"==t?e:8|3&e;return n.toString(16)}).toUpperCase()}function n(t){return s.SHA256(t).toString(s.enc.hex)}function i(){}function o(t){for(var e=[],n=t.length,r=0;n>r;r++)e[r]=t[r];return e}t("crypto-js/rollups/sha256");var s=r;return{guid:e,hash:n,u8toArray:o,nop:i}}),n("src/constants",["require"],function(){var t="READ",e="WRITE",n="CREATE",r="EXCLUSIVE",i="TRUNCATE",o="APPEND",s="CREATE",a="REPLACE";return{FILE_SYSTEM_NAME:"local",FILE_STORE_NAME:"files",IDB_RO:"readonly",IDB_RW:"readwrite",WSQL_VERSION:"1",WSQL_SIZE:5242880,WSQL_DESC:"FileSystem Storage",MODE_FILE:"FILE",MODE_DIRECTORY:"DIRECTORY",MODE_SYMBOLIC_LINK:"SYMLINK",MODE_META:"META",SYMLOOP_MAX:10,BINARY_MIME_TYPE:"application/octet-stream",JSON_MIME_TYPE:"application/json",ROOT_DIRECTORY_NAME:"/",FS_FORMAT:"FORMAT",FS_NOCTIME:"NOCTIME",FS_NOMTIME:"NOMTIME",O_READ:t,O_WRITE:e,O_CREATE:n,O_EXCLUSIVE:r,O_TRUNCATE:i,O_APPEND:o,O_FLAGS:{r:[t],"r+":[t,e],w:[e,n,i],"w+":[e,t,n,i],wx:[e,n,r,i],"wx+":[e,t,n,r,i],a:[e,n,o],"a+":[e,t,n,o],ax:[e,n,r,o],"ax+":[e,t,n,r,o]},XATTR_CREATE:s,XATTR_REPLACE:a,FS_READY:"READY",FS_PENDING:"PENDING",FS_ERROR:"ERROR",SUPER_NODE_ID:"00000000-0000-0000-0000-000000000000",STDIN:0,STDOUT:1,STDERR:2,FIRST_DESCRIPTOR:3,ENVIRONMENT:{TMP:"/tmp",PATH:""}}}),n("src/errors",["require"],function(){var t={};return["-1:UNKNOWN:unknown error","0:OK:success","1:EOF:end of file","2:EADDRINFO:getaddrinfo error","3:EACCES:permission denied","4:EAGAIN:resource temporarily unavailable","5:EADDRINUSE:address already in use","6:EADDRNOTAVAIL:address not available","7:EAFNOSUPPORT:address family not supported","8:EALREADY:connection already in progress","9:EBADF:bad file descriptor","10:EBUSY:resource busy or locked","11:ECONNABORTED:software caused connection abort","12:ECONNREFUSED:connection refused","13:ECONNRESET:connection reset by peer","14:EDESTADDRREQ:destination address required","15:EFAULT:bad address in system call argument","16:EHOSTUNREACH:host is unreachable","17:EINTR:interrupted system call","18:EINVAL:invalid argument","19:EISCONN:socket is already connected","20:EMFILE:too many open files","21:EMSGSIZE:message too long","22:ENETDOWN:network is down","23:ENETUNREACH:network is unreachable","24:ENFILE:file table overflow","25:ENOBUFS:no buffer space available","26:ENOMEM:not enough memory","27:ENOTDIR:not a directory","28:EISDIR:illegal operation on a directory","29:ENONET:machine is not on the network","31:ENOTCONN:socket is not connected","32:ENOTSOCK:socket operation on non-socket","33:ENOTSUP:operation not supported on socket","34:ENOENT:no such file or directory","35:ENOSYS:function not implemented","36:EPIPE:broken pipe","37:EPROTO:protocol error","38:EPROTONOSUPPORT:protocol not supported","39:EPROTOTYPE:protocol wrong type for socket","40:ETIMEDOUT:connection timed out","41:ECHARSET:invalid Unicode character","42:EAIFAMNOSUPPORT:address family for hostname not supported","44:EAISERVICE:servname not supported for ai_socktype","45:EAISOCKTYPE:ai_socktype not supported","46:ESHUTDOWN:cannot send after transport endpoint shutdown","47:EEXIST:file already exists","48:ESRCH:no such process","49:ENAMETOOLONG:name too long","50:EPERM:operation not permitted","51:ELOOP:too many symbolic links encountered","52:EXDEV:cross-device link not permitted","53:ENOTEMPTY:directory not empty","54:ENOSPC:no space left on device","55:EIO:i/o error","56:EROFS:read-only file system","57:ENODEV:no such device","58:ESPIPE:invalid seek","59:ECANCELED:operation canceled","1000:ENOTMOUNTED:not mounted","1001:EFILESYSTEMERROR:missing super node, use 'FORMAT' flag to format filesystem.","1002:ENOATTR:attribute does not exist"].forEach(function(e){function n(t){this.message=t||o}e=e.split(":");var r=e[0],i=e[1],o=e[2],s=n.prototype=Error();s.errno=r,s.code=i,s.constructor=n,t[i]=t[r]=n}),t}),n("src/providers/indexeddb",["require","src/constants","src/constants","src/constants","src/constants","src/errors"],function(t){function e(t,e){var n=t.transaction(i,e);this.objectStore=n.objectStore(i)}function n(t){this.name=t||r,this.db=null}var r=t("src/constants").FILE_SYSTEM_NAME,i=t("src/constants").FILE_STORE_NAME,o=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,s=t("src/constants").IDB_RW;t("src/constants").IDB_RO;var a=t("src/errors");return e.prototype.clear=function(t){try{var e=this.objectStore.clear();e.onsuccess=function(){t()},e.onerror=function(e){t(e)}}catch(n){t(n)}},e.prototype.get=function(t,e){try{var n=this.objectStore.get(t);n.onsuccess=function(t){var n=t.target.result;e(null,n)},n.onerror=function(t){e(t)}}catch(r){e(r)}},e.prototype.put=function(t,e,n){try{var r=this.objectStore.put(e,t);r.onsuccess=function(t){var e=t.target.result;n(null,e)},r.onerror=function(t){n(t)}}catch(i){n(i)}},e.prototype.delete=function(t,e){try{var n=this.objectStore.delete(t);n.onsuccess=function(t){var n=t.target.result;e(null,n)},n.onerror=function(t){e(t)}}catch(r){e(r)}},n.isSupported=function(){return!!o},n.prototype.open=function(t){var e=this;if(e.db)return t(null,!1),void 0;var n=!1,r=o.open(e.name);r.onupgradeneeded=function(t){var e=t.target.result;e.objectStoreNames.contains(i)&&e.deleteObjectStore(i),e.createObjectStore(i),n=!0},r.onsuccess=function(r){e.db=r.target.result,t(null,n)},r.onerror=function(){t(new a.EINVAL("IndexedDB cannot be accessed. If private browsing is enabled, disable it."))}},n.prototype.getReadOnlyContext=function(){return new e(this.db,s)},n.prototype.getReadWriteContext=function(){return new e(this.db,s)},n}),n("src/providers/websql",["require","src/constants","src/constants","src/constants","src/constants","src/constants","src/shared","src/errors"],function(t){function e(t,e){var n=this;this.getTransaction=function(r){return n.transaction?(r(n.transaction),void 0):(t[e?"readTransaction":"transaction"](function(t){n.transaction=t,r(t)}),void 0)}}function n(t){this.name=t||r,this.db=null}var r=t("src/constants").FILE_SYSTEM_NAME,i=t("src/constants").FILE_STORE_NAME,o=t("src/constants").WSQL_VERSION,s=t("src/constants").WSQL_SIZE,a=t("src/constants").WSQL_DESC,c=t("src/shared").u8toArray,u=t("src/errors");return e.prototype.clear=function(t){function e(e,n){t(n)}function n(){t(null)}this.getTransaction(function(t){t.executeSql("DELETE FROM "+i+";",[],n,e)})},e.prototype.get=function(t,e){function n(t,n){var r=0===n.rows.length?null:n.rows.item(0).data;try{r&&(r=JSON.parse(r),r.__isUint8Array&&(r=new Uint8Array(r.__array))),e(null,r)}catch(i){e(i)}}function r(t,n){e(n)}this.getTransaction(function(e){e.executeSql("SELECT data FROM "+i+" WHERE id = ?;",[t],n,r)})},e.prototype.put=function(t,e,n){function r(){n(null)}function o(t,e){n(e)}"[object Uint8Array]"===Object.prototype.toString.call(e)&&(e={__isUint8Array:!0,__array:c(e)}),e=JSON.stringify(e),this.getTransaction(function(n){n.executeSql("INSERT OR REPLACE INTO "+i+" (id, data) VALUES (?, ?);",[t,e],r,o)})},e.prototype.delete=function(t,e){function n(){e(null)}function r(t,n){e(n)}this.getTransaction(function(e){e.executeSql("DELETE FROM "+i+" WHERE id = ?;",[t],n,r)})},n.isSupported=function(){return!!window.openDatabase},n.prototype.open=function(t){function e(e,n){5===n.code&&t(new u.EINVAL("WebSQL cannot be accessed. If private browsing is enabled, disable it.")),t(n)}function n(e){function n(e,n){var r=0===n.rows.item(0).count;t(null,r)}function o(e,n){t(n)}r.db=c,e.executeSql("SELECT COUNT(id) AS count FROM "+i+";",[],n,o)}var r=this;if(r.db)return t(null,!1),void 0;var c=window.openDatabase(r.name,o,a,s);return c?(c.transaction(function(t){function r(t){t.executeSql("CREATE INDEX IF NOT EXISTS idx_"+i+"_id"+" on "+i+" (id);",[],n,e)}t.executeSql("CREATE TABLE IF NOT EXISTS "+i+" (id unique, data TEXT);",[],r,e)}),void 0):(t("[WebSQL] Unable to open database."),void 0)},n.prototype.getReadOnlyContext=function(){return new e(this.db,!0)},n.prototype.getReadWriteContext=function(){return new e(this.db,!1)},n}),function(){function t(t){var n=!1;return function(){if(n)throw Error("Callback was already called.");n=!0,t.apply(e,arguments)}}var e,r,i={};e=this,null!=e&&(r=e.async),i.noConflict=function(){return e.async=r,i};var o=function(t,e){if(t.forEach)return t.forEach(e);for(var n=0;t.length>n;n+=1)e(t[n],n,t)},s=function(t,e){if(t.map)return t.map(e);var n=[];return o(t,function(t,r,i){n.push(e(t,r,i))}),n},a=function(t,e,n){return t.reduce?t.reduce(e,n):(o(t,function(t,r,i){n=e(n,t,r,i)}),n)},c=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e};"undefined"!=typeof process&&process.nextTick?(i.nextTick=process.nextTick,i.setImmediate="undefined"!=typeof setImmediate?function(t){setImmediate(t)}:i.nextTick):"function"==typeof setImmediate?(i.nextTick=function(t){setImmediate(t)},i.setImmediate=i.nextTick):(i.nextTick=function(t){setTimeout(t,0)},i.setImmediate=i.nextTick),i.each=function(e,n,r){if(r=r||function(){},!e.length)return r();var i=0;o(e,function(o){n(o,t(function(t){t?(r(t),r=function(){}):(i+=1,i>=e.length&&r(null))}))})},i.forEach=i.each,i.eachSeries=function(t,e,n){if(n=n||function(){},!t.length)return n();var r=0,i=function(){e(t[r],function(e){e?(n(e),n=function(){}):(r+=1,r>=t.length?n(null):i())})};i()},i.forEachSeries=i.eachSeries,i.eachLimit=function(t,e,n,r){var i=u(e);i.apply(null,[t,n,r])},i.forEachLimit=i.eachLimit;var u=function(t){return function(e,n,r){if(r=r||function(){},!e.length||0>=t)return r();var i=0,o=0,s=0;(function a(){if(i>=e.length)return r();for(;t>s&&e.length>o;)o+=1,s+=1,n(e[o-1],function(t){t?(r(t),r=function(){}):(i+=1,s-=1,i>=e.length?r():a())})})()}},f=function(t){return function(){var e=Array.prototype.slice.call(arguments);return t.apply(null,[i.each].concat(e))}},l=function(t,e){return function(){var n=Array.prototype.slice.call(arguments);return e.apply(null,[u(t)].concat(n))}},h=function(t){return function(){var e=Array.prototype.slice.call(arguments);return t.apply(null,[i.eachSeries].concat(e))}},p=function(t,e,n,r){var i=[];e=s(e,function(t,e){return{index:e,value:t}}),t(e,function(t,e){n(t.value,function(n,r){i[t.index]=r,e(n)})},function(t){r(t,i)})};i.map=f(p),i.mapSeries=h(p),i.mapLimit=function(t,e,n,r){return d(e)(t,n,r)};var d=function(t){return l(t,p)};i.reduce=function(t,e,n,r){i.eachSeries(t,function(t,r){n(e,t,function(t,n){e=n,r(t)})},function(t){r(t,e)})},i.inject=i.reduce,i.foldl=i.reduce,i.reduceRight=function(t,e,n,r){var o=s(t,function(t){return t}).reverse();i.reduce(o,e,n,r)},i.foldr=i.reduceRight;var g=function(t,e,n,r){var i=[];e=s(e,function(t,e){return{index:e,value:t}}),t(e,function(t,e){n(t.value,function(n){n&&i.push(t),e()})},function(){r(s(i.sort(function(t,e){return t.index-e.index}),function(t){return t.value}))})};i.filter=f(g),i.filterSeries=h(g),i.select=i.filter,i.selectSeries=i.filterSeries;var y=function(t,e,n,r){var i=[];e=s(e,function(t,e){return{index:e,value:t}}),t(e,function(t,e){n(t.value,function(n){n||i.push(t),e()})},function(){r(s(i.sort(function(t,e){return t.index-e.index}),function(t){return t.value}))})};i.reject=f(y),i.rejectSeries=h(y);var v=function(t,e,n,r){t(e,function(t,e){n(t,function(n){n?(r(t),r=function(){}):e()})},function(){r()})};i.detect=f(v),i.detectSeries=h(v),i.some=function(t,e,n){i.each(t,function(t,r){e(t,function(t){t&&(n(!0),n=function(){}),r()})},function(){n(!1)})},i.any=i.some,i.every=function(t,e,n){i.each(t,function(t,r){e(t,function(t){t||(n(!1),n=function(){}),r()})},function(){n(!0)})},i.all=i.every,i.sortBy=function(t,e,n){i.map(t,function(t,n){e(t,function(e,r){e?n(e):n(null,{value:t,criteria:r})})},function(t,e){if(t)return n(t);var r=function(t,e){var n=t.criteria,r=e.criteria;return r>n?-1:n>r?1:0};n(null,s(e.sort(r),function(t){return t.value}))})},i.auto=function(t,e){e=e||function(){};var n=c(t);if(!n.length)return e(null);var r={},s=[],u=function(t){s.unshift(t)},f=function(t){for(var e=0;s.length>e;e+=1)if(s[e]===t)return s.splice(e,1),void 0},l=function(){o(s.slice(0),function(t){t()})};u(function(){c(r).length===n.length&&(e(null,r),e=function(){})}),o(n,function(n){var s=t[n]instanceof Function?[t[n]]:t[n],h=function(t){var s=Array.prototype.slice.call(arguments,1);if(1>=s.length&&(s=s[0]),t){var a={};o(c(r),function(t){a[t]=r[t]}),a[n]=s,e(t,a),e=function(){}}else r[n]=s,i.setImmediate(l)},p=s.slice(0,Math.abs(s.length-1))||[],d=function(){return a(p,function(t,e){return t&&r.hasOwnProperty(e)},!0)&&!r.hasOwnProperty(n)};if(d())s[s.length-1](h,r);else{var g=function(){d()&&(f(g),s[s.length-1](h,r))};u(g)}})},i.waterfall=function(t,e){if(e=e||function(){},t.constructor!==Array){var n=Error("First argument to waterfall must be an array of functions");return e(n)}if(!t.length)return e();var r=function(t){return function(n){if(n)e.apply(null,arguments),e=function(){};else{var o=Array.prototype.slice.call(arguments,1),s=t.next();s?o.push(r(s)):o.push(e),i.setImmediate(function(){t.apply(null,o)})}}};r(i.iterator(t))()};var m=function(t,e,n){if(n=n||function(){},e.constructor===Array)t.map(e,function(t,e){t&&t(function(t){var n=Array.prototype.slice.call(arguments,1);1>=n.length&&(n=n[0]),e.call(null,t,n)})},n);else{var r={};t.each(c(e),function(t,n){e[t](function(e){var i=Array.prototype.slice.call(arguments,1);1>=i.length&&(i=i[0]),r[t]=i,n(e)})},function(t){n(t,r)})}};i.parallel=function(t,e){m({map:i.map,each:i.each},t,e)},i.parallelLimit=function(t,e,n){m({map:d(e),each:u(e)},t,n)},i.series=function(t,e){if(e=e||function(){},t.constructor===Array)i.mapSeries(t,function(t,e){t&&t(function(t){var n=Array.prototype.slice.call(arguments,1);1>=n.length&&(n=n[0]),e.call(null,t,n)})},e);else{var n={};i.eachSeries(c(t),function(e,r){t[e](function(t){var i=Array.prototype.slice.call(arguments,1);1>=i.length&&(i=i[0]),n[e]=i,r(t)})},function(t){e(t,n)})}},i.iterator=function(t){var e=function(n){var r=function(){return t.length&&t[n].apply(null,arguments),r.next()};return r.next=function(){return t.length-1>n?e(n+1):null},r};return e(0)},i.apply=function(t){var e=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,e.concat(Array.prototype.slice.call(arguments)))}};var b=function(t,e,n,r){var i=[];t(e,function(t,e){n(t,function(t,n){i=i.concat(n||[]),e(t)})},function(t){r(t,i)})};i.concat=f(b),i.concatSeries=h(b),i.whilst=function(t,e,n){t()?e(function(r){return r?n(r):(i.whilst(t,e,n),void 0)}):n()},i.doWhilst=function(t,e,n){t(function(r){return r?n(r):(e()?i.doWhilst(t,e,n):n(),void 0)})},i.until=function(t,e,n){t()?n():e(function(r){return r?n(r):(i.until(t,e,n),void 0)})},i.doUntil=function(t,e,n){t(function(r){return r?n(r):(e()?n():i.doUntil(t,e,n),void 0)})},i.queue=function(e,n){function r(t,e,r,s){e.constructor!==Array&&(e=[e]),o(e,function(e){var o={data:e,callback:"function"==typeof s?s:null};r?t.tasks.unshift(o):t.tasks.push(o),t.saturated&&t.tasks.length===n&&t.saturated(),i.setImmediate(t.process)})}void 0===n&&(n=1);var s=0,a={tasks:[],concurrency:n,saturated:null,empty:null,drain:null,push:function(t,e){r(a,t,!1,e)},unshift:function(t,e){r(a,t,!0,e)},process:function(){if(a.concurrency>s&&a.tasks.length){var n=a.tasks.shift();a.empty&&0===a.tasks.length&&a.empty(),s+=1;var r=function(){s-=1,n.callback&&n.callback.apply(n,arguments),a.drain&&0===a.tasks.length+s&&a.drain(),a.process()},i=t(r);e(n.data,i)}},length:function(){return a.tasks.length},running:function(){return s}};return a},i.cargo=function(t,e){var n=!1,r=[],a={tasks:r,payload:e,saturated:null,empty:null,drain:null,push:function(t,n){t.constructor!==Array&&(t=[t]),o(t,function(t){r.push({data:t,callback:"function"==typeof n?n:null}),a.saturated&&r.length===e&&a.saturated()}),i.setImmediate(a.process)},process:function c(){if(!n){if(0===r.length)return a.drain&&a.drain(),void 0;var i="number"==typeof e?r.splice(0,e):r.splice(0),u=s(i,function(t){return t.data});a.empty&&a.empty(),n=!0,t(u,function(){n=!1;var t=arguments;o(i,function(e){e.callback&&e.callback.apply(null,t)}),c()})}},length:function(){return r.length},running:function(){return n}};return a};var w=function(t){return function(e){var n=Array.prototype.slice.call(arguments,1);e.apply(null,n.concat([function(e){var n=Array.prototype.slice.call(arguments,1);"undefined"!=typeof console&&(e?console.error&&console.error(e):console[t]&&o(n,function(e){console[t](e)}))}]))}};i.log=w("log"),i.dir=w("dir"),i.memoize=function(t,e){var n={},r={};e=e||function(t){return t};var i=function(){var i=Array.prototype.slice.call(arguments),o=i.pop(),s=e.apply(null,i);s in n?o.apply(null,n[s]):s in r?r[s].push(o):(r[s]=[o],t.apply(null,i.concat([function(){n[s]=arguments;var t=r[s];delete r[s];for(var e=0,i=t.length;i>e;e++)t[e].apply(null,arguments)}])))};return i.memo=n,i.unmemoized=t,i},i.unmemoize=function(t){return function(){return(t.unmemoized||t).apply(null,arguments)}},i.times=function(t,e,n){for(var r=[],o=0;t>o;o++)r.push(o);return i.map(r,e,n)},i.timesSeries=function(t,e,n){for(var r=[],o=0;t>o;o++)r.push(o);return i.mapSeries(r,e,n)},i.compose=function(){var t=Array.prototype.reverse.call(arguments);return function(){var e=this,n=Array.prototype.slice.call(arguments),r=n.pop();i.reduce(t,n,function(t,n,r){n.apply(e,t.concat([function(){var t=arguments[0],e=Array.prototype.slice.call(arguments,1);r(t,e)}]))},function(t,n){r.apply(e,[t].concat(n))})}};var E=function(t,e){var n=function(){var n=this,r=Array.prototype.slice.call(arguments),i=r.pop();return t(e,function(t,e){t.apply(n,r.concat([e]))},i)};if(arguments.length>2){var r=Array.prototype.slice.call(arguments,2);return n.apply(this,r)}return n};i.applyEach=f(E),i.applyEachSeries=h(E),i.forever=function(t,e){function n(r){if(r){if(e)return e(r);throw r}t(n)}n()},n!==void 0&&n.amd?n("async",[],function(){return i}):"undefined"!=typeof module&&module.exports?module.exports=i:e.async=i}(),n("src/providers/memory",["require","src/constants","async"],function(t){function e(t,e){this.readOnly=e,this.objectStore=t}function n(t){this.name=t||r,this.db={}}var r=t("src/constants").FILE_SYSTEM_NAME,i=t("async").nextTick;return e.prototype.clear=function(t){if(this.readOnly)return i(function(){t("[MemoryContext] Error: write operation on read only context")}),void 0;var e=this.objectStore;Object.keys(e).forEach(function(t){delete e[t]}),i(t)},e.prototype.get=function(t,e){var n=this;i(function(){e(null,n.objectStore[t])})},e.prototype.put=function(t,e,n){return this.readOnly?(i(function(){n("[MemoryContext] Error: write operation on read only context")}),void 0):(this.objectStore[t]=e,i(n),void 0)},e.prototype.delete=function(t,e){return this.readOnly?(i(function(){e("[MemoryContext] Error: write operation on read only context")}),void 0):(delete this.objectStore[t],i(e),void 0)},n.isSupported=function(){return!0},n.prototype.open=function(t){i(function(){t(null,!0)})},n.prototype.getReadOnlyContext=function(){return new e(this.db,!0)},n.prototype.getReadWriteContext=function(){return new e(this.db,!1)},n}),n("src/providers/providers",["require","src/providers/indexeddb","src/providers/websql","src/providers/memory"],function(t){var e=t("src/providers/indexeddb"),n=t("src/providers/websql"),r=t("src/providers/memory");return{IndexedDB:e,WebSQL:n,Memory:r,Default:e,Fallback:function(){function t(){throw"[Filer Error] Your browser doesn't support IndexedDB or WebSQL."}return e.isSupported()?e:n.isSupported()?n:(t.isSupported=function(){return!1},t)}()}}),function(){function t(t){throw t}function e(t,e){var n=t.split("."),r=A;!(n[0]in r)&&r.execScript&&r.execScript("var "+n[0]);for(var i;n.length&&(i=n.shift());)n.length||e===w?r=r[i]?r[i]:r[i]={}:r[i]=e}function n(e,n){this.index="number"==typeof n?n:0,this.i=0,this.buffer=e instanceof(k?Uint8Array:Array)?e:new(k?Uint8Array:Array)(32768),2*this.buffer.length<=this.index&&t(Error("invalid index")),this.buffer.length<=this.index&&this.f()}function r(t){this.buffer=new(k?Uint16Array:Array)(2*t),this.length=0}function i(t){var e,n,r,i,o,s,a,c,u,f=t.length,l=0,h=Number.POSITIVE_INFINITY;for(c=0;f>c;++c)t[c]>l&&(l=t[c]),h>t[c]&&(h=t[c]);for(e=1<<l,n=new(k?Uint32Array:Array)(e),r=1,i=0,o=2;l>=r;){for(c=0;f>c;++c)if(t[c]===r){for(s=0,a=i,u=0;r>u;++u)s=s<<1|1&a,a>>=1;for(u=s;e>u;u+=o)n[u]=r<<16|c;++i}++r,i<<=1,o<<=1}return[n,l,h]}function o(t,e){this.h=N,this.w=0,this.input=k&&t instanceof Array?new Uint8Array(t):t,this.b=0,e&&(e.lazy&&(this.w=e.lazy),"number"==typeof e.compressionType&&(this.h=e.compressionType),e.outputBuffer&&(this.a=k&&e.outputBuffer instanceof Array?new Uint8Array(e.outputBuffer):e.outputBuffer),"number"==typeof e.outputIndex&&(this.b=e.outputIndex)),this.a||(this.a=new(k?Uint8Array:Array)(32768))}function s(t,e){this.length=t,this.G=e}function a(e,n){function r(e,n){var r,i=e.G,o=[],s=0;r=M[e.length],o[s++]=65535&r,o[s++]=255&r>>16,o[s++]=r>>24;var a;switch(E){case 1===i:a=[0,i-1,0];break;case 2===i:a=[1,i-2,0];break;case 3===i:a=[2,i-3,0];break;case 4===i:a=[3,i-4,0];break;case 6>=i:a=[4,i-5,1];break;case 8>=i:a=[5,i-7,1];break;case 12>=i:a=[6,i-9,2];break;case 16>=i:a=[7,i-13,2];break;case 24>=i:a=[8,i-17,3];break;case 32>=i:a=[9,i-25,3];break;case 48>=i:a=[10,i-33,4];break;case 64>=i:a=[11,i-49,4];break;case 96>=i:a=[12,i-65,5];break;case 128>=i:a=[13,i-97,5];break;case 192>=i:a=[14,i-129,6];break;case 256>=i:a=[15,i-193,6];break;case 384>=i:a=[16,i-257,7];break;case 512>=i:a=[17,i-385,7];break;case 768>=i:a=[18,i-513,8];break;case 1024>=i:a=[19,i-769,8];break;case 1536>=i:a=[20,i-1025,9];break;case 2048>=i:a=[21,i-1537,9];break;case 3072>=i:a=[22,i-2049,10];break;case 4096>=i:a=[23,i-3073,10];break;case 6144>=i:a=[24,i-4097,11];break;case 8192>=i:a=[25,i-6145,11];break;case 12288>=i:a=[26,i-8193,12];break;case 16384>=i:a=[27,i-12289,12];break;case 24576>=i:a=[28,i-16385,13];break;case 32768>=i:a=[29,i-24577,13];break;default:t("invalid distance")}r=a,o[s++]=r[0],o[s++]=r[1],o[s++]=r[2];var c,u;for(c=0,u=o.length;u>c;++c)g[y++]=o[c];m[o[0]]++,b[o[3]]++,v=e.length+n-1,h=null
}var i,o,s,a,u,f,l,h,p,d={},g=k?new Uint16Array(2*n.length):[],y=0,v=0,m=new(k?Uint32Array:Array)(286),b=new(k?Uint32Array:Array)(30),A=e.w;if(!k){for(s=0;285>=s;)m[s++]=0;for(s=0;29>=s;)b[s++]=0}for(m[256]=1,i=0,o=n.length;o>i;++i){for(s=u=0,a=3;a>s&&i+s!==o;++s)u=u<<8|n[i+s];if(d[u]===w&&(d[u]=[]),f=d[u],!(v-->0)){for(;f.length>0&&i-f[0]>32768;)f.shift();if(i+3>=o){for(h&&r(h,-1),s=0,a=o-i;a>s;++s)p=n[i+s],g[y++]=p,++m[p];break}f.length>0?(l=c(n,i,f),h?h.length<l.length?(p=n[i-1],g[y++]=p,++m[p],r(l,0)):r(h,-1):A>l.length?h=l:r(l,0)):h?r(h,-1):(p=n[i],g[y++]=p,++m[p])}f.push(i)}return g[y++]=256,m[256]++,e.L=m,e.K=b,k?g.subarray(0,y):g}function c(t,e,n){var r,i,o,a,c,u,f=0,l=t.length;a=0,u=n.length;t:for(;u>a;a++){if(r=n[u-a-1],o=3,f>3){for(c=f;c>3;c--)if(t[r+c-1]!==t[e+c-1])continue t;o=f}for(;258>o&&l>e+o&&t[r+o]===t[e+o];)++o;if(o>f&&(i=r,f=o),258===o)break}return new s(f,e-i)}function u(t,e){var n,i,o,s,a,c=t.length,u=new r(572),l=new(k?Uint8Array:Array)(c);if(!k)for(s=0;c>s;s++)l[s]=0;for(s=0;c>s;++s)t[s]>0&&u.push(s,t[s]);if(n=Array(u.length/2),i=new(k?Uint32Array:Array)(u.length/2),1===n.length)return l[u.pop().index]=1,l;for(s=0,a=u.length/2;a>s;++s)n[s]=u.pop(),i[s]=n[s].value;for(o=f(i,i.length,e),s=0,a=n.length;a>s;++s)l[n[s].index]=o[s];return l}function f(t,e,n){function r(t){var n=p[t][d[t]];n===e?(r(t+1),r(t+1)):--l[n],++d[t]}var i,o,s,a,c,u=new(k?Uint16Array:Array)(n),f=new(k?Uint8Array:Array)(n),l=new(k?Uint8Array:Array)(e),h=Array(n),p=Array(n),d=Array(n),g=(1<<n)-e,y=1<<n-1;for(u[n-1]=e,o=0;n>o;++o)y>g?f[o]=0:(f[o]=1,g-=y),g<<=1,u[n-2-o]=(0|u[n-1-o]/2)+e;for(u[0]=f[0],h[0]=Array(u[0]),p[0]=Array(u[0]),o=1;n>o;++o)u[o]>2*u[o-1]+f[o]&&(u[o]=2*u[o-1]+f[o]),h[o]=Array(u[o]),p[o]=Array(u[o]);for(i=0;e>i;++i)l[i]=n;for(s=0;u[n-1]>s;++s)h[n-1][s]=t[s],p[n-1][s]=s;for(i=0;n>i;++i)d[i]=0;for(1===f[n-1]&&(--l[0],++d[n-1]),o=n-2;o>=0;--o){for(a=i=0,c=d[o+1],s=0;u[o]>s;s++)a=h[o+1][c]+h[o+1][c+1],a>t[i]?(h[o][s]=a,p[o][s]=e,c+=2):(h[o][s]=t[i],p[o][s]=i,++i);d[o]=0,1===f[o]&&r(o)}return l}function l(t){var e,n,r,i,o=new(k?Uint16Array:Array)(t.length),s=[],a=[],c=0;for(e=0,n=t.length;n>e;e++)s[t[e]]=(0|s[t[e]])+1;for(e=1,n=16;n>=e;e++)a[e]=c,c+=0|s[e],c<<=1;for(e=0,n=t.length;n>e;e++)for(c=a[t[e]],a[t[e]]+=1,r=o[e]=0,i=t[e];i>r;r++)o[e]=o[e]<<1|1&c,c>>>=1;return o}function h(e,n){switch(this.l=[],this.m=32768,this.e=this.g=this.c=this.q=0,this.input=k?new Uint8Array(e):e,this.s=!1,this.n=L,this.B=!1,(n||!(n={}))&&(n.index&&(this.c=n.index),n.bufferSize&&(this.m=n.bufferSize),n.bufferType&&(this.n=n.bufferType),n.resize&&(this.B=n.resize)),this.n){case F:this.b=32768,this.a=new(k?Uint8Array:Array)(32768+this.m+258);break;case L:this.b=0,this.a=new(k?Uint8Array:Array)(this.m),this.f=this.J,this.t=this.H,this.o=this.I;break;default:t(Error("invalid inflate mode"))}}function p(e,n){for(var r,i=e.g,o=e.e,s=e.input,a=e.c;n>o;)r=s[a++],r===w&&t(Error("input buffer is broken")),i|=r<<o,o+=8;return r=i&(1<<n)-1,e.g=i>>>n,e.e=o-n,e.c=a,r}function d(t,e){for(var n,r,i,o=t.g,s=t.e,a=t.input,c=t.c,u=e[0],f=e[1];f>s&&(n=a[c++],n!==w);)o|=n<<s,s+=8;return r=u[o&(1<<f)-1],i=r>>>16,t.g=o>>i,t.e=s-i,t.c=c,65535&r}function g(t){function e(t,e,n){var r,i,o,s;for(s=0;t>s;)switch(r=d(this,e)){case 16:for(o=3+p(this,2);o--;)n[s++]=i;break;case 17:for(o=3+p(this,3);o--;)n[s++]=0;i=0;break;case 18:for(o=11+p(this,7);o--;)n[s++]=0;i=0;break;default:i=n[s++]=r}return n}var n,r,o,s,a=p(t,5)+257,c=p(t,5)+1,u=p(t,4)+4,f=new(k?Uint8Array:Array)(V.length);for(s=0;u>s;++s)f[V[s]]=p(t,3);n=i(f),r=new(k?Uint8Array:Array)(a),o=new(k?Uint8Array:Array)(c),t.o(i(e.call(t,a,n,r)),i(e.call(t,c,n,o)))}function y(t){if("string"==typeof t){var e,n,r=t.split("");for(e=0,n=r.length;n>e;e++)r[e]=(255&r[e].charCodeAt(0))>>>0;t=r}for(var i,o=1,s=0,a=t.length,c=0;a>0;){i=a>1024?1024:a,a-=i;do o+=t[c++],s+=o;while(--i);o%=65521,s%=65521}return(s<<16|o)>>>0}function v(e,n){var r,i;switch(this.input=e,this.c=0,(n||!(n={}))&&(n.index&&(this.c=n.index),n.verify&&(this.M=n.verify)),r=e[this.c++],i=e[this.c++],15&r){case re:this.method=re;break;default:t(Error("unsupported compression method"))}0!==((r<<8)+i)%31&&t(Error("invalid fcheck flag:"+((r<<8)+i)%31)),32&i&&t(Error("fdict flag is not supported")),this.A=new h(e,{index:this.c,bufferSize:n.bufferSize,bufferType:n.bufferType,resize:n.resize})}function m(t,e){this.input=t,this.a=new(k?Uint8Array:Array)(32768),this.h=ie.k;var n,r={};!e&&(e={})||"number"!=typeof e.compressionType||(this.h=e.compressionType);for(n in e)r[n]=e[n];r.outputBuffer=this.a,this.z=new o(this.input,r)}function b(t,n){var r,i,o,s;if(Object.keys)r=Object.keys(n);else for(i in r=[],o=0,n)r[o++]=i;for(o=0,s=r.length;s>o;++o)i=r[o],e(t+"."+i,n[i])}var w=void 0,E=!0,A=this,k="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array;n.prototype.f=function(){var t,e=this.buffer,n=e.length,r=new(k?Uint8Array:Array)(n<<1);if(k)r.set(e);else for(t=0;n>t;++t)r[t]=e[t];return this.buffer=r},n.prototype.d=function(t,e,n){var r,i=this.buffer,o=this.index,s=this.i,a=i[o];if(n&&e>1&&(t=e>8?(T[255&t]<<24|T[255&t>>>8]<<16|T[255&t>>>16]<<8|T[255&t>>>24])>>32-e:T[t]>>8-e),8>e+s)a=a<<e|t,s+=e;else for(r=0;e>r;++r)a=a<<1|1&t>>e-r-1,8===++s&&(s=0,i[o++]=T[a],a=0,o===i.length&&(i=this.f()));i[o]=a,this.buffer=i,this.i=s,this.index=o},n.prototype.finish=function(){var t,e=this.buffer,n=this.index;return this.i>0&&(e[n]<<=8-this.i,e[n]=T[e[n]],n++),k?t=e.subarray(0,n):(e.length=n,t=e),t};var _,x=new(k?Uint8Array:Array)(256);for(_=0;256>_;++_){for(var S=_,O=S,I=7,S=S>>>1;S;S>>>=1)O<<=1,O|=1&S,--I;x[_]=(255&O<<I)>>>0}var T=x;r.prototype.getParent=function(t){return 2*(0|(t-2)/4)},r.prototype.push=function(t,e){var n,r,i,o=this.buffer;for(n=this.length,o[this.length++]=e,o[this.length++]=t;n>0&&(r=this.getParent(n),o[n]>o[r]);)i=o[n],o[n]=o[r],o[r]=i,i=o[n+1],o[n+1]=o[r+1],o[r+1]=i,n=r;return this.length},r.prototype.pop=function(){var t,e,n,r,i,o=this.buffer;for(e=o[0],t=o[1],this.length-=2,o[0]=o[this.length],o[1]=o[this.length+1],i=0;(r=2*i+2,!(r>=this.length))&&(this.length>r+2&&o[r+2]>o[r]&&(r+=2),o[r]>o[i]);)n=o[i],o[i]=o[r],o[r]=n,n=o[i+1],o[i+1]=o[r+1],o[r+1]=n,i=r;return{index:t,value:e,length:this.length}};var D,N=2,R={NONE:0,r:1,k:N,N:3},U=[];for(D=0;288>D;D++)switch(E){case 143>=D:U.push([D+48,8]);break;case 255>=D:U.push([D-144+400,9]);break;case 279>=D:U.push([D-256+0,7]);break;case 287>=D:U.push([D-280+192,8]);break;default:t("invalid literal: "+D)}o.prototype.j=function(){var e,r,i,o,s=this.input;switch(this.h){case 0:for(i=0,o=s.length;o>i;){r=k?s.subarray(i,i+65535):s.slice(i,i+65535),i+=r.length;var c=r,f=i===o,h=w,p=w,d=w,g=w,y=w,v=this.a,m=this.b;if(k){for(v=new Uint8Array(this.a.buffer);v.length<=m+c.length+5;)v=new Uint8Array(v.length<<1);v.set(this.a)}if(h=f?1:0,v[m++]=0|h,p=c.length,d=65535&~p+65536,v[m++]=255&p,v[m++]=255&p>>>8,v[m++]=255&d,v[m++]=255&d>>>8,k)v.set(c,m),m+=c.length,v=v.subarray(0,m);else{for(g=0,y=c.length;y>g;++g)v[m++]=c[g];v.length=m}this.b=m,this.a=v}break;case 1:var b=new n(k?new Uint8Array(this.a.buffer):this.a,this.b);b.d(1,1,E),b.d(1,2,E);var A,_,x,S=a(this,s);for(A=0,_=S.length;_>A;A++)if(x=S[A],n.prototype.d.apply(b,U[x]),x>256)b.d(S[++A],S[++A],E),b.d(S[++A],5),b.d(S[++A],S[++A],E);else if(256===x)break;this.a=b.finish(),this.b=this.a.length;break;case N:var O,I,T,D,R,C,M,F,L,B,z,j,P,V,q,H=new n(k?new Uint8Array(this.a.buffer):this.a,this.b),W=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Y=Array(19);for(O=N,H.d(1,1,E),H.d(O,2,E),I=a(this,s),C=u(this.L,15),M=l(C),F=u(this.K,7),L=l(F),T=286;T>257&&0===C[T-1];T--);for(D=30;D>1&&0===F[D-1];D--);var X,Z,K,J,G,Q,$=T,te=D,ee=new(k?Uint32Array:Array)($+te),ne=new(k?Uint32Array:Array)(316),re=new(k?Uint8Array:Array)(19);for(X=Z=0;$>X;X++)ee[Z++]=C[X];for(X=0;te>X;X++)ee[Z++]=F[X];if(!k)for(X=0,J=re.length;J>X;++X)re[X]=0;for(X=G=0,J=ee.length;J>X;X+=Z){for(Z=1;J>X+Z&&ee[X+Z]===ee[X];++Z);if(K=Z,0===ee[X])if(3>K)for(;K-->0;)ne[G++]=0,re[0]++;else for(;K>0;)Q=138>K?K:138,Q>K-3&&K>Q&&(Q=K-3),10>=Q?(ne[G++]=17,ne[G++]=Q-3,re[17]++):(ne[G++]=18,ne[G++]=Q-11,re[18]++),K-=Q;else if(ne[G++]=ee[X],re[ee[X]]++,K--,3>K)for(;K-->0;)ne[G++]=ee[X],re[ee[X]]++;else for(;K>0;)Q=6>K?K:6,Q>K-3&&K>Q&&(Q=K-3),ne[G++]=16,ne[G++]=Q-3,re[16]++,K-=Q}for(e=k?ne.subarray(0,G):ne.slice(0,G),B=u(re,7),V=0;19>V;V++)Y[V]=B[W[V]];for(R=19;R>4&&0===Y[R-1];R--);for(z=l(B),H.d(T-257,5,E),H.d(D-1,5,E),H.d(R-4,4,E),V=0;R>V;V++)H.d(Y[V],3,E);for(V=0,q=e.length;q>V;V++)if(j=e[V],H.d(z[j],B[j],E),j>=16){switch(V++,j){case 16:P=2;break;case 17:P=3;break;case 18:P=7;break;default:t("invalid code: "+j)}H.d(e[V],P,E)}var ie,oe,se,ae,ce,ue,fe,le,he=[M,C],pe=[L,F];for(ce=he[0],ue=he[1],fe=pe[0],le=pe[1],ie=0,oe=I.length;oe>ie;++ie)if(se=I[ie],H.d(ce[se],ue[se],E),se>256)H.d(I[++ie],I[++ie],E),ae=I[++ie],H.d(fe[ae],le[ae],E),H.d(I[++ie],I[++ie],E);else if(256===se)break;this.a=H.finish(),this.b=this.a.length;break;default:t("invalid compression type")}return this.a};var C=function(){function e(e){switch(E){case 3===e:return[257,e-3,0];case 4===e:return[258,e-4,0];case 5===e:return[259,e-5,0];case 6===e:return[260,e-6,0];case 7===e:return[261,e-7,0];case 8===e:return[262,e-8,0];case 9===e:return[263,e-9,0];case 10===e:return[264,e-10,0];case 12>=e:return[265,e-11,1];case 14>=e:return[266,e-13,1];case 16>=e:return[267,e-15,1];case 18>=e:return[268,e-17,1];case 22>=e:return[269,e-19,2];case 26>=e:return[270,e-23,2];case 30>=e:return[271,e-27,2];case 34>=e:return[272,e-31,2];case 42>=e:return[273,e-35,3];case 50>=e:return[274,e-43,3];case 58>=e:return[275,e-51,3];case 66>=e:return[276,e-59,3];case 82>=e:return[277,e-67,4];case 98>=e:return[278,e-83,4];case 114>=e:return[279,e-99,4];case 130>=e:return[280,e-115,4];case 162>=e:return[281,e-131,5];case 194>=e:return[282,e-163,5];case 226>=e:return[283,e-195,5];case 257>=e:return[284,e-227,5];case 258===e:return[285,e-258,0];default:t("invalid length: "+e)}}var n,r,i=[];for(n=3;258>=n;n++)r=e(n),i[n]=r[2]<<24|r[1]<<16|r[0];return i}(),M=k?new Uint32Array(C):C,F=0,L=1,B={D:F,C:L};h.prototype.p=function(){for(;!this.s;){var e=p(this,3);switch(1&e&&(this.s=E),e>>>=1){case 0:var n=this.input,r=this.c,i=this.a,o=this.b,s=w,a=w,c=w,u=i.length,f=w;switch(this.e=this.g=0,s=n[r++],s===w&&t(Error("invalid uncompressed block header: LEN (first byte)")),a=s,s=n[r++],s===w&&t(Error("invalid uncompressed block header: LEN (second byte)")),a|=s<<8,s=n[r++],s===w&&t(Error("invalid uncompressed block header: NLEN (first byte)")),c=s,s=n[r++],s===w&&t(Error("invalid uncompressed block header: NLEN (second byte)")),c|=s<<8,a===~c&&t(Error("invalid uncompressed block header: length verify")),r+a>n.length&&t(Error("input buffer is broken")),this.n){case F:for(;o+a>i.length;){if(f=u-o,a-=f,k)i.set(n.subarray(r,r+f),o),o+=f,r+=f;else for(;f--;)i[o++]=n[r++];this.b=o,i=this.f(),o=this.b}break;case L:for(;o+a>i.length;)i=this.f({v:2});break;default:t(Error("invalid inflate mode"))}if(k)i.set(n.subarray(r,r+a),o),o+=a,r+=a;else for(;a--;)i[o++]=n[r++];this.c=r,this.b=o,this.a=i;break;case 1:this.o(te,ne);break;case 2:g(this);break;default:t(Error("unknown BTYPE: "+e))}}return this.t()};var z,j,P=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],V=k?new Uint16Array(P):P,q=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],H=k?new Uint16Array(q):q,W=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],Y=k?new Uint8Array(W):W,X=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],Z=k?new Uint16Array(X):X,K=[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],J=k?new Uint8Array(K):K,G=new(k?Uint8Array:Array)(288);for(z=0,j=G.length;j>z;++z)G[z]=143>=z?8:255>=z?9:279>=z?7:8;var Q,$,te=i(G),ee=new(k?Uint8Array:Array)(30);for(Q=0,$=ee.length;$>Q;++Q)ee[Q]=5;var ne=i(ee);h.prototype.o=function(t,e){var n=this.a,r=this.b;this.u=t;for(var i,o,s,a,c=n.length-258;256!==(i=d(this,t));)if(256>i)r>=c&&(this.b=r,n=this.f(),r=this.b),n[r++]=i;else for(o=i-257,a=H[o],Y[o]>0&&(a+=p(this,Y[o])),i=d(this,e),s=Z[i],J[i]>0&&(s+=p(this,J[i])),r>=c&&(this.b=r,n=this.f(),r=this.b);a--;)n[r]=n[r++-s];for(;this.e>=8;)this.e-=8,this.c--;this.b=r},h.prototype.I=function(t,e){var n=this.a,r=this.b;this.u=t;for(var i,o,s,a,c=n.length;256!==(i=d(this,t));)if(256>i)r>=c&&(n=this.f(),c=n.length),n[r++]=i;else for(o=i-257,a=H[o],Y[o]>0&&(a+=p(this,Y[o])),i=d(this,e),s=Z[i],J[i]>0&&(s+=p(this,J[i])),r+a>c&&(n=this.f(),c=n.length);a--;)n[r]=n[r++-s];for(;this.e>=8;)this.e-=8,this.c--;this.b=r},h.prototype.f=function(){var t,e,n=new(k?Uint8Array:Array)(this.b-32768),r=this.b-32768,i=this.a;if(k)n.set(i.subarray(32768,n.length));else for(t=0,e=n.length;e>t;++t)n[t]=i[t+32768];if(this.l.push(n),this.q+=n.length,k)i.set(i.subarray(r,r+32768));else for(t=0;32768>t;++t)i[t]=i[r+t];return this.b=32768,i},h.prototype.J=function(t){var e,n,r,i,o=0|this.input.length/this.c+1,s=this.input,a=this.a;return t&&("number"==typeof t.v&&(o=t.v),"number"==typeof t.F&&(o+=t.F)),2>o?(n=(s.length-this.c)/this.u[2],i=0|258*(n/2),r=a.length>i?a.length+i:a.length<<1):r=a.length*o,k?(e=new Uint8Array(r),e.set(a)):e=a,this.a=e},h.prototype.t=function(){var t,e,n,r,i,o=0,s=this.a,a=this.l,c=new(k?Uint8Array:Array)(this.q+(this.b-32768));if(0===a.length)return k?this.a.subarray(32768,this.b):this.a.slice(32768,this.b);for(e=0,n=a.length;n>e;++e)for(t=a[e],r=0,i=t.length;i>r;++r)c[o++]=t[r];for(e=32768,n=this.b;n>e;++e)c[o++]=s[e];return this.l=[],this.buffer=c},h.prototype.H=function(){var t,e=this.b;return k?this.B?(t=new Uint8Array(e),t.set(this.a.subarray(0,e))):t=this.a.subarray(0,e):(this.a.length>e&&(this.a.length=e),t=this.a),this.buffer=t},v.prototype.p=function(){var e,n,r=this.input;return e=this.A.p(),this.c=this.A.c,this.M&&(n=(r[this.c++]<<24|r[this.c++]<<16|r[this.c++]<<8|r[this.c++])>>>0,n!==y(e)&&t(Error("invalid adler-32 checksum"))),e};var re=8,ie=R;m.prototype.j=function(){var e,n,r,i,o,s,a,c=0;switch(a=this.a,e=re){case re:n=Math.LOG2E*Math.log(32768)-8;break;default:t(Error("invalid compression method"))}switch(r=n<<4|e,a[c++]=r,e){case re:switch(this.h){case ie.NONE:o=0;break;case ie.r:o=1;break;case ie.k:o=2;break;default:t(Error("unsupported compression type"))}break;default:t(Error("invalid compression method"))}return i=0|o<<6,a[c++]=i|31-(256*r+i)%31,s=y(this.input),this.z.b=c,a=this.z.j(),c=a.length,k&&(a=new Uint8Array(a.buffer),c+4>=a.length&&(this.a=new Uint8Array(a.length+4),this.a.set(a),a=this.a),a=a.subarray(0,c+4)),a[c++]=255&s>>24,a[c++]=255&s>>16,a[c++]=255&s>>8,a[c++]=255&s,a},e("Zlib.Inflate",v),e("Zlib.Inflate.prototype.decompress",v.prototype.p),b("Zlib.Inflate.BufferType",{ADAPTIVE:B.C,BLOCK:B.D}),e("Zlib.Deflate",m),e("Zlib.Deflate.compress",function(t,e){return new m(t,e).j()}),e("Zlib.Deflate.prototype.compress",m.prototype.j),b("Zlib.Deflate.CompressionType",{NONE:ie.NONE,FIXED:ie.r,DYNAMIC:ie.k})}.call(this),n("zlib",function(){}),n("src/adapters/zlib",["require","zlib"],function(t){function e(t){return new o(t).decompress()}function n(t){return new s(t).compress()}function r(t){this.context=t}function i(t){this.provider=t}t("zlib");var o=Zlib.Inflate,s=Zlib.Deflate;return r.prototype.clear=function(t){this.context.clear(t)},r.prototype.get=function(t,n){this.context.get(t,function(t,r){return t?(n(t),void 0):(r&&(r=e(r)),n(null,r),void 0)})},r.prototype.put=function(t,e,r){e=n(e),this.context.put(t,e,r)},r.prototype.delete=function(t,e){this.context.delete(t,e)},i.isSupported=function(){return!0},i.prototype.open=function(t){this.provider.open(t)},i.prototype.getReadOnlyContext=function(){return new r(this.provider.getReadOnlyContext())},i.prototype.getReadWriteContext=function(){return new r(this.provider.getReadWriteContext())},i});var r=r||function(t,e){var n={},r=n.lib={},i=r.Base=function(){function t(){}return{extend:function(e){t.prototype=this;var n=new t;return e&&n.mixIn(e),n.$super=this,n},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.$super.extend(this)}}}(),o=r.WordArray=i.extend({init:function(t,n){t=this.words=t||[],this.sigBytes=n!=e?n:4*t.length},toString:function(t){return(t||a).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,t=t.sigBytes;if(this.clamp(),r%4)for(var i=0;t>i;i++)e[r+i>>>2]|=(255&n[i>>>2]>>>24-8*(i%4))<<24-8*((r+i)%4);else if(n.length>65535)for(i=0;t>i;i+=4)e[r+i>>>2]=n[i>>>2];else e.push.apply(e,n);return this.sigBytes+=t,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-8*(n%4),e.length=t.ceil(n/4)},clone:function(){var t=i.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var n=[],r=0;e>r;r+=4)n.push(0|4294967296*t.random());return o.create(n,e)}}),s=n.enc={},a=s.Hex={stringify:function(t){for(var e=t.words,t=t.sigBytes,n=[],r=0;t>r;r++){var i=255&e[r>>>2]>>>24-8*(r%4);n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,n=[],r=0;e>r;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-4*(r%8);return o.create(n,e/2)}},c=s.Latin1={stringify:function(t){for(var e=t.words,t=t.sigBytes,n=[],r=0;t>r;r++)n.push(String.fromCharCode(255&e[r>>>2]>>>24-8*(r%4)));return n.join("")},parse:function(t){for(var e=t.length,n=[],r=0;e>r;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-8*(r%4);return o.create(n,e)}},u=s.Utf8={stringify:function(t){try{return decodeURIComponent(escape(c.stringify(t)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(t){return c.parse(unescape(encodeURIComponent(t)))}},f=r.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=o.create(),this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=u.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n=this._data,r=n.words,i=n.sigBytes,s=this.blockSize,a=i/(4*s),a=e?t.ceil(a):t.max((0|a)-this._minBufferSize,0),e=a*s,i=t.min(4*e,i);if(e){for(var c=0;e>c;c+=s)this._doProcessBlock(r,c);c=r.splice(0,e),n.sigBytes-=i}return o.create(c,i)},clone:function(){var t=i.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});r.Hasher=f.extend({init:function(){this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize(),this._hash},clone:function(){var t=f.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:16,_createHelper:function(t){return function(e,n){return t.create(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return l.HMAC.create(t,n).finalize(e)}}});var l=n.algo={};return n}(Math);(function(){var t=r,e=t.lib.WordArray;t.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp();for(var t=[],i=0;n>i;i+=3)for(var o=(255&e[i>>>2]>>>24-8*(i%4))<<16|(255&e[i+1>>>2]>>>24-8*((i+1)%4))<<8|255&e[i+2>>>2]>>>24-8*((i+2)%4),s=0;4>s&&n>i+.75*s;s++)t.push(r.charAt(63&o>>>6*(3-s)));if(e=r.charAt(64))for(;t.length%4;)t.push(e);return t.join("")},parse:function(t){var t=t.replace(/\s/g,""),n=t.length,r=this._map,i=r.charAt(64);i&&(i=t.indexOf(i),-1!=i&&(n=i));for(var i=[],o=0,s=0;n>s;s++)if(s%4){var a=r.indexOf(t.charAt(s-1))<<2*(s%4),c=r.indexOf(t.charAt(s))>>>6-2*(s%4);i[o>>>2]|=(a|c)<<24-8*(o%4),o++}return e.create(i,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(),function(t){function e(t,e,n,r,i,o,s){return t=t+(e&n|~e&r)+i+s,(t<<o|t>>>32-o)+e}function n(t,e,n,r,i,o,s){return t=t+(e&r|n&~r)+i+s,(t<<o|t>>>32-o)+e}function i(t,e,n,r,i,o,s){return t=t+(e^n^r)+i+s,(t<<o|t>>>32-o)+e}function o(t,e,n,r,i,o,s){return t=t+(n^(e|~r))+i+s,(t<<o|t>>>32-o)+e}var s=r,a=s.lib,c=a.WordArray,a=a.Hasher,u=s.algo,f=[];(function(){for(var e=0;64>e;e++)f[e]=0|4294967296*t.abs(t.sin(e+1))})(),u=u.MD5=a.extend({_doReset:function(){this._hash=c.create([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,r){for(var s=0;16>s;s++){var a=r+s,c=t[a];t[a]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}for(var a=this._hash.words,c=a[0],u=a[1],l=a[2],h=a[3],s=0;64>s;s+=4)16>s?(c=e(c,u,l,h,t[r+s],7,f[s]),h=e(h,c,u,l,t[r+s+1],12,f[s+1]),l=e(l,h,c,u,t[r+s+2],17,f[s+2]),u=e(u,l,h,c,t[r+s+3],22,f[s+3])):32>s?(c=n(c,u,l,h,t[r+(s+1)%16],5,f[s]),h=n(h,c,u,l,t[r+(s+6)%16],9,f[s+1]),l=n(l,h,c,u,t[r+(s+11)%16],14,f[s+2]),u=n(u,l,h,c,t[r+s%16],20,f[s+3])):48>s?(c=i(c,u,l,h,t[r+(3*s+5)%16],4,f[s]),h=i(h,c,u,l,t[r+(3*s+8)%16],11,f[s+1]),l=i(l,h,c,u,t[r+(3*s+11)%16],16,f[s+2]),u=i(u,l,h,c,t[r+(3*s+14)%16],23,f[s+3])):(c=o(c,u,l,h,t[r+3*s%16],6,f[s]),h=o(h,c,u,l,t[r+(3*s+7)%16],10,f[s+1]),l=o(l,h,c,u,t[r+(3*s+14)%16],15,f[s+2]),u=o(u,l,h,c,t[r+(3*s+5)%16],21,f[s+3]));a[0]=0|a[0]+c,a[1]=0|a[1]+u,a[2]=0|a[2]+l,a[3]=0|a[3]+h},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;for(e[r>>>5]|=128<<24-r%32,e[(r+64>>>9<<4)+14]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),t.sigBytes=4*(e.length+1),this._process(),t=this._hash.words,e=0;4>e;e++)n=t[e],t[e]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}}),s.MD5=a._createHelper(u),s.HmacMD5=a._createHmacHelper(u)}(Math),function(){var t=r,e=t.lib,n=e.Base,i=e.WordArray,e=t.algo,o=e.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:e.MD5,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n=this.cfg,r=n.hasher.create(),o=i.create(),s=o.words,a=n.keySize,n=n.iterations;a>s.length;){c&&r.update(c);var c=r.update(t).finalize(e);r.reset();for(var u=1;n>u;u++)c=r.finalize(c),r.reset();o.concat(c)}return o.sigBytes=4*a,o}});t.EvpKDF=function(t,e,n){return o.create(n).compute(t,e)}}(),r.lib.Cipher||function(t){var e=r,n=e.lib,i=n.Base,o=n.WordArray,s=n.BufferedBlockAlgorithm,a=e.enc.Base64,c=e.algo.EvpKDF,u=n.Cipher=s.extend({cfg:i.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,n){this.cfg=this.cfg.extend(n),this._xformMode=t,this._key=e,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){return function(t){return{encrypt:function(e,n,r){return("string"==typeof n?g:d).encrypt(t,e,n,r)},decrypt:function(e,n,r){return("string"==typeof n?g:d).decrypt(t,e,n,r)}}}}()});n.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var f=e.mode={},l=n.BlockCipherMode=i.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),f=f.CBC=function(){function e(e,n,r){var i=this._iv;i?this._iv=t:i=this._prevBlock;for(var o=0;r>o;o++)e[n+o]^=i[o]}var n=l.extend();return n.Encryptor=n.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize;e.call(this,t,n,i),r.encryptBlock(t,n),this._prevBlock=t.slice(n,n+i)}}),n.Decryptor=n.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize,o=t.slice(n,n+i);r.decryptBlock(t,n),e.call(this,t,n,i),this._prevBlock=o}}),n}(),h=(e.pad={}).Pkcs7={pad:function(t,e){for(var n=4*e,n=n-t.sigBytes%n,r=n<<24|n<<16|n<<8|n,i=[],s=0;n>s;s+=4)i.push(r);n=o.create(i,n),t.concat(n)},unpad:function(t){t.sigBytes-=255&t.words[t.sigBytes-1>>>2]}};n.BlockCipher=u.extend({cfg:u.cfg.extend({mode:f,padding:h}),reset:function(){u.reset.call(this);var t=this.cfg,e=t.iv,t=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=t.createEncryptor;else n=t.createDecryptor,this._minBufferSize=1;this._mode=n.call(t,this,e&&e.words)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);var e=this._process(!0)}else e=this._process(!0),t.unpad(e);return e},blockSize:4});var p=n.CipherParams=i.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),f=(e.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,t=t.salt,e=(t?o.create([1398893684,1701076831]).concat(t).concat(e):e).toString(a);return e=e.replace(/(.{64})/g,"$1\n")},parse:function(t){var t=a.parse(t),e=t.words;if(1398893684==e[0]&&1701076831==e[1]){var n=o.create(e.slice(2,4));e.splice(0,4),t.sigBytes-=16}return p.create({ciphertext:t,salt:n})}},d=n.SerializableCipher=i.extend({cfg:i.extend({format:f}),encrypt:function(t,e,n,r){var r=this.cfg.extend(r),i=t.createEncryptor(n,r),e=i.finalize(e),i=i.cfg;return p.create({ciphertext:e,key:n,iv:i.iv,algorithm:t,mode:i.mode,padding:i.padding,blockSize:t.blockSize,formatter:r.format})},decrypt:function(t,e,n,r){return r=this.cfg.extend(r),e=this._parse(e,r.format),t.createDecryptor(n,r).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t):t}}),e=(e.kdf={}).OpenSSL={compute:function(t,e,n,r){return r||(r=o.random(8)),t=c.create({keySize:e+n}).compute(t,r),n=o.create(t.words.slice(e),4*n),t.sigBytes=4*e,p.create({key:t,iv:n,salt:r})}},g=n.PasswordBasedCipher=d.extend({cfg:d.cfg.extend({kdf:e}),encrypt:function(t,e,n,r){return r=this.cfg.extend(r),n=r.kdf.compute(n,t.keySize,t.ivSize),r.iv=n.iv,t=d.encrypt.call(this,t,e,n.key,r),t.mixIn(n),t},decrypt:function(t,e,n,r){return r=this.cfg.extend(r),e=this._parse(e,r.format),n=r.kdf.compute(n,t.keySize,t.ivSize,e.salt),r.iv=n.iv,d.decrypt.call(this,t,e,n.key,r)}})}(),function(){var t=r,e=t.lib.BlockCipher,n=t.algo,i=[],o=[],s=[],a=[],c=[],u=[],f=[],l=[],h=[],p=[];(function(){for(var t=[],e=0;256>e;e++)t[e]=128>e?e<<1:283^e<<1;for(var n=0,r=0,e=0;256>e;e++){var d=r^r<<1^r<<2^r<<3^r<<4,d=99^(d>>>8^255&d);i[n]=d,o[d]=n;var g=t[n],y=t[g],v=t[y],m=257*t[d]^16843008*d;s[n]=m<<24|m>>>8,a[n]=m<<16|m>>>16,c[n]=m<<8|m>>>24,u[n]=m,m=16843009*v^65537*y^257*g^16843008*n,f[d]=m<<24|m>>>8,l[d]=m<<16|m>>>16,h[d]=m<<8|m>>>24,p[d]=m,n?(n=g^t[t[t[v^g]]],r^=t[t[r]]):n=r=1}})();var d=[0,1,2,4,8,16,32,64,128,27,54],n=n.AES=e.extend({_doReset:function(){for(var t=this._key,e=t.words,n=t.sigBytes/4,t=4*((this._nRounds=n+6)+1),r=this._keySchedule=[],o=0;t>o;o++)if(n>o)r[o]=e[o];else{var s=r[o-1];o%n?n>6&&4==o%n&&(s=i[s>>>24]<<24|i[255&s>>>16]<<16|i[255&s>>>8]<<8|i[255&s]):(s=s<<8|s>>>24,s=i[s>>>24]<<24|i[255&s>>>16]<<16|i[255&s>>>8]<<8|i[255&s],s^=d[0|o/n]<<24),r[o]=r[o-n]^s}for(e=this._invKeySchedule=[],n=0;t>n;n++)o=t-n,s=n%4?r[o]:r[o-4],e[n]=4>n||4>=o?s:f[i[s>>>24]]^l[i[255&s>>>16]]^h[i[255&s>>>8]]^p[i[255&s]]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,s,a,c,u,i)},decryptBlock:function(t,e){var n=t[e+1];t[e+1]=t[e+3],t[e+3]=n,this._doCryptBlock(t,e,this._invKeySchedule,f,l,h,p,o),n=t[e+1],t[e+1]=t[e+3],t[e+3]=n},_doCryptBlock:function(t,e,n,r,i,o,s,a){for(var c=this._nRounds,u=t[e]^n[0],f=t[e+1]^n[1],l=t[e+2]^n[2],h=t[e+3]^n[3],p=4,d=1;c>d;d++)var g=r[u>>>24]^i[255&f>>>16]^o[255&l>>>8]^s[255&h]^n[p++],y=r[f>>>24]^i[255&l>>>16]^o[255&h>>>8]^s[255&u]^n[p++],v=r[l>>>24]^i[255&h>>>16]^o[255&u>>>8]^s[255&f]^n[p++],h=r[h>>>24]^i[255&u>>>16]^o[255&f>>>8]^s[255&l]^n[p++],u=g,f=y,l=v;g=(a[u>>>24]<<24|a[255&f>>>16]<<16|a[255&l>>>8]<<8|a[255&h])^n[p++],y=(a[f>>>24]<<24|a[255&l>>>16]<<16|a[255&h>>>8]<<8|a[255&u])^n[p++],v=(a[l>>>24]<<24|a[255&h>>>16]<<16|a[255&u>>>8]<<8|a[255&f])^n[p++],h=(a[h>>>24]<<24|a[255&u>>>16]<<16|a[255&f>>>8]<<8|a[255&l])^n[p++],t[e]=g,t[e+1]=y,t[e+2]=v,t[e+3]=h},keySize:8});t.AES=e._createHelper(n)}(),n("crypto-js/rollups/aes",function(){}),function(t){t["encoding-indexes"]=t["encoding-indexes"]||[]}(this),n("encoding-indexes-shim",function(){}),function(t){function e(t,e,n){return t>=e&&n>=t}function n(t,e){return Math.floor(t/e)}function r(t){var e=0;this.get=function(){return e>=t.length?B:Number(t[e])},this.offset=function(n){if(e+=n,0>e)throw Error("Seeking past start of the buffer");if(e>t.length)throw Error("Seeking past EOF")},this.match=function(n){if(n.length>e+t.length)return!1;var r;for(r=0;n.length>r;r+=1)if(Number(t[e+r])!==n[r])return!1;return!0}}function i(t){var e=0;this.emit=function(){var n,r=B;for(n=0;arguments.length>n;++n)r=Number(arguments[n]),t[e++]=r;return r}}function o(t){function n(t){for(var n=[],r=0,i=t.length;t.length>r;){var o=t.charCodeAt(r);if(e(o,55296,57343))if(e(o,56320,57343))n.push(65533);else if(r===i-1)n.push(65533);else{var s=t.charCodeAt(r+1);if(e(s,56320,57343)){var a=1023&o,c=1023&s;r+=1,n.push(65536+(a<<10)+c)}else n.push(65533)}else n.push(o);r+=1}return n}var r=0,i=n(t);this.offset=function(t){if(r+=t,0>r)throw Error("Seeking past start of the buffer");if(r>i.length)throw Error("Seeking past EOF")},this.get=function(){return r>=i.length?z:i[r]}}function s(){var t="";this.string=function(){return t},this.emit=function(e){65535>=e?t+=String.fromCharCode(e):(e-=65536,t+=String.fromCharCode(55296+(1023&e>>10)),t+=String.fromCharCode(56320+(1023&e)))}}function a(t){this.name="EncodingError",this.message=t,this.code=0}function c(t,e){if(t)throw new a("Decoder error");return e||65533}function u(t){throw new a("The code point "+t+" could not be encoded.")}function f(t){return t=(t+"").trim().toLowerCase(),Object.prototype.hasOwnProperty.call(V,t)?V[t]:null}function l(t,e){return(e||[])[t]||null}function h(t,e){var n=e.indexOf(t);return-1===n?null:n}function p(e){if(!("encoding-indexes"in t))throw Error("Indexes missing. Did you forget to include encoding-indexes.js?");return t["encoding-indexes"][e]}function d(t){if(t>39419&&189e3>t||t>1237575)return null;var e,n=0,r=0,i=p("gb18030");for(e=0;i.length>e;++e){var o=i[e];if(!(t>=o[0]))break;n=o[0],r=o[1]}return r+t-n}function g(t){var e,n=0,r=0,i=p("gb18030");for(e=0;i.length>e;++e){var o=i[e];if(!(t>=o[1]))break;n=o[1],r=o[0]}return r+t-n}function y(t){var n=t.fatal,r=0,i=0,o=0,s=0;this.decode=function(t){var a=t.get();if(a===B)return 0!==i?c(n):z;if(t.offset(1),0===i){if(e(a,0,127))return a;if(e(a,194,223))i=1,s=128,r=a-192;else if(e(a,224,239))i=2,s=2048,r=a-224;else{if(!e(a,240,244))return c(n);i=3,s=65536,r=a-240}return r*=Math.pow(64,i),null}if(!e(a,128,191))return r=0,i=0,o=0,s=0,t.offset(-1),c(n);if(o+=1,r+=(a-128)*Math.pow(64,i-o),o!==i)return null;var u=r,f=s;return r=0,i=0,o=0,s=0,e(u,f,1114111)&&!e(u,55296,57343)?u:c(n)}}function v(t){t.fatal,this.encode=function(t,r){var i=r.get();if(i===z)return B;if(r.offset(1),e(i,55296,57343))return u(i);if(e(i,0,127))return t.emit(i);var o,s;e(i,128,2047)?(o=1,s=192):e(i,2048,65535)?(o=2,s=224):e(i,65536,1114111)&&(o=3,s=240);for(var a=t.emit(n(i,Math.pow(64,o))+s);o>0;){var c=n(i,Math.pow(64,o-1));a=t.emit(128+c%64),o-=1}return a}}function m(t,n){var r=n.fatal;this.decode=function(n){var i=n.get();if(i===B)return z;if(n.offset(1),e(i,0,127))return i;var o=t[i-128];return null===o?c(r):o}}function b(t,n){n.fatal,this.encode=function(n,r){var i=r.get();if(i===z)return B;if(r.offset(1),e(i,0,127))return n.emit(i);var o=h(i,t);return null===o&&u(i),n.emit(o+128)}}function w(t,n){var r=n.fatal,i=0,o=0,s=0;this.decode=function(n){var a=n.get();if(a===B&&0===i&&0===o&&0===s)return z;a!==B||0===i&&0===o&&0===s||(i=0,o=0,s=0,c(r)),n.offset(1);var u;if(0!==s)return u=null,e(a,48,57)&&(u=d(10*(126*(10*(i-129)+(o-48))+(s-129))+a-48)),i=0,o=0,s=0,null===u?(n.offset(-3),c(r)):u;if(0!==o)return e(a,129,254)?(s=a,null):(n.offset(-2),i=0,o=0,c(r));if(0!==i){if(e(a,48,57)&&t)return o=a,null;var f=i,h=null;i=0;var g=127>a?64:65;return(e(a,64,126)||e(a,128,254))&&(h=190*(f-129)+(a-g)),u=null===h?null:l(h,p("gbk")),null===h&&n.offset(-1),null===u?c(r):u}return e(a,0,127)?a:128===a?8364:e(a,129,254)?(i=a,null):c(r)}}function E(t,r){r.fatal,this.encode=function(r,i){var o=i.get();if(o===z)return B;if(i.offset(1),e(o,0,127))return r.emit(o);
var s=h(o,p("gbk"));if(null!==s){var a=n(s,190)+129,c=s%190,f=63>c?64:65;return r.emit(a,c+f)}if(null===s&&!t)return u(o);s=g(o);var l=n(n(n(s,10),126),10);s-=10*126*10*l;var d=n(n(s,10),126);s-=126*10*d;var y=n(s,10),v=s-10*y;return r.emit(l+129,d+48,y+129,v+48)}}function A(t){var n=t.fatal,r=!1,i=0;this.decode=function(t){var o=t.get();if(o===B&&0===i)return z;if(o===B&&0!==i)return i=0,c(n);if(t.offset(1),126===i)return i=0,123===o?(r=!0,null):125===o?(r=!1,null):126===o?126:10===o?null:(t.offset(-1),c(n));if(0!==i){var s=i;i=0;var a=null;return e(o,33,126)&&(a=l(190*(s-1)+(o+63),p("gbk"))),10===o&&(r=!1),null===a?c(n):a}return 126===o?(i=126,null):r?e(o,32,127)?(i=o,null):(10===o&&(r=!1),c(n)):e(o,0,127)?o:c(n)}}function k(t){t.fatal;var r=!1;this.encode=function(t,i){var o=i.get();if(o===z)return B;if(i.offset(1),e(o,0,127)&&r)return i.offset(-1),r=!1,t.emit(126,125);if(126===o)return t.emit(126,126);if(e(o,0,127))return t.emit(o);if(!r)return i.offset(-1),r=!0,t.emit(126,123);var s=h(o,p("gbk"));if(null===s)return u(o);var a=n(s,190)+1,c=s%190-63;return e(a,33,126)&&e(c,33,126)?t.emit(a,c):u(o)}}function _(t){var n=t.fatal,r=0,i=null;this.decode=function(t){if(null!==i){var o=i;return i=null,o}var s=t.get();if(s===B&&0===r)return z;if(s===B&&0!==r)return r=0,c(n);if(t.offset(1),0!==r){var a=r,u=null;r=0;var f=127>s?64:98;if((e(s,64,126)||e(s,161,254))&&(u=157*(a-129)+(s-f)),1133===u)return i=772,202;if(1135===u)return i=780,202;if(1164===u)return i=772,234;if(1166===u)return i=780,234;var h=null===u?null:l(u,p("big5"));return null===u&&t.offset(-1),null===h?c(n):h}return e(s,0,127)?s:e(s,129,254)?(r=s,null):c(n)}}function x(t){t.fatal,this.encode=function(t,r){var i=r.get();if(i===z)return B;if(r.offset(1),e(i,0,127))return t.emit(i);var o=h(i,p("big5"));if(null===o)return u(i);var s=n(o,157)+129,a=o%157,c=63>a?64:98;return t.emit(s,a+c)}}function S(t){var n=t.fatal,r=0,i=0;this.decode=function(t){var o=t.get();if(o===B)return 0===r&&0===i?z:(r=0,i=0,c(n));t.offset(1);var s,a;return 0!==i?(s=i,i=0,a=null,e(s,161,254)&&e(o,161,254)&&(a=l(94*(s-161)+o-161,p("jis0212"))),e(o,161,254)||t.offset(-1),null===a?c(n):a):142===r&&e(o,161,223)?(r=0,65377+o-161):143===r&&e(o,161,254)?(r=0,i=o,null):0!==r?(s=r,r=0,a=null,e(s,161,254)&&e(o,161,254)&&(a=l(94*(s-161)+o-161,p("jis0208"))),e(o,161,254)||t.offset(-1),null===a?c(n):a):e(o,0,127)?o:142===o||143===o||e(o,161,254)?(r=o,null):c(n)}}function O(t){t.fatal,this.encode=function(t,r){var i=r.get();if(i===z)return B;if(r.offset(1),e(i,0,127))return t.emit(i);if(165===i)return t.emit(92);if(8254===i)return t.emit(126);if(e(i,65377,65439))return t.emit(142,i-65377+161);var o=h(i,p("jis0208"));if(null===o)return u(i);var s=n(o,94)+161,a=o%94+161;return t.emit(s,a)}}function I(t){var n=t.fatal,r={ASCII:0,escape_start:1,escape_middle:2,escape_final:3,lead:4,trail:5,Katakana:6},i=r.ASCII,o=!1,s=0;this.decode=function(t){var a=t.get();switch(a!==B&&t.offset(1),i){default:case r.ASCII:return 27===a?(i=r.escape_start,null):e(a,0,127)?a:a===B?z:c(n);case r.escape_start:return 36===a||40===a?(s=a,i=r.escape_middle,null):(a!==B&&t.offset(-1),i=r.ASCII,c(n));case r.escape_middle:var u=s;return s=0,36!==u||64!==a&&66!==a?36===u&&40===a?(i=r.escape_final,null):40!==u||66!==a&&74!==a?40===u&&73===a?(i=r.Katakana,null):(a===B?t.offset(-1):t.offset(-2),i=r.ASCII,c(n)):(i=r.ASCII,null):(o=!1,i=r.lead,null);case r.escape_final:return 68===a?(o=!0,i=r.lead,null):(a===B?t.offset(-2):t.offset(-3),i=r.ASCII,c(n));case r.lead:return 10===a?(i=r.ASCII,c(n,10)):27===a?(i=r.escape_start,null):a===B?z:(s=a,i=r.trail,null);case r.trail:if(i=r.lead,a===B)return c(n);var f=null,h=94*(s-33)+a-33;return e(s,33,126)&&e(a,33,126)&&(f=o===!1?l(h,p("jis0208")):l(h,p("jis0212"))),null===f?c(n):f;case r.Katakana:return 27===a?(i=r.escape_start,null):e(a,33,95)?65377+a-33:a===B?z:c(n)}}}function T(t){t.fatal;var r={ASCII:0,lead:1,Katakana:2},i=r.ASCII;this.encode=function(t,o){var s=o.get();if(s===z)return B;if(o.offset(1),(e(s,0,127)||165===s||8254===s)&&i!==r.ASCII)return o.offset(-1),i=r.ASCII,t.emit(27,40,66);if(e(s,0,127))return t.emit(s);if(165===s)return t.emit(92);if(8254===s)return t.emit(126);if(e(s,65377,65439)&&i!==r.Katakana)return o.offset(-1),i=r.Katakana,t.emit(27,40,73);if(e(s,65377,65439))return t.emit(s-65377-33);if(i!==r.lead)return o.offset(-1),i=r.lead,t.emit(27,36,66);var a=h(s,p("jis0208"));if(null===a)return u(s);var c=n(a,94)+33,f=a%94+33;return t.emit(c,f)}}function D(t){var n=t.fatal,r=0;this.decode=function(t){var i=t.get();if(i===B&&0===r)return z;if(i===B&&0!==r)return r=0,c(n);if(t.offset(1),0!==r){var o=r;if(r=0,e(i,64,126)||e(i,128,252)){var s=127>i?64:65,a=160>o?129:193,u=l(188*(o-a)+i-s,p("jis0208"));return null===u?c(n):u}return t.offset(-1),c(n)}return e(i,0,128)?i:e(i,161,223)?65377+i-161:e(i,129,159)||e(i,224,252)?(r=i,null):c(n)}}function N(t){t.fatal,this.encode=function(t,r){var i=r.get();if(i===z)return B;if(r.offset(1),e(i,0,128))return t.emit(i);if(165===i)return t.emit(92);if(8254===i)return t.emit(126);if(e(i,65377,65439))return t.emit(i-65377+161);var o=h(i,p("jis0208"));if(null===o)return u(i);var s=n(o,188),a=31>s?129:193,c=o%188,f=63>c?64:65;return t.emit(s+a,c+f)}}function R(t){var n=t.fatal,r=0;this.decode=function(t){var i=t.get();if(i===B&&0===r)return z;if(i===B&&0!==r)return r=0,c(n);if(t.offset(1),0!==r){var o=r,s=null;if(r=0,e(o,129,198)){var a=178*(o-129);e(i,65,90)?s=a+i-65:e(i,97,122)?s=a+26+i-97:e(i,129,254)&&(s=a+26+26+i-129)}e(o,199,253)&&e(i,161,254)&&(s=12460+94*(o-199)+(i-161));var u=null===s?null:l(s,p("euc-kr"));return null===s&&t.offset(-1),null===u?c(n):u}return e(i,0,127)?i:e(i,129,253)?(r=i,null):c(n)}}function U(t){t.fatal,this.encode=function(t,r){var i=r.get();if(i===z)return B;if(r.offset(1),e(i,0,127))return t.emit(i);var o=h(i,p("euc-kr"));if(null===o)return u(i);var s,a;if(12460>o){s=n(o,178)+129,a=o%178;var c=26>a?65:52>a?71:77;return t.emit(s,a+c)}return o-=12460,s=n(o,94)+199,a=o%94+161,t.emit(s,a)}}function C(t,n){var r=n.fatal,i=null,o=null;this.decode=function(n){var s=n.get();if(s===B&&null===i&&null===o)return z;if(s===B&&(null!==i||null!==o))return c(r);if(n.offset(1),null===i)return i=s,null;var a;if(a=t?(i<<8)+s:(s<<8)+i,i=null,null!==o){var u=o;return o=null,e(a,56320,57343)?65536+1024*(u-55296)+(a-56320):(n.offset(-2),c(r))}return e(a,55296,56319)?(o=a,null):e(a,56320,57343)?c(r):a}}function M(t,r){r.fatal,this.encode=function(r,i){function o(e){var n=e>>8,i=255&e;return t?r.emit(n,i):r.emit(i,n)}var s=i.get();if(s===z)return B;if(i.offset(1),e(s,55296,57343)&&u(s),65535>=s)return o(s);var a=n(s-65536,1024)+55296,c=(s-65536)%1024+56320;return o(a),o(c)}}function F(t,e){if(!(this instanceof F))throw new TypeError("Constructor cannot be called as a function");if(t=t?t+"":q,e=Object(e),this._encoding=f(t),null===this._encoding||"utf-8"!==this._encoding.name&&"utf-16le"!==this._encoding.name&&"utf-16be"!==this._encoding.name)throw new TypeError("Unknown encoding: "+t);return this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(e.fatal)},Object.defineProperty?Object.defineProperty(this,"encoding",{get:function(){return this._encoding.name}}):this.encoding=this._encoding.name,this}function L(t,e){if(!(this instanceof L))throw new TypeError("Constructor cannot be called as a function");if(t=t?t+"":q,e=Object(e),this._encoding=f(t),null===this._encoding)throw new TypeError("Unknown encoding: "+t);return this._streaming=!1,this._decoder=null,this._options={fatal:Boolean(e.fatal)},Object.defineProperty?Object.defineProperty(this,"encoding",{get:function(){return this._encoding.name}}):this.encoding=this._encoding.name,this}var B=-1,z=-1;a.prototype=Error.prototype;var j=[{encodings:[{labels:["unicode-1-1-utf-8","utf-8","utf8"],name:"utf-8"}],heading:"The Encoding"},{encodings:[{labels:["866","cp866","csibm866","ibm866"],name:"ibm866"},{labels:["csisolatin2","iso-8859-2","iso-ir-101","iso8859-2","iso88592","iso_8859-2","iso_8859-2:1987","l2","latin2"],name:"iso-8859-2"},{labels:["csisolatin3","iso-8859-3","iso-ir-109","iso8859-3","iso88593","iso_8859-3","iso_8859-3:1988","l3","latin3"],name:"iso-8859-3"},{labels:["csisolatin4","iso-8859-4","iso-ir-110","iso8859-4","iso88594","iso_8859-4","iso_8859-4:1988","l4","latin4"],name:"iso-8859-4"},{labels:["csisolatincyrillic","cyrillic","iso-8859-5","iso-ir-144","iso8859-5","iso88595","iso_8859-5","iso_8859-5:1988"],name:"iso-8859-5"},{labels:["arabic","asmo-708","csiso88596e","csiso88596i","csisolatinarabic","ecma-114","iso-8859-6","iso-8859-6-e","iso-8859-6-i","iso-ir-127","iso8859-6","iso88596","iso_8859-6","iso_8859-6:1987"],name:"iso-8859-6"},{labels:["csisolatingreek","ecma-118","elot_928","greek","greek8","iso-8859-7","iso-ir-126","iso8859-7","iso88597","iso_8859-7","iso_8859-7:1987","sun_eu_greek"],name:"iso-8859-7"},{labels:["csiso88598e","csisolatinhebrew","hebrew","iso-8859-8","iso-8859-8-e","iso-ir-138","iso8859-8","iso88598","iso_8859-8","iso_8859-8:1988","visual"],name:"iso-8859-8"},{labels:["csiso88598i","iso-8859-8-i","logical"],name:"iso-8859-8-i"},{labels:["csisolatin6","iso-8859-10","iso-ir-157","iso8859-10","iso885910","l6","latin6"],name:"iso-8859-10"},{labels:["iso-8859-13","iso8859-13","iso885913"],name:"iso-8859-13"},{labels:["iso-8859-14","iso8859-14","iso885914"],name:"iso-8859-14"},{labels:["csisolatin9","iso-8859-15","iso8859-15","iso885915","iso_8859-15","l9"],name:"iso-8859-15"},{labels:["iso-8859-16"],name:"iso-8859-16"},{labels:["cskoi8r","koi","koi8","koi8-r","koi8_r"],name:"koi8-r"},{labels:["koi8-u"],name:"koi8-u"},{labels:["csmacintosh","mac","macintosh","x-mac-roman"],name:"macintosh"},{labels:["dos-874","iso-8859-11","iso8859-11","iso885911","tis-620","windows-874"],name:"windows-874"},{labels:["cp1250","windows-1250","x-cp1250"],name:"windows-1250"},{labels:["cp1251","windows-1251","x-cp1251"],name:"windows-1251"},{labels:["ansi_x3.4-1968","ascii","cp1252","cp819","csisolatin1","ibm819","iso-8859-1","iso-ir-100","iso8859-1","iso88591","iso_8859-1","iso_8859-1:1987","l1","latin1","us-ascii","windows-1252","x-cp1252"],name:"windows-1252"},{labels:["cp1253","windows-1253","x-cp1253"],name:"windows-1253"},{labels:["cp1254","csisolatin5","iso-8859-9","iso-ir-148","iso8859-9","iso88599","iso_8859-9","iso_8859-9:1989","l5","latin5","windows-1254","x-cp1254"],name:"windows-1254"},{labels:["cp1255","windows-1255","x-cp1255"],name:"windows-1255"},{labels:["cp1256","windows-1256","x-cp1256"],name:"windows-1256"},{labels:["cp1257","windows-1257","x-cp1257"],name:"windows-1257"},{labels:["cp1258","windows-1258","x-cp1258"],name:"windows-1258"},{labels:["x-mac-cyrillic","x-mac-ukrainian"],name:"x-mac-cyrillic"}],heading:"Legacy single-byte encodings"},{encodings:[{labels:["chinese","csgb2312","csiso58gb231280","gb2312","gb_2312","gb_2312-80","gbk","iso-ir-58","x-gbk"],name:"gbk"},{labels:["gb18030"],name:"gb18030"},{labels:["hz-gb-2312"],name:"hz-gb-2312"}],heading:"Legacy multi-byte Chinese (simplified) encodings"},{encodings:[{labels:["big5","big5-hkscs","cn-big5","csbig5","x-x-big5"],name:"big5"}],heading:"Legacy multi-byte Chinese (traditional) encodings"},{encodings:[{labels:["cseucpkdfmtjapanese","euc-jp","x-euc-jp"],name:"euc-jp"},{labels:["csiso2022jp","iso-2022-jp"],name:"iso-2022-jp"},{labels:["csshiftjis","ms_kanji","shift-jis","shift_jis","sjis","windows-31j","x-sjis"],name:"shift_jis"}],heading:"Legacy multi-byte Japanese encodings"},{encodings:[{labels:["cseuckr","csksc56011987","euc-kr","iso-ir-149","korean","ks_c_5601-1987","ks_c_5601-1989","ksc5601","ksc_5601","windows-949"],name:"euc-kr"}],heading:"Legacy multi-byte Korean encodings"},{encodings:[{labels:["csiso2022kr","iso-2022-kr","iso-2022-cn","iso-2022-cn-ext"],name:"replacement"},{labels:["utf-16be"],name:"utf-16be"},{labels:["utf-16","utf-16le"],name:"utf-16le"},{labels:["x-user-defined"],name:"x-user-defined"}],heading:"Legacy miscellaneous encodings"}],P={},V={};j.forEach(function(t){t.encodings.forEach(function(t){P[t.name]=t,t.labels.forEach(function(e){V[e]=t})})}),P["utf-8"].getEncoder=function(t){return new v(t)},P["utf-8"].getDecoder=function(t){return new y(t)},function(){j.forEach(function(t){"Legacy single-byte encodings"===t.heading&&t.encodings.forEach(function(t){var e=p(t.name);t.getDecoder=function(t){return new m(e,t)},t.getEncoder=function(t){return new b(e,t)}})})}(),P.gbk.getEncoder=function(t){return new E(!1,t)},P.gbk.getDecoder=function(t){return new w(!1,t)},P.gb18030.getEncoder=function(t){return new E(!0,t)},P.gb18030.getDecoder=function(t){return new w(!0,t)},P["hz-gb-2312"].getEncoder=function(t){return new k(t)},P["hz-gb-2312"].getDecoder=function(t){return new A(t)},P.big5.getEncoder=function(t){return new x(t)},P.big5.getDecoder=function(t){return new _(t)},P["euc-jp"].getEncoder=function(t){return new O(t)},P["euc-jp"].getDecoder=function(t){return new S(t)},P["iso-2022-jp"].getEncoder=function(t){return new T(t)},P["iso-2022-jp"].getDecoder=function(t){return new I(t)},P.shift_jis.getEncoder=function(t){return new N(t)},P.shift_jis.getDecoder=function(t){return new D(t)},P["euc-kr"].getEncoder=function(t){return new U(t)},P["euc-kr"].getDecoder=function(t){return new R(t)},P["utf-16le"].getEncoder=function(t){return new M(!1,t)},P["utf-16le"].getDecoder=function(t){return new C(!1,t)},P["utf-16be"].getEncoder=function(t){return new M(!0,t)},P["utf-16be"].getDecoder=function(t){return new C(!0,t)};var q="utf-8";F.prototype={encode:function(t,e){t=t?t+"":"",e=Object(e),this._streaming||(this._encoder=this._encoding.getEncoder(this._options)),this._streaming=Boolean(e.stream);for(var n=[],r=new i(n),s=new o(t);s.get()!==z;)this._encoder.encode(r,s);if(!this._streaming){var a;do a=this._encoder.encode(r,s);while(a!==B);this._encoder=null}return new Uint8Array(n)}},L.prototype={decode:function(t,e){if(t&&!("buffer"in t&&"byteOffset"in t&&"byteLength"in t))throw new TypeError("Expected ArrayBufferView");t||(t=new Uint8Array(0)),e=Object(e),this._streaming||(this._decoder=this._encoding.getDecoder(this._options),this._BOMseen=!1),this._streaming=Boolean(e.stream);for(var n,i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),o=new r(i),a=new s;o.get()!==B;)n=this._decoder.decode(o),null!==n&&n!==z&&a.emit(n);if(!this._streaming){do n=this._decoder.decode(o),null!==n&&n!==z&&a.emit(n);while(n!==z&&o.get()!=B);this._decoder=null}var c=a.string();return!this._BOMseen&&c.length&&(this._BOMseen=!0,-1!==["utf-8","utf-16le","utf-16be"].indexOf(this.encoding)&&65279===c.charCodeAt(0)&&(c=c.substring(1))),c}},t.TextEncoder=t.TextEncoder||F,t.TextDecoder=t.TextDecoder||L}(this),n("encoding",["encoding-indexes-shim"],function(){}),n("src/adapters/crypto",["require","crypto-js/rollups/aes","encoding"],function(t){function e(t){for(var e=t.length,n=[],r=0;e>r;r++)n[r>>>2]|=(255&t[r])<<24-8*(r%4);return a.create(n,e)}function n(t){return new TextEncoder("utf-8").encode(t)}function i(t){return new TextDecoder("utf-8").decode(t)}function o(t,e,n){this.context=t,this.encrypt=e,this.decrypt=n}function s(t,o){this.provider=o;var s=r.AES;this.encrypt=function(r){var i=e(r),o=s.encrypt(i,t),a=n(o);return a},this.decrypt=function(e){var o=i(e),a=s.decrypt(o,t),c=a.toString(r.enc.Utf8),u=n(c);return u}}t("crypto-js/rollups/aes");var a=r.lib.WordArray;return t("encoding"),o.prototype.clear=function(t){this.context.clear(t)},o.prototype.get=function(t,e){var n=this.decrypt;this.context.get(t,function(t,r){return t?(e(t),void 0):(r&&(r=n(r)),e(null,r),void 0)})},o.prototype.put=function(t,e,n){var r=this.encrypt(e);this.context.put(t,r,n)},o.prototype.delete=function(t,e){this.context.delete(t,e)},s.isSupported=function(){return!0},s.prototype.open=function(t){this.provider.open(t)},s.prototype.getReadOnlyContext=function(){return new o(this.provider.getReadOnlyContext(),this.encrypt,this.decrypt)},s.prototype.getReadWriteContext=function(){return new o(this.provider.getReadWriteContext(),this.encrypt,this.decrypt)},s}),n("src/adapters/adapters",["require","src/adapters/zlib","src/adapters/crypto"],function(t){return{Compression:t("src/adapters/zlib"),Encryption:t("src/adapters/crypto")}}),n("src/shell/environment",["require","src/constants"],function(t){function e(t){t=t||{},t.TMP=t.TMP||n.TMP,t.PATH=t.PATH||n.PATH,this.get=function(e){return t[e]},this.set=function(e,n){t[e]=n}}var n=t("src/constants").ENVIRONMENT;return e}),function(){function t(t,e){var n=t.split("."),r=m;!(n[0]in r)&&r.execScript&&r.execScript("var "+n[0]);for(var i;n.length&&(i=n.shift());)n.length||e===y?r=r[i]?r[i]:r[i]={}:r[i]=e}function e(t,e){if(this.index="number"==typeof e?e:0,this.f=0,this.buffer=t instanceof(b?Uint8Array:Array)?t:new(b?Uint8Array:Array)(32768),2*this.buffer.length<=this.index)throw Error("invalid index");this.buffer.length<=this.index&&n(this)}function n(t){var e,n=t.buffer,r=n.length,i=new(b?Uint8Array:Array)(r<<1);if(b)i.set(n);else for(e=0;r>e;++e)i[e]=n[e];return t.buffer=i}function r(t){var e,n=y,r="number"==typeof n?n:n=0,i=t.length;for(e=-1,r=7&i;r--;++n)e=e>>>8^O[255&(e^t[n])];for(r=i>>3;r--;n+=8)e=e>>>8^O[255&(e^t[n])],e=e>>>8^O[255&(e^t[n+1])],e=e>>>8^O[255&(e^t[n+2])],e=e>>>8^O[255&(e^t[n+3])],e=e>>>8^O[255&(e^t[n+4])],e=e>>>8^O[255&(e^t[n+5])],e=e>>>8^O[255&(e^t[n+6])],e=e>>>8^O[255&(e^t[n+7])];return(4294967295^e)>>>0}function i(t){this.buffer=new(b?Uint16Array:Array)(2*t),this.length=0}function o(t,e){this.k=T,this.l=0,this.input=b&&t instanceof Array?new Uint8Array(t):t,this.e=0,e&&(e.lazy&&(this.l=e.lazy),"number"==typeof e.compressionType&&(this.k=e.compressionType),e.outputBuffer&&(this.c=b&&e.outputBuffer instanceof Array?new Uint8Array(e.outputBuffer):e.outputBuffer),"number"==typeof e.outputIndex&&(this.e=e.outputIndex)),this.c||(this.c=new(b?Uint8Array:Array)(32768))}function s(t,e){this.length=t,this.n=e}function a(t,e){function n(t,e){var n,r=t.n,i=[],o=0;n=R[t.length],i[o++]=65535&n,i[o++]=255&n>>16,i[o++]=n>>24;var s;switch(v){case 1===r:s=[0,r-1,0];break;case 2===r:s=[1,r-2,0];break;case 3===r:s=[2,r-3,0];break;case 4===r:s=[3,r-4,0];break;case 6>=r:s=[4,r-5,1];break;case 8>=r:s=[5,r-7,1];break;case 12>=r:s=[6,r-9,2];break;case 16>=r:s=[7,r-13,2];break;case 24>=r:s=[8,r-17,3];break;case 32>=r:s=[9,r-25,3];break;case 48>=r:s=[10,r-33,4];break;case 64>=r:s=[11,r-49,4];break;case 96>=r:s=[12,r-65,5];break;case 128>=r:s=[13,r-97,5];break;case 192>=r:s=[14,r-129,6];break;case 256>=r:s=[15,r-193,6];break;case 384>=r:s=[16,r-257,7];break;case 512>=r:s=[17,r-385,7];break;case 768>=r:s=[18,r-513,8];break;case 1024>=r:s=[19,r-769,8];break;case 1536>=r:s=[20,r-1025,9];break;case 2048>=r:s=[21,r-1537,9];break;case 3072>=r:s=[22,r-2049,10];break;case 4096>=r:s=[23,r-3073,10];break;case 6144>=r:s=[24,r-4097,11];break;case 8192>=r:s=[25,r-6145,11];break;case 12288>=r:s=[26,r-8193,12];break;case 16384>=r:s=[27,r-12289,12];break;case 24576>=r:s=[28,r-16385,13];break;case 32768>=r:s=[29,r-24577,13];break;default:throw"invalid distance"}n=s,i[o++]=n[0],i[o++]=n[1],i[o++]=n[2];var a,c;for(a=0,c=i.length;c>a;++a)d[g++]=i[a];w[i[0]]++,E[i[3]]++,m=t.length+e-1,l=null}var r,i,o,s,a,u,f,l,h,p={},d=b?new Uint16Array(2*e.length):[],g=0,m=0,w=new(b?Uint32Array:Array)(286),E=new(b?Uint32Array:Array)(30),A=t.l;if(!b){for(o=0;285>=o;)w[o++]=0;for(o=0;29>=o;)E[o++]=0}for(w[256]=1,r=0,i=e.length;i>r;++r){for(o=a=0,s=3;s>o&&r+o!==i;++o)a=a<<8|e[r+o];if(p[a]===y&&(p[a]=[]),u=p[a],!(m-->0)){for(;u.length>0&&r-u[0]>32768;)u.shift();if(r+3>=i){for(l&&n(l,-1),o=0,s=i-r;s>o;++o)h=e[r+o],d[g++]=h,++w[h];break}u.length>0?(f=c(e,r,u),l?l.length<f.length?(h=e[r-1],d[g++]=h,++w[h],n(f,0)):n(l,-1):A>f.length?l=f:n(f,0)):l?n(l,-1):(h=e[r],d[g++]=h,++w[h])}u.push(r)}return d[g++]=256,w[256]++,t.p=w,t.o=E,b?d.subarray(0,g):d}function c(t,e,n){var r,i,o,a,c,u,f=0,l=t.length;a=0,u=n.length;t:for(;u>a;a++){if(r=n[u-a-1],o=3,f>3){for(c=f;c>3;c--)if(t[r+c-1]!==t[e+c-1])continue t;o=f}for(;258>o&&l>e+o&&t[r+o]===t[e+o];)++o;if(o>f&&(i=r,f=o),258===o)break}return new s(f,e-i)}function u(t,e){var n,r,o,s,a,c=t.length,u=new i(572),l=new(b?Uint8Array:Array)(c);if(!b)for(s=0;c>s;s++)l[s]=0;for(s=0;c>s;++s)t[s]>0&&u.push(s,t[s]);if(n=Array(u.length/2),r=new(b?Uint32Array:Array)(u.length/2),1===n.length)return l[u.pop().index]=1,l;for(s=0,a=u.length/2;a>s;++s)n[s]=u.pop(),r[s]=n[s].value;for(o=f(r,r.length,e),s=0,a=n.length;a>s;++s)l[n[s].index]=o[s];return l}function f(t,e,n){function r(t){var n=p[t][d[t]];n===e?(r(t+1),r(t+1)):--l[n],++d[t]}var i,o,s,a,c,u=new(b?Uint16Array:Array)(n),f=new(b?Uint8Array:Array)(n),l=new(b?Uint8Array:Array)(e),h=Array(n),p=Array(n),d=Array(n),g=(1<<n)-e,y=1<<n-1;for(u[n-1]=e,o=0;n>o;++o)y>g?f[o]=0:(f[o]=1,g-=y),g<<=1,u[n-2-o]=(0|u[n-1-o]/2)+e;for(u[0]=f[0],h[0]=Array(u[0]),p[0]=Array(u[0]),o=1;n>o;++o)u[o]>2*u[o-1]+f[o]&&(u[o]=2*u[o-1]+f[o]),h[o]=Array(u[o]),p[o]=Array(u[o]);for(i=0;e>i;++i)l[i]=n;for(s=0;u[n-1]>s;++s)h[n-1][s]=t[s],p[n-1][s]=s;for(i=0;n>i;++i)d[i]=0;for(1===f[n-1]&&(--l[0],++d[n-1]),o=n-2;o>=0;--o){for(a=i=0,c=d[o+1],s=0;u[o]>s;s++)a=h[o+1][c]+h[o+1][c+1],a>t[i]?(h[o][s]=a,p[o][s]=e,c+=2):(h[o][s]=t[i],p[o][s]=i,++i);d[o]=0,1===f[o]&&r(o)}return l}function l(t){var e,n,r,i,o=new(b?Uint16Array:Array)(t.length),s=[],a=[],c=0;for(e=0,n=t.length;n>e;e++)s[t[e]]=(0|s[t[e]])+1;for(e=1,n=16;n>=e;e++)a[e]=c,c+=0|s[e],c<<=1;for(e=0,n=t.length;n>e;e++)for(c=a[t[e]],a[t[e]]+=1,r=o[e]=0,i=t[e];i>r;r++)o[e]=o[e]<<1|1&c,c>>>=1;return o}function h(t){t=t||{},this.files=[],this.d=t.comment}function p(t,e){var n,r=2|65535&t[2];return n=255&r*(1^r)>>8,d(t,e),n^e}function d(t,e){t[0]=(O[255&(t[0]^e)]^t[0]>>>8)>>>0,t[1]=(6681*(20173*(t[1]+(255&t[0]))>>>0)>>>0)+1>>>0,t[2]=(O[255&(t[2]^t[1]>>>24)]^t[2]>>>8)>>>0}function g(e,n){var r,i,o,s;if(Object.keys)r=Object.keys(n);else for(i in r=[],o=0,n)r[o++]=i;for(o=0,s=r.length;s>o;++o)i=r[o],t(e+"."+i,n[i])}var y=void 0,v=!0,m=this,b="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;e.prototype.b=function(t,e,r){var i,o=this.buffer,s=this.index,a=this.f,c=o[s];if(r&&e>1&&(t=e>8?(x[255&t]<<24|x[255&t>>>8]<<16|x[255&t>>>16]<<8|x[255&t>>>24])>>32-e:x[t]>>8-e),8>e+a)c=c<<e|t,a+=e;else for(i=0;e>i;++i)c=c<<1|1&t>>e-i-1,8===++a&&(a=0,o[s++]=x[c],c=0,s===o.length&&(o=n(this)));o[s]=c,this.buffer=o,this.f=a,this.index=s},e.prototype.finish=function(){var t,e=this.buffer,n=this.index;return this.f>0&&(e[n]<<=8-this.f,e[n]=x[e[n]],n++),b?t=e.subarray(0,n):(e.length=n,t=e),t};var w,E=new(b?Uint8Array:Array)(256);for(w=0;256>w;++w){for(var A=w,k=A,_=7,A=A>>>1;A;A>>>=1)k<<=1,k|=1&A,--_;E[w]=(255&k<<_)>>>0}var x=E,S=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],O=b?new Uint32Array(S):S;i.prototype.getParent=function(t){return 2*(0|(t-2)/4)},i.prototype.push=function(t,e){var n,r,i,o=this.buffer;for(n=this.length,o[this.length++]=e,o[this.length++]=t;n>0&&(r=this.getParent(n),o[n]>o[r]);)i=o[n],o[n]=o[r],o[r]=i,i=o[n+1],o[n+1]=o[r+1],o[r+1]=i,n=r;return this.length},i.prototype.pop=function(){var t,e,n,r,i,o=this.buffer;for(e=o[0],t=o[1],this.length-=2,o[0]=o[this.length],o[1]=o[this.length+1],i=0;(r=2*i+2,!(r>=this.length))&&(this.length>r+2&&o[r+2]>o[r]&&(r+=2),o[r]>o[i]);)n=o[i],o[i]=o[r],o[r]=n,n=o[i+1],o[i+1]=o[r+1],o[r+1]=n,i=r;return{index:t,value:e,length:this.length}};var I,T=2,D=[];for(I=0;288>I;I++)switch(v){case 143>=I:D.push([I+48,8]);break;case 255>=I:D.push([I-144+400,9]);break;case 279>=I:D.push([I-256+0,7]);break;case 287>=I:D.push([I-280+192,8]);break;default:throw"invalid literal: "+I}o.prototype.g=function(){var t,n,r,i,o=this.input;switch(this.k){case 0:for(r=0,i=o.length;i>r;){n=b?o.subarray(r,r+65535):o.slice(r,r+65535),r+=n.length;var s=n,c=r===i,f=y,h=y,p=y,d=y,g=y,m=this.c,w=this.e;if(b){for(m=new Uint8Array(this.c.buffer);m.length<=w+s.length+5;)m=new Uint8Array(m.length<<1);m.set(this.c)}if(f=c?1:0,m[w++]=0|f,h=s.length,p=65535&~h+65536,m[w++]=255&h,m[w++]=255&h>>>8,m[w++]=255&p,m[w++]=255&p>>>8,b)m.set(s,w),w+=s.length,m=m.subarray(0,w);else{for(d=0,g=s.length;g>d;++d)m[w++]=s[d];m.length=w}this.e=w,this.c=m}break;case 1:var E=new e(b?new Uint8Array(this.c.buffer):this.c,this.e);E.b(1,1,v),E.b(1,2,v);var A,k,_,x=a(this,o);for(A=0,k=x.length;k>A;A++)if(_=x[A],e.prototype.b.apply(E,D[_]),_>256)E.b(x[++A],x[++A],v),E.b(x[++A],5),E.b(x[++A],x[++A],v);else if(256===_)break;this.c=E.finish(),this.e=this.c.length;break;case T:var S,O,I,N,R,U,C,M,F,L,B,z,j,P,V,q=new e(b?new Uint8Array(this.c.buffer):this.c,this.e),H=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],W=Array(19);for(S=T,q.b(1,1,v),q.b(S,2,v),O=a(this,o),U=u(this.p,15),C=l(U),M=u(this.o,7),F=l(M),I=286;I>257&&0===U[I-1];I--);for(N=30;N>1&&0===M[N-1];N--);var Y,X,Z,K,J,G,Q=I,$=N,te=new(b?Uint32Array:Array)(Q+$),ee=new(b?Uint32Array:Array)(316),ne=new(b?Uint8Array:Array)(19);for(Y=X=0;Q>Y;Y++)te[X++]=U[Y];for(Y=0;$>Y;Y++)te[X++]=M[Y];if(!b)for(Y=0,K=ne.length;K>Y;++Y)ne[Y]=0;for(Y=J=0,K=te.length;K>Y;Y+=X){for(X=1;K>Y+X&&te[Y+X]===te[Y];++X);if(Z=X,0===te[Y])if(3>Z)for(;Z-->0;)ee[J++]=0,ne[0]++;else for(;Z>0;)G=138>Z?Z:138,G>Z-3&&Z>G&&(G=Z-3),10>=G?(ee[J++]=17,ee[J++]=G-3,ne[17]++):(ee[J++]=18,ee[J++]=G-11,ne[18]++),Z-=G;else if(ee[J++]=te[Y],ne[te[Y]]++,Z--,3>Z)for(;Z-->0;)ee[J++]=te[Y],ne[te[Y]]++;else for(;Z>0;)G=6>Z?Z:6,G>Z-3&&Z>G&&(G=Z-3),ee[J++]=16,ee[J++]=G-3,ne[16]++,Z-=G}for(t=b?ee.subarray(0,J):ee.slice(0,J),L=u(ne,7),P=0;19>P;P++)W[P]=L[H[P]];for(R=19;R>4&&0===W[R-1];R--);for(B=l(L),q.b(I-257,5,v),q.b(N-1,5,v),q.b(R-4,4,v),P=0;R>P;P++)q.b(W[P],3,v);for(P=0,V=t.length;V>P;P++)if(z=t[P],q.b(B[z],L[z],v),z>=16){switch(P++,z){case 16:j=2;break;case 17:j=3;break;case 18:j=7;break;default:throw"invalid code: "+z}q.b(t[P],j,v)}var re,ie,oe,se,ae,ce,ue,fe,le=[C,U],he=[F,M];for(ae=le[0],ce=le[1],ue=he[0],fe=he[1],re=0,ie=O.length;ie>re;++re)if(oe=O[re],q.b(ae[oe],ce[oe],v),oe>256)q.b(O[++re],O[++re],v),se=O[++re],q.b(ue[se],fe[se],v),q.b(O[++re],O[++re],v);else if(256===oe)break;this.c=q.finish(),this.e=this.c.length;break;default:throw"invalid compression type"}return this.c};var N=function(){function t(t){switch(v){case 3===t:return[257,t-3,0];case 4===t:return[258,t-4,0];case 5===t:return[259,t-5,0];case 6===t:return[260,t-6,0];case 7===t:return[261,t-7,0];case 8===t:return[262,t-8,0];case 9===t:return[263,t-9,0];case 10===t:return[264,t-10,0];case 12>=t:return[265,t-11,1];case 14>=t:return[266,t-13,1];case 16>=t:return[267,t-15,1];case 18>=t:return[268,t-17,1];case 22>=t:return[269,t-19,2];case 26>=t:return[270,t-23,2];case 30>=t:return[271,t-27,2];case 34>=t:return[272,t-31,2];case 42>=t:return[273,t-35,3];case 50>=t:return[274,t-43,3];case 58>=t:return[275,t-51,3];case 66>=t:return[276,t-59,3];case 82>=t:return[277,t-67,4];case 98>=t:return[278,t-83,4];case 114>=t:return[279,t-99,4];case 130>=t:return[280,t-115,4];case 162>=t:return[281,t-131,5];case 194>=t:return[282,t-163,5];case 226>=t:return[283,t-195,5];case 257>=t:return[284,t-227,5];case 258===t:return[285,t-258,0];default:throw"invalid length: "+t}}var e,n,r=[];for(e=3;258>=e;e++)n=t(e),r[e]=n[2]<<24|n[1]<<16|n[0];return r}(),R=b?new Uint32Array(N):N,U=[80,75,1,2],C=[80,75,3,4],M=[80,75,5,6];h.prototype.m=function(t,e){e=e||{};var n,i=t.length,s=0;if(b&&t instanceof Array&&(t=new Uint8Array(t)),"number"!=typeof e.compressionMethod&&(e.compressionMethod=8),e.compress)switch(e.compressionMethod){case 0:break;case 8:s=r(t),t=new o(t,e.deflateOption).g(),n=v;break;default:throw Error("unknown compression method:"+e.compressionMethod)}this.files.push({buffer:t,a:e,j:n,r:!1,size:i,h:s})},h.prototype.q=function(t){this.i=t},h.prototype.g=function(){var t,e,n,i,s,a,c,u,f,l,h,g,m,w,E,A,k,_,x,S,O,I,T,D,N=this.files,R=0,F=0;for(O=0,I=N.length;I>O;++O){if(t=N[O],m=t.a.filename?t.a.filename.length:0,w=t.a.comment?t.a.comment.length:0,!t.j)switch(t.h=r(t.buffer),t.a.compressionMethod){case 0:break;case 8:t.buffer=new o(t.buffer,t.a.deflateOption).g(),t.j=v;break;default:throw Error("unknown compression method:"+t.a.compressionMethod)}if(t.a.password!==y||this.i!==y){var L=t.a.password||this.i,B=[305419896,591751049,878082192],z=y,j=y;for(b&&(B=new Uint32Array(B)),z=0,j=L.length;j>z;++z)d(B,255&L[z]);for(S=B,_=t.buffer,b?(x=new Uint8Array(_.length+12),x.set(_,12),_=x):_.unshift(0,0,0,0,0,0,0,0,0,0,0,0),T=0;12>T;++T)_[T]=p(S,11===O?255&t.h:0|256*Math.random());for(D=_.length;D>T;++T)_[T]=p(S,_[T]);t.buffer=_}R+=30+m+t.buffer.length,F+=46+m+w}for(e=new(b?Uint8Array:Array)(R+F+(46+(this.d?this.d.length:0))),n=0,i=R,s=i+F,O=0,I=N.length;I>O;++O){if(t=N[O],m=t.a.filename?t.a.filename.length:0,w=t.a.comment?t.a.comment.length:0,a=n,e[n++]=C[0],e[n++]=C[1],e[n++]=C[2],e[n++]=C[3],e[i++]=U[0],e[i++]=U[1],e[i++]=U[2],e[i++]=U[3],e[i++]=20,e[i++]=t.a.os||0,e[n++]=e[i++]=20,c=e[n++]=e[i++]=0,(t.a.password||this.i)&&(c|=1),e[n++]=e[i++]=255&c,e[n++]=e[i++]=255&c>>8,u=t.a.compressionMethod,e[n++]=e[i++]=255&u,e[n++]=e[i++]=255&u>>8,f=t.a.date||new Date,e[n++]=e[i++]=0|((7&f.getMinutes())<<5|f.getSeconds()/2),e[n++]=e[i++]=f.getHours()<<3|f.getMinutes()>>3,e[n++]=e[i++]=(7&f.getMonth()+1)<<5|f.getDate(),e[n++]=e[i++]=(127&f.getFullYear()-1980)<<1|f.getMonth()+1>>3,l=t.h,e[n++]=e[i++]=255&l,e[n++]=e[i++]=255&l>>8,e[n++]=e[i++]=255&l>>16,e[n++]=e[i++]=255&l>>24,h=t.buffer.length,e[n++]=e[i++]=255&h,e[n++]=e[i++]=255&h>>8,e[n++]=e[i++]=255&h>>16,e[n++]=e[i++]=255&h>>24,g=t.size,e[n++]=e[i++]=255&g,e[n++]=e[i++]=255&g>>8,e[n++]=e[i++]=255&g>>16,e[n++]=e[i++]=255&g>>24,e[n++]=e[i++]=255&m,e[n++]=e[i++]=255&m>>8,e[n++]=e[i++]=0,e[n++]=e[i++]=0,e[i++]=255&w,e[i++]=255&w>>8,e[i++]=0,e[i++]=0,e[i++]=0,e[i++]=0,e[i++]=0,e[i++]=0,e[i++]=0,e[i++]=0,e[i++]=255&a,e[i++]=255&a>>8,e[i++]=255&a>>16,e[i++]=255&a>>24,E=t.a.filename)if(b)e.set(E,n),e.set(E,i),n+=m,i+=m;
else for(T=0;m>T;++T)e[n++]=e[i++]=E[T];if(A=t.a.extraField)if(b)e.set(A,n),e.set(A,i),n+=0,i+=0;else for(T=0;w>T;++T)e[n++]=e[i++]=A[T];if(k=t.a.comment)if(b)e.set(k,i),i+=w;else for(T=0;w>T;++T)e[i++]=k[T];if(b)e.set(t.buffer,n),n+=t.buffer.length;else for(T=0,D=t.buffer.length;D>T;++T)e[n++]=t.buffer[T]}if(e[s++]=M[0],e[s++]=M[1],e[s++]=M[2],e[s++]=M[3],e[s++]=0,e[s++]=0,e[s++]=0,e[s++]=0,e[s++]=255&I,e[s++]=255&I>>8,e[s++]=255&I,e[s++]=255&I>>8,e[s++]=255&F,e[s++]=255&F>>8,e[s++]=255&F>>16,e[s++]=255&F>>24,e[s++]=255&R,e[s++]=255&R>>8,e[s++]=255&R>>16,e[s++]=255&R>>24,w=this.d?this.d.length:0,e[s++]=255&w,e[s++]=255&w>>8,this.d)if(b)e.set(this.d,s);else for(T=0,D=w;D>T;++T)e[s++]=this.d[T];return e},t("Zlib.Zip",h),t("Zlib.Zip.prototype.addFile",h.prototype.m),t("Zlib.Zip.prototype.compress",h.prototype.g),t("Zlib.Zip.prototype.setPassword",h.prototype.q),g("Zlib.Zip.CompressionMethod",{STORE:0,DEFLATE:8}),g("Zlib.Zip.OperatingSystem",{MSDOS:0,UNIX:3,MACINTOSH:7})}.call(this),n("zip",function(){}),function(){function t(t){throw t}function e(t,e){var n=t.split("."),r=g;!(n[0]in r)&&r.execScript&&r.execScript("var "+n[0]);for(var i;n.length&&(i=n.shift());)n.length||e===d?r=r[i]?r[i]:r[i]={}:r[i]=e}function n(t){var e,n,r,i,o,s,a,c,u,f,l=t.length,h=0,p=Number.POSITIVE_INFINITY;for(c=0;l>c;++c)t[c]>h&&(h=t[c]),p>t[c]&&(p=t[c]);for(e=1<<h,n=new(y?Uint32Array:Array)(e),r=1,i=0,o=2;h>=r;){for(c=0;l>c;++c)if(t[c]===r){for(s=0,a=i,u=0;r>u;++u)s=s<<1|1&a,a>>=1;for(f=r<<16|c,u=s;e>u;u+=o)n[u]=f;++i}++r,i<<=1,o<<=1}return[n,h,p]}function r(e,n){switch(this.l=[],this.m=32768,this.d=this.f=this.c=this.t=0,this.input=y?new Uint8Array(e):e,this.u=!1,this.n=S,this.L=!1,(n||!(n={}))&&(n.index&&(this.c=n.index),n.bufferSize&&(this.m=n.bufferSize),n.bufferType&&(this.n=n.bufferType),n.resize&&(this.L=n.resize)),this.n){case x:this.a=32768,this.b=new(y?Uint8Array:Array)(32768+this.m+258);break;case S:this.a=0,this.b=new(y?Uint8Array:Array)(this.m),this.e=this.X,this.B=this.S,this.q=this.W;break;default:t(Error("invalid inflate mode"))}}function i(e,n){for(var r,i=e.f,o=e.d,s=e.input,a=e.c,c=s.length;n>o;)a>=c&&t(Error("input buffer is broken")),i|=s[a++]<<o,o+=8;return r=i&(1<<n)-1,e.f=i>>>n,e.d=o-n,e.c=a,r}function o(t,e){for(var n,r,i=t.f,o=t.d,s=t.input,a=t.c,c=s.length,u=e[0],f=e[1];f>o&&!(a>=c);)i|=s[a++]<<o,o+=8;return n=u[i&(1<<f)-1],r=n>>>16,t.f=i>>r,t.d=o-r,t.c=a,65535&n}function s(t){function e(t,e,n){var r,s,a,c=this.K;for(a=0;t>a;)switch(r=o(this,e)){case 16:for(s=3+i(this,2);s--;)n[a++]=c;break;case 17:for(s=3+i(this,3);s--;)n[a++]=0;c=0;break;case 18:for(s=11+i(this,7);s--;)n[a++]=0;c=0;break;default:c=n[a++]=r}return this.K=c,n}var r,s,a,c,u=i(t,5)+257,f=i(t,5)+1,l=i(t,4)+4,h=new(y?Uint8Array:Array)(D.length);for(c=0;l>c;++c)h[D[c]]=i(t,3);if(!y)for(c=l,l=h.length;l>c;++c)h[D[c]]=0;r=n(h),s=new(y?Uint8Array:Array)(u),a=new(y?Uint8Array:Array)(f),t.K=0,t.q(n(e.call(t,u,r,s)),n(e.call(t,f,r,a)))}function a(t){t=t||{},this.files=[],this.v=t.comment}function c(t,e){e=e||{},this.input=y&&t instanceof Array?new Uint8Array(t):t,this.c=0,this.ca=e.verify||!1,this.j=e.password}function u(t,e){this.input=t,this.offset=e}function f(t,e){this.input=t,this.offset=e}function l(e){var n,r,i,o,s=[],a={};if(!e.i){if(e.o===d){var c,f=e.input;if(!e.D)t:{var l,h=e.input;for(l=h.length-12;l>0;--l)if(h[l]===Z[0]&&h[l+1]===Z[1]&&h[l+2]===Z[2]&&h[l+3]===Z[3]){e.D=l;break t}t(Error("End of Central Directory Record not found"))}c=e.D,(f[c++]!==Z[0]||f[c++]!==Z[1]||f[c++]!==Z[2]||f[c++]!==Z[3])&&t(Error("invalid signature")),e.ia=f[c++]|f[c++]<<8,e.ka=f[c++]|f[c++]<<8,e.la=f[c++]|f[c++]<<8,e.ba=f[c++]|f[c++]<<8,e.R=(f[c++]|f[c++]<<8|f[c++]<<16|f[c++]<<24)>>>0,e.o=(f[c++]|f[c++]<<8|f[c++]<<16|f[c++]<<24)>>>0,e.w=f[c++]|f[c++]<<8,e.v=y?f.subarray(c,c+e.w):f.slice(c,c+e.w)}for(n=e.o,i=0,o=e.ba;o>i;++i)r=new u(e.input,n),r.parse(),n+=r.length,s[i]=r,a[r.filename]=i;e.R<n-e.o&&t(Error("invalid file header size")),e.i=s,e.G=a}}function h(t,e,n){return n^=t.s(e),t.k(e,n),n}var p,d=void 0,g=this,y="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;new(y?Uint8Array:Array)(256);var v;for(v=0;256>v;++v)for(var m=v,b=7,m=m>>>1;m;m>>>=1)--b;var w,E=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],A=y?new Uint32Array(E):E,k=[];for(w=0;288>w;w++)switch(!0){case 143>=w:k.push([w+48,8]);break;case 255>=w:k.push([w-144+400,9]);break;case 279>=w:k.push([w-256+0,7]);break;case 287>=w:k.push([w-280+192,8]);break;default:t("invalid literal: "+w)}var _=function(){function e(e){switch(!0){case 3===e:return[257,e-3,0];case 4===e:return[258,e-4,0];case 5===e:return[259,e-5,0];case 6===e:return[260,e-6,0];case 7===e:return[261,e-7,0];case 8===e:return[262,e-8,0];case 9===e:return[263,e-9,0];case 10===e:return[264,e-10,0];case 12>=e:return[265,e-11,1];case 14>=e:return[266,e-13,1];case 16>=e:return[267,e-15,1];case 18>=e:return[268,e-17,1];case 22>=e:return[269,e-19,2];case 26>=e:return[270,e-23,2];case 30>=e:return[271,e-27,2];case 34>=e:return[272,e-31,2];case 42>=e:return[273,e-35,3];case 50>=e:return[274,e-43,3];case 58>=e:return[275,e-51,3];case 66>=e:return[276,e-59,3];case 82>=e:return[277,e-67,4];case 98>=e:return[278,e-83,4];case 114>=e:return[279,e-99,4];case 130>=e:return[280,e-115,4];case 162>=e:return[281,e-131,5];case 194>=e:return[282,e-163,5];case 226>=e:return[283,e-195,5];case 257>=e:return[284,e-227,5];case 258===e:return[285,e-258,0];default:t("invalid length: "+e)}}var n,r,i=[];for(n=3;258>=n;n++)r=e(n),i[n]=r[2]<<24|r[1]<<16|r[0];return i}();y&&new Uint32Array(_);var x=0,S=1;r.prototype.r=function(){for(;!this.u;){var e=i(this,3);switch(1&e&&(this.u=!0),e>>>=1){case 0:var n=this.input,r=this.c,o=this.b,a=this.a,c=n.length,u=d,f=d,l=o.length,h=d;switch(this.d=this.f=0,r+1>=c&&t(Error("invalid uncompressed block header: LEN")),u=n[r++]|n[r++]<<8,r+1>=c&&t(Error("invalid uncompressed block header: NLEN")),f=n[r++]|n[r++]<<8,u===~f&&t(Error("invalid uncompressed block header: length verify")),r+u>n.length&&t(Error("input buffer is broken")),this.n){case x:for(;a+u>o.length;){if(h=l-a,u-=h,y)o.set(n.subarray(r,r+h),a),a+=h,r+=h;else for(;h--;)o[a++]=n[r++];this.a=a,o=this.e(),a=this.a}break;case S:for(;a+u>o.length;)o=this.e({H:2});break;default:t(Error("invalid inflate mode"))}if(y)o.set(n.subarray(r,r+u),a),a+=u,r+=u;else for(;u--;)o[a++]=n[r++];this.c=r,this.a=a,this.b=o;break;case 1:this.q(V,H);break;case 2:s(this);break;default:t(Error("unknown BTYPE: "+e))}}return this.B()};var O,I,T=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],D=y?new Uint16Array(T):T,N=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],R=y?new Uint16Array(N):N,U=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],C=y?new Uint8Array(U):U,M=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],F=y?new Uint16Array(M):M,L=[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],B=y?new Uint8Array(L):L,z=new(y?Uint8Array:Array)(288);for(O=0,I=z.length;I>O;++O)z[O]=143>=O?8:255>=O?9:279>=O?7:8;var j,P,V=n(z),q=new(y?Uint8Array:Array)(30);for(j=0,P=q.length;P>j;++j)q[j]=5;var H=n(q);p=r.prototype,p.q=function(t,e){var n=this.b,r=this.a;this.C=t;for(var s,a,c,u,f=n.length-258;256!==(s=o(this,t));)if(256>s)r>=f&&(this.a=r,n=this.e(),r=this.a),n[r++]=s;else for(a=s-257,u=R[a],C[a]>0&&(u+=i(this,C[a])),s=o(this,e),c=F[s],B[s]>0&&(c+=i(this,B[s])),r>=f&&(this.a=r,n=this.e(),r=this.a);u--;)n[r]=n[r++-c];for(;this.d>=8;)this.d-=8,this.c--;this.a=r},p.W=function(t,e){var n=this.b,r=this.a;this.C=t;for(var s,a,c,u,f=n.length;256!==(s=o(this,t));)if(256>s)r>=f&&(n=this.e(),f=n.length),n[r++]=s;else for(a=s-257,u=R[a],C[a]>0&&(u+=i(this,C[a])),s=o(this,e),c=F[s],B[s]>0&&(c+=i(this,B[s])),r+u>f&&(n=this.e(),f=n.length);u--;)n[r]=n[r++-c];for(;this.d>=8;)this.d-=8,this.c--;this.a=r},p.e=function(){var t,e,n=new(y?Uint8Array:Array)(this.a-32768),r=this.a-32768,i=this.b;if(y)n.set(i.subarray(32768,n.length));else for(t=0,e=n.length;e>t;++t)n[t]=i[t+32768];if(this.l.push(n),this.t+=n.length,y)i.set(i.subarray(r,r+32768));else for(t=0;32768>t;++t)i[t]=i[r+t];return this.a=32768,i},p.X=function(t){var e,n,r,i,o=0|this.input.length/this.c+1,s=this.input,a=this.b;return t&&("number"==typeof t.H&&(o=t.H),"number"==typeof t.Q&&(o+=t.Q)),2>o?(n=(s.length-this.c)/this.C[2],i=0|258*(n/2),r=a.length>i?a.length+i:a.length<<1):r=a.length*o,y?(e=new Uint8Array(r),e.set(a)):e=a,this.b=e},p.B=function(){var t,e,n,r,i,o=0,s=this.b,a=this.l,c=new(y?Uint8Array:Array)(this.t+(this.a-32768));if(0===a.length)return y?this.b.subarray(32768,this.a):this.b.slice(32768,this.a);for(e=0,n=a.length;n>e;++e)for(t=a[e],r=0,i=t.length;i>r;++r)c[o++]=t[r];for(e=32768,n=this.a;n>e;++e)c[o++]=s[e];return this.l=[],this.buffer=c},p.S=function(){var t,e=this.a;return y?this.L?(t=new Uint8Array(e),t.set(this.b.subarray(0,e))):t=this.b.subarray(0,e):(this.b.length>e&&(this.b.length=e),t=this.b),this.buffer=t},a.prototype.M=function(t){this.j=t},a.prototype.s=function(t){var e=2|65535&t[2];return 255&e*(1^e)>>8},a.prototype.k=function(t,e){t[0]=(A[255&(t[0]^e)]^t[0]>>>8)>>>0,t[1]=(6681*(20173*(t[1]+(255&t[0]))>>>0)>>>0)+1>>>0,t[2]=(A[255&(t[2]^t[1]>>>24)]^t[2]>>>8)>>>0},a.prototype.U=function(t){var e,n,r=[305419896,591751049,878082192];for(y&&(r=new Uint32Array(r)),e=0,n=t.length;n>e;++e)this.k(r,255&t[e]);return r};var W={P:0,N:8},Y=[80,75,1,2],X=[80,75,3,4],Z=[80,75,5,6];u.prototype.parse=function(){var e=this.input,n=this.offset;(e[n++]!==Y[0]||e[n++]!==Y[1]||e[n++]!==Y[2]||e[n++]!==Y[3])&&t(Error("invalid file header signature")),this.version=e[n++],this.ja=e[n++],this.$=e[n++]|e[n++]<<8,this.I=e[n++]|e[n++]<<8,this.A=e[n++]|e[n++]<<8,this.time=e[n++]|e[n++]<<8,this.V=e[n++]|e[n++]<<8,this.p=(e[n++]|e[n++]<<8|e[n++]<<16|e[n++]<<24)>>>0,this.z=(e[n++]|e[n++]<<8|e[n++]<<16|e[n++]<<24)>>>0,this.J=(e[n++]|e[n++]<<8|e[n++]<<16|e[n++]<<24)>>>0,this.h=e[n++]|e[n++]<<8,this.g=e[n++]|e[n++]<<8,this.F=e[n++]|e[n++]<<8,this.fa=e[n++]|e[n++]<<8,this.ha=e[n++]|e[n++]<<8,this.ga=e[n++]|e[n++]<<8|e[n++]<<16|e[n++]<<24,this.aa=(e[n++]|e[n++]<<8|e[n++]<<16|e[n++]<<24)>>>0,this.filename=String.fromCharCode.apply(null,y?e.subarray(n,n+=this.h):e.slice(n,n+=this.h)),this.Y=y?e.subarray(n,n+=this.g):e.slice(n,n+=this.g),this.v=y?e.subarray(n,n+this.F):e.slice(n,n+this.F),this.length=n-this.offset};var K={O:1,da:8,ea:2048};f.prototype.parse=function(){var e=this.input,n=this.offset;(e[n++]!==X[0]||e[n++]!==X[1]||e[n++]!==X[2]||e[n++]!==X[3])&&t(Error("invalid local file header signature")),this.$=e[n++]|e[n++]<<8,this.I=e[n++]|e[n++]<<8,this.A=e[n++]|e[n++]<<8,this.time=e[n++]|e[n++]<<8,this.V=e[n++]|e[n++]<<8,this.p=(e[n++]|e[n++]<<8|e[n++]<<16|e[n++]<<24)>>>0,this.z=(e[n++]|e[n++]<<8|e[n++]<<16|e[n++]<<24)>>>0,this.J=(e[n++]|e[n++]<<8|e[n++]<<16|e[n++]<<24)>>>0,this.h=e[n++]|e[n++]<<8,this.g=e[n++]|e[n++]<<8,this.filename=String.fromCharCode.apply(null,y?e.subarray(n,n+=this.h):e.slice(n,n+=this.h)),this.Y=y?e.subarray(n,n+=this.g):e.slice(n,n+=this.g),this.length=n-this.offset},p=c.prototype,p.Z=function(){var t,e,n,r=[];for(this.i||l(this),n=this.i,t=0,e=n.length;e>t;++t)r[t]=n[t].filename;return r},p.r=function(e,n){var i;this.G||l(this),i=this.G[e],i===d&&t(Error(e+" not found"));var o;o=n||{};var s,a,c,u,p,g,v,m,b=this.input,w=this.i;if(w||l(this),w[i]===d&&t(Error("wrong index")),a=w[i].aa,s=new f(this.input,a),s.parse(),a+=s.length,c=s.z,0!==(s.I&K.O)){for(!o.password&&!this.j&&t(Error("please set password")),g=this.T(o.password||this.j),v=a,m=a+12;m>v;++v)h(this,g,b[v]);for(a+=12,c-=12,v=a,m=a+c;m>v;++v)b[v]=h(this,g,b[v])}switch(s.A){case W.P:u=y?this.input.subarray(a,a+c):this.input.slice(a,a+c);break;case W.N:u=new r(this.input,{index:a,bufferSize:s.J}).r();break;default:t(Error("unknown compression type"))}if(this.ca){var E,k=d,_="number"==typeof k?k:k=0,x=u.length;for(E=-1,_=7&x;_--;++k)E=E>>>8^A[255&(E^u[k])];for(_=x>>3;_--;k+=8)E=E>>>8^A[255&(E^u[k])],E=E>>>8^A[255&(E^u[k+1])],E=E>>>8^A[255&(E^u[k+2])],E=E>>>8^A[255&(E^u[k+3])],E=E>>>8^A[255&(E^u[k+4])],E=E>>>8^A[255&(E^u[k+5])],E=E>>>8^A[255&(E^u[k+6])],E=E>>>8^A[255&(E^u[k+7])];p=(4294967295^E)>>>0,s.p!==p&&t(Error("wrong crc: file=0x"+s.p.toString(16)+", data=0x"+p.toString(16)))}return u},p.M=function(t){this.j=t},p.k=a.prototype.k,p.T=a.prototype.U,p.s=a.prototype.s,e("Zlib.Unzip",c),e("Zlib.Unzip.prototype.decompress",c.prototype.r),e("Zlib.Unzip.prototype.getFilenames",c.prototype.Z),e("Zlib.Unzip.prototype.setPassword",c.prototype.M)}.call(this),n("unzip",function(){}),n("src/shell/shell",["require","src/path","src/errors","src/shell/environment","async","zip","unzip"],function(t){function e(t,e){e=e||{};var o=new i(e.env),s="/";Object.defineProperty(this,"fs",{get:function(){return t},enumerable:!0}),Object.defineProperty(this,"env",{get:function(){return o},enumerable:!0}),this.cd=function(e,i){e=n.resolve(this.cwd,e),t.stat(e,function(t,n){return t?(i(new r.ENOTDIR),void 0):("DIRECTORY"===n.type?(s=e,i()):i(new r.ENOTDIR),void 0)})},this.pwd=function(){return s}}var n=t("src/path"),r=t("src/errors"),i=t("src/shell/environment"),o=t("async");return t("zip"),t("unzip"),e.prototype.exec=function(t,e,r){var i=this.fs;"function"==typeof e&&(r=e,e=[]),e=e||[],r=r||function(){},t=n.resolve(this.cwd,t),i.readFile(t,"utf8",function(t,n){if(t)return r(t),void 0;try{var o=Function("fs","args","callback",n);o(i,e,r)}catch(s){r(s)}})},e.prototype.touch=function(t,e,r){function i(t){s.writeFile(t,"",r)}function o(t){var n=Date.now(),i=e.date||n,o=e.date||n;s.utimes(t,i,o,r)}var s=this.fs;"function"==typeof e&&(r=e,e={}),e=e||{},r=r||function(){},t=n.resolve(this.cwd,t),s.stat(t,function(n){n?e.updateOnly===!0?r():i(t):o(t)})},e.prototype.cat=function(t,e){function i(t,e){var r=n.resolve(this.cwd,t);s.readFile(r,"utf8",function(t,n){return t?(e(t),void 0):(a+=n+"\n",e(),void 0)})}var s=this.fs,a="";return e=e||function(){},t?(t="string"==typeof t?[t]:t,o.eachSeries(t,i,function(t){t?e(t):e(null,a.replace(/\n$/,""))}),void 0):(e(new r.EINVAL("Missing files argument")),void 0)},e.prototype.ls=function(t,e,i){function s(t,r){var i=n.resolve(this.cwd,t),c=[];a.readdir(i,function(t,u){function f(t,r){t=n.join(i,t),a.stat(t,function(o,a){if(o)return r(o),void 0;var u={path:n.basename(t),links:a.nlinks,size:a.size,modified:a.mtime,type:a.type};e.recursive&&"DIRECTORY"===a.type?s(n.join(i,u.path),function(t,e){return t?(r(t),void 0):(u.contents=e,c.push(u),r(),void 0)}):(c.push(u),r())})}return t?(r(t),void 0):(o.each(u,f,function(t){r(t,c)}),void 0)})}var a=this.fs;return"function"==typeof e&&(i=e,e={}),e=e||{},i=i||function(){},t?(s(t,i),void 0):(i(new r.EINVAL("Missing dir argument")),void 0)},e.prototype.rm=function(t,e,i){function s(t,i){t=n.resolve(this.cwd,t),a.stat(t,function(c,u){return c?(i(c),void 0):"FILE"===u.type?(a.unlink(t,i),void 0):(a.readdir(t,function(c,u){return c?(i(c),void 0):0===u.length?(a.rmdir(t,i),void 0):e.recursive?(u=u.map(function(e){return n.join(t,e)}),o.each(u,s,function(e){return e?(i(e),void 0):(a.rmdir(t,i),void 0)}),void 0):(i(new r.ENOTEMPTY),void 0)}),void 0)})}var a=this.fs;return"function"==typeof e&&(i=e,e={}),e=e||{},i=i||function(){},t?(s(t,i),void 0):(i(new r.EINVAL("Missing path argument")),void 0)},e.prototype.tempDir=function(t){var e=this.fs,n=this.env.get("TMP");t=t||function(){},e.mkdir(n,function(){t(null,n)})},e.prototype.mkdirp=function(t,e){function i(t,e){o.stat(t,function(s,a){if(a){if(a.isDirectory())return e(),void 0;if(a.isFile())return e(new r.ENOTDIR),void 0}else{if(s&&"ENOENT"!==s.code)return e(s),void 0;var c=n.dirname(t);"/"===c?o.mkdir(t,function(t){return t&&"EEXIST"!=t.code?(e(t),void 0):(e(),void 0)}):i(c,function(n){return n?e(n):(o.mkdir(t,function(t){return t&&"EEXIST"!=t.code?(e(t),void 0):(e(),void 0)}),void 0)})}})}var o=this.fs;return e=e||function(){},t?"/"===t?(e(),void 0):(i(t,e),void 0):(e(new r.EINVAL("Missing path argument")),void 0)},e.prototype.wget=function(t,e,i){function o(){i(Error("unable to get resource"))}var s=this.fs;if("function"==typeof e&&(i=e,e={}),e=e||{},i=i||function(){},!t)return i(new r.EINVAL("missing url argument")),void 0;var a=e.filename||t.replace(/[:/]/g,"").split("/").pop();a=n.resolve(s.cwd,a);var c=new XMLHttpRequest;c.onload=function(){if(200!==c.status)return o();var t=new Uint8Array(c.response);s.writeFile(a,t,function(t){t?i(t):i(null,a)})},c.onerror=o,c.open("GET",t,!0),"withCredentials"in c&&(c.withCredentials=!0),c.responseType="arraybuffer",c.send()},e.prototype.unzip=function(t,e,i){var s=this.fs,a=this;if("function"==typeof e&&(i=e,e={}),e=e||{},i=i||function(){},!t)return i(new r.EINVAL("missing zipfile argument")),void 0;var c=n.resolve(this.cwd,t),u=n.resolve(e.destination||this.cwd);s.readFile(c,function(t,e){function r(t,e){var n=c.decompress(t.zipFilename);t.isDirectory?a.mkdirp(t.fsFilename,e):s.writeFile(t.fsFilename,n,e)}if(t)return i(t);var c=new Zlib.Unzip(e),f=c.getFilenames().map(function(t){return{zipFilename:t,fsFilename:n.join(u,t),isDirectory:/\/$/.test(t)}});o.eachSeries(f,r,i)})},e.prototype.zip=function(t,e,i,s){function a(t){return new TextEncoder("utf8").encode(t)}function c(t,e){l.readFile(t,function(n,r){if(n)return e(n);var i=t.replace(/^\//,"");p.addFile(r,{filename:a(i)}),e()})}function u(t,e){l.readdir(t,function(r,s){p.addFile([],{filename:a(t+"/"),compressionMethod:Zlib.Zip.CompressionMethod.STORE}),i.recursive||e(),o.eachSeries(s,function(e,r){f(n.join(t,e),r)},e)})}function f(t,e){t=n.resolve(h.cwd,t),l.stat(t,function(n,r){return n?e(n):(r.isDirectory()?u(t,e):c(t,e),void 0)})}var l=this.fs,h=this;if("function"==typeof i&&(s=i,i={}),i=i||{},s=s||function(){},!t)return s(new r.EINVAL("missing zipfile argument")),void 0;if(!e)return s(new r.EINVAL("missing paths argument")),void 0;"string"==typeof e&&(e=[e]),t=n.resolve(this.cwd,t);var p=new Zlib.Zip;l.stat(t,function(n,i){return i?s(new r.EEXIST("zipfile already exists")):(o.eachSeries(e,f,function(e){if(e)return s(e);var n=p.compress();l.writeFile(t,n,s)}),void 0)})},e}),n("eventemitter",["require"],function(){function t(t,e){for(var n=e.length-1;n>=0;n--)e[n]===t&&e.splice(n,1);return e}var e=function(){};e.createInterface=function(e){var n={};return n.on=function(t,n){this[e]===void 0&&(this[e]={}),this[e].hasOwnProperty(t)||(this[e][t]=[]),this[e][t].push(n)},n.off=function(n,r){void 0!==this[e]&&this[e].hasOwnProperty(n)&&t(r,this[e][n])},n.trigger=function(t){if(this[e]!==void 0&&this[e].hasOwnProperty(t))for(var n=Array.prototype.slice.call(arguments,1),r=0;this[e][t].length>r;r++)this[e][t][r].apply(this[e][t][r],n)},n.removeAllListeners=function(t){if(void 0!==this[e]){var n=this;n[e][t].forEach(function(e){n.off(t,e)})}},n};var n=e.createInterface("_handlers");e.prototype._on=n.on,e.prototype._off=n.off,e.prototype._trigger=n.trigger;var r=e.createInterface("handlers");return e.prototype.on=function(){r.on.apply(this,arguments),Array.prototype.unshift.call(arguments,"on"),this._trigger.apply(this,arguments)},e.prototype.off=r.off,e.prototype.trigger=r.trigger,e.prototype.removeAllListeners=r.removeAllListeners,e}),n("intercom",["require","eventemitter","src/shared"],function(t){function e(t,e){var n=0;return function(){var r=Date.now();r-n>t&&(n=r,e.apply(this,arguments))}}function n(t,e){if(void 0!==t&&t||(t={}),"object"==typeof e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function r(){var t=this,e=Date.now();this.origin=o(),this.lastMessage=e,this.receivedIDs={},this.previousValues={};var n=function(){t._onStorageEvent.apply(t,arguments)};document.attachEvent?document.attachEvent("onstorage",n):window.addEventListener("storage",n,!1)}var i=t("eventemitter"),o=t("src/shared").guid,s=function(t){return t.localStorage===void 0?{getItem:function(){},setItem:function(){},removeItem:function(){}}:t.localStorage}(this);r.prototype._transaction=function(t){function e(){if(!a){var l=Date.now(),h=0|s.getItem(u);if(h&&r>l-h)return c||(o._on("storage",e),c=!0),f=window.setTimeout(e,i),void 0;a=!0,s.setItem(u,l),t(),n()}}function n(){c&&o._off("storage",e),f&&window.clearTimeout(f),s.removeItem(u)}var r=1e3,i=20,o=this,a=!1,c=!1,f=null;e()},r.prototype._cleanup_emit=e(100,function(){var t=this;t._transaction(function(){var t,e=Date.now(),n=e-f,r=0;try{t=JSON.parse(s.getItem(a)||"[]")}catch(i){t=[]}for(var o=t.length-1;o>=0;o--)n>t[o].timestamp&&(t.splice(o,1),r++);r>0&&s.setItem(a,JSON.stringify(t))})}),r.prototype._cleanup_once=e(100,function(){var t=this;t._transaction(function(){var e,n;Date.now();var r=0;try{n=JSON.parse(s.getItem(c)||"{}")}catch(i){n={}}for(e in n)t._once_expired(e,n)&&(delete n[e],r++);r>0&&s.setItem(c,JSON.stringify(n))})}),r.prototype._once_expired=function(t,e){if(!e)return!0;if(!e.hasOwnProperty(t))return!0;if("object"!=typeof e[t])return!0;var n=e[t].ttl||l,r=Date.now(),i=e[t].timestamp;return r-n>i},r.prototype._localStorageChanged=function(t,e){if(t&&t.key)return t.key===e;var n=s.getItem(e);return n===this.previousValues[e]?!1:(this.previousValues[e]=n,!0)},r.prototype._onStorageEvent=function(t){t=t||window.event;var e=this;this._localStorageChanged(t,a)&&this._transaction(function(){var t,n=Date.now(),r=s.getItem(a);try{t=JSON.parse(r||"[]")}catch(i){t=[]}for(var o=0;t.length>o;o++)if(t[o].origin!==e.origin&&!(t[o].timestamp<e.lastMessage)){if(t[o].id){if(e.receivedIDs.hasOwnProperty(t[o].id))continue;e.receivedIDs[t[o].id]=!0}e.trigger(t[o].name,t[o].payload)}e.lastMessage=n}),this._trigger("storage",t)},r.prototype._emit=function(t,e,n){if(n="string"==typeof n||"number"==typeof n?n+"":null,n&&n.length){if(this.receivedIDs.hasOwnProperty(n))return;this.receivedIDs[n]=!0}var r={id:n,name:t,origin:this.origin,timestamp:Date.now(),payload:e},i=this;this._transaction(function(){var n=s.getItem(a)||"[]",o="[]"===n?"":",";n=[n.substring(0,n.length-1),o,JSON.stringify(r),"]"].join(""),s.setItem(a,n),i.trigger(t,e),window.setTimeout(function(){i._cleanup_emit()},50)})},r.prototype.emit=function(t,e){this._emit.apply(this,arguments),this._trigger("emit",t,e)},r.prototype.once=function(t,e,n){if(r.supported){var i=this;this._transaction(function(){var r;try{r=JSON.parse(s.getItem(c)||"{}")}catch(o){r={}}i._once_expired(t,r)&&(r[t]={},r[t].timestamp=Date.now(),"number"==typeof n&&(r[t].ttl=1e3*n),s.setItem(c,JSON.stringify(r)),e(),window.setTimeout(function(){i._cleanup_once()},50))})}},n(r.prototype,i.prototype),r.supported=s!==void 0;var a="intercom",c="intercom_once",u="intercom_lock",f=5e4,l=36e5;return r.destroy=function(){s.removeItem(u),s.removeItem(a),s.removeItem(c)},r.getInstance=function(){var t;return function(){return t||(t=new r),t}}(),r}),n("src/fs-watcher",["require","eventemitter","src/path","intercom"],function(t){function e(){function t(t){(e===t||s&&0===t.indexOf(e+"/"))&&o.trigger("change","change",t)}n.call(this);var e,o=this,s=!1;o.start=function(n,o,a){if(!e){if(r(n))throw Error("Path must be a string without null bytes.");e=n,s=a===!0;var c=i.getInstance();c.on("change",t)}},o.close=function(){var e=i.getInstance();e.off("change",t),o.removeAllListeners("change")}}var n=t("eventemitter"),r=t("src/path").isNull,i=t("intercom");return e.prototype=new n,e.prototype.constructor=e,e}),n("src/directory-entry",["src/constants"],function(t){return function(e,n){this.id=e,this.type=n||t.MODE_FILE}}),n("src/open-file-description",["require"],function(){return function(t,e,n,r){this.path=t,this.id=e,this.flags=n,this.position=r}}),n("src/super-node",["src/constants","src/shared"],function(t,e){return function(n,r,i){var o=Date.now();this.id=t.SUPER_NODE_ID,this.mode=t.MODE_META,this.atime=n||o,this.ctime=r||o,this.mtime=i||o,this.rnode=e.guid()}}),n("src/node",["src/constants","src/shared"],function(t,e){return function(n,r,i,o,s,a,c,u,f,l){var h=Date.now();this.id=n||e.guid(),this.mode=r||t.MODE_FILE,this.size=i||0,this.atime=o||h,this.ctime=s||h,this.mtime=a||h,this.flags=c||[],this.xattrs=u||{},this.nlinks=f||0,this.version=l||0,this.blksize=void 0,this.nblocks=1,this.data=e.guid()}}),n("src/stats",["src/constants"],function(t){function e(t,e){this.node=t.id,this.dev=e,this.size=t.size,this.nlinks=t.nlinks,this.atime=t.atime,this.mtime=t.mtime,this.ctime=t.ctime,this.type=t.mode}return e.prototype.isFile=function(){return this.type===t.MODE_FILE},e.prototype.isDirectory=function(){return this.type===t.MODE_DIRECTORY},e.prototype.isSymbolicLink=function(){return this.type===t.MODE_SYMBOLIC_LINK},e.prototype.isSocket=e.prototype.isFIFO=e.prototype.isCharacterDevice=e.prototype.isBlockDevice=function(){return!1},e}),n("src/filesystem/implementation",["require","encoding","nodash","src/path","src/path","src/path","src/path","src/path","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/constants","src/errors","src/directory-entry","src/open-file-description","src/super-node","src/node","src/stats"],function(t){function e(t){return function(e,n){e?t(e):t(null,n)}}function n(t,e,n,r,i){function o(n){t.changes.push({event:"change",path:e}),i(n)}var s=t.flags;le(s).contains(Ue)&&delete r.ctime,le(s).contains(Re)&&delete r.mtime;var a=!1;r.ctime&&(n.ctime=r.ctime,n.atime=r.ctime,a=!0),r.atime&&(n.atime=r.atime,a=!0),r.mtime&&(n.mtime=r.mtime,a=!0),a?t.put(n.id,n,o):o()}function r(t,e,r,o){function s(n,r){n?o(n):r.mode!==me?o(new Ce.ENOTDIR("a component of the path prefix is not a directory")):(l=r,i(t,e,a))}function a(e,n){!e&&n?o(new Ce.EEXIST("path name already exists")):!e||e instanceof Ce.ENOENT?t.get(l.data,c):o(e)}function c(e,n){e?o(e):(h=n,p=new Be(void 0,r),p.nlinks+=1,t.put(p.id,p,f))}function u(e){if(e)o(e);else{var r=Date.now();n(t,g,p,{mtime:r,ctime:r},o)}}function f(e){e?o(e):(h[d]=new Me(p.id,r),t.put(l.data,h,u))}if(r!==me&&r!==ve)return o(new Ce.EINVAL("mode must be a directory or file"));e=he(e);var l,h,p,d=de(e),g=pe(e);i(t,g,s)}function i(t,e,n){function r(e,r){e?n(e):r&&r.mode===we&&r.rnode?t.get(r.rnode,o):n(new Ce.EFILESYSTEMERROR)}function o(t,e){t?n(t):e?n(null,e):n(new Ce.ENOENT)}function s(e,r){e?n(e):r.mode===me&&r.data?t.get(r.data,a):n(new Ce.ENOTDIR("a component of the path prefix is not a directory"))}function a(e,r){if(e)n(e);else if(le(r).has(f)){var i=r[f].id;t.get(i,c)}else n(new Ce.ENOENT)}function c(t,e){t?n(t):e.mode==be?(h++,h>ke?n(new Ce.ELOOP):u(e.data)):n(null,e)}function u(e){e=he(e),l=pe(e),f=de(e),Ee==f?t.get(Ae,r):i(t,l,s)}if(e=he(e),!e)return n(new Ce.ENOENT("path is an empty string"));var f=de(e),l=pe(e),h=0;Ee==f?t.get(Ae,r):i(t,l,s)}function o(t,e,r,o,s,a){function c(e,i){function c(e){e?a(e):n(t,u,i,{ctime:Date.now()},a)}i?i.xattrs[r]:null,e?a(e):s===De&&i.xattrs.hasOwnProperty(r)?a(new Ce.EEXIST("attribute already exists")):s!==Ne||i.xattrs.hasOwnProperty(r)?(i.xattrs[r]=o,t.put(i.id,i,c)):a(new Ce.ENOATTR)}var u;"string"==typeof e?(u=e,i(t,e,c)):"object"==typeof e&&"string"==typeof e.id?(u=e.path,t.get(e.id,c)):a(new Ce.EINVAL("path or file descriptor of wrong type"))}function s(t,e){function n(n,i){!n&&i?e(new Ce.EEXIST):!n||n instanceof Ce.ENOENT?(o=new Le,t.put(o.id,o,r)):e(n)}function r(n){n?e(n):(s=new Be(o.rnode,me),s.nlinks+=1,t.put(s.id,s,i))}function i(n){n?e(n):(a={},t.put(s.data,a,e))}var o,s,a;t.get(Ae,n)}function a(t,e,r){function o(e,n){!e&&n?r(new Ce.EEXIST):!e||e instanceof Ce.ENOENT?i(t,y,s):r(e)}function s(e,n){e?r(e):(p=n,t.get(p.data,a))}function a(e,n){e?r(e):(d=n,l=new Be(void 0,me),l.nlinks+=1,t.put(l.id,l,c))}function c(e){e?r(e):(h={},t.put(l.data,h,f))}function u(e){if(e)r(e);else{var i=Date.now();n(t,y,p,{mtime:i,ctime:i},r)}}function f(e){e?r(e):(d[g]=new Me(l.id,me),t.put(p.data,d,u))}e=he(e);var l,h,p,d,g=de(e),y=pe(e);i(t,e,o)}function c(t,e,r){function o(e,n){e?r(e):(g=n,t.get(g.data,s))}function s(e,n){e?r(e):Ee==v?r(new Ce.EBUSY):le(n).has(v)?(y=n,p=y[v].id,t.get(p,a)):r(new Ce.ENOENT)}function a(e,n){e?r(e):n.mode!=me?r(new Ce.ENOTDIR):(p=n,t.get(p.data,c))}function c(t,e){t?r(t):(d=e,le(d).size()>0?r(new Ce.ENOTEMPTY):f())}function u(e){if(e)r(e);else{var i=Date.now();n(t,m,g,{mtime:i,ctime:i},l)}}function f(){delete y[v],t.put(g.data,y,u)}function l(e){e?r(e):t.delete(p.id,h)}function h(e){e?r(e):t.delete(p.data,r)}e=he(e);var p,d,g,y,v=de(e),m=pe(e);i(t,m,o)}function u(t,e,r,o){function s(e,n){e?o(e):(y=n,t.get(y.data,a))}function a(e,n){e?o(e):(v=n,le(v).has(E)?le(r).contains(Oe)?o(new Ce.ENOENT("O_CREATE and O_EXCLUSIVE are set, and the named file exists")):(m=v[E],m.type==me&&le(r).contains(xe)?o(new Ce.EISDIR("the named file is a directory and O_WRITE is set")):t.get(m.id,c)):le(r).contains(Se)?l():o(new Ce.ENOENT("O_CREATE is not set and the named file does not exist")))}function c(t,e){if(t)o(t);else{var n=e;n.mode==be?(k++,k>ke?o(new Ce.ELOOP):u(n.data)):f(void 0,n)}}function u(n){n=he(n),A=pe(n),E=de(n),Ee==E&&(le(r).contains(xe)?o(new Ce.EISDIR("the named file is a directory and O_WRITE is set")):i(t,e,f)),i(t,A,s)}function f(t,e){t?o(t):(b=e,o(null,b))}function l(){b=new Be(void 0,ve),b.nlinks+=1,t.put(b.id,b,h)}function h(e){e?o(e):(w=new Uint8Array(0),t.put(b.data,w,d))
}function p(e){if(e)o(e);else{var r=Date.now();n(t,A,y,{mtime:r,ctime:r},g)}}function d(e){e?o(e):(v[E]=new Me(b.id,ve),t.put(y.data,v,p))}function g(t){t?o(t):o(null,b)}e=he(e);var y,v,m,b,w,E=de(e),A=pe(e),k=0;Ee==E?le(r).contains(xe)?o(new Ce.EISDIR("the named file is a directory and O_WRITE is set")):i(t,e,f):i(t,A,s)}function f(t,e,r,i,o,s){function a(t){t?s(t):s(null,o)}function c(r){if(r)s(r);else{var i=Date.now();n(t,e.path,l,{mtime:i,ctime:i},a)}}function u(e){e?s(e):t.put(l.id,l,c)}function f(n,a){if(n)s(n);else{l=a;var c=new Uint8Array(o),f=r.subarray(i,i+o);c.set(f),e.position=o,l.size=o,l.version+=1,t.put(l.data,c,u)}}var l;t.get(e.id,f)}function l(t,e,r,i,o,s,a){function c(t){t?a(t):a(null,o)}function u(r){if(r)a(r);else{var i=Date.now();n(t,e.path,p,{mtime:i,ctime:i},c)}}function f(e){e?a(e):t.put(p.id,p,u)}function l(n,c){if(n)a(n);else{d=c;var u=void 0!==s&&null!==s?s:e.position,l=Math.max(d.length,u+o),h=new Uint8Array(l);d&&h.set(d);var g=r.subarray(i,i+o);h.set(g,u),void 0===s&&(e.position+=o),p.size=l,p.version+=1,t.put(p.data,h,f)}}function h(e,n){e?a(e):(p=n,t.get(p.data,l))}var p,d;t.get(e.id,h)}function h(t,e,n,r,i,o,s){function a(t,a){if(t)s(t);else{f=a;var c=void 0!==o&&null!==o?o:e.position;i=c+i>n.length?i-c:i;var u=f.subarray(c,c+i);n.set(u,r),void 0===o&&(e.position+=i),s(null,i)}}function c(e,n){e?s(e):(u=n,t.get(u.data,a))}var u,f;t.get(e.id,c)}function p(t,n,r){n=he(n),de(n),i(t,n,e(r))}function d(t,n,r){t.get(n.id,e(r))}function g(t,n,r){function o(e,n){e?r(e):(a=n,t.get(a.data,s))}function s(n,i){n?r(n):(c=i,le(c).has(u)?t.get(c[u].id,e(r)):r(new Ce.ENOENT("a component of the path does not name an existing file")))}n=he(n);var a,c,u=de(n),f=pe(n);Ee==u?i(t,n,e(r)):i(t,f,o)}function y(t,e,r,o){function s(e){e?o(e):n(t,r,b,{ctime:Date.now()},o)}function a(e,n){e?o(e):(b=n,b.nlinks+=1,t.put(b.id,b,s))}function c(e){e?o(e):t.get(m[w].id,a)}function u(e,n){e?o(e):(m=n,le(m).has(w)?o(new Ce.EEXIST("newpath resolves to an existing file")):(m[w]=y[p],t.put(v.data,m,c)))}function f(e,n){e?o(e):(v=n,t.get(v.data,u))}function l(e,n){e?o(e):(y=n,le(y).has(p)?i(t,E,f):o(new Ce.ENOENT("a component of either path prefix does not exist")))}function h(e,n){e?o(e):(g=n,t.get(g.data,l))}e=he(e);var p=de(e),d=pe(e);r=he(r);var g,y,v,m,b,w=de(r),E=pe(r);i(t,d,h)}function v(t,e,r){function o(e){e?r(e):(delete l[p],t.put(f.data,l,function(){var e=Date.now();n(t,d,f,{mtime:e,ctime:e},r)}))}function s(e){e?r(e):t.delete(h.data,o)}function a(i,a){i?r(i):(h=a,h.nlinks-=1,1>h.nlinks?t.delete(h.id,s):t.put(h.id,h,function(){n(t,e,h,{ctime:Date.now()},o)}))}function c(e,n){e?r(e):(l=n,le(l).has(p)?t.get(l[p].id,a):r(new Ce.ENOENT("a component of the path does not name an existing file")))}function u(e,n){e?r(e):(f=n,t.get(f.data,c))}e=he(e);var f,l,h,p=de(e),d=pe(e);i(t,d,u)}function m(t,e,n){function r(t,e){if(t)n(t);else{a=e;var r=Object.keys(a);n(null,r)}}function o(e,i){e?n(e):(s=i,t.get(s.data,r))}e=he(e),de(e);var s,a;i(t,e,o)}function b(t,e,r,o){function s(e,n){e?o(e):(l=n,t.get(l.data,a))}function a(t,e){t?o(t):(h=e,le(h).has(d)?o(new Ce.EEXIST):c())}function c(){p=new Be(void 0,be),p.nlinks+=1,p.size=e.length,p.data=e,t.put(p.id,p,f)}function u(e){if(e)o(e);else{var r=Date.now();n(t,g,l,{mtime:r,ctime:r},o)}}function f(e){e?o(e):(h[d]=new Me(p.id,be),t.put(l.data,h,u))}r=he(r);var l,h,p,d=de(r),g=pe(r);Ee==d?o(new Ce.EEXIST):i(t,g,s)}function w(t,e,n){function r(e,r){e?n(e):(a=r,t.get(a.data,o))}function o(e,r){e?n(e):(c=r,le(c).has(u)?t.get(c[u].id,s):n(new Ce.ENOENT("a component of the path does not name an existing file")))}function s(t,e){t?n(t):e.mode!=be?n(new Ce.EINVAL("path not a symbolic link")):n(null,e.data)}e=he(e);var a,c,u=de(e),f=pe(e);i(t,f,r)}function E(t,e,r,o){function s(e,n){e?o(e):n.mode==me?o(new Ce.EISDIR):(f=n,t.get(f.data,a))}function a(e,n){if(e)o(e);else{var i=new Uint8Array(r);n&&i.set(n.subarray(0,r)),t.put(f.data,i,u)}}function c(r){if(r)o(r);else{var i=Date.now();n(t,e,f,{mtime:i,ctime:i},o)}}function u(e){e?o(e):(f.size=r,f.version+=1,t.put(f.id,f,c))}e=he(e);var f;0>r?o(new Ce.EINVAL("length cannot be negative")):i(t,e,s)}function A(t,e,r,i){function o(e,n){e?i(e):n.mode==me?i(new Ce.EISDIR):(u=n,t.get(u.data,s))}function s(e,n){if(e)i(e);else{var o=new Uint8Array(r);n&&o.set(n.subarray(0,r)),t.put(u.data,o,c)}}function a(r){if(r)i(r);else{var o=Date.now();n(t,e.path,u,{mtime:o,ctime:o},i)}}function c(e){e?i(e):(u.size=r,u.version+=1,t.put(u.id,u,a))}var u;0>r?i(new Ce.EINVAL("length cannot be negative")):t.get(e.id,o)}function k(t,e,r,o,s){function a(i,a){i?s(i):n(t,e,a,{atime:r,ctime:o,mtime:o},s)}e=he(e),"number"!=typeof r||"number"!=typeof o?s(new Ce.EINVAL("atime and mtime must be number")):0>r||0>o?s(new Ce.EINVAL("atime and mtime must be positive integers")):i(t,e,a)}function _(t,e,r,i,o){function s(s,a){s?o(s):n(t,e.path,a,{atime:r,ctime:i,mtime:i},o)}"number"!=typeof r||"number"!=typeof i?o(new Ce.EINVAL("atime and mtime must be a number")):0>r||0>i?o(new Ce.EINVAL("atime and mtime must be positive integers")):t.get(e.id,s)}function x(t,e,n,r,i,s){e=he(e),"string"!=typeof n?s(new Ce.EINVAL("attribute name must be a string")):n?null!==i&&i!==De&&i!==Ne?s(new Ce.EINVAL("invalid flag, must be null, XATTR_CREATE or XATTR_REPLACE")):o(t,e,n,r,i,s):s(new Ce.EINVAL("attribute name cannot be an empty string"))}function S(t,e,n,r,i,s){"string"!=typeof n?s(new Ce.EINVAL("attribute name must be a string")):n?null!==i&&i!==De&&i!==Ne?s(new Ce.EINVAL("invalid flag, must be null, XATTR_CREATE or XATTR_REPLACE")):o(t,e,n,r,i,s):s(new Ce.EINVAL("attribute name cannot be an empty string"))}function O(t,e,n,r){function o(t,e){e?e.xattrs[n]:null,t?r(t):e.xattrs.hasOwnProperty(n)?r(null,e.xattrs[n]):r(new Ce.ENOATTR)}e=he(e),"string"!=typeof n?r(new Ce.EINVAL("attribute name must be a string")):n?i(t,e,o):r(new Ce.EINVAL("attribute name cannot be an empty string"))}function I(t,e,n,r){function i(t,e){e?e.xattrs[n]:null,t?r(t):e.xattrs.hasOwnProperty(n)?r(null,e.xattrs[n]):r(new Ce.ENOATTR)}"string"!=typeof n?r(new Ce.EINVAL):n?t.get(e.id,i):r(new Ce.EINVAL("attribute name cannot be an empty string"))}function T(t,e,r,o){function s(i,s){function a(r){r?o(r):n(t,e,s,{ctime:Date.now()},o)}var c=s?s.xattrs:null;i?o(i):c.hasOwnProperty(r)?(delete s.xattrs[r],t.put(s.id,s,a)):o(new Ce.ENOATTR)}e=he(e),"string"!=typeof r?o(new Ce.EINVAL("attribute name must be a string")):r?i(t,e,s):o(new Ce.EINVAL("attribute name cannot be an empty string"))}function D(t,e,r,i){function o(o,s){function a(r){r?i(r):n(t,e.path,s,{ctime:Date.now()},i)}o?i(o):s.xattrs.hasOwnProperty(r)?(delete s.xattrs[r],t.put(s.id,s,a)):i(new Ce.ENOATTR)}"string"!=typeof r?i(new Ce.EINVAL("attribute name must be a string")):r?t.get(e.id,o):i(new Ce.EINVAL("attribute name cannot be an empty string"))}function N(t){return le(Te).has(t)?Te[t]:null}function R(t,e,n){return t?"function"==typeof t?t={encoding:e,flag:n}:"string"==typeof t&&(t={encoding:t,flag:n}):t={encoding:e,flag:n},t}function U(t,e){var n;return ye(t)?n=Error("Path must be a string without null bytes."):ge(t)||(n=Error("Path must be absolute.")),n?(e(n),!1):!0}function C(t,e,n,r,i,o){function s(e,i){if(e)o(e);else{var s;s=le(r).contains(Ie)?i.size:0;var a=new Fe(n,i.id,r,s),c=t.allocDescriptor(a);o(null,c)}}o=arguments[arguments.length-1],U(n,o)&&(r=N(r),r||o(new Ce.EINVAL("flags is not valid")),u(e,n,r,s))}function M(t,e,n,r){le(t.openFiles).has(n)?(t.releaseDescriptor(n),r(null)):r(new Ce.EBADF)}function F(t,e,n,i,o){U(n,o)&&r(e,n,i,o)}function L(t,n,r,i,o){o=arguments[arguments.length-1],U(r,o)&&a(n,r,e(o))}function B(t,n,r,i){U(r,i)&&c(n,r,e(i))}function z(t,e,n,r){function i(e,n){if(e)r(e);else{var i=new ze(n,t.name);r(null,i)}}U(n,r)&&p(e,n,i)}function j(t,e,n,r){function i(e,n){if(e)r(e);else{var i=new ze(n,t.name);r(null,i)}}var o=t.openFiles[n];o?d(e,o,i):r(new Ce.EBADF)}function P(t,n,r,i,o){U(r,o)&&U(i,o)&&y(n,r,i,e(o))}function V(t,n,r,i){U(r,i)&&v(n,r,e(i))}function q(t,n,r,i,o,s,a,c){function u(t,e){c(t,e||0,i)}o=void 0===o?0:o,s=void 0===s?i.length-o:s,c=arguments[arguments.length-1];var f=t.openFiles[r];f?le(f.flags).contains(_e)?h(n,f,i,o,s,a,e(u)):c(new Ce.EBADF("descriptor does not permit reading")):c(new Ce.EBADF)}function H(t,e,n,r,i){if(i=arguments[arguments.length-1],r=R(r,null,"r"),U(n,i)){var o=N(r.flag||"r");o||i(new Ce.EINVAL("flags is not valid")),u(e,n,o,function(s,a){if(s)return i(s);var c=new Fe(n,a.id,o,0),u=t.allocDescriptor(c);d(e,c,function(n,o){if(n)return i(n);var s=new ze(o,t.name),a=s.size,f=new Uint8Array(a);h(e,c,f,0,a,0,function(e){if(e)return i(e);t.releaseDescriptor(u);var n;n="utf8"===r.encoding?new TextDecoder("utf-8").decode(f):f,i(null,n)})})})}}function W(t,n,r,i,o,s,a,c){c=arguments[arguments.length-1],o=void 0===o?0:o,s=void 0===s?i.length-o:s;var u=t.openFiles[r];u?le(u.flags).contains(xe)?s>i.length-o?c(new Ce.EIO("intput buffer is too small")):l(n,u,i,o,s,a,e(c)):c(new Ce.EBADF("descriptor does not permit writing")):c(new Ce.EBADF)}function Y(t,e,n,r,i,o){if(o=arguments[arguments.length-1],i=R(i,"utf8","w"),U(n,o)){var s=N(i.flag||"w");s||o(new Ce.EINVAL("flags is not valid")),r=r||"","number"==typeof r&&(r=""+r),"string"==typeof r&&"utf8"===i.encoding&&(r=new TextEncoder("utf-8").encode(r)),u(e,n,s,function(i,a){if(i)return o(i);var c=new Fe(n,a.id,s,0),u=t.allocDescriptor(c);f(e,c,r,0,r.length,function(e){return e?o(e):(t.releaseDescriptor(u),o(null),void 0)})})}}function X(t,e,n,r,i,o){if(o=arguments[arguments.length-1],i=R(i,"utf8","a"),U(n,o)){var s=N(i.flag||"a");s||o(new Ce.EINVAL("flags is not valid")),r=r||"","number"==typeof r&&(r=""+r),"string"==typeof r&&"utf8"===i.encoding&&(r=new TextEncoder("utf-8").encode(r)),u(e,n,s,function(i,a){if(i)return o(i);var c=new Fe(n,a.id,s,a.size),u=t.allocDescriptor(c);l(e,c,r,0,r.length,c.position,function(e){return e?o(e):(t.releaseDescriptor(u),o(null),void 0)})})}}function Z(t,e,n,r){function i(t){r(t?!1:!0)}z(t,e,n,i)}function K(t,n,r,i,o){U(r,o)&&O(n,r,i,e(o))}function J(t,n,r,i,o){var s=t.openFiles[r];s?I(n,s,i,e(o)):o(new Ce.EBADF)}function G(t,n,r,i,o,s,a){"function"==typeof s&&(a=s,s=null),U(r,a)&&x(n,r,i,o,s,e(a))}function Q(t,n,r,i,o,s,a){"function"==typeof s&&(a=s,s=null);var c=t.openFiles[r];c?le(c.flags).contains(xe)?S(n,c,i,o,s,e(a)):a(new Ce.EBADF("descriptor does not permit writing")):a(new Ce.EBADF)}function $(t,n,r,i,o){U(r,o)&&T(n,r,i,e(o))}function te(t,n,r,i,o){var s=t.openFiles[r];s?le(s.flags).contains(xe)?D(n,s,i,e(o)):o(new Ce.EBADF("descriptor does not permit writing")):o(new Ce.EBADF)}function ee(t,e,n,r,i,o){function s(t,e){t?o(t):0>e.size+r?o(new Ce.EINVAL("resulting file offset would be negative")):(a.position=e.size+r,o(null,a.position))}var a=t.openFiles[n];a||o(new Ce.EBADF),"SET"===i?0>r?o(new Ce.EINVAL("resulting file offset would be negative")):(a.position=r,o(null,a.position)):"CUR"===i?0>a.position+r?o(new Ce.EINVAL("resulting file offset would be negative")):(a.position+=r,o(null,a.position)):"END"===i?d(e,a,s):o(new Ce.EINVAL("whence argument is not a proper value"))}function ne(t,n,r,i){U(r,i)&&m(n,r,e(i))}function re(t,n,r,i,o,s){if(U(r,s)){var a=Date.now();i=i?i:a,o=o?o:a,k(n,r,i,o,e(s))}}function ie(t,n,r,i,o,s){var a=Date.now();i=i?i:a,o=o?o:a;var c=t.openFiles[r];c?le(c.flags).contains(xe)?_(n,c,i,o,e(s)):s(new Ce.EBADF("descriptor does not permit writing")):s(new Ce.EBADF)}function oe(t,n,r,i,o){function s(t){t?o(t):v(n,r,e(o))}U(r,o)&&U(i,o)&&y(n,r,i,s)}function se(t,n,r,i,o,s){s=arguments[arguments.length-1],U(r,s)&&U(i,s)&&b(n,r,i,e(s))}function ae(t,n,r,i){U(r,i)&&w(n,r,e(i))}function ce(t,e,n,r){function i(e,n){if(e)r(e);else{var i=new ze(n,t.name);r(null,i)}}U(n,r)&&g(e,n,i)}function ue(t,n,r,i,o){o=arguments[arguments.length-1],i=i||0,U(r,o)&&E(n,r,i,e(o))}function fe(t,n,r,i,o){o=arguments[arguments.length-1],i=i||0;var s=t.openFiles[r];s?le(s.flags).contains(xe)?A(n,s,i,e(o)):o(new Ce.EBADF("descriptor does not permit writing")):o(new Ce.EBADF)}t("encoding");var le=t("nodash"),he=t("src/path").normalize,pe=t("src/path").dirname,de=t("src/path").basename,ge=t("src/path").isAbsolute,ye=t("src/path").isNull,ve=t("src/constants").MODE_FILE,me=t("src/constants").MODE_DIRECTORY,be=t("src/constants").MODE_SYMBOLIC_LINK,we=t("src/constants").MODE_META,Ee=t("src/constants").ROOT_DIRECTORY_NAME,Ae=t("src/constants").SUPER_NODE_ID,ke=t("src/constants").SYMLOOP_MAX,_e=t("src/constants").O_READ,xe=t("src/constants").O_WRITE,Se=t("src/constants").O_CREATE,Oe=t("src/constants").O_EXCLUSIVE;t("src/constants").O_TRUNCATE;var Ie=t("src/constants").O_APPEND,Te=t("src/constants").O_FLAGS,De=t("src/constants").XATTR_CREATE,Ne=t("src/constants").XATTR_REPLACE,Re=t("src/constants").FS_NOMTIME,Ue=t("src/constants").FS_NOCTIME,Ce=t("src/errors"),Me=t("src/directory-entry"),Fe=t("src/open-file-description"),Le=t("src/super-node"),Be=t("src/node"),ze=t("src/stats");return{makeRootDirectory:s,open:C,close:M,mknod:F,mkdir:L,rmdir:B,unlink:V,stat:z,fstat:j,link:P,read:q,readFile:H,write:W,writeFile:Y,appendFile:X,exists:Z,getxattr:K,fgetxattr:J,setxattr:G,fsetxattr:Q,removexattr:$,fremovexattr:te,lseek:ee,readdir:ne,utimes:re,futimes:ie,rename:oe,symlink:se,readlink:ae,lstat:ce,truncate:ue,ftruncate:fe}}),n("src/filesystem/interface",["require","nodash","src/path","src/shared","src/constants","src/constants","src/constants","src/constants","src/constants","src/providers/providers","src/adapters/adapters","src/shell/shell","intercom","src/fs-watcher","src/errors","src/constants","src/constants","src/constants","src/constants","src/filesystem/implementation"],function(t){function e(t){return"function"==typeof t?t:function(t){if(t)throw t}}function n(t,e){function n(){I.forEach(function(t){t.call(this)}.bind(x)),I=null}function h(t){if(t.length){var e=d.getInstance();t.forEach(function(t){e.emit(t.event,t.path)})}}t=t||{},e=e||o;var p=t.flags,A=t.provider||new l.Default(t.name||s),k=t.name||A.name,_=r(p).contains(a),x=this;x.readyState=u,x.name=k,x.error=null,x.stdin=v,x.stdout=m,x.stderr=b,x.firstFD=w;var S={},O=3;Object.defineProperty(this,"openFiles",{get:function(){return S}}),this.allocDescriptor=function(t){var e=O++;return S[e]=t,e},this.releaseDescriptor=function(t){delete S[t]};var I=[];this.queueOrRun=function(t){var e;return c==x.readyState?t.call(x):f==x.readyState?e=new y.EFILESYSTEMERROR("unknown error"):I.push(t),e},this.watch=function(t,e,n){if(i(t))throw Error("Path must be a string without null bytes.");"function"==typeof e&&(n=e,e={}),e=e||{},n=n||o;var r=new g;return r.start(t,!1,e.recursive),r.on("change",n),r},A.open(function(t,r){function i(t){function r(t){var e=A[t]();return e.flags=p,e.changes=[],e.close=function(){var t=e.changes;h(t),t.length=0},e}x.provider={openReadWriteContext:function(){return r("getReadWriteContext")},openReadOnlyContext:function(){return r("getReadOnlyContext")}},t?x.readyState=f:(x.readyState=c,n()),e(t,x)}if(t)return i(t);if(!_&&!r)return i(null);var o=A.getReadWriteContext();o.clear(function(t){return t?(i(t),void 0):(E.makeRootDirectory(o,i),void 0)})})}var r=t("nodash"),i=t("src/path").isNull,o=t("src/shared").nop,s=t("src/constants").FILE_SYSTEM_NAME,a=t("src/constants").FS_FORMAT,c=t("src/constants").FS_READY,u=t("src/constants").FS_PENDING,f=t("src/constants").FS_ERROR,l=t("src/providers/providers"),h=t("src/adapters/adapters"),p=t("src/shell/shell"),d=t("intercom"),g=t("src/fs-watcher"),y=t("src/errors"),v=t("src/constants").STDIN,m=t("src/constants").STDOUT,b=t("src/constants").STDERR,w=t("src/constants").FIRST_DESCRIPTOR,E=t("src/filesystem/implementation");return n.providers=l,n.adapters=h,["open","close","mknod","mkdir","rmdir","stat","fstat","link","unlink","read","readFile","write","writeFile","appendFile","exists","lseek","readdir","rename","readlink","symlink","lstat","truncate","ftruncate","utimes","futimes","setxattr","getxattr","fsetxattr","fgetxattr","removexattr","fremovexattr"].forEach(function(t){n.prototype[t]=function(){var n=this,r=Array.prototype.slice.call(arguments,0),i=r.length-1,o="function"!=typeof r[i],s=e(r[i]),a=n.queueOrRun(function(){function e(){a.close(),s.apply(n,arguments)}var a=n.provider.openReadWriteContext();o?r.push(e):r[i]=e;var c=[n,a].concat(r);E[t].apply(null,c)});a&&s(a)}}),n.prototype.Shell=function(t){return new p(this,t)},n}),n("src/index",["require","src/filesystem/interface","src/path","src/errors"],function(t){return{FileSystem:t("src/filesystem/interface"),Path:t("src/path"),Errors:t("src/errors")}});var i=e("src/index");return i});