From db1ad480a51469f0ca5998c780a0e621eb0a2157 Mon Sep 17 00:00:00 2001 From: Ben Papillon Date: Thu, 24 Aug 2023 13:51:20 -0400 Subject: [PATCH] correct attribute access --- example/index.html | 9 +++++++++ example/main.js | 1 + src/main.ts | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 example/index.html create mode 100644 example/main.js diff --git a/example/index.html b/example/index.html new file mode 100644 index 00000000..89cb43e5 --- /dev/null +++ b/example/index.html @@ -0,0 +1,9 @@ + + + Schematic Example + + + hello world! + + + diff --git a/example/main.js b/example/main.js new file mode 100644 index 00000000..fe3402c6 --- /dev/null +++ b/example/main.js @@ -0,0 +1 @@ +(()=>{let t,e,a,i,n,r;function s(t){let e=t.length;for(;--e>=0;)t[e]=0}let l=new Uint8Array([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]),o=new Uint8Array([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]),h=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),d=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),_=Array(576);s(_);let u=Array(60);s(u);let f=Array(512);s(f);let c=Array(256);s(c);let w=Array(29);s(w);let m=Array(30);function g(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}function b(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}s(m);let p=t=>t<256?f[t]:f[256+(t>>>7)],k=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},v=(t,e,a)=>{t.bi_valid>16-a?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<{v(t,a[2*e],a[2*e+1])},x=(t,e)=>{let a=0;do a|=1&t,t>>>=1,a<<=1;while(--e>0)return a>>>1},z=t=>{16===t.bi_valid?(k(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)},E=(t,e)=>{let a,i,n,r,s,l;let o=e.dyn_tree,h=e.max_code,d=e.stat_desc.static_tree,_=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,w=0;for(r=0;r<=15;r++)t.bl_count[r]=0;for(o[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(r=o[2*o[2*(i=t.heap[a])+1]+1]+1)>c&&(r=c,w++),o[2*i+1]=r,!(i>h)&&(t.bl_count[r]++,s=0,i>=f&&(s=u[i-f]),l=o[2*i],t.opt_len+=l*(r+s),_&&(t.static_len+=l*(d[2*i+1]+s)));if(0!==w){do{for(r=c-1;0===t.bl_count[r];)r--;t.bl_count[r]--,t.bl_count[r+1]+=2,t.bl_count[c]--,w-=2}while(w>0)for(r=c;0!==r;r--)for(i=t.bl_count[r];0!==i;)!((n=t.heap[--a])>h)&&(o[2*n+1]!==r&&(t.opt_len+=(r-o[2*n+1])*o[2*n],o[2*n+1]=r),i--)}},A=(t,e,a)=>{let i,n;let r=Array(16),s=0;for(i=1;i<=15;i++)s=s+a[i-1]<<1,r[i]=s;for(n=0;n<=e;n++){let e=t[2*n+1];0!==e&&(t[2*n]=x(r[e]++,e))}},R=()=>{let i,n,r,s,d;let b=Array(16);for(s=0,r=0;s<28;s++)for(i=0,w[s]=r;i<1<>=7;s<30;s++)for(i=0,m[s]=d<<7;i<1<{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},S=t=>{t.bi_valid>8?k(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},Z=(t,e,a,i)=>{let n=2*e,r=2*a;return t[n]{let i=t.heap[a],n=a<<1;for(;n<=t.heap_len&&(n{let i,n,r,s;let h=0;if(0!==t.sym_next)do i=(255&t.pending_buf[t.sym_buf+h++])+((255&t.pending_buf[t.sym_buf+h++])<<8),n=t.pending_buf[t.sym_buf+h++],0===i?y(t,n,e):(y(t,(r=c[n])+256+1,e),0!==(s=l[r])&&v(t,n-=w[r],s),y(t,r=p(--i),a),0!==(s=o[r])&&v(t,i-=m[r],s));while(h{let a,i,n;let r=e.dyn_tree,s=e.stat_desc.static_tree,l=e.stat_desc.has_stree,o=e.stat_desc.elems,h=-1;for(a=0,t.heap_len=0,t.heap_max=573;a>1;a>=1;a--)D(t,r,a);n=o;do a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],D(t,r,1),i=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=i,r[2*n]=r[2*a]+r[2*i],t.depth[n]=(t.depth[a]>=t.depth[i]?t.depth[a]:t.depth[i])+1,r[2*a+1]=r[2*i+1]=n,t.heap[1]=n++,D(t,r,1);while(t.heap_len>=2)t.heap[--t.heap_max]=t.heap[1],E(t,e),A(r,h,t.bl_count)},O=(t,e,a)=>{let i,n;let r=-1,s=e[1],l=0,o=7,h=4;for(0===s&&(o=138,h=3),e[(a+1)*2+1]=65535,i=0;i<=a;i++)n=s,s=e[(i+1)*2+1],++l{let i,n;let r=-1,s=e[1],l=0,o=7,h=4;for(0===s&&(o=138,h=3),i=0;i<=a;i++)if(n=s,s=e[(i+1)*2+1],!(++l{let e;for(O(t,t.dyn_ltree,t.l_desc.max_code),O(t,t.dyn_dtree,t.d_desc.max_code),T(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*d[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e},F=(t,e,a,i)=>{let n;for(v(t,e-257,5),v(t,a-1,5),v(t,i-4,4),n=0;n{let e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0},C=!1,H=(t,e,a,i)=>{v(t,0+(i?1:0),3),S(t),k(t,a),k(t,~a),a&&t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a};var M={_tr_init:i=>{C||(R(),C=!0),i.l_desc=new b(i.dyn_ltree,t),i.d_desc=new b(i.dyn_dtree,e),i.bl_desc=new b(i.bl_tree,a),i.bi_buf=0,i.bi_valid=0,U(i)},_tr_stored_block:H,_tr_flush_block:(t,e,a,i)=>{let n,r;let s=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=B(t)),T(t,t.l_desc),T(t,t.d_desc),s=N(t),n=t.opt_len+3+7>>>3,(r=t.static_len+3+7>>>3)<=n&&(n=r)):n=r=a+5,a+4<=n&&-1!==e?H(t,e,a,i):4===t.strategy||r===n?(v(t,2+(i?1:0),3),I(t,_,u)):(v(t,4+(i?1:0),3),F(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),I(t,t.dyn_ltree,t.dyn_dtree)),U(t),i&&S(t)},_tr_tally:(t,e,a)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=a,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[(c[a]+256+1)*2]++,t.dyn_dtree[2*p(e)]++),t.sym_next===t.sym_end),_tr_align:t=>{v(t,2,3),y(t,256,_),z(t)}},K=(t,e,a,i)=>{let n=65535&t|0,r=t>>>16&65535|0,s=0;for(;0!==a;){s=a>2e3?2e3:a,a-=s;do r=r+(n=n+e[i++]|0)|0;while(--s)n%=65521,r%=65521}return n|r<<16|0};let j=new Uint32Array((()=>{let t,e=[];for(var a=0;a<256;a++){t=a;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e})());var Q=(t,e,a,i)=>{let n=i+a;t^=-1;for(let a=i;a>>8^j[(t^e[a])&255];return -1^t},P={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"},Y={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_MEM_ERROR:-4,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};let{_tr_init:G,_tr_stored_block:X,_tr_flush_block:V,_tr_tally:q,_tr_align:J}=M,{Z_NO_FLUSH:W,Z_PARTIAL_FLUSH:$,Z_FULL_FLUSH:tt,Z_FINISH:te,Z_BLOCK:ta,Z_OK:ti,Z_STREAM_END:tn,Z_STREAM_ERROR:tr,Z_DATA_ERROR:ts,Z_BUF_ERROR:tl,Z_DEFAULT_COMPRESSION:to,Z_FILTERED:th,Z_HUFFMAN_ONLY:td,Z_RLE:t_,Z_FIXED:tu,Z_DEFAULT_STRATEGY:tf,Z_UNKNOWN:tc,Z_DEFLATED:tw}=Y,tm=(t,e)=>(t.msg=P[e],e),tg=t=>2*t-(t>4?9:0),tb=t=>{let e=t.length;for(;--e>=0;)t[e]=0},tp=t=>{let e,a,i;let n=t.w_size;i=e=t.hash_size;do a=t.head[--i],t.head[i]=a>=n?a-n:0;while(--e)i=e=n;do a=t.prev[--i],t.prev[i]=a>=n?a-n:0;while(--e)},tk=(t,e,a)=>(e<{let e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},ty=(t,e)=>{V(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,tv(t.strm)},tx=(t,e)=>{t.pending_buf[t.pending++]=e},tz=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tE=(t,e,a,i)=>{let n=t.avail_in;return(n>i&&(n=i),0===n)?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),a),1===t.state.wrap?t.adler=K(t.adler,e,n,a):2===t.state.wrap&&(t.adler=Q(t.adler,e,n,a)),t.next_in+=n,t.total_in+=n,n)},tA=(t,e)=>{let a,i,n=t.max_chain_length,r=t.strstart,s=t.prev_length,l=t.nice_match,o=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,h=t.window,d=t.w_mask,_=t.prev,u=t.strstart+258,f=h[r+s-1],c=h[r+s];t.prev_length>=t.good_match&&(n>>=2),l>t.lookahead&&(l=t.lookahead);do{if(h[(a=e)+s]!==c||h[a+s-1]!==f||h[a]!==h[r]||h[++a]!==h[r+1])continue;r+=2,a++;do;while(h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&rs){if(t.match_start=e,s=i,i>=l)break;f=h[r+s-1],c=h[r+s]}}while((e=_[e&d])>o&&0!=--n)return s<=t.lookahead?s:t.lookahead},tR=t=>{let e,a,i;let n=t.w_size;do{if(a=t.window_size-t.lookahead-t.strstart,t.strstart>=n+(n-262)&&(t.window.set(t.window.subarray(n,n+n-a),0),t.match_start-=n,t.strstart-=n,t.block_start-=n,t.insert>t.strstart&&(t.insert=t.strstart),tp(t),a+=n),0===t.strm.avail_in)break;if(e=tE(t.strm,t.window,t.strstart+t.lookahead,a),t.lookahead+=e,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=tk(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=tk(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)},tU=(t,e)=>{let a=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,i,n,r,s=0,l=t.strm.avail_in;do{if(i=65535,r=t.bi_valid+42>>3,t.strm.avail_outn+t.strm.avail_in&&(i=n+t.strm.avail_in),i>r&&(i=r),i>8,t.pending_buf[t.pending-2]=~i,t.pending_buf[t.pending-1]=~i>>8,tv(t.strm),n&&(n>i&&(n=i),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+n),t.strm.next_out),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n,t.block_start+=n,i-=n),i&&(tE(t.strm,t.strm.output,t.strm.next_out,i),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i)}while(0===s)return((l-=t.strm.avail_in)&&(l>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=l&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-l,t.strm.next_in),t.strstart),t.strstart+=l,t.insert+=l>t.w_size-t.insert?t.w_size-t.insert:l),t.block_start=t.strstart),t.high_waterr&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,r+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),r>t.strm.avail_in&&(r=t.strm.avail_in),r&&(tE(t.strm,t.window,t.strstart,r),t.strstart+=r,t.insert+=r>t.w_size-t.insert?t.w_size-t.insert:r),t.high_water>3,a=(r=t.pending_buf_size-r>65535?65535:t.pending_buf_size-r)>t.w_size?t.w_size:r,((n=t.strstart-t.block_start)>=a||(n||e===te)&&e!==W&&0===t.strm.avail_in&&n<=r)&&(i=n>r?r:n,s=e===te&&0===t.strm.avail_in&&i===n?1:0,X(t,t.block_start,i,s),t.block_start+=i,tv(t.strm)),s?3:1)},tS=(t,e)=>{let a,i;for(;;){if(t.lookahead<262){if(tR(t),t.lookahead<262&&e===W)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=tk(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-262&&(t.match_length=tA(t,a)),t.match_length>=3){if(i=q(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do t.strstart++,t.ins_h=tk(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart;while(0!=--t.match_length)t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=tk(t,t.ins_h,t.window[t.strstart+1])}else i=q(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(ty(t,!1),0===t.strm.avail_out))return 1}return(t.insert=t.strstart<2?t.strstart:2,e===te)?(ty(t,!0),0===t.strm.avail_out)?3:4:t.sym_next&&(ty(t,!1),0===t.strm.avail_out)?1:2},tZ=(t,e)=>{let a,i,n;for(;;){if(t.lookahead<262){if(tR(t),t.lookahead<262&&e===W)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=tk(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=q(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=n&&(t.ins_h=tk(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart);while(0!=--t.prev_length)if(t.match_available=0,t.match_length=2,t.strstart++,i&&(ty(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((i=q(t,0,t.window[t.strstart-1]))&&ty(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return(t.match_available&&(i=q(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===te)?(ty(t,!0),0===t.strm.avail_out)?3:4:t.sym_next&&(ty(t,!1),0===t.strm.avail_out)?1:2},tD=(t,e)=>{let a,i,n,r;let s=t.window;for(;;){if(t.lookahead<=258){if(tR(t),t.lookahead<=258&&e===W)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(i=s[n=t.strstart-1])===s[++n]&&i===s[++n]&&i===s[++n]){r=t.strstart+258;do;while(i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&nt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=q(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=q(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(ty(t,!1),0===t.strm.avail_out))return 1}return(t.insert=0,e===te)?(ty(t,!0),0===t.strm.avail_out)?3:4:t.sym_next&&(ty(t,!1),0===t.strm.avail_out)?1:2},tI=(t,e)=>{let a;for(;;){if(0===t.lookahead&&(tR(t),0===t.lookahead)){if(e===W)return 1;break}if(t.match_length=0,a=q(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(ty(t,!1),0===t.strm.avail_out))return 1}return(t.insert=0,e===te)?(ty(t,!0),0===t.strm.avail_out)?3:4:t.sym_next&&(ty(t,!1),0===t.strm.avail_out)?1:2};function tT(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n}let tO=[new tT(0,0,0,0,tU),new tT(4,4,8,4,tS),new tT(4,5,16,8,tS),new tT(4,6,32,32,tS),new tT(4,4,16,16,tZ),new tT(8,16,32,32,tZ),new tT(8,16,128,128,tZ),new tT(8,32,128,256,tZ),new tT(32,128,258,1024,tZ),new tT(32,258,258,4096,tZ)],tL=t=>{t.window_size=2*t.w_size,tb(t.head),t.max_lazy_match=tO[t.level].max_lazy,t.good_match=tO[t.level].good_length,t.nice_match=tO[t.level].nice_length,t.max_chain_length=tO[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0};function tN(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=tw,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),tb(this.dyn_ltree),tb(this.dyn_dtree),tb(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),tb(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),tb(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}let tF=t=>{if(!t)return 1;let e=t.state;return e&&e.strm===t&&(42===e.status||57===e.status||69===e.status||73===e.status||91===e.status||103===e.status||113===e.status||666===e.status)?0:1},tB=t=>{if(tF(t))return tm(t,tr);t.total_in=t.total_out=0,t.data_type=tc;let e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=-2,G(e),ti},tC=t=>{let e=tB(t);return e===ti&&tL(t.state),e},tH=(t,e,a,i,n,r)=>{if(!t)return tr;let s=1;if(e===to&&(e=6),i<0?(s=0,i=-i):i>15&&(s=2,i-=16),n<1||n>9||a!==tw||i<8||i>15||e<0||e>9||r<0||r>tu||8===i&&1!==s)return tm(t,tr);8===i&&(i=9);let l=new tN;return t.state=l,l.strm=t,l.status=42,l.wrap=s,l.gzhead=null,l.w_bits=i,l.w_size=1<tH(t,e,tw,15,8,tf),deflateInit2:tH,deflateReset:tC,deflateResetKeep:tB,deflateSetHeader:(t,e)=>tF(t)||2!==t.state.wrap?tr:(t.state.gzhead=e,ti),deflate:(t,e)=>{if(tF(t)||e>ta||e<0)return t?tm(t,tr):tr;let a=t.state;if(!t.output||0!==t.avail_in&&!t.input||666===a.status&&e!==te)return tm(t,0===t.avail_out?tl:tr);let i=a.last_flush;if(a.last_flush=e,0!==a.pending){if(tv(t),0===t.avail_out)return a.last_flush=-1,ti}else if(0===t.avail_in&&tg(e)<=tg(i)&&e!==te)return tm(t,tl);if(666===a.status&&0!==t.avail_in)return tm(t,tl);if(42===a.status&&0===a.wrap&&(a.status=113),42===a.status){let e=tw+(a.w_bits-8<<4)<<8;if(e|=(a.strategy>=td||a.level<2?0:a.level<6?1:6===a.level?2:3)<<6,0!==a.strstart&&(e|=32),tz(a,e+=31-e%31),0!==a.strstart&&(tz(a,t.adler>>>16),tz(a,65535&t.adler)),t.adler=1,a.status=113,tv(t),0!==a.pending)return a.last_flush=-1,ti}if(57===a.status){if(t.adler=0,tx(a,31),tx(a,139),tx(a,8),a.gzhead)tx(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),tx(a,255&a.gzhead.time),tx(a,a.gzhead.time>>8&255),tx(a,a.gzhead.time>>16&255),tx(a,a.gzhead.time>>24&255),tx(a,9===a.level?2:a.strategy>=td||a.level<2?4:0),tx(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(tx(a,255&a.gzhead.extra.length),tx(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=Q(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69;else if(tx(a,0),tx(a,0),tx(a,0),tx(a,0),tx(a,0),tx(a,9===a.level?2:a.strategy>=td||a.level<2?4:0),tx(a,3),a.status=113,tv(t),0!==a.pending)return a.last_flush=-1,ti}if(69===a.status){if(a.gzhead.extra){let e=a.pending,i=(65535&a.gzhead.extra.length)-a.gzindex;for(;a.pending+i>a.pending_buf_size;){let n=a.pending_buf_size-a.pending;if(a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex,a.gzindex+n),a.pending),a.pending=a.pending_buf_size,a.gzhead.hcrc&&a.pending>e&&(t.adler=Q(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex+=n,tv(t),0!==a.pending)return a.last_flush=-1,ti;e=0,i-=n}let n=new Uint8Array(a.gzhead.extra);a.pending_buf.set(n.subarray(a.gzindex,a.gzindex+i),a.pending),a.pending+=i,a.gzhead.hcrc&&a.pending>e&&(t.adler=Q(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex=0}a.status=73}if(73===a.status){if(a.gzhead.name){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=Q(t.adler,a.pending_buf,a.pending-i,i)),tv(t),0!==a.pending)return a.last_flush=-1,ti;i=0}e=a.gzindexi&&(t.adler=Q(t.adler,a.pending_buf,a.pending-i,i)),a.gzindex=0}a.status=91}if(91===a.status){if(a.gzhead.comment){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=Q(t.adler,a.pending_buf,a.pending-i,i)),tv(t),0!==a.pending)return a.last_flush=-1,ti;i=0}e=a.gzindexi&&(t.adler=Q(t.adler,a.pending_buf,a.pending-i,i))}a.status=103}if(103===a.status){if(a.gzhead.hcrc){if(a.pending+2>a.pending_buf_size&&(tv(t),0!==a.pending))return a.last_flush=-1,ti;tx(a,255&t.adler),tx(a,t.adler>>8&255),t.adler=0}if(a.status=113,tv(t),0!==a.pending)return a.last_flush=-1,ti}if(0!==t.avail_in||0!==a.lookahead||e!==W&&666!==a.status){let i=0===a.level?tU(a,e):a.strategy===td?tI(a,e):a.strategy===t_?tD(a,e):tO[a.level].func(a,e);if((3===i||4===i)&&(a.status=666),1===i||3===i)return 0===t.avail_out&&(a.last_flush=-1),ti;if(2===i&&(e===$?J(a):e!==ta&&(X(a,0,0,!1),e===tt&&(tb(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),tv(t),0===t.avail_out))return a.last_flush=-1,ti}return e!==te?ti:a.wrap<=0?tn:(2===a.wrap?(tx(a,255&t.adler),tx(a,t.adler>>8&255),tx(a,t.adler>>16&255),tx(a,t.adler>>24&255),tx(a,255&t.total_in),tx(a,t.total_in>>8&255),tx(a,t.total_in>>16&255),tx(a,t.total_in>>24&255)):(tz(a,t.adler>>>16),tz(a,65535&t.adler)),tv(t),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?ti:tn)},deflateEnd:t=>{if(tF(t))return tr;let e=t.state.status;return t.state=null,113===e?tm(t,ts):ti},deflateSetDictionary:(t,e)=>{let a=e.length;if(tF(t))return tr;let i=t.state,n=i.wrap;if(2===n||1===n&&42!==i.status||i.lookahead)return tr;if(1===n&&(t.adler=K(t.adler,e,a,0)),i.wrap=0,a>=i.w_size){0===n&&(tb(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(a-i.w_size,a),0),e=t,a=i.w_size}let r=t.avail_in,s=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,tR(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do i.ins_h=tk(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++;while(--e)i.strstart=t,i.lookahead=2,tR(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=s,t.input=l,t.avail_in=r,i.wrap=n,ti},deflateInfo:"pako deflate (from Nodeca project)"};let tK=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var tj={assign:function(t){let e=Array.prototype.slice.call(arguments,1);for(;e.length;){let a=e.shift();if(a){if("object"!=typeof a)throw TypeError(a+"must be non-object");for(let e in a)tK(a,e)&&(t[e]=a[e])}}return t},flattenChunks:t=>{let e=0;for(let a=0,i=t.length;a=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;tP[254]=tP[254]=1;let tY=(t,e)=>{if(e<65534&&t.subarray&&tQ)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let a="";for(let i=0;i{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let e,a,i,n,r,s=t.length,l=0;for(n=0;n>>6,e[r++]=128|63&a):a<65536?(e[r++]=224|a>>>12,e[r++]=128|a>>>6&63,e[r++]=128|63&a):(e[r++]=240|a>>>18,e[r++]=128|a>>>12&63,e[r++]=128|a>>>6&63,e[r++]=128|63&a);return e},buf2string:(t,e)=>{let a,i;let n=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,e));let r=Array(2*n);for(i=0,a=0;a4){r[i++]=65533,a+=s-1;continue}for(e&=2===s?31:3===s?15:7;s>1&&a1){r[i++]=65533;continue}e<65536?r[i++]=e:(e-=65536,r[i++]=55296|e>>10&1023,r[i++]=56320|1023&e)}return tY(r,i)},utf8border:(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let a=e-1;for(;a>=0&&(192&t[a])==128;)a--;return a<0||0===a?e:a+tP[t[a]]>e?a:e}},tX=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};let tV=Object.prototype.toString,{Z_NO_FLUSH:tq,Z_SYNC_FLUSH:tJ,Z_FULL_FLUSH:tW,Z_FINISH:t$,Z_OK:t1,Z_STREAM_END:t0,Z_DEFAULT_COMPRESSION:t2,Z_DEFAULT_STRATEGY:t5,Z_DEFLATED:t6}=Y;function t3(t){this.options=tj.assign({level:t2,method:t6,chunkSize:16384,windowBits:15,memLevel:8,strategy:t5},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new tX,this.strm.avail_out=0;let a=tM.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==t1)throw Error(P[a]);if(e.header&&tM.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?tG.string2buf(e.dictionary):"[object ArrayBuffer]"===tV.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(a=tM.deflateSetDictionary(this.strm,t))!==t1)throw Error(P[a]);this._dict_set=!0}}function t8(t,e){let a=new t3(e);if(a.push(t,!0),a.err)throw a.msg||P[a.err];return a.result}t3.prototype.push=function(t,e){let a,i;let n=this.strm,r=this.options.chunkSize;if(this.ended)return!1;for(i=e===~~e?e:!0===e?t$:tq,"string"==typeof t?n.input=tG.string2buf(t):"[object ArrayBuffer]"===tV.call(t)?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;;){if(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(i===tJ||i===tW)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if((a=tM.deflate(n,i))===t0)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),a=tM.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===t1;if(0===n.avail_out){this.onData(n.output);continue}if(i>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(0===n.avail_in)break}return!0},t3.prototype.onData=function(t){this.chunks.push(t)},t3.prototype.onEnd=function(t){t===t1&&(this.result=tj.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var t4=function(t,e){let a,i,n,r,s,l,o,h,d,_,u,f,c,w,m,g,b,p,k,v,y,x,z,E;let A=t.state;a=t.next_in,z=t.input,i=a+(t.avail_in-5),n=t.next_out,E=t.output,r=n-(e-t.avail_out),s=n+(t.avail_out-257),l=A.dmax,o=A.wsize,h=A.whave,d=A.wnext,_=A.window,u=A.hold,f=A.bits,c=A.lencode,w=A.distcode,m=(1<>>=p=b>>>24,f-=p,0==(p=b>>>16&255))E[n++]=65535&b;else if(16&p)for(k=65535&b,(p&=15)&&(f>>=p,f-=p),f<15&&(u+=z[a++]<>>=p=b>>>24,f-=p,16&(p=b>>>16&255)){if(v=65535&b,f<(p&=15)&&(u+=z[a++]<l){t.msg="invalid distance too far back",A.mode=16209;break t}if(u>>>=p,f-=p,v>(p=n-r)){if((p=v-p)>h&&A.sane){t.msg="invalid distance too far back",A.mode=16209;break t}if(y=0,x=_,0===d){if(y+=o-p,p2;)E[n++]=x[y++],E[n++]=x[y++],E[n++]=x[y++],k-=3;k&&(E[n++]=x[y++],k>1&&(E[n++]=x[y++]))}else{y=n-v;do E[n++]=E[y++],E[n++]=E[y++],E[n++]=E[y++],k-=3;while(k>2)k&&(E[n++]=E[y++],k>1&&(E[n++]=E[y++]))}}else if((64&p)==0){b=w[(65535&b)+(u&(1<>3,f-=k<<3,u&=(1<{let o,h,d,_,u,f,c,w,m;let g=l.bits,b=0,p=0,k=0,v=0,y=0,x=0,z=0,E=0,A=0,R=0,U=null,S=new Uint16Array(16),Z=new Uint16Array(16),D=null;for(b=0;b<=15;b++)S[b]=0;for(p=0;p=1&&0===S[v];v--);if(y>v&&(y=v),0===v)return n[r++]=20971520,n[r++]=20971520,l.bits=1,0;for(k=1;k0&&(0===t||1!==v))return -1;for(b=1,Z[1]=0;b<15;b++)Z[b+1]=Z[b]+S[b];for(p=0;p852||2===t&&A>592)return 1;for(;;){c=b-z,s[p]+1=f?(w=D[s[p]-f],m=U[s[p]-f]):(w=96,m=0),o=1<>z)+(h-=o)]=c<<24|w<<16|m|0;while(0!==h)for(o=1<>=1;if(0!==o?(R&=o-1,R+=o):R=0,p++,0==--S[b]){if(b===v)break;b=e[a+s[p]]}if(b>y&&(R&_)!==d){for(0===z&&(z=y),u+=k,E=1<<(x=b-z);x+z852||2===t&&A>592)return 1;n[d=R&_]=y<<24|x<<16|u-r|0}}return 0!==R&&(n[u+R]=b-z<<24|4194304),l.bits=y,0};let{Z_FINISH:ei,Z_BLOCK:en,Z_TREES:er,Z_OK:es,Z_STREAM_END:el,Z_NEED_DICT:eo,Z_STREAM_ERROR:eh,Z_DATA_ERROR:ed,Z_MEM_ERROR:e_,Z_BUF_ERROR:eu,Z_DEFLATED:ef}=Y,ec=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function ew(){this.strm=null,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 Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}let em=t=>{if(!t)return 1;let e=t.state;return!e||e.strm!==t||e.mode<16180||e.mode>16211?1:0},eg=t=>{if(em(t))return eh;let e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=16180,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,es},eb=t=>{if(em(t))return eh;let e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,eg(t)},ep=(t,e)=>{let a;if(em(t))return eh;let i=t.state;return(e<0?(a=0,e=-e):(a=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15))?eh:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,eb(t))},ek=(t,e)=>{if(!t)return eh;let a=new ew;t.state=a,a.strm=t,a.window=null,a.mode=16180;let i=ep(t,e);return i!==es&&(t.state=null),i},ev=!0,ey=t=>{if(ev){i=new Int32Array(512),n=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ea(1,t.lens,0,288,i,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ea(2,t.lens,0,32,n,0,t.work,{bits:5}),ev=!1}t.lencode=i,t.lenbits=9,t.distcode=n,t.distbits=5},ex=(t,e,a,i)=>{let n;let r=t.state;return null===r.window&&(r.wsize=1<=r.wsize?(r.window.set(e.subarray(a-r.wsize,a),0),r.wnext=0,r.whave=r.wsize):((n=r.wsize-r.wnext)>i&&(n=i),r.window.set(e.subarray(a-i,a-i+n),r.wnext),(i-=n)?(r.window.set(e.subarray(a-i,a),0),r.wnext=i,r.whave=r.wsize):(r.wnext+=n,r.wnext===r.wsize&&(r.wnext=0),r.whaveek(t,15),inflateInit2:ek,inflate:(t,e)=>{let a,i,n,r,s,l,o,h,d,_,u,f,c,w,m,g,b,p,k,v,y,x,z,E;let A=0,R=new Uint8Array(4),U=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(em(t)||!t.output||!t.input&&0!==t.avail_in)return eh;16191===(a=t.state).mode&&(a.mode=16192),s=t.next_out,n=t.output,o=t.avail_out,r=t.next_in,i=t.input,l=t.avail_in,h=a.hold,d=a.bits,_=l,u=o,x=es;e:for(;;)switch(a.mode){case 16180:if(0===a.wrap){a.mode=16192;break}for(;d<16;){if(0===l)break e;l--,h+=i[r++]<>>8&255,a.check=Q(a.check,R,2,0),h=0,d=0,a.mode=16181;break}if(a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=16209;break}if((15&h)!==ef){t.msg="unknown compression method",a.mode=16209;break}if(h>>>=4,d-=4,y=(15&h)+8,0===a.wbits&&(a.wbits=y),y>15||y>a.wbits){t.msg="invalid window size",a.mode=16209;break}a.dmax=1<>8&1),512&a.flags&&4&a.wrap&&(R[0]=255&h,R[1]=h>>>8&255,a.check=Q(a.check,R,2,0)),h=0,d=0,a.mode=16182;case 16182:for(;d<32;){if(0===l)break e;l--,h+=i[r++]<>>8&255,R[2]=h>>>16&255,R[3]=h>>>24&255,a.check=Q(a.check,R,4,0)),h=0,d=0,a.mode=16183;case 16183:for(;d<16;){if(0===l)break e;l--,h+=i[r++]<>8),512&a.flags&&4&a.wrap&&(R[0]=255&h,R[1]=h>>>8&255,a.check=Q(a.check,R,2,0)),h=0,d=0,a.mode=16184;case 16184:if(1024&a.flags){for(;d<16;){if(0===l)break e;l--,h+=i[r++]<>>8&255,a.check=Q(a.check,R,2,0)),h=0,d=0}else a.head&&(a.head.extra=null);a.mode=16185;case 16185:if(1024&a.flags&&((f=a.length)>l&&(f=l),f&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(i.subarray(r,r+f),y)),512&a.flags&&4&a.wrap&&(a.check=Q(a.check,i,f,r)),l-=f,r+=f,a.length-=f),a.length))break e;a.length=0,a.mode=16186;case 16186:if(2048&a.flags){if(0===l)break e;f=0;do y=i[r+f++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y));while(y&&f>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=16191;break;case 16189:for(;d<32;){if(0===l)break e;l--,h+=i[r++]<>>=7&d,d-=7&d,a.mode=16206;break}for(;d<3;){if(0===l)break e;l--,h+=i[r++]<>>=1)){case 0:a.mode=16193;break;case 1:if(ey(a),a.mode=16199,e===er){h>>>=2,d-=2;break e}break;case 2:a.mode=16196;break;case 3:t.msg="invalid block type",a.mode=16209}h>>>=2,d-=2;break;case 16193:for(h>>>=7&d,d-=7&d;d<32;){if(0===l)break e;l--,h+=i[r++]<>>16^65535)){t.msg="invalid stored block lengths",a.mode=16209;break}if(a.length=65535&h,h=0,d=0,a.mode=16194,e===er)break e;case 16194:a.mode=16195;case 16195:if(f=a.length){if(f>l&&(f=l),f>o&&(f=o),0===f)break e;n.set(i.subarray(r,r+f),s),l-=f,r+=f,o-=f,s+=f,a.length-=f;break}a.mode=16191;break;case 16196:for(;d<14;){if(0===l)break e;l--,h+=i[r++]<>>=5,d-=5,a.ndist=(31&h)+1,h>>>=5,d-=5,a.ncode=(15&h)+4,h>>>=4,d-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=16209;break}a.have=0,a.mode=16197;case 16197:for(;a.have>>=3,d-=3}for(;a.have<19;)a.lens[U[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,z={bits:a.lenbits},x=ea(0,a.lens,0,19,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg="invalid code lengths set",a.mode=16209;break}a.have=0,a.mode=16198;case 16198:for(;a.have>>24,g=A>>>16&255,b=65535&A,!(m<=d);){if(0===l)break e;l--,h+=i[r++]<>>=m,d-=m,a.lens[a.have++]=b;else{if(16===b){for(E=m+2;d>>=m,d-=m,0===a.have){t.msg="invalid bit length repeat",a.mode=16209;break}y=a.lens[a.have-1],f=3+(3&h),h>>>=2,d-=2}else if(17===b){for(E=m+3;d>>=m,d-=m,y=0,f=3+(7&h),h>>>=3,d-=3}else{for(E=m+7;d>>=m,d-=m,y=0,f=11+(127&h),h>>>=7,d-=7}if(a.have+f>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=16209;break}for(;f--;)a.lens[a.have++]=y}}if(16209===a.mode)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=16209;break}if(a.lenbits=9,z={bits:a.lenbits},x=ea(1,a.lens,0,a.nlen,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg="invalid literal/lengths set",a.mode=16209;break}if(a.distbits=6,a.distcode=a.distdyn,z={bits:a.distbits},x=ea(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,z),a.distbits=z.bits,x){t.msg="invalid distances set",a.mode=16209;break}if(a.mode=16199,e===er)break e;case 16199:a.mode=16200;case 16200:if(l>=6&&o>=258){t.next_out=s,t.avail_out=o,t.next_in=r,t.avail_in=l,a.hold=h,a.bits=d,t4(t,u),s=t.next_out,n=t.output,o=t.avail_out,r=t.next_in,i=t.input,l=t.avail_in,h=a.hold,d=a.bits,16191===a.mode&&(a.back=-1);break}for(a.back=0;m=(A=a.lencode[h&(1<>>24,g=A>>>16&255,b=65535&A,!(m<=d);){if(0===l)break e;l--,h+=i[r++]<>p)])>>>24,g=A>>>16&255,b=65535&A,!(p+m<=d);){if(0===l)break e;l--,h+=i[r++]<>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,a.length=b,0===g){a.mode=16205;break}if(32&g){a.back=-1,a.mode=16191;break}if(64&g){t.msg="invalid literal/length code",a.mode=16209;break}a.extra=15&g,a.mode=16201;case 16201:if(a.extra){for(E=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=16202;case 16202:for(;m=(A=a.distcode[h&(1<>>24,g=A>>>16&255,b=65535&A,!(m<=d);){if(0===l)break e;l--,h+=i[r++]<>p)])>>>24,g=A>>>16&255,b=65535&A,!(p+m<=d);){if(0===l)break e;l--,h+=i[r++]<>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,64&g){t.msg="invalid distance code",a.mode=16209;break}a.offset=b,a.extra=15&g,a.mode=16203;case 16203:if(a.extra){for(E=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=16209;break}a.mode=16204;case 16204:if(0===o)break e;if(f=u-o,a.offset>f){if((f=a.offset-f)>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=16209;break}f>a.wnext?(f-=a.wnext,c=a.wsize-f):c=a.wnext-f,f>a.length&&(f=a.length),w=a.window}else w=n,c=s-a.offset,f=a.length;f>o&&(f=o),o-=f,a.length-=f;do n[s++]=w[c++];while(--f)0===a.length&&(a.mode=16200);break;case 16205:if(0===o)break e;n[s++]=a.length,o--,a.mode=16200;break;case 16206:if(a.wrap){for(;d<32;){if(0===l)break e;l--,h|=i[r++]<{if(em(t))return eh;let e=t.state;return e.window&&(e.window=null),t.state=null,es},inflateGetHeader:(t,e)=>{if(em(t))return eh;let a=t.state;return(2&a.wrap)==0?eh:(a.head=e,e.done=!1,es)},inflateSetDictionary:(t,e)=>{let a;let i=e.length;return em(t)||0!==(a=t.state).wrap&&16190!==a.mode?eh:16190===a.mode&&K(1,e,i,0)!==a.check?ed:ex(t,e,i,i)?(a.mode=16210,e_):(a.havedict=1,es)},inflateInfo:"pako inflate (from Nodeca project)"},eE=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};let eA=Object.prototype.toString,{Z_NO_FLUSH:eR,Z_FINISH:eU,Z_OK:eS,Z_STREAM_END:eZ,Z_NEED_DICT:eD,Z_STREAM_ERROR:eI,Z_DATA_ERROR:eT,Z_MEM_ERROR:eO}=Y;function eL(t){this.options=tj.assign({chunkSize:65536,windowBits:15,to:""},t||{});let e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(t&&t.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(15&e.windowBits)==0&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new tX,this.strm.avail_out=0;let a=ez.inflateInit2(this.strm,e.windowBits);if(a!==eS||(this.header=new eE,ez.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=tG.string2buf(e.dictionary):"[object ArrayBuffer]"===eA.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=ez.inflateSetDictionary(this.strm,e.dictionary))!==eS)))throw Error(P[a])}function eN(t,e){let a=new eL(e);if(a.push(t),a.err)throw a.msg||P[a.err];return a.result}eL.prototype.push=function(t,e){let a,i,n;let r=this.strm,s=this.options.chunkSize,l=this.options.dictionary;if(this.ended)return!1;for(i=e===~~e?e:!0===e?eU:eR,"[object ArrayBuffer]"===eA.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(s),r.next_out=0,r.avail_out=s),(a=ez.inflate(r,i))===eD&&l&&((a=ez.inflateSetDictionary(r,l))===eS?a=ez.inflate(r,i):a===eT&&(a=eD));r.avail_in>0&&a===eZ&&r.state.wrap>0&&0!==t[r.next_in];)ez.inflateReset(r),a=ez.inflate(r,i);switch(a){case eI:case eT:case eD:case eO:return this.onEnd(a),this.ended=!0,!1}if(n=r.avail_out,r.next_out&&(0===r.avail_out||a===eZ)){if("string"===this.options.to){let t=tG.utf8border(r.output,r.next_out),e=r.next_out-t,a=tG.buf2string(r.output,t);r.next_out=e,r.avail_out=s-e,e&&r.output.set(r.output.subarray(t,t+e),0),this.onData(a)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out))}if(a!==eS||0!==n){if(a===eZ)return a=ez.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},eL.prototype.onData=function(t){this.chunks.push(t)},eL.prototype.onEnd=function(t){t===eS&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=tj.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};let{Deflate:eF,deflate:eB,deflateRaw:eC,gzip:eH}={Deflate:t3,deflate:t8,deflateRaw:function(t,e){return(e=e||{}).raw=!0,t8(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,t8(t,e)},constants:Y},{Inflate:eM,inflate:eK,inflateRaw:ej,ungzip:eQ}={Inflate:eL,inflate:eN,inflateRaw:function(t,e){return(e=e||{}).raw=!0,eN(t,e)},ungzip:eN,constants:Y},eP="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var eY={randomUUID:eP};let eG=new Uint8Array(16);function eX(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(eG)}let eV=[];for(let t=0;t<256;++t)eV.push((t+256).toString(16).slice(1));var eq=function(t,e,a){if(eY.randomUUID&&!e&&!t)return eY.randomUUID();t=t||{};let i=t.random||(t.rng||eX)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){a=a||0;for(let t=0;t<16;++t)e[a+t]=i[t];return e}return function(t,e=0){return(eV[t[e+0]]+eV[t[e+1]]+eV[t[e+2]]+eV[t[e+3]]+"-"+eV[t[e+4]]+eV[t[e+5]]+"-"+eV[t[e+6]]+eV[t[e+7]]+"-"+eV[t[e+8]]+eV[t[e+9]]+"-"+eV[t[e+10]]+eV[t[e+11]]+eV[t[e+12]]+eV[t[e+13]]+eV[t[e+14]]+eV[t[e+15]]).toLowerCase()}(i)};let eJ="schematicId";window.Schematic=class{apiKey;eventQueue;constructor(t){this.apiKey=t,this.eventQueue=[]}sendEvent(t){let e=JSON.stringify(t),a=eB(e);if(!a){console.error("Error compressing event data.");return}let i=btoa(String.fromCharCode(...Array.from(a))),n=encodeURIComponent(i),r=`https://api.schematichq.com/e?p=${n}`,s=new XMLHttpRequest;s.open("GET",r),s.send()}flushEventQueue(){for(;this.eventQueue.length>0;){let t=this.eventQueue.shift();t&&this.sendEvent(t)}}storeEvent(t){this.eventQueue.push(t)}clearStoredEvents(){this.eventQueue=[]}handleEvent(t,e){let a={api_key:this.apiKey,body:e,sent_at:new Date().toISOString(),tracker_event_id:eq(),tracker_user_id:this.getAnonymousId(),type:t};document.hidden?this.storeEvent(a):this.sendEvent(a)}getAnonymousId(){let t=localStorage.getItem(eJ);if(t)return t;let e=eq();return localStorage.setItem(eJ,e),e}identify(t){this.handleEvent("identify",t)}track(t){this.handleEvent("track",t)}initialize(){window.addEventListener("beforeunload",()=>{this.flushEventQueue()});let t=localStorage.getItem("eventQueue");t&&(this.eventQueue=JSON.parse(t),this.flushEventQueue(),this.clearStoredEvents())}}})(); \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index 13e1c95a..bf26628c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -141,7 +141,7 @@ class Schematic { return response.json(); }) .then((data) => { - return data.value; + return data.data.value; }) .catch((error) => { console.error("There was a problem with the fetch operation:", error);