perf-cascade
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -1,3 +0,3 @@ | ||
/*! github.com/micmro/PerfCascade Version:1.2.1 (25/03/2017) */ | ||
/*! github.com/micmro/PerfCascade Version:1.2.2 (26/03/2017) */ | ||
!function(a){"use strict";function b(){this.crc=-1}function c(){}function d(a,b,c){if(b<0||c<0||b+c>a.size)throw new RangeError("offset:"+b+", length:"+c+", size:"+a.size);return a.slice?a.slice(b,b+c):a.webkitSlice?a.webkitSlice(b,b+c):a.mozSlice?a.mozSlice(b,b+c):a.msSlice?a.msSlice(b,b+c):void 0}function e(a,b){var c,d;return c=new ArrayBuffer(a),d=new Uint8Array(c),b&&d.set(b,0),{buffer:c,array:d,view:new DataView(c)}}function f(){}function g(a){function b(b,c){d=new i(new Blob([a],{type:P})),d.init(function(){e.size=d.size,b()},c)}function c(a,b,c,e){d.readUint8Array(a,b,c,e)}var d,e=this;e.size=0,e.init=b,e.readUint8Array=c}function h(b){function c(a){for(var c=b.length;"="==b.charAt(c-1);)c--;f=b.indexOf(",")+1,g.size=Math.floor(.75*(c-f)),a()}function d(c,d,g){var h,i=e(d),j=4*Math.floor(c/3),k=4*Math.ceil((c+d)/3),l=a.atob(b.substring(j+f,k+f)),m=c-3*Math.floor(j/4);for(h=m;h<m+d;h++)i.array[h-m]=l.charCodeAt(h);g(i.array)}var f,g=this;g.size=0,g.init=c,g.readUint8Array=d}function i(a){function b(b){e.size=a.size,b()}function c(b,c,e,f){var g=new FileReader;g.onload=function(a){e(new Uint8Array(a.target.result))},g.onerror=f;try{g.readAsArrayBuffer(d(a,b,c))}catch(a){f(a)}}var e=this;e.size=0,e.init=b,e.readUint8Array=c}function j(){}function k(a){function b(a){e=new Blob([],{type:P}),a()}function c(a,b){e=new Blob([e,E?a:a.buffer],{type:P}),b()}function d(b,c){var d=new FileReader;d.onload=function(a){b(a.target.result)},d.onerror=c,d.readAsText(e,a)}var e,f=this;f.init=b,f.writeUint8Array=c,f.getData=d}function l(b){function c(a){g+="data:"+(b||"")+";base64,",a()}function d(b,c){var d,e=h.length,f=h;for(h="",d=0;d<3*Math.floor((e+b.length)/3)-e;d++)f+=String.fromCharCode(b[d]);for(;d<b.length;d++)h+=String.fromCharCode(b[d]);f.length>2?g+=a.btoa(f):h=f,c()}function e(b){b(g+a.btoa(h))}var f=this,g="",h="";f.init=c,f.writeUint8Array=d,f.getData=e}function m(a){function b(b){e=new Blob([],{type:a}),b()}function c(b,c){e=new Blob([e,E?b:b.buffer],{type:a}),c()}function d(a){a(e)}var e,f=this;f.init=b,f.writeUint8Array=c,f.getData=d}function n(a,b,c,d,e,f,g,h,i,j){function k(){a.removeEventListener("message",l,!1),h(o,p)}function l(b){var c=b.data,e=c.data,h=c.error;if(h)return h.toString=function(){return"Error: "+this.message},void i(h);if(c.sn===r)switch("number"==typeof c.codecTime&&(a.codecTime+=c.codecTime),"number"==typeof c.crcTime&&(a.crcTime+=c.crcTime),c.type){case"append":e?(o+=e.length,d.writeUint8Array(e,function(){m()},j)):m();break;case"flush":p=c.crc,e?(o+=e.length,d.writeUint8Array(e,function(){k()},j)):k();break;case"progress":g&&g(n+c.loaded,f);break;case"importScripts":case"newTask":case"echo":break;default:console.warn("zip.js:launchWorkerProcess: unknown message: ",c)}}function m(){n=q*O,n<=f?c.readUint8Array(e+n,Math.min(O,f-n),function(c){g&&g(n,f);var d=0===n?b:{sn:r};d.type="append",d.data=c;try{a.postMessage(d,[c.buffer])}catch(b){a.postMessage(d)}q++},i):a.postMessage({sn:r,type:"flush"})}var n,o,p,q=0,r=b.sn;o=0,a.addEventListener("message",l,!1),m()}function o(a,c,d,e,f,g,h,i,j,k){function l(){var b;if((m=n*O)<f)c.readUint8Array(e+m,Math.min(O,f-m),function(b){var c;try{c=a.append(b,function(a){h&&h(m+a,f)})}catch(a){return void j(a)}c?(o+=c.length,d.writeUint8Array(c,function(){n++,setTimeout(l,1)},k),q&&r.append(c)):(n++,setTimeout(l,1)),p&&r.append(b),h&&h(m,f)},j);else{try{b=a.flush()}catch(a){return void j(a)}b?(q&&r.append(b),o+=b.length,d.writeUint8Array(b,function(){i(o,r.get())},k)):i(o,r.get())}}var m,n=0,o=0,p="input"===g,q="output"===g,r=new b;l()}function p(b,c,d,e,f,g,h,i,j,k,l){var m=h?"output":"none";if(a.zip.useWebWorkers){n(b,{sn:c,codecClass:"Inflater",crcType:m},d,e,f,g,j,i,k,l)}else o(new a.zip.Inflater,d,e,f,g,m,j,i,k,l)}function q(b,c,d,e,f,g,h,i,j){if(a.zip.useWebWorkers){n(b,{sn:c,options:{level:f},codecClass:"Deflater",crcType:"input"},d,e,0,d.size,h,g,i,j)}else o(new a.zip.Deflater,d,e,0,d.size,"input",h,g,i,j)}function r(b,d,e,f,g,h,i,j,k,l,m){if(a.zip.useWebWorkers&&i){n(b,{sn:d,codecClass:"NOOP",crcType:"input"},e,f,g,h,k,j,l,m)}else o(new c,e,f,g,h,"input",k,j,l,m)}function s(a){var b,c,d="",e=["Ç","ü","é","â","ä","à","å","ç","ê","ë","è","ï","î","ì","Ä","Å","É","æ","Æ","ô","ö","ò","û","ù","ÿ","Ö","Ü","ø","£","Ø","×","ƒ","á","í","ó","ú","ñ","Ñ","ª","º","¿","®","¬","½","¼","¡","«","»","_","_","_","¦","¦","Á","Â","À","©","¦","¦","+","+","¢","¥","+","+","-","-","+","-","+","ã","Ã","+","+","-","-","¦","-","+","¤","ð","Ð","Ê","Ë","È","i","Í","Î","Ï","+","+","_","_","¦","Ì","_","Ó","ß","Ô","Ò","õ","Õ","µ","þ","Þ","Ú","Û","Ù","ý","Ý","¯","´","","±","_","¾","¶","§","÷","¸","°","¨","·","¹","³","²","_"," "];for(b=0;b<a.length;b++)c=255&a.charCodeAt(b),d+=c>127?e[c-128]:String.fromCharCode(c);return d}function t(a){return decodeURIComponent(escape(a))}function u(a){var b,c="";for(b=0;b<a.length;b++)c+=String.fromCharCode(a[b]);return c}function v(a){var b=(4294901760&a)>>16,c=65535&a;try{return new Date(1980+((65024&b)>>9),((480&b)>>5)-1,31&b,(63488&c)>>11,(2016&c)>>5,2*(31&c),0)}catch(a){}}function w(a,b,c,d,e){return a.version=b.view.getUint16(c,!0),a.bitFlag=b.view.getUint16(c+2,!0),a.compressionMethod=b.view.getUint16(c+4,!0),a.lastModDateRaw=b.view.getUint32(c+6,!0),a.lastModDate=v(a.lastModDateRaw),1==(1&a.bitFlag)?void e(H):((d||8!=(8&a.bitFlag))&&(a.crc32=b.view.getUint32(c+10,!0),a.compressedSize=b.view.getUint32(c+14,!0),a.uncompressedSize=b.view.getUint32(c+18,!0)),4294967295===a.compressedSize||4294967295===a.uncompressedSize?void e(I):(a.filenameLength=b.view.getUint16(c+22,!0),void(a.extraFieldLength=b.view.getUint16(c+24,!0))))}function x(b,c,d){function f(){}function g(a){function c(c,f){b.readUint8Array(b.size-c,c,function(b){for(var c=b.length-e;c>=0;c--)if(80===b[c]&&75===b[c+1]&&5===b[c+2]&&6===b[c+3])return void a(new DataView(b.buffer,c,e));f()},function(){d(J)})}var e=22;if(b.size<e)return void d(F);var f=e+65536;c(e,function(){c(Math.min(f,b.size),function(){d(F)})})}var h=0;f.prototype.getData=function(a,c,f,g){function i(a){var b=e(4);return b.view.setUint32(0,a),m.crc32==b.view.getUint32(0)}function j(b,e){g&&!i(e)?d(G):a.getData(function(a){c(a)})}function k(a){d(a||M)}function l(a){d(a||L)}var m=this;b.readUint8Array(m.offset,30,function(c){var i,n=e(c.length,c);if(1347093252!=n.view.getUint32(0))return void d(F);w(m,n,4,!1,d),i=m.offset+30+m.filenameLength+m.extraFieldLength,a.init(function(){0===m.compressionMethod?r(m._worker,h++,b,a,i,m.compressedSize,g,j,f,k,l):p(m._worker,h++,b,a,i,m.compressedSize,g,j,f,k,l)},l)},k)};var i={getEntries:function(a){var c=this._worker;g(function(g){var h,i;if(h=g.getUint32(16,!0),i=g.getUint16(8,!0),h<0||h>=b.size)return void d(F);b.readUint8Array(h,b.size-h,function(b){var g,h,j,k,l=0,m=[],n=e(b.length,b);for(g=0;g<i;g++){if(h=new f,h._worker=c,1347092738!=n.view.getUint32(l))return void d(F);w(h,n,l+6,!0,d),h.commentLength=n.view.getUint16(l+32,!0),h.directory=16==(16&n.view.getUint8(l+38)),h.offset=n.view.getUint32(l+42,!0),j=u(n.array.subarray(l+46,l+46+h.filenameLength)),h.filename=2048==(2048&h.bitFlag)?t(j):s(j),h.directory||"/"!=h.filename.charAt(h.filename.length-1)||(h.directory=!0),k=u(n.array.subarray(l+46+h.filenameLength+h.extraFieldLength,l+46+h.filenameLength+h.extraFieldLength+h.commentLength)),h.comment=2048==(2048&h.bitFlag)?t(k):s(k),m.push(h),l+=46+h.filenameLength+h.extraFieldLength+h.commentLength}a(m)},function(){d(J)})})},close:function(a){this._worker&&(this._worker.terminate(),this._worker=null),a&&a()},_worker:null};a.zip.useWebWorkers?C("inflater",function(a){i._worker=a,c(i)},function(a){d(a)}):c(i)}function y(a){return unescape(encodeURIComponent(a))}function z(a){var b,c=[];for(b=0;b<a.length;b++)c.push(a.charCodeAt(b));return c}function A(b,c,d,f){function g(a){d(a||K)}function h(a){d(a||M)}var i={},j=[],k=0,l=0,m={add:function(a,c,m,n,o){function p(c){var d;w=o.lastModDate||new Date,u=e(26),i[a]={headerArray:u.array,directory:o.directory,filename:v,offset:k,comment:z(y(o.comment||""))},u.view.setUint32(0,335546376),o.version&&u.view.setUint8(0,o.version),f||0===o.level||o.directory||u.view.setUint16(4,2048),u.view.setUint16(6,(w.getHours()<<6|w.getMinutes())<<5|w.getSeconds()/2,!0),u.view.setUint16(8,(w.getFullYear()-1980<<4|w.getMonth()+1)<<5|w.getDate(),!0),u.view.setUint16(22,v.length,!0),d=e(30+v.length),d.view.setUint32(0,1347093252),d.array.set(u.array,4),d.array.set(v,30),k+=d.array.length,b.writeUint8Array(d.array,c,g)}function s(a,d){var f=e(16);k+=a||0,f.view.setUint32(0,1347094280),void 0!==d&&(u.view.setUint32(10,d,!0),f.view.setUint32(4,d,!0)),c&&(f.view.setUint32(8,a,!0),u.view.setUint32(14,a,!0),f.view.setUint32(12,c.size,!0),u.view.setUint32(18,c.size,!0)),b.writeUint8Array(f.array,function(){k+=16,m()},g)}function t(){if(o=o||{},a=a.trim(),o.directory&&"/"!=a.charAt(a.length-1)&&(a+="/"),i.hasOwnProperty(a))return void d(N);v=z(y(a)),j.push(a),p(function(){c?f||0===o.level?r(x,l++,c,b,0,c.size,!0,s,n,h,g):q(x,l++,c,b,o.level,s,n,h,g):s()},g)}var u,v,w,x=this._worker;c?c.init(t,h):t()},close:function(a){this._worker&&(this._worker.terminate(),this._worker=null);var c,d,f,h=0,l=0;for(d=0;d<j.length;d++)f=i[j[d]],h+=46+f.filename.length+f.comment.length;for(c=e(h+22),d=0;d<j.length;d++)f=i[j[d]],c.view.setUint32(l,1347092738),c.view.setUint16(l+4,5120),c.array.set(f.headerArray,l+6),c.view.setUint16(l+32,f.comment.length,!0),f.directory&&c.view.setUint8(l+38,16),c.view.setUint32(l+42,f.offset,!0),c.array.set(f.filename,l+46),c.array.set(f.comment,l+46+f.filename.length),l+=46+f.filename.length+f.comment.length;c.view.setUint32(l,1347093766),c.view.setUint16(l+8,j.length,!0),c.view.setUint16(l+10,j.length,!0),c.view.setUint32(l+12,h,!0),c.view.setUint32(l+16,k,!0),b.writeUint8Array(c.array,function(){b.getData(a)},g)},_worker:null};a.zip.useWebWorkers?C("deflater",function(a){m._worker=a,c(m)},function(a){d(a)}):c(m)}function B(a){var b=document.createElement("a");return a.map(function(a){return b.href=a,b.href})}function C(b,c,d){function e(a){var b=a.data;if(b.error)return h.terminate(),void d(b.error);"importScripts"===b.type&&(h.removeEventListener("message",e),h.removeEventListener("error",f),c(h))}function f(a){h.terminate(),d(a)}if(null!==a.zip.workerScripts&&null!==a.zip.workerScriptsPath)return void d(new Error("Either zip.workerScripts or zip.workerScriptsPath may be set, not both."));var g;if(a.zip.workerScripts){if(g=a.zip.workerScripts[b],!Array.isArray(g))return void d(new Error("zip.workerScripts."+b+" is not an array!"));g=B(g)}else g=Q[b].slice(0),g[0]=(a.zip.workerScriptsPath||"")+g[0];var h=new Worker(g[0]);h.codecTime=h.crcTime=0,h.postMessage({type:"importScripts",scripts:g.slice(1)}),h.addEventListener("message",e),h.addEventListener("error",f)}function D(a){console.error(a)}var E,F="File format is not recognized.",G="CRC failed.",H="File contains encrypted entry.",I="File is using Zip64 (4gb+ file size).",J="Error while reading zip file.",K="Error while writing zip file.",L="Error while writing file data.",M="Error while reading file data.",N="File already exists.",O=524288,P="text/plain";try{E=0===new Blob([new DataView(new ArrayBuffer(0))]).size}catch(a){}b.prototype.append=function(a){for(var b=0|this.crc,c=this.table,d=0,e=0|a.length;d<e;d++)b=b>>>8^c[255&(b^a[d])];this.crc=b},b.prototype.get=function(){return~this.crc},b.prototype.table=function(){var a,b,c,d=[];for(a=0;a<256;a++){for(c=a,b=0;b<8;b++)1&c?c=c>>>1^3988292384:c>>>=1;d[a]=c}return d}(),c.prototype.append=function(a,b){return a},c.prototype.flush=function(){},g.prototype=new f,g.prototype.constructor=g,h.prototype=new f,h.prototype.constructor=h,i.prototype=new f,i.prototype.constructor=i,j.prototype.getData=function(a){a(this.data)},k.prototype=new j,k.prototype.constructor=k,l.prototype=new j,l.prototype.constructor=l,m.prototype=new j,m.prototype.constructor=m;var Q={deflater:["z-worker.js","deflate.js"],inflater:["z-worker.js","inflate.js"]};a.zip={Reader:f,Writer:j,BlobReader:i,Data64URIReader:h,TextReader:g,BlobWriter:m,Data64URIWriter:l,TextWriter:k,createReader:function(a,b,c){c=c||D,a.init(function(){x(a,b,c)},c)},createWriter:function(a,b,c,d){c=c||D,d=!!d,a.init(function(){A(a,b,c,d)},c)},useWebWorkers:!0,workerScriptsPath:null,workerScripts:null}}(this),function(a){"use strict";function b(){function a(a,b,c,d,j,k,m,o,q,r,s){var t,u,v,w,x,z,A,B,C,D,E,F,G,H,I;D=0,x=c;do{e[a[b+D]]++,D++,x--}while(0!==x);if(e[0]==c)return m[0]=-1,o[0]=0,h;for(B=o[0],z=1;z<=y&&0===e[z];z++);for(A=z,B<z&&(B=z),x=y;0!==x&&0===e[x];x--);for(v=x,B>x&&(B=x),o[0]=B,H=1<<z;z<x;z++,H<<=1)if((H-=e[z])<0)return l;if((H-=e[x])<0)return l;for(e[x]+=H,i[1]=z=0,D=1,G=2;0!=--x;)i[G]=z+=e[D],G++,D++;x=0,D=0;do{0!==(z=a[b+D])&&(s[i[z]++]=x),D++}while(++x<c);for(c=i[v],i[0]=x=0,D=0,w=-1,F=-B,g[0]=0,E=0,I=0;A<=v;A++)for(t=e[A];0!=t--;){for(;A>F+B;){if(w++,F+=B,I=v-F,I=I>B?B:I,(u=1<<(z=A-F))>t+1&&(u-=t+1,G=A,z<I))for(;++z<I&&!((u<<=1)<=e[++G]);)u-=e[G];if(I=1<<z,r[0]+I>p)return l;g[w]=E=r[0],r[0]+=I,0!==w?(i[w]=x,f[0]=z,f[1]=B,z=x>>>F-B,f[2]=E-g[w-1]-z,q.set(f,3*(g[w-1]+z))):m[0]=E}for(f[1]=A-F,D>=c?f[0]=192:s[D]<d?(f[0]=s[D]<256?0:96,f[2]=s[D++]):(f[0]=k[s[D]-d]+16+64,f[2]=j[s[D++]-d]),u=1<<A-F,z=x>>>F;z<I;z+=u)q.set(f,3*(E+z));for(z=1<<A-1;0!=(x&z);z>>>=1)x^=z;for(x^=z,C=(1<<F)-1;(x&C)!=i[w];)w--,F-=B,C=(1<<F)-1}return 0!==H&&1!=v?n:h}function b(a){var b;for(c||(c=[],d=[],e=new Int32Array(y+1),f=[],g=new Int32Array(y),i=new Int32Array(y+1)),d.length<a&&(d=[]),b=0;b<a;b++)d[b]=0;for(b=0;b<y+1;b++)e[b]=0;for(b=0;b<3;b++)f[b]=0;g.set(e.subarray(0,y),0),i.set(e.subarray(0,y+1),0)}var c,d,e,f,g,i,j=this;j.inflate_trees_bits=function(e,f,g,h,i){var j;return b(19),c[0]=0,j=a(e,0,19,19,null,null,g,f,h,c,d),j==l?i.msg="oversubscribed dynamic bit lengths tree":j!=n&&0!==f[0]||(i.msg="incomplete dynamic bit lengths tree",j=l),j},j.inflate_trees_dynamic=function(e,f,g,i,j,k,o,p,q){var r;return b(288),c[0]=0,(r=a(g,0,e,257,u,v,k,i,p,c,d))!=h||0===i[0]?(r==l?q.msg="oversubscribed literal/length tree":r!=m&&(q.msg="incomplete literal/length tree",r=l),r):(b(288),r=a(g,e,f,0,w,x,o,j,p,c,d),r!=h||0===j[0]&&e>257?(r==l?q.msg="oversubscribed distance tree":r==n?(q.msg="incomplete distance tree",r=l):r!=m&&(q.msg="empty distance tree with lengths",r=l),r):h)}}function c(){function a(a,b,c,d,e,f,g,j){var k,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B;s=j.next_in_index,t=j.avail_in,q=g.bitb,r=g.bitk,u=g.write,v=u<g.read?g.read-u-1:g.end-u,w=o[a],x=o[b];do{for(;r<20;)t--,q|=(255&j.read_byte(s++))<<r,r+=8;if(k=q&w,m=c,n=d,B=3*(n+k),0!==(p=m[B]))for(;;){if(q>>=m[B+1],r-=m[B+1],0!=(16&p)){for(p&=15,y=m[B+2]+(q&o[p]),q>>=p,r-=p;r<15;)t--,q|=(255&j.read_byte(s++))<<r,r+=8;for(k=q&x,m=e,n=f,B=3*(n+k),p=m[B];;){if(q>>=m[B+1],r-=m[B+1],0!=(16&p)){for(p&=15;r<p;)t--,q|=(255&j.read_byte(s++))<<r,r+=8;if(z=m[B+2]+(q&o[p]),q>>=p,r-=p,v-=y,u>=z)A=u-z,u-A>0&&2>u-A?(g.window[u++]=g.window[A++],g.window[u++]=g.window[A++],y-=2):(g.window.set(g.window.subarray(A,A+2),u),u+=2,A+=2,y-=2);else{A=u-z;do{A+=g.end}while(A<0);if(p=g.end-A,y>p){if(y-=p,u-A>0&&p>u-A)do{g.window[u++]=g.window[A++]}while(0!=--p);else g.window.set(g.window.subarray(A,A+p),u),u+=p,A+=p,p=0;A=0}}if(u-A>0&&y>u-A)do{g.window[u++]=g.window[A++]}while(0!=--y);else g.window.set(g.window.subarray(A,A+y),u),u+=y,A+=y,y=0;break}if(0!=(64&p))return j.msg="invalid distance code",y=j.avail_in-t,y=r>>3<y?r>>3:y,t+=y,s-=y,r-=y<<3,g.bitb=q,g.bitk=r,j.avail_in=t,j.total_in+=s-j.next_in_index,j.next_in_index=s,g.write=u,l;k+=m[B+2],k+=q&o[p],B=3*(n+k),p=m[B]}break}if(0!=(64&p))return 0!=(32&p)?(y=j.avail_in-t,y=r>>3<y?r>>3:y,t+=y,s-=y,r-=y<<3,g.bitb=q,g.bitk=r,j.avail_in=t,j.total_in+=s-j.next_in_index,j.next_in_index=s,g.write=u,i):(j.msg="invalid literal/length code",y=j.avail_in-t,y=r>>3<y?r>>3:y,t+=y,s-=y,r-=y<<3,g.bitb=q,g.bitk=r,j.avail_in=t,j.total_in+=s-j.next_in_index,j.next_in_index=s,g.write=u,l);if(k+=m[B+2],k+=q&o[p],B=3*(n+k),0===(p=m[B])){q>>=m[B+1],r-=m[B+1],g.window[u++]=m[B+2],v--;break}}else q>>=m[B+1],r-=m[B+1],g.window[u++]=m[B+2],v--}while(v>=258&&t>=10);return y=j.avail_in-t,y=r>>3<y?r>>3:y,t+=y,s-=y,r-=y<<3,g.bitb=q,g.bitk=r,j.avail_in=t,j.total_in+=s-j.next_in_index,j.next_in_index=s,g.write=u,h}var b,c,d,e,f=this,g=0,j=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0;f.init=function(a,f,g,h,i,j){b=z,r=a,s=f,d=g,t=h,e=i,u=j,c=null},f.proc=function(f,v,w){var x,y,J,K,L,M,N,O=0,P=0,Q=0;for(Q=v.next_in_index,K=v.avail_in,O=f.bitb,P=f.bitk,L=f.write,M=L<f.read?f.read-L-1:f.end-L;;)switch(b){case z:if(M>=258&&K>=10&&(f.bitb=O,f.bitk=P,v.avail_in=K,v.total_in+=Q-v.next_in_index,v.next_in_index=Q,f.write=L,w=a(r,s,d,t,e,u,f,v),Q=v.next_in_index,K=v.avail_in,O=f.bitb,P=f.bitk,L=f.write,M=L<f.read?f.read-L-1:f.end-L,w!=h)){b=w==i?G:I;break}m=r,c=d,j=t,b=A;case A:for(x=m;P<x;){if(0===K)return f.bitb=O,f.bitk=P,v.avail_in=K,v.total_in+=Q-v.next_in_index,v.next_in_index=Q,f.write=L,f.inflate_flush(v,w);w=h,K--,O|=(255&v.read_byte(Q++))<<P,P+=8}if(y=3*(j+(O&o[x])),O>>>=c[y+1],P-=c[y+1],0===(J=c[y])){n=c[y+2],b=F;break}if(0!=(16&J)){p=15&J,g=c[y+2],b=B;break}if(0==(64&J)){m=J,j=y/3+c[y+2];break}if(0!=(32&J)){b=G;break}return b=I,v.msg="invalid literal/length code",w=l,f.bitb=O,f.bitk=P,v.avail_in=K,v.total_in+=Q-v.next_in_index,v.next_in_index=Q,f.write=L,f.inflate_flush(v,w);case B:for(x=p;P<x;){if(0===K)return f.bitb=O,f.bitk=P,v.avail_in=K,v.total_in+=Q-v.next_in_index,v.next_in_index=Q,f.write=L,f.inflate_flush(v,w);w=h,K--,O|=(255&v.read_byte(Q++))<<P,P+=8}g+=O&o[x],O>>=x,P-=x,m=s,c=e,j=u,b=C;case C:for(x=m;P<x;){if(0===K)return f.bitb=O,f.bitk=P,v.avail_in=K,v.total_in+=Q-v.next_in_index,v.next_in_index=Q,f.write=L,f.inflate_flush(v,w);w=h,K--,O|=(255&v.read_byte(Q++))<<P,P+=8}if(y=3*(j+(O&o[x])),O>>=c[y+1],P-=c[y+1],0!=(16&(J=c[y]))){p=15&J,q=c[y+2],b=D;break}if(0==(64&J)){m=J,j=y/3+c[y+2];break}return b=I,v.msg="invalid distance code",w=l,f.bitb=O,f.bitk=P,v.avail_in=K,v.total_in+=Q-v.next_in_index,v.next_in_index=Q,f.write=L,f.inflate_flush(v,w);case D:for(x=p;P<x;){if(0===K)return f.bitb=O,f.bitk=P,v.avail_in=K,v.total_in+=Q-v.next_in_index,v.next_in_index=Q,f.write=L,f.inflate_flush(v,w);w=h,K--,O|=(255&v.read_byte(Q++))<<P,P+=8}q+=O&o[x],O>>=x,P-=x,b=E;case E:for(N=L-q;N<0;)N+=f.end;for(;0!==g;){if(0===M&&(L==f.end&&0!==f.read&&(L=0,M=L<f.read?f.read-L-1:f.end-L),0===M&&(f.write=L,w=f.inflate_flush(v,w),L=f.write,M=L<f.read?f.read-L-1:f.end-L,L==f.end&&0!==f.read&&(L=0,M=L<f.read?f.read-L-1:f.end-L),0===M)))return f.bitb=O,f.bitk=P,v.avail_in=K,v.total_in+=Q-v.next_in_index,v.next_in_index=Q,f.write=L,f.inflate_flush(v,w);f.window[L++]=f.window[N++],M--,N==f.end&&(N=0),g--}b=z;break;case F:if(0===M&&(L==f.end&&0!==f.read&&(L=0,M=L<f.read?f.read-L-1:f.end-L),0===M&&(f.write=L,w=f.inflate_flush(v,w),L=f.write,M=L<f.read?f.read-L-1:f.end-L,L==f.end&&0!==f.read&&(L=0,M=L<f.read?f.read-L-1:f.end-L),0===M)))return f.bitb=O,f.bitk=P,v.avail_in=K,v.total_in+=Q-v.next_in_index,v.next_in_index=Q,f.write=L,f.inflate_flush(v,w);w=h,f.window[L++]=n,M--,b=z;break;case G:if(P>7&&(P-=8,K++,Q--),f.write=L,w=f.inflate_flush(v,w),L=f.write,M=L<f.read?f.read-L-1:f.end-L,f.read!=f.write)return f.bitb=O,f.bitk=P,v.avail_in=K,v.total_in+=Q-v.next_in_index,v.next_in_index=Q,f.write=L,f.inflate_flush(v,w);b=H;case H:return w=i,f.bitb=O,f.bitk=P,v.avail_in=K,v.total_in+=Q-v.next_in_index,v.next_in_index=Q,f.write=L,f.inflate_flush(v,w);case I:return w=l,f.bitb=O,f.bitk=P,v.avail_in=K,v.total_in+=Q-v.next_in_index,v.next_in_index=Q,f.write=L,f.inflate_flush(v,w);default:return w=k,f.bitb=O,f.bitk=P,v.avail_in=K,v.total_in+=Q-v.next_in_index,v.next_in_index=Q,f.write=L,f.inflate_flush(v,w)}},f.free=function(){}}function d(a,d){var e,f=this,g=K,j=0,m=0,q=0,r=[0],s=[0],t=new c,u=0,v=new Int32Array(3*p),w=new b;f.bitk=0,f.bitb=0,f.window=new Uint8Array(d),f.end=d,f.read=0,f.write=0,f.reset=function(a,b){b&&(b[0]=0),g==Q&&t.free(a),g=K,f.bitk=0,f.bitb=0,f.read=f.write=0},f.reset(a,null),f.inflate_flush=function(a,b){var c,d,e;return d=a.next_out_index,e=f.read,c=(e<=f.write?f.write:f.end)-e,c>a.avail_out&&(c=a.avail_out),0!==c&&b==n&&(b=h),a.avail_out-=c,a.total_out+=c,a.next_out.set(f.window.subarray(e,e+c),d),d+=c,e+=c,e==f.end&&(e=0,f.write==f.end&&(f.write=0),c=f.write-e,c>a.avail_out&&(c=a.avail_out),0!==c&&b==n&&(b=h),a.avail_out-=c,a.total_out+=c,a.next_out.set(f.window.subarray(e,e+c),d),d+=c,e+=c),a.next_out_index=d,f.read=e,b},f.proc=function(a,c){var d,n,p,x,y,z,A,B;for(x=a.next_in_index,y=a.avail_in,n=f.bitb,p=f.bitk,z=f.write,A=z<f.read?f.read-z-1:f.end-z;;)switch(g){case K:for(;p<3;){if(0===y)return f.bitb=n,f.bitk=p,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,f.write=z,f.inflate_flush(a,c);c=h,y--,n|=(255&a.read_byte(x++))<<p,p+=8}switch(d=7&n,u=1&d,d>>>1){case 0:n>>>=3,p-=3,d=7&p,n>>>=d,p-=d,g=L;break;case 1:var C=[],D=[],E=[[]],F=[[]];b.inflate_trees_fixed(C,D,E,F),t.init(C[0],D[0],E[0],0,F[0],0),n>>>=3,p-=3,g=Q;break;case 2:n>>>=3,p-=3,g=N;break;case 3:return n>>>=3,p-=3,g=T,a.msg="invalid block type",c=l,f.bitb=n,f.bitk=p,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,f.write=z,f.inflate_flush(a,c)}break;case L:for(;p<32;){if(0===y)return f.bitb=n,f.bitk=p,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,f.write=z,f.inflate_flush(a,c);c=h,y--,n|=(255&a.read_byte(x++))<<p,p+=8}if((~n>>>16&65535)!=(65535&n))return g=T,a.msg="invalid stored block lengths",c=l,f.bitb=n,f.bitk=p,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,f.write=z,f.inflate_flush(a,c);j=65535&n,n=p=0,g=0!==j?M:0!==u?R:K;break;case M:if(0===y)return f.bitb=n,f.bitk=p,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,f.write=z,f.inflate_flush(a,c);if(0===A&&(z==f.end&&0!==f.read&&(z=0,A=z<f.read?f.read-z-1:f.end-z),0===A&&(f.write=z,c=f.inflate_flush(a,c),z=f.write,A=z<f.read?f.read-z-1:f.end-z,z==f.end&&0!==f.read&&(z=0,A=z<f.read?f.read-z-1:f.end-z),0===A)))return f.bitb=n,f.bitk=p,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,f.write=z,f.inflate_flush(a,c);if(c=h,d=j,d>y&&(d=y),d>A&&(d=A),f.window.set(a.read_buf(x,d),z),x+=d,y-=d,z+=d,A-=d,0!=(j-=d))break;g=0!==u?R:K;break;case N:for(;p<14;){if(0===y)return f.bitb=n,f.bitk=p,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,f.write=z,f.inflate_flush(a,c);c=h,y--,n|=(255&a.read_byte(x++))<<p,p+=8}if(m=d=16383&n,(31&d)>29||(d>>5&31)>29)return g=T,a.msg="too many length or distance symbols",c=l,f.bitb=n,f.bitk=p,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,f.write=z,f.inflate_flush(a,c);if(d=258+(31&d)+(d>>5&31),!e||e.length<d)e=[];else for(B=0;B<d;B++)e[B]=0;n>>>=14,p-=14,q=0,g=O;case O:for(;q<4+(m>>>10);){for(;p<3;){if(0===y)return f.bitb=n,f.bitk=p,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,f.write=z,f.inflate_flush(a,c);c=h,y--,n|=(255&a.read_byte(x++))<<p,p+=8}e[J[q++]]=7&n,n>>>=3,p-=3}for(;q<19;)e[J[q++]]=0;if(r[0]=7,(d=w.inflate_trees_bits(e,r,s,v,a))!=h)return c=d,c==l&&(e=null,g=T),f.bitb=n,f.bitk=p,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,f.write=z,f.inflate_flush(a,c);q=0,g=P;case P:for(;;){if(d=m,q>=258+(31&d)+(d>>5&31))break;var G,H;for(d=r[0];p<d;){if(0===y)return f.bitb=n,f.bitk=p,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,f.write=z,f.inflate_flush(a,c);c=h,y--,n|=(255&a.read_byte(x++))<<p,p+=8}if(d=v[3*(s[0]+(n&o[d]))+1],(H=v[3*(s[0]+(n&o[d]))+2])<16)n>>>=d,p-=d,e[q++]=H;else{for(B=18==H?7:H-14,G=18==H?11:3;p<d+B;){if(0===y)return f.bitb=n,f.bitk=p,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,f.write=z,f.inflate_flush(a,c);c=h,y--,n|=(255&a.read_byte(x++))<<p,p+=8}if(n>>>=d,p-=d,G+=n&o[B],n>>>=B,p-=B,B=q,d=m,B+G>258+(31&d)+(d>>5&31)||16==H&&B<1)return e=null,g=T,a.msg="invalid bit length repeat",c=l,f.bitb=n,f.bitk=p,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,f.write=z,f.inflate_flush(a,c);H=16==H?e[B-1]:0;do{e[B++]=H}while(0!=--G);q=B}}s[0]=-1;var I=[],U=[],V=[],W=[];if(I[0]=9,U[0]=6,d=m,(d=w.inflate_trees_dynamic(257+(31&d),1+(d>>5&31),e,I,U,V,W,v,a))!=h)return d==l&&(e=null,g=T),c=d,f.bitb=n,f.bitk=p,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,f.write=z,f.inflate_flush(a,c);t.init(I[0],U[0],v,V[0],v,W[0]),g=Q;case Q:if(f.bitb=n,f.bitk=p,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,f.write=z,(c=t.proc(f,a,c))!=i)return f.inflate_flush(a,c);if(c=h,t.free(a),x=a.next_in_index,y=a.avail_in,n=f.bitb,p=f.bitk,z=f.write,A=z<f.read?f.read-z-1:f.end-z,0===u){g=K;break}g=R;case R:if(f.write=z,c=f.inflate_flush(a,c),z=f.write,A=z<f.read?f.read-z-1:f.end-z,f.read!=f.write)return f.bitb=n,f.bitk=p,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,f.write=z,f.inflate_flush(a,c);g=S;case S:return c=i,f.bitb=n,f.bitk=p,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,f.write=z,f.inflate_flush(a,c);case T:return c=l,f.bitb=n,f.bitk=p,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,f.write=z,f.inflate_flush(a,c);default:return c=k,f.bitb=n,f.bitk=p,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,f.write=z,f.inflate_flush(a,c)}},f.free=function(a){f.reset(a,null),f.window=null,v=null},f.set_dictionary=function(a,b,c){f.window.set(a.subarray(b,b+c),0),f.read=f.write=c},f.sync_point=function(){return g==L?1:0}}function e(){function a(a){return a&&a.istate?(a.total_in=a.total_out=0,a.msg=null,a.istate.mode=ba,a.istate.blocks.reset(a,null),h):k}var b=this;b.mode=0,b.method=0,b.was=[0],b.need=0,b.marker=0,b.wbits=0,b.inflateEnd=function(a){return b.blocks&&b.blocks.free(a),b.blocks=null,h},b.inflateInit=function(c,e){return c.msg=null,b.blocks=null,e<8||e>15?(b.inflateEnd(c),k):(b.wbits=e,c.istate.blocks=new d(c,1<<e),a(c),h)},b.inflate=function(a,b){var c,d;if(!a||!a.istate||!a.next_in)return k;for(b=b==r?n:h,c=n;;)switch(a.istate.mode){case W:if(0===a.avail_in)return c;if(c=b,a.avail_in--,a.total_in++,(15&(a.istate.method=a.read_byte(a.next_in_index++)))!=V){a.istate.mode=da,a.msg="unknown compression method",a.istate.marker=5;break}if(8+(a.istate.method>>4)>a.istate.wbits){a.istate.mode=da,a.msg="invalid window size",a.istate.marker=5;break}a.istate.mode=X;case X:if(0===a.avail_in)return c;if(c=b,a.avail_in--,a.total_in++,d=255&a.read_byte(a.next_in_index++),((a.istate.method<<8)+d)%31!=0){a.istate.mode=da,a.msg="incorrect header check",a.istate.marker=5;break}if(0==(d&U)){a.istate.mode=ba;break}a.istate.mode=Y;case Y:if(0===a.avail_in)return c;c=b,a.avail_in--,a.total_in++,a.istate.need=(255&a.read_byte(a.next_in_index++))<<24&4278190080,a.istate.mode=Z;case Z:if(0===a.avail_in)return c;c=b,a.avail_in--,a.total_in++,a.istate.need+=(255&a.read_byte(a.next_in_index++))<<16&16711680,a.istate.mode=$;case $:if(0===a.avail_in)return c;c=b,a.avail_in--,a.total_in++,a.istate.need+=(255&a.read_byte(a.next_in_index++))<<8&65280,a.istate.mode=_;case _:return 0===a.avail_in?c:(c=b,a.avail_in--,a.total_in++,a.istate.need+=255&a.read_byte(a.next_in_index++),a.istate.mode=aa,j);case aa:return a.istate.mode=da,a.msg="need dictionary",a.istate.marker=0,k;case ba:if((c=a.istate.blocks.proc(a,c))==l){a.istate.mode=da,a.istate.marker=0;break}if(c==h&&(c=b),c!=i)return c;c=b,a.istate.blocks.reset(a,a.istate.was),a.istate.mode=ca;case ca:return i;case da:return l;default:return k}},b.inflateSetDictionary=function(a,b,c){var d=0,e=c;return a&&a.istate&&a.istate.mode==aa?(e>=1<<a.istate.wbits&&(e=(1<<a.istate.wbits)-1,d=c-e),a.istate.blocks.set_dictionary(b,d,e),a.istate.mode=ba,h):k},b.inflateSync=function(b){var c,d,e,f,g;if(!b||!b.istate)return k;if(b.istate.mode!=da&&(b.istate.mode=da,b.istate.marker=0),0===(c=b.avail_in))return n;for(d=b.next_in_index,e=b.istate.marker;0!==c&&e<4;)b.read_byte(d)==ea[e]?e++:e=0!==b.read_byte(d)?0:4-e,d++,c--;return b.total_in+=d-b.next_in_index,b.next_in_index=d,b.avail_in=c,b.istate.marker=e,4!=e?l:(f=b.total_in,g=b.total_out,a(b),b.total_in=f,b.total_out=g,b.istate.mode=ba,h)},b.inflateSyncPoint=function(a){return a&&a.istate&&a.istate.blocks?a.istate.blocks.sync_point():k}}function f(){}function g(){var a=this,b=new f,c=q,d=new Uint8Array(512),e=!1;b.inflateInit(),b.next_out=d,a.append=function(a,f){var g,j,k=[],l=0,m=0,o=0;if(0!==a.length){b.next_in_index=0,b.next_in=a,b.avail_in=a.length;do{if(b.next_out_index=0,b.avail_out=512,0!==b.avail_in||e||(b.next_in_index=0,e=!0),g=b.inflate(c),e&&g===n){if(0!==b.avail_in)throw new Error("inflating: bad input")}else if(g!==h&&g!==i)throw new Error("inflating: "+b.msg);if((e||g===i)&&b.avail_in===a.length)throw new Error("inflating: bad input");b.next_out_index&&(512===b.next_out_index?k.push(new Uint8Array(d)):k.push(new Uint8Array(d.subarray(0,b.next_out_index)))),o+=b.next_out_index,f&&b.next_in_index>0&&b.next_in_index!=l&&(f(b.next_in_index),l=b.next_in_index)}while(b.avail_in>0||0===b.avail_out);return j=new Uint8Array(o),k.forEach(function(a){j.set(a,m),m+=a.length}),j}},a.flush=function(){b.inflateEnd()}} | ||
var h=0,i=1,j=2,k=-2,l=-3,m=-4,n=-5,o=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],p=1440,q=0,r=4,s=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],t=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],u=[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],v=[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,112,112],w=[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],x=[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],y=15;b.inflate_trees_fixed=function(a,b,c,d){return a[0]=9,b[0]=5,c[0]=s,d[0]=t,h};var z=0,A=1,B=2,C=3,D=4,E=5,F=6,G=7,H=8,I=9,J=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],K=0,L=1,M=2,N=3,O=4,P=5,Q=6,R=7,S=8,T=9,U=32,V=8,W=0,X=1,Y=2,Z=3,$=4,_=5,aa=6,ba=7,ca=12,da=13,ea=[0,0,255,255];f.prototype={inflateInit:function(a){var b=this;return b.istate=new e,a||(a=15),b.istate.inflateInit(b,a)},inflate:function(a){var b=this;return b.istate?b.istate.inflate(b,a):k},inflateEnd:function(){var a=this;if(!a.istate)return k;var b=a.istate.inflateEnd(a);return a.istate=null,b},inflateSync:function(){var a=this;return a.istate?a.istate.inflateSync(a):k},inflateSetDictionary:function(a,b){var c=this;return c.istate?c.istate.inflateSetDictionary(c,a,b):k},read_byte:function(a){return this.next_in.subarray(a,a+1)[0]},read_buf:function(a,b){return this.next_in.subarray(a,a+b)}};var fa=a.zip||a;fa.Inflater=fa._jzlib_Inflater=g}(this),function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.perfCascadeFileReader=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a,b,c,d){function e(a){try{c(null,JSON.parse(a).log)}catch(a){c(a)}}if(!a)return c(new Error("Failed to load HAR file"));var f=b.match(/\.[0-9a-z]+$/i)[0];if([".zhar",".zip"].indexOf(f)!==-1)zip.createReader(new zip.BlobReader(a),function(a){a.getEntries(function(b){b[0].getData(new zip.TextWriter,function(b){e(b),a.close()},d)})});else{var g=new FileReader;g.addEventListener("load",function(a){e(a.target.result)}),g.readAsText(a)}}Object.defineProperty(c,"__esModule",{value:!0}),zip.useWebWorkers=!1,c.readFile=d},{}]},{},[1])(1)}); |
@@ -1,12 +0,39 @@ | ||
function matchHeaderFilter(lowercaseName) { | ||
/** Partial function that buils a filter predicate function */ | ||
const matchHeaderPartialFn = (lowercaseName) => { | ||
return (header) => header.name.toLowerCase() === lowercaseName; | ||
} | ||
}; | ||
/** | ||
* @param headers List of `Header` to search in | ||
* @param headerName Name of `Header` to find | ||
*/ | ||
export function hasHeader(headers, headerName) { | ||
const headerFilter = matchHeaderFilter(headerName.toLowerCase()); | ||
const headerFilter = matchHeaderPartialFn(headerName.toLowerCase()); | ||
return headers.some(headerFilter); | ||
} | ||
/** feature detection if browser supports `find` for arrays */ | ||
const browserHasFind = !!Array.prototype["find"]; | ||
/** | ||
* Returns the fist instances of `headerName` in `headers` | ||
* @param headers List of `Header` to search in | ||
* @param headerName Name of `Header` to find | ||
*/ | ||
export function getHeader(headers, headerName) { | ||
const headerFilter = matchHeaderFilter(headerName.toLowerCase()); | ||
const firstMatch = headers.filter(headerFilter).pop(); | ||
return firstMatch ? firstMatch.value : undefined; | ||
const headerFilter = matchHeaderPartialFn(headerName.toLowerCase()); | ||
let firstItem; | ||
if (browserHasFind) { | ||
firstItem = headers["find"](headerFilter); | ||
} | ||
else { | ||
firstItem = headers.map(headerFilter).pop(); | ||
} | ||
return firstItem ? firstItem.value : undefined; | ||
} | ||
/** | ||
* Returns all instances of `headerName` in `headers` as `KvTuple` | ||
* @param headers List of `Header` to search in | ||
* @param headerName Name of `Header` to find | ||
*/ | ||
export function getHeaders(headers, headerName) { | ||
const headerFilter = matchHeaderPartialFn(headerName.toLowerCase()); | ||
return headers.filter(headerFilter).map((h) => [headerName, h.value]); | ||
} |
@@ -1,3 +0,4 @@ | ||
import { getHeader } from "../helpers/har"; | ||
import { getHeader, getHeaders } from "../helpers/har"; | ||
import { formatBytes, formatDateLocalized, formatMilliseconds, formatSeconds, parseAndFormat, parseDate, parseNonEmpty, parseNonNegative, parsePositive, } from "../helpers/parse"; | ||
import { flattenKvTuple } from "./helpers"; | ||
const byteSizeProperty = (title, input) => { | ||
@@ -9,2 +10,6 @@ return [title, parseAndFormat(input, parsePositive, formatBytes)]; | ||
}; | ||
/** Predicate to filter out invalid or empty `KvTuple` */ | ||
const notEmpty = (kv) => { | ||
return kv.length > 1 && kv[1] !== undefined && kv[1] !== ""; | ||
}; | ||
function parseGeneralDetails(entry, startRelative, requestID) { | ||
@@ -39,8 +44,8 @@ return [ | ||
byteSizeProperty("Image Save", entry._image_save), | ||
].filter((k) => k[1] !== undefined && k[1] !== ""); | ||
].filter(notEmpty); | ||
} | ||
function parseRequestDetails(harEntry) { | ||
const request = harEntry.request; | ||
const stringHeader = (name) => [name, getHeader(request.headers, name)]; | ||
return [ | ||
const stringHeader = (name) => getHeaders(request.headers, name); | ||
return flattenKvTuple([ | ||
["Method", request.method], | ||
@@ -64,3 +69,3 @@ ["HTTP Version", request.httpVersion], | ||
countProperty("Cookies count", request.cookies.length), | ||
].filter((k) => k[1] !== undefined && k[1] !== ""); | ||
]).filter(notEmpty); | ||
} | ||
@@ -71,3 +76,5 @@ function parseResponseDetails(entry) { | ||
const headers = response.headers; | ||
const stringHeader = (title, name = title) => [title, getHeader(headers, name)]; | ||
const stringHeader = (title, name = title) => { | ||
return getHeaders(headers, name); | ||
}; | ||
const dateHeader = (name) => { | ||
@@ -86,3 +93,3 @@ const header = getHeader(headers, name); | ||
} | ||
return [ | ||
return flattenKvTuple([ | ||
["Status", response.status + " " + response.statusText], | ||
@@ -117,3 +124,3 @@ ["HTTP Version", response.httpVersion], | ||
["Comment", parseAndFormat(response.comment, parseNonEmpty)], | ||
]; | ||
]).filter(notEmpty); | ||
} | ||
@@ -143,3 +150,3 @@ function parseTimings(entry, start, end) { | ||
const responseHeaders = entry.response.headers; | ||
let headerToKvTuple = (header) => [header.name, header.value]; | ||
const headerToKvTuple = (header) => [header.name, header.value]; | ||
return { | ||
@@ -146,0 +153,0 @@ "general": parseGeneralDetails(entry, startRelative, requestID), |
@@ -105,3 +105,3 @@ import { escapeHtml } from "../helpers/parse"; | ||
return makeLazyWaterfallEntryTab("Preview", (detailsHeight) => `<img class="preview" style="max-height:${(detailsHeight - 100)}px" | ||
data-src="${entry.request.url}" />`); | ||
data-src="${entry.request.url.replace("\"", """)}" />`); | ||
} |
@@ -17,3 +17,3 @@ /** Helpers that are not file-fromat specific */ | ||
.map((tuple) => ` | ||
<dt ${makeClass(tuple[0])}>${tuple[0]}</dt> | ||
<dt ${makeClass(tuple[0])}>${escapeHtml(tuple[0])}</dt> | ||
<dd>${escapeHtml(tuple[1])}</dd> | ||
@@ -138,1 +138,20 @@ `).join(""); | ||
} | ||
/** | ||
* Flattens out a second level of `KvTuple` nesting (and removed empty and `undefined` entries) | ||
* | ||
* @param nestedKvPairs - nested `KvTuple`s (possibly sub-nested) | ||
*/ | ||
export const flattenKvTuple = (nestedKvPairs) => { | ||
let returnKv = []; | ||
nestedKvPairs.forEach((maybeKv) => { | ||
if (maybeKv === undefined || maybeKv.length === 0) { | ||
return; | ||
} | ||
if (Array.isArray(maybeKv[0])) { | ||
returnKv.push(...maybeKv); | ||
return; | ||
} | ||
returnKv.push(maybeKv); | ||
}); | ||
return returnKv; | ||
}; |
{ | ||
"name": "perf-cascade", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Har file visualizer", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
import { Header } from "har-format"; | ||
import { KvTuple } from "../typing/waterfall"; | ||
/** | ||
* @param headers List of `Header` to search in | ||
* @param headerName Name of `Header` to find | ||
*/ | ||
export declare function hasHeader(headers: Header[], headerName: string): boolean; | ||
/** | ||
* Returns the fist instances of `headerName` in `headers` | ||
* @param headers List of `Header` to search in | ||
* @param headerName Name of `Header` to find | ||
*/ | ||
export declare function getHeader(headers: Header[], headerName: string): string; | ||
/** | ||
* Returns all instances of `headerName` in `headers` as `KvTuple` | ||
* @param headers List of `Header` to search in | ||
* @param headerName Name of `Header` to find | ||
*/ | ||
export declare function getHeaders(headers: Header[], headerName: string): KvTuple[]; |
import { Entry } from "har-format"; | ||
/** Key/Value pair in array `["key", "value"]` */ | ||
export declare type KvTuple = [string, string]; | ||
/** | ||
@@ -5,0 +3,0 @@ * Data to show in overlay tabs |
import { RequestType } from "../typing/waterfall"; | ||
import { Icon, TimingType, WaterfallEntry, WaterfallEntryTab, WaterfallEntryTiming, WaterfallResponseDetails } from "../typing/waterfall"; | ||
import { KvTuple } from "./extract-details-keys"; | ||
import { Icon, KvTuple, TimingType, WaterfallEntry, WaterfallEntryTab, WaterfallEntryTiming, WaterfallResponseDetails } from "../typing/waterfall"; | ||
/** render a dl */ | ||
@@ -31,1 +30,7 @@ export declare function makeDefinitionList(dlKeyValues: KvTuple[], addClass?: boolean): string; | ||
export declare function makeMimeTypeIcon(status: number, statusText: string, requestType: RequestType, redirectURL?: string): Icon; | ||
/** | ||
* Flattens out a second level of `KvTuple` nesting (and removed empty and `undefined` entries) | ||
* | ||
* @param nestedKvPairs - nested `KvTuple`s (possibly sub-nested) | ||
*/ | ||
export declare const flattenKvTuple: (nestedKvPairs: ([string, string] | [string, string][])[]) => [string, string][]; |
@@ -110,1 +110,3 @@ export declare type TimingType = "blocked" | "dns" | "connect" | "send" | "wait" | "receive" | "ssl"; | ||
} | ||
/** Key/Value pair in array `["key", "value"]` */ | ||
export declare type KvTuple = [string, string]; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
565530
12103