e.avail_out&&(n=e.avail_out),0!==n&&(o.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function L(e,t){i._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,U(e.strm)}function F(e,t){e.pending_buf[e.pending++]=t}function M(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function B(e,t){var n,r,o=e.max_chain_length,i=e.strstart,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-k?e.strstart-(e.w_size-k):0,c=e.window,u=e.w_mask,d=e.prev,p=e.strstart+_,f=c[i+a-1],h=c[i+a];e.prev_length>=e.good_match&&(o>>=2),s>e.lookahead&&(s=e.lookahead);do if(c[(n=t)+a]===h&&c[n+a-1]===f&&c[n]===c[i]&&c[++n]===c[i+1]){i+=2,n++;do;while(c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&il&&0!=--o);return a<=e.lookahead?a:e.lookahead}function j(e){var t,n,r,i,l,c,u,d,p,f,h=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=h+(h-k)){for(o.arraySet(e.window,e.window,h,h,0),e.match_start-=h,e.strstart-=h,e.block_start-=h,t=n=e.hash_size;r=e.head[--t],e.head[t]=h<=r?r-h:0,--n;);for(t=n=h;r=e.prev[--t],e.prev[t]=h<=r?r-h:0,--n;);i+=h}if(0===e.strm.avail_in)break;if(c=e.strm,u=e.window,d=e.strstart+e.lookahead,f=void 0,(p=i)<(f=c.avail_in)&&(f=p),n=0===f?0:(c.avail_in-=f,o.arraySet(u,c.input,c.next_in,f,d),1===c.state.wrap?c.adler=a(c.adler,u,f,d):2===c.state.wrap&&(c.adler=s(c.adler,u,f,d)),c.next_in+=f,c.total_in+=f,f),e.lookahead+=n,e.lookahead+e.insert>=S)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<=S&&(e.ins_h=(e.ins_h<=S){if(r=i._tr_tally(e,e.strstart-e.match_start,e.match_length-S),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=S){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=S&&(e.ins_h=(e.ins_h<=S&&e.match_length<=e.prev_length){for(o=e.strstart+e.lookahead-S,r=i._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-S),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=o&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(j(e),0===e.lookahead&&t===c)return D;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,L(e,!1),0===e.strm.avail_out)||e.strstart-e.block_start>=e.w_size-k&&(L(e,!1),0===e.strm.avail_out))return D}return e.insert=0,t===u?(L(e,!0),0===e.strm.avail_out?O:R):(e.strstart>e.block_start&&(L(e,!1),e.strm.avail_out),D)}),new H(4,4,8,4,z),new H(4,5,16,8,z),new H(4,6,32,32,z),new H(4,4,16,16,W),new H(8,16,32,32,W),new H(8,16,128,128,W),new H(8,32,128,256,W),new H(32,128,258,1024,W),new H(32,258,258,4096,W)],n.deflateInit=function(e,t){return q(e,t,m,15,8,0)},n.deflateInit2=q,n.deflateReset=V,n.deflateResetKeep=G,n.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?p:(e.state.gzhead=t,d):p},n.deflate=function(e,t){var n,o,a,l;if(!e||!e.state||5>8&255),F(o,o.gzhead.time>>16&255),F(o,o.gzhead.time>>24&255),F(o,9===o.level?2:2<=o.strategy||o.level<2?4:0),F(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(F(o,255&o.gzhead.extra.length),F(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(e.adler=s(e.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(F(o,0),F(o,0),F(o,0),F(o,0),F(o,0),F(o,9===o.level?2:2<=o.strategy||o.level<2?4:0),F(o,3),o.status=A);else{var f=m+(o.w_bits-8<<4)<<8;f|=(2<=o.strategy||o.level<2?0:o.level<6?1:6===o.level?2:3)<<6,0!==o.strstart&&(f|=32),f+=31-f%31,o.status=A,M(o,f),0!==o.strstart&&(M(o,e.adler>>>16),M(o,65535&e.adler)),e.adler=1}}if(69===o.status){if(o.gzhead.extra){for(a=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),U(e),a=o.pending,o.pending!==o.pending_buf_size));)F(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73}if(73===o.status){if(o.gzhead.name){a=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),U(e),a=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindexa&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),0===l&&(o.gzindex=0,o.status=91)}else o.status=91}if(91===o.status){if(o.gzhead.comment){a=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),U(e),a=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindexa&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),0===l&&(o.status=103)}else o.status=103}if(103===o.status&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&U(e),o.pending+2<=o.pending_buf_size&&(F(o,255&e.adler),F(o,e.adler>>8&255),e.adler=0,o.status=A)):o.status=A),0!==o.pending){if(U(e),0===e.avail_out)return o.last_flush=-1,d}else if(0===e.avail_in&&N(t)<=N(n)&&t!==u)return I(e,-5);if(666===o.status&&0!==e.avail_in)return I(e,-5);if(0!==e.avail_in||0!==o.lookahead||t!==c&&666!==o.status){var h=2===o.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(j(e),0===e.lookahead)){if(t===c)return D;break}if(e.match_length=0,n=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(L(e,!1),0===e.strm.avail_out))return D}return e.insert=0,t===u?(L(e,!0),0===e.strm.avail_out?O:R):e.last_lit&&(L(e,!1),0===e.strm.avail_out)?D:C}(o,t):3===o.strategy?function(e,t){for(var n,r,o,a,s=e.window;;){if(e.lookahead<=_){if(j(e),e.lookahead<=_&&t===c)return D;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=S&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=S?(n=i._tr_tally(e,1,e.match_length-S),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(L(e,!1),0===e.strm.avail_out))return D}return e.insert=0,t===u?(L(e,!0),0===e.strm.avail_out?O:R):e.last_lit&&(L(e,!1),0===e.strm.avail_out)?D:C}(o,t):r[o.level].func(o,t);if(h!==O&&h!==R||(o.status=666),h===D||h===O)return 0===e.avail_out&&(o.last_flush=-1),d;if(h===C&&(1===t?i._tr_align(o):5!==t&&(i._tr_stored_block(o,0,0,!1),3===t&&(P(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),U(e),0===e.avail_out))return o.last_flush=-1,d}return t!==u?d:o.wrap<=0?1:(2===o.wrap?(F(o,255&e.adler),F(o,e.adler>>8&255),F(o,e.adler>>16&255),F(o,e.adler>>24&255),F(o,255&e.total_in),F(o,e.total_in>>8&255),F(o,e.total_in>>16&255),F(o,e.total_in>>24&255)):(M(o,e.adler>>>16),M(o,65535&e.adler)),U(e),0=n.w_size&&(0===s&&(P(n.head),n.strstart=0,n.block_start=0,n.insert=0),f=new o.Buf8(n.w_size),o.arraySet(f,t,h-n.w_size,n.w_size,0),t=f,h=n.w_size),l=e.avail_in,c=e.next_in,u=e.input,e.avail_in=h,e.next_in=0,e.input=t,j(n);n.lookahead>=S;){for(r=n.strstart,i=n.lookahead-(S-1);n.ins_h=(n.ins_h<