UNPKG

@mhg/blog

Version:
3 lines (2 loc) 36.1 kB
"use strict";function _regeneratorRuntime(){_regeneratorRuntime=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",f=a.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=t&&t.prototype instanceof g?t:g,o=Object.create(a.prototype),s=new O(n||[]);return i(o,"_invoke",{value:B(e,r,s)}),o}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var h="suspendedStart",d="suspendedYield",p="executing",m="completed",b={};function g(){}function w(){}function v(){}var y={};u(y,o,(function(){return this}));var _=Object.getPrototypeOf,k=_&&_(_(A([])));k&&k!==r&&n.call(k,o)&&(y=k);var x=v.prototype=g.prototype=Object.create(y);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(i,a,o,s){var f=l(e[i],e,a);if("throw"!==f.type){var u=f.arg,c=u.value;return c&&"object"==_typeof(c)&&n.call(c,"__await")?t.resolve(c.__await).then((function(e){r("next",e,o,s)}),(function(e){r("throw",e,o,s)})):t.resolve(c).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,s)}))}s(f.arg)}var a;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return a=a?a.then(i,i):i()}})}function B(t,r,n){var i=h;return function(a,o){if(i===p)throw new Error("Generator is already running");if(i===m){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var f=U(s,n);if(f){if(f===b)continue;return f}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw (i=m, n.arg);n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=p;var u=l(t,r,n);if("normal"===u.type){if(i=n.done?m:d,u.arg===b)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=m,n.method="throw",n.arg=u.arg)}};}function U(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,U(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var a=l(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,b;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function F(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function z(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(F,this),this.reset(!0)}function A(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(_typeof(t)+" is not iterable")}return w.prototype=v,i(x,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:w,configurable:!0}),w.displayName=u(v,f,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,u(e,f,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},S(E.prototype),u(E.prototype,s,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new E(c(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},S(x),u(x,f,"Generator"),u(x,o,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function i(){for(;r.length;){var e=r.pop();if(e in t)return i.value=e,i.done=!1,i}return i.done=!0,i}},t.values=A,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(z),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return s.type="throw",s.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var f=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(f&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(f){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,b):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),z(r),b}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;z(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:A(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function asyncGeneratorStep(e,t,r,n,i,a,o){try{var s=e[a](o),f=s.value}catch(u){return void r(u)}s.done?t(f):Promise.resolve(f).then(n,i)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){asyncGeneratorStep(a,n,i,o,s,"next",e)}function s(e){asyncGeneratorStep(a,n,i,o,s,"throw",e)}o(undefined)}))}}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function FetchUntgz(e){return _FetchUntgz.apply(this,arguments)}function _FetchUntgz(){return(_FetchUntgz=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",fetch(t).then(progress).then((function(e){return e.blob()})).then(untgz));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function progress(e){return _progress.apply(this,arguments)}function _progress(){return(_progress=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=Response,e.next=3,t.arrayBuffer();case 3:return e.t1=e.sent,e.t2={status:t.status,headers:t.headers},e.abrupt("return",new e.t0(e.t1,e.t2));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function untgz(e){return _untgz.apply(this,arguments)}function _untgz(){return _untgz=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function r(e,n){return _regeneratorRuntime().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.t0=pako,r.next=4,t.arrayBuffer();case 4:r.t1=r.sent,untar(r.t0.inflate.call(r.t0,r.t1).buffer).then(function(){var t=_asyncToGenerator(_regeneratorRuntime().mark((function r(t){return _regeneratorRuntime().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:e(t);case 1:case"end":return r.stop()}}),r)})));return function(e){return t.apply(this,arguments)}}()),r.next=12;break;case 9:r.prev=9,r.t2=r["catch"](0),n(r.t2);case 12:case"end":return r.stop()}}),r,null,[[0,9]])})));return function(t,r){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),_untgz.apply(this,arguments)}function untar(e){return new Promise((function(t,r){var n=[];try{for(var i=new UntarFileStream(e);i.hasNext();){var a=i.next();a=decorateExtractedFile(a),n.push(a)}t(n)}catch(o){r(o)}}))}!function(e){"object"==("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=e()}((function(){return function e(t,r,n){function i(o,s){if(!r[o]){if(!t[o]){var f="function"==typeof require&&require;if(!s&&f)return f(o,!0);if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw (u.code="MODULE_NOT_FOUND", u)}var c=r[o]={exports:{}};t[o][0].call(c.exports,(function(e){return i(t[o][1][e]||e)}),c,c.exports,e,t,r,n)}return r[o].exports}for(var a="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(e,t,r){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(e){for(var t,r,n=Array.prototype.slice.call(arguments,1);n.length;){var i=n.shift();if(i){if("object"!=_typeof(i))throw new TypeError(i+"must be non-object");for(var a in i)t=i,r=a,Object.prototype.hasOwnProperty.call(t,r)&&(e[a]=i[a])}}return e},r.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var a=0;a<n;a++)e[i+a]=t[r+a]},flattenChunks:function(e){var t,r,n,i,a,o;for(t=n=0,r=e.length;t<r;t++)n+=e[t].length;for(o=new Uint8Array(n),t=i=0,r=e.length;t<r;t++)a=e[t],o.set(a,i),i+=a.length;return o}},a={arraySet:function(e,t,r,n,i){for(var a=0;a<n;a++)e[i+a]=t[r+a]},flattenChunks:function(e){return[].concat.apply([],e)}};r.setTyped=function(e){e?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,i)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,a))},r.setTyped(n)},{}],2:[function(e,t,r){var n=e("./common"),i=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){a=!1}for(var o=new n.Buf8(256),s=0;s<256;s++)o[s]=252<=s?6:248<=s?5:240<=s?4:224<=s?3:192<=s?2:1;function f(e,t){if(t<65534&&(e.subarray&&a||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",o=0;o<t;o++)r+=String.fromCharCode(e[o]);return r}o[254]=o[254]=1,r.string2buf=function(e){var t,r,i,a,o,s=e.length,f=0;for(a=0;a<s;a++)55296==(64512&(r=e.charCodeAt(a)))&&a+1<s&&56320==(64512&(i=e.charCodeAt(a+1)))&&(r=65536+(r-55296<<10)+(i-56320),a++),f+=r<128?1:r<2048?2:r<65536?3:4;for(t=new n.Buf8(f),a=o=0;o<f;a++)55296==(64512&(r=e.charCodeAt(a)))&&a+1<s&&56320==(64512&(i=e.charCodeAt(a+1)))&&(r=65536+(r-55296<<10)+(i-56320),a++),r<128?t[o++]=r:(r<2048?t[o++]=192|r>>>6:(r<65536?t[o++]=224|r>>>12:(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63),t[o++]=128|r>>>6&63),t[o++]=128|63&r);return t},r.buf2binstring=function(e){return f(e,e.length)},r.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,i=t.length;r<i;r++)t[r]=e.charCodeAt(r);return t},r.buf2string=function(e,t){var r,n,i,a,s=t||e.length,u=new Array(2*s);for(r=n=0;r<s;)if((i=e[r++])<128)u[n++]=i;else if(4<(a=o[i]))u[n++]=65533,r+=a-1;else{for(i&=2===a?31:3===a?15:7;1<a&&r<s;)i=i<<6|63&e[r++],a--;1<a?u[n++]=65533:i<65536?u[n++]=i:(i-=65536,u[n++]=55296|i>>10&1023,u[n++]=56320|1023&i)}return f(u,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+o[e[r]]>t?r:t}},{"./common":1}],3:[function(e,t,r){t.exports=function(e,t,r,n){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;0!==r;){for(r-=o=2e3<r?2e3:r;a=a+(i=i+t[n++]|0)|0,--o;);i%=65521,a%=65521}return i|a<<16|0}},{}],4:[function(e,t,r){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,r){var n=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,i){var a=n,o=i+r;e^=-1;for(var s=i;s<o;s++)e=e>>>8^a[255&(e^t[s])];return-1^e}},{}],6:[function(e,t,r){t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],7:[function(e,t,r){t.exports=function(e,t){var r,n,i,a,o,s,f,u,c,l,h,d,p,m,b,g,w,v,y,_,k,x,S,E,B;r=e.state,n=e.next_in,E=e.input,i=n+(e.avail_in-5),a=e.next_out,B=e.output,o=a-(t-e.avail_out),s=a+(e.avail_out-257),f=r.dmax,u=r.wsize,c=r.whave,l=r.wnext,h=r.window,d=r.hold,p=r.bits,m=r.lencode,b=r.distcode,g=(1<<r.lenbits)-1,w=(1<<r.distbits)-1;e:do{p<15&&(d+=E[n++]<<p,p+=8,d+=E[n++]<<p,p+=8),v=m[d&g];t:for(;;){if(d>>>=y=v>>>24,p-=y,0==(y=v>>>16&255))B[a++]=65535&v;else{if(!(16&y)){if(0==(64&y)){v=m[(65535&v)+(d&(1<<y)-1)];continue t}if(32&y){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}_=65535&v,(y&=15)&&(p<y&&(d+=E[n++]<<p,p+=8),_+=d&(1<<y)-1,d>>>=y,p-=y),p<15&&(d+=E[n++]<<p,p+=8,d+=E[n++]<<p,p+=8),v=b[d&w];r:for(;;){if(d>>>=y=v>>>24,p-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=b[(65535&v)+(d&(1<<y)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(k=65535&v,p<(y&=15)&&(d+=E[n++]<<p,(p+=8)<y&&(d+=E[n++]<<p,p+=8)),f<(k+=d&(1<<y)-1)){e.msg="invalid distance too far back",r.mode=30;break e}if(d>>>=y,p-=y,(y=a-o)<k){if(c<(y=k-y)&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(S=h,(x=0)===l){if(x+=u-y,y<_){for(_-=y;B[a++]=h[x++],--y;);x=a-k,S=B}}else if(l<y){if(x+=u+l-y,(y-=l)<_){for(_-=y;B[a++]=h[x++],--y;);if(x=0,l<_){for(_-=y=l;B[a++]=h[x++],--y;);x=a-k,S=B}}}else if(x+=l-y,y<_){for(_-=y;B[a++]=h[x++],--y;);x=a-k,S=B}for(;2<_;)B[a++]=S[x++],B[a++]=S[x++],B[a++]=S[x++],_-=3;_&&(B[a++]=S[x++],1<_&&(B[a++]=S[x++]))}else{for(x=a-k;B[a++]=B[x++],B[a++]=B[x++],B[a++]=B[x++],2<(_-=3););_&&(B[a++]=B[x++],1<_&&(B[a++]=B[x++]))}break}}break}}while(n<i&&a<s);n-=_=p>>3,d&=(1<<(p-=_<<3))-1,e.next_in=n,e.next_out=a,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=a<s?s-a+257:257-(a-s),r.hold=d,r.bits=p}},{}],8:[function(e,t,r){var n=e("../utils/common"),i=e("./adler32"),a=e("./crc32"),o=e("./inffast"),s=e("./inftrees"),f=0,u=-2,c=1,l=852,h=592;function d(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function p(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function m(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=c,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(l),t.distcode=t.distdyn=new n.Buf32(h),t.sane=1,t.back=-1,f):u}function b(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,m(e)):u}function g(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?u:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,b(e))):u}function w(e,t){var r,n;return e?(n=new p,(e.state=n).window=null,(r=g(e,t))!==f&&(e.state=null),r):u}var v,y,_=!0;function k(e){if(_){var t;for(v=new n.Buf32(512),y=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,v,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,y,0,e.work,{bits:5}),_=!1}e.lencode=v,e.lenbits=9,e.distcode=y,e.distbits=5}function x(e,t,r,i){var a,o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new n.Buf8(o.wsize)),i>=o.wsize?(n.arraySet(o.window,t,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i<(a=o.wsize-o.wnext)&&(a=i),n.arraySet(o.window,t,r-i,a,o.wnext),(i-=a)?(n.arraySet(o.window,t,r-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=a))),0}r.inflateReset=b,r.inflateReset2=g,r.inflateResetKeep=m,r.inflateInit=function(e){return w(e,15)},r.inflateInit2=w,r.inflate=function(e,t){var r,l,h,p,m,b,g,w,v,y,_,S,E,B,U,F,z,O,A,L,R,T,Z,N,C=0,I=new n.Buf8(4),P=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return u;12===(r=e.state).mode&&(r.mode=13),m=e.next_out,h=e.output,g=e.avail_out,p=e.next_in,l=e.input,b=e.avail_in,w=r.hold,v=r.bits,y=b,_=g,T=f;e:for(;;)switch(r.mode){case c:if(0===r.wrap){r.mode=13;break}for(;v<16;){if(0===b)break e;b--,w+=l[p++]<<v,v+=8}if(2&r.wrap&&35615===w){I[r.check=0]=255&w,I[1]=w>>>8&255,r.check=a(r.check,I,2,0),v=w=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&w)<<8)+(w>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&w)){e.msg="unknown compression method",r.mode=30;break}if(v-=4,R=8+(15&(w>>>=4)),0===r.wbits)r.wbits=R;else if(R>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<R,e.adler=r.check=1,r.mode=512&w?10:12,v=w=0;break;case 2:for(;v<16;){if(0===b)break e;b--,w+=l[p++]<<v,v+=8}if(r.flags=w,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=w>>8&1),512&r.flags&&(I[0]=255&w,I[1]=w>>>8&255,r.check=a(r.check,I,2,0)),v=w=0,r.mode=3;case 3:for(;v<32;){if(0===b)break e;b--,w+=l[p++]<<v,v+=8}r.head&&(r.head.time=w),512&r.flags&&(I[0]=255&w,I[1]=w>>>8&255,I[2]=w>>>16&255,I[3]=w>>>24&255,r.check=a(r.check,I,4,0)),v=w=0,r.mode=4;case 4:for(;v<16;){if(0===b)break e;b--,w+=l[p++]<<v,v+=8}r.head&&(r.head.xflags=255&w,r.head.os=w>>8),512&r.flags&&(I[0]=255&w,I[1]=w>>>8&255,r.check=a(r.check,I,2,0)),v=w=0,r.mode=5;case 5:if(1024&r.flags){for(;v<16;){if(0===b)break e;b--,w+=l[p++]<<v,v+=8}r.length=w,r.head&&(r.head.extra_len=w),512&r.flags&&(I[0]=255&w,I[1]=w>>>8&255,r.check=a(r.check,I,2,0)),v=w=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(b<(S=r.length)&&(S=b),S&&(r.head&&(R=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,l,p,S,R)),512&r.flags&&(r.check=a(r.check,l,S,p)),b-=S,p+=S,r.length-=S),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===b)break e;for(S=0;R=l[p+S++],r.head&&R&&r.length<65536&&(r.head.name+=String.fromCharCode(R)),R&&S<b;);if(512&r.flags&&(r.check=a(r.check,l,S,p)),b-=S,p+=S,R)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===b)break e;for(S=0;R=l[p+S++],r.head&&R&&r.length<65536&&(r.head.comment+=String.fromCharCode(R)),R&&S<b;);if(512&r.flags&&(r.check=a(r.check,l,S,p)),b-=S,p+=S,R)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;v<16;){if(0===b)break e;b--,w+=l[p++]<<v,v+=8}if(w!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}v=w=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;v<32;){if(0===b)break e;b--,w+=l[p++]<<v,v+=8}e.adler=r.check=d(w),v=w=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=m,e.avail_out=g,e.next_in=p,e.avail_in=b,r.hold=w,r.bits=v,2;e.adler=r.check=1,r.mode=12;case 12:if(5===t||6===t)break e;case 13:if(r.last){w>>>=7&v,v-=7&v,r.mode=27;break}for(;v<3;){if(0===b)break e;b--,w+=l[p++]<<v,v+=8}switch(r.last=1&w,v-=1,3&(w>>>=1)){case 0:r.mode=14;break;case 1:if(k(r),r.mode=20,6!==t)break;w>>>=2,v-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}w>>>=2,v-=2;break;case 14:for(w>>>=7&v,v-=7&v;v<32;){if(0===b)break e;b--,w+=l[p++]<<v,v+=8}if((65535&w)!=(w>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&w,v=w=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(S=r.length){if(b<S&&(S=b),g<S&&(S=g),0===S)break e;n.arraySet(h,l,p,S,m),b-=S,p+=S,g-=S,m+=S,r.length-=S;break}r.mode=12;break;case 17:for(;v<14;){if(0===b)break e;b--,w+=l[p++]<<v,v+=8}if(r.nlen=257+(31&w),w>>>=5,v-=5,r.ndist=1+(31&w),w>>>=5,v-=5,r.ncode=4+(15&w),w>>>=4,v-=4,286<r.nlen||30<r.ndist){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;v<3;){if(0===b)break e;b--,w+=l[p++]<<v,v+=8}r.lens[P[r.have++]]=7&w,w>>>=3,v-=3}for(;r.have<19;)r.lens[P[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,Z={bits:r.lenbits},T=s(0,r.lens,0,19,r.lencode,0,r.work,Z),r.lenbits=Z.bits,T){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;F=(C=r.lencode[w&(1<<r.lenbits)-1])>>>16&255,z=65535&C,!((U=C>>>24)<=v);){if(0===b)break e;b--,w+=l[p++]<<v,v+=8}if(z<16)w>>>=U,v-=U,r.lens[r.have++]=z;else{if(16===z){for(N=U+2;v<N;){if(0===b)break e;b--,w+=l[p++]<<v,v+=8}if(w>>>=U,v-=U,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}R=r.lens[r.have-1],S=3+(3&w),w>>>=2,v-=2}else if(17===z){for(N=U+3;v<N;){if(0===b)break e;b--,w+=l[p++]<<v,v+=8}v-=U,R=0,S=3+(7&(w>>>=U)),w>>>=3,v-=3}else{for(N=U+7;v<N;){if(0===b)break e;b--,w+=l[p++]<<v,v+=8}v-=U,R=0,S=11+(127&(w>>>=U)),w>>>=7,v-=7}if(r.have+S>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;S--;)r.lens[r.have++]=R}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,Z={bits:r.lenbits},T=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,Z),r.lenbits=Z.bits,T){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,Z={bits:r.distbits},T=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,Z),r.distbits=Z.bits,T){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=b&&258<=g){e.next_out=m,e.avail_out=g,e.next_in=p,e.avail_in=b,r.hold=w,r.bits=v,o(e,_),m=e.next_out,h=e.output,g=e.avail_out,p=e.next_in,l=e.input,b=e.avail_in,w=r.hold,v=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;F=(C=r.lencode[w&(1<<r.lenbits)-1])>>>16&255,z=65535&C,!((U=C>>>24)<=v);){if(0===b)break e;b--,w+=l[p++]<<v,v+=8}if(F&&0==(240&F)){for(O=U,A=F,L=z;F=(C=r.lencode[L+((w&(1<<O+A)-1)>>O)])>>>16&255,z=65535&C,!(O+(U=C>>>24)<=v);){if(0===b)break e;b--,w+=l[p++]<<v,v+=8}w>>>=O,v-=O,r.back+=O}if(w>>>=U,v-=U,r.back+=U,r.length=z,0===F){r.mode=26;break}if(32&F){r.back=-1,r.mode=12;break}if(64&F){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&F,r.mode=22;case 22:if(r.extra){for(N=r.extra;v<N;){if(0===b)break e;b--,w+=l[p++]<<v,v+=8}r.length+=w&(1<<r.extra)-1,w>>>=r.extra,v-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;F=(C=r.distcode[w&(1<<r.distbits)-1])>>>16&255,z=65535&C,!((U=C>>>24)<=v);){if(0===b)break e;b--,w+=l[p++]<<v,v+=8}if(0==(240&F)){for(O=U,A=F,L=z;F=(C=r.distcode[L+((w&(1<<O+A)-1)>>O)])>>>16&255,z=65535&C,!(O+(U=C>>>24)<=v);){if(0===b)break e;b--,w+=l[p++]<<v,v+=8}w>>>=O,v-=O,r.back+=O}if(w>>>=U,v-=U,r.back+=U,64&F){e.msg="invalid distance code",r.mode=30;break}r.offset=z,r.extra=15&F,r.mode=24;case 24:if(r.extra){for(N=r.extra;v<N;){if(0===b)break e;b--,w+=l[p++]<<v,v+=8}r.offset+=w&(1<<r.extra)-1,w>>>=r.extra,v-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===g)break e;if(S=_-g,r.offset>S){if((S=r.offset-S)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}S>r.wnext?(S-=r.wnext,E=r.wsize-S):E=r.wnext-S,S>r.length&&(S=r.length),B=r.window}else B=h,E=m-r.offset,S=r.length;for(g<S&&(S=g),g-=S,r.length-=S;h[m++]=B[E++],--S;);0===r.length&&(r.mode=21);break;case 26:if(0===g)break e;h[m++]=r.length,g--,r.mode=21;break;case 27:if(r.wrap){for(;v<32;){if(0===b)break e;b--,w|=l[p++]<<v,v+=8}if(_-=g,e.total_out+=_,r.total+=_,_&&(e.adler=r.check=r.flags?a(r.check,h,_,m-_):i(r.check,h,_,m-_)),_=g,(r.flags?w:d(w))!==r.check){e.msg="incorrect data check",r.mode=30;break}v=w=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;v<32;){if(0===b)break e;b--,w+=l[p++]<<v,v+=8}if(w!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=30;break}v=w=0}r.mode=29;case 29:T=1;break e;case 30:T=-3;break e;case 31:return-4;default:return u}return e.next_out=m,e.avail_out=g,e.next_in=p,e.avail_in=b,r.hold=w,r.bits=v,(r.wsize||_!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&x(e,e.output,e.next_out,_-e.avail_out)?(r.mode=31,-4):(y-=e.avail_in,_-=e.avail_out,e.total_in+=y,e.total_out+=_,r.total+=_,r.wrap&&_&&(e.adler=r.check=r.flags?a(r.check,h,_,e.next_out-_):i(r.check,h,_,e.next_out-_)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0===y&&0===_||4===t)&&T===f&&(T=-5),T)},r.inflateEnd=function(e){if(!e||!e.state)return u;var t=e.state;return t.window&&(t.window=null),e.state=null,f},r.inflateGetHeader=function(e,t){var r;return e&&e.state?0==(2&(r=e.state).wrap)?u:((r.head=t).done=!1,f):u},r.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?u:11===r.mode&&i(1,t,n,0)!==r.check?-3:x(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,f):u},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(e,t,r){var n=e("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],o=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,r,f,u,c,l,h){var d,p,m,b,g,w,v,y,_,k=h.bits,x=0,S=0,E=0,B=0,U=0,F=0,z=0,O=0,A=0,L=0,R=null,T=0,Z=new n.Buf16(16),N=new n.Buf16(16),C=null,I=0;for(x=0;x<=15;x++)Z[x]=0;for(S=0;S<f;S++)Z[t[r+S]]++;for(U=k,B=15;1<=B&&0===Z[B];B--);if(B<U&&(U=B),0===B)return u[c++]=20971520,u[c++]=20971520,h.bits=1,0;for(E=1;E<B&&0===Z[E];E++);for(U<E&&(U=E),x=O=1;x<=15;x++)if(O<<=1,(O-=Z[x])<0)return-1;if(0<O&&(0===e||1!==B))return-1;for(N[1]=0,x=1;x<15;x++)N[x+1]=N[x]+Z[x];for(S=0;S<f;S++)0!==t[r+S]&&(l[N[t[r+S]]++]=S);if(0===e?(R=C=l,w=19):1===e?(R=i,T-=257,C=a,I-=257,w=256):(R=o,C=s,w=-1),x=E,g=c,z=S=L=0,m=-1,b=(A=1<<(F=U))-1,1===e&&852<A||2===e&&592<A)return 1;for(;;){for(v=x-z,l[S]<w?(y=0,_=l[S]):l[S]>w?(y=C[I+l[S]],_=R[T+l[S]]):(y=96,_=0),d=1<<x-z,E=p=1<<F;u[g+(L>>z)+(p-=d)]=v<<24|y<<16|_|0,0!==p;);for(d=1<<x-1;L&d;)d>>=1;if(0!==d?(L&=d-1,L+=d):L=0,S++,0==--Z[x]){if(x===B)break;x=t[r+l[S]]}if(U<x&&(L&b)!==m){for(0===z&&(z=U),g+=E,O=1<<(F=x-z);F+z<B&&!((O-=Z[F+z])<=0);)F++,O<<=1;if(A+=1<<F,1===e&&852<A||2===e&&592<A)return 1;u[m=L&b]=U<<24|F<<16|g-c|0}}return 0!==L&&(u[g+L]=x-z<<24|64<<16|0),h.bits=U,0}},{"../utils/common":1}],10:[function(e,t,r){t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(e,t,r){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/lib/inflate.js":[function(e,t,r){var n=e("./zlib/inflate"),i=e("./utils/common"),a=e("./utils/strings"),o=e("./zlib/constants"),s=e("./zlib/messages"),f=e("./zlib/zstream"),u=e("./zlib/gzheader"),c=Object.prototype.toString;function l(e){if(!(this instanceof l))return new l(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==o.Z_OK)throw new Error(s[r]);if(this.header=new u,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=a.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary))!==o.Z_OK))throw new Error(s[r])}function h(e,t){var r=new l(t);if(r.push(e,!0),r.err)throw r.msg||s[r.err];return r.result}l.prototype.push=function(e,t){var r,s,f,u,l,h=this.strm,d=this.options.chunkSize,p=this.options.dictionary,m=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?o.Z_FINISH:o.Z_NO_FLUSH,"string"==typeof e?h.input=a.binstring2buf(e):"[object ArrayBuffer]"===c.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new i.Buf8(d),h.next_out=0,h.avail_out=d),(r=n.inflate(h,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&p&&(r=n.inflateSetDictionary(this.strm,p)),r===o.Z_BUF_ERROR&&!0===m&&(r=o.Z_OK,m=!1),r!==o.Z_STREAM_END&&r!==o.Z_OK)return this.onEnd(r),!(this.ended=!0);h.next_out&&(0!==h.avail_out&&r!==o.Z_STREAM_END&&(0!==h.avail_in||s!==o.Z_FINISH&&s!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(f=a.utf8border(h.output,h.next_out),u=h.next_out-f,l=a.buf2string(h.output,f),h.next_out=u,h.avail_out=d-u,u&&i.arraySet(h.output,h.output,f,u,0),this.onData(l)):this.onData(i.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(m=!0)}while((0<h.avail_in||0===h.avail_out)&&r!==o.Z_STREAM_END);return r===o.Z_STREAM_END&&(s=o.Z_FINISH),s===o.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===o.Z_OK):s!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),!(h.avail_out=0))},l.prototype.onData=function(e){this.chunks.push(e)},l.prototype.onEnd=function(e){e===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Inflate=l,r.inflate=h,r.inflateRaw=function(e,t){return(t=t||{}).raw=!0,h(e,t)},r.ungzip=h},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js");}));var decoratedFileProps={blob:{get:function(){return this._blob||(this._blob=new Blob([this.buffer]))}},getBlobUrl:{value:function(){return this._blobUrl||(this._blobUrl=URL.createObjectURL(this.blob))}},readAsString:{value:function(){for(var e=this.buffer,t=e.byteLength,r=new DataView(e),n=[],i=0;i<t;++i){var a=r.getUint8(1*i,!0);n.push(a)}return this._string=String.fromCharCode.apply(null,n)}},readAsJSON:{value:function(){return JSON.parse(this.readAsString())}}};function decorateExtractedFile(e){return Object.defineProperties(e,decoratedFileProps),e}function decodeUTF8(e){for(var t="",r=0;r<e.length;){var n=e[r++];if(n>127){if(n>191&&n<224){if(r>=e.length)throw"UTF-8 decode: incomplete 2-byte sequence";n=(31&n)<<6|63&e[r]}else if(n>223&&n<240){if(r+1>=e.length)throw"UTF-8 decode: incomplete 3-byte sequence";n=(15&n)<<12|(63&e[r])<<6|63&e[++r]}else{if(!(n>239&&n<248))throw"UTF-8 decode: unknown multibyte start 0x"+n.toString(16)+" at index "+(r-1);if(r+2>=e.length)throw"UTF-8 decode: incomplete 4-byte sequence";n=(7&n)<<18|(63&e[r])<<12|(63&e[++r])<<6|63&e[++r]}++r}if(n<=65535)t+=String.fromCharCode(n);else{if(!(n<=1114111))throw"UTF-8 decode: code point 0x"+n.toString(16)+" exceeds UTF-16 reach";n-=65536,t+=String.fromCharCode(n>>10|55296),t+=String.fromCharCode(1023&n|56320)}}return t}function PaxHeader(e){this._fields=e}function TarFile(){}function UntarStream(e){this._bufferView=new DataView(e),this._position=0}function UntarFileStream(e){this._stream=new UntarStream(e),this._globalPaxHeader=null}PaxHeader.parse=function(e){for(var t=new Uint8Array(e),r=[];t.length>0;){var n=parseInt(decodeUTF8(t.subarray(0,t.indexOf(32)))),i=decodeUTF8(t.subarray(0,n)).match(/^\d+ ([^=]+)=(.*)\n$/);if(null===i)throw new Error("Invalid PAX header data format.");var a=i[1],o=i[2];0===o.length?o=null:null!==o.match(/^\d+$/)&&(o=parseInt(o));var s={name:a,value:o};r.push(s),t=t.subarray(n)}return new PaxHeader(r)},PaxHeader.prototype={applyHeader:function(e){this._fields.forEach((function(t){var r=t.name,n=t.value;"path"===r?(r="name",e.prefix!==undefined&&delete e.prefix):"linkpath"===r&&(r="linkname"),null===n?delete e[r]:e[r]=n}))}},UntarStream.prototype={readString:function(e){for(var t=1*e,r=[],n=0;n<e;++n){var i=this._bufferView.getUint8(this.position()+1*n,!0);if(0===i)break;r.push(i)}return this.seek(t),String.fromCharCode.apply(null,r)},readBuffer:function(e){var t;if("function"==typeof ArrayBuffer.prototype.slice)t=this._bufferView.buffer.slice(this.position(),this.position()+e);else{t=new ArrayBuffer(e);var r=new Uint8Array(t),n=new Uint8Array(this._bufferView.buffer,this.position(),e);r.set(n)}return this.seek(e),t},seek:function(e){this._position+=e},peekUint32:function(){return this._bufferView.getUint32(this.position(),!0)},position:function(e){if(e===undefined)return this._position;this._position=e},size:function(){return this._bufferView.byteLength}},UntarFileStream.prototype={hasNext:function(){return this._stream.position()+4<this._stream.size()&&0!==this._stream.peekUint32()},next:function(){return this._readNextFile()},_readNextFile:function(){var e=this._stream,t=new TarFile,r=!1,n=null,i=e.position()+512;switch(t.name=e.readString(100),t.mode=e.readString(8),t.uid=parseInt(e.readString(8)),t.gid=parseInt(e.readString(8)),t.size=parseInt(e.readString(12),8),t.mtime=parseInt(e.readString(12),8),t.checksum=parseInt(e.readString(8)),t.type=e.readString(1),t.linkname=e.readString(100),t.ustarFormat=e.readString(6),t.ustarFormat.indexOf("ustar")>-1&&(t.version=e.readString(2),t.uname=e.readString(32),t.gname=e.readString(32),t.devmajor=parseInt(e.readString(8)),t.devminor=parseInt(e.readString(8)),t.namePrefix=e.readString(155),t.namePrefix.length>0&&(t.name=t.namePrefix+"/"+t.name)),e.position(i),t.type){case"0":case"":t.buffer=e.readBuffer(t.size);break;case"g":r=!0,this._globalPaxHeader=PaxHeader.parse(e.readBuffer(t.size));break;case"x":r=!0,n=PaxHeader.parse(e.readBuffer(t.size))}t.buffer===undefined&&(t.buffer=new ArrayBuffer(0));var a=i+t.size;return t.size%512!=0&&(a+=512-t.size%512),e.position(a),r&&(t=this._readNextFile()),null!==this._globalPaxHeader&&this._globalPaxHeader.applyHeader(t),null!==n&&n.applyHeader(t),t}}; //# sourceMappingURL=maps/untgz.js.map