"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};function e(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var r=function(){return r=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};function n(t,e,r,n){return new(r||(r=Promise))(function(e,o){function i(t){try{s(n.next(t))}catch(t){o(t)}}function a(t){try{s(n.throw(t))}catch(t){o(t)}}function s(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r(function(t){t(n)})).then(i,a)}s((n=n.apply(t,[])).next())})}function o(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function i(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),o=0;for(e=0;e<r;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n}for(var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=new Uint8Array(256),l=0;l<64;l++)s[a.charCodeAt(l)]=l;var h,u=function(t){for(var e="",r=t.length,n=0;n<r;n+=3)e+=a[t[n]>>2],e+=a[(3&t[n])<<4|t[n+1]>>4],e+=a[(15&t[n+1])<<2|t[n+2]>>6],e+=a[63&t[n+2]];return r%3==2?e=e.substring(0,e.length-1)+"=":r%3==1&&(e=e.substring(0,e.length-2)+"=="),e},c=function(t){var e,r,n,o,i,a=.75*t.length,l=t.length,h=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);var u=new Uint8Array(a);for(e=0;e<l;e+=4)r=s[t.charCodeAt(e)],n=s[t.charCodeAt(e+1)],o=s[t.charCodeAt(e+2)],i=s[t.charCodeAt(e+3)],u[h++]=r<<2|n>>4,u[h++]=(15&n)<<4|o>>2,u[h++]=(3&o)<<6|63&i;return u},d=/^(data)?:?([\w\/\+]+)?;?(charset=[\w-]+|base64)?.*,/i,f=function(t){var e=t.trim(),r=e.substring(0,100).match(d);if(!r)return c(e);var n=r[0],o=e.substring(n.length);return c(o)},p=function(t){return t.charCodeAt(0)},g=function(t){return t.codePointAt(0)},v=function(t,e){return w(t.toString(16),e,"0").toUpperCase()},y=function(t){return v(t,2)},m=function(t){return String.fromCharCode(t)},b=function(t){return m(parseInt(t,16))},w=function(t,e,r){for(var n="",o=0,i=e-t.length;o<i;o++)n+=r;return n+t},x=function(t,e,r){for(var n=t.length,o=0;o<n;o++)e[r++]=t.charCodeAt(o);return n},k=function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},F=function(t){return t.replace(/\t|\u0085|\u2028|\u2029/g,"    ").replace(/[\b\v]/g,"")},S=["\\n","\\f","\\r","\\u000B"],C=function(t){return/^[\n\f\r\u000B]$/.test(t)},A=function(t){return t.split(/[\n\f\r\u000B]/)},T=function(t){return t.replace(/[\n\f\r\u000B]/g," ")},P=function(t,e){var r,n=t.charCodeAt(e),o=e+1,i=1;return n>=55296&&n<=56319&&t.length>o&&(r=t.charCodeAt(o))>=56320&&r<=57343&&(i=2),[t.slice(e,e+i),i]},z=function(t){for(var e=[],r=0,n=t.length;r<n;){var o=P(t,r),i=o[0],a=o[1];e.push(i),r+=a}return e},O=function(t,e,r,n){for(var o=function(t){for(var e=S.join("|"),r=["$"],n=0,o=t.length;n<o;n++){var i=t[n];if(C(i))throw new TypeError("`wordBreak` must not include "+e);r.push(""===i?".":k(i))}var a=r.join("|");return new RegExp("("+e+")|((.*?)("+a+"))","gm")}(e),i=F(t).match(o),a="",s=0,l=[],h=function(){""!==a&&l.push(a),a="",s=0},u=0,c=i.length;u<c;u++){var d=i[u];if(C(d))h();else{var f=n(d);s+f>r&&h(),a+=d,s+=f}}return h(),l},D=/^D:(\d\d\d\d)(\d\d)?(\d\d)?(\d\d)?(\d\d)?(\d\d)?([+\-Z])?(\d\d)?'?(\d\d)?'?$/,R=function(t){var e=t.match(D);if(e){var r=e[1],n=e[2],o=void 0===n?"01":n,i=e[3],a=void 0===i?"01":i,s=e[4],l=void 0===s?"00":s,h=e[5],u=void 0===h?"00":h,c=e[6],d=void 0===c?"00":c,f=e[7],p=void 0===f?"Z":f,g=e[8],v=void 0===g?"00":g,y=e[9];return new Date(r+"-"+o+"-"+a+"T"+l+":"+u+":"+d+("Z"===p?"Z":""+p+v+":"+(void 0===y?"00":y)))}},B=function(t,e){for(var r,n,o=0;o<t.length;){var i=t.substring(o).match(e);if(!i)return{match:n,pos:o};n=i,o+=(null!==(r=i.index)&&void 0!==r?r:0)+i[0].length}return{match:n,pos:o}},N=function(t){return t[t.length-1]},E=function(t){if(t instanceof Uint8Array)return t;for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++)r[n]=t.charCodeAt(n);return r},j=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=t.length,n=[],o=0;o<r;o++){var i=t[o];n[o]=i instanceof Uint8Array?i:E(i)}var a=0;for(o=0;o<r;o++)a+=t[o].length;for(var s=new Uint8Array(a),l=0,h=0;h<r;h++)for(var u=n[h],c=0,d=u.length;c<d;c++)s[l++]=u[c];return s},I=function(t){for(var e=0,r=0,n=t.length;r<n;r++)e+=t[r].length;var o=new Uint8Array(e),i=0;for(r=0,n=t.length;r<n;r++){var a=t[r];o.set(a,i),i+=a.length}return o},M=function(t){for(var e="",r=0,n=t.length;r<n;r++)e+=m(t[r]);return e},U=function(t,e){return t.id-e.id},V=function(t,e){for(var r=[],n=0,o=t.length;n<o;n++){var i=t[n],a=t[n-1];0!==n&&e(i)===e(a)||r.push(i)}return r},W=function(t){for(var e=t.length,r=0,n=Math.floor(e/2);r<n;r++){var o=r,i=e-r-1,a=t[r];t[o]=t[i],t[i]=a}return t},q=function(t){for(var e=0,r=0,n=t.length;r<n;r++)e+=t[r];return e},L=function(t,e){for(var r=new Array(e-t),n=0,o=r.length;n<o;n++)r[n]=t+n;return r},K=function(t,e){for(var r=new Array(e.length),n=0,o=e.length;n<o;n++)r[n]=t[e[n]];return r},G=function(t){return t instanceof Uint8Array||t instanceof ArrayBuffer||"string"==typeof t},H=function(t){if("string"==typeof t)return f(t);if(t instanceof ArrayBuffer)return new Uint8Array(t);if(t instanceof Uint8Array)return t;throw new TypeError("`input` must be one of `string | ArrayBuffer | Uint8Array`")},_=function(){return new Promise(function(t){setTimeout(function(){return t()},0)})},X=function(t,e){void 0===e&&(e=!0);var r=[];e&&r.push(65279);for(var n=0,o=t.length;n<o;){var i=t.codePointAt(n);if(i<65536)r.push(i),n+=1;else{if(!(i<1114112))throw new Error("Invalid code point: 0x"+y(i));r.push(J(i),Q(i)),n+=2}}return new Uint16Array(r)},Z=function(t){return t>=0&&t<=65535},Y=function(t){return t>=65536&&t<=1114111},J=function(t){return Math.floor((t-65536)/1024)+55296},Q=function(t){return(t-65536)%1024+56320};!function(t){t.BigEndian="BigEndian",t.LittleEndian="LittleEndian"}(h||(h={}));var $="�".codePointAt(0),tt=function(t,e){if(void 0===e&&(e=!0),t.length<=1)return String.fromCodePoint($);for(var r=e?ot(t):h.BigEndian,n=e?2:0,o=[];t.length-n>=2;){var i=nt(t[n++],t[n++],r);if(et(i))if(t.length-n<2)o.push($);else{var a=nt(t[n++],t[n++],r);rt(a)?o.push(i,a):o.push($)}else rt(i)?(n+=2,o.push($)):o.push(i)}return n<t.length&&o.push($),String.fromCodePoint.apply(String,o)},et=function(t){return t>=55296&&t<=56319},rt=function(t){return t>=56320&&t<=57343},nt=function(t,e,r){if(r===h.LittleEndian)return e<<8|t;if(r===h.BigEndian)return t<<8|e;throw new Error("Invalid byteOrder: "+r)},ot=function(t){return it(t)?h.BigEndian:at(t)?h.LittleEndian:h.BigEndian},it=function(t){return 254===t[0]&&255===t[1]},at=function(t){return 255===t[0]&&254===t[1]},st=function(t){return it(t)||at(t)},lt=function(t){var e,r=String(t);if(Math.abs(t)<1){if(e=parseInt(t.toString().split("e-")[1])){var n=t<0;n&&(t*=-1),t*=Math.pow(10,e-1),r="0."+new Array(e).join("0")+t.toString().substring(2),n&&(r="-"+r)}}else(e=parseInt(t.toString().split("+")[1]))>20&&(e-=20,r=(t/=Math.pow(10,e)).toString()+new Array(e+1).join("0"));return r},ht=function(t){return Math.ceil(t.toString(2).length/8)},ut=function(t){for(var e=new Uint8Array(ht(t)),r=1;r<=e.length;r++)e[r-1]=t>>8*(e.length-r);return e},ct=function(t){throw new Error(t)};function dt(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},r.exports),r.exports}var ft=dt(function(t,e){var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var o in r)n(r,o)&&(t[o]=r[o])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var o={arraySet:function(t,e,r,n,o){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+n),o);else for(var i=0;i<n;i++)t[o+i]=e[r+i]},flattenChunks:function(t){var e,r,n,o,i,a;for(n=0,e=0,r=t.length;e<r;e++)n+=t[e].length;for(a=new Uint8Array(n),o=0,e=0,r=t.length;e<r;e++)i=t[e],a.set(i,o),o+=i.length;return a}},i={arraySet:function(t,e,r,n,o){for(var i=0;i<n;i++)t[o+i]=e[r+i]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,o)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,i))},e.setTyped(r)});function pt(t){for(var e=t.length;--e>=0;)t[e]=0}var gt=[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],vt=[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],yt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],mt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],bt=new Array(576);pt(bt);var wt=new Array(60);pt(wt);var xt=new Array(512);pt(xt);var kt=new Array(256);pt(kt);var Ft=new Array(29);pt(Ft);var St,Ct,At,Tt=new Array(30);function Pt(t,e,r,n,o){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=t&&t.length}function zt(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function Ot(t){return t<256?xt[t]:xt[256+(t>>>7)]}function Dt(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function Rt(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,Dt(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function Bt(t,e,r){Rt(t,r[2*e],r[2*e+1])}function Nt(t,e){var r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1}function Et(t,e,r){var n,o,i=new Array(16),a=0;for(n=1;n<=15;n++)i[n]=a=a+r[n-1]<<1;for(o=0;o<=e;o++){var s=t[2*o+1];0!==s&&(t[2*o]=Nt(i[s]++,s))}}function jt(t){var 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.last_lit=t.matches=0}function It(t){t.bi_valid>8?Dt(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function Mt(t,e,r,n){var o=2*e,i=2*r;return t[o]<t[i]||t[o]===t[i]&&n[e]<=n[r]}function Ut(t,e,r){for(var n=t.heap[r],o=r<<1;o<=t.heap_len&&(o<t.heap_len&&Mt(e,t.heap[o+1],t.heap[o],t.depth)&&o++,!Mt(e,n,t.heap[o],t.depth));)t.heap[r]=t.heap[o],r=o,o<<=1;t.heap[r]=n}function Vt(t,e,r){var n,o,i,a,s=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*s]<<8|t.pending_buf[t.d_buf+2*s+1],o=t.pending_buf[t.l_buf+s],s++,0===n?Bt(t,o,e):(Bt(t,(i=kt[o])+256+1,e),0!==(a=gt[i])&&Rt(t,o-=Ft[i],a),Bt(t,i=Ot(--n),r),0!==(a=vt[i])&&Rt(t,n-=Tt[i],a))}while(s<t.last_lit);Bt(t,256,e)}function Wt(t,e){var r,n,o,i=e.dyn_tree,a=e.stat_desc.static_tree,s=e.stat_desc.has_stree,l=e.stat_desc.elems,h=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<l;r++)0!==i[2*r]?(t.heap[++t.heap_len]=h=r,t.depth[r]=0):i[2*r+1]=0;for(;t.heap_len<2;)i[2*(o=t.heap[++t.heap_len]=h<2?++h:0)]=1,t.depth[o]=0,t.opt_len--,s&&(t.static_len-=a[2*o+1]);for(e.max_code=h,r=t.heap_len>>1;r>=1;r--)Ut(t,i,r);o=l;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Ut(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,i[2*o]=i[2*r]+i[2*n],t.depth[o]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,i[2*r+1]=i[2*n+1]=o,t.heap[1]=o++,Ut(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,o,i,a,s,l=e.dyn_tree,h=e.max_code,u=e.stat_desc.static_tree,c=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,p=e.stat_desc.max_length,g=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)(i=l[2*l[2*(n=t.heap[r])+1]+1]+1)>p&&(i=p,g++),l[2*n+1]=i,n>h||(t.bl_count[i]++,a=0,n>=f&&(a=d[n-f]),s=l[2*n],t.opt_len+=s*(i+a),c&&(t.static_len+=s*(u[2*n+1]+a)));if(0!==g){do{for(i=p-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[p]--,g-=2}while(g>0);for(i=p;0!==i;i--)for(n=t.bl_count[i];0!==n;)(o=t.heap[--r])>h||(l[2*o+1]!==i&&(t.opt_len+=(i-l[2*o+1])*l[2*o],l[2*o+1]=i),n--)}}(t,e),Et(i,h,t.bl_count)}function qt(t,e,r){var n,o,i=-1,a=e[1],s=0,l=7,h=4;for(0===a&&(l=138,h=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)o=a,a=e[2*(n+1)+1],++s<l&&o===a||(s<h?t.bl_tree[2*o]+=s:0!==o?(o!==i&&t.bl_tree[2*o]++,t.bl_tree[32]++):s<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=0,i=o,0===a?(l=138,h=3):o===a?(l=6,h=3):(l=7,h=4))}function Lt(t,e,r){var n,o,i=-1,a=e[1],s=0,l=7,h=4;for(0===a&&(l=138,h=3),n=0;n<=r;n++)if(o=a,a=e[2*(n+1)+1],!(++s<l&&o===a)){if(s<h)do{Bt(t,o,t.bl_tree)}while(0!==--s);else 0!==o?(o!==i&&(Bt(t,o,t.bl_tree),s--),Bt(t,16,t.bl_tree),Rt(t,s-3,2)):s<=10?(Bt(t,17,t.bl_tree),Rt(t,s-3,3)):(Bt(t,18,t.bl_tree),Rt(t,s-11,7));s=0,i=o,0===a?(l=138,h=3):o===a?(l=6,h=3):(l=7,h=4)}}pt(Tt);var Kt=!1;function Gt(t,e,r,n){Rt(t,0+(n?1:0),3),function(t,e,r){It(t),Dt(t,r),Dt(t,~r),ft.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}(t,e,r)}var Ht,_t={_tr_init:function(t){Kt||(function(){var t,e,r,n,o,i=new Array(16);for(r=0,n=0;n<28;n++)for(Ft[n]=r,t=0;t<1<<gt[n];t++)kt[r++]=n;for(kt[r-1]=n,o=0,n=0;n<16;n++)for(Tt[n]=o,t=0;t<1<<vt[n];t++)xt[o++]=n;for(o>>=7;n<30;n++)for(Tt[n]=o<<7,t=0;t<1<<vt[n]-7;t++)xt[256+o++]=n;for(e=0;e<=15;e++)i[e]=0;for(t=0;t<=143;)bt[2*t+1]=8,t++,i[8]++;for(;t<=255;)bt[2*t+1]=9,t++,i[9]++;for(;t<=279;)bt[2*t+1]=7,t++,i[7]++;for(;t<=287;)bt[2*t+1]=8,t++,i[8]++;for(Et(bt,287,i),t=0;t<30;t++)wt[2*t+1]=5,wt[2*t]=Nt(t,5);St=new Pt(bt,gt,257,286,15),Ct=new Pt(wt,vt,0,30,15),At=new Pt(new Array(0),yt,0,19,7)}(),Kt=!0),t.l_desc=new zt(t.dyn_ltree,St),t.d_desc=new zt(t.dyn_dtree,Ct),t.bl_desc=new zt(t.bl_tree,At),t.bi_buf=0,t.bi_valid=0,jt(t)},_tr_stored_block:Gt,_tr_flush_block:function(t,e,r,n){var o,i,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&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}(t)),Wt(t,t.l_desc),Wt(t,t.d_desc),a=function(t){var e;for(qt(t,t.dyn_ltree,t.l_desc.max_code),qt(t,t.dyn_dtree,t.d_desc.max_code),Wt(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*mt[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),o=t.opt_len+3+7>>>3,(i=t.static_len+3+7>>>3)<=o&&(o=i)):o=i=r+5,r+4<=o&&-1!==e?Gt(t,e,r,n):4===t.strategy||i===o?(Rt(t,2+(n?1:0),3),Vt(t,bt,wt)):(Rt(t,4+(n?1:0),3),function(t,e,r,n){var o;for(Rt(t,e-257,5),Rt(t,r-1,5),Rt(t,n-4,4),o=0;o<n;o++)Rt(t,t.bl_tree[2*mt[o]+1],3);Lt(t,t.dyn_ltree,e-1),Lt(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),Vt(t,t.dyn_ltree,t.dyn_dtree)),jt(t),n&&It(t)},_tr_tally:function(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(kt[r]+256+1)]++,t.dyn_dtree[2*Ot(e)]++),t.last_lit===t.lit_bufsize-1},_tr_align:function(t){Rt(t,2,3),Bt(t,256,bt),function(t){16===t.bi_valid?(Dt(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)}(t)}},Xt=function(t,e,r,n){for(var o=65535&t,i=t>>>16&65535,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{i=i+(o=o+e[n++]|0)|0}while(--a);o%=65521,i%=65521}return o|i<<16},Zt=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}(),Yt=function(t,e,r,n){var o=Zt,i=n+r;t^=-1;for(var a=n;a<i;a++)t=t>>>8^o[255&(t^e[a])];return-1^t},Jt={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"},Qt=-2,$t=258,te=262,ee=103,re=113,ne=666;function oe(t,e){return t.msg=Jt[e],e}function ie(t){return(t<<1)-(t>4?9:0)}function ae(t){for(var e=t.length;--e>=0;)t[e]=0}function se(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(ft.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function le(t,e){_t._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,se(t.strm)}function he(t,e){t.pending_buf[t.pending++]=e}function ue(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function ce(t,e,r,n){var o=t.avail_in;return o>n&&(o=n),0===o?0:(t.avail_in-=o,ft.arraySet(e,t.input,t.next_in,o,r),1===t.state.wrap?t.adler=Xt(t.adler,e,o,r):2===t.state.wrap&&(t.adler=Yt(t.adler,e,o,r)),t.next_in+=o,t.total_in+=o,o)}function de(t,e){var r,n,o=t.max_chain_length,i=t.strstart,a=t.prev_length,s=t.nice_match,l=t.strstart>t.w_size-te?t.strstart-(t.w_size-te):0,h=t.window,u=t.w_mask,c=t.prev,d=t.strstart+$t,f=h[i+a-1],p=h[i+a];t.prev_length>=t.good_match&&(o>>=2),s>t.lookahead&&(s=t.lookahead);do{if(h[(r=e)+a]===p&&h[r+a-1]===f&&h[r]===h[i]&&h[++r]===h[i+1]){i+=2,r++;do{}while(h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&i<d);if(n=$t-(d-i),i=d-$t,n>a){if(t.match_start=e,a=n,n>=s)break;f=h[i+a-1],p=h[i+a]}}}while((e=c[e&u])>l&&0!==--o);return a<=t.lookahead?a:t.lookahead}function fe(t){var e,r,n,o,i,a=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=a+(a-te)){ft.arraySet(t.window,t.window,a,a,0),t.match_start-=a,t.strstart-=a,t.block_start-=a,e=r=t.hash_size;do{n=t.head[--e],t.head[e]=n>=a?n-a:0}while(--r);e=r=a;do{n=t.prev[--e],t.prev[e]=n>=a?n-a:0}while(--r);o+=a}if(0===t.strm.avail_in)break;if(r=ce(t.strm,t.window,t.strstart+t.lookahead,o),t.lookahead+=r,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=(t.ins_h<<t.hash_shift^t.window[i+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[i+3-1])&t.hash_mask,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<te&&0!==t.strm.avail_in)}function pe(t,e){for(var r,n;;){if(t.lookahead<te){if(fe(t),t.lookahead<te&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-te&&(t.match_length=de(t,r)),t.match_length>=3)if(n=_t._tr_tally(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=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=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=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=_t._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(le(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(le(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(le(t,!1),0===t.strm.avail_out)?1:2}function ge(t,e){for(var r,n,o;;){if(t.lookahead<te){if(fe(t),t.lookahead<te&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=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!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-te&&(t.match_length=de(t,r),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){o=t.strstart+t.lookahead-3,n=_t._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=o&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=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++,n&&(le(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=_t._tr_tally(t,0,t.window[t.strstart-1]))&&le(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&&(n=_t._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(le(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(le(t,!1),0===t.strm.avail_out)?1:2}function ve(t,e,r,n,o){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=o}function ye(){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=8,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 ft.Buf16(1146),this.dyn_dtree=new ft.Buf16(122),this.bl_tree=new ft.Buf16(78),ae(this.dyn_ltree),ae(this.dyn_dtree),ae(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new ft.Buf16(16),this.heap=new ft.Buf16(573),ae(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new ft.Buf16(573),ae(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function me(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:re,t.adler=2===e.wrap?0:1,e.last_flush=0,_t._tr_init(e),0):oe(t,Qt)}function be(t){var e,r=me(t);return 0===r&&((e=t.state).window_size=2*e.w_size,ae(e.head),e.max_lazy_match=Ht[e.level].max_lazy,e.good_match=Ht[e.level].good_length,e.nice_match=Ht[e.level].nice_length,e.max_chain_length=Ht[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),r}function we(t,e,r,n,o,i){if(!t)return Qt;var a=1;if(-1===e&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),o<1||o>9||8!==r||n<8||n>15||e<0||e>9||i<0||i>4)return oe(t,Qt);8===n&&(n=9);var s=new ye;return t.state=s,s.strm=t,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=o+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new ft.Buf8(2*s.w_size),s.head=new ft.Buf16(s.hash_size),s.prev=new ft.Buf16(s.w_size),s.lit_bufsize=1<<o+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new ft.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=e,s.strategy=i,s.method=r,be(t)}Ht=[new ve(0,0,0,0,function(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(fe(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,le(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-te&&(le(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(le(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(le(t,!1),t.strm.avail_out),1)}),new ve(4,4,8,4,pe),new ve(4,5,16,8,pe),new ve(4,6,32,32,pe),new ve(4,4,16,16,ge),new ve(8,16,32,32,ge),new ve(8,16,128,128,ge),new ve(8,32,128,256,ge),new ve(32,128,258,1024,ge),new ve(32,258,258,4096,ge)];var xe={deflateInit:function(t,e){return we(t,e,8,15,8,0)},deflateInit2:we,deflateReset:be,deflateResetKeep:me,deflateSetHeader:function(t,e){return t&&t.state?2!==t.state.wrap?Qt:(t.state.gzhead=e,0):Qt},deflate:function(t,e){var r,n,o,i;if(!t||!t.state||e>5||e<0)return t?oe(t,Qt):Qt;if(n=t.state,!t.output||!t.input&&0!==t.avail_in||n.status===ne&&4!==e)return oe(t,0===t.avail_out?-5:Qt);if(n.strm=t,r=n.last_flush,n.last_flush=e,42===n.status)if(2===n.wrap)t.adler=0,he(n,31),he(n,139),he(n,8),n.gzhead?(he(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),he(n,255&n.gzhead.time),he(n,n.gzhead.time>>8&255),he(n,n.gzhead.time>>16&255),he(n,n.gzhead.time>>24&255),he(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),he(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(he(n,255&n.gzhead.extra.length),he(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=Yt(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(he(n,0),he(n,0),he(n,0),he(n,0),he(n,0),he(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),he(n,3),n.status=re);else{var a=8+(n.w_bits-8<<4)<<8;a|=(n.strategy>=2||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(a|=32),a+=31-a%31,n.status=re,ue(n,a),0!==n.strstart&&(ue(n,t.adler>>>16),ue(n,65535&t.adler)),t.adler=1}if(69===n.status)if(n.gzhead.extra){for(o=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>o&&(t.adler=Yt(t.adler,n.pending_buf,n.pending-o,o)),se(t),o=n.pending,n.pending!==n.pending_buf_size));)he(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>o&&(t.adler=Yt(t.adler,n.pending_buf,n.pending-o,o)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(t.adler=Yt(t.adler,n.pending_buf,n.pending-o,o)),se(t),o=n.pending,n.pending===n.pending_buf_size)){i=1;break}i=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,he(n,i)}while(0!==i);n.gzhead.hcrc&&n.pending>o&&(t.adler=Yt(t.adler,n.pending_buf,n.pending-o,o)),0===i&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(t.adler=Yt(t.adler,n.pending_buf,n.pending-o,o)),se(t),o=n.pending,n.pending===n.pending_buf_size)){i=1;break}i=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,he(n,i)}while(0!==i);n.gzhead.hcrc&&n.pending>o&&(t.adler=Yt(t.adler,n.pending_buf,n.pending-o,o)),0===i&&(n.status=ee)}else n.status=ee;if(n.status===ee&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&se(t),n.pending+2<=n.pending_buf_size&&(he(n,255&t.adler),he(n,t.adler>>8&255),t.adler=0,n.status=re)):n.status=re),0!==n.pending){if(se(t),0===t.avail_out)return n.last_flush=-1,0}else if(0===t.avail_in&&ie(e)<=ie(r)&&4!==e)return oe(t,-5);if(n.status===ne&&0!==t.avail_in)return oe(t,-5);if(0!==t.avail_in||0!==n.lookahead||0!==e&&n.status!==ne){var s=2===n.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(fe(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=_t._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(le(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(le(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(le(t,!1),0===t.strm.avail_out)?1:2}(n,e):3===n.strategy?function(t,e){for(var r,n,o,i,a=t.window;;){if(t.lookahead<=$t){if(fe(t),t.lookahead<=$t&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=a[o=t.strstart-1])===a[++o]&&n===a[++o]&&n===a[++o]){i=t.strstart+$t;do{}while(n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&o<i);t.match_length=$t-(i-o),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=_t._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=_t._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(le(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(le(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(le(t,!1),0===t.strm.avail_out)?1:2}(n,e):Ht[n.level].func(n,e);if(3!==s&&4!==s||(n.status=ne),1===s||3===s)return 0===t.avail_out&&(n.last_flush=-1),0;if(2===s&&(1===e?_t._tr_align(n):5!==e&&(_t._tr_stored_block(n,0,0,!1),3===e&&(ae(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),se(t),0===t.avail_out))return n.last_flush=-1,0}return 4!==e?0:n.wrap<=0?1:(2===n.wrap?(he(n,255&t.adler),he(n,t.adler>>8&255),he(n,t.adler>>16&255),he(n,t.adler>>24&255),he(n,255&t.total_in),he(n,t.total_in>>8&255),he(n,t.total_in>>16&255),he(n,t.total_in>>24&255)):(ue(n,t.adler>>>16),ue(n,65535&t.adler)),se(t),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?0:1)},deflateEnd:function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&e!==ee&&e!==re&&e!==ne?oe(t,Qt):(t.state=null,e===re?oe(t,-3):0):Qt},deflateSetDictionary:function(t,e){var r,n,o,i,a,s,l,h,u=e.length;if(!t||!t.state)return Qt;if(2===(i=(r=t.state).wrap)||1===i&&42!==r.status||r.lookahead)return Qt;for(1===i&&(t.adler=Xt(t.adler,e,u,0)),r.wrap=0,u>=r.w_size&&(0===i&&(ae(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new ft.Buf8(r.w_size),ft.arraySet(h,e,u-r.w_size,r.w_size,0),e=h,u=r.w_size),a=t.avail_in,s=t.next_in,l=t.input,t.avail_in=u,t.next_in=0,t.input=e,fe(r);r.lookahead>=3;){n=r.strstart,o=r.lookahead-2;do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--o);r.strstart=n,r.lookahead=2,fe(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,t.next_in=s,t.input=l,t.avail_in=a,r.wrap=i,0},deflateInfo:"pako deflate (from Nodeca project)"},ke=!0,Fe=!0;try{String.fromCharCode.apply(null,[0])}catch(t){ke=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Fe=!1}for(var Se=new ft.Buf8(256),Ce=0;Ce<256;Ce++)Se[Ce]=Ce>=252?6:Ce>=248?5:Ce>=240?4:Ce>=224?3:Ce>=192?2:1;function Ae(t,e){if(e<65534&&(t.subarray&&Fe||!t.subarray&&ke))return String.fromCharCode.apply(null,ft.shrinkBuf(t,e));for(var r="",n=0;n<e;n++)r+=String.fromCharCode(t[n]);return r}Se[254]=Se[254]=1;var Te=function(t){var e,r,n,o,i,a=t.length,s=0;for(o=0;o<a;o++)55296==(64512&(r=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(n=t.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),s+=r<128?1:r<2048?2:r<65536?3:4;for(e=new ft.Buf8(s),i=0,o=0;i<s;o++)55296==(64512&(r=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(n=t.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),r<128?e[i++]=r:r<2048?(e[i++]=192|r>>>6,e[i++]=128|63&r):r<65536?(e[i++]=224|r>>>12,e[i++]=128|r>>>6&63,e[i++]=128|63&r):(e[i++]=240|r>>>18,e[i++]=128|r>>>12&63,e[i++]=128|r>>>6&63,e[i++]=128|63&r);return e},Pe=function(t){return Ae(t,t.length)},ze=function(t,e){var r,n,o,i,a=e||t.length,s=new Array(2*a);for(n=0,r=0;r<a;)if((o=t[r++])<128)s[n++]=o;else if((i=Se[o])>4)s[n++]=65533,r+=i-1;else{for(o&=2===i?31:3===i?15:7;i>1&&r<a;)o=o<<6|63&t[r++],i--;i>1?s[n++]=65533:o<65536?s[n++]=o:(o-=65536,s[n++]=55296|o>>10&1023,s[n++]=56320|1023&o)}return Ae(s,n)},Oe=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+Se[t[r]]>e?r:e},De=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},Re=Object.prototype.toString;function Be(t){if(!(this instanceof Be))return new Be(t);this.options=ft.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var 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 De,this.strm.avail_out=0;var r=xe.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==r)throw new Error(Jt[r]);if(e.header&&xe.deflateSetHeader(this.strm,e.header),e.dictionary){var n;if(n="string"==typeof e.dictionary?Te(e.dictionary):"[object ArrayBuffer]"===Re.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(r=xe.deflateSetDictionary(this.strm,n)))throw new Error(Jt[r]);this._dict_set=!0}}function Ne(t,e){var r=new Be(e);if(r.push(t,!0),r.err)throw r.msg||Jt[r.err];return r.result}Be.prototype.push=function(t,e){var r,n,o=this.strm,i=this.options.chunkSize;if(this.ended)return!1;n=e===~~e?e:!0===e?4:0,"string"==typeof t?o.input=Te(t):"[object ArrayBuffer]"===Re.call(t)?o.input=new Uint8Array(t):o.input=t,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new ft.Buf8(i),o.next_out=0,o.avail_out=i),1!==(r=xe.deflate(o,n))&&0!==r)return this.onEnd(r),this.ended=!0,!1;0!==o.avail_out&&(0!==o.avail_in||4!==n&&2!==n)||("string"===this.options.to?this.onData(Pe(ft.shrinkBuf(o.output,o.next_out))):this.onData(ft.shrinkBuf(o.output,o.next_out)))}while((o.avail_in>0||0===o.avail_out)&&1!==r);return 4===n?(r=xe.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==n||(this.onEnd(0),o.avail_out=0,!0)},Be.prototype.onData=function(t){this.chunks.push(t)},Be.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=ft.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Ee={Deflate:Be,deflate:Ne,deflateRaw:function(t,e){return(e=e||{}).raw=!0,Ne(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,Ne(t,e)}},je=function(t,e){var r,n,o,i,a,s,l,h,u,c,d,f,p,g,v,y,m,b,w,x,k,F,S,C,A;r=t.state,n=t.next_in,C=t.input,o=n+(t.avail_in-5),i=t.next_out,A=t.output,a=i-(e-t.avail_out),s=i+(t.avail_out-257),l=r.dmax,h=r.wsize,u=r.whave,c=r.wnext,d=r.window,f=r.hold,p=r.bits,g=r.lencode,v=r.distcode,y=(1<<r.lenbits)-1,m=(1<<r.distbits)-1;t:do{p<15&&(f+=C[n++]<<p,p+=8,f+=C[n++]<<p,p+=8),b=g[f&y];e:for(;;){if(f>>>=w=b>>>24,p-=w,0==(w=b>>>16&255))A[i++]=65535&b;else{if(!(16&w)){if(64&w){if(32&w){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}b=g[(65535&b)+(f&(1<<w)-1)];continue e}for(x=65535&b,(w&=15)&&(p<w&&(f+=C[n++]<<p,p+=8),x+=f&(1<<w)-1,f>>>=w,p-=w),p<15&&(f+=C[n++]<<p,p+=8,f+=C[n++]<<p,p+=8),b=v[f&m];;){if(f>>>=w=b>>>24,p-=w,16&(w=b>>>16&255)){if(k=65535&b,p<(w&=15)&&(f+=C[n++]<<p,(p+=8)<w&&(f+=C[n++]<<p,p+=8)),(k+=f&(1<<w)-1)>l){t.msg="invalid distance too far back",r.mode=30;break t}if(f>>>=w,p-=w,k>(w=i-a)){if((w=k-w)>u&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(F=0,S=d,0===c){if(F+=h-w,w<x){x-=w;do{A[i++]=d[F++]}while(--w);F=i-k,S=A}}else if(c<w){if(F+=h+c-w,(w-=c)<x){x-=w;do{A[i++]=d[F++]}while(--w);if(F=0,c<x){x-=w=c;do{A[i++]=d[F++]}while(--w);F=i-k,S=A}}}else if(F+=c-w,w<x){x-=w;do{A[i++]=d[F++]}while(--w);F=i-k,S=A}for(;x>2;)A[i++]=S[F++],A[i++]=S[F++],A[i++]=S[F++],x-=3;x&&(A[i++]=S[F++],x>1&&(A[i++]=S[F++]))}else{F=i-k;do{A[i++]=A[F++],A[i++]=A[F++],A[i++]=A[F++],x-=3}while(x>2);x&&(A[i++]=A[F++],x>1&&(A[i++]=A[F++]))}break}if(64&w){t.msg="invalid distance code",r.mode=30;break t}b=v[(65535&b)+(f&(1<<w)-1)]}}break}}while(n<o&&i<s);n-=x=p>>3,f&=(1<<(p-=x<<3))-1,t.next_in=n,t.next_out=i,t.avail_in=n<o?o-n+5:5-(n-o),t.avail_out=i<s?s-i+257:257-(i-s),r.hold=f,r.bits=p},Ie=[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],Me=[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],Ue=[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],Ve=[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],We=function(t,e,r,n,o,i,a,s){var l,h,u,c,d,f,p,g,v,y=s.bits,m=0,b=0,w=0,x=0,k=0,F=0,S=0,C=0,A=0,T=0,P=null,z=0,O=new ft.Buf16(16),D=new ft.Buf16(16),R=null,B=0;for(m=0;m<=15;m++)O[m]=0;for(b=0;b<n;b++)O[e[r+b]]++;for(k=y,x=15;x>=1&&0===O[x];x--);if(k>x&&(k=x),0===x)return o[i++]=20971520,o[i++]=20971520,s.bits=1,0;for(w=1;w<x&&0===O[w];w++);for(k<w&&(k=w),C=1,m=1;m<=15;m++)if(C<<=1,(C-=O[m])<0)return-1;if(C>0&&(0===t||1!==x))return-1;for(D[1]=0,m=1;m<15;m++)D[m+1]=D[m]+O[m];for(b=0;b<n;b++)0!==e[r+b]&&(a[D[e[r+b]]++]=b);if(0===t?(P=R=a,f=19):1===t?(P=Ie,z-=257,R=Me,B-=257,f=256):(P=Ue,R=Ve,f=-1),T=0,b=0,m=w,d=i,F=k,S=0,u=-1,c=(A=1<<k)-1,1===t&&A>852||2===t&&A>592)return 1;for(;;){p=m-S,a[b]<f?(g=0,v=a[b]):a[b]>f?(g=R[B+a[b]],v=P[z+a[b]]):(g=96,v=0),l=1<<m-S,w=h=1<<F;do{o[d+(T>>S)+(h-=l)]=p<<24|g<<16|v}while(0!==h);for(l=1<<m-1;T&l;)l>>=1;if(0!==l?(T&=l-1,T+=l):T=0,b++,0===--O[m]){if(m===x)break;m=e[r+a[b]]}if(m>k&&(T&c)!==u){for(0===S&&(S=k),d+=w,C=1<<(F=m-S);F+S<x&&!((C-=O[F+S])<=0);)F++,C<<=1;if(A+=1<<F,1===t&&A>852||2===t&&A>592)return 1;o[u=T&c]=k<<24|F<<16|d-i}}return 0!==T&&(o[d+T]=m-S<<24|64<<16),s.bits=k,0},qe=-2,Le=12,Ke=30;function Ge(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function He(){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 ft.Buf16(320),this.work=new ft.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _e(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new ft.Buf32(852),e.distcode=e.distdyn=new ft.Buf32(592),e.sane=1,e.back=-1,0):qe}function Xe(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,_e(t)):qe}function Ze(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?qe:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,Xe(t))):qe}function Ye(t,e){var r,n;return t?(n=new He,t.state=n,n.window=null,0!==(r=Ze(t,e))&&(t.state=null),r):qe}var Je,Qe,$e=!0;function tr(t){if($e){var e;for(Je=new ft.Buf32(512),Qe=new ft.Buf32(32),e=0;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(We(1,t.lens,0,288,Je,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;We(2,t.lens,0,32,Qe,0,t.work,{bits:5}),$e=!1}t.lencode=Je,t.lenbits=9,t.distcode=Qe,t.distbits=5}function er(t,e,r,n){var o,i=t.state;return null===i.window&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new ft.Buf8(i.wsize)),n>=i.wsize?(ft.arraySet(i.window,e,r-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize):((o=i.wsize-i.wnext)>n&&(o=n),ft.arraySet(i.window,e,r-n,o,i.wnext),(n-=o)?(ft.arraySet(i.window,e,r-n,n,0),i.wnext=n,i.whave=i.wsize):(i.wnext+=o,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=o))),0}var rr={inflateReset:Xe,inflateReset2:Ze,inflateResetKeep:_e,inflateInit:function(t){return Ye(t,15)},inflateInit2:Ye,inflate:function(t,e){var r,n,o,i,a,s,l,h,u,c,d,f,p,g,v,y,m,b,w,x,k,F,S,C,A=0,T=new ft.Buf8(4),P=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return qe;(r=t.state).mode===Le&&(r.mode=13),a=t.next_out,o=t.output,l=t.avail_out,i=t.next_in,n=t.input,s=t.avail_in,h=r.hold,u=r.bits,c=s,d=l,F=0;t:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;u<16;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(2&r.wrap&&35615===h){r.check=0,T[0]=255&h,T[1]=h>>>8&255,r.check=Yt(r.check,T,2,0),h=0,u=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",r.mode=Ke;break}if(8!=(15&h)){t.msg="unknown compression method",r.mode=Ke;break}if(u-=4,k=8+(15&(h>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){t.msg="invalid window size",r.mode=Ke;break}r.dmax=1<<k,t.adler=r.check=1,r.mode=512&h?10:Le,h=0,u=0;break;case 2:for(;u<16;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(r.flags=h,8!=(255&r.flags)){t.msg="unknown compression method",r.mode=Ke;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=Ke;break}r.head&&(r.head.text=h>>8&1),512&r.flags&&(T[0]=255&h,T[1]=h>>>8&255,r.check=Yt(r.check,T,2,0)),h=0,u=0,r.mode=3;case 3:for(;u<32;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}r.head&&(r.head.time=h),512&r.flags&&(T[0]=255&h,T[1]=h>>>8&255,T[2]=h>>>16&255,T[3]=h>>>24&255,r.check=Yt(r.check,T,4,0)),h=0,u=0,r.mode=4;case 4:for(;u<16;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}r.head&&(r.head.xflags=255&h,r.head.os=h>>8),512&r.flags&&(T[0]=255&h,T[1]=h>>>8&255,r.check=Yt(r.check,T,2,0)),h=0,u=0,r.mode=5;case 5:if(1024&r.flags){for(;u<16;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}r.length=h,r.head&&(r.head.extra_len=h),512&r.flags&&(T[0]=255&h,T[1]=h>>>8&255,r.check=Yt(r.check,T,2,0)),h=0,u=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((f=r.length)>s&&(f=s),f&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),ft.arraySet(r.head.extra,n,i,f,k)),512&r.flags&&(r.check=Yt(r.check,n,f,i)),s-=f,i+=f,r.length-=f),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===s)break t;f=0;do{k=n[i+f++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k))}while(k&&f<s);if(512&r.flags&&(r.check=Yt(r.check,n,f,i)),s-=f,i+=f,k)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===s)break t;f=0;do{k=n[i+f++],r.head&&k&&r.length<65536&&(r.head.comment+=String.fromCharCode(k))}while(k&&f<s);if(512&r.flags&&(r.check=Yt(r.check,n,f,i)),s-=f,i+=f,k)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;u<16;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(h!==(65535&r.check)){t.msg="header crc mismatch",r.mode=Ke;break}h=0,u=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=Le;break;case 10:for(;u<32;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}t.adler=r.check=Ge(h),h=0,u=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=a,t.avail_out=l,t.next_in=i,t.avail_in=s,r.hold=h,r.bits=u,2;t.adler=r.check=1,r.mode=Le;case Le:if(5===e||6===e)break t;case 13:if(r.last){h>>>=7&u,u-=7&u,r.mode=27;break}for(;u<3;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}switch(r.last=1&h,u-=1,3&(h>>>=1)){case 0:r.mode=14;break;case 1:if(tr(r),r.mode=20,6===e){h>>>=2,u-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=Ke}h>>>=2,u-=2;break;case 14:for(h>>>=7&u,u-=7&u;u<32;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if((65535&h)!=(h>>>16^65535)){t.msg="invalid stored block lengths",r.mode=Ke;break}if(r.length=65535&h,h=0,u=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(f=r.length){if(f>s&&(f=s),f>l&&(f=l),0===f)break t;ft.arraySet(o,n,i,f,a),s-=f,i+=f,l-=f,a+=f,r.length-=f;break}r.mode=Le;break;case 17:for(;u<14;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(r.nlen=257+(31&h),h>>>=5,u-=5,r.ndist=1+(31&h),h>>>=5,u-=5,r.ncode=4+(15&h),h>>>=4,u-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=Ke;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;u<3;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}r.lens[P[r.have++]]=7&h,h>>>=3,u-=3}for(;r.have<19;)r.lens[P[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,S={bits:r.lenbits},F=We(0,r.lens,0,19,r.lencode,0,r.work,S),r.lenbits=S.bits,F){t.msg="invalid code lengths set",r.mode=Ke;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;y=(A=r.lencode[h&(1<<r.lenbits)-1])>>>16&255,m=65535&A,!((v=A>>>24)<=u);){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(m<16)h>>>=v,u-=v,r.lens[r.have++]=m;else{if(16===m){for(C=v+2;u<C;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(h>>>=v,u-=v,0===r.have){t.msg="invalid bit length repeat",r.mode=Ke;break}k=r.lens[r.have-1],f=3+(3&h),h>>>=2,u-=2}else if(17===m){for(C=v+3;u<C;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}u-=v,k=0,f=3+(7&(h>>>=v)),h>>>=3,u-=3}else{for(C=v+7;u<C;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}u-=v,k=0,f=11+(127&(h>>>=v)),h>>>=7,u-=7}if(r.have+f>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=Ke;break}for(;f--;)r.lens[r.have++]=k}}if(r.mode===Ke)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=Ke;break}if(r.lenbits=9,S={bits:r.lenbits},F=We(1,r.lens,0,r.nlen,r.lencode,0,r.work,S),r.lenbits=S.bits,F){t.msg="invalid literal/lengths set",r.mode=Ke;break}if(r.distbits=6,r.distcode=r.distdyn,S={bits:r.distbits},F=We(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,S),r.distbits=S.bits,F){t.msg="invalid distances set",r.mode=Ke;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(s>=6&&l>=258){t.next_out=a,t.avail_out=l,t.next_in=i,t.avail_in=s,r.hold=h,r.bits=u,je(t,d),a=t.next_out,o=t.output,l=t.avail_out,i=t.next_in,n=t.input,s=t.avail_in,h=r.hold,u=r.bits,r.mode===Le&&(r.back=-1);break}for(r.back=0;y=(A=r.lencode[h&(1<<r.lenbits)-1])>>>16&255,m=65535&A,!((v=A>>>24)<=u);){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(y&&!(240&y)){for(b=v,w=y,x=m;y=(A=r.lencode[x+((h&(1<<b+w)-1)>>b)])>>>16&255,m=65535&A,!(b+(v=A>>>24)<=u);){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}h>>>=b,u-=b,r.back+=b}if(h>>>=v,u-=v,r.back+=v,r.length=m,0===y){r.mode=26;break}if(32&y){r.back=-1,r.mode=Le;break}if(64&y){t.msg="invalid literal/length code",r.mode=Ke;break}r.extra=15&y,r.mode=22;case 22:if(r.extra){for(C=r.extra;u<C;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}r.length+=h&(1<<r.extra)-1,h>>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;y=(A=r.distcode[h&(1<<r.distbits)-1])>>>16&255,m=65535&A,!((v=A>>>24)<=u);){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(!(240&y)){for(b=v,w=y,x=m;y=(A=r.distcode[x+((h&(1<<b+w)-1)>>b)])>>>16&255,m=65535&A,!(b+(v=A>>>24)<=u);){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}h>>>=b,u-=b,r.back+=b}if(h>>>=v,u-=v,r.back+=v,64&y){t.msg="invalid distance code",r.mode=Ke;break}r.offset=m,r.extra=15&y,r.mode=24;case 24:if(r.extra){for(C=r.extra;u<C;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}r.offset+=h&(1<<r.extra)-1,h>>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=Ke;break}r.mode=25;case 25:if(0===l)break t;if(f=d-l,r.offset>f){if((f=r.offset-f)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=Ke;break}f>r.wnext?(f-=r.wnext,p=r.wsize-f):p=r.wnext-f,f>r.length&&(f=r.length),g=r.window}else g=o,p=a-r.offset,f=r.length;f>l&&(f=l),l-=f,r.length-=f;do{o[a++]=g[p++]}while(--f);0===r.length&&(r.mode=21);break;case 26:if(0===l)break t;o[a++]=r.length,l--,r.mode=21;break;case 27:if(r.wrap){for(;u<32;){if(0===s)break t;s--,h|=n[i++]<<u,u+=8}if(d-=l,t.total_out+=d,r.total+=d,d&&(t.adler=r.check=r.flags?Yt(r.check,o,d,a-d):Xt(r.check,o,d,a-d)),d=l,(r.flags?h:Ge(h))!==r.check){t.msg="incorrect data check",r.mode=Ke;break}h=0,u=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;u<32;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(h!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=Ke;break}h=0,u=0}r.mode=29;case 29:F=1;break t;case Ke:F=-3;break t;case 31:return-4;default:return qe}return t.next_out=a,t.avail_out=l,t.next_in=i,t.avail_in=s,r.hold=h,r.bits=u,(r.wsize||d!==t.avail_out&&r.mode<Ke&&(r.mode<27||4!==e))&&er(t,t.output,t.next_out,d-t.avail_out),c-=t.avail_in,d-=t.avail_out,t.total_in+=c,t.total_out+=d,r.total+=d,r.wrap&&d&&(t.adler=r.check=r.flags?Yt(r.check,o,d,t.next_out-d):Xt(r.check,o,d,t.next_out-d)),t.data_type=r.bits+(r.last?64:0)+(r.mode===Le?128:0)+(20===r.mode||15===r.mode?256:0),(0===c&&0===d||4===e)&&0===F&&(F=-5),F},inflateEnd:function(t){if(!t||!t.state)return qe;var e=t.state;return e.window&&(e.window=null),t.state=null,0},inflateGetHeader:function(t,e){var r;return t&&t.state&&2&(r=t.state).wrap?(r.head=e,e.done=!1,0):qe},inflateSetDictionary:function(t,e){var r,n=e.length;return t&&t.state?0!==(r=t.state).wrap&&11!==r.mode?qe:11===r.mode&&Xt(1,e,n,0)!==r.check?-3:er(t,e,n,n)?(r.mode=31,-4):(r.havedict=1,0):qe},inflateInfo:"pako inflate (from Nodeca project)"},nr={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},or=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},ir=Object.prototype.toString;function ar(t){if(!(this instanceof ar))return new ar(t);this.options=ft.assign({chunkSize:16384,windowBits:0,to:""},t||{});var 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||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new De,this.strm.avail_out=0;var r=rr.inflateInit2(this.strm,e.windowBits);if(r!==nr.Z_OK)throw new Error(Jt[r]);if(this.header=new or,rr.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Te(e.dictionary):"[object ArrayBuffer]"===ir.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=rr.inflateSetDictionary(this.strm,e.dictionary))!==nr.Z_OK))throw new Error(Jt[r])}function sr(t,e){var r=new ar(e);if(r.push(t,!0),r.err)throw r.msg||Jt[r.err];return r.result}ar.prototype.push=function(t,e){var r,n,o,i,a,s=this.strm,l=this.options.chunkSize,h=this.options.dictionary,u=!1;if(this.ended)return!1;n=e===~~e?e:!0===e?nr.Z_FINISH:nr.Z_NO_FLUSH,"string"==typeof t?s.input=function(t){for(var e=new ft.Buf8(t.length),r=0,n=e.length;r<n;r++)e[r]=t.charCodeAt(r);return e}(t):"[object ArrayBuffer]"===ir.call(t)?s.input=new Uint8Array(t):s.input=t,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new ft.Buf8(l),s.next_out=0,s.avail_out=l),(r=rr.inflate(s,nr.Z_NO_FLUSH))===nr.Z_NEED_DICT&&h&&(r=rr.inflateSetDictionary(this.strm,h)),r===nr.Z_BUF_ERROR&&!0===u&&(r=nr.Z_OK,u=!1),r!==nr.Z_STREAM_END&&r!==nr.Z_OK)return this.onEnd(r),this.ended=!0,!1;s.next_out&&(0!==s.avail_out&&r!==nr.Z_STREAM_END&&(0!==s.avail_in||n!==nr.Z_FINISH&&n!==nr.Z_SYNC_FLUSH)||("string"===this.options.to?(o=Oe(s.output,s.next_out),i=s.next_out-o,a=ze(s.output,o),s.next_out=i,s.avail_out=l-i,i&&ft.arraySet(s.output,s.output,o,i,0),this.onData(a)):this.onData(ft.shrinkBuf(s.output,s.next_out)))),0===s.avail_in&&0===s.avail_out&&(u=!0)}while((s.avail_in>0||0===s.avail_out)&&r!==nr.Z_STREAM_END);return r===nr.Z_STREAM_END&&(n=nr.Z_FINISH),n===nr.Z_FINISH?(r=rr.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===nr.Z_OK):n!==nr.Z_SYNC_FLUSH||(this.onEnd(nr.Z_OK),s.avail_out=0,!0)},ar.prototype.onData=function(t){this.chunks.push(t)},ar.prototype.onEnd=function(t){t===nr.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=ft.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var lr={Inflate:ar,inflate:sr,inflateRaw:function(t,e){return(e=e||{}).raw=!0,sr(t,e)},ungzip:sr},hr={};(0,ft.assign)(hr,Ee,lr,nr);for(var ur=hr,cr=new Uint8Array(256),dr=0;dr<64;dr++)cr["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(dr)]=dr;var fr,pr=function(t){return function(t){for(var e="",r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e}(ur.inflate(function(t){var e,r,n,o,i,a=.75*t.length,s=t.length,l=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);var h=new Uint8Array(a);for(e=0;e<s;e+=4)r=cr[t.charCodeAt(e)],n=cr[t.charCodeAt(e+1)],o=cr[t.charCodeAt(e+2)],i=cr[t.charCodeAt(e+3)],h[l++]=r<<2|n>>4,h[l++]=(15&n)<<4|o>>2,h[l++]=(3&o)<<6|63&i;return h}(t)))},gr={Courier:"eJyFWdtSGzkQ/RXXPO1WmZSBEAJvjnESb8AmGENCKg+ypj3Wohk5ugAmlX9fzUCyW6s+ysuUfVqXvh61Zr4XI1PX1PjiuLg6C05U1Ns/Ojx42TsYHB4eFf3irWn8VNQUB4xMsIpsCwatU1DUSm8T+JpUtW7XP6NShToiEy+0ksOm0nHkIP53b9UDlefKy3Vx7G2gfjFaCyukJzundu74wVNTUnlhatE8a/XmjXkojr/s7O33d/YOBv3D3YP+68HB136xiEOtVg2dG6e8Mk1xvLM7GPxHcLlW8rYh54rjOLO4Iuu6YcVgsP9iMBjELabGK/lkymZrWxt6f8g/e7tHr4/68Xk06J673XOve+53z8PesDRL6s23zlPtepNGGrsxVngqX/R6Q617F+1qrndBjuxdRONu4ziqVE01l2vqHNgtMveiKYUtf0rjwJHYvH/26MGrvX7x6ee/l3uv+sXQydZPtjh+tXfUL07o1/+d3YPDfjH35fvrOHO3+3n1/LN19hl5q2T0x5fvxfWnOL/11zQq4jYiuuFH/38wPUgt6hT/Fkw0dKlTSRPqZevnqkllpdFa2BTfkJVtdiYCUUeRi94BGnQBY9YTlhpNKyQC04RrV3S3zCwdXIrKWFQihdfbzZoY66MpyjCWOC3cOoUfyZoUNQ0TJX/PjPRrS8zYVSxZBlV3zFinHhiQ7jjriPdpoziFpdGGWcNRrYBIt1WcbvotCCYHK0uxDhkzvwVyHVOksWd0H6bQmxQapdBJCo1T6G0KvUuh9yk0SaG/UuhDCp2m0FkKTVNolkLnKfQxhS5SaJ5Clym0SKGrFLpOoU8p9DmFblJoGU+iW/I8bSyjDNTp8zzIKVIpqawMDIuGlrRdPDiYEun4jVeG4ZwlU2MM/zIVxHABU1AMy6WQSqG/U4ihV6aEGW8xVcvQ3oZxZQox3MDQC+P7kEJ3KXSfQgyTbhnS5/MLJMKSO0y78bls9EqX8KgvzT3jZ/50bo9L3fYraQq1XR3Ls1vu7FhpYxV7HoBVZLDxGJeMA7uycarrOmHXwnuzCipKagMooBV3C/9GDFy/YqpjxSR+bORYmilFVXFH2hPOtmJPDUcbO7LE1H7shURlxYYjtdj6E2PFv+5dCpfxcF4KXPQrAEBOWquNU0yhRkv92gTUKT4d+nxqRwdwrY+QwXONS8fkK01MOYO6qoW0XA4vLXEbl8YLyddbGa9axNpv2SqU8SoWG26Gu0NTCRtqLQKzjalik8mwtBSsHVTzCTtkWh5jy1Xs8fim8BQcsDOE8xvUkeSCZncQvL/b3pKpTg32NQhnVo+lGa+yMeWZoE1wPAmknwBJE/IRJRC6z1iDUt0pLps/A82GucoQYNIiN2kLJrnu2oVqhHJLLvg6WWA3CFQMC6BdQBPGeJOTSBDc/SNrqPz5voLZClGOBHkgeL9MswpolKOAUS+zq43QaoBVxxmedMBMBwlRgd21eaSmYgQXYIt3WSNDtkhywiEKqQWKSGjrTcZzl2tjmcVmaPcL4Lc5wEug7QJtEPjM7N5tuNA1OExPNAMpOEQ4oNU6aK82mmkzAzDwEhgYWy2vhC7VirldbTE1TME+Kpcs42yaZU4dLJJAjwbRIAroFDhoAhZq37zFhoF7/ba05pYa9g5kqVIOdL3vQLAnOUYJsar5q8gY5JQFBhnkmRsw4QZ47PklF3gFNvZMhzKCpKCzvOVR6wdPRyQYovYhk5XAwY+oNNDeMxQRdPSgSDm0MzZilm1LgIUnpD0TK8+TtL83GUbEqtXMKw0FNDL5PnOMXF+CDqfj8ZjANiYyo9o8k698Rn7I5vEpCJy3oqRaWEZzyrDCBHhpghLnFGgdnbYWmjkZ2psJKHCTy6gGdE2L38QP+IeQQRXg0mjQc1S5oPJOmGdDN8trXkaW4L52GBCiEVAiQDYvleTCcAIWsllrpiA+BuAX+bTOSodgzSHkaL7nmoF1HjMVMkanPdr7NmsKaAQm2VIAKvj85cZUbbwbw70fwVwasCguhb5W5S+03EH+CIxqsktFl+MTQqEaH4f2O+TXfvGBbHMulG2/Hn/98Q/b2xEO","Courier-Bold":"eJyFWdtyGjkQ/RVqnnar8Bb4lpg3jEnCxgEvGDtxKg9iphm01oyILrZxKv++mrGd3az6KC8UnNa0+nrUGr5lI11VVLtskF198FaU1Dns9w9OOkf7/ePDrJu90bWbiorCgpH2RpLZO9WqaCReqZ8lnReJqKTa/SwL8DXJctPs9Lxs4oSS+bAuVVjXC7/tG/lAxYV0+SYbOOOpm402wojckVlQ8+T4wVFdUDHXlaifrTs91Q/Z4PNeMLu7t3/U6746POm+7vW/dLNlWGuUrOlCW+mkrrPBXr/X+4/gciPz25qszQbhyeyKjG2XZb3ewR+9Xi/sMdVO5k+ebHemcaHzW/57p3/y+qQbPk967We//TxoP191hoVeUWexs44q25nUuTZbbYSj4o9OZ6hUZ97osZ05WTJ3AQ37jMOqQtblIt9QG7lWycKJuhCmeJGGhSOxffccyqPj/W728eXX4cFJNxvavAmRyQbH++HnGf34vdc/etXNFq54d50NXh+2X6/C137v+CnQH8gZmYdQfP6WXX8MCppQTYMlditCBL53/wfTQ65EFeNfvQ6erlQsqX21akJc1rGs0EoJE+NbMnlToZFAVEFkQ3iABW2uGH3CUK1ojUTgMWEbjfaWeUp5G6N5aCwRw5vddkOM98EVqRlPrBJ2E8OPZHSM6prJkrtnVrqNIWbtOjQrg8o7Zq2VDwxId5x3xMe0lpzBuVaa0WGpkkCkmgaON/3qBVODpaHQiIybXz3ZliTi3DO2D2PoNIZGMXQWQ+MYehNDb2PoXQxNYujPGHofQ+cx9CGGpjE0i6GLGPorhuYxtIihyxhaxtBVDF3H0McY+hRDNzG0CqfQLTmeNlZBBvr0+TnIKbmUuTS5Z1jUN6xtw8nBtEjLb7wxDOesmB5j+JfpIIYLmIZiWC6GZAz9HUMMvTItzESL6VqG9rZMKGOI4QaGXpjY+xi6i6H7GGKYdMeQPl9foBBW3GHark9Vo5OqgEd9oe+ZOPOnc3NcqmZgiUuomehYnt1xZ8daaSPZ8wBoyb0Jx3jOBLBtGyvbiRNOLXw0Sy+DpNKAAhpxq/gXYhD6NdMda6bwwyTH0kwhypI70p5wdhR7Gjia3JEhpvfDLCRKI7YcqYXJnxgv/g3vSthEhNNSEKIfCQByUkpurWQaNXjqNtqjSfHp0OdLOwSAG31E7h03uLRMvlbEtDPoq0rkhqvhlSFu40I7kfP9VoRLFrH+G7YLcypCQLkJ1delML5SwjPb6DIMmQxL54L1gyq+YIfMyKNNsQ4zHj8UnoMDdoZwfoMqkJxX7A6Cj3czWzLdqcC+GuGM9tCa4RobSp5J2gTnk0D5CVA0Pp1RAqn7hC0o5J3kqvkTsGyY6gwBHlqmHtqBh2x77UI9QimVS75PljgMAjXDEljn0QNjvMlZIAju/pF0NH95VcFshSgnB3Ug+LhMkwYoVKOAUS+T2kZIG2DVcYInLXDTQkKUYHelH6kuGcEcbPE26aRPNklKOEQpNcCQHPp6k4jc5UYbRtkM7T4HcVsAvADWLtEGnq/M9t2G9e2Aw8xEM1CCQ4QDWq28cnKrmDHTAwcvgYNh1HJSqEKumdvVDlPDFOwjU8UyTpZZ4tTBohzYUSMaRAmdggBNgKLmzVsYGLjXbyujb6lm70CGSmnB1PsWJHuSYhQfupq/ioxBTRngkEaRuQEP3ICIPb/kAq/Axo6ZUEaQFFSStxwa/eDpiARDND4kqhIE+BG1Btp7hjKCjh6UKYt2xk7MkmMJ8PCMlGNy5XiSdvc6wYjYtIp5pSGBRTo9Z45R6Asw4bQ8HgrYhEJmTFsk6pWvyPfJOj4HiXNGFFQJw1hOCVaYgChNUOGcA6tD0DZCMSdDczMBDa5TFVWDqWn5i/yB+BByqARcGhx6ziqXVD4Ii2TqZmnLi8AS3L8dGqRoBIzwkM0LmXNpOAOKTNKbKciPBvg8XdZJ6RDoHEKO5meuGdDzmOiQMTrt0d63SVfAIDBJtgIwwaUvN7ps8l1r7v0I5lKPRUEV+rcqfaHlDvJH4FSdVBVCjk8IiXp87Jv/Ib90s/dk6gshTfPv8Zfv/wDUfBK2","Courier-Oblique":"eJyFWVtT2zgU/isZP+3OhE5Iy/UtDaHNFhI2IdDS4UGxFUeLbKW6AKHT/77Hhnbb1fnUFw98x9K5fzpyvmZDU1Wy9tlxdnUenChlZ3e//+awc7B32D/Kutmpqf1EVJJeGJpglbQ706VWX4JshEHrX4Wdn4SiUnr7q5jga6nKdaPvXBYqVISMvdAqH9Slpjd3dvuEuFP1KIsL5fN1duxtkN1suBZW5F7auWxWjx69rAtZzEwl6hc73741j9nx553+QXenv9frHr456h729m672YJetVrV8sI45ZWpG0W93k+Cy7XK72rpXHZMK7MraV37WtbrvX7V6/VIxcR4lT87s9naxovOH/mfnd2jw6MuPY967XO3ffbb5+v2edAZFGYpO/Ot87JynXGdG7sxVnhZvOp0Blp3Zs1urjOTTtp7QknbiN4qVF3O87VsQ9huMveiLoQtvkvpxaHYvH+J6d4+Be/j9//e9Pe72cDlTZxsdrzfP+pmJ/LH/zu7ewfdbO6L99e0crf98+rlzybY59JblVM8Pn/Nrj/S+iZeEzLEbQSF4Vv3f7B8zLWoYvxLMOToUseSOlTLJs5lHcsKo7WwMb6RNm/qNRKIikSOogMsaBPG7CesrLVcIRFYJlyzo7tjVungYjSnNhMxvN5u1pLxnlxRhvHEaeHWMfwkrYlRUzNZ8g/Mm35tJfPuipqWQdU9865Tjwwo7znvJB/TWnEG50YbZg8nKwVEuuniWOmXIJgaLK2kPmTcJBJzLVPEuWdsH8TQ2xgaxtBJDI1i6DSG3sXQ+xgax9BfMfQhhs5i6DyGJjE0jaGLGPo7hmYxNI+hyxhaxNBVDF3H0McY+hRDNzG0pJPoTnqeNpYkA336sg5ySq5UrmweGBYNDWk7OjiYFmn5jTeG4Zwl02MM/zIdxHAB01AMy8WQiqF/YoihV6aFmWgxXcvQ3oYJZQwx3MDQCxP7EEP3MfQQQwyTbhnS5+sLFMKSO0zb91PV6JUu4FFfmAcmzvzp3ByXuplX4hJqpjqWZ7fc2bHSxir2PAC75MHSMZ4zAWzbxql27oRTCx/NMiiSVAZQQCNuN/6NGIR+xXTHiil8GuRYmilEWXJH2jPOjmLPA0eTO2kl0/s0C4nSig1HanQJkIwX/4V3KVwiwmkpCNGPBAC51FptnGIalTz1axPQpPh86POlTQHgRh+RB88NLi2Tr7Rk2hn0VSVyy9Xw0kpOcWG8yPl+K+iyJVn/LduFOV3GaOBmuDvUpbCh0iIwakxJQybD0rlg/ZAVX7ADZuQxtljRjMcPhWfggJ0inFdQEckFzWoQfLyb2ZLpTg30GoQzu1Nr0lWWSp5J2hjnU4LyE6BoQjqjEqTuE7agUPeKq+ZPwLJBqjMEWLRILdqCRa69dqEekaktF3yfLHAYBGqGBbAuoAUjrOSECIK7fyQdzb9/r2BUIcrJQR0IPi6TpAEa1Shg1MvkbkO0G2DVUYInHXDTQUJUQLs2T7IuGcEMqHiXdDIkmyQlHKCUWmBIDn29SUTucm0ss9kUaZ+BuM0BXgBrF0hB4Cuz/bbhQjvgMDPRFJTgAOGAVqugvdpoZswMwMFL4CCNWl4JXagVc7vaYmqYAD0qVSyjZJklTh0syoEdNaJBlNAJCNAYbNR8eaOBgfv8trTmTtbsHcjKUjkw9b4DyR6nGCVQV/NXkRGoKQscMigyN2DBDYjYy0cu8Als5JkJZQhJQSd5y6PRD56OSDBA40OiKkGAn1BrIN1TlBF09KBMOaQZOzFNjiXAwxOpPZMrz5O0fzAJRsSmVcwnDQUsMuk5c4RCX4AJp+VxKmBLhcyYNk/UK1+RH5J1fAYS560oZCUsY7lMsMIYRGmMCucMWE1BWwvNnAzNzQQ0uElVVA2mpsVv8gfiI5FDJeBScuglq1xS+SDMk6mbpi0viCW4XzsMSNEQGBEgmxcq59JwAjaySW8mID8G4LN0WSelA7DnAHI0P3NNwT5PiQ4ZodMe6b5LugIGgXGyFYAJPn25MWWT79pw30cwlwYsoq3Qr1XpCy13kD8Bp+rkVhRyfEIo1OOj0PwOedvNPkhbXwhlm1+Pb7/9C/NFF2U=","Courier-BoldOblique":"eJyFWdtyGjkQ/RVqnnarcAo7vuE3jEnCxgEvGDtxKg9iRgxaa0ZEF9s4lX/fnrGdTVZ9lBcKTmvU96PW8C0bmqqStc9OsqsPwYlSdnaPDvb6naP+3v5+1s3emNpPRCVpwdAEq6TdOTW6mC61+hpksyBo/euCTrOg89MKUSm9/XUNwddSletGcbOcfo+90Cof1KWmdTu7e4S4N+pBFhfK5+vsxNsgu9lwLazIvbRz2Tw7evCyLmQxM5Won809PTUP2cnnnYOj7s7eQa97fNjvHvd2v3SzBS21WtXywjjllakbRb3eT4LLtcpva+lcdkJPZlfSunZZ1uu9ftXr9UjFxHiVP7my2drGh84f+Z+d3f5xv0uf/V77udt+vm4/jzqDwixlZ751XlauM65zYzfGCi+LV53OQOvOrNnHdWbSSXtHKOkZ0apC1eU8X8s2dO0mcy/qQtjiRUoLh2Lz7jmWB4cUto8vv/Zf97vZwOVNhGx2crhHP8/kj987uxShbO6Ld9fZyfF++/WKvu72Dp/i/EF6q3IKxedv2fVH2qAJ1YQscRtBEfje/R8sH3Itqhj/Ggx5utSxpA7VsglxWceywmgtbIxvpM2bio0EoiKRo/AAC9pcMfsJK2stV0gEHhOu2dHdMk/p4GI0p0YTMbzebtaS8Z5cUYbxxGnh1jH8KK2JUVMzWfL3zEq/tpJZu6JuZVB1x6x16oEB5R3nneRjWivO4Nxow+zhZKWASDcNHCv9GgRTg6WV1IiMm8ReriWJOPeM7YMYOo2hYQydxdAoht7E0NsYehdD4xj6K4bex9B5DH2IoUkMTWPoIob+jqFZDM1j6DKGFjF0FUPXMfQxhj7F0E0MLekQupWep40lyUCfPj8HOSVXKlc2DwyLhoa1HZ0cTIu0/MYbw3DOkukxhn+ZDmK4gGkohuViSMXQPzHE0CvTwky0mK5laG/DhDKGGG5g6IWJfYihuxi6jyGGSbcM6fP1BQphyR2m7fpUNXqlC3jUF+aeiTN/OjfHpW4GlriEmoGO5dktd3astLGKPQ/ALnmwdIznTADbtnGqHTnh1MJHswyKJJUBFNCI241/IwahXzHdsWIKnyY5lmYKUZbckfaEs6PY08DR5E5ayfQ+zUKitGLDkRpdASTjxX/hXQqXiHBaCkL0IwFALrVWG6eYRiVP/doENCk+Hfp8aVMAuNFH5MFzg0vL5CstmXYGfVWJ3HI1vLSSU1wYL3K+3wq6ZUnWf8t2YS4LCig3oYa6FDZUWgRGjSlpyGRYOhesH7LiC3bAjDzGFiua8fih8BwcsFOE8woqIrmgWQ2Cj3czWzLdqYFeg3Bmd2pNusVSyTNJG+N8SlB+AhRNSGdUgtR9whYU6k5x1fwJWDZIdYYADy1SD23BQ669dqEekaktF3yfLHAYBGqGBbAuoAdGWMkZEQR3/0g6mr+8qmBUIcrJQR0IPi6TpAEa1Shg1MvkbkO0G2DVUYInHXDTQUJUQLs2j7IuGcEMqHibdDIkmyQlHKCUWmBIDn29SUTucm0ss9kUaZ+BuM0BXgBrF0hB4CuzfbfhQjvgMDPRFJTgAOGAVqugvdpoZswMwMFL4CCNWl4JXagVc7vaYmqYAD0qVSyjZJklTh0syoEdNaJBlNAJCNAYbNS8eaOBgXv9trTmVtbsHcjKUjkw9b4FyR6nGCVQV/NXkRGoKQscMigyN+CBGxCx55dc4BXYyDMTyhCSgk7ylkejHzwdkWCAxodEVYIAP6LWQLqnKCPo6EGZckgzdmKaHEuAh2dSeyZXnidpf28SjIhNq5hXGgpYZNJz5giFvgATTsvjVMCWCpkxbZ6oV74i3yfr+BwkzltRyEpYxnKZYIUxiNIYFc45sJqCthaaORmamwlocJOqqBpMTYvf5A/ERyKHSsCl5NBzVrmk8kGYJ1M3TVteEEtw/3YYkKIhMCJANi9UzqXhDGxkk95MQH4MwGfpsk5KB2DPAeRofuaagn0eEx0yQqc90n2bdAUMAuNkKwATfPpyY8om37Xh3o9gLg1YRFuhf6vSF1ruIH8ETtXJrSjk+IRQqMdHofkf8ks3ey9tfSGUbf49/vL9XxrnGMA=",Helvetica:" ","Helvetica-Bold":" ","Helvetica-Oblique":" ","Helvetica-BoldOblique":" ","Times-Roman":" ","Times-Bold":" ","Times-Italic":" ","Times-BoldItalic":" ",Symbol:"eJx9WFlv2zgQ/iuGnnYBt5DkS85bmk13g27SoEkPbNEHWqIlIhSpklSuov99R7JIkSLtFyGZjxzN8c0h/4oueF1jpqKz6Mt1K1GJZ4s4S+PZYrvdbqJ59J4zdYNqDAfuXuodp52spdSToZrQl6n0KyZl1Sm/xgVpa5BcKURJfs5KCgdj+F++J8+4uCUqr6IzJVo8jy4qJFCusLjD3d27BucE0cGYd+/4c3T2/U2SxfM36XYxT+JtDI8k/jGPPrMCC0oYvuWSKMJZdPYmiWMLuK9I/sCwlNHZCuRfsJD9sSiOk7dxnMFbbrgieefGBW9eROfA7I/8z1myzVbz7rnpn9vuCW/unpvZecF3eHb3IhWu5eyK5Vw0XCCFi7ezc0pnvRo5E1hi8QhCeM0lHCoIK+/yCvdR67zrfd2THPA7VfzzNTrbpv2fX+BPeH8fm2usBMnBg++/oq/forO08+QGNMgGgeG/5wfxYrE4iPFzTlFt5JtkkLeMPIL/EFoNreJBE2vrXReako3YcqvVEXCTKWJdzPS7Gizyjk/mZZvsAKC66d7FCgMtF4NC2eaVqpDyLW+QwIzi/TGoD6tvPQL7BJEPNVKVb39DW2mkJnY5FALyD9eEhU6DL4SPrqTaS0mRrHyDXrHgvpQz7AvVU+CkqgQOnN3zVgSkkFVfKslzQIgfMfPFOBxWRiyDjcs5p5wFIoFr4kImprQrP59WP1ubiVpcCgxlNLq5XC4PwM8Wy77EvSs5ZyU0EpuFaXqAzmlTjVlerzcH8TuskH/4oiLj0WQQ/oWpdXadJAfxZSOJ7exmPfD01lYSD8K/kU0288JLS7Mh+hW337dINCPA5MRX8QE1jXU8Wx/E/6J6V4zyLBtCdd36Km4Cso+QTOG4N6T5dvRusxxsu6/scK5Wgw2fKovZ20HxHSnrQDjv0WjEejvw7/MkxmMD6ZQkvnEfa1xayperg/ibZfN2kN1K4lvxHw4lZAfD6QErpy1lOt2QF4H3XATa8HDP7VnrVWY6SoNZQfKWokBRt90Ak7mt2GACwTVE8bNPE+Tw3VTIzkmQqRuLqsvtUGaFw3cTcjzJxSod3tjYSnQgS4fvpgyc8KaDZuLwXR8FtYlv8YPD9rHBuGxfbQYG1q1vL2v9+3zC9nF0EF+BqoLBFBbbjRfSYbsJprLYboxtpx1Fj23esXoMhqlx7rB9uR2OPxP/aCMDmX61/Vhm8cha7HA91bzbWUR1z0/m8tLUKSyJ1qWNHqeXrTUf16lb76Or6XIzTmWFA4mHyeLOkUS3+H23UpJQPAnbE0bUS2CSUi6IdWM13Mhpu/OlBUE1t/YbA1QYCeWLYVsrRh+SeDm0RCQEf9pxa3Xpds4RcpJhqNVDbXPkzqTpOJcK/mT1VO17gUtn57C3J3cpMlUucW77Px3hRwZ83VJFGvriJ6YRHJboLmnWPUNXWAC7FbQg+/0IrjUL4RMFBxhYkEdSBLxiXB0xD8TkEZorywPXoP0I/jxhXGzWKEoJUFgeiTvs3srq2eO9Hq2Aeq92S9eDIgeYwIeawKoVY+KyVOumuBmpY0r+CgrgQVn7ohl9n6aIoc4TJjB0lEDWvmaGa05ETrGfPRd3lm1jI64b9SKtBJlbhAFTgEhuqWoUvlhCFdwRBW613cNWqnGYyDAdj+OQfdnugpBWHUa14jAKbbN2tlDrfR6mXUT9p7F3peyGvHNBb0UCl933GHgmyN6Hc/0R6+KZxiG7Ba6ReJjg6RiAos0DpTRsHWNz1s284Mr58DI+UF52N8B7vyIGzP4+nGJcWLXiNMtiR0/0S0BPtExAj3ZNwE42zh11e6duTZS/YlZaK6DebfrkOsb4aURMnsqiA+viHpPowDrwsoX1y6moRTZ20cMXtmpOgFYf8sGd8kFrRw4ptuCQagu2lJvwmpXEUu2DNSlOoEf12vY4aXOZkG6WY8OC4hzrwHRcjVhWepjd4KdYKK7jrx5H89WjRxPWoycydlS3jZ/I2VS/G9yp9gB6PG1T1aY4YAp3LfPHPPqABbtFRHS/jf34/T82FAfb",ZapfDingbats:"eJxtmNtu20YQhl+F4FULyMGeD7pz3AY1ChtG7NpFA18w1NomIlECSRcxgrx7SVk7+wOdG8H5OJydf2Z2d5gf9cV+t0v9VK/r+6vXsXlOlbHe28paq229qj/t++m62aXZ4J/m8PRb1z9/baZxefK63Z6eXN5dVMvTCh83u277xr/6kLrnl2XNq7TpXnczuZyabdee98/b2VzM/x4/dd/T5qab2pd6PQ2vaVVfvDRD005puE3Lu7eH1HbN9hTjx4/77/X6y5lcnUmjVzHIVVDicVX/1W/SsO36dLMfu6nb9/X6TAoBD+5euvZbn8axXtuZ36dhPJrVQqgPQoh5hev91LWLkIv94W1Ygq9+aX+tZAx2tfz64284/sblN/rqfLP/mqrbt3FKu7G67Nv9cNgPzZQ2H6rz7bb6vLgZq89pTMO/M/xfEqturJpqSM/d7GJIm2oamk3aNcO3av80O5xh3yyKmm1193ZIT02bqovTKjP+MAf++7zsZvZ3276kYyWWXB0z99S18/PbafPHQ71W4fjn/fxnFO+ZvkrT0LVzTr78qB/+nk38bHM9exgP8zr1z9U7jt6840YW5uSJKcZOCaBBnKgm5mU8MVNYyMwWFvO7Ukagkmgg6sDWQ5yFFqjzUrLEaQ3BEmiwNsMSaZS0vgWfOkPHWQowNeTUc0kumnxZvsgPxlGai6VTGUqAVCTQ6QkWnc77DKEiLktSUBJKqHIQZ86d8gCpHYoiEzMsb1ubYy8vW50DChB5ZhGqrijD0EqUIeiaEHIfCg5Kpuu0ApiToaGPSY0uaQsyr65L2oKi1yFt1PLaQ3lzfXTgXodGoJYzglndSLDMPg1sTPJpQJHJigw0QrGERqD9YhyTOgONQDUyuF1zaxuokc/BW2ztXCMrGZ9WMW1oQZHIXWNBkSCfRZEL5BMUiZw6CzVSFCfUSGZFNjIldoKDkonTKQiJIGzWmFd3BizJJ9SINoLDriOfUCOZS+zg+KGD1qGiLNMLxtJD1/ns00ON6EzyUCM6vbxhoBKaqbG3DFQCNiL1iHccBPV0DHhQH/JW8EW90dkyFKGywCJU0WkVSvSGeiSUODWFFD0HYdPQVoiRgfPMA+/nnRgiAyNYSjpWNQcNSMrtFCUH4ZIRpSCWocFCSuhCEY6hoUClc0WC52BJlCYYLQdhN+hygRRRlo5BKRRLS6oihSqh+ZzzRGG1Mo4Iz1LoP0qsxDGFzk0JE42ji0jCPejomJKCuwil4m5CiRMEUMVSzVLDUstSx1Juc0oVWMpqY295qVltmtWmWW2a1aZZbZrVplltmtWmWW2G1WZYbYbVZlhthtVmWG2G1WZYbYbVZlhtltVmWW2W1WZZbZbVZlltltVmWW2W1QYjQCh7E2aAQHeGhCFgPoNoy8KNb2wxBhmGKBxoUZXlLGsLI6AsftEDHV0wIURVbANLcTKlGGBIKPOAxCmhePCKUwFzAmpDFRQvjA9R06Hq8TONvshgKDCuRAZTXigUxjxNFfKRo3CLhnIJBMFRvMZpqpNBMlQJzGT5WFQMVQI/AikPMIhEU1aDjqJvQwmjSHB05cC9jbYwc5UtAHNLhDw41ha+lEqF4JaH3gmB61SYcqInxTDmQK8v08vjqv4zDf1N0w3Lf4A8/vwPpfK11w=="};!function(t){t.Courier="Courier",t.CourierBold="Courier-Bold",t.CourierOblique="Courier-Oblique",t.CourierBoldOblique="Courier-BoldOblique",t.Helvetica="Helvetica",t.HelveticaBold="Helvetica-Bold",t.HelveticaOblique="Helvetica-Oblique",t.HelveticaBoldOblique="Helvetica-BoldOblique",t.TimesRoman="Times-Roman",t.TimesRomanBold="Times-Bold",t.TimesRomanItalic="Times-Italic",t.TimesRomanBoldItalic="Times-BoldItalic",t.Symbol="Symbol",t.ZapfDingbats="ZapfDingbats"}(fr||(fr={}));for(var vr={},yr=function(){function t(){var t=this;this.getWidthOfGlyph=function(e){return t.CharWidths[e]},this.getXAxisKerningForPair=function(e,r){return(t.KernPairXAmounts[e]||{})[r]}}return t.load=function(e){var r=vr[e];if(r)return r;var n=pr(gr[e]),o=Object.assign(new t,JSON.parse(n));return o.CharWidths=o.CharMetrics.reduce(function(t,e){return t[e.N]=e.WX,t},{}),o.KernPairXAmounts=o.KernPairs.reduce(function(t,e){var r=e[0],n=e[1],o=e[2];return t[r]||(t[r]={}),t[r][n]=o,t},{}),vr[e]=o,o},t}(),mr=pr(" "),br=JSON.parse(mr),wr=function(t,e){var r=this;this.canEncodeUnicodeCodePoint=function(t){return t in r.unicodeMappings},this.encodeUnicodeCodePoint=function(t){var e=r.unicodeMappings[t];if(!e){var n=String.fromCharCode(t),o="0x"+function(t){for(var e="",r=0,n=4-t.length;r<n;r++)e+="0";return e+t}(t.toString(16)),i=r.name+' cannot encode "'+n+'" ('+o+")";throw new Error(i)}return{code:e[0],name:e[1]}},this.name=t,this.supportedCodePoints=Object.keys(e).map(Number).sort(function(t,e){return t-e}),this.unicodeMappings=e},xr={Symbol:new wr("Symbol",br.symbol),ZapfDingbats:new wr("ZapfDingbats",br.zapfdingbats),WinAnsi:new wr("WinAnsi",br.win1252)},kr=function(t){return Object.keys(t).map(function(e){return t[e]})},Fr=kr(fr),Sr=function(t){return Fr.includes(t)},Cr=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height},Ar=function(t){return"`"+t+"`"},Tr=function(t){return"'"+t+"'"},Pr=function(t){var e=typeof t;return"string"===e?Tr(t):"undefined"===e?Ar(t):t},zr=function(t,e,r){for(var n=new Array(r.length),o=0,i=r.length;o<i;o++){var a=r[o];n[o]=Pr(a)}var s=n.join(" or ");return Ar(e)+" must be one of "+s+", but was actually "+Pr(t)},Or=function(t,e,r){Array.isArray(r)||(r=kr(r));for(var n=0,o=r.length;n<o;n++)if(t===r[n])return;throw new TypeError(zr(t,e,r))},Dr=function(t,e,r){Array.isArray(r)||(r=kr(r)),Or(t,e,r.concat(void 0))},Rr=function(t,e,r){Array.isArray(r)||(r=kr(r));for(var n=0,o=t.length;n<o;n++)Or(t[n],e,r)},Br=function(t){return null===t?"null":void 0===t?"undefined":"string"==typeof t?"string":isNaN(t)?"NaN":"number"==typeof t?"number":"boolean"==typeof t?"boolean":"symbol"==typeof t?"symbol":"bigint"==typeof t?"bigint":t.constructor&&t.constructor.name?t.constructor.name:t.name?t.name:t.constructor?String(t.constructor):String(t)},Nr=function(t,e){return"null"===e?null===t:"undefined"===e?void 0===t:"string"===e?"string"==typeof t:"number"===e?"number"==typeof t&&!isNaN(t):"boolean"===e?"boolean"==typeof t:"symbol"===e?"symbol"==typeof t:"bigint"===e?"bigint"==typeof t:e===Date?t instanceof Date:e===Array?t instanceof Array:e===Uint8Array?t instanceof Uint8Array:e===ArrayBuffer?t instanceof ArrayBuffer:e===Function?t instanceof Function:t instanceof e[0]},Er=function(t,e,r){for(var n=new Array(r.length),o=0,i=r.length;o<i;o++){var a=r[o];"null"===a&&(n[o]=Ar("null")),"undefined"===a&&(n[o]=Ar("undefined")),"string"===a?n[o]=Ar("string"):"number"===a?n[o]=Ar("number"):"boolean"===a?n[o]=Ar("boolean"):"symbol"===a?n[o]=Ar("symbol"):"bigint"===a?n[o]=Ar("bigint"):a===Array?n[o]=Ar("Array"):a===Uint8Array?n[o]=Ar("Uint8Array"):a===ArrayBuffer?n[o]=Ar("ArrayBuffer"):n[o]=Ar(a[1])}var s=n.join(" or ");return Ar(e)+" must be of type "+s+", but was actually of type "+Ar(Br(t))},jr=function(t,e,r){for(var n=0,o=r.length;n<o;n++)if(Nr(t,r[n]))return;throw new TypeError(Er(t,e,r))},Ir=function(t,e,r){jr(t,e,r.concat("undefined"))},Mr=function(t,e,r){for(var n=0,o=t.length;n<o;n++)jr(t[n],e,r)},Ur=function(t,e,r,n){if(jr(t,e,["number"]),jr(r,"min",["number"]),jr(n,"max",["number"]),n=Math.max(r,n),t<r||t>n)throw new Error(Ar(e)+" must be at least "+r+" and at most "+n+", but was actually "+t)},Vr=function(t,e,r,n){jr(t,e,["number","undefined"]),"number"==typeof t&&Ur(t,e,r,n)},Wr=function(t,e,r){if(jr(t,e,["number"]),t%r!==0)throw new Error(Ar(e)+" must be a multiple of "+r+", but was actually "+t)},qr=function(t,e){if(!Number.isInteger(t))throw new Error(Ar(e)+" must be an integer, but was actually "+t)},Lr=function(t,e){if(![1,0].includes(Math.sign(t)))throw new Error(Ar(e)+" must be a positive number or 0, but was actually "+t)},Kr=new Uint16Array(256),Gr=0;Gr<256;Gr++)Kr[Gr]=Gr;Kr[22]=p(""),Kr[24]=p("˘"),Kr[25]=p("ˇ"),Kr[26]=p("ˆ"),Kr[27]=p("˙"),Kr[28]=p("˝"),Kr[29]=p("˛"),Kr[30]=p("˚"),Kr[31]=p("˜"),Kr[127]=p("�"),Kr[128]=p("•"),Kr[129]=p("†"),Kr[130]=p("‡"),Kr[131]=p("…"),Kr[132]=p("—"),Kr[133]=p("–"),Kr[134]=p("ƒ"),Kr[135]=p("⁄"),Kr[136]=p("‹"),Kr[137]=p("›"),Kr[138]=p("−"),Kr[139]=p("‰"),Kr[140]=p("„"),Kr[141]=p("“"),Kr[142]=p("”"),Kr[143]=p("‘"),Kr[144]=p("’"),Kr[145]=p("‚"),Kr[146]=p("™"),Kr[147]=p("ﬁ"),Kr[148]=p("ﬂ"),Kr[149]=p("Ł"),Kr[150]=p("Œ"),Kr[151]=p("Š"),Kr[152]=p("Ÿ"),Kr[153]=p("Ž"),Kr[154]=p("ı"),Kr[155]=p("ł"),Kr[156]=p("œ"),Kr[157]=p("š"),Kr[158]=p("ž"),Kr[159]=p("�"),Kr[160]=p("€"),Kr[173]=p("�");var Hr,_r=function(t){for(var e=new Array(t.length),r=0,n=t.length;r<n;r++)e[r]=Kr[t[r]];return String.fromCodePoint.apply(String,e)},Xr=function(){function t(t){this.populate=t,this.value=void 0}return t.prototype.getValue=function(){return this.value},t.prototype.access=function(){return this.value||(this.value=this.populate()),this.value},t.prototype.invalidate=function(){this.value=void 0},t.populatedBy=function(e){return new t(e)},t}(),Zr=function(t){function r(e,r){var n="Method "+e+"."+r+"() not implemented";return t.call(this,n)||this}return e(r,t),r}(Error),Yr=function(t){function r(e){var r="Cannot construct "+e+" - it has a private constructor";return t.call(this,r)||this}return e(r,t),r}(Error),Jr=function(t){function r(e,r){var n=function(t){var e,r;return null!==(e=null==t?void 0:t.name)&&void 0!==e?e:null===(r=null==t?void 0:t.constructor)||void 0===r?void 0:r.name},o="Expected instance of "+(Array.isArray(e)?e.map(n):[n(e)]).join(" or ")+", but got instance of "+(r?n(r):r);return t.call(this,o)||this}return e(r,t),r}(Error),Qr=function(t){function r(e){var r=e+" stream encoding not supported";return t.call(this,r)||this}return e(r,t),r}(Error),$r=function(t){function r(e,r){var n="Cannot call "+e+"."+r+"() more than once";return t.call(this,n)||this}return e(r,t),r}(Error);e(function(t){var e="Missing catalog (ref="+t+")";return Hr.call(this,e)||this},Hr=Error);var tn,en=function(t){function r(){return t.call(this,"Can't embed page with missing Contents")||this}return e(r,t),r}(Error),rn=function(t){function r(e){var r,n,o,i="Unrecognized stream type: "+(null!==(o=null!==(n=null===(r=null==e?void 0:e.contructor)||void 0===r?void 0:r.name)&&void 0!==n?n:null==e?void 0:e.name)&&void 0!==o?o:e);return t.call(this,i)||this}return e(r,t),r}(Error),nn=function(t){function r(){return t.call(this,"Found mismatched contexts while embedding pages. All pages in the array passed to `PDFDocument.embedPages()` must be from the same document.")||this}return e(r,t),r}(Error),on=function(t){function r(e){var r="Attempted to convert PDFArray with "+e+" elements to rectangle, but must have exactly 4 elements.";return t.call(this,r)||this}return e(r,t),r}(Error),an=function(t){function r(e){var r='Attempted to convert "'+e+'" to a date, but it does not match the PDF date string format.';return t.call(this,r)||this}return e(r,t),r}(Error),sn=function(t){function r(e,r){var n="Invalid targetIndex specified: targetIndex="+e+" must be less than Count="+r;return t.call(this,n)||this}return e(r,t),r}(Error),ln=function(t){function r(e,r){var n="Failed to "+r+" at targetIndex="+e+" due to corrupt page tree: It is likely that one or more 'Count' entries are invalid";return t.call(this,n)||this}return e(r,t),r}(Error),hn=function(t){function r(e,r,n){var o="index should be at least "+r+" and at most "+n+", but was actually "+e;return t.call(this,o)||this}return e(r,t),r}(Error),un=function(t){function r(){return t.call(this,"Attempted to set invalid field value")||this}return e(r,t),r}(Error),cn=function(t){function r(){return t.call(this,"Attempted to select multiple values for single-select field")||this}return e(r,t),r}(Error),dn=function(t){function r(e){var r="No /DA (default appearance) entry found for field: "+e;return t.call(this,r)||this}return e(r,t),r}(Error),fn=function(t){function r(e){var r="No Tf operator found for DA of field: "+e;return t.call(this,r)||this}return e(r,t),r}(Error),pn=function(t){function r(e,r){var n="Failed to parse number (line:"+e.line+" col:"+e.column+" offset="+e.offset+'): "'+r+'"';return t.call(this,n)||this}return e(r,t),r}(Error),gn=function(t){function r(e,r){var n="Failed to parse PDF document (line:"+e.line+" col:"+e.column+" offset="+e.offset+"): "+r;return t.call(this,n)||this}return e(r,t),r}(Error),vn=function(t){function r(e,r,n){var o="Expected next byte to be "+r+" but it was actually "+n;return t.call(this,e,o)||this}return e(r,t),r}(gn),yn=function(t){function r(e,r){var n="Failed to parse PDF object starting with the following byte: "+r;return t.call(this,e,n)||this}return e(r,t),r}(gn),mn=function(t){function r(e){return t.call(this,e,"Failed to parse invalid PDF object")||this}return e(r,t),r}(gn),bn=function(t){function r(e){return t.call(this,e,"Failed to parse PDF stream")||this}return e(r,t),r}(gn),wn=function(t){function r(e){return t.call(this,e,"Failed to parse PDF literal string due to unbalanced parenthesis")||this}return e(r,t),r}(gn),xn=function(t){function r(e){return t.call(this,e,"Parser stalled")||this}return e(r,t),r}(gn),kn=function(t){function r(e){return t.call(this,e,"No PDF header found")||this}return e(r,t),r}(gn),Fn=function(t){function r(e,r){var n="Did not find expected keyword '"+M(r)+"'";return t.call(this,e,n)||this}return e(r,t),r}(gn);!function(t){t[t.Null=0]="Null",t[t.Backspace=8]="Backspace",t[t.Tab=9]="Tab",t[t.Newline=10]="Newline",t[t.FormFeed=12]="FormFeed",t[t.CarriageReturn=13]="CarriageReturn",t[t.Space=32]="Space",t[t.ExclamationPoint=33]="ExclamationPoint",t[t.Hash=35]="Hash",t[t.Percent=37]="Percent",t[t.LeftParen=40]="LeftParen",t[t.RightParen=41]="RightParen",t[t.Plus=43]="Plus",t[t.Minus=45]="Minus",t[t.Dash=45]="Dash",t[t.Period=46]="Period",t[t.ForwardSlash=47]="ForwardSlash",t[t.Zero=48]="Zero",t[t.One=49]="One",t[t.Two=50]="Two",t[t.Three=51]="Three",t[t.Four=52]="Four",t[t.Five=53]="Five",t[t.Six=54]="Six",t[t.Seven=55]="Seven",t[t.Eight=56]="Eight",t[t.Nine=57]="Nine",t[t.LessThan=60]="LessThan",t[t.GreaterThan=62]="GreaterThan",t[t.A=65]="A",t[t.D=68]="D",t[t.E=69]="E",t[t.F=70]="F",t[t.O=79]="O",t[t.P=80]="P",t[t.R=82]="R",t[t.LeftSquareBracket=91]="LeftSquareBracket",t[t.BackSlash=92]="BackSlash",t[t.RightSquareBracket=93]="RightSquareBracket",t[t.a=97]="a",t[t.b=98]="b",t[t.d=100]="d",t[t.e=101]="e",t[t.f=102]="f",t[t.i=105]="i",t[t.j=106]="j",t[t.l=108]="l",t[t.m=109]="m",t[t.n=110]="n",t[t.o=111]="o",t[t.r=114]="r",t[t.s=115]="s",t[t.t=116]="t",t[t.u=117]="u",t[t.x=120]="x",t[t.LeftCurly=123]="LeftCurly",t[t.RightCurly=125]="RightCurly",t[t.Tilde=126]="Tilde"}(tn||(tn={}));var Sn=tn,Cn=dt(function(t,e){var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var o in r)n(r,o)&&(t[o]=r[o])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var o={arraySet:function(t,e,r,n,o){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+n),o);else for(var i=0;i<n;i++)t[o+i]=e[r+i]},flattenChunks:function(t){var e,r,n,o,i,a;for(n=0,e=0,r=t.length;e<r;e++)n+=t[e].length;for(a=new Uint8Array(n),o=0,e=0,r=t.length;e<r;e++)i=t[e],a.set(i,o),o+=i.length;return a}},i={arraySet:function(t,e,r,n,o){for(var i=0;i<n;i++)t[o+i]=e[r+i]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,o)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,i))},e.setTyped(r)});function An(t){for(var e=t.length;--e>=0;)t[e]=0}var Tn=[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],Pn=[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],zn=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],On=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Dn=new Array(576);An(Dn);var Rn=new Array(60);An(Rn);var Bn=new Array(512);An(Bn);var Nn=new Array(256);An(Nn);var En=new Array(29);An(En);var jn,In,Mn,Un=new Array(30);function Vn(t,e,r,n,o){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=t&&t.length}function Wn(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function qn(t){return t<256?Bn[t]:Bn[256+(t>>>7)]}function Ln(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function Kn(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,Ln(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function Gn(t,e,r){Kn(t,r[2*e],r[2*e+1])}function Hn(t,e){var r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1}function _n(t,e,r){var n,o,i=new Array(16),a=0;for(n=1;n<=15;n++)i[n]=a=a+r[n-1]<<1;for(o=0;o<=e;o++){var s=t[2*o+1];0!==s&&(t[2*o]=Hn(i[s]++,s))}}function Xn(t){var 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.last_lit=t.matches=0}function Zn(t){t.bi_valid>8?Ln(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function Yn(t,e,r,n){var o=2*e,i=2*r;return t[o]<t[i]||t[o]===t[i]&&n[e]<=n[r]}function Jn(t,e,r){for(var n=t.heap[r],o=r<<1;o<=t.heap_len&&(o<t.heap_len&&Yn(e,t.heap[o+1],t.heap[o],t.depth)&&o++,!Yn(e,n,t.heap[o],t.depth));)t.heap[r]=t.heap[o],r=o,o<<=1;t.heap[r]=n}function Qn(t,e,r){var n,o,i,a,s=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*s]<<8|t.pending_buf[t.d_buf+2*s+1],o=t.pending_buf[t.l_buf+s],s++,0===n?Gn(t,o,e):(Gn(t,(i=Nn[o])+256+1,e),0!==(a=Tn[i])&&Kn(t,o-=En[i],a),Gn(t,i=qn(--n),r),0!==(a=Pn[i])&&Kn(t,n-=Un[i],a))}while(s<t.last_lit);Gn(t,256,e)}function $n(t,e){var r,n,o,i=e.dyn_tree,a=e.stat_desc.static_tree,s=e.stat_desc.has_stree,l=e.stat_desc.elems,h=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<l;r++)0!==i[2*r]?(t.heap[++t.heap_len]=h=r,t.depth[r]=0):i[2*r+1]=0;for(;t.heap_len<2;)i[2*(o=t.heap[++t.heap_len]=h<2?++h:0)]=1,t.depth[o]=0,t.opt_len--,s&&(t.static_len-=a[2*o+1]);for(e.max_code=h,r=t.heap_len>>1;r>=1;r--)Jn(t,i,r);o=l;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Jn(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,i[2*o]=i[2*r]+i[2*n],t.depth[o]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,i[2*r+1]=i[2*n+1]=o,t.heap[1]=o++,Jn(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,o,i,a,s,l=e.dyn_tree,h=e.max_code,u=e.stat_desc.static_tree,c=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,p=e.stat_desc.max_length,g=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)(i=l[2*l[2*(n=t.heap[r])+1]+1]+1)>p&&(i=p,g++),l[2*n+1]=i,n>h||(t.bl_count[i]++,a=0,n>=f&&(a=d[n-f]),s=l[2*n],t.opt_len+=s*(i+a),c&&(t.static_len+=s*(u[2*n+1]+a)));if(0!==g){do{for(i=p-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[p]--,g-=2}while(g>0);for(i=p;0!==i;i--)for(n=t.bl_count[i];0!==n;)(o=t.heap[--r])>h||(l[2*o+1]!==i&&(t.opt_len+=(i-l[2*o+1])*l[2*o],l[2*o+1]=i),n--)}}(t,e),_n(i,h,t.bl_count)}function to(t,e,r){var n,o,i=-1,a=e[1],s=0,l=7,h=4;for(0===a&&(l=138,h=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)o=a,a=e[2*(n+1)+1],++s<l&&o===a||(s<h?t.bl_tree[2*o]+=s:0!==o?(o!==i&&t.bl_tree[2*o]++,t.bl_tree[32]++):s<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=0,i=o,0===a?(l=138,h=3):o===a?(l=6,h=3):(l=7,h=4))}function eo(t,e,r){var n,o,i=-1,a=e[1],s=0,l=7,h=4;for(0===a&&(l=138,h=3),n=0;n<=r;n++)if(o=a,a=e[2*(n+1)+1],!(++s<l&&o===a)){if(s<h)do{Gn(t,o,t.bl_tree)}while(0!==--s);else 0!==o?(o!==i&&(Gn(t,o,t.bl_tree),s--),Gn(t,16,t.bl_tree),Kn(t,s-3,2)):s<=10?(Gn(t,17,t.bl_tree),Kn(t,s-3,3)):(Gn(t,18,t.bl_tree),Kn(t,s-11,7));s=0,i=o,0===a?(l=138,h=3):o===a?(l=6,h=3):(l=7,h=4)}}An(Un);var ro=!1;function no(t,e,r,n){Kn(t,0+(n?1:0),3),function(t,e,r){Zn(t),Ln(t,r),Ln(t,~r),Cn.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}(t,e,r)}var oo,io={_tr_init:function(t){ro||(function(){var t,e,r,n,o,i=new Array(16);for(r=0,n=0;n<28;n++)for(En[n]=r,t=0;t<1<<Tn[n];t++)Nn[r++]=n;for(Nn[r-1]=n,o=0,n=0;n<16;n++)for(Un[n]=o,t=0;t<1<<Pn[n];t++)Bn[o++]=n;for(o>>=7;n<30;n++)for(Un[n]=o<<7,t=0;t<1<<Pn[n]-7;t++)Bn[256+o++]=n;for(e=0;e<=15;e++)i[e]=0;for(t=0;t<=143;)Dn[2*t+1]=8,t++,i[8]++;for(;t<=255;)Dn[2*t+1]=9,t++,i[9]++;for(;t<=279;)Dn[2*t+1]=7,t++,i[7]++;for(;t<=287;)Dn[2*t+1]=8,t++,i[8]++;for(_n(Dn,287,i),t=0;t<30;t++)Rn[2*t+1]=5,Rn[2*t]=Hn(t,5);jn=new Vn(Dn,Tn,257,286,15),In=new Vn(Rn,Pn,0,30,15),Mn=new Vn(new Array(0),zn,0,19,7)}(),ro=!0),t.l_desc=new Wn(t.dyn_ltree,jn),t.d_desc=new Wn(t.dyn_dtree,In),t.bl_desc=new Wn(t.bl_tree,Mn),t.bi_buf=0,t.bi_valid=0,Xn(t)},_tr_stored_block:no,_tr_flush_block:function(t,e,r,n){var o,i,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&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}(t)),$n(t,t.l_desc),$n(t,t.d_desc),a=function(t){var e;for(to(t,t.dyn_ltree,t.l_desc.max_code),to(t,t.dyn_dtree,t.d_desc.max_code),$n(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*On[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),o=t.opt_len+3+7>>>3,(i=t.static_len+3+7>>>3)<=o&&(o=i)):o=i=r+5,r+4<=o&&-1!==e?no(t,e,r,n):4===t.strategy||i===o?(Kn(t,2+(n?1:0),3),Qn(t,Dn,Rn)):(Kn(t,4+(n?1:0),3),function(t,e,r,n){var o;for(Kn(t,e-257,5),Kn(t,r-1,5),Kn(t,n-4,4),o=0;o<n;o++)Kn(t,t.bl_tree[2*On[o]+1],3);eo(t,t.dyn_ltree,e-1),eo(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),Qn(t,t.dyn_ltree,t.dyn_dtree)),Xn(t),n&&Zn(t)},_tr_tally:function(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(Nn[r]+256+1)]++,t.dyn_dtree[2*qn(e)]++),t.last_lit===t.lit_bufsize-1},_tr_align:function(t){Kn(t,2,3),Gn(t,256,Dn),function(t){16===t.bi_valid?(Ln(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)}(t)}},ao=function(t,e,r,n){for(var o=65535&t,i=t>>>16&65535,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{i=i+(o=o+e[n++]|0)|0}while(--a);o%=65521,i%=65521}return o|i<<16},so=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}(),lo=function(t,e,r,n){var o=so,i=n+r;t^=-1;for(var a=n;a<i;a++)t=t>>>8^o[255&(t^e[a])];return-1^t},ho={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"},uo=-2,co=258,fo=262,po=103,go=113,vo=666;function yo(t,e){return t.msg=ho[e],e}function mo(t){return(t<<1)-(t>4?9:0)}function bo(t){for(var e=t.length;--e>=0;)t[e]=0}function wo(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(Cn.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function xo(t,e){io._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,wo(t.strm)}function ko(t,e){t.pending_buf[t.pending++]=e}function Fo(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function So(t,e,r,n){var o=t.avail_in;return o>n&&(o=n),0===o?0:(t.avail_in-=o,Cn.arraySet(e,t.input,t.next_in,o,r),1===t.state.wrap?t.adler=ao(t.adler,e,o,r):2===t.state.wrap&&(t.adler=lo(t.adler,e,o,r)),t.next_in+=o,t.total_in+=o,o)}function Co(t,e){var r,n,o=t.max_chain_length,i=t.strstart,a=t.prev_length,s=t.nice_match,l=t.strstart>t.w_size-fo?t.strstart-(t.w_size-fo):0,h=t.window,u=t.w_mask,c=t.prev,d=t.strstart+co,f=h[i+a-1],p=h[i+a];t.prev_length>=t.good_match&&(o>>=2),s>t.lookahead&&(s=t.lookahead);do{if(h[(r=e)+a]===p&&h[r+a-1]===f&&h[r]===h[i]&&h[++r]===h[i+1]){i+=2,r++;do{}while(h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&i<d);if(n=co-(d-i),i=d-co,n>a){if(t.match_start=e,a=n,n>=s)break;f=h[i+a-1],p=h[i+a]}}}while((e=c[e&u])>l&&0!==--o);return a<=t.lookahead?a:t.lookahead}function Ao(t){var e,r,n,o,i,a=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=a+(a-fo)){Cn.arraySet(t.window,t.window,a,a,0),t.match_start-=a,t.strstart-=a,t.block_start-=a,e=r=t.hash_size;do{n=t.head[--e],t.head[e]=n>=a?n-a:0}while(--r);e=r=a;do{n=t.prev[--e],t.prev[e]=n>=a?n-a:0}while(--r);o+=a}if(0===t.strm.avail_in)break;if(r=So(t.strm,t.window,t.strstart+t.lookahead,o),t.lookahead+=r,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=(t.ins_h<<t.hash_shift^t.window[i+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[i+3-1])&t.hash_mask,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<fo&&0!==t.strm.avail_in)}function To(t,e){for(var r,n;;){if(t.lookahead<fo){if(Ao(t),t.lookahead<fo&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-fo&&(t.match_length=Co(t,r)),t.match_length>=3)if(n=io._tr_tally(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=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=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=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=io._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(xo(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(xo(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(xo(t,!1),0===t.strm.avail_out)?1:2}function Po(t,e){for(var r,n,o;;){if(t.lookahead<fo){if(Ao(t),t.lookahead<fo&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=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!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-fo&&(t.match_length=Co(t,r),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){o=t.strstart+t.lookahead-3,n=io._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=o&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=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++,n&&(xo(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=io._tr_tally(t,0,t.window[t.strstart-1]))&&xo(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&&(n=io._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(xo(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(xo(t,!1),0===t.strm.avail_out)?1:2}function zo(t,e,r,n,o){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=o}function Oo(){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=8,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 Cn.Buf16(1146),this.dyn_dtree=new Cn.Buf16(122),this.bl_tree=new Cn.Buf16(78),bo(this.dyn_ltree),bo(this.dyn_dtree),bo(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Cn.Buf16(16),this.heap=new Cn.Buf16(573),bo(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Cn.Buf16(573),bo(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Do(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:go,t.adler=2===e.wrap?0:1,e.last_flush=0,io._tr_init(e),0):yo(t,uo)}function Ro(t){var e,r=Do(t);return 0===r&&((e=t.state).window_size=2*e.w_size,bo(e.head),e.max_lazy_match=oo[e.level].max_lazy,e.good_match=oo[e.level].good_length,e.nice_match=oo[e.level].nice_length,e.max_chain_length=oo[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),r}function Bo(t,e,r,n,o,i){if(!t)return uo;var a=1;if(-1===e&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),o<1||o>9||8!==r||n<8||n>15||e<0||e>9||i<0||i>4)return yo(t,uo);8===n&&(n=9);var s=new Oo;return t.state=s,s.strm=t,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=o+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Cn.Buf8(2*s.w_size),s.head=new Cn.Buf16(s.hash_size),s.prev=new Cn.Buf16(s.w_size),s.lit_bufsize=1<<o+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new Cn.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=e,s.strategy=i,s.method=r,Ro(t)}oo=[new zo(0,0,0,0,function(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Ao(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,xo(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-fo&&(xo(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(xo(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(xo(t,!1),t.strm.avail_out),1)}),new zo(4,4,8,4,To),new zo(4,5,16,8,To),new zo(4,6,32,32,To),new zo(4,4,16,16,Po),new zo(8,16,32,32,Po),new zo(8,16,128,128,Po),new zo(8,32,128,256,Po),new zo(32,128,258,1024,Po),new zo(32,258,258,4096,Po)];var No={deflateInit:function(t,e){return Bo(t,e,8,15,8,0)},deflateInit2:Bo,deflateReset:Ro,deflateResetKeep:Do,deflateSetHeader:function(t,e){return t&&t.state?2!==t.state.wrap?uo:(t.state.gzhead=e,0):uo},deflate:function(t,e){var r,n,o,i;if(!t||!t.state||e>5||e<0)return t?yo(t,uo):uo;if(n=t.state,!t.output||!t.input&&0!==t.avail_in||n.status===vo&&4!==e)return yo(t,0===t.avail_out?-5:uo);if(n.strm=t,r=n.last_flush,n.last_flush=e,42===n.status)if(2===n.wrap)t.adler=0,ko(n,31),ko(n,139),ko(n,8),n.gzhead?(ko(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),ko(n,255&n.gzhead.time),ko(n,n.gzhead.time>>8&255),ko(n,n.gzhead.time>>16&255),ko(n,n.gzhead.time>>24&255),ko(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),ko(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(ko(n,255&n.gzhead.extra.length),ko(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=lo(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(ko(n,0),ko(n,0),ko(n,0),ko(n,0),ko(n,0),ko(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),ko(n,3),n.status=go);else{var a=8+(n.w_bits-8<<4)<<8;a|=(n.strategy>=2||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(a|=32),a+=31-a%31,n.status=go,Fo(n,a),0!==n.strstart&&(Fo(n,t.adler>>>16),Fo(n,65535&t.adler)),t.adler=1}if(69===n.status)if(n.gzhead.extra){for(o=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>o&&(t.adler=lo(t.adler,n.pending_buf,n.pending-o,o)),wo(t),o=n.pending,n.pending!==n.pending_buf_size));)ko(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>o&&(t.adler=lo(t.adler,n.pending_buf,n.pending-o,o)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(t.adler=lo(t.adler,n.pending_buf,n.pending-o,o)),wo(t),o=n.pending,n.pending===n.pending_buf_size)){i=1;break}i=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,ko(n,i)}while(0!==i);n.gzhead.hcrc&&n.pending>o&&(t.adler=lo(t.adler,n.pending_buf,n.pending-o,o)),0===i&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(t.adler=lo(t.adler,n.pending_buf,n.pending-o,o)),wo(t),o=n.pending,n.pending===n.pending_buf_size)){i=1;break}i=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,ko(n,i)}while(0!==i);n.gzhead.hcrc&&n.pending>o&&(t.adler=lo(t.adler,n.pending_buf,n.pending-o,o)),0===i&&(n.status=po)}else n.status=po;if(n.status===po&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&wo(t),n.pending+2<=n.pending_buf_size&&(ko(n,255&t.adler),ko(n,t.adler>>8&255),t.adler=0,n.status=go)):n.status=go),0!==n.pending){if(wo(t),0===t.avail_out)return n.last_flush=-1,0}else if(0===t.avail_in&&mo(e)<=mo(r)&&4!==e)return yo(t,-5);if(n.status===vo&&0!==t.avail_in)return yo(t,-5);if(0!==t.avail_in||0!==n.lookahead||0!==e&&n.status!==vo){var s=2===n.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(Ao(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=io._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(xo(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(xo(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(xo(t,!1),0===t.strm.avail_out)?1:2}(n,e):3===n.strategy?function(t,e){for(var r,n,o,i,a=t.window;;){if(t.lookahead<=co){if(Ao(t),t.lookahead<=co&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=a[o=t.strstart-1])===a[++o]&&n===a[++o]&&n===a[++o]){i=t.strstart+co;do{}while(n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&o<i);t.match_length=co-(i-o),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=io._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=io._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(xo(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(xo(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(xo(t,!1),0===t.strm.avail_out)?1:2}(n,e):oo[n.level].func(n,e);if(3!==s&&4!==s||(n.status=vo),1===s||3===s)return 0===t.avail_out&&(n.last_flush=-1),0;if(2===s&&(1===e?io._tr_align(n):5!==e&&(io._tr_stored_block(n,0,0,!1),3===e&&(bo(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),wo(t),0===t.avail_out))return n.last_flush=-1,0}return 4!==e?0:n.wrap<=0?1:(2===n.wrap?(ko(n,255&t.adler),ko(n,t.adler>>8&255),ko(n,t.adler>>16&255),ko(n,t.adler>>24&255),ko(n,255&t.total_in),ko(n,t.total_in>>8&255),ko(n,t.total_in>>16&255),ko(n,t.total_in>>24&255)):(Fo(n,t.adler>>>16),Fo(n,65535&t.adler)),wo(t),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?0:1)},deflateEnd:function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&e!==po&&e!==go&&e!==vo?yo(t,uo):(t.state=null,e===go?yo(t,-3):0):uo},deflateSetDictionary:function(t,e){var r,n,o,i,a,s,l,h,u=e.length;if(!t||!t.state)return uo;if(2===(i=(r=t.state).wrap)||1===i&&42!==r.status||r.lookahead)return uo;for(1===i&&(t.adler=ao(t.adler,e,u,0)),r.wrap=0,u>=r.w_size&&(0===i&&(bo(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new Cn.Buf8(r.w_size),Cn.arraySet(h,e,u-r.w_size,r.w_size,0),e=h,u=r.w_size),a=t.avail_in,s=t.next_in,l=t.input,t.avail_in=u,t.next_in=0,t.input=e,Ao(r);r.lookahead>=3;){n=r.strstart,o=r.lookahead-2;do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--o);r.strstart=n,r.lookahead=2,Ao(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,t.next_in=s,t.input=l,t.avail_in=a,r.wrap=i,0},deflateInfo:"pako deflate (from Nodeca project)"},Eo=!0,jo=!0;try{String.fromCharCode.apply(null,[0])}catch(t){Eo=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){jo=!1}for(var Io=new Cn.Buf8(256),Mo=0;Mo<256;Mo++)Io[Mo]=Mo>=252?6:Mo>=248?5:Mo>=240?4:Mo>=224?3:Mo>=192?2:1;function Uo(t,e){if(e<65534&&(t.subarray&&jo||!t.subarray&&Eo))return String.fromCharCode.apply(null,Cn.shrinkBuf(t,e));for(var r="",n=0;n<e;n++)r+=String.fromCharCode(t[n]);return r}Io[254]=Io[254]=1;var Vo=function(t){var e,r,n,o,i,a=t.length,s=0;for(o=0;o<a;o++)55296==(64512&(r=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(n=t.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),s+=r<128?1:r<2048?2:r<65536?3:4;for(e=new Cn.Buf8(s),i=0,o=0;i<s;o++)55296==(64512&(r=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(n=t.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),r<128?e[i++]=r:r<2048?(e[i++]=192|r>>>6,e[i++]=128|63&r):r<65536?(e[i++]=224|r>>>12,e[i++]=128|r>>>6&63,e[i++]=128|63&r):(e[i++]=240|r>>>18,e[i++]=128|r>>>12&63,e[i++]=128|r>>>6&63,e[i++]=128|63&r);return e},Wo=function(t){return Uo(t,t.length)},qo=function(t,e){var r,n,o,i,a=e||t.length,s=new Array(2*a);for(n=0,r=0;r<a;)if((o=t[r++])<128)s[n++]=o;else if((i=Io[o])>4)s[n++]=65533,r+=i-1;else{for(o&=2===i?31:3===i?15:7;i>1&&r<a;)o=o<<6|63&t[r++],i--;i>1?s[n++]=65533:o<65536?s[n++]=o:(o-=65536,s[n++]=55296|o>>10&1023,s[n++]=56320|1023&o)}return Uo(s,n)},Lo=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+Io[t[r]]>e?r:e},Ko=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},Go=Object.prototype.toString;function Ho(t){if(!(this instanceof Ho))return new Ho(t);this.options=Cn.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var 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 Ko,this.strm.avail_out=0;var r=No.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==r)throw new Error(ho[r]);if(e.header&&No.deflateSetHeader(this.strm,e.header),e.dictionary){var n;if(n="string"==typeof e.dictionary?Vo(e.dictionary):"[object ArrayBuffer]"===Go.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(r=No.deflateSetDictionary(this.strm,n)))throw new Error(ho[r]);this._dict_set=!0}}function _o(t,e){var r=new Ho(e);if(r.push(t,!0),r.err)throw r.msg||ho[r.err];return r.result}Ho.prototype.push=function(t,e){var r,n,o=this.strm,i=this.options.chunkSize;if(this.ended)return!1;n=e===~~e?e:!0===e?4:0,"string"==typeof t?o.input=Vo(t):"[object ArrayBuffer]"===Go.call(t)?o.input=new Uint8Array(t):o.input=t,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new Cn.Buf8(i),o.next_out=0,o.avail_out=i),1!==(r=No.deflate(o,n))&&0!==r)return this.onEnd(r),this.ended=!0,!1;0!==o.avail_out&&(0!==o.avail_in||4!==n&&2!==n)||("string"===this.options.to?this.onData(Wo(Cn.shrinkBuf(o.output,o.next_out))):this.onData(Cn.shrinkBuf(o.output,o.next_out)))}while((o.avail_in>0||0===o.avail_out)&&1!==r);return 4===n?(r=No.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==n||(this.onEnd(0),o.avail_out=0,!0)},Ho.prototype.onData=function(t){this.chunks.push(t)},Ho.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Cn.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Xo={Deflate:Ho,deflate:_o,deflateRaw:function(t,e){return(e=e||{}).raw=!0,_o(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,_o(t,e)}},Zo=function(t,e){var r,n,o,i,a,s,l,h,u,c,d,f,p,g,v,y,m,b,w,x,k,F,S,C,A;r=t.state,n=t.next_in,C=t.input,o=n+(t.avail_in-5),i=t.next_out,A=t.output,a=i-(e-t.avail_out),s=i+(t.avail_out-257),l=r.dmax,h=r.wsize,u=r.whave,c=r.wnext,d=r.window,f=r.hold,p=r.bits,g=r.lencode,v=r.distcode,y=(1<<r.lenbits)-1,m=(1<<r.distbits)-1;t:do{p<15&&(f+=C[n++]<<p,p+=8,f+=C[n++]<<p,p+=8),b=g[f&y];e:for(;;){if(f>>>=w=b>>>24,p-=w,0==(w=b>>>16&255))A[i++]=65535&b;else{if(!(16&w)){if(64&w){if(32&w){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}b=g[(65535&b)+(f&(1<<w)-1)];continue e}for(x=65535&b,(w&=15)&&(p<w&&(f+=C[n++]<<p,p+=8),x+=f&(1<<w)-1,f>>>=w,p-=w),p<15&&(f+=C[n++]<<p,p+=8,f+=C[n++]<<p,p+=8),b=v[f&m];;){if(f>>>=w=b>>>24,p-=w,16&(w=b>>>16&255)){if(k=65535&b,p<(w&=15)&&(f+=C[n++]<<p,(p+=8)<w&&(f+=C[n++]<<p,p+=8)),(k+=f&(1<<w)-1)>l){t.msg="invalid distance too far back",r.mode=30;break t}if(f>>>=w,p-=w,k>(w=i-a)){if((w=k-w)>u&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(F=0,S=d,0===c){if(F+=h-w,w<x){x-=w;do{A[i++]=d[F++]}while(--w);F=i-k,S=A}}else if(c<w){if(F+=h+c-w,(w-=c)<x){x-=w;do{A[i++]=d[F++]}while(--w);if(F=0,c<x){x-=w=c;do{A[i++]=d[F++]}while(--w);F=i-k,S=A}}}else if(F+=c-w,w<x){x-=w;do{A[i++]=d[F++]}while(--w);F=i-k,S=A}for(;x>2;)A[i++]=S[F++],A[i++]=S[F++],A[i++]=S[F++],x-=3;x&&(A[i++]=S[F++],x>1&&(A[i++]=S[F++]))}else{F=i-k;do{A[i++]=A[F++],A[i++]=A[F++],A[i++]=A[F++],x-=3}while(x>2);x&&(A[i++]=A[F++],x>1&&(A[i++]=A[F++]))}break}if(64&w){t.msg="invalid distance code",r.mode=30;break t}b=v[(65535&b)+(f&(1<<w)-1)]}}break}}while(n<o&&i<s);n-=x=p>>3,f&=(1<<(p-=x<<3))-1,t.next_in=n,t.next_out=i,t.avail_in=n<o?o-n+5:5-(n-o),t.avail_out=i<s?s-i+257:257-(i-s),r.hold=f,r.bits=p},Yo=[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],Jo=[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],Qo=[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],$o=[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],ti=function(t,e,r,n,o,i,a,s){var l,h,u,c,d,f,p,g,v,y=s.bits,m=0,b=0,w=0,x=0,k=0,F=0,S=0,C=0,A=0,T=0,P=null,z=0,O=new Cn.Buf16(16),D=new Cn.Buf16(16),R=null,B=0;for(m=0;m<=15;m++)O[m]=0;for(b=0;b<n;b++)O[e[r+b]]++;for(k=y,x=15;x>=1&&0===O[x];x--);if(k>x&&(k=x),0===x)return o[i++]=20971520,o[i++]=20971520,s.bits=1,0;for(w=1;w<x&&0===O[w];w++);for(k<w&&(k=w),C=1,m=1;m<=15;m++)if(C<<=1,(C-=O[m])<0)return-1;if(C>0&&(0===t||1!==x))return-1;for(D[1]=0,m=1;m<15;m++)D[m+1]=D[m]+O[m];for(b=0;b<n;b++)0!==e[r+b]&&(a[D[e[r+b]]++]=b);if(0===t?(P=R=a,f=19):1===t?(P=Yo,z-=257,R=Jo,B-=257,f=256):(P=Qo,R=$o,f=-1),T=0,b=0,m=w,d=i,F=k,S=0,u=-1,c=(A=1<<k)-1,1===t&&A>852||2===t&&A>592)return 1;for(;;){p=m-S,a[b]<f?(g=0,v=a[b]):a[b]>f?(g=R[B+a[b]],v=P[z+a[b]]):(g=96,v=0),l=1<<m-S,w=h=1<<F;do{o[d+(T>>S)+(h-=l)]=p<<24|g<<16|v}while(0!==h);for(l=1<<m-1;T&l;)l>>=1;if(0!==l?(T&=l-1,T+=l):T=0,b++,0===--O[m]){if(m===x)break;m=e[r+a[b]]}if(m>k&&(T&c)!==u){for(0===S&&(S=k),d+=w,C=1<<(F=m-S);F+S<x&&!((C-=O[F+S])<=0);)F++,C<<=1;if(A+=1<<F,1===t&&A>852||2===t&&A>592)return 1;o[u=T&c]=k<<24|F<<16|d-i}}return 0!==T&&(o[d+T]=m-S<<24|64<<16),s.bits=k,0},ei=-2,ri=12,ni=30;function oi(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function ii(){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 Cn.Buf16(320),this.work=new Cn.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ai(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Cn.Buf32(852),e.distcode=e.distdyn=new Cn.Buf32(592),e.sane=1,e.back=-1,0):ei}function si(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,ai(t)):ei}function li(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?ei:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,si(t))):ei}function hi(t,e){var r,n;return t?(n=new ii,t.state=n,n.window=null,0!==(r=li(t,e))&&(t.state=null),r):ei}var ui,ci,di=!0;function fi(t){if(di){var e;for(ui=new Cn.Buf32(512),ci=new Cn.Buf32(32),e=0;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(ti(1,t.lens,0,288,ui,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ti(2,t.lens,0,32,ci,0,t.work,{bits:5}),di=!1}t.lencode=ui,t.lenbits=9,t.distcode=ci,t.distbits=5}function pi(t,e,r,n){var o,i=t.state;return null===i.window&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new Cn.Buf8(i.wsize)),n>=i.wsize?(Cn.arraySet(i.window,e,r-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize):((o=i.wsize-i.wnext)>n&&(o=n),Cn.arraySet(i.window,e,r-n,o,i.wnext),(n-=o)?(Cn.arraySet(i.window,e,r-n,n,0),i.wnext=n,i.whave=i.wsize):(i.wnext+=o,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=o))),0}var gi={inflateReset:si,inflateReset2:li,inflateResetKeep:ai,inflateInit:function(t){return hi(t,15)},inflateInit2:hi,inflate:function(t,e){var r,n,o,i,a,s,l,h,u,c,d,f,p,g,v,y,m,b,w,x,k,F,S,C,A=0,T=new Cn.Buf8(4),P=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return ei;(r=t.state).mode===ri&&(r.mode=13),a=t.next_out,o=t.output,l=t.avail_out,i=t.next_in,n=t.input,s=t.avail_in,h=r.hold,u=r.bits,c=s,d=l,F=0;t:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;u<16;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(2&r.wrap&&35615===h){r.check=0,T[0]=255&h,T[1]=h>>>8&255,r.check=lo(r.check,T,2,0),h=0,u=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",r.mode=ni;break}if(8!=(15&h)){t.msg="unknown compression method",r.mode=ni;break}if(u-=4,k=8+(15&(h>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){t.msg="invalid window size",r.mode=ni;break}r.dmax=1<<k,t.adler=r.check=1,r.mode=512&h?10:ri,h=0,u=0;break;case 2:for(;u<16;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(r.flags=h,8!=(255&r.flags)){t.msg="unknown compression method",r.mode=ni;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=ni;break}r.head&&(r.head.text=h>>8&1),512&r.flags&&(T[0]=255&h,T[1]=h>>>8&255,r.check=lo(r.check,T,2,0)),h=0,u=0,r.mode=3;case 3:for(;u<32;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}r.head&&(r.head.time=h),512&r.flags&&(T[0]=255&h,T[1]=h>>>8&255,T[2]=h>>>16&255,T[3]=h>>>24&255,r.check=lo(r.check,T,4,0)),h=0,u=0,r.mode=4;case 4:for(;u<16;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}r.head&&(r.head.xflags=255&h,r.head.os=h>>8),512&r.flags&&(T[0]=255&h,T[1]=h>>>8&255,r.check=lo(r.check,T,2,0)),h=0,u=0,r.mode=5;case 5:if(1024&r.flags){for(;u<16;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}r.length=h,r.head&&(r.head.extra_len=h),512&r.flags&&(T[0]=255&h,T[1]=h>>>8&255,r.check=lo(r.check,T,2,0)),h=0,u=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((f=r.length)>s&&(f=s),f&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),Cn.arraySet(r.head.extra,n,i,f,k)),512&r.flags&&(r.check=lo(r.check,n,f,i)),s-=f,i+=f,r.length-=f),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===s)break t;f=0;do{k=n[i+f++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k))}while(k&&f<s);if(512&r.flags&&(r.check=lo(r.check,n,f,i)),s-=f,i+=f,k)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===s)break t;f=0;do{k=n[i+f++],r.head&&k&&r.length<65536&&(r.head.comment+=String.fromCharCode(k))}while(k&&f<s);if(512&r.flags&&(r.check=lo(r.check,n,f,i)),s-=f,i+=f,k)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;u<16;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(h!==(65535&r.check)){t.msg="header crc mismatch",r.mode=ni;break}h=0,u=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=ri;break;case 10:for(;u<32;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}t.adler=r.check=oi(h),h=0,u=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=a,t.avail_out=l,t.next_in=i,t.avail_in=s,r.hold=h,r.bits=u,2;t.adler=r.check=1,r.mode=ri;case ri:if(5===e||6===e)break t;case 13:if(r.last){h>>>=7&u,u-=7&u,r.mode=27;break}for(;u<3;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}switch(r.last=1&h,u-=1,3&(h>>>=1)){case 0:r.mode=14;break;case 1:if(fi(r),r.mode=20,6===e){h>>>=2,u-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=ni}h>>>=2,u-=2;break;case 14:for(h>>>=7&u,u-=7&u;u<32;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if((65535&h)!=(h>>>16^65535)){t.msg="invalid stored block lengths",r.mode=ni;break}if(r.length=65535&h,h=0,u=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(f=r.length){if(f>s&&(f=s),f>l&&(f=l),0===f)break t;Cn.arraySet(o,n,i,f,a),s-=f,i+=f,l-=f,a+=f,r.length-=f;break}r.mode=ri;break;case 17:for(;u<14;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(r.nlen=257+(31&h),h>>>=5,u-=5,r.ndist=1+(31&h),h>>>=5,u-=5,r.ncode=4+(15&h),h>>>=4,u-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=ni;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;u<3;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}r.lens[P[r.have++]]=7&h,h>>>=3,u-=3}for(;r.have<19;)r.lens[P[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,S={bits:r.lenbits},F=ti(0,r.lens,0,19,r.lencode,0,r.work,S),r.lenbits=S.bits,F){t.msg="invalid code lengths set",r.mode=ni;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;y=(A=r.lencode[h&(1<<r.lenbits)-1])>>>16&255,m=65535&A,!((v=A>>>24)<=u);){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(m<16)h>>>=v,u-=v,r.lens[r.have++]=m;else{if(16===m){for(C=v+2;u<C;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(h>>>=v,u-=v,0===r.have){t.msg="invalid bit length repeat",r.mode=ni;break}k=r.lens[r.have-1],f=3+(3&h),h>>>=2,u-=2}else if(17===m){for(C=v+3;u<C;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}u-=v,k=0,f=3+(7&(h>>>=v)),h>>>=3,u-=3}else{for(C=v+7;u<C;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}u-=v,k=0,f=11+(127&(h>>>=v)),h>>>=7,u-=7}if(r.have+f>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=ni;break}for(;f--;)r.lens[r.have++]=k}}if(r.mode===ni)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=ni;break}if(r.lenbits=9,S={bits:r.lenbits},F=ti(1,r.lens,0,r.nlen,r.lencode,0,r.work,S),r.lenbits=S.bits,F){t.msg="invalid literal/lengths set",r.mode=ni;break}if(r.distbits=6,r.distcode=r.distdyn,S={bits:r.distbits},F=ti(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,S),r.distbits=S.bits,F){t.msg="invalid distances set",r.mode=ni;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(s>=6&&l>=258){t.next_out=a,t.avail_out=l,t.next_in=i,t.avail_in=s,r.hold=h,r.bits=u,Zo(t,d),a=t.next_out,o=t.output,l=t.avail_out,i=t.next_in,n=t.input,s=t.avail_in,h=r.hold,u=r.bits,r.mode===ri&&(r.back=-1);break}for(r.back=0;y=(A=r.lencode[h&(1<<r.lenbits)-1])>>>16&255,m=65535&A,!((v=A>>>24)<=u);){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(y&&!(240&y)){for(b=v,w=y,x=m;y=(A=r.lencode[x+((h&(1<<b+w)-1)>>b)])>>>16&255,m=65535&A,!(b+(v=A>>>24)<=u);){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}h>>>=b,u-=b,r.back+=b}if(h>>>=v,u-=v,r.back+=v,r.length=m,0===y){r.mode=26;break}if(32&y){r.back=-1,r.mode=ri;break}if(64&y){t.msg="invalid literal/length code",r.mode=ni;break}r.extra=15&y,r.mode=22;case 22:if(r.extra){for(C=r.extra;u<C;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}r.length+=h&(1<<r.extra)-1,h>>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;y=(A=r.distcode[h&(1<<r.distbits)-1])>>>16&255,m=65535&A,!((v=A>>>24)<=u);){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(!(240&y)){for(b=v,w=y,x=m;y=(A=r.distcode[x+((h&(1<<b+w)-1)>>b)])>>>16&255,m=65535&A,!(b+(v=A>>>24)<=u);){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}h>>>=b,u-=b,r.back+=b}if(h>>>=v,u-=v,r.back+=v,64&y){t.msg="invalid distance code",r.mode=ni;break}r.offset=m,r.extra=15&y,r.mode=24;case 24:if(r.extra){for(C=r.extra;u<C;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}r.offset+=h&(1<<r.extra)-1,h>>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=ni;break}r.mode=25;case 25:if(0===l)break t;if(f=d-l,r.offset>f){if((f=r.offset-f)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=ni;break}f>r.wnext?(f-=r.wnext,p=r.wsize-f):p=r.wnext-f,f>r.length&&(f=r.length),g=r.window}else g=o,p=a-r.offset,f=r.length;f>l&&(f=l),l-=f,r.length-=f;do{o[a++]=g[p++]}while(--f);0===r.length&&(r.mode=21);break;case 26:if(0===l)break t;o[a++]=r.length,l--,r.mode=21;break;case 27:if(r.wrap){for(;u<32;){if(0===s)break t;s--,h|=n[i++]<<u,u+=8}if(d-=l,t.total_out+=d,r.total+=d,d&&(t.adler=r.check=r.flags?lo(r.check,o,d,a-d):ao(r.check,o,d,a-d)),d=l,(r.flags?h:oi(h))!==r.check){t.msg="incorrect data check",r.mode=ni;break}h=0,u=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;u<32;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(h!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=ni;break}h=0,u=0}r.mode=29;case 29:F=1;break t;case ni:F=-3;break t;case 31:return-4;default:return ei}return t.next_out=a,t.avail_out=l,t.next_in=i,t.avail_in=s,r.hold=h,r.bits=u,(r.wsize||d!==t.avail_out&&r.mode<ni&&(r.mode<27||4!==e))&&pi(t,t.output,t.next_out,d-t.avail_out),c-=t.avail_in,d-=t.avail_out,t.total_in+=c,t.total_out+=d,r.total+=d,r.wrap&&d&&(t.adler=r.check=r.flags?lo(r.check,o,d,t.next_out-d):ao(r.check,o,d,t.next_out-d)),t.data_type=r.bits+(r.last?64:0)+(r.mode===ri?128:0)+(20===r.mode||15===r.mode?256:0),(0===c&&0===d||4===e)&&0===F&&(F=-5),F},inflateEnd:function(t){if(!t||!t.state)return ei;var e=t.state;return e.window&&(e.window=null),t.state=null,0},inflateGetHeader:function(t,e){var r;return t&&t.state&&2&(r=t.state).wrap?(r.head=e,e.done=!1,0):ei},inflateSetDictionary:function(t,e){var r,n=e.length;return t&&t.state?0!==(r=t.state).wrap&&11!==r.mode?ei:11===r.mode&&ao(1,e,n,0)!==r.check?-3:pi(t,e,n,n)?(r.mode=31,-4):(r.havedict=1,0):ei},inflateInfo:"pako inflate (from Nodeca project)"},vi={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},yi=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},mi=Object.prototype.toString;function bi(t){if(!(this instanceof bi))return new bi(t);this.options=Cn.assign({chunkSize:16384,windowBits:0,to:""},t||{});var 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||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ko,this.strm.avail_out=0;var r=gi.inflateInit2(this.strm,e.windowBits);if(r!==vi.Z_OK)throw new Error(ho[r]);if(this.header=new yi,gi.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Vo(e.dictionary):"[object ArrayBuffer]"===mi.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=gi.inflateSetDictionary(this.strm,e.dictionary))!==vi.Z_OK))throw new Error(ho[r])}function wi(t,e){var r=new bi(e);if(r.push(t,!0),r.err)throw r.msg||ho[r.err];return r.result}bi.prototype.push=function(t,e){var r,n,o,i,a,s=this.strm,l=this.options.chunkSize,h=this.options.dictionary,u=!1;if(this.ended)return!1;n=e===~~e?e:!0===e?vi.Z_FINISH:vi.Z_NO_FLUSH,"string"==typeof t?s.input=function(t){for(var e=new Cn.Buf8(t.length),r=0,n=e.length;r<n;r++)e[r]=t.charCodeAt(r);return e}(t):"[object ArrayBuffer]"===mi.call(t)?s.input=new Uint8Array(t):s.input=t,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new Cn.Buf8(l),s.next_out=0,s.avail_out=l),(r=gi.inflate(s,vi.Z_NO_FLUSH))===vi.Z_NEED_DICT&&h&&(r=gi.inflateSetDictionary(this.strm,h)),r===vi.Z_BUF_ERROR&&!0===u&&(r=vi.Z_OK,u=!1),r!==vi.Z_STREAM_END&&r!==vi.Z_OK)return this.onEnd(r),this.ended=!0,!1;s.next_out&&(0!==s.avail_out&&r!==vi.Z_STREAM_END&&(0!==s.avail_in||n!==vi.Z_FINISH&&n!==vi.Z_SYNC_FLUSH)||("string"===this.options.to?(o=Lo(s.output,s.next_out),i=s.next_out-o,a=qo(s.output,o),s.next_out=i,s.avail_out=l-i,i&&Cn.arraySet(s.output,s.output,o,i,0),this.onData(a)):this.onData(Cn.shrinkBuf(s.output,s.next_out)))),0===s.avail_in&&0===s.avail_out&&(u=!0)}while((s.avail_in>0||0===s.avail_out)&&r!==vi.Z_STREAM_END);return r===vi.Z_STREAM_END&&(n=vi.Z_FINISH),n===vi.Z_FINISH?(r=gi.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===vi.Z_OK):n!==vi.Z_SYNC_FLUSH||(this.onEnd(vi.Z_OK),s.avail_out=0,!0)},bi.prototype.onData=function(t){this.chunks.push(t)},bi.prototype.onEnd=function(t){t===vi.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Cn.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var xi={Inflate:bi,inflate:wi,inflateRaw:function(t,e){return(e=e||{}).raw=!0,wi(t,e)},ungzip:wi},ki={};(0,Cn.assign)(ki,Xo,xi,vi);var Fi=ki,Si=function(){function t(t,e){this.major=String(t),this.minor=String(e)}return t.prototype.toString=function(){var t=m(129);return"%PDF-"+this.major+"."+this.minor+"\n%"+t+t+t+t},t.prototype.sizeInBytes=function(){return 12+this.major.length+this.minor.length},t.prototype.copyBytesInto=function(t,e){var r=e;return t[e++]=Sn.Percent,t[e++]=Sn.P,t[e++]=Sn.D,t[e++]=Sn.F,t[e++]=Sn.Dash,e+=x(this.major,t,e),t[e++]=Sn.Period,e+=x(this.minor,t,e),t[e++]=Sn.Newline,t[e++]=Sn.Percent,t[e++]=129,t[e++]=129,t[e++]=129,t[e++]=129,e-r},t.forVersion=function(e,r){return new t(e,r)},t}(),Ci=function(){function t(){}return t.prototype.clone=function(t){throw new Zr(this.constructor.name,"clone")},t.prototype.toString=function(){throw new Zr(this.constructor.name,"toString")},t.prototype.sizeInBytes=function(){throw new Zr(this.constructor.name,"sizeInBytes")},t.prototype.copyBytesInto=function(t,e){throw new Zr(this.constructor.name,"copyBytesInto")},t}(),Ai=function(t){function r(e){var r=t.call(this)||this;return r.numberValue=e,r.stringValue=lt(e),r}return e(r,t),r.prototype.asNumber=function(){return this.numberValue},r.prototype.value=function(){return this.numberValue},r.prototype.clone=function(){return r.of(this.numberValue)},r.prototype.toString=function(){return this.stringValue},r.prototype.sizeInBytes=function(){return this.stringValue.length},r.prototype.copyBytesInto=function(t,e){return e+=x(this.stringValue,t,e),this.stringValue.length},r.of=function(t){return new r(t)},r}(Ci),Ti=function(t){function r(e){var r=t.call(this)||this;return r.array=[],r.context=e,r}return e(r,t),r.prototype.size=function(){return this.array.length},r.prototype.push=function(t){this.array.push(t)},r.prototype.insert=function(t,e){this.array.splice(t,0,e)},r.prototype.indexOf=function(t){var e=this.array.indexOf(t);return-1===e?void 0:e},r.prototype.remove=function(t){this.array.splice(t,1)},r.prototype.set=function(t,e){this.array[t]=e},r.prototype.get=function(t){return this.array[t]},r.prototype.lookupMaybe=function(t){for(var e,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return(e=this.context).lookupMaybe.apply(e,i([this.get(t)],r))},r.prototype.lookup=function(t){for(var e,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return(e=this.context).lookup.apply(e,i([this.get(t)],r))},r.prototype.asRectangle=function(){if(4!==this.size())throw new on(this.size());var t=this.lookup(0,Ai).asNumber(),e=this.lookup(1,Ai).asNumber();return{x:t,y:e,width:this.lookup(2,Ai).asNumber()-t,height:this.lookup(3,Ai).asNumber()-e}},r.prototype.asArray=function(){return this.array.slice()},r.prototype.clone=function(t){for(var e=r.withContext(t||this.context),n=0,o=this.size();n<o;n++)e.push(this.array[n]);return e},r.prototype.toString=function(){for(var t="[ ",e=0,r=this.size();e<r;e++)t+=this.get(e).toString(),t+=" ";return t+"]"},r.prototype.sizeInBytes=function(){for(var t=3,e=0,r=this.size();e<r;e++)t+=this.get(e).sizeInBytes()+1;return t},r.prototype.copyBytesInto=function(t,e){var r=e;t[e++]=Sn.LeftSquareBracket,t[e++]=Sn.Space;for(var n=0,o=this.size();n<o;n++)e+=this.get(n).copyBytesInto(t,e),t[e++]=Sn.Space;return t[e++]=Sn.RightSquareBracket,e-r},r.prototype.scalePDFNumbers=function(t,e){for(var r=0,n=this.size();r<n;r++){var o=this.lookup(r);if(o instanceof Ai){var i=r%2==0?t:e;this.set(r,Ai.of(o.asNumber()*i))}}},r.withContext=function(t){return new r(t)},r}(Ci),Pi={},zi=function(t){function r(e,r){var n=this;if(e!==Pi)throw new Yr("PDFBool");return(n=t.call(this)||this).value=r,n}return e(r,t),r.prototype.asBoolean=function(){return this.value},r.prototype.clone=function(){return this},r.prototype.toString=function(){return String(this.value)},r.prototype.sizeInBytes=function(){return this.value?4:5},r.prototype.copyBytesInto=function(t,e){return this.value?(t[e++]=Sn.t,t[e++]=Sn.r,t[e++]=Sn.u,t[e++]=Sn.e,4):(t[e++]=Sn.f,t[e++]=Sn.a,t[e++]=Sn.l,t[e++]=Sn.s,t[e++]=Sn.e,5)},r.True=new r(Pi,!0),r.False=new r(Pi,!1),r}(Ci),Oi=new Uint8Array(256);Oi[Sn.LeftParen]=1,Oi[Sn.RightParen]=1,Oi[Sn.LessThan]=1,Oi[Sn.GreaterThan]=1,Oi[Sn.LeftSquareBracket]=1,Oi[Sn.RightSquareBracket]=1,Oi[Sn.LeftCurly]=1,Oi[Sn.RightCurly]=1,Oi[Sn.ForwardSlash]=1,Oi[Sn.Percent]=1;var Di=new Uint8Array(256);Di[Sn.Null]=1,Di[Sn.Tab]=1,Di[Sn.Newline]=1,Di[Sn.FormFeed]=1,Di[Sn.CarriageReturn]=1,Di[Sn.Space]=1;for(var Ri=new Uint8Array(256),Bi=0;Bi<256;Bi++)Ri[Bi]=Di[Bi]||Oi[Bi]?1:0;Ri[Sn.Hash]=1;var Ni,Ei=function(t){return t>=Sn.ExclamationPoint&&t<=Sn.Tilde&&!Ri[t]},ji={},Ii=new Map,Mi=function(t){function r(e,r){var n=this;if(e!==ji)throw new Yr("PDFName");n=t.call(this)||this;for(var o="/",i=0,a=r.length;i<a;i++){var s=r[i],l=p(s);o+=Ei(l)?s:"#"+y(l)}return n.encodedName=o,n}return e(r,t),r.prototype.asBytes=function(){for(var t=[],e="",r=!1,n=function(e){void 0!==e&&t.push(e),r=!1},o=1,i=this.encodedName.length;o<i;o++){var a=this.encodedName[o],s=p(a),l=this.encodedName[o+1];r?s>=Sn.Zero&&s<=Sn.Nine||s>=Sn.a&&s<=Sn.f||s>=Sn.A&&s<=Sn.F?2!==(e+=a).length&&(l>="0"&&l<="9"||l>="a"&&l<="f"||l>="A"&&l<="F")||(n(parseInt(e,16)),e=""):n(s):s===Sn.Hash?r=!0:n(s)}return new Uint8Array(t)},r.prototype.decodeText=function(){var t=this.asBytes();return String.fromCharCode.apply(String,Array.from(t))},r.prototype.asString=function(){return this.encodedName},r.prototype.value=function(){return this.encodedName},r.prototype.clone=function(){return this},r.prototype.toString=function(){return this.encodedName},r.prototype.sizeInBytes=function(){return this.encodedName.length},r.prototype.copyBytesInto=function(t,e){return e+=x(this.encodedName,t,e),this.encodedName.length},r.of=function(t){var e=function(t){return t.replace(/#([\dABCDEF]{2})/g,function(t,e){return b(e)})}(t),n=Ii.get(e);return n||(n=new r(ji,e),Ii.set(e,n)),n},r.Length=r.of("Length"),r.FlateDecode=r.of("FlateDecode"),r.Resources=r.of("Resources"),r.Font=r.of("Font"),r.XObject=r.of("XObject"),r.ExtGState=r.of("ExtGState"),r.Contents=r.of("Contents"),r.Type=r.of("Type"),r.Parent=r.of("Parent"),r.MediaBox=r.of("MediaBox"),r.Page=r.of("Page"),r.Annots=r.of("Annots"),r.TrimBox=r.of("TrimBox"),r.ArtBox=r.of("ArtBox"),r.BleedBox=r.of("BleedBox"),r.CropBox=r.of("CropBox"),r.Rotate=r.of("Rotate"),r.Title=r.of("Title"),r.Author=r.of("Author"),r.Subject=r.of("Subject"),r.Creator=r.of("Creator"),r.Keywords=r.of("Keywords"),r.Producer=r.of("Producer"),r.CreationDate=r.of("CreationDate"),r.ModDate=r.of("ModDate"),r}(Ci),Ui=new(function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.asNull=function(){return null},r.prototype.clone=function(){return this},r.prototype.toString=function(){return"null"},r.prototype.sizeInBytes=function(){return 4},r.prototype.copyBytesInto=function(t,e){return t[e++]=Sn.n,t[e++]=Sn.u,t[e++]=Sn.l,t[e++]=Sn.l,4},r}(Ci)),Vi=function(t){function r(e,r){var n=t.call(this)||this;return n.dict=e,n.context=r,n}return e(r,t),r.prototype.keys=function(){return Array.from(this.dict.keys())},r.prototype.values=function(){return Array.from(this.dict.values())},r.prototype.entries=function(){return Array.from(this.dict.entries())},r.prototype.set=function(t,e){this.dict.set(t,e)},r.prototype.get=function(t,e){void 0===e&&(e=!1);var r=this.dict.get(t);if(r!==Ui||e)return r},r.prototype.has=function(t){var e=this.dict.get(t);return void 0!==e&&e!==Ui},r.prototype.lookupMaybe=function(t){for(var e,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var o=r.includes(Ui),a=(e=this.context).lookupMaybe.apply(e,i([this.get(t,o)],r));if(a!==Ui||o)return a},r.prototype.lookup=function(t){for(var e,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var o=r.includes(Ui),a=(e=this.context).lookup.apply(e,i([this.get(t,o)],r));if(a!==Ui||o)return a},r.prototype.delete=function(t){return this.dict.delete(t)},r.prototype.asMap=function(){return new Map(this.dict)},r.prototype.uniqueKey=function(t){void 0===t&&(t="");for(var e=this.keys(),r=Mi.of(this.context.addRandomSuffix(t,10));e.includes(r);)r=Mi.of(this.context.addRandomSuffix(t,10));return r},r.prototype.clone=function(t){for(var e=r.withContext(t||this.context),n=this.entries(),o=0,i=n.length;o<i;o++){var a=n[o],s=a[0],l=a[1];e.set(s,l)}return e},r.prototype.toString=function(){for(var t="<<\n",e=this.entries(),r=0,n=e.length;r<n;r++){var o=e[r],i=o[0],a=o[1];t+=i.toString()+" "+a.toString()+"\n"}return t+">>"},r.prototype.sizeInBytes=function(){for(var t=5,e=this.entries(),r=0,n=e.length;r<n;r++){var o=e[r],i=o[0],a=o[1];t+=i.sizeInBytes()+a.sizeInBytes()+2}return t},r.prototype.copyBytesInto=function(t,e){var r=e;t[e++]=Sn.LessThan,t[e++]=Sn.LessThan,t[e++]=Sn.Newline;for(var n=this.entries(),o=0,i=n.length;o<i;o++){var a=n[o],s=a[0],l=a[1];e+=s.copyBytesInto(t,e),t[e++]=Sn.Space,e+=l.copyBytesInto(t,e),t[e++]=Sn.Newline}return t[e++]=Sn.GreaterThan,t[e++]=Sn.GreaterThan,e-r},r.withContext=function(t){return new r(new Map,t)},r.fromMapWithContext=function(t,e){return new r(t,e)},r}(Ci),Wi=function(t){function r(e){var r=t.call(this)||this;return r.dict=e,r}return e(r,t),r.prototype.clone=function(t){throw new Zr(this.constructor.name,"clone")},r.prototype.getContentsString=function(){throw new Zr(this.constructor.name,"getContentsString")},r.prototype.getContents=function(){throw new Zr(this.constructor.name,"getContents")},r.prototype.getContentsSize=function(){throw new Zr(this.constructor.name,"getContentsSize")},r.prototype.updateDict=function(){var t=this.getContentsSize();this.dict.set(Mi.Length,Ai.of(t))},r.prototype.sizeInBytes=function(){return this.updateDict(),this.dict.sizeInBytes()+this.getContentsSize()+18},r.prototype.toString=function(){this.updateDict();var t=this.dict.toString();return t+="\nstream\n",(t+=this.getContentsString())+"\nendstream"},r.prototype.copyBytesInto=function(t,e){this.updateDict();var r=e;e+=this.dict.copyBytesInto(t,e),t[e++]=Sn.Newline,t[e++]=Sn.s,t[e++]=Sn.t,t[e++]=Sn.r,t[e++]=Sn.e,t[e++]=Sn.a,t[e++]=Sn.m,t[e++]=Sn.Newline;for(var n=this.getContents(),o=0,i=n.length;o<i;o++)t[e++]=n[o];return t[e++]=Sn.Newline,t[e++]=Sn.e,t[e++]=Sn.n,t[e++]=Sn.d,t[e++]=Sn.s,t[e++]=Sn.t,t[e++]=Sn.r,t[e++]=Sn.e,t[e++]=Sn.a,t[e++]=Sn.m,e-r},r}(Ci),qi=function(t){function r(e,r){var n=t.call(this,e)||this;return n.contents=r,n}return e(r,t),r.prototype.asUint8Array=function(){return this.contents.slice()},r.prototype.clone=function(t){return r.of(this.dict.clone(t),this.contents.slice())},r.prototype.getContentsString=function(){return M(this.contents)},r.prototype.getContents=function(){return this.contents},r.prototype.getContentsSize=function(){return this.contents.length},r.of=function(t,e){return new r(t,e)},r}(Wi),Li={},Ki=new Map,Gi=function(t){function r(e,r,n){var o=this;if(e!==Li)throw new Yr("PDFRef");return(o=t.call(this)||this).objectNumber=r,o.generationNumber=n,o.tag=r+" "+n+" R",o}return e(r,t),r.prototype.clone=function(){return this},r.prototype.toString=function(){return this.tag},r.prototype.sizeInBytes=function(){return this.tag.length},r.prototype.copyBytesInto=function(t,e){return e+=x(this.tag,t,e),this.tag.length},r.of=function(t,e){void 0===e&&(e=0);var n=t+" "+e+" R",o=Ki.get(n);return o||(o=new r(Li,t,e),Ki.set(n,o)),o},r}(Ci),Hi=function(){function t(t,e){this.name=t,this.args=e||[]}return t.prototype.clone=function(e){for(var r=new Array(this.args.length),n=0,o=r.length;n<o;n++){var i=this.args[n];r[n]=i instanceof Ci?i.clone(e):i}return t.of(this.name,r)},t.prototype.toString=function(){for(var t="",e=0,r=this.args.length;e<r;e++)t+=String(this.args[e])+" ";return t+this.name},t.prototype.sizeInBytes=function(){for(var t=0,e=0,r=this.args.length;e<r;e++){var n=this.args[e];t+=(n instanceof Ci?n.sizeInBytes():n.length)+1}return t+this.name.length},t.prototype.copyBytesInto=function(t,e){for(var r=e,n=0,o=this.args.length;n<o;n++){var i=this.args[n];e+=i instanceof Ci?i.copyBytesInto(t,e):x(i,t,e),t[e++]=Sn.Space}return(e+=x(this.name,t,e))-r},t.of=function(e,r){return new t(e,r)},t}();!function(t){t.NonStrokingColor="sc",t.NonStrokingColorN="scn",t.NonStrokingColorRgb="rg",t.NonStrokingColorGray="g",t.NonStrokingColorCmyk="k",t.NonStrokingColorspace="cs",t.StrokingColor="SC",t.StrokingColorN="SCN",t.StrokingColorRgb="RG",t.StrokingColorGray="G",t.StrokingColorCmyk="K",t.StrokingColorspace="CS",t.BeginMarkedContentSequence="BDC",t.BeginMarkedContent="BMC",t.EndMarkedContent="EMC",t.MarkedContentPointWithProps="DP",t.MarkedContentPoint="MP",t.DrawObject="Do",t.ConcatTransformationMatrix="cm",t.PopGraphicsState="Q",t.PushGraphicsState="q",t.SetFlatness="i",t.SetGraphicsStateParams="gs",t.SetLineCapStyle="J",t.SetLineDashPattern="d",t.SetLineJoinStyle="j",t.SetLineMiterLimit="M",t.SetLineWidth="w",t.SetTextMatrix="Tm",t.SetRenderingIntent="ri",t.AppendRectangle="re",t.BeginInlineImage="BI",t.BeginInlineImageData="ID",t.EndInlineImage="EI",t.ClipEvenOdd="W*",t.ClipNonZero="W",t.CloseAndStroke="s",t.CloseFillEvenOddAndStroke="b*",t.CloseFillNonZeroAndStroke="b",t.ClosePath="h",t.AppendBezierCurve="c",t.CurveToReplicateFinalPoint="y",t.CurveToReplicateInitialPoint="v",t.EndPath="n",t.FillEvenOddAndStroke="B*",t.FillEvenOdd="f*",t.FillNonZeroAndStroke="B",t.FillNonZero="f",t.LegacyFillNonZero="F",t.LineTo="l",t.MoveTo="m",t.ShadingFill="sh",t.StrokePath="S",t.BeginText="BT",t.EndText="ET",t.MoveText="Td",t.MoveTextSetLeading="TD",t.NextLine="T*",t.SetCharacterSpacing="Tc",t.SetFontAndSize="Tf",t.SetTextHorizontalScaling="Tz",t.SetTextLineHeight="TL",t.SetTextRenderingMode="Tr",t.SetTextRise="Ts",t.SetWordSpacing="Tw",t.ShowText="Tj",t.ShowTextAdjusted="TJ",t.ShowTextLine="'",t.ShowTextLineAndSpace='"',t.Type3D0="d0",t.Type3D1="d1",t.BeginCompatibilitySection="BX",t.EndCompatibilitySection="EX"}(Ni||(Ni={}));var _i,Xi=Ni,Zi=function(t){function r(e,r){var n=t.call(this,e)||this;return n.computeContents=function(){var t=n.getUnencodedContents();return n.encode?Fi.deflate(t):t},n.encode=r,r&&e.set(Mi.of("Filter"),Mi.of("FlateDecode")),n.contentsCache=Xr.populatedBy(n.computeContents),n}return e(r,t),r.prototype.getContents=function(){return this.contentsCache.access()},r.prototype.getContentsSize=function(){return this.contentsCache.access().length},r.prototype.getUnencodedContents=function(){throw new Zr(this.constructor.name,"getUnencodedContents")},r}(Wi),Yi=function(t){function r(e,r,n){void 0===n&&(n=!0);var o=t.call(this,e,n)||this;return o.operators=r,o}return e(r,t),r.prototype.push=function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];(t=this.operators).push.apply(t,e)},r.prototype.clone=function(t){for(var e=new Array(this.operators.length),n=0,o=this.operators.length;n<o;n++)e[n]=this.operators[n].clone(t);var i=this.dict,a=this.encode;return r.of(i.clone(t),e,a)},r.prototype.getContentsString=function(){for(var t="",e=0,r=this.operators.length;e<r;e++)t+=this.operators[e]+"\n";return t},r.prototype.getUnencodedContents=function(){for(var t=new Uint8Array(this.getUnencodedContentsSize()),e=0,r=0,n=this.operators.length;r<n;r++)e+=this.operators[r].copyBytesInto(t,e),t[e++]=Sn.Newline;return t},r.prototype.getUnencodedContentsSize=function(){for(var t=0,e=0,r=this.operators.length;e<r;e++)t+=this.operators[e].sizeInBytes()+1;return t},r.of=function(t,e,n){return void 0===n&&(n=!0),new r(t,e,n)},r}(Zi),Ji=function(){function t(t){this.seed=t}return t.prototype.nextInt=function(){var t=1e4*Math.sin(this.seed++);return t-Math.floor(t)},t.withSeed=function(e){return new t(e)},t}(),Qi=function(t,e){var r=t[0],n=e[0];return r.objectNumber-n.objectNumber},$i=function(){function t(){this.largestObjectNumber=0,this.header=Si.forVersion(1,7),this.trailerInfo={},this.indirectObjects=new Map,this.rng=Ji.withSeed(1)}return t.prototype.assign=function(t,e){this.indirectObjects.set(t,e),t.objectNumber>this.largestObjectNumber&&(this.largestObjectNumber=t.objectNumber)},t.prototype.nextRef=function(){return this.largestObjectNumber+=1,Gi.of(this.largestObjectNumber)},t.prototype.register=function(t){var e=this.nextRef();return this.assign(e,t),e},t.prototype.delete=function(t){return this.indirectObjects.delete(t)},t.prototype.lookupMaybe=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=e.includes(Ui),o=t instanceof Gi?this.indirectObjects.get(t):t;if(o&&(o!==Ui||n)){for(var i=0,a=e.length;i<a;i++){var s=e[i];if(s===Ui){if(o===Ui)return o}else if(o instanceof s)return o}throw new Jr(e,o)}},t.prototype.lookup=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=t instanceof Gi?this.indirectObjects.get(t):t;if(0===e.length)return n;for(var o=0,i=e.length;o<i;o++){var a=e[o];if(a===Ui){if(n===Ui)return n}else if(n instanceof a)return n}throw new Jr(e,n)},t.prototype.getObjectRef=function(t){for(var e=Array.from(this.indirectObjects.entries()),r=0,n=e.length;r<n;r++){var o=e[r],i=o[0];if(o[1]===t)return i}},t.prototype.enumerateIndirectObjects=function(){return Array.from(this.indirectObjects.entries()).sort(Qi)},t.prototype.obj=function(t){if(t instanceof Ci)return t;if(null==t)return Ui;if("string"==typeof t)return Mi.of(t);if("number"==typeof t)return Ai.of(t);if("boolean"==typeof t)return t?zi.True:zi.False;if(Array.isArray(t)){for(var e=Ti.withContext(this),r=0,n=t.length;r<n;r++)e.push(this.obj(t[r]));return e}var o=Vi.withContext(this),i=Object.keys(t);for(r=0,n=i.length;r<n;r++){var a=i[r],s=t[a];void 0!==s&&o.set(Mi.of(a),this.obj(s))}return o},t.prototype.stream=function(t,e){return void 0===e&&(e={}),qi.of(this.obj(e),E(t))},t.prototype.flateStream=function(t,e){return void 0===e&&(e={}),this.stream(Fi.deflate(E(t)),r(r({},e),{Filter:"FlateDecode"}))},t.prototype.contentStream=function(t,e){return void 0===e&&(e={}),Yi.of(this.obj(e),t)},t.prototype.formXObject=function(t,e){return void 0===e&&(e={}),this.contentStream(t,r(r({BBox:this.obj([0,0,0,0]),Matrix:this.obj([1,0,0,1,0,0])},e),{Type:"XObject",Subtype:"Form"}))},t.prototype.getPushGraphicsStateContentStream=function(){if(this.pushGraphicsStateContentStreamRef)return this.pushGraphicsStateContentStreamRef;var t=this.obj({}),e=Hi.of(Xi.PushGraphicsState),r=Yi.of(t,[e]);return this.pushGraphicsStateContentStreamRef=this.register(r),this.pushGraphicsStateContentStreamRef},t.prototype.getPopGraphicsStateContentStream=function(){if(this.popGraphicsStateContentStreamRef)return this.popGraphicsStateContentStreamRef;var t=this.obj({}),e=Hi.of(Xi.PopGraphicsState),r=Yi.of(t,[e]);return this.popGraphicsStateContentStreamRef=this.register(r),this.popGraphicsStateContentStreamRef},t.prototype.addRandomSuffix=function(t,e){return void 0===e&&(e=4),t+"-"+Math.floor(this.rng.nextInt()*Math.pow(10,e))},t.create=function(){return new t},t}(),ta=function(t){function r(e,r,n){void 0===n&&(n=!0);var o=t.call(this,e,r)||this;return o.normalized=!1,o.autoNormalizeCTM=n,o}return e(r,t),r.prototype.clone=function(t){for(var e=r.fromMapWithContext(new Map,t||this.context,this.autoNormalizeCTM),n=this.entries(),o=0,i=n.length;o<i;o++){var a=n[o],s=a[0],l=a[1];e.set(s,l)}return e},r.prototype.Parent=function(){return this.lookupMaybe(Mi.Parent,Vi)},r.prototype.Contents=function(){return this.lookup(Mi.of("Contents"))},r.prototype.Annots=function(){return this.lookupMaybe(Mi.Annots,Ti)},r.prototype.BleedBox=function(){return this.lookupMaybe(Mi.BleedBox,Ti)},r.prototype.TrimBox=function(){return this.lookupMaybe(Mi.TrimBox,Ti)},r.prototype.ArtBox=function(){return this.lookupMaybe(Mi.ArtBox,Ti)},r.prototype.Resources=function(){var t=this.getInheritableAttribute(Mi.Resources);return this.context.lookupMaybe(t,Vi)},r.prototype.MediaBox=function(){var t=this.getInheritableAttribute(Mi.MediaBox);return this.context.lookup(t,Ti)},r.prototype.CropBox=function(){var t=this.getInheritableAttribute(Mi.CropBox);return this.context.lookupMaybe(t,Ti)},r.prototype.Rotate=function(){var t=this.getInheritableAttribute(Mi.Rotate);return this.context.lookupMaybe(t,Ai)},r.prototype.getInheritableAttribute=function(t){var e;return this.ascend(function(r){e||(e=r.get(t))}),e},r.prototype.setParent=function(t){this.set(Mi.Parent,t)},r.prototype.addContentStream=function(t){var e=this.normalizedEntries().Contents||this.context.obj([]);this.set(Mi.Contents,e),e.push(t)},r.prototype.wrapContentStreams=function(t,e){var r=this.Contents();return r instanceof Ti&&(r.insert(0,t),r.push(e),!0)},r.prototype.addAnnot=function(t){this.normalizedEntries().Annots.push(t)},r.prototype.removeAnnot=function(t){var e=this.normalizedEntries().Annots,r=e.indexOf(t);void 0!==r&&e.remove(r)},r.prototype.setFontDictionary=function(t,e){this.normalizedEntries().Font.set(t,e)},r.prototype.newFontDictionaryKey=function(t){return this.normalizedEntries().Font.uniqueKey(t)},r.prototype.newFontDictionary=function(t,e){var r=this.newFontDictionaryKey(t);return this.setFontDictionary(r,e),r},r.prototype.setXObject=function(t,e){this.normalizedEntries().XObject.set(t,e)},r.prototype.newXObjectKey=function(t){return this.normalizedEntries().XObject.uniqueKey(t)},r.prototype.newXObject=function(t,e){var r=this.newXObjectKey(t);return this.setXObject(r,e),r},r.prototype.setExtGState=function(t,e){this.normalizedEntries().ExtGState.set(t,e)},r.prototype.newExtGStateKey=function(t){return this.normalizedEntries().ExtGState.uniqueKey(t)},r.prototype.newExtGState=function(t,e){var r=this.newExtGStateKey(t);return this.setExtGState(r,e),r},r.prototype.ascend=function(t){t(this);var e=this.Parent();e&&e.ascend(t)},r.prototype.normalize=function(){if(!this.normalized){var t=this.context,e=this.get(Mi.Contents);this.context.lookup(e)instanceof Wi&&this.set(Mi.Contents,t.obj([e])),this.autoNormalizeCTM&&this.wrapContentStreams(this.context.getPushGraphicsStateContentStream(),this.context.getPopGraphicsStateContentStream());var r=this.getInheritableAttribute(Mi.Resources),n=t.lookupMaybe(r,Vi)||t.obj({});this.set(Mi.Resources,n);var o=n.lookupMaybe(Mi.Font,Vi)||t.obj({});n.set(Mi.Font,o);var i=n.lookupMaybe(Mi.XObject,Vi)||t.obj({});n.set(Mi.XObject,i);var a=n.lookupMaybe(Mi.ExtGState,Vi)||t.obj({});n.set(Mi.ExtGState,a);var s=this.Annots()||t.obj([]);this.set(Mi.Annots,s),this.normalized=!0}},r.prototype.normalizedEntries=function(){this.normalize();var t=this.Annots(),e=this.Resources();return{Annots:t,Resources:e,Contents:this.Contents(),Font:e.lookup(Mi.Font,Vi),XObject:e.lookup(Mi.XObject,Vi),ExtGState:e.lookup(Mi.ExtGState,Vi)}},r.InheritableEntries=["Resources","MediaBox","CropBox","Rotate"],r.withContextAndParent=function(t,e){var n=new Map;return n.set(Mi.Type,Mi.Page),n.set(Mi.Parent,e),n.set(Mi.Resources,t.obj({})),n.set(Mi.MediaBox,t.obj([0,0,612,792])),new r(n,t,!1)},r.fromMapWithContext=function(t,e,n){return void 0===n&&(n=!0),new r(t,e,n)},r}(Vi),ea=function(){function t(t,e){var r=this;this.traversedObjects=new Map,this.copy=function(t){return t instanceof ta?r.copyPDFPage(t):t instanceof Vi?r.copyPDFDict(t):t instanceof Ti?r.copyPDFArray(t):t instanceof Wi?r.copyPDFStream(t):t instanceof Gi?r.copyPDFIndirectObject(t):t.clone()},this.copyPDFPage=function(t){for(var e=t.clone(),n=ta.InheritableEntries,o=0,i=n.length;o<i;o++){var a=Mi.of(n[o]),s=e.getInheritableAttribute(a);!e.get(a)&&s&&e.set(a,s)}return e.delete(Mi.of("Parent")),r.copyPDFDict(e)},this.copyPDFDict=function(t){if(r.traversedObjects.has(t))return r.traversedObjects.get(t);var e=t.clone(r.dest);r.traversedObjects.set(t,e);for(var n=t.entries(),o=0,i=n.length;o<i;o++){var a=n[o],s=a[0],l=a[1];e.set(s,r.copy(l))}return e},this.copyPDFArray=function(t){if(r.traversedObjects.has(t))return r.traversedObjects.get(t);var e=t.clone(r.dest);r.traversedObjects.set(t,e);for(var n=0,o=t.size();n<o;n++){var i=t.get(n);e.set(n,r.copy(i))}return e},this.copyPDFStream=function(t){if(r.traversedObjects.has(t))return r.traversedObjects.get(t);var e=t.clone(r.dest);r.traversedObjects.set(t,e);for(var n=t.dict.entries(),o=0,i=n.length;o<i;o++){var a=n[o],s=a[0],l=a[1];e.dict.set(s,r.copy(l))}return e},this.copyPDFIndirectObject=function(t){if(!r.traversedObjects.has(t)){var e=r.dest.nextRef();r.traversedObjects.set(t,e);var n=r.src.lookup(t);if(n){var o=r.copy(n);r.dest.assign(e,o)}}return r.traversedObjects.get(t)},this.src=t,this.dest=e}return t.for=function(e,r){return new t(e,r)},t}(),ra=function(){function t(t){this.subsections=t?[[t]]:[],this.chunkIdx=0,this.chunkLength=t?1:0}return t.prototype.addEntry=function(t,e){this.append({ref:t,offset:e,deleted:!1})},t.prototype.addDeletedEntry=function(t,e){this.append({ref:t,offset:e,deleted:!0})},t.prototype.toString=function(){for(var t="xref\n",e=0,r=this.subsections.length;e<r;e++){var n=this.subsections[e];t+=n[0].ref.objectNumber+" "+n.length+"\n";for(var o=0,i=n.length;o<i;o++){var a=n[o];t+=w(String(a.offset),10,"0"),t+=" ",t+=w(String(a.ref.generationNumber),5,"0"),t+=" ",t+=a.deleted?"f":"n",t+=" \n"}}return t},t.prototype.sizeInBytes=function(){for(var t=5,e=0,r=this.subsections.length;e<r;e++){var n=this.subsections[e],o=n.length,i=n[0];t+=2,t+=String(i.ref.objectNumber).length,t+=String(o).length,t+=20*o}return t},t.prototype.copyBytesInto=function(t,e){var r=e;return t[e++]=Sn.x,t[e++]=Sn.r,t[e++]=Sn.e,t[e++]=Sn.f,t[e++]=Sn.Newline,(e+=this.copySubsectionsIntoBuffer(this.subsections,t,e))-r},t.prototype.copySubsectionsIntoBuffer=function(t,e,r){for(var n=r,o=t.length,i=0;i<o;i++){var a=this.subsections[i],s=String(a[0].ref.objectNumber);r+=x(s,e,r),e[r++]=Sn.Space;var l=String(a.length);r+=x(l,e,r),e[r++]=Sn.Newline,r+=this.copyEntriesIntoBuffer(a,e,r)}return r-n},t.prototype.copyEntriesIntoBuffer=function(t,e,r){for(var n=t.length,o=0;o<n;o++){var i=t[o],a=w(String(i.offset),10,"0");r+=x(a,e,r),e[r++]=Sn.Space;var s=w(String(i.ref.generationNumber),5,"0");r+=x(s,e,r),e[r++]=Sn.Space,e[r++]=i.deleted?Sn.f:Sn.n,e[r++]=Sn.Space,e[r++]=Sn.Newline}return 20*n},t.prototype.append=function(t){if(0===this.chunkLength)return this.subsections.push([t]),this.chunkIdx=0,void(this.chunkLength=1);var e=this.subsections[this.chunkIdx],r=e[this.chunkLength-1];t.ref.objectNumber-r.ref.objectNumber>1?(this.subsections.push([t]),this.chunkIdx+=1,this.chunkLength=1):(e.push(t),this.chunkLength+=1)},t.create=function(){return new t({ref:Gi.of(0,65535),offset:0,deleted:!0})},t.createEmpty=function(){return new t},t}(),na=function(){function t(t){this.lastXRefOffset=String(t)}return t.prototype.toString=function(){return"startxref\n"+this.lastXRefOffset+"\n%%EOF"},t.prototype.sizeInBytes=function(){return 16+this.lastXRefOffset.length},t.prototype.copyBytesInto=function(t,e){var r=e;return t[e++]=Sn.s,t[e++]=Sn.t,t[e++]=Sn.a,t[e++]=Sn.r,t[e++]=Sn.t,t[e++]=Sn.x,t[e++]=Sn.r,t[e++]=Sn.e,t[e++]=Sn.f,t[e++]=Sn.Newline,e+=x(this.lastXRefOffset,t,e),t[e++]=Sn.Newline,t[e++]=Sn.Percent,t[e++]=Sn.Percent,t[e++]=Sn.E,t[e++]=Sn.O,t[e++]=Sn.F,e-r},t.forLastCrossRefSectionOffset=function(e){return new t(e)},t}(),oa=function(){function t(t){this.dict=t}return t.prototype.toString=function(){return"trailer\n"+this.dict.toString()},t.prototype.sizeInBytes=function(){return 8+this.dict.sizeInBytes()},t.prototype.copyBytesInto=function(t,e){var r=e;return t[e++]=Sn.t,t[e++]=Sn.r,t[e++]=Sn.a,t[e++]=Sn.i,t[e++]=Sn.l,t[e++]=Sn.e,t[e++]=Sn.r,t[e++]=Sn.Newline,(e+=this.dict.copyBytesInto(t,e))-r},t.of=function(e){return new t(e)},t}(),ia=function(t){function r(e,r,n){void 0===n&&(n=!0);var o=t.call(this,e.obj({}),n)||this;return o.objects=r,o.offsets=o.computeObjectOffsets(),o.offsetsString=o.computeOffsetsString(),o.dict.set(Mi.of("Type"),Mi.of("ObjStm")),o.dict.set(Mi.of("N"),Ai.of(o.objects.length)),o.dict.set(Mi.of("First"),Ai.of(o.offsetsString.length)),o}return e(r,t),r.prototype.getObjectsCount=function(){return this.objects.length},r.prototype.clone=function(t){return r.withContextAndObjects(t||this.dict.context,this.objects.slice(),this.encode)},r.prototype.getContentsString=function(){for(var t=this.offsetsString,e=0,r=this.objects.length;e<r;e++)t+=this.objects[e][1]+"\n";return t},r.prototype.getUnencodedContents=function(){for(var t=new Uint8Array(this.getUnencodedContentsSize()),e=x(this.offsetsString,t,0),r=0,n=this.objects.length;r<n;r++)e+=this.objects[r][1].copyBytesInto(t,e),t[e++]=Sn.Newline;return t},r.prototype.getUnencodedContentsSize=function(){return this.offsetsString.length+N(this.offsets)[1]+N(this.objects)[1].sizeInBytes()+1},r.prototype.computeOffsetsString=function(){for(var t="",e=0,r=this.offsets.length;e<r;e++){var n=this.offsets[e];t+=n[0]+" "+n[1]+" "}return t},r.prototype.computeObjectOffsets=function(){for(var t=0,e=new Array(this.objects.length),r=0,n=this.objects.length;r<n;r++){var o=this.objects[r],i=o[0],a=o[1];e[r]=[i.objectNumber,t],t+=a.sizeInBytes()+1}return e},r.withContextAndObjects=function(t,e,n){return void 0===n&&(n=!0),new r(t,e,n)},r}(Zi),aa=function(){function t(t,e){var r=this;this.parsedObjects=0,this.shouldWaitForTick=function(t){return r.parsedObjects+=t,r.parsedObjects%r.objectsPerTick===0},this.context=t,this.objectsPerTick=e}return t.prototype.serializeToBuffer=function(){return n(this,0,void 0,function(){var t,e,r,n,i,a,s,l,h,u,c,d,f,p,g,v,y;return o(this,function(o){switch(o.label){case 0:return[4,this.computeBufferSize()];case 1:t=o.sent(),e=t.size,r=t.header,n=t.indirectObjects,i=t.xref,a=t.trailerDict,s=t.trailer,l=0,h=new Uint8Array(e),l+=r.copyBytesInto(h,l),h[l++]=Sn.Newline,h[l++]=Sn.Newline,u=0,c=n.length,o.label=2;case 2:return u<c?(d=n[u],f=d[0],p=d[1],g=String(f.objectNumber),l+=x(g,h,l),h[l++]=Sn.Space,v=String(f.generationNumber),l+=x(v,h,l),h[l++]=Sn.Space,h[l++]=Sn.o,h[l++]=Sn.b,h[l++]=Sn.j,h[l++]=Sn.Newline,l+=p.copyBytesInto(h,l),h[l++]=Sn.Newline,h[l++]=Sn.e,h[l++]=Sn.n,h[l++]=Sn.d,h[l++]=Sn.o,h[l++]=Sn.b,h[l++]=Sn.j,h[l++]=Sn.Newline,h[l++]=Sn.Newline,y=p instanceof ia?p.getObjectsCount():1,this.shouldWaitForTick(y)?[4,_()]:[3,4]):[3,5];case 3:o.sent(),o.label=4;case 4:return u++,[3,2];case 5:return i&&(l+=i.copyBytesInto(h,l),h[l++]=Sn.Newline),a&&(l+=a.copyBytesInto(h,l),h[l++]=Sn.Newline,h[l++]=Sn.Newline),l+=s.copyBytesInto(h,l),[2,h]}})})},t.prototype.computeIndirectObjectSize=function(t){var e=t[0],r=t[1];return e.sizeInBytes()+3+(r.sizeInBytes()+9)},t.prototype.createTrailerDict=function(){return this.context.obj({Size:this.context.largestObjectNumber+1,Root:this.context.trailerInfo.Root,Encrypt:this.context.trailerInfo.Encrypt,Info:this.context.trailerInfo.Info,ID:this.context.trailerInfo.ID})},t.prototype.computeBufferSize=function(){return n(this,0,void 0,function(){var t,e,r,n,i,a,s,l,h,u,c;return o(this,function(o){switch(o.label){case 0:t=Si.forVersion(1,7),e=t.sizeInBytes()+2,r=ra.create(),n=this.context.enumerateIndirectObjects(),i=0,a=n.length,o.label=1;case 1:return i<a?(s=n[i],l=s[0],r.addEntry(l,e),e+=this.computeIndirectObjectSize(s),this.shouldWaitForTick(1)?[4,_()]:[3,3]):[3,4];case 2:o.sent(),o.label=3;case 3:return i++,[3,1];case 4:return h=e,e+=r.sizeInBytes()+1,u=oa.of(this.createTrailerDict()),e+=u.sizeInBytes()+2,c=na.forLastCrossRefSectionOffset(h),[2,{size:e+=c.sizeInBytes(),header:t,indirectObjects:n,xref:r,trailerDict:u,trailer:c}]}})})},t.forContext=function(e,r){return new t(e,r)},t}(),sa=function(t){function r(e){var r=t.call(this)||this;return r.data=e,r}return e(r,t),r.prototype.clone=function(){return r.of(this.data.slice())},r.prototype.toString=function(){return"PDFInvalidObject("+this.data.length+" bytes)"},r.prototype.sizeInBytes=function(){return this.data.length},r.prototype.copyBytesInto=function(t,e){for(var r=this.data.length,n=0;n<r;n++)t[e++]=this.data[n];return r},r.of=function(t){return new r(t)},r}(Ci);!function(t){t[t.Deleted=0]="Deleted",t[t.Uncompressed=1]="Uncompressed",t[t.Compressed=2]="Compressed"}(_i||(_i={}));var la,ha=function(t){function r(e,r,n){void 0===n&&(n=!0);var o=t.call(this,e,n)||this;return o.computeIndex=function(){for(var t=[],e=0,r=0,n=o.entries.length;r<n;r++){var i=o.entries[r],a=o.entries[r-1];0===r?t.push(i.ref.objectNumber):i.ref.objectNumber-a.ref.objectNumber>1&&(t.push(e),t.push(i.ref.objectNumber),e=0),e+=1}return t.push(e),t},o.computeEntryTuples=function(){for(var t=new Array(o.entries.length),e=0,r=o.entries.length;e<r;e++){var n=o.entries[e];if(n.type===_i.Deleted){var i=n.type,a=n.nextFreeObjectNumber,s=n.ref;t[e]=[i,a,s.generationNumber]}if(n.type===_i.Uncompressed){i=n.type;var l=n.offset;s=n.ref,t[e]=[i,l,s.generationNumber]}if(n.type===_i.Compressed){i=n.type;var h=n.objectStreamRef,u=n.index;t[e]=[i,h.objectNumber,u]}}return t},o.computeMaxEntryByteWidths=function(){for(var t=o.entryTuplesCache.access(),e=[0,0,0],r=0,n=t.length;r<n;r++){var i=t[r],a=i[0],s=i[1],l=i[2],h=ht(a),u=ht(s),c=ht(l);h>e[0]&&(e[0]=h),u>e[1]&&(e[1]=u),c>e[2]&&(e[2]=c)}return e},o.entries=r||[],o.entryTuplesCache=Xr.populatedBy(o.computeEntryTuples),o.maxByteWidthsCache=Xr.populatedBy(o.computeMaxEntryByteWidths),o.indexCache=Xr.populatedBy(o.computeIndex),e.set(Mi.of("Type"),Mi.of("XRef")),o}return e(r,t),r.prototype.addDeletedEntry=function(t,e){var r=_i.Deleted;this.entries.push({type:r,ref:t,nextFreeObjectNumber:e}),this.entryTuplesCache.invalidate(),this.maxByteWidthsCache.invalidate(),this.indexCache.invalidate(),this.contentsCache.invalidate()},r.prototype.addUncompressedEntry=function(t,e){var r=_i.Uncompressed;this.entries.push({type:r,ref:t,offset:e}),this.entryTuplesCache.invalidate(),this.maxByteWidthsCache.invalidate(),this.indexCache.invalidate(),this.contentsCache.invalidate()},r.prototype.addCompressedEntry=function(t,e,r){var n=_i.Compressed;this.entries.push({type:n,ref:t,objectStreamRef:e,index:r}),this.entryTuplesCache.invalidate(),this.maxByteWidthsCache.invalidate(),this.indexCache.invalidate(),this.contentsCache.invalidate()},r.prototype.clone=function(t){var e=this,n=e.dict,o=e.entries,i=e.encode;return r.of(n.clone(t),o.slice(),i)},r.prototype.getContentsString=function(){for(var t=this.entryTuplesCache.access(),e=this.maxByteWidthsCache.access(),r="",n=0,o=t.length;n<o;n++){for(var i=t[n],a=i[0],s=i[1],l=i[2],h=W(ut(a)),u=W(ut(s)),c=W(ut(l)),d=e[0]-1;d>=0;d--)r+=(h[d]||0).toString(2);for(d=e[1]-1;d>=0;d--)r+=(u[d]||0).toString(2);for(d=e[2]-1;d>=0;d--)r+=(c[d]||0).toString(2)}return r},r.prototype.getUnencodedContents=function(){for(var t=this.entryTuplesCache.access(),e=this.maxByteWidthsCache.access(),r=new Uint8Array(this.getUnencodedContentsSize()),n=0,o=0,i=t.length;o<i;o++){for(var a=t[o],s=a[0],l=a[1],h=a[2],u=W(ut(s)),c=W(ut(l)),d=W(ut(h)),f=e[0]-1;f>=0;f--)r[n++]=u[f]||0;for(f=e[1]-1;f>=0;f--)r[n++]=c[f]||0;for(f=e[2]-1;f>=0;f--)r[n++]=d[f]||0}return r},r.prototype.getUnencodedContentsSize=function(){var t=this.maxByteWidthsCache.access();return q(t)*this.entries.length},r.prototype.updateDict=function(){t.prototype.updateDict.call(this);var e=this.maxByteWidthsCache.access(),r=this.indexCache.access(),n=this.dict.context;this.dict.set(Mi.of("W"),n.obj(e)),this.dict.set(Mi.of("Index"),n.obj(r))},r.create=function(t,e){void 0===e&&(e=!0);var n=new r(t,[],e);return n.addDeletedEntry(Gi.of(0,65535),0),n},r.of=function(t,e,n){return void 0===n&&(n=!0),new r(t,e,n)},r}(Zi),ua=function(t){function r(e,r,n,o){var i=t.call(this,e,r)||this;return i.encodeStreams=n,i.objectsPerStream=o,i}return e(r,t),r.prototype.computeBufferSize=function(){return n(this,0,void 0,function(){var t,e,r,n,i,a,s,l,h,u,c,d,f,p,g,v,y,m,b;return o(this,function(o){switch(o.label){case 0:t=this.context.largestObjectNumber+1,e=Si.forVersion(1,7),r=e.sizeInBytes()+2,n=ha.create(this.createTrailerDict(),this.encodeStreams),i=[],a=[],s=[],l=this.context.enumerateIndirectObjects(),d=0,f=l.length,o.label=1;case 1:return d<f?(h=l[d],g=h[0],u=h[1],g===this.context.trailerInfo.Encrypt||u instanceof Wi||u instanceof sa||0!==g.generationNumber?(i.push(h),n.addUncompressedEntry(g,r),r+=this.computeIndirectObjectSize(h),this.shouldWaitForTick(1)?[4,_()]:[3,3]):[3,4]):[3,6];case 2:o.sent(),o.label=3;case 3:return[3,5];case 4:p=N(a),c=N(s),p&&p.length%this.objectsPerStream!==0||(p=[],a.push(p),c=Gi.of(t++),s.push(c)),n.addCompressedEntry(g,c,p.length),p.push(h),o.label=5;case 5:return d++,[3,1];case 6:d=0,f=a.length,o.label=7;case 7:return d<f?(p=a[d],g=s[d],v=ia.withContextAndObjects(this.context,p,this.encodeStreams),n.addUncompressedEntry(g,r),r+=this.computeIndirectObjectSize([g,v]),i.push([g,v]),this.shouldWaitForTick(p.length)?[4,_()]:[3,9]):[3,10];case 8:o.sent(),o.label=9;case 9:return d++,[3,7];case 10:return y=Gi.of(t++),n.dict.set(Mi.of("Size"),Ai.of(t)),n.addUncompressedEntry(y,r),m=r,r+=this.computeIndirectObjectSize([y,n]),i.push([y,n]),b=na.forLastCrossRefSectionOffset(m),[2,{size:r+=b.sizeInBytes(),header:e,indirectObjects:i,trailer:b}]}})})},r.forContext=function(t,e,n,o){return void 0===n&&(n=!0),void 0===o&&(o=50),new r(t,e,n,o)},r}(aa),ca=function(t){function r(e){var r=t.call(this)||this;return r.value=e,r}return e(r,t),r.prototype.asBytes=function(){for(var t=this.value+(this.value.length%2==1?"0":""),e=t.length,r=new Uint8Array(t.length/2),n=0,o=0;n<e;){var i=parseInt(t.substring(n,n+2),16);r[o]=i,n+=2,o+=1}return r},r.prototype.decodeText=function(){var t=this.asBytes();return st(t)?tt(t):_r(t)},r.prototype.decodeDate=function(){var t=this.decodeText(),e=R(t);if(!e)throw new an(t);return e},r.prototype.asString=function(){return this.value},r.prototype.clone=function(){return r.of(this.value)},r.prototype.toString=function(){return"<"+this.value+">"},r.prototype.sizeInBytes=function(){return this.value.length+2},r.prototype.copyBytesInto=function(t,e){return t[e++]=Sn.LessThan,e+=x(this.value,t,e),t[e++]=Sn.GreaterThan,this.value.length+2},r.of=function(t){return new r(t)},r.fromText=function(t){for(var e=X(t),n="",o=0,i=e.length;o<i;o++)n+=v(e[o],4);return new r(n)},r}(Ci),da=function(){function t(t,e){this.encoding=t===fr.ZapfDingbats?xr.ZapfDingbats:t===fr.Symbol?xr.Symbol:xr.WinAnsi,this.font=yr.load(t),this.fontName=this.font.FontName,this.customName=e}return t.prototype.encodeText=function(t){for(var e=this.encodeTextAsGlyphs(t),r=new Array(e.length),n=0,o=e.length;n<o;n++)r[n]=y(e[n].code);return ca.of(r.join(""))},t.prototype.widthOfTextAtSize=function(t,e){for(var r=this.encodeTextAsGlyphs(t),n=0,o=0,i=r.length;o<i;o++){var a=r[o].name,s=(r[o+1]||{}).name,l=this.font.getXAxisKerningForPair(a,s)||0;n+=this.widthOfGlyph(a)+l}return n*(e/1e3)},t.prototype.heightOfFontAtSize=function(t,e){void 0===e&&(e={});var r=e.descender,n=void 0===r||r,o=this.font,i=o.Ascender,a=o.Descender,s=o.FontBBox,l=(i||s[3])-(a||s[1]);return n||(l+=a||0),l/1e3*t},t.prototype.sizeOfFontAtHeight=function(t){var e=this.font,r=e.Ascender,n=e.Descender,o=e.FontBBox;return 1e3*t/((r||o[3])-(n||o[1]))},t.prototype.embedIntoContext=function(t,e){var r=t.obj({Type:"Font",Subtype:"Type1",BaseFont:this.customName||this.fontName,Encoding:this.encoding===xr.WinAnsi?"WinAnsiEncoding":void 0});return e?(t.assign(e,r),e):t.register(r)},t.prototype.widthOfGlyph=function(t){return this.font.getWidthOfGlyph(t)||250},t.prototype.encodeTextAsGlyphs=function(t){for(var e=Array.from(t),r=new Array(e.length),n=0,o=e.length;n<o;n++){var i=g(e[n]);r[n]=this.encoding.encodeUnicodeCodePoint(i)}return r},t.for=function(e,r){return new t(e,r)},t}(),fa=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"<"+t.join("")+">"},pa=function(t){return v(t,4)},ga=function(t){if(Z(t))return pa(t);if(Y(t)){var e=J(t),r=Q(t);return""+pa(e)+pa(r)}var n=y(t);throw new Error("0x"+n+" is not a valid UTF-8 or UTF-16 codepoint.")},va=function(t){function r(e){var r=t.call(this)||this;return r.value=e,r}return e(r,t),r.prototype.asBytes=function(){for(var t=[],e="",r=!1,n=function(e){void 0!==e&&t.push(e),r=!1},o=0,i=this.value.length;o<i;o++){var a=this.value[o],s=p(a),l=this.value[o+1];r?s===Sn.Newline||s===Sn.CarriageReturn?n():s===Sn.n?n(Sn.Newline):s===Sn.r?n(Sn.CarriageReturn):s===Sn.t?n(Sn.Tab):s===Sn.b?n(Sn.Backspace):s===Sn.f?n(Sn.FormFeed):s===Sn.LeftParen?n(Sn.LeftParen):s===Sn.RightParen?n(Sn.RightParen):s===Sn.Backspace?n(Sn.BackSlash):s>=Sn.Zero&&s<=Sn.Seven?3!==(e+=a).length&&l>="0"&&l<="7"||(n(parseInt(e,8)),e=""):n(s):s===Sn.BackSlash?r=!0:n(s)}return new Uint8Array(t)},r.prototype.decodeText=function(){var t=this.asBytes();return st(t)?tt(t):_r(t)},r.prototype.decodeDate=function(){var t=this.decodeText(),e=R(t);if(!e)throw new an(t);return e},r.prototype.asString=function(){return this.value},r.prototype.clone=function(){return r.of(this.value)},r.prototype.toString=function(){return"("+this.value+")"},r.prototype.sizeInBytes=function(){return this.value.length+2},r.prototype.copyBytesInto=function(t,e){return t[e++]=Sn.LeftParen,e+=x(this.value,t,e),t[e++]=Sn.RightParen,this.value.length+2},r.of=function(t){return new r(t)},r.fromDate=function(t){return new r("D:"+w(String(t.getUTCFullYear()),4,"0")+w(String(t.getUTCMonth()+1),2,"0")+w(String(t.getUTCDate()),2,"0")+w(String(t.getUTCHours()),2,"0")+w(String(t.getUTCMinutes()),2,"0")+w(String(t.getUTCSeconds()),2,"0")+"Z")},r}(Ci),ya=function(){function t(t,e,r,n){var o=this;this.allGlyphsInFontSortedById=function(){for(var t=new Array(o.font.characterSet.length),e=0,r=t.length;e<r;e++){var n=o.font.characterSet[e];t[e]=o.font.glyphForCodePoint(n)}return V(t.sort(U),function(t){return t.id})},this.font=t,this.scale=1e3/this.font.unitsPerEm,this.fontData=e,this.fontName=this.font.postscriptName||"Font",this.customName=r,this.fontFeatures=n,this.baseFontName="",this.glyphCache=Xr.populatedBy(this.allGlyphsInFontSortedById)}return t.for=function(e,r,i,a){return n(this,0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return[4,e.create(r)];case 1:return[2,new t(n.sent(),r,i,a)]}})})},t.prototype.encodeText=function(t){for(var e=this.font.layout(t,this.fontFeatures).glyphs,r=new Array(e.length),n=0,o=e.length;n<o;n++)r[n]=v(e[n].id,4);return ca.of(r.join(""))},t.prototype.widthOfTextAtSize=function(t,e){for(var r=this.font.layout(t,this.fontFeatures).glyphs,n=0,o=0,i=r.length;o<i;o++)n+=r[o].advanceWidth*this.scale;return n*(e/1e3)},t.prototype.heightOfFontAtSize=function(t,e){void 0===e&&(e={});var r=e.descender,n=void 0===r||r,o=this.font,i=o.ascent,a=o.descent,s=o.bbox,l=(i||s.maxY)*this.scale-(a||s.minY)*this.scale;return n||(l-=Math.abs(a)||0),l/1e3*t},t.prototype.sizeOfFontAtHeight=function(t){var e=this.font,r=e.ascent,n=e.descent,o=e.bbox;return 1e3*t/((r||o.maxY)*this.scale-(n||o.minY)*this.scale)},t.prototype.embedIntoContext=function(t,e){return this.baseFontName=this.customName||t.addRandomSuffix(this.fontName),this.embedFontDict(t,e)},t.prototype.embedFontDict=function(t,e){return n(this,0,void 0,function(){var r,n,i;return o(this,function(o){switch(o.label){case 0:return[4,this.embedCIDFontDict(t)];case 1:return r=o.sent(),n=this.embedUnicodeCmap(t),i=t.obj({Type:"Font",Subtype:"Type0",BaseFont:this.baseFontName,Encoding:"Identity-H",DescendantFonts:[r],ToUnicode:n}),e?(t.assign(e,i),[2,e]):[2,t.register(i)]}})})},t.prototype.isCFF=function(){return this.font.cff},t.prototype.embedCIDFontDict=function(t){return n(this,0,void 0,function(){var e,r;return o(this,function(n){switch(n.label){case 0:return[4,this.embedFontDescriptor(t)];case 1:return e=n.sent(),r=t.obj({Type:"Font",Subtype:this.isCFF()?"CIDFontType0":"CIDFontType2",CIDToGIDMap:"Identity",BaseFont:this.baseFontName,CIDSystemInfo:{Registry:va.of("Adobe"),Ordering:va.of("Identity"),Supplement:0},FontDescriptor:e,W:this.computeWidths()}),[2,t.register(r)]}})})},t.prototype.embedFontDescriptor=function(t){return n(this,0,void 0,function(){var e,r,n,i,a,s,l,h,u,c,d,f,p,g,v;return o(this,function(o){switch(o.label){case 0:return[4,this.embedFontStream(t)];case 1:return e=o.sent(),r=this.scale,n=this.font,i=n.italicAngle,a=n.ascent,s=n.descent,l=n.capHeight,h=n.xHeight,u=this.font.bbox,c=u.minX,d=u.minY,f=u.maxX,p=u.maxY,g=t.obj(((v={Type:"FontDescriptor",FontName:this.baseFontName,Flags:(w=this.font,x=w["OS/2"]?w["OS/2"].sFamilyClass:0,y={fixedPitch:w.post.isFixedPitch,serif:1<=x&&x<=7,script:10===x,italic:w.head.macStyle.italic},m=0,b=function(t){m|=1<<t-1},y.fixedPitch&&b(1),y.serif&&b(2),b(3),y.script&&b(4),y.nonsymbolic&&b(6),y.italic&&b(7),y.allCap&&b(17),y.smallCap&&b(18),y.forceBold&&b(19),m),FontBBox:[c*r,d*r,f*r,p*r],ItalicAngle:i,Ascent:a*r,Descent:s*r,CapHeight:(l||a)*r,XHeight:(h||0)*r,StemV:0})[this.isCFF()?"FontFile3":"FontFile2"]=e,v)),[2,t.register(g)]}var y,m,b,w,x})})},t.prototype.serializeFont=function(){return n(this,0,void 0,function(){return o(this,function(t){return[2,this.fontData]})})},t.prototype.embedFontStream=function(t){return n(this,0,void 0,function(){var e,r,n;return o(this,function(o){switch(o.label){case 0:return n=(r=t).flateStream,[4,this.serializeFont()];case 1:return e=n.apply(r,[o.sent(),{Subtype:this.isCFF()?"CIDFontType0C":void 0}]),[2,t.register(e)]}})})},t.prototype.embedUnicodeCmap=function(t){var e=function(t,e){for(var r=new Array(t.length),n=0,o=t.length;n<o;n++){var i=t[n],a=fa(pa(e(i))),s=fa.apply(void 0,i.codePoints.map(ga));r[n]=[a,s]}return function(t){return"/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n  /Registry (Adobe)\n  /Ordering (UCS)\n  /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000><ffff>\nendcodespacerange\n"+t.length+" beginbfchar\n"+t.map(function(t){return t[0]+" "+t[1]}).join("\n")+"\nendbfchar\nendcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"}(r)}(this.glyphCache.access(),this.glyphId.bind(this)),r=t.flateStream(e);return t.register(r)},t.prototype.glyphId=function(t){return t?t.id:-1},t.prototype.computeWidths=function(){for(var t=this.glyphCache.access(),e=[],r=[],n=0,o=t.length;n<o;n++){var i=t[n],a=t[n-1],s=this.glyphId(i),l=this.glyphId(a);0===n?e.push(s):s-l!==1&&(e.push(r),e.push(s),r=[]),r.push(i.advanceWidth*this.scale)}return e.push(r),e},t}(),ma=function(t){function r(e,r,n,o){var i=t.call(this,e,r,n,o)||this;return i.subset=i.font.createSubset(),i.glyphs=[],i.glyphCache=Xr.populatedBy(function(){return i.glyphs}),i.glyphIdMap=new Map,i}return e(r,t),r.for=function(t,e,i,a){return n(this,0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return[4,t.create(e)];case 1:return[2,new r(n.sent(),e,i,a)]}})})},r.prototype.encodeText=function(t){for(var e=this.font.layout(t,this.fontFeatures).glyphs,r=new Array(e.length),n=0,o=e.length;n<o;n++){var i=e[n],a=this.subset.includeGlyph(i);this.glyphs[a-1]=i,this.glyphIdMap.set(i.id,a),r[n]=v(a,4)}return this.glyphCache.invalidate(),ca.of(r.join(""))},r.prototype.isCFF=function(){return this.subset.cff},r.prototype.glyphId=function(t){return t?this.glyphIdMap.get(t.id):-1},r.prototype.serializeFont=function(){var t=this;return new Promise(function(e,r){var n=[];t.subset.encodeStream().on("data",function(t){return n.push(t)}).on("end",function(){return e(I(n))}).on("error",function(t){return r(t)})})},r}(ya);exports.AFRelationship=void 0,(la=exports.AFRelationship||(exports.AFRelationship={})).Source="Source",la.Data="Data",la.Alternative="Alternative",la.Supplement="Supplement",la.EncryptedPayload="EncryptedPayload",la.FormData="EncryptedPayload",la.Schema="Schema",la.Unspecified="Unspecified";var ba,wa=function(){function t(t,e,r){void 0===r&&(r={}),this.fileData=t,this.fileName=e,this.options=r}return t.for=function(e,r,n){return void 0===n&&(n={}),new t(e,r,n)},t.prototype.embedIntoContext=function(t,e){return n(this,0,void 0,function(){var r,n,i,a,s,l,h,u,c;return o(this,function(o){return r=this.options,n=r.mimeType,i=r.description,a=r.creationDate,s=r.modificationDate,l=r.afRelationship,h=t.flateStream(this.fileData,{Type:"EmbeddedFile",Subtype:null!=n?n:void 0,Params:{Size:this.fileData.length,CreationDate:a?va.fromDate(a):void 0,ModDate:s?va.fromDate(s):void 0}}),u=t.register(h),c=t.obj({Type:"Filespec",F:va.of(this.fileName),UF:ca.fromText(this.fileName),EF:{F:u},Desc:i?ca.fromText(i):void 0,AFRelationship:null!=l?l:void 0}),e?(t.assign(e,c),[2,e]):[2,t.register(c)]})})},t}(),xa=[65472,65473,65474,65475,65477,65478,65479,65480,65481,65482,65483,65484,65485,65486,65487];!function(t){t.DeviceGray="DeviceGray",t.DeviceRGB="DeviceRGB",t.DeviceCMYK="DeviceCMYK"}(ba||(ba={}));var ka={1:ba.DeviceGray,3:ba.DeviceRGB,4:ba.DeviceCMYK},Fa=function(){function t(t,e,r,n,o){this.imageData=t,this.bitsPerComponent=e,this.width=r,this.height=n,this.colorSpace=o}return t.for=function(e){return n(this,0,void 0,function(){var r,n,i,a,s,l,h,u;return o(this,function(o){if(65496!==(r=new DataView(e.buffer)).getUint16(0))throw new Error("SOI not found in JPEG");for(n=2;n<r.byteLength&&(i=r.getUint16(n),n+=2,!xa.includes(i));)n+=r.getUint16(n);if(!xa.includes(i))throw new Error("Invalid JPEG");if(n+=2,a=r.getUint8(n++),s=r.getUint16(n),n+=2,l=r.getUint16(n),n+=2,h=r.getUint8(n++),!(u=ka[h]))throw new Error("Unknown JPEG channel.");return[2,new t(e,a,l,s,u)]})})},t.prototype.embedIntoContext=function(t,e){return n(this,0,void 0,function(){var r;return o(this,function(n){return r=t.stream(this.imageData,{Type:"XObject",Subtype:"Image",BitsPerComponent:this.bitsPerComponent,Width:this.width,Height:this.height,ColorSpace:this.colorSpace,Filter:"DCTDecode",Decode:this.colorSpace===ba.DeviceCMYK?[1,0,1,0,1,0,1,0]:void 0}),e?(t.assign(e,r),[2,e]):[2,t.register(r)]})})},t}(),Sa=dt(function(t,e){var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var o in r)n(r,o)&&(t[o]=r[o])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var o={arraySet:function(t,e,r,n,o){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+n),o);else for(var i=0;i<n;i++)t[o+i]=e[r+i]},flattenChunks:function(t){var e,r,n,o,i,a;for(n=0,e=0,r=t.length;e<r;e++)n+=t[e].length;for(a=new Uint8Array(n),o=0,e=0,r=t.length;e<r;e++)i=t[e],a.set(i,o),o+=i.length;return a}},i={arraySet:function(t,e,r,n,o){for(var i=0;i<n;i++)t[o+i]=e[r+i]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,o)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,i))},e.setTyped(r)});function Ca(t){for(var e=t.length;--e>=0;)t[e]=0}var Aa=[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],Ta=[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],Pa=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],za=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Oa=new Array(576);Ca(Oa);var Da=new Array(60);Ca(Da);var Ra=new Array(512);Ca(Ra);var Ba=new Array(256);Ca(Ba);var Na=new Array(29);Ca(Na);var Ea,ja,Ia,Ma=new Array(30);function Ua(t,e,r,n,o){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=t&&t.length}function Va(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function Wa(t){return t<256?Ra[t]:Ra[256+(t>>>7)]}function qa(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function La(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,qa(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function Ka(t,e,r){La(t,r[2*e],r[2*e+1])}function Ga(t,e){var r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1}function Ha(t,e,r){var n,o,i=new Array(16),a=0;for(n=1;n<=15;n++)i[n]=a=a+r[n-1]<<1;for(o=0;o<=e;o++){var s=t[2*o+1];0!==s&&(t[2*o]=Ga(i[s]++,s))}}function _a(t){var 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.last_lit=t.matches=0}function Xa(t){t.bi_valid>8?qa(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function Za(t,e,r,n){var o=2*e,i=2*r;return t[o]<t[i]||t[o]===t[i]&&n[e]<=n[r]}function Ya(t,e,r){for(var n=t.heap[r],o=r<<1;o<=t.heap_len&&(o<t.heap_len&&Za(e,t.heap[o+1],t.heap[o],t.depth)&&o++,!Za(e,n,t.heap[o],t.depth));)t.heap[r]=t.heap[o],r=o,o<<=1;t.heap[r]=n}function Ja(t,e,r){var n,o,i,a,s=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*s]<<8|t.pending_buf[t.d_buf+2*s+1],o=t.pending_buf[t.l_buf+s],s++,0===n?Ka(t,o,e):(Ka(t,(i=Ba[o])+256+1,e),0!==(a=Aa[i])&&La(t,o-=Na[i],a),Ka(t,i=Wa(--n),r),0!==(a=Ta[i])&&La(t,n-=Ma[i],a))}while(s<t.last_lit);Ka(t,256,e)}function Qa(t,e){var r,n,o,i=e.dyn_tree,a=e.stat_desc.static_tree,s=e.stat_desc.has_stree,l=e.stat_desc.elems,h=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<l;r++)0!==i[2*r]?(t.heap[++t.heap_len]=h=r,t.depth[r]=0):i[2*r+1]=0;for(;t.heap_len<2;)i[2*(o=t.heap[++t.heap_len]=h<2?++h:0)]=1,t.depth[o]=0,t.opt_len--,s&&(t.static_len-=a[2*o+1]);for(e.max_code=h,r=t.heap_len>>1;r>=1;r--)Ya(t,i,r);o=l;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Ya(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,i[2*o]=i[2*r]+i[2*n],t.depth[o]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,i[2*r+1]=i[2*n+1]=o,t.heap[1]=o++,Ya(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,o,i,a,s,l=e.dyn_tree,h=e.max_code,u=e.stat_desc.static_tree,c=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,p=e.stat_desc.max_length,g=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)(i=l[2*l[2*(n=t.heap[r])+1]+1]+1)>p&&(i=p,g++),l[2*n+1]=i,n>h||(t.bl_count[i]++,a=0,n>=f&&(a=d[n-f]),s=l[2*n],t.opt_len+=s*(i+a),c&&(t.static_len+=s*(u[2*n+1]+a)));if(0!==g){do{for(i=p-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[p]--,g-=2}while(g>0);for(i=p;0!==i;i--)for(n=t.bl_count[i];0!==n;)(o=t.heap[--r])>h||(l[2*o+1]!==i&&(t.opt_len+=(i-l[2*o+1])*l[2*o],l[2*o+1]=i),n--)}}(t,e),Ha(i,h,t.bl_count)}function $a(t,e,r){var n,o,i=-1,a=e[1],s=0,l=7,h=4;for(0===a&&(l=138,h=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)o=a,a=e[2*(n+1)+1],++s<l&&o===a||(s<h?t.bl_tree[2*o]+=s:0!==o?(o!==i&&t.bl_tree[2*o]++,t.bl_tree[32]++):s<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=0,i=o,0===a?(l=138,h=3):o===a?(l=6,h=3):(l=7,h=4))}function ts(t,e,r){var n,o,i=-1,a=e[1],s=0,l=7,h=4;for(0===a&&(l=138,h=3),n=0;n<=r;n++)if(o=a,a=e[2*(n+1)+1],!(++s<l&&o===a)){if(s<h)do{Ka(t,o,t.bl_tree)}while(0!==--s);else 0!==o?(o!==i&&(Ka(t,o,t.bl_tree),s--),Ka(t,16,t.bl_tree),La(t,s-3,2)):s<=10?(Ka(t,17,t.bl_tree),La(t,s-3,3)):(Ka(t,18,t.bl_tree),La(t,s-11,7));s=0,i=o,0===a?(l=138,h=3):o===a?(l=6,h=3):(l=7,h=4)}}Ca(Ma);var es=!1;function rs(t,e,r,n){La(t,0+(n?1:0),3),function(t,e,r){Xa(t),qa(t,r),qa(t,~r),Sa.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}(t,e,r)}var ns,os={_tr_init:function(t){es||(function(){var t,e,r,n,o,i=new Array(16);for(r=0,n=0;n<28;n++)for(Na[n]=r,t=0;t<1<<Aa[n];t++)Ba[r++]=n;for(Ba[r-1]=n,o=0,n=0;n<16;n++)for(Ma[n]=o,t=0;t<1<<Ta[n];t++)Ra[o++]=n;for(o>>=7;n<30;n++)for(Ma[n]=o<<7,t=0;t<1<<Ta[n]-7;t++)Ra[256+o++]=n;for(e=0;e<=15;e++)i[e]=0;for(t=0;t<=143;)Oa[2*t+1]=8,t++,i[8]++;for(;t<=255;)Oa[2*t+1]=9,t++,i[9]++;for(;t<=279;)Oa[2*t+1]=7,t++,i[7]++;for(;t<=287;)Oa[2*t+1]=8,t++,i[8]++;for(Ha(Oa,287,i),t=0;t<30;t++)Da[2*t+1]=5,Da[2*t]=Ga(t,5);Ea=new Ua(Oa,Aa,257,286,15),ja=new Ua(Da,Ta,0,30,15),Ia=new Ua(new Array(0),Pa,0,19,7)}(),es=!0),t.l_desc=new Va(t.dyn_ltree,Ea),t.d_desc=new Va(t.dyn_dtree,ja),t.bl_desc=new Va(t.bl_tree,Ia),t.bi_buf=0,t.bi_valid=0,_a(t)},_tr_stored_block:rs,_tr_flush_block:function(t,e,r,n){var o,i,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&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}(t)),Qa(t,t.l_desc),Qa(t,t.d_desc),a=function(t){var e;for($a(t,t.dyn_ltree,t.l_desc.max_code),$a(t,t.dyn_dtree,t.d_desc.max_code),Qa(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*za[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),o=t.opt_len+3+7>>>3,(i=t.static_len+3+7>>>3)<=o&&(o=i)):o=i=r+5,r+4<=o&&-1!==e?rs(t,e,r,n):4===t.strategy||i===o?(La(t,2+(n?1:0),3),Ja(t,Oa,Da)):(La(t,4+(n?1:0),3),function(t,e,r,n){var o;for(La(t,e-257,5),La(t,r-1,5),La(t,n-4,4),o=0;o<n;o++)La(t,t.bl_tree[2*za[o]+1],3);ts(t,t.dyn_ltree,e-1),ts(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),Ja(t,t.dyn_ltree,t.dyn_dtree)),_a(t),n&&Xa(t)},_tr_tally:function(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(Ba[r]+256+1)]++,t.dyn_dtree[2*Wa(e)]++),t.last_lit===t.lit_bufsize-1},_tr_align:function(t){La(t,2,3),Ka(t,256,Oa),function(t){16===t.bi_valid?(qa(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)}(t)}},is=function(t,e,r,n){for(var o=65535&t,i=t>>>16&65535,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{i=i+(o=o+e[n++]|0)|0}while(--a);o%=65521,i%=65521}return o|i<<16},as=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}(),ss=function(t,e,r,n){var o=as,i=n+r;t^=-1;for(var a=n;a<i;a++)t=t>>>8^o[255&(t^e[a])];return-1^t},ls={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"},hs=-2,us=258,cs=262,ds=103,fs=113,ps=666;function gs(t,e){return t.msg=ls[e],e}function vs(t){return(t<<1)-(t>4?9:0)}function ys(t){for(var e=t.length;--e>=0;)t[e]=0}function ms(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(Sa.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function bs(t,e){os._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,ms(t.strm)}function ws(t,e){t.pending_buf[t.pending++]=e}function xs(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function ks(t,e,r,n){var o=t.avail_in;return o>n&&(o=n),0===o?0:(t.avail_in-=o,Sa.arraySet(e,t.input,t.next_in,o,r),1===t.state.wrap?t.adler=is(t.adler,e,o,r):2===t.state.wrap&&(t.adler=ss(t.adler,e,o,r)),t.next_in+=o,t.total_in+=o,o)}function Fs(t,e){var r,n,o=t.max_chain_length,i=t.strstart,a=t.prev_length,s=t.nice_match,l=t.strstart>t.w_size-cs?t.strstart-(t.w_size-cs):0,h=t.window,u=t.w_mask,c=t.prev,d=t.strstart+us,f=h[i+a-1],p=h[i+a];t.prev_length>=t.good_match&&(o>>=2),s>t.lookahead&&(s=t.lookahead);do{if(h[(r=e)+a]===p&&h[r+a-1]===f&&h[r]===h[i]&&h[++r]===h[i+1]){i+=2,r++;do{}while(h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&h[++i]===h[++r]&&i<d);if(n=us-(d-i),i=d-us,n>a){if(t.match_start=e,a=n,n>=s)break;f=h[i+a-1],p=h[i+a]}}}while((e=c[e&u])>l&&0!==--o);return a<=t.lookahead?a:t.lookahead}function Ss(t){var e,r,n,o,i,a=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=a+(a-cs)){Sa.arraySet(t.window,t.window,a,a,0),t.match_start-=a,t.strstart-=a,t.block_start-=a,e=r=t.hash_size;do{n=t.head[--e],t.head[e]=n>=a?n-a:0}while(--r);e=r=a;do{n=t.prev[--e],t.prev[e]=n>=a?n-a:0}while(--r);o+=a}if(0===t.strm.avail_in)break;if(r=ks(t.strm,t.window,t.strstart+t.lookahead,o),t.lookahead+=r,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=(t.ins_h<<t.hash_shift^t.window[i+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[i+3-1])&t.hash_mask,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<cs&&0!==t.strm.avail_in)}function Cs(t,e){for(var r,n;;){if(t.lookahead<cs){if(Ss(t),t.lookahead<cs&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-cs&&(t.match_length=Fs(t,r)),t.match_length>=3)if(n=os._tr_tally(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=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=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=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=os._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(bs(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(bs(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(bs(t,!1),0===t.strm.avail_out)?1:2}function As(t,e){for(var r,n,o;;){if(t.lookahead<cs){if(Ss(t),t.lookahead<cs&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=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!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-cs&&(t.match_length=Fs(t,r),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){o=t.strstart+t.lookahead-3,n=os._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=o&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=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++,n&&(bs(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=os._tr_tally(t,0,t.window[t.strstart-1]))&&bs(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&&(n=os._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(bs(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(bs(t,!1),0===t.strm.avail_out)?1:2}function Ts(t,e,r,n,o){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=o}function Ps(){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=8,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 Sa.Buf16(1146),this.dyn_dtree=new Sa.Buf16(122),this.bl_tree=new Sa.Buf16(78),ys(this.dyn_ltree),ys(this.dyn_dtree),ys(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Sa.Buf16(16),this.heap=new Sa.Buf16(573),ys(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Sa.Buf16(573),ys(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function zs(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:fs,t.adler=2===e.wrap?0:1,e.last_flush=0,os._tr_init(e),0):gs(t,hs)}function Os(t){var e,r=zs(t);return 0===r&&((e=t.state).window_size=2*e.w_size,ys(e.head),e.max_lazy_match=ns[e.level].max_lazy,e.good_match=ns[e.level].good_length,e.nice_match=ns[e.level].nice_length,e.max_chain_length=ns[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),r}function Ds(t,e,r,n,o,i){if(!t)return hs;var a=1;if(-1===e&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),o<1||o>9||8!==r||n<8||n>15||e<0||e>9||i<0||i>4)return gs(t,hs);8===n&&(n=9);var s=new Ps;return t.state=s,s.strm=t,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=o+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Sa.Buf8(2*s.w_size),s.head=new Sa.Buf16(s.hash_size),s.prev=new Sa.Buf16(s.w_size),s.lit_bufsize=1<<o+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new Sa.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=e,s.strategy=i,s.method=r,Os(t)}ns=[new Ts(0,0,0,0,function(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Ss(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,bs(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-cs&&(bs(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(bs(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(bs(t,!1),t.strm.avail_out),1)}),new Ts(4,4,8,4,Cs),new Ts(4,5,16,8,Cs),new Ts(4,6,32,32,Cs),new Ts(4,4,16,16,As),new Ts(8,16,32,32,As),new Ts(8,16,128,128,As),new Ts(8,32,128,256,As),new Ts(32,128,258,1024,As),new Ts(32,258,258,4096,As)];var Rs={deflateInit:function(t,e){return Ds(t,e,8,15,8,0)},deflateInit2:Ds,deflateReset:Os,deflateResetKeep:zs,deflateSetHeader:function(t,e){return t&&t.state?2!==t.state.wrap?hs:(t.state.gzhead=e,0):hs},deflate:function(t,e){var r,n,o,i;if(!t||!t.state||e>5||e<0)return t?gs(t,hs):hs;if(n=t.state,!t.output||!t.input&&0!==t.avail_in||n.status===ps&&4!==e)return gs(t,0===t.avail_out?-5:hs);if(n.strm=t,r=n.last_flush,n.last_flush=e,42===n.status)if(2===n.wrap)t.adler=0,ws(n,31),ws(n,139),ws(n,8),n.gzhead?(ws(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),ws(n,255&n.gzhead.time),ws(n,n.gzhead.time>>8&255),ws(n,n.gzhead.time>>16&255),ws(n,n.gzhead.time>>24&255),ws(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),ws(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(ws(n,255&n.gzhead.extra.length),ws(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=ss(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(ws(n,0),ws(n,0),ws(n,0),ws(n,0),ws(n,0),ws(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),ws(n,3),n.status=fs);else{var a=8+(n.w_bits-8<<4)<<8;a|=(n.strategy>=2||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(a|=32),a+=31-a%31,n.status=fs,xs(n,a),0!==n.strstart&&(xs(n,t.adler>>>16),xs(n,65535&t.adler)),t.adler=1}if(69===n.status)if(n.gzhead.extra){for(o=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>o&&(t.adler=ss(t.adler,n.pending_buf,n.pending-o,o)),ms(t),o=n.pending,n.pending!==n.pending_buf_size));)ws(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>o&&(t.adler=ss(t.adler,n.pending_buf,n.pending-o,o)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(t.adler=ss(t.adler,n.pending_buf,n.pending-o,o)),ms(t),o=n.pending,n.pending===n.pending_buf_size)){i=1;break}i=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,ws(n,i)}while(0!==i);n.gzhead.hcrc&&n.pending>o&&(t.adler=ss(t.adler,n.pending_buf,n.pending-o,o)),0===i&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(t.adler=ss(t.adler,n.pending_buf,n.pending-o,o)),ms(t),o=n.pending,n.pending===n.pending_buf_size)){i=1;break}i=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,ws(n,i)}while(0!==i);n.gzhead.hcrc&&n.pending>o&&(t.adler=ss(t.adler,n.pending_buf,n.pending-o,o)),0===i&&(n.status=ds)}else n.status=ds;if(n.status===ds&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&ms(t),n.pending+2<=n.pending_buf_size&&(ws(n,255&t.adler),ws(n,t.adler>>8&255),t.adler=0,n.status=fs)):n.status=fs),0!==n.pending){if(ms(t),0===t.avail_out)return n.last_flush=-1,0}else if(0===t.avail_in&&vs(e)<=vs(r)&&4!==e)return gs(t,-5);if(n.status===ps&&0!==t.avail_in)return gs(t,-5);if(0!==t.avail_in||0!==n.lookahead||0!==e&&n.status!==ps){var s=2===n.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(Ss(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=os._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(bs(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(bs(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(bs(t,!1),0===t.strm.avail_out)?1:2}(n,e):3===n.strategy?function(t,e){for(var r,n,o,i,a=t.window;;){if(t.lookahead<=us){if(Ss(t),t.lookahead<=us&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=a[o=t.strstart-1])===a[++o]&&n===a[++o]&&n===a[++o]){i=t.strstart+us;do{}while(n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&o<i);t.match_length=us-(i-o),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=os._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=os._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(bs(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(bs(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(bs(t,!1),0===t.strm.avail_out)?1:2}(n,e):ns[n.level].func(n,e);if(3!==s&&4!==s||(n.status=ps),1===s||3===s)return 0===t.avail_out&&(n.last_flush=-1),0;if(2===s&&(1===e?os._tr_align(n):5!==e&&(os._tr_stored_block(n,0,0,!1),3===e&&(ys(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),ms(t),0===t.avail_out))return n.last_flush=-1,0}return 4!==e?0:n.wrap<=0?1:(2===n.wrap?(ws(n,255&t.adler),ws(n,t.adler>>8&255),ws(n,t.adler>>16&255),ws(n,t.adler>>24&255),ws(n,255&t.total_in),ws(n,t.total_in>>8&255),ws(n,t.total_in>>16&255),ws(n,t.total_in>>24&255)):(xs(n,t.adler>>>16),xs(n,65535&t.adler)),ms(t),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?0:1)},deflateEnd:function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&e!==ds&&e!==fs&&e!==ps?gs(t,hs):(t.state=null,e===fs?gs(t,-3):0):hs},deflateSetDictionary:function(t,e){var r,n,o,i,a,s,l,h,u=e.length;if(!t||!t.state)return hs;if(2===(i=(r=t.state).wrap)||1===i&&42!==r.status||r.lookahead)return hs;for(1===i&&(t.adler=is(t.adler,e,u,0)),r.wrap=0,u>=r.w_size&&(0===i&&(ys(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new Sa.Buf8(r.w_size),Sa.arraySet(h,e,u-r.w_size,r.w_size,0),e=h,u=r.w_size),a=t.avail_in,s=t.next_in,l=t.input,t.avail_in=u,t.next_in=0,t.input=e,Ss(r);r.lookahead>=3;){n=r.strstart,o=r.lookahead-2;do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--o);r.strstart=n,r.lookahead=2,Ss(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,t.next_in=s,t.input=l,t.avail_in=a,r.wrap=i,0},deflateInfo:"pako deflate (from Nodeca project)"},Bs=!0,Ns=!0;try{String.fromCharCode.apply(null,[0])}catch(t){Bs=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Ns=!1}for(var Es=new Sa.Buf8(256),js=0;js<256;js++)Es[js]=js>=252?6:js>=248?5:js>=240?4:js>=224?3:js>=192?2:1;function Is(t,e){if(e<65534&&(t.subarray&&Ns||!t.subarray&&Bs))return String.fromCharCode.apply(null,Sa.shrinkBuf(t,e));for(var r="",n=0;n<e;n++)r+=String.fromCharCode(t[n]);return r}Es[254]=Es[254]=1;var Ms=function(t){var e,r,n,o,i,a=t.length,s=0;for(o=0;o<a;o++)55296==(64512&(r=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(n=t.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),s+=r<128?1:r<2048?2:r<65536?3:4;for(e=new Sa.Buf8(s),i=0,o=0;i<s;o++)55296==(64512&(r=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(n=t.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),r<128?e[i++]=r:r<2048?(e[i++]=192|r>>>6,e[i++]=128|63&r):r<65536?(e[i++]=224|r>>>12,e[i++]=128|r>>>6&63,e[i++]=128|63&r):(e[i++]=240|r>>>18,e[i++]=128|r>>>12&63,e[i++]=128|r>>>6&63,e[i++]=128|63&r);return e},Us=function(t){return Is(t,t.length)},Vs=function(t,e){var r,n,o,i,a=e||t.length,s=new Array(2*a);for(n=0,r=0;r<a;)if((o=t[r++])<128)s[n++]=o;else if((i=Es[o])>4)s[n++]=65533,r+=i-1;else{for(o&=2===i?31:3===i?15:7;i>1&&r<a;)o=o<<6|63&t[r++],i--;i>1?s[n++]=65533:o<65536?s[n++]=o:(o-=65536,s[n++]=55296|o>>10&1023,s[n++]=56320|1023&o)}return Is(s,n)},Ws=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+Es[t[r]]>e?r:e},qs=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},Ls=Object.prototype.toString;function Ks(t){if(!(this instanceof Ks))return new Ks(t);this.options=Sa.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var 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 qs,this.strm.avail_out=0;var r=Rs.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==r)throw new Error(ls[r]);if(e.header&&Rs.deflateSetHeader(this.strm,e.header),e.dictionary){var n;if(n="string"==typeof e.dictionary?Ms(e.dictionary):"[object ArrayBuffer]"===Ls.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(r=Rs.deflateSetDictionary(this.strm,n)))throw new Error(ls[r]);this._dict_set=!0}}function Gs(t,e){var r=new Ks(e);if(r.push(t,!0),r.err)throw r.msg||ls[r.err];return r.result}Ks.prototype.push=function(t,e){var r,n,o=this.strm,i=this.options.chunkSize;if(this.ended)return!1;n=e===~~e?e:!0===e?4:0,"string"==typeof t?o.input=Ms(t):"[object ArrayBuffer]"===Ls.call(t)?o.input=new Uint8Array(t):o.input=t,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new Sa.Buf8(i),o.next_out=0,o.avail_out=i),1!==(r=Rs.deflate(o,n))&&0!==r)return this.onEnd(r),this.ended=!0,!1;0!==o.avail_out&&(0!==o.avail_in||4!==n&&2!==n)||("string"===this.options.to?this.onData(Us(Sa.shrinkBuf(o.output,o.next_out))):this.onData(Sa.shrinkBuf(o.output,o.next_out)))}while((o.avail_in>0||0===o.avail_out)&&1!==r);return 4===n?(r=Rs.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==n||(this.onEnd(0),o.avail_out=0,!0)},Ks.prototype.onData=function(t){this.chunks.push(t)},Ks.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Sa.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Hs={Deflate:Ks,deflate:Gs,deflateRaw:function(t,e){return(e=e||{}).raw=!0,Gs(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,Gs(t,e)}},_s=function(t,e){var r,n,o,i,a,s,l,h,u,c,d,f,p,g,v,y,m,b,w,x,k,F,S,C,A;r=t.state,n=t.next_in,C=t.input,o=n+(t.avail_in-5),i=t.next_out,A=t.output,a=i-(e-t.avail_out),s=i+(t.avail_out-257),l=r.dmax,h=r.wsize,u=r.whave,c=r.wnext,d=r.window,f=r.hold,p=r.bits,g=r.lencode,v=r.distcode,y=(1<<r.lenbits)-1,m=(1<<r.distbits)-1;t:do{p<15&&(f+=C[n++]<<p,p+=8,f+=C[n++]<<p,p+=8),b=g[f&y];e:for(;;){if(f>>>=w=b>>>24,p-=w,0==(w=b>>>16&255))A[i++]=65535&b;else{if(!(16&w)){if(64&w){if(32&w){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}b=g[(65535&b)+(f&(1<<w)-1)];continue e}for(x=65535&b,(w&=15)&&(p<w&&(f+=C[n++]<<p,p+=8),x+=f&(1<<w)-1,f>>>=w,p-=w),p<15&&(f+=C[n++]<<p,p+=8,f+=C[n++]<<p,p+=8),b=v[f&m];;){if(f>>>=w=b>>>24,p-=w,16&(w=b>>>16&255)){if(k=65535&b,p<(w&=15)&&(f+=C[n++]<<p,(p+=8)<w&&(f+=C[n++]<<p,p+=8)),(k+=f&(1<<w)-1)>l){t.msg="invalid distance too far back",r.mode=30;break t}if(f>>>=w,p-=w,k>(w=i-a)){if((w=k-w)>u&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(F=0,S=d,0===c){if(F+=h-w,w<x){x-=w;do{A[i++]=d[F++]}while(--w);F=i-k,S=A}}else if(c<w){if(F+=h+c-w,(w-=c)<x){x-=w;do{A[i++]=d[F++]}while(--w);if(F=0,c<x){x-=w=c;do{A[i++]=d[F++]}while(--w);F=i-k,S=A}}}else if(F+=c-w,w<x){x-=w;do{A[i++]=d[F++]}while(--w);F=i-k,S=A}for(;x>2;)A[i++]=S[F++],A[i++]=S[F++],A[i++]=S[F++],x-=3;x&&(A[i++]=S[F++],x>1&&(A[i++]=S[F++]))}else{F=i-k;do{A[i++]=A[F++],A[i++]=A[F++],A[i++]=A[F++],x-=3}while(x>2);x&&(A[i++]=A[F++],x>1&&(A[i++]=A[F++]))}break}if(64&w){t.msg="invalid distance code",r.mode=30;break t}b=v[(65535&b)+(f&(1<<w)-1)]}}break}}while(n<o&&i<s);n-=x=p>>3,f&=(1<<(p-=x<<3))-1,t.next_in=n,t.next_out=i,t.avail_in=n<o?o-n+5:5-(n-o),t.avail_out=i<s?s-i+257:257-(i-s),r.hold=f,r.bits=p},Xs=[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],Zs=[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],Ys=[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],Js=[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],Qs=function(t,e,r,n,o,i,a,s){var l,h,u,c,d,f,p,g,v,y=s.bits,m=0,b=0,w=0,x=0,k=0,F=0,S=0,C=0,A=0,T=0,P=null,z=0,O=new Sa.Buf16(16),D=new Sa.Buf16(16),R=null,B=0;for(m=0;m<=15;m++)O[m]=0;for(b=0;b<n;b++)O[e[r+b]]++;for(k=y,x=15;x>=1&&0===O[x];x--);if(k>x&&(k=x),0===x)return o[i++]=20971520,o[i++]=20971520,s.bits=1,0;for(w=1;w<x&&0===O[w];w++);for(k<w&&(k=w),C=1,m=1;m<=15;m++)if(C<<=1,(C-=O[m])<0)return-1;if(C>0&&(0===t||1!==x))return-1;for(D[1]=0,m=1;m<15;m++)D[m+1]=D[m]+O[m];for(b=0;b<n;b++)0!==e[r+b]&&(a[D[e[r+b]]++]=b);if(0===t?(P=R=a,f=19):1===t?(P=Xs,z-=257,R=Zs,B-=257,f=256):(P=Ys,R=Js,f=-1),T=0,b=0,m=w,d=i,F=k,S=0,u=-1,c=(A=1<<k)-1,1===t&&A>852||2===t&&A>592)return 1;for(;;){p=m-S,a[b]<f?(g=0,v=a[b]):a[b]>f?(g=R[B+a[b]],v=P[z+a[b]]):(g=96,v=0),l=1<<m-S,w=h=1<<F;do{o[d+(T>>S)+(h-=l)]=p<<24|g<<16|v}while(0!==h);for(l=1<<m-1;T&l;)l>>=1;if(0!==l?(T&=l-1,T+=l):T=0,b++,0===--O[m]){if(m===x)break;m=e[r+a[b]]}if(m>k&&(T&c)!==u){for(0===S&&(S=k),d+=w,C=1<<(F=m-S);F+S<x&&!((C-=O[F+S])<=0);)F++,C<<=1;if(A+=1<<F,1===t&&A>852||2===t&&A>592)return 1;o[u=T&c]=k<<24|F<<16|d-i}}return 0!==T&&(o[d+T]=m-S<<24|64<<16),s.bits=k,0},$s=-2,tl=12,el=30;function rl(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function nl(){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 Sa.Buf16(320),this.work=new Sa.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ol(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Sa.Buf32(852),e.distcode=e.distdyn=new Sa.Buf32(592),e.sane=1,e.back=-1,0):$s}function il(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,ol(t)):$s}function al(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?$s:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,il(t))):$s}function sl(t,e){var r,n;return t?(n=new nl,t.state=n,n.window=null,0!==(r=al(t,e))&&(t.state=null),r):$s}var ll,hl,ul=!0;function cl(t){if(ul){var e;for(ll=new Sa.Buf32(512),hl=new Sa.Buf32(32),e=0;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(Qs(1,t.lens,0,288,ll,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;Qs(2,t.lens,0,32,hl,0,t.work,{bits:5}),ul=!1}t.lencode=ll,t.lenbits=9,t.distcode=hl,t.distbits=5}function dl(t,e,r,n){var o,i=t.state;return null===i.window&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new Sa.Buf8(i.wsize)),n>=i.wsize?(Sa.arraySet(i.window,e,r-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize):((o=i.wsize-i.wnext)>n&&(o=n),Sa.arraySet(i.window,e,r-n,o,i.wnext),(n-=o)?(Sa.arraySet(i.window,e,r-n,n,0),i.wnext=n,i.whave=i.wsize):(i.wnext+=o,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=o))),0}var fl={inflateReset:il,inflateReset2:al,inflateResetKeep:ol,inflateInit:function(t){return sl(t,15)},inflateInit2:sl,inflate:function(t,e){var r,n,o,i,a,s,l,h,u,c,d,f,p,g,v,y,m,b,w,x,k,F,S,C,A=0,T=new Sa.Buf8(4),P=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return $s;(r=t.state).mode===tl&&(r.mode=13),a=t.next_out,o=t.output,l=t.avail_out,i=t.next_in,n=t.input,s=t.avail_in,h=r.hold,u=r.bits,c=s,d=l,F=0;t:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;u<16;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(2&r.wrap&&35615===h){r.check=0,T[0]=255&h,T[1]=h>>>8&255,r.check=ss(r.check,T,2,0),h=0,u=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",r.mode=el;break}if(8!=(15&h)){t.msg="unknown compression method",r.mode=el;break}if(u-=4,k=8+(15&(h>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){t.msg="invalid window size",r.mode=el;break}r.dmax=1<<k,t.adler=r.check=1,r.mode=512&h?10:tl,h=0,u=0;break;case 2:for(;u<16;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(r.flags=h,8!=(255&r.flags)){t.msg="unknown compression method",r.mode=el;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=el;break}r.head&&(r.head.text=h>>8&1),512&r.flags&&(T[0]=255&h,T[1]=h>>>8&255,r.check=ss(r.check,T,2,0)),h=0,u=0,r.mode=3;case 3:for(;u<32;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}r.head&&(r.head.time=h),512&r.flags&&(T[0]=255&h,T[1]=h>>>8&255,T[2]=h>>>16&255,T[3]=h>>>24&255,r.check=ss(r.check,T,4,0)),h=0,u=0,r.mode=4;case 4:for(;u<16;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}r.head&&(r.head.xflags=255&h,r.head.os=h>>8),512&r.flags&&(T[0]=255&h,T[1]=h>>>8&255,r.check=ss(r.check,T,2,0)),h=0,u=0,r.mode=5;case 5:if(1024&r.flags){for(;u<16;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}r.length=h,r.head&&(r.head.extra_len=h),512&r.flags&&(T[0]=255&h,T[1]=h>>>8&255,r.check=ss(r.check,T,2,0)),h=0,u=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((f=r.length)>s&&(f=s),f&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),Sa.arraySet(r.head.extra,n,i,f,k)),512&r.flags&&(r.check=ss(r.check,n,f,i)),s-=f,i+=f,r.length-=f),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===s)break t;f=0;do{k=n[i+f++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k))}while(k&&f<s);if(512&r.flags&&(r.check=ss(r.check,n,f,i)),s-=f,i+=f,k)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===s)break t;f=0;do{k=n[i+f++],r.head&&k&&r.length<65536&&(r.head.comment+=String.fromCharCode(k))}while(k&&f<s);if(512&r.flags&&(r.check=ss(r.check,n,f,i)),s-=f,i+=f,k)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;u<16;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(h!==(65535&r.check)){t.msg="header crc mismatch",r.mode=el;break}h=0,u=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=tl;break;case 10:for(;u<32;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}t.adler=r.check=rl(h),h=0,u=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=a,t.avail_out=l,t.next_in=i,t.avail_in=s,r.hold=h,r.bits=u,2;t.adler=r.check=1,r.mode=tl;case tl:if(5===e||6===e)break t;case 13:if(r.last){h>>>=7&u,u-=7&u,r.mode=27;break}for(;u<3;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}switch(r.last=1&h,u-=1,3&(h>>>=1)){case 0:r.mode=14;break;case 1:if(cl(r),r.mode=20,6===e){h>>>=2,u-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=el}h>>>=2,u-=2;break;case 14:for(h>>>=7&u,u-=7&u;u<32;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if((65535&h)!=(h>>>16^65535)){t.msg="invalid stored block lengths",r.mode=el;break}if(r.length=65535&h,h=0,u=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(f=r.length){if(f>s&&(f=s),f>l&&(f=l),0===f)break t;Sa.arraySet(o,n,i,f,a),s-=f,i+=f,l-=f,a+=f,r.length-=f;break}r.mode=tl;break;case 17:for(;u<14;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(r.nlen=257+(31&h),h>>>=5,u-=5,r.ndist=1+(31&h),h>>>=5,u-=5,r.ncode=4+(15&h),h>>>=4,u-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=el;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;u<3;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}r.lens[P[r.have++]]=7&h,h>>>=3,u-=3}for(;r.have<19;)r.lens[P[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,S={bits:r.lenbits},F=Qs(0,r.lens,0,19,r.lencode,0,r.work,S),r.lenbits=S.bits,F){t.msg="invalid code lengths set",r.mode=el;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;y=(A=r.lencode[h&(1<<r.lenbits)-1])>>>16&255,m=65535&A,!((v=A>>>24)<=u);){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(m<16)h>>>=v,u-=v,r.lens[r.have++]=m;else{if(16===m){for(C=v+2;u<C;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(h>>>=v,u-=v,0===r.have){t.msg="invalid bit length repeat",r.mode=el;break}k=r.lens[r.have-1],f=3+(3&h),h>>>=2,u-=2}else if(17===m){for(C=v+3;u<C;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}u-=v,k=0,f=3+(7&(h>>>=v)),h>>>=3,u-=3}else{for(C=v+7;u<C;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}u-=v,k=0,f=11+(127&(h>>>=v)),h>>>=7,u-=7}if(r.have+f>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=el;break}for(;f--;)r.lens[r.have++]=k}}if(r.mode===el)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=el;break}if(r.lenbits=9,S={bits:r.lenbits},F=Qs(1,r.lens,0,r.nlen,r.lencode,0,r.work,S),r.lenbits=S.bits,F){t.msg="invalid literal/lengths set",r.mode=el;break}if(r.distbits=6,r.distcode=r.distdyn,S={bits:r.distbits},F=Qs(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,S),r.distbits=S.bits,F){t.msg="invalid distances set",r.mode=el;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(s>=6&&l>=258){t.next_out=a,t.avail_out=l,t.next_in=i,t.avail_in=s,r.hold=h,r.bits=u,_s(t,d),a=t.next_out,o=t.output,l=t.avail_out,i=t.next_in,n=t.input,s=t.avail_in,h=r.hold,u=r.bits,r.mode===tl&&(r.back=-1);break}for(r.back=0;y=(A=r.lencode[h&(1<<r.lenbits)-1])>>>16&255,m=65535&A,!((v=A>>>24)<=u);){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(y&&!(240&y)){for(b=v,w=y,x=m;y=(A=r.lencode[x+((h&(1<<b+w)-1)>>b)])>>>16&255,m=65535&A,!(b+(v=A>>>24)<=u);){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}h>>>=b,u-=b,r.back+=b}if(h>>>=v,u-=v,r.back+=v,r.length=m,0===y){r.mode=26;break}if(32&y){r.back=-1,r.mode=tl;break}if(64&y){t.msg="invalid literal/length code",r.mode=el;break}r.extra=15&y,r.mode=22;case 22:if(r.extra){for(C=r.extra;u<C;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}r.length+=h&(1<<r.extra)-1,h>>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;y=(A=r.distcode[h&(1<<r.distbits)-1])>>>16&255,m=65535&A,!((v=A>>>24)<=u);){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(!(240&y)){for(b=v,w=y,x=m;y=(A=r.distcode[x+((h&(1<<b+w)-1)>>b)])>>>16&255,m=65535&A,!(b+(v=A>>>24)<=u);){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}h>>>=b,u-=b,r.back+=b}if(h>>>=v,u-=v,r.back+=v,64&y){t.msg="invalid distance code",r.mode=el;break}r.offset=m,r.extra=15&y,r.mode=24;case 24:if(r.extra){for(C=r.extra;u<C;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}r.offset+=h&(1<<r.extra)-1,h>>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=el;break}r.mode=25;case 25:if(0===l)break t;if(f=d-l,r.offset>f){if((f=r.offset-f)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=el;break}f>r.wnext?(f-=r.wnext,p=r.wsize-f):p=r.wnext-f,f>r.length&&(f=r.length),g=r.window}else g=o,p=a-r.offset,f=r.length;f>l&&(f=l),l-=f,r.length-=f;do{o[a++]=g[p++]}while(--f);0===r.length&&(r.mode=21);break;case 26:if(0===l)break t;o[a++]=r.length,l--,r.mode=21;break;case 27:if(r.wrap){for(;u<32;){if(0===s)break t;s--,h|=n[i++]<<u,u+=8}if(d-=l,t.total_out+=d,r.total+=d,d&&(t.adler=r.check=r.flags?ss(r.check,o,d,a-d):is(r.check,o,d,a-d)),d=l,(r.flags?h:rl(h))!==r.check){t.msg="incorrect data check",r.mode=el;break}h=0,u=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;u<32;){if(0===s)break t;s--,h+=n[i++]<<u,u+=8}if(h!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=el;break}h=0,u=0}r.mode=29;case 29:F=1;break t;case el:F=-3;break t;case 31:return-4;default:return $s}return t.next_out=a,t.avail_out=l,t.next_in=i,t.avail_in=s,r.hold=h,r.bits=u,(r.wsize||d!==t.avail_out&&r.mode<el&&(r.mode<27||4!==e))&&dl(t,t.output,t.next_out,d-t.avail_out),c-=t.avail_in,d-=t.avail_out,t.total_in+=c,t.total_out+=d,r.total+=d,r.wrap&&d&&(t.adler=r.check=r.flags?ss(r.check,o,d,t.next_out-d):is(r.check,o,d,t.next_out-d)),t.data_type=r.bits+(r.last?64:0)+(r.mode===tl?128:0)+(20===r.mode||15===r.mode?256:0),(0===c&&0===d||4===e)&&0===F&&(F=-5),F},inflateEnd:function(t){if(!t||!t.state)return $s;var e=t.state;return e.window&&(e.window=null),t.state=null,0},inflateGetHeader:function(t,e){var r;return t&&t.state&&2&(r=t.state).wrap?(r.head=e,e.done=!1,0):$s},inflateSetDictionary:function(t,e){var r,n=e.length;return t&&t.state?0!==(r=t.state).wrap&&11!==r.mode?$s:11===r.mode&&is(1,e,n,0)!==r.check?-3:dl(t,e,n,n)?(r.mode=31,-4):(r.havedict=1,0):$s},inflateInfo:"pako inflate (from Nodeca project)"},pl={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},gl=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},vl=Object.prototype.toString;function yl(t){if(!(this instanceof yl))return new yl(t);this.options=Sa.assign({chunkSize:16384,windowBits:0,to:""},t||{});var 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||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new qs,this.strm.avail_out=0;var r=fl.inflateInit2(this.strm,e.windowBits);if(r!==pl.Z_OK)throw new Error(ls[r]);if(this.header=new gl,fl.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Ms(e.dictionary):"[object ArrayBuffer]"===vl.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=fl.inflateSetDictionary(this.strm,e.dictionary))!==pl.Z_OK))throw new Error(ls[r])}function ml(t,e){var r=new yl(e);if(r.push(t,!0),r.err)throw r.msg||ls[r.err];return r.result}yl.prototype.push=function(t,e){var r,n,o,i,a,s=this.strm,l=this.options.chunkSize,h=this.options.dictionary,u=!1;if(this.ended)return!1;n=e===~~e?e:!0===e?pl.Z_FINISH:pl.Z_NO_FLUSH,"string"==typeof t?s.input=function(t){for(var e=new Sa.Buf8(t.length),r=0,n=e.length;r<n;r++)e[r]=t.charCodeAt(r);return e}(t):"[object ArrayBuffer]"===vl.call(t)?s.input=new Uint8Array(t):s.input=t,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new Sa.Buf8(l),s.next_out=0,s.avail_out=l),(r=fl.inflate(s,pl.Z_NO_FLUSH))===pl.Z_NEED_DICT&&h&&(r=fl.inflateSetDictionary(this.strm,h)),r===pl.Z_BUF_ERROR&&!0===u&&(r=pl.Z_OK,u=!1),r!==pl.Z_STREAM_END&&r!==pl.Z_OK)return this.onEnd(r),this.ended=!0,!1;s.next_out&&(0!==s.avail_out&&r!==pl.Z_STREAM_END&&(0!==s.avail_in||n!==pl.Z_FINISH&&n!==pl.Z_SYNC_FLUSH)||("string"===this.options.to?(o=Ws(s.output,s.next_out),i=s.next_out-o,a=Vs(s.output,o),s.next_out=i,s.avail_out=l-i,i&&Sa.arraySet(s.output,s.output,o,i,0),this.onData(a)):this.onData(Sa.shrinkBuf(s.output,s.next_out)))),0===s.avail_in&&0===s.avail_out&&(u=!0)}while((s.avail_in>0||0===s.avail_out)&&r!==pl.Z_STREAM_END);return r===pl.Z_STREAM_END&&(n=pl.Z_FINISH),n===pl.Z_FINISH?(r=fl.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===pl.Z_OK):n!==pl.Z_SYNC_FLUSH||(this.onEnd(pl.Z_OK),s.avail_out=0,!0)},yl.prototype.onData=function(t){this.chunks.push(t)},yl.prototype.onEnd=function(t){t===pl.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Sa.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var bl={Inflate:yl,inflate:ml,inflateRaw:function(t,e){return(e=e||{}).raw=!0,ml(t,e)},ungzip:ml},wl={};(0,Sa.assign)(wl,Hs,bl,pl);var xl,kl,Fl,Sl,Cl=wl,Al={};Al.toRGBA8=function(t){var e=t.width,r=t.height;if(null==t.tabs.acTL)return[Al.toRGBA8.decodeImage(t.data,e,r,t).buffer];var n=[];null==t.frames[0].data&&(t.frames[0].data=t.data);for(var o=e*r*4,i=new Uint8Array(o),a=new Uint8Array(o),s=new Uint8Array(o),l=0;l<t.frames.length;l++){var h=t.frames[l],u=h.rect.x,c=h.rect.y,d=h.rect.width,f=h.rect.height,p=Al.toRGBA8.decodeImage(h.data,d,f,t);if(0!=l)for(var g=0;g<o;g++)s[g]=i[g];if(0==h.blend?Al._copyTile(p,d,f,i,e,r,u,c,0):1==h.blend&&Al._copyTile(p,d,f,i,e,r,u,c,1),n.push(i.buffer.slice(0)),0==h.dispose);else if(1==h.dispose)Al._copyTile(a,d,f,i,e,r,u,c,0);else if(2==h.dispose)for(g=0;g<o;g++)i[g]=s[g]}return n},Al.toRGBA8.decodeImage=function(t,e,r,n){var o=e*r,i=Al.decode._getBPP(n),a=Math.ceil(e*i/8),s=new Uint8Array(4*o),l=new Uint32Array(s.buffer),h=n.ctype,u=n.depth,c=Al._bin.readUshort;if(6==h){var d=o<<2;if(8==u)for(var f=0;f<d;f+=4)s[f]=t[f],s[f+1]=t[f+1],s[f+2]=t[f+2],s[f+3]=t[f+3];if(16==u)for(f=0;f<d;f++)s[f]=t[f<<1]}else if(2==h){var p=n.tabs.tRNS;if(null==p){if(8==u)for(f=0;f<o;f++){var g=3*f;l[f]=255<<24|t[g+2]<<16|t[g+1]<<8|t[g]}if(16==u)for(f=0;f<o;f++)g=6*f,l[f]=255<<24|t[g+4]<<16|t[g+2]<<8|t[g]}else{var v=p[0],y=p[1],m=p[2];if(8==u)for(f=0;f<o;f++){var b=f<<2;g=3*f,l[f]=255<<24|t[g+2]<<16|t[g+1]<<8|t[g],t[g]==v&&t[g+1]==y&&t[g+2]==m&&(s[b+3]=0)}if(16==u)for(f=0;f<o;f++)b=f<<2,g=6*f,l[f]=255<<24|t[g+4]<<16|t[g+2]<<8|t[g],c(t,g)==v&&c(t,g+2)==y&&c(t,g+4)==m&&(s[b+3]=0)}}else if(3==h){var w=n.tabs.PLTE,x=n.tabs.tRNS,k=x?x.length:0;if(1==u)for(var F=0;F<r;F++){var S=F*a,C=F*e;for(f=0;f<e;f++){b=C+f<<2;var A=3*(T=t[S+(f>>3)]>>7-(7&f)&1);s[b]=w[A],s[b+1]=w[A+1],s[b+2]=w[A+2],s[b+3]=T<k?x[T]:255}}if(2==u)for(F=0;F<r;F++)for(S=F*a,C=F*e,f=0;f<e;f++)b=C+f<<2,A=3*(T=t[S+(f>>2)]>>6-((3&f)<<1)&3),s[b]=w[A],s[b+1]=w[A+1],s[b+2]=w[A+2],s[b+3]=T<k?x[T]:255;if(4==u)for(F=0;F<r;F++)for(S=F*a,C=F*e,f=0;f<e;f++)b=C+f<<2,A=3*(T=t[S+(f>>1)]>>4-((1&f)<<2)&15),s[b]=w[A],s[b+1]=w[A+1],s[b+2]=w[A+2],s[b+3]=T<k?x[T]:255;if(8==u)for(f=0;f<o;f++){var T;b=f<<2,A=3*(T=t[f]),s[b]=w[A],s[b+1]=w[A+1],s[b+2]=w[A+2],s[b+3]=T<k?x[T]:255}}else if(4==h){if(8==u)for(f=0;f<o;f++){b=f<<2;var P=t[z=f<<1];s[b]=P,s[b+1]=P,s[b+2]=P,s[b+3]=t[z+1]}if(16==u)for(f=0;f<o;f++){var z;b=f<<2,P=t[z=f<<2],s[b]=P,s[b+1]=P,s[b+2]=P,s[b+3]=t[z+2]}}else if(0==h)for(v=n.tabs.tRNS?n.tabs.tRNS:-1,F=0;F<r;F++){var O=F*a,D=F*e;if(1==u)for(var R=0;R<e;R++){var B=(P=255*(t[O+(R>>>3)]>>>7-(7&R)&1))==255*v?0:255;l[D+R]=B<<24|P<<16|P<<8|P}else if(2==u)for(R=0;R<e;R++)B=(P=85*(t[O+(R>>>2)]>>>6-((3&R)<<1)&3))==85*v?0:255,l[D+R]=B<<24|P<<16|P<<8|P;else if(4==u)for(R=0;R<e;R++)B=(P=17*(t[O+(R>>>1)]>>>4-((1&R)<<2)&15))==17*v?0:255,l[D+R]=B<<24|P<<16|P<<8|P;else if(8==u)for(R=0;R<e;R++)B=(P=t[O+R])==v?0:255,l[D+R]=B<<24|P<<16|P<<8|P;else if(16==u)for(R=0;R<e;R++)P=t[O+(R<<1)],B=c(t,O+(R<<f))==v?0:255,l[D+R]=B<<24|P<<16|P<<8|P}return s},Al.decode=function(t){for(var e,r=new Uint8Array(t),n=8,o=Al._bin,i=o.readUshort,a=o.readUint,s={tabs:{},frames:[]},l=new Uint8Array(r.length),h=0,u=0,c=[137,80,78,71,13,10,26,10],d=0;d<8;d++)if(r[d]!=c[d])throw"The input is not a PNG file!";for(;n<r.length;){var f=o.readUint(r,n);n+=4;var p=o.readASCII(r,n,4);if(n+=4,"IHDR"==p)Al.decode._IHDR(r,n,s);else if("IDAT"==p){for(d=0;d<f;d++)l[h+d]=r[n+d];h+=f}else if("acTL"==p)s.tabs[p]={num_frames:a(r,n),num_plays:a(r,n+4)},e=new Uint8Array(r.length);else if("fcTL"==p){var g;0!=u&&((g=s.frames[s.frames.length-1]).data=Al.decode._decompress(s,e.slice(0,u),g.rect.width,g.rect.height),u=0);var v={x:a(r,n+12),y:a(r,n+16),width:a(r,n+4),height:a(r,n+8)},y=i(r,n+22);y=i(r,n+20)/(0==y?100:y);var m={rect:v,delay:Math.round(1e3*y),dispose:r[n+24],blend:r[n+25]};s.frames.push(m)}else if("fdAT"==p){for(d=0;d<f-4;d++)e[u+d]=r[n+d+4];u+=f-4}else if("pHYs"==p)s.tabs[p]=[o.readUint(r,n),o.readUint(r,n+4),r[n+8]];else if("cHRM"==p)for(s.tabs[p]=[],d=0;d<8;d++)s.tabs[p].push(o.readUint(r,n+4*d));else if("tEXt"==p){null==s.tabs[p]&&(s.tabs[p]={});var b=o.nextZero(r,n),w=o.readASCII(r,n,b-n),x=o.readASCII(r,b+1,n+f-b-1);s.tabs[p][w]=x}else if("iTXt"==p){null==s.tabs[p]&&(s.tabs[p]={}),b=0;var k=n;b=o.nextZero(r,k),w=o.readASCII(r,k,b-k),k=b+1,k+=2,b=o.nextZero(r,k),o.readASCII(r,k,b-k),k=b+1,b=o.nextZero(r,k),o.readUTF8(r,k,b-k),k=b+1,x=o.readUTF8(r,k,f-(k-n)),s.tabs[p][w]=x}else if("PLTE"==p)s.tabs[p]=o.readBytes(r,n,f);else if("hIST"==p){var F=s.tabs.PLTE.length/3;for(s.tabs[p]=[],d=0;d<F;d++)s.tabs[p].push(i(r,n+2*d))}else if("tRNS"==p)3==s.ctype?s.tabs[p]=o.readBytes(r,n,f):0==s.ctype?s.tabs[p]=i(r,n):2==s.ctype&&(s.tabs[p]=[i(r,n),i(r,n+2),i(r,n+4)]);else if("gAMA"==p)s.tabs[p]=o.readUint(r,n)/1e5;else if("sRGB"==p)s.tabs[p]=r[n];else if("bKGD"==p)0==s.ctype||4==s.ctype?s.tabs[p]=[i(r,n)]:2==s.ctype||6==s.ctype?s.tabs[p]=[i(r,n),i(r,n+2),i(r,n+4)]:3==s.ctype&&(s.tabs[p]=r[n]);else if("IEND"==p)break;n+=f,o.readUint(r,n),n+=4}return 0!=u&&((g=s.frames[s.frames.length-1]).data=Al.decode._decompress(s,e.slice(0,u),g.rect.width,g.rect.height),u=0),s.data=Al.decode._decompress(s,l,s.width,s.height),delete s.compress,delete s.interlace,delete s.filter,s},Al.decode._decompress=function(t,e,r,n){var o=Al.decode._getBPP(t),i=Math.ceil(r*o/8),a=new Uint8Array((i+1+t.interlace)*n);return e=Al.decode._inflate(e,a),0==t.interlace?e=Al.decode._filterZero(e,t,0,r,n):1==t.interlace&&(e=Al.decode._readInterlace(e,t)),e},Al.decode._inflate=function(t,e){return Al.inflateRaw(new Uint8Array(t.buffer,2,t.length-6),e)},Al.inflateRaw=((Fl={}).H={},Fl.H.N=function(t,e){var r,n,o=Uint8Array,i=0,a=0,s=0,l=0,h=0,u=0,c=0,d=0,f=0;if(3==t[0]&&0==t[1])return e||new o(0);var p=Fl.H,g=p.b,v=p.e,y=p.R,m=p.n,b=p.A,w=p.Z,x=p.m,k=null==e;for(k&&(e=new o(t.length>>>2<<3));0==i;)if(i=g(t,f,1),a=g(t,f+1,2),f+=3,0!=a){if(k&&(e=Fl.H.W(e,d+(1<<17))),1==a&&(r=x.J,n=x.h,u=511,c=31),2==a){s=v(t,f,5)+257,l=v(t,f+5,5)+1,h=v(t,f+10,4)+4,f+=14;for(var F=1,S=0;S<38;S+=2)x.Q[S]=0,x.Q[S+1]=0;for(S=0;S<h;S++){var C=v(t,f+3*S,3);x.Q[1+(x.X[S]<<1)]=C,C>F&&(F=C)}f+=3*h,m(x.Q,F),b(x.Q,F,x.u),r=x.w,n=x.d,f=y(x.u,(1<<F)-1,s+l,t,f,x.v);var A=p.V(x.v,0,s,x.C);u=(1<<A)-1;var T=p.V(x.v,s,l,x.D);c=(1<<T)-1,m(x.C,A),b(x.C,A,r),m(x.D,T),b(x.D,T,n)}for(;;){var P=r[w(t,f)&u];f+=15&P;var z=P>>>4;if(z>>>8==0)e[d++]=z;else{if(256==z)break;var O=d+z-254;if(z>264){var D=x.q[z-257];O=d+(D>>>3)+v(t,f,7&D),f+=7&D}var R=n[w(t,f)&c];f+=15&R;var B=R>>>4,N=x.c[B],E=(N>>>4)+g(t,f,15&N);for(f+=15&N;d<O;)e[d]=e[d++-E],e[d]=e[d++-E],e[d]=e[d++-E],e[d]=e[d++-E];d=O}}}else{7&f&&(f+=8-(7&f));var j=(f>>>3)+4,I=t[j-4]|t[j-3]<<8;k&&(e=Fl.H.W(e,d+I)),e.set(new o(t.buffer,t.byteOffset+j,I),d),f=j+I<<3,d+=I}return e.length==d?e:e.slice(0,d)},Fl.H.W=function(t,e){var r=t.length;if(e<=r)return t;var n=new Uint8Array(r<<1);return n.set(t,0),n},Fl.H.R=function(t,e,r,n,o,i){for(var a=Fl.H.e,s=Fl.H.Z,l=0;l<r;){var h=t[s(n,o)&e];o+=15&h;var u=h>>>4;if(u<=15)i[l]=u,l++;else{var c=0,d=0;16==u?(d=3+a(n,o,2),o+=2,c=i[l-1]):17==u?(d=3+a(n,o,3),o+=3):18==u&&(d=11+a(n,o,7),o+=7);for(var f=l+d;l<f;)i[l]=c,l++}}return o},Fl.H.V=function(t,e,r,n){for(var o=0,i=0,a=n.length>>>1;i<r;){var s=t[i+e];n[i<<1]=0,n[1+(i<<1)]=s,s>o&&(o=s),i++}for(;i<a;)n[i<<1]=0,n[1+(i<<1)]=0,i++;return o},Fl.H.n=function(t,e){for(var r,n,o,i,a=Fl.H.m,s=t.length,l=a.j,h=0;h<=e;h++)l[h]=0;for(h=1;h<s;h+=2)l[t[h]]++;var u=a.K;for(r=0,l[0]=0,n=1;n<=e;n++)r=r+l[n-1]<<1,u[n]=r;for(o=0;o<s;o+=2)0!=(i=t[o+1])&&(t[o]=u[i],u[i]++)},Fl.H.A=function(t,e,r){for(var n=t.length,o=Fl.H.m.r,i=0;i<n;i+=2)if(0!=t[i+1])for(var a=i>>1,s=t[i+1],l=a<<4|s,h=e-s,u=t[i]<<h,c=u+(1<<h);u!=c;)r[o[u]>>>15-e]=l,u++},Fl.H.l=function(t,e){for(var r=Fl.H.m.r,n=15-e,o=0;o<t.length;o+=2){var i=t[o]<<e-t[o+1];t[o]=r[i]>>>n}},Fl.H.M=function(t,e,r){r<<=7&e;var n=e>>>3;t[n]|=r,t[n+1]|=r>>>8},Fl.H.I=function(t,e,r){r<<=7&e;var n=e>>>3;t[n]|=r,t[n+1]|=r>>>8,t[n+2]|=r>>>16},Fl.H.e=function(t,e,r){return(t[e>>>3]|t[(e>>>3)+1]<<8)>>>(7&e)&(1<<r)-1},Fl.H.b=function(t,e,r){return(t[e>>>3]|t[(e>>>3)+1]<<8|t[(e>>>3)+2]<<16)>>>(7&e)&(1<<r)-1},Fl.H.Z=function(t,e){return(t[e>>>3]|t[(e>>>3)+1]<<8|t[(e>>>3)+2]<<16)>>>(7&e)},Fl.H.i=function(t,e){return(t[e>>>3]|t[(e>>>3)+1]<<8|t[(e>>>3)+2]<<16|t[(e>>>3)+3]<<24)>>>(7&e)},Fl.H.m=(xl=Uint16Array,kl=Uint32Array,{K:new xl(16),j:new xl(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[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,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new xl(32),p:[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,65535,65535],z:[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,0,0],c:new kl(32),J:new xl(512),_:[],h:new xl(32),$:[],w:new xl(32768),C:[],v:[],d:new xl(32768),D:[],u:new xl(512),Q:[],r:new xl(32768),s:new kl(286),Y:new kl(30),a:new kl(19),t:new kl(15e3),k:new xl(65536),g:new xl(32768)}),function(){for(var t=Fl.H.m,e=0;e<32768;e++){var r=e;r=(4278255360&(r=(4042322160&(r=(3435973836&(r=(2863311530&r)>>>1|(1431655765&r)<<1))>>>2|(858993459&r)<<2))>>>4|(252645135&r)<<4))>>>8|(16711935&r)<<8,t.r[e]=(r>>>16|r<<16)>>>17}function n(t,e,r){for(;0!=e--;)t.push(0,r)}for(e=0;e<32;e++)t.q[e]=t.S[e]<<3|t.T[e],t.c[e]=t.p[e]<<4|t.z[e];n(t._,144,8),n(t._,112,9),n(t._,24,7),n(t._,8,8),Fl.H.n(t._,9),Fl.H.A(t._,9,t.J),Fl.H.l(t._,9),n(t.$,32,5),Fl.H.n(t.$,5),Fl.H.A(t.$,5,t.h),Fl.H.l(t.$,5),n(t.Q,19,0),n(t.C,286,0),n(t.D,30,0),n(t.v,320,0)}(),Fl.H.N),Al.decode._readInterlace=function(t,e){for(var r=e.width,n=e.height,o=Al.decode._getBPP(e),i=o>>3,a=Math.ceil(r*o/8),s=new Uint8Array(n*a),l=0,h=[0,0,4,0,2,0,1],u=[0,4,0,2,0,1,0],c=[8,8,8,4,4,2,2],d=[8,8,4,4,2,2,1],f=0;f<7;){for(var p=c[f],g=d[f],v=0,y=0,m=h[f];m<n;)m+=p,y++;for(var b=u[f];b<r;)b+=g,v++;var w=Math.ceil(v*o/8);Al.decode._filterZero(t,e,l,v,y);for(var x=0,k=h[f];k<n;){for(var F=u[f],S=l+x*w<<3;F<r;){var C;if(1==o&&(C=(C=t[S>>3])>>7-(7&S)&1,s[k*a+(F>>3)]|=C<<7-(7&F)),2==o&&(C=(C=t[S>>3])>>6-(7&S)&3,s[k*a+(F>>2)]|=C<<6-((3&F)<<1)),4==o&&(C=(C=t[S>>3])>>4-(7&S)&15,s[k*a+(F>>1)]|=C<<4-((1&F)<<2)),o>=8)for(var A=k*a+F*i,T=0;T<i;T++)s[A+T]=t[(S>>3)+T];S+=o,F+=g}x++,k+=p}v*y!=0&&(l+=y*(1+w)),f+=1}return s},Al.decode._getBPP=function(t){return[1,null,3,1,2,null,4][t.ctype]*t.depth},Al.decode._filterZero=function(t,e,r,n,o){var i=Al.decode._getBPP(e),a=Math.ceil(n*i/8),s=Al.decode._paeth;i=Math.ceil(i/8);var l=0,h=1,u=t[r],c=0;if(u>1&&(t[r]=[0,0,1][u-2]),3==u)for(c=i;c<a;c++)t[c+1]=t[c+1]+(t[c+1-i]>>>1)&255;for(var d=0;d<o;d++)if(c=0,0==(u=t[(h=(l=r+d*a)+d+1)-1]))for(;c<a;c++)t[l+c]=t[h+c];else if(1==u){for(;c<i;c++)t[l+c]=t[h+c];for(;c<a;c++)t[l+c]=t[h+c]+t[l+c-i]}else if(2==u)for(;c<a;c++)t[l+c]=t[h+c]+t[l+c-a];else if(3==u){for(;c<i;c++)t[l+c]=t[h+c]+(t[l+c-a]>>>1);for(;c<a;c++)t[l+c]=t[h+c]+(t[l+c-a]+t[l+c-i]>>>1)}else{for(;c<i;c++)t[l+c]=t[h+c]+s(0,t[l+c-a],0);for(;c<a;c++)t[l+c]=t[h+c]+s(t[l+c-i],t[l+c-a],t[l+c-i-a])}return t},Al.decode._paeth=function(t,e,r){var n=t+e-r,o=n-t,i=n-e,a=n-r;return o*o<=i*i&&o*o<=a*a?t:i*i<=a*a?e:r},Al.decode._IHDR=function(t,e,r){var n=Al._bin;r.width=n.readUint(t,e),e+=4,r.height=n.readUint(t,e),e+=4,r.depth=t[e],e++,r.ctype=t[e],e++,r.compress=t[e],e++,r.filter=t[e],e++,r.interlace=t[e],e++},Al._bin={nextZero:function(t,e){for(;0!=t[e];)e++;return e},readUshort:function(t,e){return t[e]<<8|t[e+1]},writeUshort:function(t,e,r){t[e]=r>>8&255,t[e+1]=255&r},readUint:function(t,e){return 16777216*t[e]+(t[e+1]<<16|t[e+2]<<8|t[e+3])},writeUint:function(t,e,r){t[e]=r>>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r},readASCII:function(t,e,r){for(var n="",o=0;o<r;o++)n+=String.fromCharCode(t[e+o]);return n},writeASCII:function(t,e,r){for(var n=0;n<r.length;n++)t[e+n]=r.charCodeAt(n)},readBytes:function(t,e,r){for(var n=[],o=0;o<r;o++)n.push(t[e+o]);return n},pad:function(t){return t.length<2?"0"+t:t},readUTF8:function(t,e,r){for(var n,o="",i=0;i<r;i++)o+="%"+Al._bin.pad(t[e+i].toString(16));try{n=decodeURIComponent(o)}catch(n){return Al._bin.readASCII(t,e,r)}return n}},Al._copyTile=function(t,e,r,n,o,i,a,s,l){for(var h=Math.min(e,o),u=Math.min(r,i),c=0,d=0,f=0;f<u;f++)for(var p=0;p<h;p++)if(a>=0&&s>=0?(c=f*e+p<<2,d=(s+f)*o+a+p<<2):(c=(-s+f)*e-a+p<<2,d=f*o+p<<2),0==l)n[d]=t[c],n[d+1]=t[c+1],n[d+2]=t[c+2],n[d+3]=t[c+3];else if(1==l){var g=t[c+3]*(1/255),v=t[c]*g,y=t[c+1]*g,m=t[c+2]*g,b=n[d+3]*(1/255),w=n[d]*b,x=n[d+1]*b,k=n[d+2]*b,F=1-g,S=g+b*F,C=0==S?0:1/S;n[d+3]=255*S,n[d+0]=(v+w*F)*C,n[d+1]=(y+x*F)*C,n[d+2]=(m+k*F)*C}else if(2==l)g=t[c+3],v=t[c],y=t[c+1],m=t[c+2],b=n[d+3],w=n[d],x=n[d+1],k=n[d+2],g==b&&v==w&&y==x&&m==k?(n[d]=0,n[d+1]=0,n[d+2]=0,n[d+3]=0):(n[d]=v,n[d+1]=y,n[d+2]=m,n[d+3]=g);else if(3==l){if(g=t[c+3],v=t[c],y=t[c+1],m=t[c+2],b=n[d+3],w=n[d],x=n[d+1],k=n[d+2],g==b&&v==w&&y==x&&m==k)continue;if(g<220&&b>20)return!1}return!0},Al.encode=function(t,e,r,n,o,i,a){null==n&&(n=0),null==a&&(a=!1);var s=Al.encode.compress(t,e,r,n,[!1,!1,!1,0,a]);return Al.encode.compressPNG(s,-1),Al.encode._main(s,e,r,o,i)},Al.encodeLL=function(t,e,r,n,o,i,a,s){for(var l={ctype:0+(1==n?0:2)+(0==o?0:4),depth:i,frames:[]},h=(n+o)*i,u=h*e,c=0;c<t.length;c++)l.frames.push({rect:{x:0,y:0,width:e,height:r},img:new Uint8Array(t[c]),blend:0,dispose:1,bpp:Math.ceil(h/8),bpl:Math.ceil(u/8)});return Al.encode.compressPNG(l,0,!0),Al.encode._main(l,e,r,a,s)},Al.encode._main=function(t,e,r,n,o){null==o&&(o={});var i=Al.crc.crc,a=Al._bin.writeUint,s=Al._bin.writeUshort,l=Al._bin.writeASCII,h=8,u=t.frames.length>1,c=!1,d=33+(u?20:0);if(null!=o.sRGB&&(d+=13),null!=o.pHYs&&(d+=21),3==t.ctype){for(var f=t.plte.length,p=0;p<f;p++)t.plte[p]>>>24!=255&&(c=!0);d+=8+3*f+4+(c?8+1*f+4:0)}for(var g=0;g<t.frames.length;g++)u&&(d+=38),d+=(S=t.frames[g]).cimg.length+12,0!=g&&(d+=4);d+=12;var v=new Uint8Array(d),y=[137,80,78,71,13,10,26,10];for(p=0;p<8;p++)v[p]=y[p];if(a(v,h,13),l(v,h+=4,"IHDR"),a(v,h+=4,e),a(v,h+=4,r),v[h+=4]=t.depth,v[++h]=t.ctype,v[++h]=0,v[++h]=0,v[++h]=0,a(v,++h,i(v,h-17,17)),h+=4,null!=o.sRGB&&(a(v,h,1),l(v,h+=4,"sRGB"),v[h+=4]=o.sRGB,a(v,++h,i(v,h-5,5)),h+=4),null!=o.pHYs&&(a(v,h,9),l(v,h+=4,"pHYs"),a(v,h+=4,o.pHYs[0]),a(v,h+=4,o.pHYs[1]),v[h+=4]=o.pHYs[2],a(v,++h,i(v,h-13,13)),h+=4),u&&(a(v,h,8),l(v,h+=4,"acTL"),a(v,h+=4,t.frames.length),a(v,h+=4,null!=o.loop?o.loop:0),a(v,h+=4,i(v,h-12,12)),h+=4),3==t.ctype){for(a(v,h,3*(f=t.plte.length)),l(v,h+=4,"PLTE"),h+=4,p=0;p<f;p++){var m=3*p,b=t.plte[p],w=255&b,x=b>>>8&255,k=b>>>16&255;v[h+m+0]=w,v[h+m+1]=x,v[h+m+2]=k}if(a(v,h+=3*f,i(v,h-3*f-4,3*f+4)),h+=4,c){for(a(v,h,f),l(v,h+=4,"tRNS"),h+=4,p=0;p<f;p++)v[h+p]=t.plte[p]>>>24&255;a(v,h+=f,i(v,h-f-4,f+4)),h+=4}}var F=0;for(g=0;g<t.frames.length;g++){var S=t.frames[g];u&&(a(v,h,26),l(v,h+=4,"fcTL"),a(v,h+=4,F++),a(v,h+=4,S.rect.width),a(v,h+=4,S.rect.height),a(v,h+=4,S.rect.x),a(v,h+=4,S.rect.y),s(v,h+=4,n[g]),s(v,h+=2,1e3),v[h+=2]=S.dispose,v[++h]=S.blend,a(v,++h,i(v,h-30,30)),h+=4);var C=S.cimg;a(v,h,(f=C.length)+(0==g?0:4));var A=h+=4;l(v,h,0==g?"IDAT":"fdAT"),h+=4,0!=g&&(a(v,h,F++),h+=4),v.set(C,h),a(v,h+=f,i(v,A,h-A)),h+=4}return a(v,h,0),l(v,h+=4,"IEND"),a(v,h+=4,i(v,h-4,4)),h+=4,v.buffer},Al.encode.compressPNG=function(t,e,r){for(var n=0;n<t.frames.length;n++){var o=t.frames[n];o.rect.width;var i=o.rect.height,a=new Uint8Array(i*o.bpl+i);o.cimg=Al.encode._filterZero(o.img,i,o.bpp,o.bpl,a,e,r)}},Al.encode.compress=function(t,e,r,n,o){for(var i=o[0],a=o[1],s=o[2],l=o[3],h=o[4],u=6,c=8,d=255,f=0;f<t.length;f++)for(var p=new Uint8Array(t[f]),g=p.length,v=0;v<g;v+=4)d&=p[v+3];var y=255!=d,m=Al.encode.framize(t,e,r,i,a,s),b={},w=[],x=[];if(0!=n){var k=[];for(v=0;v<m.length;v++)k.push(m[v].img.buffer);var F=Al.encode.concatRGBA(k),S=Al.quantize(F,n),C=0,A=new Uint8Array(S.abuf);for(v=0;v<m.length;v++){var T=(G=m[v].img).length;for(x.push(new Uint8Array(S.inds.buffer,C>>2,T>>2)),f=0;f<T;f+=4)G[f]=A[C+f],G[f+1]=A[C+f+1],G[f+2]=A[C+f+2],G[f+3]=A[C+f+3];C+=T}for(v=0;v<S.plte.length;v++)w.push(S.plte[v].est.rgba)}else for(f=0;f<m.length;f++){var P=m[f],z=new Uint32Array(P.img.buffer),O=P.rect.width,D=(g=z.length,new Uint8Array(g));for(x.push(D),v=0;v<g;v++){var R=z[v];if(0!=v&&R==z[v-1])D[v]=D[v-1];else if(v>O&&R==z[v-O])D[v]=D[v-O];else{var B=b[R];if(null==B&&(b[R]=B=w.length,w.push(R),w.length>=300))break;D[v]=B}}}var N=w.length;for(N<=256&&0==h&&(c=N<=2?1:N<=4?2:N<=16?4:8,c=Math.max(c,l)),f=0;f<m.length;f++){(P=m[f]).rect.x,P.rect.y,O=P.rect.width;var E=P.rect.height,j=P.img;new Uint32Array(j.buffer);var I=4*O,M=4;if(N<=256&&0==h){I=Math.ceil(c*O/8);for(var U=new Uint8Array(I*E),V=x[f],W=0;W<E;W++){v=W*I;var q=W*O;if(8==c)for(var L=0;L<O;L++)U[v+L]=V[q+L];else if(4==c)for(L=0;L<O;L++)U[v+(L>>1)]|=V[q+L]<<4-4*(1&L);else if(2==c)for(L=0;L<O;L++)U[v+(L>>2)]|=V[q+L]<<6-2*(3&L);else if(1==c)for(L=0;L<O;L++)U[v+(L>>3)]|=V[q+L]<<7-1*(7&L)}j=U,u=3,M=1}else if(0==y&&1==m.length){U=new Uint8Array(O*E*3);var K=O*E;for(v=0;v<K;v++){var G,H=4*v;U[G=3*v]=j[H],U[G+1]=j[H+1],U[G+2]=j[H+2]}j=U,u=2,M=3,I=3*O}P.img=j,P.bpl=I,P.bpp=M}return{ctype:u,depth:c,plte:w,frames:m}},Al.encode.framize=function(t,e,r,n,o,i){for(var a=[],s=0;s<t.length;s++){var l,h=new Uint8Array(t[s]),u=new Uint32Array(h.buffer),c=0,d=0,f=e,p=r,g=n?1:0;if(0!=s){for(var v=i||n||1==s||0!=a[s-2].dispose?1:2,y=0,m=1e9,b=0;b<v;b++){for(var w=new Uint8Array(t[s-1-b]),x=new Uint32Array(t[s-1-b]),k=e,F=r,S=-1,C=-1,A=0;A<r;A++)for(var T=0;T<e;T++)u[N=A*e+T]!=x[N]&&(T<k&&(k=T),T>S&&(S=T),A<F&&(F=A),A>C&&(C=A));-1==S&&(k=F=S=C=0),o&&(1&~k||k--,1&~F||F--);var P=(S-k+1)*(C-F+1);P<m&&(m=P,y=b,c=k,d=F,f=S-k+1,p=C-F+1)}w=new Uint8Array(t[s-1-y]),1==y&&(a[s-1].dispose=2),l=new Uint8Array(f*p*4),Al._copyTile(w,e,r,l,f,p,-c,-d,0),1==(g=Al._copyTile(h,e,r,l,f,p,-c,-d,3)?1:0)?Al.encode._prepareDiff(h,e,r,l,{x:c,y:d,width:f,height:p}):Al._copyTile(h,e,r,l,f,p,-c,-d,0)}else l=h.slice(0);a.push({rect:{x:c,y:d,width:f,height:p},img:l,blend:g,dispose:0})}if(n)for(s=0;s<a.length;s++)if(1!=(E=a[s]).blend){var z=E.rect,O=a[s-1].rect,D=Math.min(z.x,O.x),R=Math.min(z.y,O.y),B={x:D,y:R,width:Math.max(z.x+z.width,O.x+O.width)-D,height:Math.max(z.y+z.height,O.y+O.height)-R};a[s-1].dispose=1,s-1!=0&&Al.encode._updateFrame(t,e,r,a,s-1,B,o),Al.encode._updateFrame(t,e,r,a,s,B,o)}if(1!=t.length)for(var N=0;N<a.length;N++){var E;(E=a[N]).rect.width,E.rect.height}return a},Al.encode._updateFrame=function(t,e,r,n,o,i,a){for(var s=Uint8Array,l=Uint32Array,h=new s(t[o-1]),u=new l(t[o-1]),c=o+1<t.length?new s(t[o+1]):null,d=new s(t[o]),f=new l(d.buffer),p=e,g=r,v=-1,y=-1,m=0;m<i.height;m++)for(var b=0;b<i.width;b++){var w=i.x+b,x=i.y+m,k=x*e+w,F=f[k];0==F||0==n[o-1].dispose&&u[k]==F&&(null==c||0!=c[4*k+3])||(w<p&&(p=w),w>v&&(v=w),x<g&&(g=x),x>y&&(y=x))}-1==v&&(p=g=v=y=0),a&&(1&~p||p--,1&~g||g--),i={x:p,y:g,width:v-p+1,height:y-g+1};var S=n[o];S.rect=i,S.blend=1,S.img=new Uint8Array(i.width*i.height*4),0==n[o-1].dispose?(Al._copyTile(h,e,r,S.img,i.width,i.height,-i.x,-i.y,0),Al.encode._prepareDiff(d,e,r,S.img,i)):Al._copyTile(d,e,r,S.img,i.width,i.height,-i.x,-i.y,0)},Al.encode._prepareDiff=function(t,e,r,n,o){Al._copyTile(t,e,r,n,o.width,o.height,-o.x,-o.y,2)},Al.encode._filterZero=function(t,e,r,n,o,i,a){var s,l=[],h=[0,1,2,3,4];-1!=i?h=[i]:(e*n>5e5||1==r)&&(h=[0]),a&&(s={level:0});for(var u=a&&null!=UZIP?UZIP:Cl,c=0;c<h.length;c++){for(var d=0;d<e;d++)Al.encode._filterLine(o,t,d,n,r,h[c]);l.push(u.deflate(o,s))}var f,p=1e9;for(c=0;c<l.length;c++)l[c].length<p&&(f=c,p=l[c].length);return l[f]},Al.encode._filterLine=function(t,e,r,n,o,i){var a=r*n,s=a+r,l=Al.decode._paeth;if(t[s]=i,s++,0==i)if(n<500)for(var h=0;h<n;h++)t[s+h]=e[a+h];else t.set(new Uint8Array(e.buffer,a,n),s);else if(1==i){for(h=0;h<o;h++)t[s+h]=e[a+h];for(h=o;h<n;h++)t[s+h]=e[a+h]-e[a+h-o]+256&255}else if(0==r){for(h=0;h<o;h++)t[s+h]=e[a+h];if(2==i)for(h=o;h<n;h++)t[s+h]=e[a+h];if(3==i)for(h=o;h<n;h++)t[s+h]=e[a+h]-(e[a+h-o]>>1)+256&255;if(4==i)for(h=o;h<n;h++)t[s+h]=e[a+h]-l(e[a+h-o],0,0)+256&255}else{if(2==i)for(h=0;h<n;h++)t[s+h]=e[a+h]+256-e[a+h-n]&255;if(3==i){for(h=0;h<o;h++)t[s+h]=e[a+h]+256-(e[a+h-n]>>1)&255;for(h=o;h<n;h++)t[s+h]=e[a+h]+256-(e[a+h-n]+e[a+h-o]>>1)&255}if(4==i){for(h=0;h<o;h++)t[s+h]=e[a+h]+256-l(0,e[a+h-n],0)&255;for(h=o;h<n;h++)t[s+h]=e[a+h]+256-l(e[a+h-o],e[a+h-n],e[a+h-o-n])&255}}},Al.crc={table:function(){for(var t=new Uint32Array(256),e=0;e<256;e++){for(var r=e,n=0;n<8;n++)1&r?r=3988292384^r>>>1:r>>>=1;t[e]=r}return t}(),update:function(t,e,r,n){for(var o=0;o<n;o++)t=Al.crc.table[255&(t^e[r+o])]^t>>>8;return t},crc:function(t,e,r){return 4294967295^Al.crc.update(4294967295,t,e,r)}},Al.quantize=function(t,e){var r=new Uint8Array(t),n=r.slice(0),o=new Uint32Array(n.buffer),i=Al.quantize.getKDtree(n,e),a=i[0],s=i[1];Al.quantize.planeDst;for(var l=r,h=o,u=l.length,c=new Uint8Array(r.length>>2),d=0;d<u;d+=4){var f=l[d]*(1/255),p=l[d+1]*(1/255),g=l[d+2]*(1/255),v=l[d+3]*(1/255),y=Al.quantize.getNearest(a,f,p,g,v);c[d>>2]=y.ind,h[d>>2]=y.est.rgba}return{abuf:n.buffer,inds:c,plte:s}},Al.quantize.getKDtree=function(t,e,r){null==r&&(r=1e-4);var n=new Uint32Array(t.buffer),o={i0:0,i1:t.length,bst:null,est:null,tdst:0,left:null,right:null};o.bst=Al.quantize.stats(t,o.i0,o.i1),o.est=Al.quantize.estats(o.bst);for(var i=[o];i.length<e;){for(var a=0,s=0,l=0;l<i.length;l++)i[l].est.L>a&&(a=i[l].est.L,s=l);if(a<r)break;var h=i[s],u=Al.quantize.splitPixels(t,n,h.i0,h.i1,h.est.e,h.est.eMq255);if(h.i0>=u||h.i1<=u)h.est.L=0;else{var c={i0:h.i0,i1:u,bst:null,est:null,tdst:0,left:null,right:null};c.bst=Al.quantize.stats(t,c.i0,c.i1),c.est=Al.quantize.estats(c.bst);var d={i0:u,i1:h.i1,bst:null,est:null,tdst:0,left:null,right:null};for(d.bst={R:[],m:[],N:h.bst.N-c.bst.N},l=0;l<16;l++)d.bst.R[l]=h.bst.R[l]-c.bst.R[l];for(l=0;l<4;l++)d.bst.m[l]=h.bst.m[l]-c.bst.m[l];d.est=Al.quantize.estats(d.bst),h.left=c,h.right=d,i[s]=c,i.push(d)}}for(i.sort(function(t,e){return e.bst.N-t.bst.N}),l=0;l<i.length;l++)i[l].ind=l;return[o,i]},Al.quantize.getNearest=function(t,e,r,n,o){if(null==t.left)return t.tdst=Al.quantize.dist(t.est.q,e,r,n,o),t;var i=Al.quantize.planeDst(t.est,e,r,n,o),a=t.left,s=t.right;i>0&&(a=t.right,s=t.left);var l=Al.quantize.getNearest(a,e,r,n,o);if(l.tdst<=i*i)return l;var h=Al.quantize.getNearest(s,e,r,n,o);return h.tdst<l.tdst?h:l},Al.quantize.planeDst=function(t,e,r,n,o){var i=t.e;return i[0]*e+i[1]*r+i[2]*n+i[3]*o-t.eMq},Al.quantize.dist=function(t,e,r,n,o){var i=e-t[0],a=r-t[1],s=n-t[2],l=o-t[3];return i*i+a*a+s*s+l*l},Al.quantize.splitPixels=function(t,e,r,n,o,i){var a=Al.quantize.vecDot;for(n-=4;r<n;){for(;a(t,r,o)<=i;)r+=4;for(;a(t,n,o)>i;)n-=4;if(r>=n)break;var s=e[r>>2];e[r>>2]=e[n>>2],e[n>>2]=s,r+=4,n-=4}for(;a(t,r,o)>i;)r-=4;return r+4},Al.quantize.vecDot=function(t,e,r){return t[e]*r[0]+t[e+1]*r[1]+t[e+2]*r[2]+t[e+3]*r[3]},Al.quantize.stats=function(t,e,r){for(var n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],o=[0,0,0,0],i=r-e>>2,a=e;a<r;a+=4){var s=t[a]*(1/255),l=t[a+1]*(1/255),h=t[a+2]*(1/255),u=t[a+3]*(1/255);o[0]+=s,o[1]+=l,o[2]+=h,o[3]+=u,n[0]+=s*s,n[1]+=s*l,n[2]+=s*h,n[3]+=s*u,n[5]+=l*l,n[6]+=l*h,n[7]+=l*u,n[10]+=h*h,n[11]+=h*u,n[15]+=u*u}return n[4]=n[1],n[8]=n[2],n[9]=n[6],n[12]=n[3],n[13]=n[7],n[14]=n[11],{R:n,m:o,N:i}},Al.quantize.estats=function(t){var e=t.R,r=t.m,n=t.N,o=r[0],i=r[1],a=r[2],s=r[3],l=0==n?0:1/n,h=[e[0]-o*o*l,e[1]-o*i*l,e[2]-o*a*l,e[3]-o*s*l,e[4]-i*o*l,e[5]-i*i*l,e[6]-i*a*l,e[7]-i*s*l,e[8]-a*o*l,e[9]-a*i*l,e[10]-a*a*l,e[11]-a*s*l,e[12]-s*o*l,e[13]-s*i*l,e[14]-s*a*l,e[15]-s*s*l],u=h,c=Al.M4,d=[.5,.5,.5,.5],f=0,p=0;if(0!=n)for(var g=0;g<10&&(d=c.multVec(u,d),p=Math.sqrt(c.dot(d,d)),d=c.sml(1/p,d),!(Math.abs(p-f)<1e-9));g++)f=p;var v=[o*l,i*l,a*l,s*l];return{Cov:h,q:v,e:d,L:f,eMq255:c.dot(c.sml(255,v),d),eMq:c.dot(d,v),rgba:(Math.round(255*v[3])<<24|Math.round(255*v[2])<<16|Math.round(255*v[1])<<8|Math.round(255*v[0]))>>>0}},Al.M4={multVec:function(t,e){return[t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3],t[4]*e[0]+t[5]*e[1]+t[6]*e[2]+t[7]*e[3],t[8]*e[0]+t[9]*e[1]+t[10]*e[2]+t[11]*e[3],t[12]*e[0]+t[13]*e[1]+t[14]*e[2]+t[15]*e[3]]},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},sml:function(t,e){return[t*e[0],t*e[1],t*e[2],t*e[3]]}},Al.encode.concatRGBA=function(t){for(var e=0,r=0;r<t.length;r++)e+=t[r].byteLength;var n=new Uint8Array(e),o=0;for(r=0;r<t.length;r++){for(var i=new Uint8Array(t[r]),a=i.length,s=0;s<a;s+=4){var l=i[s],h=i[s+1],u=i[s+2],c=i[s+3];0==c&&(l=h=u=0),n[o+s]=l,n[o+s+1]=h,n[o+s+2]=u,n[o+s+3]=c}o+=a}return n.buffer},function(t){t.Greyscale="Greyscale",t.Truecolour="Truecolour",t.IndexedColour="IndexedColour",t.GreyscaleWithAlpha="GreyscaleWithAlpha",t.TruecolourWithAlpha="TruecolourWithAlpha"}(Sl||(Sl={}));var Tl,Pl,zl,Ol,Dl=function(){function t(t){var e=Al.decode(t),r=Al.toRGBA8(e);if(r.length>1)throw new Error("Animated PNGs are not supported");var n=function(t){for(var e=Math.floor(t.length/4),r=new Uint8Array(3*e),n=new Uint8Array(1*e),o=0,i=0,a=0;o<t.length;)r[i++]=t[o++],r[i++]=t[o++],r[i++]=t[o++],n[a++]=t[o++];return{rgbChannel:r,alphaChannel:n}}(new Uint8Array(r[0])),o=n.rgbChannel,i=n.alphaChannel;this.rgbChannel=o,i.some(function(t){return t<255})&&(this.alphaChannel=i),this.type=function(t){if(0===t)return Sl.Greyscale;if(2===t)return Sl.Truecolour;if(3===t)return Sl.IndexedColour;if(4===t)return Sl.GreyscaleWithAlpha;if(6===t)return Sl.TruecolourWithAlpha;throw new Error("Unknown color type: "+t)}(e.ctype),this.width=e.width,this.height=e.height,this.bitsPerComponent=8}return t.load=function(e){return new t(e)},t}(),Rl=function(){function t(t){this.image=t,this.bitsPerComponent=t.bitsPerComponent,this.width=t.width,this.height=t.height,this.colorSpace="DeviceRGB"}return t.for=function(e){return n(this,0,void 0,function(){return o(this,function(r){return[2,new t(Dl.load(e))]})})},t.prototype.embedIntoContext=function(t,e){return n(this,0,void 0,function(){var r,n;return o(this,function(o){return r=this.embedAlphaChannel(t),n=t.flateStream(this.image.rgbChannel,{Type:"XObject",Subtype:"Image",BitsPerComponent:this.image.bitsPerComponent,Width:this.image.width,Height:this.image.height,ColorSpace:this.colorSpace,SMask:r}),e?(t.assign(e,n),[2,e]):[2,t.register(n)]})})},t.prototype.embedAlphaChannel=function(t){if(this.image.alphaChannel){var e=t.flateStream(this.image.alphaChannel,{Type:"XObject",Subtype:"Image",Height:this.image.height,Width:this.image.width,BitsPerComponent:this.image.bitsPerComponent,ColorSpace:"DeviceGray",Decode:[0,1]});return t.register(e)}},t}(),Bl=function(){function t(t,e,r){this.bytes=t,this.start=e||0,this.pos=this.start,this.end=e&&r?e+r:this.bytes.length}return Object.defineProperty(t.prototype,"length",{get:function(){return this.end-this.start},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEmpty",{get:function(){return 0===this.length},enumerable:!1,configurable:!0}),t.prototype.getByte=function(){return this.pos>=this.end?-1:this.bytes[this.pos++]},t.prototype.getUint16=function(){var t=this.getByte(),e=this.getByte();return-1===t||-1===e?-1:(t<<8)+e},t.prototype.getInt32=function(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()},t.prototype.getBytes=function(t,e){void 0===e&&(e=!1);var r=this.bytes,n=this.pos,o=this.end;if(t){var i=n+t;return i>o&&(i=o),this.pos=i,a=r.subarray(n,i),e?new Uint8ClampedArray(a):a}var a=r.subarray(n,o);return e?new Uint8ClampedArray(a):a},t.prototype.peekByte=function(){var t=this.getByte();return this.pos--,t},t.prototype.peekBytes=function(t,e){void 0===e&&(e=!1);var r=this.getBytes(t,e);return this.pos-=r.length,r},t.prototype.skip=function(t){t||(t=1),this.pos+=t},t.prototype.reset=function(){this.pos=this.start},t.prototype.moveStart=function(){this.start=this.pos},t.prototype.makeSubStream=function(e,r){return new t(this.bytes,e,r)},t.prototype.decode=function(){return this.bytes},t}(),Nl=new Uint8Array(0),El=function(){function t(t){if(this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=Nl,this.minBufferLength=512,t)for(;this.minBufferLength<t;)this.minBufferLength*=2}return Object.defineProperty(t.prototype,"isEmpty",{get:function(){for(;!this.eof&&0===this.bufferLength;)this.readBlock();return 0===this.bufferLength},enumerable:!1,configurable:!0}),t.prototype.getByte=function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return-1;this.readBlock()}return this.buffer[this.pos++]},t.prototype.getUint16=function(){var t=this.getByte(),e=this.getByte();return-1===t||-1===e?-1:(t<<8)+e},t.prototype.getInt32=function(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()},t.prototype.getBytes=function(t,e){var r;void 0===e&&(e=!1);var n=this.pos;if(t){for(this.ensureBuffer(n+t),r=n+t;!this.eof&&this.bufferLength<r;)this.readBlock();var o=this.bufferLength;r>o&&(r=o)}else{for(;!this.eof;)this.readBlock();r=this.bufferLength}this.pos=r;var i=this.buffer.subarray(n,r);return!e||i instanceof Uint8ClampedArray?i:new Uint8ClampedArray(i)},t.prototype.peekByte=function(){var t=this.getByte();return this.pos--,t},t.prototype.peekBytes=function(t,e){void 0===e&&(e=!1);var r=this.getBytes(t,e);return this.pos-=r.length,r},t.prototype.skip=function(t){t||(t=1),this.pos+=t},t.prototype.reset=function(){this.pos=0},t.prototype.makeSubStream=function(t,e){for(var r=t+e;this.bufferLength<=r&&!this.eof;)this.readBlock();return new Bl(this.buffer,t,e)},t.prototype.decode=function(){for(;!this.eof;)this.readBlock();return this.buffer.subarray(0,this.bufferLength)},t.prototype.readBlock=function(){throw new Zr(this.constructor.name,"readBlock")},t.prototype.ensureBuffer=function(t){var e=this.buffer;if(t<=e.byteLength)return e;for(var r=this.minBufferLength;r<t;)r*=2;var n=new Uint8Array(r);return n.set(e),this.buffer=n},t}(),jl=function(t){return 32===t||9===t||13===t||10===t},Il=function(t){function r(e,r){var n=t.call(this,r)||this;return n.stream=e,n.input=new Uint8Array(5),r&&(r*=.8),n}return e(r,t),r.prototype.readBlock=function(){for(var t=this.stream,e=t.getByte();jl(e);)e=t.getByte();if(-1!==e&&126!==e){var r,n,o=this.bufferLength;if(122===e){for(r=this.ensureBuffer(o+4),n=0;n<4;++n)r[o+n]=0;this.bufferLength+=4}else{var i=this.input;for(i[0]=e,n=1;n<5;++n){for(e=t.getByte();jl(e);)e=t.getByte();if(i[n]=e,-1===e||126===e)break}if(r=this.ensureBuffer(o+n-1),this.bufferLength+=n-1,n<5){for(;n<5;++n)i[n]=117;this.eof=!0}var a=0;for(n=0;n<5;++n)a=85*a+(i[n]-33);for(n=3;n>=0;--n)r[o+n]=255&a,a>>=8}}else this.eof=!0},r}(El),Ml=function(t){function r(e,r){var n=t.call(this,r)||this;return n.stream=e,n.firstDigit=-1,r&&(r*=.5),n}return e(r,t),r.prototype.readBlock=function(){var t=this.stream.getBytes(8e3);if(t.length){for(var e=t.length+1>>1,r=this.ensureBuffer(this.bufferLength+e),n=this.bufferLength,o=this.firstDigit,i=0,a=t.length;i<a;i++){var s=t[i],l=void 0;if(s>=48&&s<=57)l=15&s;else{if(!(s>=65&&s<=70||s>=97&&s<=102)){if(62===s){this.eof=!0;break}continue}l=9+(15&s)}o<0?o=l:(r[n++]=o<<4|l,o=-1)}o>=0&&this.eof&&(r[n++]=o<<4,o=-1),this.firstDigit=o,this.bufferLength=n}else this.eof=!0},r}(El),Ul=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Vl=new Int32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),Wl=new Int32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),ql=[new Int32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],Ll=[new Int32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5],Kl=function(t){function r(e,r){var n=t.call(this,r)||this;n.stream=e;var o=e.getByte(),i=e.getByte();if(-1===o||-1===i)throw new Error("Invalid header in flate stream: "+o+", "+i);if(8!=(15&o))throw new Error("Unknown compression method in flate stream: "+o+", "+i);if(((o<<8)+i)%31!=0)throw new Error("Bad FCHECK in flate stream: "+o+", "+i);if(32&i)throw new Error("FDICT bit set in flate stream: "+o+", "+i);return n.codeSize=0,n.codeBuf=0,n}return e(r,t),r.prototype.readBlock=function(){var t,e,r=this.stream,n=this.getBits(3);if(1&n&&(this.eof=!0),0!=(n>>=1)){var o,i;if(1===n)o=ql,i=Ll;else{if(2!==n)throw new Error("Unknown block type in flate stream");var a=this.getBits(5)+257,s=this.getBits(5)+1,l=this.getBits(4)+4,h=new Uint8Array(Ul.length),u=void 0;for(u=0;u<l;++u)h[Ul[u]]=this.getBits(3);var c=this.generateHuffmanTable(h);e=0,u=0;for(var d=a+s,f=new Uint8Array(d),p=void 0,g=void 0,v=void 0;u<d;){var y=this.getCode(c);if(16===y)p=2,g=3,v=e;else if(17===y)p=3,g=3,v=e=0;else{if(18!==y){f[u++]=e=y;continue}p=7,g=11,v=e=0}for(var m=this.getBits(p)+g;m-- >0;)f[u++]=v}o=this.generateHuffmanTable(f.subarray(0,a)),i=this.generateHuffmanTable(f.subarray(a,d))}for(var b=(t=this.buffer)?t.length:0,w=this.bufferLength;;){var x=this.getCode(o);if(x<256)w+1>=b&&(b=(t=this.ensureBuffer(w+1)).length),t[w++]=x;else{if(256===x)return void(this.bufferLength=w);var k=(x=Vl[x-=257])>>16;k>0&&(k=this.getBits(k)),e=(65535&x)+k,x=this.getCode(i),(k=(x=Wl[x])>>16)>0&&(k=this.getBits(k));var F=(65535&x)+k;w+e>=b&&(b=(t=this.ensureBuffer(w+e)).length);for(var S=0;S<e;++S,++w)t[w]=t[w-F]}}}else{var C=void 0;if(-1===(C=r.getByte()))throw new Error("Bad block header in flate stream");var A=C;if(-1===(C=r.getByte()))throw new Error("Bad block header in flate stream");if(A|=C<<8,-1===(C=r.getByte()))throw new Error("Bad block header in flate stream");var T=C;if(-1===(C=r.getByte()))throw new Error("Bad block header in flate stream");if((T|=C<<8)!=(65535&~A)&&(0!==A||0!==T))throw new Error("Bad uncompressed block length in flate stream");this.codeBuf=0,this.codeSize=0;var P=this.bufferLength;t=this.ensureBuffer(P+A);var z=P+A;if(this.bufferLength=z,0===A)-1===r.peekByte()&&(this.eof=!0);else for(var O=P;O<z;++O){if(-1===(C=r.getByte())){this.eof=!0;break}t[O]=C}}},r.prototype.getBits=function(t){for(var e,r=this.stream,n=this.codeSize,o=this.codeBuf;n<t;){if(-1===(e=r.getByte()))throw new Error("Bad encoding in flate stream");o|=e<<n,n+=8}return e=o&(1<<t)-1,this.codeBuf=o>>t,this.codeSize=n-=t,e},r.prototype.getCode=function(t){for(var e,r=this.stream,n=t[0],o=t[1],i=this.codeSize,a=this.codeBuf;i<o&&-1!==(e=r.getByte());)a|=e<<i,i+=8;var s=n[a&(1<<o)-1];"number"==typeof n&&console.log("FLATE:",s);var l=s>>16,h=65535&s;if(l<1||i<l)throw new Error("Bad encoding in flate stream");return this.codeBuf=a>>l,this.codeSize=i-l,h},r.prototype.generateHuffmanTable=function(t){var e,r=t.length,n=0;for(e=0;e<r;++e)t[e]>n&&(n=t[e]);for(var o=1<<n,i=new Int32Array(o),a=1,s=0,l=2;a<=n;++a,s<<=1,l<<=1)for(var h=0;h<r;++h)if(t[h]===a){var u=0,c=s;for(e=0;e<a;++e)u=u<<1|1&c,c>>=1;for(e=u;e<o;e+=l)i[e]=a<<16|h;++s}return[i,n]},r}(El),Gl=function(t){function r(e,r,n){var o=t.call(this,r)||this;o.stream=e,o.cachedData=0,o.bitsCached=0;for(var i=4096,a={earlyChange:n,codeLength:9,nextCode:258,dictionaryValues:new Uint8Array(i),dictionaryLengths:new Uint16Array(i),dictionaryPrevCodes:new Uint16Array(i),currentSequence:new Uint8Array(i),currentSequenceLength:0},s=0;s<256;++s)a.dictionaryValues[s]=s,a.dictionaryLengths[s]=1;return o.lzwState=a,o}return e(r,t),r.prototype.readBlock=function(){var t,e,r,n=1024,o=this.lzwState;if(o){var i=o.earlyChange,a=o.nextCode,s=o.dictionaryValues,l=o.dictionaryLengths,h=o.dictionaryPrevCodes,u=o.codeLength,c=o.prevCode,d=o.currentSequence,f=o.currentSequenceLength,p=0,g=this.bufferLength,v=this.ensureBuffer(this.bufferLength+n);for(t=0;t<512;t++){var y=this.readBits(u),m=f>0;if(!y||y<256)d[0]=y,f=1;else{if(!(y>=258)){if(256===y){u=9,a=258,f=0;continue}this.eof=!0,delete this.lzwState;break}if(y<a)for(e=(f=l[y])-1,r=y;e>=0;e--)d[e]=s[r],r=h[r];else d[f++]=d[0]}if(m&&(h[a]=c,l[a]=l[c]+1,s[a]=d[0],u=++a+i&a+i-1?u:0|Math.min(Math.log(a+i)/.6931471805599453+1,12)),c=y,n<(p+=f)){do{n+=512}while(n<p);v=this.ensureBuffer(this.bufferLength+n)}for(e=0;e<f;e++)v[g++]=d[e]}o.nextCode=a,o.codeLength=u,o.prevCode=c,o.currentSequenceLength=f,this.bufferLength=g}},r.prototype.readBits=function(t){for(var e=this.bitsCached,r=this.cachedData;e<t;){var n=this.stream.getByte();if(-1===n)return this.eof=!0,null;r=r<<8|n,e+=8}return this.bitsCached=e-=t,this.cachedData=r,r>>>e&(1<<t)-1},r}(El),Hl=function(t){function r(e,r){var n=t.call(this,r)||this;return n.stream=e,n}return e(r,t),r.prototype.readBlock=function(){var t=this.stream.getBytes(2);if(!t||t.length<2||128===t[0])this.eof=!0;else{var e,r=this.bufferLength,n=t[0];if(n<128){if((e=this.ensureBuffer(r+n+1))[r++]=t[1],n>0){var o=this.stream.getBytes(n);e.set(o,r),r+=n}}else{n=257-n;var i=t[1];e=this.ensureBuffer(r+n+1);for(var a=0;a<n;a++)e[r++]=i}this.bufferLength=r}},r}(El),_l=function(t,e,r){if(e===Mi.of("FlateDecode"))return new Kl(t);if(e===Mi.of("LZWDecode")){var n=1;if(r instanceof Vi){var o=r.lookup(Mi.of("EarlyChange"));o instanceof Ai&&(n=o.asNumber())}return new Gl(t,void 0,n)}if(e===Mi.of("ASCII85Decode"))return new Il(t);if(e===Mi.of("ASCIIHexDecode"))return new Ml(t);if(e===Mi.of("RunLengthDecode"))return new Hl(t);throw new Qr(e.asString())},Xl=function(t){var e=t.dict,r=t.contents,n=new Bl(r),o=e.lookup(Mi.of("Filter")),i=e.lookup(Mi.of("DecodeParms"));if(o instanceof Mi)n=_l(n,o,i);else if(o instanceof Ti)for(var a=0,s=o.size();a<s;a++)n=_l(n,o.lookup(a,Mi),i&&i.lookupMaybe(a,Vi));else if(o)throw new Jr([Mi,Ti],o);return n},Zl=function(){function t(t,e,r){this.page=t;var n=null!=e?e:function(t){var e=t.MediaBox();return{left:0,bottom:0,right:e.lookup(2,Ai).asNumber()-e.lookup(0,Ai).asNumber(),top:e.lookup(3,Ai).asNumber()-e.lookup(1,Ai).asNumber()}}(t);this.width=n.right-n.left,this.height=n.top-n.bottom,this.boundingBox=n,this.transformationMatrix=null!=r?r:function(t){return[1,0,0,1,-t.left,-t.bottom]}(n)}return t.for=function(e,r,i){return n(this,0,void 0,function(){return o(this,function(n){return[2,new t(e,r,i)]})})},t.prototype.embedIntoContext=function(t,e){return n(this,0,void 0,function(){var r,n,i,a,s,l,h,u,c,d;return o(this,function(o){if(r=this.page.normalizedEntries(),n=r.Contents,i=r.Resources,!n)throw new en;return a=this.decodeContents(n),s=this.boundingBox,l=s.left,h=s.bottom,u=s.right,c=s.top,d=t.flateStream(a,{Type:"XObject",Subtype:"Form",FormType:1,BBox:[l,h,u,c],Matrix:this.transformationMatrix,Resources:i}),e?(t.assign(e,d),[2,e]):[2,t.register(d)]})})},t.prototype.decodeContents=function(t){for(var e=Uint8Array.of(Sn.Newline),r=[],n=0,o=t.size();n<o;n++){var i=t.lookup(n,Wi),a=void 0;if(i instanceof qi)a=Xl(i).decode();else{if(!(i instanceof Yi))throw new rn(i);a=i.getUnencodedContents()}r.push(a,e)}return j.apply(void 0,r)},t}(),Yl=function(t,e){if(void 0!==t)return e[t]};exports.NonFullScreenPageMode=void 0,(Tl=exports.NonFullScreenPageMode||(exports.NonFullScreenPageMode={})).UseNone="UseNone",Tl.UseOutlines="UseOutlines",Tl.UseThumbs="UseThumbs",Tl.UseOC="UseOC",exports.ReadingDirection=void 0,(Pl=exports.ReadingDirection||(exports.ReadingDirection={})).L2R="L2R",Pl.R2L="R2L",exports.PrintScaling=void 0,(zl=exports.PrintScaling||(exports.PrintScaling={})).None="None",zl.AppDefault="AppDefault",exports.Duplex=void 0,(Ol=exports.Duplex||(exports.Duplex={})).Simplex="Simplex",Ol.DuplexFlipShortEdge="DuplexFlipShortEdge",Ol.DuplexFlipLongEdge="DuplexFlipLongEdge";var Jl,Ql,$l,th,eh=function(){function t(t){this.dict=t}return t.prototype.lookupBool=function(t){var e=this.dict.lookup(Mi.of(t));if(e instanceof zi)return e},t.prototype.lookupName=function(t){var e=this.dict.lookup(Mi.of(t));if(e instanceof Mi)return e},t.prototype.HideToolbar=function(){return this.lookupBool("HideToolbar")},t.prototype.HideMenubar=function(){return this.lookupBool("HideMenubar")},t.prototype.HideWindowUI=function(){return this.lookupBool("HideWindowUI")},t.prototype.FitWindow=function(){return this.lookupBool("FitWindow")},t.prototype.CenterWindow=function(){return this.lookupBool("CenterWindow")},t.prototype.DisplayDocTitle=function(){return this.lookupBool("DisplayDocTitle")},t.prototype.NonFullScreenPageMode=function(){return this.lookupName("NonFullScreenPageMode")},t.prototype.Direction=function(){return this.lookupName("Direction")},t.prototype.PrintScaling=function(){return this.lookupName("PrintScaling")},t.prototype.Duplex=function(){return this.lookupName("Duplex")},t.prototype.PickTrayByPDFSize=function(){return this.lookupBool("PickTrayByPDFSize")},t.prototype.PrintPageRange=function(){var t=this.dict.lookup(Mi.of("PrintPageRange"));if(t instanceof Ti)return t},t.prototype.NumCopies=function(){var t=this.dict.lookup(Mi.of("NumCopies"));if(t instanceof Ai)return t},t.prototype.getHideToolbar=function(){var t,e;return null!==(e=null===(t=this.HideToolbar())||void 0===t?void 0:t.asBoolean())&&void 0!==e&&e},t.prototype.getHideMenubar=function(){var t,e;return null!==(e=null===(t=this.HideMenubar())||void 0===t?void 0:t.asBoolean())&&void 0!==e&&e},t.prototype.getHideWindowUI=function(){var t,e;return null!==(e=null===(t=this.HideWindowUI())||void 0===t?void 0:t.asBoolean())&&void 0!==e&&e},t.prototype.getFitWindow=function(){var t,e;return null!==(e=null===(t=this.FitWindow())||void 0===t?void 0:t.asBoolean())&&void 0!==e&&e},t.prototype.getCenterWindow=function(){var t,e;return null!==(e=null===(t=this.CenterWindow())||void 0===t?void 0:t.asBoolean())&&void 0!==e&&e},t.prototype.getDisplayDocTitle=function(){var t,e;return null!==(e=null===(t=this.DisplayDocTitle())||void 0===t?void 0:t.asBoolean())&&void 0!==e&&e},t.prototype.getNonFullScreenPageMode=function(){var t,e,r=null===(t=this.NonFullScreenPageMode())||void 0===t?void 0:t.decodeText();return null!==(e=Yl(r,exports.NonFullScreenPageMode))&&void 0!==e?e:exports.NonFullScreenPageMode.UseNone},t.prototype.getReadingDirection=function(){var t,e,r=null===(t=this.Direction())||void 0===t?void 0:t.decodeText();return null!==(e=Yl(r,exports.ReadingDirection))&&void 0!==e?e:exports.ReadingDirection.L2R},t.prototype.getPrintScaling=function(){var t,e,r=null===(t=this.PrintScaling())||void 0===t?void 0:t.decodeText();return null!==(e=Yl(r,exports.PrintScaling))&&void 0!==e?e:exports.PrintScaling.AppDefault},t.prototype.getDuplex=function(){var t,e=null===(t=this.Duplex())||void 0===t?void 0:t.decodeText();return Yl(e,exports.Duplex)},t.prototype.getPickTrayByPDFSize=function(){var t;return null===(t=this.PickTrayByPDFSize())||void 0===t?void 0:t.asBoolean()},t.prototype.getPrintPageRange=function(){var t=this.PrintPageRange();if(!t)return[];for(var e=[],r=0;r<t.size();r+=2){var n=t.lookup(r,Ai).asNumber(),o=t.lookup(r+1,Ai).asNumber();e.push({start:n,end:o})}return e},t.prototype.getNumCopies=function(){var t,e;return null!==(e=null===(t=this.NumCopies())||void 0===t?void 0:t.asNumber())&&void 0!==e?e:1},t.prototype.setHideToolbar=function(t){var e=this.dict.context.obj(t);this.dict.set(Mi.of("HideToolbar"),e)},t.prototype.setHideMenubar=function(t){var e=this.dict.context.obj(t);this.dict.set(Mi.of("HideMenubar"),e)},t.prototype.setHideWindowUI=function(t){var e=this.dict.context.obj(t);this.dict.set(Mi.of("HideWindowUI"),e)},t.prototype.setFitWindow=function(t){var e=this.dict.context.obj(t);this.dict.set(Mi.of("FitWindow"),e)},t.prototype.setCenterWindow=function(t){var e=this.dict.context.obj(t);this.dict.set(Mi.of("CenterWindow"),e)},t.prototype.setDisplayDocTitle=function(t){var e=this.dict.context.obj(t);this.dict.set(Mi.of("DisplayDocTitle"),e)},t.prototype.setNonFullScreenPageMode=function(t){Or(t,"nonFullScreenPageMode",exports.NonFullScreenPageMode);var e=Mi.of(t);this.dict.set(Mi.of("NonFullScreenPageMode"),e)},t.prototype.setReadingDirection=function(t){Or(t,"readingDirection",exports.ReadingDirection);var e=Mi.of(t);this.dict.set(Mi.of("Direction"),e)},t.prototype.setPrintScaling=function(t){Or(t,"printScaling",exports.PrintScaling);var e=Mi.of(t);this.dict.set(Mi.of("PrintScaling"),e)},t.prototype.setDuplex=function(t){Or(t,"duplex",exports.Duplex);var e=Mi.of(t);this.dict.set(Mi.of("Duplex"),e)},t.prototype.setPickTrayByPDFSize=function(t){var e=this.dict.context.obj(t);this.dict.set(Mi.of("PickTrayByPDFSize"),e)},t.prototype.setPrintPageRange=function(t){Array.isArray(t)||(t=[t]);for(var e=[],r=0,n=t.length;r<n;r++)e.push(t[r].start),e.push(t[r].end);Mr(e,"printPageRange",["number"]);var o=this.dict.context.obj(e);this.dict.set(Mi.of("PrintPageRange"),o)},t.prototype.setNumCopies=function(t){Ur(t,"numCopies",1,Number.MAX_VALUE),qr(t,"numCopies");var e=this.dict.context.obj(t);this.dict.set(Mi.of("NumCopies"),e)},t.fromDict=function(e){return new t(e)},t.create=function(e){return new t(e.obj({}))},t}(),rh=/\/([^\0\t\n\f\r\ ]+)[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]+Tf/,nh=function(){function t(t,e){this.dict=t,this.ref=e}return t.prototype.T=function(){return this.dict.lookupMaybe(Mi.of("T"),va,ca)},t.prototype.Ff=function(){var t=this.getInheritableAttribute(Mi.of("Ff"));return this.dict.context.lookupMaybe(t,Ai)},t.prototype.V=function(){var t=this.getInheritableAttribute(Mi.of("V"));return this.dict.context.lookup(t)},t.prototype.Kids=function(){return this.dict.lookupMaybe(Mi.of("Kids"),Ti)},t.prototype.DA=function(){var t=this.dict.lookup(Mi.of("DA"));if(t instanceof va||t instanceof ca)return t},t.prototype.setKids=function(t){this.dict.set(Mi.of("Kids"),this.dict.context.obj(t))},t.prototype.getParent=function(){var e=this.dict.get(Mi.of("Parent"));if(e instanceof Gi)return new t(this.dict.lookup(Mi.of("Parent"),Vi),e)},t.prototype.setParent=function(t){t?this.dict.set(Mi.of("Parent"),t):this.dict.delete(Mi.of("Parent"))},t.prototype.getFullyQualifiedName=function(){var t=this.getParent();return t?t.getFullyQualifiedName()+"."+this.getPartialName():this.getPartialName()},t.prototype.getPartialName=function(){var t;return null===(t=this.T())||void 0===t?void 0:t.decodeText()},t.prototype.setPartialName=function(t){t?this.dict.set(Mi.of("T"),ca.fromText(t)):this.dict.delete(Mi.of("T"))},t.prototype.setDefaultAppearance=function(t){this.dict.set(Mi.of("DA"),va.of(t))},t.prototype.getDefaultAppearance=function(){var t=this.DA();return t instanceof ca?t.decodeText():null==t?void 0:t.asString()},t.prototype.setFontSize=function(t){var e,r=null!==(e=this.getFullyQualifiedName())&&void 0!==e?e:"",n=this.getDefaultAppearance();if(!n)throw new dn(r);var o=B(n,rh);if(!o.match)throw new fn(r);var i=n.slice(0,o.pos-o.match[0].length),a=o.pos<=n.length?n.slice(o.pos):"",s=i+" /"+o.match[1]+" "+t+" Tf "+a;this.setDefaultAppearance(s)},t.prototype.getFlags=function(){var t,e;return null!==(e=null===(t=this.Ff())||void 0===t?void 0:t.asNumber())&&void 0!==e?e:0},t.prototype.setFlags=function(t){this.dict.set(Mi.of("Ff"),Ai.of(t))},t.prototype.hasFlag=function(t){return 0!==(this.getFlags()&t)},t.prototype.setFlag=function(t){var e=this.getFlags();this.setFlags(e|t)},t.prototype.clearFlag=function(t){var e=this.getFlags();this.setFlags(e&~t)},t.prototype.setFlagTo=function(t,e){e?this.setFlag(t):this.clearFlag(t)},t.prototype.getInheritableAttribute=function(t){var e;return this.ascend(function(r){e||(e=r.dict.get(t))}),e},t.prototype.ascend=function(t){t(this);var e=this.getParent();e&&e.ascend(t)},t}(),oh=function(){function t(t){this.dict=t}return t.prototype.W=function(){var t=this.dict.lookup(Mi.of("W"));if(t instanceof Ai)return t},t.prototype.getWidth=function(){var t,e;return null!==(e=null===(t=this.W())||void 0===t?void 0:t.asNumber())&&void 0!==e?e:1},t.prototype.setWidth=function(t){var e=this.dict.context.obj(t);this.dict.set(Mi.of("W"),e)},t.fromDict=function(e){return new t(e)},t}(),ih=function(){function t(t){this.dict=t}return t.prototype.Rect=function(){return this.dict.lookup(Mi.of("Rect"),Ti)},t.prototype.AP=function(){return this.dict.lookupMaybe(Mi.of("AP"),Vi)},t.prototype.F=function(){var t=this.dict.lookup(Mi.of("F"));return this.dict.context.lookupMaybe(t,Ai)},t.prototype.getRectangle=function(){var t,e=this.Rect();return null!==(t=null==e?void 0:e.asRectangle())&&void 0!==t?t:{x:0,y:0,width:0,height:0}},t.prototype.setRectangle=function(t){var e=t.x,r=t.y,n=t.width,o=t.height,i=this.dict.context.obj([e,r,e+n,r+o]);this.dict.set(Mi.of("Rect"),i)},t.prototype.getAppearanceState=function(){var t=this.dict.lookup(Mi.of("AS"));if(t instanceof Mi)return t},t.prototype.setAppearanceState=function(t){this.dict.set(Mi.of("AS"),t)},t.prototype.setAppearances=function(t){this.dict.set(Mi.of("AP"),t)},t.prototype.ensureAP=function(){var t=this.AP();return t||(t=this.dict.context.obj({}),this.dict.set(Mi.of("AP"),t)),t},t.prototype.getNormalAppearance=function(){var t=this.ensureAP().get(Mi.of("N"));if(t instanceof Gi||t instanceof Vi)return t;throw new Error("Unexpected N type: "+(null==t?void 0:t.constructor.name))},t.prototype.setNormalAppearance=function(t){this.ensureAP().set(Mi.of("N"),t)},t.prototype.setRolloverAppearance=function(t){this.ensureAP().set(Mi.of("R"),t)},t.prototype.setDownAppearance=function(t){this.ensureAP().set(Mi.of("D"),t)},t.prototype.removeRolloverAppearance=function(){var t=this.AP();null==t||t.delete(Mi.of("R"))},t.prototype.removeDownAppearance=function(){var t=this.AP();null==t||t.delete(Mi.of("D"))},t.prototype.getAppearances=function(){var t=this.AP();if(t)return{normal:t.lookup(Mi.of("N"),Vi,Wi),rollover:t.lookupMaybe(Mi.of("R"),Vi,Wi),down:t.lookupMaybe(Mi.of("D"),Vi,Wi)}},t.prototype.getFlags=function(){var t,e;return null!==(e=null===(t=this.F())||void 0===t?void 0:t.asNumber())&&void 0!==e?e:0},t.prototype.setFlags=function(t){this.dict.set(Mi.of("F"),Ai.of(t))},t.prototype.hasFlag=function(t){return 0!==(this.getFlags()&t)},t.prototype.setFlag=function(t){var e=this.getFlags();this.setFlags(e|t)},t.prototype.clearFlag=function(t){var e=this.getFlags();this.setFlags(e&~t)},t.prototype.setFlagTo=function(t,e){e?this.setFlag(t):this.clearFlag(t)},t.fromDict=function(e){return new t(e)},t}(),ah=function(){function t(t){this.dict=t}return t.prototype.R=function(){var t=this.dict.lookup(Mi.of("R"));if(t instanceof Ai)return t},t.prototype.BC=function(){var t=this.dict.lookup(Mi.of("BC"));if(t instanceof Ti)return t},t.prototype.BG=function(){var t=this.dict.lookup(Mi.of("BG"));if(t instanceof Ti)return t},t.prototype.CA=function(){var t=this.dict.lookup(Mi.of("CA"));if(t instanceof ca||t instanceof va)return t},t.prototype.RC=function(){var t=this.dict.lookup(Mi.of("RC"));if(t instanceof ca||t instanceof va)return t},t.prototype.AC=function(){var t=this.dict.lookup(Mi.of("AC"));if(t instanceof ca||t instanceof va)return t},t.prototype.getRotation=function(){var t;return null===(t=this.R())||void 0===t?void 0:t.asNumber()},t.prototype.getBorderColor=function(){var t=this.BC();if(t){for(var e=[],r=0,n=null==t?void 0:t.size();r<n;r++){var o=t.get(r);o instanceof Ai&&e.push(o.asNumber())}return e}},t.prototype.getBackgroundColor=function(){var t=this.BG();if(t){for(var e=[],r=0,n=null==t?void 0:t.size();r<n;r++){var o=t.get(r);o instanceof Ai&&e.push(o.asNumber())}return e}},t.prototype.getCaptions=function(){var t=this.CA(),e=this.RC(),r=this.AC();return{normal:null==t?void 0:t.decodeText(),rollover:null==e?void 0:e.decodeText(),down:null==r?void 0:r.decodeText()}},t.prototype.setRotation=function(t){var e=this.dict.context.obj(t);this.dict.set(Mi.of("R"),e)},t.prototype.setBorderColor=function(t){var e=this.dict.context.obj(t);this.dict.set(Mi.of("BC"),e)},t.prototype.setBackgroundColor=function(t){var e=this.dict.context.obj(t);this.dict.set(Mi.of("BG"),e)},t.prototype.setCaptions=function(t){var e=ca.fromText(t.normal);if(this.dict.set(Mi.of("CA"),e),t.rollover){var r=ca.fromText(t.rollover);this.dict.set(Mi.of("RC"),r)}else this.dict.delete(Mi.of("RC"));if(t.down){var n=ca.fromText(t.down);this.dict.set(Mi.of("AC"),n)}else this.dict.delete(Mi.of("AC"))},t.fromDict=function(e){return new t(e)},t}(),sh=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.MK=function(){var t=this.dict.lookup(Mi.of("MK"));if(t instanceof Vi)return t},r.prototype.BS=function(){var t=this.dict.lookup(Mi.of("BS"));if(t instanceof Vi)return t},r.prototype.DA=function(){var t=this.dict.lookup(Mi.of("DA"));if(t instanceof va||t instanceof ca)return t},r.prototype.P=function(){var t=this.dict.get(Mi.of("P"));if(t instanceof Gi)return t},r.prototype.setP=function(t){this.dict.set(Mi.of("P"),t)},r.prototype.setDefaultAppearance=function(t){this.dict.set(Mi.of("DA"),va.of(t))},r.prototype.getDefaultAppearance=function(){var t=this.DA();return t instanceof ca?t.decodeText():null==t?void 0:t.asString()},r.prototype.getAppearanceCharacteristics=function(){var t=this.MK();if(t)return ah.fromDict(t)},r.prototype.getOrCreateAppearanceCharacteristics=function(){var t=this.MK();if(t)return ah.fromDict(t);var e=ah.fromDict(this.dict.context.obj({}));return this.dict.set(Mi.of("MK"),e.dict),e},r.prototype.getBorderStyle=function(){var t=this.BS();if(t)return oh.fromDict(t)},r.prototype.getOrCreateBorderStyle=function(){var t=this.BS();if(t)return oh.fromDict(t);var e=oh.fromDict(this.dict.context.obj({}));return this.dict.set(Mi.of("BS"),e.dict),e},r.prototype.getOnValue=function(){var t,e=null===(t=this.getAppearances())||void 0===t?void 0:t.normal;if(e instanceof Vi)for(var r=e.keys(),n=0,o=r.length;n<o;n++){var i=r[n];if(i!==Mi.of("Off"))return i}},r.fromDict=function(t){return new r(t)},r.create=function(t,e){return new r(t.obj({Type:"Annot",Subtype:"Widget",Rect:[0,0,0,0],Parent:e}))},r}(ih),lh=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.FT=function(){var t=this.getInheritableAttribute(Mi.of("FT"));return this.dict.context.lookup(t,Mi)},r.prototype.getWidgets=function(){var t=this.Kids();if(!t)return[sh.fromDict(this.dict)];for(var e=new Array(t.size()),r=0,n=t.size();r<n;r++){var o=t.lookup(r,Vi);e[r]=sh.fromDict(o)}return e},r.prototype.addWidget=function(t){this.normalizedEntries().Kids.push(t)},r.prototype.removeWidget=function(t){var e=this.Kids();if(e){if(t<0||t>e.size())throw new hn(t,0,e.size());e.remove(t)}else{if(0!==t)throw new hn(t,0,0);this.setKids([])}},r.prototype.normalizedEntries=function(){var t=this.Kids();return t||(t=this.dict.context.obj([this.ref]),this.dict.set(Mi.of("Kids"),t)),{Kids:t}},r.fromDict=function(t,e){return new r(t,e)},r}(nh),hh=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.Opt=function(){return this.dict.lookupMaybe(Mi.of("Opt"),va,ca,Ti)},r.prototype.setOpt=function(t){this.dict.set(Mi.of("Opt"),this.dict.context.obj(t))},r.prototype.getExportValues=function(){var t=this.Opt();if(t){if(t instanceof va||t instanceof ca)return[t];for(var e=[],r=0,n=t.size();r<n;r++){var o=t.lookup(r);(o instanceof va||o instanceof ca)&&e.push(o)}return e}},r.prototype.removeExportValue=function(t){var e=this.Opt();if(e)if(e instanceof va||e instanceof ca){if(0!==t)throw new hn(t,0,0);this.setOpt([])}else{if(t<0||t>e.size())throw new hn(t,0,e.size());e.remove(t)}},r.prototype.normalizeExportValues=function(){for(var t,e,r,n,o=null!==(t=this.getExportValues())&&void 0!==t?t:[],i=[],a=this.getWidgets(),s=0,l=a.length;s<l;s++){var h=a[s],u=null!==(e=o[s])&&void 0!==e?e:ca.fromText(null!==(n=null===(r=h.getOnValue())||void 0===r?void 0:r.decodeText())&&void 0!==n?n:"");i.push(u)}this.setOpt(i)},r.prototype.addOpt=function(t,e){var r;this.normalizeExportValues();var n,o=t.decodeText();if(e)for(var i=null!==(r=this.getExportValues())&&void 0!==r?r:[],a=0,s=i.length;a<s;a++)i[a].decodeText()===o&&(n=a);var l=this.Opt();return l.push(t),null!=n?n:l.size()-1},r.prototype.addWidgetWithOpt=function(t,e,r){var n=this.addOpt(e,r),o=Mi.of(String(n));return this.addWidget(t),o},r}(lh),uh=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.setValue=function(t){var e;if(t!==(null!==(e=this.getOnValue())&&void 0!==e?e:Mi.of("Yes"))&&t!==Mi.of("Off"))throw new un;this.dict.set(Mi.of("V"),t);for(var r=this.getWidgets(),n=0,o=r.length;n<o;n++){var i=r[n],a=i.getOnValue()===t?t:Mi.of("Off");i.setAppearanceState(a)}},r.prototype.getValue=function(){var t=this.V();return t instanceof Mi?t:Mi.of("Off")},r.prototype.getOnValue=function(){var t=this.getWidgets()[0];return null==t?void 0:t.getOnValue()},r.fromDict=function(t,e){return new r(t,e)},r.create=function(t){var e=t.obj({FT:"Btn",Kids:[]});return new r(e,t.register(e))},r}(hh),ch=function(t){return 1<<t};exports.AcroFieldFlags=void 0,(Jl=exports.AcroFieldFlags||(exports.AcroFieldFlags={}))[Jl.ReadOnly=ch(0)]="ReadOnly",Jl[Jl.Required=ch(1)]="Required",Jl[Jl.NoExport=ch(2)]="NoExport",exports.AcroButtonFlags=void 0,(Ql=exports.AcroButtonFlags||(exports.AcroButtonFlags={}))[Ql.NoToggleToOff=ch(14)]="NoToggleToOff",Ql[Ql.Radio=ch(15)]="Radio",Ql[Ql.PushButton=ch(16)]="PushButton",Ql[Ql.RadiosInUnison=ch(25)]="RadiosInUnison",exports.AcroTextFlags=void 0,($l=exports.AcroTextFlags||(exports.AcroTextFlags={}))[$l.Multiline=ch(12)]="Multiline",$l[$l.Password=ch(13)]="Password",$l[$l.FileSelect=ch(20)]="FileSelect",$l[$l.DoNotSpellCheck=ch(22)]="DoNotSpellCheck",$l[$l.DoNotScroll=ch(23)]="DoNotScroll",$l[$l.Comb=ch(24)]="Comb",$l[$l.RichText=ch(25)]="RichText",exports.AcroChoiceFlags=void 0,(th=exports.AcroChoiceFlags||(exports.AcroChoiceFlags={}))[th.Combo=ch(17)]="Combo",th[th.Edit=ch(18)]="Edit",th[th.Sort=ch(19)]="Sort",th[th.MultiSelect=ch(21)]="MultiSelect",th[th.DoNotSpellCheck=ch(22)]="DoNotSpellCheck",th[th.CommitOnSelChange=ch(26)]="CommitOnSelChange";var dh=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.setValues=function(t){if(this.hasFlag(exports.AcroChoiceFlags.Combo)&&!this.hasFlag(exports.AcroChoiceFlags.Edit)&&!this.valuesAreValid(t))throw new un;if(0===t.length&&this.dict.delete(Mi.of("V")),1===t.length&&this.dict.set(Mi.of("V"),t[0]),t.length>1){if(!this.hasFlag(exports.AcroChoiceFlags.MultiSelect))throw new cn;this.dict.set(Mi.of("V"),this.dict.context.obj(t))}this.updateSelectedIndices(t)},r.prototype.valuesAreValid=function(t){for(var e=this.getOptions(),r=function(r,n){var o=t[r].decodeText();if(!e.find(function(t){return o===(t.display||t.value).decodeText()}))return{value:!1}},n=0,o=t.length;n<o;n++){var i=r(n);if("object"==typeof i)return i.value}return!0},r.prototype.updateSelectedIndices=function(t){if(t.length>1){for(var e=new Array(t.length),r=this.getOptions(),n=function(n,o){var i=t[n].decodeText();e[n]=r.findIndex(function(t){return i===(t.display||t.value).decodeText()})},o=0,i=t.length;o<i;o++)n(o);this.dict.set(Mi.of("I"),this.dict.context.obj(e.sort()))}else this.dict.delete(Mi.of("I"))},r.prototype.getValues=function(){var t=this.V();if(t instanceof va||t instanceof ca)return[t];if(t instanceof Ti){for(var e=[],r=0,n=t.size();r<n;r++){var o=t.lookup(r);(o instanceof va||o instanceof ca)&&e.push(o)}return e}return[]},r.prototype.Opt=function(){return this.dict.lookupMaybe(Mi.of("Opt"),va,ca,Ti)},r.prototype.setOptions=function(t){for(var e=new Array(t.length),r=0,n=t.length;r<n;r++){var o=t[r],i=o.value,a=o.display;e[r]=this.dict.context.obj([i,a||i])}this.dict.set(Mi.of("Opt"),this.dict.context.obj(e))},r.prototype.getOptions=function(){var t=this.Opt();if(t instanceof va||t instanceof ca)return[{value:t,display:t}];if(t instanceof Ti){for(var e=[],r=0,n=t.size();r<n;r++){var o=t.lookup(r);if((o instanceof va||o instanceof ca)&&e.push({value:o,display:o}),o instanceof Ti&&o.size()>0){var i=o.lookup(0,va,ca),a=o.lookupMaybe(1,va,ca);e.push({value:i,display:a||i})}}return e}return[]},r}(lh),fh=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.fromDict=function(t,e){return new r(t,e)},r.create=function(t){var e=t.obj({FT:"Ch",Ff:exports.AcroChoiceFlags.Combo,Kids:[]});return new r(e,t.register(e))},r}(dh),ph=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.addField=function(t){var e=this.normalizedEntries().Kids;null==e||e.push(t)},r.prototype.normalizedEntries=function(){var t=this.Kids();return t||(t=this.dict.context.obj([]),this.dict.set(Mi.of("Kids"),t)),{Kids:t}},r.fromDict=function(t,e){return new r(t,e)},r.create=function(t){var e=t.obj({});return new r(e,t.register(e))},r}(nh),gh=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.fromDict=function(t,e){return new r(t,e)},r}(lh),vh=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.MaxLen=function(){var t=this.dict.lookup(Mi.of("MaxLen"));if(t instanceof Ai)return t},r.prototype.Q=function(){var t=this.dict.lookup(Mi.of("Q"));if(t instanceof Ai)return t},r.prototype.setMaxLength=function(t){this.dict.set(Mi.of("MaxLen"),Ai.of(t))},r.prototype.removeMaxLength=function(){this.dict.delete(Mi.of("MaxLen"))},r.prototype.getMaxLength=function(){var t;return null===(t=this.MaxLen())||void 0===t?void 0:t.asNumber()},r.prototype.setQuadding=function(t){this.dict.set(Mi.of("Q"),Ai.of(t))},r.prototype.getQuadding=function(){var t;return null===(t=this.Q())||void 0===t?void 0:t.asNumber()},r.prototype.setValue=function(t){this.dict.set(Mi.of("V"),t)},r.prototype.removeValue=function(){this.dict.delete(Mi.of("V"))},r.prototype.getValue=function(){var t=this.V();if(t instanceof va||t instanceof ca)return t},r.fromDict=function(t,e){return new r(t,e)},r.create=function(t){var e=t.obj({FT:"Tx",Kids:[]});return new r(e,t.register(e))},r}(lh),yh=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.fromDict=function(t,e){return new r(t,e)},r.create=function(t){var e=t.obj({FT:"Btn",Ff:exports.AcroButtonFlags.PushButton,Kids:[]});return new r(e,t.register(e))},r}(hh),mh=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.setValue=function(t){if(!this.getOnValues().includes(t)&&t!==Mi.of("Off"))throw new un;this.dict.set(Mi.of("V"),t);for(var e=this.getWidgets(),r=0,n=e.length;r<n;r++){var o=e[r],i=o.getOnValue()===t?t:Mi.of("Off");o.setAppearanceState(i)}},r.prototype.getValue=function(){var t=this.V();return t instanceof Mi?t:Mi.of("Off")},r.prototype.getOnValues=function(){for(var t=this.getWidgets(),e=[],r=0,n=t.length;r<n;r++){var o=t[r].getOnValue();o&&e.push(o)}return e},r.fromDict=function(t,e){return new r(t,e)},r.create=function(t){var e=t.obj({FT:"Btn",Ff:exports.AcroButtonFlags.Radio,Kids:[]});return new r(e,t.register(e))},r}(hh),bh=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.fromDict=function(t,e){return new r(t,e)},r.create=function(t){var e=t.obj({FT:"Ch",Kids:[]});return new r(e,t.register(e))},r}(dh),wh=function(t){if(!t)return[];for(var e=[],r=0,n=t.size();r<n;r++){var o=t.get(r),i=t.lookup(r);o instanceof Gi&&i instanceof Vi&&e.push([xh(i,o),o])}return e},xh=function(t,e){return kh(t)?ph.fromDict(t,e):Fh(t,e)},kh=function(t){var e=t.lookup(Mi.of("Kids"));if(e instanceof Ti)for(var r=0,n=e.size();r<n;r++){var o=e.lookup(r);if(o instanceof Vi&&o.has(Mi.of("T")))return!0}return!1},Fh=function(t,e){var r=Th(t,Mi.of("FT")),n=t.context.lookup(r,Mi);return n===Mi.of("Btn")?Sh(t,e):n===Mi.of("Ch")?Ch(t,e):n===Mi.of("Tx")?vh.fromDict(t,e):n===Mi.of("Sig")?gh.fromDict(t,e):lh.fromDict(t,e)},Sh=function(t,e){var r,n=Th(t,Mi.of("Ff")),o=t.context.lookupMaybe(n,Ai),i=null!==(r=null==o?void 0:o.asNumber())&&void 0!==r?r:0;return Ah(i,exports.AcroButtonFlags.PushButton)?yh.fromDict(t,e):Ah(i,exports.AcroButtonFlags.Radio)?mh.fromDict(t,e):uh.fromDict(t,e)},Ch=function(t,e){var r,n=Th(t,Mi.of("Ff")),o=t.context.lookupMaybe(n,Ai),i=null!==(r=null==o?void 0:o.asNumber())&&void 0!==r?r:0;return Ah(i,exports.AcroChoiceFlags.Combo)?fh.fromDict(t,e):bh.fromDict(t,e)},Ah=function(t,e){return 0!==(t&e)},Th=function(t,e){var r;return Ph(t,function(t){r||(r=t.get(e))}),r},Ph=function(t,e){e(t);var r=t.lookupMaybe(Mi.of("Parent"),Vi);r&&Ph(r,e)},zh=function(){function t(t){this.dict=t}return t.prototype.Fields=function(){var t=this.dict.lookup(Mi.of("Fields"));if(t instanceof Ti)return t},t.prototype.getFields=function(){for(var t=this.normalizedEntries().Fields,e=new Array(t.size()),r=0,n=t.size();r<n;r++){var o=t.get(r),i=t.lookup(r,Vi);e[r]=[xh(i,o),o]}return e},t.prototype.getAllFields=function(){var t=[],e=function(r){if(r)for(var n=0,o=r.length;n<o;n++){var i=r[n];t.push(i);var a=i[0];a instanceof ph&&e(wh(a.Kids()))}};return e(this.getFields()),t},t.prototype.addField=function(t){var e=this.normalizedEntries().Fields;null==e||e.push(t)},t.prototype.removeField=function(t){var e=t.getParent(),r=void 0===e?this.normalizedEntries().Fields:e.Kids(),n=null==r?void 0:r.indexOf(t.ref);if(void 0===r||void 0===n)throw new Error("Tried to remove inexistent field "+t.getFullyQualifiedName());r.remove(n),void 0!==e&&0===r.size()&&this.removeField(e)},t.prototype.normalizedEntries=function(){var t=this.Fields();return t||(t=this.dict.context.obj([]),this.dict.set(Mi.of("Fields"),t)),{Fields:t}},t.fromDict=function(e){return new t(e)},t.create=function(e){return new t(e.obj({Fields:[]}))},t}(),Oh=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.Pages=function(){return this.lookup(Mi.of("Pages"),Vi)},r.prototype.AcroForm=function(){return this.lookupMaybe(Mi.of("AcroForm"),Vi)},r.prototype.getAcroForm=function(){var t=this.AcroForm();if(t)return zh.fromDict(t)},r.prototype.getOrCreateAcroForm=function(){var t=this.getAcroForm();if(!t){t=zh.create(this.context);var e=this.context.register(t.dict);this.set(Mi.of("AcroForm"),e)}return t},r.prototype.ViewerPreferences=function(){return this.lookupMaybe(Mi.of("ViewerPreferences"),Vi)},r.prototype.getViewerPreferences=function(){var t=this.ViewerPreferences();if(t)return eh.fromDict(t)},r.prototype.getOrCreateViewerPreferences=function(){var t=this.getViewerPreferences();if(!t){t=eh.create(this.context);var e=this.context.register(t.dict);this.set(Mi.of("ViewerPreferences"),e)}return t},r.prototype.insertLeafNode=function(t,e){var r=this.get(Mi.of("Pages"));return this.Pages().insertLeafNode(t,e)||r},r.prototype.removeLeafNode=function(t){this.Pages().removeLeafNode(t)},r.withContextAndPages=function(t,e){var n=new Map;return n.set(Mi.of("Type"),Mi.of("Catalog")),n.set(Mi.of("Pages"),e),new r(n,t)},r.fromMapWithContext=function(t,e){return new r(t,e)},r}(Vi),Dh=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.Parent=function(){return this.lookup(Mi.of("Parent"))},r.prototype.Kids=function(){return this.lookup(Mi.of("Kids"),Ti)},r.prototype.Count=function(){return this.lookup(Mi.of("Count"),Ai)},r.prototype.pushTreeNode=function(t){this.Kids().push(t)},r.prototype.pushLeafNode=function(t){var e=this.Kids();this.insertLeafKid(e.size(),t)},r.prototype.insertLeafNode=function(t,e){var n=this.Kids(),o=this.Count().asNumber();if(e>o)throw new sn(e,o);for(var i=e,a=0,s=n.size();a<s;a++){if(0===i)return void this.insertLeafKid(a,t);var l=n.get(a),h=this.context.lookup(l);if(h instanceof r){if(h.Count().asNumber()>i)return h.insertLeafNode(t,i)||l;i-=h.Count().asNumber()}h instanceof ta&&(i-=1)}if(0!==i)throw new ln(e,"insertLeafNode");this.insertLeafKid(n.size(),t)},r.prototype.removeLeafNode=function(t,e){void 0===e&&(e=!0);var n=this.Kids(),o=this.Count().asNumber();if(t>=o)throw new sn(t,o);for(var i=t,a=0,s=n.size();a<s;a++){var l=n.get(a),h=this.context.lookup(l);if(h instanceof r){if(h.Count().asNumber()>i)return h.removeLeafNode(i,e),void(e&&0===h.Kids().size()&&n.remove(a));i-=h.Count().asNumber()}if(h instanceof ta){if(0===i)return void this.removeKid(a);i-=1}}throw new ln(t,"removeLeafNode")},r.prototype.ascend=function(t){t(this);var e=this.Parent();e&&e.ascend(t)},r.prototype.traverse=function(t){for(var e=this.Kids(),n=0,o=e.size();n<o;n++){var i=e.get(n),a=this.context.lookup(i);a instanceof r&&a.traverse(t),t(a,i)}},r.prototype.insertLeafKid=function(t,e){var r=this.Kids();this.ascend(function(t){var e=t.Count().asNumber()+1;t.set(Mi.of("Count"),Ai.of(e))}),r.insert(t,e)},r.prototype.removeKid=function(t){var e=this.Kids();e.lookup(t)instanceof ta&&this.ascend(function(t){var e=t.Count().asNumber()-1;t.set(Mi.of("Count"),Ai.of(e))}),e.remove(t)},r.withContext=function(t,e){var n=new Map;return n.set(Mi.of("Type"),Mi.of("Pages")),n.set(Mi.of("Kids"),t.obj([])),n.set(Mi.of("Count"),t.obj(0)),e&&n.set(Mi.of("Parent"),e),new r(n,t)},r.fromMapWithContext=function(t,e){return new r(t,e)},r}(Vi),Rh=new Uint8Array(256);Rh[Sn.Zero]=1,Rh[Sn.One]=1,Rh[Sn.Two]=1,Rh[Sn.Three]=1,Rh[Sn.Four]=1,Rh[Sn.Five]=1,Rh[Sn.Six]=1,Rh[Sn.Seven]=1,Rh[Sn.Eight]=1,Rh[Sn.Nine]=1;var Bh=new Uint8Array(256);Bh[Sn.Period]=1,Bh[Sn.Plus]=1,Bh[Sn.Minus]=1;for(var Nh=new Uint8Array(256),Eh=0;Eh<256;Eh++)Nh[Eh]=Rh[Eh]||Bh[Eh]?1:0;var jh,Ih=Sn.Newline,Mh=Sn.CarriageReturn,Uh=function(){function t(t,e){void 0===e&&(e=!1),this.bytes=t,this.capNumbers=e}return t.prototype.parseRawInt=function(){for(var t="";!this.bytes.done();){var e=this.bytes.peek();if(!Rh[e])break;t+=m(this.bytes.next())}var r=Number(t);if(!t||!isFinite(r))throw new pn(this.bytes.position(),t);return r},t.prototype.parseRawNumber=function(){for(var t="";!this.bytes.done();){var e=this.bytes.peek();if(!Nh[e])break;if(t+=m(this.bytes.next()),e===Sn.Period)break}for(;!this.bytes.done()&&(e=this.bytes.peek(),Rh[e]);)t+=m(this.bytes.next());var r=Number(t);if(!t||!isFinite(r))throw new pn(this.bytes.position(),t);if(r>Number.MAX_SAFE_INTEGER){if(this.capNumbers){var n="Parsed number that is too large for some PDF readers: "+t+", using Number.MAX_SAFE_INTEGER instead.";return console.warn(n),Number.MAX_SAFE_INTEGER}n="Parsed number that is too large for some PDF readers: "+t+", not capping.",console.warn(n)}return r},t.prototype.skipWhitespace=function(){for(;!this.bytes.done()&&Di[this.bytes.peek()];)this.bytes.next()},t.prototype.skipLine=function(){for(;!this.bytes.done();){var t=this.bytes.peek();if(t===Ih||t===Mh)return;this.bytes.next()}},t.prototype.skipComment=function(){if(this.bytes.peek()!==Sn.Percent)return!1;for(;!this.bytes.done();){var t=this.bytes.peek();if(t===Ih||t===Mh)return!0;this.bytes.next()}return!0},t.prototype.skipWhitespaceAndComments=function(){for(this.skipWhitespace();this.skipComment();)this.skipWhitespace()},t.prototype.matchKeyword=function(t){for(var e=this.bytes.offset(),r=0,n=t.length;r<n;r++)if(this.bytes.done()||this.bytes.next()!==t[r])return this.bytes.moveTo(e),!1;return!0},t}(),Vh=function(){function t(t){this.idx=0,this.line=0,this.column=0,this.bytes=t,this.length=this.bytes.length}return t.prototype.moveTo=function(t){this.idx=t},t.prototype.next=function(){var t=this.bytes[this.idx++];return t===Sn.Newline?(this.line+=1,this.column=0):this.column+=1,t},t.prototype.assertNext=function(t){if(this.peek()!==t)throw new vn(this.position(),t,this.peek());return this.next()},t.prototype.peek=function(){return this.bytes[this.idx]},t.prototype.peekAhead=function(t){return this.bytes[this.idx+t]},t.prototype.peekAt=function(t){return this.bytes[t]},t.prototype.done=function(){return this.idx>=this.length},t.prototype.offset=function(){return this.idx},t.prototype.slice=function(t,e){return this.bytes.slice(t,e)},t.prototype.position=function(){return{line:this.line,column:this.column,offset:this.idx}},t.of=function(e){return new t(e)},t.fromPDFRawStream=function(e){return t.of(Xl(e).decode())},t}(),Wh=Sn.Space,qh=Sn.CarriageReturn,Lh=Sn.Newline,Kh=[Sn.s,Sn.t,Sn.r,Sn.e,Sn.a,Sn.m],Gh=[Sn.e,Sn.n,Sn.d,Sn.s,Sn.t,Sn.r,Sn.e,Sn.a,Sn.m],Hh={header:[Sn.Percent,Sn.P,Sn.D,Sn.F,Sn.Dash],eof:[Sn.Percent,Sn.Percent,Sn.E,Sn.O,Sn.F],obj:[Sn.o,Sn.b,Sn.j],endobj:[Sn.e,Sn.n,Sn.d,Sn.o,Sn.b,Sn.j],xref:[Sn.x,Sn.r,Sn.e,Sn.f],trailer:[Sn.t,Sn.r,Sn.a,Sn.i,Sn.l,Sn.e,Sn.r],startxref:[Sn.s,Sn.t,Sn.a,Sn.r,Sn.t,Sn.x,Sn.r,Sn.e,Sn.f],true:[Sn.t,Sn.r,Sn.u,Sn.e],false:[Sn.f,Sn.a,Sn.l,Sn.s,Sn.e],null:[Sn.n,Sn.u,Sn.l,Sn.l],stream:Kh,streamEOF1:i(Kh,[Wh,qh,Lh]),streamEOF2:i(Kh,[qh,Lh]),streamEOF3:i(Kh,[qh]),streamEOF4:i(Kh,[Lh]),endstream:Gh,EOF1endstream:i([qh,Lh],Gh),EOF2endstream:i([qh],Gh),EOF3endstream:i([Lh],Gh)},_h=function(t){function r(e,r,n){void 0===n&&(n=!1);var o=t.call(this,e,n)||this;return o.context=r,o}return e(r,t),r.prototype.parseObject=function(){if(this.skipWhitespaceAndComments(),this.matchKeyword(Hh.true))return zi.True;if(this.matchKeyword(Hh.false))return zi.False;if(this.matchKeyword(Hh.null))return Ui;var t=this.bytes.peek();if(t===Sn.LessThan&&this.bytes.peekAhead(1)===Sn.LessThan)return this.parseDictOrStream();if(t===Sn.LessThan)return this.parseHexString();if(t===Sn.LeftParen)return this.parseString();if(t===Sn.ForwardSlash)return this.parseName();if(t===Sn.LeftSquareBracket)return this.parseArray();if(Nh[t])return this.parseNumberOrRef();throw new yn(this.bytes.position(),t)},r.prototype.parseNumberOrRef=function(){var t=this.parseRawNumber();this.skipWhitespaceAndComments();var e=this.bytes.offset();if(Rh[this.bytes.peek()]){var r=this.parseRawNumber();if(this.skipWhitespaceAndComments(),this.bytes.peek()===Sn.R)return this.bytes.assertNext(Sn.R),Gi.of(t,r)}return this.bytes.moveTo(e),Ai.of(t)},r.prototype.parseHexString=function(){var t="";for(this.bytes.assertNext(Sn.LessThan);!this.bytes.done()&&this.bytes.peek()!==Sn.GreaterThan;)t+=m(this.bytes.next());return this.bytes.assertNext(Sn.GreaterThan),ca.of(t)},r.prototype.parseString=function(){for(var t=0,e=!1,r="";!this.bytes.done();){var n=this.bytes.next();if(r+=m(n),e||(n===Sn.LeftParen&&(t+=1),n===Sn.RightParen&&(t-=1)),n===Sn.BackSlash?e=!e:e&&(e=!1),0===t)return va.of(r.substring(1,r.length-1))}throw new wn(this.bytes.position())},r.prototype.parseName=function(){this.bytes.assertNext(Sn.ForwardSlash);for(var t="";!this.bytes.done();){var e=this.bytes.peek();if(Di[e]||Oi[e])break;t+=m(e),this.bytes.next()}return Mi.of(t)},r.prototype.parseArray=function(){this.bytes.assertNext(Sn.LeftSquareBracket),this.skipWhitespaceAndComments();for(var t=Ti.withContext(this.context);this.bytes.peek()!==Sn.RightSquareBracket;){var e=this.parseObject();t.push(e),this.skipWhitespaceAndComments()}return this.bytes.assertNext(Sn.RightSquareBracket),t},r.prototype.parseDict=function(){this.bytes.assertNext(Sn.LessThan),this.bytes.assertNext(Sn.LessThan),this.skipWhitespaceAndComments();for(var t=new Map;!this.bytes.done()&&this.bytes.peek()!==Sn.GreaterThan&&this.bytes.peekAhead(1)!==Sn.GreaterThan;){var e=this.parseName(),r=this.parseObject();t.set(e,r),this.skipWhitespaceAndComments()}this.skipWhitespaceAndComments(),this.bytes.assertNext(Sn.GreaterThan),this.bytes.assertNext(Sn.GreaterThan);var n=t.get(Mi.of("Type"));return n===Mi.of("Catalog")?Oh.fromMapWithContext(t,this.context):n===Mi.of("Pages")?Dh.fromMapWithContext(t,this.context):n===Mi.of("Page")?ta.fromMapWithContext(t,this.context):Vi.fromMapWithContext(t,this.context)},r.prototype.parseDictOrStream=function(){var t=this.bytes.position(),e=this.parseDict();if(this.skipWhitespaceAndComments(),!(this.matchKeyword(Hh.streamEOF1)||this.matchKeyword(Hh.streamEOF2)||this.matchKeyword(Hh.streamEOF3)||this.matchKeyword(Hh.streamEOF4)||this.matchKeyword(Hh.stream)))return e;var r,n=this.bytes.offset(),o=e.get(Mi.of("Length"));o instanceof Ai?(r=n+o.asNumber(),this.bytes.moveTo(r),this.skipWhitespaceAndComments(),this.matchKeyword(Hh.endstream)||(this.bytes.moveTo(n),r=this.findEndOfStreamFallback(t))):r=this.findEndOfStreamFallback(t);var i=this.bytes.slice(n,r);return qi.of(e,i)},r.prototype.findEndOfStreamFallback=function(t){for(var e=1,r=this.bytes.offset();!this.bytes.done()&&(r=this.bytes.offset(),this.matchKeyword(Hh.stream)?e+=1:this.matchKeyword(Hh.EOF1endstream)||this.matchKeyword(Hh.EOF2endstream)||this.matchKeyword(Hh.EOF3endstream)||this.matchKeyword(Hh.endstream)?e-=1:this.bytes.next(),0!==e););if(0!==e)throw new bn(t);return r},r.forBytes=function(t,e,n){return new r(Vh.of(t),e,n)},r.forByteStream=function(t,e,n){return void 0===n&&(n=!1),new r(t,e,n)},r}(Uh),Xh=function(t){function r(e,r){var n=t.call(this,Vh.fromPDFRawStream(e),e.dict.context)||this,o=e.dict;return n.alreadyParsed=!1,n.shouldWaitForTick=r||function(){return!1},n.firstOffset=o.lookup(Mi.of("First"),Ai).asNumber(),n.objectCount=o.lookup(Mi.of("N"),Ai).asNumber(),n}return e(r,t),r.prototype.parseIntoContext=function(){return n(this,0,void 0,function(){var t,e,r,n,i,a,s,l;return o(this,function(o){switch(o.label){case 0:if(this.alreadyParsed)throw new $r("PDFObjectStreamParser","parseIntoContext");this.alreadyParsed=!0,t=this.parseOffsetsAndObjectNumbers(),e=0,r=t.length,o.label=1;case 1:return e<r?(n=t[e],i=n.objectNumber,a=n.offset,this.bytes.moveTo(this.firstOffset+a),s=this.parseObject(),l=Gi.of(i,0),this.context.assign(l,s),this.shouldWaitForTick()?[4,_()]:[3,3]):[3,4];case 2:o.sent(),o.label=3;case 3:return e++,[3,1];case 4:return[2]}})})},r.prototype.parseOffsetsAndObjectNumbers=function(){for(var t=[],e=0,r=this.objectCount;e<r;e++){this.skipWhitespaceAndComments();var n=this.parseRawInt();this.skipWhitespaceAndComments();var o=this.parseRawInt();t.push({objectNumber:n,offset:o})}return t},r.forStream=function(t,e){return new r(t,e)},r}(_h),Zh=function(){function t(t){this.alreadyParsed=!1,this.dict=t.dict,this.bytes=Vh.fromPDFRawStream(t),this.context=this.dict.context;var e=this.dict.lookup(Mi.of("Size"),Ai),r=this.dict.lookup(Mi.of("Index"));if(r instanceof Ti){this.subsections=[];for(var n=0,o=r.size();n<o;n+=2){var i=r.lookup(n+0,Ai).asNumber(),a=r.lookup(n+1,Ai).asNumber();this.subsections.push({firstObjectNumber:i,length:a})}}else this.subsections=[{firstObjectNumber:0,length:e.asNumber()}];var s=this.dict.lookup(Mi.of("W"),Ti);for(this.byteWidths=[-1,-1,-1],n=0,o=s.size();n<o;n++)this.byteWidths[n]=s.lookup(n,Ai).asNumber()}return t.prototype.parseIntoContext=function(){if(this.alreadyParsed)throw new $r("PDFXRefStreamParser","parseIntoContext");return this.alreadyParsed=!0,this.context.trailerInfo={Root:this.dict.get(Mi.of("Root")),Encrypt:this.dict.get(Mi.of("Encrypt")),Info:this.dict.get(Mi.of("Info")),ID:this.dict.get(Mi.of("ID"))},this.parseEntries()},t.prototype.parseEntries=function(){for(var t=[],e=this.byteWidths,r=e[0],n=e[1],o=e[2],i=0,a=this.subsections.length;i<a;i++)for(var s=this.subsections[i],l=s.firstObjectNumber,h=s.length,u=0;u<h;u++){for(var c=0,d=0,f=r;d<f;d++)c=c<<8|this.bytes.next();var p=0;for(d=0,f=n;d<f;d++)p=p<<8|this.bytes.next();var g=0;for(d=0,f=o;d<f;d++)g=g<<8|this.bytes.next();0===r&&(c=1);var v=l+u,y={ref:Gi.of(v,g),offset:p,deleted:0===c,inObjectStream:2===c};t.push(y)}return t},t.forStream=function(e){return new t(e)},t}(),Yh=function(t){function r(e,r,n,o){void 0===r&&(r=1/0),void 0===n&&(n=!1),void 0===o&&(o=!1);var i=t.call(this,Vh.of(e),$i.create(),o)||this;return i.alreadyParsed=!1,i.parsedObjects=0,i.shouldWaitForTick=function(){return i.parsedObjects+=1,i.parsedObjects%i.objectsPerTick===0},i.objectsPerTick=r,i.throwOnInvalidObject=n,i}return e(r,t),r.prototype.parseDocument=function(){return n(this,0,void 0,function(){var t,e;return o(this,function(r){switch(r.label){case 0:if(this.alreadyParsed)throw new $r("PDFParser","parseDocument");this.alreadyParsed=!0,this.context.header=this.parseHeader(),r.label=1;case 1:return this.bytes.done()?[3,3]:[4,this.parseDocumentSection()];case 2:if(r.sent(),(e=this.bytes.offset())===t)throw new xn(this.bytes.position());return t=e,[3,1];case 3:return this.maybeRecoverRoot(),this.context.lookup(Gi.of(0))&&(console.warn("Removing parsed object: 0 0 R"),this.context.delete(Gi.of(0))),[2,this.context]}})})},r.prototype.maybeRecoverRoot=function(){var t=function(t){return t instanceof Vi&&t.lookup(Mi.of("Type"))===Mi.of("Catalog")};if(!t(this.context.lookup(this.context.trailerInfo.Root)))for(var e=this.context.enumerateIndirectObjects(),r=0,n=e.length;r<n;r++){var o=e[r],i=o[0];t(o[1])&&(this.context.trailerInfo.Root=i)}},r.prototype.parseHeader=function(){for(;!this.bytes.done();){if(this.matchKeyword(Hh.header)){var t=this.parseRawInt();this.bytes.assertNext(Sn.Period);var e=this.parseRawInt(),r=Si.forVersion(t,e);return this.skipBinaryHeaderComment(),r}this.bytes.next()}throw new kn(this.bytes.position())},r.prototype.parseIndirectObjectHeader=function(){this.skipWhitespaceAndComments();var t=this.parseRawInt();this.skipWhitespaceAndComments();var e=this.parseRawInt();if(this.skipWhitespaceAndComments(),!this.matchKeyword(Hh.obj))throw new Fn(this.bytes.position(),Hh.obj);return Gi.of(t,e)},r.prototype.matchIndirectObjectHeader=function(){var t=this.bytes.offset();try{return this.parseIndirectObjectHeader(),!0}catch(e){return this.bytes.moveTo(t),!1}},r.prototype.parseIndirectObject=function(){return n(this,0,void 0,function(){var t,e;return o(this,function(r){switch(r.label){case 0:return t=this.parseIndirectObjectHeader(),this.skipWhitespaceAndComments(),e=this.parseObject(),this.skipWhitespaceAndComments(),this.matchKeyword(Hh.endobj),e instanceof qi&&e.dict.lookup(Mi.of("Type"))===Mi.of("ObjStm")?[4,Xh.forStream(e,this.shouldWaitForTick).parseIntoContext()]:[3,2];case 1:return r.sent(),[3,3];case 2:e instanceof qi&&e.dict.lookup(Mi.of("Type"))===Mi.of("XRef")?Zh.forStream(e).parseIntoContext():this.context.assign(t,e),r.label=3;case 3:return[2,t]}})})},r.prototype.tryToParseInvalidIndirectObject=function(){var t=this.bytes.position(),e="Trying to parse invalid object: "+JSON.stringify(t)+")";if(this.throwOnInvalidObject)throw new Error(e);console.warn(e);var r=this.parseIndirectObjectHeader();console.warn("Invalid object ref: "+r),this.skipWhitespaceAndComments();for(var n=this.bytes.offset(),o=!0;!this.bytes.done()&&(this.matchKeyword(Hh.endobj)&&(o=!1),o);)this.bytes.next();if(o)throw new mn(t);var i=this.bytes.offset()-Hh.endobj.length,a=sa.of(this.bytes.slice(n,i));return this.context.assign(r,a),r},r.prototype.parseIndirectObjects=function(){return n(this,0,void 0,function(){var t;return o(this,function(e){switch(e.label){case 0:this.skipWhitespaceAndComments(),e.label=1;case 1:if(this.bytes.done()||!Rh[this.bytes.peek()])return[3,8];t=this.bytes.offset(),e.label=2;case 2:return e.trys.push([2,4,,5]),[4,this.parseIndirectObject()];case 3:return e.sent(),[3,5];case 4:return e.sent(),this.bytes.moveTo(t),this.tryToParseInvalidIndirectObject(),[3,5];case 5:return this.skipWhitespaceAndComments(),this.skipJibberish(),this.shouldWaitForTick()?[4,_()]:[3,7];case 6:e.sent(),e.label=7;case 7:return[3,1];case 8:return[2]}})})},r.prototype.maybeParseCrossRefSection=function(){if(this.skipWhitespaceAndComments(),this.matchKeyword(Hh.xref)){this.skipWhitespaceAndComments();for(var t=-1,e=ra.createEmpty();!this.bytes.done()&&Rh[this.bytes.peek()];){var r=this.parseRawInt();this.skipWhitespaceAndComments();var n=this.parseRawInt();this.skipWhitespaceAndComments();var o=this.bytes.peek();if(o===Sn.n||o===Sn.f){var i=Gi.of(t,n);this.bytes.next()===Sn.n?e.addEntry(i,r):e.addDeletedEntry(i,r),t+=1}else t=r;this.skipWhitespaceAndComments()}return e}},r.prototype.maybeParseTrailerDict=function(){if(this.skipWhitespaceAndComments(),this.matchKeyword(Hh.trailer)){this.skipWhitespaceAndComments();var t=this.parseDict(),e=this.context;e.trailerInfo={Root:t.get(Mi.of("Root"))||e.trailerInfo.Root,Encrypt:t.get(Mi.of("Encrypt"))||e.trailerInfo.Encrypt,Info:t.get(Mi.of("Info"))||e.trailerInfo.Info,ID:t.get(Mi.of("ID"))||e.trailerInfo.ID}}},r.prototype.maybeParseTrailer=function(){if(this.skipWhitespaceAndComments(),this.matchKeyword(Hh.startxref)){this.skipWhitespaceAndComments();var t=this.parseRawInt();return this.skipWhitespace(),this.matchKeyword(Hh.eof),this.skipWhitespaceAndComments(),this.matchKeyword(Hh.eof),this.skipWhitespaceAndComments(),na.forLastCrossRefSectionOffset(t)}},r.prototype.parseDocumentSection=function(){return n(this,0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return[4,this.parseIndirectObjects()];case 1:return t.sent(),this.maybeParseCrossRefSection(),this.maybeParseTrailerDict(),this.maybeParseTrailer(),this.skipJibberish(),[2]}})})},r.prototype.skipJibberish=function(){for(this.skipWhitespaceAndComments();!this.bytes.done();){var t=this.bytes.offset(),e=this.bytes.peek();if(e>=Sn.Space&&e<=Sn.Tilde&&(this.matchKeyword(Hh.xref)||this.matchKeyword(Hh.trailer)||this.matchKeyword(Hh.startxref)||this.matchIndirectObjectHeader())){this.bytes.moveTo(t);break}this.bytes.next()}},r.prototype.skipBinaryHeaderComment=function(){this.skipWhitespaceAndComments();try{var t=this.bytes.offset();this.parseIndirectObjectHeader(),this.bytes.moveTo(t)}catch(t){this.bytes.next(),this.skipWhitespaceAndComments()}},r.forBytesWithOptions=function(t,e,n,o){return new r(t,e,n,o)},r}(_h),Jh=function(t){return 1<<t};exports.AnnotationFlags=void 0,(jh=exports.AnnotationFlags||(exports.AnnotationFlags={}))[jh.Invisible=Jh(0)]="Invisible",jh[jh.Hidden=Jh(1)]="Hidden",jh[jh.Print=Jh(2)]="Print",jh[jh.NoZoom=Jh(3)]="NoZoom",jh[jh.NoRotate=Jh(4)]="NoRotate",jh[jh.NoView=Jh(5)]="NoView",jh[jh.ReadOnly=Jh(6)]="ReadOnly",jh[jh.Locked=Jh(7)]="Locked",jh[jh.ToggleNoView=Jh(8)]="ToggleNoView",jh[jh.LockedContents=Jh(9)]="LockedContents";var Qh,$h=function(t){return t instanceof Mi?t:Mi.of(t)},tu=function(t){return t instanceof Ai?t:Ai.of(t)},eu=function(t){return t instanceof Ai?t.asNumber():t};exports.RotationTypes=void 0,(Qh=exports.RotationTypes||(exports.RotationTypes={})).Degrees="degrees",Qh.Radians="radians";var ru,nu=function(t){return jr(t,"degreeAngle",["number"]),{type:exports.RotationTypes.Degrees,angle:t}},ou=exports.RotationTypes.Radians,iu=exports.RotationTypes.Degrees,au=function(t){return t*Math.PI/180},su=function(t){return 180*t/Math.PI},lu=function(t){return t.type===ou?t.angle:t.type===iu?au(t.angle):ct("Invalid rotation: "+JSON.stringify(t))},hu=function(t){return t.type===ou?su(t.angle):t.type===iu?t.angle:ct("Invalid rotation: "+JSON.stringify(t))},uu=function(t){void 0===t&&(t=0);var e=t/90%4;return 0===e?0:1===e?90:2===e?180:3===e?270:0},cu=function(t,e){void 0===e&&(e=0);var r=uu(e);return 90===r||270===r?{width:t.height,height:t.width}:{width:t.width,height:t.height}},du=function(t,e,r){void 0===e&&(e=0),void 0===r&&(r=0);var n=t.x,o=t.y,i=t.width,a=t.height,s=uu(r),l=e/2;return 0===s?{x:n-l,y:o-l,width:i,height:a}:90===s?{x:n-a+l,y:o-l,width:a,height:i}:180===s?{x:n-i+l,y:o-a+l,width:i,height:a}:270===s?{x:n-l,y:o-i+l,width:a,height:i}:{x:n-l,y:o-l,width:i,height:a}},fu=function(){return Hi.of(Xi.ClipNonZero)},pu=Math.cos,gu=Math.sin,vu=Math.tan,yu=function(t,e,r,n,o,i){return Hi.of(Xi.ConcatTransformationMatrix,[tu(t),tu(e),tu(r),tu(n),tu(o),tu(i)])},mu=function(t,e){return yu(1,0,0,1,t,e)},bu=function(t,e){return yu(t,0,0,e,0,0)},wu=function(t){return yu(pu(eu(t)),gu(eu(t)),-gu(eu(t)),pu(eu(t)),0,0)},xu=function(t){return wu(au(eu(t)))},ku=function(t,e){return yu(1,vu(eu(t)),vu(eu(e)),1,0,0)},Fu=function(t,e){return Hi.of(Xi.SetLineDashPattern,["["+t.map(tu).join(" ")+"]",tu(e)])};exports.LineCapStyle=void 0,(ru=exports.LineCapStyle||(exports.LineCapStyle={}))[ru.Butt=0]="Butt",ru[ru.Round=1]="Round",ru[ru.Projecting=2]="Projecting";var Su,Cu=function(t){return Hi.of(Xi.SetLineCapStyle,[tu(t)])};exports.LineJoinStyle=void 0,(Su=exports.LineJoinStyle||(exports.LineJoinStyle={}))[Su.Miter=0]="Miter",Su[Su.Round=1]="Round",Su[Su.Bevel=2]="Bevel";var Au,Tu=function(t){return Hi.of(Xi.SetGraphicsStateParams,[$h(t)])},Pu=function(){return Hi.of(Xi.PushGraphicsState)},zu=function(){return Hi.of(Xi.PopGraphicsState)},Ou=function(t){return Hi.of(Xi.SetLineWidth,[tu(t)])},Du=function(t,e,r,n,o,i){return Hi.of(Xi.AppendBezierCurve,[tu(t),tu(e),tu(r),tu(n),tu(o),tu(i)])},Ru=function(t,e,r,n){return Hi.of(Xi.CurveToReplicateInitialPoint,[tu(t),tu(e),tu(r),tu(n)])},Bu=function(){return Hi.of(Xi.ClosePath)},Nu=function(t,e){return Hi.of(Xi.MoveTo,[tu(t),tu(e)])},Eu=function(t,e){return Hi.of(Xi.LineTo,[tu(t),tu(e)])},ju=function(){return Hi.of(Xi.StrokePath)},Iu=function(){return Hi.of(Xi.FillNonZero)},Mu=function(){return Hi.of(Xi.FillNonZeroAndStroke)},Uu=function(){return Hi.of(Xi.EndPath)},Vu=function(){return Hi.of(Xi.NextLine)},Wu=function(t){return Hi.of(Xi.ShowText,[t])},qu=function(){return Hi.of(Xi.BeginText)},Lu=function(){return Hi.of(Xi.EndText)},Ku=function(t,e){return Hi.of(Xi.SetFontAndSize,[$h(t),tu(e)])},Gu=function(t){return Hi.of(Xi.SetTextLineHeight,[tu(t)])};exports.TextRenderingMode=void 0,(Au=exports.TextRenderingMode||(exports.TextRenderingMode={}))[Au.Fill=0]="Fill",Au[Au.Outline=1]="Outline",Au[Au.FillAndOutline=2]="FillAndOutline",Au[Au.Invisible=3]="Invisible",Au[Au.FillAndClip=4]="FillAndClip",Au[Au.OutlineAndClip=5]="OutlineAndClip",Au[Au.FillAndOutlineAndClip=6]="FillAndOutlineAndClip",Au[Au.Clip=7]="Clip";var Hu,_u=function(t,e,r,n,o,i){return Hi.of(Xi.SetTextMatrix,[tu(t),tu(e),tu(r),tu(n),tu(o),tu(i)])},Xu=function(t,e,r,n,o){return _u(pu(eu(t)),gu(eu(t))+vu(eu(e)),-gu(eu(t))+vu(eu(r)),pu(eu(t)),n,o)},Zu=function(t){return Hi.of(Xi.DrawObject,[$h(t)])},Yu=function(t){return Hi.of(Xi.NonStrokingColorGray,[tu(t)])},Ju=function(t){return Hi.of(Xi.StrokingColorGray,[tu(t)])},Qu=function(t,e,r){return Hi.of(Xi.NonStrokingColorRgb,[tu(t),tu(e),tu(r)])},$u=function(t,e,r){return Hi.of(Xi.StrokingColorRgb,[tu(t),tu(e),tu(r)])},tc=function(t,e,r,n){return Hi.of(Xi.NonStrokingColorCmyk,[tu(t),tu(e),tu(r),tu(n)])},ec=function(t,e,r,n){return Hi.of(Xi.StrokingColorCmyk,[tu(t),tu(e),tu(r),tu(n)])},rc=function(t){return Hi.of(Xi.BeginMarkedContent,[$h(t)])},nc=function(){return Hi.of(Xi.EndMarkedContent)};exports.ColorTypes=void 0,(Hu=exports.ColorTypes||(exports.ColorTypes={})).Grayscale="Grayscale",Hu.RGB="RGB",Hu.CMYK="CMYK";var oc=function(t){return Ur(t,"gray",0,1),{type:exports.ColorTypes.Grayscale,gray:t}},ic=function(t,e,r){return Ur(t,"red",0,1),Ur(e,"green",0,1),Ur(r,"blue",0,1),{type:exports.ColorTypes.RGB,red:t,green:e,blue:r}},ac=function(t,e,r,n){return Ur(t,"cyan",0,1),Ur(e,"magenta",0,1),Ur(r,"yellow",0,1),Ur(n,"key",0,1),{type:exports.ColorTypes.CMYK,cyan:t,magenta:e,yellow:r,key:n}},sc=exports.ColorTypes.Grayscale,lc=exports.ColorTypes.RGB,hc=exports.ColorTypes.CMYK,uc=function(t){return t.type===sc?Yu(t.gray):t.type===lc?Qu(t.red,t.green,t.blue):t.type===hc?tc(t.cyan,t.magenta,t.yellow,t.key):ct("Invalid color: "+JSON.stringify(t))},cc=function(t){return t.type===sc?Ju(t.gray):t.type===lc?$u(t.red,t.green,t.blue):t.type===hc?ec(t.cyan,t.magenta,t.yellow,t.key):ct("Invalid color: "+JSON.stringify(t))},dc=function(t,e){return void 0===e&&(e=1),1===(null==t?void 0:t.length)?oc(t[0]*e):3===(null==t?void 0:t.length)?ic(t[0]*e,t[1]*e,t[2]*e):4===(null==t?void 0:t.length)?ac(t[0]*e,t[1]*e,t[2]*e,t[3]*e):void 0},fc=function(t){return t.type===sc?[t.gray]:t.type===lc?[t.red,t.green,t.blue]:t.type===hc?[t.cyan,t.magenta,t.yellow,t.key]:ct("Invalid color: "+JSON.stringify(t))},pc=0,gc=0,vc=0,yc=0,mc=0,bc=0,wc=new Map([["A",7],["a",7],["C",6],["c",6],["H",1],["h",1],["L",2],["l",2],["M",2],["m",2],["Q",4],["q",4],["S",4],["s",4],["T",2],["t",2],["V",1],["v",1],["Z",0],["z",0]]),xc={M:function(t){return pc=t[0],gc=t[1],vc=yc=null,mc=pc,bc=gc,Nu(pc,gc)},m:function(t){return pc+=t[0],gc+=t[1],vc=yc=null,mc=pc,bc=gc,Nu(pc,gc)},C:function(t){return pc=t[4],gc=t[5],vc=t[2],yc=t[3],Du(t[0],t[1],t[2],t[3],t[4],t[5])},c:function(t){var e=Du(t[0]+pc,t[1]+gc,t[2]+pc,t[3]+gc,t[4]+pc,t[5]+gc);return vc=pc+t[2],yc=gc+t[3],pc+=t[4],gc+=t[5],e},S:function(t){null!==vc&&null!==yc||(vc=pc,yc=gc);var e=Du(pc-(vc-pc),gc-(yc-gc),t[0],t[1],t[2],t[3]);return vc=t[0],yc=t[1],pc=t[2],gc=t[3],e},s:function(t){null!==vc&&null!==yc||(vc=pc,yc=gc);var e=Du(pc-(vc-pc),gc-(yc-gc),pc+t[0],gc+t[1],pc+t[2],gc+t[3]);return vc=pc+t[0],yc=gc+t[1],pc+=t[2],gc+=t[3],e},Q:function(t){return vc=t[0],yc=t[1],pc=t[2],gc=t[3],Ru(t[0],t[1],pc,gc)},q:function(t){var e=Ru(t[0]+pc,t[1]+gc,t[2]+pc,t[3]+gc);return vc=pc+t[0],yc=gc+t[1],pc+=t[2],gc+=t[3],e},T:function(t){null===vc||null===yc?(vc=pc,yc=gc):(vc=pc-(vc-pc),yc=gc-(yc-gc));var e=Ru(vc,yc,t[0],t[1]);return vc=pc-(vc-pc),yc=gc-(yc-gc),pc=t[0],gc=t[1],e},t:function(t){null===vc||null===yc?(vc=pc,yc=gc):(vc=pc-(vc-pc),yc=gc-(yc-gc));var e=Ru(vc,yc,pc+t[0],gc+t[1]);return pc+=t[0],gc+=t[1],e},A:function(t){var e=kc(pc,gc,t);return pc=t[5],gc=t[6],e},a:function(t){t[5]+=pc,t[6]+=gc;var e=kc(pc,gc,t);return pc=t[5],gc=t[6],e},L:function(t){return pc=t[0],gc=t[1],vc=yc=null,Eu(pc,gc)},l:function(t){return pc+=t[0],gc+=t[1],vc=yc=null,Eu(pc,gc)},H:function(t){return pc=t[0],vc=yc=null,Eu(pc,gc)},h:function(t){return pc+=t[0],vc=yc=null,Eu(pc,gc)},V:function(t){return gc=t[0],vc=yc=null,Eu(pc,gc)},v:function(t){return gc+=t[0],vc=yc=null,Eu(pc,gc)},Z:function(){var t=Bu();return pc=mc,gc=bc,t},z:function(){var t=Bu();return pc=mc,gc=bc,t}},kc=function(t,e,r){for(var n=r[0],o=r[1],i=r[2],a=r[3],s=r[4],l=r[5],h=r[6],u=[],c=0,d=Fc(l,h,n,o,a,s,i,t,e);c<d.length;c++){var f=d[c],p=Sc.apply(void 0,f);u.push(Du.apply(void 0,p))}return u},Fc=function(t,e,r,n,o,i,a,s,l){var h=a*(Math.PI/180),u=Math.sin(h),c=Math.cos(h);r=Math.abs(r),n=Math.abs(n);var d=(vc=c*(s-t)*.5+u*(l-e)*.5)*vc/(r*r)+(yc=c*(l-e)*.5-u*(s-t)*.5)*yc/(n*n);d>1&&(r*=d=Math.sqrt(d),n*=d);var f=c/r,p=u/r,g=-u/n,v=c/n,y=f*s+p*l,m=g*s+v*l,b=f*t+p*e,w=g*t+v*e,x=1/((b-y)*(b-y)+(w-m)*(w-m))-.25;x<0&&(x=0);var k=Math.sqrt(x);i===o&&(k=-k);var F=.5*(y+b)-k*(w-m),S=.5*(m+w)+k*(b-y),C=Math.atan2(m-S,y-F),A=Math.atan2(w-S,b-F)-C;A<0&&1===i?A+=2*Math.PI:A>0&&0===i&&(A-=2*Math.PI);for(var T=Math.ceil(Math.abs(A/(.5*Math.PI+.001))),P=[],z=0;z<T;z++){var O=C+z*A/T,D=C+(z+1)*A/T;P[z]=[F,S,O,D,r,n,u,c]}return P},Sc=function(t,e,r,n,o,i,a,s){var l=s*o,h=-a*i,u=a*o,c=s*i,d=.5*(n-r),f=8/3*Math.sin(.5*d)*Math.sin(.5*d)/Math.sin(d),p=t+Math.cos(r)-f*Math.sin(r),g=e+Math.sin(r)+f*Math.cos(r),v=t+Math.cos(n),y=e+Math.sin(n),m=v+f*Math.sin(n),b=y-f*Math.cos(n);return[l*p+h*g,u*p+c*g,l*m+h*b,u*m+c*b,l*v+h*y,u*v+c*y]},Cc=function(t,e){for(var r=[Pu(),e.graphicsState&&Tu(e.graphicsState),qu(),uc(e.color),Ku(e.font,e.size),Gu(e.lineHeight),Xu(lu(e.rotate),lu(e.xSkew),lu(e.ySkew),e.x,e.y)].filter(Boolean),n=0,o=t.length;n<o;n++)r.push(Wu(t[n]),Vu());return r.push(Lu(),zu()),r},Ac=function(t,e){return[Pu(),e.graphicsState&&Tu(e.graphicsState),mu(e.x,e.y),wu(lu(e.rotate)),bu(e.width,e.height),ku(lu(e.xSkew),lu(e.ySkew)),Zu(t),zu()].filter(Boolean)},Tc=function(t,e){return[Pu(),e.graphicsState&&Tu(e.graphicsState),mu(e.x,e.y),wu(lu(e.rotate)),bu(e.xScale,e.yScale),ku(lu(e.xSkew),lu(e.ySkew)),Zu(t),zu()].filter(Boolean)},Pc=function(t){var e,r;return[Pu(),t.graphicsState&&Tu(t.graphicsState),t.color&&cc(t.color),Ou(t.thickness),Fu(null!==(e=t.dashArray)&&void 0!==e?e:[],null!==(r=t.dashPhase)&&void 0!==r?r:0),Nu(t.start.x,t.start.y),t.lineCap&&Cu(t.lineCap),Nu(t.start.x,t.start.y),Eu(t.end.x,t.end.y),ju(),zu()].filter(Boolean)},zc=function(t){var e,r;return[Pu(),t.graphicsState&&Tu(t.graphicsState),t.color&&uc(t.color),t.borderColor&&cc(t.borderColor),Ou(t.borderWidth),t.borderLineCap&&Cu(t.borderLineCap),Fu(null!==(e=t.borderDashArray)&&void 0!==e?e:[],null!==(r=t.borderDashPhase)&&void 0!==r?r:0),mu(t.x,t.y),wu(lu(t.rotate)),ku(lu(t.xSkew),lu(t.ySkew)),Nu(0,0),Eu(0,t.height),Eu(t.width,t.height),Eu(t.width,0),Bu(),t.color&&t.borderWidth?Mu():t.color?Iu():t.borderColor?ju():Bu(),zu()].filter(Boolean)},Oc=(Math.sqrt(2)-1)/3*4,Dc=function(t){var e=eu(t.x),r=eu(t.y),n=eu(t.xScale),o=eu(t.yScale),i=n*Oc,a=o*Oc,s=(e-=n)+2*n,l=(r-=o)+2*o,h=e+n,u=r+o;return[Pu(),Nu(e,u),Du(e,u-a,h-i,r,h,r),Du(h+i,r,s,u-a,s,u),Du(s,u+a,h+i,l,h,l),Du(h-i,l,e,u+a,e,u),zu()]},Rc=function(t){var e,r,n,o,a,s,l,h,u,c,d,f,p,g,v,y;return i([Pu(),t.graphicsState&&Tu(t.graphicsState),t.color&&uc(t.color),t.borderColor&&cc(t.borderColor),Ou(t.borderWidth),t.borderLineCap&&Cu(t.borderLineCap),Fu(null!==(e=t.borderDashArray)&&void 0!==e?e:[],null!==(r=t.borderDashPhase)&&void 0!==r?r:0)],void 0===t.rotate?Dc({x:t.x,y:t.y,xScale:t.xScale,yScale:t.yScale}):(o={x:t.x,y:t.y,xScale:t.xScale,yScale:t.yScale,rotate:null!==(n=t.rotate)&&void 0!==n?n:nu(0)},a=eu(o.x),s=eu(o.y),l=eu(o.xScale),h=eu(o.yScale),u=-l,c=-h,d=l*Oc,f=h*Oc,p=u+2*l,g=c+2*h,v=u+l,y=c+h,[mu(a,s),wu(lu(o.rotate)),Nu(u,y),Du(u,y-f,v-d,c,v,c),Du(v+d,c,p,y-f,p,y),Du(p,y+f,v+d,g,v,g),Du(v-d,g,u,y+f,u,y)]),[t.color&&t.borderWidth?Mu():t.color?Iu():t.borderColor?ju():Bu(),zu()]).filter(Boolean)},Bc=function(t,e){var r,n,o;return i([Pu(),e.graphicsState&&Tu(e.graphicsState),mu(e.x,e.y),wu(lu(null!==(r=e.rotate)&&void 0!==r?r:nu(0))),e.scale?bu(e.scale,-e.scale):bu(1,-1),e.color&&uc(e.color),e.borderColor&&cc(e.borderColor),e.borderWidth&&Ou(e.borderWidth),e.borderLineCap&&Cu(e.borderLineCap),Fu(null!==(n=e.borderDashArray)&&void 0!==n?n:[],null!==(o=e.borderDashPhase)&&void 0!==o?o:0)],function(t){return function(t){pc=gc=vc=yc=mc=bc=0;for(var e=[],r=0;r<t.length;r++){var n=t[r];if(n.cmd&&"function"==typeof xc[n.cmd]){var o=xc[n.cmd](n.args);Array.isArray(o)?e=e.concat(o):e.push(o)}}return e}(function(t){for(var e,r=[],n=[],o="",i=!1,a=0,s=0,l=t;s<l.length;s++){var h=l[s];if(wc.has(h))a=wc.get(h),e&&(o.length>0&&(n[n.length]=+o),r[r.length]={cmd:e,args:n},n=[],o="",i=!1),e=h;else if([" ",","].includes(h)||"-"===h&&o.length>0&&"e"!==o[o.length-1]||"."===h&&i){if(0===o.length)continue;n.length===a?(r[r.length]={cmd:e,args:n},n=[+o],"M"===e&&(e="L"),"m"===e&&(e="l")):n[n.length]=+o,i="."===h,o=["-","."].includes(h)?h:""}else o+=h,"."===h&&(i=!0)}return o.length>0&&(n.length===a?(r[r.length]={cmd:e,args:n},n=[+o],"M"===e&&(e="L"),"m"===e&&(e="l")):n[n.length]=+o),r[r.length]={cmd:e,args:n},r}(t))}(t),[e.color&&e.borderWidth?Mu():e.color?Iu():e.borderColor?ju():Bu(),zu()]).filter(Boolean)},Nc=function(t){var e=eu(t.size);return[Pu(),t.color&&cc(t.color),Ou(t.thickness),mu(t.x,t.y),Nu(-.675*e,-.07601036269430045*e),Eu(-.25*e,-.49*e),Eu(.69*e,.475*e),ju(),zu()].filter(Boolean)},Ec=function(t){return 0===t.rotation?[mu(0,0),xu(0)]:90===t.rotation?[mu(t.width,0),xu(90)]:180===t.rotation?[mu(t.width,t.height),xu(180)]:270===t.rotation?[mu(0,t.height),xu(270)]:[]},jc=function(t){var e=zc({x:t.x,y:t.y,width:t.width,height:t.height,borderWidth:t.borderWidth,color:t.color,borderColor:t.borderColor,rotate:nu(0),xSkew:nu(0),ySkew:nu(0)});if(!t.filled)return e;var r=eu(t.width),n=eu(t.height),o=Math.min(r,n)/2,a=Nc({x:r/2,y:n/2,size:o,thickness:t.thickness,color:t.markColor});return i([Pu()],e,a,[zu()])},Ic=function(t){var e=eu(t.width),r=eu(t.height),n=Math.min(e,r)/2,o=Rc({x:t.x,y:t.y,xScale:n,yScale:n,color:t.color,borderColor:t.borderColor,borderWidth:t.borderWidth});if(!t.filled)return o;var a=Rc({x:t.x,y:t.y,xScale:.45*n,yScale:.45*n,color:t.dotColor,borderColor:void 0,borderWidth:0});return i([Pu()],o,a,[zu()])},Mc=function(t){var e=eu(t.x),r=eu(t.y),n=eu(t.width),o=eu(t.height),a=zc({x:e,y:r,width:n,height:o,borderWidth:t.borderWidth,color:t.color,borderColor:t.borderColor,rotate:nu(0),xSkew:nu(0),ySkew:nu(0)}),s=Uc(t.textLines,{color:t.textColor,font:t.font,size:t.fontSize,rotate:nu(0),xSkew:nu(0),ySkew:nu(0)});return i([Pu()],a,s,[zu()])},Uc=function(t,e){for(var r=[qu(),uc(e.color),Ku(e.font,e.size)],n=0,o=t.length;n<o;n++){var i=t[n],a=i.encoded,s=i.x,l=i.y;r.push(Xu(lu(e.rotate),lu(e.xSkew),lu(e.ySkew),s,l),Wu(a))}return r.push(Lu()),r},Vc=function(t){var e=eu(t.x),r=eu(t.y),n=eu(t.width),o=eu(t.height),a=eu(t.borderWidth),s=eu(t.padding),l=e+a/2+s,h=r+a/2+s,u=n-2*(a/2+s),c=o-2*(a/2+s),d=[Nu(l,h),Eu(l,h+c),Eu(l+u,h+c),Eu(l+u,h),Bu(),fu(),Uu()],f=zc({x:e,y:r,width:n,height:o,borderWidth:t.borderWidth,color:t.color,borderColor:t.borderColor,rotate:nu(0),xSkew:nu(0),ySkew:nu(0)}),p=Uc(t.textLines,{color:t.textColor,font:t.font,size:t.fontSize,rotate:nu(0),xSkew:nu(0),ySkew:nu(0)}),g=i([rc("Tx"),Pu()],p,[zu(),nc()]);return i([Pu()],f,d,g,[zu()])},Wc=function(t){for(var e=eu(t.x),r=eu(t.y),n=eu(t.width),o=eu(t.height),a=eu(t.lineHeight),s=eu(t.borderWidth),l=eu(t.padding),h=e+s/2+l,u=r+s/2+l,c=n-2*(s/2+l),d=o-2*(s/2+l),f=[Nu(h,u),Eu(h,u+d),Eu(h+c,u+d),Eu(h+c,u),Bu(),fu(),Uu()],p=zc({x:e,y:r,width:n,height:o,borderWidth:t.borderWidth,color:t.color,borderColor:t.borderColor,rotate:nu(0),xSkew:nu(0),ySkew:nu(0)}),g=[],v=0,y=t.selectedLines.length;v<y;v++){var m=t.textLines[t.selectedLines[v]];g.push.apply(g,zc({x:m.x-l,y:m.y-(a-m.height)/2,width:n-s,height:m.height+(a-m.height)/2,borderWidth:0,color:t.selectedColor,borderColor:void 0,rotate:nu(0),xSkew:nu(0),ySkew:nu(0)}))}var b=Uc(t.textLines,{color:t.textColor,font:t.font,size:t.fontSize,rotate:nu(0),xSkew:nu(0),ySkew:nu(0)}),w=i([rc("Tx"),Pu()],b,[zu(),nc()]);return i([Pu()],p,g,f,w,[zu()])},qc=function(t){function r(){return t.call(this,"Input document to `PDFDocument.load` is encrypted. You can use `PDFDocument.load(..., { ignoreEncryption: true })` if you wish to load the document anyways.")||this}return e(r,t),r}(Error),Lc=function(t){function r(){return t.call(this,"Input to `PDFDocument.embedFont` was a custom font, but no `fontkit` instance was found. You must register a `fontkit` instance with `PDFDocument.registerFontkit(...)` before embedding custom fonts.")||this}return e(r,t),r}(Error),Kc=function(t){function r(){return t.call(this,"A `page` passed to `PDFDocument.addPage` or `PDFDocument.insertPage` was from a different (foreign) PDF document. If you want to copy pages from one PDFDocument to another, you must use `PDFDocument.copyPages(...)` to copy the pages before adding or inserting them.")||this}return e(r,t),r}(Error),Gc=function(t){function r(){return t.call(this,"PDFDocument has no pages so `PDFDocument.removePage` cannot be called")||this}return e(r,t),r}(Error),Hc=function(t){function r(e){var r='PDFDocument has no form field with the name "'+e+'"';return t.call(this,r)||this}return e(r,t),r}(Error),_c=function(t){function r(e,r,n){var o,i,a='Expected field "'+e+'" to be of type '+(null==r?void 0:r.name)+", but it is actually of type "+(null!==(i=null===(o=null==n?void 0:n.constructor)||void 0===o?void 0:o.name)&&void 0!==i?i:n);return t.call(this,a)||this}return e(r,t),r}(Error);!function(t){e(function(e){var r='Failed to select check box due to missing onValue: "'+e+'"';return t.call(this,r)||this},t)}(Error);var Xc=function(t){function r(e){var r='A field already exists with the specified name: "'+e+'"';return t.call(this,r)||this}return e(r,t),r}(Error),Zc=function(t){function r(e){var r='Field name contains invalid component: "'+e+'"';return t.call(this,r)||this}return e(r,t),r}(Error);!function(t){e(function(e){var r='A non-terminal field already exists with the specified name: "'+e+'"';return t.call(this,r)||this},t)}(Error);var Yc,Jc=function(t){function r(e){var r="Reading rich text fields is not supported: Attempted to read rich text field: "+e;return t.call(this,r)||this}return e(r,t),r}(Error),Qc=function(t){function r(e,r){var n="Failed to layout combed text as lineLength="+e+" is greater than cellCount="+r;return t.call(this,n)||this}return e(r,t),r}(Error),$c=function(t){function r(e,r,n){var o="Attempted to set text with length="+e+" for TextField with maxLength="+r+" and name="+n;return t.call(this,o)||this}return e(r,t),r}(Error),td=function(t){function r(e,r,n){var o="Attempted to set maxLength="+r+", which is less than "+e+", the length of this field's current value (name="+n+")";return t.call(this,o)||this}return e(r,t),r}(Error);exports.TextAlignment=void 0,(Yc=exports.TextAlignment||(exports.TextAlignment={}))[Yc.Left=0]="Left",Yc[Yc.Center=1]="Center",Yc[Yc.Right=2]="Right";var ed,rd=function(t,e,r,n){void 0===n&&(n=!1);for(var o=4;o<500;){for(var i=0,a=0,s=t.length;a<s;a++){i+=1;for(var l=t[a].split(" "),h=r.width,u=0,c=l.length;u<c;u++){var d=u===c-1?l[u]:l[u]+" ",f=e.widthOfTextAtSize(d,o);(h-=f)<=0&&(i+=1,h=r.width-f)}}if(!n&&i>t.length)return o-1;var p=e.heightAtSize(o);if((p+.2*p)*i>Math.abs(r.height))return o-1;o+=1}return o},nd=function(t){for(var e=t.length;e>0;e--)if(/\s/.test(t[e]))return e},od=function(t,e,r,n){for(var o,i=t.length;i>0;){var a=t.substring(0,i),s=r.encodeText(a),l=r.widthOfTextAtSize(a,n);if(l<e)return{line:a,encoded:s,width:l,remainder:t.substring(i)||void 0};i=null!==(o=nd(a))&&void 0!==o?o:0}return{line:t,encoded:r.encodeText(t),width:r.widthOfTextAtSize(t,n),remainder:void 0}},id=function(t,e){var r=e.alignment,n=e.fontSize,o=e.font,i=e.bounds,a=A(F(t));void 0!==n&&0!==n||(n=rd(a,o,i,!0));for(var s=o.heightAtSize(n),l=s+.2*s,h=[],u=i.x,c=i.y,d=i.x+i.width,f=i.y+i.height,p=i.y+i.height,g=0,v=a.length;g<v;g++)for(var y=a[g];void 0!==y;){var m=od(y,i.width,o,n),b=m.line,w=m.encoded,x=m.width,k=m.remainder,S=r===exports.TextAlignment.Left?i.x:r===exports.TextAlignment.Center?i.x+i.width/2-x/2:r===exports.TextAlignment.Right?i.x+i.width-x:i.x;S<u&&(u=S),(p-=l)<c&&(c=p),S+x>d&&(d=S+x),p+s>f&&(f=p+s),h.push({text:b,encoded:w,width:x,height:s,x:S,y:p}),y=null==k?void 0:k.trim()}return{fontSize:n,lineHeight:l,lines:h,bounds:{x:u,y:c,width:d-u,height:f-c}}},ad=function(t,e){var r=e.fontSize,n=e.font,o=e.bounds,i=e.cellCount,a=T(F(t));if(a.length>i)throw new Qc(a.length,i);void 0!==r&&0!==r||(r=function(t,e,r,n){for(var o=r.width/n,i=r.height,a=4,s=z(t);a<500;){for(var l=0,h=s.length;l<h;l++){var u=s[l];if(e.widthOfTextAtSize(u,a)>.75*o)return a-1}if(e.heightAtSize(a,{descender:!1})>i)return a-1;a+=1}return a}(a,n,o,i));for(var s=o.width/i,l=n.heightAtSize(r,{descender:!1}),h=o.y+(o.height/2-l/2),u=[],c=o.x,d=o.y,f=o.x+o.width,p=o.y+o.height,g=0,v=0;g<i;){var y=P(a,v),m=y[0],b=y[1],w=n.encodeText(m),x=n.widthOfTextAtSize(m,r),k=o.x+(s*g+s/2)-x/2;k<c&&(c=k),h<d&&(d=h),k+x>f&&(f=k+x),h+l>p&&(p=h+l),u.push({text:a,encoded:w,width:x,height:l,x:k,y:h}),g+=1,v+=b}return{fontSize:r,cells:u,bounds:{x:c,y:d,width:f-c,height:p-d}}},sd=function(t,e){var r=e.alignment,n=e.fontSize,o=e.font,i=e.bounds,a=T(F(t));void 0!==n&&0!==n||(n=rd([a],o,i));var s=o.encodeText(a),l=o.widthOfTextAtSize(a,n),h=o.heightAtSize(n,{descender:!1}),u=r===exports.TextAlignment.Left?i.x:r===exports.TextAlignment.Center?i.x+i.width/2-l/2:r===exports.TextAlignment.Right?i.x+i.width-l:i.x,c=i.y+(i.height/2-h/2);return{fontSize:n,line:{text:a,encoded:s,width:l,height:h,x:u,y:c},bounds:{x:u,y:c,width:l,height:h}}},ld=function(t){return"normal"in t?t:{normal:t}},hd=/\/([^\0\t\n\f\r\ ]+)[\0\t\n\f\r\ ]+(\d*\.\d+|\d+)[\0\t\n\f\r\ ]+Tf/,ud=function(t){var e,r,n=null!==(e=t.getDefaultAppearance())&&void 0!==e?e:"",o=null!==(r=B(n,hd).match)&&void 0!==r?r:[],i=Number(o[2]);return isFinite(i)?i:void 0},cd=/(\d*\.\d+|\d+)[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]+(g|rg|k)/,dd=function(t){var e,r=null!==(e=t.getDefaultAppearance())&&void 0!==e?e:"",n=B(r,cd).match,o=null!=n?n:[],i=o[1],a=o[2],s=o[3],l=o[4],h=o[5];return"g"===h&&i?oc(Number(i)):"rg"===h&&i&&a&&s?ic(Number(i),Number(a),Number(s)):"k"===h&&i&&a&&s&&l?ac(Number(i),Number(a),Number(s),Number(l)):void 0},fd=function(t,e,r,n){var o;void 0===n&&(n=0);var i=[uc(e).toString(),Ku(null!==(o=null==r?void 0:r.name)&&void 0!==o?o:"dummy__noop",n).toString()].join("\n");t.setDefaultAppearance(i)},pd=function(t,e){var n,o,a,s=dd(e),l=dd(t.acroField),h=e.getRectangle(),u=e.getAppearanceCharacteristics(),c=e.getBorderStyle(),d=null!==(n=null==c?void 0:c.getWidth())&&void 0!==n?n:0,f=uu(null==u?void 0:u.getRotation()),p=cu(h,f),g=p.width,v=p.height,y=Ec(r(r({},h),{rotation:f})),m=ic(0,0,0),b=null!==(o=dc(null==u?void 0:u.getBorderColor()))&&void 0!==o?o:m,w=dc(null==u?void 0:u.getBackgroundColor()),x=dc(null==u?void 0:u.getBackgroundColor(),.8),k=null!==(a=null!=s?s:l)&&void 0!==a?a:m;fd(s?e:t.acroField,k);var F={x:0+d/2,y:0+d/2,width:g-d,height:v-d,thickness:1.5,borderWidth:d,borderColor:b,markColor:k};return{normal:{on:i(y,jc(r(r({},F),{color:w,filled:!0}))),off:i(y,jc(r(r({},F),{color:w,filled:!1})))},down:{on:i(y,jc(r(r({},F),{color:x,filled:!0}))),off:i(y,jc(r(r({},F),{color:x,filled:!1})))}}},gd=function(t,e){var n,o,a,s=dd(e),l=dd(t.acroField),h=e.getRectangle(),u=e.getAppearanceCharacteristics(),c=e.getBorderStyle(),d=null!==(n=null==c?void 0:c.getWidth())&&void 0!==n?n:0,f=uu(null==u?void 0:u.getRotation()),p=cu(h,f),g=p.width,v=p.height,y=Ec(r(r({},h),{rotation:f})),m=ic(0,0,0),b=null!==(o=dc(null==u?void 0:u.getBorderColor()))&&void 0!==o?o:m,w=dc(null==u?void 0:u.getBackgroundColor()),x=dc(null==u?void 0:u.getBackgroundColor(),.8),k=null!==(a=null!=s?s:l)&&void 0!==a?a:m;fd(s?e:t.acroField,k);var F={x:g/2,y:v/2,width:g-d,height:v-d,borderWidth:d,borderColor:b,dotColor:k};return{normal:{on:i(y,Ic(r(r({},F),{color:w,filled:!0}))),off:i(y,Ic(r(r({},F),{color:w,filled:!1})))},down:{on:i(y,Ic(r(r({},F),{color:x,filled:!0}))),off:i(y,Ic(r(r({},F),{color:x,filled:!1})))}}},vd=function(t,e,n){var o,a,s,l,h,u=dd(e),c=dd(t.acroField),d=ud(e),f=ud(t.acroField),p=e.getRectangle(),g=e.getAppearanceCharacteristics(),v=e.getBorderStyle(),y=null==g?void 0:g.getCaptions(),m=null!==(o=null==y?void 0:y.normal)&&void 0!==o?o:"",b=null!==(s=null!==(a=null==y?void 0:y.down)&&void 0!==a?a:m)&&void 0!==s?s:"",w=null!==(l=null==v?void 0:v.getWidth())&&void 0!==l?l:0,x=uu(null==g?void 0:g.getRotation()),k=cu(p,x),F=k.width,S=k.height,C=Ec(r(r({},p),{rotation:x})),A=ic(0,0,0),T=dc(null==g?void 0:g.getBorderColor()),P=dc(null==g?void 0:g.getBackgroundColor()),z=dc(null==g?void 0:g.getBackgroundColor(),.8),O={x:w,y:w,width:F-2*w,height:S-2*w},D=sd(m,{alignment:exports.TextAlignment.Center,fontSize:null!=d?d:f,font:n,bounds:O}),R=sd(b,{alignment:exports.TextAlignment.Center,fontSize:null!=d?d:f,font:n,bounds:O}),B=Math.min(D.fontSize,R.fontSize),N=null!==(h=null!=u?u:c)&&void 0!==h?h:A;fd(u||void 0!==d?e:t.acroField,N,n,B);var E={x:0+w/2,y:0+w/2,width:F-w,height:S-w,borderWidth:w,borderColor:T,textColor:N,font:n.name,fontSize:B};return{normal:i(C,Mc(r(r({},E),{color:P,textLines:[D.line]}))),down:i(C,Mc(r(r({},E),{color:z,textLines:[R.line]})))}},yd=function(t,e,n){var o,a,s,l,h,u,c=dd(e),d=dd(t.acroField),f=ud(e),p=ud(t.acroField),g=e.getRectangle(),v=e.getAppearanceCharacteristics(),y=e.getBorderStyle(),m=null!==(o=t.getText())&&void 0!==o?o:"",b=null!==(a=null==y?void 0:y.getWidth())&&void 0!==a?a:0,w=uu(null==v?void 0:v.getRotation()),x=cu(g,w),k=x.width,F=x.height,S=Ec(r(r({},g),{rotation:w})),C=ic(0,0,0),A=dc(null==v?void 0:v.getBorderColor()),T=dc(null==v?void 0:v.getBackgroundColor()),P=t.isCombed()?0:1,z={x:b+P,y:b+P,width:k-2*(b+P),height:F-2*(b+P)};if(t.isMultiline())h=(O=id(m,{alignment:t.getAlignment(),fontSize:null!=f?f:p,font:n,bounds:z})).lines,u=O.fontSize;else if(t.isCombed())h=(O=ad(m,{fontSize:null!=f?f:p,font:n,bounds:z,cellCount:null!==(s=t.getMaxLength())&&void 0!==s?s:0})).cells,u=O.fontSize;else{var O;h=[(O=sd(m,{alignment:t.getAlignment(),fontSize:null!=f?f:p,font:n,bounds:z})).line],u=O.fontSize}var D=null!==(l=null!=c?c:d)&&void 0!==l?l:C;fd(c||void 0!==f?e:t.acroField,D,n,u);var R={x:0+b/2,y:0+b/2,width:k-b,height:F-b,borderWidth:null!=b?b:0,borderColor:A,textColor:D,font:n.name,fontSize:u,color:T,textLines:h,padding:P};return i(S,Vc(R))},md=function(t,e,n){var o,a,s,l=dd(e),h=dd(t.acroField),u=ud(e),c=ud(t.acroField),d=e.getRectangle(),f=e.getAppearanceCharacteristics(),p=e.getBorderStyle(),g=null!==(o=t.getSelected()[0])&&void 0!==o?o:"",v=null!==(a=null==p?void 0:p.getWidth())&&void 0!==a?a:0,y=uu(null==f?void 0:f.getRotation()),m=cu(d,y),b=m.width,w=m.height,x=Ec(r(r({},d),{rotation:y})),k=ic(0,0,0),F=dc(null==f?void 0:f.getBorderColor()),S=dc(null==f?void 0:f.getBackgroundColor()),C={x:v+1,y:v+1,width:b-2*(v+1),height:w-2*(v+1)},A=sd(g,{alignment:exports.TextAlignment.Left,fontSize:null!=u?u:c,font:n,bounds:C}),T=A.line,P=A.fontSize,z=null!==(s=null!=l?l:h)&&void 0!==s?s:k;fd(l||void 0!==u?e:t.acroField,z,n,P);var O={x:0+v/2,y:0+v/2,width:b-v,height:w-v,borderWidth:null!=v?v:0,borderColor:F,textColor:z,font:n.name,fontSize:P,color:S,textLines:[T],padding:1};return i(x,Vc(O))},bd=function(t,e,n){var o,a,s=dd(e),l=dd(t.acroField),h=ud(e),u=ud(t.acroField),c=e.getRectangle(),d=e.getAppearanceCharacteristics(),f=e.getBorderStyle(),p=null!==(o=null==f?void 0:f.getWidth())&&void 0!==o?o:0,g=uu(null==d?void 0:d.getRotation()),v=cu(c,g),y=v.width,m=v.height,b=Ec(r(r({},c),{rotation:g})),w=ic(0,0,0),x=dc(null==d?void 0:d.getBorderColor()),k=dc(null==d?void 0:d.getBackgroundColor()),F=t.getOptions(),S=t.getSelected();t.isSorted()&&F.sort();for(var C="",A=0,T=F.length;A<T;A++)C+=F[A],A<T-1&&(C+="\n");var P={x:p+1,y:p+1,width:y-2*(p+1),height:m-2*(p+1)},z=id(C,{alignment:exports.TextAlignment.Left,fontSize:null!=h?h:u,font:n,bounds:P}),O=z.lines,D=z.fontSize,R=z.lineHeight,B=[];for(A=0,T=O.length;A<T;A++){var N=O[A];S.includes(N.text)&&B.push(A)}var E=ic(.6,193/255,218/255),j=null!==(a=null!=s?s:l)&&void 0!==a?a:w;return fd(s||void 0!==h?e:t.acroField,j,n,D),i(b,Wc({x:0+p/2,y:0+p/2,width:y-p,height:m-p,borderWidth:null!=p?p:0,borderColor:x,textColor:j,font:n.name,fontSize:D,color:k,textLines:O,lineHeight:R,selectedColor:E,selectedLines:B,padding:1}))},wd=function(){function t(t,e,r){this.alreadyEmbedded=!1,jr(t,"ref",[[Gi,"PDFRef"]]),jr(e,"doc",[[qd,"PDFDocument"]]),jr(r,"embedder",[[Zl,"PDFPageEmbedder"]]),this.ref=t,this.doc=e,this.width=r.width,this.height=r.height,this.embedder=r}return t.prototype.scale=function(t){return jr(t,"factor",["number"]),{width:this.width*t,height:this.height*t}},t.prototype.size=function(){return this.scale(1)},t.prototype.embed=function(){return n(this,0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return this.alreadyEmbedded?[3,2]:[4,this.embedder.embedIntoContext(this.doc.context,this.ref)];case 1:t.sent(),this.alreadyEmbedded=!0,t.label=2;case 2:return[2]}})})},t.of=function(e,r,n){return new t(e,r,n)},t}(),xd=function(){function t(t,e,r){this.modified=!0,jr(t,"ref",[[Gi,"PDFRef"]]),jr(e,"doc",[[qd,"PDFDocument"]]),jr(r,"embedder",[[ya,"CustomFontEmbedder"],[da,"StandardFontEmbedder"]]),this.ref=t,this.doc=e,this.name=r.fontName,this.embedder=r}return t.prototype.encodeText=function(t){return jr(t,"text",["string"]),this.modified=!0,this.embedder.encodeText(t)},t.prototype.widthOfTextAtSize=function(t,e){return jr(t,"text",["string"]),jr(e,"size",["number"]),this.embedder.widthOfTextAtSize(t,e)},t.prototype.heightAtSize=function(t,e){var r;return jr(t,"size",["number"]),Ir(null==e?void 0:e.descender,"options.descender",["boolean"]),this.embedder.heightOfFontAtSize(t,{descender:null===(r=null==e?void 0:e.descender)||void 0===r||r})},t.prototype.sizeAtHeight=function(t){return jr(t,"height",["number"]),this.embedder.sizeOfFontAtHeight(t)},t.prototype.getCharacterSet=function(){return this.embedder instanceof da?this.embedder.encoding.supportedCodePoints:this.embedder.font.characterSet},t.prototype.embed=function(){return n(this,0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return this.modified?[4,this.embedder.embedIntoContext(this.doc.context,this.ref)]:[3,2];case 1:t.sent(),this.modified=!1,t.label=2;case 2:return[2]}})})},t.of=function(e,r,n){return new t(e,r,n)},t}(),kd=function(){function t(t,e,r){jr(t,"ref",[[Gi,"PDFRef"]]),jr(e,"doc",[[qd,"PDFDocument"]]),jr(r,"embedder",[[Fa,"JpegEmbedder"],[Rl,"PngEmbedder"]]),this.ref=t,this.doc=e,this.width=r.width,this.height=r.height,this.embedder=r}return t.prototype.scale=function(t){return jr(t,"factor",["number"]),{width:this.width*t,height:this.height*t}},t.prototype.scaleToFit=function(t,e){jr(t,"width",["number"]),jr(e,"height",["number"]);var r=t/this.width,n=e/this.height,o=Math.min(r,n);return this.scale(o)},t.prototype.size=function(){return this.scale(1)},t.prototype.embed=function(){return n(this,0,void 0,function(){var t,e,r;return o(this,function(n){switch(n.label){case 0:return this.embedder?(this.embedTask||(e=(t=this).doc,r=t.ref,this.embedTask=this.embedder.embedIntoContext(e.context,r)),[4,this.embedTask]):[2];case 1:return n.sent(),this.embedder=void 0,[2]}})})},t.of=function(e,r,n){return new t(e,r,n)},t}();exports.ImageAlignment=void 0,(ed=exports.ImageAlignment||(exports.ImageAlignment={}))[ed.Left=0]="Left",ed[ed.Center=1]="Center",ed[ed.Right=2]="Right";var Fd,Sd=function(t){Ir(null==t?void 0:t.x,"options.x",["number"]),Ir(null==t?void 0:t.y,"options.y",["number"]),Ir(null==t?void 0:t.width,"options.width",["number"]),Ir(null==t?void 0:t.height,"options.height",["number"]),Ir(null==t?void 0:t.textColor,"options.textColor",[[Object,"Color"]]),Ir(null==t?void 0:t.backgroundColor,"options.backgroundColor",[[Object,"Color"]]),Ir(null==t?void 0:t.borderColor,"options.borderColor",[[Object,"Color"]]),Ir(null==t?void 0:t.borderWidth,"options.borderWidth",["number"]),Ir(null==t?void 0:t.rotate,"options.rotate",[[Object,"Rotation"]])},Cd=function(){function t(t,e,r){jr(t,"acroField",[[lh,"PDFAcroTerminal"]]),jr(e,"ref",[[Gi,"PDFRef"]]),jr(r,"doc",[[qd,"PDFDocument"]]),this.acroField=t,this.ref=e,this.doc=r}return t.prototype.getName=function(){var t;return null!==(t=this.acroField.getFullyQualifiedName())&&void 0!==t?t:""},t.prototype.isReadOnly=function(){return this.acroField.hasFlag(exports.AcroFieldFlags.ReadOnly)},t.prototype.enableReadOnly=function(){this.acroField.setFlagTo(exports.AcroFieldFlags.ReadOnly,!0)},t.prototype.disableReadOnly=function(){this.acroField.setFlagTo(exports.AcroFieldFlags.ReadOnly,!1)},t.prototype.isRequired=function(){return this.acroField.hasFlag(exports.AcroFieldFlags.Required)},t.prototype.enableRequired=function(){this.acroField.setFlagTo(exports.AcroFieldFlags.Required,!0)},t.prototype.disableRequired=function(){this.acroField.setFlagTo(exports.AcroFieldFlags.Required,!1)},t.prototype.isExported=function(){return!this.acroField.hasFlag(exports.AcroFieldFlags.NoExport)},t.prototype.enableExporting=function(){this.acroField.setFlagTo(exports.AcroFieldFlags.NoExport,!1)},t.prototype.disableExporting=function(){this.acroField.setFlagTo(exports.AcroFieldFlags.NoExport,!0)},t.prototype.needsAppearancesUpdate=function(){throw new Zr(this.constructor.name,"needsAppearancesUpdate")},t.prototype.defaultUpdateAppearances=function(t){throw new Zr(this.constructor.name,"defaultUpdateAppearances")},t.prototype.markAsDirty=function(){this.doc.getForm().markFieldAsDirty(this.ref)},t.prototype.markAsClean=function(){this.doc.getForm().markFieldAsClean(this.ref)},t.prototype.isDirty=function(){return this.doc.getForm().fieldIsDirty(this.ref)},t.prototype.createWidget=function(t){var e,r=t.textColor,n=t.backgroundColor,o=t.borderColor,i=t.borderWidth,a=hu(t.rotate),s=t.caption,l=t.x,h=t.y,u=t.width+i,c=t.height+i,d=Boolean(t.hidden),f=t.page;Wr(a,"degreesAngle",90);var p=sh.create(this.doc.context,this.ref),g=du({x:l,y:h,width:u,height:c},i,a);p.setRectangle(g),f&&p.setP(f);var v=p.getOrCreateAppearanceCharacteristics();n&&v.setBackgroundColor(fc(n)),v.setRotation(a),s&&v.setCaptions({normal:s}),o&&v.setBorderColor(fc(o));var y=p.getOrCreateBorderStyle();if(void 0!==i&&y.setWidth(i),p.setFlagTo(exports.AnnotationFlags.Print,!0),p.setFlagTo(exports.AnnotationFlags.Hidden,d),p.setFlagTo(exports.AnnotationFlags.Invisible,!1),r){var m=(null!==(e=this.acroField.getDefaultAppearance())&&void 0!==e?e:"")+"\n"+uc(r).toString();this.acroField.setDefaultAppearance(m)}return p},t.prototype.updateWidgetAppearanceWithFont=function(t,e,r){var n=r.normal,o=r.rollover,i=r.down;this.updateWidgetAppearances(t,{normal:this.createAppearanceStream(t,n,e),rollover:o&&this.createAppearanceStream(t,o,e),down:i&&this.createAppearanceStream(t,i,e)})},t.prototype.updateOnOffWidgetAppearance=function(t,e,r){var n=r.normal,o=r.rollover,i=r.down;this.updateWidgetAppearances(t,{normal:this.createAppearanceDict(t,n,e),rollover:o&&this.createAppearanceDict(t,o,e),down:i&&this.createAppearanceDict(t,i,e)})},t.prototype.updateWidgetAppearances=function(t,e){var r=e.normal,n=e.rollover,o=e.down;t.setNormalAppearance(r),n?t.setRolloverAppearance(n):t.removeRolloverAppearance(),o?t.setDownAppearance(o):t.removeDownAppearance()},t.prototype.createAppearanceStream=function(t,e,r){var n,o=this.acroField.dict.context,i=t.getRectangle(),a=i.width,s=i.height,l=r&&{Font:(n={},n[r.name]=r.ref,n)},h=o.formXObject(e,{Resources:l,BBox:o.obj([0,0,a,s]),Matrix:o.obj([1,0,0,1,0,0])});return o.register(h)},t.prototype.createImageAppearanceStream=function(t,e,n){var o,a,s=this.acroField.dict.context,l=t.getRectangle(),h=t.getAppearanceCharacteristics(),u=t.getBorderStyle(),c=null!==(a=null==u?void 0:u.getWidth())&&void 0!==a?a:0,d=uu(null==h?void 0:h.getRotation()),f=Ec(r(r({},l),{rotation:d})),p=cu(l,d),g=e.scaleToFit(p.width-2*c,p.height-2*c),v={x:c,y:c,width:g.width,height:g.height,rotate:nu(0),xSkew:nu(0),ySkew:nu(0)};n===exports.ImageAlignment.Center?(v.x+=(p.width-2*c)/2-g.width/2,v.y+=(p.height-2*c)/2-g.height/2):n===exports.ImageAlignment.Right&&(v.x=p.width-c-g.width,v.y=p.height-c-g.height);var y=this.doc.context.addRandomSuffix("Image",10),m=i(f,Ac(y,v)),b={XObject:(o={},o[y]=e.ref,o)},w=s.formXObject(m,{Resources:b,BBox:s.obj([0,0,l.width,l.height]),Matrix:s.obj([1,0,0,1,0,0])});return s.register(w)},t.prototype.createAppearanceDict=function(t,e,r){var n=this.acroField.dict.context,o=this.createAppearanceStream(t,e.on),i=this.createAppearanceStream(t,e.off),a=n.obj({});return a.set(r,o),a.set(Mi.of("Off"),i),a},t}(),Ad=function(t){function r(e,r,n){var o=t.call(this,e,r,n)||this;return jr(e,"acroCheckBox",[[uh,"PDFAcroCheckBox"]]),o.acroField=e,o}return e(r,t),r.prototype.check=function(){var t,e=null!==(t=this.acroField.getOnValue())&&void 0!==t?t:Mi.of("Yes");this.markAsDirty(),this.acroField.setValue(e)},r.prototype.uncheck=function(){this.markAsDirty(),this.acroField.setValue(Mi.of("Off"))},r.prototype.isChecked=function(){var t=this.acroField.getOnValue();return!!t&&t===this.acroField.getValue()},r.prototype.addToPage=function(t,e){var r,n,o,i,a,s;jr(t,"page",[[Kd,"PDFPage"]]),Sd(e),e||(e={}),"textColor"in e||(e.textColor=ic(0,0,0)),"backgroundColor"in e||(e.backgroundColor=ic(1,1,1)),"borderColor"in e||(e.borderColor=ic(0,0,0)),"borderWidth"in e||(e.borderWidth=1);var l=this.createWidget({x:null!==(r=e.x)&&void 0!==r?r:0,y:null!==(n=e.y)&&void 0!==n?n:0,width:null!==(o=e.width)&&void 0!==o?o:50,height:null!==(i=e.height)&&void 0!==i?i:50,textColor:e.textColor,backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:null!==(a=e.borderWidth)&&void 0!==a?a:0,rotate:null!==(s=e.rotate)&&void 0!==s?s:nu(0),hidden:e.hidden,page:t.ref}),h=this.doc.context.register(l.dict);this.acroField.addWidget(h),l.setAppearanceState(Mi.of("Off")),this.updateWidgetAppearance(l,Mi.of("Yes")),t.node.addAnnot(h)},r.prototype.needsAppearancesUpdate=function(){for(var t,e=this.acroField.getWidgets(),r=0,n=e.length;r<n;r++){var o=e[r],i=o.getAppearanceState(),a=null===(t=o.getAppearances())||void 0===t?void 0:t.normal;if(!(a instanceof Vi))return!0;if(i&&!a.has(i))return!0}return!1},r.prototype.defaultUpdateAppearances=function(){this.updateAppearances()},r.prototype.updateAppearances=function(t){var e;Ir(t,"provider",[Function]);for(var r=this.acroField.getWidgets(),n=0,o=r.length;n<o;n++){var i=r[n],a=null!==(e=i.getOnValue())&&void 0!==e?e:Mi.of("Yes");a&&this.updateWidgetAppearance(i,a,t)}this.markAsClean()},r.prototype.updateWidgetAppearance=function(t,e,r){var n=ld((null!=r?r:pd)(this,t));this.updateOnOffWidgetAppearance(t,e,n)},r.of=function(t,e,n){return new r(t,e,n)},r}(Cd),Td=function(t){function r(e,r,n){var o=t.call(this,e,r,n)||this;return jr(e,"acroComboBox",[[fh,"PDFAcroComboBox"]]),o.acroField=e,o}return e(r,t),r.prototype.getOptions=function(){for(var t=this.acroField.getOptions(),e=new Array(t.length),r=0,n=e.length;r<n;r++){var o=t[r],i=o.display,a=o.value;e[r]=(null!=i?i:a).decodeText()}return e},r.prototype.getSelected=function(){for(var t=this.acroField.getValues(),e=new Array(t.length),r=0,n=t.length;r<n;r++)e[r]=t[r].decodeText();return e},r.prototype.setOptions=function(t){jr(t,"options",[Array]);for(var e=new Array(t.length),r=0,n=t.length;r<n;r++)e[r]={value:ca.fromText(t[r])};this.acroField.setOptions(e)},r.prototype.addOptions=function(t){jr(t,"options",["string",Array]);for(var e=Array.isArray(t)?t:[t],r=this.acroField.getOptions(),n=new Array(e.length),o=0,i=e.length;o<i;o++)n[o]={value:ca.fromText(e[o])};this.acroField.setOptions(r.concat(n))},r.prototype.select=function(t,e){void 0===e&&(e=!1),jr(t,"options",["string",Array]),jr(e,"merge",["boolean"]);var r=Array.isArray(t)?t:[t],n=this.getOptions();r.find(function(t){return!n.includes(t)})&&this.enableEditing(),this.markAsDirty(),(r.length>1||1===r.length&&e)&&this.enableMultiselect();for(var o=new Array(r.length),i=0,a=r.length;i<a;i++)o[i]=ca.fromText(r[i]);if(e){var s=this.acroField.getValues();this.acroField.setValues(s.concat(o))}else this.acroField.setValues(o)},r.prototype.clear=function(){this.markAsDirty(),this.acroField.setValues([])},r.prototype.setFontSize=function(t){Lr(t,"fontSize"),this.acroField.setFontSize(t),this.markAsDirty()},r.prototype.isEditable=function(){return this.acroField.hasFlag(exports.AcroChoiceFlags.Edit)},r.prototype.enableEditing=function(){this.acroField.setFlagTo(exports.AcroChoiceFlags.Edit,!0)},r.prototype.disableEditing=function(){this.acroField.setFlagTo(exports.AcroChoiceFlags.Edit,!1)},r.prototype.isSorted=function(){return this.acroField.hasFlag(exports.AcroChoiceFlags.Sort)},r.prototype.enableSorting=function(){this.acroField.setFlagTo(exports.AcroChoiceFlags.Sort,!0)},r.prototype.disableSorting=function(){this.acroField.setFlagTo(exports.AcroChoiceFlags.Sort,!1)},r.prototype.isMultiselect=function(){return this.acroField.hasFlag(exports.AcroChoiceFlags.MultiSelect)},r.prototype.enableMultiselect=function(){this.acroField.setFlagTo(exports.AcroChoiceFlags.MultiSelect,!0)},r.prototype.disableMultiselect=function(){this.acroField.setFlagTo(exports.AcroChoiceFlags.MultiSelect,!1)},r.prototype.isSpellChecked=function(){return!this.acroField.hasFlag(exports.AcroChoiceFlags.DoNotSpellCheck)},r.prototype.enableSpellChecking=function(){this.acroField.setFlagTo(exports.AcroChoiceFlags.DoNotSpellCheck,!1)},r.prototype.disableSpellChecking=function(){this.acroField.setFlagTo(exports.AcroChoiceFlags.DoNotSpellCheck,!0)},r.prototype.isSelectOnClick=function(){return this.acroField.hasFlag(exports.AcroChoiceFlags.CommitOnSelChange)},r.prototype.enableSelectOnClick=function(){this.acroField.setFlagTo(exports.AcroChoiceFlags.CommitOnSelChange,!0)},r.prototype.disableSelectOnClick=function(){this.acroField.setFlagTo(exports.AcroChoiceFlags.CommitOnSelChange,!1)},r.prototype.addToPage=function(t,e){var r,n,o,i,a,s,l;jr(t,"page",[[Kd,"PDFPage"]]),Sd(e),e||(e={}),"textColor"in e||(e.textColor=ic(0,0,0)),"backgroundColor"in e||(e.backgroundColor=ic(1,1,1)),"borderColor"in e||(e.borderColor=ic(0,0,0)),"borderWidth"in e||(e.borderWidth=1);var h=this.createWidget({x:null!==(r=e.x)&&void 0!==r?r:0,y:null!==(n=e.y)&&void 0!==n?n:0,width:null!==(o=e.width)&&void 0!==o?o:200,height:null!==(i=e.height)&&void 0!==i?i:50,textColor:e.textColor,backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:null!==(a=e.borderWidth)&&void 0!==a?a:0,rotate:null!==(s=e.rotate)&&void 0!==s?s:nu(0),hidden:e.hidden,page:t.ref}),u=this.doc.context.register(h.dict);this.acroField.addWidget(u);var c=null!==(l=e.font)&&void 0!==l?l:this.doc.getForm().getDefaultFont();this.updateWidgetAppearance(h,c),t.node.addAnnot(u)},r.prototype.needsAppearancesUpdate=function(){var t;if(this.isDirty())return!0;for(var e=this.acroField.getWidgets(),r=0,n=e.length;r<n;r++)if(!((null===(t=e[r].getAppearances())||void 0===t?void 0:t.normal)instanceof Wi))return!0;return!1},r.prototype.defaultUpdateAppearances=function(t){jr(t,"font",[[xd,"PDFFont"]]),this.updateAppearances(t)},r.prototype.updateAppearances=function(t,e){jr(t,"font",[[xd,"PDFFont"]]),Ir(e,"provider",[Function]);for(var r=this.acroField.getWidgets(),n=0,o=r.length;n<o;n++){var i=r[n];this.updateWidgetAppearance(i,t,e)}this.markAsClean()},r.prototype.updateWidgetAppearance=function(t,e,r){var n=ld((null!=r?r:md)(this,t,e));this.updateWidgetAppearanceWithFont(t,e,n)},r.of=function(t,e,n){return new r(t,e,n)},r}(Cd),Pd=function(t){function r(e,r,n){var o=t.call(this,e,r,n)||this;return jr(e,"acroListBox",[[bh,"PDFAcroListBox"]]),o.acroField=e,o}return e(r,t),r.prototype.getOptions=function(){for(var t=this.acroField.getOptions(),e=new Array(t.length),r=0,n=e.length;r<n;r++){var o=t[r],i=o.display,a=o.value;e[r]=(null!=i?i:a).decodeText()}return e},r.prototype.getSelected=function(){for(var t=this.acroField.getValues(),e=new Array(t.length),r=0,n=t.length;r<n;r++)e[r]=t[r].decodeText();return e},r.prototype.setOptions=function(t){jr(t,"options",[Array]),this.markAsDirty();for(var e=new Array(t.length),r=0,n=t.length;r<n;r++)e[r]={value:ca.fromText(t[r])};this.acroField.setOptions(e)},r.prototype.addOptions=function(t){jr(t,"options",["string",Array]),this.markAsDirty();for(var e=Array.isArray(t)?t:[t],r=this.acroField.getOptions(),n=new Array(e.length),o=0,i=e.length;o<i;o++)n[o]={value:ca.fromText(e[o])};this.acroField.setOptions(r.concat(n))},r.prototype.select=function(t,e){void 0===e&&(e=!1),jr(t,"options",["string",Array]),jr(e,"merge",["boolean"]);var r=Array.isArray(t)?t:[t],n=this.getOptions();Rr(r,"option",n),this.markAsDirty(),(r.length>1||1===r.length&&e)&&this.enableMultiselect();for(var o=new Array(r.length),i=0,a=r.length;i<a;i++)o[i]=ca.fromText(r[i]);if(e){var s=this.acroField.getValues();this.acroField.setValues(s.concat(o))}else this.acroField.setValues(o)},r.prototype.clear=function(){this.markAsDirty(),this.acroField.setValues([])},r.prototype.setFontSize=function(t){Lr(t,"fontSize"),this.acroField.setFontSize(t),this.markAsDirty()},r.prototype.isSorted=function(){return this.acroField.hasFlag(exports.AcroChoiceFlags.Sort)},r.prototype.enableSorting=function(){this.acroField.setFlagTo(exports.AcroChoiceFlags.Sort,!0)},r.prototype.disableSorting=function(){this.acroField.setFlagTo(exports.AcroChoiceFlags.Sort,!1)},r.prototype.isMultiselect=function(){return this.acroField.hasFlag(exports.AcroChoiceFlags.MultiSelect)},r.prototype.enableMultiselect=function(){this.acroField.setFlagTo(exports.AcroChoiceFlags.MultiSelect,!0)},r.prototype.disableMultiselect=function(){this.acroField.setFlagTo(exports.AcroChoiceFlags.MultiSelect,!1)},r.prototype.isSelectOnClick=function(){return this.acroField.hasFlag(exports.AcroChoiceFlags.CommitOnSelChange)},r.prototype.enableSelectOnClick=function(){this.acroField.setFlagTo(exports.AcroChoiceFlags.CommitOnSelChange,!0)},r.prototype.disableSelectOnClick=function(){this.acroField.setFlagTo(exports.AcroChoiceFlags.CommitOnSelChange,!1)},r.prototype.addToPage=function(t,e){var r,n,o,i,a,s,l;jr(t,"page",[[Kd,"PDFPage"]]),Sd(e),e||(e={}),"textColor"in e||(e.textColor=ic(0,0,0)),"backgroundColor"in e||(e.backgroundColor=ic(1,1,1)),"borderColor"in e||(e.borderColor=ic(0,0,0)),"borderWidth"in e||(e.borderWidth=1);var h=this.createWidget({x:null!==(r=e.x)&&void 0!==r?r:0,y:null!==(n=e.y)&&void 0!==n?n:0,width:null!==(o=e.width)&&void 0!==o?o:200,height:null!==(i=e.height)&&void 0!==i?i:100,textColor:e.textColor,backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:null!==(a=e.borderWidth)&&void 0!==a?a:0,rotate:null!==(s=e.rotate)&&void 0!==s?s:nu(0),hidden:e.hidden,page:t.ref}),u=this.doc.context.register(h.dict);this.acroField.addWidget(u);var c=null!==(l=e.font)&&void 0!==l?l:this.doc.getForm().getDefaultFont();this.updateWidgetAppearance(h,c),t.node.addAnnot(u)},r.prototype.needsAppearancesUpdate=function(){var t;if(this.isDirty())return!0;for(var e=this.acroField.getWidgets(),r=0,n=e.length;r<n;r++)if(!((null===(t=e[r].getAppearances())||void 0===t?void 0:t.normal)instanceof Wi))return!0;return!1},r.prototype.defaultUpdateAppearances=function(t){jr(t,"font",[[xd,"PDFFont"]]),this.updateAppearances(t)},r.prototype.updateAppearances=function(t,e){jr(t,"font",[[xd,"PDFFont"]]),Ir(e,"provider",[Function]);for(var r=this.acroField.getWidgets(),n=0,o=r.length;n<o;n++){var i=r[n];this.updateWidgetAppearance(i,t,e)}this.markAsClean()},r.prototype.updateWidgetAppearance=function(t,e,r){var n=ld((null!=r?r:bd)(this,t,e));this.updateWidgetAppearanceWithFont(t,e,n)},r.of=function(t,e,n){return new r(t,e,n)},r}(Cd),zd=function(t){function r(e,r,n){var o=t.call(this,e,r,n)||this;return jr(e,"acroRadioButton",[[mh,"PDFAcroRadioButton"]]),o.acroField=e,o}return e(r,t),r.prototype.getOptions=function(){var t=this.acroField.getExportValues();if(t){for(var e=new Array(t.length),r=0,n=t.length;r<n;r++)e[r]=t[r].decodeText();return e}var o=this.acroField.getOnValues(),i=new Array(o.length);for(r=0,n=i.length;r<n;r++)i[r]=o[r].decodeText();return i},r.prototype.getSelected=function(){var t=this.acroField.getValue();if(t!==Mi.of("Off")){var e=this.acroField.getExportValues();if(e)for(var r=this.acroField.getOnValues(),n=0,o=r.length;n<o;n++)if(r[n]===t)return e[n].decodeText();return t.decodeText()}},r.prototype.select=function(t){jr(t,"option",["string"]);var e=this.getOptions();Or(t,"option",e),this.markAsDirty();var r=this.acroField.getOnValues(),n=this.acroField.getExportValues();if(n)for(var o=0,i=n.length;o<i;o++)n[o].decodeText()===t&&this.acroField.setValue(r[o]);else for(o=0,i=r.length;o<i;o++){var a=r[o];a.decodeText()===t&&this.acroField.setValue(a)}},r.prototype.clear=function(){this.markAsDirty(),this.acroField.setValue(Mi.of("Off"))},r.prototype.isOffToggleable=function(){return!this.acroField.hasFlag(exports.AcroButtonFlags.NoToggleToOff)},r.prototype.enableOffToggling=function(){this.acroField.setFlagTo(exports.AcroButtonFlags.NoToggleToOff,!1)},r.prototype.disableOffToggling=function(){this.acroField.setFlagTo(exports.AcroButtonFlags.NoToggleToOff,!0)},r.prototype.isMutuallyExclusive=function(){return!this.acroField.hasFlag(exports.AcroButtonFlags.RadiosInUnison)},r.prototype.enableMutualExclusion=function(){this.acroField.setFlagTo(exports.AcroButtonFlags.RadiosInUnison,!1)},r.prototype.disableMutualExclusion=function(){this.acroField.setFlagTo(exports.AcroButtonFlags.RadiosInUnison,!0)},r.prototype.addOptionToPage=function(t,e,r){var n,o,i,a,s,l,h,u,c;jr(t,"option",["string"]),jr(e,"page",[[Kd,"PDFPage"]]),Sd(r);var d=this.createWidget({x:null!==(n=null==r?void 0:r.x)&&void 0!==n?n:0,y:null!==(o=null==r?void 0:r.y)&&void 0!==o?o:0,width:null!==(i=null==r?void 0:r.width)&&void 0!==i?i:50,height:null!==(a=null==r?void 0:r.height)&&void 0!==a?a:50,textColor:null!==(s=null==r?void 0:r.textColor)&&void 0!==s?s:ic(0,0,0),backgroundColor:null!==(l=null==r?void 0:r.backgroundColor)&&void 0!==l?l:ic(1,1,1),borderColor:null!==(h=null==r?void 0:r.borderColor)&&void 0!==h?h:ic(0,0,0),borderWidth:null!==(u=null==r?void 0:r.borderWidth)&&void 0!==u?u:1,rotate:null!==(c=null==r?void 0:r.rotate)&&void 0!==c?c:nu(0),hidden:null==r?void 0:r.hidden,page:e.ref}),f=this.doc.context.register(d.dict),p=this.acroField.addWidgetWithOpt(f,ca.fromText(t),!this.isMutuallyExclusive());d.setAppearanceState(Mi.of("Off")),this.updateWidgetAppearance(d,p),e.node.addAnnot(f)},r.prototype.needsAppearancesUpdate=function(){for(var t,e=this.acroField.getWidgets(),r=0,n=e.length;r<n;r++){var o=e[r],i=o.getAppearanceState(),a=null===(t=o.getAppearances())||void 0===t?void 0:t.normal;if(!(a instanceof Vi))return!0;if(i&&!a.has(i))return!0}return!1},r.prototype.defaultUpdateAppearances=function(){this.updateAppearances()},r.prototype.updateAppearances=function(t){Ir(t,"provider",[Function]);for(var e=this.acroField.getWidgets(),r=0,n=e.length;r<n;r++){var o=e[r],i=o.getOnValue();i&&this.updateWidgetAppearance(o,i,t)}},r.prototype.updateWidgetAppearance=function(t,e,r){var n=ld((null!=r?r:gd)(this,t));this.updateOnOffWidgetAppearance(t,e,n)},r.of=function(t,e,n){return new r(t,e,n)},r}(Cd),Od=function(t){function r(e,r,n){var o=t.call(this,e,r,n)||this;return jr(e,"acroSignature",[[gh,"PDFAcroSignature"]]),o.acroField=e,o}return e(r,t),r.prototype.needsAppearancesUpdate=function(){return!1},r.of=function(t,e,n){return new r(t,e,n)},r}(Cd),Dd=function(t){function r(e,r,n){var o=t.call(this,e,r,n)||this;return jr(e,"acroText",[[vh,"PDFAcroText"]]),o.acroField=e,o}return e(r,t),r.prototype.getText=function(){var t=this.acroField.getValue();if(!t&&this.isRichFormatted())throw new Jc(this.getName());return null==t?void 0:t.decodeText()},r.prototype.setText=function(t){Ir(t,"text",["string"]);var e=this.getMaxLength();if(void 0!==e&&t&&t.length>e)throw new $c(t.length,e,this.getName());this.markAsDirty(),this.disableRichFormatting(),t?this.acroField.setValue(ca.fromText(t)):this.acroField.removeValue()},r.prototype.getAlignment=function(){var t=this.acroField.getQuadding();return 0===t?exports.TextAlignment.Left:1===t?exports.TextAlignment.Center:2===t?exports.TextAlignment.Right:exports.TextAlignment.Left},r.prototype.setAlignment=function(t){Or(t,"alignment",exports.TextAlignment),this.markAsDirty(),this.acroField.setQuadding(t)},r.prototype.getMaxLength=function(){return this.acroField.getMaxLength()},r.prototype.setMaxLength=function(t){if(Vr(t,"maxLength",0,Number.MAX_SAFE_INTEGER),this.markAsDirty(),void 0===t)this.acroField.removeMaxLength();else{var e=this.getText();if(e&&e.length>t)throw new td(e.length,t,this.getName());this.acroField.setMaxLength(t)}},r.prototype.removeMaxLength=function(){this.markAsDirty(),this.acroField.removeMaxLength()},r.prototype.setImage=function(t){for(var e=this.getAlignment(),r=e===exports.TextAlignment.Center?exports.ImageAlignment.Center:e===exports.TextAlignment.Right?exports.ImageAlignment.Right:exports.ImageAlignment.Left,n=this.acroField.getWidgets(),o=0,i=n.length;o<i;o++){var a=n[o],s=this.createImageAppearanceStream(a,t,r);this.updateWidgetAppearances(a,{normal:s})}this.markAsClean()},r.prototype.setFontSize=function(t){Lr(t,"fontSize"),this.acroField.setFontSize(t),this.markAsDirty()},r.prototype.isMultiline=function(){return this.acroField.hasFlag(exports.AcroTextFlags.Multiline)},r.prototype.enableMultiline=function(){this.markAsDirty(),this.acroField.setFlagTo(exports.AcroTextFlags.Multiline,!0)},r.prototype.disableMultiline=function(){this.markAsDirty(),this.acroField.setFlagTo(exports.AcroTextFlags.Multiline,!1)},r.prototype.isPassword=function(){return this.acroField.hasFlag(exports.AcroTextFlags.Password)},r.prototype.enablePassword=function(){this.acroField.setFlagTo(exports.AcroTextFlags.Password,!0)},r.prototype.disablePassword=function(){this.acroField.setFlagTo(exports.AcroTextFlags.Password,!1)},r.prototype.isFileSelector=function(){return this.acroField.hasFlag(exports.AcroTextFlags.FileSelect)},r.prototype.enableFileSelection=function(){this.acroField.setFlagTo(exports.AcroTextFlags.FileSelect,!0)},r.prototype.disableFileSelection=function(){this.acroField.setFlagTo(exports.AcroTextFlags.FileSelect,!1)},r.prototype.isSpellChecked=function(){return!this.acroField.hasFlag(exports.AcroTextFlags.DoNotSpellCheck)},r.prototype.enableSpellChecking=function(){this.acroField.setFlagTo(exports.AcroTextFlags.DoNotSpellCheck,!1)},r.prototype.disableSpellChecking=function(){this.acroField.setFlagTo(exports.AcroTextFlags.DoNotSpellCheck,!0)},r.prototype.isScrollable=function(){return!this.acroField.hasFlag(exports.AcroTextFlags.DoNotScroll)},r.prototype.enableScrolling=function(){this.acroField.setFlagTo(exports.AcroTextFlags.DoNotScroll,!1)},r.prototype.disableScrolling=function(){this.acroField.setFlagTo(exports.AcroTextFlags.DoNotScroll,!0)},r.prototype.isCombed=function(){return this.acroField.hasFlag(exports.AcroTextFlags.Comb)&&!this.isMultiline()&&!this.isPassword()&&!this.isFileSelector()&&void 0!==this.getMaxLength()},r.prototype.enableCombing=function(){void 0===this.getMaxLength()&&console.warn("PDFTextFields must have a max length in order to be combed"),this.markAsDirty(),this.disableMultiline(),this.disablePassword(),this.disableFileSelection(),this.acroField.setFlagTo(exports.AcroTextFlags.Comb,!0)},r.prototype.disableCombing=function(){this.markAsDirty(),this.acroField.setFlagTo(exports.AcroTextFlags.Comb,!1)},r.prototype.isRichFormatted=function(){return this.acroField.hasFlag(exports.AcroTextFlags.RichText)},r.prototype.enableRichFormatting=function(){this.acroField.setFlagTo(exports.AcroTextFlags.RichText,!0)},r.prototype.disableRichFormatting=function(){this.acroField.setFlagTo(exports.AcroTextFlags.RichText,!1)},r.prototype.addToPage=function(t,e){var r,n,o,i,a,s,l;jr(t,"page",[[Kd,"PDFPage"]]),Sd(e),e||(e={}),"textColor"in e||(e.textColor=ic(0,0,0)),"backgroundColor"in e||(e.backgroundColor=ic(1,1,1)),"borderColor"in e||(e.borderColor=ic(0,0,0)),"borderWidth"in e||(e.borderWidth=1);var h=this.createWidget({x:null!==(r=e.x)&&void 0!==r?r:0,y:null!==(n=e.y)&&void 0!==n?n:0,width:null!==(o=e.width)&&void 0!==o?o:200,height:null!==(i=e.height)&&void 0!==i?i:50,textColor:e.textColor,backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:null!==(a=e.borderWidth)&&void 0!==a?a:0,rotate:null!==(s=e.rotate)&&void 0!==s?s:nu(0),hidden:e.hidden,page:t.ref}),u=this.doc.context.register(h.dict);this.acroField.addWidget(u);var c=null!==(l=e.font)&&void 0!==l?l:this.doc.getForm().getDefaultFont();this.updateWidgetAppearance(h,c),t.node.addAnnot(u)},r.prototype.needsAppearancesUpdate=function(){var t;if(this.isDirty())return!0;for(var e=this.acroField.getWidgets(),r=0,n=e.length;r<n;r++)if(!((null===(t=e[r].getAppearances())||void 0===t?void 0:t.normal)instanceof Wi))return!0;return!1},r.prototype.defaultUpdateAppearances=function(t){jr(t,"font",[[xd,"PDFFont"]]),this.updateAppearances(t)},r.prototype.updateAppearances=function(t,e){jr(t,"font",[[xd,"PDFFont"]]),Ir(e,"provider",[Function]);for(var r=this.acroField.getWidgets(),n=0,o=r.length;n<o;n++){var i=r[n];this.updateWidgetAppearance(i,t,e)}this.markAsClean()},r.prototype.updateWidgetAppearance=function(t,e,r){var n=ld((null!=r?r:yd)(this,t,e));this.updateWidgetAppearanceWithFont(t,e,n)},r.of=function(t,e,n){return new r(t,e,n)},r}(Cd);exports.StandardFonts=void 0,(Fd=exports.StandardFonts||(exports.StandardFonts={})).Courier="Courier",Fd.CourierBold="Courier-Bold",Fd.CourierOblique="Courier-Oblique",Fd.CourierBoldOblique="Courier-BoldOblique",Fd.Helvetica="Helvetica",Fd.HelveticaBold="Helvetica-Bold",Fd.HelveticaOblique="Helvetica-Oblique",Fd.HelveticaBoldOblique="Helvetica-BoldOblique",Fd.TimesRoman="Times-Roman",Fd.TimesRomanBold="Times-Bold",Fd.TimesRomanItalic="Times-Italic",Fd.TimesRomanBoldItalic="Times-BoldItalic",Fd.Symbol="Symbol",Fd.ZapfDingbats="ZapfDingbats";var Rd,Bd=function(){function t(t,e){var r=this;this.embedDefaultFont=function(){return r.doc.embedStandardFont(exports.StandardFonts.Helvetica)},jr(t,"acroForm",[[zh,"PDFAcroForm"]]),jr(e,"doc",[[qd,"PDFDocument"]]),this.acroForm=t,this.doc=e,this.dirtyFields=new Set,this.defaultFontCache=Xr.populatedBy(this.embedDefaultFont)}return t.prototype.hasXFA=function(){return this.acroForm.dict.has(Mi.of("XFA"))},t.prototype.deleteXFA=function(){this.acroForm.dict.delete(Mi.of("XFA"))},t.prototype.getFields=function(){for(var t=this.acroForm.getAllFields(),e=[],r=0,n=t.length;r<n;r++){var o=t[r],i=o[0],a=o[1],s=Nd(i,a,this.doc);s&&e.push(s)}return e},t.prototype.getFieldMaybe=function(t){jr(t,"name",["string"]);for(var e=this.getFields(),r=0,n=e.length;r<n;r++){var o=e[r];if(o.getName()===t)return o}},t.prototype.getField=function(t){jr(t,"name",["string"]);var e=this.getFieldMaybe(t);if(e)return e;throw new Hc(t)},t.prototype.getButton=function(t){jr(t,"name",["string"]);var e=this.getField(t);if(e instanceof Gd)return e;throw new _c(t,Gd,e)},t.prototype.getCheckBox=function(t){jr(t,"name",["string"]);var e=this.getField(t);if(e instanceof Ad)return e;throw new _c(t,Ad,e)},t.prototype.getDropdown=function(t){jr(t,"name",["string"]);var e=this.getField(t);if(e instanceof Td)return e;throw new _c(t,Td,e)},t.prototype.getOptionList=function(t){jr(t,"name",["string"]);var e=this.getField(t);if(e instanceof Pd)return e;throw new _c(t,Pd,e)},t.prototype.getRadioGroup=function(t){jr(t,"name",["string"]);var e=this.getField(t);if(e instanceof zd)return e;throw new _c(t,zd,e)},t.prototype.getSignature=function(t){jr(t,"name",["string"]);var e=this.getField(t);if(e instanceof Od)return e;throw new _c(t,Od,e)},t.prototype.getTextField=function(t){jr(t,"name",["string"]);var e=this.getField(t);if(e instanceof Dd)return e;throw new _c(t,Dd,e)},t.prototype.createButton=function(t){jr(t,"name",["string"]);var e=Ed(t),r=this.findOrCreateNonTerminals(e.nonTerminal),n=yh.create(this.doc.context);return n.setPartialName(e.terminal),jd(r,[n,n.ref],e.terminal),Gd.of(n,n.ref,this.doc)},t.prototype.createCheckBox=function(t){jr(t,"name",["string"]);var e=Ed(t),r=this.findOrCreateNonTerminals(e.nonTerminal),n=uh.create(this.doc.context);return n.setPartialName(e.terminal),jd(r,[n,n.ref],e.terminal),Ad.of(n,n.ref,this.doc)},t.prototype.createDropdown=function(t){jr(t,"name",["string"]);var e=Ed(t),r=this.findOrCreateNonTerminals(e.nonTerminal),n=fh.create(this.doc.context);return n.setPartialName(e.terminal),jd(r,[n,n.ref],e.terminal),Td.of(n,n.ref,this.doc)},t.prototype.createOptionList=function(t){jr(t,"name",["string"]);var e=Ed(t),r=this.findOrCreateNonTerminals(e.nonTerminal),n=bh.create(this.doc.context);return n.setPartialName(e.terminal),jd(r,[n,n.ref],e.terminal),Pd.of(n,n.ref,this.doc)},t.prototype.createRadioGroup=function(t){jr(t,"name",["string"]);var e=Ed(t),r=this.findOrCreateNonTerminals(e.nonTerminal),n=mh.create(this.doc.context);return n.setPartialName(e.terminal),jd(r,[n,n.ref],e.terminal),zd.of(n,n.ref,this.doc)},t.prototype.createTextField=function(t){jr(t,"name",["string"]);var e=Ed(t),r=this.findOrCreateNonTerminals(e.nonTerminal),n=vh.create(this.doc.context);return n.setPartialName(e.terminal),jd(r,[n,n.ref],e.terminal),Dd.of(n,n.ref,this.doc)},t.prototype.flatten=function(t){void 0===t&&(t={updateFieldAppearances:!0}),t.updateFieldAppearances&&this.updateFieldAppearances();for(var e=this.getFields(),n=0,o=e.length;n<o;n++){for(var a=e[n],s=a.acroField.getWidgets(),l=0,h=s.length;l<h;l++){var u=s[l],c=this.findWidgetPage(u),d=this.findWidgetAppearanceRef(a,u),f=c.node.newXObject("FlatWidget",d),p=u.getRectangle(),g=i([Pu(),mu(p.x,p.y)],Ec(r(r({},p),{rotation:0})),[Zu(f),zu()]).filter(Boolean);c.pushOperators.apply(c,g)}this.removeField(a)}},t.prototype.removeField=function(t){for(var e=t.acroField.getWidgets(),r=new Set,n=0,o=e.length;n<o;n++){var i=e[n],a=this.findWidgetAppearanceRef(t,i),s=this.findWidgetPage(i);r.add(s),s.node.removeAnnot(a)}r.forEach(function(e){return e.node.removeAnnot(t.ref)}),this.acroForm.removeField(t.acroField);for(var l=t.acroField.normalizedEntries().Kids,h=l.size(),u=0;u<h;u++){var c=l.get(u);c instanceof Gi&&this.doc.context.delete(c)}this.doc.context.delete(t.ref)},t.prototype.updateFieldAppearances=function(t){Ir(t,"font",[[xd,"PDFFont"]]),t=null!=t?t:this.getDefaultFont();for(var e=this.getFields(),r=0,n=e.length;r<n;r++){var o=e[r];o.needsAppearancesUpdate()&&o.defaultUpdateAppearances(t)}},t.prototype.markFieldAsDirty=function(t){Ir(t,"fieldRef",[[Gi,"PDFRef"]]),this.dirtyFields.add(t)},t.prototype.markFieldAsClean=function(t){Ir(t,"fieldRef",[[Gi,"PDFRef"]]),this.dirtyFields.delete(t)},t.prototype.fieldIsDirty=function(t){return Ir(t,"fieldRef",[[Gi,"PDFRef"]]),this.dirtyFields.has(t)},t.prototype.getDefaultFont=function(){return this.defaultFontCache.access()},t.prototype.findWidgetPage=function(t){var e=t.P(),r=this.doc.getPages().find(function(t){return t.ref===e});if(void 0===r){var n=this.doc.context.getObjectRef(t.dict);if(void 0===n)throw new Error("Could not find PDFRef for PDFObject");if(void 0===(r=this.doc.findPageForAnnotationRef(n)))throw new Error("Could not find page for PDFRef "+n)}return r},t.prototype.findWidgetAppearanceRef=function(t,e){var r,n=e.getNormalAppearance();if(n instanceof Vi&&(t instanceof Ad||t instanceof zd)){var o=t.acroField.getValue(),i=null!==(r=n.get(o))&&void 0!==r?r:n.get(Mi.of("Off"));i instanceof Gi&&(n=i)}if(!(n instanceof Gi)){var a=t.getName();throw new Error("Failed to extract appearance ref for: "+a)}return n},t.prototype.findOrCreateNonTerminals=function(t){for(var e=[this.acroForm],r=0,n=t.length;r<n;r++){var o=t[r];if(!o)throw new Zc(o);var i=e[0],a=e[1],s=this.findNonTerminal(o,i);if(s)e=s;else{var l=ph.create(this.doc.context);l.setPartialName(o),l.setParent(a);var h=this.doc.context.register(l.dict);i.addField(h),e=[l,h]}}return e},t.prototype.findNonTerminal=function(t,e){for(var r=e instanceof zh?this.acroForm.getFields():wh(e.Kids()),n=0,o=r.length;n<o;n++){var i=r[n],a=i[0],s=i[1];if(a.getPartialName()===t){if(a instanceof ph)return[a,s];throw new Xc(t)}}},t.of=function(e,r){return new t(e,r)},t}(),Nd=function(t,e,r){return t instanceof yh?Gd.of(t,e,r):t instanceof uh?Ad.of(t,e,r):t instanceof fh?Td.of(t,e,r):t instanceof bh?Pd.of(t,e,r):t instanceof vh?Dd.of(t,e,r):t instanceof mh?zd.of(t,e,r):t instanceof gh?Od.of(t,e,r):void 0},Ed=function(t){if(0===t.length)throw new Error("PDF field names must not be empty strings");for(var e=t.split("."),r=0,n=e.length;r<n;r++)if(""===e[r])throw new Error('Periods in PDF field names must be separated by at least one character: "'+t+'"');return 1===e.length?{nonTerminal:[],terminal:e[0]}:{nonTerminal:e.slice(0,e.length-1),terminal:e[e.length-1]}},jd=function(t,e,r){for(var n=t[0],o=t[1],i=e[0],a=e[1],s=n.normalizedEntries(),l=(wh("Kids"in s?s.Kids:s.Fields)),h=0,u=l.length;h<u;h++)if(l[h][0].getPartialName()===r)throw new Xc(r);n.addField(a),i.setParent(o)},Id={A4:[595.28,841.89]};exports.ParseSpeeds=void 0,(Rd=exports.ParseSpeeds||(exports.ParseSpeeds={}))[Rd.Fastest=1/0]="Fastest",Rd[Rd.Fast=1500]="Fast",Rd[Rd.Medium=500]="Medium",Rd[Rd.Slow=100]="Slow";var Md,Ud=function(){function t(t,e,r){this.alreadyEmbedded=!1,this.ref=t,this.doc=e,this.embedder=r}return t.prototype.embed=function(){return n(this,0,void 0,function(){var t,e,r,n;return o(this,function(o){switch(o.label){case 0:return this.alreadyEmbedded?[3,2]:[4,this.embedder.embedIntoContext(this.doc.context,this.ref)];case 1:t=o.sent(),this.doc.catalog.has(Mi.of("Names"))||this.doc.catalog.set(Mi.of("Names"),this.doc.context.obj({})),(e=this.doc.catalog.lookup(Mi.of("Names"),Vi)).has(Mi.of("EmbeddedFiles"))||e.set(Mi.of("EmbeddedFiles"),this.doc.context.obj({})),(r=e.lookup(Mi.of("EmbeddedFiles"),Vi)).has(Mi.of("Names"))||r.set(Mi.of("Names"),this.doc.context.obj([])),(n=r.lookup(Mi.of("Names"),Ti)).push(ca.fromText(this.embedder.fileName)),n.push(t),this.doc.catalog.has(Mi.of("AF"))||this.doc.catalog.set(Mi.of("AF"),this.doc.context.obj([])),this.doc.catalog.lookup(Mi.of("AF"),Ti).push(t),this.alreadyEmbedded=!0,o.label=2;case 2:return[2]}})})},t.of=function(e,r,n){return new t(e,r,n)},t}(),Vd=function(){function t(t,e,r){this.alreadyEmbedded=!1,this.ref=t,this.doc=e,this.embedder=r}return t.prototype.embed=function(){return n(this,0,void 0,function(){var t,e,r,n,i,a,s;return o(this,function(o){switch(o.label){case 0:return this.alreadyEmbedded?[3,2]:(t=this.doc,e=t.catalog,r=t.context,[4,this.embedder.embedIntoContext(this.doc.context,this.ref)]);case 1:n=o.sent(),e.has(Mi.of("Names"))||e.set(Mi.of("Names"),r.obj({})),(i=e.lookup(Mi.of("Names"),Vi)).has(Mi.of("JavaScript"))||i.set(Mi.of("JavaScript"),r.obj({})),(a=i.lookup(Mi.of("JavaScript"),Vi)).has(Mi.of("Names"))||a.set(Mi.of("Names"),r.obj([])),(s=a.lookup(Mi.of("Names"),Ti)).push(ca.fromText(this.embedder.scriptName)),s.push(n),this.alreadyEmbedded=!0,o.label=2;case 2:return[2]}})})},t.of=function(e,r,n){return new t(e,r,n)},t}(),Wd=function(){function t(t,e){this.script=t,this.scriptName=e}return t.for=function(e,r){return new t(e,r)},t.prototype.embedIntoContext=function(t,e){return n(this,0,void 0,function(){var r;return o(this,function(n){return r=t.obj({Type:"Action",S:"JavaScript",JS:ca.fromText(this.script)}),e?(t.assign(e,r),[2,e]):[2,t.register(r)]})})},t}(),qd=function(){function t(t,e,r){var n=this;if(this.defaultWordBreaks=[" "],this.computePages=function(){var t=[];return n.catalog.Pages().traverse(function(e,r){if(e instanceof ta){var o=n.pageMap.get(e);o||(o=Kd.of(e,r,n),n.pageMap.set(e,o)),t.push(o)}}),t},this.getOrCreateForm=function(){var t=n.catalog.getOrCreateAcroForm();return Bd.of(t,n)},jr(t,"context",[[$i,"PDFContext"]]),jr(e,"ignoreEncryption",["boolean"]),this.context=t,this.catalog=t.lookup(t.trailerInfo.Root),this.isEncrypted=!!t.lookup(t.trailerInfo.Encrypt),this.pageCache=Xr.populatedBy(this.computePages),this.pageMap=new Map,this.formCache=Xr.populatedBy(this.getOrCreateForm),this.fonts=[],this.images=[],this.embeddedPages=[],this.embeddedFiles=[],this.javaScripts=[],!e&&this.isEncrypted)throw new qc;r&&this.updateInfoDict()}return t.load=function(e,r){return void 0===r&&(r={}),n(this,0,void 0,function(){var n,i,a,s,l,h,u,c,d,f,p;return o(this,function(o){switch(o.label){case 0:return n=r.ignoreEncryption,i=void 0!==n&&n,a=r.parseSpeed,s=void 0===a?exports.ParseSpeeds.Slow:a,l=r.throwOnInvalidObject,h=void 0!==l&&l,u=r.updateMetadata,c=void 0===u||u,d=r.capNumbers,f=void 0!==d&&d,jr(e,"pdf",["string",Uint8Array,ArrayBuffer]),jr(i,"ignoreEncryption",["boolean"]),jr(s,"parseSpeed",["number"]),jr(h,"throwOnInvalidObject",["boolean"]),p=H(e),[4,Yh.forBytesWithOptions(p,s,h,f).parseDocument()];case 1:return[2,new t(o.sent(),i,c)]}})})},t.create=function(e){return void 0===e&&(e={}),n(this,0,void 0,function(){var r,n,i,a,s,l;return o(this,function(o){return r=e.updateMetadata,n=void 0===r||r,i=$i.create(),a=Dh.withContext(i),s=i.register(a),l=Oh.withContextAndPages(i,s),i.trailerInfo.Root=i.register(l),[2,new t(i,!1,n)]})})},t.prototype.registerFontkit=function(t){this.fontkit=t},t.prototype.getForm=function(){var t=this.formCache.access();return t.hasXFA()&&(console.warn("Removing XFA form data as pdf-lib does not support reading or writing XFA"),t.deleteXFA()),t},t.prototype.getTitle=function(){var t=this.getInfoDict().lookup(Mi.Title);if(t)return Ld(t),t.decodeText()},t.prototype.getAuthor=function(){var t=this.getInfoDict().lookup(Mi.Author);if(t)return Ld(t),t.decodeText()},t.prototype.getSubject=function(){var t=this.getInfoDict().lookup(Mi.Subject);if(t)return Ld(t),t.decodeText()},t.prototype.getKeywords=function(){var t=this.getInfoDict().lookup(Mi.Keywords);if(t)return Ld(t),t.decodeText()},t.prototype.getCreator=function(){var t=this.getInfoDict().lookup(Mi.Creator);if(t)return Ld(t),t.decodeText()},t.prototype.getProducer=function(){var t=this.getInfoDict().lookup(Mi.Producer);if(t)return Ld(t),t.decodeText()},t.prototype.getCreationDate=function(){var t=this.getInfoDict().lookup(Mi.CreationDate);if(t)return Ld(t),t.decodeDate()},t.prototype.getModificationDate=function(){var t=this.getInfoDict().lookup(Mi.ModDate);if(t)return Ld(t),t.decodeDate()},t.prototype.setTitle=function(t,e){jr(t,"title",["string"]);var r=Mi.of("Title");this.getInfoDict().set(r,ca.fromText(t)),(null==e?void 0:e.showInWindowTitleBar)&&this.catalog.getOrCreateViewerPreferences().setDisplayDocTitle(!0)},t.prototype.setAuthor=function(t){jr(t,"author",["string"]);var e=Mi.of("Author");this.getInfoDict().set(e,ca.fromText(t))},t.prototype.setSubject=function(t){jr(t,"author",["string"]);var e=Mi.of("Subject");this.getInfoDict().set(e,ca.fromText(t))},t.prototype.setKeywords=function(t){jr(t,"keywords",[Array]);var e=Mi.of("Keywords");this.getInfoDict().set(e,ca.fromText(t.join(" ")))},t.prototype.setCreator=function(t){jr(t,"creator",["string"]);var e=Mi.of("Creator");this.getInfoDict().set(e,ca.fromText(t))},t.prototype.setProducer=function(t){jr(t,"creator",["string"]);var e=Mi.of("Producer");this.getInfoDict().set(e,ca.fromText(t))},t.prototype.setLanguage=function(t){jr(t,"language",["string"]);var e=Mi.of("Lang");this.catalog.set(e,va.of(t))},t.prototype.setCreationDate=function(t){jr(t,"creationDate",[[Date,"Date"]]);var e=Mi.of("CreationDate");this.getInfoDict().set(e,va.fromDate(t))},t.prototype.setModificationDate=function(t){jr(t,"modificationDate",[[Date,"Date"]]);var e=Mi.of("ModDate");this.getInfoDict().set(e,va.fromDate(t))},t.prototype.getPageCount=function(){return void 0===this.pageCount&&(this.pageCount=this.getPages().length),this.pageCount},t.prototype.getPages=function(){return this.pageCache.access()},t.prototype.getPage=function(t){var e=this.getPages();return Ur(t,"index",0,e.length-1),e[t]},t.prototype.getPageIndices=function(){return L(0,this.getPageCount())},t.prototype.removePage=function(t){var e=this.getPageCount();if(0===this.pageCount)throw new Gc;Ur(t,"index",0,e-1),this.catalog.removeLeafNode(t),this.pageCount=e-1},t.prototype.addPage=function(t){return jr(t,"page",["undefined",[Kd,"PDFPage"],Array]),this.insertPage(this.getPageCount(),t)},t.prototype.insertPage=function(t,e){var r=this.getPageCount();if(Ur(t,"index",0,r),jr(e,"page",["undefined",[Kd,"PDFPage"],Array]),!e||Array.isArray(e)){var n=Array.isArray(e)?e:Id.A4;(e=Kd.create(this)).setSize.apply(e,n)}else if(e.doc!==this)throw new Kc;var o=this.catalog.insertLeafNode(e.ref,t);return e.node.setParent(o),this.pageMap.set(e.node,e),this.pageCache.invalidate(),this.pageCount=r+1,e},t.prototype.copyPages=function(e,r){return n(this,0,void 0,function(){var n,i,a,s,l,h,u,c;return o(this,function(o){switch(o.label){case 0:return jr(e,"srcDoc",[[t,"PDFDocument"]]),jr(r,"indices",[Array]),[4,e.flush()];case 1:for(o.sent(),n=ea.for(e.context,this.context),i=e.getPages(),a=new Array(r.length),s=0,l=r.length;s<l;s++)h=i[r[s]],u=n.copy(h.node),c=this.context.register(u),a[s]=Kd.of(u,c,this);return[2,a]}})})},t.prototype.copy=function(){return n(this,0,void 0,function(){var e,r,n,i;return o(this,function(o){switch(o.label){case 0:return[4,t.create()];case 1:return[4,(e=o.sent()).copyPages(this,this.getPageIndices())];case 2:for(r=o.sent(),n=0,i=r.length;n<i;n++)e.addPage(r[n]);return void 0!==this.getAuthor()&&e.setAuthor(this.getAuthor()),void 0!==this.getCreationDate()&&e.setCreationDate(this.getCreationDate()),void 0!==this.getCreator()&&e.setCreator(this.getCreator()),void 0!==this.getModificationDate()&&e.setModificationDate(this.getModificationDate()),void 0!==this.getProducer()&&e.setProducer(this.getProducer()),void 0!==this.getSubject()&&e.setSubject(this.getSubject()),void 0!==this.getTitle()&&e.setTitle(this.getTitle()),e.defaultWordBreaks=this.defaultWordBreaks,[2,e]}})})},t.prototype.addJavaScript=function(t,e){jr(t,"name",["string"]),jr(e,"script",["string"]);var r=Wd.for(e,t),n=this.context.nextRef(),o=Vd.of(n,this,r);this.javaScripts.push(o)},t.prototype.attach=function(t,e,r){return void 0===r&&(r={}),n(this,0,void 0,function(){var n,i,a,s;return o(this,function(o){return jr(t,"attachment",["string",Uint8Array,ArrayBuffer]),jr(e,"name",["string"]),Ir(r.mimeType,"mimeType",["string"]),Ir(r.description,"description",["string"]),Ir(r.creationDate,"options.creationDate",[Date]),Ir(r.modificationDate,"options.modificationDate",[Date]),Dr(r.afRelationship,"options.afRelationship",exports.AFRelationship),n=H(t),i=wa.for(n,e,r),a=this.context.nextRef(),s=Ud.of(a,this,i),this.embeddedFiles.push(s),[2]})})},t.prototype.embedFont=function(t,e){return void 0===e&&(e={}),n(this,0,void 0,function(){var r,n,i,a,s,l,h,u,c,d;return o(this,function(o){switch(o.label){case 0:return r=e.subset,n=void 0!==r&&r,i=e.customName,a=e.features,jr(t,"font",["string",Uint8Array,ArrayBuffer]),jr(n,"subset",["boolean"]),Sr(t)?(s=da.for(t,i),[3,7]):[3,1];case 1:return G(t)?(l=H(t),h=this.assertFontkit(),n?[4,ma.for(h,l,i,a)]:[3,3]):[3,6];case 2:return u=o.sent(),[3,5];case 3:return[4,ya.for(h,l,i,a)];case 4:u=o.sent(),o.label=5;case 5:return s=u,[3,7];case 6:throw new TypeError("`font` must be one of `StandardFonts | string | Uint8Array | ArrayBuffer`");case 7:return c=this.context.nextRef(),d=xd.of(c,this,s),this.fonts.push(d),[2,d]}})})},t.prototype.embedStandardFont=function(t,e){if(jr(t,"font",["string"]),!Sr(t))throw new TypeError("`font` must be one of type `StandardFonts`");var r=da.for(t,e),n=this.context.nextRef(),o=xd.of(n,this,r);return this.fonts.push(o),o},t.prototype.embedJpg=function(t){return n(this,0,void 0,function(){var e,r,n,i;return o(this,function(o){switch(o.label){case 0:return jr(t,"jpg",["string",Uint8Array,ArrayBuffer]),e=H(t),[4,Fa.for(e)];case 1:return r=o.sent(),n=this.context.nextRef(),i=kd.of(n,this,r),this.images.push(i),[2,i]}})})},t.prototype.embedPng=function(t){return n(this,0,void 0,function(){var e,r,n,i;return o(this,function(o){switch(o.label){case 0:return jr(t,"png",["string",Uint8Array,ArrayBuffer]),e=H(t),[4,Rl.for(e)];case 1:return r=o.sent(),n=this.context.nextRef(),i=kd.of(n,this,r),this.images.push(i),[2,i]}})})},t.prototype.embedPdf=function(e,r){return void 0===r&&(r=[0]),n(this,0,void 0,function(){var n,i;return o(this,function(o){switch(o.label){case 0:return jr(e,"pdf",["string",Uint8Array,ArrayBuffer,[t,"PDFDocument"]]),jr(r,"indices",[Array]),e instanceof t?(n=e,[3,3]):[3,1];case 1:return[4,t.load(e)];case 2:n=o.sent(),o.label=3;case 3:return i=K(n.getPages(),r),[2,this.embedPages(i)]}})})},t.prototype.embedPage=function(t,e,r){return n(this,0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return jr(t,"page",[[Kd,"PDFPage"]]),[4,this.embedPages([t],[e],[r])];case 1:return[2,n.sent()[0]]}})})},t.prototype.embedPages=function(t,e,r){return void 0===e&&(e=[]),void 0===r&&(r=[]),n(this,0,void 0,function(){var n,i,a,s,l,h,u,c,d,f,p,g,v;return o(this,function(o){switch(o.label){case 0:if(0===t.length)return[2,[]];for(h=0,u=t.length-1;h<u;h++)if(n=t[h],i=t[h+1],n.node.context!==i.node.context)throw new nn;a=t[0].node.context,s=a===this.context?function(t){return t}:ea.for(a,this.context).copy,l=new Array(t.length),h=0,u=t.length,o.label=1;case 1:return h<u?(c=s(t[h].node),d=e[h],f=r[h],[4,Zl.for(c,d,f)]):[3,4];case 2:p=o.sent(),g=this.context.nextRef(),l[h]=wd.of(g,this,p),o.label=3;case 3:return h++,[3,1];case 4:return(v=this.embeddedPages).push.apply(v,l),[2,l]}})})},t.prototype.flush=function(){return n(this,0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return[4,this.embedAll(this.fonts)];case 1:return t.sent(),[4,this.embedAll(this.images)];case 2:return t.sent(),[4,this.embedAll(this.embeddedPages)];case 3:return t.sent(),[4,this.embedAll(this.embeddedFiles)];case 4:return t.sent(),[4,this.embedAll(this.javaScripts)];case 5:return t.sent(),[2]}})})},t.prototype.save=function(t){return void 0===t&&(t={}),n(this,0,void 0,function(){var e,r,n,i,a,s,l,h,u;return o(this,function(o){switch(o.label){case 0:return e=t.useObjectStreams,r=void 0===e||e,n=t.addDefaultPage,i=void 0===n||n,a=t.objectsPerTick,s=void 0===a?50:a,l=t.updateFieldAppearances,h=void 0===l||l,jr(r,"useObjectStreams",["boolean"]),jr(i,"addDefaultPage",["boolean"]),jr(s,"objectsPerTick",["number"]),jr(h,"updateFieldAppearances",["boolean"]),i&&0===this.getPageCount()&&this.addPage(),h&&(u=this.formCache.getValue())&&u.updateFieldAppearances(),[4,this.flush()];case 1:return o.sent(),[2,(r?ua:aa).forContext(this.context,s).serializeToBuffer()]}})})},t.prototype.saveAsBase64=function(t){return void 0===t&&(t={}),n(this,0,void 0,function(){var e,r,n,i,a;return o(this,function(o){switch(o.label){case 0:return e=t.dataUri,r=void 0!==e&&e,n=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}(t,["dataUri"]),jr(r,"dataUri",["boolean"]),[4,this.save(n)];case 1:return i=o.sent(),a=u(i),[2,r?"data:application/pdf;base64,"+a:a]}})})},t.prototype.findPageForAnnotationRef=function(t){for(var e=this.getPages(),r=0,n=e.length;r<n;r++){var o=e[r],i=o.node.Annots();if(void 0!==(null==i?void 0:i.indexOf(t)))return o}},t.prototype.embedAll=function(t){return n(this,0,void 0,function(){var e,r;return o(this,function(n){switch(n.label){case 0:e=0,r=t.length,n.label=1;case 1:return e<r?[4,t[e].embed()]:[3,4];case 2:n.sent(),n.label=3;case 3:return e++,[3,1];case 4:return[2]}})})},t.prototype.updateInfoDict=function(){var t="pdf-lib (https://github.com/Hopding/pdf-lib)",e=new Date,r=this.getInfoDict();this.setProducer(t),this.setModificationDate(e),r.get(Mi.of("Creator"))||this.setCreator(t),r.get(Mi.of("CreationDate"))||this.setCreationDate(e)},t.prototype.getInfoDict=function(){var t=this.context.lookup(this.context.trailerInfo.Info);if(t instanceof Vi)return t;var e=this.context.obj({});return this.context.trailerInfo.Info=this.context.register(e),e},t.prototype.assertFontkit=function(){if(!this.fontkit)throw new Lc;return this.fontkit},t}();function Ld(t){if(!(t instanceof ca||t instanceof va))throw new Jr([ca,va],t)}exports.BlendMode=void 0,(Md=exports.BlendMode||(exports.BlendMode={})).Normal="Normal",Md.Multiply="Multiply",Md.Screen="Screen",Md.Overlay="Overlay",Md.Darken="Darken",Md.Lighten="Lighten",Md.ColorDodge="ColorDodge",Md.ColorBurn="ColorBurn",Md.HardLight="HardLight",Md.SoftLight="SoftLight",Md.Difference="Difference",Md.Exclusion="Exclusion";var Kd=function(){function t(t,e,r){this.fontSize=24,this.fontColor=ic(0,0,0),this.lineHeight=24,this.x=0,this.y=0,jr(t,"leafNode",[[ta,"PDFPageLeaf"]]),jr(e,"ref",[[Gi,"PDFRef"]]),jr(r,"doc",[[qd,"PDFDocument"]]),this.node=t,this.ref=e,this.doc=r}return t.prototype.setRotation=function(t){var e=hu(t);Wr(e,"degreesAngle",90),this.node.set(Mi.of("Rotate"),this.doc.context.obj(e))},t.prototype.getRotation=function(){var t=this.node.Rotate();return nu(t?t.asNumber():0)},t.prototype.setSize=function(t,e){jr(t,"width",["number"]),jr(e,"height",["number"]);var r=this.getMediaBox();this.setMediaBox(r.x,r.y,t,e);var n=this.getCropBox(),o=this.getBleedBox(),i=this.getTrimBox(),a=this.getArtBox(),s=this.node.CropBox(),l=this.node.BleedBox(),h=this.node.TrimBox(),u=this.node.ArtBox();s&&Cr(n,r)&&this.setCropBox(r.x,r.y,t,e),l&&Cr(o,r)&&this.setBleedBox(r.x,r.y,t,e),h&&Cr(i,r)&&this.setTrimBox(r.x,r.y,t,e),u&&Cr(a,r)&&this.setArtBox(r.x,r.y,t,e)},t.prototype.setWidth=function(t){jr(t,"width",["number"]),this.setSize(t,this.getSize().height)},t.prototype.setHeight=function(t){jr(t,"height",["number"]),this.setSize(this.getSize().width,t)},t.prototype.setMediaBox=function(t,e,r,n){jr(t,"x",["number"]),jr(e,"y",["number"]),jr(r,"width",["number"]),jr(n,"height",["number"]);var o=this.doc.context.obj([t,e,t+r,e+n]);this.node.set(Mi.MediaBox,o)},t.prototype.setCropBox=function(t,e,r,n){jr(t,"x",["number"]),jr(e,"y",["number"]),jr(r,"width",["number"]),jr(n,"height",["number"]);var o=this.doc.context.obj([t,e,t+r,e+n]);this.node.set(Mi.CropBox,o)},t.prototype.setBleedBox=function(t,e,r,n){jr(t,"x",["number"]),jr(e,"y",["number"]),jr(r,"width",["number"]),jr(n,"height",["number"]);var o=this.doc.context.obj([t,e,t+r,e+n]);this.node.set(Mi.BleedBox,o)},t.prototype.setTrimBox=function(t,e,r,n){jr(t,"x",["number"]),jr(e,"y",["number"]),jr(r,"width",["number"]),jr(n,"height",["number"]);var o=this.doc.context.obj([t,e,t+r,e+n]);this.node.set(Mi.TrimBox,o)},t.prototype.setArtBox=function(t,e,r,n){jr(t,"x",["number"]),jr(e,"y",["number"]),jr(r,"width",["number"]),jr(n,"height",["number"]);var o=this.doc.context.obj([t,e,t+r,e+n]);this.node.set(Mi.ArtBox,o)},t.prototype.getSize=function(){var t=this.getMediaBox();return{width:t.width,height:t.height}},t.prototype.getWidth=function(){return this.getSize().width},t.prototype.getHeight=function(){return this.getSize().height},t.prototype.getMediaBox=function(){return this.node.MediaBox().asRectangle()},t.prototype.getCropBox=function(){var t,e=this.node.CropBox();return null!==(t=null==e?void 0:e.asRectangle())&&void 0!==t?t:this.getMediaBox()},t.prototype.getBleedBox=function(){var t,e=this.node.BleedBox();return null!==(t=null==e?void 0:e.asRectangle())&&void 0!==t?t:this.getCropBox()},t.prototype.getTrimBox=function(){var t,e=this.node.TrimBox();return null!==(t=null==e?void 0:e.asRectangle())&&void 0!==t?t:this.getCropBox()},t.prototype.getArtBox=function(){var t,e=this.node.ArtBox();return null!==(t=null==e?void 0:e.asRectangle())&&void 0!==t?t:this.getCropBox()},t.prototype.translateContent=function(t,e){jr(t,"x",["number"]),jr(e,"y",["number"]),this.node.normalize(),this.getContentStream();var r=this.createContentStream(Pu(),mu(t,e)),n=this.doc.context.register(r),o=this.createContentStream(zu()),i=this.doc.context.register(o);this.node.wrapContentStreams(n,i)},t.prototype.scale=function(t,e){jr(t,"x",["number"]),jr(e,"y",["number"]),this.setSize(this.getWidth()*t,this.getHeight()*e),this.scaleContent(t,e),this.scaleAnnotations(t,e)},t.prototype.scaleContent=function(t,e){jr(t,"x",["number"]),jr(e,"y",["number"]),this.node.normalize(),this.getContentStream();var r=this.createContentStream(Pu(),bu(t,e)),n=this.doc.context.register(r),o=this.createContentStream(zu()),i=this.doc.context.register(o);this.node.wrapContentStreams(n,i)},t.prototype.scaleAnnotations=function(t,e){jr(t,"x",["number"]),jr(e,"y",["number"]);var r=this.node.Annots();if(r)for(var n=0;n<r.size();n++){var o=r.lookup(n);o instanceof Vi&&this.scaleAnnot(o,t,e)}},t.prototype.resetPosition=function(){this.getContentStream(!1),this.x=0,this.y=0},t.prototype.setFont=function(t){jr(t,"font",[[xd,"PDFFont"]]),this.font=t,this.fontKey=this.node.newFontDictionary(this.font.name,this.font.ref)},t.prototype.setFontSize=function(t){jr(t,"fontSize",["number"]),this.fontSize=t},t.prototype.setFontColor=function(t){jr(t,"fontColor",[[Object,"Color"]]),this.fontColor=t},t.prototype.setLineHeight=function(t){jr(t,"lineHeight",["number"]),this.lineHeight=t},t.prototype.getPosition=function(){return{x:this.x,y:this.y}},t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t.prototype.moveTo=function(t,e){jr(t,"x",["number"]),jr(e,"y",["number"]),this.x=t,this.y=e},t.prototype.moveDown=function(t){jr(t,"yDecrease",["number"]),this.y-=t},t.prototype.moveUp=function(t){jr(t,"yIncrease",["number"]),this.y+=t},t.prototype.moveLeft=function(t){jr(t,"xDecrease",["number"]),this.x-=t},t.prototype.moveRight=function(t){jr(t,"xIncrease",["number"]),this.x+=t},t.prototype.pushOperators=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];Mr(t,"operator",[[Hi,"PDFOperator"]]);var r=this.getContentStream();r.push.apply(r,t)},t.prototype.drawText=function(t,e){var r,n,o,i,a,s,l;void 0===e&&(e={}),jr(t,"text",["string"]),Ir(e.color,"options.color",[[Object,"Color"]]),Vr(e.opacity,"opacity.opacity",0,1),Ir(e.font,"options.font",[[xd,"PDFFont"]]),Ir(e.size,"options.size",["number"]),Ir(e.rotate,"options.rotate",[[Object,"Rotation"]]),Ir(e.xSkew,"options.xSkew",[[Object,"Rotation"]]),Ir(e.ySkew,"options.ySkew",[[Object,"Rotation"]]),Ir(e.x,"options.x",["number"]),Ir(e.y,"options.y",["number"]),Ir(e.lineHeight,"options.lineHeight",["number"]),Ir(e.maxWidth,"options.maxWidth",["number"]),Ir(e.wordBreaks,"options.wordBreaks",[Array]),Dr(e.blendMode,"options.blendMode",exports.BlendMode);for(var h=this.setOrEmbedFont(e.font),u=h.oldFont,c=h.newFont,d=h.newFontKey,f=e.size||this.fontSize,p=e.wordBreaks||this.doc.defaultWordBreaks,g=void 0===e.maxWidth?A(F(t)):O(t,p,e.maxWidth,function(t){return c.widthOfTextAtSize(t,f)}),v=new Array(g.length),y=0,m=g.length;y<m;y++)v[y]=c.encodeText(g[y]);var b=this.maybeEmbedGraphicsState({opacity:e.opacity,blendMode:e.blendMode}),w=this.getContentStream();w.push.apply(w,Cc(v,{color:null!==(r=e.color)&&void 0!==r?r:this.fontColor,font:d,size:f,rotate:null!==(n=e.rotate)&&void 0!==n?n:nu(0),xSkew:null!==(o=e.xSkew)&&void 0!==o?o:nu(0),ySkew:null!==(i=e.ySkew)&&void 0!==i?i:nu(0),x:null!==(a=e.x)&&void 0!==a?a:this.x,y:null!==(s=e.y)&&void 0!==s?s:this.y,lineHeight:null!==(l=e.lineHeight)&&void 0!==l?l:this.lineHeight,graphicsState:b})),e.font&&(u?this.setFont(u):this.resetFont())},t.prototype.drawImage=function(t,e){var r,n,o,i,a,s,l;void 0===e&&(e={}),jr(t,"image",[[kd,"PDFImage"]]),Ir(e.x,"options.x",["number"]),Ir(e.y,"options.y",["number"]),Ir(e.width,"options.width",["number"]),Ir(e.height,"options.height",["number"]),Ir(e.rotate,"options.rotate",[[Object,"Rotation"]]),Ir(e.xSkew,"options.xSkew",[[Object,"Rotation"]]),Ir(e.ySkew,"options.ySkew",[[Object,"Rotation"]]),Vr(e.opacity,"opacity.opacity",0,1),Dr(e.blendMode,"options.blendMode",exports.BlendMode);var h=this.node.newXObject("Image",t.ref),u=this.maybeEmbedGraphicsState({opacity:e.opacity,blendMode:e.blendMode}),c=this.getContentStream();c.push.apply(c,Ac(h,{x:null!==(r=e.x)&&void 0!==r?r:this.x,y:null!==(n=e.y)&&void 0!==n?n:this.y,width:null!==(o=e.width)&&void 0!==o?o:t.size().width,height:null!==(i=e.height)&&void 0!==i?i:t.size().height,rotate:null!==(a=e.rotate)&&void 0!==a?a:nu(0),xSkew:null!==(s=e.xSkew)&&void 0!==s?s:nu(0),ySkew:null!==(l=e.ySkew)&&void 0!==l?l:nu(0),graphicsState:u}))},t.prototype.drawPage=function(t,e){var r,n,o,i,a;void 0===e&&(e={}),jr(t,"embeddedPage",[[wd,"PDFEmbeddedPage"]]),Ir(e.x,"options.x",["number"]),Ir(e.y,"options.y",["number"]),Ir(e.xScale,"options.xScale",["number"]),Ir(e.yScale,"options.yScale",["number"]),Ir(e.width,"options.width",["number"]),Ir(e.height,"options.height",["number"]),Ir(e.rotate,"options.rotate",[[Object,"Rotation"]]),Ir(e.xSkew,"options.xSkew",[[Object,"Rotation"]]),Ir(e.ySkew,"options.ySkew",[[Object,"Rotation"]]),Vr(e.opacity,"opacity.opacity",0,1),Dr(e.blendMode,"options.blendMode",exports.BlendMode);var s=this.node.newXObject("EmbeddedPdfPage",t.ref),l=this.maybeEmbedGraphicsState({opacity:e.opacity,blendMode:e.blendMode}),h=void 0!==e.width?e.width/t.width:void 0!==e.xScale?e.xScale:1,u=void 0!==e.height?e.height/t.height:void 0!==e.yScale?e.yScale:1,c=this.getContentStream();c.push.apply(c,Tc(s,{x:null!==(r=e.x)&&void 0!==r?r:this.x,y:null!==(n=e.y)&&void 0!==n?n:this.y,xScale:h,yScale:u,rotate:null!==(o=e.rotate)&&void 0!==o?o:nu(0),xSkew:null!==(i=e.xSkew)&&void 0!==i?i:nu(0),ySkew:null!==(a=e.ySkew)&&void 0!==a?a:nu(0),graphicsState:l}))},t.prototype.drawSvgPath=function(t,e){var r,n,o,i,a,s,l,h,u;void 0===e&&(e={}),jr(t,"path",["string"]),Ir(e.x,"options.x",["number"]),Ir(e.y,"options.y",["number"]),Ir(e.scale,"options.scale",["number"]),Ir(e.rotate,"options.rotate",[[Object,"Rotation"]]),Ir(e.borderWidth,"options.borderWidth",["number"]),Ir(e.color,"options.color",[[Object,"Color"]]),Vr(e.opacity,"opacity.opacity",0,1),Ir(e.borderColor,"options.borderColor",[[Object,"Color"]]),Ir(e.borderDashArray,"options.borderDashArray",[Array]),Ir(e.borderDashPhase,"options.borderDashPhase",["number"]),Dr(e.borderLineCap,"options.borderLineCap",exports.LineCapStyle),Vr(e.borderOpacity,"options.borderOpacity",0,1),Dr(e.blendMode,"options.blendMode",exports.BlendMode);var c=this.maybeEmbedGraphicsState({opacity:e.opacity,borderOpacity:e.borderOpacity,blendMode:e.blendMode});"color"in e||"borderColor"in e||(e.borderColor=ic(0,0,0));var d=this.getContentStream();d.push.apply(d,Bc(t,{x:null!==(r=e.x)&&void 0!==r?r:this.x,y:null!==(n=e.y)&&void 0!==n?n:this.y,scale:e.scale,rotate:null!==(o=e.rotate)&&void 0!==o?o:nu(0),color:null!==(i=e.color)&&void 0!==i?i:void 0,borderColor:null!==(a=e.borderColor)&&void 0!==a?a:void 0,borderWidth:null!==(s=e.borderWidth)&&void 0!==s?s:0,borderDashArray:null!==(l=e.borderDashArray)&&void 0!==l?l:void 0,borderDashPhase:null!==(h=e.borderDashPhase)&&void 0!==h?h:void 0,borderLineCap:null!==(u=e.borderLineCap)&&void 0!==u?u:void 0,graphicsState:c}))},t.prototype.drawLine=function(t){var e,r,n,o,i;jr(t.start,"options.start",[[Object,"{ x: number, y: number }"]]),jr(t.end,"options.end",[[Object,"{ x: number, y: number }"]]),jr(t.start.x,"options.start.x",["number"]),jr(t.start.y,"options.start.y",["number"]),jr(t.end.x,"options.end.x",["number"]),jr(t.end.y,"options.end.y",["number"]),Ir(t.thickness,"options.thickness",["number"]),Ir(t.color,"options.color",[[Object,"Color"]]),Ir(t.dashArray,"options.dashArray",[Array]),Ir(t.dashPhase,"options.dashPhase",["number"]),Dr(t.lineCap,"options.lineCap",exports.LineCapStyle),Vr(t.opacity,"opacity.opacity",0,1),Dr(t.blendMode,"options.blendMode",exports.BlendMode);var a=this.maybeEmbedGraphicsState({borderOpacity:t.opacity,blendMode:t.blendMode});"color"in t||(t.color=ic(0,0,0));var s=this.getContentStream();s.push.apply(s,Pc({start:t.start,end:t.end,thickness:null!==(e=t.thickness)&&void 0!==e?e:1,color:null!==(r=t.color)&&void 0!==r?r:void 0,dashArray:null!==(n=t.dashArray)&&void 0!==n?n:void 0,dashPhase:null!==(o=t.dashPhase)&&void 0!==o?o:void 0,lineCap:null!==(i=t.lineCap)&&void 0!==i?i:void 0,graphicsState:a}))},t.prototype.drawRectangle=function(t){var e,r,n,o,i,a,s,l,h,u,c,d,f;void 0===t&&(t={}),Ir(t.x,"options.x",["number"]),Ir(t.y,"options.y",["number"]),Ir(t.width,"options.width",["number"]),Ir(t.height,"options.height",["number"]),Ir(t.rotate,"options.rotate",[[Object,"Rotation"]]),Ir(t.xSkew,"options.xSkew",[[Object,"Rotation"]]),Ir(t.ySkew,"options.ySkew",[[Object,"Rotation"]]),Ir(t.borderWidth,"options.borderWidth",["number"]),Ir(t.color,"options.color",[[Object,"Color"]]),Vr(t.opacity,"opacity.opacity",0,1),Ir(t.borderColor,"options.borderColor",[[Object,"Color"]]),Ir(t.borderDashArray,"options.borderDashArray",[Array]),Ir(t.borderDashPhase,"options.borderDashPhase",["number"]),Dr(t.borderLineCap,"options.borderLineCap",exports.LineCapStyle),Vr(t.borderOpacity,"options.borderOpacity",0,1),Dr(t.blendMode,"options.blendMode",exports.BlendMode);var p=this.maybeEmbedGraphicsState({opacity:t.opacity,borderOpacity:t.borderOpacity,blendMode:t.blendMode});"color"in t||"borderColor"in t||(t.color=ic(0,0,0));var g=this.getContentStream();g.push.apply(g,zc({x:null!==(e=t.x)&&void 0!==e?e:this.x,y:null!==(r=t.y)&&void 0!==r?r:this.y,width:null!==(n=t.width)&&void 0!==n?n:150,height:null!==(o=t.height)&&void 0!==o?o:100,rotate:null!==(i=t.rotate)&&void 0!==i?i:nu(0),xSkew:null!==(a=t.xSkew)&&void 0!==a?a:nu(0),ySkew:null!==(s=t.ySkew)&&void 0!==s?s:nu(0),borderWidth:null!==(l=t.borderWidth)&&void 0!==l?l:0,color:null!==(h=t.color)&&void 0!==h?h:void 0,borderColor:null!==(u=t.borderColor)&&void 0!==u?u:void 0,borderDashArray:null!==(c=t.borderDashArray)&&void 0!==c?c:void 0,borderDashPhase:null!==(d=t.borderDashPhase)&&void 0!==d?d:void 0,graphicsState:p,borderLineCap:null!==(f=t.borderLineCap)&&void 0!==f?f:void 0}))},t.prototype.drawSquare=function(t){void 0===t&&(t={});var e=t.size;Ir(e,"size",["number"]),this.drawRectangle(r(r({},t),{width:e,height:e}))},t.prototype.drawEllipse=function(t){var e,r,n,o,i,a,s,l,h,u,c;void 0===t&&(t={}),Ir(t.x,"options.x",["number"]),Ir(t.y,"options.y",["number"]),Ir(t.xScale,"options.xScale",["number"]),Ir(t.yScale,"options.yScale",["number"]),Ir(t.rotate,"options.rotate",[[Object,"Rotation"]]),Ir(t.color,"options.color",[[Object,"Color"]]),Vr(t.opacity,"opacity.opacity",0,1),Ir(t.borderColor,"options.borderColor",[[Object,"Color"]]),Vr(t.borderOpacity,"options.borderOpacity",0,1),Ir(t.borderWidth,"options.borderWidth",["number"]),Ir(t.borderDashArray,"options.borderDashArray",[Array]),Ir(t.borderDashPhase,"options.borderDashPhase",["number"]),Dr(t.borderLineCap,"options.borderLineCap",exports.LineCapStyle),Dr(t.blendMode,"options.blendMode",exports.BlendMode);var d=this.maybeEmbedGraphicsState({opacity:t.opacity,borderOpacity:t.borderOpacity,blendMode:t.blendMode});"color"in t||"borderColor"in t||(t.color=ic(0,0,0));var f=this.getContentStream();f.push.apply(f,Rc({x:null!==(e=t.x)&&void 0!==e?e:this.x,y:null!==(r=t.y)&&void 0!==r?r:this.y,xScale:null!==(n=t.xScale)&&void 0!==n?n:100,yScale:null!==(o=t.yScale)&&void 0!==o?o:100,rotate:null!==(i=t.rotate)&&void 0!==i?i:void 0,color:null!==(a=t.color)&&void 0!==a?a:void 0,borderColor:null!==(s=t.borderColor)&&void 0!==s?s:void 0,borderWidth:null!==(l=t.borderWidth)&&void 0!==l?l:0,borderDashArray:null!==(h=t.borderDashArray)&&void 0!==h?h:void 0,borderDashPhase:null!==(u=t.borderDashPhase)&&void 0!==u?u:void 0,borderLineCap:null!==(c=t.borderLineCap)&&void 0!==c?c:void 0,graphicsState:d}))},t.prototype.drawCircle=function(t){void 0===t&&(t={});var e=t.size,n=void 0===e?100:e;Ir(n,"size",["number"]),this.drawEllipse(r(r({},t),{xScale:n,yScale:n}))},t.prototype.setOrEmbedFont=function(t){var e=this.font,r=this.fontKey;return t?this.setFont(t):this.getFont(),{oldFont:e,oldFontKey:r,newFont:this.font,newFontKey:this.fontKey}},t.prototype.getFont=function(){if(!this.font||!this.fontKey){var t=this.doc.embedStandardFont(exports.StandardFonts.Helvetica);this.setFont(t)}return[this.font,this.fontKey]},t.prototype.resetFont=function(){this.font=void 0,this.fontKey=void 0},t.prototype.getContentStream=function(t){return void 0===t&&(t=!0),t&&this.contentStream||(this.contentStream=this.createContentStream(),this.contentStreamRef=this.doc.context.register(this.contentStream),this.node.addContentStream(this.contentStreamRef)),this.contentStream},t.prototype.createContentStream=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=this.doc.context.obj({});return Yi.of(r,t)},t.prototype.maybeEmbedGraphicsState=function(t){var e=t.opacity,r=t.borderOpacity,n=t.blendMode;if(void 0!==e||void 0!==r||void 0!==n){var o=this.doc.context.obj({Type:"ExtGState",ca:e,CA:r,BM:n});return this.node.newExtGState("GS",o)}},t.prototype.scaleAnnot=function(t,e,r){for(var n=["RD","CL","Vertices","QuadPoints","L","Rect"],o=0,i=n.length;o<i;o++){var a=t.lookup(Mi.of(n[o]));a instanceof Ti&&a.scalePDFNumbers(e,r)}var s=t.lookup(Mi.of("InkList"));if(s instanceof Ti)for(o=0,i=s.size();o<i;o++){var l=s.lookup(o);l instanceof Ti&&l.scalePDFNumbers(e,r)}},t.of=function(e,r,n){return new t(e,r,n)},t.create=function(e){jr(e,"doc",[[qd,"PDFDocument"]]);var r=Gi.of(-1),n=ta.withContextAndParent(e.context,r);return new t(n,e.context.register(n),e)},t}(),Gd=function(t){function r(e,r,n){var o=t.call(this,e,r,n)||this;return jr(e,"acroButton",[[yh,"PDFAcroPushButton"]]),o.acroField=e,o}return e(r,t),r.prototype.setImage=function(t,e){void 0===e&&(e=exports.ImageAlignment.Center);for(var r=this.acroField.getWidgets(),n=0,o=r.length;n<o;n++){var i=r[n],a=this.createImageAppearanceStream(i,t,e);this.updateWidgetAppearances(i,{normal:a})}this.markAsClean()},r.prototype.setFontSize=function(t){Lr(t,"fontSize"),this.acroField.setFontSize(t),this.markAsDirty()},r.prototype.addToPage=function(t,e,r){var n,o,i,a,s,l,h,u,c,d,f;Ir(t,"text",["string"]),Ir(e,"page",[[Kd,"PDFPage"]]),Sd(r);var p=this.createWidget({x:(null!==(n=null==r?void 0:r.x)&&void 0!==n?n:0)-(null!==(o=null==r?void 0:r.borderWidth)&&void 0!==o?o:0)/2,y:(null!==(i=null==r?void 0:r.y)&&void 0!==i?i:0)-(null!==(a=null==r?void 0:r.borderWidth)&&void 0!==a?a:0)/2,width:null!==(s=null==r?void 0:r.width)&&void 0!==s?s:100,height:null!==(l=null==r?void 0:r.height)&&void 0!==l?l:50,textColor:null!==(h=null==r?void 0:r.textColor)&&void 0!==h?h:ic(0,0,0),backgroundColor:null!==(u=null==r?void 0:r.backgroundColor)&&void 0!==u?u:ic(.75,.75,.75),borderColor:null==r?void 0:r.borderColor,borderWidth:null!==(c=null==r?void 0:r.borderWidth)&&void 0!==c?c:0,rotate:null!==(d=null==r?void 0:r.rotate)&&void 0!==d?d:nu(0),caption:t,hidden:null==r?void 0:r.hidden,page:e.ref}),g=this.doc.context.register(p.dict);this.acroField.addWidget(g);var v=null!==(f=null==r?void 0:r.font)&&void 0!==f?f:this.doc.getForm().getDefaultFont();this.updateWidgetAppearance(p,v),e.node.addAnnot(g)},r.prototype.needsAppearancesUpdate=function(){var t;if(this.isDirty())return!0;for(var e=this.acroField.getWidgets(),r=0,n=e.length;r<n;r++)if(!((null===(t=e[r].getAppearances())||void 0===t?void 0:t.normal)instanceof Wi))return!0;return!1},r.prototype.defaultUpdateAppearances=function(t){jr(t,"font",[[xd,"PDFFont"]]),this.updateAppearances(t)},r.prototype.updateAppearances=function(t,e){jr(t,"font",[[xd,"PDFFont"]]),Ir(e,"provider",[Function]);for(var r=this.acroField.getWidgets(),n=0,o=r.length;n<o;n++){var i=r[n];this.updateWidgetAppearance(i,t,e)}},r.prototype.updateWidgetAppearance=function(t,e,r){var n=ld((null!=r?r:vd)(this,t,e));this.updateWidgetAppearanceWithFont(t,e,n)},r.of=function(t,e,n){return new r(t,e,n)},r}(Cd);exports.AppearanceCharacteristics=ah,exports.Cache=Xr,exports.CharCodes=Sn,exports.CombedTextLayoutError=Qc,exports.CorruptPageTreeError=ln,exports.CustomFontEmbedder=ya,exports.CustomFontSubsetEmbedder=ma,exports.EncryptedPDFError=qc,exports.ExceededMaxLengthError=$c,exports.FieldAlreadyExistsError=Xc,exports.FileEmbedder=wa,exports.FontkitNotRegisteredError=Lc,exports.ForeignPageError=Kc,exports.IndexOutOfBoundsError=hn,exports.InvalidAcroFieldValueError=un,exports.InvalidFieldNamePartError=Zc,exports.InvalidMaxLengthError=td,exports.InvalidPDFDateStringError=an,exports.InvalidTargetIndexError=sn,exports.JpegEmbedder=Fa,exports.MethodNotImplementedError=Zr,exports.MissingDAEntryError=dn,exports.MissingKeywordError=Fn,exports.MissingPDFHeaderError=kn,exports.MissingPageContentsEmbeddingError=en,exports.MissingTfOperatorError=fn,exports.MultiSelectValueError=cn,exports.NextByteAssertionError=vn,exports.NoSuchFieldError=Hc,exports.NumberParsingError=pn,exports.PDFAcroButton=hh,exports.PDFAcroCheckBox=uh,exports.PDFAcroChoice=dh,exports.PDFAcroComboBox=fh,exports.PDFAcroField=nh,exports.PDFAcroForm=zh,exports.PDFAcroListBox=bh,exports.PDFAcroNonTerminal=ph,exports.PDFAcroPushButton=yh,exports.PDFAcroRadioButton=mh,exports.PDFAcroSignature=gh,exports.PDFAcroTerminal=lh,exports.PDFAcroText=vh,exports.PDFAnnotation=ih,exports.PDFArray=Ti,exports.PDFArrayIsNotRectangleError=on,exports.PDFBool=zi,exports.PDFButton=Gd,exports.PDFCatalog=Oh,exports.PDFCheckBox=Ad,exports.PDFContentStream=Yi,exports.PDFContext=$i,exports.PDFCrossRefSection=ra,exports.PDFCrossRefStream=ha,exports.PDFDict=Vi,exports.PDFDocument=qd,exports.PDFDropdown=Td,exports.PDFEmbeddedPage=wd,exports.PDFField=Cd,exports.PDFFlateStream=Zi,exports.PDFFont=xd,exports.PDFForm=Bd,exports.PDFHeader=Si,exports.PDFHexString=ca,exports.PDFImage=kd,exports.PDFInvalidObject=sa,exports.PDFInvalidObjectParsingError=mn,exports.PDFJavaScript=Vd,exports.PDFName=Mi,exports.PDFNull=Ui,exports.PDFNumber=Ai,exports.PDFObject=Ci,exports.PDFObjectCopier=ea,exports.PDFObjectParser=_h,exports.PDFObjectParsingError=yn,exports.PDFObjectStream=ia,exports.PDFObjectStreamParser=Xh,exports.PDFOperator=Hi,exports.PDFOperatorNames=Xi,exports.PDFOptionList=Pd,exports.PDFPage=Kd,exports.PDFPageEmbedder=Zl,exports.PDFPageLeaf=ta,exports.PDFPageTree=Dh,exports.PDFParser=Yh,exports.PDFParsingError=gn,exports.PDFRadioGroup=zd,exports.PDFRawStream=qi,exports.PDFRef=Gi,exports.PDFSignature=Od,exports.PDFStream=Wi,exports.PDFStreamParsingError=bn,exports.PDFStreamWriter=ua,exports.PDFString=va,exports.PDFTextField=Dd,exports.PDFTrailer=na,exports.PDFTrailerDict=oa,exports.PDFWidgetAnnotation=sh,exports.PDFWriter=aa,exports.PDFXRefStreamParser=Zh,exports.PageEmbeddingMismatchedContextError=nn,exports.PageSizes=Id,exports.PngEmbedder=Rl,exports.PrivateConstructorError=Yr,exports.RemovePageFromEmptyDocumentError=Gc,exports.ReparseError=$r,exports.RichTextFieldReadError=Jc,exports.StalledParserError=xn,exports.StandardFontEmbedder=da,exports.StandardFontValues=Fr,exports.UnbalancedParenthesisError=wn,exports.UnexpectedFieldTypeError=_c,exports.UnexpectedObjectTypeError=Jr,exports.UnrecognizedStreamTypeError=rn,exports.UnsupportedEncodingError=Qr,exports.ViewerPreferences=eh,exports.adjustDimsForRotation=cu,exports.appendBezierCurve=Du,exports.appendQuadraticCurve=Ru,exports.arrayAsString=M,exports.asNumber=eu,exports.asPDFName=$h,exports.asPDFNumber=tu,exports.assertEachIs=Mr,exports.assertInteger=qr,exports.assertIs=jr,exports.assertIsOneOf=Or,exports.assertIsOneOfOrUndefined=Dr,exports.assertIsSubset=Rr,exports.assertMultiple=Wr,exports.assertOrUndefined=Ir,exports.assertPositive=Lr,exports.assertRange=Ur,exports.assertRangeOrUndefined=Vr,exports.backtick=Ar,exports.beginMarkedContent=rc,exports.beginText=qu,exports.breakTextIntoLines=O,exports.byAscendingId=U,exports.bytesFor=ut,exports.canBeConvertedToUint8Array=G,exports.charAtIndex=P,exports.charFromCode=m,exports.charFromHexCode=b,exports.charSplit=z,exports.cleanText=F,exports.clip=fu,exports.closePath=Bu,exports.cmyk=ac,exports.colorToComponents=fc,exports.componentsToColor=dc,exports.concatTransformationMatrix=yu,exports.copyStringIntoBuffer=x,exports.createPDFAcroField=xh,exports.createPDFAcroFields=wh,exports.createTypeErrorMsg=Er,exports.createValueErrorMsg=zr,exports.decodeFromBase64=c,exports.decodeFromBase64DataUri=f,exports.decodePDFRawStream=Xl,exports.defaultButtonAppearanceProvider=vd,exports.defaultCheckBoxAppearanceProvider=pd,exports.defaultDropdownAppearanceProvider=md,exports.defaultOptionListAppearanceProvider=bd,exports.defaultRadioGroupAppearanceProvider=gd,exports.defaultTextFieldAppearanceProvider=yd,exports.degrees=nu,exports.degreesToRadians=au,exports.drawButton=Mc,exports.drawCheckBox=jc,exports.drawCheckMark=Nc,exports.drawEllipse=Rc,exports.drawEllipsePath=Dc,exports.drawImage=Ac,exports.drawLine=Pc,exports.drawLinesOfText=Cc,exports.drawObject=Zu,exports.drawOptionList=Wc,exports.drawPage=Tc,exports.drawRadioButton=Ic,exports.drawRectangle=zc,exports.drawSvgPath=Bc,exports.drawTextField=Vc,exports.drawTextLines=Uc,exports.encodeToBase64=u,exports.endMarkedContent=nc,exports.endPath=Uu,exports.endText=Lu,exports.error=ct,exports.escapeRegExp=k,exports.escapedNewlineChars=S,exports.fill=Iu,exports.fillAndStroke=Mu,exports.findLastMatch=B,exports.getType=Br,exports.grayscale=oc,exports.hasSurrogates=Y,exports.hasUtf16BOM=st,exports.highSurrogate=J,exports.isNewlineChar=C,exports.isStandardFont=Sr,exports.isType=Nr,exports.isWithinBMP=Z,exports.last=N,exports.layoutCombedText=ad,exports.layoutMultilineText=id,exports.layoutSinglelineText=sd,exports.lineSplit=A,exports.lineTo=Eu,exports.lowSurrogate=Q,exports.mergeIntoTypedArray=j,exports.mergeLines=T,exports.mergeUint8Arrays=I,exports.moveTo=Nu,exports.nextLine=Vu,exports.normalizeAppearance=ld,exports.numberToString=lt,exports.padStart=w,exports.parseDate=R,exports.pdfDocEncodingDecode=_r,exports.pluckIndices=K,exports.popGraphicsState=zu,exports.pushGraphicsState=Pu,exports.radiansToDegrees=su,exports.range=L,exports.rectanglesAreEqual=Cr,exports.reduceRotation=uu,exports.reverseArray=W,exports.rgb=ic,exports.rotateAndSkewTextRadiansAndTranslate=Xu,exports.rotateDegrees=xu,exports.rotateInPlace=Ec,exports.rotateRadians=wu,exports.rotateRectangle=du,exports.scale=bu,exports.setDashPattern=Fu,exports.setFillingCmykColor=tc,exports.setFillingColor=uc,exports.setFillingGrayscaleColor=Yu,exports.setFillingRgbColor=Qu,exports.setFontAndSize=Ku,exports.setGraphicsState=Tu,exports.setLineCap=Cu,exports.setLineHeight=Gu,exports.setLineWidth=Ou,exports.setStrokingCmykColor=ec,exports.setStrokingColor=cc,exports.setStrokingGrayscaleColor=Ju,exports.setStrokingRgbColor=$u,exports.setTextMatrix=_u,exports.showText=Wu,exports.singleQuote=Tr,exports.sizeInBytes=ht,exports.skewRadians=ku,exports.sortedUniq=V,exports.stroke=ju,exports.sum=q,exports.toCharCode=p,exports.toCodePoint=g,exports.toDegrees=hu,exports.toHexString=y,exports.toHexStringOfMinLength=v,exports.toRadians=lu,exports.toUint8Array=H,exports.translate=mu,exports.typedArrayFor=E,exports.utf16Decode=tt,exports.utf16Encode=X,exports.values=kr,exports.waitForTick=_;